From 28e74c05bbb72e6fa06b2ef7df6b32bd4fc82130 Mon Sep 17 00:00:00 2001 From: R3D347HR4Y Date: Tue, 9 Jun 2026 14:32:31 +0200 Subject: [PATCH] fix: remove accidentally committed hocuspocus node_modules Add node_modules/ to .gitignore to prevent recurrence. --- .gitignore | 3 + .../hocuspocus/node_modules/.bin/node-gyp | 21 - .../hocuspocus/node_modules/.modules.yaml | 121 - .../.pnpm-workspace-state-v1.json | 25 - .../node_modules/@gar/promisify/LICENSE.md | 10 - .../node_modules/@gar/promisify/README.md | 65 - .../node_modules/@gar/promisify/index.js | 36 - .../node_modules/@gar/promisify/package.json | 32 - .../node_modules/@hocuspocus/common/README.md | 14 - .../common/dist/hocuspocus-common.cjs | 521 - .../common/dist/hocuspocus-common.cjs.map | 1 - .../common/dist/hocuspocus-common.esm.js | 509 - .../common/dist/hocuspocus-common.esm.js.map | 1 - .../node_modules/@tiptap/pm/model/index.d.ts | 1 - .../node_modules/@tiptap/pm/state/index.d.ts | 1 - .../@tiptap/pm/transform/index.d.ts | 1 - .../node_modules/@tiptap/pm/view/index.d.ts | 1 - .../dist/packages/common/src/CloseEvents.d.ts | 29 - .../common/dist/packages/common/src/auth.d.ts | 13 - .../common/src/awarenessStatesToArray.d.ts | 3 - .../dist/packages/common/src/index.d.ts | 4 - .../dist/packages/common/src/types.d.ts | 10 - .../extension-database/src/Database.d.ts | 30 - .../extension-database/src/index.d.ts | 1 - .../packages/extension-logger/src/Logger.d.ts | 67 - .../packages/extension-logger/src/index.d.ts | 1 - .../packages/extension-redis/src/Redis.d.ts | 124 - .../packages/extension-redis/src/index.d.ts | 1 - .../dist/packages/extension-s3/src/S3.d.ts | 44 - .../dist/packages/extension-s3/src/index.d.ts | 1 - .../packages/extension-sqlite/src/SQLite.d.ts | 27 - .../packages/extension-sqlite/src/index.d.ts | 1 - .../extension-throttle/src/index.d.ts | 30 - .../packages/extension-webhook/src/index.d.ts | 56 - .../packages/provider/src/EventEmitter.d.ts | 9 - .../provider/src/HocuspocusProvider.d.ts | 116 - .../src/HocuspocusProviderWebsocket.d.ts | 119 - .../provider/src/IncomingMessage.d.ts | 17 - .../provider/src/MessageReceiver.d.ts | 12 - .../packages/provider/src/MessageSender.d.ts | 9 - .../provider/src/OutgoingMessage.d.ts | 9 - .../AuthenticationMessage.d.ts | 8 - .../OutgoingMessages/AwarenessMessage.d.ts | 9 - .../src/OutgoingMessages/CloseMessage.d.ts | 9 - .../QueryAwarenessMessage.d.ts | 9 - .../OutgoingMessages/StatelessMessage.d.ts | 8 - .../OutgoingMessages/SyncStepOneMessage.d.ts | 9 - .../OutgoingMessages/SyncStepTwoMessage.d.ts | 9 - .../src/OutgoingMessages/UpdateMessage.d.ts | 8 - .../dist/packages/provider/src/index.d.ts | 3 - .../dist/packages/provider/src/types.d.ts | 93 - .../packages/server/src/ClientConnection.d.ts | 63 - .../dist/packages/server/src/Connection.d.ts | 75 - .../packages/server/src/DirectConnection.d.ts | 14 - .../dist/packages/server/src/Document.d.ts | 92 - .../dist/packages/server/src/Hocuspocus.d.ts | 80 - .../packages/server/src/IncomingMessage.d.ts | 25 - .../packages/server/src/MessageReceiver.d.ts | 11 - .../packages/server/src/OutgoingMessage.d.ts | 23 - .../dist/packages/server/src/Server.d.ts | 32 - .../dist/packages/server/src/index.d.ts | 9 - .../dist/packages/server/src/types.d.ts | 342 - .../packages/server/src/util/debounce.d.ts | 6 - .../server/src/util/getParameters.d.ts | 6 - .../packages/transformer/src/Prosemirror.d.ts | 11 - .../dist/packages/transformer/src/Tiptap.d.ts | 10 - .../dist/packages/transformer/src/index.d.ts | 3 - .../dist/packages/transformer/src/types.d.ts | 5 - .../dist/playground/backend/src/default.d.ts | 1 - .../dist/playground/backend/src/deno.d.ts | 1 - .../dist/playground/backend/src/express.d.ts | 1 - .../dist/playground/backend/src/hono.d.ts | 1 - .../dist/playground/backend/src/koa.d.ts | 1 - .../playground/backend/src/load-document.d.ts | 1 - .../dist/playground/backend/src/redis.d.ts | 1 - .../dist/playground/backend/src/s3-redis.d.ts | 1 - .../dist/playground/backend/src/s3.d.ts | 1 - .../dist/playground/backend/src/slow.d.ts | 1 - .../playground/backend/src/tiptapcollab.d.ts | 1 - .../dist/playground/backend/src/webhook.d.ts | 1 - .../frontend/app/SocketContext1.d.ts | 2 - .../frontend/app/SocketContext2.d.ts | 2 - .../dist/playground/frontend/next.config.d.ts | 3 - .../dist/tests/extension-database/fetch.d.ts | 1 - .../dist/tests/extension-logger/onListen.d.ts | 1 - .../extension-redis/onAwarenessChange.d.ts | 1 - .../dist/tests/extension-redis/onChange.d.ts | 1 - .../tests/extension-redis/onStateless.d.ts | 1 - .../extension-redis/onStoreDocument.d.ts | 1 - .../common/dist/tests/extension-s3/fetch.d.ts | 1 - .../tests/extension-throttle/banning.d.ts | 1 - .../extension-throttle/configuration.d.ts | 1 - .../tests/provider/hasUnsyncedChanges.d.ts | 1 - .../common/dist/tests/provider/observe.d.ts | 1 - .../dist/tests/provider/observeDeep.d.ts | 1 - .../dist/tests/provider/onAuthenticated.d.ts | 1 - .../provider/onAuthenticationFailed.d.ts | 1 - .../tests/provider/onAwarenessChange.d.ts | 1 - .../tests/provider/onAwarenessUpdate.d.ts | 1 - .../common/dist/tests/provider/onClose.d.ts | 1 - .../common/dist/tests/provider/onConnect.d.ts | 1 - .../dist/tests/provider/onDisconnect.d.ts | 1 - .../common/dist/tests/provider/onMessage.d.ts | 1 - .../common/dist/tests/provider/onOpen.d.ts | 1 - .../dist/tests/provider/onStateless.d.ts | 1 - .../common/dist/tests/provider/onSynced.d.ts | 1 - .../providerwebsocket/configuration.d.ts | 1 - .../common/dist/tests/server/address.d.ts | 1 - .../dist/tests/server/afterLoadDocument.d.ts | 1 - .../dist/tests/server/afterStoreDocument.d.ts | 1 - .../tests/server/afterUnloadDocument.d.ts | 1 - .../server/beforeBroadcastStateless.d.ts | 1 - .../tests/server/beforeHandleMessage.d.ts | 1 - .../common/dist/tests/server/beforeSync.d.ts | 1 - .../tests/server/beforeUnloadDocument.d.ts | 1 - .../dist/tests/server/closeConnections.d.ts | 1 - .../tests/server/getConnectionsCount.d.ts | 1 - .../dist/tests/server/getDocumentsCount.d.ts | 1 - .../common/dist/tests/server/listen.d.ts | 1 - .../dist/tests/server/onAuthenticate.d.ts | 1 - .../dist/tests/server/onAwarenessUpdate.d.ts | 1 - .../common/dist/tests/server/onChange.d.ts | 1 - .../common/dist/tests/server/onClose.d.ts | 1 - .../common/dist/tests/server/onConfigure.d.ts | 1 - .../common/dist/tests/server/onConnect.d.ts | 1 - .../common/dist/tests/server/onDestroy.d.ts | 1 - .../dist/tests/server/onDisconnect.d.ts | 1 - .../common/dist/tests/server/onListen.d.ts | 1 - .../dist/tests/server/onLoadDocument.d.ts | 1 - .../common/dist/tests/server/onRequest.d.ts | 1 - .../common/dist/tests/server/onStateless.d.ts | 1 - .../dist/tests/server/onStoreDocument.d.ts | 1 - .../common/dist/tests/server/onTokenSync.d.ts | 1 - .../common/dist/tests/server/onUpgrade.d.ts | 1 - .../tests/server/openDirectConnection.d.ts | 1 - .../dist/tests/server/websocketError.d.ts | 1 - .../tests/transformer/TiptapTransformer.d.ts | 1 - .../dist/tests/utils/createDirectory.d.ts | 1 - .../common/dist/tests/utils/flushRedis.d.ts | 1 - .../common/dist/tests/utils/index.d.ts | 9 - .../dist/tests/utils/newHocuspocus.d.ts | 2 - .../tests/utils/newHocuspocusProvider.d.ts | 3 - .../utils/newHocuspocusProviderWebsocket.d.ts | 4 - .../dist/tests/utils/randomInteger.d.ts | 1 - .../tests/utils/redisConnectionSettings.d.ts | 4 - .../dist/tests/utils/removeDirectory.d.ts | 1 - .../dist/tests/utils/retryableAssertion.d.ts | 2 - .../common/dist/tests/utils/sleep.d.ts | 1 - .../node_modules/.bin/0ecdsa-generate-keypair | 21 - .../common/node_modules/.bin/0gentesthtml | 21 - .../common/node_modules/.bin/0serve | 21 - .../@hocuspocus/common/package.json | 35 - .../@hocuspocus/common/src/CloseEvents.ts | 49 - .../@hocuspocus/common/src/auth.ts | 62 - .../common/src/awarenessStatesToArray.ts | 10 - .../@hocuspocus/common/src/index.ts | 4 - .../@hocuspocus/common/src/types.ts | 10 - .../node_modules/lib0 | 1 - .../@hocuspocus/common/LICENSE.md | 21 - .../node_modules/@hocuspocus/common/README.md | 14 - .../common/dist/hocuspocus-common.cjs | 183 - .../common/dist/hocuspocus-common.cjs.map | 1 - .../common/dist/hocuspocus-common.esm.js | 138 - .../common/dist/hocuspocus-common.esm.js.map | 1 - .../@hocuspocus/common/dist/index.d.ts | 78 - .../node_modules/.bin/0ecdsa-generate-keypair | 21 - .../common/node_modules/.bin/0gentesthtml | 21 - .../common/node_modules/.bin/0serve | 21 - .../@hocuspocus/common/package.json | 38 - .../@hocuspocus/common/src/CloseEvents.ts | 49 - .../common/src/SkipFurtherHooksError.ts | 6 - .../@hocuspocus/common/src/auth.ts | 62 - .../common/src/awarenessStatesToArray.ts | 10 - .../@hocuspocus/common/src/index.ts | 6 - .../@hocuspocus/common/src/routingKey.ts | 11 - .../@hocuspocus/common/src/types.ts | 10 - .../node_modules/lib0 | 1 - .../@hocuspocus/extension-database/README.md | 14 - .../dist/hocuspocus-database.cjs | 62 - .../dist/hocuspocus-database.cjs.map | 1 - .../dist/hocuspocus-database.esm.js | 41 - .../dist/hocuspocus-database.esm.js.map | 1 - .../node_modules/@tiptap/pm/model/index.d.ts | 1 - .../node_modules/@tiptap/pm/state/index.d.ts | 1 - .../@tiptap/pm/transform/index.d.ts | 1 - .../node_modules/@tiptap/pm/view/index.d.ts | 1 - .../dist/packages/common/src/CloseEvents.d.ts | 29 - .../dist/packages/common/src/auth.d.ts | 13 - .../common/src/awarenessStatesToArray.d.ts | 3 - .../dist/packages/common/src/index.d.ts | 4 - .../dist/packages/common/src/types.d.ts | 10 - .../extension-database/src/Database.d.ts | 30 - .../extension-database/src/index.d.ts | 1 - .../packages/extension-logger/src/Logger.d.ts | 67 - .../packages/extension-logger/src/index.d.ts | 1 - .../packages/extension-redis/src/Redis.d.ts | 124 - .../packages/extension-redis/src/index.d.ts | 1 - .../dist/packages/extension-s3/src/S3.d.ts | 44 - .../dist/packages/extension-s3/src/index.d.ts | 1 - .../packages/extension-sqlite/src/SQLite.d.ts | 27 - .../packages/extension-sqlite/src/index.d.ts | 1 - .../extension-throttle/src/index.d.ts | 30 - .../packages/extension-webhook/src/index.d.ts | 56 - .../packages/provider/src/EventEmitter.d.ts | 9 - .../provider/src/HocuspocusProvider.d.ts | 116 - .../src/HocuspocusProviderWebsocket.d.ts | 119 - .../provider/src/IncomingMessage.d.ts | 17 - .../provider/src/MessageReceiver.d.ts | 12 - .../packages/provider/src/MessageSender.d.ts | 9 - .../provider/src/OutgoingMessage.d.ts | 9 - .../AuthenticationMessage.d.ts | 8 - .../OutgoingMessages/AwarenessMessage.d.ts | 9 - .../src/OutgoingMessages/CloseMessage.d.ts | 9 - .../QueryAwarenessMessage.d.ts | 9 - .../OutgoingMessages/StatelessMessage.d.ts | 8 - .../OutgoingMessages/SyncStepOneMessage.d.ts | 9 - .../OutgoingMessages/SyncStepTwoMessage.d.ts | 9 - .../src/OutgoingMessages/UpdateMessage.d.ts | 8 - .../dist/packages/provider/src/index.d.ts | 3 - .../dist/packages/provider/src/types.d.ts | 93 - .../packages/server/src/ClientConnection.d.ts | 63 - .../dist/packages/server/src/Connection.d.ts | 75 - .../packages/server/src/DirectConnection.d.ts | 14 - .../dist/packages/server/src/Document.d.ts | 92 - .../dist/packages/server/src/Hocuspocus.d.ts | 80 - .../packages/server/src/IncomingMessage.d.ts | 25 - .../packages/server/src/MessageReceiver.d.ts | 11 - .../packages/server/src/OutgoingMessage.d.ts | 23 - .../dist/packages/server/src/Server.d.ts | 32 - .../dist/packages/server/src/index.d.ts | 9 - .../dist/packages/server/src/types.d.ts | 342 - .../packages/server/src/util/debounce.d.ts | 6 - .../server/src/util/getParameters.d.ts | 6 - .../packages/transformer/src/Prosemirror.d.ts | 11 - .../dist/packages/transformer/src/Tiptap.d.ts | 10 - .../dist/packages/transformer/src/index.d.ts | 3 - .../dist/packages/transformer/src/types.d.ts | 5 - .../dist/playground/backend/src/default.d.ts | 1 - .../dist/playground/backend/src/deno.d.ts | 1 - .../dist/playground/backend/src/express.d.ts | 1 - .../dist/playground/backend/src/hono.d.ts | 1 - .../dist/playground/backend/src/koa.d.ts | 1 - .../playground/backend/src/load-document.d.ts | 1 - .../dist/playground/backend/src/redis.d.ts | 1 - .../dist/playground/backend/src/s3-redis.d.ts | 1 - .../dist/playground/backend/src/s3.d.ts | 1 - .../dist/playground/backend/src/slow.d.ts | 1 - .../playground/backend/src/tiptapcollab.d.ts | 1 - .../dist/playground/backend/src/webhook.d.ts | 1 - .../frontend/app/SocketContext1.d.ts | 2 - .../frontend/app/SocketContext2.d.ts | 2 - .../dist/playground/frontend/next.config.d.ts | 3 - .../dist/tests/extension-database/fetch.d.ts | 1 - .../dist/tests/extension-logger/onListen.d.ts | 1 - .../extension-redis/onAwarenessChange.d.ts | 1 - .../dist/tests/extension-redis/onChange.d.ts | 1 - .../tests/extension-redis/onStateless.d.ts | 1 - .../extension-redis/onStoreDocument.d.ts | 1 - .../dist/tests/extension-s3/fetch.d.ts | 1 - .../tests/extension-throttle/banning.d.ts | 1 - .../extension-throttle/configuration.d.ts | 1 - .../tests/provider/hasUnsyncedChanges.d.ts | 1 - .../dist/tests/provider/observe.d.ts | 1 - .../dist/tests/provider/observeDeep.d.ts | 1 - .../dist/tests/provider/onAuthenticated.d.ts | 1 - .../provider/onAuthenticationFailed.d.ts | 1 - .../tests/provider/onAwarenessChange.d.ts | 1 - .../tests/provider/onAwarenessUpdate.d.ts | 1 - .../dist/tests/provider/onClose.d.ts | 1 - .../dist/tests/provider/onConnect.d.ts | 1 - .../dist/tests/provider/onDisconnect.d.ts | 1 - .../dist/tests/provider/onMessage.d.ts | 1 - .../dist/tests/provider/onOpen.d.ts | 1 - .../dist/tests/provider/onStateless.d.ts | 1 - .../dist/tests/provider/onSynced.d.ts | 1 - .../providerwebsocket/configuration.d.ts | 1 - .../dist/tests/server/address.d.ts | 1 - .../dist/tests/server/afterLoadDocument.d.ts | 1 - .../dist/tests/server/afterStoreDocument.d.ts | 1 - .../tests/server/afterUnloadDocument.d.ts | 1 - .../server/beforeBroadcastStateless.d.ts | 1 - .../tests/server/beforeHandleMessage.d.ts | 1 - .../dist/tests/server/beforeSync.d.ts | 1 - .../tests/server/beforeUnloadDocument.d.ts | 1 - .../dist/tests/server/closeConnections.d.ts | 1 - .../tests/server/getConnectionsCount.d.ts | 1 - .../dist/tests/server/getDocumentsCount.d.ts | 1 - .../dist/tests/server/listen.d.ts | 1 - .../dist/tests/server/onAuthenticate.d.ts | 1 - .../dist/tests/server/onAwarenessUpdate.d.ts | 1 - .../dist/tests/server/onChange.d.ts | 1 - .../dist/tests/server/onClose.d.ts | 1 - .../dist/tests/server/onConfigure.d.ts | 1 - .../dist/tests/server/onConnect.d.ts | 1 - .../dist/tests/server/onDestroy.d.ts | 1 - .../dist/tests/server/onDisconnect.d.ts | 1 - .../dist/tests/server/onListen.d.ts | 1 - .../dist/tests/server/onLoadDocument.d.ts | 1 - .../dist/tests/server/onRequest.d.ts | 1 - .../dist/tests/server/onStateless.d.ts | 1 - .../dist/tests/server/onStoreDocument.d.ts | 1 - .../dist/tests/server/onTokenSync.d.ts | 1 - .../dist/tests/server/onUpgrade.d.ts | 1 - .../tests/server/openDirectConnection.d.ts | 1 - .../dist/tests/server/websocketError.d.ts | 1 - .../tests/transformer/TiptapTransformer.d.ts | 1 - .../dist/tests/utils/createDirectory.d.ts | 1 - .../dist/tests/utils/flushRedis.d.ts | 1 - .../dist/tests/utils/index.d.ts | 9 - .../dist/tests/utils/newHocuspocus.d.ts | 2 - .../tests/utils/newHocuspocusProvider.d.ts | 3 - .../utils/newHocuspocusProviderWebsocket.d.ts | 4 - .../dist/tests/utils/randomInteger.d.ts | 1 - .../tests/utils/redisConnectionSettings.d.ts | 4 - .../dist/tests/utils/removeDirectory.d.ts | 1 - .../dist/tests/utils/retryableAssertion.d.ts | 2 - .../dist/tests/utils/sleep.d.ts | 1 - .../extension-database/package.json | 42 - .../extension-database/src/Database.ts | 61 - .../extension-database/src/index.ts | 1 - .../node_modules/@hocuspocus/server | 1 - .../node_modules/yjs | 1 - .../@hocuspocus/extension-database | 1 - .../@hocuspocus/extension-sqlite/README.md | 14 - .../dist/hocuspocus-sqlite.cjs | 68 - .../dist/hocuspocus-sqlite.cjs.map | 1 - .../dist/hocuspocus-sqlite.esm.js | 63 - .../dist/hocuspocus-sqlite.esm.js.map | 1 - .../node_modules/@tiptap/pm/model/index.d.ts | 1 - .../node_modules/@tiptap/pm/state/index.d.ts | 1 - .../@tiptap/pm/transform/index.d.ts | 1 - .../node_modules/@tiptap/pm/view/index.d.ts | 1 - .../dist/packages/common/src/CloseEvents.d.ts | 29 - .../dist/packages/common/src/auth.d.ts | 13 - .../common/src/awarenessStatesToArray.d.ts | 3 - .../dist/packages/common/src/index.d.ts | 4 - .../dist/packages/common/src/types.d.ts | 10 - .../extension-database/src/Database.d.ts | 30 - .../extension-database/src/index.d.ts | 1 - .../packages/extension-logger/src/Logger.d.ts | 67 - .../packages/extension-logger/src/index.d.ts | 1 - .../packages/extension-redis/src/Redis.d.ts | 124 - .../packages/extension-redis/src/index.d.ts | 1 - .../dist/packages/extension-s3/src/S3.d.ts | 44 - .../dist/packages/extension-s3/src/index.d.ts | 1 - .../packages/extension-sqlite/src/SQLite.d.ts | 27 - .../packages/extension-sqlite/src/index.d.ts | 1 - .../extension-throttle/src/index.d.ts | 30 - .../packages/extension-webhook/src/index.d.ts | 56 - .../packages/provider/src/EventEmitter.d.ts | 9 - .../provider/src/HocuspocusProvider.d.ts | 116 - .../src/HocuspocusProviderWebsocket.d.ts | 119 - .../provider/src/IncomingMessage.d.ts | 17 - .../provider/src/MessageReceiver.d.ts | 12 - .../packages/provider/src/MessageSender.d.ts | 9 - .../provider/src/OutgoingMessage.d.ts | 9 - .../AuthenticationMessage.d.ts | 8 - .../OutgoingMessages/AwarenessMessage.d.ts | 9 - .../src/OutgoingMessages/CloseMessage.d.ts | 9 - .../QueryAwarenessMessage.d.ts | 9 - .../OutgoingMessages/StatelessMessage.d.ts | 8 - .../OutgoingMessages/SyncStepOneMessage.d.ts | 9 - .../OutgoingMessages/SyncStepTwoMessage.d.ts | 9 - .../src/OutgoingMessages/UpdateMessage.d.ts | 8 - .../dist/packages/provider/src/index.d.ts | 3 - .../dist/packages/provider/src/types.d.ts | 93 - .../packages/server/src/ClientConnection.d.ts | 63 - .../dist/packages/server/src/Connection.d.ts | 75 - .../packages/server/src/DirectConnection.d.ts | 14 - .../dist/packages/server/src/Document.d.ts | 92 - .../dist/packages/server/src/Hocuspocus.d.ts | 80 - .../packages/server/src/IncomingMessage.d.ts | 25 - .../packages/server/src/MessageReceiver.d.ts | 11 - .../packages/server/src/OutgoingMessage.d.ts | 23 - .../dist/packages/server/src/Server.d.ts | 32 - .../dist/packages/server/src/index.d.ts | 9 - .../dist/packages/server/src/types.d.ts | 342 - .../packages/server/src/util/debounce.d.ts | 6 - .../server/src/util/getParameters.d.ts | 6 - .../packages/transformer/src/Prosemirror.d.ts | 11 - .../dist/packages/transformer/src/Tiptap.d.ts | 10 - .../dist/packages/transformer/src/index.d.ts | 3 - .../dist/packages/transformer/src/types.d.ts | 5 - .../dist/playground/backend/src/default.d.ts | 1 - .../dist/playground/backend/src/deno.d.ts | 1 - .../dist/playground/backend/src/express.d.ts | 1 - .../dist/playground/backend/src/hono.d.ts | 1 - .../dist/playground/backend/src/koa.d.ts | 1 - .../playground/backend/src/load-document.d.ts | 1 - .../dist/playground/backend/src/redis.d.ts | 1 - .../dist/playground/backend/src/s3-redis.d.ts | 1 - .../dist/playground/backend/src/s3.d.ts | 1 - .../dist/playground/backend/src/slow.d.ts | 1 - .../playground/backend/src/tiptapcollab.d.ts | 1 - .../dist/playground/backend/src/webhook.d.ts | 1 - .../frontend/app/SocketContext1.d.ts | 2 - .../frontend/app/SocketContext2.d.ts | 2 - .../dist/playground/frontend/next.config.d.ts | 3 - .../dist/tests/extension-database/fetch.d.ts | 1 - .../dist/tests/extension-logger/onListen.d.ts | 1 - .../extension-redis/onAwarenessChange.d.ts | 1 - .../dist/tests/extension-redis/onChange.d.ts | 1 - .../tests/extension-redis/onStateless.d.ts | 1 - .../extension-redis/onStoreDocument.d.ts | 1 - .../dist/tests/extension-s3/fetch.d.ts | 1 - .../tests/extension-throttle/banning.d.ts | 1 - .../extension-throttle/configuration.d.ts | 1 - .../tests/provider/hasUnsyncedChanges.d.ts | 1 - .../dist/tests/provider/observe.d.ts | 1 - .../dist/tests/provider/observeDeep.d.ts | 1 - .../dist/tests/provider/onAuthenticated.d.ts | 1 - .../provider/onAuthenticationFailed.d.ts | 1 - .../tests/provider/onAwarenessChange.d.ts | 1 - .../tests/provider/onAwarenessUpdate.d.ts | 1 - .../dist/tests/provider/onClose.d.ts | 1 - .../dist/tests/provider/onConnect.d.ts | 1 - .../dist/tests/provider/onDisconnect.d.ts | 1 - .../dist/tests/provider/onMessage.d.ts | 1 - .../dist/tests/provider/onOpen.d.ts | 1 - .../dist/tests/provider/onStateless.d.ts | 1 - .../dist/tests/provider/onSynced.d.ts | 1 - .../providerwebsocket/configuration.d.ts | 1 - .../dist/tests/server/address.d.ts | 1 - .../dist/tests/server/afterLoadDocument.d.ts | 1 - .../dist/tests/server/afterStoreDocument.d.ts | 1 - .../tests/server/afterUnloadDocument.d.ts | 1 - .../server/beforeBroadcastStateless.d.ts | 1 - .../tests/server/beforeHandleMessage.d.ts | 1 - .../dist/tests/server/beforeSync.d.ts | 1 - .../tests/server/beforeUnloadDocument.d.ts | 1 - .../dist/tests/server/closeConnections.d.ts | 1 - .../tests/server/getConnectionsCount.d.ts | 1 - .../dist/tests/server/getDocumentsCount.d.ts | 1 - .../dist/tests/server/listen.d.ts | 1 - .../dist/tests/server/onAuthenticate.d.ts | 1 - .../dist/tests/server/onAwarenessUpdate.d.ts | 1 - .../dist/tests/server/onChange.d.ts | 1 - .../dist/tests/server/onClose.d.ts | 1 - .../dist/tests/server/onConfigure.d.ts | 1 - .../dist/tests/server/onConnect.d.ts | 1 - .../dist/tests/server/onDestroy.d.ts | 1 - .../dist/tests/server/onDisconnect.d.ts | 1 - .../dist/tests/server/onListen.d.ts | 1 - .../dist/tests/server/onLoadDocument.d.ts | 1 - .../dist/tests/server/onRequest.d.ts | 1 - .../dist/tests/server/onStateless.d.ts | 1 - .../dist/tests/server/onStoreDocument.d.ts | 1 - .../dist/tests/server/onTokenSync.d.ts | 1 - .../dist/tests/server/onUpgrade.d.ts | 1 - .../tests/server/openDirectConnection.d.ts | 1 - .../dist/tests/server/websocketError.d.ts | 1 - .../tests/transformer/TiptapTransformer.d.ts | 1 - .../dist/tests/utils/createDirectory.d.ts | 1 - .../dist/tests/utils/flushRedis.d.ts | 1 - .../dist/tests/utils/index.d.ts | 9 - .../dist/tests/utils/newHocuspocus.d.ts | 2 - .../tests/utils/newHocuspocusProvider.d.ts | 3 - .../utils/newHocuspocusProviderWebsocket.d.ts | 4 - .../dist/tests/utils/randomInteger.d.ts | 1 - .../tests/utils/redisConnectionSettings.d.ts | 4 - .../dist/tests/utils/removeDirectory.d.ts | 1 - .../dist/tests/utils/retryableAssertion.d.ts | 2 - .../dist/tests/utils/sleep.d.ts | 1 - .../@hocuspocus/extension-sqlite/package.json | 41 - .../extension-sqlite/src/SQLite.ts | 91 - .../@hocuspocus/extension-sqlite/src/index.ts | 1 - .../node_modules/kleur | 1 - .../node_modules/sqlite3 | 1 - .../node_modules/@hocuspocus/common | 1 - .../node_modules/@hocuspocus/server/README.md | 14 - .../server/dist/hocuspocus-server.cjs | 2827 ----- .../server/dist/hocuspocus-server.cjs.map | 1 - .../server/dist/hocuspocus-server.esm.js | 2798 ----- .../server/dist/hocuspocus-server.esm.js.map | 1 - .../node_modules/@tiptap/pm/model/index.d.ts | 1 - .../node_modules/@tiptap/pm/state/index.d.ts | 1 - .../@tiptap/pm/transform/index.d.ts | 1 - .../node_modules/@tiptap/pm/view/index.d.ts | 1 - .../dist/packages/common/src/CloseEvents.d.ts | 29 - .../server/dist/packages/common/src/auth.d.ts | 13 - .../common/src/awarenessStatesToArray.d.ts | 3 - .../dist/packages/common/src/index.d.ts | 4 - .../dist/packages/common/src/types.d.ts | 10 - .../extension-database/src/Database.d.ts | 30 - .../extension-database/src/index.d.ts | 1 - .../packages/extension-logger/src/Logger.d.ts | 67 - .../packages/extension-logger/src/index.d.ts | 1 - .../packages/extension-redis/src/Redis.d.ts | 124 - .../packages/extension-redis/src/index.d.ts | 1 - .../dist/packages/extension-s3/src/S3.d.ts | 44 - .../dist/packages/extension-s3/src/index.d.ts | 1 - .../packages/extension-sqlite/src/SQLite.d.ts | 27 - .../packages/extension-sqlite/src/index.d.ts | 1 - .../extension-throttle/src/index.d.ts | 30 - .../packages/extension-webhook/src/index.d.ts | 56 - .../packages/provider/src/EventEmitter.d.ts | 9 - .../provider/src/HocuspocusProvider.d.ts | 116 - .../src/HocuspocusProviderWebsocket.d.ts | 119 - .../provider/src/IncomingMessage.d.ts | 17 - .../provider/src/MessageReceiver.d.ts | 12 - .../packages/provider/src/MessageSender.d.ts | 9 - .../provider/src/OutgoingMessage.d.ts | 9 - .../AuthenticationMessage.d.ts | 8 - .../OutgoingMessages/AwarenessMessage.d.ts | 9 - .../src/OutgoingMessages/CloseMessage.d.ts | 9 - .../QueryAwarenessMessage.d.ts | 9 - .../OutgoingMessages/StatelessMessage.d.ts | 8 - .../OutgoingMessages/SyncStepOneMessage.d.ts | 9 - .../OutgoingMessages/SyncStepTwoMessage.d.ts | 9 - .../src/OutgoingMessages/UpdateMessage.d.ts | 8 - .../dist/packages/provider/src/index.d.ts | 3 - .../dist/packages/provider/src/types.d.ts | 93 - .../packages/server/src/ClientConnection.d.ts | 63 - .../dist/packages/server/src/Connection.d.ts | 75 - .../packages/server/src/DirectConnection.d.ts | 14 - .../dist/packages/server/src/Document.d.ts | 92 - .../dist/packages/server/src/Hocuspocus.d.ts | 80 - .../packages/server/src/IncomingMessage.d.ts | 25 - .../packages/server/src/MessageReceiver.d.ts | 11 - .../packages/server/src/OutgoingMessage.d.ts | 23 - .../dist/packages/server/src/Server.d.ts | 32 - .../dist/packages/server/src/index.d.ts | 9 - .../dist/packages/server/src/types.d.ts | 342 - .../packages/server/src/util/debounce.d.ts | 6 - .../server/src/util/getParameters.d.ts | 6 - .../packages/transformer/src/Prosemirror.d.ts | 11 - .../dist/packages/transformer/src/Tiptap.d.ts | 10 - .../dist/packages/transformer/src/index.d.ts | 3 - .../dist/packages/transformer/src/types.d.ts | 5 - .../dist/playground/backend/src/default.d.ts | 1 - .../dist/playground/backend/src/deno.d.ts | 1 - .../dist/playground/backend/src/express.d.ts | 1 - .../dist/playground/backend/src/hono.d.ts | 1 - .../dist/playground/backend/src/koa.d.ts | 1 - .../playground/backend/src/load-document.d.ts | 1 - .../dist/playground/backend/src/redis.d.ts | 1 - .../dist/playground/backend/src/s3-redis.d.ts | 1 - .../dist/playground/backend/src/s3.d.ts | 1 - .../dist/playground/backend/src/slow.d.ts | 1 - .../playground/backend/src/tiptapcollab.d.ts | 1 - .../dist/playground/backend/src/webhook.d.ts | 1 - .../frontend/app/SocketContext1.d.ts | 2 - .../frontend/app/SocketContext2.d.ts | 2 - .../dist/playground/frontend/next.config.d.ts | 3 - .../dist/tests/extension-database/fetch.d.ts | 1 - .../dist/tests/extension-logger/onListen.d.ts | 1 - .../extension-redis/onAwarenessChange.d.ts | 1 - .../dist/tests/extension-redis/onChange.d.ts | 1 - .../tests/extension-redis/onStateless.d.ts | 1 - .../extension-redis/onStoreDocument.d.ts | 1 - .../server/dist/tests/extension-s3/fetch.d.ts | 1 - .../tests/extension-throttle/banning.d.ts | 1 - .../extension-throttle/configuration.d.ts | 1 - .../tests/provider/hasUnsyncedChanges.d.ts | 1 - .../server/dist/tests/provider/observe.d.ts | 1 - .../dist/tests/provider/observeDeep.d.ts | 1 - .../dist/tests/provider/onAuthenticated.d.ts | 1 - .../provider/onAuthenticationFailed.d.ts | 1 - .../tests/provider/onAwarenessChange.d.ts | 1 - .../tests/provider/onAwarenessUpdate.d.ts | 1 - .../server/dist/tests/provider/onClose.d.ts | 1 - .../server/dist/tests/provider/onConnect.d.ts | 1 - .../dist/tests/provider/onDisconnect.d.ts | 1 - .../server/dist/tests/provider/onMessage.d.ts | 1 - .../server/dist/tests/provider/onOpen.d.ts | 1 - .../dist/tests/provider/onStateless.d.ts | 1 - .../server/dist/tests/provider/onSynced.d.ts | 1 - .../providerwebsocket/configuration.d.ts | 1 - .../server/dist/tests/server/address.d.ts | 1 - .../dist/tests/server/afterLoadDocument.d.ts | 1 - .../dist/tests/server/afterStoreDocument.d.ts | 1 - .../tests/server/afterUnloadDocument.d.ts | 1 - .../server/beforeBroadcastStateless.d.ts | 1 - .../tests/server/beforeHandleMessage.d.ts | 1 - .../server/dist/tests/server/beforeSync.d.ts | 1 - .../tests/server/beforeUnloadDocument.d.ts | 1 - .../dist/tests/server/closeConnections.d.ts | 1 - .../tests/server/getConnectionsCount.d.ts | 1 - .../dist/tests/server/getDocumentsCount.d.ts | 1 - .../server/dist/tests/server/listen.d.ts | 1 - .../dist/tests/server/onAuthenticate.d.ts | 1 - .../dist/tests/server/onAwarenessUpdate.d.ts | 1 - .../server/dist/tests/server/onChange.d.ts | 1 - .../server/dist/tests/server/onClose.d.ts | 1 - .../server/dist/tests/server/onConfigure.d.ts | 1 - .../server/dist/tests/server/onConnect.d.ts | 1 - .../server/dist/tests/server/onDestroy.d.ts | 1 - .../dist/tests/server/onDisconnect.d.ts | 1 - .../server/dist/tests/server/onListen.d.ts | 1 - .../dist/tests/server/onLoadDocument.d.ts | 1 - .../server/dist/tests/server/onRequest.d.ts | 1 - .../server/dist/tests/server/onStateless.d.ts | 1 - .../dist/tests/server/onStoreDocument.d.ts | 1 - .../server/dist/tests/server/onTokenSync.d.ts | 1 - .../server/dist/tests/server/onUpgrade.d.ts | 1 - .../tests/server/openDirectConnection.d.ts | 1 - .../dist/tests/server/websocketError.d.ts | 1 - .../tests/transformer/TiptapTransformer.d.ts | 1 - .../dist/tests/utils/createDirectory.d.ts | 1 - .../server/dist/tests/utils/flushRedis.d.ts | 1 - .../server/dist/tests/utils/index.d.ts | 9 - .../dist/tests/utils/newHocuspocus.d.ts | 2 - .../tests/utils/newHocuspocusProvider.d.ts | 3 - .../utils/newHocuspocusProviderWebsocket.d.ts | 4 - .../dist/tests/utils/randomInteger.d.ts | 1 - .../tests/utils/redisConnectionSettings.d.ts | 4 - .../dist/tests/utils/removeDirectory.d.ts | 1 - .../dist/tests/utils/retryableAssertion.d.ts | 2 - .../server/dist/tests/utils/sleep.d.ts | 1 - .../node_modules/.bin/0ecdsa-generate-keypair | 21 - .../server/node_modules/.bin/0gentesthtml | 21 - .../server/node_modules/.bin/0serve | 21 - .../@hocuspocus/server/package.json | 51 - .../server/src/ClientConnection.ts | 435 - .../@hocuspocus/server/src/Connection.ts | 243 - .../server/src/DirectConnection.ts | 90 - .../@hocuspocus/server/src/Document.ts | 268 - .../@hocuspocus/server/src/Hocuspocus.ts | 561 - .../@hocuspocus/server/src/IncomingMessage.ts | 80 - .../@hocuspocus/server/src/MessageReceiver.ts | 242 - .../@hocuspocus/server/src/OutgoingMessage.ts | 159 - .../@hocuspocus/server/src/Server.ts | 269 - .../@hocuspocus/server/src/index.ts | 9 - .../@hocuspocus/server/src/types.ts | 403 - .../@hocuspocus/server/src/util/debounce.ts | 77 - .../server/src/util/getParameters.ts | 12 - .../node_modules/async-lock | 1 - .../node_modules/async-mutex | 1 - .../node_modules/kleur | 1 - .../node_modules/lib0 | 1 - .../node_modules/ws | 1 - .../node_modules/y-protocols | 1 - .../node_modules/yjs | 1 - .../node_modules/@hocuspocus/common | 1 - .../@hocuspocus/server/LICENSE.md | 21 - .../node_modules/@hocuspocus/server/README.md | 76 - .../server/dist/hocuspocus-server.cjs | 5606 --------- .../server/dist/hocuspocus-server.cjs.map | 1 - .../server/dist/hocuspocus-server.esm.js | 1539 --- .../server/dist/hocuspocus-server.esm.js.map | 1 - .../@hocuspocus/server/dist/index.d.ts | 865 -- .../node_modules/.bin/0ecdsa-generate-keypair | 21 - .../server/node_modules/.bin/0gentesthtml | 21 - .../server/node_modules/.bin/0serve | 21 - .../@hocuspocus/server/package.json | 52 - .../server/src/ClientConnection.ts | 458 - .../@hocuspocus/server/src/Connection.ts | 279 - .../server/src/DirectConnection.ts | 90 - .../@hocuspocus/server/src/Document.ts | 298 - .../@hocuspocus/server/src/Hocuspocus.ts | 639 - .../@hocuspocus/server/src/IncomingMessage.ts | 80 - .../@hocuspocus/server/src/MessageReceiver.ts | 283 - .../@hocuspocus/server/src/OutgoingMessage.ts | 159 - .../@hocuspocus/server/src/Server.ts | 273 - .../@hocuspocus/server/src/index.ts | 9 - .../@hocuspocus/server/src/types.ts | 509 - .../@hocuspocus/server/src/util/debounce.ts | 77 - .../server/src/util/getParameters.ts | 14 - .../node_modules/async-mutex | 1 - .../node_modules/crossws | 1 - .../node_modules/kleur | 1 - .../node_modules/lib0 | 1 - .../node_modules/y-protocols | 1 - .../node_modules/yjs | 1 - .../dist/hocuspocus-transformer.cjs | 2744 ---- .../dist/hocuspocus-transformer.cjs.map | 1 - .../dist/hocuspocus-transformer.esm.js | 2740 ---- .../dist/hocuspocus-transformer.esm.js.map | 1 - .../node_modules/@tiptap/pm/model/index.d.ts | 1 - .../node_modules/@tiptap/pm/state/index.d.ts | 1 - .../@tiptap/pm/transform/index.d.ts | 1 - .../node_modules/@tiptap/pm/view/index.d.ts | 1 - .../dist/packages/common/src/CloseEvents.d.ts | 29 - .../dist/packages/common/src/auth.d.ts | 13 - .../common/src/awarenessStatesToArray.d.ts | 3 - .../dist/packages/common/src/index.d.ts | 4 - .../dist/packages/common/src/types.d.ts | 10 - .../extension-database/src/Database.d.ts | 30 - .../extension-database/src/index.d.ts | 1 - .../packages/extension-logger/src/Logger.d.ts | 67 - .../packages/extension-logger/src/index.d.ts | 1 - .../packages/extension-redis/src/Redis.d.ts | 124 - .../packages/extension-redis/src/index.d.ts | 1 - .../dist/packages/extension-s3/src/S3.d.ts | 44 - .../dist/packages/extension-s3/src/index.d.ts | 1 - .../packages/extension-sqlite/src/SQLite.d.ts | 27 - .../packages/extension-sqlite/src/index.d.ts | 1 - .../extension-throttle/src/index.d.ts | 30 - .../packages/extension-webhook/src/index.d.ts | 56 - .../packages/provider/src/EventEmitter.d.ts | 9 - .../provider/src/HocuspocusProvider.d.ts | 116 - .../src/HocuspocusProviderWebsocket.d.ts | 119 - .../provider/src/IncomingMessage.d.ts | 17 - .../provider/src/MessageReceiver.d.ts | 12 - .../packages/provider/src/MessageSender.d.ts | 9 - .../provider/src/OutgoingMessage.d.ts | 9 - .../AuthenticationMessage.d.ts | 8 - .../OutgoingMessages/AwarenessMessage.d.ts | 9 - .../src/OutgoingMessages/CloseMessage.d.ts | 9 - .../QueryAwarenessMessage.d.ts | 9 - .../OutgoingMessages/StatelessMessage.d.ts | 8 - .../OutgoingMessages/SyncStepOneMessage.d.ts | 9 - .../OutgoingMessages/SyncStepTwoMessage.d.ts | 9 - .../src/OutgoingMessages/UpdateMessage.d.ts | 8 - .../dist/packages/provider/src/index.d.ts | 3 - .../dist/packages/provider/src/types.d.ts | 93 - .../packages/server/src/ClientConnection.d.ts | 63 - .../dist/packages/server/src/Connection.d.ts | 75 - .../packages/server/src/DirectConnection.d.ts | 14 - .../dist/packages/server/src/Document.d.ts | 92 - .../dist/packages/server/src/Hocuspocus.d.ts | 80 - .../packages/server/src/IncomingMessage.d.ts | 25 - .../packages/server/src/MessageReceiver.d.ts | 11 - .../packages/server/src/OutgoingMessage.d.ts | 23 - .../dist/packages/server/src/Server.d.ts | 32 - .../dist/packages/server/src/index.d.ts | 9 - .../dist/packages/server/src/types.d.ts | 342 - .../packages/server/src/util/debounce.d.ts | 6 - .../server/src/util/getParameters.d.ts | 6 - .../packages/transformer/src/Prosemirror.d.ts | 11 - .../dist/packages/transformer/src/Tiptap.d.ts | 10 - .../dist/packages/transformer/src/index.d.ts | 3 - .../dist/packages/transformer/src/types.d.ts | 5 - .../dist/playground/backend/src/default.d.ts | 1 - .../dist/playground/backend/src/deno.d.ts | 1 - .../dist/playground/backend/src/express.d.ts | 1 - .../dist/playground/backend/src/hono.d.ts | 1 - .../dist/playground/backend/src/koa.d.ts | 1 - .../playground/backend/src/load-document.d.ts | 1 - .../dist/playground/backend/src/redis.d.ts | 1 - .../dist/playground/backend/src/s3-redis.d.ts | 1 - .../dist/playground/backend/src/s3.d.ts | 1 - .../dist/playground/backend/src/slow.d.ts | 1 - .../playground/backend/src/tiptapcollab.d.ts | 1 - .../dist/playground/backend/src/webhook.d.ts | 1 - .../frontend/app/SocketContext1.d.ts | 2 - .../frontend/app/SocketContext2.d.ts | 2 - .../dist/playground/frontend/next.config.d.ts | 3 - .../dist/tests/extension-database/fetch.d.ts | 1 - .../dist/tests/extension-logger/onListen.d.ts | 1 - .../extension-redis/onAwarenessChange.d.ts | 1 - .../dist/tests/extension-redis/onChange.d.ts | 1 - .../tests/extension-redis/onStateless.d.ts | 1 - .../extension-redis/onStoreDocument.d.ts | 1 - .../dist/tests/extension-s3/fetch.d.ts | 1 - .../tests/extension-throttle/banning.d.ts | 1 - .../extension-throttle/configuration.d.ts | 1 - .../tests/provider/hasUnsyncedChanges.d.ts | 1 - .../dist/tests/provider/observe.d.ts | 1 - .../dist/tests/provider/observeDeep.d.ts | 1 - .../dist/tests/provider/onAuthenticated.d.ts | 1 - .../provider/onAuthenticationFailed.d.ts | 1 - .../tests/provider/onAwarenessChange.d.ts | 1 - .../tests/provider/onAwarenessUpdate.d.ts | 1 - .../dist/tests/provider/onClose.d.ts | 1 - .../dist/tests/provider/onConnect.d.ts | 1 - .../dist/tests/provider/onDisconnect.d.ts | 1 - .../dist/tests/provider/onMessage.d.ts | 1 - .../dist/tests/provider/onOpen.d.ts | 1 - .../dist/tests/provider/onStateless.d.ts | 1 - .../dist/tests/provider/onSynced.d.ts | 1 - .../providerwebsocket/configuration.d.ts | 1 - .../dist/tests/server/address.d.ts | 1 - .../dist/tests/server/afterLoadDocument.d.ts | 1 - .../dist/tests/server/afterStoreDocument.d.ts | 1 - .../tests/server/afterUnloadDocument.d.ts | 1 - .../server/beforeBroadcastStateless.d.ts | 1 - .../tests/server/beforeHandleMessage.d.ts | 1 - .../dist/tests/server/beforeSync.d.ts | 1 - .../tests/server/beforeUnloadDocument.d.ts | 1 - .../dist/tests/server/closeConnections.d.ts | 1 - .../tests/server/getConnectionsCount.d.ts | 1 - .../dist/tests/server/getDocumentsCount.d.ts | 1 - .../transformer/dist/tests/server/listen.d.ts | 1 - .../dist/tests/server/onAuthenticate.d.ts | 1 - .../dist/tests/server/onAwarenessUpdate.d.ts | 1 - .../dist/tests/server/onChange.d.ts | 1 - .../dist/tests/server/onClose.d.ts | 1 - .../dist/tests/server/onConfigure.d.ts | 1 - .../dist/tests/server/onConnect.d.ts | 1 - .../dist/tests/server/onDestroy.d.ts | 1 - .../dist/tests/server/onDisconnect.d.ts | 1 - .../dist/tests/server/onListen.d.ts | 1 - .../dist/tests/server/onLoadDocument.d.ts | 1 - .../dist/tests/server/onRequest.d.ts | 1 - .../dist/tests/server/onStateless.d.ts | 1 - .../dist/tests/server/onStoreDocument.d.ts | 1 - .../dist/tests/server/onTokenSync.d.ts | 1 - .../dist/tests/server/onUpgrade.d.ts | 1 - .../tests/server/openDirectConnection.d.ts | 1 - .../dist/tests/server/websocketError.d.ts | 1 - .../tests/transformer/TiptapTransformer.d.ts | 1 - .../dist/tests/utils/createDirectory.d.ts | 1 - .../dist/tests/utils/flushRedis.d.ts | 1 - .../transformer/dist/tests/utils/index.d.ts | 9 - .../dist/tests/utils/newHocuspocus.d.ts | 2 - .../tests/utils/newHocuspocusProvider.d.ts | 3 - .../utils/newHocuspocusProviderWebsocket.d.ts | 4 - .../dist/tests/utils/randomInteger.d.ts | 1 - .../tests/utils/redisConnectionSettings.d.ts | 4 - .../dist/tests/utils/removeDirectory.d.ts | 1 - .../dist/tests/utils/retryableAssertion.d.ts | 2 - .../transformer/dist/tests/utils/sleep.d.ts | 1 - .../@hocuspocus/transformer/package.json | 46 - .../transformer/src/Prosemirror.ts | 76 - .../@hocuspocus/transformer/src/Tiptap.ts | 35 - .../@hocuspocus/transformer/src/index.ts | 3 - .../@hocuspocus/transformer/src/types.ts | 6 - .../node_modules/@tiptap/core | 1 - .../node_modules/@tiptap/pm | 1 - .../node_modules/@tiptap/starter-kit | 1 - .../node_modules/y-prosemirror | 1 - .../node_modules/yjs | 1 - .../@hocuspocus/transformer/LICENSE.md | 21 - .../@hocuspocus/transformer/README.md | 14 - .../dist/hocuspocus-transformer.cjs | 64 - .../dist/hocuspocus-transformer.cjs.map | 1 - .../dist/hocuspocus-transformer.esm.js | 61 - .../dist/hocuspocus-transformer.esm.js.map | 1 - .../@hocuspocus/transformer/dist/index.d.ts | 29 - .../@hocuspocus/transformer/package.json | 49 - .../transformer/src/Prosemirror.ts | 76 - .../@hocuspocus/transformer/src/Tiptap.ts | 35 - .../@hocuspocus/transformer/src/index.ts | 3 - .../@hocuspocus/transformer/src/types.ts | 6 - .../node_modules/@tiptap/core | 1 - .../node_modules/@tiptap/pm | 1 - .../node_modules/@tiptap/starter-kit | 1 - .../node_modules/y-prosemirror | 1 - .../node_modules/yjs | 1 - .../node_modules/@gar/promisify | 1 - .../node_modules/@npmcli/fs/LICENSE.md | 20 - .../node_modules/@npmcli/fs/README.md | 60 - .../fs/lib/common/file-url-to-path/index.js | 17 - .../lib/common/file-url-to-path/polyfill.js | 121 - .../@npmcli/fs/lib/common/get-options.js | 20 - .../@npmcli/fs/lib/common/node.js | 9 - .../@npmcli/fs/lib/common/owner.js | 92 - .../node_modules/@npmcli/fs/lib/copy-file.js | 22 - .../node_modules/@npmcli/fs/lib/cp/LICENSE | 15 - .../node_modules/@npmcli/fs/lib/cp/index.js | 22 - .../@npmcli/fs/lib/cp/polyfill.js | 428 - .../node_modules/@npmcli/fs/lib/errors.js | 129 - .../node_modules/@npmcli/fs/lib/fs.js | 8 - .../node_modules/@npmcli/fs/lib/index.js | 10 - .../@npmcli/fs/lib/mkdir/index.js | 32 - .../@npmcli/fs/lib/mkdir/polyfill.js | 81 - .../node_modules/@npmcli/fs/lib/mkdtemp.js | 28 - .../node_modules/@npmcli/fs/lib/rm/index.js | 22 - .../@npmcli/fs/lib/rm/polyfill.js | 239 - .../@npmcli/fs/lib/with-temp-dir.js | 39 - .../node_modules/@npmcli/fs/lib/write-file.js | 19 - .../@npmcli/fs/node_modules/.bin/semver | 21 - .../node_modules/@npmcli/fs/package.json | 38 - .../@npmcli+fs@1.1.1/node_modules/semver | 1 - .../node_modules/@npmcli/move-file/LICENSE.md | 22 - .../node_modules/@npmcli/move-file/README.md | 69 - .../node_modules/@npmcli/move-file/index.js | 162 - .../move-file/node_modules/.bin/mkdirp | 21 - .../move-file/node_modules/.bin/rimraf | 21 - .../@npmcli/move-file/package.json | 34 - .../node_modules/mkdirp | 1 - .../node_modules/rimraf | 1 - .../node_modules/@tiptap/core/LICENSE.md | 21 - .../node_modules/@tiptap/core/README.md | 18 - .../node_modules/@tiptap/core/dist/index.cjs | 7538 ----------- .../@tiptap/core/dist/index.cjs.map | 1 - .../@tiptap/core/dist/index.d.cts | 5121 -------- .../node_modules/@tiptap/core/dist/index.d.ts | 5121 -------- .../node_modules/@tiptap/core/dist/index.js | 7398 ----------- .../@tiptap/core/dist/index.js.map | 1 - .../core/dist/jsx-runtime/jsx-runtime.cjs | 58 - .../core/dist/jsx-runtime/jsx-runtime.cjs.map | 1 - .../core/dist/jsx-runtime/jsx-runtime.js | 28 - .../core/dist/jsx-runtime/jsx-runtime.js.map | 1 - .../@tiptap/core/jsx-dev-runtime/index.cjs | 1 - .../@tiptap/core/jsx-dev-runtime/index.d.cts | 1 - .../@tiptap/core/jsx-dev-runtime/index.d.ts | 1 - .../@tiptap/core/jsx-dev-runtime/index.js | 1 - .../@tiptap/core/jsx-runtime/index.cjs | 1 - .../@tiptap/core/jsx-runtime/index.d.cts | 1 - .../@tiptap/core/jsx-runtime/index.d.ts | 1 - .../@tiptap/core/jsx-runtime/index.js | 1 - .../node_modules/@tiptap/core/package.json | 69 - .../@tiptap/core/src/CommandManager.ts | 149 - .../node_modules/@tiptap/core/src/Editor.ts | 841 -- .../@tiptap/core/src/EventEmitter.ts | 71 - .../@tiptap/core/src/Extendable.ts | 615 - .../@tiptap/core/src/Extension.ts | 59 - .../@tiptap/core/src/ExtensionManager.ts | 534 - .../@tiptap/core/src/InputRule.ts | 301 - .../node_modules/@tiptap/core/src/Mark.ts | 231 - .../node_modules/@tiptap/core/src/MarkView.ts | 132 - .../node_modules/@tiptap/core/src/Node.ts | 390 - .../node_modules/@tiptap/core/src/NodePos.ts | 270 - .../node_modules/@tiptap/core/src/NodeView.ts | 354 - .../@tiptap/core/src/PasteRule.ts | 386 - .../node_modules/@tiptap/core/src/Tracker.ts | 38 - .../core/src/__tests__/htmlEntities.test.ts | 55 - .../src/__tests__/transformPastedHTML.test.ts | 581 - .../@tiptap/core/src/commands/blur.ts | 29 - .../@tiptap/core/src/commands/clearContent.ts | 25 - .../@tiptap/core/src/commands/clearNodes.ts | 57 - .../@tiptap/core/src/commands/command.ts | 22 - .../core/src/commands/createParagraphNear.ts | 21 - .../@tiptap/core/src/commands/cut.ts | 36 - .../core/src/commands/deleteCurrentNode.ts | 44 - .../@tiptap/core/src/commands/deleteNode.ts | 41 - .../@tiptap/core/src/commands/deleteRange.ts | 26 - .../core/src/commands/deleteSelection.ts | 92 - .../@tiptap/core/src/commands/enter.ts | 19 - .../@tiptap/core/src/commands/exitCode.ts | 21 - .../core/src/commands/extendMarkRange.ts | 52 - .../@tiptap/core/src/commands/first.ts | 26 - .../@tiptap/core/src/commands/focus.ts | 108 - .../@tiptap/core/src/commands/forEach.ts | 24 - .../@tiptap/core/src/commands/index.ts | 57 - .../core/src/commands/insertContent.ts | 50 - .../core/src/commands/insertContentAt.ts | 218 - .../@tiptap/core/src/commands/join.ts | 69 - .../core/src/commands/joinItemBackward.ts | 37 - .../core/src/commands/joinItemForward.ts | 37 - .../src/commands/joinTextblockBackward.ts | 20 - .../core/src/commands/joinTextblockForward.ts | 20 - .../core/src/commands/keyboardShortcut.ts | 100 - .../@tiptap/core/src/commands/lift.ts | 34 - .../core/src/commands/liftEmptyBlock.ts | 21 - .../@tiptap/core/src/commands/liftListItem.ts | 26 - .../core/src/commands/newlineInCode.ts | 21 - .../core/src/commands/resetAttributes.ts | 80 - .../core/src/commands/scrollIntoView.ts | 23 - .../@tiptap/core/src/commands/selectAll.ts | 27 - .../core/src/commands/selectNodeBackward.ts | 21 - .../core/src/commands/selectNodeForward.ts | 21 - .../core/src/commands/selectParentNode.ts | 21 - .../core/src/commands/selectTextblockEnd.ts | 23 - .../core/src/commands/selectTextblockStart.ts | 23 - .../@tiptap/core/src/commands/setContent.ts | 76 - .../@tiptap/core/src/commands/setMark.ts | 122 - .../@tiptap/core/src/commands/setMeta.ts | 25 - .../@tiptap/core/src/commands/setNode.ts | 57 - .../core/src/commands/setNodeSelection.ts | 31 - .../core/src/commands/setTextDirection.ts | 51 - .../core/src/commands/setTextSelection.ts | 36 - .../@tiptap/core/src/commands/sinkListItem.ts | 26 - .../@tiptap/core/src/commands/splitBlock.ts | 127 - .../core/src/commands/splitListItem.ts | 157 - .../@tiptap/core/src/commands/toggleList.ts | 228 - .../@tiptap/core/src/commands/toggleMark.ts | 51 - .../@tiptap/core/src/commands/toggleNode.ts | 47 - .../@tiptap/core/src/commands/toggleWrap.ts | 32 - .../core/src/commands/undoInputRule.ts | 49 - .../core/src/commands/unsetAllMarks.ts | 44 - .../@tiptap/core/src/commands/unsetMark.ts | 65 - .../core/src/commands/unsetTextDirection.ts | 51 - .../core/src/commands/updateAttributes.ts | 150 - .../@tiptap/core/src/commands/wrapIn.ts | 27 - .../@tiptap/core/src/commands/wrapInList.ts | 27 - .../src/extensions/clipboardTextSerializer.ts | 53 - .../@tiptap/core/src/extensions/commands.ts | 14 - .../@tiptap/core/src/extensions/delete.ts | 101 - .../@tiptap/core/src/extensions/drop.ts | 26 - .../@tiptap/core/src/extensions/editable.ts | 18 - .../core/src/extensions/focusEvents.ts | 45 - .../@tiptap/core/src/extensions/index.ts | 10 - .../@tiptap/core/src/extensions/keymap.ts | 165 - .../@tiptap/core/src/extensions/paste.ts | 25 - .../@tiptap/core/src/extensions/tabindex.ts | 58 - .../core/src/extensions/textDirection.ts | 88 - .../core/src/helpers/MappablePosition.ts | 69 - .../src/helpers/combineTransactionSteps.ts | 24 - .../core/src/helpers/createChainableState.ts | 42 - .../core/src/helpers/createDocument.ts | 24 - .../core/src/helpers/createNodeFromContent.ts | 125 - .../core/src/helpers/defaultBlockAt.ts | 18 - .../@tiptap/core/src/helpers/findChildren.ts | 24 - .../core/src/helpers/findChildrenInRange.ts | 40 - .../core/src/helpers/findParentNode.ts | 18 - .../src/helpers/findParentNodeClosestToPos.ts | 37 - .../core/src/helpers/flattenExtensions.ts | 34 - .../@tiptap/core/src/helpers/generateHTML.ts | 18 - .../@tiptap/core/src/helpers/generateJSON.ts | 18 - .../@tiptap/core/src/helpers/generateText.ts | 34 - .../@tiptap/core/src/helpers/getAttributes.ts | 32 - .../helpers/getAttributesFromExtensions.ts | 120 - .../core/src/helpers/getChangedRanges.ts | 85 - .../@tiptap/core/src/helpers/getDebugJSON.ts | 54 - .../core/src/helpers/getExtensionField.ts | 32 - .../core/src/helpers/getHTMLFromFragment.ts | 13 - .../core/src/helpers/getMarkAttributes.ts | 33 - .../@tiptap/core/src/helpers/getMarkRange.ts | 105 - .../@tiptap/core/src/helpers/getMarkType.ts | 15 - .../core/src/helpers/getMarksBetween.ts | 44 - .../core/src/helpers/getNodeAtPosition.ts | 34 - .../core/src/helpers/getNodeAttributes.ts | 25 - .../@tiptap/core/src/helpers/getNodeType.ts | 15 - .../core/src/helpers/getRenderedAttributes.ts | 23 - .../@tiptap/core/src/helpers/getSchema.ts | 12 - .../helpers/getSchemaByResolvedExtensions.ts | 236 - .../core/src/helpers/getSchemaTypeByName.ts | 11 - .../src/helpers/getSchemaTypeNameByName.ts | 19 - .../core/src/helpers/getSplittedAttributes.ts | 28 - .../@tiptap/core/src/helpers/getText.ts | 28 - .../core/src/helpers/getTextBetween.ts | 52 - .../src/helpers/getTextContentFromNodes.ts | 34 - .../helpers/getTextSerializersFromSchema.ts | 16 - .../@tiptap/core/src/helpers/index.ts | 56 - .../injectExtensionAttributesToParseRule.ts | 47 - .../@tiptap/core/src/helpers/isActive.ts | 27 - .../@tiptap/core/src/helpers/isAtEndOfNode.ts | 29 - .../core/src/helpers/isAtStartOfNode.ts | 11 - .../src/helpers/isExtensionRulesEnabled.ts | 13 - .../@tiptap/core/src/helpers/isList.ts | 27 - .../@tiptap/core/src/helpers/isMarkActive.ts | 94 - .../@tiptap/core/src/helpers/isNodeActive.ts | 51 - .../@tiptap/core/src/helpers/isNodeEmpty.ts | 62 - .../core/src/helpers/isNodeSelection.ts | 5 - .../core/src/helpers/isNodeViewSelected.ts | 42 - .../core/src/helpers/isTextSelection.ts | 5 - .../@tiptap/core/src/helpers/posToDOMRect.ts | 35 - .../core/src/helpers/resolveExtensions.ts | 25 - .../core/src/helpers/resolveFocusPosition.ts | 42 - .../core/src/helpers/rewriteUnknownContent.ts | 149 - .../src/helpers/selectionToInsertionEnd.ts | 29 - .../core/src/helpers/sortExtensions.ts | 26 - .../core/src/helpers/splitExtensions.ts | 18 - .../node_modules/@tiptap/core/src/index.ts | 28 - .../@tiptap/core/src/inputRules/index.ts | 5 - .../core/src/inputRules/markInputRule.ts | 72 - .../core/src/inputRules/nodeInputRule.ts | 80 - .../core/src/inputRules/textInputRule.ts | 39 - .../src/inputRules/textblockTypeInputRule.ts | 41 - .../core/src/inputRules/wrappingInputRule.ts | 88 - .../@tiptap/core/src/jsx-runtime.ts | 67 - .../@tiptap/core/src/lib/ResizableNodeView.ts | 1079 -- .../@tiptap/core/src/lib/index.ts | 1 - .../@tiptap/core/src/pasteRules/index.ts | 3 - .../core/src/pasteRules/markPasteRule.ts | 82 - .../core/src/pasteRules/nodePasteRule.ts | 44 - .../core/src/pasteRules/textPasteRule.ts | 34 - .../node_modules/@tiptap/core/src/style.ts | 71 - .../node_modules/@tiptap/core/src/types.ts | 1106 -- .../@tiptap/core/src/utilities/attrsEqual.ts | 27 - .../core/src/utilities/callOrReturn.ts | 25 - .../core/src/utilities/canInsertNode.ts | 30 - .../core/src/utilities/createStyleTag.ts | 21 - .../@tiptap/core/src/utilities/deleteProps.ts | 19 - .../core/src/utilities/elementFromString.ts | 29 - .../core/src/utilities/escapeForRegEx.ts | 4 - .../core/src/utilities/findDuplicates.ts | 8 - .../@tiptap/core/src/utilities/fromString.ts | 19 - .../core/src/utilities/getStyleProperty.ts | 52 - .../core/src/utilities/htmlEntities.ts | 26 - .../@tiptap/core/src/utilities/index.ts | 30 - .../@tiptap/core/src/utilities/isAndroid.ts | 3 - .../core/src/utilities/isEmptyObject.ts | 3 - .../@tiptap/core/src/utilities/isFirefox.ts | 11 - .../@tiptap/core/src/utilities/isFunction.ts | 4 - .../@tiptap/core/src/utilities/isMacOS.ts | 3 - .../@tiptap/core/src/utilities/isNumber.ts | 3 - .../core/src/utilities/isPlainObject.ts | 13 - .../@tiptap/core/src/utilities/isRegExp.ts | 3 - .../@tiptap/core/src/utilities/isSafari.ts | 13 - .../@tiptap/core/src/utilities/isString.ts | 3 - .../@tiptap/core/src/utilities/isiOS.ts | 9 - .../src/utilities/markdown/attributeUtils.ts | 130 - .../markdown/createAtomBlockMarkdownSpec.ts | 141 - .../markdown/createBlockMarkdownSpec.ts | 231 - .../markdown/createInlineMarkdownSpec.ts | 284 - .../core/src/utilities/markdown/index.ts | 13 - .../utilities/markdown/parseIndentedBlocks.ts | 194 - .../markdown/renderNestedMarkdownContent.ts | 97 - .../@tiptap/core/src/utilities/marksEqual.ts | 20 - .../core/src/utilities/mergeAttributes.ts | 116 - .../@tiptap/core/src/utilities/mergeDeep.ts | 20 - .../@tiptap/core/src/utilities/minMax.ts | 3 - .../core/src/utilities/objectIncludes.ts | 30 - .../core/src/utilities/removeDuplicates.ts | 13 - .../node_modules/@tiptap/pm | 1 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-blockquote/LICENSE.md | 21 - .../@tiptap/extension-blockquote/README.md | 18 - .../extension-blockquote/dist/index.cjs | 3155 ----- .../extension-blockquote/dist/index.cjs.map | 1 - .../extension-blockquote/dist/index.d.cts | 41 - .../extension-blockquote/dist/index.d.ts | 41 - .../extension-blockquote/dist/index.js | 3127 ----- .../extension-blockquote/dist/index.js.map | 1 - .../@tiptap/extension-blockquote/package.json | 47 - .../extension-blockquote/src/blockquote.tsx | 143 - .../src/handleBackspace.ts | 58 - .../@tiptap/extension-blockquote/src/index.ts | 5 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-bold/LICENSE.md | 21 - .../@tiptap/extension-bold/README.md | 18 - .../@tiptap/extension-bold/dist/index.cjs | 136 - .../@tiptap/extension-bold/dist/index.cjs.map | 1 - .../@tiptap/extension-bold/dist/index.d.cts | 53 - .../@tiptap/extension-bold/dist/index.d.ts | 53 - .../@tiptap/extension-bold/dist/index.js | 105 - .../@tiptap/extension-bold/dist/index.js.map | 1 - .../@tiptap/extension-bold/package.json | 47 - .../@tiptap/extension-bold/src/bold.tsx | 163 - .../@tiptap/extension-bold/src/index.ts | 5 - .../@tiptap/extension-bullet-list/LICENSE.md | 21 - .../@tiptap/extension-bullet-list/README.md | 18 - .../extension-bullet-list/dist/index.cjs | 34 - .../extension-bullet-list/dist/index.cjs.map | 1 - .../extension-bullet-list/dist/index.d.cts | 2 - .../extension-bullet-list/dist/index.d.ts | 2 - .../extension-bullet-list/dist/index.js | 9 - .../extension-bullet-list/dist/index.js.map | 1 - .../extension-bullet-list/package.json | 47 - .../extension-bullet-list/src/index.ts | 6 - .../node_modules/@tiptap/extension-list | 1 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-code-block/LICENSE.md | 21 - .../@tiptap/extension-code-block/README.md | 18 - .../extension-code-block/dist/index.cjs | 353 - .../extension-code-block/dist/index.cjs.map | 1 - .../extension-code-block/dist/index.d.cts | 78 - .../extension-code-block/dist/index.d.ts | 78 - .../extension-code-block/dist/index.js | 324 - .../extension-code-block/dist/index.js.map | 1 - .../@tiptap/extension-code-block/package.json | 49 - .../extension-code-block/src/code-block.ts | 481 - .../@tiptap/extension-code-block/src/index.ts | 5 - .../node_modules/@tiptap/pm | 1 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-code/LICENSE.md | 21 - .../@tiptap/extension-code/README.md | 18 - .../@tiptap/extension-code/dist/index.cjs | 138 - .../@tiptap/extension-code/dist/index.cjs.map | 1 - .../@tiptap/extension-code/dist/index.d.cts | 59 - .../@tiptap/extension-code/dist/index.d.ts | 59 - .../@tiptap/extension-code/dist/index.js | 107 - .../@tiptap/extension-code/dist/index.js.map | 1 - .../@tiptap/extension-code/package.json | 47 - .../@tiptap/extension-code/src/code.ts | 182 - .../@tiptap/extension-code/src/index.ts | 5 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-document/LICENSE.md | 21 - .../@tiptap/extension-document/README.md | 18 - .../@tiptap/extension-document/dist/index.cjs | 48 - .../extension-document/dist/index.cjs.map | 1 - .../extension-document/dist/index.d.cts | 9 - .../extension-document/dist/index.d.ts | 9 - .../@tiptap/extension-document/dist/index.js | 21 - .../extension-document/dist/index.js.map | 1 - .../@tiptap/extension-document/package.json | 47 - .../extension-document/src/document.ts | 19 - .../@tiptap/extension-document/src/index.ts | 5 - .../@tiptap/extension-dropcursor/LICENSE.md | 21 - .../@tiptap/extension-dropcursor/README.md | 18 - .../extension-dropcursor/dist/index.cjs | 34 - .../extension-dropcursor/dist/index.cjs.map | 1 - .../extension-dropcursor/dist/index.d.cts | 2 - .../extension-dropcursor/dist/index.d.ts | 2 - .../extension-dropcursor/dist/index.js | 9 - .../extension-dropcursor/dist/index.js.map | 1 - .../@tiptap/extension-dropcursor/package.json | 47 - .../@tiptap/extension-dropcursor/src/index.ts | 6 - .../node_modules/@tiptap/extensions | 1 - .../@tiptap/extension-gapcursor/LICENSE.md | 21 - .../@tiptap/extension-gapcursor/README.md | 18 - .../extension-gapcursor/dist/index.cjs | 34 - .../extension-gapcursor/dist/index.cjs.map | 1 - .../extension-gapcursor/dist/index.d.cts | 2 - .../extension-gapcursor/dist/index.d.ts | 2 - .../@tiptap/extension-gapcursor/dist/index.js | 9 - .../extension-gapcursor/dist/index.js.map | 1 - .../@tiptap/extension-gapcursor/package.json | 47 - .../@tiptap/extension-gapcursor/src/index.ts | 5 - .../node_modules/@tiptap/extensions | 1 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-hard-break/LICENSE.md | 21 - .../@tiptap/extension-hard-break/README.md | 18 - .../extension-hard-break/dist/index.cjs | 100 - .../extension-hard-break/dist/index.cjs.map | 1 - .../extension-hard-break/dist/index.d.cts | 34 - .../extension-hard-break/dist/index.d.ts | 34 - .../extension-hard-break/dist/index.js | 73 - .../extension-hard-break/dist/index.js.map | 1 - .../@tiptap/extension-hard-break/package.json | 47 - .../extension-hard-break/src/hard-break.ts | 120 - .../@tiptap/extension-hard-break/src/index.ts | 5 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-heading/LICENSE.md | 21 - .../@tiptap/extension-heading/README.md | 18 - .../@tiptap/extension-heading/dist/index.cjs | 120 - .../extension-heading/dist/index.cjs.map | 1 - .../extension-heading/dist/index.d.cts | 49 - .../@tiptap/extension-heading/dist/index.d.ts | 49 - .../@tiptap/extension-heading/dist/index.js | 93 - .../extension-heading/dist/index.js.map | 1 - .../@tiptap/extension-heading/package.json | 47 - .../@tiptap/extension-heading/src/heading.ts | 152 - .../@tiptap/extension-heading/src/index.ts | 5 - .../node_modules/@tiptap/core | 1 - .../extension-horizontal-rule/LICENSE.md | 21 - .../extension-horizontal-rule/README.md | 18 - .../extension-horizontal-rule/dist/index.cjs | 112 - .../dist/index.cjs.map | 1 - .../dist/index.d.cts | 34 - .../extension-horizontal-rule/dist/index.d.ts | 34 - .../extension-horizontal-rule/dist/index.js | 85 - .../dist/index.js.map | 1 - .../extension-horizontal-rule/package.json | 49 - .../src/horizontal-rule.ts | 136 - .../extension-horizontal-rule/src/index.ts | 5 - .../node_modules/@tiptap/pm | 1 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-italic/LICENSE.md | 21 - .../@tiptap/extension-italic/README.md | 18 - .../@tiptap/extension-italic/dist/index.cjs | 134 - .../extension-italic/dist/index.cjs.map | 1 - .../@tiptap/extension-italic/dist/index.d.cts | 54 - .../@tiptap/extension-italic/dist/index.d.ts | 54 - .../@tiptap/extension-italic/dist/index.js | 103 - .../extension-italic/dist/index.js.map | 1 - .../@tiptap/extension-italic/package.json | 47 - .../@tiptap/extension-italic/src/index.ts | 5 - .../@tiptap/extension-italic/src/italic.ts | 160 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-link/LICENSE.md | 21 - .../@tiptap/extension-link/README.md | 18 - .../@tiptap/extension-link/dist/index.cjs | 503 - .../@tiptap/extension-link/dist/index.cjs.map | 1 - .../@tiptap/extension-link/dist/index.d.cts | 151 - .../@tiptap/extension-link/dist/index.d.ts | 151 - .../@tiptap/extension-link/dist/index.js | 479 - .../@tiptap/extension-link/dist/index.js.map | 1 - .../@tiptap/extension-link/package.json | 52 - .../extension-link/src/helpers/autolink.ts | 185 - .../src/helpers/clickHandler.ts | 73 - .../src/helpers/pasteHandler.ts | 53 - .../extension-link/src/helpers/whitespace.ts | 8 - .../@tiptap/extension-link/src/index.ts | 5 - .../@tiptap/extension-link/src/link.ts | 506 - .../node_modules/@tiptap/pm | 1 - .../node_modules/linkifyjs | 1 - .../node_modules/@tiptap/extension-list | 1 - .../@tiptap/extension-list-item/LICENSE.md | 21 - .../@tiptap/extension-list-item/README.md | 18 - .../extension-list-item/dist/index.cjs | 34 - .../extension-list-item/dist/index.cjs.map | 1 - .../extension-list-item/dist/index.d.cts | 2 - .../extension-list-item/dist/index.d.ts | 2 - .../@tiptap/extension-list-item/dist/index.js | 9 - .../extension-list-item/dist/index.js.map | 1 - .../@tiptap/extension-list-item/package.json | 47 - .../@tiptap/extension-list-item/src/index.ts | 6 - .../node_modules/@tiptap/extension-list | 1 - .../@tiptap/extension-list-keymap/LICENSE.md | 21 - .../@tiptap/extension-list-keymap/README.md | 18 - .../extension-list-keymap/dist/index.cjs | 36 - .../extension-list-keymap/dist/index.cjs.map | 1 - .../extension-list-keymap/dist/index.d.cts | 2 - .../extension-list-keymap/dist/index.d.ts | 2 - .../extension-list-keymap/dist/index.js | 10 - .../extension-list-keymap/dist/index.js.map | 1 - .../extension-list-keymap/package.json | 47 - .../extension-list-keymap/src/index.ts | 6 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-list/LICENSE.md | 21 - .../@tiptap/extension-list/README.md | 18 - .../extension-list/dist/bullet-list/index.cjs | 112 - .../dist/bullet-list/index.cjs.map | 1 - .../dist/bullet-list/index.d.cts | 51 - .../dist/bullet-list/index.d.ts | 51 - .../extension-list/dist/bullet-list/index.js | 84 - .../dist/bullet-list/index.js.map | 1 - .../@tiptap/extension-list/dist/index.cjs | 1320 -- .../@tiptap/extension-list/dist/index.cjs.map | 1 - .../@tiptap/extension-list/dist/index.d.cts | 300 - .../@tiptap/extension-list/dist/index.d.ts | 300 - .../@tiptap/extension-list/dist/index.js | 1295 -- .../@tiptap/extension-list/dist/index.js.map | 1 - .../extension-list/dist/item/index.cjs | 272 - .../extension-list/dist/item/index.cjs.map | 1 - .../extension-list/dist/item/index.d.cts | 29 - .../extension-list/dist/item/index.d.ts | 29 - .../@tiptap/extension-list/dist/item/index.js | 245 - .../extension-list/dist/item/index.js.map | 1 - .../extension-list/dist/keymap/index.cjs | 298 - .../extension-list/dist/keymap/index.cjs.map | 1 - .../extension-list/dist/keymap/index.d.cts | 63 - .../extension-list/dist/keymap/index.d.ts | 63 - .../extension-list/dist/keymap/index.js | 276 - .../extension-list/dist/keymap/index.js.map | 1 - .../@tiptap/extension-list/dist/kit/index.cjs | 1298 -- .../extension-list/dist/kit/index.cjs.map | 1 - .../extension-list/dist/kit/index.d.cts | 212 - .../extension-list/dist/kit/index.d.ts | 212 - .../@tiptap/extension-list/dist/kit/index.js | 1285 -- .../extension-list/dist/kit/index.js.map | 1 - .../dist/ordered-list/index.cjs | 345 - .../dist/ordered-list/index.cjs.map | 1 - .../dist/ordered-list/index.d.cts | 52 - .../dist/ordered-list/index.d.ts | 52 - .../extension-list/dist/ordered-list/index.js | 317 - .../dist/ordered-list/index.js.map | 1 - .../extension-list/dist/task-item/index.cjs | 346 - .../dist/task-item/index.cjs.map | 1 - .../extension-list/dist/task-item/index.d.cts | 53 - .../extension-list/dist/task-item/index.d.ts | 53 - .../extension-list/dist/task-item/index.js | 324 - .../dist/task-item/index.js.map | 1 - .../extension-list/dist/task-list/index.cjs | 164 - .../dist/task-list/index.cjs.map | 1 - .../extension-list/dist/task-list/index.d.cts | 34 - .../extension-list/dist/task-list/index.d.ts | 34 - .../extension-list/dist/task-list/index.js | 137 - .../dist/task-list/index.js.map | 1 - .../@tiptap/extension-list/package.json | 105 - .../src/bullet-list/bullet-list.ts | 151 - .../extension-list/src/bullet-list/index.ts | 1 - .../createBranchingListDeleteKeymap.ts | 24 - .../helpers/getBranchingNestedListAtCursor.ts | 116 - .../handleDeleteBranchingNestedList.ts | 25 - .../hasBranchingNestedListAfterCursor.ts | 30 - .../src/helpers/hoistBranchingNestedList.ts | 56 - .../@tiptap/extension-list/src/index.ts | 7 - .../@tiptap/extension-list/src/item/index.ts | 1 - .../extension-list/src/item/list-item.ts | 201 - .../extension-list/src/keymap/index.ts | 2 - .../extension-list/src/keymap/list-keymap.ts | 106 - .../src/keymap/listHelpers/findListItemPos.ts | 30 - .../keymap/listHelpers/getNextListDepth.ts | 16 - .../src/keymap/listHelpers/handleBackspace.ts | 66 - .../src/keymap/listHelpers/handleDelete.ts | 44 - .../src/keymap/listHelpers/hasListBefore.ts | 19 - .../keymap/listHelpers/hasListItemAfter.ts | 17 - .../keymap/listHelpers/hasListItemBefore.ts | 17 - .../src/keymap/listHelpers/index.ts | 10 - .../keymap/listHelpers/listItemHasSubList.ts | 21 - .../keymap/listHelpers/nextListIsDeeper.ts | 19 - .../keymap/listHelpers/nextListIsHigher.ts | 19 - .../@tiptap/extension-list/src/kit/index.ts | 81 - .../extension-list/src/ordered-list/index.ts | 1 - .../src/ordered-list/ordered-list.ts | 225 - .../extension-list/src/ordered-list/utils.ts | 301 - .../extension-list/src/task-item/index.ts | 1 - .../extension-list/src/task-item/task-item.ts | 330 - .../extension-list/src/task-list/index.ts | 1 - .../extension-list/src/task-list/task-list.ts | 187 - .../node_modules/@tiptap/pm | 1 - .../node_modules/@tiptap/extension-list | 1 - .../@tiptap/extension-ordered-list/LICENSE.md | 21 - .../@tiptap/extension-ordered-list/README.md | 18 - .../extension-ordered-list/dist/index.cjs | 34 - .../extension-ordered-list/dist/index.cjs.map | 1 - .../extension-ordered-list/dist/index.d.cts | 2 - .../extension-ordered-list/dist/index.d.ts | 2 - .../extension-ordered-list/dist/index.js | 9 - .../extension-ordered-list/dist/index.js.map | 1 - .../extension-ordered-list/package.json | 47 - .../extension-ordered-list/src/index.ts | 6 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-paragraph/LICENSE.md | 21 - .../@tiptap/extension-paragraph/README.md | 18 - .../extension-paragraph/dist/index.cjs | 93 - .../extension-paragraph/dist/index.cjs.map | 1 - .../extension-paragraph/dist/index.d.cts | 28 - .../extension-paragraph/dist/index.d.ts | 28 - .../@tiptap/extension-paragraph/dist/index.js | 66 - .../extension-paragraph/dist/index.js.map | 1 - .../@tiptap/extension-paragraph/package.json | 47 - .../@tiptap/extension-paragraph/src/index.ts | 5 - .../extension-paragraph/src/paragraph.ts | 139 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-strike/LICENSE.md | 21 - .../@tiptap/extension-strike/README.md | 18 - .../@tiptap/extension-strike/dist/index.cjs | 113 - .../extension-strike/dist/index.cjs.map | 1 - .../@tiptap/extension-strike/dist/index.d.cts | 46 - .../@tiptap/extension-strike/dist/index.d.ts | 46 - .../@tiptap/extension-strike/dist/index.js | 84 - .../extension-strike/dist/index.js.map | 1 - .../@tiptap/extension-strike/package.json | 47 - .../@tiptap/extension-strike/src/index.ts | 5 - .../@tiptap/extension-strike/src/strike.ts | 134 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-text/LICENSE.md | 21 - .../@tiptap/extension-text/README.md | 18 - .../@tiptap/extension-text/dist/index.cjs | 48 - .../@tiptap/extension-text/dist/index.cjs.map | 1 - .../@tiptap/extension-text/dist/index.d.cts | 9 - .../@tiptap/extension-text/dist/index.d.ts | 9 - .../@tiptap/extension-text/dist/index.js | 21 - .../@tiptap/extension-text/dist/index.js.map | 1 - .../@tiptap/extension-text/package.json | 47 - .../@tiptap/extension-text/src/index.ts | 5 - .../@tiptap/extension-text/src/text.ts | 20 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extension-underline/LICENSE.md | 21 - .../@tiptap/extension-underline/README.md | 18 - .../extension-underline/dist/index.cjs | 106 - .../extension-underline/dist/index.cjs.map | 1 - .../extension-underline/dist/index.d.cts | 38 - .../extension-underline/dist/index.d.ts | 38 - .../@tiptap/extension-underline/dist/index.js | 79 - .../extension-underline/dist/index.js.map | 1 - .../@tiptap/extension-underline/package.json | 47 - .../@tiptap/extension-underline/src/index.ts | 5 - .../extension-underline/src/underline.ts | 123 - .../node_modules/@tiptap/core | 1 - .../@tiptap/extensions/LICENSE.md | 21 - .../node_modules/@tiptap/extensions/README.md | 18 - .../extensions/dist/character-count/index.cjs | 131 - .../dist/character-count/index.cjs.map | 1 - .../dist/character-count/index.d.cts | 69 - .../dist/character-count/index.d.ts | 69 - .../extensions/dist/character-count/index.js | 104 - .../dist/character-count/index.js.map | 1 - .../extensions/dist/drop-cursor/index.cjs | 47 - .../extensions/dist/drop-cursor/index.cjs.map | 1 - .../extensions/dist/drop-cursor/index.d.cts | 31 - .../extensions/dist/drop-cursor/index.d.ts | 31 - .../extensions/dist/drop-cursor/index.js | 20 - .../extensions/dist/drop-cursor/index.js.map | 1 - .../@tiptap/extensions/dist/focus/index.cjs | 95 - .../extensions/dist/focus/index.cjs.map | 1 - .../@tiptap/extensions/dist/focus/index.d.cts | 28 - .../@tiptap/extensions/dist/focus/index.d.ts | 28 - .../@tiptap/extensions/dist/focus/index.js | 68 - .../extensions/dist/focus/index.js.map | 1 - .../extensions/dist/gap-cursor/index.cjs | 51 - .../extensions/dist/gap-cursor/index.cjs.map | 1 - .../extensions/dist/gap-cursor/index.d.cts | 25 - .../extensions/dist/gap-cursor/index.d.ts | 25 - .../extensions/dist/gap-cursor/index.js | 24 - .../extensions/dist/gap-cursor/index.js.map | 1 - .../@tiptap/extensions/dist/index.cjs | 693 - .../@tiptap/extensions/dist/index.cjs.map | 1 - .../@tiptap/extensions/dist/index.d.cts | 316 - .../@tiptap/extensions/dist/index.d.ts | 316 - .../@tiptap/extensions/dist/index.js | 655 - .../@tiptap/extensions/dist/index.js.map | 1 - .../extensions/dist/placeholder/index.cjs | 334 - .../extensions/dist/placeholder/index.cjs.map | 1 - .../extensions/dist/placeholder/index.d.cts | 95 - .../extensions/dist/placeholder/index.d.ts | 95 - .../extensions/dist/placeholder/index.js | 304 - .../extensions/dist/placeholder/index.js.map | 1 - .../extensions/dist/selection/index.cjs | 73 - .../extensions/dist/selection/index.cjs.map | 1 - .../extensions/dist/selection/index.d.cts | 17 - .../extensions/dist/selection/index.d.ts | 17 - .../extensions/dist/selection/index.js | 46 - .../extensions/dist/selection/index.js.map | 1 - .../extensions/dist/trailing-node/index.cjs | 92 - .../dist/trailing-node/index.cjs.map | 1 - .../extensions/dist/trailing-node/index.d.cts | 29 - .../extensions/dist/trailing-node/index.d.ts | 29 - .../extensions/dist/trailing-node/index.js | 64 - .../dist/trailing-node/index.js.map | 1 - .../extensions/dist/undo-redo/index.cjs | 66 - .../extensions/dist/undo-redo/index.cjs.map | 1 - .../extensions/dist/undo-redo/index.d.cts | 44 - .../extensions/dist/undo-redo/index.d.ts | 44 - .../extensions/dist/undo-redo/index.js | 39 - .../extensions/dist/undo-redo/index.js.map | 1 - .../@tiptap/extensions/package.json | 113 - .../src/character-count/character-count.ts | 203 - .../extensions/src/character-count/index.ts | 1 - .../extensions/src/drop-cursor/drop-cursor.ts | 47 - .../extensions/src/drop-cursor/index.ts | 1 - .../@tiptap/extensions/src/focus/focus.ts | 110 - .../@tiptap/extensions/src/focus/index.ts | 1 - .../extensions/src/gap-cursor/gap-cursor.ts | 47 - .../extensions/src/gap-cursor/index.ts | 1 - .../@tiptap/extensions/src/index.ts | 8 - .../extensions/src/placeholder/constants.ts | 17 - .../extensions/src/placeholder/index.ts | 4 - .../extensions/src/placeholder/placeholder.ts | 30 - .../placeholder/plugins/PlaceholderPlugin.ts | 35 - .../extensions/src/placeholder/types.ts | 84 - .../utils/buildPlaceholderDecorations.ts | 129 - .../utils/createPlaceholderDecoration.ts | 61 - .../src/placeholder/utils/findScrollParent.ts | 38 - .../utils/getViewportBoundaryPositions.ts | 49 - .../extensions/src/placeholder/utils/index.ts | 6 - .../utils/preparePlaceholderAttribute.ts | 21 - .../src/placeholder/utils/throttle.ts | 28 - .../src/placeholder/utils/viewportTracking.ts | 118 - .../@tiptap/extensions/src/selection/index.ts | 1 - .../extensions/src/selection/selection.ts | 69 - .../extensions/src/trailing-node/index.ts | 1 - .../src/trailing-node/trailing-node.ts | 107 - .../@tiptap/extensions/src/undo-redo/index.ts | 1 - .../extensions/src/undo-redo/undo-redo.ts | 86 - .../node_modules/@tiptap/pm | 1 - .../node_modules/@tiptap/pm/LICENSE | 21 - .../node_modules/@tiptap/pm/README.md | 22 - .../@tiptap/pm/THIRD_PARTY_LICENSES.md | 47 - .../@tiptap/pm/changeset/index.ts | 1 - .../node_modules/@tiptap/pm/commands/index.ts | 1 - .../@tiptap/pm/dist/changeset/index.cjs | 2 - .../@tiptap/pm/dist/changeset/index.d.cts | 13 - .../@tiptap/pm/dist/changeset/index.d.ts | 13 - .../@tiptap/pm/dist/changeset/index.js | 2 - .../@tiptap/pm/dist/commands/index.cjs | 2 - .../@tiptap/pm/dist/commands/index.d.cts | 1 - .../@tiptap/pm/dist/commands/index.d.ts | 1 - .../@tiptap/pm/dist/commands/index.js | 2 - .../@tiptap/pm/dist/dropcursor/index.cjs | 2 - .../@tiptap/pm/dist/dropcursor/index.d.cts | 1 - .../@tiptap/pm/dist/dropcursor/index.d.ts | 1 - .../@tiptap/pm/dist/dropcursor/index.js | 2 - .../@tiptap/pm/dist/gapcursor/index.cjs | 2 - .../@tiptap/pm/dist/gapcursor/index.d.cts | 1 - .../@tiptap/pm/dist/gapcursor/index.d.ts | 1 - .../@tiptap/pm/dist/gapcursor/index.js | 2 - .../@tiptap/pm/dist/history/index.cjs | 2 - .../@tiptap/pm/dist/history/index.d.cts | 1 - .../@tiptap/pm/dist/history/index.d.ts | 1 - .../@tiptap/pm/dist/history/index.js | 2 - .../@tiptap/pm/dist/inputrules/index.cjs | 2 - .../@tiptap/pm/dist/inputrules/index.d.cts | 1 - .../@tiptap/pm/dist/inputrules/index.d.ts | 1 - .../@tiptap/pm/dist/inputrules/index.js | 2 - .../@tiptap/pm/dist/keymap/index.cjs | 2 - .../@tiptap/pm/dist/keymap/index.d.cts | 1 - .../@tiptap/pm/dist/keymap/index.d.ts | 1 - .../@tiptap/pm/dist/keymap/index.js | 2 - .../@tiptap/pm/dist/model/index.cjs | 2 - .../@tiptap/pm/dist/model/index.d.cts | 1 - .../@tiptap/pm/dist/model/index.d.ts | 1 - .../@tiptap/pm/dist/model/index.js | 2 - .../@tiptap/pm/dist/schema-list/index.cjs | 2 - .../@tiptap/pm/dist/schema-list/index.d.cts | 1 - .../@tiptap/pm/dist/schema-list/index.d.ts | 1 - .../@tiptap/pm/dist/schema-list/index.js | 2 - .../@tiptap/pm/dist/state/index.cjs | 2 - .../@tiptap/pm/dist/state/index.d.cts | 1 - .../@tiptap/pm/dist/state/index.d.ts | 1 - .../@tiptap/pm/dist/state/index.js | 2 - .../@tiptap/pm/dist/tables/index.cjs | 2 - .../@tiptap/pm/dist/tables/index.d.cts | 1 - .../@tiptap/pm/dist/tables/index.d.ts | 1 - .../@tiptap/pm/dist/tables/index.js | 2 - .../@tiptap/pm/dist/transform/index.cjs | 2 - .../@tiptap/pm/dist/transform/index.d.cts | 1 - .../@tiptap/pm/dist/transform/index.d.ts | 1 - .../@tiptap/pm/dist/transform/index.js | 2 - .../@tiptap/pm/dist/view/index.cjs | 2 - .../@tiptap/pm/dist/view/index.d.cts | 1 - .../@tiptap/pm/dist/view/index.d.ts | 1 - .../@tiptap/pm/dist/view/index.js | 2 - .../@tiptap/pm/dropcursor/index.ts | 1 - .../@tiptap/pm/gapcursor/index.ts | 1 - .../node_modules/@tiptap/pm/history/index.ts | 1 - .../@tiptap/pm/inputrules/index.ts | 1 - .../node_modules/@tiptap/pm/keymap/index.ts | 1 - .../node_modules/@tiptap/pm/model/index.ts | 1 - .../node_modules/@tiptap/pm/package.json | 163 - .../@tiptap/pm/schema-list/index.ts | 1 - .../node_modules/@tiptap/pm/state/index.ts | 1 - .../node_modules/@tiptap/pm/tables/index.ts | 1 - .../@tiptap/pm/transform/index.ts | 1 - .../node_modules/@tiptap/pm/view/index.ts | 1 - .../node_modules/prosemirror-changeset | 1 - .../node_modules/prosemirror-commands | 1 - .../node_modules/prosemirror-dropcursor | 1 - .../node_modules/prosemirror-gapcursor | 1 - .../node_modules/prosemirror-history | 1 - .../node_modules/prosemirror-inputrules | 1 - .../node_modules/prosemirror-keymap | 1 - .../node_modules/prosemirror-model | 1 - .../node_modules/prosemirror-schema-list | 1 - .../node_modules/prosemirror-state | 1 - .../node_modules/prosemirror-tables | 1 - .../node_modules/prosemirror-transform | 1 - .../node_modules/prosemirror-view | 1 - .../node_modules/@tiptap/core | 1 - .../node_modules/@tiptap/extension-blockquote | 1 - .../node_modules/@tiptap/extension-bold | 1 - .../@tiptap/extension-bullet-list | 1 - .../node_modules/@tiptap/extension-code | 1 - .../node_modules/@tiptap/extension-code-block | 1 - .../node_modules/@tiptap/extension-document | 1 - .../node_modules/@tiptap/extension-dropcursor | 1 - .../node_modules/@tiptap/extension-gapcursor | 1 - .../node_modules/@tiptap/extension-hard-break | 1 - .../node_modules/@tiptap/extension-heading | 1 - .../@tiptap/extension-horizontal-rule | 1 - .../node_modules/@tiptap/extension-italic | 1 - .../node_modules/@tiptap/extension-link | 1 - .../node_modules/@tiptap/extension-list | 1 - .../node_modules/@tiptap/extension-list-item | 1 - .../@tiptap/extension-list-keymap | 1 - .../@tiptap/extension-ordered-list | 1 - .../node_modules/@tiptap/extension-paragraph | 1 - .../node_modules/@tiptap/extension-strike | 1 - .../node_modules/@tiptap/extension-text | 1 - .../node_modules/@tiptap/extension-underline | 1 - .../node_modules/@tiptap/extensions | 1 - .../node_modules/@tiptap/pm | 1 - .../@tiptap/starter-kit/LICENSE.md | 21 - .../@tiptap/starter-kit/README.md | 18 - .../@tiptap/starter-kit/dist/index.cjs | 127 - .../@tiptap/starter-kit/dist/index.cjs.map | 1 - .../@tiptap/starter-kit/dist/index.d.cts | 136 - .../@tiptap/starter-kit/dist/index.d.ts | 136 - .../@tiptap/starter-kit/dist/index.js | 100 - .../@tiptap/starter-kit/dist/index.js.map | 1 - .../@tiptap/starter-kit/package.json | 67 - .../@tiptap/starter-kit/src/index.ts | 6 - .../@tiptap/starter-kit/src/starter-kit.ts | 273 - .../@tootallnate/once/dist/index.d.ts | 14 - .../@tootallnate/once/dist/index.js | 39 - .../@tootallnate/once/dist/index.js.map | 1 - .../@tootallnate/once/package.json | 45 - .../abbrev@1.1.1/node_modules/abbrev/LICENSE | 46 - .../node_modules/abbrev/README.md | 23 - .../node_modules/abbrev/abbrev.js | 61 - .../node_modules/abbrev/package.json | 21 - .../node_modules/agent-base/README.md | 145 - .../agent-base/dist/src/index.d.ts | 78 - .../node_modules/agent-base/dist/src/index.js | 203 - .../agent-base/dist/src/index.js.map | 1 - .../agent-base/dist/src/promisify.d.ts | 4 - .../agent-base/dist/src/promisify.js | 18 - .../agent-base/dist/src/promisify.js.map | 1 - .../node_modules/agent-base/package.json | 64 - .../node_modules/agent-base/src/index.ts | 345 - .../node_modules/agent-base/src/promisify.ts | 33 - .../.pnpm/agent-base@6.0.2/node_modules/debug | 1 - .../node_modules/agentkeepalive/LICENSE | 23 - .../node_modules/agentkeepalive/README.md | 256 - .../node_modules/agentkeepalive/browser.js | 5 - .../node_modules/agentkeepalive/index.d.ts | 69 - .../node_modules/agentkeepalive/index.js | 7 - .../node_modules/agentkeepalive/lib/agent.js | 402 - .../agentkeepalive/lib/constants.js | 14 - .../agentkeepalive/lib/https_agent.js | 51 - .../node_modules/agentkeepalive/package.json | 56 - .../node_modules/humanize-ms | 1 - .../node_modules/aggregate-error/index.d.ts | 51 - .../node_modules/aggregate-error/index.js | 47 - .../node_modules/aggregate-error/license | 9 - .../node_modules/aggregate-error/package.json | 41 - .../node_modules/aggregate-error/readme.md | 61 - .../node_modules/clean-stack | 1 - .../node_modules/indent-string | 1 - .../node_modules/ansi-regex/index.d.ts | 37 - .../node_modules/ansi-regex/index.js | 10 - .../node_modules/ansi-regex/license | 9 - .../node_modules/ansi-regex/package.json | 55 - .../node_modules/ansi-regex/readme.md | 78 - .../aproba@2.1.0/node_modules/aproba/LICENSE | 14 - .../node_modules/aproba/README.md | 94 - .../aproba@2.1.0/node_modules/aproba/index.js | 105 - .../node_modules/aproba/package.json | 35 - .../node_modules/are-we-there-yet/LICENSE.md | 18 - .../node_modules/are-we-there-yet/README.md | 208 - .../are-we-there-yet/lib/index.js | 4 - .../are-we-there-yet/lib/tracker-base.js | 11 - .../are-we-there-yet/lib/tracker-group.js | 116 - .../are-we-there-yet/lib/tracker-stream.js | 36 - .../are-we-there-yet/lib/tracker.js | 32 - .../are-we-there-yet/package.json | 56 - .../node_modules/delegates | 1 - .../node_modules/readable-stream | 1 - .../node_modules/async-lock/AUTHORS | 21 - .../node_modules/async-lock/History.md | 132 - .../node_modules/async-lock/LICENSE | 22 - .../node_modules/async-lock/README.md | 177 - .../node_modules/async-lock/index.js | 2 - .../node_modules/async-lock/lib/index.js | 312 - .../node_modules/async-lock/package.json | 48 - .../node_modules/async-mutex/LICENSE | 21 - .../node_modules/async-mutex/README.md | 540 - .../node_modules/async-mutex/es6/Mutex.js | 41 - .../async-mutex/es6/MutexInterface.js | 1 - .../node_modules/async-mutex/es6/Semaphore.js | 153 - .../async-mutex/es6/SemaphoreInterface.js | 1 - .../node_modules/async-mutex/es6/errors.js | 3 - .../node_modules/async-mutex/es6/index.js | 5 - .../async-mutex/es6/tryAcquire.js | 8 - .../async-mutex/es6/withTimeout.js | 124 - .../node_modules/async-mutex/index.mjs | 291 - .../node_modules/async-mutex/lib/Mutex.d.ts | 12 - .../node_modules/async-mutex/lib/Mutex.js | 43 - .../async-mutex/lib/MutexInterface.d.ts | 17 - .../async-mutex/lib/MutexInterface.js | 2 - .../async-mutex/lib/Semaphore.d.ts | 22 - .../node_modules/async-mutex/lib/Semaphore.js | 155 - .../async-mutex/lib/SemaphoreInterface.d.ts | 19 - .../async-mutex/lib/SemaphoreInterface.js | 2 - .../node_modules/async-mutex/lib/errors.d.ts | 3 - .../node_modules/async-mutex/lib/errors.js | 6 - .../node_modules/async-mutex/lib/index.d.ts | 7 - .../node_modules/async-mutex/lib/index.js | 13 - .../async-mutex/lib/tryAcquire.d.ts | 4 - .../async-mutex/lib/tryAcquire.js | 12 - .../async-mutex/lib/withTimeout.d.ts | 4 - .../async-mutex/lib/withTimeout.js | 128 - .../node_modules/async-mutex/package.json | 88 - .../async-mutex@0.5.0/node_modules/tslib | 1 - .../balanced-match/.github/FUNDING.yml | 2 - .../node_modules/balanced-match/LICENSE.md | 21 - .../node_modules/balanced-match/README.md | 97 - .../node_modules/balanced-match/index.js | 62 - .../node_modules/balanced-match/package.json | 48 - .../node_modules/base64-js/LICENSE | 21 - .../node_modules/base64-js/README.md | 34 - .../node_modules/base64-js/base64js.min.js | 1 - .../node_modules/base64-js/index.d.ts | 3 - .../node_modules/base64-js/index.js | 150 - .../node_modules/base64-js/package.json | 47 - .../node_modules/bindings/LICENSE.md | 22 - .../node_modules/bindings/README.md | 98 - .../node_modules/bindings/bindings.js | 221 - .../node_modules/bindings/package.json | 28 - .../node_modules/file-uri-to-path | 1 - .../bl@4.1.0/node_modules/bl/.travis.yml | 17 - .../bl@4.1.0/node_modules/bl/BufferList.js | 396 - .../.pnpm/bl@4.1.0/node_modules/bl/LICENSE.md | 13 - .../.pnpm/bl@4.1.0/node_modules/bl/README.md | 247 - .../.pnpm/bl@4.1.0/node_modules/bl/bl.js | 84 - .../bl@4.1.0/node_modules/bl/package.json | 37 - .../bl@4.1.0/node_modules/bl/test/convert.js | 21 - .../bl@4.1.0/node_modules/bl/test/indexOf.js | 492 - .../node_modules/bl/test/isBufferList.js | 32 - .../bl@4.1.0/node_modules/bl/test/test.js | 869 -- .../.pnpm/bl@4.1.0/node_modules/buffer | 1 - .../.pnpm/bl@4.1.0/node_modules/inherits | 1 - .../bl@4.1.0/node_modules/readable-stream | 1 - .../node_modules/balanced-match | 1 - .../node_modules/brace-expansion/LICENSE | 21 - .../node_modules/brace-expansion/README.md | 129 - .../node_modules/brace-expansion/index.js | 203 - .../node_modules/brace-expansion/package.json | 50 - .../node_modules/concat-map | 1 - .../.pnpm/buffer@5.7.1/node_modules/base64-js | 1 - .../node_modules/buffer/AUTHORS.md | 70 - .../buffer@5.7.1/node_modules/buffer/LICENSE | 21 - .../node_modules/buffer/README.md | 410 - .../node_modules/buffer/index.d.ts | 186 - .../buffer@5.7.1/node_modules/buffer/index.js | 1817 --- .../node_modules/buffer/package.json | 96 - .../.pnpm/buffer@5.7.1/node_modules/ieee754 | 1 - .../cacache@15.3.0/node_modules/@npmcli/fs | 1 - .../node_modules/@npmcli/move-file | 1 - .../node_modules/cacache/LICENSE.md | 16 - .../node_modules/cacache/README.md | 703 -- .../node_modules/cacache/get.js | 237 - .../node_modules/cacache/index.js | 46 - .../node_modules/cacache/lib/content/path.js | 29 - .../node_modules/cacache/lib/content/read.js | 244 - .../node_modules/cacache/lib/content/rm.js | 19 - .../node_modules/cacache/lib/content/write.js | 189 - .../node_modules/cacache/lib/entry-index.js | 394 - .../node_modules/cacache/lib/memoization.js | 73 - .../node_modules/cacache/lib/util/disposer.js | 30 - .../cacache/lib/util/fix-owner.js | 142 - .../cacache/lib/util/hash-to-segments.js | 7 - .../cacache/lib/util/move-file.js | 67 - .../node_modules/cacache/lib/util/tmp.js | 35 - .../node_modules/cacache/lib/verify.js | 287 - .../cacache@15.3.0/node_modules/cacache/ls.js | 6 - .../cacache/node_modules/.bin/mkdirp | 21 - .../cacache/node_modules/.bin/rimraf | 21 - .../node_modules/cacache/package.json | 80 - .../node_modules/cacache/put.js | 83 - .../cacache@15.3.0/node_modules/cacache/rm.js | 31 - .../node_modules/cacache/verify.js | 3 - .../.pnpm/cacache@15.3.0/node_modules/chownr | 1 - .../cacache@15.3.0/node_modules/fs-minipass | 1 - .../.pnpm/cacache@15.3.0/node_modules/glob | 1 - .../cacache@15.3.0/node_modules/infer-owner | 1 - .../cacache@15.3.0/node_modules/lru-cache | 1 - .../cacache@15.3.0/node_modules/minipass | 1 - .../node_modules/minipass-collect | 1 - .../node_modules/minipass-flush | 1 - .../node_modules/minipass-pipeline | 1 - .../.pnpm/cacache@15.3.0/node_modules/mkdirp | 1 - .../.pnpm/cacache@15.3.0/node_modules/p-map | 1 - .../node_modules/promise-inflight | 1 - .../.pnpm/cacache@15.3.0/node_modules/rimraf | 1 - .../.pnpm/cacache@15.3.0/node_modules/ssri | 1 - .../.pnpm/cacache@15.3.0/node_modules/tar | 1 - .../node_modules/unique-filename | 1 - .../chownr@1.1.4/node_modules/chownr/LICENSE | 15 - .../node_modules/chownr/README.md | 3 - .../node_modules/chownr/chownr.js | 167 - .../node_modules/chownr/package.json | 29 - .../chownr@2.0.0/node_modules/chownr/LICENSE | 15 - .../node_modules/chownr/README.md | 3 - .../node_modules/chownr/chownr.js | 167 - .../node_modules/chownr/package.json | 32 - .../node_modules/clean-stack/index.d.ts | 47 - .../node_modules/clean-stack/index.js | 40 - .../node_modules/clean-stack/license | 9 - .../node_modules/clean-stack/package.json | 39 - .../node_modules/clean-stack/readme.md | 76 - .../node_modules/color-support/LICENSE | 15 - .../node_modules/color-support/README.md | 129 - .../node_modules/color-support/bin.js | 3 - .../node_modules/color-support/browser.js | 14 - .../node_modules/color-support/index.js | 134 - .../node_modules/.bin/color-support | 21 - .../node_modules/color-support/package.json | 36 - .../node_modules/concat-map/.travis.yml | 4 - .../node_modules/concat-map/LICENSE | 18 - .../node_modules/concat-map/README.markdown | 62 - .../node_modules/concat-map/example/map.js | 6 - .../node_modules/concat-map/index.js | 13 - .../node_modules/concat-map/package.json | 43 - .../node_modules/concat-map/test/map.js | 39 - .../console-control-strings/LICENSE | 13 - .../console-control-strings/README.md | 145 - .../console-control-strings/index.js | 125 - .../console-control-strings/package.json | 27 - .../node_modules/crossws/LICENSE | 46 - .../node_modules/crossws/README.md | 62 - .../node_modules/crossws/adapters/bun.d.ts | 2 - .../node_modules/crossws/adapters/bunny.d.ts | 2 - .../crossws/adapters/cloudflare.d.ts | 2 - .../node_modules/crossws/adapters/deno.d.ts | 2 - .../node_modules/crossws/adapters/node.d.ts | 2 - .../node_modules/crossws/adapters/sse.d.ts | 2 - .../node_modules/crossws/adapters/uws.d.ts | 2 - .../crossws/dist/THIRD-PARTY-LICENSES.md | 33 - .../crossws/dist/_chunks/_request.mjs | 80 - .../crossws/dist/_chunks/_types.d.mts | 23 - .../crossws/dist/_chunks/adapter.d.mts | 166 - .../crossws/dist/_chunks/adapter.mjs | 92 - .../crossws/dist/_chunks/bun.d.mts | 35 - .../crossws/dist/_chunks/bunny.d.mts | 22 - .../crossws/dist/_chunks/cloudflare.d.mts | 42 - .../crossws/dist/_chunks/deno.d.mts | 14 - .../crossws/dist/_chunks/error.mjs | 7 - .../crossws/dist/_chunks/libs/ws.mjs | 2429 ---- .../crossws/dist/_chunks/node.d.mts | 328 - .../crossws/dist/_chunks/node.mjs | 129 - .../crossws/dist/_chunks/peer.mjs | 186 - .../crossws/dist/_chunks/rolldown-runtime.mjs | 24 - .../crossws/dist/_chunks/sse.d.mts | 9 - .../crossws/dist/_chunks/web.d.mts | 296 - .../crossws/dist/adapters/bun.d.mts | 2 - .../crossws/dist/adapters/bun.mjs | 84 - .../crossws/dist/adapters/bunny.d.mts | 2 - .../crossws/dist/adapters/bunny.mjs | 68 - .../crossws/dist/adapters/cloudflare.d.mts | 2 - .../crossws/dist/adapters/cloudflare.mjs | 176 - .../crossws/dist/adapters/deno.d.mts | 2 - .../crossws/dist/adapters/deno.mjs | 64 - .../crossws/dist/adapters/node.d.mts | 2 - .../crossws/dist/adapters/node.mjs | 2 - .../crossws/dist/adapters/sse.d.mts | 2 - .../crossws/dist/adapters/sse.mjs | 97 - .../crossws/dist/adapters/uws.d.mts | 57 - .../crossws/dist/adapters/uws.mjs | 153 - .../node_modules/crossws/dist/index.d.mts | 82 - .../node_modules/crossws/dist/index.mjs | 162 - .../crossws/dist/server/bun.d.mts | 5 - .../node_modules/crossws/dist/server/bun.mjs | 26 - .../crossws/dist/server/bunny.d.mts | 5 - .../crossws/dist/server/bunny.mjs | 23 - .../crossws/dist/server/cloudflare.d.mts | 5 - .../crossws/dist/server/cloudflare.mjs | 23 - .../crossws/dist/server/default.d.mts | 5 - .../crossws/dist/server/default.mjs | 24 - .../crossws/dist/server/deno.d.mts | 5 - .../node_modules/crossws/dist/server/deno.mjs | 23 - .../crossws/dist/server/node.d.mts | 5 - .../node_modules/crossws/dist/server/node.mjs | 32 - .../crossws/dist/websocket/native.d.mts | 2 - .../crossws/dist/websocket/native.mjs | 2 - .../crossws/dist/websocket/node.d.mts | 2 - .../crossws/dist/websocket/node.mjs | 3 - .../crossws/dist/websocket/sse.d.mts | 39 - .../crossws/dist/websocket/sse.mjs | 113 - .../node_modules/crossws/package.json | 126 - .../node_modules/crossws/server.d.ts | 2 - .../node_modules/crossws/server/bun.d.ts | 2 - .../node_modules/crossws/server/bunny.d.ts | 2 - .../node_modules/crossws/server/deno.d.ts | 2 - .../node_modules/crossws/server/node.d.ts | 2 - .../node_modules/crossws/websocket.d.ts | 2 - .../node_modules/crossws/websocket/sse.d.ts | 2 - .../debug@4.4.3/node_modules/debug/LICENSE | 20 - .../debug@4.4.3/node_modules/debug/README.md | 481 - .../node_modules/debug/package.json | 64 - .../node_modules/debug/src/browser.js | 272 - .../node_modules/debug/src/common.js | 292 - .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/node.js | 263 - .../.pnpm/debug@4.4.3/node_modules/ms | 1 - .../decompress-response/index.d.ts | 22 - .../node_modules/decompress-response/index.js | 58 - .../node_modules/decompress-response/license | 9 - .../decompress-response/package.json | 56 - .../decompress-response/readme.md | 48 - .../node_modules/mimic-response | 1 - .../node_modules/deep-extend/CHANGELOG.md | 46 - .../node_modules/deep-extend/LICENSE | 20 - .../node_modules/deep-extend/README.md | 91 - .../node_modules/deep-extend/index.js | 1 - .../deep-extend/lib/deep-extend.js | 150 - .../node_modules/deep-extend/package.json | 62 - .../node_modules/delegates/.npmignore | 1 - .../node_modules/delegates/History.md | 22 - .../node_modules/delegates/License | 20 - .../node_modules/delegates/Makefile | 8 - .../node_modules/delegates/Readme.md | 94 - .../node_modules/delegates/index.js | 121 - .../node_modules/delegates/package.json | 13 - .../node_modules/delegates/test/index.js | 94 - .../node_modules/detect-libc/LICENSE | 201 - .../node_modules/detect-libc/README.md | 163 - .../node_modules/detect-libc/index.d.ts | 14 - .../detect-libc/lib/detect-libc.js | 313 - .../node_modules/detect-libc/lib/elf.js | 39 - .../detect-libc/lib/filesystem.js | 51 - .../node_modules/detect-libc/lib/process.js | 24 - .../node_modules/detect-libc/package.json | 44 - .../node_modules/emoji-regex/LICENSE-MIT.txt | 20 - .../node_modules/emoji-regex/README.md | 73 - .../node_modules/emoji-regex/es2015/index.js | 6 - .../node_modules/emoji-regex/es2015/text.js | 6 - .../node_modules/emoji-regex/index.d.ts | 23 - .../node_modules/emoji-regex/index.js | 6 - .../node_modules/emoji-regex/package.json | 50 - .../node_modules/emoji-regex/text.js | 6 - .../node_modules/encoding/.prettierrc.js | 8 - .../node_modules/encoding/.travis.yml | 25 - .../node_modules/encoding/LICENSE | 16 - .../node_modules/encoding/README.md | 41 - .../node_modules/encoding/lib/encoding.js | 83 - .../node_modules/encoding/package.json | 18 - .../node_modules/encoding/test/test.js | 49 - .../encoding@0.1.13/node_modules/iconv-lite | 1 - .../node_modules/end-of-stream/LICENSE | 21 - .../node_modules/end-of-stream/README.md | 54 - .../node_modules/end-of-stream/index.js | 96 - .../node_modules/end-of-stream/package.json | 37 - .../end-of-stream@1.4.5/node_modules/once | 1 - .../node_modules/env-paths/index.d.ts | 101 - .../node_modules/env-paths/index.js | 74 - .../node_modules/env-paths/license | 9 - .../node_modules/env-paths/package.json | 45 - .../node_modules/env-paths/readme.md | 115 - .../node_modules/err-code/.editorconfig | 12 - .../node_modules/err-code/.eslintrc.json | 7 - .../node_modules/err-code/.travis.yml | 4 - .../node_modules/err-code/README.md | 70 - .../node_modules/err-code/bower.json | 30 - .../node_modules/err-code/index.js | 47 - .../node_modules/err-code/index.umd.js | 51 - .../node_modules/err-code/package.json | 34 - .../node_modules/err-code/test/.eslintrc.json | 5 - .../node_modules/err-code/test/test.js | 159 - .../node_modules/expand-template/.travis.yml | 6 - .../node_modules/expand-template/LICENSE | 21 - .../node_modules/expand-template/README.md | 43 - .../node_modules/expand-template/index.js | 26 - .../node_modules/expand-template/package.json | 29 - .../node_modules/expand-template/test.js | 67 - .../node_modules/file-uri-to-path/.npmignore | 1 - .../node_modules/file-uri-to-path/.travis.yml | 30 - .../node_modules/file-uri-to-path/History.md | 21 - .../node_modules/file-uri-to-path/LICENSE | 20 - .../node_modules/file-uri-to-path/README.md | 74 - .../node_modules/file-uri-to-path/index.d.ts | 2 - .../node_modules/file-uri-to-path/index.js | 66 - .../file-uri-to-path/package.json | 32 - .../file-uri-to-path/test/test.js | 24 - .../file-uri-to-path/test/tests.json | 13 - .../node_modules/fs-constants/LICENSE | 21 - .../node_modules/fs-constants/README.md | 26 - .../node_modules/fs-constants/browser.js | 1 - .../node_modules/fs-constants/index.js | 1 - .../node_modules/fs-constants/package.json | 19 - .../node_modules/fs-minipass/LICENSE | 15 - .../node_modules/fs-minipass/README.md | 70 - .../node_modules/fs-minipass/index.js | 422 - .../node_modules/fs-minipass/package.json | 39 - .../fs-minipass@2.1.0/node_modules/minipass | 1 - .../node_modules/fs.realpath/LICENSE | 43 - .../node_modules/fs.realpath/README.md | 33 - .../node_modules/fs.realpath/index.js | 66 - .../node_modules/fs.realpath/old.js | 303 - .../node_modules/fs.realpath/package.json | 26 - .../.pnpm/gauge@4.0.4/node_modules/aproba | 1 - .../gauge@4.0.4/node_modules/color-support | 1 - .../node_modules/console-control-strings | 1 - .../gauge@4.0.4/node_modules/gauge/LICENSE.md | 20 - .../gauge@4.0.4/node_modules/gauge/README.md | 402 - .../node_modules/gauge/lib/base-theme.js | 18 - .../node_modules/gauge/lib/error.js | 24 - .../node_modules/gauge/lib/has-color.js | 4 - .../node_modules/gauge/lib/index.js | 289 - .../node_modules/gauge/lib/plumbing.js | 50 - .../node_modules/gauge/lib/process.js | 3 - .../node_modules/gauge/lib/progress-bar.js | 41 - .../node_modules/gauge/lib/render-template.js | 222 - .../node_modules/gauge/lib/set-immediate.js | 7 - .../node_modules/gauge/lib/set-interval.js | 3 - .../node_modules/gauge/lib/spin.js | 5 - .../node_modules/gauge/lib/template-item.js | 87 - .../node_modules/gauge/lib/theme-set.js | 122 - .../node_modules/gauge/lib/themes.js | 56 - .../node_modules/gauge/lib/wide-truncate.js | 31 - .../gauge/node_modules/.bin/color-support | 21 - .../node_modules/gauge/package.json | 66 - .../gauge@4.0.4/node_modules/has-unicode | 1 - .../gauge@4.0.4/node_modules/signal-exit | 1 - .../gauge@4.0.4/node_modules/string-width | 1 - .../.pnpm/gauge@4.0.4/node_modules/strip-ansi | 1 - .../.pnpm/gauge@4.0.4/node_modules/wide-align | 1 - .../github-from-package/.travis.yml | 4 - .../node_modules/github-from-package/LICENSE | 18 - .../github-from-package/example/package.json | 8 - .../github-from-package/example/url.js | 3 - .../node_modules/github-from-package/index.js | 17 - .../github-from-package/package.json | 30 - .../github-from-package/readme.markdown | 53 - .../github-from-package/test/a.json | 8 - .../github-from-package/test/b.json | 5 - .../github-from-package/test/c.json | 5 - .../github-from-package/test/d.json | 7 - .../github-from-package/test/e.json | 5 - .../github-from-package/test/url.js | 19 - .../.pnpm/glob@7.2.3/node_modules/fs.realpath | 1 - .../glob@7.2.3/node_modules/glob/LICENSE | 21 - .../glob@7.2.3/node_modules/glob/README.md | 378 - .../glob@7.2.3/node_modules/glob/common.js | 238 - .../glob@7.2.3/node_modules/glob/glob.js | 790 -- .../glob@7.2.3/node_modules/glob/package.json | 55 - .../glob@7.2.3/node_modules/glob/sync.js | 486 - .../.pnpm/glob@7.2.3/node_modules/inflight | 1 - .../.pnpm/glob@7.2.3/node_modules/inherits | 1 - .../.pnpm/glob@7.2.3/node_modules/minimatch | 1 - .../.pnpm/glob@7.2.3/node_modules/once | 1 - .../glob@7.2.3/node_modules/path-is-absolute | 1 - .../node_modules/graceful-fs/LICENSE | 15 - .../node_modules/graceful-fs/README.md | 143 - .../node_modules/graceful-fs/clone.js | 23 - .../node_modules/graceful-fs/graceful-fs.js | 448 - .../graceful-fs/legacy-streams.js | 118 - .../node_modules/graceful-fs/package.json | 53 - .../node_modules/graceful-fs/polyfills.js | 355 - .../node_modules/has-unicode/LICENSE | 14 - .../node_modules/has-unicode/README.md | 43 - .../node_modules/has-unicode/index.js | 16 - .../node_modules/has-unicode/package.json | 30 - .../node_modules/http-cache-semantics/LICENSE | 9 - .../http-cache-semantics/README.md | 268 - .../http-cache-semantics/index.js | 928 -- .../http-cache-semantics/package.json | 22 - .../node_modules/@tootallnate/once | 1 - .../node_modules/agent-base | 1 - .../http-proxy-agent@4.0.1/node_modules/debug | 1 - .../node_modules/http-proxy-agent/README.md | 74 - .../http-proxy-agent/dist/agent.d.ts | 32 - .../http-proxy-agent/dist/agent.js | 145 - .../http-proxy-agent/dist/agent.js.map | 1 - .../http-proxy-agent/dist/index.d.ts | 21 - .../http-proxy-agent/dist/index.js | 14 - .../http-proxy-agent/dist/index.js.map | 1 - .../http-proxy-agent/package.json | 57 - .../node_modules/agent-base | 1 - .../node_modules/debug | 1 - .../node_modules/https-proxy-agent/README.md | 137 - .../https-proxy-agent/dist/agent.d.ts | 30 - .../https-proxy-agent/dist/agent.js | 177 - .../https-proxy-agent/dist/agent.js.map | 1 - .../https-proxy-agent/dist/index.d.ts | 23 - .../https-proxy-agent/dist/index.js | 14 - .../https-proxy-agent/dist/index.js.map | 1 - .../dist/parse-proxy-response.d.ts | 7 - .../dist/parse-proxy-response.js | 66 - .../dist/parse-proxy-response.js.map | 1 - .../https-proxy-agent/package.json | 56 - .../node_modules/humanize-ms/History.md | 25 - .../node_modules/humanize-ms/LICENSE | 17 - .../node_modules/humanize-ms/README.md | 40 - .../node_modules/humanize-ms/index.js | 24 - .../node_modules/humanize-ms/package.json | 37 - .../.pnpm/humanize-ms@1.2.1/node_modules/ms | 1 - .../iconv-lite/.github/dependabot.yml | 11 - .../node_modules/iconv-lite/Changelog.md | 212 - .../node_modules/iconv-lite/LICENSE | 21 - .../node_modules/iconv-lite/README.md | 130 - .../iconv-lite/encodings/dbcs-codec.js | 597 - .../iconv-lite/encodings/dbcs-data.js | 188 - .../iconv-lite/encodings/index.js | 23 - .../iconv-lite/encodings/internal.js | 198 - .../iconv-lite/encodings/sbcs-codec.js | 72 - .../encodings/sbcs-data-generated.js | 451 - .../iconv-lite/encodings/sbcs-data.js | 179 - .../encodings/tables/big5-added.json | 122 - .../iconv-lite/encodings/tables/cp936.json | 264 - .../iconv-lite/encodings/tables/cp949.json | 273 - .../iconv-lite/encodings/tables/cp950.json | 177 - .../iconv-lite/encodings/tables/eucjp.json | 182 - .../encodings/tables/gb18030-ranges.json | 1 - .../encodings/tables/gbk-added.json | 56 - .../iconv-lite/encodings/tables/shiftjis.json | 125 - .../iconv-lite/encodings/utf16.js | 197 - .../iconv-lite/encodings/utf32.js | 319 - .../node_modules/iconv-lite/encodings/utf7.js | 290 - .../iconv-lite/lib/bom-handling.js | 52 - .../node_modules/iconv-lite/lib/index.d.ts | 41 - .../node_modules/iconv-lite/lib/index.js | 180 - .../node_modules/iconv-lite/lib/streams.js | 109 - .../node_modules/iconv-lite/package.json | 44 - .../node_modules/safer-buffer | 1 - .../node_modules/ieee754/LICENSE | 11 - .../node_modules/ieee754/README.md | 51 - .../node_modules/ieee754/index.d.ts | 10 - .../node_modules/ieee754/index.js | 85 - .../node_modules/ieee754/package.json | 52 - .../node_modules/imurmurhash/README.md | 122 - .../node_modules/imurmurhash/imurmurhash.js | 138 - .../imurmurhash/imurmurhash.min.js | 12 - .../node_modules/imurmurhash/package.json | 40 - .../node_modules/indent-string/index.d.ts | 42 - .../node_modules/indent-string/index.js | 35 - .../node_modules/indent-string/license | 9 - .../node_modules/indent-string/package.json | 37 - .../node_modules/indent-string/readme.md | 70 - .../node_modules/infer-owner/LICENSE | 15 - .../node_modules/infer-owner/README.md | 41 - .../node_modules/infer-owner/index.js | 71 - .../node_modules/infer-owner/package.json | 26 - .../node_modules/inflight/LICENSE | 15 - .../node_modules/inflight/README.md | 37 - .../node_modules/inflight/inflight.js | 54 - .../node_modules/inflight/package.json | 29 - .../.pnpm/inflight@1.0.6/node_modules/once | 1 - .../.pnpm/inflight@1.0.6/node_modules/wrappy | 1 - .../node_modules/inherits/LICENSE | 16 - .../node_modules/inherits/README.md | 42 - .../node_modules/inherits/inherits.js | 9 - .../node_modules/inherits/inherits_browser.js | 27 - .../node_modules/inherits/package.json | 29 - .../.pnpm/ini@1.3.8/node_modules/ini/LICENSE | 15 - .../ini@1.3.8/node_modules/ini/README.md | 102 - .../.pnpm/ini@1.3.8/node_modules/ini/ini.js | 206 - .../ini@1.3.8/node_modules/ini/package.json | 33 - .../node_modules/ip-address/LICENSE | 19 - .../node_modules/ip-address/README.md | 278 - .../ip-address/dist/address-error.d.ts | 4 - .../ip-address/dist/address-error.js | 12 - .../ip-address/dist/address-error.js.map | 1 - .../node_modules/ip-address/dist/common.d.ts | 20 - .../node_modules/ip-address/dist/common.js | 67 - .../ip-address/dist/common.js.map | 1 - .../ip-address/dist/ip-address.d.ts | 7 - .../ip-address/dist/ip-address.js | 35 - .../ip-address/dist/ip-address.js.map | 1 - .../node_modules/ip-address/dist/ipv4.d.ts | 267 - .../node_modules/ip-address/dist/ipv4.js | 485 - .../node_modules/ip-address/dist/ipv4.js.map | 1 - .../node_modules/ip-address/dist/ipv6.d.ts | 489 - .../node_modules/ip-address/dist/ipv6.js | 1217 -- .../node_modules/ip-address/dist/ipv6.js.map | 1 - .../ip-address/dist/v4/constants.d.ts | 4 - .../ip-address/dist/v4/constants.js | 8 - .../ip-address/dist/v4/constants.js.map | 1 - .../ip-address/dist/v6/constants.d.ts | 44 - .../ip-address/dist/v6/constants.js | 81 - .../ip-address/dist/v6/constants.js.map | 1 - .../ip-address/dist/v6/helpers.d.ts | 18 - .../ip-address/dist/v6/helpers.js | 54 - .../ip-address/dist/v6/helpers.js.map | 1 - .../dist/v6/regular-expressions.d.ts | 5 - .../ip-address/dist/v6/regular-expressions.js | 95 - .../dist/v6/regular-expressions.js.map | 1 - .../node_modules/ip-address/package.json | 88 - .../is-fullwidth-code-point/index.d.ts | 17 - .../is-fullwidth-code-point/index.js | 50 - .../is-fullwidth-code-point/license | 9 - .../is-fullwidth-code-point/package.json | 42 - .../is-fullwidth-code-point/readme.md | 39 - .../node_modules/is-lambda/.npmignore | 1 - .../node_modules/is-lambda/.travis.yml | 8 - .../node_modules/is-lambda/LICENSE | 21 - .../node_modules/is-lambda/README.md | 27 - .../node_modules/is-lambda/index.js | 6 - .../node_modules/is-lambda/package.json | 35 - .../node_modules/is-lambda/test.js | 16 - .../isexe@2.0.0/node_modules/isexe/.npmignore | 2 - .../isexe@2.0.0/node_modules/isexe/LICENSE | 15 - .../isexe@2.0.0/node_modules/isexe/README.md | 51 - .../isexe@2.0.0/node_modules/isexe/index.js | 57 - .../isexe@2.0.0/node_modules/isexe/mode.js | 41 - .../node_modules/isexe/package.json | 31 - .../node_modules/isexe/test/basic.js | 221 - .../isexe@2.0.0/node_modules/isexe/windows.js | 42 - .../node_modules/isomorphic.js/LICENSE | 21 - .../node_modules/isomorphic.js/README.md | 3 - .../node_modules/isomorphic.js/browser.js | 28 - .../node_modules/isomorphic.js/browser.mjs | 25 - .../node_modules/isomorphic.js/iso.js | 18 - .../node_modules/isomorphic.js/node.mjs | 5 - .../node_modules/isomorphic.js/package.json | 66 - .../node_modules/kleur/colors.d.ts | 38 - .../kleur@4.1.5/node_modules/kleur/colors.js | 53 - .../kleur@4.1.5/node_modules/kleur/colors.mjs | 53 - .../kleur@4.1.5/node_modules/kleur/index.d.ts | 45 - .../kleur@4.1.5/node_modules/kleur/index.js | 110 - .../kleur@4.1.5/node_modules/kleur/index.mjs | 110 - .../kleur@4.1.5/node_modules/kleur/license | 21 - .../node_modules/kleur/package.json | 51 - .../kleur@4.1.5/node_modules/kleur/readme.md | 232 - .../lib0@0.2.117/node_modules/isomorphic.js | 1 - .../lib0/.github/workflows/node.js.yml | 24 - .../node_modules/lib0/.jsdoc.json | 18 - .../lib0@0.2.117/node_modules/lib0/LICENSE | 21 - .../lib0@0.2.117/node_modules/lib0/README.md | 1414 --- .../lib0@0.2.117/node_modules/lib0/array.d.ts | 30 - .../node_modules/lib0/array.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/array.js | 219 - .../node_modules/lib0/array.test.d.ts | 13 - .../node_modules/lib0/array.test.d.ts.map | 1 - .../lib0/bin/0ecdsa-generate-keypair.d.ts | 3 - .../lib0/bin/0ecdsa-generate-keypair.d.ts.map | 1 - .../lib0/bin/0ecdsa-generate-keypair.js | 15 - .../node_modules/lib0/bin/0serve.d.ts | 3 - .../node_modules/lib0/bin/0serve.d.ts.map | 1 - .../node_modules/lib0/bin/0serve.js | 97 - .../node_modules/lib0/bin/gendocs.d.ts | 3 - .../node_modules/lib0/bin/gendocs.d.ts.map | 1 - .../node_modules/lib0/bin/gendocs.js | 117 - .../node_modules/lib0/bin/gentesthtml.d.ts | 3 - .../lib0/bin/gentesthtml.d.ts.map | 1 - .../node_modules/lib0/bin/gentesthtml.js | 89 - .../node_modules/lib0/binary.d.ts | 87 - .../node_modules/lib0/binary.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/binary.js | 90 - .../node_modules/lib0/binary.test.d.ts | 4 - .../node_modules/lib0/binary.test.d.ts.map | 1 - .../node_modules/lib0/broadcastchannel.d.ts | 8 - .../lib0/broadcastchannel.d.ts.map | 1 - .../node_modules/lib0/broadcastchannel.js | 130 - .../lib0/broadcastchannel.test.d.ts | 3 - .../lib0/broadcastchannel.test.d.ts.map | 1 - .../node_modules/lib0/buffer.d.ts | 22 - .../node_modules/lib0/buffer.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/buffer.js | 163 - .../node_modules/lib0/buffer.test.d.ts | 6 - .../node_modules/lib0/buffer.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/cache.d.ts | 52 - .../node_modules/lib0/cache.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/cache.js | 206 - .../node_modules/lib0/cache.test.d.ts | 3 - .../node_modules/lib0/cache.test.d.ts.map | 1 - .../node_modules/lib0/component.d.ts | 86 - .../node_modules/lib0/component.d.ts.map | 1 - .../node_modules/lib0/component.js | 414 - .../node_modules/lib0/conditions.d.ts | 2 - .../node_modules/lib0/conditions.d.ts.map | 1 - .../node_modules/lib0/conditions.js | 13 - .../tmp/coverage-70359-1766561372098-0.json | 1 - .../node_modules/lib0/crypto.test.d.ts | 9 - .../node_modules/lib0/crypto.test.d.ts.map | 1 - .../node_modules/lib0/crypto/aes-gcm.d.ts | 17 - .../node_modules/lib0/crypto/aes-gcm.d.ts.map | 1 - .../node_modules/lib0/crypto/aes-gcm.js | 132 - .../node_modules/lib0/crypto/common.d.ts | 3 - .../node_modules/lib0/crypto/common.d.ts.map | 1 - .../node_modules/lib0/crypto/common.js | 19 - .../node_modules/lib0/crypto/ecdsa.d.ts | 17 - .../node_modules/lib0/crypto/ecdsa.d.ts.map | 1 - .../node_modules/lib0/crypto/ecdsa.js | 97 - .../node_modules/lib0/crypto/jwt.d.ts | 10 - .../node_modules/lib0/crypto/jwt.d.ts.map | 1 - .../node_modules/lib0/crypto/jwt.js | 70 - .../node_modules/lib0/crypto/rsa-oaep.d.ts | 13 - .../lib0/crypto/rsa-oaep.d.ts.map | 1 - .../node_modules/lib0/crypto/rsa-oaep.js | 81 - .../node_modules/lib0/decoding.d.ts | 165 - .../node_modules/lib0/decoding.d.ts.map | 1 - .../node_modules/lib0/decoding.js | 710 -- .../node_modules/lib0/delta/binding.d.ts | 107 - .../node_modules/lib0/delta/binding.d.ts.map | 1 - .../node_modules/lib0/delta/binding.js | 372 - .../node_modules/lib0/delta/binding.test.d.ts | 5 - .../lib0/delta/binding.test.d.ts.map | 1 - .../lib0/delta/delta-pitch.test.d.ts | 5 - .../lib0/delta/delta-pitch.test.d.ts.map | 1 - .../node_modules/lib0/delta/delta.d.ts | 1008 -- .../node_modules/lib0/delta/delta.d.ts.map | 1 - .../node_modules/lib0/delta/delta.js | 2362 ---- .../node_modules/lib0/delta/delta.test.d.ts | 29 - .../lib0/delta/delta.test.d.ts.map | 1 - .../node_modules/lib0/delta/readme.md | 129 - .../node_modules/lib0/delta/t3.test.d.ts | 19 - .../node_modules/lib0/delta/t3.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/deno.json | 12 - .../lib0@0.2.117/node_modules/lib0/deno.lock | 122 - .../lib0@0.2.117/node_modules/lib0/diff.d.ts | 36 - .../node_modules/lib0/diff.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/diff.js | 145 - .../node_modules/lib0/diff.test.d.ts | 6 - .../node_modules/lib0/diff.test.d.ts.map | 1 - .../node_modules/lib0/diff/patience.d.ts | 16 - .../node_modules/lib0/diff/patience.d.ts.map | 1 - .../node_modules/lib0/diff/patience.js | 226 - .../node_modules/lib0/diff/patience.test.d.ts | 4 - .../lib0/diff/patience.test.d.ts.map | 1 - .../node_modules/lib0/dist/aes-gcm.cjs | 171 - .../node_modules/lib0/dist/aes-gcm.cjs.map | 1 - .../node_modules/lib0/dist/array-78849c95.cjs | 260 - .../lib0/dist/array-78849c95.cjs.map | 1 - .../node_modules/lib0/dist/array.cjs | 26 - .../node_modules/lib0/dist/array.cjs.map | 1 - .../node_modules/lib0/dist/array.d.ts | 30 - .../node_modules/lib0/dist/array.d.ts.map | 1 - .../node_modules/lib0/dist/array.test.d.ts | 13 - .../lib0/dist/array.test.d.ts.map | 1 - .../dist/bin/0ecdsa-generate-keypair.d.ts | 3 - .../dist/bin/0ecdsa-generate-keypair.d.ts.map | 1 - .../node_modules/lib0/dist/bin/0serve.d.ts | 3 - .../lib0/dist/bin/0serve.d.ts.map | 1 - .../node_modules/lib0/dist/bin/gendocs.d.ts | 3 - .../lib0/dist/bin/gendocs.d.ts.map | 1 - .../lib0/dist/bin/gentesthtml.d.ts | 3 - .../lib0/dist/bin/gentesthtml.d.ts.map | 1 - .../lib0/dist/binary-ac8e39e2.cjs | 229 - .../lib0/dist/binary-ac8e39e2.cjs.map | 1 - .../node_modules/lib0/dist/binary.cjs | 74 - .../node_modules/lib0/dist/binary.cjs.map | 1 - .../node_modules/lib0/dist/binary.d.ts | 87 - .../node_modules/lib0/dist/binary.d.ts.map | 1 - .../node_modules/lib0/dist/binary.test.d.ts | 4 - .../lib0/dist/binary.test.d.ts.map | 1 - .../node_modules/lib0/dist/binding.cjs | 484 - .../node_modules/lib0/dist/binding.cjs.map | 1 - .../lib0/dist/broadcastchannel-aca4f606.cjs | 128 - .../dist/broadcastchannel-aca4f606.cjs.map | 1 - .../lib0/dist/broadcastchannel.cjs | 29 - .../lib0/dist/broadcastchannel.cjs.map | 1 - .../lib0/dist/broadcastchannel.d.ts | 8 - .../lib0/dist/broadcastchannel.d.ts.map | 1 - .../lib0/dist/broadcastchannel.test.d.ts | 3 - .../lib0/dist/broadcastchannel.test.d.ts.map | 1 - .../lib0/dist/buffer-3e750729.cjs | 198 - .../lib0/dist/buffer-3e750729.cjs.map | 1 - .../node_modules/lib0/dist/buffer.cjs | 38 - .../node_modules/lib0/dist/buffer.cjs.map | 1 - .../node_modules/lib0/dist/buffer.d.ts | 22 - .../node_modules/lib0/dist/buffer.d.ts.map | 1 - .../node_modules/lib0/dist/buffer.test.d.ts | 6 - .../lib0/dist/buffer.test.d.ts.map | 1 - .../node_modules/lib0/dist/cache.cjs | 223 - .../node_modules/lib0/dist/cache.cjs.map | 1 - .../node_modules/lib0/dist/cache.d.ts | 52 - .../node_modules/lib0/dist/cache.d.ts.map | 1 - .../node_modules/lib0/dist/cache.test.d.ts | 3 - .../lib0/dist/cache.test.d.ts.map | 1 - .../node_modules/lib0/dist/common.cjs | 47 - .../node_modules/lib0/dist/common.cjs.map | 1 - .../node_modules/lib0/dist/component.cjs | 437 - .../node_modules/lib0/dist/component.cjs.map | 1 - .../node_modules/lib0/dist/component.d.ts | 86 - .../node_modules/lib0/dist/component.d.ts.map | 1 - .../lib0/dist/conditions-f5c0c102.cjs | 24 - .../lib0/dist/conditions-f5c0c102.cjs.map | 1 - .../node_modules/lib0/dist/conditions.cjs | 10 - .../node_modules/lib0/dist/conditions.cjs.map | 1 - .../node_modules/lib0/dist/conditions.d.ts | 2 - .../lib0/dist/conditions.d.ts.map | 1 - .../node_modules/lib0/dist/crypto.test.d.ts | 9 - .../lib0/dist/crypto.test.d.ts.map | 1 - .../lib0/dist/crypto/aes-gcm.d.ts | 17 - .../lib0/dist/crypto/aes-gcm.d.ts.map | 1 - .../node_modules/lib0/dist/crypto/common.d.ts | 3 - .../lib0/dist/crypto/common.d.ts.map | 1 - .../node_modules/lib0/dist/crypto/ecdsa.d.ts | 17 - .../lib0/dist/crypto/ecdsa.d.ts.map | 1 - .../node_modules/lib0/dist/crypto/jwt.d.ts | 10 - .../lib0/dist/crypto/jwt.d.ts.map | 1 - .../lib0/dist/crypto/rsa-oaep.d.ts | 13 - .../lib0/dist/crypto/rsa-oaep.d.ts.map | 1 - .../lib0/dist/decoding-76e75827.cjs | 795 -- .../lib0/dist/decoding-76e75827.cjs.map | 1 - .../node_modules/lib0/dist/decoding.cjs | 55 - .../node_modules/lib0/dist/decoding.cjs.map | 1 - .../node_modules/lib0/dist/decoding.d.ts | 165 - .../node_modules/lib0/dist/decoding.d.ts.map | 1 - .../node_modules/lib0/dist/delta.cjs | 2412 ---- .../node_modules/lib0/dist/delta.cjs.map | 1 - .../node_modules/lib0/dist/delta/binding.d.ts | 107 - .../lib0/dist/delta/binding.d.ts.map | 1 - .../lib0/dist/delta/binding.test.d.ts | 5 - .../lib0/dist/delta/binding.test.d.ts.map | 1 - .../lib0/dist/delta/delta-pitch.test.d.ts | 5 - .../lib0/dist/delta/delta-pitch.test.d.ts.map | 1 - .../node_modules/lib0/dist/delta/delta.d.ts | 1008 -- .../lib0/dist/delta/delta.d.ts.map | 1 - .../lib0/dist/delta/delta.test.d.ts | 29 - .../lib0/dist/delta/delta.test.d.ts.map | 1 - .../node_modules/lib0/dist/delta/t3.test.d.ts | 19 - .../lib0/dist/delta/t3.test.d.ts.map | 1 - .../node_modules/lib0/dist/diff-9d236524.cjs | 162 - .../lib0/dist/diff-9d236524.cjs.map | 1 - .../node_modules/lib0/dist/diff.cjs | 18 - .../node_modules/lib0/dist/diff.cjs.map | 1 - .../node_modules/lib0/dist/diff.d.ts | 36 - .../node_modules/lib0/dist/diff.d.ts.map | 1 - .../node_modules/lib0/dist/diff.test.d.ts | 6 - .../node_modules/lib0/dist/diff.test.d.ts.map | 1 - .../node_modules/lib0/dist/diff/patience.d.ts | 16 - .../lib0/dist/diff/patience.d.ts.map | 1 - .../lib0/dist/diff/patience.test.d.ts | 4 - .../lib0/dist/diff/patience.test.d.ts.map | 1 - .../node_modules/lib0/dist/dom-7e625b09.cjs | 371 - .../lib0/dist/dom-7e625b09.cjs.map | 1 - .../node_modules/lib0/dist/dom.cjs | 71 - .../node_modules/lib0/dist/dom.cjs.map | 1 - .../node_modules/lib0/dist/dom.d.ts | 60 - .../node_modules/lib0/dist/dom.d.ts.map | 1 - .../node_modules/lib0/dist/ecdsa.cjs | 130 - .../node_modules/lib0/dist/ecdsa.cjs.map | 1 - .../lib0/dist/encoding-1a745c43.cjs | 1025 -- .../lib0/dist/encoding-1a745c43.cjs.map | 1 - .../node_modules/lib0/dist/encoding.cjs | 54 - .../node_modules/lib0/dist/encoding.cjs.map | 1 - .../node_modules/lib0/dist/encoding.d.ts | 235 - .../node_modules/lib0/dist/encoding.d.ts.map | 1 - .../node_modules/lib0/dist/encoding.test.d.ts | 50 - .../lib0/dist/encoding.test.d.ts.map | 1 - .../lib0/dist/environment-1c97264d.cjs | 180 - .../lib0/dist/environment-1c97264d.cjs.map | 1 - .../node_modules/lib0/dist/environment.cjs | 29 - .../lib0/dist/environment.cjs.map | 1 - .../node_modules/lib0/dist/environment.d.ts | 19 - .../lib0/dist/environment.d.ts.map | 1 - .../node_modules/lib0/dist/equality.cjs | 34 - .../node_modules/lib0/dist/equality.cjs.map | 1 - .../node_modules/lib0/dist/error-0c1f634f.cjs | 53 - .../lib0/dist/error-0c1f634f.cjs.map | 1 - .../node_modules/lib0/dist/error.cjs | 13 - .../node_modules/lib0/dist/error.cjs.map | 1 - .../node_modules/lib0/dist/error.d.ts | 5 - .../node_modules/lib0/dist/error.d.ts.map | 1 - .../lib0/dist/eventloop-a0168106.cjs | 151 - .../lib0/dist/eventloop-a0168106.cjs.map | 1 - .../node_modules/lib0/dist/eventloop.cjs | 19 - .../node_modules/lib0/dist/eventloop.cjs.map | 1 - .../node_modules/lib0/dist/eventloop.d.ts | 16 - .../node_modules/lib0/dist/eventloop.d.ts.map | 1 - .../lib0/dist/eventloop.test.d.ts | 10 - .../lib0/dist/eventloop.test.d.ts.map | 1 - .../node_modules/lib0/dist/fingerprint.cjs | 44 - .../lib0/dist/fingerprint.cjs.map | 1 - .../lib0/dist/function-314580f7.cjs | 223 - .../lib0/dist/function-314580f7.cjs.map | 1 - .../node_modules/lib0/dist/function.cjs | 26 - .../node_modules/lib0/dist/function.cjs.map | 1 - .../node_modules/lib0/dist/function.d.ts | 19 - .../node_modules/lib0/dist/function.d.ts.map | 1 - .../node_modules/lib0/dist/function.test.d.ts | 5 - .../lib0/dist/function.test.d.ts.map | 1 - .../lib0/dist/hash/rabin-gf2-polynomial.d.ts | 45 - .../dist/hash/rabin-gf2-polynomial.d.ts.map | 1 - .../lib0/dist/hash/rabin-uncached.d.ts | 29 - .../lib0/dist/hash/rabin-uncached.d.ts.map | 1 - .../node_modules/lib0/dist/hash/rabin.d.ts | 27 - .../lib0/dist/hash/rabin.d.ts.map | 1 - .../lib0/dist/hash/rabin.test.d.ts | 8 - .../lib0/dist/hash/rabin.test.d.ts.map | 1 - .../node_modules/lib0/dist/hash/sha256.d.ts | 2 - .../lib0/dist/hash/sha256.d.ts.map | 1 - .../lib0/dist/hash/sha256.node.d.ts | 2 - .../lib0/dist/hash/sha256.node.d.ts.map | 1 - .../lib0/dist/hash/sha256.test.d.ts | 7 - .../lib0/dist/hash/sha256.test.d.ts.map | 1 - .../node_modules/lib0/dist/index.cjs | 99 - .../node_modules/lib0/dist/index.cjs.map | 1 - .../node_modules/lib0/dist/index.d.ts | 35 - .../node_modules/lib0/dist/index.d.ts.map | 1 - .../lib0/dist/indexeddb-46d1e737.cjs | 311 - .../lib0/dist/indexeddb-46d1e737.cjs.map | 1 - .../node_modules/lib0/dist/indexeddb.cjs | 37 - .../node_modules/lib0/dist/indexeddb.cjs.map | 1 - .../node_modules/lib0/dist/indexeddb.d.ts | 34 - .../node_modules/lib0/dist/indexeddb.d.ts.map | 1 - .../lib0/dist/indexeddb.test.d.ts | 3 - .../lib0/dist/indexeddb.test.d.ts.map | 1 - .../node_modules/lib0/dist/indexeddbV2.cjs | 288 - .../lib0/dist/indexeddbV2.cjs.map | 1 - .../node_modules/lib0/dist/indexeddbV2.d.ts | 35 - .../lib0/dist/indexeddbV2.d.ts.map | 1 - .../lib0/dist/indexeddbV2.test.d.ts | 3 - .../lib0/dist/indexeddbV2.test.d.ts.map | 1 - .../node_modules/lib0/dist/isomorphic.cjs | 17 - .../node_modules/lib0/dist/isomorphic.cjs.map | 1 - .../lib0/dist/iterator-9fc627c1.cjs | 78 - .../lib0/dist/iterator-9fc627c1.cjs.map | 1 - .../node_modules/lib0/dist/iterator.cjs | 13 - .../node_modules/lib0/dist/iterator.cjs.map | 1 - .../node_modules/lib0/dist/iterator.d.ts | 5 - .../node_modules/lib0/dist/iterator.d.ts.map | 1 - .../node_modules/lib0/dist/json-092190a1.cjs | 34 - .../lib0/dist/json-092190a1.cjs.map | 1 - .../node_modules/lib0/dist/json.cjs | 11 - .../node_modules/lib0/dist/json.cjs.map | 1 - .../node_modules/lib0/dist/json.d.ts | 23 - .../node_modules/lib0/dist/json.d.ts.map | 1 - .../node_modules/lib0/dist/jwt.cjs | 96 - .../node_modules/lib0/dist/jwt.cjs.map | 1 - .../node_modules/lib0/dist/list.cjs | 266 - .../node_modules/lib0/dist/list.cjs.map | 1 - .../node_modules/lib0/dist/list.d.ts | 55 - .../node_modules/lib0/dist/list.d.ts.map | 1 - .../node_modules/lib0/dist/list.test.d.ts | 6 - .../node_modules/lib0/dist/list.test.d.ts.map | 1 - .../node_modules/lib0/dist/logging.cjs | 428 - .../node_modules/lib0/dist/logging.cjs.map | 1 - .../node_modules/lib0/dist/logging.common.cjs | 132 - .../lib0/dist/logging.common.cjs.map | 1 - .../lib0/dist/logging.common.d.ts | 12 - .../lib0/dist/logging.common.d.ts.map | 1 - .../node_modules/lib0/dist/logging.d.ts | 55 - .../node_modules/lib0/dist/logging.d.ts.map | 1 - .../node_modules/lib0/dist/logging.node.cjs | 203 - .../lib0/dist/logging.node.cjs.map | 1 - .../node_modules/lib0/dist/logging.node.d.ts | 14 - .../lib0/dist/logging.node.d.ts.map | 1 - .../node_modules/lib0/dist/logging.test.d.ts | 3 - .../lib0/dist/logging.test.d.ts.map | 1 - .../node_modules/lib0/dist/map-24d263c0.cjs | 139 - .../lib0/dist/map-24d263c0.cjs.map | 1 - .../node_modules/lib0/dist/map.cjs | 15 - .../node_modules/lib0/dist/map.cjs.map | 1 - .../node_modules/lib0/dist/map.d.ts | 8 - .../node_modules/lib0/dist/map.d.ts.map | 1 - .../node_modules/lib0/dist/map.test.d.ts | 4 - .../node_modules/lib0/dist/map.test.d.ts.map | 1 - .../node_modules/lib0/dist/math-96d5e8c4.cjs | 103 - .../lib0/dist/math-96d5e8c4.cjs.map | 1 - .../node_modules/lib0/dist/math.cjs | 26 - .../node_modules/lib0/dist/math.cjs.map | 1 - .../node_modules/lib0/dist/math.d.ts | 23 - .../node_modules/lib0/dist/math.d.ts.map | 1 - .../node_modules/lib0/dist/math.test.d.ts | 3 - .../node_modules/lib0/dist/math.test.d.ts.map | 1 - .../node_modules/lib0/dist/metric.cjs | 83 - .../node_modules/lib0/dist/metric.cjs.map | 1 - .../node_modules/lib0/dist/metric.d.ts | 25 - .../node_modules/lib0/dist/metric.d.ts.map | 1 - .../node_modules/lib0/dist/metric.test.d.ts | 3 - .../lib0/dist/metric.test.d.ts.map | 1 - .../node_modules/lib0/dist/mutex-63f09c81.cjs | 54 - .../lib0/dist/mutex-63f09c81.cjs.map | 1 - .../node_modules/lib0/dist/mutex.cjs | 10 - .../node_modules/lib0/dist/mutex.cjs.map | 1 - .../node_modules/lib0/dist/mutex.d.ts | 3 - .../node_modules/lib0/dist/mutex.d.ts.map | 1 - .../node_modules/lib0/dist/mutex.test.d.ts | 3 - .../lib0/dist/mutex.test.d.ts.map | 1 - .../lib0/dist/number-1fb57bba.cjs | 64 - .../lib0/dist/number-1fb57bba.cjs.map | 1 - .../node_modules/lib0/dist/number.cjs | 20 - .../node_modules/lib0/dist/number.cjs.map | 1 - .../node_modules/lib0/dist/number.d.ts | 10 - .../node_modules/lib0/dist/number.d.ts.map | 1 - .../node_modules/lib0/dist/number.test.d.ts | 4 - .../lib0/dist/number.test.d.ts.map | 1 - .../lib0/dist/object-c0c9435b.cjs | 212 - .../lib0/dist/object-c0c9435b.cjs.map | 1 - .../node_modules/lib0/dist/object.cjs | 27 - .../node_modules/lib0/dist/object.cjs.map | 1 - .../node_modules/lib0/dist/object.d.ts | 72 - .../node_modules/lib0/dist/object.d.ts.map | 1 - .../node_modules/lib0/dist/object.test.d.ts | 6 - .../lib0/dist/object.test.d.ts.map | 1 - .../node_modules/lib0/dist/observable.cjs | 169 - .../node_modules/lib0/dist/observable.cjs.map | 1 - .../node_modules/lib0/dist/observable.d.ts | 86 - .../lib0/dist/observable.d.ts.map | 1 - .../lib0/dist/observable.test.d.ts | 3 - .../lib0/dist/observable.test.d.ts.map | 1 - .../node_modules/lib0/dist/pair-ab022bc3.cjs | 69 - .../lib0/dist/pair-ab022bc3.cjs.map | 1 - .../node_modules/lib0/dist/pair.cjs | 14 - .../node_modules/lib0/dist/pair.cjs.map | 1 - .../node_modules/lib0/dist/pair.d.ts | 22 - .../node_modules/lib0/dist/pair.d.ts.map | 1 - .../node_modules/lib0/dist/pair.test.d.ts | 3 - .../node_modules/lib0/dist/pair.test.d.ts.map | 1 - .../node_modules/lib0/dist/patience.cjs | 236 - .../node_modules/lib0/dist/patience.cjs.map | 1 - .../node_modules/lib0/dist/performance.cjs | 14 - .../lib0/dist/performance.cjs.map | 1 - .../node_modules/lib0/dist/performance.d.ts | 4 - .../lib0/dist/performance.d.ts.map | 1 - .../lib0/dist/performance.node.cjs | 36 - .../lib0/dist/performance.node.cjs.map | 1 - .../lib0/dist/performance.node.d.ts | 14 - .../lib0/dist/performance.node.d.ts.map | 1 - .../node_modules/lib0/dist/pledge.cjs | 308 - .../node_modules/lib0/dist/pledge.cjs.map | 1 - .../node_modules/lib0/dist/pledge.d.ts | 68 - .../node_modules/lib0/dist/pledge.d.ts.map | 1 - .../node_modules/lib0/dist/pledge.test.d.ts | 6 - .../lib0/dist/pledge.test.d.ts.map | 1 - .../node_modules/lib0/dist/prng-37d48618.cjs | 387 - .../lib0/dist/prng-37d48618.cjs.map | 1 - .../node_modules/lib0/dist/prng.cjs | 44 - .../node_modules/lib0/dist/prng.cjs.map | 1 - .../node_modules/lib0/dist/prng.d.ts | 44 - .../node_modules/lib0/dist/prng.d.ts.map | 1 - .../node_modules/lib0/dist/prng.test.d.ts | 6 - .../node_modules/lib0/dist/prng.test.d.ts.map | 1 - .../node_modules/lib0/dist/prng/Mt19937.d.ts | 29 - .../lib0/dist/prng/Mt19937.d.ts.map | 1 - .../lib0/dist/prng/Xoroshiro128plus.d.ts | 27 - .../lib0/dist/prng/Xoroshiro128plus.d.ts.map | 1 - .../lib0/dist/prng/Xorshift32.d.ts | 21 - .../lib0/dist/prng/Xorshift32.d.ts.map | 1 - .../lib0/dist/promise-cda7b9bb.cjs | 145 - .../lib0/dist/promise-cda7b9bb.cjs.map | 1 - .../node_modules/lib0/dist/promise.cjs | 22 - .../node_modules/lib0/dist/promise.cjs.map | 1 - .../node_modules/lib0/dist/promise.d.ts | 22 - .../node_modules/lib0/dist/promise.d.ts.map | 1 - .../node_modules/lib0/dist/promise.test.d.ts | 5 - .../lib0/dist/promise.test.d.ts.map | 1 - .../node_modules/lib0/dist/queue.cjs | 97 - .../node_modules/lib0/dist/queue.cjs.map | 1 - .../node_modules/lib0/dist/queue.d.ts | 34 - .../node_modules/lib0/dist/queue.d.ts.map | 1 - .../node_modules/lib0/dist/queue.test.d.ts | 3 - .../lib0/dist/queue.test.d.ts.map | 1 - .../lib0/dist/rabin-gf2-polynomial.cjs | 440 - .../lib0/dist/rabin-gf2-polynomial.cjs.map | 1 - .../node_modules/lib0/dist/rabin-uncached.cjs | 90 - .../lib0/dist/rabin-uncached.cjs.map | 1 - .../node_modules/lib0/dist/rabin.cjs | 128 - .../node_modules/lib0/dist/rabin.cjs.map | 1 - .../node_modules/lib0/dist/random.cjs | 48 - .../node_modules/lib0/dist/random.cjs.map | 1 - .../node_modules/lib0/dist/random.d.ts | 6 - .../node_modules/lib0/dist/random.d.ts.map | 1 - .../node_modules/lib0/dist/random.test.d.ts | 7 - .../lib0/dist/random.test.d.ts.map | 1 - .../node_modules/lib0/dist/rollup.config.d.ts | 13 - .../lib0/dist/rollup.config.d.ts.map | 1 - .../node_modules/lib0/dist/rsa-oaep.cjs | 112 - .../node_modules/lib0/dist/rsa-oaep.cjs.map | 1 - .../node_modules/lib0/dist/schema.cjs | 1223 -- .../node_modules/lib0/dist/schema.cjs.map | 1 - .../node_modules/lib0/dist/schema.d.ts | 595 - .../node_modules/lib0/dist/schema.d.ts.map | 1 - .../node_modules/lib0/dist/schema.test.d.ts | 15 - .../lib0/dist/schema.test.d.ts.map | 1 - .../node_modules/lib0/dist/set-5b47859e.cjs | 45 - .../lib0/dist/set-5b47859e.cjs.map | 1 - .../node_modules/lib0/dist/set.cjs | 13 - .../node_modules/lib0/dist/set.cjs.map | 1 - .../node_modules/lib0/dist/set.d.ts | 5 - .../node_modules/lib0/dist/set.d.ts.map | 1 - .../node_modules/lib0/dist/set.test.d.ts | 3 - .../node_modules/lib0/dist/set.test.d.ts.map | 1 - .../node_modules/lib0/dist/sha256.cjs | 183 - .../node_modules/lib0/dist/sha256.cjs.map | 1 - .../node_modules/lib0/dist/sha256.node.cjs | 17 - .../lib0/dist/sha256.node.cjs.map | 1 - .../node_modules/lib0/dist/sort-812cc211.cjs | 103 - .../lib0/dist/sort-812cc211.cjs.map | 1 - .../node_modules/lib0/dist/sort.cjs | 13 - .../node_modules/lib0/dist/sort.cjs.map | 1 - .../node_modules/lib0/dist/sort.d.ts | 4 - .../node_modules/lib0/dist/sort.d.ts.map | 1 - .../node_modules/lib0/dist/sort.test.d.ts | 7 - .../node_modules/lib0/dist/sort.test.d.ts.map | 1 - .../lib0/dist/statistics-65f6114b.cjs | 32 - .../lib0/dist/statistics-65f6114b.cjs.map | 1 - .../node_modules/lib0/dist/statistics.cjs | 12 - .../node_modules/lib0/dist/statistics.cjs.map | 1 - .../node_modules/lib0/dist/statistics.d.ts | 3 - .../lib0/dist/statistics.d.ts.map | 1 - .../lib0/dist/statistics.test.d.ts | 3 - .../lib0/dist/statistics.test.d.ts.map | 1 - .../node_modules/lib0/dist/storage.cjs | 81 - .../node_modules/lib0/dist/storage.cjs.map | 1 - .../node_modules/lib0/dist/storage.d.ts | 15 - .../node_modules/lib0/dist/storage.d.ts.map | 1 - .../node_modules/lib0/dist/storage.test.d.ts | 3 - .../lib0/dist/storage.test.d.ts.map | 1 - .../lib0/dist/string-fddc5f8b.cjs | 209 - .../lib0/dist/string-fddc5f8b.cjs.map | 1 - .../node_modules/lib0/dist/string.cjs | 32 - .../node_modules/lib0/dist/string.cjs.map | 1 - .../node_modules/lib0/dist/string.d.ts | 28 - .../node_modules/lib0/dist/string.d.ts.map | 1 - .../node_modules/lib0/dist/string.test.d.ts | 9 - .../lib0/dist/string.test.d.ts.map | 1 - .../lib0/dist/symbol-9c439012.cjs | 29 - .../lib0/dist/symbol-9c439012.cjs.map | 1 - .../node_modules/lib0/dist/symbol.cjs | 11 - .../node_modules/lib0/dist/symbol.cjs.map | 1 - .../node_modules/lib0/dist/symbol.d.ts | 11 - .../node_modules/lib0/dist/symbol.d.ts.map | 1 - .../node_modules/lib0/dist/symbol.test.d.ts | 3 - .../lib0/dist/symbol.test.d.ts.map | 1 - .../node_modules/lib0/dist/testing.cjs | 709 -- .../node_modules/lib0/dist/testing.cjs.map | 1 - .../node_modules/lib0/dist/testing.d.ts | 64 - .../node_modules/lib0/dist/testing.d.ts.map | 1 - .../node_modules/lib0/dist/testing.test.d.ts | 9 - .../lib0/dist/testing.test.d.ts.map | 1 - .../node_modules/lib0/dist/time-d8438852.cjs | 63 - .../lib0/dist/time-d8438852.cjs.map | 1 - .../node_modules/lib0/dist/time.cjs | 14 - .../node_modules/lib0/dist/time.cjs.map | 1 - .../node_modules/lib0/dist/time.d.ts | 9 - .../node_modules/lib0/dist/time.d.ts.map | 1 - .../node_modules/lib0/dist/time.test.d.ts | 4 - .../node_modules/lib0/dist/time.test.d.ts.map | 1 - .../lib0/dist/trait/equality.d.ts | 6 - .../lib0/dist/trait/equality.d.ts.map | 1 - .../lib0/dist/trait/fingerprint.d.ts | 13 - .../lib0/dist/trait/fingerprint.d.ts.map | 1 - .../node_modules/lib0/dist/trait/traits.d.ts | 3 - .../lib0/dist/trait/traits.d.ts.map | 1 - .../lib0/dist/trait/traits.test.d.ts | 5 - .../lib0/dist/trait/traits.test.d.ts.map | 1 - .../node_modules/lib0/dist/traits.cjs | 31 - .../node_modules/lib0/dist/traits.cjs.map | 1 - .../node_modules/lib0/dist/tree-9f3c8837.cjs | 557 - .../lib0/dist/tree-9f3c8837.cjs.map | 1 - .../node_modules/lib0/dist/tree.cjs | 10 - .../node_modules/lib0/dist/tree.cjs.map | 1 - .../node_modules/lib0/dist/tree.d.ts | 96 - .../node_modules/lib0/dist/tree.d.ts.map | 1 - .../node_modules/lib0/dist/tree.test.d.ts | 2 - .../node_modules/lib0/dist/tree.test.d.ts.map | 1 - .../node_modules/lib0/dist/url.cjs | 46 - .../node_modules/lib0/dist/url.cjs.map | 1 - .../node_modules/lib0/dist/url.d.ts | 7 - .../node_modules/lib0/dist/url.d.ts.map | 1 - .../node_modules/lib0/dist/url.test.d.ts | 3 - .../node_modules/lib0/dist/url.test.d.ts.map | 1 - .../node_modules/lib0/dist/webcrypto.cjs | 12 - .../node_modules/lib0/dist/webcrypto.cjs.map | 1 - .../node_modules/lib0/dist/webcrypto.d.ts | 3 - .../node_modules/lib0/dist/webcrypto.d.ts.map | 1 - .../node_modules/lib0/dist/webcrypto.deno.cjs | 12 - .../lib0/dist/webcrypto.deno.cjs.map | 1 - .../lib0/dist/webcrypto.deno.d.ts | 3 - .../lib0/dist/webcrypto.deno.d.ts.map | 1 - .../node_modules/lib0/dist/webcrypto.node.cjs | 12 - .../lib0/dist/webcrypto.node.cjs.map | 1 - .../lib0/dist/webcrypto.node.d.ts | 3 - .../lib0/dist/webcrypto.node.d.ts.map | 1 - .../lib0/dist/webcrypto.react-native.cjs | 20 - .../lib0/dist/webcrypto.react-native.cjs.map | 1 - .../lib0/dist/webcrypto.react-native.d.ts | 3 - .../lib0/dist/webcrypto.react-native.d.ts.map | 1 - .../lib0/dist/websocket-b073d0fc.cjs | 157 - .../lib0/dist/websocket-b073d0fc.cjs.map | 1 - .../node_modules/lib0/dist/websocket.cjs | 17 - .../node_modules/lib0/dist/websocket.cjs.map | 1 - .../node_modules/lib0/dist/websocket.d.ts | 38 - .../node_modules/lib0/dist/websocket.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/dom.d.ts | 60 - .../node_modules/lib0/dom.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/dom.js | 284 - .../node_modules/lib0/encoding.d.ts | 235 - .../node_modules/lib0/encoding.d.ts.map | 1 - .../node_modules/lib0/encoding.js | 938 -- .../node_modules/lib0/encoding.test.d.ts | 50 - .../node_modules/lib0/encoding.test.d.ts.map | 1 - .../node_modules/lib0/environment.d.ts | 19 - .../node_modules/lib0/environment.d.ts.map | 1 - .../node_modules/lib0/environment.js | 152 - .../lib0@0.2.117/node_modules/lib0/error.d.ts | 5 - .../node_modules/lib0/error.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/error.js | 36 - .../node_modules/lib0/eventloop.d.ts | 16 - .../node_modules/lib0/eventloop.d.ts.map | 1 - .../node_modules/lib0/eventloop.js | 128 - .../node_modules/lib0/eventloop.test.d.ts | 10 - .../node_modules/lib0/eventloop.test.d.ts.map | 1 - .../node_modules/lib0/function.d.ts | 19 - .../node_modules/lib0/function.d.ts.map | 1 - .../node_modules/lib0/function.js | 188 - .../node_modules/lib0/function.test.d.ts | 5 - .../node_modules/lib0/function.test.d.ts.map | 1 - .../lib0/hash/rabin-gf2-polynomial.d.ts | 45 - .../lib0/hash/rabin-gf2-polynomial.d.ts.map | 1 - .../lib0/hash/rabin-gf2-polynomial.js | 379 - .../lib0/hash/rabin-uncached.d.ts | 29 - .../lib0/hash/rabin-uncached.d.ts.map | 1 - .../node_modules/lib0/hash/rabin-uncached.js | 68 - .../node_modules/lib0/hash/rabin.d.ts | 27 - .../node_modules/lib0/hash/rabin.d.ts.map | 1 - .../node_modules/lib0/hash/rabin.js | 100 - .../node_modules/lib0/hash/rabin.test.d.ts | 8 - .../lib0/hash/rabin.test.d.ts.map | 1 - .../node_modules/lib0/hash/sha256.d.ts | 2 - .../node_modules/lib0/hash/sha256.d.ts.map | 1 - .../node_modules/lib0/hash/sha256.js | 176 - .../node_modules/lib0/hash/sha256.node.d.ts | 2 - .../lib0/hash/sha256.node.d.ts.map | 1 - .../node_modules/lib0/hash/sha256.node.js | 10 - .../node_modules/lib0/hash/sha256.test.d.ts | 7 - .../lib0/hash/sha256.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/index.d.ts | 35 - .../node_modules/lib0/index.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/index.js | 82 - .../node_modules/lib0/indexeddb.d.ts | 34 - .../node_modules/lib0/indexeddb.d.ts.map | 1 - .../node_modules/lib0/indexeddb.js | 262 - .../node_modules/lib0/indexeddb.test.d.ts | 3 - .../node_modules/lib0/indexeddb.test.d.ts.map | 1 - .../node_modules/lib0/indexeddbV2.d.ts | 35 - .../node_modules/lib0/indexeddbV2.d.ts.map | 1 - .../node_modules/lib0/indexeddbV2.js | 265 - .../node_modules/lib0/indexeddbV2.test.d.ts | 3 - .../lib0/indexeddbV2.test.d.ts.map | 1 - .../node_modules/lib0/isomorphic.js | 10 - .../node_modules/lib0/iterator.d.ts | 5 - .../node_modules/lib0/iterator.d.ts.map | 1 - .../node_modules/lib0/iterator.js | 61 - .../lib0@0.2.117/node_modules/lib0/json.d.ts | 23 - .../node_modules/lib0/json.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/json.js | 21 - .../lib0@0.2.117/node_modules/lib0/list.d.ts | 55 - .../node_modules/lib0/list.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/list.js | 243 - .../node_modules/lib0/list.test.d.ts | 6 - .../node_modules/lib0/list.test.d.ts.map | 1 - .../node_modules/lib0/logging.common.d.ts | 12 - .../node_modules/lib0/logging.common.d.ts.map | 1 - .../node_modules/lib0/logging.common.js | 105 - .../node_modules/lib0/logging.d.ts | 55 - .../node_modules/lib0/logging.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/logging.js | 383 - .../node_modules/lib0/logging.node.d.ts | 14 - .../node_modules/lib0/logging.node.d.ts.map | 1 - .../node_modules/lib0/logging.node.js | 164 - .../node_modules/lib0/logging.test.d.ts | 3 - .../node_modules/lib0/logging.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/map.d.ts | 8 - .../node_modules/lib0/map.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/map.js | 118 - .../node_modules/lib0/map.test.d.ts | 4 - .../node_modules/lib0/map.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/math.d.ts | 23 - .../node_modules/lib0/math.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/math.js | 60 - .../node_modules/lib0/math.test.d.ts | 3 - .../node_modules/lib0/math.test.d.ts.map | 1 - .../node_modules/lib0/metric.d.ts | 25 - .../node_modules/lib0/metric.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/metric.js | 56 - .../node_modules/lib0/metric.test.d.ts | 3 - .../node_modules/lib0/metric.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/mutex.d.ts | 3 - .../node_modules/lib0/mutex.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/mutex.js | 43 - .../node_modules/lib0/mutex.test.d.ts | 3 - .../node_modules/lib0/mutex.test.d.ts.map | 1 - .../node_modules/.bin/0ecdsa-generate-keypair | 21 - .../lib0/node_modules/.bin/0gentesthtml | 21 - .../lib0/node_modules/.bin/0serve | 21 - .../node_modules/lib0/number.d.ts | 10 - .../node_modules/lib0/number.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/number.js | 37 - .../node_modules/lib0/number.test.d.ts | 4 - .../node_modules/lib0/number.test.d.ts.map | 1 - .../node_modules/lib0/object.d.ts | 72 - .../node_modules/lib0/object.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/object.js | 169 - .../node_modules/lib0/object.test.d.ts | 6 - .../node_modules/lib0/object.test.d.ts.map | 1 - .../node_modules/lib0/observable.d.ts | 86 - .../node_modules/lib0/observable.d.ts.map | 1 - .../node_modules/lib0/observable.js | 161 - .../node_modules/lib0/observable.test.d.ts | 3 - .../lib0/observable.test.d.ts.map | 1 - .../node_modules/lib0/package.json | 556 - .../lib0@0.2.117/node_modules/lib0/pair.d.ts | 22 - .../node_modules/lib0/pair.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/pair.js | 50 - .../node_modules/lib0/pair.test.d.ts | 3 - .../node_modules/lib0/pair.test.d.ts.map | 1 - .../node_modules/lib0/performance.d.ts | 4 - .../node_modules/lib0/performance.d.ts.map | 1 - .../node_modules/lib0/performance.js | 5 - .../node_modules/lib0/performance.node.d.ts | 14 - .../lib0/performance.node.d.ts.map | 1 - .../node_modules/lib0/performance.node.js | 21 - .../node_modules/lib0/pledge.d.ts | 68 - .../node_modules/lib0/pledge.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/pledge.js | 292 - .../node_modules/lib0/pledge.test.d.ts | 6 - .../node_modules/lib0/pledge.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/prng.d.ts | 44 - .../node_modules/lib0/prng.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/prng.js | 200 - .../node_modules/lib0/prng.test.d.ts | 6 - .../node_modules/lib0/prng.test.d.ts.map | 1 - .../node_modules/lib0/prng/Mt19937.d.ts | 29 - .../node_modules/lib0/prng/Mt19937.d.ts.map | 1 - .../node_modules/lib0/prng/Mt19937.js | 78 - .../lib0/prng/Xoroshiro128plus.d.ts | 27 - .../lib0/prng/Xoroshiro128plus.d.ts.map | 1 - .../lib0/prng/Xoroshiro128plus.js | 111 - .../node_modules/lib0/prng/Xorshift32.d.ts | 21 - .../lib0/prng/Xorshift32.d.ts.map | 1 - .../node_modules/lib0/prng/Xorshift32.js | 35 - .../node_modules/lib0/promise.d.ts | 22 - .../node_modules/lib0/promise.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/promise.js | 116 - .../node_modules/lib0/promise.test.d.ts | 5 - .../node_modules/lib0/promise.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/queue.d.ts | 34 - .../node_modules/lib0/queue.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/queue.js | 84 - .../node_modules/lib0/queue.test.d.ts | 3 - .../node_modules/lib0/queue.test.d.ts.map | 1 - .../node_modules/lib0/random.d.ts | 6 - .../node_modules/lib0/random.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/random.js | 37 - .../node_modules/lib0/random.test.d.ts | 7 - .../node_modules/lib0/random.test.d.ts.map | 1 - .../node_modules/lib0/rollup.config.d.ts | 13 - .../node_modules/lib0/rollup.config.d.ts.map | 1 - .../node_modules/lib0/schema.d.ts | 595 - .../node_modules/lib0/schema.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/schema.js | 1136 -- .../node_modules/lib0/schema.test.d.ts | 15 - .../node_modules/lib0/schema.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/set.d.ts | 5 - .../node_modules/lib0/set.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/set.js | 28 - .../node_modules/lib0/set.test.d.ts | 3 - .../node_modules/lib0/set.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/sort.d.ts | 4 - .../node_modules/lib0/sort.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/sort.js | 88 - .../node_modules/lib0/sort.test.d.ts | 7 - .../node_modules/lib0/sort.test.d.ts.map | 1 - .../node_modules/lib0/statistics.d.ts | 3 - .../node_modules/lib0/statistics.d.ts.map | 1 - .../node_modules/lib0/statistics.js | 19 - .../node_modules/lib0/statistics.test.d.ts | 3 - .../lib0/statistics.test.d.ts.map | 1 - .../node_modules/lib0/storage.d.ts | 15 - .../node_modules/lib0/storage.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/storage.js | 72 - .../node_modules/lib0/storage.test.d.ts | 3 - .../node_modules/lib0/storage.test.d.ts.map | 1 - .../node_modules/lib0/string.d.ts | 28 - .../node_modules/lib0/string.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/string.js | 165 - .../node_modules/lib0/string.test.d.ts | 9 - .../node_modules/lib0/string.test.d.ts.map | 1 - .../node_modules/lib0/symbol.d.ts | 11 - .../node_modules/lib0/symbol.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/symbol.js | 16 - .../node_modules/lib0/symbol.test.d.ts | 3 - .../node_modules/lib0/symbol.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/test.d.ts | 2 - .../node_modules/lib0/test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/test.html | 168 - .../lib0@0.2.117/node_modules/lib0/test.js | 104 - .../node_modules/lib0/testing.d.ts | 64 - .../node_modules/lib0/testing.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/testing.js | 646 - .../node_modules/lib0/testing.test.d.ts | 9 - .../node_modules/lib0/testing.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/time.d.ts | 9 - .../node_modules/lib0/time.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/time.js | 48 - .../node_modules/lib0/time.test.d.ts | 4 - .../node_modules/lib0/time.test.d.ts.map | 1 - .../node_modules/lib0/trait/equality.d.ts | 6 - .../node_modules/lib0/trait/equality.d.ts.map | 1 - .../node_modules/lib0/trait/equality.js | 26 - .../node_modules/lib0/trait/fingerprint.d.ts | 13 - .../lib0/trait/fingerprint.d.ts.map | 1 - .../node_modules/lib0/trait/fingerprint.js | 21 - .../node_modules/lib0/trait/traits.d.ts | 3 - .../node_modules/lib0/trait/traits.d.ts.map | 1 - .../node_modules/lib0/trait/traits.js | 2 - .../node_modules/lib0/trait/traits.test.d.ts | 5 - .../lib0/trait/traits.test.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/tree.d.ts | 96 - .../node_modules/lib0/tree.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/tree.js | 546 - .../node_modules/lib0/tree.test.d.ts | 2 - .../node_modules/lib0/tree.test.d.ts.map | 1 - .../types/bin/0ecdsa-generate-keypair.d.ts | 3 - .../bin/0ecdsa-generate-keypair.d.ts.map | 1 - .../node_modules/lib0/types/bin/0serve.d.ts | 3 - .../lib0/types/bin/0serve.d.ts.map | 1 - .../node_modules/lib0/types/bin/gendocs.d.ts | 3 - .../lib0/types/bin/gendocs.d.ts.map | 1 - .../lib0/types/bin/gentesthtml.d.ts | 3 - .../lib0/types/bin/gentesthtml.d.ts.map | 1 - .../lib0/types/crypto/aes-gcm.d.ts | 17 - .../lib0/types/crypto/aes-gcm.d.ts.map | 1 - .../lib0/types/crypto/common.d.ts | 3 - .../lib0/types/crypto/common.d.ts.map | 1 - .../node_modules/lib0/types/crypto/ecdsa.d.ts | 17 - .../lib0/types/crypto/ecdsa.d.ts.map | 1 - .../node_modules/lib0/types/crypto/jwt.d.ts | 10 - .../lib0/types/crypto/jwt.d.ts.map | 1 - .../lib0/types/crypto/rsa-oaep.d.ts | 13 - .../lib0/types/crypto/rsa-oaep.d.ts.map | 1 - .../lib0/types/delta/binding.d.ts | 107 - .../lib0/types/delta/binding.d.ts.map | 1 - .../node_modules/lib0/types/delta/delta.d.ts | 1074 -- .../lib0/types/delta/delta.d.ts.map | 1 - .../lib0/types/delta/t3.test.d.ts | 19 - .../lib0/types/delta/t3.test.d.ts.map | 1 - .../lib0/types/diff/patience.d.ts | 16 - .../lib0/types/diff/patience.d.ts.map | 1 - .../lib0/types/hash/rabin-gf2-polynomial.d.ts | 45 - .../types/hash/rabin-gf2-polynomial.d.ts.map | 1 - .../lib0/types/hash/rabin-uncached.d.ts | 29 - .../lib0/types/hash/rabin-uncached.d.ts.map | 1 - .../node_modules/lib0/types/hash/rabin.d.ts | 27 - .../lib0/types/hash/rabin.d.ts.map | 1 - .../node_modules/lib0/types/hash/sha256.d.ts | 2 - .../lib0/types/hash/sha256.d.ts.map | 1 - .../lib0/types/hash/sha256.node.d.ts | 2 - .../lib0/types/hash/sha256.node.d.ts.map | 1 - .../node_modules/lib0/types/prng/Mt19937.d.ts | 29 - .../lib0/types/prng/Mt19937.d.ts.map | 1 - .../lib0/types/prng/Xoroshiro128plus.d.ts | 27 - .../lib0/types/prng/Xoroshiro128plus.d.ts.map | 1 - .../lib0/types/prng/Xorshift32.d.ts | 21 - .../lib0/types/prng/Xorshift32.d.ts.map | 1 - .../lib0/types/trait/equality.d.ts | 6 - .../lib0/types/trait/equality.d.ts.map | 1 - .../lib0/types/trait/fingerprint.d.ts | 13 - .../lib0/types/trait/fingerprint.d.ts.map | 1 - .../node_modules/lib0/types/trait/traits.d.ts | 3 - .../lib0/types/trait/traits.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/url.d.ts | 7 - .../node_modules/lib0/url.d.ts.map | 1 - .../lib0@0.2.117/node_modules/lib0/url.js | 37 - .../node_modules/lib0/url.test.d.ts | 3 - .../node_modules/lib0/url.test.d.ts.map | 1 - .../node_modules/lib0/webcrypto.d.ts | 3 - .../node_modules/lib0/webcrypto.d.ts.map | 1 - .../node_modules/lib0/webcrypto.deno.d.ts | 3 - .../node_modules/lib0/webcrypto.deno.d.ts.map | 1 - .../node_modules/lib0/webcrypto.deno.js | 4 - .../node_modules/lib0/webcrypto.js | 4 - .../node_modules/lib0/webcrypto.node.d.ts | 3 - .../node_modules/lib0/webcrypto.node.d.ts.map | 1 - .../node_modules/lib0/webcrypto.node.js | 4 - .../lib0/webcrypto.react-native.d.ts | 3 - .../lib0/webcrypto.react-native.d.ts.map | 1 - .../lib0/webcrypto.react-native.js | 7 - .../node_modules/lib0/websocket.d.ts | 38 - .../node_modules/lib0/websocket.d.ts.map | 1 - .../node_modules/lib0/websocket.js | 154 - .../node_modules/linkifyjs/LICENSE | 19 - .../node_modules/linkifyjs/README.md | 47 - .../node_modules/linkifyjs/dist/linkify.cjs | 1854 --- .../node_modules/linkifyjs/dist/linkify.d.cts | 637 - .../node_modules/linkifyjs/dist/linkify.d.mts | 637 - .../node_modules/linkifyjs/dist/linkify.js | 1859 --- .../linkifyjs/dist/linkify.min.js | 1 - .../node_modules/linkifyjs/dist/linkify.mjs | 1836 --- .../node_modules/linkifyjs/package.json | 38 - .../hocuspocus/node_modules/.pnpm/lock.yaml | 548 - .../node_modules/lru-cache/LICENSE | 15 - .../node_modules/lru-cache/README.md | 166 - .../node_modules/lru-cache/index.js | 334 - .../node_modules/lru-cache/package.json | 34 - .../lru-cache@6.0.0/node_modules/yallist | 1 - .../node_modules/agentkeepalive | 1 - .../node_modules/cacache | 1 - .../node_modules/http-cache-semantics | 1 - .../node_modules/http-proxy-agent | 1 - .../node_modules/https-proxy-agent | 1 - .../node_modules/is-lambda | 1 - .../node_modules/lru-cache | 1 - .../node_modules/make-fetch-happen/LICENSE | 16 - .../node_modules/make-fetch-happen/README.md | 395 - .../make-fetch-happen/lib/agent.js | 194 - .../make-fetch-happen/lib/cache/entry.js | 460 - .../make-fetch-happen/lib/cache/errors.js | 10 - .../make-fetch-happen/lib/cache/index.js | 45 - .../make-fetch-happen/lib/cache/key.js | 17 - .../make-fetch-happen/lib/cache/policy.js | 161 - .../make-fetch-happen/lib/fetch.js | 100 - .../make-fetch-happen/lib/index.js | 40 - .../make-fetch-happen/lib/options.js | 44 - .../make-fetch-happen/lib/remote.js | 102 - .../make-fetch-happen/package.json | 76 - .../node_modules/minipass | 1 - .../node_modules/minipass-collect | 1 - .../node_modules/minipass-fetch | 1 - .../node_modules/minipass-flush | 1 - .../node_modules/minipass-pipeline | 1 - .../node_modules/negotiator | 1 - .../node_modules/promise-retry | 1 - .../node_modules/socks-proxy-agent | 1 - .../make-fetch-happen@9.1.0/node_modules/ssri | 1 - .../node_modules/mimic-response/index.d.ts | 17 - .../node_modules/mimic-response/index.js | 77 - .../node_modules/mimic-response/license | 9 - .../node_modules/mimic-response/package.json | 42 - .../node_modules/mimic-response/readme.md | 78 - .../node_modules/brace-expansion | 1 - .../node_modules/minimatch/LICENSE | 15 - .../node_modules/minimatch/README.md | 267 - .../node_modules/minimatch/minimatch.js | 1005 -- .../node_modules/minimatch/package.json | 33 - .../node_modules/minimist/.eslintrc | 29 - .../node_modules/minimist/.github/FUNDING.yml | 12 - .../node_modules/minimist/.nycrc | 14 - .../node_modules/minimist/CHANGELOG.md | 298 - .../node_modules/minimist/LICENSE | 18 - .../node_modules/minimist/README.md | 121 - .../node_modules/minimist/example/parse.js | 4 - .../node_modules/minimist/index.js | 263 - .../node_modules/minimist/package.json | 75 - .../node_modules/minimist/test/all_bool.js | 34 - .../node_modules/minimist/test/bool.js | 177 - .../node_modules/minimist/test/dash.js | 43 - .../minimist/test/default_bool.js | 37 - .../node_modules/minimist/test/dotted.js | 24 - .../node_modules/minimist/test/kv_short.js | 32 - .../node_modules/minimist/test/long.js | 33 - .../node_modules/minimist/test/num.js | 38 - .../node_modules/minimist/test/parse.js | 209 - .../minimist/test/parse_modified.js | 11 - .../node_modules/minimist/test/proto.js | 64 - .../node_modules/minimist/test/short.js | 69 - .../node_modules/minimist/test/stop_early.js | 17 - .../node_modules/minimist/test/unknown.js | 104 - .../node_modules/minimist/test/whitespace.js | 10 - .../node_modules/minipass | 1 - .../node_modules/minipass-collect/LICENSE | 15 - .../node_modules/minipass-collect/README.md | 48 - .../node_modules/minipass-collect/index.js | 71 - .../minipass-collect/package.json | 29 - .../node_modules/encoding | 1 - .../node_modules/minipass | 1 - .../node_modules/minipass-fetch/LICENSE | 28 - .../node_modules/minipass-fetch/README.md | 29 - .../node_modules/minipass-fetch/index.js | 1 - .../minipass-fetch/lib/abort-error.js | 17 - .../node_modules/minipass-fetch/lib/blob.js | 97 - .../node_modules/minipass-fetch/lib/body.js | 334 - .../minipass-fetch/lib/fetch-error.js | 31 - .../minipass-fetch/lib/headers.js | 250 - .../node_modules/minipass-fetch/lib/index.js | 341 - .../minipass-fetch/lib/request.js | 263 - .../minipass-fetch/lib/response.js | 89 - .../node_modules/minipass-fetch/package.json | 53 - .../node_modules/minipass-sized | 1 - .../node_modules/minizlib | 1 - .../node_modules/minipass | 1 - .../node_modules/minipass-flush/LICENSE.md | 55 - .../node_modules/minipass-flush/README.md | 47 - .../node_modules/minipass-flush/index.js | 39 - .../node_modules/minipass-flush/package.json | 42 - .../node_modules/minipass | 1 - .../node_modules/minipass-pipeline/LICENSE | 15 - .../node_modules/minipass-pipeline/README.md | 69 - .../node_modules/minipass-pipeline/index.js | 128 - .../minipass-pipeline/package.json | 29 - .../node_modules/minipass | 1 - .../node_modules/minipass-sized/.gitignore | 22 - .../node_modules/minipass-sized/LICENSE | 15 - .../node_modules/minipass-sized/README.md | 28 - .../node_modules/minipass-sized/index.js | 67 - .../minipass-sized/package-lock.json | 3464 ----- .../node_modules/minipass-sized/package.json | 39 - .../node_modules/minipass-sized/test/basic.js | 83 - .../node_modules/minipass/LICENSE | 15 - .../node_modules/minipass/README.md | 728 -- .../node_modules/minipass/index.d.ts | 155 - .../node_modules/minipass/index.js | 649 - .../node_modules/minipass/package.json | 56 - .../.pnpm/minipass@3.3.6/node_modules/yallist | 1 - .../node_modules/minipass/LICENSE | 15 - .../node_modules/minipass/README.md | 769 -- .../node_modules/minipass/index.d.ts | 152 - .../node_modules/minipass/index.js | 702 -- .../node_modules/minipass/index.mjs | 702 -- .../node_modules/minipass/package.json | 76 - .../minizlib@2.1.2/node_modules/minipass | 1 - .../node_modules/minizlib/LICENSE | 26 - .../node_modules/minizlib/README.md | 60 - .../node_modules/minizlib/constants.js | 115 - .../node_modules/minizlib/index.js | 348 - .../node_modules/minizlib/package.json | 42 - .../.pnpm/minizlib@2.1.2/node_modules/yallist | 1 - .../node_modules/mkdirp-classic/LICENSE | 21 - .../node_modules/mkdirp-classic/README.md | 18 - .../node_modules/mkdirp-classic/index.js | 98 - .../node_modules/mkdirp-classic/package.json | 18 - .../node_modules/mkdirp/CHANGELOG.md | 15 - .../mkdirp@1.0.4/node_modules/mkdirp/LICENSE | 21 - .../node_modules/mkdirp/bin/cmd.js | 68 - .../mkdirp@1.0.4/node_modules/mkdirp/index.js | 31 - .../node_modules/mkdirp/lib/find-made.js | 29 - .../node_modules/mkdirp/lib/mkdirp-manual.js | 64 - .../node_modules/mkdirp/lib/mkdirp-native.js | 39 - .../node_modules/mkdirp/lib/opts-arg.js | 23 - .../node_modules/mkdirp/lib/path-arg.js | 29 - .../node_modules/mkdirp/lib/use-native.js | 10 - .../mkdirp/node_modules/.bin/mkdirp | 21 - .../node_modules/mkdirp/package.json | 44 - .../node_modules/mkdirp/readme.markdown | 266 - .../.pnpm/ms@2.1.3/node_modules/ms/index.js | 162 - .../.pnpm/ms@2.1.3/node_modules/ms/license.md | 21 - .../ms@2.1.3/node_modules/ms/package.json | 38 - .../.pnpm/ms@2.1.3/node_modules/ms/readme.md | 59 - .../.github/workflows/run-npm-tests.yml | 31 - .../node_modules/napi-build-utils/LICENSE | 21 - .../node_modules/napi-build-utils/README.md | 52 - .../node_modules/napi-build-utils/index.js | 214 - .../node_modules/napi-build-utils/index.md | 0 .../napi-build-utils/package.json | 42 - .../node_modules/negotiator/HISTORY.md | 113 - .../node_modules/negotiator/LICENSE | 24 - .../node_modules/negotiator/README.md | 212 - .../node_modules/negotiator/index.js | 82 - .../node_modules/negotiator/lib/charset.js | 169 - .../node_modules/negotiator/lib/encoding.js | 205 - .../node_modules/negotiator/lib/language.js | 179 - .../node_modules/negotiator/lib/mediaType.js | 294 - .../node_modules/negotiator/package.json | 42 - .../node_modules/node-abi/LICENSE | 21 - .../node_modules/node-abi/README.md | 54 - .../node_modules/node-abi/abi_registry.json | 446 - .../node_modules/node-abi/index.js | 179 - .../node-abi/node_modules/.bin/semver | 21 - .../node_modules/node-abi/package.json | 45 - .../.pnpm/node-abi@3.92.0/node_modules/semver | 1 - .../node_modules/node-addon-api/LICENSE.md | 9 - .../node_modules/node-addon-api/README.md | 319 - .../node_modules/node-addon-api/common.gypi | 20 - .../node_modules/node-addon-api/except.gypi | 25 - .../node_modules/node-addon-api/index.js | 12 - .../node-addon-api/napi-inl.deprecated.h | 186 - .../node_modules/node-addon-api/napi-inl.h | 6607 ---------- .../node_modules/node-addon-api/napi.h | 3201 ----- .../node-addon-api/node_addon_api.gyp | 32 - .../node_modules/node-addon-api/node_api.gyp | 9 - .../node_modules/node-addon-api/noexcept.gypi | 26 - .../node_modules/node-addon-api/nothing.c | 0 .../node-addon-api/package-support.json | 21 - .../node_modules/node-addon-api/package.json | 480 - .../node-addon-api/tools/README.md | 73 - .../node-addon-api/tools/check-napi.js | 99 - .../node-addon-api/tools/clang-format.js | 71 - .../node-addon-api/tools/conversion.js | 301 - .../node-addon-api/tools/eslint-format.js | 79 - .../node-gyp@8.4.1/node_modules/env-paths | 1 - .../.pnpm/node-gyp@8.4.1/node_modules/glob | 1 - .../node-gyp@8.4.1/node_modules/graceful-fs | 1 - .../node_modules/make-fetch-happen | 1 - .../node-gyp/.github/ISSUE_TEMPLATE.md | 52 - .../node-gyp/.github/PULL_REQUEST_TEMPLATE.md | 17 - .../.github/workflows/release-please.yml | 56 - .../node-gyp/.github/workflows/tests.yml | 45 - .../.github/workflows/visual-studio.yml | 25 - .../node_modules/node-gyp/CHANGELOG.md | 687 - .../node_modules/node-gyp/CONTRIBUTING.md | 34 - .../node_modules/node-gyp/LICENSE | 24 - .../node_modules/node-gyp/README.md | 256 - .../node_modules/node-gyp/addon.gypi | 185 - .../node_modules/node-gyp/bin/node-gyp.js | 140 - .../node-gyp/docs/Common-issues.md | 14 - ...re-versions-of-node-cannot-be-installed.md | 94 - .../node_modules/node-gyp/docs/Home.md | 7 - .../node-gyp/docs/Linking-to-OpenSSL.md | 86 - .../docs/Updating-npm-bundled-node-gyp.md | 45 - .../docs/binding.gyp-files-in-the-wild.md | 48 - .../node_modules/node-gyp/gyp/.flake8 | 4 - .../gyp/.github/workflows/Python_tests.yml | 30 - .../gyp/.github/workflows/node-gyp.yml | 42 - .../gyp/.github/workflows/nodejs-windows.yml | 27 - .../gyp/.github/workflows/release-please.yml | 16 - .../node_modules/node-gyp/gyp/AUTHORS | 16 - .../node_modules/node-gyp/gyp/CHANGELOG.md | 177 - .../node-gyp/gyp/CODE_OF_CONDUCT.md | 4 - .../node_modules/node-gyp/gyp/CONTRIBUTING.md | 32 - .../node_modules/node-gyp/gyp/LICENSE | 28 - .../node_modules/node-gyp/gyp/README.md | 7 - .../node-gyp/gyp/data/win/large-pdb-shim.cc | 12 - .../node_modules/node-gyp/gyp/gyp | 8 - .../node_modules/node-gyp/gyp/gyp.bat | 5 - .../node_modules/node-gyp/gyp/gyp_main.py | 45 - .../node-gyp/gyp/pylib/gyp/MSVSNew.py | 367 - .../node-gyp/gyp/pylib/gyp/MSVSProject.py | 206 - .../node-gyp/gyp/pylib/gyp/MSVSSettings.py | 1270 -- .../gyp/pylib/gyp/MSVSSettings_test.py | 1547 --- .../node-gyp/gyp/pylib/gyp/MSVSToolFile.py | 59 - .../node-gyp/gyp/pylib/gyp/MSVSUserFile.py | 153 - .../node-gyp/gyp/pylib/gyp/MSVSUtil.py | 271 - .../node-gyp/gyp/pylib/gyp/MSVSVersion.py | 574 - .../node-gyp/gyp/pylib/gyp/__init__.py | 666 - .../node-gyp/gyp/pylib/gyp/common.py | 654 - .../node-gyp/gyp/pylib/gyp/common_test.py | 78 - .../node-gyp/gyp/pylib/gyp/easy_xml.py | 165 - .../node-gyp/gyp/pylib/gyp/easy_xml_test.py | 109 - .../node-gyp/gyp/pylib/gyp/flock_tool.py | 55 - .../gyp/pylib/gyp/generator/__init__.py | 0 .../gyp/pylib/gyp/generator/analyzer.py | 808 -- .../gyp/pylib/gyp/generator/android.py | 1173 -- .../node-gyp/gyp/pylib/gyp/generator/cmake.py | 1321 -- .../gyp/generator/compile_commands_json.py | 120 - .../gyp/generator/dump_dependency_json.py | 103 - .../gyp/pylib/gyp/generator/eclipse.py | 464 - .../node-gyp/gyp/pylib/gyp/generator/gypd.py | 89 - .../node-gyp/gyp/pylib/gyp/generator/gypsh.py | 58 - .../node-gyp/gyp/pylib/gyp/generator/make.py | 2518 ---- .../node-gyp/gyp/pylib/gyp/generator/msvs.py | 3978 ------ .../gyp/pylib/gyp/generator/msvs_test.py | 44 - .../node-gyp/gyp/pylib/gyp/generator/ninja.py | 2936 ----- .../gyp/pylib/gyp/generator/ninja_test.py | 55 - .../node-gyp/gyp/pylib/gyp/generator/xcode.py | 1394 --- .../gyp/pylib/gyp/generator/xcode_test.py | 25 - .../node-gyp/gyp/pylib/gyp/input.py | 3137 ----- .../node-gyp/gyp/pylib/gyp/input_test.py | 98 - .../node-gyp/gyp/pylib/gyp/mac_tool.py | 771 -- .../node-gyp/gyp/pylib/gyp/msvs_emulation.py | 1271 -- .../node-gyp/gyp/pylib/gyp/ninja_syntax.py | 174 - .../node-gyp/gyp/pylib/gyp/simple_copy.py | 61 - .../node-gyp/gyp/pylib/gyp/win_tool.py | 374 - .../node-gyp/gyp/pylib/gyp/xcode_emulation.py | 1939 --- .../node-gyp/gyp/pylib/gyp/xcode_ninja.py | 302 - .../node-gyp/gyp/pylib/gyp/xcodeproj_file.py | 3197 ----- .../node-gyp/gyp/pylib/gyp/xml_fix.py | 65 - .../node-gyp/gyp/requirements_dev.txt | 2 - .../node_modules/node-gyp/gyp/setup.py | 42 - .../node_modules/node-gyp/gyp/test_gyp.py | 260 - .../node_modules/node-gyp/gyp/tools/README | 15 - .../node-gyp/gyp/tools/Xcode/README | 5 - .../tools/Xcode/Specifications/gyp.pbfilespec | 27 - .../tools/Xcode/Specifications/gyp.xclangspec | 226 - .../node-gyp/gyp/tools/emacs/README | 12 - .../node-gyp/gyp/tools/emacs/gyp-tests.el | 63 - .../node-gyp/gyp/tools/emacs/gyp.el | 275 - .../gyp/tools/emacs/run-unit-tests.sh | 7 - .../gyp/tools/emacs/testdata/media.gyp | 1105 -- .../tools/emacs/testdata/media.gyp.fontified | 1107 -- .../node-gyp/gyp/tools/graphviz.py | 102 - .../node-gyp/gyp/tools/pretty_gyp.py | 156 - .../node-gyp/gyp/tools/pretty_sln.py | 181 - .../node-gyp/gyp/tools/pretty_vcproj.py | 339 - .../node-gyp/lib/Find-VisualStudio.cs | 250 - .../node_modules/node-gyp/lib/build.js | 204 - .../node_modules/node-gyp/lib/clean.js | 15 - .../node_modules/node-gyp/lib/configure.js | 294 - .../node-gyp/lib/create-config-gypi.js | 146 - .../node-gyp/lib/find-node-directory.js | 63 - .../node_modules/node-gyp/lib/find-python.js | 344 - .../node-gyp/lib/find-visualstudio.js | 446 - .../node_modules/node-gyp/lib/install.js | 376 - .../node_modules/node-gyp/lib/list.js | 27 - .../node_modules/node-gyp/lib/node-gyp.js | 211 - .../node-gyp/lib/process-release.js | 147 - .../node_modules/node-gyp/lib/rebuild.js | 13 - .../node_modules/node-gyp/lib/remove.js | 46 - .../node_modules/node-gyp/lib/util.js | 64 - .../node_modules/node-gyp/macOS_Catalina.md | 104 - .../node-gyp/macOS_Catalina_acid_test.sh | 21 - .../node-gyp/node_modules/.bin/node-gyp | 21 - .../node-gyp/node_modules/.bin/node-which | 21 - .../node-gyp/node_modules/.bin/nopt | 21 - .../node-gyp/node_modules/.bin/rimraf | 21 - .../node-gyp/node_modules/.bin/semver | 21 - .../node_modules/node-gyp/package.json | 50 - .../node-gyp/src/win_delay_load_hook.cc | 39 - .../node_modules/node-gyp/test/common.js | 3 - .../fixtures/VS_2017_BuildTools_minimal.txt | 1 - .../fixtures/VS_2017_Community_workload.txt | 1 - .../test/fixtures/VS_2017_Express.txt | 1 - .../test/fixtures/VS_2017_Unusable.txt | 1 - .../fixtures/VS_2019_BuildTools_minimal.txt | 1 - .../fixtures/VS_2019_Community_workload.txt | 1 - .../test/fixtures/VS_2019_Preview.txt | 1 - .../node-gyp/test/fixtures/ca-bundle.crt | 40 - .../node-gyp/test/fixtures/ca.crt | 21 - .../fixtures/nodedir/include/node/config.gypi | 6 - .../node-gyp/test/fixtures/server.crt | 21 - .../node-gyp/test/fixtures/server.key | 27 - .../node-gyp/test/fixtures/test-charmap.py | 31 - .../node-gyp/test/process-exec-sync.js | 140 - .../node-gyp/test/simple-proxy.js | 27 - .../node_modules/node-gyp/test/test-addon.js | 150 - .../node-gyp/test/test-configure-python.js | 82 - .../node-gyp/test/test-create-config-gypi.js | 70 - .../node-gyp/test/test-download.js | 207 - .../test/test-find-accessible-sync.js | 84 - .../node-gyp/test/test-find-node-directory.js | 119 - .../node-gyp/test/test-find-python.js | 226 - .../node-gyp/test/test-find-visualstudio.js | 676 - .../node-gyp/test/test-install.js | 46 - .../node-gyp/test/test-options.js | 31 - .../node-gyp/test/test-process-release.js | 434 - .../node_modules/node-gyp/update-gyp.py | 46 - .../.pnpm/node-gyp@8.4.1/node_modules/nopt | 1 - .../.pnpm/node-gyp@8.4.1/node_modules/npmlog | 1 - .../.pnpm/node-gyp@8.4.1/node_modules/rimraf | 1 - .../.pnpm/node-gyp@8.4.1/node_modules/semver | 1 - .../.pnpm/node-gyp@8.4.1/node_modules/tar | 1 - .../.pnpm/node-gyp@8.4.1/node_modules/which | 1 - .../node_modules/.bin/0ecdsa-generate-keypair | 21 - .../.pnpm/node_modules/.bin/0gentesthtml | 21 - .../.pnpm/node_modules/.bin/0serve | 21 - .../.pnpm/node_modules/@hocuspocus/common | 1 - .../.pnpm/node_modules/@tiptap/core | 1 - .../node_modules/@tiptap/extension-blockquote | 1 - .../.pnpm/node_modules/@tiptap/extension-bold | 1 - .../@tiptap/extension-bullet-list | 1 - .../.pnpm/node_modules/@tiptap/extension-code | 1 - .../node_modules/@tiptap/extension-code-block | 1 - .../node_modules/@tiptap/extension-document | 1 - .../node_modules/@tiptap/extension-dropcursor | 1 - .../node_modules/@tiptap/extension-gapcursor | 1 - .../node_modules/@tiptap/extension-hard-break | 1 - .../node_modules/@tiptap/extension-heading | 1 - .../@tiptap/extension-horizontal-rule | 1 - .../node_modules/@tiptap/extension-italic | 1 - .../.pnpm/node_modules/@tiptap/extension-link | 1 - .../.pnpm/node_modules/@tiptap/extension-list | 1 - .../node_modules/@tiptap/extension-list-item | 1 - .../@tiptap/extension-list-keymap | 1 - .../@tiptap/extension-ordered-list | 1 - .../node_modules/@tiptap/extension-paragraph | 1 - .../node_modules/@tiptap/extension-strike | 1 - .../.pnpm/node_modules/@tiptap/extension-text | 1 - .../node_modules/@tiptap/extension-underline | 1 - .../.pnpm/node_modules/@tiptap/extensions | 1 - .../.pnpm/node_modules/@tiptap/pm | 1 - .../.pnpm/node_modules/async-mutex | 1 - .../node_modules/.pnpm/node_modules/crossws | 1 - .../.pnpm/node_modules/isomorphic.js | 1 - .../node_modules/.pnpm/node_modules/kleur | 1 - .../node_modules/.pnpm/node_modules/lib0 | 1 - .../node_modules/.pnpm/node_modules/linkifyjs | 1 - .../.pnpm/node_modules/orderedmap | 1 - .../.pnpm/node_modules/prosemirror-changeset | 1 - .../.pnpm/node_modules/prosemirror-commands | 1 - .../.pnpm/node_modules/prosemirror-dropcursor | 1 - .../.pnpm/node_modules/prosemirror-gapcursor | 1 - .../.pnpm/node_modules/prosemirror-history | 1 - .../.pnpm/node_modules/prosemirror-inputrules | 1 - .../.pnpm/node_modules/prosemirror-keymap | 1 - .../.pnpm/node_modules/prosemirror-model | 1 - .../node_modules/prosemirror-schema-list | 1 - .../.pnpm/node_modules/prosemirror-state | 1 - .../.pnpm/node_modules/prosemirror-tables | 1 - .../.pnpm/node_modules/prosemirror-transform | 1 - .../.pnpm/node_modules/prosemirror-view | 1 - .../.pnpm/node_modules/rope-sequence | 1 - .../node_modules/.pnpm/node_modules/tslib | 1 - .../.pnpm/node_modules/w3c-keyname | 1 - .../.pnpm/node_modules/y-prosemirror | 1 - .../.pnpm/node_modules/y-protocols | 1 - .../.pnpm/nopt@5.0.0/node_modules/abbrev | 1 - .../nopt@5.0.0/node_modules/nopt/CHANGELOG.md | 58 - .../nopt@5.0.0/node_modules/nopt/LICENSE | 15 - .../nopt@5.0.0/node_modules/nopt/README.md | 213 - .../nopt@5.0.0/node_modules/nopt/bin/nopt.js | 54 - .../nopt@5.0.0/node_modules/nopt/lib/nopt.js | 441 - .../node_modules/nopt/node_modules/.bin/nopt | 21 - .../nopt@5.0.0/node_modules/nopt/package.json | 34 - .../node_modules/are-we-there-yet | 1 - .../node_modules/console-control-strings | 1 - .../.pnpm/npmlog@6.0.2/node_modules/gauge | 1 - .../node_modules/npmlog/LICENSE.md | 20 - .../node_modules/npmlog/README.md | 216 - .../node_modules/npmlog/lib/log.js | 404 - .../node_modules/npmlog/package.json | 51 - .../npmlog@6.0.2/node_modules/set-blocking | 1 - .../once@1.4.0/node_modules/once/LICENSE | 15 - .../once@1.4.0/node_modules/once/README.md | 79 - .../once@1.4.0/node_modules/once/once.js | 42 - .../once@1.4.0/node_modules/once/package.json | 33 - .../.pnpm/once@1.4.0/node_modules/wrappy | 1 - .../node_modules/orderedmap/LICENSE | 19 - .../node_modules/orderedmap/README.md | 69 - .../node_modules/orderedmap/dist/index.cjs | 139 - .../node_modules/orderedmap/dist/index.d.cts | 33 - .../node_modules/orderedmap/dist/index.d.ts | 33 - .../node_modules/orderedmap/dist/index.js | 137 - .../node_modules/orderedmap/package.json | 39 - .../p-map@4.0.0/node_modules/aggregate-error | 1 - .../p-map@4.0.0/node_modules/p-map/index.d.ts | 67 - .../p-map@4.0.0/node_modules/p-map/index.js | 81 - .../p-map@4.0.0/node_modules/p-map/license | 9 - .../node_modules/p-map/package.json | 53 - .../p-map@4.0.0/node_modules/p-map/readme.md | 89 - .../node_modules/path-is-absolute/index.js | 20 - .../node_modules/path-is-absolute/license | 21 - .../path-is-absolute/package.json | 43 - .../node_modules/path-is-absolute/readme.md | 59 - .../node_modules/detect-libc | 1 - .../node_modules/expand-template | 1 - .../node_modules/github-from-package | 1 - .../node_modules/minimist | 1 - .../node_modules/mkdirp-classic | 1 - .../node_modules/napi-build-utils | 1 - .../node_modules/node-abi | 1 - .../prebuild-install/CHANGELOG.md | 131 - .../prebuild-install/CONTRIBUTING.md | 6 - .../node_modules/prebuild-install/LICENSE | 21 - .../node_modules/prebuild-install/README.md | 163 - .../node_modules/prebuild-install/asset.js | 44 - .../node_modules/prebuild-install/bin.js | 78 - .../node_modules/prebuild-install/download.js | 142 - .../node_modules/prebuild-install/error.js | 14 - .../node_modules/prebuild-install/help.txt | 16 - .../node_modules/prebuild-install/index.js | 1 - .../node_modules/prebuild-install/log.js | 33 - .../node_modules/.bin/prebuild-install | 21 - .../prebuild-install/node_modules/.bin/rc | 21 - .../prebuild-install/package.json | 67 - .../node_modules/prebuild-install/proxy.js | 35 - .../node_modules/prebuild-install/rc.js | 64 - .../node_modules/prebuild-install/util.js | 143 - .../prebuild-install@7.1.3/node_modules/pump | 1 - .../prebuild-install@7.1.3/node_modules/rc | 1 - .../node_modules/simple-get | 1 - .../node_modules/tar-fs | 1 - .../node_modules/tunnel-agent | 1 - .../node_modules/promise-inflight/LICENSE | 14 - .../node_modules/promise-inflight/README.md | 34 - .../node_modules/promise-inflight/inflight.js | 36 - .../promise-inflight/package.json | 24 - .../promise-retry@2.0.1/node_modules/err-code | 1 - .../node_modules/promise-retry/.editorconfig | 15 - .../node_modules/promise-retry/.jshintrc | 64 - .../node_modules/promise-retry/.travis.yml | 4 - .../node_modules/promise-retry/LICENSE | 19 - .../node_modules/promise-retry/README.md | 94 - .../node_modules/promise-retry/index.js | 52 - .../node_modules/promise-retry/package.json | 37 - .../node_modules/promise-retry/test/test.js | 263 - .../promise-retry@2.0.1/node_modules/retry | 1 - .../prosemirror-changeset/CHANGELOG.md | 153 - .../prosemirror-changeset/LICENSE | 19 - .../prosemirror-changeset/README.md | 175 - .../prosemirror-changeset/dist/index.cjs | 585 - .../prosemirror-changeset/dist/index.d.cts | 186 - .../prosemirror-changeset/dist/index.d.ts | 186 - .../prosemirror-changeset/dist/index.js | 715 -- .../prosemirror-changeset/package.json | 40 - .../prosemirror-changeset/src/README.md | 32 - .../prosemirror-changeset/src/change.ts | 189 - .../prosemirror-changeset/src/changeset.ts | 212 - .../prosemirror-changeset/src/diff.ts | 151 - .../prosemirror-changeset/src/simplify.ts | 132 - .../test/test-changed-range.ts | 48 - .../test/test-changes.ts | 211 - .../prosemirror-changeset/test/test-diff.ts | 69 - .../prosemirror-changeset/test/test-merge.ts | 56 - .../test/test-simplify.ts | 74 - .../node_modules/prosemirror-transform | 1 - .../prosemirror-commands/.tern-project | 8 - .../prosemirror-commands/CHANGELOG.md | 322 - .../prosemirror-commands/CONTRIBUTING.md | 104 - .../node_modules/prosemirror-commands/LICENSE | 19 - .../prosemirror-commands/README.md | 28 - .../prosemirror-commands/dist/index.cjs | 687 - .../prosemirror-commands/dist/index.d.cts | 215 - .../prosemirror-commands/dist/index.d.ts | 215 - .../prosemirror-commands/dist/index.js | 850 -- .../prosemirror-commands/package.json | 39 - .../prosemirror-commands/src/README.md | 40 - .../prosemirror-commands/src/commands.ts | 783 -- .../node_modules/prosemirror-model | 1 - .../node_modules/prosemirror-state | 1 - .../node_modules/prosemirror-transform | 1 - .../prosemirror-dropcursor/CHANGELOG.md | 137 - .../prosemirror-dropcursor/CONTRIBUTING.md | 100 - .../prosemirror-dropcursor/LICENSE | 19 - .../prosemirror-dropcursor/README.md | 50 - .../prosemirror-dropcursor/dist/index.cjs | 185 - .../prosemirror-dropcursor/dist/index.d.cts | 38 - .../prosemirror-dropcursor/dist/index.d.ts | 38 - .../prosemirror-dropcursor/dist/index.js | 146 - .../prosemirror-dropcursor/package.json | 38 - .../prosemirror-dropcursor/src/dropcursor.ts | 170 - .../node_modules/prosemirror-state | 1 - .../node_modules/prosemirror-transform | 1 - .../node_modules/prosemirror-view | 1 - .../prosemirror-gapcursor/CHANGELOG.md | 122 - .../prosemirror-gapcursor/CONTRIBUTING.md | 104 - .../prosemirror-gapcursor/LICENSE | 19 - .../prosemirror-gapcursor/README.md | 31 - .../prosemirror-gapcursor/dist/index.cjs | 239 - .../prosemirror-gapcursor/dist/index.d.cts | 31 - .../prosemirror-gapcursor/dist/index.d.ts | 31 - .../prosemirror-gapcursor/dist/index.js | 239 - .../prosemirror-gapcursor/package.json | 43 - .../prosemirror-gapcursor/src/README.md | 21 - .../prosemirror-gapcursor/src/gapcursor.ts | 141 - .../prosemirror-gapcursor/src/index.ts | 91 - .../prosemirror-gapcursor/style/gapcursor.css | 25 - .../node_modules/prosemirror-keymap | 1 - .../node_modules/prosemirror-model | 1 - .../node_modules/prosemirror-state | 1 - .../node_modules/prosemirror-view | 1 - .../prosemirror-history/.tern-project | 8 - .../prosemirror-history/CHANGELOG.md | 170 - .../prosemirror-history/CONTRIBUTING.md | 104 - .../node_modules/prosemirror-history/LICENSE | 19 - .../prosemirror-history/README.md | 27 - .../prosemirror-history/dist/index.cjs | 382 - .../prosemirror-history/dist/index.d.cts | 64 - .../prosemirror-history/dist/index.d.ts | 64 - .../prosemirror-history/dist/index.js | 453 - .../prosemirror-history/package.json | 40 - .../prosemirror-history/src/README.md | 23 - .../prosemirror-history/src/history.ts | 465 - .../node_modules/prosemirror-state | 1 - .../node_modules/prosemirror-transform | 1 - .../node_modules/prosemirror-view | 1 - .../node_modules/rope-sequence | 1 - .../prosemirror-inputrules/.tern-project | 8 - .../prosemirror-inputrules/CHANGELOG.md | 127 - .../prosemirror-inputrules/CONTRIBUTING.md | 104 - .../prosemirror-inputrules/LICENSE | 19 - .../prosemirror-inputrules/README.md | 29 - .../prosemirror-inputrules/dist/index.cjs | 194 - .../prosemirror-inputrules/dist/index.d.cts | 131 - .../prosemirror-inputrules/dist/index.d.ts | 131 - .../prosemirror-inputrules/dist/index.js | 239 - .../prosemirror-inputrules/package.json | 36 - .../prosemirror-inputrules/src/README.md | 23 - .../prosemirror-inputrules/src/index.ts | 4 - .../prosemirror-inputrules/src/inputrules.ts | 167 - .../src/rulebuilders.ts | 59 - .../prosemirror-inputrules/src/rules.ts | 17 - .../node_modules/prosemirror-state | 1 - .../node_modules/prosemirror-transform | 1 - .../prosemirror-keymap/.tern-project | 8 - .../prosemirror-keymap/CHANGELOG.md | 104 - .../prosemirror-keymap/CONTRIBUTING.md | 104 - .../node_modules/prosemirror-keymap/LICENSE | 19 - .../node_modules/prosemirror-keymap/README.md | 27 - .../prosemirror-keymap/dist/index.cjs | 65 - .../prosemirror-keymap/dist/index.d.cts | 47 - .../prosemirror-keymap/dist/index.d.ts | 47 - .../prosemirror-keymap/dist/index.js | 128 - .../prosemirror-keymap/package.json | 38 - .../prosemirror-keymap/src/README.md | 5 - .../prosemirror-keymap/src/keymap.ts | 105 - .../node_modules/prosemirror-state | 1 - .../node_modules/w3c-keyname | 1 - .../node_modules/orderedmap | 1 - .../prosemirror-model/.tern-project | 8 - .../prosemirror-model/CHANGELOG.md | 750 -- .../prosemirror-model/CONTRIBUTING.md | 104 - .../node_modules/prosemirror-model/LICENSE | 19 - .../node_modules/prosemirror-model/README.md | 29 - .../prosemirror-model/dist/index.cjs | 2901 ----- .../prosemirror-model/dist/index.d.cts | 1683 --- .../prosemirror-model/dist/index.d.ts | 1683 --- .../prosemirror-model/dist/index.js | 3460 ----- .../prosemirror-model/package.json | 38 - .../prosemirror-model/src/README.md | 62 - .../prosemirror-model/src/comparedeep.ts | 15 - .../prosemirror-model/src/content.ts | 413 - .../prosemirror-model/src/diff.ts | 52 - .../node_modules/prosemirror-model/src/dom.ts | 1 - .../prosemirror-model/src/fragment.ts | 268 - .../prosemirror-model/src/from_dom.ts | 851 -- .../prosemirror-model/src/index.ts | 11 - .../prosemirror-model/src/mark.ts | 111 - .../prosemirror-model/src/node.ts | 403 - .../prosemirror-model/src/replace.ts | 216 - .../prosemirror-model/src/resolvedpos.ts | 289 - .../prosemirror-model/src/schema.ts | 705 -- .../prosemirror-model/src/to_dom.ts | 242 - .../node_modules/prosemirror-model | 1 - .../prosemirror-schema-list/.tern-project | 8 - .../prosemirror-schema-list/CHANGELOG.md | 140 - .../prosemirror-schema-list/CONTRIBUTING.md | 100 - .../prosemirror-schema-list/LICENSE | 19 - .../prosemirror-schema-list/README.md | 28 - .../prosemirror-schema-list/dist/index.cjs | 253 - .../prosemirror-schema-list/dist/index.d.cts | 71 - .../prosemirror-schema-list/dist/index.d.ts | 71 - .../prosemirror-schema-list/dist/index.js | 289 - .../prosemirror-schema-list/package.json | 40 - .../prosemirror-schema-list/src/README.md | 29 - .../src/schema-list.ts | 267 - .../node_modules/prosemirror-state | 1 - .../node_modules/prosemirror-transform | 1 - .../node_modules/prosemirror-model | 1 - .../prosemirror-state/.tern-project | 8 - .../prosemirror-state/CHANGELOG.md | 296 - .../prosemirror-state/CONTRIBUTING.md | 104 - .../node_modules/prosemirror-state/LICENSE | 19 - .../node_modules/prosemirror-state/README.md | 28 - .../prosemirror-state/dist/index.cjs | 884 -- .../prosemirror-state/dist/index.d.cts | 709 -- .../prosemirror-state/dist/index.d.ts | 709 -- .../prosemirror-state/dist/index.js | 1002 -- .../prosemirror-state/package.json | 39 - .../prosemirror-state/src/README.md | 42 - .../prosemirror-state/src/index.ts | 7 - .../prosemirror-state/src/plugin.ts | 142 - .../prosemirror-state/src/selection.ts | 462 - .../prosemirror-state/src/state.ts | 266 - .../prosemirror-state/src/transaction.ts | 215 - .../node_modules/prosemirror-transform | 1 - .../node_modules/prosemirror-view | 1 - .../node_modules/prosemirror-keymap | 1 - .../node_modules/prosemirror-model | 1 - .../node_modules/prosemirror-state | 1 - .../node_modules/prosemirror-tables/LICENSE | 19 - .../node_modules/prosemirror-tables/README.md | 254 - .../prosemirror-tables/dist/index.cjs | 2683 ---- .../prosemirror-tables/dist/index.d.cts | 751 -- .../prosemirror-tables/dist/index.d.cts.map | 1 - .../prosemirror-tables/dist/index.d.ts | 751 -- .../prosemirror-tables/dist/index.d.ts.map | 1 - .../prosemirror-tables/dist/index.js | 2626 ---- .../prosemirror-tables/dist/index.js.map | 1 - .../prosemirror-tables/package.json | 80 - .../prosemirror-tables/style/tables.css | 48 - .../node_modules/prosemirror-transform | 1 - .../node_modules/prosemirror-view | 1 - .../node_modules/prosemirror-model | 1 - .../prosemirror-transform/.tern-project | 8 - .../prosemirror-transform/CHANGELOG.md | 512 - .../prosemirror-transform/CONTRIBUTING.md | 104 - .../prosemirror-transform/LICENSE | 19 - .../prosemirror-transform/README.md | 29 - .../prosemirror-transform/dist/index.cjs | 1901 --- .../prosemirror-transform/dist/index.d.cts | 856 -- .../prosemirror-transform/dist/index.d.ts | 856 -- .../prosemirror-transform/dist/index.js | 2211 ---- .../prosemirror-transform/package.json | 37 - .../prosemirror-transform/src/README.md | 59 - .../prosemirror-transform/src/attr_step.ts | 98 - .../prosemirror-transform/src/index.ts | 11 - .../prosemirror-transform/src/map.ts | 284 - .../prosemirror-transform/src/mark.ts | 106 - .../prosemirror-transform/src/mark_step.ts | 224 - .../prosemirror-transform/src/replace.ts | 476 - .../prosemirror-transform/src/replace_step.ts | 187 - .../prosemirror-transform/src/step.ts | 97 - .../prosemirror-transform/src/structure.ts | 349 - .../prosemirror-transform/src/transform.ts | 271 - .../node_modules/prosemirror-model | 1 - .../node_modules/prosemirror-state | 1 - .../node_modules/prosemirror-transform | 1 - .../prosemirror-view/.tern-project | 8 - .../prosemirror-view/CHANGELOG.md | 2455 ---- .../prosemirror-view/CONTRIBUTING.md | 104 - .../node_modules/prosemirror-view/LICENSE | 19 - .../node_modules/prosemirror-view/README.md | 28 - .../prosemirror-view/dist/index.cjs | 5382 -------- .../prosemirror-view/dist/index.d.cts | 904 -- .../prosemirror-view/dist/index.d.ts | 904 -- .../prosemirror-view/dist/index.js | 5901 --------- .../prosemirror-view/package.json | 43 - .../prosemirror-view/src/README.md | 38 - .../prosemirror-view/src/browser.ts | 24 - .../prosemirror-view/src/capturekeys.ts | 345 - .../prosemirror-view/src/clipboard.ts | 263 - .../prosemirror-view/src/decoration.ts | 793 -- .../node_modules/prosemirror-view/src/dom.ts | 159 - .../prosemirror-view/src/domchange.ts | 383 - .../prosemirror-view/src/domcoords.ts | 515 - .../prosemirror-view/src/domobserver.ts | 392 - .../prosemirror-view/src/index.ts | 825 -- .../prosemirror-view/src/input.ts | 831 -- .../prosemirror-view/src/selection.ts | 216 - .../prosemirror-view/src/viewdesc.ts | 1590 --- .../prosemirror-view/style/prosemirror.css | 54 - .../pump@3.0.4/node_modules/end-of-stream | 1 - .../.pnpm/pump@3.0.4/node_modules/once | 1 - .../node_modules/pump/.github/FUNDING.yml | 2 - .../pump@3.0.4/node_modules/pump/.travis.yml | 5 - .../pump@3.0.4/node_modules/pump/LICENSE | 21 - .../pump@3.0.4/node_modules/pump/README.md | 74 - .../pump@3.0.4/node_modules/pump/SECURITY.md | 5 - .../pump@3.0.4/node_modules/pump/empty.js | 1 - .../pump@3.0.4/node_modules/pump/index.js | 86 - .../pump@3.0.4/node_modules/pump/package.json | 30 - .../node_modules/pump/test-browser.js | 66 - .../pump@3.0.4/node_modules/pump/test-node.js | 53 - .../.pnpm/rc@1.2.8/node_modules/deep-extend | 1 - .../.pnpm/rc@1.2.8/node_modules/ini | 1 - .../.pnpm/rc@1.2.8/node_modules/minimist | 1 - .../rc@1.2.8/node_modules/rc/LICENSE.APACHE2 | 15 - .../rc@1.2.8/node_modules/rc/LICENSE.BSD | 26 - .../rc@1.2.8/node_modules/rc/LICENSE.MIT | 24 - .../.pnpm/rc@1.2.8/node_modules/rc/README.md | 227 - .../.pnpm/rc@1.2.8/node_modules/rc/browser.js | 7 - .../.pnpm/rc@1.2.8/node_modules/rc/cli.js | 4 - .../.pnpm/rc@1.2.8/node_modules/rc/index.js | 53 - .../rc@1.2.8/node_modules/rc/lib/utils.js | 104 - .../node_modules/rc/node_modules/.bin/rc | 21 - .../rc@1.2.8/node_modules/rc/package.json | 29 - .../rc@1.2.8/node_modules/rc/test/ini.js | 16 - .../node_modules/rc/test/nested-env-vars.js | 50 - .../rc@1.2.8/node_modules/rc/test/test.js | 59 - .../rc@1.2.8/node_modules/strip-json-comments | 1 - .../node_modules/inherits | 1 - .../readable-stream/CONTRIBUTING.md | 38 - .../readable-stream/GOVERNANCE.md | 136 - .../node_modules/readable-stream/LICENSE | 47 - .../node_modules/readable-stream/README.md | 106 - .../readable-stream/errors-browser.js | 127 - .../node_modules/readable-stream/errors.js | 116 - .../readable-stream/experimentalWarning.js | 17 - .../readable-stream/lib/_stream_duplex.js | 126 - .../lib/_stream_passthrough.js | 37 - .../readable-stream/lib/_stream_readable.js | 1027 -- .../readable-stream/lib/_stream_transform.js | 190 - .../readable-stream/lib/_stream_writable.js | 641 - .../lib/internal/streams/async_iterator.js | 180 - .../lib/internal/streams/buffer_list.js | 183 - .../lib/internal/streams/destroy.js | 96 - .../lib/internal/streams/end-of-stream.js | 86 - .../lib/internal/streams/from-browser.js | 3 - .../lib/internal/streams/from.js | 52 - .../lib/internal/streams/pipeline.js | 86 - .../lib/internal/streams/state.js | 22 - .../lib/internal/streams/stream-browser.js | 1 - .../lib/internal/streams/stream.js | 1 - .../node_modules/readable-stream/package.json | 68 - .../readable-stream/readable-browser.js | 9 - .../node_modules/readable-stream/readable.js | 16 - .../node_modules/string_decoder | 1 - .../node_modules/util-deprecate | 1 - .../node_modules/retry/.npmignore | 3 - .../node_modules/retry/.travis.yml | 15 - .../retry@0.12.0/node_modules/retry/License | 21 - .../retry@0.12.0/node_modules/retry/Makefile | 18 - .../retry@0.12.0/node_modules/retry/README.md | 227 - .../node_modules/retry/equation.gif | Bin 1209 -> 0 bytes .../node_modules/retry/example/dns.js | 31 - .../node_modules/retry/example/stop.js | 40 - .../retry@0.12.0/node_modules/retry/index.js | 1 - .../node_modules/retry/lib/retry.js | 100 - .../node_modules/retry/lib/retry_operation.js | 158 - .../node_modules/retry/package.json | 32 - .../node_modules/retry/test/common.js | 10 - .../retry/test/integration/test-forever.js | 24 - .../test/integration/test-retry-operation.js | 258 - .../retry/test/integration/test-retry-wrap.js | 101 - .../retry/test/integration/test-timeouts.js | 69 - .../.pnpm/rimraf@3.0.2/node_modules/glob | 1 - .../node_modules/rimraf/CHANGELOG.md | 65 - .../rimraf@3.0.2/node_modules/rimraf/LICENSE | 15 - .../node_modules/rimraf/README.md | 101 - .../rimraf@3.0.2/node_modules/rimraf/bin.js | 68 - .../rimraf/node_modules/.bin/rimraf | 21 - .../node_modules/rimraf/package.json | 32 - .../node_modules/rimraf/rimraf.js | 360 - .../node_modules/rope-sequence/LICENSE | 19 - .../node_modules/rope-sequence/README.md | 63 - .../node_modules/rope-sequence/dist/index.cjs | 209 - .../rope-sequence/dist/index.d.cts | 11 - .../rope-sequence/dist/index.d.ts | 11 - .../node_modules/rope-sequence/dist/index.js | 207 - .../node_modules/rope-sequence/index.js | 190 - .../node_modules/rope-sequence/package.json | 34 - .../node_modules/rope-sequence/test.js | 78 - .../node_modules/safe-buffer/LICENSE | 21 - .../node_modules/safe-buffer/README.md | 584 - .../node_modules/safe-buffer/index.d.ts | 187 - .../node_modules/safe-buffer/index.js | 65 - .../node_modules/safe-buffer/package.json | 51 - .../node_modules/safer-buffer/LICENSE | 21 - .../safer-buffer/Porting-Buffer.md | 268 - .../node_modules/safer-buffer/Readme.md | 156 - .../node_modules/safer-buffer/dangerous.js | 58 - .../node_modules/safer-buffer/package.json | 34 - .../node_modules/safer-buffer/safer.js | 77 - .../node_modules/safer-buffer/tests.js | 406 - .../semver@7.8.3/node_modules/semver/LICENSE | 15 - .../node_modules/semver/README.md | 680 - .../node_modules/semver/bin/semver.js | 195 - .../node_modules/semver/classes/comparator.js | 143 - .../node_modules/semver/classes/index.js | 7 - .../node_modules/semver/classes/range.js | 564 - .../node_modules/semver/classes/semver.js | 350 - .../node_modules/semver/functions/clean.js | 8 - .../node_modules/semver/functions/cmp.js | 54 - .../node_modules/semver/functions/coerce.js | 62 - .../semver/functions/compare-build.js | 9 - .../semver/functions/compare-loose.js | 5 - .../node_modules/semver/functions/compare.js | 7 - .../node_modules/semver/functions/diff.js | 60 - .../node_modules/semver/functions/eq.js | 5 - .../node_modules/semver/functions/gt.js | 5 - .../node_modules/semver/functions/gte.js | 5 - .../node_modules/semver/functions/inc.js | 21 - .../node_modules/semver/functions/lt.js | 5 - .../node_modules/semver/functions/lte.js | 5 - .../node_modules/semver/functions/major.js | 5 - .../node_modules/semver/functions/minor.js | 5 - .../node_modules/semver/functions/neq.js | 5 - .../node_modules/semver/functions/parse.js | 18 - .../node_modules/semver/functions/patch.js | 5 - .../semver/functions/prerelease.js | 8 - .../node_modules/semver/functions/rcompare.js | 5 - .../node_modules/semver/functions/rsort.js | 5 - .../semver/functions/satisfies.js | 12 - .../node_modules/semver/functions/sort.js | 5 - .../node_modules/semver/functions/truncate.js | 48 - .../node_modules/semver/functions/valid.js | 8 - .../semver@7.8.3/node_modules/semver/index.js | 93 - .../node_modules/semver/internal/constants.js | 37 - .../node_modules/semver/internal/debug.js | 11 - .../semver/internal/identifiers.js | 29 - .../node_modules/semver/internal/lrucache.js | 42 - .../semver/internal/parse-options.js | 17 - .../node_modules/semver/internal/re.js | 223 - .../semver/node_modules/.bin/semver | 21 - .../node_modules/semver/package.json | 78 - .../node_modules/semver/preload.js | 4 - .../node_modules/semver/range.bnf | 17 - .../node_modules/semver/ranges/gtr.js | 6 - .../node_modules/semver/ranges/intersects.js | 9 - .../node_modules/semver/ranges/ltr.js | 6 - .../semver/ranges/max-satisfying.js | 27 - .../semver/ranges/min-satisfying.js | 26 - .../node_modules/semver/ranges/min-version.js | 63 - .../node_modules/semver/ranges/outside.js | 82 - .../node_modules/semver/ranges/simplify.js | 49 - .../node_modules/semver/ranges/subset.js | 249 - .../semver/ranges/to-comparators.js | 10 - .../node_modules/semver/ranges/valid.js | 13 - .../node_modules/set-blocking/CHANGELOG.md | 26 - .../node_modules/set-blocking/LICENSE.txt | 14 - .../node_modules/set-blocking/README.md | 31 - .../node_modules/set-blocking/index.js | 7 - .../node_modules/set-blocking/package.json | 42 - .../node_modules/signal-exit/LICENSE.txt | 16 - .../node_modules/signal-exit/README.md | 39 - .../node_modules/signal-exit/index.js | 202 - .../node_modules/signal-exit/package.json | 38 - .../node_modules/signal-exit/signals.js | 53 - .../node_modules/simple-concat/.travis.yml | 3 - .../node_modules/simple-concat/LICENSE | 20 - .../node_modules/simple-concat/README.md | 44 - .../node_modules/simple-concat/index.js | 15 - .../node_modules/simple-concat/package.json | 47 - .../node_modules/simple-concat/test/basic.js | 41 - .../node_modules/decompress-response | 1 - .../.pnpm/simple-get@4.0.1/node_modules/once | 1 - .../node_modules/simple-concat | 1 - .../simple-get/.github/dependabot.yml | 15 - .../simple-get/.github/workflows/ci.yml | 23 - .../node_modules/simple-get/LICENSE | 20 - .../node_modules/simple-get/README.md | 333 - .../node_modules/simple-get/index.js | 108 - .../node_modules/simple-get/package.json | 67 - .../smart-buffer/.prettierrc.yaml | 5 - .../node_modules/smart-buffer/.travis.yml | 13 - .../node_modules/smart-buffer/LICENSE | 20 - .../node_modules/smart-buffer/README.md | 633 - .../smart-buffer/build/smartbuffer.js | 1233 -- .../smart-buffer/build/smartbuffer.js.map | 1 - .../node_modules/smart-buffer/build/utils.js | 108 - .../smart-buffer/build/utils.js.map | 1 - .../smart-buffer/docs/CHANGELOG.md | 70 - .../smart-buffer/docs/README_v3.md | 367 - .../node_modules/smart-buffer/docs/ROADMAP.md | 0 .../node_modules/smart-buffer/package.json | 79 - .../smart-buffer/typings/smartbuffer.d.ts | 755 -- .../smart-buffer/typings/utils.d.ts | 66 - .../node_modules/agent-base | 1 - .../node_modules/debug | 1 - .../node_modules/socks | 1 - .../node_modules/socks-proxy-agent/README.md | 152 - .../socks-proxy-agent/dist/index.d.ts | 38 - .../socks-proxy-agent/dist/index.js | 197 - .../socks-proxy-agent/dist/index.js.map | 1 - .../socks-proxy-agent/package.json | 181 - .../.pnpm/socks@2.8.9/node_modules/ip-address | 1 - .../socks@2.8.9/node_modules/smart-buffer | 1 - .../node_modules/socks/.eslintrc.cjs | 11 - .../node_modules/socks/.prettierrc.yaml | 7 - .../socks@2.8.9/node_modules/socks/LICENSE | 20 - .../socks@2.8.9/node_modules/socks/README.md | 686 - .../socks/build/client/socksclient.js | 793 -- .../socks/build/client/socksclient.js.map | 1 - .../socks/build/common/constants.js | 108 - .../socks/build/common/constants.js.map | 1 - .../socks/build/common/helpers.js | 167 - .../socks/build/common/helpers.js.map | 1 - .../socks/build/common/receivebuffer.js | 43 - .../socks/build/common/receivebuffer.js.map | 1 - .../node_modules/socks/build/common/util.js | 25 - .../socks/build/common/util.js.map | 1 - .../node_modules/socks/build/index.js | 18 - .../node_modules/socks/build/index.js.map | 1 - .../node_modules/socks/docs/examples/index.md | 17 - .../examples/javascript/associateExample.md | 90 - .../docs/examples/javascript/bindExample.md | 83 - .../examples/javascript/connectExample.md | 258 - .../examples/typescript/associateExample.md | 93 - .../docs/examples/typescript/bindExample.md | 86 - .../examples/typescript/connectExample.md | 265 - .../node_modules/socks/docs/index.md | 5 - .../socks/docs/migratingFromV1.md | 86 - .../node_modules/socks/package.json | 58 - .../socks/typings/client/socksclient.d.ts | 162 - .../socks/typings/common/constants.d.ts | 151 - .../socks/typings/common/helpers.d.ts | 17 - .../socks/typings/common/receivebuffer.d.ts | 12 - .../socks/typings/common/util.d.ts | 14 - .../node_modules/socks/typings/index.d.ts | 1 - .../.pnpm/sqlite3@5.1.7/node_modules/bindings | 1 - .../sqlite3@5.1.7/node_modules/node-addon-api | 1 - .../.pnpm/sqlite3@5.1.7/node_modules/node-gyp | 1 - .../node_modules/prebuild-install | 1 - .../node_modules/sqlite3/LICENSE | 25 - .../node_modules/sqlite3/README.md | 249 - .../node_modules/sqlite3/binding.gyp | 58 - .../sqlite3/deps/common-sqlite.gypi | 60 - .../node_modules/sqlite3/deps/extract.js | 10 - .../deps/sqlite-autoconf-3440200.tar.gz | Bin 3204841 -> 0 bytes .../node_modules/sqlite3/deps/sqlite3.gyp | 121 - .../sqlite3/lib/sqlite3-binding.js | 1 - .../node_modules/sqlite3/lib/sqlite3.d.ts | 205 - .../node_modules/sqlite3/lib/sqlite3.js | 207 - .../node_modules/sqlite3/lib/trace.js | 38 - .../sqlite3/node_modules/.bin/node-gyp | 21 - .../node_modules/.bin/prebuild-install | 21 - .../node_modules/sqlite3/package.json | 89 - .../node_modules/sqlite3/src/async.h | 76 - .../node_modules/sqlite3/src/backup.cc | 418 - .../node_modules/sqlite3/src/backup.h | 209 - .../node_modules/sqlite3/src/database.cc | 751 -- .../node_modules/sqlite3/src/database.h | 188 - .../node_modules/sqlite3/src/gcc-preinclude.h | 30 - .../node_modules/sqlite3/src/macros.h | 207 - .../node_modules/sqlite3/src/node_sqlite3.cc | 128 - .../node_modules/sqlite3/src/statement.cc | 939 -- .../node_modules/sqlite3/src/statement.h | 244 - .../node_modules/sqlite3/src/threading.h | 10 - .../.pnpm/sqlite3@5.1.7/node_modules/tar | 1 - .../.pnpm/ssri@8.0.1/node_modules/minipass | 1 - .../ssri@8.0.1/node_modules/ssri/CHANGELOG.md | 355 - .../ssri@8.0.1/node_modules/ssri/LICENSE.md | 16 - .../ssri@8.0.1/node_modules/ssri/README.md | 528 - .../ssri@8.0.1/node_modules/ssri/index.js | 470 - .../ssri@8.0.1/node_modules/ssri/package.json | 52 - .../node_modules/emoji-regex | 1 - .../node_modules/is-fullwidth-code-point | 1 - .../node_modules/string-width/index.d.ts | 29 - .../node_modules/string-width/index.js | 47 - .../node_modules/string-width/license | 9 - .../node_modules/string-width/package.json | 56 - .../node_modules/string-width/readme.md | 50 - .../node_modules/strip-ansi | 1 - .../node_modules/safe-buffer | 1 - .../node_modules/string_decoder/LICENSE | 48 - .../node_modules/string_decoder/README.md | 47 - .../string_decoder/lib/string_decoder.js | 296 - .../node_modules/string_decoder/package.json | 34 - .../strip-ansi@6.0.1/node_modules/ansi-regex | 1 - .../node_modules/strip-ansi/index.d.ts | 17 - .../node_modules/strip-ansi/index.js | 4 - .../node_modules/strip-ansi/license | 9 - .../node_modules/strip-ansi/package.json | 54 - .../node_modules/strip-ansi/readme.md | 46 - .../node_modules/strip-json-comments/index.js | 70 - .../node_modules/strip-json-comments/license | 21 - .../strip-json-comments/package.json | 42 - .../strip-json-comments/readme.md | 64 - .../.pnpm/tar-fs@2.1.4/node_modules/chownr | 1 - .../tar-fs@2.1.4/node_modules/mkdirp-classic | 1 - .../.pnpm/tar-fs@2.1.4/node_modules/pump | 1 - .../node_modules/tar-fs/.travis.yml | 6 - .../tar-fs@2.1.4/node_modules/tar-fs/LICENSE | 21 - .../node_modules/tar-fs/README.md | 165 - .../tar-fs@2.1.4/node_modules/tar-fs/index.js | 363 - .../node_modules/tar-fs/package.json | 41 - .../tar-fs/test/fixtures/a/hello.txt | 1 - .../tar-fs/test/fixtures/b/a/test.txt | 1 - .../node_modules/tar-fs/test/fixtures/d/file1 | 0 .../node_modules/tar-fs/test/fixtures/d/file2 | 0 .../tar-fs/test/fixtures/d/sub-dir/file5 | 0 .../tar-fs/test/fixtures/d/sub-files/file3 | 0 .../tar-fs/test/fixtures/d/sub-files/file4 | 0 .../tar-fs/test/fixtures/e/directory/.ignore | 0 .../node_modules/tar-fs/test/fixtures/e/file | 0 .../tar-fs/test/fixtures/invalid.tar | Bin 2560 -> 0 bytes .../node_modules/tar-fs/test/index.js | 346 - .../tar-fs@2.1.4/node_modules/tar-stream | 1 - .../.pnpm/tar-stream@2.2.0/node_modules/bl | 1 - .../node_modules/end-of-stream | 1 - .../node_modules/fs-constants | 1 - .../tar-stream@2.2.0/node_modules/inherits | 1 - .../node_modules/readable-stream | 1 - .../node_modules/tar-stream/LICENSE | 21 - .../node_modules/tar-stream/README.md | 168 - .../node_modules/tar-stream/extract.js | 257 - .../node_modules/tar-stream/headers.js | 295 - .../node_modules/tar-stream/index.js | 2 - .../node_modules/tar-stream/pack.js | 255 - .../node_modules/tar-stream/package.json | 58 - .../node_modules/tar-stream/sandbox.js | 11 - .../.pnpm/tar@6.2.1/node_modules/chownr | 1 - .../.pnpm/tar@6.2.1/node_modules/fs-minipass | 1 - .../.pnpm/tar@6.2.1/node_modules/minipass | 1 - .../.pnpm/tar@6.2.1/node_modules/minizlib | 1 - .../.pnpm/tar@6.2.1/node_modules/mkdirp | 1 - .../.pnpm/tar@6.2.1/node_modules/tar/LICENSE | 15 - .../tar@6.2.1/node_modules/tar/README.md | 1080 -- .../.pnpm/tar@6.2.1/node_modules/tar/index.js | 18 - .../tar@6.2.1/node_modules/tar/lib/create.js | 111 - .../tar@6.2.1/node_modules/tar/lib/extract.js | 113 - .../node_modules/tar/lib/get-write-flag.js | 20 - .../tar@6.2.1/node_modules/tar/lib/header.js | 304 - .../node_modules/tar/lib/high-level-opt.js | 29 - .../node_modules/tar/lib/large-numbers.js | 104 - .../tar@6.2.1/node_modules/tar/lib/list.js | 139 - .../tar@6.2.1/node_modules/tar/lib/mkdir.js | 229 - .../node_modules/tar/lib/mode-fix.js | 27 - .../node_modules/tar/lib/normalize-unicode.js | 12 - .../tar/lib/normalize-windows-path.js | 8 - .../tar@6.2.1/node_modules/tar/lib/pack.js | 432 - .../tar@6.2.1/node_modules/tar/lib/parse.js | 552 - .../node_modules/tar/lib/path-reservations.js | 156 - .../tar@6.2.1/node_modules/tar/lib/pax.js | 150 - .../node_modules/tar/lib/read-entry.js | 107 - .../tar@6.2.1/node_modules/tar/lib/replace.js | 246 - .../tar/lib/strip-absolute-path.js | 24 - .../tar/lib/strip-trailing-slashes.js | 13 - .../tar@6.2.1/node_modules/tar/lib/types.js | 44 - .../tar@6.2.1/node_modules/tar/lib/unpack.js | 923 -- .../tar@6.2.1/node_modules/tar/lib/update.js | 40 - .../node_modules/tar/lib/warn-mixin.js | 24 - .../node_modules/tar/lib/winchars.js | 23 - .../node_modules/tar/lib/write-entry.js | 546 - .../node_modules/tar/node_modules/.bin/mkdirp | 21 - .../tar@6.2.1/node_modules/tar/package.json | 70 - .../.pnpm/tar@6.2.1/node_modules/yallist | 1 - .../node_modules/tslib/CopyrightNotice.txt | 15 - .../node_modules/tslib/LICENSE.txt | 12 - .../tslib@2.8.1/node_modules/tslib/README.md | 164 - .../node_modules/tslib/SECURITY.md | 41 - .../node_modules/tslib/modules/index.d.ts | 38 - .../node_modules/tslib/modules/index.js | 70 - .../node_modules/tslib/modules/package.json | 3 - .../node_modules/tslib/package.json | 47 - .../tslib@2.8.1/node_modules/tslib/tslib.d.ts | 460 - .../node_modules/tslib/tslib.es6.html | 1 - .../node_modules/tslib/tslib.es6.js | 402 - .../node_modules/tslib/tslib.es6.mjs | 401 - .../tslib@2.8.1/node_modules/tslib/tslib.html | 1 - .../tslib@2.8.1/node_modules/tslib/tslib.js | 484 - .../node_modules/safe-buffer | 1 - .../node_modules/tunnel-agent/LICENSE | 55 - .../node_modules/tunnel-agent/README.md | 4 - .../node_modules/tunnel-agent/index.js | 244 - .../node_modules/tunnel-agent/package.json | 22 - .../unique-filename/.nyc_output/54942.json | 1 - .../unique-filename/.nyc_output/54944.json | 1 - .../node_modules/unique-filename/LICENSE | 5 - .../node_modules/unique-filename/README.md | 33 - .../coverage/__root__/index.html | 73 - .../coverage/__root__/index.js.html | 69 - .../unique-filename/coverage/base.css | 182 - .../unique-filename/coverage/index.html | 73 - .../unique-filename/coverage/prettify.css | 1 - .../unique-filename/coverage/prettify.js | 1 - .../coverage/sort-arrow-sprite.png | Bin 209 -> 0 bytes .../unique-filename/coverage/sorter.js | 156 - .../node_modules/unique-filename/index.js | 8 - .../node_modules/unique-filename/package.json | 27 - .../unique-filename/test/index.js | 23 - .../node_modules/unique-slug | 1 - .../node_modules/imurmurhash | 1 - .../node_modules/unique-slug/.travis.yml | 10 - .../node_modules/unique-slug/LICENSE | 15 - .../node_modules/unique-slug/README.md | 19 - .../node_modules/unique-slug/index.js | 11 - .../node_modules/unique-slug/package.json | 23 - .../node_modules/unique-slug/test/index.js | 13 - .../node_modules/util-deprecate/History.md | 16 - .../node_modules/util-deprecate/LICENSE | 24 - .../node_modules/util-deprecate/README.md | 53 - .../node_modules/util-deprecate/browser.js | 67 - .../node_modules/util-deprecate/node.js | 6 - .../node_modules/util-deprecate/package.json | 27 - .../node_modules/w3c-keyname/.tern-port | 1 - .../node_modules/w3c-keyname/LICENSE | 19 - .../node_modules/w3c-keyname/README.md | 18 - .../node_modules/w3c-keyname/index.cjs | 127 - .../node_modules/w3c-keyname/index.d.cts | 5 - .../node_modules/w3c-keyname/index.d.ts | 5 - .../node_modules/w3c-keyname/index.js | 119 - .../node_modules/w3c-keyname/package.json | 37 - .../.pnpm/which@2.0.2/node_modules/isexe | 1 - .../node_modules/which/CHANGELOG.md | 166 - .../which@2.0.2/node_modules/which/LICENSE | 15 - .../which@2.0.2/node_modules/which/README.md | 54 - .../node_modules/which/bin/node-which | 52 - .../which/node_modules/.bin/node-which | 21 - .../node_modules/which/package.json | 43 - .../which@2.0.2/node_modules/which/which.js | 125 - .../node_modules/string-width | 1 - .../node_modules/wide-align/LICENSE | 14 - .../node_modules/wide-align/README.md | 47 - .../node_modules/wide-align/align.js | 65 - .../node_modules/wide-align/package.json | 33 - .../wrappy@1.0.2/node_modules/wrappy/LICENSE | 15 - .../node_modules/wrappy/README.md | 36 - .../node_modules/wrappy/package.json | 29 - .../node_modules/wrappy/wrappy.js | 33 - .../.pnpm/ws@8.21.0/node_modules/ws/LICENSE | 20 - .../.pnpm/ws@8.21.0/node_modules/ws/README.md | 548 - .../ws@8.21.0/node_modules/ws/browser.js | 8 - .../.pnpm/ws@8.21.0/node_modules/ws/index.js | 22 - .../node_modules/ws/lib/buffer-util.js | 131 - .../node_modules/ws/lib/constants.js | 19 - .../node_modules/ws/lib/event-target.js | 292 - .../node_modules/ws/lib/extension.js | 203 - .../ws@8.21.0/node_modules/ws/lib/limiter.js | 55 - .../node_modules/ws/lib/permessage-deflate.js | 528 - .../ws@8.21.0/node_modules/ws/lib/receiver.js | 760 -- .../ws@8.21.0/node_modules/ws/lib/sender.js | 607 - .../ws@8.21.0/node_modules/ws/lib/stream.js | 161 - .../node_modules/ws/lib/subprotocol.js | 62 - .../node_modules/ws/lib/validation.js | 152 - .../node_modules/ws/lib/websocket-server.js | 562 - .../node_modules/ws/lib/websocket.js | 1407 --- .../ws@8.21.0/node_modules/ws/package.json | 70 - .../ws@8.21.0/node_modules/ws/wrapper.mjs | 21 - .../node_modules/lib0 | 1 - .../node_modules/prosemirror-model | 1 - .../node_modules/prosemirror-state | 1 - .../node_modules/prosemirror-view | 1 - .../node_modules/y-prosemirror/LICENSE | 21 - .../node_modules/y-prosemirror/README.md | 205 - .../y-prosemirror/dist/src/lib.d.ts | 114 - .../dist/src/plugins/cursor-plugin.d.ts | 17 - .../y-prosemirror/dist/src/plugins/keys.d.ts | 20 - .../dist/src/plugins/sync-plugin.d.ts | 122 - .../dist/src/plugins/undo-plugin.d.ts | 33 - .../y-prosemirror/dist/src/utils.d.ts | 1 - .../y-prosemirror/dist/src/y-prosemirror.d.ts | 5 - .../y-prosemirror/dist/y-prosemirror.cjs | 2223 ---- .../y-prosemirror/dist/y-prosemirror.cjs.map | 1 - .../node_modules/.bin/0ecdsa-generate-keypair | 21 - .../node_modules/.bin/0gentesthtml | 21 - .../y-prosemirror/node_modules/.bin/0serve | 21 - .../node_modules/y-prosemirror/package.json | 89 - .../node_modules/y-prosemirror/src/lib.js | 440 - .../src/plugins/cursor-plugin.js | 267 - .../y-prosemirror/src/plugins/keys.js | 23 - .../y-prosemirror/src/plugins/sync-plugin.js | 1306 -- .../y-prosemirror/src/plugins/undo-plugin.js | 125 - .../node_modules/y-prosemirror/src/utils.js | 20 - .../y-prosemirror/src/y-prosemirror.js | 11 - .../node_modules/y-protocols | 1 - .../node_modules/yjs | 1 - .../node_modules/lib0 | 1 - .../node_modules/y-protocols/LICENSE | 21 - .../node_modules/y-protocols/README.md | 78 - .../node_modules/y-protocols/auth.d.ts | 8 - .../node_modules/y-protocols/auth.d.ts.map | 1 - .../node_modules/y-protocols/auth.js | 33 - .../node_modules/y-protocols/awareness.d.ts | 86 - .../y-protocols/awareness.d.ts.map | 1 - .../node_modules/y-protocols/awareness.js | 295 - .../y-protocols/awareness.test.d.ts | 3 - .../y-protocols/awareness.test.d.ts.map | 1 - .../y-protocols/awareness.test.js | 53 - .../node_modules/y-protocols/dist/auth.cjs | 59 - .../y-protocols/dist/auth.cjs.map | 1 - .../y-protocols/dist/awareness.cjs | 329 - .../y-protocols/dist/awareness.cjs.map | 1 - .../node_modules/y-protocols/dist/sync.cjs | 170 - .../y-protocols/dist/sync.cjs.map | 1 - .../node_modules/y-protocols/dist/test.cjs | 103 - .../y-protocols/dist/test.cjs.map | 1 - .../node_modules/y-protocols/dist/test.js | 9921 --------------- .../node_modules/y-protocols/dist/test.js.map | 1 - .../node_modules/.bin/0ecdsa-generate-keypair | 21 - .../node_modules/.bin/0gentesthtml | 21 - .../y-protocols/node_modules/.bin/0serve | 21 - .../node_modules/y-protocols/package.json | 92 - .../node_modules/y-protocols/sync.d.ts | 42 - .../node_modules/y-protocols/sync.d.ts.map | 1 - .../node_modules/y-protocols/sync.js | 134 - .../node_modules/yjs | 1 - .../node_modules/yallist/LICENSE | 15 - .../node_modules/yallist/README.md | 204 - .../node_modules/yallist/iterator.js | 8 - .../node_modules/yallist/package.json | 29 - .../node_modules/yallist/yallist.js | 426 - .../.pnpm/yjs@13.6.31/node_modules/lib0 | 1 - .../yjs@13.6.31/node_modules/yjs/LICENSE | 23 - .../yjs@13.6.31/node_modules/yjs/README.md | 1394 --- .../node_modules/yjs/dist/src/index.d.ts | 2 - .../node_modules/yjs/dist/src/index.d.ts.map | 1 - .../node_modules/yjs/dist/src/internals.d.ts | 41 - .../yjs/dist/src/internals.d.ts.map | 1 - .../yjs/dist/src/structs/AbstractStruct.d.ts | 37 - .../dist/src/structs/AbstractStruct.d.ts.map | 1 - .../yjs/dist/src/structs/ContentAny.d.ts | 67 - .../yjs/dist/src/structs/ContentAny.d.ts.map | 1 - .../yjs/dist/src/structs/ContentBinary.d.ts | 64 - .../dist/src/structs/ContentBinary.d.ts.map | 1 - .../yjs/dist/src/structs/ContentDeleted.d.ts | 64 - .../dist/src/structs/ContentDeleted.d.ts.map | 1 - .../yjs/dist/src/structs/ContentDoc.d.ts | 72 - .../yjs/dist/src/structs/ContentDoc.d.ts.map | 1 - .../yjs/dist/src/structs/ContentEmbed.d.ts | 67 - .../dist/src/structs/ContentEmbed.d.ts.map | 1 - .../yjs/dist/src/structs/ContentFormat.d.ts | 69 - .../dist/src/structs/ContentFormat.d.ts.map | 1 - .../yjs/dist/src/structs/ContentJSON.d.ts | 70 - .../yjs/dist/src/structs/ContentJSON.d.ts.map | 1 - .../yjs/dist/src/structs/ContentString.d.ts | 70 - .../dist/src/structs/ContentString.d.ts.map | 1 - .../yjs/dist/src/structs/ContentType.d.ts | 83 - .../yjs/dist/src/structs/ContentType.d.ts.map | 1 - .../node_modules/yjs/dist/src/structs/GC.d.ts | 29 - .../yjs/dist/src/structs/GC.d.ts.map | 1 - .../yjs/dist/src/structs/Item.d.ts | 218 - .../yjs/dist/src/structs/Item.d.ts.map | 1 - .../yjs/dist/src/structs/Skip.d.ts | 29 - .../yjs/dist/src/structs/Skip.d.ts.map | 1 - .../yjs/dist/src/types/AbstractType.d.ts | 173 - .../yjs/dist/src/types/AbstractType.d.ts.map | 1 - .../yjs/dist/src/types/YArray.d.ts | 154 - .../yjs/dist/src/types/YArray.d.ts.map | 1 - .../node_modules/yjs/dist/src/types/YMap.d.ts | 142 - .../yjs/dist/src/types/YMap.d.ts.map | 1 - .../yjs/dist/src/types/YText.d.ts | 261 - .../yjs/dist/src/types/YText.d.ts.map | 1 - .../yjs/dist/src/types/YXmlElement.d.ts | 108 - .../yjs/dist/src/types/YXmlElement.d.ts.map | 1 - .../yjs/dist/src/types/YXmlEvent.d.ts | 33 - .../yjs/dist/src/types/YXmlEvent.d.ts.map | 1 - .../yjs/dist/src/types/YXmlFragment.d.ts | 253 - .../yjs/dist/src/types/YXmlFragment.d.ts.map | 1 - .../yjs/dist/src/types/YXmlHook.d.ts | 50 - .../yjs/dist/src/types/YXmlHook.d.ts.map | 1 - .../yjs/dist/src/types/YXmlText.d.ts | 52 - .../yjs/dist/src/types/YXmlText.d.ts.map | 1 - .../yjs/dist/src/utils/AbstractConnector.d.ts | 20 - .../dist/src/utils/AbstractConnector.d.ts.map | 1 - .../yjs/dist/src/utils/DeleteSet.d.ts | 50 - .../yjs/dist/src/utils/DeleteSet.d.ts.map | 1 - .../node_modules/yjs/dist/src/utils/Doc.d.ts | 250 - .../yjs/dist/src/utils/Doc.d.ts.map | 1 - .../yjs/dist/src/utils/EventHandler.d.ts | 19 - .../yjs/dist/src/utils/EventHandler.d.ts.map | 1 - .../node_modules/yjs/dist/src/utils/ID.d.ts | 26 - .../yjs/dist/src/utils/ID.d.ts.map | 1 - .../yjs/dist/src/utils/PermanentUserData.d.ts | 42 - .../dist/src/utils/PermanentUserData.d.ts.map | 1 - .../yjs/dist/src/utils/RelativePosition.d.ts | 91 - .../dist/src/utils/RelativePosition.d.ts.map | 1 - .../yjs/dist/src/utils/Snapshot.d.ts | 40 - .../yjs/dist/src/utils/Snapshot.d.ts.map | 1 - .../yjs/dist/src/utils/StructStore.d.ts | 34 - .../yjs/dist/src/utils/StructStore.d.ts.map | 1 - .../yjs/dist/src/utils/Transaction.d.ts | 115 - .../yjs/dist/src/utils/Transaction.d.ts.map | 1 - .../yjs/dist/src/utils/UndoManager.d.ts | 189 - .../yjs/dist/src/utils/UndoManager.d.ts.map | 1 - .../yjs/dist/src/utils/UpdateDecoder.d.ts | 167 - .../yjs/dist/src/utils/UpdateDecoder.d.ts.map | 1 - .../yjs/dist/src/utils/UpdateEncoder.d.ts | 164 - .../yjs/dist/src/utils/UpdateEncoder.d.ts.map | 1 - .../yjs/dist/src/utils/YEvent.d.ts | 133 - .../yjs/dist/src/utils/YEvent.d.ts.map | 1 - .../yjs/dist/src/utils/encoding.d.ts | 34 - .../yjs/dist/src/utils/encoding.d.ts.map | 1 - .../yjs/dist/src/utils/isParentOf.d.ts | 4 - .../yjs/dist/src/utils/isParentOf.d.ts.map | 1 - .../yjs/dist/src/utils/logging.d.ts | 3 - .../yjs/dist/src/utils/logging.d.ts.map | 1 - .../yjs/dist/src/utils/updates.d.ts | 89 - .../yjs/dist/src/utils/updates.d.ts.map | 1 - .../node_modules/yjs/dist/testHelper.mjs | 457 - .../yjs@13.6.31/node_modules/yjs/dist/yjs.cjs | 10438 ---------------- .../node_modules/yjs/dist/yjs.cjs.map | 1 - .../yjs@13.6.31/node_modules/yjs/dist/yjs.mjs | 10299 --------------- .../node_modules/yjs/dist/yjs.mjs.map | 1 - .../node_modules/.bin/0ecdsa-generate-keypair | 21 - .../yjs/node_modules/.bin/0gentesthtml | 21 - .../node_modules/yjs/node_modules/.bin/0serve | 21 - .../yjs@13.6.31/node_modules/yjs/package.json | 99 - .../yjs@13.6.31/node_modules/yjs/src/index.js | 135 - .../node_modules/yjs/src/internals.js | 42 - .../yjs/src/structs/AbstractStruct.js | 51 - .../yjs/src/structs/ContentAny.js | 114 - .../yjs/src/structs/ContentBinary.js | 92 - .../yjs/src/structs/ContentDeleted.js | 100 - .../yjs/src/structs/ContentDoc.js | 140 - .../yjs/src/structs/ContentEmbed.js | 97 - .../yjs/src/structs/ContentFormat.js | 104 - .../yjs/src/structs/ContentJSON.js | 118 - .../yjs/src/structs/ContentString.js | 112 - .../yjs/src/structs/ContentType.js | 171 - .../node_modules/yjs/src/structs/GC.js | 60 - .../node_modules/yjs/src/structs/Item.js | 816 -- .../node_modules/yjs/src/structs/Skip.js | 59 - .../yjs/src/types/AbstractType.js | 985 -- .../node_modules/yjs/src/types/YArray.js | 274 - .../node_modules/yjs/src/types/YMap.js | 281 - .../node_modules/yjs/src/types/YText.js | 1298 -- .../node_modules/yjs/src/types/YXmlElement.js | 260 - .../node_modules/yjs/src/types/YXmlEvent.js | 39 - .../yjs/src/types/YXmlFragment.js | 449 - .../node_modules/yjs/src/types/YXmlHook.js | 98 - .../node_modules/yjs/src/types/YXmlText.js | 124 - .../yjs/src/utils/AbstractConnector.js | 25 - .../node_modules/yjs/src/utils/DeleteSet.js | 352 - .../node_modules/yjs/src/utils/Doc.js | 347 - .../yjs/src/utils/EventHandler.js | 87 - .../node_modules/yjs/src/utils/ID.js | 89 - .../yjs/src/utils/PermanentUserData.js | 141 - .../yjs/src/utils/RelativePosition.js | 353 - .../node_modules/yjs/src/utils/Snapshot.js | 236 - .../node_modules/yjs/src/utils/StructStore.js | 261 - .../node_modules/yjs/src/utils/Transaction.js | 448 - .../node_modules/yjs/src/utils/UndoManager.js | 400 - .../yjs/src/utils/UpdateDecoder.js | 281 - .../yjs/src/utils/UpdateEncoder.js | 320 - .../node_modules/yjs/src/utils/YEvent.js | 277 - .../node_modules/yjs/src/utils/encoding.js | 644 - .../node_modules/yjs/src/utils/isParentOf.js | 21 - .../node_modules/yjs/src/utils/logging.js | 21 - .../node_modules/yjs/src/utils/updates.js | 722 -- .../node_modules/yjs/tests/testHelper.js | 454 - .../node_modules/@hocuspocus/server | 1 - .../node_modules/@hocuspocus/transformer | 1 - .../node_modules/@tiptap/starter-kit | 1 - services/hocuspocus/node_modules/yjs | 1 - 4446 files changed, 3 insertions(+), 464793 deletions(-) delete mode 100755 services/hocuspocus/node_modules/.bin/node-gyp delete mode 100644 services/hocuspocus/node_modules/.modules.yaml delete mode 100644 services/hocuspocus/node_modules/.pnpm-workspace-state-v1.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/model/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/state/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/transform/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/view/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/CloseEvents.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/auth.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/awarenessStatesToArray.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-database/src/Database.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-database/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-logger/src/Logger.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-logger/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-redis/src/Redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-redis/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-s3/src/S3.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-s3/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-sqlite/src/SQLite.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-sqlite/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-throttle/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-webhook/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/EventEmitter.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/HocuspocusProvider.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/IncomingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/MessageReceiver.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/MessageSender.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/ClientConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Connection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/DirectConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Document.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Hocuspocus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/IncomingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/MessageReceiver.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/OutgoingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Server.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/util/debounce.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/util/getParameters.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/Prosemirror.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/Tiptap.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/default.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/deno.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/express.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/hono.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/koa.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/load-document.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/s3-redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/s3.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/slow.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/tiptapcollab.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/webhook.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/app/SocketContext1.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/app/SocketContext2.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/next.config.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-database/fetch.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-logger/onListen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onAwarenessChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-s3/fetch.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-throttle/banning.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-throttle/configuration.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/hasUnsyncedChanges.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/observe.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/observeDeep.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAuthenticated.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAuthenticationFailed.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAwarenessChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAwarenessUpdate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onClose.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onConnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onDisconnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onOpen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onSynced.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/providerwebsocket/configuration.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/address.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterLoadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterUnloadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeBroadcastStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeHandleMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeSync.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeUnloadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/closeConnections.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/getConnectionsCount.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/getDocumentsCount.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/listen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onAuthenticate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onAwarenessUpdate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onClose.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onConfigure.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onConnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onDestroy.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onDisconnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onListen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onLoadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onRequest.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onTokenSync.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onUpgrade.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/openDirectConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/websocketError.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/transformer/TiptapTransformer.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/createDirectory.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/flushRedis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocusProvider.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/randomInteger.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/redisConnectionSettings.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/removeDirectory.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/retryableAssertion.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/sleep.d.ts delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0ecdsa-generate-keypair delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0gentesthtml delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0serve delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/CloseEvents.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/auth.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/awarenessStatesToArray.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/types.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/lib0 delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/index.d.ts delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0ecdsa-generate-keypair delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0gentesthtml delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0serve delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/CloseEvents.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/SkipFurtherHooksError.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/auth.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/awarenessStatesToArray.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/routingKey.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/types.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/lib0 delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.esm.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.esm.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/model/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/state/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/transform/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/view/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/CloseEvents.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/auth.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/awarenessStatesToArray.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-database/src/Database.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-database/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-logger/src/Logger.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-logger/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-redis/src/Redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-redis/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-s3/src/S3.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-s3/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-sqlite/src/SQLite.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-sqlite/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-throttle/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-webhook/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/EventEmitter.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/HocuspocusProvider.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/IncomingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/MessageReceiver.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/MessageSender.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/ClientConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Connection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/DirectConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Document.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Hocuspocus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/IncomingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/MessageReceiver.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/OutgoingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Server.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/util/debounce.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/util/getParameters.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/Prosemirror.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/Tiptap.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/default.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/deno.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/express.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/hono.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/koa.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/load-document.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/s3-redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/s3.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/slow.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/tiptapcollab.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/webhook.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/app/SocketContext1.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/app/SocketContext2.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/next.config.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-database/fetch.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-logger/onListen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onAwarenessChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-s3/fetch.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-throttle/banning.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-throttle/configuration.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/hasUnsyncedChanges.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/observe.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/observeDeep.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAuthenticated.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAuthenticationFailed.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAwarenessChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAwarenessUpdate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onClose.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onConnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onDisconnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onOpen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onSynced.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/providerwebsocket/configuration.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/address.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterLoadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterUnloadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeBroadcastStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeHandleMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeSync.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeUnloadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/closeConnections.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/getConnectionsCount.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/getDocumentsCount.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/listen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onAuthenticate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onAwarenessUpdate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onClose.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onConfigure.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onConnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onDestroy.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onDisconnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onListen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onLoadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onRequest.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onTokenSync.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onUpgrade.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/openDirectConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/websocketError.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/transformer/TiptapTransformer.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/createDirectory.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/flushRedis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocusProvider.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/randomInteger.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/redisConnectionSettings.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/removeDirectory.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/retryableAssertion.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/sleep.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/src/Database.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.esm.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.esm.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/model/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/state/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/transform/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/view/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/CloseEvents.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/auth.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/awarenessStatesToArray.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-database/src/Database.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-database/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-logger/src/Logger.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-logger/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-redis/src/Redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-redis/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-s3/src/S3.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-s3/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-sqlite/src/SQLite.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-sqlite/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-throttle/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-webhook/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/EventEmitter.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/HocuspocusProvider.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/IncomingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/MessageReceiver.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/MessageSender.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/ClientConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Connection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/DirectConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Document.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Hocuspocus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/IncomingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/MessageReceiver.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/OutgoingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Server.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/util/debounce.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/util/getParameters.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/Prosemirror.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/Tiptap.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/default.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/deno.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/express.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/hono.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/koa.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/load-document.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/s3-redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/s3.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/slow.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/tiptapcollab.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/webhook.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/app/SocketContext1.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/app/SocketContext2.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/next.config.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-database/fetch.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-logger/onListen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onAwarenessChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-s3/fetch.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-throttle/banning.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-throttle/configuration.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/hasUnsyncedChanges.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/observe.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/observeDeep.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAuthenticated.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAuthenticationFailed.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAwarenessChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAwarenessUpdate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onClose.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onConnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onDisconnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onOpen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onSynced.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/providerwebsocket/configuration.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/address.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterLoadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterUnloadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeBroadcastStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeHandleMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeSync.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeUnloadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/closeConnections.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/getConnectionsCount.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/getDocumentsCount.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/listen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onAuthenticate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onAwarenessUpdate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onClose.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onConfigure.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onConnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onDestroy.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onDisconnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onListen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onLoadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onRequest.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onTokenSync.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onUpgrade.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/openDirectConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/websocketError.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/transformer/TiptapTransformer.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/createDirectory.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/flushRedis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocusProvider.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/randomInteger.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/redisConnectionSettings.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/removeDirectory.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/retryableAssertion.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/sleep.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/src/SQLite.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/sqlite3 delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/common delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/model/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/state/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/transform/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/view/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/CloseEvents.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/auth.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/awarenessStatesToArray.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-database/src/Database.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-database/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-logger/src/Logger.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-logger/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-redis/src/Redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-redis/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-s3/src/S3.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-s3/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-sqlite/src/SQLite.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-sqlite/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-throttle/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-webhook/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/EventEmitter.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/HocuspocusProvider.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/IncomingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/MessageReceiver.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/MessageSender.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/ClientConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Connection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/DirectConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Document.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Hocuspocus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/IncomingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/MessageReceiver.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/OutgoingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Server.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/util/debounce.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/util/getParameters.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/Prosemirror.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/Tiptap.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/default.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/deno.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/express.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/hono.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/koa.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/load-document.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/s3-redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/s3.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/slow.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/tiptapcollab.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/webhook.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/app/SocketContext1.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/app/SocketContext2.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/next.config.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-database/fetch.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-logger/onListen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onAwarenessChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-s3/fetch.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-throttle/banning.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-throttle/configuration.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/hasUnsyncedChanges.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/observe.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/observeDeep.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAuthenticated.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAuthenticationFailed.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAwarenessChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAwarenessUpdate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onClose.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onConnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onDisconnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onOpen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onSynced.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/providerwebsocket/configuration.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/address.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterLoadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterUnloadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeBroadcastStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeHandleMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeSync.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeUnloadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/closeConnections.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/getConnectionsCount.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/getDocumentsCount.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/listen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onAuthenticate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onAwarenessUpdate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onClose.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onConfigure.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onConnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onDestroy.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onDisconnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onListen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onLoadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onRequest.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onTokenSync.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onUpgrade.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/openDirectConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/websocketError.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/transformer/TiptapTransformer.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/createDirectory.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/flushRedis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocusProvider.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/randomInteger.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/redisConnectionSettings.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/removeDirectory.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/retryableAssertion.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/sleep.d.ts delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0ecdsa-generate-keypair delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0gentesthtml delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0serve delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/ClientConnection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Connection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/DirectConnection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Document.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Hocuspocus.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/IncomingMessage.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/MessageReceiver.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/OutgoingMessage.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Server.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/types.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/debounce.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/getParameters.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-lock delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-mutex delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/lib0 delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/ws delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/y-protocols delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/common delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/index.d.ts delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0ecdsa-generate-keypair delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0gentesthtml delete mode 100755 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0serve delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/ClientConnection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Connection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/DirectConnection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Document.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Hocuspocus.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/IncomingMessage.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/MessageReceiver.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/OutgoingMessage.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Server.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/types.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/debounce.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/getParameters.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-mutex delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/crossws delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/lib0 delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/y-protocols delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/model/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/state/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/transform/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/view/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/CloseEvents.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/auth.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/awarenessStatesToArray.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-database/src/Database.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-database/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-logger/src/Logger.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-logger/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-redis/src/Redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-redis/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-s3/src/S3.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-s3/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-sqlite/src/SQLite.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-sqlite/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-throttle/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-webhook/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/EventEmitter.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/HocuspocusProvider.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/IncomingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/MessageReceiver.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/MessageSender.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/ClientConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Connection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/DirectConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Document.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Hocuspocus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/IncomingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/MessageReceiver.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/OutgoingMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Server.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/util/debounce.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/util/getParameters.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/Prosemirror.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/Tiptap.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/types.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/default.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/deno.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/express.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/hono.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/koa.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/load-document.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/s3-redis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/s3.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/slow.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/tiptapcollab.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/webhook.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/app/SocketContext1.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/app/SocketContext2.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/next.config.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-database/fetch.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-logger/onListen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onAwarenessChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-s3/fetch.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-throttle/banning.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-throttle/configuration.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/hasUnsyncedChanges.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/observe.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/observeDeep.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAuthenticated.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAuthenticationFailed.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAwarenessChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAwarenessUpdate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onClose.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onConnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onDisconnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onOpen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onSynced.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/providerwebsocket/configuration.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/address.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterLoadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterUnloadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeBroadcastStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeHandleMessage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeSync.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeUnloadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/closeConnections.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/getConnectionsCount.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/getDocumentsCount.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/listen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onAuthenticate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onAwarenessUpdate.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onChange.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onClose.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onConfigure.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onConnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onDestroy.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onDisconnect.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onListen.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onLoadDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onRequest.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onStateless.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onStoreDocument.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onTokenSync.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onUpgrade.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/openDirectConnection.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/websocketError.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/transformer/TiptapTransformer.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/createDirectory.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/flushRedis.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocusProvider.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/randomInteger.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/redisConnectionSettings.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/removeDirectory.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/retryableAssertion.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/sleep.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/Prosemirror.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/Tiptap.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/types.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/core delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/pm delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/starter-kit delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/y-prosemirror delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/yjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/Prosemirror.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/Tiptap.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/types.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/core delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/pm delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/starter-kit delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/y-prosemirror delete mode 120000 services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/yjs delete mode 120000 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@gar/promisify delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/file-url-to-path/polyfill.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/get-options.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/node.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/owner.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/copy-file.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/polyfill.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/errors.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/fs.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdir/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdir/polyfill.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdtemp.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/rm/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/rm/polyfill.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/with-temp-dir.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/write-file.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/node_modules/.bin/semver delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/semver delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/index.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/node_modules/.bin/mkdirp delete mode 100755 services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/node_modules/.bin/rimraf delete mode 100644 services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/mkdirp delete mode 120000 services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/rimraf delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/CommandManager.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Editor.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/EventEmitter.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Extendable.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Extension.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/ExtensionManager.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/InputRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Mark.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/MarkView.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Node.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/NodePos.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/NodeView.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/PasteRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Tracker.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/__tests__/htmlEntities.test.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/__tests__/transformPastedHTML.test.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/blur.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/clearContent.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/clearNodes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/command.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/createParagraphNear.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/cut.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteCurrentNode.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteNode.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteRange.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteSelection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/enter.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/exitCode.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/extendMarkRange.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/first.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/focus.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/forEach.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/insertContent.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/insertContentAt.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/join.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinItemBackward.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinItemForward.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinTextblockBackward.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinTextblockForward.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/keyboardShortcut.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/lift.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/liftEmptyBlock.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/liftListItem.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/newlineInCode.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/resetAttributes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/scrollIntoView.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectAll.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectNodeBackward.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectNodeForward.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectParentNode.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectTextblockEnd.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectTextblockStart.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setContent.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setMark.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setMeta.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setNode.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setNodeSelection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setTextDirection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setTextSelection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/sinkListItem.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/splitBlock.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/splitListItem.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleList.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleMark.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleNode.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleWrap.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/undoInputRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetAllMarks.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetMark.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetTextDirection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/updateAttributes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/wrapIn.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/wrapInList.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/commands.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/delete.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/drop.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/editable.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/focusEvents.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/keymap.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/paste.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/tabindex.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/textDirection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/MappablePosition.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/combineTransactionSteps.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createChainableState.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createDocument.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createNodeFromContent.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/defaultBlockAt.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findChildren.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findChildrenInRange.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findParentNode.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findParentNodeClosestToPos.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/flattenExtensions.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateHTML.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateJSON.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateText.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getAttributes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getChangedRanges.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getDebugJSON.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getExtensionField.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getHTMLFromFragment.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkAttributes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkRange.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkType.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarksBetween.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeAtPosition.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeAttributes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeType.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getRenderedAttributes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchema.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaTypeByName.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaTypeNameByName.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSplittedAttributes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getText.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextBetween.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextSerializersFromSchema.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/injectExtensionAttributesToParseRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isActive.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isAtEndOfNode.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isAtStartOfNode.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isExtensionRulesEnabled.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isList.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isMarkActive.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeActive.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeEmpty.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeSelection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeViewSelected.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isTextSelection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/posToDOMRect.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/resolveExtensions.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/resolveFocusPosition.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/selectionToInsertionEnd.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/sortExtensions.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/splitExtensions.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/markInputRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/nodeInputRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/textInputRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/textblockTypeInputRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/wrappingInputRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/jsx-runtime.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/lib/ResizableNodeView.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/lib/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/markPasteRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/nodePasteRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/textPasteRule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/style.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/types.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/attrsEqual.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/callOrReturn.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/canInsertNode.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/createStyleTag.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/deleteProps.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/elementFromString.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/escapeForRegEx.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/findDuplicates.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/fromString.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/getStyleProperty.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/htmlEntities.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isAndroid.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isEmptyObject.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isFirefox.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isFunction.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isMacOS.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isNumber.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isPlainObject.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isRegExp.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isSafari.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isString.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isiOS.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/attributeUtils.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createBlockMarkdownSpec.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createInlineMarkdownSpec.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/parseIndentedBlocks.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/marksEqual.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/mergeAttributes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/mergeDeep.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/minMax.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/objectIncludes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/removeDuplicates.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/pm delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/blockquote.tsx delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/handleBackspace.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/src/bold.tsx delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-list delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/src/code-block.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/src/code.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/src/document.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extensions delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extensions delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/src/hard-break.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/src/heading.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/src/horizontal-rule.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/src/italic.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/autolink.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/clickHandler.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/pasteHandler.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/whitespace.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/link.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/linkifyjs delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/bullet-list/bullet-list.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/bullet-list/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/createBranchingListDeleteKeymap.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/getBranchingNestedListAtCursor.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/handleDeleteBranchingNestedList.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/hasBranchingNestedListAfterCursor.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/hoistBranchingNestedList.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/item/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/item/list-item.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/list-keymap.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/findListItemPos.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/getNextListDepth.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleBackspace.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleDelete.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListBefore.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemAfter.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemBefore.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/listItemHasSubList.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsDeeper.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsHigher.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/kit/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/ordered-list.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/utils.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-item/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-item/task-item.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-list/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-list/task-list.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-list delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/src/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/src/paragraph.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/src/strike.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/src/text.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/src/underline.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/character-count/character-count.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/character-count/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/drop-cursor/drop-cursor.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/drop-cursor/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/focus/focus.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/focus/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/gap-cursor/gap-cursor.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/gap-cursor/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/constants.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/placeholder.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/plugins/PlaceholderPlugin.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/types.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/buildPlaceholderDecorations.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/createPlaceholderDecoration.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/findScrollParent.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/getViewportBoundaryPositions.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/preparePlaceholderAttribute.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/throttle.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/viewportTracking.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/selection/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/selection/selection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/trailing-node/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/trailing-node/trailing-node.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/undo-redo/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/undo-redo/undo-redo.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/THIRD_PARTY_LICENSES.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/changeset/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/commands/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dropcursor/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/gapcursor/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/history/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/inputrules/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/keymap/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/model/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/schema-list/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/state/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/tables/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/transform/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/view/index.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-changeset delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-commands delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-dropcursor delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-gapcursor delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-history delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-inputrules delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-keymap delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-model delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-schema-list delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-state delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-tables delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-transform delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-view delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/core delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-blockquote delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-bold delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-bullet-list delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-code delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-code-block delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-document delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-dropcursor delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-gapcursor delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-hard-break delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-heading delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-horizontal-rule delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-italic delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-link delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list-item delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list-keymap delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-ordered-list delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-paragraph delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-strike delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-text delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-underline delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extensions delete mode 120000 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/pm delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/src/starter-kit.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/abbrev.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/src/promisify.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/debug delete mode 100644 services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/agent.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/constants.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/https_agent.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/humanize-ms delete mode 100644 services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/readme.md delete mode 120000 services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/clean-stack delete mode 120000 services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/indent-string delete mode 100644 services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/readme.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-base.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-group.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-stream.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/delegates delete mode 120000 services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/readable-stream delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/AUTHORS delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/History.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/lib/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/Mutex.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/MutexInterface.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/Semaphore.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/SemaphoreInterface.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/errors.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/tryAcquire.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/withTimeout.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/index.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Mutex.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Mutex.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/MutexInterface.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/MutexInterface.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Semaphore.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Semaphore.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/SemaphoreInterface.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/SemaphoreInterface.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/errors.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/errors.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/tryAcquire.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/tryAcquire.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/withTimeout.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/withTimeout.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/tslib delete mode 100644 services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/.github/FUNDING.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/base64js.min.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/file-uri-to-path delete mode 100644 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/convert.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/indexOf.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/isBufferList.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/test.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/buffer delete mode 120000 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/inherits delete mode 120000 services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/readable-stream delete mode 120000 services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/balanced-match delete mode 100644 services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/concat-map delete mode 120000 services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/base64-js delete mode 100644 services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/AUTHORS.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/ieee754 delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/@npmcli/fs delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/@npmcli/move-file delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/get.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/path.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/read.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/rm.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/write.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/entry-index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/memoization.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/disposer.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/fix-owner.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/hash-to-segments.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/move-file.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/tmp.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/verify.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/ls.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/node_modules/.bin/mkdirp delete mode 100755 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/node_modules/.bin/rimraf delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/put.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/rm.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/verify.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/chownr delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/fs-minipass delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/glob delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/infer-owner delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/lru-cache delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-collect delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-flush delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-pipeline delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/mkdirp delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/p-map delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/promise-inflight delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/rimraf delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/ssri delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/tar delete mode 120000 services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/unique-filename delete mode 100644 services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/chownr.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/chownr.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/readme.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/README.md delete mode 100755 services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/bin.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/index.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/node_modules/.bin/color-support delete mode 100644 services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/README.markdown delete mode 100644 services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/example/map.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/test/map.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/bun.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/bunny.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/cloudflare.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/deno.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/node.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/sse.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/uws.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/THIRD-PARTY-LICENSES.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/_request.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/_types.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/adapter.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/adapter.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/bun.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/bunny.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/cloudflare.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/deno.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/error.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/libs/ws.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/node.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/node.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/peer.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/rolldown-runtime.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/sse.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/web.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bun.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bun.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bunny.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bunny.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/cloudflare.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/cloudflare.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/deno.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/deno.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/node.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/node.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/sse.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/sse.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/uws.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/uws.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/index.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/index.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bun.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bun.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bunny.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bunny.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/cloudflare.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/cloudflare.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/default.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/default.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/deno.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/deno.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/node.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/node.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/native.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/native.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/node.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/node.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/sse.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/sse.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/bun.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/bunny.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/deno.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/node.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/websocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/websocket/sse.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/ms delete mode 100644 services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/readme.md delete mode 120000 services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/mimic-response delete mode 100644 services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/lib/deep-extend.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/.npmignore delete mode 100644 services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/History.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/License delete mode 100644 services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/Makefile delete mode 100644 services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/Readme.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/test/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/LICENSE-MIT.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/es2015/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/es2015/text.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/text.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/.prettierrc.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/lib/encoding.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/test/test.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/iconv-lite delete mode 100644 services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/once delete mode 100644 services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/readme.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.editorconfig delete mode 100644 services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.eslintrc.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/bower.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/index.umd.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/test/.eslintrc.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/test/test.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/test.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/.npmignore delete mode 100644 services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/History.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/test/test.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/test/tests.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/minipass delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/aproba delete mode 120000 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/color-support delete mode 120000 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/console-control-strings delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/base-theme.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/error.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/has-color.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/plumbing.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/process.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/progress-bar.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/render-template.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/set-immediate.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/set-interval.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/spin.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/template-item.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/theme-set.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/themes.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/wide-truncate.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/node_modules/.bin/color-support delete mode 100644 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/has-unicode delete mode 120000 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/signal-exit delete mode 120000 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/string-width delete mode 120000 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/strip-ansi delete mode 120000 services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/wide-align delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/example/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/example/url.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/readme.markdown delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/a.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/b.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/c.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/d.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/e.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/url.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/fs.realpath delete mode 100644 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/inflight delete mode 120000 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/inherits delete mode 120000 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/minimatch delete mode 120000 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/once delete mode 120000 services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/path-is-absolute delete mode 100644 services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/@tootallnate/once delete mode 120000 services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/agent-base delete mode 120000 services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/debug delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/agent-base delete mode 120000 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/debug delete mode 100644 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/History.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/ms delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/.github/dependabot.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/Changelog.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-codec.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-data.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/internal.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-codec.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data-generated.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/big5-added.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp936.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp949.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp950.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/eucjp.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gbk-added.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/shiftjis.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf16.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf32.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf7.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/bom-handling.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/streams.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/safer-buffer delete mode 100644 services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.min.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/readme.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/once delete mode 120000 services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/wrappy delete mode 100644 services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/readme.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/.npmignore delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/test.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/.npmignore delete mode 100644 services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/test/basic.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/browser.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/iso.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/node.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/readme.md delete mode 120000 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/isomorphic.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/.github/workflows/node.js.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/.jsdoc.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.d.ts.map delete mode 100755 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.d.ts.map delete mode 100755 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.d.ts.map delete mode 100755 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/coverage/tmp/coverage-70359-1766561372098-0.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta-pitch.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta-pitch.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/readme.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/t3.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/t3.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/deno.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/deno.lock delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/aes-gcm.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/aes-gcm.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array-78849c95.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array-78849c95.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0ecdsa-generate-keypair.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0ecdsa-generate-keypair.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0serve.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0serve.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gendocs.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gendocs.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gentesthtml.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gentesthtml.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary-ac8e39e2.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary-ac8e39e2.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binding.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binding.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel-aca4f606.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel-aca4f606.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer-3e750729.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer-3e750729.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/common.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/common.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions-f5c0c102.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions-f5c0c102.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/aes-gcm.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/aes-gcm.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/common.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/common.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/ecdsa.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/ecdsa.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/jwt.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/jwt.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/rsa-oaep.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/rsa-oaep.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding-76e75827.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding-76e75827.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta-pitch.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta-pitch.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/t3.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/t3.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff-9d236524.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff-9d236524.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom-7e625b09.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom-7e625b09.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/ecdsa.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/ecdsa.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding-1a745c43.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding-1a745c43.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment-1c97264d.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment-1c97264d.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/equality.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/equality.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error-0c1f634f.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error-0c1f634f.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop-a0168106.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop-a0168106.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/fingerprint.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/fingerprint.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function-314580f7.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function-314580f7.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-gf2-polynomial.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-gf2-polynomial.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-uncached.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-uncached.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.node.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.node.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb-46d1e737.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb-46d1e737.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/isomorphic.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/isomorphic.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator-9fc627c1.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator-9fc627c1.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json-092190a1.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json-092190a1.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/jwt.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/jwt.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map-24d263c0.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map-24d263c0.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math-96d5e8c4.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math-96d5e8c4.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex-63f09c81.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex-63f09c81.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number-1fb57bba.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number-1fb57bba.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object-c0c9435b.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object-c0c9435b.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair-ab022bc3.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair-ab022bc3.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/patience.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/patience.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng-37d48618.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng-37d48618.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Mt19937.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Mt19937.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xoroshiro128plus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xoroshiro128plus.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xorshift32.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xorshift32.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise-cda7b9bb.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise-cda7b9bb.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-gf2-polynomial.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-gf2-polynomial.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-uncached.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-uncached.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rollup.config.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rollup.config.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rsa-oaep.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rsa-oaep.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set-5b47859e.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set-5b47859e.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.node.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.node.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort-812cc211.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort-812cc211.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics-65f6114b.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics-65f6114b.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string-fddc5f8b.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string-fddc5f8b.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol-9c439012.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol-9c439012.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time-d8438852.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time-d8438852.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/equality.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/equality.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/fingerprint.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/fingerprint.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/traits.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/traits.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree-9f3c8837.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree-9f3c8837.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket-b073d0fc.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket-b073d0fc.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/isomorphic.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.test.d.ts.map delete mode 100755 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0ecdsa-generate-keypair delete mode 100755 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0gentesthtml delete mode 100755 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0serve delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/rollup.config.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/rollup.config.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.html delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0ecdsa-generate-keypair.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0ecdsa-generate-keypair.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0serve.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0serve.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gendocs.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gendocs.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gentesthtml.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gentesthtml.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/aes-gcm.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/aes-gcm.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/common.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/common.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/ecdsa.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/ecdsa.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/jwt.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/jwt.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/rsa-oaep.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/rsa-oaep.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/binding.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/binding.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/delta.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/delta.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/t3.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/t3.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/diff/patience.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/diff/patience.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-gf2-polynomial.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-gf2-polynomial.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-uncached.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-uncached.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.node.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.node.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Mt19937.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Mt19937.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xoroshiro128plus.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xoroshiro128plus.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xorshift32.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xorshift32.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/equality.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/equality.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/fingerprint.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/fingerprint.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/traits.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/traits.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.d.mts delete mode 100644 services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.min.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/lock.yaml delete mode 100644 services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/yallist delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/agentkeepalive delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/cacache delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/http-cache-semantics delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/http-proxy-agent delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/https-proxy-agent delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/is-lambda delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/lru-cache delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/agent.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/entry.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/errors.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/key.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/policy.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/fetch.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/options.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/remote.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-collect delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-fetch delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-flush delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-pipeline delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/negotiator delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/promise-retry delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/socks-proxy-agent delete mode 120000 services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/ssri delete mode 100644 services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/readme.md delete mode 120000 services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/brace-expansion delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/minimatch.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.eslintrc delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.github/FUNDING.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.nycrc delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/example/parse.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/all_bool.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/bool.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/dash.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/default_bool.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/dotted.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/kv_short.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/long.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/num.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/parse.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/parse_modified.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/proto.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/short.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/stop_early.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/unknown.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/whitespace.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/encoding delete mode 120000 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/abort-error.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/blob.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/body.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/fetch-error.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/headers.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/request.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/response.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-sized delete mode 120000 services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minizlib delete mode 120000 services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/.gitignore delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/package-lock.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/test/basic.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/yallist delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minipass delete mode 100644 services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/constants.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/yallist delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/LICENSE delete mode 100755 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/bin/cmd.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/find-made.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-manual.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-native.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/opts-arg.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/path-arg.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/use-native.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/node_modules/.bin/mkdirp delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/readme.markdown delete mode 100644 services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/license.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/readme.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/index.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/HISTORY.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/charset.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/encoding.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/language.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/mediaType.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/abi_registry.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/index.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/node_modules/.bin/semver delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/semver delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/common.gypi delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/except.gypi delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/napi-inl.deprecated.h delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/napi-inl.h delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/napi.h delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/node_addon_api.gyp delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/node_api.gyp delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/noexcept.gypi delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/nothing.c delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/package-support.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/check-napi.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/clang-format.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/conversion.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/eslint-format.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/env-paths delete mode 120000 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/glob delete mode 120000 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/graceful-fs delete mode 120000 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/make-fetch-happen delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/release-please.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/tests.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/visual-studio.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/addon.gypi delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/bin/node-gyp.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Common-issues.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Error-pre-versions-of-node-cannot-be-installed.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Home.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Linking-to-OpenSSL.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Updating-npm-bundled-node-gyp.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/binding.gyp-files-in-the-wild.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.flake8 delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/Python_tests.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/node-gyp.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/nodejs-windows.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/release-please.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/AUTHORS delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CODE_OF_CONDUCT.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp.bat delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp_main.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/__init__.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/common.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/common_test.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/input.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/input_test.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/requirements_dev.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/setup.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/test_gyp.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/README delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/README delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/emacs/README delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/emacs/gyp.el delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/graphviz.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_gyp.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_sln.py delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_vcproj.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/Find-VisualStudio.cs delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/build.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/clean.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/configure.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/create-config-gypi.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-node-directory.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-python.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-visualstudio.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/install.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/list.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/node-gyp.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/process-release.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/rebuild.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/remove.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/util.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/macOS_Catalina.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/macOS_Catalina_acid_test.sh delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/node-gyp delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/node-which delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/nopt delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/rimraf delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/semver delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/src/win_delay_load_hook.cc delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/common.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Express.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/ca-bundle.crt delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/ca.crt delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/nodedir/include/node/config.gypi delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/server.crt delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/server.key delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/test-charmap.py delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/process-exec-sync.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/simple-proxy.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-addon.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-configure-python.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-create-config-gypi.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-download.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-accessible-sync.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-node-directory.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-python.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-visualstudio.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-install.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-options.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-process-release.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/update-gyp.py delete mode 120000 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/nopt delete mode 120000 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/npmlog delete mode 120000 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/rimraf delete mode 120000 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/semver delete mode 120000 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/tar delete mode 120000 services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/which delete mode 100755 services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0ecdsa-generate-keypair delete mode 100755 services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0gentesthtml delete mode 100755 services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0serve delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@hocuspocus/common delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/core delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-blockquote delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-bold delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-bullet-list delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-code delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-code-block delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-document delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-dropcursor delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-gapcursor delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-hard-break delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-heading delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-horizontal-rule delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-italic delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-link delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list-item delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list-keymap delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-ordered-list delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-paragraph delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-strike delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-text delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-underline delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extensions delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/pm delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/async-mutex delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/crossws delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/isomorphic.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/kleur delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/lib0 delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/linkifyjs delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/orderedmap delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-changeset delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-commands delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-dropcursor delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-gapcursor delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-history delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-inputrules delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-keymap delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-model delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-schema-list delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-state delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-tables delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-transform delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-view delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/rope-sequence delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/tslib delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/w3c-keyname delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/y-prosemirror delete mode 120000 services/hocuspocus/node_modules/.pnpm/node_modules/y-protocols delete mode 120000 services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/abbrev delete mode 100644 services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/README.md delete mode 100755 services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/bin/nopt.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/lib/nopt.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/node_modules/.bin/nopt delete mode 100644 services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/are-we-there-yet delete mode 120000 services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/console-control-strings delete mode 120000 services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/gauge delete mode 100644 services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/lib/log.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/set-blocking delete mode 100644 services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/once.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/wrappy delete mode 100644 services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/aggregate-error delete mode 100644 services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/readme.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/readme.md delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/detect-libc delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/expand-template delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/github-from-package delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/minimist delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/mkdirp-classic delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/napi-build-utils delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/node-abi delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/asset.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/bin.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/download.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/error.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/help.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/log.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/node_modules/.bin/prebuild-install delete mode 100755 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/node_modules/.bin/rc delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/proxy.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/rc.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/util.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/pump delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/rc delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/simple-get delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/tar-fs delete mode 120000 services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/tunnel-agent delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/inflight.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/err-code delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.editorconfig delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.jshintrc delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/test/test.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/retry delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/change.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/changeset.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/diff.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/simplify.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-changed-range.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-changes.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-diff.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-merge.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-simplify.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-transform delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/.tern-project delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/src/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/src/commands.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-model delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-state delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-transform delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/src/dropcursor.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-state delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-transform delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-view delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/gapcursor.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/style/gapcursor.css delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-keymap delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-model delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-state delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-view delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/.tern-project delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/src/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/src/history.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-state delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-transform delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-view delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/rope-sequence delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/.tern-project delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/inputrules.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/rulebuilders.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/rules.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-state delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-transform delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/.tern-project delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/src/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/src/keymap.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-state delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/w3c-keyname delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/orderedmap delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/.tern-project delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/comparedeep.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/content.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/diff.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/dom.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/fragment.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/from_dom.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/mark.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/node.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/replace.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/resolvedpos.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/schema.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/src/to_dom.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-model delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/.tern-project delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/src/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list/src/schema-list.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-state delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-schema-list@1.5.1/node_modules/prosemirror-transform delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-model delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/.tern-project delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/src/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/src/plugin.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/src/selection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/src/state.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/src/transaction.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-transform delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-view delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-keymap delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-model delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-state delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/dist/index.d.cts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/dist/index.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/style/tables.css delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-transform delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-view delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-model delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/.tern-project delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/src/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/src/attr_step.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/src/map.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/src/mark.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/src/mark_step.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/src/replace.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/src/replace_step.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/src/step.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/src/structure.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/src/transform.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-model delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-state delete mode 120000 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-transform delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/.tern-project delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/browser.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/capturekeys.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/clipboard.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/decoration.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/dom.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/domchange.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/domcoords.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/domobserver.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/index.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/input.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/selection.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/src/viewdesc.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/prosemirror-view@1.41.8/node_modules/prosemirror-view/style/prosemirror.css delete mode 120000 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/end-of-stream delete mode 120000 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/once delete mode 100644 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/pump/.github/FUNDING.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/pump/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/pump/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/pump/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/pump/SECURITY.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/pump/empty.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/pump/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/pump/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/pump/test-browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/pump@3.0.4/node_modules/pump/test-node.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/deep-extend delete mode 120000 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/ini delete mode 120000 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/minimist delete mode 100644 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/LICENSE.APACHE2 delete mode 100644 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/LICENSE.BSD delete mode 100644 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/LICENSE.MIT delete mode 100644 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/browser.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/cli.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/node_modules/.bin/rc delete mode 100644 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/test/ini.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/test/nested-env-vars.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/test/test.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/strip-json-comments delete mode 120000 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/inherits delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/CONTRIBUTING.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/GOVERNANCE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/experimentalWarning.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from-browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream-browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable-browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/string_decoder delete mode 120000 services/hocuspocus/node_modules/.pnpm/readable-stream@3.6.2/node_modules/util-deprecate delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/.npmignore delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/License delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/Makefile delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/equation.gif delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/example/dns.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/example/stop.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/test/common.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/test/integration/test-forever.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/test/integration/test-retry-operation.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/test/integration/test-retry-wrap.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/retry@0.12.0/node_modules/retry/test/integration/test-timeouts.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/glob delete mode 100644 services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/README.md delete mode 100755 services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/bin.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/node_modules/.bin/rimraf delete mode 100644 services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/test.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/Porting-Buffer.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/Readme.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/dangerous.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/tests.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/README.md delete mode 100755 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/bin/semver.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/classes/comparator.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/classes/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/classes/range.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/classes/semver.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/clean.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/cmp.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/coerce.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/compare-build.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/compare-loose.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/compare.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/diff.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/eq.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/gt.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/gte.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/inc.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/lt.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/lte.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/major.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/minor.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/neq.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/parse.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/patch.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/prerelease.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/rcompare.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/rsort.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/satisfies.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/sort.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/truncate.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/functions/valid.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/internal/constants.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/internal/debug.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/internal/identifiers.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/internal/lrucache.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/internal/parse-options.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/internal/re.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/node_modules/.bin/semver delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/preload.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/range.bnf delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/ranges/gtr.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/ranges/intersects.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/ranges/ltr.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/ranges/max-satisfying.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/ranges/min-satisfying.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/ranges/min-version.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/ranges/outside.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/ranges/simplify.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/ranges/subset.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/ranges/to-comparators.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/ranges/valid.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/set-blocking@2.0.0/node_modules/set-blocking/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/set-blocking@2.0.0/node_modules/set-blocking/LICENSE.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/set-blocking@2.0.0/node_modules/set-blocking/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/set-blocking@2.0.0/node_modules/set-blocking/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/set-blocking@2.0.0/node_modules/set-blocking/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/LICENSE.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-concat@1.0.1/node_modules/simple-concat/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-concat@1.0.1/node_modules/simple-concat/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-concat@1.0.1/node_modules/simple-concat/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-concat@1.0.1/node_modules/simple-concat/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-concat@1.0.1/node_modules/simple-concat/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-concat@1.0.1/node_modules/simple-concat/test/basic.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/simple-get@4.0.1/node_modules/decompress-response delete mode 120000 services/hocuspocus/node_modules/.pnpm/simple-get@4.0.1/node_modules/once delete mode 120000 services/hocuspocus/node_modules/.pnpm/simple-get@4.0.1/node_modules/simple-concat delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-get@4.0.1/node_modules/simple-get/.github/dependabot.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-get@4.0.1/node_modules/simple-get/.github/workflows/ci.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-get@4.0.1/node_modules/simple-get/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-get@4.0.1/node_modules/simple-get/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-get@4.0.1/node_modules/simple-get/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/simple-get@4.0.1/node_modules/simple-get/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/.prettierrc.yaml delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/smartbuffer.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/smartbuffer.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/utils.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/utils.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/docs/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/docs/README_v3.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/docs/ROADMAP.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/typings/smartbuffer.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/typings/utils.d.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/socks-proxy-agent@6.2.1/node_modules/agent-base delete mode 120000 services/hocuspocus/node_modules/.pnpm/socks-proxy-agent@6.2.1/node_modules/debug delete mode 120000 services/hocuspocus/node_modules/.pnpm/socks-proxy-agent@6.2.1/node_modules/socks delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks-proxy-agent@6.2.1/node_modules/socks-proxy-agent/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks-proxy-agent@6.2.1/node_modules/socks-proxy-agent/dist/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks-proxy-agent@6.2.1/node_modules/socks-proxy-agent/dist/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks-proxy-agent@6.2.1/node_modules/socks-proxy-agent/dist/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks-proxy-agent@6.2.1/node_modules/socks-proxy-agent/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/ip-address delete mode 120000 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/smart-buffer delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/.eslintrc.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/.prettierrc.yaml delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/client/socksclient.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/client/socksclient.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/common/constants.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/common/constants.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/common/helpers.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/common/helpers.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/common/receivebuffer.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/common/receivebuffer.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/common/util.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/common/util.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/build/index.js.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/docs/examples/index.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/docs/examples/javascript/associateExample.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/docs/examples/javascript/bindExample.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/docs/examples/javascript/connectExample.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/docs/examples/typescript/associateExample.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/docs/examples/typescript/bindExample.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/docs/examples/typescript/connectExample.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/docs/index.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/docs/migratingFromV1.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/typings/client/socksclient.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/typings/common/constants.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/typings/common/helpers.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/typings/common/receivebuffer.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/typings/common/util.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/socks@2.8.9/node_modules/socks/typings/index.d.ts delete mode 120000 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/bindings delete mode 120000 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/node-addon-api delete mode 120000 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/node-gyp delete mode 120000 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/prebuild-install delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/binding.gyp delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/deps/common-sqlite.gypi delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/deps/extract.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/deps/sqlite-autoconf-3440200.tar.gz delete mode 100755 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/deps/sqlite3.gyp delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/lib/sqlite3-binding.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/lib/sqlite3.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/lib/sqlite3.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/lib/trace.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/node_modules/.bin/node-gyp delete mode 100755 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/node_modules/.bin/prebuild-install delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/src/async.h delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/src/backup.cc delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/src/backup.h delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/src/database.cc delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/src/database.h delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/src/gcc-preinclude.h delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/src/macros.h delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/src/node_sqlite3.cc delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/src/statement.cc delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/src/statement.h delete mode 100644 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/sqlite3/src/threading.h delete mode 120000 services/hocuspocus/node_modules/.pnpm/sqlite3@5.1.7/node_modules/tar delete mode 120000 services/hocuspocus/node_modules/.pnpm/ssri@8.0.1/node_modules/minipass delete mode 100644 services/hocuspocus/node_modules/.pnpm/ssri@8.0.1/node_modules/ssri/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/ssri@8.0.1/node_modules/ssri/LICENSE.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/ssri@8.0.1/node_modules/ssri/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/ssri@8.0.1/node_modules/ssri/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ssri@8.0.1/node_modules/ssri/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/string-width@4.2.3/node_modules/emoji-regex delete mode 120000 services/hocuspocus/node_modules/.pnpm/string-width@4.2.3/node_modules/is-fullwidth-code-point delete mode 100644 services/hocuspocus/node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/readme.md delete mode 120000 services/hocuspocus/node_modules/.pnpm/string-width@4.2.3/node_modules/strip-ansi delete mode 120000 services/hocuspocus/node_modules/.pnpm/string_decoder@1.3.0/node_modules/safe-buffer delete mode 100644 services/hocuspocus/node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/strip-ansi@6.0.1/node_modules/ansi-regex delete mode 100644 services/hocuspocus/node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/readme.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/strip-json-comments@2.0.1/node_modules/strip-json-comments/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/strip-json-comments@2.0.1/node_modules/strip-json-comments/license delete mode 100644 services/hocuspocus/node_modules/.pnpm/strip-json-comments@2.0.1/node_modules/strip-json-comments/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/strip-json-comments@2.0.1/node_modules/strip-json-comments/readme.md delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/chownr delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/mkdirp-classic delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/pump delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/test/fixtures/a/hello.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/test/fixtures/b/a/test.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/test/fixtures/d/file1 delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/test/fixtures/d/file2 delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/test/fixtures/d/sub-files/file3 delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/test/fixtures/d/sub-files/file4 delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/test/fixtures/e/directory/.ignore delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/test/fixtures/e/file delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/test/fixtures/invalid.tar delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-fs/test/index.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar-fs@2.1.4/node_modules/tar-stream delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/bl delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/end-of-stream delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/fs-constants delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/inherits delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/readable-stream delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/extract.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/headers.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/pack.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/sandbox.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/chownr delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/fs-minipass delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/minipass delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/minizlib delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/mkdirp delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/create.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/extract.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/get-write-flag.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/header.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/high-level-opt.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/large-numbers.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/list.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/mkdir.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/mode-fix.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/normalize-unicode.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/normalize-windows-path.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/pack.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/parse.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/path-reservations.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/pax.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/read-entry.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/replace.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/strip-absolute-path.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/strip-trailing-slashes.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/types.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/unpack.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/update.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/warn-mixin.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/winchars.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/write-entry.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/node_modules/.bin/mkdirp delete mode 100644 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/tar/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/tar@6.2.1/node_modules/yallist delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/CopyrightNotice.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/LICENSE.txt delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/SECURITY.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.html delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.html delete mode 100644 services/hocuspocus/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/tunnel-agent@0.6.0/node_modules/safe-buffer delete mode 100644 services/hocuspocus/node_modules/.pnpm/tunnel-agent@0.6.0/node_modules/tunnel-agent/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/tunnel-agent@0.6.0/node_modules/tunnel-agent/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/tunnel-agent@0.6.0/node_modules/tunnel-agent/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/tunnel-agent@0.6.0/node_modules/tunnel-agent/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/.nyc_output/54942.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/.nyc_output/54944.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/coverage/__root__/index.html delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/coverage/__root__/index.js.html delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/coverage/base.css delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/coverage/index.html delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/coverage/prettify.css delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/coverage/prettify.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/coverage/sort-arrow-sprite.png delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/coverage/sorter.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-filename/test/index.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/unique-filename@1.1.1/node_modules/unique-slug delete mode 120000 services/hocuspocus/node_modules/.pnpm/unique-slug@2.0.2/node_modules/imurmurhash delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-slug@2.0.2/node_modules/unique-slug/.travis.yml delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-slug@2.0.2/node_modules/unique-slug/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-slug@2.0.2/node_modules/unique-slug/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-slug@2.0.2/node_modules/unique-slug/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-slug@2.0.2/node_modules/unique-slug/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/unique-slug@2.0.2/node_modules/unique-slug/test/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/History.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/.tern-port delete mode 100644 services/hocuspocus/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.d.cts delete mode 100644 services/hocuspocus/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/package.json delete mode 120000 services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/isexe delete mode 100644 services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/which/CHANGELOG.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/which/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/which/README.md delete mode 100755 services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/which/bin/node-which delete mode 100755 services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/which/node_modules/.bin/node-which delete mode 100644 services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/which/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/wide-align@1.1.5/node_modules/string-width delete mode 100755 services/hocuspocus/node_modules/.pnpm/wide-align@1.1.5/node_modules/wide-align/LICENSE delete mode 100755 services/hocuspocus/node_modules/.pnpm/wide-align@1.1.5/node_modules/wide-align/README.md delete mode 100755 services/hocuspocus/node_modules/.pnpm/wide-align@1.1.5/node_modules/wide-align/align.js delete mode 100755 services/hocuspocus/node_modules/.pnpm/wide-align@1.1.5/node_modules/wide-align/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/browser.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/ws@8.21.0/node_modules/ws/wrapper.mjs delete mode 120000 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/lib0 delete mode 120000 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/prosemirror-model delete mode 120000 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/prosemirror-state delete mode 120000 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/prosemirror-view delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/dist/src/lib.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/dist/src/plugins/cursor-plugin.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/dist/src/plugins/keys.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/dist/src/plugins/sync-plugin.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/dist/src/plugins/undo-plugin.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/dist/src/utils.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/dist/src/y-prosemirror.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/dist/y-prosemirror.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/dist/y-prosemirror.cjs.map delete mode 100755 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/node_modules/.bin/0ecdsa-generate-keypair delete mode 100755 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/node_modules/.bin/0gentesthtml delete mode 100755 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/node_modules/.bin/0serve delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/src/lib.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/src/plugins/cursor-plugin.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/src/plugins/keys.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/src/plugins/sync-plugin.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/src/plugins/undo-plugin.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/src/utils.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror/src/y-prosemirror.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-protocols delete mode 120000 services/hocuspocus/node_modules/.pnpm/y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/yjs delete mode 120000 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/lib0 delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/auth.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/auth.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/auth.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/awareness.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/awareness.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/awareness.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/awareness.test.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/awareness.test.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/awareness.test.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/dist/auth.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/dist/auth.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/dist/awareness.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/dist/awareness.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/dist/sync.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/dist/sync.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/dist/test.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/dist/test.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/dist/test.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/dist/test.js.map delete mode 100755 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/node_modules/.bin/0ecdsa-generate-keypair delete mode 100755 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/node_modules/.bin/0gentesthtml delete mode 100755 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/node_modules/.bin/0serve delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/sync.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/sync.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/sync.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/yjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js delete mode 120000 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/lib0 delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/LICENSE delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/README.md delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/index.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/index.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/internals.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/internals.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentAny.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentAny.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentBinary.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentBinary.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentDeleted.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentDeleted.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentDoc.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentDoc.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentEmbed.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentEmbed.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentFormat.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentFormat.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentJSON.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentJSON.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentString.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentString.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentType.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/ContentType.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/GC.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/GC.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/Item.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/Item.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/Skip.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/structs/Skip.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/AbstractType.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/AbstractType.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YArray.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YArray.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YMap.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YMap.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YText.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YText.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YXmlElement.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YXmlElement.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YXmlEvent.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YXmlEvent.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YXmlFragment.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YXmlFragment.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YXmlHook.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YXmlHook.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YXmlText.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/types/YXmlText.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/AbstractConnector.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/AbstractConnector.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/DeleteSet.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/DeleteSet.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/Doc.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/Doc.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/EventHandler.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/EventHandler.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/ID.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/ID.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/PermanentUserData.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/PermanentUserData.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/RelativePosition.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/RelativePosition.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/Snapshot.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/Snapshot.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/StructStore.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/StructStore.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/Transaction.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/Transaction.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/UndoManager.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/UndoManager.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/UpdateDecoder.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/UpdateDecoder.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/YEvent.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/YEvent.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/encoding.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/encoding.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/isParentOf.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/isParentOf.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/logging.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/logging.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/updates.d.ts delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/src/utils/updates.d.ts.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/testHelper.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/yjs.cjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/yjs.cjs.map delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/yjs.mjs delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/yjs.mjs.map delete mode 100755 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/node_modules/.bin/0ecdsa-generate-keypair delete mode 100755 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/node_modules/.bin/0gentesthtml delete mode 100755 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/node_modules/.bin/0serve delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/package.json delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/index.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/internals.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/AbstractStruct.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/ContentAny.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/ContentBinary.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/ContentDeleted.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/ContentDoc.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/ContentEmbed.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/ContentFormat.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/ContentJSON.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/ContentString.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/ContentType.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/GC.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/Item.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/structs/Skip.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/types/AbstractType.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/types/YArray.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/types/YMap.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/types/YText.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/types/YXmlElement.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/types/YXmlEvent.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/types/YXmlFragment.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/types/YXmlHook.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/types/YXmlText.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/AbstractConnector.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/DeleteSet.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/Doc.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/EventHandler.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/ID.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/PermanentUserData.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/RelativePosition.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/Snapshot.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/StructStore.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/Transaction.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/UndoManager.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/UpdateDecoder.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/UpdateEncoder.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/YEvent.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/encoding.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/isParentOf.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/logging.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/src/utils/updates.js delete mode 100644 services/hocuspocus/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/tests/testHelper.js delete mode 120000 services/hocuspocus/node_modules/@hocuspocus/server delete mode 120000 services/hocuspocus/node_modules/@hocuspocus/transformer delete mode 120000 services/hocuspocus/node_modules/@tiptap/starter-kit delete mode 120000 services/hocuspocus/node_modules/yjs diff --git a/.gitignore b/.gitignore index 14d1398..f72f478 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,6 @@ Thumbs.db # Docker data (local volumes) docker-data/ + +# Node.js +node_modules/ diff --git a/services/hocuspocus/node_modules/.bin/node-gyp b/services/hocuspocus/node_modules/.bin/node-gyp deleted file mode 100755 index b66f5e6..0000000 --- a/services/hocuspocus/node_modules/.bin/node-gyp +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../.pnpm/node-gyp@8.4.1/node_modules/node-gyp/bin/node-gyp.js" "$@" -else - exec node "$basedir/../.pnpm/node-gyp@8.4.1/node_modules/node-gyp/bin/node-gyp.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.modules.yaml b/services/hocuspocus/node_modules/.modules.yaml deleted file mode 100644 index cdb87f3..0000000 --- a/services/hocuspocus/node_modules/.modules.yaml +++ /dev/null @@ -1,121 +0,0 @@ -hoistPattern: - - '*' -hoistedDependencies: - '@hocuspocus/common@4.1.0': - '@hocuspocus/common': private - '@tiptap/core@3.26.0(@tiptap/pm@3.26.0)': - '@tiptap/core': private - '@tiptap/extension-blockquote@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - '@tiptap/extension-blockquote': private - '@tiptap/extension-bold@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - '@tiptap/extension-bold': private - '@tiptap/extension-bullet-list@3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - '@tiptap/extension-bullet-list': private - '@tiptap/extension-code-block@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)': - '@tiptap/extension-code-block': private - '@tiptap/extension-code@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - '@tiptap/extension-code': private - '@tiptap/extension-document@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - '@tiptap/extension-document': private - '@tiptap/extension-dropcursor@3.26.0(@tiptap/extensions@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - '@tiptap/extension-dropcursor': private - '@tiptap/extension-gapcursor@3.26.0(@tiptap/extensions@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - '@tiptap/extension-gapcursor': private - '@tiptap/extension-hard-break@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - '@tiptap/extension-hard-break': private - '@tiptap/extension-heading@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - '@tiptap/extension-heading': private - '@tiptap/extension-horizontal-rule@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)': - '@tiptap/extension-horizontal-rule': private - '@tiptap/extension-italic@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - '@tiptap/extension-italic': private - '@tiptap/extension-link@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)': - '@tiptap/extension-link': private - '@tiptap/extension-list-item@3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - '@tiptap/extension-list-item': private - '@tiptap/extension-list-keymap@3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - '@tiptap/extension-list-keymap': private - '@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)': - '@tiptap/extension-list': private - '@tiptap/extension-ordered-list@3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - '@tiptap/extension-ordered-list': private - '@tiptap/extension-paragraph@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - '@tiptap/extension-paragraph': private - '@tiptap/extension-strike@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - '@tiptap/extension-strike': private - '@tiptap/extension-text@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - '@tiptap/extension-text': private - '@tiptap/extension-underline@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - '@tiptap/extension-underline': private - '@tiptap/extensions@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)': - '@tiptap/extensions': private - '@tiptap/pm@3.26.0': - '@tiptap/pm': private - async-mutex@0.5.0: - async-mutex: private - crossws@0.4.5: - crossws: private - isomorphic.js@0.2.5: - isomorphic.js: private - kleur@4.1.5: - kleur: private - lib0@0.2.117: - lib0: private - linkifyjs@4.3.3: - linkifyjs: private - orderedmap@2.1.1: - orderedmap: private - prosemirror-changeset@2.4.1: - prosemirror-changeset: private - prosemirror-commands@1.7.1: - prosemirror-commands: private - prosemirror-dropcursor@1.8.2: - prosemirror-dropcursor: private - prosemirror-gapcursor@1.4.1: - prosemirror-gapcursor: private - prosemirror-history@1.5.0: - prosemirror-history: private - prosemirror-inputrules@1.5.1: - prosemirror-inputrules: private - prosemirror-keymap@1.2.3: - prosemirror-keymap: private - prosemirror-model@1.25.7: - prosemirror-model: private - prosemirror-schema-list@1.5.1: - prosemirror-schema-list: private - prosemirror-state@1.4.4: - prosemirror-state: private - prosemirror-tables@1.8.5: - prosemirror-tables: private - prosemirror-transform@1.12.0: - prosemirror-transform: private - prosemirror-view@1.41.8: - prosemirror-view: private - rope-sequence@1.3.4: - rope-sequence: private - tslib@2.8.1: - tslib: private - w3c-keyname@2.2.8: - w3c-keyname: private - y-prosemirror@1.3.7(prosemirror-model@1.25.7)(prosemirror-state@1.4.4)(prosemirror-view@1.41.8)(y-protocols@1.0.7(yjs@13.6.31))(yjs@13.6.31): - y-prosemirror: private - y-protocols@1.0.7(yjs@13.6.31): - y-protocols: private -included: - dependencies: true - devDependencies: true - optionalDependencies: true -injectedDeps: {} -layoutVersion: 5 -nodeLinker: isolated -packageManager: pnpm@10.22.0 -pendingBuilds: [] -prunedAt: Tue, 09 Jun 2026 08:22:21 GMT -publicHoistPattern: [] -registries: - '@jsr': https://npm.jsr.io/ - default: https://registry.npmjs.org/ -skipped: [] -storeDir: /Users/red/.local/share/pnpm/store/v10 -virtualStoreDir: .pnpm -virtualStoreDirMaxLength: 120 diff --git a/services/hocuspocus/node_modules/.pnpm-workspace-state-v1.json b/services/hocuspocus/node_modules/.pnpm-workspace-state-v1.json deleted file mode 100644 index 368d3fc..0000000 --- a/services/hocuspocus/node_modules/.pnpm-workspace-state-v1.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "lastValidatedTimestamp": 1780995133107, - "projects": {}, - "pnpmfiles": [], - "settings": { - "autoInstallPeers": true, - "dedupeDirectDeps": false, - "dedupeInjectedDeps": true, - "dedupePeerDependents": true, - "dev": true, - "excludeLinksFromLockfile": false, - "hoistPattern": [ - "*" - ], - "hoistWorkspacePackages": true, - "injectWorkspacePackages": false, - "linkWorkspacePackages": false, - "nodeLinker": "isolated", - "optional": true, - "preferWorkspacePackages": false, - "production": true, - "publicHoistPattern": [] - }, - "filteredInstall": false -} diff --git a/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/LICENSE.md deleted file mode 100644 index 64f7732..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/LICENSE.md +++ /dev/null @@ -1,10 +0,0 @@ -The MIT License (MIT) - -Copyright © 2020-2022 Michael Garvin - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/README.md b/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/README.md deleted file mode 100644 index 465c546..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# @gar/promisify - -### Promisify an entire object or class instance - -This module leverages es6 Proxy and Reflect to promisify every function in an -object or class instance. - -It assumes the callback that the function is expecting is the last -parameter, and that it is an error-first callback with only one value, -i.e. `(err, value) => ...`. This mirrors node's `util.promisify` method. - -In order that you can use it as a one-stop-shop for all your promisify -needs, you can also pass it a function. That function will be -promisified as normal using node's built-in `util.promisify` method. - -[node's custom promisified -functions](https://nodejs.org/api/util.html#util_custom_promisified_functions) -will also be mirrored, further allowing this to be a drop-in replacement -for the built-in `util.promisify`. - -### Examples - -Promisify an entire object - -```javascript - -const promisify = require('@gar/promisify') - -class Foo { - constructor (attr) { - this.attr = attr - } - - double (input, cb) { - cb(null, input * 2) - } - -const foo = new Foo('baz') -const promisified = promisify(foo) - -console.log(promisified.attr) -console.log(await promisified.double(1024)) -``` - -Promisify a function - -```javascript - -const promisify = require('@gar/promisify') - -function foo (a, cb) { - if (a !== 'bad') { - return cb(null, 'ok') - } - return cb('not ok') -} - -const promisified = promisify(foo) - -// This will resolve to 'ok' -promisified('good') - -// this will reject -promisified('bad') -``` diff --git a/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/index.js b/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/index.js deleted file mode 100644 index d0be95f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/index.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict' - -const { promisify } = require('util') - -const handler = { - get: function (target, prop, receiver) { - if (typeof target[prop] !== 'function') { - return target[prop] - } - if (target[prop][promisify.custom]) { - return function () { - return Reflect.get(target, prop, receiver)[promisify.custom].apply(target, arguments) - } - } - return function () { - return new Promise((resolve, reject) => { - Reflect.get(target, prop, receiver).apply(target, [...arguments, function (err, result) { - if (err) { - return reject(err) - } - resolve(result) - }]) - }) - } - } -} - -module.exports = function (thingToPromisify) { - if (typeof thingToPromisify === 'function') { - return promisify(thingToPromisify) - } - if (typeof thingToPromisify === 'object') { - return new Proxy(thingToPromisify, handler) - } - throw new TypeError('Can only promisify functions or objects') -} diff --git a/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/package.json b/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/package.json deleted file mode 100644 index d0ce69b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@gar+promisify@1.1.3/node_modules/@gar/promisify/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@gar/promisify", - "version": "1.1.3", - "description": "Promisify an entire class or object", - "main": "index.js", - "repository": { - "type": "git", - "url": "https://github.com/wraithgar/gar-promisify.git" - }, - "scripts": { - "lint": "standard", - "lint:fix": "standard --fix", - "test": "lab -a @hapi/code -t 100", - "posttest": "npm run lint" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promisify", - "all", - "class", - "object" - ], - "author": "Gar ", - "license": "MIT", - "devDependencies": { - "@hapi/code": "^8.0.1", - "@hapi/lab": "^24.1.0", - "standard": "^16.0.3" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/README.md b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/README.md deleted file mode 100644 index 571f01d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# @hocuspocus/common -[![Version](https://img.shields.io/npm/v/@hocuspocus/common.svg?label=version)](https://www.npmjs.com/package/@hocuspocus/common) -[![Downloads](https://img.shields.io/npm/dm/@hocuspocus/common.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@hocuspocus/common.svg)](https://www.npmjs.com/package/@hocuspocus/common) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction -Hocuspocus is an opinionated collaborative editing backend for [Tiptap](https://github.com/ueberdosis/tiptap) – based on [Y.js](https://github.com/yjs/yjs), a CRDT framework with a powerful abstraction of shared data. - -## Official Documentation -Documentation can be found in the [GitHub repository](https://github.com/ueberdosis/hocuspocus). - -## License -Hocuspocus is open-sourced software licensed under the [MIT license](https://github.com/ueberdosis/hocuspocus/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs deleted file mode 100644 index a293ef4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs +++ /dev/null @@ -1,521 +0,0 @@ -'use strict'; - -/** - * Common Math expressions. - * - * @module math - */ - -const floor = Math.floor; - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The smaller element of a and b - */ -const min = (a, b) => a < b ? a : b; - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The bigger element of a and b - */ -const max = (a, b) => a > b ? a : b; - -/* eslint-env browser */ - -const BIT8 = 128; -const BITS7 = 127; - -/** - * Utility helpers for working with numbers. - * - * @module number - */ - - -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER; - -/** - * @param {string} str - * @return {Uint8Array} - */ -const _encodeUtf8Polyfill = str => { - const encodedString = unescape(encodeURIComponent(str)); - const len = encodedString.length; - const buf = new Uint8Array(len); - for (let i = 0; i < len; i++) { - buf[i] = /** @type {number} */ (encodedString.codePointAt(i)); - } - return buf -}; - -/* c8 ignore next */ -const utf8TextEncoder = /** @type {TextEncoder} */ (typeof TextEncoder !== 'undefined' ? new TextEncoder() : null); - -/** - * @param {string} str - * @return {Uint8Array} - */ -const _encodeUtf8Native = str => utf8TextEncoder.encode(str); - -/** - * @param {string} str - * @return {Uint8Array} - */ -/* c8 ignore next */ -const encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill; - -/* c8 ignore next */ -let utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }); - -/* c8 ignore start */ -if (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) { - // Safari doesn't handle BOM correctly. - // This fixes a bug in Safari 13.0.5 where it produces a BOM the first time it is called. - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the first call and - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the second call - // Another issue is that from then on no BOM chars are recognized anymore - /* c8 ignore next */ - utf8TextDecoder = null; -} - -/** - * Efficient schema-less binary encoding with support for variable length encoding. - * - * Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module encoding - */ - - -/** - * Write one byte to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {number} num The byte that is to be encoded. - */ -const write = (encoder, num) => { - const bufferLen = encoder.cbuf.length; - if (encoder.cpos === bufferLen) { - encoder.bufs.push(encoder.cbuf); - encoder.cbuf = new Uint8Array(bufferLen * 2); - encoder.cpos = 0; - } - encoder.cbuf[encoder.cpos++] = num; -}; - -/** - * Write a variable length unsigned integer. Max encodable integer is 2^53. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -const writeVarUint = (encoder, num) => { - while (num > BITS7) { - write(encoder, BIT8 | (BITS7 & num)); - num = floor(num / 128); // shift >>> 7 - } - write(encoder, BITS7 & num); -}; - -/** - * A cache to store strings temporarily - */ -const _strBuffer = new Uint8Array(30000); -const _maxStrBSize = _strBuffer.length / 3; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -const _writeVarStringNative = (encoder, str) => { - if (str.length < _maxStrBSize) { - // We can encode the string into the existing buffer - /* c8 ignore next */ - const written = utf8TextEncoder.encodeInto(str, _strBuffer).written || 0; - writeVarUint(encoder, written); - for (let i = 0; i < written; i++) { - write(encoder, _strBuffer[i]); - } - } else { - writeVarUint8Array(encoder, encodeUtf8(str)); - } -}; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -const _writeVarStringPolyfill = (encoder, str) => { - const encodedString = unescape(encodeURIComponent(str)); - const len = encodedString.length; - writeVarUint(encoder, len); - for (let i = 0; i < len; i++) { - write(encoder, /** @type {number} */ (encodedString.codePointAt(i))); - } -}; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -/* c8 ignore next */ -const writeVarString = (utf8TextEncoder && /** @type {any} */ (utf8TextEncoder).encodeInto) ? _writeVarStringNative : _writeVarStringPolyfill; - -/** - * Append fixed-length Uint8Array to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -const writeUint8Array = (encoder, uint8Array) => { - const bufferLen = encoder.cbuf.length; - const cpos = encoder.cpos; - const leftCopyLen = min(bufferLen - cpos, uint8Array.length); - const rightCopyLen = uint8Array.length - leftCopyLen; - encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos); - encoder.cpos += leftCopyLen; - if (rightCopyLen > 0) { - // Still something to write, write right half.. - // Append new buffer - encoder.bufs.push(encoder.cbuf); - // must have at least size of remaining buffer - encoder.cbuf = new Uint8Array(max(bufferLen * 2, rightCopyLen)); - // copy array - encoder.cbuf.set(uint8Array.subarray(leftCopyLen)); - encoder.cpos = rightCopyLen; - } -}; - -/** - * Append an Uint8Array to Encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -const writeVarUint8Array = (encoder, uint8Array) => { - writeVarUint(encoder, uint8Array.byteLength); - writeUint8Array(encoder, uint8Array); -}; - -/** - * Error helpers. - * - * @module error - */ - -/** - * @param {string} s - * @return {Error} - */ -/* c8 ignore next */ -const create = s => new Error(s); - -/** - * Efficient schema-less binary decoding with support for variable length encoding. - * - * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module decoding - */ - - -const errorUnexpectedEndOfArray = create('Unexpected end of array'); -const errorIntegerOutOfRange = create('Integer out of Range'); - -/** - * Create an Uint8Array view of the next `len` bytes and advance the position by `len`. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @param {Decoder} decoder The decoder instance - * @param {number} len The length of bytes to read - * @return {Uint8Array} - */ -const readUint8Array = (decoder, len) => { - const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len); - decoder.pos += len; - return view -}; - -/** - * Read variable length Uint8Array. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @param {Decoder} decoder - * @return {Uint8Array} - */ -const readVarUint8Array = decoder => readUint8Array(decoder, readVarUint(decoder)); - -/** - * Read one byte as unsigned integer. - * @function - * @param {Decoder} decoder The decoder instance - * @return {number} Unsigned 8-bit integer - */ -const readUint8 = decoder => decoder.arr[decoder.pos++]; - -/** - * Read unsigned integer (32bit) with variable length. - * 1/8th of the storage is used as encoding overhead. - * * numbers < 2^7 is stored in one bytlength - * * numbers < 2^14 is stored in two bylength - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer.length - */ -const readVarUint = decoder => { - let num = 0; - let mult = 1; - const len = decoder.arr.length; - while (decoder.pos < len) { - const r = decoder.arr[decoder.pos++]; - // num = num | ((r & binary.BITS7) << len) - num = num + (r & BITS7) * mult; // shift $r << (7*#iterations) and add it to num - mult *= 128; // next iteration, shift 7 "more" to the left - if (r < BIT8) { - return num - } - /* c8 ignore start */ - if (num > MAX_SAFE_INTEGER) { - throw errorIntegerOutOfRange - } - /* c8 ignore stop */ - } - throw errorUnexpectedEndOfArray -}; - -/** - * We don't test this function anymore as we use native decoding/encoding by default now. - * Better not modify this anymore.. - * - * Transforming utf8 to a string is pretty expensive. The code performs 10x better - * when String.fromCodePoint is fed with all characters as arguments. - * But most environments have a maximum number of arguments per functions. - * For effiency reasons we apply a maximum of 10000 characters at once. - * - * @function - * @param {Decoder} decoder - * @return {String} The read String. - */ -/* c8 ignore start */ -const _readVarStringPolyfill = decoder => { - let remainingLen = readVarUint(decoder); - if (remainingLen === 0) { - return '' - } else { - let encodedString = String.fromCodePoint(readUint8(decoder)); // remember to decrease remainingLen - if (--remainingLen < 100) { // do not create a Uint8Array for small strings - while (remainingLen--) { - encodedString += String.fromCodePoint(readUint8(decoder)); - } - } else { - while (remainingLen > 0) { - const nextLen = remainingLen < 10000 ? remainingLen : 10000; - // this is dangerous, we create a fresh array view from the existing buffer - const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen); - decoder.pos += nextLen; - // Starting with ES5.1 we can supply a generic array-like object as arguments - encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes)); - remainingLen -= nextLen; - } - } - return decodeURIComponent(escape(encodedString)) - } -}; -/* c8 ignore stop */ - -/** - * @function - * @param {Decoder} decoder - * @return {String} The read String - */ -const _readVarStringNative = decoder => - /** @type any */ (utf8TextDecoder).decode(readVarUint8Array(decoder)); - -/** - * Read string of variable length - * * varUint is used to store the length of the string - * - * @function - * @param {Decoder} decoder - * @return {String} The read String - * - */ -/* c8 ignore next */ -const readVarString = utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill; - -exports.AuthMessageType = void 0; -(function (AuthMessageType) { - AuthMessageType[AuthMessageType["Token"] = 0] = "Token"; - AuthMessageType[AuthMessageType["PermissionDenied"] = 1] = "PermissionDenied"; - AuthMessageType[AuthMessageType["Authenticated"] = 2] = "Authenticated"; -})(exports.AuthMessageType || (exports.AuthMessageType = {})); -const writeAuthentication = (encoder, auth) => { - writeVarUint(encoder, exports.AuthMessageType.Token); - writeVarString(encoder, auth); -}; -const writePermissionDenied = (encoder, reason) => { - writeVarUint(encoder, exports.AuthMessageType.PermissionDenied); - writeVarString(encoder, reason); -}; -const writeAuthenticated = (encoder, scope) => { - writeVarUint(encoder, exports.AuthMessageType.Authenticated); - writeVarString(encoder, scope); -}; -const writeTokenSyncRequest = (encoder) => { - writeVarUint(encoder, exports.AuthMessageType.Token); -}; -const readAuthMessage = (decoder, sendToken, permissionDeniedHandler, authenticatedHandler) => { - switch (readVarUint(decoder)) { - case exports.AuthMessageType.Token: { - sendToken(); - break; - } - case exports.AuthMessageType.PermissionDenied: { - permissionDeniedHandler(readVarString(decoder)); - break; - } - case exports.AuthMessageType.Authenticated: { - authenticatedHandler(readVarString(decoder)); - break; - } - } -}; - -/** - * The server is terminating the connection because a data frame was received - * that is too large. - * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code - */ -const MessageTooBig = { - code: 1009, - reason: "Message Too Big", -}; -/** - * The server successfully processed the request, asks that the requester reset - * its document view, and is not returning any content. - */ -const ResetConnection = { - code: 4205, - reason: "Reset Connection", -}; -/** - * Similar to Forbidden, but specifically for use when authentication is required and has - * failed or has not yet been provided. - */ -const Unauthorized = { - code: 4401, - reason: "Unauthorized", -}; -/** - * The request contained valid data and was understood by the server, but the server - * is refusing action. - */ -const Forbidden = { - code: 4403, - reason: "Forbidden", -}; -/** - * The server timed out waiting for the request. - */ -const ConnectionTimeout = { - code: 4408, - reason: "Connection Timeout", -}; - -const awarenessStatesToArray = (states) => { - return Array.from(states.entries()).map(([key, value]) => { - return { - clientId: key, - ...value, - }; - }); -}; - -/** - * State of the WebSocket connection. - * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState - */ -exports.WsReadyStates = void 0; -(function (WsReadyStates) { - WsReadyStates[WsReadyStates["Connecting"] = 0] = "Connecting"; - WsReadyStates[WsReadyStates["Open"] = 1] = "Open"; - WsReadyStates[WsReadyStates["Closing"] = 2] = "Closing"; - WsReadyStates[WsReadyStates["Closed"] = 3] = "Closed"; -})(exports.WsReadyStates || (exports.WsReadyStates = {})); - -exports.ConnectionTimeout = ConnectionTimeout; -exports.Forbidden = Forbidden; -exports.MessageTooBig = MessageTooBig; -exports.ResetConnection = ResetConnection; -exports.Unauthorized = Unauthorized; -exports.awarenessStatesToArray = awarenessStatesToArray; -exports.readAuthMessage = readAuthMessage; -exports.writeAuthenticated = writeAuthenticated; -exports.writeAuthentication = writeAuthentication; -exports.writePermissionDenied = writePermissionDenied; -exports.writeTokenSyncRequest = writeTokenSyncRequest; -//# sourceMappingURL=hocuspocus-common.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs.map deleted file mode 100644 index 4115d9f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-common.cjs","sources":["../../../node_modules/lib0/math.js","../../../node_modules/lib0/binary.js","../../../node_modules/lib0/number.js","../../../node_modules/lib0/string.js","../../../node_modules/lib0/encoding.js","../../../node_modules/lib0/error.js","../../../node_modules/lib0/decoding.js","../src/auth.ts","../src/CloseEvents.ts","../src/awarenessStatesToArray.ts","../src/types.ts"],"sourcesContent":["/**\n * Common Math expressions.\n *\n * @module math\n */\n\nexport const floor = Math.floor\nexport const ceil = Math.ceil\nexport const abs = Math.abs\nexport const imul = Math.imul\nexport const round = Math.round\nexport const log10 = Math.log10\nexport const log2 = Math.log2\nexport const log = Math.log\nexport const sqrt = Math.sqrt\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The sum of a and b\n */\nexport const add = (a, b) => a + b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The smaller element of a and b\n */\nexport const min = (a, b) => a < b ? a : b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The bigger element of a and b\n */\nexport const max = (a, b) => a > b ? a : b\n\nexport const isNaN = Number.isNaN\n\nexport const pow = Math.pow\n/**\n * Base 10 exponential function. Returns the value of 10 raised to the power of pow.\n *\n * @param {number} exp\n * @return {number}\n */\nexport const exp10 = exp => Math.pow(10, exp)\n\nexport const sign = Math.sign\n\n/**\n * @param {number} n\n * @return {boolean} Wether n is negative. This function also differentiates between -0 and +0\n */\nexport const isNegativeZero = n => n !== 0 ? n < 0 : 1 / n < 0\n","/* eslint-env browser */\n\n/**\n * Binary data constants.\n *\n * @module binary\n */\n\n/**\n * n-th bit activated.\n *\n * @type {number}\n */\nexport const BIT1 = 1\nexport const BIT2 = 2\nexport const BIT3 = 4\nexport const BIT4 = 8\nexport const BIT5 = 16\nexport const BIT6 = 32\nexport const BIT7 = 64\nexport const BIT8 = 128\nexport const BIT9 = 256\nexport const BIT10 = 512\nexport const BIT11 = 1024\nexport const BIT12 = 2048\nexport const BIT13 = 4096\nexport const BIT14 = 8192\nexport const BIT15 = 16384\nexport const BIT16 = 32768\nexport const BIT17 = 65536\nexport const BIT18 = 1 << 17\nexport const BIT19 = 1 << 18\nexport const BIT20 = 1 << 19\nexport const BIT21 = 1 << 20\nexport const BIT22 = 1 << 21\nexport const BIT23 = 1 << 22\nexport const BIT24 = 1 << 23\nexport const BIT25 = 1 << 24\nexport const BIT26 = 1 << 25\nexport const BIT27 = 1 << 26\nexport const BIT28 = 1 << 27\nexport const BIT29 = 1 << 28\nexport const BIT30 = 1 << 29\nexport const BIT31 = 1 << 30\nexport const BIT32 = 1 << 31\n\n/**\n * First n bits activated.\n *\n * @type {number}\n */\nexport const BITS0 = 0\nexport const BITS1 = 1\nexport const BITS2 = 3\nexport const BITS3 = 7\nexport const BITS4 = 15\nexport const BITS5 = 31\nexport const BITS6 = 63\nexport const BITS7 = 127\nexport const BITS8 = 255\nexport const BITS9 = 511\nexport const BITS10 = 1023\nexport const BITS11 = 2047\nexport const BITS12 = 4095\nexport const BITS13 = 8191\nexport const BITS14 = 16383\nexport const BITS15 = 32767\nexport const BITS16 = 65535\nexport const BITS17 = BIT18 - 1\nexport const BITS18 = BIT19 - 1\nexport const BITS19 = BIT20 - 1\nexport const BITS20 = BIT21 - 1\nexport const BITS21 = BIT22 - 1\nexport const BITS22 = BIT23 - 1\nexport const BITS23 = BIT24 - 1\nexport const BITS24 = BIT25 - 1\nexport const BITS25 = BIT26 - 1\nexport const BITS26 = BIT27 - 1\nexport const BITS27 = BIT28 - 1\nexport const BITS28 = BIT29 - 1\nexport const BITS29 = BIT30 - 1\nexport const BITS30 = BIT31 - 1\n/**\n * @type {number}\n */\nexport const BITS31 = 0x7FFFFFFF\n/**\n * @type {number}\n */\nexport const BITS32 = 0xFFFFFFFF\n","/**\n * Utility helpers for working with numbers.\n *\n * @module number\n */\n\nimport * as math from './math.js'\nimport * as binary from './binary.js'\n\nexport const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER\nexport const MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER\n\nexport const LOWEST_INT32 = 1 << 31\nexport const HIGHEST_INT32 = binary.BITS31\nexport const HIGHEST_UINT32 = binary.BITS32\n\n/* c8 ignore next */\nexport const isInteger = Number.isInteger || (num => typeof num === 'number' && isFinite(num) && math.floor(num) === num)\nexport const isNaN = Number.isNaN\nexport const parseInt = Number.parseInt\n\n/**\n * Count the number of \"1\" bits in an unsigned 32bit number.\n *\n * Super fun bitcount algorithm by Brian Kernighan.\n *\n * @param {number} n\n */\nexport const countBits = n => {\n n &= binary.BITS32\n let count = 0\n while (n) {\n n &= (n - 1)\n count++\n }\n return count\n}\n","import * as array from './array.js'\n\n/**\n * Utility module to work with strings.\n *\n * @module string\n */\n\nexport const fromCharCode = String.fromCharCode\nexport const fromCodePoint = String.fromCodePoint\n\n/**\n * The largest utf16 character.\n * Corresponds to Uint8Array([255, 255]) or charcodeof(2x2^8)\n */\nexport const MAX_UTF16_CHARACTER = fromCharCode(65535)\n\n/**\n * @param {string} s\n * @return {string}\n */\nconst toLowerCase = s => s.toLowerCase()\n\nconst trimLeftRegex = /^\\s*/g\n\n/**\n * @param {string} s\n * @return {string}\n */\nexport const trimLeft = s => s.replace(trimLeftRegex, '')\n\nconst fromCamelCaseRegex = /([A-Z])/g\n\n/**\n * @param {string} s\n * @param {string} separator\n * @return {string}\n */\nexport const fromCamelCase = (s, separator) => trimLeft(s.replace(fromCamelCaseRegex, match => `${separator}${toLowerCase(match)}`))\n\n/**\n * Compute the utf8ByteLength\n * @param {string} str\n * @return {number}\n */\nexport const utf8ByteLength = str => unescape(encodeURIComponent(str)).length\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\nexport const _encodeUtf8Polyfill = str => {\n const encodedString = unescape(encodeURIComponent(str))\n const len = encodedString.length\n const buf = new Uint8Array(len)\n for (let i = 0; i < len; i++) {\n buf[i] = /** @type {number} */ (encodedString.codePointAt(i))\n }\n return buf\n}\n\n/* c8 ignore next */\nexport const utf8TextEncoder = /** @type {TextEncoder} */ (typeof TextEncoder !== 'undefined' ? new TextEncoder() : null)\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\nexport const _encodeUtf8Native = str => utf8TextEncoder.encode(str)\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\n/* c8 ignore next */\nexport const encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\nexport const _decodeUtf8Polyfill = buf => {\n let remainingLen = buf.length\n let encodedString = ''\n let bufPos = 0\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n const bytes = buf.subarray(bufPos, bufPos + nextLen)\n bufPos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes))\n remainingLen -= nextLen\n }\n return decodeURIComponent(escape(encodedString))\n}\n\n/* c8 ignore next */\nexport let utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8', { fatal: true, ignoreBOM: true })\n\n/* c8 ignore start */\nif (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) {\n // Safari doesn't handle BOM correctly.\n // This fixes a bug in Safari 13.0.5 where it produces a BOM the first time it is called.\n // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the first call and\n // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the second call\n // Another issue is that from then on no BOM chars are recognized anymore\n /* c8 ignore next */\n utf8TextDecoder = null\n}\n/* c8 ignore stop */\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\nexport const _decodeUtf8Native = buf => /** @type {TextDecoder} */ (utf8TextDecoder).decode(buf)\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\n/* c8 ignore next */\nexport const decodeUtf8 = utf8TextDecoder ? _decodeUtf8Native : _decodeUtf8Polyfill\n\n/**\n * @param {string} str The initial string\n * @param {number} index Starting position\n * @param {number} remove Number of characters to remove\n * @param {string} insert New content to insert\n */\nexport const splice = (str, index, remove, insert = '') => str.slice(0, index) + insert + str.slice(index + remove)\n\n/**\n * @param {string} source\n * @param {number} n\n */\nexport const repeat = (source, n) => array.unfold(n, () => source).join('')\n","/**\n * Efficient schema-less binary encoding with support for variable length encoding.\n *\n * Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n *\n * @module encoding\n */\n\nimport * as math from './math.js'\nimport * as number from './number.js'\nimport * as binary from './binary.js'\nimport * as string from './string.js'\nimport * as array from './array.js'\n\n/**\n * A BinaryEncoder handles the encoding to an Uint8Array.\n */\nexport class Encoder {\n constructor () {\n this.cpos = 0\n this.cbuf = new Uint8Array(100)\n /**\n * @type {Array}\n */\n this.bufs = []\n }\n}\n\n/**\n * @function\n * @return {Encoder}\n */\nexport const createEncoder = () => new Encoder()\n\n/**\n * @param {function(Encoder):void} f\n */\nexport const encode = (f) => {\n const encoder = createEncoder()\n f(encoder)\n return toUint8Array(encoder)\n}\n\n/**\n * The current length of the encoded data.\n *\n * @function\n * @param {Encoder} encoder\n * @return {number}\n */\nexport const length = encoder => {\n let len = encoder.cpos\n for (let i = 0; i < encoder.bufs.length; i++) {\n len += encoder.bufs[i].length\n }\n return len\n}\n\n/**\n * Check whether encoder is empty.\n *\n * @function\n * @param {Encoder} encoder\n * @return {boolean}\n */\nexport const hasContent = encoder => encoder.cpos > 0 || encoder.bufs.length > 0\n\n/**\n * Transform to Uint8Array.\n *\n * @function\n * @param {Encoder} encoder\n * @return {Uint8Array} The created ArrayBuffer.\n */\nexport const toUint8Array = encoder => {\n const uint8arr = new Uint8Array(length(encoder))\n let curPos = 0\n for (let i = 0; i < encoder.bufs.length; i++) {\n const d = encoder.bufs[i]\n uint8arr.set(d, curPos)\n curPos += d.length\n }\n uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos)\n return uint8arr\n}\n\n/**\n * Verify that it is possible to write `len` bytes wtihout checking. If\n * necessary, a new Buffer with the required length is attached.\n *\n * @param {Encoder} encoder\n * @param {number} len\n */\nexport const verifyLen = (encoder, len) => {\n const bufferLen = encoder.cbuf.length\n if (bufferLen - encoder.cpos < len) {\n encoder.bufs.push(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos))\n encoder.cbuf = new Uint8Array(math.max(bufferLen, len) * 2)\n encoder.cpos = 0\n }\n}\n\n/**\n * Write one byte to the encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The byte that is to be encoded.\n */\nexport const write = (encoder, num) => {\n const bufferLen = encoder.cbuf.length\n if (encoder.cpos === bufferLen) {\n encoder.bufs.push(encoder.cbuf)\n encoder.cbuf = new Uint8Array(bufferLen * 2)\n encoder.cpos = 0\n }\n encoder.cbuf[encoder.cpos++] = num\n}\n\n/**\n * Write one byte at a specific position.\n * Position must already be written (i.e. encoder.length > pos)\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos Position to which to write data\n * @param {number} num Unsigned 8-bit integer\n */\nexport const set = (encoder, pos, num) => {\n let buffer = null\n // iterate all buffers and adjust position\n for (let i = 0; i < encoder.bufs.length && buffer === null; i++) {\n const b = encoder.bufs[i]\n if (pos < b.length) {\n buffer = b // found buffer\n } else {\n pos -= b.length\n }\n }\n if (buffer === null) {\n // use current buffer\n buffer = encoder.cbuf\n }\n buffer[pos] = num\n}\n\n/**\n * Write one byte as an unsigned integer.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint8 = write\n\n/**\n * Write one byte as an unsigned Integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint8 = set\n\n/**\n * Write two bytes as an unsigned integer.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint16 = (encoder, num) => {\n write(encoder, num & binary.BITS8)\n write(encoder, (num >>> 8) & binary.BITS8)\n}\n/**\n * Write two bytes as an unsigned integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint16 = (encoder, pos, num) => {\n set(encoder, pos, num & binary.BITS8)\n set(encoder, pos + 1, (num >>> 8) & binary.BITS8)\n}\n\n/**\n * Write two bytes as an unsigned integer\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint32 = (encoder, num) => {\n for (let i = 0; i < 4; i++) {\n write(encoder, num & binary.BITS8)\n num >>>= 8\n }\n}\n\n/**\n * Write two bytes as an unsigned integer in big endian order.\n * (most significant byte first)\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint32BigEndian = (encoder, num) => {\n for (let i = 3; i >= 0; i--) {\n write(encoder, (num >>> (8 * i)) & binary.BITS8)\n }\n}\n\n/**\n * Write two bytes as an unsigned integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint32 = (encoder, pos, num) => {\n for (let i = 0; i < 4; i++) {\n set(encoder, pos + i, num & binary.BITS8)\n num >>>= 8\n }\n}\n\n/**\n * Write a variable length unsigned integer. Max encodable integer is 2^53.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeVarUint = (encoder, num) => {\n while (num > binary.BITS7) {\n write(encoder, binary.BIT8 | (binary.BITS7 & num))\n num = math.floor(num / 128) // shift >>> 7\n }\n write(encoder, binary.BITS7 & num)\n}\n\n/**\n * Write a variable length integer.\n *\n * We use the 7th bit instead for signaling that this is a negative number.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeVarInt = (encoder, num) => {\n const isNegative = math.isNegativeZero(num)\n if (isNegative) {\n num = -num\n }\n // |- whether to continue reading |- whether is negative |- number\n write(encoder, (num > binary.BITS6 ? binary.BIT8 : 0) | (isNegative ? binary.BIT7 : 0) | (binary.BITS6 & num))\n num = math.floor(num / 64) // shift >>> 6\n // We don't need to consider the case of num === 0 so we can use a different\n // pattern here than above.\n while (num > 0) {\n write(encoder, (num > binary.BITS7 ? binary.BIT8 : 0) | (binary.BITS7 & num))\n num = math.floor(num / 128) // shift >>> 7\n }\n}\n\n/**\n * A cache to store strings temporarily\n */\nconst _strBuffer = new Uint8Array(30000)\nconst _maxStrBSize = _strBuffer.length / 3\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const _writeVarStringNative = (encoder, str) => {\n if (str.length < _maxStrBSize) {\n // We can encode the string into the existing buffer\n /* c8 ignore next */\n const written = string.utf8TextEncoder.encodeInto(str, _strBuffer).written || 0\n writeVarUint(encoder, written)\n for (let i = 0; i < written; i++) {\n write(encoder, _strBuffer[i])\n }\n } else {\n writeVarUint8Array(encoder, string.encodeUtf8(str))\n }\n}\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const _writeVarStringPolyfill = (encoder, str) => {\n const encodedString = unescape(encodeURIComponent(str))\n const len = encodedString.length\n writeVarUint(encoder, len)\n for (let i = 0; i < len; i++) {\n write(encoder, /** @type {number} */ (encodedString.codePointAt(i)))\n }\n}\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\n/* c8 ignore next */\nexport const writeVarString = (string.utf8TextEncoder && /** @type {any} */ (string.utf8TextEncoder).encodeInto) ? _writeVarStringNative : _writeVarStringPolyfill\n\n/**\n * Write a string terminated by a special byte sequence. This is not very performant and is\n * generally discouraged. However, the resulting byte arrays are lexiographically ordered which\n * makes this a nice feature for databases.\n *\n * The string will be encoded using utf8 and then terminated and escaped using writeTerminatingUint8Array.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const writeTerminatedString = (encoder, str) =>\n writeTerminatedUint8Array(encoder, string.encodeUtf8(str))\n\n/**\n * Write a terminating Uint8Array. Note that this is not performant and is generally\n * discouraged. There are few situations when this is needed.\n *\n * We use 0x0 as a terminating character. 0x1 serves as an escape character for 0x0 and 0x1.\n *\n * Example: [0,1,2] is encoded to [1,0,1,1,2,0]. 0x0, and 0x1 needed to be escaped using 0x1. Then\n * the result is terminated using the 0x0 character.\n *\n * This is basically how many systems implement null terminated strings. However, we use an escape\n * character 0x1 to avoid issues and potenial attacks on our database (if this is used as a key\n * encoder for NoSql databases).\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} buf The string that is to be encoded.\n */\nexport const writeTerminatedUint8Array = (encoder, buf) => {\n for (let i = 0; i < buf.length; i++) {\n const b = buf[i]\n if (b === 0 || b === 1) {\n write(encoder, 1)\n }\n write(encoder, buf[i])\n }\n write(encoder, 0)\n}\n\n/**\n * Write the content of another Encoder.\n *\n * @TODO: can be improved!\n * - Note: Should consider that when appending a lot of small Encoders, we should rather clone than referencing the old structure.\n * Encoders start with a rather big initial buffer.\n *\n * @function\n * @param {Encoder} encoder The enUint8Arr\n * @param {Encoder} append The BinaryEncoder to be written.\n */\nexport const writeBinaryEncoder = (encoder, append) => writeUint8Array(encoder, toUint8Array(append))\n\n/**\n * Append fixed-length Uint8Array to the encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} uint8Array\n */\nexport const writeUint8Array = (encoder, uint8Array) => {\n const bufferLen = encoder.cbuf.length\n const cpos = encoder.cpos\n const leftCopyLen = math.min(bufferLen - cpos, uint8Array.length)\n const rightCopyLen = uint8Array.length - leftCopyLen\n encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos)\n encoder.cpos += leftCopyLen\n if (rightCopyLen > 0) {\n // Still something to write, write right half..\n // Append new buffer\n encoder.bufs.push(encoder.cbuf)\n // must have at least size of remaining buffer\n encoder.cbuf = new Uint8Array(math.max(bufferLen * 2, rightCopyLen))\n // copy array\n encoder.cbuf.set(uint8Array.subarray(leftCopyLen))\n encoder.cpos = rightCopyLen\n }\n}\n\n/**\n * Append an Uint8Array to Encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} uint8Array\n */\nexport const writeVarUint8Array = (encoder, uint8Array) => {\n writeVarUint(encoder, uint8Array.byteLength)\n writeUint8Array(encoder, uint8Array)\n}\n\n/**\n * Create an DataView of the next `len` bytes. Use it to write data after\n * calling this function.\n *\n * ```js\n * // write float32 using DataView\n * const dv = writeOnDataView(encoder, 4)\n * dv.setFloat32(0, 1.1)\n * // read float32 using DataView\n * const dv = readFromDataView(encoder, 4)\n * dv.getFloat32(0) // => 1.100000023841858 (leaving it to the reader to find out why this is the correct result)\n * ```\n *\n * @param {Encoder} encoder\n * @param {number} len\n * @return {DataView}\n */\nexport const writeOnDataView = (encoder, len) => {\n verifyLen(encoder, len)\n const dview = new DataView(encoder.cbuf.buffer, encoder.cpos, len)\n encoder.cpos += len\n return dview\n}\n\n/**\n * @param {Encoder} encoder\n * @param {number} num\n */\nexport const writeFloat32 = (encoder, num) => writeOnDataView(encoder, 4).setFloat32(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {number} num\n */\nexport const writeFloat64 = (encoder, num) => writeOnDataView(encoder, 8).setFloat64(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {bigint} num\n */\nexport const writeBigInt64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigInt64(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {bigint} num\n */\nexport const writeBigUint64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigUint64(0, num, false)\n\nconst floatTestBed = new DataView(new ArrayBuffer(4))\n/**\n * Check if a number can be encoded as a 32 bit float.\n *\n * @param {number} num\n * @return {boolean}\n */\nconst isFloat32 = num => {\n floatTestBed.setFloat32(0, num)\n return floatTestBed.getFloat32(0) === num\n}\n\n/**\n * Encode data with efficient binary format.\n *\n * Differences to JSON:\n * • Transforms data to a binary format (not to a string)\n * • Encodes undefined, NaN, and ArrayBuffer (these can't be represented in JSON)\n * • Numbers are efficiently encoded either as a variable length integer, as a\n * 32 bit float, as a 64 bit float, or as a 64 bit bigint.\n *\n * Encoding table:\n *\n * | Data Type | Prefix | Encoding Method | Comment |\n * | ------------------- | -------- | ------------------ | ------- |\n * | undefined | 127 | | Functions, symbol, and everything that cannot be identified is encoded as undefined |\n * | null | 126 | | |\n * | integer | 125 | writeVarInt | Only encodes 32 bit signed integers |\n * | float32 | 124 | writeFloat32 | |\n * | float64 | 123 | writeFloat64 | |\n * | bigint | 122 | writeBigInt64 | |\n * | boolean (false) | 121 | | True and false are different data types so we save the following byte |\n * | boolean (true) | 120 | | - 0b01111000 so the last bit determines whether true or false |\n * | string | 119 | writeVarString | |\n * | object | 118 | custom | Writes {length} then {length} key-value pairs |\n * | array | 117 | custom | Writes {length} then {length} json values |\n * | Uint8Array | 116 | writeVarUint8Array | We use Uint8Array for any kind of binary data |\n *\n * Reasons for the decreasing prefix:\n * We need the first bit for extendability (later we may want to encode the\n * prefix with writeVarUint). The remaining 7 bits are divided as follows:\n * [0-30] the beginning of the data range is used for custom purposes\n * (defined by the function that uses this library)\n * [31-127] the end of the data range is used for data encoding by\n * lib0/encoding.js\n *\n * @param {Encoder} encoder\n * @param {undefined|null|number|bigint|boolean|string|Object|Array|Uint8Array} data\n */\nexport const writeAny = (encoder, data) => {\n switch (typeof data) {\n case 'string':\n // TYPE 119: STRING\n write(encoder, 119)\n writeVarString(encoder, data)\n break\n case 'number':\n if (number.isInteger(data) && math.abs(data) <= binary.BITS31) {\n // TYPE 125: INTEGER\n write(encoder, 125)\n writeVarInt(encoder, data)\n } else if (isFloat32(data)) {\n // TYPE 124: FLOAT32\n write(encoder, 124)\n writeFloat32(encoder, data)\n } else {\n // TYPE 123: FLOAT64\n write(encoder, 123)\n writeFloat64(encoder, data)\n }\n break\n case 'bigint':\n // TYPE 122: BigInt\n write(encoder, 122)\n writeBigInt64(encoder, data)\n break\n case 'object':\n if (data === null) {\n // TYPE 126: null\n write(encoder, 126)\n } else if (array.isArray(data)) {\n // TYPE 117: Array\n write(encoder, 117)\n writeVarUint(encoder, data.length)\n for (let i = 0; i < data.length; i++) {\n writeAny(encoder, data[i])\n }\n } else if (data instanceof Uint8Array) {\n // TYPE 116: ArrayBuffer\n write(encoder, 116)\n writeVarUint8Array(encoder, data)\n } else {\n // TYPE 118: Object\n write(encoder, 118)\n const keys = Object.keys(data)\n writeVarUint(encoder, keys.length)\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n writeVarString(encoder, key)\n writeAny(encoder, data[key])\n }\n }\n break\n case 'boolean':\n // TYPE 120/121: boolean (true/false)\n write(encoder, data ? 120 : 121)\n break\n default:\n // TYPE 127: undefined\n write(encoder, 127)\n }\n}\n\n/**\n * Now come a few stateful encoder that have their own classes.\n */\n\n/**\n * Basic Run Length Encoder - a basic compression implementation.\n *\n * Encodes [1,1,1,7] to [1,3,7,1] (3 times 1, 1 time 7). This encoder might do more harm than good if there are a lot of values that are not repeated.\n *\n * It was originally used for image compression. Cool .. article http://csbruce.com/cbm/transactor/pdfs/trans_v7_i06.pdf\n *\n * @note T must not be null!\n *\n * @template T\n */\nexport class RleEncoder extends Encoder {\n /**\n * @param {function(Encoder, T):void} writer\n */\n constructor (writer) {\n super()\n /**\n * The writer\n */\n this.w = writer\n /**\n * Current state\n * @type {T|null}\n */\n this.s = null\n this.count = 0\n }\n\n /**\n * @param {T} v\n */\n write (v) {\n if (this.s === v) {\n this.count++\n } else {\n if (this.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw\n }\n this.count = 1\n // write first value\n this.w(this, v)\n this.s = v\n }\n }\n}\n\n/**\n * Basic diff decoder using variable length encoding.\n *\n * Encodes the values [3, 1100, 1101, 1050, 0] to [3, 1097, 1, -51, -1050] using writeVarInt.\n */\nexport class IntDiffEncoder extends Encoder {\n /**\n * @param {number} start\n */\n constructor (start) {\n super()\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n writeVarInt(this, v - this.s)\n this.s = v\n }\n}\n\n/**\n * A combination of IntDiffEncoder and RleEncoder.\n *\n * Basically first writes the IntDiffEncoder and then counts duplicate diffs using RleEncoding.\n *\n * Encodes the values [1,1,1,2,3,4,5,6] as [1,1,0,2,1,5] (RLE([1,0,0,1,1,1,1,1]) ⇒ RleIntDiff[1,1,0,2,1,5])\n */\nexport class RleIntDiffEncoder extends Encoder {\n /**\n * @param {number} start\n */\n constructor (start) {\n super()\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s === v && this.count > 0) {\n this.count++\n } else {\n if (this.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw\n }\n this.count = 1\n // write first value\n writeVarInt(this, v - this.s)\n this.s = v\n }\n }\n}\n\n/**\n * @param {UintOptRleEncoder} encoder\n */\nconst flushUintOptRleEncoder = encoder => {\n if (encoder.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n // case 1: just a single value. set sign to positive\n // case 2: write several values. set sign to negative to indicate that there is a length coming\n writeVarInt(encoder.encoder, encoder.count === 1 ? encoder.s : -encoder.s)\n if (encoder.count > 1) {\n writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw\n }\n }\n}\n\n/**\n * Optimized Rle encoder that does not suffer from the mentioned problem of the basic Rle encoder.\n *\n * Internally uses VarInt encoder to write unsigned integers. If the input occurs multiple times, we write\n * write it as a negative number. The UintOptRleDecoder then understands that it needs to read a count.\n *\n * Encodes [1,2,3,3,3] as [1,2,-3,3] (once 1, once 2, three times 3)\n */\nexport class UintOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s === v) {\n this.count++\n } else {\n flushUintOptRleEncoder(this)\n this.count = 1\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushUintOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * Increasing Uint Optimized RLE Encoder\n *\n * The RLE encoder counts the number of same occurences of the same value.\n * The IncUintOptRle encoder counts if the value increases.\n * I.e. 7, 8, 9, 10 will be encoded as [-7, 4]. 1, 3, 5 will be encoded\n * as [1, 3, 5].\n */\nexport class IncUintOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s + this.count === v) {\n this.count++\n } else {\n flushUintOptRleEncoder(this)\n this.count = 1\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushUintOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * @param {IntDiffOptRleEncoder} encoder\n */\nconst flushIntDiffOptRleEncoder = encoder => {\n if (encoder.count > 0) {\n // 31 bit making up the diff | wether to write the counter\n // const encodedDiff = encoder.diff << 1 | (encoder.count === 1 ? 0 : 1)\n const encodedDiff = encoder.diff * 2 + (encoder.count === 1 ? 0 : 1)\n // flush counter, unless this is the first value (count = 0)\n // case 1: just a single value. set first bit to positive\n // case 2: write several values. set first bit to negative to indicate that there is a length coming\n writeVarInt(encoder.encoder, encodedDiff)\n if (encoder.count > 1) {\n writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw\n }\n }\n}\n\n/**\n * A combination of the IntDiffEncoder and the UintOptRleEncoder.\n *\n * The count approach is similar to the UintDiffOptRleEncoder, but instead of using the negative bitflag, it encodes\n * in the LSB whether a count is to be read. Therefore this Encoder only supports 31 bit integers!\n *\n * Encodes [1, 2, 3, 2] as [3, 1, 6, -1] (more specifically [(1 << 1) | 1, (3 << 0) | 0, -1])\n *\n * Internally uses variable length encoding. Contrary to normal UintVar encoding, the first byte contains:\n * * 1 bit that denotes whether the next value is a count (LSB)\n * * 1 bit that denotes whether this value is negative (MSB - 1)\n * * 1 bit that denotes whether to continue reading the variable length integer (MSB)\n *\n * Therefore, only five bits remain to encode diff ranges.\n *\n * Use this Encoder only when appropriate. In most cases, this is probably a bad idea.\n */\nexport class IntDiffOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n this.diff = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.diff === v - this.s) {\n this.s = v\n this.count++\n } else {\n flushIntDiffOptRleEncoder(this)\n this.count = 1\n this.diff = v - this.s\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushIntDiffOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * Optimized String Encoder.\n *\n * Encoding many small strings in a simple Encoder is not very efficient. The function call to decode a string takes some time and creates references that must be eventually deleted.\n * In practice, when decoding several million small strings, the GC will kick in more and more often to collect orphaned string objects (or maybe there is another reason?).\n *\n * This string encoder solves the above problem. All strings are concatenated and written as a single string using a single encoding call.\n *\n * The lengths are encoded using a UintOptRleEncoder.\n */\nexport class StringEncoder {\n constructor () {\n /**\n * @type {Array}\n */\n this.sarr = []\n this.s = ''\n this.lensE = new UintOptRleEncoder()\n }\n\n /**\n * @param {string} string\n */\n write (string) {\n this.s += string\n if (this.s.length > 19) {\n this.sarr.push(this.s)\n this.s = ''\n }\n this.lensE.write(string.length)\n }\n\n toUint8Array () {\n const encoder = new Encoder()\n this.sarr.push(this.s)\n this.s = ''\n writeVarString(encoder, this.sarr.join(''))\n writeUint8Array(encoder, this.lensE.toUint8Array())\n return toUint8Array(encoder)\n }\n}\n","/**\n * Error helpers.\n *\n * @module error\n */\n\n/**\n * @param {string} s\n * @return {Error}\n */\n/* c8 ignore next */\nexport const create = s => new Error(s)\n\n/**\n * @throws {Error}\n * @return {never}\n */\n/* c8 ignore next 3 */\nexport const methodUnimplemented = () => {\n throw create('Method unimplemented')\n}\n\n/**\n * @throws {Error}\n * @return {never}\n */\n/* c8 ignore next 3 */\nexport const unexpectedCase = () => {\n throw create('Unexpected case')\n}\n","/**\n * Efficient schema-less binary decoding with support for variable length encoding.\n *\n * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n *\n * @module decoding\n */\n\nimport * as binary from './binary.js'\nimport * as math from './math.js'\nimport * as number from './number.js'\nimport * as string from './string.js'\nimport * as error from './error.js'\nimport * as encoding from './encoding.js'\n\nconst errorUnexpectedEndOfArray = error.create('Unexpected end of array')\nconst errorIntegerOutOfRange = error.create('Integer out of Range')\n\n/**\n * A Decoder handles the decoding of an Uint8Array.\n */\nexport class Decoder {\n /**\n * @param {Uint8Array} uint8Array Binary data to decode\n */\n constructor (uint8Array) {\n /**\n * Decoding target.\n *\n * @type {Uint8Array}\n */\n this.arr = uint8Array\n /**\n * Current decoding position.\n *\n * @type {number}\n */\n this.pos = 0\n }\n}\n\n/**\n * @function\n * @param {Uint8Array} uint8Array\n * @return {Decoder}\n */\nexport const createDecoder = uint8Array => new Decoder(uint8Array)\n\n/**\n * @function\n * @param {Decoder} decoder\n * @return {boolean}\n */\nexport const hasContent = decoder => decoder.pos !== decoder.arr.length\n\n/**\n * Clone a decoder instance.\n * Optionally set a new position parameter.\n *\n * @function\n * @param {Decoder} decoder The decoder instance\n * @param {number} [newPos] Defaults to current position\n * @return {Decoder} A clone of `decoder`\n */\nexport const clone = (decoder, newPos = decoder.pos) => {\n const _decoder = createDecoder(decoder.arr)\n _decoder.pos = newPos\n return _decoder\n}\n\n/**\n * Create an Uint8Array view of the next `len` bytes and advance the position by `len`.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n *\n * @function\n * @param {Decoder} decoder The decoder instance\n * @param {number} len The length of bytes to read\n * @return {Uint8Array}\n */\nexport const readUint8Array = (decoder, len) => {\n const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len)\n decoder.pos += len\n return view\n}\n\n/**\n * Read variable length Uint8Array.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n *\n * @function\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readVarUint8Array = decoder => readUint8Array(decoder, readVarUint(decoder))\n\n/**\n * Read the rest of the content as an ArrayBuffer\n * @function\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readTailAsUint8Array = decoder => readUint8Array(decoder, decoder.arr.length - decoder.pos)\n\n/**\n * Skip one byte, jump to the next position.\n * @function\n * @param {Decoder} decoder The decoder instance\n * @return {number} The next position\n */\nexport const skip8 = decoder => decoder.pos++\n\n/**\n * Read one byte as unsigned integer.\n * @function\n * @param {Decoder} decoder The decoder instance\n * @return {number} Unsigned 8-bit integer\n */\nexport const readUint8 = decoder => decoder.arr[decoder.pos++]\n\n/**\n * Read 2 bytes as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint16 = decoder => {\n const uint =\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8)\n decoder.pos += 2\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint32 = decoder => {\n const uint =\n (decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8) +\n (decoder.arr[decoder.pos + 2] << 16) +\n (decoder.arr[decoder.pos + 3] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer in big endian order.\n * (most significant byte first)\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint32BigEndian = decoder => {\n const uint =\n (decoder.arr[decoder.pos + 3] +\n (decoder.arr[decoder.pos + 2] << 8) +\n (decoder.arr[decoder.pos + 1] << 16) +\n (decoder.arr[decoder.pos] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint8 = decoder => decoder.arr[decoder.pos]\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint16 = decoder =>\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8)\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint32 = decoder => (\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8) +\n (decoder.arr[decoder.pos + 2] << 16) +\n (decoder.arr[decoder.pos + 3] << 24)\n) >>> 0\n\n/**\n * Read unsigned integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * * numbers < 2^7 is stored in one bytlength\n * * numbers < 2^14 is stored in two bylength\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.length\n */\nexport const readVarUint = decoder => {\n let num = 0\n let mult = 1\n const len = decoder.arr.length\n while (decoder.pos < len) {\n const r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & binary.BITS7) * mult // shift $r << (7*#iterations) and add it to num\n mult *= 128 // next iteration, shift 7 \"more\" to the left\n if (r < binary.BIT8) {\n return num\n }\n /* c8 ignore start */\n if (num > number.MAX_SAFE_INTEGER) {\n throw errorIntegerOutOfRange\n }\n /* c8 ignore stop */\n }\n throw errorUnexpectedEndOfArray\n}\n\n/**\n * Read signed integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * * numbers < 2^7 is stored in one bytlength\n * * numbers < 2^14 is stored in two bylength\n * @todo This should probably create the inverse ~num if number is negative - but this would be a breaking change.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.length\n */\nexport const readVarInt = decoder => {\n let r = decoder.arr[decoder.pos++]\n let num = r & binary.BITS6\n let mult = 64\n const sign = (r & binary.BIT7) > 0 ? -1 : 1\n if ((r & binary.BIT8) === 0) {\n // don't continue reading\n return sign * num\n }\n const len = decoder.arr.length\n while (decoder.pos < len) {\n r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & binary.BITS7) * mult\n mult *= 128\n if (r < binary.BIT8) {\n return sign * num\n }\n /* c8 ignore start */\n if (num > number.MAX_SAFE_INTEGER) {\n throw errorIntegerOutOfRange\n }\n /* c8 ignore stop */\n }\n throw errorUnexpectedEndOfArray\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {number}\n */\nexport const peekVarUint = decoder => {\n const pos = decoder.pos\n const s = readVarUint(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {number}\n */\nexport const peekVarInt = decoder => {\n const pos = decoder.pos\n const s = readVarInt(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * We don't test this function anymore as we use native decoding/encoding by default now.\n * Better not modify this anymore..\n *\n * Transforming utf8 to a string is pretty expensive. The code performs 10x better\n * when String.fromCodePoint is fed with all characters as arguments.\n * But most environments have a maximum number of arguments per functions.\n * For effiency reasons we apply a maximum of 10000 characters at once.\n *\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String.\n */\n/* c8 ignore start */\nexport const _readVarStringPolyfill = decoder => {\n let remainingLen = readVarUint(decoder)\n if (remainingLen === 0) {\n return ''\n } else {\n let encodedString = String.fromCodePoint(readUint8(decoder)) // remember to decrease remainingLen\n if (--remainingLen < 100) { // do not create a Uint8Array for small strings\n while (remainingLen--) {\n encodedString += String.fromCodePoint(readUint8(decoder))\n }\n } else {\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n // this is dangerous, we create a fresh array view from the existing buffer\n const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen)\n decoder.pos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes))\n remainingLen -= nextLen\n }\n }\n return decodeURIComponent(escape(encodedString))\n }\n}\n/* c8 ignore stop */\n\n/**\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String\n */\nexport const _readVarStringNative = decoder =>\n /** @type any */ (string.utf8TextDecoder).decode(readVarUint8Array(decoder))\n\n/**\n * Read string of variable length\n * * varUint is used to store the length of the string\n *\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String\n *\n */\n/* c8 ignore next */\nexport const readVarString = string.utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill\n\n/**\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readTerminatedUint8Array = decoder => {\n const encoder = encoding.createEncoder()\n let b\n while (true) {\n b = readUint8(decoder)\n if (b === 0) {\n return encoding.toUint8Array(encoder)\n }\n if (b === 1) {\n b = readUint8(decoder)\n }\n encoding.write(encoder, b)\n }\n}\n\n/**\n * @param {Decoder} decoder\n * @return {string}\n */\nexport const readTerminatedString = decoder => string.decodeUtf8(readTerminatedUint8Array(decoder))\n\n/**\n * Look ahead and read varString without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {string}\n */\nexport const peekVarString = decoder => {\n const pos = decoder.pos\n const s = readVarString(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * @param {Decoder} decoder\n * @param {number} len\n * @return {DataView}\n */\nexport const readFromDataView = (decoder, len) => {\n const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len)\n decoder.pos += len\n return dv\n}\n\n/**\n * @param {Decoder} decoder\n */\nexport const readFloat32 = decoder => readFromDataView(decoder, 4).getFloat32(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readFloat64 = decoder => readFromDataView(decoder, 8).getFloat64(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readBigInt64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigInt64(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readBigUint64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigUint64(0, false)\n\n/**\n * @type {Array}\n */\nconst readAnyLookupTable = [\n decoder => undefined, // CASE 127: undefined\n decoder => null, // CASE 126: null\n readVarInt, // CASE 125: integer\n readFloat32, // CASE 124: float32\n readFloat64, // CASE 123: float64\n readBigInt64, // CASE 122: bigint\n decoder => false, // CASE 121: boolean (false)\n decoder => true, // CASE 120: boolean (true)\n readVarString, // CASE 119: string\n decoder => { // CASE 118: object\n const len = readVarUint(decoder)\n /**\n * @type {Object}\n */\n const obj = {}\n for (let i = 0; i < len; i++) {\n const key = readVarString(decoder)\n obj[key] = readAny(decoder)\n }\n return obj\n },\n decoder => { // CASE 117: array\n const len = readVarUint(decoder)\n const arr = []\n for (let i = 0; i < len; i++) {\n arr.push(readAny(decoder))\n }\n return arr\n },\n readVarUint8Array // CASE 116: Uint8Array\n]\n\n/**\n * @param {Decoder} decoder\n */\nexport const readAny = decoder => readAnyLookupTable[127 - readUint8(decoder)](decoder)\n\n/**\n * T must not be null.\n *\n * @template T\n */\nexport class RleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {function(Decoder):T} reader\n */\n constructor (uint8Array, reader) {\n super(uint8Array)\n /**\n * The reader\n */\n this.reader = reader\n /**\n * Current state\n * @type {T|null}\n */\n this.s = null\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = this.reader(this)\n if (hasContent(this)) {\n this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented\n } else {\n this.count = -1 // read the current value forever\n }\n }\n this.count--\n return /** @type {T} */ (this.s)\n }\n}\n\nexport class IntDiffDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {number} start\n */\n constructor (uint8Array, start) {\n super(uint8Array)\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n }\n\n /**\n * @return {number}\n */\n read () {\n this.s += readVarInt(this)\n return this.s\n }\n}\n\nexport class RleIntDiffDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {number} start\n */\n constructor (uint8Array, start) {\n super(uint8Array)\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n this.count = 0\n }\n\n /**\n * @return {number}\n */\n read () {\n if (this.count === 0) {\n this.s += readVarInt(this)\n if (hasContent(this)) {\n this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented\n } else {\n this.count = -1 // read the current value forever\n }\n }\n this.count--\n return /** @type {number} */ (this.s)\n }\n}\n\nexport class UintOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = readVarInt(this)\n // if the sign is negative, we read the count too, otherwise count is 1\n const isNegative = math.isNegativeZero(this.s)\n this.count = 1\n if (isNegative) {\n this.s = -this.s\n this.count = readVarUint(this) + 2\n }\n }\n this.count--\n return /** @type {number} */ (this.s)\n }\n}\n\nexport class IncUintOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = readVarInt(this)\n // if the sign is negative, we read the count too, otherwise count is 1\n const isNegative = math.isNegativeZero(this.s)\n this.count = 1\n if (isNegative) {\n this.s = -this.s\n this.count = readVarUint(this) + 2\n }\n }\n this.count--\n return /** @type {number} */ (this.s++)\n }\n}\n\nexport class IntDiffOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n this.diff = 0\n }\n\n /**\n * @return {number}\n */\n read () {\n if (this.count === 0) {\n const diff = readVarInt(this)\n // if the first bit is set, we read more data\n const hasCount = diff & 1\n this.diff = math.floor(diff / 2) // shift >> 1\n this.count = 1\n if (hasCount) {\n this.count = readVarUint(this) + 2\n }\n }\n this.s += this.diff\n this.count--\n return this.s\n }\n}\n\nexport class StringDecoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n this.decoder = new UintOptRleDecoder(uint8Array)\n this.str = readVarString(this.decoder)\n /**\n * @type {number}\n */\n this.spos = 0\n }\n\n /**\n * @return {string}\n */\n read () {\n const end = this.spos + this.decoder.read()\n const res = this.str.slice(this.spos, end)\n this.spos = end\n return res\n }\n}\n",null,null,null,null],"names":["binary.BITS7","binary.BIT8","math.floor","string.utf8TextEncoder","string.encodeUtf8","math.min","math.max","error.create","number.MAX_SAFE_INTEGER","string.utf8TextDecoder","AuthMessageType","encoding.writeVarUint","encoding.writeVarString","decoding.readVarUint","decoding.readVarString","WsReadyStates"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEO,MAAM,KAAK,GAAG,IAAI,CAAC;;AAkB1B;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG;;ACtCzC;;AAoBO,MAAM,IAAI,GAAG;AAsCb,MAAM,KAAK,GAAG;;AC1DrB;AACA;AACA;AACA;AACA;;;AAKO,MAAM,gBAAgB,GAAG,MAAM,CAAC;;ACsCvC;AACA;AACA;AACA;AACO,MAAM,mBAAmB,GAAG,GAAG,IAAI;AAC1C,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC;AACxD,EAAE,MAAM,GAAG,GAAG,aAAa,CAAC;AAC5B,EAAE,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,GAAG;AAChC,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;AAChC,IAAI,GAA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,GAAG,EAAE,KAAK,CAAC,KAAI;QACxD,OAAO;AACN,YAAA,QAAQ,EAAE,GAAG;AACb,YAAA,GAAG,KAAK;SACR;AACF,KAAC,CAAC;AACH;;ACTA;;;AAGG;AACSC;AAAZ,CAAA,UAAY,aAAa,EAAA;AACxB,IAAA,aAAA,CAAA,aAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAc;AACd,IAAA,aAAA,CAAA,aAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACR,IAAA,aAAA,CAAA,aAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW;AACX,IAAA,aAAA,CAAA,aAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAU;AACX,CAAC,EALWA,qBAAa,KAAbA,qBAAa,GAKxB,EAAA,CAAA,CAAA;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js deleted file mode 100644 index 3d818d0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js +++ /dev/null @@ -1,509 +0,0 @@ -/** - * Common Math expressions. - * - * @module math - */ - -const floor = Math.floor; - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The smaller element of a and b - */ -const min = (a, b) => a < b ? a : b; - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The bigger element of a and b - */ -const max = (a, b) => a > b ? a : b; - -/* eslint-env browser */ - -const BIT8 = 128; -const BITS7 = 127; - -/** - * Utility helpers for working with numbers. - * - * @module number - */ - - -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER; - -/** - * @param {string} str - * @return {Uint8Array} - */ -const _encodeUtf8Polyfill = str => { - const encodedString = unescape(encodeURIComponent(str)); - const len = encodedString.length; - const buf = new Uint8Array(len); - for (let i = 0; i < len; i++) { - buf[i] = /** @type {number} */ (encodedString.codePointAt(i)); - } - return buf -}; - -/* c8 ignore next */ -const utf8TextEncoder = /** @type {TextEncoder} */ (typeof TextEncoder !== 'undefined' ? new TextEncoder() : null); - -/** - * @param {string} str - * @return {Uint8Array} - */ -const _encodeUtf8Native = str => utf8TextEncoder.encode(str); - -/** - * @param {string} str - * @return {Uint8Array} - */ -/* c8 ignore next */ -const encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill; - -/* c8 ignore next */ -let utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }); - -/* c8 ignore start */ -if (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) { - // Safari doesn't handle BOM correctly. - // This fixes a bug in Safari 13.0.5 where it produces a BOM the first time it is called. - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the first call and - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the second call - // Another issue is that from then on no BOM chars are recognized anymore - /* c8 ignore next */ - utf8TextDecoder = null; -} - -/** - * Efficient schema-less binary encoding with support for variable length encoding. - * - * Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module encoding - */ - - -/** - * Write one byte to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {number} num The byte that is to be encoded. - */ -const write = (encoder, num) => { - const bufferLen = encoder.cbuf.length; - if (encoder.cpos === bufferLen) { - encoder.bufs.push(encoder.cbuf); - encoder.cbuf = new Uint8Array(bufferLen * 2); - encoder.cpos = 0; - } - encoder.cbuf[encoder.cpos++] = num; -}; - -/** - * Write a variable length unsigned integer. Max encodable integer is 2^53. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -const writeVarUint = (encoder, num) => { - while (num > BITS7) { - write(encoder, BIT8 | (BITS7 & num)); - num = floor(num / 128); // shift >>> 7 - } - write(encoder, BITS7 & num); -}; - -/** - * A cache to store strings temporarily - */ -const _strBuffer = new Uint8Array(30000); -const _maxStrBSize = _strBuffer.length / 3; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -const _writeVarStringNative = (encoder, str) => { - if (str.length < _maxStrBSize) { - // We can encode the string into the existing buffer - /* c8 ignore next */ - const written = utf8TextEncoder.encodeInto(str, _strBuffer).written || 0; - writeVarUint(encoder, written); - for (let i = 0; i < written; i++) { - write(encoder, _strBuffer[i]); - } - } else { - writeVarUint8Array(encoder, encodeUtf8(str)); - } -}; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -const _writeVarStringPolyfill = (encoder, str) => { - const encodedString = unescape(encodeURIComponent(str)); - const len = encodedString.length; - writeVarUint(encoder, len); - for (let i = 0; i < len; i++) { - write(encoder, /** @type {number} */ (encodedString.codePointAt(i))); - } -}; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -/* c8 ignore next */ -const writeVarString = (utf8TextEncoder && /** @type {any} */ (utf8TextEncoder).encodeInto) ? _writeVarStringNative : _writeVarStringPolyfill; - -/** - * Append fixed-length Uint8Array to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -const writeUint8Array = (encoder, uint8Array) => { - const bufferLen = encoder.cbuf.length; - const cpos = encoder.cpos; - const leftCopyLen = min(bufferLen - cpos, uint8Array.length); - const rightCopyLen = uint8Array.length - leftCopyLen; - encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos); - encoder.cpos += leftCopyLen; - if (rightCopyLen > 0) { - // Still something to write, write right half.. - // Append new buffer - encoder.bufs.push(encoder.cbuf); - // must have at least size of remaining buffer - encoder.cbuf = new Uint8Array(max(bufferLen * 2, rightCopyLen)); - // copy array - encoder.cbuf.set(uint8Array.subarray(leftCopyLen)); - encoder.cpos = rightCopyLen; - } -}; - -/** - * Append an Uint8Array to Encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -const writeVarUint8Array = (encoder, uint8Array) => { - writeVarUint(encoder, uint8Array.byteLength); - writeUint8Array(encoder, uint8Array); -}; - -/** - * Error helpers. - * - * @module error - */ - -/** - * @param {string} s - * @return {Error} - */ -/* c8 ignore next */ -const create = s => new Error(s); - -/** - * Efficient schema-less binary decoding with support for variable length encoding. - * - * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module decoding - */ - - -const errorUnexpectedEndOfArray = create('Unexpected end of array'); -const errorIntegerOutOfRange = create('Integer out of Range'); - -/** - * Create an Uint8Array view of the next `len` bytes and advance the position by `len`. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @param {Decoder} decoder The decoder instance - * @param {number} len The length of bytes to read - * @return {Uint8Array} - */ -const readUint8Array = (decoder, len) => { - const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len); - decoder.pos += len; - return view -}; - -/** - * Read variable length Uint8Array. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @param {Decoder} decoder - * @return {Uint8Array} - */ -const readVarUint8Array = decoder => readUint8Array(decoder, readVarUint(decoder)); - -/** - * Read one byte as unsigned integer. - * @function - * @param {Decoder} decoder The decoder instance - * @return {number} Unsigned 8-bit integer - */ -const readUint8 = decoder => decoder.arr[decoder.pos++]; - -/** - * Read unsigned integer (32bit) with variable length. - * 1/8th of the storage is used as encoding overhead. - * * numbers < 2^7 is stored in one bytlength - * * numbers < 2^14 is stored in two bylength - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer.length - */ -const readVarUint = decoder => { - let num = 0; - let mult = 1; - const len = decoder.arr.length; - while (decoder.pos < len) { - const r = decoder.arr[decoder.pos++]; - // num = num | ((r & binary.BITS7) << len) - num = num + (r & BITS7) * mult; // shift $r << (7*#iterations) and add it to num - mult *= 128; // next iteration, shift 7 "more" to the left - if (r < BIT8) { - return num - } - /* c8 ignore start */ - if (num > MAX_SAFE_INTEGER) { - throw errorIntegerOutOfRange - } - /* c8 ignore stop */ - } - throw errorUnexpectedEndOfArray -}; - -/** - * We don't test this function anymore as we use native decoding/encoding by default now. - * Better not modify this anymore.. - * - * Transforming utf8 to a string is pretty expensive. The code performs 10x better - * when String.fromCodePoint is fed with all characters as arguments. - * But most environments have a maximum number of arguments per functions. - * For effiency reasons we apply a maximum of 10000 characters at once. - * - * @function - * @param {Decoder} decoder - * @return {String} The read String. - */ -/* c8 ignore start */ -const _readVarStringPolyfill = decoder => { - let remainingLen = readVarUint(decoder); - if (remainingLen === 0) { - return '' - } else { - let encodedString = String.fromCodePoint(readUint8(decoder)); // remember to decrease remainingLen - if (--remainingLen < 100) { // do not create a Uint8Array for small strings - while (remainingLen--) { - encodedString += String.fromCodePoint(readUint8(decoder)); - } - } else { - while (remainingLen > 0) { - const nextLen = remainingLen < 10000 ? remainingLen : 10000; - // this is dangerous, we create a fresh array view from the existing buffer - const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen); - decoder.pos += nextLen; - // Starting with ES5.1 we can supply a generic array-like object as arguments - encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes)); - remainingLen -= nextLen; - } - } - return decodeURIComponent(escape(encodedString)) - } -}; -/* c8 ignore stop */ - -/** - * @function - * @param {Decoder} decoder - * @return {String} The read String - */ -const _readVarStringNative = decoder => - /** @type any */ (utf8TextDecoder).decode(readVarUint8Array(decoder)); - -/** - * Read string of variable length - * * varUint is used to store the length of the string - * - * @function - * @param {Decoder} decoder - * @return {String} The read String - * - */ -/* c8 ignore next */ -const readVarString = utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill; - -var AuthMessageType; -(function (AuthMessageType) { - AuthMessageType[AuthMessageType["Token"] = 0] = "Token"; - AuthMessageType[AuthMessageType["PermissionDenied"] = 1] = "PermissionDenied"; - AuthMessageType[AuthMessageType["Authenticated"] = 2] = "Authenticated"; -})(AuthMessageType || (AuthMessageType = {})); -const writeAuthentication = (encoder, auth) => { - writeVarUint(encoder, AuthMessageType.Token); - writeVarString(encoder, auth); -}; -const writePermissionDenied = (encoder, reason) => { - writeVarUint(encoder, AuthMessageType.PermissionDenied); - writeVarString(encoder, reason); -}; -const writeAuthenticated = (encoder, scope) => { - writeVarUint(encoder, AuthMessageType.Authenticated); - writeVarString(encoder, scope); -}; -const writeTokenSyncRequest = (encoder) => { - writeVarUint(encoder, AuthMessageType.Token); -}; -const readAuthMessage = (decoder, sendToken, permissionDeniedHandler, authenticatedHandler) => { - switch (readVarUint(decoder)) { - case AuthMessageType.Token: { - sendToken(); - break; - } - case AuthMessageType.PermissionDenied: { - permissionDeniedHandler(readVarString(decoder)); - break; - } - case AuthMessageType.Authenticated: { - authenticatedHandler(readVarString(decoder)); - break; - } - } -}; - -/** - * The server is terminating the connection because a data frame was received - * that is too large. - * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code - */ -const MessageTooBig = { - code: 1009, - reason: "Message Too Big", -}; -/** - * The server successfully processed the request, asks that the requester reset - * its document view, and is not returning any content. - */ -const ResetConnection = { - code: 4205, - reason: "Reset Connection", -}; -/** - * Similar to Forbidden, but specifically for use when authentication is required and has - * failed or has not yet been provided. - */ -const Unauthorized = { - code: 4401, - reason: "Unauthorized", -}; -/** - * The request contained valid data and was understood by the server, but the server - * is refusing action. - */ -const Forbidden = { - code: 4403, - reason: "Forbidden", -}; -/** - * The server timed out waiting for the request. - */ -const ConnectionTimeout = { - code: 4408, - reason: "Connection Timeout", -}; - -const awarenessStatesToArray = (states) => { - return Array.from(states.entries()).map(([key, value]) => { - return { - clientId: key, - ...value, - }; - }); -}; - -/** - * State of the WebSocket connection. - * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState - */ -var WsReadyStates; -(function (WsReadyStates) { - WsReadyStates[WsReadyStates["Connecting"] = 0] = "Connecting"; - WsReadyStates[WsReadyStates["Open"] = 1] = "Open"; - WsReadyStates[WsReadyStates["Closing"] = 2] = "Closing"; - WsReadyStates[WsReadyStates["Closed"] = 3] = "Closed"; -})(WsReadyStates || (WsReadyStates = {})); - -export { AuthMessageType, ConnectionTimeout, Forbidden, MessageTooBig, ResetConnection, Unauthorized, WsReadyStates, awarenessStatesToArray, readAuthMessage, writeAuthenticated, writeAuthentication, writePermissionDenied, writeTokenSyncRequest }; -//# sourceMappingURL=hocuspocus-common.esm.js.map diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js.map deleted file mode 100644 index 4c9e3d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-common.esm.js","sources":["../../../node_modules/lib0/math.js","../../../node_modules/lib0/binary.js","../../../node_modules/lib0/number.js","../../../node_modules/lib0/string.js","../../../node_modules/lib0/encoding.js","../../../node_modules/lib0/error.js","../../../node_modules/lib0/decoding.js","../src/auth.ts","../src/CloseEvents.ts","../src/awarenessStatesToArray.ts","../src/types.ts"],"sourcesContent":["/**\n * Common Math expressions.\n *\n * @module math\n */\n\nexport const floor = Math.floor\nexport const ceil = Math.ceil\nexport const abs = Math.abs\nexport const imul = Math.imul\nexport const round = Math.round\nexport const log10 = Math.log10\nexport const log2 = Math.log2\nexport const log = Math.log\nexport const sqrt = Math.sqrt\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The sum of a and b\n */\nexport const add = (a, b) => a + b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The smaller element of a and b\n */\nexport const min = (a, b) => a < b ? a : b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The bigger element of a and b\n */\nexport const max = (a, b) => a > b ? a : b\n\nexport const isNaN = Number.isNaN\n\nexport const pow = Math.pow\n/**\n * Base 10 exponential function. Returns the value of 10 raised to the power of pow.\n *\n * @param {number} exp\n * @return {number}\n */\nexport const exp10 = exp => Math.pow(10, exp)\n\nexport const sign = Math.sign\n\n/**\n * @param {number} n\n * @return {boolean} Wether n is negative. This function also differentiates between -0 and +0\n */\nexport const isNegativeZero = n => n !== 0 ? n < 0 : 1 / n < 0\n","/* eslint-env browser */\n\n/**\n * Binary data constants.\n *\n * @module binary\n */\n\n/**\n * n-th bit activated.\n *\n * @type {number}\n */\nexport const BIT1 = 1\nexport const BIT2 = 2\nexport const BIT3 = 4\nexport const BIT4 = 8\nexport const BIT5 = 16\nexport const BIT6 = 32\nexport const BIT7 = 64\nexport const BIT8 = 128\nexport const BIT9 = 256\nexport const BIT10 = 512\nexport const BIT11 = 1024\nexport const BIT12 = 2048\nexport const BIT13 = 4096\nexport const BIT14 = 8192\nexport const BIT15 = 16384\nexport const BIT16 = 32768\nexport const BIT17 = 65536\nexport const BIT18 = 1 << 17\nexport const BIT19 = 1 << 18\nexport const BIT20 = 1 << 19\nexport const BIT21 = 1 << 20\nexport const BIT22 = 1 << 21\nexport const BIT23 = 1 << 22\nexport const BIT24 = 1 << 23\nexport const BIT25 = 1 << 24\nexport const BIT26 = 1 << 25\nexport const BIT27 = 1 << 26\nexport const BIT28 = 1 << 27\nexport const BIT29 = 1 << 28\nexport const BIT30 = 1 << 29\nexport const BIT31 = 1 << 30\nexport const BIT32 = 1 << 31\n\n/**\n * First n bits activated.\n *\n * @type {number}\n */\nexport const BITS0 = 0\nexport const BITS1 = 1\nexport const BITS2 = 3\nexport const BITS3 = 7\nexport const BITS4 = 15\nexport const BITS5 = 31\nexport const BITS6 = 63\nexport const BITS7 = 127\nexport const BITS8 = 255\nexport const BITS9 = 511\nexport const BITS10 = 1023\nexport const BITS11 = 2047\nexport const BITS12 = 4095\nexport const BITS13 = 8191\nexport const BITS14 = 16383\nexport const BITS15 = 32767\nexport const BITS16 = 65535\nexport const BITS17 = BIT18 - 1\nexport const BITS18 = BIT19 - 1\nexport const BITS19 = BIT20 - 1\nexport const BITS20 = BIT21 - 1\nexport const BITS21 = BIT22 - 1\nexport const BITS22 = BIT23 - 1\nexport const BITS23 = BIT24 - 1\nexport const BITS24 = BIT25 - 1\nexport const BITS25 = BIT26 - 1\nexport const BITS26 = BIT27 - 1\nexport const BITS27 = BIT28 - 1\nexport const BITS28 = BIT29 - 1\nexport const BITS29 = BIT30 - 1\nexport const BITS30 = BIT31 - 1\n/**\n * @type {number}\n */\nexport const BITS31 = 0x7FFFFFFF\n/**\n * @type {number}\n */\nexport const BITS32 = 0xFFFFFFFF\n","/**\n * Utility helpers for working with numbers.\n *\n * @module number\n */\n\nimport * as math from './math.js'\nimport * as binary from './binary.js'\n\nexport const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER\nexport const MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER\n\nexport const LOWEST_INT32 = 1 << 31\nexport const HIGHEST_INT32 = binary.BITS31\nexport const HIGHEST_UINT32 = binary.BITS32\n\n/* c8 ignore next */\nexport const isInteger = Number.isInteger || (num => typeof num === 'number' && isFinite(num) && math.floor(num) === num)\nexport const isNaN = Number.isNaN\nexport const parseInt = Number.parseInt\n\n/**\n * Count the number of \"1\" bits in an unsigned 32bit number.\n *\n * Super fun bitcount algorithm by Brian Kernighan.\n *\n * @param {number} n\n */\nexport const countBits = n => {\n n &= binary.BITS32\n let count = 0\n while (n) {\n n &= (n - 1)\n count++\n }\n return count\n}\n","import * as array from './array.js'\n\n/**\n * Utility module to work with strings.\n *\n * @module string\n */\n\nexport const fromCharCode = String.fromCharCode\nexport const fromCodePoint = String.fromCodePoint\n\n/**\n * The largest utf16 character.\n * Corresponds to Uint8Array([255, 255]) or charcodeof(2x2^8)\n */\nexport const MAX_UTF16_CHARACTER = fromCharCode(65535)\n\n/**\n * @param {string} s\n * @return {string}\n */\nconst toLowerCase = s => s.toLowerCase()\n\nconst trimLeftRegex = /^\\s*/g\n\n/**\n * @param {string} s\n * @return {string}\n */\nexport const trimLeft = s => s.replace(trimLeftRegex, '')\n\nconst fromCamelCaseRegex = /([A-Z])/g\n\n/**\n * @param {string} s\n * @param {string} separator\n * @return {string}\n */\nexport const fromCamelCase = (s, separator) => trimLeft(s.replace(fromCamelCaseRegex, match => `${separator}${toLowerCase(match)}`))\n\n/**\n * Compute the utf8ByteLength\n * @param {string} str\n * @return {number}\n */\nexport const utf8ByteLength = str => unescape(encodeURIComponent(str)).length\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\nexport const _encodeUtf8Polyfill = str => {\n const encodedString = unescape(encodeURIComponent(str))\n const len = encodedString.length\n const buf = new Uint8Array(len)\n for (let i = 0; i < len; i++) {\n buf[i] = /** @type {number} */ (encodedString.codePointAt(i))\n }\n return buf\n}\n\n/* c8 ignore next */\nexport const utf8TextEncoder = /** @type {TextEncoder} */ (typeof TextEncoder !== 'undefined' ? new TextEncoder() : null)\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\nexport const _encodeUtf8Native = str => utf8TextEncoder.encode(str)\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\n/* c8 ignore next */\nexport const encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\nexport const _decodeUtf8Polyfill = buf => {\n let remainingLen = buf.length\n let encodedString = ''\n let bufPos = 0\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n const bytes = buf.subarray(bufPos, bufPos + nextLen)\n bufPos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes))\n remainingLen -= nextLen\n }\n return decodeURIComponent(escape(encodedString))\n}\n\n/* c8 ignore next */\nexport let utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8', { fatal: true, ignoreBOM: true })\n\n/* c8 ignore start */\nif (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) {\n // Safari doesn't handle BOM correctly.\n // This fixes a bug in Safari 13.0.5 where it produces a BOM the first time it is called.\n // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the first call and\n // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the second call\n // Another issue is that from then on no BOM chars are recognized anymore\n /* c8 ignore next */\n utf8TextDecoder = null\n}\n/* c8 ignore stop */\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\nexport const _decodeUtf8Native = buf => /** @type {TextDecoder} */ (utf8TextDecoder).decode(buf)\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\n/* c8 ignore next */\nexport const decodeUtf8 = utf8TextDecoder ? _decodeUtf8Native : _decodeUtf8Polyfill\n\n/**\n * @param {string} str The initial string\n * @param {number} index Starting position\n * @param {number} remove Number of characters to remove\n * @param {string} insert New content to insert\n */\nexport const splice = (str, index, remove, insert = '') => str.slice(0, index) + insert + str.slice(index + remove)\n\n/**\n * @param {string} source\n * @param {number} n\n */\nexport const repeat = (source, n) => array.unfold(n, () => source).join('')\n","/**\n * Efficient schema-less binary encoding with support for variable length encoding.\n *\n * Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n *\n * @module encoding\n */\n\nimport * as math from './math.js'\nimport * as number from './number.js'\nimport * as binary from './binary.js'\nimport * as string from './string.js'\nimport * as array from './array.js'\n\n/**\n * A BinaryEncoder handles the encoding to an Uint8Array.\n */\nexport class Encoder {\n constructor () {\n this.cpos = 0\n this.cbuf = new Uint8Array(100)\n /**\n * @type {Array}\n */\n this.bufs = []\n }\n}\n\n/**\n * @function\n * @return {Encoder}\n */\nexport const createEncoder = () => new Encoder()\n\n/**\n * @param {function(Encoder):void} f\n */\nexport const encode = (f) => {\n const encoder = createEncoder()\n f(encoder)\n return toUint8Array(encoder)\n}\n\n/**\n * The current length of the encoded data.\n *\n * @function\n * @param {Encoder} encoder\n * @return {number}\n */\nexport const length = encoder => {\n let len = encoder.cpos\n for (let i = 0; i < encoder.bufs.length; i++) {\n len += encoder.bufs[i].length\n }\n return len\n}\n\n/**\n * Check whether encoder is empty.\n *\n * @function\n * @param {Encoder} encoder\n * @return {boolean}\n */\nexport const hasContent = encoder => encoder.cpos > 0 || encoder.bufs.length > 0\n\n/**\n * Transform to Uint8Array.\n *\n * @function\n * @param {Encoder} encoder\n * @return {Uint8Array} The created ArrayBuffer.\n */\nexport const toUint8Array = encoder => {\n const uint8arr = new Uint8Array(length(encoder))\n let curPos = 0\n for (let i = 0; i < encoder.bufs.length; i++) {\n const d = encoder.bufs[i]\n uint8arr.set(d, curPos)\n curPos += d.length\n }\n uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos)\n return uint8arr\n}\n\n/**\n * Verify that it is possible to write `len` bytes wtihout checking. If\n * necessary, a new Buffer with the required length is attached.\n *\n * @param {Encoder} encoder\n * @param {number} len\n */\nexport const verifyLen = (encoder, len) => {\n const bufferLen = encoder.cbuf.length\n if (bufferLen - encoder.cpos < len) {\n encoder.bufs.push(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos))\n encoder.cbuf = new Uint8Array(math.max(bufferLen, len) * 2)\n encoder.cpos = 0\n }\n}\n\n/**\n * Write one byte to the encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The byte that is to be encoded.\n */\nexport const write = (encoder, num) => {\n const bufferLen = encoder.cbuf.length\n if (encoder.cpos === bufferLen) {\n encoder.bufs.push(encoder.cbuf)\n encoder.cbuf = new Uint8Array(bufferLen * 2)\n encoder.cpos = 0\n }\n encoder.cbuf[encoder.cpos++] = num\n}\n\n/**\n * Write one byte at a specific position.\n * Position must already be written (i.e. encoder.length > pos)\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos Position to which to write data\n * @param {number} num Unsigned 8-bit integer\n */\nexport const set = (encoder, pos, num) => {\n let buffer = null\n // iterate all buffers and adjust position\n for (let i = 0; i < encoder.bufs.length && buffer === null; i++) {\n const b = encoder.bufs[i]\n if (pos < b.length) {\n buffer = b // found buffer\n } else {\n pos -= b.length\n }\n }\n if (buffer === null) {\n // use current buffer\n buffer = encoder.cbuf\n }\n buffer[pos] = num\n}\n\n/**\n * Write one byte as an unsigned integer.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint8 = write\n\n/**\n * Write one byte as an unsigned Integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint8 = set\n\n/**\n * Write two bytes as an unsigned integer.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint16 = (encoder, num) => {\n write(encoder, num & binary.BITS8)\n write(encoder, (num >>> 8) & binary.BITS8)\n}\n/**\n * Write two bytes as an unsigned integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint16 = (encoder, pos, num) => {\n set(encoder, pos, num & binary.BITS8)\n set(encoder, pos + 1, (num >>> 8) & binary.BITS8)\n}\n\n/**\n * Write two bytes as an unsigned integer\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint32 = (encoder, num) => {\n for (let i = 0; i < 4; i++) {\n write(encoder, num & binary.BITS8)\n num >>>= 8\n }\n}\n\n/**\n * Write two bytes as an unsigned integer in big endian order.\n * (most significant byte first)\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint32BigEndian = (encoder, num) => {\n for (let i = 3; i >= 0; i--) {\n write(encoder, (num >>> (8 * i)) & binary.BITS8)\n }\n}\n\n/**\n * Write two bytes as an unsigned integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint32 = (encoder, pos, num) => {\n for (let i = 0; i < 4; i++) {\n set(encoder, pos + i, num & binary.BITS8)\n num >>>= 8\n }\n}\n\n/**\n * Write a variable length unsigned integer. Max encodable integer is 2^53.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeVarUint = (encoder, num) => {\n while (num > binary.BITS7) {\n write(encoder, binary.BIT8 | (binary.BITS7 & num))\n num = math.floor(num / 128) // shift >>> 7\n }\n write(encoder, binary.BITS7 & num)\n}\n\n/**\n * Write a variable length integer.\n *\n * We use the 7th bit instead for signaling that this is a negative number.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeVarInt = (encoder, num) => {\n const isNegative = math.isNegativeZero(num)\n if (isNegative) {\n num = -num\n }\n // |- whether to continue reading |- whether is negative |- number\n write(encoder, (num > binary.BITS6 ? binary.BIT8 : 0) | (isNegative ? binary.BIT7 : 0) | (binary.BITS6 & num))\n num = math.floor(num / 64) // shift >>> 6\n // We don't need to consider the case of num === 0 so we can use a different\n // pattern here than above.\n while (num > 0) {\n write(encoder, (num > binary.BITS7 ? binary.BIT8 : 0) | (binary.BITS7 & num))\n num = math.floor(num / 128) // shift >>> 7\n }\n}\n\n/**\n * A cache to store strings temporarily\n */\nconst _strBuffer = new Uint8Array(30000)\nconst _maxStrBSize = _strBuffer.length / 3\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const _writeVarStringNative = (encoder, str) => {\n if (str.length < _maxStrBSize) {\n // We can encode the string into the existing buffer\n /* c8 ignore next */\n const written = string.utf8TextEncoder.encodeInto(str, _strBuffer).written || 0\n writeVarUint(encoder, written)\n for (let i = 0; i < written; i++) {\n write(encoder, _strBuffer[i])\n }\n } else {\n writeVarUint8Array(encoder, string.encodeUtf8(str))\n }\n}\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const _writeVarStringPolyfill = (encoder, str) => {\n const encodedString = unescape(encodeURIComponent(str))\n const len = encodedString.length\n writeVarUint(encoder, len)\n for (let i = 0; i < len; i++) {\n write(encoder, /** @type {number} */ (encodedString.codePointAt(i)))\n }\n}\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\n/* c8 ignore next */\nexport const writeVarString = (string.utf8TextEncoder && /** @type {any} */ (string.utf8TextEncoder).encodeInto) ? _writeVarStringNative : _writeVarStringPolyfill\n\n/**\n * Write a string terminated by a special byte sequence. This is not very performant and is\n * generally discouraged. However, the resulting byte arrays are lexiographically ordered which\n * makes this a nice feature for databases.\n *\n * The string will be encoded using utf8 and then terminated and escaped using writeTerminatingUint8Array.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const writeTerminatedString = (encoder, str) =>\n writeTerminatedUint8Array(encoder, string.encodeUtf8(str))\n\n/**\n * Write a terminating Uint8Array. Note that this is not performant and is generally\n * discouraged. There are few situations when this is needed.\n *\n * We use 0x0 as a terminating character. 0x1 serves as an escape character for 0x0 and 0x1.\n *\n * Example: [0,1,2] is encoded to [1,0,1,1,2,0]. 0x0, and 0x1 needed to be escaped using 0x1. Then\n * the result is terminated using the 0x0 character.\n *\n * This is basically how many systems implement null terminated strings. However, we use an escape\n * character 0x1 to avoid issues and potenial attacks on our database (if this is used as a key\n * encoder for NoSql databases).\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} buf The string that is to be encoded.\n */\nexport const writeTerminatedUint8Array = (encoder, buf) => {\n for (let i = 0; i < buf.length; i++) {\n const b = buf[i]\n if (b === 0 || b === 1) {\n write(encoder, 1)\n }\n write(encoder, buf[i])\n }\n write(encoder, 0)\n}\n\n/**\n * Write the content of another Encoder.\n *\n * @TODO: can be improved!\n * - Note: Should consider that when appending a lot of small Encoders, we should rather clone than referencing the old structure.\n * Encoders start with a rather big initial buffer.\n *\n * @function\n * @param {Encoder} encoder The enUint8Arr\n * @param {Encoder} append The BinaryEncoder to be written.\n */\nexport const writeBinaryEncoder = (encoder, append) => writeUint8Array(encoder, toUint8Array(append))\n\n/**\n * Append fixed-length Uint8Array to the encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} uint8Array\n */\nexport const writeUint8Array = (encoder, uint8Array) => {\n const bufferLen = encoder.cbuf.length\n const cpos = encoder.cpos\n const leftCopyLen = math.min(bufferLen - cpos, uint8Array.length)\n const rightCopyLen = uint8Array.length - leftCopyLen\n encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos)\n encoder.cpos += leftCopyLen\n if (rightCopyLen > 0) {\n // Still something to write, write right half..\n // Append new buffer\n encoder.bufs.push(encoder.cbuf)\n // must have at least size of remaining buffer\n encoder.cbuf = new Uint8Array(math.max(bufferLen * 2, rightCopyLen))\n // copy array\n encoder.cbuf.set(uint8Array.subarray(leftCopyLen))\n encoder.cpos = rightCopyLen\n }\n}\n\n/**\n * Append an Uint8Array to Encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} uint8Array\n */\nexport const writeVarUint8Array = (encoder, uint8Array) => {\n writeVarUint(encoder, uint8Array.byteLength)\n writeUint8Array(encoder, uint8Array)\n}\n\n/**\n * Create an DataView of the next `len` bytes. Use it to write data after\n * calling this function.\n *\n * ```js\n * // write float32 using DataView\n * const dv = writeOnDataView(encoder, 4)\n * dv.setFloat32(0, 1.1)\n * // read float32 using DataView\n * const dv = readFromDataView(encoder, 4)\n * dv.getFloat32(0) // => 1.100000023841858 (leaving it to the reader to find out why this is the correct result)\n * ```\n *\n * @param {Encoder} encoder\n * @param {number} len\n * @return {DataView}\n */\nexport const writeOnDataView = (encoder, len) => {\n verifyLen(encoder, len)\n const dview = new DataView(encoder.cbuf.buffer, encoder.cpos, len)\n encoder.cpos += len\n return dview\n}\n\n/**\n * @param {Encoder} encoder\n * @param {number} num\n */\nexport const writeFloat32 = (encoder, num) => writeOnDataView(encoder, 4).setFloat32(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {number} num\n */\nexport const writeFloat64 = (encoder, num) => writeOnDataView(encoder, 8).setFloat64(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {bigint} num\n */\nexport const writeBigInt64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigInt64(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {bigint} num\n */\nexport const writeBigUint64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigUint64(0, num, false)\n\nconst floatTestBed = new DataView(new ArrayBuffer(4))\n/**\n * Check if a number can be encoded as a 32 bit float.\n *\n * @param {number} num\n * @return {boolean}\n */\nconst isFloat32 = num => {\n floatTestBed.setFloat32(0, num)\n return floatTestBed.getFloat32(0) === num\n}\n\n/**\n * Encode data with efficient binary format.\n *\n * Differences to JSON:\n * • Transforms data to a binary format (not to a string)\n * • Encodes undefined, NaN, and ArrayBuffer (these can't be represented in JSON)\n * • Numbers are efficiently encoded either as a variable length integer, as a\n * 32 bit float, as a 64 bit float, or as a 64 bit bigint.\n *\n * Encoding table:\n *\n * | Data Type | Prefix | Encoding Method | Comment |\n * | ------------------- | -------- | ------------------ | ------- |\n * | undefined | 127 | | Functions, symbol, and everything that cannot be identified is encoded as undefined |\n * | null | 126 | | |\n * | integer | 125 | writeVarInt | Only encodes 32 bit signed integers |\n * | float32 | 124 | writeFloat32 | |\n * | float64 | 123 | writeFloat64 | |\n * | bigint | 122 | writeBigInt64 | |\n * | boolean (false) | 121 | | True and false are different data types so we save the following byte |\n * | boolean (true) | 120 | | - 0b01111000 so the last bit determines whether true or false |\n * | string | 119 | writeVarString | |\n * | object | 118 | custom | Writes {length} then {length} key-value pairs |\n * | array | 117 | custom | Writes {length} then {length} json values |\n * | Uint8Array | 116 | writeVarUint8Array | We use Uint8Array for any kind of binary data |\n *\n * Reasons for the decreasing prefix:\n * We need the first bit for extendability (later we may want to encode the\n * prefix with writeVarUint). The remaining 7 bits are divided as follows:\n * [0-30] the beginning of the data range is used for custom purposes\n * (defined by the function that uses this library)\n * [31-127] the end of the data range is used for data encoding by\n * lib0/encoding.js\n *\n * @param {Encoder} encoder\n * @param {undefined|null|number|bigint|boolean|string|Object|Array|Uint8Array} data\n */\nexport const writeAny = (encoder, data) => {\n switch (typeof data) {\n case 'string':\n // TYPE 119: STRING\n write(encoder, 119)\n writeVarString(encoder, data)\n break\n case 'number':\n if (number.isInteger(data) && math.abs(data) <= binary.BITS31) {\n // TYPE 125: INTEGER\n write(encoder, 125)\n writeVarInt(encoder, data)\n } else if (isFloat32(data)) {\n // TYPE 124: FLOAT32\n write(encoder, 124)\n writeFloat32(encoder, data)\n } else {\n // TYPE 123: FLOAT64\n write(encoder, 123)\n writeFloat64(encoder, data)\n }\n break\n case 'bigint':\n // TYPE 122: BigInt\n write(encoder, 122)\n writeBigInt64(encoder, data)\n break\n case 'object':\n if (data === null) {\n // TYPE 126: null\n write(encoder, 126)\n } else if (array.isArray(data)) {\n // TYPE 117: Array\n write(encoder, 117)\n writeVarUint(encoder, data.length)\n for (let i = 0; i < data.length; i++) {\n writeAny(encoder, data[i])\n }\n } else if (data instanceof Uint8Array) {\n // TYPE 116: ArrayBuffer\n write(encoder, 116)\n writeVarUint8Array(encoder, data)\n } else {\n // TYPE 118: Object\n write(encoder, 118)\n const keys = Object.keys(data)\n writeVarUint(encoder, keys.length)\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n writeVarString(encoder, key)\n writeAny(encoder, data[key])\n }\n }\n break\n case 'boolean':\n // TYPE 120/121: boolean (true/false)\n write(encoder, data ? 120 : 121)\n break\n default:\n // TYPE 127: undefined\n write(encoder, 127)\n }\n}\n\n/**\n * Now come a few stateful encoder that have their own classes.\n */\n\n/**\n * Basic Run Length Encoder - a basic compression implementation.\n *\n * Encodes [1,1,1,7] to [1,3,7,1] (3 times 1, 1 time 7). This encoder might do more harm than good if there are a lot of values that are not repeated.\n *\n * It was originally used for image compression. Cool .. article http://csbruce.com/cbm/transactor/pdfs/trans_v7_i06.pdf\n *\n * @note T must not be null!\n *\n * @template T\n */\nexport class RleEncoder extends Encoder {\n /**\n * @param {function(Encoder, T):void} writer\n */\n constructor (writer) {\n super()\n /**\n * The writer\n */\n this.w = writer\n /**\n * Current state\n * @type {T|null}\n */\n this.s = null\n this.count = 0\n }\n\n /**\n * @param {T} v\n */\n write (v) {\n if (this.s === v) {\n this.count++\n } else {\n if (this.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw\n }\n this.count = 1\n // write first value\n this.w(this, v)\n this.s = v\n }\n }\n}\n\n/**\n * Basic diff decoder using variable length encoding.\n *\n * Encodes the values [3, 1100, 1101, 1050, 0] to [3, 1097, 1, -51, -1050] using writeVarInt.\n */\nexport class IntDiffEncoder extends Encoder {\n /**\n * @param {number} start\n */\n constructor (start) {\n super()\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n writeVarInt(this, v - this.s)\n this.s = v\n }\n}\n\n/**\n * A combination of IntDiffEncoder and RleEncoder.\n *\n * Basically first writes the IntDiffEncoder and then counts duplicate diffs using RleEncoding.\n *\n * Encodes the values [1,1,1,2,3,4,5,6] as [1,1,0,2,1,5] (RLE([1,0,0,1,1,1,1,1]) ⇒ RleIntDiff[1,1,0,2,1,5])\n */\nexport class RleIntDiffEncoder extends Encoder {\n /**\n * @param {number} start\n */\n constructor (start) {\n super()\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s === v && this.count > 0) {\n this.count++\n } else {\n if (this.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw\n }\n this.count = 1\n // write first value\n writeVarInt(this, v - this.s)\n this.s = v\n }\n }\n}\n\n/**\n * @param {UintOptRleEncoder} encoder\n */\nconst flushUintOptRleEncoder = encoder => {\n if (encoder.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n // case 1: just a single value. set sign to positive\n // case 2: write several values. set sign to negative to indicate that there is a length coming\n writeVarInt(encoder.encoder, encoder.count === 1 ? encoder.s : -encoder.s)\n if (encoder.count > 1) {\n writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw\n }\n }\n}\n\n/**\n * Optimized Rle encoder that does not suffer from the mentioned problem of the basic Rle encoder.\n *\n * Internally uses VarInt encoder to write unsigned integers. If the input occurs multiple times, we write\n * write it as a negative number. The UintOptRleDecoder then understands that it needs to read a count.\n *\n * Encodes [1,2,3,3,3] as [1,2,-3,3] (once 1, once 2, three times 3)\n */\nexport class UintOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s === v) {\n this.count++\n } else {\n flushUintOptRleEncoder(this)\n this.count = 1\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushUintOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * Increasing Uint Optimized RLE Encoder\n *\n * The RLE encoder counts the number of same occurences of the same value.\n * The IncUintOptRle encoder counts if the value increases.\n * I.e. 7, 8, 9, 10 will be encoded as [-7, 4]. 1, 3, 5 will be encoded\n * as [1, 3, 5].\n */\nexport class IncUintOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s + this.count === v) {\n this.count++\n } else {\n flushUintOptRleEncoder(this)\n this.count = 1\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushUintOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * @param {IntDiffOptRleEncoder} encoder\n */\nconst flushIntDiffOptRleEncoder = encoder => {\n if (encoder.count > 0) {\n // 31 bit making up the diff | wether to write the counter\n // const encodedDiff = encoder.diff << 1 | (encoder.count === 1 ? 0 : 1)\n const encodedDiff = encoder.diff * 2 + (encoder.count === 1 ? 0 : 1)\n // flush counter, unless this is the first value (count = 0)\n // case 1: just a single value. set first bit to positive\n // case 2: write several values. set first bit to negative to indicate that there is a length coming\n writeVarInt(encoder.encoder, encodedDiff)\n if (encoder.count > 1) {\n writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw\n }\n }\n}\n\n/**\n * A combination of the IntDiffEncoder and the UintOptRleEncoder.\n *\n * The count approach is similar to the UintDiffOptRleEncoder, but instead of using the negative bitflag, it encodes\n * in the LSB whether a count is to be read. Therefore this Encoder only supports 31 bit integers!\n *\n * Encodes [1, 2, 3, 2] as [3, 1, 6, -1] (more specifically [(1 << 1) | 1, (3 << 0) | 0, -1])\n *\n * Internally uses variable length encoding. Contrary to normal UintVar encoding, the first byte contains:\n * * 1 bit that denotes whether the next value is a count (LSB)\n * * 1 bit that denotes whether this value is negative (MSB - 1)\n * * 1 bit that denotes whether to continue reading the variable length integer (MSB)\n *\n * Therefore, only five bits remain to encode diff ranges.\n *\n * Use this Encoder only when appropriate. In most cases, this is probably a bad idea.\n */\nexport class IntDiffOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n this.diff = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.diff === v - this.s) {\n this.s = v\n this.count++\n } else {\n flushIntDiffOptRleEncoder(this)\n this.count = 1\n this.diff = v - this.s\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushIntDiffOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * Optimized String Encoder.\n *\n * Encoding many small strings in a simple Encoder is not very efficient. The function call to decode a string takes some time and creates references that must be eventually deleted.\n * In practice, when decoding several million small strings, the GC will kick in more and more often to collect orphaned string objects (or maybe there is another reason?).\n *\n * This string encoder solves the above problem. All strings are concatenated and written as a single string using a single encoding call.\n *\n * The lengths are encoded using a UintOptRleEncoder.\n */\nexport class StringEncoder {\n constructor () {\n /**\n * @type {Array}\n */\n this.sarr = []\n this.s = ''\n this.lensE = new UintOptRleEncoder()\n }\n\n /**\n * @param {string} string\n */\n write (string) {\n this.s += string\n if (this.s.length > 19) {\n this.sarr.push(this.s)\n this.s = ''\n }\n this.lensE.write(string.length)\n }\n\n toUint8Array () {\n const encoder = new Encoder()\n this.sarr.push(this.s)\n this.s = ''\n writeVarString(encoder, this.sarr.join(''))\n writeUint8Array(encoder, this.lensE.toUint8Array())\n return toUint8Array(encoder)\n }\n}\n","/**\n * Error helpers.\n *\n * @module error\n */\n\n/**\n * @param {string} s\n * @return {Error}\n */\n/* c8 ignore next */\nexport const create = s => new Error(s)\n\n/**\n * @throws {Error}\n * @return {never}\n */\n/* c8 ignore next 3 */\nexport const methodUnimplemented = () => {\n throw create('Method unimplemented')\n}\n\n/**\n * @throws {Error}\n * @return {never}\n */\n/* c8 ignore next 3 */\nexport const unexpectedCase = () => {\n throw create('Unexpected case')\n}\n","/**\n * Efficient schema-less binary decoding with support for variable length encoding.\n *\n * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n *\n * @module decoding\n */\n\nimport * as binary from './binary.js'\nimport * as math from './math.js'\nimport * as number from './number.js'\nimport * as string from './string.js'\nimport * as error from './error.js'\nimport * as encoding from './encoding.js'\n\nconst errorUnexpectedEndOfArray = error.create('Unexpected end of array')\nconst errorIntegerOutOfRange = error.create('Integer out of Range')\n\n/**\n * A Decoder handles the decoding of an Uint8Array.\n */\nexport class Decoder {\n /**\n * @param {Uint8Array} uint8Array Binary data to decode\n */\n constructor (uint8Array) {\n /**\n * Decoding target.\n *\n * @type {Uint8Array}\n */\n this.arr = uint8Array\n /**\n * Current decoding position.\n *\n * @type {number}\n */\n this.pos = 0\n }\n}\n\n/**\n * @function\n * @param {Uint8Array} uint8Array\n * @return {Decoder}\n */\nexport const createDecoder = uint8Array => new Decoder(uint8Array)\n\n/**\n * @function\n * @param {Decoder} decoder\n * @return {boolean}\n */\nexport const hasContent = decoder => decoder.pos !== decoder.arr.length\n\n/**\n * Clone a decoder instance.\n * Optionally set a new position parameter.\n *\n * @function\n * @param {Decoder} decoder The decoder instance\n * @param {number} [newPos] Defaults to current position\n * @return {Decoder} A clone of `decoder`\n */\nexport const clone = (decoder, newPos = decoder.pos) => {\n const _decoder = createDecoder(decoder.arr)\n _decoder.pos = newPos\n return _decoder\n}\n\n/**\n * Create an Uint8Array view of the next `len` bytes and advance the position by `len`.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n *\n * @function\n * @param {Decoder} decoder The decoder instance\n * @param {number} len The length of bytes to read\n * @return {Uint8Array}\n */\nexport const readUint8Array = (decoder, len) => {\n const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len)\n decoder.pos += len\n return view\n}\n\n/**\n * Read variable length Uint8Array.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n *\n * @function\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readVarUint8Array = decoder => readUint8Array(decoder, readVarUint(decoder))\n\n/**\n * Read the rest of the content as an ArrayBuffer\n * @function\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readTailAsUint8Array = decoder => readUint8Array(decoder, decoder.arr.length - decoder.pos)\n\n/**\n * Skip one byte, jump to the next position.\n * @function\n * @param {Decoder} decoder The decoder instance\n * @return {number} The next position\n */\nexport const skip8 = decoder => decoder.pos++\n\n/**\n * Read one byte as unsigned integer.\n * @function\n * @param {Decoder} decoder The decoder instance\n * @return {number} Unsigned 8-bit integer\n */\nexport const readUint8 = decoder => decoder.arr[decoder.pos++]\n\n/**\n * Read 2 bytes as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint16 = decoder => {\n const uint =\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8)\n decoder.pos += 2\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint32 = decoder => {\n const uint =\n (decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8) +\n (decoder.arr[decoder.pos + 2] << 16) +\n (decoder.arr[decoder.pos + 3] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer in big endian order.\n * (most significant byte first)\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint32BigEndian = decoder => {\n const uint =\n (decoder.arr[decoder.pos + 3] +\n (decoder.arr[decoder.pos + 2] << 8) +\n (decoder.arr[decoder.pos + 1] << 16) +\n (decoder.arr[decoder.pos] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint8 = decoder => decoder.arr[decoder.pos]\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint16 = decoder =>\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8)\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint32 = decoder => (\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8) +\n (decoder.arr[decoder.pos + 2] << 16) +\n (decoder.arr[decoder.pos + 3] << 24)\n) >>> 0\n\n/**\n * Read unsigned integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * * numbers < 2^7 is stored in one bytlength\n * * numbers < 2^14 is stored in two bylength\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.length\n */\nexport const readVarUint = decoder => {\n let num = 0\n let mult = 1\n const len = decoder.arr.length\n while (decoder.pos < len) {\n const r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & binary.BITS7) * mult // shift $r << (7*#iterations) and add it to num\n mult *= 128 // next iteration, shift 7 \"more\" to the left\n if (r < binary.BIT8) {\n return num\n }\n /* c8 ignore start */\n if (num > number.MAX_SAFE_INTEGER) {\n throw errorIntegerOutOfRange\n }\n /* c8 ignore stop */\n }\n throw errorUnexpectedEndOfArray\n}\n\n/**\n * Read signed integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * * numbers < 2^7 is stored in one bytlength\n * * numbers < 2^14 is stored in two bylength\n * @todo This should probably create the inverse ~num if number is negative - but this would be a breaking change.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.length\n */\nexport const readVarInt = decoder => {\n let r = decoder.arr[decoder.pos++]\n let num = r & binary.BITS6\n let mult = 64\n const sign = (r & binary.BIT7) > 0 ? -1 : 1\n if ((r & binary.BIT8) === 0) {\n // don't continue reading\n return sign * num\n }\n const len = decoder.arr.length\n while (decoder.pos < len) {\n r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & binary.BITS7) * mult\n mult *= 128\n if (r < binary.BIT8) {\n return sign * num\n }\n /* c8 ignore start */\n if (num > number.MAX_SAFE_INTEGER) {\n throw errorIntegerOutOfRange\n }\n /* c8 ignore stop */\n }\n throw errorUnexpectedEndOfArray\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {number}\n */\nexport const peekVarUint = decoder => {\n const pos = decoder.pos\n const s = readVarUint(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {number}\n */\nexport const peekVarInt = decoder => {\n const pos = decoder.pos\n const s = readVarInt(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * We don't test this function anymore as we use native decoding/encoding by default now.\n * Better not modify this anymore..\n *\n * Transforming utf8 to a string is pretty expensive. The code performs 10x better\n * when String.fromCodePoint is fed with all characters as arguments.\n * But most environments have a maximum number of arguments per functions.\n * For effiency reasons we apply a maximum of 10000 characters at once.\n *\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String.\n */\n/* c8 ignore start */\nexport const _readVarStringPolyfill = decoder => {\n let remainingLen = readVarUint(decoder)\n if (remainingLen === 0) {\n return ''\n } else {\n let encodedString = String.fromCodePoint(readUint8(decoder)) // remember to decrease remainingLen\n if (--remainingLen < 100) { // do not create a Uint8Array for small strings\n while (remainingLen--) {\n encodedString += String.fromCodePoint(readUint8(decoder))\n }\n } else {\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n // this is dangerous, we create a fresh array view from the existing buffer\n const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen)\n decoder.pos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes))\n remainingLen -= nextLen\n }\n }\n return decodeURIComponent(escape(encodedString))\n }\n}\n/* c8 ignore stop */\n\n/**\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String\n */\nexport const _readVarStringNative = decoder =>\n /** @type any */ (string.utf8TextDecoder).decode(readVarUint8Array(decoder))\n\n/**\n * Read string of variable length\n * * varUint is used to store the length of the string\n *\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String\n *\n */\n/* c8 ignore next */\nexport const readVarString = string.utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill\n\n/**\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readTerminatedUint8Array = decoder => {\n const encoder = encoding.createEncoder()\n let b\n while (true) {\n b = readUint8(decoder)\n if (b === 0) {\n return encoding.toUint8Array(encoder)\n }\n if (b === 1) {\n b = readUint8(decoder)\n }\n encoding.write(encoder, b)\n }\n}\n\n/**\n * @param {Decoder} decoder\n * @return {string}\n */\nexport const readTerminatedString = decoder => string.decodeUtf8(readTerminatedUint8Array(decoder))\n\n/**\n * Look ahead and read varString without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {string}\n */\nexport const peekVarString = decoder => {\n const pos = decoder.pos\n const s = readVarString(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * @param {Decoder} decoder\n * @param {number} len\n * @return {DataView}\n */\nexport const readFromDataView = (decoder, len) => {\n const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len)\n decoder.pos += len\n return dv\n}\n\n/**\n * @param {Decoder} decoder\n */\nexport const readFloat32 = decoder => readFromDataView(decoder, 4).getFloat32(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readFloat64 = decoder => readFromDataView(decoder, 8).getFloat64(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readBigInt64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigInt64(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readBigUint64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigUint64(0, false)\n\n/**\n * @type {Array}\n */\nconst readAnyLookupTable = [\n decoder => undefined, // CASE 127: undefined\n decoder => null, // CASE 126: null\n readVarInt, // CASE 125: integer\n readFloat32, // CASE 124: float32\n readFloat64, // CASE 123: float64\n readBigInt64, // CASE 122: bigint\n decoder => false, // CASE 121: boolean (false)\n decoder => true, // CASE 120: boolean (true)\n readVarString, // CASE 119: string\n decoder => { // CASE 118: object\n const len = readVarUint(decoder)\n /**\n * @type {Object}\n */\n const obj = {}\n for (let i = 0; i < len; i++) {\n const key = readVarString(decoder)\n obj[key] = readAny(decoder)\n }\n return obj\n },\n decoder => { // CASE 117: array\n const len = readVarUint(decoder)\n const arr = []\n for (let i = 0; i < len; i++) {\n arr.push(readAny(decoder))\n }\n return arr\n },\n readVarUint8Array // CASE 116: Uint8Array\n]\n\n/**\n * @param {Decoder} decoder\n */\nexport const readAny = decoder => readAnyLookupTable[127 - readUint8(decoder)](decoder)\n\n/**\n * T must not be null.\n *\n * @template T\n */\nexport class RleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {function(Decoder):T} reader\n */\n constructor (uint8Array, reader) {\n super(uint8Array)\n /**\n * The reader\n */\n this.reader = reader\n /**\n * Current state\n * @type {T|null}\n */\n this.s = null\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = this.reader(this)\n if (hasContent(this)) {\n this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented\n } else {\n this.count = -1 // read the current value forever\n }\n }\n this.count--\n return /** @type {T} */ (this.s)\n }\n}\n\nexport class IntDiffDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {number} start\n */\n constructor (uint8Array, start) {\n super(uint8Array)\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n }\n\n /**\n * @return {number}\n */\n read () {\n this.s += readVarInt(this)\n return this.s\n }\n}\n\nexport class RleIntDiffDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {number} start\n */\n constructor (uint8Array, start) {\n super(uint8Array)\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n this.count = 0\n }\n\n /**\n * @return {number}\n */\n read () {\n if (this.count === 0) {\n this.s += readVarInt(this)\n if (hasContent(this)) {\n this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented\n } else {\n this.count = -1 // read the current value forever\n }\n }\n this.count--\n return /** @type {number} */ (this.s)\n }\n}\n\nexport class UintOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = readVarInt(this)\n // if the sign is negative, we read the count too, otherwise count is 1\n const isNegative = math.isNegativeZero(this.s)\n this.count = 1\n if (isNegative) {\n this.s = -this.s\n this.count = readVarUint(this) + 2\n }\n }\n this.count--\n return /** @type {number} */ (this.s)\n }\n}\n\nexport class IncUintOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = readVarInt(this)\n // if the sign is negative, we read the count too, otherwise count is 1\n const isNegative = math.isNegativeZero(this.s)\n this.count = 1\n if (isNegative) {\n this.s = -this.s\n this.count = readVarUint(this) + 2\n }\n }\n this.count--\n return /** @type {number} */ (this.s++)\n }\n}\n\nexport class IntDiffOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n this.diff = 0\n }\n\n /**\n * @return {number}\n */\n read () {\n if (this.count === 0) {\n const diff = readVarInt(this)\n // if the first bit is set, we read more data\n const hasCount = diff & 1\n this.diff = math.floor(diff / 2) // shift >> 1\n this.count = 1\n if (hasCount) {\n this.count = readVarUint(this) + 2\n }\n }\n this.s += this.diff\n this.count--\n return this.s\n }\n}\n\nexport class StringDecoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n this.decoder = new UintOptRleDecoder(uint8Array)\n this.str = readVarString(this.decoder)\n /**\n * @type {number}\n */\n this.spos = 0\n }\n\n /**\n * @return {string}\n */\n read () {\n const end = this.spos + this.decoder.read()\n const res = this.str.slice(this.spos, end)\n this.spos = end\n return res\n }\n}\n",null,null,null,null],"names":["binary.BITS7","binary.BIT8","math.floor","string.utf8TextEncoder","string.encodeUtf8","math.min","math.max","error.create","number.MAX_SAFE_INTEGER","string.utf8TextDecoder","encoding.writeVarUint","encoding.writeVarString","decoding.readVarUint","decoding.readVarString"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEO,MAAM,KAAK,GAAG,IAAI,CAAC;;AAkB1B;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG;;ACtCzC;;AAoBO,MAAM,IAAI,GAAG;AAsCb,MAAM,KAAK,GAAG;;AC1DrB;AACA;AACA;AACA;AACA;;;AAKO,MAAM,gBAAgB,GAAG,MAAM,CAAC;;ACsCvC;AACA;AACA;AACA;AACO,MAAM,mBAAmB,GAAG,GAAG,IAAI;AAC1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GpB;;AAEG;AACU,MAAA,iBAAiB,GAAe;AAC5C,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,MAAM,EAAE,oBAAoB;;;AC/ChB,MAAA,sBAAsB,GAAG,CACrC,MAAwC,KACrC;AACH,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;QACxD,OAAO;AACN,YAAA,QAAQ,EAAE,GAAG;AACb,YAAA,GAAG,KAAK;SACR;AACF,KAAC,CAAC;AACH;;ACTA;;;AAGG;IACS;AAAZ,CAAA,UAAY,aAAa,EAAA;AACxB,IAAA,aAAA,CAAA,aAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAc;AACd,IAAA,aAAA,CAAA,aAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACR,IAAA,aAAA,CAAA,aAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW;AACX,IAAA,aAAA,CAAA,aAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAU;AACX,CAAC,EALW,aAAa,KAAb,aAAa,GAKxB,EAAA,CAAA,CAAA;;;;","x_google_ignoreList":[0,1,2,3,4,5,6]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/model/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/model/index.d.ts deleted file mode 100644 index 149a810..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/model/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-model'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/state/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/state/index.d.ts deleted file mode 100644 index 455a4db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/state/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-state'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/transform/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/transform/index.d.ts deleted file mode 100644 index 0b4f8de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/transform/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-transform'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/view/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/view/index.d.ts deleted file mode 100644 index 8b3c631..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/node_modules/@tiptap/pm/view/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-view'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/CloseEvents.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/CloseEvents.d.ts deleted file mode 100644 index 1f397a5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/CloseEvents.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface CloseEvent { - code: number; - reason: string; -} -/** - * The server is terminating the connection because a data frame was received - * that is too large. - * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code - */ -export declare const MessageTooBig: CloseEvent; -/** - * The server successfully processed the request, asks that the requester reset - * its document view, and is not returning any content. - */ -export declare const ResetConnection: CloseEvent; -/** - * Similar to Forbidden, but specifically for use when authentication is required and has - * failed or has not yet been provided. - */ -export declare const Unauthorized: CloseEvent; -/** - * The request contained valid data and was understood by the server, but the server - * is refusing action. - */ -export declare const Forbidden: CloseEvent; -/** - * The server timed out waiting for the request. - */ -export declare const ConnectionTimeout: CloseEvent; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/auth.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/auth.d.ts deleted file mode 100644 index fa5c56c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/auth.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as encoding from "lib0/encoding"; -import * as decoding from "lib0/decoding"; -import type { AuthorizedScope } from "../../provider/src"; -export declare enum AuthMessageType { - Token = 0, - PermissionDenied = 1, - Authenticated = 2 -} -export declare const writeAuthentication: (encoder: encoding.Encoder, auth: string) => void; -export declare const writePermissionDenied: (encoder: encoding.Encoder, reason: string) => void; -export declare const writeAuthenticated: (encoder: encoding.Encoder, scope: AuthorizedScope) => void; -export declare const writeTokenSyncRequest: (encoder: encoding.Encoder) => void; -export declare const readAuthMessage: (decoder: decoding.Decoder, sendToken: () => void, permissionDeniedHandler: (reason: string) => void, authenticatedHandler: (scope: string) => void) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/awarenessStatesToArray.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/awarenessStatesToArray.d.ts deleted file mode 100644 index 81db4ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/awarenessStatesToArray.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const awarenessStatesToArray: (states: Map>) => { - clientId: number; -}[]; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/index.d.ts deleted file mode 100644 index 8a730fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./auth.ts"; -export * from "./CloseEvents.ts"; -export * from "./awarenessStatesToArray.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/types.d.ts deleted file mode 100644 index 3672009..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/common/src/types.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * State of the WebSocket connection. - * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState - */ -export declare enum WsReadyStates { - Connecting = 0, - Open = 1, - Closing = 2, - Closed = 3 -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-database/src/Database.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-database/src/Database.d.ts deleted file mode 100644 index 123c8d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-database/src/Database.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Extension, onChangePayload, onLoadDocumentPayload, storePayload, fetchPayload } from "@hocuspocus/server"; -export interface DatabaseConfiguration { - /** - * Pass a Promise to retrieve updates from your database. The Promise should resolve to - * an array of items with Y.js-compatible binary data. - */ - fetch: (data: fetchPayload) => Promise; - /** - * Pass a function to store updates in your database. - */ - store: (data: storePayload) => Promise; -} -export declare class Database implements Extension { - /** - * Default configuration - */ - configuration: DatabaseConfiguration; - /** - * Constructor - */ - constructor(configuration: Partial); - /** - * Get stored data from the database. - */ - onLoadDocument(data: onLoadDocumentPayload): Promise; - /** - * Store new updates in the database. - */ - onStoreDocument(data: onChangePayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-database/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-database/src/index.d.ts deleted file mode 100644 index cca6903..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-database/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Database.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-logger/src/Logger.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-logger/src/Logger.d.ts deleted file mode 100644 index 7d601c8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-logger/src/Logger.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onLoadDocumentPayload, onDestroyPayload, onDisconnectPayload, onRequestPayload, onUpgradePayload } from "@hocuspocus/server"; -export interface LoggerConfiguration { - /** - * Prepend all logging message with a string. - * - * @deprecated - */ - prefix: null | string; - /** - * Whether to log something for the `onLoadDocument` hook. - */ - onLoadDocument: boolean; - /** - * Whether to log something for the `onChange` hook. - */ - onChange: boolean; - /** - * Whether to log something for the `onStoreDocument` hook. - */ - onStoreDocument: boolean; - /** - * Whether to log something for the `onConnect` hook. - */ - onConnect: boolean; - /** - * Whether to log something for the `onDisconnect` hook. - */ - onDisconnect: boolean; - /** - * Whether to log something for the `onUpgrade` hook. - */ - onUpgrade: boolean; - /** - * Whether to log something for the `onRequest` hook. - */ - onRequest: boolean; - /** - * Whether to log something for the `onDestroy` hook. - */ - onDestroy: boolean; - /** - * Whether to log something for the `onConfigure` hook. - */ - onConfigure: boolean; - /** - * A log function, if none is provided output will go to console - */ - log: (...args: any[]) => void; -} -export declare class Logger implements Extension { - name: string | null; - configuration: LoggerConfiguration; - /** - * Constructor - */ - constructor(configuration?: Partial); - onConfigure(data: onConfigurePayload): Promise; - onLoadDocument(data: onLoadDocumentPayload): Promise; - onChange(data: onChangePayload): Promise; - onStoreDocument(data: onDisconnectPayload): Promise; - onConnect(data: onConnectPayload): Promise; - onDisconnect(data: onDisconnectPayload): Promise; - onUpgrade(data: onUpgradePayload): Promise; - onRequest(data: onRequestPayload): Promise; - onDestroy(data: onDestroyPayload): Promise; - private log; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-logger/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-logger/src/index.d.ts deleted file mode 100644 index 9a59b0a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-logger/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Logger.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-redis/src/Redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-redis/src/Redis.d.ts deleted file mode 100644 index 78dc013..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-redis/src/Redis.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import type { Extension, Hocuspocus, afterLoadDocumentPayload, afterStoreDocumentPayload, afterUnloadDocumentPayload, beforeBroadcastStatelessPayload, beforeUnloadDocumentPayload, onAwarenessUpdatePayload, onChangePayload, onConfigurePayload, onStoreDocumentPayload } from "@hocuspocus/server"; -import { type ExecutionResult, type Lock, Redlock } from "@sesamecare-oss/redlock"; -import type { Cluster, ClusterNode, ClusterOptions, RedisOptions } from "ioredis"; -import RedisClient from "ioredis"; -export type RedisInstance = RedisClient | Cluster; -export interface Configuration { - /** - * Redis port - */ - port: number; - /** - * Redis host - */ - host: string; - /** - * Redis Cluster - */ - nodes?: ClusterNode[]; - /** - * Duplicate from an existed Redis instance - */ - redis?: RedisInstance; - /** - * Redis instance creator - */ - createClient?: () => RedisInstance; - /** - * Options passed directly to Redis constructor - * - * https://github.com/luin/ioredis/blob/master/API.md#new-redisport-host-options - */ - options?: ClusterOptions | RedisOptions; - /** - * An unique instance name, required to filter messages in Redis. - * If none is provided an unique id is generated. - */ - identifier: string; - /** - * Namespace for Redis keys, if none is provided 'hocuspocus' is used - */ - prefix: string; - /** - * The maximum time for the Redis lock in ms (in case it can’t be released). - */ - lockTimeout: number; - /** - * A delay before onDisconnect is executed. This allows last minute updates' - * sync messages to be received by the subscription before it's closed. - */ - disconnectDelay: number; -} -export declare class Redis implements Extension { - /** - * Make sure to give that extension a higher priority, so - * the `onStoreDocument` hook is able to intercept the chain, - * before documents are stored to the database. - */ - priority: number; - configuration: Configuration; - redisTransactionOrigin: string; - pub: RedisInstance; - sub: RedisInstance; - instance: Hocuspocus; - redlock: Redlock; - locks: Map; - }>; - messagePrefix: Buffer; - private pendingAfterStoreDocumentResolves; - constructor(configuration: Partial); - onConfigure({ instance }: onConfigurePayload): Promise; - private getKey; - private pubKey; - private subKey; - private lockKey; - private encodeMessage; - private decodeMessage; - /** - * Once a document is loaded, subscribe to the channel in Redis. - */ - afterLoadDocument({ documentName, document, }: afterLoadDocumentPayload): Promise; - /** - * Publish the first sync step through Redis. - */ - private publishFirstSyncStep; - /** - * Let’s ask Redis who is connected already. - */ - private requestAwarenessFromOtherInstances; - /** - * Before the document is stored, make sure to set a lock in Redis. - * That’s meant to avoid conflicts with other instances trying to store the document. - */ - onStoreDocument({ documentName }: onStoreDocumentPayload): Promise; - /** - * Release the Redis lock, so other instances can store documents. - */ - afterStoreDocument({ documentName, socketId, }: afterStoreDocumentPayload): Promise; - /** - * Handle awareness update messages received directly by this Hocuspocus instance. - */ - onAwarenessUpdate({ documentName, awareness, added, updated, removed, document, }: onAwarenessUpdatePayload): Promise; - /** - * Handle incoming messages published on subscribed document channels. - * Note that this will also include messages from ourselves as it is not possible - * in Redis to filter these. - */ - private handleIncomingMessage; - /** - * if the ydoc changed, we'll need to inform other Hocuspocus servers about it. - */ - onChange(data: onChangePayload): Promise; - /** - * Delay unloading to allow syncs to finish - */ - beforeUnloadDocument(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument(data: afterUnloadDocumentPayload): Promise; - beforeBroadcastStateless(data: beforeBroadcastStatelessPayload): Promise; - /** - * Kill the Redlock connection immediately. - */ - onDestroy(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-redis/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-redis/src/index.d.ts deleted file mode 100644 index 6c9d48a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-redis/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Redis.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-s3/src/S3.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-s3/src/S3.d.ts deleted file mode 100644 index 4d2da25..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-s3/src/S3.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { DatabaseConfiguration } from "@hocuspocus/extension-database"; -import { Database } from "@hocuspocus/extension-database"; -import { S3Client } from "@aws-sdk/client-s3"; -export interface S3Configuration extends DatabaseConfiguration { - /** - * AWS S3 region - */ - region?: string; - /** - * S3 bucket name - */ - bucket: string; - /** - * S3 key prefix for documents (optional) - */ - prefix?: string; - /** - * AWS credentials - */ - credentials?: { - accessKeyId: string; - secretAccessKey: string; - }; - /** - * S3 endpoint URL (for S3-compatible services like MinIO) - */ - endpoint?: string; - /** - * Force path style URLs (required for MinIO) - */ - forcePathStyle?: boolean; - /** - * Custom S3 client - */ - s3Client?: S3Client; -} -export declare class S3 extends Database { - private s3Client?; - configuration: S3Configuration; - constructor(configuration: Partial); - private getObjectKey; - onConfigure(): Promise; - onListen(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-s3/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-s3/src/index.d.ts deleted file mode 100644 index f782642..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-s3/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./S3.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-sqlite/src/SQLite.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-sqlite/src/SQLite.d.ts deleted file mode 100644 index 432a370..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-sqlite/src/SQLite.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { DatabaseConfiguration } from "@hocuspocus/extension-database"; -import { Database } from "@hocuspocus/extension-database"; -import sqlite3 from "sqlite3"; -export declare const schema = "CREATE TABLE IF NOT EXISTS \"documents\" (\n \"name\" varchar(255) NOT NULL,\n \"data\" blob NOT NULL,\n UNIQUE(name)\n)"; -export declare const selectQuery = "\n SELECT data FROM \"documents\" WHERE name = $name ORDER BY rowid DESC\n"; -export declare const upsertQuery = "\n INSERT INTO \"documents\" (\"name\", \"data\") VALUES ($name, $data)\n ON CONFLICT(name) DO UPDATE SET data = $data\n"; -export interface SQLiteConfiguration extends DatabaseConfiguration { - /** - * Valid values are filenames, ":memory:" for an anonymous in-memory database and an empty - * string for an anonymous disk-based database. Anonymous databases are not persisted and - * when closing the database handle, their contents are lost. - * - * https://github.com/mapbox/node-sqlite3/wiki/API#new-sqlite3databasefilename-mode-callback - */ - database: string; - /** - * The database schema to create. - */ - schema: string; -} -export declare class SQLite extends Database { - db?: sqlite3.Database; - configuration: SQLiteConfiguration; - constructor(configuration?: Partial); - onConfigure(): Promise; - onListen(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-sqlite/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-sqlite/src/index.d.ts deleted file mode 100644 index 8013efb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-sqlite/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./SQLite.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-throttle/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-throttle/src/index.d.ts deleted file mode 100644 index 0917d14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-throttle/src/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Extension, onConnectPayload } from "@hocuspocus/server"; -export interface ThrottleConfiguration { - throttle: number | null | false; - consideredSeconds: number; - banTime: number; - cleanupInterval: number; -} -export declare class Throttle implements Extension { - configuration: ThrottleConfiguration; - connectionsByIp: Map>; - bannedIps: Map; - cleanupInterval?: NodeJS.Timeout; - /** - * Constructor - */ - constructor(configuration?: Partial); - onDestroy(): Promise; - clearMaps(): void; - isBanned(ip: string): boolean; - /** - * Throttle requests - * @private - */ - private throttle; - /** - * onConnect hook - * @param data - */ - onConnect(data: onConnectPayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-webhook/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-webhook/src/index.d.ts deleted file mode 100644 index 2cc3456..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/extension-webhook/src/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { Extension, onChangePayload, onConnectPayload, onDisconnectPayload, onLoadDocumentPayload } from "@hocuspocus/server"; -import type { Transformer } from "@hocuspocus/transformer"; -import type { Doc } from "yjs"; -export declare enum Events { - onChange = "change", - onConnect = "connect", - onCreate = "create", - onDisconnect = "disconnect" -} -export interface Configuration { - debounce: number | false | null; - debounceMaxWait: number; - secret: string; - transformer: Transformer | { - toYdoc: (document: any) => Doc; - fromYdoc: (document: Doc) => any; - }; - url: string; - events: Array; -} -export declare class Webhook implements Extension { - configuration: Configuration; - debounced: Map; - /** - * Constructor - */ - constructor(configuration?: Partial); - /** - * Create a signature for the response body - */ - createSignature(body: string): string; - /** - * debounce the given function, using the given identifier - */ - debounce(id: string, func: Function): void; - /** - * Send a request to the given url containing the given data - */ - sendRequest(event: Events, payload: any): Promise>; - /** - * onChange hook - */ - onChange(data: onChangePayload): Promise; - /** - * onLoadDocument hook - */ - onLoadDocument(data: onLoadDocumentPayload): Promise; - /** - * onConnect hook - */ - onConnect(data: onConnectPayload): Promise; - onDisconnect(data: onDisconnectPayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/EventEmitter.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/EventEmitter.d.ts deleted file mode 100644 index df6b04e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/EventEmitter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default class EventEmitter { - callbacks: { - [key: string]: Function[]; - }; - on(event: string, fn: Function): this; - protected emit(event: string, ...args: any): this; - off(event: string, fn?: Function): this; - removeAllListeners(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/HocuspocusProvider.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/HocuspocusProvider.d.ts deleted file mode 100644 index 5f503fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/HocuspocusProvider.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -import type { Event, MessageEvent } from "ws"; -import { Awareness } from "y-protocols/awareness"; -import * as Y from "yjs"; -import EventEmitter from "./EventEmitter.ts"; -import type { CompleteHocuspocusProviderWebsocketConfiguration } from "./HocuspocusProviderWebsocket.ts"; -import { HocuspocusProviderWebsocket } from "./HocuspocusProviderWebsocket.ts"; -import type { AuthorizedScope, ConstructableOutgoingMessage, onAuthenticatedParameters, onAuthenticationFailedParameters, onAwarenessChangeParameters, onAwarenessUpdateParameters, onCloseParameters, onDisconnectParameters, onMessageParameters, onOpenParameters, onOutgoingMessageParameters, onStatelessParameters, onStatusParameters, onSyncedParameters, onUnsyncedChangesParameters } from "./types.ts"; -export type HocuspocusProviderConfiguration = Required> & Partial & ((Required> & Partial>) | Required>); -export interface CompleteHocuspocusProviderConfiguration { - /** - * The identifier/name of your document - */ - name: string; - /** - * The actual Y.js document - */ - document: Y.Doc; - /** - * An Awareness instance to keep the presence state of all clients. - * - * You can disable sharing awareness information by passing `null`. - * Note that having no awareness information shared across all connections will break our ping checks - * and thus trigger reconnects. You should always have at least one Provider with enabled awareness per - * socket connection, or ensure that the Provider receives messages before running into `HocuspocusProviderWebsocket.messageReconnectTimeout`. - */ - awareness: Awareness | null; - /** - * A token that’s sent to the backend for authentication purposes. - */ - token: string | (() => string) | (() => Promise) | null; - /** - * Hocuspocus websocket provider - */ - websocketProvider: HocuspocusProviderWebsocket; - /** - * Force syncing the document in the defined interval. - */ - forceSyncInterval: false | number; - onAuthenticated: (data: onAuthenticatedParameters) => void; - onAuthenticationFailed: (data: onAuthenticationFailedParameters) => void; - onOpen: (data: onOpenParameters) => void; - onConnect: () => void; - onStatus: (data: onStatusParameters) => void; - onMessage: (data: onMessageParameters) => void; - onOutgoingMessage: (data: onOutgoingMessageParameters) => void; - onSynced: (data: onSyncedParameters) => void; - onDisconnect: (data: onDisconnectParameters) => void; - onClose: (data: onCloseParameters) => void; - onDestroy: () => void; - onAwarenessUpdate: (data: onAwarenessUpdateParameters) => void; - onAwarenessChange: (data: onAwarenessChangeParameters) => void; - onStateless: (data: onStatelessParameters) => void; - onUnsyncedChanges: (data: onUnsyncedChangesParameters) => void; -} -export declare class AwarenessError extends Error { - code: number; -} -export declare class HocuspocusProvider extends EventEmitter { - configuration: CompleteHocuspocusProviderConfiguration; - isSynced: boolean; - unsyncedChanges: number; - isAuthenticated: boolean; - authorizedScope: AuthorizedScope | undefined; - manageSocket: boolean; - private _isAttached; - intervals: any; - constructor(configuration: HocuspocusProviderConfiguration); - boundDocumentUpdateHandler: (update: Uint8Array, origin: any) => void; - boundAwarenessUpdateHandler: ({ added, updated, removed }: any, origin: any) => void; - boundPageHide: () => void; - boundOnOpen: (event: Event) => Promise; - boundOnClose: () => void; - forwardConnect: () => this; - forwardStatus: (e: onStatusParameters) => this; - forwardClose: (e: onCloseParameters) => this; - forwardDisconnect: (e: onDisconnectParameters) => this; - forwardDestroy: () => this; - setConfiguration(configuration?: Partial): void; - get document(): Y.Doc; - get isAttached(): boolean; - get awareness(): Awareness | null; - get hasUnsyncedChanges(): boolean; - private resetUnsyncedChanges; - incrementUnsyncedChanges(): void; - decrementUnsyncedChanges(): void; - forceSync(): void; - pageHide(): void; - registerEventListeners(): void; - sendStateless(payload: string): void; - sendToken(): Promise; - documentUpdateHandler(update: Uint8Array, origin: any): void; - awarenessUpdateHandler({ added, updated, removed }: any, origin: any): void; - /** - * Indicates whether a first handshake with the server has been established - * - * Note: this does not mean all updates from the client have been persisted to the backend. For this, - * use `hasUnsyncedChanges`. - */ - get synced(): boolean; - set synced(state: boolean); - receiveStateless(payload: string): void; - connect(): Promise; - disconnect(): void; - onOpen(event: Event): Promise; - getToken(): Promise; - startSync(): void; - send(message: ConstructableOutgoingMessage, args: any): void; - onMessage(event: MessageEvent): void; - onClose(): void; - destroy(): void; - detach(): void; - attach(): void; - permissionDeniedHandler(reason: string): void; - authenticatedHandler(scope: string): void; - setAwarenessField(key: string, value: any): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts deleted file mode 100644 index 9f5a1da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -import type { Event, MessageEvent } from "ws"; -import EventEmitter from "./EventEmitter.ts"; -import type { HocuspocusProvider } from "./HocuspocusProvider.ts"; -import { WebSocketStatus, type onAwarenessChangeParameters, type onAwarenessUpdateParameters, type onCloseParameters, type onDisconnectParameters, type onMessageParameters, type onOpenParameters, type onOutgoingMessageParameters, type onStatusParameters } from "./types.ts"; -export type HocuspocusWebSocket = WebSocket & { - identifier: string; -}; -export type HocusPocusWebSocket = HocuspocusWebSocket; -export type HocuspocusProviderWebsocketConfiguration = Required> & Partial; -export interface CompleteHocuspocusProviderWebsocketConfiguration { - /** - * Whether to connect automatically when creating the provider instance. Default=true - */ - autoConnect: boolean; - /** - * URL of your @hocuspocus/server instance - */ - url: string; - /** - * By default, trailing slashes are removed from the URL. Set this to true - * to preserve trailing slashes if your server configuration requires them. - */ - preserveTrailingSlash: boolean; - /** - * An optional WebSocket polyfill, for example for Node.js - */ - WebSocketPolyfill: any; - /** - * Disconnect when no message is received for the defined amount of milliseconds. - */ - messageReconnectTimeout: number; - /** - * The delay between each attempt in milliseconds. You can provide a factor to have the delay grow exponentially. - */ - delay: number; - /** - * The initialDelay is the amount of time to wait before making the first attempt. This option should typically be 0 since you typically want the first attempt to happen immediately. - */ - initialDelay: number; - /** - * The factor option is used to grow the delay exponentially. - */ - factor: number; - /** - * The maximum number of attempts or 0 if there is no limit on number of attempts. - */ - maxAttempts: number; - /** - * minDelay is used to set a lower bound of delay when jitter is enabled. This property has no effect if jitter is disabled. - */ - minDelay: number; - /** - * The maxDelay option is used to set an upper bound for the delay when factor is enabled. A value of 0 can be provided if there should be no upper bound when calculating delay. - */ - maxDelay: number; - /** - * If jitter is true then the calculated delay will be a random integer value between minDelay and the calculated delay for the current iteration. - */ - jitter: boolean; - /** - * A timeout in milliseconds. If timeout is non-zero then a timer is set using setTimeout. If the timeout is triggered then future attempts will be aborted. - */ - timeout: number; - handleTimeout: (() => Promise) | null; - onOpen: (data: onOpenParameters) => void; - onConnect: () => void; - onMessage: (data: onMessageParameters) => void; - onOutgoingMessage: (data: onOutgoingMessageParameters) => void; - onStatus: (data: onStatusParameters) => void; - onDisconnect: (data: onDisconnectParameters) => void; - onClose: (data: onCloseParameters) => void; - onDestroy: () => void; - onAwarenessUpdate: (data: onAwarenessUpdateParameters) => void; - onAwarenessChange: (data: onAwarenessChangeParameters) => void; - /** - * Map of attached providers keyed by documentName. - */ - providerMap: Map; -} -export declare class HocuspocusProviderWebsocket extends EventEmitter { - private messageQueue; - configuration: CompleteHocuspocusProviderWebsocketConfiguration; - webSocket: HocusPocusWebSocket | null; - webSocketHandlers: { - [key: string]: any; - }; - shouldConnect: boolean; - status: WebSocketStatus; - lastMessageReceived: number; - identifier: number; - intervals: any; - connectionAttempt: { - resolve: (value?: any) => void; - reject: (reason?: any) => void; - } | null; - constructor(configuration: HocuspocusProviderWebsocketConfiguration); - receivedOnOpenPayload?: Event | undefined; - onOpen(event: Event): Promise; - attach(provider: HocuspocusProvider): void; - detach(provider: HocuspocusProvider): void; - setConfiguration(configuration?: Partial): void; - cancelWebsocketRetry?: () => void; - connect(): Promise; - attachWebSocketListeners(ws: HocusPocusWebSocket, reject: Function): void; - cleanupWebSocket(): void; - createWebSocketConnection(): Promise; - onMessage(event: MessageEvent): void; - resolveConnectionAttempt(): void; - stopConnectionAttempt(): void; - rejectConnectionAttempt(): void; - closeTries: number; - checkConnection(): void; - get serverUrl(): string; - get url(): string; - disconnect(): void; - send(message: any): void; - onClose({ event }: onCloseParameters): void; - destroy(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/IncomingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/IncomingMessage.d.ts deleted file mode 100644 index 8ce1ae6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/IncomingMessage.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import type { MessageType } from "./types.ts"; -export declare class IncomingMessage { - data: any; - encoder: Encoder; - decoder: Decoder; - constructor(data: any); - peekVarString(): string; - readVarUint(): MessageType; - readVarString(): string; - readVarUint8Array(): Uint8Array; - writeVarUint(type: MessageType): void; - writeVarString(string: string): void; - writeVarUint8Array(data: Uint8Array): void; - length(): number; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/MessageReceiver.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/MessageReceiver.d.ts deleted file mode 100644 index 06918ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/MessageReceiver.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { HocuspocusProvider } from "./HocuspocusProvider.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -export declare class MessageReceiver { - message: IncomingMessage; - constructor(message: IncomingMessage); - apply(provider: HocuspocusProvider, emitSynced: boolean): void; - private applySyncMessage; - applySyncStatusMessage(provider: HocuspocusProvider, applied: boolean): void; - private applyAwarenessMessage; - private applyAuthMessage; - private applyQueryAwarenessMessage; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/MessageSender.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/MessageSender.d.ts deleted file mode 100644 index 382772c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/MessageSender.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { ConstructableOutgoingMessage } from "./types.ts"; -export declare class MessageSender { - encoder: Encoder; - message: any; - constructor(Message: ConstructableOutgoingMessage, args?: any); - create(): Uint8Array; - send(webSocket: any): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessage.d.ts deleted file mode 100644 index 5b4db09..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { MessageType, OutgoingMessageArguments, OutgoingMessageInterface } from "./types.ts"; -export declare class OutgoingMessage implements OutgoingMessageInterface { - encoder: Encoder; - type?: MessageType; - constructor(); - get(args: Partial): Encoder | undefined; - toUint8Array(): Uint8Array; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts deleted file mode 100644 index 775990a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class AuthenticationMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts deleted file mode 100644 index b666f82..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class AwarenessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts deleted file mode 100644 index 7594c95..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class CloseMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts deleted file mode 100644 index eb37902..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class QueryAwarenessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts deleted file mode 100644 index 3349c73..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class StatelessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts deleted file mode 100644 index 55d1ea0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class SyncStepOneMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts deleted file mode 100644 index fa39f24..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class SyncStepTwoMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts deleted file mode 100644 index 3d5b4f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class UpdateMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/index.d.ts deleted file mode 100644 index c54d369..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./HocuspocusProvider.ts"; -export * from "./HocuspocusProviderWebsocket.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/types.d.ts deleted file mode 100644 index 3ef91a2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/provider/src/types.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { Event, MessageEvent } from "ws"; -import type { Awareness } from "y-protocols/awareness"; -import type * as Y from "yjs"; -import type { CloseEvent } from "@hocuspocus/common"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -import type { OutgoingMessage } from "./OutgoingMessage.ts"; -import type { AuthenticationMessage } from "./OutgoingMessages/AuthenticationMessage.ts"; -import type { AwarenessMessage } from "./OutgoingMessages/AwarenessMessage.ts"; -import type { QueryAwarenessMessage } from "./OutgoingMessages/QueryAwarenessMessage.ts"; -import type { SyncStepOneMessage } from "./OutgoingMessages/SyncStepOneMessage.ts"; -import type { SyncStepTwoMessage } from "./OutgoingMessages/SyncStepTwoMessage.ts"; -import type { UpdateMessage } from "./OutgoingMessages/UpdateMessage.ts"; -export declare enum MessageType { - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - Stateless = 5, - CLOSE = 7, - SyncStatus = 8 -} -export declare enum WebSocketStatus { - Connecting = "connecting", - Connected = "connected", - Disconnected = "disconnected" -} -export type AuthorizedScope = "read-write" | "readonly"; -export interface OutgoingMessageInterface { - encoder: Encoder; - type?: MessageType; -} -export interface OutgoingMessageArguments { - documentName: string; - token: string; - document: Y.Doc; - awareness: Awareness; - clients: number[]; - states: Map; - update: any; - payload: string; - encoder: Encoder; -} -export interface Constructable { - new (...args: any): T; -} -export type ConstructableOutgoingMessage = Constructable | Constructable | Constructable | Constructable | Constructable | Constructable; -export type onAuthenticationFailedParameters = { - reason: string; -}; -export type onAuthenticatedParameters = { - scope: AuthorizedScope; -}; -export type onOpenParameters = { - event: Event; -}; -export type onMessageParameters = { - event: MessageEvent; - message: IncomingMessage; -}; -export type onOutgoingMessageParameters = { - message: OutgoingMessage; -}; -export type onStatusParameters = { - status: WebSocketStatus; -}; -export type onSyncedParameters = { - state: boolean; -}; -export type onUnsyncedChangesParameters = { - number: number; -}; -export type onDisconnectParameters = { - event: CloseEvent; -}; -export type onCloseParameters = { - event: CloseEvent; -}; -export type onAwarenessUpdateParameters = { - states: StatesArray; -}; -export type onAwarenessChangeParameters = { - states: StatesArray; -}; -export type onStatelessParameters = { - payload: string; -}; -export type StatesArray = { - clientId: number; - [key: string | number]: any; -}[]; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/ClientConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/ClientConnection.d.ts deleted file mode 100644 index 93bb471..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/ClientConnection.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import { type CloseEvent } from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { onDisconnectPayload } from "./types.ts"; -/** - * The `ClientConnection` class is responsible for handling an incoming WebSocket - * - * TODO-refactor: - * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts - */ -export declare class ClientConnection { - private readonly websocket; - private readonly request; - private readonly documentProvider; - private readonly hooks; - private readonly opts; - private readonly defaultContext; - private readonly documentConnections; - private readonly incomingMessageQueue; - private readonly documentConnectionsEstablished; - private readonly hookPayloads; - private readonly callbacks; - private readonly socketId; - timeout: number; - pingInterval: NodeJS.Timeout; - pongReceived: boolean; - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it’ll fully establish the connection and - * load the Document then. - */ - constructor(websocket: WebSocket, request: IncomingMessage, documentProvider: { - createDocument: Hocuspocus["createDocument"]; - }, hooks: Hocuspocus["hooks"], opts: { - timeout: number; - }, defaultContext?: any); - private handleWebsocketClose; - close(event?: CloseEvent): void; - handlePong: () => void; - /** - * Check if pong was received and close the connection otherwise - * @private - */ - private check; - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, payload: onDisconnectPayload) => void): ClientConnection; - /** - * Create a new connection by the given request and document - */ - private createConnection; - private setUpNewConnection; - private handleQueueingMessage; - private messageHandler; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Connection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Connection.d.ts deleted file mode 100644 index ca8fa8c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Connection.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { IncomingMessage as HTTPIncomingMessage } from "node:http"; -import { type CloseEvent } from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type Document from "./Document.ts"; -import type { beforeSyncPayload, onStatelessPayload } from "./types.ts"; -export declare class Connection { - webSocket: WebSocket; - context: any; - document: Document; - request: HTTPIncomingMessage; - callbacks: { - onClose: ((document: Document, event?: CloseEvent) => void)[]; - beforeHandleMessage: (connection: Connection, update: Uint8Array) => Promise; - beforeSync: (connection: Connection, payload: Pick) => Promise; - statelessCallback: (payload: onStatelessPayload) => Promise; - onTokenSyncCallback: (payload: { - token: string; - }) => Promise; - }; - socketId: string; - readOnly: boolean; - /** - * Constructor. - */ - constructor(connection: WebSocket, request: HTTPIncomingMessage, document: Document, socketId: string, context: any, readOnly?: boolean); - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, event?: CloseEvent) => void): Connection; - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback(callback: (payload: onStatelessPayload) => Promise): Connection; - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage(callback: (connection: Connection, update: Uint8Array) => Promise): Connection; - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync(callback: (connection: Connection, payload: Pick) => Promise): Connection; - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback(callback: (payload: { - token: string; - }) => Promise): Connection; - /** - * Send the given message - */ - send(message: any): void; - /** - * Send a stateless message with payload - */ - sendStateless(payload: string): void; - /** - * Request current token from the client - */ - requestToken(): void; - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event?: CloseEvent): void; - /** - * Send the current document awareness to the client, if any - * @private - */ - private sendCurrentAwareness; - /** - * Handle an incoming message - * @public - */ - handleMessage(data: Uint8Array): void; -} -export default Connection; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/DirectConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/DirectConnection.d.ts deleted file mode 100644 index a1be911..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/DirectConnection.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { DirectConnection as DirectConnectionInterface } from "./types.ts"; -export declare class DirectConnection implements DirectConnectionInterface { - document: Document | null; - instance: Hocuspocus; - context: any; - /** - * Constructor. - */ - constructor(document: Document, instance: Hocuspocus, context?: any); - transact(transaction: (document: Document) => void): Promise; - disconnect(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Document.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Document.d.ts deleted file mode 100644 index 57faea7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Document.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { Mutex } from "async-mutex"; -import type WebSocket from "ws"; -import { Awareness } from "y-protocols/awareness"; -import { Doc } from "yjs"; -import type Connection from "./Connection.ts"; -export declare class Document extends Doc { - awareness: Awareness; - callbacks: { - onUpdate: (document: Document, connection: Connection, update: Uint8Array) => void; - beforeBroadcastStateless: (document: Document, stateless: string) => void; - }; - connections: Map; - connection: Connection; - }>; - directConnectionsCount: number; - name: string; - isLoading: boolean; - isDestroyed: boolean; - saveMutex: Mutex; - lastChangeTime: number; - /** - * Constructor. - */ - constructor(name: string, yDocOptions?: object); - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName: string): boolean; - /** - * Merge the given document(s) into this one - */ - merge(documents: Doc | Array): Document; - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate(callback: (document: Document, connection: Connection, update: Uint8Array) => void): Document; - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless(callback: (document: Document, stateless: string) => void): Document; - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection: Connection): Document; - /** - * Is the given connection registered on this document - */ - hasConnection(connection: Connection): boolean; - /** - * Remove the given connection from this document - */ - removeConnection(connection: Connection): Document; - addDirectConnection(): Document; - removeDirectConnection(): Document; - /** - * Get the number of active connections for this document - */ - getConnectionsCount(): number; - /** - * Get an array of registered connections - */ - getConnections(): Array; - /** - * Get the client ids for the given connection instance - */ - getClients(connectionInstance: WebSocket): Set; - /** - * Has the document awareness states - */ - hasAwarenessStates(): boolean; - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection: Connection, update: Uint8Array): Document; - /** - * Handle an awareness update and sync changes to clients - * @private - */ - private handleAwarenessUpdate; - /** - * Handle an updated document and sync changes to clients - */ - private handleUpdate; - /** - * Broadcast stateless message to all connections - */ - broadcastStateless(payload: string, filter?: (conn: Connection) => boolean): void; - destroy(): void; -} -export default Document; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Hocuspocus.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Hocuspocus.d.ts deleted file mode 100644 index fa1684f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Hocuspocus.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import type WebSocket from "ws"; -import { DirectConnection } from "./DirectConnection.ts"; -import Document from "./Document.ts"; -import type { Server } from "./Server.ts"; -import type { Configuration, ConnectionConfiguration, HookName, HookPayloadByName, onStoreDocumentPayload } from "./types.ts"; -export declare const defaultConfiguration: { - name: null; - timeout: number; - debounce: number; - maxDebounce: number; - quiet: boolean; - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; - unloadImmediately: boolean; -}; -export declare class Hocuspocus { - configuration: Configuration; - loadingDocuments: Map>; - unloadingDocuments: Map>; - documents: Map; - server?: Server; - debouncer: { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; - }; - constructor(configuration?: Partial); - /** - * Configure Hocuspocus - */ - configure(configuration: Partial): Hocuspocus; - /** - * Get the total number of active documents - */ - getDocumentsCount(): number; - /** - * Get the total number of active connections - */ - getConnectionsCount(): number; - /** - * Force close one or more connections - */ - closeConnections(documentName?: string): void; - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it’ll fully establish the connection and - * load the Document then. - */ - handleConnection(incoming: WebSocket, request: IncomingMessage, defaultContext?: any): void; - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - private handleDocumentUpdate; - /** - * Create a new document by the given request - */ - createDocument(documentName: string, request: Partial>, socketId: string, connection: ConnectionConfiguration, context?: any): Promise; - loadDocument(documentName: string, request: Partial>, socketId: string, connectionConfig: ConnectionConfiguration, context?: any): Promise; - storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload, immediately?: boolean): Promise; - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - hooks(name: T, payload: HookPayloadByName[T], callback?: Function | null): Promise; - shouldUnloadDocument(document: Document): boolean; - unloadDocument(document: Document): Promise; - openDirectConnection(documentName: string, context?: any): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/IncomingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/IncomingMessage.d.ts deleted file mode 100644 index 639bbdf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/IncomingMessage.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import type { MessageType } from "./types.ts"; -export declare class IncomingMessage { - /** - * Access to the received message. - */ - decoder: Decoder; - /** - * Private encoder; can be undefined. - * - * Lazy creation of the encoder speeds up IncomingMessages that need only a decoder. - */ - private encoderInternal?; - constructor(input: any); - get encoder(): Encoder; - readVarUint8Array(): Uint8Array; - peekVarUint8Array(): Uint8Array; - readVarUint(): number; - readVarString(): string; - toUint8Array(): Uint8Array; - writeVarUint(type: MessageType): void; - writeVarString(string: string): void; - get length(): number; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/MessageReceiver.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/MessageReceiver.d.ts deleted file mode 100644 index 6d864ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/MessageReceiver.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -export declare class MessageReceiver { - message: IncomingMessage; - defaultTransactionOrigin?: string; - constructor(message: IncomingMessage, defaultTransactionOrigin?: string); - apply(document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): void; - readSyncMessage(message: IncomingMessage, document: Document, connection?: Connection, reply?: (message: Uint8Array) => void, requestFirstSync?: boolean): 0 | 2 | 1; - applyQueryAwarenessMessage(document: Document, reply?: (message: Uint8Array) => void): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/OutgoingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/OutgoingMessage.d.ts deleted file mode 100644 index e4f9be2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/OutgoingMessage.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { Awareness } from "y-protocols/awareness"; -import type Document from "./Document.ts"; -export declare class OutgoingMessage { - encoder: Encoder; - type?: number; - category?: string; - constructor(documentName: string); - createSyncMessage(): OutgoingMessage; - createSyncReplyMessage(): OutgoingMessage; - createAwarenessUpdateMessage(awareness: Awareness, changedClients?: Array): OutgoingMessage; - writeQueryAwareness(): OutgoingMessage; - writeTokenSyncRequest(): OutgoingMessage; - writeAuthenticated(readonly: boolean): OutgoingMessage; - writePermissionDenied(reason: string): OutgoingMessage; - writeFirstSyncStepFor(document: Document): OutgoingMessage; - writeUpdate(update: Uint8Array): OutgoingMessage; - writeStateless(payload: string): OutgoingMessage; - writeBroadcastStateless(payload: string): OutgoingMessage; - writeSyncStatus(updateSaved: boolean): OutgoingMessage; - writeCloseMessage(reason: string): OutgoingMessage; - toUint8Array(): Uint8Array; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Server.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Server.d.ts deleted file mode 100644 index a1df4ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/Server.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { Server as HTTPServer, IncomingMessage, ServerResponse } from "node:http"; -import { WebSocketServer } from "ws"; -import type { AddressInfo, ServerOptions } from "ws"; -import { Hocuspocus } from "./Hocuspocus.ts"; -import type { Configuration } from "./types.ts"; -export interface ServerConfiguration extends Configuration { - port?: number; - address?: string; - stopOnSignals?: boolean; -} -export declare const defaultServerConfiguration: { - port: number; - address: string; - stopOnSignals: boolean; -}; -export declare class Server { - httpServer: HTTPServer; - webSocketServer: WebSocketServer; - hocuspocus: Hocuspocus; - configuration: ServerConfiguration; - constructor(configuration?: Partial, websocketOptions?: ServerOptions); - setupWebsocketConnection: () => void; - setupHttpUpgrade: () => void; - requestHandler: (request: IncomingMessage, response: ServerResponse) => Promise; - listen(port?: number, callback?: any): Promise; - get address(): AddressInfo; - destroy(): Promise; - get URL(): string; - get webSocketURL(): string; - get httpURL(): string; - private showStartScreen; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/index.d.ts deleted file mode 100644 index 8ede6d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from "./Connection.ts"; -export * from "./Document.ts"; -export * from "./Hocuspocus.ts"; -export * from "./IncomingMessage.ts"; -export * from "./MessageReceiver.ts"; -export * from "./OutgoingMessage.ts"; -export * from "./Server.ts"; -export * from "./types.ts"; -export * from "./util/debounce.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/types.d.ts deleted file mode 100644 index 615cacc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/types.d.ts +++ /dev/null @@ -1,342 +0,0 @@ -import type { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "node:http"; -import type { URLSearchParams } from "node:url"; -import type { Awareness } from "y-protocols/awareness"; -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -export declare enum MessageType { - Unknown = -1, - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - SyncReply = 4,// same as Sync, but won't trigger another 'SyncStep1' - Stateless = 5, - BroadcastStateless = 6, - CLOSE = 7, - SyncStatus = 8 -} -export interface AwarenessUpdate { - added: Array; - updated: Array; - removed: Array; -} -export interface ConnectionConfiguration { - readOnly: boolean; - isAuthenticated: boolean; -} -export interface Extension { - priority?: number; - extensionName?: string; - onConfigure?(data: onConfigurePayload): Promise; - onListen?(data: onListenPayload): Promise; - onUpgrade?(data: onUpgradePayload): Promise; - onConnect?(data: onConnectPayload): Promise; - connected?(data: connectedPayload): Promise; - onAuthenticate?(data: onAuthenticatePayload): Promise; - onTokenSync?(data: onTokenSyncPayload): Promise; - onCreateDocument?(data: onCreateDocumentPayload): Promise; - onLoadDocument?(data: onLoadDocumentPayload): Promise; - afterLoadDocument?(data: afterLoadDocumentPayload): Promise; - beforeHandleMessage?(data: beforeHandleMessagePayload): Promise; - beforeSync?(data: beforeSyncPayload): Promise; - beforeBroadcastStateless?(data: beforeBroadcastStatelessPayload): Promise; - onStateless?(payload: onStatelessPayload): Promise; - onChange?(data: onChangePayload): Promise; - onStoreDocument?(data: onStoreDocumentPayload): Promise; - afterStoreDocument?(data: afterStoreDocumentPayload): Promise; - onAwarenessUpdate?(data: onAwarenessUpdatePayload): Promise; - onRequest?(data: onRequestPayload): Promise; - onDisconnect?(data: onDisconnectPayload): Promise; - beforeUnloadDocument?(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument?(data: afterUnloadDocumentPayload): Promise; - onDestroy?(data: onDestroyPayload): Promise; -} -export type HookName = "onConfigure" | "onListen" | "onUpgrade" | "onConnect" | "connected" | "onAuthenticate" | "onTokenSync" | "onCreateDocument" | "onLoadDocument" | "afterLoadDocument" | "beforeHandleMessage" | "beforeBroadcastStateless" | "beforeSync" | "onStateless" | "onChange" | "onStoreDocument" | "afterStoreDocument" | "onAwarenessUpdate" | "onRequest" | "onDisconnect" | "beforeUnloadDocument" | "afterUnloadDocument" | "onDestroy"; -export type HookPayloadByName = { - onConfigure: onConfigurePayload; - onListen: onListenPayload; - onUpgrade: onUpgradePayload; - onConnect: onConnectPayload; - connected: connectedPayload; - onAuthenticate: onAuthenticatePayload; - onTokenSync: onTokenSyncPayload; - onCreateDocument: onCreateDocumentPayload; - onLoadDocument: onLoadDocumentPayload; - afterLoadDocument: afterLoadDocumentPayload; - beforeHandleMessage: beforeHandleMessagePayload; - beforeBroadcastStateless: beforeBroadcastStatelessPayload; - beforeSync: beforeSyncPayload; - onStateless: onStatelessPayload; - onChange: onChangePayload; - onStoreDocument: onStoreDocumentPayload; - afterStoreDocument: afterStoreDocumentPayload; - onAwarenessUpdate: onAwarenessUpdatePayload; - onRequest: onRequestPayload; - onDisconnect: onDisconnectPayload; - afterUnloadDocument: afterUnloadDocumentPayload; - beforeUnloadDocument: beforeUnloadDocumentPayload; - onDestroy: onDestroyPayload; -}; -export interface Configuration extends Extension { - /** - * A name for the instance, used for logging. - */ - name: string | null; - /** - * A list of hocuspocus extensions. - */ - extensions: Array; - /** - * Defines in which interval the server sends a ping, and closes the connection when no pong is sent back. - */ - timeout: number; - /** - * Debounces the call of the `onStoreDocument` hook for the given amount of time in ms. - * Otherwise every single update would be persisted. - */ - debounce: number; - /** - * Makes sure to call `onStoreDocument` at least in the given amount of time (ms). - */ - maxDebounce: number; - /** - * By default, the servers show a start screen. If passed false, the server will start quietly. - */ - quiet: boolean; - /** - * If set to false, respects the debounce time of `onStoreDocument` before unloading a document. - * Otherwise, the document will be unloaded immediately. - * - * This prevents a client from DOSing the server by repeatedly connecting and disconnecting when - * your onStoreDocument is rate-limited. - */ - unloadImmediately: boolean; - /** - * options to pass to the ydoc document - */ - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; -} -export interface onStatelessPayload { - connection: Connection; - documentName: string; - document: Document; - payload: string; -} -export interface onAuthenticatePayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - request: IncomingMessage; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; -} -export interface onTokenSyncPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} -export interface onCreateDocumentPayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface onConnectPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface connectedPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} -export interface onLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface afterLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface onChangePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - transactionOrigin: any; -} -export interface beforeHandleMessagePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - connection: Connection; -} -export interface beforeSyncPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - connection: Connection; - /** - * The y-protocols/sync message type - * @example - * 0: SyncStep1 - * 1: SyncStep2 - * 2: YjsUpdate - * - * @see https://github.com/yjs/y-protocols/blob/master/sync.js#L13-L40 - */ - type: number; - /** - * The payload of the y-sync message. - */ - payload: Uint8Array; -} -export interface beforeBroadcastStatelessPayload { - document: Document; - documentName: string; - payload: string; -} -export interface onStoreDocumentPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - transactionOrigin?: any; -} -export interface afterStoreDocumentPayload extends onStoreDocumentPayload { -} -export interface onAwarenessUpdatePayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - added: number[]; - updated: number[]; - removed: number[]; - awareness: Awareness; - states: StatesArray; -} -export type StatesArray = { - clientId: number; - [key: string | number]: any; -}[]; -export interface fetchPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface storePayload extends onStoreDocumentPayload { - state: Buffer; -} -export interface onDisconnectPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; -} -export interface onRequestPayload { - request: IncomingMessage; - response: ServerResponse; - instance: Hocuspocus; -} -export interface onUpgradePayload { - request: IncomingMessage; - socket: any; - head: any; - instance: Hocuspocus; -} -export interface onListenPayload { - instance: Hocuspocus; - configuration: Configuration; - port: number; -} -export interface onDestroyPayload { - instance: Hocuspocus; -} -export interface onConfigurePayload { - instance: Hocuspocus; - configuration: Configuration; - version: string; -} -export interface afterUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; -} -export interface beforeUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; - document: Document; -} -export interface DirectConnection { - transact(transaction: (document: Document) => void): Promise; - disconnect(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/util/debounce.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/util/debounce.d.ts deleted file mode 100644 index 4573cfd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/util/debounce.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare const useDebounce: () => { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/util/getParameters.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/util/getParameters.d.ts deleted file mode 100644 index a0100ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/server/src/util/getParameters.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import { URLSearchParams } from "node:url"; -/** - * Get parameters by the given request - */ -export declare function getParameters(request?: Pick): URLSearchParams; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/Prosemirror.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/Prosemirror.d.ts deleted file mode 100644 index 06db1a6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/Prosemirror.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Doc } from "yjs"; -import { Schema } from "@tiptap/pm/model"; -import type { Transformer } from "./types.ts"; -declare class Prosemirror implements Transformer { - defaultSchema: Schema; - schema(schema: Schema): Prosemirror; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, schema?: Schema): Doc; -} -export declare const ProsemirrorTransformer: Prosemirror; -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/Tiptap.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/Tiptap.d.ts deleted file mode 100644 index 3d64c14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/Tiptap.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Doc } from "yjs"; -import type { Extensions } from "@tiptap/core"; -import type { Transformer } from "./types.ts"; -export declare class Tiptap implements Transformer { - defaultExtensions: Extensions; - extensions(extensions: Extensions): Tiptap; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, extensions?: Extensions): Doc; -} -export declare const TiptapTransformer: Tiptap; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/index.d.ts deleted file mode 100644 index a8debe5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./Prosemirror.ts"; -export * from "./Tiptap.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/types.d.ts deleted file mode 100644 index 1c2f6da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/packages/transformer/src/types.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Doc } from "yjs"; -export interface Transformer { - fromYdoc: (document: Doc, fieldName?: string | Array) => any; - toYdoc: (document: any, fieldName: string) => Doc; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/default.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/default.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/deno.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/deno.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/deno.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/express.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/express.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/express.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/hono.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/hono.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/hono.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/koa.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/koa.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/koa.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/load-document.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/load-document.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/load-document.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/redis.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/redis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/s3-redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/s3-redis.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/s3-redis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/s3.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/s3.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/s3.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/slow.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/slow.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/slow.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/tiptapcollab.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/tiptapcollab.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/tiptapcollab.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/webhook.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/webhook.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/backend/src/webhook.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/app/SocketContext1.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/app/SocketContext1.d.ts deleted file mode 100644 index d0725fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/app/SocketContext1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { HocuspocusProviderWebsocket } from "@hocuspocus/provider"; -export declare const SocketContext1: import("react").Context; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/app/SocketContext2.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/app/SocketContext2.d.ts deleted file mode 100644 index ac4da99..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/app/SocketContext2.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { HocuspocusProviderWebsocket } from "@hocuspocus/provider"; -export declare const SocketContext2: import("react").Context; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/next.config.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/next.config.d.ts deleted file mode 100644 index 2821dfb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/playground/frontend/next.config.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { NextConfig } from "next"; -declare const nextConfig: NextConfig; -export default nextConfig; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-database/fetch.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-database/fetch.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-database/fetch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-logger/onListen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-logger/onListen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-logger/onListen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onAwarenessChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onAwarenessChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onAwarenessChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-redis/onStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-s3/fetch.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-s3/fetch.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-s3/fetch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-throttle/banning.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-throttle/banning.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-throttle/banning.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-throttle/configuration.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-throttle/configuration.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/extension-throttle/configuration.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/hasUnsyncedChanges.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/hasUnsyncedChanges.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/hasUnsyncedChanges.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/observe.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/observe.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/observe.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/observeDeep.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/observeDeep.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/observeDeep.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAuthenticated.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAuthenticated.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAuthenticated.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAuthenticationFailed.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAuthenticationFailed.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAuthenticationFailed.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAwarenessChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAwarenessChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAwarenessChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAwarenessUpdate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAwarenessUpdate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onAwarenessUpdate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onClose.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onClose.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onClose.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onConnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onConnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onConnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onDisconnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onDisconnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onDisconnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onMessage.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onMessage.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onOpen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onOpen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onOpen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onSynced.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onSynced.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/provider/onSynced.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/providerwebsocket/configuration.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/providerwebsocket/configuration.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/providerwebsocket/configuration.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/address.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/address.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/address.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterLoadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterLoadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterLoadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterUnloadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterUnloadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/afterUnloadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeBroadcastStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeBroadcastStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeBroadcastStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeHandleMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeHandleMessage.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeHandleMessage.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeSync.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeSync.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeSync.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeUnloadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeUnloadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/beforeUnloadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/closeConnections.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/closeConnections.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/closeConnections.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/getConnectionsCount.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/getConnectionsCount.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/getConnectionsCount.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/getDocumentsCount.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/getDocumentsCount.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/getDocumentsCount.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/listen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/listen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/listen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onAuthenticate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onAuthenticate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onAuthenticate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onAwarenessUpdate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onAwarenessUpdate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onAwarenessUpdate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onClose.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onClose.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onClose.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onConfigure.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onConfigure.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onConfigure.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onConnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onConnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onConnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onDestroy.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onDestroy.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onDestroy.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onDisconnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onDisconnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onDisconnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onListen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onListen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onListen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onLoadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onLoadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onLoadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onRequest.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onRequest.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onRequest.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onTokenSync.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onTokenSync.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onTokenSync.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onUpgrade.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onUpgrade.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/onUpgrade.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/openDirectConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/openDirectConnection.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/openDirectConnection.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/websocketError.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/websocketError.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/server/websocketError.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/transformer/TiptapTransformer.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/transformer/TiptapTransformer.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/transformer/TiptapTransformer.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/createDirectory.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/createDirectory.d.ts deleted file mode 100644 index 7affbc2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/createDirectory.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const createDirectory: (dir: string) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/flushRedis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/flushRedis.d.ts deleted file mode 100644 index 5a548da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/flushRedis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const flushRedis: () => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/index.d.ts deleted file mode 100644 index 789d5d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from './createDirectory.ts'; -export * from './flushRedis.ts'; -export * from './newHocuspocus.ts'; -export * from './newHocuspocusProvider.ts'; -export * from './newHocuspocusProviderWebsocket.ts'; -export * from './randomInteger.ts'; -export * from './redisConnectionSettings.ts'; -export * from './removeDirectory.ts'; -export * from './sleep.ts'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocus.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocus.d.ts deleted file mode 100644 index c3de52e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocus.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { ServerConfiguration } from '@hocuspocus/server'; -export declare const newHocuspocus: (options?: Partial) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocusProvider.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocusProvider.d.ts deleted file mode 100644 index 09e3f10..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocusProvider.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { HocuspocusProvider, type HocuspocusProviderConfiguration, type HocuspocusProviderWebsocket, type HocuspocusProviderWebsocketConfiguration } from '@hocuspocus/provider'; -import type { Hocuspocus } from '@hocuspocus/server'; -export declare const newHocuspocusProvider: (server: Hocuspocus, options?: Partial, websocketOptions?: Partial, websocketProvider?: HocuspocusProviderWebsocket) => HocuspocusProvider; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts deleted file mode 100644 index 97bb454..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HocuspocusProviderWebsocketConfiguration } from '@hocuspocus/provider'; -import { HocuspocusProviderWebsocket } from '@hocuspocus/provider'; -import type { Hocuspocus } from '@hocuspocus/server'; -export declare const newHocuspocusProviderWebsocket: (hocuspocus: Hocuspocus, options?: Partial>) => HocuspocusProviderWebsocket; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/randomInteger.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/randomInteger.d.ts deleted file mode 100644 index b28e7b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/randomInteger.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const randomInteger: (min: number, max: number) => number; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/redisConnectionSettings.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/redisConnectionSettings.d.ts deleted file mode 100644 index 52c31fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/redisConnectionSettings.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const redisConnectionSettings: { - host: string; - port: number; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/removeDirectory.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/removeDirectory.d.ts deleted file mode 100644 index 71b4ffc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/removeDirectory.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const removeDirectory: (dir: string) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/retryableAssertion.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/retryableAssertion.d.ts deleted file mode 100644 index 1016874..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/retryableAssertion.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { ExecutionContext } from 'ava'; -export declare const retryableAssertion: (t: ExecutionContext, recoverableTry: (tt: ExecutionContext) => void) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/sleep.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/sleep.d.ts deleted file mode 100644 index 2450ca0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/dist/tests/utils/sleep.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const sleep: (time: number) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0ecdsa-generate-keypair b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0ecdsa-generate-keypair deleted file mode 100755 index aa26e53..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0ecdsa-generate-keypair +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0gentesthtml b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0gentesthtml deleted file mode 100755 index 32e77b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0gentesthtml +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0serve b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0serve deleted file mode 100755 index 8a07fe1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/node_modules/.bin/0serve +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0serve.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0serve.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/package.json b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/package.json deleted file mode 100644 index 61c59e7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "@hocuspocus/common", - "description": "shared code for multiple Hocuspocus packages", - "version": "3.4.4", - "homepage": "https://hocuspocus.dev", - "keywords": [ - "hocuspocus" - ], - "license": "MIT", - "type": "module", - "main": "dist/hocuspocus-common.cjs", - "module": "dist/hocuspocus-common.esm.js", - "types": "dist/packages/common/src/index.d.ts", - "exports": { - "source": { - "import": "./src/index.ts" - }, - "default": { - "import": "./dist/hocuspocus-common.esm.js", - "require": "./dist/hocuspocus-common.cjs", - "types": "./dist/packages/common/src/index.d.ts" - } - }, - "files": [ - "src", - "dist" - ], - "gitHead": "cd788b6a315f608ef531524409abdce1e6790726", - "dependencies": { - "lib0": "^0.2.87" - }, - "repository": { - "url": "https://github.com/ueberdosis/hocuspocus" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/CloseEvents.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/CloseEvents.ts deleted file mode 100644 index 1c1393b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/CloseEvents.ts +++ /dev/null @@ -1,49 +0,0 @@ -export interface CloseEvent { - code: number; - reason: string; -} - -/** - * The server is terminating the connection because a data frame was received - * that is too large. - * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code - */ -export const MessageTooBig: CloseEvent = { - code: 1009, - reason: "Message Too Big", -}; - -/** - * The server successfully processed the request, asks that the requester reset - * its document view, and is not returning any content. - */ -export const ResetConnection: CloseEvent = { - code: 4205, - reason: "Reset Connection", -}; - -/** - * Similar to Forbidden, but specifically for use when authentication is required and has - * failed or has not yet been provided. - */ -export const Unauthorized: CloseEvent = { - code: 4401, - reason: "Unauthorized", -}; - -/** - * The request contained valid data and was understood by the server, but the server - * is refusing action. - */ -export const Forbidden: CloseEvent = { - code: 4403, - reason: "Forbidden", -}; - -/** - * The server timed out waiting for the request. - */ -export const ConnectionTimeout: CloseEvent = { - code: 4408, - reason: "Connection Timeout", -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/auth.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/auth.ts deleted file mode 100644 index d62dfc6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/auth.ts +++ /dev/null @@ -1,62 +0,0 @@ -import * as encoding from "lib0/encoding"; -import * as decoding from "lib0/decoding"; -import type {AuthorizedScope} from "../../provider/src" - -export enum AuthMessageType { - Token = 0, - PermissionDenied = 1, - Authenticated = 2, -} - -export const writeAuthentication = ( - encoder: encoding.Encoder, - auth: string, -) => { - encoding.writeVarUint(encoder, AuthMessageType.Token); - encoding.writeVarString(encoder, auth); -}; - -export const writePermissionDenied = ( - encoder: encoding.Encoder, - reason: string, -) => { - encoding.writeVarUint(encoder, AuthMessageType.PermissionDenied); - encoding.writeVarString(encoder, reason); -}; - -export const writeAuthenticated = ( - encoder: encoding.Encoder, - scope: AuthorizedScope, -) => { - encoding.writeVarUint(encoder, AuthMessageType.Authenticated); - encoding.writeVarString(encoder, scope); -}; - -export const writeTokenSyncRequest = ( - encoder: encoding.Encoder, -) => { - encoding.writeVarUint(encoder, AuthMessageType.Token); -}; - -export const readAuthMessage = ( - decoder: decoding.Decoder, - sendToken: () => void, - permissionDeniedHandler: (reason: string) => void, - authenticatedHandler: (scope: string) => void, -) => { - switch (decoding.readVarUint(decoder)) { - case AuthMessageType.Token: { - sendToken(); - break; - } - case AuthMessageType.PermissionDenied: { - permissionDeniedHandler(decoding.readVarString(decoder)); - break; - } - case AuthMessageType.Authenticated: { - authenticatedHandler(decoding.readVarString(decoder)); - break; - } - default: - } -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/awarenessStatesToArray.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/awarenessStatesToArray.ts deleted file mode 100644 index 6ddf756..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/awarenessStatesToArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const awarenessStatesToArray = ( - states: Map>, -) => { - return Array.from(states.entries()).map(([key, value]) => { - return { - clientId: key, - ...value, - }; - }); -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/index.ts deleted file mode 100644 index 8a730fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./auth.ts"; -export * from "./CloseEvents.ts"; -export * from "./awarenessStatesToArray.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/types.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/types.ts deleted file mode 100644 index 76e79fc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common/src/types.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * State of the WebSocket connection. - * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState - */ -export enum WsReadyStates { - Connecting = 0, - Open = 1, - Closing = 2, - Closed = 3, -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/lib0 b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/lib0 deleted file mode 120000 index e2cfd65..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@3.4.4/node_modules/lib0 +++ /dev/null @@ -1 +0,0 @@ -../../lib0@0.2.117/node_modules/lib0 \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/LICENSE.md deleted file mode 100644 index 8cb2084..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/README.md b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/README.md deleted file mode 100644 index 82b5b7e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# @hocuspocus/common -[![Version](https://img.shields.io/npm/v/@hocuspocus/common.svg?label=version)](https://www.npmjs.com/package/@hocuspocus/common) -[![Downloads](https://img.shields.io/npm/dm/@hocuspocus/common.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@hocuspocus/common.svg)](https://www.npmjs.com/package/@hocuspocus/common) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction -Shared types and utilities used across [Hocuspocus](https://github.com/ueberdosis/hocuspocus) packages – including message/sync protocol helpers and common enums. This package is an internal building block; most users will depend on `@hocuspocus/server` or `@hocuspocus/provider` instead. - -## Official Documentation -Documentation can be found in the [GitHub repository](https://github.com/ueberdosis/hocuspocus). - -## License -Hocuspocus is open-sourced software licensed under the [MIT license](https://github.com/ueberdosis/hocuspocus/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs deleted file mode 100644 index 92839c5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs +++ /dev/null @@ -1,183 +0,0 @@ -Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -//#region \0rolldown/runtime.js -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { - key = keys[i]; - if (!__hasOwnProp.call(to, key) && key !== except) { - __defProp(to, key, { - get: ((k) => from[k]).bind(null, key), - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable - }); - } - } - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { - value: mod, - enumerable: true -}) : target, mod)); - -//#endregion -let lib0_encoding = require("lib0/encoding"); -lib0_encoding = __toESM(lib0_encoding); -let lib0_decoding = require("lib0/decoding"); -lib0_decoding = __toESM(lib0_decoding); - -//#region packages/common/src/auth.ts -let AuthMessageType = /* @__PURE__ */ function(AuthMessageType) { - AuthMessageType[AuthMessageType["Token"] = 0] = "Token"; - AuthMessageType[AuthMessageType["PermissionDenied"] = 1] = "PermissionDenied"; - AuthMessageType[AuthMessageType["Authenticated"] = 2] = "Authenticated"; - return AuthMessageType; -}({}); -const writeAuthentication = (encoder, auth) => { - lib0_encoding.writeVarUint(encoder, AuthMessageType.Token); - lib0_encoding.writeVarString(encoder, auth); -}; -const writePermissionDenied = (encoder, reason) => { - lib0_encoding.writeVarUint(encoder, AuthMessageType.PermissionDenied); - lib0_encoding.writeVarString(encoder, reason); -}; -const writeAuthenticated = (encoder, scope) => { - lib0_encoding.writeVarUint(encoder, AuthMessageType.Authenticated); - lib0_encoding.writeVarString(encoder, scope); -}; -const writeTokenSyncRequest = (encoder) => { - lib0_encoding.writeVarUint(encoder, AuthMessageType.Token); -}; -const readAuthMessage = (decoder, sendToken, permissionDeniedHandler, authenticatedHandler) => { - switch (lib0_decoding.readVarUint(decoder)) { - case AuthMessageType.Token: - sendToken(); - break; - case AuthMessageType.PermissionDenied: - permissionDeniedHandler(lib0_decoding.readVarString(decoder)); - break; - case AuthMessageType.Authenticated: - authenticatedHandler(lib0_decoding.readVarString(decoder)); - break; - default: - } -}; - -//#endregion -//#region packages/common/src/CloseEvents.ts -/** -* The server is terminating the connection because a data frame was received -* that is too large. -* See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code -*/ -const MessageTooBig = { - code: 1009, - reason: "Message Too Big" -}; -/** -* The server successfully processed the request, asks that the requester reset -* its document view, and is not returning any content. -*/ -const ResetConnection = { - code: 4205, - reason: "Reset Connection" -}; -/** -* Similar to Forbidden, but specifically for use when authentication is required and has -* failed or has not yet been provided. -*/ -const Unauthorized = { - code: 4401, - reason: "Unauthorized" -}; -/** -* The request contained valid data and was understood by the server, but the server -* is refusing action. -*/ -const Forbidden = { - code: 4403, - reason: "Forbidden" -}; -/** -* The server timed out waiting for the request. -*/ -const ConnectionTimeout = { - code: 4408, - reason: "Connection Timeout" -}; - -//#endregion -//#region packages/common/src/awarenessStatesToArray.ts -const awarenessStatesToArray = (states) => { - return Array.from(states.entries()).map(([key, value]) => { - return { - clientId: key, - ...value - }; - }); -}; - -//#endregion -//#region packages/common/src/routingKey.ts -const SEPARATOR = "\0"; -function makeRoutingKey(documentName, sessionId) { - return documentName + SEPARATOR + sessionId; -} -function parseRoutingKey(key) { - const idx = key.indexOf(SEPARATOR); - if (idx === -1) return { - documentName: key, - sessionId: null - }; - return { - documentName: key.substring(0, idx), - sessionId: key.substring(idx + 1) - }; -} - -//#endregion -//#region packages/common/src/SkipFurtherHooksError.ts -var SkipFurtherHooksError = class extends Error { - constructor(message) { - super(message ?? "Further hooks skipped"); - this.name = "SkipFurtherHooksError"; - } -}; - -//#endregion -//#region packages/common/src/types.ts -/** -* State of the WebSocket connection. -* https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState -*/ -let WsReadyStates = /* @__PURE__ */ function(WsReadyStates) { - WsReadyStates[WsReadyStates["Connecting"] = 0] = "Connecting"; - WsReadyStates[WsReadyStates["Open"] = 1] = "Open"; - WsReadyStates[WsReadyStates["Closing"] = 2] = "Closing"; - WsReadyStates[WsReadyStates["Closed"] = 3] = "Closed"; - return WsReadyStates; -}({}); - -//#endregion -exports.AuthMessageType = AuthMessageType; -exports.ConnectionTimeout = ConnectionTimeout; -exports.Forbidden = Forbidden; -exports.MessageTooBig = MessageTooBig; -exports.ResetConnection = ResetConnection; -exports.SkipFurtherHooksError = SkipFurtherHooksError; -exports.Unauthorized = Unauthorized; -exports.WsReadyStates = WsReadyStates; -exports.awarenessStatesToArray = awarenessStatesToArray; -exports.makeRoutingKey = makeRoutingKey; -exports.parseRoutingKey = parseRoutingKey; -exports.readAuthMessage = readAuthMessage; -exports.writeAuthenticated = writeAuthenticated; -exports.writeAuthentication = writeAuthentication; -exports.writePermissionDenied = writePermissionDenied; -exports.writeTokenSyncRequest = writeTokenSyncRequest; -//# sourceMappingURL=hocuspocus-common.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs.map deleted file mode 100644 index aafabe5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-common.cjs","names":["decoding"],"sources":["../src/auth.ts","../src/CloseEvents.ts","../src/awarenessStatesToArray.ts","../src/routingKey.ts","../src/SkipFurtherHooksError.ts","../src/types.ts"],"sourcesContent":["import * as encoding from \"lib0/encoding\";\nimport * as decoding from \"lib0/decoding\";\nimport type {AuthorizedScope} from \"../../provider/src\"\n\nexport enum AuthMessageType {\n\tToken = 0,\n\tPermissionDenied = 1,\n\tAuthenticated = 2,\n}\n\nexport const writeAuthentication = (\n\tencoder: encoding.Encoder,\n\tauth: string,\n) => {\n\tencoding.writeVarUint(encoder, AuthMessageType.Token);\n\tencoding.writeVarString(encoder, auth);\n};\n\nexport const writePermissionDenied = (\n\tencoder: encoding.Encoder,\n\treason: string,\n) => {\n\tencoding.writeVarUint(encoder, AuthMessageType.PermissionDenied);\n\tencoding.writeVarString(encoder, reason);\n};\n\nexport const writeAuthenticated = (\n\tencoder: encoding.Encoder,\n\tscope: AuthorizedScope,\n) => {\n\tencoding.writeVarUint(encoder, AuthMessageType.Authenticated);\n\tencoding.writeVarString(encoder, scope);\n};\n\nexport const writeTokenSyncRequest = (\n\tencoder: encoding.Encoder,\n) => {\n\tencoding.writeVarUint(encoder, AuthMessageType.Token);\n};\n\nexport const readAuthMessage = (\n\tdecoder: decoding.Decoder,\n\tsendToken: () => void,\n\tpermissionDeniedHandler: (reason: string) => void,\n\tauthenticatedHandler: (scope: string) => void,\n) => {\n\tswitch (decoding.readVarUint(decoder)) {\n\t\tcase AuthMessageType.Token: {\n\t\t\tsendToken();\n\t\t\tbreak;\n\t\t}\n\t\tcase AuthMessageType.PermissionDenied: {\n\t\t\tpermissionDeniedHandler(decoding.readVarString(decoder));\n\t\t\tbreak;\n\t\t}\n\t\tcase AuthMessageType.Authenticated: {\n\t\t\tauthenticatedHandler(decoding.readVarString(decoder));\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t}\n};\n","export interface CloseEvent {\n\tcode: number;\n\treason: string;\n}\n\n/**\n * The server is terminating the connection because a data frame was received\n * that is too large.\n * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code\n */\nexport const MessageTooBig: CloseEvent = {\n\tcode: 1009,\n\treason: \"Message Too Big\",\n};\n\n/**\n * The server successfully processed the request, asks that the requester reset\n * its document view, and is not returning any content.\n */\nexport const ResetConnection: CloseEvent = {\n\tcode: 4205,\n\treason: \"Reset Connection\",\n};\n\n/**\n * Similar to Forbidden, but specifically for use when authentication is required and has\n * failed or has not yet been provided.\n */\nexport const Unauthorized: CloseEvent = {\n\tcode: 4401,\n\treason: \"Unauthorized\",\n};\n\n/**\n * The request contained valid data and was understood by the server, but the server\n * is refusing action.\n */\nexport const Forbidden: CloseEvent = {\n\tcode: 4403,\n\treason: \"Forbidden\",\n};\n\n/**\n * The server timed out waiting for the request.\n */\nexport const ConnectionTimeout: CloseEvent = {\n\tcode: 4408,\n\treason: \"Connection Timeout\",\n};\n","export const awarenessStatesToArray = (\n\tstates: Map>,\n) => {\n\treturn Array.from(states.entries()).map(([key, value]) => {\n\t\treturn {\n\t\t\tclientId: key,\n\t\t\t...value,\n\t\t};\n\t});\n};\n","const SEPARATOR = '\\0';\n\nexport function makeRoutingKey(documentName: string, sessionId: string): string {\n\treturn documentName + SEPARATOR + sessionId;\n}\n\nexport function parseRoutingKey(key: string): { documentName: string; sessionId: string | null } {\n\tconst idx = key.indexOf(SEPARATOR);\n\tif (idx === -1) return { documentName: key, sessionId: null };\n\treturn { documentName: key.substring(0, idx), sessionId: key.substring(idx + 1) };\n}\n","export class SkipFurtherHooksError extends Error {\n\tconstructor(message?: string) {\n\t\tsuper(message ?? \"Further hooks skipped\");\n\t\tthis.name = \"SkipFurtherHooksError\";\n\t}\n}\n","/**\n * State of the WebSocket connection.\n * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState\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AAElB,SAAgB,eAAe,cAAsB,WAA2B;AAC/E,QAAO,eAAe,YAAY;;AAGnC,SAAgB,gBAAgB,KAAiE;CAChG,MAAM,MAAM,IAAI,QAAQ,UAAU;AAClC,KAAI,QAAQ,GAAI,QAAO;EAAE,cAAc;EAAK,WAAW;EAAM;AAC7D,QAAO;EAAE,cAAc,IAAI,UAAU,GAAG,IAAI;EAAE,WAAW,IAAI,UAAU,MAAM,EAAE;EAAE;;;;;ACTlF,IAAa,wBAAb,cAA2C,MAAM;CAChD,YAAY,SAAkB;AAC7B,QAAM,WAAW,wBAAwB;AACzC,OAAK,OAAO;;;;;;;;;;ACCd,IAAY,gBAAL;AACN;AACA;AACA;AACA;;KACA"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js deleted file mode 100644 index b1403e7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js +++ /dev/null @@ -1,138 +0,0 @@ -import * as encoding from "lib0/encoding"; -import * as decoding from "lib0/decoding"; - -//#region packages/common/src/auth.ts -let AuthMessageType = /* @__PURE__ */ function(AuthMessageType) { - AuthMessageType[AuthMessageType["Token"] = 0] = "Token"; - AuthMessageType[AuthMessageType["PermissionDenied"] = 1] = "PermissionDenied"; - AuthMessageType[AuthMessageType["Authenticated"] = 2] = "Authenticated"; - return AuthMessageType; -}({}); -const writeAuthentication = (encoder, auth) => { - encoding.writeVarUint(encoder, AuthMessageType.Token); - encoding.writeVarString(encoder, auth); -}; -const writePermissionDenied = (encoder, reason) => { - encoding.writeVarUint(encoder, AuthMessageType.PermissionDenied); - encoding.writeVarString(encoder, reason); -}; -const writeAuthenticated = (encoder, scope) => { - encoding.writeVarUint(encoder, AuthMessageType.Authenticated); - encoding.writeVarString(encoder, scope); -}; -const writeTokenSyncRequest = (encoder) => { - encoding.writeVarUint(encoder, AuthMessageType.Token); -}; -const readAuthMessage = (decoder, sendToken, permissionDeniedHandler, authenticatedHandler) => { - switch (decoding.readVarUint(decoder)) { - case AuthMessageType.Token: - sendToken(); - break; - case AuthMessageType.PermissionDenied: - permissionDeniedHandler(decoding.readVarString(decoder)); - break; - case AuthMessageType.Authenticated: - authenticatedHandler(decoding.readVarString(decoder)); - break; - default: - } -}; - -//#endregion -//#region packages/common/src/CloseEvents.ts -/** -* The server is terminating the connection because a data frame was received -* that is too large. -* See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code -*/ -const MessageTooBig = { - code: 1009, - reason: "Message Too Big" -}; -/** -* The server successfully processed the request, asks that the requester reset -* its document view, and is not returning any content. -*/ -const ResetConnection = { - code: 4205, - reason: "Reset Connection" -}; -/** -* Similar to Forbidden, but specifically for use when authentication is required and has -* failed or has not yet been provided. -*/ -const Unauthorized = { - code: 4401, - reason: "Unauthorized" -}; -/** -* The request contained valid data and was understood by the server, but the server -* is refusing action. -*/ -const Forbidden = { - code: 4403, - reason: "Forbidden" -}; -/** -* The server timed out waiting for the request. -*/ -const ConnectionTimeout = { - code: 4408, - reason: "Connection Timeout" -}; - -//#endregion -//#region packages/common/src/awarenessStatesToArray.ts -const awarenessStatesToArray = (states) => { - return Array.from(states.entries()).map(([key, value]) => { - return { - clientId: key, - ...value - }; - }); -}; - -//#endregion -//#region packages/common/src/routingKey.ts -const SEPARATOR = "\0"; -function makeRoutingKey(documentName, sessionId) { - return documentName + SEPARATOR + sessionId; -} -function parseRoutingKey(key) { - const idx = key.indexOf(SEPARATOR); - if (idx === -1) return { - documentName: key, - sessionId: null - }; - return { - documentName: key.substring(0, idx), - sessionId: key.substring(idx + 1) - }; -} - -//#endregion -//#region packages/common/src/SkipFurtherHooksError.ts -var SkipFurtherHooksError = class extends Error { - constructor(message) { - super(message ?? "Further hooks skipped"); - this.name = "SkipFurtherHooksError"; - } -}; - -//#endregion -//#region packages/common/src/types.ts -/** -* State of the WebSocket connection. -* https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState -*/ -let WsReadyStates = /* @__PURE__ */ function(WsReadyStates) { - WsReadyStates[WsReadyStates["Connecting"] = 0] = "Connecting"; - WsReadyStates[WsReadyStates["Open"] = 1] = "Open"; - WsReadyStates[WsReadyStates["Closing"] = 2] = "Closing"; - WsReadyStates[WsReadyStates["Closed"] = 3] = "Closed"; - return WsReadyStates; -}({}); - -//#endregion -export { AuthMessageType, ConnectionTimeout, Forbidden, MessageTooBig, ResetConnection, SkipFurtherHooksError, Unauthorized, WsReadyStates, awarenessStatesToArray, makeRoutingKey, parseRoutingKey, readAuthMessage, writeAuthenticated, writeAuthentication, writePermissionDenied, writeTokenSyncRequest }; -//# sourceMappingURL=hocuspocus-common.esm.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js.map deleted file mode 100644 index f31b2be..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-common.esm.js","names":[],"sources":["../src/auth.ts","../src/CloseEvents.ts","../src/awarenessStatesToArray.ts","../src/routingKey.ts","../src/SkipFurtherHooksError.ts","../src/types.ts"],"sourcesContent":["import * as encoding from \"lib0/encoding\";\nimport * as decoding from \"lib0/decoding\";\nimport type {AuthorizedScope} from \"../../provider/src\"\n\nexport enum AuthMessageType {\n\tToken = 0,\n\tPermissionDenied = 1,\n\tAuthenticated = 2,\n}\n\nexport const writeAuthentication = (\n\tencoder: encoding.Encoder,\n\tauth: string,\n) => {\n\tencoding.writeVarUint(encoder, AuthMessageType.Token);\n\tencoding.writeVarString(encoder, auth);\n};\n\nexport const writePermissionDenied = (\n\tencoder: encoding.Encoder,\n\treason: string,\n) => {\n\tencoding.writeVarUint(encoder, AuthMessageType.PermissionDenied);\n\tencoding.writeVarString(encoder, reason);\n};\n\nexport const writeAuthenticated = (\n\tencoder: encoding.Encoder,\n\tscope: AuthorizedScope,\n) => {\n\tencoding.writeVarUint(encoder, AuthMessageType.Authenticated);\n\tencoding.writeVarString(encoder, scope);\n};\n\nexport const writeTokenSyncRequest = (\n\tencoder: encoding.Encoder,\n) => {\n\tencoding.writeVarUint(encoder, AuthMessageType.Token);\n};\n\nexport const readAuthMessage = (\n\tdecoder: decoding.Decoder,\n\tsendToken: () => void,\n\tpermissionDeniedHandler: (reason: string) => void,\n\tauthenticatedHandler: (scope: string) => void,\n) => {\n\tswitch (decoding.readVarUint(decoder)) {\n\t\tcase AuthMessageType.Token: {\n\t\t\tsendToken();\n\t\t\tbreak;\n\t\t}\n\t\tcase AuthMessageType.PermissionDenied: {\n\t\t\tpermissionDeniedHandler(decoding.readVarString(decoder));\n\t\t\tbreak;\n\t\t}\n\t\tcase AuthMessageType.Authenticated: {\n\t\t\tauthenticatedHandler(decoding.readVarString(decoder));\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t}\n};\n","export interface CloseEvent {\n\tcode: number;\n\treason: string;\n}\n\n/**\n * The server is terminating the connection because a data frame was received\n * that is too large.\n * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code\n */\nexport const MessageTooBig: CloseEvent = {\n\tcode: 1009,\n\treason: \"Message Too Big\",\n};\n\n/**\n * The server successfully processed the request, asks that the requester reset\n * its document view, and is not returning any content.\n */\nexport const ResetConnection: CloseEvent = {\n\tcode: 4205,\n\treason: \"Reset Connection\",\n};\n\n/**\n * Similar to Forbidden, but specifically for use when authentication is required and has\n * failed or has not yet been provided.\n */\nexport const Unauthorized: CloseEvent = {\n\tcode: 4401,\n\treason: \"Unauthorized\",\n};\n\n/**\n * The request contained valid data and was understood by the server, but the server\n * is refusing action.\n */\nexport const Forbidden: CloseEvent = {\n\tcode: 4403,\n\treason: \"Forbidden\",\n};\n\n/**\n * The server timed out waiting for the request.\n */\nexport const ConnectionTimeout: CloseEvent = {\n\tcode: 4408,\n\treason: \"Connection Timeout\",\n};\n","export const awarenessStatesToArray = (\n\tstates: Map>,\n) => {\n\treturn Array.from(states.entries()).map(([key, value]) => {\n\t\treturn {\n\t\t\tclientId: key,\n\t\t\t...value,\n\t\t};\n\t});\n};\n","const SEPARATOR = '\\0';\n\nexport function makeRoutingKey(documentName: string, sessionId: string): string {\n\treturn documentName + SEPARATOR + sessionId;\n}\n\nexport function parseRoutingKey(key: string): { documentName: string; sessionId: string | null } {\n\tconst idx = key.indexOf(SEPARATOR);\n\tif (idx === -1) return { documentName: key, sessionId: null };\n\treturn { documentName: key.substring(0, idx), sessionId: key.substring(idx + 1) };\n}\n","export class SkipFurtherHooksError extends Error {\n\tconstructor(message?: string) {\n\t\tsuper(message ?? \"Further hooks skipped\");\n\t\tthis.name = \"SkipFurtherHooksError\";\n\t}\n}\n","/**\n * State of the WebSocket connection.\n * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState\n */\nexport enum WsReadyStates {\n\tConnecting = 0,\n\tOpen = 1,\n\tClosing = 2,\n\tClosed = 3,\n}\n"],"mappings":";;;;AAIA,IAAY,kBAAL;AACN;AACA;AACA;;KACA;AAED,MAAa,uBACZ,SACA,SACI;AACJ,UAAS,aAAa,SAAS,gBAAgB,MAAM;AACrD,UAAS,eAAe,SAAS,KAAK;;AAGvC,MAAa,yBACZ,SACA,WACI;AACJ,UAAS,aAAa,SAAS,gBAAgB,iBAAiB;AAChE,UAAS,eAAe,SAAS,OAAO;;AAGzC,MAAa,sBACZ,SACA,UACI;AACJ,UAAS,aAAa,SAAS,gBAAgB,cAAc;AAC7D,UAAS,eAAe,SAAS,MAAM;;AAGxC,MAAa,yBACZ,YACI;AACJ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/node_modules/@hocuspocus/common/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/index.d.ts deleted file mode 100644 index 2d5356d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/dist/index.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -import * as encoding from "lib0/encoding"; -import * as decoding from "lib0/decoding"; -//#region packages/provider/src/types.d.ts -type AuthorizedScope = "read-write" | "readonly"; -//#endregion -//#region packages/common/src/auth.d.ts -declare enum AuthMessageType { - Token = 0, - PermissionDenied = 1, - Authenticated = 2 -} -declare const writeAuthentication: (encoder: encoding.Encoder, auth: string) => void; -declare const writePermissionDenied: (encoder: encoding.Encoder, reason: string) => void; -declare const writeAuthenticated: (encoder: encoding.Encoder, scope: AuthorizedScope) => void; -declare const writeTokenSyncRequest: (encoder: encoding.Encoder) => void; -declare const readAuthMessage: (decoder: decoding.Decoder, sendToken: () => void, permissionDeniedHandler: (reason: string) => void, authenticatedHandler: (scope: string) => void) => void; -//#endregion -//#region packages/common/src/CloseEvents.d.ts -interface CloseEvent { - code: number; - reason: string; -} -/** - * The server is terminating the connection because a data frame was received - * that is too large. - * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code - */ -declare const MessageTooBig: CloseEvent; -/** - * The server successfully processed the request, asks that the requester reset - * its document view, and is not returning any content. - */ -declare const ResetConnection: CloseEvent; -/** - * Similar to Forbidden, but specifically for use when authentication is required and has - * failed or has not yet been provided. - */ -declare const Unauthorized: CloseEvent; -/** - * The request contained valid data and was understood by the server, but the server - * is refusing action. - */ -declare const Forbidden: CloseEvent; -/** - * The server timed out waiting for the request. - */ -declare const ConnectionTimeout: CloseEvent; -//#endregion -//#region packages/common/src/awarenessStatesToArray.d.ts -declare const awarenessStatesToArray: (states: Map>) => { - clientId: number; -}[]; -//#endregion -//#region packages/common/src/routingKey.d.ts -declare function makeRoutingKey(documentName: string, sessionId: string): string; -declare function parseRoutingKey(key: string): { - documentName: string; - sessionId: string | null; -}; -//#endregion -//#region packages/common/src/SkipFurtherHooksError.d.ts -declare class SkipFurtherHooksError extends Error { - constructor(message?: string); -} -//#endregion -//#region packages/common/src/types.d.ts -/** - * State of the WebSocket connection. - * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState - */ -declare enum WsReadyStates { - Connecting = 0, - Open = 1, - Closing = 2, - Closed = 3 -} -//#endregion -export { AuthMessageType, CloseEvent, ConnectionTimeout, Forbidden, MessageTooBig, ResetConnection, SkipFurtherHooksError, Unauthorized, WsReadyStates, awarenessStatesToArray, makeRoutingKey, parseRoutingKey, readAuthMessage, writeAuthenticated, writeAuthentication, writePermissionDenied, writeTokenSyncRequest }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0ecdsa-generate-keypair b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0ecdsa-generate-keypair deleted file mode 100755 index aa26e53..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0ecdsa-generate-keypair +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0gentesthtml b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0gentesthtml deleted file mode 100755 index 32e77b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0gentesthtml +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0serve b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0serve deleted file mode 100755 index 8a07fe1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/node_modules/.bin/0serve +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0serve.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0serve.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/package.json b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/package.json deleted file mode 100644 index e36d059..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "@hocuspocus/common", - "description": "shared code for multiple Hocuspocus packages", - "version": "4.1.0", - "homepage": "https://hocuspocus.dev", - "keywords": [ - "hocuspocus" - ], - "license": "MIT", - "type": "module", - "main": "dist/hocuspocus-common.cjs", - "module": "dist/hocuspocus-common.esm.js", - "types": "dist/index.d.ts", - "exports": { - "source": { - "import": "./src/index.ts" - }, - "default": { - "import": "./dist/hocuspocus-common.esm.js", - "require": "./dist/hocuspocus-common.cjs", - "types": "./dist/index.d.ts" - } - }, - "files": [ - "src", - "dist" - ], - "gitHead": "702ec724b099264467c7fafa854a3988c7314ff9", - "dependencies": { - "lib0": "^0.2.87" - }, - "repository": { - "url": "https://github.com/ueberdosis/hocuspocus" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/CloseEvents.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/CloseEvents.ts deleted file mode 100644 index 1c1393b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/CloseEvents.ts +++ /dev/null @@ -1,49 +0,0 @@ -export interface CloseEvent { - code: number; - reason: string; -} - -/** - * The server is terminating the connection because a data frame was received - * that is too large. - * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code - */ -export const MessageTooBig: CloseEvent = { - code: 1009, - reason: "Message Too Big", -}; - -/** - * The server successfully processed the request, asks that the requester reset - * its document view, and is not returning any content. - */ -export const ResetConnection: CloseEvent = { - code: 4205, - reason: "Reset Connection", -}; - -/** - * Similar to Forbidden, but specifically for use when authentication is required and has - * failed or has not yet been provided. - */ -export const Unauthorized: CloseEvent = { - code: 4401, - reason: "Unauthorized", -}; - -/** - * The request contained valid data and was understood by the server, but the server - * is refusing action. - */ -export const Forbidden: CloseEvent = { - code: 4403, - reason: "Forbidden", -}; - -/** - * The server timed out waiting for the request. - */ -export const ConnectionTimeout: CloseEvent = { - code: 4408, - reason: "Connection Timeout", -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/SkipFurtherHooksError.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/SkipFurtherHooksError.ts deleted file mode 100644 index 20efb53..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/SkipFurtherHooksError.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class SkipFurtherHooksError extends Error { - constructor(message?: string) { - super(message ?? "Further hooks skipped"); - this.name = "SkipFurtherHooksError"; - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/auth.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/auth.ts deleted file mode 100644 index d62dfc6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/auth.ts +++ /dev/null @@ -1,62 +0,0 @@ -import * as encoding from "lib0/encoding"; -import * as decoding from "lib0/decoding"; -import type {AuthorizedScope} from "../../provider/src" - -export enum AuthMessageType { - Token = 0, - PermissionDenied = 1, - Authenticated = 2, -} - -export const writeAuthentication = ( - encoder: encoding.Encoder, - auth: string, -) => { - encoding.writeVarUint(encoder, AuthMessageType.Token); - encoding.writeVarString(encoder, auth); -}; - -export const writePermissionDenied = ( - encoder: encoding.Encoder, - reason: string, -) => { - encoding.writeVarUint(encoder, AuthMessageType.PermissionDenied); - encoding.writeVarString(encoder, reason); -}; - -export const writeAuthenticated = ( - encoder: encoding.Encoder, - scope: AuthorizedScope, -) => { - encoding.writeVarUint(encoder, AuthMessageType.Authenticated); - encoding.writeVarString(encoder, scope); -}; - -export const writeTokenSyncRequest = ( - encoder: encoding.Encoder, -) => { - encoding.writeVarUint(encoder, AuthMessageType.Token); -}; - -export const readAuthMessage = ( - decoder: decoding.Decoder, - sendToken: () => void, - permissionDeniedHandler: (reason: string) => void, - authenticatedHandler: (scope: string) => void, -) => { - switch (decoding.readVarUint(decoder)) { - case AuthMessageType.Token: { - sendToken(); - break; - } - case AuthMessageType.PermissionDenied: { - permissionDeniedHandler(decoding.readVarString(decoder)); - break; - } - case AuthMessageType.Authenticated: { - authenticatedHandler(decoding.readVarString(decoder)); - break; - } - default: - } -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/awarenessStatesToArray.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/awarenessStatesToArray.ts deleted file mode 100644 index 6ddf756..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/awarenessStatesToArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const awarenessStatesToArray = ( - states: Map>, -) => { - return Array.from(states.entries()).map(([key, value]) => { - return { - clientId: key, - ...value, - }; - }); -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/index.ts deleted file mode 100644 index 27be2d6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from "./auth.ts"; -export * from "./CloseEvents.ts"; -export * from "./awarenessStatesToArray.ts"; -export * from "./routingKey.ts"; -export * from "./SkipFurtherHooksError.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/routingKey.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/routingKey.ts deleted file mode 100644 index b9bb422..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/routingKey.ts +++ /dev/null @@ -1,11 +0,0 @@ -const SEPARATOR = '\0'; - -export function makeRoutingKey(documentName: string, sessionId: string): string { - return documentName + SEPARATOR + sessionId; -} - -export function parseRoutingKey(key: string): { documentName: string; sessionId: string | null } { - const idx = key.indexOf(SEPARATOR); - if (idx === -1) return { documentName: key, sessionId: null }; - return { documentName: key.substring(0, idx), sessionId: key.substring(idx + 1) }; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/types.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/types.ts deleted file mode 100644 index 76e79fc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common/src/types.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * State of the WebSocket connection. - * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState - */ -export enum WsReadyStates { - Connecting = 0, - Open = 1, - Closing = 2, - Closed = 3, -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/lib0 b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/lib0 deleted file mode 120000 index e2cfd65..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+common@4.1.0/node_modules/lib0 +++ /dev/null @@ -1 +0,0 @@ -../../lib0@0.2.117/node_modules/lib0 \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/README.md b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/README.md deleted file mode 100644 index d186c3a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# @hocuspocus/extension-database -[![Version](https://img.shields.io/npm/v/@hocuspocus/extension-database.svg?label=version)](https://www.npmjs.com/package/@hocuspocus/extension-database) -[![Downloads](https://img.shields.io/npm/dm/@hocuspocus/extension-database.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@hocuspocus/extension-database.svg)](https://www.npmjs.com/package/@hocuspocus/extension-database) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction -Hocuspocus is an opinionated collaborative editing backend for [Tiptap](https://github.com/ueberdosis/tiptap) – based on [Y.js](https://github.com/yjs/yjs), a CRDT framework with a powerful abstraction of shared data. - -## Official Documentation -Documentation can be found in the [GitHub repository](https://github.com/ueberdosis/hocuspocus). - -## License -Hocuspocus is open-sourced software licensed under the [MIT license](https://github.com/ueberdosis/hocuspocus/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.cjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.cjs deleted file mode 100644 index beaa1c6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.cjs +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -var Y = require('yjs'); - -function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n.default = e; - return Object.freeze(n); -} - -var Y__namespace = /*#__PURE__*/_interopNamespaceDefault(Y); - -class Database { - /** - * Constructor - */ - constructor(configuration) { - /** - * Default configuration - */ - this.configuration = { - fetch: async () => null, - store: async () => { }, - }; - this.configuration = { - ...this.configuration, - ...configuration, - }; - } - /** - * Get stored data from the database. - */ - async onLoadDocument(data) { - const update = await this.configuration.fetch(data); - if (update) { - Y__namespace.applyUpdate(data.document, update); - } - } - /** - * Store new updates in the database. - */ - async onStoreDocument(data) { - await this.configuration.store({ - ...data, - state: Buffer.from(Y__namespace.encodeStateAsUpdate(data.document)), - }); - } -} - -exports.Database = Database; -//# sourceMappingURL=hocuspocus-database.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.cjs.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.cjs.map deleted file mode 100644 index 006727a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-database.cjs","sources":["../src/Database.ts"],"sourcesContent":[null],"names":["Y"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MAqBa,QAAQ,CAAA;AASpB;;AAEG;AACH,IAAA,WAAA,CAAY,aAA6C,EAAA;AAXzD;;AAEG;AACH,QAAA,IAAA,CAAA,aAAa,GAA0B;AACtC,YAAA,KAAK,EAAE,YAAY,IAAI;AACvB,YAAA,KAAK,EAAE,eAAc;SACrB;QAMA,IAAI,CAAC,aAAa,GAAG;YACpB,GAAG,IAAI,CAAC,aAAa;AACrB,YAAA,GAAG,aAAa;SAChB;;AAGF;;AAEG;IACH,MAAM,cAAc,CAAC,IAA2B,EAAA;QAC/C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC;QAEnD,IAAI,MAAM,EAAE;YACXA,YAAC,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC;;;AAItC;;AAEG;IACH,MAAM,eAAe,CAAC,IAAqB,EAAA;AAC1C,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;AAC9B,YAAA,GAAG,IAAI;AACP,YAAA,KAAK,EAAE,MAAM,CAAC,IAAI,CAACA,YAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACxD,SAAA,CAAC;;AAEH;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.esm.js b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.esm.js deleted file mode 100644 index 7115e78..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.esm.js +++ /dev/null @@ -1,41 +0,0 @@ -import * as Y from 'yjs'; - -class Database { - /** - * Constructor - */ - constructor(configuration) { - /** - * Default configuration - */ - this.configuration = { - fetch: async () => null, - store: async () => { }, - }; - this.configuration = { - ...this.configuration, - ...configuration, - }; - } - /** - * Get stored data from the database. - */ - async onLoadDocument(data) { - const update = await this.configuration.fetch(data); - if (update) { - Y.applyUpdate(data.document, update); - } - } - /** - * Store new updates in the database. - */ - async onStoreDocument(data) { - await this.configuration.store({ - ...data, - state: Buffer.from(Y.encodeStateAsUpdate(data.document)), - }); - } -} - -export { Database }; -//# sourceMappingURL=hocuspocus-database.esm.js.map diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.esm.js.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.esm.js.map deleted file mode 100644 index ffbe078..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/hocuspocus-database.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-database.esm.js","sources":["../src/Database.ts"],"sourcesContent":[null],"names":[],"mappings":";;MAqBa,QAAQ,CAAA;AASpB;;AAEG;AACH,IAAA,WAAA,CAAY,aAA6C,EAAA;AAXzD;;AAEG;AACH,QAAA,IAAA,CAAA,aAAa,GAA0B;AACtC,YAAA,KAAK,EAAE,YAAY,IAAI;AACvB,YAAA,KAAK,EAAE,eAAc;SACrB;QAMA,IAAI,CAAC,aAAa,GAAG;YACpB,GAAG,IAAI,CAAC,aAAa;AACrB,YAAA,GAAG,aAAa;SAChB;;AAGF;;AAEG;IACH,MAAM,cAAc,CAAC,IAA2B,EAAA;QAC/C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC;QAEnD,IAAI,MAAM,EAAE;YACX,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC;;;AAItC;;AAEG;IACH,MAAM,eAAe,CAAC,IAAqB,EAAA;AAC1C,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;AAC9B,YAAA,GAAG,IAAI;AACP,YAAA,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACxD,SAAA,CAAC;;AAEH;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/model/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/model/index.d.ts deleted file mode 100644 index 149a810..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/model/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-model'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/state/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/state/index.d.ts deleted file mode 100644 index 455a4db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/state/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-state'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/transform/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/transform/index.d.ts deleted file mode 100644 index 0b4f8de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/transform/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-transform'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/view/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/view/index.d.ts deleted file mode 100644 index 8b3c631..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/node_modules/@tiptap/pm/view/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-view'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/CloseEvents.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/CloseEvents.d.ts deleted file mode 100644 index 1f397a5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/CloseEvents.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface CloseEvent { - code: number; - reason: string; -} -/** - * The server is terminating the connection because a data frame was received - * that is too large. - * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code - */ -export declare const MessageTooBig: CloseEvent; -/** - * The server successfully processed the request, asks that the requester reset - * its document view, and is not returning any content. - */ -export declare const ResetConnection: CloseEvent; -/** - * Similar to Forbidden, but specifically for use when authentication is required and has - * failed or has not yet been provided. - */ -export declare const Unauthorized: CloseEvent; -/** - * The request contained valid data and was understood by the server, but the server - * is refusing action. - */ -export declare const Forbidden: CloseEvent; -/** - * The server timed out waiting for the request. - */ -export declare const ConnectionTimeout: CloseEvent; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/auth.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/auth.d.ts deleted file mode 100644 index fa5c56c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/auth.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as encoding from "lib0/encoding"; -import * as decoding from "lib0/decoding"; -import type { AuthorizedScope } from "../../provider/src"; -export declare enum AuthMessageType { - Token = 0, - PermissionDenied = 1, - Authenticated = 2 -} -export declare const writeAuthentication: (encoder: encoding.Encoder, auth: string) => void; -export declare const writePermissionDenied: (encoder: encoding.Encoder, reason: string) => void; -export declare const writeAuthenticated: (encoder: encoding.Encoder, scope: AuthorizedScope) => void; -export declare const writeTokenSyncRequest: (encoder: encoding.Encoder) => void; -export declare const readAuthMessage: (decoder: decoding.Decoder, sendToken: () => void, permissionDeniedHandler: (reason: string) => void, authenticatedHandler: (scope: string) => void) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/awarenessStatesToArray.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/awarenessStatesToArray.d.ts deleted file mode 100644 index 81db4ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/awarenessStatesToArray.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const awarenessStatesToArray: (states: Map>) => { - clientId: number; -}[]; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/index.d.ts deleted file mode 100644 index 8a730fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./auth.ts"; -export * from "./CloseEvents.ts"; -export * from "./awarenessStatesToArray.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/types.d.ts deleted file mode 100644 index 3672009..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/common/src/types.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * State of the WebSocket connection. - * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState - */ -export declare enum WsReadyStates { - Connecting = 0, - Open = 1, - Closing = 2, - Closed = 3 -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-database/src/Database.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-database/src/Database.d.ts deleted file mode 100644 index 123c8d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-database/src/Database.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Extension, onChangePayload, onLoadDocumentPayload, storePayload, fetchPayload } from "@hocuspocus/server"; -export interface DatabaseConfiguration { - /** - * Pass a Promise to retrieve updates from your database. The Promise should resolve to - * an array of items with Y.js-compatible binary data. - */ - fetch: (data: fetchPayload) => Promise; - /** - * Pass a function to store updates in your database. - */ - store: (data: storePayload) => Promise; -} -export declare class Database implements Extension { - /** - * Default configuration - */ - configuration: DatabaseConfiguration; - /** - * Constructor - */ - constructor(configuration: Partial); - /** - * Get stored data from the database. - */ - onLoadDocument(data: onLoadDocumentPayload): Promise; - /** - * Store new updates in the database. - */ - onStoreDocument(data: onChangePayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-database/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-database/src/index.d.ts deleted file mode 100644 index cca6903..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-database/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Database.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-logger/src/Logger.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-logger/src/Logger.d.ts deleted file mode 100644 index 7d601c8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-logger/src/Logger.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onLoadDocumentPayload, onDestroyPayload, onDisconnectPayload, onRequestPayload, onUpgradePayload } from "@hocuspocus/server"; -export interface LoggerConfiguration { - /** - * Prepend all logging message with a string. - * - * @deprecated - */ - prefix: null | string; - /** - * Whether to log something for the `onLoadDocument` hook. - */ - onLoadDocument: boolean; - /** - * Whether to log something for the `onChange` hook. - */ - onChange: boolean; - /** - * Whether to log something for the `onStoreDocument` hook. - */ - onStoreDocument: boolean; - /** - * Whether to log something for the `onConnect` hook. - */ - onConnect: boolean; - /** - * Whether to log something for the `onDisconnect` hook. - */ - onDisconnect: boolean; - /** - * Whether to log something for the `onUpgrade` hook. - */ - onUpgrade: boolean; - /** - * Whether to log something for the `onRequest` hook. - */ - onRequest: boolean; - /** - * Whether to log something for the `onDestroy` hook. - */ - onDestroy: boolean; - /** - * Whether to log something for the `onConfigure` hook. - */ - onConfigure: boolean; - /** - * A log function, if none is provided output will go to console - */ - log: (...args: any[]) => void; -} -export declare class Logger implements Extension { - name: string | null; - configuration: LoggerConfiguration; - /** - * Constructor - */ - constructor(configuration?: Partial); - onConfigure(data: onConfigurePayload): Promise; - onLoadDocument(data: onLoadDocumentPayload): Promise; - onChange(data: onChangePayload): Promise; - onStoreDocument(data: onDisconnectPayload): Promise; - onConnect(data: onConnectPayload): Promise; - onDisconnect(data: onDisconnectPayload): Promise; - onUpgrade(data: onUpgradePayload): Promise; - onRequest(data: onRequestPayload): Promise; - onDestroy(data: onDestroyPayload): Promise; - private log; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-logger/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-logger/src/index.d.ts deleted file mode 100644 index 9a59b0a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-logger/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Logger.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-redis/src/Redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-redis/src/Redis.d.ts deleted file mode 100644 index 78dc013..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-redis/src/Redis.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import type { Extension, Hocuspocus, afterLoadDocumentPayload, afterStoreDocumentPayload, afterUnloadDocumentPayload, beforeBroadcastStatelessPayload, beforeUnloadDocumentPayload, onAwarenessUpdatePayload, onChangePayload, onConfigurePayload, onStoreDocumentPayload } from "@hocuspocus/server"; -import { type ExecutionResult, type Lock, Redlock } from "@sesamecare-oss/redlock"; -import type { Cluster, ClusterNode, ClusterOptions, RedisOptions } from "ioredis"; -import RedisClient from "ioredis"; -export type RedisInstance = RedisClient | Cluster; -export interface Configuration { - /** - * Redis port - */ - port: number; - /** - * Redis host - */ - host: string; - /** - * Redis Cluster - */ - nodes?: ClusterNode[]; - /** - * Duplicate from an existed Redis instance - */ - redis?: RedisInstance; - /** - * Redis instance creator - */ - createClient?: () => RedisInstance; - /** - * Options passed directly to Redis constructor - * - * https://github.com/luin/ioredis/blob/master/API.md#new-redisport-host-options - */ - options?: ClusterOptions | RedisOptions; - /** - * An unique instance name, required to filter messages in Redis. - * If none is provided an unique id is generated. - */ - identifier: string; - /** - * Namespace for Redis keys, if none is provided 'hocuspocus' is used - */ - prefix: string; - /** - * The maximum time for the Redis lock in ms (in case it can’t be released). - */ - lockTimeout: number; - /** - * A delay before onDisconnect is executed. This allows last minute updates' - * sync messages to be received by the subscription before it's closed. - */ - disconnectDelay: number; -} -export declare class Redis implements Extension { - /** - * Make sure to give that extension a higher priority, so - * the `onStoreDocument` hook is able to intercept the chain, - * before documents are stored to the database. - */ - priority: number; - configuration: Configuration; - redisTransactionOrigin: string; - pub: RedisInstance; - sub: RedisInstance; - instance: Hocuspocus; - redlock: Redlock; - locks: Map; - }>; - messagePrefix: Buffer; - private pendingAfterStoreDocumentResolves; - constructor(configuration: Partial); - onConfigure({ instance }: onConfigurePayload): Promise; - private getKey; - private pubKey; - private subKey; - private lockKey; - private encodeMessage; - private decodeMessage; - /** - * Once a document is loaded, subscribe to the channel in Redis. - */ - afterLoadDocument({ documentName, document, }: afterLoadDocumentPayload): Promise; - /** - * Publish the first sync step through Redis. - */ - private publishFirstSyncStep; - /** - * Let’s ask Redis who is connected already. - */ - private requestAwarenessFromOtherInstances; - /** - * Before the document is stored, make sure to set a lock in Redis. - * That’s meant to avoid conflicts with other instances trying to store the document. - */ - onStoreDocument({ documentName }: onStoreDocumentPayload): Promise; - /** - * Release the Redis lock, so other instances can store documents. - */ - afterStoreDocument({ documentName, socketId, }: afterStoreDocumentPayload): Promise; - /** - * Handle awareness update messages received directly by this Hocuspocus instance. - */ - onAwarenessUpdate({ documentName, awareness, added, updated, removed, document, }: onAwarenessUpdatePayload): Promise; - /** - * Handle incoming messages published on subscribed document channels. - * Note that this will also include messages from ourselves as it is not possible - * in Redis to filter these. - */ - private handleIncomingMessage; - /** - * if the ydoc changed, we'll need to inform other Hocuspocus servers about it. - */ - onChange(data: onChangePayload): Promise; - /** - * Delay unloading to allow syncs to finish - */ - beforeUnloadDocument(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument(data: afterUnloadDocumentPayload): Promise; - beforeBroadcastStateless(data: beforeBroadcastStatelessPayload): Promise; - /** - * Kill the Redlock connection immediately. - */ - onDestroy(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-redis/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-redis/src/index.d.ts deleted file mode 100644 index 6c9d48a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-redis/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Redis.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-s3/src/S3.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-s3/src/S3.d.ts deleted file mode 100644 index 4d2da25..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-s3/src/S3.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { DatabaseConfiguration } from "@hocuspocus/extension-database"; -import { Database } from "@hocuspocus/extension-database"; -import { S3Client } from "@aws-sdk/client-s3"; -export interface S3Configuration extends DatabaseConfiguration { - /** - * AWS S3 region - */ - region?: string; - /** - * S3 bucket name - */ - bucket: string; - /** - * S3 key prefix for documents (optional) - */ - prefix?: string; - /** - * AWS credentials - */ - credentials?: { - accessKeyId: string; - secretAccessKey: string; - }; - /** - * S3 endpoint URL (for S3-compatible services like MinIO) - */ - endpoint?: string; - /** - * Force path style URLs (required for MinIO) - */ - forcePathStyle?: boolean; - /** - * Custom S3 client - */ - s3Client?: S3Client; -} -export declare class S3 extends Database { - private s3Client?; - configuration: S3Configuration; - constructor(configuration: Partial); - private getObjectKey; - onConfigure(): Promise; - onListen(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-s3/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-s3/src/index.d.ts deleted file mode 100644 index f782642..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-s3/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./S3.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-sqlite/src/SQLite.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-sqlite/src/SQLite.d.ts deleted file mode 100644 index 432a370..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-sqlite/src/SQLite.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { DatabaseConfiguration } from "@hocuspocus/extension-database"; -import { Database } from "@hocuspocus/extension-database"; -import sqlite3 from "sqlite3"; -export declare const schema = "CREATE TABLE IF NOT EXISTS \"documents\" (\n \"name\" varchar(255) NOT NULL,\n \"data\" blob NOT NULL,\n UNIQUE(name)\n)"; -export declare const selectQuery = "\n SELECT data FROM \"documents\" WHERE name = $name ORDER BY rowid DESC\n"; -export declare const upsertQuery = "\n INSERT INTO \"documents\" (\"name\", \"data\") VALUES ($name, $data)\n ON CONFLICT(name) DO UPDATE SET data = $data\n"; -export interface SQLiteConfiguration extends DatabaseConfiguration { - /** - * Valid values are filenames, ":memory:" for an anonymous in-memory database and an empty - * string for an anonymous disk-based database. Anonymous databases are not persisted and - * when closing the database handle, their contents are lost. - * - * https://github.com/mapbox/node-sqlite3/wiki/API#new-sqlite3databasefilename-mode-callback - */ - database: string; - /** - * The database schema to create. - */ - schema: string; -} -export declare class SQLite extends Database { - db?: sqlite3.Database; - configuration: SQLiteConfiguration; - constructor(configuration?: Partial); - onConfigure(): Promise; - onListen(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-sqlite/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-sqlite/src/index.d.ts deleted file mode 100644 index 8013efb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-sqlite/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./SQLite.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-throttle/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-throttle/src/index.d.ts deleted file mode 100644 index 0917d14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-throttle/src/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Extension, onConnectPayload } from "@hocuspocus/server"; -export interface ThrottleConfiguration { - throttle: number | null | false; - consideredSeconds: number; - banTime: number; - cleanupInterval: number; -} -export declare class Throttle implements Extension { - configuration: ThrottleConfiguration; - connectionsByIp: Map>; - bannedIps: Map; - cleanupInterval?: NodeJS.Timeout; - /** - * Constructor - */ - constructor(configuration?: Partial); - onDestroy(): Promise; - clearMaps(): void; - isBanned(ip: string): boolean; - /** - * Throttle requests - * @private - */ - private throttle; - /** - * onConnect hook - * @param data - */ - onConnect(data: onConnectPayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-webhook/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-webhook/src/index.d.ts deleted file mode 100644 index 2cc3456..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/extension-webhook/src/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { Extension, onChangePayload, onConnectPayload, onDisconnectPayload, onLoadDocumentPayload } from "@hocuspocus/server"; -import type { Transformer } from "@hocuspocus/transformer"; -import type { Doc } from "yjs"; -export declare enum Events { - onChange = "change", - onConnect = "connect", - onCreate = "create", - onDisconnect = "disconnect" -} -export interface Configuration { - debounce: number | false | null; - debounceMaxWait: number; - secret: string; - transformer: Transformer | { - toYdoc: (document: any) => Doc; - fromYdoc: (document: Doc) => any; - }; - url: string; - events: Array; -} -export declare class Webhook implements Extension { - configuration: Configuration; - debounced: Map; - /** - * Constructor - */ - constructor(configuration?: Partial); - /** - * Create a signature for the response body - */ - createSignature(body: string): string; - /** - * debounce the given function, using the given identifier - */ - debounce(id: string, func: Function): void; - /** - * Send a request to the given url containing the given data - */ - sendRequest(event: Events, payload: any): Promise>; - /** - * onChange hook - */ - onChange(data: onChangePayload): Promise; - /** - * onLoadDocument hook - */ - onLoadDocument(data: onLoadDocumentPayload): Promise; - /** - * onConnect hook - */ - onConnect(data: onConnectPayload): Promise; - onDisconnect(data: onDisconnectPayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/EventEmitter.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/EventEmitter.d.ts deleted file mode 100644 index df6b04e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/EventEmitter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default class EventEmitter { - callbacks: { - [key: string]: Function[]; - }; - on(event: string, fn: Function): this; - protected emit(event: string, ...args: any): this; - off(event: string, fn?: Function): this; - removeAllListeners(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/HocuspocusProvider.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/HocuspocusProvider.d.ts deleted file mode 100644 index 5f503fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/HocuspocusProvider.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -import type { Event, MessageEvent } from "ws"; -import { Awareness } from "y-protocols/awareness"; -import * as Y from "yjs"; -import EventEmitter from "./EventEmitter.ts"; -import type { CompleteHocuspocusProviderWebsocketConfiguration } from "./HocuspocusProviderWebsocket.ts"; -import { HocuspocusProviderWebsocket } from "./HocuspocusProviderWebsocket.ts"; -import type { AuthorizedScope, ConstructableOutgoingMessage, onAuthenticatedParameters, onAuthenticationFailedParameters, onAwarenessChangeParameters, onAwarenessUpdateParameters, onCloseParameters, onDisconnectParameters, onMessageParameters, onOpenParameters, onOutgoingMessageParameters, onStatelessParameters, onStatusParameters, onSyncedParameters, onUnsyncedChangesParameters } from "./types.ts"; -export type HocuspocusProviderConfiguration = Required> & Partial & ((Required> & Partial>) | Required>); -export interface CompleteHocuspocusProviderConfiguration { - /** - * The identifier/name of your document - */ - name: string; - /** - * The actual Y.js document - */ - document: Y.Doc; - /** - * An Awareness instance to keep the presence state of all clients. - * - * You can disable sharing awareness information by passing `null`. - * Note that having no awareness information shared across all connections will break our ping checks - * and thus trigger reconnects. You should always have at least one Provider with enabled awareness per - * socket connection, or ensure that the Provider receives messages before running into `HocuspocusProviderWebsocket.messageReconnectTimeout`. - */ - awareness: Awareness | null; - /** - * A token that’s sent to the backend for authentication purposes. - */ - token: string | (() => string) | (() => Promise) | null; - /** - * Hocuspocus websocket provider - */ - websocketProvider: HocuspocusProviderWebsocket; - /** - * Force syncing the document in the defined interval. - */ - forceSyncInterval: false | number; - onAuthenticated: (data: onAuthenticatedParameters) => void; - onAuthenticationFailed: (data: onAuthenticationFailedParameters) => void; - onOpen: (data: onOpenParameters) => void; - onConnect: () => void; - onStatus: (data: onStatusParameters) => void; - onMessage: (data: onMessageParameters) => void; - onOutgoingMessage: (data: onOutgoingMessageParameters) => void; - onSynced: (data: onSyncedParameters) => void; - onDisconnect: (data: onDisconnectParameters) => void; - onClose: (data: onCloseParameters) => void; - onDestroy: () => void; - onAwarenessUpdate: (data: onAwarenessUpdateParameters) => void; - onAwarenessChange: (data: onAwarenessChangeParameters) => void; - onStateless: (data: onStatelessParameters) => void; - onUnsyncedChanges: (data: onUnsyncedChangesParameters) => void; -} -export declare class AwarenessError extends Error { - code: number; -} -export declare class HocuspocusProvider extends EventEmitter { - configuration: CompleteHocuspocusProviderConfiguration; - isSynced: boolean; - unsyncedChanges: number; - isAuthenticated: boolean; - authorizedScope: AuthorizedScope | undefined; - manageSocket: boolean; - private _isAttached; - intervals: any; - constructor(configuration: HocuspocusProviderConfiguration); - boundDocumentUpdateHandler: (update: Uint8Array, origin: any) => void; - boundAwarenessUpdateHandler: ({ added, updated, removed }: any, origin: any) => void; - boundPageHide: () => void; - boundOnOpen: (event: Event) => Promise; - boundOnClose: () => void; - forwardConnect: () => this; - forwardStatus: (e: onStatusParameters) => this; - forwardClose: (e: onCloseParameters) => this; - forwardDisconnect: (e: onDisconnectParameters) => this; - forwardDestroy: () => this; - setConfiguration(configuration?: Partial): void; - get document(): Y.Doc; - get isAttached(): boolean; - get awareness(): Awareness | null; - get hasUnsyncedChanges(): boolean; - private resetUnsyncedChanges; - incrementUnsyncedChanges(): void; - decrementUnsyncedChanges(): void; - forceSync(): void; - pageHide(): void; - registerEventListeners(): void; - sendStateless(payload: string): void; - sendToken(): Promise; - documentUpdateHandler(update: Uint8Array, origin: any): void; - awarenessUpdateHandler({ added, updated, removed }: any, origin: any): void; - /** - * Indicates whether a first handshake with the server has been established - * - * Note: this does not mean all updates from the client have been persisted to the backend. For this, - * use `hasUnsyncedChanges`. - */ - get synced(): boolean; - set synced(state: boolean); - receiveStateless(payload: string): void; - connect(): Promise; - disconnect(): void; - onOpen(event: Event): Promise; - getToken(): Promise; - startSync(): void; - send(message: ConstructableOutgoingMessage, args: any): void; - onMessage(event: MessageEvent): void; - onClose(): void; - destroy(): void; - detach(): void; - attach(): void; - permissionDeniedHandler(reason: string): void; - authenticatedHandler(scope: string): void; - setAwarenessField(key: string, value: any): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts deleted file mode 100644 index 9f5a1da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -import type { Event, MessageEvent } from "ws"; -import EventEmitter from "./EventEmitter.ts"; -import type { HocuspocusProvider } from "./HocuspocusProvider.ts"; -import { WebSocketStatus, type onAwarenessChangeParameters, type onAwarenessUpdateParameters, type onCloseParameters, type onDisconnectParameters, type onMessageParameters, type onOpenParameters, type onOutgoingMessageParameters, type onStatusParameters } from "./types.ts"; -export type HocuspocusWebSocket = WebSocket & { - identifier: string; -}; -export type HocusPocusWebSocket = HocuspocusWebSocket; -export type HocuspocusProviderWebsocketConfiguration = Required> & Partial; -export interface CompleteHocuspocusProviderWebsocketConfiguration { - /** - * Whether to connect automatically when creating the provider instance. Default=true - */ - autoConnect: boolean; - /** - * URL of your @hocuspocus/server instance - */ - url: string; - /** - * By default, trailing slashes are removed from the URL. Set this to true - * to preserve trailing slashes if your server configuration requires them. - */ - preserveTrailingSlash: boolean; - /** - * An optional WebSocket polyfill, for example for Node.js - */ - WebSocketPolyfill: any; - /** - * Disconnect when no message is received for the defined amount of milliseconds. - */ - messageReconnectTimeout: number; - /** - * The delay between each attempt in milliseconds. You can provide a factor to have the delay grow exponentially. - */ - delay: number; - /** - * The initialDelay is the amount of time to wait before making the first attempt. This option should typically be 0 since you typically want the first attempt to happen immediately. - */ - initialDelay: number; - /** - * The factor option is used to grow the delay exponentially. - */ - factor: number; - /** - * The maximum number of attempts or 0 if there is no limit on number of attempts. - */ - maxAttempts: number; - /** - * minDelay is used to set a lower bound of delay when jitter is enabled. This property has no effect if jitter is disabled. - */ - minDelay: number; - /** - * The maxDelay option is used to set an upper bound for the delay when factor is enabled. A value of 0 can be provided if there should be no upper bound when calculating delay. - */ - maxDelay: number; - /** - * If jitter is true then the calculated delay will be a random integer value between minDelay and the calculated delay for the current iteration. - */ - jitter: boolean; - /** - * A timeout in milliseconds. If timeout is non-zero then a timer is set using setTimeout. If the timeout is triggered then future attempts will be aborted. - */ - timeout: number; - handleTimeout: (() => Promise) | null; - onOpen: (data: onOpenParameters) => void; - onConnect: () => void; - onMessage: (data: onMessageParameters) => void; - onOutgoingMessage: (data: onOutgoingMessageParameters) => void; - onStatus: (data: onStatusParameters) => void; - onDisconnect: (data: onDisconnectParameters) => void; - onClose: (data: onCloseParameters) => void; - onDestroy: () => void; - onAwarenessUpdate: (data: onAwarenessUpdateParameters) => void; - onAwarenessChange: (data: onAwarenessChangeParameters) => void; - /** - * Map of attached providers keyed by documentName. - */ - providerMap: Map; -} -export declare class HocuspocusProviderWebsocket extends EventEmitter { - private messageQueue; - configuration: CompleteHocuspocusProviderWebsocketConfiguration; - webSocket: HocusPocusWebSocket | null; - webSocketHandlers: { - [key: string]: any; - }; - shouldConnect: boolean; - status: WebSocketStatus; - lastMessageReceived: number; - identifier: number; - intervals: any; - connectionAttempt: { - resolve: (value?: any) => void; - reject: (reason?: any) => void; - } | null; - constructor(configuration: HocuspocusProviderWebsocketConfiguration); - receivedOnOpenPayload?: Event | undefined; - onOpen(event: Event): Promise; - attach(provider: HocuspocusProvider): void; - detach(provider: HocuspocusProvider): void; - setConfiguration(configuration?: Partial): void; - cancelWebsocketRetry?: () => void; - connect(): Promise; - attachWebSocketListeners(ws: HocusPocusWebSocket, reject: Function): void; - cleanupWebSocket(): void; - createWebSocketConnection(): Promise; - onMessage(event: MessageEvent): void; - resolveConnectionAttempt(): void; - stopConnectionAttempt(): void; - rejectConnectionAttempt(): void; - closeTries: number; - checkConnection(): void; - get serverUrl(): string; - get url(): string; - disconnect(): void; - send(message: any): void; - onClose({ event }: onCloseParameters): void; - destroy(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/IncomingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/IncomingMessage.d.ts deleted file mode 100644 index 8ce1ae6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/IncomingMessage.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import type { MessageType } from "./types.ts"; -export declare class IncomingMessage { - data: any; - encoder: Encoder; - decoder: Decoder; - constructor(data: any); - peekVarString(): string; - readVarUint(): MessageType; - readVarString(): string; - readVarUint8Array(): Uint8Array; - writeVarUint(type: MessageType): void; - writeVarString(string: string): void; - writeVarUint8Array(data: Uint8Array): void; - length(): number; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/MessageReceiver.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/MessageReceiver.d.ts deleted file mode 100644 index 06918ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/MessageReceiver.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { HocuspocusProvider } from "./HocuspocusProvider.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -export declare class MessageReceiver { - message: IncomingMessage; - constructor(message: IncomingMessage); - apply(provider: HocuspocusProvider, emitSynced: boolean): void; - private applySyncMessage; - applySyncStatusMessage(provider: HocuspocusProvider, applied: boolean): void; - private applyAwarenessMessage; - private applyAuthMessage; - private applyQueryAwarenessMessage; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/MessageSender.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/MessageSender.d.ts deleted file mode 100644 index 382772c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/MessageSender.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { ConstructableOutgoingMessage } from "./types.ts"; -export declare class MessageSender { - encoder: Encoder; - message: any; - constructor(Message: ConstructableOutgoingMessage, args?: any); - create(): Uint8Array; - send(webSocket: any): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessage.d.ts deleted file mode 100644 index 5b4db09..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { MessageType, OutgoingMessageArguments, OutgoingMessageInterface } from "./types.ts"; -export declare class OutgoingMessage implements OutgoingMessageInterface { - encoder: Encoder; - type?: MessageType; - constructor(); - get(args: Partial): Encoder | undefined; - toUint8Array(): Uint8Array; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts deleted file mode 100644 index 775990a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class AuthenticationMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts deleted file mode 100644 index b666f82..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class AwarenessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts deleted file mode 100644 index 7594c95..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class CloseMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts deleted file mode 100644 index eb37902..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class QueryAwarenessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts deleted file mode 100644 index 3349c73..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class StatelessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts deleted file mode 100644 index 55d1ea0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class SyncStepOneMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts deleted file mode 100644 index fa39f24..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class SyncStepTwoMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts deleted file mode 100644 index 3d5b4f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class UpdateMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/index.d.ts deleted file mode 100644 index c54d369..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./HocuspocusProvider.ts"; -export * from "./HocuspocusProviderWebsocket.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/types.d.ts deleted file mode 100644 index 3ef91a2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/provider/src/types.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { Event, MessageEvent } from "ws"; -import type { Awareness } from "y-protocols/awareness"; -import type * as Y from "yjs"; -import type { CloseEvent } from "@hocuspocus/common"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -import type { OutgoingMessage } from "./OutgoingMessage.ts"; -import type { AuthenticationMessage } from "./OutgoingMessages/AuthenticationMessage.ts"; -import type { AwarenessMessage } from "./OutgoingMessages/AwarenessMessage.ts"; -import type { QueryAwarenessMessage } from "./OutgoingMessages/QueryAwarenessMessage.ts"; -import type { SyncStepOneMessage } from "./OutgoingMessages/SyncStepOneMessage.ts"; -import type { SyncStepTwoMessage } from "./OutgoingMessages/SyncStepTwoMessage.ts"; -import type { UpdateMessage } from "./OutgoingMessages/UpdateMessage.ts"; -export declare enum MessageType { - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - Stateless = 5, - CLOSE = 7, - SyncStatus = 8 -} -export declare enum WebSocketStatus { - Connecting = "connecting", - Connected = "connected", - Disconnected = "disconnected" -} -export type AuthorizedScope = "read-write" | "readonly"; -export interface OutgoingMessageInterface { - encoder: Encoder; - type?: MessageType; -} -export interface OutgoingMessageArguments { - documentName: string; - token: string; - document: Y.Doc; - awareness: Awareness; - clients: number[]; - states: Map; - update: any; - payload: string; - encoder: Encoder; -} -export interface Constructable { - new (...args: any): T; -} -export type ConstructableOutgoingMessage = Constructable | Constructable | Constructable | Constructable | Constructable | Constructable; -export type onAuthenticationFailedParameters = { - reason: string; -}; -export type onAuthenticatedParameters = { - scope: AuthorizedScope; -}; -export type onOpenParameters = { - event: Event; -}; -export type onMessageParameters = { - event: MessageEvent; - message: IncomingMessage; -}; -export type onOutgoingMessageParameters = { - message: OutgoingMessage; -}; -export type onStatusParameters = { - status: WebSocketStatus; -}; -export type onSyncedParameters = { - state: boolean; -}; -export type onUnsyncedChangesParameters = { - number: number; -}; -export type onDisconnectParameters = { - event: CloseEvent; -}; -export type onCloseParameters = { - event: CloseEvent; -}; -export type onAwarenessUpdateParameters = { - states: StatesArray; -}; -export type onAwarenessChangeParameters = { - states: StatesArray; -}; -export type onStatelessParameters = { - payload: string; -}; -export type StatesArray = { - clientId: number; - [key: string | number]: any; -}[]; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/ClientConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/ClientConnection.d.ts deleted file mode 100644 index 93bb471..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/ClientConnection.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import { type CloseEvent } from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { onDisconnectPayload } from "./types.ts"; -/** - * The `ClientConnection` class is responsible for handling an incoming WebSocket - * - * TODO-refactor: - * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts - */ -export declare class ClientConnection { - private readonly websocket; - private readonly request; - private readonly documentProvider; - private readonly hooks; - private readonly opts; - private readonly defaultContext; - private readonly documentConnections; - private readonly incomingMessageQueue; - private readonly documentConnectionsEstablished; - private readonly hookPayloads; - private readonly callbacks; - private readonly socketId; - timeout: number; - pingInterval: NodeJS.Timeout; - pongReceived: boolean; - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it’ll fully establish the connection and - * load the Document then. - */ - constructor(websocket: WebSocket, request: IncomingMessage, documentProvider: { - createDocument: Hocuspocus["createDocument"]; - }, hooks: Hocuspocus["hooks"], opts: { - timeout: number; - }, defaultContext?: any); - private handleWebsocketClose; - close(event?: CloseEvent): void; - handlePong: () => void; - /** - * Check if pong was received and close the connection otherwise - * @private - */ - private check; - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, payload: onDisconnectPayload) => void): ClientConnection; - /** - * Create a new connection by the given request and document - */ - private createConnection; - private setUpNewConnection; - private handleQueueingMessage; - private messageHandler; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Connection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Connection.d.ts deleted file mode 100644 index ca8fa8c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Connection.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { IncomingMessage as HTTPIncomingMessage } from "node:http"; -import { type CloseEvent } from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type Document from "./Document.ts"; -import type { beforeSyncPayload, onStatelessPayload } from "./types.ts"; -export declare class Connection { - webSocket: WebSocket; - context: any; - document: Document; - request: HTTPIncomingMessage; - callbacks: { - onClose: ((document: Document, event?: CloseEvent) => void)[]; - beforeHandleMessage: (connection: Connection, update: Uint8Array) => Promise; - beforeSync: (connection: Connection, payload: Pick) => Promise; - statelessCallback: (payload: onStatelessPayload) => Promise; - onTokenSyncCallback: (payload: { - token: string; - }) => Promise; - }; - socketId: string; - readOnly: boolean; - /** - * Constructor. - */ - constructor(connection: WebSocket, request: HTTPIncomingMessage, document: Document, socketId: string, context: any, readOnly?: boolean); - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, event?: CloseEvent) => void): Connection; - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback(callback: (payload: onStatelessPayload) => Promise): Connection; - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage(callback: (connection: Connection, update: Uint8Array) => Promise): Connection; - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync(callback: (connection: Connection, payload: Pick) => Promise): Connection; - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback(callback: (payload: { - token: string; - }) => Promise): Connection; - /** - * Send the given message - */ - send(message: any): void; - /** - * Send a stateless message with payload - */ - sendStateless(payload: string): void; - /** - * Request current token from the client - */ - requestToken(): void; - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event?: CloseEvent): void; - /** - * Send the current document awareness to the client, if any - * @private - */ - private sendCurrentAwareness; - /** - * Handle an incoming message - * @public - */ - handleMessage(data: Uint8Array): void; -} -export default Connection; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/DirectConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/DirectConnection.d.ts deleted file mode 100644 index a1be911..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/DirectConnection.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { DirectConnection as DirectConnectionInterface } from "./types.ts"; -export declare class DirectConnection implements DirectConnectionInterface { - document: Document | null; - instance: Hocuspocus; - context: any; - /** - * Constructor. - */ - constructor(document: Document, instance: Hocuspocus, context?: any); - transact(transaction: (document: Document) => void): Promise; - disconnect(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Document.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Document.d.ts deleted file mode 100644 index 57faea7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Document.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { Mutex } from "async-mutex"; -import type WebSocket from "ws"; -import { Awareness } from "y-protocols/awareness"; -import { Doc } from "yjs"; -import type Connection from "./Connection.ts"; -export declare class Document extends Doc { - awareness: Awareness; - callbacks: { - onUpdate: (document: Document, connection: Connection, update: Uint8Array) => void; - beforeBroadcastStateless: (document: Document, stateless: string) => void; - }; - connections: Map; - connection: Connection; - }>; - directConnectionsCount: number; - name: string; - isLoading: boolean; - isDestroyed: boolean; - saveMutex: Mutex; - lastChangeTime: number; - /** - * Constructor. - */ - constructor(name: string, yDocOptions?: object); - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName: string): boolean; - /** - * Merge the given document(s) into this one - */ - merge(documents: Doc | Array): Document; - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate(callback: (document: Document, connection: Connection, update: Uint8Array) => void): Document; - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless(callback: (document: Document, stateless: string) => void): Document; - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection: Connection): Document; - /** - * Is the given connection registered on this document - */ - hasConnection(connection: Connection): boolean; - /** - * Remove the given connection from this document - */ - removeConnection(connection: Connection): Document; - addDirectConnection(): Document; - removeDirectConnection(): Document; - /** - * Get the number of active connections for this document - */ - getConnectionsCount(): number; - /** - * Get an array of registered connections - */ - getConnections(): Array; - /** - * Get the client ids for the given connection instance - */ - getClients(connectionInstance: WebSocket): Set; - /** - * Has the document awareness states - */ - hasAwarenessStates(): boolean; - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection: Connection, update: Uint8Array): Document; - /** - * Handle an awareness update and sync changes to clients - * @private - */ - private handleAwarenessUpdate; - /** - * Handle an updated document and sync changes to clients - */ - private handleUpdate; - /** - * Broadcast stateless message to all connections - */ - broadcastStateless(payload: string, filter?: (conn: Connection) => boolean): void; - destroy(): void; -} -export default Document; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Hocuspocus.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Hocuspocus.d.ts deleted file mode 100644 index fa1684f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Hocuspocus.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import type WebSocket from "ws"; -import { DirectConnection } from "./DirectConnection.ts"; -import Document from "./Document.ts"; -import type { Server } from "./Server.ts"; -import type { Configuration, ConnectionConfiguration, HookName, HookPayloadByName, onStoreDocumentPayload } from "./types.ts"; -export declare const defaultConfiguration: { - name: null; - timeout: number; - debounce: number; - maxDebounce: number; - quiet: boolean; - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; - unloadImmediately: boolean; -}; -export declare class Hocuspocus { - configuration: Configuration; - loadingDocuments: Map>; - unloadingDocuments: Map>; - documents: Map; - server?: Server; - debouncer: { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; - }; - constructor(configuration?: Partial); - /** - * Configure Hocuspocus - */ - configure(configuration: Partial): Hocuspocus; - /** - * Get the total number of active documents - */ - getDocumentsCount(): number; - /** - * Get the total number of active connections - */ - getConnectionsCount(): number; - /** - * Force close one or more connections - */ - closeConnections(documentName?: string): void; - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it’ll fully establish the connection and - * load the Document then. - */ - handleConnection(incoming: WebSocket, request: IncomingMessage, defaultContext?: any): void; - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - private handleDocumentUpdate; - /** - * Create a new document by the given request - */ - createDocument(documentName: string, request: Partial>, socketId: string, connection: ConnectionConfiguration, context?: any): Promise; - loadDocument(documentName: string, request: Partial>, socketId: string, connectionConfig: ConnectionConfiguration, context?: any): Promise; - storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload, immediately?: boolean): Promise; - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - hooks(name: T, payload: HookPayloadByName[T], callback?: Function | null): Promise; - shouldUnloadDocument(document: Document): boolean; - unloadDocument(document: Document): Promise; - openDirectConnection(documentName: string, context?: any): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/IncomingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/IncomingMessage.d.ts deleted file mode 100644 index 639bbdf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/IncomingMessage.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import type { MessageType } from "./types.ts"; -export declare class IncomingMessage { - /** - * Access to the received message. - */ - decoder: Decoder; - /** - * Private encoder; can be undefined. - * - * Lazy creation of the encoder speeds up IncomingMessages that need only a decoder. - */ - private encoderInternal?; - constructor(input: any); - get encoder(): Encoder; - readVarUint8Array(): Uint8Array; - peekVarUint8Array(): Uint8Array; - readVarUint(): number; - readVarString(): string; - toUint8Array(): Uint8Array; - writeVarUint(type: MessageType): void; - writeVarString(string: string): void; - get length(): number; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/MessageReceiver.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/MessageReceiver.d.ts deleted file mode 100644 index 6d864ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/MessageReceiver.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -export declare class MessageReceiver { - message: IncomingMessage; - defaultTransactionOrigin?: string; - constructor(message: IncomingMessage, defaultTransactionOrigin?: string); - apply(document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): void; - readSyncMessage(message: IncomingMessage, document: Document, connection?: Connection, reply?: (message: Uint8Array) => void, requestFirstSync?: boolean): 0 | 2 | 1; - applyQueryAwarenessMessage(document: Document, reply?: (message: Uint8Array) => void): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/OutgoingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/OutgoingMessage.d.ts deleted file mode 100644 index e4f9be2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/OutgoingMessage.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { Awareness } from "y-protocols/awareness"; -import type Document from "./Document.ts"; -export declare class OutgoingMessage { - encoder: Encoder; - type?: number; - category?: string; - constructor(documentName: string); - createSyncMessage(): OutgoingMessage; - createSyncReplyMessage(): OutgoingMessage; - createAwarenessUpdateMessage(awareness: Awareness, changedClients?: Array): OutgoingMessage; - writeQueryAwareness(): OutgoingMessage; - writeTokenSyncRequest(): OutgoingMessage; - writeAuthenticated(readonly: boolean): OutgoingMessage; - writePermissionDenied(reason: string): OutgoingMessage; - writeFirstSyncStepFor(document: Document): OutgoingMessage; - writeUpdate(update: Uint8Array): OutgoingMessage; - writeStateless(payload: string): OutgoingMessage; - writeBroadcastStateless(payload: string): OutgoingMessage; - writeSyncStatus(updateSaved: boolean): OutgoingMessage; - writeCloseMessage(reason: string): OutgoingMessage; - toUint8Array(): Uint8Array; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Server.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Server.d.ts deleted file mode 100644 index a1df4ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/Server.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { Server as HTTPServer, IncomingMessage, ServerResponse } from "node:http"; -import { WebSocketServer } from "ws"; -import type { AddressInfo, ServerOptions } from "ws"; -import { Hocuspocus } from "./Hocuspocus.ts"; -import type { Configuration } from "./types.ts"; -export interface ServerConfiguration extends Configuration { - port?: number; - address?: string; - stopOnSignals?: boolean; -} -export declare const defaultServerConfiguration: { - port: number; - address: string; - stopOnSignals: boolean; -}; -export declare class Server { - httpServer: HTTPServer; - webSocketServer: WebSocketServer; - hocuspocus: Hocuspocus; - configuration: ServerConfiguration; - constructor(configuration?: Partial, websocketOptions?: ServerOptions); - setupWebsocketConnection: () => void; - setupHttpUpgrade: () => void; - requestHandler: (request: IncomingMessage, response: ServerResponse) => Promise; - listen(port?: number, callback?: any): Promise; - get address(): AddressInfo; - destroy(): Promise; - get URL(): string; - get webSocketURL(): string; - get httpURL(): string; - private showStartScreen; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/index.d.ts deleted file mode 100644 index 8ede6d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from "./Connection.ts"; -export * from "./Document.ts"; -export * from "./Hocuspocus.ts"; -export * from "./IncomingMessage.ts"; -export * from "./MessageReceiver.ts"; -export * from "./OutgoingMessage.ts"; -export * from "./Server.ts"; -export * from "./types.ts"; -export * from "./util/debounce.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/types.d.ts deleted file mode 100644 index 615cacc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/types.d.ts +++ /dev/null @@ -1,342 +0,0 @@ -import type { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "node:http"; -import type { URLSearchParams } from "node:url"; -import type { Awareness } from "y-protocols/awareness"; -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -export declare enum MessageType { - Unknown = -1, - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - SyncReply = 4,// same as Sync, but won't trigger another 'SyncStep1' - Stateless = 5, - BroadcastStateless = 6, - CLOSE = 7, - SyncStatus = 8 -} -export interface AwarenessUpdate { - added: Array; - updated: Array; - removed: Array; -} -export interface ConnectionConfiguration { - readOnly: boolean; - isAuthenticated: boolean; -} -export interface Extension { - priority?: number; - extensionName?: string; - onConfigure?(data: onConfigurePayload): Promise; - onListen?(data: onListenPayload): Promise; - onUpgrade?(data: onUpgradePayload): Promise; - onConnect?(data: onConnectPayload): Promise; - connected?(data: connectedPayload): Promise; - onAuthenticate?(data: onAuthenticatePayload): Promise; - onTokenSync?(data: onTokenSyncPayload): Promise; - onCreateDocument?(data: onCreateDocumentPayload): Promise; - onLoadDocument?(data: onLoadDocumentPayload): Promise; - afterLoadDocument?(data: afterLoadDocumentPayload): Promise; - beforeHandleMessage?(data: beforeHandleMessagePayload): Promise; - beforeSync?(data: beforeSyncPayload): Promise; - beforeBroadcastStateless?(data: beforeBroadcastStatelessPayload): Promise; - onStateless?(payload: onStatelessPayload): Promise; - onChange?(data: onChangePayload): Promise; - onStoreDocument?(data: onStoreDocumentPayload): Promise; - afterStoreDocument?(data: afterStoreDocumentPayload): Promise; - onAwarenessUpdate?(data: onAwarenessUpdatePayload): Promise; - onRequest?(data: onRequestPayload): Promise; - onDisconnect?(data: onDisconnectPayload): Promise; - beforeUnloadDocument?(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument?(data: afterUnloadDocumentPayload): Promise; - onDestroy?(data: onDestroyPayload): Promise; -} -export type HookName = "onConfigure" | "onListen" | "onUpgrade" | "onConnect" | "connected" | "onAuthenticate" | "onTokenSync" | "onCreateDocument" | "onLoadDocument" | "afterLoadDocument" | "beforeHandleMessage" | "beforeBroadcastStateless" | "beforeSync" | "onStateless" | "onChange" | "onStoreDocument" | "afterStoreDocument" | "onAwarenessUpdate" | "onRequest" | "onDisconnect" | "beforeUnloadDocument" | "afterUnloadDocument" | "onDestroy"; -export type HookPayloadByName = { - onConfigure: onConfigurePayload; - onListen: onListenPayload; - onUpgrade: onUpgradePayload; - onConnect: onConnectPayload; - connected: connectedPayload; - onAuthenticate: onAuthenticatePayload; - onTokenSync: onTokenSyncPayload; - onCreateDocument: onCreateDocumentPayload; - onLoadDocument: onLoadDocumentPayload; - afterLoadDocument: afterLoadDocumentPayload; - beforeHandleMessage: beforeHandleMessagePayload; - beforeBroadcastStateless: beforeBroadcastStatelessPayload; - beforeSync: beforeSyncPayload; - onStateless: onStatelessPayload; - onChange: onChangePayload; - onStoreDocument: onStoreDocumentPayload; - afterStoreDocument: afterStoreDocumentPayload; - onAwarenessUpdate: onAwarenessUpdatePayload; - onRequest: onRequestPayload; - onDisconnect: onDisconnectPayload; - afterUnloadDocument: afterUnloadDocumentPayload; - beforeUnloadDocument: beforeUnloadDocumentPayload; - onDestroy: onDestroyPayload; -}; -export interface Configuration extends Extension { - /** - * A name for the instance, used for logging. - */ - name: string | null; - /** - * A list of hocuspocus extensions. - */ - extensions: Array; - /** - * Defines in which interval the server sends a ping, and closes the connection when no pong is sent back. - */ - timeout: number; - /** - * Debounces the call of the `onStoreDocument` hook for the given amount of time in ms. - * Otherwise every single update would be persisted. - */ - debounce: number; - /** - * Makes sure to call `onStoreDocument` at least in the given amount of time (ms). - */ - maxDebounce: number; - /** - * By default, the servers show a start screen. If passed false, the server will start quietly. - */ - quiet: boolean; - /** - * If set to false, respects the debounce time of `onStoreDocument` before unloading a document. - * Otherwise, the document will be unloaded immediately. - * - * This prevents a client from DOSing the server by repeatedly connecting and disconnecting when - * your onStoreDocument is rate-limited. - */ - unloadImmediately: boolean; - /** - * options to pass to the ydoc document - */ - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; -} -export interface onStatelessPayload { - connection: Connection; - documentName: string; - document: Document; - payload: string; -} -export interface onAuthenticatePayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - request: IncomingMessage; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; -} -export interface onTokenSyncPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} -export interface onCreateDocumentPayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface onConnectPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface connectedPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} -export interface onLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface afterLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface onChangePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - transactionOrigin: any; -} -export interface beforeHandleMessagePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - connection: Connection; -} -export interface beforeSyncPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - connection: Connection; - /** - * The y-protocols/sync message type - * @example - * 0: SyncStep1 - * 1: SyncStep2 - * 2: YjsUpdate - * - * @see https://github.com/yjs/y-protocols/blob/master/sync.js#L13-L40 - */ - type: number; - /** - * The payload of the y-sync message. - */ - payload: Uint8Array; -} -export interface beforeBroadcastStatelessPayload { - document: Document; - documentName: string; - payload: string; -} -export interface onStoreDocumentPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - transactionOrigin?: any; -} -export interface afterStoreDocumentPayload extends onStoreDocumentPayload { -} -export interface onAwarenessUpdatePayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - added: number[]; - updated: number[]; - removed: number[]; - awareness: Awareness; - states: StatesArray; -} -export type StatesArray = { - clientId: number; - [key: string | number]: any; -}[]; -export interface fetchPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface storePayload extends onStoreDocumentPayload { - state: Buffer; -} -export interface onDisconnectPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; -} -export interface onRequestPayload { - request: IncomingMessage; - response: ServerResponse; - instance: Hocuspocus; -} -export interface onUpgradePayload { - request: IncomingMessage; - socket: any; - head: any; - instance: Hocuspocus; -} -export interface onListenPayload { - instance: Hocuspocus; - configuration: Configuration; - port: number; -} -export interface onDestroyPayload { - instance: Hocuspocus; -} -export interface onConfigurePayload { - instance: Hocuspocus; - configuration: Configuration; - version: string; -} -export interface afterUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; -} -export interface beforeUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; - document: Document; -} -export interface DirectConnection { - transact(transaction: (document: Document) => void): Promise; - disconnect(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/util/debounce.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/util/debounce.d.ts deleted file mode 100644 index 4573cfd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/util/debounce.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare const useDebounce: () => { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/util/getParameters.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/util/getParameters.d.ts deleted file mode 100644 index a0100ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/server/src/util/getParameters.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import { URLSearchParams } from "node:url"; -/** - * Get parameters by the given request - */ -export declare function getParameters(request?: Pick): URLSearchParams; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/Prosemirror.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/Prosemirror.d.ts deleted file mode 100644 index 06db1a6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/Prosemirror.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Doc } from "yjs"; -import { Schema } from "@tiptap/pm/model"; -import type { Transformer } from "./types.ts"; -declare class Prosemirror implements Transformer { - defaultSchema: Schema; - schema(schema: Schema): Prosemirror; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, schema?: Schema): Doc; -} -export declare const ProsemirrorTransformer: Prosemirror; -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/Tiptap.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/Tiptap.d.ts deleted file mode 100644 index 3d64c14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/Tiptap.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Doc } from "yjs"; -import type { Extensions } from "@tiptap/core"; -import type { Transformer } from "./types.ts"; -export declare class Tiptap implements Transformer { - defaultExtensions: Extensions; - extensions(extensions: Extensions): Tiptap; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, extensions?: Extensions): Doc; -} -export declare const TiptapTransformer: Tiptap; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/index.d.ts deleted file mode 100644 index a8debe5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./Prosemirror.ts"; -export * from "./Tiptap.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/types.d.ts deleted file mode 100644 index 1c2f6da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/packages/transformer/src/types.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Doc } from "yjs"; -export interface Transformer { - fromYdoc: (document: Doc, fieldName?: string | Array) => any; - toYdoc: (document: any, fieldName: string) => Doc; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/default.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/default.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/deno.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/deno.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/deno.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/express.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/express.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/express.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/hono.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/hono.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/hono.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/koa.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/koa.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/koa.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/load-document.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/load-document.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/load-document.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/redis.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/redis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/s3-redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/s3-redis.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/s3-redis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/s3.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/s3.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/s3.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/slow.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/slow.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/slow.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/tiptapcollab.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/tiptapcollab.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/tiptapcollab.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/webhook.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/webhook.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/backend/src/webhook.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/app/SocketContext1.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/app/SocketContext1.d.ts deleted file mode 100644 index d0725fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/app/SocketContext1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { HocuspocusProviderWebsocket } from "@hocuspocus/provider"; -export declare const SocketContext1: import("react").Context; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/app/SocketContext2.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/app/SocketContext2.d.ts deleted file mode 100644 index ac4da99..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/app/SocketContext2.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { HocuspocusProviderWebsocket } from "@hocuspocus/provider"; -export declare const SocketContext2: import("react").Context; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/next.config.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/next.config.d.ts deleted file mode 100644 index 2821dfb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/playground/frontend/next.config.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { NextConfig } from "next"; -declare const nextConfig: NextConfig; -export default nextConfig; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-database/fetch.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-database/fetch.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-database/fetch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-logger/onListen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-logger/onListen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-logger/onListen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onAwarenessChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onAwarenessChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onAwarenessChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-redis/onStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-s3/fetch.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-s3/fetch.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-s3/fetch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-throttle/banning.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-throttle/banning.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-throttle/banning.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-throttle/configuration.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-throttle/configuration.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/extension-throttle/configuration.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/hasUnsyncedChanges.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/hasUnsyncedChanges.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/hasUnsyncedChanges.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/observe.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/observe.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/observe.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/observeDeep.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/observeDeep.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/observeDeep.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAuthenticated.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAuthenticated.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAuthenticated.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAuthenticationFailed.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAuthenticationFailed.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAuthenticationFailed.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAwarenessChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAwarenessChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAwarenessChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAwarenessUpdate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAwarenessUpdate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onAwarenessUpdate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onClose.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onClose.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onClose.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onConnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onConnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onConnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onDisconnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onDisconnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onDisconnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onMessage.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onMessage.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onOpen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onOpen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onOpen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onSynced.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onSynced.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/provider/onSynced.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/providerwebsocket/configuration.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/providerwebsocket/configuration.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/providerwebsocket/configuration.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/address.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/address.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/address.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterLoadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterLoadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterLoadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterUnloadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterUnloadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/afterUnloadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeBroadcastStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeBroadcastStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeBroadcastStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeHandleMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeHandleMessage.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeHandleMessage.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeSync.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeSync.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeSync.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeUnloadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeUnloadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/beforeUnloadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/closeConnections.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/closeConnections.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/closeConnections.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/getConnectionsCount.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/getConnectionsCount.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/getConnectionsCount.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/getDocumentsCount.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/getDocumentsCount.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/getDocumentsCount.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/listen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/listen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/listen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onAuthenticate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onAuthenticate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onAuthenticate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onAwarenessUpdate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onAwarenessUpdate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onAwarenessUpdate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onClose.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onClose.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onClose.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onConfigure.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onConfigure.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onConfigure.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onConnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onConnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onConnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onDestroy.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onDestroy.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onDestroy.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onDisconnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onDisconnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onDisconnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onListen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onListen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onListen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onLoadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onLoadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onLoadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onRequest.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onRequest.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onRequest.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onTokenSync.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onTokenSync.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onTokenSync.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onUpgrade.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onUpgrade.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/onUpgrade.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/openDirectConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/openDirectConnection.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/openDirectConnection.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/websocketError.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/websocketError.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/server/websocketError.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/transformer/TiptapTransformer.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/transformer/TiptapTransformer.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/transformer/TiptapTransformer.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/createDirectory.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/createDirectory.d.ts deleted file mode 100644 index 7affbc2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/createDirectory.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const createDirectory: (dir: string) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/flushRedis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/flushRedis.d.ts deleted file mode 100644 index 5a548da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/flushRedis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const flushRedis: () => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/index.d.ts deleted file mode 100644 index 789d5d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from './createDirectory.ts'; -export * from './flushRedis.ts'; -export * from './newHocuspocus.ts'; -export * from './newHocuspocusProvider.ts'; -export * from './newHocuspocusProviderWebsocket.ts'; -export * from './randomInteger.ts'; -export * from './redisConnectionSettings.ts'; -export * from './removeDirectory.ts'; -export * from './sleep.ts'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocus.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocus.d.ts deleted file mode 100644 index c3de52e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocus.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { ServerConfiguration } from '@hocuspocus/server'; -export declare const newHocuspocus: (options?: Partial) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocusProvider.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocusProvider.d.ts deleted file mode 100644 index 09e3f10..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocusProvider.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { HocuspocusProvider, type HocuspocusProviderConfiguration, type HocuspocusProviderWebsocket, type HocuspocusProviderWebsocketConfiguration } from '@hocuspocus/provider'; -import type { Hocuspocus } from '@hocuspocus/server'; -export declare const newHocuspocusProvider: (server: Hocuspocus, options?: Partial, websocketOptions?: Partial, websocketProvider?: HocuspocusProviderWebsocket) => HocuspocusProvider; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts deleted file mode 100644 index 97bb454..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HocuspocusProviderWebsocketConfiguration } from '@hocuspocus/provider'; -import { HocuspocusProviderWebsocket } from '@hocuspocus/provider'; -import type { Hocuspocus } from '@hocuspocus/server'; -export declare const newHocuspocusProviderWebsocket: (hocuspocus: Hocuspocus, options?: Partial>) => HocuspocusProviderWebsocket; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/randomInteger.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/randomInteger.d.ts deleted file mode 100644 index b28e7b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/randomInteger.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const randomInteger: (min: number, max: number) => number; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/redisConnectionSettings.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/redisConnectionSettings.d.ts deleted file mode 100644 index 52c31fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/redisConnectionSettings.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const redisConnectionSettings: { - host: string; - port: number; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/removeDirectory.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/removeDirectory.d.ts deleted file mode 100644 index 71b4ffc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/removeDirectory.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const removeDirectory: (dir: string) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/retryableAssertion.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/retryableAssertion.d.ts deleted file mode 100644 index 1016874..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/retryableAssertion.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { ExecutionContext } from 'ava'; -export declare const retryableAssertion: (t: ExecutionContext, recoverableTry: (tt: ExecutionContext) => void) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/sleep.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/sleep.d.ts deleted file mode 100644 index 2450ca0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/dist/tests/utils/sleep.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const sleep: (time: number) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/package.json b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/package.json deleted file mode 100644 index 78468fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@hocuspocus/extension-database", - "description": "a generic Hocuspocus persistence driver for the database", - "version": "3.4.4", - "homepage": "https://hocuspocus.dev", - "keywords": [ - "hocuspocus", - "yjs" - ], - "license": "MIT", - "type": "module", - "main": "dist/hocuspocus-database.cjs", - "module": "dist/hocuspocus-database.esm.js", - "types": "dist/packages/extension-database/src/index.d.ts", - "exports": { - "source": { - "import": "./src/index.ts" - }, - "default": { - "import": "./dist/hocuspocus-database.esm.js", - "require": "./dist/hocuspocus-database.cjs", - "types": "./dist/packages/extension-database/src/index.d.ts" - } - }, - "files": [ - "src", - "dist" - ], - "dependencies": { - "@hocuspocus/server": "^3.4.4" - }, - "peerDependencies": { - "yjs": "^13.6.8" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "b3454a4ca289a84ddfb7fa5607a2d4b8d5c37e9d", - "repository": { - "url": "https://github.com/ueberdosis/hocuspocus" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/src/Database.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/src/Database.ts deleted file mode 100644 index 3383c01..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/src/Database.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { - Extension, - onChangePayload, - onLoadDocumentPayload, - storePayload, - fetchPayload, -} from "@hocuspocus/server"; -import * as Y from "yjs"; - -export interface DatabaseConfiguration { - /** - * Pass a Promise to retrieve updates from your database. The Promise should resolve to - * an array of items with Y.js-compatible binary data. - */ - fetch: (data: fetchPayload) => Promise; - /** - * Pass a function to store updates in your database. - */ - store: (data: storePayload) => Promise; -} - -export class Database implements Extension { - /** - * Default configuration - */ - configuration: DatabaseConfiguration = { - fetch: async () => null, - store: async () => {}, - }; - - /** - * Constructor - */ - constructor(configuration: Partial) { - this.configuration = { - ...this.configuration, - ...configuration, - }; - } - - /** - * Get stored data from the database. - */ - async onLoadDocument(data: onLoadDocumentPayload): Promise { - const update = await this.configuration.fetch(data); - - if (update) { - Y.applyUpdate(data.document, update); - } - } - - /** - * Store new updates in the database. - */ - async onStoreDocument(data: onChangePayload) { - await this.configuration.store({ - ...data, - state: Buffer.from(Y.encodeStateAsUpdate(data.document)), - }); - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/src/index.ts deleted file mode 100644 index cca6903..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Database.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server deleted file mode 120000 index 5fe1cde..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server +++ /dev/null @@ -1 +0,0 @@ -../../../@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs deleted file mode 120000 index c3bb19e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs +++ /dev/null @@ -1 +0,0 @@ -../../yjs@13.6.31/node_modules/yjs \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database deleted file mode 120000 index b452a07..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database +++ /dev/null @@ -1 +0,0 @@ -../../../@hocuspocus+extension-database@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-database \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/README.md b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/README.md deleted file mode 100644 index 24ee086..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# @hocuspocus/extension-sqlite -[![Version](https://img.shields.io/npm/v/@hocuspocus/extension-sqlite.svg?label=version)](https://www.npmjs.com/package/@hocuspocus/extension-sqlite) -[![Downloads](https://img.shields.io/npm/dm/@hocuspocus/extension-sqlite.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@hocuspocus/extension-sqlite.svg)](https://www.npmjs.com/package/@hocuspocus/extension-sqlite) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction -Hocuspocus is an opinionated collaborative editing backend for [Tiptap](https://github.com/ueberdosis/tiptap) – based on [Y.js](https://github.com/yjs/yjs), a CRDT framework with a powerful abstraction of shared data. - -## Official Documentation -Documentation can be found in the [GitHub repository](https://github.com/ueberdosis/hocuspocus). - -## License -Hocuspocus is open-sourced software licensed under the [MIT license](https://github.com/ueberdosis/hocuspocus/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.cjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.cjs deleted file mode 100644 index e69fc93..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.cjs +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -var extensionDatabase = require('@hocuspocus/extension-database'); -var sqlite3 = require('sqlite3'); -var kleur = require('kleur'); - -const schema = `CREATE TABLE IF NOT EXISTS "documents" ( - "name" varchar(255) NOT NULL, - "data" blob NOT NULL, - UNIQUE(name) -)`; -const selectQuery = ` - SELECT data FROM "documents" WHERE name = $name ORDER BY rowid DESC -`; -const upsertQuery = ` - INSERT INTO "documents" ("name", "data") VALUES ($name, $data) - ON CONFLICT(name) DO UPDATE SET data = $data -`; -const SQLITE_INMEMORY = ":memory:"; -class SQLite extends extensionDatabase.Database { - constructor(configuration) { - super({}); - this.configuration = { - database: SQLITE_INMEMORY, - schema, - fetch: async ({ documentName }) => { - return new Promise((resolve, reject) => { - var _a; - (_a = this.db) === null || _a === void 0 ? void 0 : _a.get(selectQuery, { - $name: documentName, - }, (error, row) => { - if (error) { - reject(error); - } - resolve(row === null || row === void 0 ? void 0 : row.data); - }); - }); - }, - store: async ({ documentName, state }) => { - var _a; - (_a = this.db) === null || _a === void 0 ? void 0 : _a.run(upsertQuery, { - $name: documentName, - $data: state, - }); - }, - }; - this.configuration = { - ...this.configuration, - ...configuration, - }; - } - async onConfigure() { - this.db = new sqlite3.Database(this.configuration.database); - this.db.run(this.configuration.schema); - } - async onListen() { - if (this.configuration.database === SQLITE_INMEMORY) { - console.warn(` ${kleur.yellow("The SQLite extension is configured as an in-memory database. All changes will be lost on restart!")}`); - console.log(); - } - } -} - -exports.SQLite = SQLite; -exports.schema = schema; -exports.selectQuery = selectQuery; -exports.upsertQuery = upsertQuery; -//# sourceMappingURL=hocuspocus-sqlite.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.cjs.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.cjs.map deleted file mode 100644 index fbb28c1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.cjs.map +++ /dev/null @@ -1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,CAAC,EAAE,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC;QAC3D,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;;AAGvC,IAAA,MAAM,QAAQ,GAAA;QACb,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,KAAK,eAAe,EAAE;AACpD,YAAA,OAAO,CAAC,IAAI,CACX,CAAA,EAAA,EAAK,KAAK,CAAC,MAAM,CAAC,mGAAmG,CAAC,CAAE,CAAA,CACxH;YACD,OAAO,CAAC,GAAG,EAAE;;;AAGf;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.esm.js b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.esm.js deleted file mode 100644 index b053011..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.esm.js +++ /dev/null @@ -1,63 +0,0 @@ -import { Database } from '@hocuspocus/extension-database'; -import sqlite3 from 'sqlite3'; -import kleur from 'kleur'; - -const schema = `CREATE TABLE IF NOT EXISTS "documents" ( - "name" varchar(255) NOT NULL, - "data" blob NOT NULL, - UNIQUE(name) -)`; -const selectQuery = ` - SELECT data FROM "documents" WHERE name = $name ORDER BY rowid DESC -`; -const upsertQuery = ` - INSERT INTO "documents" ("name", "data") VALUES ($name, $data) - ON CONFLICT(name) DO UPDATE SET data = $data -`; -const SQLITE_INMEMORY = ":memory:"; -class SQLite extends Database { - constructor(configuration) { - super({}); - this.configuration = { - database: SQLITE_INMEMORY, - schema, - fetch: async ({ documentName }) => { - return new Promise((resolve, reject) => { - var _a; - (_a = this.db) === null || _a === void 0 ? void 0 : _a.get(selectQuery, { - $name: documentName, - }, (error, row) => { - if (error) { - reject(error); - } - resolve(row === null || row === void 0 ? void 0 : row.data); - }); - }); - }, - store: async ({ documentName, state }) => { - var _a; - (_a = this.db) === null || _a === void 0 ? void 0 : _a.run(upsertQuery, { - $name: documentName, - $data: state, - }); - }, - }; - this.configuration = { - ...this.configuration, - ...configuration, - }; - } - async onConfigure() { - this.db = new sqlite3.Database(this.configuration.database); - this.db.run(this.configuration.schema); - } - async onListen() { - if (this.configuration.database === SQLITE_INMEMORY) { - console.warn(` ${kleur.yellow("The SQLite extension is configured as an in-memory database. All changes will be lost on restart!")}`); - console.log(); - } - } -} - -export { SQLite, schema, selectQuery, upsertQuery }; -//# sourceMappingURL=hocuspocus-sqlite.esm.js.map diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.esm.js.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.esm.js.map deleted file mode 100644 index ac87d47..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/hocuspocus-sqlite.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-sqlite.esm.js","sources":["../src/SQLite.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKa,MAAA,MAAM,GAAG,CAAA;;;;;AAMT,MAAA,WAAW,GAAG;;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,CAAC;;AAGvC,IAAA,MAAM,QAAQ,GAAA;QACb,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,KAAK,eAAe,EAAE;AACpD,YAAA,OAAO,CAAC,IAAI,CACX,CAAA,EAAA,EAAK,KAAK,CAAC,MAAM,CAAC,mGAAmG,CAAC,CAAE,CAAA,CACxH;YACD,OAAO,CAAC,GAAG,EAAE;;;AAGf;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/model/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/model/index.d.ts deleted file mode 100644 index 149a810..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/model/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-model'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/state/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/state/index.d.ts deleted file mode 100644 index 455a4db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/state/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-state'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/transform/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/transform/index.d.ts deleted file mode 100644 index 0b4f8de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/transform/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-transform'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/view/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/view/index.d.ts deleted file mode 100644 index 8b3c631..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/node_modules/@tiptap/pm/view/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-view'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/CloseEvents.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/CloseEvents.d.ts deleted file mode 100644 index 1f397a5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/CloseEvents.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface CloseEvent { - code: number; - reason: string; -} -/** - * The server is terminating the connection because a data frame was received - * that is too large. - * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code - */ -export declare const MessageTooBig: CloseEvent; -/** - * The server successfully processed the request, asks that the requester reset - * its document view, and is not returning any content. - */ -export declare const ResetConnection: CloseEvent; -/** - * Similar to Forbidden, but specifically for use when authentication is required and has - * failed or has not yet been provided. - */ -export declare const Unauthorized: CloseEvent; -/** - * The request contained valid data and was understood by the server, but the server - * is refusing action. - */ -export declare const Forbidden: CloseEvent; -/** - * The server timed out waiting for the request. - */ -export declare const ConnectionTimeout: CloseEvent; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/auth.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/auth.d.ts deleted file mode 100644 index fa5c56c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/auth.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as encoding from "lib0/encoding"; -import * as decoding from "lib0/decoding"; -import type { AuthorizedScope } from "../../provider/src"; -export declare enum AuthMessageType { - Token = 0, - PermissionDenied = 1, - Authenticated = 2 -} -export declare const writeAuthentication: (encoder: encoding.Encoder, auth: string) => void; -export declare const writePermissionDenied: (encoder: encoding.Encoder, reason: string) => void; -export declare const writeAuthenticated: (encoder: encoding.Encoder, scope: AuthorizedScope) => void; -export declare const writeTokenSyncRequest: (encoder: encoding.Encoder) => void; -export declare const readAuthMessage: (decoder: decoding.Decoder, sendToken: () => void, permissionDeniedHandler: (reason: string) => void, authenticatedHandler: (scope: string) => void) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/awarenessStatesToArray.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/awarenessStatesToArray.d.ts deleted file mode 100644 index 81db4ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/awarenessStatesToArray.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const awarenessStatesToArray: (states: Map>) => { - clientId: number; -}[]; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/index.d.ts deleted file mode 100644 index 8a730fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./auth.ts"; -export * from "./CloseEvents.ts"; -export * from "./awarenessStatesToArray.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/types.d.ts deleted file mode 100644 index 3672009..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/common/src/types.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * State of the WebSocket connection. - * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState - */ -export declare enum WsReadyStates { - Connecting = 0, - Open = 1, - Closing = 2, - Closed = 3 -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-database/src/Database.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-database/src/Database.d.ts deleted file mode 100644 index 123c8d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-database/src/Database.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Extension, onChangePayload, onLoadDocumentPayload, storePayload, fetchPayload } from "@hocuspocus/server"; -export interface DatabaseConfiguration { - /** - * Pass a Promise to retrieve updates from your database. The Promise should resolve to - * an array of items with Y.js-compatible binary data. - */ - fetch: (data: fetchPayload) => Promise; - /** - * Pass a function to store updates in your database. - */ - store: (data: storePayload) => Promise; -} -export declare class Database implements Extension { - /** - * Default configuration - */ - configuration: DatabaseConfiguration; - /** - * Constructor - */ - constructor(configuration: Partial); - /** - * Get stored data from the database. - */ - onLoadDocument(data: onLoadDocumentPayload): Promise; - /** - * Store new updates in the database. - */ - onStoreDocument(data: onChangePayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-database/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-database/src/index.d.ts deleted file mode 100644 index cca6903..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-database/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Database.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-logger/src/Logger.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-logger/src/Logger.d.ts deleted file mode 100644 index 7d601c8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-logger/src/Logger.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onLoadDocumentPayload, onDestroyPayload, onDisconnectPayload, onRequestPayload, onUpgradePayload } from "@hocuspocus/server"; -export interface LoggerConfiguration { - /** - * Prepend all logging message with a string. - * - * @deprecated - */ - prefix: null | string; - /** - * Whether to log something for the `onLoadDocument` hook. - */ - onLoadDocument: boolean; - /** - * Whether to log something for the `onChange` hook. - */ - onChange: boolean; - /** - * Whether to log something for the `onStoreDocument` hook. - */ - onStoreDocument: boolean; - /** - * Whether to log something for the `onConnect` hook. - */ - onConnect: boolean; - /** - * Whether to log something for the `onDisconnect` hook. - */ - onDisconnect: boolean; - /** - * Whether to log something for the `onUpgrade` hook. - */ - onUpgrade: boolean; - /** - * Whether to log something for the `onRequest` hook. - */ - onRequest: boolean; - /** - * Whether to log something for the `onDestroy` hook. - */ - onDestroy: boolean; - /** - * Whether to log something for the `onConfigure` hook. - */ - onConfigure: boolean; - /** - * A log function, if none is provided output will go to console - */ - log: (...args: any[]) => void; -} -export declare class Logger implements Extension { - name: string | null; - configuration: LoggerConfiguration; - /** - * Constructor - */ - constructor(configuration?: Partial); - onConfigure(data: onConfigurePayload): Promise; - onLoadDocument(data: onLoadDocumentPayload): Promise; - onChange(data: onChangePayload): Promise; - onStoreDocument(data: onDisconnectPayload): Promise; - onConnect(data: onConnectPayload): Promise; - onDisconnect(data: onDisconnectPayload): Promise; - onUpgrade(data: onUpgradePayload): Promise; - onRequest(data: onRequestPayload): Promise; - onDestroy(data: onDestroyPayload): Promise; - private log; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-logger/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-logger/src/index.d.ts deleted file mode 100644 index 9a59b0a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-logger/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Logger.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-redis/src/Redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-redis/src/Redis.d.ts deleted file mode 100644 index 78dc013..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-redis/src/Redis.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import type { Extension, Hocuspocus, afterLoadDocumentPayload, afterStoreDocumentPayload, afterUnloadDocumentPayload, beforeBroadcastStatelessPayload, beforeUnloadDocumentPayload, onAwarenessUpdatePayload, onChangePayload, onConfigurePayload, onStoreDocumentPayload } from "@hocuspocus/server"; -import { type ExecutionResult, type Lock, Redlock } from "@sesamecare-oss/redlock"; -import type { Cluster, ClusterNode, ClusterOptions, RedisOptions } from "ioredis"; -import RedisClient from "ioredis"; -export type RedisInstance = RedisClient | Cluster; -export interface Configuration { - /** - * Redis port - */ - port: number; - /** - * Redis host - */ - host: string; - /** - * Redis Cluster - */ - nodes?: ClusterNode[]; - /** - * Duplicate from an existed Redis instance - */ - redis?: RedisInstance; - /** - * Redis instance creator - */ - createClient?: () => RedisInstance; - /** - * Options passed directly to Redis constructor - * - * https://github.com/luin/ioredis/blob/master/API.md#new-redisport-host-options - */ - options?: ClusterOptions | RedisOptions; - /** - * An unique instance name, required to filter messages in Redis. - * If none is provided an unique id is generated. - */ - identifier: string; - /** - * Namespace for Redis keys, if none is provided 'hocuspocus' is used - */ - prefix: string; - /** - * The maximum time for the Redis lock in ms (in case it can’t be released). - */ - lockTimeout: number; - /** - * A delay before onDisconnect is executed. This allows last minute updates' - * sync messages to be received by the subscription before it's closed. - */ - disconnectDelay: number; -} -export declare class Redis implements Extension { - /** - * Make sure to give that extension a higher priority, so - * the `onStoreDocument` hook is able to intercept the chain, - * before documents are stored to the database. - */ - priority: number; - configuration: Configuration; - redisTransactionOrigin: string; - pub: RedisInstance; - sub: RedisInstance; - instance: Hocuspocus; - redlock: Redlock; - locks: Map; - }>; - messagePrefix: Buffer; - private pendingAfterStoreDocumentResolves; - constructor(configuration: Partial); - onConfigure({ instance }: onConfigurePayload): Promise; - private getKey; - private pubKey; - private subKey; - private lockKey; - private encodeMessage; - private decodeMessage; - /** - * Once a document is loaded, subscribe to the channel in Redis. - */ - afterLoadDocument({ documentName, document, }: afterLoadDocumentPayload): Promise; - /** - * Publish the first sync step through Redis. - */ - private publishFirstSyncStep; - /** - * Let’s ask Redis who is connected already. - */ - private requestAwarenessFromOtherInstances; - /** - * Before the document is stored, make sure to set a lock in Redis. - * That’s meant to avoid conflicts with other instances trying to store the document. - */ - onStoreDocument({ documentName }: onStoreDocumentPayload): Promise; - /** - * Release the Redis lock, so other instances can store documents. - */ - afterStoreDocument({ documentName, socketId, }: afterStoreDocumentPayload): Promise; - /** - * Handle awareness update messages received directly by this Hocuspocus instance. - */ - onAwarenessUpdate({ documentName, awareness, added, updated, removed, document, }: onAwarenessUpdatePayload): Promise; - /** - * Handle incoming messages published on subscribed document channels. - * Note that this will also include messages from ourselves as it is not possible - * in Redis to filter these. - */ - private handleIncomingMessage; - /** - * if the ydoc changed, we'll need to inform other Hocuspocus servers about it. - */ - onChange(data: onChangePayload): Promise; - /** - * Delay unloading to allow syncs to finish - */ - beforeUnloadDocument(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument(data: afterUnloadDocumentPayload): Promise; - beforeBroadcastStateless(data: beforeBroadcastStatelessPayload): Promise; - /** - * Kill the Redlock connection immediately. - */ - onDestroy(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-redis/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-redis/src/index.d.ts deleted file mode 100644 index 6c9d48a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-redis/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Redis.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-s3/src/S3.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-s3/src/S3.d.ts deleted file mode 100644 index 4d2da25..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-s3/src/S3.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { DatabaseConfiguration } from "@hocuspocus/extension-database"; -import { Database } from "@hocuspocus/extension-database"; -import { S3Client } from "@aws-sdk/client-s3"; -export interface S3Configuration extends DatabaseConfiguration { - /** - * AWS S3 region - */ - region?: string; - /** - * S3 bucket name - */ - bucket: string; - /** - * S3 key prefix for documents (optional) - */ - prefix?: string; - /** - * AWS credentials - */ - credentials?: { - accessKeyId: string; - secretAccessKey: string; - }; - /** - * S3 endpoint URL (for S3-compatible services like MinIO) - */ - endpoint?: string; - /** - * Force path style URLs (required for MinIO) - */ - forcePathStyle?: boolean; - /** - * Custom S3 client - */ - s3Client?: S3Client; -} -export declare class S3 extends Database { - private s3Client?; - configuration: S3Configuration; - constructor(configuration: Partial); - private getObjectKey; - onConfigure(): Promise; - onListen(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-s3/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-s3/src/index.d.ts deleted file mode 100644 index f782642..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-s3/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./S3.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-sqlite/src/SQLite.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-sqlite/src/SQLite.d.ts deleted file mode 100644 index 432a370..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-sqlite/src/SQLite.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { DatabaseConfiguration } from "@hocuspocus/extension-database"; -import { Database } from "@hocuspocus/extension-database"; -import sqlite3 from "sqlite3"; -export declare const schema = "CREATE TABLE IF NOT EXISTS \"documents\" (\n \"name\" varchar(255) NOT NULL,\n \"data\" blob NOT NULL,\n UNIQUE(name)\n)"; -export declare const selectQuery = "\n SELECT data FROM \"documents\" WHERE name = $name ORDER BY rowid DESC\n"; -export declare const upsertQuery = "\n INSERT INTO \"documents\" (\"name\", \"data\") VALUES ($name, $data)\n ON CONFLICT(name) DO UPDATE SET data = $data\n"; -export interface SQLiteConfiguration extends DatabaseConfiguration { - /** - * Valid values are filenames, ":memory:" for an anonymous in-memory database and an empty - * string for an anonymous disk-based database. Anonymous databases are not persisted and - * when closing the database handle, their contents are lost. - * - * https://github.com/mapbox/node-sqlite3/wiki/API#new-sqlite3databasefilename-mode-callback - */ - database: string; - /** - * The database schema to create. - */ - schema: string; -} -export declare class SQLite extends Database { - db?: sqlite3.Database; - configuration: SQLiteConfiguration; - constructor(configuration?: Partial); - onConfigure(): Promise; - onListen(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-sqlite/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-sqlite/src/index.d.ts deleted file mode 100644 index 8013efb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-sqlite/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./SQLite.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-throttle/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-throttle/src/index.d.ts deleted file mode 100644 index 0917d14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-throttle/src/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Extension, onConnectPayload } from "@hocuspocus/server"; -export interface ThrottleConfiguration { - throttle: number | null | false; - consideredSeconds: number; - banTime: number; - cleanupInterval: number; -} -export declare class Throttle implements Extension { - configuration: ThrottleConfiguration; - connectionsByIp: Map>; - bannedIps: Map; - cleanupInterval?: NodeJS.Timeout; - /** - * Constructor - */ - constructor(configuration?: Partial); - onDestroy(): Promise; - clearMaps(): void; - isBanned(ip: string): boolean; - /** - * Throttle requests - * @private - */ - private throttle; - /** - * onConnect hook - * @param data - */ - onConnect(data: onConnectPayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-webhook/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-webhook/src/index.d.ts deleted file mode 100644 index 2cc3456..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/extension-webhook/src/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { Extension, onChangePayload, onConnectPayload, onDisconnectPayload, onLoadDocumentPayload } from "@hocuspocus/server"; -import type { Transformer } from "@hocuspocus/transformer"; -import type { Doc } from "yjs"; -export declare enum Events { - onChange = "change", - onConnect = "connect", - onCreate = "create", - onDisconnect = "disconnect" -} -export interface Configuration { - debounce: number | false | null; - debounceMaxWait: number; - secret: string; - transformer: Transformer | { - toYdoc: (document: any) => Doc; - fromYdoc: (document: Doc) => any; - }; - url: string; - events: Array; -} -export declare class Webhook implements Extension { - configuration: Configuration; - debounced: Map; - /** - * Constructor - */ - constructor(configuration?: Partial); - /** - * Create a signature for the response body - */ - createSignature(body: string): string; - /** - * debounce the given function, using the given identifier - */ - debounce(id: string, func: Function): void; - /** - * Send a request to the given url containing the given data - */ - sendRequest(event: Events, payload: any): Promise>; - /** - * onChange hook - */ - onChange(data: onChangePayload): Promise; - /** - * onLoadDocument hook - */ - onLoadDocument(data: onLoadDocumentPayload): Promise; - /** - * onConnect hook - */ - onConnect(data: onConnectPayload): Promise; - onDisconnect(data: onDisconnectPayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/EventEmitter.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/EventEmitter.d.ts deleted file mode 100644 index df6b04e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/EventEmitter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default class EventEmitter { - callbacks: { - [key: string]: Function[]; - }; - on(event: string, fn: Function): this; - protected emit(event: string, ...args: any): this; - off(event: string, fn?: Function): this; - removeAllListeners(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/HocuspocusProvider.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/HocuspocusProvider.d.ts deleted file mode 100644 index 5f503fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/HocuspocusProvider.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -import type { Event, MessageEvent } from "ws"; -import { Awareness } from "y-protocols/awareness"; -import * as Y from "yjs"; -import EventEmitter from "./EventEmitter.ts"; -import type { CompleteHocuspocusProviderWebsocketConfiguration } from "./HocuspocusProviderWebsocket.ts"; -import { HocuspocusProviderWebsocket } from "./HocuspocusProviderWebsocket.ts"; -import type { AuthorizedScope, ConstructableOutgoingMessage, onAuthenticatedParameters, onAuthenticationFailedParameters, onAwarenessChangeParameters, onAwarenessUpdateParameters, onCloseParameters, onDisconnectParameters, onMessageParameters, onOpenParameters, onOutgoingMessageParameters, onStatelessParameters, onStatusParameters, onSyncedParameters, onUnsyncedChangesParameters } from "./types.ts"; -export type HocuspocusProviderConfiguration = Required> & Partial & ((Required> & Partial>) | Required>); -export interface CompleteHocuspocusProviderConfiguration { - /** - * The identifier/name of your document - */ - name: string; - /** - * The actual Y.js document - */ - document: Y.Doc; - /** - * An Awareness instance to keep the presence state of all clients. - * - * You can disable sharing awareness information by passing `null`. - * Note that having no awareness information shared across all connections will break our ping checks - * and thus trigger reconnects. You should always have at least one Provider with enabled awareness per - * socket connection, or ensure that the Provider receives messages before running into `HocuspocusProviderWebsocket.messageReconnectTimeout`. - */ - awareness: Awareness | null; - /** - * A token that’s sent to the backend for authentication purposes. - */ - token: string | (() => string) | (() => Promise) | null; - /** - * Hocuspocus websocket provider - */ - websocketProvider: HocuspocusProviderWebsocket; - /** - * Force syncing the document in the defined interval. - */ - forceSyncInterval: false | number; - onAuthenticated: (data: onAuthenticatedParameters) => void; - onAuthenticationFailed: (data: onAuthenticationFailedParameters) => void; - onOpen: (data: onOpenParameters) => void; - onConnect: () => void; - onStatus: (data: onStatusParameters) => void; - onMessage: (data: onMessageParameters) => void; - onOutgoingMessage: (data: onOutgoingMessageParameters) => void; - onSynced: (data: onSyncedParameters) => void; - onDisconnect: (data: onDisconnectParameters) => void; - onClose: (data: onCloseParameters) => void; - onDestroy: () => void; - onAwarenessUpdate: (data: onAwarenessUpdateParameters) => void; - onAwarenessChange: (data: onAwarenessChangeParameters) => void; - onStateless: (data: onStatelessParameters) => void; - onUnsyncedChanges: (data: onUnsyncedChangesParameters) => void; -} -export declare class AwarenessError extends Error { - code: number; -} -export declare class HocuspocusProvider extends EventEmitter { - configuration: CompleteHocuspocusProviderConfiguration; - isSynced: boolean; - unsyncedChanges: number; - isAuthenticated: boolean; - authorizedScope: AuthorizedScope | undefined; - manageSocket: boolean; - private _isAttached; - intervals: any; - constructor(configuration: HocuspocusProviderConfiguration); - boundDocumentUpdateHandler: (update: Uint8Array, origin: any) => void; - boundAwarenessUpdateHandler: ({ added, updated, removed }: any, origin: any) => void; - boundPageHide: () => void; - boundOnOpen: (event: Event) => Promise; - boundOnClose: () => void; - forwardConnect: () => this; - forwardStatus: (e: onStatusParameters) => this; - forwardClose: (e: onCloseParameters) => this; - forwardDisconnect: (e: onDisconnectParameters) => this; - forwardDestroy: () => this; - setConfiguration(configuration?: Partial): void; - get document(): Y.Doc; - get isAttached(): boolean; - get awareness(): Awareness | null; - get hasUnsyncedChanges(): boolean; - private resetUnsyncedChanges; - incrementUnsyncedChanges(): void; - decrementUnsyncedChanges(): void; - forceSync(): void; - pageHide(): void; - registerEventListeners(): void; - sendStateless(payload: string): void; - sendToken(): Promise; - documentUpdateHandler(update: Uint8Array, origin: any): void; - awarenessUpdateHandler({ added, updated, removed }: any, origin: any): void; - /** - * Indicates whether a first handshake with the server has been established - * - * Note: this does not mean all updates from the client have been persisted to the backend. For this, - * use `hasUnsyncedChanges`. - */ - get synced(): boolean; - set synced(state: boolean); - receiveStateless(payload: string): void; - connect(): Promise; - disconnect(): void; - onOpen(event: Event): Promise; - getToken(): Promise; - startSync(): void; - send(message: ConstructableOutgoingMessage, args: any): void; - onMessage(event: MessageEvent): void; - onClose(): void; - destroy(): void; - detach(): void; - attach(): void; - permissionDeniedHandler(reason: string): void; - authenticatedHandler(scope: string): void; - setAwarenessField(key: string, value: any): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts deleted file mode 100644 index 9f5a1da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -import type { Event, MessageEvent } from "ws"; -import EventEmitter from "./EventEmitter.ts"; -import type { HocuspocusProvider } from "./HocuspocusProvider.ts"; -import { WebSocketStatus, type onAwarenessChangeParameters, type onAwarenessUpdateParameters, type onCloseParameters, type onDisconnectParameters, type onMessageParameters, type onOpenParameters, type onOutgoingMessageParameters, type onStatusParameters } from "./types.ts"; -export type HocuspocusWebSocket = WebSocket & { - identifier: string; -}; -export type HocusPocusWebSocket = HocuspocusWebSocket; -export type HocuspocusProviderWebsocketConfiguration = Required> & Partial; -export interface CompleteHocuspocusProviderWebsocketConfiguration { - /** - * Whether to connect automatically when creating the provider instance. Default=true - */ - autoConnect: boolean; - /** - * URL of your @hocuspocus/server instance - */ - url: string; - /** - * By default, trailing slashes are removed from the URL. Set this to true - * to preserve trailing slashes if your server configuration requires them. - */ - preserveTrailingSlash: boolean; - /** - * An optional WebSocket polyfill, for example for Node.js - */ - WebSocketPolyfill: any; - /** - * Disconnect when no message is received for the defined amount of milliseconds. - */ - messageReconnectTimeout: number; - /** - * The delay between each attempt in milliseconds. You can provide a factor to have the delay grow exponentially. - */ - delay: number; - /** - * The initialDelay is the amount of time to wait before making the first attempt. This option should typically be 0 since you typically want the first attempt to happen immediately. - */ - initialDelay: number; - /** - * The factor option is used to grow the delay exponentially. - */ - factor: number; - /** - * The maximum number of attempts or 0 if there is no limit on number of attempts. - */ - maxAttempts: number; - /** - * minDelay is used to set a lower bound of delay when jitter is enabled. This property has no effect if jitter is disabled. - */ - minDelay: number; - /** - * The maxDelay option is used to set an upper bound for the delay when factor is enabled. A value of 0 can be provided if there should be no upper bound when calculating delay. - */ - maxDelay: number; - /** - * If jitter is true then the calculated delay will be a random integer value between minDelay and the calculated delay for the current iteration. - */ - jitter: boolean; - /** - * A timeout in milliseconds. If timeout is non-zero then a timer is set using setTimeout. If the timeout is triggered then future attempts will be aborted. - */ - timeout: number; - handleTimeout: (() => Promise) | null; - onOpen: (data: onOpenParameters) => void; - onConnect: () => void; - onMessage: (data: onMessageParameters) => void; - onOutgoingMessage: (data: onOutgoingMessageParameters) => void; - onStatus: (data: onStatusParameters) => void; - onDisconnect: (data: onDisconnectParameters) => void; - onClose: (data: onCloseParameters) => void; - onDestroy: () => void; - onAwarenessUpdate: (data: onAwarenessUpdateParameters) => void; - onAwarenessChange: (data: onAwarenessChangeParameters) => void; - /** - * Map of attached providers keyed by documentName. - */ - providerMap: Map; -} -export declare class HocuspocusProviderWebsocket extends EventEmitter { - private messageQueue; - configuration: CompleteHocuspocusProviderWebsocketConfiguration; - webSocket: HocusPocusWebSocket | null; - webSocketHandlers: { - [key: string]: any; - }; - shouldConnect: boolean; - status: WebSocketStatus; - lastMessageReceived: number; - identifier: number; - intervals: any; - connectionAttempt: { - resolve: (value?: any) => void; - reject: (reason?: any) => void; - } | null; - constructor(configuration: HocuspocusProviderWebsocketConfiguration); - receivedOnOpenPayload?: Event | undefined; - onOpen(event: Event): Promise; - attach(provider: HocuspocusProvider): void; - detach(provider: HocuspocusProvider): void; - setConfiguration(configuration?: Partial): void; - cancelWebsocketRetry?: () => void; - connect(): Promise; - attachWebSocketListeners(ws: HocusPocusWebSocket, reject: Function): void; - cleanupWebSocket(): void; - createWebSocketConnection(): Promise; - onMessage(event: MessageEvent): void; - resolveConnectionAttempt(): void; - stopConnectionAttempt(): void; - rejectConnectionAttempt(): void; - closeTries: number; - checkConnection(): void; - get serverUrl(): string; - get url(): string; - disconnect(): void; - send(message: any): void; - onClose({ event }: onCloseParameters): void; - destroy(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/IncomingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/IncomingMessage.d.ts deleted file mode 100644 index 8ce1ae6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/IncomingMessage.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import type { MessageType } from "./types.ts"; -export declare class IncomingMessage { - data: any; - encoder: Encoder; - decoder: Decoder; - constructor(data: any); - peekVarString(): string; - readVarUint(): MessageType; - readVarString(): string; - readVarUint8Array(): Uint8Array; - writeVarUint(type: MessageType): void; - writeVarString(string: string): void; - writeVarUint8Array(data: Uint8Array): void; - length(): number; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/MessageReceiver.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/MessageReceiver.d.ts deleted file mode 100644 index 06918ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/MessageReceiver.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { HocuspocusProvider } from "./HocuspocusProvider.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -export declare class MessageReceiver { - message: IncomingMessage; - constructor(message: IncomingMessage); - apply(provider: HocuspocusProvider, emitSynced: boolean): void; - private applySyncMessage; - applySyncStatusMessage(provider: HocuspocusProvider, applied: boolean): void; - private applyAwarenessMessage; - private applyAuthMessage; - private applyQueryAwarenessMessage; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/MessageSender.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/MessageSender.d.ts deleted file mode 100644 index 382772c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/MessageSender.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { ConstructableOutgoingMessage } from "./types.ts"; -export declare class MessageSender { - encoder: Encoder; - message: any; - constructor(Message: ConstructableOutgoingMessage, args?: any); - create(): Uint8Array; - send(webSocket: any): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessage.d.ts deleted file mode 100644 index 5b4db09..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { MessageType, OutgoingMessageArguments, OutgoingMessageInterface } from "./types.ts"; -export declare class OutgoingMessage implements OutgoingMessageInterface { - encoder: Encoder; - type?: MessageType; - constructor(); - get(args: Partial): Encoder | undefined; - toUint8Array(): Uint8Array; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts deleted file mode 100644 index 775990a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class AuthenticationMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts deleted file mode 100644 index b666f82..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class AwarenessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts deleted file mode 100644 index 7594c95..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class CloseMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts deleted file mode 100644 index eb37902..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class QueryAwarenessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts deleted file mode 100644 index 3349c73..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class StatelessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts deleted file mode 100644 index 55d1ea0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class SyncStepOneMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts deleted file mode 100644 index fa39f24..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class SyncStepTwoMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts deleted file mode 100644 index 3d5b4f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class UpdateMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/index.d.ts deleted file mode 100644 index c54d369..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./HocuspocusProvider.ts"; -export * from "./HocuspocusProviderWebsocket.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/types.d.ts deleted file mode 100644 index 3ef91a2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/provider/src/types.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { Event, MessageEvent } from "ws"; -import type { Awareness } from "y-protocols/awareness"; -import type * as Y from "yjs"; -import type { CloseEvent } from "@hocuspocus/common"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -import type { OutgoingMessage } from "./OutgoingMessage.ts"; -import type { AuthenticationMessage } from "./OutgoingMessages/AuthenticationMessage.ts"; -import type { AwarenessMessage } from "./OutgoingMessages/AwarenessMessage.ts"; -import type { QueryAwarenessMessage } from "./OutgoingMessages/QueryAwarenessMessage.ts"; -import type { SyncStepOneMessage } from "./OutgoingMessages/SyncStepOneMessage.ts"; -import type { SyncStepTwoMessage } from "./OutgoingMessages/SyncStepTwoMessage.ts"; -import type { UpdateMessage } from "./OutgoingMessages/UpdateMessage.ts"; -export declare enum MessageType { - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - Stateless = 5, - CLOSE = 7, - SyncStatus = 8 -} -export declare enum WebSocketStatus { - Connecting = "connecting", - Connected = "connected", - Disconnected = "disconnected" -} -export type AuthorizedScope = "read-write" | "readonly"; -export interface OutgoingMessageInterface { - encoder: Encoder; - type?: MessageType; -} -export interface OutgoingMessageArguments { - documentName: string; - token: string; - document: Y.Doc; - awareness: Awareness; - clients: number[]; - states: Map; - update: any; - payload: string; - encoder: Encoder; -} -export interface Constructable { - new (...args: any): T; -} -export type ConstructableOutgoingMessage = Constructable | Constructable | Constructable | Constructable | Constructable | Constructable; -export type onAuthenticationFailedParameters = { - reason: string; -}; -export type onAuthenticatedParameters = { - scope: AuthorizedScope; -}; -export type onOpenParameters = { - event: Event; -}; -export type onMessageParameters = { - event: MessageEvent; - message: IncomingMessage; -}; -export type onOutgoingMessageParameters = { - message: OutgoingMessage; -}; -export type onStatusParameters = { - status: WebSocketStatus; -}; -export type onSyncedParameters = { - state: boolean; -}; -export type onUnsyncedChangesParameters = { - number: number; -}; -export type onDisconnectParameters = { - event: CloseEvent; -}; -export type onCloseParameters = { - event: CloseEvent; -}; -export type onAwarenessUpdateParameters = { - states: StatesArray; -}; -export type onAwarenessChangeParameters = { - states: StatesArray; -}; -export type onStatelessParameters = { - payload: string; -}; -export type StatesArray = { - clientId: number; - [key: string | number]: any; -}[]; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/ClientConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/ClientConnection.d.ts deleted file mode 100644 index 93bb471..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/ClientConnection.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import { type CloseEvent } from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { onDisconnectPayload } from "./types.ts"; -/** - * The `ClientConnection` class is responsible for handling an incoming WebSocket - * - * TODO-refactor: - * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts - */ -export declare class ClientConnection { - private readonly websocket; - private readonly request; - private readonly documentProvider; - private readonly hooks; - private readonly opts; - private readonly defaultContext; - private readonly documentConnections; - private readonly incomingMessageQueue; - private readonly documentConnectionsEstablished; - private readonly hookPayloads; - private readonly callbacks; - private readonly socketId; - timeout: number; - pingInterval: NodeJS.Timeout; - pongReceived: boolean; - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it’ll fully establish the connection and - * load the Document then. - */ - constructor(websocket: WebSocket, request: IncomingMessage, documentProvider: { - createDocument: Hocuspocus["createDocument"]; - }, hooks: Hocuspocus["hooks"], opts: { - timeout: number; - }, defaultContext?: any); - private handleWebsocketClose; - close(event?: CloseEvent): void; - handlePong: () => void; - /** - * Check if pong was received and close the connection otherwise - * @private - */ - private check; - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, payload: onDisconnectPayload) => void): ClientConnection; - /** - * Create a new connection by the given request and document - */ - private createConnection; - private setUpNewConnection; - private handleQueueingMessage; - private messageHandler; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Connection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Connection.d.ts deleted file mode 100644 index ca8fa8c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Connection.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { IncomingMessage as HTTPIncomingMessage } from "node:http"; -import { type CloseEvent } from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type Document from "./Document.ts"; -import type { beforeSyncPayload, onStatelessPayload } from "./types.ts"; -export declare class Connection { - webSocket: WebSocket; - context: any; - document: Document; - request: HTTPIncomingMessage; - callbacks: { - onClose: ((document: Document, event?: CloseEvent) => void)[]; - beforeHandleMessage: (connection: Connection, update: Uint8Array) => Promise; - beforeSync: (connection: Connection, payload: Pick) => Promise; - statelessCallback: (payload: onStatelessPayload) => Promise; - onTokenSyncCallback: (payload: { - token: string; - }) => Promise; - }; - socketId: string; - readOnly: boolean; - /** - * Constructor. - */ - constructor(connection: WebSocket, request: HTTPIncomingMessage, document: Document, socketId: string, context: any, readOnly?: boolean); - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, event?: CloseEvent) => void): Connection; - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback(callback: (payload: onStatelessPayload) => Promise): Connection; - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage(callback: (connection: Connection, update: Uint8Array) => Promise): Connection; - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync(callback: (connection: Connection, payload: Pick) => Promise): Connection; - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback(callback: (payload: { - token: string; - }) => Promise): Connection; - /** - * Send the given message - */ - send(message: any): void; - /** - * Send a stateless message with payload - */ - sendStateless(payload: string): void; - /** - * Request current token from the client - */ - requestToken(): void; - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event?: CloseEvent): void; - /** - * Send the current document awareness to the client, if any - * @private - */ - private sendCurrentAwareness; - /** - * Handle an incoming message - * @public - */ - handleMessage(data: Uint8Array): void; -} -export default Connection; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/DirectConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/DirectConnection.d.ts deleted file mode 100644 index a1be911..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/DirectConnection.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { DirectConnection as DirectConnectionInterface } from "./types.ts"; -export declare class DirectConnection implements DirectConnectionInterface { - document: Document | null; - instance: Hocuspocus; - context: any; - /** - * Constructor. - */ - constructor(document: Document, instance: Hocuspocus, context?: any); - transact(transaction: (document: Document) => void): Promise; - disconnect(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Document.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Document.d.ts deleted file mode 100644 index 57faea7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Document.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { Mutex } from "async-mutex"; -import type WebSocket from "ws"; -import { Awareness } from "y-protocols/awareness"; -import { Doc } from "yjs"; -import type Connection from "./Connection.ts"; -export declare class Document extends Doc { - awareness: Awareness; - callbacks: { - onUpdate: (document: Document, connection: Connection, update: Uint8Array) => void; - beforeBroadcastStateless: (document: Document, stateless: string) => void; - }; - connections: Map; - connection: Connection; - }>; - directConnectionsCount: number; - name: string; - isLoading: boolean; - isDestroyed: boolean; - saveMutex: Mutex; - lastChangeTime: number; - /** - * Constructor. - */ - constructor(name: string, yDocOptions?: object); - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName: string): boolean; - /** - * Merge the given document(s) into this one - */ - merge(documents: Doc | Array): Document; - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate(callback: (document: Document, connection: Connection, update: Uint8Array) => void): Document; - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless(callback: (document: Document, stateless: string) => void): Document; - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection: Connection): Document; - /** - * Is the given connection registered on this document - */ - hasConnection(connection: Connection): boolean; - /** - * Remove the given connection from this document - */ - removeConnection(connection: Connection): Document; - addDirectConnection(): Document; - removeDirectConnection(): Document; - /** - * Get the number of active connections for this document - */ - getConnectionsCount(): number; - /** - * Get an array of registered connections - */ - getConnections(): Array; - /** - * Get the client ids for the given connection instance - */ - getClients(connectionInstance: WebSocket): Set; - /** - * Has the document awareness states - */ - hasAwarenessStates(): boolean; - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection: Connection, update: Uint8Array): Document; - /** - * Handle an awareness update and sync changes to clients - * @private - */ - private handleAwarenessUpdate; - /** - * Handle an updated document and sync changes to clients - */ - private handleUpdate; - /** - * Broadcast stateless message to all connections - */ - broadcastStateless(payload: string, filter?: (conn: Connection) => boolean): void; - destroy(): void; -} -export default Document; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Hocuspocus.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Hocuspocus.d.ts deleted file mode 100644 index fa1684f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Hocuspocus.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import type WebSocket from "ws"; -import { DirectConnection } from "./DirectConnection.ts"; -import Document from "./Document.ts"; -import type { Server } from "./Server.ts"; -import type { Configuration, ConnectionConfiguration, HookName, HookPayloadByName, onStoreDocumentPayload } from "./types.ts"; -export declare const defaultConfiguration: { - name: null; - timeout: number; - debounce: number; - maxDebounce: number; - quiet: boolean; - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; - unloadImmediately: boolean; -}; -export declare class Hocuspocus { - configuration: Configuration; - loadingDocuments: Map>; - unloadingDocuments: Map>; - documents: Map; - server?: Server; - debouncer: { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; - }; - constructor(configuration?: Partial); - /** - * Configure Hocuspocus - */ - configure(configuration: Partial): Hocuspocus; - /** - * Get the total number of active documents - */ - getDocumentsCount(): number; - /** - * Get the total number of active connections - */ - getConnectionsCount(): number; - /** - * Force close one or more connections - */ - closeConnections(documentName?: string): void; - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it’ll fully establish the connection and - * load the Document then. - */ - handleConnection(incoming: WebSocket, request: IncomingMessage, defaultContext?: any): void; - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - private handleDocumentUpdate; - /** - * Create a new document by the given request - */ - createDocument(documentName: string, request: Partial>, socketId: string, connection: ConnectionConfiguration, context?: any): Promise; - loadDocument(documentName: string, request: Partial>, socketId: string, connectionConfig: ConnectionConfiguration, context?: any): Promise; - storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload, immediately?: boolean): Promise; - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - hooks(name: T, payload: HookPayloadByName[T], callback?: Function | null): Promise; - shouldUnloadDocument(document: Document): boolean; - unloadDocument(document: Document): Promise; - openDirectConnection(documentName: string, context?: any): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/IncomingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/IncomingMessage.d.ts deleted file mode 100644 index 639bbdf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/IncomingMessage.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import type { MessageType } from "./types.ts"; -export declare class IncomingMessage { - /** - * Access to the received message. - */ - decoder: Decoder; - /** - * Private encoder; can be undefined. - * - * Lazy creation of the encoder speeds up IncomingMessages that need only a decoder. - */ - private encoderInternal?; - constructor(input: any); - get encoder(): Encoder; - readVarUint8Array(): Uint8Array; - peekVarUint8Array(): Uint8Array; - readVarUint(): number; - readVarString(): string; - toUint8Array(): Uint8Array; - writeVarUint(type: MessageType): void; - writeVarString(string: string): void; - get length(): number; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/MessageReceiver.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/MessageReceiver.d.ts deleted file mode 100644 index 6d864ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/MessageReceiver.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -export declare class MessageReceiver { - message: IncomingMessage; - defaultTransactionOrigin?: string; - constructor(message: IncomingMessage, defaultTransactionOrigin?: string); - apply(document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): void; - readSyncMessage(message: IncomingMessage, document: Document, connection?: Connection, reply?: (message: Uint8Array) => void, requestFirstSync?: boolean): 0 | 2 | 1; - applyQueryAwarenessMessage(document: Document, reply?: (message: Uint8Array) => void): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/OutgoingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/OutgoingMessage.d.ts deleted file mode 100644 index e4f9be2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/OutgoingMessage.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { Awareness } from "y-protocols/awareness"; -import type Document from "./Document.ts"; -export declare class OutgoingMessage { - encoder: Encoder; - type?: number; - category?: string; - constructor(documentName: string); - createSyncMessage(): OutgoingMessage; - createSyncReplyMessage(): OutgoingMessage; - createAwarenessUpdateMessage(awareness: Awareness, changedClients?: Array): OutgoingMessage; - writeQueryAwareness(): OutgoingMessage; - writeTokenSyncRequest(): OutgoingMessage; - writeAuthenticated(readonly: boolean): OutgoingMessage; - writePermissionDenied(reason: string): OutgoingMessage; - writeFirstSyncStepFor(document: Document): OutgoingMessage; - writeUpdate(update: Uint8Array): OutgoingMessage; - writeStateless(payload: string): OutgoingMessage; - writeBroadcastStateless(payload: string): OutgoingMessage; - writeSyncStatus(updateSaved: boolean): OutgoingMessage; - writeCloseMessage(reason: string): OutgoingMessage; - toUint8Array(): Uint8Array; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Server.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Server.d.ts deleted file mode 100644 index a1df4ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/Server.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { Server as HTTPServer, IncomingMessage, ServerResponse } from "node:http"; -import { WebSocketServer } from "ws"; -import type { AddressInfo, ServerOptions } from "ws"; -import { Hocuspocus } from "./Hocuspocus.ts"; -import type { Configuration } from "./types.ts"; -export interface ServerConfiguration extends Configuration { - port?: number; - address?: string; - stopOnSignals?: boolean; -} -export declare const defaultServerConfiguration: { - port: number; - address: string; - stopOnSignals: boolean; -}; -export declare class Server { - httpServer: HTTPServer; - webSocketServer: WebSocketServer; - hocuspocus: Hocuspocus; - configuration: ServerConfiguration; - constructor(configuration?: Partial, websocketOptions?: ServerOptions); - setupWebsocketConnection: () => void; - setupHttpUpgrade: () => void; - requestHandler: (request: IncomingMessage, response: ServerResponse) => Promise; - listen(port?: number, callback?: any): Promise; - get address(): AddressInfo; - destroy(): Promise; - get URL(): string; - get webSocketURL(): string; - get httpURL(): string; - private showStartScreen; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/index.d.ts deleted file mode 100644 index 8ede6d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from "./Connection.ts"; -export * from "./Document.ts"; -export * from "./Hocuspocus.ts"; -export * from "./IncomingMessage.ts"; -export * from "./MessageReceiver.ts"; -export * from "./OutgoingMessage.ts"; -export * from "./Server.ts"; -export * from "./types.ts"; -export * from "./util/debounce.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/types.d.ts deleted file mode 100644 index 615cacc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/types.d.ts +++ /dev/null @@ -1,342 +0,0 @@ -import type { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "node:http"; -import type { URLSearchParams } from "node:url"; -import type { Awareness } from "y-protocols/awareness"; -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -export declare enum MessageType { - Unknown = -1, - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - SyncReply = 4,// same as Sync, but won't trigger another 'SyncStep1' - Stateless = 5, - BroadcastStateless = 6, - CLOSE = 7, - SyncStatus = 8 -} -export interface AwarenessUpdate { - added: Array; - updated: Array; - removed: Array; -} -export interface ConnectionConfiguration { - readOnly: boolean; - isAuthenticated: boolean; -} -export interface Extension { - priority?: number; - extensionName?: string; - onConfigure?(data: onConfigurePayload): Promise; - onListen?(data: onListenPayload): Promise; - onUpgrade?(data: onUpgradePayload): Promise; - onConnect?(data: onConnectPayload): Promise; - connected?(data: connectedPayload): Promise; - onAuthenticate?(data: onAuthenticatePayload): Promise; - onTokenSync?(data: onTokenSyncPayload): Promise; - onCreateDocument?(data: onCreateDocumentPayload): Promise; - onLoadDocument?(data: onLoadDocumentPayload): Promise; - afterLoadDocument?(data: afterLoadDocumentPayload): Promise; - beforeHandleMessage?(data: beforeHandleMessagePayload): Promise; - beforeSync?(data: beforeSyncPayload): Promise; - beforeBroadcastStateless?(data: beforeBroadcastStatelessPayload): Promise; - onStateless?(payload: onStatelessPayload): Promise; - onChange?(data: onChangePayload): Promise; - onStoreDocument?(data: onStoreDocumentPayload): Promise; - afterStoreDocument?(data: afterStoreDocumentPayload): Promise; - onAwarenessUpdate?(data: onAwarenessUpdatePayload): Promise; - onRequest?(data: onRequestPayload): Promise; - onDisconnect?(data: onDisconnectPayload): Promise; - beforeUnloadDocument?(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument?(data: afterUnloadDocumentPayload): Promise; - onDestroy?(data: onDestroyPayload): Promise; -} -export type HookName = "onConfigure" | "onListen" | "onUpgrade" | "onConnect" | "connected" | "onAuthenticate" | "onTokenSync" | "onCreateDocument" | "onLoadDocument" | "afterLoadDocument" | "beforeHandleMessage" | "beforeBroadcastStateless" | "beforeSync" | "onStateless" | "onChange" | "onStoreDocument" | "afterStoreDocument" | "onAwarenessUpdate" | "onRequest" | "onDisconnect" | "beforeUnloadDocument" | "afterUnloadDocument" | "onDestroy"; -export type HookPayloadByName = { - onConfigure: onConfigurePayload; - onListen: onListenPayload; - onUpgrade: onUpgradePayload; - onConnect: onConnectPayload; - connected: connectedPayload; - onAuthenticate: onAuthenticatePayload; - onTokenSync: onTokenSyncPayload; - onCreateDocument: onCreateDocumentPayload; - onLoadDocument: onLoadDocumentPayload; - afterLoadDocument: afterLoadDocumentPayload; - beforeHandleMessage: beforeHandleMessagePayload; - beforeBroadcastStateless: beforeBroadcastStatelessPayload; - beforeSync: beforeSyncPayload; - onStateless: onStatelessPayload; - onChange: onChangePayload; - onStoreDocument: onStoreDocumentPayload; - afterStoreDocument: afterStoreDocumentPayload; - onAwarenessUpdate: onAwarenessUpdatePayload; - onRequest: onRequestPayload; - onDisconnect: onDisconnectPayload; - afterUnloadDocument: afterUnloadDocumentPayload; - beforeUnloadDocument: beforeUnloadDocumentPayload; - onDestroy: onDestroyPayload; -}; -export interface Configuration extends Extension { - /** - * A name for the instance, used for logging. - */ - name: string | null; - /** - * A list of hocuspocus extensions. - */ - extensions: Array; - /** - * Defines in which interval the server sends a ping, and closes the connection when no pong is sent back. - */ - timeout: number; - /** - * Debounces the call of the `onStoreDocument` hook for the given amount of time in ms. - * Otherwise every single update would be persisted. - */ - debounce: number; - /** - * Makes sure to call `onStoreDocument` at least in the given amount of time (ms). - */ - maxDebounce: number; - /** - * By default, the servers show a start screen. If passed false, the server will start quietly. - */ - quiet: boolean; - /** - * If set to false, respects the debounce time of `onStoreDocument` before unloading a document. - * Otherwise, the document will be unloaded immediately. - * - * This prevents a client from DOSing the server by repeatedly connecting and disconnecting when - * your onStoreDocument is rate-limited. - */ - unloadImmediately: boolean; - /** - * options to pass to the ydoc document - */ - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; -} -export interface onStatelessPayload { - connection: Connection; - documentName: string; - document: Document; - payload: string; -} -export interface onAuthenticatePayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - request: IncomingMessage; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; -} -export interface onTokenSyncPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} -export interface onCreateDocumentPayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface onConnectPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface connectedPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} -export interface onLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface afterLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface onChangePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - transactionOrigin: any; -} -export interface beforeHandleMessagePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - connection: Connection; -} -export interface beforeSyncPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - connection: Connection; - /** - * The y-protocols/sync message type - * @example - * 0: SyncStep1 - * 1: SyncStep2 - * 2: YjsUpdate - * - * @see https://github.com/yjs/y-protocols/blob/master/sync.js#L13-L40 - */ - type: number; - /** - * The payload of the y-sync message. - */ - payload: Uint8Array; -} -export interface beforeBroadcastStatelessPayload { - document: Document; - documentName: string; - payload: string; -} -export interface onStoreDocumentPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - transactionOrigin?: any; -} -export interface afterStoreDocumentPayload extends onStoreDocumentPayload { -} -export interface onAwarenessUpdatePayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - added: number[]; - updated: number[]; - removed: number[]; - awareness: Awareness; - states: StatesArray; -} -export type StatesArray = { - clientId: number; - [key: string | number]: any; -}[]; -export interface fetchPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface storePayload extends onStoreDocumentPayload { - state: Buffer; -} -export interface onDisconnectPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; -} -export interface onRequestPayload { - request: IncomingMessage; - response: ServerResponse; - instance: Hocuspocus; -} -export interface onUpgradePayload { - request: IncomingMessage; - socket: any; - head: any; - instance: Hocuspocus; -} -export interface onListenPayload { - instance: Hocuspocus; - configuration: Configuration; - port: number; -} -export interface onDestroyPayload { - instance: Hocuspocus; -} -export interface onConfigurePayload { - instance: Hocuspocus; - configuration: Configuration; - version: string; -} -export interface afterUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; -} -export interface beforeUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; - document: Document; -} -export interface DirectConnection { - transact(transaction: (document: Document) => void): Promise; - disconnect(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/util/debounce.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/util/debounce.d.ts deleted file mode 100644 index 4573cfd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/util/debounce.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare const useDebounce: () => { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/util/getParameters.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/util/getParameters.d.ts deleted file mode 100644 index a0100ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/server/src/util/getParameters.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import { URLSearchParams } from "node:url"; -/** - * Get parameters by the given request - */ -export declare function getParameters(request?: Pick): URLSearchParams; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/Prosemirror.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/Prosemirror.d.ts deleted file mode 100644 index 06db1a6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/Prosemirror.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Doc } from "yjs"; -import { Schema } from "@tiptap/pm/model"; -import type { Transformer } from "./types.ts"; -declare class Prosemirror implements Transformer { - defaultSchema: Schema; - schema(schema: Schema): Prosemirror; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, schema?: Schema): Doc; -} -export declare const ProsemirrorTransformer: Prosemirror; -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/Tiptap.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/Tiptap.d.ts deleted file mode 100644 index 3d64c14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/Tiptap.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Doc } from "yjs"; -import type { Extensions } from "@tiptap/core"; -import type { Transformer } from "./types.ts"; -export declare class Tiptap implements Transformer { - defaultExtensions: Extensions; - extensions(extensions: Extensions): Tiptap; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, extensions?: Extensions): Doc; -} -export declare const TiptapTransformer: Tiptap; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/index.d.ts deleted file mode 100644 index a8debe5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./Prosemirror.ts"; -export * from "./Tiptap.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/types.d.ts deleted file mode 100644 index 1c2f6da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/packages/transformer/src/types.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Doc } from "yjs"; -export interface Transformer { - fromYdoc: (document: Doc, fieldName?: string | Array) => any; - toYdoc: (document: any, fieldName: string) => Doc; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/default.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/default.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/deno.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/deno.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/deno.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/express.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/express.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/express.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/hono.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/hono.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/hono.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/koa.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/koa.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/koa.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/load-document.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/load-document.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/load-document.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/redis.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/redis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/s3-redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/s3-redis.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/s3-redis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/s3.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/s3.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/s3.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/slow.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/slow.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/slow.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/tiptapcollab.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/tiptapcollab.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/tiptapcollab.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/webhook.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/webhook.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/backend/src/webhook.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/app/SocketContext1.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/app/SocketContext1.d.ts deleted file mode 100644 index d0725fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/app/SocketContext1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { HocuspocusProviderWebsocket } from "@hocuspocus/provider"; -export declare const SocketContext1: import("react").Context; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/app/SocketContext2.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/app/SocketContext2.d.ts deleted file mode 100644 index ac4da99..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/app/SocketContext2.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { HocuspocusProviderWebsocket } from "@hocuspocus/provider"; -export declare const SocketContext2: import("react").Context; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/next.config.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/next.config.d.ts deleted file mode 100644 index 2821dfb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/playground/frontend/next.config.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { NextConfig } from "next"; -declare const nextConfig: NextConfig; -export default nextConfig; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-database/fetch.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-database/fetch.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-database/fetch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-logger/onListen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-logger/onListen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-logger/onListen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onAwarenessChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onAwarenessChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onAwarenessChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-redis/onStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-s3/fetch.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-s3/fetch.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-s3/fetch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-throttle/banning.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-throttle/banning.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-throttle/banning.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-throttle/configuration.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-throttle/configuration.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/extension-throttle/configuration.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/hasUnsyncedChanges.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/hasUnsyncedChanges.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/hasUnsyncedChanges.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/observe.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/observe.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/observe.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/observeDeep.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/observeDeep.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/observeDeep.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAuthenticated.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAuthenticated.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAuthenticated.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAuthenticationFailed.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAuthenticationFailed.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAuthenticationFailed.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAwarenessChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAwarenessChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAwarenessChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAwarenessUpdate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAwarenessUpdate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onAwarenessUpdate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onClose.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onClose.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onClose.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onConnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onConnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onConnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onDisconnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onDisconnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onDisconnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onMessage.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onMessage.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onOpen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onOpen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onOpen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onSynced.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onSynced.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/provider/onSynced.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/providerwebsocket/configuration.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/providerwebsocket/configuration.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/providerwebsocket/configuration.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/address.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/address.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/address.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterLoadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterLoadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterLoadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterUnloadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterUnloadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/afterUnloadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeBroadcastStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeBroadcastStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeBroadcastStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeHandleMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeHandleMessage.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeHandleMessage.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeSync.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeSync.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeSync.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeUnloadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeUnloadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/beforeUnloadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/closeConnections.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/closeConnections.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/closeConnections.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/getConnectionsCount.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/getConnectionsCount.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/getConnectionsCount.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/getDocumentsCount.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/getDocumentsCount.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/getDocumentsCount.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/listen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/listen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/listen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onAuthenticate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onAuthenticate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onAuthenticate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onAwarenessUpdate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onAwarenessUpdate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onAwarenessUpdate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onClose.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onClose.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onClose.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onConfigure.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onConfigure.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onConfigure.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onConnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onConnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onConnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onDestroy.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onDestroy.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onDestroy.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onDisconnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onDisconnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onDisconnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onListen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onListen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onListen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onLoadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onLoadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onLoadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onRequest.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onRequest.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onRequest.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onTokenSync.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onTokenSync.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onTokenSync.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onUpgrade.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onUpgrade.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/onUpgrade.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/openDirectConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/openDirectConnection.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/openDirectConnection.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/websocketError.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/websocketError.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/server/websocketError.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/transformer/TiptapTransformer.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/transformer/TiptapTransformer.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/transformer/TiptapTransformer.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/createDirectory.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/createDirectory.d.ts deleted file mode 100644 index 7affbc2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/createDirectory.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const createDirectory: (dir: string) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/flushRedis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/flushRedis.d.ts deleted file mode 100644 index 5a548da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/flushRedis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const flushRedis: () => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/index.d.ts deleted file mode 100644 index 789d5d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from './createDirectory.ts'; -export * from './flushRedis.ts'; -export * from './newHocuspocus.ts'; -export * from './newHocuspocusProvider.ts'; -export * from './newHocuspocusProviderWebsocket.ts'; -export * from './randomInteger.ts'; -export * from './redisConnectionSettings.ts'; -export * from './removeDirectory.ts'; -export * from './sleep.ts'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocus.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocus.d.ts deleted file mode 100644 index c3de52e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocus.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { ServerConfiguration } from '@hocuspocus/server'; -export declare const newHocuspocus: (options?: Partial) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocusProvider.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocusProvider.d.ts deleted file mode 100644 index 09e3f10..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocusProvider.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { HocuspocusProvider, type HocuspocusProviderConfiguration, type HocuspocusProviderWebsocket, type HocuspocusProviderWebsocketConfiguration } from '@hocuspocus/provider'; -import type { Hocuspocus } from '@hocuspocus/server'; -export declare const newHocuspocusProvider: (server: Hocuspocus, options?: Partial, websocketOptions?: Partial, websocketProvider?: HocuspocusProviderWebsocket) => HocuspocusProvider; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts deleted file mode 100644 index 97bb454..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HocuspocusProviderWebsocketConfiguration } from '@hocuspocus/provider'; -import { HocuspocusProviderWebsocket } from '@hocuspocus/provider'; -import type { Hocuspocus } from '@hocuspocus/server'; -export declare const newHocuspocusProviderWebsocket: (hocuspocus: Hocuspocus, options?: Partial>) => HocuspocusProviderWebsocket; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/randomInteger.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/randomInteger.d.ts deleted file mode 100644 index b28e7b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/randomInteger.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const randomInteger: (min: number, max: number) => number; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/redisConnectionSettings.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/redisConnectionSettings.d.ts deleted file mode 100644 index 52c31fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/redisConnectionSettings.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const redisConnectionSettings: { - host: string; - port: number; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/removeDirectory.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/removeDirectory.d.ts deleted file mode 100644 index 71b4ffc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/removeDirectory.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const removeDirectory: (dir: string) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/retryableAssertion.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/retryableAssertion.d.ts deleted file mode 100644 index 1016874..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/retryableAssertion.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { ExecutionContext } from 'ava'; -export declare const retryableAssertion: (t: ExecutionContext, recoverableTry: (tt: ExecutionContext) => void) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/sleep.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/sleep.d.ts deleted file mode 100644 index 2450ca0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/dist/tests/utils/sleep.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const sleep: (time: number) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/package.json b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/package.json deleted file mode 100644 index 40d397b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@hocuspocus/extension-sqlite", - "description": "a generic Hocuspocus persistence driver for the sqlite", - "version": "3.4.4", - "homepage": "https://hocuspocus.dev", - "keywords": [ - "hocuspocus", - "yjs" - ], - "license": "MIT", - "type": "module", - "main": "dist/hocuspocus-sqlite.cjs", - "module": "dist/hocuspocus-sqlite.esm.js", - "types": "dist/packages/extension-sqlite/src/index.d.ts", - "exports": { - "source": { - "import": "./src/index.ts" - }, - "default": { - "import": "./dist/hocuspocus-sqlite.esm.js", - "require": "./dist/hocuspocus-sqlite.cjs", - "types": "./dist/packages/extension-sqlite/src/index.d.ts" - } - }, - "files": [ - "src", - "dist" - ], - "dependencies": { - "@hocuspocus/extension-database": "^3.4.4", - "kleur": "^4.1.4", - "sqlite3": "^5.1.7" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "b3454a4ca289a84ddfb7fa5607a2d4b8d5c37e9d", - "repository": { - "url": "https://github.com/ueberdosis/hocuspocus" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/src/SQLite.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/src/SQLite.ts deleted file mode 100644 index 15bc5ee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/src/SQLite.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type { DatabaseConfiguration } from "@hocuspocus/extension-database"; -import { Database } from "@hocuspocus/extension-database"; -import sqlite3 from "sqlite3"; -import kleur from "kleur"; - -export const schema = `CREATE TABLE IF NOT EXISTS "documents" ( - "name" varchar(255) NOT NULL, - "data" blob NOT NULL, - UNIQUE(name) -)`; - -export const selectQuery = ` - SELECT data FROM "documents" WHERE name = $name ORDER BY rowid DESC -`; - -export const upsertQuery = ` - INSERT INTO "documents" ("name", "data") VALUES ($name, $data) - ON CONFLICT(name) DO UPDATE SET data = $data -`; - -const SQLITE_INMEMORY = ":memory:"; - -export interface SQLiteConfiguration extends DatabaseConfiguration { - /** - * Valid values are filenames, ":memory:" for an anonymous in-memory database and an empty - * string for an anonymous disk-based database. Anonymous databases are not persisted and - * when closing the database handle, their contents are lost. - * - * https://github.com/mapbox/node-sqlite3/wiki/API#new-sqlite3databasefilename-mode-callback - */ - database: string; - /** - * The database schema to create. - */ - schema: string; -} - -export class SQLite extends Database { - db?: sqlite3.Database; - - configuration: SQLiteConfiguration = { - database: SQLITE_INMEMORY, - schema, - fetch: async ({ documentName }) => { - return new Promise((resolve, reject) => { - this.db?.get( - selectQuery, - { - $name: documentName, - }, - (error, row) => { - if (error) { - reject(error); - } - - resolve((row as any)?.data); - }, - ); - }); - }, - store: async ({ documentName, state }) => { - this.db?.run(upsertQuery, { - $name: documentName, - $data: state, - }); - }, - }; - - constructor(configuration?: Partial) { - super({}); - - this.configuration = { - ...this.configuration, - ...configuration, - }; - } - - async onConfigure() { - this.db = new sqlite3.Database(this.configuration.database); - this.db.run(this.configuration.schema); - } - - async onListen() { - if (this.configuration.database === SQLITE_INMEMORY) { - console.warn( - ` ${kleur.yellow("The SQLite extension is configured as an in-memory database. All changes will be lost on restart!")}`, - ); - console.log(); - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/src/index.ts deleted file mode 100644 index 8013efb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/extension-sqlite/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./SQLite.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur deleted file mode 120000 index 535c894..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur +++ /dev/null @@ -1 +0,0 @@ -../../kleur@4.1.5/node_modules/kleur \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/sqlite3 b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/sqlite3 deleted file mode 120000 index d23e2f3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+extension-sqlite@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/sqlite3 +++ /dev/null @@ -1 +0,0 @@ -../../sqlite3@5.1.7/node_modules/sqlite3 \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/common b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/common deleted file mode 120000 index e57977a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/common +++ /dev/null @@ -1 +0,0 @@ -../../../@hocuspocus+common@3.4.4/node_modules/@hocuspocus/common \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/README.md b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/README.md deleted file mode 100644 index 53e0cdf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# @hocuspocus/server -[![Version](https://img.shields.io/npm/v/@hocuspocus/server.svg?label=version)](https://www.npmjs.com/package/@hocuspocus/server) -[![Downloads](https://img.shields.io/npm/dm/@hocuspocus/server.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@hocuspocus/server.svg)](https://www.npmjs.com/package/@hocuspocus/server) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction -Hocuspocus is an opinionated collaborative editing backend for [Tiptap](https://github.com/ueberdosis/tiptap) – based on [Y.js](https://github.com/yjs/yjs), a CRDT framework with a powerful abstraction of shared data. - -## Official Documentation -Documentation can be found in the [GitHub repository](https://github.com/ueberdosis/hocuspocus). - -## License -Hocuspocus is open-sourced software licensed under the [MIT license](https://github.com/ueberdosis/hocuspocus/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs deleted file mode 100644 index b24ff6d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs +++ /dev/null @@ -1,2827 +0,0 @@ -'use strict'; - -var common = require('@hocuspocus/common'); -var Y = require('yjs'); -var asyncMutex = require('async-mutex'); -var crypto = require('node:crypto'); -var node_url = require('node:url'); -var node_http = require('node:http'); -var kleur = require('kleur'); -var ws = require('ws'); - -function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n.default = e; - return Object.freeze(n); -} - -var Y__namespace = /*#__PURE__*/_interopNamespaceDefault(Y); - -/* eslint-env browser */ - -const BIT8 = 128; -const BITS7 = 127; - -/** - * Common Math expressions. - * - * @module math - */ - -const floor = Math.floor; - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The smaller element of a and b - */ -const min = (a, b) => a < b ? a : b; - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The bigger element of a and b - */ -const max = (a, b) => a > b ? a : b; - -/** - * Utility helpers for working with numbers. - * - * @module number - */ - - -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER; - -/** - * Utility module to work with sets. - * - * @module set - */ - -const create$2 = () => new Set(); - -/** - * Utility module to work with Arrays. - * - * @module array - */ - - -/** - * Transforms something array-like to an actual Array. - * - * @function - * @template T - * @param {ArrayLike|Iterable} arraylike - * @return {T} - */ -const from = Array.from; - -/** - * @param {string} str - * @return {Uint8Array} - */ -const _encodeUtf8Polyfill = str => { - const encodedString = unescape(encodeURIComponent(str)); - const len = encodedString.length; - const buf = new Uint8Array(len); - for (let i = 0; i < len; i++) { - buf[i] = /** @type {number} */ (encodedString.codePointAt(i)); - } - return buf -}; - -/* c8 ignore next */ -const utf8TextEncoder = /** @type {TextEncoder} */ (typeof TextEncoder !== 'undefined' ? new TextEncoder() : null); - -/** - * @param {string} str - * @return {Uint8Array} - */ -const _encodeUtf8Native = str => utf8TextEncoder.encode(str); - -/** - * @param {string} str - * @return {Uint8Array} - */ -/* c8 ignore next */ -const encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill; - -/* c8 ignore next */ -let utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }); - -/* c8 ignore start */ -if (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) { - // Safari doesn't handle BOM correctly. - // This fixes a bug in Safari 13.0.5 where it produces a BOM the first time it is called. - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the first call and - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the second call - // Another issue is that from then on no BOM chars are recognized anymore - /* c8 ignore next */ - utf8TextDecoder = null; -} - -/** - * Error helpers. - * - * @module error - */ - -/** - * @param {string} s - * @return {Error} - */ -/* c8 ignore next */ -const create$1 = s => new Error(s); - -/** - * Efficient schema-less binary encoding with support for variable length encoding. - * - * Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module encoding - */ - - -/** - * A BinaryEncoder handles the encoding to an Uint8Array. - */ -class Encoder { - constructor () { - this.cpos = 0; - this.cbuf = new Uint8Array(100); - /** - * @type {Array} - */ - this.bufs = []; - } -} - -/** - * @function - * @return {Encoder} - */ -const createEncoder = () => new Encoder(); - -/** - * The current length of the encoded data. - * - * @function - * @param {Encoder} encoder - * @return {number} - */ -const length$1 = encoder => { - let len = encoder.cpos; - for (let i = 0; i < encoder.bufs.length; i++) { - len += encoder.bufs[i].length; - } - return len -}; - -/** - * Transform to Uint8Array. - * - * @function - * @param {Encoder} encoder - * @return {Uint8Array} The created ArrayBuffer. - */ -const toUint8Array = encoder => { - const uint8arr = new Uint8Array(length$1(encoder)); - let curPos = 0; - for (let i = 0; i < encoder.bufs.length; i++) { - const d = encoder.bufs[i]; - uint8arr.set(d, curPos); - curPos += d.length; - } - uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos); - return uint8arr -}; - -/** - * Write one byte to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {number} num The byte that is to be encoded. - */ -const write = (encoder, num) => { - const bufferLen = encoder.cbuf.length; - if (encoder.cpos === bufferLen) { - encoder.bufs.push(encoder.cbuf); - encoder.cbuf = new Uint8Array(bufferLen * 2); - encoder.cpos = 0; - } - encoder.cbuf[encoder.cpos++] = num; -}; - -/** - * Write a variable length unsigned integer. Max encodable integer is 2^53. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -const writeVarUint = (encoder, num) => { - while (num > BITS7) { - write(encoder, BIT8 | (BITS7 & num)); - num = floor(num / 128); // shift >>> 7 - } - write(encoder, BITS7 & num); -}; - -/** - * A cache to store strings temporarily - */ -const _strBuffer = new Uint8Array(30000); -const _maxStrBSize = _strBuffer.length / 3; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -const _writeVarStringNative = (encoder, str) => { - if (str.length < _maxStrBSize) { - // We can encode the string into the existing buffer - /* c8 ignore next */ - const written = utf8TextEncoder.encodeInto(str, _strBuffer).written || 0; - writeVarUint(encoder, written); - for (let i = 0; i < written; i++) { - write(encoder, _strBuffer[i]); - } - } else { - writeVarUint8Array(encoder, encodeUtf8(str)); - } -}; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -const _writeVarStringPolyfill = (encoder, str) => { - const encodedString = unescape(encodeURIComponent(str)); - const len = encodedString.length; - writeVarUint(encoder, len); - for (let i = 0; i < len; i++) { - write(encoder, /** @type {number} */ (encodedString.codePointAt(i))); - } -}; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -/* c8 ignore next */ -const writeVarString = (utf8TextEncoder && /** @type {any} */ (utf8TextEncoder).encodeInto) ? _writeVarStringNative : _writeVarStringPolyfill; - -/** - * Append fixed-length Uint8Array to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -const writeUint8Array = (encoder, uint8Array) => { - const bufferLen = encoder.cbuf.length; - const cpos = encoder.cpos; - const leftCopyLen = min(bufferLen - cpos, uint8Array.length); - const rightCopyLen = uint8Array.length - leftCopyLen; - encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos); - encoder.cpos += leftCopyLen; - if (rightCopyLen > 0) { - // Still something to write, write right half.. - // Append new buffer - encoder.bufs.push(encoder.cbuf); - // must have at least size of remaining buffer - encoder.cbuf = new Uint8Array(max(bufferLen * 2, rightCopyLen)); - // copy array - encoder.cbuf.set(uint8Array.subarray(leftCopyLen)); - encoder.cpos = rightCopyLen; - } -}; - -/** - * Append an Uint8Array to Encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -const writeVarUint8Array = (encoder, uint8Array) => { - writeVarUint(encoder, uint8Array.byteLength); - writeUint8Array(encoder, uint8Array); -}; - -/** - * Efficient schema-less binary decoding with support for variable length encoding. - * - * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module decoding - */ - - -const errorUnexpectedEndOfArray = create$1('Unexpected end of array'); -const errorIntegerOutOfRange = create$1('Integer out of Range'); - -/** - * A Decoder handles the decoding of an Uint8Array. - */ -class Decoder { - /** - * @param {Uint8Array} uint8Array Binary data to decode - */ - constructor (uint8Array) { - /** - * Decoding target. - * - * @type {Uint8Array} - */ - this.arr = uint8Array; - /** - * Current decoding position. - * - * @type {number} - */ - this.pos = 0; - } -} - -/** - * @function - * @param {Uint8Array} uint8Array - * @return {Decoder} - */ -const createDecoder = uint8Array => new Decoder(uint8Array); - -/** - * Create an Uint8Array view of the next `len` bytes and advance the position by `len`. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @param {Decoder} decoder The decoder instance - * @param {number} len The length of bytes to read - * @return {Uint8Array} - */ -const readUint8Array = (decoder, len) => { - const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len); - decoder.pos += len; - return view -}; - -/** - * Read variable length Uint8Array. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @param {Decoder} decoder - * @return {Uint8Array} - */ -const readVarUint8Array = decoder => readUint8Array(decoder, readVarUint(decoder)); - -/** - * Read one byte as unsigned integer. - * @function - * @param {Decoder} decoder The decoder instance - * @return {number} Unsigned 8-bit integer - */ -const readUint8 = decoder => decoder.arr[decoder.pos++]; - -/** - * Read unsigned integer (32bit) with variable length. - * 1/8th of the storage is used as encoding overhead. - * * numbers < 2^7 is stored in one bytlength - * * numbers < 2^14 is stored in two bylength - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer.length - */ -const readVarUint = decoder => { - let num = 0; - let mult = 1; - const len = decoder.arr.length; - while (decoder.pos < len) { - const r = decoder.arr[decoder.pos++]; - // num = num | ((r & binary.BITS7) << len) - num = num + (r & BITS7) * mult; // shift $r << (7*#iterations) and add it to num - mult *= 128; // next iteration, shift 7 "more" to the left - if (r < BIT8) { - return num - } - /* c8 ignore start */ - if (num > MAX_SAFE_INTEGER) { - throw errorIntegerOutOfRange - } - /* c8 ignore stop */ - } - throw errorUnexpectedEndOfArray -}; - -/** - * We don't test this function anymore as we use native decoding/encoding by default now. - * Better not modify this anymore.. - * - * Transforming utf8 to a string is pretty expensive. The code performs 10x better - * when String.fromCodePoint is fed with all characters as arguments. - * But most environments have a maximum number of arguments per functions. - * For effiency reasons we apply a maximum of 10000 characters at once. - * - * @function - * @param {Decoder} decoder - * @return {String} The read String. - */ -/* c8 ignore start */ -const _readVarStringPolyfill = decoder => { - let remainingLen = readVarUint(decoder); - if (remainingLen === 0) { - return '' - } else { - let encodedString = String.fromCodePoint(readUint8(decoder)); // remember to decrease remainingLen - if (--remainingLen < 100) { // do not create a Uint8Array for small strings - while (remainingLen--) { - encodedString += String.fromCodePoint(readUint8(decoder)); - } - } else { - while (remainingLen > 0) { - const nextLen = remainingLen < 10000 ? remainingLen : 10000; - // this is dangerous, we create a fresh array view from the existing buffer - const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen); - decoder.pos += nextLen; - // Starting with ES5.1 we can supply a generic array-like object as arguments - encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes)); - remainingLen -= nextLen; - } - } - return decodeURIComponent(escape(encodedString)) - } -}; -/* c8 ignore stop */ - -/** - * @function - * @param {Decoder} decoder - * @return {String} The read String - */ -const _readVarStringNative = decoder => - /** @type any */ (utf8TextDecoder).decode(readVarUint8Array(decoder)); - -/** - * Read string of variable length - * * varUint is used to store the length of the string - * - * @function - * @param {Decoder} decoder - * @return {String} The read String - * - */ -/* c8 ignore next */ -const readVarString = utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill; - -class IncomingMessage { - constructor(input) { - if (!(input instanceof Uint8Array)) { - input = new Uint8Array(input); - } - this.decoder = createDecoder(input); - } - get encoder() { - if (!this.encoderInternal) { - this.encoderInternal = createEncoder(); - } - return this.encoderInternal; - } - readVarUint8Array() { - return readVarUint8Array(this.decoder); - } - peekVarUint8Array() { - const { pos } = this.decoder; - const result = readVarUint8Array(this.decoder); - this.decoder.pos = pos; - return result; - } - readVarUint() { - return readVarUint(this.decoder); - } - readVarString() { - return readVarString(this.decoder); - } - toUint8Array() { - return toUint8Array(this.encoder); - } - writeVarUint(type) { - writeVarUint(this.encoder, type); - } - writeVarString(string) { - writeVarString(this.encoder, string); - } - get length() { - return length$1(this.encoder); - } -} - -/** - * Utility module to work with time. - * - * @module time - */ - - -/** - * Return current unix time. - * - * @return {number} - */ -const getUnixTime = Date.now; - -/** - * Utility module to work with key-value stores. - * - * @module map - */ - -/** - * Creates a new Map instance. - * - * @function - * @return {Map} - * - * @function - */ -const create = () => new Map(); - -/** - * Get map property. Create T if property is undefined and set T on map. - * - * ```js - * const listeners = map.setIfUndefined(events, 'eventName', set.create) - * listeners.add(listener) - * ``` - * - * @function - * @template {Map} MAP - * @template {MAP extends Map ? function():V : unknown} CF - * @param {MAP} map - * @param {MAP extends Map ? K : unknown} key - * @param {CF} createT - * @return {ReturnType} - */ -const setIfUndefined = (map, key, createT) => { - let set = map.get(key); - if (set === undefined) { - map.set(key, set = createT()); - } - return set -}; - -/** - * Observable class prototype. - * - * @module observable - */ - - -/* c8 ignore start */ -/** - * Handles named events. - * - * @deprecated - * @template N - */ -class Observable { - constructor () { - /** - * Some desc. - * @type {Map} - */ - this._observers = create(); - } - - /** - * @param {N} name - * @param {function} f - */ - on (name, f) { - setIfUndefined(this._observers, name, create$2).add(f); - } - - /** - * @param {N} name - * @param {function} f - */ - once (name, f) { - /** - * @param {...any} args - */ - const _f = (...args) => { - this.off(name, _f); - f(...args); - }; - this.on(name, _f); - } - - /** - * @param {N} name - * @param {function} f - */ - off (name, f) { - const observers = this._observers.get(name); - if (observers !== undefined) { - observers.delete(f); - if (observers.size === 0) { - this._observers.delete(name); - } - } - } - - /** - * Emit a named event. All registered event listeners that listen to the - * specified name will receive the event. - * - * @todo This should catch exceptions - * - * @param {N} name The event name. - * @param {Array} args The arguments that are applied to the event listener. - */ - emit (name, args) { - // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called. - return from((this._observers.get(name) || create()).values()).forEach(f => f(...args)) - } - - destroy () { - this._observers = create(); - } -} -/* c8 ignore end */ - -/** - * Utility functions for working with EcmaScript objects. - * - * @module object - */ - - -/** - * @param {Object} obj - */ -const keys = Object.keys; - -/** - * @deprecated use object.size instead - * @param {Object} obj - * @return {number} - */ -const length = obj => keys(obj).length; - -/** - * Calls `Object.prototype.hasOwnProperty`. - * - * @param {any} obj - * @param {string|symbol} key - * @return {boolean} - */ -const hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key); - -/** - * Common functions and function call helpers. - * - * @module function - */ - - -/** - * @template T - * - * @param {T} a - * @param {T} b - * @return {boolean} - */ -const equalityStrict = (a, b) => a === b; - -/* c8 ignore start */ - -/** - * @param {any} a - * @param {any} b - * @return {boolean} - */ -const equalityDeep = (a, b) => { - if (a == null || b == null) { - return equalityStrict(a, b) - } - if (a.constructor !== b.constructor) { - return false - } - if (a === b) { - return true - } - switch (a.constructor) { - case ArrayBuffer: - a = new Uint8Array(a); - b = new Uint8Array(b); - // eslint-disable-next-line no-fallthrough - case Uint8Array: { - if (a.byteLength !== b.byteLength) { - return false - } - for (let i = 0; i < a.length; i++) { - if (a[i] !== b[i]) { - return false - } - } - break - } - case Set: { - if (a.size !== b.size) { - return false - } - for (const value of a) { - if (!b.has(value)) { - return false - } - } - break - } - case Map: { - if (a.size !== b.size) { - return false - } - for (const key of a.keys()) { - if (!b.has(key) || !equalityDeep(a.get(key), b.get(key))) { - return false - } - } - break - } - case Object: - if (length(a) !== length(b)) { - return false - } - for (const key in a) { - if (!hasProperty(a, key) || !equalityDeep(a[key], b[key])) { - return false - } - } - break - case Array: - if (a.length !== b.length) { - return false - } - for (let i = 0; i < a.length; i++) { - if (!equalityDeep(a[i], b[i])) { - return false - } - } - break - default: - return false - } - return true -}; - -/** - * @module awareness-protocol - */ - - -const outdatedTimeout = 30000; - -/** - * @typedef {Object} MetaClientState - * @property {number} MetaClientState.clock - * @property {number} MetaClientState.lastUpdated unix timestamp - */ - -/** - * The Awareness class implements a simple shared state protocol that can be used for non-persistent data like awareness information - * (cursor, username, status, ..). Each client can update its own local state and listen to state changes of - * remote clients. Every client may set a state of a remote peer to `null` to mark the client as offline. - * - * Each client is identified by a unique client id (something we borrow from `doc.clientID`). A client can override - * its own state by propagating a message with an increasing timestamp (`clock`). If such a message is received, it is - * applied if the known state of that client is older than the new state (`clock < newClock`). If a client thinks that - * a remote client is offline, it may propagate a message with - * `{ clock: currentClientClock, state: null, client: remoteClient }`. If such a - * message is received, and the known clock of that client equals the received clock, it will override the state with `null`. - * - * Before a client disconnects, it should propagate a `null` state with an updated clock. - * - * Awareness states must be updated every 30 seconds. Otherwise the Awareness instance will delete the client state. - * - * @extends {Observable} - */ -class Awareness extends Observable { - /** - * @param {Y.Doc} doc - */ - constructor (doc) { - super(); - this.doc = doc; - /** - * @type {number} - */ - this.clientID = doc.clientID; - /** - * Maps from client id to client state - * @type {Map>} - */ - this.states = new Map(); - /** - * @type {Map} - */ - this.meta = new Map(); - this._checkInterval = /** @type {any} */ (setInterval(() => { - const now = getUnixTime(); - if (this.getLocalState() !== null && (outdatedTimeout / 2 <= now - /** @type {{lastUpdated:number}} */ (this.meta.get(this.clientID)).lastUpdated)) { - // renew local clock - this.setLocalState(this.getLocalState()); - } - /** - * @type {Array} - */ - const remove = []; - this.meta.forEach((meta, clientid) => { - if (clientid !== this.clientID && outdatedTimeout <= now - meta.lastUpdated && this.states.has(clientid)) { - remove.push(clientid); - } - }); - if (remove.length > 0) { - removeAwarenessStates(this, remove, 'timeout'); - } - }, floor(outdatedTimeout / 10))); - doc.on('destroy', () => { - this.destroy(); - }); - this.setLocalState({}); - } - - destroy () { - this.emit('destroy', [this]); - this.setLocalState(null); - super.destroy(); - clearInterval(this._checkInterval); - } - - /** - * @return {Object|null} - */ - getLocalState () { - return this.states.get(this.clientID) || null - } - - /** - * @param {Object|null} state - */ - setLocalState (state) { - const clientID = this.clientID; - const currLocalMeta = this.meta.get(clientID); - const clock = currLocalMeta === undefined ? 0 : currLocalMeta.clock + 1; - const prevState = this.states.get(clientID); - if (state === null) { - this.states.delete(clientID); - } else { - this.states.set(clientID, state); - } - this.meta.set(clientID, { - clock, - lastUpdated: getUnixTime() - }); - const added = []; - const updated = []; - const filteredUpdated = []; - const removed = []; - if (state === null) { - removed.push(clientID); - } else if (prevState == null) { - if (state != null) { - added.push(clientID); - } - } else { - updated.push(clientID); - if (!equalityDeep(prevState, state)) { - filteredUpdated.push(clientID); - } - } - if (added.length > 0 || filteredUpdated.length > 0 || removed.length > 0) { - this.emit('change', [{ added, updated: filteredUpdated, removed }, 'local']); - } - this.emit('update', [{ added, updated, removed }, 'local']); - } - - /** - * @param {string} field - * @param {any} value - */ - setLocalStateField (field, value) { - const state = this.getLocalState(); - if (state !== null) { - this.setLocalState({ - ...state, - [field]: value - }); - } - } - - /** - * @return {Map>} - */ - getStates () { - return this.states - } -} - -/** - * Mark (remote) clients as inactive and remove them from the list of active peers. - * This change will be propagated to remote clients. - * - * @param {Awareness} awareness - * @param {Array} clients - * @param {any} origin - */ -const removeAwarenessStates = (awareness, clients, origin) => { - const removed = []; - for (let i = 0; i < clients.length; i++) { - const clientID = clients[i]; - if (awareness.states.has(clientID)) { - awareness.states.delete(clientID); - if (clientID === awareness.clientID) { - const curMeta = /** @type {MetaClientState} */ (awareness.meta.get(clientID)); - awareness.meta.set(clientID, { - clock: curMeta.clock + 1, - lastUpdated: getUnixTime() - }); - } - removed.push(clientID); - } - } - if (removed.length > 0) { - awareness.emit('change', [{ added: [], updated: [], removed }, origin]); - awareness.emit('update', [{ added: [], updated: [], removed }, origin]); - } -}; - -/** - * @param {Awareness} awareness - * @param {Array} clients - * @return {Uint8Array} - */ -const encodeAwarenessUpdate = (awareness, clients, states = awareness.states) => { - const len = clients.length; - const encoder = createEncoder(); - writeVarUint(encoder, len); - for (let i = 0; i < len; i++) { - const clientID = clients[i]; - const state = states.get(clientID) || null; - const clock = /** @type {MetaClientState} */ (awareness.meta.get(clientID)).clock; - writeVarUint(encoder, clientID); - writeVarUint(encoder, clock); - writeVarString(encoder, JSON.stringify(state)); - } - return toUint8Array(encoder) -}; - -/** - * @param {Awareness} awareness - * @param {Uint8Array} update - * @param {any} origin This will be added to the emitted change event - */ -const applyAwarenessUpdate = (awareness, update, origin) => { - const decoder = createDecoder(update); - const timestamp = getUnixTime(); - const added = []; - const updated = []; - const filteredUpdated = []; - const removed = []; - const len = readVarUint(decoder); - for (let i = 0; i < len; i++) { - const clientID = readVarUint(decoder); - let clock = readVarUint(decoder); - const state = JSON.parse(readVarString(decoder)); - const clientMeta = awareness.meta.get(clientID); - const prevState = awareness.states.get(clientID); - const currClock = clientMeta === undefined ? 0 : clientMeta.clock; - if (currClock < clock || (currClock === clock && state === null && awareness.states.has(clientID))) { - if (state === null) { - // never let a remote client remove this local state - if (clientID === awareness.clientID && awareness.getLocalState() != null) { - // remote client removed the local state. Do not remote state. Broadcast a message indicating - // that this client still exists by increasing the clock - clock++; - } else { - awareness.states.delete(clientID); - } - } else { - awareness.states.set(clientID, state); - } - awareness.meta.set(clientID, { - clock, - lastUpdated: timestamp - }); - if (clientMeta === undefined && state !== null) { - added.push(clientID); - } else if (clientMeta !== undefined && state === null) { - removed.push(clientID); - } else if (state !== null) { - if (!equalityDeep(state, prevState)) { - filteredUpdated.push(clientID); - } - updated.push(clientID); - } - } - } - if (added.length > 0 || filteredUpdated.length > 0 || removed.length > 0) { - awareness.emit('change', [{ - added, updated: filteredUpdated, removed - }, origin]); - } - if (added.length > 0 || updated.length > 0 || removed.length > 0) { - awareness.emit('update', [{ - added, updated, removed - }, origin]); - } -}; - -/** - * @module sync-protocol - */ - - -/** - * @typedef {Map} StateMap - */ - -/** - * Core Yjs defines two message types: - * • YjsSyncStep1: Includes the State Set of the sending client. When received, the client should reply with YjsSyncStep2. - * • YjsSyncStep2: Includes all missing structs and the complete delete set. When received, the client is assured that it - * received all information from the remote client. - * - * In a peer-to-peer network, you may want to introduce a SyncDone message type. Both parties should initiate the connection - * with SyncStep1. When a client received SyncStep2, it should reply with SyncDone. When the local client received both - * SyncStep2 and SyncDone, it is assured that it is synced to the remote client. - * - * In a client-server model, you want to handle this differently: The client should initiate the connection with SyncStep1. - * When the server receives SyncStep1, it should reply with SyncStep2 immediately followed by SyncStep1. The client replies - * with SyncStep2 when it receives SyncStep1. Optionally the server may send a SyncDone after it received SyncStep2, so the - * client knows that the sync is finished. There are two reasons for this more elaborated sync model: 1. This protocol can - * easily be implemented on top of http and websockets. 2. The server should only reply to requests, and not initiate them. - * Therefore it is necessary that the client initiates the sync. - * - * Construction of a message: - * [messageType : varUint, message definition..] - * - * Note: A message does not include information about the room name. This must to be handled by the upper layer protocol! - * - * stringify[messageType] stringifies a message definition (messageType is already read from the bufffer) - */ - -const messageYjsSyncStep1 = 0; -const messageYjsSyncStep2 = 1; -const messageYjsUpdate = 2; - -/** - * Create a sync step 1 message based on the state of the current shared document. - * - * @param {encoding.Encoder} encoder - * @param {Y.Doc} doc - */ -const writeSyncStep1 = (encoder, doc) => { - writeVarUint(encoder, messageYjsSyncStep1); - const sv = Y__namespace.encodeStateVector(doc); - writeVarUint8Array(encoder, sv); -}; - -/** - * @param {encoding.Encoder} encoder - * @param {Y.Doc} doc - * @param {Uint8Array} [encodedStateVector] - */ -const writeSyncStep2 = (encoder, doc, encodedStateVector) => { - writeVarUint(encoder, messageYjsSyncStep2); - writeVarUint8Array(encoder, Y__namespace.encodeStateAsUpdate(doc, encodedStateVector)); -}; - -/** - * Read SyncStep1 message and reply with SyncStep2. - * - * @param {decoding.Decoder} decoder The reply to the received message - * @param {encoding.Encoder} encoder The received message - * @param {Y.Doc} doc - */ -const readSyncStep1 = (decoder, encoder, doc) => - writeSyncStep2(encoder, doc, readVarUint8Array(decoder)); - -/** - * Read and apply Structs and then DeleteStore to a y instance. - * - * @param {decoding.Decoder} decoder - * @param {Y.Doc} doc - * @param {any} transactionOrigin - */ -const readSyncStep2 = (decoder, doc, transactionOrigin) => { - try { - Y__namespace.applyUpdate(doc, readVarUint8Array(decoder), transactionOrigin); - } catch (error) { - // This catches errors that are thrown by event handlers - console.error('Caught error while handling a Yjs update', error); - } -}; - -/** - * @param {encoding.Encoder} encoder - * @param {Uint8Array} update - */ -const writeUpdate = (encoder, update) => { - writeVarUint(encoder, messageYjsUpdate); - writeVarUint8Array(encoder, update); -}; - -/** - * Read and apply Structs and then DeleteStore to a y instance. - * - * @param {decoding.Decoder} decoder - * @param {Y.Doc} doc - * @param {any} transactionOrigin - */ -const readUpdate = readSyncStep2; - -exports.MessageType = void 0; -(function (MessageType) { - MessageType[MessageType["Unknown"] = -1] = "Unknown"; - MessageType[MessageType["Sync"] = 0] = "Sync"; - MessageType[MessageType["Awareness"] = 1] = "Awareness"; - MessageType[MessageType["Auth"] = 2] = "Auth"; - MessageType[MessageType["QueryAwareness"] = 3] = "QueryAwareness"; - MessageType[MessageType["SyncReply"] = 4] = "SyncReply"; - MessageType[MessageType["Stateless"] = 5] = "Stateless"; - MessageType[MessageType["BroadcastStateless"] = 6] = "BroadcastStateless"; - MessageType[MessageType["CLOSE"] = 7] = "CLOSE"; - MessageType[MessageType["SyncStatus"] = 8] = "SyncStatus"; -})(exports.MessageType || (exports.MessageType = {})); - -class OutgoingMessage { - constructor(documentName) { - this.encoder = createEncoder(); - writeVarString(this.encoder, documentName); - } - createSyncMessage() { - this.type = exports.MessageType.Sync; - writeVarUint(this.encoder, exports.MessageType.Sync); - return this; - } - createSyncReplyMessage() { - this.type = exports.MessageType.SyncReply; - writeVarUint(this.encoder, exports.MessageType.SyncReply); - return this; - } - createAwarenessUpdateMessage(awareness, changedClients) { - this.type = exports.MessageType.Awareness; - this.category = "Update"; - const message = encodeAwarenessUpdate(awareness, changedClients || Array.from(awareness.getStates().keys())); - writeVarUint(this.encoder, exports.MessageType.Awareness); - writeVarUint8Array(this.encoder, message); - return this; - } - writeQueryAwareness() { - this.type = exports.MessageType.QueryAwareness; - this.category = "Update"; - writeVarUint(this.encoder, exports.MessageType.QueryAwareness); - return this; - } - writeTokenSyncRequest() { - this.type = exports.MessageType.Auth; - this.category = "TokenSync"; - writeVarUint(this.encoder, exports.MessageType.Auth); - common.writeTokenSyncRequest(this.encoder); - return this; - } - writeAuthenticated(readonly) { - this.type = exports.MessageType.Auth; - this.category = "Authenticated"; - writeVarUint(this.encoder, exports.MessageType.Auth); - common.writeAuthenticated(this.encoder, readonly ? "readonly" : "read-write"); - return this; - } - writePermissionDenied(reason) { - this.type = exports.MessageType.Auth; - this.category = "PermissionDenied"; - writeVarUint(this.encoder, exports.MessageType.Auth); - common.writePermissionDenied(this.encoder, reason); - return this; - } - writeFirstSyncStepFor(document) { - this.category = "SyncStep1"; - writeSyncStep1(this.encoder, document); - return this; - } - writeUpdate(update) { - this.category = "Update"; - writeUpdate(this.encoder, update); - return this; - } - writeStateless(payload) { - this.category = "Stateless"; - writeVarUint(this.encoder, exports.MessageType.Stateless); - writeVarString(this.encoder, payload); - return this; - } - writeBroadcastStateless(payload) { - this.category = "Stateless"; - writeVarUint(this.encoder, exports.MessageType.BroadcastStateless); - writeVarString(this.encoder, payload); - return this; - } - // TODO: should this be write* or create* as method name? - writeSyncStatus(updateSaved) { - this.category = "SyncStatus"; - writeVarUint(this.encoder, exports.MessageType.SyncStatus); - writeVarUint(this.encoder, updateSaved ? 1 : 0); - return this; - } - writeCloseMessage(reason) { - this.type = exports.MessageType.CLOSE; - writeVarUint(this.encoder, exports.MessageType.CLOSE); - writeVarString(this.encoder, reason); - return this; - } - toUint8Array() { - return toUint8Array(this.encoder); - } -} - -class MessageReceiver { - constructor(message, defaultTransactionOrigin) { - this.message = message; - this.defaultTransactionOrigin = defaultTransactionOrigin; - } - apply(document, connection, reply) { - const { message } = this; - const type = message.readVarUint(); - const emptyMessageLength = message.length; - switch (type) { - case exports.MessageType.Sync: - case exports.MessageType.SyncReply: { - message.writeVarUint(exports.MessageType.Sync); - this.readSyncMessage(message, document, connection, reply, type !== exports.MessageType.SyncReply); - if (message.length > emptyMessageLength + 1) { - if (reply) { - reply(message.toUint8Array()); - } - else if (connection) { - // TODO: We should log this, shouldn’t we? - // this.logger.log({ - // direction: 'out', - // type: MessageType.Awareness, - // category: 'Update', - // }) - connection.send(message.toUint8Array()); - } - } - break; - } - case exports.MessageType.Awareness: { - applyAwarenessUpdate(document.awareness, message.readVarUint8Array(), connection === null || connection === void 0 ? void 0 : connection.webSocket); - break; - } - case exports.MessageType.QueryAwareness: { - this.applyQueryAwarenessMessage(document, reply); - break; - } - case exports.MessageType.Stateless: { - connection === null || connection === void 0 ? void 0 : connection.callbacks.statelessCallback({ - connection, - documentName: document.name, - document, - payload: readVarString(message.decoder), - }); - break; - } - case exports.MessageType.BroadcastStateless: { - const msg = message.readVarString(); - document.getConnections().forEach((connection) => { - connection.sendStateless(msg); - }); - break; - } - case exports.MessageType.CLOSE: { - connection === null || connection === void 0 ? void 0 : connection.close({ - code: 1000, - reason: "provider_initiated", - }); - break; - } - case exports.MessageType.Auth: { - const authType = message.readVarUint(); - if (authType === common.AuthMessageType.Token) { - connection === null || connection === void 0 ? void 0 : connection.callbacks.onTokenSyncCallback({ - token: message.readVarString(), - }); - break; - } - console.error("Received an authentication message on a connection that is already fully authenticated. Probably your provider has been destroyed + recreated really fast."); - break; - } - default: - console.error(`Unable to handle message of type ${type}: no handler defined! Are your provider/server versions aligned?`); - // Do nothing - } - } - readSyncMessage(message, document, connection, reply, requestFirstSync = true) { - const type = message.readVarUint(); - if (connection) { - connection.callbacks.beforeSync(connection, { - type, - payload: message.peekVarUint8Array(), - }); - } - switch (type) { - case messageYjsSyncStep1: { - readSyncStep1(message.decoder, message.encoder, document); - // When the server receives SyncStep1, it should reply with SyncStep2 immediately followed by SyncStep1. - if (reply && requestFirstSync) { - const syncMessage = new OutgoingMessage(document.name) - .createSyncReplyMessage() - .writeFirstSyncStepFor(document); - reply(syncMessage.toUint8Array()); - } - else if (connection) { - const syncMessage = new OutgoingMessage(document.name) - .createSyncMessage() - .writeFirstSyncStepFor(document); - connection.send(syncMessage.toUint8Array()); - } - break; - } - case messageYjsSyncStep2: - if (connection === null || connection === void 0 ? void 0 : connection.readOnly) { - // We're in read-only mode, so we can't apply the update. - // Let's use snapshotContainsUpdate to see if the update actually contains changes. - // If not, we can still ack the update - const snapshot = Y__namespace.snapshot(document); - const update = readVarUint8Array(message.decoder); - if (Y__namespace.snapshotContainsUpdate(snapshot, update)) { - // no new changes in update - const ackMessage = new OutgoingMessage(document.name).writeSyncStatus(true); - connection.send(ackMessage.toUint8Array()); - } - else { - // new changes in update that we can't apply, because readOnly - const ackMessage = new OutgoingMessage(document.name).writeSyncStatus(false); - connection.send(ackMessage.toUint8Array()); - } - break; - } - readSyncStep2(message.decoder, document, connection !== null && connection !== void 0 ? connection : this.defaultTransactionOrigin); - if (connection) { - connection.send(new OutgoingMessage(document.name) - .writeSyncStatus(true) - .toUint8Array()); - } - break; - case messageYjsUpdate: - if (connection === null || connection === void 0 ? void 0 : connection.readOnly) { - connection.send(new OutgoingMessage(document.name) - .writeSyncStatus(false) - .toUint8Array()); - break; - } - readUpdate(message.decoder, document, connection); - if (connection) { - connection.send(new OutgoingMessage(document.name) - .writeSyncStatus(true) - .toUint8Array()); - } - break; - default: - throw new Error(`Received a message with an unknown type: ${type}`); - } - return type; - } - applyQueryAwarenessMessage(document, reply) { - const message = new OutgoingMessage(document.name).createAwarenessUpdateMessage(document.awareness); - if (reply) { - reply(message.toUint8Array()); - } - } -} - -class Connection { - /** - * Constructor. - */ - constructor(connection, request, document, socketId, context, readOnly = false) { - this.callbacks = { - onClose: [(document, event) => { }], - beforeHandleMessage: (connection, update) => Promise.resolve(), - beforeSync: (connection, payload) => Promise.resolve(), - statelessCallback: (payload) => Promise.resolve(), - onTokenSyncCallback: (payload) => Promise.resolve(), - }; - this.webSocket = connection; - this.context = context; - this.document = document; - this.request = request; - this.socketId = socketId; - this.readOnly = readOnly; - this.webSocket.binaryType = "nodebuffer"; - this.document.addConnection(this); - this.sendCurrentAwareness(); - } - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback) { - this.callbacks.onClose.push(callback); - return this; - } - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback(callback) { - this.callbacks.statelessCallback = callback; - return this; - } - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage(callback) { - this.callbacks.beforeHandleMessage = callback; - return this; - } - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync(callback) { - this.callbacks.beforeSync = callback; - return this; - } - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback(callback) { - this.callbacks.onTokenSyncCallback = callback; - return this; - } - /** - * Send the given message - */ - send(message) { - if (this.webSocket.readyState === common.WsReadyStates.Closing || - this.webSocket.readyState === common.WsReadyStates.Closed) { - this.close(); - return; - } - try { - this.webSocket.send(message, (error) => { - if (error != null) - this.close(); - }); - } - catch (exception) { - this.close(); - } - } - /** - * Send a stateless message with payload - */ - sendStateless(payload) { - const message = new OutgoingMessage(this.document.name).writeStateless(payload); - this.send(message.toUint8Array()); - } - /** - * Request current token from the client - */ - requestToken() { - const message = new OutgoingMessage(this.document.name).writeTokenSyncRequest(); - this.send(message.toUint8Array()); - } - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event) { - var _a; - if (this.document.hasConnection(this)) { - this.document.removeConnection(this); - this.callbacks.onClose.forEach((callback) => callback(this.document, event)); - const closeMessage = new OutgoingMessage(this.document.name); - closeMessage.writeCloseMessage((_a = event === null || event === void 0 ? void 0 : event.reason) !== null && _a !== void 0 ? _a : "Server closed the connection"); - this.send(closeMessage.toUint8Array()); - } - } - /** - * Send the current document awareness to the client, if any - * @private - */ - sendCurrentAwareness() { - if (!this.document.hasAwarenessStates()) { - return; - } - const awarenessMessage = new OutgoingMessage(this.document.name).createAwarenessUpdateMessage(this.document.awareness); - this.send(awarenessMessage.toUint8Array()); - } - /** - * Handle an incoming message - * @public - */ - handleMessage(data) { - const message = new IncomingMessage(data); - const documentName = message.readVarString(); - if (documentName !== this.document.name) - return; - message.writeVarString(documentName); - this.callbacks - .beforeHandleMessage(this, data) - .then(() => { - try { - new MessageReceiver(message).apply(this.document, this); - } - catch (e) { - console.error(`closing connection ${this.socketId} (while handling ${documentName}) because of exception`, e); - this.close({ - code: "code" in e ? e.code : common.ResetConnection.code, - reason: "reason" in e ? e.reason : common.ResetConnection.reason, - }); - } - }) - .catch((e) => { - console.error(`closing connection ${this.socketId} (while handling ${documentName}) because of exception`, e); - this.close({ - code: "code" in e ? e.code : common.ResetConnection.code, - reason: "reason" in e ? e.reason : common.ResetConnection.reason, - }); - }); - } -} - -class Document extends Y.Doc { - /** - * Constructor. - */ - constructor(name, yDocOptions) { - super(yDocOptions); - this.callbacks = { - // eslint-disable-next-line @typescript-eslint/no-empty-function - onUpdate: (document, connection, update) => { }, - beforeBroadcastStateless: (document, stateless) => { }, - }; - this.connections = new Map(); - // The number of direct (non-websocket) connections to this document - this.directConnectionsCount = 0; - this.isDestroyed = false; - this.saveMutex = new asyncMutex.Mutex(); - this.lastChangeTime = 0; - this.name = name; - this.awareness = new Awareness(this); - this.awareness.setLocalState(null); - this.awareness.on("update", this.handleAwarenessUpdate.bind(this)); - this.on("update", this.handleUpdate.bind(this)); - this.isLoading = true; - } - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName) { - // eslint-disable-next-line no-underscore-dangle - return !this.get(fieldName)._start && !this.get(fieldName)._map.size; - } - /** - * Merge the given document(s) into this one - */ - merge(documents) { - (Array.isArray(documents) ? documents : [documents]).forEach((document) => { - Y.applyUpdate(this, Y.encodeStateAsUpdate(document)); - }); - return this; - } - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate(callback) { - this.callbacks.onUpdate = callback; - return this; - } - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless(callback) { - this.callbacks.beforeBroadcastStateless = callback; - return this; - } - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection) { - this.connections.set(connection.webSocket, { - clients: new Set(), - connection, - }); - return this; - } - /** - * Is the given connection registered on this document - */ - hasConnection(connection) { - return this.connections.has(connection.webSocket); - } - /** - * Remove the given connection from this document - */ - removeConnection(connection) { - removeAwarenessStates(this.awareness, Array.from(this.getClients(connection.webSocket)), null); - this.connections.delete(connection.webSocket); - return this; - } - addDirectConnection() { - this.directConnectionsCount += 1; - return this; - } - removeDirectConnection() { - if (this.directConnectionsCount > 0) { - this.directConnectionsCount -= 1; - } - return this; - } - /** - * Get the number of active connections for this document - */ - getConnectionsCount() { - return this.connections.size + this.directConnectionsCount; - } - /** - * Get an array of registered connections - */ - getConnections() { - return Array.from(this.connections.values()).map((data) => data.connection); - } - /** - * Get the client ids for the given connection instance - */ - getClients(connectionInstance) { - const connection = this.connections.get(connectionInstance); - return (connection === null || connection === void 0 ? void 0 : connection.clients) === undefined ? new Set() : connection.clients; - } - /** - * Has the document awareness states - */ - hasAwarenessStates() { - return this.awareness.getStates().size > 0; - } - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection, update) { - applyAwarenessUpdate(this.awareness, update, connection.webSocket); - return this; - } - /** - * Handle an awareness update and sync changes to clients - * @private - */ - handleAwarenessUpdate({ added, updated, removed }, connectionInstance) { - const changedClients = added.concat(updated, removed); - if (connectionInstance !== null) { - const connection = this.connections.get(connectionInstance); - if (connection) { - added.forEach((clientId) => connection.clients.add(clientId)); - removed.forEach((clientId) => connection.clients.delete(clientId)); - } - } - this.getConnections().forEach((connection) => { - const awarenessMessage = new OutgoingMessage(this.name).createAwarenessUpdateMessage(this.awareness, changedClients); - connection.send(awarenessMessage.toUint8Array()); - }); - return this; - } - /** - * Handle an updated document and sync changes to clients - */ - handleUpdate(update, connection) { - this.callbacks.onUpdate(this, connection, update); - const message = new OutgoingMessage(this.name) - .createSyncMessage() - .writeUpdate(update); - this.getConnections().forEach((connection) => { - connection.send(message.toUint8Array()); - }); - return this; - } - /** - * Broadcast stateless message to all connections - */ - broadcastStateless(payload, filter) { - this.callbacks.beforeBroadcastStateless(this, payload); - const connections = filter - ? this.getConnections().filter(filter) - : this.getConnections(); - connections.forEach((connection) => { - connection.sendStateless(payload); - }); - } - destroy() { - super.destroy(); - this.isDestroyed = true; - } -} - -var version = "3.4.4"; -var meta = { - version: version}; - -/** - * Get parameters by the given request - */ -function getParameters(request) { - var _a; - const query = ((_a = request === null || request === void 0 ? void 0 : request.url) === null || _a === void 0 ? void 0 : _a.split("?")) || []; - return new node_url.URLSearchParams(query[1] ? query[1] : ""); -} - -/** - * The `ClientConnection` class is responsible for handling an incoming WebSocket - * - * TODO-refactor: - * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts - */ -class ClientConnection { - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it’ll fully establish the connection and - * load the Document then. - */ - constructor(websocket, request, documentProvider, - // TODO: change to events - hooks, opts, defaultContext = {}) { - this.websocket = websocket; - this.request = request; - this.documentProvider = documentProvider; - this.hooks = hooks; - this.opts = opts; - this.defaultContext = defaultContext; - // this map indicates whether a `Connection` instance has already taken over for incoming message for the key (i.e. documentName) - this.documentConnections = {}; - // While the connection will be establishing messages will - // be queued and handled later. - this.incomingMessageQueue = {}; - // While the connection is establishing, kee - this.documentConnectionsEstablished = new Set(); - // hooks payload by Document - this.hookPayloads = {}; - this.callbacks = { - onClose: [(document, payload) => { }], - }; - // Every new connection gets a unique identifier. - this.socketId = crypto.randomUUID(); - this.pongReceived = true; - this.handleWebsocketClose = (code, reason) => { - this.close({ code, reason: reason.toString() }); - this.websocket.removeListener("message", this.messageHandler); - this.websocket.removeListener("pong", this.handlePong); - clearInterval(this.pingInterval); - }; - this.handlePong = () => { - this.pongReceived = true; - }; - /** - * Check if pong was received and close the connection otherwise - * @private - */ - this.check = () => { - if (!this.pongReceived) { - return this.close(common.ConnectionTimeout); - } - this.pongReceived = false; - try { - this.websocket.ping(); - } - catch (error) { - this.close(common.ConnectionTimeout); - } - }; - // Once all hooks are run, we’ll fully establish the connection: - this.setUpNewConnection = async (documentName) => { - const hookPayload = this.hookPayloads[documentName]; - // If no hook interrupts, create a document and connection - const document = await this.documentProvider.createDocument(documentName, hookPayload.request, hookPayload.socketId, hookPayload.connectionConfig, hookPayload.context); - const connection = this.createConnection(this.websocket, document); - connection.onClose((document, event) => { - delete this.hookPayloads[documentName]; - delete this.documentConnections[documentName]; - delete this.incomingMessageQueue[documentName]; - this.documentConnectionsEstablished.delete(documentName); - }); - connection.onTokenSyncCallback(async (payload) => { - try { - return await this.hooks("onTokenSync", { - ...hookPayload, - ...payload, - connection, - document, - documentName, - }, (contextAdditions) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }); - } - catch (err) { - console.error(err); - const error = { ...common.Unauthorized, ...err }; - connection.close({ code: error.code, reason: error.reason }); - } - }); - this.documentConnections[documentName] = connection; - // If the WebSocket has already disconnected (wow, that was fast) – then - // immediately call close to cleanup the connection and document in memory. - if (this.websocket.readyState === common.WsReadyStates.Closing || - this.websocket.readyState === common.WsReadyStates.Closed) { - this.close(); - return; - } - // There’s no need to queue messages anymore. - // Let’s work through queued messages. - this.incomingMessageQueue[documentName].forEach((input) => { - this.websocket.emit("message", input); - }); - await this.hooks("connected", { - ...hookPayload, - documentName, - context: hookPayload.context, - connection, - }); - }; - // This listener handles authentication messages and queues everything else. - this.handleQueueingMessage = async (data) => { - var _a; - try { - const tmpMsg = new IncomingMessage(data); - const documentName = readVarString(tmpMsg.decoder); - const type = readVarUint(tmpMsg.decoder); - if (!(type === exports.MessageType.Auth && - !this.documentConnectionsEstablished.has(documentName))) { - this.incomingMessageQueue[documentName].push(data); - return; - } - // Okay, we’ve got the authentication message we’re waiting for: - this.documentConnectionsEstablished.add(documentName); - // The 2nd integer contains the submessage type - // which will always be authentication when sent from client -> server - readVarUint(tmpMsg.decoder); - const token = readVarString(tmpMsg.decoder); - try { - const hookPayload = this.hookPayloads[documentName]; - await this.hooks("onConnect", { ...hookPayload, documentName }, (contextAdditions) => { - // merge context from all hooks - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }); - await this.hooks("onAuthenticate", { - token, - ...hookPayload, - documentName, - }, (contextAdditions) => { - // Hooks are allowed to give us even more context and we’ll merge everything together. - // We’ll pass the context to other hooks then. - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }); - // All `onAuthenticate` hooks passed. - hookPayload.connectionConfig.isAuthenticated = true; - // Let the client know that authentication was successful. - const message = new OutgoingMessage(documentName).writeAuthenticated(hookPayload.connectionConfig.readOnly); - this.websocket.send(message.toUint8Array()); - // Time to actually establish the connection. - await this.setUpNewConnection(documentName); - } - catch (err) { - const error = err || common.Forbidden; - const message = new OutgoingMessage(documentName).writePermissionDenied((_a = error.reason) !== null && _a !== void 0 ? _a : "permission-denied"); - this.websocket.send(message.toUint8Array()); - } - // Catch errors due to failed decoding of data - } - catch (error) { - console.error(error); - this.websocket.close(common.ResetConnection.code, common.ResetConnection.reason); - } - }; - this.messageHandler = (data) => { - try { - const tmpMsg = new IncomingMessage(data); - const documentName = readVarString(tmpMsg.decoder); - const connection = this.documentConnections[documentName]; - if (connection) { - // forward the message to the connection - connection.handleMessage(data); - // we already have a `Connection` set up for this document - return; - } - const isFirst = this.incomingMessageQueue[documentName] === undefined; - if (isFirst) { - this.incomingMessageQueue[documentName] = []; - if (this.hookPayloads[documentName]) { - throw new Error("first message, but hookPayloads exists"); - } - const hookPayload = { - instance: this.documentProvider, - request: this.request, - connectionConfig: { - readOnly: false, - isAuthenticated: false, - }, - requestHeaders: this.request.headers, - requestParameters: getParameters(this.request), - socketId: this.socketId, - context: { - ...this.defaultContext, - }, - }; - this.hookPayloads[documentName] = hookPayload; - } - this.handleQueueingMessage(data); - } - catch (closeError) { - // catch is needed in case an invalid payload crashes the parsing of the Uint8Array - console.error(closeError); - this.websocket.close(common.Unauthorized.code, common.Unauthorized.reason); - } - }; - this.timeout = opts.timeout; - this.pingInterval = setInterval(this.check, this.timeout); - websocket.on("pong", this.handlePong); - websocket.on("message", this.messageHandler); - websocket.once("close", this.handleWebsocketClose); - } - close(event) { - Object.values(this.documentConnections).forEach((connection) => connection.close(event)); - } - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback) { - this.callbacks.onClose.push(callback); - return this; - } - /** - * Create a new connection by the given request and document - */ - createConnection(connection, document) { - const hookPayload = this.hookPayloads[document.name]; - const instance = new Connection(connection, hookPayload.request, document, hookPayload.socketId, hookPayload.context, hookPayload.connectionConfig.readOnly); - instance.onClose(async (document, event) => { - const disconnectHookPayload = { - instance: this.documentProvider, // TODO, this will be removed when we use events instead of hooks for this class - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request), - }; - await this.hooks("onDisconnect", disconnectHookPayload); - this.callbacks.onClose.forEach((callback) => callback(document, disconnectHookPayload)); - }); - instance.onStatelessCallback(async (payload) => { - try { - return await this.hooks("onStateless", payload); - } - catch (error) { - if (error === null || error === void 0 ? void 0 : error.message) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if an error is present - // just rethrow it - throw error; - } - } - }); - instance.beforeHandleMessage((connection, update) => { - const beforeHandleMessagePayload = { - instance: this.documentProvider, // TODO, this will be removed when we use events instead of hooks for this class - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - connection, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request), - update, - }; - return this.hooks("beforeHandleMessage", beforeHandleMessagePayload); - }); - instance.beforeSync((connection, payload) => { - const beforeSyncPayload = { - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - documentName: document.name, - connection, - type: payload.type, - payload: payload.payload, - }; - return this.hooks("beforeSync", beforeSyncPayload); - }); - return instance; - } -} - -class DirectConnection { - /** - * Constructor. - */ - constructor(document, instance, context) { - this.document = null; - this.document = document; - this.instance = instance; - this.context = context; - this.document.addDirectConnection(); - } - async transact(transaction) { - if (!this.document) { - throw new Error("direct connection closed"); - } - transaction(this.document); - await this.instance.storeDocumentHooks(this.document, { - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - documentName: this.document.name, - instance: this.instance, - requestHeaders: {}, - requestParameters: new node_url.URLSearchParams(), - socketId: "server", - }, true); - } - async disconnect() { - var _a; - if (this.document) { - (_a = this.document) === null || _a === void 0 ? void 0 : _a.removeDirectConnection(); - await this.instance.storeDocumentHooks(this.document, { - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - documentName: this.document.name, - instance: this.instance, - requestHeaders: {}, - requestParameters: new node_url.URLSearchParams(), - socketId: "server", - }, true); - // If the direct connection was the only connection to the document - // then we should trigger the onDisconnect hook for - // this doc and unload the document - if (this.document.getConnectionsCount() === 0 && - !this.document.saveMutex.isLocked()) { - await this.instance.hooks("onDisconnect", { - instance: this.instance, - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - socketId: "server", - documentName: this.document.name, - requestHeaders: {}, - requestParameters: new node_url.URLSearchParams(), - }); - await this.instance.unloadDocument(this.document); - } - this.document = null; - } - } -} - -const useDebounce = () => { - const timers = new Map(); - const runningExecutions = new Map(); - const debounce = async (id, - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - func, debounce, maxDebounce) => { - const old = timers.get(id); - const start = (old === null || old === void 0 ? void 0 : old.start) || Date.now(); - const run = async () => { - if (runningExecutions.has(id)) { - // wait for previous execution to finish - await runningExecutions.get(id); - } - timers.delete(id); - const execution = func(); - runningExecutions.set(id, execution); - const executionResult = await execution; - runningExecutions.delete(id); - return executionResult; - }; - if (old === null || old === void 0 ? void 0 : old.timeout) { - clearTimeout(old.timeout); - } - if (debounce === 0) { - return run(); - } - if (Date.now() - start >= maxDebounce) { - return run(); - } - timers.set(id, { - start, - timeout: setTimeout(run, debounce), - func: run, - }); - }; - const executeNow = (id) => { - const old = timers.get(id); - if (old) { - clearTimeout(old.timeout); - return old.func(); - } - }; - const isDebounced = (id) => { - return timers.has(id); - }; - const isCurrentlyExecuting = (id) => { - return runningExecutions.has(id); - }; - return { debounce, isDebounced, isCurrentlyExecuting, executeNow }; -}; - -const defaultConfiguration = { - name: null, - timeout: 30000, - debounce: 2000, - maxDebounce: 10000, - quiet: false, - yDocOptions: { - gc: true, - gcFilter: () => true, - }, - unloadImmediately: true, -}; -class Hocuspocus { - constructor(configuration) { - this.configuration = { - ...defaultConfiguration, - extensions: [], - onConfigure: () => new Promise((r) => r(null)), - onListen: () => new Promise((r) => r(null)), - onUpgrade: () => new Promise((r) => r(null)), - onConnect: () => new Promise((r) => r(null)), - connected: () => new Promise((r) => r(null)), - beforeHandleMessage: () => new Promise((r) => r(null)), - beforeSync: () => new Promise((r) => r(null)), - beforeBroadcastStateless: () => new Promise((r) => r(null)), - onStateless: () => new Promise((r) => r(null)), - onChange: () => new Promise((r) => r(null)), - onCreateDocument: () => new Promise((r) => r(null)), - onLoadDocument: () => new Promise((r) => r(null)), - onStoreDocument: () => new Promise((r) => r(null)), - afterStoreDocument: () => new Promise((r) => r(null)), - onAwarenessUpdate: () => new Promise((r) => r(null)), - onRequest: () => new Promise((r) => r(null)), - onDisconnect: () => new Promise((r) => r(null)), - onDestroy: () => new Promise((r) => r(null)), - }; - this.loadingDocuments = new Map(); - this.unloadingDocuments = new Map(); - this.documents = new Map(); - this.debouncer = useDebounce(); - if (configuration) { - this.configure(configuration); - } - } - /** - * Configure Hocuspocus - */ - configure(configuration) { - this.configuration = { - ...this.configuration, - ...configuration, - }; - this.configuration.extensions.sort((a, b) => { - const one = typeof a.priority === "undefined" ? 100 : a.priority; - const two = typeof b.priority === "undefined" ? 100 : b.priority; - if (one > two) { - return -1; - } - if (one < two) { - return 1; - } - return 0; - }); - this.configuration.extensions.push({ - onConfigure: this.configuration.onConfigure, - onListen: this.configuration.onListen, - onUpgrade: this.configuration.onUpgrade, - onConnect: this.configuration.onConnect, - connected: this.configuration.connected, - onAuthenticate: this.configuration.onAuthenticate, - onTokenSync: this.configuration.onTokenSync, - onLoadDocument: this.configuration.onLoadDocument, - afterLoadDocument: this.configuration.afterLoadDocument, - beforeHandleMessage: this.configuration.beforeHandleMessage, - beforeBroadcastStateless: this.configuration.beforeBroadcastStateless, - beforeSync: this.configuration.beforeSync, - onStateless: this.configuration.onStateless, - onChange: this.configuration.onChange, - onStoreDocument: this.configuration.onStoreDocument, - afterStoreDocument: this.configuration.afterStoreDocument, - onAwarenessUpdate: this.configuration.onAwarenessUpdate, - onRequest: this.configuration.onRequest, - beforeUnloadDocument: this.configuration.beforeUnloadDocument, - afterUnloadDocument: this.configuration.afterUnloadDocument, - onDisconnect: this.configuration.onDisconnect, - onDestroy: this.configuration.onDestroy, - }); - this.hooks("onConfigure", { - configuration: this.configuration, - version: meta.version, - instance: this, - }); - return this; - } - /** - * Get the total number of active documents - */ - getDocumentsCount() { - return this.documents.size; - } - /** - * Get the total number of active connections - */ - getConnectionsCount() { - const uniqueSocketIds = new Set(); - const totalDirectConnections = Array.from(this.documents.values()).reduce((acc, document) => { - // Accumulate unique socket IDs - document.getConnections().forEach(({ socketId }) => { - uniqueSocketIds.add(socketId); - }); - // Accumulate direct connections - return acc + document.directConnectionsCount; - }, 0); - // Return the sum of unique socket IDs and direct connections - return uniqueSocketIds.size + totalDirectConnections; - } - /** - * Force close one or more connections - */ - closeConnections(documentName) { - // Iterate through all connections for all documents - // and invoke their close method, which is a graceful - // disconnect wrapper around the underlying websocket.close - this.documents.forEach((document) => { - // If a documentName was specified, bail if it doesn't match - if (documentName && document.name !== documentName) { - return; - } - document.connections.forEach(({ connection }) => { - connection.close(common.ResetConnection); - }); - }); - } - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it’ll fully establish the connection and - * load the Document then. - */ - handleConnection(incoming, request, defaultContext = {}) { - const clientConnection = new ClientConnection(incoming, request, this, this.hooks.bind(this), { - timeout: this.configuration.timeout, - }, defaultContext); - clientConnection.onClose((document, hookPayload) => { - // Check if there are still no connections to the document, as these hooks - // may take some time to resolve (e.g. database queries). If a - // new connection were to come in during that time it would rely on the - // document in the map that we remove now. - if (document.getConnectionsCount() > 0) { - return; - } - // If it’s the last connection, we need to make sure to store the - // document. Use the debouncer executeNow helper, to run scheduled - // onStoreDocument immediately and clear running timers. - // If there is no scheduled run for this document there is no point in - // triggering onStoreDocument hook, as everything seems to be stored already. - // Only run this if the document has finished loading earlier (i.e. not to persist the empty - // ydoc if the onLoadDocument hook returned an error) - if (!document.isLoading && - this.debouncer.isDebounced(`onStoreDocument-${document.name}`)) { - if (this.configuration.unloadImmediately) { - this.debouncer.executeNow(`onStoreDocument-${document.name}`); - } - } - else { - // Remove document from memory immediately - this.unloadDocument(document); - } - }); - } - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - handleDocumentUpdate(document, connection, update, request) { - var _a, _b; - const hookPayload = { - instance: this, - clientsCount: document.getConnectionsCount(), - context: (connection === null || connection === void 0 ? void 0 : connection.context) || {}, - document, - documentName: document.name, - requestHeaders: (_a = request === null || request === void 0 ? void 0 : request.headers) !== null && _a !== void 0 ? _a : {}, - requestParameters: getParameters(request), - socketId: (_b = connection === null || connection === void 0 ? void 0 : connection.socketId) !== null && _b !== void 0 ? _b : "", - update, - transactionOrigin: connection, - }; - this.hooks("onChange", hookPayload); - // If the update was received through other ways than the - // WebSocket connection, we don’t need to feel responsible for - // storing the content. - // also ignore changes incoming through redis connection, as this would be a breaking change (#730, #696, #606) - if (!connection || - connection === "__hocuspocus__redis__origin__") { - return; - } - this.storeDocumentHooks(document, hookPayload); - } - /** - * Create a new document by the given request - */ - async createDocument(documentName, request, socketId, connection, context) { - const existingLoadingDoc = this.loadingDocuments.get(documentName); - if (existingLoadingDoc) { - return existingLoadingDoc; - } - const existingDoc = this.documents.get(documentName); - if (existingDoc) { - return Promise.resolve(existingDoc); - } - const loadDocPromise = this.loadDocument(documentName, request, socketId, connection, context); - this.loadingDocuments.set(documentName, loadDocPromise); - try { - const doc = await loadDocPromise; - this.documents.set(documentName, doc); - this.loadingDocuments.delete(documentName); - return doc; - } - catch (e) { - this.loadingDocuments.delete(documentName); - throw e; - } - } - async loadDocument(documentName, request, socketId, connectionConfig, context) { - var _a; - const requestHeaders = (_a = request.headers) !== null && _a !== void 0 ? _a : {}; - const requestParameters = getParameters(request); - const yDocOptions = await this.hooks("onCreateDocument", { - documentName, - requestHeaders, - requestParameters, - connectionConfig, - context, - socketId, - instance: this, - }); - const document = new Document(documentName, { - ...this.configuration.yDocOptions, - ...yDocOptions, - }); - const hookPayload = { - instance: this, - context, - connectionConfig, - document, - documentName, - socketId, - requestHeaders, - requestParameters, - }; - try { - await this.hooks("onLoadDocument", hookPayload, (loadedDocument) => { - // if a hook returns a Y-Doc, encode the document state as update - // and apply it to the newly created document - // Note: instanceof doesn't work, because Doc !== Doc for some reason I don't understand - if ((loadedDocument === null || loadedDocument === void 0 ? void 0 : loadedDocument.constructor.name) === "Document" || - (loadedDocument === null || loadedDocument === void 0 ? void 0 : loadedDocument.constructor.name) === "Doc") { - Y.applyUpdate(document, Y.encodeStateAsUpdate(loadedDocument)); - } - }); - } - catch (e) { - this.closeConnections(documentName); - this.unloadDocument(document); - throw e; - } - document.isLoading = false; - document.onUpdate((document, connection, update) => { - document.lastChangeTime = Date.now(); - this.handleDocumentUpdate(document, connection, update, connection === null || connection === void 0 ? void 0 : connection.request); - }); - await this.hooks("afterLoadDocument", hookPayload); - document.beforeBroadcastStateless((document, stateless) => { - const hookPayload = { - document, - documentName: document.name, - payload: stateless, - }; - this.hooks("beforeBroadcastStateless", hookPayload); - }); - document.awareness.on("update", (update) => { - this.hooks("onAwarenessUpdate", { - ...hookPayload, - ...update, - awareness: document.awareness, - states: common.awarenessStatesToArray(document.awareness.getStates()), - }); - }); - return document; - } - storeDocumentHooks(document, hookPayload, immediately) { - const debounceId = `onStoreDocument-${document.name}`; - return this.debouncer.debounce(debounceId, async () => { - try { - await document.saveMutex.runExclusive(async () => { - await this.hooks("onStoreDocument", hookPayload); - await this.hooks("afterStoreDocument", hookPayload); - }); - } - catch (error) { - console.error("Caught error during storeDocumentHooks", error); - if (error === null || error === void 0 ? void 0 : error.message) { - throw error; - } - } - finally { - setTimeout(() => { - if (this.shouldUnloadDocument(document)) { - this.unloadDocument(document); - } - }, 0); - } - }, immediately ? 0 : this.configuration.debounce, this.configuration.maxDebounce); - } - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - hooks(name, payload, callback = null) { - const { extensions } = this.configuration; - // create a new `thenable` chain - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve - let chain = Promise.resolve(); - extensions - // get me all extensions which have the given hook - .filter((extension) => typeof extension[name] === "function") - // run through all the configured hooks - .forEach((extension) => { - chain = chain - .then(() => { var _a; return (_a = extension[name]) === null || _a === void 0 ? void 0 : _a.call(extension, payload); }) - .catch((error) => { - // make sure to log error messages - if (error === null || error === void 0 ? void 0 : error.message) { - console.error(`[${name}]`, error.message); - } - throw error; - }); - if (callback) { - chain = chain.then((...args) => callback(...args)); - } - }); - return chain; - } - shouldUnloadDocument(document) { - const hasPendingWork = this.debouncer.isDebounced(`onStoreDocument-${document.name}`) || - this.debouncer.isCurrentlyExecuting(`onStoreDocument-${document.name}`) || - document.saveMutex.isLocked(); - return hasPendingWork === false && document.getConnectionsCount() === 0; - } - async unloadDocument(document) { - const documentName = document.name; - if (!this.shouldUnloadDocument(document)) - return; - if (!this.documents.has(documentName)) - return; - if (this.unloadingDocuments.has(documentName)) - return this.unloadingDocuments.get(documentName); - // we need to make sure that the logic runs just once, even if multiple clients disconnect together - const actualUnloadingLogic = async () => { - try { - await this.hooks("beforeUnloadDocument", { - instance: this, - documentName, - document, - }); - } - catch (e) { - return; - } - // need sync check here as well, to avoid timing problems - if (!this.shouldUnloadDocument(document)) - return; - this.documents.delete(documentName); - document.destroy(); - await this.hooks("afterUnloadDocument", { instance: this, documentName }); - }; - const unloading = actualUnloadingLogic(); - this.unloadingDocuments.set(documentName, Promise.resolve(unloading)); - await unloading; - this.unloadingDocuments.delete(documentName); - } - async openDirectConnection(documentName, context) { - const connectionConfig = { - isAuthenticated: true, - readOnly: false, - }; - const document = await this.createDocument(documentName, {}, // direct connection has no request params - crypto.randomUUID(), connectionConfig, context); - return new DirectConnection(document, this, context); - } -} - -const defaultServerConfiguration = { - port: 80, - address: "0.0.0.0", - stopOnSignals: true, -}; -class Server { - constructor(configuration, websocketOptions = {}) { - this.configuration = { - ...defaultConfiguration, - ...defaultServerConfiguration, - extensions: [], - }; - this.setupWebsocketConnection = () => { - this.webSocketServer.on("connection", async (incoming, request) => { - incoming.setMaxListeners(Number.POSITIVE_INFINITY); - incoming.on("error", (error) => { - /** - * Handle a ws instance error, which is required to prevent - * the server from crashing when one happens - * See https://github.com/websockets/ws/issues/1777#issuecomment-660803472 - * @private - */ - console.error("Error emitted from webSocket instance:"); - console.error(error); - }); - this.hocuspocus.handleConnection(incoming, request); - }); - }; - this.setupHttpUpgrade = () => { - this.httpServer.on("upgrade", async (request, socket, head) => { - try { - await this.hocuspocus.hooks("onUpgrade", { - request, - socket, - head, - instance: this.hocuspocus, - }); - // let the default websocket server handle the connection if - // prior hooks don't interfere - this.webSocketServer.handleUpgrade(request, socket, head, (ws) => { - this.webSocketServer.emit("connection", ws, request); - }); - } - catch (error) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if a error is present - // just rethrow it - if (error) { - throw error; - } - } - }); - }; - this.requestHandler = async (request, response) => { - try { - await this.hocuspocus.hooks("onRequest", { - request, - response, - instance: this.hocuspocus, - }); - // default response if all prior hooks don't interfere - response.writeHead(200, { "Content-Type": "text/plain" }); - response.end("Welcome to Hocuspocus!"); - } - catch (error) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if a error is present - // just rethrow it - if (error) { - throw error; - } - } - }; - if (configuration) { - this.configuration = { - ...this.configuration, - ...configuration, - }; - } - this.hocuspocus = new Hocuspocus(this.configuration); - this.hocuspocus.server = this; - this.httpServer = node_http.createServer(this.requestHandler); - this.webSocketServer = new ws.WebSocketServer({ - noServer: true, - ...websocketOptions, - }); - this.setupWebsocketConnection(); - this.setupHttpUpgrade(); - } - async listen(port, callback = null) { - if (port) { - this.configuration.port = port; - } - if (typeof callback === "function") { - this.hocuspocus.configuration.extensions.push({ - onListen: callback, - }); - } - if (this.configuration.stopOnSignals) { - const signalHandler = async () => { - await this.destroy(); - process.exit(0); - }; - process.on("SIGINT", signalHandler); - process.on("SIGQUIT", signalHandler); - process.on("SIGTERM", signalHandler); - } - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - return new Promise((resolve, reject) => { - this.httpServer.listen({ - port: this.configuration.port, - address: this.configuration.address, - }, async () => { - if (!this.configuration.quiet && - String(process.env.NODE_ENV) !== "testing") { - this.showStartScreen(); - } - const onListenPayload = { - instance: this.hocuspocus, - configuration: this.configuration, - port: this.address.port, - }; - try { - await this.hocuspocus.hooks("onListen", onListenPayload); - resolve(this.hocuspocus); - } - catch (e) { - reject(e); - } - }); - }); - } - get address() { - return (this.httpServer.address() || { - port: this.configuration.port, - address: this.configuration.address, - family: "IPv4", - }); - } - async destroy() { - await new Promise(async (resolve) => { - this.httpServer.close(); - try { - this.configuration.extensions.push({ - async afterUnloadDocument({ instance }) { - if (instance.getDocumentsCount() === 0) - resolve(""); - }, - }); - this.webSocketServer.close(); - if (this.hocuspocus.getDocumentsCount() === 0) - resolve(""); - this.hocuspocus.closeConnections(); - } - catch (error) { - console.error(error); - } - }); - await this.hocuspocus.hooks("onDestroy", { instance: this.hocuspocus }); - } - get URL() { - return `${this.configuration.address}:${this.address.port}`; - } - get webSocketURL() { - return `ws://${this.URL}`; - } - get httpURL() { - return `http://${this.URL}`; - } - showStartScreen() { - var _a; - const name = this.configuration.name ? ` (${this.configuration.name})` : ""; - console.log(); - console.log(` ${kleur.cyan(`Hocuspocus v${meta.version}${name}`)}${kleur.green(" running at:")}`); - console.log(); - console.log(` > HTTP: ${kleur.cyan(`${this.httpURL}`)}`); - console.log(` > WebSocket: ${this.webSocketURL}`); - const extensions = (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.extensions.map((extension) => { - var _a, _b; - return (_a = extension.extensionName) !== null && _a !== void 0 ? _a : (_b = extension.constructor) === null || _b === void 0 ? void 0 : _b.name; - }).filter((name) => name).filter((name) => name !== "Object"); - if (!extensions.length) { - return; - } - console.log(); - console.log(" Extensions:"); - extensions.forEach((name) => { - console.log(` - ${name}`); - }); - console.log(); - console.log(` ${kleur.green("Ready.")}`); - console.log(); - } -} - -exports.Connection = Connection; -exports.Document = Document; -exports.Hocuspocus = Hocuspocus; -exports.IncomingMessage = IncomingMessage; -exports.MessageReceiver = MessageReceiver; -exports.OutgoingMessage = OutgoingMessage; -exports.Server = Server; -exports.defaultConfiguration = defaultConfiguration; -exports.defaultServerConfiguration = defaultServerConfiguration; -exports.useDebounce = useDebounce; -//# sourceMappingURL=hocuspocus-server.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs.map deleted file mode 100644 index 552830b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-server.cjs","sources":["../../../node_modules/lib0/binary.js","../../../node_modules/lib0/math.js","../../../node_modules/lib0/number.js","../../../node_modules/lib0/set.js","../../../node_modules/lib0/array.js","../../../node_modules/lib0/string.js","../../../node_modules/lib0/error.js","../../../node_modules/lib0/encoding.js","../../../node_modules/lib0/decoding.js","../src/IncomingMessage.ts","../../../node_modules/lib0/time.js","../../../node_modules/lib0/map.js","../../../node_modules/lib0/observable.js","../../../node_modules/lib0/object.js","../../../node_modules/lib0/function.js","../../../node_modules/y-protocols/awareness.js","../../../node_modules/y-protocols/sync.js","../src/types.ts","../src/OutgoingMessage.ts","../src/MessageReceiver.ts","../src/Connection.ts","../src/Document.ts","../src/util/getParameters.ts","../src/ClientConnection.ts","../src/DirectConnection.ts","../src/util/debounce.ts","../src/Hocuspocus.ts","../src/Server.ts"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * Binary data constants.\n *\n * @module binary\n */\n\n/**\n * n-th bit activated.\n *\n * @type {number}\n */\nexport const BIT1 = 1\nexport const BIT2 = 2\nexport const BIT3 = 4\nexport const BIT4 = 8\nexport const BIT5 = 16\nexport const BIT6 = 32\nexport const BIT7 = 64\nexport const BIT8 = 128\nexport const BIT9 = 256\nexport const BIT10 = 512\nexport const BIT11 = 1024\nexport const BIT12 = 2048\nexport const BIT13 = 4096\nexport const BIT14 = 8192\nexport const BIT15 = 16384\nexport const BIT16 = 32768\nexport const BIT17 = 65536\nexport const BIT18 = 1 << 17\nexport const BIT19 = 1 << 18\nexport const BIT20 = 1 << 19\nexport const BIT21 = 1 << 20\nexport const BIT22 = 1 << 21\nexport const BIT23 = 1 << 22\nexport const BIT24 = 1 << 23\nexport const BIT25 = 1 << 24\nexport const BIT26 = 1 << 25\nexport const BIT27 = 1 << 26\nexport const BIT28 = 1 << 27\nexport const BIT29 = 1 << 28\nexport const BIT30 = 1 << 29\nexport const BIT31 = 1 << 30\nexport const BIT32 = 1 << 31\n\n/**\n * First n bits activated.\n *\n * @type {number}\n */\nexport const BITS0 = 0\nexport const BITS1 = 1\nexport const BITS2 = 3\nexport const BITS3 = 7\nexport const BITS4 = 15\nexport const BITS5 = 31\nexport const BITS6 = 63\nexport const BITS7 = 127\nexport const BITS8 = 255\nexport const BITS9 = 511\nexport const BITS10 = 1023\nexport const BITS11 = 2047\nexport const BITS12 = 4095\nexport const BITS13 = 8191\nexport const BITS14 = 16383\nexport const BITS15 = 32767\nexport const BITS16 = 65535\nexport const BITS17 = BIT18 - 1\nexport const BITS18 = BIT19 - 1\nexport const BITS19 = BIT20 - 1\nexport const BITS20 = BIT21 - 1\nexport const BITS21 = BIT22 - 1\nexport const BITS22 = BIT23 - 1\nexport const BITS23 = BIT24 - 1\nexport const BITS24 = BIT25 - 1\nexport const BITS25 = BIT26 - 1\nexport const BITS26 = BIT27 - 1\nexport const BITS27 = BIT28 - 1\nexport const BITS28 = BIT29 - 1\nexport const BITS29 = BIT30 - 1\nexport const BITS30 = BIT31 - 1\n/**\n * @type {number}\n */\nexport const BITS31 = 0x7FFFFFFF\n/**\n * @type {number}\n */\nexport const BITS32 = 0xFFFFFFFF\n","/**\n * Common Math expressions.\n *\n * @module math\n */\n\nexport const floor = Math.floor\nexport const ceil = Math.ceil\nexport const abs = Math.abs\nexport const imul = Math.imul\nexport const round = Math.round\nexport const log10 = Math.log10\nexport const log2 = Math.log2\nexport const log = Math.log\nexport const sqrt = Math.sqrt\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The sum of a and b\n */\nexport const add = (a, b) => a + b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The smaller element of a and b\n */\nexport const min = (a, b) => a < b ? a : b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The bigger element of a and b\n */\nexport const max = (a, b) => a > b ? a : b\n\nexport const isNaN = Number.isNaN\n\nexport const pow = Math.pow\n/**\n * Base 10 exponential function. Returns the value of 10 raised to the power of pow.\n *\n * @param {number} exp\n * @return {number}\n */\nexport const exp10 = exp => Math.pow(10, exp)\n\nexport const sign = Math.sign\n\n/**\n * @param {number} n\n * @return {boolean} Wether n is negative. This function also differentiates between -0 and +0\n */\nexport const isNegativeZero = n => n !== 0 ? n < 0 : 1 / n < 0\n","/**\n * Utility helpers for working with numbers.\n *\n * @module number\n */\n\nimport * as math from './math.js'\nimport * as binary from './binary.js'\n\nexport const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER\nexport const MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER\n\nexport const LOWEST_INT32 = 1 << 31\nexport const HIGHEST_INT32 = binary.BITS31\nexport const HIGHEST_UINT32 = binary.BITS32\n\n/* c8 ignore next */\nexport const isInteger = Number.isInteger || (num => typeof num === 'number' && isFinite(num) && math.floor(num) === num)\nexport const isNaN = Number.isNaN\nexport const parseInt = Number.parseInt\n\n/**\n * Count the number of \"1\" bits in an unsigned 32bit number.\n *\n * Super fun bitcount algorithm by Brian Kernighan.\n *\n * @param {number} n\n */\nexport const countBits = n => {\n n &= binary.BITS32\n let count = 0\n while (n) {\n n &= (n - 1)\n count++\n }\n return count\n}\n","/**\n * Utility module to work with sets.\n *\n * @module set\n */\n\nexport const create = () => new Set()\n\n/**\n * @template T\n * @param {Set} set\n * @return {Array}\n */\nexport const toArray = set => Array.from(set)\n\n/**\n * @template T\n * @param {Set} set\n * @return {T}\n */\nexport const first = set =>\n set.values().next().value ?? undefined\n\n/**\n * @template T\n * @param {Iterable} entries\n * @return {Set}\n */\nexport const from = entries => new Set(entries)\n","/**\n * Utility module to work with Arrays.\n *\n * @module array\n */\n\nimport * as set from './set.js'\n\n/**\n * Return the last element of an array. The element must exist\n *\n * @template L\n * @param {ArrayLike} arr\n * @return {L}\n */\nexport const last = arr => arr[arr.length - 1]\n\n/**\n * @template C\n * @return {Array}\n */\nexport const create = () => /** @type {Array} */ ([])\n\n/**\n * @template D\n * @param {Array} a\n * @return {Array}\n */\nexport const copy = a => /** @type {Array} */ (a.slice())\n\n/**\n * Append elements from src to dest\n *\n * @template M\n * @param {Array} dest\n * @param {Array} src\n */\nexport const appendTo = (dest, src) => {\n for (let i = 0; i < src.length; i++) {\n dest.push(src[i])\n }\n}\n\n/**\n * Transforms something array-like to an actual Array.\n *\n * @function\n * @template T\n * @param {ArrayLike|Iterable} arraylike\n * @return {T}\n */\nexport const from = Array.from\n\n/**\n * True iff condition holds on every element in the Array.\n *\n * @function\n * @template ITEM\n * @template {ArrayLike} ARR\n *\n * @param {ARR} arr\n * @param {function(ITEM, number, ARR):boolean} f\n * @return {boolean}\n */\nexport const every = (arr, f) => {\n for (let i = 0; i < arr.length; i++) {\n if (!f(arr[i], i, arr)) {\n return false\n }\n }\n return true\n}\n\n/**\n * True iff condition holds on some element in the Array.\n *\n * @function\n * @template S\n * @template {ArrayLike} ARR\n * @param {ARR} arr\n * @param {function(S, number, ARR):boolean} f\n * @return {boolean}\n */\nexport const some = (arr, f) => {\n for (let i = 0; i < arr.length; i++) {\n if (f(arr[i], i, arr)) {\n return true\n }\n }\n return false\n}\n\n/**\n * @template ELEM\n *\n * @param {ArrayLike} a\n * @param {ArrayLike} b\n * @return {boolean}\n */\nexport const equalFlat = (a, b) => a.length === b.length && every(a, (item, index) => item === b[index])\n\n/**\n * @template ELEM\n * @param {Array>} arr\n * @return {Array}\n */\nexport const flatten = arr => fold(arr, /** @type {Array} */ ([]), (acc, val) => acc.concat(val))\n\n/**\n * @template T\n * @param {number} len\n * @param {function(number, Array):T} f\n * @return {Array}\n */\nexport const unfold = (len, f) => {\n const array = new Array(len)\n for (let i = 0; i < len; i++) {\n array[i] = f(i, array)\n }\n return array\n}\n\n/**\n * @template T\n * @template RESULT\n * @param {Array} arr\n * @param {RESULT} seed\n * @param {function(RESULT, T, number):RESULT} folder\n */\nexport const fold = (arr, seed, folder) => arr.reduce(folder, seed)\n\nexport const isArray = Array.isArray\n\n/**\n * @template T\n * @param {Array} arr\n * @return {Array}\n */\nexport const unique = arr => from(set.from(arr))\n\n/**\n * @template T\n * @template M\n * @param {ArrayLike} arr\n * @param {function(T):M} mapper\n * @return {Array}\n */\nexport const uniqueBy = (arr, mapper) => {\n /**\n * @type {Set}\n */\n const happened = set.create()\n /**\n * @type {Array}\n */\n const result = []\n for (let i = 0; i < arr.length; i++) {\n const el = arr[i]\n const mapped = mapper(el)\n if (!happened.has(mapped)) {\n happened.add(mapped)\n result.push(el)\n }\n }\n return result\n}\n\n/**\n * @template {ArrayLike} ARR\n * @template {function(ARR extends ArrayLike ? T : never, number, ARR):any} MAPPER\n * @param {ARR} arr\n * @param {MAPPER} mapper\n * @return {Array}\n */\nexport const map = (arr, mapper) => {\n /**\n * @type {Array}\n */\n const res = Array(arr.length)\n for (let i = 0; i < arr.length; i++) {\n res[i] = mapper(/** @type {any} */ (arr[i]), i, /** @type {any} */ (arr))\n }\n return /** @type {any} */ (res)\n}\n\n/**\n * This function bubble-sorts a single item to the correct position. The sort happens in-place and\n * might be useful to ensure that a single item is at the correct position in an otherwise sorted\n * array.\n *\n * @example\n * const arr = [3, 2, 5]\n * arr.sort((a, b) => a - b)\n * arr // => [2, 3, 5]\n * arr.splice(1, 0, 7)\n * array.bubbleSortItem(arr, 1, (a, b) => a - b)\n * arr // => [2, 3, 5, 7]\n *\n * @template T\n * @param {Array} arr\n * @param {number} i\n * @param {(a:T,b:T) => number} compareFn\n */\nexport const bubblesortItem = (arr, i, compareFn) => {\n const n = arr[i]\n let j = i\n // try to sort to the right\n while (j + 1 < arr.length && compareFn(n, arr[j + 1]) > 0) {\n arr[j] = arr[j + 1]\n arr[++j] = n\n }\n if (i === j && j > 0) { // no change yet\n // sort to the left\n while (j > 0 && compareFn(arr[j - 1], n) > 0) {\n arr[j] = arr[j - 1]\n arr[--j] = n\n }\n }\n return j\n}\n","import * as array from './array.js'\n\n/**\n * Utility module to work with strings.\n *\n * @module string\n */\n\nexport const fromCharCode = String.fromCharCode\nexport const fromCodePoint = String.fromCodePoint\n\n/**\n * The largest utf16 character.\n * Corresponds to Uint8Array([255, 255]) or charcodeof(2x2^8)\n */\nexport const MAX_UTF16_CHARACTER = fromCharCode(65535)\n\n/**\n * @param {string} s\n * @return {string}\n */\nconst toLowerCase = s => s.toLowerCase()\n\nconst trimLeftRegex = /^\\s*/g\n\n/**\n * @param {string} s\n * @return {string}\n */\nexport const trimLeft = s => s.replace(trimLeftRegex, '')\n\nconst fromCamelCaseRegex = /([A-Z])/g\n\n/**\n * @param {string} s\n * @param {string} separator\n * @return {string}\n */\nexport const fromCamelCase = (s, separator) => trimLeft(s.replace(fromCamelCaseRegex, match => `${separator}${toLowerCase(match)}`))\n\n/**\n * Compute the utf8ByteLength\n * @param {string} str\n * @return {number}\n */\nexport const utf8ByteLength = str => unescape(encodeURIComponent(str)).length\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\nexport const _encodeUtf8Polyfill = str => {\n const encodedString = unescape(encodeURIComponent(str))\n const len = encodedString.length\n const buf = new Uint8Array(len)\n for (let i = 0; i < len; i++) {\n buf[i] = /** @type {number} */ (encodedString.codePointAt(i))\n }\n return buf\n}\n\n/* c8 ignore next */\nexport const utf8TextEncoder = /** @type {TextEncoder} */ (typeof TextEncoder !== 'undefined' ? new TextEncoder() : null)\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\nexport const _encodeUtf8Native = str => utf8TextEncoder.encode(str)\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\n/* c8 ignore next */\nexport const encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\nexport const _decodeUtf8Polyfill = buf => {\n let remainingLen = buf.length\n let encodedString = ''\n let bufPos = 0\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n const bytes = buf.subarray(bufPos, bufPos + nextLen)\n bufPos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes))\n remainingLen -= nextLen\n }\n return decodeURIComponent(escape(encodedString))\n}\n\n/* c8 ignore next */\nexport let utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8', { fatal: true, ignoreBOM: true })\n\n/* c8 ignore start */\nif (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) {\n // Safari doesn't handle BOM correctly.\n // This fixes a bug in Safari 13.0.5 where it produces a BOM the first time it is called.\n // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the first call and\n // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the second call\n // Another issue is that from then on no BOM chars are recognized anymore\n /* c8 ignore next */\n utf8TextDecoder = null\n}\n/* c8 ignore stop */\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\nexport const _decodeUtf8Native = buf => /** @type {TextDecoder} */ (utf8TextDecoder).decode(buf)\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\n/* c8 ignore next */\nexport const decodeUtf8 = utf8TextDecoder ? _decodeUtf8Native : _decodeUtf8Polyfill\n\n/**\n * @param {string} str The initial string\n * @param {number} index Starting position\n * @param {number} remove Number of characters to remove\n * @param {string} insert New content to insert\n */\nexport const splice = (str, index, remove, insert = '') => str.slice(0, index) + insert + str.slice(index + remove)\n\n/**\n * @param {string} source\n * @param {number} n\n */\nexport const repeat = (source, n) => array.unfold(n, () => source).join('')\n","/**\n * Error helpers.\n *\n * @module error\n */\n\n/**\n * @param {string} s\n * @return {Error}\n */\n/* c8 ignore next */\nexport const create = s => new Error(s)\n\n/**\n * @throws {Error}\n * @return {never}\n */\n/* c8 ignore next 3 */\nexport const methodUnimplemented = () => {\n throw create('Method unimplemented')\n}\n\n/**\n * @throws {Error}\n * @return {never}\n */\n/* c8 ignore next 3 */\nexport const unexpectedCase = () => {\n throw create('Unexpected case')\n}\n","/**\n * Efficient schema-less binary encoding with support for variable length encoding.\n *\n * Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n *\n * @module encoding\n */\n\nimport * as math from './math.js'\nimport * as number from './number.js'\nimport * as binary from './binary.js'\nimport * as string from './string.js'\nimport * as array from './array.js'\n\n/**\n * A BinaryEncoder handles the encoding to an Uint8Array.\n */\nexport class Encoder {\n constructor () {\n this.cpos = 0\n this.cbuf = new Uint8Array(100)\n /**\n * @type {Array}\n */\n this.bufs = []\n }\n}\n\n/**\n * @function\n * @return {Encoder}\n */\nexport const createEncoder = () => new Encoder()\n\n/**\n * @param {function(Encoder):void} f\n */\nexport const encode = (f) => {\n const encoder = createEncoder()\n f(encoder)\n return toUint8Array(encoder)\n}\n\n/**\n * The current length of the encoded data.\n *\n * @function\n * @param {Encoder} encoder\n * @return {number}\n */\nexport const length = encoder => {\n let len = encoder.cpos\n for (let i = 0; i < encoder.bufs.length; i++) {\n len += encoder.bufs[i].length\n }\n return len\n}\n\n/**\n * Check whether encoder is empty.\n *\n * @function\n * @param {Encoder} encoder\n * @return {boolean}\n */\nexport const hasContent = encoder => encoder.cpos > 0 || encoder.bufs.length > 0\n\n/**\n * Transform to Uint8Array.\n *\n * @function\n * @param {Encoder} encoder\n * @return {Uint8Array} The created ArrayBuffer.\n */\nexport const toUint8Array = encoder => {\n const uint8arr = new Uint8Array(length(encoder))\n let curPos = 0\n for (let i = 0; i < encoder.bufs.length; i++) {\n const d = encoder.bufs[i]\n uint8arr.set(d, curPos)\n curPos += d.length\n }\n uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos)\n return uint8arr\n}\n\n/**\n * Verify that it is possible to write `len` bytes wtihout checking. If\n * necessary, a new Buffer with the required length is attached.\n *\n * @param {Encoder} encoder\n * @param {number} len\n */\nexport const verifyLen = (encoder, len) => {\n const bufferLen = encoder.cbuf.length\n if (bufferLen - encoder.cpos < len) {\n encoder.bufs.push(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos))\n encoder.cbuf = new Uint8Array(math.max(bufferLen, len) * 2)\n encoder.cpos = 0\n }\n}\n\n/**\n * Write one byte to the encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The byte that is to be encoded.\n */\nexport const write = (encoder, num) => {\n const bufferLen = encoder.cbuf.length\n if (encoder.cpos === bufferLen) {\n encoder.bufs.push(encoder.cbuf)\n encoder.cbuf = new Uint8Array(bufferLen * 2)\n encoder.cpos = 0\n }\n encoder.cbuf[encoder.cpos++] = num\n}\n\n/**\n * Write one byte at a specific position.\n * Position must already be written (i.e. encoder.length > pos)\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos Position to which to write data\n * @param {number} num Unsigned 8-bit integer\n */\nexport const set = (encoder, pos, num) => {\n let buffer = null\n // iterate all buffers and adjust position\n for (let i = 0; i < encoder.bufs.length && buffer === null; i++) {\n const b = encoder.bufs[i]\n if (pos < b.length) {\n buffer = b // found buffer\n } else {\n pos -= b.length\n }\n }\n if (buffer === null) {\n // use current buffer\n buffer = encoder.cbuf\n }\n buffer[pos] = num\n}\n\n/**\n * Write one byte as an unsigned integer.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint8 = write\n\n/**\n * Write one byte as an unsigned Integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint8 = set\n\n/**\n * Write two bytes as an unsigned integer.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint16 = (encoder, num) => {\n write(encoder, num & binary.BITS8)\n write(encoder, (num >>> 8) & binary.BITS8)\n}\n/**\n * Write two bytes as an unsigned integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint16 = (encoder, pos, num) => {\n set(encoder, pos, num & binary.BITS8)\n set(encoder, pos + 1, (num >>> 8) & binary.BITS8)\n}\n\n/**\n * Write two bytes as an unsigned integer\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint32 = (encoder, num) => {\n for (let i = 0; i < 4; i++) {\n write(encoder, num & binary.BITS8)\n num >>>= 8\n }\n}\n\n/**\n * Write two bytes as an unsigned integer in big endian order.\n * (most significant byte first)\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint32BigEndian = (encoder, num) => {\n for (let i = 3; i >= 0; i--) {\n write(encoder, (num >>> (8 * i)) & binary.BITS8)\n }\n}\n\n/**\n * Write two bytes as an unsigned integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint32 = (encoder, pos, num) => {\n for (let i = 0; i < 4; i++) {\n set(encoder, pos + i, num & binary.BITS8)\n num >>>= 8\n }\n}\n\n/**\n * Write a variable length unsigned integer. Max encodable integer is 2^53.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeVarUint = (encoder, num) => {\n while (num > binary.BITS7) {\n write(encoder, binary.BIT8 | (binary.BITS7 & num))\n num = math.floor(num / 128) // shift >>> 7\n }\n write(encoder, binary.BITS7 & num)\n}\n\n/**\n * Write a variable length integer.\n *\n * We use the 7th bit instead for signaling that this is a negative number.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeVarInt = (encoder, num) => {\n const isNegative = math.isNegativeZero(num)\n if (isNegative) {\n num = -num\n }\n // |- whether to continue reading |- whether is negative |- number\n write(encoder, (num > binary.BITS6 ? binary.BIT8 : 0) | (isNegative ? binary.BIT7 : 0) | (binary.BITS6 & num))\n num = math.floor(num / 64) // shift >>> 6\n // We don't need to consider the case of num === 0 so we can use a different\n // pattern here than above.\n while (num > 0) {\n write(encoder, (num > binary.BITS7 ? binary.BIT8 : 0) | (binary.BITS7 & num))\n num = math.floor(num / 128) // shift >>> 7\n }\n}\n\n/**\n * A cache to store strings temporarily\n */\nconst _strBuffer = new Uint8Array(30000)\nconst _maxStrBSize = _strBuffer.length / 3\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const _writeVarStringNative = (encoder, str) => {\n if (str.length < _maxStrBSize) {\n // We can encode the string into the existing buffer\n /* c8 ignore next */\n const written = string.utf8TextEncoder.encodeInto(str, _strBuffer).written || 0\n writeVarUint(encoder, written)\n for (let i = 0; i < written; i++) {\n write(encoder, _strBuffer[i])\n }\n } else {\n writeVarUint8Array(encoder, string.encodeUtf8(str))\n }\n}\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const _writeVarStringPolyfill = (encoder, str) => {\n const encodedString = unescape(encodeURIComponent(str))\n const len = encodedString.length\n writeVarUint(encoder, len)\n for (let i = 0; i < len; i++) {\n write(encoder, /** @type {number} */ (encodedString.codePointAt(i)))\n }\n}\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\n/* c8 ignore next */\nexport const writeVarString = (string.utf8TextEncoder && /** @type {any} */ (string.utf8TextEncoder).encodeInto) ? _writeVarStringNative : _writeVarStringPolyfill\n\n/**\n * Write a string terminated by a special byte sequence. This is not very performant and is\n * generally discouraged. However, the resulting byte arrays are lexiographically ordered which\n * makes this a nice feature for databases.\n *\n * The string will be encoded using utf8 and then terminated and escaped using writeTerminatingUint8Array.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const writeTerminatedString = (encoder, str) =>\n writeTerminatedUint8Array(encoder, string.encodeUtf8(str))\n\n/**\n * Write a terminating Uint8Array. Note that this is not performant and is generally\n * discouraged. There are few situations when this is needed.\n *\n * We use 0x0 as a terminating character. 0x1 serves as an escape character for 0x0 and 0x1.\n *\n * Example: [0,1,2] is encoded to [1,0,1,1,2,0]. 0x0, and 0x1 needed to be escaped using 0x1. Then\n * the result is terminated using the 0x0 character.\n *\n * This is basically how many systems implement null terminated strings. However, we use an escape\n * character 0x1 to avoid issues and potenial attacks on our database (if this is used as a key\n * encoder for NoSql databases).\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} buf The string that is to be encoded.\n */\nexport const writeTerminatedUint8Array = (encoder, buf) => {\n for (let i = 0; i < buf.length; i++) {\n const b = buf[i]\n if (b === 0 || b === 1) {\n write(encoder, 1)\n }\n write(encoder, buf[i])\n }\n write(encoder, 0)\n}\n\n/**\n * Write the content of another Encoder.\n *\n * @TODO: can be improved!\n * - Note: Should consider that when appending a lot of small Encoders, we should rather clone than referencing the old structure.\n * Encoders start with a rather big initial buffer.\n *\n * @function\n * @param {Encoder} encoder The enUint8Arr\n * @param {Encoder} append The BinaryEncoder to be written.\n */\nexport const writeBinaryEncoder = (encoder, append) => writeUint8Array(encoder, toUint8Array(append))\n\n/**\n * Append fixed-length Uint8Array to the encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} uint8Array\n */\nexport const writeUint8Array = (encoder, uint8Array) => {\n const bufferLen = encoder.cbuf.length\n const cpos = encoder.cpos\n const leftCopyLen = math.min(bufferLen - cpos, uint8Array.length)\n const rightCopyLen = uint8Array.length - leftCopyLen\n encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos)\n encoder.cpos += leftCopyLen\n if (rightCopyLen > 0) {\n // Still something to write, write right half..\n // Append new buffer\n encoder.bufs.push(encoder.cbuf)\n // must have at least size of remaining buffer\n encoder.cbuf = new Uint8Array(math.max(bufferLen * 2, rightCopyLen))\n // copy array\n encoder.cbuf.set(uint8Array.subarray(leftCopyLen))\n encoder.cpos = rightCopyLen\n }\n}\n\n/**\n * Append an Uint8Array to Encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} uint8Array\n */\nexport const writeVarUint8Array = (encoder, uint8Array) => {\n writeVarUint(encoder, uint8Array.byteLength)\n writeUint8Array(encoder, uint8Array)\n}\n\n/**\n * Create an DataView of the next `len` bytes. Use it to write data after\n * calling this function.\n *\n * ```js\n * // write float32 using DataView\n * const dv = writeOnDataView(encoder, 4)\n * dv.setFloat32(0, 1.1)\n * // read float32 using DataView\n * const dv = readFromDataView(encoder, 4)\n * dv.getFloat32(0) // => 1.100000023841858 (leaving it to the reader to find out why this is the correct result)\n * ```\n *\n * @param {Encoder} encoder\n * @param {number} len\n * @return {DataView}\n */\nexport const writeOnDataView = (encoder, len) => {\n verifyLen(encoder, len)\n const dview = new DataView(encoder.cbuf.buffer, encoder.cpos, len)\n encoder.cpos += len\n return dview\n}\n\n/**\n * @param {Encoder} encoder\n * @param {number} num\n */\nexport const writeFloat32 = (encoder, num) => writeOnDataView(encoder, 4).setFloat32(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {number} num\n */\nexport const writeFloat64 = (encoder, num) => writeOnDataView(encoder, 8).setFloat64(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {bigint} num\n */\nexport const writeBigInt64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigInt64(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {bigint} num\n */\nexport const writeBigUint64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigUint64(0, num, false)\n\nconst floatTestBed = new DataView(new ArrayBuffer(4))\n/**\n * Check if a number can be encoded as a 32 bit float.\n *\n * @param {number} num\n * @return {boolean}\n */\nconst isFloat32 = num => {\n floatTestBed.setFloat32(0, num)\n return floatTestBed.getFloat32(0) === num\n}\n\n/**\n * Encode data with efficient binary format.\n *\n * Differences to JSON:\n * • Transforms data to a binary format (not to a string)\n * • Encodes undefined, NaN, and ArrayBuffer (these can't be represented in JSON)\n * • Numbers are efficiently encoded either as a variable length integer, as a\n * 32 bit float, as a 64 bit float, or as a 64 bit bigint.\n *\n * Encoding table:\n *\n * | Data Type | Prefix | Encoding Method | Comment |\n * | ------------------- | -------- | ------------------ | ------- |\n * | undefined | 127 | | Functions, symbol, and everything that cannot be identified is encoded as undefined |\n * | null | 126 | | |\n * | integer | 125 | writeVarInt | Only encodes 32 bit signed integers |\n * | float32 | 124 | writeFloat32 | |\n * | float64 | 123 | writeFloat64 | |\n * | bigint | 122 | writeBigInt64 | |\n * | boolean (false) | 121 | | True and false are different data types so we save the following byte |\n * | boolean (true) | 120 | | - 0b01111000 so the last bit determines whether true or false |\n * | string | 119 | writeVarString | |\n * | object | 118 | custom | Writes {length} then {length} key-value pairs |\n * | array | 117 | custom | Writes {length} then {length} json values |\n * | Uint8Array | 116 | writeVarUint8Array | We use Uint8Array for any kind of binary data |\n *\n * Reasons for the decreasing prefix:\n * We need the first bit for extendability (later we may want to encode the\n * prefix with writeVarUint). The remaining 7 bits are divided as follows:\n * [0-30] the beginning of the data range is used for custom purposes\n * (defined by the function that uses this library)\n * [31-127] the end of the data range is used for data encoding by\n * lib0/encoding.js\n *\n * @param {Encoder} encoder\n * @param {undefined|null|number|bigint|boolean|string|Object|Array|Uint8Array} data\n */\nexport const writeAny = (encoder, data) => {\n switch (typeof data) {\n case 'string':\n // TYPE 119: STRING\n write(encoder, 119)\n writeVarString(encoder, data)\n break\n case 'number':\n if (number.isInteger(data) && math.abs(data) <= binary.BITS31) {\n // TYPE 125: INTEGER\n write(encoder, 125)\n writeVarInt(encoder, data)\n } else if (isFloat32(data)) {\n // TYPE 124: FLOAT32\n write(encoder, 124)\n writeFloat32(encoder, data)\n } else {\n // TYPE 123: FLOAT64\n write(encoder, 123)\n writeFloat64(encoder, data)\n }\n break\n case 'bigint':\n // TYPE 122: BigInt\n write(encoder, 122)\n writeBigInt64(encoder, data)\n break\n case 'object':\n if (data === null) {\n // TYPE 126: null\n write(encoder, 126)\n } else if (array.isArray(data)) {\n // TYPE 117: Array\n write(encoder, 117)\n writeVarUint(encoder, data.length)\n for (let i = 0; i < data.length; i++) {\n writeAny(encoder, data[i])\n }\n } else if (data instanceof Uint8Array) {\n // TYPE 116: ArrayBuffer\n write(encoder, 116)\n writeVarUint8Array(encoder, data)\n } else {\n // TYPE 118: Object\n write(encoder, 118)\n const keys = Object.keys(data)\n writeVarUint(encoder, keys.length)\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n writeVarString(encoder, key)\n writeAny(encoder, data[key])\n }\n }\n break\n case 'boolean':\n // TYPE 120/121: boolean (true/false)\n write(encoder, data ? 120 : 121)\n break\n default:\n // TYPE 127: undefined\n write(encoder, 127)\n }\n}\n\n/**\n * Now come a few stateful encoder that have their own classes.\n */\n\n/**\n * Basic Run Length Encoder - a basic compression implementation.\n *\n * Encodes [1,1,1,7] to [1,3,7,1] (3 times 1, 1 time 7). This encoder might do more harm than good if there are a lot of values that are not repeated.\n *\n * It was originally used for image compression. Cool .. article http://csbruce.com/cbm/transactor/pdfs/trans_v7_i06.pdf\n *\n * @note T must not be null!\n *\n * @template T\n */\nexport class RleEncoder extends Encoder {\n /**\n * @param {function(Encoder, T):void} writer\n */\n constructor (writer) {\n super()\n /**\n * The writer\n */\n this.w = writer\n /**\n * Current state\n * @type {T|null}\n */\n this.s = null\n this.count = 0\n }\n\n /**\n * @param {T} v\n */\n write (v) {\n if (this.s === v) {\n this.count++\n } else {\n if (this.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw\n }\n this.count = 1\n // write first value\n this.w(this, v)\n this.s = v\n }\n }\n}\n\n/**\n * Basic diff decoder using variable length encoding.\n *\n * Encodes the values [3, 1100, 1101, 1050, 0] to [3, 1097, 1, -51, -1050] using writeVarInt.\n */\nexport class IntDiffEncoder extends Encoder {\n /**\n * @param {number} start\n */\n constructor (start) {\n super()\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n writeVarInt(this, v - this.s)\n this.s = v\n }\n}\n\n/**\n * A combination of IntDiffEncoder and RleEncoder.\n *\n * Basically first writes the IntDiffEncoder and then counts duplicate diffs using RleEncoding.\n *\n * Encodes the values [1,1,1,2,3,4,5,6] as [1,1,0,2,1,5] (RLE([1,0,0,1,1,1,1,1]) ⇒ RleIntDiff[1,1,0,2,1,5])\n */\nexport class RleIntDiffEncoder extends Encoder {\n /**\n * @param {number} start\n */\n constructor (start) {\n super()\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s === v && this.count > 0) {\n this.count++\n } else {\n if (this.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw\n }\n this.count = 1\n // write first value\n writeVarInt(this, v - this.s)\n this.s = v\n }\n }\n}\n\n/**\n * @param {UintOptRleEncoder} encoder\n */\nconst flushUintOptRleEncoder = encoder => {\n if (encoder.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n // case 1: just a single value. set sign to positive\n // case 2: write several values. set sign to negative to indicate that there is a length coming\n writeVarInt(encoder.encoder, encoder.count === 1 ? encoder.s : -encoder.s)\n if (encoder.count > 1) {\n writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw\n }\n }\n}\n\n/**\n * Optimized Rle encoder that does not suffer from the mentioned problem of the basic Rle encoder.\n *\n * Internally uses VarInt encoder to write unsigned integers. If the input occurs multiple times, we write\n * write it as a negative number. The UintOptRleDecoder then understands that it needs to read a count.\n *\n * Encodes [1,2,3,3,3] as [1,2,-3,3] (once 1, once 2, three times 3)\n */\nexport class UintOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s === v) {\n this.count++\n } else {\n flushUintOptRleEncoder(this)\n this.count = 1\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushUintOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * Increasing Uint Optimized RLE Encoder\n *\n * The RLE encoder counts the number of same occurences of the same value.\n * The IncUintOptRle encoder counts if the value increases.\n * I.e. 7, 8, 9, 10 will be encoded as [-7, 4]. 1, 3, 5 will be encoded\n * as [1, 3, 5].\n */\nexport class IncUintOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s + this.count === v) {\n this.count++\n } else {\n flushUintOptRleEncoder(this)\n this.count = 1\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushUintOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * @param {IntDiffOptRleEncoder} encoder\n */\nconst flushIntDiffOptRleEncoder = encoder => {\n if (encoder.count > 0) {\n // 31 bit making up the diff | wether to write the counter\n // const encodedDiff = encoder.diff << 1 | (encoder.count === 1 ? 0 : 1)\n const encodedDiff = encoder.diff * 2 + (encoder.count === 1 ? 0 : 1)\n // flush counter, unless this is the first value (count = 0)\n // case 1: just a single value. set first bit to positive\n // case 2: write several values. set first bit to negative to indicate that there is a length coming\n writeVarInt(encoder.encoder, encodedDiff)\n if (encoder.count > 1) {\n writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw\n }\n }\n}\n\n/**\n * A combination of the IntDiffEncoder and the UintOptRleEncoder.\n *\n * The count approach is similar to the UintDiffOptRleEncoder, but instead of using the negative bitflag, it encodes\n * in the LSB whether a count is to be read. Therefore this Encoder only supports 31 bit integers!\n *\n * Encodes [1, 2, 3, 2] as [3, 1, 6, -1] (more specifically [(1 << 1) | 1, (3 << 0) | 0, -1])\n *\n * Internally uses variable length encoding. Contrary to normal UintVar encoding, the first byte contains:\n * * 1 bit that denotes whether the next value is a count (LSB)\n * * 1 bit that denotes whether this value is negative (MSB - 1)\n * * 1 bit that denotes whether to continue reading the variable length integer (MSB)\n *\n * Therefore, only five bits remain to encode diff ranges.\n *\n * Use this Encoder only when appropriate. In most cases, this is probably a bad idea.\n */\nexport class IntDiffOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n this.diff = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.diff === v - this.s) {\n this.s = v\n this.count++\n } else {\n flushIntDiffOptRleEncoder(this)\n this.count = 1\n this.diff = v - this.s\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushIntDiffOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * Optimized String Encoder.\n *\n * Encoding many small strings in a simple Encoder is not very efficient. The function call to decode a string takes some time and creates references that must be eventually deleted.\n * In practice, when decoding several million small strings, the GC will kick in more and more often to collect orphaned string objects (or maybe there is another reason?).\n *\n * This string encoder solves the above problem. All strings are concatenated and written as a single string using a single encoding call.\n *\n * The lengths are encoded using a UintOptRleEncoder.\n */\nexport class StringEncoder {\n constructor () {\n /**\n * @type {Array}\n */\n this.sarr = []\n this.s = ''\n this.lensE = new UintOptRleEncoder()\n }\n\n /**\n * @param {string} string\n */\n write (string) {\n this.s += string\n if (this.s.length > 19) {\n this.sarr.push(this.s)\n this.s = ''\n }\n this.lensE.write(string.length)\n }\n\n toUint8Array () {\n const encoder = new Encoder()\n this.sarr.push(this.s)\n this.s = ''\n writeVarString(encoder, this.sarr.join(''))\n writeUint8Array(encoder, this.lensE.toUint8Array())\n return toUint8Array(encoder)\n }\n}\n","/**\n * Efficient schema-less binary decoding with support for variable length encoding.\n *\n * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n *\n * @module decoding\n */\n\nimport * as binary from './binary.js'\nimport * as math from './math.js'\nimport * as number from './number.js'\nimport * as string from './string.js'\nimport * as error from './error.js'\nimport * as encoding from './encoding.js'\n\nconst errorUnexpectedEndOfArray = error.create('Unexpected end of array')\nconst errorIntegerOutOfRange = error.create('Integer out of Range')\n\n/**\n * A Decoder handles the decoding of an Uint8Array.\n */\nexport class Decoder {\n /**\n * @param {Uint8Array} uint8Array Binary data to decode\n */\n constructor (uint8Array) {\n /**\n * Decoding target.\n *\n * @type {Uint8Array}\n */\n this.arr = uint8Array\n /**\n * Current decoding position.\n *\n * @type {number}\n */\n this.pos = 0\n }\n}\n\n/**\n * @function\n * @param {Uint8Array} uint8Array\n * @return {Decoder}\n */\nexport const createDecoder = uint8Array => new Decoder(uint8Array)\n\n/**\n * @function\n * @param {Decoder} decoder\n * @return {boolean}\n */\nexport const hasContent = decoder => decoder.pos !== decoder.arr.length\n\n/**\n * Clone a decoder instance.\n * Optionally set a new position parameter.\n *\n * @function\n * @param {Decoder} decoder The decoder instance\n * @param {number} [newPos] Defaults to current position\n * @return {Decoder} A clone of `decoder`\n */\nexport const clone = (decoder, newPos = decoder.pos) => {\n const _decoder = createDecoder(decoder.arr)\n _decoder.pos = newPos\n return _decoder\n}\n\n/**\n * Create an Uint8Array view of the next `len` bytes and advance the position by `len`.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n *\n * @function\n * @param {Decoder} decoder The decoder instance\n * @param {number} len The length of bytes to read\n * @return {Uint8Array}\n */\nexport const readUint8Array = (decoder, len) => {\n const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len)\n decoder.pos += len\n return view\n}\n\n/**\n * Read variable length Uint8Array.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n *\n * @function\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readVarUint8Array = decoder => readUint8Array(decoder, readVarUint(decoder))\n\n/**\n * Read the rest of the content as an ArrayBuffer\n * @function\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readTailAsUint8Array = decoder => readUint8Array(decoder, decoder.arr.length - decoder.pos)\n\n/**\n * Skip one byte, jump to the next position.\n * @function\n * @param {Decoder} decoder The decoder instance\n * @return {number} The next position\n */\nexport const skip8 = decoder => decoder.pos++\n\n/**\n * Read one byte as unsigned integer.\n * @function\n * @param {Decoder} decoder The decoder instance\n * @return {number} Unsigned 8-bit integer\n */\nexport const readUint8 = decoder => decoder.arr[decoder.pos++]\n\n/**\n * Read 2 bytes as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint16 = decoder => {\n const uint =\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8)\n decoder.pos += 2\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint32 = decoder => {\n const uint =\n (decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8) +\n (decoder.arr[decoder.pos + 2] << 16) +\n (decoder.arr[decoder.pos + 3] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer in big endian order.\n * (most significant byte first)\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint32BigEndian = decoder => {\n const uint =\n (decoder.arr[decoder.pos + 3] +\n (decoder.arr[decoder.pos + 2] << 8) +\n (decoder.arr[decoder.pos + 1] << 16) +\n (decoder.arr[decoder.pos] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint8 = decoder => decoder.arr[decoder.pos]\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint16 = decoder =>\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8)\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint32 = decoder => (\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8) +\n (decoder.arr[decoder.pos + 2] << 16) +\n (decoder.arr[decoder.pos + 3] << 24)\n) >>> 0\n\n/**\n * Read unsigned integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * * numbers < 2^7 is stored in one bytlength\n * * numbers < 2^14 is stored in two bylength\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.length\n */\nexport const readVarUint = decoder => {\n let num = 0\n let mult = 1\n const len = decoder.arr.length\n while (decoder.pos < len) {\n const r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & binary.BITS7) * mult // shift $r << (7*#iterations) and add it to num\n mult *= 128 // next iteration, shift 7 \"more\" to the left\n if (r < binary.BIT8) {\n return num\n }\n /* c8 ignore start */\n if (num > number.MAX_SAFE_INTEGER) {\n throw errorIntegerOutOfRange\n }\n /* c8 ignore stop */\n }\n throw errorUnexpectedEndOfArray\n}\n\n/**\n * Read signed integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * * numbers < 2^7 is stored in one bytlength\n * * numbers < 2^14 is stored in two bylength\n * @todo This should probably create the inverse ~num if number is negative - but this would be a breaking change.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.length\n */\nexport const readVarInt = decoder => {\n let r = decoder.arr[decoder.pos++]\n let num = r & binary.BITS6\n let mult = 64\n const sign = (r & binary.BIT7) > 0 ? -1 : 1\n if ((r & binary.BIT8) === 0) {\n // don't continue reading\n return sign * num\n }\n const len = decoder.arr.length\n while (decoder.pos < len) {\n r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & binary.BITS7) * mult\n mult *= 128\n if (r < binary.BIT8) {\n return sign * num\n }\n /* c8 ignore start */\n if (num > number.MAX_SAFE_INTEGER) {\n throw errorIntegerOutOfRange\n }\n /* c8 ignore stop */\n }\n throw errorUnexpectedEndOfArray\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {number}\n */\nexport const peekVarUint = decoder => {\n const pos = decoder.pos\n const s = readVarUint(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {number}\n */\nexport const peekVarInt = decoder => {\n const pos = decoder.pos\n const s = readVarInt(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * We don't test this function anymore as we use native decoding/encoding by default now.\n * Better not modify this anymore..\n *\n * Transforming utf8 to a string is pretty expensive. The code performs 10x better\n * when String.fromCodePoint is fed with all characters as arguments.\n * But most environments have a maximum number of arguments per functions.\n * For effiency reasons we apply a maximum of 10000 characters at once.\n *\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String.\n */\n/* c8 ignore start */\nexport const _readVarStringPolyfill = decoder => {\n let remainingLen = readVarUint(decoder)\n if (remainingLen === 0) {\n return ''\n } else {\n let encodedString = String.fromCodePoint(readUint8(decoder)) // remember to decrease remainingLen\n if (--remainingLen < 100) { // do not create a Uint8Array for small strings\n while (remainingLen--) {\n encodedString += String.fromCodePoint(readUint8(decoder))\n }\n } else {\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n // this is dangerous, we create a fresh array view from the existing buffer\n const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen)\n decoder.pos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes))\n remainingLen -= nextLen\n }\n }\n return decodeURIComponent(escape(encodedString))\n }\n}\n/* c8 ignore stop */\n\n/**\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String\n */\nexport const _readVarStringNative = decoder =>\n /** @type any */ (string.utf8TextDecoder).decode(readVarUint8Array(decoder))\n\n/**\n * Read string of variable length\n * * varUint is used to store the length of the string\n *\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String\n *\n */\n/* c8 ignore next */\nexport const readVarString = string.utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill\n\n/**\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readTerminatedUint8Array = decoder => {\n const encoder = encoding.createEncoder()\n let b\n while (true) {\n b = readUint8(decoder)\n if (b === 0) {\n return encoding.toUint8Array(encoder)\n }\n if (b === 1) {\n b = readUint8(decoder)\n }\n encoding.write(encoder, b)\n }\n}\n\n/**\n * @param {Decoder} decoder\n * @return {string}\n */\nexport const readTerminatedString = decoder => string.decodeUtf8(readTerminatedUint8Array(decoder))\n\n/**\n * Look ahead and read varString without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {string}\n */\nexport const peekVarString = decoder => {\n const pos = decoder.pos\n const s = readVarString(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * @param {Decoder} decoder\n * @param {number} len\n * @return {DataView}\n */\nexport const readFromDataView = (decoder, len) => {\n const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len)\n decoder.pos += len\n return dv\n}\n\n/**\n * @param {Decoder} decoder\n */\nexport const readFloat32 = decoder => readFromDataView(decoder, 4).getFloat32(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readFloat64 = decoder => readFromDataView(decoder, 8).getFloat64(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readBigInt64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigInt64(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readBigUint64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigUint64(0, false)\n\n/**\n * @type {Array}\n */\nconst readAnyLookupTable = [\n decoder => undefined, // CASE 127: undefined\n decoder => null, // CASE 126: null\n readVarInt, // CASE 125: integer\n readFloat32, // CASE 124: float32\n readFloat64, // CASE 123: float64\n readBigInt64, // CASE 122: bigint\n decoder => false, // CASE 121: boolean (false)\n decoder => true, // CASE 120: boolean (true)\n readVarString, // CASE 119: string\n decoder => { // CASE 118: object\n const len = readVarUint(decoder)\n /**\n * @type {Object}\n */\n const obj = {}\n for (let i = 0; i < len; i++) {\n const key = readVarString(decoder)\n obj[key] = readAny(decoder)\n }\n return obj\n },\n decoder => { // CASE 117: array\n const len = readVarUint(decoder)\n const arr = []\n for (let i = 0; i < len; i++) {\n arr.push(readAny(decoder))\n }\n return arr\n },\n readVarUint8Array // CASE 116: Uint8Array\n]\n\n/**\n * @param {Decoder} decoder\n */\nexport const readAny = decoder => readAnyLookupTable[127 - readUint8(decoder)](decoder)\n\n/**\n * T must not be null.\n *\n * @template T\n */\nexport class RleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {function(Decoder):T} reader\n */\n constructor (uint8Array, reader) {\n super(uint8Array)\n /**\n * The reader\n */\n this.reader = reader\n /**\n * Current state\n * @type {T|null}\n */\n this.s = null\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = this.reader(this)\n if (hasContent(this)) {\n this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented\n } else {\n this.count = -1 // read the current value forever\n }\n }\n this.count--\n return /** @type {T} */ (this.s)\n }\n}\n\nexport class IntDiffDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {number} start\n */\n constructor (uint8Array, start) {\n super(uint8Array)\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n }\n\n /**\n * @return {number}\n */\n read () {\n this.s += readVarInt(this)\n return this.s\n }\n}\n\nexport class RleIntDiffDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {number} start\n */\n constructor (uint8Array, start) {\n super(uint8Array)\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n this.count = 0\n }\n\n /**\n * @return {number}\n */\n read () {\n if (this.count === 0) {\n this.s += readVarInt(this)\n if (hasContent(this)) {\n this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented\n } else {\n this.count = -1 // read the current value forever\n }\n }\n this.count--\n return /** @type {number} */ (this.s)\n }\n}\n\nexport class UintOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = readVarInt(this)\n // if the sign is negative, we read the count too, otherwise count is 1\n const isNegative = math.isNegativeZero(this.s)\n this.count = 1\n if (isNegative) {\n this.s = -this.s\n this.count = readVarUint(this) + 2\n }\n }\n this.count--\n return /** @type {number} */ (this.s)\n }\n}\n\nexport class IncUintOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = readVarInt(this)\n // if the sign is negative, we read the count too, otherwise count is 1\n const isNegative = math.isNegativeZero(this.s)\n this.count = 1\n if (isNegative) {\n this.s = -this.s\n this.count = readVarUint(this) + 2\n }\n }\n this.count--\n return /** @type {number} */ (this.s++)\n }\n}\n\nexport class IntDiffOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n this.diff = 0\n }\n\n /**\n * @return {number}\n */\n read () {\n if (this.count === 0) {\n const diff = readVarInt(this)\n // if the first bit is set, we read more data\n const hasCount = diff & 1\n this.diff = math.floor(diff / 2) // shift >> 1\n this.count = 1\n if (hasCount) {\n this.count = readVarUint(this) + 2\n }\n }\n this.s += this.diff\n this.count--\n return this.s\n }\n}\n\nexport class StringDecoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n this.decoder = new UintOptRleDecoder(uint8Array)\n this.str = readVarString(this.decoder)\n /**\n * @type {number}\n */\n this.spos = 0\n }\n\n /**\n * @return {string}\n */\n read () {\n const end = this.spos + this.decoder.read()\n const res = this.str.slice(this.spos, end)\n this.spos = end\n return res\n }\n}\n",null,"/**\n * Utility module to work with time.\n *\n * @module time\n */\n\nimport * as metric from './metric.js'\nimport * as math from './math.js'\n\n/**\n * Return current time.\n *\n * @return {Date}\n */\nexport const getDate = () => new Date()\n\n/**\n * Return current unix time.\n *\n * @return {number}\n */\nexport const getUnixTime = Date.now\n\n/**\n * Transform time (in ms) to a human readable format. E.g. 1100 => 1.1s. 60s => 1min. .001 => 10μs.\n *\n * @param {number} d duration in milliseconds\n * @return {string} humanized approximation of time\n */\nexport const humanizeDuration = d => {\n if (d < 60000) {\n const p = metric.prefix(d, -1)\n return math.round(p.n * 100) / 100 + p.prefix + 's'\n }\n d = math.floor(d / 1000)\n const seconds = d % 60\n const minutes = math.floor(d / 60) % 60\n const hours = math.floor(d / 3600) % 24\n const days = math.floor(d / 86400)\n if (days > 0) {\n return days + 'd' + ((hours > 0 || minutes > 30) ? ' ' + (minutes > 30 ? hours + 1 : hours) + 'h' : '')\n }\n if (hours > 0) {\n /* c8 ignore next */\n return hours + 'h' + ((minutes > 0 || seconds > 30) ? ' ' + (seconds > 30 ? minutes + 1 : minutes) + 'min' : '')\n }\n return minutes + 'min' + (seconds > 0 ? ' ' + seconds + 's' : '')\n}\n","/**\n * Utility module to work with key-value stores.\n *\n * @module map\n */\n\n/**\n * Creates a new Map instance.\n *\n * @function\n * @return {Map}\n *\n * @function\n */\nexport const create = () => new Map()\n\n/**\n * Copy a Map object into a fresh Map object.\n *\n * @function\n * @template K,V\n * @param {Map} m\n * @return {Map}\n */\nexport const copy = m => {\n const r = create()\n m.forEach((v, k) => { r.set(k, v) })\n return r\n}\n\n/**\n * Get map property. Create T if property is undefined and set T on map.\n *\n * ```js\n * const listeners = map.setIfUndefined(events, 'eventName', set.create)\n * listeners.add(listener)\n * ```\n *\n * @function\n * @template {Map} MAP\n * @template {MAP extends Map ? function():V : unknown} CF\n * @param {MAP} map\n * @param {MAP extends Map ? K : unknown} key\n * @param {CF} createT\n * @return {ReturnType}\n */\nexport const setIfUndefined = (map, key, createT) => {\n let set = map.get(key)\n if (set === undefined) {\n map.set(key, set = createT())\n }\n return set\n}\n\n/**\n * Creates an Array and populates it with the content of all key-value pairs using the `f(value, key)` function.\n *\n * @function\n * @template K\n * @template V\n * @template R\n * @param {Map} m\n * @param {function(V,K):R} f\n * @return {Array}\n */\nexport const map = (m, f) => {\n const res = []\n for (const [key, value] of m) {\n res.push(f(value, key))\n }\n return res\n}\n\n/**\n * Tests whether any key-value pairs pass the test implemented by `f(value, key)`.\n *\n * @todo should rename to some - similarly to Array.some\n *\n * @function\n * @template K\n * @template V\n * @param {Map} m\n * @param {function(V,K):boolean} f\n * @return {boolean}\n */\nexport const any = (m, f) => {\n for (const [key, value] of m) {\n if (f(value, key)) {\n return true\n }\n }\n return false\n}\n\n/**\n * Tests whether all key-value pairs pass the test implemented by `f(value, key)`.\n *\n * @function\n * @template K\n * @template V\n * @param {Map} m\n * @param {function(V,K):boolean} f\n * @return {boolean}\n */\nexport const all = (m, f) => {\n for (const [key, value] of m) {\n if (!f(value, key)) {\n return false\n }\n }\n return true\n}\n","/**\n * Observable class prototype.\n *\n * @module observable\n */\n\nimport * as map from './map.js'\nimport * as set from './set.js'\nimport * as array from './array.js'\n\n/**\n * Handles named events.\n * @experimental\n *\n * This is basically a (better typed) duplicate of Observable, which will replace Observable in the\n * next release.\n *\n * @template {{[key in keyof EVENTS]: function(...any):void}} EVENTS\n */\nexport class ObservableV2 {\n constructor () {\n /**\n * Some desc.\n * @type {Map>}\n */\n this._observers = map.create()\n }\n\n /**\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name\n * @param {EVENTS[NAME]} f\n */\n on (name, f) {\n map.setIfUndefined(this._observers, /** @type {string} */ (name), set.create).add(f)\n return f\n }\n\n /**\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name\n * @param {EVENTS[NAME]} f\n */\n once (name, f) {\n /**\n * @param {...any} args\n */\n const _f = (...args) => {\n this.off(name, /** @type {any} */ (_f))\n f(...args)\n }\n this.on(name, /** @type {any} */ (_f))\n }\n\n /**\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name\n * @param {EVENTS[NAME]} f\n */\n off (name, f) {\n const observers = this._observers.get(name)\n if (observers !== undefined) {\n observers.delete(f)\n if (observers.size === 0) {\n this._observers.delete(name)\n }\n }\n }\n\n /**\n * Emit a named event. All registered event listeners that listen to the\n * specified name will receive the event.\n *\n * @todo This should catch exceptions\n *\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name The event name.\n * @param {Parameters} args The arguments that are applied to the event listener.\n */\n emit (name, args) {\n // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called.\n return array.from((this._observers.get(name) || map.create()).values()).forEach(f => f(...args))\n }\n\n destroy () {\n this._observers = map.create()\n }\n}\n\n/* c8 ignore start */\n/**\n * Handles named events.\n *\n * @deprecated\n * @template N\n */\nexport class Observable {\n constructor () {\n /**\n * Some desc.\n * @type {Map}\n */\n this._observers = map.create()\n }\n\n /**\n * @param {N} name\n * @param {function} f\n */\n on (name, f) {\n map.setIfUndefined(this._observers, name, set.create).add(f)\n }\n\n /**\n * @param {N} name\n * @param {function} f\n */\n once (name, f) {\n /**\n * @param {...any} args\n */\n const _f = (...args) => {\n this.off(name, _f)\n f(...args)\n }\n this.on(name, _f)\n }\n\n /**\n * @param {N} name\n * @param {function} f\n */\n off (name, f) {\n const observers = this._observers.get(name)\n if (observers !== undefined) {\n observers.delete(f)\n if (observers.size === 0) {\n this._observers.delete(name)\n }\n }\n }\n\n /**\n * Emit a named event. All registered event listeners that listen to the\n * specified name will receive the event.\n *\n * @todo This should catch exceptions\n *\n * @param {N} name The event name.\n * @param {Array} args The arguments that are applied to the event listener.\n */\n emit (name, args) {\n // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called.\n return array.from((this._observers.get(name) || map.create()).values()).forEach(f => f(...args))\n }\n\n destroy () {\n this._observers = map.create()\n }\n}\n/* c8 ignore end */\n","/**\n * Utility functions for working with EcmaScript objects.\n *\n * @module object\n */\n\n/**\n * @return {Object} obj\n */\nexport const create = () => Object.create(null)\n\n/**\n * Object.assign\n */\nexport const assign = Object.assign\n\n/**\n * @param {Object} obj\n */\nexport const keys = Object.keys\n\n/**\n * @template V\n * @param {{[k:string]:V}} obj\n * @param {function(V,string):any} f\n */\nexport const forEach = (obj, f) => {\n for (const key in obj) {\n f(obj[key], key)\n }\n}\n\n/**\n * @todo implement mapToArray & map\n *\n * @template R\n * @param {Object} obj\n * @param {function(any,string):R} f\n * @return {Array}\n */\nexport const map = (obj, f) => {\n const results = []\n for (const key in obj) {\n results.push(f(obj[key], key))\n }\n return results\n}\n\n/**\n * @deprecated use object.size instead\n * @param {Object} obj\n * @return {number}\n */\nexport const length = obj => keys(obj).length\n\n/**\n * @param {Object} obj\n * @return {number}\n */\nexport const size = obj => keys(obj).length\n\n/**\n * @param {Object} obj\n * @param {function(any,string):boolean} f\n * @return {boolean}\n */\nexport const some = (obj, f) => {\n for (const key in obj) {\n if (f(obj[key], key)) {\n return true\n }\n }\n return false\n}\n\n/**\n * @param {Object|undefined} obj\n */\nexport const isEmpty = obj => {\n // eslint-disable-next-line\n for (const _k in obj) {\n return false\n }\n return true\n}\n\n/**\n * @param {Object} obj\n * @param {function(any,string):boolean} f\n * @return {boolean}\n */\nexport const every = (obj, f) => {\n for (const key in obj) {\n if (!f(obj[key], key)) {\n return false\n }\n }\n return true\n}\n\n/**\n * Calls `Object.prototype.hasOwnProperty`.\n *\n * @param {any} obj\n * @param {string|symbol} key\n * @return {boolean}\n */\nexport const hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key)\n\n/**\n * @param {Object} a\n * @param {Object} b\n * @return {boolean}\n */\nexport const equalFlat = (a, b) => a === b || (size(a) === size(b) && every(a, (val, key) => (val !== undefined || hasProperty(b, key)) && b[key] === val))\n\n/**\n * Make an object immutable. This hurts performance and is usually not needed if you perform good\n * coding practices.\n */\nexport const freeze = Object.freeze\n\n/**\n * Make an object and all its children immutable.\n * This *really* hurts performance and is usually not needed if you perform good coding practices.\n *\n * @template {any} T\n * @param {T} o\n * @return {Readonly}\n */\nexport const deepFreeze = (o) => {\n for (const key in o) {\n const c = o[key]\n if (typeof c === 'object' || typeof c === 'function') {\n deepFreeze(o[key])\n }\n }\n return freeze(o)\n}\n","/**\n * Common functions and function call helpers.\n *\n * @module function\n */\n\nimport * as array from './array.js'\nimport * as object from './object.js'\n\n/**\n * Calls all functions in `fs` with args. Only throws after all functions were called.\n *\n * @param {Array} fs\n * @param {Array} args\n */\nexport const callAll = (fs, args, i = 0) => {\n try {\n for (; i < fs.length; i++) {\n fs[i](...args)\n }\n } finally {\n if (i < fs.length) {\n callAll(fs, args, i + 1)\n }\n }\n}\n\nexport const nop = () => {}\n\n/**\n * @template T\n * @param {function():T} f\n * @return {T}\n */\nexport const apply = f => f()\n\n/**\n * @template A\n *\n * @param {A} a\n * @return {A}\n */\nexport const id = a => a\n\n/**\n * @template T\n *\n * @param {T} a\n * @param {T} b\n * @return {boolean}\n */\nexport const equalityStrict = (a, b) => a === b\n\n/**\n * @template T\n *\n * @param {Array|object} a\n * @param {Array|object} b\n * @return {boolean}\n */\nexport const equalityFlat = (a, b) => a === b || (a != null && b != null && a.constructor === b.constructor && ((array.isArray(a) && array.equalFlat(a, /** @type {Array} */ (b))) || (typeof a === 'object' && object.equalFlat(a, b))))\n\n/* c8 ignore start */\n\n/**\n * @param {any} a\n * @param {any} b\n * @return {boolean}\n */\nexport const equalityDeep = (a, b) => {\n if (a == null || b == null) {\n return equalityStrict(a, b)\n }\n if (a.constructor !== b.constructor) {\n return false\n }\n if (a === b) {\n return true\n }\n switch (a.constructor) {\n case ArrayBuffer:\n a = new Uint8Array(a)\n b = new Uint8Array(b)\n // eslint-disable-next-line no-fallthrough\n case Uint8Array: {\n if (a.byteLength !== b.byteLength) {\n return false\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false\n }\n }\n break\n }\n case Set: {\n if (a.size !== b.size) {\n return false\n }\n for (const value of a) {\n if (!b.has(value)) {\n return false\n }\n }\n break\n }\n case Map: {\n if (a.size !== b.size) {\n return false\n }\n for (const key of a.keys()) {\n if (!b.has(key) || !equalityDeep(a.get(key), b.get(key))) {\n return false\n }\n }\n break\n }\n case Object:\n if (object.length(a) !== object.length(b)) {\n return false\n }\n for (const key in a) {\n if (!object.hasProperty(a, key) || !equalityDeep(a[key], b[key])) {\n return false\n }\n }\n break\n case Array:\n if (a.length !== b.length) {\n return false\n }\n for (let i = 0; i < a.length; i++) {\n if (!equalityDeep(a[i], b[i])) {\n return false\n }\n }\n break\n default:\n return false\n }\n return true\n}\n\n/**\n * @template V\n * @template {V} OPTS\n *\n * @param {V} value\n * @param {Array} options\n */\n// @ts-ignore\nexport const isOneOf = (value, options) => options.includes(value)\n/* c8 ignore stop */\n\nexport const isArray = array.isArray\n\n/**\n * @param {any} s\n * @return {s is String}\n */\nexport const isString = (s) => s && s.constructor === String\n\n/**\n * @param {any} n\n * @return {n is Number}\n */\nexport const isNumber = n => n != null && n.constructor === Number\n\n/**\n * @template {abstract new (...args: any) => any} TYPE\n * @param {any} n\n * @param {TYPE} T\n * @return {n is InstanceType}\n */\nexport const is = (n, T) => n && n.constructor === T\n\n/**\n * @template {abstract new (...args: any) => any} TYPE\n * @param {TYPE} T\n */\nexport const isTemplate = (T) =>\n /**\n * @param {any} n\n * @return {n is InstanceType}\n **/\n n => n && n.constructor === T\n","/**\n * @module awareness-protocol\n */\n\nimport * as encoding from 'lib0/encoding'\nimport * as decoding from 'lib0/decoding'\nimport * as time from 'lib0/time'\nimport * as math from 'lib0/math'\nimport { Observable } from 'lib0/observable'\nimport * as f from 'lib0/function'\nimport * as Y from 'yjs' // eslint-disable-line\n\nexport const outdatedTimeout = 30000\n\n/**\n * @typedef {Object} MetaClientState\n * @property {number} MetaClientState.clock\n * @property {number} MetaClientState.lastUpdated unix timestamp\n */\n\n/**\n * The Awareness class implements a simple shared state protocol that can be used for non-persistent data like awareness information\n * (cursor, username, status, ..). Each client can update its own local state and listen to state changes of\n * remote clients. Every client may set a state of a remote peer to `null` to mark the client as offline.\n *\n * Each client is identified by a unique client id (something we borrow from `doc.clientID`). A client can override\n * its own state by propagating a message with an increasing timestamp (`clock`). If such a message is received, it is\n * applied if the known state of that client is older than the new state (`clock < newClock`). If a client thinks that\n * a remote client is offline, it may propagate a message with\n * `{ clock: currentClientClock, state: null, client: remoteClient }`. If such a\n * message is received, and the known clock of that client equals the received clock, it will override the state with `null`.\n *\n * Before a client disconnects, it should propagate a `null` state with an updated clock.\n *\n * Awareness states must be updated every 30 seconds. Otherwise the Awareness instance will delete the client state.\n *\n * @extends {Observable}\n */\nexport class Awareness extends Observable {\n /**\n * @param {Y.Doc} doc\n */\n constructor (doc) {\n super()\n this.doc = doc\n /**\n * @type {number}\n */\n this.clientID = doc.clientID\n /**\n * Maps from client id to client state\n * @type {Map>}\n */\n this.states = new Map()\n /**\n * @type {Map}\n */\n this.meta = new Map()\n this._checkInterval = /** @type {any} */ (setInterval(() => {\n const now = time.getUnixTime()\n if (this.getLocalState() !== null && (outdatedTimeout / 2 <= now - /** @type {{lastUpdated:number}} */ (this.meta.get(this.clientID)).lastUpdated)) {\n // renew local clock\n this.setLocalState(this.getLocalState())\n }\n /**\n * @type {Array}\n */\n const remove = []\n this.meta.forEach((meta, clientid) => {\n if (clientid !== this.clientID && outdatedTimeout <= now - meta.lastUpdated && this.states.has(clientid)) {\n remove.push(clientid)\n }\n })\n if (remove.length > 0) {\n removeAwarenessStates(this, remove, 'timeout')\n }\n }, math.floor(outdatedTimeout / 10)))\n doc.on('destroy', () => {\n this.destroy()\n })\n this.setLocalState({})\n }\n\n destroy () {\n this.emit('destroy', [this])\n this.setLocalState(null)\n super.destroy()\n clearInterval(this._checkInterval)\n }\n\n /**\n * @return {Object|null}\n */\n getLocalState () {\n return this.states.get(this.clientID) || null\n }\n\n /**\n * @param {Object|null} state\n */\n setLocalState (state) {\n const clientID = this.clientID\n const currLocalMeta = this.meta.get(clientID)\n const clock = currLocalMeta === undefined ? 0 : currLocalMeta.clock + 1\n const prevState = this.states.get(clientID)\n if (state === null) {\n this.states.delete(clientID)\n } else {\n this.states.set(clientID, state)\n }\n this.meta.set(clientID, {\n clock,\n lastUpdated: time.getUnixTime()\n })\n const added = []\n const updated = []\n const filteredUpdated = []\n const removed = []\n if (state === null) {\n removed.push(clientID)\n } else if (prevState == null) {\n if (state != null) {\n added.push(clientID)\n }\n } else {\n updated.push(clientID)\n if (!f.equalityDeep(prevState, state)) {\n filteredUpdated.push(clientID)\n }\n }\n if (added.length > 0 || filteredUpdated.length > 0 || removed.length > 0) {\n this.emit('change', [{ added, updated: filteredUpdated, removed }, 'local'])\n }\n this.emit('update', [{ added, updated, removed }, 'local'])\n }\n\n /**\n * @param {string} field\n * @param {any} value\n */\n setLocalStateField (field, value) {\n const state = this.getLocalState()\n if (state !== null) {\n this.setLocalState({\n ...state,\n [field]: value\n })\n }\n }\n\n /**\n * @return {Map>}\n */\n getStates () {\n return this.states\n }\n}\n\n/**\n * Mark (remote) clients as inactive and remove them from the list of active peers.\n * This change will be propagated to remote clients.\n *\n * @param {Awareness} awareness\n * @param {Array} clients\n * @param {any} origin\n */\nexport const removeAwarenessStates = (awareness, clients, origin) => {\n const removed = []\n for (let i = 0; i < clients.length; i++) {\n const clientID = clients[i]\n if (awareness.states.has(clientID)) {\n awareness.states.delete(clientID)\n if (clientID === awareness.clientID) {\n const curMeta = /** @type {MetaClientState} */ (awareness.meta.get(clientID))\n awareness.meta.set(clientID, {\n clock: curMeta.clock + 1,\n lastUpdated: time.getUnixTime()\n })\n }\n removed.push(clientID)\n }\n }\n if (removed.length > 0) {\n awareness.emit('change', [{ added: [], updated: [], removed }, origin])\n awareness.emit('update', [{ added: [], updated: [], removed }, origin])\n }\n}\n\n/**\n * @param {Awareness} awareness\n * @param {Array} clients\n * @return {Uint8Array}\n */\nexport const encodeAwarenessUpdate = (awareness, clients, states = awareness.states) => {\n const len = clients.length\n const encoder = encoding.createEncoder()\n encoding.writeVarUint(encoder, len)\n for (let i = 0; i < len; i++) {\n const clientID = clients[i]\n const state = states.get(clientID) || null\n const clock = /** @type {MetaClientState} */ (awareness.meta.get(clientID)).clock\n encoding.writeVarUint(encoder, clientID)\n encoding.writeVarUint(encoder, clock)\n encoding.writeVarString(encoder, JSON.stringify(state))\n }\n return encoding.toUint8Array(encoder)\n}\n\n/**\n * Modify the content of an awareness update before re-encoding it to an awareness update.\n *\n * This might be useful when you have a central server that wants to ensure that clients\n * cant hijack somebody elses identity.\n *\n * @param {Uint8Array} update\n * @param {function(any):any} modify\n * @return {Uint8Array}\n */\nexport const modifyAwarenessUpdate = (update, modify) => {\n const decoder = decoding.createDecoder(update)\n const encoder = encoding.createEncoder()\n const len = decoding.readVarUint(decoder)\n encoding.writeVarUint(encoder, len)\n for (let i = 0; i < len; i++) {\n const clientID = decoding.readVarUint(decoder)\n const clock = decoding.readVarUint(decoder)\n const state = JSON.parse(decoding.readVarString(decoder))\n const modifiedState = modify(state)\n encoding.writeVarUint(encoder, clientID)\n encoding.writeVarUint(encoder, clock)\n encoding.writeVarString(encoder, JSON.stringify(modifiedState))\n }\n return encoding.toUint8Array(encoder)\n}\n\n/**\n * @param {Awareness} awareness\n * @param {Uint8Array} update\n * @param {any} origin This will be added to the emitted change event\n */\nexport const applyAwarenessUpdate = (awareness, update, origin) => {\n const decoder = decoding.createDecoder(update)\n const timestamp = time.getUnixTime()\n const added = []\n const updated = []\n const filteredUpdated = []\n const removed = []\n const len = decoding.readVarUint(decoder)\n for (let i = 0; i < len; i++) {\n const clientID = decoding.readVarUint(decoder)\n let clock = decoding.readVarUint(decoder)\n const state = JSON.parse(decoding.readVarString(decoder))\n const clientMeta = awareness.meta.get(clientID)\n const prevState = awareness.states.get(clientID)\n const currClock = clientMeta === undefined ? 0 : clientMeta.clock\n if (currClock < clock || (currClock === clock && state === null && awareness.states.has(clientID))) {\n if (state === null) {\n // never let a remote client remove this local state\n if (clientID === awareness.clientID && awareness.getLocalState() != null) {\n // remote client removed the local state. Do not remote state. Broadcast a message indicating\n // that this client still exists by increasing the clock\n clock++\n } else {\n awareness.states.delete(clientID)\n }\n } else {\n awareness.states.set(clientID, state)\n }\n awareness.meta.set(clientID, {\n clock,\n lastUpdated: timestamp\n })\n if (clientMeta === undefined && state !== null) {\n added.push(clientID)\n } else if (clientMeta !== undefined && state === null) {\n removed.push(clientID)\n } else if (state !== null) {\n if (!f.equalityDeep(state, prevState)) {\n filteredUpdated.push(clientID)\n }\n updated.push(clientID)\n }\n }\n }\n if (added.length > 0 || filteredUpdated.length > 0 || removed.length > 0) {\n awareness.emit('change', [{\n added, updated: filteredUpdated, removed\n }, origin])\n }\n if (added.length > 0 || updated.length > 0 || removed.length > 0) {\n awareness.emit('update', [{\n added, updated, removed\n }, origin])\n }\n}\n","/**\n * @module sync-protocol\n */\n\nimport * as encoding from 'lib0/encoding'\nimport * as decoding from 'lib0/decoding'\nimport * as Y from 'yjs'\n\n/**\n * @typedef {Map} StateMap\n */\n\n/**\n * Core Yjs defines two message types:\n * • YjsSyncStep1: Includes the State Set of the sending client. When received, the client should reply with YjsSyncStep2.\n * • YjsSyncStep2: Includes all missing structs and the complete delete set. When received, the client is assured that it\n * received all information from the remote client.\n *\n * In a peer-to-peer network, you may want to introduce a SyncDone message type. Both parties should initiate the connection\n * with SyncStep1. When a client received SyncStep2, it should reply with SyncDone. When the local client received both\n * SyncStep2 and SyncDone, it is assured that it is synced to the remote client.\n *\n * In a client-server model, you want to handle this differently: The client should initiate the connection with SyncStep1.\n * When the server receives SyncStep1, it should reply with SyncStep2 immediately followed by SyncStep1. The client replies\n * with SyncStep2 when it receives SyncStep1. Optionally the server may send a SyncDone after it received SyncStep2, so the\n * client knows that the sync is finished. There are two reasons for this more elaborated sync model: 1. This protocol can\n * easily be implemented on top of http and websockets. 2. The server should only reply to requests, and not initiate them.\n * Therefore it is necessary that the client initiates the sync.\n *\n * Construction of a message:\n * [messageType : varUint, message definition..]\n *\n * Note: A message does not include information about the room name. This must to be handled by the upper layer protocol!\n *\n * stringify[messageType] stringifies a message definition (messageType is already read from the bufffer)\n */\n\nexport const messageYjsSyncStep1 = 0\nexport const messageYjsSyncStep2 = 1\nexport const messageYjsUpdate = 2\n\n/**\n * Create a sync step 1 message based on the state of the current shared document.\n *\n * @param {encoding.Encoder} encoder\n * @param {Y.Doc} doc\n */\nexport const writeSyncStep1 = (encoder, doc) => {\n encoding.writeVarUint(encoder, messageYjsSyncStep1)\n const sv = Y.encodeStateVector(doc)\n encoding.writeVarUint8Array(encoder, sv)\n}\n\n/**\n * @param {encoding.Encoder} encoder\n * @param {Y.Doc} doc\n * @param {Uint8Array} [encodedStateVector]\n */\nexport const writeSyncStep2 = (encoder, doc, encodedStateVector) => {\n encoding.writeVarUint(encoder, messageYjsSyncStep2)\n encoding.writeVarUint8Array(encoder, Y.encodeStateAsUpdate(doc, encodedStateVector))\n}\n\n/**\n * Read SyncStep1 message and reply with SyncStep2.\n *\n * @param {decoding.Decoder} decoder The reply to the received message\n * @param {encoding.Encoder} encoder The received message\n * @param {Y.Doc} doc\n */\nexport const readSyncStep1 = (decoder, encoder, doc) =>\n writeSyncStep2(encoder, doc, decoding.readVarUint8Array(decoder))\n\n/**\n * Read and apply Structs and then DeleteStore to a y instance.\n *\n * @param {decoding.Decoder} decoder\n * @param {Y.Doc} doc\n * @param {any} transactionOrigin\n */\nexport const readSyncStep2 = (decoder, doc, transactionOrigin) => {\n try {\n Y.applyUpdate(doc, decoding.readVarUint8Array(decoder), transactionOrigin)\n } catch (error) {\n // This catches errors that are thrown by event handlers\n console.error('Caught error while handling a Yjs update', error)\n }\n}\n\n/**\n * @param {encoding.Encoder} encoder\n * @param {Uint8Array} update\n */\nexport const writeUpdate = (encoder, update) => {\n encoding.writeVarUint(encoder, messageYjsUpdate)\n encoding.writeVarUint8Array(encoder, update)\n}\n\n/**\n * Read and apply Structs and then DeleteStore to a y instance.\n *\n * @param {decoding.Decoder} decoder\n * @param {Y.Doc} doc\n * @param {any} transactionOrigin\n */\nexport const readUpdate = readSyncStep2\n\n/**\n * @param {decoding.Decoder} decoder A message received from another client\n * @param {encoding.Encoder} encoder The reply message. Does not need to be sent if empty.\n * @param {Y.Doc} doc\n * @param {any} transactionOrigin\n */\nexport const readSyncMessage = (decoder, encoder, doc, transactionOrigin) => {\n const messageType = decoding.readVarUint(decoder)\n switch (messageType) {\n case messageYjsSyncStep1:\n readSyncStep1(decoder, encoder, doc)\n break\n case messageYjsSyncStep2:\n readSyncStep2(decoder, doc, transactionOrigin)\n break\n case messageYjsUpdate:\n readUpdate(decoder, doc, transactionOrigin)\n break\n default:\n throw new Error('Unknown message type')\n }\n return messageType\n}\n",null,null,null,null,null,null,null,null,null,null,null],"names":["create","length","binary.BITS7","binary.BIT8","math.floor","string.utf8TextEncoder","string.encodeUtf8","math.min","math.max","error.create","number.MAX_SAFE_INTEGER","string.utf8TextDecoder","map.create","map.setIfUndefined","set.create","array.from","object.length","object.hasProperty","time.getUnixTime","f.equalityDeep","encoding.createEncoder","encoding.writeVarUint","encoding.writeVarString","encoding.toUint8Array","decoding.createDecoder","decoding.readVarUint","decoding.readVarString","Y","encoding.writeVarUint8Array","decoding.readVarUint8Array","MessageType","writeTokenSyncRequest","writeAuthenticated","writePermissionDenied","AuthMessageType","WsReadyStates","ResetConnection","Doc","Mutex","applyUpdate","encodeStateAsUpdate","URLSearchParams","ConnectionTimeout","Unauthorized","SocketIncomingMessage","Forbidden","awarenessStatesToArray","createServer","WebSocketServer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAoBO,MAAM,IAAI,GAAG;AAsCb,MAAM,KAAK,GAAG;;AC1DrB;AACA;AACA;AACA;AACA;;AAEO,MAAM,KAAK,GAAG,IAAI,CAAC;;AAkB1B;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG;;ACtCzC;AACA;AACA;AACA;AACA;;;AAKO,MAAM,gBAAgB,GAAG,MAAM,CAAC;;ACTvC;AACA;AACA;AACA;AACA;;AAEO,MAAMA,QAAM,GAAG,MAAM,IAAI,GAAG;;ACN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B,OAAO,CAAA,EAAA,GAAA,SAAS,CAAC,aAAa,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,CAAA,EAAA,GAAA,SAAS,CAAC,WAAW,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI;SAC7D,CAAA,CACA,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,CAAA,CACrB,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,QAAQ,CAAC;AAErC,QAAA,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACvB;;QAGD,OAAO,CAAC,GAAG,EAAE;AACb,QAAA,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;AAE5B,QAAA,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AAC3B,YAAA,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAA,CAAE,CAAC;AAC3B,SAAC,CAAC;QAEF,OAAO,CAAC,GAAG,EAAE;AACb,QAAA,OAAO,CAAC,GAAG,CAAC,CAAA,EAAA,EAAK,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAE,CAAA,CAAC;QACzC,OAAO,CAAC,GAAG,EAAE;;AAEd;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js deleted file mode 100644 index 1f4dd80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js +++ /dev/null @@ -1,2798 +0,0 @@ -import { writeTokenSyncRequest, writeAuthenticated, writePermissionDenied, AuthMessageType, WsReadyStates, ResetConnection, ConnectionTimeout, Unauthorized, Forbidden, awarenessStatesToArray } from '@hocuspocus/common'; -import * as Y from 'yjs'; -import { Doc, applyUpdate, encodeStateAsUpdate } from 'yjs'; -import { Mutex } from 'async-mutex'; -import crypto from 'node:crypto'; -import { URLSearchParams } from 'node:url'; -import { createServer } from 'node:http'; -import kleur from 'kleur'; -import { WebSocketServer } from 'ws'; - -/* eslint-env browser */ - -const BIT8 = 128; -const BITS7 = 127; - -/** - * Common Math expressions. - * - * @module math - */ - -const floor = Math.floor; - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The smaller element of a and b - */ -const min = (a, b) => a < b ? a : b; - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The bigger element of a and b - */ -const max = (a, b) => a > b ? a : b; - -/** - * Utility helpers for working with numbers. - * - * @module number - */ - - -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER; - -/** - * Utility module to work with sets. - * - * @module set - */ - -const create$2 = () => new Set(); - -/** - * Utility module to work with Arrays. - * - * @module array - */ - - -/** - * Transforms something array-like to an actual Array. - * - * @function - * @template T - * @param {ArrayLike|Iterable} arraylike - * @return {T} - */ -const from = Array.from; - -/** - * @param {string} str - * @return {Uint8Array} - */ -const _encodeUtf8Polyfill = str => { - const encodedString = unescape(encodeURIComponent(str)); - const len = encodedString.length; - const buf = new Uint8Array(len); - for (let i = 0; i < len; i++) { - buf[i] = /** @type {number} */ (encodedString.codePointAt(i)); - } - return buf -}; - -/* c8 ignore next */ -const utf8TextEncoder = /** @type {TextEncoder} */ (typeof TextEncoder !== 'undefined' ? new TextEncoder() : null); - -/** - * @param {string} str - * @return {Uint8Array} - */ -const _encodeUtf8Native = str => utf8TextEncoder.encode(str); - -/** - * @param {string} str - * @return {Uint8Array} - */ -/* c8 ignore next */ -const encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill; - -/* c8 ignore next */ -let utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }); - -/* c8 ignore start */ -if (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) { - // Safari doesn't handle BOM correctly. - // This fixes a bug in Safari 13.0.5 where it produces a BOM the first time it is called. - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the first call and - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the second call - // Another issue is that from then on no BOM chars are recognized anymore - /* c8 ignore next */ - utf8TextDecoder = null; -} - -/** - * Error helpers. - * - * @module error - */ - -/** - * @param {string} s - * @return {Error} - */ -/* c8 ignore next */ -const create$1 = s => new Error(s); - -/** - * Efficient schema-less binary encoding with support for variable length encoding. - * - * Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module encoding - */ - - -/** - * A BinaryEncoder handles the encoding to an Uint8Array. - */ -class Encoder { - constructor () { - this.cpos = 0; - this.cbuf = new Uint8Array(100); - /** - * @type {Array} - */ - this.bufs = []; - } -} - -/** - * @function - * @return {Encoder} - */ -const createEncoder = () => new Encoder(); - -/** - * The current length of the encoded data. - * - * @function - * @param {Encoder} encoder - * @return {number} - */ -const length$1 = encoder => { - let len = encoder.cpos; - for (let i = 0; i < encoder.bufs.length; i++) { - len += encoder.bufs[i].length; - } - return len -}; - -/** - * Transform to Uint8Array. - * - * @function - * @param {Encoder} encoder - * @return {Uint8Array} The created ArrayBuffer. - */ -const toUint8Array = encoder => { - const uint8arr = new Uint8Array(length$1(encoder)); - let curPos = 0; - for (let i = 0; i < encoder.bufs.length; i++) { - const d = encoder.bufs[i]; - uint8arr.set(d, curPos); - curPos += d.length; - } - uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos); - return uint8arr -}; - -/** - * Write one byte to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {number} num The byte that is to be encoded. - */ -const write = (encoder, num) => { - const bufferLen = encoder.cbuf.length; - if (encoder.cpos === bufferLen) { - encoder.bufs.push(encoder.cbuf); - encoder.cbuf = new Uint8Array(bufferLen * 2); - encoder.cpos = 0; - } - encoder.cbuf[encoder.cpos++] = num; -}; - -/** - * Write a variable length unsigned integer. Max encodable integer is 2^53. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -const writeVarUint = (encoder, num) => { - while (num > BITS7) { - write(encoder, BIT8 | (BITS7 & num)); - num = floor(num / 128); // shift >>> 7 - } - write(encoder, BITS7 & num); -}; - -/** - * A cache to store strings temporarily - */ -const _strBuffer = new Uint8Array(30000); -const _maxStrBSize = _strBuffer.length / 3; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -const _writeVarStringNative = (encoder, str) => { - if (str.length < _maxStrBSize) { - // We can encode the string into the existing buffer - /* c8 ignore next */ - const written = utf8TextEncoder.encodeInto(str, _strBuffer).written || 0; - writeVarUint(encoder, written); - for (let i = 0; i < written; i++) { - write(encoder, _strBuffer[i]); - } - } else { - writeVarUint8Array(encoder, encodeUtf8(str)); - } -}; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -const _writeVarStringPolyfill = (encoder, str) => { - const encodedString = unescape(encodeURIComponent(str)); - const len = encodedString.length; - writeVarUint(encoder, len); - for (let i = 0; i < len; i++) { - write(encoder, /** @type {number} */ (encodedString.codePointAt(i))); - } -}; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -/* c8 ignore next */ -const writeVarString = (utf8TextEncoder && /** @type {any} */ (utf8TextEncoder).encodeInto) ? _writeVarStringNative : _writeVarStringPolyfill; - -/** - * Append fixed-length Uint8Array to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -const writeUint8Array = (encoder, uint8Array) => { - const bufferLen = encoder.cbuf.length; - const cpos = encoder.cpos; - const leftCopyLen = min(bufferLen - cpos, uint8Array.length); - const rightCopyLen = uint8Array.length - leftCopyLen; - encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos); - encoder.cpos += leftCopyLen; - if (rightCopyLen > 0) { - // Still something to write, write right half.. - // Append new buffer - encoder.bufs.push(encoder.cbuf); - // must have at least size of remaining buffer - encoder.cbuf = new Uint8Array(max(bufferLen * 2, rightCopyLen)); - // copy array - encoder.cbuf.set(uint8Array.subarray(leftCopyLen)); - encoder.cpos = rightCopyLen; - } -}; - -/** - * Append an Uint8Array to Encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -const writeVarUint8Array = (encoder, uint8Array) => { - writeVarUint(encoder, uint8Array.byteLength); - writeUint8Array(encoder, uint8Array); -}; - -/** - * Efficient schema-less binary decoding with support for variable length encoding. - * - * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module decoding - */ - - -const errorUnexpectedEndOfArray = create$1('Unexpected end of array'); -const errorIntegerOutOfRange = create$1('Integer out of Range'); - -/** - * A Decoder handles the decoding of an Uint8Array. - */ -class Decoder { - /** - * @param {Uint8Array} uint8Array Binary data to decode - */ - constructor (uint8Array) { - /** - * Decoding target. - * - * @type {Uint8Array} - */ - this.arr = uint8Array; - /** - * Current decoding position. - * - * @type {number} - */ - this.pos = 0; - } -} - -/** - * @function - * @param {Uint8Array} uint8Array - * @return {Decoder} - */ -const createDecoder = uint8Array => new Decoder(uint8Array); - -/** - * Create an Uint8Array view of the next `len` bytes and advance the position by `len`. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @param {Decoder} decoder The decoder instance - * @param {number} len The length of bytes to read - * @return {Uint8Array} - */ -const readUint8Array = (decoder, len) => { - const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len); - decoder.pos += len; - return view -}; - -/** - * Read variable length Uint8Array. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @param {Decoder} decoder - * @return {Uint8Array} - */ -const readVarUint8Array = decoder => readUint8Array(decoder, readVarUint(decoder)); - -/** - * Read one byte as unsigned integer. - * @function - * @param {Decoder} decoder The decoder instance - * @return {number} Unsigned 8-bit integer - */ -const readUint8 = decoder => decoder.arr[decoder.pos++]; - -/** - * Read unsigned integer (32bit) with variable length. - * 1/8th of the storage is used as encoding overhead. - * * numbers < 2^7 is stored in one bytlength - * * numbers < 2^14 is stored in two bylength - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer.length - */ -const readVarUint = decoder => { - let num = 0; - let mult = 1; - const len = decoder.arr.length; - while (decoder.pos < len) { - const r = decoder.arr[decoder.pos++]; - // num = num | ((r & binary.BITS7) << len) - num = num + (r & BITS7) * mult; // shift $r << (7*#iterations) and add it to num - mult *= 128; // next iteration, shift 7 "more" to the left - if (r < BIT8) { - return num - } - /* c8 ignore start */ - if (num > MAX_SAFE_INTEGER) { - throw errorIntegerOutOfRange - } - /* c8 ignore stop */ - } - throw errorUnexpectedEndOfArray -}; - -/** - * We don't test this function anymore as we use native decoding/encoding by default now. - * Better not modify this anymore.. - * - * Transforming utf8 to a string is pretty expensive. The code performs 10x better - * when String.fromCodePoint is fed with all characters as arguments. - * But most environments have a maximum number of arguments per functions. - * For effiency reasons we apply a maximum of 10000 characters at once. - * - * @function - * @param {Decoder} decoder - * @return {String} The read String. - */ -/* c8 ignore start */ -const _readVarStringPolyfill = decoder => { - let remainingLen = readVarUint(decoder); - if (remainingLen === 0) { - return '' - } else { - let encodedString = String.fromCodePoint(readUint8(decoder)); // remember to decrease remainingLen - if (--remainingLen < 100) { // do not create a Uint8Array for small strings - while (remainingLen--) { - encodedString += String.fromCodePoint(readUint8(decoder)); - } - } else { - while (remainingLen > 0) { - const nextLen = remainingLen < 10000 ? remainingLen : 10000; - // this is dangerous, we create a fresh array view from the existing buffer - const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen); - decoder.pos += nextLen; - // Starting with ES5.1 we can supply a generic array-like object as arguments - encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes)); - remainingLen -= nextLen; - } - } - return decodeURIComponent(escape(encodedString)) - } -}; -/* c8 ignore stop */ - -/** - * @function - * @param {Decoder} decoder - * @return {String} The read String - */ -const _readVarStringNative = decoder => - /** @type any */ (utf8TextDecoder).decode(readVarUint8Array(decoder)); - -/** - * Read string of variable length - * * varUint is used to store the length of the string - * - * @function - * @param {Decoder} decoder - * @return {String} The read String - * - */ -/* c8 ignore next */ -const readVarString = utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill; - -class IncomingMessage { - constructor(input) { - if (!(input instanceof Uint8Array)) { - input = new Uint8Array(input); - } - this.decoder = createDecoder(input); - } - get encoder() { - if (!this.encoderInternal) { - this.encoderInternal = createEncoder(); - } - return this.encoderInternal; - } - readVarUint8Array() { - return readVarUint8Array(this.decoder); - } - peekVarUint8Array() { - const { pos } = this.decoder; - const result = readVarUint8Array(this.decoder); - this.decoder.pos = pos; - return result; - } - readVarUint() { - return readVarUint(this.decoder); - } - readVarString() { - return readVarString(this.decoder); - } - toUint8Array() { - return toUint8Array(this.encoder); - } - writeVarUint(type) { - writeVarUint(this.encoder, type); - } - writeVarString(string) { - writeVarString(this.encoder, string); - } - get length() { - return length$1(this.encoder); - } -} - -/** - * Utility module to work with time. - * - * @module time - */ - - -/** - * Return current unix time. - * - * @return {number} - */ -const getUnixTime = Date.now; - -/** - * Utility module to work with key-value stores. - * - * @module map - */ - -/** - * Creates a new Map instance. - * - * @function - * @return {Map} - * - * @function - */ -const create = () => new Map(); - -/** - * Get map property. Create T if property is undefined and set T on map. - * - * ```js - * const listeners = map.setIfUndefined(events, 'eventName', set.create) - * listeners.add(listener) - * ``` - * - * @function - * @template {Map} MAP - * @template {MAP extends Map ? function():V : unknown} CF - * @param {MAP} map - * @param {MAP extends Map ? K : unknown} key - * @param {CF} createT - * @return {ReturnType} - */ -const setIfUndefined = (map, key, createT) => { - let set = map.get(key); - if (set === undefined) { - map.set(key, set = createT()); - } - return set -}; - -/** - * Observable class prototype. - * - * @module observable - */ - - -/* c8 ignore start */ -/** - * Handles named events. - * - * @deprecated - * @template N - */ -class Observable { - constructor () { - /** - * Some desc. - * @type {Map} - */ - this._observers = create(); - } - - /** - * @param {N} name - * @param {function} f - */ - on (name, f) { - setIfUndefined(this._observers, name, create$2).add(f); - } - - /** - * @param {N} name - * @param {function} f - */ - once (name, f) { - /** - * @param {...any} args - */ - const _f = (...args) => { - this.off(name, _f); - f(...args); - }; - this.on(name, _f); - } - - /** - * @param {N} name - * @param {function} f - */ - off (name, f) { - const observers = this._observers.get(name); - if (observers !== undefined) { - observers.delete(f); - if (observers.size === 0) { - this._observers.delete(name); - } - } - } - - /** - * Emit a named event. All registered event listeners that listen to the - * specified name will receive the event. - * - * @todo This should catch exceptions - * - * @param {N} name The event name. - * @param {Array} args The arguments that are applied to the event listener. - */ - emit (name, args) { - // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called. - return from((this._observers.get(name) || create()).values()).forEach(f => f(...args)) - } - - destroy () { - this._observers = create(); - } -} -/* c8 ignore end */ - -/** - * Utility functions for working with EcmaScript objects. - * - * @module object - */ - - -/** - * @param {Object} obj - */ -const keys = Object.keys; - -/** - * @deprecated use object.size instead - * @param {Object} obj - * @return {number} - */ -const length = obj => keys(obj).length; - -/** - * Calls `Object.prototype.hasOwnProperty`. - * - * @param {any} obj - * @param {string|symbol} key - * @return {boolean} - */ -const hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key); - -/** - * Common functions and function call helpers. - * - * @module function - */ - - -/** - * @template T - * - * @param {T} a - * @param {T} b - * @return {boolean} - */ -const equalityStrict = (a, b) => a === b; - -/* c8 ignore start */ - -/** - * @param {any} a - * @param {any} b - * @return {boolean} - */ -const equalityDeep = (a, b) => { - if (a == null || b == null) { - return equalityStrict(a, b) - } - if (a.constructor !== b.constructor) { - return false - } - if (a === b) { - return true - } - switch (a.constructor) { - case ArrayBuffer: - a = new Uint8Array(a); - b = new Uint8Array(b); - // eslint-disable-next-line no-fallthrough - case Uint8Array: { - if (a.byteLength !== b.byteLength) { - return false - } - for (let i = 0; i < a.length; i++) { - if (a[i] !== b[i]) { - return false - } - } - break - } - case Set: { - if (a.size !== b.size) { - return false - } - for (const value of a) { - if (!b.has(value)) { - return false - } - } - break - } - case Map: { - if (a.size !== b.size) { - return false - } - for (const key of a.keys()) { - if (!b.has(key) || !equalityDeep(a.get(key), b.get(key))) { - return false - } - } - break - } - case Object: - if (length(a) !== length(b)) { - return false - } - for (const key in a) { - if (!hasProperty(a, key) || !equalityDeep(a[key], b[key])) { - return false - } - } - break - case Array: - if (a.length !== b.length) { - return false - } - for (let i = 0; i < a.length; i++) { - if (!equalityDeep(a[i], b[i])) { - return false - } - } - break - default: - return false - } - return true -}; - -/** - * @module awareness-protocol - */ - - -const outdatedTimeout = 30000; - -/** - * @typedef {Object} MetaClientState - * @property {number} MetaClientState.clock - * @property {number} MetaClientState.lastUpdated unix timestamp - */ - -/** - * The Awareness class implements a simple shared state protocol that can be used for non-persistent data like awareness information - * (cursor, username, status, ..). Each client can update its own local state and listen to state changes of - * remote clients. Every client may set a state of a remote peer to `null` to mark the client as offline. - * - * Each client is identified by a unique client id (something we borrow from `doc.clientID`). A client can override - * its own state by propagating a message with an increasing timestamp (`clock`). If such a message is received, it is - * applied if the known state of that client is older than the new state (`clock < newClock`). If a client thinks that - * a remote client is offline, it may propagate a message with - * `{ clock: currentClientClock, state: null, client: remoteClient }`. If such a - * message is received, and the known clock of that client equals the received clock, it will override the state with `null`. - * - * Before a client disconnects, it should propagate a `null` state with an updated clock. - * - * Awareness states must be updated every 30 seconds. Otherwise the Awareness instance will delete the client state. - * - * @extends {Observable} - */ -class Awareness extends Observable { - /** - * @param {Y.Doc} doc - */ - constructor (doc) { - super(); - this.doc = doc; - /** - * @type {number} - */ - this.clientID = doc.clientID; - /** - * Maps from client id to client state - * @type {Map>} - */ - this.states = new Map(); - /** - * @type {Map} - */ - this.meta = new Map(); - this._checkInterval = /** @type {any} */ (setInterval(() => { - const now = getUnixTime(); - if (this.getLocalState() !== null && (outdatedTimeout / 2 <= now - /** @type {{lastUpdated:number}} */ (this.meta.get(this.clientID)).lastUpdated)) { - // renew local clock - this.setLocalState(this.getLocalState()); - } - /** - * @type {Array} - */ - const remove = []; - this.meta.forEach((meta, clientid) => { - if (clientid !== this.clientID && outdatedTimeout <= now - meta.lastUpdated && this.states.has(clientid)) { - remove.push(clientid); - } - }); - if (remove.length > 0) { - removeAwarenessStates(this, remove, 'timeout'); - } - }, floor(outdatedTimeout / 10))); - doc.on('destroy', () => { - this.destroy(); - }); - this.setLocalState({}); - } - - destroy () { - this.emit('destroy', [this]); - this.setLocalState(null); - super.destroy(); - clearInterval(this._checkInterval); - } - - /** - * @return {Object|null} - */ - getLocalState () { - return this.states.get(this.clientID) || null - } - - /** - * @param {Object|null} state - */ - setLocalState (state) { - const clientID = this.clientID; - const currLocalMeta = this.meta.get(clientID); - const clock = currLocalMeta === undefined ? 0 : currLocalMeta.clock + 1; - const prevState = this.states.get(clientID); - if (state === null) { - this.states.delete(clientID); - } else { - this.states.set(clientID, state); - } - this.meta.set(clientID, { - clock, - lastUpdated: getUnixTime() - }); - const added = []; - const updated = []; - const filteredUpdated = []; - const removed = []; - if (state === null) { - removed.push(clientID); - } else if (prevState == null) { - if (state != null) { - added.push(clientID); - } - } else { - updated.push(clientID); - if (!equalityDeep(prevState, state)) { - filteredUpdated.push(clientID); - } - } - if (added.length > 0 || filteredUpdated.length > 0 || removed.length > 0) { - this.emit('change', [{ added, updated: filteredUpdated, removed }, 'local']); - } - this.emit('update', [{ added, updated, removed }, 'local']); - } - - /** - * @param {string} field - * @param {any} value - */ - setLocalStateField (field, value) { - const state = this.getLocalState(); - if (state !== null) { - this.setLocalState({ - ...state, - [field]: value - }); - } - } - - /** - * @return {Map>} - */ - getStates () { - return this.states - } -} - -/** - * Mark (remote) clients as inactive and remove them from the list of active peers. - * This change will be propagated to remote clients. - * - * @param {Awareness} awareness - * @param {Array} clients - * @param {any} origin - */ -const removeAwarenessStates = (awareness, clients, origin) => { - const removed = []; - for (let i = 0; i < clients.length; i++) { - const clientID = clients[i]; - if (awareness.states.has(clientID)) { - awareness.states.delete(clientID); - if (clientID === awareness.clientID) { - const curMeta = /** @type {MetaClientState} */ (awareness.meta.get(clientID)); - awareness.meta.set(clientID, { - clock: curMeta.clock + 1, - lastUpdated: getUnixTime() - }); - } - removed.push(clientID); - } - } - if (removed.length > 0) { - awareness.emit('change', [{ added: [], updated: [], removed }, origin]); - awareness.emit('update', [{ added: [], updated: [], removed }, origin]); - } -}; - -/** - * @param {Awareness} awareness - * @param {Array} clients - * @return {Uint8Array} - */ -const encodeAwarenessUpdate = (awareness, clients, states = awareness.states) => { - const len = clients.length; - const encoder = createEncoder(); - writeVarUint(encoder, len); - for (let i = 0; i < len; i++) { - const clientID = clients[i]; - const state = states.get(clientID) || null; - const clock = /** @type {MetaClientState} */ (awareness.meta.get(clientID)).clock; - writeVarUint(encoder, clientID); - writeVarUint(encoder, clock); - writeVarString(encoder, JSON.stringify(state)); - } - return toUint8Array(encoder) -}; - -/** - * @param {Awareness} awareness - * @param {Uint8Array} update - * @param {any} origin This will be added to the emitted change event - */ -const applyAwarenessUpdate = (awareness, update, origin) => { - const decoder = createDecoder(update); - const timestamp = getUnixTime(); - const added = []; - const updated = []; - const filteredUpdated = []; - const removed = []; - const len = readVarUint(decoder); - for (let i = 0; i < len; i++) { - const clientID = readVarUint(decoder); - let clock = readVarUint(decoder); - const state = JSON.parse(readVarString(decoder)); - const clientMeta = awareness.meta.get(clientID); - const prevState = awareness.states.get(clientID); - const currClock = clientMeta === undefined ? 0 : clientMeta.clock; - if (currClock < clock || (currClock === clock && state === null && awareness.states.has(clientID))) { - if (state === null) { - // never let a remote client remove this local state - if (clientID === awareness.clientID && awareness.getLocalState() != null) { - // remote client removed the local state. Do not remote state. Broadcast a message indicating - // that this client still exists by increasing the clock - clock++; - } else { - awareness.states.delete(clientID); - } - } else { - awareness.states.set(clientID, state); - } - awareness.meta.set(clientID, { - clock, - lastUpdated: timestamp - }); - if (clientMeta === undefined && state !== null) { - added.push(clientID); - } else if (clientMeta !== undefined && state === null) { - removed.push(clientID); - } else if (state !== null) { - if (!equalityDeep(state, prevState)) { - filteredUpdated.push(clientID); - } - updated.push(clientID); - } - } - } - if (added.length > 0 || filteredUpdated.length > 0 || removed.length > 0) { - awareness.emit('change', [{ - added, updated: filteredUpdated, removed - }, origin]); - } - if (added.length > 0 || updated.length > 0 || removed.length > 0) { - awareness.emit('update', [{ - added, updated, removed - }, origin]); - } -}; - -/** - * @module sync-protocol - */ - - -/** - * @typedef {Map} StateMap - */ - -/** - * Core Yjs defines two message types: - * • YjsSyncStep1: Includes the State Set of the sending client. When received, the client should reply with YjsSyncStep2. - * • YjsSyncStep2: Includes all missing structs and the complete delete set. When received, the client is assured that it - * received all information from the remote client. - * - * In a peer-to-peer network, you may want to introduce a SyncDone message type. Both parties should initiate the connection - * with SyncStep1. When a client received SyncStep2, it should reply with SyncDone. When the local client received both - * SyncStep2 and SyncDone, it is assured that it is synced to the remote client. - * - * In a client-server model, you want to handle this differently: The client should initiate the connection with SyncStep1. - * When the server receives SyncStep1, it should reply with SyncStep2 immediately followed by SyncStep1. The client replies - * with SyncStep2 when it receives SyncStep1. Optionally the server may send a SyncDone after it received SyncStep2, so the - * client knows that the sync is finished. There are two reasons for this more elaborated sync model: 1. This protocol can - * easily be implemented on top of http and websockets. 2. The server should only reply to requests, and not initiate them. - * Therefore it is necessary that the client initiates the sync. - * - * Construction of a message: - * [messageType : varUint, message definition..] - * - * Note: A message does not include information about the room name. This must to be handled by the upper layer protocol! - * - * stringify[messageType] stringifies a message definition (messageType is already read from the bufffer) - */ - -const messageYjsSyncStep1 = 0; -const messageYjsSyncStep2 = 1; -const messageYjsUpdate = 2; - -/** - * Create a sync step 1 message based on the state of the current shared document. - * - * @param {encoding.Encoder} encoder - * @param {Y.Doc} doc - */ -const writeSyncStep1 = (encoder, doc) => { - writeVarUint(encoder, messageYjsSyncStep1); - const sv = Y.encodeStateVector(doc); - writeVarUint8Array(encoder, sv); -}; - -/** - * @param {encoding.Encoder} encoder - * @param {Y.Doc} doc - * @param {Uint8Array} [encodedStateVector] - */ -const writeSyncStep2 = (encoder, doc, encodedStateVector) => { - writeVarUint(encoder, messageYjsSyncStep2); - writeVarUint8Array(encoder, Y.encodeStateAsUpdate(doc, encodedStateVector)); -}; - -/** - * Read SyncStep1 message and reply with SyncStep2. - * - * @param {decoding.Decoder} decoder The reply to the received message - * @param {encoding.Encoder} encoder The received message - * @param {Y.Doc} doc - */ -const readSyncStep1 = (decoder, encoder, doc) => - writeSyncStep2(encoder, doc, readVarUint8Array(decoder)); - -/** - * Read and apply Structs and then DeleteStore to a y instance. - * - * @param {decoding.Decoder} decoder - * @param {Y.Doc} doc - * @param {any} transactionOrigin - */ -const readSyncStep2 = (decoder, doc, transactionOrigin) => { - try { - Y.applyUpdate(doc, readVarUint8Array(decoder), transactionOrigin); - } catch (error) { - // This catches errors that are thrown by event handlers - console.error('Caught error while handling a Yjs update', error); - } -}; - -/** - * @param {encoding.Encoder} encoder - * @param {Uint8Array} update - */ -const writeUpdate = (encoder, update) => { - writeVarUint(encoder, messageYjsUpdate); - writeVarUint8Array(encoder, update); -}; - -/** - * Read and apply Structs and then DeleteStore to a y instance. - * - * @param {decoding.Decoder} decoder - * @param {Y.Doc} doc - * @param {any} transactionOrigin - */ -const readUpdate = readSyncStep2; - -var MessageType; -(function (MessageType) { - MessageType[MessageType["Unknown"] = -1] = "Unknown"; - MessageType[MessageType["Sync"] = 0] = "Sync"; - MessageType[MessageType["Awareness"] = 1] = "Awareness"; - MessageType[MessageType["Auth"] = 2] = "Auth"; - MessageType[MessageType["QueryAwareness"] = 3] = "QueryAwareness"; - MessageType[MessageType["SyncReply"] = 4] = "SyncReply"; - MessageType[MessageType["Stateless"] = 5] = "Stateless"; - MessageType[MessageType["BroadcastStateless"] = 6] = "BroadcastStateless"; - MessageType[MessageType["CLOSE"] = 7] = "CLOSE"; - MessageType[MessageType["SyncStatus"] = 8] = "SyncStatus"; -})(MessageType || (MessageType = {})); - -class OutgoingMessage { - constructor(documentName) { - this.encoder = createEncoder(); - writeVarString(this.encoder, documentName); - } - createSyncMessage() { - this.type = MessageType.Sync; - writeVarUint(this.encoder, MessageType.Sync); - return this; - } - createSyncReplyMessage() { - this.type = MessageType.SyncReply; - writeVarUint(this.encoder, MessageType.SyncReply); - return this; - } - createAwarenessUpdateMessage(awareness, changedClients) { - this.type = MessageType.Awareness; - this.category = "Update"; - const message = encodeAwarenessUpdate(awareness, changedClients || Array.from(awareness.getStates().keys())); - writeVarUint(this.encoder, MessageType.Awareness); - writeVarUint8Array(this.encoder, message); - return this; - } - writeQueryAwareness() { - this.type = MessageType.QueryAwareness; - this.category = "Update"; - writeVarUint(this.encoder, MessageType.QueryAwareness); - return this; - } - writeTokenSyncRequest() { - this.type = MessageType.Auth; - this.category = "TokenSync"; - writeVarUint(this.encoder, MessageType.Auth); - writeTokenSyncRequest(this.encoder); - return this; - } - writeAuthenticated(readonly) { - this.type = MessageType.Auth; - this.category = "Authenticated"; - writeVarUint(this.encoder, MessageType.Auth); - writeAuthenticated(this.encoder, readonly ? "readonly" : "read-write"); - return this; - } - writePermissionDenied(reason) { - this.type = MessageType.Auth; - this.category = "PermissionDenied"; - writeVarUint(this.encoder, MessageType.Auth); - writePermissionDenied(this.encoder, reason); - return this; - } - writeFirstSyncStepFor(document) { - this.category = "SyncStep1"; - writeSyncStep1(this.encoder, document); - return this; - } - writeUpdate(update) { - this.category = "Update"; - writeUpdate(this.encoder, update); - return this; - } - writeStateless(payload) { - this.category = "Stateless"; - writeVarUint(this.encoder, MessageType.Stateless); - writeVarString(this.encoder, payload); - return this; - } - writeBroadcastStateless(payload) { - this.category = "Stateless"; - writeVarUint(this.encoder, MessageType.BroadcastStateless); - writeVarString(this.encoder, payload); - return this; - } - // TODO: should this be write* or create* as method name? - writeSyncStatus(updateSaved) { - this.category = "SyncStatus"; - writeVarUint(this.encoder, MessageType.SyncStatus); - writeVarUint(this.encoder, updateSaved ? 1 : 0); - return this; - } - writeCloseMessage(reason) { - this.type = MessageType.CLOSE; - writeVarUint(this.encoder, MessageType.CLOSE); - writeVarString(this.encoder, reason); - return this; - } - toUint8Array() { - return toUint8Array(this.encoder); - } -} - -class MessageReceiver { - constructor(message, defaultTransactionOrigin) { - this.message = message; - this.defaultTransactionOrigin = defaultTransactionOrigin; - } - apply(document, connection, reply) { - const { message } = this; - const type = message.readVarUint(); - const emptyMessageLength = message.length; - switch (type) { - case MessageType.Sync: - case MessageType.SyncReply: { - message.writeVarUint(MessageType.Sync); - this.readSyncMessage(message, document, connection, reply, type !== MessageType.SyncReply); - if (message.length > emptyMessageLength + 1) { - if (reply) { - reply(message.toUint8Array()); - } - else if (connection) { - // TODO: We should log this, shouldn’t we? - // this.logger.log({ - // direction: 'out', - // type: MessageType.Awareness, - // category: 'Update', - // }) - connection.send(message.toUint8Array()); - } - } - break; - } - case MessageType.Awareness: { - applyAwarenessUpdate(document.awareness, message.readVarUint8Array(), connection === null || connection === void 0 ? void 0 : connection.webSocket); - break; - } - case MessageType.QueryAwareness: { - this.applyQueryAwarenessMessage(document, reply); - break; - } - case MessageType.Stateless: { - connection === null || connection === void 0 ? void 0 : connection.callbacks.statelessCallback({ - connection, - documentName: document.name, - document, - payload: readVarString(message.decoder), - }); - break; - } - case MessageType.BroadcastStateless: { - const msg = message.readVarString(); - document.getConnections().forEach((connection) => { - connection.sendStateless(msg); - }); - break; - } - case MessageType.CLOSE: { - connection === null || connection === void 0 ? void 0 : connection.close({ - code: 1000, - reason: "provider_initiated", - }); - break; - } - case MessageType.Auth: { - const authType = message.readVarUint(); - if (authType === AuthMessageType.Token) { - connection === null || connection === void 0 ? void 0 : connection.callbacks.onTokenSyncCallback({ - token: message.readVarString(), - }); - break; - } - console.error("Received an authentication message on a connection that is already fully authenticated. Probably your provider has been destroyed + recreated really fast."); - break; - } - default: - console.error(`Unable to handle message of type ${type}: no handler defined! Are your provider/server versions aligned?`); - // Do nothing - } - } - readSyncMessage(message, document, connection, reply, requestFirstSync = true) { - const type = message.readVarUint(); - if (connection) { - connection.callbacks.beforeSync(connection, { - type, - payload: message.peekVarUint8Array(), - }); - } - switch (type) { - case messageYjsSyncStep1: { - readSyncStep1(message.decoder, message.encoder, document); - // When the server receives SyncStep1, it should reply with SyncStep2 immediately followed by SyncStep1. - if (reply && requestFirstSync) { - const syncMessage = new OutgoingMessage(document.name) - .createSyncReplyMessage() - .writeFirstSyncStepFor(document); - reply(syncMessage.toUint8Array()); - } - else if (connection) { - const syncMessage = new OutgoingMessage(document.name) - .createSyncMessage() - .writeFirstSyncStepFor(document); - connection.send(syncMessage.toUint8Array()); - } - break; - } - case messageYjsSyncStep2: - if (connection === null || connection === void 0 ? void 0 : connection.readOnly) { - // We're in read-only mode, so we can't apply the update. - // Let's use snapshotContainsUpdate to see if the update actually contains changes. - // If not, we can still ack the update - const snapshot = Y.snapshot(document); - const update = readVarUint8Array(message.decoder); - if (Y.snapshotContainsUpdate(snapshot, update)) { - // no new changes in update - const ackMessage = new OutgoingMessage(document.name).writeSyncStatus(true); - connection.send(ackMessage.toUint8Array()); - } - else { - // new changes in update that we can't apply, because readOnly - const ackMessage = new OutgoingMessage(document.name).writeSyncStatus(false); - connection.send(ackMessage.toUint8Array()); - } - break; - } - readSyncStep2(message.decoder, document, connection !== null && connection !== void 0 ? connection : this.defaultTransactionOrigin); - if (connection) { - connection.send(new OutgoingMessage(document.name) - .writeSyncStatus(true) - .toUint8Array()); - } - break; - case messageYjsUpdate: - if (connection === null || connection === void 0 ? void 0 : connection.readOnly) { - connection.send(new OutgoingMessage(document.name) - .writeSyncStatus(false) - .toUint8Array()); - break; - } - readUpdate(message.decoder, document, connection); - if (connection) { - connection.send(new OutgoingMessage(document.name) - .writeSyncStatus(true) - .toUint8Array()); - } - break; - default: - throw new Error(`Received a message with an unknown type: ${type}`); - } - return type; - } - applyQueryAwarenessMessage(document, reply) { - const message = new OutgoingMessage(document.name).createAwarenessUpdateMessage(document.awareness); - if (reply) { - reply(message.toUint8Array()); - } - } -} - -class Connection { - /** - * Constructor. - */ - constructor(connection, request, document, socketId, context, readOnly = false) { - this.callbacks = { - onClose: [(document, event) => { }], - beforeHandleMessage: (connection, update) => Promise.resolve(), - beforeSync: (connection, payload) => Promise.resolve(), - statelessCallback: (payload) => Promise.resolve(), - onTokenSyncCallback: (payload) => Promise.resolve(), - }; - this.webSocket = connection; - this.context = context; - this.document = document; - this.request = request; - this.socketId = socketId; - this.readOnly = readOnly; - this.webSocket.binaryType = "nodebuffer"; - this.document.addConnection(this); - this.sendCurrentAwareness(); - } - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback) { - this.callbacks.onClose.push(callback); - return this; - } - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback(callback) { - this.callbacks.statelessCallback = callback; - return this; - } - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage(callback) { - this.callbacks.beforeHandleMessage = callback; - return this; - } - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync(callback) { - this.callbacks.beforeSync = callback; - return this; - } - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback(callback) { - this.callbacks.onTokenSyncCallback = callback; - return this; - } - /** - * Send the given message - */ - send(message) { - if (this.webSocket.readyState === WsReadyStates.Closing || - this.webSocket.readyState === WsReadyStates.Closed) { - this.close(); - return; - } - try { - this.webSocket.send(message, (error) => { - if (error != null) - this.close(); - }); - } - catch (exception) { - this.close(); - } - } - /** - * Send a stateless message with payload - */ - sendStateless(payload) { - const message = new OutgoingMessage(this.document.name).writeStateless(payload); - this.send(message.toUint8Array()); - } - /** - * Request current token from the client - */ - requestToken() { - const message = new OutgoingMessage(this.document.name).writeTokenSyncRequest(); - this.send(message.toUint8Array()); - } - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event) { - var _a; - if (this.document.hasConnection(this)) { - this.document.removeConnection(this); - this.callbacks.onClose.forEach((callback) => callback(this.document, event)); - const closeMessage = new OutgoingMessage(this.document.name); - closeMessage.writeCloseMessage((_a = event === null || event === void 0 ? void 0 : event.reason) !== null && _a !== void 0 ? _a : "Server closed the connection"); - this.send(closeMessage.toUint8Array()); - } - } - /** - * Send the current document awareness to the client, if any - * @private - */ - sendCurrentAwareness() { - if (!this.document.hasAwarenessStates()) { - return; - } - const awarenessMessage = new OutgoingMessage(this.document.name).createAwarenessUpdateMessage(this.document.awareness); - this.send(awarenessMessage.toUint8Array()); - } - /** - * Handle an incoming message - * @public - */ - handleMessage(data) { - const message = new IncomingMessage(data); - const documentName = message.readVarString(); - if (documentName !== this.document.name) - return; - message.writeVarString(documentName); - this.callbacks - .beforeHandleMessage(this, data) - .then(() => { - try { - new MessageReceiver(message).apply(this.document, this); - } - catch (e) { - console.error(`closing connection ${this.socketId} (while handling ${documentName}) because of exception`, e); - this.close({ - code: "code" in e ? e.code : ResetConnection.code, - reason: "reason" in e ? e.reason : ResetConnection.reason, - }); - } - }) - .catch((e) => { - console.error(`closing connection ${this.socketId} (while handling ${documentName}) because of exception`, e); - this.close({ - code: "code" in e ? e.code : ResetConnection.code, - reason: "reason" in e ? e.reason : ResetConnection.reason, - }); - }); - } -} - -class Document extends Doc { - /** - * Constructor. - */ - constructor(name, yDocOptions) { - super(yDocOptions); - this.callbacks = { - // eslint-disable-next-line @typescript-eslint/no-empty-function - onUpdate: (document, connection, update) => { }, - beforeBroadcastStateless: (document, stateless) => { }, - }; - this.connections = new Map(); - // The number of direct (non-websocket) connections to this document - this.directConnectionsCount = 0; - this.isDestroyed = false; - this.saveMutex = new Mutex(); - this.lastChangeTime = 0; - this.name = name; - this.awareness = new Awareness(this); - this.awareness.setLocalState(null); - this.awareness.on("update", this.handleAwarenessUpdate.bind(this)); - this.on("update", this.handleUpdate.bind(this)); - this.isLoading = true; - } - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName) { - // eslint-disable-next-line no-underscore-dangle - return !this.get(fieldName)._start && !this.get(fieldName)._map.size; - } - /** - * Merge the given document(s) into this one - */ - merge(documents) { - (Array.isArray(documents) ? documents : [documents]).forEach((document) => { - applyUpdate(this, encodeStateAsUpdate(document)); - }); - return this; - } - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate(callback) { - this.callbacks.onUpdate = callback; - return this; - } - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless(callback) { - this.callbacks.beforeBroadcastStateless = callback; - return this; - } - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection) { - this.connections.set(connection.webSocket, { - clients: new Set(), - connection, - }); - return this; - } - /** - * Is the given connection registered on this document - */ - hasConnection(connection) { - return this.connections.has(connection.webSocket); - } - /** - * Remove the given connection from this document - */ - removeConnection(connection) { - removeAwarenessStates(this.awareness, Array.from(this.getClients(connection.webSocket)), null); - this.connections.delete(connection.webSocket); - return this; - } - addDirectConnection() { - this.directConnectionsCount += 1; - return this; - } - removeDirectConnection() { - if (this.directConnectionsCount > 0) { - this.directConnectionsCount -= 1; - } - return this; - } - /** - * Get the number of active connections for this document - */ - getConnectionsCount() { - return this.connections.size + this.directConnectionsCount; - } - /** - * Get an array of registered connections - */ - getConnections() { - return Array.from(this.connections.values()).map((data) => data.connection); - } - /** - * Get the client ids for the given connection instance - */ - getClients(connectionInstance) { - const connection = this.connections.get(connectionInstance); - return (connection === null || connection === void 0 ? void 0 : connection.clients) === undefined ? new Set() : connection.clients; - } - /** - * Has the document awareness states - */ - hasAwarenessStates() { - return this.awareness.getStates().size > 0; - } - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection, update) { - applyAwarenessUpdate(this.awareness, update, connection.webSocket); - return this; - } - /** - * Handle an awareness update and sync changes to clients - * @private - */ - handleAwarenessUpdate({ added, updated, removed }, connectionInstance) { - const changedClients = added.concat(updated, removed); - if (connectionInstance !== null) { - const connection = this.connections.get(connectionInstance); - if (connection) { - added.forEach((clientId) => connection.clients.add(clientId)); - removed.forEach((clientId) => connection.clients.delete(clientId)); - } - } - this.getConnections().forEach((connection) => { - const awarenessMessage = new OutgoingMessage(this.name).createAwarenessUpdateMessage(this.awareness, changedClients); - connection.send(awarenessMessage.toUint8Array()); - }); - return this; - } - /** - * Handle an updated document and sync changes to clients - */ - handleUpdate(update, connection) { - this.callbacks.onUpdate(this, connection, update); - const message = new OutgoingMessage(this.name) - .createSyncMessage() - .writeUpdate(update); - this.getConnections().forEach((connection) => { - connection.send(message.toUint8Array()); - }); - return this; - } - /** - * Broadcast stateless message to all connections - */ - broadcastStateless(payload, filter) { - this.callbacks.beforeBroadcastStateless(this, payload); - const connections = filter - ? this.getConnections().filter(filter) - : this.getConnections(); - connections.forEach((connection) => { - connection.sendStateless(payload); - }); - } - destroy() { - super.destroy(); - this.isDestroyed = true; - } -} - -var version = "3.4.4"; -var meta = { - version: version}; - -/** - * Get parameters by the given request - */ -function getParameters(request) { - var _a; - const query = ((_a = request === null || request === void 0 ? void 0 : request.url) === null || _a === void 0 ? void 0 : _a.split("?")) || []; - return new URLSearchParams(query[1] ? query[1] : ""); -} - -/** - * The `ClientConnection` class is responsible for handling an incoming WebSocket - * - * TODO-refactor: - * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts - */ -class ClientConnection { - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it’ll fully establish the connection and - * load the Document then. - */ - constructor(websocket, request, documentProvider, - // TODO: change to events - hooks, opts, defaultContext = {}) { - this.websocket = websocket; - this.request = request; - this.documentProvider = documentProvider; - this.hooks = hooks; - this.opts = opts; - this.defaultContext = defaultContext; - // this map indicates whether a `Connection` instance has already taken over for incoming message for the key (i.e. documentName) - this.documentConnections = {}; - // While the connection will be establishing messages will - // be queued and handled later. - this.incomingMessageQueue = {}; - // While the connection is establishing, kee - this.documentConnectionsEstablished = new Set(); - // hooks payload by Document - this.hookPayloads = {}; - this.callbacks = { - onClose: [(document, payload) => { }], - }; - // Every new connection gets a unique identifier. - this.socketId = crypto.randomUUID(); - this.pongReceived = true; - this.handleWebsocketClose = (code, reason) => { - this.close({ code, reason: reason.toString() }); - this.websocket.removeListener("message", this.messageHandler); - this.websocket.removeListener("pong", this.handlePong); - clearInterval(this.pingInterval); - }; - this.handlePong = () => { - this.pongReceived = true; - }; - /** - * Check if pong was received and close the connection otherwise - * @private - */ - this.check = () => { - if (!this.pongReceived) { - return this.close(ConnectionTimeout); - } - this.pongReceived = false; - try { - this.websocket.ping(); - } - catch (error) { - this.close(ConnectionTimeout); - } - }; - // Once all hooks are run, we’ll fully establish the connection: - this.setUpNewConnection = async (documentName) => { - const hookPayload = this.hookPayloads[documentName]; - // If no hook interrupts, create a document and connection - const document = await this.documentProvider.createDocument(documentName, hookPayload.request, hookPayload.socketId, hookPayload.connectionConfig, hookPayload.context); - const connection = this.createConnection(this.websocket, document); - connection.onClose((document, event) => { - delete this.hookPayloads[documentName]; - delete this.documentConnections[documentName]; - delete this.incomingMessageQueue[documentName]; - this.documentConnectionsEstablished.delete(documentName); - }); - connection.onTokenSyncCallback(async (payload) => { - try { - return await this.hooks("onTokenSync", { - ...hookPayload, - ...payload, - connection, - document, - documentName, - }, (contextAdditions) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }); - } - catch (err) { - console.error(err); - const error = { ...Unauthorized, ...err }; - connection.close({ code: error.code, reason: error.reason }); - } - }); - this.documentConnections[documentName] = connection; - // If the WebSocket has already disconnected (wow, that was fast) – then - // immediately call close to cleanup the connection and document in memory. - if (this.websocket.readyState === WsReadyStates.Closing || - this.websocket.readyState === WsReadyStates.Closed) { - this.close(); - return; - } - // There’s no need to queue messages anymore. - // Let’s work through queued messages. - this.incomingMessageQueue[documentName].forEach((input) => { - this.websocket.emit("message", input); - }); - await this.hooks("connected", { - ...hookPayload, - documentName, - context: hookPayload.context, - connection, - }); - }; - // This listener handles authentication messages and queues everything else. - this.handleQueueingMessage = async (data) => { - var _a; - try { - const tmpMsg = new IncomingMessage(data); - const documentName = readVarString(tmpMsg.decoder); - const type = readVarUint(tmpMsg.decoder); - if (!(type === MessageType.Auth && - !this.documentConnectionsEstablished.has(documentName))) { - this.incomingMessageQueue[documentName].push(data); - return; - } - // Okay, we’ve got the authentication message we’re waiting for: - this.documentConnectionsEstablished.add(documentName); - // The 2nd integer contains the submessage type - // which will always be authentication when sent from client -> server - readVarUint(tmpMsg.decoder); - const token = readVarString(tmpMsg.decoder); - try { - const hookPayload = this.hookPayloads[documentName]; - await this.hooks("onConnect", { ...hookPayload, documentName }, (contextAdditions) => { - // merge context from all hooks - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }); - await this.hooks("onAuthenticate", { - token, - ...hookPayload, - documentName, - }, (contextAdditions) => { - // Hooks are allowed to give us even more context and we’ll merge everything together. - // We’ll pass the context to other hooks then. - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }); - // All `onAuthenticate` hooks passed. - hookPayload.connectionConfig.isAuthenticated = true; - // Let the client know that authentication was successful. - const message = new OutgoingMessage(documentName).writeAuthenticated(hookPayload.connectionConfig.readOnly); - this.websocket.send(message.toUint8Array()); - // Time to actually establish the connection. - await this.setUpNewConnection(documentName); - } - catch (err) { - const error = err || Forbidden; - const message = new OutgoingMessage(documentName).writePermissionDenied((_a = error.reason) !== null && _a !== void 0 ? _a : "permission-denied"); - this.websocket.send(message.toUint8Array()); - } - // Catch errors due to failed decoding of data - } - catch (error) { - console.error(error); - this.websocket.close(ResetConnection.code, ResetConnection.reason); - } - }; - this.messageHandler = (data) => { - try { - const tmpMsg = new IncomingMessage(data); - const documentName = readVarString(tmpMsg.decoder); - const connection = this.documentConnections[documentName]; - if (connection) { - // forward the message to the connection - connection.handleMessage(data); - // we already have a `Connection` set up for this document - return; - } - const isFirst = this.incomingMessageQueue[documentName] === undefined; - if (isFirst) { - this.incomingMessageQueue[documentName] = []; - if (this.hookPayloads[documentName]) { - throw new Error("first message, but hookPayloads exists"); - } - const hookPayload = { - instance: this.documentProvider, - request: this.request, - connectionConfig: { - readOnly: false, - isAuthenticated: false, - }, - requestHeaders: this.request.headers, - requestParameters: getParameters(this.request), - socketId: this.socketId, - context: { - ...this.defaultContext, - }, - }; - this.hookPayloads[documentName] = hookPayload; - } - this.handleQueueingMessage(data); - } - catch (closeError) { - // catch is needed in case an invalid payload crashes the parsing of the Uint8Array - console.error(closeError); - this.websocket.close(Unauthorized.code, Unauthorized.reason); - } - }; - this.timeout = opts.timeout; - this.pingInterval = setInterval(this.check, this.timeout); - websocket.on("pong", this.handlePong); - websocket.on("message", this.messageHandler); - websocket.once("close", this.handleWebsocketClose); - } - close(event) { - Object.values(this.documentConnections).forEach((connection) => connection.close(event)); - } - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback) { - this.callbacks.onClose.push(callback); - return this; - } - /** - * Create a new connection by the given request and document - */ - createConnection(connection, document) { - const hookPayload = this.hookPayloads[document.name]; - const instance = new Connection(connection, hookPayload.request, document, hookPayload.socketId, hookPayload.context, hookPayload.connectionConfig.readOnly); - instance.onClose(async (document, event) => { - const disconnectHookPayload = { - instance: this.documentProvider, // TODO, this will be removed when we use events instead of hooks for this class - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request), - }; - await this.hooks("onDisconnect", disconnectHookPayload); - this.callbacks.onClose.forEach((callback) => callback(document, disconnectHookPayload)); - }); - instance.onStatelessCallback(async (payload) => { - try { - return await this.hooks("onStateless", payload); - } - catch (error) { - if (error === null || error === void 0 ? void 0 : error.message) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if an error is present - // just rethrow it - throw error; - } - } - }); - instance.beforeHandleMessage((connection, update) => { - const beforeHandleMessagePayload = { - instance: this.documentProvider, // TODO, this will be removed when we use events instead of hooks for this class - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - connection, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request), - update, - }; - return this.hooks("beforeHandleMessage", beforeHandleMessagePayload); - }); - instance.beforeSync((connection, payload) => { - const beforeSyncPayload = { - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - documentName: document.name, - connection, - type: payload.type, - payload: payload.payload, - }; - return this.hooks("beforeSync", beforeSyncPayload); - }); - return instance; - } -} - -class DirectConnection { - /** - * Constructor. - */ - constructor(document, instance, context) { - this.document = null; - this.document = document; - this.instance = instance; - this.context = context; - this.document.addDirectConnection(); - } - async transact(transaction) { - if (!this.document) { - throw new Error("direct connection closed"); - } - transaction(this.document); - await this.instance.storeDocumentHooks(this.document, { - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - documentName: this.document.name, - instance: this.instance, - requestHeaders: {}, - requestParameters: new URLSearchParams(), - socketId: "server", - }, true); - } - async disconnect() { - var _a; - if (this.document) { - (_a = this.document) === null || _a === void 0 ? void 0 : _a.removeDirectConnection(); - await this.instance.storeDocumentHooks(this.document, { - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - documentName: this.document.name, - instance: this.instance, - requestHeaders: {}, - requestParameters: new URLSearchParams(), - socketId: "server", - }, true); - // If the direct connection was the only connection to the document - // then we should trigger the onDisconnect hook for - // this doc and unload the document - if (this.document.getConnectionsCount() === 0 && - !this.document.saveMutex.isLocked()) { - await this.instance.hooks("onDisconnect", { - instance: this.instance, - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - socketId: "server", - documentName: this.document.name, - requestHeaders: {}, - requestParameters: new URLSearchParams(), - }); - await this.instance.unloadDocument(this.document); - } - this.document = null; - } - } -} - -const useDebounce = () => { - const timers = new Map(); - const runningExecutions = new Map(); - const debounce = async (id, - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - func, debounce, maxDebounce) => { - const old = timers.get(id); - const start = (old === null || old === void 0 ? void 0 : old.start) || Date.now(); - const run = async () => { - if (runningExecutions.has(id)) { - // wait for previous execution to finish - await runningExecutions.get(id); - } - timers.delete(id); - const execution = func(); - runningExecutions.set(id, execution); - const executionResult = await execution; - runningExecutions.delete(id); - return executionResult; - }; - if (old === null || old === void 0 ? void 0 : old.timeout) { - clearTimeout(old.timeout); - } - if (debounce === 0) { - return run(); - } - if (Date.now() - start >= maxDebounce) { - return run(); - } - timers.set(id, { - start, - timeout: setTimeout(run, debounce), - func: run, - }); - }; - const executeNow = (id) => { - const old = timers.get(id); - if (old) { - clearTimeout(old.timeout); - return old.func(); - } - }; - const isDebounced = (id) => { - return timers.has(id); - }; - const isCurrentlyExecuting = (id) => { - return runningExecutions.has(id); - }; - return { debounce, isDebounced, isCurrentlyExecuting, executeNow }; -}; - -const defaultConfiguration = { - name: null, - timeout: 30000, - debounce: 2000, - maxDebounce: 10000, - quiet: false, - yDocOptions: { - gc: true, - gcFilter: () => true, - }, - unloadImmediately: true, -}; -class Hocuspocus { - constructor(configuration) { - this.configuration = { - ...defaultConfiguration, - extensions: [], - onConfigure: () => new Promise((r) => r(null)), - onListen: () => new Promise((r) => r(null)), - onUpgrade: () => new Promise((r) => r(null)), - onConnect: () => new Promise((r) => r(null)), - connected: () => new Promise((r) => r(null)), - beforeHandleMessage: () => new Promise((r) => r(null)), - beforeSync: () => new Promise((r) => r(null)), - beforeBroadcastStateless: () => new Promise((r) => r(null)), - onStateless: () => new Promise((r) => r(null)), - onChange: () => new Promise((r) => r(null)), - onCreateDocument: () => new Promise((r) => r(null)), - onLoadDocument: () => new Promise((r) => r(null)), - onStoreDocument: () => new Promise((r) => r(null)), - afterStoreDocument: () => new Promise((r) => r(null)), - onAwarenessUpdate: () => new Promise((r) => r(null)), - onRequest: () => new Promise((r) => r(null)), - onDisconnect: () => new Promise((r) => r(null)), - onDestroy: () => new Promise((r) => r(null)), - }; - this.loadingDocuments = new Map(); - this.unloadingDocuments = new Map(); - this.documents = new Map(); - this.debouncer = useDebounce(); - if (configuration) { - this.configure(configuration); - } - } - /** - * Configure Hocuspocus - */ - configure(configuration) { - this.configuration = { - ...this.configuration, - ...configuration, - }; - this.configuration.extensions.sort((a, b) => { - const one = typeof a.priority === "undefined" ? 100 : a.priority; - const two = typeof b.priority === "undefined" ? 100 : b.priority; - if (one > two) { - return -1; - } - if (one < two) { - return 1; - } - return 0; - }); - this.configuration.extensions.push({ - onConfigure: this.configuration.onConfigure, - onListen: this.configuration.onListen, - onUpgrade: this.configuration.onUpgrade, - onConnect: this.configuration.onConnect, - connected: this.configuration.connected, - onAuthenticate: this.configuration.onAuthenticate, - onTokenSync: this.configuration.onTokenSync, - onLoadDocument: this.configuration.onLoadDocument, - afterLoadDocument: this.configuration.afterLoadDocument, - beforeHandleMessage: this.configuration.beforeHandleMessage, - beforeBroadcastStateless: this.configuration.beforeBroadcastStateless, - beforeSync: this.configuration.beforeSync, - onStateless: this.configuration.onStateless, - onChange: this.configuration.onChange, - onStoreDocument: this.configuration.onStoreDocument, - afterStoreDocument: this.configuration.afterStoreDocument, - onAwarenessUpdate: this.configuration.onAwarenessUpdate, - onRequest: this.configuration.onRequest, - beforeUnloadDocument: this.configuration.beforeUnloadDocument, - afterUnloadDocument: this.configuration.afterUnloadDocument, - onDisconnect: this.configuration.onDisconnect, - onDestroy: this.configuration.onDestroy, - }); - this.hooks("onConfigure", { - configuration: this.configuration, - version: meta.version, - instance: this, - }); - return this; - } - /** - * Get the total number of active documents - */ - getDocumentsCount() { - return this.documents.size; - } - /** - * Get the total number of active connections - */ - getConnectionsCount() { - const uniqueSocketIds = new Set(); - const totalDirectConnections = Array.from(this.documents.values()).reduce((acc, document) => { - // Accumulate unique socket IDs - document.getConnections().forEach(({ socketId }) => { - uniqueSocketIds.add(socketId); - }); - // Accumulate direct connections - return acc + document.directConnectionsCount; - }, 0); - // Return the sum of unique socket IDs and direct connections - return uniqueSocketIds.size + totalDirectConnections; - } - /** - * Force close one or more connections - */ - closeConnections(documentName) { - // Iterate through all connections for all documents - // and invoke their close method, which is a graceful - // disconnect wrapper around the underlying websocket.close - this.documents.forEach((document) => { - // If a documentName was specified, bail if it doesn't match - if (documentName && document.name !== documentName) { - return; - } - document.connections.forEach(({ connection }) => { - connection.close(ResetConnection); - }); - }); - } - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it’ll fully establish the connection and - * load the Document then. - */ - handleConnection(incoming, request, defaultContext = {}) { - const clientConnection = new ClientConnection(incoming, request, this, this.hooks.bind(this), { - timeout: this.configuration.timeout, - }, defaultContext); - clientConnection.onClose((document, hookPayload) => { - // Check if there are still no connections to the document, as these hooks - // may take some time to resolve (e.g. database queries). If a - // new connection were to come in during that time it would rely on the - // document in the map that we remove now. - if (document.getConnectionsCount() > 0) { - return; - } - // If it’s the last connection, we need to make sure to store the - // document. Use the debouncer executeNow helper, to run scheduled - // onStoreDocument immediately and clear running timers. - // If there is no scheduled run for this document there is no point in - // triggering onStoreDocument hook, as everything seems to be stored already. - // Only run this if the document has finished loading earlier (i.e. not to persist the empty - // ydoc if the onLoadDocument hook returned an error) - if (!document.isLoading && - this.debouncer.isDebounced(`onStoreDocument-${document.name}`)) { - if (this.configuration.unloadImmediately) { - this.debouncer.executeNow(`onStoreDocument-${document.name}`); - } - } - else { - // Remove document from memory immediately - this.unloadDocument(document); - } - }); - } - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - handleDocumentUpdate(document, connection, update, request) { - var _a, _b; - const hookPayload = { - instance: this, - clientsCount: document.getConnectionsCount(), - context: (connection === null || connection === void 0 ? void 0 : connection.context) || {}, - document, - documentName: document.name, - requestHeaders: (_a = request === null || request === void 0 ? void 0 : request.headers) !== null && _a !== void 0 ? _a : {}, - requestParameters: getParameters(request), - socketId: (_b = connection === null || connection === void 0 ? void 0 : connection.socketId) !== null && _b !== void 0 ? _b : "", - update, - transactionOrigin: connection, - }; - this.hooks("onChange", hookPayload); - // If the update was received through other ways than the - // WebSocket connection, we don’t need to feel responsible for - // storing the content. - // also ignore changes incoming through redis connection, as this would be a breaking change (#730, #696, #606) - if (!connection || - connection === "__hocuspocus__redis__origin__") { - return; - } - this.storeDocumentHooks(document, hookPayload); - } - /** - * Create a new document by the given request - */ - async createDocument(documentName, request, socketId, connection, context) { - const existingLoadingDoc = this.loadingDocuments.get(documentName); - if (existingLoadingDoc) { - return existingLoadingDoc; - } - const existingDoc = this.documents.get(documentName); - if (existingDoc) { - return Promise.resolve(existingDoc); - } - const loadDocPromise = this.loadDocument(documentName, request, socketId, connection, context); - this.loadingDocuments.set(documentName, loadDocPromise); - try { - const doc = await loadDocPromise; - this.documents.set(documentName, doc); - this.loadingDocuments.delete(documentName); - return doc; - } - catch (e) { - this.loadingDocuments.delete(documentName); - throw e; - } - } - async loadDocument(documentName, request, socketId, connectionConfig, context) { - var _a; - const requestHeaders = (_a = request.headers) !== null && _a !== void 0 ? _a : {}; - const requestParameters = getParameters(request); - const yDocOptions = await this.hooks("onCreateDocument", { - documentName, - requestHeaders, - requestParameters, - connectionConfig, - context, - socketId, - instance: this, - }); - const document = new Document(documentName, { - ...this.configuration.yDocOptions, - ...yDocOptions, - }); - const hookPayload = { - instance: this, - context, - connectionConfig, - document, - documentName, - socketId, - requestHeaders, - requestParameters, - }; - try { - await this.hooks("onLoadDocument", hookPayload, (loadedDocument) => { - // if a hook returns a Y-Doc, encode the document state as update - // and apply it to the newly created document - // Note: instanceof doesn't work, because Doc !== Doc for some reason I don't understand - if ((loadedDocument === null || loadedDocument === void 0 ? void 0 : loadedDocument.constructor.name) === "Document" || - (loadedDocument === null || loadedDocument === void 0 ? void 0 : loadedDocument.constructor.name) === "Doc") { - applyUpdate(document, encodeStateAsUpdate(loadedDocument)); - } - }); - } - catch (e) { - this.closeConnections(documentName); - this.unloadDocument(document); - throw e; - } - document.isLoading = false; - document.onUpdate((document, connection, update) => { - document.lastChangeTime = Date.now(); - this.handleDocumentUpdate(document, connection, update, connection === null || connection === void 0 ? void 0 : connection.request); - }); - await this.hooks("afterLoadDocument", hookPayload); - document.beforeBroadcastStateless((document, stateless) => { - const hookPayload = { - document, - documentName: document.name, - payload: stateless, - }; - this.hooks("beforeBroadcastStateless", hookPayload); - }); - document.awareness.on("update", (update) => { - this.hooks("onAwarenessUpdate", { - ...hookPayload, - ...update, - awareness: document.awareness, - states: awarenessStatesToArray(document.awareness.getStates()), - }); - }); - return document; - } - storeDocumentHooks(document, hookPayload, immediately) { - const debounceId = `onStoreDocument-${document.name}`; - return this.debouncer.debounce(debounceId, async () => { - try { - await document.saveMutex.runExclusive(async () => { - await this.hooks("onStoreDocument", hookPayload); - await this.hooks("afterStoreDocument", hookPayload); - }); - } - catch (error) { - console.error("Caught error during storeDocumentHooks", error); - if (error === null || error === void 0 ? void 0 : error.message) { - throw error; - } - } - finally { - setTimeout(() => { - if (this.shouldUnloadDocument(document)) { - this.unloadDocument(document); - } - }, 0); - } - }, immediately ? 0 : this.configuration.debounce, this.configuration.maxDebounce); - } - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - hooks(name, payload, callback = null) { - const { extensions } = this.configuration; - // create a new `thenable` chain - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve - let chain = Promise.resolve(); - extensions - // get me all extensions which have the given hook - .filter((extension) => typeof extension[name] === "function") - // run through all the configured hooks - .forEach((extension) => { - chain = chain - .then(() => { var _a; return (_a = extension[name]) === null || _a === void 0 ? void 0 : _a.call(extension, payload); }) - .catch((error) => { - // make sure to log error messages - if (error === null || error === void 0 ? void 0 : error.message) { - console.error(`[${name}]`, error.message); - } - throw error; - }); - if (callback) { - chain = chain.then((...args) => callback(...args)); - } - }); - return chain; - } - shouldUnloadDocument(document) { - const hasPendingWork = this.debouncer.isDebounced(`onStoreDocument-${document.name}`) || - this.debouncer.isCurrentlyExecuting(`onStoreDocument-${document.name}`) || - document.saveMutex.isLocked(); - return hasPendingWork === false && document.getConnectionsCount() === 0; - } - async unloadDocument(document) { - const documentName = document.name; - if (!this.shouldUnloadDocument(document)) - return; - if (!this.documents.has(documentName)) - return; - if (this.unloadingDocuments.has(documentName)) - return this.unloadingDocuments.get(documentName); - // we need to make sure that the logic runs just once, even if multiple clients disconnect together - const actualUnloadingLogic = async () => { - try { - await this.hooks("beforeUnloadDocument", { - instance: this, - documentName, - document, - }); - } - catch (e) { - return; - } - // need sync check here as well, to avoid timing problems - if (!this.shouldUnloadDocument(document)) - return; - this.documents.delete(documentName); - document.destroy(); - await this.hooks("afterUnloadDocument", { instance: this, documentName }); - }; - const unloading = actualUnloadingLogic(); - this.unloadingDocuments.set(documentName, Promise.resolve(unloading)); - await unloading; - this.unloadingDocuments.delete(documentName); - } - async openDirectConnection(documentName, context) { - const connectionConfig = { - isAuthenticated: true, - readOnly: false, - }; - const document = await this.createDocument(documentName, {}, // direct connection has no request params - crypto.randomUUID(), connectionConfig, context); - return new DirectConnection(document, this, context); - } -} - -const defaultServerConfiguration = { - port: 80, - address: "0.0.0.0", - stopOnSignals: true, -}; -class Server { - constructor(configuration, websocketOptions = {}) { - this.configuration = { - ...defaultConfiguration, - ...defaultServerConfiguration, - extensions: [], - }; - this.setupWebsocketConnection = () => { - this.webSocketServer.on("connection", async (incoming, request) => { - incoming.setMaxListeners(Number.POSITIVE_INFINITY); - incoming.on("error", (error) => { - /** - * Handle a ws instance error, which is required to prevent - * the server from crashing when one happens - * See https://github.com/websockets/ws/issues/1777#issuecomment-660803472 - * @private - */ - console.error("Error emitted from webSocket instance:"); - console.error(error); - }); - this.hocuspocus.handleConnection(incoming, request); - }); - }; - this.setupHttpUpgrade = () => { - this.httpServer.on("upgrade", async (request, socket, head) => { - try { - await this.hocuspocus.hooks("onUpgrade", { - request, - socket, - head, - instance: this.hocuspocus, - }); - // let the default websocket server handle the connection if - // prior hooks don't interfere - this.webSocketServer.handleUpgrade(request, socket, head, (ws) => { - this.webSocketServer.emit("connection", ws, request); - }); - } - catch (error) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if a error is present - // just rethrow it - if (error) { - throw error; - } - } - }); - }; - this.requestHandler = async (request, response) => { - try { - await this.hocuspocus.hooks("onRequest", { - request, - response, - instance: this.hocuspocus, - }); - // default response if all prior hooks don't interfere - response.writeHead(200, { "Content-Type": "text/plain" }); - response.end("Welcome to Hocuspocus!"); - } - catch (error) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if a error is present - // just rethrow it - if (error) { - throw error; - } - } - }; - if (configuration) { - this.configuration = { - ...this.configuration, - ...configuration, - }; - } - this.hocuspocus = new Hocuspocus(this.configuration); - this.hocuspocus.server = this; - this.httpServer = createServer(this.requestHandler); - this.webSocketServer = new WebSocketServer({ - noServer: true, - ...websocketOptions, - }); - this.setupWebsocketConnection(); - this.setupHttpUpgrade(); - } - async listen(port, callback = null) { - if (port) { - this.configuration.port = port; - } - if (typeof callback === "function") { - this.hocuspocus.configuration.extensions.push({ - onListen: callback, - }); - } - if (this.configuration.stopOnSignals) { - const signalHandler = async () => { - await this.destroy(); - process.exit(0); - }; - process.on("SIGINT", signalHandler); - process.on("SIGQUIT", signalHandler); - process.on("SIGTERM", signalHandler); - } - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - return new Promise((resolve, reject) => { - this.httpServer.listen({ - port: this.configuration.port, - address: this.configuration.address, - }, async () => { - if (!this.configuration.quiet && - String(process.env.NODE_ENV) !== "testing") { - this.showStartScreen(); - } - const onListenPayload = { - instance: this.hocuspocus, - configuration: this.configuration, - port: this.address.port, - }; - try { - await this.hocuspocus.hooks("onListen", onListenPayload); - resolve(this.hocuspocus); - } - catch (e) { - reject(e); - } - }); - }); - } - get address() { - return (this.httpServer.address() || { - port: this.configuration.port, - address: this.configuration.address, - family: "IPv4", - }); - } - async destroy() { - await new Promise(async (resolve) => { - this.httpServer.close(); - try { - this.configuration.extensions.push({ - async afterUnloadDocument({ instance }) { - if (instance.getDocumentsCount() === 0) - resolve(""); - }, - }); - this.webSocketServer.close(); - if (this.hocuspocus.getDocumentsCount() === 0) - resolve(""); - this.hocuspocus.closeConnections(); - } - catch (error) { - console.error(error); - } - }); - await this.hocuspocus.hooks("onDestroy", { instance: this.hocuspocus }); - } - get URL() { - return `${this.configuration.address}:${this.address.port}`; - } - get webSocketURL() { - return `ws://${this.URL}`; - } - get httpURL() { - return `http://${this.URL}`; - } - showStartScreen() { - var _a; - const name = this.configuration.name ? ` (${this.configuration.name})` : ""; - console.log(); - console.log(` ${kleur.cyan(`Hocuspocus v${meta.version}${name}`)}${kleur.green(" running at:")}`); - console.log(); - console.log(` > HTTP: ${kleur.cyan(`${this.httpURL}`)}`); - console.log(` > WebSocket: ${this.webSocketURL}`); - const extensions = (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.extensions.map((extension) => { - var _a, _b; - return (_a = extension.extensionName) !== null && _a !== void 0 ? _a : (_b = extension.constructor) === null || _b === void 0 ? void 0 : _b.name; - }).filter((name) => name).filter((name) => name !== "Object"); - if (!extensions.length) { - return; - } - console.log(); - console.log(" Extensions:"); - extensions.forEach((name) => { - console.log(` - ${name}`); - }); - console.log(); - console.log(` ${kleur.green("Ready.")}`); - console.log(); - } -} - -export { Connection, Document, Hocuspocus, IncomingMessage, MessageReceiver, MessageType, OutgoingMessage, Server, defaultConfiguration, defaultServerConfiguration, useDebounce }; -//# sourceMappingURL=hocuspocus-server.esm.js.map diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js.map deleted file mode 100644 index da117e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-server.esm.js","sources":["../../../node_modules/lib0/binary.js","../../../node_modules/lib0/math.js","../../../node_modules/lib0/number.js","../../../node_modules/lib0/set.js","../../../node_modules/lib0/array.js","../../../node_modules/lib0/string.js","../../../node_modules/lib0/error.js","../../../node_modules/lib0/encoding.js","../../../node_modules/lib0/decoding.js","../src/IncomingMessage.ts","../../../node_modules/lib0/time.js","../../../node_modules/lib0/map.js","../../../node_modules/lib0/observable.js","../../../node_modules/lib0/object.js","../../../node_modules/lib0/function.js","../../../node_modules/y-protocols/awareness.js","../../../node_modules/y-protocols/sync.js","../src/types.ts","../src/OutgoingMessage.ts","../src/MessageReceiver.ts","../src/Connection.ts","../src/Document.ts","../src/util/getParameters.ts","../src/ClientConnection.ts","../src/DirectConnection.ts","../src/util/debounce.ts","../src/Hocuspocus.ts","../src/Server.ts"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * Binary data constants.\n *\n * @module binary\n */\n\n/**\n * n-th bit activated.\n *\n * @type {number}\n */\nexport const BIT1 = 1\nexport const BIT2 = 2\nexport const BIT3 = 4\nexport const BIT4 = 8\nexport const BIT5 = 16\nexport const BIT6 = 32\nexport const BIT7 = 64\nexport const BIT8 = 128\nexport const BIT9 = 256\nexport const BIT10 = 512\nexport const BIT11 = 1024\nexport const BIT12 = 2048\nexport const BIT13 = 4096\nexport const BIT14 = 8192\nexport const BIT15 = 16384\nexport const BIT16 = 32768\nexport const BIT17 = 65536\nexport const BIT18 = 1 << 17\nexport const BIT19 = 1 << 18\nexport const BIT20 = 1 << 19\nexport const BIT21 = 1 << 20\nexport const BIT22 = 1 << 21\nexport const BIT23 = 1 << 22\nexport const BIT24 = 1 << 23\nexport const BIT25 = 1 << 24\nexport const BIT26 = 1 << 25\nexport const BIT27 = 1 << 26\nexport const BIT28 = 1 << 27\nexport const BIT29 = 1 << 28\nexport const BIT30 = 1 << 29\nexport const BIT31 = 1 << 30\nexport const BIT32 = 1 << 31\n\n/**\n * First n bits activated.\n *\n * @type {number}\n */\nexport const BITS0 = 0\nexport const BITS1 = 1\nexport const BITS2 = 3\nexport const BITS3 = 7\nexport const BITS4 = 15\nexport const BITS5 = 31\nexport const BITS6 = 63\nexport const BITS7 = 127\nexport const BITS8 = 255\nexport const BITS9 = 511\nexport const BITS10 = 1023\nexport const BITS11 = 2047\nexport const BITS12 = 4095\nexport const BITS13 = 8191\nexport const BITS14 = 16383\nexport const BITS15 = 32767\nexport const BITS16 = 65535\nexport const BITS17 = BIT18 - 1\nexport const BITS18 = BIT19 - 1\nexport const BITS19 = BIT20 - 1\nexport const BITS20 = BIT21 - 1\nexport const BITS21 = BIT22 - 1\nexport const BITS22 = BIT23 - 1\nexport const BITS23 = BIT24 - 1\nexport const BITS24 = BIT25 - 1\nexport const BITS25 = BIT26 - 1\nexport const BITS26 = BIT27 - 1\nexport const BITS27 = BIT28 - 1\nexport const BITS28 = BIT29 - 1\nexport const BITS29 = BIT30 - 1\nexport const BITS30 = BIT31 - 1\n/**\n * @type {number}\n */\nexport const BITS31 = 0x7FFFFFFF\n/**\n * @type {number}\n */\nexport const BITS32 = 0xFFFFFFFF\n","/**\n * Common Math expressions.\n *\n * @module math\n */\n\nexport const floor = Math.floor\nexport const ceil = Math.ceil\nexport const abs = Math.abs\nexport const imul = Math.imul\nexport const round = Math.round\nexport const log10 = Math.log10\nexport const log2 = Math.log2\nexport const log = Math.log\nexport const sqrt = Math.sqrt\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The sum of a and b\n */\nexport const add = (a, b) => a + b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The smaller element of a and b\n */\nexport const min = (a, b) => a < b ? a : b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The bigger element of a and b\n */\nexport const max = (a, b) => a > b ? a : b\n\nexport const isNaN = Number.isNaN\n\nexport const pow = Math.pow\n/**\n * Base 10 exponential function. Returns the value of 10 raised to the power of pow.\n *\n * @param {number} exp\n * @return {number}\n */\nexport const exp10 = exp => Math.pow(10, exp)\n\nexport const sign = Math.sign\n\n/**\n * @param {number} n\n * @return {boolean} Wether n is negative. This function also differentiates between -0 and +0\n */\nexport const isNegativeZero = n => n !== 0 ? n < 0 : 1 / n < 0\n","/**\n * Utility helpers for working with numbers.\n *\n * @module number\n */\n\nimport * as math from './math.js'\nimport * as binary from './binary.js'\n\nexport const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER\nexport const MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER\n\nexport const LOWEST_INT32 = 1 << 31\nexport const HIGHEST_INT32 = binary.BITS31\nexport const HIGHEST_UINT32 = binary.BITS32\n\n/* c8 ignore next */\nexport const isInteger = Number.isInteger || (num => typeof num === 'number' && isFinite(num) && math.floor(num) === num)\nexport const isNaN = Number.isNaN\nexport const parseInt = Number.parseInt\n\n/**\n * Count the number of \"1\" bits in an unsigned 32bit number.\n *\n * Super fun bitcount algorithm by Brian Kernighan.\n *\n * @param {number} n\n */\nexport const countBits = n => {\n n &= binary.BITS32\n let count = 0\n while (n) {\n n &= (n - 1)\n count++\n }\n return count\n}\n","/**\n * Utility module to work with sets.\n *\n * @module set\n */\n\nexport const create = () => new Set()\n\n/**\n * @template T\n * @param {Set} set\n * @return {Array}\n */\nexport const toArray = set => Array.from(set)\n\n/**\n * @template T\n * @param {Set} set\n * @return {T}\n */\nexport const first = set =>\n set.values().next().value ?? undefined\n\n/**\n * @template T\n * @param {Iterable} entries\n * @return {Set}\n */\nexport const from = entries => new Set(entries)\n","/**\n * Utility module to work with Arrays.\n *\n * @module array\n */\n\nimport * as set from './set.js'\n\n/**\n * Return the last element of an array. The element must exist\n *\n * @template L\n * @param {ArrayLike} arr\n * @return {L}\n */\nexport const last = arr => arr[arr.length - 1]\n\n/**\n * @template C\n * @return {Array}\n */\nexport const create = () => /** @type {Array} */ ([])\n\n/**\n * @template D\n * @param {Array} a\n * @return {Array}\n */\nexport const copy = a => /** @type {Array} */ (a.slice())\n\n/**\n * Append elements from src to dest\n *\n * @template M\n * @param {Array} dest\n * @param {Array} src\n */\nexport const appendTo = (dest, src) => {\n for (let i = 0; i < src.length; i++) {\n dest.push(src[i])\n }\n}\n\n/**\n * Transforms something array-like to an actual Array.\n *\n * @function\n * @template T\n * @param {ArrayLike|Iterable} arraylike\n * @return {T}\n */\nexport const from = Array.from\n\n/**\n * True iff condition holds on every element in the Array.\n *\n * @function\n * @template ITEM\n * @template {ArrayLike} ARR\n *\n * @param {ARR} arr\n * @param {function(ITEM, number, ARR):boolean} f\n * @return {boolean}\n */\nexport const every = (arr, f) => {\n for (let i = 0; i < arr.length; i++) {\n if (!f(arr[i], i, arr)) {\n return false\n }\n }\n return true\n}\n\n/**\n * True iff condition holds on some element in the Array.\n *\n * @function\n * @template S\n * @template {ArrayLike} ARR\n * @param {ARR} arr\n * @param {function(S, number, ARR):boolean} f\n * @return {boolean}\n */\nexport const some = (arr, f) => {\n for (let i = 0; i < arr.length; i++) {\n if (f(arr[i], i, arr)) {\n return true\n }\n }\n return false\n}\n\n/**\n * @template ELEM\n *\n * @param {ArrayLike} a\n * @param {ArrayLike} b\n * @return {boolean}\n */\nexport const equalFlat = (a, b) => a.length === b.length && every(a, (item, index) => item === b[index])\n\n/**\n * @template ELEM\n * @param {Array>} arr\n * @return {Array}\n */\nexport const flatten = arr => fold(arr, /** @type {Array} */ ([]), (acc, val) => acc.concat(val))\n\n/**\n * @template T\n * @param {number} len\n * @param {function(number, Array):T} f\n * @return {Array}\n */\nexport const unfold = (len, f) => {\n const array = new Array(len)\n for (let i = 0; i < len; i++) {\n array[i] = f(i, array)\n }\n return array\n}\n\n/**\n * @template T\n * @template RESULT\n * @param {Array} arr\n * @param {RESULT} seed\n * @param {function(RESULT, T, number):RESULT} folder\n */\nexport const fold = (arr, seed, folder) => arr.reduce(folder, seed)\n\nexport const isArray = Array.isArray\n\n/**\n * @template T\n * @param {Array} arr\n * @return {Array}\n */\nexport const unique = arr => from(set.from(arr))\n\n/**\n * @template T\n * @template M\n * @param {ArrayLike} arr\n * @param {function(T):M} mapper\n * @return {Array}\n */\nexport const uniqueBy = (arr, mapper) => {\n /**\n * @type {Set}\n */\n const happened = set.create()\n /**\n * @type {Array}\n */\n const result = []\n for (let i = 0; i < arr.length; i++) {\n const el = arr[i]\n const mapped = mapper(el)\n if (!happened.has(mapped)) {\n happened.add(mapped)\n result.push(el)\n }\n }\n return result\n}\n\n/**\n * @template {ArrayLike} ARR\n * @template {function(ARR extends ArrayLike ? T : never, number, ARR):any} MAPPER\n * @param {ARR} arr\n * @param {MAPPER} mapper\n * @return {Array}\n */\nexport const map = (arr, mapper) => {\n /**\n * @type {Array}\n */\n const res = Array(arr.length)\n for (let i = 0; i < arr.length; i++) {\n res[i] = mapper(/** @type {any} */ (arr[i]), i, /** @type {any} */ (arr))\n }\n return /** @type {any} */ (res)\n}\n\n/**\n * This function bubble-sorts a single item to the correct position. The sort happens in-place and\n * might be useful to ensure that a single item is at the correct position in an otherwise sorted\n * array.\n *\n * @example\n * const arr = [3, 2, 5]\n * arr.sort((a, b) => a - b)\n * arr // => [2, 3, 5]\n * arr.splice(1, 0, 7)\n * array.bubbleSortItem(arr, 1, (a, b) => a - b)\n * arr // => [2, 3, 5, 7]\n *\n * @template T\n * @param {Array} arr\n * @param {number} i\n * @param {(a:T,b:T) => number} compareFn\n */\nexport const bubblesortItem = (arr, i, compareFn) => {\n const n = arr[i]\n let j = i\n // try to sort to the right\n while (j + 1 < arr.length && compareFn(n, arr[j + 1]) > 0) {\n arr[j] = arr[j + 1]\n arr[++j] = n\n }\n if (i === j && j > 0) { // no change yet\n // sort to the left\n while (j > 0 && compareFn(arr[j - 1], n) > 0) {\n arr[j] = arr[j - 1]\n arr[--j] = n\n }\n }\n return j\n}\n","import * as array from './array.js'\n\n/**\n * Utility module to work with strings.\n *\n * @module string\n */\n\nexport const fromCharCode = String.fromCharCode\nexport const fromCodePoint = String.fromCodePoint\n\n/**\n * The largest utf16 character.\n * Corresponds to Uint8Array([255, 255]) or charcodeof(2x2^8)\n */\nexport const MAX_UTF16_CHARACTER = fromCharCode(65535)\n\n/**\n * @param {string} s\n * @return {string}\n */\nconst toLowerCase = s => s.toLowerCase()\n\nconst trimLeftRegex = /^\\s*/g\n\n/**\n * @param {string} s\n * @return {string}\n */\nexport const trimLeft = s => s.replace(trimLeftRegex, '')\n\nconst fromCamelCaseRegex = /([A-Z])/g\n\n/**\n * @param {string} s\n * @param {string} separator\n * @return {string}\n */\nexport const fromCamelCase = (s, separator) => trimLeft(s.replace(fromCamelCaseRegex, match => `${separator}${toLowerCase(match)}`))\n\n/**\n * Compute the utf8ByteLength\n * @param {string} str\n * @return {number}\n */\nexport const utf8ByteLength = str => unescape(encodeURIComponent(str)).length\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\nexport const _encodeUtf8Polyfill = str => {\n const encodedString = unescape(encodeURIComponent(str))\n const len = encodedString.length\n const buf = new Uint8Array(len)\n for (let i = 0; i < len; i++) {\n buf[i] = /** @type {number} */ (encodedString.codePointAt(i))\n }\n return buf\n}\n\n/* c8 ignore next */\nexport const utf8TextEncoder = /** @type {TextEncoder} */ (typeof TextEncoder !== 'undefined' ? new TextEncoder() : null)\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\nexport const _encodeUtf8Native = str => utf8TextEncoder.encode(str)\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\n/* c8 ignore next */\nexport const encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\nexport const _decodeUtf8Polyfill = buf => {\n let remainingLen = buf.length\n let encodedString = ''\n let bufPos = 0\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n const bytes = buf.subarray(bufPos, bufPos + nextLen)\n bufPos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes))\n remainingLen -= nextLen\n }\n return decodeURIComponent(escape(encodedString))\n}\n\n/* c8 ignore next */\nexport let utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8', { fatal: true, ignoreBOM: true })\n\n/* c8 ignore start */\nif (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) {\n // Safari doesn't handle BOM correctly.\n // This fixes a bug in Safari 13.0.5 where it produces a BOM the first time it is called.\n // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the first call and\n // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the second call\n // Another issue is that from then on no BOM chars are recognized anymore\n /* c8 ignore next */\n utf8TextDecoder = null\n}\n/* c8 ignore stop */\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\nexport const _decodeUtf8Native = buf => /** @type {TextDecoder} */ (utf8TextDecoder).decode(buf)\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\n/* c8 ignore next */\nexport const decodeUtf8 = utf8TextDecoder ? _decodeUtf8Native : _decodeUtf8Polyfill\n\n/**\n * @param {string} str The initial string\n * @param {number} index Starting position\n * @param {number} remove Number of characters to remove\n * @param {string} insert New content to insert\n */\nexport const splice = (str, index, remove, insert = '') => str.slice(0, index) + insert + str.slice(index + remove)\n\n/**\n * @param {string} source\n * @param {number} n\n */\nexport const repeat = (source, n) => array.unfold(n, () => source).join('')\n","/**\n * Error helpers.\n *\n * @module error\n */\n\n/**\n * @param {string} s\n * @return {Error}\n */\n/* c8 ignore next */\nexport const create = s => new Error(s)\n\n/**\n * @throws {Error}\n * @return {never}\n */\n/* c8 ignore next 3 */\nexport const methodUnimplemented = () => {\n throw create('Method unimplemented')\n}\n\n/**\n * @throws {Error}\n * @return {never}\n */\n/* c8 ignore next 3 */\nexport const unexpectedCase = () => {\n throw create('Unexpected case')\n}\n","/**\n * Efficient schema-less binary encoding with support for variable length encoding.\n *\n * Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n *\n * @module encoding\n */\n\nimport * as math from './math.js'\nimport * as number from './number.js'\nimport * as binary from './binary.js'\nimport * as string from './string.js'\nimport * as array from './array.js'\n\n/**\n * A BinaryEncoder handles the encoding to an Uint8Array.\n */\nexport class Encoder {\n constructor () {\n this.cpos = 0\n this.cbuf = new Uint8Array(100)\n /**\n * @type {Array}\n */\n this.bufs = []\n }\n}\n\n/**\n * @function\n * @return {Encoder}\n */\nexport const createEncoder = () => new Encoder()\n\n/**\n * @param {function(Encoder):void} f\n */\nexport const encode = (f) => {\n const encoder = createEncoder()\n f(encoder)\n return toUint8Array(encoder)\n}\n\n/**\n * The current length of the encoded data.\n *\n * @function\n * @param {Encoder} encoder\n * @return {number}\n */\nexport const length = encoder => {\n let len = encoder.cpos\n for (let i = 0; i < encoder.bufs.length; i++) {\n len += encoder.bufs[i].length\n }\n return len\n}\n\n/**\n * Check whether encoder is empty.\n *\n * @function\n * @param {Encoder} encoder\n * @return {boolean}\n */\nexport const hasContent = encoder => encoder.cpos > 0 || encoder.bufs.length > 0\n\n/**\n * Transform to Uint8Array.\n *\n * @function\n * @param {Encoder} encoder\n * @return {Uint8Array} The created ArrayBuffer.\n */\nexport const toUint8Array = encoder => {\n const uint8arr = new Uint8Array(length(encoder))\n let curPos = 0\n for (let i = 0; i < encoder.bufs.length; i++) {\n const d = encoder.bufs[i]\n uint8arr.set(d, curPos)\n curPos += d.length\n }\n uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos)\n return uint8arr\n}\n\n/**\n * Verify that it is possible to write `len` bytes wtihout checking. If\n * necessary, a new Buffer with the required length is attached.\n *\n * @param {Encoder} encoder\n * @param {number} len\n */\nexport const verifyLen = (encoder, len) => {\n const bufferLen = encoder.cbuf.length\n if (bufferLen - encoder.cpos < len) {\n encoder.bufs.push(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos))\n encoder.cbuf = new Uint8Array(math.max(bufferLen, len) * 2)\n encoder.cpos = 0\n }\n}\n\n/**\n * Write one byte to the encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The byte that is to be encoded.\n */\nexport const write = (encoder, num) => {\n const bufferLen = encoder.cbuf.length\n if (encoder.cpos === bufferLen) {\n encoder.bufs.push(encoder.cbuf)\n encoder.cbuf = new Uint8Array(bufferLen * 2)\n encoder.cpos = 0\n }\n encoder.cbuf[encoder.cpos++] = num\n}\n\n/**\n * Write one byte at a specific position.\n * Position must already be written (i.e. encoder.length > pos)\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos Position to which to write data\n * @param {number} num Unsigned 8-bit integer\n */\nexport const set = (encoder, pos, num) => {\n let buffer = null\n // iterate all buffers and adjust position\n for (let i = 0; i < encoder.bufs.length && buffer === null; i++) {\n const b = encoder.bufs[i]\n if (pos < b.length) {\n buffer = b // found buffer\n } else {\n pos -= b.length\n }\n }\n if (buffer === null) {\n // use current buffer\n buffer = encoder.cbuf\n }\n buffer[pos] = num\n}\n\n/**\n * Write one byte as an unsigned integer.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint8 = write\n\n/**\n * Write one byte as an unsigned Integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint8 = set\n\n/**\n * Write two bytes as an unsigned integer.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint16 = (encoder, num) => {\n write(encoder, num & binary.BITS8)\n write(encoder, (num >>> 8) & binary.BITS8)\n}\n/**\n * Write two bytes as an unsigned integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint16 = (encoder, pos, num) => {\n set(encoder, pos, num & binary.BITS8)\n set(encoder, pos + 1, (num >>> 8) & binary.BITS8)\n}\n\n/**\n * Write two bytes as an unsigned integer\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint32 = (encoder, num) => {\n for (let i = 0; i < 4; i++) {\n write(encoder, num & binary.BITS8)\n num >>>= 8\n }\n}\n\n/**\n * Write two bytes as an unsigned integer in big endian order.\n * (most significant byte first)\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint32BigEndian = (encoder, num) => {\n for (let i = 3; i >= 0; i--) {\n write(encoder, (num >>> (8 * i)) & binary.BITS8)\n }\n}\n\n/**\n * Write two bytes as an unsigned integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint32 = (encoder, pos, num) => {\n for (let i = 0; i < 4; i++) {\n set(encoder, pos + i, num & binary.BITS8)\n num >>>= 8\n }\n}\n\n/**\n * Write a variable length unsigned integer. Max encodable integer is 2^53.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeVarUint = (encoder, num) => {\n while (num > binary.BITS7) {\n write(encoder, binary.BIT8 | (binary.BITS7 & num))\n num = math.floor(num / 128) // shift >>> 7\n }\n write(encoder, binary.BITS7 & num)\n}\n\n/**\n * Write a variable length integer.\n *\n * We use the 7th bit instead for signaling that this is a negative number.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeVarInt = (encoder, num) => {\n const isNegative = math.isNegativeZero(num)\n if (isNegative) {\n num = -num\n }\n // |- whether to continue reading |- whether is negative |- number\n write(encoder, (num > binary.BITS6 ? binary.BIT8 : 0) | (isNegative ? binary.BIT7 : 0) | (binary.BITS6 & num))\n num = math.floor(num / 64) // shift >>> 6\n // We don't need to consider the case of num === 0 so we can use a different\n // pattern here than above.\n while (num > 0) {\n write(encoder, (num > binary.BITS7 ? binary.BIT8 : 0) | (binary.BITS7 & num))\n num = math.floor(num / 128) // shift >>> 7\n }\n}\n\n/**\n * A cache to store strings temporarily\n */\nconst _strBuffer = new Uint8Array(30000)\nconst _maxStrBSize = _strBuffer.length / 3\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const _writeVarStringNative = (encoder, str) => {\n if (str.length < _maxStrBSize) {\n // We can encode the string into the existing buffer\n /* c8 ignore next */\n const written = string.utf8TextEncoder.encodeInto(str, _strBuffer).written || 0\n writeVarUint(encoder, written)\n for (let i = 0; i < written; i++) {\n write(encoder, _strBuffer[i])\n }\n } else {\n writeVarUint8Array(encoder, string.encodeUtf8(str))\n }\n}\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const _writeVarStringPolyfill = (encoder, str) => {\n const encodedString = unescape(encodeURIComponent(str))\n const len = encodedString.length\n writeVarUint(encoder, len)\n for (let i = 0; i < len; i++) {\n write(encoder, /** @type {number} */ (encodedString.codePointAt(i)))\n }\n}\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\n/* c8 ignore next */\nexport const writeVarString = (string.utf8TextEncoder && /** @type {any} */ (string.utf8TextEncoder).encodeInto) ? _writeVarStringNative : _writeVarStringPolyfill\n\n/**\n * Write a string terminated by a special byte sequence. This is not very performant and is\n * generally discouraged. However, the resulting byte arrays are lexiographically ordered which\n * makes this a nice feature for databases.\n *\n * The string will be encoded using utf8 and then terminated and escaped using writeTerminatingUint8Array.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const writeTerminatedString = (encoder, str) =>\n writeTerminatedUint8Array(encoder, string.encodeUtf8(str))\n\n/**\n * Write a terminating Uint8Array. Note that this is not performant and is generally\n * discouraged. There are few situations when this is needed.\n *\n * We use 0x0 as a terminating character. 0x1 serves as an escape character for 0x0 and 0x1.\n *\n * Example: [0,1,2] is encoded to [1,0,1,1,2,0]. 0x0, and 0x1 needed to be escaped using 0x1. Then\n * the result is terminated using the 0x0 character.\n *\n * This is basically how many systems implement null terminated strings. However, we use an escape\n * character 0x1 to avoid issues and potenial attacks on our database (if this is used as a key\n * encoder for NoSql databases).\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} buf The string that is to be encoded.\n */\nexport const writeTerminatedUint8Array = (encoder, buf) => {\n for (let i = 0; i < buf.length; i++) {\n const b = buf[i]\n if (b === 0 || b === 1) {\n write(encoder, 1)\n }\n write(encoder, buf[i])\n }\n write(encoder, 0)\n}\n\n/**\n * Write the content of another Encoder.\n *\n * @TODO: can be improved!\n * - Note: Should consider that when appending a lot of small Encoders, we should rather clone than referencing the old structure.\n * Encoders start with a rather big initial buffer.\n *\n * @function\n * @param {Encoder} encoder The enUint8Arr\n * @param {Encoder} append The BinaryEncoder to be written.\n */\nexport const writeBinaryEncoder = (encoder, append) => writeUint8Array(encoder, toUint8Array(append))\n\n/**\n * Append fixed-length Uint8Array to the encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} uint8Array\n */\nexport const writeUint8Array = (encoder, uint8Array) => {\n const bufferLen = encoder.cbuf.length\n const cpos = encoder.cpos\n const leftCopyLen = math.min(bufferLen - cpos, uint8Array.length)\n const rightCopyLen = uint8Array.length - leftCopyLen\n encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos)\n encoder.cpos += leftCopyLen\n if (rightCopyLen > 0) {\n // Still something to write, write right half..\n // Append new buffer\n encoder.bufs.push(encoder.cbuf)\n // must have at least size of remaining buffer\n encoder.cbuf = new Uint8Array(math.max(bufferLen * 2, rightCopyLen))\n // copy array\n encoder.cbuf.set(uint8Array.subarray(leftCopyLen))\n encoder.cpos = rightCopyLen\n }\n}\n\n/**\n * Append an Uint8Array to Encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} uint8Array\n */\nexport const writeVarUint8Array = (encoder, uint8Array) => {\n writeVarUint(encoder, uint8Array.byteLength)\n writeUint8Array(encoder, uint8Array)\n}\n\n/**\n * Create an DataView of the next `len` bytes. Use it to write data after\n * calling this function.\n *\n * ```js\n * // write float32 using DataView\n * const dv = writeOnDataView(encoder, 4)\n * dv.setFloat32(0, 1.1)\n * // read float32 using DataView\n * const dv = readFromDataView(encoder, 4)\n * dv.getFloat32(0) // => 1.100000023841858 (leaving it to the reader to find out why this is the correct result)\n * ```\n *\n * @param {Encoder} encoder\n * @param {number} len\n * @return {DataView}\n */\nexport const writeOnDataView = (encoder, len) => {\n verifyLen(encoder, len)\n const dview = new DataView(encoder.cbuf.buffer, encoder.cpos, len)\n encoder.cpos += len\n return dview\n}\n\n/**\n * @param {Encoder} encoder\n * @param {number} num\n */\nexport const writeFloat32 = (encoder, num) => writeOnDataView(encoder, 4).setFloat32(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {number} num\n */\nexport const writeFloat64 = (encoder, num) => writeOnDataView(encoder, 8).setFloat64(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {bigint} num\n */\nexport const writeBigInt64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigInt64(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {bigint} num\n */\nexport const writeBigUint64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigUint64(0, num, false)\n\nconst floatTestBed = new DataView(new ArrayBuffer(4))\n/**\n * Check if a number can be encoded as a 32 bit float.\n *\n * @param {number} num\n * @return {boolean}\n */\nconst isFloat32 = num => {\n floatTestBed.setFloat32(0, num)\n return floatTestBed.getFloat32(0) === num\n}\n\n/**\n * Encode data with efficient binary format.\n *\n * Differences to JSON:\n * • Transforms data to a binary format (not to a string)\n * • Encodes undefined, NaN, and ArrayBuffer (these can't be represented in JSON)\n * • Numbers are efficiently encoded either as a variable length integer, as a\n * 32 bit float, as a 64 bit float, or as a 64 bit bigint.\n *\n * Encoding table:\n *\n * | Data Type | Prefix | Encoding Method | Comment |\n * | ------------------- | -------- | ------------------ | ------- |\n * | undefined | 127 | | Functions, symbol, and everything that cannot be identified is encoded as undefined |\n * | null | 126 | | |\n * | integer | 125 | writeVarInt | Only encodes 32 bit signed integers |\n * | float32 | 124 | writeFloat32 | |\n * | float64 | 123 | writeFloat64 | |\n * | bigint | 122 | writeBigInt64 | |\n * | boolean (false) | 121 | | True and false are different data types so we save the following byte |\n * | boolean (true) | 120 | | - 0b01111000 so the last bit determines whether true or false |\n * | string | 119 | writeVarString | |\n * | object | 118 | custom | Writes {length} then {length} key-value pairs |\n * | array | 117 | custom | Writes {length} then {length} json values |\n * | Uint8Array | 116 | writeVarUint8Array | We use Uint8Array for any kind of binary data |\n *\n * Reasons for the decreasing prefix:\n * We need the first bit for extendability (later we may want to encode the\n * prefix with writeVarUint). The remaining 7 bits are divided as follows:\n * [0-30] the beginning of the data range is used for custom purposes\n * (defined by the function that uses this library)\n * [31-127] the end of the data range is used for data encoding by\n * lib0/encoding.js\n *\n * @param {Encoder} encoder\n * @param {undefined|null|number|bigint|boolean|string|Object|Array|Uint8Array} data\n */\nexport const writeAny = (encoder, data) => {\n switch (typeof data) {\n case 'string':\n // TYPE 119: STRING\n write(encoder, 119)\n writeVarString(encoder, data)\n break\n case 'number':\n if (number.isInteger(data) && math.abs(data) <= binary.BITS31) {\n // TYPE 125: INTEGER\n write(encoder, 125)\n writeVarInt(encoder, data)\n } else if (isFloat32(data)) {\n // TYPE 124: FLOAT32\n write(encoder, 124)\n writeFloat32(encoder, data)\n } else {\n // TYPE 123: FLOAT64\n write(encoder, 123)\n writeFloat64(encoder, data)\n }\n break\n case 'bigint':\n // TYPE 122: BigInt\n write(encoder, 122)\n writeBigInt64(encoder, data)\n break\n case 'object':\n if (data === null) {\n // TYPE 126: null\n write(encoder, 126)\n } else if (array.isArray(data)) {\n // TYPE 117: Array\n write(encoder, 117)\n writeVarUint(encoder, data.length)\n for (let i = 0; i < data.length; i++) {\n writeAny(encoder, data[i])\n }\n } else if (data instanceof Uint8Array) {\n // TYPE 116: ArrayBuffer\n write(encoder, 116)\n writeVarUint8Array(encoder, data)\n } else {\n // TYPE 118: Object\n write(encoder, 118)\n const keys = Object.keys(data)\n writeVarUint(encoder, keys.length)\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n writeVarString(encoder, key)\n writeAny(encoder, data[key])\n }\n }\n break\n case 'boolean':\n // TYPE 120/121: boolean (true/false)\n write(encoder, data ? 120 : 121)\n break\n default:\n // TYPE 127: undefined\n write(encoder, 127)\n }\n}\n\n/**\n * Now come a few stateful encoder that have their own classes.\n */\n\n/**\n * Basic Run Length Encoder - a basic compression implementation.\n *\n * Encodes [1,1,1,7] to [1,3,7,1] (3 times 1, 1 time 7). This encoder might do more harm than good if there are a lot of values that are not repeated.\n *\n * It was originally used for image compression. Cool .. article http://csbruce.com/cbm/transactor/pdfs/trans_v7_i06.pdf\n *\n * @note T must not be null!\n *\n * @template T\n */\nexport class RleEncoder extends Encoder {\n /**\n * @param {function(Encoder, T):void} writer\n */\n constructor (writer) {\n super()\n /**\n * The writer\n */\n this.w = writer\n /**\n * Current state\n * @type {T|null}\n */\n this.s = null\n this.count = 0\n }\n\n /**\n * @param {T} v\n */\n write (v) {\n if (this.s === v) {\n this.count++\n } else {\n if (this.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw\n }\n this.count = 1\n // write first value\n this.w(this, v)\n this.s = v\n }\n }\n}\n\n/**\n * Basic diff decoder using variable length encoding.\n *\n * Encodes the values [3, 1100, 1101, 1050, 0] to [3, 1097, 1, -51, -1050] using writeVarInt.\n */\nexport class IntDiffEncoder extends Encoder {\n /**\n * @param {number} start\n */\n constructor (start) {\n super()\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n writeVarInt(this, v - this.s)\n this.s = v\n }\n}\n\n/**\n * A combination of IntDiffEncoder and RleEncoder.\n *\n * Basically first writes the IntDiffEncoder and then counts duplicate diffs using RleEncoding.\n *\n * Encodes the values [1,1,1,2,3,4,5,6] as [1,1,0,2,1,5] (RLE([1,0,0,1,1,1,1,1]) ⇒ RleIntDiff[1,1,0,2,1,5])\n */\nexport class RleIntDiffEncoder extends Encoder {\n /**\n * @param {number} start\n */\n constructor (start) {\n super()\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s === v && this.count > 0) {\n this.count++\n } else {\n if (this.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw\n }\n this.count = 1\n // write first value\n writeVarInt(this, v - this.s)\n this.s = v\n }\n }\n}\n\n/**\n * @param {UintOptRleEncoder} encoder\n */\nconst flushUintOptRleEncoder = encoder => {\n if (encoder.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n // case 1: just a single value. set sign to positive\n // case 2: write several values. set sign to negative to indicate that there is a length coming\n writeVarInt(encoder.encoder, encoder.count === 1 ? encoder.s : -encoder.s)\n if (encoder.count > 1) {\n writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw\n }\n }\n}\n\n/**\n * Optimized Rle encoder that does not suffer from the mentioned problem of the basic Rle encoder.\n *\n * Internally uses VarInt encoder to write unsigned integers. If the input occurs multiple times, we write\n * write it as a negative number. The UintOptRleDecoder then understands that it needs to read a count.\n *\n * Encodes [1,2,3,3,3] as [1,2,-3,3] (once 1, once 2, three times 3)\n */\nexport class UintOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s === v) {\n this.count++\n } else {\n flushUintOptRleEncoder(this)\n this.count = 1\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushUintOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * Increasing Uint Optimized RLE Encoder\n *\n * The RLE encoder counts the number of same occurences of the same value.\n * The IncUintOptRle encoder counts if the value increases.\n * I.e. 7, 8, 9, 10 will be encoded as [-7, 4]. 1, 3, 5 will be encoded\n * as [1, 3, 5].\n */\nexport class IncUintOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s + this.count === v) {\n this.count++\n } else {\n flushUintOptRleEncoder(this)\n this.count = 1\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushUintOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * @param {IntDiffOptRleEncoder} encoder\n */\nconst flushIntDiffOptRleEncoder = encoder => {\n if (encoder.count > 0) {\n // 31 bit making up the diff | wether to write the counter\n // const encodedDiff = encoder.diff << 1 | (encoder.count === 1 ? 0 : 1)\n const encodedDiff = encoder.diff * 2 + (encoder.count === 1 ? 0 : 1)\n // flush counter, unless this is the first value (count = 0)\n // case 1: just a single value. set first bit to positive\n // case 2: write several values. set first bit to negative to indicate that there is a length coming\n writeVarInt(encoder.encoder, encodedDiff)\n if (encoder.count > 1) {\n writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw\n }\n }\n}\n\n/**\n * A combination of the IntDiffEncoder and the UintOptRleEncoder.\n *\n * The count approach is similar to the UintDiffOptRleEncoder, but instead of using the negative bitflag, it encodes\n * in the LSB whether a count is to be read. Therefore this Encoder only supports 31 bit integers!\n *\n * Encodes [1, 2, 3, 2] as [3, 1, 6, -1] (more specifically [(1 << 1) | 1, (3 << 0) | 0, -1])\n *\n * Internally uses variable length encoding. Contrary to normal UintVar encoding, the first byte contains:\n * * 1 bit that denotes whether the next value is a count (LSB)\n * * 1 bit that denotes whether this value is negative (MSB - 1)\n * * 1 bit that denotes whether to continue reading the variable length integer (MSB)\n *\n * Therefore, only five bits remain to encode diff ranges.\n *\n * Use this Encoder only when appropriate. In most cases, this is probably a bad idea.\n */\nexport class IntDiffOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n this.diff = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.diff === v - this.s) {\n this.s = v\n this.count++\n } else {\n flushIntDiffOptRleEncoder(this)\n this.count = 1\n this.diff = v - this.s\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushIntDiffOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * Optimized String Encoder.\n *\n * Encoding many small strings in a simple Encoder is not very efficient. The function call to decode a string takes some time and creates references that must be eventually deleted.\n * In practice, when decoding several million small strings, the GC will kick in more and more often to collect orphaned string objects (or maybe there is another reason?).\n *\n * This string encoder solves the above problem. All strings are concatenated and written as a single string using a single encoding call.\n *\n * The lengths are encoded using a UintOptRleEncoder.\n */\nexport class StringEncoder {\n constructor () {\n /**\n * @type {Array}\n */\n this.sarr = []\n this.s = ''\n this.lensE = new UintOptRleEncoder()\n }\n\n /**\n * @param {string} string\n */\n write (string) {\n this.s += string\n if (this.s.length > 19) {\n this.sarr.push(this.s)\n this.s = ''\n }\n this.lensE.write(string.length)\n }\n\n toUint8Array () {\n const encoder = new Encoder()\n this.sarr.push(this.s)\n this.s = ''\n writeVarString(encoder, this.sarr.join(''))\n writeUint8Array(encoder, this.lensE.toUint8Array())\n return toUint8Array(encoder)\n }\n}\n","/**\n * Efficient schema-less binary decoding with support for variable length encoding.\n *\n * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n *\n * @module decoding\n */\n\nimport * as binary from './binary.js'\nimport * as math from './math.js'\nimport * as number from './number.js'\nimport * as string from './string.js'\nimport * as error from './error.js'\nimport * as encoding from './encoding.js'\n\nconst errorUnexpectedEndOfArray = error.create('Unexpected end of array')\nconst errorIntegerOutOfRange = error.create('Integer out of Range')\n\n/**\n * A Decoder handles the decoding of an Uint8Array.\n */\nexport class Decoder {\n /**\n * @param {Uint8Array} uint8Array Binary data to decode\n */\n constructor (uint8Array) {\n /**\n * Decoding target.\n *\n * @type {Uint8Array}\n */\n this.arr = uint8Array\n /**\n * Current decoding position.\n *\n * @type {number}\n */\n this.pos = 0\n }\n}\n\n/**\n * @function\n * @param {Uint8Array} uint8Array\n * @return {Decoder}\n */\nexport const createDecoder = uint8Array => new Decoder(uint8Array)\n\n/**\n * @function\n * @param {Decoder} decoder\n * @return {boolean}\n */\nexport const hasContent = decoder => decoder.pos !== decoder.arr.length\n\n/**\n * Clone a decoder instance.\n * Optionally set a new position parameter.\n *\n * @function\n * @param {Decoder} decoder The decoder instance\n * @param {number} [newPos] Defaults to current position\n * @return {Decoder} A clone of `decoder`\n */\nexport const clone = (decoder, newPos = decoder.pos) => {\n const _decoder = createDecoder(decoder.arr)\n _decoder.pos = newPos\n return _decoder\n}\n\n/**\n * Create an Uint8Array view of the next `len` bytes and advance the position by `len`.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n *\n * @function\n * @param {Decoder} decoder The decoder instance\n * @param {number} len The length of bytes to read\n * @return {Uint8Array}\n */\nexport const readUint8Array = (decoder, len) => {\n const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len)\n decoder.pos += len\n return view\n}\n\n/**\n * Read variable length Uint8Array.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n *\n * @function\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readVarUint8Array = decoder => readUint8Array(decoder, readVarUint(decoder))\n\n/**\n * Read the rest of the content as an ArrayBuffer\n * @function\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readTailAsUint8Array = decoder => readUint8Array(decoder, decoder.arr.length - decoder.pos)\n\n/**\n * Skip one byte, jump to the next position.\n * @function\n * @param {Decoder} decoder The decoder instance\n * @return {number} The next position\n */\nexport const skip8 = decoder => decoder.pos++\n\n/**\n * Read one byte as unsigned integer.\n * @function\n * @param {Decoder} decoder The decoder instance\n * @return {number} Unsigned 8-bit integer\n */\nexport const readUint8 = decoder => decoder.arr[decoder.pos++]\n\n/**\n * Read 2 bytes as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint16 = decoder => {\n const uint =\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8)\n decoder.pos += 2\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint32 = decoder => {\n const uint =\n (decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8) +\n (decoder.arr[decoder.pos + 2] << 16) +\n (decoder.arr[decoder.pos + 3] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer in big endian order.\n * (most significant byte first)\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint32BigEndian = decoder => {\n const uint =\n (decoder.arr[decoder.pos + 3] +\n (decoder.arr[decoder.pos + 2] << 8) +\n (decoder.arr[decoder.pos + 1] << 16) +\n (decoder.arr[decoder.pos] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint8 = decoder => decoder.arr[decoder.pos]\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint16 = decoder =>\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8)\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint32 = decoder => (\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8) +\n (decoder.arr[decoder.pos + 2] << 16) +\n (decoder.arr[decoder.pos + 3] << 24)\n) >>> 0\n\n/**\n * Read unsigned integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * * numbers < 2^7 is stored in one bytlength\n * * numbers < 2^14 is stored in two bylength\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.length\n */\nexport const readVarUint = decoder => {\n let num = 0\n let mult = 1\n const len = decoder.arr.length\n while (decoder.pos < len) {\n const r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & binary.BITS7) * mult // shift $r << (7*#iterations) and add it to num\n mult *= 128 // next iteration, shift 7 \"more\" to the left\n if (r < binary.BIT8) {\n return num\n }\n /* c8 ignore start */\n if (num > number.MAX_SAFE_INTEGER) {\n throw errorIntegerOutOfRange\n }\n /* c8 ignore stop */\n }\n throw errorUnexpectedEndOfArray\n}\n\n/**\n * Read signed integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * * numbers < 2^7 is stored in one bytlength\n * * numbers < 2^14 is stored in two bylength\n * @todo This should probably create the inverse ~num if number is negative - but this would be a breaking change.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.length\n */\nexport const readVarInt = decoder => {\n let r = decoder.arr[decoder.pos++]\n let num = r & binary.BITS6\n let mult = 64\n const sign = (r & binary.BIT7) > 0 ? -1 : 1\n if ((r & binary.BIT8) === 0) {\n // don't continue reading\n return sign * num\n }\n const len = decoder.arr.length\n while (decoder.pos < len) {\n r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & binary.BITS7) * mult\n mult *= 128\n if (r < binary.BIT8) {\n return sign * num\n }\n /* c8 ignore start */\n if (num > number.MAX_SAFE_INTEGER) {\n throw errorIntegerOutOfRange\n }\n /* c8 ignore stop */\n }\n throw errorUnexpectedEndOfArray\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {number}\n */\nexport const peekVarUint = decoder => {\n const pos = decoder.pos\n const s = readVarUint(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {number}\n */\nexport const peekVarInt = decoder => {\n const pos = decoder.pos\n const s = readVarInt(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * We don't test this function anymore as we use native decoding/encoding by default now.\n * Better not modify this anymore..\n *\n * Transforming utf8 to a string is pretty expensive. The code performs 10x better\n * when String.fromCodePoint is fed with all characters as arguments.\n * But most environments have a maximum number of arguments per functions.\n * For effiency reasons we apply a maximum of 10000 characters at once.\n *\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String.\n */\n/* c8 ignore start */\nexport const _readVarStringPolyfill = decoder => {\n let remainingLen = readVarUint(decoder)\n if (remainingLen === 0) {\n return ''\n } else {\n let encodedString = String.fromCodePoint(readUint8(decoder)) // remember to decrease remainingLen\n if (--remainingLen < 100) { // do not create a Uint8Array for small strings\n while (remainingLen--) {\n encodedString += String.fromCodePoint(readUint8(decoder))\n }\n } else {\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n // this is dangerous, we create a fresh array view from the existing buffer\n const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen)\n decoder.pos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes))\n remainingLen -= nextLen\n }\n }\n return decodeURIComponent(escape(encodedString))\n }\n}\n/* c8 ignore stop */\n\n/**\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String\n */\nexport const _readVarStringNative = decoder =>\n /** @type any */ (string.utf8TextDecoder).decode(readVarUint8Array(decoder))\n\n/**\n * Read string of variable length\n * * varUint is used to store the length of the string\n *\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String\n *\n */\n/* c8 ignore next */\nexport const readVarString = string.utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill\n\n/**\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readTerminatedUint8Array = decoder => {\n const encoder = encoding.createEncoder()\n let b\n while (true) {\n b = readUint8(decoder)\n if (b === 0) {\n return encoding.toUint8Array(encoder)\n }\n if (b === 1) {\n b = readUint8(decoder)\n }\n encoding.write(encoder, b)\n }\n}\n\n/**\n * @param {Decoder} decoder\n * @return {string}\n */\nexport const readTerminatedString = decoder => string.decodeUtf8(readTerminatedUint8Array(decoder))\n\n/**\n * Look ahead and read varString without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {string}\n */\nexport const peekVarString = decoder => {\n const pos = decoder.pos\n const s = readVarString(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * @param {Decoder} decoder\n * @param {number} len\n * @return {DataView}\n */\nexport const readFromDataView = (decoder, len) => {\n const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len)\n decoder.pos += len\n return dv\n}\n\n/**\n * @param {Decoder} decoder\n */\nexport const readFloat32 = decoder => readFromDataView(decoder, 4).getFloat32(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readFloat64 = decoder => readFromDataView(decoder, 8).getFloat64(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readBigInt64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigInt64(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readBigUint64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigUint64(0, false)\n\n/**\n * @type {Array}\n */\nconst readAnyLookupTable = [\n decoder => undefined, // CASE 127: undefined\n decoder => null, // CASE 126: null\n readVarInt, // CASE 125: integer\n readFloat32, // CASE 124: float32\n readFloat64, // CASE 123: float64\n readBigInt64, // CASE 122: bigint\n decoder => false, // CASE 121: boolean (false)\n decoder => true, // CASE 120: boolean (true)\n readVarString, // CASE 119: string\n decoder => { // CASE 118: object\n const len = readVarUint(decoder)\n /**\n * @type {Object}\n */\n const obj = {}\n for (let i = 0; i < len; i++) {\n const key = readVarString(decoder)\n obj[key] = readAny(decoder)\n }\n return obj\n },\n decoder => { // CASE 117: array\n const len = readVarUint(decoder)\n const arr = []\n for (let i = 0; i < len; i++) {\n arr.push(readAny(decoder))\n }\n return arr\n },\n readVarUint8Array // CASE 116: Uint8Array\n]\n\n/**\n * @param {Decoder} decoder\n */\nexport const readAny = decoder => readAnyLookupTable[127 - readUint8(decoder)](decoder)\n\n/**\n * T must not be null.\n *\n * @template T\n */\nexport class RleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {function(Decoder):T} reader\n */\n constructor (uint8Array, reader) {\n super(uint8Array)\n /**\n * The reader\n */\n this.reader = reader\n /**\n * Current state\n * @type {T|null}\n */\n this.s = null\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = this.reader(this)\n if (hasContent(this)) {\n this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented\n } else {\n this.count = -1 // read the current value forever\n }\n }\n this.count--\n return /** @type {T} */ (this.s)\n }\n}\n\nexport class IntDiffDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {number} start\n */\n constructor (uint8Array, start) {\n super(uint8Array)\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n }\n\n /**\n * @return {number}\n */\n read () {\n this.s += readVarInt(this)\n return this.s\n }\n}\n\nexport class RleIntDiffDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {number} start\n */\n constructor (uint8Array, start) {\n super(uint8Array)\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n this.count = 0\n }\n\n /**\n * @return {number}\n */\n read () {\n if (this.count === 0) {\n this.s += readVarInt(this)\n if (hasContent(this)) {\n this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented\n } else {\n this.count = -1 // read the current value forever\n }\n }\n this.count--\n return /** @type {number} */ (this.s)\n }\n}\n\nexport class UintOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = readVarInt(this)\n // if the sign is negative, we read the count too, otherwise count is 1\n const isNegative = math.isNegativeZero(this.s)\n this.count = 1\n if (isNegative) {\n this.s = -this.s\n this.count = readVarUint(this) + 2\n }\n }\n this.count--\n return /** @type {number} */ (this.s)\n }\n}\n\nexport class IncUintOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = readVarInt(this)\n // if the sign is negative, we read the count too, otherwise count is 1\n const isNegative = math.isNegativeZero(this.s)\n this.count = 1\n if (isNegative) {\n this.s = -this.s\n this.count = readVarUint(this) + 2\n }\n }\n this.count--\n return /** @type {number} */ (this.s++)\n }\n}\n\nexport class IntDiffOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n this.diff = 0\n }\n\n /**\n * @return {number}\n */\n read () {\n if (this.count === 0) {\n const diff = readVarInt(this)\n // if the first bit is set, we read more data\n const hasCount = diff & 1\n this.diff = math.floor(diff / 2) // shift >> 1\n this.count = 1\n if (hasCount) {\n this.count = readVarUint(this) + 2\n }\n }\n this.s += this.diff\n this.count--\n return this.s\n }\n}\n\nexport class StringDecoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n this.decoder = new UintOptRleDecoder(uint8Array)\n this.str = readVarString(this.decoder)\n /**\n * @type {number}\n */\n this.spos = 0\n }\n\n /**\n * @return {string}\n */\n read () {\n const end = this.spos + this.decoder.read()\n const res = this.str.slice(this.spos, end)\n this.spos = end\n return res\n }\n}\n",null,"/**\n * Utility module to work with time.\n *\n * @module time\n */\n\nimport * as metric from './metric.js'\nimport * as math from './math.js'\n\n/**\n * Return current time.\n *\n * @return {Date}\n */\nexport const getDate = () => new Date()\n\n/**\n * Return current unix time.\n *\n * @return {number}\n */\nexport const getUnixTime = Date.now\n\n/**\n * Transform time (in ms) to a human readable format. E.g. 1100 => 1.1s. 60s => 1min. .001 => 10μs.\n *\n * @param {number} d duration in milliseconds\n * @return {string} humanized approximation of time\n */\nexport const humanizeDuration = d => {\n if (d < 60000) {\n const p = metric.prefix(d, -1)\n return math.round(p.n * 100) / 100 + p.prefix + 's'\n }\n d = math.floor(d / 1000)\n const seconds = d % 60\n const minutes = math.floor(d / 60) % 60\n const hours = math.floor(d / 3600) % 24\n const days = math.floor(d / 86400)\n if (days > 0) {\n return days + 'd' + ((hours > 0 || minutes > 30) ? ' ' + (minutes > 30 ? hours + 1 : hours) + 'h' : '')\n }\n if (hours > 0) {\n /* c8 ignore next */\n return hours + 'h' + ((minutes > 0 || seconds > 30) ? ' ' + (seconds > 30 ? minutes + 1 : minutes) + 'min' : '')\n }\n return minutes + 'min' + (seconds > 0 ? ' ' + seconds + 's' : '')\n}\n","/**\n * Utility module to work with key-value stores.\n *\n * @module map\n */\n\n/**\n * Creates a new Map instance.\n *\n * @function\n * @return {Map}\n *\n * @function\n */\nexport const create = () => new Map()\n\n/**\n * Copy a Map object into a fresh Map object.\n *\n * @function\n * @template K,V\n * @param {Map} m\n * @return {Map}\n */\nexport const copy = m => {\n const r = create()\n m.forEach((v, k) => { r.set(k, v) })\n return r\n}\n\n/**\n * Get map property. Create T if property is undefined and set T on map.\n *\n * ```js\n * const listeners = map.setIfUndefined(events, 'eventName', set.create)\n * listeners.add(listener)\n * ```\n *\n * @function\n * @template {Map} MAP\n * @template {MAP extends Map ? function():V : unknown} CF\n * @param {MAP} map\n * @param {MAP extends Map ? K : unknown} key\n * @param {CF} createT\n * @return {ReturnType}\n */\nexport const setIfUndefined = (map, key, createT) => {\n let set = map.get(key)\n if (set === undefined) {\n map.set(key, set = createT())\n }\n return set\n}\n\n/**\n * Creates an Array and populates it with the content of all key-value pairs using the `f(value, key)` function.\n *\n * @function\n * @template K\n * @template V\n * @template R\n * @param {Map} m\n * @param {function(V,K):R} f\n * @return {Array}\n */\nexport const map = (m, f) => {\n const res = []\n for (const [key, value] of m) {\n res.push(f(value, key))\n }\n return res\n}\n\n/**\n * Tests whether any key-value pairs pass the test implemented by `f(value, key)`.\n *\n * @todo should rename to some - similarly to Array.some\n *\n * @function\n * @template K\n * @template V\n * @param {Map} m\n * @param {function(V,K):boolean} f\n * @return {boolean}\n */\nexport const any = (m, f) => {\n for (const [key, value] of m) {\n if (f(value, key)) {\n return true\n }\n }\n return false\n}\n\n/**\n * Tests whether all key-value pairs pass the test implemented by `f(value, key)`.\n *\n * @function\n * @template K\n * @template V\n * @param {Map} m\n * @param {function(V,K):boolean} f\n * @return {boolean}\n */\nexport const all = (m, f) => {\n for (const [key, value] of m) {\n if (!f(value, key)) {\n return false\n }\n }\n return true\n}\n","/**\n * Observable class prototype.\n *\n * @module observable\n */\n\nimport * as map from './map.js'\nimport * as set from './set.js'\nimport * as array from './array.js'\n\n/**\n * Handles named events.\n * @experimental\n *\n * This is basically a (better typed) duplicate of Observable, which will replace Observable in the\n * next release.\n *\n * @template {{[key in keyof EVENTS]: function(...any):void}} EVENTS\n */\nexport class ObservableV2 {\n constructor () {\n /**\n * Some desc.\n * @type {Map>}\n */\n this._observers = map.create()\n }\n\n /**\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name\n * @param {EVENTS[NAME]} f\n */\n on (name, f) {\n map.setIfUndefined(this._observers, /** @type {string} */ (name), set.create).add(f)\n return f\n }\n\n /**\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name\n * @param {EVENTS[NAME]} f\n */\n once (name, f) {\n /**\n * @param {...any} args\n */\n const _f = (...args) => {\n this.off(name, /** @type {any} */ (_f))\n f(...args)\n }\n this.on(name, /** @type {any} */ (_f))\n }\n\n /**\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name\n * @param {EVENTS[NAME]} f\n */\n off (name, f) {\n const observers = this._observers.get(name)\n if (observers !== undefined) {\n observers.delete(f)\n if (observers.size === 0) {\n this._observers.delete(name)\n }\n }\n }\n\n /**\n * Emit a named event. All registered event listeners that listen to the\n * specified name will receive the event.\n *\n * @todo This should catch exceptions\n *\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name The event name.\n * @param {Parameters} args The arguments that are applied to the event listener.\n */\n emit (name, args) {\n // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called.\n return array.from((this._observers.get(name) || map.create()).values()).forEach(f => f(...args))\n }\n\n destroy () {\n this._observers = map.create()\n }\n}\n\n/* c8 ignore start */\n/**\n * Handles named events.\n *\n * @deprecated\n * @template N\n */\nexport class Observable {\n constructor () {\n /**\n * Some desc.\n * @type {Map}\n */\n this._observers = map.create()\n }\n\n /**\n * @param {N} name\n * @param {function} f\n */\n on (name, f) {\n map.setIfUndefined(this._observers, name, set.create).add(f)\n }\n\n /**\n * @param {N} name\n * @param {function} f\n */\n once (name, f) {\n /**\n * @param {...any} args\n */\n const _f = (...args) => {\n this.off(name, _f)\n f(...args)\n }\n this.on(name, _f)\n }\n\n /**\n * @param {N} name\n * @param {function} f\n */\n off (name, f) {\n const observers = this._observers.get(name)\n if (observers !== undefined) {\n observers.delete(f)\n if (observers.size === 0) {\n this._observers.delete(name)\n }\n }\n }\n\n /**\n * Emit a named event. All registered event listeners that listen to the\n * specified name will receive the event.\n *\n * @todo This should catch exceptions\n *\n * @param {N} name The event name.\n * @param {Array} args The arguments that are applied to the event listener.\n */\n emit (name, args) {\n // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called.\n return array.from((this._observers.get(name) || map.create()).values()).forEach(f => f(...args))\n }\n\n destroy () {\n this._observers = map.create()\n }\n}\n/* c8 ignore end */\n","/**\n * Utility functions for working with EcmaScript objects.\n *\n * @module object\n */\n\n/**\n * @return {Object} obj\n */\nexport const create = () => Object.create(null)\n\n/**\n * Object.assign\n */\nexport const assign = Object.assign\n\n/**\n * @param {Object} obj\n */\nexport const keys = Object.keys\n\n/**\n * @template V\n * @param {{[k:string]:V}} obj\n * @param {function(V,string):any} f\n */\nexport const forEach = (obj, f) => {\n for (const key in obj) {\n f(obj[key], key)\n }\n}\n\n/**\n * @todo implement mapToArray & map\n *\n * @template R\n * @param {Object} obj\n * @param {function(any,string):R} f\n * @return {Array}\n */\nexport const map = (obj, f) => {\n const results = []\n for (const key in obj) {\n results.push(f(obj[key], key))\n }\n return results\n}\n\n/**\n * @deprecated use object.size instead\n * @param {Object} obj\n * @return {number}\n */\nexport const length = obj => keys(obj).length\n\n/**\n * @param {Object} obj\n * @return {number}\n */\nexport const size = obj => keys(obj).length\n\n/**\n * @param {Object} obj\n * @param {function(any,string):boolean} f\n * @return {boolean}\n */\nexport const some = (obj, f) => {\n for (const key in obj) {\n if (f(obj[key], key)) {\n return true\n }\n }\n return false\n}\n\n/**\n * @param {Object|undefined} obj\n */\nexport const isEmpty = obj => {\n // eslint-disable-next-line\n for (const _k in obj) {\n return false\n }\n return true\n}\n\n/**\n * @param {Object} obj\n * @param {function(any,string):boolean} f\n * @return {boolean}\n */\nexport const every = (obj, f) => {\n for (const key in obj) {\n if (!f(obj[key], key)) {\n return false\n }\n }\n return true\n}\n\n/**\n * Calls `Object.prototype.hasOwnProperty`.\n *\n * @param {any} obj\n * @param {string|symbol} key\n * @return {boolean}\n */\nexport const hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key)\n\n/**\n * @param {Object} a\n * @param {Object} b\n * @return {boolean}\n */\nexport const equalFlat = (a, b) => a === b || (size(a) === size(b) && every(a, (val, key) => (val !== undefined || hasProperty(b, key)) && b[key] === val))\n\n/**\n * Make an object immutable. This hurts performance and is usually not needed if you perform good\n * coding practices.\n */\nexport const freeze = Object.freeze\n\n/**\n * Make an object and all its children immutable.\n * This *really* hurts performance and is usually not needed if you perform good coding practices.\n *\n * @template {any} T\n * @param {T} o\n * @return {Readonly}\n */\nexport const deepFreeze = (o) => {\n for (const key in o) {\n const c = o[key]\n if (typeof c === 'object' || typeof c === 'function') {\n deepFreeze(o[key])\n }\n }\n return freeze(o)\n}\n","/**\n * Common functions and function call helpers.\n *\n * @module function\n */\n\nimport * as array from './array.js'\nimport * as object from './object.js'\n\n/**\n * Calls all functions in `fs` with args. Only throws after all functions were called.\n *\n * @param {Array} fs\n * @param {Array} args\n */\nexport const callAll = (fs, args, i = 0) => {\n try {\n for (; i < fs.length; i++) {\n fs[i](...args)\n }\n } finally {\n if (i < fs.length) {\n callAll(fs, args, i + 1)\n }\n }\n}\n\nexport const nop = () => {}\n\n/**\n * @template T\n * @param {function():T} f\n * @return {T}\n */\nexport const apply = f => f()\n\n/**\n * @template A\n *\n * @param {A} a\n * @return {A}\n */\nexport const id = a => a\n\n/**\n * @template T\n *\n * @param {T} a\n * @param {T} b\n * @return {boolean}\n */\nexport const equalityStrict = (a, b) => a === b\n\n/**\n * @template T\n *\n * @param {Array|object} a\n * @param {Array|object} b\n * @return {boolean}\n */\nexport const equalityFlat = (a, b) => a === b || (a != null && b != null && a.constructor === b.constructor && ((array.isArray(a) && array.equalFlat(a, /** @type {Array} */ (b))) || (typeof a === 'object' && object.equalFlat(a, b))))\n\n/* c8 ignore start */\n\n/**\n * @param {any} a\n * @param {any} b\n * @return {boolean}\n */\nexport const equalityDeep = (a, b) => {\n if (a == null || b == null) {\n return equalityStrict(a, b)\n }\n if (a.constructor !== b.constructor) {\n return false\n }\n if (a === b) {\n return true\n }\n switch (a.constructor) {\n case ArrayBuffer:\n a = new Uint8Array(a)\n b = new Uint8Array(b)\n // eslint-disable-next-line no-fallthrough\n case Uint8Array: {\n if (a.byteLength !== b.byteLength) {\n return false\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false\n }\n }\n break\n }\n case Set: {\n if (a.size !== b.size) {\n return false\n }\n for (const value of a) {\n if (!b.has(value)) {\n return false\n }\n }\n break\n }\n case Map: {\n if (a.size !== b.size) {\n return false\n }\n for (const key of a.keys()) {\n if (!b.has(key) || !equalityDeep(a.get(key), b.get(key))) {\n return false\n }\n }\n break\n }\n case Object:\n if (object.length(a) !== object.length(b)) {\n return false\n }\n for (const key in a) {\n if (!object.hasProperty(a, key) || !equalityDeep(a[key], b[key])) {\n return false\n }\n }\n break\n case Array:\n if (a.length !== b.length) {\n return false\n }\n for (let i = 0; i < a.length; i++) {\n if (!equalityDeep(a[i], b[i])) {\n return false\n }\n }\n break\n default:\n return false\n }\n return true\n}\n\n/**\n * @template V\n * @template {V} OPTS\n *\n * @param {V} value\n * @param {Array} options\n */\n// @ts-ignore\nexport const isOneOf = (value, options) => options.includes(value)\n/* c8 ignore stop */\n\nexport const isArray = array.isArray\n\n/**\n * @param {any} s\n * @return {s is String}\n */\nexport const isString = (s) => s && s.constructor === String\n\n/**\n * @param {any} n\n * @return {n is Number}\n */\nexport const isNumber = n => n != null && n.constructor === Number\n\n/**\n * @template {abstract new (...args: any) => any} TYPE\n * @param {any} n\n * @param {TYPE} T\n * @return {n is InstanceType}\n */\nexport const is = (n, T) => n && n.constructor === T\n\n/**\n * @template {abstract new (...args: any) => any} TYPE\n * @param {TYPE} T\n */\nexport const isTemplate = (T) =>\n /**\n * @param {any} n\n * @return {n is InstanceType}\n **/\n n => n && n.constructor === T\n","/**\n * @module awareness-protocol\n */\n\nimport * as encoding from 'lib0/encoding'\nimport * as decoding from 'lib0/decoding'\nimport * as time from 'lib0/time'\nimport * as math from 'lib0/math'\nimport { Observable } from 'lib0/observable'\nimport * as f from 'lib0/function'\nimport * as Y from 'yjs' // eslint-disable-line\n\nexport const outdatedTimeout = 30000\n\n/**\n * @typedef {Object} MetaClientState\n * @property {number} MetaClientState.clock\n * @property {number} MetaClientState.lastUpdated unix timestamp\n */\n\n/**\n * The Awareness class implements a simple shared state protocol that can be used for non-persistent data like awareness information\n * (cursor, username, status, ..). Each client can update its own local state and listen to state changes of\n * remote clients. Every client may set a state of a remote peer to `null` to mark the client as offline.\n *\n * Each client is identified by a unique client id (something we borrow from `doc.clientID`). A client can override\n * its own state by propagating a message with an increasing timestamp (`clock`). If such a message is received, it is\n * applied if the known state of that client is older than the new state (`clock < newClock`). If a client thinks that\n * a remote client is offline, it may propagate a message with\n * `{ clock: currentClientClock, state: null, client: remoteClient }`. If such a\n * message is received, and the known clock of that client equals the received clock, it will override the state with `null`.\n *\n * Before a client disconnects, it should propagate a `null` state with an updated clock.\n *\n * Awareness states must be updated every 30 seconds. Otherwise the Awareness instance will delete the client state.\n *\n * @extends {Observable}\n */\nexport class Awareness extends Observable {\n /**\n * @param {Y.Doc} doc\n */\n constructor (doc) {\n super()\n this.doc = doc\n /**\n * @type {number}\n */\n this.clientID = doc.clientID\n /**\n * Maps from client id to client state\n * @type {Map>}\n */\n this.states = new Map()\n /**\n * @type {Map}\n */\n this.meta = new Map()\n this._checkInterval = /** @type {any} */ (setInterval(() => {\n const now = time.getUnixTime()\n if (this.getLocalState() !== null && (outdatedTimeout / 2 <= now - /** @type {{lastUpdated:number}} */ (this.meta.get(this.clientID)).lastUpdated)) {\n // renew local clock\n this.setLocalState(this.getLocalState())\n }\n /**\n * @type {Array}\n */\n const remove = []\n this.meta.forEach((meta, clientid) => {\n if (clientid !== this.clientID && outdatedTimeout <= now - meta.lastUpdated && this.states.has(clientid)) {\n remove.push(clientid)\n }\n })\n if (remove.length > 0) {\n removeAwarenessStates(this, remove, 'timeout')\n }\n }, math.floor(outdatedTimeout / 10)))\n doc.on('destroy', () => {\n this.destroy()\n })\n this.setLocalState({})\n }\n\n destroy () {\n this.emit('destroy', [this])\n this.setLocalState(null)\n super.destroy()\n clearInterval(this._checkInterval)\n }\n\n /**\n * @return {Object|null}\n */\n getLocalState () {\n return this.states.get(this.clientID) || null\n }\n\n /**\n * @param {Object|null} state\n */\n setLocalState (state) {\n const clientID = this.clientID\n const currLocalMeta = this.meta.get(clientID)\n const clock = currLocalMeta === undefined ? 0 : currLocalMeta.clock + 1\n const prevState = this.states.get(clientID)\n if (state === null) {\n this.states.delete(clientID)\n } else {\n this.states.set(clientID, state)\n }\n this.meta.set(clientID, {\n clock,\n lastUpdated: time.getUnixTime()\n })\n const added = []\n const updated = []\n const filteredUpdated = []\n const removed = []\n if (state === null) {\n removed.push(clientID)\n } else if (prevState == null) {\n if (state != null) {\n added.push(clientID)\n }\n } else {\n updated.push(clientID)\n if (!f.equalityDeep(prevState, state)) {\n filteredUpdated.push(clientID)\n }\n }\n if (added.length > 0 || filteredUpdated.length > 0 || removed.length > 0) {\n this.emit('change', [{ added, updated: filteredUpdated, removed }, 'local'])\n }\n this.emit('update', [{ added, updated, removed }, 'local'])\n }\n\n /**\n * @param {string} field\n * @param {any} value\n */\n setLocalStateField (field, value) {\n const state = this.getLocalState()\n if (state !== null) {\n this.setLocalState({\n ...state,\n [field]: value\n })\n }\n }\n\n /**\n * @return {Map>}\n */\n getStates () {\n return this.states\n }\n}\n\n/**\n * Mark (remote) clients as inactive and remove them from the list of active peers.\n * This change will be propagated to remote clients.\n *\n * @param {Awareness} awareness\n * @param {Array} clients\n * @param {any} origin\n */\nexport const removeAwarenessStates = (awareness, clients, origin) => {\n const removed = []\n for (let i = 0; i < clients.length; i++) {\n const clientID = clients[i]\n if (awareness.states.has(clientID)) {\n awareness.states.delete(clientID)\n if (clientID === awareness.clientID) {\n const curMeta = /** @type {MetaClientState} */ (awareness.meta.get(clientID))\n awareness.meta.set(clientID, {\n clock: curMeta.clock + 1,\n lastUpdated: time.getUnixTime()\n })\n }\n removed.push(clientID)\n }\n }\n if (removed.length > 0) {\n awareness.emit('change', [{ added: [], updated: [], removed }, origin])\n awareness.emit('update', [{ added: [], updated: [], removed }, origin])\n }\n}\n\n/**\n * @param {Awareness} awareness\n * @param {Array} clients\n * @return {Uint8Array}\n */\nexport const encodeAwarenessUpdate = (awareness, clients, states = awareness.states) => {\n const len = clients.length\n const encoder = encoding.createEncoder()\n encoding.writeVarUint(encoder, len)\n for (let i = 0; i < len; i++) {\n const clientID = clients[i]\n const state = states.get(clientID) || null\n const clock = /** @type {MetaClientState} */ (awareness.meta.get(clientID)).clock\n encoding.writeVarUint(encoder, clientID)\n encoding.writeVarUint(encoder, clock)\n encoding.writeVarString(encoder, JSON.stringify(state))\n }\n return encoding.toUint8Array(encoder)\n}\n\n/**\n * Modify the content of an awareness update before re-encoding it to an awareness update.\n *\n * This might be useful when you have a central server that wants to ensure that clients\n * cant hijack somebody elses identity.\n *\n * @param {Uint8Array} update\n * @param {function(any):any} modify\n * @return {Uint8Array}\n */\nexport const modifyAwarenessUpdate = (update, modify) => {\n const decoder = decoding.createDecoder(update)\n const encoder = encoding.createEncoder()\n const len = decoding.readVarUint(decoder)\n encoding.writeVarUint(encoder, len)\n for (let i = 0; i < len; i++) {\n const clientID = decoding.readVarUint(decoder)\n const clock = decoding.readVarUint(decoder)\n const state = JSON.parse(decoding.readVarString(decoder))\n const modifiedState = modify(state)\n encoding.writeVarUint(encoder, clientID)\n encoding.writeVarUint(encoder, clock)\n encoding.writeVarString(encoder, JSON.stringify(modifiedState))\n }\n return encoding.toUint8Array(encoder)\n}\n\n/**\n * @param {Awareness} awareness\n * @param {Uint8Array} update\n * @param {any} origin This will be added to the emitted change event\n */\nexport const applyAwarenessUpdate = (awareness, update, origin) => {\n const decoder = decoding.createDecoder(update)\n const timestamp = time.getUnixTime()\n const added = []\n const updated = []\n const filteredUpdated = []\n const removed = []\n const len = decoding.readVarUint(decoder)\n for (let i = 0; i < len; i++) {\n const clientID = decoding.readVarUint(decoder)\n let clock = decoding.readVarUint(decoder)\n const state = JSON.parse(decoding.readVarString(decoder))\n const clientMeta = awareness.meta.get(clientID)\n const prevState = awareness.states.get(clientID)\n const currClock = clientMeta === undefined ? 0 : clientMeta.clock\n if (currClock < clock || (currClock === clock && state === null && awareness.states.has(clientID))) {\n if (state === null) {\n // never let a remote client remove this local state\n if (clientID === awareness.clientID && awareness.getLocalState() != null) {\n // remote client removed the local state. Do not remote state. Broadcast a message indicating\n // that this client still exists by increasing the clock\n clock++\n } else {\n awareness.states.delete(clientID)\n }\n } else {\n awareness.states.set(clientID, state)\n }\n awareness.meta.set(clientID, {\n clock,\n lastUpdated: timestamp\n })\n if (clientMeta === undefined && state !== null) {\n added.push(clientID)\n } else if (clientMeta !== undefined && state === null) {\n removed.push(clientID)\n } else if (state !== null) {\n if (!f.equalityDeep(state, prevState)) {\n filteredUpdated.push(clientID)\n }\n updated.push(clientID)\n }\n }\n }\n if (added.length > 0 || filteredUpdated.length > 0 || removed.length > 0) {\n awareness.emit('change', [{\n added, updated: filteredUpdated, removed\n }, origin])\n }\n if (added.length > 0 || updated.length > 0 || removed.length > 0) {\n awareness.emit('update', [{\n added, updated, removed\n }, origin])\n }\n}\n","/**\n * @module sync-protocol\n */\n\nimport * as encoding from 'lib0/encoding'\nimport * as decoding from 'lib0/decoding'\nimport * as Y from 'yjs'\n\n/**\n * @typedef {Map} StateMap\n */\n\n/**\n * Core Yjs defines two message types:\n * • YjsSyncStep1: Includes the State Set of the sending client. When received, the client should reply with YjsSyncStep2.\n * • YjsSyncStep2: Includes all missing structs and the complete delete set. When received, the client is assured that it\n * received all information from the remote client.\n *\n * In a peer-to-peer network, you may want to introduce a SyncDone message type. Both parties should initiate the connection\n * with SyncStep1. When a client received SyncStep2, it should reply with SyncDone. When the local client received both\n * SyncStep2 and SyncDone, it is assured that it is synced to the remote client.\n *\n * In a client-server model, you want to handle this differently: The client should initiate the connection with SyncStep1.\n * When the server receives SyncStep1, it should reply with SyncStep2 immediately followed by SyncStep1. The client replies\n * with SyncStep2 when it receives SyncStep1. Optionally the server may send a SyncDone after it received SyncStep2, so the\n * client knows that the sync is finished. There are two reasons for this more elaborated sync model: 1. This protocol can\n * easily be implemented on top of http and websockets. 2. The server should only reply to requests, and not initiate them.\n * Therefore it is necessary that the client initiates the sync.\n *\n * Construction of a message:\n * [messageType : varUint, message definition..]\n *\n * Note: A message does not include information about the room name. This must to be handled by the upper layer protocol!\n *\n * stringify[messageType] stringifies a message definition (messageType is already read from the bufffer)\n */\n\nexport const messageYjsSyncStep1 = 0\nexport const messageYjsSyncStep2 = 1\nexport const messageYjsUpdate = 2\n\n/**\n * Create a sync step 1 message based on the state of the current shared document.\n *\n * @param {encoding.Encoder} encoder\n * @param {Y.Doc} doc\n */\nexport const writeSyncStep1 = (encoder, doc) => {\n encoding.writeVarUint(encoder, messageYjsSyncStep1)\n const sv = Y.encodeStateVector(doc)\n encoding.writeVarUint8Array(encoder, sv)\n}\n\n/**\n * @param {encoding.Encoder} encoder\n * @param {Y.Doc} doc\n * @param {Uint8Array} [encodedStateVector]\n */\nexport const writeSyncStep2 = (encoder, doc, encodedStateVector) => {\n encoding.writeVarUint(encoder, messageYjsSyncStep2)\n encoding.writeVarUint8Array(encoder, Y.encodeStateAsUpdate(doc, encodedStateVector))\n}\n\n/**\n * Read SyncStep1 message and reply with SyncStep2.\n *\n * @param {decoding.Decoder} decoder The reply to the received message\n * @param {encoding.Encoder} encoder The received message\n * @param {Y.Doc} doc\n */\nexport const readSyncStep1 = (decoder, encoder, doc) =>\n writeSyncStep2(encoder, doc, decoding.readVarUint8Array(decoder))\n\n/**\n * Read and apply Structs and then DeleteStore to a y instance.\n *\n * @param {decoding.Decoder} decoder\n * @param {Y.Doc} doc\n * @param {any} transactionOrigin\n */\nexport const readSyncStep2 = (decoder, doc, transactionOrigin) => {\n try {\n Y.applyUpdate(doc, decoding.readVarUint8Array(decoder), transactionOrigin)\n } catch (error) {\n // This catches errors that are thrown by event handlers\n console.error('Caught error while handling a Yjs update', error)\n }\n}\n\n/**\n * @param {encoding.Encoder} encoder\n * @param {Uint8Array} update\n */\nexport const writeUpdate = (encoder, update) => {\n encoding.writeVarUint(encoder, messageYjsUpdate)\n encoding.writeVarUint8Array(encoder, update)\n}\n\n/**\n * Read and apply Structs and then DeleteStore to a y instance.\n *\n * @param {decoding.Decoder} decoder\n * @param {Y.Doc} doc\n * @param {any} transactionOrigin\n */\nexport const readUpdate = readSyncStep2\n\n/**\n * @param {decoding.Decoder} decoder A message received from another client\n * @param {encoding.Encoder} encoder The reply message. Does not need to be sent if empty.\n * @param {Y.Doc} doc\n * @param {any} transactionOrigin\n */\nexport const readSyncMessage = (decoder, encoder, doc, transactionOrigin) => {\n const messageType = decoding.readVarUint(decoder)\n switch (messageType) {\n case messageYjsSyncStep1:\n readSyncStep1(decoder, encoder, doc)\n break\n case messageYjsSyncStep2:\n readSyncStep2(decoder, doc, transactionOrigin)\n break\n case messageYjsUpdate:\n readUpdate(decoder, doc, transactionOrigin)\n break\n default:\n throw new Error('Unknown message type')\n }\n return messageType\n}\n",null,null,null,null,null,null,null,null,null,null,null],"names":["create","length","binary.BITS7","binary.BIT8","math.floor","string.utf8TextEncoder","string.encodeUtf8","math.min","math.max","error.create","number.MAX_SAFE_INTEGER","string.utf8TextDecoder","map.create","map.setIfUndefined","set.create","array.from","object.length","object.hasProperty","time.getUnixTime","f.equalityDeep","encoding.createEncoder","encoding.writeVarUint","encoding.writeVarString","encoding.toUint8Array","decoding.createDecoder","decoding.readVarUint","decoding.readVarString","encoding.writeVarUint8Array","decoding.readVarUint8Array","SocketIncomingMessage"],"mappings":";;;;;;;;;;AAAA;;AAoBO,MAAM,IAAI,GAAG;AAsCb,MAAM,KAAK,GAAG;;AC1DrB;AACA;AACA;AACA;AACA;;AAEO,MAAM,KAAK,GAAG,IAAI,CAAC;;AAkB1B;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG;;ACtCzC;AACA;AACA;AACA;AACA;;;AAKO,MAAM,gBAAgB,GAAG,MAAM,CAAC;;ACTvC;AACA;AACA;AACA;AACA;;AAEO,MAAMA,QAAM,GAAG,MAAM,IAAI,GAAG;;ACNnC;AACA;AACA;AACA;AACA;;;AAuCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,IAAI,GAAG,KAAK,CAAC;;ACJ1B;AACA;AACA;AACA;AACO,MAAM,mBAAmB,GAAG,GAAG,IAAI;AAC1C,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC;AACxD,EAAE,MAAM,GAAG,GAAG,aAAa,CAAC;AAC5B,EAAE,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,GAAG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AU,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AAC3B,YAAA,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAA,CAAE,CAAC;AAC3B,SAAC,CAAC;QAEF,OAAO,CAAC,GAAG,EAAE;AACb,QAAA,OAAO,CAAC,GAAG,CAAC,CAAA,EAAA,EAAK,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAE,CAAA,CAAC;QACzC,OAAO,CAAC,GAAG,EAAE;;AAEd;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/model/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/model/index.d.ts deleted file mode 100644 index 149a810..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/model/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-model'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/state/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/state/index.d.ts deleted file mode 100644 index 455a4db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/state/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-state'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/transform/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/transform/index.d.ts deleted file mode 100644 index 0b4f8de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/transform/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-transform'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/view/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/view/index.d.ts deleted file mode 100644 index 8b3c631..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/node_modules/@tiptap/pm/view/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-view'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/CloseEvents.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/CloseEvents.d.ts deleted file mode 100644 index 1f397a5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/CloseEvents.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface CloseEvent { - code: number; - reason: string; -} -/** - * The server is terminating the connection because a data frame was received - * that is too large. - * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code - */ -export declare const MessageTooBig: CloseEvent; -/** - * The server successfully processed the request, asks that the requester reset - * its document view, and is not returning any content. - */ -export declare const ResetConnection: CloseEvent; -/** - * Similar to Forbidden, but specifically for use when authentication is required and has - * failed or has not yet been provided. - */ -export declare const Unauthorized: CloseEvent; -/** - * The request contained valid data and was understood by the server, but the server - * is refusing action. - */ -export declare const Forbidden: CloseEvent; -/** - * The server timed out waiting for the request. - */ -export declare const ConnectionTimeout: CloseEvent; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/auth.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/auth.d.ts deleted file mode 100644 index fa5c56c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/auth.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as encoding from "lib0/encoding"; -import * as decoding from "lib0/decoding"; -import type { AuthorizedScope } from "../../provider/src"; -export declare enum AuthMessageType { - Token = 0, - PermissionDenied = 1, - Authenticated = 2 -} -export declare const writeAuthentication: (encoder: encoding.Encoder, auth: string) => void; -export declare const writePermissionDenied: (encoder: encoding.Encoder, reason: string) => void; -export declare const writeAuthenticated: (encoder: encoding.Encoder, scope: AuthorizedScope) => void; -export declare const writeTokenSyncRequest: (encoder: encoding.Encoder) => void; -export declare const readAuthMessage: (decoder: decoding.Decoder, sendToken: () => void, permissionDeniedHandler: (reason: string) => void, authenticatedHandler: (scope: string) => void) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/awarenessStatesToArray.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/awarenessStatesToArray.d.ts deleted file mode 100644 index 81db4ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/awarenessStatesToArray.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const awarenessStatesToArray: (states: Map>) => { - clientId: number; -}[]; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/index.d.ts deleted file mode 100644 index 8a730fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./auth.ts"; -export * from "./CloseEvents.ts"; -export * from "./awarenessStatesToArray.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/types.d.ts deleted file mode 100644 index 3672009..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/common/src/types.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * State of the WebSocket connection. - * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState - */ -export declare enum WsReadyStates { - Connecting = 0, - Open = 1, - Closing = 2, - Closed = 3 -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-database/src/Database.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-database/src/Database.d.ts deleted file mode 100644 index 123c8d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-database/src/Database.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Extension, onChangePayload, onLoadDocumentPayload, storePayload, fetchPayload } from "@hocuspocus/server"; -export interface DatabaseConfiguration { - /** - * Pass a Promise to retrieve updates from your database. The Promise should resolve to - * an array of items with Y.js-compatible binary data. - */ - fetch: (data: fetchPayload) => Promise; - /** - * Pass a function to store updates in your database. - */ - store: (data: storePayload) => Promise; -} -export declare class Database implements Extension { - /** - * Default configuration - */ - configuration: DatabaseConfiguration; - /** - * Constructor - */ - constructor(configuration: Partial); - /** - * Get stored data from the database. - */ - onLoadDocument(data: onLoadDocumentPayload): Promise; - /** - * Store new updates in the database. - */ - onStoreDocument(data: onChangePayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-database/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-database/src/index.d.ts deleted file mode 100644 index cca6903..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-database/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Database.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-logger/src/Logger.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-logger/src/Logger.d.ts deleted file mode 100644 index 7d601c8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-logger/src/Logger.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onLoadDocumentPayload, onDestroyPayload, onDisconnectPayload, onRequestPayload, onUpgradePayload } from "@hocuspocus/server"; -export interface LoggerConfiguration { - /** - * Prepend all logging message with a string. - * - * @deprecated - */ - prefix: null | string; - /** - * Whether to log something for the `onLoadDocument` hook. - */ - onLoadDocument: boolean; - /** - * Whether to log something for the `onChange` hook. - */ - onChange: boolean; - /** - * Whether to log something for the `onStoreDocument` hook. - */ - onStoreDocument: boolean; - /** - * Whether to log something for the `onConnect` hook. - */ - onConnect: boolean; - /** - * Whether to log something for the `onDisconnect` hook. - */ - onDisconnect: boolean; - /** - * Whether to log something for the `onUpgrade` hook. - */ - onUpgrade: boolean; - /** - * Whether to log something for the `onRequest` hook. - */ - onRequest: boolean; - /** - * Whether to log something for the `onDestroy` hook. - */ - onDestroy: boolean; - /** - * Whether to log something for the `onConfigure` hook. - */ - onConfigure: boolean; - /** - * A log function, if none is provided output will go to console - */ - log: (...args: any[]) => void; -} -export declare class Logger implements Extension { - name: string | null; - configuration: LoggerConfiguration; - /** - * Constructor - */ - constructor(configuration?: Partial); - onConfigure(data: onConfigurePayload): Promise; - onLoadDocument(data: onLoadDocumentPayload): Promise; - onChange(data: onChangePayload): Promise; - onStoreDocument(data: onDisconnectPayload): Promise; - onConnect(data: onConnectPayload): Promise; - onDisconnect(data: onDisconnectPayload): Promise; - onUpgrade(data: onUpgradePayload): Promise; - onRequest(data: onRequestPayload): Promise; - onDestroy(data: onDestroyPayload): Promise; - private log; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-logger/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-logger/src/index.d.ts deleted file mode 100644 index 9a59b0a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-logger/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Logger.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-redis/src/Redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-redis/src/Redis.d.ts deleted file mode 100644 index 78dc013..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-redis/src/Redis.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import type { Extension, Hocuspocus, afterLoadDocumentPayload, afterStoreDocumentPayload, afterUnloadDocumentPayload, beforeBroadcastStatelessPayload, beforeUnloadDocumentPayload, onAwarenessUpdatePayload, onChangePayload, onConfigurePayload, onStoreDocumentPayload } from "@hocuspocus/server"; -import { type ExecutionResult, type Lock, Redlock } from "@sesamecare-oss/redlock"; -import type { Cluster, ClusterNode, ClusterOptions, RedisOptions } from "ioredis"; -import RedisClient from "ioredis"; -export type RedisInstance = RedisClient | Cluster; -export interface Configuration { - /** - * Redis port - */ - port: number; - /** - * Redis host - */ - host: string; - /** - * Redis Cluster - */ - nodes?: ClusterNode[]; - /** - * Duplicate from an existed Redis instance - */ - redis?: RedisInstance; - /** - * Redis instance creator - */ - createClient?: () => RedisInstance; - /** - * Options passed directly to Redis constructor - * - * https://github.com/luin/ioredis/blob/master/API.md#new-redisport-host-options - */ - options?: ClusterOptions | RedisOptions; - /** - * An unique instance name, required to filter messages in Redis. - * If none is provided an unique id is generated. - */ - identifier: string; - /** - * Namespace for Redis keys, if none is provided 'hocuspocus' is used - */ - prefix: string; - /** - * The maximum time for the Redis lock in ms (in case it can’t be released). - */ - lockTimeout: number; - /** - * A delay before onDisconnect is executed. This allows last minute updates' - * sync messages to be received by the subscription before it's closed. - */ - disconnectDelay: number; -} -export declare class Redis implements Extension { - /** - * Make sure to give that extension a higher priority, so - * the `onStoreDocument` hook is able to intercept the chain, - * before documents are stored to the database. - */ - priority: number; - configuration: Configuration; - redisTransactionOrigin: string; - pub: RedisInstance; - sub: RedisInstance; - instance: Hocuspocus; - redlock: Redlock; - locks: Map; - }>; - messagePrefix: Buffer; - private pendingAfterStoreDocumentResolves; - constructor(configuration: Partial); - onConfigure({ instance }: onConfigurePayload): Promise; - private getKey; - private pubKey; - private subKey; - private lockKey; - private encodeMessage; - private decodeMessage; - /** - * Once a document is loaded, subscribe to the channel in Redis. - */ - afterLoadDocument({ documentName, document, }: afterLoadDocumentPayload): Promise; - /** - * Publish the first sync step through Redis. - */ - private publishFirstSyncStep; - /** - * Let’s ask Redis who is connected already. - */ - private requestAwarenessFromOtherInstances; - /** - * Before the document is stored, make sure to set a lock in Redis. - * That’s meant to avoid conflicts with other instances trying to store the document. - */ - onStoreDocument({ documentName }: onStoreDocumentPayload): Promise; - /** - * Release the Redis lock, so other instances can store documents. - */ - afterStoreDocument({ documentName, socketId, }: afterStoreDocumentPayload): Promise; - /** - * Handle awareness update messages received directly by this Hocuspocus instance. - */ - onAwarenessUpdate({ documentName, awareness, added, updated, removed, document, }: onAwarenessUpdatePayload): Promise; - /** - * Handle incoming messages published on subscribed document channels. - * Note that this will also include messages from ourselves as it is not possible - * in Redis to filter these. - */ - private handleIncomingMessage; - /** - * if the ydoc changed, we'll need to inform other Hocuspocus servers about it. - */ - onChange(data: onChangePayload): Promise; - /** - * Delay unloading to allow syncs to finish - */ - beforeUnloadDocument(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument(data: afterUnloadDocumentPayload): Promise; - beforeBroadcastStateless(data: beforeBroadcastStatelessPayload): Promise; - /** - * Kill the Redlock connection immediately. - */ - onDestroy(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-redis/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-redis/src/index.d.ts deleted file mode 100644 index 6c9d48a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-redis/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Redis.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-s3/src/S3.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-s3/src/S3.d.ts deleted file mode 100644 index 4d2da25..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-s3/src/S3.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { DatabaseConfiguration } from "@hocuspocus/extension-database"; -import { Database } from "@hocuspocus/extension-database"; -import { S3Client } from "@aws-sdk/client-s3"; -export interface S3Configuration extends DatabaseConfiguration { - /** - * AWS S3 region - */ - region?: string; - /** - * S3 bucket name - */ - bucket: string; - /** - * S3 key prefix for documents (optional) - */ - prefix?: string; - /** - * AWS credentials - */ - credentials?: { - accessKeyId: string; - secretAccessKey: string; - }; - /** - * S3 endpoint URL (for S3-compatible services like MinIO) - */ - endpoint?: string; - /** - * Force path style URLs (required for MinIO) - */ - forcePathStyle?: boolean; - /** - * Custom S3 client - */ - s3Client?: S3Client; -} -export declare class S3 extends Database { - private s3Client?; - configuration: S3Configuration; - constructor(configuration: Partial); - private getObjectKey; - onConfigure(): Promise; - onListen(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-s3/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-s3/src/index.d.ts deleted file mode 100644 index f782642..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-s3/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./S3.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-sqlite/src/SQLite.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-sqlite/src/SQLite.d.ts deleted file mode 100644 index 432a370..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-sqlite/src/SQLite.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { DatabaseConfiguration } from "@hocuspocus/extension-database"; -import { Database } from "@hocuspocus/extension-database"; -import sqlite3 from "sqlite3"; -export declare const schema = "CREATE TABLE IF NOT EXISTS \"documents\" (\n \"name\" varchar(255) NOT NULL,\n \"data\" blob NOT NULL,\n UNIQUE(name)\n)"; -export declare const selectQuery = "\n SELECT data FROM \"documents\" WHERE name = $name ORDER BY rowid DESC\n"; -export declare const upsertQuery = "\n INSERT INTO \"documents\" (\"name\", \"data\") VALUES ($name, $data)\n ON CONFLICT(name) DO UPDATE SET data = $data\n"; -export interface SQLiteConfiguration extends DatabaseConfiguration { - /** - * Valid values are filenames, ":memory:" for an anonymous in-memory database and an empty - * string for an anonymous disk-based database. Anonymous databases are not persisted and - * when closing the database handle, their contents are lost. - * - * https://github.com/mapbox/node-sqlite3/wiki/API#new-sqlite3databasefilename-mode-callback - */ - database: string; - /** - * The database schema to create. - */ - schema: string; -} -export declare class SQLite extends Database { - db?: sqlite3.Database; - configuration: SQLiteConfiguration; - constructor(configuration?: Partial); - onConfigure(): Promise; - onListen(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-sqlite/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-sqlite/src/index.d.ts deleted file mode 100644 index 8013efb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-sqlite/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./SQLite.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-throttle/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-throttle/src/index.d.ts deleted file mode 100644 index 0917d14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-throttle/src/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Extension, onConnectPayload } from "@hocuspocus/server"; -export interface ThrottleConfiguration { - throttle: number | null | false; - consideredSeconds: number; - banTime: number; - cleanupInterval: number; -} -export declare class Throttle implements Extension { - configuration: ThrottleConfiguration; - connectionsByIp: Map>; - bannedIps: Map; - cleanupInterval?: NodeJS.Timeout; - /** - * Constructor - */ - constructor(configuration?: Partial); - onDestroy(): Promise; - clearMaps(): void; - isBanned(ip: string): boolean; - /** - * Throttle requests - * @private - */ - private throttle; - /** - * onConnect hook - * @param data - */ - onConnect(data: onConnectPayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-webhook/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-webhook/src/index.d.ts deleted file mode 100644 index 2cc3456..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/extension-webhook/src/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { Extension, onChangePayload, onConnectPayload, onDisconnectPayload, onLoadDocumentPayload } from "@hocuspocus/server"; -import type { Transformer } from "@hocuspocus/transformer"; -import type { Doc } from "yjs"; -export declare enum Events { - onChange = "change", - onConnect = "connect", - onCreate = "create", - onDisconnect = "disconnect" -} -export interface Configuration { - debounce: number | false | null; - debounceMaxWait: number; - secret: string; - transformer: Transformer | { - toYdoc: (document: any) => Doc; - fromYdoc: (document: Doc) => any; - }; - url: string; - events: Array; -} -export declare class Webhook implements Extension { - configuration: Configuration; - debounced: Map; - /** - * Constructor - */ - constructor(configuration?: Partial); - /** - * Create a signature for the response body - */ - createSignature(body: string): string; - /** - * debounce the given function, using the given identifier - */ - debounce(id: string, func: Function): void; - /** - * Send a request to the given url containing the given data - */ - sendRequest(event: Events, payload: any): Promise>; - /** - * onChange hook - */ - onChange(data: onChangePayload): Promise; - /** - * onLoadDocument hook - */ - onLoadDocument(data: onLoadDocumentPayload): Promise; - /** - * onConnect hook - */ - onConnect(data: onConnectPayload): Promise; - onDisconnect(data: onDisconnectPayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/EventEmitter.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/EventEmitter.d.ts deleted file mode 100644 index df6b04e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/EventEmitter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default class EventEmitter { - callbacks: { - [key: string]: Function[]; - }; - on(event: string, fn: Function): this; - protected emit(event: string, ...args: any): this; - off(event: string, fn?: Function): this; - removeAllListeners(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/HocuspocusProvider.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/HocuspocusProvider.d.ts deleted file mode 100644 index 5f503fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/HocuspocusProvider.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -import type { Event, MessageEvent } from "ws"; -import { Awareness } from "y-protocols/awareness"; -import * as Y from "yjs"; -import EventEmitter from "./EventEmitter.ts"; -import type { CompleteHocuspocusProviderWebsocketConfiguration } from "./HocuspocusProviderWebsocket.ts"; -import { HocuspocusProviderWebsocket } from "./HocuspocusProviderWebsocket.ts"; -import type { AuthorizedScope, ConstructableOutgoingMessage, onAuthenticatedParameters, onAuthenticationFailedParameters, onAwarenessChangeParameters, onAwarenessUpdateParameters, onCloseParameters, onDisconnectParameters, onMessageParameters, onOpenParameters, onOutgoingMessageParameters, onStatelessParameters, onStatusParameters, onSyncedParameters, onUnsyncedChangesParameters } from "./types.ts"; -export type HocuspocusProviderConfiguration = Required> & Partial & ((Required> & Partial>) | Required>); -export interface CompleteHocuspocusProviderConfiguration { - /** - * The identifier/name of your document - */ - name: string; - /** - * The actual Y.js document - */ - document: Y.Doc; - /** - * An Awareness instance to keep the presence state of all clients. - * - * You can disable sharing awareness information by passing `null`. - * Note that having no awareness information shared across all connections will break our ping checks - * and thus trigger reconnects. You should always have at least one Provider with enabled awareness per - * socket connection, or ensure that the Provider receives messages before running into `HocuspocusProviderWebsocket.messageReconnectTimeout`. - */ - awareness: Awareness | null; - /** - * A token that’s sent to the backend for authentication purposes. - */ - token: string | (() => string) | (() => Promise) | null; - /** - * Hocuspocus websocket provider - */ - websocketProvider: HocuspocusProviderWebsocket; - /** - * Force syncing the document in the defined interval. - */ - forceSyncInterval: false | number; - onAuthenticated: (data: onAuthenticatedParameters) => void; - onAuthenticationFailed: (data: onAuthenticationFailedParameters) => void; - onOpen: (data: onOpenParameters) => void; - onConnect: () => void; - onStatus: (data: onStatusParameters) => void; - onMessage: (data: onMessageParameters) => void; - onOutgoingMessage: (data: onOutgoingMessageParameters) => void; - onSynced: (data: onSyncedParameters) => void; - onDisconnect: (data: onDisconnectParameters) => void; - onClose: (data: onCloseParameters) => void; - onDestroy: () => void; - onAwarenessUpdate: (data: onAwarenessUpdateParameters) => void; - onAwarenessChange: (data: onAwarenessChangeParameters) => void; - onStateless: (data: onStatelessParameters) => void; - onUnsyncedChanges: (data: onUnsyncedChangesParameters) => void; -} -export declare class AwarenessError extends Error { - code: number; -} -export declare class HocuspocusProvider extends EventEmitter { - configuration: CompleteHocuspocusProviderConfiguration; - isSynced: boolean; - unsyncedChanges: number; - isAuthenticated: boolean; - authorizedScope: AuthorizedScope | undefined; - manageSocket: boolean; - private _isAttached; - intervals: any; - constructor(configuration: HocuspocusProviderConfiguration); - boundDocumentUpdateHandler: (update: Uint8Array, origin: any) => void; - boundAwarenessUpdateHandler: ({ added, updated, removed }: any, origin: any) => void; - boundPageHide: () => void; - boundOnOpen: (event: Event) => Promise; - boundOnClose: () => void; - forwardConnect: () => this; - forwardStatus: (e: onStatusParameters) => this; - forwardClose: (e: onCloseParameters) => this; - forwardDisconnect: (e: onDisconnectParameters) => this; - forwardDestroy: () => this; - setConfiguration(configuration?: Partial): void; - get document(): Y.Doc; - get isAttached(): boolean; - get awareness(): Awareness | null; - get hasUnsyncedChanges(): boolean; - private resetUnsyncedChanges; - incrementUnsyncedChanges(): void; - decrementUnsyncedChanges(): void; - forceSync(): void; - pageHide(): void; - registerEventListeners(): void; - sendStateless(payload: string): void; - sendToken(): Promise; - documentUpdateHandler(update: Uint8Array, origin: any): void; - awarenessUpdateHandler({ added, updated, removed }: any, origin: any): void; - /** - * Indicates whether a first handshake with the server has been established - * - * Note: this does not mean all updates from the client have been persisted to the backend. For this, - * use `hasUnsyncedChanges`. - */ - get synced(): boolean; - set synced(state: boolean); - receiveStateless(payload: string): void; - connect(): Promise; - disconnect(): void; - onOpen(event: Event): Promise; - getToken(): Promise; - startSync(): void; - send(message: ConstructableOutgoingMessage, args: any): void; - onMessage(event: MessageEvent): void; - onClose(): void; - destroy(): void; - detach(): void; - attach(): void; - permissionDeniedHandler(reason: string): void; - authenticatedHandler(scope: string): void; - setAwarenessField(key: string, value: any): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts deleted file mode 100644 index 9f5a1da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -import type { Event, MessageEvent } from "ws"; -import EventEmitter from "./EventEmitter.ts"; -import type { HocuspocusProvider } from "./HocuspocusProvider.ts"; -import { WebSocketStatus, type onAwarenessChangeParameters, type onAwarenessUpdateParameters, type onCloseParameters, type onDisconnectParameters, type onMessageParameters, type onOpenParameters, type onOutgoingMessageParameters, type onStatusParameters } from "./types.ts"; -export type HocuspocusWebSocket = WebSocket & { - identifier: string; -}; -export type HocusPocusWebSocket = HocuspocusWebSocket; -export type HocuspocusProviderWebsocketConfiguration = Required> & Partial; -export interface CompleteHocuspocusProviderWebsocketConfiguration { - /** - * Whether to connect automatically when creating the provider instance. Default=true - */ - autoConnect: boolean; - /** - * URL of your @hocuspocus/server instance - */ - url: string; - /** - * By default, trailing slashes are removed from the URL. Set this to true - * to preserve trailing slashes if your server configuration requires them. - */ - preserveTrailingSlash: boolean; - /** - * An optional WebSocket polyfill, for example for Node.js - */ - WebSocketPolyfill: any; - /** - * Disconnect when no message is received for the defined amount of milliseconds. - */ - messageReconnectTimeout: number; - /** - * The delay between each attempt in milliseconds. You can provide a factor to have the delay grow exponentially. - */ - delay: number; - /** - * The initialDelay is the amount of time to wait before making the first attempt. This option should typically be 0 since you typically want the first attempt to happen immediately. - */ - initialDelay: number; - /** - * The factor option is used to grow the delay exponentially. - */ - factor: number; - /** - * The maximum number of attempts or 0 if there is no limit on number of attempts. - */ - maxAttempts: number; - /** - * minDelay is used to set a lower bound of delay when jitter is enabled. This property has no effect if jitter is disabled. - */ - minDelay: number; - /** - * The maxDelay option is used to set an upper bound for the delay when factor is enabled. A value of 0 can be provided if there should be no upper bound when calculating delay. - */ - maxDelay: number; - /** - * If jitter is true then the calculated delay will be a random integer value between minDelay and the calculated delay for the current iteration. - */ - jitter: boolean; - /** - * A timeout in milliseconds. If timeout is non-zero then a timer is set using setTimeout. If the timeout is triggered then future attempts will be aborted. - */ - timeout: number; - handleTimeout: (() => Promise) | null; - onOpen: (data: onOpenParameters) => void; - onConnect: () => void; - onMessage: (data: onMessageParameters) => void; - onOutgoingMessage: (data: onOutgoingMessageParameters) => void; - onStatus: (data: onStatusParameters) => void; - onDisconnect: (data: onDisconnectParameters) => void; - onClose: (data: onCloseParameters) => void; - onDestroy: () => void; - onAwarenessUpdate: (data: onAwarenessUpdateParameters) => void; - onAwarenessChange: (data: onAwarenessChangeParameters) => void; - /** - * Map of attached providers keyed by documentName. - */ - providerMap: Map; -} -export declare class HocuspocusProviderWebsocket extends EventEmitter { - private messageQueue; - configuration: CompleteHocuspocusProviderWebsocketConfiguration; - webSocket: HocusPocusWebSocket | null; - webSocketHandlers: { - [key: string]: any; - }; - shouldConnect: boolean; - status: WebSocketStatus; - lastMessageReceived: number; - identifier: number; - intervals: any; - connectionAttempt: { - resolve: (value?: any) => void; - reject: (reason?: any) => void; - } | null; - constructor(configuration: HocuspocusProviderWebsocketConfiguration); - receivedOnOpenPayload?: Event | undefined; - onOpen(event: Event): Promise; - attach(provider: HocuspocusProvider): void; - detach(provider: HocuspocusProvider): void; - setConfiguration(configuration?: Partial): void; - cancelWebsocketRetry?: () => void; - connect(): Promise; - attachWebSocketListeners(ws: HocusPocusWebSocket, reject: Function): void; - cleanupWebSocket(): void; - createWebSocketConnection(): Promise; - onMessage(event: MessageEvent): void; - resolveConnectionAttempt(): void; - stopConnectionAttempt(): void; - rejectConnectionAttempt(): void; - closeTries: number; - checkConnection(): void; - get serverUrl(): string; - get url(): string; - disconnect(): void; - send(message: any): void; - onClose({ event }: onCloseParameters): void; - destroy(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/IncomingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/IncomingMessage.d.ts deleted file mode 100644 index 8ce1ae6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/IncomingMessage.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import type { MessageType } from "./types.ts"; -export declare class IncomingMessage { - data: any; - encoder: Encoder; - decoder: Decoder; - constructor(data: any); - peekVarString(): string; - readVarUint(): MessageType; - readVarString(): string; - readVarUint8Array(): Uint8Array; - writeVarUint(type: MessageType): void; - writeVarString(string: string): void; - writeVarUint8Array(data: Uint8Array): void; - length(): number; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/MessageReceiver.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/MessageReceiver.d.ts deleted file mode 100644 index 06918ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/MessageReceiver.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { HocuspocusProvider } from "./HocuspocusProvider.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -export declare class MessageReceiver { - message: IncomingMessage; - constructor(message: IncomingMessage); - apply(provider: HocuspocusProvider, emitSynced: boolean): void; - private applySyncMessage; - applySyncStatusMessage(provider: HocuspocusProvider, applied: boolean): void; - private applyAwarenessMessage; - private applyAuthMessage; - private applyQueryAwarenessMessage; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/MessageSender.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/MessageSender.d.ts deleted file mode 100644 index 382772c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/MessageSender.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { ConstructableOutgoingMessage } from "./types.ts"; -export declare class MessageSender { - encoder: Encoder; - message: any; - constructor(Message: ConstructableOutgoingMessage, args?: any); - create(): Uint8Array; - send(webSocket: any): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessage.d.ts deleted file mode 100644 index 5b4db09..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { MessageType, OutgoingMessageArguments, OutgoingMessageInterface } from "./types.ts"; -export declare class OutgoingMessage implements OutgoingMessageInterface { - encoder: Encoder; - type?: MessageType; - constructor(); - get(args: Partial): Encoder | undefined; - toUint8Array(): Uint8Array; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts deleted file mode 100644 index 775990a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class AuthenticationMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts deleted file mode 100644 index b666f82..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class AwarenessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts deleted file mode 100644 index 7594c95..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class CloseMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts deleted file mode 100644 index eb37902..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class QueryAwarenessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts deleted file mode 100644 index 3349c73..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class StatelessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts deleted file mode 100644 index 55d1ea0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class SyncStepOneMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts deleted file mode 100644 index fa39f24..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class SyncStepTwoMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts deleted file mode 100644 index 3d5b4f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class UpdateMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/index.d.ts deleted file mode 100644 index c54d369..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./HocuspocusProvider.ts"; -export * from "./HocuspocusProviderWebsocket.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/types.d.ts deleted file mode 100644 index 3ef91a2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/provider/src/types.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { Event, MessageEvent } from "ws"; -import type { Awareness } from "y-protocols/awareness"; -import type * as Y from "yjs"; -import type { CloseEvent } from "@hocuspocus/common"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -import type { OutgoingMessage } from "./OutgoingMessage.ts"; -import type { AuthenticationMessage } from "./OutgoingMessages/AuthenticationMessage.ts"; -import type { AwarenessMessage } from "./OutgoingMessages/AwarenessMessage.ts"; -import type { QueryAwarenessMessage } from "./OutgoingMessages/QueryAwarenessMessage.ts"; -import type { SyncStepOneMessage } from "./OutgoingMessages/SyncStepOneMessage.ts"; -import type { SyncStepTwoMessage } from "./OutgoingMessages/SyncStepTwoMessage.ts"; -import type { UpdateMessage } from "./OutgoingMessages/UpdateMessage.ts"; -export declare enum MessageType { - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - Stateless = 5, - CLOSE = 7, - SyncStatus = 8 -} -export declare enum WebSocketStatus { - Connecting = "connecting", - Connected = "connected", - Disconnected = "disconnected" -} -export type AuthorizedScope = "read-write" | "readonly"; -export interface OutgoingMessageInterface { - encoder: Encoder; - type?: MessageType; -} -export interface OutgoingMessageArguments { - documentName: string; - token: string; - document: Y.Doc; - awareness: Awareness; - clients: number[]; - states: Map; - update: any; - payload: string; - encoder: Encoder; -} -export interface Constructable { - new (...args: any): T; -} -export type ConstructableOutgoingMessage = Constructable | Constructable | Constructable | Constructable | Constructable | Constructable; -export type onAuthenticationFailedParameters = { - reason: string; -}; -export type onAuthenticatedParameters = { - scope: AuthorizedScope; -}; -export type onOpenParameters = { - event: Event; -}; -export type onMessageParameters = { - event: MessageEvent; - message: IncomingMessage; -}; -export type onOutgoingMessageParameters = { - message: OutgoingMessage; -}; -export type onStatusParameters = { - status: WebSocketStatus; -}; -export type onSyncedParameters = { - state: boolean; -}; -export type onUnsyncedChangesParameters = { - number: number; -}; -export type onDisconnectParameters = { - event: CloseEvent; -}; -export type onCloseParameters = { - event: CloseEvent; -}; -export type onAwarenessUpdateParameters = { - states: StatesArray; -}; -export type onAwarenessChangeParameters = { - states: StatesArray; -}; -export type onStatelessParameters = { - payload: string; -}; -export type StatesArray = { - clientId: number; - [key: string | number]: any; -}[]; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/ClientConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/ClientConnection.d.ts deleted file mode 100644 index 93bb471..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/ClientConnection.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import { type CloseEvent } from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { onDisconnectPayload } from "./types.ts"; -/** - * The `ClientConnection` class is responsible for handling an incoming WebSocket - * - * TODO-refactor: - * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts - */ -export declare class ClientConnection { - private readonly websocket; - private readonly request; - private readonly documentProvider; - private readonly hooks; - private readonly opts; - private readonly defaultContext; - private readonly documentConnections; - private readonly incomingMessageQueue; - private readonly documentConnectionsEstablished; - private readonly hookPayloads; - private readonly callbacks; - private readonly socketId; - timeout: number; - pingInterval: NodeJS.Timeout; - pongReceived: boolean; - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it’ll fully establish the connection and - * load the Document then. - */ - constructor(websocket: WebSocket, request: IncomingMessage, documentProvider: { - createDocument: Hocuspocus["createDocument"]; - }, hooks: Hocuspocus["hooks"], opts: { - timeout: number; - }, defaultContext?: any); - private handleWebsocketClose; - close(event?: CloseEvent): void; - handlePong: () => void; - /** - * Check if pong was received and close the connection otherwise - * @private - */ - private check; - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, payload: onDisconnectPayload) => void): ClientConnection; - /** - * Create a new connection by the given request and document - */ - private createConnection; - private setUpNewConnection; - private handleQueueingMessage; - private messageHandler; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Connection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Connection.d.ts deleted file mode 100644 index ca8fa8c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Connection.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { IncomingMessage as HTTPIncomingMessage } from "node:http"; -import { type CloseEvent } from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type Document from "./Document.ts"; -import type { beforeSyncPayload, onStatelessPayload } from "./types.ts"; -export declare class Connection { - webSocket: WebSocket; - context: any; - document: Document; - request: HTTPIncomingMessage; - callbacks: { - onClose: ((document: Document, event?: CloseEvent) => void)[]; - beforeHandleMessage: (connection: Connection, update: Uint8Array) => Promise; - beforeSync: (connection: Connection, payload: Pick) => Promise; - statelessCallback: (payload: onStatelessPayload) => Promise; - onTokenSyncCallback: (payload: { - token: string; - }) => Promise; - }; - socketId: string; - readOnly: boolean; - /** - * Constructor. - */ - constructor(connection: WebSocket, request: HTTPIncomingMessage, document: Document, socketId: string, context: any, readOnly?: boolean); - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, event?: CloseEvent) => void): Connection; - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback(callback: (payload: onStatelessPayload) => Promise): Connection; - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage(callback: (connection: Connection, update: Uint8Array) => Promise): Connection; - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync(callback: (connection: Connection, payload: Pick) => Promise): Connection; - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback(callback: (payload: { - token: string; - }) => Promise): Connection; - /** - * Send the given message - */ - send(message: any): void; - /** - * Send a stateless message with payload - */ - sendStateless(payload: string): void; - /** - * Request current token from the client - */ - requestToken(): void; - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event?: CloseEvent): void; - /** - * Send the current document awareness to the client, if any - * @private - */ - private sendCurrentAwareness; - /** - * Handle an incoming message - * @public - */ - handleMessage(data: Uint8Array): void; -} -export default Connection; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/DirectConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/DirectConnection.d.ts deleted file mode 100644 index a1be911..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/DirectConnection.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { DirectConnection as DirectConnectionInterface } from "./types.ts"; -export declare class DirectConnection implements DirectConnectionInterface { - document: Document | null; - instance: Hocuspocus; - context: any; - /** - * Constructor. - */ - constructor(document: Document, instance: Hocuspocus, context?: any); - transact(transaction: (document: Document) => void): Promise; - disconnect(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Document.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Document.d.ts deleted file mode 100644 index 57faea7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Document.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { Mutex } from "async-mutex"; -import type WebSocket from "ws"; -import { Awareness } from "y-protocols/awareness"; -import { Doc } from "yjs"; -import type Connection from "./Connection.ts"; -export declare class Document extends Doc { - awareness: Awareness; - callbacks: { - onUpdate: (document: Document, connection: Connection, update: Uint8Array) => void; - beforeBroadcastStateless: (document: Document, stateless: string) => void; - }; - connections: Map; - connection: Connection; - }>; - directConnectionsCount: number; - name: string; - isLoading: boolean; - isDestroyed: boolean; - saveMutex: Mutex; - lastChangeTime: number; - /** - * Constructor. - */ - constructor(name: string, yDocOptions?: object); - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName: string): boolean; - /** - * Merge the given document(s) into this one - */ - merge(documents: Doc | Array): Document; - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate(callback: (document: Document, connection: Connection, update: Uint8Array) => void): Document; - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless(callback: (document: Document, stateless: string) => void): Document; - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection: Connection): Document; - /** - * Is the given connection registered on this document - */ - hasConnection(connection: Connection): boolean; - /** - * Remove the given connection from this document - */ - removeConnection(connection: Connection): Document; - addDirectConnection(): Document; - removeDirectConnection(): Document; - /** - * Get the number of active connections for this document - */ - getConnectionsCount(): number; - /** - * Get an array of registered connections - */ - getConnections(): Array; - /** - * Get the client ids for the given connection instance - */ - getClients(connectionInstance: WebSocket): Set; - /** - * Has the document awareness states - */ - hasAwarenessStates(): boolean; - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection: Connection, update: Uint8Array): Document; - /** - * Handle an awareness update and sync changes to clients - * @private - */ - private handleAwarenessUpdate; - /** - * Handle an updated document and sync changes to clients - */ - private handleUpdate; - /** - * Broadcast stateless message to all connections - */ - broadcastStateless(payload: string, filter?: (conn: Connection) => boolean): void; - destroy(): void; -} -export default Document; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Hocuspocus.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Hocuspocus.d.ts deleted file mode 100644 index fa1684f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Hocuspocus.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import type WebSocket from "ws"; -import { DirectConnection } from "./DirectConnection.ts"; -import Document from "./Document.ts"; -import type { Server } from "./Server.ts"; -import type { Configuration, ConnectionConfiguration, HookName, HookPayloadByName, onStoreDocumentPayload } from "./types.ts"; -export declare const defaultConfiguration: { - name: null; - timeout: number; - debounce: number; - maxDebounce: number; - quiet: boolean; - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; - unloadImmediately: boolean; -}; -export declare class Hocuspocus { - configuration: Configuration; - loadingDocuments: Map>; - unloadingDocuments: Map>; - documents: Map; - server?: Server; - debouncer: { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; - }; - constructor(configuration?: Partial); - /** - * Configure Hocuspocus - */ - configure(configuration: Partial): Hocuspocus; - /** - * Get the total number of active documents - */ - getDocumentsCount(): number; - /** - * Get the total number of active connections - */ - getConnectionsCount(): number; - /** - * Force close one or more connections - */ - closeConnections(documentName?: string): void; - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it’ll fully establish the connection and - * load the Document then. - */ - handleConnection(incoming: WebSocket, request: IncomingMessage, defaultContext?: any): void; - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - private handleDocumentUpdate; - /** - * Create a new document by the given request - */ - createDocument(documentName: string, request: Partial>, socketId: string, connection: ConnectionConfiguration, context?: any): Promise; - loadDocument(documentName: string, request: Partial>, socketId: string, connectionConfig: ConnectionConfiguration, context?: any): Promise; - storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload, immediately?: boolean): Promise; - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - hooks(name: T, payload: HookPayloadByName[T], callback?: Function | null): Promise; - shouldUnloadDocument(document: Document): boolean; - unloadDocument(document: Document): Promise; - openDirectConnection(documentName: string, context?: any): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/IncomingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/IncomingMessage.d.ts deleted file mode 100644 index 639bbdf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/IncomingMessage.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import type { MessageType } from "./types.ts"; -export declare class IncomingMessage { - /** - * Access to the received message. - */ - decoder: Decoder; - /** - * Private encoder; can be undefined. - * - * Lazy creation of the encoder speeds up IncomingMessages that need only a decoder. - */ - private encoderInternal?; - constructor(input: any); - get encoder(): Encoder; - readVarUint8Array(): Uint8Array; - peekVarUint8Array(): Uint8Array; - readVarUint(): number; - readVarString(): string; - toUint8Array(): Uint8Array; - writeVarUint(type: MessageType): void; - writeVarString(string: string): void; - get length(): number; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/MessageReceiver.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/MessageReceiver.d.ts deleted file mode 100644 index 6d864ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/MessageReceiver.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -export declare class MessageReceiver { - message: IncomingMessage; - defaultTransactionOrigin?: string; - constructor(message: IncomingMessage, defaultTransactionOrigin?: string); - apply(document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): void; - readSyncMessage(message: IncomingMessage, document: Document, connection?: Connection, reply?: (message: Uint8Array) => void, requestFirstSync?: boolean): 0 | 2 | 1; - applyQueryAwarenessMessage(document: Document, reply?: (message: Uint8Array) => void): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/OutgoingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/OutgoingMessage.d.ts deleted file mode 100644 index e4f9be2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/OutgoingMessage.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { Awareness } from "y-protocols/awareness"; -import type Document from "./Document.ts"; -export declare class OutgoingMessage { - encoder: Encoder; - type?: number; - category?: string; - constructor(documentName: string); - createSyncMessage(): OutgoingMessage; - createSyncReplyMessage(): OutgoingMessage; - createAwarenessUpdateMessage(awareness: Awareness, changedClients?: Array): OutgoingMessage; - writeQueryAwareness(): OutgoingMessage; - writeTokenSyncRequest(): OutgoingMessage; - writeAuthenticated(readonly: boolean): OutgoingMessage; - writePermissionDenied(reason: string): OutgoingMessage; - writeFirstSyncStepFor(document: Document): OutgoingMessage; - writeUpdate(update: Uint8Array): OutgoingMessage; - writeStateless(payload: string): OutgoingMessage; - writeBroadcastStateless(payload: string): OutgoingMessage; - writeSyncStatus(updateSaved: boolean): OutgoingMessage; - writeCloseMessage(reason: string): OutgoingMessage; - toUint8Array(): Uint8Array; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Server.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Server.d.ts deleted file mode 100644 index a1df4ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/Server.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { Server as HTTPServer, IncomingMessage, ServerResponse } from "node:http"; -import { WebSocketServer } from "ws"; -import type { AddressInfo, ServerOptions } from "ws"; -import { Hocuspocus } from "./Hocuspocus.ts"; -import type { Configuration } from "./types.ts"; -export interface ServerConfiguration extends Configuration { - port?: number; - address?: string; - stopOnSignals?: boolean; -} -export declare const defaultServerConfiguration: { - port: number; - address: string; - stopOnSignals: boolean; -}; -export declare class Server { - httpServer: HTTPServer; - webSocketServer: WebSocketServer; - hocuspocus: Hocuspocus; - configuration: ServerConfiguration; - constructor(configuration?: Partial, websocketOptions?: ServerOptions); - setupWebsocketConnection: () => void; - setupHttpUpgrade: () => void; - requestHandler: (request: IncomingMessage, response: ServerResponse) => Promise; - listen(port?: number, callback?: any): Promise; - get address(): AddressInfo; - destroy(): Promise; - get URL(): string; - get webSocketURL(): string; - get httpURL(): string; - private showStartScreen; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/index.d.ts deleted file mode 100644 index 8ede6d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from "./Connection.ts"; -export * from "./Document.ts"; -export * from "./Hocuspocus.ts"; -export * from "./IncomingMessage.ts"; -export * from "./MessageReceiver.ts"; -export * from "./OutgoingMessage.ts"; -export * from "./Server.ts"; -export * from "./types.ts"; -export * from "./util/debounce.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/types.d.ts deleted file mode 100644 index 615cacc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/types.d.ts +++ /dev/null @@ -1,342 +0,0 @@ -import type { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "node:http"; -import type { URLSearchParams } from "node:url"; -import type { Awareness } from "y-protocols/awareness"; -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -export declare enum MessageType { - Unknown = -1, - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - SyncReply = 4,// same as Sync, but won't trigger another 'SyncStep1' - Stateless = 5, - BroadcastStateless = 6, - CLOSE = 7, - SyncStatus = 8 -} -export interface AwarenessUpdate { - added: Array; - updated: Array; - removed: Array; -} -export interface ConnectionConfiguration { - readOnly: boolean; - isAuthenticated: boolean; -} -export interface Extension { - priority?: number; - extensionName?: string; - onConfigure?(data: onConfigurePayload): Promise; - onListen?(data: onListenPayload): Promise; - onUpgrade?(data: onUpgradePayload): Promise; - onConnect?(data: onConnectPayload): Promise; - connected?(data: connectedPayload): Promise; - onAuthenticate?(data: onAuthenticatePayload): Promise; - onTokenSync?(data: onTokenSyncPayload): Promise; - onCreateDocument?(data: onCreateDocumentPayload): Promise; - onLoadDocument?(data: onLoadDocumentPayload): Promise; - afterLoadDocument?(data: afterLoadDocumentPayload): Promise; - beforeHandleMessage?(data: beforeHandleMessagePayload): Promise; - beforeSync?(data: beforeSyncPayload): Promise; - beforeBroadcastStateless?(data: beforeBroadcastStatelessPayload): Promise; - onStateless?(payload: onStatelessPayload): Promise; - onChange?(data: onChangePayload): Promise; - onStoreDocument?(data: onStoreDocumentPayload): Promise; - afterStoreDocument?(data: afterStoreDocumentPayload): Promise; - onAwarenessUpdate?(data: onAwarenessUpdatePayload): Promise; - onRequest?(data: onRequestPayload): Promise; - onDisconnect?(data: onDisconnectPayload): Promise; - beforeUnloadDocument?(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument?(data: afterUnloadDocumentPayload): Promise; - onDestroy?(data: onDestroyPayload): Promise; -} -export type HookName = "onConfigure" | "onListen" | "onUpgrade" | "onConnect" | "connected" | "onAuthenticate" | "onTokenSync" | "onCreateDocument" | "onLoadDocument" | "afterLoadDocument" | "beforeHandleMessage" | "beforeBroadcastStateless" | "beforeSync" | "onStateless" | "onChange" | "onStoreDocument" | "afterStoreDocument" | "onAwarenessUpdate" | "onRequest" | "onDisconnect" | "beforeUnloadDocument" | "afterUnloadDocument" | "onDestroy"; -export type HookPayloadByName = { - onConfigure: onConfigurePayload; - onListen: onListenPayload; - onUpgrade: onUpgradePayload; - onConnect: onConnectPayload; - connected: connectedPayload; - onAuthenticate: onAuthenticatePayload; - onTokenSync: onTokenSyncPayload; - onCreateDocument: onCreateDocumentPayload; - onLoadDocument: onLoadDocumentPayload; - afterLoadDocument: afterLoadDocumentPayload; - beforeHandleMessage: beforeHandleMessagePayload; - beforeBroadcastStateless: beforeBroadcastStatelessPayload; - beforeSync: beforeSyncPayload; - onStateless: onStatelessPayload; - onChange: onChangePayload; - onStoreDocument: onStoreDocumentPayload; - afterStoreDocument: afterStoreDocumentPayload; - onAwarenessUpdate: onAwarenessUpdatePayload; - onRequest: onRequestPayload; - onDisconnect: onDisconnectPayload; - afterUnloadDocument: afterUnloadDocumentPayload; - beforeUnloadDocument: beforeUnloadDocumentPayload; - onDestroy: onDestroyPayload; -}; -export interface Configuration extends Extension { - /** - * A name for the instance, used for logging. - */ - name: string | null; - /** - * A list of hocuspocus extensions. - */ - extensions: Array; - /** - * Defines in which interval the server sends a ping, and closes the connection when no pong is sent back. - */ - timeout: number; - /** - * Debounces the call of the `onStoreDocument` hook for the given amount of time in ms. - * Otherwise every single update would be persisted. - */ - debounce: number; - /** - * Makes sure to call `onStoreDocument` at least in the given amount of time (ms). - */ - maxDebounce: number; - /** - * By default, the servers show a start screen. If passed false, the server will start quietly. - */ - quiet: boolean; - /** - * If set to false, respects the debounce time of `onStoreDocument` before unloading a document. - * Otherwise, the document will be unloaded immediately. - * - * This prevents a client from DOSing the server by repeatedly connecting and disconnecting when - * your onStoreDocument is rate-limited. - */ - unloadImmediately: boolean; - /** - * options to pass to the ydoc document - */ - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; -} -export interface onStatelessPayload { - connection: Connection; - documentName: string; - document: Document; - payload: string; -} -export interface onAuthenticatePayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - request: IncomingMessage; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; -} -export interface onTokenSyncPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} -export interface onCreateDocumentPayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface onConnectPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface connectedPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} -export interface onLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface afterLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface onChangePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - transactionOrigin: any; -} -export interface beforeHandleMessagePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - connection: Connection; -} -export interface beforeSyncPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - connection: Connection; - /** - * The y-protocols/sync message type - * @example - * 0: SyncStep1 - * 1: SyncStep2 - * 2: YjsUpdate - * - * @see https://github.com/yjs/y-protocols/blob/master/sync.js#L13-L40 - */ - type: number; - /** - * The payload of the y-sync message. - */ - payload: Uint8Array; -} -export interface beforeBroadcastStatelessPayload { - document: Document; - documentName: string; - payload: string; -} -export interface onStoreDocumentPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - transactionOrigin?: any; -} -export interface afterStoreDocumentPayload extends onStoreDocumentPayload { -} -export interface onAwarenessUpdatePayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - added: number[]; - updated: number[]; - removed: number[]; - awareness: Awareness; - states: StatesArray; -} -export type StatesArray = { - clientId: number; - [key: string | number]: any; -}[]; -export interface fetchPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface storePayload extends onStoreDocumentPayload { - state: Buffer; -} -export interface onDisconnectPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; -} -export interface onRequestPayload { - request: IncomingMessage; - response: ServerResponse; - instance: Hocuspocus; -} -export interface onUpgradePayload { - request: IncomingMessage; - socket: any; - head: any; - instance: Hocuspocus; -} -export interface onListenPayload { - instance: Hocuspocus; - configuration: Configuration; - port: number; -} -export interface onDestroyPayload { - instance: Hocuspocus; -} -export interface onConfigurePayload { - instance: Hocuspocus; - configuration: Configuration; - version: string; -} -export interface afterUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; -} -export interface beforeUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; - document: Document; -} -export interface DirectConnection { - transact(transaction: (document: Document) => void): Promise; - disconnect(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/util/debounce.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/util/debounce.d.ts deleted file mode 100644 index 4573cfd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/util/debounce.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare const useDebounce: () => { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/util/getParameters.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/util/getParameters.d.ts deleted file mode 100644 index a0100ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/server/src/util/getParameters.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import { URLSearchParams } from "node:url"; -/** - * Get parameters by the given request - */ -export declare function getParameters(request?: Pick): URLSearchParams; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/Prosemirror.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/Prosemirror.d.ts deleted file mode 100644 index 06db1a6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/Prosemirror.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Doc } from "yjs"; -import { Schema } from "@tiptap/pm/model"; -import type { Transformer } from "./types.ts"; -declare class Prosemirror implements Transformer { - defaultSchema: Schema; - schema(schema: Schema): Prosemirror; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, schema?: Schema): Doc; -} -export declare const ProsemirrorTransformer: Prosemirror; -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/Tiptap.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/Tiptap.d.ts deleted file mode 100644 index 3d64c14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/Tiptap.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Doc } from "yjs"; -import type { Extensions } from "@tiptap/core"; -import type { Transformer } from "./types.ts"; -export declare class Tiptap implements Transformer { - defaultExtensions: Extensions; - extensions(extensions: Extensions): Tiptap; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, extensions?: Extensions): Doc; -} -export declare const TiptapTransformer: Tiptap; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/index.d.ts deleted file mode 100644 index a8debe5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./Prosemirror.ts"; -export * from "./Tiptap.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/types.d.ts deleted file mode 100644 index 1c2f6da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/packages/transformer/src/types.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Doc } from "yjs"; -export interface Transformer { - fromYdoc: (document: Doc, fieldName?: string | Array) => any; - toYdoc: (document: any, fieldName: string) => Doc; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/default.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/default.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/deno.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/deno.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/deno.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/express.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/express.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/express.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/hono.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/hono.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/hono.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/koa.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/koa.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/koa.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/load-document.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/load-document.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/load-document.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/redis.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/redis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/s3-redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/s3-redis.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/s3-redis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/s3.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/s3.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/s3.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/slow.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/slow.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/slow.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/tiptapcollab.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/tiptapcollab.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/tiptapcollab.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/webhook.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/webhook.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/backend/src/webhook.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/app/SocketContext1.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/app/SocketContext1.d.ts deleted file mode 100644 index d0725fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/app/SocketContext1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { HocuspocusProviderWebsocket } from "@hocuspocus/provider"; -export declare const SocketContext1: import("react").Context; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/app/SocketContext2.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/app/SocketContext2.d.ts deleted file mode 100644 index ac4da99..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/app/SocketContext2.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { HocuspocusProviderWebsocket } from "@hocuspocus/provider"; -export declare const SocketContext2: import("react").Context; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/next.config.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/next.config.d.ts deleted file mode 100644 index 2821dfb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/playground/frontend/next.config.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { NextConfig } from "next"; -declare const nextConfig: NextConfig; -export default nextConfig; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-database/fetch.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-database/fetch.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-database/fetch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-logger/onListen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-logger/onListen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-logger/onListen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onAwarenessChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onAwarenessChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onAwarenessChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-redis/onStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-s3/fetch.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-s3/fetch.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-s3/fetch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-throttle/banning.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-throttle/banning.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-throttle/banning.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-throttle/configuration.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-throttle/configuration.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/extension-throttle/configuration.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/hasUnsyncedChanges.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/hasUnsyncedChanges.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/hasUnsyncedChanges.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/observe.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/observe.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/observe.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/observeDeep.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/observeDeep.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/observeDeep.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAuthenticated.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAuthenticated.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAuthenticated.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAuthenticationFailed.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAuthenticationFailed.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAuthenticationFailed.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAwarenessChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAwarenessChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAwarenessChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAwarenessUpdate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAwarenessUpdate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onAwarenessUpdate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onClose.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onClose.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onClose.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onConnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onConnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onConnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onDisconnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onDisconnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onDisconnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onMessage.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onMessage.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onOpen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onOpen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onOpen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onSynced.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onSynced.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/provider/onSynced.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/providerwebsocket/configuration.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/providerwebsocket/configuration.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/providerwebsocket/configuration.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/address.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/address.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/address.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterLoadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterLoadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterLoadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterUnloadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterUnloadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/afterUnloadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeBroadcastStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeBroadcastStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeBroadcastStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeHandleMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeHandleMessage.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeHandleMessage.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeSync.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeSync.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeSync.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeUnloadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeUnloadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/beforeUnloadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/closeConnections.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/closeConnections.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/closeConnections.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/getConnectionsCount.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/getConnectionsCount.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/getConnectionsCount.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/getDocumentsCount.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/getDocumentsCount.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/getDocumentsCount.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/listen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/listen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/listen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onAuthenticate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onAuthenticate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onAuthenticate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onAwarenessUpdate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onAwarenessUpdate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onAwarenessUpdate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onClose.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onClose.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onClose.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onConfigure.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onConfigure.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onConfigure.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onConnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onConnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onConnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onDestroy.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onDestroy.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onDestroy.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onDisconnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onDisconnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onDisconnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onListen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onListen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onListen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onLoadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onLoadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onLoadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onRequest.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onRequest.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onRequest.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onTokenSync.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onTokenSync.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onTokenSync.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onUpgrade.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onUpgrade.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/onUpgrade.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/openDirectConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/openDirectConnection.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/openDirectConnection.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/websocketError.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/websocketError.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/server/websocketError.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/transformer/TiptapTransformer.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/transformer/TiptapTransformer.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/transformer/TiptapTransformer.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/createDirectory.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/createDirectory.d.ts deleted file mode 100644 index 7affbc2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/createDirectory.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const createDirectory: (dir: string) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/flushRedis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/flushRedis.d.ts deleted file mode 100644 index 5a548da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/flushRedis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const flushRedis: () => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/index.d.ts deleted file mode 100644 index 789d5d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from './createDirectory.ts'; -export * from './flushRedis.ts'; -export * from './newHocuspocus.ts'; -export * from './newHocuspocusProvider.ts'; -export * from './newHocuspocusProviderWebsocket.ts'; -export * from './randomInteger.ts'; -export * from './redisConnectionSettings.ts'; -export * from './removeDirectory.ts'; -export * from './sleep.ts'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocus.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocus.d.ts deleted file mode 100644 index c3de52e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocus.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { ServerConfiguration } from '@hocuspocus/server'; -export declare const newHocuspocus: (options?: Partial) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocusProvider.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocusProvider.d.ts deleted file mode 100644 index 09e3f10..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocusProvider.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { HocuspocusProvider, type HocuspocusProviderConfiguration, type HocuspocusProviderWebsocket, type HocuspocusProviderWebsocketConfiguration } from '@hocuspocus/provider'; -import type { Hocuspocus } from '@hocuspocus/server'; -export declare const newHocuspocusProvider: (server: Hocuspocus, options?: Partial, websocketOptions?: Partial, websocketProvider?: HocuspocusProviderWebsocket) => HocuspocusProvider; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts deleted file mode 100644 index 97bb454..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HocuspocusProviderWebsocketConfiguration } from '@hocuspocus/provider'; -import { HocuspocusProviderWebsocket } from '@hocuspocus/provider'; -import type { Hocuspocus } from '@hocuspocus/server'; -export declare const newHocuspocusProviderWebsocket: (hocuspocus: Hocuspocus, options?: Partial>) => HocuspocusProviderWebsocket; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/randomInteger.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/randomInteger.d.ts deleted file mode 100644 index b28e7b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/randomInteger.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const randomInteger: (min: number, max: number) => number; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/redisConnectionSettings.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/redisConnectionSettings.d.ts deleted file mode 100644 index 52c31fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/redisConnectionSettings.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const redisConnectionSettings: { - host: string; - port: number; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/removeDirectory.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/removeDirectory.d.ts deleted file mode 100644 index 71b4ffc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/removeDirectory.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const removeDirectory: (dir: string) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/retryableAssertion.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/retryableAssertion.d.ts deleted file mode 100644 index 1016874..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/retryableAssertion.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { ExecutionContext } from 'ava'; -export declare const retryableAssertion: (t: ExecutionContext, recoverableTry: (tt: ExecutionContext) => void) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/sleep.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/sleep.d.ts deleted file mode 100644 index 2450ca0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/tests/utils/sleep.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const sleep: (time: number) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0ecdsa-generate-keypair b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0ecdsa-generate-keypair deleted file mode 100755 index aa26e53..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0ecdsa-generate-keypair +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0gentesthtml b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0gentesthtml deleted file mode 100755 index 32e77b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0gentesthtml +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0serve b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0serve deleted file mode 100755 index 8a07fe1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0serve +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0serve.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0serve.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/package.json b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/package.json deleted file mode 100644 index 92720f4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "@hocuspocus/server", - "description": "plug & play collaboration backend", - "version": "3.4.4", - "homepage": "https://hocuspocus.dev", - "keywords": [ - "hocuspocus", - "yjs", - "yjs-websocket", - "prosemirror" - ], - "license": "MIT", - "type": "module", - "main": "dist/hocuspocus-server.cjs", - "module": "dist/hocuspocus-server.esm.js", - "types": "dist/packages/server/src/index.d.ts", - "exports": { - "source": { - "import": "./src/index.ts" - }, - "default": { - "import": "./dist/hocuspocus-server.esm.js", - "require": "./dist/hocuspocus-server.cjs", - "types": "./dist/packages/server/src/index.d.ts" - } - }, - "files": [ - "src", - "dist" - ], - "dependencies": { - "@hocuspocus/common": "^3.4.4", - "async-lock": "^1.3.1", - "async-mutex": "^0.5.0", - "kleur": "^4.1.4", - "lib0": "^0.2.47", - "ws": "^8.5.0" - }, - "devDependencies": { - "@types/async-lock": "^1.1.3", - "@types/ws": "^8.5.3" - }, - "peerDependencies": { - "y-protocols": "^1.0.6", - "yjs": "^13.6.8" - }, - "gitHead": "b3454a4ca289a84ddfb7fa5607a2d4b8d5c37e9d", - "repository": { - "url": "https://github.com/ueberdosis/hocuspocus" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/ClientConnection.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/ClientConnection.ts deleted file mode 100644 index 0e123e6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/ClientConnection.ts +++ /dev/null @@ -1,435 +0,0 @@ -import crypto from "node:crypto"; -import type { IncomingHttpHeaders, IncomingMessage } from "node:http"; -import type { URLSearchParams } from "node:url"; -import { - type CloseEvent, - ConnectionTimeout, - Forbidden, - ResetConnection, - Unauthorized, - WsReadyStates, -} from "@hocuspocus/common"; -import * as decoding from "lib0/decoding"; -import type WebSocket from "ws"; -import Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import { IncomingMessage as SocketIncomingMessage } from "./IncomingMessage.ts"; -import { OutgoingMessage } from "./OutgoingMessage.ts"; -import type { - ConnectionConfiguration, - beforeHandleMessagePayload, - beforeSyncPayload, - onDisconnectPayload, -} from "./types.ts"; -import { MessageType } from "./types.ts"; -import { getParameters } from "./util/getParameters.ts"; - -/** - * The `ClientConnection` class is responsible for handling an incoming WebSocket - * - * TODO-refactor: - * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts - */ -export class ClientConnection { - // this map indicates whether a `Connection` instance has already taken over for incoming message for the key (i.e. documentName) - private readonly documentConnections: Record = {}; - - // While the connection will be establishing messages will - // be queued and handled later. - private readonly incomingMessageQueue: Record = {}; - - // While the connection is establishing, kee - private readonly documentConnectionsEstablished = new Set(); - - // hooks payload by Document - private readonly hookPayloads: Record< - string, - { - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - context: any; - } - > = {}; - - private readonly callbacks = { - onClose: [(document: Document, payload: onDisconnectPayload) => {}], - }; - - // Every new connection gets a unique identifier. - private readonly socketId = crypto.randomUUID(); - - timeout: number; - - pingInterval: NodeJS.Timeout; - - pongReceived = true; - - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it’ll fully establish the connection and - * load the Document then. - */ - constructor( - private readonly websocket: WebSocket, - private readonly request: IncomingMessage, - private readonly documentProvider: { - createDocument: Hocuspocus["createDocument"]; - }, - // TODO: change to events - private readonly hooks: Hocuspocus["hooks"], - private readonly opts: { - timeout: number; - }, - private readonly defaultContext: any = {}, - ) { - this.timeout = opts.timeout; - this.pingInterval = setInterval(this.check, this.timeout); - websocket.on("pong", this.handlePong); - - websocket.on("message", this.messageHandler); - websocket.once("close", this.handleWebsocketClose); - } - - private handleWebsocketClose = (code: number, reason: Buffer) => { - this.close({ code, reason: reason.toString() }); - this.websocket.removeListener("message", this.messageHandler); - this.websocket.removeListener("pong", this.handlePong); - clearInterval(this.pingInterval); - }; - - close(event?: CloseEvent) { - Object.values(this.documentConnections).forEach((connection) => - connection.close(event), - ); - } - - handlePong = () => { - this.pongReceived = true; - }; - - /** - * Check if pong was received and close the connection otherwise - * @private - */ - private check = () => { - if (!this.pongReceived) { - return this.close(ConnectionTimeout); - } - - this.pongReceived = false; - - try { - this.websocket.ping(); - } catch (error) { - this.close(ConnectionTimeout); - } - }; - - /** - * Set a callback that will be triggered when the connection is closed - */ - public onClose( - callback: (document: Document, payload: onDisconnectPayload) => void, - ): ClientConnection { - this.callbacks.onClose.push(callback); - - return this; - } - - /** - * Create a new connection by the given request and document - */ - private createConnection( - connection: WebSocket, - document: Document, - ): Connection { - const hookPayload = this.hookPayloads[document.name]; - const instance = new Connection( - connection, - hookPayload.request, - document, - hookPayload.socketId, - hookPayload.context, - hookPayload.connectionConfig.readOnly, - ); - - instance.onClose(async (document, event) => { - const disconnectHookPayload: onDisconnectPayload = { - instance: this.documentProvider as Hocuspocus, // TODO, this will be removed when we use events instead of hooks for this class - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request), - }; - - await this.hooks("onDisconnect", disconnectHookPayload); - this.callbacks.onClose.forEach((callback) => - callback(document, disconnectHookPayload), - ); - }); - - instance.onStatelessCallback(async (payload) => { - try { - return await this.hooks("onStateless", payload); - } catch (error: any) { - if (error?.message) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if an error is present - // just rethrow it - throw error; - } - } - }); - - instance.beforeHandleMessage((connection, update) => { - const beforeHandleMessagePayload: beforeHandleMessagePayload = { - instance: this.documentProvider as Hocuspocus, // TODO, this will be removed when we use events instead of hooks for this class - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - connection, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request), - update, - }; - - return this.hooks("beforeHandleMessage", beforeHandleMessagePayload); - }); - - instance.beforeSync((connection, payload) => { - const beforeSyncPayload: beforeSyncPayload = { - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - documentName: document.name, - connection, - type: payload.type, - payload: payload.payload, - }; - - return this.hooks("beforeSync", beforeSyncPayload); - }); - - return instance; - } - - // Once all hooks are run, we’ll fully establish the connection: - private setUpNewConnection = async (documentName: string) => { - const hookPayload = this.hookPayloads[documentName]; - // If no hook interrupts, create a document and connection - const document = await this.documentProvider.createDocument( - documentName, - hookPayload.request, - hookPayload.socketId, - hookPayload.connectionConfig, - hookPayload.context, - ); - const connection = this.createConnection(this.websocket, document); - - connection.onClose((document, event) => { - delete this.hookPayloads[documentName]; - delete this.documentConnections[documentName]; - delete this.incomingMessageQueue[documentName]; - this.documentConnectionsEstablished.delete(documentName); - }); - - connection.onTokenSyncCallback(async (payload) => { - try { - return await this.hooks( - "onTokenSync", - { - ...hookPayload, - ...payload, - connection, - document, - documentName, - }, - (contextAdditions: any) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }, - ); - } catch (err: any) { - console.error(err); - const error = { ...Unauthorized, ...err }; - connection.close({ code: error.code, reason: error.reason }); - } - }); - - this.documentConnections[documentName] = connection; - - // If the WebSocket has already disconnected (wow, that was fast) – then - // immediately call close to cleanup the connection and document in memory. - if ( - this.websocket.readyState === WsReadyStates.Closing || - this.websocket.readyState === WsReadyStates.Closed - ) { - this.close(); - return; - } - - // There’s no need to queue messages anymore. - // Let’s work through queued messages. - this.incomingMessageQueue[documentName].forEach((input) => { - this.websocket.emit("message", input); - }); - - await this.hooks("connected", { - ...hookPayload, - documentName, - context: hookPayload.context, - connection, - }); - }; - - // This listener handles authentication messages and queues everything else. - private handleQueueingMessage = async (data: Uint8Array) => { - try { - const tmpMsg = new SocketIncomingMessage(data); - - const documentName = decoding.readVarString(tmpMsg.decoder); - const type = decoding.readVarUint(tmpMsg.decoder); - - if ( - !( - type === MessageType.Auth && - !this.documentConnectionsEstablished.has(documentName) - ) - ) { - this.incomingMessageQueue[documentName].push(data); - return; - } - - // Okay, we’ve got the authentication message we’re waiting for: - this.documentConnectionsEstablished.add(documentName); - - // The 2nd integer contains the submessage type - // which will always be authentication when sent from client -> server - decoding.readVarUint(tmpMsg.decoder); - const token = decoding.readVarString(tmpMsg.decoder); - - try { - const hookPayload = this.hookPayloads[documentName]; - - await this.hooks( - "onConnect", - { ...hookPayload, documentName }, - (contextAdditions: any) => { - // merge context from all hooks - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }, - ); - - await this.hooks( - "onAuthenticate", - { - token, - ...hookPayload, - documentName, - }, - (contextAdditions: any) => { - // Hooks are allowed to give us even more context and we’ll merge everything together. - // We’ll pass the context to other hooks then. - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }, - ); - // All `onAuthenticate` hooks passed. - hookPayload.connectionConfig.isAuthenticated = true; - - // Let the client know that authentication was successful. - const message = new OutgoingMessage(documentName).writeAuthenticated( - hookPayload.connectionConfig.readOnly, - ); - - this.websocket.send(message.toUint8Array()); - - // Time to actually establish the connection. - await this.setUpNewConnection(documentName); - } catch (err: any) { - const error = err || Forbidden; - const message = new OutgoingMessage(documentName).writePermissionDenied( - error.reason ?? "permission-denied", - ); - - this.websocket.send(message.toUint8Array()); - } - - // Catch errors due to failed decoding of data - } catch (error) { - console.error(error); - this.websocket.close(ResetConnection.code, ResetConnection.reason); - } - }; - - private messageHandler = (data: Uint8Array) => { - try { - const tmpMsg = new SocketIncomingMessage(data); - - const documentName = decoding.readVarString(tmpMsg.decoder); - - const connection = this.documentConnections[documentName]; - if (connection) { - // forward the message to the connection - connection.handleMessage(data); - - // we already have a `Connection` set up for this document - return; - } - - const isFirst = this.incomingMessageQueue[documentName] === undefined; - if (isFirst) { - this.incomingMessageQueue[documentName] = []; - if (this.hookPayloads[documentName]) { - throw new Error("first message, but hookPayloads exists"); - } - - const hookPayload = { - instance: this.documentProvider as Hocuspocus, - request: this.request, - connectionConfig: { - readOnly: false, - isAuthenticated: false, - }, - requestHeaders: this.request.headers, - requestParameters: getParameters(this.request), - socketId: this.socketId, - context: { - ...this.defaultContext, - }, - }; - - this.hookPayloads[documentName] = hookPayload; - } - - this.handleQueueingMessage(data); - } catch (closeError) { - // catch is needed in case an invalid payload crashes the parsing of the Uint8Array - console.error(closeError); - this.websocket.close(Unauthorized.code, Unauthorized.reason); - } - }; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Connection.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Connection.ts deleted file mode 100644 index f9b7bd3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Connection.ts +++ /dev/null @@ -1,243 +0,0 @@ -import type { IncomingMessage as HTTPIncomingMessage } from "node:http"; -import { - type CloseEvent, - ResetConnection, - WsReadyStates, -} from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type Document from "./Document.ts"; -import { IncomingMessage } from "./IncomingMessage.ts"; -import { MessageReceiver } from "./MessageReceiver.ts"; -import { OutgoingMessage } from "./OutgoingMessage.ts"; -import type { - beforeSyncPayload, - onStatelessPayload, -} from "./types.ts"; - -export class Connection { - webSocket: WebSocket; - - context: any; - - document: Document; - - request: HTTPIncomingMessage; - - callbacks = { - onClose: [(document: Document, event?: CloseEvent) => {}], - beforeHandleMessage: (connection: Connection, update: Uint8Array) => - Promise.resolve(), - beforeSync: ( - connection: Connection, - payload: Pick, - ) => Promise.resolve(), - statelessCallback: (payload: onStatelessPayload) => Promise.resolve(), - onTokenSyncCallback: (payload: { token: string }) => Promise.resolve(), - }; - - socketId: string; - - readOnly: boolean; - - /** - * Constructor. - */ - constructor( - connection: WebSocket, - request: HTTPIncomingMessage, - document: Document, - socketId: string, - context: any, - readOnly = false, - ) { - this.webSocket = connection; - this.context = context; - this.document = document; - this.request = request; - this.socketId = socketId; - this.readOnly = readOnly; - - this.webSocket.binaryType = "nodebuffer"; - this.document.addConnection(this); - - this.sendCurrentAwareness(); - } - - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose( - callback: (document: Document, event?: CloseEvent) => void, - ): Connection { - this.callbacks.onClose.push(callback); - - return this; - } - - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback( - callback: (payload: onStatelessPayload) => Promise, - ): Connection { - this.callbacks.statelessCallback = callback; - - return this; - } - - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage( - callback: (connection: Connection, update: Uint8Array) => Promise, - ): Connection { - this.callbacks.beforeHandleMessage = callback; - - return this; - } - - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync( - callback: ( - connection: Connection, - payload: Pick, - ) => Promise, - ): Connection { - this.callbacks.beforeSync = callback; - - return this; - } - - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback( - callback: (payload: { token: string }) => Promise, - ): Connection { - this.callbacks.onTokenSyncCallback = callback; - - return this; - } - - /** - * Send the given message - */ - send(message: any): void { - if ( - this.webSocket.readyState === WsReadyStates.Closing || - this.webSocket.readyState === WsReadyStates.Closed - ) { - this.close(); - return; - } - - try { - this.webSocket.send(message, (error: any) => { - if (error != null) this.close(); - }); - } catch (exception) { - this.close(); - } - } - - /** - * Send a stateless message with payload - */ - public sendStateless(payload: string): void { - const message = new OutgoingMessage(this.document.name).writeStateless( - payload, - ); - - this.send(message.toUint8Array()); - } - - /** - * Request current token from the client - */ - public requestToken(): void { - const message = new OutgoingMessage( - this.document.name, - ).writeTokenSyncRequest(); - - this.send(message.toUint8Array()); - } - - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event?: CloseEvent): void { - if (this.document.hasConnection(this)) { - this.document.removeConnection(this); - this.callbacks.onClose.forEach( - (callback: (arg0: Document, arg1?: CloseEvent) => any) => - callback(this.document, event), - ); - - const closeMessage = new OutgoingMessage(this.document.name); - closeMessage.writeCloseMessage( - event?.reason ?? "Server closed the connection", - ); - this.send(closeMessage.toUint8Array()); - } - } - - /** - * Send the current document awareness to the client, if any - * @private - */ - private sendCurrentAwareness(): void { - if (!this.document.hasAwarenessStates()) { - return; - } - - const awarenessMessage = new OutgoingMessage( - this.document.name, - ).createAwarenessUpdateMessage(this.document.awareness); - - this.send(awarenessMessage.toUint8Array()); - } - - /** - * Handle an incoming message - * @public - */ - public handleMessage(data: Uint8Array): void { - const message = new IncomingMessage(data); - const documentName = message.readVarString(); - - if (documentName !== this.document.name) return; - - message.writeVarString(documentName); - - this.callbacks - .beforeHandleMessage(this, data) - .then(() => { - try { - new MessageReceiver(message).apply(this.document, this); - } catch (e: any) { - console.error( - `closing connection ${this.socketId} (while handling ${documentName}) because of exception`, - e, - ); - this.close({ - code: "code" in e ? e.code : ResetConnection.code, - reason: "reason" in e ? e.reason : ResetConnection.reason, - }); - } - }) - .catch((e: any) => { - console.error( - `closing connection ${this.socketId} (while handling ${documentName}) because of exception`, - e, - ); - this.close({ - code: "code" in e ? e.code : ResetConnection.code, - reason: "reason" in e ? e.reason : ResetConnection.reason, - }); - }); - } -} - -export default Connection; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/DirectConnection.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/DirectConnection.ts deleted file mode 100644 index b8cce63..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/DirectConnection.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { URLSearchParams } from "node:url"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { DirectConnection as DirectConnectionInterface } from "./types.ts"; - -export class DirectConnection implements DirectConnectionInterface { - document: Document | null = null; - - instance!: Hocuspocus; - - context: any; - - /** - * Constructor. - */ - constructor(document: Document, instance: Hocuspocus, context?: any) { - this.document = document; - this.instance = instance; - this.context = context; - - this.document.addDirectConnection(); - } - - async transact(transaction: (document: Document) => void) { - if (!this.document) { - throw new Error("direct connection closed"); - } - - transaction(this.document); - - await this.instance.storeDocumentHooks( - this.document, - { - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - documentName: this.document.name, - instance: this.instance, - requestHeaders: {}, - requestParameters: new URLSearchParams(), - socketId: "server", - }, - true, - ); - } - - async disconnect() { - if (this.document) { - this.document?.removeDirectConnection(); - - await this.instance.storeDocumentHooks( - this.document, - { - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - documentName: this.document.name, - instance: this.instance, - requestHeaders: {}, - requestParameters: new URLSearchParams(), - socketId: "server", - }, - true, - ); - - // If the direct connection was the only connection to the document - // then we should trigger the onDisconnect hook for - // this doc and unload the document - if ( - this.document.getConnectionsCount() === 0 && - !this.document.saveMutex.isLocked() - ) { - await this.instance.hooks("onDisconnect", { - instance: this.instance, - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - socketId: "server", - documentName: this.document.name, - requestHeaders: {}, - requestParameters: new URLSearchParams(), - }); - - await this.instance.unloadDocument(this.document); - } - - this.document = null; - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Document.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Document.ts deleted file mode 100644 index fae1510..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Document.ts +++ /dev/null @@ -1,268 +0,0 @@ -import { Mutex } from "async-mutex"; -import type WebSocket from "ws"; -import { - Awareness, - applyAwarenessUpdate, - removeAwarenessStates, -} from "y-protocols/awareness"; -import { Doc, applyUpdate, encodeStateAsUpdate } from "yjs"; -import type Connection from "./Connection.ts"; -import { OutgoingMessage } from "./OutgoingMessage.ts"; -import type { AwarenessUpdate } from "./types.ts"; - -export class Document extends Doc { - awareness: Awareness; - - callbacks = { - // eslint-disable-next-line @typescript-eslint/no-empty-function - onUpdate: ( - document: Document, - connection: Connection, - update: Uint8Array, - ) => {}, - beforeBroadcastStateless: (document: Document, stateless: string) => {}, - }; - - connections: Map< - WebSocket, - { - clients: Set; - connection: Connection; - } - > = new Map(); - - // The number of direct (non-websocket) connections to this document - directConnectionsCount = 0; - - name: string; - - isLoading: boolean; - - isDestroyed = false; - - saveMutex = new Mutex(); - - lastChangeTime = 0; - - /** - * Constructor. - */ - constructor(name: string, yDocOptions?: object) { - super(yDocOptions); - - this.name = name; - - this.awareness = new Awareness(this); - this.awareness.setLocalState(null); - - this.awareness.on("update", this.handleAwarenessUpdate.bind(this)); - this.on("update", this.handleUpdate.bind(this)); - - this.isLoading = true; - } - - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName: string): boolean { - // eslint-disable-next-line no-underscore-dangle - return !this.get(fieldName)._start && !this.get(fieldName)._map.size; - } - - /** - * Merge the given document(s) into this one - */ - merge(documents: Doc | Array): Document { - (Array.isArray(documents) ? documents : [documents]).forEach((document) => { - applyUpdate(this, encodeStateAsUpdate(document)); - }); - - return this; - } - - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate( - callback: ( - document: Document, - connection: Connection, - update: Uint8Array, - ) => void, - ): Document { - this.callbacks.onUpdate = callback; - - return this; - } - - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless( - callback: (document: Document, stateless: string) => void, - ): Document { - this.callbacks.beforeBroadcastStateless = callback; - - return this; - } - - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection: Connection): Document { - this.connections.set(connection.webSocket, { - clients: new Set(), - connection, - }); - - return this; - } - - /** - * Is the given connection registered on this document - */ - hasConnection(connection: Connection): boolean { - return this.connections.has(connection.webSocket); - } - - /** - * Remove the given connection from this document - */ - removeConnection(connection: Connection): Document { - removeAwarenessStates( - this.awareness, - Array.from(this.getClients(connection.webSocket)), - null, - ); - - this.connections.delete(connection.webSocket); - - return this; - } - - addDirectConnection(): Document { - this.directConnectionsCount += 1; - - return this; - } - - removeDirectConnection(): Document { - if (this.directConnectionsCount > 0) { - this.directConnectionsCount -= 1; - } - - return this; - } - - /** - * Get the number of active connections for this document - */ - getConnectionsCount(): number { - return this.connections.size + this.directConnectionsCount; - } - - /** - * Get an array of registered connections - */ - getConnections(): Array { - return Array.from(this.connections.values()).map((data) => data.connection); - } - - /** - * Get the client ids for the given connection instance - */ - getClients(connectionInstance: WebSocket): Set { - const connection = this.connections.get(connectionInstance); - - return connection?.clients === undefined ? new Set() : connection.clients; - } - - /** - * Has the document awareness states - */ - hasAwarenessStates(): boolean { - return this.awareness.getStates().size > 0; - } - - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection: Connection, update: Uint8Array): Document { - applyAwarenessUpdate(this.awareness, update, connection.webSocket); - - return this; - } - - /** - * Handle an awareness update and sync changes to clients - * @private - */ - private handleAwarenessUpdate( - { added, updated, removed }: AwarenessUpdate, - connectionInstance: WebSocket, - ): Document { - const changedClients = added.concat(updated, removed); - - if (connectionInstance !== null) { - const connection = this.connections.get(connectionInstance); - - if (connection) { - added.forEach((clientId: any) => connection.clients.add(clientId)); - removed.forEach((clientId: any) => connection.clients.delete(clientId)); - } - } - - this.getConnections().forEach((connection) => { - const awarenessMessage = new OutgoingMessage( - this.name, - ).createAwarenessUpdateMessage(this.awareness, changedClients); - - connection.send(awarenessMessage.toUint8Array()); - }); - - return this; - } - - /** - * Handle an updated document and sync changes to clients - */ - private handleUpdate(update: Uint8Array, connection: Connection): Document { - this.callbacks.onUpdate(this, connection, update); - - const message = new OutgoingMessage(this.name) - .createSyncMessage() - .writeUpdate(update); - - this.getConnections().forEach((connection) => { - connection.send(message.toUint8Array()); - }); - - return this; - } - - /** - * Broadcast stateless message to all connections - */ - public broadcastStateless( - payload: string, - filter?: (conn: Connection) => boolean, - ): void { - this.callbacks.beforeBroadcastStateless(this, payload); - - const connections = filter - ? this.getConnections().filter(filter) - : this.getConnections(); - - connections.forEach((connection) => { - connection.sendStateless(payload); - }); - } - - destroy() { - super.destroy(); - this.isDestroyed = true; - } -} - -export default Document; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Hocuspocus.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Hocuspocus.ts deleted file mode 100644 index df8e639..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Hocuspocus.ts +++ /dev/null @@ -1,561 +0,0 @@ -import crypto from "node:crypto"; -import type { IncomingMessage } from "node:http"; -import { ResetConnection, awarenessStatesToArray } from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type { Doc } from "yjs"; -import { applyUpdate, encodeStateAsUpdate } from "yjs"; -import meta from "../package.json" assert { type: "json" }; -import { ClientConnection } from "./ClientConnection.ts"; -import type Connection from "./Connection.ts"; -import { DirectConnection } from "./DirectConnection.ts"; -import Document from "./Document.ts"; -import type { Server } from "./Server.ts"; -import type { - AwarenessUpdate, - Configuration, - ConnectionConfiguration, - HookName, - HookPayloadByName, - beforeBroadcastStatelessPayload, - onChangePayload, - onDisconnectPayload, - onStoreDocumentPayload, -} from "./types.ts"; -import { useDebounce } from "./util/debounce.ts"; -import { getParameters } from "./util/getParameters.ts"; - -export const defaultConfiguration = { - name: null, - timeout: 30000, - debounce: 2000, - maxDebounce: 10000, - quiet: false, - yDocOptions: { - gc: true, - gcFilter: () => true, - }, - unloadImmediately: true, -}; - -export class Hocuspocus { - configuration: Configuration = { - ...defaultConfiguration, - extensions: [], - onConfigure: () => new Promise((r) => r(null)), - onListen: () => new Promise((r) => r(null)), - onUpgrade: () => new Promise((r) => r(null)), - onConnect: () => new Promise((r) => r(null)), - connected: () => new Promise((r) => r(null)), - beforeHandleMessage: () => new Promise((r) => r(null)), - beforeSync: () => new Promise((r) => r(null)), - beforeBroadcastStateless: () => new Promise((r) => r(null)), - onStateless: () => new Promise((r) => r(null)), - onChange: () => new Promise((r) => r(null)), - onCreateDocument: () => new Promise((r) => r(null)), - onLoadDocument: () => new Promise((r) => r(null)), - onStoreDocument: () => new Promise((r) => r(null)), - afterStoreDocument: () => new Promise((r) => r(null)), - onAwarenessUpdate: () => new Promise((r) => r(null)), - onRequest: () => new Promise((r) => r(null)), - onDisconnect: () => new Promise((r) => r(null)), - onDestroy: () => new Promise((r) => r(null)), - }; - - loadingDocuments: Map> = new Map(); - unloadingDocuments: Map> = new Map(); - - documents: Map = new Map(); - - server?: Server; - - debouncer = useDebounce(); - - constructor(configuration?: Partial) { - if (configuration) { - this.configure(configuration); - } - } - - /** - * Configure Hocuspocus - */ - configure(configuration: Partial): Hocuspocus { - this.configuration = { - ...this.configuration, - ...configuration, - }; - - this.configuration.extensions.sort((a, b) => { - const one = typeof a.priority === "undefined" ? 100 : a.priority; - const two = typeof b.priority === "undefined" ? 100 : b.priority; - - if (one > two) { - return -1; - } - - if (one < two) { - return 1; - } - - return 0; - }); - - this.configuration.extensions.push({ - onConfigure: this.configuration.onConfigure, - onListen: this.configuration.onListen, - onUpgrade: this.configuration.onUpgrade, - onConnect: this.configuration.onConnect, - connected: this.configuration.connected, - onAuthenticate: this.configuration.onAuthenticate, - onTokenSync: this.configuration.onTokenSync, - onLoadDocument: this.configuration.onLoadDocument, - afterLoadDocument: this.configuration.afterLoadDocument, - beforeHandleMessage: this.configuration.beforeHandleMessage, - beforeBroadcastStateless: this.configuration.beforeBroadcastStateless, - beforeSync: this.configuration.beforeSync, - onStateless: this.configuration.onStateless, - onChange: this.configuration.onChange, - onStoreDocument: this.configuration.onStoreDocument, - afterStoreDocument: this.configuration.afterStoreDocument, - onAwarenessUpdate: this.configuration.onAwarenessUpdate, - onRequest: this.configuration.onRequest, - beforeUnloadDocument: this.configuration.beforeUnloadDocument, - afterUnloadDocument: this.configuration.afterUnloadDocument, - onDisconnect: this.configuration.onDisconnect, - onDestroy: this.configuration.onDestroy, - }); - - this.hooks("onConfigure", { - configuration: this.configuration, - version: meta.version, - instance: this, - }); - - return this; - } - - /** - * Get the total number of active documents - */ - getDocumentsCount(): number { - return this.documents.size; - } - - /** - * Get the total number of active connections - */ - getConnectionsCount(): number { - const uniqueSocketIds = new Set(); - const totalDirectConnections = Array.from(this.documents.values()).reduce( - (acc, document) => { - // Accumulate unique socket IDs - document.getConnections().forEach(({ socketId }) => { - uniqueSocketIds.add(socketId); - }); - // Accumulate direct connections - return acc + document.directConnectionsCount; - }, - 0, - ); - // Return the sum of unique socket IDs and direct connections - return uniqueSocketIds.size + totalDirectConnections; - } - - /** - * Force close one or more connections - */ - closeConnections(documentName?: string) { - // Iterate through all connections for all documents - // and invoke their close method, which is a graceful - // disconnect wrapper around the underlying websocket.close - this.documents.forEach((document: Document) => { - // If a documentName was specified, bail if it doesn't match - if (documentName && document.name !== documentName) { - return; - } - - document.connections.forEach(({ connection }) => { - connection.close(ResetConnection); - }); - }); - } - - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it’ll fully establish the connection and - * load the Document then. - */ - handleConnection( - incoming: WebSocket, - request: IncomingMessage, - defaultContext: any = {}, - ): void { - const clientConnection = new ClientConnection( - incoming, - request, - this, - this.hooks.bind(this), - { - timeout: this.configuration.timeout, - }, - defaultContext, - ); - clientConnection.onClose( - (document: Document, hookPayload: onDisconnectPayload) => { - // Check if there are still no connections to the document, as these hooks - // may take some time to resolve (e.g. database queries). If a - // new connection were to come in during that time it would rely on the - // document in the map that we remove now. - if (document.getConnectionsCount() > 0) { - return; - } - - // If it’s the last connection, we need to make sure to store the - // document. Use the debouncer executeNow helper, to run scheduled - // onStoreDocument immediately and clear running timers. - // If there is no scheduled run for this document there is no point in - // triggering onStoreDocument hook, as everything seems to be stored already. - // Only run this if the document has finished loading earlier (i.e. not to persist the empty - // ydoc if the onLoadDocument hook returned an error) - if ( - !document.isLoading && - this.debouncer.isDebounced(`onStoreDocument-${document.name}`) - ) { - if (this.configuration.unloadImmediately) { - this.debouncer.executeNow(`onStoreDocument-${document.name}`); - } - } else { - // Remove document from memory immediately - this.unloadDocument(document); - } - }, - ); - } - - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - private handleDocumentUpdate( - document: Document, - connection: Connection | undefined, - update: Uint8Array, - request?: IncomingMessage, - ) { - const hookPayload: onChangePayload | onStoreDocumentPayload = { - instance: this, - clientsCount: document.getConnectionsCount(), - context: connection?.context || {}, - document, - documentName: document.name, - requestHeaders: request?.headers ?? {}, - requestParameters: getParameters(request), - socketId: connection?.socketId ?? "", - update, - transactionOrigin: connection, - }; - - this.hooks("onChange", hookPayload); - - // If the update was received through other ways than the - // WebSocket connection, we don’t need to feel responsible for - // storing the content. - // also ignore changes incoming through redis connection, as this would be a breaking change (#730, #696, #606) - if ( - !connection || - (connection as unknown as string) === "__hocuspocus__redis__origin__" - ) { - return; - } - - this.storeDocumentHooks(document, hookPayload); - } - - /** - * Create a new document by the given request - */ - public async createDocument( - documentName: string, - request: Partial>, - socketId: string, - connection: ConnectionConfiguration, - context?: any, - ): Promise { - const existingLoadingDoc = this.loadingDocuments.get(documentName); - - if (existingLoadingDoc) { - return existingLoadingDoc; - } - - const existingDoc = this.documents.get(documentName); - if (existingDoc) { - return Promise.resolve(existingDoc); - } - - const loadDocPromise = this.loadDocument( - documentName, - request, - socketId, - connection, - context, - ); - - this.loadingDocuments.set(documentName, loadDocPromise); - - try { - const doc = await loadDocPromise; - this.documents.set(documentName, doc); - this.loadingDocuments.delete(documentName); - return doc; - } catch (e) { - this.loadingDocuments.delete(documentName); - throw e; - } - } - - async loadDocument( - documentName: string, - request: Partial>, - socketId: string, - connectionConfig: ConnectionConfiguration, - context?: any, - ): Promise { - const requestHeaders = request.headers ?? {}; - const requestParameters = getParameters(request); - - const yDocOptions = await this.hooks("onCreateDocument", { - documentName, - requestHeaders, - requestParameters, - connectionConfig, - context, - socketId, - instance: this, - }); - - const document = new Document(documentName, { - ...this.configuration.yDocOptions, - ...yDocOptions, - }); - - const hookPayload = { - instance: this, - context, - connectionConfig, - document, - documentName, - socketId, - requestHeaders, - requestParameters, - }; - - try { - await this.hooks( - "onLoadDocument", - hookPayload, - (loadedDocument: Doc | undefined) => { - // if a hook returns a Y-Doc, encode the document state as update - // and apply it to the newly created document - // Note: instanceof doesn't work, because Doc !== Doc for some reason I don't understand - if ( - loadedDocument?.constructor.name === "Document" || - loadedDocument?.constructor.name === "Doc" - ) { - applyUpdate(document, encodeStateAsUpdate(loadedDocument)); - } - }, - ); - } catch (e) { - this.closeConnections(documentName); - this.unloadDocument(document); - throw e; - } - - document.isLoading = false; - - document.onUpdate( - (document: Document, connection: Connection, update: Uint8Array) => { - document.lastChangeTime = Date.now(); - - this.handleDocumentUpdate( - document, - connection, - update, - connection?.request, - ); - }, - ); - - await this.hooks("afterLoadDocument", hookPayload); - - document.beforeBroadcastStateless( - (document: Document, stateless: string) => { - const hookPayload: beforeBroadcastStatelessPayload = { - document, - documentName: document.name, - payload: stateless, - }; - - this.hooks("beforeBroadcastStateless", hookPayload); - }, - ); - - document.awareness.on("update", (update: AwarenessUpdate) => { - this.hooks("onAwarenessUpdate", { - ...hookPayload, - ...update, - awareness: document.awareness, - states: awarenessStatesToArray(document.awareness.getStates()), - }); - }); - - return document; - } - - storeDocumentHooks( - document: Document, - hookPayload: onStoreDocumentPayload, - immediately?: boolean, - ) { - const debounceId = `onStoreDocument-${document.name}`; - return this.debouncer.debounce( - debounceId, - async () => { - try { - await document.saveMutex.runExclusive(async () => { - await this.hooks("onStoreDocument", hookPayload); - await this.hooks("afterStoreDocument", hookPayload); - }); - } catch (error: any) { - console.error("Caught error during storeDocumentHooks", error); - if (error?.message) { - throw error; - } - } finally { - setTimeout(() => { - if (this.shouldUnloadDocument(document)) { - this.unloadDocument(document); - } - }, 0); - } - }, - immediately ? 0 : this.configuration.debounce, - this.configuration.maxDebounce, - ); - } - - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - hooks( - name: T, - payload: HookPayloadByName[T], - callback: Function | null = null, - ): Promise { - const { extensions } = this.configuration; - - // create a new `thenable` chain - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve - let chain = Promise.resolve(); - - extensions - // get me all extensions which have the given hook - .filter((extension) => typeof extension[name] === "function") - // run through all the configured hooks - .forEach((extension) => { - chain = chain - .then(() => (extension[name] as any)?.(payload)) - .catch((error) => { - // make sure to log error messages - if (error?.message) { - console.error(`[${name}]`, error.message); - } - - throw error; - }); - - if (callback) { - chain = chain.then((...args: any[]) => callback(...args)); - } - }); - - return chain; - } - - shouldUnloadDocument(document: Document): boolean { - const hasPendingWork = - this.debouncer.isDebounced(`onStoreDocument-${document.name}`) || - this.debouncer.isCurrentlyExecuting(`onStoreDocument-${document.name}`) || - document.saveMutex.isLocked(); - - return hasPendingWork === false && document.getConnectionsCount() === 0; - } - - async unloadDocument(document: Document): Promise { - const documentName = document.name; - - if (!this.shouldUnloadDocument(document)) return; - - if (!this.documents.has(documentName)) return; - - if (this.unloadingDocuments.has(documentName)) - return this.unloadingDocuments.get(documentName); - - // we need to make sure that the logic runs just once, even if multiple clients disconnect together - const actualUnloadingLogic = async () => { - try { - await this.hooks("beforeUnloadDocument", { - instance: this, - documentName, - document, - }); - } catch (e) { - return; - } - - // need sync check here as well, to avoid timing problems - if (!this.shouldUnloadDocument(document)) return; - - this.documents.delete(documentName); - document.destroy(); - await this.hooks("afterUnloadDocument", { instance: this, documentName }); - }; - - const unloading = actualUnloadingLogic(); - - this.unloadingDocuments.set(documentName, Promise.resolve(unloading)); - - await unloading; - - this.unloadingDocuments.delete(documentName); - } - - async openDirectConnection( - documentName: string, - context?: any, - ): Promise { - const connectionConfig: ConnectionConfiguration = { - isAuthenticated: true, - readOnly: false, - }; - - const document: Document = await this.createDocument( - documentName, - {}, // direct connection has no request params - crypto.randomUUID(), - connectionConfig, - context, - ); - - return new DirectConnection(document, this, context); - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/IncomingMessage.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/IncomingMessage.ts deleted file mode 100644 index 1b5dd1c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/IncomingMessage.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import { - createDecoder, - readVarUint, - readVarUint8Array, - readVarString, -} from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import { - createEncoder, - toUint8Array, - writeVarUint, - writeVarString, - length, -} from "lib0/encoding"; -import type { MessageType } from "./types.ts"; - -export class IncomingMessage { - /** - * Access to the received message. - */ - decoder: Decoder; - - /** - * Private encoder; can be undefined. - * - * Lazy creation of the encoder speeds up IncomingMessages that need only a decoder. - */ - private encoderInternal?: Encoder; - - constructor(input: any) { - if (!(input instanceof Uint8Array)) { - input = new Uint8Array(input); - } - - this.decoder = createDecoder(input); - } - - get encoder() { - if (!this.encoderInternal) { - this.encoderInternal = createEncoder(); - } - return this.encoderInternal; - } - - readVarUint8Array() { - return readVarUint8Array(this.decoder); - } - - peekVarUint8Array() { - const { pos } = this.decoder; - const result = readVarUint8Array(this.decoder); - this.decoder.pos = pos; - return result; - } - - readVarUint() { - return readVarUint(this.decoder); - } - - readVarString() { - return readVarString(this.decoder); - } - - toUint8Array() { - return toUint8Array(this.encoder); - } - - writeVarUint(type: MessageType) { - writeVarUint(this.encoder, type); - } - - writeVarString(string: string) { - writeVarString(this.encoder, string); - } - - get length(): number { - return length(this.encoder); - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/MessageReceiver.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/MessageReceiver.ts deleted file mode 100644 index 21e20bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/MessageReceiver.ts +++ /dev/null @@ -1,242 +0,0 @@ -import { AuthMessageType } from "@hocuspocus/common"; -import * as decoding from "lib0/decoding"; -import { readVarString } from "lib0/decoding"; -import { applyAwarenessUpdate } from "y-protocols/awareness"; -import { - messageYjsSyncStep1, - messageYjsSyncStep2, - messageYjsUpdate, - readSyncStep1, - readSyncStep2, - readUpdate, -} from "y-protocols/sync"; -import * as Y from "yjs"; -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -import { OutgoingMessage } from "./OutgoingMessage.ts"; -import { MessageType } from "./types.ts"; - -export class MessageReceiver { - message: IncomingMessage; - - defaultTransactionOrigin?: string; - - constructor(message: IncomingMessage, defaultTransactionOrigin?: string) { - this.message = message; - this.defaultTransactionOrigin = defaultTransactionOrigin; - } - - public apply( - document: Document, - connection?: Connection, - reply?: (message: Uint8Array) => void, - ) { - const { message } = this; - const type = message.readVarUint(); - const emptyMessageLength = message.length; - - switch (type) { - case MessageType.Sync: - case MessageType.SyncReply: { - message.writeVarUint(MessageType.Sync); - this.readSyncMessage( - message, - document, - connection, - reply, - type !== MessageType.SyncReply, - ); - - if (message.length > emptyMessageLength + 1) { - if (reply) { - reply(message.toUint8Array()); - } else if (connection) { - // TODO: We should log this, shouldn’t we? - // this.logger.log({ - // direction: 'out', - // type: MessageType.Awareness, - // category: 'Update', - // }) - connection.send(message.toUint8Array()); - } - } - - break; - } - case MessageType.Awareness: { - applyAwarenessUpdate( - document.awareness, - message.readVarUint8Array(), - connection?.webSocket, - ); - - break; - } - case MessageType.QueryAwareness: { - this.applyQueryAwarenessMessage(document, reply); - - break; - } - case MessageType.Stateless: { - connection?.callbacks.statelessCallback({ - connection, - documentName: document.name, - document, - payload: readVarString(message.decoder), - }); - - break; - } - case MessageType.BroadcastStateless: { - const msg = message.readVarString(); - document.getConnections().forEach((connection) => { - connection.sendStateless(msg); - }); - break; - } - - case MessageType.CLOSE: { - connection?.close({ - code: 1000, - reason: "provider_initiated", - }); - break; - } - - case MessageType.Auth: { - const authType = message.readVarUint(); - if (authType === AuthMessageType.Token) { - connection?.callbacks.onTokenSyncCallback({ - token: message.readVarString(), - }); - break; - } - console.error( - "Received an authentication message on a connection that is already fully authenticated. Probably your provider has been destroyed + recreated really fast.", - ); - break; - } - - default: - console.error( - `Unable to handle message of type ${type}: no handler defined! Are your provider/server versions aligned?`, - ); - // Do nothing - } - } - - readSyncMessage( - message: IncomingMessage, - document: Document, - connection?: Connection, - reply?: (message: Uint8Array) => void, - requestFirstSync = true, - ) { - const type = message.readVarUint(); - - if (connection) { - connection.callbacks.beforeSync(connection, { - type, - payload: message.peekVarUint8Array(), - }); - } - - switch (type) { - case messageYjsSyncStep1: { - readSyncStep1(message.decoder, message.encoder, document); - - // When the server receives SyncStep1, it should reply with SyncStep2 immediately followed by SyncStep1. - if (reply && requestFirstSync) { - const syncMessage = new OutgoingMessage(document.name) - .createSyncReplyMessage() - .writeFirstSyncStepFor(document); - - reply(syncMessage.toUint8Array()); - } else if (connection) { - const syncMessage = new OutgoingMessage(document.name) - .createSyncMessage() - .writeFirstSyncStepFor(document); - - connection.send(syncMessage.toUint8Array()); - } - break; - } - case messageYjsSyncStep2: - if (connection?.readOnly) { - // We're in read-only mode, so we can't apply the update. - // Let's use snapshotContainsUpdate to see if the update actually contains changes. - // If not, we can still ack the update - const snapshot = Y.snapshot(document); - const update = decoding.readVarUint8Array(message.decoder); - if (Y.snapshotContainsUpdate(snapshot, update)) { - // no new changes in update - const ackMessage = new OutgoingMessage( - document.name, - ).writeSyncStatus(true); - - connection.send(ackMessage.toUint8Array()); - } else { - // new changes in update that we can't apply, because readOnly - const ackMessage = new OutgoingMessage( - document.name, - ).writeSyncStatus(false); - - connection.send(ackMessage.toUint8Array()); - } - break; - } - - readSyncStep2( - message.decoder, - document, - connection ?? this.defaultTransactionOrigin, - ); - - if (connection) { - connection.send( - new OutgoingMessage(document.name) - .writeSyncStatus(true) - .toUint8Array(), - ); - } - break; - case messageYjsUpdate: - if (connection?.readOnly) { - connection.send( - new OutgoingMessage(document.name) - .writeSyncStatus(false) - .toUint8Array(), - ); - break; - } - - readUpdate(message.decoder, document, connection); - if (connection) { - connection.send( - new OutgoingMessage(document.name) - .writeSyncStatus(true) - .toUint8Array(), - ); - } - break; - default: - throw new Error(`Received a message with an unknown type: ${type}`); - } - - return type; - } - - applyQueryAwarenessMessage( - document: Document, - reply?: (message: Uint8Array) => void, - ) { - const message = new OutgoingMessage( - document.name, - ).createAwarenessUpdateMessage(document.awareness); - - if (reply) { - reply(message.toUint8Array()); - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/OutgoingMessage.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/OutgoingMessage.ts deleted file mode 100644 index fc6e3ae..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/OutgoingMessage.ts +++ /dev/null @@ -1,159 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import { - createEncoder, - toUint8Array, - writeVarString, - writeVarUint, - writeVarUint8Array, -} from "lib0/encoding"; -import type { Awareness } from "y-protocols/awareness"; -import { encodeAwarenessUpdate } from "y-protocols/awareness"; -import { writeSyncStep1, writeUpdate } from "y-protocols/sync"; - -import { writeAuthenticated, writePermissionDenied, writeTokenSyncRequest } from "@hocuspocus/common"; -import type Document from "./Document.ts"; -import { MessageType } from "./types.ts"; - -export class OutgoingMessage { - encoder: Encoder; - - type?: number; - - category?: string; - - constructor(documentName: string) { - this.encoder = createEncoder(); - - writeVarString(this.encoder, documentName); - } - - createSyncMessage(): OutgoingMessage { - this.type = MessageType.Sync; - - writeVarUint(this.encoder, MessageType.Sync); - - return this; - } - - createSyncReplyMessage(): OutgoingMessage { - this.type = MessageType.SyncReply; - - writeVarUint(this.encoder, MessageType.SyncReply); - - return this; - } - - createAwarenessUpdateMessage( - awareness: Awareness, - changedClients?: Array, - ): OutgoingMessage { - this.type = MessageType.Awareness; - this.category = "Update"; - - const message = encodeAwarenessUpdate( - awareness, - changedClients || Array.from(awareness.getStates().keys()), - ); - - writeVarUint(this.encoder, MessageType.Awareness); - writeVarUint8Array(this.encoder, message); - - return this; - } - - writeQueryAwareness(): OutgoingMessage { - this.type = MessageType.QueryAwareness; - this.category = "Update"; - - writeVarUint(this.encoder, MessageType.QueryAwareness); - - return this; - } - - writeTokenSyncRequest(): OutgoingMessage { - this.type = MessageType.Auth; - this.category = "TokenSync"; - - writeVarUint(this.encoder, MessageType.Auth); - writeTokenSyncRequest(this.encoder); - - return this; - } - - writeAuthenticated(readonly: boolean): OutgoingMessage { - this.type = MessageType.Auth; - this.category = "Authenticated"; - - writeVarUint(this.encoder, MessageType.Auth); - writeAuthenticated(this.encoder, readonly ? "readonly" : "read-write"); - - return this; - } - - writePermissionDenied(reason: string): OutgoingMessage { - this.type = MessageType.Auth; - this.category = "PermissionDenied"; - - writeVarUint(this.encoder, MessageType.Auth); - writePermissionDenied(this.encoder, reason); - - return this; - } - - writeFirstSyncStepFor(document: Document): OutgoingMessage { - this.category = "SyncStep1"; - - writeSyncStep1(this.encoder, document); - - return this; - } - - writeUpdate(update: Uint8Array): OutgoingMessage { - this.category = "Update"; - - writeUpdate(this.encoder, update); - - return this; - } - - writeStateless(payload: string): OutgoingMessage { - this.category = "Stateless"; - - writeVarUint(this.encoder, MessageType.Stateless); - writeVarString(this.encoder, payload); - - return this; - } - - writeBroadcastStateless(payload: string): OutgoingMessage { - this.category = "Stateless"; - - writeVarUint(this.encoder, MessageType.BroadcastStateless); - writeVarString(this.encoder, payload); - - return this; - } - - // TODO: should this be write* or create* as method name? - writeSyncStatus(updateSaved: boolean): OutgoingMessage { - this.category = "SyncStatus"; - - writeVarUint(this.encoder, MessageType.SyncStatus); - writeVarUint(this.encoder, updateSaved ? 1 : 0); - - return this; - } - - writeCloseMessage(reason: string): OutgoingMessage { - this.type = MessageType.CLOSE; - - writeVarUint(this.encoder, MessageType.CLOSE); - writeVarString(this.encoder, reason); - - return this; - } - - toUint8Array(): Uint8Array { - return toUint8Array(this.encoder); - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Server.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Server.ts deleted file mode 100644 index aae6b61..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Server.ts +++ /dev/null @@ -1,269 +0,0 @@ -import type { - Server as HTTPServer, - IncomingMessage, - ServerResponse, -} from "node:http"; -import { createServer } from "node:http"; -import type { ListenOptions } from "node:net"; -import kleur from "kleur"; -import type WebSocket from "ws"; -import { WebSocketServer } from "ws"; -import type { AddressInfo, ServerOptions } from "ws"; -import meta from "../package.json" assert { type: "json" }; -import { Hocuspocus, defaultConfiguration } from "./Hocuspocus.ts"; -import type { Configuration, onListenPayload } from "./types.ts"; - -export interface ServerConfiguration extends Configuration { - port?: number; - address?: string; - stopOnSignals?: boolean; -} - -export const defaultServerConfiguration = { - port: 80, - address: "0.0.0.0", - stopOnSignals: true, -}; - -export class Server { - httpServer: HTTPServer; - - webSocketServer: WebSocketServer; - - hocuspocus: Hocuspocus; - - configuration: ServerConfiguration = { - ...defaultConfiguration, - ...defaultServerConfiguration, - extensions: [], - }; - - constructor( - configuration?: Partial, - websocketOptions: ServerOptions = {}, - ) { - if (configuration) { - this.configuration = { - ...this.configuration, - ...configuration, - }; - } - - this.hocuspocus = new Hocuspocus(this.configuration); - this.hocuspocus.server = this; - - this.httpServer = createServer(this.requestHandler); - this.webSocketServer = new WebSocketServer({ - noServer: true, - ...websocketOptions, - }); - - this.setupWebsocketConnection(); - this.setupHttpUpgrade(); - } - - setupWebsocketConnection = () => { - this.webSocketServer.on( - "connection", - async (incoming: WebSocket, request: IncomingMessage) => { - incoming.setMaxListeners(Number.POSITIVE_INFINITY); - - incoming.on("error", (error) => { - /** - * Handle a ws instance error, which is required to prevent - * the server from crashing when one happens - * See https://github.com/websockets/ws/issues/1777#issuecomment-660803472 - * @private - */ - console.error("Error emitted from webSocket instance:"); - console.error(error); - }); - - this.hocuspocus.handleConnection(incoming, request); - }, - ); - }; - - setupHttpUpgrade = () => { - this.httpServer.on("upgrade", async (request, socket, head) => { - try { - await this.hocuspocus.hooks("onUpgrade", { - request, - socket, - head, - instance: this.hocuspocus, - }); - - // let the default websocket server handle the connection if - // prior hooks don't interfere - this.webSocketServer.handleUpgrade(request, socket, head, (ws) => { - this.webSocketServer.emit("connection", ws, request); - }); - } catch (error) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if a error is present - // just rethrow it - if (error) { - throw error; - } - } - }); - }; - - requestHandler = async ( - request: IncomingMessage, - response: ServerResponse, - ) => { - try { - await this.hocuspocus.hooks("onRequest", { - request, - response, - instance: this.hocuspocus, - }); - - // default response if all prior hooks don't interfere - response.writeHead(200, { "Content-Type": "text/plain" }); - response.end("Welcome to Hocuspocus!"); - } catch (error) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if a error is present - // just rethrow it - if (error) { - throw error; - } - } - }; - - async listen(port?: number, callback: any = null): Promise { - if (port) { - this.configuration.port = port; - } - - if (typeof callback === "function") { - this.hocuspocus.configuration.extensions.push({ - onListen: callback, - }); - } - - if (this.configuration.stopOnSignals) { - const signalHandler = async () => { - await this.destroy(); - process.exit(0); - }; - - process.on("SIGINT", signalHandler); - process.on("SIGQUIT", signalHandler); - process.on("SIGTERM", signalHandler); - } - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - return new Promise((resolve: Function, reject: Function) => { - this.httpServer.listen( - { - port: this.configuration.port, - address: this.configuration.address, - } as ListenOptions, - async () => { - if ( - !this.configuration.quiet && - String(process.env.NODE_ENV) !== "testing" - ) { - this.showStartScreen(); - } - - const onListenPayload = { - instance: this.hocuspocus, - configuration: this.configuration, - port: this.address.port, - } as onListenPayload; - - try { - await this.hocuspocus.hooks("onListen", onListenPayload); - resolve(this.hocuspocus); - } catch (e) { - reject(e); - } - }, - ); - }); - } - - get address(): AddressInfo { - return (this.httpServer.address() || { - port: this.configuration.port, - address: this.configuration.address, - family: "IPv4", - }) as AddressInfo; - } - - async destroy(): Promise { - await new Promise(async (resolve) => { - this.httpServer.close(); - - try { - this.configuration.extensions.push({ - async afterUnloadDocument({ instance }) { - if (instance.getDocumentsCount() === 0) resolve(""); - }, - }); - - this.webSocketServer.close(); - if (this.hocuspocus.getDocumentsCount() === 0) resolve(""); - - this.hocuspocus.closeConnections(); - } catch (error) { - console.error(error); - } - }); - - await this.hocuspocus.hooks("onDestroy", { instance: this.hocuspocus }); - } - - get URL(): string { - return `${this.configuration.address}:${this.address.port}`; - } - - get webSocketURL(): string { - return `ws://${this.URL}`; - } - - get httpURL(): string { - return `http://${this.URL}`; - } - - private showStartScreen() { - const name = this.configuration.name ? ` (${this.configuration.name})` : ""; - - console.log(); - console.log( - ` ${kleur.cyan(`Hocuspocus v${meta.version}${name}`)}${kleur.green(" running at:")}`, - ); - console.log(); - - console.log(` > HTTP: ${kleur.cyan(`${this.httpURL}`)}`); - console.log(` > WebSocket: ${this.webSocketURL}`); - - const extensions = this.configuration?.extensions - .map((extension) => { - return extension.extensionName ?? extension.constructor?.name; - }) - .filter((name) => name) - .filter((name) => name !== "Object"); - - if (!extensions.length) { - return; - } - - console.log(); - console.log(" Extensions:"); - - extensions.forEach((name) => { - console.log(` - ${name}`); - }); - - console.log(); - console.log(` ${kleur.green("Ready.")}`); - console.log(); - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/index.ts deleted file mode 100644 index 8ede6d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from "./Connection.ts"; -export * from "./Document.ts"; -export * from "./Hocuspocus.ts"; -export * from "./IncomingMessage.ts"; -export * from "./MessageReceiver.ts"; -export * from "./OutgoingMessage.ts"; -export * from "./Server.ts"; -export * from "./types.ts"; -export * from "./util/debounce.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/types.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/types.ts deleted file mode 100644 index f097118..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/types.ts +++ /dev/null @@ -1,403 +0,0 @@ -import type { - IncomingHttpHeaders, - IncomingMessage, - ServerResponse, -} from "node:http"; -import type { URLSearchParams } from "node:url"; -import type { Awareness } from "y-protocols/awareness"; -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; - -export enum MessageType { - Unknown = -1, - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - SyncReply = 4, // same as Sync, but won't trigger another 'SyncStep1' - Stateless = 5, - BroadcastStateless = 6, - CLOSE = 7, - SyncStatus = 8, -} - -export interface AwarenessUpdate { - added: Array; - updated: Array; - removed: Array; -} - -export interface ConnectionConfiguration { - readOnly: boolean; - isAuthenticated: boolean; -} - -export interface Extension { - priority?: number; - extensionName?: string; - onConfigure?(data: onConfigurePayload): Promise; - onListen?(data: onListenPayload): Promise; - onUpgrade?(data: onUpgradePayload): Promise; - onConnect?(data: onConnectPayload): Promise; - connected?(data: connectedPayload): Promise; - onAuthenticate?(data: onAuthenticatePayload): Promise; - onTokenSync?(data: onTokenSyncPayload): Promise; - onCreateDocument?(data: onCreateDocumentPayload): Promise; - onLoadDocument?(data: onLoadDocumentPayload): Promise; - afterLoadDocument?(data: afterLoadDocumentPayload): Promise; - beforeHandleMessage?(data: beforeHandleMessagePayload): Promise; - beforeSync?(data: beforeSyncPayload): Promise; - beforeBroadcastStateless?( - data: beforeBroadcastStatelessPayload, - ): Promise; - onStateless?(payload: onStatelessPayload): Promise; - onChange?(data: onChangePayload): Promise; - onStoreDocument?(data: onStoreDocumentPayload): Promise; - afterStoreDocument?(data: afterStoreDocumentPayload): Promise; - onAwarenessUpdate?(data: onAwarenessUpdatePayload): Promise; - onRequest?(data: onRequestPayload): Promise; - onDisconnect?(data: onDisconnectPayload): Promise; - beforeUnloadDocument?(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument?(data: afterUnloadDocumentPayload): Promise; - onDestroy?(data: onDestroyPayload): Promise; -} - -export type HookName = - | "onConfigure" - | "onListen" - | "onUpgrade" - | "onConnect" - | "connected" - | "onAuthenticate" - | "onTokenSync" - | "onCreateDocument" - | "onLoadDocument" - | "afterLoadDocument" - | "beforeHandleMessage" - | "beforeBroadcastStateless" - | "beforeSync" - | "onStateless" - | "onChange" - | "onStoreDocument" - | "afterStoreDocument" - | "onAwarenessUpdate" - | "onRequest" - | "onDisconnect" - | "beforeUnloadDocument" - | "afterUnloadDocument" - | "onDestroy"; - -export type HookPayloadByName = { - onConfigure: onConfigurePayload; - onListen: onListenPayload; - onUpgrade: onUpgradePayload; - onConnect: onConnectPayload; - connected: connectedPayload; - onAuthenticate: onAuthenticatePayload; - onTokenSync: onTokenSyncPayload; - onCreateDocument: onCreateDocumentPayload; - onLoadDocument: onLoadDocumentPayload; - afterLoadDocument: afterLoadDocumentPayload; - beforeHandleMessage: beforeHandleMessagePayload; - beforeBroadcastStateless: beforeBroadcastStatelessPayload; - beforeSync: beforeSyncPayload; - onStateless: onStatelessPayload; - onChange: onChangePayload; - onStoreDocument: onStoreDocumentPayload; - afterStoreDocument: afterStoreDocumentPayload; - onAwarenessUpdate: onAwarenessUpdatePayload; - onRequest: onRequestPayload; - onDisconnect: onDisconnectPayload; - afterUnloadDocument: afterUnloadDocumentPayload; - beforeUnloadDocument: beforeUnloadDocumentPayload; - onDestroy: onDestroyPayload; -}; - -export interface Configuration extends Extension { - /** - * A name for the instance, used for logging. - */ - name: string | null; - /** - * A list of hocuspocus extensions. - */ - extensions: Array; - /** - * Defines in which interval the server sends a ping, and closes the connection when no pong is sent back. - */ - timeout: number; - /** - * Debounces the call of the `onStoreDocument` hook for the given amount of time in ms. - * Otherwise every single update would be persisted. - */ - debounce: number; - /** - * Makes sure to call `onStoreDocument` at least in the given amount of time (ms). - */ - maxDebounce: number; - /** - * By default, the servers show a start screen. If passed false, the server will start quietly. - */ - quiet: boolean; - /** - * If set to false, respects the debounce time of `onStoreDocument` before unloading a document. - * Otherwise, the document will be unloaded immediately. - * - * This prevents a client from DOSing the server by repeatedly connecting and disconnecting when - * your onStoreDocument is rate-limited. - */ - unloadImmediately: boolean; - - /** - * options to pass to the ydoc document - */ - yDocOptions: { - gc: boolean; // enable or disable garbage collection (see https://github.com/yjs/yjs/blob/main/INTERNALS.md#deletions) - gcFilter: () => boolean; // will be called before garbage collecting ; return false to keep it - }; -} - -export interface onStatelessPayload { - connection: Connection; - documentName: string; - document: Document; - payload: string; -} - -export interface onAuthenticatePayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - request: IncomingMessage; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; -} - -export interface onTokenSyncPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} - -export interface onCreateDocumentPayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} - -export interface onConnectPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} - -export interface connectedPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} - -export interface onLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} - -export interface afterLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} - -export interface onChangePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - transactionOrigin: any; -} - -export interface beforeHandleMessagePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - connection: Connection; -} - -export interface beforeSyncPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - connection: Connection; - /** - * The y-protocols/sync message type - * @example - * 0: SyncStep1 - * 1: SyncStep2 - * 2: YjsUpdate - * - * @see https://github.com/yjs/y-protocols/blob/master/sync.js#L13-L40 - */ - type: number; - /** - * The payload of the y-sync message. - */ - payload: Uint8Array; -} - -export interface beforeBroadcastStatelessPayload { - document: Document; - documentName: string; - payload: string; -} - -export interface onStoreDocumentPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - transactionOrigin?: any; -} - -// eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type -export interface afterStoreDocumentPayload extends onStoreDocumentPayload {} - -export interface onAwarenessUpdatePayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - added: number[]; - updated: number[]; - removed: number[]; - awareness: Awareness; - states: StatesArray; -} - -export type StatesArray = { clientId: number; [key: string | number]: any }[]; - -export interface fetchPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} - -export interface storePayload extends onStoreDocumentPayload { - state: Buffer; -} - -export interface onDisconnectPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; -} - -export interface onRequestPayload { - request: IncomingMessage; - response: ServerResponse; - instance: Hocuspocus; -} - -export interface onUpgradePayload { - request: IncomingMessage; - socket: any; - head: any; - instance: Hocuspocus; -} - -export interface onListenPayload { - instance: Hocuspocus; - configuration: Configuration; - port: number; -} - -export interface onDestroyPayload { - instance: Hocuspocus; -} - -export interface onConfigurePayload { - instance: Hocuspocus; - configuration: Configuration; - version: string; -} - -export interface afterUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; -} - -export interface beforeUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; - document: Document; -} - -export interface DirectConnection { - transact(transaction: (document: Document) => void): Promise; - disconnect(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/debounce.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/debounce.ts deleted file mode 100644 index 09b4ced..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/debounce.ts +++ /dev/null @@ -1,77 +0,0 @@ -export const useDebounce = () => { - const timers: Map< - string, - { - timeout: NodeJS.Timeout; - start: number; - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - func: () => any | Promise<() => any>; - } - > = new Map(); - - const runningExecutions: Map> = new Map(); - - const debounce = async ( - id: string, - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - func: () => any | Promise<() => any>, - debounce: number, - maxDebounce: number, - ) => { - const old = timers.get(id); - const start = old?.start || Date.now(); - - const run = async () => { - if (runningExecutions.has(id)) { - // wait for previous execution to finish - await runningExecutions.get(id); - } - - timers.delete(id); - - const execution = func(); - - runningExecutions.set(id, execution); - const executionResult = await execution; - runningExecutions.delete(id); - - return executionResult; - }; - - if (old?.timeout) { - clearTimeout(old.timeout); - } - - if (debounce === 0) { - return run(); - } - - if (Date.now() - start >= maxDebounce) { - return run(); - } - - timers.set(id, { - start, - timeout: setTimeout(run, debounce), - func: run, - }); - }; - - const executeNow = (id: string) => { - const old = timers.get(id); - if (old) { - clearTimeout(old.timeout); - return old.func(); - } - }; - - const isDebounced = (id: string): boolean => { - return timers.has(id); - }; - - const isCurrentlyExecuting = (id: string): boolean => { - return runningExecutions.has(id); - }; - - return { debounce, isDebounced, isCurrentlyExecuting, executeNow }; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/getParameters.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/getParameters.ts deleted file mode 100644 index 0a5c923..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/getParameters.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import { URLSearchParams } from "node:url"; - -/** - * Get parameters by the given request - */ -export function getParameters( - request?: Pick, -): URLSearchParams { - const query = request?.url?.split("?") || []; - return new URLSearchParams(query[1] ? query[1] : ""); -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-lock b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-lock deleted file mode 120000 index 06be896..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-lock +++ /dev/null @@ -1 +0,0 @@ -../../async-lock@1.4.1/node_modules/async-lock \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-mutex b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-mutex deleted file mode 120000 index ea6ff44..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-mutex +++ /dev/null @@ -1 +0,0 @@ -../../async-mutex@0.5.0/node_modules/async-mutex \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur deleted file mode 120000 index 535c894..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur +++ /dev/null @@ -1 +0,0 @@ -../../kleur@4.1.5/node_modules/kleur \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/lib0 b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/lib0 deleted file mode 120000 index e2cfd65..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/lib0 +++ /dev/null @@ -1 +0,0 @@ -../../lib0@0.2.117/node_modules/lib0 \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/ws b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/ws deleted file mode 120000 index 490b81d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/ws +++ /dev/null @@ -1 +0,0 @@ -../../ws@8.21.0/node_modules/ws \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/y-protocols b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/y-protocols deleted file mode 120000 index 6e8b568..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/y-protocols +++ /dev/null @@ -1 +0,0 @@ -../../y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs deleted file mode 120000 index c3bb19e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@3.4.4_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs +++ /dev/null @@ -1 +0,0 @@ -../../yjs@13.6.31/node_modules/yjs \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/common b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/common deleted file mode 120000 index 7418611..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/common +++ /dev/null @@ -1 +0,0 @@ -../../../@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/LICENSE.md deleted file mode 100644 index 8cb2084..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/README.md b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/README.md deleted file mode 100644 index 2d837f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# @hocuspocus/server -[![Version](https://img.shields.io/npm/v/@hocuspocus/server.svg?label=version)](https://www.npmjs.com/package/@hocuspocus/server) -[![Downloads](https://img.shields.io/npm/dm/@hocuspocus/server.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@hocuspocus/server.svg)](https://www.npmjs.com/package/@hocuspocus/server) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -The collaborative editing backend for [Tiptap](https://github.com/ueberdosis/tiptap). Built on [Y.js](https://github.com/yjs/yjs), runs on Node.js (22+), Bun, Deno, and Cloudflare Workers. - -## Installation - -```bash -npm install @hocuspocus/server -``` - -## Usage - -Minimal WebSocket server on port `1234`: - -```js -import { Server } from "@hocuspocus/server" - -const server = new Server({ - port: 1234, -}) - -server.listen() -``` - -Hook into the document lifecycle: - -```js -import { Server } from "@hocuspocus/server" - -const server = new Server({ - port: 1234, - - async onAuthenticate({ token }) { - if (token !== "super-secret-token") { - throw new Error("Not authorized!") - } - }, - - async onLoadDocument({ documentName }) { - // return a Y.Doc for new documents, or nothing to use the default empty doc - }, - - async onStoreDocument({ documentName, document }) { - // persist the Y.Doc binary state wherever you like - }, -}) - -server.listen() -``` - -For a database-backed server, combine with an extension like [`@hocuspocus/extension-sqlite`](../extension-sqlite) or [`@hocuspocus/extension-database`](../extension-database). - -## Non-Node.js runtimes - -Use the `Hocuspocus` class directly to attach to any `WebSocketLike` instance (Bun, Deno, Cloudflare Workers, Express, etc.): - -```js -import { Hocuspocus } from "@hocuspocus/server" - -const hocuspocus = new Hocuspocus({ /* config */ }) - -// pass any WebSocket-like instance + request + optional context: -hocuspocus.handleConnection(ws, request, context) -``` - -## Documentation - -Full reference, hooks, extensions, and scaling guides: [tiptap.dev/docs/hocuspocus](https://tiptap.dev/docs/hocuspocus). - -## License - -MIT — see [LICENSE.md](https://github.com/ueberdosis/hocuspocus/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs deleted file mode 100644 index 89784d0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs +++ /dev/null @@ -1,5606 +0,0 @@ -Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -//#region \0rolldown/runtime.js -var __create$1 = Object.create; -var __defProp$1 = Object.defineProperty; -var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor; -var __getOwnPropNames$1 = Object.getOwnPropertyNames; -var __getProtoOf$1 = Object.getPrototypeOf; -var __hasOwnProp$1 = Object.prototype.hasOwnProperty; -var __copyProps$1 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (var keys = __getOwnPropNames$1(from), i = 0, n = keys.length, key; i < n; i++) { - key = keys[i]; - if (!__hasOwnProp$1.call(to, key) && key !== except) { - __defProp$1(to, key, { - get: ((k) => from[k]).bind(null, key), - enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable - }); - } - } - } - return to; -}; -var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", { - value: mod, - enumerable: true -}) : target, mod)); - -//#endregion -let _hocuspocus_common = require("@hocuspocus/common"); -let lib0_decoding = require("lib0/decoding"); -lib0_decoding = __toESM$1(lib0_decoding); -let lib0_encoding = require("lib0/encoding"); -let y_protocols_awareness = require("y-protocols/awareness"); -let y_protocols_sync = require("y-protocols/sync"); -let yjs = require("yjs"); -yjs = __toESM$1(yjs); -let async_mutex = require("async-mutex"); -let node_crypto = require("node:crypto"); -node_crypto = __toESM$1(node_crypto); -let node_url = require("node:url"); -let node_http = require("node:http"); -let node_module = require("node:module"); -let kleur = require("kleur"); -kleur = __toESM$1(kleur); - -//#region packages/server/src/IncomingMessage.ts -var IncomingMessage = class { - constructor(input) { - if (!(input instanceof Uint8Array)) input = new Uint8Array(input); - this.decoder = (0, lib0_decoding.createDecoder)(input); - } - get encoder() { - if (!this.encoderInternal) this.encoderInternal = (0, lib0_encoding.createEncoder)(); - return this.encoderInternal; - } - readVarUint8Array() { - return (0, lib0_decoding.readVarUint8Array)(this.decoder); - } - peekVarUint8Array() { - const { pos } = this.decoder; - const result = (0, lib0_decoding.readVarUint8Array)(this.decoder); - this.decoder.pos = pos; - return result; - } - readVarUint() { - return (0, lib0_decoding.readVarUint)(this.decoder); - } - readVarString() { - return (0, lib0_decoding.readVarString)(this.decoder); - } - toUint8Array() { - return (0, lib0_encoding.toUint8Array)(this.encoder); - } - writeVarUint(type) { - (0, lib0_encoding.writeVarUint)(this.encoder, type); - } - writeVarString(string) { - (0, lib0_encoding.writeVarString)(this.encoder, string); - } - get length() { - return (0, lib0_encoding.length)(this.encoder); - } -}; - -//#endregion -//#region packages/server/src/types.ts -function isTransactionOrigin(origin) { - return typeof origin === "object" && origin !== null && "source" in origin && (origin.source === "connection" || origin.source === "redis" || origin.source === "local"); -} -function shouldSkipStoreHooks(origin) { - if (!isTransactionOrigin(origin)) return false; - switch (origin.source) { - case "connection": return false; - case "redis": return true; - case "local": return origin.skipStoreHooks ?? false; - } -} -let MessageType = /* @__PURE__ */ function(MessageType) { - MessageType[MessageType["Unknown"] = -1] = "Unknown"; - MessageType[MessageType["Sync"] = 0] = "Sync"; - MessageType[MessageType["Awareness"] = 1] = "Awareness"; - MessageType[MessageType["Auth"] = 2] = "Auth"; - MessageType[MessageType["QueryAwareness"] = 3] = "QueryAwareness"; - MessageType[MessageType["SyncReply"] = 4] = "SyncReply"; - MessageType[MessageType["Stateless"] = 5] = "Stateless"; - MessageType[MessageType["BroadcastStateless"] = 6] = "BroadcastStateless"; - MessageType[MessageType["CLOSE"] = 7] = "CLOSE"; - MessageType[MessageType["SyncStatus"] = 8] = "SyncStatus"; - MessageType[MessageType["Ping"] = 9] = "Ping"; - MessageType[MessageType["Pong"] = 10] = "Pong"; - return MessageType; -}({}); - -//#endregion -//#region packages/server/src/OutgoingMessage.ts -var OutgoingMessage = class { - constructor(documentName) { - this.encoder = (0, lib0_encoding.createEncoder)(); - (0, lib0_encoding.writeVarString)(this.encoder, documentName); - } - createSyncMessage() { - this.type = MessageType.Sync; - (0, lib0_encoding.writeVarUint)(this.encoder, MessageType.Sync); - return this; - } - createSyncReplyMessage() { - this.type = MessageType.SyncReply; - (0, lib0_encoding.writeVarUint)(this.encoder, MessageType.SyncReply); - return this; - } - createAwarenessUpdateMessage(awareness, changedClients) { - this.type = MessageType.Awareness; - this.category = "Update"; - const message = (0, y_protocols_awareness.encodeAwarenessUpdate)(awareness, changedClients || Array.from(awareness.getStates().keys())); - (0, lib0_encoding.writeVarUint)(this.encoder, MessageType.Awareness); - (0, lib0_encoding.writeVarUint8Array)(this.encoder, message); - return this; - } - writeQueryAwareness() { - this.type = MessageType.QueryAwareness; - this.category = "Update"; - (0, lib0_encoding.writeVarUint)(this.encoder, MessageType.QueryAwareness); - return this; - } - writeTokenSyncRequest() { - this.type = MessageType.Auth; - this.category = "TokenSync"; - (0, lib0_encoding.writeVarUint)(this.encoder, MessageType.Auth); - (0, _hocuspocus_common.writeTokenSyncRequest)(this.encoder); - return this; - } - writeAuthenticated(readonly) { - this.type = MessageType.Auth; - this.category = "Authenticated"; - (0, lib0_encoding.writeVarUint)(this.encoder, MessageType.Auth); - (0, _hocuspocus_common.writeAuthenticated)(this.encoder, readonly ? "readonly" : "read-write"); - return this; - } - writePermissionDenied(reason) { - this.type = MessageType.Auth; - this.category = "PermissionDenied"; - (0, lib0_encoding.writeVarUint)(this.encoder, MessageType.Auth); - (0, _hocuspocus_common.writePermissionDenied)(this.encoder, reason); - return this; - } - writeFirstSyncStepFor(document) { - this.category = "SyncStep1"; - (0, y_protocols_sync.writeSyncStep1)(this.encoder, document); - return this; - } - writeUpdate(update) { - this.category = "Update"; - (0, y_protocols_sync.writeUpdate)(this.encoder, update); - return this; - } - writeStateless(payload) { - this.category = "Stateless"; - (0, lib0_encoding.writeVarUint)(this.encoder, MessageType.Stateless); - (0, lib0_encoding.writeVarString)(this.encoder, payload); - return this; - } - writeBroadcastStateless(payload) { - this.category = "Stateless"; - (0, lib0_encoding.writeVarUint)(this.encoder, MessageType.BroadcastStateless); - (0, lib0_encoding.writeVarString)(this.encoder, payload); - return this; - } - writeSyncStatus(updateSaved) { - this.category = "SyncStatus"; - (0, lib0_encoding.writeVarUint)(this.encoder, MessageType.SyncStatus); - (0, lib0_encoding.writeVarUint)(this.encoder, updateSaved ? 1 : 0); - return this; - } - writeCloseMessage(reason) { - this.type = MessageType.CLOSE; - (0, lib0_encoding.writeVarUint)(this.encoder, MessageType.CLOSE); - (0, lib0_encoding.writeVarString)(this.encoder, reason); - return this; - } - toUint8Array() { - return (0, lib0_encoding.toUint8Array)(this.encoder); - } -}; - -//#endregion -//#region packages/server/src/MessageReceiver.ts -var MessageReceiver = class { - constructor(message, defaultTransactionOrigin) { - this.message = message; - this.defaultTransactionOrigin = defaultTransactionOrigin; - } - async apply(document, connection, reply) { - const { message } = this; - const type = message.readVarUint(); - const emptyMessageLength = message.length; - switch (type) { - case MessageType.Sync: - case MessageType.SyncReply: - message.writeVarUint(MessageType.Sync); - await this.readSyncMessage(message, document, connection, reply, type !== MessageType.SyncReply); - if (message.length > emptyMessageLength + 1) { - if (reply) reply(message.toUint8Array()); - else if (connection) connection.send(message.toUint8Array()); - } - break; - case MessageType.Awareness: { - let update = message.readVarUint8Array(); - const origin = connection ? { - source: "connection", - connection - } : this.defaultTransactionOrigin ?? { source: "local" }; - const scratch = new y_protocols_awareness.Awareness(new yjs.Doc()); - (0, y_protocols_awareness.applyAwarenessUpdate)(scratch, update, null); - await document.callbacks.beforeHandleAwareness(document, scratch.getStates(), origin); - update = (0, y_protocols_awareness.encodeAwarenessUpdate)(scratch, [...scratch.getStates().keys()]); - (0, y_protocols_awareness.applyAwarenessUpdate)(document.awareness, update, origin); - break; - } - case MessageType.QueryAwareness: - this.applyQueryAwarenessMessage(document, connection, reply); - break; - case MessageType.Stateless: - connection?.callbacks.statelessCallback({ - connection, - documentName: document.name, - document, - payload: (0, lib0_decoding.readVarString)(message.decoder) - }); - break; - case MessageType.BroadcastStateless: { - const msg = message.readVarString(); - document.getConnections().forEach((connection) => { - connection.sendStateless(msg); - }); - break; - } - case MessageType.CLOSE: - connection?.close({ - code: 1e3, - reason: "provider_initiated" - }); - break; - case MessageType.Auth: - if (message.readVarUint() === _hocuspocus_common.AuthMessageType.Token) { - connection?.callbacks.onTokenSyncCallback({ token: message.readVarString() }); - break; - } - console.error("Received an authentication message on a connection that is already fully authenticated. Probably your provider has been destroyed + recreated really fast."); - break; - default: console.error(`Unable to handle message of type ${type}: no handler defined! Are your provider/server versions aligned?`); - } - } - async readSyncMessage(message, document, connection, reply, requestFirstSync = true) { - const type = message.readVarUint(); - const messageAddress = connection?.messageAddress ?? document.name; - if (connection) await connection.callbacks.beforeSync(connection, { - type, - payload: message.peekVarUint8Array() - }); - switch (type) { - case y_protocols_sync.messageYjsSyncStep1: - (0, y_protocols_sync.readSyncStep1)(message.decoder, message.encoder, document); - if (reply && requestFirstSync) reply(new OutgoingMessage(messageAddress).createSyncReplyMessage().writeFirstSyncStepFor(document).toUint8Array()); - else if (connection) { - const syncMessage = new OutgoingMessage(messageAddress).createSyncMessage().writeFirstSyncStepFor(document); - connection.send(syncMessage.toUint8Array()); - } - break; - case y_protocols_sync.messageYjsSyncStep2: - if (connection?.readOnly) { - const snapshot = yjs.snapshot(document); - const update = lib0_decoding.readVarUint8Array(message.decoder); - if (yjs.snapshotContainsUpdate(snapshot, update)) { - const ackMessage = new OutgoingMessage(messageAddress).writeSyncStatus(true); - connection.send(ackMessage.toUint8Array()); - } else { - const ackMessage = new OutgoingMessage(messageAddress).writeSyncStatus(false); - connection.send(ackMessage.toUint8Array()); - } - break; - } - (0, y_protocols_sync.readSyncStep2)(message.decoder, document, connection ? { - source: "connection", - connection - } : this.defaultTransactionOrigin ?? { source: "local" }); - if (connection) connection.send(new OutgoingMessage(messageAddress).writeSyncStatus(true).toUint8Array()); - break; - case y_protocols_sync.messageYjsUpdate: - if (connection?.readOnly) { - connection.send(new OutgoingMessage(messageAddress).writeSyncStatus(false).toUint8Array()); - break; - } - (0, y_protocols_sync.readUpdate)(message.decoder, document, connection ? { - source: "connection", - connection - } : this.defaultTransactionOrigin ?? { source: "local" }); - if (connection) connection.send(new OutgoingMessage(messageAddress).writeSyncStatus(true).toUint8Array()); - break; - default: throw new Error(`Received a message with an unknown type: ${type}`); - } - return type; - } - applyQueryAwarenessMessage(document, connection, reply) { - const message = new OutgoingMessage(connection?.messageAddress ?? document.name).createAwarenessUpdateMessage(document.awareness); - if (reply) reply(message.toUint8Array()); - } -}; - -//#endregion -//#region packages/server/src/Connection.ts -var Connection = class { - /** - * The address string prefixed to outgoing messages. - * Session-aware clients get `documentName\0sessionId`; legacy clients get plain `documentName`. - */ - get messageAddress() { - return this.sessionId ? `${this.document.name}\0${this.sessionId}` : this.document.name; - } - /** - * Constructor. - */ - constructor(connection, request, document, socketId, context, readOnly = false, sessionId, providerVersion) { - this.callbacks = { - onClose: [(document, event) => {}], - beforeHandleMessage: (connection, update) => Promise.resolve(), - beforeSync: (connection, payload) => Promise.resolve(), - statelessCallback: (payload) => Promise.resolve(), - onTokenSyncCallback: (payload) => Promise.resolve() - }; - this.messageQueue = []; - this.processingPromise = Promise.resolve(); - this.webSocket = connection; - this.context = context; - this.document = document; - this.request = request; - this.socketId = socketId; - this.readOnly = readOnly; - this.sessionId = sessionId ?? null; - this.providerVersion = providerVersion ?? null; - this.document.addConnection(this); - this.sendCurrentAwareness(); - } - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback) { - this.callbacks.onClose.push(callback); - return this; - } - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback(callback) { - this.callbacks.statelessCallback = callback; - return this; - } - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage(callback) { - this.callbacks.beforeHandleMessage = callback; - return this; - } - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync(callback) { - this.callbacks.beforeSync = callback; - return this; - } - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback(callback) { - this.callbacks.onTokenSyncCallback = callback; - return this; - } - /** - * Returns a promise that resolves when all queued messages have been processed. - */ - waitForPendingMessages() { - return this.processingPromise; - } - /** - * Send the given message - */ - send(message) { - if (this.webSocket.readyState === _hocuspocus_common.WsReadyStates.Closing || this.webSocket.readyState === _hocuspocus_common.WsReadyStates.Closed) { - this.close(); - return; - } - try { - this.webSocket.send(message); - } catch (exception) { - this.close(); - } - } - /** - * Send a stateless message with payload - */ - sendStateless(payload) { - const message = new OutgoingMessage(this.messageAddress).writeStateless(payload); - this.send(message.toUint8Array()); - } - /** - * Request current token from the client - */ - requestToken() { - const message = new OutgoingMessage(this.messageAddress).writeTokenSyncRequest(); - this.send(message.toUint8Array()); - } - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event) { - if (this.document.hasConnection(this)) { - this.document.removeConnection(this); - this.callbacks.onClose.forEach((callback) => callback(this.document, event)); - const closeMessage = new OutgoingMessage(this.messageAddress); - closeMessage.writeCloseMessage(event?.reason ?? "Server closed the connection"); - this.send(closeMessage.toUint8Array()); - } - } - /** - * Send the current document awareness to the client, if any - * @private - */ - sendCurrentAwareness() { - if (!this.document.hasAwarenessStates()) return; - const awarenessMessage = new OutgoingMessage(this.messageAddress).createAwarenessUpdateMessage(this.document.awareness); - this.send(awarenessMessage.toUint8Array()); - } - /** - * Handle an incoming message - * @public - */ - handleMessage(data) { - this.messageQueue.push(data); - if (this.messageQueue.length === 1) this.processingPromise = this.processMessages(); - } - async processMessages() { - while (this.messageQueue.length > 0) { - const rawUpdate = this.messageQueue.at(0); - const message = new IncomingMessage(rawUpdate); - const rawKey = message.readVarString(); - const sepIdx = rawKey.indexOf("\0"); - const documentName = sepIdx === -1 ? rawKey : rawKey.substring(0, sepIdx); - if (documentName !== this.document.name) { - this.messageQueue.shift(); - continue; - } - message.writeVarString(this.messageAddress); - try { - await this.callbacks.beforeHandleMessage(this, rawUpdate); - await new MessageReceiver(message).apply(this.document, this); - } catch (e) { - console.error(`closing connection ${this.socketId} (while handling ${documentName}) because of exception`, e); - this.close({ - code: "code" in e && typeof e.code === "number" ? e.code : _hocuspocus_common.ResetConnection.code, - reason: "reason" in e ? e.reason : _hocuspocus_common.ResetConnection.reason - }); - } - this.messageQueue.shift(); - } - } -}; - -//#endregion -//#region packages/server/src/Document.ts -var Document = class extends yjs.Doc { - /** - * Constructor. - */ - constructor(name, yDocOptions) { - super(yDocOptions); - this.callbacks = { - onUpdate: (document, origin, update) => {}, - beforeBroadcastStateless: (document, stateless) => {}, - beforeHandleAwareness: (document, states, transactionOrigin) => Promise.resolve() - }; - this.connections = /* @__PURE__ */ new Map(); - this.directConnectionsCount = 0; - this.isDestroyed = false; - this.saveMutex = new async_mutex.Mutex(); - this.lastChangeTime = 0; - this.name = name; - this.awareness = new y_protocols_awareness.Awareness(this); - this.awareness.setLocalState(null); - this.awareness.on("update", this.handleAwarenessUpdate.bind(this)); - this.on("update", this.handleUpdate.bind(this)); - this.isLoading = true; - } - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName) { - return !this.get(fieldName)._start && !this.get(fieldName)._map.size; - } - /** - * Merge the given document(s) into this one - */ - merge(documents) { - (Array.isArray(documents) ? documents : [documents]).forEach((document) => { - (0, yjs.applyUpdate)(this, (0, yjs.encodeStateAsUpdate)(document)); - }); - return this; - } - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate(callback) { - this.callbacks.onUpdate = callback; - return this; - } - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless(callback) { - this.callbacks.beforeBroadcastStateless = callback; - return this; - } - /** - * Set a callback that will be triggered before an inbound awareness update - * is applied to this document's awareness state. The callback receives the - * document, the decoded per-client states as a mutable `Map`, and the - * `TransactionOrigin` that will be forwarded to `applyAwarenessUpdate`. - * Use `isTransactionOrigin(origin)` to discriminate sources. Mutate the - * map in place (set/delete/field changes) to rewrite the update, or throw - * to reject it entirely. - */ - beforeHandleAwareness(callback) { - this.callbacks.beforeHandleAwareness = callback; - return this; - } - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection) { - this.connections.set(connection, { clients: /* @__PURE__ */ new Set() }); - return this; - } - /** - * Is the given connection registered on this document - */ - hasConnection(connection) { - return this.connections.has(connection); - } - /** - * Remove the given connection from this document - */ - removeConnection(connection) { - const entry = this.connections.get(connection); - if (entry) (0, y_protocols_awareness.removeAwarenessStates)(this.awareness, Array.from(entry.clients), null); - this.connections.delete(connection); - return this; - } - addDirectConnection() { - this.directConnectionsCount += 1; - return this; - } - removeDirectConnection() { - if (this.directConnectionsCount > 0) this.directConnectionsCount -= 1; - return this; - } - /** - * Get the number of active connections for this document - */ - getConnectionsCount() { - return this.connections.size + this.directConnectionsCount; - } - /** - * Get an array of registered connections - */ - getConnections() { - return Array.from(this.connections.keys()); - } - /** - * Get the client ids for the given connection instance - */ - getClients(connection) { - const entry = this.connections.get(connection); - return entry?.clients === void 0 ? /* @__PURE__ */ new Set() : entry.clients; - } - /** - * Has the document awareness states - */ - hasAwarenessStates() { - return this.awareness.getStates().size > 0; - } - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection, update) { - (0, y_protocols_awareness.applyAwarenessUpdate)(this.awareness, update, { - source: "connection", - connection - }); - return this; - } - /** - * Handle an awareness update and sync changes to clients - * @private - */ - handleAwarenessUpdate({ added, updated, removed }, origin) { - const changedClients = added.concat(updated, removed); - const originConnection = isTransactionOrigin(origin) && origin.source === "connection" ? origin.connection : null; - if (originConnection !== null) { - const entry = this.connections.get(originConnection); - if (entry) { - added.forEach((clientId) => entry.clients.add(clientId)); - removed.forEach((clientId) => entry.clients.delete(clientId)); - } - } - for (const connection of this.getConnections()) { - const awarenessMessage = new OutgoingMessage(connection.messageAddress).createAwarenessUpdateMessage(this.awareness, changedClients); - connection.send(awarenessMessage.toUint8Array()); - } - return this; - } - /** - * Handle an updated document and sync changes to clients - */ - handleUpdate(update, origin) { - this.callbacks.onUpdate(this, origin, update); - for (const connection of this.getConnections()) { - const message = new OutgoingMessage(connection.messageAddress).createSyncMessage().writeUpdate(update); - connection.send(message.toUint8Array()); - } - return this; - } - /** - * Broadcast stateless message to all connections - */ - broadcastStateless(payload, filter) { - this.callbacks.beforeBroadcastStateless(this, payload); - (filter ? this.getConnections().filter(filter) : this.getConnections()).forEach((connection) => { - connection.sendStateless(payload); - }); - } - destroy() { - super.destroy(); - this.isDestroyed = true; - } -}; - -//#endregion -//#region packages/server/package.json -var version = "4.1.0"; - -//#endregion -//#region packages/server/src/util/getParameters.ts -/** -* Get parameters by the given request -*/ -function getParameters(request) { - const url = request?.url; - if (!url) return new URLSearchParams(); - return url.includes("://") ? new URL(url).searchParams : new URLSearchParams(url.split("?")[1] || ""); -} - -//#endregion -//#region packages/server/src/ClientConnection.ts -/** -* The `ClientConnection` class is responsible for handling an incoming WebSocket -* -* TODO-refactor: -* - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts -*/ -var ClientConnection = class { - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it'll fully establish the connection and - * load the Document then. - */ - constructor(websocket, request, documentProvider, hooks, opts, defaultContext = {}) { - this.websocket = websocket; - this.request = request; - this.documentProvider = documentProvider; - this.hooks = hooks; - this.opts = opts; - this.defaultContext = defaultContext; - this.documentConnections = {}; - this.incomingMessageQueue = {}; - this.documentConnectionsEstablished = /* @__PURE__ */ new Set(); - this.hookPayloads = {}; - this.callbacks = { onClose: [(document, payload) => {}] }; - this.socketId = node_crypto.default.randomUUID(); - this.lastMessageReceivedAt = Date.now(); - this.check = () => { - if (Date.now() - this.lastMessageReceivedAt > this.timeout) this.close(_hocuspocus_common.ConnectionTimeout); - }; - this.setUpNewConnection = async (rawKey, documentName, sessionId) => { - const hookPayload = this.hookPayloads[rawKey]; - const document = await this.documentProvider.createDocument(documentName, hookPayload.request, hookPayload.socketId, hookPayload.connectionConfig, hookPayload.context); - const connection = this.createConnection(this.websocket, document, hookPayload, sessionId, hookPayload.providerVersion); - connection.onClose((document, event) => { - delete this.hookPayloads[rawKey]; - delete this.documentConnections[rawKey]; - delete this.incomingMessageQueue[rawKey]; - this.documentConnectionsEstablished.delete(rawKey); - }); - connection.onTokenSyncCallback(async (payload) => { - try { - return await this.hooks("onTokenSync", { - ...hookPayload, - ...payload, - document, - connection, - documentName - }, (contextAdditions) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions - }; - }); - } catch (err) { - console.error(err); - const error = { - ..._hocuspocus_common.Unauthorized, - ...err - }; - connection.close({ - code: error.code, - reason: error.reason - }); - } - }); - this.documentConnections[rawKey] = connection; - if (this.websocket.readyState === _hocuspocus_common.WsReadyStates.Closing || this.websocket.readyState === _hocuspocus_common.WsReadyStates.Closed) { - this.close(); - return; - } - this.incomingMessageQueue[rawKey]?.forEach((input) => { - connection.handleMessage(input); - }); - await this.hooks("connected", { - ...hookPayload, - documentName, - context: hookPayload.context, - connection - }); - }; - this.handleQueueingMessage = async (data, rawKey, documentName) => { - try { - const tmpMsg = new IncomingMessage(data); - lib0_decoding.readVarString(tmpMsg.decoder); - if (!(lib0_decoding.readVarUint(tmpMsg.decoder) === MessageType.Auth && !this.documentConnectionsEstablished.has(rawKey))) { - this.incomingMessageQueue[rawKey].push(data); - return; - } - this.documentConnectionsEstablished.add(rawKey); - lib0_decoding.readVarUint(tmpMsg.decoder); - const token = lib0_decoding.readVarString(tmpMsg.decoder); - let providerVersion = null; - if (lib0_decoding.hasContent(tmpMsg.decoder)) providerVersion = lib0_decoding.readVarString(tmpMsg.decoder); - const sepIdx = rawKey.indexOf("\0"); - const sessionId = sepIdx === -1 ? null : rawKey.substring(sepIdx + 1); - const responseAddress = rawKey; - try { - const hookPayload = this.hookPayloads[rawKey]; - hookPayload.providerVersion = providerVersion; - await this.hooks("onConnect", { - ...hookPayload, - documentName - }, (contextAdditions) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions - }; - }); - await this.hooks("onAuthenticate", { - token, - ...hookPayload, - documentName - }, (contextAdditions) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions - }; - }); - hookPayload.connectionConfig.isAuthenticated = true; - const message = new OutgoingMessage(responseAddress).writeAuthenticated(hookPayload.connectionConfig.readOnly); - this.websocket.send(message.toUint8Array()); - await this.setUpNewConnection(rawKey, documentName, sessionId); - } catch (err) { - const error = err || _hocuspocus_common.Forbidden; - const message = new OutgoingMessage(responseAddress).writePermissionDenied(error.reason ?? "permission-denied"); - this.websocket.send(message.toUint8Array()); - this.documentConnectionsEstablished.delete(rawKey); - delete this.hookPayloads[rawKey]; - delete this.incomingMessageQueue[rawKey]; - } - } catch (error) { - console.error(error); - this.websocket.close(_hocuspocus_common.ResetConnection.code, _hocuspocus_common.ResetConnection.reason); - } - }; - this.handleMessage = (data) => { - this.lastMessageReceivedAt = Date.now(); - try { - const tmpMsg = new IncomingMessage(data); - const rawKey = lib0_decoding.readVarString(tmpMsg.decoder); - const sepIdx = rawKey.indexOf("\0"); - const documentName = sepIdx === -1 ? rawKey : rawKey.substring(0, sepIdx); - const connection = this.documentConnections[rawKey] ?? this.documentConnections[documentName]; - if (connection) { - connection.handleMessage(data); - return; - } - if (this.incomingMessageQueue[rawKey] === void 0) { - this.incomingMessageQueue[rawKey] = []; - if (this.hookPayloads[rawKey]) throw new Error("first message, but hookPayloads exists"); - this.hookPayloads[rawKey] = { - instance: this.documentProvider, - request: this.request, - connectionConfig: { - readOnly: false, - isAuthenticated: false - }, - requestHeaders: this.request.headers, - requestParameters: getParameters(this.request), - socketId: this.socketId, - context: { ...this.defaultContext }, - providerVersion: null - }; - } - this.handleQueueingMessage(data, rawKey, documentName); - } catch (closeError) { - console.error(closeError); - this.websocket.close(_hocuspocus_common.Unauthorized.code, _hocuspocus_common.Unauthorized.reason); - } - }; - this.timeout = opts.timeout; - this.pingInterval = setInterval(this.check, this.timeout); - } - /** - * Handle WebSocket close event. Call this from your integration - * when the WebSocket connection closes. - */ - handleClose(event) { - this.close(event); - clearInterval(this.pingInterval); - } - close(event) { - Object.values(this.documentConnections).forEach((connection) => connection.close(event)); - } - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback) { - this.callbacks.onClose.push(callback); - return this; - } - /** - * Create a new connection by the given request and document - */ - createConnection(connection, document, hookPayload, sessionId, providerVersion) { - const instance = new Connection(connection, hookPayload.request, document, hookPayload.socketId, hookPayload.context, hookPayload.connectionConfig.readOnly, sessionId, providerVersion); - instance.onClose(async (document, event) => { - await instance.waitForPendingMessages(); - const disconnectHookPayload = { - instance: this.documentProvider, - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request) - }; - await this.hooks("onDisconnect", disconnectHookPayload); - this.callbacks.onClose.forEach((callback) => callback(document, disconnectHookPayload)); - }); - instance.onStatelessCallback(async (payload) => { - try { - return await this.hooks("onStateless", payload); - } catch (error) { - if (error?.message) throw error; - } - }); - instance.beforeHandleMessage((connection, update) => { - const beforeHandleMessagePayload = { - instance: this.documentProvider, - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - connection, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request), - update - }; - return this.hooks("beforeHandleMessage", beforeHandleMessagePayload); - }); - instance.beforeSync((connection, payload) => { - const beforeSyncPayload = { - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - documentName: document.name, - connection, - type: payload.type, - payload: payload.payload - }; - return this.hooks("beforeSync", beforeSyncPayload); - }); - return instance; - } -}; - -//#endregion -//#region packages/server/src/DirectConnection.ts -var DirectConnection = class { - /** - * Constructor. - */ - constructor(document, instance, context) { - this.document = null; - this.document = document; - this.instance = instance; - this.context = context ?? {}; - this.document.addDirectConnection(); - } - async transact(transaction) { - if (!this.document) throw new Error("direct connection closed"); - this.document.transact((x) => { - transaction(this.document); - }, { - source: "local", - context: this.context - }); - } - async disconnect() { - if (this.document) { - this.document?.removeDirectConnection(); - await this.instance.storeDocumentHooks(this.document, { - clientsCount: this.document.getConnectionsCount(), - lastContext: this.context, - lastTransactionOrigin: { - source: "local", - context: this.context - }, - document: this.document, - documentName: this.document.name, - instance: this.instance - }, true); - if (this.document.getConnectionsCount() === 0 && !this.document.saveMutex.isLocked()) { - await this.instance.hooks("onDisconnect", { - instance: this.instance, - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - socketId: "server", - documentName: this.document.name, - requestHeaders: new Headers(), - requestParameters: new node_url.URLSearchParams() - }); - await this.instance.unloadDocument(this.document); - } - this.document = null; - } - } -}; - -//#endregion -//#region packages/server/src/util/debounce.ts -const useDebounce = () => { - const timers = /* @__PURE__ */ new Map(); - const runningExecutions = /* @__PURE__ */ new Map(); - const debounce = async (id, func, debounce, maxDebounce) => { - const old = timers.get(id); - const start = old?.start || Date.now(); - const run = async () => { - if (runningExecutions.has(id)) await runningExecutions.get(id); - timers.delete(id); - const execution = func(); - runningExecutions.set(id, execution); - const executionResult = await execution; - runningExecutions.delete(id); - return executionResult; - }; - if (old?.timeout) clearTimeout(old.timeout); - if (debounce === 0) return run(); - if (Date.now() - start >= maxDebounce) return run(); - timers.set(id, { - start, - timeout: setTimeout(run, debounce), - func: run - }); - }; - const executeNow = (id) => { - const old = timers.get(id); - if (old) { - clearTimeout(old.timeout); - return old.func(); - } - }; - const isDebounced = (id) => { - return timers.has(id); - }; - const isCurrentlyExecuting = (id) => { - return runningExecutions.has(id); - }; - return { - debounce, - isDebounced, - isCurrentlyExecuting, - executeNow - }; -}; - -//#endregion -//#region packages/server/src/Hocuspocus.ts -const defaultConfiguration = { - name: null, - timeout: 6e4, - debounce: 2e3, - maxDebounce: 1e4, - quiet: false, - yDocOptions: { - gc: true, - gcFilter: () => true - }, - unloadImmediately: true -}; -var Hocuspocus = class { - constructor(configuration) { - this.configuration = { - ...defaultConfiguration, - extensions: [], - onConfigure: () => new Promise((r) => r(null)), - onListen: () => new Promise((r) => r(null)), - onUpgrade: () => new Promise((r) => r(null)), - onConnect: () => new Promise((r) => r(null)), - connected: () => new Promise((r) => r(null)), - beforeHandleMessage: () => new Promise((r) => r(null)), - beforeHandleAwareness: () => new Promise((r) => r()), - beforeSync: () => new Promise((r) => r(null)), - beforeBroadcastStateless: () => new Promise((r) => r(null)), - onStateless: () => new Promise((r) => r(null)), - onChange: () => new Promise((r) => r(null)), - onCreateDocument: () => new Promise((r) => r(null)), - onLoadDocument: () => new Promise((r) => r(null)), - onStoreDocument: () => new Promise((r) => r(null)), - afterStoreDocument: () => new Promise((r) => r(null)), - onAwarenessUpdate: () => new Promise((r) => r(null)), - onRequest: () => new Promise((r) => r(null)), - onDisconnect: () => new Promise((r) => r(null)), - onDestroy: () => new Promise((r) => r(null)) - }; - this.loadingDocuments = /* @__PURE__ */ new Map(); - this.unloadingDocuments = /* @__PURE__ */ new Map(); - this.documents = /* @__PURE__ */ new Map(); - this.debouncer = useDebounce(); - if (configuration) this.configure(configuration); - } - /** - * Configure Hocuspocus - */ - configure(configuration) { - this.configuration = { - ...this.configuration, - ...configuration - }; - this.configuration.extensions.sort((a, b) => { - const one = typeof a.priority === "undefined" ? 100 : a.priority; - const two = typeof b.priority === "undefined" ? 100 : b.priority; - if (one > two) return -1; - if (one < two) return 1; - return 0; - }); - this.configuration.extensions.push({ - onConfigure: this.configuration.onConfigure, - onListen: this.configuration.onListen, - onUpgrade: this.configuration.onUpgrade, - onConnect: this.configuration.onConnect, - connected: this.configuration.connected, - onAuthenticate: this.configuration.onAuthenticate, - onTokenSync: this.configuration.onTokenSync, - onLoadDocument: this.configuration.onLoadDocument, - afterLoadDocument: this.configuration.afterLoadDocument, - beforeHandleMessage: this.configuration.beforeHandleMessage, - beforeHandleAwareness: this.configuration.beforeHandleAwareness, - beforeBroadcastStateless: this.configuration.beforeBroadcastStateless, - beforeSync: this.configuration.beforeSync, - onStateless: this.configuration.onStateless, - onChange: this.configuration.onChange, - onStoreDocument: this.configuration.onStoreDocument, - afterStoreDocument: this.configuration.afterStoreDocument, - onAwarenessUpdate: this.configuration.onAwarenessUpdate, - onRequest: this.configuration.onRequest, - beforeUnloadDocument: this.configuration.beforeUnloadDocument, - afterUnloadDocument: this.configuration.afterUnloadDocument, - onDisconnect: this.configuration.onDisconnect, - onDestroy: this.configuration.onDestroy - }); - this.hooks("onConfigure", { - configuration: this.configuration, - version, - instance: this - }); - return this; - } - /** - * Get the total number of active documents - */ - getDocumentsCount() { - return this.documents.size; - } - /** - * Get the total number of active connections - */ - getConnectionsCount() { - const uniqueSocketIds = /* @__PURE__ */ new Set(); - const totalDirectConnections = Array.from(this.documents.values()).reduce((acc, document) => { - document.getConnections().forEach(({ socketId }) => { - uniqueSocketIds.add(socketId); - }); - return acc + document.directConnectionsCount; - }, 0); - return uniqueSocketIds.size + totalDirectConnections; - } - /** - * Immediately execute all pending debounced onStoreDocument calls. - * Useful during shutdown to ensure documents are persisted and unloaded - * before the server exits, even when unloadImmediately is false. - */ - flushPendingStores() { - this.documents.forEach((document) => { - const debounceId = `onStoreDocument-${document.name}`; - if (!document.isLoading && this.debouncer.isDebounced(debounceId)) this.debouncer.executeNow(debounceId); - }); - } - /** - * Force close one or more connections - */ - closeConnections(documentName) { - this.documents.forEach((document) => { - if (documentName && document.name !== documentName) return; - document.connections.forEach((_clients, connection) => { - connection.close(_hocuspocus_common.ResetConnection); - }); - }); - } - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it'll fully establish the connection and - * load the Document then. - */ - handleConnection(incoming, request, defaultContext = {}) { - const clientConnection = new ClientConnection(incoming, request, this, this.hooks.bind(this), { timeout: this.configuration.timeout }, defaultContext); - clientConnection.onClose((document, hookPayload) => { - if (document.getConnectionsCount() > 0) return; - if (!document.isLoading && this.debouncer.isDebounced(`onStoreDocument-${document.name}`)) { - if (this.configuration.unloadImmediately) this.debouncer.executeNow(`onStoreDocument-${document.name}`); - } else this.unloadDocument(document); - }); - return clientConnection; - } - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - handleDocumentUpdate(document, origin, update) { - const connection = isTransactionOrigin(origin) && origin.source === "connection" ? origin.connection : void 0; - const request = connection?.request; - const context = isTransactionOrigin(origin) ? origin.source === "connection" ? origin.connection.context : origin.source === "local" ? origin.context ?? {} : {} : {}; - const changePayload = { - instance: this, - clientsCount: document.getConnectionsCount(), - document, - documentName: document.name, - requestHeaders: request?.headers ?? new Headers(), - requestParameters: getParameters(request), - socketId: connection?.socketId ?? "", - update, - transactionOrigin: origin, - connection, - context - }; - this.hooks("onChange", changePayload); - if (shouldSkipStoreHooks(origin)) return; - const storePayload = { - instance: this, - clientsCount: document.getConnectionsCount(), - document, - lastContext: context, - lastTransactionOrigin: origin, - documentName: document.name - }; - this.storeDocumentHooks(document, storePayload); - } - /** - * Create a new document by the given request - */ - async createDocument(documentName, request, socketId, connection, context) { - if (!documentName.trim()) throw new Error("Document name must not be empty"); - const existingLoadingDoc = this.loadingDocuments.get(documentName); - if (existingLoadingDoc) return existingLoadingDoc; - const existingDoc = this.documents.get(documentName); - if (existingDoc) return Promise.resolve(existingDoc); - const loadDocPromise = this.loadDocument(documentName, request, socketId, connection, context); - this.loadingDocuments.set(documentName, loadDocPromise); - try { - const doc = await loadDocPromise; - this.documents.set(documentName, doc); - this.loadingDocuments.delete(documentName); - return doc; - } catch (e) { - this.loadingDocuments.delete(documentName); - throw e; - } - } - async loadDocument(documentName, request, socketId, connectionConfig, context) { - const requestHeaders = request.headers; - const requestParameters = getParameters(request); - const resolvedContext = context ?? {}; - const yDocOptions = await this.hooks("onCreateDocument", { - documentName, - requestHeaders, - requestParameters, - connectionConfig, - context: resolvedContext, - socketId, - instance: this - }); - const document = new Document(documentName, { - ...this.configuration.yDocOptions, - ...yDocOptions - }); - const hookPayload = { - instance: this, - context: resolvedContext, - connectionConfig, - document, - documentName, - socketId, - requestHeaders, - requestParameters - }; - try { - await this.hooks("onLoadDocument", hookPayload, (loadedDocument) => { - if (loadedDocument instanceof yjs.Doc) (0, yjs.applyUpdate)(document, (0, yjs.encodeStateAsUpdate)(loadedDocument)); - else if (loadedDocument instanceof Uint8Array) (0, yjs.applyUpdate)(document, loadedDocument); - }); - } catch (e) { - this.closeConnections(documentName); - this.unloadDocument(document); - throw e; - } - document.isLoading = false; - document.onUpdate((document, origin, update) => { - document.lastChangeTime = Date.now(); - this.handleDocumentUpdate(document, origin, update); - }); - await this.hooks("afterLoadDocument", hookPayload); - document.beforeBroadcastStateless((document, stateless) => { - const hookPayload = { - document, - documentName: document.name, - payload: stateless - }; - this.hooks("beforeBroadcastStateless", hookPayload); - }); - document.beforeHandleAwareness((document, states, transactionOrigin) => { - const connection = isTransactionOrigin(transactionOrigin) && transactionOrigin.source === "connection" ? transactionOrigin.connection : void 0; - const request = connection?.request; - return this.hooks("beforeHandleAwareness", { - awareness: document.awareness, - clientsCount: document.getConnectionsCount(), - context: connection?.context, - document, - documentName: document.name, - instance: this, - requestHeaders: request?.headers ?? new Headers(), - requestParameters: request ? getParameters(request) : new URLSearchParams(), - socketId: connection?.socketId ?? "", - transactionOrigin, - connection, - states - }); - }); - document.awareness.on("update", (update, origin) => { - this.hooks("onAwarenessUpdate", { - document, - documentName, - instance: this, - ...update, - transactionOrigin: origin, - connection: isTransactionOrigin(origin) && origin.source === "connection" ? origin.connection : void 0, - awareness: document.awareness, - states: (0, _hocuspocus_common.awarenessStatesToArray)(document.awareness.getStates()) - }); - }); - return document; - } - storeDocumentHooks(document, hookPayload, immediately) { - const debounceId = `onStoreDocument-${document.name}`; - return this.debouncer.debounce(debounceId, async () => { - try { - await document.saveMutex.runExclusive(async () => { - await this.hooks("onStoreDocument", hookPayload); - await this.hooks("afterStoreDocument", hookPayload); - }); - } catch (error) { - if (error instanceof _hocuspocus_common.SkipFurtherHooksError) { - setTimeout(() => { - if (this.shouldUnloadDocument(document)) this.unloadDocument(document); - }, 0); - return; - } - console.error("Caught error during storeDocumentHooks. Document stays in memory to avoid data loss", error); - return; - } - setTimeout(() => { - if (this.shouldUnloadDocument(document)) this.unloadDocument(document); - }, 0); - }, immediately ? 0 : this.configuration.debounce, this.configuration.maxDebounce); - } - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - hooks(name, payload, callback = null) { - const { extensions } = this.configuration; - let chain = Promise.resolve(); - extensions.filter((extension) => typeof extension[name] === "function").forEach((extension) => { - chain = chain.then(() => extension[name]?.(payload)).catch((error) => { - if (error?.message) console.error(`[${name}]`, error.message); - throw error; - }); - if (callback) chain = chain.then((...args) => callback(...args)); - }); - return chain; - } - shouldUnloadDocument(document) { - return (this.debouncer.isDebounced(`onStoreDocument-${document.name}`) || this.debouncer.isCurrentlyExecuting(`onStoreDocument-${document.name}`) || document.saveMutex.isLocked()) === false && document.getConnectionsCount() === 0; - } - async unloadDocument(document) { - const documentName = document.name; - if (!this.shouldUnloadDocument(document)) return; - if (!this.documents.has(documentName)) return; - if (this.unloadingDocuments.has(documentName)) return this.unloadingDocuments.get(documentName); - const actualUnloadingLogic = async () => { - try { - await this.hooks("beforeUnloadDocument", { - instance: this, - documentName, - document - }); - } catch (e) { - return; - } - if (!this.shouldUnloadDocument(document)) return; - this.documents.delete(documentName); - document.destroy(); - await this.hooks("afterUnloadDocument", { - instance: this, - documentName - }); - }; - const unloading = actualUnloadingLogic(); - this.unloadingDocuments.set(documentName, Promise.resolve(unloading)); - await unloading; - this.unloadingDocuments.delete(documentName); - } - async openDirectConnection(documentName, context) { - return new DirectConnection(await this.createDocument(documentName, new Request("http://localhost"), node_crypto.default.randomUUID(), { - isAuthenticated: true, - readOnly: false - }, context), this, context); - } -}; - -//#endregion -//#region node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/rolldown-runtime.mjs -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { - key = keys[i]; - if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { - get: ((k) => from[k]).bind(null, key), - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable - }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { - value: mod, - enumerable: true -}) : target, mod)); -var __require = /* @__PURE__ */ (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href); - -//#endregion -//#region node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/adapter.mjs -var AdapterHookable = class { - options; - constructor(options) { - this.options = options || {}; - } - callHook(name, arg1, arg2) { - const globalHook = this.options.hooks?.[name]; - const globalPromise = globalHook?.(arg1, arg2); - const request = arg1.request || arg1; - const resolveHooksPromise = this.options.resolve?.(request); - if (!resolveHooksPromise) return globalPromise; - const resolvePromise = resolveHooksPromise instanceof Promise ? resolveHooksPromise.then((hooks) => hooks?.[name]) : resolveHooksPromise?.[name]; - return Promise.all([globalPromise, resolvePromise]).then(([globalRes, hook]) => { - const hookResPromise = hook?.(arg1, arg2); - return hookResPromise instanceof Promise ? hookResPromise.then((hookRes) => hookRes || globalRes) : hookResPromise || globalRes; - }); - } - async upgrade(request) { - let namespace = this.options.getNamespace?.(request) ?? new URL(request.url).pathname; - const context = request.context || {}; - try { - const res = await this.callHook("upgrade", request); - if (!res) return { - context, - namespace - }; - if (res.namespace) namespace = res.namespace; - if (res.context) Object.assign(context, res.context); - if (res instanceof Response) return { - context, - namespace, - endResponse: res - }; - if (res.headers) return { - context, - namespace, - upgradeHeaders: res.headers - }; - } catch (error) { - const errResponse = error.response || error; - if (errResponse instanceof Response) return { - context, - namespace, - endResponse: errResponse - }; - throw error; - } - return { - context, - namespace - }; - } -}; -function adapterUtils(globalPeers) { - return { - peers: globalPeers, - publish(topic, message, options) { - for (const peers of options?.namespace ? [globalPeers.get(options.namespace) || []] : globalPeers.values()) { - let firstPeerWithTopic; - for (const peer of peers) if (peer.topics.has(topic)) { - firstPeerWithTopic = peer; - break; - } - if (firstPeerWithTopic) { - firstPeerWithTopic.send(message, options); - firstPeerWithTopic.publish(topic, message, options); - } - } - } - }; -} -function getPeers(globalPeers, namespace) { - if (!namespace) throw new Error("Websocket publish namespace missing."); - let peers = globalPeers.get(namespace); - if (!peers) { - peers = /* @__PURE__ */ new Set(); - globalPeers.set(namespace, peers); - } - return peers; -} - -//#endregion -//#region node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/libs/ws.mjs -var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const BINARY_TYPES = [ - "nodebuffer", - "arraybuffer", - "fragments" - ]; - const hasBlob = typeof Blob !== "undefined"; - if (hasBlob) BINARY_TYPES.push("blob"); - module.exports = { - BINARY_TYPES, - CLOSE_TIMEOUT: 3e4, - EMPTY_BUFFER: Buffer.alloc(0), - GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11", - hasBlob, - kForOnEventAttribute: Symbol("kIsForOnEventAttribute"), - kListener: Symbol("kListener"), - kStatusCode: Symbol("status-code"), - kWebSocket: Symbol("websocket"), - NOOP: () => {} - }; -})); -var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { EMPTY_BUFFER } = require_constants(); - const FastBuffer = Buffer[Symbol.species]; - /** - * Merges an array of buffers into a new buffer. - * - * @param {Buffer[]} list The array of buffers to concat - * @param {Number} totalLength The total length of buffers in the list - * @return {Buffer} The resulting buffer - * @public - */ - function concat(list, totalLength) { - if (list.length === 0) return EMPTY_BUFFER; - if (list.length === 1) return list[0]; - const target = Buffer.allocUnsafe(totalLength); - let offset = 0; - for (let i = 0; i < list.length; i++) { - const buf = list[i]; - target.set(buf, offset); - offset += buf.length; - } - if (offset < totalLength) return new FastBuffer(target.buffer, target.byteOffset, offset); - return target; - } - /** - * Masks a buffer using the given mask. - * - * @param {Buffer} source The buffer to mask - * @param {Buffer} mask The mask to use - * @param {Buffer} output The buffer where to store the result - * @param {Number} offset The offset at which to start writing - * @param {Number} length The number of bytes to mask. - * @public - */ - function _mask(source, mask, output, offset, length) { - for (let i = 0; i < length; i++) output[offset + i] = source[i] ^ mask[i & 3]; - } - /** - * Unmasks a buffer using the given mask. - * - * @param {Buffer} buffer The buffer to unmask - * @param {Buffer} mask The mask to use - * @public - */ - function _unmask(buffer, mask) { - for (let i = 0; i < buffer.length; i++) buffer[i] ^= mask[i & 3]; - } - /** - * Converts a buffer to an `ArrayBuffer`. - * - * @param {Buffer} buf The buffer to convert - * @return {ArrayBuffer} Converted buffer - * @public - */ - function toArrayBuffer(buf) { - if (buf.length === buf.buffer.byteLength) return buf.buffer; - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length); - } - /** - * Converts `data` to a `Buffer`. - * - * @param {*} data The data to convert - * @return {Buffer} The buffer - * @throws {TypeError} - * @public - */ - function toBuffer(data) { - toBuffer.readOnly = true; - if (Buffer.isBuffer(data)) return data; - let buf; - if (data instanceof ArrayBuffer) buf = new FastBuffer(data); - else if (ArrayBuffer.isView(data)) buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength); - else { - buf = Buffer.from(data); - toBuffer.readOnly = false; - } - return buf; - } - module.exports = { - concat, - mask: _mask, - toArrayBuffer, - toBuffer, - unmask: _unmask - }; - /* istanbul ignore else */ - if (!process.env.WS_NO_BUFFER_UTIL) try { - const bufferUtil = __require("bufferutil"); - module.exports.mask = function(source, mask, output, offset, length) { - if (length < 48) _mask(source, mask, output, offset, length); - else bufferUtil.mask(source, mask, output, offset, length); - }; - module.exports.unmask = function(buffer, mask) { - if (buffer.length < 32) _unmask(buffer, mask); - else bufferUtil.unmask(buffer, mask); - }; - } catch (e) {} -})); -var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const kDone = Symbol("kDone"); - const kRun = Symbol("kRun"); - /** - * A very simple job queue with adjustable concurrency. Adapted from - * https://github.com/STRML/async-limiter - */ - var Limiter = class { - /** - * Creates a new `Limiter`. - * - * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed - * to run concurrently - */ - constructor(concurrency) { - this[kDone] = () => { - this.pending--; - this[kRun](); - }; - this.concurrency = concurrency || Infinity; - this.jobs = []; - this.pending = 0; - } - /** - * Adds a job to the queue. - * - * @param {Function} job The job to run - * @public - */ - add(job) { - this.jobs.push(job); - this[kRun](); - } - /** - * Removes a job from the queue and runs it if possible. - * - * @private - */ - [kRun]() { - if (this.pending === this.concurrency) return; - if (this.jobs.length) { - const job = this.jobs.shift(); - this.pending++; - job(this[kDone]); - } - } - }; - module.exports = Limiter; -})); -var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const zlib = __require("zlib"); - const bufferUtil = require_buffer_util(); - const Limiter = require_limiter(); - const { kStatusCode } = require_constants(); - const FastBuffer = Buffer[Symbol.species]; - const TRAILER = Buffer.from([ - 0, - 0, - 255, - 255 - ]); - const kPerMessageDeflate = Symbol("permessage-deflate"); - const kTotalLength = Symbol("total-length"); - const kCallback = Symbol("callback"); - const kBuffers = Symbol("buffers"); - const kError = Symbol("error"); - let zlibLimiter; - /** - * permessage-deflate implementation. - */ - var PerMessageDeflate = class { - /** - * Creates a PerMessageDeflate instance. - * - * @param {Object} [options] Configuration options - * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support - * for, or request, a custom client window size - * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/ - * acknowledge disabling of client context takeover - * @param {Number} [options.concurrencyLimit=10] The number of concurrent - * calls to zlib - * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the - * use of a custom server window size - * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept - * disabling of server context takeover - * @param {Number} [options.threshold=1024] Size (in bytes) below which - * messages should not be compressed if context takeover is disabled - * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on - * deflate - * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on - * inflate - * @param {Boolean} [isServer=false] Create the instance in either server or - * client mode - * @param {Number} [maxPayload=0] The maximum allowed message length - */ - constructor(options, isServer, maxPayload) { - this._maxPayload = maxPayload | 0; - this._options = options || {}; - this._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024; - this._isServer = !!isServer; - this._deflate = null; - this._inflate = null; - this.params = null; - if (!zlibLimiter) zlibLimiter = new Limiter(this._options.concurrencyLimit !== void 0 ? this._options.concurrencyLimit : 10); - } - /** - * @type {String} - */ - static get extensionName() { - return "permessage-deflate"; - } - /** - * Create an extension negotiation offer. - * - * @return {Object} Extension parameters - * @public - */ - offer() { - const params = {}; - if (this._options.serverNoContextTakeover) params.server_no_context_takeover = true; - if (this._options.clientNoContextTakeover) params.client_no_context_takeover = true; - if (this._options.serverMaxWindowBits) params.server_max_window_bits = this._options.serverMaxWindowBits; - if (this._options.clientMaxWindowBits) params.client_max_window_bits = this._options.clientMaxWindowBits; - else if (this._options.clientMaxWindowBits == null) params.client_max_window_bits = true; - return params; - } - /** - * Accept an extension negotiation offer/response. - * - * @param {Array} configurations The extension negotiation offers/reponse - * @return {Object} Accepted configuration - * @public - */ - accept(configurations) { - configurations = this.normalizeParams(configurations); - this.params = this._isServer ? this.acceptAsServer(configurations) : this.acceptAsClient(configurations); - return this.params; - } - /** - * Releases all resources used by the extension. - * - * @public - */ - cleanup() { - if (this._inflate) { - this._inflate.close(); - this._inflate = null; - } - if (this._deflate) { - const callback = this._deflate[kCallback]; - this._deflate.close(); - this._deflate = null; - if (callback) callback(/* @__PURE__ */ new Error("The deflate stream was closed while data was being processed")); - } - } - /** - * Accept an extension negotiation offer. - * - * @param {Array} offers The extension negotiation offers - * @return {Object} Accepted configuration - * @private - */ - acceptAsServer(offers) { - const opts = this._options; - const accepted = offers.find((params) => { - if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && !params.client_max_window_bits) return false; - return true; - }); - if (!accepted) throw new Error("None of the extension offers can be accepted"); - if (opts.serverNoContextTakeover) accepted.server_no_context_takeover = true; - if (opts.clientNoContextTakeover) accepted.client_no_context_takeover = true; - if (typeof opts.serverMaxWindowBits === "number") accepted.server_max_window_bits = opts.serverMaxWindowBits; - if (typeof opts.clientMaxWindowBits === "number") accepted.client_max_window_bits = opts.clientMaxWindowBits; - else if (accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false) delete accepted.client_max_window_bits; - return accepted; - } - /** - * Accept the extension negotiation response. - * - * @param {Array} response The extension negotiation response - * @return {Object} Accepted configuration - * @private - */ - acceptAsClient(response) { - const params = response[0]; - if (this._options.clientNoContextTakeover === false && params.client_no_context_takeover) throw new Error("Unexpected parameter \"client_no_context_takeover\""); - if (!params.client_max_window_bits) { - if (typeof this._options.clientMaxWindowBits === "number") params.client_max_window_bits = this._options.clientMaxWindowBits; - } else if (this._options.clientMaxWindowBits === false || typeof this._options.clientMaxWindowBits === "number" && params.client_max_window_bits > this._options.clientMaxWindowBits) throw new Error("Unexpected or invalid parameter \"client_max_window_bits\""); - return params; - } - /** - * Normalize parameters. - * - * @param {Array} configurations The extension negotiation offers/reponse - * @return {Array} The offers/response with normalized parameters - * @private - */ - normalizeParams(configurations) { - configurations.forEach((params) => { - Object.keys(params).forEach((key) => { - let value = params[key]; - if (value.length > 1) throw new Error(`Parameter "${key}" must have only a single value`); - value = value[0]; - if (key === "client_max_window_bits") { - if (value !== true) { - const num = +value; - if (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter "${key}": ${value}`); - value = num; - } else if (!this._isServer) throw new TypeError(`Invalid value for parameter "${key}": ${value}`); - } else if (key === "server_max_window_bits") { - const num = +value; - if (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter "${key}": ${value}`); - value = num; - } else if (key === "client_no_context_takeover" || key === "server_no_context_takeover") { - if (value !== true) throw new TypeError(`Invalid value for parameter "${key}": ${value}`); - } else throw new Error(`Unknown parameter "${key}"`); - params[key] = value; - }); - }); - return configurations; - } - /** - * Decompress data. Concurrency limited. - * - * @param {Buffer} data Compressed data - * @param {Boolean} fin Specifies whether or not this is the last fragment - * @param {Function} callback Callback - * @public - */ - decompress(data, fin, callback) { - zlibLimiter.add((done) => { - this._decompress(data, fin, (err, result) => { - done(); - callback(err, result); - }); - }); - } - /** - * Compress data. Concurrency limited. - * - * @param {(Buffer|String)} data Data to compress - * @param {Boolean} fin Specifies whether or not this is the last fragment - * @param {Function} callback Callback - * @public - */ - compress(data, fin, callback) { - zlibLimiter.add((done) => { - this._compress(data, fin, (err, result) => { - done(); - callback(err, result); - }); - }); - } - /** - * Decompress data. - * - * @param {Buffer} data Compressed data - * @param {Boolean} fin Specifies whether or not this is the last fragment - * @param {Function} callback Callback - * @private - */ - _decompress(data, fin, callback) { - const endpoint = this._isServer ? "client" : "server"; - if (!this._inflate) { - const key = `${endpoint}_max_window_bits`; - const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key]; - this._inflate = zlib.createInflateRaw({ - ...this._options.zlibInflateOptions, - windowBits - }); - this._inflate[kPerMessageDeflate] = this; - this._inflate[kTotalLength] = 0; - this._inflate[kBuffers] = []; - this._inflate.on("error", inflateOnError); - this._inflate.on("data", inflateOnData); - } - this._inflate[kCallback] = callback; - this._inflate.write(data); - if (fin) this._inflate.write(TRAILER); - this._inflate.flush(() => { - const err = this._inflate[kError]; - if (err) { - this._inflate.close(); - this._inflate = null; - callback(err); - return; - } - const data = bufferUtil.concat(this._inflate[kBuffers], this._inflate[kTotalLength]); - if (this._inflate._readableState.endEmitted) { - this._inflate.close(); - this._inflate = null; - } else { - this._inflate[kTotalLength] = 0; - this._inflate[kBuffers] = []; - if (fin && this.params[`${endpoint}_no_context_takeover`]) this._inflate.reset(); - } - callback(null, data); - }); - } - /** - * Compress data. - * - * @param {(Buffer|String)} data Data to compress - * @param {Boolean} fin Specifies whether or not this is the last fragment - * @param {Function} callback Callback - * @private - */ - _compress(data, fin, callback) { - const endpoint = this._isServer ? "server" : "client"; - if (!this._deflate) { - const key = `${endpoint}_max_window_bits`; - const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key]; - this._deflate = zlib.createDeflateRaw({ - ...this._options.zlibDeflateOptions, - windowBits - }); - this._deflate[kTotalLength] = 0; - this._deflate[kBuffers] = []; - this._deflate.on("data", deflateOnData); - } - this._deflate[kCallback] = callback; - this._deflate.write(data); - this._deflate.flush(zlib.Z_SYNC_FLUSH, () => { - if (!this._deflate) return; - let data = bufferUtil.concat(this._deflate[kBuffers], this._deflate[kTotalLength]); - if (fin) data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4); - this._deflate[kCallback] = null; - this._deflate[kTotalLength] = 0; - this._deflate[kBuffers] = []; - if (fin && this.params[`${endpoint}_no_context_takeover`]) this._deflate.reset(); - callback(null, data); - }); - } - }; - module.exports = PerMessageDeflate; - /** - * The listener of the `zlib.DeflateRaw` stream `'data'` event. - * - * @param {Buffer} chunk A chunk of data - * @private - */ - function deflateOnData(chunk) { - this[kBuffers].push(chunk); - this[kTotalLength] += chunk.length; - } - /** - * The listener of the `zlib.InflateRaw` stream `'data'` event. - * - * @param {Buffer} chunk A chunk of data - * @private - */ - function inflateOnData(chunk) { - this[kTotalLength] += chunk.length; - if (this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload) { - this[kBuffers].push(chunk); - return; - } - this[kError] = /* @__PURE__ */ new RangeError("Max payload size exceeded"); - this[kError].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"; - this[kError][kStatusCode] = 1009; - this.removeListener("data", inflateOnData); - this.reset(); - } - /** - * The listener of the `zlib.InflateRaw` stream `'error'` event. - * - * @param {Error} err The emitted error - * @private - */ - function inflateOnError(err) { - this[kPerMessageDeflate]._inflate = null; - if (this[kError]) { - this[kCallback](this[kError]); - return; - } - err[kStatusCode] = 1007; - this[kCallback](err); - } -})); -var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { isUtf8 } = __require("buffer"); - const { hasBlob } = require_constants(); - const tokenChars = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 1, - 1, - 0, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 0, - 1, - 0 - ]; - /** - * Checks if a status code is allowed in a close frame. - * - * @param {Number} code The status code - * @return {Boolean} `true` if the status code is valid, else `false` - * @public - */ - function isValidStatusCode(code) { - return code >= 1e3 && code <= 1014 && code !== 1004 && code !== 1005 && code !== 1006 || code >= 3e3 && code <= 4999; - } - /** - * Checks if a given buffer contains only correct UTF-8. - * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by - * Markus Kuhn. - * - * @param {Buffer} buf The buffer to check - * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false` - * @public - */ - function _isValidUTF8(buf) { - const len = buf.length; - let i = 0; - while (i < len) if ((buf[i] & 128) === 0) i++; - else if ((buf[i] & 224) === 192) { - if (i + 1 === len || (buf[i + 1] & 192) !== 128 || (buf[i] & 254) === 192) return false; - i += 2; - } else if ((buf[i] & 240) === 224) { - if (i + 2 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || buf[i] === 224 && (buf[i + 1] & 224) === 128 || buf[i] === 237 && (buf[i + 1] & 224) === 160) return false; - i += 3; - } else if ((buf[i] & 248) === 240) { - if (i + 3 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || (buf[i + 3] & 192) !== 128 || buf[i] === 240 && (buf[i + 1] & 240) === 128 || buf[i] === 244 && buf[i + 1] > 143 || buf[i] > 244) return false; - i += 4; - } else return false; - return true; - } - /** - * Determines whether a value is a `Blob`. - * - * @param {*} value The value to be tested - * @return {Boolean} `true` if `value` is a `Blob`, else `false` - * @private - */ - function isBlob(value) { - return hasBlob && typeof value === "object" && typeof value.arrayBuffer === "function" && typeof value.type === "string" && typeof value.stream === "function" && (value[Symbol.toStringTag] === "Blob" || value[Symbol.toStringTag] === "File"); - } - module.exports = { - isBlob, - isValidStatusCode, - isValidUTF8: _isValidUTF8, - tokenChars - }; - if (isUtf8) module.exports.isValidUTF8 = function(buf) { - return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf); - }; - else if (!process.env.WS_NO_UTF_8_VALIDATE) try { - const isValidUTF8 = __require("utf-8-validate"); - module.exports.isValidUTF8 = function(buf) { - return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf); - }; - } catch (e) {} -})); -var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { Writable } = __require("stream"); - const PerMessageDeflate = require_permessage_deflate(); - const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } = require_constants(); - const { concat, toArrayBuffer, unmask } = require_buffer_util(); - const { isValidStatusCode, isValidUTF8 } = require_validation(); - const FastBuffer = Buffer[Symbol.species]; - const GET_INFO = 0; - const GET_PAYLOAD_LENGTH_16 = 1; - const GET_PAYLOAD_LENGTH_64 = 2; - const GET_MASK = 3; - const GET_DATA = 4; - const INFLATING = 5; - const DEFER_EVENT = 6; - /** - * HyBi Receiver implementation. - * - * @extends Writable - */ - var Receiver = class extends Writable { - /** - * Creates a Receiver instance. - * - * @param {Object} [options] Options object - * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether - * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted - * multiple times in the same tick - * @param {String} [options.binaryType=nodebuffer] The type for binary data - * @param {Object} [options.extensions] An object containing the negotiated - * extensions - * @param {Boolean} [options.isServer=false] Specifies whether to operate in - * client or server mode - * @param {Number} [options.maxPayload=0] The maximum allowed message length - * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or - * not to skip UTF-8 validation for text and close messages - */ - constructor(options = {}) { - super(); - this._allowSynchronousEvents = options.allowSynchronousEvents !== void 0 ? options.allowSynchronousEvents : true; - this._binaryType = options.binaryType || BINARY_TYPES[0]; - this._extensions = options.extensions || {}; - this._isServer = !!options.isServer; - this._maxPayload = options.maxPayload | 0; - this._skipUTF8Validation = !!options.skipUTF8Validation; - this[kWebSocket] = void 0; - this._bufferedBytes = 0; - this._buffers = []; - this._compressed = false; - this._payloadLength = 0; - this._mask = void 0; - this._fragmented = 0; - this._masked = false; - this._fin = false; - this._opcode = 0; - this._totalPayloadLength = 0; - this._messageLength = 0; - this._fragments = []; - this._errored = false; - this._loop = false; - this._state = GET_INFO; - } - /** - * Implements `Writable.prototype._write()`. - * - * @param {Buffer} chunk The chunk of data to write - * @param {String} encoding The character encoding of `chunk` - * @param {Function} cb Callback - * @private - */ - _write(chunk, encoding, cb) { - if (this._opcode === 8 && this._state == GET_INFO) return cb(); - this._bufferedBytes += chunk.length; - this._buffers.push(chunk); - this.startLoop(cb); - } - /** - * Consumes `n` bytes from the buffered data. - * - * @param {Number} n The number of bytes to consume - * @return {Buffer} The consumed bytes - * @private - */ - consume(n) { - this._bufferedBytes -= n; - if (n === this._buffers[0].length) return this._buffers.shift(); - if (n < this._buffers[0].length) { - const buf = this._buffers[0]; - this._buffers[0] = new FastBuffer(buf.buffer, buf.byteOffset + n, buf.length - n); - return new FastBuffer(buf.buffer, buf.byteOffset, n); - } - const dst = Buffer.allocUnsafe(n); - do { - const buf = this._buffers[0]; - const offset = dst.length - n; - if (n >= buf.length) dst.set(this._buffers.shift(), offset); - else { - dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset); - this._buffers[0] = new FastBuffer(buf.buffer, buf.byteOffset + n, buf.length - n); - } - n -= buf.length; - } while (n > 0); - return dst; - } - /** - * Starts the parsing loop. - * - * @param {Function} cb Callback - * @private - */ - startLoop(cb) { - this._loop = true; - do - switch (this._state) { - case GET_INFO: - this.getInfo(cb); - break; - case GET_PAYLOAD_LENGTH_16: - this.getPayloadLength16(cb); - break; - case GET_PAYLOAD_LENGTH_64: - this.getPayloadLength64(cb); - break; - case GET_MASK: - this.getMask(); - break; - case GET_DATA: - this.getData(cb); - break; - case INFLATING: - case DEFER_EVENT: - this._loop = false; - return; - } - while (this._loop); - if (!this._errored) cb(); - } - /** - * Reads the first two bytes of a frame. - * - * @param {Function} cb Callback - * @private - */ - getInfo(cb) { - if (this._bufferedBytes < 2) { - this._loop = false; - return; - } - const buf = this.consume(2); - if ((buf[0] & 48) !== 0) { - cb(this.createError(RangeError, "RSV2 and RSV3 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_2_3")); - return; - } - const compressed = (buf[0] & 64) === 64; - if (compressed && !this._extensions[PerMessageDeflate.extensionName]) { - cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1")); - return; - } - this._fin = (buf[0] & 128) === 128; - this._opcode = buf[0] & 15; - this._payloadLength = buf[1] & 127; - if (this._opcode === 0) { - if (compressed) { - cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1")); - return; - } - if (!this._fragmented) { - cb(this.createError(RangeError, "invalid opcode 0", true, 1002, "WS_ERR_INVALID_OPCODE")); - return; - } - this._opcode = this._fragmented; - } else if (this._opcode === 1 || this._opcode === 2) { - if (this._fragmented) { - cb(this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, "WS_ERR_INVALID_OPCODE")); - return; - } - this._compressed = compressed; - } else if (this._opcode > 7 && this._opcode < 11) { - if (!this._fin) { - cb(this.createError(RangeError, "FIN must be set", true, 1002, "WS_ERR_EXPECTED_FIN")); - return; - } - if (compressed) { - cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1")); - return; - } - if (this._payloadLength > 125 || this._opcode === 8 && this._payloadLength === 1) { - cb(this.createError(RangeError, `invalid payload length ${this._payloadLength}`, true, 1002, "WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")); - return; - } - } else { - cb(this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, "WS_ERR_INVALID_OPCODE")); - return; - } - if (!this._fin && !this._fragmented) this._fragmented = this._opcode; - this._masked = (buf[1] & 128) === 128; - if (this._isServer) { - if (!this._masked) { - cb(this.createError(RangeError, "MASK must be set", true, 1002, "WS_ERR_EXPECTED_MASK")); - return; - } - } else if (this._masked) { - cb(this.createError(RangeError, "MASK must be clear", true, 1002, "WS_ERR_UNEXPECTED_MASK")); - return; - } - if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16; - else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64; - else this.haveLength(cb); - } - /** - * Gets extended payload length (7+16). - * - * @param {Function} cb Callback - * @private - */ - getPayloadLength16(cb) { - if (this._bufferedBytes < 2) { - this._loop = false; - return; - } - this._payloadLength = this.consume(2).readUInt16BE(0); - this.haveLength(cb); - } - /** - * Gets extended payload length (7+64). - * - * @param {Function} cb Callback - * @private - */ - getPayloadLength64(cb) { - if (this._bufferedBytes < 8) { - this._loop = false; - return; - } - const buf = this.consume(8); - const num = buf.readUInt32BE(0); - if (num > Math.pow(2, 21) - 1) { - cb(this.createError(RangeError, "Unsupported WebSocket frame: payload length > 2^53 - 1", false, 1009, "WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")); - return; - } - this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4); - this.haveLength(cb); - } - /** - * Payload length has been read. - * - * @param {Function} cb Callback - * @private - */ - haveLength(cb) { - if (this._payloadLength && this._opcode < 8) { - this._totalPayloadLength += this._payloadLength; - if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) { - cb(this.createError(RangeError, "Max payload size exceeded", false, 1009, "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")); - return; - } - } - if (this._masked) this._state = GET_MASK; - else this._state = GET_DATA; - } - /** - * Reads mask bytes. - * - * @private - */ - getMask() { - if (this._bufferedBytes < 4) { - this._loop = false; - return; - } - this._mask = this.consume(4); - this._state = GET_DATA; - } - /** - * Reads data bytes. - * - * @param {Function} cb Callback - * @private - */ - getData(cb) { - let data = EMPTY_BUFFER; - if (this._payloadLength) { - if (this._bufferedBytes < this._payloadLength) { - this._loop = false; - return; - } - data = this.consume(this._payloadLength); - if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) unmask(data, this._mask); - } - if (this._opcode > 7) { - this.controlMessage(data, cb); - return; - } - if (this._compressed) { - this._state = INFLATING; - this.decompress(data, cb); - return; - } - if (data.length) { - this._messageLength = this._totalPayloadLength; - this._fragments.push(data); - } - this.dataMessage(cb); - } - /** - * Decompresses data. - * - * @param {Buffer} data Compressed data - * @param {Function} cb Callback - * @private - */ - decompress(data, cb) { - this._extensions[PerMessageDeflate.extensionName].decompress(data, this._fin, (err, buf) => { - if (err) return cb(err); - if (buf.length) { - this._messageLength += buf.length; - if (this._messageLength > this._maxPayload && this._maxPayload > 0) { - cb(this.createError(RangeError, "Max payload size exceeded", false, 1009, "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")); - return; - } - this._fragments.push(buf); - } - this.dataMessage(cb); - if (this._state === GET_INFO) this.startLoop(cb); - }); - } - /** - * Handles a data message. - * - * @param {Function} cb Callback - * @private - */ - dataMessage(cb) { - if (!this._fin) { - this._state = GET_INFO; - return; - } - const messageLength = this._messageLength; - const fragments = this._fragments; - this._totalPayloadLength = 0; - this._messageLength = 0; - this._fragmented = 0; - this._fragments = []; - if (this._opcode === 2) { - let data; - if (this._binaryType === "nodebuffer") data = concat(fragments, messageLength); - else if (this._binaryType === "arraybuffer") data = toArrayBuffer(concat(fragments, messageLength)); - else if (this._binaryType === "blob") data = new Blob(fragments); - else data = fragments; - if (this._allowSynchronousEvents) { - this.emit("message", data, true); - this._state = GET_INFO; - } else { - this._state = DEFER_EVENT; - setImmediate(() => { - this.emit("message", data, true); - this._state = GET_INFO; - this.startLoop(cb); - }); - } - } else { - const buf = concat(fragments, messageLength); - if (!this._skipUTF8Validation && !isValidUTF8(buf)) { - cb(this.createError(Error, "invalid UTF-8 sequence", true, 1007, "WS_ERR_INVALID_UTF8")); - return; - } - if (this._state === INFLATING || this._allowSynchronousEvents) { - this.emit("message", buf, false); - this._state = GET_INFO; - } else { - this._state = DEFER_EVENT; - setImmediate(() => { - this.emit("message", buf, false); - this._state = GET_INFO; - this.startLoop(cb); - }); - } - } - } - /** - * Handles a control message. - * - * @param {Buffer} data Data to handle - * @return {(Error|RangeError|undefined)} A possible error - * @private - */ - controlMessage(data, cb) { - if (this._opcode === 8) { - if (data.length === 0) { - this._loop = false; - this.emit("conclude", 1005, EMPTY_BUFFER); - this.end(); - } else { - const code = data.readUInt16BE(0); - if (!isValidStatusCode(code)) { - cb(this.createError(RangeError, `invalid status code ${code}`, true, 1002, "WS_ERR_INVALID_CLOSE_CODE")); - return; - } - const buf = new FastBuffer(data.buffer, data.byteOffset + 2, data.length - 2); - if (!this._skipUTF8Validation && !isValidUTF8(buf)) { - cb(this.createError(Error, "invalid UTF-8 sequence", true, 1007, "WS_ERR_INVALID_UTF8")); - return; - } - this._loop = false; - this.emit("conclude", code, buf); - this.end(); - } - this._state = GET_INFO; - return; - } - if (this._allowSynchronousEvents) { - this.emit(this._opcode === 9 ? "ping" : "pong", data); - this._state = GET_INFO; - } else { - this._state = DEFER_EVENT; - setImmediate(() => { - this.emit(this._opcode === 9 ? "ping" : "pong", data); - this._state = GET_INFO; - this.startLoop(cb); - }); - } - } - /** - * Builds an error object. - * - * @param {function(new:Error|RangeError)} ErrorCtor The error constructor - * @param {String} message The error message - * @param {Boolean} prefix Specifies whether or not to add a default prefix to - * `message` - * @param {Number} statusCode The status code - * @param {String} errorCode The exposed error code - * @return {(Error|RangeError)} The error - * @private - */ - createError(ErrorCtor, message, prefix, statusCode, errorCode) { - this._loop = false; - this._errored = true; - const err = new ErrorCtor(prefix ? `Invalid WebSocket frame: ${message}` : message); - Error.captureStackTrace(err, this.createError); - err.code = errorCode; - err[kStatusCode] = statusCode; - return err; - } - }; - module.exports = Receiver; -})); -var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { Duplex: Duplex$3 } = __require("stream"); - const { randomFillSync } = __require("crypto"); - const PerMessageDeflate = require_permessage_deflate(); - const { EMPTY_BUFFER, kWebSocket, NOOP } = require_constants(); - const { isBlob, isValidStatusCode } = require_validation(); - const { mask: applyMask, toBuffer } = require_buffer_util(); - const kByteLength = Symbol("kByteLength"); - const maskBuffer = Buffer.alloc(4); - const RANDOM_POOL_SIZE = 8 * 1024; - let randomPool; - let randomPoolPointer = RANDOM_POOL_SIZE; - const DEFAULT = 0; - const DEFLATING = 1; - const GET_BLOB_DATA = 2; - module.exports = class Sender { - /** - * Creates a Sender instance. - * - * @param {Duplex} socket The connection socket - * @param {Object} [extensions] An object containing the negotiated extensions - * @param {Function} [generateMask] The function used to generate the masking - * key - */ - constructor(socket, extensions, generateMask) { - this._extensions = extensions || {}; - if (generateMask) { - this._generateMask = generateMask; - this._maskBuffer = Buffer.alloc(4); - } - this._socket = socket; - this._firstFragment = true; - this._compress = false; - this._bufferedBytes = 0; - this._queue = []; - this._state = DEFAULT; - this.onerror = NOOP; - this[kWebSocket] = void 0; - } - /** - * Frames a piece of data according to the HyBi WebSocket protocol. - * - * @param {(Buffer|String)} data The data to frame - * @param {Object} options Options object - * @param {Boolean} [options.fin=false] Specifies whether or not to set the - * FIN bit - * @param {Function} [options.generateMask] The function used to generate the - * masking key - * @param {Boolean} [options.mask=false] Specifies whether or not to mask - * `data` - * @param {Buffer} [options.maskBuffer] The buffer used to store the masking - * key - * @param {Number} options.opcode The opcode - * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be - * modified - * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the - * RSV1 bit - * @return {(Buffer|String)[]} The framed data - * @public - */ - static frame(data, options) { - let mask; - let merge = false; - let offset = 2; - let skipMasking = false; - if (options.mask) { - mask = options.maskBuffer || maskBuffer; - if (options.generateMask) options.generateMask(mask); - else { - if (randomPoolPointer === RANDOM_POOL_SIZE) { - /* istanbul ignore else */ - if (randomPool === void 0) randomPool = Buffer.alloc(RANDOM_POOL_SIZE); - randomFillSync(randomPool, 0, RANDOM_POOL_SIZE); - randomPoolPointer = 0; - } - mask[0] = randomPool[randomPoolPointer++]; - mask[1] = randomPool[randomPoolPointer++]; - mask[2] = randomPool[randomPoolPointer++]; - mask[3] = randomPool[randomPoolPointer++]; - } - skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0; - offset = 6; - } - let dataLength; - if (typeof data === "string") if ((!options.mask || skipMasking) && options[kByteLength] !== void 0) dataLength = options[kByteLength]; - else { - data = Buffer.from(data); - dataLength = data.length; - } - else { - dataLength = data.length; - merge = options.mask && options.readOnly && !skipMasking; - } - let payloadLength = dataLength; - if (dataLength >= 65536) { - offset += 8; - payloadLength = 127; - } else if (dataLength > 125) { - offset += 2; - payloadLength = 126; - } - const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset); - target[0] = options.fin ? options.opcode | 128 : options.opcode; - if (options.rsv1) target[0] |= 64; - target[1] = payloadLength; - if (payloadLength === 126) target.writeUInt16BE(dataLength, 2); - else if (payloadLength === 127) { - target[2] = target[3] = 0; - target.writeUIntBE(dataLength, 4, 6); - } - if (!options.mask) return [target, data]; - target[1] |= 128; - target[offset - 4] = mask[0]; - target[offset - 3] = mask[1]; - target[offset - 2] = mask[2]; - target[offset - 1] = mask[3]; - if (skipMasking) return [target, data]; - if (merge) { - applyMask(data, mask, target, offset, dataLength); - return [target]; - } - applyMask(data, mask, data, 0, dataLength); - return [target, data]; - } - /** - * Sends a close message to the other peer. - * - * @param {Number} [code] The status code component of the body - * @param {(String|Buffer)} [data] The message component of the body - * @param {Boolean} [mask=false] Specifies whether or not to mask the message - * @param {Function} [cb] Callback - * @public - */ - close(code, data, mask, cb) { - let buf; - if (code === void 0) buf = EMPTY_BUFFER; - else if (typeof code !== "number" || !isValidStatusCode(code)) throw new TypeError("First argument must be a valid error code number"); - else if (data === void 0 || !data.length) { - buf = Buffer.allocUnsafe(2); - buf.writeUInt16BE(code, 0); - } else { - const length = Buffer.byteLength(data); - if (length > 123) throw new RangeError("The message must not be greater than 123 bytes"); - buf = Buffer.allocUnsafe(2 + length); - buf.writeUInt16BE(code, 0); - if (typeof data === "string") buf.write(data, 2); - else buf.set(data, 2); - } - const options = { - [kByteLength]: buf.length, - fin: true, - generateMask: this._generateMask, - mask, - maskBuffer: this._maskBuffer, - opcode: 8, - readOnly: false, - rsv1: false - }; - if (this._state !== DEFAULT) this.enqueue([ - this.dispatch, - buf, - false, - options, - cb - ]); - else this.sendFrame(Sender.frame(buf, options), cb); - } - /** - * Sends a ping message to the other peer. - * - * @param {*} data The message to send - * @param {Boolean} [mask=false] Specifies whether or not to mask `data` - * @param {Function} [cb] Callback - * @public - */ - ping(data, mask, cb) { - let byteLength; - let readOnly; - if (typeof data === "string") { - byteLength = Buffer.byteLength(data); - readOnly = false; - } else if (isBlob(data)) { - byteLength = data.size; - readOnly = false; - } else { - data = toBuffer(data); - byteLength = data.length; - readOnly = toBuffer.readOnly; - } - if (byteLength > 125) throw new RangeError("The data size must not be greater than 125 bytes"); - const options = { - [kByteLength]: byteLength, - fin: true, - generateMask: this._generateMask, - mask, - maskBuffer: this._maskBuffer, - opcode: 9, - readOnly, - rsv1: false - }; - if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([ - this.getBlobData, - data, - false, - options, - cb - ]); - else this.getBlobData(data, false, options, cb); - else if (this._state !== DEFAULT) this.enqueue([ - this.dispatch, - data, - false, - options, - cb - ]); - else this.sendFrame(Sender.frame(data, options), cb); - } - /** - * Sends a pong message to the other peer. - * - * @param {*} data The message to send - * @param {Boolean} [mask=false] Specifies whether or not to mask `data` - * @param {Function} [cb] Callback - * @public - */ - pong(data, mask, cb) { - let byteLength; - let readOnly; - if (typeof data === "string") { - byteLength = Buffer.byteLength(data); - readOnly = false; - } else if (isBlob(data)) { - byteLength = data.size; - readOnly = false; - } else { - data = toBuffer(data); - byteLength = data.length; - readOnly = toBuffer.readOnly; - } - if (byteLength > 125) throw new RangeError("The data size must not be greater than 125 bytes"); - const options = { - [kByteLength]: byteLength, - fin: true, - generateMask: this._generateMask, - mask, - maskBuffer: this._maskBuffer, - opcode: 10, - readOnly, - rsv1: false - }; - if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([ - this.getBlobData, - data, - false, - options, - cb - ]); - else this.getBlobData(data, false, options, cb); - else if (this._state !== DEFAULT) this.enqueue([ - this.dispatch, - data, - false, - options, - cb - ]); - else this.sendFrame(Sender.frame(data, options), cb); - } - /** - * Sends a data message to the other peer. - * - * @param {*} data The message to send - * @param {Object} options Options object - * @param {Boolean} [options.binary=false] Specifies whether `data` is binary - * or text - * @param {Boolean} [options.compress=false] Specifies whether or not to - * compress `data` - * @param {Boolean} [options.fin=false] Specifies whether the fragment is the - * last one - * @param {Boolean} [options.mask=false] Specifies whether or not to mask - * `data` - * @param {Function} [cb] Callback - * @public - */ - send(data, options, cb) { - const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; - let opcode = options.binary ? 2 : 1; - let rsv1 = options.compress; - let byteLength; - let readOnly; - if (typeof data === "string") { - byteLength = Buffer.byteLength(data); - readOnly = false; - } else if (isBlob(data)) { - byteLength = data.size; - readOnly = false; - } else { - data = toBuffer(data); - byteLength = data.length; - readOnly = toBuffer.readOnly; - } - if (this._firstFragment) { - this._firstFragment = false; - if (rsv1 && perMessageDeflate && perMessageDeflate.params[perMessageDeflate._isServer ? "server_no_context_takeover" : "client_no_context_takeover"]) rsv1 = byteLength >= perMessageDeflate._threshold; - this._compress = rsv1; - } else { - rsv1 = false; - opcode = 0; - } - if (options.fin) this._firstFragment = true; - const opts = { - [kByteLength]: byteLength, - fin: options.fin, - generateMask: this._generateMask, - mask: options.mask, - maskBuffer: this._maskBuffer, - opcode, - readOnly, - rsv1 - }; - if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([ - this.getBlobData, - data, - this._compress, - opts, - cb - ]); - else this.getBlobData(data, this._compress, opts, cb); - else if (this._state !== DEFAULT) this.enqueue([ - this.dispatch, - data, - this._compress, - opts, - cb - ]); - else this.dispatch(data, this._compress, opts, cb); - } - /** - * Gets the contents of a blob as binary data. - * - * @param {Blob} blob The blob - * @param {Boolean} [compress=false] Specifies whether or not to compress - * the data - * @param {Object} options Options object - * @param {Boolean} [options.fin=false] Specifies whether or not to set the - * FIN bit - * @param {Function} [options.generateMask] The function used to generate the - * masking key - * @param {Boolean} [options.mask=false] Specifies whether or not to mask - * `data` - * @param {Buffer} [options.maskBuffer] The buffer used to store the masking - * key - * @param {Number} options.opcode The opcode - * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be - * modified - * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the - * RSV1 bit - * @param {Function} [cb] Callback - * @private - */ - getBlobData(blob, compress, options, cb) { - this._bufferedBytes += options[kByteLength]; - this._state = GET_BLOB_DATA; - blob.arrayBuffer().then((arrayBuffer) => { - if (this._socket.destroyed) { - const err = /* @__PURE__ */ new Error("The socket was closed while the blob was being read"); - process.nextTick(callCallbacks, this, err, cb); - return; - } - this._bufferedBytes -= options[kByteLength]; - const data = toBuffer(arrayBuffer); - if (!compress) { - this._state = DEFAULT; - this.sendFrame(Sender.frame(data, options), cb); - this.dequeue(); - } else this.dispatch(data, compress, options, cb); - }).catch((err) => { - process.nextTick(onError, this, err, cb); - }); - } - /** - * Dispatches a message. - * - * @param {(Buffer|String)} data The message to send - * @param {Boolean} [compress=false] Specifies whether or not to compress - * `data` - * @param {Object} options Options object - * @param {Boolean} [options.fin=false] Specifies whether or not to set the - * FIN bit - * @param {Function} [options.generateMask] The function used to generate the - * masking key - * @param {Boolean} [options.mask=false] Specifies whether or not to mask - * `data` - * @param {Buffer} [options.maskBuffer] The buffer used to store the masking - * key - * @param {Number} options.opcode The opcode - * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be - * modified - * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the - * RSV1 bit - * @param {Function} [cb] Callback - * @private - */ - dispatch(data, compress, options, cb) { - if (!compress) { - this.sendFrame(Sender.frame(data, options), cb); - return; - } - const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; - this._bufferedBytes += options[kByteLength]; - this._state = DEFLATING; - perMessageDeflate.compress(data, options.fin, (_, buf) => { - if (this._socket.destroyed) { - callCallbacks(this, /* @__PURE__ */ new Error("The socket was closed while data was being compressed"), cb); - return; - } - this._bufferedBytes -= options[kByteLength]; - this._state = DEFAULT; - options.readOnly = false; - this.sendFrame(Sender.frame(buf, options), cb); - this.dequeue(); - }); - } - /** - * Executes queued send operations. - * - * @private - */ - dequeue() { - while (this._state === DEFAULT && this._queue.length) { - const params = this._queue.shift(); - this._bufferedBytes -= params[3][kByteLength]; - Reflect.apply(params[0], this, params.slice(1)); - } - } - /** - * Enqueues a send operation. - * - * @param {Array} params Send operation parameters. - * @private - */ - enqueue(params) { - this._bufferedBytes += params[3][kByteLength]; - this._queue.push(params); - } - /** - * Sends a frame. - * - * @param {(Buffer | String)[]} list The frame to send - * @param {Function} [cb] Callback - * @private - */ - sendFrame(list, cb) { - if (list.length === 2) { - this._socket.cork(); - this._socket.write(list[0]); - this._socket.write(list[1], cb); - this._socket.uncork(); - } else this._socket.write(list[0], cb); - } - }; - /** - * Calls queued callbacks with an error. - * - * @param {Sender} sender The `Sender` instance - * @param {Error} err The error to call the callbacks with - * @param {Function} [cb] The first callback - * @private - */ - function callCallbacks(sender, err, cb) { - if (typeof cb === "function") cb(err); - for (let i = 0; i < sender._queue.length; i++) { - const params = sender._queue[i]; - const callback = params[params.length - 1]; - if (typeof callback === "function") callback(err); - } - } - /** - * Handles a `Sender` error. - * - * @param {Sender} sender The `Sender` instance - * @param {Error} err The error - * @param {Function} [cb] The first pending callback - * @private - */ - function onError(sender, err, cb) { - callCallbacks(sender, err, cb); - sender.onerror(err); - } -})); -var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { kForOnEventAttribute, kListener } = require_constants(); - const kCode = Symbol("kCode"); - const kData = Symbol("kData"); - const kError = Symbol("kError"); - const kMessage = Symbol("kMessage"); - const kReason = Symbol("kReason"); - const kTarget = Symbol("kTarget"); - const kType = Symbol("kType"); - const kWasClean = Symbol("kWasClean"); - /** - * Class representing an event. - */ - var Event = class { - /** - * Create a new `Event`. - * - * @param {String} type The name of the event - * @throws {TypeError} If the `type` argument is not specified - */ - constructor(type) { - this[kTarget] = null; - this[kType] = type; - } - /** - * @type {*} - */ - get target() { - return this[kTarget]; - } - /** - * @type {String} - */ - get type() { - return this[kType]; - } - }; - Object.defineProperty(Event.prototype, "target", { enumerable: true }); - Object.defineProperty(Event.prototype, "type", { enumerable: true }); - /** - * Class representing a close event. - * - * @extends Event - */ - var CloseEvent = class extends Event { - /** - * Create a new `CloseEvent`. - * - * @param {String} type The name of the event - * @param {Object} [options] A dictionary object that allows for setting - * attributes via object members of the same name - * @param {Number} [options.code=0] The status code explaining why the - * connection was closed - * @param {String} [options.reason=''] A human-readable string explaining why - * the connection was closed - * @param {Boolean} [options.wasClean=false] Indicates whether or not the - * connection was cleanly closed - */ - constructor(type, options = {}) { - super(type); - this[kCode] = options.code === void 0 ? 0 : options.code; - this[kReason] = options.reason === void 0 ? "" : options.reason; - this[kWasClean] = options.wasClean === void 0 ? false : options.wasClean; - } - /** - * @type {Number} - */ - get code() { - return this[kCode]; - } - /** - * @type {String} - */ - get reason() { - return this[kReason]; - } - /** - * @type {Boolean} - */ - get wasClean() { - return this[kWasClean]; - } - }; - Object.defineProperty(CloseEvent.prototype, "code", { enumerable: true }); - Object.defineProperty(CloseEvent.prototype, "reason", { enumerable: true }); - Object.defineProperty(CloseEvent.prototype, "wasClean", { enumerable: true }); - /** - * Class representing an error event. - * - * @extends Event - */ - var ErrorEvent = class extends Event { - /** - * Create a new `ErrorEvent`. - * - * @param {String} type The name of the event - * @param {Object} [options] A dictionary object that allows for setting - * attributes via object members of the same name - * @param {*} [options.error=null] The error that generated this event - * @param {String} [options.message=''] The error message - */ - constructor(type, options = {}) { - super(type); - this[kError] = options.error === void 0 ? null : options.error; - this[kMessage] = options.message === void 0 ? "" : options.message; - } - /** - * @type {*} - */ - get error() { - return this[kError]; - } - /** - * @type {String} - */ - get message() { - return this[kMessage]; - } - }; - Object.defineProperty(ErrorEvent.prototype, "error", { enumerable: true }); - Object.defineProperty(ErrorEvent.prototype, "message", { enumerable: true }); - /** - * Class representing a message event. - * - * @extends Event - */ - var MessageEvent = class extends Event { - /** - * Create a new `MessageEvent`. - * - * @param {String} type The name of the event - * @param {Object} [options] A dictionary object that allows for setting - * attributes via object members of the same name - * @param {*} [options.data=null] The message content - */ - constructor(type, options = {}) { - super(type); - this[kData] = options.data === void 0 ? null : options.data; - } - /** - * @type {*} - */ - get data() { - return this[kData]; - } - }; - Object.defineProperty(MessageEvent.prototype, "data", { enumerable: true }); - module.exports = { - CloseEvent, - ErrorEvent, - Event, - EventTarget: { - addEventListener(type, handler, options = {}) { - for (const listener of this.listeners(type)) if (!options[kForOnEventAttribute] && listener[kListener] === handler && !listener[kForOnEventAttribute]) return; - let wrapper; - if (type === "message") wrapper = function onMessage(data, isBinary) { - const event = new MessageEvent("message", { data: isBinary ? data : data.toString() }); - event[kTarget] = this; - callListener(handler, this, event); - }; - else if (type === "close") wrapper = function onClose(code, message) { - const event = new CloseEvent("close", { - code, - reason: message.toString(), - wasClean: this._closeFrameReceived && this._closeFrameSent - }); - event[kTarget] = this; - callListener(handler, this, event); - }; - else if (type === "error") wrapper = function onError(error) { - const event = new ErrorEvent("error", { - error, - message: error.message - }); - event[kTarget] = this; - callListener(handler, this, event); - }; - else if (type === "open") wrapper = function onOpen() { - const event = new Event("open"); - event[kTarget] = this; - callListener(handler, this, event); - }; - else return; - wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute]; - wrapper[kListener] = handler; - if (options.once) this.once(type, wrapper); - else this.on(type, wrapper); - }, - removeEventListener(type, handler) { - for (const listener of this.listeners(type)) if (listener[kListener] === handler && !listener[kForOnEventAttribute]) { - this.removeListener(type, listener); - break; - } - } - }, - MessageEvent - }; - /** - * Call an event listener - * - * @param {(Function|Object)} listener The listener to call - * @param {*} thisArg The value to use as `this`` when calling the listener - * @param {Event} event The event to pass to the listener - * @private - */ - function callListener(listener, thisArg, event) { - if (typeof listener === "object" && listener.handleEvent) listener.handleEvent.call(listener, event); - else listener.call(thisArg, event); - } -})); -var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { tokenChars } = require_validation(); - /** - * Adds an offer to the map of extension offers or a parameter to the map of - * parameters. - * - * @param {Object} dest The map of extension offers or parameters - * @param {String} name The extension or parameter name - * @param {(Object|Boolean|String)} elem The extension parameters or the - * parameter value - * @private - */ - function push(dest, name, elem) { - if (dest[name] === void 0) dest[name] = [elem]; - else dest[name].push(elem); - } - /** - * Parses the `Sec-WebSocket-Extensions` header into an object. - * - * @param {String} header The field value of the header - * @return {Object} The parsed object - * @public - */ - function parse(header) { - const offers = Object.create(null); - let params = Object.create(null); - let mustUnescape = false; - let isEscaping = false; - let inQuotes = false; - let extensionName; - let paramName; - let start = -1; - let code = -1; - let end = -1; - let i = 0; - for (; i < header.length; i++) { - code = header.charCodeAt(i); - if (extensionName === void 0) if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (i !== 0 && (code === 32 || code === 9)) { - if (end === -1 && start !== -1) end = i; - } else if (code === 59 || code === 44) { - if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`); - if (end === -1) end = i; - const name = header.slice(start, end); - if (code === 44) { - push(offers, name, params); - params = Object.create(null); - } else extensionName = name; - start = end = -1; - } else throw new SyntaxError(`Unexpected character at index ${i}`); - else if (paramName === void 0) if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (code === 32 || code === 9) { - if (end === -1 && start !== -1) end = i; - } else if (code === 59 || code === 44) { - if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`); - if (end === -1) end = i; - push(params, header.slice(start, end), true); - if (code === 44) { - push(offers, extensionName, params); - params = Object.create(null); - extensionName = void 0; - } - start = end = -1; - } else if (code === 61 && start !== -1 && end === -1) { - paramName = header.slice(start, i); - start = end = -1; - } else throw new SyntaxError(`Unexpected character at index ${i}`); - else if (isEscaping) { - if (tokenChars[code] !== 1) throw new SyntaxError(`Unexpected character at index ${i}`); - if (start === -1) start = i; - else if (!mustUnescape) mustUnescape = true; - isEscaping = false; - } else if (inQuotes) if (tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (code === 34 && start !== -1) { - inQuotes = false; - end = i; - } else if (code === 92) isEscaping = true; - else throw new SyntaxError(`Unexpected character at index ${i}`); - else if (code === 34 && header.charCodeAt(i - 1) === 61) inQuotes = true; - else if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (start !== -1 && (code === 32 || code === 9)) { - if (end === -1) end = i; - } else if (code === 59 || code === 44) { - if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`); - if (end === -1) end = i; - let value = header.slice(start, end); - if (mustUnescape) { - value = value.replace(/\\/g, ""); - mustUnescape = false; - } - push(params, paramName, value); - if (code === 44) { - push(offers, extensionName, params); - params = Object.create(null); - extensionName = void 0; - } - paramName = void 0; - start = end = -1; - } else throw new SyntaxError(`Unexpected character at index ${i}`); - } - if (start === -1 || inQuotes || code === 32 || code === 9) throw new SyntaxError("Unexpected end of input"); - if (end === -1) end = i; - const token = header.slice(start, end); - if (extensionName === void 0) push(offers, token, params); - else { - if (paramName === void 0) push(params, token, true); - else if (mustUnescape) push(params, paramName, token.replace(/\\/g, "")); - else push(params, paramName, token); - push(offers, extensionName, params); - } - return offers; - } - /** - * Builds the `Sec-WebSocket-Extensions` header field value. - * - * @param {Object} extensions The map of extensions and parameters to format - * @return {String} A string representing the given object - * @public - */ - function format(extensions) { - return Object.keys(extensions).map((extension) => { - let configurations = extensions[extension]; - if (!Array.isArray(configurations)) configurations = [configurations]; - return configurations.map((params) => { - return [extension].concat(Object.keys(params).map((k) => { - let values = params[k]; - if (!Array.isArray(values)) values = [values]; - return values.map((v) => v === true ? k : `${k}=${v}`).join("; "); - })).join("; "); - }).join(", "); - }).join(", "); - } - module.exports = { - format, - parse - }; -})); -var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const EventEmitter$1 = __require("events"); - const https = __require("https"); - const http$1 = __require("http"); - const net = __require("net"); - const tls = __require("tls"); - const { randomBytes, createHash: createHash$1 } = __require("crypto"); - const { Duplex: Duplex$2, Readable } = __require("stream"); - const { URL } = __require("url"); - const PerMessageDeflate = require_permessage_deflate(); - const Receiver = require_receiver(); - const Sender = require_sender(); - const { isBlob } = require_validation(); - const { BINARY_TYPES, CLOSE_TIMEOUT, EMPTY_BUFFER, GUID, kForOnEventAttribute, kListener, kStatusCode, kWebSocket, NOOP } = require_constants(); - const { EventTarget: { addEventListener, removeEventListener } } = require_event_target(); - const { format, parse } = require_extension(); - const { toBuffer } = require_buffer_util(); - const kAborted = Symbol("kAborted"); - const protocolVersions = [8, 13]; - const readyStates = [ - "CONNECTING", - "OPEN", - "CLOSING", - "CLOSED" - ]; - const subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/; - /** - * Class representing a WebSocket. - * - * @extends EventEmitter - */ - var WebSocket = class WebSocket extends EventEmitter$1 { - /** - * Create a new `WebSocket`. - * - * @param {(String|URL)} address The URL to which to connect - * @param {(String|String[])} [protocols] The subprotocols - * @param {Object} [options] Connection options - */ - constructor(address, protocols, options) { - super(); - this._binaryType = BINARY_TYPES[0]; - this._closeCode = 1006; - this._closeFrameReceived = false; - this._closeFrameSent = false; - this._closeMessage = EMPTY_BUFFER; - this._closeTimer = null; - this._errorEmitted = false; - this._extensions = {}; - this._paused = false; - this._protocol = ""; - this._readyState = WebSocket.CONNECTING; - this._receiver = null; - this._sender = null; - this._socket = null; - if (address !== null) { - this._bufferedAmount = 0; - this._isServer = false; - this._redirects = 0; - if (protocols === void 0) protocols = []; - else if (!Array.isArray(protocols)) if (typeof protocols === "object" && protocols !== null) { - options = protocols; - protocols = []; - } else protocols = [protocols]; - initAsClient(this, address, protocols, options); - } else { - this._autoPong = options.autoPong; - this._closeTimeout = options.closeTimeout; - this._isServer = true; - } - } - /** - * For historical reasons, the custom "nodebuffer" type is used by the default - * instead of "blob". - * - * @type {String} - */ - get binaryType() { - return this._binaryType; - } - set binaryType(type) { - if (!BINARY_TYPES.includes(type)) return; - this._binaryType = type; - if (this._receiver) this._receiver._binaryType = type; - } - /** - * @type {Number} - */ - get bufferedAmount() { - if (!this._socket) return this._bufferedAmount; - return this._socket._writableState.length + this._sender._bufferedBytes; - } - /** - * @type {String} - */ - get extensions() { - return Object.keys(this._extensions).join(); - } - /** - * @type {Boolean} - */ - get isPaused() { - return this._paused; - } - /** - * @type {Function} - */ - /* istanbul ignore next */ - get onclose() { - return null; - } - /** - * @type {Function} - */ - /* istanbul ignore next */ - get onerror() { - return null; - } - /** - * @type {Function} - */ - /* istanbul ignore next */ - get onopen() { - return null; - } - /** - * @type {Function} - */ - /* istanbul ignore next */ - get onmessage() { - return null; - } - /** - * @type {String} - */ - get protocol() { - return this._protocol; - } - /** - * @type {Number} - */ - get readyState() { - return this._readyState; - } - /** - * @type {String} - */ - get url() { - return this._url; - } - /** - * Set up the socket and the internal resources. - * - * @param {Duplex} socket The network socket between the server and client - * @param {Buffer} head The first packet of the upgraded stream - * @param {Object} options Options object - * @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether - * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted - * multiple times in the same tick - * @param {Function} [options.generateMask] The function used to generate the - * masking key - * @param {Number} [options.maxPayload=0] The maximum allowed message size - * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or - * not to skip UTF-8 validation for text and close messages - * @private - */ - setSocket(socket, head, options) { - const receiver = new Receiver({ - allowSynchronousEvents: options.allowSynchronousEvents, - binaryType: this.binaryType, - extensions: this._extensions, - isServer: this._isServer, - maxPayload: options.maxPayload, - skipUTF8Validation: options.skipUTF8Validation - }); - const sender = new Sender(socket, this._extensions, options.generateMask); - this._receiver = receiver; - this._sender = sender; - this._socket = socket; - receiver[kWebSocket] = this; - sender[kWebSocket] = this; - socket[kWebSocket] = this; - receiver.on("conclude", receiverOnConclude); - receiver.on("drain", receiverOnDrain); - receiver.on("error", receiverOnError); - receiver.on("message", receiverOnMessage); - receiver.on("ping", receiverOnPing); - receiver.on("pong", receiverOnPong); - sender.onerror = senderOnError; - if (socket.setTimeout) socket.setTimeout(0); - if (socket.setNoDelay) socket.setNoDelay(); - if (head.length > 0) socket.unshift(head); - socket.on("close", socketOnClose); - socket.on("data", socketOnData); - socket.on("end", socketOnEnd); - socket.on("error", socketOnError); - this._readyState = WebSocket.OPEN; - this.emit("open"); - } - /** - * Emit the `'close'` event. - * - * @private - */ - emitClose() { - if (!this._socket) { - this._readyState = WebSocket.CLOSED; - this.emit("close", this._closeCode, this._closeMessage); - return; - } - if (this._extensions[PerMessageDeflate.extensionName]) this._extensions[PerMessageDeflate.extensionName].cleanup(); - this._receiver.removeAllListeners(); - this._readyState = WebSocket.CLOSED; - this.emit("close", this._closeCode, this._closeMessage); - } - /** - * Start a closing handshake. - * - * +----------+ +-----------+ +----------+ - * - - -|ws.close()|-->|close frame|-->|ws.close()|- - - - * | +----------+ +-----------+ +----------+ | - * +----------+ +-----------+ | - * CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING - * +----------+ +-----------+ | - * | | | +---+ | - * +------------------------+-->|fin| - - - - - * | +---+ | +---+ - * - - - - -|fin|<---------------------+ - * +---+ - * - * @param {Number} [code] Status code explaining why the connection is closing - * @param {(String|Buffer)} [data] The reason why the connection is - * closing - * @public - */ - close(code, data) { - if (this.readyState === WebSocket.CLOSED) return; - if (this.readyState === WebSocket.CONNECTING) { - abortHandshake(this, this._req, "WebSocket was closed before the connection was established"); - return; - } - if (this.readyState === WebSocket.CLOSING) { - if (this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted)) this._socket.end(); - return; - } - this._readyState = WebSocket.CLOSING; - this._sender.close(code, data, !this._isServer, (err) => { - if (err) return; - this._closeFrameSent = true; - if (this._closeFrameReceived || this._receiver._writableState.errorEmitted) this._socket.end(); - }); - setCloseTimer(this); - } - /** - * Pause the socket. - * - * @public - */ - pause() { - if (this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED) return; - this._paused = true; - this._socket.pause(); - } - /** - * Send a ping. - * - * @param {*} [data] The data to send - * @param {Boolean} [mask] Indicates whether or not to mask `data` - * @param {Function} [cb] Callback which is executed when the ping is sent - * @public - */ - ping(data, mask, cb) { - if (this.readyState === WebSocket.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)"); - if (typeof data === "function") { - cb = data; - data = mask = void 0; - } else if (typeof mask === "function") { - cb = mask; - mask = void 0; - } - if (typeof data === "number") data = data.toString(); - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - if (mask === void 0) mask = !this._isServer; - this._sender.ping(data || EMPTY_BUFFER, mask, cb); - } - /** - * Send a pong. - * - * @param {*} [data] The data to send - * @param {Boolean} [mask] Indicates whether or not to mask `data` - * @param {Function} [cb] Callback which is executed when the pong is sent - * @public - */ - pong(data, mask, cb) { - if (this.readyState === WebSocket.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)"); - if (typeof data === "function") { - cb = data; - data = mask = void 0; - } else if (typeof mask === "function") { - cb = mask; - mask = void 0; - } - if (typeof data === "number") data = data.toString(); - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - if (mask === void 0) mask = !this._isServer; - this._sender.pong(data || EMPTY_BUFFER, mask, cb); - } - /** - * Resume the socket. - * - * @public - */ - resume() { - if (this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED) return; - this._paused = false; - if (!this._receiver._writableState.needDrain) this._socket.resume(); - } - /** - * Send a data message. - * - * @param {*} data The message to send - * @param {Object} [options] Options object - * @param {Boolean} [options.binary] Specifies whether `data` is binary or - * text - * @param {Boolean} [options.compress] Specifies whether or not to compress - * `data` - * @param {Boolean} [options.fin=true] Specifies whether the fragment is the - * last one - * @param {Boolean} [options.mask] Specifies whether or not to mask `data` - * @param {Function} [cb] Callback which is executed when data is written out - * @public - */ - send(data, options, cb) { - if (this.readyState === WebSocket.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)"); - if (typeof options === "function") { - cb = options; - options = {}; - } - if (typeof data === "number") data = data.toString(); - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - const opts = { - binary: typeof data !== "string", - mask: !this._isServer, - compress: true, - fin: true, - ...options - }; - if (!this._extensions[PerMessageDeflate.extensionName]) opts.compress = false; - this._sender.send(data || EMPTY_BUFFER, opts, cb); - } - /** - * Forcibly close the connection. - * - * @public - */ - terminate() { - if (this.readyState === WebSocket.CLOSED) return; - if (this.readyState === WebSocket.CONNECTING) { - abortHandshake(this, this._req, "WebSocket was closed before the connection was established"); - return; - } - if (this._socket) { - this._readyState = WebSocket.CLOSING; - this._socket.destroy(); - } - } - }; - /** - * @constant {Number} CONNECTING - * @memberof WebSocket - */ - Object.defineProperty(WebSocket, "CONNECTING", { - enumerable: true, - value: readyStates.indexOf("CONNECTING") - }); - /** - * @constant {Number} CONNECTING - * @memberof WebSocket.prototype - */ - Object.defineProperty(WebSocket.prototype, "CONNECTING", { - enumerable: true, - value: readyStates.indexOf("CONNECTING") - }); - /** - * @constant {Number} OPEN - * @memberof WebSocket - */ - Object.defineProperty(WebSocket, "OPEN", { - enumerable: true, - value: readyStates.indexOf("OPEN") - }); - /** - * @constant {Number} OPEN - * @memberof WebSocket.prototype - */ - Object.defineProperty(WebSocket.prototype, "OPEN", { - enumerable: true, - value: readyStates.indexOf("OPEN") - }); - /** - * @constant {Number} CLOSING - * @memberof WebSocket - */ - Object.defineProperty(WebSocket, "CLOSING", { - enumerable: true, - value: readyStates.indexOf("CLOSING") - }); - /** - * @constant {Number} CLOSING - * @memberof WebSocket.prototype - */ - Object.defineProperty(WebSocket.prototype, "CLOSING", { - enumerable: true, - value: readyStates.indexOf("CLOSING") - }); - /** - * @constant {Number} CLOSED - * @memberof WebSocket - */ - Object.defineProperty(WebSocket, "CLOSED", { - enumerable: true, - value: readyStates.indexOf("CLOSED") - }); - /** - * @constant {Number} CLOSED - * @memberof WebSocket.prototype - */ - Object.defineProperty(WebSocket.prototype, "CLOSED", { - enumerable: true, - value: readyStates.indexOf("CLOSED") - }); - [ - "binaryType", - "bufferedAmount", - "extensions", - "isPaused", - "protocol", - "readyState", - "url" - ].forEach((property) => { - Object.defineProperty(WebSocket.prototype, property, { enumerable: true }); - }); - [ - "open", - "error", - "close", - "message" - ].forEach((method) => { - Object.defineProperty(WebSocket.prototype, `on${method}`, { - enumerable: true, - get() { - for (const listener of this.listeners(method)) if (listener[kForOnEventAttribute]) return listener[kListener]; - return null; - }, - set(handler) { - for (const listener of this.listeners(method)) if (listener[kForOnEventAttribute]) { - this.removeListener(method, listener); - break; - } - if (typeof handler !== "function") return; - this.addEventListener(method, handler, { [kForOnEventAttribute]: true }); - } - }); - }); - WebSocket.prototype.addEventListener = addEventListener; - WebSocket.prototype.removeEventListener = removeEventListener; - module.exports = WebSocket; - /** - * Initialize a WebSocket client. - * - * @param {WebSocket} websocket The client to initialize - * @param {(String|URL)} address The URL to which to connect - * @param {Array} protocols The subprotocols - * @param {Object} [options] Connection options - * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether any - * of the `'message'`, `'ping'`, and `'pong'` events can be emitted multiple - * times in the same tick - * @param {Boolean} [options.autoPong=true] Specifies whether or not to - * automatically send a pong in response to a ping - * @param {Number} [options.closeTimeout=30000] Duration in milliseconds to wait - * for the closing handshake to finish after `websocket.close()` is called - * @param {Function} [options.finishRequest] A function which can be used to - * customize the headers of each http request before it is sent - * @param {Boolean} [options.followRedirects=false] Whether or not to follow - * redirects - * @param {Function} [options.generateMask] The function used to generate the - * masking key - * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the - * handshake request - * @param {Number} [options.maxPayload=104857600] The maximum allowed message - * size - * @param {Number} [options.maxRedirects=10] The maximum number of redirects - * allowed - * @param {String} [options.origin] Value of the `Origin` or - * `Sec-WebSocket-Origin` header - * @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable - * permessage-deflate - * @param {Number} [options.protocolVersion=13] Value of the - * `Sec-WebSocket-Version` header - * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or - * not to skip UTF-8 validation for text and close messages - * @private - */ - function initAsClient(websocket, address, protocols, options) { - const opts = { - allowSynchronousEvents: true, - autoPong: true, - closeTimeout: CLOSE_TIMEOUT, - protocolVersion: protocolVersions[1], - maxPayload: 100 * 1024 * 1024, - skipUTF8Validation: false, - perMessageDeflate: true, - followRedirects: false, - maxRedirects: 10, - ...options, - socketPath: void 0, - hostname: void 0, - protocol: void 0, - timeout: void 0, - method: "GET", - host: void 0, - path: void 0, - port: void 0 - }; - websocket._autoPong = opts.autoPong; - websocket._closeTimeout = opts.closeTimeout; - if (!protocolVersions.includes(opts.protocolVersion)) throw new RangeError(`Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`); - let parsedUrl; - if (address instanceof URL) parsedUrl = address; - else try { - parsedUrl = new URL(address); - } catch (e) { - throw new SyntaxError(`Invalid URL: ${address}`); - } - if (parsedUrl.protocol === "http:") parsedUrl.protocol = "ws:"; - else if (parsedUrl.protocol === "https:") parsedUrl.protocol = "wss:"; - websocket._url = parsedUrl.href; - const isSecure = parsedUrl.protocol === "wss:"; - const isIpcUrl = parsedUrl.protocol === "ws+unix:"; - let invalidUrlMessage; - if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) invalidUrlMessage = "The URL's protocol must be one of \"ws:\", \"wss:\", \"http:\", \"https:\", or \"ws+unix:\""; - else if (isIpcUrl && !parsedUrl.pathname) invalidUrlMessage = "The URL's pathname is empty"; - else if (parsedUrl.hash) invalidUrlMessage = "The URL contains a fragment identifier"; - if (invalidUrlMessage) { - const err = new SyntaxError(invalidUrlMessage); - if (websocket._redirects === 0) throw err; - else { - emitErrorAndClose(websocket, err); - return; - } - } - const defaultPort = isSecure ? 443 : 80; - const key = randomBytes(16).toString("base64"); - const request = isSecure ? https.request : http$1.request; - const protocolSet = /* @__PURE__ */ new Set(); - let perMessageDeflate; - opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect); - opts.defaultPort = opts.defaultPort || defaultPort; - opts.port = parsedUrl.port || defaultPort; - opts.host = parsedUrl.hostname.startsWith("[") ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname; - opts.headers = { - ...opts.headers, - "Sec-WebSocket-Version": opts.protocolVersion, - "Sec-WebSocket-Key": key, - Connection: "Upgrade", - Upgrade: "websocket" - }; - opts.path = parsedUrl.pathname + parsedUrl.search; - opts.timeout = opts.handshakeTimeout; - if (opts.perMessageDeflate) { - perMessageDeflate = new PerMessageDeflate(opts.perMessageDeflate !== true ? opts.perMessageDeflate : {}, false, opts.maxPayload); - opts.headers["Sec-WebSocket-Extensions"] = format({ [PerMessageDeflate.extensionName]: perMessageDeflate.offer() }); - } - if (protocols.length) { - for (const protocol of protocols) { - if (typeof protocol !== "string" || !subprotocolRegex.test(protocol) || protocolSet.has(protocol)) throw new SyntaxError("An invalid or duplicated subprotocol was specified"); - protocolSet.add(protocol); - } - opts.headers["Sec-WebSocket-Protocol"] = protocols.join(","); - } - if (opts.origin) if (opts.protocolVersion < 13) opts.headers["Sec-WebSocket-Origin"] = opts.origin; - else opts.headers.Origin = opts.origin; - if (parsedUrl.username || parsedUrl.password) opts.auth = `${parsedUrl.username}:${parsedUrl.password}`; - if (isIpcUrl) { - const parts = opts.path.split(":"); - opts.socketPath = parts[0]; - opts.path = parts[1]; - } - let req; - if (opts.followRedirects) { - if (websocket._redirects === 0) { - websocket._originalIpc = isIpcUrl; - websocket._originalSecure = isSecure; - websocket._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host; - const headers = options && options.headers; - options = { - ...options, - headers: {} - }; - if (headers) for (const [key, value] of Object.entries(headers)) options.headers[key.toLowerCase()] = value; - } else if (websocket.listenerCount("redirect") === 0) { - const isSameHost = isIpcUrl ? websocket._originalIpc ? opts.socketPath === websocket._originalHostOrSocketPath : false : websocket._originalIpc ? false : parsedUrl.host === websocket._originalHostOrSocketPath; - if (!isSameHost || websocket._originalSecure && !isSecure) { - delete opts.headers.authorization; - delete opts.headers.cookie; - if (!isSameHost) delete opts.headers.host; - opts.auth = void 0; - } - } - if (opts.auth && !options.headers.authorization) options.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64"); - req = websocket._req = request(opts); - if (websocket._redirects) websocket.emit("redirect", websocket.url, req); - } else req = websocket._req = request(opts); - if (opts.timeout) req.on("timeout", () => { - abortHandshake(websocket, req, "Opening handshake has timed out"); - }); - req.on("error", (err) => { - if (req === null || req[kAborted]) return; - req = websocket._req = null; - emitErrorAndClose(websocket, err); - }); - req.on("response", (res) => { - const location = res.headers.location; - const statusCode = res.statusCode; - if (location && opts.followRedirects && statusCode >= 300 && statusCode < 400) { - if (++websocket._redirects > opts.maxRedirects) { - abortHandshake(websocket, req, "Maximum redirects exceeded"); - return; - } - req.abort(); - let addr; - try { - addr = new URL(location, address); - } catch (e) { - emitErrorAndClose(websocket, /* @__PURE__ */ new SyntaxError(`Invalid URL: ${location}`)); - return; - } - initAsClient(websocket, addr, protocols, options); - } else if (!websocket.emit("unexpected-response", req, res)) abortHandshake(websocket, req, `Unexpected server response: ${res.statusCode}`); - }); - req.on("upgrade", (res, socket, head) => { - websocket.emit("upgrade", res); - if (websocket.readyState !== WebSocket.CONNECTING) return; - req = websocket._req = null; - const upgrade = res.headers.upgrade; - if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") { - abortHandshake(websocket, socket, "Invalid Upgrade header"); - return; - } - const digest = createHash$1("sha1").update(key + GUID).digest("base64"); - if (res.headers["sec-websocket-accept"] !== digest) { - abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header"); - return; - } - const serverProt = res.headers["sec-websocket-protocol"]; - let protError; - if (serverProt !== void 0) { - if (!protocolSet.size) protError = "Server sent a subprotocol but none was requested"; - else if (!protocolSet.has(serverProt)) protError = "Server sent an invalid subprotocol"; - } else if (protocolSet.size) protError = "Server sent no subprotocol"; - if (protError) { - abortHandshake(websocket, socket, protError); - return; - } - if (serverProt) websocket._protocol = serverProt; - const secWebSocketExtensions = res.headers["sec-websocket-extensions"]; - if (secWebSocketExtensions !== void 0) { - if (!perMessageDeflate) { - abortHandshake(websocket, socket, "Server sent a Sec-WebSocket-Extensions header but no extension was requested"); - return; - } - let extensions; - try { - extensions = parse(secWebSocketExtensions); - } catch (err) { - abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Extensions header"); - return; - } - const extensionNames = Object.keys(extensions); - if (extensionNames.length !== 1 || extensionNames[0] !== PerMessageDeflate.extensionName) { - abortHandshake(websocket, socket, "Server indicated an extension that was not requested"); - return; - } - try { - perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]); - } catch (err) { - abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Extensions header"); - return; - } - websocket._extensions[PerMessageDeflate.extensionName] = perMessageDeflate; - } - websocket.setSocket(socket, head, { - allowSynchronousEvents: opts.allowSynchronousEvents, - generateMask: opts.generateMask, - maxPayload: opts.maxPayload, - skipUTF8Validation: opts.skipUTF8Validation - }); - }); - if (opts.finishRequest) opts.finishRequest(req, websocket); - else req.end(); - } - /** - * Emit the `'error'` and `'close'` events. - * - * @param {WebSocket} websocket The WebSocket instance - * @param {Error} The error to emit - * @private - */ - function emitErrorAndClose(websocket, err) { - websocket._readyState = WebSocket.CLOSING; - websocket._errorEmitted = true; - websocket.emit("error", err); - websocket.emitClose(); - } - /** - * Create a `net.Socket` and initiate a connection. - * - * @param {Object} options Connection options - * @return {net.Socket} The newly created socket used to start the connection - * @private - */ - function netConnect(options) { - options.path = options.socketPath; - return net.connect(options); - } - /** - * Create a `tls.TLSSocket` and initiate a connection. - * - * @param {Object} options Connection options - * @return {tls.TLSSocket} The newly created socket used to start the connection - * @private - */ - function tlsConnect(options) { - options.path = void 0; - if (!options.servername && options.servername !== "") options.servername = net.isIP(options.host) ? "" : options.host; - return tls.connect(options); - } - /** - * Abort the handshake and emit an error. - * - * @param {WebSocket} websocket The WebSocket instance - * @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to - * abort or the socket to destroy - * @param {String} message The error message - * @private - */ - function abortHandshake(websocket, stream, message) { - websocket._readyState = WebSocket.CLOSING; - const err = new Error(message); - Error.captureStackTrace(err, abortHandshake); - if (stream.setHeader) { - stream[kAborted] = true; - stream.abort(); - if (stream.socket && !stream.socket.destroyed) stream.socket.destroy(); - process.nextTick(emitErrorAndClose, websocket, err); - } else { - stream.destroy(err); - stream.once("error", websocket.emit.bind(websocket, "error")); - stream.once("close", websocket.emitClose.bind(websocket)); - } - } - /** - * Handle cases where the `ping()`, `pong()`, or `send()` methods are called - * when the `readyState` attribute is `CLOSING` or `CLOSED`. - * - * @param {WebSocket} websocket The WebSocket instance - * @param {*} [data] The data to send - * @param {Function} [cb] Callback - * @private - */ - function sendAfterClose(websocket, data, cb) { - if (data) { - const length = isBlob(data) ? data.size : toBuffer(data).length; - if (websocket._socket) websocket._sender._bufferedBytes += length; - else websocket._bufferedAmount += length; - } - if (cb) { - const err = /* @__PURE__ */ new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`); - process.nextTick(cb, err); - } - } - /** - * The listener of the `Receiver` `'conclude'` event. - * - * @param {Number} code The status code - * @param {Buffer} reason The reason for closing - * @private - */ - function receiverOnConclude(code, reason) { - const websocket = this[kWebSocket]; - websocket._closeFrameReceived = true; - websocket._closeMessage = reason; - websocket._closeCode = code; - if (websocket._socket[kWebSocket] === void 0) return; - websocket._socket.removeListener("data", socketOnData); - process.nextTick(resume, websocket._socket); - if (code === 1005) websocket.close(); - else websocket.close(code, reason); - } - /** - * The listener of the `Receiver` `'drain'` event. - * - * @private - */ - function receiverOnDrain() { - const websocket = this[kWebSocket]; - if (!websocket.isPaused) websocket._socket.resume(); - } - /** - * The listener of the `Receiver` `'error'` event. - * - * @param {(RangeError|Error)} err The emitted error - * @private - */ - function receiverOnError(err) { - const websocket = this[kWebSocket]; - if (websocket._socket[kWebSocket] !== void 0) { - websocket._socket.removeListener("data", socketOnData); - process.nextTick(resume, websocket._socket); - websocket.close(err[kStatusCode]); - } - if (!websocket._errorEmitted) { - websocket._errorEmitted = true; - websocket.emit("error", err); - } - } - /** - * The listener of the `Receiver` `'finish'` event. - * - * @private - */ - function receiverOnFinish() { - this[kWebSocket].emitClose(); - } - /** - * The listener of the `Receiver` `'message'` event. - * - * @param {Buffer|ArrayBuffer|Buffer[])} data The message - * @param {Boolean} isBinary Specifies whether the message is binary or not - * @private - */ - function receiverOnMessage(data, isBinary) { - this[kWebSocket].emit("message", data, isBinary); - } - /** - * The listener of the `Receiver` `'ping'` event. - * - * @param {Buffer} data The data included in the ping frame - * @private - */ - function receiverOnPing(data) { - const websocket = this[kWebSocket]; - if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP); - websocket.emit("ping", data); - } - /** - * The listener of the `Receiver` `'pong'` event. - * - * @param {Buffer} data The data included in the pong frame - * @private - */ - function receiverOnPong(data) { - this[kWebSocket].emit("pong", data); - } - /** - * Resume a readable stream - * - * @param {Readable} stream The readable stream - * @private - */ - function resume(stream) { - stream.resume(); - } - /** - * The `Sender` error event handler. - * - * @param {Error} The error - * @private - */ - function senderOnError(err) { - const websocket = this[kWebSocket]; - if (websocket.readyState === WebSocket.CLOSED) return; - if (websocket.readyState === WebSocket.OPEN) { - websocket._readyState = WebSocket.CLOSING; - setCloseTimer(websocket); - } - this._socket.end(); - if (!websocket._errorEmitted) { - websocket._errorEmitted = true; - websocket.emit("error", err); - } - } - /** - * Set a timer to destroy the underlying raw socket of a WebSocket. - * - * @param {WebSocket} websocket The WebSocket instance - * @private - */ - function setCloseTimer(websocket) { - websocket._closeTimer = setTimeout(websocket._socket.destroy.bind(websocket._socket), websocket._closeTimeout); - } - /** - * The listener of the socket `'close'` event. - * - * @private - */ - function socketOnClose() { - const websocket = this[kWebSocket]; - this.removeListener("close", socketOnClose); - this.removeListener("data", socketOnData); - this.removeListener("end", socketOnEnd); - websocket._readyState = WebSocket.CLOSING; - if (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && this._readableState.length !== 0) { - const chunk = this.read(this._readableState.length); - websocket._receiver.write(chunk); - } - websocket._receiver.end(); - this[kWebSocket] = void 0; - clearTimeout(websocket._closeTimer); - if (websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted) websocket.emitClose(); - else { - websocket._receiver.on("error", receiverOnFinish); - websocket._receiver.on("finish", receiverOnFinish); - } - } - /** - * The listener of the socket `'data'` event. - * - * @param {Buffer} chunk A chunk of data - * @private - */ - function socketOnData(chunk) { - if (!this[kWebSocket]._receiver.write(chunk)) this.pause(); - } - /** - * The listener of the socket `'end'` event. - * - * @private - */ - function socketOnEnd() { - const websocket = this[kWebSocket]; - websocket._readyState = WebSocket.CLOSING; - websocket._receiver.end(); - this.end(); - } - /** - * The listener of the socket `'error'` event. - * - * @private - */ - function socketOnError() { - const websocket = this[kWebSocket]; - this.removeListener("error", socketOnError); - this.on("error", NOOP); - if (websocket) { - websocket._readyState = WebSocket.CLOSING; - this.destroy(); - } - } -})); -var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { - require_websocket(); - const { Duplex: Duplex$1 } = __require("stream"); - /** - * Emits the `'close'` event on a stream. - * - * @param {Duplex} stream The stream. - * @private - */ - function emitClose(stream) { - stream.emit("close"); - } - /** - * The listener of the `'end'` event. - * - * @private - */ - function duplexOnEnd() { - if (!this.destroyed && this._writableState.finished) this.destroy(); - } - /** - * The listener of the `'error'` event. - * - * @param {Error} err The error - * @private - */ - function duplexOnError(err) { - this.removeListener("error", duplexOnError); - this.destroy(); - if (this.listenerCount("error") === 0) this.emit("error", err); - } - /** - * Wraps a `WebSocket` in a duplex stream. - * - * @param {WebSocket} ws The `WebSocket` to wrap - * @param {Object} [options] The options for the `Duplex` constructor - * @return {Duplex} The duplex stream - * @public - */ - function createWebSocketStream(ws, options) { - let terminateOnDestroy = true; - const duplex = new Duplex$1({ - ...options, - autoDestroy: false, - emitClose: false, - objectMode: false, - writableObjectMode: false - }); - ws.on("message", function message(msg, isBinary) { - const data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg; - if (!duplex.push(data)) ws.pause(); - }); - ws.once("error", function error(err) { - if (duplex.destroyed) return; - terminateOnDestroy = false; - duplex.destroy(err); - }); - ws.once("close", function close() { - if (duplex.destroyed) return; - duplex.push(null); - }); - duplex._destroy = function(err, callback) { - if (ws.readyState === ws.CLOSED) { - callback(err); - process.nextTick(emitClose, duplex); - return; - } - let called = false; - ws.once("error", function error(err) { - called = true; - callback(err); - }); - ws.once("close", function close() { - if (!called) callback(err); - process.nextTick(emitClose, duplex); - }); - if (terminateOnDestroy) ws.terminate(); - }; - duplex._final = function(callback) { - if (ws.readyState === ws.CONNECTING) { - ws.once("open", function open() { - duplex._final(callback); - }); - return; - } - if (ws._socket === null) return; - if (ws._socket._writableState.finished) { - callback(); - if (duplex._readableState.endEmitted) duplex.destroy(); - } else { - ws._socket.once("finish", function finish() { - callback(); - }); - ws.close(); - } - }; - duplex._read = function() { - if (ws.isPaused) ws.resume(); - }; - duplex._write = function(chunk, encoding, callback) { - if (ws.readyState === ws.CONNECTING) { - ws.once("open", function open() { - duplex._write(chunk, encoding, callback); - }); - return; - } - ws.send(chunk, callback); - }; - duplex.on("end", duplexOnEnd); - duplex.on("error", duplexOnError); - return duplex; - } - module.exports = createWebSocketStream; -})); -var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { tokenChars } = require_validation(); - /** - * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names. - * - * @param {String} header The field value of the header - * @return {Set} The subprotocol names - * @public - */ - function parse(header) { - const protocols = /* @__PURE__ */ new Set(); - let start = -1; - let end = -1; - let i = 0; - for (; i < header.length; i++) { - const code = header.charCodeAt(i); - if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (i !== 0 && (code === 32 || code === 9)) { - if (end === -1 && start !== -1) end = i; - } else if (code === 44) { - if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`); - if (end === -1) end = i; - const protocol = header.slice(start, end); - if (protocols.has(protocol)) throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`); - protocols.add(protocol); - start = end = -1; - } else throw new SyntaxError(`Unexpected character at index ${i}`); - } - if (start === -1 || end !== -1) throw new SyntaxError("Unexpected end of input"); - const protocol = header.slice(start, i); - if (protocols.has(protocol)) throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`); - protocols.add(protocol); - return protocols; - } - module.exports = { parse }; -})); -var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const EventEmitter = __require("events"); - const http = __require("http"); - const { Duplex } = __require("stream"); - const { createHash } = __require("crypto"); - const extension = require_extension(); - const PerMessageDeflate = require_permessage_deflate(); - const subprotocol = require_subprotocol(); - const WebSocket = require_websocket(); - const { CLOSE_TIMEOUT, GUID, kWebSocket } = require_constants(); - const keyRegex = /^[+/0-9A-Za-z]{22}==$/; - const RUNNING = 0; - const CLOSING = 1; - const CLOSED = 2; - /** - * Class representing a WebSocket server. - * - * @extends EventEmitter - */ - var WebSocketServer = class extends EventEmitter { - /** - * Create a `WebSocketServer` instance. - * - * @param {Object} options Configuration options - * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether - * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted - * multiple times in the same tick - * @param {Boolean} [options.autoPong=true] Specifies whether or not to - * automatically send a pong in response to a ping - * @param {Number} [options.backlog=511] The maximum length of the queue of - * pending connections - * @param {Boolean} [options.clientTracking=true] Specifies whether or not to - * track clients - * @param {Number} [options.closeTimeout=30000] Duration in milliseconds to - * wait for the closing handshake to finish after `websocket.close()` is - * called - * @param {Function} [options.handleProtocols] A hook to handle protocols - * @param {String} [options.host] The hostname where to bind the server - * @param {Number} [options.maxPayload=104857600] The maximum allowed message - * size - * @param {Boolean} [options.noServer=false] Enable no server mode - * @param {String} [options.path] Accept only connections matching this path - * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable - * permessage-deflate - * @param {Number} [options.port] The port where to bind the server - * @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S - * server to use - * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or - * not to skip UTF-8 validation for text and close messages - * @param {Function} [options.verifyClient] A hook to reject connections - * @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket` - * class to use. It must be the `WebSocket` class or class that extends it - * @param {Function} [callback] A listener for the `listening` event - */ - constructor(options, callback) { - super(); - options = { - allowSynchronousEvents: true, - autoPong: true, - maxPayload: 100 * 1024 * 1024, - skipUTF8Validation: false, - perMessageDeflate: false, - handleProtocols: null, - clientTracking: true, - closeTimeout: CLOSE_TIMEOUT, - verifyClient: null, - noServer: false, - backlog: null, - server: null, - host: null, - path: null, - port: null, - WebSocket, - ...options - }; - if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) throw new TypeError("One and only one of the \"port\", \"server\", or \"noServer\" options must be specified"); - if (options.port != null) { - this._server = http.createServer((req, res) => { - const body = http.STATUS_CODES[426]; - res.writeHead(426, { - "Content-Length": body.length, - "Content-Type": "text/plain" - }); - res.end(body); - }); - this._server.listen(options.port, options.host, options.backlog, callback); - } else if (options.server) this._server = options.server; - if (this._server) { - const emitConnection = this.emit.bind(this, "connection"); - this._removeListeners = addListeners(this._server, { - listening: this.emit.bind(this, "listening"), - error: this.emit.bind(this, "error"), - upgrade: (req, socket, head) => { - this.handleUpgrade(req, socket, head, emitConnection); - } - }); - } - if (options.perMessageDeflate === true) options.perMessageDeflate = {}; - if (options.clientTracking) { - this.clients = /* @__PURE__ */ new Set(); - this._shouldEmitClose = false; - } - this.options = options; - this._state = RUNNING; - } - /** - * Returns the bound address, the address family name, and port of the server - * as reported by the operating system if listening on an IP socket. - * If the server is listening on a pipe or UNIX domain socket, the name is - * returned as a string. - * - * @return {(Object|String|null)} The address of the server - * @public - */ - address() { - if (this.options.noServer) throw new Error("The server is operating in \"noServer\" mode"); - if (!this._server) return null; - return this._server.address(); - } - /** - * Stop the server from accepting new connections and emit the `'close'` event - * when all existing connections are closed. - * - * @param {Function} [cb] A one-time listener for the `'close'` event - * @public - */ - close(cb) { - if (this._state === CLOSED) { - if (cb) this.once("close", () => { - cb(/* @__PURE__ */ new Error("The server is not running")); - }); - process.nextTick(emitClose, this); - return; - } - if (cb) this.once("close", cb); - if (this._state === CLOSING) return; - this._state = CLOSING; - if (this.options.noServer || this.options.server) { - if (this._server) { - this._removeListeners(); - this._removeListeners = this._server = null; - } - if (this.clients) if (!this.clients.size) process.nextTick(emitClose, this); - else this._shouldEmitClose = true; - else process.nextTick(emitClose, this); - } else { - const server = this._server; - this._removeListeners(); - this._removeListeners = this._server = null; - server.close(() => { - emitClose(this); - }); - } - } - /** - * See if a given request should be handled by this server instance. - * - * @param {http.IncomingMessage} req Request object to inspect - * @return {Boolean} `true` if the request is valid, else `false` - * @public - */ - shouldHandle(req) { - if (this.options.path) { - const index = req.url.indexOf("?"); - if ((index !== -1 ? req.url.slice(0, index) : req.url) !== this.options.path) return false; - } - return true; - } - /** - * Handle a HTTP Upgrade request. - * - * @param {http.IncomingMessage} req The request object - * @param {Duplex} socket The network socket between the server and client - * @param {Buffer} head The first packet of the upgraded stream - * @param {Function} cb Callback - * @public - */ - handleUpgrade(req, socket, head, cb) { - socket.on("error", socketOnError); - const key = req.headers["sec-websocket-key"]; - const upgrade = req.headers.upgrade; - const version = +req.headers["sec-websocket-version"]; - if (req.method !== "GET") { - abortHandshakeOrEmitwsClientError(this, req, socket, 405, "Invalid HTTP method"); - return; - } - if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") { - abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid Upgrade header"); - return; - } - if (key === void 0 || !keyRegex.test(key)) { - abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Missing or invalid Sec-WebSocket-Key header"); - return; - } - if (version !== 13 && version !== 8) { - abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Missing or invalid Sec-WebSocket-Version header", { "Sec-WebSocket-Version": "13, 8" }); - return; - } - if (!this.shouldHandle(req)) { - abortHandshake(socket, 400); - return; - } - const secWebSocketProtocol = req.headers["sec-websocket-protocol"]; - let protocols = /* @__PURE__ */ new Set(); - if (secWebSocketProtocol !== void 0) try { - protocols = subprotocol.parse(secWebSocketProtocol); - } catch (err) { - abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid Sec-WebSocket-Protocol header"); - return; - } - const secWebSocketExtensions = req.headers["sec-websocket-extensions"]; - const extensions = {}; - if (this.options.perMessageDeflate && secWebSocketExtensions !== void 0) { - const perMessageDeflate = new PerMessageDeflate(this.options.perMessageDeflate, true, this.options.maxPayload); - try { - const offers = extension.parse(secWebSocketExtensions); - if (offers[PerMessageDeflate.extensionName]) { - perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]); - extensions[PerMessageDeflate.extensionName] = perMessageDeflate; - } - } catch (err) { - abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid or unacceptable Sec-WebSocket-Extensions header"); - return; - } - } - if (this.options.verifyClient) { - const info = { - origin: req.headers[`${version === 8 ? "sec-websocket-origin" : "origin"}`], - secure: !!(req.socket.authorized || req.socket.encrypted), - req - }; - if (this.options.verifyClient.length === 2) { - this.options.verifyClient(info, (verified, code, message, headers) => { - if (!verified) return abortHandshake(socket, code || 401, message, headers); - this.completeUpgrade(extensions, key, protocols, req, socket, head, cb); - }); - return; - } - if (!this.options.verifyClient(info)) return abortHandshake(socket, 401); - } - this.completeUpgrade(extensions, key, protocols, req, socket, head, cb); - } - /** - * Upgrade the connection to WebSocket. - * - * @param {Object} extensions The accepted extensions - * @param {String} key The value of the `Sec-WebSocket-Key` header - * @param {Set} protocols The subprotocols - * @param {http.IncomingMessage} req The request object - * @param {Duplex} socket The network socket between the server and client - * @param {Buffer} head The first packet of the upgraded stream - * @param {Function} cb Callback - * @throws {Error} If called more than once with the same socket - * @private - */ - completeUpgrade(extensions, key, protocols, req, socket, head, cb) { - if (!socket.readable || !socket.writable) return socket.destroy(); - if (socket[kWebSocket]) throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration"); - if (this._state > RUNNING) return abortHandshake(socket, 503); - const headers = [ - "HTTP/1.1 101 Switching Protocols", - "Upgrade: websocket", - "Connection: Upgrade", - `Sec-WebSocket-Accept: ${createHash("sha1").update(key + GUID).digest("base64")}` - ]; - const ws = new this.options.WebSocket(null, void 0, this.options); - if (protocols.size) { - const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value; - if (protocol) { - headers.push(`Sec-WebSocket-Protocol: ${protocol}`); - ws._protocol = protocol; - } - } - if (extensions[PerMessageDeflate.extensionName]) { - const params = extensions[PerMessageDeflate.extensionName].params; - const value = extension.format({ [PerMessageDeflate.extensionName]: [params] }); - headers.push(`Sec-WebSocket-Extensions: ${value}`); - ws._extensions = extensions; - } - this.emit("headers", headers, req); - socket.write(headers.concat("\r\n").join("\r\n")); - socket.removeListener("error", socketOnError); - ws.setSocket(socket, head, { - allowSynchronousEvents: this.options.allowSynchronousEvents, - maxPayload: this.options.maxPayload, - skipUTF8Validation: this.options.skipUTF8Validation - }); - if (this.clients) { - this.clients.add(ws); - ws.on("close", () => { - this.clients.delete(ws); - if (this._shouldEmitClose && !this.clients.size) process.nextTick(emitClose, this); - }); - } - cb(ws, req); - } - }; - module.exports = WebSocketServer; - /** - * Add event listeners on an `EventEmitter` using a map of - * pairs. - * - * @param {EventEmitter} server The event emitter - * @param {Object.} map The listeners to add - * @return {Function} A function that will remove the added listeners when - * called - * @private - */ - function addListeners(server, map) { - for (const event of Object.keys(map)) server.on(event, map[event]); - return function removeListeners() { - for (const event of Object.keys(map)) server.removeListener(event, map[event]); - }; - } - /** - * Emit a `'close'` event on an `EventEmitter`. - * - * @param {EventEmitter} server The event emitter - * @private - */ - function emitClose(server) { - server._state = CLOSED; - server.emit("close"); - } - /** - * Handle socket errors. - * - * @private - */ - function socketOnError() { - this.destroy(); - } - /** - * Close the connection when preconditions are not fulfilled. - * - * @param {Duplex} socket The socket of the upgrade request - * @param {Number} code The HTTP response status code - * @param {String} [message] The HTTP response body - * @param {Object} [headers] Additional HTTP response headers - * @private - */ - function abortHandshake(socket, code, message, headers) { - message = message || http.STATUS_CODES[code]; - headers = { - Connection: "close", - "Content-Type": "text/html", - "Content-Length": Buffer.byteLength(message), - ...headers - }; - socket.once("finish", socket.destroy); - socket.end(`HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message); - } - /** - * Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least - * one listener for it, otherwise call `abortHandshake()`. - * - * @param {WebSocketServer} server The WebSocket server - * @param {http.IncomingMessage} req The request object - * @param {Duplex} socket The socket of the upgrade request - * @param {Number} code The HTTP response status code - * @param {String} message The HTTP response body - * @param {Object} [headers] The HTTP response headers - * @private - */ - function abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) { - if (server.listenerCount("wsClientError")) { - const err = new Error(message); - Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError); - server.emit("wsClientError", err, socket, req); - } else abortHandshake(socket, code, message, headers); - } -})); -require_stream(); -require_receiver(); -require_sender(); -var import_websocket = /* @__PURE__ */ __toESM(require_websocket(), 1); -var import_websocket_server = /* @__PURE__ */ __toESM(require_websocket_server(), 1); - -//#endregion -//#region node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/peer.mjs -const kNodeInspect = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom"); -function toBufferLike(val) { - if (val === void 0 || val === null) return ""; - const type = typeof val; - if (type === "string") return val; - if (type === "number" || type === "boolean" || type === "bigint") return val.toString(); - if (type === "function" || type === "symbol") return "{}"; - if (val instanceof Uint8Array || val instanceof ArrayBuffer) return val; - if (isPlainObject(val)) return JSON.stringify(val); - return val; -} -function isPlainObject(value) { - if (value === null || typeof value !== "object") return false; - const prototype = Object.getPrototypeOf(value); - if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false; - if (Symbol.iterator in value) return false; - if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]"; - return true; -} -var Message = class { - /** Access to the original [message event](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/message_event) if available. */ - event; - /** Access to the Peer that emitted the message. */ - peer; - /** Raw message data (can be of any type). */ - rawData; - #id; - #uint8Array; - #arrayBuffer; - #blob; - #text; - #json; - constructor(rawData, peer, event) { - this.rawData = rawData || ""; - this.peer = peer; - this.event = event; - } - /** - * Unique random [uuid v4](https://developer.mozilla.org/en-US/docs/Glossary/UUID) identifier for the message. - */ - get id() { - if (!this.#id) this.#id = crypto.randomUUID(); - return this.#id; - } - /** - * Get data as [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) value. - * - * If raw data is in any other format or string, it will be automatically converted and encoded. - */ - uint8Array() { - const _uint8Array = this.#uint8Array; - if (_uint8Array) return _uint8Array; - const rawData = this.rawData; - if (rawData instanceof Uint8Array) return this.#uint8Array = rawData; - if (rawData instanceof ArrayBuffer || rawData instanceof SharedArrayBuffer) { - this.#arrayBuffer = rawData; - return this.#uint8Array = new Uint8Array(rawData); - } - if (typeof rawData === "string") { - this.#text = rawData; - return this.#uint8Array = new TextEncoder().encode(this.#text); - } - if (Symbol.iterator in rawData) return this.#uint8Array = new Uint8Array(rawData); - if (typeof rawData?.length === "number") return this.#uint8Array = new Uint8Array(rawData); - if (rawData instanceof DataView) return this.#uint8Array = new Uint8Array(rawData.buffer, rawData.byteOffset, rawData.byteLength); - throw new TypeError(`Unsupported message type: ${Object.prototype.toString.call(rawData)}`); - } - /** - * Get data as [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) value. - * - * If raw data is in any other format or string, it will be automatically converted and encoded. - */ - arrayBuffer() { - const _arrayBuffer = this.#arrayBuffer; - if (_arrayBuffer) return _arrayBuffer; - const rawData = this.rawData; - if (rawData instanceof ArrayBuffer || rawData instanceof SharedArrayBuffer) return this.#arrayBuffer = rawData; - return this.#arrayBuffer = this.uint8Array().buffer; - } - /** - * Get data as [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) value. - * - * If raw data is in any other format or string, it will be automatically converted and encoded. */ - blob() { - const _blob = this.#blob; - if (_blob) return _blob; - const rawData = this.rawData; - if (rawData instanceof Blob) return this.#blob = rawData; - return this.#blob = new Blob([this.uint8Array()]); - } - /** - * Get stringified text version of the message. - * - * If raw data is in any other format, it will be automatically converted and decoded. - */ - text() { - const _text = this.#text; - if (_text) return _text; - const rawData = this.rawData; - if (typeof rawData === "string") return this.#text = rawData; - return this.#text = new TextDecoder().decode(this.uint8Array()); - } - /** - * Get parsed version of the message text with [`JSON.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). - */ - json() { - const _json = this.#json; - if (_json) return _json; - return this.#json = JSON.parse(this.text()); - } - /** - * Message data (value varies based on `peer.websocket.binaryType`). - */ - get data() { - switch (this.peer?.websocket?.binaryType) { - case "arraybuffer": return this.arrayBuffer(); - case "blob": return this.blob(); - case "nodebuffer": return globalThis.Buffer ? Buffer.from(this.uint8Array()) : this.uint8Array(); - case "uint8array": return this.uint8Array(); - case "text": return this.text(); - default: return this.rawData; - } - } - toString() { - return this.text(); - } - [Symbol.toPrimitive]() { - return this.text(); - } - [kNodeInspect]() { - return { message: { - id: this.id, - peer: this.peer, - text: this.text() - } }; - } -}; -var Peer = class { - _internal; - _topics; - _id; - #ws; - constructor(internal) { - this._topics = /* @__PURE__ */ new Set(); - this._internal = internal; - } - get context() { - return this._internal.context ??= {}; - } - get namespace() { - return this._internal.namespace; - } - /** - * Unique random [uuid v4](https://developer.mozilla.org/en-US/docs/Glossary/UUID) identifier for the peer. - */ - get id() { - if (!this._id) this._id = crypto.randomUUID(); - return this._id; - } - /** IP address of the peer */ - get remoteAddress() {} - /** upgrade request */ - get request() { - return this._internal.request; - } - /** - * Get the [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) instance. - * - * **Note:** crossws adds polyfill for the following properties if native values are not available: - * - `protocol`: Extracted from the `sec-websocket-protocol` header. - * - `extensions`: Extracted from the `sec-websocket-extensions` header. - * - `url`: Extracted from the request URL (http -> ws). - * */ - get websocket() { - if (!this.#ws) { - const _ws = this._internal.ws; - const _request = this._internal.request; - this.#ws = _request ? createWsProxy(_ws, _request) : _ws; - } - return this.#ws; - } - /** All connected peers to the server */ - get peers() { - return this._internal.peers || /* @__PURE__ */ new Set(); - } - /** All topics, this peer has been subscribed to. */ - get topics() { - return this._topics; - } - /** Abruptly close the connection */ - terminate() { - this.close(); - } - /** Subscribe to a topic */ - subscribe(topic) { - this._topics.add(topic); - } - /** Unsubscribe from a topic */ - unsubscribe(topic) { - this._topics.delete(topic); - } - toString() { - return this.id; - } - [Symbol.toPrimitive]() { - return this.id; - } - [Symbol.toStringTag]() { - return "WebSocket"; - } - [kNodeInspect]() { - return { peer: { - id: this.id, - ip: this.remoteAddress - } }; - } -}; -function createWsProxy(ws, request) { - return new Proxy(ws, { get: (target, prop) => { - const value = Reflect.get(target, prop); - if (!value) switch (prop) { - case "protocol": return request?.headers?.get("sec-websocket-protocol") || ""; - case "extensions": return request?.headers?.get("sec-websocket-extensions") || ""; - case "url": return request?.url?.replace(/^http/, "ws") || void 0; - } - return value; - } }); -} - -//#endregion -//#region node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/_request.mjs -const StubRequest = /* @__PURE__ */ (() => { - class StubRequest { - url; - _abortController; - _headers; - _init; - constructor(url, init = {}) { - this.url = url; - this._init = init; - } - get headers() { - if (!this._headers) this._headers = new Headers(this._init?.headers); - return this._headers; - } - clone() { - return new StubRequest(this.url, this._init); - } - get method() { - return "GET"; - } - get signal() { - if (!this._abortController) this._abortController = new AbortController(); - return this._abortController.signal; - } - get cache() { - return "default"; - } - get credentials() { - return "same-origin"; - } - get destination() { - return ""; - } - get integrity() { - return ""; - } - get keepalive() { - return false; - } - get redirect() { - return "follow"; - } - get mode() { - return "cors"; - } - get referrer() { - return "about:client"; - } - get referrerPolicy() { - return ""; - } - get body() { - return null; - } - get bodyUsed() { - return false; - } - arrayBuffer() { - return Promise.resolve(/* @__PURE__ */ new ArrayBuffer(0)); - } - blob() { - return Promise.resolve(new Blob()); - } - bytes() { - return Promise.resolve(new Uint8Array()); - } - formData() { - return Promise.resolve(new FormData()); - } - json() { - return Promise.resolve(JSON.parse("")); - } - text() { - return Promise.resolve(""); - } - } - Object.setPrototypeOf(StubRequest.prototype, globalThis.Request.prototype); - return StubRequest; -})(); - -//#endregion -//#region node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/error.mjs -var WSError = class extends Error { - constructor(...args) { - super(...args); - this.name = "WSError"; - } -}; - -//#endregion -//#region node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/adapters/node.mjs -const nodeAdapter = (options = {}) => { - if ("Deno" in globalThis || "Bun" in globalThis) throw new Error("[crossws] Using Node.js adapter in an incompatible environment."); - const hooks = new AdapterHookable(options); - const globalPeers = /* @__PURE__ */ new Map(); - const wss = options.wss || new import_websocket_server.default({ - noServer: true, - handleProtocols: () => false, - ...options.serverOptions - }); - wss.on("connection", (ws, nodeReq) => { - const request = new NodeReqProxy(nodeReq); - const peers = getPeers(globalPeers, nodeReq._namespace); - const peer = new NodePeer({ - ws, - request, - peers, - nodeReq, - namespace: nodeReq._namespace - }); - peers.add(peer); - hooks.callHook("open", peer); - ws.on("message", (data) => { - if (Array.isArray(data)) data = Buffer.concat(data); - hooks.callHook("message", peer, new Message(data, peer)); - }); - ws.on("error", (error) => { - peers.delete(peer); - hooks.callHook("error", peer, new WSError(error)); - }); - ws.on("close", (code, reason) => { - peers.delete(peer); - hooks.callHook("close", peer, { - code, - reason: reason?.toString() - }); - }); - }); - wss.on("headers", (outgoingHeaders, req) => { - const upgradeHeaders = req._upgradeHeaders; - if (upgradeHeaders) for (const [key, value] of new Headers(upgradeHeaders)) outgoingHeaders.push(`${key}: ${value}`); - }); - return { - ...adapterUtils(globalPeers), - handleUpgrade: async (nodeReq, socket, head, webRequest) => { - const request = webRequest || new NodeReqProxy(nodeReq); - const { upgradeHeaders, endResponse, context, namespace } = await hooks.upgrade(request); - if (endResponse) return sendResponse(socket, endResponse); - nodeReq._request = request; - nodeReq._upgradeHeaders = upgradeHeaders; - nodeReq._context = context; - nodeReq._namespace = namespace; - wss.handleUpgrade(nodeReq, socket, head, (ws) => { - wss.emit("connection", ws, nodeReq); - }); - }, - closeAll: (code, data, force) => { - for (const client of wss.clients) if (force) client.terminate(); - else client.close(code, data); - } - }; -}; -var node_default = nodeAdapter; -var NodePeer = class extends Peer { - get remoteAddress() { - return this._internal.nodeReq.socket?.remoteAddress; - } - get context() { - return this._internal.nodeReq._context; - } - send(data, options) { - const dataBuff = toBufferLike(data); - const isBinary = typeof dataBuff !== "string"; - this._internal.ws.send(dataBuff, { - compress: options?.compress, - binary: isBinary, - ...options - }); - return 0; - } - publish(topic, data, options) { - const dataBuff = toBufferLike(data); - const isBinary = typeof data !== "string"; - const sendOptions = { - compress: options?.compress, - binary: isBinary, - ...options - }; - for (const peer of this._internal.peers) if (peer !== this && peer._topics.has(topic)) peer._internal.ws.send(dataBuff, sendOptions); - } - close(code, data) { - this._internal.ws.close(code, data); - } - terminate() { - this._internal.ws.terminate(); - } -}; -var NodeReqProxy = class extends StubRequest { - constructor(req) { - const host = req.headers["host"] || "localhost"; - const url = `${req.socket?.encrypted ?? req.headers["x-forwarded-proto"] === "https" ? "https" : "http"}://${host}${req.url}`; - super(url, { headers: req.headers }); - } -}; -async function sendResponse(socket, res) { - const head = [`HTTP/1.1 ${res.status || 200} ${res.statusText || ""}`, ...[...res.headers.entries()].map(([key, value]) => `${encodeURIComponent(key)}: ${encodeURIComponent(value)}`)]; - socket.write(head.join("\r\n") + "\r\n\r\n"); - if (res.body) for await (const chunk of res.body) socket.write(chunk); - return new Promise((resolve) => { - socket.end(() => { - socket.destroy(); - resolve(); - }); - }); -} - -//#endregion -//#region packages/server/src/Server.ts -const defaultServerConfiguration = { - port: 80, - address: "0.0.0.0", - stopOnSignals: true -}; -var Server = class { - constructor(configuration) { - this.configuration = { - ...defaultConfiguration, - ...defaultServerConfiguration, - extensions: [] - }; - this.setupHttpUpgrade = () => { - this.httpServer.on("upgrade", async (request, socket, head) => { - try { - await this.hocuspocus.hooks("onUpgrade", { - request, - socket, - head, - instance: this.hocuspocus - }); - this.crossws.handleUpgrade(request, socket, head); - } catch (error) { - if (error) throw error; - } - }); - }; - this.requestHandler = async (request, response) => { - try { - await this.hocuspocus.hooks("onRequest", { - request, - response, - instance: this.hocuspocus - }); - response.writeHead(200, { "Content-Type": "text/plain" }); - response.end("Welcome to Hocuspocus!"); - } catch (error) { - if (error) throw error; - } - }; - if (configuration) this.configuration = { - ...this.configuration, - ...configuration - }; - this.hocuspocus = new Hocuspocus(this.configuration); - this.hocuspocus.server = this; - this.httpServer = (0, node_http.createServer)(this.requestHandler); - this.crossws = node_default({ - serverOptions: this.configuration.websocketOptions, - hooks: { - open: (peer) => { - peer._hocuspocus = this.hocuspocus.handleConnection(peer.websocket, peer.request); - }, - message: (peer, message) => { - peer._hocuspocus?.handleMessage(message.uint8Array()); - }, - close: (peer, event) => { - peer._hocuspocus?.handleClose({ - code: event.code, - reason: event.reason - }); - }, - error: (peer, error) => { - console.error("WebSocket error for peer:", peer.id); - console.error(error); - } - } - }); - this.setupHttpUpgrade(); - } - async listen(port, callback = null) { - if (port) this.configuration.port = port; - if (typeof callback === "function") this.hocuspocus.configuration.extensions.push({ onListen: callback }); - if (this.configuration.stopOnSignals) { - const signalHandler = async () => { - await this.destroy(); - process.exit(0); - }; - process.on("SIGINT", signalHandler); - process.on("SIGQUIT", signalHandler); - process.on("SIGTERM", signalHandler); - } - return new Promise((resolve, reject) => { - this.httpServer.listen({ - port: this.configuration.port, - address: this.configuration.address - }, async () => { - if (!this.configuration.quiet && String(process.env.NODE_ENV) !== "testing") this.showStartScreen(); - const onListenPayload = { - instance: this.hocuspocus, - configuration: this.configuration, - port: this.address.port - }; - try { - await this.hocuspocus.hooks("onListen", onListenPayload); - resolve(this.hocuspocus); - } catch (e) { - reject(e); - } - }); - }); - } - get address() { - return this.httpServer.address() || { - port: this.configuration.port, - address: this.configuration.address, - family: "IPv4" - }; - } - async destroy() { - await new Promise((resolve) => { - this.httpServer.close(); - try { - this.configuration.extensions.push({ async afterUnloadDocument({ instance }) { - if (instance.getDocumentsCount() === 0) resolve(); - } }); - if (this.hocuspocus.getDocumentsCount() === 0) resolve(); - this.hocuspocus.closeConnections(); - this.hocuspocus.flushPendingStores(); - } catch (error) { - console.error(error); - } - }); - await this.hocuspocus.hooks("onDestroy", { instance: this.hocuspocus }); - } - get URL() { - return `${this.configuration.address}:${this.address.port}`; - } - get webSocketURL() { - return `ws://${this.URL}`; - } - get httpURL() { - return `http://${this.URL}`; - } - showStartScreen() { - const name = this.configuration.name ? ` (${this.configuration.name})` : ""; - console.log(); - console.log(` ${kleur.default.cyan(`Hocuspocus v${version}${name}`)}${kleur.default.green(" running at:")}`); - console.log(); - console.log(` > HTTP: ${kleur.default.cyan(`${this.httpURL}`)}`); - console.log(` > WebSocket: ${this.webSocketURL}`); - const extensions = this.configuration?.extensions.map((extension) => { - return extension.extensionName ?? extension.constructor?.name; - }).filter((name) => name).filter((name) => name !== "Object"); - if (!extensions.length) return; - console.log(); - console.log(" Extensions:"); - extensions.forEach((name) => { - console.log(` - ${name}`); - }); - console.log(); - console.log(` ${kleur.default.green("Ready.")}`); - console.log(); - } -}; - -//#endregion -exports.Connection = Connection; -exports.Document = Document; -exports.Hocuspocus = Hocuspocus; -exports.IncomingMessage = IncomingMessage; -exports.MessageReceiver = MessageReceiver; -exports.MessageType = MessageType; -exports.OutgoingMessage = OutgoingMessage; -exports.Server = Server; -exports.defaultConfiguration = defaultConfiguration; -exports.defaultServerConfiguration = defaultServerConfiguration; -exports.isTransactionOrigin = isTransactionOrigin; -exports.shouldSkipStoreHooks = shouldSkipStoreHooks; -exports.useDebounce = useDebounce; -//# sourceMappingURL=hocuspocus-server.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs.map deleted file mode 100644 index 2fcd746..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-server.cjs","names":["Awareness","Y","AuthMessageType","messageYjsSyncStep1","messageYjsSyncStep2","decoding","messageYjsUpdate","WsReadyStates","ResetConnection","Doc","Mutex","Awareness","crypto","ConnectionTimeout","Unauthorized","WsReadyStates","SocketIncomingMessage","decoding","Forbidden","ResetConnection","URLSearchParams","meta.version","ResetConnection","Doc","SkipFurtherHooksError","crypto","#id","#uint8Array","#arrayBuffer","#text","#blob","#json","#ws","crossws","meta.version"],"sources":["../src/IncomingMessage.ts","../src/types.ts","../src/OutgoingMessage.ts","../src/MessageReceiver.ts","../src/Connection.ts","../src/Document.ts","../package.json","../src/util/getParameters.ts","../src/ClientConnection.ts","../src/DirectConnection.ts","../src/util/debounce.ts","../src/Hocuspocus.ts","../../../node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/rolldown-runtime.mjs","../../../node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/adapter.mjs","../../../node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/libs/ws.mjs","../../../node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/peer.mjs","../../../node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/_request.mjs","../../../node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/_chunks/error.mjs","../../../node_modules/.pnpm/crossws@0.4.4/node_modules/crossws/dist/adapters/node.mjs","../src/Server.ts"],"sourcesContent":["import type { Decoder } from \"lib0/decoding\";\nimport {\n\tcreateDecoder,\n\treadVarString,\n\treadVarUint,\n\treadVarUint8Array,\n} from \"lib0/decoding\";\nimport type { Encoder } from \"lib0/encoding\";\nimport {\n\tcreateEncoder,\n\tlength,\n\ttoUint8Array,\n\twriteVarString,\n\twriteVarUint,\n} from \"lib0/encoding\";\nimport type { MessageType } from \"./types.ts\";\n\nexport class IncomingMessage {\n\t/**\n\t * Access to the received message.\n\t */\n\tdecoder: Decoder;\n\n\t/**\n\t * Private encoder; can be undefined.\n\t *\n\t * Lazy creation of the encoder speeds up IncomingMessages that need only a decoder.\n\t */\n\tprivate encoderInternal?: Encoder;\n\n\tconstructor(input: any) {\n\t\tif (!(input instanceof Uint8Array)) {\n\t\t\tinput = new Uint8Array(input);\n\t\t}\n\n\t\tthis.decoder = createDecoder(input);\n\t}\n\n\tget encoder() {\n\t\tif (!this.encoderInternal) {\n\t\t\tthis.encoderInternal = createEncoder();\n\t\t}\n\t\treturn this.encoderInternal;\n\t}\n\n\treadVarUint8Array() {\n\t\treturn readVarUint8Array(this.decoder);\n\t}\n\n\tpeekVarUint8Array() {\n\t\tconst { pos } = this.decoder;\n\t\tconst result = readVarUint8Array(this.decoder);\n\t\tthis.decoder.pos = pos;\n\t\treturn result;\n\t}\n\n\treadVarUint() {\n\t\treturn readVarUint(this.decoder);\n\t}\n\n\treadVarString() {\n\t\treturn readVarString(this.decoder);\n\t}\n\n\ttoUint8Array() {\n\t\treturn toUint8Array(this.encoder);\n\t}\n\n\twriteVarUint(type: MessageType) {\n\t\twriteVarUint(this.encoder, type);\n\t}\n\n\twriteVarString(string: string) {\n\t\twriteVarString(this.encoder, string);\n\t}\n\n\tget length(): number {\n\t\treturn length(this.encoder);\n\t}\n}\n","import type { IncomingMessage, ServerResponse } from \"node:http\";\nimport type { Awareness } from \"y-protocols/awareness\";\nimport type Connection from \"./Connection.ts\";\nimport type Document from \"./Document.ts\";\nimport type { Hocuspocus } from \"./Hocuspocus.ts\";\n\nexport interface ConnectionTransactionOrigin {\n\tsource: \"connection\";\n\tconnection: Connection;\n}\n\nexport interface RedisTransactionOrigin {\n\tsource: \"redis\";\n}\n\nexport interface LocalTransactionOrigin {\n\tsource: \"local\";\n\tskipStoreHooks?: boolean;\n\tcontext?: any;\n}\n\nexport type TransactionOrigin =\n\t| ConnectionTransactionOrigin\n\t| RedisTransactionOrigin\n\t| LocalTransactionOrigin;\n\nexport function isTransactionOrigin(\n\torigin: unknown,\n): origin is TransactionOrigin {\n\treturn (\n\t\ttypeof origin === \"object\" &&\n\t\torigin !== null &&\n\t\t\"source\" in origin &&\n\t\t((origin as any).source === \"connection\" ||\n\t\t\t(origin as any).source === \"redis\" ||\n\t\t\t(origin as any).source === \"local\")\n\t);\n}\n\nexport function shouldSkipStoreHooks(origin: unknown): boolean {\n\tif (!isTransactionOrigin(origin)) return false;\n\tswitch (origin.source) {\n\t\tcase \"connection\":\n\t\t\treturn false;\n\t\tcase \"redis\":\n\t\t\treturn true;\n\t\tcase \"local\":\n\t\t\treturn origin.skipStoreHooks ?? false;\n\t}\n}\n\n/**\n * Minimal interface for any WebSocket-like object for WebSocket, Bun's ServerWebSocket, ws, Deno, etc.\n */\nexport interface WebSocketLike {\n\tsend(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;\n\tclose(code?: number, reason?: string): void;\n\treadyState: number;\n}\n\nexport enum MessageType {\n\tUnknown = -1,\n\tSync = 0,\n\tAwareness = 1,\n\tAuth = 2,\n\tQueryAwareness = 3,\n\tSyncReply = 4, // same as Sync, but won't trigger another 'SyncStep1'\n\tStateless = 5,\n\tBroadcastStateless = 6,\n\tCLOSE = 7,\n\tSyncStatus = 8,\n\tPing = 9,\n\tPong = 10,\n}\n\nexport interface AwarenessUpdate {\n\tadded: Array;\n\tupdated: Array;\n\tremoved: Array;\n}\n\nexport interface ConnectionConfiguration {\n\treadOnly: boolean;\n\tisAuthenticated: boolean;\n}\n\nexport interface Extension {\n\tpriority?: number;\n\textensionName?: string;\n\tonConfigure?(data: onConfigurePayload): Promise;\n\tonListen?(data: onListenPayload): Promise;\n\tonUpgrade?(data: onUpgradePayload): Promise;\n\tonConnect?(data: onConnectPayload): Promise;\n\tconnected?(data: connectedPayload): Promise;\n\tonAuthenticate?(data: onAuthenticatePayload): Promise;\n\tonTokenSync?(data: onTokenSyncPayload): Promise;\n\tonCreateDocument?(data: onCreateDocumentPayload): Promise;\n\tonLoadDocument?(data: onLoadDocumentPayload): Promise;\n\tafterLoadDocument?(data: afterLoadDocumentPayload): Promise;\n\tbeforeHandleMessage?(data: beforeHandleMessagePayload): Promise;\n\t/**\n\t * Fired before an inbound awareness update is applied to the document's\n\t * awareness state. The hook receives the decoded per-client `states` as a\n\t * mutable `Map` keyed by Yjs clientId. Mutate the map and the contained\n\t * state objects in place to rewrite fields, drop peers (`states.delete`),\n\t * or add synthetic ones (`states.set`); mutations are reflected in the\n\t * broadcast. Throw to reject the update without applying anything.\n\t *\n\t * Multiple extensions chain naturally: each extension sees the map as\n\t * mutated by previous extensions and can mutate it further.\n\t */\n\tbeforeHandleAwareness?(\n\t\tdata: beforeHandleAwarenessPayload,\n\t): Promise;\n\tbeforeSync?(data: beforeSyncPayload): Promise;\n\tbeforeBroadcastStateless?(\n\t\tdata: beforeBroadcastStatelessPayload,\n\t): Promise;\n\tonStateless?(payload: onStatelessPayload): Promise;\n\tonChange?(data: onChangePayload): Promise;\n\tonStoreDocument?(data: onStoreDocumentPayload): Promise;\n\tafterStoreDocument?(data: afterStoreDocumentPayload): Promise;\n\tonAwarenessUpdate?(data: onAwarenessUpdatePayload): Promise;\n\tonRequest?(data: onRequestPayload): Promise;\n\tonDisconnect?(data: onDisconnectPayload): Promise;\n\tbeforeUnloadDocument?(data: beforeUnloadDocumentPayload): Promise;\n\tafterUnloadDocument?(data: afterUnloadDocumentPayload): Promise;\n\tonDestroy?(data: onDestroyPayload): Promise;\n}\n\nexport type HookName =\n\t| \"onConfigure\"\n\t| \"onListen\"\n\t| \"onUpgrade\"\n\t| \"onConnect\"\n\t| \"connected\"\n\t| \"onAuthenticate\"\n\t| \"onTokenSync\"\n\t| \"onCreateDocument\"\n\t| \"onLoadDocument\"\n\t| \"afterLoadDocument\"\n\t| \"beforeHandleMessage\"\n\t| \"beforeHandleAwareness\"\n\t| \"beforeBroadcastStateless\"\n\t| \"beforeSync\"\n\t| \"onStateless\"\n\t| \"onChange\"\n\t| \"onStoreDocument\"\n\t| \"afterStoreDocument\"\n\t| \"onAwarenessUpdate\"\n\t| \"onRequest\"\n\t| \"onDisconnect\"\n\t| \"beforeUnloadDocument\"\n\t| \"afterUnloadDocument\"\n\t| \"onDestroy\";\n\nexport type HookPayloadByName = {\n\tonConfigure: onConfigurePayload;\n\tonListen: onListenPayload;\n\tonUpgrade: onUpgradePayload;\n\tonConnect: onConnectPayload;\n\tconnected: connectedPayload;\n\tonAuthenticate: onAuthenticatePayload;\n\tonTokenSync: onTokenSyncPayload;\n\tonCreateDocument: onCreateDocumentPayload;\n\tonLoadDocument: onLoadDocumentPayload;\n\tafterLoadDocument: afterLoadDocumentPayload;\n\tbeforeHandleMessage: beforeHandleMessagePayload;\n\tbeforeHandleAwareness: beforeHandleAwarenessPayload;\n\tbeforeBroadcastStateless: beforeBroadcastStatelessPayload;\n\tbeforeSync: beforeSyncPayload;\n\tonStateless: onStatelessPayload;\n\tonChange: onChangePayload;\n\tonStoreDocument: onStoreDocumentPayload;\n\tafterStoreDocument: afterStoreDocumentPayload;\n\tonAwarenessUpdate: onAwarenessUpdatePayload;\n\tonRequest: onRequestPayload;\n\tonDisconnect: onDisconnectPayload;\n\tafterUnloadDocument: afterUnloadDocumentPayload;\n\tbeforeUnloadDocument: beforeUnloadDocumentPayload;\n\tonDestroy: onDestroyPayload;\n};\n\nexport interface Configuration extends Extension {\n\t/**\n\t * A name for the instance, used for logging.\n\t */\n\tname: string | null;\n\t/**\n\t * A list of hocuspocus extensions.\n\t */\n\textensions: Array;\n\t/**\n\t * Defines in which interval the server sends a ping, and closes the connection when no pong is sent back.\n\t */\n\ttimeout: number;\n\t/**\n\t * Debounces the call of the `onStoreDocument` hook for the given amount of time in ms.\n\t * Otherwise every single update would be persisted.\n\t */\n\tdebounce: number;\n\t/**\n\t * Makes sure to call `onStoreDocument` at least in the given amount of time (ms).\n\t */\n\tmaxDebounce: number;\n\t/**\n\t * By default, the servers show a start screen. If passed false, the server will start quietly.\n\t */\n\tquiet: boolean;\n\t/**\n\t * If set to false, respects the debounce time of `onStoreDocument` before unloading a document.\n\t * Otherwise, the document will be unloaded immediately.\n\t *\n\t * This prevents a client from DOSing the server by repeatedly connecting and disconnecting when\n\t * your onStoreDocument is rate-limited.\n\t */\n\tunloadImmediately: boolean;\n\n\t/**\n\t * options to pass to the ydoc document\n\t */\n\tyDocOptions: {\n\t\tgc: boolean; // enable or disable garbage collection (see https://github.com/yjs/yjs/blob/main/INTERNALS.md#deletions)\n\t\tgcFilter: () => boolean; // will be called before garbage collecting ; return false to keep it\n\t};\n}\n\nexport interface onStatelessPayload {\n\tconnection: Connection;\n\tdocumentName: string;\n\tdocument: Document;\n\tpayload: string;\n}\n\nexport interface onAuthenticatePayload {\n\tcontext: Context;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\trequest: Request;\n\tsocketId: string;\n\ttoken: string;\n\tconnectionConfig: ConnectionConfiguration;\n\tproviderVersion: string | null;\n}\n\nexport interface onTokenSyncPayload {\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\ttoken: string;\n\tconnectionConfig: ConnectionConfiguration;\n\tconnection: Connection;\n}\n\nexport interface onCreateDocumentPayload {\n\tcontext: Context;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n}\n\nexport interface onConnectPayload {\n\tcontext: Context;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequest: Request;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n\tproviderVersion: string | null;\n}\n\nexport interface connectedPayload {\n\tcontext: Context;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequest: Request;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n\tconnection: Connection;\n\tproviderVersion: string | null;\n}\n\nexport interface onLoadDocumentPayload {\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n}\n\nexport interface afterLoadDocumentPayload {\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n}\n\nexport interface onChangePayload {\n\tclientsCount: number;\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tupdate: Uint8Array;\n\tsocketId: string;\n\ttransactionOrigin: unknown;\n\tconnection?: Connection;\n}\n\nexport interface beforeHandleMessagePayload {\n\tclientsCount: number;\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tupdate: Uint8Array;\n\tsocketId: string;\n\tconnection: Connection;\n}\n\nexport interface beforeHandleAwarenessPayload {\n\tawareness: Awareness;\n\tclientsCount: number;\n\t/**\n\t * Connection context populated by `onAuthenticate`. `undefined` when the\n\t * update did not originate from a client connection (e.g. server-internal\n\t * writes via `DirectConnection`).\n\t */\n\tcontext: Context | undefined;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\t/**\n\t * Per-client awareness states decoded from the inbound update, keyed by\n\t * Yjs clientId. Mutate this map in place to rewrite the update: change\n\t * fields on a state object, `states.delete(clientId)` to drop a peer, or\n\t * `states.set(clientId, ...)` to add or replace one. The encoded update\n\t * sent to peers reflects whatever the map looks like after every hook in\n\t * the chain has run.\n\t */\n\tstates: Map>;\n\tsocketId: string;\n\t/**\n\t * The `TransactionOrigin` that will be passed to `applyAwarenessUpdate`.\n\t * Use `isTransactionOrigin(origin)` to discriminate sources. Matches the\n\t * `transactionOrigin` shape of `onAwarenessUpdatePayload`.\n\t */\n\ttransactionOrigin: unknown;\n\t/**\n\t * Convenience shortcut: `origin.connection` when `transactionOrigin` is a\n\t * `ConnectionTransactionOrigin`, otherwise `undefined`. Matches the\n\t * `connection?` shape of `onAwarenessUpdatePayload`.\n\t */\n\tconnection?: Connection;\n}\n\nexport interface beforeSyncPayload {\n\tclientsCount: number;\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tconnection: Connection;\n\t/**\n\t * The y-protocols/sync message type\n\t * @example\n\t * 0: SyncStep1\n\t * 1: SyncStep2\n\t * 2: YjsUpdate\n\t *\n\t * @see https://github.com/yjs/y-protocols/blob/master/sync.js#L13-L40\n\t */\n\ttype: number;\n\t/**\n\t * The payload of the y-sync message.\n\t */\n\tpayload: Uint8Array;\n}\n\nexport interface beforeBroadcastStatelessPayload {\n\tdocument: Document;\n\tdocumentName: string;\n\tpayload: string;\n}\n\nexport interface onStoreDocumentPayload {\n\tclientsCount: number;\n\tdocument: Document;\n\tlastContext: Context;\n\tlastTransactionOrigin: unknown;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type\nexport interface afterStoreDocumentPayload\n\textends onStoreDocumentPayload {}\n\nexport interface onAwarenessUpdatePayload {\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\ttransactionOrigin: unknown;\n\tconnection?: Connection;\n\tadded: number[];\n\tupdated: number[];\n\tremoved: number[];\n\tawareness: Awareness;\n\tstates: StatesArray;\n}\n\nexport type StatesArray = { clientId: number; [key: string | number]: any }[];\n\nexport interface fetchPayload {\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n}\n\nexport interface storePayload\n\textends onStoreDocumentPayload {\n\tstate: Buffer;\n}\n\nexport interface onDisconnectPayload {\n\tclientsCount: number;\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n}\n\nexport interface onRequestPayload {\n\trequest: IncomingMessage;\n\tresponse: ServerResponse;\n\tinstance: Hocuspocus;\n}\n\nexport interface onUpgradePayload {\n\trequest: IncomingMessage;\n\tsocket: any;\n\thead: any;\n\tinstance: Hocuspocus;\n}\n\nexport interface onListenPayload {\n\tinstance: Hocuspocus;\n\tconfiguration: Configuration;\n\tport: number;\n}\n\nexport interface onDestroyPayload {\n\tinstance: Hocuspocus;\n}\n\nexport interface onConfigurePayload {\n\tinstance: Hocuspocus;\n\tconfiguration: Configuration;\n\tversion: string;\n}\n\nexport interface afterUnloadDocumentPayload {\n\tinstance: Hocuspocus;\n\tdocumentName: string;\n}\n\nexport interface beforeUnloadDocumentPayload {\n\tinstance: Hocuspocus;\n\tdocumentName: string;\n\tdocument: Document;\n}\n\nexport interface DirectConnection {\n\ttransact(transaction: (document: Document) => void): Promise;\n\tdisconnect(): void;\n}\n","import type { Encoder } from \"lib0/encoding\";\nimport {\n\tcreateEncoder,\n\ttoUint8Array,\n\twriteVarString,\n\twriteVarUint,\n\twriteVarUint8Array,\n} from \"lib0/encoding\";\nimport type { Awareness } from \"y-protocols/awareness\";\nimport { encodeAwarenessUpdate } from \"y-protocols/awareness\";\nimport { writeSyncStep1, writeUpdate } from \"y-protocols/sync\";\n\nimport { writeAuthenticated, writePermissionDenied, writeTokenSyncRequest } from \"@hocuspocus/common\";\nimport type Document from \"./Document.ts\";\nimport { MessageType } from \"./types.ts\";\n\nexport class OutgoingMessage {\n\tencoder: Encoder;\n\n\ttype?: number;\n\n\tcategory?: string;\n\n\tconstructor(documentName: string) {\n\t\tthis.encoder = createEncoder();\n\n\t\twriteVarString(this.encoder, documentName);\n\t}\n\n\tcreateSyncMessage(): OutgoingMessage {\n\t\tthis.type = MessageType.Sync;\n\n\t\twriteVarUint(this.encoder, MessageType.Sync);\n\n\t\treturn this;\n\t}\n\n\tcreateSyncReplyMessage(): OutgoingMessage {\n\t\tthis.type = MessageType.SyncReply;\n\n\t\twriteVarUint(this.encoder, MessageType.SyncReply);\n\n\t\treturn this;\n\t}\n\n\tcreateAwarenessUpdateMessage(\n\t\tawareness: Awareness,\n\t\tchangedClients?: Array,\n\t): OutgoingMessage {\n\t\tthis.type = MessageType.Awareness;\n\t\tthis.category = \"Update\";\n\n\t\tconst message = encodeAwarenessUpdate(\n\t\t\tawareness,\n\t\t\tchangedClients || Array.from(awareness.getStates().keys()),\n\t\t);\n\n\t\twriteVarUint(this.encoder, MessageType.Awareness);\n\t\twriteVarUint8Array(this.encoder, message);\n\n\t\treturn this;\n\t}\n\n\twriteQueryAwareness(): OutgoingMessage {\n\t\tthis.type = MessageType.QueryAwareness;\n\t\tthis.category = \"Update\";\n\n\t\twriteVarUint(this.encoder, MessageType.QueryAwareness);\n\n\t\treturn this;\n\t}\n\n\twriteTokenSyncRequest(): OutgoingMessage {\n\t\tthis.type = MessageType.Auth;\n\t\tthis.category = \"TokenSync\";\n\n\t\twriteVarUint(this.encoder, MessageType.Auth);\n\t\twriteTokenSyncRequest(this.encoder);\n\n\t\treturn this;\n\t}\n\n\twriteAuthenticated(readonly: boolean): OutgoingMessage {\n\t\tthis.type = MessageType.Auth;\n\t\tthis.category = \"Authenticated\";\n\n\t\twriteVarUint(this.encoder, MessageType.Auth);\n\t\twriteAuthenticated(this.encoder, readonly ? \"readonly\" : \"read-write\");\n\n\t\treturn this;\n\t}\n\n\twritePermissionDenied(reason: string): OutgoingMessage {\n\t\tthis.type = MessageType.Auth;\n\t\tthis.category = \"PermissionDenied\";\n\n\t\twriteVarUint(this.encoder, MessageType.Auth);\n\t\twritePermissionDenied(this.encoder, reason);\n\n\t\treturn this;\n\t}\n\n\twriteFirstSyncStepFor(document: Document): OutgoingMessage {\n\t\tthis.category = \"SyncStep1\";\n\n\t\twriteSyncStep1(this.encoder, document);\n\n\t\treturn this;\n\t}\n\n\twriteUpdate(update: Uint8Array): OutgoingMessage {\n\t\tthis.category = \"Update\";\n\n\t\twriteUpdate(this.encoder, update);\n\n\t\treturn this;\n\t}\n\n\twriteStateless(payload: string): OutgoingMessage {\n\t\tthis.category = \"Stateless\";\n\n\t\twriteVarUint(this.encoder, MessageType.Stateless);\n\t\twriteVarString(this.encoder, payload);\n\n\t\treturn this;\n\t}\n\n\twriteBroadcastStateless(payload: string): OutgoingMessage {\n\t\tthis.category = \"Stateless\";\n\n\t\twriteVarUint(this.encoder, MessageType.BroadcastStateless);\n\t\twriteVarString(this.encoder, payload);\n\n\t\treturn this;\n\t}\n\n\t// TODO: should this be write* or create* as method name?\n\twriteSyncStatus(updateSaved: boolean): OutgoingMessage {\n\t\tthis.category = \"SyncStatus\";\n\n\t\twriteVarUint(this.encoder, MessageType.SyncStatus);\n\t\twriteVarUint(this.encoder, updateSaved ? 1 : 0);\n\n\t\treturn this;\n\t}\n\n\twriteCloseMessage(reason: string): OutgoingMessage {\n\t\tthis.type = MessageType.CLOSE;\n\n\t\twriteVarUint(this.encoder, MessageType.CLOSE);\n\t\twriteVarString(this.encoder, reason);\n\n\t\treturn this;\n\t}\n\n\ttoUint8Array(): Uint8Array {\n\t\treturn toUint8Array(this.encoder);\n\t}\n}\n","import { AuthMessageType } from \"@hocuspocus/common\";\nimport * as decoding from \"lib0/decoding\";\nimport { readVarString } from \"lib0/decoding\";\nimport {\n\tAwareness,\n\tapplyAwarenessUpdate,\n\tencodeAwarenessUpdate,\n} from \"y-protocols/awareness\";\nimport {\n\tmessageYjsSyncStep1,\n\tmessageYjsSyncStep2,\n\tmessageYjsUpdate,\n\treadSyncStep1,\n\treadSyncStep2,\n\treadUpdate,\n} from \"y-protocols/sync\";\nimport * as Y from \"yjs\";\nimport type Connection from \"./Connection.ts\";\nimport type Document from \"./Document.ts\";\nimport type { IncomingMessage } from \"./IncomingMessage.ts\";\nimport { OutgoingMessage } from \"./OutgoingMessage.ts\";\nimport {\n\tMessageType,\n\ttype ConnectionTransactionOrigin,\n\ttype TransactionOrigin,\n} from \"./types.ts\";\n\nexport class MessageReceiver {\n\tmessage: IncomingMessage;\n\n\tdefaultTransactionOrigin?: TransactionOrigin;\n\n\tconstructor(\n\t\tmessage: IncomingMessage,\n\t\tdefaultTransactionOrigin?: TransactionOrigin,\n\t) {\n\t\tthis.message = message;\n\t\tthis.defaultTransactionOrigin = defaultTransactionOrigin;\n\t}\n\n\tpublic async apply(\n\t\tdocument: Document,\n\t\tconnection?: Connection,\n\t\treply?: (message: Uint8Array) => void,\n\t) {\n\t\tconst { message } = this;\n\t\tconst type = message.readVarUint();\n\t\tconst emptyMessageLength = message.length;\n\n\t\tswitch (type) {\n\t\t\tcase MessageType.Sync:\n\t\t\tcase MessageType.SyncReply: {\n\t\t\t\tmessage.writeVarUint(MessageType.Sync);\n\t\t\t\tawait this.readSyncMessage(\n\t\t\t\t\tmessage,\n\t\t\t\t\tdocument,\n\t\t\t\t\tconnection,\n\t\t\t\t\treply,\n\t\t\t\t\ttype !== MessageType.SyncReply,\n\t\t\t\t);\n\n\t\t\t\tif (message.length > emptyMessageLength + 1) {\n\t\t\t\t\tif (reply) {\n\t\t\t\t\t\treply(message.toUint8Array());\n\t\t\t\t\t} else if (connection) {\n\t\t\t\t\t\tconnection.send(message.toUint8Array());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MessageType.Awareness: {\n\t\t\t\tlet update = message.readVarUint8Array();\n\n\t\t\t\tconst origin: TransactionOrigin = connection\n\t\t\t\t\t? ({\n\t\t\t\t\t\t\tsource: \"connection\",\n\t\t\t\t\t\t\tconnection,\n\t\t\t\t\t\t} satisfies ConnectionTransactionOrigin)\n\t\t\t\t\t: (this.defaultTransactionOrigin ?? { source: \"local\" });\n\n\t\t\t\t// Decode the inbound update into a scratch Awareness so the hook\n\t\t\t\t// chain sees a high-level Map. Mutations to that\n\t\t\t\t// map (including `set`, `delete`, and field changes on each state\n\t\t\t\t// object) are picked up by the re-encode below and forwarded as\n\t\t\t\t// the broadcast payload. Hooks may also throw to reject the\n\t\t\t\t// update entirely.\n\t\t\t\tconst scratch = new Awareness(new Y.Doc());\n\t\t\t\tapplyAwarenessUpdate(scratch, update, null);\n\n\t\t\t\tawait document.callbacks.beforeHandleAwareness(\n\t\t\t\t\tdocument,\n\t\t\t\t\tscratch.getStates(),\n\t\t\t\t\torigin,\n\t\t\t\t);\n\n\t\t\t\tupdate = encodeAwarenessUpdate(scratch, [\n\t\t\t\t\t...scratch.getStates().keys(),\n\t\t\t\t]);\n\n\t\t\t\tapplyAwarenessUpdate(document.awareness, update, origin);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MessageType.QueryAwareness: {\n\t\t\t\tthis.applyQueryAwarenessMessage(document, connection, reply);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MessageType.Stateless: {\n\t\t\t\tconnection?.callbacks.statelessCallback({\n\t\t\t\t\tconnection,\n\t\t\t\t\tdocumentName: document.name,\n\t\t\t\t\tdocument,\n\t\t\t\t\tpayload: readVarString(message.decoder),\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MessageType.BroadcastStateless: {\n\t\t\t\tconst msg = message.readVarString();\n\t\t\t\tdocument.getConnections().forEach((connection) => {\n\t\t\t\t\tconnection.sendStateless(msg);\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase MessageType.CLOSE: {\n\t\t\t\tconnection?.close({\n\t\t\t\t\tcode: 1000,\n\t\t\t\t\treason: \"provider_initiated\",\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase MessageType.Auth: {\n\t\t\t\tconst authType = message.readVarUint();\n\t\t\t\tif (authType === AuthMessageType.Token) {\n\t\t\t\t\tconnection?.callbacks.onTokenSyncCallback({\n\t\t\t\t\t\ttoken: message.readVarString(),\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Received an authentication message on a connection that is already fully authenticated. Probably your provider has been destroyed + recreated really fast.\",\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdefault:\n\t\t\t\tconsole.error(\n\t\t\t\t\t`Unable to handle message of type ${type}: no handler defined! Are your provider/server versions aligned?`,\n\t\t\t\t);\n\t\t\t// Do nothing\n\t\t}\n\t}\n\n\tasync readSyncMessage(\n\t\tmessage: IncomingMessage,\n\t\tdocument: Document,\n\t\tconnection?: Connection,\n\t\treply?: (message: Uint8Array) => void,\n\t\trequestFirstSync = true,\n\t) {\n\t\tconst type = message.readVarUint();\n\t\tconst messageAddress = connection?.messageAddress ?? document.name;\n\n\t\tif (connection) {\n\t\t\tawait connection.callbacks.beforeSync(connection, {\n\t\t\t\ttype,\n\t\t\t\tpayload: message.peekVarUint8Array(),\n\t\t\t});\n\t\t}\n\n\t\tswitch (type) {\n\t\t\tcase messageYjsSyncStep1: {\n\t\t\t\treadSyncStep1(message.decoder, message.encoder, document);\n\n\t\t\t\t// When the server receives SyncStep1, it should reply with SyncStep2 immediately followed by SyncStep1.\n\t\t\t\tif (reply && requestFirstSync) {\n\t\t\t\t\tconst syncMessage = new OutgoingMessage(messageAddress)\n\t\t\t\t\t\t.createSyncReplyMessage()\n\t\t\t\t\t\t.writeFirstSyncStepFor(document);\n\n\t\t\t\t\treply(syncMessage.toUint8Array());\n\t\t\t\t} else if (connection) {\n\t\t\t\t\tconst syncMessage = new OutgoingMessage(messageAddress)\n\t\t\t\t\t\t.createSyncMessage()\n\t\t\t\t\t\t.writeFirstSyncStepFor(document);\n\n\t\t\t\t\tconnection.send(syncMessage.toUint8Array());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase messageYjsSyncStep2: {\n\t\t\t\tif (connection?.readOnly) {\n\t\t\t\t\t// We're in read-only mode, so we can't apply the update.\n\t\t\t\t\t// Let's use snapshotContainsUpdate to see if the update actually contains changes.\n\t\t\t\t\t// If not, we can still ack the update\n\t\t\t\t\tconst snapshot = Y.snapshot(document);\n\t\t\t\t\tconst update = decoding.readVarUint8Array(message.decoder);\n\t\t\t\t\tif (Y.snapshotContainsUpdate(snapshot, update)) {\n\t\t\t\t\t\t// no new changes in update\n\t\t\t\t\t\tconst ackMessage = new OutgoingMessage(\n\t\t\t\t\t\t\tmessageAddress,\n\t\t\t\t\t\t).writeSyncStatus(true);\n\n\t\t\t\t\t\tconnection.send(ackMessage.toUint8Array());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// new changes in update that we can't apply, because readOnly\n\t\t\t\t\t\tconst ackMessage = new OutgoingMessage(\n\t\t\t\t\t\t\tmessageAddress,\n\t\t\t\t\t\t).writeSyncStatus(false);\n\n\t\t\t\t\t\tconnection.send(ackMessage.toUint8Array());\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\treadSyncStep2(\n\t\t\t\t\tmessage.decoder,\n\t\t\t\t\tdocument,\n\t\t\t\t\tconnection\n\t\t\t\t\t\t? { source: \"connection\" as const, connection }\n\t\t\t\t\t\t: (this.defaultTransactionOrigin ?? { source: \"local\" as const }),\n\t\t\t\t);\n\n\t\t\t\tif (connection) {\n\t\t\t\t\tconnection.send(\n\t\t\t\t\t\tnew OutgoingMessage(messageAddress)\n\t\t\t\t\t\t\t.writeSyncStatus(true)\n\t\t\t\t\t\t\t.toUint8Array(),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase messageYjsUpdate: {\n\t\t\t\tif (connection?.readOnly) {\n\t\t\t\t\tconnection.send(\n\t\t\t\t\t\tnew OutgoingMessage(messageAddress)\n\t\t\t\t\t\t\t.writeSyncStatus(false)\n\t\t\t\t\t\t\t.toUint8Array(),\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\treadUpdate(\n\t\t\t\t\tmessage.decoder,\n\t\t\t\t\tdocument,\n\t\t\t\t\tconnection\n\t\t\t\t\t\t? { source: \"connection\" as const, connection }\n\t\t\t\t\t\t: (this.defaultTransactionOrigin ?? { source: \"local\" as const }),\n\t\t\t\t);\n\t\t\t\tif (connection) {\n\t\t\t\t\tconnection.send(\n\t\t\t\t\t\tnew OutgoingMessage(messageAddress)\n\t\t\t\t\t\t\t.writeSyncStatus(true)\n\t\t\t\t\t\t\t.toUint8Array(),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Received a message with an unknown type: ${type}`);\n\t\t}\n\n\t\treturn type;\n\t}\n\n\tapplyQueryAwarenessMessage(\n\t\tdocument: Document,\n\t\tconnection?: Connection,\n\t\treply?: (message: Uint8Array) => void,\n\t) {\n\t\tconst message = new OutgoingMessage(\n\t\t\tconnection?.messageAddress ?? document.name,\n\t\t).createAwarenessUpdateMessage(document.awareness);\n\n\t\tif (reply) {\n\t\t\treply(message.toUint8Array());\n\t\t}\n\t}\n}\n","import {\n\ttype CloseEvent,\n\tResetConnection,\n\tWsReadyStates,\n} from \"@hocuspocus/common\";\nimport type Document from \"./Document.ts\";\nimport { IncomingMessage } from \"./IncomingMessage.ts\";\nimport { MessageReceiver } from \"./MessageReceiver.ts\";\nimport { OutgoingMessage } from \"./OutgoingMessage.ts\";\nimport type {\n\tWebSocketLike,\n\tbeforeSyncPayload,\n\tonStatelessPayload,\n} from \"./types.ts\";\n\nexport class Connection {\n\twebSocket: WebSocketLike;\n\n\tcontext: Context;\n\n\tdocument: Document;\n\n\trequest: Request;\n\n\tcallbacks = {\n\t\tonClose: [(document: Document, event?: CloseEvent) => {}],\n\t\tbeforeHandleMessage: (connection: Connection, update: Uint8Array) =>\n\t\t\tPromise.resolve(),\n\t\tbeforeSync: (\n\t\t\tconnection: Connection,\n\t\t\tpayload: Pick,\n\t\t) => Promise.resolve(),\n\t\tstatelessCallback: (payload: onStatelessPayload) => Promise.resolve(),\n\t\tonTokenSyncCallback: (payload: { token: string }) => Promise.resolve(),\n\t};\n\n\tsocketId: string;\n\n\treadOnly: boolean;\n\n\tsessionId: string | null;\n\n\tproviderVersion: string | null;\n\n\t/**\n\t * The address string prefixed to outgoing messages.\n\t * Session-aware clients get `documentName\\0sessionId`; legacy clients get plain `documentName`.\n\t */\n\tget messageAddress(): string {\n\t\treturn this.sessionId\n\t\t\t? `${this.document.name}\\0${this.sessionId}`\n\t\t\t: this.document.name;\n\t}\n\n\tprivate messageQueue: Uint8Array[] = [];\n\n\tprivate processingPromise: Promise = Promise.resolve();\n\n\t/**\n\t * Constructor.\n\t */\n\tconstructor(\n\t\tconnection: WebSocketLike,\n\t\trequest: Request,\n\t\tdocument: Document,\n\t\tsocketId: string,\n\t\tcontext: Context,\n\t\treadOnly = false,\n\t\tsessionId?: string | null,\n\t\tproviderVersion?: string | null,\n\t) {\n\t\tthis.webSocket = connection;\n\t\tthis.context = context;\n\t\tthis.document = document;\n\t\tthis.request = request;\n\t\tthis.socketId = socketId;\n\t\tthis.readOnly = readOnly;\n\t\tthis.sessionId = sessionId ?? null;\n\t\tthis.providerVersion = providerVersion ?? null;\n\n\t\tthis.document.addConnection(this);\n\n\t\tthis.sendCurrentAwareness();\n\t}\n\n\t/**\n\t * Set a callback that will be triggered when the connection is closed\n\t */\n\tonClose(\n\t\tcallback: (document: Document, event?: CloseEvent) => void,\n\t): Connection {\n\t\tthis.callbacks.onClose.push(callback);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered when an stateless message is received\n\t */\n\tonStatelessCallback(\n\t\tcallback: (payload: onStatelessPayload) => Promise,\n\t): Connection {\n\t\tthis.callbacks.statelessCallback = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered before an message is handled\n\t */\n\tbeforeHandleMessage(\n\t\tcallback: (connection: Connection, update: Uint8Array) => Promise,\n\t): Connection {\n\t\tthis.callbacks.beforeHandleMessage = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered before a sync message is handled\n\t */\n\tbeforeSync(\n\t\tcallback: (\n\t\t\tconnection: Connection,\n\t\t\tpayload: Pick,\n\t\t) => Promise,\n\t): Connection {\n\t\tthis.callbacks.beforeSync = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered when on token sync message is received\n\t */\n\tonTokenSyncCallback(\n\t\tcallback: (payload: { token: string }) => Promise,\n\t): Connection {\n\t\tthis.callbacks.onTokenSyncCallback = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns a promise that resolves when all queued messages have been processed.\n\t */\n\twaitForPendingMessages(): Promise {\n\t\treturn this.processingPromise;\n\t}\n\n\t/**\n\t * Send the given message\n\t */\n\tsend(message: Uint8Array): void {\n\t\tif (\n\t\t\tthis.webSocket.readyState === WsReadyStates.Closing ||\n\t\t\tthis.webSocket.readyState === WsReadyStates.Closed\n\t\t) {\n\t\t\tthis.close();\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tthis.webSocket.send(message);\n\t\t} catch (exception) {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\t/**\n\t * Send a stateless message with payload\n\t */\n\tpublic sendStateless(payload: string): void {\n\t\tconst message = new OutgoingMessage(this.messageAddress).writeStateless(\n\t\t\tpayload,\n\t\t);\n\n\t\tthis.send(message.toUint8Array());\n\t}\n\n\t/**\n\t * Request current token from the client\n\t */\n\tpublic requestToken(): void {\n\t\tconst message = new OutgoingMessage(\n\t\t\tthis.messageAddress,\n\t\t).writeTokenSyncRequest();\n\n\t\tthis.send(message.toUint8Array());\n\t}\n\n\t/**\n\t * Graceful wrapper around the WebSocket close method.\n\t */\n\tclose(event?: CloseEvent): void {\n\t\tif (this.document.hasConnection(this)) {\n\t\t\tthis.document.removeConnection(this);\n\t\t\tthis.callbacks.onClose.forEach(\n\t\t\t\t(callback: (arg0: Document, arg1?: CloseEvent) => any) =>\n\t\t\t\t\tcallback(this.document, event),\n\t\t\t);\n\n\t\t\tconst closeMessage = new OutgoingMessage(this.messageAddress);\n\t\t\tcloseMessage.writeCloseMessage(\n\t\t\t\tevent?.reason ?? \"Server closed the connection\",\n\t\t\t);\n\t\t\tthis.send(closeMessage.toUint8Array());\n\t\t}\n\t}\n\n\t/**\n\t * Send the current document awareness to the client, if any\n\t * @private\n\t */\n\tprivate sendCurrentAwareness(): void {\n\t\tif (!this.document.hasAwarenessStates()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst awarenessMessage = new OutgoingMessage(\n\t\t\tthis.messageAddress,\n\t\t).createAwarenessUpdateMessage(this.document.awareness);\n\n\t\tthis.send(awarenessMessage.toUint8Array());\n\t}\n\n\t/**\n\t * Handle an incoming message\n\t * @public\n\t */\n\tpublic handleMessage(data: Uint8Array): void {\n\t\tthis.messageQueue.push(data);\n\n\t\tif (this.messageQueue.length === 1) {\n\t\t\tthis.processingPromise = this.processMessages();\n\t\t}\n\t}\n\n\tprivate async processMessages() {\n\t\twhile (this.messageQueue.length > 0) {\n\t\t\tconst rawUpdate = this.messageQueue.at(0) as Uint8Array;\n\n\t\t\tconst message = new IncomingMessage(rawUpdate);\n\t\t\tconst rawKey = message.readVarString();\n\n\t\t\t// Accept messages addressed with either the plain documentName or documentName\\0sessionId\n\t\t\tconst sepIdx = rawKey.indexOf('\\0');\n\t\t\tconst documentName = sepIdx === -1 ? rawKey : rawKey.substring(0, sepIdx);\n\t\t\tif (documentName !== this.document.name) {\n\t\t\t\tthis.messageQueue.shift();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Write the correct address so replies reach the right provider\n\t\t\tmessage.writeVarString(this.messageAddress);\n\n\t\t\ttry {\n\t\t\t\tawait this.callbacks.beforeHandleMessage(this, rawUpdate);\n\t\t\t\tconst receiver = new MessageReceiver(message);\n\n\t\t\t\tawait receiver.apply(this.document, this);\n\t\t\t\t// biome-ignore lint/suspicious/noExplicitAny: \n\t\t\t} catch (e: any) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`closing connection ${this.socketId} (while handling ${documentName}) because of exception`,\n\t\t\t\t\te,\n\t\t\t\t);\n\t\t\t\tthis.close({\n\t\t\t\t\tcode: \"code\" in e && typeof e.code === 'number' ? e.code : ResetConnection.code,\n\t\t\t\t\treason: \"reason\" in e ? e.reason : ResetConnection.reason,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.messageQueue.shift();\n\t\t}\n\t}\n}\n\nexport default Connection;\n","import { Mutex } from \"async-mutex\";\nimport {\n\tAwareness,\n\tapplyAwarenessUpdate,\n\tremoveAwarenessStates,\n} from \"y-protocols/awareness\";\nimport { Doc, applyUpdate, encodeStateAsUpdate } from \"yjs\";\nimport type Connection from \"./Connection.ts\";\nimport { OutgoingMessage } from \"./OutgoingMessage.ts\";\nimport { isTransactionOrigin } from \"./types.ts\";\nimport type {\n\tAwarenessUpdate,\n\tConnectionTransactionOrigin,\n\tTransactionOrigin,\n} from \"./types.ts\";\n\nexport class Document extends Doc {\n\tawareness: Awareness;\n\n\tcallbacks = {\n\t\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\t\tonUpdate: (document: Document, origin: unknown, update: Uint8Array) => {},\n\t\tbeforeBroadcastStateless: (document: Document, stateless: string) => {},\n\t\tbeforeHandleAwareness: (\n\t\t\tdocument: Document,\n\t\t\tstates: Map>,\n\t\t\ttransactionOrigin: unknown,\n\t\t) => Promise.resolve(),\n\t};\n\n\tconnections: Map<\n\t\tConnection,\n\t\t{\n\t\t\tclients: Set;\n\t\t}\n\t> = new Map();\n\n\t// The number of direct (non-websocket) connections to this document\n\tdirectConnectionsCount = 0;\n\n\tname: string;\n\n\tisLoading: boolean;\n\n\tisDestroyed = false;\n\n\tsaveMutex = new Mutex();\n\n\tlastChangeTime = 0;\n\n\t/**\n\t * Constructor.\n\t */\n\tconstructor(name: string, yDocOptions?: object) {\n\t\tsuper(yDocOptions);\n\n\t\tthis.name = name;\n\n\t\tthis.awareness = new Awareness(this);\n\t\tthis.awareness.setLocalState(null);\n\n\t\tthis.awareness.on(\"update\", this.handleAwarenessUpdate.bind(this));\n\t\tthis.on(\"update\", this.handleUpdate.bind(this));\n\n\t\tthis.isLoading = true;\n\t}\n\n\t/**\n\t * Check if the Document (XMLFragment or Map) is empty\n\t */\n\tisEmpty(fieldName: string): boolean {\n\t\treturn !this.get(fieldName)._start && !this.get(fieldName)._map.size;\n\t}\n\n\t/**\n\t * Merge the given document(s) into this one\n\t */\n\tmerge(documents: Doc | Array): Document {\n\t\t(Array.isArray(documents) ? documents : [documents]).forEach((document) => {\n\t\t\tapplyUpdate(this, encodeStateAsUpdate(document));\n\t\t});\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered when the document is updated\n\t */\n\tonUpdate(\n\t\tcallback: (document: Document, origin: unknown, update: Uint8Array) => void,\n\t): Document {\n\t\tthis.callbacks.onUpdate = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered before a stateless message is broadcasted\n\t */\n\tbeforeBroadcastStateless(\n\t\tcallback: (document: Document, stateless: string) => void,\n\t): Document {\n\t\tthis.callbacks.beforeBroadcastStateless = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered before an inbound awareness update\n\t * is applied to this document's awareness state. The callback receives the\n\t * document, the decoded per-client states as a mutable `Map`, and the\n\t * `TransactionOrigin` that will be forwarded to `applyAwarenessUpdate`.\n\t * Use `isTransactionOrigin(origin)` to discriminate sources. Mutate the\n\t * map in place (set/delete/field changes) to rewrite the update, or throw\n\t * to reject it entirely.\n\t */\n\tbeforeHandleAwareness(\n\t\tcallback: (\n\t\t\tdocument: Document,\n\t\t\tstates: Map>,\n\t\t\ttransactionOrigin: unknown,\n\t\t) => Promise,\n\t): Document {\n\t\tthis.callbacks.beforeHandleAwareness = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Register a connection and a set of clients on this document keyed by the\n\t * underlying websocket connection\n\t */\n\taddConnection(connection: Connection): Document {\n\t\tthis.connections.set(connection, {\n\t\t\tclients: new Set(),\n\t\t});\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Is the given connection registered on this document\n\t */\n\thasConnection(connection: Connection): boolean {\n\t\treturn this.connections.has(connection);\n\t}\n\n\t/**\n\t * Remove the given connection from this document\n\t */\n\tremoveConnection(connection: Connection): Document {\n\t\tconst entry = this.connections.get(connection);\n\t\tif (entry) {\n\t\t\tremoveAwarenessStates(\n\t\t\t\tthis.awareness,\n\t\t\t\tArray.from(entry.clients),\n\t\t\t\tnull,\n\t\t\t);\n\t\t}\n\n\t\tthis.connections.delete(connection);\n\n\t\treturn this;\n\t}\n\n\taddDirectConnection(): Document {\n\t\tthis.directConnectionsCount += 1;\n\n\t\treturn this;\n\t}\n\n\tremoveDirectConnection(): Document {\n\t\tif (this.directConnectionsCount > 0) {\n\t\t\tthis.directConnectionsCount -= 1;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Get the number of active connections for this document\n\t */\n\tgetConnectionsCount(): number {\n\t\treturn this.connections.size + this.directConnectionsCount;\n\t}\n\n\t/**\n\t * Get an array of registered connections\n\t */\n\tgetConnections(): Array {\n\t\treturn Array.from(this.connections.keys());\n\t}\n\n\t/**\n\t * Get the client ids for the given connection instance\n\t */\n\tgetClients(connection: Connection): Set {\n\t\tconst entry = this.connections.get(connection);\n\n\t\treturn entry?.clients === undefined ? new Set() : entry.clients;\n\t}\n\n\t/**\n\t * Has the document awareness states\n\t */\n\thasAwarenessStates(): boolean {\n\t\treturn this.awareness.getStates().size > 0;\n\t}\n\n\t/**\n\t * Apply the given awareness update\n\t */\n\tapplyAwarenessUpdate(connection: Connection, update: Uint8Array): Document {\n\t\tapplyAwarenessUpdate(this.awareness, update, {\n\t\t\tsource: \"connection\",\n\t\t\tconnection,\n\t\t} satisfies ConnectionTransactionOrigin);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Handle an awareness update and sync changes to clients\n\t * @private\n\t */\n\tprivate handleAwarenessUpdate(\n\t\t{ added, updated, removed }: AwarenessUpdate,\n\t\torigin: TransactionOrigin | null,\n\t): Document {\n\t\tconst changedClients = added.concat(updated, removed);\n\n\t\tconst originConnection: Connection | null =\n\t\t\tisTransactionOrigin(origin) && origin.source === \"connection\"\n\t\t\t\t? origin.connection\n\t\t\t\t: null;\n\n\t\tif (originConnection !== null) {\n\t\t\tconst entry = this.connections.get(originConnection);\n\n\t\t\tif (entry) {\n\t\t\t\tadded.forEach((clientId: any) => entry.clients.add(clientId));\n\t\t\t\tremoved.forEach((clientId: any) => entry.clients.delete(clientId));\n\t\t\t}\n\t\t}\n\n\t\tfor (const connection of this.getConnections()) {\n\t\t\tconst awarenessMessage = new OutgoingMessage(\n\t\t\t\tconnection.messageAddress,\n\t\t\t).createAwarenessUpdateMessage(this.awareness, changedClients);\n\n\t\t\tconnection.send(awarenessMessage.toUint8Array());\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Handle an updated document and sync changes to clients\n\t */\n\tprivate handleUpdate(update: Uint8Array, origin: unknown): Document {\n\t\tthis.callbacks.onUpdate(this, origin, update);\n\n\t\tfor (const connection of this.getConnections()) {\n\t\t\tconst message = new OutgoingMessage(connection.messageAddress)\n\t\t\t\t.createSyncMessage()\n\t\t\t\t.writeUpdate(update);\n\n\t\t\tconnection.send(message.toUint8Array());\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Broadcast stateless message to all connections\n\t */\n\tpublic broadcastStateless(\n\t\tpayload: string,\n\t\tfilter?: (conn: Connection) => boolean,\n\t): void {\n\t\tthis.callbacks.beforeBroadcastStateless(this, payload);\n\n\t\tconst connections = filter\n\t\t\t? this.getConnections().filter(filter)\n\t\t\t: this.getConnections();\n\n\t\tconnections.forEach((connection) => {\n\t\t\tconnection.sendStateless(payload);\n\t\t});\n\t}\n\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.isDestroyed = true;\n\t}\n}\n\nexport default Document;\n","","/**\n * Get parameters by the given request\n */\nexport function getParameters(request?: { url?: string }): URLSearchParams {\n\tconst url = request?.url;\n\tif (!url) {\n\t\treturn new URLSearchParams();\n\t}\n\t// Handle both full URLs (web Request) and path-only URLs (Node.js IncomingMessage)\n\tconst query = url.includes(\"://\")\n\t\t? new URL(url).searchParams\n\t\t: new URLSearchParams(url.split(\"?\")[1] || \"\");\n\treturn query;\n}\n","import crypto from \"node:crypto\";\nimport {\n\ttype CloseEvent,\n\tConnectionTimeout,\n\tForbidden,\n\tResetConnection,\n\tUnauthorized,\n\tWsReadyStates,\n} from \"@hocuspocus/common\";\nimport * as decoding from \"lib0/decoding\";\nimport Connection from \"./Connection.ts\";\nimport type Document from \"./Document.ts\";\nimport type { Hocuspocus } from \"./Hocuspocus.ts\";\nimport { IncomingMessage as SocketIncomingMessage } from \"./IncomingMessage.ts\";\nimport { OutgoingMessage } from \"./OutgoingMessage.ts\";\nimport type {\n\tConnectionConfiguration,\n\tWebSocketLike,\n\tbeforeHandleMessagePayload,\n\tbeforeSyncPayload,\n\tonDisconnectPayload,\n} from \"./types.ts\";\nimport { MessageType } from \"./types.ts\";\nimport { getParameters } from \"./util/getParameters.ts\";\n\n/**\n * The `ClientConnection` class is responsible for handling an incoming WebSocket\n *\n * TODO-refactor:\n * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts\n */\nexport class ClientConnection {\n\t// Map of established document connections, keyed by rawKey (composite or plain)\n\tprivate readonly documentConnections: Record> =\n\t\t{};\n\n\t// While the connection will be establishing messages will\n\t// be queued and handled later.\n\tprivate readonly incomingMessageQueue: Record = {};\n\n\t// While the connection is establishing, keep track of which documents have received auth\n\tprivate readonly documentConnectionsEstablished = new Set();\n\n\t// Hook payloads keyed by rawKey (composite or plain)\n\tprivate readonly hookPayloads: Record<\n\t\tstring,\n\t\t{\n\t\t\tinstance: Hocuspocus;\n\t\t\trequest: Request;\n\t\t\trequestHeaders: Headers;\n\t\t\trequestParameters: URLSearchParams;\n\t\t\tsocketId: string;\n\t\t\tconnectionConfig: ConnectionConfiguration;\n\t\t\tcontext: Context;\n\t\t\tproviderVersion: string | null;\n\t\t}\n\t> = {};\n\n\tprivate readonly callbacks = {\n\t\tonClose: [(document: Document, payload: onDisconnectPayload) => {}],\n\t};\n\n\t// Every new connection gets a unique identifier.\n\tprivate readonly socketId = crypto.randomUUID();\n\n\ttimeout: number;\n\n\tpingInterval: NodeJS.Timeout;\n\n\tlastMessageReceivedAt = Date.now();\n\n\t/**\n\t * The `ClientConnection` class receives incoming WebSocket connections,\n\t * runs all hooks:\n\t *\n\t * - onConnect for all connections\n\t * - onAuthenticate only if required\n\t *\n\t * … and if nothings fails it'll fully establish the connection and\n\t * load the Document then.\n\t */\n\tconstructor(\n\t\tprivate readonly websocket: WebSocketLike,\n\t\tprivate readonly request: Request,\n\t\tprivate readonly documentProvider: {\n\t\t\tcreateDocument: Hocuspocus[\"createDocument\"];\n\t\t},\n\t\t// TODO: change to events\n\t\tprivate readonly hooks: Hocuspocus[\"hooks\"],\n\t\tprivate readonly opts: {\n\t\t\ttimeout: number;\n\t\t},\n\t\tprivate readonly defaultContext: Context = {} as Context,\n\t) {\n\t\tthis.timeout = opts.timeout;\n\t\tthis.pingInterval = setInterval(this.check, this.timeout);\n\t}\n\n\t/**\n\t * Handle WebSocket close event. Call this from your integration\n\t * when the WebSocket connection closes.\n\t */\n\thandleClose(event?: CloseEvent) {\n\t\tthis.close(event);\n\t\tclearInterval(this.pingInterval);\n\t}\n\n\tprivate close(event?: CloseEvent) {\n\t\tObject.values(this.documentConnections).forEach((connection) =>\n\t\t\tconnection.close(event),\n\t\t);\n\t}\n\n\t/**\n\t * Close the connection if no messages have been received within the timeout period.\n\t * This replaces application-level ping/pong to maintain backward compatibility\n\t * with older provider versions that don't understand Ping/Pong message types.\n\t * Awareness updates (~every 30s) keep active connections alive.\n\t */\n\tprivate check = () => {\n\t\tif (Date.now() - this.lastMessageReceivedAt > this.timeout) {\n\t\t\tthis.close(ConnectionTimeout);\n\t\t}\n\t};\n\n\t/**\n\t * Set a callback that will be triggered when the connection is closed\n\t */\n\tpublic onClose(\n\t\tcallback: (document: Document, payload: onDisconnectPayload) => void,\n\t): ClientConnection {\n\t\tthis.callbacks.onClose.push(callback);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Create a new connection by the given request and document\n\t */\n\tprivate createConnection(\n\t\tconnection: WebSocketLike,\n\t\tdocument: Document,\n\t\thookPayload: (typeof this.hookPayloads)[string],\n\t\tsessionId: string | null,\n\t\tproviderVersion: string | null,\n\t): Connection {\n\t\tconst instance = new Connection(\n\t\t\tconnection,\n\t\t\thookPayload.request,\n\t\t\tdocument,\n\t\t\thookPayload.socketId,\n\t\t\thookPayload.context,\n\t\t\thookPayload.connectionConfig.readOnly,\n\t\t\tsessionId,\n\t\t\tproviderVersion,\n\t\t);\n\n\t\tinstance.onClose(async (document, event) => {\n\t\t\t// Wait for any pending message processing to complete before running\n\t\t\t// disconnect hooks. This ensures that document updates from queued messages\n\t\t\t// are applied (and their debounced onStoreDocument scheduled) before the\n\t\t\t// disconnect handler checks whether to call executeNow.\n\t\t\tawait instance.waitForPendingMessages();\n\n\t\t\tconst disconnectHookPayload: onDisconnectPayload = {\n\t\t\t\tinstance: this.documentProvider as Hocuspocus, // TODO, this will be removed when we use events instead of hooks for this class\n\t\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\t\tcontext: hookPayload.context,\n\t\t\t\tdocument,\n\t\t\t\tsocketId: hookPayload.socketId,\n\t\t\t\tdocumentName: document.name,\n\t\t\t\trequestHeaders: hookPayload.request.headers,\n\t\t\t\trequestParameters: getParameters(hookPayload.request),\n\t\t\t};\n\n\t\t\tawait this.hooks(\"onDisconnect\", disconnectHookPayload);\n\t\t\tthis.callbacks.onClose.forEach((callback) =>\n\t\t\t\tcallback(document, disconnectHookPayload),\n\t\t\t);\n\t\t});\n\n\t\tinstance.onStatelessCallback(async (payload) => {\n\t\t\ttry {\n\t\t\t\treturn await this.hooks(\"onStateless\", payload);\n\t\t\t} catch (error: any) {\n\t\t\t\tif (error?.message) {\n\t\t\t\t\t// if a hook rejects and the error is empty, do nothing\n\t\t\t\t\t// this is only meant to prevent later hooks and the\n\t\t\t\t\t// default handler to do something. if an error is present\n\t\t\t\t\t// just rethrow it\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tinstance.beforeHandleMessage((connection, update) => {\n\t\t\tconst beforeHandleMessagePayload: beforeHandleMessagePayload = {\n\t\t\t\tinstance: this.documentProvider as Hocuspocus, // TODO, this will be removed when we use events instead of hooks for this class\n\t\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\t\tcontext: hookPayload.context,\n\t\t\t\tdocument,\n\t\t\t\tsocketId: hookPayload.socketId,\n\t\t\t\tconnection,\n\t\t\t\tdocumentName: document.name,\n\t\t\t\trequestHeaders: hookPayload.request.headers,\n\t\t\t\trequestParameters: getParameters(hookPayload.request),\n\t\t\t\tupdate,\n\t\t\t};\n\n\t\t\treturn this.hooks(\"beforeHandleMessage\", beforeHandleMessagePayload);\n\t\t});\n\n\t\tinstance.beforeSync((connection, payload) => {\n\t\t\tconst beforeSyncPayload: beforeSyncPayload = {\n\t\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\t\tcontext: hookPayload.context,\n\t\t\t\tdocument,\n\t\t\t\tdocumentName: document.name,\n\t\t\t\tconnection,\n\t\t\t\ttype: payload.type,\n\t\t\t\tpayload: payload.payload,\n\t\t\t};\n\n\t\t\treturn this.hooks(\"beforeSync\", beforeSyncPayload);\n\t\t});\n\n\t\treturn instance;\n\t}\n\n\t// Once all hooks are run, we'll fully establish the connection:\n\tprivate setUpNewConnection = async (rawKey: string, documentName: string, sessionId: string | null) => {\n\t\tconst hookPayload = this.hookPayloads[rawKey];\n\t\t// If no hook interrupts, create a document and connection\n\t\tconst document = await this.documentProvider.createDocument(\n\t\t\tdocumentName,\n\t\t\thookPayload.request,\n\t\t\thookPayload.socketId,\n\t\t\thookPayload.connectionConfig,\n\t\t\thookPayload.context,\n\t\t);\n\t\tconst connection = this.createConnection(this.websocket, document, hookPayload, sessionId, hookPayload.providerVersion);\n\n\t\tconnection.onClose((document, event) => {\n\t\t\tdelete this.hookPayloads[rawKey];\n\t\t\tdelete this.documentConnections[rawKey];\n\t\t\tdelete this.incomingMessageQueue[rawKey];\n\t\t\tthis.documentConnectionsEstablished.delete(rawKey);\n\t\t});\n\n\t\tconnection.onTokenSyncCallback(async (payload) => {\n\t\t\ttry {\n\t\t\t\treturn await this.hooks(\n\t\t\t\t\t\"onTokenSync\",\n\t\t\t\t\t{\n\t\t\t\t\t\t...hookPayload,\n\t\t\t\t\t\t...payload,\n\t\t\t\t\t\tdocument,\n\t\t\t\t\t\tconnection,\n\t\t\t\t\t\tdocumentName,\n\t\t\t\t\t},\n\t\t\t\t\t(contextAdditions: Partial) => {\n\t\t\t\t\t\thookPayload.context = {\n\t\t\t\t\t\t\t...hookPayload.context,\n\t\t\t\t\t\t\t...contextAdditions,\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t} catch (err: any) {\n\t\t\t\tconsole.error(err);\n\t\t\t\tconst error = { ...Unauthorized, ...err };\n\t\t\t\tconnection.close({ code: error.code, reason: error.reason });\n\t\t\t}\n\t\t});\n\n\t\tthis.documentConnections[rawKey] = connection;\n\n\t\t// If the WebSocket has already disconnected (wow, that was fast) – then\n\t\t// immediately call close to cleanup the connection and document in memory.\n\t\tif (\n\t\t\tthis.websocket.readyState === WsReadyStates.Closing ||\n\t\t\tthis.websocket.readyState === WsReadyStates.Closed\n\t\t) {\n\t\t\tthis.close();\n\t\t\treturn;\n\t\t}\n\n\t\t// Drain queued messages to the Connection.\n\t\tthis.incomingMessageQueue[rawKey]?.forEach((input) => {\n\t\t\tconnection.handleMessage(input);\n\t\t});\n\n\t\tawait this.hooks(\"connected\", {\n\t\t\t...hookPayload,\n\t\t\tdocumentName,\n\t\t\tcontext: hookPayload.context,\n\t\t\tconnection,\n\t\t});\n\t};\n\n\t// This listener handles authentication messages and queues everything else.\n\tprivate handleQueueingMessage = async (data: Uint8Array, rawKey: string, documentName: string) => {\n\t\ttry {\n\t\t\tconst tmpMsg = new SocketIncomingMessage(data);\n\n\t\t\tdecoding.readVarString(tmpMsg.decoder); // skip the message address (already extracted)\n\t\t\tconst type = decoding.readVarUint(tmpMsg.decoder);\n\n\t\t\tif (\n\t\t\t\t!(\n\t\t\t\t\ttype === MessageType.Auth &&\n\t\t\t\t\t!this.documentConnectionsEstablished.has(rawKey)\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthis.incomingMessageQueue[rawKey].push(data);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Okay, we've got the authentication message we're waiting for:\n\t\t\tthis.documentConnectionsEstablished.add(rawKey);\n\n\t\t\t// The 2nd integer contains the submessage type\n\t\t\t// which will always be authentication when sent from client -> server\n\t\t\tdecoding.readVarUint(tmpMsg.decoder);\n\t\t\tconst token = decoding.readVarString(tmpMsg.decoder);\n\n\t\t\t// Try to read providerVersion (new protocol field)\n\t\t\tlet providerVersion: string | null = null;\n\t\t\tif (decoding.hasContent(tmpMsg.decoder)) {\n\t\t\t\tproviderVersion = decoding.readVarString(tmpMsg.decoder);\n\t\t\t}\n\n\t\t\t// Extract sessionId from the rawKey (documentName\\0sessionId) if present\n\t\t\tconst sepIdx = rawKey.indexOf('\\0');\n\t\t\tconst sessionId = sepIdx === -1 ? null : rawKey.substring(sepIdx + 1);\n\n\t\t\t// Response uses rawKey so session-aware clients can route correctly\n\t\t\tconst responseAddress = rawKey;\n\n\t\t\ttry {\n\t\t\t\tconst hookPayload = this.hookPayloads[rawKey];\n\t\t\t\thookPayload.providerVersion = providerVersion;\n\n\t\t\t\tawait this.hooks(\n\t\t\t\t\t\"onConnect\",\n\t\t\t\t\t{ ...hookPayload, documentName },\n\t\t\t\t\t(contextAdditions: Partial) => {\n\t\t\t\t\t\thookPayload.context = {\n\t\t\t\t\t\t\t...hookPayload.context,\n\t\t\t\t\t\t\t...contextAdditions,\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tawait this.hooks(\n\t\t\t\t\t\"onAuthenticate\",\n\t\t\t\t\t{\n\t\t\t\t\t\ttoken,\n\t\t\t\t\t\t...hookPayload,\n\t\t\t\t\t\tdocumentName,\n\t\t\t\t\t},\n\t\t\t\t\t(contextAdditions: Partial) => {\n\t\t\t\t\t\thookPayload.context = {\n\t\t\t\t\t\t\t...hookPayload.context,\n\t\t\t\t\t\t\t...contextAdditions,\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\t// All `onAuthenticate` hooks passed.\n\t\t\t\thookPayload.connectionConfig.isAuthenticated = true;\n\n\t\t\t\t// Let the client know that authentication was successful.\n\t\t\t\tconst message = new OutgoingMessage(responseAddress).writeAuthenticated(\n\t\t\t\t\thookPayload.connectionConfig.readOnly,\n\t\t\t\t);\n\n\t\t\t\tthis.websocket.send(message.toUint8Array());\n\n\t\t\t\t// Time to actually establish the connection.\n\t\t\t\tawait this.setUpNewConnection(rawKey, documentName, sessionId);\n\t\t\t} catch (err: any) {\n\t\t\t\tconst error = err || Forbidden;\n\t\t\t\tconst message = new OutgoingMessage(responseAddress).writePermissionDenied(\n\t\t\t\t\terror.reason ?? \"permission-denied\",\n\t\t\t\t);\n\n\t\t\t\tthis.websocket.send(message.toUint8Array());\n\n\t\t\t\t// Clean up all state for this document so a retry is treated\n\t\t\t\t// as a fresh first connection attempt.\n\t\t\t\tthis.documentConnectionsEstablished.delete(rawKey);\n\t\t\t\tdelete this.hookPayloads[rawKey];\n\t\t\t\tdelete this.incomingMessageQueue[rawKey];\n\t\t\t}\n\n\t\t\t// Catch errors due to failed decoding of data\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t\tthis.websocket.close(ResetConnection.code, ResetConnection.reason);\n\t\t}\n\t};\n\n\t/**\n\t * Handle an incoming WebSocket message. Call this from your integration\n\t * when the WebSocket receives a binary message.\n\t */\n\thandleMessage = (data: Uint8Array) => {\n\t\tthis.lastMessageReceivedAt = Date.now();\n\n\t\ttry {\n\t\t\tconst tmpMsg = new SocketIncomingMessage(data);\n\n\t\t\tconst rawKey = decoding.readVarString(tmpMsg.decoder);\n\n\t\t\t// Extract the plain documentName (the raw key may be documentName\\0sessionId)\n\t\t\tconst sepIdx = rawKey.indexOf('\\0');\n\t\t\tconst documentName = sepIdx === -1 ? rawKey : rawKey.substring(0, sepIdx);\n\n\t\t\t// Look up by rawKey first (session-aware providers), then fall back\n\t\t\t// to plain documentName for backward compatibility with old providers\n\t\t\tconst connection = this.documentConnections[rawKey]\n\t\t\t\t?? this.documentConnections[documentName];\n\t\t\tif (connection) {\n\t\t\t\tconnection.handleMessage(data);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst isFirst = this.incomingMessageQueue[rawKey] === undefined;\n\t\t\tif (isFirst) {\n\t\t\t\tthis.incomingMessageQueue[rawKey] = [];\n\t\t\t\tif (this.hookPayloads[rawKey]) {\n\t\t\t\t\tthrow new Error(\"first message, but hookPayloads exists\");\n\t\t\t\t}\n\n\t\t\t\tthis.hookPayloads[rawKey] = {\n\t\t\t\t\tinstance: this.documentProvider as Hocuspocus,\n\t\t\t\t\trequest: this.request,\n\t\t\t\t\tconnectionConfig: {\n\t\t\t\t\t\treadOnly: false,\n\t\t\t\t\t\tisAuthenticated: false,\n\t\t\t\t\t},\n\t\t\t\t\trequestHeaders: this.request.headers,\n\t\t\t\t\trequestParameters: getParameters(this.request),\n\t\t\t\t\tsocketId: this.socketId,\n\t\t\t\t\tcontext: {\n\t\t\t\t\t\t...this.defaultContext,\n\t\t\t\t\t},\n\t\t\t\t\tproviderVersion: null as string | null,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.handleQueueingMessage(data, rawKey, documentName);\n\t\t} catch (closeError) {\n\t\t\t// catch is needed in case an invalid payload crashes the parsing of the Uint8Array\n\t\t\tconsole.error(closeError);\n\t\t\tthis.websocket.close(Unauthorized.code, Unauthorized.reason);\n\t\t}\n\t};\n}\n","import { URLSearchParams } from \"node:url\";\nimport type Document from \"./Document.ts\";\nimport type { Hocuspocus } from \"./Hocuspocus.ts\";\nimport type {\n\tDirectConnection as DirectConnectionInterface,\n\tLocalTransactionOrigin,\n} from \"./types.ts\";\n\nexport class DirectConnection\n\timplements DirectConnectionInterface\n{\n\tdocument: Document | null = null;\n\n\tinstance!: Hocuspocus;\n\n\tcontext: Context;\n\n\t/**\n\t * Constructor.\n\t */\n\tconstructor(document: Document, instance: Hocuspocus, context?: Context) {\n\t\tthis.document = document;\n\t\tthis.instance = instance;\n\t\tthis.context = (context ?? {}) as Context;\n\n\t\tthis.document.addDirectConnection();\n\t}\n\n\tasync transact(transaction: (document: Document) => void) {\n\t\tif (!this.document) {\n\t\t\tthrow new Error(\"direct connection closed\");\n\t\t}\n\n\t\tthis.document.transact(\n\t\t\t(x) => {\n\t\t\t\t// biome-ignore lint/style/noNonNullAssertion: \n\t\t\t\ttransaction(this.document!);\n\t\t\t},\n\t\t\t{\n\t\t\t\tsource: \"local\",\n\t\t\t\tcontext: this.context,\n\t\t\t} satisfies LocalTransactionOrigin,\n\t\t);\n\t}\n\n\tasync disconnect() {\n\t\tif (this.document) {\n\t\t\tthis.document?.removeDirectConnection();\n\n\t\t\tawait this.instance.storeDocumentHooks(\n\t\t\t\tthis.document,\n\t\t\t\t{\n\t\t\t\t\tclientsCount: this.document.getConnectionsCount(),\n\t\t\t\t\tlastContext: this.context,\n\t\t\t\t\tlastTransactionOrigin: {\n\t\t\t\t\t\tsource: \"local\",\n\t\t\t\t\t\tcontext: this.context,\n\t\t\t\t\t} satisfies LocalTransactionOrigin,\n\t\t\t\t\tdocument: this.document,\n\t\t\t\t\tdocumentName: this.document.name,\n\t\t\t\t\tinstance: this.instance,\n\t\t\t\t},\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\t// If the direct connection was the only connection to the document\n\t\t\t// then we should trigger the onDisconnect hook for\n\t\t\t// this doc and unload the document\n\t\t\tif (\n\t\t\t\tthis.document.getConnectionsCount() === 0 &&\n\t\t\t\t!this.document.saveMutex.isLocked()\n\t\t\t) {\n\t\t\t\tawait this.instance.hooks(\"onDisconnect\", {\n\t\t\t\t\tinstance: this.instance,\n\t\t\t\t\tclientsCount: this.document.getConnectionsCount(),\n\t\t\t\t\tcontext: this.context,\n\t\t\t\t\tdocument: this.document,\n\t\t\t\t\tsocketId: \"server\",\n\t\t\t\t\tdocumentName: this.document.name,\n\t\t\t\t\trequestHeaders: new Headers(),\n\t\t\t\t\trequestParameters: new URLSearchParams(),\n\t\t\t\t});\n\n\t\t\t\tawait this.instance.unloadDocument(this.document);\n\t\t\t}\n\n\t\t\tthis.document = null;\n\t\t}\n\t}\n}\n","export const useDebounce = () => {\n\tconst timers: Map<\n\t\tstring,\n\t\t{\n\t\t\ttimeout: NodeJS.Timeout;\n\t\t\tstart: number;\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n\t\t\tfunc: () => any | Promise<() => any>;\n\t\t}\n\t> = new Map();\n\n\tconst runningExecutions: Map> = new Map();\n\n\tconst debounce = async (\n\t\tid: string,\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n\t\tfunc: () => any | Promise<() => any>,\n\t\tdebounce: number,\n\t\tmaxDebounce: number,\n\t) => {\n\t\tconst old = timers.get(id);\n\t\tconst start = old?.start || Date.now();\n\n\t\tconst run = async () => {\n\t\t\tif (runningExecutions.has(id)) {\n\t\t\t\t// wait for previous execution to finish\n\t\t\t\tawait runningExecutions.get(id);\n\t\t\t}\n\n\t\t\ttimers.delete(id);\n\n\t\t\tconst execution = func();\n\n\t\t\trunningExecutions.set(id, execution);\n\t\t\tconst executionResult = await execution;\n\t\t\trunningExecutions.delete(id);\n\n\t\t\treturn executionResult;\n\t\t};\n\n\t\tif (old?.timeout) {\n\t\t\tclearTimeout(old.timeout);\n\t\t}\n\n\t\tif (debounce === 0) {\n\t\t\treturn run();\n\t\t}\n\n\t\tif (Date.now() - start >= maxDebounce) {\n\t\t\treturn run();\n\t\t}\n\n\t\ttimers.set(id, {\n\t\t\tstart,\n\t\t\ttimeout: setTimeout(run, debounce),\n\t\t\tfunc: run,\n\t\t});\n\t};\n\n\tconst executeNow = (id: string) => {\n\t\tconst old = timers.get(id);\n\t\tif (old) {\n\t\t\tclearTimeout(old.timeout);\n\t\t\treturn old.func();\n\t\t}\n\t};\n\n\tconst isDebounced = (id: string): boolean => {\n\t\treturn timers.has(id);\n\t};\n\n\tconst isCurrentlyExecuting = (id: string): boolean => {\n\t\treturn runningExecutions.has(id);\n\t};\n\n\treturn { debounce, isDebounced, isCurrentlyExecuting, executeNow };\n};\n","import crypto from \"node:crypto\";\nimport { awarenessStatesToArray, ResetConnection, SkipFurtherHooksError } from \"@hocuspocus/common\";\nimport { applyUpdate, Doc, encodeStateAsUpdate } from \"yjs\";\nimport meta from \"../package.json\" with { type: \"json\" };\n\nimport { ClientConnection } from \"./ClientConnection.ts\";\nimport { DirectConnection } from \"./DirectConnection.ts\";\nimport Document from \"./Document.ts\";\nimport type { Server } from \"./Server.ts\";\nimport type {\n\tAwarenessUpdate,\n\tbeforeBroadcastStatelessPayload,\n\tConfiguration,\n\tConnectionConfiguration,\n\tHookName,\n\tHookPayloadByName,\n\tonChangePayload,\n\tonDisconnectPayload,\n\tonStoreDocumentPayload,\n\tWebSocketLike,\n} from \"./types.ts\";\nimport { isTransactionOrigin, shouldSkipStoreHooks } from \"./types.ts\";\nimport { useDebounce } from \"./util/debounce.ts\";\nimport { getParameters } from \"./util/getParameters.ts\";\n\nexport const defaultConfiguration = {\n\tname: null,\n\ttimeout: 60_000,\n\tdebounce: 2_000,\n\tmaxDebounce: 10_000,\n\tquiet: false,\n\tyDocOptions: {\n\t\tgc: true,\n\t\tgcFilter: () => true,\n\t},\n\tunloadImmediately: true,\n};\n\nexport class Hocuspocus {\n\tconfiguration: Configuration = {\n\t\t...defaultConfiguration,\n\t\textensions: [],\n\t\tonConfigure: () => new Promise((r) => r(null)),\n\t\tonListen: () => new Promise((r) => r(null)),\n\t\tonUpgrade: () => new Promise((r) => r(null)),\n\t\tonConnect: () => new Promise((r) => r(null)),\n\t\tconnected: () => new Promise((r) => r(null)),\n\t\tbeforeHandleMessage: () => new Promise((r) => r(null)),\n\t\tbeforeHandleAwareness: () => new Promise((r) => r()),\n\t\tbeforeSync: () => new Promise((r) => r(null)),\n\t\tbeforeBroadcastStateless: () => new Promise((r) => r(null)),\n\t\tonStateless: () => new Promise((r) => r(null)),\n\t\tonChange: () => new Promise((r) => r(null)),\n\t\tonCreateDocument: () => new Promise((r) => r(null)),\n\t\tonLoadDocument: () => new Promise((r) => r(null)),\n\t\tonStoreDocument: () => new Promise((r) => r(null)),\n\t\tafterStoreDocument: () => new Promise((r) => r(null)),\n\t\tonAwarenessUpdate: () => new Promise((r) => r(null)),\n\t\tonRequest: () => new Promise((r) => r(null)),\n\t\tonDisconnect: () => new Promise((r) => r(null)),\n\t\tonDestroy: () => new Promise((r) => r(null)),\n\t};\n\n\tloadingDocuments: Map> = new Map();\n\tunloadingDocuments: Map> = new Map();\n\n\tdocuments: Map = new Map();\n\n\tserver?: Server;\n\n\tdebouncer = useDebounce();\n\n\tconstructor(configuration?: Partial>) {\n\t\tif (configuration) {\n\t\t\tthis.configure(configuration);\n\t\t}\n\t}\n\n\t/**\n\t * Configure Hocuspocus\n\t */\n\tconfigure(\n\t\tconfiguration: Partial>,\n\t): Hocuspocus {\n\t\tthis.configuration = {\n\t\t\t...this.configuration,\n\t\t\t...configuration,\n\t\t};\n\n\t\tthis.configuration.extensions.sort((a, b) => {\n\t\t\tconst one = typeof a.priority === \"undefined\" ? 100 : a.priority;\n\t\t\tconst two = typeof b.priority === \"undefined\" ? 100 : b.priority;\n\n\t\t\tif (one > two) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\tif (one < two) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t});\n\n\t\tthis.configuration.extensions.push({\n\t\t\tonConfigure: this.configuration.onConfigure,\n\t\t\tonListen: this.configuration.onListen,\n\t\t\tonUpgrade: this.configuration.onUpgrade,\n\t\t\tonConnect: this.configuration.onConnect,\n\t\t\tconnected: this.configuration.connected,\n\t\t\tonAuthenticate: this.configuration.onAuthenticate,\n\t\t\tonTokenSync: this.configuration.onTokenSync,\n\t\t\tonLoadDocument: this.configuration.onLoadDocument,\n\t\t\tafterLoadDocument: this.configuration.afterLoadDocument,\n\t\t\tbeforeHandleMessage: this.configuration.beforeHandleMessage,\n\t\t\tbeforeHandleAwareness: this.configuration.beforeHandleAwareness,\n\t\t\tbeforeBroadcastStateless: this.configuration.beforeBroadcastStateless,\n\t\t\tbeforeSync: this.configuration.beforeSync,\n\t\t\tonStateless: this.configuration.onStateless,\n\t\t\tonChange: this.configuration.onChange,\n\t\t\tonStoreDocument: this.configuration.onStoreDocument,\n\t\t\tafterStoreDocument: this.configuration.afterStoreDocument,\n\t\t\tonAwarenessUpdate: this.configuration.onAwarenessUpdate,\n\t\t\tonRequest: this.configuration.onRequest,\n\t\t\tbeforeUnloadDocument: this.configuration.beforeUnloadDocument,\n\t\t\tafterUnloadDocument: this.configuration.afterUnloadDocument,\n\t\t\tonDisconnect: this.configuration.onDisconnect,\n\t\t\tonDestroy: this.configuration.onDestroy,\n\t\t});\n\n\t\tthis.hooks(\"onConfigure\", {\n\t\t\tconfiguration: this.configuration,\n\t\t\tversion: meta.version,\n\t\t\tinstance: this,\n\t\t});\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Get the total number of active documents\n\t */\n\tgetDocumentsCount(): number {\n\t\treturn this.documents.size;\n\t}\n\n\t/**\n\t * Get the total number of active connections\n\t */\n\tgetConnectionsCount(): number {\n\t\tconst uniqueSocketIds = new Set();\n\t\tconst totalDirectConnections = Array.from(this.documents.values()).reduce(\n\t\t\t(acc, document) => {\n\t\t\t\t// Accumulate unique socket IDs\n\t\t\t\tdocument.getConnections().forEach(({ socketId }) => {\n\t\t\t\t\tuniqueSocketIds.add(socketId);\n\t\t\t\t});\n\t\t\t\t// Accumulate direct connections\n\t\t\t\treturn acc + document.directConnectionsCount;\n\t\t\t},\n\t\t\t0,\n\t\t);\n\t\t// Return the sum of unique socket IDs and direct connections\n\t\treturn uniqueSocketIds.size + totalDirectConnections;\n\t}\n\n\t/**\n\t * Immediately execute all pending debounced onStoreDocument calls.\n\t * Useful during shutdown to ensure documents are persisted and unloaded\n\t * before the server exits, even when unloadImmediately is false.\n\t */\n\tflushPendingStores() {\n\t\tthis.documents.forEach((document: Document) => {\n\t\t\tconst debounceId = `onStoreDocument-${document.name}`;\n\t\t\tif (!document.isLoading && this.debouncer.isDebounced(debounceId)) {\n\t\t\t\tthis.debouncer.executeNow(debounceId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Force close one or more connections\n\t */\n\tcloseConnections(documentName?: string) {\n\t\t// Iterate through all connections for all documents\n\t\t// and invoke their close method, which is a graceful\n\t\t// disconnect wrapper around the underlying websocket.close\n\t\tthis.documents.forEach((document: Document) => {\n\t\t\t// If a documentName was specified, bail if it doesn't match\n\t\t\tif (documentName && document.name !== documentName) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdocument.connections.forEach((_clients, connection) => {\n\t\t\t\tconnection.close(ResetConnection);\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * The `handleConnection` method receives incoming WebSocket connections,\n\t * runs all hooks:\n\t *\n\t * - onConnect for all connections\n\t * - onAuthenticate only if required\n\t *\n\t * … and if nothing fails it'll fully establish the connection and\n\t * load the Document then.\n\t */\n\thandleConnection(\n\t\tincoming: WebSocket | WebSocketLike,\n\t\trequest: Request,\n\t\tdefaultContext: Context = {} as Context,\n\t): ClientConnection {\n\t\tconst clientConnection = new ClientConnection(\n\t\t\tincoming,\n\t\t\trequest,\n\t\t\tthis,\n\t\t\tthis.hooks.bind(this),\n\t\t\t{\n\t\t\t\ttimeout: this.configuration.timeout,\n\t\t\t},\n\t\t\tdefaultContext,\n\t\t);\n\t\tclientConnection.onClose(\n\t\t\t(document: Document, hookPayload: onDisconnectPayload) => {\n\t\t\t\t// Check if there are still no connections to the document, as these hooks\n\t\t\t\t// may take some time to resolve (e.g. database queries). If a\n\t\t\t\t// new connection were to come in during that time it would rely on the\n\t\t\t\t// document in the map that we remove now.\n\t\t\t\tif (document.getConnectionsCount() > 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If it’s the last connection, we need to make sure to store the\n\t\t\t\t// document. Use the debouncer executeNow helper, to run scheduled\n\t\t\t\t// onStoreDocument immediately and clear running timers.\n\t\t\t\t// If there is no scheduled run for this document there is no point in\n\t\t\t\t// triggering onStoreDocument hook, as everything seems to be stored already.\n\t\t\t\t// Only run this if the document has finished loading earlier (i.e. not to persist the empty\n\t\t\t\t// ydoc if the onLoadDocument hook returned an error)\n\t\t\t\tif (\n\t\t\t\t\t!document.isLoading &&\n\t\t\t\t\tthis.debouncer.isDebounced(`onStoreDocument-${document.name}`)\n\t\t\t\t) {\n\t\t\t\t\tif (this.configuration.unloadImmediately) {\n\t\t\t\t\t\tthis.debouncer.executeNow(`onStoreDocument-${document.name}`);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Remove document from memory immediately\n\t\t\t\t\tthis.unloadDocument(document);\n\t\t\t\t}\n\t\t\t},\n\t\t);\n\n\t\treturn clientConnection;\n\t}\n\n\t/**\n\t * Handle update of the given document\n\t *\n\t * \"connection\" is not necessarily type \"Connection\", it's the Yjs \"origin\" (which is \"Connection\" if\n\t * the update is incoming from the provider, but can be anything if the updates is originated from an extension.\n\t */\n\tprivate handleDocumentUpdate(\n\t\tdocument: Document,\n\t\torigin: unknown,\n\t\tupdate: Uint8Array,\n\t) {\n\t\tconst connection =\n\t\t\tisTransactionOrigin(origin) && origin.source === \"connection\"\n\t\t\t\t? origin.connection\n\t\t\t\t: undefined;\n\t\tconst request = connection?.request;\n\t\tconst context = isTransactionOrigin(origin)\n\t\t\t? origin.source === \"connection\"\n\t\t\t\t? origin.connection.context\n\t\t\t\t: origin.source === \"local\"\n\t\t\t\t\t? (origin.context ?? {})\n\t\t\t\t\t: {}\n\t\t\t: {};\n\n\t\tconst changePayload: onChangePayload = {\n\t\t\tinstance: this,\n\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\tdocument,\n\t\t\tdocumentName: document.name,\n\t\t\trequestHeaders: request?.headers ?? new Headers(),\n\t\t\trequestParameters: getParameters(request),\n\t\t\tsocketId: connection?.socketId ?? \"\",\n\t\t\tupdate,\n\t\t\ttransactionOrigin: origin,\n\t\t\tconnection: connection,\n\t\t\tcontext,\n\t\t};\n\n\t\tthis.hooks(\"onChange\", changePayload);\n\n\t\tif (shouldSkipStoreHooks(origin)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst storePayload: onStoreDocumentPayload = {\n\t\t\tinstance: this,\n\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\tdocument,\n\t\t\tlastContext: context,\n\t\t\tlastTransactionOrigin: origin,\n\t\t\tdocumentName: document.name,\n\t\t};\n\n\t\tthis.storeDocumentHooks(document, storePayload);\n\t}\n\n\t/**\n\t * Create a new document by the given request\n\t */\n\tpublic async createDocument(\n\t\tdocumentName: string,\n\t\trequest: Request,\n\t\tsocketId: string,\n\t\tconnection: ConnectionConfiguration,\n\t\tcontext?: Context,\n\t): Promise {\n\t\tif (!documentName.trim()) {\n\t\t\tthrow new Error(\"Document name must not be empty\");\n\t\t}\n\n\t\tconst existingLoadingDoc = this.loadingDocuments.get(documentName);\n\n\t\tif (existingLoadingDoc) {\n\t\t\treturn existingLoadingDoc;\n\t\t}\n\n\t\tconst existingDoc = this.documents.get(documentName);\n\t\tif (existingDoc) {\n\t\t\treturn Promise.resolve(existingDoc);\n\t\t}\n\n\t\tconst loadDocPromise = this.loadDocument(\n\t\t\tdocumentName,\n\t\t\trequest,\n\t\t\tsocketId,\n\t\t\tconnection,\n\t\t\tcontext,\n\t\t);\n\n\t\tthis.loadingDocuments.set(documentName, loadDocPromise);\n\n\t\ttry {\n\t\t\tconst doc = await loadDocPromise;\n\t\t\tthis.documents.set(documentName, doc);\n\t\t\tthis.loadingDocuments.delete(documentName);\n\t\t\treturn doc;\n\t\t} catch (e) {\n\t\t\tthis.loadingDocuments.delete(documentName);\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\tasync loadDocument(\n\t\tdocumentName: string,\n\t\trequest: Request,\n\t\tsocketId: string,\n\t\tconnectionConfig: ConnectionConfiguration,\n\t\tcontext?: Context,\n\t): Promise {\n\t\tconst requestHeaders = request.headers;\n\t\tconst requestParameters = getParameters(request);\n\n\t\tconst resolvedContext = (context ?? {}) as Context;\n\n\t\tconst yDocOptions = await this.hooks(\"onCreateDocument\", {\n\t\t\tdocumentName,\n\t\t\trequestHeaders,\n\t\t\trequestParameters,\n\t\t\tconnectionConfig,\n\t\t\tcontext: resolvedContext,\n\t\t\tsocketId,\n\t\t\tinstance: this,\n\t\t});\n\n\t\tconst document = new Document(documentName, {\n\t\t\t...this.configuration.yDocOptions,\n\t\t\t...yDocOptions,\n\t\t});\n\n\t\tconst hookPayload = {\n\t\t\tinstance: this,\n\t\t\tcontext: resolvedContext,\n\t\t\tconnectionConfig,\n\t\t\tdocument,\n\t\t\tdocumentName,\n\t\t\tsocketId,\n\t\t\trequestHeaders,\n\t\t\trequestParameters,\n\t\t};\n\n\t\ttry {\n\t\t\tawait this.hooks(\n\t\t\t\t\"onLoadDocument\",\n\t\t\t\thookPayload,\n\t\t\t\t(loadedDocument: Doc | Uint8ArrayConstructor | undefined) => {\n\t\t\t\t\tif (loadedDocument instanceof Doc) {\n\t\t\t\t\t\tapplyUpdate(document, encodeStateAsUpdate(loadedDocument));\n\t\t\t\t\t} else if (loadedDocument instanceof Uint8Array) {\n\t\t\t\t\t\tapplyUpdate(document, loadedDocument);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tthis.closeConnections(documentName);\n\t\t\tthis.unloadDocument(document);\n\t\t\tthrow e;\n\t\t}\n\n\t\tdocument.isLoading = false;\n\n\t\tdocument.onUpdate(\n\t\t\t(document: Document, origin: unknown, update: Uint8Array) => {\n\t\t\t\tdocument.lastChangeTime = Date.now();\n\n\t\t\t\tthis.handleDocumentUpdate(document, origin, update);\n\t\t\t},\n\t\t);\n\n\t\tawait this.hooks(\"afterLoadDocument\", hookPayload);\n\n\t\tdocument.beforeBroadcastStateless(\n\t\t\t(document: Document, stateless: string) => {\n\t\t\t\tconst hookPayload: beforeBroadcastStatelessPayload = {\n\t\t\t\t\tdocument,\n\t\t\t\t\tdocumentName: document.name,\n\t\t\t\t\tpayload: stateless,\n\t\t\t\t};\n\n\t\t\t\tthis.hooks(\"beforeBroadcastStateless\", hookPayload);\n\t\t\t},\n\t\t);\n\n\t\tdocument.beforeHandleAwareness((document, states, transactionOrigin) => {\n\t\t\tconst connection =\n\t\t\t\tisTransactionOrigin(transactionOrigin) &&\n\t\t\t\ttransactionOrigin.source === \"connection\"\n\t\t\t\t\t? transactionOrigin.connection\n\t\t\t\t\t: undefined;\n\t\t\tconst request = connection?.request;\n\t\t\treturn this.hooks(\"beforeHandleAwareness\", {\n\t\t\t\tawareness: document.awareness,\n\t\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\t\tcontext: connection?.context,\n\t\t\t\tdocument,\n\t\t\t\tdocumentName: document.name,\n\t\t\t\tinstance: this,\n\t\t\t\trequestHeaders: request?.headers ?? new Headers(),\n\t\t\t\trequestParameters: request\n\t\t\t\t\t? getParameters(request)\n\t\t\t\t\t: new URLSearchParams(),\n\t\t\t\tsocketId: connection?.socketId ?? \"\",\n\t\t\t\ttransactionOrigin,\n\t\t\t\tconnection,\n\t\t\t\tstates,\n\t\t\t});\n\t\t});\n\n\t\tdocument.awareness.on(\n\t\t\t\"update\",\n\t\t\t(update: AwarenessUpdate, origin: unknown) => {\n\t\t\t\tthis.hooks(\"onAwarenessUpdate\", {\n\t\t\t\t\tdocument,\n\t\t\t\t\tdocumentName,\n\t\t\t\t\tinstance: this,\n\t\t\t\t\t...update,\n\t\t\t\t\ttransactionOrigin: origin,\n\t\t\t\t\tconnection:\n\t\t\t\t\t\tisTransactionOrigin(origin) && origin.source === \"connection\"\n\t\t\t\t\t\t\t? origin.connection\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\tawareness: document.awareness,\n\t\t\t\t\tstates: awarenessStatesToArray(document.awareness.getStates()),\n\t\t\t\t});\n\t\t\t},\n\t\t);\n\n\t\treturn document;\n\t}\n\n\tstoreDocumentHooks(\n\t\tdocument: Document,\n\t\thookPayload: onStoreDocumentPayload,\n\t\timmediately?: boolean,\n\t) {\n\t\tconst debounceId = `onStoreDocument-${document.name}`;\n\t\treturn this.debouncer.debounce(\n\t\t\tdebounceId,\n\t\t\tasync () => {\n\t\t\t\ttry {\n\t\t\t\t\tawait document.saveMutex.runExclusive(async () => {\n\t\t\t\t\t\tawait this.hooks(\"onStoreDocument\", hookPayload);\n\t\t\t\t\t\tawait this.hooks(\"afterStoreDocument\", hookPayload);\n\t\t\t\t\t});\n\t\t\t\t} catch (error: any) {\n\t\t\t\t\tif (error instanceof SkipFurtherHooksError) {\n\t\t\t\t\t\t// Another extension handled this — proceed to unload\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tif (this.shouldUnloadDocument(document)) {\n\t\t\t\t\t\t\t\tthis.unloadDocument(document);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\"Caught error during storeDocumentHooks. Document stays in memory to avoid data loss\",\n\t\t\t\t\t\terror,\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tif (this.shouldUnloadDocument(document)) {\n\t\t\t\t\t\tthis.unloadDocument(document);\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t\t\t},\n\t\t\timmediately ? 0 : this.configuration.debounce,\n\t\t\tthis.configuration.maxDebounce,\n\t\t);\n\t}\n\n\t/**\n\t * Run the given hook on all configured extensions.\n\t * Runs the given callback after each hook.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n\thooks(\n\t\tname: T,\n\t\tpayload: HookPayloadByName[T],\n\t\t// biome-ignore lint/complexity/noBannedTypes: \n\t\tcallback: Function | null = null,\n\t): Promise {\n\t\tconst { extensions } = this.configuration;\n\n\t\t// create a new `thenable` chain\n\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve\n\t\tlet chain = Promise.resolve();\n\n\t\textensions\n\t\t\t// get me all extensions which have the given hook\n\t\t\t.filter((extension) => typeof extension[name] === \"function\")\n\t\t\t// run through all the configured hooks\n\t\t\t.forEach((extension) => {\n\t\t\t\tchain = chain\n\t\t\t\t\t.then(() => (extension[name] as any)?.(payload))\n\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t// make sure to log error messages\n\t\t\t\t\t\tif (error?.message) {\n\t\t\t\t\t\t\tconsole.error(`[${name}]`, error.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t});\n\n\t\t\t\tif (callback) {\n\t\t\t\t\tchain = chain.then((...args: any[]) => callback(...args));\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn chain;\n\t}\n\n\tshouldUnloadDocument(document: Document): boolean {\n\t\tconst hasPendingWork =\n\t\t\tthis.debouncer.isDebounced(`onStoreDocument-${document.name}`) ||\n\t\t\tthis.debouncer.isCurrentlyExecuting(`onStoreDocument-${document.name}`) ||\n\t\t\tdocument.saveMutex.isLocked();\n\n\t\treturn hasPendingWork === false && document.getConnectionsCount() === 0;\n\t}\n\n\tasync unloadDocument(document: Document): Promise {\n\t\tconst documentName = document.name;\n\n\t\tif (!this.shouldUnloadDocument(document)) return;\n\n\t\tif (!this.documents.has(documentName)) return;\n\n\t\tif (this.unloadingDocuments.has(documentName))\n\t\t\treturn this.unloadingDocuments.get(documentName);\n\n\t\t// we need to make sure that the logic runs just once, even if multiple clients disconnect together\n\t\tconst actualUnloadingLogic = async () => {\n\t\t\ttry {\n\t\t\t\tawait this.hooks(\"beforeUnloadDocument\", {\n\t\t\t\t\tinstance: this,\n\t\t\t\t\tdocumentName,\n\t\t\t\t\tdocument,\n\t\t\t\t});\n\t\t\t} catch (e) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// need sync check here as well, to avoid timing problems\n\t\t\tif (!this.shouldUnloadDocument(document)) return;\n\n\t\t\tthis.documents.delete(documentName);\n\t\t\tdocument.destroy();\n\t\t\tawait this.hooks(\"afterUnloadDocument\", { instance: this, documentName });\n\t\t};\n\n\t\tconst unloading = actualUnloadingLogic();\n\n\t\tthis.unloadingDocuments.set(documentName, Promise.resolve(unloading));\n\n\t\tawait unloading;\n\n\t\tthis.unloadingDocuments.delete(documentName);\n\t}\n\n\tasync openDirectConnection(\n\t\tdocumentName: string,\n\t\tcontext?: Context,\n\t): Promise> {\n\t\tconst connectionConfig: ConnectionConfiguration = {\n\t\t\tisAuthenticated: true,\n\t\t\treadOnly: false,\n\t\t};\n\n\t\tconst document: Document = await this.createDocument(\n\t\t\tdocumentName,\n\t\t\tnew Request(\"http://localhost\"), // direct connection has no request params\n\t\t\tcrypto.randomUUID(),\n\t\t\tconnectionConfig,\n\t\t\tcontext,\n\t\t);\n\n\t\treturn new DirectConnection(document, this, context);\n\t}\n}\n","import { createRequire } from \"node:module\";\n\n//#region rolldown:runtime\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\t\tkey = keys[i];\n\t\t\tif (!__hasOwnProp.call(to, key) && key !== except) {\n\t\t\t\t__defProp(to, key, {\n\t\t\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\nvar __require = /* @__PURE__ */ createRequire(import.meta.url);\n\n//#endregion\nexport { __require as n, __toESM as r, __commonJSMin as t };","//#region src/hooks.ts\nvar AdapterHookable = class {\n\toptions;\n\tconstructor(options) {\n\t\tthis.options = options || {};\n\t}\n\tcallHook(name, arg1, arg2) {\n\t\tconst globalHook = this.options.hooks?.[name];\n\t\tconst globalPromise = globalHook?.(arg1, arg2);\n\t\tconst request = arg1.request || arg1;\n\t\tconst resolveHooksPromise = this.options.resolve?.(request);\n\t\tif (!resolveHooksPromise) return globalPromise;\n\t\tconst resolvePromise = resolveHooksPromise instanceof Promise ? resolveHooksPromise.then((hooks) => hooks?.[name]) : resolveHooksPromise?.[name];\n\t\treturn Promise.all([globalPromise, resolvePromise]).then(([globalRes, hook]) => {\n\t\t\tconst hookResPromise = hook?.(arg1, arg2);\n\t\t\treturn hookResPromise instanceof Promise ? hookResPromise.then((hookRes) => hookRes || globalRes) : hookResPromise || globalRes;\n\t\t});\n\t}\n\tasync upgrade(request) {\n\t\tlet namespace = this.options.getNamespace?.(request) ?? new URL(request.url).pathname;\n\t\tconst context = request.context || {};\n\t\ttry {\n\t\t\tconst res = await this.callHook(\"upgrade\", request);\n\t\t\tif (!res) return {\n\t\t\t\tcontext,\n\t\t\t\tnamespace\n\t\t\t};\n\t\t\tif (res.namespace) namespace = res.namespace;\n\t\t\tif (res.context) Object.assign(context, res.context);\n\t\t\tif (res instanceof Response) return {\n\t\t\t\tcontext,\n\t\t\t\tnamespace,\n\t\t\t\tendResponse: res\n\t\t\t};\n\t\t\tif (res.headers) return {\n\t\t\t\tcontext,\n\t\t\t\tnamespace,\n\t\t\t\tupgradeHeaders: res.headers\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconst errResponse = error.response || error;\n\t\t\tif (errResponse instanceof Response) return {\n\t\t\t\tcontext,\n\t\t\t\tnamespace,\n\t\t\t\tendResponse: errResponse\n\t\t\t};\n\t\t\tthrow error;\n\t\t}\n\t\treturn {\n\t\t\tcontext,\n\t\t\tnamespace\n\t\t};\n\t}\n};\nfunction defineHooks(hooks) {\n\treturn hooks;\n}\n\n//#endregion\n//#region src/adapter.ts\nfunction adapterUtils(globalPeers) {\n\treturn {\n\t\tpeers: globalPeers,\n\t\tpublish(topic, message, options) {\n\t\t\tfor (const peers of options?.namespace ? [globalPeers.get(options.namespace) || []] : globalPeers.values()) {\n\t\t\t\tlet firstPeerWithTopic;\n\t\t\t\tfor (const peer of peers) if (peer.topics.has(topic)) {\n\t\t\t\t\tfirstPeerWithTopic = peer;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (firstPeerWithTopic) {\n\t\t\t\t\tfirstPeerWithTopic.send(message, options);\n\t\t\t\t\tfirstPeerWithTopic.publish(topic, message, options);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\nfunction getPeers(globalPeers, namespace) {\n\tif (!namespace) throw new Error(\"Websocket publish namespace missing.\");\n\tlet peers = globalPeers.get(namespace);\n\tif (!peers) {\n\t\tpeers = /* @__PURE__ */ new Set();\n\t\tglobalPeers.set(namespace, peers);\n\t}\n\treturn peers;\n}\nfunction defineWebSocketAdapter(factory) {\n\treturn factory;\n}\n\n//#endregion\nexport { defineHooks as a, AdapterHookable as i, defineWebSocketAdapter as n, getPeers as r, adapterUtils as t };","import { n as __require, r as __toESM, t as __commonJSMin } from \"../rolldown-runtime.mjs\";\n\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/constants.js\nvar require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst BINARY_TYPES = [\n\t\t\"nodebuffer\",\n\t\t\"arraybuffer\",\n\t\t\"fragments\"\n\t];\n\tconst hasBlob = typeof Blob !== \"undefined\";\n\tif (hasBlob) BINARY_TYPES.push(\"blob\");\n\tmodule.exports = {\n\t\tBINARY_TYPES,\n\t\tCLOSE_TIMEOUT: 3e4,\n\t\tEMPTY_BUFFER: Buffer.alloc(0),\n\t\tGUID: \"258EAFA5-E914-47DA-95CA-C5AB0DC85B11\",\n\t\thasBlob,\n\t\tkForOnEventAttribute: Symbol(\"kIsForOnEventAttribute\"),\n\t\tkListener: Symbol(\"kListener\"),\n\t\tkStatusCode: Symbol(\"status-code\"),\n\t\tkWebSocket: Symbol(\"websocket\"),\n\t\tNOOP: () => {}\n\t};\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/buffer-util.js\nvar require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { EMPTY_BUFFER } = require_constants();\n\tconst FastBuffer = Buffer[Symbol.species];\n\t/**\n\t* Merges an array of buffers into a new buffer.\n\t*\n\t* @param {Buffer[]} list The array of buffers to concat\n\t* @param {Number} totalLength The total length of buffers in the list\n\t* @return {Buffer} The resulting buffer\n\t* @public\n\t*/\n\tfunction concat(list, totalLength) {\n\t\tif (list.length === 0) return EMPTY_BUFFER;\n\t\tif (list.length === 1) return list[0];\n\t\tconst target = Buffer.allocUnsafe(totalLength);\n\t\tlet offset = 0;\n\t\tfor (let i = 0; i < list.length; i++) {\n\t\t\tconst buf = list[i];\n\t\t\ttarget.set(buf, offset);\n\t\t\toffset += buf.length;\n\t\t}\n\t\tif (offset < totalLength) return new FastBuffer(target.buffer, target.byteOffset, offset);\n\t\treturn target;\n\t}\n\t/**\n\t* Masks a buffer using the given mask.\n\t*\n\t* @param {Buffer} source The buffer to mask\n\t* @param {Buffer} mask The mask to use\n\t* @param {Buffer} output The buffer where to store the result\n\t* @param {Number} offset The offset at which to start writing\n\t* @param {Number} length The number of bytes to mask.\n\t* @public\n\t*/\n\tfunction _mask(source, mask, output, offset, length) {\n\t\tfor (let i = 0; i < length; i++) output[offset + i] = source[i] ^ mask[i & 3];\n\t}\n\t/**\n\t* Unmasks a buffer using the given mask.\n\t*\n\t* @param {Buffer} buffer The buffer to unmask\n\t* @param {Buffer} mask The mask to use\n\t* @public\n\t*/\n\tfunction _unmask(buffer, mask) {\n\t\tfor (let i = 0; i < buffer.length; i++) buffer[i] ^= mask[i & 3];\n\t}\n\t/**\n\t* Converts a buffer to an `ArrayBuffer`.\n\t*\n\t* @param {Buffer} buf The buffer to convert\n\t* @return {ArrayBuffer} Converted buffer\n\t* @public\n\t*/\n\tfunction toArrayBuffer(buf) {\n\t\tif (buf.length === buf.buffer.byteLength) return buf.buffer;\n\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);\n\t}\n\t/**\n\t* Converts `data` to a `Buffer`.\n\t*\n\t* @param {*} data The data to convert\n\t* @return {Buffer} The buffer\n\t* @throws {TypeError}\n\t* @public\n\t*/\n\tfunction toBuffer(data) {\n\t\ttoBuffer.readOnly = true;\n\t\tif (Buffer.isBuffer(data)) return data;\n\t\tlet buf;\n\t\tif (data instanceof ArrayBuffer) buf = new FastBuffer(data);\n\t\telse if (ArrayBuffer.isView(data)) buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength);\n\t\telse {\n\t\t\tbuf = Buffer.from(data);\n\t\t\ttoBuffer.readOnly = false;\n\t\t}\n\t\treturn buf;\n\t}\n\tmodule.exports = {\n\t\tconcat,\n\t\tmask: _mask,\n\t\ttoArrayBuffer,\n\t\ttoBuffer,\n\t\tunmask: _unmask\n\t};\n\t/* istanbul ignore else */\n\tif (!process.env.WS_NO_BUFFER_UTIL) try {\n\t\tconst bufferUtil = __require(\"bufferutil\");\n\t\tmodule.exports.mask = function(source, mask, output, offset, length) {\n\t\t\tif (length < 48) _mask(source, mask, output, offset, length);\n\t\t\telse bufferUtil.mask(source, mask, output, offset, length);\n\t\t};\n\t\tmodule.exports.unmask = function(buffer, mask) {\n\t\t\tif (buffer.length < 32) _unmask(buffer, mask);\n\t\t\telse bufferUtil.unmask(buffer, mask);\n\t\t};\n\t} catch (e) {}\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/limiter.js\nvar require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst kDone = Symbol(\"kDone\");\n\tconst kRun = Symbol(\"kRun\");\n\t/**\n\t* A very simple job queue with adjustable concurrency. Adapted from\n\t* https://github.com/STRML/async-limiter\n\t*/\n\tvar Limiter = class {\n\t\t/**\n\t\t* Creates a new `Limiter`.\n\t\t*\n\t\t* @param {Number} [concurrency=Infinity] The maximum number of jobs allowed\n\t\t* to run concurrently\n\t\t*/\n\t\tconstructor(concurrency) {\n\t\t\tthis[kDone] = () => {\n\t\t\t\tthis.pending--;\n\t\t\t\tthis[kRun]();\n\t\t\t};\n\t\t\tthis.concurrency = concurrency || Infinity;\n\t\t\tthis.jobs = [];\n\t\t\tthis.pending = 0;\n\t\t}\n\t\t/**\n\t\t* Adds a job to the queue.\n\t\t*\n\t\t* @param {Function} job The job to run\n\t\t* @public\n\t\t*/\n\t\tadd(job) {\n\t\t\tthis.jobs.push(job);\n\t\t\tthis[kRun]();\n\t\t}\n\t\t/**\n\t\t* Removes a job from the queue and runs it if possible.\n\t\t*\n\t\t* @private\n\t\t*/\n\t\t[kRun]() {\n\t\t\tif (this.pending === this.concurrency) return;\n\t\t\tif (this.jobs.length) {\n\t\t\t\tconst job = this.jobs.shift();\n\t\t\t\tthis.pending++;\n\t\t\t\tjob(this[kDone]);\n\t\t\t}\n\t\t}\n\t};\n\tmodule.exports = Limiter;\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/permessage-deflate.js\nvar require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst zlib = __require(\"zlib\");\n\tconst bufferUtil = require_buffer_util();\n\tconst Limiter = require_limiter();\n\tconst { kStatusCode } = require_constants();\n\tconst FastBuffer = Buffer[Symbol.species];\n\tconst TRAILER = Buffer.from([\n\t\t0,\n\t\t0,\n\t\t255,\n\t\t255\n\t]);\n\tconst kPerMessageDeflate = Symbol(\"permessage-deflate\");\n\tconst kTotalLength = Symbol(\"total-length\");\n\tconst kCallback = Symbol(\"callback\");\n\tconst kBuffers = Symbol(\"buffers\");\n\tconst kError = Symbol(\"error\");\n\tlet zlibLimiter;\n\t/**\n\t* permessage-deflate implementation.\n\t*/\n\tvar PerMessageDeflate = class {\n\t\t/**\n\t\t* Creates a PerMessageDeflate instance.\n\t\t*\n\t\t* @param {Object} [options] Configuration options\n\t\t* @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support\n\t\t* for, or request, a custom client window size\n\t\t* @param {Boolean} [options.clientNoContextTakeover=false] Advertise/\n\t\t* acknowledge disabling of client context takeover\n\t\t* @param {Number} [options.concurrencyLimit=10] The number of concurrent\n\t\t* calls to zlib\n\t\t* @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the\n\t\t* use of a custom server window size\n\t\t* @param {Boolean} [options.serverNoContextTakeover=false] Request/accept\n\t\t* disabling of server context takeover\n\t\t* @param {Number} [options.threshold=1024] Size (in bytes) below which\n\t\t* messages should not be compressed if context takeover is disabled\n\t\t* @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on\n\t\t* deflate\n\t\t* @param {Object} [options.zlibInflateOptions] Options to pass to zlib on\n\t\t* inflate\n\t\t* @param {Boolean} [isServer=false] Create the instance in either server or\n\t\t* client mode\n\t\t* @param {Number} [maxPayload=0] The maximum allowed message length\n\t\t*/\n\t\tconstructor(options, isServer, maxPayload) {\n\t\t\tthis._maxPayload = maxPayload | 0;\n\t\t\tthis._options = options || {};\n\t\t\tthis._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024;\n\t\t\tthis._isServer = !!isServer;\n\t\t\tthis._deflate = null;\n\t\t\tthis._inflate = null;\n\t\t\tthis.params = null;\n\t\t\tif (!zlibLimiter) zlibLimiter = new Limiter(this._options.concurrencyLimit !== void 0 ? this._options.concurrencyLimit : 10);\n\t\t}\n\t\t/**\n\t\t* @type {String}\n\t\t*/\n\t\tstatic get extensionName() {\n\t\t\treturn \"permessage-deflate\";\n\t\t}\n\t\t/**\n\t\t* Create an extension negotiation offer.\n\t\t*\n\t\t* @return {Object} Extension parameters\n\t\t* @public\n\t\t*/\n\t\toffer() {\n\t\t\tconst params = {};\n\t\t\tif (this._options.serverNoContextTakeover) params.server_no_context_takeover = true;\n\t\t\tif (this._options.clientNoContextTakeover) params.client_no_context_takeover = true;\n\t\t\tif (this._options.serverMaxWindowBits) params.server_max_window_bits = this._options.serverMaxWindowBits;\n\t\t\tif (this._options.clientMaxWindowBits) params.client_max_window_bits = this._options.clientMaxWindowBits;\n\t\t\telse if (this._options.clientMaxWindowBits == null) params.client_max_window_bits = true;\n\t\t\treturn params;\n\t\t}\n\t\t/**\n\t\t* Accept an extension negotiation offer/response.\n\t\t*\n\t\t* @param {Array} configurations The extension negotiation offers/reponse\n\t\t* @return {Object} Accepted configuration\n\t\t* @public\n\t\t*/\n\t\taccept(configurations) {\n\t\t\tconfigurations = this.normalizeParams(configurations);\n\t\t\tthis.params = this._isServer ? this.acceptAsServer(configurations) : this.acceptAsClient(configurations);\n\t\t\treturn this.params;\n\t\t}\n\t\t/**\n\t\t* Releases all resources used by the extension.\n\t\t*\n\t\t* @public\n\t\t*/\n\t\tcleanup() {\n\t\t\tif (this._inflate) {\n\t\t\t\tthis._inflate.close();\n\t\t\t\tthis._inflate = null;\n\t\t\t}\n\t\t\tif (this._deflate) {\n\t\t\t\tconst callback = this._deflate[kCallback];\n\t\t\t\tthis._deflate.close();\n\t\t\t\tthis._deflate = null;\n\t\t\t\tif (callback) callback(/* @__PURE__ */ new Error(\"The deflate stream was closed while data was being processed\"));\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* Accept an extension negotiation offer.\n\t\t*\n\t\t* @param {Array} offers The extension negotiation offers\n\t\t* @return {Object} Accepted configuration\n\t\t* @private\n\t\t*/\n\t\tacceptAsServer(offers) {\n\t\t\tconst opts = this._options;\n\t\t\tconst accepted = offers.find((params) => {\n\t\t\t\tif (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === \"number\" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === \"number\" && !params.client_max_window_bits) return false;\n\t\t\t\treturn true;\n\t\t\t});\n\t\t\tif (!accepted) throw new Error(\"None of the extension offers can be accepted\");\n\t\t\tif (opts.serverNoContextTakeover) accepted.server_no_context_takeover = true;\n\t\t\tif (opts.clientNoContextTakeover) accepted.client_no_context_takeover = true;\n\t\t\tif (typeof opts.serverMaxWindowBits === \"number\") accepted.server_max_window_bits = opts.serverMaxWindowBits;\n\t\t\tif (typeof opts.clientMaxWindowBits === \"number\") accepted.client_max_window_bits = opts.clientMaxWindowBits;\n\t\t\telse if (accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false) delete accepted.client_max_window_bits;\n\t\t\treturn accepted;\n\t\t}\n\t\t/**\n\t\t* Accept the extension negotiation response.\n\t\t*\n\t\t* @param {Array} response The extension negotiation response\n\t\t* @return {Object} Accepted configuration\n\t\t* @private\n\t\t*/\n\t\tacceptAsClient(response) {\n\t\t\tconst params = response[0];\n\t\t\tif (this._options.clientNoContextTakeover === false && params.client_no_context_takeover) throw new Error(\"Unexpected parameter \\\"client_no_context_takeover\\\"\");\n\t\t\tif (!params.client_max_window_bits) {\n\t\t\t\tif (typeof this._options.clientMaxWindowBits === \"number\") params.client_max_window_bits = this._options.clientMaxWindowBits;\n\t\t\t} else if (this._options.clientMaxWindowBits === false || typeof this._options.clientMaxWindowBits === \"number\" && params.client_max_window_bits > this._options.clientMaxWindowBits) throw new Error(\"Unexpected or invalid parameter \\\"client_max_window_bits\\\"\");\n\t\t\treturn params;\n\t\t}\n\t\t/**\n\t\t* Normalize parameters.\n\t\t*\n\t\t* @param {Array} configurations The extension negotiation offers/reponse\n\t\t* @return {Array} The offers/response with normalized parameters\n\t\t* @private\n\t\t*/\n\t\tnormalizeParams(configurations) {\n\t\t\tconfigurations.forEach((params) => {\n\t\t\t\tObject.keys(params).forEach((key) => {\n\t\t\t\t\tlet value = params[key];\n\t\t\t\t\tif (value.length > 1) throw new Error(`Parameter \"${key}\" must have only a single value`);\n\t\t\t\t\tvalue = value[0];\n\t\t\t\t\tif (key === \"client_max_window_bits\") {\n\t\t\t\t\t\tif (value !== true) {\n\t\t\t\t\t\t\tconst num = +value;\n\t\t\t\t\t\t\tif (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter \"${key}\": ${value}`);\n\t\t\t\t\t\t\tvalue = num;\n\t\t\t\t\t\t} else if (!this._isServer) throw new TypeError(`Invalid value for parameter \"${key}\": ${value}`);\n\t\t\t\t\t} else if (key === \"server_max_window_bits\") {\n\t\t\t\t\t\tconst num = +value;\n\t\t\t\t\t\tif (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter \"${key}\": ${value}`);\n\t\t\t\t\t\tvalue = num;\n\t\t\t\t\t} else if (key === \"client_no_context_takeover\" || key === \"server_no_context_takeover\") {\n\t\t\t\t\t\tif (value !== true) throw new TypeError(`Invalid value for parameter \"${key}\": ${value}`);\n\t\t\t\t\t} else throw new Error(`Unknown parameter \"${key}\"`);\n\t\t\t\t\tparams[key] = value;\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn configurations;\n\t\t}\n\t\t/**\n\t\t* Decompress data. Concurrency limited.\n\t\t*\n\t\t* @param {Buffer} data Compressed data\n\t\t* @param {Boolean} fin Specifies whether or not this is the last fragment\n\t\t* @param {Function} callback Callback\n\t\t* @public\n\t\t*/\n\t\tdecompress(data, fin, callback) {\n\t\t\tzlibLimiter.add((done) => {\n\t\t\t\tthis._decompress(data, fin, (err, result) => {\n\t\t\t\t\tdone();\n\t\t\t\t\tcallback(err, result);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\t/**\n\t\t* Compress data. Concurrency limited.\n\t\t*\n\t\t* @param {(Buffer|String)} data Data to compress\n\t\t* @param {Boolean} fin Specifies whether or not this is the last fragment\n\t\t* @param {Function} callback Callback\n\t\t* @public\n\t\t*/\n\t\tcompress(data, fin, callback) {\n\t\t\tzlibLimiter.add((done) => {\n\t\t\t\tthis._compress(data, fin, (err, result) => {\n\t\t\t\t\tdone();\n\t\t\t\t\tcallback(err, result);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\t/**\n\t\t* Decompress data.\n\t\t*\n\t\t* @param {Buffer} data Compressed data\n\t\t* @param {Boolean} fin Specifies whether or not this is the last fragment\n\t\t* @param {Function} callback Callback\n\t\t* @private\n\t\t*/\n\t\t_decompress(data, fin, callback) {\n\t\t\tconst endpoint = this._isServer ? \"client\" : \"server\";\n\t\t\tif (!this._inflate) {\n\t\t\t\tconst key = `${endpoint}_max_window_bits`;\n\t\t\t\tconst windowBits = typeof this.params[key] !== \"number\" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];\n\t\t\t\tthis._inflate = zlib.createInflateRaw({\n\t\t\t\t\t...this._options.zlibInflateOptions,\n\t\t\t\t\twindowBits\n\t\t\t\t});\n\t\t\t\tthis._inflate[kPerMessageDeflate] = this;\n\t\t\t\tthis._inflate[kTotalLength] = 0;\n\t\t\t\tthis._inflate[kBuffers] = [];\n\t\t\t\tthis._inflate.on(\"error\", inflateOnError);\n\t\t\t\tthis._inflate.on(\"data\", inflateOnData);\n\t\t\t}\n\t\t\tthis._inflate[kCallback] = callback;\n\t\t\tthis._inflate.write(data);\n\t\t\tif (fin) this._inflate.write(TRAILER);\n\t\t\tthis._inflate.flush(() => {\n\t\t\t\tconst err = this._inflate[kError];\n\t\t\t\tif (err) {\n\t\t\t\t\tthis._inflate.close();\n\t\t\t\t\tthis._inflate = null;\n\t\t\t\t\tcallback(err);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst data = bufferUtil.concat(this._inflate[kBuffers], this._inflate[kTotalLength]);\n\t\t\t\tif (this._inflate._readableState.endEmitted) {\n\t\t\t\t\tthis._inflate.close();\n\t\t\t\t\tthis._inflate = null;\n\t\t\t\t} else {\n\t\t\t\t\tthis._inflate[kTotalLength] = 0;\n\t\t\t\t\tthis._inflate[kBuffers] = [];\n\t\t\t\t\tif (fin && this.params[`${endpoint}_no_context_takeover`]) this._inflate.reset();\n\t\t\t\t}\n\t\t\t\tcallback(null, data);\n\t\t\t});\n\t\t}\n\t\t/**\n\t\t* Compress data.\n\t\t*\n\t\t* @param {(Buffer|String)} data Data to compress\n\t\t* @param {Boolean} fin Specifies whether or not this is the last fragment\n\t\t* @param {Function} callback Callback\n\t\t* @private\n\t\t*/\n\t\t_compress(data, fin, callback) {\n\t\t\tconst endpoint = this._isServer ? \"server\" : \"client\";\n\t\t\tif (!this._deflate) {\n\t\t\t\tconst key = `${endpoint}_max_window_bits`;\n\t\t\t\tconst windowBits = typeof this.params[key] !== \"number\" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];\n\t\t\t\tthis._deflate = zlib.createDeflateRaw({\n\t\t\t\t\t...this._options.zlibDeflateOptions,\n\t\t\t\t\twindowBits\n\t\t\t\t});\n\t\t\t\tthis._deflate[kTotalLength] = 0;\n\t\t\t\tthis._deflate[kBuffers] = [];\n\t\t\t\tthis._deflate.on(\"data\", deflateOnData);\n\t\t\t}\n\t\t\tthis._deflate[kCallback] = callback;\n\t\t\tthis._deflate.write(data);\n\t\t\tthis._deflate.flush(zlib.Z_SYNC_FLUSH, () => {\n\t\t\t\tif (!this._deflate) return;\n\t\t\t\tlet data = bufferUtil.concat(this._deflate[kBuffers], this._deflate[kTotalLength]);\n\t\t\t\tif (fin) data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4);\n\t\t\t\tthis._deflate[kCallback] = null;\n\t\t\t\tthis._deflate[kTotalLength] = 0;\n\t\t\t\tthis._deflate[kBuffers] = [];\n\t\t\t\tif (fin && this.params[`${endpoint}_no_context_takeover`]) this._deflate.reset();\n\t\t\t\tcallback(null, data);\n\t\t\t});\n\t\t}\n\t};\n\tmodule.exports = PerMessageDeflate;\n\t/**\n\t* The listener of the `zlib.DeflateRaw` stream `'data'` event.\n\t*\n\t* @param {Buffer} chunk A chunk of data\n\t* @private\n\t*/\n\tfunction deflateOnData(chunk) {\n\t\tthis[kBuffers].push(chunk);\n\t\tthis[kTotalLength] += chunk.length;\n\t}\n\t/**\n\t* The listener of the `zlib.InflateRaw` stream `'data'` event.\n\t*\n\t* @param {Buffer} chunk A chunk of data\n\t* @private\n\t*/\n\tfunction inflateOnData(chunk) {\n\t\tthis[kTotalLength] += chunk.length;\n\t\tif (this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload) {\n\t\t\tthis[kBuffers].push(chunk);\n\t\t\treturn;\n\t\t}\n\t\tthis[kError] = /* @__PURE__ */ new RangeError(\"Max payload size exceeded\");\n\t\tthis[kError].code = \"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH\";\n\t\tthis[kError][kStatusCode] = 1009;\n\t\tthis.removeListener(\"data\", inflateOnData);\n\t\tthis.reset();\n\t}\n\t/**\n\t* The listener of the `zlib.InflateRaw` stream `'error'` event.\n\t*\n\t* @param {Error} err The emitted error\n\t* @private\n\t*/\n\tfunction inflateOnError(err) {\n\t\tthis[kPerMessageDeflate]._inflate = null;\n\t\tif (this[kError]) {\n\t\t\tthis[kCallback](this[kError]);\n\t\t\treturn;\n\t\t}\n\t\terr[kStatusCode] = 1007;\n\t\tthis[kCallback](err);\n\t}\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/validation.js\nvar require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { isUtf8 } = __require(\"buffer\");\n\tconst { hasBlob } = require_constants();\n\tconst tokenChars = [\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t1,\n\t\t0,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t0,\n\t\t0,\n\t\t1,\n\t\t1,\n\t\t0,\n\t\t1,\n\t\t1,\n\t\t0,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t1,\n\t\t0,\n\t\t1,\n\t\t0,\n\t\t1,\n\t\t0\n\t];\n\t/**\n\t* Checks if a status code is allowed in a close frame.\n\t*\n\t* @param {Number} code The status code\n\t* @return {Boolean} `true` if the status code is valid, else `false`\n\t* @public\n\t*/\n\tfunction isValidStatusCode(code) {\n\t\treturn code >= 1e3 && code <= 1014 && code !== 1004 && code !== 1005 && code !== 1006 || code >= 3e3 && code <= 4999;\n\t}\n\t/**\n\t* Checks if a given buffer contains only correct UTF-8.\n\t* Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by\n\t* Markus Kuhn.\n\t*\n\t* @param {Buffer} buf The buffer to check\n\t* @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false`\n\t* @public\n\t*/\n\tfunction _isValidUTF8(buf) {\n\t\tconst len = buf.length;\n\t\tlet i = 0;\n\t\twhile (i < len) if ((buf[i] & 128) === 0) i++;\n\t\telse if ((buf[i] & 224) === 192) {\n\t\t\tif (i + 1 === len || (buf[i + 1] & 192) !== 128 || (buf[i] & 254) === 192) return false;\n\t\t\ti += 2;\n\t\t} else if ((buf[i] & 240) === 224) {\n\t\t\tif (i + 2 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || buf[i] === 224 && (buf[i + 1] & 224) === 128 || buf[i] === 237 && (buf[i + 1] & 224) === 160) return false;\n\t\t\ti += 3;\n\t\t} else if ((buf[i] & 248) === 240) {\n\t\t\tif (i + 3 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || (buf[i + 3] & 192) !== 128 || buf[i] === 240 && (buf[i + 1] & 240) === 128 || buf[i] === 244 && buf[i + 1] > 143 || buf[i] > 244) return false;\n\t\t\ti += 4;\n\t\t} else return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Determines whether a value is a `Blob`.\n\t*\n\t* @param {*} value The value to be tested\n\t* @return {Boolean} `true` if `value` is a `Blob`, else `false`\n\t* @private\n\t*/\n\tfunction isBlob(value) {\n\t\treturn hasBlob && typeof value === \"object\" && typeof value.arrayBuffer === \"function\" && typeof value.type === \"string\" && typeof value.stream === \"function\" && (value[Symbol.toStringTag] === \"Blob\" || value[Symbol.toStringTag] === \"File\");\n\t}\n\tmodule.exports = {\n\t\tisBlob,\n\t\tisValidStatusCode,\n\t\tisValidUTF8: _isValidUTF8,\n\t\ttokenChars\n\t};\n\tif (isUtf8) module.exports.isValidUTF8 = function(buf) {\n\t\treturn buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);\n\t};\n\telse if (!process.env.WS_NO_UTF_8_VALIDATE) try {\n\t\tconst isValidUTF8 = __require(\"utf-8-validate\");\n\t\tmodule.exports.isValidUTF8 = function(buf) {\n\t\t\treturn buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);\n\t\t};\n\t} catch (e) {}\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/receiver.js\nvar require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { Writable } = __require(\"stream\");\n\tconst PerMessageDeflate = require_permessage_deflate();\n\tconst { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } = require_constants();\n\tconst { concat, toArrayBuffer, unmask } = require_buffer_util();\n\tconst { isValidStatusCode, isValidUTF8 } = require_validation();\n\tconst FastBuffer = Buffer[Symbol.species];\n\tconst GET_INFO = 0;\n\tconst GET_PAYLOAD_LENGTH_16 = 1;\n\tconst GET_PAYLOAD_LENGTH_64 = 2;\n\tconst GET_MASK = 3;\n\tconst GET_DATA = 4;\n\tconst INFLATING = 5;\n\tconst DEFER_EVENT = 6;\n\t/**\n\t* HyBi Receiver implementation.\n\t*\n\t* @extends Writable\n\t*/\n\tvar Receiver = class extends Writable {\n\t\t/**\n\t\t* Creates a Receiver instance.\n\t\t*\n\t\t* @param {Object} [options] Options object\n\t\t* @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether\n\t\t* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted\n\t\t* multiple times in the same tick\n\t\t* @param {String} [options.binaryType=nodebuffer] The type for binary data\n\t\t* @param {Object} [options.extensions] An object containing the negotiated\n\t\t* extensions\n\t\t* @param {Boolean} [options.isServer=false] Specifies whether to operate in\n\t\t* client or server mode\n\t\t* @param {Number} [options.maxPayload=0] The maximum allowed message length\n\t\t* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or\n\t\t* not to skip UTF-8 validation for text and close messages\n\t\t*/\n\t\tconstructor(options = {}) {\n\t\t\tsuper();\n\t\t\tthis._allowSynchronousEvents = options.allowSynchronousEvents !== void 0 ? options.allowSynchronousEvents : true;\n\t\t\tthis._binaryType = options.binaryType || BINARY_TYPES[0];\n\t\t\tthis._extensions = options.extensions || {};\n\t\t\tthis._isServer = !!options.isServer;\n\t\t\tthis._maxPayload = options.maxPayload | 0;\n\t\t\tthis._skipUTF8Validation = !!options.skipUTF8Validation;\n\t\t\tthis[kWebSocket] = void 0;\n\t\t\tthis._bufferedBytes = 0;\n\t\t\tthis._buffers = [];\n\t\t\tthis._compressed = false;\n\t\t\tthis._payloadLength = 0;\n\t\t\tthis._mask = void 0;\n\t\t\tthis._fragmented = 0;\n\t\t\tthis._masked = false;\n\t\t\tthis._fin = false;\n\t\t\tthis._opcode = 0;\n\t\t\tthis._totalPayloadLength = 0;\n\t\t\tthis._messageLength = 0;\n\t\t\tthis._fragments = [];\n\t\t\tthis._errored = false;\n\t\t\tthis._loop = false;\n\t\t\tthis._state = GET_INFO;\n\t\t}\n\t\t/**\n\t\t* Implements `Writable.prototype._write()`.\n\t\t*\n\t\t* @param {Buffer} chunk The chunk of data to write\n\t\t* @param {String} encoding The character encoding of `chunk`\n\t\t* @param {Function} cb Callback\n\t\t* @private\n\t\t*/\n\t\t_write(chunk, encoding, cb) {\n\t\t\tif (this._opcode === 8 && this._state == GET_INFO) return cb();\n\t\t\tthis._bufferedBytes += chunk.length;\n\t\t\tthis._buffers.push(chunk);\n\t\t\tthis.startLoop(cb);\n\t\t}\n\t\t/**\n\t\t* Consumes `n` bytes from the buffered data.\n\t\t*\n\t\t* @param {Number} n The number of bytes to consume\n\t\t* @return {Buffer} The consumed bytes\n\t\t* @private\n\t\t*/\n\t\tconsume(n) {\n\t\t\tthis._bufferedBytes -= n;\n\t\t\tif (n === this._buffers[0].length) return this._buffers.shift();\n\t\t\tif (n < this._buffers[0].length) {\n\t\t\t\tconst buf = this._buffers[0];\n\t\t\t\tthis._buffers[0] = new FastBuffer(buf.buffer, buf.byteOffset + n, buf.length - n);\n\t\t\t\treturn new FastBuffer(buf.buffer, buf.byteOffset, n);\n\t\t\t}\n\t\t\tconst dst = Buffer.allocUnsafe(n);\n\t\t\tdo {\n\t\t\t\tconst buf = this._buffers[0];\n\t\t\t\tconst offset = dst.length - n;\n\t\t\t\tif (n >= buf.length) dst.set(this._buffers.shift(), offset);\n\t\t\t\telse {\n\t\t\t\t\tdst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);\n\t\t\t\t\tthis._buffers[0] = new FastBuffer(buf.buffer, buf.byteOffset + n, buf.length - n);\n\t\t\t\t}\n\t\t\t\tn -= buf.length;\n\t\t\t} while (n > 0);\n\t\t\treturn dst;\n\t\t}\n\t\t/**\n\t\t* Starts the parsing loop.\n\t\t*\n\t\t* @param {Function} cb Callback\n\t\t* @private\n\t\t*/\n\t\tstartLoop(cb) {\n\t\t\tthis._loop = true;\n\t\t\tdo\n\t\t\t\tswitch (this._state) {\n\t\t\t\t\tcase GET_INFO:\n\t\t\t\t\t\tthis.getInfo(cb);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GET_PAYLOAD_LENGTH_16:\n\t\t\t\t\t\tthis.getPayloadLength16(cb);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GET_PAYLOAD_LENGTH_64:\n\t\t\t\t\t\tthis.getPayloadLength64(cb);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GET_MASK:\n\t\t\t\t\t\tthis.getMask();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GET_DATA:\n\t\t\t\t\t\tthis.getData(cb);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase INFLATING:\n\t\t\t\t\tcase DEFER_EVENT:\n\t\t\t\t\t\tthis._loop = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\twhile (this._loop);\n\t\t\tif (!this._errored) cb();\n\t\t}\n\t\t/**\n\t\t* Reads the first two bytes of a frame.\n\t\t*\n\t\t* @param {Function} cb Callback\n\t\t* @private\n\t\t*/\n\t\tgetInfo(cb) {\n\t\t\tif (this._bufferedBytes < 2) {\n\t\t\t\tthis._loop = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst buf = this.consume(2);\n\t\t\tif ((buf[0] & 48) !== 0) {\n\t\t\t\tcb(this.createError(RangeError, \"RSV2 and RSV3 must be clear\", true, 1002, \"WS_ERR_UNEXPECTED_RSV_2_3\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst compressed = (buf[0] & 64) === 64;\n\t\t\tif (compressed && !this._extensions[PerMessageDeflate.extensionName]) {\n\t\t\t\tcb(this.createError(RangeError, \"RSV1 must be clear\", true, 1002, \"WS_ERR_UNEXPECTED_RSV_1\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._fin = (buf[0] & 128) === 128;\n\t\t\tthis._opcode = buf[0] & 15;\n\t\t\tthis._payloadLength = buf[1] & 127;\n\t\t\tif (this._opcode === 0) {\n\t\t\t\tif (compressed) {\n\t\t\t\t\tcb(this.createError(RangeError, \"RSV1 must be clear\", true, 1002, \"WS_ERR_UNEXPECTED_RSV_1\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!this._fragmented) {\n\t\t\t\t\tcb(this.createError(RangeError, \"invalid opcode 0\", true, 1002, \"WS_ERR_INVALID_OPCODE\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._opcode = this._fragmented;\n\t\t\t} else if (this._opcode === 1 || this._opcode === 2) {\n\t\t\t\tif (this._fragmented) {\n\t\t\t\t\tcb(this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, \"WS_ERR_INVALID_OPCODE\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._compressed = compressed;\n\t\t\t} else if (this._opcode > 7 && this._opcode < 11) {\n\t\t\t\tif (!this._fin) {\n\t\t\t\t\tcb(this.createError(RangeError, \"FIN must be set\", true, 1002, \"WS_ERR_EXPECTED_FIN\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (compressed) {\n\t\t\t\t\tcb(this.createError(RangeError, \"RSV1 must be clear\", true, 1002, \"WS_ERR_UNEXPECTED_RSV_1\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (this._payloadLength > 125 || this._opcode === 8 && this._payloadLength === 1) {\n\t\t\t\t\tcb(this.createError(RangeError, `invalid payload length ${this._payloadLength}`, true, 1002, \"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcb(this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, \"WS_ERR_INVALID_OPCODE\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._fin && !this._fragmented) this._fragmented = this._opcode;\n\t\t\tthis._masked = (buf[1] & 128) === 128;\n\t\t\tif (this._isServer) {\n\t\t\t\tif (!this._masked) {\n\t\t\t\t\tcb(this.createError(RangeError, \"MASK must be set\", true, 1002, \"WS_ERR_EXPECTED_MASK\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else if (this._masked) {\n\t\t\t\tcb(this.createError(RangeError, \"MASK must be clear\", true, 1002, \"WS_ERR_UNEXPECTED_MASK\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;\n\t\t\telse if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;\n\t\t\telse this.haveLength(cb);\n\t\t}\n\t\t/**\n\t\t* Gets extended payload length (7+16).\n\t\t*\n\t\t* @param {Function} cb Callback\n\t\t* @private\n\t\t*/\n\t\tgetPayloadLength16(cb) {\n\t\t\tif (this._bufferedBytes < 2) {\n\t\t\t\tthis._loop = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._payloadLength = this.consume(2).readUInt16BE(0);\n\t\t\tthis.haveLength(cb);\n\t\t}\n\t\t/**\n\t\t* Gets extended payload length (7+64).\n\t\t*\n\t\t* @param {Function} cb Callback\n\t\t* @private\n\t\t*/\n\t\tgetPayloadLength64(cb) {\n\t\t\tif (this._bufferedBytes < 8) {\n\t\t\t\tthis._loop = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst buf = this.consume(8);\n\t\t\tconst num = buf.readUInt32BE(0);\n\t\t\tif (num > Math.pow(2, 21) - 1) {\n\t\t\t\tcb(this.createError(RangeError, \"Unsupported WebSocket frame: payload length > 2^53 - 1\", false, 1009, \"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);\n\t\t\tthis.haveLength(cb);\n\t\t}\n\t\t/**\n\t\t* Payload length has been read.\n\t\t*\n\t\t* @param {Function} cb Callback\n\t\t* @private\n\t\t*/\n\t\thaveLength(cb) {\n\t\t\tif (this._payloadLength && this._opcode < 8) {\n\t\t\t\tthis._totalPayloadLength += this._payloadLength;\n\t\t\t\tif (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {\n\t\t\t\t\tcb(this.createError(RangeError, \"Max payload size exceeded\", false, 1009, \"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this._masked) this._state = GET_MASK;\n\t\t\telse this._state = GET_DATA;\n\t\t}\n\t\t/**\n\t\t* Reads mask bytes.\n\t\t*\n\t\t* @private\n\t\t*/\n\t\tgetMask() {\n\t\t\tif (this._bufferedBytes < 4) {\n\t\t\t\tthis._loop = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._mask = this.consume(4);\n\t\t\tthis._state = GET_DATA;\n\t\t}\n\t\t/**\n\t\t* Reads data bytes.\n\t\t*\n\t\t* @param {Function} cb Callback\n\t\t* @private\n\t\t*/\n\t\tgetData(cb) {\n\t\t\tlet data = EMPTY_BUFFER;\n\t\t\tif (this._payloadLength) {\n\t\t\t\tif (this._bufferedBytes < this._payloadLength) {\n\t\t\t\t\tthis._loop = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdata = this.consume(this._payloadLength);\n\t\t\t\tif (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) unmask(data, this._mask);\n\t\t\t}\n\t\t\tif (this._opcode > 7) {\n\t\t\t\tthis.controlMessage(data, cb);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._compressed) {\n\t\t\t\tthis._state = INFLATING;\n\t\t\t\tthis.decompress(data, cb);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (data.length) {\n\t\t\t\tthis._messageLength = this._totalPayloadLength;\n\t\t\t\tthis._fragments.push(data);\n\t\t\t}\n\t\t\tthis.dataMessage(cb);\n\t\t}\n\t\t/**\n\t\t* Decompresses data.\n\t\t*\n\t\t* @param {Buffer} data Compressed data\n\t\t* @param {Function} cb Callback\n\t\t* @private\n\t\t*/\n\t\tdecompress(data, cb) {\n\t\t\tthis._extensions[PerMessageDeflate.extensionName].decompress(data, this._fin, (err, buf) => {\n\t\t\t\tif (err) return cb(err);\n\t\t\t\tif (buf.length) {\n\t\t\t\t\tthis._messageLength += buf.length;\n\t\t\t\t\tif (this._messageLength > this._maxPayload && this._maxPayload > 0) {\n\t\t\t\t\t\tcb(this.createError(RangeError, \"Max payload size exceeded\", false, 1009, \"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH\"));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._fragments.push(buf);\n\t\t\t\t}\n\t\t\t\tthis.dataMessage(cb);\n\t\t\t\tif (this._state === GET_INFO) this.startLoop(cb);\n\t\t\t});\n\t\t}\n\t\t/**\n\t\t* Handles a data message.\n\t\t*\n\t\t* @param {Function} cb Callback\n\t\t* @private\n\t\t*/\n\t\tdataMessage(cb) {\n\t\t\tif (!this._fin) {\n\t\t\t\tthis._state = GET_INFO;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst messageLength = this._messageLength;\n\t\t\tconst fragments = this._fragments;\n\t\t\tthis._totalPayloadLength = 0;\n\t\t\tthis._messageLength = 0;\n\t\t\tthis._fragmented = 0;\n\t\t\tthis._fragments = [];\n\t\t\tif (this._opcode === 2) {\n\t\t\t\tlet data;\n\t\t\t\tif (this._binaryType === \"nodebuffer\") data = concat(fragments, messageLength);\n\t\t\t\telse if (this._binaryType === \"arraybuffer\") data = toArrayBuffer(concat(fragments, messageLength));\n\t\t\t\telse if (this._binaryType === \"blob\") data = new Blob(fragments);\n\t\t\t\telse data = fragments;\n\t\t\t\tif (this._allowSynchronousEvents) {\n\t\t\t\t\tthis.emit(\"message\", data, true);\n\t\t\t\t\tthis._state = GET_INFO;\n\t\t\t\t} else {\n\t\t\t\t\tthis._state = DEFER_EVENT;\n\t\t\t\t\tsetImmediate(() => {\n\t\t\t\t\t\tthis.emit(\"message\", data, true);\n\t\t\t\t\t\tthis._state = GET_INFO;\n\t\t\t\t\t\tthis.startLoop(cb);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst buf = concat(fragments, messageLength);\n\t\t\t\tif (!this._skipUTF8Validation && !isValidUTF8(buf)) {\n\t\t\t\t\tcb(this.createError(Error, \"invalid UTF-8 sequence\", true, 1007, \"WS_ERR_INVALID_UTF8\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (this._state === INFLATING || this._allowSynchronousEvents) {\n\t\t\t\t\tthis.emit(\"message\", buf, false);\n\t\t\t\t\tthis._state = GET_INFO;\n\t\t\t\t} else {\n\t\t\t\t\tthis._state = DEFER_EVENT;\n\t\t\t\t\tsetImmediate(() => {\n\t\t\t\t\t\tthis.emit(\"message\", buf, false);\n\t\t\t\t\t\tthis._state = GET_INFO;\n\t\t\t\t\t\tthis.startLoop(cb);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* Handles a control message.\n\t\t*\n\t\t* @param {Buffer} data Data to handle\n\t\t* @return {(Error|RangeError|undefined)} A possible error\n\t\t* @private\n\t\t*/\n\t\tcontrolMessage(data, cb) {\n\t\t\tif (this._opcode === 8) {\n\t\t\t\tif (data.length === 0) {\n\t\t\t\t\tthis._loop = false;\n\t\t\t\t\tthis.emit(\"conclude\", 1005, EMPTY_BUFFER);\n\t\t\t\t\tthis.end();\n\t\t\t\t} else {\n\t\t\t\t\tconst code = data.readUInt16BE(0);\n\t\t\t\t\tif (!isValidStatusCode(code)) {\n\t\t\t\t\t\tcb(this.createError(RangeError, `invalid status code ${code}`, true, 1002, \"WS_ERR_INVALID_CLOSE_CODE\"));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst buf = new FastBuffer(data.buffer, data.byteOffset + 2, data.length - 2);\n\t\t\t\t\tif (!this._skipUTF8Validation && !isValidUTF8(buf)) {\n\t\t\t\t\t\tcb(this.createError(Error, \"invalid UTF-8 sequence\", true, 1007, \"WS_ERR_INVALID_UTF8\"));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._loop = false;\n\t\t\t\t\tthis.emit(\"conclude\", code, buf);\n\t\t\t\t\tthis.end();\n\t\t\t\t}\n\t\t\t\tthis._state = GET_INFO;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._allowSynchronousEvents) {\n\t\t\t\tthis.emit(this._opcode === 9 ? \"ping\" : \"pong\", data);\n\t\t\t\tthis._state = GET_INFO;\n\t\t\t} else {\n\t\t\t\tthis._state = DEFER_EVENT;\n\t\t\t\tsetImmediate(() => {\n\t\t\t\t\tthis.emit(this._opcode === 9 ? \"ping\" : \"pong\", data);\n\t\t\t\t\tthis._state = GET_INFO;\n\t\t\t\t\tthis.startLoop(cb);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* Builds an error object.\n\t\t*\n\t\t* @param {function(new:Error|RangeError)} ErrorCtor The error constructor\n\t\t* @param {String} message The error message\n\t\t* @param {Boolean} prefix Specifies whether or not to add a default prefix to\n\t\t* `message`\n\t\t* @param {Number} statusCode The status code\n\t\t* @param {String} errorCode The exposed error code\n\t\t* @return {(Error|RangeError)} The error\n\t\t* @private\n\t\t*/\n\t\tcreateError(ErrorCtor, message, prefix, statusCode, errorCode) {\n\t\t\tthis._loop = false;\n\t\t\tthis._errored = true;\n\t\t\tconst err = new ErrorCtor(prefix ? `Invalid WebSocket frame: ${message}` : message);\n\t\t\tError.captureStackTrace(err, this.createError);\n\t\t\terr.code = errorCode;\n\t\t\terr[kStatusCode] = statusCode;\n\t\t\treturn err;\n\t\t}\n\t};\n\tmodule.exports = Receiver;\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/sender.js\nvar require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { Duplex: Duplex$3 } = __require(\"stream\");\n\tconst { randomFillSync } = __require(\"crypto\");\n\tconst PerMessageDeflate = require_permessage_deflate();\n\tconst { EMPTY_BUFFER, kWebSocket, NOOP } = require_constants();\n\tconst { isBlob, isValidStatusCode } = require_validation();\n\tconst { mask: applyMask, toBuffer } = require_buffer_util();\n\tconst kByteLength = Symbol(\"kByteLength\");\n\tconst maskBuffer = Buffer.alloc(4);\n\tconst RANDOM_POOL_SIZE = 8 * 1024;\n\tlet randomPool;\n\tlet randomPoolPointer = RANDOM_POOL_SIZE;\n\tconst DEFAULT = 0;\n\tconst DEFLATING = 1;\n\tconst GET_BLOB_DATA = 2;\n\t/**\n\t* HyBi Sender implementation.\n\t*/\n\tvar Sender = class Sender {\n\t\t/**\n\t\t* Creates a Sender instance.\n\t\t*\n\t\t* @param {Duplex} socket The connection socket\n\t\t* @param {Object} [extensions] An object containing the negotiated extensions\n\t\t* @param {Function} [generateMask] The function used to generate the masking\n\t\t* key\n\t\t*/\n\t\tconstructor(socket, extensions, generateMask) {\n\t\t\tthis._extensions = extensions || {};\n\t\t\tif (generateMask) {\n\t\t\t\tthis._generateMask = generateMask;\n\t\t\t\tthis._maskBuffer = Buffer.alloc(4);\n\t\t\t}\n\t\t\tthis._socket = socket;\n\t\t\tthis._firstFragment = true;\n\t\t\tthis._compress = false;\n\t\t\tthis._bufferedBytes = 0;\n\t\t\tthis._queue = [];\n\t\t\tthis._state = DEFAULT;\n\t\t\tthis.onerror = NOOP;\n\t\t\tthis[kWebSocket] = void 0;\n\t\t}\n\t\t/**\n\t\t* Frames a piece of data according to the HyBi WebSocket protocol.\n\t\t*\n\t\t* @param {(Buffer|String)} data The data to frame\n\t\t* @param {Object} options Options object\n\t\t* @param {Boolean} [options.fin=false] Specifies whether or not to set the\n\t\t* FIN bit\n\t\t* @param {Function} [options.generateMask] The function used to generate the\n\t\t* masking key\n\t\t* @param {Boolean} [options.mask=false] Specifies whether or not to mask\n\t\t* `data`\n\t\t* @param {Buffer} [options.maskBuffer] The buffer used to store the masking\n\t\t* key\n\t\t* @param {Number} options.opcode The opcode\n\t\t* @param {Boolean} [options.readOnly=false] Specifies whether `data` can be\n\t\t* modified\n\t\t* @param {Boolean} [options.rsv1=false] Specifies whether or not to set the\n\t\t* RSV1 bit\n\t\t* @return {(Buffer|String)[]} The framed data\n\t\t* @public\n\t\t*/\n\t\tstatic frame(data, options) {\n\t\t\tlet mask;\n\t\t\tlet merge = false;\n\t\t\tlet offset = 2;\n\t\t\tlet skipMasking = false;\n\t\t\tif (options.mask) {\n\t\t\t\tmask = options.maskBuffer || maskBuffer;\n\t\t\t\tif (options.generateMask) options.generateMask(mask);\n\t\t\t\telse {\n\t\t\t\t\tif (randomPoolPointer === RANDOM_POOL_SIZE) {\n\t\t\t\t\t\t/* istanbul ignore else */\n\t\t\t\t\t\tif (randomPool === void 0) randomPool = Buffer.alloc(RANDOM_POOL_SIZE);\n\t\t\t\t\t\trandomFillSync(randomPool, 0, RANDOM_POOL_SIZE);\n\t\t\t\t\t\trandomPoolPointer = 0;\n\t\t\t\t\t}\n\t\t\t\t\tmask[0] = randomPool[randomPoolPointer++];\n\t\t\t\t\tmask[1] = randomPool[randomPoolPointer++];\n\t\t\t\t\tmask[2] = randomPool[randomPoolPointer++];\n\t\t\t\t\tmask[3] = randomPool[randomPoolPointer++];\n\t\t\t\t}\n\t\t\t\tskipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0;\n\t\t\t\toffset = 6;\n\t\t\t}\n\t\t\tlet dataLength;\n\t\t\tif (typeof data === \"string\") if ((!options.mask || skipMasking) && options[kByteLength] !== void 0) dataLength = options[kByteLength];\n\t\t\telse {\n\t\t\t\tdata = Buffer.from(data);\n\t\t\t\tdataLength = data.length;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdataLength = data.length;\n\t\t\t\tmerge = options.mask && options.readOnly && !skipMasking;\n\t\t\t}\n\t\t\tlet payloadLength = dataLength;\n\t\t\tif (dataLength >= 65536) {\n\t\t\t\toffset += 8;\n\t\t\t\tpayloadLength = 127;\n\t\t\t} else if (dataLength > 125) {\n\t\t\t\toffset += 2;\n\t\t\t\tpayloadLength = 126;\n\t\t\t}\n\t\t\tconst target = Buffer.allocUnsafe(merge ? dataLength + offset : offset);\n\t\t\ttarget[0] = options.fin ? options.opcode | 128 : options.opcode;\n\t\t\tif (options.rsv1) target[0] |= 64;\n\t\t\ttarget[1] = payloadLength;\n\t\t\tif (payloadLength === 126) target.writeUInt16BE(dataLength, 2);\n\t\t\telse if (payloadLength === 127) {\n\t\t\t\ttarget[2] = target[3] = 0;\n\t\t\t\ttarget.writeUIntBE(dataLength, 4, 6);\n\t\t\t}\n\t\t\tif (!options.mask) return [target, data];\n\t\t\ttarget[1] |= 128;\n\t\t\ttarget[offset - 4] = mask[0];\n\t\t\ttarget[offset - 3] = mask[1];\n\t\t\ttarget[offset - 2] = mask[2];\n\t\t\ttarget[offset - 1] = mask[3];\n\t\t\tif (skipMasking) return [target, data];\n\t\t\tif (merge) {\n\t\t\t\tapplyMask(data, mask, target, offset, dataLength);\n\t\t\t\treturn [target];\n\t\t\t}\n\t\t\tapplyMask(data, mask, data, 0, dataLength);\n\t\t\treturn [target, data];\n\t\t}\n\t\t/**\n\t\t* Sends a close message to the other peer.\n\t\t*\n\t\t* @param {Number} [code] The status code component of the body\n\t\t* @param {(String|Buffer)} [data] The message component of the body\n\t\t* @param {Boolean} [mask=false] Specifies whether or not to mask the message\n\t\t* @param {Function} [cb] Callback\n\t\t* @public\n\t\t*/\n\t\tclose(code, data, mask, cb) {\n\t\t\tlet buf;\n\t\t\tif (code === void 0) buf = EMPTY_BUFFER;\n\t\t\telse if (typeof code !== \"number\" || !isValidStatusCode(code)) throw new TypeError(\"First argument must be a valid error code number\");\n\t\t\telse if (data === void 0 || !data.length) {\n\t\t\t\tbuf = Buffer.allocUnsafe(2);\n\t\t\t\tbuf.writeUInt16BE(code, 0);\n\t\t\t} else {\n\t\t\t\tconst length = Buffer.byteLength(data);\n\t\t\t\tif (length > 123) throw new RangeError(\"The message must not be greater than 123 bytes\");\n\t\t\t\tbuf = Buffer.allocUnsafe(2 + length);\n\t\t\t\tbuf.writeUInt16BE(code, 0);\n\t\t\t\tif (typeof data === \"string\") buf.write(data, 2);\n\t\t\t\telse buf.set(data, 2);\n\t\t\t}\n\t\t\tconst options = {\n\t\t\t\t[kByteLength]: buf.length,\n\t\t\t\tfin: true,\n\t\t\t\tgenerateMask: this._generateMask,\n\t\t\t\tmask,\n\t\t\t\tmaskBuffer: this._maskBuffer,\n\t\t\t\topcode: 8,\n\t\t\t\treadOnly: false,\n\t\t\t\trsv1: false\n\t\t\t};\n\t\t\tif (this._state !== DEFAULT) this.enqueue([\n\t\t\t\tthis.dispatch,\n\t\t\t\tbuf,\n\t\t\t\tfalse,\n\t\t\t\toptions,\n\t\t\t\tcb\n\t\t\t]);\n\t\t\telse this.sendFrame(Sender.frame(buf, options), cb);\n\t\t}\n\t\t/**\n\t\t* Sends a ping message to the other peer.\n\t\t*\n\t\t* @param {*} data The message to send\n\t\t* @param {Boolean} [mask=false] Specifies whether or not to mask `data`\n\t\t* @param {Function} [cb] Callback\n\t\t* @public\n\t\t*/\n\t\tping(data, mask, cb) {\n\t\t\tlet byteLength;\n\t\t\tlet readOnly;\n\t\t\tif (typeof data === \"string\") {\n\t\t\t\tbyteLength = Buffer.byteLength(data);\n\t\t\t\treadOnly = false;\n\t\t\t} else if (isBlob(data)) {\n\t\t\t\tbyteLength = data.size;\n\t\t\t\treadOnly = false;\n\t\t\t} else {\n\t\t\t\tdata = toBuffer(data);\n\t\t\t\tbyteLength = data.length;\n\t\t\t\treadOnly = toBuffer.readOnly;\n\t\t\t}\n\t\t\tif (byteLength > 125) throw new RangeError(\"The data size must not be greater than 125 bytes\");\n\t\t\tconst options = {\n\t\t\t\t[kByteLength]: byteLength,\n\t\t\t\tfin: true,\n\t\t\t\tgenerateMask: this._generateMask,\n\t\t\t\tmask,\n\t\t\t\tmaskBuffer: this._maskBuffer,\n\t\t\t\topcode: 9,\n\t\t\t\treadOnly,\n\t\t\t\trsv1: false\n\t\t\t};\n\t\t\tif (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([\n\t\t\t\tthis.getBlobData,\n\t\t\t\tdata,\n\t\t\t\tfalse,\n\t\t\t\toptions,\n\t\t\t\tcb\n\t\t\t]);\n\t\t\telse this.getBlobData(data, false, options, cb);\n\t\t\telse if (this._state !== DEFAULT) this.enqueue([\n\t\t\t\tthis.dispatch,\n\t\t\t\tdata,\n\t\t\t\tfalse,\n\t\t\t\toptions,\n\t\t\t\tcb\n\t\t\t]);\n\t\t\telse this.sendFrame(Sender.frame(data, options), cb);\n\t\t}\n\t\t/**\n\t\t* Sends a pong message to the other peer.\n\t\t*\n\t\t* @param {*} data The message to send\n\t\t* @param {Boolean} [mask=false] Specifies whether or not to mask `data`\n\t\t* @param {Function} [cb] Callback\n\t\t* @public\n\t\t*/\n\t\tpong(data, mask, cb) {\n\t\t\tlet byteLength;\n\t\t\tlet readOnly;\n\t\t\tif (typeof data === \"string\") {\n\t\t\t\tbyteLength = Buffer.byteLength(data);\n\t\t\t\treadOnly = false;\n\t\t\t} else if (isBlob(data)) {\n\t\t\t\tbyteLength = data.size;\n\t\t\t\treadOnly = false;\n\t\t\t} else {\n\t\t\t\tdata = toBuffer(data);\n\t\t\t\tbyteLength = data.length;\n\t\t\t\treadOnly = toBuffer.readOnly;\n\t\t\t}\n\t\t\tif (byteLength > 125) throw new RangeError(\"The data size must not be greater than 125 bytes\");\n\t\t\tconst options = {\n\t\t\t\t[kByteLength]: byteLength,\n\t\t\t\tfin: true,\n\t\t\t\tgenerateMask: this._generateMask,\n\t\t\t\tmask,\n\t\t\t\tmaskBuffer: this._maskBuffer,\n\t\t\t\topcode: 10,\n\t\t\t\treadOnly,\n\t\t\t\trsv1: false\n\t\t\t};\n\t\t\tif (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([\n\t\t\t\tthis.getBlobData,\n\t\t\t\tdata,\n\t\t\t\tfalse,\n\t\t\t\toptions,\n\t\t\t\tcb\n\t\t\t]);\n\t\t\telse this.getBlobData(data, false, options, cb);\n\t\t\telse if (this._state !== DEFAULT) this.enqueue([\n\t\t\t\tthis.dispatch,\n\t\t\t\tdata,\n\t\t\t\tfalse,\n\t\t\t\toptions,\n\t\t\t\tcb\n\t\t\t]);\n\t\t\telse this.sendFrame(Sender.frame(data, options), cb);\n\t\t}\n\t\t/**\n\t\t* Sends a data message to the other peer.\n\t\t*\n\t\t* @param {*} data The message to send\n\t\t* @param {Object} options Options object\n\t\t* @param {Boolean} [options.binary=false] Specifies whether `data` is binary\n\t\t* or text\n\t\t* @param {Boolean} [options.compress=false] Specifies whether or not to\n\t\t* compress `data`\n\t\t* @param {Boolean} [options.fin=false] Specifies whether the fragment is the\n\t\t* last one\n\t\t* @param {Boolean} [options.mask=false] Specifies whether or not to mask\n\t\t* `data`\n\t\t* @param {Function} [cb] Callback\n\t\t* @public\n\t\t*/\n\t\tsend(data, options, cb) {\n\t\t\tconst perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];\n\t\t\tlet opcode = options.binary ? 2 : 1;\n\t\t\tlet rsv1 = options.compress;\n\t\t\tlet byteLength;\n\t\t\tlet readOnly;\n\t\t\tif (typeof data === \"string\") {\n\t\t\t\tbyteLength = Buffer.byteLength(data);\n\t\t\t\treadOnly = false;\n\t\t\t} else if (isBlob(data)) {\n\t\t\t\tbyteLength = data.size;\n\t\t\t\treadOnly = false;\n\t\t\t} else {\n\t\t\t\tdata = toBuffer(data);\n\t\t\t\tbyteLength = data.length;\n\t\t\t\treadOnly = toBuffer.readOnly;\n\t\t\t}\n\t\t\tif (this._firstFragment) {\n\t\t\t\tthis._firstFragment = false;\n\t\t\t\tif (rsv1 && perMessageDeflate && perMessageDeflate.params[perMessageDeflate._isServer ? \"server_no_context_takeover\" : \"client_no_context_takeover\"]) rsv1 = byteLength >= perMessageDeflate._threshold;\n\t\t\t\tthis._compress = rsv1;\n\t\t\t} else {\n\t\t\t\trsv1 = false;\n\t\t\t\topcode = 0;\n\t\t\t}\n\t\t\tif (options.fin) this._firstFragment = true;\n\t\t\tconst opts = {\n\t\t\t\t[kByteLength]: byteLength,\n\t\t\t\tfin: options.fin,\n\t\t\t\tgenerateMask: this._generateMask,\n\t\t\t\tmask: options.mask,\n\t\t\t\tmaskBuffer: this._maskBuffer,\n\t\t\t\topcode,\n\t\t\t\treadOnly,\n\t\t\t\trsv1\n\t\t\t};\n\t\t\tif (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([\n\t\t\t\tthis.getBlobData,\n\t\t\t\tdata,\n\t\t\t\tthis._compress,\n\t\t\t\topts,\n\t\t\t\tcb\n\t\t\t]);\n\t\t\telse this.getBlobData(data, this._compress, opts, cb);\n\t\t\telse if (this._state !== DEFAULT) this.enqueue([\n\t\t\t\tthis.dispatch,\n\t\t\t\tdata,\n\t\t\t\tthis._compress,\n\t\t\t\topts,\n\t\t\t\tcb\n\t\t\t]);\n\t\t\telse this.dispatch(data, this._compress, opts, cb);\n\t\t}\n\t\t/**\n\t\t* Gets the contents of a blob as binary data.\n\t\t*\n\t\t* @param {Blob} blob The blob\n\t\t* @param {Boolean} [compress=false] Specifies whether or not to compress\n\t\t* the data\n\t\t* @param {Object} options Options object\n\t\t* @param {Boolean} [options.fin=false] Specifies whether or not to set the\n\t\t* FIN bit\n\t\t* @param {Function} [options.generateMask] The function used to generate the\n\t\t* masking key\n\t\t* @param {Boolean} [options.mask=false] Specifies whether or not to mask\n\t\t* `data`\n\t\t* @param {Buffer} [options.maskBuffer] The buffer used to store the masking\n\t\t* key\n\t\t* @param {Number} options.opcode The opcode\n\t\t* @param {Boolean} [options.readOnly=false] Specifies whether `data` can be\n\t\t* modified\n\t\t* @param {Boolean} [options.rsv1=false] Specifies whether or not to set the\n\t\t* RSV1 bit\n\t\t* @param {Function} [cb] Callback\n\t\t* @private\n\t\t*/\n\t\tgetBlobData(blob, compress, options, cb) {\n\t\t\tthis._bufferedBytes += options[kByteLength];\n\t\t\tthis._state = GET_BLOB_DATA;\n\t\t\tblob.arrayBuffer().then((arrayBuffer) => {\n\t\t\t\tif (this._socket.destroyed) {\n\t\t\t\t\tconst err = /* @__PURE__ */ new Error(\"The socket was closed while the blob was being read\");\n\t\t\t\t\tprocess.nextTick(callCallbacks, this, err, cb);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._bufferedBytes -= options[kByteLength];\n\t\t\t\tconst data = toBuffer(arrayBuffer);\n\t\t\t\tif (!compress) {\n\t\t\t\t\tthis._state = DEFAULT;\n\t\t\t\t\tthis.sendFrame(Sender.frame(data, options), cb);\n\t\t\t\t\tthis.dequeue();\n\t\t\t\t} else this.dispatch(data, compress, options, cb);\n\t\t\t}).catch((err) => {\n\t\t\t\tprocess.nextTick(onError, this, err, cb);\n\t\t\t});\n\t\t}\n\t\t/**\n\t\t* Dispatches a message.\n\t\t*\n\t\t* @param {(Buffer|String)} data The message to send\n\t\t* @param {Boolean} [compress=false] Specifies whether or not to compress\n\t\t* `data`\n\t\t* @param {Object} options Options object\n\t\t* @param {Boolean} [options.fin=false] Specifies whether or not to set the\n\t\t* FIN bit\n\t\t* @param {Function} [options.generateMask] The function used to generate the\n\t\t* masking key\n\t\t* @param {Boolean} [options.mask=false] Specifies whether or not to mask\n\t\t* `data`\n\t\t* @param {Buffer} [options.maskBuffer] The buffer used to store the masking\n\t\t* key\n\t\t* @param {Number} options.opcode The opcode\n\t\t* @param {Boolean} [options.readOnly=false] Specifies whether `data` can be\n\t\t* modified\n\t\t* @param {Boolean} [options.rsv1=false] Specifies whether or not to set the\n\t\t* RSV1 bit\n\t\t* @param {Function} [cb] Callback\n\t\t* @private\n\t\t*/\n\t\tdispatch(data, compress, options, cb) {\n\t\t\tif (!compress) {\n\t\t\t\tthis.sendFrame(Sender.frame(data, options), cb);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];\n\t\t\tthis._bufferedBytes += options[kByteLength];\n\t\t\tthis._state = DEFLATING;\n\t\t\tperMessageDeflate.compress(data, options.fin, (_, buf) => {\n\t\t\t\tif (this._socket.destroyed) {\n\t\t\t\t\tcallCallbacks(this, /* @__PURE__ */ new Error(\"The socket was closed while data was being compressed\"), cb);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._bufferedBytes -= options[kByteLength];\n\t\t\t\tthis._state = DEFAULT;\n\t\t\t\toptions.readOnly = false;\n\t\t\t\tthis.sendFrame(Sender.frame(buf, options), cb);\n\t\t\t\tthis.dequeue();\n\t\t\t});\n\t\t}\n\t\t/**\n\t\t* Executes queued send operations.\n\t\t*\n\t\t* @private\n\t\t*/\n\t\tdequeue() {\n\t\t\twhile (this._state === DEFAULT && this._queue.length) {\n\t\t\t\tconst params = this._queue.shift();\n\t\t\t\tthis._bufferedBytes -= params[3][kByteLength];\n\t\t\t\tReflect.apply(params[0], this, params.slice(1));\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* Enqueues a send operation.\n\t\t*\n\t\t* @param {Array} params Send operation parameters.\n\t\t* @private\n\t\t*/\n\t\tenqueue(params) {\n\t\t\tthis._bufferedBytes += params[3][kByteLength];\n\t\t\tthis._queue.push(params);\n\t\t}\n\t\t/**\n\t\t* Sends a frame.\n\t\t*\n\t\t* @param {(Buffer | String)[]} list The frame to send\n\t\t* @param {Function} [cb] Callback\n\t\t* @private\n\t\t*/\n\t\tsendFrame(list, cb) {\n\t\t\tif (list.length === 2) {\n\t\t\t\tthis._socket.cork();\n\t\t\t\tthis._socket.write(list[0]);\n\t\t\t\tthis._socket.write(list[1], cb);\n\t\t\t\tthis._socket.uncork();\n\t\t\t} else this._socket.write(list[0], cb);\n\t\t}\n\t};\n\tmodule.exports = Sender;\n\t/**\n\t* Calls queued callbacks with an error.\n\t*\n\t* @param {Sender} sender The `Sender` instance\n\t* @param {Error} err The error to call the callbacks with\n\t* @param {Function} [cb] The first callback\n\t* @private\n\t*/\n\tfunction callCallbacks(sender, err, cb) {\n\t\tif (typeof cb === \"function\") cb(err);\n\t\tfor (let i = 0; i < sender._queue.length; i++) {\n\t\t\tconst params = sender._queue[i];\n\t\t\tconst callback = params[params.length - 1];\n\t\t\tif (typeof callback === \"function\") callback(err);\n\t\t}\n\t}\n\t/**\n\t* Handles a `Sender` error.\n\t*\n\t* @param {Sender} sender The `Sender` instance\n\t* @param {Error} err The error\n\t* @param {Function} [cb] The first pending callback\n\t* @private\n\t*/\n\tfunction onError(sender, err, cb) {\n\t\tcallCallbacks(sender, err, cb);\n\t\tsender.onerror(err);\n\t}\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/event-target.js\nvar require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { kForOnEventAttribute, kListener } = require_constants();\n\tconst kCode = Symbol(\"kCode\");\n\tconst kData = Symbol(\"kData\");\n\tconst kError = Symbol(\"kError\");\n\tconst kMessage = Symbol(\"kMessage\");\n\tconst kReason = Symbol(\"kReason\");\n\tconst kTarget = Symbol(\"kTarget\");\n\tconst kType = Symbol(\"kType\");\n\tconst kWasClean = Symbol(\"kWasClean\");\n\t/**\n\t* Class representing an event.\n\t*/\n\tvar Event = class {\n\t\t/**\n\t\t* Create a new `Event`.\n\t\t*\n\t\t* @param {String} type The name of the event\n\t\t* @throws {TypeError} If the `type` argument is not specified\n\t\t*/\n\t\tconstructor(type) {\n\t\t\tthis[kTarget] = null;\n\t\t\tthis[kType] = type;\n\t\t}\n\t\t/**\n\t\t* @type {*}\n\t\t*/\n\t\tget target() {\n\t\t\treturn this[kTarget];\n\t\t}\n\t\t/**\n\t\t* @type {String}\n\t\t*/\n\t\tget type() {\n\t\t\treturn this[kType];\n\t\t}\n\t};\n\tObject.defineProperty(Event.prototype, \"target\", { enumerable: true });\n\tObject.defineProperty(Event.prototype, \"type\", { enumerable: true });\n\t/**\n\t* Class representing a close event.\n\t*\n\t* @extends Event\n\t*/\n\tvar CloseEvent = class extends Event {\n\t\t/**\n\t\t* Create a new `CloseEvent`.\n\t\t*\n\t\t* @param {String} type The name of the event\n\t\t* @param {Object} [options] A dictionary object that allows for setting\n\t\t* attributes via object members of the same name\n\t\t* @param {Number} [options.code=0] The status code explaining why the\n\t\t* connection was closed\n\t\t* @param {String} [options.reason=''] A human-readable string explaining why\n\t\t* the connection was closed\n\t\t* @param {Boolean} [options.wasClean=false] Indicates whether or not the\n\t\t* connection was cleanly closed\n\t\t*/\n\t\tconstructor(type, options = {}) {\n\t\t\tsuper(type);\n\t\t\tthis[kCode] = options.code === void 0 ? 0 : options.code;\n\t\t\tthis[kReason] = options.reason === void 0 ? \"\" : options.reason;\n\t\t\tthis[kWasClean] = options.wasClean === void 0 ? false : options.wasClean;\n\t\t}\n\t\t/**\n\t\t* @type {Number}\n\t\t*/\n\t\tget code() {\n\t\t\treturn this[kCode];\n\t\t}\n\t\t/**\n\t\t* @type {String}\n\t\t*/\n\t\tget reason() {\n\t\t\treturn this[kReason];\n\t\t}\n\t\t/**\n\t\t* @type {Boolean}\n\t\t*/\n\t\tget wasClean() {\n\t\t\treturn this[kWasClean];\n\t\t}\n\t};\n\tObject.defineProperty(CloseEvent.prototype, \"code\", { enumerable: true });\n\tObject.defineProperty(CloseEvent.prototype, \"reason\", { enumerable: true });\n\tObject.defineProperty(CloseEvent.prototype, \"wasClean\", { enumerable: true });\n\t/**\n\t* Class representing an error event.\n\t*\n\t* @extends Event\n\t*/\n\tvar ErrorEvent = class extends Event {\n\t\t/**\n\t\t* Create a new `ErrorEvent`.\n\t\t*\n\t\t* @param {String} type The name of the event\n\t\t* @param {Object} [options] A dictionary object that allows for setting\n\t\t* attributes via object members of the same name\n\t\t* @param {*} [options.error=null] The error that generated this event\n\t\t* @param {String} [options.message=''] The error message\n\t\t*/\n\t\tconstructor(type, options = {}) {\n\t\t\tsuper(type);\n\t\t\tthis[kError] = options.error === void 0 ? null : options.error;\n\t\t\tthis[kMessage] = options.message === void 0 ? \"\" : options.message;\n\t\t}\n\t\t/**\n\t\t* @type {*}\n\t\t*/\n\t\tget error() {\n\t\t\treturn this[kError];\n\t\t}\n\t\t/**\n\t\t* @type {String}\n\t\t*/\n\t\tget message() {\n\t\t\treturn this[kMessage];\n\t\t}\n\t};\n\tObject.defineProperty(ErrorEvent.prototype, \"error\", { enumerable: true });\n\tObject.defineProperty(ErrorEvent.prototype, \"message\", { enumerable: true });\n\t/**\n\t* Class representing a message event.\n\t*\n\t* @extends Event\n\t*/\n\tvar MessageEvent = class extends Event {\n\t\t/**\n\t\t* Create a new `MessageEvent`.\n\t\t*\n\t\t* @param {String} type The name of the event\n\t\t* @param {Object} [options] A dictionary object that allows for setting\n\t\t* attributes via object members of the same name\n\t\t* @param {*} [options.data=null] The message content\n\t\t*/\n\t\tconstructor(type, options = {}) {\n\t\t\tsuper(type);\n\t\t\tthis[kData] = options.data === void 0 ? null : options.data;\n\t\t}\n\t\t/**\n\t\t* @type {*}\n\t\t*/\n\t\tget data() {\n\t\t\treturn this[kData];\n\t\t}\n\t};\n\tObject.defineProperty(MessageEvent.prototype, \"data\", { enumerable: true });\n\t/**\n\t* This provides methods for emulating the `EventTarget` interface. It's not\n\t* meant to be used directly.\n\t*\n\t* @mixin\n\t*/\n\tconst EventTarget = {\n\t\taddEventListener(type, handler, options = {}) {\n\t\t\tfor (const listener of this.listeners(type)) if (!options[kForOnEventAttribute] && listener[kListener] === handler && !listener[kForOnEventAttribute]) return;\n\t\t\tlet wrapper;\n\t\t\tif (type === \"message\") wrapper = function onMessage(data, isBinary) {\n\t\t\t\tconst event = new MessageEvent(\"message\", { data: isBinary ? data : data.toString() });\n\t\t\t\tevent[kTarget] = this;\n\t\t\t\tcallListener(handler, this, event);\n\t\t\t};\n\t\t\telse if (type === \"close\") wrapper = function onClose(code, message) {\n\t\t\t\tconst event = new CloseEvent(\"close\", {\n\t\t\t\t\tcode,\n\t\t\t\t\treason: message.toString(),\n\t\t\t\t\twasClean: this._closeFrameReceived && this._closeFrameSent\n\t\t\t\t});\n\t\t\t\tevent[kTarget] = this;\n\t\t\t\tcallListener(handler, this, event);\n\t\t\t};\n\t\t\telse if (type === \"error\") wrapper = function onError(error) {\n\t\t\t\tconst event = new ErrorEvent(\"error\", {\n\t\t\t\t\terror,\n\t\t\t\t\tmessage: error.message\n\t\t\t\t});\n\t\t\t\tevent[kTarget] = this;\n\t\t\t\tcallListener(handler, this, event);\n\t\t\t};\n\t\t\telse if (type === \"open\") wrapper = function onOpen() {\n\t\t\t\tconst event = new Event(\"open\");\n\t\t\t\tevent[kTarget] = this;\n\t\t\t\tcallListener(handler, this, event);\n\t\t\t};\n\t\t\telse return;\n\t\t\twrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute];\n\t\t\twrapper[kListener] = handler;\n\t\t\tif (options.once) this.once(type, wrapper);\n\t\t\telse this.on(type, wrapper);\n\t\t},\n\t\tremoveEventListener(type, handler) {\n\t\t\tfor (const listener of this.listeners(type)) if (listener[kListener] === handler && !listener[kForOnEventAttribute]) {\n\t\t\t\tthis.removeListener(type, listener);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t};\n\tmodule.exports = {\n\t\tCloseEvent,\n\t\tErrorEvent,\n\t\tEvent,\n\t\tEventTarget,\n\t\tMessageEvent\n\t};\n\t/**\n\t* Call an event listener\n\t*\n\t* @param {(Function|Object)} listener The listener to call\n\t* @param {*} thisArg The value to use as `this`` when calling the listener\n\t* @param {Event} event The event to pass to the listener\n\t* @private\n\t*/\n\tfunction callListener(listener, thisArg, event) {\n\t\tif (typeof listener === \"object\" && listener.handleEvent) listener.handleEvent.call(listener, event);\n\t\telse listener.call(thisArg, event);\n\t}\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/extension.js\nvar require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { tokenChars } = require_validation();\n\t/**\n\t* Adds an offer to the map of extension offers or a parameter to the map of\n\t* parameters.\n\t*\n\t* @param {Object} dest The map of extension offers or parameters\n\t* @param {String} name The extension or parameter name\n\t* @param {(Object|Boolean|String)} elem The extension parameters or the\n\t* parameter value\n\t* @private\n\t*/\n\tfunction push(dest, name, elem) {\n\t\tif (dest[name] === void 0) dest[name] = [elem];\n\t\telse dest[name].push(elem);\n\t}\n\t/**\n\t* Parses the `Sec-WebSocket-Extensions` header into an object.\n\t*\n\t* @param {String} header The field value of the header\n\t* @return {Object} The parsed object\n\t* @public\n\t*/\n\tfunction parse(header) {\n\t\tconst offers = Object.create(null);\n\t\tlet params = Object.create(null);\n\t\tlet mustUnescape = false;\n\t\tlet isEscaping = false;\n\t\tlet inQuotes = false;\n\t\tlet extensionName;\n\t\tlet paramName;\n\t\tlet start = -1;\n\t\tlet code = -1;\n\t\tlet end = -1;\n\t\tlet i = 0;\n\t\tfor (; i < header.length; i++) {\n\t\t\tcode = header.charCodeAt(i);\n\t\t\tif (extensionName === void 0) if (end === -1 && tokenChars[code] === 1) {\n\t\t\t\tif (start === -1) start = i;\n\t\t\t} else if (i !== 0 && (code === 32 || code === 9)) {\n\t\t\t\tif (end === -1 && start !== -1) end = i;\n\t\t\t} else if (code === 59 || code === 44) {\n\t\t\t\tif (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);\n\t\t\t\tif (end === -1) end = i;\n\t\t\t\tconst name = header.slice(start, end);\n\t\t\t\tif (code === 44) {\n\t\t\t\t\tpush(offers, name, params);\n\t\t\t\t\tparams = Object.create(null);\n\t\t\t\t} else extensionName = name;\n\t\t\t\tstart = end = -1;\n\t\t\t} else throw new SyntaxError(`Unexpected character at index ${i}`);\n\t\t\telse if (paramName === void 0) if (end === -1 && tokenChars[code] === 1) {\n\t\t\t\tif (start === -1) start = i;\n\t\t\t} else if (code === 32 || code === 9) {\n\t\t\t\tif (end === -1 && start !== -1) end = i;\n\t\t\t} else if (code === 59 || code === 44) {\n\t\t\t\tif (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);\n\t\t\t\tif (end === -1) end = i;\n\t\t\t\tpush(params, header.slice(start, end), true);\n\t\t\t\tif (code === 44) {\n\t\t\t\t\tpush(offers, extensionName, params);\n\t\t\t\t\tparams = Object.create(null);\n\t\t\t\t\textensionName = void 0;\n\t\t\t\t}\n\t\t\t\tstart = end = -1;\n\t\t\t} else if (code === 61 && start !== -1 && end === -1) {\n\t\t\t\tparamName = header.slice(start, i);\n\t\t\t\tstart = end = -1;\n\t\t\t} else throw new SyntaxError(`Unexpected character at index ${i}`);\n\t\t\telse if (isEscaping) {\n\t\t\t\tif (tokenChars[code] !== 1) throw new SyntaxError(`Unexpected character at index ${i}`);\n\t\t\t\tif (start === -1) start = i;\n\t\t\t\telse if (!mustUnescape) mustUnescape = true;\n\t\t\t\tisEscaping = false;\n\t\t\t} else if (inQuotes) if (tokenChars[code] === 1) {\n\t\t\t\tif (start === -1) start = i;\n\t\t\t} else if (code === 34 && start !== -1) {\n\t\t\t\tinQuotes = false;\n\t\t\t\tend = i;\n\t\t\t} else if (code === 92) isEscaping = true;\n\t\t\telse throw new SyntaxError(`Unexpected character at index ${i}`);\n\t\t\telse if (code === 34 && header.charCodeAt(i - 1) === 61) inQuotes = true;\n\t\t\telse if (end === -1 && tokenChars[code] === 1) {\n\t\t\t\tif (start === -1) start = i;\n\t\t\t} else if (start !== -1 && (code === 32 || code === 9)) {\n\t\t\t\tif (end === -1) end = i;\n\t\t\t} else if (code === 59 || code === 44) {\n\t\t\t\tif (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);\n\t\t\t\tif (end === -1) end = i;\n\t\t\t\tlet value = header.slice(start, end);\n\t\t\t\tif (mustUnescape) {\n\t\t\t\t\tvalue = value.replace(/\\\\/g, \"\");\n\t\t\t\t\tmustUnescape = false;\n\t\t\t\t}\n\t\t\t\tpush(params, paramName, value);\n\t\t\t\tif (code === 44) {\n\t\t\t\t\tpush(offers, extensionName, params);\n\t\t\t\t\tparams = Object.create(null);\n\t\t\t\t\textensionName = void 0;\n\t\t\t\t}\n\t\t\t\tparamName = void 0;\n\t\t\t\tstart = end = -1;\n\t\t\t} else throw new SyntaxError(`Unexpected character at index ${i}`);\n\t\t}\n\t\tif (start === -1 || inQuotes || code === 32 || code === 9) throw new SyntaxError(\"Unexpected end of input\");\n\t\tif (end === -1) end = i;\n\t\tconst token = header.slice(start, end);\n\t\tif (extensionName === void 0) push(offers, token, params);\n\t\telse {\n\t\t\tif (paramName === void 0) push(params, token, true);\n\t\t\telse if (mustUnescape) push(params, paramName, token.replace(/\\\\/g, \"\"));\n\t\t\telse push(params, paramName, token);\n\t\t\tpush(offers, extensionName, params);\n\t\t}\n\t\treturn offers;\n\t}\n\t/**\n\t* Builds the `Sec-WebSocket-Extensions` header field value.\n\t*\n\t* @param {Object} extensions The map of extensions and parameters to format\n\t* @return {String} A string representing the given object\n\t* @public\n\t*/\n\tfunction format(extensions) {\n\t\treturn Object.keys(extensions).map((extension) => {\n\t\t\tlet configurations = extensions[extension];\n\t\t\tif (!Array.isArray(configurations)) configurations = [configurations];\n\t\t\treturn configurations.map((params) => {\n\t\t\t\treturn [extension].concat(Object.keys(params).map((k) => {\n\t\t\t\t\tlet values = params[k];\n\t\t\t\t\tif (!Array.isArray(values)) values = [values];\n\t\t\t\t\treturn values.map((v) => v === true ? k : `${k}=${v}`).join(\"; \");\n\t\t\t\t})).join(\"; \");\n\t\t\t}).join(\", \");\n\t\t}).join(\", \");\n\t}\n\tmodule.exports = {\n\t\tformat,\n\t\tparse\n\t};\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket.js\nvar require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst EventEmitter$1 = __require(\"events\");\n\tconst https = __require(\"https\");\n\tconst http$1 = __require(\"http\");\n\tconst net = __require(\"net\");\n\tconst tls = __require(\"tls\");\n\tconst { randomBytes, createHash: createHash$1 } = __require(\"crypto\");\n\tconst { Duplex: Duplex$2, Readable } = __require(\"stream\");\n\tconst { URL } = __require(\"url\");\n\tconst PerMessageDeflate = require_permessage_deflate();\n\tconst Receiver = require_receiver();\n\tconst Sender = require_sender();\n\tconst { isBlob } = require_validation();\n\tconst { BINARY_TYPES, CLOSE_TIMEOUT, EMPTY_BUFFER, GUID, kForOnEventAttribute, kListener, kStatusCode, kWebSocket, NOOP } = require_constants();\n\tconst { EventTarget: { addEventListener, removeEventListener } } = require_event_target();\n\tconst { format, parse } = require_extension();\n\tconst { toBuffer } = require_buffer_util();\n\tconst kAborted = Symbol(\"kAborted\");\n\tconst protocolVersions = [8, 13];\n\tconst readyStates = [\n\t\t\"CONNECTING\",\n\t\t\"OPEN\",\n\t\t\"CLOSING\",\n\t\t\"CLOSED\"\n\t];\n\tconst subprotocolRegex = /^[!#$%&'*+\\-.0-9A-Z^_`|a-z~]+$/;\n\t/**\n\t* Class representing a WebSocket.\n\t*\n\t* @extends EventEmitter\n\t*/\n\tvar WebSocket = class WebSocket extends EventEmitter$1 {\n\t\t/**\n\t\t* Create a new `WebSocket`.\n\t\t*\n\t\t* @param {(String|URL)} address The URL to which to connect\n\t\t* @param {(String|String[])} [protocols] The subprotocols\n\t\t* @param {Object} [options] Connection options\n\t\t*/\n\t\tconstructor(address, protocols, options) {\n\t\t\tsuper();\n\t\t\tthis._binaryType = BINARY_TYPES[0];\n\t\t\tthis._closeCode = 1006;\n\t\t\tthis._closeFrameReceived = false;\n\t\t\tthis._closeFrameSent = false;\n\t\t\tthis._closeMessage = EMPTY_BUFFER;\n\t\t\tthis._closeTimer = null;\n\t\t\tthis._errorEmitted = false;\n\t\t\tthis._extensions = {};\n\t\t\tthis._paused = false;\n\t\t\tthis._protocol = \"\";\n\t\t\tthis._readyState = WebSocket.CONNECTING;\n\t\t\tthis._receiver = null;\n\t\t\tthis._sender = null;\n\t\t\tthis._socket = null;\n\t\t\tif (address !== null) {\n\t\t\t\tthis._bufferedAmount = 0;\n\t\t\t\tthis._isServer = false;\n\t\t\t\tthis._redirects = 0;\n\t\t\t\tif (protocols === void 0) protocols = [];\n\t\t\t\telse if (!Array.isArray(protocols)) if (typeof protocols === \"object\" && protocols !== null) {\n\t\t\t\t\toptions = protocols;\n\t\t\t\t\tprotocols = [];\n\t\t\t\t} else protocols = [protocols];\n\t\t\t\tinitAsClient(this, address, protocols, options);\n\t\t\t} else {\n\t\t\t\tthis._autoPong = options.autoPong;\n\t\t\t\tthis._closeTimeout = options.closeTimeout;\n\t\t\t\tthis._isServer = true;\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* For historical reasons, the custom \"nodebuffer\" type is used by the default\n\t\t* instead of \"blob\".\n\t\t*\n\t\t* @type {String}\n\t\t*/\n\t\tget binaryType() {\n\t\t\treturn this._binaryType;\n\t\t}\n\t\tset binaryType(type) {\n\t\t\tif (!BINARY_TYPES.includes(type)) return;\n\t\t\tthis._binaryType = type;\n\t\t\tif (this._receiver) this._receiver._binaryType = type;\n\t\t}\n\t\t/**\n\t\t* @type {Number}\n\t\t*/\n\t\tget bufferedAmount() {\n\t\t\tif (!this._socket) return this._bufferedAmount;\n\t\t\treturn this._socket._writableState.length + this._sender._bufferedBytes;\n\t\t}\n\t\t/**\n\t\t* @type {String}\n\t\t*/\n\t\tget extensions() {\n\t\t\treturn Object.keys(this._extensions).join();\n\t\t}\n\t\t/**\n\t\t* @type {Boolean}\n\t\t*/\n\t\tget isPaused() {\n\t\t\treturn this._paused;\n\t\t}\n\t\t/**\n\t\t* @type {Function}\n\t\t*/\n\t\t/* istanbul ignore next */\n\t\tget onclose() {\n\t\t\treturn null;\n\t\t}\n\t\t/**\n\t\t* @type {Function}\n\t\t*/\n\t\t/* istanbul ignore next */\n\t\tget onerror() {\n\t\t\treturn null;\n\t\t}\n\t\t/**\n\t\t* @type {Function}\n\t\t*/\n\t\t/* istanbul ignore next */\n\t\tget onopen() {\n\t\t\treturn null;\n\t\t}\n\t\t/**\n\t\t* @type {Function}\n\t\t*/\n\t\t/* istanbul ignore next */\n\t\tget onmessage() {\n\t\t\treturn null;\n\t\t}\n\t\t/**\n\t\t* @type {String}\n\t\t*/\n\t\tget protocol() {\n\t\t\treturn this._protocol;\n\t\t}\n\t\t/**\n\t\t* @type {Number}\n\t\t*/\n\t\tget readyState() {\n\t\t\treturn this._readyState;\n\t\t}\n\t\t/**\n\t\t* @type {String}\n\t\t*/\n\t\tget url() {\n\t\t\treturn this._url;\n\t\t}\n\t\t/**\n\t\t* Set up the socket and the internal resources.\n\t\t*\n\t\t* @param {Duplex} socket The network socket between the server and client\n\t\t* @param {Buffer} head The first packet of the upgraded stream\n\t\t* @param {Object} options Options object\n\t\t* @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether\n\t\t* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted\n\t\t* multiple times in the same tick\n\t\t* @param {Function} [options.generateMask] The function used to generate the\n\t\t* masking key\n\t\t* @param {Number} [options.maxPayload=0] The maximum allowed message size\n\t\t* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or\n\t\t* not to skip UTF-8 validation for text and close messages\n\t\t* @private\n\t\t*/\n\t\tsetSocket(socket, head, options) {\n\t\t\tconst receiver = new Receiver({\n\t\t\t\tallowSynchronousEvents: options.allowSynchronousEvents,\n\t\t\t\tbinaryType: this.binaryType,\n\t\t\t\textensions: this._extensions,\n\t\t\t\tisServer: this._isServer,\n\t\t\t\tmaxPayload: options.maxPayload,\n\t\t\t\tskipUTF8Validation: options.skipUTF8Validation\n\t\t\t});\n\t\t\tconst sender = new Sender(socket, this._extensions, options.generateMask);\n\t\t\tthis._receiver = receiver;\n\t\t\tthis._sender = sender;\n\t\t\tthis._socket = socket;\n\t\t\treceiver[kWebSocket] = this;\n\t\t\tsender[kWebSocket] = this;\n\t\t\tsocket[kWebSocket] = this;\n\t\t\treceiver.on(\"conclude\", receiverOnConclude);\n\t\t\treceiver.on(\"drain\", receiverOnDrain);\n\t\t\treceiver.on(\"error\", receiverOnError);\n\t\t\treceiver.on(\"message\", receiverOnMessage);\n\t\t\treceiver.on(\"ping\", receiverOnPing);\n\t\t\treceiver.on(\"pong\", receiverOnPong);\n\t\t\tsender.onerror = senderOnError;\n\t\t\tif (socket.setTimeout) socket.setTimeout(0);\n\t\t\tif (socket.setNoDelay) socket.setNoDelay();\n\t\t\tif (head.length > 0) socket.unshift(head);\n\t\t\tsocket.on(\"close\", socketOnClose);\n\t\t\tsocket.on(\"data\", socketOnData);\n\t\t\tsocket.on(\"end\", socketOnEnd);\n\t\t\tsocket.on(\"error\", socketOnError);\n\t\t\tthis._readyState = WebSocket.OPEN;\n\t\t\tthis.emit(\"open\");\n\t\t}\n\t\t/**\n\t\t* Emit the `'close'` event.\n\t\t*\n\t\t* @private\n\t\t*/\n\t\temitClose() {\n\t\t\tif (!this._socket) {\n\t\t\t\tthis._readyState = WebSocket.CLOSED;\n\t\t\t\tthis.emit(\"close\", this._closeCode, this._closeMessage);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._extensions[PerMessageDeflate.extensionName]) this._extensions[PerMessageDeflate.extensionName].cleanup();\n\t\t\tthis._receiver.removeAllListeners();\n\t\t\tthis._readyState = WebSocket.CLOSED;\n\t\t\tthis.emit(\"close\", this._closeCode, this._closeMessage);\n\t\t}\n\t\t/**\n\t\t* Start a closing handshake.\n\t\t*\n\t\t* +----------+ +-----------+ +----------+\n\t\t* - - -|ws.close()|-->|close frame|-->|ws.close()|- - -\n\t\t* | +----------+ +-----------+ +----------+ |\n\t\t* +----------+ +-----------+ |\n\t\t* CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING\n\t\t* +----------+ +-----------+ |\n\t\t* | | | +---+ |\n\t\t* +------------------------+-->|fin| - - - -\n\t\t* | +---+ | +---+\n\t\t* - - - - -|fin|<---------------------+\n\t\t* +---+\n\t\t*\n\t\t* @param {Number} [code] Status code explaining why the connection is closing\n\t\t* @param {(String|Buffer)} [data] The reason why the connection is\n\t\t* closing\n\t\t* @public\n\t\t*/\n\t\tclose(code, data) {\n\t\t\tif (this.readyState === WebSocket.CLOSED) return;\n\t\t\tif (this.readyState === WebSocket.CONNECTING) {\n\t\t\t\tabortHandshake(this, this._req, \"WebSocket was closed before the connection was established\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.readyState === WebSocket.CLOSING) {\n\t\t\t\tif (this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted)) this._socket.end();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._readyState = WebSocket.CLOSING;\n\t\t\tthis._sender.close(code, data, !this._isServer, (err) => {\n\t\t\t\tif (err) return;\n\t\t\t\tthis._closeFrameSent = true;\n\t\t\t\tif (this._closeFrameReceived || this._receiver._writableState.errorEmitted) this._socket.end();\n\t\t\t});\n\t\t\tsetCloseTimer(this);\n\t\t}\n\t\t/**\n\t\t* Pause the socket.\n\t\t*\n\t\t* @public\n\t\t*/\n\t\tpause() {\n\t\t\tif (this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED) return;\n\t\t\tthis._paused = true;\n\t\t\tthis._socket.pause();\n\t\t}\n\t\t/**\n\t\t* Send a ping.\n\t\t*\n\t\t* @param {*} [data] The data to send\n\t\t* @param {Boolean} [mask] Indicates whether or not to mask `data`\n\t\t* @param {Function} [cb] Callback which is executed when the ping is sent\n\t\t* @public\n\t\t*/\n\t\tping(data, mask, cb) {\n\t\t\tif (this.readyState === WebSocket.CONNECTING) throw new Error(\"WebSocket is not open: readyState 0 (CONNECTING)\");\n\t\t\tif (typeof data === \"function\") {\n\t\t\t\tcb = data;\n\t\t\t\tdata = mask = void 0;\n\t\t\t} else if (typeof mask === \"function\") {\n\t\t\t\tcb = mask;\n\t\t\t\tmask = void 0;\n\t\t\t}\n\t\t\tif (typeof data === \"number\") data = data.toString();\n\t\t\tif (this.readyState !== WebSocket.OPEN) {\n\t\t\t\tsendAfterClose(this, data, cb);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mask === void 0) mask = !this._isServer;\n\t\t\tthis._sender.ping(data || EMPTY_BUFFER, mask, cb);\n\t\t}\n\t\t/**\n\t\t* Send a pong.\n\t\t*\n\t\t* @param {*} [data] The data to send\n\t\t* @param {Boolean} [mask] Indicates whether or not to mask `data`\n\t\t* @param {Function} [cb] Callback which is executed when the pong is sent\n\t\t* @public\n\t\t*/\n\t\tpong(data, mask, cb) {\n\t\t\tif (this.readyState === WebSocket.CONNECTING) throw new Error(\"WebSocket is not open: readyState 0 (CONNECTING)\");\n\t\t\tif (typeof data === \"function\") {\n\t\t\t\tcb = data;\n\t\t\t\tdata = mask = void 0;\n\t\t\t} else if (typeof mask === \"function\") {\n\t\t\t\tcb = mask;\n\t\t\t\tmask = void 0;\n\t\t\t}\n\t\t\tif (typeof data === \"number\") data = data.toString();\n\t\t\tif (this.readyState !== WebSocket.OPEN) {\n\t\t\t\tsendAfterClose(this, data, cb);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mask === void 0) mask = !this._isServer;\n\t\t\tthis._sender.pong(data || EMPTY_BUFFER, mask, cb);\n\t\t}\n\t\t/**\n\t\t* Resume the socket.\n\t\t*\n\t\t* @public\n\t\t*/\n\t\tresume() {\n\t\t\tif (this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED) return;\n\t\t\tthis._paused = false;\n\t\t\tif (!this._receiver._writableState.needDrain) this._socket.resume();\n\t\t}\n\t\t/**\n\t\t* Send a data message.\n\t\t*\n\t\t* @param {*} data The message to send\n\t\t* @param {Object} [options] Options object\n\t\t* @param {Boolean} [options.binary] Specifies whether `data` is binary or\n\t\t* text\n\t\t* @param {Boolean} [options.compress] Specifies whether or not to compress\n\t\t* `data`\n\t\t* @param {Boolean} [options.fin=true] Specifies whether the fragment is the\n\t\t* last one\n\t\t* @param {Boolean} [options.mask] Specifies whether or not to mask `data`\n\t\t* @param {Function} [cb] Callback which is executed when data is written out\n\t\t* @public\n\t\t*/\n\t\tsend(data, options, cb) {\n\t\t\tif (this.readyState === WebSocket.CONNECTING) throw new Error(\"WebSocket is not open: readyState 0 (CONNECTING)\");\n\t\t\tif (typeof options === \"function\") {\n\t\t\t\tcb = options;\n\t\t\t\toptions = {};\n\t\t\t}\n\t\t\tif (typeof data === \"number\") data = data.toString();\n\t\t\tif (this.readyState !== WebSocket.OPEN) {\n\t\t\t\tsendAfterClose(this, data, cb);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst opts = {\n\t\t\t\tbinary: typeof data !== \"string\",\n\t\t\t\tmask: !this._isServer,\n\t\t\t\tcompress: true,\n\t\t\t\tfin: true,\n\t\t\t\t...options\n\t\t\t};\n\t\t\tif (!this._extensions[PerMessageDeflate.extensionName]) opts.compress = false;\n\t\t\tthis._sender.send(data || EMPTY_BUFFER, opts, cb);\n\t\t}\n\t\t/**\n\t\t* Forcibly close the connection.\n\t\t*\n\t\t* @public\n\t\t*/\n\t\tterminate() {\n\t\t\tif (this.readyState === WebSocket.CLOSED) return;\n\t\t\tif (this.readyState === WebSocket.CONNECTING) {\n\t\t\t\tabortHandshake(this, this._req, \"WebSocket was closed before the connection was established\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._socket) {\n\t\t\t\tthis._readyState = WebSocket.CLOSING;\n\t\t\t\tthis._socket.destroy();\n\t\t\t}\n\t\t}\n\t};\n\t/**\n\t* @constant {Number} CONNECTING\n\t* @memberof WebSocket\n\t*/\n\tObject.defineProperty(WebSocket, \"CONNECTING\", {\n\t\tenumerable: true,\n\t\tvalue: readyStates.indexOf(\"CONNECTING\")\n\t});\n\t/**\n\t* @constant {Number} CONNECTING\n\t* @memberof WebSocket.prototype\n\t*/\n\tObject.defineProperty(WebSocket.prototype, \"CONNECTING\", {\n\t\tenumerable: true,\n\t\tvalue: readyStates.indexOf(\"CONNECTING\")\n\t});\n\t/**\n\t* @constant {Number} OPEN\n\t* @memberof WebSocket\n\t*/\n\tObject.defineProperty(WebSocket, \"OPEN\", {\n\t\tenumerable: true,\n\t\tvalue: readyStates.indexOf(\"OPEN\")\n\t});\n\t/**\n\t* @constant {Number} OPEN\n\t* @memberof WebSocket.prototype\n\t*/\n\tObject.defineProperty(WebSocket.prototype, \"OPEN\", {\n\t\tenumerable: true,\n\t\tvalue: readyStates.indexOf(\"OPEN\")\n\t});\n\t/**\n\t* @constant {Number} CLOSING\n\t* @memberof WebSocket\n\t*/\n\tObject.defineProperty(WebSocket, \"CLOSING\", {\n\t\tenumerable: true,\n\t\tvalue: readyStates.indexOf(\"CLOSING\")\n\t});\n\t/**\n\t* @constant {Number} CLOSING\n\t* @memberof WebSocket.prototype\n\t*/\n\tObject.defineProperty(WebSocket.prototype, \"CLOSING\", {\n\t\tenumerable: true,\n\t\tvalue: readyStates.indexOf(\"CLOSING\")\n\t});\n\t/**\n\t* @constant {Number} CLOSED\n\t* @memberof WebSocket\n\t*/\n\tObject.defineProperty(WebSocket, \"CLOSED\", {\n\t\tenumerable: true,\n\t\tvalue: readyStates.indexOf(\"CLOSED\")\n\t});\n\t/**\n\t* @constant {Number} CLOSED\n\t* @memberof WebSocket.prototype\n\t*/\n\tObject.defineProperty(WebSocket.prototype, \"CLOSED\", {\n\t\tenumerable: true,\n\t\tvalue: readyStates.indexOf(\"CLOSED\")\n\t});\n\t[\n\t\t\"binaryType\",\n\t\t\"bufferedAmount\",\n\t\t\"extensions\",\n\t\t\"isPaused\",\n\t\t\"protocol\",\n\t\t\"readyState\",\n\t\t\"url\"\n\t].forEach((property) => {\n\t\tObject.defineProperty(WebSocket.prototype, property, { enumerable: true });\n\t});\n\t[\n\t\t\"open\",\n\t\t\"error\",\n\t\t\"close\",\n\t\t\"message\"\n\t].forEach((method) => {\n\t\tObject.defineProperty(WebSocket.prototype, `on${method}`, {\n\t\t\tenumerable: true,\n\t\t\tget() {\n\t\t\t\tfor (const listener of this.listeners(method)) if (listener[kForOnEventAttribute]) return listener[kListener];\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\tset(handler) {\n\t\t\t\tfor (const listener of this.listeners(method)) if (listener[kForOnEventAttribute]) {\n\t\t\t\t\tthis.removeListener(method, listener);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (typeof handler !== \"function\") return;\n\t\t\t\tthis.addEventListener(method, handler, { [kForOnEventAttribute]: true });\n\t\t\t}\n\t\t});\n\t});\n\tWebSocket.prototype.addEventListener = addEventListener;\n\tWebSocket.prototype.removeEventListener = removeEventListener;\n\tmodule.exports = WebSocket;\n\t/**\n\t* Initialize a WebSocket client.\n\t*\n\t* @param {WebSocket} websocket The client to initialize\n\t* @param {(String|URL)} address The URL to which to connect\n\t* @param {Array} protocols The subprotocols\n\t* @param {Object} [options] Connection options\n\t* @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether any\n\t* of the `'message'`, `'ping'`, and `'pong'` events can be emitted multiple\n\t* times in the same tick\n\t* @param {Boolean} [options.autoPong=true] Specifies whether or not to\n\t* automatically send a pong in response to a ping\n\t* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to wait\n\t* for the closing handshake to finish after `websocket.close()` is called\n\t* @param {Function} [options.finishRequest] A function which can be used to\n\t* customize the headers of each http request before it is sent\n\t* @param {Boolean} [options.followRedirects=false] Whether or not to follow\n\t* redirects\n\t* @param {Function} [options.generateMask] The function used to generate the\n\t* masking key\n\t* @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the\n\t* handshake request\n\t* @param {Number} [options.maxPayload=104857600] The maximum allowed message\n\t* size\n\t* @param {Number} [options.maxRedirects=10] The maximum number of redirects\n\t* allowed\n\t* @param {String} [options.origin] Value of the `Origin` or\n\t* `Sec-WebSocket-Origin` header\n\t* @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable\n\t* permessage-deflate\n\t* @param {Number} [options.protocolVersion=13] Value of the\n\t* `Sec-WebSocket-Version` header\n\t* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or\n\t* not to skip UTF-8 validation for text and close messages\n\t* @private\n\t*/\n\tfunction initAsClient(websocket, address, protocols, options) {\n\t\tconst opts = {\n\t\t\tallowSynchronousEvents: true,\n\t\t\tautoPong: true,\n\t\t\tcloseTimeout: CLOSE_TIMEOUT,\n\t\t\tprotocolVersion: protocolVersions[1],\n\t\t\tmaxPayload: 100 * 1024 * 1024,\n\t\t\tskipUTF8Validation: false,\n\t\t\tperMessageDeflate: true,\n\t\t\tfollowRedirects: false,\n\t\t\tmaxRedirects: 10,\n\t\t\t...options,\n\t\t\tsocketPath: void 0,\n\t\t\thostname: void 0,\n\t\t\tprotocol: void 0,\n\t\t\ttimeout: void 0,\n\t\t\tmethod: \"GET\",\n\t\t\thost: void 0,\n\t\t\tpath: void 0,\n\t\t\tport: void 0\n\t\t};\n\t\twebsocket._autoPong = opts.autoPong;\n\t\twebsocket._closeTimeout = opts.closeTimeout;\n\t\tif (!protocolVersions.includes(opts.protocolVersion)) throw new RangeError(`Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(\", \")})`);\n\t\tlet parsedUrl;\n\t\tif (address instanceof URL) parsedUrl = address;\n\t\telse try {\n\t\t\tparsedUrl = new URL(address);\n\t\t} catch (e) {\n\t\t\tthrow new SyntaxError(`Invalid URL: ${address}`);\n\t\t}\n\t\tif (parsedUrl.protocol === \"http:\") parsedUrl.protocol = \"ws:\";\n\t\telse if (parsedUrl.protocol === \"https:\") parsedUrl.protocol = \"wss:\";\n\t\twebsocket._url = parsedUrl.href;\n\t\tconst isSecure = parsedUrl.protocol === \"wss:\";\n\t\tconst isIpcUrl = parsedUrl.protocol === \"ws+unix:\";\n\t\tlet invalidUrlMessage;\n\t\tif (parsedUrl.protocol !== \"ws:\" && !isSecure && !isIpcUrl) invalidUrlMessage = \"The URL's protocol must be one of \\\"ws:\\\", \\\"wss:\\\", \\\"http:\\\", \\\"https:\\\", or \\\"ws+unix:\\\"\";\n\t\telse if (isIpcUrl && !parsedUrl.pathname) invalidUrlMessage = \"The URL's pathname is empty\";\n\t\telse if (parsedUrl.hash) invalidUrlMessage = \"The URL contains a fragment identifier\";\n\t\tif (invalidUrlMessage) {\n\t\t\tconst err = new SyntaxError(invalidUrlMessage);\n\t\t\tif (websocket._redirects === 0) throw err;\n\t\t\telse {\n\t\t\t\temitErrorAndClose(websocket, err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconst defaultPort = isSecure ? 443 : 80;\n\t\tconst key = randomBytes(16).toString(\"base64\");\n\t\tconst request = isSecure ? https.request : http$1.request;\n\t\tconst protocolSet = /* @__PURE__ */ new Set();\n\t\tlet perMessageDeflate;\n\t\topts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect);\n\t\topts.defaultPort = opts.defaultPort || defaultPort;\n\t\topts.port = parsedUrl.port || defaultPort;\n\t\topts.host = parsedUrl.hostname.startsWith(\"[\") ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname;\n\t\topts.headers = {\n\t\t\t...opts.headers,\n\t\t\t\"Sec-WebSocket-Version\": opts.protocolVersion,\n\t\t\t\"Sec-WebSocket-Key\": key,\n\t\t\tConnection: \"Upgrade\",\n\t\t\tUpgrade: \"websocket\"\n\t\t};\n\t\topts.path = parsedUrl.pathname + parsedUrl.search;\n\t\topts.timeout = opts.handshakeTimeout;\n\t\tif (opts.perMessageDeflate) {\n\t\t\tperMessageDeflate = new PerMessageDeflate(opts.perMessageDeflate !== true ? opts.perMessageDeflate : {}, false, opts.maxPayload);\n\t\t\topts.headers[\"Sec-WebSocket-Extensions\"] = format({ [PerMessageDeflate.extensionName]: perMessageDeflate.offer() });\n\t\t}\n\t\tif (protocols.length) {\n\t\t\tfor (const protocol of protocols) {\n\t\t\t\tif (typeof protocol !== \"string\" || !subprotocolRegex.test(protocol) || protocolSet.has(protocol)) throw new SyntaxError(\"An invalid or duplicated subprotocol was specified\");\n\t\t\t\tprotocolSet.add(protocol);\n\t\t\t}\n\t\t\topts.headers[\"Sec-WebSocket-Protocol\"] = protocols.join(\",\");\n\t\t}\n\t\tif (opts.origin) if (opts.protocolVersion < 13) opts.headers[\"Sec-WebSocket-Origin\"] = opts.origin;\n\t\telse opts.headers.Origin = opts.origin;\n\t\tif (parsedUrl.username || parsedUrl.password) opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;\n\t\tif (isIpcUrl) {\n\t\t\tconst parts = opts.path.split(\":\");\n\t\t\topts.socketPath = parts[0];\n\t\t\topts.path = parts[1];\n\t\t}\n\t\tlet req;\n\t\tif (opts.followRedirects) {\n\t\t\tif (websocket._redirects === 0) {\n\t\t\t\twebsocket._originalIpc = isIpcUrl;\n\t\t\t\twebsocket._originalSecure = isSecure;\n\t\t\t\twebsocket._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host;\n\t\t\t\tconst headers = options && options.headers;\n\t\t\t\toptions = {\n\t\t\t\t\t...options,\n\t\t\t\t\theaders: {}\n\t\t\t\t};\n\t\t\t\tif (headers) for (const [key, value] of Object.entries(headers)) options.headers[key.toLowerCase()] = value;\n\t\t\t} else if (websocket.listenerCount(\"redirect\") === 0) {\n\t\t\t\tconst isSameHost = isIpcUrl ? websocket._originalIpc ? opts.socketPath === websocket._originalHostOrSocketPath : false : websocket._originalIpc ? false : parsedUrl.host === websocket._originalHostOrSocketPath;\n\t\t\t\tif (!isSameHost || websocket._originalSecure && !isSecure) {\n\t\t\t\t\tdelete opts.headers.authorization;\n\t\t\t\t\tdelete opts.headers.cookie;\n\t\t\t\t\tif (!isSameHost) delete opts.headers.host;\n\t\t\t\t\topts.auth = void 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (opts.auth && !options.headers.authorization) options.headers.authorization = \"Basic \" + Buffer.from(opts.auth).toString(\"base64\");\n\t\t\treq = websocket._req = request(opts);\n\t\t\tif (websocket._redirects) websocket.emit(\"redirect\", websocket.url, req);\n\t\t} else req = websocket._req = request(opts);\n\t\tif (opts.timeout) req.on(\"timeout\", () => {\n\t\t\tabortHandshake(websocket, req, \"Opening handshake has timed out\");\n\t\t});\n\t\treq.on(\"error\", (err) => {\n\t\t\tif (req === null || req[kAborted]) return;\n\t\t\treq = websocket._req = null;\n\t\t\temitErrorAndClose(websocket, err);\n\t\t});\n\t\treq.on(\"response\", (res) => {\n\t\t\tconst location = res.headers.location;\n\t\t\tconst statusCode = res.statusCode;\n\t\t\tif (location && opts.followRedirects && statusCode >= 300 && statusCode < 400) {\n\t\t\t\tif (++websocket._redirects > opts.maxRedirects) {\n\t\t\t\t\tabortHandshake(websocket, req, \"Maximum redirects exceeded\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treq.abort();\n\t\t\t\tlet addr;\n\t\t\t\ttry {\n\t\t\t\t\taddr = new URL(location, address);\n\t\t\t\t} catch (e) {\n\t\t\t\t\temitErrorAndClose(websocket, /* @__PURE__ */ new SyntaxError(`Invalid URL: ${location}`));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tinitAsClient(websocket, addr, protocols, options);\n\t\t\t} else if (!websocket.emit(\"unexpected-response\", req, res)) abortHandshake(websocket, req, `Unexpected server response: ${res.statusCode}`);\n\t\t});\n\t\treq.on(\"upgrade\", (res, socket, head) => {\n\t\t\twebsocket.emit(\"upgrade\", res);\n\t\t\tif (websocket.readyState !== WebSocket.CONNECTING) return;\n\t\t\treq = websocket._req = null;\n\t\t\tconst upgrade = res.headers.upgrade;\n\t\t\tif (upgrade === void 0 || upgrade.toLowerCase() !== \"websocket\") {\n\t\t\t\tabortHandshake(websocket, socket, \"Invalid Upgrade header\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst digest = createHash$1(\"sha1\").update(key + GUID).digest(\"base64\");\n\t\t\tif (res.headers[\"sec-websocket-accept\"] !== digest) {\n\t\t\t\tabortHandshake(websocket, socket, \"Invalid Sec-WebSocket-Accept header\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst serverProt = res.headers[\"sec-websocket-protocol\"];\n\t\t\tlet protError;\n\t\t\tif (serverProt !== void 0) {\n\t\t\t\tif (!protocolSet.size) protError = \"Server sent a subprotocol but none was requested\";\n\t\t\t\telse if (!protocolSet.has(serverProt)) protError = \"Server sent an invalid subprotocol\";\n\t\t\t} else if (protocolSet.size) protError = \"Server sent no subprotocol\";\n\t\t\tif (protError) {\n\t\t\t\tabortHandshake(websocket, socket, protError);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (serverProt) websocket._protocol = serverProt;\n\t\t\tconst secWebSocketExtensions = res.headers[\"sec-websocket-extensions\"];\n\t\t\tif (secWebSocketExtensions !== void 0) {\n\t\t\t\tif (!perMessageDeflate) {\n\t\t\t\t\tabortHandshake(websocket, socket, \"Server sent a Sec-WebSocket-Extensions header but no extension was requested\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet extensions;\n\t\t\t\ttry {\n\t\t\t\t\textensions = parse(secWebSocketExtensions);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tabortHandshake(websocket, socket, \"Invalid Sec-WebSocket-Extensions header\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst extensionNames = Object.keys(extensions);\n\t\t\t\tif (extensionNames.length !== 1 || extensionNames[0] !== PerMessageDeflate.extensionName) {\n\t\t\t\t\tabortHandshake(websocket, socket, \"Server indicated an extension that was not requested\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tperMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tabortHandshake(websocket, socket, \"Invalid Sec-WebSocket-Extensions header\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\twebsocket._extensions[PerMessageDeflate.extensionName] = perMessageDeflate;\n\t\t\t}\n\t\t\twebsocket.setSocket(socket, head, {\n\t\t\t\tallowSynchronousEvents: opts.allowSynchronousEvents,\n\t\t\t\tgenerateMask: opts.generateMask,\n\t\t\t\tmaxPayload: opts.maxPayload,\n\t\t\t\tskipUTF8Validation: opts.skipUTF8Validation\n\t\t\t});\n\t\t});\n\t\tif (opts.finishRequest) opts.finishRequest(req, websocket);\n\t\telse req.end();\n\t}\n\t/**\n\t* Emit the `'error'` and `'close'` events.\n\t*\n\t* @param {WebSocket} websocket The WebSocket instance\n\t* @param {Error} The error to emit\n\t* @private\n\t*/\n\tfunction emitErrorAndClose(websocket, err) {\n\t\twebsocket._readyState = WebSocket.CLOSING;\n\t\twebsocket._errorEmitted = true;\n\t\twebsocket.emit(\"error\", err);\n\t\twebsocket.emitClose();\n\t}\n\t/**\n\t* Create a `net.Socket` and initiate a connection.\n\t*\n\t* @param {Object} options Connection options\n\t* @return {net.Socket} The newly created socket used to start the connection\n\t* @private\n\t*/\n\tfunction netConnect(options) {\n\t\toptions.path = options.socketPath;\n\t\treturn net.connect(options);\n\t}\n\t/**\n\t* Create a `tls.TLSSocket` and initiate a connection.\n\t*\n\t* @param {Object} options Connection options\n\t* @return {tls.TLSSocket} The newly created socket used to start the connection\n\t* @private\n\t*/\n\tfunction tlsConnect(options) {\n\t\toptions.path = void 0;\n\t\tif (!options.servername && options.servername !== \"\") options.servername = net.isIP(options.host) ? \"\" : options.host;\n\t\treturn tls.connect(options);\n\t}\n\t/**\n\t* Abort the handshake and emit an error.\n\t*\n\t* @param {WebSocket} websocket The WebSocket instance\n\t* @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to\n\t* abort or the socket to destroy\n\t* @param {String} message The error message\n\t* @private\n\t*/\n\tfunction abortHandshake(websocket, stream, message) {\n\t\twebsocket._readyState = WebSocket.CLOSING;\n\t\tconst err = new Error(message);\n\t\tError.captureStackTrace(err, abortHandshake);\n\t\tif (stream.setHeader) {\n\t\t\tstream[kAborted] = true;\n\t\t\tstream.abort();\n\t\t\tif (stream.socket && !stream.socket.destroyed) stream.socket.destroy();\n\t\t\tprocess.nextTick(emitErrorAndClose, websocket, err);\n\t\t} else {\n\t\t\tstream.destroy(err);\n\t\t\tstream.once(\"error\", websocket.emit.bind(websocket, \"error\"));\n\t\t\tstream.once(\"close\", websocket.emitClose.bind(websocket));\n\t\t}\n\t}\n\t/**\n\t* Handle cases where the `ping()`, `pong()`, or `send()` methods are called\n\t* when the `readyState` attribute is `CLOSING` or `CLOSED`.\n\t*\n\t* @param {WebSocket} websocket The WebSocket instance\n\t* @param {*} [data] The data to send\n\t* @param {Function} [cb] Callback\n\t* @private\n\t*/\n\tfunction sendAfterClose(websocket, data, cb) {\n\t\tif (data) {\n\t\t\tconst length = isBlob(data) ? data.size : toBuffer(data).length;\n\t\t\tif (websocket._socket) websocket._sender._bufferedBytes += length;\n\t\t\telse websocket._bufferedAmount += length;\n\t\t}\n\t\tif (cb) {\n\t\t\tconst err = /* @__PURE__ */ new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);\n\t\t\tprocess.nextTick(cb, err);\n\t\t}\n\t}\n\t/**\n\t* The listener of the `Receiver` `'conclude'` event.\n\t*\n\t* @param {Number} code The status code\n\t* @param {Buffer} reason The reason for closing\n\t* @private\n\t*/\n\tfunction receiverOnConclude(code, reason) {\n\t\tconst websocket = this[kWebSocket];\n\t\twebsocket._closeFrameReceived = true;\n\t\twebsocket._closeMessage = reason;\n\t\twebsocket._closeCode = code;\n\t\tif (websocket._socket[kWebSocket] === void 0) return;\n\t\twebsocket._socket.removeListener(\"data\", socketOnData);\n\t\tprocess.nextTick(resume, websocket._socket);\n\t\tif (code === 1005) websocket.close();\n\t\telse websocket.close(code, reason);\n\t}\n\t/**\n\t* The listener of the `Receiver` `'drain'` event.\n\t*\n\t* @private\n\t*/\n\tfunction receiverOnDrain() {\n\t\tconst websocket = this[kWebSocket];\n\t\tif (!websocket.isPaused) websocket._socket.resume();\n\t}\n\t/**\n\t* The listener of the `Receiver` `'error'` event.\n\t*\n\t* @param {(RangeError|Error)} err The emitted error\n\t* @private\n\t*/\n\tfunction receiverOnError(err) {\n\t\tconst websocket = this[kWebSocket];\n\t\tif (websocket._socket[kWebSocket] !== void 0) {\n\t\t\twebsocket._socket.removeListener(\"data\", socketOnData);\n\t\t\tprocess.nextTick(resume, websocket._socket);\n\t\t\twebsocket.close(err[kStatusCode]);\n\t\t}\n\t\tif (!websocket._errorEmitted) {\n\t\t\twebsocket._errorEmitted = true;\n\t\t\twebsocket.emit(\"error\", err);\n\t\t}\n\t}\n\t/**\n\t* The listener of the `Receiver` `'finish'` event.\n\t*\n\t* @private\n\t*/\n\tfunction receiverOnFinish() {\n\t\tthis[kWebSocket].emitClose();\n\t}\n\t/**\n\t* The listener of the `Receiver` `'message'` event.\n\t*\n\t* @param {Buffer|ArrayBuffer|Buffer[])} data The message\n\t* @param {Boolean} isBinary Specifies whether the message is binary or not\n\t* @private\n\t*/\n\tfunction receiverOnMessage(data, isBinary) {\n\t\tthis[kWebSocket].emit(\"message\", data, isBinary);\n\t}\n\t/**\n\t* The listener of the `Receiver` `'ping'` event.\n\t*\n\t* @param {Buffer} data The data included in the ping frame\n\t* @private\n\t*/\n\tfunction receiverOnPing(data) {\n\t\tconst websocket = this[kWebSocket];\n\t\tif (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP);\n\t\twebsocket.emit(\"ping\", data);\n\t}\n\t/**\n\t* The listener of the `Receiver` `'pong'` event.\n\t*\n\t* @param {Buffer} data The data included in the pong frame\n\t* @private\n\t*/\n\tfunction receiverOnPong(data) {\n\t\tthis[kWebSocket].emit(\"pong\", data);\n\t}\n\t/**\n\t* Resume a readable stream\n\t*\n\t* @param {Readable} stream The readable stream\n\t* @private\n\t*/\n\tfunction resume(stream) {\n\t\tstream.resume();\n\t}\n\t/**\n\t* The `Sender` error event handler.\n\t*\n\t* @param {Error} The error\n\t* @private\n\t*/\n\tfunction senderOnError(err) {\n\t\tconst websocket = this[kWebSocket];\n\t\tif (websocket.readyState === WebSocket.CLOSED) return;\n\t\tif (websocket.readyState === WebSocket.OPEN) {\n\t\t\twebsocket._readyState = WebSocket.CLOSING;\n\t\t\tsetCloseTimer(websocket);\n\t\t}\n\t\tthis._socket.end();\n\t\tif (!websocket._errorEmitted) {\n\t\t\twebsocket._errorEmitted = true;\n\t\t\twebsocket.emit(\"error\", err);\n\t\t}\n\t}\n\t/**\n\t* Set a timer to destroy the underlying raw socket of a WebSocket.\n\t*\n\t* @param {WebSocket} websocket The WebSocket instance\n\t* @private\n\t*/\n\tfunction setCloseTimer(websocket) {\n\t\twebsocket._closeTimer = setTimeout(websocket._socket.destroy.bind(websocket._socket), websocket._closeTimeout);\n\t}\n\t/**\n\t* The listener of the socket `'close'` event.\n\t*\n\t* @private\n\t*/\n\tfunction socketOnClose() {\n\t\tconst websocket = this[kWebSocket];\n\t\tthis.removeListener(\"close\", socketOnClose);\n\t\tthis.removeListener(\"data\", socketOnData);\n\t\tthis.removeListener(\"end\", socketOnEnd);\n\t\twebsocket._readyState = WebSocket.CLOSING;\n\t\tif (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && this._readableState.length !== 0) {\n\t\t\tconst chunk = this.read(this._readableState.length);\n\t\t\twebsocket._receiver.write(chunk);\n\t\t}\n\t\twebsocket._receiver.end();\n\t\tthis[kWebSocket] = void 0;\n\t\tclearTimeout(websocket._closeTimer);\n\t\tif (websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted) websocket.emitClose();\n\t\telse {\n\t\t\twebsocket._receiver.on(\"error\", receiverOnFinish);\n\t\t\twebsocket._receiver.on(\"finish\", receiverOnFinish);\n\t\t}\n\t}\n\t/**\n\t* The listener of the socket `'data'` event.\n\t*\n\t* @param {Buffer} chunk A chunk of data\n\t* @private\n\t*/\n\tfunction socketOnData(chunk) {\n\t\tif (!this[kWebSocket]._receiver.write(chunk)) this.pause();\n\t}\n\t/**\n\t* The listener of the socket `'end'` event.\n\t*\n\t* @private\n\t*/\n\tfunction socketOnEnd() {\n\t\tconst websocket = this[kWebSocket];\n\t\twebsocket._readyState = WebSocket.CLOSING;\n\t\twebsocket._receiver.end();\n\t\tthis.end();\n\t}\n\t/**\n\t* The listener of the socket `'error'` event.\n\t*\n\t* @private\n\t*/\n\tfunction socketOnError() {\n\t\tconst websocket = this[kWebSocket];\n\t\tthis.removeListener(\"error\", socketOnError);\n\t\tthis.on(\"error\", NOOP);\n\t\tif (websocket) {\n\t\t\twebsocket._readyState = WebSocket.CLOSING;\n\t\t\tthis.destroy();\n\t\t}\n\t}\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/stream.js\nvar require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\trequire_websocket();\n\tconst { Duplex: Duplex$1 } = __require(\"stream\");\n\t/**\n\t* Emits the `'close'` event on a stream.\n\t*\n\t* @param {Duplex} stream The stream.\n\t* @private\n\t*/\n\tfunction emitClose(stream) {\n\t\tstream.emit(\"close\");\n\t}\n\t/**\n\t* The listener of the `'end'` event.\n\t*\n\t* @private\n\t*/\n\tfunction duplexOnEnd() {\n\t\tif (!this.destroyed && this._writableState.finished) this.destroy();\n\t}\n\t/**\n\t* The listener of the `'error'` event.\n\t*\n\t* @param {Error} err The error\n\t* @private\n\t*/\n\tfunction duplexOnError(err) {\n\t\tthis.removeListener(\"error\", duplexOnError);\n\t\tthis.destroy();\n\t\tif (this.listenerCount(\"error\") === 0) this.emit(\"error\", err);\n\t}\n\t/**\n\t* Wraps a `WebSocket` in a duplex stream.\n\t*\n\t* @param {WebSocket} ws The `WebSocket` to wrap\n\t* @param {Object} [options] The options for the `Duplex` constructor\n\t* @return {Duplex} The duplex stream\n\t* @public\n\t*/\n\tfunction createWebSocketStream(ws, options) {\n\t\tlet terminateOnDestroy = true;\n\t\tconst duplex = new Duplex$1({\n\t\t\t...options,\n\t\t\tautoDestroy: false,\n\t\t\temitClose: false,\n\t\t\tobjectMode: false,\n\t\t\twritableObjectMode: false\n\t\t});\n\t\tws.on(\"message\", function message(msg, isBinary) {\n\t\t\tconst data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;\n\t\t\tif (!duplex.push(data)) ws.pause();\n\t\t});\n\t\tws.once(\"error\", function error(err) {\n\t\t\tif (duplex.destroyed) return;\n\t\t\tterminateOnDestroy = false;\n\t\t\tduplex.destroy(err);\n\t\t});\n\t\tws.once(\"close\", function close() {\n\t\t\tif (duplex.destroyed) return;\n\t\t\tduplex.push(null);\n\t\t});\n\t\tduplex._destroy = function(err, callback) {\n\t\t\tif (ws.readyState === ws.CLOSED) {\n\t\t\t\tcallback(err);\n\t\t\t\tprocess.nextTick(emitClose, duplex);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet called = false;\n\t\t\tws.once(\"error\", function error(err) {\n\t\t\t\tcalled = true;\n\t\t\t\tcallback(err);\n\t\t\t});\n\t\t\tws.once(\"close\", function close() {\n\t\t\t\tif (!called) callback(err);\n\t\t\t\tprocess.nextTick(emitClose, duplex);\n\t\t\t});\n\t\t\tif (terminateOnDestroy) ws.terminate();\n\t\t};\n\t\tduplex._final = function(callback) {\n\t\t\tif (ws.readyState === ws.CONNECTING) {\n\t\t\t\tws.once(\"open\", function open() {\n\t\t\t\t\tduplex._final(callback);\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (ws._socket === null) return;\n\t\t\tif (ws._socket._writableState.finished) {\n\t\t\t\tcallback();\n\t\t\t\tif (duplex._readableState.endEmitted) duplex.destroy();\n\t\t\t} else {\n\t\t\t\tws._socket.once(\"finish\", function finish() {\n\t\t\t\t\tcallback();\n\t\t\t\t});\n\t\t\t\tws.close();\n\t\t\t}\n\t\t};\n\t\tduplex._read = function() {\n\t\t\tif (ws.isPaused) ws.resume();\n\t\t};\n\t\tduplex._write = function(chunk, encoding, callback) {\n\t\t\tif (ws.readyState === ws.CONNECTING) {\n\t\t\t\tws.once(\"open\", function open() {\n\t\t\t\t\tduplex._write(chunk, encoding, callback);\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tws.send(chunk, callback);\n\t\t};\n\t\tduplex.on(\"end\", duplexOnEnd);\n\t\tduplex.on(\"error\", duplexOnError);\n\t\treturn duplex;\n\t}\n\tmodule.exports = createWebSocketStream;\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/subprotocol.js\nvar require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { tokenChars } = require_validation();\n\t/**\n\t* Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.\n\t*\n\t* @param {String} header The field value of the header\n\t* @return {Set} The subprotocol names\n\t* @public\n\t*/\n\tfunction parse(header) {\n\t\tconst protocols = /* @__PURE__ */ new Set();\n\t\tlet start = -1;\n\t\tlet end = -1;\n\t\tlet i = 0;\n\t\tfor (; i < header.length; i++) {\n\t\t\tconst code = header.charCodeAt(i);\n\t\t\tif (end === -1 && tokenChars[code] === 1) {\n\t\t\t\tif (start === -1) start = i;\n\t\t\t} else if (i !== 0 && (code === 32 || code === 9)) {\n\t\t\t\tif (end === -1 && start !== -1) end = i;\n\t\t\t} else if (code === 44) {\n\t\t\t\tif (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);\n\t\t\t\tif (end === -1) end = i;\n\t\t\t\tconst protocol = header.slice(start, end);\n\t\t\t\tif (protocols.has(protocol)) throw new SyntaxError(`The \"${protocol}\" subprotocol is duplicated`);\n\t\t\t\tprotocols.add(protocol);\n\t\t\t\tstart = end = -1;\n\t\t\t} else throw new SyntaxError(`Unexpected character at index ${i}`);\n\t\t}\n\t\tif (start === -1 || end !== -1) throw new SyntaxError(\"Unexpected end of input\");\n\t\tconst protocol = header.slice(start, i);\n\t\tif (protocols.has(protocol)) throw new SyntaxError(`The \"${protocol}\" subprotocol is duplicated`);\n\t\tprotocols.add(protocol);\n\t\treturn protocols;\n\t}\n\tmodule.exports = { parse };\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket-server.js\nvar require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst EventEmitter = __require(\"events\");\n\tconst http = __require(\"http\");\n\tconst { Duplex } = __require(\"stream\");\n\tconst { createHash } = __require(\"crypto\");\n\tconst extension = require_extension();\n\tconst PerMessageDeflate = require_permessage_deflate();\n\tconst subprotocol = require_subprotocol();\n\tconst WebSocket = require_websocket();\n\tconst { CLOSE_TIMEOUT, GUID, kWebSocket } = require_constants();\n\tconst keyRegex = /^[+/0-9A-Za-z]{22}==$/;\n\tconst RUNNING = 0;\n\tconst CLOSING = 1;\n\tconst CLOSED = 2;\n\t/**\n\t* Class representing a WebSocket server.\n\t*\n\t* @extends EventEmitter\n\t*/\n\tvar WebSocketServer = class extends EventEmitter {\n\t\t/**\n\t\t* Create a `WebSocketServer` instance.\n\t\t*\n\t\t* @param {Object} options Configuration options\n\t\t* @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether\n\t\t* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted\n\t\t* multiple times in the same tick\n\t\t* @param {Boolean} [options.autoPong=true] Specifies whether or not to\n\t\t* automatically send a pong in response to a ping\n\t\t* @param {Number} [options.backlog=511] The maximum length of the queue of\n\t\t* pending connections\n\t\t* @param {Boolean} [options.clientTracking=true] Specifies whether or not to\n\t\t* track clients\n\t\t* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to\n\t\t* wait for the closing handshake to finish after `websocket.close()` is\n\t\t* called\n\t\t* @param {Function} [options.handleProtocols] A hook to handle protocols\n\t\t* @param {String} [options.host] The hostname where to bind the server\n\t\t* @param {Number} [options.maxPayload=104857600] The maximum allowed message\n\t\t* size\n\t\t* @param {Boolean} [options.noServer=false] Enable no server mode\n\t\t* @param {String} [options.path] Accept only connections matching this path\n\t\t* @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable\n\t\t* permessage-deflate\n\t\t* @param {Number} [options.port] The port where to bind the server\n\t\t* @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S\n\t\t* server to use\n\t\t* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or\n\t\t* not to skip UTF-8 validation for text and close messages\n\t\t* @param {Function} [options.verifyClient] A hook to reject connections\n\t\t* @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket`\n\t\t* class to use. It must be the `WebSocket` class or class that extends it\n\t\t* @param {Function} [callback] A listener for the `listening` event\n\t\t*/\n\t\tconstructor(options, callback) {\n\t\t\tsuper();\n\t\t\toptions = {\n\t\t\t\tallowSynchronousEvents: true,\n\t\t\t\tautoPong: true,\n\t\t\t\tmaxPayload: 100 * 1024 * 1024,\n\t\t\t\tskipUTF8Validation: false,\n\t\t\t\tperMessageDeflate: false,\n\t\t\t\thandleProtocols: null,\n\t\t\t\tclientTracking: true,\n\t\t\t\tcloseTimeout: CLOSE_TIMEOUT,\n\t\t\t\tverifyClient: null,\n\t\t\t\tnoServer: false,\n\t\t\t\tbacklog: null,\n\t\t\t\tserver: null,\n\t\t\t\thost: null,\n\t\t\t\tpath: null,\n\t\t\t\tport: null,\n\t\t\t\tWebSocket,\n\t\t\t\t...options\n\t\t\t};\n\t\t\tif (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) throw new TypeError(\"One and only one of the \\\"port\\\", \\\"server\\\", or \\\"noServer\\\" options must be specified\");\n\t\t\tif (options.port != null) {\n\t\t\t\tthis._server = http.createServer((req, res) => {\n\t\t\t\t\tconst body = http.STATUS_CODES[426];\n\t\t\t\t\tres.writeHead(426, {\n\t\t\t\t\t\t\"Content-Length\": body.length,\n\t\t\t\t\t\t\"Content-Type\": \"text/plain\"\n\t\t\t\t\t});\n\t\t\t\t\tres.end(body);\n\t\t\t\t});\n\t\t\t\tthis._server.listen(options.port, options.host, options.backlog, callback);\n\t\t\t} else if (options.server) this._server = options.server;\n\t\t\tif (this._server) {\n\t\t\t\tconst emitConnection = this.emit.bind(this, \"connection\");\n\t\t\t\tthis._removeListeners = addListeners(this._server, {\n\t\t\t\t\tlistening: this.emit.bind(this, \"listening\"),\n\t\t\t\t\terror: this.emit.bind(this, \"error\"),\n\t\t\t\t\tupgrade: (req, socket, head) => {\n\t\t\t\t\t\tthis.handleUpgrade(req, socket, head, emitConnection);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (options.perMessageDeflate === true) options.perMessageDeflate = {};\n\t\t\tif (options.clientTracking) {\n\t\t\t\tthis.clients = /* @__PURE__ */ new Set();\n\t\t\t\tthis._shouldEmitClose = false;\n\t\t\t}\n\t\t\tthis.options = options;\n\t\t\tthis._state = RUNNING;\n\t\t}\n\t\t/**\n\t\t* Returns the bound address, the address family name, and port of the server\n\t\t* as reported by the operating system if listening on an IP socket.\n\t\t* If the server is listening on a pipe or UNIX domain socket, the name is\n\t\t* returned as a string.\n\t\t*\n\t\t* @return {(Object|String|null)} The address of the server\n\t\t* @public\n\t\t*/\n\t\taddress() {\n\t\t\tif (this.options.noServer) throw new Error(\"The server is operating in \\\"noServer\\\" mode\");\n\t\t\tif (!this._server) return null;\n\t\t\treturn this._server.address();\n\t\t}\n\t\t/**\n\t\t* Stop the server from accepting new connections and emit the `'close'` event\n\t\t* when all existing connections are closed.\n\t\t*\n\t\t* @param {Function} [cb] A one-time listener for the `'close'` event\n\t\t* @public\n\t\t*/\n\t\tclose(cb) {\n\t\t\tif (this._state === CLOSED) {\n\t\t\t\tif (cb) this.once(\"close\", () => {\n\t\t\t\t\tcb(/* @__PURE__ */ new Error(\"The server is not running\"));\n\t\t\t\t});\n\t\t\t\tprocess.nextTick(emitClose, this);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (cb) this.once(\"close\", cb);\n\t\t\tif (this._state === CLOSING) return;\n\t\t\tthis._state = CLOSING;\n\t\t\tif (this.options.noServer || this.options.server) {\n\t\t\t\tif (this._server) {\n\t\t\t\t\tthis._removeListeners();\n\t\t\t\t\tthis._removeListeners = this._server = null;\n\t\t\t\t}\n\t\t\t\tif (this.clients) if (!this.clients.size) process.nextTick(emitClose, this);\n\t\t\t\telse this._shouldEmitClose = true;\n\t\t\t\telse process.nextTick(emitClose, this);\n\t\t\t} else {\n\t\t\t\tconst server = this._server;\n\t\t\t\tthis._removeListeners();\n\t\t\t\tthis._removeListeners = this._server = null;\n\t\t\t\tserver.close(() => {\n\t\t\t\t\temitClose(this);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* See if a given request should be handled by this server instance.\n\t\t*\n\t\t* @param {http.IncomingMessage} req Request object to inspect\n\t\t* @return {Boolean} `true` if the request is valid, else `false`\n\t\t* @public\n\t\t*/\n\t\tshouldHandle(req) {\n\t\t\tif (this.options.path) {\n\t\t\t\tconst index = req.url.indexOf(\"?\");\n\t\t\t\tif ((index !== -1 ? req.url.slice(0, index) : req.url) !== this.options.path) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t/**\n\t\t* Handle a HTTP Upgrade request.\n\t\t*\n\t\t* @param {http.IncomingMessage} req The request object\n\t\t* @param {Duplex} socket The network socket between the server and client\n\t\t* @param {Buffer} head The first packet of the upgraded stream\n\t\t* @param {Function} cb Callback\n\t\t* @public\n\t\t*/\n\t\thandleUpgrade(req, socket, head, cb) {\n\t\t\tsocket.on(\"error\", socketOnError);\n\t\t\tconst key = req.headers[\"sec-websocket-key\"];\n\t\t\tconst upgrade = req.headers.upgrade;\n\t\t\tconst version = +req.headers[\"sec-websocket-version\"];\n\t\t\tif (req.method !== \"GET\") {\n\t\t\t\tabortHandshakeOrEmitwsClientError(this, req, socket, 405, \"Invalid HTTP method\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (upgrade === void 0 || upgrade.toLowerCase() !== \"websocket\") {\n\t\t\t\tabortHandshakeOrEmitwsClientError(this, req, socket, 400, \"Invalid Upgrade header\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (key === void 0 || !keyRegex.test(key)) {\n\t\t\t\tabortHandshakeOrEmitwsClientError(this, req, socket, 400, \"Missing or invalid Sec-WebSocket-Key header\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (version !== 13 && version !== 8) {\n\t\t\t\tabortHandshakeOrEmitwsClientError(this, req, socket, 400, \"Missing or invalid Sec-WebSocket-Version header\", { \"Sec-WebSocket-Version\": \"13, 8\" });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this.shouldHandle(req)) {\n\t\t\t\tabortHandshake(socket, 400);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst secWebSocketProtocol = req.headers[\"sec-websocket-protocol\"];\n\t\t\tlet protocols = /* @__PURE__ */ new Set();\n\t\t\tif (secWebSocketProtocol !== void 0) try {\n\t\t\t\tprotocols = subprotocol.parse(secWebSocketProtocol);\n\t\t\t} catch (err) {\n\t\t\t\tabortHandshakeOrEmitwsClientError(this, req, socket, 400, \"Invalid Sec-WebSocket-Protocol header\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst secWebSocketExtensions = req.headers[\"sec-websocket-extensions\"];\n\t\t\tconst extensions = {};\n\t\t\tif (this.options.perMessageDeflate && secWebSocketExtensions !== void 0) {\n\t\t\t\tconst perMessageDeflate = new PerMessageDeflate(this.options.perMessageDeflate, true, this.options.maxPayload);\n\t\t\t\ttry {\n\t\t\t\t\tconst offers = extension.parse(secWebSocketExtensions);\n\t\t\t\t\tif (offers[PerMessageDeflate.extensionName]) {\n\t\t\t\t\t\tperMessageDeflate.accept(offers[PerMessageDeflate.extensionName]);\n\t\t\t\t\t\textensions[PerMessageDeflate.extensionName] = perMessageDeflate;\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\tabortHandshakeOrEmitwsClientError(this, req, socket, 400, \"Invalid or unacceptable Sec-WebSocket-Extensions header\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.options.verifyClient) {\n\t\t\t\tconst info = {\n\t\t\t\t\torigin: req.headers[`${version === 8 ? \"sec-websocket-origin\" : \"origin\"}`],\n\t\t\t\t\tsecure: !!(req.socket.authorized || req.socket.encrypted),\n\t\t\t\t\treq\n\t\t\t\t};\n\t\t\t\tif (this.options.verifyClient.length === 2) {\n\t\t\t\t\tthis.options.verifyClient(info, (verified, code, message, headers) => {\n\t\t\t\t\t\tif (!verified) return abortHandshake(socket, code || 401, message, headers);\n\t\t\t\t\t\tthis.completeUpgrade(extensions, key, protocols, req, socket, head, cb);\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!this.options.verifyClient(info)) return abortHandshake(socket, 401);\n\t\t\t}\n\t\t\tthis.completeUpgrade(extensions, key, protocols, req, socket, head, cb);\n\t\t}\n\t\t/**\n\t\t* Upgrade the connection to WebSocket.\n\t\t*\n\t\t* @param {Object} extensions The accepted extensions\n\t\t* @param {String} key The value of the `Sec-WebSocket-Key` header\n\t\t* @param {Set} protocols The subprotocols\n\t\t* @param {http.IncomingMessage} req The request object\n\t\t* @param {Duplex} socket The network socket between the server and client\n\t\t* @param {Buffer} head The first packet of the upgraded stream\n\t\t* @param {Function} cb Callback\n\t\t* @throws {Error} If called more than once with the same socket\n\t\t* @private\n\t\t*/\n\t\tcompleteUpgrade(extensions, key, protocols, req, socket, head, cb) {\n\t\t\tif (!socket.readable || !socket.writable) return socket.destroy();\n\t\t\tif (socket[kWebSocket]) throw new Error(\"server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration\");\n\t\t\tif (this._state > RUNNING) return abortHandshake(socket, 503);\n\t\t\tconst headers = [\n\t\t\t\t\"HTTP/1.1 101 Switching Protocols\",\n\t\t\t\t\"Upgrade: websocket\",\n\t\t\t\t\"Connection: Upgrade\",\n\t\t\t\t`Sec-WebSocket-Accept: ${createHash(\"sha1\").update(key + GUID).digest(\"base64\")}`\n\t\t\t];\n\t\t\tconst ws = new this.options.WebSocket(null, void 0, this.options);\n\t\t\tif (protocols.size) {\n\t\t\t\tconst protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;\n\t\t\t\tif (protocol) {\n\t\t\t\t\theaders.push(`Sec-WebSocket-Protocol: ${protocol}`);\n\t\t\t\t\tws._protocol = protocol;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (extensions[PerMessageDeflate.extensionName]) {\n\t\t\t\tconst params = extensions[PerMessageDeflate.extensionName].params;\n\t\t\t\tconst value = extension.format({ [PerMessageDeflate.extensionName]: [params] });\n\t\t\t\theaders.push(`Sec-WebSocket-Extensions: ${value}`);\n\t\t\t\tws._extensions = extensions;\n\t\t\t}\n\t\t\tthis.emit(\"headers\", headers, req);\n\t\t\tsocket.write(headers.concat(\"\\r\\n\").join(\"\\r\\n\"));\n\t\t\tsocket.removeListener(\"error\", socketOnError);\n\t\t\tws.setSocket(socket, head, {\n\t\t\t\tallowSynchronousEvents: this.options.allowSynchronousEvents,\n\t\t\t\tmaxPayload: this.options.maxPayload,\n\t\t\t\tskipUTF8Validation: this.options.skipUTF8Validation\n\t\t\t});\n\t\t\tif (this.clients) {\n\t\t\t\tthis.clients.add(ws);\n\t\t\t\tws.on(\"close\", () => {\n\t\t\t\t\tthis.clients.delete(ws);\n\t\t\t\t\tif (this._shouldEmitClose && !this.clients.size) process.nextTick(emitClose, this);\n\t\t\t\t});\n\t\t\t}\n\t\t\tcb(ws, req);\n\t\t}\n\t};\n\tmodule.exports = WebSocketServer;\n\t/**\n\t* Add event listeners on an `EventEmitter` using a map of \n\t* pairs.\n\t*\n\t* @param {EventEmitter} server The event emitter\n\t* @param {Object.} map The listeners to add\n\t* @return {Function} A function that will remove the added listeners when\n\t* called\n\t* @private\n\t*/\n\tfunction addListeners(server, map) {\n\t\tfor (const event of Object.keys(map)) server.on(event, map[event]);\n\t\treturn function removeListeners() {\n\t\t\tfor (const event of Object.keys(map)) server.removeListener(event, map[event]);\n\t\t};\n\t}\n\t/**\n\t* Emit a `'close'` event on an `EventEmitter`.\n\t*\n\t* @param {EventEmitter} server The event emitter\n\t* @private\n\t*/\n\tfunction emitClose(server) {\n\t\tserver._state = CLOSED;\n\t\tserver.emit(\"close\");\n\t}\n\t/**\n\t* Handle socket errors.\n\t*\n\t* @private\n\t*/\n\tfunction socketOnError() {\n\t\tthis.destroy();\n\t}\n\t/**\n\t* Close the connection when preconditions are not fulfilled.\n\t*\n\t* @param {Duplex} socket The socket of the upgrade request\n\t* @param {Number} code The HTTP response status code\n\t* @param {String} [message] The HTTP response body\n\t* @param {Object} [headers] Additional HTTP response headers\n\t* @private\n\t*/\n\tfunction abortHandshake(socket, code, message, headers) {\n\t\tmessage = message || http.STATUS_CODES[code];\n\t\theaders = {\n\t\t\tConnection: \"close\",\n\t\t\t\"Content-Type\": \"text/html\",\n\t\t\t\"Content-Length\": Buffer.byteLength(message),\n\t\t\t...headers\n\t\t};\n\t\tsocket.once(\"finish\", socket.destroy);\n\t\tsocket.end(`HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\\r\\n` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join(\"\\r\\n\") + \"\\r\\n\\r\\n\" + message);\n\t}\n\t/**\n\t* Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least\n\t* one listener for it, otherwise call `abortHandshake()`.\n\t*\n\t* @param {WebSocketServer} server The WebSocket server\n\t* @param {http.IncomingMessage} req The request object\n\t* @param {Duplex} socket The socket of the upgrade request\n\t* @param {Number} code The HTTP response status code\n\t* @param {String} message The HTTP response body\n\t* @param {Object} [headers] The HTTP response headers\n\t* @private\n\t*/\n\tfunction abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) {\n\t\tif (server.listenerCount(\"wsClientError\")) {\n\t\t\tconst err = new Error(message);\n\t\t\tError.captureStackTrace(err, abortHandshakeOrEmitwsClientError);\n\t\t\tserver.emit(\"wsClientError\", err, socket, req);\n\t\t} else abortHandshake(socket, code, message, headers);\n\t}\n}));\n\n//#endregion\n//#region node_modules/.pnpm/ws@8.19.0/node_modules/ws/wrapper.mjs\nvar import_stream = /* @__PURE__ */ __toESM(require_stream(), 1);\nvar import_receiver = /* @__PURE__ */ __toESM(require_receiver(), 1);\nvar import_sender = /* @__PURE__ */ __toESM(require_sender(), 1);\nvar import_websocket = /* @__PURE__ */ __toESM(require_websocket(), 1);\nvar import_websocket_server = /* @__PURE__ */ __toESM(require_websocket_server(), 1);\n\n//#endregion\nexport { import_websocket_server as n, import_websocket as t };","//#region src/utils.ts\nconst kNodeInspect = /* @__PURE__ */ Symbol.for(\"nodejs.util.inspect.custom\");\nfunction toBufferLike(val) {\n\tif (val === void 0 || val === null) return \"\";\n\tconst type = typeof val;\n\tif (type === \"string\") return val;\n\tif (type === \"number\" || type === \"boolean\" || type === \"bigint\") return val.toString();\n\tif (type === \"function\" || type === \"symbol\") return \"{}\";\n\tif (val instanceof Uint8Array || val instanceof ArrayBuffer) return val;\n\tif (isPlainObject(val)) return JSON.stringify(val);\n\treturn val;\n}\nfunction toString(val) {\n\tif (typeof val === \"string\") return val;\n\tconst data = toBufferLike(val);\n\tif (typeof data === \"string\") return data;\n\treturn `data:application/octet-stream;base64,${btoa(String.fromCharCode(...new Uint8Array(data)))}`;\n}\nfunction isPlainObject(value) {\n\tif (value === null || typeof value !== \"object\") return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\tif (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;\n\tif (Symbol.iterator in value) return false;\n\tif (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === \"[object Module]\";\n\treturn true;\n}\n\n//#endregion\n//#region src/message.ts\nvar Message = class {\n\t/** Access to the original [message event](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/message_event) if available. */\n\tevent;\n\t/** Access to the Peer that emitted the message. */\n\tpeer;\n\t/** Raw message data (can be of any type). */\n\trawData;\n\t#id;\n\t#uint8Array;\n\t#arrayBuffer;\n\t#blob;\n\t#text;\n\t#json;\n\tconstructor(rawData, peer, event) {\n\t\tthis.rawData = rawData || \"\";\n\t\tthis.peer = peer;\n\t\tthis.event = event;\n\t}\n\t/**\n\t* Unique random [uuid v4](https://developer.mozilla.org/en-US/docs/Glossary/UUID) identifier for the message.\n\t*/\n\tget id() {\n\t\tif (!this.#id) this.#id = crypto.randomUUID();\n\t\treturn this.#id;\n\t}\n\t/**\n\t* Get data as [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) value.\n\t*\n\t* If raw data is in any other format or string, it will be automatically converted and encoded.\n\t*/\n\tuint8Array() {\n\t\tconst _uint8Array = this.#uint8Array;\n\t\tif (_uint8Array) return _uint8Array;\n\t\tconst rawData = this.rawData;\n\t\tif (rawData instanceof Uint8Array) return this.#uint8Array = rawData;\n\t\tif (rawData instanceof ArrayBuffer || rawData instanceof SharedArrayBuffer) {\n\t\t\tthis.#arrayBuffer = rawData;\n\t\t\treturn this.#uint8Array = new Uint8Array(rawData);\n\t\t}\n\t\tif (typeof rawData === \"string\") {\n\t\t\tthis.#text = rawData;\n\t\t\treturn this.#uint8Array = new TextEncoder().encode(this.#text);\n\t\t}\n\t\tif (Symbol.iterator in rawData) return this.#uint8Array = new Uint8Array(rawData);\n\t\tif (typeof rawData?.length === \"number\") return this.#uint8Array = new Uint8Array(rawData);\n\t\tif (rawData instanceof DataView) return this.#uint8Array = new Uint8Array(rawData.buffer, rawData.byteOffset, rawData.byteLength);\n\t\tthrow new TypeError(`Unsupported message type: ${Object.prototype.toString.call(rawData)}`);\n\t}\n\t/**\n\t* Get data as [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) value.\n\t*\n\t* If raw data is in any other format or string, it will be automatically converted and encoded.\n\t*/\n\tarrayBuffer() {\n\t\tconst _arrayBuffer = this.#arrayBuffer;\n\t\tif (_arrayBuffer) return _arrayBuffer;\n\t\tconst rawData = this.rawData;\n\t\tif (rawData instanceof ArrayBuffer || rawData instanceof SharedArrayBuffer) return this.#arrayBuffer = rawData;\n\t\treturn this.#arrayBuffer = this.uint8Array().buffer;\n\t}\n\t/**\n\t* Get data as [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) value.\n\t*\n\t* If raw data is in any other format or string, it will be automatically converted and encoded. */\n\tblob() {\n\t\tconst _blob = this.#blob;\n\t\tif (_blob) return _blob;\n\t\tconst rawData = this.rawData;\n\t\tif (rawData instanceof Blob) return this.#blob = rawData;\n\t\treturn this.#blob = new Blob([this.uint8Array()]);\n\t}\n\t/**\n\t* Get stringified text version of the message.\n\t*\n\t* If raw data is in any other format, it will be automatically converted and decoded.\n\t*/\n\ttext() {\n\t\tconst _text = this.#text;\n\t\tif (_text) return _text;\n\t\tconst rawData = this.rawData;\n\t\tif (typeof rawData === \"string\") return this.#text = rawData;\n\t\treturn this.#text = new TextDecoder().decode(this.uint8Array());\n\t}\n\t/**\n\t* Get parsed version of the message text with [`JSON.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).\n\t*/\n\tjson() {\n\t\tconst _json = this.#json;\n\t\tif (_json) return _json;\n\t\treturn this.#json = JSON.parse(this.text());\n\t}\n\t/**\n\t* Message data (value varies based on `peer.websocket.binaryType`).\n\t*/\n\tget data() {\n\t\tswitch (this.peer?.websocket?.binaryType) {\n\t\t\tcase \"arraybuffer\": return this.arrayBuffer();\n\t\t\tcase \"blob\": return this.blob();\n\t\t\tcase \"nodebuffer\": return globalThis.Buffer ? Buffer.from(this.uint8Array()) : this.uint8Array();\n\t\t\tcase \"uint8array\": return this.uint8Array();\n\t\t\tcase \"text\": return this.text();\n\t\t\tdefault: return this.rawData;\n\t\t}\n\t}\n\ttoString() {\n\t\treturn this.text();\n\t}\n\t[Symbol.toPrimitive]() {\n\t\treturn this.text();\n\t}\n\t[kNodeInspect]() {\n\t\treturn { message: {\n\t\t\tid: this.id,\n\t\t\tpeer: this.peer,\n\t\t\ttext: this.text()\n\t\t} };\n\t}\n};\n\n//#endregion\n//#region src/peer.ts\nvar Peer = class {\n\t_internal;\n\t_topics;\n\t_id;\n\t#ws;\n\tconstructor(internal) {\n\t\tthis._topics = /* @__PURE__ */ new Set();\n\t\tthis._internal = internal;\n\t}\n\tget context() {\n\t\treturn this._internal.context ??= {};\n\t}\n\tget namespace() {\n\t\treturn this._internal.namespace;\n\t}\n\t/**\n\t* Unique random [uuid v4](https://developer.mozilla.org/en-US/docs/Glossary/UUID) identifier for the peer.\n\t*/\n\tget id() {\n\t\tif (!this._id) this._id = crypto.randomUUID();\n\t\treturn this._id;\n\t}\n\t/** IP address of the peer */\n\tget remoteAddress() {}\n\t/** upgrade request */\n\tget request() {\n\t\treturn this._internal.request;\n\t}\n\t/**\n\t* Get the [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) instance.\n\t*\n\t* **Note:** crossws adds polyfill for the following properties if native values are not available:\n\t* - `protocol`: Extracted from the `sec-websocket-protocol` header.\n\t* - `extensions`: Extracted from the `sec-websocket-extensions` header.\n\t* - `url`: Extracted from the request URL (http -> ws).\n\t* */\n\tget websocket() {\n\t\tif (!this.#ws) {\n\t\t\tconst _ws = this._internal.ws;\n\t\t\tconst _request = this._internal.request;\n\t\t\tthis.#ws = _request ? createWsProxy(_ws, _request) : _ws;\n\t\t}\n\t\treturn this.#ws;\n\t}\n\t/** All connected peers to the server */\n\tget peers() {\n\t\treturn this._internal.peers || /* @__PURE__ */ new Set();\n\t}\n\t/** All topics, this peer has been subscribed to. */\n\tget topics() {\n\t\treturn this._topics;\n\t}\n\t/** Abruptly close the connection */\n\tterminate() {\n\t\tthis.close();\n\t}\n\t/** Subscribe to a topic */\n\tsubscribe(topic) {\n\t\tthis._topics.add(topic);\n\t}\n\t/** Unsubscribe from a topic */\n\tunsubscribe(topic) {\n\t\tthis._topics.delete(topic);\n\t}\n\ttoString() {\n\t\treturn this.id;\n\t}\n\t[Symbol.toPrimitive]() {\n\t\treturn this.id;\n\t}\n\t[Symbol.toStringTag]() {\n\t\treturn \"WebSocket\";\n\t}\n\t[kNodeInspect]() {\n\t\treturn { peer: {\n\t\t\tid: this.id,\n\t\t\tip: this.remoteAddress\n\t\t} };\n\t}\n};\nfunction createWsProxy(ws, request) {\n\treturn new Proxy(ws, { get: (target, prop) => {\n\t\tconst value = Reflect.get(target, prop);\n\t\tif (!value) switch (prop) {\n\t\t\tcase \"protocol\": return request?.headers?.get(\"sec-websocket-protocol\") || \"\";\n\t\t\tcase \"extensions\": return request?.headers?.get(\"sec-websocket-extensions\") || \"\";\n\t\t\tcase \"url\": return request?.url?.replace(/^http/, \"ws\") || void 0;\n\t\t}\n\t\treturn value;\n\t} });\n}\n\n//#endregion\nexport { toString as i, Message as n, toBufferLike as r, Peer as t };","//#region src/_request.ts\nconst StubRequest = /* @__PURE__ */ (() => {\n\tclass StubRequest {\n\t\turl;\n\t\t_abortController;\n\t\t_headers;\n\t\t_init;\n\t\tconstructor(url, init = {}) {\n\t\t\tthis.url = url;\n\t\t\tthis._init = init;\n\t\t}\n\t\tget headers() {\n\t\t\tif (!this._headers) this._headers = new Headers(this._init?.headers);\n\t\t\treturn this._headers;\n\t\t}\n\t\tclone() {\n\t\t\treturn new StubRequest(this.url, this._init);\n\t\t}\n\t\tget method() {\n\t\t\treturn \"GET\";\n\t\t}\n\t\tget signal() {\n\t\t\tif (!this._abortController) this._abortController = new AbortController();\n\t\t\treturn this._abortController.signal;\n\t\t}\n\t\tget cache() {\n\t\t\treturn \"default\";\n\t\t}\n\t\tget credentials() {\n\t\t\treturn \"same-origin\";\n\t\t}\n\t\tget destination() {\n\t\t\treturn \"\";\n\t\t}\n\t\tget integrity() {\n\t\t\treturn \"\";\n\t\t}\n\t\tget keepalive() {\n\t\t\treturn false;\n\t\t}\n\t\tget redirect() {\n\t\t\treturn \"follow\";\n\t\t}\n\t\tget mode() {\n\t\t\treturn \"cors\";\n\t\t}\n\t\tget referrer() {\n\t\t\treturn \"about:client\";\n\t\t}\n\t\tget referrerPolicy() {\n\t\t\treturn \"\";\n\t\t}\n\t\tget body() {\n\t\t\treturn null;\n\t\t}\n\t\tget bodyUsed() {\n\t\t\treturn false;\n\t\t}\n\t\tarrayBuffer() {\n\t\t\treturn Promise.resolve(/* @__PURE__ */ new ArrayBuffer(0));\n\t\t}\n\t\tblob() {\n\t\t\treturn Promise.resolve(new Blob());\n\t\t}\n\t\tbytes() {\n\t\t\treturn Promise.resolve(new Uint8Array());\n\t\t}\n\t\tformData() {\n\t\t\treturn Promise.resolve(new FormData());\n\t\t}\n\t\tjson() {\n\t\t\treturn Promise.resolve(JSON.parse(\"\"));\n\t\t}\n\t\ttext() {\n\t\t\treturn Promise.resolve(\"\");\n\t\t}\n\t}\n\tObject.setPrototypeOf(StubRequest.prototype, globalThis.Request.prototype);\n\treturn StubRequest;\n})();\n\n//#endregion\nexport { StubRequest as t };","//#region src/error.ts\nvar WSError = class extends Error {\n\tconstructor(...args) {\n\t\tsuper(...args);\n\t\tthis.name = \"WSError\";\n\t}\n};\n\n//#endregion\nexport { WSError as t };","import \"../_chunks/rolldown-runtime.mjs\";\nimport { i as AdapterHookable, r as getPeers, t as adapterUtils } from \"../_chunks/adapter.mjs\";\nimport { n as import_websocket_server } from \"../_chunks/libs/ws.mjs\";\nimport { n as Message, r as toBufferLike, t as Peer } from \"../_chunks/peer.mjs\";\nimport { t as StubRequest } from \"../_chunks/_request.mjs\";\nimport { t as WSError } from \"../_chunks/error.mjs\";\n\n//#region src/adapters/node.ts\nconst nodeAdapter = (options = {}) => {\n\tif (\"Deno\" in globalThis || \"Bun\" in globalThis) throw new Error(\"[crossws] Using Node.js adapter in an incompatible environment.\");\n\tconst hooks = new AdapterHookable(options);\n\tconst globalPeers = /* @__PURE__ */ new Map();\n\tconst wss = options.wss || new import_websocket_server.default({\n\t\tnoServer: true,\n\t\thandleProtocols: () => false,\n\t\t...options.serverOptions\n\t});\n\twss.on(\"connection\", (ws, nodeReq) => {\n\t\tconst request = new NodeReqProxy(nodeReq);\n\t\tconst peers = getPeers(globalPeers, nodeReq._namespace);\n\t\tconst peer = new NodePeer({\n\t\t\tws,\n\t\t\trequest,\n\t\t\tpeers,\n\t\t\tnodeReq,\n\t\t\tnamespace: nodeReq._namespace\n\t\t});\n\t\tpeers.add(peer);\n\t\thooks.callHook(\"open\", peer);\n\t\tws.on(\"message\", (data) => {\n\t\t\tif (Array.isArray(data)) data = Buffer.concat(data);\n\t\t\thooks.callHook(\"message\", peer, new Message(data, peer));\n\t\t});\n\t\tws.on(\"error\", (error) => {\n\t\t\tpeers.delete(peer);\n\t\t\thooks.callHook(\"error\", peer, new WSError(error));\n\t\t});\n\t\tws.on(\"close\", (code, reason) => {\n\t\t\tpeers.delete(peer);\n\t\t\thooks.callHook(\"close\", peer, {\n\t\t\t\tcode,\n\t\t\t\treason: reason?.toString()\n\t\t\t});\n\t\t});\n\t});\n\twss.on(\"headers\", (outgoingHeaders, req) => {\n\t\tconst upgradeHeaders = req._upgradeHeaders;\n\t\tif (upgradeHeaders) for (const [key, value] of new Headers(upgradeHeaders)) outgoingHeaders.push(`${key}: ${value}`);\n\t});\n\treturn {\n\t\t...adapterUtils(globalPeers),\n\t\thandleUpgrade: async (nodeReq, socket, head, webRequest) => {\n\t\t\tconst request = webRequest || new NodeReqProxy(nodeReq);\n\t\t\tconst { upgradeHeaders, endResponse, context, namespace } = await hooks.upgrade(request);\n\t\t\tif (endResponse) return sendResponse(socket, endResponse);\n\t\t\tnodeReq._request = request;\n\t\t\tnodeReq._upgradeHeaders = upgradeHeaders;\n\t\t\tnodeReq._context = context;\n\t\t\tnodeReq._namespace = namespace;\n\t\t\twss.handleUpgrade(nodeReq, socket, head, (ws) => {\n\t\t\t\twss.emit(\"connection\", ws, nodeReq);\n\t\t\t});\n\t\t},\n\t\tcloseAll: (code, data, force) => {\n\t\t\tfor (const client of wss.clients) if (force) client.terminate();\n\t\t\telse client.close(code, data);\n\t\t}\n\t};\n};\nvar node_default = nodeAdapter;\nvar NodePeer = class extends Peer {\n\tget remoteAddress() {\n\t\treturn this._internal.nodeReq.socket?.remoteAddress;\n\t}\n\tget context() {\n\t\treturn this._internal.nodeReq._context;\n\t}\n\tsend(data, options) {\n\t\tconst dataBuff = toBufferLike(data);\n\t\tconst isBinary = typeof dataBuff !== \"string\";\n\t\tthis._internal.ws.send(dataBuff, {\n\t\t\tcompress: options?.compress,\n\t\t\tbinary: isBinary,\n\t\t\t...options\n\t\t});\n\t\treturn 0;\n\t}\n\tpublish(topic, data, options) {\n\t\tconst dataBuff = toBufferLike(data);\n\t\tconst isBinary = typeof data !== \"string\";\n\t\tconst sendOptions = {\n\t\t\tcompress: options?.compress,\n\t\t\tbinary: isBinary,\n\t\t\t...options\n\t\t};\n\t\tfor (const peer of this._internal.peers) if (peer !== this && peer._topics.has(topic)) peer._internal.ws.send(dataBuff, sendOptions);\n\t}\n\tclose(code, data) {\n\t\tthis._internal.ws.close(code, data);\n\t}\n\tterminate() {\n\t\tthis._internal.ws.terminate();\n\t}\n};\nvar NodeReqProxy = class extends StubRequest {\n\tconstructor(req) {\n\t\tconst host = req.headers[\"host\"] || \"localhost\";\n\t\tconst url = `${req.socket?.encrypted ?? req.headers[\"x-forwarded-proto\"] === \"https\" ? \"https\" : \"http\"}://${host}${req.url}`;\n\t\tsuper(url, { headers: req.headers });\n\t}\n};\nasync function sendResponse(socket, res) {\n\tconst head = [`HTTP/1.1 ${res.status || 200} ${res.statusText || \"\"}`, ...[...res.headers.entries()].map(([key, value]) => `${encodeURIComponent(key)}: ${encodeURIComponent(value)}`)];\n\tsocket.write(head.join(\"\\r\\n\") + \"\\r\\n\\r\\n\");\n\tif (res.body) for await (const chunk of res.body) socket.write(chunk);\n\treturn new Promise((resolve) => {\n\t\tsocket.end(() => {\n\t\t\tsocket.destroy();\n\t\t\tresolve();\n\t\t});\n\t});\n}\n\n//#endregion\nexport { node_default as default };","import type {\n\tServer as HTTPServer,\n\tIncomingMessage,\n\tServerResponse,\n} from \"node:http\";\nimport { createServer } from \"node:http\";\nimport type { AddressInfo } from \"node:net\";\nimport type { ListenOptions } from \"node:net\";\nimport crossws from \"crossws/adapters/node\";\nimport kleur from \"kleur\";\nimport meta from \"../package.json\" assert { type: \"json\" };\nimport { Hocuspocus, defaultConfiguration } from \"./Hocuspocus.ts\";\nimport type { Configuration, WebSocketLike, onListenPayload } from \"./types.ts\";\n\nexport interface ServerConfiguration\n\textends Configuration {\n\tport?: number;\n\taddress?: string;\n\tstopOnSignals?: boolean;\n\t/**\n\t * Options passed to the underlying WebSocket server (ws).\n\t * Supports all ws ServerOptions, e.g. { maxPayload: 1024 * 1024 }\n\t */\n\twebsocketOptions?: Record;\n}\n\nexport const defaultServerConfiguration = {\n\tport: 80,\n\taddress: \"0.0.0.0\",\n\tstopOnSignals: true,\n};\n\nexport class Server {\n\thttpServer: HTTPServer;\n\n\tprivate crossws: ReturnType;\n\n\thocuspocus: Hocuspocus;\n\n\tconfiguration: ServerConfiguration = {\n\t\t...defaultConfiguration,\n\t\t...defaultServerConfiguration,\n\t\textensions: [],\n\t};\n\n\tconstructor(configuration?: Partial>) {\n\t\tif (configuration) {\n\t\t\tthis.configuration = {\n\t\t\t\t...this.configuration,\n\t\t\t\t...configuration,\n\t\t\t};\n\t\t}\n\n\t\tthis.hocuspocus = new Hocuspocus(this.configuration);\n\t\tthis.hocuspocus.server = this;\n\n\t\tthis.httpServer = createServer(this.requestHandler);\n\t\tthis.crossws = crossws({\n\t\t\tserverOptions: this.configuration.websocketOptions,\n\t\t\thooks: {\n\t\t\t\topen: (peer) => {\n\t\t\t\t\tconst clientConnection = this.hocuspocus.handleConnection(\n\t\t\t\t\t\tpeer.websocket as unknown as WebSocketLike,\n\t\t\t\t\t\tpeer.request as Request,\n\t\t\t\t\t);\n\t\t\t\t\t(peer as any)._hocuspocus = clientConnection;\n\t\t\t\t},\n\t\t\t\tmessage: (peer, message) => {\n\t\t\t\t\t(peer as any)._hocuspocus?.handleMessage(message.uint8Array());\n\t\t\t\t},\n\t\t\t\tclose: (peer, event) => {\n\t\t\t\t\t(peer as any)._hocuspocus?.handleClose({\n\t\t\t\t\t\tcode: event.code,\n\t\t\t\t\t\treason: event.reason,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\terror: (peer, error) => {\n\t\t\t\t\tconsole.error(\"WebSocket error for peer:\", peer.id);\n\t\t\t\t\tconsole.error(error);\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\n\t\tthis.setupHttpUpgrade();\n\t}\n\n\tprivate setupHttpUpgrade = () => {\n\t\tthis.httpServer.on(\"upgrade\", async (request, socket, head) => {\n\t\t\ttry {\n\t\t\t\tawait this.hocuspocus.hooks(\"onUpgrade\", {\n\t\t\t\t\trequest,\n\t\t\t\t\tsocket,\n\t\t\t\t\thead,\n\t\t\t\t\tinstance: this.hocuspocus,\n\t\t\t\t});\n\n\t\t\t\t// Let crossws handle the WebSocket upgrade\n\t\t\t\tthis.crossws.handleUpgrade(request, socket, head);\n\t\t\t} catch (error) {\n\t\t\t\t// if a hook rejects and the error is empty, do nothing\n\t\t\t\t// this is only meant to prevent later hooks and the\n\t\t\t\t// default handler to do something. if a error is present\n\t\t\t\t// just rethrow it\n\t\t\t\tif (error) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\trequestHandler = async (\n\t\trequest: IncomingMessage,\n\t\tresponse: ServerResponse,\n\t) => {\n\t\ttry {\n\t\t\tawait this.hocuspocus.hooks(\"onRequest\", {\n\t\t\t\trequest,\n\t\t\t\tresponse,\n\t\t\t\tinstance: this.hocuspocus,\n\t\t\t});\n\n\t\t\t// default response if all prior hooks don't interfere\n\t\t\tresponse.writeHead(200, { \"Content-Type\": \"text/plain\" });\n\t\t\tresponse.end(\"Welcome to Hocuspocus!\");\n\t\t} catch (error) {\n\t\t\t// if a hook rejects and the error is empty, do nothing\n\t\t\t// this is only meant to prevent later hooks and the\n\t\t\t// default handler to do something. if a error is present\n\t\t\t// just rethrow it\n\t\t\tif (error) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t};\n\n\tasync listen(\n\t\tport?: number,\n\t\tcallback: any = null,\n\t): Promise> {\n\t\tif (port) {\n\t\t\tthis.configuration.port = port;\n\t\t}\n\n\t\tif (typeof callback === \"function\") {\n\t\t\tthis.hocuspocus.configuration.extensions.push({\n\t\t\t\tonListen: callback,\n\t\t\t});\n\t\t}\n\n\t\tif (this.configuration.stopOnSignals) {\n\t\t\tconst signalHandler = async () => {\n\t\t\t\tawait this.destroy();\n\t\t\t\tprocess.exit(0);\n\t\t\t};\n\n\t\t\tprocess.on(\"SIGINT\", signalHandler);\n\t\t\tprocess.on(\"SIGQUIT\", signalHandler);\n\t\t\tprocess.on(\"SIGTERM\", signalHandler);\n\t\t}\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n\t\treturn new Promise((resolve: Function, reject: Function) => {\n\t\t\tthis.httpServer.listen(\n\t\t\t\t{\n\t\t\t\t\tport: this.configuration.port,\n\t\t\t\t\taddress: this.configuration.address,\n\t\t\t\t} as ListenOptions,\n\t\t\t\tasync () => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t!this.configuration.quiet &&\n\t\t\t\t\t\tString(process.env.NODE_ENV) !== \"testing\"\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.showStartScreen();\n\t\t\t\t\t}\n\n\t\t\t\t\tconst onListenPayload = {\n\t\t\t\t\t\tinstance: this.hocuspocus,\n\t\t\t\t\t\tconfiguration: this.configuration,\n\t\t\t\t\t\tport: this.address.port,\n\t\t\t\t\t} as onListenPayload;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait this.hocuspocus.hooks(\"onListen\", onListenPayload);\n\t\t\t\t\t\tresolve(this.hocuspocus);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treject(e);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\t\t});\n\t}\n\n\tget address(): AddressInfo {\n\t\treturn (this.httpServer.address() || {\n\t\t\tport: this.configuration.port,\n\t\t\taddress: this.configuration.address,\n\t\t\tfamily: \"IPv4\",\n\t\t}) as AddressInfo;\n\t}\n\n\tasync destroy(): Promise {\n\t\tawait new Promise((resolve) => {\n\t\t\tthis.httpServer.close();\n\n\t\t\ttry {\n\t\t\t\tthis.configuration.extensions.push({\n\t\t\t\t\tasync afterUnloadDocument({ instance }) {\n\t\t\t\t\t\tif (instance.getDocumentsCount() === 0) resolve();\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\t// Close all existing connections - this will trigger the close hook\n\t\t\t\tif (this.hocuspocus.getDocumentsCount() === 0) resolve();\n\n\t\t\t\tthis.hocuspocus.closeConnections();\n\n\t\t\t\t// Flush any remaining debounced stores so documents unload\n\t\t\t\t// promptly, even when unloadImmediately is false.\n\t\t\t\tthis.hocuspocus.flushPendingStores();\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error);\n\t\t\t}\n\t\t});\n\n\t\tawait this.hocuspocus.hooks(\"onDestroy\", { instance: this.hocuspocus });\n\t}\n\n\tget URL(): string {\n\t\treturn `${this.configuration.address}:${this.address.port}`;\n\t}\n\n\tget webSocketURL(): string {\n\t\treturn `ws://${this.URL}`;\n\t}\n\n\tget httpURL(): string {\n\t\treturn `http://${this.URL}`;\n\t}\n\n\tprivate showStartScreen() {\n\t\tconst name = this.configuration.name ? ` (${this.configuration.name})` : \"\";\n\n\t\tconsole.log();\n\t\tconsole.log(\n\t\t\t` ${kleur.cyan(`Hocuspocus v${meta.version}${name}`)}${kleur.green(\" running at:\")}`,\n\t\t);\n\t\tconsole.log();\n\n\t\tconsole.log(` > HTTP: ${kleur.cyan(`${this.httpURL}`)}`);\n\t\tconsole.log(` > WebSocket: ${this.webSocketURL}`);\n\n\t\tconst extensions = this.configuration?.extensions\n\t\t\t.map((extension) => {\n\t\t\t\treturn extension.extensionName ?? extension.constructor?.name;\n\t\t\t})\n\t\t\t.filter((name) => name)\n\t\t\t.filter((name) => name !== \"Object\");\n\n\t\tif (!extensions.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log();\n\t\tconsole.log(\" Extensions:\");\n\n\t\textensions.forEach((name) => {\n\t\t\tconsole.log(` - ${name}`);\n\t\t});\n\n\t\tconsole.log();\n\t\tconsole.log(` ${kleur.green(\"Ready.\")}`);\n\t\tconsole.log();\n\t}\n}\n"],"x_google_ignoreList":[12,13,14,15,16,17,18],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAa,kBAAb,MAA6B;CAa5B,YAAY,OAAY;AACvB,MAAI,EAAE,iBAAiB,YACtB,SAAQ,IAAI,WAAW,MAA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K,UAAU,GAAG;AACzD,UAAQ,IAAI,kBAAkB,KAAK,eAAe;EAElD,MAAM,aAAa,KAAK,eAAe,WACrC,KAAK,cAAc;AACnB,UAAO,UAAU,iBAAiB,UAAU,aAAa;IACxD,CACD,QAAQ,SAAS,KAAK,CACtB,QAAQ,SAAS,SAAS,SAAS;AAErC,MAAI,CAAC,WAAW,OACf;AAGD,UAAQ,KAAK;AACb,UAAQ,IAAI,gBAAgB;AAE5B,aAAW,SAAS,SAAS;AAC5B,WAAQ,IAAI,OAAO,OAAO;IACzB;AAEF,UAAQ,KAAK;AACb,UAAQ,IAAI,KAAK,cAAM,MAAM,SAAS,GAAG;AACzC,UAAQ,KAAK"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js deleted file mode 100644 index 8e66686..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js +++ /dev/null @@ -1,1539 +0,0 @@ -import { AuthMessageType, ConnectionTimeout, Forbidden, ResetConnection, SkipFurtherHooksError, Unauthorized, WsReadyStates, awarenessStatesToArray, writeAuthenticated, writePermissionDenied, writeTokenSyncRequest } from "@hocuspocus/common"; -import * as decoding from "lib0/decoding"; -import { createDecoder, readVarString, readVarUint, readVarUint8Array } from "lib0/decoding"; -import { createEncoder, length, toUint8Array, writeVarString, writeVarUint, writeVarUint8Array } from "lib0/encoding"; -import { Awareness, applyAwarenessUpdate, encodeAwarenessUpdate, removeAwarenessStates } from "y-protocols/awareness"; -import { messageYjsSyncStep1, messageYjsSyncStep2, messageYjsUpdate, readSyncStep1, readSyncStep2, readUpdate, writeSyncStep1, writeUpdate } from "y-protocols/sync"; -import * as Y from "yjs"; -import { Doc, applyUpdate, encodeStateAsUpdate } from "yjs"; -import { Mutex } from "async-mutex"; -import crypto from "node:crypto"; -import { URLSearchParams as URLSearchParams$1 } from "node:url"; -import { createServer } from "node:http"; -import crossws from "crossws/adapters/node"; -import kleur from "kleur"; - -//#region packages/server/src/IncomingMessage.ts -var IncomingMessage = class { - constructor(input) { - if (!(input instanceof Uint8Array)) input = new Uint8Array(input); - this.decoder = createDecoder(input); - } - get encoder() { - if (!this.encoderInternal) this.encoderInternal = createEncoder(); - return this.encoderInternal; - } - readVarUint8Array() { - return readVarUint8Array(this.decoder); - } - peekVarUint8Array() { - const { pos } = this.decoder; - const result = readVarUint8Array(this.decoder); - this.decoder.pos = pos; - return result; - } - readVarUint() { - return readVarUint(this.decoder); - } - readVarString() { - return readVarString(this.decoder); - } - toUint8Array() { - return toUint8Array(this.encoder); - } - writeVarUint(type) { - writeVarUint(this.encoder, type); - } - writeVarString(string) { - writeVarString(this.encoder, string); - } - get length() { - return length(this.encoder); - } -}; - -//#endregion -//#region packages/server/src/types.ts -function isTransactionOrigin(origin) { - return typeof origin === "object" && origin !== null && "source" in origin && (origin.source === "connection" || origin.source === "redis" || origin.source === "local"); -} -function shouldSkipStoreHooks(origin) { - if (!isTransactionOrigin(origin)) return false; - switch (origin.source) { - case "connection": return false; - case "redis": return true; - case "local": return origin.skipStoreHooks ?? false; - } -} -let MessageType = /* @__PURE__ */ function(MessageType) { - MessageType[MessageType["Unknown"] = -1] = "Unknown"; - MessageType[MessageType["Sync"] = 0] = "Sync"; - MessageType[MessageType["Awareness"] = 1] = "Awareness"; - MessageType[MessageType["Auth"] = 2] = "Auth"; - MessageType[MessageType["QueryAwareness"] = 3] = "QueryAwareness"; - MessageType[MessageType["SyncReply"] = 4] = "SyncReply"; - MessageType[MessageType["Stateless"] = 5] = "Stateless"; - MessageType[MessageType["BroadcastStateless"] = 6] = "BroadcastStateless"; - MessageType[MessageType["CLOSE"] = 7] = "CLOSE"; - MessageType[MessageType["SyncStatus"] = 8] = "SyncStatus"; - MessageType[MessageType["Ping"] = 9] = "Ping"; - MessageType[MessageType["Pong"] = 10] = "Pong"; - return MessageType; -}({}); - -//#endregion -//#region packages/server/src/OutgoingMessage.ts -var OutgoingMessage = class { - constructor(documentName) { - this.encoder = createEncoder(); - writeVarString(this.encoder, documentName); - } - createSyncMessage() { - this.type = MessageType.Sync; - writeVarUint(this.encoder, MessageType.Sync); - return this; - } - createSyncReplyMessage() { - this.type = MessageType.SyncReply; - writeVarUint(this.encoder, MessageType.SyncReply); - return this; - } - createAwarenessUpdateMessage(awareness, changedClients) { - this.type = MessageType.Awareness; - this.category = "Update"; - const message = encodeAwarenessUpdate(awareness, changedClients || Array.from(awareness.getStates().keys())); - writeVarUint(this.encoder, MessageType.Awareness); - writeVarUint8Array(this.encoder, message); - return this; - } - writeQueryAwareness() { - this.type = MessageType.QueryAwareness; - this.category = "Update"; - writeVarUint(this.encoder, MessageType.QueryAwareness); - return this; - } - writeTokenSyncRequest() { - this.type = MessageType.Auth; - this.category = "TokenSync"; - writeVarUint(this.encoder, MessageType.Auth); - writeTokenSyncRequest(this.encoder); - return this; - } - writeAuthenticated(readonly) { - this.type = MessageType.Auth; - this.category = "Authenticated"; - writeVarUint(this.encoder, MessageType.Auth); - writeAuthenticated(this.encoder, readonly ? "readonly" : "read-write"); - return this; - } - writePermissionDenied(reason) { - this.type = MessageType.Auth; - this.category = "PermissionDenied"; - writeVarUint(this.encoder, MessageType.Auth); - writePermissionDenied(this.encoder, reason); - return this; - } - writeFirstSyncStepFor(document) { - this.category = "SyncStep1"; - writeSyncStep1(this.encoder, document); - return this; - } - writeUpdate(update) { - this.category = "Update"; - writeUpdate(this.encoder, update); - return this; - } - writeStateless(payload) { - this.category = "Stateless"; - writeVarUint(this.encoder, MessageType.Stateless); - writeVarString(this.encoder, payload); - return this; - } - writeBroadcastStateless(payload) { - this.category = "Stateless"; - writeVarUint(this.encoder, MessageType.BroadcastStateless); - writeVarString(this.encoder, payload); - return this; - } - writeSyncStatus(updateSaved) { - this.category = "SyncStatus"; - writeVarUint(this.encoder, MessageType.SyncStatus); - writeVarUint(this.encoder, updateSaved ? 1 : 0); - return this; - } - writeCloseMessage(reason) { - this.type = MessageType.CLOSE; - writeVarUint(this.encoder, MessageType.CLOSE); - writeVarString(this.encoder, reason); - return this; - } - toUint8Array() { - return toUint8Array(this.encoder); - } -}; - -//#endregion -//#region packages/server/src/MessageReceiver.ts -var MessageReceiver = class { - constructor(message, defaultTransactionOrigin) { - this.message = message; - this.defaultTransactionOrigin = defaultTransactionOrigin; - } - async apply(document, connection, reply) { - const { message } = this; - const type = message.readVarUint(); - const emptyMessageLength = message.length; - switch (type) { - case MessageType.Sync: - case MessageType.SyncReply: - message.writeVarUint(MessageType.Sync); - await this.readSyncMessage(message, document, connection, reply, type !== MessageType.SyncReply); - if (message.length > emptyMessageLength + 1) { - if (reply) reply(message.toUint8Array()); - else if (connection) connection.send(message.toUint8Array()); - } - break; - case MessageType.Awareness: { - let update = message.readVarUint8Array(); - const origin = connection ? { - source: "connection", - connection - } : this.defaultTransactionOrigin ?? { source: "local" }; - const scratch = new Awareness(new Y.Doc()); - applyAwarenessUpdate(scratch, update, null); - await document.callbacks.beforeHandleAwareness(document, scratch.getStates(), origin); - update = encodeAwarenessUpdate(scratch, [...scratch.getStates().keys()]); - applyAwarenessUpdate(document.awareness, update, origin); - break; - } - case MessageType.QueryAwareness: - this.applyQueryAwarenessMessage(document, connection, reply); - break; - case MessageType.Stateless: - connection?.callbacks.statelessCallback({ - connection, - documentName: document.name, - document, - payload: readVarString(message.decoder) - }); - break; - case MessageType.BroadcastStateless: { - const msg = message.readVarString(); - document.getConnections().forEach((connection) => { - connection.sendStateless(msg); - }); - break; - } - case MessageType.CLOSE: - connection?.close({ - code: 1e3, - reason: "provider_initiated" - }); - break; - case MessageType.Auth: - if (message.readVarUint() === AuthMessageType.Token) { - connection?.callbacks.onTokenSyncCallback({ token: message.readVarString() }); - break; - } - console.error("Received an authentication message on a connection that is already fully authenticated. Probably your provider has been destroyed + recreated really fast."); - break; - default: console.error(`Unable to handle message of type ${type}: no handler defined! Are your provider/server versions aligned?`); - } - } - async readSyncMessage(message, document, connection, reply, requestFirstSync = true) { - const type = message.readVarUint(); - const messageAddress = connection?.messageAddress ?? document.name; - if (connection) await connection.callbacks.beforeSync(connection, { - type, - payload: message.peekVarUint8Array() - }); - switch (type) { - case messageYjsSyncStep1: - readSyncStep1(message.decoder, message.encoder, document); - if (reply && requestFirstSync) reply(new OutgoingMessage(messageAddress).createSyncReplyMessage().writeFirstSyncStepFor(document).toUint8Array()); - else if (connection) { - const syncMessage = new OutgoingMessage(messageAddress).createSyncMessage().writeFirstSyncStepFor(document); - connection.send(syncMessage.toUint8Array()); - } - break; - case messageYjsSyncStep2: - if (connection?.readOnly) { - const snapshot = Y.snapshot(document); - const update = decoding.readVarUint8Array(message.decoder); - if (Y.snapshotContainsUpdate(snapshot, update)) { - const ackMessage = new OutgoingMessage(messageAddress).writeSyncStatus(true); - connection.send(ackMessage.toUint8Array()); - } else { - const ackMessage = new OutgoingMessage(messageAddress).writeSyncStatus(false); - connection.send(ackMessage.toUint8Array()); - } - break; - } - readSyncStep2(message.decoder, document, connection ? { - source: "connection", - connection - } : this.defaultTransactionOrigin ?? { source: "local" }); - if (connection) connection.send(new OutgoingMessage(messageAddress).writeSyncStatus(true).toUint8Array()); - break; - case messageYjsUpdate: - if (connection?.readOnly) { - connection.send(new OutgoingMessage(messageAddress).writeSyncStatus(false).toUint8Array()); - break; - } - readUpdate(message.decoder, document, connection ? { - source: "connection", - connection - } : this.defaultTransactionOrigin ?? { source: "local" }); - if (connection) connection.send(new OutgoingMessage(messageAddress).writeSyncStatus(true).toUint8Array()); - break; - default: throw new Error(`Received a message with an unknown type: ${type}`); - } - return type; - } - applyQueryAwarenessMessage(document, connection, reply) { - const message = new OutgoingMessage(connection?.messageAddress ?? document.name).createAwarenessUpdateMessage(document.awareness); - if (reply) reply(message.toUint8Array()); - } -}; - -//#endregion -//#region packages/server/src/Connection.ts -var Connection = class { - /** - * The address string prefixed to outgoing messages. - * Session-aware clients get `documentName\0sessionId`; legacy clients get plain `documentName`. - */ - get messageAddress() { - return this.sessionId ? `${this.document.name}\0${this.sessionId}` : this.document.name; - } - /** - * Constructor. - */ - constructor(connection, request, document, socketId, context, readOnly = false, sessionId, providerVersion) { - this.callbacks = { - onClose: [(document, event) => {}], - beforeHandleMessage: (connection, update) => Promise.resolve(), - beforeSync: (connection, payload) => Promise.resolve(), - statelessCallback: (payload) => Promise.resolve(), - onTokenSyncCallback: (payload) => Promise.resolve() - }; - this.messageQueue = []; - this.processingPromise = Promise.resolve(); - this.webSocket = connection; - this.context = context; - this.document = document; - this.request = request; - this.socketId = socketId; - this.readOnly = readOnly; - this.sessionId = sessionId ?? null; - this.providerVersion = providerVersion ?? null; - this.document.addConnection(this); - this.sendCurrentAwareness(); - } - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback) { - this.callbacks.onClose.push(callback); - return this; - } - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback(callback) { - this.callbacks.statelessCallback = callback; - return this; - } - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage(callback) { - this.callbacks.beforeHandleMessage = callback; - return this; - } - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync(callback) { - this.callbacks.beforeSync = callback; - return this; - } - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback(callback) { - this.callbacks.onTokenSyncCallback = callback; - return this; - } - /** - * Returns a promise that resolves when all queued messages have been processed. - */ - waitForPendingMessages() { - return this.processingPromise; - } - /** - * Send the given message - */ - send(message) { - if (this.webSocket.readyState === WsReadyStates.Closing || this.webSocket.readyState === WsReadyStates.Closed) { - this.close(); - return; - } - try { - this.webSocket.send(message); - } catch (exception) { - this.close(); - } - } - /** - * Send a stateless message with payload - */ - sendStateless(payload) { - const message = new OutgoingMessage(this.messageAddress).writeStateless(payload); - this.send(message.toUint8Array()); - } - /** - * Request current token from the client - */ - requestToken() { - const message = new OutgoingMessage(this.messageAddress).writeTokenSyncRequest(); - this.send(message.toUint8Array()); - } - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event) { - if (this.document.hasConnection(this)) { - this.document.removeConnection(this); - this.callbacks.onClose.forEach((callback) => callback(this.document, event)); - const closeMessage = new OutgoingMessage(this.messageAddress); - closeMessage.writeCloseMessage(event?.reason ?? "Server closed the connection"); - this.send(closeMessage.toUint8Array()); - } - } - /** - * Send the current document awareness to the client, if any - * @private - */ - sendCurrentAwareness() { - if (!this.document.hasAwarenessStates()) return; - const awarenessMessage = new OutgoingMessage(this.messageAddress).createAwarenessUpdateMessage(this.document.awareness); - this.send(awarenessMessage.toUint8Array()); - } - /** - * Handle an incoming message - * @public - */ - handleMessage(data) { - this.messageQueue.push(data); - if (this.messageQueue.length === 1) this.processingPromise = this.processMessages(); - } - async processMessages() { - while (this.messageQueue.length > 0) { - const rawUpdate = this.messageQueue.at(0); - const message = new IncomingMessage(rawUpdate); - const rawKey = message.readVarString(); - const sepIdx = rawKey.indexOf("\0"); - const documentName = sepIdx === -1 ? rawKey : rawKey.substring(0, sepIdx); - if (documentName !== this.document.name) { - this.messageQueue.shift(); - continue; - } - message.writeVarString(this.messageAddress); - try { - await this.callbacks.beforeHandleMessage(this, rawUpdate); - await new MessageReceiver(message).apply(this.document, this); - } catch (e) { - console.error(`closing connection ${this.socketId} (while handling ${documentName}) because of exception`, e); - this.close({ - code: "code" in e && typeof e.code === "number" ? e.code : ResetConnection.code, - reason: "reason" in e ? e.reason : ResetConnection.reason - }); - } - this.messageQueue.shift(); - } - } -}; - -//#endregion -//#region packages/server/src/Document.ts -var Document = class extends Doc { - /** - * Constructor. - */ - constructor(name, yDocOptions) { - super(yDocOptions); - this.callbacks = { - onUpdate: (document, origin, update) => {}, - beforeBroadcastStateless: (document, stateless) => {}, - beforeHandleAwareness: (document, states, transactionOrigin) => Promise.resolve() - }; - this.connections = /* @__PURE__ */ new Map(); - this.directConnectionsCount = 0; - this.isDestroyed = false; - this.saveMutex = new Mutex(); - this.lastChangeTime = 0; - this.name = name; - this.awareness = new Awareness(this); - this.awareness.setLocalState(null); - this.awareness.on("update", this.handleAwarenessUpdate.bind(this)); - this.on("update", this.handleUpdate.bind(this)); - this.isLoading = true; - } - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName) { - return !this.get(fieldName)._start && !this.get(fieldName)._map.size; - } - /** - * Merge the given document(s) into this one - */ - merge(documents) { - (Array.isArray(documents) ? documents : [documents]).forEach((document) => { - applyUpdate(this, encodeStateAsUpdate(document)); - }); - return this; - } - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate(callback) { - this.callbacks.onUpdate = callback; - return this; - } - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless(callback) { - this.callbacks.beforeBroadcastStateless = callback; - return this; - } - /** - * Set a callback that will be triggered before an inbound awareness update - * is applied to this document's awareness state. The callback receives the - * document, the decoded per-client states as a mutable `Map`, and the - * `TransactionOrigin` that will be forwarded to `applyAwarenessUpdate`. - * Use `isTransactionOrigin(origin)` to discriminate sources. Mutate the - * map in place (set/delete/field changes) to rewrite the update, or throw - * to reject it entirely. - */ - beforeHandleAwareness(callback) { - this.callbacks.beforeHandleAwareness = callback; - return this; - } - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection) { - this.connections.set(connection, { clients: /* @__PURE__ */ new Set() }); - return this; - } - /** - * Is the given connection registered on this document - */ - hasConnection(connection) { - return this.connections.has(connection); - } - /** - * Remove the given connection from this document - */ - removeConnection(connection) { - const entry = this.connections.get(connection); - if (entry) removeAwarenessStates(this.awareness, Array.from(entry.clients), null); - this.connections.delete(connection); - return this; - } - addDirectConnection() { - this.directConnectionsCount += 1; - return this; - } - removeDirectConnection() { - if (this.directConnectionsCount > 0) this.directConnectionsCount -= 1; - return this; - } - /** - * Get the number of active connections for this document - */ - getConnectionsCount() { - return this.connections.size + this.directConnectionsCount; - } - /** - * Get an array of registered connections - */ - getConnections() { - return Array.from(this.connections.keys()); - } - /** - * Get the client ids for the given connection instance - */ - getClients(connection) { - const entry = this.connections.get(connection); - return entry?.clients === void 0 ? /* @__PURE__ */ new Set() : entry.clients; - } - /** - * Has the document awareness states - */ - hasAwarenessStates() { - return this.awareness.getStates().size > 0; - } - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection, update) { - applyAwarenessUpdate(this.awareness, update, { - source: "connection", - connection - }); - return this; - } - /** - * Handle an awareness update and sync changes to clients - * @private - */ - handleAwarenessUpdate({ added, updated, removed }, origin) { - const changedClients = added.concat(updated, removed); - const originConnection = isTransactionOrigin(origin) && origin.source === "connection" ? origin.connection : null; - if (originConnection !== null) { - const entry = this.connections.get(originConnection); - if (entry) { - added.forEach((clientId) => entry.clients.add(clientId)); - removed.forEach((clientId) => entry.clients.delete(clientId)); - } - } - for (const connection of this.getConnections()) { - const awarenessMessage = new OutgoingMessage(connection.messageAddress).createAwarenessUpdateMessage(this.awareness, changedClients); - connection.send(awarenessMessage.toUint8Array()); - } - return this; - } - /** - * Handle an updated document and sync changes to clients - */ - handleUpdate(update, origin) { - this.callbacks.onUpdate(this, origin, update); - for (const connection of this.getConnections()) { - const message = new OutgoingMessage(connection.messageAddress).createSyncMessage().writeUpdate(update); - connection.send(message.toUint8Array()); - } - return this; - } - /** - * Broadcast stateless message to all connections - */ - broadcastStateless(payload, filter) { - this.callbacks.beforeBroadcastStateless(this, payload); - (filter ? this.getConnections().filter(filter) : this.getConnections()).forEach((connection) => { - connection.sendStateless(payload); - }); - } - destroy() { - super.destroy(); - this.isDestroyed = true; - } -}; - -//#endregion -//#region packages/server/package.json -var version = "4.1.0"; - -//#endregion -//#region packages/server/src/util/getParameters.ts -/** -* Get parameters by the given request -*/ -function getParameters(request) { - const url = request?.url; - if (!url) return new URLSearchParams(); - return url.includes("://") ? new URL(url).searchParams : new URLSearchParams(url.split("?")[1] || ""); -} - -//#endregion -//#region packages/server/src/ClientConnection.ts -/** -* The `ClientConnection` class is responsible for handling an incoming WebSocket -* -* TODO-refactor: -* - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts -*/ -var ClientConnection = class { - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it'll fully establish the connection and - * load the Document then. - */ - constructor(websocket, request, documentProvider, hooks, opts, defaultContext = {}) { - this.websocket = websocket; - this.request = request; - this.documentProvider = documentProvider; - this.hooks = hooks; - this.opts = opts; - this.defaultContext = defaultContext; - this.documentConnections = {}; - this.incomingMessageQueue = {}; - this.documentConnectionsEstablished = /* @__PURE__ */ new Set(); - this.hookPayloads = {}; - this.callbacks = { onClose: [(document, payload) => {}] }; - this.socketId = crypto.randomUUID(); - this.lastMessageReceivedAt = Date.now(); - this.check = () => { - if (Date.now() - this.lastMessageReceivedAt > this.timeout) this.close(ConnectionTimeout); - }; - this.setUpNewConnection = async (rawKey, documentName, sessionId) => { - const hookPayload = this.hookPayloads[rawKey]; - const document = await this.documentProvider.createDocument(documentName, hookPayload.request, hookPayload.socketId, hookPayload.connectionConfig, hookPayload.context); - const connection = this.createConnection(this.websocket, document, hookPayload, sessionId, hookPayload.providerVersion); - connection.onClose((document, event) => { - delete this.hookPayloads[rawKey]; - delete this.documentConnections[rawKey]; - delete this.incomingMessageQueue[rawKey]; - this.documentConnectionsEstablished.delete(rawKey); - }); - connection.onTokenSyncCallback(async (payload) => { - try { - return await this.hooks("onTokenSync", { - ...hookPayload, - ...payload, - document, - connection, - documentName - }, (contextAdditions) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions - }; - }); - } catch (err) { - console.error(err); - const error = { - ...Unauthorized, - ...err - }; - connection.close({ - code: error.code, - reason: error.reason - }); - } - }); - this.documentConnections[rawKey] = connection; - if (this.websocket.readyState === WsReadyStates.Closing || this.websocket.readyState === WsReadyStates.Closed) { - this.close(); - return; - } - this.incomingMessageQueue[rawKey]?.forEach((input) => { - connection.handleMessage(input); - }); - await this.hooks("connected", { - ...hookPayload, - documentName, - context: hookPayload.context, - connection - }); - }; - this.handleQueueingMessage = async (data, rawKey, documentName) => { - try { - const tmpMsg = new IncomingMessage(data); - decoding.readVarString(tmpMsg.decoder); - if (!(decoding.readVarUint(tmpMsg.decoder) === MessageType.Auth && !this.documentConnectionsEstablished.has(rawKey))) { - this.incomingMessageQueue[rawKey].push(data); - return; - } - this.documentConnectionsEstablished.add(rawKey); - decoding.readVarUint(tmpMsg.decoder); - const token = decoding.readVarString(tmpMsg.decoder); - let providerVersion = null; - if (decoding.hasContent(tmpMsg.decoder)) providerVersion = decoding.readVarString(tmpMsg.decoder); - const sepIdx = rawKey.indexOf("\0"); - const sessionId = sepIdx === -1 ? null : rawKey.substring(sepIdx + 1); - const responseAddress = rawKey; - try { - const hookPayload = this.hookPayloads[rawKey]; - hookPayload.providerVersion = providerVersion; - await this.hooks("onConnect", { - ...hookPayload, - documentName - }, (contextAdditions) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions - }; - }); - await this.hooks("onAuthenticate", { - token, - ...hookPayload, - documentName - }, (contextAdditions) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions - }; - }); - hookPayload.connectionConfig.isAuthenticated = true; - const message = new OutgoingMessage(responseAddress).writeAuthenticated(hookPayload.connectionConfig.readOnly); - this.websocket.send(message.toUint8Array()); - await this.setUpNewConnection(rawKey, documentName, sessionId); - } catch (err) { - const error = err || Forbidden; - const message = new OutgoingMessage(responseAddress).writePermissionDenied(error.reason ?? "permission-denied"); - this.websocket.send(message.toUint8Array()); - this.documentConnectionsEstablished.delete(rawKey); - delete this.hookPayloads[rawKey]; - delete this.incomingMessageQueue[rawKey]; - } - } catch (error) { - console.error(error); - this.websocket.close(ResetConnection.code, ResetConnection.reason); - } - }; - this.handleMessage = (data) => { - this.lastMessageReceivedAt = Date.now(); - try { - const tmpMsg = new IncomingMessage(data); - const rawKey = decoding.readVarString(tmpMsg.decoder); - const sepIdx = rawKey.indexOf("\0"); - const documentName = sepIdx === -1 ? rawKey : rawKey.substring(0, sepIdx); - const connection = this.documentConnections[rawKey] ?? this.documentConnections[documentName]; - if (connection) { - connection.handleMessage(data); - return; - } - if (this.incomingMessageQueue[rawKey] === void 0) { - this.incomingMessageQueue[rawKey] = []; - if (this.hookPayloads[rawKey]) throw new Error("first message, but hookPayloads exists"); - this.hookPayloads[rawKey] = { - instance: this.documentProvider, - request: this.request, - connectionConfig: { - readOnly: false, - isAuthenticated: false - }, - requestHeaders: this.request.headers, - requestParameters: getParameters(this.request), - socketId: this.socketId, - context: { ...this.defaultContext }, - providerVersion: null - }; - } - this.handleQueueingMessage(data, rawKey, documentName); - } catch (closeError) { - console.error(closeError); - this.websocket.close(Unauthorized.code, Unauthorized.reason); - } - }; - this.timeout = opts.timeout; - this.pingInterval = setInterval(this.check, this.timeout); - } - /** - * Handle WebSocket close event. Call this from your integration - * when the WebSocket connection closes. - */ - handleClose(event) { - this.close(event); - clearInterval(this.pingInterval); - } - close(event) { - Object.values(this.documentConnections).forEach((connection) => connection.close(event)); - } - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback) { - this.callbacks.onClose.push(callback); - return this; - } - /** - * Create a new connection by the given request and document - */ - createConnection(connection, document, hookPayload, sessionId, providerVersion) { - const instance = new Connection(connection, hookPayload.request, document, hookPayload.socketId, hookPayload.context, hookPayload.connectionConfig.readOnly, sessionId, providerVersion); - instance.onClose(async (document, event) => { - await instance.waitForPendingMessages(); - const disconnectHookPayload = { - instance: this.documentProvider, - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request) - }; - await this.hooks("onDisconnect", disconnectHookPayload); - this.callbacks.onClose.forEach((callback) => callback(document, disconnectHookPayload)); - }); - instance.onStatelessCallback(async (payload) => { - try { - return await this.hooks("onStateless", payload); - } catch (error) { - if (error?.message) throw error; - } - }); - instance.beforeHandleMessage((connection, update) => { - const beforeHandleMessagePayload = { - instance: this.documentProvider, - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - connection, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request), - update - }; - return this.hooks("beforeHandleMessage", beforeHandleMessagePayload); - }); - instance.beforeSync((connection, payload) => { - const beforeSyncPayload = { - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - documentName: document.name, - connection, - type: payload.type, - payload: payload.payload - }; - return this.hooks("beforeSync", beforeSyncPayload); - }); - return instance; - } -}; - -//#endregion -//#region packages/server/src/DirectConnection.ts -var DirectConnection = class { - /** - * Constructor. - */ - constructor(document, instance, context) { - this.document = null; - this.document = document; - this.instance = instance; - this.context = context ?? {}; - this.document.addDirectConnection(); - } - async transact(transaction) { - if (!this.document) throw new Error("direct connection closed"); - this.document.transact((x) => { - transaction(this.document); - }, { - source: "local", - context: this.context - }); - } - async disconnect() { - if (this.document) { - this.document?.removeDirectConnection(); - await this.instance.storeDocumentHooks(this.document, { - clientsCount: this.document.getConnectionsCount(), - lastContext: this.context, - lastTransactionOrigin: { - source: "local", - context: this.context - }, - document: this.document, - documentName: this.document.name, - instance: this.instance - }, true); - if (this.document.getConnectionsCount() === 0 && !this.document.saveMutex.isLocked()) { - await this.instance.hooks("onDisconnect", { - instance: this.instance, - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - socketId: "server", - documentName: this.document.name, - requestHeaders: new Headers(), - requestParameters: new URLSearchParams$1() - }); - await this.instance.unloadDocument(this.document); - } - this.document = null; - } - } -}; - -//#endregion -//#region packages/server/src/util/debounce.ts -const useDebounce = () => { - const timers = /* @__PURE__ */ new Map(); - const runningExecutions = /* @__PURE__ */ new Map(); - const debounce = async (id, func, debounce, maxDebounce) => { - const old = timers.get(id); - const start = old?.start || Date.now(); - const run = async () => { - if (runningExecutions.has(id)) await runningExecutions.get(id); - timers.delete(id); - const execution = func(); - runningExecutions.set(id, execution); - const executionResult = await execution; - runningExecutions.delete(id); - return executionResult; - }; - if (old?.timeout) clearTimeout(old.timeout); - if (debounce === 0) return run(); - if (Date.now() - start >= maxDebounce) return run(); - timers.set(id, { - start, - timeout: setTimeout(run, debounce), - func: run - }); - }; - const executeNow = (id) => { - const old = timers.get(id); - if (old) { - clearTimeout(old.timeout); - return old.func(); - } - }; - const isDebounced = (id) => { - return timers.has(id); - }; - const isCurrentlyExecuting = (id) => { - return runningExecutions.has(id); - }; - return { - debounce, - isDebounced, - isCurrentlyExecuting, - executeNow - }; -}; - -//#endregion -//#region packages/server/src/Hocuspocus.ts -const defaultConfiguration = { - name: null, - timeout: 6e4, - debounce: 2e3, - maxDebounce: 1e4, - quiet: false, - yDocOptions: { - gc: true, - gcFilter: () => true - }, - unloadImmediately: true -}; -var Hocuspocus = class { - constructor(configuration) { - this.configuration = { - ...defaultConfiguration, - extensions: [], - onConfigure: () => new Promise((r) => r(null)), - onListen: () => new Promise((r) => r(null)), - onUpgrade: () => new Promise((r) => r(null)), - onConnect: () => new Promise((r) => r(null)), - connected: () => new Promise((r) => r(null)), - beforeHandleMessage: () => new Promise((r) => r(null)), - beforeHandleAwareness: () => new Promise((r) => r()), - beforeSync: () => new Promise((r) => r(null)), - beforeBroadcastStateless: () => new Promise((r) => r(null)), - onStateless: () => new Promise((r) => r(null)), - onChange: () => new Promise((r) => r(null)), - onCreateDocument: () => new Promise((r) => r(null)), - onLoadDocument: () => new Promise((r) => r(null)), - onStoreDocument: () => new Promise((r) => r(null)), - afterStoreDocument: () => new Promise((r) => r(null)), - onAwarenessUpdate: () => new Promise((r) => r(null)), - onRequest: () => new Promise((r) => r(null)), - onDisconnect: () => new Promise((r) => r(null)), - onDestroy: () => new Promise((r) => r(null)) - }; - this.loadingDocuments = /* @__PURE__ */ new Map(); - this.unloadingDocuments = /* @__PURE__ */ new Map(); - this.documents = /* @__PURE__ */ new Map(); - this.debouncer = useDebounce(); - if (configuration) this.configure(configuration); - } - /** - * Configure Hocuspocus - */ - configure(configuration) { - this.configuration = { - ...this.configuration, - ...configuration - }; - this.configuration.extensions.sort((a, b) => { - const one = typeof a.priority === "undefined" ? 100 : a.priority; - const two = typeof b.priority === "undefined" ? 100 : b.priority; - if (one > two) return -1; - if (one < two) return 1; - return 0; - }); - this.configuration.extensions.push({ - onConfigure: this.configuration.onConfigure, - onListen: this.configuration.onListen, - onUpgrade: this.configuration.onUpgrade, - onConnect: this.configuration.onConnect, - connected: this.configuration.connected, - onAuthenticate: this.configuration.onAuthenticate, - onTokenSync: this.configuration.onTokenSync, - onLoadDocument: this.configuration.onLoadDocument, - afterLoadDocument: this.configuration.afterLoadDocument, - beforeHandleMessage: this.configuration.beforeHandleMessage, - beforeHandleAwareness: this.configuration.beforeHandleAwareness, - beforeBroadcastStateless: this.configuration.beforeBroadcastStateless, - beforeSync: this.configuration.beforeSync, - onStateless: this.configuration.onStateless, - onChange: this.configuration.onChange, - onStoreDocument: this.configuration.onStoreDocument, - afterStoreDocument: this.configuration.afterStoreDocument, - onAwarenessUpdate: this.configuration.onAwarenessUpdate, - onRequest: this.configuration.onRequest, - beforeUnloadDocument: this.configuration.beforeUnloadDocument, - afterUnloadDocument: this.configuration.afterUnloadDocument, - onDisconnect: this.configuration.onDisconnect, - onDestroy: this.configuration.onDestroy - }); - this.hooks("onConfigure", { - configuration: this.configuration, - version, - instance: this - }); - return this; - } - /** - * Get the total number of active documents - */ - getDocumentsCount() { - return this.documents.size; - } - /** - * Get the total number of active connections - */ - getConnectionsCount() { - const uniqueSocketIds = /* @__PURE__ */ new Set(); - const totalDirectConnections = Array.from(this.documents.values()).reduce((acc, document) => { - document.getConnections().forEach(({ socketId }) => { - uniqueSocketIds.add(socketId); - }); - return acc + document.directConnectionsCount; - }, 0); - return uniqueSocketIds.size + totalDirectConnections; - } - /** - * Immediately execute all pending debounced onStoreDocument calls. - * Useful during shutdown to ensure documents are persisted and unloaded - * before the server exits, even when unloadImmediately is false. - */ - flushPendingStores() { - this.documents.forEach((document) => { - const debounceId = `onStoreDocument-${document.name}`; - if (!document.isLoading && this.debouncer.isDebounced(debounceId)) this.debouncer.executeNow(debounceId); - }); - } - /** - * Force close one or more connections - */ - closeConnections(documentName) { - this.documents.forEach((document) => { - if (documentName && document.name !== documentName) return; - document.connections.forEach((_clients, connection) => { - connection.close(ResetConnection); - }); - }); - } - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it'll fully establish the connection and - * load the Document then. - */ - handleConnection(incoming, request, defaultContext = {}) { - const clientConnection = new ClientConnection(incoming, request, this, this.hooks.bind(this), { timeout: this.configuration.timeout }, defaultContext); - clientConnection.onClose((document, hookPayload) => { - if (document.getConnectionsCount() > 0) return; - if (!document.isLoading && this.debouncer.isDebounced(`onStoreDocument-${document.name}`)) { - if (this.configuration.unloadImmediately) this.debouncer.executeNow(`onStoreDocument-${document.name}`); - } else this.unloadDocument(document); - }); - return clientConnection; - } - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - handleDocumentUpdate(document, origin, update) { - const connection = isTransactionOrigin(origin) && origin.source === "connection" ? origin.connection : void 0; - const request = connection?.request; - const context = isTransactionOrigin(origin) ? origin.source === "connection" ? origin.connection.context : origin.source === "local" ? origin.context ?? {} : {} : {}; - const changePayload = { - instance: this, - clientsCount: document.getConnectionsCount(), - document, - documentName: document.name, - requestHeaders: request?.headers ?? new Headers(), - requestParameters: getParameters(request), - socketId: connection?.socketId ?? "", - update, - transactionOrigin: origin, - connection, - context - }; - this.hooks("onChange", changePayload); - if (shouldSkipStoreHooks(origin)) return; - const storePayload = { - instance: this, - clientsCount: document.getConnectionsCount(), - document, - lastContext: context, - lastTransactionOrigin: origin, - documentName: document.name - }; - this.storeDocumentHooks(document, storePayload); - } - /** - * Create a new document by the given request - */ - async createDocument(documentName, request, socketId, connection, context) { - if (!documentName.trim()) throw new Error("Document name must not be empty"); - const existingLoadingDoc = this.loadingDocuments.get(documentName); - if (existingLoadingDoc) return existingLoadingDoc; - const existingDoc = this.documents.get(documentName); - if (existingDoc) return Promise.resolve(existingDoc); - const loadDocPromise = this.loadDocument(documentName, request, socketId, connection, context); - this.loadingDocuments.set(documentName, loadDocPromise); - try { - const doc = await loadDocPromise; - this.documents.set(documentName, doc); - this.loadingDocuments.delete(documentName); - return doc; - } catch (e) { - this.loadingDocuments.delete(documentName); - throw e; - } - } - async loadDocument(documentName, request, socketId, connectionConfig, context) { - const requestHeaders = request.headers; - const requestParameters = getParameters(request); - const resolvedContext = context ?? {}; - const yDocOptions = await this.hooks("onCreateDocument", { - documentName, - requestHeaders, - requestParameters, - connectionConfig, - context: resolvedContext, - socketId, - instance: this - }); - const document = new Document(documentName, { - ...this.configuration.yDocOptions, - ...yDocOptions - }); - const hookPayload = { - instance: this, - context: resolvedContext, - connectionConfig, - document, - documentName, - socketId, - requestHeaders, - requestParameters - }; - try { - await this.hooks("onLoadDocument", hookPayload, (loadedDocument) => { - if (loadedDocument instanceof Doc) applyUpdate(document, encodeStateAsUpdate(loadedDocument)); - else if (loadedDocument instanceof Uint8Array) applyUpdate(document, loadedDocument); - }); - } catch (e) { - this.closeConnections(documentName); - this.unloadDocument(document); - throw e; - } - document.isLoading = false; - document.onUpdate((document, origin, update) => { - document.lastChangeTime = Date.now(); - this.handleDocumentUpdate(document, origin, update); - }); - await this.hooks("afterLoadDocument", hookPayload); - document.beforeBroadcastStateless((document, stateless) => { - const hookPayload = { - document, - documentName: document.name, - payload: stateless - }; - this.hooks("beforeBroadcastStateless", hookPayload); - }); - document.beforeHandleAwareness((document, states, transactionOrigin) => { - const connection = isTransactionOrigin(transactionOrigin) && transactionOrigin.source === "connection" ? transactionOrigin.connection : void 0; - const request = connection?.request; - return this.hooks("beforeHandleAwareness", { - awareness: document.awareness, - clientsCount: document.getConnectionsCount(), - context: connection?.context, - document, - documentName: document.name, - instance: this, - requestHeaders: request?.headers ?? new Headers(), - requestParameters: request ? getParameters(request) : new URLSearchParams(), - socketId: connection?.socketId ?? "", - transactionOrigin, - connection, - states - }); - }); - document.awareness.on("update", (update, origin) => { - this.hooks("onAwarenessUpdate", { - document, - documentName, - instance: this, - ...update, - transactionOrigin: origin, - connection: isTransactionOrigin(origin) && origin.source === "connection" ? origin.connection : void 0, - awareness: document.awareness, - states: awarenessStatesToArray(document.awareness.getStates()) - }); - }); - return document; - } - storeDocumentHooks(document, hookPayload, immediately) { - const debounceId = `onStoreDocument-${document.name}`; - return this.debouncer.debounce(debounceId, async () => { - try { - await document.saveMutex.runExclusive(async () => { - await this.hooks("onStoreDocument", hookPayload); - await this.hooks("afterStoreDocument", hookPayload); - }); - } catch (error) { - if (error instanceof SkipFurtherHooksError) { - setTimeout(() => { - if (this.shouldUnloadDocument(document)) this.unloadDocument(document); - }, 0); - return; - } - console.error("Caught error during storeDocumentHooks. Document stays in memory to avoid data loss", error); - return; - } - setTimeout(() => { - if (this.shouldUnloadDocument(document)) this.unloadDocument(document); - }, 0); - }, immediately ? 0 : this.configuration.debounce, this.configuration.maxDebounce); - } - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - hooks(name, payload, callback = null) { - const { extensions } = this.configuration; - let chain = Promise.resolve(); - extensions.filter((extension) => typeof extension[name] === "function").forEach((extension) => { - chain = chain.then(() => extension[name]?.(payload)).catch((error) => { - if (error?.message) console.error(`[${name}]`, error.message); - throw error; - }); - if (callback) chain = chain.then((...args) => callback(...args)); - }); - return chain; - } - shouldUnloadDocument(document) { - return (this.debouncer.isDebounced(`onStoreDocument-${document.name}`) || this.debouncer.isCurrentlyExecuting(`onStoreDocument-${document.name}`) || document.saveMutex.isLocked()) === false && document.getConnectionsCount() === 0; - } - async unloadDocument(document) { - const documentName = document.name; - if (!this.shouldUnloadDocument(document)) return; - if (!this.documents.has(documentName)) return; - if (this.unloadingDocuments.has(documentName)) return this.unloadingDocuments.get(documentName); - const actualUnloadingLogic = async () => { - try { - await this.hooks("beforeUnloadDocument", { - instance: this, - documentName, - document - }); - } catch (e) { - return; - } - if (!this.shouldUnloadDocument(document)) return; - this.documents.delete(documentName); - document.destroy(); - await this.hooks("afterUnloadDocument", { - instance: this, - documentName - }); - }; - const unloading = actualUnloadingLogic(); - this.unloadingDocuments.set(documentName, Promise.resolve(unloading)); - await unloading; - this.unloadingDocuments.delete(documentName); - } - async openDirectConnection(documentName, context) { - return new DirectConnection(await this.createDocument(documentName, new Request("http://localhost"), crypto.randomUUID(), { - isAuthenticated: true, - readOnly: false - }, context), this, context); - } -}; - -//#endregion -//#region packages/server/src/Server.ts -const defaultServerConfiguration = { - port: 80, - address: "0.0.0.0", - stopOnSignals: true -}; -var Server = class { - constructor(configuration) { - this.configuration = { - ...defaultConfiguration, - ...defaultServerConfiguration, - extensions: [] - }; - this.setupHttpUpgrade = () => { - this.httpServer.on("upgrade", async (request, socket, head) => { - try { - await this.hocuspocus.hooks("onUpgrade", { - request, - socket, - head, - instance: this.hocuspocus - }); - this.crossws.handleUpgrade(request, socket, head); - } catch (error) { - if (error) throw error; - } - }); - }; - this.requestHandler = async (request, response) => { - try { - await this.hocuspocus.hooks("onRequest", { - request, - response, - instance: this.hocuspocus - }); - response.writeHead(200, { "Content-Type": "text/plain" }); - response.end("Welcome to Hocuspocus!"); - } catch (error) { - if (error) throw error; - } - }; - if (configuration) this.configuration = { - ...this.configuration, - ...configuration - }; - this.hocuspocus = new Hocuspocus(this.configuration); - this.hocuspocus.server = this; - this.httpServer = createServer(this.requestHandler); - this.crossws = crossws({ - serverOptions: this.configuration.websocketOptions, - hooks: { - open: (peer) => { - peer._hocuspocus = this.hocuspocus.handleConnection(peer.websocket, peer.request); - }, - message: (peer, message) => { - peer._hocuspocus?.handleMessage(message.uint8Array()); - }, - close: (peer, event) => { - peer._hocuspocus?.handleClose({ - code: event.code, - reason: event.reason - }); - }, - error: (peer, error) => { - console.error("WebSocket error for peer:", peer.id); - console.error(error); - } - } - }); - this.setupHttpUpgrade(); - } - async listen(port, callback = null) { - if (port) this.configuration.port = port; - if (typeof callback === "function") this.hocuspocus.configuration.extensions.push({ onListen: callback }); - if (this.configuration.stopOnSignals) { - const signalHandler = async () => { - await this.destroy(); - process.exit(0); - }; - process.on("SIGINT", signalHandler); - process.on("SIGQUIT", signalHandler); - process.on("SIGTERM", signalHandler); - } - return new Promise((resolve, reject) => { - this.httpServer.listen({ - port: this.configuration.port, - address: this.configuration.address - }, async () => { - if (!this.configuration.quiet && String("development") !== "testing") this.showStartScreen(); - const onListenPayload = { - instance: this.hocuspocus, - configuration: this.configuration, - port: this.address.port - }; - try { - await this.hocuspocus.hooks("onListen", onListenPayload); - resolve(this.hocuspocus); - } catch (e) { - reject(e); - } - }); - }); - } - get address() { - return this.httpServer.address() || { - port: this.configuration.port, - address: this.configuration.address, - family: "IPv4" - }; - } - async destroy() { - await new Promise((resolve) => { - this.httpServer.close(); - try { - this.configuration.extensions.push({ async afterUnloadDocument({ instance }) { - if (instance.getDocumentsCount() === 0) resolve(); - } }); - if (this.hocuspocus.getDocumentsCount() === 0) resolve(); - this.hocuspocus.closeConnections(); - this.hocuspocus.flushPendingStores(); - } catch (error) { - console.error(error); - } - }); - await this.hocuspocus.hooks("onDestroy", { instance: this.hocuspocus }); - } - get URL() { - return `${this.configuration.address}:${this.address.port}`; - } - get webSocketURL() { - return `ws://${this.URL}`; - } - get httpURL() { - return `http://${this.URL}`; - } - showStartScreen() { - const name = this.configuration.name ? ` (${this.configuration.name})` : ""; - console.log(); - console.log(` ${kleur.cyan(`Hocuspocus v${version}${name}`)}${kleur.green(" running at:")}`); - console.log(); - console.log(` > HTTP: ${kleur.cyan(`${this.httpURL}`)}`); - console.log(` > WebSocket: ${this.webSocketURL}`); - const extensions = this.configuration?.extensions.map((extension) => { - return extension.extensionName ?? extension.constructor?.name; - }).filter((name) => name).filter((name) => name !== "Object"); - if (!extensions.length) return; - console.log(); - console.log(" Extensions:"); - extensions.forEach((name) => { - console.log(` - ${name}`); - }); - console.log(); - console.log(` ${kleur.green("Ready.")}`); - console.log(); - } -}; - -//#endregion -export { Connection, Document, Hocuspocus, IncomingMessage, MessageReceiver, MessageType, OutgoingMessage, Server, defaultConfiguration, defaultServerConfiguration, isTransactionOrigin, shouldSkipStoreHooks, useDebounce }; -//# sourceMappingURL=hocuspocus-server.esm.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js.map deleted file mode 100644 index f6265b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-server.esm.js","names":["SocketIncomingMessage","URLSearchParams","meta.version","meta.version"],"sources":["../src/IncomingMessage.ts","../src/types.ts","../src/OutgoingMessage.ts","../src/MessageReceiver.ts","../src/Connection.ts","../src/Document.ts","../package.json","../src/util/getParameters.ts","../src/ClientConnection.ts","../src/DirectConnection.ts","../src/util/debounce.ts","../src/Hocuspocus.ts","../src/Server.ts"],"sourcesContent":["import type { Decoder } from \"lib0/decoding\";\nimport {\n\tcreateDecoder,\n\treadVarString,\n\treadVarUint,\n\treadVarUint8Array,\n} from \"lib0/decoding\";\nimport type { Encoder } from \"lib0/encoding\";\nimport {\n\tcreateEncoder,\n\tlength,\n\ttoUint8Array,\n\twriteVarString,\n\twriteVarUint,\n} from \"lib0/encoding\";\nimport type { MessageType } from \"./types.ts\";\n\nexport class IncomingMessage {\n\t/**\n\t * Access to the received message.\n\t */\n\tdecoder: Decoder;\n\n\t/**\n\t * Private encoder; can be undefined.\n\t *\n\t * Lazy creation of the encoder speeds up IncomingMessages that need only a decoder.\n\t */\n\tprivate encoderInternal?: Encoder;\n\n\tconstructor(input: any) {\n\t\tif (!(input instanceof Uint8Array)) {\n\t\t\tinput = new Uint8Array(input);\n\t\t}\n\n\t\tthis.decoder = createDecoder(input);\n\t}\n\n\tget encoder() {\n\t\tif (!this.encoderInternal) {\n\t\t\tthis.encoderInternal = createEncoder();\n\t\t}\n\t\treturn this.encoderInternal;\n\t}\n\n\treadVarUint8Array() {\n\t\treturn readVarUint8Array(this.decoder);\n\t}\n\n\tpeekVarUint8Array() {\n\t\tconst { pos } = this.decoder;\n\t\tconst result = readVarUint8Array(this.decoder);\n\t\tthis.decoder.pos = pos;\n\t\treturn result;\n\t}\n\n\treadVarUint() {\n\t\treturn readVarUint(this.decoder);\n\t}\n\n\treadVarString() {\n\t\treturn readVarString(this.decoder);\n\t}\n\n\ttoUint8Array() {\n\t\treturn toUint8Array(this.encoder);\n\t}\n\n\twriteVarUint(type: MessageType) {\n\t\twriteVarUint(this.encoder, type);\n\t}\n\n\twriteVarString(string: string) {\n\t\twriteVarString(this.encoder, string);\n\t}\n\n\tget length(): number {\n\t\treturn length(this.encoder);\n\t}\n}\n","import type { IncomingMessage, ServerResponse } from \"node:http\";\nimport type { Awareness } from \"y-protocols/awareness\";\nimport type Connection from \"./Connection.ts\";\nimport type Document from \"./Document.ts\";\nimport type { Hocuspocus } from \"./Hocuspocus.ts\";\n\nexport interface ConnectionTransactionOrigin {\n\tsource: \"connection\";\n\tconnection: Connection;\n}\n\nexport interface RedisTransactionOrigin {\n\tsource: \"redis\";\n}\n\nexport interface LocalTransactionOrigin {\n\tsource: \"local\";\n\tskipStoreHooks?: boolean;\n\tcontext?: any;\n}\n\nexport type TransactionOrigin =\n\t| ConnectionTransactionOrigin\n\t| RedisTransactionOrigin\n\t| LocalTransactionOrigin;\n\nexport function isTransactionOrigin(\n\torigin: unknown,\n): origin is TransactionOrigin {\n\treturn (\n\t\ttypeof origin === \"object\" &&\n\t\torigin !== null &&\n\t\t\"source\" in origin &&\n\t\t((origin as any).source === \"connection\" ||\n\t\t\t(origin as any).source === \"redis\" ||\n\t\t\t(origin as any).source === \"local\")\n\t);\n}\n\nexport function shouldSkipStoreHooks(origin: unknown): boolean {\n\tif (!isTransactionOrigin(origin)) return false;\n\tswitch (origin.source) {\n\t\tcase \"connection\":\n\t\t\treturn false;\n\t\tcase \"redis\":\n\t\t\treturn true;\n\t\tcase \"local\":\n\t\t\treturn origin.skipStoreHooks ?? false;\n\t}\n}\n\n/**\n * Minimal interface for any WebSocket-like object for WebSocket, Bun's ServerWebSocket, ws, Deno, etc.\n */\nexport interface WebSocketLike {\n\tsend(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;\n\tclose(code?: number, reason?: string): void;\n\treadyState: number;\n}\n\nexport enum MessageType {\n\tUnknown = -1,\n\tSync = 0,\n\tAwareness = 1,\n\tAuth = 2,\n\tQueryAwareness = 3,\n\tSyncReply = 4, // same as Sync, but won't trigger another 'SyncStep1'\n\tStateless = 5,\n\tBroadcastStateless = 6,\n\tCLOSE = 7,\n\tSyncStatus = 8,\n\tPing = 9,\n\tPong = 10,\n}\n\nexport interface AwarenessUpdate {\n\tadded: Array;\n\tupdated: Array;\n\tremoved: Array;\n}\n\nexport interface ConnectionConfiguration {\n\treadOnly: boolean;\n\tisAuthenticated: boolean;\n}\n\nexport interface Extension {\n\tpriority?: number;\n\textensionName?: string;\n\tonConfigure?(data: onConfigurePayload): Promise;\n\tonListen?(data: onListenPayload): Promise;\n\tonUpgrade?(data: onUpgradePayload): Promise;\n\tonConnect?(data: onConnectPayload): Promise;\n\tconnected?(data: connectedPayload): Promise;\n\tonAuthenticate?(data: onAuthenticatePayload): Promise;\n\tonTokenSync?(data: onTokenSyncPayload): Promise;\n\tonCreateDocument?(data: onCreateDocumentPayload): Promise;\n\tonLoadDocument?(data: onLoadDocumentPayload): Promise;\n\tafterLoadDocument?(data: afterLoadDocumentPayload): Promise;\n\tbeforeHandleMessage?(data: beforeHandleMessagePayload): Promise;\n\t/**\n\t * Fired before an inbound awareness update is applied to the document's\n\t * awareness state. The hook receives the decoded per-client `states` as a\n\t * mutable `Map` keyed by Yjs clientId. Mutate the map and the contained\n\t * state objects in place to rewrite fields, drop peers (`states.delete`),\n\t * or add synthetic ones (`states.set`); mutations are reflected in the\n\t * broadcast. Throw to reject the update without applying anything.\n\t *\n\t * Multiple extensions chain naturally: each extension sees the map as\n\t * mutated by previous extensions and can mutate it further.\n\t */\n\tbeforeHandleAwareness?(\n\t\tdata: beforeHandleAwarenessPayload,\n\t): Promise;\n\tbeforeSync?(data: beforeSyncPayload): Promise;\n\tbeforeBroadcastStateless?(\n\t\tdata: beforeBroadcastStatelessPayload,\n\t): Promise;\n\tonStateless?(payload: onStatelessPayload): Promise;\n\tonChange?(data: onChangePayload): Promise;\n\tonStoreDocument?(data: onStoreDocumentPayload): Promise;\n\tafterStoreDocument?(data: afterStoreDocumentPayload): Promise;\n\tonAwarenessUpdate?(data: onAwarenessUpdatePayload): Promise;\n\tonRequest?(data: onRequestPayload): Promise;\n\tonDisconnect?(data: onDisconnectPayload): Promise;\n\tbeforeUnloadDocument?(data: beforeUnloadDocumentPayload): Promise;\n\tafterUnloadDocument?(data: afterUnloadDocumentPayload): Promise;\n\tonDestroy?(data: onDestroyPayload): Promise;\n}\n\nexport type HookName =\n\t| \"onConfigure\"\n\t| \"onListen\"\n\t| \"onUpgrade\"\n\t| \"onConnect\"\n\t| \"connected\"\n\t| \"onAuthenticate\"\n\t| \"onTokenSync\"\n\t| \"onCreateDocument\"\n\t| \"onLoadDocument\"\n\t| \"afterLoadDocument\"\n\t| \"beforeHandleMessage\"\n\t| \"beforeHandleAwareness\"\n\t| \"beforeBroadcastStateless\"\n\t| \"beforeSync\"\n\t| \"onStateless\"\n\t| \"onChange\"\n\t| \"onStoreDocument\"\n\t| \"afterStoreDocument\"\n\t| \"onAwarenessUpdate\"\n\t| \"onRequest\"\n\t| \"onDisconnect\"\n\t| \"beforeUnloadDocument\"\n\t| \"afterUnloadDocument\"\n\t| \"onDestroy\";\n\nexport type HookPayloadByName = {\n\tonConfigure: onConfigurePayload;\n\tonListen: onListenPayload;\n\tonUpgrade: onUpgradePayload;\n\tonConnect: onConnectPayload;\n\tconnected: connectedPayload;\n\tonAuthenticate: onAuthenticatePayload;\n\tonTokenSync: onTokenSyncPayload;\n\tonCreateDocument: onCreateDocumentPayload;\n\tonLoadDocument: onLoadDocumentPayload;\n\tafterLoadDocument: afterLoadDocumentPayload;\n\tbeforeHandleMessage: beforeHandleMessagePayload;\n\tbeforeHandleAwareness: beforeHandleAwarenessPayload;\n\tbeforeBroadcastStateless: beforeBroadcastStatelessPayload;\n\tbeforeSync: beforeSyncPayload;\n\tonStateless: onStatelessPayload;\n\tonChange: onChangePayload;\n\tonStoreDocument: onStoreDocumentPayload;\n\tafterStoreDocument: afterStoreDocumentPayload;\n\tonAwarenessUpdate: onAwarenessUpdatePayload;\n\tonRequest: onRequestPayload;\n\tonDisconnect: onDisconnectPayload;\n\tafterUnloadDocument: afterUnloadDocumentPayload;\n\tbeforeUnloadDocument: beforeUnloadDocumentPayload;\n\tonDestroy: onDestroyPayload;\n};\n\nexport interface Configuration extends Extension {\n\t/**\n\t * A name for the instance, used for logging.\n\t */\n\tname: string | null;\n\t/**\n\t * A list of hocuspocus extensions.\n\t */\n\textensions: Array;\n\t/**\n\t * Defines in which interval the server sends a ping, and closes the connection when no pong is sent back.\n\t */\n\ttimeout: number;\n\t/**\n\t * Debounces the call of the `onStoreDocument` hook for the given amount of time in ms.\n\t * Otherwise every single update would be persisted.\n\t */\n\tdebounce: number;\n\t/**\n\t * Makes sure to call `onStoreDocument` at least in the given amount of time (ms).\n\t */\n\tmaxDebounce: number;\n\t/**\n\t * By default, the servers show a start screen. If passed false, the server will start quietly.\n\t */\n\tquiet: boolean;\n\t/**\n\t * If set to false, respects the debounce time of `onStoreDocument` before unloading a document.\n\t * Otherwise, the document will be unloaded immediately.\n\t *\n\t * This prevents a client from DOSing the server by repeatedly connecting and disconnecting when\n\t * your onStoreDocument is rate-limited.\n\t */\n\tunloadImmediately: boolean;\n\n\t/**\n\t * options to pass to the ydoc document\n\t */\n\tyDocOptions: {\n\t\tgc: boolean; // enable or disable garbage collection (see https://github.com/yjs/yjs/blob/main/INTERNALS.md#deletions)\n\t\tgcFilter: () => boolean; // will be called before garbage collecting ; return false to keep it\n\t};\n}\n\nexport interface onStatelessPayload {\n\tconnection: Connection;\n\tdocumentName: string;\n\tdocument: Document;\n\tpayload: string;\n}\n\nexport interface onAuthenticatePayload {\n\tcontext: Context;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\trequest: Request;\n\tsocketId: string;\n\ttoken: string;\n\tconnectionConfig: ConnectionConfiguration;\n\tproviderVersion: string | null;\n}\n\nexport interface onTokenSyncPayload {\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\ttoken: string;\n\tconnectionConfig: ConnectionConfiguration;\n\tconnection: Connection;\n}\n\nexport interface onCreateDocumentPayload {\n\tcontext: Context;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n}\n\nexport interface onConnectPayload {\n\tcontext: Context;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequest: Request;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n\tproviderVersion: string | null;\n}\n\nexport interface connectedPayload {\n\tcontext: Context;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequest: Request;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n\tconnection: Connection;\n\tproviderVersion: string | null;\n}\n\nexport interface onLoadDocumentPayload {\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n}\n\nexport interface afterLoadDocumentPayload {\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n}\n\nexport interface onChangePayload {\n\tclientsCount: number;\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tupdate: Uint8Array;\n\tsocketId: string;\n\ttransactionOrigin: unknown;\n\tconnection?: Connection;\n}\n\nexport interface beforeHandleMessagePayload {\n\tclientsCount: number;\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tupdate: Uint8Array;\n\tsocketId: string;\n\tconnection: Connection;\n}\n\nexport interface beforeHandleAwarenessPayload {\n\tawareness: Awareness;\n\tclientsCount: number;\n\t/**\n\t * Connection context populated by `onAuthenticate`. `undefined` when the\n\t * update did not originate from a client connection (e.g. server-internal\n\t * writes via `DirectConnection`).\n\t */\n\tcontext: Context | undefined;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\t/**\n\t * Per-client awareness states decoded from the inbound update, keyed by\n\t * Yjs clientId. Mutate this map in place to rewrite the update: change\n\t * fields on a state object, `states.delete(clientId)` to drop a peer, or\n\t * `states.set(clientId, ...)` to add or replace one. The encoded update\n\t * sent to peers reflects whatever the map looks like after every hook in\n\t * the chain has run.\n\t */\n\tstates: Map>;\n\tsocketId: string;\n\t/**\n\t * The `TransactionOrigin` that will be passed to `applyAwarenessUpdate`.\n\t * Use `isTransactionOrigin(origin)` to discriminate sources. Matches the\n\t * `transactionOrigin` shape of `onAwarenessUpdatePayload`.\n\t */\n\ttransactionOrigin: unknown;\n\t/**\n\t * Convenience shortcut: `origin.connection` when `transactionOrigin` is a\n\t * `ConnectionTransactionOrigin`, otherwise `undefined`. Matches the\n\t * `connection?` shape of `onAwarenessUpdatePayload`.\n\t */\n\tconnection?: Connection;\n}\n\nexport interface beforeSyncPayload {\n\tclientsCount: number;\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tconnection: Connection;\n\t/**\n\t * The y-protocols/sync message type\n\t * @example\n\t * 0: SyncStep1\n\t * 1: SyncStep2\n\t * 2: YjsUpdate\n\t *\n\t * @see https://github.com/yjs/y-protocols/blob/master/sync.js#L13-L40\n\t */\n\ttype: number;\n\t/**\n\t * The payload of the y-sync message.\n\t */\n\tpayload: Uint8Array;\n}\n\nexport interface beforeBroadcastStatelessPayload {\n\tdocument: Document;\n\tdocumentName: string;\n\tpayload: string;\n}\n\nexport interface onStoreDocumentPayload {\n\tclientsCount: number;\n\tdocument: Document;\n\tlastContext: Context;\n\tlastTransactionOrigin: unknown;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type\nexport interface afterStoreDocumentPayload\n\textends onStoreDocumentPayload {}\n\nexport interface onAwarenessUpdatePayload {\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\ttransactionOrigin: unknown;\n\tconnection?: Connection;\n\tadded: number[];\n\tupdated: number[];\n\tremoved: number[];\n\tawareness: Awareness;\n\tstates: StatesArray;\n}\n\nexport type StatesArray = { clientId: number; [key: string | number]: any }[];\n\nexport interface fetchPayload {\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n\tconnectionConfig: ConnectionConfiguration;\n}\n\nexport interface storePayload\n\textends onStoreDocumentPayload {\n\tstate: Buffer;\n}\n\nexport interface onDisconnectPayload {\n\tclientsCount: number;\n\tcontext: Context;\n\tdocument: Document;\n\tdocumentName: string;\n\tinstance: Hocuspocus;\n\trequestHeaders: Headers;\n\trequestParameters: URLSearchParams;\n\tsocketId: string;\n}\n\nexport interface onRequestPayload {\n\trequest: IncomingMessage;\n\tresponse: ServerResponse;\n\tinstance: Hocuspocus;\n}\n\nexport interface onUpgradePayload {\n\trequest: IncomingMessage;\n\tsocket: any;\n\thead: any;\n\tinstance: Hocuspocus;\n}\n\nexport interface onListenPayload {\n\tinstance: Hocuspocus;\n\tconfiguration: Configuration;\n\tport: number;\n}\n\nexport interface onDestroyPayload {\n\tinstance: Hocuspocus;\n}\n\nexport interface onConfigurePayload {\n\tinstance: Hocuspocus;\n\tconfiguration: Configuration;\n\tversion: string;\n}\n\nexport interface afterUnloadDocumentPayload {\n\tinstance: Hocuspocus;\n\tdocumentName: string;\n}\n\nexport interface beforeUnloadDocumentPayload {\n\tinstance: Hocuspocus;\n\tdocumentName: string;\n\tdocument: Document;\n}\n\nexport interface DirectConnection {\n\ttransact(transaction: (document: Document) => void): Promise;\n\tdisconnect(): void;\n}\n","import type { Encoder } from \"lib0/encoding\";\nimport {\n\tcreateEncoder,\n\ttoUint8Array,\n\twriteVarString,\n\twriteVarUint,\n\twriteVarUint8Array,\n} from \"lib0/encoding\";\nimport type { Awareness } from \"y-protocols/awareness\";\nimport { encodeAwarenessUpdate } from \"y-protocols/awareness\";\nimport { writeSyncStep1, writeUpdate } from \"y-protocols/sync\";\n\nimport { writeAuthenticated, writePermissionDenied, writeTokenSyncRequest } from \"@hocuspocus/common\";\nimport type Document from \"./Document.ts\";\nimport { MessageType } from \"./types.ts\";\n\nexport class OutgoingMessage {\n\tencoder: Encoder;\n\n\ttype?: number;\n\n\tcategory?: string;\n\n\tconstructor(documentName: string) {\n\t\tthis.encoder = createEncoder();\n\n\t\twriteVarString(this.encoder, documentName);\n\t}\n\n\tcreateSyncMessage(): OutgoingMessage {\n\t\tthis.type = MessageType.Sync;\n\n\t\twriteVarUint(this.encoder, MessageType.Sync);\n\n\t\treturn this;\n\t}\n\n\tcreateSyncReplyMessage(): OutgoingMessage {\n\t\tthis.type = MessageType.SyncReply;\n\n\t\twriteVarUint(this.encoder, MessageType.SyncReply);\n\n\t\treturn this;\n\t}\n\n\tcreateAwarenessUpdateMessage(\n\t\tawareness: Awareness,\n\t\tchangedClients?: Array,\n\t): OutgoingMessage {\n\t\tthis.type = MessageType.Awareness;\n\t\tthis.category = \"Update\";\n\n\t\tconst message = encodeAwarenessUpdate(\n\t\t\tawareness,\n\t\t\tchangedClients || Array.from(awareness.getStates().keys()),\n\t\t);\n\n\t\twriteVarUint(this.encoder, MessageType.Awareness);\n\t\twriteVarUint8Array(this.encoder, message);\n\n\t\treturn this;\n\t}\n\n\twriteQueryAwareness(): OutgoingMessage {\n\t\tthis.type = MessageType.QueryAwareness;\n\t\tthis.category = \"Update\";\n\n\t\twriteVarUint(this.encoder, MessageType.QueryAwareness);\n\n\t\treturn this;\n\t}\n\n\twriteTokenSyncRequest(): OutgoingMessage {\n\t\tthis.type = MessageType.Auth;\n\t\tthis.category = \"TokenSync\";\n\n\t\twriteVarUint(this.encoder, MessageType.Auth);\n\t\twriteTokenSyncRequest(this.encoder);\n\n\t\treturn this;\n\t}\n\n\twriteAuthenticated(readonly: boolean): OutgoingMessage {\n\t\tthis.type = MessageType.Auth;\n\t\tthis.category = \"Authenticated\";\n\n\t\twriteVarUint(this.encoder, MessageType.Auth);\n\t\twriteAuthenticated(this.encoder, readonly ? \"readonly\" : \"read-write\");\n\n\t\treturn this;\n\t}\n\n\twritePermissionDenied(reason: string): OutgoingMessage {\n\t\tthis.type = MessageType.Auth;\n\t\tthis.category = \"PermissionDenied\";\n\n\t\twriteVarUint(this.encoder, MessageType.Auth);\n\t\twritePermissionDenied(this.encoder, reason);\n\n\t\treturn this;\n\t}\n\n\twriteFirstSyncStepFor(document: Document): OutgoingMessage {\n\t\tthis.category = \"SyncStep1\";\n\n\t\twriteSyncStep1(this.encoder, document);\n\n\t\treturn this;\n\t}\n\n\twriteUpdate(update: Uint8Array): OutgoingMessage {\n\t\tthis.category = \"Update\";\n\n\t\twriteUpdate(this.encoder, update);\n\n\t\treturn this;\n\t}\n\n\twriteStateless(payload: string): OutgoingMessage {\n\t\tthis.category = \"Stateless\";\n\n\t\twriteVarUint(this.encoder, MessageType.Stateless);\n\t\twriteVarString(this.encoder, payload);\n\n\t\treturn this;\n\t}\n\n\twriteBroadcastStateless(payload: string): OutgoingMessage {\n\t\tthis.category = \"Stateless\";\n\n\t\twriteVarUint(this.encoder, MessageType.BroadcastStateless);\n\t\twriteVarString(this.encoder, payload);\n\n\t\treturn this;\n\t}\n\n\t// TODO: should this be write* or create* as method name?\n\twriteSyncStatus(updateSaved: boolean): OutgoingMessage {\n\t\tthis.category = \"SyncStatus\";\n\n\t\twriteVarUint(this.encoder, MessageType.SyncStatus);\n\t\twriteVarUint(this.encoder, updateSaved ? 1 : 0);\n\n\t\treturn this;\n\t}\n\n\twriteCloseMessage(reason: string): OutgoingMessage {\n\t\tthis.type = MessageType.CLOSE;\n\n\t\twriteVarUint(this.encoder, MessageType.CLOSE);\n\t\twriteVarString(this.encoder, reason);\n\n\t\treturn this;\n\t}\n\n\ttoUint8Array(): Uint8Array {\n\t\treturn toUint8Array(this.encoder);\n\t}\n}\n","import { AuthMessageType } from \"@hocuspocus/common\";\nimport * as decoding from \"lib0/decoding\";\nimport { readVarString } from \"lib0/decoding\";\nimport {\n\tAwareness,\n\tapplyAwarenessUpdate,\n\tencodeAwarenessUpdate,\n} from \"y-protocols/awareness\";\nimport {\n\tmessageYjsSyncStep1,\n\tmessageYjsSyncStep2,\n\tmessageYjsUpdate,\n\treadSyncStep1,\n\treadSyncStep2,\n\treadUpdate,\n} from \"y-protocols/sync\";\nimport * as Y from \"yjs\";\nimport type Connection from \"./Connection.ts\";\nimport type Document from \"./Document.ts\";\nimport type { IncomingMessage } from \"./IncomingMessage.ts\";\nimport { OutgoingMessage } from \"./OutgoingMessage.ts\";\nimport {\n\tMessageType,\n\ttype ConnectionTransactionOrigin,\n\ttype TransactionOrigin,\n} from \"./types.ts\";\n\nexport class MessageReceiver {\n\tmessage: IncomingMessage;\n\n\tdefaultTransactionOrigin?: TransactionOrigin;\n\n\tconstructor(\n\t\tmessage: IncomingMessage,\n\t\tdefaultTransactionOrigin?: TransactionOrigin,\n\t) {\n\t\tthis.message = message;\n\t\tthis.defaultTransactionOrigin = defaultTransactionOrigin;\n\t}\n\n\tpublic async apply(\n\t\tdocument: Document,\n\t\tconnection?: Connection,\n\t\treply?: (message: Uint8Array) => void,\n\t) {\n\t\tconst { message } = this;\n\t\tconst type = message.readVarUint();\n\t\tconst emptyMessageLength = message.length;\n\n\t\tswitch (type) {\n\t\t\tcase MessageType.Sync:\n\t\t\tcase MessageType.SyncReply: {\n\t\t\t\tmessage.writeVarUint(MessageType.Sync);\n\t\t\t\tawait this.readSyncMessage(\n\t\t\t\t\tmessage,\n\t\t\t\t\tdocument,\n\t\t\t\t\tconnection,\n\t\t\t\t\treply,\n\t\t\t\t\ttype !== MessageType.SyncReply,\n\t\t\t\t);\n\n\t\t\t\tif (message.length > emptyMessageLength + 1) {\n\t\t\t\t\tif (reply) {\n\t\t\t\t\t\treply(message.toUint8Array());\n\t\t\t\t\t} else if (connection) {\n\t\t\t\t\t\tconnection.send(message.toUint8Array());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MessageType.Awareness: {\n\t\t\t\tlet update = message.readVarUint8Array();\n\n\t\t\t\tconst origin: TransactionOrigin = connection\n\t\t\t\t\t? ({\n\t\t\t\t\t\t\tsource: \"connection\",\n\t\t\t\t\t\t\tconnection,\n\t\t\t\t\t\t} satisfies ConnectionTransactionOrigin)\n\t\t\t\t\t: (this.defaultTransactionOrigin ?? { source: \"local\" });\n\n\t\t\t\t// Decode the inbound update into a scratch Awareness so the hook\n\t\t\t\t// chain sees a high-level Map. Mutations to that\n\t\t\t\t// map (including `set`, `delete`, and field changes on each state\n\t\t\t\t// object) are picked up by the re-encode below and forwarded as\n\t\t\t\t// the broadcast payload. Hooks may also throw to reject the\n\t\t\t\t// update entirely.\n\t\t\t\tconst scratch = new Awareness(new Y.Doc());\n\t\t\t\tapplyAwarenessUpdate(scratch, update, null);\n\n\t\t\t\tawait document.callbacks.beforeHandleAwareness(\n\t\t\t\t\tdocument,\n\t\t\t\t\tscratch.getStates(),\n\t\t\t\t\torigin,\n\t\t\t\t);\n\n\t\t\t\tupdate = encodeAwarenessUpdate(scratch, [\n\t\t\t\t\t...scratch.getStates().keys(),\n\t\t\t\t]);\n\n\t\t\t\tapplyAwarenessUpdate(document.awareness, update, origin);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MessageType.QueryAwareness: {\n\t\t\t\tthis.applyQueryAwarenessMessage(document, connection, reply);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MessageType.Stateless: {\n\t\t\t\tconnection?.callbacks.statelessCallback({\n\t\t\t\t\tconnection,\n\t\t\t\t\tdocumentName: document.name,\n\t\t\t\t\tdocument,\n\t\t\t\t\tpayload: readVarString(message.decoder),\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MessageType.BroadcastStateless: {\n\t\t\t\tconst msg = message.readVarString();\n\t\t\t\tdocument.getConnections().forEach((connection) => {\n\t\t\t\t\tconnection.sendStateless(msg);\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase MessageType.CLOSE: {\n\t\t\t\tconnection?.close({\n\t\t\t\t\tcode: 1000,\n\t\t\t\t\treason: \"provider_initiated\",\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase MessageType.Auth: {\n\t\t\t\tconst authType = message.readVarUint();\n\t\t\t\tif (authType === AuthMessageType.Token) {\n\t\t\t\t\tconnection?.callbacks.onTokenSyncCallback({\n\t\t\t\t\t\ttoken: message.readVarString(),\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Received an authentication message on a connection that is already fully authenticated. Probably your provider has been destroyed + recreated really fast.\",\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdefault:\n\t\t\t\tconsole.error(\n\t\t\t\t\t`Unable to handle message of type ${type}: no handler defined! Are your provider/server versions aligned?`,\n\t\t\t\t);\n\t\t\t// Do nothing\n\t\t}\n\t}\n\n\tasync readSyncMessage(\n\t\tmessage: IncomingMessage,\n\t\tdocument: Document,\n\t\tconnection?: Connection,\n\t\treply?: (message: Uint8Array) => void,\n\t\trequestFirstSync = true,\n\t) {\n\t\tconst type = message.readVarUint();\n\t\tconst messageAddress = connection?.messageAddress ?? document.name;\n\n\t\tif (connection) {\n\t\t\tawait connection.callbacks.beforeSync(connection, {\n\t\t\t\ttype,\n\t\t\t\tpayload: message.peekVarUint8Array(),\n\t\t\t});\n\t\t}\n\n\t\tswitch (type) {\n\t\t\tcase messageYjsSyncStep1: {\n\t\t\t\treadSyncStep1(message.decoder, message.encoder, document);\n\n\t\t\t\t// When the server receives SyncStep1, it should reply with SyncStep2 immediately followed by SyncStep1.\n\t\t\t\tif (reply && requestFirstSync) {\n\t\t\t\t\tconst syncMessage = new OutgoingMessage(messageAddress)\n\t\t\t\t\t\t.createSyncReplyMessage()\n\t\t\t\t\t\t.writeFirstSyncStepFor(document);\n\n\t\t\t\t\treply(syncMessage.toUint8Array());\n\t\t\t\t} else if (connection) {\n\t\t\t\t\tconst syncMessage = new OutgoingMessage(messageAddress)\n\t\t\t\t\t\t.createSyncMessage()\n\t\t\t\t\t\t.writeFirstSyncStepFor(document);\n\n\t\t\t\t\tconnection.send(syncMessage.toUint8Array());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase messageYjsSyncStep2: {\n\t\t\t\tif (connection?.readOnly) {\n\t\t\t\t\t// We're in read-only mode, so we can't apply the update.\n\t\t\t\t\t// Let's use snapshotContainsUpdate to see if the update actually contains changes.\n\t\t\t\t\t// If not, we can still ack the update\n\t\t\t\t\tconst snapshot = Y.snapshot(document);\n\t\t\t\t\tconst update = decoding.readVarUint8Array(message.decoder);\n\t\t\t\t\tif (Y.snapshotContainsUpdate(snapshot, update)) {\n\t\t\t\t\t\t// no new changes in update\n\t\t\t\t\t\tconst ackMessage = new OutgoingMessage(\n\t\t\t\t\t\t\tmessageAddress,\n\t\t\t\t\t\t).writeSyncStatus(true);\n\n\t\t\t\t\t\tconnection.send(ackMessage.toUint8Array());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// new changes in update that we can't apply, because readOnly\n\t\t\t\t\t\tconst ackMessage = new OutgoingMessage(\n\t\t\t\t\t\t\tmessageAddress,\n\t\t\t\t\t\t).writeSyncStatus(false);\n\n\t\t\t\t\t\tconnection.send(ackMessage.toUint8Array());\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\treadSyncStep2(\n\t\t\t\t\tmessage.decoder,\n\t\t\t\t\tdocument,\n\t\t\t\t\tconnection\n\t\t\t\t\t\t? { source: \"connection\" as const, connection }\n\t\t\t\t\t\t: (this.defaultTransactionOrigin ?? { source: \"local\" as const }),\n\t\t\t\t);\n\n\t\t\t\tif (connection) {\n\t\t\t\t\tconnection.send(\n\t\t\t\t\t\tnew OutgoingMessage(messageAddress)\n\t\t\t\t\t\t\t.writeSyncStatus(true)\n\t\t\t\t\t\t\t.toUint8Array(),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase messageYjsUpdate: {\n\t\t\t\tif (connection?.readOnly) {\n\t\t\t\t\tconnection.send(\n\t\t\t\t\t\tnew OutgoingMessage(messageAddress)\n\t\t\t\t\t\t\t.writeSyncStatus(false)\n\t\t\t\t\t\t\t.toUint8Array(),\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\treadUpdate(\n\t\t\t\t\tmessage.decoder,\n\t\t\t\t\tdocument,\n\t\t\t\t\tconnection\n\t\t\t\t\t\t? { source: \"connection\" as const, connection }\n\t\t\t\t\t\t: (this.defaultTransactionOrigin ?? { source: \"local\" as const }),\n\t\t\t\t);\n\t\t\t\tif (connection) {\n\t\t\t\t\tconnection.send(\n\t\t\t\t\t\tnew OutgoingMessage(messageAddress)\n\t\t\t\t\t\t\t.writeSyncStatus(true)\n\t\t\t\t\t\t\t.toUint8Array(),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Received a message with an unknown type: ${type}`);\n\t\t}\n\n\t\treturn type;\n\t}\n\n\tapplyQueryAwarenessMessage(\n\t\tdocument: Document,\n\t\tconnection?: Connection,\n\t\treply?: (message: Uint8Array) => void,\n\t) {\n\t\tconst message = new OutgoingMessage(\n\t\t\tconnection?.messageAddress ?? document.name,\n\t\t).createAwarenessUpdateMessage(document.awareness);\n\n\t\tif (reply) {\n\t\t\treply(message.toUint8Array());\n\t\t}\n\t}\n}\n","import {\n\ttype CloseEvent,\n\tResetConnection,\n\tWsReadyStates,\n} from \"@hocuspocus/common\";\nimport type Document from \"./Document.ts\";\nimport { IncomingMessage } from \"./IncomingMessage.ts\";\nimport { MessageReceiver } from \"./MessageReceiver.ts\";\nimport { OutgoingMessage } from \"./OutgoingMessage.ts\";\nimport type {\n\tWebSocketLike,\n\tbeforeSyncPayload,\n\tonStatelessPayload,\n} from \"./types.ts\";\n\nexport class Connection {\n\twebSocket: WebSocketLike;\n\n\tcontext: Context;\n\n\tdocument: Document;\n\n\trequest: Request;\n\n\tcallbacks = {\n\t\tonClose: [(document: Document, event?: CloseEvent) => {}],\n\t\tbeforeHandleMessage: (connection: Connection, update: Uint8Array) =>\n\t\t\tPromise.resolve(),\n\t\tbeforeSync: (\n\t\t\tconnection: Connection,\n\t\t\tpayload: Pick,\n\t\t) => Promise.resolve(),\n\t\tstatelessCallback: (payload: onStatelessPayload) => Promise.resolve(),\n\t\tonTokenSyncCallback: (payload: { token: string }) => Promise.resolve(),\n\t};\n\n\tsocketId: string;\n\n\treadOnly: boolean;\n\n\tsessionId: string | null;\n\n\tproviderVersion: string | null;\n\n\t/**\n\t * The address string prefixed to outgoing messages.\n\t * Session-aware clients get `documentName\\0sessionId`; legacy clients get plain `documentName`.\n\t */\n\tget messageAddress(): string {\n\t\treturn this.sessionId\n\t\t\t? `${this.document.name}\\0${this.sessionId}`\n\t\t\t: this.document.name;\n\t}\n\n\tprivate messageQueue: Uint8Array[] = [];\n\n\tprivate processingPromise: Promise = Promise.resolve();\n\n\t/**\n\t * Constructor.\n\t */\n\tconstructor(\n\t\tconnection: WebSocketLike,\n\t\trequest: Request,\n\t\tdocument: Document,\n\t\tsocketId: string,\n\t\tcontext: Context,\n\t\treadOnly = false,\n\t\tsessionId?: string | null,\n\t\tproviderVersion?: string | null,\n\t) {\n\t\tthis.webSocket = connection;\n\t\tthis.context = context;\n\t\tthis.document = document;\n\t\tthis.request = request;\n\t\tthis.socketId = socketId;\n\t\tthis.readOnly = readOnly;\n\t\tthis.sessionId = sessionId ?? null;\n\t\tthis.providerVersion = providerVersion ?? null;\n\n\t\tthis.document.addConnection(this);\n\n\t\tthis.sendCurrentAwareness();\n\t}\n\n\t/**\n\t * Set a callback that will be triggered when the connection is closed\n\t */\n\tonClose(\n\t\tcallback: (document: Document, event?: CloseEvent) => void,\n\t): Connection {\n\t\tthis.callbacks.onClose.push(callback);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered when an stateless message is received\n\t */\n\tonStatelessCallback(\n\t\tcallback: (payload: onStatelessPayload) => Promise,\n\t): Connection {\n\t\tthis.callbacks.statelessCallback = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered before an message is handled\n\t */\n\tbeforeHandleMessage(\n\t\tcallback: (connection: Connection, update: Uint8Array) => Promise,\n\t): Connection {\n\t\tthis.callbacks.beforeHandleMessage = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered before a sync message is handled\n\t */\n\tbeforeSync(\n\t\tcallback: (\n\t\t\tconnection: Connection,\n\t\t\tpayload: Pick,\n\t\t) => Promise,\n\t): Connection {\n\t\tthis.callbacks.beforeSync = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered when on token sync message is received\n\t */\n\tonTokenSyncCallback(\n\t\tcallback: (payload: { token: string }) => Promise,\n\t): Connection {\n\t\tthis.callbacks.onTokenSyncCallback = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns a promise that resolves when all queued messages have been processed.\n\t */\n\twaitForPendingMessages(): Promise {\n\t\treturn this.processingPromise;\n\t}\n\n\t/**\n\t * Send the given message\n\t */\n\tsend(message: Uint8Array): void {\n\t\tif (\n\t\t\tthis.webSocket.readyState === WsReadyStates.Closing ||\n\t\t\tthis.webSocket.readyState === WsReadyStates.Closed\n\t\t) {\n\t\t\tthis.close();\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tthis.webSocket.send(message);\n\t\t} catch (exception) {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\t/**\n\t * Send a stateless message with payload\n\t */\n\tpublic sendStateless(payload: string): void {\n\t\tconst message = new OutgoingMessage(this.messageAddress).writeStateless(\n\t\t\tpayload,\n\t\t);\n\n\t\tthis.send(message.toUint8Array());\n\t}\n\n\t/**\n\t * Request current token from the client\n\t */\n\tpublic requestToken(): void {\n\t\tconst message = new OutgoingMessage(\n\t\t\tthis.messageAddress,\n\t\t).writeTokenSyncRequest();\n\n\t\tthis.send(message.toUint8Array());\n\t}\n\n\t/**\n\t * Graceful wrapper around the WebSocket close method.\n\t */\n\tclose(event?: CloseEvent): void {\n\t\tif (this.document.hasConnection(this)) {\n\t\t\tthis.document.removeConnection(this);\n\t\t\tthis.callbacks.onClose.forEach(\n\t\t\t\t(callback: (arg0: Document, arg1?: CloseEvent) => any) =>\n\t\t\t\t\tcallback(this.document, event),\n\t\t\t);\n\n\t\t\tconst closeMessage = new OutgoingMessage(this.messageAddress);\n\t\t\tcloseMessage.writeCloseMessage(\n\t\t\t\tevent?.reason ?? \"Server closed the connection\",\n\t\t\t);\n\t\t\tthis.send(closeMessage.toUint8Array());\n\t\t}\n\t}\n\n\t/**\n\t * Send the current document awareness to the client, if any\n\t * @private\n\t */\n\tprivate sendCurrentAwareness(): void {\n\t\tif (!this.document.hasAwarenessStates()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst awarenessMessage = new OutgoingMessage(\n\t\t\tthis.messageAddress,\n\t\t).createAwarenessUpdateMessage(this.document.awareness);\n\n\t\tthis.send(awarenessMessage.toUint8Array());\n\t}\n\n\t/**\n\t * Handle an incoming message\n\t * @public\n\t */\n\tpublic handleMessage(data: Uint8Array): void {\n\t\tthis.messageQueue.push(data);\n\n\t\tif (this.messageQueue.length === 1) {\n\t\t\tthis.processingPromise = this.processMessages();\n\t\t}\n\t}\n\n\tprivate async processMessages() {\n\t\twhile (this.messageQueue.length > 0) {\n\t\t\tconst rawUpdate = this.messageQueue.at(0) as Uint8Array;\n\n\t\t\tconst message = new IncomingMessage(rawUpdate);\n\t\t\tconst rawKey = message.readVarString();\n\n\t\t\t// Accept messages addressed with either the plain documentName or documentName\\0sessionId\n\t\t\tconst sepIdx = rawKey.indexOf('\\0');\n\t\t\tconst documentName = sepIdx === -1 ? rawKey : rawKey.substring(0, sepIdx);\n\t\t\tif (documentName !== this.document.name) {\n\t\t\t\tthis.messageQueue.shift();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Write the correct address so replies reach the right provider\n\t\t\tmessage.writeVarString(this.messageAddress);\n\n\t\t\ttry {\n\t\t\t\tawait this.callbacks.beforeHandleMessage(this, rawUpdate);\n\t\t\t\tconst receiver = new MessageReceiver(message);\n\n\t\t\t\tawait receiver.apply(this.document, this);\n\t\t\t\t// biome-ignore lint/suspicious/noExplicitAny: \n\t\t\t} catch (e: any) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`closing connection ${this.socketId} (while handling ${documentName}) because of exception`,\n\t\t\t\t\te,\n\t\t\t\t);\n\t\t\t\tthis.close({\n\t\t\t\t\tcode: \"code\" in e && typeof e.code === 'number' ? e.code : ResetConnection.code,\n\t\t\t\t\treason: \"reason\" in e ? e.reason : ResetConnection.reason,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.messageQueue.shift();\n\t\t}\n\t}\n}\n\nexport default Connection;\n","import { Mutex } from \"async-mutex\";\nimport {\n\tAwareness,\n\tapplyAwarenessUpdate,\n\tremoveAwarenessStates,\n} from \"y-protocols/awareness\";\nimport { Doc, applyUpdate, encodeStateAsUpdate } from \"yjs\";\nimport type Connection from \"./Connection.ts\";\nimport { OutgoingMessage } from \"./OutgoingMessage.ts\";\nimport { isTransactionOrigin } from \"./types.ts\";\nimport type {\n\tAwarenessUpdate,\n\tConnectionTransactionOrigin,\n\tTransactionOrigin,\n} from \"./types.ts\";\n\nexport class Document extends Doc {\n\tawareness: Awareness;\n\n\tcallbacks = {\n\t\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\t\tonUpdate: (document: Document, origin: unknown, update: Uint8Array) => {},\n\t\tbeforeBroadcastStateless: (document: Document, stateless: string) => {},\n\t\tbeforeHandleAwareness: (\n\t\t\tdocument: Document,\n\t\t\tstates: Map>,\n\t\t\ttransactionOrigin: unknown,\n\t\t) => Promise.resolve(),\n\t};\n\n\tconnections: Map<\n\t\tConnection,\n\t\t{\n\t\t\tclients: Set;\n\t\t}\n\t> = new Map();\n\n\t// The number of direct (non-websocket) connections to this document\n\tdirectConnectionsCount = 0;\n\n\tname: string;\n\n\tisLoading: boolean;\n\n\tisDestroyed = false;\n\n\tsaveMutex = new Mutex();\n\n\tlastChangeTime = 0;\n\n\t/**\n\t * Constructor.\n\t */\n\tconstructor(name: string, yDocOptions?: object) {\n\t\tsuper(yDocOptions);\n\n\t\tthis.name = name;\n\n\t\tthis.awareness = new Awareness(this);\n\t\tthis.awareness.setLocalState(null);\n\n\t\tthis.awareness.on(\"update\", this.handleAwarenessUpdate.bind(this));\n\t\tthis.on(\"update\", this.handleUpdate.bind(this));\n\n\t\tthis.isLoading = true;\n\t}\n\n\t/**\n\t * Check if the Document (XMLFragment or Map) is empty\n\t */\n\tisEmpty(fieldName: string): boolean {\n\t\treturn !this.get(fieldName)._start && !this.get(fieldName)._map.size;\n\t}\n\n\t/**\n\t * Merge the given document(s) into this one\n\t */\n\tmerge(documents: Doc | Array): Document {\n\t\t(Array.isArray(documents) ? documents : [documents]).forEach((document) => {\n\t\t\tapplyUpdate(this, encodeStateAsUpdate(document));\n\t\t});\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered when the document is updated\n\t */\n\tonUpdate(\n\t\tcallback: (document: Document, origin: unknown, update: Uint8Array) => void,\n\t): Document {\n\t\tthis.callbacks.onUpdate = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered before a stateless message is broadcasted\n\t */\n\tbeforeBroadcastStateless(\n\t\tcallback: (document: Document, stateless: string) => void,\n\t): Document {\n\t\tthis.callbacks.beforeBroadcastStateless = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set a callback that will be triggered before an inbound awareness update\n\t * is applied to this document's awareness state. The callback receives the\n\t * document, the decoded per-client states as a mutable `Map`, and the\n\t * `TransactionOrigin` that will be forwarded to `applyAwarenessUpdate`.\n\t * Use `isTransactionOrigin(origin)` to discriminate sources. Mutate the\n\t * map in place (set/delete/field changes) to rewrite the update, or throw\n\t * to reject it entirely.\n\t */\n\tbeforeHandleAwareness(\n\t\tcallback: (\n\t\t\tdocument: Document,\n\t\t\tstates: Map>,\n\t\t\ttransactionOrigin: unknown,\n\t\t) => Promise,\n\t): Document {\n\t\tthis.callbacks.beforeHandleAwareness = callback;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Register a connection and a set of clients on this document keyed by the\n\t * underlying websocket connection\n\t */\n\taddConnection(connection: Connection): Document {\n\t\tthis.connections.set(connection, {\n\t\t\tclients: new Set(),\n\t\t});\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Is the given connection registered on this document\n\t */\n\thasConnection(connection: Connection): boolean {\n\t\treturn this.connections.has(connection);\n\t}\n\n\t/**\n\t * Remove the given connection from this document\n\t */\n\tremoveConnection(connection: Connection): Document {\n\t\tconst entry = this.connections.get(connection);\n\t\tif (entry) {\n\t\t\tremoveAwarenessStates(\n\t\t\t\tthis.awareness,\n\t\t\t\tArray.from(entry.clients),\n\t\t\t\tnull,\n\t\t\t);\n\t\t}\n\n\t\tthis.connections.delete(connection);\n\n\t\treturn this;\n\t}\n\n\taddDirectConnection(): Document {\n\t\tthis.directConnectionsCount += 1;\n\n\t\treturn this;\n\t}\n\n\tremoveDirectConnection(): Document {\n\t\tif (this.directConnectionsCount > 0) {\n\t\t\tthis.directConnectionsCount -= 1;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Get the number of active connections for this document\n\t */\n\tgetConnectionsCount(): number {\n\t\treturn this.connections.size + this.directConnectionsCount;\n\t}\n\n\t/**\n\t * Get an array of registered connections\n\t */\n\tgetConnections(): Array {\n\t\treturn Array.from(this.connections.keys());\n\t}\n\n\t/**\n\t * Get the client ids for the given connection instance\n\t */\n\tgetClients(connection: Connection): Set {\n\t\tconst entry = this.connections.get(connection);\n\n\t\treturn entry?.clients === undefined ? new Set() : entry.clients;\n\t}\n\n\t/**\n\t * Has the document awareness states\n\t */\n\thasAwarenessStates(): boolean {\n\t\treturn this.awareness.getStates().size > 0;\n\t}\n\n\t/**\n\t * Apply the given awareness update\n\t */\n\tapplyAwarenessUpdate(connection: Connection, update: Uint8Array): Document {\n\t\tapplyAwarenessUpdate(this.awareness, update, {\n\t\t\tsource: \"connection\",\n\t\t\tconnection,\n\t\t} satisfies ConnectionTransactionOrigin);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Handle an awareness update and sync changes to clients\n\t * @private\n\t */\n\tprivate handleAwarenessUpdate(\n\t\t{ added, updated, removed }: AwarenessUpdate,\n\t\torigin: TransactionOrigin | null,\n\t): Document {\n\t\tconst changedClients = added.concat(updated, removed);\n\n\t\tconst originConnection: Connection | null =\n\t\t\tisTransactionOrigin(origin) && origin.source === \"connection\"\n\t\t\t\t? origin.connection\n\t\t\t\t: null;\n\n\t\tif (originConnection !== null) {\n\t\t\tconst entry = this.connections.get(originConnection);\n\n\t\t\tif (entry) {\n\t\t\t\tadded.forEach((clientId: any) => entry.clients.add(clientId));\n\t\t\t\tremoved.forEach((clientId: any) => entry.clients.delete(clientId));\n\t\t\t}\n\t\t}\n\n\t\tfor (const connection of this.getConnections()) {\n\t\t\tconst awarenessMessage = new OutgoingMessage(\n\t\t\t\tconnection.messageAddress,\n\t\t\t).createAwarenessUpdateMessage(this.awareness, changedClients);\n\n\t\t\tconnection.send(awarenessMessage.toUint8Array());\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Handle an updated document and sync changes to clients\n\t */\n\tprivate handleUpdate(update: Uint8Array, origin: unknown): Document {\n\t\tthis.callbacks.onUpdate(this, origin, update);\n\n\t\tfor (const connection of this.getConnections()) {\n\t\t\tconst message = new OutgoingMessage(connection.messageAddress)\n\t\t\t\t.createSyncMessage()\n\t\t\t\t.writeUpdate(update);\n\n\t\t\tconnection.send(message.toUint8Array());\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Broadcast stateless message to all connections\n\t */\n\tpublic broadcastStateless(\n\t\tpayload: string,\n\t\tfilter?: (conn: Connection) => boolean,\n\t): void {\n\t\tthis.callbacks.beforeBroadcastStateless(this, payload);\n\n\t\tconst connections = filter\n\t\t\t? this.getConnections().filter(filter)\n\t\t\t: this.getConnections();\n\n\t\tconnections.forEach((connection) => {\n\t\t\tconnection.sendStateless(payload);\n\t\t});\n\t}\n\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.isDestroyed = true;\n\t}\n}\n\nexport default Document;\n","","/**\n * Get parameters by the given request\n */\nexport function getParameters(request?: { url?: string }): URLSearchParams {\n\tconst url = request?.url;\n\tif (!url) {\n\t\treturn new URLSearchParams();\n\t}\n\t// Handle both full URLs (web Request) and path-only URLs (Node.js IncomingMessage)\n\tconst query = url.includes(\"://\")\n\t\t? new URL(url).searchParams\n\t\t: new URLSearchParams(url.split(\"?\")[1] || \"\");\n\treturn query;\n}\n","import crypto from \"node:crypto\";\nimport {\n\ttype CloseEvent,\n\tConnectionTimeout,\n\tForbidden,\n\tResetConnection,\n\tUnauthorized,\n\tWsReadyStates,\n} from \"@hocuspocus/common\";\nimport * as decoding from \"lib0/decoding\";\nimport Connection from \"./Connection.ts\";\nimport type Document from \"./Document.ts\";\nimport type { Hocuspocus } from \"./Hocuspocus.ts\";\nimport { IncomingMessage as SocketIncomingMessage } from \"./IncomingMessage.ts\";\nimport { OutgoingMessage } from \"./OutgoingMessage.ts\";\nimport type {\n\tConnectionConfiguration,\n\tWebSocketLike,\n\tbeforeHandleMessagePayload,\n\tbeforeSyncPayload,\n\tonDisconnectPayload,\n} from \"./types.ts\";\nimport { MessageType } from \"./types.ts\";\nimport { getParameters } from \"./util/getParameters.ts\";\n\n/**\n * The `ClientConnection` class is responsible for handling an incoming WebSocket\n *\n * TODO-refactor:\n * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts\n */\nexport class ClientConnection {\n\t// Map of established document connections, keyed by rawKey (composite or plain)\n\tprivate readonly documentConnections: Record> =\n\t\t{};\n\n\t// While the connection will be establishing messages will\n\t// be queued and handled later.\n\tprivate readonly incomingMessageQueue: Record = {};\n\n\t// While the connection is establishing, keep track of which documents have received auth\n\tprivate readonly documentConnectionsEstablished = new Set();\n\n\t// Hook payloads keyed by rawKey (composite or plain)\n\tprivate readonly hookPayloads: Record<\n\t\tstring,\n\t\t{\n\t\t\tinstance: Hocuspocus;\n\t\t\trequest: Request;\n\t\t\trequestHeaders: Headers;\n\t\t\trequestParameters: URLSearchParams;\n\t\t\tsocketId: string;\n\t\t\tconnectionConfig: ConnectionConfiguration;\n\t\t\tcontext: Context;\n\t\t\tproviderVersion: string | null;\n\t\t}\n\t> = {};\n\n\tprivate readonly callbacks = {\n\t\tonClose: [(document: Document, payload: onDisconnectPayload) => {}],\n\t};\n\n\t// Every new connection gets a unique identifier.\n\tprivate readonly socketId = crypto.randomUUID();\n\n\ttimeout: number;\n\n\tpingInterval: NodeJS.Timeout;\n\n\tlastMessageReceivedAt = Date.now();\n\n\t/**\n\t * The `ClientConnection` class receives incoming WebSocket connections,\n\t * runs all hooks:\n\t *\n\t * - onConnect for all connections\n\t * - onAuthenticate only if required\n\t *\n\t * … and if nothings fails it'll fully establish the connection and\n\t * load the Document then.\n\t */\n\tconstructor(\n\t\tprivate readonly websocket: WebSocketLike,\n\t\tprivate readonly request: Request,\n\t\tprivate readonly documentProvider: {\n\t\t\tcreateDocument: Hocuspocus[\"createDocument\"];\n\t\t},\n\t\t// TODO: change to events\n\t\tprivate readonly hooks: Hocuspocus[\"hooks\"],\n\t\tprivate readonly opts: {\n\t\t\ttimeout: number;\n\t\t},\n\t\tprivate readonly defaultContext: Context = {} as Context,\n\t) {\n\t\tthis.timeout = opts.timeout;\n\t\tthis.pingInterval = setInterval(this.check, this.timeout);\n\t}\n\n\t/**\n\t * Handle WebSocket close event. Call this from your integration\n\t * when the WebSocket connection closes.\n\t */\n\thandleClose(event?: CloseEvent) {\n\t\tthis.close(event);\n\t\tclearInterval(this.pingInterval);\n\t}\n\n\tprivate close(event?: CloseEvent) {\n\t\tObject.values(this.documentConnections).forEach((connection) =>\n\t\t\tconnection.close(event),\n\t\t);\n\t}\n\n\t/**\n\t * Close the connection if no messages have been received within the timeout period.\n\t * This replaces application-level ping/pong to maintain backward compatibility\n\t * with older provider versions that don't understand Ping/Pong message types.\n\t * Awareness updates (~every 30s) keep active connections alive.\n\t */\n\tprivate check = () => {\n\t\tif (Date.now() - this.lastMessageReceivedAt > this.timeout) {\n\t\t\tthis.close(ConnectionTimeout);\n\t\t}\n\t};\n\n\t/**\n\t * Set a callback that will be triggered when the connection is closed\n\t */\n\tpublic onClose(\n\t\tcallback: (document: Document, payload: onDisconnectPayload) => void,\n\t): ClientConnection {\n\t\tthis.callbacks.onClose.push(callback);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Create a new connection by the given request and document\n\t */\n\tprivate createConnection(\n\t\tconnection: WebSocketLike,\n\t\tdocument: Document,\n\t\thookPayload: (typeof this.hookPayloads)[string],\n\t\tsessionId: string | null,\n\t\tproviderVersion: string | null,\n\t): Connection {\n\t\tconst instance = new Connection(\n\t\t\tconnection,\n\t\t\thookPayload.request,\n\t\t\tdocument,\n\t\t\thookPayload.socketId,\n\t\t\thookPayload.context,\n\t\t\thookPayload.connectionConfig.readOnly,\n\t\t\tsessionId,\n\t\t\tproviderVersion,\n\t\t);\n\n\t\tinstance.onClose(async (document, event) => {\n\t\t\t// Wait for any pending message processing to complete before running\n\t\t\t// disconnect hooks. This ensures that document updates from queued messages\n\t\t\t// are applied (and their debounced onStoreDocument scheduled) before the\n\t\t\t// disconnect handler checks whether to call executeNow.\n\t\t\tawait instance.waitForPendingMessages();\n\n\t\t\tconst disconnectHookPayload: onDisconnectPayload = {\n\t\t\t\tinstance: this.documentProvider as Hocuspocus, // TODO, this will be removed when we use events instead of hooks for this class\n\t\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\t\tcontext: hookPayload.context,\n\t\t\t\tdocument,\n\t\t\t\tsocketId: hookPayload.socketId,\n\t\t\t\tdocumentName: document.name,\n\t\t\t\trequestHeaders: hookPayload.request.headers,\n\t\t\t\trequestParameters: getParameters(hookPayload.request),\n\t\t\t};\n\n\t\t\tawait this.hooks(\"onDisconnect\", disconnectHookPayload);\n\t\t\tthis.callbacks.onClose.forEach((callback) =>\n\t\t\t\tcallback(document, disconnectHookPayload),\n\t\t\t);\n\t\t});\n\n\t\tinstance.onStatelessCallback(async (payload) => {\n\t\t\ttry {\n\t\t\t\treturn await this.hooks(\"onStateless\", payload);\n\t\t\t} catch (error: any) {\n\t\t\t\tif (error?.message) {\n\t\t\t\t\t// if a hook rejects and the error is empty, do nothing\n\t\t\t\t\t// this is only meant to prevent later hooks and the\n\t\t\t\t\t// default handler to do something. if an error is present\n\t\t\t\t\t// just rethrow it\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tinstance.beforeHandleMessage((connection, update) => {\n\t\t\tconst beforeHandleMessagePayload: beforeHandleMessagePayload = {\n\t\t\t\tinstance: this.documentProvider as Hocuspocus, // TODO, this will be removed when we use events instead of hooks for this class\n\t\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\t\tcontext: hookPayload.context,\n\t\t\t\tdocument,\n\t\t\t\tsocketId: hookPayload.socketId,\n\t\t\t\tconnection,\n\t\t\t\tdocumentName: document.name,\n\t\t\t\trequestHeaders: hookPayload.request.headers,\n\t\t\t\trequestParameters: getParameters(hookPayload.request),\n\t\t\t\tupdate,\n\t\t\t};\n\n\t\t\treturn this.hooks(\"beforeHandleMessage\", beforeHandleMessagePayload);\n\t\t});\n\n\t\tinstance.beforeSync((connection, payload) => {\n\t\t\tconst beforeSyncPayload: beforeSyncPayload = {\n\t\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\t\tcontext: hookPayload.context,\n\t\t\t\tdocument,\n\t\t\t\tdocumentName: document.name,\n\t\t\t\tconnection,\n\t\t\t\ttype: payload.type,\n\t\t\t\tpayload: payload.payload,\n\t\t\t};\n\n\t\t\treturn this.hooks(\"beforeSync\", beforeSyncPayload);\n\t\t});\n\n\t\treturn instance;\n\t}\n\n\t// Once all hooks are run, we'll fully establish the connection:\n\tprivate setUpNewConnection = async (rawKey: string, documentName: string, sessionId: string | null) => {\n\t\tconst hookPayload = this.hookPayloads[rawKey];\n\t\t// If no hook interrupts, create a document and connection\n\t\tconst document = await this.documentProvider.createDocument(\n\t\t\tdocumentName,\n\t\t\thookPayload.request,\n\t\t\thookPayload.socketId,\n\t\t\thookPayload.connectionConfig,\n\t\t\thookPayload.context,\n\t\t);\n\t\tconst connection = this.createConnection(this.websocket, document, hookPayload, sessionId, hookPayload.providerVersion);\n\n\t\tconnection.onClose((document, event) => {\n\t\t\tdelete this.hookPayloads[rawKey];\n\t\t\tdelete this.documentConnections[rawKey];\n\t\t\tdelete this.incomingMessageQueue[rawKey];\n\t\t\tthis.documentConnectionsEstablished.delete(rawKey);\n\t\t});\n\n\t\tconnection.onTokenSyncCallback(async (payload) => {\n\t\t\ttry {\n\t\t\t\treturn await this.hooks(\n\t\t\t\t\t\"onTokenSync\",\n\t\t\t\t\t{\n\t\t\t\t\t\t...hookPayload,\n\t\t\t\t\t\t...payload,\n\t\t\t\t\t\tdocument,\n\t\t\t\t\t\tconnection,\n\t\t\t\t\t\tdocumentName,\n\t\t\t\t\t},\n\t\t\t\t\t(contextAdditions: Partial) => {\n\t\t\t\t\t\thookPayload.context = {\n\t\t\t\t\t\t\t...hookPayload.context,\n\t\t\t\t\t\t\t...contextAdditions,\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t} catch (err: any) {\n\t\t\t\tconsole.error(err);\n\t\t\t\tconst error = { ...Unauthorized, ...err };\n\t\t\t\tconnection.close({ code: error.code, reason: error.reason });\n\t\t\t}\n\t\t});\n\n\t\tthis.documentConnections[rawKey] = connection;\n\n\t\t// If the WebSocket has already disconnected (wow, that was fast) – then\n\t\t// immediately call close to cleanup the connection and document in memory.\n\t\tif (\n\t\t\tthis.websocket.readyState === WsReadyStates.Closing ||\n\t\t\tthis.websocket.readyState === WsReadyStates.Closed\n\t\t) {\n\t\t\tthis.close();\n\t\t\treturn;\n\t\t}\n\n\t\t// Drain queued messages to the Connection.\n\t\tthis.incomingMessageQueue[rawKey]?.forEach((input) => {\n\t\t\tconnection.handleMessage(input);\n\t\t});\n\n\t\tawait this.hooks(\"connected\", {\n\t\t\t...hookPayload,\n\t\t\tdocumentName,\n\t\t\tcontext: hookPayload.context,\n\t\t\tconnection,\n\t\t});\n\t};\n\n\t// This listener handles authentication messages and queues everything else.\n\tprivate handleQueueingMessage = async (data: Uint8Array, rawKey: string, documentName: string) => {\n\t\ttry {\n\t\t\tconst tmpMsg = new SocketIncomingMessage(data);\n\n\t\t\tdecoding.readVarString(tmpMsg.decoder); // skip the message address (already extracted)\n\t\t\tconst type = decoding.readVarUint(tmpMsg.decoder);\n\n\t\t\tif (\n\t\t\t\t!(\n\t\t\t\t\ttype === MessageType.Auth &&\n\t\t\t\t\t!this.documentConnectionsEstablished.has(rawKey)\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthis.incomingMessageQueue[rawKey].push(data);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Okay, we've got the authentication message we're waiting for:\n\t\t\tthis.documentConnectionsEstablished.add(rawKey);\n\n\t\t\t// The 2nd integer contains the submessage type\n\t\t\t// which will always be authentication when sent from client -> server\n\t\t\tdecoding.readVarUint(tmpMsg.decoder);\n\t\t\tconst token = decoding.readVarString(tmpMsg.decoder);\n\n\t\t\t// Try to read providerVersion (new protocol field)\n\t\t\tlet providerVersion: string | null = null;\n\t\t\tif (decoding.hasContent(tmpMsg.decoder)) {\n\t\t\t\tproviderVersion = decoding.readVarString(tmpMsg.decoder);\n\t\t\t}\n\n\t\t\t// Extract sessionId from the rawKey (documentName\\0sessionId) if present\n\t\t\tconst sepIdx = rawKey.indexOf('\\0');\n\t\t\tconst sessionId = sepIdx === -1 ? null : rawKey.substring(sepIdx + 1);\n\n\t\t\t// Response uses rawKey so session-aware clients can route correctly\n\t\t\tconst responseAddress = rawKey;\n\n\t\t\ttry {\n\t\t\t\tconst hookPayload = this.hookPayloads[rawKey];\n\t\t\t\thookPayload.providerVersion = providerVersion;\n\n\t\t\t\tawait this.hooks(\n\t\t\t\t\t\"onConnect\",\n\t\t\t\t\t{ ...hookPayload, documentName },\n\t\t\t\t\t(contextAdditions: Partial) => {\n\t\t\t\t\t\thookPayload.context = {\n\t\t\t\t\t\t\t...hookPayload.context,\n\t\t\t\t\t\t\t...contextAdditions,\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tawait this.hooks(\n\t\t\t\t\t\"onAuthenticate\",\n\t\t\t\t\t{\n\t\t\t\t\t\ttoken,\n\t\t\t\t\t\t...hookPayload,\n\t\t\t\t\t\tdocumentName,\n\t\t\t\t\t},\n\t\t\t\t\t(contextAdditions: Partial) => {\n\t\t\t\t\t\thookPayload.context = {\n\t\t\t\t\t\t\t...hookPayload.context,\n\t\t\t\t\t\t\t...contextAdditions,\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\t// All `onAuthenticate` hooks passed.\n\t\t\t\thookPayload.connectionConfig.isAuthenticated = true;\n\n\t\t\t\t// Let the client know that authentication was successful.\n\t\t\t\tconst message = new OutgoingMessage(responseAddress).writeAuthenticated(\n\t\t\t\t\thookPayload.connectionConfig.readOnly,\n\t\t\t\t);\n\n\t\t\t\tthis.websocket.send(message.toUint8Array());\n\n\t\t\t\t// Time to actually establish the connection.\n\t\t\t\tawait this.setUpNewConnection(rawKey, documentName, sessionId);\n\t\t\t} catch (err: any) {\n\t\t\t\tconst error = err || Forbidden;\n\t\t\t\tconst message = new OutgoingMessage(responseAddress).writePermissionDenied(\n\t\t\t\t\terror.reason ?? \"permission-denied\",\n\t\t\t\t);\n\n\t\t\t\tthis.websocket.send(message.toUint8Array());\n\n\t\t\t\t// Clean up all state for this document so a retry is treated\n\t\t\t\t// as a fresh first connection attempt.\n\t\t\t\tthis.documentConnectionsEstablished.delete(rawKey);\n\t\t\t\tdelete this.hookPayloads[rawKey];\n\t\t\t\tdelete this.incomingMessageQueue[rawKey];\n\t\t\t}\n\n\t\t\t// Catch errors due to failed decoding of data\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t\tthis.websocket.close(ResetConnection.code, ResetConnection.reason);\n\t\t}\n\t};\n\n\t/**\n\t * Handle an incoming WebSocket message. Call this from your integration\n\t * when the WebSocket receives a binary message.\n\t */\n\thandleMessage = (data: Uint8Array) => {\n\t\tthis.lastMessageReceivedAt = Date.now();\n\n\t\ttry {\n\t\t\tconst tmpMsg = new SocketIncomingMessage(data);\n\n\t\t\tconst rawKey = decoding.readVarString(tmpMsg.decoder);\n\n\t\t\t// Extract the plain documentName (the raw key may be documentName\\0sessionId)\n\t\t\tconst sepIdx = rawKey.indexOf('\\0');\n\t\t\tconst documentName = sepIdx === -1 ? rawKey : rawKey.substring(0, sepIdx);\n\n\t\t\t// Look up by rawKey first (session-aware providers), then fall back\n\t\t\t// to plain documentName for backward compatibility with old providers\n\t\t\tconst connection = this.documentConnections[rawKey]\n\t\t\t\t?? this.documentConnections[documentName];\n\t\t\tif (connection) {\n\t\t\t\tconnection.handleMessage(data);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst isFirst = this.incomingMessageQueue[rawKey] === undefined;\n\t\t\tif (isFirst) {\n\t\t\t\tthis.incomingMessageQueue[rawKey] = [];\n\t\t\t\tif (this.hookPayloads[rawKey]) {\n\t\t\t\t\tthrow new Error(\"first message, but hookPayloads exists\");\n\t\t\t\t}\n\n\t\t\t\tthis.hookPayloads[rawKey] = {\n\t\t\t\t\tinstance: this.documentProvider as Hocuspocus,\n\t\t\t\t\trequest: this.request,\n\t\t\t\t\tconnectionConfig: {\n\t\t\t\t\t\treadOnly: false,\n\t\t\t\t\t\tisAuthenticated: false,\n\t\t\t\t\t},\n\t\t\t\t\trequestHeaders: this.request.headers,\n\t\t\t\t\trequestParameters: getParameters(this.request),\n\t\t\t\t\tsocketId: this.socketId,\n\t\t\t\t\tcontext: {\n\t\t\t\t\t\t...this.defaultContext,\n\t\t\t\t\t},\n\t\t\t\t\tproviderVersion: null as string | null,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.handleQueueingMessage(data, rawKey, documentName);\n\t\t} catch (closeError) {\n\t\t\t// catch is needed in case an invalid payload crashes the parsing of the Uint8Array\n\t\t\tconsole.error(closeError);\n\t\t\tthis.websocket.close(Unauthorized.code, Unauthorized.reason);\n\t\t}\n\t};\n}\n","import { URLSearchParams } from \"node:url\";\nimport type Document from \"./Document.ts\";\nimport type { Hocuspocus } from \"./Hocuspocus.ts\";\nimport type {\n\tDirectConnection as DirectConnectionInterface,\n\tLocalTransactionOrigin,\n} from \"./types.ts\";\n\nexport class DirectConnection\n\timplements DirectConnectionInterface\n{\n\tdocument: Document | null = null;\n\n\tinstance!: Hocuspocus;\n\n\tcontext: Context;\n\n\t/**\n\t * Constructor.\n\t */\n\tconstructor(document: Document, instance: Hocuspocus, context?: Context) {\n\t\tthis.document = document;\n\t\tthis.instance = instance;\n\t\tthis.context = (context ?? {}) as Context;\n\n\t\tthis.document.addDirectConnection();\n\t}\n\n\tasync transact(transaction: (document: Document) => void) {\n\t\tif (!this.document) {\n\t\t\tthrow new Error(\"direct connection closed\");\n\t\t}\n\n\t\tthis.document.transact(\n\t\t\t(x) => {\n\t\t\t\t// biome-ignore lint/style/noNonNullAssertion: \n\t\t\t\ttransaction(this.document!);\n\t\t\t},\n\t\t\t{\n\t\t\t\tsource: \"local\",\n\t\t\t\tcontext: this.context,\n\t\t\t} satisfies LocalTransactionOrigin,\n\t\t);\n\t}\n\n\tasync disconnect() {\n\t\tif (this.document) {\n\t\t\tthis.document?.removeDirectConnection();\n\n\t\t\tawait this.instance.storeDocumentHooks(\n\t\t\t\tthis.document,\n\t\t\t\t{\n\t\t\t\t\tclientsCount: this.document.getConnectionsCount(),\n\t\t\t\t\tlastContext: this.context,\n\t\t\t\t\tlastTransactionOrigin: {\n\t\t\t\t\t\tsource: \"local\",\n\t\t\t\t\t\tcontext: this.context,\n\t\t\t\t\t} satisfies LocalTransactionOrigin,\n\t\t\t\t\tdocument: this.document,\n\t\t\t\t\tdocumentName: this.document.name,\n\t\t\t\t\tinstance: this.instance,\n\t\t\t\t},\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\t// If the direct connection was the only connection to the document\n\t\t\t// then we should trigger the onDisconnect hook for\n\t\t\t// this doc and unload the document\n\t\t\tif (\n\t\t\t\tthis.document.getConnectionsCount() === 0 &&\n\t\t\t\t!this.document.saveMutex.isLocked()\n\t\t\t) {\n\t\t\t\tawait this.instance.hooks(\"onDisconnect\", {\n\t\t\t\t\tinstance: this.instance,\n\t\t\t\t\tclientsCount: this.document.getConnectionsCount(),\n\t\t\t\t\tcontext: this.context,\n\t\t\t\t\tdocument: this.document,\n\t\t\t\t\tsocketId: \"server\",\n\t\t\t\t\tdocumentName: this.document.name,\n\t\t\t\t\trequestHeaders: new Headers(),\n\t\t\t\t\trequestParameters: new URLSearchParams(),\n\t\t\t\t});\n\n\t\t\t\tawait this.instance.unloadDocument(this.document);\n\t\t\t}\n\n\t\t\tthis.document = null;\n\t\t}\n\t}\n}\n","export const useDebounce = () => {\n\tconst timers: Map<\n\t\tstring,\n\t\t{\n\t\t\ttimeout: NodeJS.Timeout;\n\t\t\tstart: number;\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n\t\t\tfunc: () => any | Promise<() => any>;\n\t\t}\n\t> = new Map();\n\n\tconst runningExecutions: Map> = new Map();\n\n\tconst debounce = async (\n\t\tid: string,\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n\t\tfunc: () => any | Promise<() => any>,\n\t\tdebounce: number,\n\t\tmaxDebounce: number,\n\t) => {\n\t\tconst old = timers.get(id);\n\t\tconst start = old?.start || Date.now();\n\n\t\tconst run = async () => {\n\t\t\tif (runningExecutions.has(id)) {\n\t\t\t\t// wait for previous execution to finish\n\t\t\t\tawait runningExecutions.get(id);\n\t\t\t}\n\n\t\t\ttimers.delete(id);\n\n\t\t\tconst execution = func();\n\n\t\t\trunningExecutions.set(id, execution);\n\t\t\tconst executionResult = await execution;\n\t\t\trunningExecutions.delete(id);\n\n\t\t\treturn executionResult;\n\t\t};\n\n\t\tif (old?.timeout) {\n\t\t\tclearTimeout(old.timeout);\n\t\t}\n\n\t\tif (debounce === 0) {\n\t\t\treturn run();\n\t\t}\n\n\t\tif (Date.now() - start >= maxDebounce) {\n\t\t\treturn run();\n\t\t}\n\n\t\ttimers.set(id, {\n\t\t\tstart,\n\t\t\ttimeout: setTimeout(run, debounce),\n\t\t\tfunc: run,\n\t\t});\n\t};\n\n\tconst executeNow = (id: string) => {\n\t\tconst old = timers.get(id);\n\t\tif (old) {\n\t\t\tclearTimeout(old.timeout);\n\t\t\treturn old.func();\n\t\t}\n\t};\n\n\tconst isDebounced = (id: string): boolean => {\n\t\treturn timers.has(id);\n\t};\n\n\tconst isCurrentlyExecuting = (id: string): boolean => {\n\t\treturn runningExecutions.has(id);\n\t};\n\n\treturn { debounce, isDebounced, isCurrentlyExecuting, executeNow };\n};\n","import crypto from \"node:crypto\";\nimport { awarenessStatesToArray, ResetConnection, SkipFurtherHooksError } from \"@hocuspocus/common\";\nimport { applyUpdate, Doc, encodeStateAsUpdate } from \"yjs\";\nimport meta from \"../package.json\" with { type: \"json\" };\n\nimport { ClientConnection } from \"./ClientConnection.ts\";\nimport { DirectConnection } from \"./DirectConnection.ts\";\nimport Document from \"./Document.ts\";\nimport type { Server } from \"./Server.ts\";\nimport type {\n\tAwarenessUpdate,\n\tbeforeBroadcastStatelessPayload,\n\tConfiguration,\n\tConnectionConfiguration,\n\tHookName,\n\tHookPayloadByName,\n\tonChangePayload,\n\tonDisconnectPayload,\n\tonStoreDocumentPayload,\n\tWebSocketLike,\n} from \"./types.ts\";\nimport { isTransactionOrigin, shouldSkipStoreHooks } from \"./types.ts\";\nimport { useDebounce } from \"./util/debounce.ts\";\nimport { getParameters } from \"./util/getParameters.ts\";\n\nexport const defaultConfiguration = {\n\tname: null,\n\ttimeout: 60_000,\n\tdebounce: 2_000,\n\tmaxDebounce: 10_000,\n\tquiet: false,\n\tyDocOptions: {\n\t\tgc: true,\n\t\tgcFilter: () => true,\n\t},\n\tunloadImmediately: true,\n};\n\nexport class Hocuspocus {\n\tconfiguration: Configuration = {\n\t\t...defaultConfiguration,\n\t\textensions: [],\n\t\tonConfigure: () => new Promise((r) => r(null)),\n\t\tonListen: () => new Promise((r) => r(null)),\n\t\tonUpgrade: () => new Promise((r) => r(null)),\n\t\tonConnect: () => new Promise((r) => r(null)),\n\t\tconnected: () => new Promise((r) => r(null)),\n\t\tbeforeHandleMessage: () => new Promise((r) => r(null)),\n\t\tbeforeHandleAwareness: () => new Promise((r) => r()),\n\t\tbeforeSync: () => new Promise((r) => r(null)),\n\t\tbeforeBroadcastStateless: () => new Promise((r) => r(null)),\n\t\tonStateless: () => new Promise((r) => r(null)),\n\t\tonChange: () => new Promise((r) => r(null)),\n\t\tonCreateDocument: () => new Promise((r) => r(null)),\n\t\tonLoadDocument: () => new Promise((r) => r(null)),\n\t\tonStoreDocument: () => new Promise((r) => r(null)),\n\t\tafterStoreDocument: () => new Promise((r) => r(null)),\n\t\tonAwarenessUpdate: () => new Promise((r) => r(null)),\n\t\tonRequest: () => new Promise((r) => r(null)),\n\t\tonDisconnect: () => new Promise((r) => r(null)),\n\t\tonDestroy: () => new Promise((r) => r(null)),\n\t};\n\n\tloadingDocuments: Map> = new Map();\n\tunloadingDocuments: Map> = new Map();\n\n\tdocuments: Map = new Map();\n\n\tserver?: Server;\n\n\tdebouncer = useDebounce();\n\n\tconstructor(configuration?: Partial>) {\n\t\tif (configuration) {\n\t\t\tthis.configure(configuration);\n\t\t}\n\t}\n\n\t/**\n\t * Configure Hocuspocus\n\t */\n\tconfigure(\n\t\tconfiguration: Partial>,\n\t): Hocuspocus {\n\t\tthis.configuration = {\n\t\t\t...this.configuration,\n\t\t\t...configuration,\n\t\t};\n\n\t\tthis.configuration.extensions.sort((a, b) => {\n\t\t\tconst one = typeof a.priority === \"undefined\" ? 100 : a.priority;\n\t\t\tconst two = typeof b.priority === \"undefined\" ? 100 : b.priority;\n\n\t\t\tif (one > two) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\tif (one < two) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t});\n\n\t\tthis.configuration.extensions.push({\n\t\t\tonConfigure: this.configuration.onConfigure,\n\t\t\tonListen: this.configuration.onListen,\n\t\t\tonUpgrade: this.configuration.onUpgrade,\n\t\t\tonConnect: this.configuration.onConnect,\n\t\t\tconnected: this.configuration.connected,\n\t\t\tonAuthenticate: this.configuration.onAuthenticate,\n\t\t\tonTokenSync: this.configuration.onTokenSync,\n\t\t\tonLoadDocument: this.configuration.onLoadDocument,\n\t\t\tafterLoadDocument: this.configuration.afterLoadDocument,\n\t\t\tbeforeHandleMessage: this.configuration.beforeHandleMessage,\n\t\t\tbeforeHandleAwareness: this.configuration.beforeHandleAwareness,\n\t\t\tbeforeBroadcastStateless: this.configuration.beforeBroadcastStateless,\n\t\t\tbeforeSync: this.configuration.beforeSync,\n\t\t\tonStateless: this.configuration.onStateless,\n\t\t\tonChange: this.configuration.onChange,\n\t\t\tonStoreDocument: this.configuration.onStoreDocument,\n\t\t\tafterStoreDocument: this.configuration.afterStoreDocument,\n\t\t\tonAwarenessUpdate: this.configuration.onAwarenessUpdate,\n\t\t\tonRequest: this.configuration.onRequest,\n\t\t\tbeforeUnloadDocument: this.configuration.beforeUnloadDocument,\n\t\t\tafterUnloadDocument: this.configuration.afterUnloadDocument,\n\t\t\tonDisconnect: this.configuration.onDisconnect,\n\t\t\tonDestroy: this.configuration.onDestroy,\n\t\t});\n\n\t\tthis.hooks(\"onConfigure\", {\n\t\t\tconfiguration: this.configuration,\n\t\t\tversion: meta.version,\n\t\t\tinstance: this,\n\t\t});\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Get the total number of active documents\n\t */\n\tgetDocumentsCount(): number {\n\t\treturn this.documents.size;\n\t}\n\n\t/**\n\t * Get the total number of active connections\n\t */\n\tgetConnectionsCount(): number {\n\t\tconst uniqueSocketIds = new Set();\n\t\tconst totalDirectConnections = Array.from(this.documents.values()).reduce(\n\t\t\t(acc, document) => {\n\t\t\t\t// Accumulate unique socket IDs\n\t\t\t\tdocument.getConnections().forEach(({ socketId }) => {\n\t\t\t\t\tuniqueSocketIds.add(socketId);\n\t\t\t\t});\n\t\t\t\t// Accumulate direct connections\n\t\t\t\treturn acc + document.directConnectionsCount;\n\t\t\t},\n\t\t\t0,\n\t\t);\n\t\t// Return the sum of unique socket IDs and direct connections\n\t\treturn uniqueSocketIds.size + totalDirectConnections;\n\t}\n\n\t/**\n\t * Immediately execute all pending debounced onStoreDocument calls.\n\t * Useful during shutdown to ensure documents are persisted and unloaded\n\t * before the server exits, even when unloadImmediately is false.\n\t */\n\tflushPendingStores() {\n\t\tthis.documents.forEach((document: Document) => {\n\t\t\tconst debounceId = `onStoreDocument-${document.name}`;\n\t\t\tif (!document.isLoading && this.debouncer.isDebounced(debounceId)) {\n\t\t\t\tthis.debouncer.executeNow(debounceId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Force close one or more connections\n\t */\n\tcloseConnections(documentName?: string) {\n\t\t// Iterate through all connections for all documents\n\t\t// and invoke their close method, which is a graceful\n\t\t// disconnect wrapper around the underlying websocket.close\n\t\tthis.documents.forEach((document: Document) => {\n\t\t\t// If a documentName was specified, bail if it doesn't match\n\t\t\tif (documentName && document.name !== documentName) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdocument.connections.forEach((_clients, connection) => {\n\t\t\t\tconnection.close(ResetConnection);\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * The `handleConnection` method receives incoming WebSocket connections,\n\t * runs all hooks:\n\t *\n\t * - onConnect for all connections\n\t * - onAuthenticate only if required\n\t *\n\t * … and if nothing fails it'll fully establish the connection and\n\t * load the Document then.\n\t */\n\thandleConnection(\n\t\tincoming: WebSocket | WebSocketLike,\n\t\trequest: Request,\n\t\tdefaultContext: Context = {} as Context,\n\t): ClientConnection {\n\t\tconst clientConnection = new ClientConnection(\n\t\t\tincoming,\n\t\t\trequest,\n\t\t\tthis,\n\t\t\tthis.hooks.bind(this),\n\t\t\t{\n\t\t\t\ttimeout: this.configuration.timeout,\n\t\t\t},\n\t\t\tdefaultContext,\n\t\t);\n\t\tclientConnection.onClose(\n\t\t\t(document: Document, hookPayload: onDisconnectPayload) => {\n\t\t\t\t// Check if there are still no connections to the document, as these hooks\n\t\t\t\t// may take some time to resolve (e.g. database queries). If a\n\t\t\t\t// new connection were to come in during that time it would rely on the\n\t\t\t\t// document in the map that we remove now.\n\t\t\t\tif (document.getConnectionsCount() > 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If it’s the last connection, we need to make sure to store the\n\t\t\t\t// document. Use the debouncer executeNow helper, to run scheduled\n\t\t\t\t// onStoreDocument immediately and clear running timers.\n\t\t\t\t// If there is no scheduled run for this document there is no point in\n\t\t\t\t// triggering onStoreDocument hook, as everything seems to be stored already.\n\t\t\t\t// Only run this if the document has finished loading earlier (i.e. not to persist the empty\n\t\t\t\t// ydoc if the onLoadDocument hook returned an error)\n\t\t\t\tif (\n\t\t\t\t\t!document.isLoading &&\n\t\t\t\t\tthis.debouncer.isDebounced(`onStoreDocument-${document.name}`)\n\t\t\t\t) {\n\t\t\t\t\tif (this.configuration.unloadImmediately) {\n\t\t\t\t\t\tthis.debouncer.executeNow(`onStoreDocument-${document.name}`);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Remove document from memory immediately\n\t\t\t\t\tthis.unloadDocument(document);\n\t\t\t\t}\n\t\t\t},\n\t\t);\n\n\t\treturn clientConnection;\n\t}\n\n\t/**\n\t * Handle update of the given document\n\t *\n\t * \"connection\" is not necessarily type \"Connection\", it's the Yjs \"origin\" (which is \"Connection\" if\n\t * the update is incoming from the provider, but can be anything if the updates is originated from an extension.\n\t */\n\tprivate handleDocumentUpdate(\n\t\tdocument: Document,\n\t\torigin: unknown,\n\t\tupdate: Uint8Array,\n\t) {\n\t\tconst connection =\n\t\t\tisTransactionOrigin(origin) && origin.source === \"connection\"\n\t\t\t\t? origin.connection\n\t\t\t\t: undefined;\n\t\tconst request = connection?.request;\n\t\tconst context = isTransactionOrigin(origin)\n\t\t\t? origin.source === \"connection\"\n\t\t\t\t? origin.connection.context\n\t\t\t\t: origin.source === \"local\"\n\t\t\t\t\t? (origin.context ?? {})\n\t\t\t\t\t: {}\n\t\t\t: {};\n\n\t\tconst changePayload: onChangePayload = {\n\t\t\tinstance: this,\n\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\tdocument,\n\t\t\tdocumentName: document.name,\n\t\t\trequestHeaders: request?.headers ?? new Headers(),\n\t\t\trequestParameters: getParameters(request),\n\t\t\tsocketId: connection?.socketId ?? \"\",\n\t\t\tupdate,\n\t\t\ttransactionOrigin: origin,\n\t\t\tconnection: connection,\n\t\t\tcontext,\n\t\t};\n\n\t\tthis.hooks(\"onChange\", changePayload);\n\n\t\tif (shouldSkipStoreHooks(origin)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst storePayload: onStoreDocumentPayload = {\n\t\t\tinstance: this,\n\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\tdocument,\n\t\t\tlastContext: context,\n\t\t\tlastTransactionOrigin: origin,\n\t\t\tdocumentName: document.name,\n\t\t};\n\n\t\tthis.storeDocumentHooks(document, storePayload);\n\t}\n\n\t/**\n\t * Create a new document by the given request\n\t */\n\tpublic async createDocument(\n\t\tdocumentName: string,\n\t\trequest: Request,\n\t\tsocketId: string,\n\t\tconnection: ConnectionConfiguration,\n\t\tcontext?: Context,\n\t): Promise {\n\t\tif (!documentName.trim()) {\n\t\t\tthrow new Error(\"Document name must not be empty\");\n\t\t}\n\n\t\tconst existingLoadingDoc = this.loadingDocuments.get(documentName);\n\n\t\tif (existingLoadingDoc) {\n\t\t\treturn existingLoadingDoc;\n\t\t}\n\n\t\tconst existingDoc = this.documents.get(documentName);\n\t\tif (existingDoc) {\n\t\t\treturn Promise.resolve(existingDoc);\n\t\t}\n\n\t\tconst loadDocPromise = this.loadDocument(\n\t\t\tdocumentName,\n\t\t\trequest,\n\t\t\tsocketId,\n\t\t\tconnection,\n\t\t\tcontext,\n\t\t);\n\n\t\tthis.loadingDocuments.set(documentName, loadDocPromise);\n\n\t\ttry {\n\t\t\tconst doc = await loadDocPromise;\n\t\t\tthis.documents.set(documentName, doc);\n\t\t\tthis.loadingDocuments.delete(documentName);\n\t\t\treturn doc;\n\t\t} catch (e) {\n\t\t\tthis.loadingDocuments.delete(documentName);\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\tasync loadDocument(\n\t\tdocumentName: string,\n\t\trequest: Request,\n\t\tsocketId: string,\n\t\tconnectionConfig: ConnectionConfiguration,\n\t\tcontext?: Context,\n\t): Promise {\n\t\tconst requestHeaders = request.headers;\n\t\tconst requestParameters = getParameters(request);\n\n\t\tconst resolvedContext = (context ?? {}) as Context;\n\n\t\tconst yDocOptions = await this.hooks(\"onCreateDocument\", {\n\t\t\tdocumentName,\n\t\t\trequestHeaders,\n\t\t\trequestParameters,\n\t\t\tconnectionConfig,\n\t\t\tcontext: resolvedContext,\n\t\t\tsocketId,\n\t\t\tinstance: this,\n\t\t});\n\n\t\tconst document = new Document(documentName, {\n\t\t\t...this.configuration.yDocOptions,\n\t\t\t...yDocOptions,\n\t\t});\n\n\t\tconst hookPayload = {\n\t\t\tinstance: this,\n\t\t\tcontext: resolvedContext,\n\t\t\tconnectionConfig,\n\t\t\tdocument,\n\t\t\tdocumentName,\n\t\t\tsocketId,\n\t\t\trequestHeaders,\n\t\t\trequestParameters,\n\t\t};\n\n\t\ttry {\n\t\t\tawait this.hooks(\n\t\t\t\t\"onLoadDocument\",\n\t\t\t\thookPayload,\n\t\t\t\t(loadedDocument: Doc | Uint8ArrayConstructor | undefined) => {\n\t\t\t\t\tif (loadedDocument instanceof Doc) {\n\t\t\t\t\t\tapplyUpdate(document, encodeStateAsUpdate(loadedDocument));\n\t\t\t\t\t} else if (loadedDocument instanceof Uint8Array) {\n\t\t\t\t\t\tapplyUpdate(document, loadedDocument);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tthis.closeConnections(documentName);\n\t\t\tthis.unloadDocument(document);\n\t\t\tthrow e;\n\t\t}\n\n\t\tdocument.isLoading = false;\n\n\t\tdocument.onUpdate(\n\t\t\t(document: Document, origin: unknown, update: Uint8Array) => {\n\t\t\t\tdocument.lastChangeTime = Date.now();\n\n\t\t\t\tthis.handleDocumentUpdate(document, origin, update);\n\t\t\t},\n\t\t);\n\n\t\tawait this.hooks(\"afterLoadDocument\", hookPayload);\n\n\t\tdocument.beforeBroadcastStateless(\n\t\t\t(document: Document, stateless: string) => {\n\t\t\t\tconst hookPayload: beforeBroadcastStatelessPayload = {\n\t\t\t\t\tdocument,\n\t\t\t\t\tdocumentName: document.name,\n\t\t\t\t\tpayload: stateless,\n\t\t\t\t};\n\n\t\t\t\tthis.hooks(\"beforeBroadcastStateless\", hookPayload);\n\t\t\t},\n\t\t);\n\n\t\tdocument.beforeHandleAwareness((document, states, transactionOrigin) => {\n\t\t\tconst connection =\n\t\t\t\tisTransactionOrigin(transactionOrigin) &&\n\t\t\t\ttransactionOrigin.source === \"connection\"\n\t\t\t\t\t? transactionOrigin.connection\n\t\t\t\t\t: undefined;\n\t\t\tconst request = connection?.request;\n\t\t\treturn this.hooks(\"beforeHandleAwareness\", {\n\t\t\t\tawareness: document.awareness,\n\t\t\t\tclientsCount: document.getConnectionsCount(),\n\t\t\t\tcontext: connection?.context,\n\t\t\t\tdocument,\n\t\t\t\tdocumentName: document.name,\n\t\t\t\tinstance: this,\n\t\t\t\trequestHeaders: request?.headers ?? new Headers(),\n\t\t\t\trequestParameters: request\n\t\t\t\t\t? getParameters(request)\n\t\t\t\t\t: new URLSearchParams(),\n\t\t\t\tsocketId: connection?.socketId ?? \"\",\n\t\t\t\ttransactionOrigin,\n\t\t\t\tconnection,\n\t\t\t\tstates,\n\t\t\t});\n\t\t});\n\n\t\tdocument.awareness.on(\n\t\t\t\"update\",\n\t\t\t(update: AwarenessUpdate, origin: unknown) => {\n\t\t\t\tthis.hooks(\"onAwarenessUpdate\", {\n\t\t\t\t\tdocument,\n\t\t\t\t\tdocumentName,\n\t\t\t\t\tinstance: this,\n\t\t\t\t\t...update,\n\t\t\t\t\ttransactionOrigin: origin,\n\t\t\t\t\tconnection:\n\t\t\t\t\t\tisTransactionOrigin(origin) && origin.source === \"connection\"\n\t\t\t\t\t\t\t? origin.connection\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\tawareness: document.awareness,\n\t\t\t\t\tstates: awarenessStatesToArray(document.awareness.getStates()),\n\t\t\t\t});\n\t\t\t},\n\t\t);\n\n\t\treturn document;\n\t}\n\n\tstoreDocumentHooks(\n\t\tdocument: Document,\n\t\thookPayload: onStoreDocumentPayload,\n\t\timmediately?: boolean,\n\t) {\n\t\tconst debounceId = `onStoreDocument-${document.name}`;\n\t\treturn this.debouncer.debounce(\n\t\t\tdebounceId,\n\t\t\tasync () => {\n\t\t\t\ttry {\n\t\t\t\t\tawait document.saveMutex.runExclusive(async () => {\n\t\t\t\t\t\tawait this.hooks(\"onStoreDocument\", hookPayload);\n\t\t\t\t\t\tawait this.hooks(\"afterStoreDocument\", hookPayload);\n\t\t\t\t\t});\n\t\t\t\t} catch (error: any) {\n\t\t\t\t\tif (error instanceof SkipFurtherHooksError) {\n\t\t\t\t\t\t// Another extension handled this — proceed to unload\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tif (this.shouldUnloadDocument(document)) {\n\t\t\t\t\t\t\t\tthis.unloadDocument(document);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\"Caught error during storeDocumentHooks. Document stays in memory to avoid data loss\",\n\t\t\t\t\t\terror,\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tif (this.shouldUnloadDocument(document)) {\n\t\t\t\t\t\tthis.unloadDocument(document);\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t\t\t},\n\t\t\timmediately ? 0 : this.configuration.debounce,\n\t\t\tthis.configuration.maxDebounce,\n\t\t);\n\t}\n\n\t/**\n\t * Run the given hook on all configured extensions.\n\t * Runs the given callback after each hook.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n\thooks(\n\t\tname: T,\n\t\tpayload: HookPayloadByName[T],\n\t\t// biome-ignore lint/complexity/noBannedTypes: \n\t\tcallback: Function | null = null,\n\t): Promise {\n\t\tconst { extensions } = this.configuration;\n\n\t\t// create a new `thenable` chain\n\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve\n\t\tlet chain = Promise.resolve();\n\n\t\textensions\n\t\t\t// get me all extensions which have the given hook\n\t\t\t.filter((extension) => typeof extension[name] === \"function\")\n\t\t\t// run through all the configured hooks\n\t\t\t.forEach((extension) => {\n\t\t\t\tchain = chain\n\t\t\t\t\t.then(() => (extension[name] as any)?.(payload))\n\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t// make sure to log error messages\n\t\t\t\t\t\tif (error?.message) {\n\t\t\t\t\t\t\tconsole.error(`[${name}]`, error.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t});\n\n\t\t\t\tif (callback) {\n\t\t\t\t\tchain = chain.then((...args: any[]) => callback(...args));\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn chain;\n\t}\n\n\tshouldUnloadDocument(document: Document): boolean {\n\t\tconst hasPendingWork =\n\t\t\tthis.debouncer.isDebounced(`onStoreDocument-${document.name}`) ||\n\t\t\tthis.debouncer.isCurrentlyExecuting(`onStoreDocument-${document.name}`) ||\n\t\t\tdocument.saveMutex.isLocked();\n\n\t\treturn hasPendingWork === false && document.getConnectionsCount() === 0;\n\t}\n\n\tasync unloadDocument(document: Document): Promise {\n\t\tconst documentName = document.name;\n\n\t\tif (!this.shouldUnloadDocument(document)) return;\n\n\t\tif (!this.documents.has(documentName)) return;\n\n\t\tif (this.unloadingDocuments.has(documentName))\n\t\t\treturn this.unloadingDocuments.get(documentName);\n\n\t\t// we need to make sure that the logic runs just once, even if multiple clients disconnect together\n\t\tconst actualUnloadingLogic = async () => {\n\t\t\ttry {\n\t\t\t\tawait this.hooks(\"beforeUnloadDocument\", {\n\t\t\t\t\tinstance: this,\n\t\t\t\t\tdocumentName,\n\t\t\t\t\tdocument,\n\t\t\t\t});\n\t\t\t} catch (e) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// need sync check here as well, to avoid timing problems\n\t\t\tif (!this.shouldUnloadDocument(document)) return;\n\n\t\t\tthis.documents.delete(documentName);\n\t\t\tdocument.destroy();\n\t\t\tawait this.hooks(\"afterUnloadDocument\", { instance: this, documentName });\n\t\t};\n\n\t\tconst unloading = actualUnloadingLogic();\n\n\t\tthis.unloadingDocuments.set(documentName, Promise.resolve(unloading));\n\n\t\tawait unloading;\n\n\t\tthis.unloadingDocuments.delete(documentName);\n\t}\n\n\tasync openDirectConnection(\n\t\tdocumentName: string,\n\t\tcontext?: Context,\n\t): Promise> {\n\t\tconst connectionConfig: ConnectionConfiguration = {\n\t\t\tisAuthenticated: true,\n\t\t\treadOnly: false,\n\t\t};\n\n\t\tconst document: Document = await this.createDocument(\n\t\t\tdocumentName,\n\t\t\tnew Request(\"http://localhost\"), // direct connection has no request params\n\t\t\tcrypto.randomUUID(),\n\t\t\tconnectionConfig,\n\t\t\tcontext,\n\t\t);\n\n\t\treturn new DirectConnection(document, this, context);\n\t}\n}\n","import type {\n\tServer as HTTPServer,\n\tIncomingMessage,\n\tServerResponse,\n} from \"node:http\";\nimport { createServer } from \"node:http\";\nimport type { AddressInfo } from \"node:net\";\nimport type { ListenOptions } from \"node:net\";\nimport crossws from \"crossws/adapters/node\";\nimport kleur from \"kleur\";\nimport meta from \"../package.json\" assert { type: \"json\" };\nimport { Hocuspocus, defaultConfiguration } from \"./Hocuspocus.ts\";\nimport type { Configuration, WebSocketLike, onListenPayload } from \"./types.ts\";\n\nexport interface ServerConfiguration\n\textends Configuration {\n\tport?: number;\n\taddress?: string;\n\tstopOnSignals?: boolean;\n\t/**\n\t * Options passed to the underlying WebSocket server (ws).\n\t * Supports all ws ServerOptions, e.g. { maxPayload: 1024 * 1024 }\n\t */\n\twebsocketOptions?: Record;\n}\n\nexport const defaultServerConfiguration = {\n\tport: 80,\n\taddress: \"0.0.0.0\",\n\tstopOnSignals: true,\n};\n\nexport class Server {\n\thttpServer: HTTPServer;\n\n\tprivate crossws: ReturnType;\n\n\thocuspocus: Hocuspocus;\n\n\tconfiguration: ServerConfiguration = {\n\t\t...defaultConfiguration,\n\t\t...defaultServerConfiguration,\n\t\textensions: [],\n\t};\n\n\tconstructor(configuration?: Partial>) {\n\t\tif (configuration) {\n\t\t\tthis.configuration = {\n\t\t\t\t...this.configuration,\n\t\t\t\t...configuration,\n\t\t\t};\n\t\t}\n\n\t\tthis.hocuspocus = new Hocuspocus(this.configuration);\n\t\tthis.hocuspocus.server = this;\n\n\t\tthis.httpServer = createServer(this.requestHandler);\n\t\tthis.crossws = crossws({\n\t\t\tserverOptions: this.configuration.websocketOptions,\n\t\t\thooks: {\n\t\t\t\topen: (peer) => {\n\t\t\t\t\tconst clientConnection = this.hocuspocus.handleConnection(\n\t\t\t\t\t\tpeer.websocket as unknown as WebSocketLike,\n\t\t\t\t\t\tpeer.request as Request,\n\t\t\t\t\t);\n\t\t\t\t\t(peer as any)._hocuspocus = clientConnection;\n\t\t\t\t},\n\t\t\t\tmessage: (peer, message) => {\n\t\t\t\t\t(peer as any)._hocuspocus?.handleMessage(message.uint8Array());\n\t\t\t\t},\n\t\t\t\tclose: (peer, event) => {\n\t\t\t\t\t(peer as any)._hocuspocus?.handleClose({\n\t\t\t\t\t\tcode: event.code,\n\t\t\t\t\t\treason: event.reason,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\terror: (peer, error) => {\n\t\t\t\t\tconsole.error(\"WebSocket error for peer:\", peer.id);\n\t\t\t\t\tconsole.error(error);\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\n\t\tthis.setupHttpUpgrade();\n\t}\n\n\tprivate setupHttpUpgrade = () => {\n\t\tthis.httpServer.on(\"upgrade\", async (request, socket, head) => {\n\t\t\ttry {\n\t\t\t\tawait this.hocuspocus.hooks(\"onUpgrade\", {\n\t\t\t\t\trequest,\n\t\t\t\t\tsocket,\n\t\t\t\t\thead,\n\t\t\t\t\tinstance: this.hocuspocus,\n\t\t\t\t});\n\n\t\t\t\t// Let crossws handle the WebSocket upgrade\n\t\t\t\tthis.crossws.handleUpgrade(request, socket, head);\n\t\t\t} catch (error) {\n\t\t\t\t// if a hook rejects and the error is empty, do nothing\n\t\t\t\t// this is only meant to prevent later hooks and the\n\t\t\t\t// default handler to do something. if a error is present\n\t\t\t\t// just rethrow it\n\t\t\t\tif (error) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\trequestHandler = async (\n\t\trequest: IncomingMessage,\n\t\tresponse: ServerResponse,\n\t) => {\n\t\ttry {\n\t\t\tawait this.hocuspocus.hooks(\"onRequest\", {\n\t\t\t\trequest,\n\t\t\t\tresponse,\n\t\t\t\tinstance: this.hocuspocus,\n\t\t\t});\n\n\t\t\t// default response if all prior hooks don't interfere\n\t\t\tresponse.writeHead(200, { \"Content-Type\": \"text/plain\" });\n\t\t\tresponse.end(\"Welcome to Hocuspocus!\");\n\t\t} catch (error) {\n\t\t\t// if a hook rejects and the error is empty, do nothing\n\t\t\t// this is only meant to prevent later hooks and the\n\t\t\t// default handler to do something. if a error is present\n\t\t\t// just rethrow it\n\t\t\tif (error) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t};\n\n\tasync listen(\n\t\tport?: number,\n\t\tcallback: any = null,\n\t): Promise> {\n\t\tif (port) {\n\t\t\tthis.configuration.port = port;\n\t\t}\n\n\t\tif (typeof callback === \"function\") {\n\t\t\tthis.hocuspocus.configuration.extensions.push({\n\t\t\t\tonListen: callback,\n\t\t\t});\n\t\t}\n\n\t\tif (this.configuration.stopOnSignals) {\n\t\t\tconst signalHandler = async () => {\n\t\t\t\tawait this.destroy();\n\t\t\t\tprocess.exit(0);\n\t\t\t};\n\n\t\t\tprocess.on(\"SIGINT\", signalHandler);\n\t\t\tprocess.on(\"SIGQUIT\", signalHandler);\n\t\t\tprocess.on(\"SIGTERM\", signalHandler);\n\t\t}\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n\t\treturn new Promise((resolve: Function, reject: Function) => {\n\t\t\tthis.httpServer.listen(\n\t\t\t\t{\n\t\t\t\t\tport: this.configuration.port,\n\t\t\t\t\taddress: this.configuration.address,\n\t\t\t\t} as ListenOptions,\n\t\t\t\tasync () => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t!this.configuration.quiet &&\n\t\t\t\t\t\tString(process.env.NODE_ENV) !== \"testing\"\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.showStartScreen();\n\t\t\t\t\t}\n\n\t\t\t\t\tconst onListenPayload = {\n\t\t\t\t\t\tinstance: this.hocuspocus,\n\t\t\t\t\t\tconfiguration: this.configuration,\n\t\t\t\t\t\tport: this.address.port,\n\t\t\t\t\t} as onListenPayload;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait this.hocuspocus.hooks(\"onListen\", onListenPayload);\n\t\t\t\t\t\tresolve(this.hocuspocus);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treject(e);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\t\t});\n\t}\n\n\tget address(): AddressInfo {\n\t\treturn (this.httpServer.address() || {\n\t\t\tport: this.configuration.port,\n\t\t\taddress: this.configuration.address,\n\t\t\tfamily: \"IPv4\",\n\t\t}) as AddressInfo;\n\t}\n\n\tasync destroy(): Promise {\n\t\tawait new Promise((resolve) => {\n\t\t\tthis.httpServer.close();\n\n\t\t\ttry {\n\t\t\t\tthis.configuration.extensions.push({\n\t\t\t\t\tasync afterUnloadDocument({ instance }) {\n\t\t\t\t\t\tif (instance.getDocumentsCount() === 0) resolve();\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\t// Close all existing connections - this will trigger the close hook\n\t\t\t\tif (this.hocuspocus.getDocumentsCount() === 0) resolve();\n\n\t\t\t\tthis.hocuspocus.closeConnections();\n\n\t\t\t\t// Flush any remaining debounced stores so documents unload\n\t\t\t\t// promptly, even when unloadImmediately is false.\n\t\t\t\tthis.hocuspocus.flushPendingStores();\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error);\n\t\t\t}\n\t\t});\n\n\t\tawait this.hocuspocus.hooks(\"onDestroy\", { instance: this.hocuspocus });\n\t}\n\n\tget URL(): string {\n\t\treturn `${this.configuration.address}:${this.address.port}`;\n\t}\n\n\tget webSocketURL(): string {\n\t\treturn `ws://${this.URL}`;\n\t}\n\n\tget httpURL(): string {\n\t\treturn `http://${this.URL}`;\n\t}\n\n\tprivate showStartScreen() {\n\t\tconst name = this.configuration.name ? ` (${this.configuration.name})` : \"\";\n\n\t\tconsole.log();\n\t\tconsole.log(\n\t\t\t` ${kleur.cyan(`Hocuspocus v${meta.version}${name}`)}${kleur.green(\" running at:\")}`,\n\t\t);\n\t\tconsole.log();\n\n\t\tconsole.log(` > HTTP: ${kleur.cyan(`${this.httpURL}`)}`);\n\t\tconsole.log(` > WebSocket: ${this.webSocketURL}`);\n\n\t\tconst extensions = this.configuration?.extensions\n\t\t\t.map((extension) => {\n\t\t\t\treturn extension.extensionName ?? extension.constructor?.name;\n\t\t\t})\n\t\t\t.filter((name) => name)\n\t\t\t.filter((name) => name !== \"Object\");\n\n\t\tif (!extensions.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log();\n\t\tconsole.log(\" Extensions:\");\n\n\t\textensions.forEach((name) => {\n\t\t\tconsole.log(` - ${name}`);\n\t\t});\n\n\t\tconsole.log();\n\t\tconsole.log(` ${kleur.green(\"Ready.\")}`);\n\t\tconsole.log();\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,IAAa,kBAAb,MAA6B;CAa5B,YAAY,OAAY;AACvB,MAAI,EAAE,iBAAiB,YACtB,SAAQ,IAAI,WAAW,MAAM;AAG9B,OAAK,UAAU,cAAc,MAAM;;CAGpC,IAAI,UAAU;AACb,MAAI,CAAC,KAAK,gBACT,MAAK,kBAAkB,eAAe;AAEvC,SAAO,KAAK;;CAGb,oBAAoB;AACnB,SAAO,kBAAkB,KAAK,QAAQ;;CAGvC,oBAAoB;EACnB,MAAM,EAAE,QAAQ,KAAK;EACrB,MAAM,SAAS,kBAAkB,KAAK,QAAQ;AAC9C,OAAK,QAAQ,MAAM;AACnB,SAAO;;CAGR,cAAc;AACb,SAAO,YAAY,KAAK,QAAQ;;CAGjC,gBAAgB;AACf,SAAO,cAAc,KAAK,QAAQ;;CAGnC,eAAe;AACd,SAAO,aAAa,KAAK,QAAQ;;CAGlC,aAAa,MAAmB;AAC/B,eAAa,KAAK,SAAS,KAAK;;CAGjC,eAAe,QAAgB;AAC9B,iBAAe,KAAK,SAAS,OAAO;;CAGrC,IAAI,SAAiB;AACpB,SAAO,OAAO,KAAK,QAAQ;;;;;;ACnD7B,SAAgB,oBACf,QAC8B;AAC9B,QACC,OAAO,WAAW,YAClB,WAAW,QACX,YAAY,WACV,OAAe,WAAW,g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C,UAAe,OAAO,GAAG,MAAM,MAAM,eAAe,GACnF;AACD,UAAQ,KAAK;AAEb,UAAQ,IAAI,aAAa,MAAM,KAAK,GAAG,KAAK,UAAU,GAAG;AACzD,UAAQ,IAAI,kBAAkB,KAAK,eAAe;EAElD,MAAM,aAAa,KAAK,eAAe,WACrC,KAAK,cAAc;AACnB,UAAO,UAAU,iBAAiB,UAAU,aAAa;IACxD,CACD,QAAQ,SAAS,KAAK,CACtB,QAAQ,SAAS,SAAS,SAAS;AAErC,MAAI,CAAC,WAAW,OACf;AAGD,UAAQ,KAAK;AACb,UAAQ,IAAI,gBAAgB;AAE5B,aAAW,SAAS,SAAS;AAC5B,WAAQ,IAAI,OAAO,OAAO;IACzB;AAEF,UAAQ,KAAK;AACb,UAAQ,IAAI,KAAK,MAAM,MAAM,SAAS,GAAG;AACzC,UAAQ,KAAK"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/index.d.ts deleted file mode 100644 index 39f26ab..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/dist/index.d.ts +++ /dev/null @@ -1,865 +0,0 @@ -import { CloseEvent } from "@hocuspocus/common"; -import { Mutex } from "async-mutex"; -import { Awareness } from "y-protocols/awareness"; -import { Doc } from "yjs"; -import { IncomingMessage as IncomingMessage$1, Server as Server$1, ServerResponse } from "node:http"; -import { AddressInfo } from "node:net"; -import { Decoder } from "lib0/decoding"; -import { Encoder } from "lib0/encoding"; - -//#region packages/server/src/Document.d.ts -declare class Document extends Doc { - awareness: Awareness; - callbacks: { - onUpdate: (document: Document, origin: unknown, update: Uint8Array) => void; - beforeBroadcastStateless: (document: Document, stateless: string) => void; - beforeHandleAwareness: (document: Document, states: Map>, transactionOrigin: unknown) => Promise; - }; - connections: Map; - }>; - directConnectionsCount: number; - name: string; - isLoading: boolean; - isDestroyed: boolean; - saveMutex: Mutex; - lastChangeTime: number; - /** - * Constructor. - */ - constructor(name: string, yDocOptions?: object); - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName: string): boolean; - /** - * Merge the given document(s) into this one - */ - merge(documents: Doc | Array): Document; - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate(callback: (document: Document, origin: unknown, update: Uint8Array) => void): Document; - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless(callback: (document: Document, stateless: string) => void): Document; - /** - * Set a callback that will be triggered before an inbound awareness update - * is applied to this document's awareness state. The callback receives the - * document, the decoded per-client states as a mutable `Map`, and the - * `TransactionOrigin` that will be forwarded to `applyAwarenessUpdate`. - * Use `isTransactionOrigin(origin)` to discriminate sources. Mutate the - * map in place (set/delete/field changes) to rewrite the update, or throw - * to reject it entirely. - */ - beforeHandleAwareness(callback: (document: Document, states: Map>, transactionOrigin: unknown) => Promise): Document; - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection: Connection): Document; - /** - * Is the given connection registered on this document - */ - hasConnection(connection: Connection): boolean; - /** - * Remove the given connection from this document - */ - removeConnection(connection: Connection): Document; - addDirectConnection(): Document; - removeDirectConnection(): Document; - /** - * Get the number of active connections for this document - */ - getConnectionsCount(): number; - /** - * Get an array of registered connections - */ - getConnections(): Array; - /** - * Get the client ids for the given connection instance - */ - getClients(connection: Connection): Set; - /** - * Has the document awareness states - */ - hasAwarenessStates(): boolean; - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection: Connection, update: Uint8Array): Document; - /** - * Handle an awareness update and sync changes to clients - * @private - */ - private handleAwarenessUpdate; - /** - * Handle an updated document and sync changes to clients - */ - private handleUpdate; - /** - * Broadcast stateless message to all connections - */ - broadcastStateless(payload: string, filter?: (conn: Connection) => boolean): void; - destroy(): void; -} -//#endregion -//#region packages/server/src/ClientConnection.d.ts -/** - * The `ClientConnection` class is responsible for handling an incoming WebSocket - * - * TODO-refactor: - * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts - */ -declare class ClientConnection { - private readonly websocket; - private readonly request; - private readonly documentProvider; - private readonly hooks; - private readonly opts; - private readonly defaultContext; - private readonly documentConnections; - private readonly incomingMessageQueue; - private readonly documentConnectionsEstablished; - private readonly hookPayloads; - private readonly callbacks; - private readonly socketId; - timeout: number; - pingInterval: NodeJS.Timeout; - lastMessageReceivedAt: number; - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it'll fully establish the connection and - * load the Document then. - */ - constructor(websocket: WebSocketLike, request: Request, documentProvider: { - createDocument: Hocuspocus["createDocument"]; - }, hooks: Hocuspocus["hooks"], opts: { - timeout: number; - }, defaultContext?: Context); - /** - * Handle WebSocket close event. Call this from your integration - * when the WebSocket connection closes. - */ - handleClose(event?: CloseEvent): void; - private close; - /** - * Close the connection if no messages have been received within the timeout period. - * This replaces application-level ping/pong to maintain backward compatibility - * with older provider versions that don't understand Ping/Pong message types. - * Awareness updates (~every 30s) keep active connections alive. - */ - private check; - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, payload: onDisconnectPayload) => void): ClientConnection; - /** - * Create a new connection by the given request and document - */ - private createConnection; - private setUpNewConnection; - private handleQueueingMessage; - /** - * Handle an incoming WebSocket message. Call this from your integration - * when the WebSocket receives a binary message. - */ - handleMessage: (data: Uint8Array) => void; -} -//#endregion -//#region packages/server/src/DirectConnection.d.ts -declare class DirectConnection$1 implements DirectConnection { - document: Document | null; - instance: Hocuspocus; - context: Context; - /** - * Constructor. - */ - constructor(document: Document, instance: Hocuspocus, context?: Context); - transact(transaction: (document: Document) => void): Promise; - disconnect(): Promise; -} -//#endregion -//#region packages/server/src/Server.d.ts -interface ServerConfiguration extends Configuration { - port?: number; - address?: string; - stopOnSignals?: boolean; - /** - * Options passed to the underlying WebSocket server (ws). - * Supports all ws ServerOptions, e.g. { maxPayload: 1024 * 1024 } - */ - websocketOptions?: Record; -} -declare const defaultServerConfiguration: { - port: number; - address: string; - stopOnSignals: boolean; -}; -declare class Server { - httpServer: Server$1; - private crossws; - hocuspocus: Hocuspocus; - configuration: ServerConfiguration; - constructor(configuration?: Partial>); - private setupHttpUpgrade; - requestHandler: (request: IncomingMessage$1, response: ServerResponse) => Promise; - listen(port?: number, callback?: any): Promise>; - get address(): AddressInfo; - destroy(): Promise; - get URL(): string; - get webSocketURL(): string; - get httpURL(): string; - private showStartScreen; -} -//#endregion -//#region packages/server/src/Hocuspocus.d.ts -declare const defaultConfiguration: { - name: null; - timeout: number; - debounce: number; - maxDebounce: number; - quiet: boolean; - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; - unloadImmediately: boolean; -}; -declare class Hocuspocus { - configuration: Configuration; - loadingDocuments: Map>; - unloadingDocuments: Map>; - documents: Map; - server?: Server; - debouncer: { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; - }; - constructor(configuration?: Partial>); - /** - * Configure Hocuspocus - */ - configure(configuration: Partial>): Hocuspocus; - /** - * Get the total number of active documents - */ - getDocumentsCount(): number; - /** - * Get the total number of active connections - */ - getConnectionsCount(): number; - /** - * Immediately execute all pending debounced onStoreDocument calls. - * Useful during shutdown to ensure documents are persisted and unloaded - * before the server exits, even when unloadImmediately is false. - */ - flushPendingStores(): void; - /** - * Force close one or more connections - */ - closeConnections(documentName?: string): void; - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it'll fully establish the connection and - * load the Document then. - */ - handleConnection(incoming: WebSocket | WebSocketLike, request: Request, defaultContext?: Context): ClientConnection; - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - private handleDocumentUpdate; - /** - * Create a new document by the given request - */ - createDocument(documentName: string, request: Request, socketId: string, connection: ConnectionConfiguration, context?: Context): Promise; - loadDocument(documentName: string, request: Request, socketId: string, connectionConfig: ConnectionConfiguration, context?: Context): Promise; - storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload, immediately?: boolean): Promise; - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - hooks(name: T, payload: HookPayloadByName[T], callback?: Function | null): Promise; - shouldUnloadDocument(document: Document): boolean; - unloadDocument(document: Document): Promise; - openDirectConnection(documentName: string, context?: Context): Promise>; -} -//#endregion -//#region packages/server/src/types.d.ts -interface ConnectionTransactionOrigin { - source: "connection"; - connection: Connection; -} -interface RedisTransactionOrigin { - source: "redis"; -} -interface LocalTransactionOrigin { - source: "local"; - skipStoreHooks?: boolean; - context?: any; -} -type TransactionOrigin = ConnectionTransactionOrigin | RedisTransactionOrigin | LocalTransactionOrigin; -declare function isTransactionOrigin(origin: unknown): origin is TransactionOrigin; -declare function shouldSkipStoreHooks(origin: unknown): boolean; -/** - * Minimal interface for any WebSocket-like object for WebSocket, Bun's ServerWebSocket, ws, Deno, etc. - */ -interface WebSocketLike { - send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void; - close(code?: number, reason?: string): void; - readyState: number; -} -declare enum MessageType { - Unknown = -1, - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - SyncReply = 4, - // same as Sync, but won't trigger another 'SyncStep1' - Stateless = 5, - BroadcastStateless = 6, - CLOSE = 7, - SyncStatus = 8, - Ping = 9, - Pong = 10 -} -interface AwarenessUpdate { - added: Array; - updated: Array; - removed: Array; -} -interface ConnectionConfiguration { - readOnly: boolean; - isAuthenticated: boolean; -} -interface Extension { - priority?: number; - extensionName?: string; - onConfigure?(data: onConfigurePayload): Promise; - onListen?(data: onListenPayload): Promise; - onUpgrade?(data: onUpgradePayload): Promise; - onConnect?(data: onConnectPayload): Promise; - connected?(data: connectedPayload): Promise; - onAuthenticate?(data: onAuthenticatePayload): Promise; - onTokenSync?(data: onTokenSyncPayload): Promise; - onCreateDocument?(data: onCreateDocumentPayload): Promise; - onLoadDocument?(data: onLoadDocumentPayload): Promise; - afterLoadDocument?(data: afterLoadDocumentPayload): Promise; - beforeHandleMessage?(data: beforeHandleMessagePayload): Promise; - /** - * Fired before an inbound awareness update is applied to the document's - * awareness state. The hook receives the decoded per-client `states` as a - * mutable `Map` keyed by Yjs clientId. Mutate the map and the contained - * state objects in place to rewrite fields, drop peers (`states.delete`), - * or add synthetic ones (`states.set`); mutations are reflected in the - * broadcast. Throw to reject the update without applying anything. - * - * Multiple extensions chain naturally: each extension sees the map as - * mutated by previous extensions and can mutate it further. - */ - beforeHandleAwareness?(data: beforeHandleAwarenessPayload): Promise; - beforeSync?(data: beforeSyncPayload): Promise; - beforeBroadcastStateless?(data: beforeBroadcastStatelessPayload): Promise; - onStateless?(payload: onStatelessPayload): Promise; - onChange?(data: onChangePayload): Promise; - onStoreDocument?(data: onStoreDocumentPayload): Promise; - afterStoreDocument?(data: afterStoreDocumentPayload): Promise; - onAwarenessUpdate?(data: onAwarenessUpdatePayload): Promise; - onRequest?(data: onRequestPayload): Promise; - onDisconnect?(data: onDisconnectPayload): Promise; - beforeUnloadDocument?(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument?(data: afterUnloadDocumentPayload): Promise; - onDestroy?(data: onDestroyPayload): Promise; -} -type HookName = "onConfigure" | "onListen" | "onUpgrade" | "onConnect" | "connected" | "onAuthenticate" | "onTokenSync" | "onCreateDocument" | "onLoadDocument" | "afterLoadDocument" | "beforeHandleMessage" | "beforeHandleAwareness" | "beforeBroadcastStateless" | "beforeSync" | "onStateless" | "onChange" | "onStoreDocument" | "afterStoreDocument" | "onAwarenessUpdate" | "onRequest" | "onDisconnect" | "beforeUnloadDocument" | "afterUnloadDocument" | "onDestroy"; -type HookPayloadByName = { - onConfigure: onConfigurePayload; - onListen: onListenPayload; - onUpgrade: onUpgradePayload; - onConnect: onConnectPayload; - connected: connectedPayload; - onAuthenticate: onAuthenticatePayload; - onTokenSync: onTokenSyncPayload; - onCreateDocument: onCreateDocumentPayload; - onLoadDocument: onLoadDocumentPayload; - afterLoadDocument: afterLoadDocumentPayload; - beforeHandleMessage: beforeHandleMessagePayload; - beforeHandleAwareness: beforeHandleAwarenessPayload; - beforeBroadcastStateless: beforeBroadcastStatelessPayload; - beforeSync: beforeSyncPayload; - onStateless: onStatelessPayload; - onChange: onChangePayload; - onStoreDocument: onStoreDocumentPayload; - afterStoreDocument: afterStoreDocumentPayload; - onAwarenessUpdate: onAwarenessUpdatePayload; - onRequest: onRequestPayload; - onDisconnect: onDisconnectPayload; - afterUnloadDocument: afterUnloadDocumentPayload; - beforeUnloadDocument: beforeUnloadDocumentPayload; - onDestroy: onDestroyPayload; -}; -interface Configuration extends Extension { - /** - * A name for the instance, used for logging. - */ - name: string | null; - /** - * A list of hocuspocus extensions. - */ - extensions: Array; - /** - * Defines in which interval the server sends a ping, and closes the connection when no pong is sent back. - */ - timeout: number; - /** - * Debounces the call of the `onStoreDocument` hook for the given amount of time in ms. - * Otherwise every single update would be persisted. - */ - debounce: number; - /** - * Makes sure to call `onStoreDocument` at least in the given amount of time (ms). - */ - maxDebounce: number; - /** - * By default, the servers show a start screen. If passed false, the server will start quietly. - */ - quiet: boolean; - /** - * If set to false, respects the debounce time of `onStoreDocument` before unloading a document. - * Otherwise, the document will be unloaded immediately. - * - * This prevents a client from DOSing the server by repeatedly connecting and disconnecting when - * your onStoreDocument is rate-limited. - */ - unloadImmediately: boolean; - /** - * options to pass to the ydoc document - */ - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; -} -interface onStatelessPayload { - connection: Connection; - documentName: string; - document: Document; - payload: string; -} -interface onAuthenticatePayload { - context: Context; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - request: Request; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; - providerVersion: string | null; -} -interface onTokenSyncPayload { - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} -interface onCreateDocumentPayload { - context: Context; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -interface onConnectPayload { - context: Context; - documentName: string; - instance: Hocuspocus; - request: Request; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - providerVersion: string | null; -} -interface connectedPayload { - context: Context; - documentName: string; - instance: Hocuspocus; - request: Request; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; - providerVersion: string | null; -} -interface onLoadDocumentPayload { - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -interface afterLoadDocumentPayload { - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -interface onChangePayload { - clientsCount: number; - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - transactionOrigin: unknown; - connection?: Connection; -} -interface beforeHandleMessagePayload { - clientsCount: number; - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - connection: Connection; -} -interface beforeHandleAwarenessPayload { - awareness: Awareness; - clientsCount: number; - /** - * Connection context populated by `onAuthenticate`. `undefined` when the - * update did not originate from a client connection (e.g. server-internal - * writes via `DirectConnection`). - */ - context: Context | undefined; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - /** - * Per-client awareness states decoded from the inbound update, keyed by - * Yjs clientId. Mutate this map in place to rewrite the update: change - * fields on a state object, `states.delete(clientId)` to drop a peer, or - * `states.set(clientId, ...)` to add or replace one. The encoded update - * sent to peers reflects whatever the map looks like after every hook in - * the chain has run. - */ - states: Map>; - socketId: string; - /** - * The `TransactionOrigin` that will be passed to `applyAwarenessUpdate`. - * Use `isTransactionOrigin(origin)` to discriminate sources. Matches the - * `transactionOrigin` shape of `onAwarenessUpdatePayload`. - */ - transactionOrigin: unknown; - /** - * Convenience shortcut: `origin.connection` when `transactionOrigin` is a - * `ConnectionTransactionOrigin`, otherwise `undefined`. Matches the - * `connection?` shape of `onAwarenessUpdatePayload`. - */ - connection?: Connection; -} -interface beforeSyncPayload { - clientsCount: number; - context: Context; - document: Document; - documentName: string; - connection: Connection; - /** - * The y-protocols/sync message type - * @example - * 0: SyncStep1 - * 1: SyncStep2 - * 2: YjsUpdate - * - * @see https://github.com/yjs/y-protocols/blob/master/sync.js#L13-L40 - */ - type: number; - /** - * The payload of the y-sync message. - */ - payload: Uint8Array; -} -interface beforeBroadcastStatelessPayload { - document: Document; - documentName: string; - payload: string; -} -interface onStoreDocumentPayload { - clientsCount: number; - document: Document; - lastContext: Context; - lastTransactionOrigin: unknown; - documentName: string; - instance: Hocuspocus; -} -interface afterStoreDocumentPayload extends onStoreDocumentPayload {} -interface onAwarenessUpdatePayload { - document: Document; - documentName: string; - instance: Hocuspocus; - transactionOrigin: unknown; - connection?: Connection; - added: number[]; - updated: number[]; - removed: number[]; - awareness: Awareness; - states: StatesArray; -} -type StatesArray = { - clientId: number; - [key: string | number]: any; -}[]; -interface fetchPayload { - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -interface storePayload extends onStoreDocumentPayload { - state: Buffer; -} -interface onDisconnectPayload { - clientsCount: number; - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; -} -interface onRequestPayload { - request: IncomingMessage$1; - response: ServerResponse; - instance: Hocuspocus; -} -interface onUpgradePayload { - request: IncomingMessage$1; - socket: any; - head: any; - instance: Hocuspocus; -} -interface onListenPayload { - instance: Hocuspocus; - configuration: Configuration; - port: number; -} -interface onDestroyPayload { - instance: Hocuspocus; -} -interface onConfigurePayload { - instance: Hocuspocus; - configuration: Configuration; - version: string; -} -interface afterUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; -} -interface beforeUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; - document: Document; -} -interface DirectConnection { - transact(transaction: (document: Document) => void): Promise; - disconnect(): void; -} -//#endregion -//#region packages/server/src/Connection.d.ts -declare class Connection { - webSocket: WebSocketLike; - context: Context; - document: Document; - request: Request; - callbacks: { - onClose: ((document: Document, event?: CloseEvent) => void)[]; - beforeHandleMessage: (connection: Connection, update: Uint8Array) => Promise; - beforeSync: (connection: Connection, payload: Pick) => Promise; - statelessCallback: (payload: onStatelessPayload) => Promise; - onTokenSyncCallback: (payload: { - token: string; - }) => Promise; - }; - socketId: string; - readOnly: boolean; - sessionId: string | null; - providerVersion: string | null; - /** - * The address string prefixed to outgoing messages. - * Session-aware clients get `documentName\0sessionId`; legacy clients get plain `documentName`. - */ - get messageAddress(): string; - private messageQueue; - private processingPromise; - /** - * Constructor. - */ - constructor(connection: WebSocketLike, request: Request, document: Document, socketId: string, context: Context, readOnly?: boolean, sessionId?: string | null, providerVersion?: string | null); - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, event?: CloseEvent) => void): Connection; - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback(callback: (payload: onStatelessPayload) => Promise): Connection; - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage(callback: (connection: Connection, update: Uint8Array) => Promise): Connection; - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync(callback: (connection: Connection, payload: Pick) => Promise): Connection; - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback(callback: (payload: { - token: string; - }) => Promise): Connection; - /** - * Returns a promise that resolves when all queued messages have been processed. - */ - waitForPendingMessages(): Promise; - /** - * Send the given message - */ - send(message: Uint8Array): void; - /** - * Send a stateless message with payload - */ - sendStateless(payload: string): void; - /** - * Request current token from the client - */ - requestToken(): void; - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event?: CloseEvent): void; - /** - * Send the current document awareness to the client, if any - * @private - */ - private sendCurrentAwareness; - /** - * Handle an incoming message - * @public - */ - handleMessage(data: Uint8Array): void; - private processMessages; -} -//#endregion -//#region packages/server/src/IncomingMessage.d.ts -declare class IncomingMessage { - /** - * Access to the received message. - */ - decoder: Decoder; - /** - * Private encoder; can be undefined. - * - * Lazy creation of the encoder speeds up IncomingMessages that need only a decoder. - */ - private encoderInternal?; - constructor(input: any); - get encoder(): Encoder; - readVarUint8Array(): Uint8Array; - peekVarUint8Array(): Uint8Array; - readVarUint(): number; - readVarString(): string; - toUint8Array(): Uint8Array; - writeVarUint(type: MessageType): void; - writeVarString(string: string): void; - get length(): number; -} -//#endregion -//#region packages/server/src/MessageReceiver.d.ts -declare class MessageReceiver { - message: IncomingMessage; - defaultTransactionOrigin?: TransactionOrigin; - constructor(message: IncomingMessage, defaultTransactionOrigin?: TransactionOrigin); - apply(document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): Promise; - readSyncMessage(message: IncomingMessage, document: Document, connection?: Connection, reply?: (message: Uint8Array) => void, requestFirstSync?: boolean): Promise<0 | 1 | 2>; - applyQueryAwarenessMessage(document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): void; -} -//#endregion -//#region packages/server/src/OutgoingMessage.d.ts -declare class OutgoingMessage { - encoder: Encoder; - type?: number; - category?: string; - constructor(documentName: string); - createSyncMessage(): OutgoingMessage; - createSyncReplyMessage(): OutgoingMessage; - createAwarenessUpdateMessage(awareness: Awareness, changedClients?: Array): OutgoingMessage; - writeQueryAwareness(): OutgoingMessage; - writeTokenSyncRequest(): OutgoingMessage; - writeAuthenticated(readonly: boolean): OutgoingMessage; - writePermissionDenied(reason: string): OutgoingMessage; - writeFirstSyncStepFor(document: Document): OutgoingMessage; - writeUpdate(update: Uint8Array): OutgoingMessage; - writeStateless(payload: string): OutgoingMessage; - writeBroadcastStateless(payload: string): OutgoingMessage; - writeSyncStatus(updateSaved: boolean): OutgoingMessage; - writeCloseMessage(reason: string): OutgoingMessage; - toUint8Array(): Uint8Array; -} -//#endregion -//#region packages/server/src/util/debounce.d.ts -declare const useDebounce: () => { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; -}; -//#endregion -export { AwarenessUpdate, Configuration, Connection, ConnectionConfiguration, ConnectionTransactionOrigin, DirectConnection, Document, Extension, Hocuspocus, HookName, HookPayloadByName, IncomingMessage, LocalTransactionOrigin, MessageReceiver, MessageType, OutgoingMessage, RedisTransactionOrigin, Server, ServerConfiguration, StatesArray, TransactionOrigin, WebSocketLike, afterLoadDocumentPayload, afterStoreDocumentPayload, afterUnloadDocumentPayload, beforeBroadcastStatelessPayload, beforeHandleAwarenessPayload, beforeHandleMessagePayload, beforeSyncPayload, beforeUnloadDocumentPayload, connectedPayload, defaultConfiguration, defaultServerConfiguration, fetchPayload, isTransactionOrigin, onAuthenticatePayload, onAwarenessUpdatePayload, onChangePayload, onConfigurePayload, onConnectPayload, onCreateDocumentPayload, onDestroyPayload, onDisconnectPayload, onListenPayload, onLoadDocumentPayload, onRequestPayload, onStatelessPayload, onStoreDocumentPayload, onTokenSyncPayload, onUpgradePayload, shouldSkipStoreHooks, storePayload, useDebounce }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0ecdsa-generate-keypair b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0ecdsa-generate-keypair deleted file mode 100755 index aa26e53..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0ecdsa-generate-keypair +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0gentesthtml b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0gentesthtml deleted file mode 100755 index 32e77b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0gentesthtml +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0serve b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0serve deleted file mode 100755 index 8a07fe1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/node_modules/.bin/0serve +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0serve.js" "$@" -else - exec node "$basedir/../../../../../../lib0@0.2.117/node_modules/lib0/bin/0serve.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/package.json b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/package.json deleted file mode 100644 index 5332824..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "@hocuspocus/server", - "description": "plug & play collaboration backend", - "version": "4.1.0", - "homepage": "https://hocuspocus.dev", - "keywords": [ - "hocuspocus", - "yjs", - "yjs-websocket", - "prosemirror" - ], - "license": "MIT", - "type": "module", - "main": "dist/hocuspocus-server.cjs", - "module": "dist/hocuspocus-server.esm.js", - "types": "dist/index.d.ts", - "exports": { - "source": { - "import": "./src/index.ts" - }, - "default": { - "import": "./dist/hocuspocus-server.esm.js", - "require": "./dist/hocuspocus-server.cjs", - "types": "./dist/index.d.ts" - } - }, - "files": [ - "src", - "dist" - ], - "dependencies": { - "@hocuspocus/common": "^4.1.0", - "async-mutex": "^0.5.0", - "crossws": "^0.4.4", - "kleur": "^4.1.4", - "lib0": "^0.2.47" - }, - "peerDependencies": { - "y-protocols": "^1.0.6", - "yjs": "^13.6.8" - }, - "gitHead": "702ec724b099264467c7fafa854a3988c7314ff9", - "repository": { - "url": "https://github.com/ueberdosis/hocuspocus" - }, - "engines": { - "node": ">=22" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/ClientConnection.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/ClientConnection.ts deleted file mode 100644 index 9f2e1a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/ClientConnection.ts +++ /dev/null @@ -1,458 +0,0 @@ -import crypto from "node:crypto"; -import { - type CloseEvent, - ConnectionTimeout, - Forbidden, - ResetConnection, - Unauthorized, - WsReadyStates, -} from "@hocuspocus/common"; -import * as decoding from "lib0/decoding"; -import Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import { IncomingMessage as SocketIncomingMessage } from "./IncomingMessage.ts"; -import { OutgoingMessage } from "./OutgoingMessage.ts"; -import type { - ConnectionConfiguration, - WebSocketLike, - beforeHandleMessagePayload, - beforeSyncPayload, - onDisconnectPayload, -} from "./types.ts"; -import { MessageType } from "./types.ts"; -import { getParameters } from "./util/getParameters.ts"; - -/** - * The `ClientConnection` class is responsible for handling an incoming WebSocket - * - * TODO-refactor: - * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts - */ -export class ClientConnection { - // Map of established document connections, keyed by rawKey (composite or plain) - private readonly documentConnections: Record> = - {}; - - // While the connection will be establishing messages will - // be queued and handled later. - private readonly incomingMessageQueue: Record = {}; - - // While the connection is establishing, keep track of which documents have received auth - private readonly documentConnectionsEstablished = new Set(); - - // Hook payloads keyed by rawKey (composite or plain) - private readonly hookPayloads: Record< - string, - { - instance: Hocuspocus; - request: Request; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - context: Context; - providerVersion: string | null; - } - > = {}; - - private readonly callbacks = { - onClose: [(document: Document, payload: onDisconnectPayload) => {}], - }; - - // Every new connection gets a unique identifier. - private readonly socketId = crypto.randomUUID(); - - timeout: number; - - pingInterval: NodeJS.Timeout; - - lastMessageReceivedAt = Date.now(); - - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it'll fully establish the connection and - * load the Document then. - */ - constructor( - private readonly websocket: WebSocketLike, - private readonly request: Request, - private readonly documentProvider: { - createDocument: Hocuspocus["createDocument"]; - }, - // TODO: change to events - private readonly hooks: Hocuspocus["hooks"], - private readonly opts: { - timeout: number; - }, - private readonly defaultContext: Context = {} as Context, - ) { - this.timeout = opts.timeout; - this.pingInterval = setInterval(this.check, this.timeout); - } - - /** - * Handle WebSocket close event. Call this from your integration - * when the WebSocket connection closes. - */ - handleClose(event?: CloseEvent) { - this.close(event); - clearInterval(this.pingInterval); - } - - private close(event?: CloseEvent) { - Object.values(this.documentConnections).forEach((connection) => - connection.close(event), - ); - } - - /** - * Close the connection if no messages have been received within the timeout period. - * This replaces application-level ping/pong to maintain backward compatibility - * with older provider versions that don't understand Ping/Pong message types. - * Awareness updates (~every 30s) keep active connections alive. - */ - private check = () => { - if (Date.now() - this.lastMessageReceivedAt > this.timeout) { - this.close(ConnectionTimeout); - } - }; - - /** - * Set a callback that will be triggered when the connection is closed - */ - public onClose( - callback: (document: Document, payload: onDisconnectPayload) => void, - ): ClientConnection { - this.callbacks.onClose.push(callback); - - return this; - } - - /** - * Create a new connection by the given request and document - */ - private createConnection( - connection: WebSocketLike, - document: Document, - hookPayload: (typeof this.hookPayloads)[string], - sessionId: string | null, - providerVersion: string | null, - ): Connection { - const instance = new Connection( - connection, - hookPayload.request, - document, - hookPayload.socketId, - hookPayload.context, - hookPayload.connectionConfig.readOnly, - sessionId, - providerVersion, - ); - - instance.onClose(async (document, event) => { - // Wait for any pending message processing to complete before running - // disconnect hooks. This ensures that document updates from queued messages - // are applied (and their debounced onStoreDocument scheduled) before the - // disconnect handler checks whether to call executeNow. - await instance.waitForPendingMessages(); - - const disconnectHookPayload: onDisconnectPayload = { - instance: this.documentProvider as Hocuspocus, // TODO, this will be removed when we use events instead of hooks for this class - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request), - }; - - await this.hooks("onDisconnect", disconnectHookPayload); - this.callbacks.onClose.forEach((callback) => - callback(document, disconnectHookPayload), - ); - }); - - instance.onStatelessCallback(async (payload) => { - try { - return await this.hooks("onStateless", payload); - } catch (error: any) { - if (error?.message) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if an error is present - // just rethrow it - throw error; - } - } - }); - - instance.beforeHandleMessage((connection, update) => { - const beforeHandleMessagePayload: beforeHandleMessagePayload = { - instance: this.documentProvider as Hocuspocus, // TODO, this will be removed when we use events instead of hooks for this class - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - socketId: hookPayload.socketId, - connection, - documentName: document.name, - requestHeaders: hookPayload.request.headers, - requestParameters: getParameters(hookPayload.request), - update, - }; - - return this.hooks("beforeHandleMessage", beforeHandleMessagePayload); - }); - - instance.beforeSync((connection, payload) => { - const beforeSyncPayload: beforeSyncPayload = { - clientsCount: document.getConnectionsCount(), - context: hookPayload.context, - document, - documentName: document.name, - connection, - type: payload.type, - payload: payload.payload, - }; - - return this.hooks("beforeSync", beforeSyncPayload); - }); - - return instance; - } - - // Once all hooks are run, we'll fully establish the connection: - private setUpNewConnection = async (rawKey: string, documentName: string, sessionId: string | null) => { - const hookPayload = this.hookPayloads[rawKey]; - // If no hook interrupts, create a document and connection - const document = await this.documentProvider.createDocument( - documentName, - hookPayload.request, - hookPayload.socketId, - hookPayload.connectionConfig, - hookPayload.context, - ); - const connection = this.createConnection(this.websocket, document, hookPayload, sessionId, hookPayload.providerVersion); - - connection.onClose((document, event) => { - delete this.hookPayloads[rawKey]; - delete this.documentConnections[rawKey]; - delete this.incomingMessageQueue[rawKey]; - this.documentConnectionsEstablished.delete(rawKey); - }); - - connection.onTokenSyncCallback(async (payload) => { - try { - return await this.hooks( - "onTokenSync", - { - ...hookPayload, - ...payload, - document, - connection, - documentName, - }, - (contextAdditions: Partial) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }, - ); - } catch (err: any) { - console.error(err); - const error = { ...Unauthorized, ...err }; - connection.close({ code: error.code, reason: error.reason }); - } - }); - - this.documentConnections[rawKey] = connection; - - // If the WebSocket has already disconnected (wow, that was fast) – then - // immediately call close to cleanup the connection and document in memory. - if ( - this.websocket.readyState === WsReadyStates.Closing || - this.websocket.readyState === WsReadyStates.Closed - ) { - this.close(); - return; - } - - // Drain queued messages to the Connection. - this.incomingMessageQueue[rawKey]?.forEach((input) => { - connection.handleMessage(input); - }); - - await this.hooks("connected", { - ...hookPayload, - documentName, - context: hookPayload.context, - connection, - }); - }; - - // This listener handles authentication messages and queues everything else. - private handleQueueingMessage = async (data: Uint8Array, rawKey: string, documentName: string) => { - try { - const tmpMsg = new SocketIncomingMessage(data); - - decoding.readVarString(tmpMsg.decoder); // skip the message address (already extracted) - const type = decoding.readVarUint(tmpMsg.decoder); - - if ( - !( - type === MessageType.Auth && - !this.documentConnectionsEstablished.has(rawKey) - ) - ) { - this.incomingMessageQueue[rawKey].push(data); - return; - } - - // Okay, we've got the authentication message we're waiting for: - this.documentConnectionsEstablished.add(rawKey); - - // The 2nd integer contains the submessage type - // which will always be authentication when sent from client -> server - decoding.readVarUint(tmpMsg.decoder); - const token = decoding.readVarString(tmpMsg.decoder); - - // Try to read providerVersion (new protocol field) - let providerVersion: string | null = null; - if (decoding.hasContent(tmpMsg.decoder)) { - providerVersion = decoding.readVarString(tmpMsg.decoder); - } - - // Extract sessionId from the rawKey (documentName\0sessionId) if present - const sepIdx = rawKey.indexOf('\0'); - const sessionId = sepIdx === -1 ? null : rawKey.substring(sepIdx + 1); - - // Response uses rawKey so session-aware clients can route correctly - const responseAddress = rawKey; - - try { - const hookPayload = this.hookPayloads[rawKey]; - hookPayload.providerVersion = providerVersion; - - await this.hooks( - "onConnect", - { ...hookPayload, documentName }, - (contextAdditions: Partial) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }, - ); - - await this.hooks( - "onAuthenticate", - { - token, - ...hookPayload, - documentName, - }, - (contextAdditions: Partial) => { - hookPayload.context = { - ...hookPayload.context, - ...contextAdditions, - }; - }, - ); - // All `onAuthenticate` hooks passed. - hookPayload.connectionConfig.isAuthenticated = true; - - // Let the client know that authentication was successful. - const message = new OutgoingMessage(responseAddress).writeAuthenticated( - hookPayload.connectionConfig.readOnly, - ); - - this.websocket.send(message.toUint8Array()); - - // Time to actually establish the connection. - await this.setUpNewConnection(rawKey, documentName, sessionId); - } catch (err: any) { - const error = err || Forbidden; - const message = new OutgoingMessage(responseAddress).writePermissionDenied( - error.reason ?? "permission-denied", - ); - - this.websocket.send(message.toUint8Array()); - - // Clean up all state for this document so a retry is treated - // as a fresh first connection attempt. - this.documentConnectionsEstablished.delete(rawKey); - delete this.hookPayloads[rawKey]; - delete this.incomingMessageQueue[rawKey]; - } - - // Catch errors due to failed decoding of data - } catch (error) { - console.error(error); - this.websocket.close(ResetConnection.code, ResetConnection.reason); - } - }; - - /** - * Handle an incoming WebSocket message. Call this from your integration - * when the WebSocket receives a binary message. - */ - handleMessage = (data: Uint8Array) => { - this.lastMessageReceivedAt = Date.now(); - - try { - const tmpMsg = new SocketIncomingMessage(data); - - const rawKey = decoding.readVarString(tmpMsg.decoder); - - // Extract the plain documentName (the raw key may be documentName\0sessionId) - const sepIdx = rawKey.indexOf('\0'); - const documentName = sepIdx === -1 ? rawKey : rawKey.substring(0, sepIdx); - - // Look up by rawKey first (session-aware providers), then fall back - // to plain documentName for backward compatibility with old providers - const connection = this.documentConnections[rawKey] - ?? this.documentConnections[documentName]; - if (connection) { - connection.handleMessage(data); - return; - } - - const isFirst = this.incomingMessageQueue[rawKey] === undefined; - if (isFirst) { - this.incomingMessageQueue[rawKey] = []; - if (this.hookPayloads[rawKey]) { - throw new Error("first message, but hookPayloads exists"); - } - - this.hookPayloads[rawKey] = { - instance: this.documentProvider as Hocuspocus, - request: this.request, - connectionConfig: { - readOnly: false, - isAuthenticated: false, - }, - requestHeaders: this.request.headers, - requestParameters: getParameters(this.request), - socketId: this.socketId, - context: { - ...this.defaultContext, - }, - providerVersion: null as string | null, - }; - } - - this.handleQueueingMessage(data, rawKey, documentName); - } catch (closeError) { - // catch is needed in case an invalid payload crashes the parsing of the Uint8Array - console.error(closeError); - this.websocket.close(Unauthorized.code, Unauthorized.reason); - } - }; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Connection.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Connection.ts deleted file mode 100644 index f85d1ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Connection.ts +++ /dev/null @@ -1,279 +0,0 @@ -import { - type CloseEvent, - ResetConnection, - WsReadyStates, -} from "@hocuspocus/common"; -import type Document from "./Document.ts"; -import { IncomingMessage } from "./IncomingMessage.ts"; -import { MessageReceiver } from "./MessageReceiver.ts"; -import { OutgoingMessage } from "./OutgoingMessage.ts"; -import type { - WebSocketLike, - beforeSyncPayload, - onStatelessPayload, -} from "./types.ts"; - -export class Connection { - webSocket: WebSocketLike; - - context: Context; - - document: Document; - - request: Request; - - callbacks = { - onClose: [(document: Document, event?: CloseEvent) => {}], - beforeHandleMessage: (connection: Connection, update: Uint8Array) => - Promise.resolve(), - beforeSync: ( - connection: Connection, - payload: Pick, - ) => Promise.resolve(), - statelessCallback: (payload: onStatelessPayload) => Promise.resolve(), - onTokenSyncCallback: (payload: { token: string }) => Promise.resolve(), - }; - - socketId: string; - - readOnly: boolean; - - sessionId: string | null; - - providerVersion: string | null; - - /** - * The address string prefixed to outgoing messages. - * Session-aware clients get `documentName\0sessionId`; legacy clients get plain `documentName`. - */ - get messageAddress(): string { - return this.sessionId - ? `${this.document.name}\0${this.sessionId}` - : this.document.name; - } - - private messageQueue: Uint8Array[] = []; - - private processingPromise: Promise = Promise.resolve(); - - /** - * Constructor. - */ - constructor( - connection: WebSocketLike, - request: Request, - document: Document, - socketId: string, - context: Context, - readOnly = false, - sessionId?: string | null, - providerVersion?: string | null, - ) { - this.webSocket = connection; - this.context = context; - this.document = document; - this.request = request; - this.socketId = socketId; - this.readOnly = readOnly; - this.sessionId = sessionId ?? null; - this.providerVersion = providerVersion ?? null; - - this.document.addConnection(this); - - this.sendCurrentAwareness(); - } - - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose( - callback: (document: Document, event?: CloseEvent) => void, - ): Connection { - this.callbacks.onClose.push(callback); - - return this; - } - - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback( - callback: (payload: onStatelessPayload) => Promise, - ): Connection { - this.callbacks.statelessCallback = callback; - - return this; - } - - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage( - callback: (connection: Connection, update: Uint8Array) => Promise, - ): Connection { - this.callbacks.beforeHandleMessage = callback; - - return this; - } - - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync( - callback: ( - connection: Connection, - payload: Pick, - ) => Promise, - ): Connection { - this.callbacks.beforeSync = callback; - - return this; - } - - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback( - callback: (payload: { token: string }) => Promise, - ): Connection { - this.callbacks.onTokenSyncCallback = callback; - - return this; - } - - /** - * Returns a promise that resolves when all queued messages have been processed. - */ - waitForPendingMessages(): Promise { - return this.processingPromise; - } - - /** - * Send the given message - */ - send(message: Uint8Array): void { - if ( - this.webSocket.readyState === WsReadyStates.Closing || - this.webSocket.readyState === WsReadyStates.Closed - ) { - this.close(); - return; - } - - try { - this.webSocket.send(message); - } catch (exception) { - this.close(); - } - } - - /** - * Send a stateless message with payload - */ - public sendStateless(payload: string): void { - const message = new OutgoingMessage(this.messageAddress).writeStateless( - payload, - ); - - this.send(message.toUint8Array()); - } - - /** - * Request current token from the client - */ - public requestToken(): void { - const message = new OutgoingMessage( - this.messageAddress, - ).writeTokenSyncRequest(); - - this.send(message.toUint8Array()); - } - - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event?: CloseEvent): void { - if (this.document.hasConnection(this)) { - this.document.removeConnection(this); - this.callbacks.onClose.forEach( - (callback: (arg0: Document, arg1?: CloseEvent) => any) => - callback(this.document, event), - ); - - const closeMessage = new OutgoingMessage(this.messageAddress); - closeMessage.writeCloseMessage( - event?.reason ?? "Server closed the connection", - ); - this.send(closeMessage.toUint8Array()); - } - } - - /** - * Send the current document awareness to the client, if any - * @private - */ - private sendCurrentAwareness(): void { - if (!this.document.hasAwarenessStates()) { - return; - } - - const awarenessMessage = new OutgoingMessage( - this.messageAddress, - ).createAwarenessUpdateMessage(this.document.awareness); - - this.send(awarenessMessage.toUint8Array()); - } - - /** - * Handle an incoming message - * @public - */ - public handleMessage(data: Uint8Array): void { - this.messageQueue.push(data); - - if (this.messageQueue.length === 1) { - this.processingPromise = this.processMessages(); - } - } - - private async processMessages() { - while (this.messageQueue.length > 0) { - const rawUpdate = this.messageQueue.at(0) as Uint8Array; - - const message = new IncomingMessage(rawUpdate); - const rawKey = message.readVarString(); - - // Accept messages addressed with either the plain documentName or documentName\0sessionId - const sepIdx = rawKey.indexOf('\0'); - const documentName = sepIdx === -1 ? rawKey : rawKey.substring(0, sepIdx); - if (documentName !== this.document.name) { - this.messageQueue.shift(); - continue; - } - - // Write the correct address so replies reach the right provider - message.writeVarString(this.messageAddress); - - try { - await this.callbacks.beforeHandleMessage(this, rawUpdate); - const receiver = new MessageReceiver(message); - - await receiver.apply(this.document, this); - // biome-ignore lint/suspicious/noExplicitAny: - } catch (e: any) { - console.error( - `closing connection ${this.socketId} (while handling ${documentName}) because of exception`, - e, - ); - this.close({ - code: "code" in e && typeof e.code === 'number' ? e.code : ResetConnection.code, - reason: "reason" in e ? e.reason : ResetConnection.reason, - }); - } - - this.messageQueue.shift(); - } - } -} - -export default Connection; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/DirectConnection.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/DirectConnection.ts deleted file mode 100644 index a97cdd4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/DirectConnection.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { URLSearchParams } from "node:url"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { - DirectConnection as DirectConnectionInterface, - LocalTransactionOrigin, -} from "./types.ts"; - -export class DirectConnection - implements DirectConnectionInterface -{ - document: Document | null = null; - - instance!: Hocuspocus; - - context: Context; - - /** - * Constructor. - */ - constructor(document: Document, instance: Hocuspocus, context?: Context) { - this.document = document; - this.instance = instance; - this.context = (context ?? {}) as Context; - - this.document.addDirectConnection(); - } - - async transact(transaction: (document: Document) => void) { - if (!this.document) { - throw new Error("direct connection closed"); - } - - this.document.transact( - (x) => { - // biome-ignore lint/style/noNonNullAssertion: - transaction(this.document!); - }, - { - source: "local", - context: this.context, - } satisfies LocalTransactionOrigin, - ); - } - - async disconnect() { - if (this.document) { - this.document?.removeDirectConnection(); - - await this.instance.storeDocumentHooks( - this.document, - { - clientsCount: this.document.getConnectionsCount(), - lastContext: this.context, - lastTransactionOrigin: { - source: "local", - context: this.context, - } satisfies LocalTransactionOrigin, - document: this.document, - documentName: this.document.name, - instance: this.instance, - }, - true, - ); - - // If the direct connection was the only connection to the document - // then we should trigger the onDisconnect hook for - // this doc and unload the document - if ( - this.document.getConnectionsCount() === 0 && - !this.document.saveMutex.isLocked() - ) { - await this.instance.hooks("onDisconnect", { - instance: this.instance, - clientsCount: this.document.getConnectionsCount(), - context: this.context, - document: this.document, - socketId: "server", - documentName: this.document.name, - requestHeaders: new Headers(), - requestParameters: new URLSearchParams(), - }); - - await this.instance.unloadDocument(this.document); - } - - this.document = null; - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Document.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Document.ts deleted file mode 100644 index 9aa9c3f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Document.ts +++ /dev/null @@ -1,298 +0,0 @@ -import { Mutex } from "async-mutex"; -import { - Awareness, - applyAwarenessUpdate, - removeAwarenessStates, -} from "y-protocols/awareness"; -import { Doc, applyUpdate, encodeStateAsUpdate } from "yjs"; -import type Connection from "./Connection.ts"; -import { OutgoingMessage } from "./OutgoingMessage.ts"; -import { isTransactionOrigin } from "./types.ts"; -import type { - AwarenessUpdate, - ConnectionTransactionOrigin, - TransactionOrigin, -} from "./types.ts"; - -export class Document extends Doc { - awareness: Awareness; - - callbacks = { - // eslint-disable-next-line @typescript-eslint/no-empty-function - onUpdate: (document: Document, origin: unknown, update: Uint8Array) => {}, - beforeBroadcastStateless: (document: Document, stateless: string) => {}, - beforeHandleAwareness: ( - document: Document, - states: Map>, - transactionOrigin: unknown, - ) => Promise.resolve(), - }; - - connections: Map< - Connection, - { - clients: Set; - } - > = new Map(); - - // The number of direct (non-websocket) connections to this document - directConnectionsCount = 0; - - name: string; - - isLoading: boolean; - - isDestroyed = false; - - saveMutex = new Mutex(); - - lastChangeTime = 0; - - /** - * Constructor. - */ - constructor(name: string, yDocOptions?: object) { - super(yDocOptions); - - this.name = name; - - this.awareness = new Awareness(this); - this.awareness.setLocalState(null); - - this.awareness.on("update", this.handleAwarenessUpdate.bind(this)); - this.on("update", this.handleUpdate.bind(this)); - - this.isLoading = true; - } - - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName: string): boolean { - return !this.get(fieldName)._start && !this.get(fieldName)._map.size; - } - - /** - * Merge the given document(s) into this one - */ - merge(documents: Doc | Array): Document { - (Array.isArray(documents) ? documents : [documents]).forEach((document) => { - applyUpdate(this, encodeStateAsUpdate(document)); - }); - - return this; - } - - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate( - callback: (document: Document, origin: unknown, update: Uint8Array) => void, - ): Document { - this.callbacks.onUpdate = callback; - - return this; - } - - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless( - callback: (document: Document, stateless: string) => void, - ): Document { - this.callbacks.beforeBroadcastStateless = callback; - - return this; - } - - /** - * Set a callback that will be triggered before an inbound awareness update - * is applied to this document's awareness state. The callback receives the - * document, the decoded per-client states as a mutable `Map`, and the - * `TransactionOrigin` that will be forwarded to `applyAwarenessUpdate`. - * Use `isTransactionOrigin(origin)` to discriminate sources. Mutate the - * map in place (set/delete/field changes) to rewrite the update, or throw - * to reject it entirely. - */ - beforeHandleAwareness( - callback: ( - document: Document, - states: Map>, - transactionOrigin: unknown, - ) => Promise, - ): Document { - this.callbacks.beforeHandleAwareness = callback; - - return this; - } - - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection: Connection): Document { - this.connections.set(connection, { - clients: new Set(), - }); - - return this; - } - - /** - * Is the given connection registered on this document - */ - hasConnection(connection: Connection): boolean { - return this.connections.has(connection); - } - - /** - * Remove the given connection from this document - */ - removeConnection(connection: Connection): Document { - const entry = this.connections.get(connection); - if (entry) { - removeAwarenessStates( - this.awareness, - Array.from(entry.clients), - null, - ); - } - - this.connections.delete(connection); - - return this; - } - - addDirectConnection(): Document { - this.directConnectionsCount += 1; - - return this; - } - - removeDirectConnection(): Document { - if (this.directConnectionsCount > 0) { - this.directConnectionsCount -= 1; - } - - return this; - } - - /** - * Get the number of active connections for this document - */ - getConnectionsCount(): number { - return this.connections.size + this.directConnectionsCount; - } - - /** - * Get an array of registered connections - */ - getConnections(): Array { - return Array.from(this.connections.keys()); - } - - /** - * Get the client ids for the given connection instance - */ - getClients(connection: Connection): Set { - const entry = this.connections.get(connection); - - return entry?.clients === undefined ? new Set() : entry.clients; - } - - /** - * Has the document awareness states - */ - hasAwarenessStates(): boolean { - return this.awareness.getStates().size > 0; - } - - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection: Connection, update: Uint8Array): Document { - applyAwarenessUpdate(this.awareness, update, { - source: "connection", - connection, - } satisfies ConnectionTransactionOrigin); - - return this; - } - - /** - * Handle an awareness update and sync changes to clients - * @private - */ - private handleAwarenessUpdate( - { added, updated, removed }: AwarenessUpdate, - origin: TransactionOrigin | null, - ): Document { - const changedClients = added.concat(updated, removed); - - const originConnection: Connection | null = - isTransactionOrigin(origin) && origin.source === "connection" - ? origin.connection - : null; - - if (originConnection !== null) { - const entry = this.connections.get(originConnection); - - if (entry) { - added.forEach((clientId: any) => entry.clients.add(clientId)); - removed.forEach((clientId: any) => entry.clients.delete(clientId)); - } - } - - for (const connection of this.getConnections()) { - const awarenessMessage = new OutgoingMessage( - connection.messageAddress, - ).createAwarenessUpdateMessage(this.awareness, changedClients); - - connection.send(awarenessMessage.toUint8Array()); - } - - return this; - } - - /** - * Handle an updated document and sync changes to clients - */ - private handleUpdate(update: Uint8Array, origin: unknown): Document { - this.callbacks.onUpdate(this, origin, update); - - for (const connection of this.getConnections()) { - const message = new OutgoingMessage(connection.messageAddress) - .createSyncMessage() - .writeUpdate(update); - - connection.send(message.toUint8Array()); - } - - return this; - } - - /** - * Broadcast stateless message to all connections - */ - public broadcastStateless( - payload: string, - filter?: (conn: Connection) => boolean, - ): void { - this.callbacks.beforeBroadcastStateless(this, payload); - - const connections = filter - ? this.getConnections().filter(filter) - : this.getConnections(); - - connections.forEach((connection) => { - connection.sendStateless(payload); - }); - } - - destroy() { - super.destroy(); - this.isDestroyed = true; - } -} - -export default Document; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Hocuspocus.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Hocuspocus.ts deleted file mode 100644 index 2a23236..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Hocuspocus.ts +++ /dev/null @@ -1,639 +0,0 @@ -import crypto from "node:crypto"; -import { awarenessStatesToArray, ResetConnection, SkipFurtherHooksError } from "@hocuspocus/common"; -import { applyUpdate, Doc, encodeStateAsUpdate } from "yjs"; -import meta from "../package.json" with { type: "json" }; - -import { ClientConnection } from "./ClientConnection.ts"; -import { DirectConnection } from "./DirectConnection.ts"; -import Document from "./Document.ts"; -import type { Server } from "./Server.ts"; -import type { - AwarenessUpdate, - beforeBroadcastStatelessPayload, - Configuration, - ConnectionConfiguration, - HookName, - HookPayloadByName, - onChangePayload, - onDisconnectPayload, - onStoreDocumentPayload, - WebSocketLike, -} from "./types.ts"; -import { isTransactionOrigin, shouldSkipStoreHooks } from "./types.ts"; -import { useDebounce } from "./util/debounce.ts"; -import { getParameters } from "./util/getParameters.ts"; - -export const defaultConfiguration = { - name: null, - timeout: 60_000, - debounce: 2_000, - maxDebounce: 10_000, - quiet: false, - yDocOptions: { - gc: true, - gcFilter: () => true, - }, - unloadImmediately: true, -}; - -export class Hocuspocus { - configuration: Configuration = { - ...defaultConfiguration, - extensions: [], - onConfigure: () => new Promise((r) => r(null)), - onListen: () => new Promise((r) => r(null)), - onUpgrade: () => new Promise((r) => r(null)), - onConnect: () => new Promise((r) => r(null)), - connected: () => new Promise((r) => r(null)), - beforeHandleMessage: () => new Promise((r) => r(null)), - beforeHandleAwareness: () => new Promise((r) => r()), - beforeSync: () => new Promise((r) => r(null)), - beforeBroadcastStateless: () => new Promise((r) => r(null)), - onStateless: () => new Promise((r) => r(null)), - onChange: () => new Promise((r) => r(null)), - onCreateDocument: () => new Promise((r) => r(null)), - onLoadDocument: () => new Promise((r) => r(null)), - onStoreDocument: () => new Promise((r) => r(null)), - afterStoreDocument: () => new Promise((r) => r(null)), - onAwarenessUpdate: () => new Promise((r) => r(null)), - onRequest: () => new Promise((r) => r(null)), - onDisconnect: () => new Promise((r) => r(null)), - onDestroy: () => new Promise((r) => r(null)), - }; - - loadingDocuments: Map> = new Map(); - unloadingDocuments: Map> = new Map(); - - documents: Map = new Map(); - - server?: Server; - - debouncer = useDebounce(); - - constructor(configuration?: Partial>) { - if (configuration) { - this.configure(configuration); - } - } - - /** - * Configure Hocuspocus - */ - configure( - configuration: Partial>, - ): Hocuspocus { - this.configuration = { - ...this.configuration, - ...configuration, - }; - - this.configuration.extensions.sort((a, b) => { - const one = typeof a.priority === "undefined" ? 100 : a.priority; - const two = typeof b.priority === "undefined" ? 100 : b.priority; - - if (one > two) { - return -1; - } - - if (one < two) { - return 1; - } - - return 0; - }); - - this.configuration.extensions.push({ - onConfigure: this.configuration.onConfigure, - onListen: this.configuration.onListen, - onUpgrade: this.configuration.onUpgrade, - onConnect: this.configuration.onConnect, - connected: this.configuration.connected, - onAuthenticate: this.configuration.onAuthenticate, - onTokenSync: this.configuration.onTokenSync, - onLoadDocument: this.configuration.onLoadDocument, - afterLoadDocument: this.configuration.afterLoadDocument, - beforeHandleMessage: this.configuration.beforeHandleMessage, - beforeHandleAwareness: this.configuration.beforeHandleAwareness, - beforeBroadcastStateless: this.configuration.beforeBroadcastStateless, - beforeSync: this.configuration.beforeSync, - onStateless: this.configuration.onStateless, - onChange: this.configuration.onChange, - onStoreDocument: this.configuration.onStoreDocument, - afterStoreDocument: this.configuration.afterStoreDocument, - onAwarenessUpdate: this.configuration.onAwarenessUpdate, - onRequest: this.configuration.onRequest, - beforeUnloadDocument: this.configuration.beforeUnloadDocument, - afterUnloadDocument: this.configuration.afterUnloadDocument, - onDisconnect: this.configuration.onDisconnect, - onDestroy: this.configuration.onDestroy, - }); - - this.hooks("onConfigure", { - configuration: this.configuration, - version: meta.version, - instance: this, - }); - - return this; - } - - /** - * Get the total number of active documents - */ - getDocumentsCount(): number { - return this.documents.size; - } - - /** - * Get the total number of active connections - */ - getConnectionsCount(): number { - const uniqueSocketIds = new Set(); - const totalDirectConnections = Array.from(this.documents.values()).reduce( - (acc, document) => { - // Accumulate unique socket IDs - document.getConnections().forEach(({ socketId }) => { - uniqueSocketIds.add(socketId); - }); - // Accumulate direct connections - return acc + document.directConnectionsCount; - }, - 0, - ); - // Return the sum of unique socket IDs and direct connections - return uniqueSocketIds.size + totalDirectConnections; - } - - /** - * Immediately execute all pending debounced onStoreDocument calls. - * Useful during shutdown to ensure documents are persisted and unloaded - * before the server exits, even when unloadImmediately is false. - */ - flushPendingStores() { - this.documents.forEach((document: Document) => { - const debounceId = `onStoreDocument-${document.name}`; - if (!document.isLoading && this.debouncer.isDebounced(debounceId)) { - this.debouncer.executeNow(debounceId); - } - }); - } - - /** - * Force close one or more connections - */ - closeConnections(documentName?: string) { - // Iterate through all connections for all documents - // and invoke their close method, which is a graceful - // disconnect wrapper around the underlying websocket.close - this.documents.forEach((document: Document) => { - // If a documentName was specified, bail if it doesn't match - if (documentName && document.name !== documentName) { - return; - } - - document.connections.forEach((_clients, connection) => { - connection.close(ResetConnection); - }); - }); - } - - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it'll fully establish the connection and - * load the Document then. - */ - handleConnection( - incoming: WebSocket | WebSocketLike, - request: Request, - defaultContext: Context = {} as Context, - ): ClientConnection { - const clientConnection = new ClientConnection( - incoming, - request, - this, - this.hooks.bind(this), - { - timeout: this.configuration.timeout, - }, - defaultContext, - ); - clientConnection.onClose( - (document: Document, hookPayload: onDisconnectPayload) => { - // Check if there are still no connections to the document, as these hooks - // may take some time to resolve (e.g. database queries). If a - // new connection were to come in during that time it would rely on the - // document in the map that we remove now. - if (document.getConnectionsCount() > 0) { - return; - } - - // If it’s the last connection, we need to make sure to store the - // document. Use the debouncer executeNow helper, to run scheduled - // onStoreDocument immediately and clear running timers. - // If there is no scheduled run for this document there is no point in - // triggering onStoreDocument hook, as everything seems to be stored already. - // Only run this if the document has finished loading earlier (i.e. not to persist the empty - // ydoc if the onLoadDocument hook returned an error) - if ( - !document.isLoading && - this.debouncer.isDebounced(`onStoreDocument-${document.name}`) - ) { - if (this.configuration.unloadImmediately) { - this.debouncer.executeNow(`onStoreDocument-${document.name}`); - } - } else { - // Remove document from memory immediately - this.unloadDocument(document); - } - }, - ); - - return clientConnection; - } - - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - private handleDocumentUpdate( - document: Document, - origin: unknown, - update: Uint8Array, - ) { - const connection = - isTransactionOrigin(origin) && origin.source === "connection" - ? origin.connection - : undefined; - const request = connection?.request; - const context = isTransactionOrigin(origin) - ? origin.source === "connection" - ? origin.connection.context - : origin.source === "local" - ? (origin.context ?? {}) - : {} - : {}; - - const changePayload: onChangePayload = { - instance: this, - clientsCount: document.getConnectionsCount(), - document, - documentName: document.name, - requestHeaders: request?.headers ?? new Headers(), - requestParameters: getParameters(request), - socketId: connection?.socketId ?? "", - update, - transactionOrigin: origin, - connection: connection, - context, - }; - - this.hooks("onChange", changePayload); - - if (shouldSkipStoreHooks(origin)) { - return; - } - - const storePayload: onStoreDocumentPayload = { - instance: this, - clientsCount: document.getConnectionsCount(), - document, - lastContext: context, - lastTransactionOrigin: origin, - documentName: document.name, - }; - - this.storeDocumentHooks(document, storePayload); - } - - /** - * Create a new document by the given request - */ - public async createDocument( - documentName: string, - request: Request, - socketId: string, - connection: ConnectionConfiguration, - context?: Context, - ): Promise { - if (!documentName.trim()) { - throw new Error("Document name must not be empty"); - } - - const existingLoadingDoc = this.loadingDocuments.get(documentName); - - if (existingLoadingDoc) { - return existingLoadingDoc; - } - - const existingDoc = this.documents.get(documentName); - if (existingDoc) { - return Promise.resolve(existingDoc); - } - - const loadDocPromise = this.loadDocument( - documentName, - request, - socketId, - connection, - context, - ); - - this.loadingDocuments.set(documentName, loadDocPromise); - - try { - const doc = await loadDocPromise; - this.documents.set(documentName, doc); - this.loadingDocuments.delete(documentName); - return doc; - } catch (e) { - this.loadingDocuments.delete(documentName); - throw e; - } - } - - async loadDocument( - documentName: string, - request: Request, - socketId: string, - connectionConfig: ConnectionConfiguration, - context?: Context, - ): Promise { - const requestHeaders = request.headers; - const requestParameters = getParameters(request); - - const resolvedContext = (context ?? {}) as Context; - - const yDocOptions = await this.hooks("onCreateDocument", { - documentName, - requestHeaders, - requestParameters, - connectionConfig, - context: resolvedContext, - socketId, - instance: this, - }); - - const document = new Document(documentName, { - ...this.configuration.yDocOptions, - ...yDocOptions, - }); - - const hookPayload = { - instance: this, - context: resolvedContext, - connectionConfig, - document, - documentName, - socketId, - requestHeaders, - requestParameters, - }; - - try { - await this.hooks( - "onLoadDocument", - hookPayload, - (loadedDocument: Doc | Uint8ArrayConstructor | undefined) => { - if (loadedDocument instanceof Doc) { - applyUpdate(document, encodeStateAsUpdate(loadedDocument)); - } else if (loadedDocument instanceof Uint8Array) { - applyUpdate(document, loadedDocument); - } - }, - ); - } catch (e) { - this.closeConnections(documentName); - this.unloadDocument(document); - throw e; - } - - document.isLoading = false; - - document.onUpdate( - (document: Document, origin: unknown, update: Uint8Array) => { - document.lastChangeTime = Date.now(); - - this.handleDocumentUpdate(document, origin, update); - }, - ); - - await this.hooks("afterLoadDocument", hookPayload); - - document.beforeBroadcastStateless( - (document: Document, stateless: string) => { - const hookPayload: beforeBroadcastStatelessPayload = { - document, - documentName: document.name, - payload: stateless, - }; - - this.hooks("beforeBroadcastStateless", hookPayload); - }, - ); - - document.beforeHandleAwareness((document, states, transactionOrigin) => { - const connection = - isTransactionOrigin(transactionOrigin) && - transactionOrigin.source === "connection" - ? transactionOrigin.connection - : undefined; - const request = connection?.request; - return this.hooks("beforeHandleAwareness", { - awareness: document.awareness, - clientsCount: document.getConnectionsCount(), - context: connection?.context, - document, - documentName: document.name, - instance: this, - requestHeaders: request?.headers ?? new Headers(), - requestParameters: request - ? getParameters(request) - : new URLSearchParams(), - socketId: connection?.socketId ?? "", - transactionOrigin, - connection, - states, - }); - }); - - document.awareness.on( - "update", - (update: AwarenessUpdate, origin: unknown) => { - this.hooks("onAwarenessUpdate", { - document, - documentName, - instance: this, - ...update, - transactionOrigin: origin, - connection: - isTransactionOrigin(origin) && origin.source === "connection" - ? origin.connection - : undefined, - awareness: document.awareness, - states: awarenessStatesToArray(document.awareness.getStates()), - }); - }, - ); - - return document; - } - - storeDocumentHooks( - document: Document, - hookPayload: onStoreDocumentPayload, - immediately?: boolean, - ) { - const debounceId = `onStoreDocument-${document.name}`; - return this.debouncer.debounce( - debounceId, - async () => { - try { - await document.saveMutex.runExclusive(async () => { - await this.hooks("onStoreDocument", hookPayload); - await this.hooks("afterStoreDocument", hookPayload); - }); - } catch (error: any) { - if (error instanceof SkipFurtherHooksError) { - // Another extension handled this — proceed to unload - setTimeout(() => { - if (this.shouldUnloadDocument(document)) { - this.unloadDocument(document); - } - }, 0); - return; - } - - console.error( - "Caught error during storeDocumentHooks. Document stays in memory to avoid data loss", - error, - ); - return; - } - - setTimeout(() => { - if (this.shouldUnloadDocument(document)) { - this.unloadDocument(document); - } - }, 0); - }, - immediately ? 0 : this.configuration.debounce, - this.configuration.maxDebounce, - ); - } - - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - hooks( - name: T, - payload: HookPayloadByName[T], - // biome-ignore lint/complexity/noBannedTypes: - callback: Function | null = null, - ): Promise { - const { extensions } = this.configuration; - - // create a new `thenable` chain - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve - let chain = Promise.resolve(); - - extensions - // get me all extensions which have the given hook - .filter((extension) => typeof extension[name] === "function") - // run through all the configured hooks - .forEach((extension) => { - chain = chain - .then(() => (extension[name] as any)?.(payload)) - .catch((error) => { - // make sure to log error messages - if (error?.message) { - console.error(`[${name}]`, error.message); - } - - throw error; - }); - - if (callback) { - chain = chain.then((...args: any[]) => callback(...args)); - } - }); - - return chain; - } - - shouldUnloadDocument(document: Document): boolean { - const hasPendingWork = - this.debouncer.isDebounced(`onStoreDocument-${document.name}`) || - this.debouncer.isCurrentlyExecuting(`onStoreDocument-${document.name}`) || - document.saveMutex.isLocked(); - - return hasPendingWork === false && document.getConnectionsCount() === 0; - } - - async unloadDocument(document: Document): Promise { - const documentName = document.name; - - if (!this.shouldUnloadDocument(document)) return; - - if (!this.documents.has(documentName)) return; - - if (this.unloadingDocuments.has(documentName)) - return this.unloadingDocuments.get(documentName); - - // we need to make sure that the logic runs just once, even if multiple clients disconnect together - const actualUnloadingLogic = async () => { - try { - await this.hooks("beforeUnloadDocument", { - instance: this, - documentName, - document, - }); - } catch (e) { - return; - } - - // need sync check here as well, to avoid timing problems - if (!this.shouldUnloadDocument(document)) return; - - this.documents.delete(documentName); - document.destroy(); - await this.hooks("afterUnloadDocument", { instance: this, documentName }); - }; - - const unloading = actualUnloadingLogic(); - - this.unloadingDocuments.set(documentName, Promise.resolve(unloading)); - - await unloading; - - this.unloadingDocuments.delete(documentName); - } - - async openDirectConnection( - documentName: string, - context?: Context, - ): Promise> { - const connectionConfig: ConnectionConfiguration = { - isAuthenticated: true, - readOnly: false, - }; - - const document: Document = await this.createDocument( - documentName, - new Request("http://localhost"), // direct connection has no request params - crypto.randomUUID(), - connectionConfig, - context, - ); - - return new DirectConnection(document, this, context); - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/IncomingMessage.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/IncomingMessage.ts deleted file mode 100644 index 04fa5a8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/IncomingMessage.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import { - createDecoder, - readVarString, - readVarUint, - readVarUint8Array, -} from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import { - createEncoder, - length, - toUint8Array, - writeVarString, - writeVarUint, -} from "lib0/encoding"; -import type { MessageType } from "./types.ts"; - -export class IncomingMessage { - /** - * Access to the received message. - */ - decoder: Decoder; - - /** - * Private encoder; can be undefined. - * - * Lazy creation of the encoder speeds up IncomingMessages that need only a decoder. - */ - private encoderInternal?: Encoder; - - constructor(input: any) { - if (!(input instanceof Uint8Array)) { - input = new Uint8Array(input); - } - - this.decoder = createDecoder(input); - } - - get encoder() { - if (!this.encoderInternal) { - this.encoderInternal = createEncoder(); - } - return this.encoderInternal; - } - - readVarUint8Array() { - return readVarUint8Array(this.decoder); - } - - peekVarUint8Array() { - const { pos } = this.decoder; - const result = readVarUint8Array(this.decoder); - this.decoder.pos = pos; - return result; - } - - readVarUint() { - return readVarUint(this.decoder); - } - - readVarString() { - return readVarString(this.decoder); - } - - toUint8Array() { - return toUint8Array(this.encoder); - } - - writeVarUint(type: MessageType) { - writeVarUint(this.encoder, type); - } - - writeVarString(string: string) { - writeVarString(this.encoder, string); - } - - get length(): number { - return length(this.encoder); - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/MessageReceiver.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/MessageReceiver.ts deleted file mode 100644 index 505ea1e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/MessageReceiver.ts +++ /dev/null @@ -1,283 +0,0 @@ -import { AuthMessageType } from "@hocuspocus/common"; -import * as decoding from "lib0/decoding"; -import { readVarString } from "lib0/decoding"; -import { - Awareness, - applyAwarenessUpdate, - encodeAwarenessUpdate, -} from "y-protocols/awareness"; -import { - messageYjsSyncStep1, - messageYjsSyncStep2, - messageYjsUpdate, - readSyncStep1, - readSyncStep2, - readUpdate, -} from "y-protocols/sync"; -import * as Y from "yjs"; -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -import { OutgoingMessage } from "./OutgoingMessage.ts"; -import { - MessageType, - type ConnectionTransactionOrigin, - type TransactionOrigin, -} from "./types.ts"; - -export class MessageReceiver { - message: IncomingMessage; - - defaultTransactionOrigin?: TransactionOrigin; - - constructor( - message: IncomingMessage, - defaultTransactionOrigin?: TransactionOrigin, - ) { - this.message = message; - this.defaultTransactionOrigin = defaultTransactionOrigin; - } - - public async apply( - document: Document, - connection?: Connection, - reply?: (message: Uint8Array) => void, - ) { - const { message } = this; - const type = message.readVarUint(); - const emptyMessageLength = message.length; - - switch (type) { - case MessageType.Sync: - case MessageType.SyncReply: { - message.writeVarUint(MessageType.Sync); - await this.readSyncMessage( - message, - document, - connection, - reply, - type !== MessageType.SyncReply, - ); - - if (message.length > emptyMessageLength + 1) { - if (reply) { - reply(message.toUint8Array()); - } else if (connection) { - connection.send(message.toUint8Array()); - } - } - - break; - } - case MessageType.Awareness: { - let update = message.readVarUint8Array(); - - const origin: TransactionOrigin = connection - ? ({ - source: "connection", - connection, - } satisfies ConnectionTransactionOrigin) - : (this.defaultTransactionOrigin ?? { source: "local" }); - - // Decode the inbound update into a scratch Awareness so the hook - // chain sees a high-level Map. Mutations to that - // map (including `set`, `delete`, and field changes on each state - // object) are picked up by the re-encode below and forwarded as - // the broadcast payload. Hooks may also throw to reject the - // update entirely. - const scratch = new Awareness(new Y.Doc()); - applyAwarenessUpdate(scratch, update, null); - - await document.callbacks.beforeHandleAwareness( - document, - scratch.getStates(), - origin, - ); - - update = encodeAwarenessUpdate(scratch, [ - ...scratch.getStates().keys(), - ]); - - applyAwarenessUpdate(document.awareness, update, origin); - - break; - } - case MessageType.QueryAwareness: { - this.applyQueryAwarenessMessage(document, connection, reply); - - break; - } - case MessageType.Stateless: { - connection?.callbacks.statelessCallback({ - connection, - documentName: document.name, - document, - payload: readVarString(message.decoder), - }); - - break; - } - case MessageType.BroadcastStateless: { - const msg = message.readVarString(); - document.getConnections().forEach((connection) => { - connection.sendStateless(msg); - }); - break; - } - - case MessageType.CLOSE: { - connection?.close({ - code: 1000, - reason: "provider_initiated", - }); - break; - } - - case MessageType.Auth: { - const authType = message.readVarUint(); - if (authType === AuthMessageType.Token) { - connection?.callbacks.onTokenSyncCallback({ - token: message.readVarString(), - }); - break; - } - console.error( - "Received an authentication message on a connection that is already fully authenticated. Probably your provider has been destroyed + recreated really fast.", - ); - break; - } - - default: - console.error( - `Unable to handle message of type ${type}: no handler defined! Are your provider/server versions aligned?`, - ); - // Do nothing - } - } - - async readSyncMessage( - message: IncomingMessage, - document: Document, - connection?: Connection, - reply?: (message: Uint8Array) => void, - requestFirstSync = true, - ) { - const type = message.readVarUint(); - const messageAddress = connection?.messageAddress ?? document.name; - - if (connection) { - await connection.callbacks.beforeSync(connection, { - type, - payload: message.peekVarUint8Array(), - }); - } - - switch (type) { - case messageYjsSyncStep1: { - readSyncStep1(message.decoder, message.encoder, document); - - // When the server receives SyncStep1, it should reply with SyncStep2 immediately followed by SyncStep1. - if (reply && requestFirstSync) { - const syncMessage = new OutgoingMessage(messageAddress) - .createSyncReplyMessage() - .writeFirstSyncStepFor(document); - - reply(syncMessage.toUint8Array()); - } else if (connection) { - const syncMessage = new OutgoingMessage(messageAddress) - .createSyncMessage() - .writeFirstSyncStepFor(document); - - connection.send(syncMessage.toUint8Array()); - } - break; - } - case messageYjsSyncStep2: { - if (connection?.readOnly) { - // We're in read-only mode, so we can't apply the update. - // Let's use snapshotContainsUpdate to see if the update actually contains changes. - // If not, we can still ack the update - const snapshot = Y.snapshot(document); - const update = decoding.readVarUint8Array(message.decoder); - if (Y.snapshotContainsUpdate(snapshot, update)) { - // no new changes in update - const ackMessage = new OutgoingMessage( - messageAddress, - ).writeSyncStatus(true); - - connection.send(ackMessage.toUint8Array()); - } else { - // new changes in update that we can't apply, because readOnly - const ackMessage = new OutgoingMessage( - messageAddress, - ).writeSyncStatus(false); - - connection.send(ackMessage.toUint8Array()); - } - break; - } - - readSyncStep2( - message.decoder, - document, - connection - ? { source: "connection" as const, connection } - : (this.defaultTransactionOrigin ?? { source: "local" as const }), - ); - - if (connection) { - connection.send( - new OutgoingMessage(messageAddress) - .writeSyncStatus(true) - .toUint8Array(), - ); - } - break; - } - case messageYjsUpdate: { - if (connection?.readOnly) { - connection.send( - new OutgoingMessage(messageAddress) - .writeSyncStatus(false) - .toUint8Array(), - ); - break; - } - - readUpdate( - message.decoder, - document, - connection - ? { source: "connection" as const, connection } - : (this.defaultTransactionOrigin ?? { source: "local" as const }), - ); - if (connection) { - connection.send( - new OutgoingMessage(messageAddress) - .writeSyncStatus(true) - .toUint8Array(), - ); - } - break; - } - default: - throw new Error(`Received a message with an unknown type: ${type}`); - } - - return type; - } - - applyQueryAwarenessMessage( - document: Document, - connection?: Connection, - reply?: (message: Uint8Array) => void, - ) { - const message = new OutgoingMessage( - connection?.messageAddress ?? document.name, - ).createAwarenessUpdateMessage(document.awareness); - - if (reply) { - reply(message.toUint8Array()); - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/OutgoingMessage.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/OutgoingMessage.ts deleted file mode 100644 index fc6e3ae..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/OutgoingMessage.ts +++ /dev/null @@ -1,159 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import { - createEncoder, - toUint8Array, - writeVarString, - writeVarUint, - writeVarUint8Array, -} from "lib0/encoding"; -import type { Awareness } from "y-protocols/awareness"; -import { encodeAwarenessUpdate } from "y-protocols/awareness"; -import { writeSyncStep1, writeUpdate } from "y-protocols/sync"; - -import { writeAuthenticated, writePermissionDenied, writeTokenSyncRequest } from "@hocuspocus/common"; -import type Document from "./Document.ts"; -import { MessageType } from "./types.ts"; - -export class OutgoingMessage { - encoder: Encoder; - - type?: number; - - category?: string; - - constructor(documentName: string) { - this.encoder = createEncoder(); - - writeVarString(this.encoder, documentName); - } - - createSyncMessage(): OutgoingMessage { - this.type = MessageType.Sync; - - writeVarUint(this.encoder, MessageType.Sync); - - return this; - } - - createSyncReplyMessage(): OutgoingMessage { - this.type = MessageType.SyncReply; - - writeVarUint(this.encoder, MessageType.SyncReply); - - return this; - } - - createAwarenessUpdateMessage( - awareness: Awareness, - changedClients?: Array, - ): OutgoingMessage { - this.type = MessageType.Awareness; - this.category = "Update"; - - const message = encodeAwarenessUpdate( - awareness, - changedClients || Array.from(awareness.getStates().keys()), - ); - - writeVarUint(this.encoder, MessageType.Awareness); - writeVarUint8Array(this.encoder, message); - - return this; - } - - writeQueryAwareness(): OutgoingMessage { - this.type = MessageType.QueryAwareness; - this.category = "Update"; - - writeVarUint(this.encoder, MessageType.QueryAwareness); - - return this; - } - - writeTokenSyncRequest(): OutgoingMessage { - this.type = MessageType.Auth; - this.category = "TokenSync"; - - writeVarUint(this.encoder, MessageType.Auth); - writeTokenSyncRequest(this.encoder); - - return this; - } - - writeAuthenticated(readonly: boolean): OutgoingMessage { - this.type = MessageType.Auth; - this.category = "Authenticated"; - - writeVarUint(this.encoder, MessageType.Auth); - writeAuthenticated(this.encoder, readonly ? "readonly" : "read-write"); - - return this; - } - - writePermissionDenied(reason: string): OutgoingMessage { - this.type = MessageType.Auth; - this.category = "PermissionDenied"; - - writeVarUint(this.encoder, MessageType.Auth); - writePermissionDenied(this.encoder, reason); - - return this; - } - - writeFirstSyncStepFor(document: Document): OutgoingMessage { - this.category = "SyncStep1"; - - writeSyncStep1(this.encoder, document); - - return this; - } - - writeUpdate(update: Uint8Array): OutgoingMessage { - this.category = "Update"; - - writeUpdate(this.encoder, update); - - return this; - } - - writeStateless(payload: string): OutgoingMessage { - this.category = "Stateless"; - - writeVarUint(this.encoder, MessageType.Stateless); - writeVarString(this.encoder, payload); - - return this; - } - - writeBroadcastStateless(payload: string): OutgoingMessage { - this.category = "Stateless"; - - writeVarUint(this.encoder, MessageType.BroadcastStateless); - writeVarString(this.encoder, payload); - - return this; - } - - // TODO: should this be write* or create* as method name? - writeSyncStatus(updateSaved: boolean): OutgoingMessage { - this.category = "SyncStatus"; - - writeVarUint(this.encoder, MessageType.SyncStatus); - writeVarUint(this.encoder, updateSaved ? 1 : 0); - - return this; - } - - writeCloseMessage(reason: string): OutgoingMessage { - this.type = MessageType.CLOSE; - - writeVarUint(this.encoder, MessageType.CLOSE); - writeVarString(this.encoder, reason); - - return this; - } - - toUint8Array(): Uint8Array { - return toUint8Array(this.encoder); - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Server.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Server.ts deleted file mode 100644 index 53f3867..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/Server.ts +++ /dev/null @@ -1,273 +0,0 @@ -import type { - Server as HTTPServer, - IncomingMessage, - ServerResponse, -} from "node:http"; -import { createServer } from "node:http"; -import type { AddressInfo } from "node:net"; -import type { ListenOptions } from "node:net"; -import crossws from "crossws/adapters/node"; -import kleur from "kleur"; -import meta from "../package.json" assert { type: "json" }; -import { Hocuspocus, defaultConfiguration } from "./Hocuspocus.ts"; -import type { Configuration, WebSocketLike, onListenPayload } from "./types.ts"; - -export interface ServerConfiguration - extends Configuration { - port?: number; - address?: string; - stopOnSignals?: boolean; - /** - * Options passed to the underlying WebSocket server (ws). - * Supports all ws ServerOptions, e.g. { maxPayload: 1024 * 1024 } - */ - websocketOptions?: Record; -} - -export const defaultServerConfiguration = { - port: 80, - address: "0.0.0.0", - stopOnSignals: true, -}; - -export class Server { - httpServer: HTTPServer; - - private crossws: ReturnType; - - hocuspocus: Hocuspocus; - - configuration: ServerConfiguration = { - ...defaultConfiguration, - ...defaultServerConfiguration, - extensions: [], - }; - - constructor(configuration?: Partial>) { - if (configuration) { - this.configuration = { - ...this.configuration, - ...configuration, - }; - } - - this.hocuspocus = new Hocuspocus(this.configuration); - this.hocuspocus.server = this; - - this.httpServer = createServer(this.requestHandler); - this.crossws = crossws({ - serverOptions: this.configuration.websocketOptions, - hooks: { - open: (peer) => { - const clientConnection = this.hocuspocus.handleConnection( - peer.websocket as unknown as WebSocketLike, - peer.request as Request, - ); - (peer as any)._hocuspocus = clientConnection; - }, - message: (peer, message) => { - (peer as any)._hocuspocus?.handleMessage(message.uint8Array()); - }, - close: (peer, event) => { - (peer as any)._hocuspocus?.handleClose({ - code: event.code, - reason: event.reason, - }); - }, - error: (peer, error) => { - console.error("WebSocket error for peer:", peer.id); - console.error(error); - }, - }, - }); - - this.setupHttpUpgrade(); - } - - private setupHttpUpgrade = () => { - this.httpServer.on("upgrade", async (request, socket, head) => { - try { - await this.hocuspocus.hooks("onUpgrade", { - request, - socket, - head, - instance: this.hocuspocus, - }); - - // Let crossws handle the WebSocket upgrade - this.crossws.handleUpgrade(request, socket, head); - } catch (error) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if a error is present - // just rethrow it - if (error) { - throw error; - } - } - }); - }; - - requestHandler = async ( - request: IncomingMessage, - response: ServerResponse, - ) => { - try { - await this.hocuspocus.hooks("onRequest", { - request, - response, - instance: this.hocuspocus, - }); - - // default response if all prior hooks don't interfere - response.writeHead(200, { "Content-Type": "text/plain" }); - response.end("Welcome to Hocuspocus!"); - } catch (error) { - // if a hook rejects and the error is empty, do nothing - // this is only meant to prevent later hooks and the - // default handler to do something. if a error is present - // just rethrow it - if (error) { - throw error; - } - } - }; - - async listen( - port?: number, - callback: any = null, - ): Promise> { - if (port) { - this.configuration.port = port; - } - - if (typeof callback === "function") { - this.hocuspocus.configuration.extensions.push({ - onListen: callback, - }); - } - - if (this.configuration.stopOnSignals) { - const signalHandler = async () => { - await this.destroy(); - process.exit(0); - }; - - process.on("SIGINT", signalHandler); - process.on("SIGQUIT", signalHandler); - process.on("SIGTERM", signalHandler); - } - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - return new Promise((resolve: Function, reject: Function) => { - this.httpServer.listen( - { - port: this.configuration.port, - address: this.configuration.address, - } as ListenOptions, - async () => { - if ( - !this.configuration.quiet && - String(process.env.NODE_ENV) !== "testing" - ) { - this.showStartScreen(); - } - - const onListenPayload = { - instance: this.hocuspocus, - configuration: this.configuration, - port: this.address.port, - } as onListenPayload; - - try { - await this.hocuspocus.hooks("onListen", onListenPayload); - resolve(this.hocuspocus); - } catch (e) { - reject(e); - } - }, - ); - }); - } - - get address(): AddressInfo { - return (this.httpServer.address() || { - port: this.configuration.port, - address: this.configuration.address, - family: "IPv4", - }) as AddressInfo; - } - - async destroy(): Promise { - await new Promise((resolve) => { - this.httpServer.close(); - - try { - this.configuration.extensions.push({ - async afterUnloadDocument({ instance }) { - if (instance.getDocumentsCount() === 0) resolve(); - }, - }); - - // Close all existing connections - this will trigger the close hook - if (this.hocuspocus.getDocumentsCount() === 0) resolve(); - - this.hocuspocus.closeConnections(); - - // Flush any remaining debounced stores so documents unload - // promptly, even when unloadImmediately is false. - this.hocuspocus.flushPendingStores(); - } catch (error) { - console.error(error); - } - }); - - await this.hocuspocus.hooks("onDestroy", { instance: this.hocuspocus }); - } - - get URL(): string { - return `${this.configuration.address}:${this.address.port}`; - } - - get webSocketURL(): string { - return `ws://${this.URL}`; - } - - get httpURL(): string { - return `http://${this.URL}`; - } - - private showStartScreen() { - const name = this.configuration.name ? ` (${this.configuration.name})` : ""; - - console.log(); - console.log( - ` ${kleur.cyan(`Hocuspocus v${meta.version}${name}`)}${kleur.green(" running at:")}`, - ); - console.log(); - - console.log(` > HTTP: ${kleur.cyan(`${this.httpURL}`)}`); - console.log(` > WebSocket: ${this.webSocketURL}`); - - const extensions = this.configuration?.extensions - .map((extension) => { - return extension.extensionName ?? extension.constructor?.name; - }) - .filter((name) => name) - .filter((name) => name !== "Object"); - - if (!extensions.length) { - return; - } - - console.log(); - console.log(" Extensions:"); - - extensions.forEach((name) => { - console.log(` - ${name}`); - }); - - console.log(); - console.log(` ${kleur.green("Ready.")}`); - console.log(); - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/index.ts deleted file mode 100644 index 8ede6d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from "./Connection.ts"; -export * from "./Document.ts"; -export * from "./Hocuspocus.ts"; -export * from "./IncomingMessage.ts"; -export * from "./MessageReceiver.ts"; -export * from "./OutgoingMessage.ts"; -export * from "./Server.ts"; -export * from "./types.ts"; -export * from "./util/debounce.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/types.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/types.ts deleted file mode 100644 index 0b9c37d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/types.ts +++ /dev/null @@ -1,509 +0,0 @@ -import type { IncomingMessage, ServerResponse } from "node:http"; -import type { Awareness } from "y-protocols/awareness"; -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; - -export interface ConnectionTransactionOrigin { - source: "connection"; - connection: Connection; -} - -export interface RedisTransactionOrigin { - source: "redis"; -} - -export interface LocalTransactionOrigin { - source: "local"; - skipStoreHooks?: boolean; - context?: any; -} - -export type TransactionOrigin = - | ConnectionTransactionOrigin - | RedisTransactionOrigin - | LocalTransactionOrigin; - -export function isTransactionOrigin( - origin: unknown, -): origin is TransactionOrigin { - return ( - typeof origin === "object" && - origin !== null && - "source" in origin && - ((origin as any).source === "connection" || - (origin as any).source === "redis" || - (origin as any).source === "local") - ); -} - -export function shouldSkipStoreHooks(origin: unknown): boolean { - if (!isTransactionOrigin(origin)) return false; - switch (origin.source) { - case "connection": - return false; - case "redis": - return true; - case "local": - return origin.skipStoreHooks ?? false; - } -} - -/** - * Minimal interface for any WebSocket-like object for WebSocket, Bun's ServerWebSocket, ws, Deno, etc. - */ -export interface WebSocketLike { - send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void; - close(code?: number, reason?: string): void; - readyState: number; -} - -export enum MessageType { - Unknown = -1, - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - SyncReply = 4, // same as Sync, but won't trigger another 'SyncStep1' - Stateless = 5, - BroadcastStateless = 6, - CLOSE = 7, - SyncStatus = 8, - Ping = 9, - Pong = 10, -} - -export interface AwarenessUpdate { - added: Array; - updated: Array; - removed: Array; -} - -export interface ConnectionConfiguration { - readOnly: boolean; - isAuthenticated: boolean; -} - -export interface Extension { - priority?: number; - extensionName?: string; - onConfigure?(data: onConfigurePayload): Promise; - onListen?(data: onListenPayload): Promise; - onUpgrade?(data: onUpgradePayload): Promise; - onConnect?(data: onConnectPayload): Promise; - connected?(data: connectedPayload): Promise; - onAuthenticate?(data: onAuthenticatePayload): Promise; - onTokenSync?(data: onTokenSyncPayload): Promise; - onCreateDocument?(data: onCreateDocumentPayload): Promise; - onLoadDocument?(data: onLoadDocumentPayload): Promise; - afterLoadDocument?(data: afterLoadDocumentPayload): Promise; - beforeHandleMessage?(data: beforeHandleMessagePayload): Promise; - /** - * Fired before an inbound awareness update is applied to the document's - * awareness state. The hook receives the decoded per-client `states` as a - * mutable `Map` keyed by Yjs clientId. Mutate the map and the contained - * state objects in place to rewrite fields, drop peers (`states.delete`), - * or add synthetic ones (`states.set`); mutations are reflected in the - * broadcast. Throw to reject the update without applying anything. - * - * Multiple extensions chain naturally: each extension sees the map as - * mutated by previous extensions and can mutate it further. - */ - beforeHandleAwareness?( - data: beforeHandleAwarenessPayload, - ): Promise; - beforeSync?(data: beforeSyncPayload): Promise; - beforeBroadcastStateless?( - data: beforeBroadcastStatelessPayload, - ): Promise; - onStateless?(payload: onStatelessPayload): Promise; - onChange?(data: onChangePayload): Promise; - onStoreDocument?(data: onStoreDocumentPayload): Promise; - afterStoreDocument?(data: afterStoreDocumentPayload): Promise; - onAwarenessUpdate?(data: onAwarenessUpdatePayload): Promise; - onRequest?(data: onRequestPayload): Promise; - onDisconnect?(data: onDisconnectPayload): Promise; - beforeUnloadDocument?(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument?(data: afterUnloadDocumentPayload): Promise; - onDestroy?(data: onDestroyPayload): Promise; -} - -export type HookName = - | "onConfigure" - | "onListen" - | "onUpgrade" - | "onConnect" - | "connected" - | "onAuthenticate" - | "onTokenSync" - | "onCreateDocument" - | "onLoadDocument" - | "afterLoadDocument" - | "beforeHandleMessage" - | "beforeHandleAwareness" - | "beforeBroadcastStateless" - | "beforeSync" - | "onStateless" - | "onChange" - | "onStoreDocument" - | "afterStoreDocument" - | "onAwarenessUpdate" - | "onRequest" - | "onDisconnect" - | "beforeUnloadDocument" - | "afterUnloadDocument" - | "onDestroy"; - -export type HookPayloadByName = { - onConfigure: onConfigurePayload; - onListen: onListenPayload; - onUpgrade: onUpgradePayload; - onConnect: onConnectPayload; - connected: connectedPayload; - onAuthenticate: onAuthenticatePayload; - onTokenSync: onTokenSyncPayload; - onCreateDocument: onCreateDocumentPayload; - onLoadDocument: onLoadDocumentPayload; - afterLoadDocument: afterLoadDocumentPayload; - beforeHandleMessage: beforeHandleMessagePayload; - beforeHandleAwareness: beforeHandleAwarenessPayload; - beforeBroadcastStateless: beforeBroadcastStatelessPayload; - beforeSync: beforeSyncPayload; - onStateless: onStatelessPayload; - onChange: onChangePayload; - onStoreDocument: onStoreDocumentPayload; - afterStoreDocument: afterStoreDocumentPayload; - onAwarenessUpdate: onAwarenessUpdatePayload; - onRequest: onRequestPayload; - onDisconnect: onDisconnectPayload; - afterUnloadDocument: afterUnloadDocumentPayload; - beforeUnloadDocument: beforeUnloadDocumentPayload; - onDestroy: onDestroyPayload; -}; - -export interface Configuration extends Extension { - /** - * A name for the instance, used for logging. - */ - name: string | null; - /** - * A list of hocuspocus extensions. - */ - extensions: Array; - /** - * Defines in which interval the server sends a ping, and closes the connection when no pong is sent back. - */ - timeout: number; - /** - * Debounces the call of the `onStoreDocument` hook for the given amount of time in ms. - * Otherwise every single update would be persisted. - */ - debounce: number; - /** - * Makes sure to call `onStoreDocument` at least in the given amount of time (ms). - */ - maxDebounce: number; - /** - * By default, the servers show a start screen. If passed false, the server will start quietly. - */ - quiet: boolean; - /** - * If set to false, respects the debounce time of `onStoreDocument` before unloading a document. - * Otherwise, the document will be unloaded immediately. - * - * This prevents a client from DOSing the server by repeatedly connecting and disconnecting when - * your onStoreDocument is rate-limited. - */ - unloadImmediately: boolean; - - /** - * options to pass to the ydoc document - */ - yDocOptions: { - gc: boolean; // enable or disable garbage collection (see https://github.com/yjs/yjs/blob/main/INTERNALS.md#deletions) - gcFilter: () => boolean; // will be called before garbage collecting ; return false to keep it - }; -} - -export interface onStatelessPayload { - connection: Connection; - documentName: string; - document: Document; - payload: string; -} - -export interface onAuthenticatePayload { - context: Context; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - request: Request; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; - providerVersion: string | null; -} - -export interface onTokenSyncPayload { - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} - -export interface onCreateDocumentPayload { - context: Context; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} - -export interface onConnectPayload { - context: Context; - documentName: string; - instance: Hocuspocus; - request: Request; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - providerVersion: string | null; -} - -export interface connectedPayload { - context: Context; - documentName: string; - instance: Hocuspocus; - request: Request; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; - providerVersion: string | null; -} - -export interface onLoadDocumentPayload { - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} - -export interface afterLoadDocumentPayload { - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} - -export interface onChangePayload { - clientsCount: number; - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - transactionOrigin: unknown; - connection?: Connection; -} - -export interface beforeHandleMessagePayload { - clientsCount: number; - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - connection: Connection; -} - -export interface beforeHandleAwarenessPayload { - awareness: Awareness; - clientsCount: number; - /** - * Connection context populated by `onAuthenticate`. `undefined` when the - * update did not originate from a client connection (e.g. server-internal - * writes via `DirectConnection`). - */ - context: Context | undefined; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - /** - * Per-client awareness states decoded from the inbound update, keyed by - * Yjs clientId. Mutate this map in place to rewrite the update: change - * fields on a state object, `states.delete(clientId)` to drop a peer, or - * `states.set(clientId, ...)` to add or replace one. The encoded update - * sent to peers reflects whatever the map looks like after every hook in - * the chain has run. - */ - states: Map>; - socketId: string; - /** - * The `TransactionOrigin` that will be passed to `applyAwarenessUpdate`. - * Use `isTransactionOrigin(origin)` to discriminate sources. Matches the - * `transactionOrigin` shape of `onAwarenessUpdatePayload`. - */ - transactionOrigin: unknown; - /** - * Convenience shortcut: `origin.connection` when `transactionOrigin` is a - * `ConnectionTransactionOrigin`, otherwise `undefined`. Matches the - * `connection?` shape of `onAwarenessUpdatePayload`. - */ - connection?: Connection; -} - -export interface beforeSyncPayload { - clientsCount: number; - context: Context; - document: Document; - documentName: string; - connection: Connection; - /** - * The y-protocols/sync message type - * @example - * 0: SyncStep1 - * 1: SyncStep2 - * 2: YjsUpdate - * - * @see https://github.com/yjs/y-protocols/blob/master/sync.js#L13-L40 - */ - type: number; - /** - * The payload of the y-sync message. - */ - payload: Uint8Array; -} - -export interface beforeBroadcastStatelessPayload { - document: Document; - documentName: string; - payload: string; -} - -export interface onStoreDocumentPayload { - clientsCount: number; - document: Document; - lastContext: Context; - lastTransactionOrigin: unknown; - documentName: string; - instance: Hocuspocus; -} - -// eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type -export interface afterStoreDocumentPayload - extends onStoreDocumentPayload {} - -export interface onAwarenessUpdatePayload { - document: Document; - documentName: string; - instance: Hocuspocus; - transactionOrigin: unknown; - connection?: Connection; - added: number[]; - updated: number[]; - removed: number[]; - awareness: Awareness; - states: StatesArray; -} - -export type StatesArray = { clientId: number; [key: string | number]: any }[]; - -export interface fetchPayload { - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} - -export interface storePayload - extends onStoreDocumentPayload { - state: Buffer; -} - -export interface onDisconnectPayload { - clientsCount: number; - context: Context; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: Headers; - requestParameters: URLSearchParams; - socketId: string; -} - -export interface onRequestPayload { - request: IncomingMessage; - response: ServerResponse; - instance: Hocuspocus; -} - -export interface onUpgradePayload { - request: IncomingMessage; - socket: any; - head: any; - instance: Hocuspocus; -} - -export interface onListenPayload { - instance: Hocuspocus; - configuration: Configuration; - port: number; -} - -export interface onDestroyPayload { - instance: Hocuspocus; -} - -export interface onConfigurePayload { - instance: Hocuspocus; - configuration: Configuration; - version: string; -} - -export interface afterUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; -} - -export interface beforeUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; - document: Document; -} - -export interface DirectConnection { - transact(transaction: (document: Document) => void): Promise; - disconnect(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/debounce.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/debounce.ts deleted file mode 100644 index 09b4ced..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/debounce.ts +++ /dev/null @@ -1,77 +0,0 @@ -export const useDebounce = () => { - const timers: Map< - string, - { - timeout: NodeJS.Timeout; - start: number; - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - func: () => any | Promise<() => any>; - } - > = new Map(); - - const runningExecutions: Map> = new Map(); - - const debounce = async ( - id: string, - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - func: () => any | Promise<() => any>, - debounce: number, - maxDebounce: number, - ) => { - const old = timers.get(id); - const start = old?.start || Date.now(); - - const run = async () => { - if (runningExecutions.has(id)) { - // wait for previous execution to finish - await runningExecutions.get(id); - } - - timers.delete(id); - - const execution = func(); - - runningExecutions.set(id, execution); - const executionResult = await execution; - runningExecutions.delete(id); - - return executionResult; - }; - - if (old?.timeout) { - clearTimeout(old.timeout); - } - - if (debounce === 0) { - return run(); - } - - if (Date.now() - start >= maxDebounce) { - return run(); - } - - timers.set(id, { - start, - timeout: setTimeout(run, debounce), - func: run, - }); - }; - - const executeNow = (id: string) => { - const old = timers.get(id); - if (old) { - clearTimeout(old.timeout); - return old.func(); - } - }; - - const isDebounced = (id: string): boolean => { - return timers.has(id); - }; - - const isCurrentlyExecuting = (id: string): boolean => { - return runningExecutions.has(id); - }; - - return { debounce, isDebounced, isCurrentlyExecuting, executeNow }; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/getParameters.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/getParameters.ts deleted file mode 100644 index 906c4bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/server/src/util/getParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Get parameters by the given request - */ -export function getParameters(request?: { url?: string }): URLSearchParams { - const url = request?.url; - if (!url) { - return new URLSearchParams(); - } - // Handle both full URLs (web Request) and path-only URLs (Node.js IncomingMessage) - const query = url.includes("://") - ? new URL(url).searchParams - : new URLSearchParams(url.split("?")[1] || ""); - return query; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-mutex b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-mutex deleted file mode 120000 index ea6ff44..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/async-mutex +++ /dev/null @@ -1 +0,0 @@ -../../async-mutex@0.5.0/node_modules/async-mutex \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/crossws b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/crossws deleted file mode 120000 index 094c38d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/crossws +++ /dev/null @@ -1 +0,0 @@ -../../crossws@0.4.5/node_modules/crossws \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur deleted file mode 120000 index 535c894..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/kleur +++ /dev/null @@ -1 +0,0 @@ -../../kleur@4.1.5/node_modules/kleur \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/lib0 b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/lib0 deleted file mode 120000 index e2cfd65..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/lib0 +++ /dev/null @@ -1 +0,0 @@ -../../lib0@0.2.117/node_modules/lib0 \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/y-protocols b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/y-protocols deleted file mode 120000 index 6e8b568..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/y-protocols +++ /dev/null @@ -1 +0,0 @@ -../../y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs deleted file mode 120000 index c3bb19e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+server@4.1.0_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/yjs +++ /dev/null @@ -1 +0,0 @@ -../../yjs@13.6.31/node_modules/yjs \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs deleted file mode 100644 index f578988..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs +++ /dev/null @@ -1,2744 +0,0 @@ -'use strict'; - -var yjs = require('yjs'); -var yProsemirror = require('y-prosemirror'); -var core = require('@tiptap/core'); -var starterKit = require('@tiptap/starter-kit'); - -// ::- Persistent data structure representing an ordered mapping from -// strings to values, with some convenient update methods. -function OrderedMap(content) { - this.content = content; -} - -OrderedMap.prototype = { - constructor: OrderedMap, - - find: function(key) { - for (var i = 0; i < this.content.length; i += 2) - if (this.content[i] === key) return i - return -1 - }, - - // :: (string) → ?any - // Retrieve the value stored under `key`, or return undefined when - // no such key exists. - get: function(key) { - var found = this.find(key); - return found == -1 ? undefined : this.content[found + 1] - }, - - // :: (string, any, ?string) → OrderedMap - // Create a new map by replacing the value of `key` with a new - // value, or adding a binding to the end of the map. If `newKey` is - // given, the key of the binding will be replaced with that key. - update: function(key, value, newKey) { - var self = newKey && newKey != key ? this.remove(newKey) : this; - var found = self.find(key), content = self.content.slice(); - if (found == -1) { - content.push(newKey || key, value); - } else { - content[found + 1] = value; - if (newKey) content[found] = newKey; - } - return new OrderedMap(content) - }, - - // :: (string) → OrderedMap - // Return a map with the given key removed, if it existed. - remove: function(key) { - var found = this.find(key); - if (found == -1) return this - var content = this.content.slice(); - content.splice(found, 2); - return new OrderedMap(content) - }, - - // :: (string, any) → OrderedMap - // Add a new key to the start of the map. - addToStart: function(key, value) { - return new OrderedMap([key, value].concat(this.remove(key).content)) - }, - - // :: (string, any) → OrderedMap - // Add a new key to the end of the map. - addToEnd: function(key, value) { - var content = this.remove(key).content.slice(); - content.push(key, value); - return new OrderedMap(content) - }, - - // :: (string, string, any) → OrderedMap - // Add a key after the given key. If `place` is not found, the new - // key is added to the end. - addBefore: function(place, key, value) { - var without = this.remove(key), content = without.content.slice(); - var found = without.find(place); - content.splice(found == -1 ? content.length : found, 0, key, value); - return new OrderedMap(content) - }, - - // :: ((key: string, value: any)) - // Call the given function for each key/value pair in the map, in - // order. - forEach: function(f) { - for (var i = 0; i < this.content.length; i += 2) - f(this.content[i], this.content[i + 1]); - }, - - // :: (union) → OrderedMap - // Create a new map by prepending the keys in this map that don't - // appear in `map` before the keys in `map`. - prepend: function(map) { - map = OrderedMap.from(map); - if (!map.size) return this - return new OrderedMap(map.content.concat(this.subtract(map).content)) - }, - - // :: (union) → OrderedMap - // Create a new map by appending the keys in this map that don't - // appear in `map` after the keys in `map`. - append: function(map) { - map = OrderedMap.from(map); - if (!map.size) return this - return new OrderedMap(this.subtract(map).content.concat(map.content)) - }, - - // :: (union) → OrderedMap - // Create a map containing all the keys in this map that don't - // appear in `map`. - subtract: function(map) { - var result = this; - map = OrderedMap.from(map); - for (var i = 0; i < map.content.length; i += 2) - result = result.remove(map.content[i]); - return result - }, - - // :: () → Object - // Turn ordered map into a plain object. - toObject: function() { - var result = {}; - this.forEach(function(key, value) { result[key] = value; }); - return result - }, - - // :: number - // The amount of keys in this map. - get size() { - return this.content.length >> 1 - } -}; - -// :: (?union) → OrderedMap -// Return a map with the given content. If null, create an empty -// map. If given an ordered map, return that map itself. If given an -// object, create a map from the object's properties. -OrderedMap.from = function(value) { - if (value instanceof OrderedMap) return value - var content = []; - if (value) for (var prop in value) content.push(prop, value[prop]); - return new OrderedMap(content) -}; - -function findDiffStart(a, b, pos) { - for (let i = 0;; i++) { - if (i == a.childCount || i == b.childCount) - return a.childCount == b.childCount ? null : pos; - let childA = a.child(i), childB = b.child(i); - if (childA == childB) { - pos += childA.nodeSize; - continue; - } - if (!childA.sameMarkup(childB)) - return pos; - if (childA.isText && childA.text != childB.text) { - for (let j = 0; childA.text[j] == childB.text[j]; j++) - pos++; - return pos; - } - if (childA.content.size || childB.content.size) { - let inner = findDiffStart(childA.content, childB.content, pos + 1); - if (inner != null) - return inner; - } - pos += childA.nodeSize; - } -} -function findDiffEnd(a, b, posA, posB) { - for (let iA = a.childCount, iB = b.childCount;;) { - if (iA == 0 || iB == 0) - return iA == iB ? null : { a: posA, b: posB }; - let childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize; - if (childA == childB) { - posA -= size; - posB -= size; - continue; - } - if (!childA.sameMarkup(childB)) - return { a: posA, b: posB }; - if (childA.isText && childA.text != childB.text) { - let same = 0, minSize = Math.min(childA.text.length, childB.text.length); - while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) { - same++; - posA--; - posB--; - } - return { a: posA, b: posB }; - } - if (childA.content.size || childB.content.size) { - let inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1); - if (inner) - return inner; - } - posA -= size; - posB -= size; - } -} - -/** -A fragment represents a node's collection of child nodes. - -Like nodes, fragments are persistent data structures, and you -should not mutate them or their content. Rather, you create new -instances whenever needed. The API tries to make this easy. -*/ -class Fragment { - /** - @internal - */ - constructor( - /** - The child nodes in this fragment. - */ - content, size) { - this.content = content; - this.size = size || 0; - if (size == null) - for (let i = 0; i < content.length; i++) - this.size += content[i].nodeSize; - } - /** - Invoke a callback for all descendant nodes between the given two - positions (relative to start of this fragment). Doesn't descend - into a node when the callback returns `false`. - */ - nodesBetween(from, to, f, nodeStart = 0, parent) { - for (let i = 0, pos = 0; pos < to; i++) { - let child = this.content[i], end = pos + child.nodeSize; - if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) { - let start = pos + 1; - child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start); - } - pos = end; - } - } - /** - Call the given callback for every descendant node. `pos` will be - relative to the start of the fragment. The callback may return - `false` to prevent traversal of a given node's children. - */ - descendants(f) { - this.nodesBetween(0, this.size, f); - } - /** - Extract the text between `from` and `to`. See the same method on - [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween). - */ - textBetween(from, to, blockSeparator, leafText) { - let text = "", first = true; - this.nodesBetween(from, to, (node, pos) => { - let nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos) - : !node.isLeaf ? "" - : leafText ? (typeof leafText === "function" ? leafText(node) : leafText) - : node.type.spec.leafText ? node.type.spec.leafText(node) - : ""; - if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) { - if (first) - first = false; - else - text += blockSeparator; - } - text += nodeText; - }, 0); - return text; - } - /** - Create a new fragment containing the combined content of this - fragment and the other. - */ - append(other) { - if (!other.size) - return this; - if (!this.size) - return other; - let last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0; - if (last.isText && last.sameMarkup(first)) { - content[content.length - 1] = last.withText(last.text + first.text); - i = 1; - } - for (; i < other.content.length; i++) - content.push(other.content[i]); - return new Fragment(content, this.size + other.size); - } - /** - Cut out the sub-fragment between the two given positions. - */ - cut(from, to = this.size) { - if (from == 0 && to == this.size) - return this; - let result = [], size = 0; - if (to > from) - for (let i = 0, pos = 0; pos < to; i++) { - let child = this.content[i], end = pos + child.nodeSize; - if (end > from) { - if (pos < from || end > to) { - if (child.isText) - child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos)); - else - child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1)); - } - result.push(child); - size += child.nodeSize; - } - pos = end; - } - return new Fragment(result, size); - } - /** - @internal - */ - cutByIndex(from, to) { - if (from == to) - return Fragment.empty; - if (from == 0 && to == this.content.length) - return this; - return new Fragment(this.content.slice(from, to)); - } - /** - Create a new fragment in which the node at the given index is - replaced by the given node. - */ - replaceChild(index, node) { - let current = this.content[index]; - if (current == node) - return this; - let copy = this.content.slice(); - let size = this.size + node.nodeSize - current.nodeSize; - copy[index] = node; - return new Fragment(copy, size); - } - /** - Create a new fragment by prepending the given node to this - fragment. - */ - addToStart(node) { - return new Fragment([node].concat(this.content), this.size + node.nodeSize); - } - /** - Create a new fragment by appending the given node to this - fragment. - */ - addToEnd(node) { - return new Fragment(this.content.concat(node), this.size + node.nodeSize); - } - /** - Compare this fragment to another one. - */ - eq(other) { - if (this.content.length != other.content.length) - return false; - for (let i = 0; i < this.content.length; i++) - if (!this.content[i].eq(other.content[i])) - return false; - return true; - } - /** - The first child of the fragment, or `null` if it is empty. - */ - get firstChild() { return this.content.length ? this.content[0] : null; } - /** - The last child of the fragment, or `null` if it is empty. - */ - get lastChild() { return this.content.length ? this.content[this.content.length - 1] : null; } - /** - The number of child nodes in this fragment. - */ - get childCount() { return this.content.length; } - /** - Get the child node at the given index. Raise an error when the - index is out of range. - */ - child(index) { - let found = this.content[index]; - if (!found) - throw new RangeError("Index " + index + " out of range for " + this); - return found; - } - /** - Get the child node at the given index, if it exists. - */ - maybeChild(index) { - return this.content[index] || null; - } - /** - Call `f` for every child node, passing the node, its offset - into this parent node, and its index. - */ - forEach(f) { - for (let i = 0, p = 0; i < this.content.length; i++) { - let child = this.content[i]; - f(child, p, i); - p += child.nodeSize; - } - } - /** - Find the first position at which this fragment and another - fragment differ, or `null` if they are the same. - */ - findDiffStart(other, pos = 0) { - return findDiffStart(this, other, pos); - } - /** - Find the first position, searching from the end, at which this - fragment and the given fragment differ, or `null` if they are - the same. Since this position will not be the same in both - nodes, an object with two separate positions is returned. - */ - findDiffEnd(other, pos = this.size, otherPos = other.size) { - return findDiffEnd(this, other, pos, otherPos); - } - /** - Find the index and inner offset corresponding to a given relative - position in this fragment. The result object will be reused - (overwritten) the next time the function is called. @internal - */ - findIndex(pos, round = -1) { - if (pos == 0) - return retIndex(0, pos); - if (pos == this.size) - return retIndex(this.content.length, pos); - if (pos > this.size || pos < 0) - throw new RangeError(`Position ${pos} outside of fragment (${this})`); - for (let i = 0, curPos = 0;; i++) { - let cur = this.child(i), end = curPos + cur.nodeSize; - if (end >= pos) { - if (end == pos || round > 0) - return retIndex(i + 1, end); - return retIndex(i, curPos); - } - curPos = end; - } - } - /** - Return a debugging string that describes this fragment. - */ - toString() { return "<" + this.toStringInner() + ">"; } - /** - @internal - */ - toStringInner() { return this.content.join(", "); } - /** - Create a JSON-serializeable representation of this fragment. - */ - toJSON() { - return this.content.length ? this.content.map(n => n.toJSON()) : null; - } - /** - Deserialize a fragment from its JSON representation. - */ - static fromJSON(schema, value) { - if (!value) - return Fragment.empty; - if (!Array.isArray(value)) - throw new RangeError("Invalid input for Fragment.fromJSON"); - return new Fragment(value.map(schema.nodeFromJSON)); - } - /** - Build a fragment from an array of nodes. Ensures that adjacent - text nodes with the same marks are joined together. - */ - static fromArray(array) { - if (!array.length) - return Fragment.empty; - let joined, size = 0; - for (let i = 0; i < array.length; i++) { - let node = array[i]; - size += node.nodeSize; - if (i && node.isText && array[i - 1].sameMarkup(node)) { - if (!joined) - joined = array.slice(0, i); - joined[joined.length - 1] = node - .withText(joined[joined.length - 1].text + node.text); - } - else if (joined) { - joined.push(node); - } - } - return new Fragment(joined || array, size); - } - /** - Create a fragment from something that can be interpreted as a - set of nodes. For `null`, it returns the empty fragment. For a - fragment, the fragment itself. For a node or array of nodes, a - fragment containing those nodes. - */ - static from(nodes) { - if (!nodes) - return Fragment.empty; - if (nodes instanceof Fragment) - return nodes; - if (Array.isArray(nodes)) - return this.fromArray(nodes); - if (nodes.attrs) - return new Fragment([nodes], nodes.nodeSize); - throw new RangeError("Can not convert " + nodes + " to a Fragment" + - (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : "")); - } -} -/** -An empty fragment. Intended to be reused whenever a node doesn't -contain anything (rather than allocating a new empty fragment for -each leaf node). -*/ -Fragment.empty = new Fragment([], 0); -const found = { index: 0, offset: 0 }; -function retIndex(index, offset) { - found.index = index; - found.offset = offset; - return found; -} - -function compareDeep(a, b) { - if (a === b) - return true; - if (!(a && typeof a == "object") || - !(b && typeof b == "object")) - return false; - let array = Array.isArray(a); - if (Array.isArray(b) != array) - return false; - if (array) { - if (a.length != b.length) - return false; - for (let i = 0; i < a.length; i++) - if (!compareDeep(a[i], b[i])) - return false; - } - else { - for (let p in a) - if (!(p in b) || !compareDeep(a[p], b[p])) - return false; - for (let p in b) - if (!(p in a)) - return false; - } - return true; -} - -/** -A mark is a piece of information that can be attached to a node, -such as it being emphasized, in code font, or a link. It has a -type and optionally a set of attributes that provide further -information (such as the target of the link). Marks are created -through a `Schema`, which controls which types exist and which -attributes they have. -*/ -class Mark { - /** - @internal - */ - constructor( - /** - The type of this mark. - */ - type, - /** - The attributes associated with this mark. - */ - attrs) { - this.type = type; - this.attrs = attrs; - } - /** - Given a set of marks, create a new set which contains this one as - well, in the right position. If this mark is already in the set, - the set itself is returned. If any marks that are set to be - [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present, - those are replaced by this one. - */ - addToSet(set) { - let copy, placed = false; - for (let i = 0; i < set.length; i++) { - let other = set[i]; - if (this.eq(other)) - return set; - if (this.type.excludes(other.type)) { - if (!copy) - copy = set.slice(0, i); - } - else if (other.type.excludes(this.type)) { - return set; - } - else { - if (!placed && other.type.rank > this.type.rank) { - if (!copy) - copy = set.slice(0, i); - copy.push(this); - placed = true; - } - if (copy) - copy.push(other); - } - } - if (!copy) - copy = set.slice(); - if (!placed) - copy.push(this); - return copy; - } - /** - Remove this mark from the given set, returning a new set. If this - mark is not in the set, the set itself is returned. - */ - removeFromSet(set) { - for (let i = 0; i < set.length; i++) - if (this.eq(set[i])) - return set.slice(0, i).concat(set.slice(i + 1)); - return set; - } - /** - Test whether this mark is in the given set of marks. - */ - isInSet(set) { - for (let i = 0; i < set.length; i++) - if (this.eq(set[i])) - return true; - return false; - } - /** - Test whether this mark has the same type and attributes as - another mark. - */ - eq(other) { - return this == other || - (this.type == other.type && compareDeep(this.attrs, other.attrs)); - } - /** - Convert this mark to a JSON-serializeable representation. - */ - toJSON() { - let obj = { type: this.type.name }; - for (let _ in this.attrs) { - obj.attrs = this.attrs; - break; - } - return obj; - } - /** - Deserialize a mark from JSON. - */ - static fromJSON(schema, json) { - if (!json) - throw new RangeError("Invalid input for Mark.fromJSON"); - let type = schema.marks[json.type]; - if (!type) - throw new RangeError(`There is no mark type ${json.type} in this schema`); - let mark = type.create(json.attrs); - type.checkAttrs(mark.attrs); - return mark; - } - /** - Test whether two sets of marks are identical. - */ - static sameSet(a, b) { - if (a == b) - return true; - if (a.length != b.length) - return false; - for (let i = 0; i < a.length; i++) - if (!a[i].eq(b[i])) - return false; - return true; - } - /** - Create a properly sorted mark set from null, a single mark, or an - unsorted array of marks. - */ - static setFrom(marks) { - if (!marks || Array.isArray(marks) && marks.length == 0) - return Mark.none; - if (marks instanceof Mark) - return [marks]; - let copy = marks.slice(); - copy.sort((a, b) => a.type.rank - b.type.rank); - return copy; - } -} -/** -The empty set of marks. -*/ -Mark.none = []; - -/** -Error type raised by [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) when -given an invalid replacement. -*/ -class ReplaceError extends Error { -} -/* -ReplaceError = function(this: any, message: string) { - let err = Error.call(this, message) - ;(err as any).__proto__ = ReplaceError.prototype - return err -} as any - -ReplaceError.prototype = Object.create(Error.prototype) -ReplaceError.prototype.constructor = ReplaceError -ReplaceError.prototype.name = "ReplaceError" -*/ -/** -A slice represents a piece cut out of a larger document. It -stores not only a fragment, but also the depth up to which nodes on -both side are ‘open’ (cut through). -*/ -class Slice { - /** - Create a slice. When specifying a non-zero open depth, you must - make sure that there are nodes of at least that depth at the - appropriate side of the fragment—i.e. if the fragment is an - empty paragraph node, `openStart` and `openEnd` can't be greater - than 1. - - It is not necessary for the content of open nodes to conform to - the schema's content constraints, though it should be a valid - start/end/middle for such a node, depending on which sides are - open. - */ - constructor( - /** - The slice's content. - */ - content, - /** - The open depth at the start of the fragment. - */ - openStart, - /** - The open depth at the end. - */ - openEnd) { - this.content = content; - this.openStart = openStart; - this.openEnd = openEnd; - } - /** - The size this slice would add when inserted into a document. - */ - get size() { - return this.content.size - this.openStart - this.openEnd; - } - /** - @internal - */ - insertAt(pos, fragment) { - let content = insertInto(this.content, pos + this.openStart, fragment); - return content && new Slice(content, this.openStart, this.openEnd); - } - /** - @internal - */ - removeBetween(from, to) { - return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd); - } - /** - Tests whether this slice is equal to another slice. - */ - eq(other) { - return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd; - } - /** - @internal - */ - toString() { - return this.content + "(" + this.openStart + "," + this.openEnd + ")"; - } - /** - Convert a slice to a JSON-serializable representation. - */ - toJSON() { - if (!this.content.size) - return null; - let json = { content: this.content.toJSON() }; - if (this.openStart > 0) - json.openStart = this.openStart; - if (this.openEnd > 0) - json.openEnd = this.openEnd; - return json; - } - /** - Deserialize a slice from its JSON representation. - */ - static fromJSON(schema, json) { - if (!json) - return Slice.empty; - let openStart = json.openStart || 0, openEnd = json.openEnd || 0; - if (typeof openStart != "number" || typeof openEnd != "number") - throw new RangeError("Invalid input for Slice.fromJSON"); - return new Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd); - } - /** - Create a slice from a fragment by taking the maximum possible - open value on both side of the fragment. - */ - static maxOpen(fragment, openIsolating = true) { - let openStart = 0, openEnd = 0; - for (let n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild) - openStart++; - for (let n = fragment.lastChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.lastChild) - openEnd++; - return new Slice(fragment, openStart, openEnd); - } -} -/** -The empty slice. -*/ -Slice.empty = new Slice(Fragment.empty, 0, 0); -function removeRange(content, from, to) { - let { index, offset } = content.findIndex(from), child = content.maybeChild(index); - let { index: indexTo, offset: offsetTo } = content.findIndex(to); - if (offset == from || child.isText) { - if (offsetTo != to && !content.child(indexTo).isText) - throw new RangeError("Removing non-flat range"); - return content.cut(0, from).append(content.cut(to)); - } - if (index != indexTo) - throw new RangeError("Removing non-flat range"); - return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1))); -} -function insertInto(content, dist, insert, parent) { - let { index, offset } = content.findIndex(dist), child = content.maybeChild(index); - if (offset == dist || child.isText) { - return content.cut(0, dist).append(insert).append(content.cut(dist)); - } - let inner = insertInto(child.content, dist - offset - 1, insert); - return inner && content.replaceChild(index, child.copy(inner)); -} -function replace($from, $to, slice) { - if (slice.openStart > $from.depth) - throw new ReplaceError("Inserted content deeper than insertion position"); - if ($from.depth - slice.openStart != $to.depth - slice.openEnd) - throw new ReplaceError("Inconsistent open depths"); - return replaceOuter($from, $to, slice, 0); -} -function replaceOuter($from, $to, slice, depth) { - let index = $from.index(depth), node = $from.node(depth); - if (index == $to.index(depth) && depth < $from.depth - slice.openStart) { - let inner = replaceOuter($from, $to, slice, depth + 1); - return node.copy(node.content.replaceChild(index, inner)); - } - else if (!slice.content.size) { - return close(node, replaceTwoWay($from, $to, depth)); - } - else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { // Simple, flat case - let parent = $from.parent, content = parent.content; - return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset))); - } - else { - let { start, end } = prepareSliceForReplace(slice, $from); - return close(node, replaceThreeWay($from, start, end, $to, depth)); - } -} -function checkJoin(main, sub) { - if (!sub.type.compatibleContent(main.type)) - throw new ReplaceError("Cannot join " + sub.type.name + " onto " + main.type.name); -} -function joinable($before, $after, depth) { - let node = $before.node(depth); - checkJoin(node, $after.node(depth)); - return node; -} -function addNode(child, target) { - let last = target.length - 1; - if (last >= 0 && child.isText && child.sameMarkup(target[last])) - target[last] = child.withText(target[last].text + child.text); - else - target.push(child); -} -function addRange($start, $end, depth, target) { - let node = ($end || $start).node(depth); - let startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount; - if ($start) { - startIndex = $start.index(depth); - if ($start.depth > depth) { - startIndex++; - } - else if ($start.textOffset) { - addNode($start.nodeAfter, target); - startIndex++; - } - } - for (let i = startIndex; i < endIndex; i++) - addNode(node.child(i), target); - if ($end && $end.depth == depth && $end.textOffset) - addNode($end.nodeBefore, target); -} -function close(node, content) { - node.type.checkContent(content); - return node.copy(content); -} -function replaceThreeWay($from, $start, $end, $to, depth) { - let openStart = $from.depth > depth && joinable($from, $start, depth + 1); - let openEnd = $to.depth > depth && joinable($end, $to, depth + 1); - let content = []; - addRange(null, $from, depth, content); - if (openStart && openEnd && $start.index(depth) == $end.index(depth)) { - checkJoin(openStart, openEnd); - addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content); - } - else { - if (openStart) - addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content); - addRange($start, $end, depth, content); - if (openEnd) - addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content); - } - addRange($to, null, depth, content); - return new Fragment(content); -} -function replaceTwoWay($from, $to, depth) { - let content = []; - addRange(null, $from, depth, content); - if ($from.depth > depth) { - let type = joinable($from, $to, depth + 1); - addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content); - } - addRange($to, null, depth, content); - return new Fragment(content); -} -function prepareSliceForReplace(slice, $along) { - let extra = $along.depth - slice.openStart, parent = $along.node(extra); - let node = parent.copy(slice.content); - for (let i = extra - 1; i >= 0; i--) - node = $along.node(i).copy(Fragment.from(node)); - return { start: node.resolveNoCache(slice.openStart + extra), - end: node.resolveNoCache(node.content.size - slice.openEnd - extra) }; -} - -/** -You can [_resolve_](https://prosemirror.net/docs/ref/#model.Node.resolve) a position to get more -information about it. Objects of this class represent such a -resolved position, providing various pieces of context -information, and some helper methods. - -Throughout this interface, methods that take an optional `depth` -parameter will interpret undefined as `this.depth` and negative -numbers as `this.depth + value`. -*/ -class ResolvedPos { - /** - @internal - */ - constructor( - /** - The position that was resolved. - */ - pos, - /** - @internal - */ - path, - /** - The offset this position has into its parent node. - */ - parentOffset) { - this.pos = pos; - this.path = path; - this.parentOffset = parentOffset; - this.depth = path.length / 3 - 1; - } - /** - @internal - */ - resolveDepth(val) { - if (val == null) - return this.depth; - if (val < 0) - return this.depth + val; - return val; - } - /** - The parent node that the position points into. Note that even if - a position points into a text node, that node is not considered - the parent—text nodes are ‘flat’ in this model, and have no content. - */ - get parent() { return this.node(this.depth); } - /** - The root node in which the position was resolved. - */ - get doc() { return this.node(0); } - /** - The ancestor node at the given level. `p.node(p.depth)` is the - same as `p.parent`. - */ - node(depth) { return this.path[this.resolveDepth(depth) * 3]; } - /** - The index into the ancestor at the given level. If this points - at the 3rd node in the 2nd paragraph on the top level, for - example, `p.index(0)` is 1 and `p.index(1)` is 2. - */ - index(depth) { return this.path[this.resolveDepth(depth) * 3 + 1]; } - /** - The index pointing after this position into the ancestor at the - given level. - */ - indexAfter(depth) { - depth = this.resolveDepth(depth); - return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1); - } - /** - The (absolute) position at the start of the node at the given - level. - */ - start(depth) { - depth = this.resolveDepth(depth); - return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; - } - /** - The (absolute) position at the end of the node at the given - level. - */ - end(depth) { - depth = this.resolveDepth(depth); - return this.start(depth) + this.node(depth).content.size; - } - /** - The (absolute) position directly before the wrapping node at the - given level, or, when `depth` is `this.depth + 1`, the original - position. - */ - before(depth) { - depth = this.resolveDepth(depth); - if (!depth) - throw new RangeError("There is no position before the top-level node"); - return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1]; - } - /** - The (absolute) position directly after the wrapping node at the - given level, or the original position when `depth` is `this.depth + 1`. - */ - after(depth) { - depth = this.resolveDepth(depth); - if (!depth) - throw new RangeError("There is no position after the top-level node"); - return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize; - } - /** - When this position points into a text node, this returns the - distance between the position and the start of the text node. - Will be zero for positions that point between nodes. - */ - get textOffset() { return this.pos - this.path[this.path.length - 1]; } - /** - Get the node directly after the position, if any. If the position - points into a text node, only the part of that node after the - position is returned. - */ - get nodeAfter() { - let parent = this.parent, index = this.index(this.depth); - if (index == parent.childCount) - return null; - let dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index); - return dOff ? parent.child(index).cut(dOff) : child; - } - /** - Get the node directly before the position, if any. If the - position points into a text node, only the part of that node - before the position is returned. - */ - get nodeBefore() { - let index = this.index(this.depth); - let dOff = this.pos - this.path[this.path.length - 1]; - if (dOff) - return this.parent.child(index).cut(0, dOff); - return index == 0 ? null : this.parent.child(index - 1); - } - /** - Get the position at the given index in the parent node at the - given depth (which defaults to `this.depth`). - */ - posAtIndex(index, depth) { - depth = this.resolveDepth(depth); - let node = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; - for (let i = 0; i < index; i++) - pos += node.child(i).nodeSize; - return pos; - } - /** - Get the marks at this position, factoring in the surrounding - marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the - position is at the start of a non-empty node, the marks of the - node after it (if any) are returned. - */ - marks() { - let parent = this.parent, index = this.index(); - // In an empty parent, return the empty array - if (parent.content.size == 0) - return Mark.none; - // When inside a text node, just return the text node's marks - if (this.textOffset) - return parent.child(index).marks; - let main = parent.maybeChild(index - 1), other = parent.maybeChild(index); - // If the `after` flag is true of there is no node before, make - // the node after this position the main reference. - if (!main) { - let tmp = main; - main = other; - other = tmp; - } - // Use all marks in the main node, except those that have - // `inclusive` set to false and are not present in the other node. - let marks = main.marks; - for (var i = 0; i < marks.length; i++) - if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks))) - marks = marks[i--].removeFromSet(marks); - return marks; - } - /** - Get the marks after the current position, if any, except those - that are non-inclusive and not present at position `$end`. This - is mostly useful for getting the set of marks to preserve after a - deletion. Will return `null` if this position is at the end of - its parent node or its parent node isn't a textblock (in which - case no marks should be preserved). - */ - marksAcross($end) { - let after = this.parent.maybeChild(this.index()); - if (!after || !after.isInline) - return null; - let marks = after.marks, next = $end.parent.maybeChild($end.index()); - for (var i = 0; i < marks.length; i++) - if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks))) - marks = marks[i--].removeFromSet(marks); - return marks; - } - /** - The depth up to which this position and the given (non-resolved) - position share the same parent nodes. - */ - sharedDepth(pos) { - for (let depth = this.depth; depth > 0; depth--) - if (this.start(depth) <= pos && this.end(depth) >= pos) - return depth; - return 0; - } - /** - Returns a range based on the place where this position and the - given position diverge around block content. If both point into - the same textblock, for example, a range around that textblock - will be returned. If they point into different blocks, the range - around those blocks in their shared ancestor is returned. You can - pass in an optional predicate that will be called with a parent - node to see if a range into that parent is acceptable. - */ - blockRange(other = this, pred) { - if (other.pos < this.pos) - return other.blockRange(this); - for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--) - if (other.pos <= this.end(d) && (!pred || pred(this.node(d)))) - return new NodeRange(this, other, d); - return null; - } - /** - Query whether the given position shares the same parent node. - */ - sameParent(other) { - return this.pos - this.parentOffset == other.pos - other.parentOffset; - } - /** - Return the greater of this and the given position. - */ - max(other) { - return other.pos > this.pos ? other : this; - } - /** - Return the smaller of this and the given position. - */ - min(other) { - return other.pos < this.pos ? other : this; - } - /** - @internal - */ - toString() { - let str = ""; - for (let i = 1; i <= this.depth; i++) - str += (str ? "/" : "") + this.node(i).type.name + "_" + this.index(i - 1); - return str + ":" + this.parentOffset; - } - /** - @internal - */ - static resolve(doc, pos) { - if (!(pos >= 0 && pos <= doc.content.size)) - throw new RangeError("Position " + pos + " out of range"); - let path = []; - let start = 0, parentOffset = pos; - for (let node = doc;;) { - let { index, offset } = node.content.findIndex(parentOffset); - let rem = parentOffset - offset; - path.push(node, index, start + offset); - if (!rem) - break; - node = node.child(index); - if (node.isText) - break; - parentOffset = rem - 1; - start += offset + 1; - } - return new ResolvedPos(pos, path, parentOffset); - } - /** - @internal - */ - static resolveCached(doc, pos) { - let cache = resolveCache.get(doc); - if (cache) { - for (let i = 0; i < cache.elts.length; i++) { - let elt = cache.elts[i]; - if (elt.pos == pos) - return elt; - } - } - else { - resolveCache.set(doc, cache = new ResolveCache); - } - let result = cache.elts[cache.i] = ResolvedPos.resolve(doc, pos); - cache.i = (cache.i + 1) % resolveCacheSize; - return result; - } -} -class ResolveCache { - constructor() { - this.elts = []; - this.i = 0; - } -} -const resolveCacheSize = 12, resolveCache = new WeakMap(); -/** -Represents a flat range of content, i.e. one that starts and -ends in the same node. -*/ -class NodeRange { - /** - Construct a node range. `$from` and `$to` should point into the - same node until at least the given `depth`, since a node range - denotes an adjacent set of nodes in a single parent node. - */ - constructor( - /** - A resolved position along the start of the content. May have a - `depth` greater than this object's `depth` property, since - these are the positions that were used to compute the range, - not re-resolved positions directly at its boundaries. - */ - $from, - /** - A position along the end of the content. See - caveat for [`$from`](https://prosemirror.net/docs/ref/#model.NodeRange.$from). - */ - $to, - /** - The depth of the node that this range points into. - */ - depth) { - this.$from = $from; - this.$to = $to; - this.depth = depth; - } - /** - The position at the start of the range. - */ - get start() { return this.$from.before(this.depth + 1); } - /** - The position at the end of the range. - */ - get end() { return this.$to.after(this.depth + 1); } - /** - The parent node that the range points into. - */ - get parent() { return this.$from.node(this.depth); } - /** - The start index of the range in the parent node. - */ - get startIndex() { return this.$from.index(this.depth); } - /** - The end index of the range in the parent node. - */ - get endIndex() { return this.$to.indexAfter(this.depth); } -} - -const emptyAttrs = Object.create(null); -/** -This class represents a node in the tree that makes up a -ProseMirror document. So a document is an instance of `Node`, with -children that are also instances of `Node`. - -Nodes are persistent data structures. Instead of changing them, you -create new ones with the content you want. Old ones keep pointing -at the old document shape. This is made cheaper by sharing -structure between the old and new data as much as possible, which a -tree shape like this (without back pointers) makes easy. - -**Do not** directly mutate the properties of a `Node` object. See -[the guide](https://prosemirror.net/docs/guide/#doc) for more information. -*/ -class Node { - /** - @internal - */ - constructor( - /** - The type of node that this is. - */ - type, - /** - An object mapping attribute names to values. The kind of - attributes allowed and required are - [determined](https://prosemirror.net/docs/ref/#model.NodeSpec.attrs) by the node type. - */ - attrs, - // A fragment holding the node's children. - content, - /** - The marks (things like whether it is emphasized or part of a - link) applied to this node. - */ - marks = Mark.none) { - this.type = type; - this.attrs = attrs; - this.marks = marks; - this.content = content || Fragment.empty; - } - /** - The array of this node's child nodes. - */ - get children() { return this.content.content; } - /** - The size of this node, as defined by the integer-based [indexing - scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the - amount of characters. For other leaf nodes, it is one. For - non-leaf nodes, it is the size of the content plus two (the - start and end token). - */ - get nodeSize() { return this.isLeaf ? 1 : 2 + this.content.size; } - /** - The number of children that the node has. - */ - get childCount() { return this.content.childCount; } - /** - Get the child node at the given index. Raises an error when the - index is out of range. - */ - child(index) { return this.content.child(index); } - /** - Get the child node at the given index, if it exists. - */ - maybeChild(index) { return this.content.maybeChild(index); } - /** - Call `f` for every child node, passing the node, its offset - into this parent node, and its index. - */ - forEach(f) { this.content.forEach(f); } - /** - Invoke a callback for all descendant nodes recursively between - the given two positions that are relative to start of this - node's content. The callback is invoked with the node, its - position relative to the original node (method receiver), - its parent node, and its child index. When the callback returns - false for a given node, that node's children will not be - recursed over. The last parameter can be used to specify a - starting position to count from. - */ - nodesBetween(from, to, f, startPos = 0) { - this.content.nodesBetween(from, to, f, startPos, this); - } - /** - Call the given callback for every descendant node. Doesn't - descend into a node when the callback returns `false`. - */ - descendants(f) { - this.nodesBetween(0, this.content.size, f); - } - /** - Concatenates all the text nodes found in this fragment and its - children. - */ - get textContent() { - return (this.isLeaf && this.type.spec.leafText) - ? this.type.spec.leafText(this) - : this.textBetween(0, this.content.size, ""); - } - /** - Get all text between positions `from` and `to`. When - `blockSeparator` is given, it will be inserted to separate text - from different block nodes. If `leafText` is given, it'll be - inserted for every non-text leaf node encountered, otherwise - [`leafText`](https://prosemirror.net/docs/ref/#model.NodeSpec^leafText) will be used. - */ - textBetween(from, to, blockSeparator, leafText) { - return this.content.textBetween(from, to, blockSeparator, leafText); - } - /** - Returns this node's first child, or `null` if there are no - children. - */ - get firstChild() { return this.content.firstChild; } - /** - Returns this node's last child, or `null` if there are no - children. - */ - get lastChild() { return this.content.lastChild; } - /** - Test whether two nodes represent the same piece of document. - */ - eq(other) { - return this == other || (this.sameMarkup(other) && this.content.eq(other.content)); - } - /** - Compare the markup (type, attributes, and marks) of this node to - those of another. Returns `true` if both have the same markup. - */ - sameMarkup(other) { - return this.hasMarkup(other.type, other.attrs, other.marks); - } - /** - Check whether this node's markup correspond to the given type, - attributes, and marks. - */ - hasMarkup(type, attrs, marks) { - return this.type == type && - compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) && - Mark.sameSet(this.marks, marks || Mark.none); - } - /** - Create a new node with the same markup as this node, containing - the given content (or empty, if no content is given). - */ - copy(content = null) { - if (content == this.content) - return this; - return new Node(this.type, this.attrs, content, this.marks); - } - /** - Create a copy of this node, with the given set of marks instead - of the node's own marks. - */ - mark(marks) { - return marks == this.marks ? this : new Node(this.type, this.attrs, this.content, marks); - } - /** - Create a copy of this node with only the content between the - given positions. If `to` is not given, it defaults to the end of - the node. - */ - cut(from, to = this.content.size) { - if (from == 0 && to == this.content.size) - return this; - return this.copy(this.content.cut(from, to)); - } - /** - Cut out the part of the document between the given positions, and - return it as a `Slice` object. - */ - slice(from, to = this.content.size, includeParents = false) { - if (from == to) - return Slice.empty; - let $from = this.resolve(from), $to = this.resolve(to); - let depth = includeParents ? 0 : $from.sharedDepth(to); - let start = $from.start(depth), node = $from.node(depth); - let content = node.content.cut($from.pos - start, $to.pos - start); - return new Slice(content, $from.depth - depth, $to.depth - depth); - } - /** - Replace the part of the document between the given positions with - the given slice. The slice must 'fit', meaning its open sides - must be able to connect to the surrounding content, and its - content nodes must be valid children for the node they are placed - into. If any of this is violated, an error of type - [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown. - */ - replace(from, to, slice) { - return replace(this.resolve(from), this.resolve(to), slice); - } - /** - Find the node directly after the given position. - */ - nodeAt(pos) { - for (let node = this;;) { - let { index, offset } = node.content.findIndex(pos); - node = node.maybeChild(index); - if (!node) - return null; - if (offset == pos || node.isText) - return node; - pos -= offset + 1; - } - } - /** - Find the (direct) child node after the given offset, if any, - and return it along with its index and offset relative to this - node. - */ - childAfter(pos) { - let { index, offset } = this.content.findIndex(pos); - return { node: this.content.maybeChild(index), index, offset }; - } - /** - Find the (direct) child node before the given offset, if any, - and return it along with its index and offset relative to this - node. - */ - childBefore(pos) { - if (pos == 0) - return { node: null, index: 0, offset: 0 }; - let { index, offset } = this.content.findIndex(pos); - if (offset < pos) - return { node: this.content.child(index), index, offset }; - let node = this.content.child(index - 1); - return { node, index: index - 1, offset: offset - node.nodeSize }; - } - /** - Resolve the given position in the document, returning an - [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context. - */ - resolve(pos) { return ResolvedPos.resolveCached(this, pos); } - /** - @internal - */ - resolveNoCache(pos) { return ResolvedPos.resolve(this, pos); } - /** - Test whether a given mark or mark type occurs in this document - between the two given positions. - */ - rangeHasMark(from, to, type) { - let found = false; - if (to > from) - this.nodesBetween(from, to, node => { - if (type.isInSet(node.marks)) - found = true; - return !found; - }); - return found; - } - /** - True when this is a block (non-inline node) - */ - get isBlock() { return this.type.isBlock; } - /** - True when this is a textblock node, a block node with inline - content. - */ - get isTextblock() { return this.type.isTextblock; } - /** - True when this node allows inline content. - */ - get inlineContent() { return this.type.inlineContent; } - /** - True when this is an inline node (a text node or a node that can - appear among text). - */ - get isInline() { return this.type.isInline; } - /** - True when this is a text node. - */ - get isText() { return this.type.isText; } - /** - True when this is a leaf node. - */ - get isLeaf() { return this.type.isLeaf; } - /** - True when this is an atom, i.e. when it does not have directly - editable content. This is usually the same as `isLeaf`, but can - be configured with the [`atom` property](https://prosemirror.net/docs/ref/#model.NodeSpec.atom) - on a node's spec (typically used when the node is displayed as - an uneditable [node view](https://prosemirror.net/docs/ref/#view.NodeView)). - */ - get isAtom() { return this.type.isAtom; } - /** - Return a string representation of this node for debugging - purposes. - */ - toString() { - if (this.type.spec.toDebugString) - return this.type.spec.toDebugString(this); - let name = this.type.name; - if (this.content.size) - name += "(" + this.content.toStringInner() + ")"; - return wrapMarks(this.marks, name); - } - /** - Get the content match in this node at the given index. - */ - contentMatchAt(index) { - let match = this.type.contentMatch.matchFragment(this.content, 0, index); - if (!match) - throw new Error("Called contentMatchAt on a node with invalid content"); - return match; - } - /** - Test whether replacing the range between `from` and `to` (by - child index) with the given replacement fragment (which defaults - to the empty fragment) would leave the node's content valid. You - can optionally pass `start` and `end` indices into the - replacement fragment. - */ - canReplace(from, to, replacement = Fragment.empty, start = 0, end = replacement.childCount) { - let one = this.contentMatchAt(from).matchFragment(replacement, start, end); - let two = one && one.matchFragment(this.content, to); - if (!two || !two.validEnd) - return false; - for (let i = start; i < end; i++) - if (!this.type.allowsMarks(replacement.child(i).marks)) - return false; - return true; - } - /** - Test whether replacing the range `from` to `to` (by index) with - a node of the given type would leave the node's content valid. - */ - canReplaceWith(from, to, type, marks) { - if (marks && !this.type.allowsMarks(marks)) - return false; - let start = this.contentMatchAt(from).matchType(type); - let end = start && start.matchFragment(this.content, to); - return end ? end.validEnd : false; - } - /** - Test whether the given node's content could be appended to this - node. If that node is empty, this will only return true if there - is at least one node type that can appear in both nodes (to avoid - merging completely incompatible nodes). - */ - canAppend(other) { - if (other.content.size) - return this.canReplace(this.childCount, this.childCount, other.content); - else - return this.type.compatibleContent(other.type); - } - /** - Check whether this node and its descendants conform to the - schema, and raise an exception when they do not. - */ - check() { - this.type.checkContent(this.content); - this.type.checkAttrs(this.attrs); - let copy = Mark.none; - for (let i = 0; i < this.marks.length; i++) { - let mark = this.marks[i]; - mark.type.checkAttrs(mark.attrs); - copy = mark.addToSet(copy); - } - if (!Mark.sameSet(copy, this.marks)) - throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(m => m.type.name)}`); - this.content.forEach(node => node.check()); - } - /** - Return a JSON-serializeable representation of this node. - */ - toJSON() { - let obj = { type: this.type.name }; - for (let _ in this.attrs) { - obj.attrs = this.attrs; - break; - } - if (this.content.size) - obj.content = this.content.toJSON(); - if (this.marks.length) - obj.marks = this.marks.map(n => n.toJSON()); - return obj; - } - /** - Deserialize a node from its JSON representation. - */ - static fromJSON(schema, json) { - if (!json) - throw new RangeError("Invalid input for Node.fromJSON"); - let marks = undefined; - if (json.marks) { - if (!Array.isArray(json.marks)) - throw new RangeError("Invalid mark data for Node.fromJSON"); - marks = json.marks.map(schema.markFromJSON); - } - if (json.type == "text") { - if (typeof json.text != "string") - throw new RangeError("Invalid text node in JSON"); - return schema.text(json.text, marks); - } - let content = Fragment.fromJSON(schema, json.content); - let node = schema.nodeType(json.type).create(json.attrs, content, marks); - node.type.checkAttrs(node.attrs); - return node; - } -} -Node.prototype.text = undefined; -class TextNode extends Node { - /** - @internal - */ - constructor(type, attrs, content, marks) { - super(type, attrs, null, marks); - if (!content) - throw new RangeError("Empty text nodes are not allowed"); - this.text = content; - } - toString() { - if (this.type.spec.toDebugString) - return this.type.spec.toDebugString(this); - return wrapMarks(this.marks, JSON.stringify(this.text)); - } - get textContent() { return this.text; } - textBetween(from, to) { return this.text.slice(from, to); } - get nodeSize() { return this.text.length; } - mark(marks) { - return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks); - } - withText(text) { - if (text == this.text) - return this; - return new TextNode(this.type, this.attrs, text, this.marks); - } - cut(from = 0, to = this.text.length) { - if (from == 0 && to == this.text.length) - return this; - return this.withText(this.text.slice(from, to)); - } - eq(other) { - return this.sameMarkup(other) && this.text == other.text; - } - toJSON() { - let base = super.toJSON(); - base.text = this.text; - return base; - } -} -function wrapMarks(marks, str) { - for (let i = marks.length - 1; i >= 0; i--) - str = marks[i].type.name + "(" + str + ")"; - return str; -} - -/** -Instances of this class represent a match state of a node type's -[content expression](https://prosemirror.net/docs/ref/#model.NodeSpec.content), and can be used to -find out whether further content matches here, and whether a given -position is a valid end of the node. -*/ -class ContentMatch { - /** - @internal - */ - constructor( - /** - True when this match state represents a valid end of the node. - */ - validEnd) { - this.validEnd = validEnd; - /** - @internal - */ - this.next = []; - /** - @internal - */ - this.wrapCache = []; - } - /** - @internal - */ - static parse(string, nodeTypes) { - let stream = new TokenStream(string, nodeTypes); - if (stream.next == null) - return ContentMatch.empty; - let expr = parseExpr(stream); - if (stream.next) - stream.err("Unexpected trailing text"); - let match = dfa(nfa(expr)); - checkForDeadEnds(match, stream); - return match; - } - /** - Match a node type, returning a match after that node if - successful. - */ - matchType(type) { - for (let i = 0; i < this.next.length; i++) - if (this.next[i].type == type) - return this.next[i].next; - return null; - } - /** - Try to match a fragment. Returns the resulting match when - successful. - */ - matchFragment(frag, start = 0, end = frag.childCount) { - let cur = this; - for (let i = start; cur && i < end; i++) - cur = cur.matchType(frag.child(i).type); - return cur; - } - /** - @internal - */ - get inlineContent() { - return this.next.length != 0 && this.next[0].type.isInline; - } - /** - Get the first matching node type at this match position that can - be generated. - */ - get defaultType() { - for (let i = 0; i < this.next.length; i++) { - let { type } = this.next[i]; - if (!(type.isText || type.hasRequiredAttrs())) - return type; - } - return null; - } - /** - @internal - */ - compatible(other) { - for (let i = 0; i < this.next.length; i++) - for (let j = 0; j < other.next.length; j++) - if (this.next[i].type == other.next[j].type) - return true; - return false; - } - /** - Try to match the given fragment, and if that fails, see if it can - be made to match by inserting nodes in front of it. When - successful, return a fragment of inserted nodes (which may be - empty if nothing had to be inserted). When `toEnd` is true, only - return a fragment if the resulting match goes to the end of the - content expression. - */ - fillBefore(after, toEnd = false, startIndex = 0) { - let seen = [this]; - function search(match, types) { - let finished = match.matchFragment(after, startIndex); - if (finished && (!toEnd || finished.validEnd)) - return Fragment.from(types.map(tp => tp.createAndFill())); - for (let i = 0; i < match.next.length; i++) { - let { type, next } = match.next[i]; - if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) { - seen.push(next); - let found = search(next, types.concat(type)); - if (found) - return found; - } - } - return null; - } - return search(this, []); - } - /** - Find a set of wrapping node types that would allow a node of the - given type to appear at this position. The result may be empty - (when it fits directly) and will be null when no such wrapping - exists. - */ - findWrapping(target) { - for (let i = 0; i < this.wrapCache.length; i += 2) - if (this.wrapCache[i] == target) - return this.wrapCache[i + 1]; - let computed = this.computeWrapping(target); - this.wrapCache.push(target, computed); - return computed; - } - /** - @internal - */ - computeWrapping(target) { - let seen = Object.create(null), active = [{ match: this, type: null, via: null }]; - while (active.length) { - let current = active.shift(), match = current.match; - if (match.matchType(target)) { - let result = []; - for (let obj = current; obj.type; obj = obj.via) - result.push(obj.type); - return result.reverse(); - } - for (let i = 0; i < match.next.length; i++) { - let { type, next } = match.next[i]; - if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) { - active.push({ match: type.contentMatch, type, via: current }); - seen[type.name] = true; - } - } - } - return null; - } - /** - The number of outgoing edges this node has in the finite - automaton that describes the content expression. - */ - get edgeCount() { - return this.next.length; - } - /** - Get the _n_​th outgoing edge from this node in the finite - automaton that describes the content expression. - */ - edge(n) { - if (n >= this.next.length) - throw new RangeError(`There's no ${n}th edge in this content match`); - return this.next[n]; - } - /** - @internal - */ - toString() { - let seen = []; - function scan(m) { - seen.push(m); - for (let i = 0; i < m.next.length; i++) - if (seen.indexOf(m.next[i].next) == -1) - scan(m.next[i].next); - } - scan(this); - return seen.map((m, i) => { - let out = i + (m.validEnd ? "*" : " ") + " "; - for (let i = 0; i < m.next.length; i++) - out += (i ? ", " : "") + m.next[i].type.name + "->" + seen.indexOf(m.next[i].next); - return out; - }).join("\n"); - } -} -/** -@internal -*/ -ContentMatch.empty = new ContentMatch(true); -class TokenStream { - constructor(string, nodeTypes) { - this.string = string; - this.nodeTypes = nodeTypes; - this.inline = null; - this.pos = 0; - this.tokens = string.split(/\s*(?=\b|\W|$)/); - if (this.tokens[this.tokens.length - 1] == "") - this.tokens.pop(); - if (this.tokens[0] == "") - this.tokens.shift(); - } - get next() { return this.tokens[this.pos]; } - eat(tok) { return this.next == tok && (this.pos++ || true); } - err(str) { throw new SyntaxError(str + " (in content expression '" + this.string + "')"); } -} -function parseExpr(stream) { - let exprs = []; - do { - exprs.push(parseExprSeq(stream)); - } while (stream.eat("|")); - return exprs.length == 1 ? exprs[0] : { type: "choice", exprs }; -} -function parseExprSeq(stream) { - let exprs = []; - do { - exprs.push(parseExprSubscript(stream)); - } while (stream.next && stream.next != ")" && stream.next != "|"); - return exprs.length == 1 ? exprs[0] : { type: "seq", exprs }; -} -function parseExprSubscript(stream) { - let expr = parseExprAtom(stream); - for (;;) { - if (stream.eat("+")) - expr = { type: "plus", expr }; - else if (stream.eat("*")) - expr = { type: "star", expr }; - else if (stream.eat("?")) - expr = { type: "opt", expr }; - else if (stream.eat("{")) - expr = parseExprRange(stream, expr); - else - break; - } - return expr; -} -function parseNum(stream) { - if (/\D/.test(stream.next)) - stream.err("Expected number, got '" + stream.next + "'"); - let result = Number(stream.next); - stream.pos++; - return result; -} -function parseExprRange(stream, expr) { - let min = parseNum(stream), max = min; - if (stream.eat(",")) { - if (stream.next != "}") - max = parseNum(stream); - else - max = -1; - } - if (!stream.eat("}")) - stream.err("Unclosed braced range"); - return { type: "range", min, max, expr }; -} -function resolveName(stream, name) { - let types = stream.nodeTypes, type = types[name]; - if (type) - return [type]; - let result = []; - for (let typeName in types) { - let type = types[typeName]; - if (type.isInGroup(name)) - result.push(type); - } - if (result.length == 0) - stream.err("No node type or group '" + name + "' found"); - return result; -} -function parseExprAtom(stream) { - if (stream.eat("(")) { - let expr = parseExpr(stream); - if (!stream.eat(")")) - stream.err("Missing closing paren"); - return expr; - } - else if (!/\W/.test(stream.next)) { - let exprs = resolveName(stream, stream.next).map(type => { - if (stream.inline == null) - stream.inline = type.isInline; - else if (stream.inline != type.isInline) - stream.err("Mixing inline and block content"); - return { type: "name", value: type }; - }); - stream.pos++; - return exprs.length == 1 ? exprs[0] : { type: "choice", exprs }; - } - else { - stream.err("Unexpected token '" + stream.next + "'"); - } -} -// Construct an NFA from an expression as returned by the parser. The -// NFA is represented as an array of states, which are themselves -// arrays of edges, which are `{term, to}` objects. The first state is -// the entry state and the last node is the success state. -// -// Note that unlike typical NFAs, the edge ordering in this one is -// significant, in that it is used to contruct filler content when -// necessary. -function nfa(expr) { - let nfa = [[]]; - connect(compile(expr, 0), node()); - return nfa; - function node() { return nfa.push([]) - 1; } - function edge(from, to, term) { - let edge = { term, to }; - nfa[from].push(edge); - return edge; - } - function connect(edges, to) { - edges.forEach(edge => edge.to = to); - } - function compile(expr, from) { - if (expr.type == "choice") { - return expr.exprs.reduce((out, expr) => out.concat(compile(expr, from)), []); - } - else if (expr.type == "seq") { - for (let i = 0;; i++) { - let next = compile(expr.exprs[i], from); - if (i == expr.exprs.length - 1) - return next; - connect(next, from = node()); - } - } - else if (expr.type == "star") { - let loop = node(); - edge(from, loop); - connect(compile(expr.expr, loop), loop); - return [edge(loop)]; - } - else if (expr.type == "plus") { - let loop = node(); - connect(compile(expr.expr, from), loop); - connect(compile(expr.expr, loop), loop); - return [edge(loop)]; - } - else if (expr.type == "opt") { - return [edge(from)].concat(compile(expr.expr, from)); - } - else if (expr.type == "range") { - let cur = from; - for (let i = 0; i < expr.min; i++) { - let next = node(); - connect(compile(expr.expr, cur), next); - cur = next; - } - if (expr.max == -1) { - connect(compile(expr.expr, cur), cur); - } - else { - for (let i = expr.min; i < expr.max; i++) { - let next = node(); - edge(cur, next); - connect(compile(expr.expr, cur), next); - cur = next; - } - } - return [edge(cur)]; - } - else if (expr.type == "name") { - return [edge(from, undefined, expr.value)]; - } - else { - throw new Error("Unknown expr type"); - } - } -} -function cmp(a, b) { return b - a; } -// Get the set of nodes reachable by null edges from `node`. Omit -// nodes with only a single null-out-edge, since they may lead to -// needless duplicated nodes. -function nullFrom(nfa, node) { - let result = []; - scan(node); - return result.sort(cmp); - function scan(node) { - let edges = nfa[node]; - if (edges.length == 1 && !edges[0].term) - return scan(edges[0].to); - result.push(node); - for (let i = 0; i < edges.length; i++) { - let { term, to } = edges[i]; - if (!term && result.indexOf(to) == -1) - scan(to); - } - } -} -// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set -// of state objects (`ContentMatch` instances) with transitions -// between them. -function dfa(nfa) { - let labeled = Object.create(null); - return explore(nullFrom(nfa, 0)); - function explore(states) { - let out = []; - states.forEach(node => { - nfa[node].forEach(({ term, to }) => { - if (!term) - return; - let set; - for (let i = 0; i < out.length; i++) - if (out[i][0] == term) - set = out[i][1]; - nullFrom(nfa, to).forEach(node => { - if (!set) - out.push([term, set = []]); - if (set.indexOf(node) == -1) - set.push(node); - }); - }); - }); - let state = labeled[states.join(",")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1); - for (let i = 0; i < out.length; i++) { - let states = out[i][1].sort(cmp); - state.next.push({ type: out[i][0], next: labeled[states.join(",")] || explore(states) }); - } - return state; - } -} -function checkForDeadEnds(match, stream) { - for (let i = 0, work = [match]; i < work.length; i++) { - let state = work[i], dead = !state.validEnd, nodes = []; - for (let j = 0; j < state.next.length; j++) { - let { type, next } = state.next[j]; - nodes.push(type.name); - if (dead && !(type.isText || type.hasRequiredAttrs())) - dead = false; - if (work.indexOf(next) == -1) - work.push(next); - } - if (dead) - stream.err("Only non-generatable nodes (" + nodes.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)"); - } -} - -// For node types where all attrs have a default value (or which don't -// have any attributes), build up a single reusable default attribute -// object, and use it for all nodes that don't specify specific -// attributes. -function defaultAttrs(attrs) { - let defaults = Object.create(null); - for (let attrName in attrs) { - let attr = attrs[attrName]; - if (!attr.hasDefault) - return null; - defaults[attrName] = attr.default; - } - return defaults; -} -function computeAttrs(attrs, value) { - let built = Object.create(null); - for (let name in attrs) { - let given = value && value[name]; - if (given === undefined) { - let attr = attrs[name]; - if (attr.hasDefault) - given = attr.default; - else - throw new RangeError("No value supplied for attribute " + name); - } - built[name] = given; - } - return built; -} -function checkAttrs(attrs, values, type, name) { - for (let name in values) - if (!(name in attrs)) - throw new RangeError(`Unsupported attribute ${name} for ${type} of type ${name}`); - for (let name in attrs) { - let attr = attrs[name]; - if (attr.validate) - attr.validate(values[name]); - } -} -function initAttrs(typeName, attrs) { - let result = Object.create(null); - if (attrs) - for (let name in attrs) - result[name] = new Attribute(typeName, name, attrs[name]); - return result; -} -/** -Node types are objects allocated once per `Schema` and used to -[tag](https://prosemirror.net/docs/ref/#model.Node.type) `Node` instances. They contain information -about the node type, such as its name and what kind of node it -represents. -*/ -class NodeType { - /** - @internal - */ - constructor( - /** - The name the node type has in this schema. - */ - name, - /** - A link back to the `Schema` the node type belongs to. - */ - schema, - /** - The spec that this type is based on - */ - spec) { - this.name = name; - this.schema = schema; - this.spec = spec; - /** - The set of marks allowed in this node. `null` means all marks - are allowed. - */ - this.markSet = null; - this.groups = spec.group ? spec.group.split(" ") : []; - this.attrs = initAttrs(name, spec.attrs); - this.defaultAttrs = defaultAttrs(this.attrs); - this.contentMatch = null; - this.inlineContent = null; - this.isBlock = !(spec.inline || name == "text"); - this.isText = name == "text"; - } - /** - True if this is an inline type. - */ - get isInline() { return !this.isBlock; } - /** - True if this is a textblock type, a block that contains inline - content. - */ - get isTextblock() { return this.isBlock && this.inlineContent; } - /** - True for node types that allow no content. - */ - get isLeaf() { return this.contentMatch == ContentMatch.empty; } - /** - True when this node is an atom, i.e. when it does not have - directly editable content. - */ - get isAtom() { return this.isLeaf || !!this.spec.atom; } - /** - Return true when this node type is part of the given - [group](https://prosemirror.net/docs/ref/#model.NodeSpec.group). - */ - isInGroup(group) { - return this.groups.indexOf(group) > -1; - } - /** - The node type's [whitespace](https://prosemirror.net/docs/ref/#model.NodeSpec.whitespace) option. - */ - get whitespace() { - return this.spec.whitespace || (this.spec.code ? "pre" : "normal"); - } - /** - Tells you whether this node type has any required attributes. - */ - hasRequiredAttrs() { - for (let n in this.attrs) - if (this.attrs[n].isRequired) - return true; - return false; - } - /** - Indicates whether this node allows some of the same content as - the given node type. - */ - compatibleContent(other) { - return this == other || this.contentMatch.compatible(other.contentMatch); - } - /** - @internal - */ - computeAttrs(attrs) { - if (!attrs && this.defaultAttrs) - return this.defaultAttrs; - else - return computeAttrs(this.attrs, attrs); - } - /** - Create a `Node` of this type. The given attributes are - checked and defaulted (you can pass `null` to use the type's - defaults entirely, if no required attributes exist). `content` - may be a `Fragment`, a node, an array of nodes, or - `null`. Similarly `marks` may be `null` to default to the empty - set of marks. - */ - create(attrs = null, content, marks) { - if (this.isText) - throw new Error("NodeType.create can't construct text nodes"); - return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks)); - } - /** - Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content - against the node type's content restrictions, and throw an error - if it doesn't match. - */ - createChecked(attrs = null, content, marks) { - content = Fragment.from(content); - this.checkContent(content); - return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks)); - } - /** - Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is - necessary to add nodes to the start or end of the given fragment - to make it fit the node. If no fitting wrapping can be found, - return null. Note that, due to the fact that required nodes can - always be created, this will always succeed if you pass null or - `Fragment.empty` as content. - */ - createAndFill(attrs = null, content, marks) { - attrs = this.computeAttrs(attrs); - content = Fragment.from(content); - if (content.size) { - let before = this.contentMatch.fillBefore(content); - if (!before) - return null; - content = before.append(content); - } - let matched = this.contentMatch.matchFragment(content); - let after = matched && matched.fillBefore(Fragment.empty, true); - if (!after) - return null; - return new Node(this, attrs, content.append(after), Mark.setFrom(marks)); - } - /** - Returns true if the given fragment is valid content for this node - type. - */ - validContent(content) { - let result = this.contentMatch.matchFragment(content); - if (!result || !result.validEnd) - return false; - for (let i = 0; i < content.childCount; i++) - if (!this.allowsMarks(content.child(i).marks)) - return false; - return true; - } - /** - Throws a RangeError if the given fragment is not valid content for this - node type. - @internal - */ - checkContent(content) { - if (!this.validContent(content)) - throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0, 50)}`); - } - /** - @internal - */ - checkAttrs(attrs) { - checkAttrs(this.attrs, attrs, "node", this.name); - } - /** - Check whether the given mark type is allowed in this node. - */ - allowsMarkType(markType) { - return this.markSet == null || this.markSet.indexOf(markType) > -1; - } - /** - Test whether the given set of marks are allowed in this node. - */ - allowsMarks(marks) { - if (this.markSet == null) - return true; - for (let i = 0; i < marks.length; i++) - if (!this.allowsMarkType(marks[i].type)) - return false; - return true; - } - /** - Removes the marks that are not allowed in this node from the given set. - */ - allowedMarks(marks) { - if (this.markSet == null) - return marks; - let copy; - for (let i = 0; i < marks.length; i++) { - if (!this.allowsMarkType(marks[i].type)) { - if (!copy) - copy = marks.slice(0, i); - } - else if (copy) { - copy.push(marks[i]); - } - } - return !copy ? marks : copy.length ? copy : Mark.none; - } - /** - @internal - */ - static compile(nodes, schema) { - let result = Object.create(null); - nodes.forEach((name, spec) => result[name] = new NodeType(name, schema, spec)); - let topType = schema.spec.topNode || "doc"; - if (!result[topType]) - throw new RangeError("Schema is missing its top node type ('" + topType + "')"); - if (!result.text) - throw new RangeError("Every schema needs a 'text' type"); - for (let _ in result.text.attrs) - throw new RangeError("The text node type should not have attributes"); - return result; - } -} -function validateType(typeName, attrName, type) { - let types = type.split("|"); - return (value) => { - let name = value === null ? "null" : typeof value; - if (types.indexOf(name) < 0) - throw new RangeError(`Expected value of type ${types} for attribute ${attrName} on type ${typeName}, got ${name}`); - }; -} -// Attribute descriptors -class Attribute { - constructor(typeName, attrName, options) { - this.hasDefault = Object.prototype.hasOwnProperty.call(options, "default"); - this.default = options.default; - this.validate = typeof options.validate == "string" ? validateType(typeName, attrName, options.validate) : options.validate; - } - get isRequired() { - return !this.hasDefault; - } -} -// Marks -/** -Like nodes, marks (which are associated with nodes to signify -things like emphasis or being part of a link) are -[tagged](https://prosemirror.net/docs/ref/#model.Mark.type) with type objects, which are -instantiated once per `Schema`. -*/ -class MarkType { - /** - @internal - */ - constructor( - /** - The name of the mark type. - */ - name, - /** - @internal - */ - rank, - /** - The schema that this mark type instance is part of. - */ - schema, - /** - The spec on which the type is based. - */ - spec) { - this.name = name; - this.rank = rank; - this.schema = schema; - this.spec = spec; - this.attrs = initAttrs(name, spec.attrs); - this.excluded = null; - let defaults = defaultAttrs(this.attrs); - this.instance = defaults ? new Mark(this, defaults) : null; - } - /** - Create a mark of this type. `attrs` may be `null` or an object - containing only some of the mark's attributes. The others, if - they have defaults, will be added. - */ - create(attrs = null) { - if (!attrs && this.instance) - return this.instance; - return new Mark(this, computeAttrs(this.attrs, attrs)); - } - /** - @internal - */ - static compile(marks, schema) { - let result = Object.create(null), rank = 0; - marks.forEach((name, spec) => result[name] = new MarkType(name, rank++, schema, spec)); - return result; - } - /** - When there is a mark of this type in the given set, a new set - without it is returned. Otherwise, the input set is returned. - */ - removeFromSet(set) { - for (var i = 0; i < set.length; i++) - if (set[i].type == this) { - set = set.slice(0, i).concat(set.slice(i + 1)); - i--; - } - return set; - } - /** - Tests whether there is a mark of this type in the given set. - */ - isInSet(set) { - for (let i = 0; i < set.length; i++) - if (set[i].type == this) - return set[i]; - } - /** - @internal - */ - checkAttrs(attrs) { - checkAttrs(this.attrs, attrs, "mark", this.name); - } - /** - Queries whether a given mark type is - [excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one. - */ - excludes(other) { - return this.excluded.indexOf(other) > -1; - } -} -/** -A document schema. Holds [node](https://prosemirror.net/docs/ref/#model.NodeType) and [mark -type](https://prosemirror.net/docs/ref/#model.MarkType) objects for the nodes and marks that may -occur in conforming documents, and provides functionality for -creating and deserializing such documents. - -When given, the type parameters provide the names of the nodes and -marks in this schema. -*/ -class Schema { - /** - Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec). - */ - constructor(spec) { - /** - The [linebreak - replacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement) node defined - in this schema, if any. - */ - this.linebreakReplacement = null; - /** - An object for storing whatever values modules may want to - compute and cache per schema. (If you want to store something - in it, try to use property names unlikely to clash.) - */ - this.cached = Object.create(null); - let instanceSpec = this.spec = {}; - for (let prop in spec) - instanceSpec[prop] = spec[prop]; - instanceSpec.nodes = OrderedMap.from(spec.nodes), - instanceSpec.marks = OrderedMap.from(spec.marks || {}), - this.nodes = NodeType.compile(this.spec.nodes, this); - this.marks = MarkType.compile(this.spec.marks, this); - let contentExprCache = Object.create(null); - for (let prop in this.nodes) { - if (prop in this.marks) - throw new RangeError(prop + " can not be both a node and a mark"); - let type = this.nodes[prop], contentExpr = type.spec.content || "", markExpr = type.spec.marks; - type.contentMatch = contentExprCache[contentExpr] || - (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes)); - type.inlineContent = type.contentMatch.inlineContent; - if (type.spec.linebreakReplacement) { - if (this.linebreakReplacement) - throw new RangeError("Multiple linebreak nodes defined"); - if (!type.isInline || !type.isLeaf) - throw new RangeError("Linebreak replacement nodes must be inline leaf nodes"); - this.linebreakReplacement = type; - } - type.markSet = markExpr == "_" ? null : - markExpr ? gatherMarks(this, markExpr.split(" ")) : - markExpr == "" || !type.inlineContent ? [] : null; - } - for (let prop in this.marks) { - let type = this.marks[prop], excl = type.spec.excludes; - type.excluded = excl == null ? [type] : excl == "" ? [] : gatherMarks(this, excl.split(" ")); - } - this.nodeFromJSON = this.nodeFromJSON.bind(this); - this.markFromJSON = this.markFromJSON.bind(this); - this.topNodeType = this.nodes[this.spec.topNode || "doc"]; - this.cached.wrappings = Object.create(null); - } - /** - Create a node in this schema. The `type` may be a string or a - `NodeType` instance. Attributes will be extended with defaults, - `content` may be a `Fragment`, `null`, a `Node`, or an array of - nodes. - */ - node(type, attrs = null, content, marks) { - if (typeof type == "string") - type = this.nodeType(type); - else if (!(type instanceof NodeType)) - throw new RangeError("Invalid node type: " + type); - else if (type.schema != this) - throw new RangeError("Node type from different schema used (" + type.name + ")"); - return type.createChecked(attrs, content, marks); - } - /** - Create a text node in the schema. Empty text nodes are not - allowed. - */ - text(text, marks) { - let type = this.nodes.text; - return new TextNode(type, type.defaultAttrs, text, Mark.setFrom(marks)); - } - /** - Create a mark with the given type and attributes. - */ - mark(type, attrs) { - if (typeof type == "string") - type = this.marks[type]; - return type.create(attrs); - } - /** - Deserialize a node from its JSON representation. This method is - bound. - */ - nodeFromJSON(json) { - return Node.fromJSON(this, json); - } - /** - Deserialize a mark from its JSON representation. This method is - bound. - */ - markFromJSON(json) { - return Mark.fromJSON(this, json); - } - /** - @internal - */ - nodeType(name) { - let found = this.nodes[name]; - if (!found) - throw new RangeError("Unknown node type: " + name); - return found; - } -} -function gatherMarks(schema, marks) { - let found = []; - for (let i = 0; i < marks.length; i++) { - let name = marks[i], mark = schema.marks[name], ok = mark; - if (mark) { - found.push(mark); - } - else { - for (let prop in schema.marks) { - let mark = schema.marks[prop]; - if (name == "_" || (mark.spec.group && mark.spec.group.split(" ").indexOf(name) > -1)) - found.push(ok = mark); - } - } - if (!ok) - throw new SyntaxError("Unknown mark type: '" + marks[i] + "'"); - } - return found; -} - -class Prosemirror { - constructor() { - this.defaultSchema = new Schema({ - nodes: { - text: {}, - doc: { content: "text*" }, - }, - }); - } - schema(schema) { - this.defaultSchema = schema; - return this; - } - fromYdoc(document, fieldName) { - const data = {}; - // allow a single field name - if (typeof fieldName === "string") { - return yProsemirror.yDocToProsemirrorJSON(document, fieldName); - } - // default to all available fields if the given field name is empty - if (fieldName === undefined || fieldName.length === 0) { - fieldName = Array.from(document.share.keys()); - } - fieldName.forEach((field) => { - // @ts-ignore - data[field] = yProsemirror.yDocToProsemirrorJSON(document, field); - }); - return data; - } - toYdoc(document, fieldName = "prosemirror", schema) { - if (!document) { - throw new Error(`You’ve passed an empty or invalid document to the Transformer. Make sure to pass ProseMirror-compatible JSON. Actually passed JSON: ${document}`); - } - // allow a single field name - if (typeof fieldName === "string") { - return yProsemirror.prosemirrorJSONToYDoc(schema || this.defaultSchema, document, fieldName); - } - const ydoc = new yjs.Doc(); - fieldName.forEach((field) => { - const update = yjs.encodeStateAsUpdate(yProsemirror.prosemirrorJSONToYDoc(schema || this.defaultSchema, document, field)); - yjs.applyUpdate(ydoc, update); - }); - return ydoc; - } -} -const ProsemirrorTransformer = new Prosemirror(); - -class Tiptap { - constructor() { - this.defaultExtensions = [starterKit.StarterKit]; - } - extensions(extensions) { - this.defaultExtensions = extensions; - return this; - } - fromYdoc(document, fieldName) { - return ProsemirrorTransformer.fromYdoc(document, fieldName); - } - toYdoc(document, fieldName = "default", extensions) { - return ProsemirrorTransformer.toYdoc(document, fieldName, core.getSchema(extensions || this.defaultExtensions)); - } -} -const TiptapTransformer = new Tiptap(); - -exports.ProsemirrorTransformer = ProsemirrorTransformer; -exports.Tiptap = Tiptap; -exports.TiptapTransformer = TiptapTransformer; -//# sourceMappingURL=hocuspocus-transformer.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs.map deleted file mode 100644 index 0cadcb3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-transformer.cjs","sources":["../../../node_modules/orderedmap/dist/index.js","../../../node_modules/prosemirror-model/dist/index.js","../src/Prosemirror.ts","../src/Tiptap.ts"],"sourcesContent":["// ::- Persistent data structure representing an ordered mapping from\n// strings to values, with some convenient update methods.\nfunction OrderedMap(content) {\n this.content = content;\n}\n\nOrderedMap.prototype = {\n constructor: OrderedMap,\n\n find: function(key) {\n for (var i = 0; i < this.content.length; i += 2)\n if (this.content[i] === key) return i\n return -1\n },\n\n // :: (string) → ?any\n // Retrieve the value stored under `key`, or return undefined when\n // no such key exists.\n get: function(key) {\n var found = this.find(key);\n return found == -1 ? undefined : this.content[found + 1]\n },\n\n // :: (string, any, ?string) → OrderedMap\n // Create a new map by replacing the value of `key` with a new\n // value, or adding a binding to the end of the map. If `newKey` is\n // given, the key of the binding will be replaced with that key.\n update: function(key, value, newKey) {\n var self = newKey && newKey != key ? this.remove(newKey) : this;\n var found = self.find(key), content = self.content.slice();\n if (found == -1) {\n content.push(newKey || key, value);\n } else {\n content[found + 1] = value;\n if (newKey) content[found] = newKey;\n }\n return new OrderedMap(content)\n },\n\n // :: (string) → OrderedMap\n // Return a map with the given key removed, if it existed.\n remove: function(key) {\n var found = this.find(key);\n if (found == -1) return this\n var content = this.content.slice();\n content.splice(found, 2);\n return new OrderedMap(content)\n },\n\n // :: (string, any) → OrderedMap\n // Add a new key to the start of the map.\n addToStart: function(key, value) {\n return new OrderedMap([key, value].concat(this.remove(key).content))\n },\n\n // :: (string, any) → OrderedMap\n // Add a new key to the end of the map.\n addToEnd: function(key, value) {\n var content = this.remove(key).content.slice();\n content.push(key, value);\n return new OrderedMap(content)\n },\n\n // :: (string, string, any) → OrderedMap\n // Add a key after the given key. If `place` is not found, the new\n // key is added to the end.\n addBefore: function(place, key, value) {\n var without = this.remove(key), content = without.content.slice();\n var found = without.find(place);\n content.splice(found == -1 ? content.length : found, 0, key, value);\n return new OrderedMap(content)\n },\n\n // :: ((key: string, value: any))\n // Call the given function for each key/value pair in the map, in\n // order.\n forEach: function(f) {\n for (var i = 0; i < this.content.length; i += 2)\n f(this.content[i], this.content[i + 1]);\n },\n\n // :: (union) → OrderedMap\n // Create a new map by prepending the keys in this map that don't\n // appear in `map` before the keys in `map`.\n prepend: function(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this\n return new OrderedMap(map.content.concat(this.subtract(map).content))\n },\n\n // :: (union) → OrderedMap\n // Create a new map by appending the keys in this map that don't\n // appear in `map` after the keys in `map`.\n append: function(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this\n return new OrderedMap(this.subtract(map).content.concat(map.content))\n },\n\n // :: (union) → OrderedMap\n // Create a map containing all the keys in this map that don't\n // appear in `map`.\n subtract: function(map) {\n var result = this;\n map = OrderedMap.from(map);\n for (var i = 0; i < map.content.length; i += 2)\n result = result.remove(map.content[i]);\n return result\n },\n\n // :: () → Object\n // Turn ordered map into a plain object.\n toObject: function() {\n var result = {};\n this.forEach(function(key, value) { result[key] = value; });\n return result\n },\n\n // :: number\n // The amount of keys in this map.\n get size() {\n return this.content.length >> 1\n }\n};\n\n// :: (?union) → OrderedMap\n// Return a map with the given content. If null, create an empty\n// map. If given an ordered map, return that map itself. If given an\n// object, create a map from the object's properties.\nOrderedMap.from = function(value) {\n if (value instanceof OrderedMap) return value\n var content = [];\n if (value) for (var prop in value) content.push(prop, value[prop]);\n return new OrderedMap(content)\n};\n\nexport default OrderedMap;\n","import OrderedMap from 'orderedmap';\n\nfunction findDiffStart(a, b, pos) {\n for (let i = 0;; i++) {\n if (i == a.childCount || i == b.childCount)\n return a.childCount == b.childCount ? null : pos;\n let childA = a.child(i), childB = b.child(i);\n if (childA == childB) {\n pos += childA.nodeSize;\n continue;\n }\n if (!childA.sameMarkup(childB))\n return pos;\n if (childA.isText && childA.text != childB.text) {\n for (let j = 0; childA.text[j] == childB.text[j]; j++)\n pos++;\n return pos;\n }\n if (childA.content.size || childB.content.size) {\n let inner = findDiffStart(childA.content, childB.content, pos + 1);\n if (inner != null)\n return inner;\n }\n pos += childA.nodeSize;\n }\n}\nfunction findDiffEnd(a, b, posA, posB) {\n for (let iA = a.childCount, iB = b.childCount;;) {\n if (iA == 0 || iB == 0)\n return iA == iB ? null : { a: posA, b: posB };\n let childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize;\n if (childA == childB) {\n posA -= size;\n posB -= size;\n continue;\n }\n if (!childA.sameMarkup(childB))\n return { a: posA, b: posB };\n if (childA.isText && childA.text != childB.text) {\n let same = 0, minSize = Math.min(childA.text.length, childB.text.length);\n while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) {\n same++;\n posA--;\n posB--;\n }\n return { a: posA, b: posB };\n }\n if (childA.content.size || childB.content.size) {\n let inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1);\n if (inner)\n return inner;\n }\n posA -= size;\n posB -= size;\n }\n}\n\n/**\nA fragment represents a node's collection of child nodes.\n\nLike nodes, fragments are persistent data structures, and you\nshould not mutate them or their content. Rather, you create new\ninstances whenever needed. The API tries to make this easy.\n*/\nclass Fragment {\n /**\n @internal\n */\n constructor(\n /**\n The child nodes in this fragment.\n */\n content, size) {\n this.content = content;\n this.size = size || 0;\n if (size == null)\n for (let i = 0; i < content.length; i++)\n this.size += content[i].nodeSize;\n }\n /**\n Invoke a callback for all descendant nodes between the given two\n positions (relative to start of this fragment). Doesn't descend\n into a node when the callback returns `false`.\n */\n nodesBetween(from, to, f, nodeStart = 0, parent) {\n for (let i = 0, pos = 0; pos < to; i++) {\n let child = this.content[i], end = pos + child.nodeSize;\n if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) {\n let start = pos + 1;\n child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start);\n }\n pos = end;\n }\n }\n /**\n Call the given callback for every descendant node. `pos` will be\n relative to the start of the fragment. The callback may return\n `false` to prevent traversal of a given node's children.\n */\n descendants(f) {\n this.nodesBetween(0, this.size, f);\n }\n /**\n Extract the text between `from` and `to`. See the same method on\n [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween).\n */\n textBetween(from, to, blockSeparator, leafText) {\n let text = \"\", first = true;\n this.nodesBetween(from, to, (node, pos) => {\n let nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos)\n : !node.isLeaf ? \"\"\n : leafText ? (typeof leafText === \"function\" ? leafText(node) : leafText)\n : node.type.spec.leafText ? node.type.spec.leafText(node)\n : \"\";\n if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) {\n if (first)\n first = false;\n else\n text += blockSeparator;\n }\n text += nodeText;\n }, 0);\n return text;\n }\n /**\n Create a new fragment containing the combined content of this\n fragment and the other.\n */\n append(other) {\n if (!other.size)\n return this;\n if (!this.size)\n return other;\n let last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0;\n if (last.isText && last.sameMarkup(first)) {\n content[content.length - 1] = last.withText(last.text + first.text);\n i = 1;\n }\n for (; i < other.content.length; i++)\n content.push(other.content[i]);\n return new Fragment(content, this.size + other.size);\n }\n /**\n Cut out the sub-fragment between the two given positions.\n */\n cut(from, to = this.size) {\n if (from == 0 && to == this.size)\n return this;\n let result = [], size = 0;\n if (to > from)\n for (let i = 0, pos = 0; pos < to; i++) {\n let child = this.content[i], end = pos + child.nodeSize;\n if (end > from) {\n if (pos < from || end > to) {\n if (child.isText)\n child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos));\n else\n child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1));\n }\n result.push(child);\n size += child.nodeSize;\n }\n pos = end;\n }\n return new Fragment(result, size);\n }\n /**\n @internal\n */\n cutByIndex(from, to) {\n if (from == to)\n return Fragment.empty;\n if (from == 0 && to == this.content.length)\n return this;\n return new Fragment(this.content.slice(from, to));\n }\n /**\n Create a new fragment in which the node at the given index is\n replaced by the given node.\n */\n replaceChild(index, node) {\n let current = this.content[index];\n if (current == node)\n return this;\n let copy = this.content.slice();\n let size = this.size + node.nodeSize - current.nodeSize;\n copy[index] = node;\n return new Fragment(copy, size);\n }\n /**\n Create a new fragment by prepending the given node to this\n fragment.\n */\n addToStart(node) {\n return new Fragment([node].concat(this.content), this.size + node.nodeSize);\n }\n /**\n Create a new fragment by appending the given node to this\n fragment.\n */\n addToEnd(node) {\n return new Fragment(this.content.concat(node), this.size + node.nodeSize);\n }\n /**\n Compare this fragment to another one.\n */\n eq(other) {\n if (this.content.length != other.content.length)\n return false;\n for (let i = 0; i < this.content.length; i++)\n if (!this.content[i].eq(other.content[i]))\n return false;\n return true;\n }\n /**\n The first child of the fragment, or `null` if it is empty.\n */\n get firstChild() { return this.content.length ? this.content[0] : null; }\n /**\n The last child of the fragment, or `null` if it is empty.\n */\n get lastChild() { return this.content.length ? this.content[this.content.length - 1] : null; }\n /**\n The number of child nodes in this fragment.\n */\n get childCount() { return this.content.length; }\n /**\n Get the child node at the given index. Raise an error when the\n index is out of range.\n */\n child(index) {\n let found = this.content[index];\n if (!found)\n throw new RangeError(\"Index \" + index + \" out of range for \" + this);\n return found;\n }\n /**\n Get the child node at the given index, if it exists.\n */\n maybeChild(index) {\n return this.content[index] || null;\n }\n /**\n Call `f` for every child node, passing the node, its offset\n into this parent node, and its index.\n */\n forEach(f) {\n for (let i = 0, p = 0; i < this.content.length; i++) {\n let child = this.content[i];\n f(child, p, i);\n p += child.nodeSize;\n }\n }\n /**\n Find the first position at which this fragment and another\n fragment differ, or `null` if they are the same.\n */\n findDiffStart(other, pos = 0) {\n return findDiffStart(this, other, pos);\n }\n /**\n Find the first position, searching from the end, at which this\n fragment and the given fragment differ, or `null` if they are\n the same. Since this position will not be the same in both\n nodes, an object with two separate positions is returned.\n */\n findDiffEnd(other, pos = this.size, otherPos = other.size) {\n return findDiffEnd(this, other, pos, otherPos);\n }\n /**\n Find the index and inner offset corresponding to a given relative\n position in this fragment. The result object will be reused\n (overwritten) the next time the function is called. @internal\n */\n findIndex(pos, round = -1) {\n if (pos == 0)\n return retIndex(0, pos);\n if (pos == this.size)\n return retIndex(this.content.length, pos);\n if (pos > this.size || pos < 0)\n throw new RangeError(`Position ${pos} outside of fragment (${this})`);\n for (let i = 0, curPos = 0;; i++) {\n let cur = this.child(i), end = curPos + cur.nodeSize;\n if (end >= pos) {\n if (end == pos || round > 0)\n return retIndex(i + 1, end);\n return retIndex(i, curPos);\n }\n curPos = end;\n }\n }\n /**\n Return a debugging string that describes this fragment.\n */\n toString() { return \"<\" + this.toStringInner() + \">\"; }\n /**\n @internal\n */\n toStringInner() { return this.content.join(\", \"); }\n /**\n Create a JSON-serializeable representation of this fragment.\n */\n toJSON() {\n return this.content.length ? this.content.map(n => n.toJSON()) : null;\n }\n /**\n Deserialize a fragment from its JSON representation.\n */\n static fromJSON(schema, value) {\n if (!value)\n return Fragment.empty;\n if (!Array.isArray(value))\n throw new RangeError(\"Invalid input for Fragment.fromJSON\");\n return new Fragment(value.map(schema.nodeFromJSON));\n }\n /**\n Build a fragment from an array of nodes. Ensures that adjacent\n text nodes with the same marks are joined together.\n */\n static fromArray(array) {\n if (!array.length)\n return Fragment.empty;\n let joined, size = 0;\n for (let i = 0; i < array.length; i++) {\n let node = array[i];\n size += node.nodeSize;\n if (i && node.isText && array[i - 1].sameMarkup(node)) {\n if (!joined)\n joined = array.slice(0, i);\n joined[joined.length - 1] = node\n .withText(joined[joined.length - 1].text + node.text);\n }\n else if (joined) {\n joined.push(node);\n }\n }\n return new Fragment(joined || array, size);\n }\n /**\n Create a fragment from something that can be interpreted as a\n set of nodes. For `null`, it returns the empty fragment. For a\n fragment, the fragment itself. For a node or array of nodes, a\n fragment containing those nodes.\n */\n static from(nodes) {\n if (!nodes)\n return Fragment.empty;\n if (nodes instanceof Fragment)\n return nodes;\n if (Array.isArray(nodes))\n return this.fromArray(nodes);\n if (nodes.attrs)\n return new Fragment([nodes], nodes.nodeSize);\n throw new RangeError(\"Can not convert \" + nodes + \" to a Fragment\" +\n (nodes.nodesBetween ? \" (looks like multiple versions of prosemirror-model were loaded)\" : \"\"));\n }\n}\n/**\nAn empty fragment. Intended to be reused whenever a node doesn't\ncontain anything (rather than allocating a new empty fragment for\neach leaf node).\n*/\nFragment.empty = new Fragment([], 0);\nconst found = { index: 0, offset: 0 };\nfunction retIndex(index, offset) {\n found.index = index;\n found.offset = offset;\n return found;\n}\n\nfunction compareDeep(a, b) {\n if (a === b)\n return true;\n if (!(a && typeof a == \"object\") ||\n !(b && typeof b == \"object\"))\n return false;\n let array = Array.isArray(a);\n if (Array.isArray(b) != array)\n return false;\n if (array) {\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!compareDeep(a[i], b[i]))\n return false;\n }\n else {\n for (let p in a)\n if (!(p in b) || !compareDeep(a[p], b[p]))\n return false;\n for (let p in b)\n if (!(p in a))\n return false;\n }\n return true;\n}\n\n/**\nA mark is a piece of information that can be attached to a node,\nsuch as it being emphasized, in code font, or a link. It has a\ntype and optionally a set of attributes that provide further\ninformation (such as the target of the link). Marks are created\nthrough a `Schema`, which controls which types exist and which\nattributes they have.\n*/\nclass Mark {\n /**\n @internal\n */\n constructor(\n /**\n The type of this mark.\n */\n type, \n /**\n The attributes associated with this mark.\n */\n attrs) {\n this.type = type;\n this.attrs = attrs;\n }\n /**\n Given a set of marks, create a new set which contains this one as\n well, in the right position. If this mark is already in the set,\n the set itself is returned. If any marks that are set to be\n [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present,\n those are replaced by this one.\n */\n addToSet(set) {\n let copy, placed = false;\n for (let i = 0; i < set.length; i++) {\n let other = set[i];\n if (this.eq(other))\n return set;\n if (this.type.excludes(other.type)) {\n if (!copy)\n copy = set.slice(0, i);\n }\n else if (other.type.excludes(this.type)) {\n return set;\n }\n else {\n if (!placed && other.type.rank > this.type.rank) {\n if (!copy)\n copy = set.slice(0, i);\n copy.push(this);\n placed = true;\n }\n if (copy)\n copy.push(other);\n }\n }\n if (!copy)\n copy = set.slice();\n if (!placed)\n copy.push(this);\n return copy;\n }\n /**\n Remove this mark from the given set, returning a new set. If this\n mark is not in the set, the set itself is returned.\n */\n removeFromSet(set) {\n for (let i = 0; i < set.length; i++)\n if (this.eq(set[i]))\n return set.slice(0, i).concat(set.slice(i + 1));\n return set;\n }\n /**\n Test whether this mark is in the given set of marks.\n */\n isInSet(set) {\n for (let i = 0; i < set.length; i++)\n if (this.eq(set[i]))\n return true;\n return false;\n }\n /**\n Test whether this mark has the same type and attributes as\n another mark.\n */\n eq(other) {\n return this == other ||\n (this.type == other.type && compareDeep(this.attrs, other.attrs));\n }\n /**\n Convert this mark to a JSON-serializeable representation.\n */\n toJSON() {\n let obj = { type: this.type.name };\n for (let _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n return obj;\n }\n /**\n Deserialize a mark from JSON.\n */\n static fromJSON(schema, json) {\n if (!json)\n throw new RangeError(\"Invalid input for Mark.fromJSON\");\n let type = schema.marks[json.type];\n if (!type)\n throw new RangeError(`There is no mark type ${json.type} in this schema`);\n let mark = type.create(json.attrs);\n type.checkAttrs(mark.attrs);\n return mark;\n }\n /**\n Test whether two sets of marks are identical.\n */\n static sameSet(a, b) {\n if (a == b)\n return true;\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!a[i].eq(b[i]))\n return false;\n return true;\n }\n /**\n Create a properly sorted mark set from null, a single mark, or an\n unsorted array of marks.\n */\n static setFrom(marks) {\n if (!marks || Array.isArray(marks) && marks.length == 0)\n return Mark.none;\n if (marks instanceof Mark)\n return [marks];\n let copy = marks.slice();\n copy.sort((a, b) => a.type.rank - b.type.rank);\n return copy;\n }\n}\n/**\nThe empty set of marks.\n*/\nMark.none = [];\n\n/**\nError type raised by [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) when\ngiven an invalid replacement.\n*/\nclass ReplaceError extends Error {\n}\n/*\nReplaceError = function(this: any, message: string) {\n let err = Error.call(this, message)\n ;(err as any).__proto__ = ReplaceError.prototype\n return err\n} as any\n\nReplaceError.prototype = Object.create(Error.prototype)\nReplaceError.prototype.constructor = ReplaceError\nReplaceError.prototype.name = \"ReplaceError\"\n*/\n/**\nA slice represents a piece cut out of a larger document. It\nstores not only a fragment, but also the depth up to which nodes on\nboth side are ‘open’ (cut through).\n*/\nclass Slice {\n /**\n Create a slice. When specifying a non-zero open depth, you must\n make sure that there are nodes of at least that depth at the\n appropriate side of the fragment—i.e. if the fragment is an\n empty paragraph node, `openStart` and `openEnd` can't be greater\n than 1.\n \n It is not necessary for the content of open nodes to conform to\n the schema's content constraints, though it should be a valid\n start/end/middle for such a node, depending on which sides are\n open.\n */\n constructor(\n /**\n The slice's content.\n */\n content, \n /**\n The open depth at the start of the fragment.\n */\n openStart, \n /**\n The open depth at the end.\n */\n openEnd) {\n this.content = content;\n this.openStart = openStart;\n this.openEnd = openEnd;\n }\n /**\n The size this slice would add when inserted into a document.\n */\n get size() {\n return this.content.size - this.openStart - this.openEnd;\n }\n /**\n @internal\n */\n insertAt(pos, fragment) {\n let content = insertInto(this.content, pos + this.openStart, fragment);\n return content && new Slice(content, this.openStart, this.openEnd);\n }\n /**\n @internal\n */\n removeBetween(from, to) {\n return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd);\n }\n /**\n Tests whether this slice is equal to another slice.\n */\n eq(other) {\n return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd;\n }\n /**\n @internal\n */\n toString() {\n return this.content + \"(\" + this.openStart + \",\" + this.openEnd + \")\";\n }\n /**\n Convert a slice to a JSON-serializable representation.\n */\n toJSON() {\n if (!this.content.size)\n return null;\n let json = { content: this.content.toJSON() };\n if (this.openStart > 0)\n json.openStart = this.openStart;\n if (this.openEnd > 0)\n json.openEnd = this.openEnd;\n return json;\n }\n /**\n Deserialize a slice from its JSON representation.\n */\n static fromJSON(schema, json) {\n if (!json)\n return Slice.empty;\n let openStart = json.openStart || 0, openEnd = json.openEnd || 0;\n if (typeof openStart != \"number\" || typeof openEnd != \"number\")\n throw new RangeError(\"Invalid input for Slice.fromJSON\");\n return new Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd);\n }\n /**\n Create a slice from a fragment by taking the maximum possible\n open value on both side of the fragment.\n */\n static maxOpen(fragment, openIsolating = true) {\n let openStart = 0, openEnd = 0;\n for (let n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild)\n openStart++;\n for (let n = fragment.lastChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.lastChild)\n openEnd++;\n return new Slice(fragment, openStart, openEnd);\n }\n}\n/**\nThe empty slice.\n*/\nSlice.empty = new Slice(Fragment.empty, 0, 0);\nfunction removeRange(content, from, to) {\n let { index, offset } = content.findIndex(from), child = content.maybeChild(index);\n let { index: indexTo, offset: offsetTo } = content.findIndex(to);\n if (offset == from || child.isText) {\n if (offsetTo != to && !content.child(indexTo).isText)\n throw new RangeError(\"Removing non-flat range\");\n return content.cut(0, from).append(content.cut(to));\n }\n if (index != indexTo)\n throw new RangeError(\"Removing non-flat range\");\n return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)));\n}\nfunction insertInto(content, dist, insert, parent) {\n let { index, offset } = content.findIndex(dist), child = content.maybeChild(index);\n if (offset == dist || child.isText) {\n if (parent && !parent.canReplace(index, index, insert))\n return null;\n return content.cut(0, dist).append(insert).append(content.cut(dist));\n }\n let inner = insertInto(child.content, dist - offset - 1, insert);\n return inner && content.replaceChild(index, child.copy(inner));\n}\nfunction replace($from, $to, slice) {\n if (slice.openStart > $from.depth)\n throw new ReplaceError(\"Inserted content deeper than insertion position\");\n if ($from.depth - slice.openStart != $to.depth - slice.openEnd)\n throw new ReplaceError(\"Inconsistent open depths\");\n return replaceOuter($from, $to, slice, 0);\n}\nfunction replaceOuter($from, $to, slice, depth) {\n let index = $from.index(depth), node = $from.node(depth);\n if (index == $to.index(depth) && depth < $from.depth - slice.openStart) {\n let inner = replaceOuter($from, $to, slice, depth + 1);\n return node.copy(node.content.replaceChild(index, inner));\n }\n else if (!slice.content.size) {\n return close(node, replaceTwoWay($from, $to, depth));\n }\n else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { // Simple, flat case\n let parent = $from.parent, content = parent.content;\n return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)));\n }\n else {\n let { start, end } = prepareSliceForReplace(slice, $from);\n return close(node, replaceThreeWay($from, start, end, $to, depth));\n }\n}\nfunction checkJoin(main, sub) {\n if (!sub.type.compatibleContent(main.type))\n throw new ReplaceError(\"Cannot join \" + sub.type.name + \" onto \" + main.type.name);\n}\nfunction joinable($before, $after, depth) {\n let node = $before.node(depth);\n checkJoin(node, $after.node(depth));\n return node;\n}\nfunction addNode(child, target) {\n let last = target.length - 1;\n if (last >= 0 && child.isText && child.sameMarkup(target[last]))\n target[last] = child.withText(target[last].text + child.text);\n else\n target.push(child);\n}\nfunction addRange($start, $end, depth, target) {\n let node = ($end || $start).node(depth);\n let startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount;\n if ($start) {\n startIndex = $start.index(depth);\n if ($start.depth > depth) {\n startIndex++;\n }\n else if ($start.textOffset) {\n addNode($start.nodeAfter, target);\n startIndex++;\n }\n }\n for (let i = startIndex; i < endIndex; i++)\n addNode(node.child(i), target);\n if ($end && $end.depth == depth && $end.textOffset)\n addNode($end.nodeBefore, target);\n}\nfunction close(node, content) {\n node.type.checkContent(content);\n return node.copy(content);\n}\nfunction replaceThreeWay($from, $start, $end, $to, depth) {\n let openStart = $from.depth > depth && joinable($from, $start, depth + 1);\n let openEnd = $to.depth > depth && joinable($end, $to, depth + 1);\n let content = [];\n addRange(null, $from, depth, content);\n if (openStart && openEnd && $start.index(depth) == $end.index(depth)) {\n checkJoin(openStart, openEnd);\n addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content);\n }\n else {\n if (openStart)\n addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content);\n addRange($start, $end, depth, content);\n if (openEnd)\n addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\nfunction replaceTwoWay($from, $to, depth) {\n let content = [];\n addRange(null, $from, depth, content);\n if ($from.depth > depth) {\n let type = joinable($from, $to, depth + 1);\n addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\nfunction prepareSliceForReplace(slice, $along) {\n let extra = $along.depth - slice.openStart, parent = $along.node(extra);\n let node = parent.copy(slice.content);\n for (let i = extra - 1; i >= 0; i--)\n node = $along.node(i).copy(Fragment.from(node));\n return { start: node.resolveNoCache(slice.openStart + extra),\n end: node.resolveNoCache(node.content.size - slice.openEnd - extra) };\n}\n\n/**\nYou can [_resolve_](https://prosemirror.net/docs/ref/#model.Node.resolve) a position to get more\ninformation about it. Objects of this class represent such a\nresolved position, providing various pieces of context\ninformation, and some helper methods.\n\nThroughout this interface, methods that take an optional `depth`\nparameter will interpret undefined as `this.depth` and negative\nnumbers as `this.depth + value`.\n*/\nclass ResolvedPos {\n /**\n @internal\n */\n constructor(\n /**\n The position that was resolved.\n */\n pos, \n /**\n @internal\n */\n path, \n /**\n The offset this position has into its parent node.\n */\n parentOffset) {\n this.pos = pos;\n this.path = path;\n this.parentOffset = parentOffset;\n this.depth = path.length / 3 - 1;\n }\n /**\n @internal\n */\n resolveDepth(val) {\n if (val == null)\n return this.depth;\n if (val < 0)\n return this.depth + val;\n return val;\n }\n /**\n The parent node that the position points into. Note that even if\n a position points into a text node, that node is not considered\n the parent—text nodes are ‘flat’ in this model, and have no content.\n */\n get parent() { return this.node(this.depth); }\n /**\n The root node in which the position was resolved.\n */\n get doc() { return this.node(0); }\n /**\n The ancestor node at the given level. `p.node(p.depth)` is the\n same as `p.parent`.\n */\n node(depth) { return this.path[this.resolveDepth(depth) * 3]; }\n /**\n The index into the ancestor at the given level. If this points\n at the 3rd node in the 2nd paragraph on the top level, for\n example, `p.index(0)` is 1 and `p.index(1)` is 2.\n */\n index(depth) { return this.path[this.resolveDepth(depth) * 3 + 1]; }\n /**\n The index pointing after this position into the ancestor at the\n given level.\n */\n indexAfter(depth) {\n depth = this.resolveDepth(depth);\n return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1);\n }\n /**\n The (absolute) position at the start of the node at the given\n level.\n */\n start(depth) {\n depth = this.resolveDepth(depth);\n return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n }\n /**\n The (absolute) position at the end of the node at the given\n level.\n */\n end(depth) {\n depth = this.resolveDepth(depth);\n return this.start(depth) + this.node(depth).content.size;\n }\n /**\n The (absolute) position directly before the wrapping node at the\n given level, or, when `depth` is `this.depth + 1`, the original\n position.\n */\n before(depth) {\n depth = this.resolveDepth(depth);\n if (!depth)\n throw new RangeError(\"There is no position before the top-level node\");\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1];\n }\n /**\n The (absolute) position directly after the wrapping node at the\n given level, or the original position when `depth` is `this.depth + 1`.\n */\n after(depth) {\n depth = this.resolveDepth(depth);\n if (!depth)\n throw new RangeError(\"There is no position after the top-level node\");\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize;\n }\n /**\n When this position points into a text node, this returns the\n distance between the position and the start of the text node.\n Will be zero for positions that point between nodes.\n */\n get textOffset() { return this.pos - this.path[this.path.length - 1]; }\n /**\n Get the node directly after the position, if any. If the position\n points into a text node, only the part of that node after the\n position is returned.\n */\n get nodeAfter() {\n let parent = this.parent, index = this.index(this.depth);\n if (index == parent.childCount)\n return null;\n let dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index);\n return dOff ? parent.child(index).cut(dOff) : child;\n }\n /**\n Get the node directly before the position, if any. If the\n position points into a text node, only the part of that node\n before the position is returned.\n */\n get nodeBefore() {\n let index = this.index(this.depth);\n let dOff = this.pos - this.path[this.path.length - 1];\n if (dOff)\n return this.parent.child(index).cut(0, dOff);\n return index == 0 ? null : this.parent.child(index - 1);\n }\n /**\n Get the position at the given index in the parent node at the\n given depth (which defaults to `this.depth`).\n */\n posAtIndex(index, depth) {\n depth = this.resolveDepth(depth);\n let node = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n for (let i = 0; i < index; i++)\n pos += node.child(i).nodeSize;\n return pos;\n }\n /**\n Get the marks at this position, factoring in the surrounding\n marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the\n position is at the start of a non-empty node, the marks of the\n node after it (if any) are returned.\n */\n marks() {\n let parent = this.parent, index = this.index();\n // In an empty parent, return the empty array\n if (parent.content.size == 0)\n return Mark.none;\n // When inside a text node, just return the text node's marks\n if (this.textOffset)\n return parent.child(index).marks;\n let main = parent.maybeChild(index - 1), other = parent.maybeChild(index);\n // If the `after` flag is true of there is no node before, make\n // the node after this position the main reference.\n if (!main) {\n let tmp = main;\n main = other;\n other = tmp;\n }\n // Use all marks in the main node, except those that have\n // `inclusive` set to false and are not present in the other node.\n let marks = main.marks;\n for (var i = 0; i < marks.length; i++)\n if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks)))\n marks = marks[i--].removeFromSet(marks);\n return marks;\n }\n /**\n Get the marks after the current position, if any, except those\n that are non-inclusive and not present at position `$end`. This\n is mostly useful for getting the set of marks to preserve after a\n deletion. Will return `null` if this position is at the end of\n its parent node or its parent node isn't a textblock (in which\n case no marks should be preserved).\n */\n marksAcross($end) {\n let after = this.parent.maybeChild(this.index());\n if (!after || !after.isInline)\n return null;\n let marks = after.marks, next = $end.parent.maybeChild($end.index());\n for (var i = 0; i < marks.length; i++)\n if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks)))\n marks = marks[i--].removeFromSet(marks);\n return marks;\n }\n /**\n The depth up to which this position and the given (non-resolved)\n position share the same parent nodes.\n */\n sharedDepth(pos) {\n for (let depth = this.depth; depth > 0; depth--)\n if (this.start(depth) <= pos && this.end(depth) >= pos)\n return depth;\n return 0;\n }\n /**\n Returns a range based on the place where this position and the\n given position diverge around block content. If both point into\n the same textblock, for example, a range around that textblock\n will be returned. If they point into different blocks, the range\n around those blocks in their shared ancestor is returned. You can\n pass in an optional predicate that will be called with a parent\n node to see if a range into that parent is acceptable.\n */\n blockRange(other = this, pred) {\n if (other.pos < this.pos)\n return other.blockRange(this);\n for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--)\n if (other.pos <= this.end(d) && (!pred || pred(this.node(d))))\n return new NodeRange(this, other, d);\n return null;\n }\n /**\n Query whether the given position shares the same parent node.\n */\n sameParent(other) {\n return this.pos - this.parentOffset == other.pos - other.parentOffset;\n }\n /**\n Return the greater of this and the given position.\n */\n max(other) {\n return other.pos > this.pos ? other : this;\n }\n /**\n Return the smaller of this and the given position.\n */\n min(other) {\n return other.pos < this.pos ? other : this;\n }\n /**\n @internal\n */\n toString() {\n let str = \"\";\n for (let i = 1; i <= this.depth; i++)\n str += (str ? \"/\" : \"\") + this.node(i).type.name + \"_\" + this.index(i - 1);\n return str + \":\" + this.parentOffset;\n }\n /**\n @internal\n */\n static resolve(doc, pos) {\n if (!(pos >= 0 && pos <= doc.content.size))\n throw new RangeError(\"Position \" + pos + \" out of range\");\n let path = [];\n let start = 0, parentOffset = pos;\n for (let node = doc;;) {\n let { index, offset } = node.content.findIndex(parentOffset);\n let rem = parentOffset - offset;\n path.push(node, index, start + offset);\n if (!rem)\n break;\n node = node.child(index);\n if (node.isText)\n break;\n parentOffset = rem - 1;\n start += offset + 1;\n }\n return new ResolvedPos(pos, path, parentOffset);\n }\n /**\n @internal\n */\n static resolveCached(doc, pos) {\n let cache = resolveCache.get(doc);\n if (cache) {\n for (let i = 0; i < cache.elts.length; i++) {\n let elt = cache.elts[i];\n if (elt.pos == pos)\n return elt;\n }\n }\n else {\n resolveCache.set(doc, cache = new ResolveCache);\n }\n let result = cache.elts[cache.i] = ResolvedPos.resolve(doc, pos);\n cache.i = (cache.i + 1) % resolveCacheSize;\n return result;\n }\n}\nclass ResolveCache {\n constructor() {\n this.elts = [];\n this.i = 0;\n }\n}\nconst resolveCacheSize = 12, resolveCache = new WeakMap();\n/**\nRepresents a flat range of content, i.e. one that starts and\nends in the same node.\n*/\nclass NodeRange {\n /**\n Construct a node range. `$from` and `$to` should point into the\n same node until at least the given `depth`, since a node range\n denotes an adjacent set of nodes in a single parent node.\n */\n constructor(\n /**\n A resolved position along the start of the content. May have a\n `depth` greater than this object's `depth` property, since\n these are the positions that were used to compute the range,\n not re-resolved positions directly at its boundaries.\n */\n $from, \n /**\n A position along the end of the content. See\n caveat for [`$from`](https://prosemirror.net/docs/ref/#model.NodeRange.$from).\n */\n $to, \n /**\n The depth of the node that this range points into.\n */\n depth) {\n this.$from = $from;\n this.$to = $to;\n this.depth = depth;\n }\n /**\n The position at the start of the range.\n */\n get start() { return this.$from.before(this.depth + 1); }\n /**\n The position at the end of the range.\n */\n get end() { return this.$to.after(this.depth + 1); }\n /**\n The parent node that the range points into.\n */\n get parent() { return this.$from.node(this.depth); }\n /**\n The start index of the range in the parent node.\n */\n get startIndex() { return this.$from.index(this.depth); }\n /**\n The end index of the range in the parent node.\n */\n get endIndex() { return this.$to.indexAfter(this.depth); }\n}\n\nconst emptyAttrs = Object.create(null);\n/**\nThis class represents a node in the tree that makes up a\nProseMirror document. So a document is an instance of `Node`, with\nchildren that are also instances of `Node`.\n\nNodes are persistent data structures. Instead of changing them, you\ncreate new ones with the content you want. Old ones keep pointing\nat the old document shape. This is made cheaper by sharing\nstructure between the old and new data as much as possible, which a\ntree shape like this (without back pointers) makes easy.\n\n**Do not** directly mutate the properties of a `Node` object. See\n[the guide](https://prosemirror.net/docs/guide/#doc) for more information.\n*/\nclass Node {\n /**\n @internal\n */\n constructor(\n /**\n The type of node that this is.\n */\n type, \n /**\n An object mapping attribute names to values. The kind of\n attributes allowed and required are\n [determined](https://prosemirror.net/docs/ref/#model.NodeSpec.attrs) by the node type.\n */\n attrs, \n // A fragment holding the node's children.\n content, \n /**\n The marks (things like whether it is emphasized or part of a\n link) applied to this node.\n */\n marks = Mark.none) {\n this.type = type;\n this.attrs = attrs;\n this.marks = marks;\n this.content = content || Fragment.empty;\n }\n /**\n The array of this node's child nodes.\n */\n get children() { return this.content.content; }\n /**\n The size of this node, as defined by the integer-based [indexing\n scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the\n amount of characters. For other leaf nodes, it is one. For\n non-leaf nodes, it is the size of the content plus two (the\n start and end token).\n */\n get nodeSize() { return this.isLeaf ? 1 : 2 + this.content.size; }\n /**\n The number of children that the node has.\n */\n get childCount() { return this.content.childCount; }\n /**\n Get the child node at the given index. Raises an error when the\n index is out of range.\n */\n child(index) { return this.content.child(index); }\n /**\n Get the child node at the given index, if it exists.\n */\n maybeChild(index) { return this.content.maybeChild(index); }\n /**\n Call `f` for every child node, passing the node, its offset\n into this parent node, and its index.\n */\n forEach(f) { this.content.forEach(f); }\n /**\n Invoke a callback for all descendant nodes recursively between\n the given two positions that are relative to start of this\n node's content. The callback is invoked with the node, its\n position relative to the original node (method receiver),\n its parent node, and its child index. When the callback returns\n false for a given node, that node's children will not be\n recursed over. The last parameter can be used to specify a\n starting position to count from.\n */\n nodesBetween(from, to, f, startPos = 0) {\n this.content.nodesBetween(from, to, f, startPos, this);\n }\n /**\n Call the given callback for every descendant node. Doesn't\n descend into a node when the callback returns `false`.\n */\n descendants(f) {\n this.nodesBetween(0, this.content.size, f);\n }\n /**\n Concatenates all the text nodes found in this fragment and its\n children.\n */\n get textContent() {\n return (this.isLeaf && this.type.spec.leafText)\n ? this.type.spec.leafText(this)\n : this.textBetween(0, this.content.size, \"\");\n }\n /**\n Get all text between positions `from` and `to`. When\n `blockSeparator` is given, it will be inserted to separate text\n from different block nodes. If `leafText` is given, it'll be\n inserted for every non-text leaf node encountered, otherwise\n [`leafText`](https://prosemirror.net/docs/ref/#model.NodeSpec^leafText) will be used.\n */\n textBetween(from, to, blockSeparator, leafText) {\n return this.content.textBetween(from, to, blockSeparator, leafText);\n }\n /**\n Returns this node's first child, or `null` if there are no\n children.\n */\n get firstChild() { return this.content.firstChild; }\n /**\n Returns this node's last child, or `null` if there are no\n children.\n */\n get lastChild() { return this.content.lastChild; }\n /**\n Test whether two nodes represent the same piece of document.\n */\n eq(other) {\n return this == other || (this.sameMarkup(other) && this.content.eq(other.content));\n }\n /**\n Compare the markup (type, attributes, and marks) of this node to\n those of another. Returns `true` if both have the same markup.\n */\n sameMarkup(other) {\n return this.hasMarkup(other.type, other.attrs, other.marks);\n }\n /**\n Check whether this node's markup correspond to the given type,\n attributes, and marks.\n */\n hasMarkup(type, attrs, marks) {\n return this.type == type &&\n compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) &&\n Mark.sameSet(this.marks, marks || Mark.none);\n }\n /**\n Create a new node with the same markup as this node, containing\n the given content (or empty, if no content is given).\n */\n copy(content = null) {\n if (content == this.content)\n return this;\n return new Node(this.type, this.attrs, content, this.marks);\n }\n /**\n Create a copy of this node, with the given set of marks instead\n of the node's own marks.\n */\n mark(marks) {\n return marks == this.marks ? this : new Node(this.type, this.attrs, this.content, marks);\n }\n /**\n Create a copy of this node with only the content between the\n given positions. If `to` is not given, it defaults to the end of\n the node.\n */\n cut(from, to = this.content.size) {\n if (from == 0 && to == this.content.size)\n return this;\n return this.copy(this.content.cut(from, to));\n }\n /**\n Cut out the part of the document between the given positions, and\n return it as a `Slice` object.\n */\n slice(from, to = this.content.size, includeParents = false) {\n if (from == to)\n return Slice.empty;\n let $from = this.resolve(from), $to = this.resolve(to);\n let depth = includeParents ? 0 : $from.sharedDepth(to);\n let start = $from.start(depth), node = $from.node(depth);\n let content = node.content.cut($from.pos - start, $to.pos - start);\n return new Slice(content, $from.depth - depth, $to.depth - depth);\n }\n /**\n Replace the part of the document between the given positions with\n the given slice. The slice must 'fit', meaning its open sides\n must be able to connect to the surrounding content, and its\n content nodes must be valid children for the node they are placed\n into. If any of this is violated, an error of type\n [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.\n */\n replace(from, to, slice) {\n return replace(this.resolve(from), this.resolve(to), slice);\n }\n /**\n Find the node directly after the given position.\n */\n nodeAt(pos) {\n for (let node = this;;) {\n let { index, offset } = node.content.findIndex(pos);\n node = node.maybeChild(index);\n if (!node)\n return null;\n if (offset == pos || node.isText)\n return node;\n pos -= offset + 1;\n }\n }\n /**\n Find the (direct) child node after the given offset, if any,\n and return it along with its index and offset relative to this\n node.\n */\n childAfter(pos) {\n let { index, offset } = this.content.findIndex(pos);\n return { node: this.content.maybeChild(index), index, offset };\n }\n /**\n Find the (direct) child node before the given offset, if any,\n and return it along with its index and offset relative to this\n node.\n */\n childBefore(pos) {\n if (pos == 0)\n return { node: null, index: 0, offset: 0 };\n let { index, offset } = this.content.findIndex(pos);\n if (offset < pos)\n return { node: this.content.child(index), index, offset };\n let node = this.content.child(index - 1);\n return { node, index: index - 1, offset: offset - node.nodeSize };\n }\n /**\n Resolve the given position in the document, returning an\n [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.\n */\n resolve(pos) { return ResolvedPos.resolveCached(this, pos); }\n /**\n @internal\n */\n resolveNoCache(pos) { return ResolvedPos.resolve(this, pos); }\n /**\n Test whether a given mark or mark type occurs in this document\n between the two given positions.\n */\n rangeHasMark(from, to, type) {\n let found = false;\n if (to > from)\n this.nodesBetween(from, to, node => {\n if (type.isInSet(node.marks))\n found = true;\n return !found;\n });\n return found;\n }\n /**\n True when this is a block (non-inline node)\n */\n get isBlock() { return this.type.isBlock; }\n /**\n True when this is a textblock node, a block node with inline\n content.\n */\n get isTextblock() { return this.type.isTextblock; }\n /**\n True when this node allows inline content.\n */\n get inlineContent() { return this.type.inlineContent; }\n /**\n True when this is an inline node (a text node or a node that can\n appear among text).\n */\n get isInline() { return this.type.isInline; }\n /**\n True when this is a text node.\n */\n get isText() { return this.type.isText; }\n /**\n True when this is a leaf node.\n */\n get isLeaf() { return this.type.isLeaf; }\n /**\n True when this is an atom, i.e. when it does not have directly\n editable content. This is usually the same as `isLeaf`, but can\n be configured with the [`atom` property](https://prosemirror.net/docs/ref/#model.NodeSpec.atom)\n on a node's spec (typically used when the node is displayed as\n an uneditable [node view](https://prosemirror.net/docs/ref/#view.NodeView)).\n */\n get isAtom() { return this.type.isAtom; }\n /**\n Return a string representation of this node for debugging\n purposes.\n */\n toString() {\n if (this.type.spec.toDebugString)\n return this.type.spec.toDebugString(this);\n let name = this.type.name;\n if (this.content.size)\n name += \"(\" + this.content.toStringInner() + \")\";\n return wrapMarks(this.marks, name);\n }\n /**\n Get the content match in this node at the given index.\n */\n contentMatchAt(index) {\n let match = this.type.contentMatch.matchFragment(this.content, 0, index);\n if (!match)\n throw new Error(\"Called contentMatchAt on a node with invalid content\");\n return match;\n }\n /**\n Test whether replacing the range between `from` and `to` (by\n child index) with the given replacement fragment (which defaults\n to the empty fragment) would leave the node's content valid. You\n can optionally pass `start` and `end` indices into the\n replacement fragment.\n */\n canReplace(from, to, replacement = Fragment.empty, start = 0, end = replacement.childCount) {\n let one = this.contentMatchAt(from).matchFragment(replacement, start, end);\n let two = one && one.matchFragment(this.content, to);\n if (!two || !two.validEnd)\n return false;\n for (let i = start; i < end; i++)\n if (!this.type.allowsMarks(replacement.child(i).marks))\n return false;\n return true;\n }\n /**\n Test whether replacing the range `from` to `to` (by index) with\n a node of the given type would leave the node's content valid.\n */\n canReplaceWith(from, to, type, marks) {\n if (marks && !this.type.allowsMarks(marks))\n return false;\n let start = this.contentMatchAt(from).matchType(type);\n let end = start && start.matchFragment(this.content, to);\n return end ? end.validEnd : false;\n }\n /**\n Test whether the given node's content could be appended to this\n node. If that node is empty, this will only return true if there\n is at least one node type that can appear in both nodes (to avoid\n merging completely incompatible nodes).\n */\n canAppend(other) {\n if (other.content.size)\n return this.canReplace(this.childCount, this.childCount, other.content);\n else\n return this.type.compatibleContent(other.type);\n }\n /**\n Check whether this node and its descendants conform to the\n schema, and raise an exception when they do not.\n */\n check() {\n this.type.checkContent(this.content);\n this.type.checkAttrs(this.attrs);\n let copy = Mark.none;\n for (let i = 0; i < this.marks.length; i++) {\n let mark = this.marks[i];\n mark.type.checkAttrs(mark.attrs);\n copy = mark.addToSet(copy);\n }\n if (!Mark.sameSet(copy, this.marks))\n throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(m => m.type.name)}`);\n this.content.forEach(node => node.check());\n }\n /**\n Return a JSON-serializeable representation of this node.\n */\n toJSON() {\n let obj = { type: this.type.name };\n for (let _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n if (this.content.size)\n obj.content = this.content.toJSON();\n if (this.marks.length)\n obj.marks = this.marks.map(n => n.toJSON());\n return obj;\n }\n /**\n Deserialize a node from its JSON representation.\n */\n static fromJSON(schema, json) {\n if (!json)\n throw new RangeError(\"Invalid input for Node.fromJSON\");\n let marks = undefined;\n if (json.marks) {\n if (!Array.isArray(json.marks))\n throw new RangeError(\"Invalid mark data for Node.fromJSON\");\n marks = json.marks.map(schema.markFromJSON);\n }\n if (json.type == \"text\") {\n if (typeof json.text != \"string\")\n throw new RangeError(\"Invalid text node in JSON\");\n return schema.text(json.text, marks);\n }\n let content = Fragment.fromJSON(schema, json.content);\n let node = schema.nodeType(json.type).create(json.attrs, content, marks);\n node.type.checkAttrs(node.attrs);\n return node;\n }\n}\nNode.prototype.text = undefined;\nclass TextNode extends Node {\n /**\n @internal\n */\n constructor(type, attrs, content, marks) {\n super(type, attrs, null, marks);\n if (!content)\n throw new RangeError(\"Empty text nodes are not allowed\");\n this.text = content;\n }\n toString() {\n if (this.type.spec.toDebugString)\n return this.type.spec.toDebugString(this);\n return wrapMarks(this.marks, JSON.stringify(this.text));\n }\n get textContent() { return this.text; }\n textBetween(from, to) { return this.text.slice(from, to); }\n get nodeSize() { return this.text.length; }\n mark(marks) {\n return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks);\n }\n withText(text) {\n if (text == this.text)\n return this;\n return new TextNode(this.type, this.attrs, text, this.marks);\n }\n cut(from = 0, to = this.text.length) {\n if (from == 0 && to == this.text.length)\n return this;\n return this.withText(this.text.slice(from, to));\n }\n eq(other) {\n return this.sameMarkup(other) && this.text == other.text;\n }\n toJSON() {\n let base = super.toJSON();\n base.text = this.text;\n return base;\n }\n}\nfunction wrapMarks(marks, str) {\n for (let i = marks.length - 1; i >= 0; i--)\n str = marks[i].type.name + \"(\" + str + \")\";\n return str;\n}\n\n/**\nInstances of this class represent a match state of a node type's\n[content expression](https://prosemirror.net/docs/ref/#model.NodeSpec.content), and can be used to\nfind out whether further content matches here, and whether a given\nposition is a valid end of the node.\n*/\nclass ContentMatch {\n /**\n @internal\n */\n constructor(\n /**\n True when this match state represents a valid end of the node.\n */\n validEnd) {\n this.validEnd = validEnd;\n /**\n @internal\n */\n this.next = [];\n /**\n @internal\n */\n this.wrapCache = [];\n }\n /**\n @internal\n */\n static parse(string, nodeTypes) {\n let stream = new TokenStream(string, nodeTypes);\n if (stream.next == null)\n return ContentMatch.empty;\n let expr = parseExpr(stream);\n if (stream.next)\n stream.err(\"Unexpected trailing text\");\n let match = dfa(nfa(expr));\n checkForDeadEnds(match, stream);\n return match;\n }\n /**\n Match a node type, returning a match after that node if\n successful.\n */\n matchType(type) {\n for (let i = 0; i < this.next.length; i++)\n if (this.next[i].type == type)\n return this.next[i].next;\n return null;\n }\n /**\n Try to match a fragment. Returns the resulting match when\n successful.\n */\n matchFragment(frag, start = 0, end = frag.childCount) {\n let cur = this;\n for (let i = start; cur && i < end; i++)\n cur = cur.matchType(frag.child(i).type);\n return cur;\n }\n /**\n @internal\n */\n get inlineContent() {\n return this.next.length != 0 && this.next[0].type.isInline;\n }\n /**\n Get the first matching node type at this match position that can\n be generated.\n */\n get defaultType() {\n for (let i = 0; i < this.next.length; i++) {\n let { type } = this.next[i];\n if (!(type.isText || type.hasRequiredAttrs()))\n return type;\n }\n return null;\n }\n /**\n @internal\n */\n compatible(other) {\n for (let i = 0; i < this.next.length; i++)\n for (let j = 0; j < other.next.length; j++)\n if (this.next[i].type == other.next[j].type)\n return true;\n return false;\n }\n /**\n Try to match the given fragment, and if that fails, see if it can\n be made to match by inserting nodes in front of it. When\n successful, return a fragment of inserted nodes (which may be\n empty if nothing had to be inserted). When `toEnd` is true, only\n return a fragment if the resulting match goes to the end of the\n content expression.\n */\n fillBefore(after, toEnd = false, startIndex = 0) {\n let seen = [this];\n function search(match, types) {\n let finished = match.matchFragment(after, startIndex);\n if (finished && (!toEnd || finished.validEnd))\n return Fragment.from(types.map(tp => tp.createAndFill()));\n for (let i = 0; i < match.next.length; i++) {\n let { type, next } = match.next[i];\n if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {\n seen.push(next);\n let found = search(next, types.concat(type));\n if (found)\n return found;\n }\n }\n return null;\n }\n return search(this, []);\n }\n /**\n Find a set of wrapping node types that would allow a node of the\n given type to appear at this position. The result may be empty\n (when it fits directly) and will be null when no such wrapping\n exists.\n */\n findWrapping(target) {\n for (let i = 0; i < this.wrapCache.length; i += 2)\n if (this.wrapCache[i] == target)\n return this.wrapCache[i + 1];\n let computed = this.computeWrapping(target);\n this.wrapCache.push(target, computed);\n return computed;\n }\n /**\n @internal\n */\n computeWrapping(target) {\n let seen = Object.create(null), active = [{ match: this, type: null, via: null }];\n while (active.length) {\n let current = active.shift(), match = current.match;\n if (match.matchType(target)) {\n let result = [];\n for (let obj = current; obj.type; obj = obj.via)\n result.push(obj.type);\n return result.reverse();\n }\n for (let i = 0; i < match.next.length; i++) {\n let { type, next } = match.next[i];\n if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) {\n active.push({ match: type.contentMatch, type, via: current });\n seen[type.name] = true;\n }\n }\n }\n return null;\n }\n /**\n The number of outgoing edges this node has in the finite\n automaton that describes the content expression.\n */\n get edgeCount() {\n return this.next.length;\n }\n /**\n Get the _n_​th outgoing edge from this node in the finite\n automaton that describes the content expression.\n */\n edge(n) {\n if (n >= this.next.length)\n throw new RangeError(`There's no ${n}th edge in this content match`);\n return this.next[n];\n }\n /**\n @internal\n */\n toString() {\n let seen = [];\n function scan(m) {\n seen.push(m);\n for (let i = 0; i < m.next.length; i++)\n if (seen.indexOf(m.next[i].next) == -1)\n scan(m.next[i].next);\n }\n scan(this);\n return seen.map((m, i) => {\n let out = i + (m.validEnd ? \"*\" : \" \") + \" \";\n for (let i = 0; i < m.next.length; i++)\n out += (i ? \", \" : \"\") + m.next[i].type.name + \"->\" + seen.indexOf(m.next[i].next);\n return out;\n }).join(\"\\n\");\n }\n}\n/**\n@internal\n*/\nContentMatch.empty = new ContentMatch(true);\nclass TokenStream {\n constructor(string, nodeTypes) {\n this.string = string;\n this.nodeTypes = nodeTypes;\n this.inline = null;\n this.pos = 0;\n this.tokens = string.split(/\\s*(?=\\b|\\W|$)/);\n if (this.tokens[this.tokens.length - 1] == \"\")\n this.tokens.pop();\n if (this.tokens[0] == \"\")\n this.tokens.shift();\n }\n get next() { return this.tokens[this.pos]; }\n eat(tok) { return this.next == tok && (this.pos++ || true); }\n err(str) { throw new SyntaxError(str + \" (in content expression '\" + this.string + \"')\"); }\n}\nfunction parseExpr(stream) {\n let exprs = [];\n do {\n exprs.push(parseExprSeq(stream));\n } while (stream.eat(\"|\"));\n return exprs.length == 1 ? exprs[0] : { type: \"choice\", exprs };\n}\nfunction parseExprSeq(stream) {\n let exprs = [];\n do {\n exprs.push(parseExprSubscript(stream));\n } while (stream.next && stream.next != \")\" && stream.next != \"|\");\n return exprs.length == 1 ? exprs[0] : { type: \"seq\", exprs };\n}\nfunction parseExprSubscript(stream) {\n let expr = parseExprAtom(stream);\n for (;;) {\n if (stream.eat(\"+\"))\n expr = { type: \"plus\", expr };\n else if (stream.eat(\"*\"))\n expr = { type: \"star\", expr };\n else if (stream.eat(\"?\"))\n expr = { type: \"opt\", expr };\n else if (stream.eat(\"{\"))\n expr = parseExprRange(stream, expr);\n else\n break;\n }\n return expr;\n}\nfunction parseNum(stream) {\n if (/\\D/.test(stream.next))\n stream.err(\"Expected number, got '\" + stream.next + \"'\");\n let result = Number(stream.next);\n stream.pos++;\n return result;\n}\nfunction parseExprRange(stream, expr) {\n let min = parseNum(stream), max = min;\n if (stream.eat(\",\")) {\n if (stream.next != \"}\")\n max = parseNum(stream);\n else\n max = -1;\n }\n if (!stream.eat(\"}\"))\n stream.err(\"Unclosed braced range\");\n return { type: \"range\", min, max, expr };\n}\nfunction resolveName(stream, name) {\n let types = stream.nodeTypes, type = types[name];\n if (type)\n return [type];\n let result = [];\n for (let typeName in types) {\n let type = types[typeName];\n if (type.isInGroup(name))\n result.push(type);\n }\n if (result.length == 0)\n stream.err(\"No node type or group '\" + name + \"' found\");\n return result;\n}\nfunction parseExprAtom(stream) {\n if (stream.eat(\"(\")) {\n let expr = parseExpr(stream);\n if (!stream.eat(\")\"))\n stream.err(\"Missing closing paren\");\n return expr;\n }\n else if (!/\\W/.test(stream.next)) {\n let exprs = resolveName(stream, stream.next).map(type => {\n if (stream.inline == null)\n stream.inline = type.isInline;\n else if (stream.inline != type.isInline)\n stream.err(\"Mixing inline and block content\");\n return { type: \"name\", value: type };\n });\n stream.pos++;\n return exprs.length == 1 ? exprs[0] : { type: \"choice\", exprs };\n }\n else {\n stream.err(\"Unexpected token '\" + stream.next + \"'\");\n }\n}\n// Construct an NFA from an expression as returned by the parser. The\n// NFA is represented as an array of states, which are themselves\n// arrays of edges, which are `{term, to}` objects. The first state is\n// the entry state and the last node is the success state.\n//\n// Note that unlike typical NFAs, the edge ordering in this one is\n// significant, in that it is used to contruct filler content when\n// necessary.\nfunction nfa(expr) {\n let nfa = [[]];\n connect(compile(expr, 0), node());\n return nfa;\n function node() { return nfa.push([]) - 1; }\n function edge(from, to, term) {\n let edge = { term, to };\n nfa[from].push(edge);\n return edge;\n }\n function connect(edges, to) {\n edges.forEach(edge => edge.to = to);\n }\n function compile(expr, from) {\n if (expr.type == \"choice\") {\n return expr.exprs.reduce((out, expr) => out.concat(compile(expr, from)), []);\n }\n else if (expr.type == \"seq\") {\n for (let i = 0;; i++) {\n let next = compile(expr.exprs[i], from);\n if (i == expr.exprs.length - 1)\n return next;\n connect(next, from = node());\n }\n }\n else if (expr.type == \"star\") {\n let loop = node();\n edge(from, loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)];\n }\n else if (expr.type == \"plus\") {\n let loop = node();\n connect(compile(expr.expr, from), loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)];\n }\n else if (expr.type == \"opt\") {\n return [edge(from)].concat(compile(expr.expr, from));\n }\n else if (expr.type == \"range\") {\n let cur = from;\n for (let i = 0; i < expr.min; i++) {\n let next = node();\n connect(compile(expr.expr, cur), next);\n cur = next;\n }\n if (expr.max == -1) {\n connect(compile(expr.expr, cur), cur);\n }\n else {\n for (let i = expr.min; i < expr.max; i++) {\n let next = node();\n edge(cur, next);\n connect(compile(expr.expr, cur), next);\n cur = next;\n }\n }\n return [edge(cur)];\n }\n else if (expr.type == \"name\") {\n return [edge(from, undefined, expr.value)];\n }\n else {\n throw new Error(\"Unknown expr type\");\n }\n }\n}\nfunction cmp(a, b) { return b - a; }\n// Get the set of nodes reachable by null edges from `node`. Omit\n// nodes with only a single null-out-edge, since they may lead to\n// needless duplicated nodes.\nfunction nullFrom(nfa, node) {\n let result = [];\n scan(node);\n return result.sort(cmp);\n function scan(node) {\n let edges = nfa[node];\n if (edges.length == 1 && !edges[0].term)\n return scan(edges[0].to);\n result.push(node);\n for (let i = 0; i < edges.length; i++) {\n let { term, to } = edges[i];\n if (!term && result.indexOf(to) == -1)\n scan(to);\n }\n }\n}\n// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set\n// of state objects (`ContentMatch` instances) with transitions\n// between them.\nfunction dfa(nfa) {\n let labeled = Object.create(null);\n return explore(nullFrom(nfa, 0));\n function explore(states) {\n let out = [];\n states.forEach(node => {\n nfa[node].forEach(({ term, to }) => {\n if (!term)\n return;\n let set;\n for (let i = 0; i < out.length; i++)\n if (out[i][0] == term)\n set = out[i][1];\n nullFrom(nfa, to).forEach(node => {\n if (!set)\n out.push([term, set = []]);\n if (set.indexOf(node) == -1)\n set.push(node);\n });\n });\n });\n let state = labeled[states.join(\",\")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1);\n for (let i = 0; i < out.length; i++) {\n let states = out[i][1].sort(cmp);\n state.next.push({ type: out[i][0], next: labeled[states.join(\",\")] || explore(states) });\n }\n return state;\n }\n}\nfunction checkForDeadEnds(match, stream) {\n for (let i = 0, work = [match]; i < work.length; i++) {\n let state = work[i], dead = !state.validEnd, nodes = [];\n for (let j = 0; j < state.next.length; j++) {\n let { type, next } = state.next[j];\n nodes.push(type.name);\n if (dead && !(type.isText || type.hasRequiredAttrs()))\n dead = false;\n if (work.indexOf(next) == -1)\n work.push(next);\n }\n if (dead)\n stream.err(\"Only non-generatable nodes (\" + nodes.join(\", \") + \") in a required position (see https://prosemirror.net/docs/guide/#generatable)\");\n }\n}\n\n// For node types where all attrs have a default value (or which don't\n// have any attributes), build up a single reusable default attribute\n// object, and use it for all nodes that don't specify specific\n// attributes.\nfunction defaultAttrs(attrs) {\n let defaults = Object.create(null);\n for (let attrName in attrs) {\n let attr = attrs[attrName];\n if (!attr.hasDefault)\n return null;\n defaults[attrName] = attr.default;\n }\n return defaults;\n}\nfunction computeAttrs(attrs, value) {\n let built = Object.create(null);\n for (let name in attrs) {\n let given = value && value[name];\n if (given === undefined) {\n let attr = attrs[name];\n if (attr.hasDefault)\n given = attr.default;\n else\n throw new RangeError(\"No value supplied for attribute \" + name);\n }\n built[name] = given;\n }\n return built;\n}\nfunction checkAttrs(attrs, values, type, name) {\n for (let name in values)\n if (!(name in attrs))\n throw new RangeError(`Unsupported attribute ${name} for ${type} of type ${name}`);\n for (let name in attrs) {\n let attr = attrs[name];\n if (attr.validate)\n attr.validate(values[name]);\n }\n}\nfunction initAttrs(typeName, attrs) {\n let result = Object.create(null);\n if (attrs)\n for (let name in attrs)\n result[name] = new Attribute(typeName, name, attrs[name]);\n return result;\n}\n/**\nNode types are objects allocated once per `Schema` and used to\n[tag](https://prosemirror.net/docs/ref/#model.Node.type) `Node` instances. They contain information\nabout the node type, such as its name and what kind of node it\nrepresents.\n*/\nclass NodeType {\n /**\n @internal\n */\n constructor(\n /**\n The name the node type has in this schema.\n */\n name, \n /**\n A link back to the `Schema` the node type belongs to.\n */\n schema, \n /**\n The spec that this type is based on\n */\n spec) {\n this.name = name;\n this.schema = schema;\n this.spec = spec;\n /**\n The set of marks allowed in this node. `null` means all marks\n are allowed.\n */\n this.markSet = null;\n this.groups = spec.group ? spec.group.split(\" \") : [];\n this.attrs = initAttrs(name, spec.attrs);\n this.defaultAttrs = defaultAttrs(this.attrs);\n this.contentMatch = null;\n this.inlineContent = null;\n this.isBlock = !(spec.inline || name == \"text\");\n this.isText = name == \"text\";\n }\n /**\n True if this is an inline type.\n */\n get isInline() { return !this.isBlock; }\n /**\n True if this is a textblock type, a block that contains inline\n content.\n */\n get isTextblock() { return this.isBlock && this.inlineContent; }\n /**\n True for node types that allow no content.\n */\n get isLeaf() { return this.contentMatch == ContentMatch.empty; }\n /**\n True when this node is an atom, i.e. when it does not have\n directly editable content.\n */\n get isAtom() { return this.isLeaf || !!this.spec.atom; }\n /**\n Return true when this node type is part of the given\n [group](https://prosemirror.net/docs/ref/#model.NodeSpec.group).\n */\n isInGroup(group) {\n return this.groups.indexOf(group) > -1;\n }\n /**\n The node type's [whitespace](https://prosemirror.net/docs/ref/#model.NodeSpec.whitespace) option.\n */\n get whitespace() {\n return this.spec.whitespace || (this.spec.code ? \"pre\" : \"normal\");\n }\n /**\n Tells you whether this node type has any required attributes.\n */\n hasRequiredAttrs() {\n for (let n in this.attrs)\n if (this.attrs[n].isRequired)\n return true;\n return false;\n }\n /**\n Indicates whether this node allows some of the same content as\n the given node type.\n */\n compatibleContent(other) {\n return this == other || this.contentMatch.compatible(other.contentMatch);\n }\n /**\n @internal\n */\n computeAttrs(attrs) {\n if (!attrs && this.defaultAttrs)\n return this.defaultAttrs;\n else\n return computeAttrs(this.attrs, attrs);\n }\n /**\n Create a `Node` of this type. The given attributes are\n checked and defaulted (you can pass `null` to use the type's\n defaults entirely, if no required attributes exist). `content`\n may be a `Fragment`, a node, an array of nodes, or\n `null`. Similarly `marks` may be `null` to default to the empty\n set of marks.\n */\n create(attrs = null, content, marks) {\n if (this.isText)\n throw new Error(\"NodeType.create can't construct text nodes\");\n return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks));\n }\n /**\n Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content\n against the node type's content restrictions, and throw an error\n if it doesn't match.\n */\n createChecked(attrs = null, content, marks) {\n content = Fragment.from(content);\n this.checkContent(content);\n return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));\n }\n /**\n Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is\n necessary to add nodes to the start or end of the given fragment\n to make it fit the node. If no fitting wrapping can be found,\n return null. Note that, due to the fact that required nodes can\n always be created, this will always succeed if you pass null or\n `Fragment.empty` as content.\n */\n createAndFill(attrs = null, content, marks) {\n attrs = this.computeAttrs(attrs);\n content = Fragment.from(content);\n if (content.size) {\n let before = this.contentMatch.fillBefore(content);\n if (!before)\n return null;\n content = before.append(content);\n }\n let matched = this.contentMatch.matchFragment(content);\n let after = matched && matched.fillBefore(Fragment.empty, true);\n if (!after)\n return null;\n return new Node(this, attrs, content.append(after), Mark.setFrom(marks));\n }\n /**\n Returns true if the given fragment is valid content for this node\n type.\n */\n validContent(content) {\n let result = this.contentMatch.matchFragment(content);\n if (!result || !result.validEnd)\n return false;\n for (let i = 0; i < content.childCount; i++)\n if (!this.allowsMarks(content.child(i).marks))\n return false;\n return true;\n }\n /**\n Throws a RangeError if the given fragment is not valid content for this\n node type.\n @internal\n */\n checkContent(content) {\n if (!this.validContent(content))\n throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0, 50)}`);\n }\n /**\n @internal\n */\n checkAttrs(attrs) {\n checkAttrs(this.attrs, attrs, \"node\", this.name);\n }\n /**\n Check whether the given mark type is allowed in this node.\n */\n allowsMarkType(markType) {\n return this.markSet == null || this.markSet.indexOf(markType) > -1;\n }\n /**\n Test whether the given set of marks are allowed in this node.\n */\n allowsMarks(marks) {\n if (this.markSet == null)\n return true;\n for (let i = 0; i < marks.length; i++)\n if (!this.allowsMarkType(marks[i].type))\n return false;\n return true;\n }\n /**\n Removes the marks that are not allowed in this node from the given set.\n */\n allowedMarks(marks) {\n if (this.markSet == null)\n return marks;\n let copy;\n for (let i = 0; i < marks.length; i++) {\n if (!this.allowsMarkType(marks[i].type)) {\n if (!copy)\n copy = marks.slice(0, i);\n }\n else if (copy) {\n copy.push(marks[i]);\n }\n }\n return !copy ? marks : copy.length ? copy : Mark.none;\n }\n /**\n @internal\n */\n static compile(nodes, schema) {\n let result = Object.create(null);\n nodes.forEach((name, spec) => result[name] = new NodeType(name, schema, spec));\n let topType = schema.spec.topNode || \"doc\";\n if (!result[topType])\n throw new RangeError(\"Schema is missing its top node type ('\" + topType + \"')\");\n if (!result.text)\n throw new RangeError(\"Every schema needs a 'text' type\");\n for (let _ in result.text.attrs)\n throw new RangeError(\"The text node type should not have attributes\");\n return result;\n }\n}\nfunction validateType(typeName, attrName, type) {\n let types = type.split(\"|\");\n return (value) => {\n let name = value === null ? \"null\" : typeof value;\n if (types.indexOf(name) < 0)\n throw new RangeError(`Expected value of type ${types} for attribute ${attrName} on type ${typeName}, got ${name}`);\n };\n}\n// Attribute descriptors\nclass Attribute {\n constructor(typeName, attrName, options) {\n this.hasDefault = Object.prototype.hasOwnProperty.call(options, \"default\");\n this.default = options.default;\n this.validate = typeof options.validate == \"string\" ? validateType(typeName, attrName, options.validate) : options.validate;\n }\n get isRequired() {\n return !this.hasDefault;\n }\n}\n// Marks\n/**\nLike nodes, marks (which are associated with nodes to signify\nthings like emphasis or being part of a link) are\n[tagged](https://prosemirror.net/docs/ref/#model.Mark.type) with type objects, which are\ninstantiated once per `Schema`.\n*/\nclass MarkType {\n /**\n @internal\n */\n constructor(\n /**\n The name of the mark type.\n */\n name, \n /**\n @internal\n */\n rank, \n /**\n The schema that this mark type instance is part of.\n */\n schema, \n /**\n The spec on which the type is based.\n */\n spec) {\n this.name = name;\n this.rank = rank;\n this.schema = schema;\n this.spec = spec;\n this.attrs = initAttrs(name, spec.attrs);\n this.excluded = null;\n let defaults = defaultAttrs(this.attrs);\n this.instance = defaults ? new Mark(this, defaults) : null;\n }\n /**\n Create a mark of this type. `attrs` may be `null` or an object\n containing only some of the mark's attributes. The others, if\n they have defaults, will be added.\n */\n create(attrs = null) {\n if (!attrs && this.instance)\n return this.instance;\n return new Mark(this, computeAttrs(this.attrs, attrs));\n }\n /**\n @internal\n */\n static compile(marks, schema) {\n let result = Object.create(null), rank = 0;\n marks.forEach((name, spec) => result[name] = new MarkType(name, rank++, schema, spec));\n return result;\n }\n /**\n When there is a mark of this type in the given set, a new set\n without it is returned. Otherwise, the input set is returned.\n */\n removeFromSet(set) {\n for (var i = 0; i < set.length; i++)\n if (set[i].type == this) {\n set = set.slice(0, i).concat(set.slice(i + 1));\n i--;\n }\n return set;\n }\n /**\n Tests whether there is a mark of this type in the given set.\n */\n isInSet(set) {\n for (let i = 0; i < set.length; i++)\n if (set[i].type == this)\n return set[i];\n }\n /**\n @internal\n */\n checkAttrs(attrs) {\n checkAttrs(this.attrs, attrs, \"mark\", this.name);\n }\n /**\n Queries whether a given mark type is\n [excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one.\n */\n excludes(other) {\n return this.excluded.indexOf(other) > -1;\n }\n}\n/**\nA document schema. Holds [node](https://prosemirror.net/docs/ref/#model.NodeType) and [mark\ntype](https://prosemirror.net/docs/ref/#model.MarkType) objects for the nodes and marks that may\noccur in conforming documents, and provides functionality for\ncreating and deserializing such documents.\n\nWhen given, the type parameters provide the names of the nodes and\nmarks in this schema.\n*/\nclass Schema {\n /**\n Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).\n */\n constructor(spec) {\n /**\n The [linebreak\n replacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement) node defined\n in this schema, if any.\n */\n this.linebreakReplacement = null;\n /**\n An object for storing whatever values modules may want to\n compute and cache per schema. (If you want to store something\n in it, try to use property names unlikely to clash.)\n */\n this.cached = Object.create(null);\n let instanceSpec = this.spec = {};\n for (let prop in spec)\n instanceSpec[prop] = spec[prop];\n instanceSpec.nodes = OrderedMap.from(spec.nodes),\n instanceSpec.marks = OrderedMap.from(spec.marks || {}),\n this.nodes = NodeType.compile(this.spec.nodes, this);\n this.marks = MarkType.compile(this.spec.marks, this);\n let contentExprCache = Object.create(null);\n for (let prop in this.nodes) {\n if (prop in this.marks)\n throw new RangeError(prop + \" can not be both a node and a mark\");\n let type = this.nodes[prop], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] ||\n (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n if (type.spec.linebreakReplacement) {\n if (this.linebreakReplacement)\n throw new RangeError(\"Multiple linebreak nodes defined\");\n if (!type.isInline || !type.isLeaf)\n throw new RangeError(\"Linebreak replacement nodes must be inline leaf nodes\");\n this.linebreakReplacement = type;\n }\n type.markSet = markExpr == \"_\" ? null :\n markExpr ? gatherMarks(this, markExpr.split(\" \")) :\n markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (let prop in this.marks) {\n let type = this.marks[prop], excl = type.spec.excludes;\n type.excluded = excl == null ? [type] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this);\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n this.cached.wrappings = Object.create(null);\n }\n /**\n Create a node in this schema. The `type` may be a string or a\n `NodeType` instance. Attributes will be extended with defaults,\n `content` may be a `Fragment`, `null`, a `Node`, or an array of\n nodes.\n */\n node(type, attrs = null, content, marks) {\n if (typeof type == \"string\")\n type = this.nodeType(type);\n else if (!(type instanceof NodeType))\n throw new RangeError(\"Invalid node type: \" + type);\n else if (type.schema != this)\n throw new RangeError(\"Node type from different schema used (\" + type.name + \")\");\n return type.createChecked(attrs, content, marks);\n }\n /**\n Create a text node in the schema. Empty text nodes are not\n allowed.\n */\n text(text, marks) {\n let type = this.nodes.text;\n return new TextNode(type, type.defaultAttrs, text, Mark.setFrom(marks));\n }\n /**\n Create a mark with the given type and attributes.\n */\n mark(type, attrs) {\n if (typeof type == \"string\")\n type = this.marks[type];\n return type.create(attrs);\n }\n /**\n Deserialize a node from its JSON representation. This method is\n bound.\n */\n nodeFromJSON(json) {\n return Node.fromJSON(this, json);\n }\n /**\n Deserialize a mark from its JSON representation. This method is\n bound.\n */\n markFromJSON(json) {\n return Mark.fromJSON(this, json);\n }\n /**\n @internal\n */\n nodeType(name) {\n let found = this.nodes[name];\n if (!found)\n throw new RangeError(\"Unknown node type: \" + name);\n return found;\n }\n}\nfunction gatherMarks(schema, marks) {\n let found = [];\n for (let i = 0; i < marks.length; i++) {\n let name = marks[i], mark = schema.marks[name], ok = mark;\n if (mark) {\n found.push(mark);\n }\n else {\n for (let prop in schema.marks) {\n let mark = schema.marks[prop];\n if (name == \"_\" || (mark.spec.group && mark.spec.group.split(\" \").indexOf(name) > -1))\n found.push(ok = mark);\n }\n }\n if (!ok)\n throw new SyntaxError(\"Unknown mark type: '\" + marks[i] + \"'\");\n }\n return found;\n}\n\nfunction isTagRule(rule) { return rule.tag != null; }\nfunction isStyleRule(rule) { return rule.style != null; }\n/**\nA DOM parser represents a strategy for parsing DOM content into a\nProseMirror document conforming to a given schema. Its behavior is\ndefined by an array of [rules](https://prosemirror.net/docs/ref/#model.ParseRule).\n*/\nclass DOMParser {\n /**\n Create a parser that targets the given schema, using the given\n parsing rules.\n */\n constructor(\n /**\n The schema into which the parser parses.\n */\n schema, \n /**\n The set of [parse rules](https://prosemirror.net/docs/ref/#model.ParseRule) that the parser\n uses, in order of precedence.\n */\n rules) {\n this.schema = schema;\n this.rules = rules;\n /**\n @internal\n */\n this.tags = [];\n /**\n @internal\n */\n this.styles = [];\n let matchedStyles = this.matchedStyles = [];\n rules.forEach(rule => {\n if (isTagRule(rule)) {\n this.tags.push(rule);\n }\n else if (isStyleRule(rule)) {\n let prop = /[^=]*/.exec(rule.style)[0];\n if (matchedStyles.indexOf(prop) < 0)\n matchedStyles.push(prop);\n this.styles.push(rule);\n }\n });\n // Only normalize list elements when lists in the schema can't directly contain themselves\n this.normalizeLists = !this.tags.some(r => {\n if (!/^(ul|ol)\\b/.test(r.tag) || !r.node)\n return false;\n let node = schema.nodes[r.node];\n return node.contentMatch.matchType(node);\n });\n }\n /**\n Parse a document from the content of a DOM node.\n */\n parse(dom, options = {}) {\n let context = new ParseContext(this, options, false);\n context.addAll(dom, Mark.none, options.from, options.to);\n return context.finish();\n }\n /**\n Parses the content of the given DOM node, like\n [`parse`](https://prosemirror.net/docs/ref/#model.DOMParser.parse), and takes the same set of\n options. But unlike that method, which produces a whole node,\n this one returns a slice that is open at the sides, meaning that\n the schema constraints aren't applied to the start of nodes to\n the left of the input and the end of nodes at the end.\n */\n parseSlice(dom, options = {}) {\n let context = new ParseContext(this, options, true);\n context.addAll(dom, Mark.none, options.from, options.to);\n return Slice.maxOpen(context.finish());\n }\n /**\n @internal\n */\n matchTag(dom, context, after) {\n for (let i = after ? this.tags.indexOf(after) + 1 : 0; i < this.tags.length; i++) {\n let rule = this.tags[i];\n if (matches(dom, rule.tag) &&\n (rule.namespace === undefined || dom.namespaceURI == rule.namespace) &&\n (!rule.context || context.matchesContext(rule.context))) {\n if (rule.getAttrs) {\n let result = rule.getAttrs(dom);\n if (result === false)\n continue;\n rule.attrs = result || undefined;\n }\n return rule;\n }\n }\n }\n /**\n @internal\n */\n matchStyle(prop, value, context, after) {\n for (let i = after ? this.styles.indexOf(after) + 1 : 0; i < this.styles.length; i++) {\n let rule = this.styles[i], style = rule.style;\n if (style.indexOf(prop) != 0 ||\n rule.context && !context.matchesContext(rule.context) ||\n // Test that the style string either precisely matches the prop,\n // or has an '=' sign after the prop, followed by the given\n // value.\n style.length > prop.length &&\n (style.charCodeAt(prop.length) != 61 || style.slice(prop.length + 1) != value))\n continue;\n if (rule.getAttrs) {\n let result = rule.getAttrs(value);\n if (result === false)\n continue;\n rule.attrs = result || undefined;\n }\n return rule;\n }\n }\n /**\n @internal\n */\n static schemaRules(schema) {\n let result = [];\n function insert(rule) {\n let priority = rule.priority == null ? 50 : rule.priority, i = 0;\n for (; i < result.length; i++) {\n let next = result[i], nextPriority = next.priority == null ? 50 : next.priority;\n if (nextPriority < priority)\n break;\n }\n result.splice(i, 0, rule);\n }\n for (let name in schema.marks) {\n let rules = schema.marks[name].spec.parseDOM;\n if (rules)\n rules.forEach(rule => {\n insert(rule = copy(rule));\n if (!(rule.mark || rule.ignore || rule.clearMark))\n rule.mark = name;\n });\n }\n for (let name in schema.nodes) {\n let rules = schema.nodes[name].spec.parseDOM;\n if (rules)\n rules.forEach(rule => {\n insert(rule = copy(rule));\n if (!(rule.node || rule.ignore || rule.mark))\n rule.node = name;\n });\n }\n return result;\n }\n /**\n Construct a DOM parser using the parsing rules listed in a\n schema's [node specs](https://prosemirror.net/docs/ref/#model.NodeSpec.parseDOM), reordered by\n [priority](https://prosemirror.net/docs/ref/#model.ParseRule.priority).\n */\n static fromSchema(schema) {\n return schema.cached.domParser ||\n (schema.cached.domParser = new DOMParser(schema, DOMParser.schemaRules(schema)));\n }\n}\nconst blockTags = {\n address: true, article: true, aside: true, blockquote: true, canvas: true,\n dd: true, div: true, dl: true, fieldset: true, figcaption: true, figure: true,\n footer: true, form: true, h1: true, h2: true, h3: true, h4: true, h5: true,\n h6: true, header: true, hgroup: true, hr: true, li: true, noscript: true, ol: true,\n output: true, p: true, pre: true, section: true, table: true, tfoot: true, ul: true\n};\nconst ignoreTags = {\n head: true, noscript: true, object: true, script: true, style: true, title: true\n};\nconst listTags = { ol: true, ul: true };\n// Using a bitfield for node context options\nconst OPT_PRESERVE_WS = 1, OPT_PRESERVE_WS_FULL = 2, OPT_OPEN_LEFT = 4;\nfunction wsOptionsFor(type, preserveWhitespace, base) {\n if (preserveWhitespace != null)\n return (preserveWhitespace ? OPT_PRESERVE_WS : 0) |\n (preserveWhitespace === \"full\" ? OPT_PRESERVE_WS_FULL : 0);\n return type && type.whitespace == \"pre\" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base & ~OPT_OPEN_LEFT;\n}\nclass NodeContext {\n constructor(type, attrs, marks, solid, match, options) {\n this.type = type;\n this.attrs = attrs;\n this.marks = marks;\n this.solid = solid;\n this.options = options;\n this.content = [];\n // Marks applied to the node's children\n this.activeMarks = Mark.none;\n this.match = match || (options & OPT_OPEN_LEFT ? null : type.contentMatch);\n }\n findWrapping(node) {\n if (!this.match) {\n if (!this.type)\n return [];\n let fill = this.type.contentMatch.fillBefore(Fragment.from(node));\n if (fill) {\n this.match = this.type.contentMatch.matchFragment(fill);\n }\n else {\n let start = this.type.contentMatch, wrap;\n if (wrap = start.findWrapping(node.type)) {\n this.match = start;\n return wrap;\n }\n else {\n return null;\n }\n }\n }\n return this.match.findWrapping(node.type);\n }\n finish(openEnd) {\n if (!(this.options & OPT_PRESERVE_WS)) { // Strip trailing whitespace\n let last = this.content[this.content.length - 1], m;\n if (last && last.isText && (m = /[ \\t\\r\\n\\u000c]+$/.exec(last.text))) {\n let text = last;\n if (last.text.length == m[0].length)\n this.content.pop();\n else\n this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m[0].length));\n }\n }\n let content = Fragment.from(this.content);\n if (!openEnd && this.match)\n content = content.append(this.match.fillBefore(Fragment.empty, true));\n return this.type ? this.type.create(this.attrs, content, this.marks) : content;\n }\n inlineContext(node) {\n if (this.type)\n return this.type.inlineContent;\n if (this.content.length)\n return this.content[0].isInline;\n return node.parentNode && !blockTags.hasOwnProperty(node.parentNode.nodeName.toLowerCase());\n }\n}\nclass ParseContext {\n constructor(\n // The parser we are using.\n parser, \n // The options passed to this parse.\n options, isOpen) {\n this.parser = parser;\n this.options = options;\n this.isOpen = isOpen;\n this.open = 0;\n this.localPreserveWS = false;\n let topNode = options.topNode, topContext;\n let topOptions = wsOptionsFor(null, options.preserveWhitespace, 0) | (isOpen ? OPT_OPEN_LEFT : 0);\n if (topNode)\n topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, true, options.topMatch || topNode.type.contentMatch, topOptions);\n else if (isOpen)\n topContext = new NodeContext(null, null, Mark.none, true, null, topOptions);\n else\n topContext = new NodeContext(parser.schema.topNodeType, null, Mark.none, true, null, topOptions);\n this.nodes = [topContext];\n this.find = options.findPositions;\n this.needsBlock = false;\n }\n get top() {\n return this.nodes[this.open];\n }\n // Add a DOM node to the content. Text is inserted as text node,\n // otherwise, the node is passed to `addElement` or, if it has a\n // `style` attribute, `addElementWithStyles`.\n addDOM(dom, marks) {\n if (dom.nodeType == 3)\n this.addTextNode(dom, marks);\n else if (dom.nodeType == 1)\n this.addElement(dom, marks);\n }\n addTextNode(dom, marks) {\n let value = dom.nodeValue;\n let top = this.top, preserveWS = (top.options & OPT_PRESERVE_WS_FULL) ? \"full\"\n : this.localPreserveWS || (top.options & OPT_PRESERVE_WS) > 0;\n if (preserveWS === \"full\" ||\n top.inlineContext(dom) ||\n /[^ \\t\\r\\n\\u000c]/.test(value)) {\n if (!preserveWS) {\n value = value.replace(/[ \\t\\r\\n\\u000c]+/g, \" \");\n // If this starts with whitespace, and there is no node before it, or\n // a hard break, or a text node that ends with whitespace, strip the\n // leading space.\n if (/^[ \\t\\r\\n\\u000c]/.test(value) && this.open == this.nodes.length - 1) {\n let nodeBefore = top.content[top.content.length - 1];\n let domNodeBefore = dom.previousSibling;\n if (!nodeBefore ||\n (domNodeBefore && domNodeBefore.nodeName == 'BR') ||\n (nodeBefore.isText && /[ \\t\\r\\n\\u000c]$/.test(nodeBefore.text)))\n value = value.slice(1);\n }\n }\n else if (preserveWS !== \"full\") {\n value = value.replace(/\\r?\\n|\\r/g, \" \");\n }\n else {\n value = value.replace(/\\r\\n?/g, \"\\n\");\n }\n if (value)\n this.insertNode(this.parser.schema.text(value), marks, !/\\S/.test(value));\n this.findInText(dom);\n }\n else {\n this.findInside(dom);\n }\n }\n // Try to find a handler for the given tag and use that to parse. If\n // none is found, the element's content nodes are added directly.\n addElement(dom, marks, matchAfter) {\n let outerWS = this.localPreserveWS, top = this.top;\n if (dom.tagName == \"PRE\" || /pre/.test(dom.style && dom.style.whiteSpace))\n this.localPreserveWS = true;\n let name = dom.nodeName.toLowerCase(), ruleID;\n if (listTags.hasOwnProperty(name) && this.parser.normalizeLists)\n normalizeList(dom);\n let rule = (this.options.ruleFromNode && this.options.ruleFromNode(dom)) ||\n (ruleID = this.parser.matchTag(dom, this, matchAfter));\n out: if (rule ? rule.ignore : ignoreTags.hasOwnProperty(name)) {\n this.findInside(dom);\n this.ignoreFallback(dom, marks);\n }\n else if (!rule || rule.skip || rule.closeParent) {\n if (rule && rule.closeParent)\n this.open = Math.max(0, this.open - 1);\n else if (rule && rule.skip.nodeType)\n dom = rule.skip;\n let sync, oldNeedsBlock = this.needsBlock;\n if (blockTags.hasOwnProperty(name)) {\n if (top.content.length && top.content[0].isInline && this.open) {\n this.open--;\n top = this.top;\n }\n sync = true;\n if (!top.type)\n this.needsBlock = true;\n }\n else if (!dom.firstChild) {\n this.leafFallback(dom, marks);\n break out;\n }\n let innerMarks = rule && rule.skip ? marks : this.readStyles(dom, marks);\n if (innerMarks)\n this.addAll(dom, innerMarks);\n if (sync)\n this.sync(top);\n this.needsBlock = oldNeedsBlock;\n }\n else {\n let innerMarks = this.readStyles(dom, marks);\n if (innerMarks)\n this.addElementByRule(dom, rule, innerMarks, rule.consuming === false ? ruleID : undefined);\n }\n this.localPreserveWS = outerWS;\n }\n // Called for leaf DOM nodes that would otherwise be ignored\n leafFallback(dom, marks) {\n if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent)\n this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\"), marks);\n }\n // Called for ignored nodes\n ignoreFallback(dom, marks) {\n // Ignored BR nodes should at least create an inline context\n if (dom.nodeName == \"BR\" && (!this.top.type || !this.top.type.inlineContent))\n this.findPlace(this.parser.schema.text(\"-\"), marks, true);\n }\n // Run any style parser associated with the node's styles. Either\n // return an updated array of marks, or null to indicate some of the\n // styles had a rule with `ignore` set.\n readStyles(dom, marks) {\n let styles = dom.style;\n // Because many properties will only show up in 'normalized' form\n // in `style.item` (i.e. text-decoration becomes\n // text-decoration-line, text-decoration-color, etc), we directly\n // query the styles mentioned in our rules instead of iterating\n // over the items.\n if (styles && styles.length)\n for (let i = 0; i < this.parser.matchedStyles.length; i++) {\n let name = this.parser.matchedStyles[i], value = styles.getPropertyValue(name);\n if (value)\n for (let after = undefined;;) {\n let rule = this.parser.matchStyle(name, value, this, after);\n if (!rule)\n break;\n if (rule.ignore)\n return null;\n if (rule.clearMark)\n marks = marks.filter(m => !rule.clearMark(m));\n else\n marks = marks.concat(this.parser.schema.marks[rule.mark].create(rule.attrs));\n if (rule.consuming === false)\n after = rule;\n else\n break;\n }\n }\n return marks;\n }\n // Look up a handler for the given node. If none are found, return\n // false. Otherwise, apply it, use its return value to drive the way\n // the node's content is wrapped, and return true.\n addElementByRule(dom, rule, marks, continueAfter) {\n let sync, nodeType;\n if (rule.node) {\n nodeType = this.parser.schema.nodes[rule.node];\n if (!nodeType.isLeaf) {\n let inner = this.enter(nodeType, rule.attrs || null, marks, rule.preserveWhitespace);\n if (inner) {\n sync = true;\n marks = inner;\n }\n }\n else if (!this.insertNode(nodeType.create(rule.attrs), marks, dom.nodeName == \"BR\")) {\n this.leafFallback(dom, marks);\n }\n }\n else {\n let markType = this.parser.schema.marks[rule.mark];\n marks = marks.concat(markType.create(rule.attrs));\n }\n let startIn = this.top;\n if (nodeType && nodeType.isLeaf) {\n this.findInside(dom);\n }\n else if (continueAfter) {\n this.addElement(dom, marks, continueAfter);\n }\n else if (rule.getContent) {\n this.findInside(dom);\n rule.getContent(dom, this.parser.schema).forEach(node => this.insertNode(node, marks, false));\n }\n else {\n let contentDOM = dom;\n if (typeof rule.contentElement == \"string\")\n contentDOM = dom.querySelector(rule.contentElement);\n else if (typeof rule.contentElement == \"function\")\n contentDOM = rule.contentElement(dom);\n else if (rule.contentElement)\n contentDOM = rule.contentElement;\n this.findAround(dom, contentDOM, true);\n this.addAll(contentDOM, marks);\n this.findAround(dom, contentDOM, false);\n }\n if (sync && this.sync(startIn))\n this.open--;\n }\n // Add all child nodes between `startIndex` and `endIndex` (or the\n // whole node, if not given). If `sync` is passed, use it to\n // synchronize after every block element.\n addAll(parent, marks, startIndex, endIndex) {\n let index = startIndex || 0;\n for (let dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild, end = endIndex == null ? null : parent.childNodes[endIndex]; dom != end; dom = dom.nextSibling, ++index) {\n this.findAtPoint(parent, index);\n this.addDOM(dom, marks);\n }\n this.findAtPoint(parent, index);\n }\n // Try to find a way to fit the given node type into the current\n // context. May add intermediate wrappers and/or leave non-solid\n // nodes that we're in.\n findPlace(node, marks, cautious) {\n let route, sync;\n for (let depth = this.open, penalty = 0; depth >= 0; depth--) {\n let cx = this.nodes[depth];\n let found = cx.findWrapping(node);\n if (found && (!route || route.length > found.length + penalty)) {\n route = found;\n sync = cx;\n if (!found.length)\n break;\n }\n if (cx.solid) {\n if (cautious)\n break;\n penalty += 2;\n }\n }\n if (!route)\n return null;\n this.sync(sync);\n for (let i = 0; i < route.length; i++)\n marks = this.enterInner(route[i], null, marks, false);\n return marks;\n }\n // Try to insert the given node, adjusting the context when needed.\n insertNode(node, marks, cautious) {\n if (node.isInline && this.needsBlock && !this.top.type) {\n let block = this.textblockFromContext();\n if (block)\n marks = this.enterInner(block, null, marks);\n }\n let innerMarks = this.findPlace(node, marks, cautious);\n if (innerMarks) {\n this.closeExtra();\n let top = this.top;\n if (top.match)\n top.match = top.match.matchType(node.type);\n let nodeMarks = Mark.none;\n for (let m of innerMarks.concat(node.marks))\n if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, node.type))\n nodeMarks = m.addToSet(nodeMarks);\n top.content.push(node.mark(nodeMarks));\n return true;\n }\n return false;\n }\n // Try to start a node of the given type, adjusting the context when\n // necessary.\n enter(type, attrs, marks, preserveWS) {\n let innerMarks = this.findPlace(type.create(attrs), marks, false);\n if (innerMarks)\n innerMarks = this.enterInner(type, attrs, marks, true, preserveWS);\n return innerMarks;\n }\n // Open a node of the given type\n enterInner(type, attrs, marks, solid = false, preserveWS) {\n this.closeExtra();\n let top = this.top;\n top.match = top.match && top.match.matchType(type);\n let options = wsOptionsFor(type, preserveWS, top.options);\n if ((top.options & OPT_OPEN_LEFT) && top.content.length == 0)\n options |= OPT_OPEN_LEFT;\n let applyMarks = Mark.none;\n marks = marks.filter(m => {\n if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, type)) {\n applyMarks = m.addToSet(applyMarks);\n return false;\n }\n return true;\n });\n this.nodes.push(new NodeContext(type, attrs, applyMarks, solid, null, options));\n this.open++;\n return marks;\n }\n // Make sure all nodes above this.open are finished and added to\n // their parents\n closeExtra(openEnd = false) {\n let i = this.nodes.length - 1;\n if (i > this.open) {\n for (; i > this.open; i--)\n this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd));\n this.nodes.length = this.open + 1;\n }\n }\n finish() {\n this.open = 0;\n this.closeExtra(this.isOpen);\n return this.nodes[0].finish(!!(this.isOpen || this.options.topOpen));\n }\n sync(to) {\n for (let i = this.open; i >= 0; i--) {\n if (this.nodes[i] == to) {\n this.open = i;\n return true;\n }\n else if (this.localPreserveWS) {\n this.nodes[i].options |= OPT_PRESERVE_WS;\n }\n }\n return false;\n }\n get currentPos() {\n this.closeExtra();\n let pos = 0;\n for (let i = this.open; i >= 0; i--) {\n let content = this.nodes[i].content;\n for (let j = content.length - 1; j >= 0; j--)\n pos += content[j].nodeSize;\n if (i)\n pos++;\n }\n return pos;\n }\n findAtPoint(parent, offset) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].node == parent && this.find[i].offset == offset)\n this.find[i].pos = this.currentPos;\n }\n }\n findInside(parent) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node))\n this.find[i].pos = this.currentPos;\n }\n }\n findAround(parent, content, before) {\n if (parent != content && this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n let pos = content.compareDocumentPosition(this.find[i].node);\n if (pos & (before ? 2 : 4))\n this.find[i].pos = this.currentPos;\n }\n }\n }\n findInText(textNode) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].node == textNode)\n this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset);\n }\n }\n // Determines whether the given context string matches this context.\n matchesContext(context) {\n if (context.indexOf(\"|\") > -1)\n return context.split(/\\s*\\|\\s*/).some(this.matchesContext, this);\n let parts = context.split(\"/\");\n let option = this.options.context;\n let useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type);\n let minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1);\n let match = (i, depth) => {\n for (; i >= 0; i--) {\n let part = parts[i];\n if (part == \"\") {\n if (i == parts.length - 1 || i == 0)\n continue;\n for (; depth >= minDepth; depth--)\n if (match(i - 1, depth))\n return true;\n return false;\n }\n else {\n let next = depth > 0 || (depth == 0 && useRoot) ? this.nodes[depth].type\n : option && depth >= minDepth ? option.node(depth - minDepth).type\n : null;\n if (!next || (next.name != part && !next.isInGroup(part)))\n return false;\n depth--;\n }\n }\n return true;\n };\n return match(parts.length - 1, this.open);\n }\n textblockFromContext() {\n let $context = this.options.context;\n if ($context)\n for (let d = $context.depth; d >= 0; d--) {\n let deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;\n if (deflt && deflt.isTextblock && deflt.defaultAttrs)\n return deflt;\n }\n for (let name in this.parser.schema.nodes) {\n let type = this.parser.schema.nodes[name];\n if (type.isTextblock && type.defaultAttrs)\n return type;\n }\n }\n}\n// Kludge to work around directly nested list nodes produced by some\n// tools and allowed by browsers to mean that the nested list is\n// actually part of the list item above it.\nfunction normalizeList(dom) {\n for (let child = dom.firstChild, prevItem = null; child; child = child.nextSibling) {\n let name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null;\n if (name && listTags.hasOwnProperty(name) && prevItem) {\n prevItem.appendChild(child);\n child = prevItem;\n }\n else if (name == \"li\") {\n prevItem = child;\n }\n else if (name) {\n prevItem = null;\n }\n }\n}\n// Apply a CSS selector.\nfunction matches(dom, selector) {\n return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector);\n}\nfunction copy(obj) {\n let copy = {};\n for (let prop in obj)\n copy[prop] = obj[prop];\n return copy;\n}\n// Used when finding a mark at the top level of a fragment parse.\n// Checks whether it would be reasonable to apply a given mark type to\n// a given node, by looking at the way the mark occurs in the schema.\nfunction markMayApply(markType, nodeType) {\n let nodes = nodeType.schema.nodes;\n for (let name in nodes) {\n let parent = nodes[name];\n if (!parent.allowsMarkType(markType))\n continue;\n let seen = [], scan = (match) => {\n seen.push(match);\n for (let i = 0; i < match.edgeCount; i++) {\n let { type, next } = match.edge(i);\n if (type == nodeType)\n return true;\n if (seen.indexOf(next) < 0 && scan(next))\n return true;\n }\n };\n if (scan(parent.contentMatch))\n return true;\n }\n}\n\n/**\nA DOM serializer knows how to convert ProseMirror nodes and\nmarks of various types to DOM nodes.\n*/\nclass DOMSerializer {\n /**\n Create a serializer. `nodes` should map node names to functions\n that take a node and return a description of the corresponding\n DOM. `marks` does the same for mark names, but also gets an\n argument that tells it whether the mark's content is block or\n inline content (for typical use, it'll always be inline). A mark\n serializer may be `null` to indicate that marks of that type\n should not be serialized.\n */\n constructor(\n /**\n The node serialization functions.\n */\n nodes, \n /**\n The mark serialization functions.\n */\n marks) {\n this.nodes = nodes;\n this.marks = marks;\n }\n /**\n Serialize the content of this fragment to a DOM fragment. When\n not in the browser, the `document` option, containing a DOM\n document, should be passed so that the serializer can create\n nodes.\n */\n serializeFragment(fragment, options = {}, target) {\n if (!target)\n target = doc(options).createDocumentFragment();\n let top = target, active = [];\n fragment.forEach(node => {\n if (active.length || node.marks.length) {\n let keep = 0, rendered = 0;\n while (keep < active.length && rendered < node.marks.length) {\n let next = node.marks[rendered];\n if (!this.marks[next.type.name]) {\n rendered++;\n continue;\n }\n if (!next.eq(active[keep][0]) || next.type.spec.spanning === false)\n break;\n keep++;\n rendered++;\n }\n while (keep < active.length)\n top = active.pop()[1];\n while (rendered < node.marks.length) {\n let add = node.marks[rendered++];\n let markDOM = this.serializeMark(add, node.isInline, options);\n if (markDOM) {\n active.push([add, top]);\n top.appendChild(markDOM.dom);\n top = markDOM.contentDOM || markDOM.dom;\n }\n }\n }\n top.appendChild(this.serializeNodeInner(node, options));\n });\n return target;\n }\n /**\n @internal\n */\n serializeNodeInner(node, options) {\n let { dom, contentDOM } = renderSpec(doc(options), this.nodes[node.type.name](node), null, node.attrs);\n if (contentDOM) {\n if (node.isLeaf)\n throw new RangeError(\"Content hole not allowed in a leaf node spec\");\n this.serializeFragment(node.content, options, contentDOM);\n }\n return dom;\n }\n /**\n Serialize this node to a DOM node. This can be useful when you\n need to serialize a part of a document, as opposed to the whole\n document. To serialize a whole document, use\n [`serializeFragment`](https://prosemirror.net/docs/ref/#model.DOMSerializer.serializeFragment) on\n its [content](https://prosemirror.net/docs/ref/#model.Node.content).\n */\n serializeNode(node, options = {}) {\n let dom = this.serializeNodeInner(node, options);\n for (let i = node.marks.length - 1; i >= 0; i--) {\n let wrap = this.serializeMark(node.marks[i], node.isInline, options);\n if (wrap) {\n (wrap.contentDOM || wrap.dom).appendChild(dom);\n dom = wrap.dom;\n }\n }\n return dom;\n }\n /**\n @internal\n */\n serializeMark(mark, inline, options = {}) {\n let toDOM = this.marks[mark.type.name];\n return toDOM && renderSpec(doc(options), toDOM(mark, inline), null, mark.attrs);\n }\n static renderSpec(doc, structure, xmlNS = null, blockArraysIn) {\n return renderSpec(doc, structure, xmlNS, blockArraysIn);\n }\n /**\n Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)\n properties in a schema's node and mark specs.\n */\n static fromSchema(schema) {\n return schema.cached.domSerializer ||\n (schema.cached.domSerializer = new DOMSerializer(this.nodesFromSchema(schema), this.marksFromSchema(schema)));\n }\n /**\n Gather the serializers in a schema's node specs into an object.\n This can be useful as a base to build a custom serializer from.\n */\n static nodesFromSchema(schema) {\n let result = gatherToDOM(schema.nodes);\n if (!result.text)\n result.text = node => node.text;\n return result;\n }\n /**\n Gather the serializers in a schema's mark specs into an object.\n */\n static marksFromSchema(schema) {\n return gatherToDOM(schema.marks);\n }\n}\nfunction gatherToDOM(obj) {\n let result = {};\n for (let name in obj) {\n let toDOM = obj[name].spec.toDOM;\n if (toDOM)\n result[name] = toDOM;\n }\n return result;\n}\nfunction doc(options) {\n return options.document || window.document;\n}\nconst suspiciousAttributeCache = new WeakMap();\nfunction suspiciousAttributes(attrs) {\n let value = suspiciousAttributeCache.get(attrs);\n if (value === undefined)\n suspiciousAttributeCache.set(attrs, value = suspiciousAttributesInner(attrs));\n return value;\n}\nfunction suspiciousAttributesInner(attrs) {\n let result = null;\n function scan(value) {\n if (value && typeof value == \"object\") {\n if (Array.isArray(value)) {\n if (typeof value[0] == \"string\") {\n if (!result)\n result = [];\n result.push(value);\n }\n else {\n for (let i = 0; i < value.length; i++)\n scan(value[i]);\n }\n }\n else {\n for (let prop in value)\n scan(value[prop]);\n }\n }\n }\n scan(attrs);\n return result;\n}\nfunction renderSpec(doc, structure, xmlNS, blockArraysIn) {\n if (typeof structure == \"string\")\n return { dom: doc.createTextNode(structure) };\n if (structure.nodeType != null)\n return { dom: structure };\n if (structure.dom && structure.dom.nodeType != null)\n return structure;\n let tagName = structure[0], suspicious;\n if (typeof tagName != \"string\")\n throw new RangeError(\"Invalid array passed to renderSpec\");\n if (blockArraysIn && (suspicious = suspiciousAttributes(blockArraysIn)) &&\n suspicious.indexOf(structure) > -1)\n throw new RangeError(\"Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.\");\n let space = tagName.indexOf(\" \");\n if (space > 0) {\n xmlNS = tagName.slice(0, space);\n tagName = tagName.slice(space + 1);\n }\n let contentDOM;\n let dom = (xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName));\n let attrs = structure[1], start = 1;\n if (attrs && typeof attrs == \"object\" && attrs.nodeType == null && !Array.isArray(attrs)) {\n start = 2;\n for (let name in attrs)\n if (attrs[name] != null) {\n let space = name.indexOf(\" \");\n if (space > 0)\n dom.setAttributeNS(name.slice(0, space), name.slice(space + 1), attrs[name]);\n else\n dom.setAttribute(name, attrs[name]);\n }\n }\n for (let i = start; i < structure.length; i++) {\n let child = structure[i];\n if (child === 0) {\n if (i < structure.length - 1 || i > start)\n throw new RangeError(\"Content hole must be the only child of its parent node\");\n return { dom, contentDOM: dom };\n }\n else {\n let { dom: inner, contentDOM: innerContent } = renderSpec(doc, child, xmlNS, blockArraysIn);\n dom.appendChild(inner);\n if (innerContent) {\n if (contentDOM)\n throw new RangeError(\"Multiple content holes\");\n contentDOM = innerContent;\n }\n }\n }\n return { dom, contentDOM };\n}\n\nexport { ContentMatch, DOMParser, DOMSerializer, Fragment, Mark, MarkType, Node, NodeRange, NodeType, ReplaceError, ResolvedPos, Schema, Slice };\n",null,null],"names":["yDocToProsemirrorJSON","prosemirrorJSONToYDoc","Doc","encodeStateAsUpdate","applyUpdate","StarterKit","getSchema"],"mappings":";;;;;;;AAAA;AACA;AACA,SAAS,UAAU,CAAC,OAAO,EAAE;AAC7B,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO;AACxB;;AAEA,UAAU,CAAC,SAAS,GAAG;AACvB,EAAE,WAAW,EAAE,UAAU;;AAEzB,EAAE,IAAI,EAAE,SAAS,GAAG,EAAE;AACtB,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC;AACnD,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,OAAO;AAC1C,IAAI,OAAO;AACX,GAAG;;AAEH;AACA;AACA;AACA,EAAE,GAAG,EAAE,SAAS,GAAG,EAAE;AACrB,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,CAA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UAAU;AAEnC,QAAA,OAAO,IAAI;;IAGZ,QAAQ,CAAC,QAAa,EAAE,SAAkC,EAAA;QACzD,OAAO,sBAAsB,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;;AAG5D,IAAA,MAAM,CACL,QAAa,EACb,SAAoC,GAAA,SAAS,EAC7C,UAAuB,EAAA;AAEvB,QAAA,OAAO,sBAAsB,CAAC,MAAM,CACnC,QAAQ,EACR,SAAS,EACTC,cAAS,CAAC,UAAU,IAAI,IAAI,CAAC,iBAAiB,CAAC,CAC/C;;AAEF;AAEY,MAAA,iBAAiB,GAAG,IAAI,MAAM;;;;;;","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js deleted file mode 100644 index 9c0baba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js +++ /dev/null @@ -1,2740 +0,0 @@ -import { Doc, encodeStateAsUpdate, applyUpdate } from 'yjs'; -import { yDocToProsemirrorJSON, prosemirrorJSONToYDoc } from 'y-prosemirror'; -import { getSchema } from '@tiptap/core'; -import { StarterKit } from '@tiptap/starter-kit'; - -// ::- Persistent data structure representing an ordered mapping from -// strings to values, with some convenient update methods. -function OrderedMap(content) { - this.content = content; -} - -OrderedMap.prototype = { - constructor: OrderedMap, - - find: function(key) { - for (var i = 0; i < this.content.length; i += 2) - if (this.content[i] === key) return i - return -1 - }, - - // :: (string) → ?any - // Retrieve the value stored under `key`, or return undefined when - // no such key exists. - get: function(key) { - var found = this.find(key); - return found == -1 ? undefined : this.content[found + 1] - }, - - // :: (string, any, ?string) → OrderedMap - // Create a new map by replacing the value of `key` with a new - // value, or adding a binding to the end of the map. If `newKey` is - // given, the key of the binding will be replaced with that key. - update: function(key, value, newKey) { - var self = newKey && newKey != key ? this.remove(newKey) : this; - var found = self.find(key), content = self.content.slice(); - if (found == -1) { - content.push(newKey || key, value); - } else { - content[found + 1] = value; - if (newKey) content[found] = newKey; - } - return new OrderedMap(content) - }, - - // :: (string) → OrderedMap - // Return a map with the given key removed, if it existed. - remove: function(key) { - var found = this.find(key); - if (found == -1) return this - var content = this.content.slice(); - content.splice(found, 2); - return new OrderedMap(content) - }, - - // :: (string, any) → OrderedMap - // Add a new key to the start of the map. - addToStart: function(key, value) { - return new OrderedMap([key, value].concat(this.remove(key).content)) - }, - - // :: (string, any) → OrderedMap - // Add a new key to the end of the map. - addToEnd: function(key, value) { - var content = this.remove(key).content.slice(); - content.push(key, value); - return new OrderedMap(content) - }, - - // :: (string, string, any) → OrderedMap - // Add a key after the given key. If `place` is not found, the new - // key is added to the end. - addBefore: function(place, key, value) { - var without = this.remove(key), content = without.content.slice(); - var found = without.find(place); - content.splice(found == -1 ? content.length : found, 0, key, value); - return new OrderedMap(content) - }, - - // :: ((key: string, value: any)) - // Call the given function for each key/value pair in the map, in - // order. - forEach: function(f) { - for (var i = 0; i < this.content.length; i += 2) - f(this.content[i], this.content[i + 1]); - }, - - // :: (union) → OrderedMap - // Create a new map by prepending the keys in this map that don't - // appear in `map` before the keys in `map`. - prepend: function(map) { - map = OrderedMap.from(map); - if (!map.size) return this - return new OrderedMap(map.content.concat(this.subtract(map).content)) - }, - - // :: (union) → OrderedMap - // Create a new map by appending the keys in this map that don't - // appear in `map` after the keys in `map`. - append: function(map) { - map = OrderedMap.from(map); - if (!map.size) return this - return new OrderedMap(this.subtract(map).content.concat(map.content)) - }, - - // :: (union) → OrderedMap - // Create a map containing all the keys in this map that don't - // appear in `map`. - subtract: function(map) { - var result = this; - map = OrderedMap.from(map); - for (var i = 0; i < map.content.length; i += 2) - result = result.remove(map.content[i]); - return result - }, - - // :: () → Object - // Turn ordered map into a plain object. - toObject: function() { - var result = {}; - this.forEach(function(key, value) { result[key] = value; }); - return result - }, - - // :: number - // The amount of keys in this map. - get size() { - return this.content.length >> 1 - } -}; - -// :: (?union) → OrderedMap -// Return a map with the given content. If null, create an empty -// map. If given an ordered map, return that map itself. If given an -// object, create a map from the object's properties. -OrderedMap.from = function(value) { - if (value instanceof OrderedMap) return value - var content = []; - if (value) for (var prop in value) content.push(prop, value[prop]); - return new OrderedMap(content) -}; - -function findDiffStart(a, b, pos) { - for (let i = 0;; i++) { - if (i == a.childCount || i == b.childCount) - return a.childCount == b.childCount ? null : pos; - let childA = a.child(i), childB = b.child(i); - if (childA == childB) { - pos += childA.nodeSize; - continue; - } - if (!childA.sameMarkup(childB)) - return pos; - if (childA.isText && childA.text != childB.text) { - for (let j = 0; childA.text[j] == childB.text[j]; j++) - pos++; - return pos; - } - if (childA.content.size || childB.content.size) { - let inner = findDiffStart(childA.content, childB.content, pos + 1); - if (inner != null) - return inner; - } - pos += childA.nodeSize; - } -} -function findDiffEnd(a, b, posA, posB) { - for (let iA = a.childCount, iB = b.childCount;;) { - if (iA == 0 || iB == 0) - return iA == iB ? null : { a: posA, b: posB }; - let childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize; - if (childA == childB) { - posA -= size; - posB -= size; - continue; - } - if (!childA.sameMarkup(childB)) - return { a: posA, b: posB }; - if (childA.isText && childA.text != childB.text) { - let same = 0, minSize = Math.min(childA.text.length, childB.text.length); - while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) { - same++; - posA--; - posB--; - } - return { a: posA, b: posB }; - } - if (childA.content.size || childB.content.size) { - let inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1); - if (inner) - return inner; - } - posA -= size; - posB -= size; - } -} - -/** -A fragment represents a node's collection of child nodes. - -Like nodes, fragments are persistent data structures, and you -should not mutate them or their content. Rather, you create new -instances whenever needed. The API tries to make this easy. -*/ -class Fragment { - /** - @internal - */ - constructor( - /** - The child nodes in this fragment. - */ - content, size) { - this.content = content; - this.size = size || 0; - if (size == null) - for (let i = 0; i < content.length; i++) - this.size += content[i].nodeSize; - } - /** - Invoke a callback for all descendant nodes between the given two - positions (relative to start of this fragment). Doesn't descend - into a node when the callback returns `false`. - */ - nodesBetween(from, to, f, nodeStart = 0, parent) { - for (let i = 0, pos = 0; pos < to; i++) { - let child = this.content[i], end = pos + child.nodeSize; - if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) { - let start = pos + 1; - child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start); - } - pos = end; - } - } - /** - Call the given callback for every descendant node. `pos` will be - relative to the start of the fragment. The callback may return - `false` to prevent traversal of a given node's children. - */ - descendants(f) { - this.nodesBetween(0, this.size, f); - } - /** - Extract the text between `from` and `to`. See the same method on - [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween). - */ - textBetween(from, to, blockSeparator, leafText) { - let text = "", first = true; - this.nodesBetween(from, to, (node, pos) => { - let nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos) - : !node.isLeaf ? "" - : leafText ? (typeof leafText === "function" ? leafText(node) : leafText) - : node.type.spec.leafText ? node.type.spec.leafText(node) - : ""; - if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) { - if (first) - first = false; - else - text += blockSeparator; - } - text += nodeText; - }, 0); - return text; - } - /** - Create a new fragment containing the combined content of this - fragment and the other. - */ - append(other) { - if (!other.size) - return this; - if (!this.size) - return other; - let last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0; - if (last.isText && last.sameMarkup(first)) { - content[content.length - 1] = last.withText(last.text + first.text); - i = 1; - } - for (; i < other.content.length; i++) - content.push(other.content[i]); - return new Fragment(content, this.size + other.size); - } - /** - Cut out the sub-fragment between the two given positions. - */ - cut(from, to = this.size) { - if (from == 0 && to == this.size) - return this; - let result = [], size = 0; - if (to > from) - for (let i = 0, pos = 0; pos < to; i++) { - let child = this.content[i], end = pos + child.nodeSize; - if (end > from) { - if (pos < from || end > to) { - if (child.isText) - child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos)); - else - child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1)); - } - result.push(child); - size += child.nodeSize; - } - pos = end; - } - return new Fragment(result, size); - } - /** - @internal - */ - cutByIndex(from, to) { - if (from == to) - return Fragment.empty; - if (from == 0 && to == this.content.length) - return this; - return new Fragment(this.content.slice(from, to)); - } - /** - Create a new fragment in which the node at the given index is - replaced by the given node. - */ - replaceChild(index, node) { - let current = this.content[index]; - if (current == node) - return this; - let copy = this.content.slice(); - let size = this.size + node.nodeSize - current.nodeSize; - copy[index] = node; - return new Fragment(copy, size); - } - /** - Create a new fragment by prepending the given node to this - fragment. - */ - addToStart(node) { - return new Fragment([node].concat(this.content), this.size + node.nodeSize); - } - /** - Create a new fragment by appending the given node to this - fragment. - */ - addToEnd(node) { - return new Fragment(this.content.concat(node), this.size + node.nodeSize); - } - /** - Compare this fragment to another one. - */ - eq(other) { - if (this.content.length != other.content.length) - return false; - for (let i = 0; i < this.content.length; i++) - if (!this.content[i].eq(other.content[i])) - return false; - return true; - } - /** - The first child of the fragment, or `null` if it is empty. - */ - get firstChild() { return this.content.length ? this.content[0] : null; } - /** - The last child of the fragment, or `null` if it is empty. - */ - get lastChild() { return this.content.length ? this.content[this.content.length - 1] : null; } - /** - The number of child nodes in this fragment. - */ - get childCount() { return this.content.length; } - /** - Get the child node at the given index. Raise an error when the - index is out of range. - */ - child(index) { - let found = this.content[index]; - if (!found) - throw new RangeError("Index " + index + " out of range for " + this); - return found; - } - /** - Get the child node at the given index, if it exists. - */ - maybeChild(index) { - return this.content[index] || null; - } - /** - Call `f` for every child node, passing the node, its offset - into this parent node, and its index. - */ - forEach(f) { - for (let i = 0, p = 0; i < this.content.length; i++) { - let child = this.content[i]; - f(child, p, i); - p += child.nodeSize; - } - } - /** - Find the first position at which this fragment and another - fragment differ, or `null` if they are the same. - */ - findDiffStart(other, pos = 0) { - return findDiffStart(this, other, pos); - } - /** - Find the first position, searching from the end, at which this - fragment and the given fragment differ, or `null` if they are - the same. Since this position will not be the same in both - nodes, an object with two separate positions is returned. - */ - findDiffEnd(other, pos = this.size, otherPos = other.size) { - return findDiffEnd(this, other, pos, otherPos); - } - /** - Find the index and inner offset corresponding to a given relative - position in this fragment. The result object will be reused - (overwritten) the next time the function is called. @internal - */ - findIndex(pos, round = -1) { - if (pos == 0) - return retIndex(0, pos); - if (pos == this.size) - return retIndex(this.content.length, pos); - if (pos > this.size || pos < 0) - throw new RangeError(`Position ${pos} outside of fragment (${this})`); - for (let i = 0, curPos = 0;; i++) { - let cur = this.child(i), end = curPos + cur.nodeSize; - if (end >= pos) { - if (end == pos || round > 0) - return retIndex(i + 1, end); - return retIndex(i, curPos); - } - curPos = end; - } - } - /** - Return a debugging string that describes this fragment. - */ - toString() { return "<" + this.toStringInner() + ">"; } - /** - @internal - */ - toStringInner() { return this.content.join(", "); } - /** - Create a JSON-serializeable representation of this fragment. - */ - toJSON() { - return this.content.length ? this.content.map(n => n.toJSON()) : null; - } - /** - Deserialize a fragment from its JSON representation. - */ - static fromJSON(schema, value) { - if (!value) - return Fragment.empty; - if (!Array.isArray(value)) - throw new RangeError("Invalid input for Fragment.fromJSON"); - return new Fragment(value.map(schema.nodeFromJSON)); - } - /** - Build a fragment from an array of nodes. Ensures that adjacent - text nodes with the same marks are joined together. - */ - static fromArray(array) { - if (!array.length) - return Fragment.empty; - let joined, size = 0; - for (let i = 0; i < array.length; i++) { - let node = array[i]; - size += node.nodeSize; - if (i && node.isText && array[i - 1].sameMarkup(node)) { - if (!joined) - joined = array.slice(0, i); - joined[joined.length - 1] = node - .withText(joined[joined.length - 1].text + node.text); - } - else if (joined) { - joined.push(node); - } - } - return new Fragment(joined || array, size); - } - /** - Create a fragment from something that can be interpreted as a - set of nodes. For `null`, it returns the empty fragment. For a - fragment, the fragment itself. For a node or array of nodes, a - fragment containing those nodes. - */ - static from(nodes) { - if (!nodes) - return Fragment.empty; - if (nodes instanceof Fragment) - return nodes; - if (Array.isArray(nodes)) - return this.fromArray(nodes); - if (nodes.attrs) - return new Fragment([nodes], nodes.nodeSize); - throw new RangeError("Can not convert " + nodes + " to a Fragment" + - (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : "")); - } -} -/** -An empty fragment. Intended to be reused whenever a node doesn't -contain anything (rather than allocating a new empty fragment for -each leaf node). -*/ -Fragment.empty = new Fragment([], 0); -const found = { index: 0, offset: 0 }; -function retIndex(index, offset) { - found.index = index; - found.offset = offset; - return found; -} - -function compareDeep(a, b) { - if (a === b) - return true; - if (!(a && typeof a == "object") || - !(b && typeof b == "object")) - return false; - let array = Array.isArray(a); - if (Array.isArray(b) != array) - return false; - if (array) { - if (a.length != b.length) - return false; - for (let i = 0; i < a.length; i++) - if (!compareDeep(a[i], b[i])) - return false; - } - else { - for (let p in a) - if (!(p in b) || !compareDeep(a[p], b[p])) - return false; - for (let p in b) - if (!(p in a)) - return false; - } - return true; -} - -/** -A mark is a piece of information that can be attached to a node, -such as it being emphasized, in code font, or a link. It has a -type and optionally a set of attributes that provide further -information (such as the target of the link). Marks are created -through a `Schema`, which controls which types exist and which -attributes they have. -*/ -class Mark { - /** - @internal - */ - constructor( - /** - The type of this mark. - */ - type, - /** - The attributes associated with this mark. - */ - attrs) { - this.type = type; - this.attrs = attrs; - } - /** - Given a set of marks, create a new set which contains this one as - well, in the right position. If this mark is already in the set, - the set itself is returned. If any marks that are set to be - [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present, - those are replaced by this one. - */ - addToSet(set) { - let copy, placed = false; - for (let i = 0; i < set.length; i++) { - let other = set[i]; - if (this.eq(other)) - return set; - if (this.type.excludes(other.type)) { - if (!copy) - copy = set.slice(0, i); - } - else if (other.type.excludes(this.type)) { - return set; - } - else { - if (!placed && other.type.rank > this.type.rank) { - if (!copy) - copy = set.slice(0, i); - copy.push(this); - placed = true; - } - if (copy) - copy.push(other); - } - } - if (!copy) - copy = set.slice(); - if (!placed) - copy.push(this); - return copy; - } - /** - Remove this mark from the given set, returning a new set. If this - mark is not in the set, the set itself is returned. - */ - removeFromSet(set) { - for (let i = 0; i < set.length; i++) - if (this.eq(set[i])) - return set.slice(0, i).concat(set.slice(i + 1)); - return set; - } - /** - Test whether this mark is in the given set of marks. - */ - isInSet(set) { - for (let i = 0; i < set.length; i++) - if (this.eq(set[i])) - return true; - return false; - } - /** - Test whether this mark has the same type and attributes as - another mark. - */ - eq(other) { - return this == other || - (this.type == other.type && compareDeep(this.attrs, other.attrs)); - } - /** - Convert this mark to a JSON-serializeable representation. - */ - toJSON() { - let obj = { type: this.type.name }; - for (let _ in this.attrs) { - obj.attrs = this.attrs; - break; - } - return obj; - } - /** - Deserialize a mark from JSON. - */ - static fromJSON(schema, json) { - if (!json) - throw new RangeError("Invalid input for Mark.fromJSON"); - let type = schema.marks[json.type]; - if (!type) - throw new RangeError(`There is no mark type ${json.type} in this schema`); - let mark = type.create(json.attrs); - type.checkAttrs(mark.attrs); - return mark; - } - /** - Test whether two sets of marks are identical. - */ - static sameSet(a, b) { - if (a == b) - return true; - if (a.length != b.length) - return false; - for (let i = 0; i < a.length; i++) - if (!a[i].eq(b[i])) - return false; - return true; - } - /** - Create a properly sorted mark set from null, a single mark, or an - unsorted array of marks. - */ - static setFrom(marks) { - if (!marks || Array.isArray(marks) && marks.length == 0) - return Mark.none; - if (marks instanceof Mark) - return [marks]; - let copy = marks.slice(); - copy.sort((a, b) => a.type.rank - b.type.rank); - return copy; - } -} -/** -The empty set of marks. -*/ -Mark.none = []; - -/** -Error type raised by [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) when -given an invalid replacement. -*/ -class ReplaceError extends Error { -} -/* -ReplaceError = function(this: any, message: string) { - let err = Error.call(this, message) - ;(err as any).__proto__ = ReplaceError.prototype - return err -} as any - -ReplaceError.prototype = Object.create(Error.prototype) -ReplaceError.prototype.constructor = ReplaceError -ReplaceError.prototype.name = "ReplaceError" -*/ -/** -A slice represents a piece cut out of a larger document. It -stores not only a fragment, but also the depth up to which nodes on -both side are ‘open’ (cut through). -*/ -class Slice { - /** - Create a slice. When specifying a non-zero open depth, you must - make sure that there are nodes of at least that depth at the - appropriate side of the fragment—i.e. if the fragment is an - empty paragraph node, `openStart` and `openEnd` can't be greater - than 1. - - It is not necessary for the content of open nodes to conform to - the schema's content constraints, though it should be a valid - start/end/middle for such a node, depending on which sides are - open. - */ - constructor( - /** - The slice's content. - */ - content, - /** - The open depth at the start of the fragment. - */ - openStart, - /** - The open depth at the end. - */ - openEnd) { - this.content = content; - this.openStart = openStart; - this.openEnd = openEnd; - } - /** - The size this slice would add when inserted into a document. - */ - get size() { - return this.content.size - this.openStart - this.openEnd; - } - /** - @internal - */ - insertAt(pos, fragment) { - let content = insertInto(this.content, pos + this.openStart, fragment); - return content && new Slice(content, this.openStart, this.openEnd); - } - /** - @internal - */ - removeBetween(from, to) { - return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd); - } - /** - Tests whether this slice is equal to another slice. - */ - eq(other) { - return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd; - } - /** - @internal - */ - toString() { - return this.content + "(" + this.openStart + "," + this.openEnd + ")"; - } - /** - Convert a slice to a JSON-serializable representation. - */ - toJSON() { - if (!this.content.size) - return null; - let json = { content: this.content.toJSON() }; - if (this.openStart > 0) - json.openStart = this.openStart; - if (this.openEnd > 0) - json.openEnd = this.openEnd; - return json; - } - /** - Deserialize a slice from its JSON representation. - */ - static fromJSON(schema, json) { - if (!json) - return Slice.empty; - let openStart = json.openStart || 0, openEnd = json.openEnd || 0; - if (typeof openStart != "number" || typeof openEnd != "number") - throw new RangeError("Invalid input for Slice.fromJSON"); - return new Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd); - } - /** - Create a slice from a fragment by taking the maximum possible - open value on both side of the fragment. - */ - static maxOpen(fragment, openIsolating = true) { - let openStart = 0, openEnd = 0; - for (let n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild) - openStart++; - for (let n = fragment.lastChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.lastChild) - openEnd++; - return new Slice(fragment, openStart, openEnd); - } -} -/** -The empty slice. -*/ -Slice.empty = new Slice(Fragment.empty, 0, 0); -function removeRange(content, from, to) { - let { index, offset } = content.findIndex(from), child = content.maybeChild(index); - let { index: indexTo, offset: offsetTo } = content.findIndex(to); - if (offset == from || child.isText) { - if (offsetTo != to && !content.child(indexTo).isText) - throw new RangeError("Removing non-flat range"); - return content.cut(0, from).append(content.cut(to)); - } - if (index != indexTo) - throw new RangeError("Removing non-flat range"); - return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1))); -} -function insertInto(content, dist, insert, parent) { - let { index, offset } = content.findIndex(dist), child = content.maybeChild(index); - if (offset == dist || child.isText) { - return content.cut(0, dist).append(insert).append(content.cut(dist)); - } - let inner = insertInto(child.content, dist - offset - 1, insert); - return inner && content.replaceChild(index, child.copy(inner)); -} -function replace($from, $to, slice) { - if (slice.openStart > $from.depth) - throw new ReplaceError("Inserted content deeper than insertion position"); - if ($from.depth - slice.openStart != $to.depth - slice.openEnd) - throw new ReplaceError("Inconsistent open depths"); - return replaceOuter($from, $to, slice, 0); -} -function replaceOuter($from, $to, slice, depth) { - let index = $from.index(depth), node = $from.node(depth); - if (index == $to.index(depth) && depth < $from.depth - slice.openStart) { - let inner = replaceOuter($from, $to, slice, depth + 1); - return node.copy(node.content.replaceChild(index, inner)); - } - else if (!slice.content.size) { - return close(node, replaceTwoWay($from, $to, depth)); - } - else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { // Simple, flat case - let parent = $from.parent, content = parent.content; - return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset))); - } - else { - let { start, end } = prepareSliceForReplace(slice, $from); - return close(node, replaceThreeWay($from, start, end, $to, depth)); - } -} -function checkJoin(main, sub) { - if (!sub.type.compatibleContent(main.type)) - throw new ReplaceError("Cannot join " + sub.type.name + " onto " + main.type.name); -} -function joinable($before, $after, depth) { - let node = $before.node(depth); - checkJoin(node, $after.node(depth)); - return node; -} -function addNode(child, target) { - let last = target.length - 1; - if (last >= 0 && child.isText && child.sameMarkup(target[last])) - target[last] = child.withText(target[last].text + child.text); - else - target.push(child); -} -function addRange($start, $end, depth, target) { - let node = ($end || $start).node(depth); - let startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount; - if ($start) { - startIndex = $start.index(depth); - if ($start.depth > depth) { - startIndex++; - } - else if ($start.textOffset) { - addNode($start.nodeAfter, target); - startIndex++; - } - } - for (let i = startIndex; i < endIndex; i++) - addNode(node.child(i), target); - if ($end && $end.depth == depth && $end.textOffset) - addNode($end.nodeBefore, target); -} -function close(node, content) { - node.type.checkContent(content); - return node.copy(content); -} -function replaceThreeWay($from, $start, $end, $to, depth) { - let openStart = $from.depth > depth && joinable($from, $start, depth + 1); - let openEnd = $to.depth > depth && joinable($end, $to, depth + 1); - let content = []; - addRange(null, $from, depth, content); - if (openStart && openEnd && $start.index(depth) == $end.index(depth)) { - checkJoin(openStart, openEnd); - addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content); - } - else { - if (openStart) - addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content); - addRange($start, $end, depth, content); - if (openEnd) - addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content); - } - addRange($to, null, depth, content); - return new Fragment(content); -} -function replaceTwoWay($from, $to, depth) { - let content = []; - addRange(null, $from, depth, content); - if ($from.depth > depth) { - let type = joinable($from, $to, depth + 1); - addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content); - } - addRange($to, null, depth, content); - return new Fragment(content); -} -function prepareSliceForReplace(slice, $along) { - let extra = $along.depth - slice.openStart, parent = $along.node(extra); - let node = parent.copy(slice.content); - for (let i = extra - 1; i >= 0; i--) - node = $along.node(i).copy(Fragment.from(node)); - return { start: node.resolveNoCache(slice.openStart + extra), - end: node.resolveNoCache(node.content.size - slice.openEnd - extra) }; -} - -/** -You can [_resolve_](https://prosemirror.net/docs/ref/#model.Node.resolve) a position to get more -information about it. Objects of this class represent such a -resolved position, providing various pieces of context -information, and some helper methods. - -Throughout this interface, methods that take an optional `depth` -parameter will interpret undefined as `this.depth` and negative -numbers as `this.depth + value`. -*/ -class ResolvedPos { - /** - @internal - */ - constructor( - /** - The position that was resolved. - */ - pos, - /** - @internal - */ - path, - /** - The offset this position has into its parent node. - */ - parentOffset) { - this.pos = pos; - this.path = path; - this.parentOffset = parentOffset; - this.depth = path.length / 3 - 1; - } - /** - @internal - */ - resolveDepth(val) { - if (val == null) - return this.depth; - if (val < 0) - return this.depth + val; - return val; - } - /** - The parent node that the position points into. Note that even if - a position points into a text node, that node is not considered - the parent—text nodes are ‘flat’ in this model, and have no content. - */ - get parent() { return this.node(this.depth); } - /** - The root node in which the position was resolved. - */ - get doc() { return this.node(0); } - /** - The ancestor node at the given level. `p.node(p.depth)` is the - same as `p.parent`. - */ - node(depth) { return this.path[this.resolveDepth(depth) * 3]; } - /** - The index into the ancestor at the given level. If this points - at the 3rd node in the 2nd paragraph on the top level, for - example, `p.index(0)` is 1 and `p.index(1)` is 2. - */ - index(depth) { return this.path[this.resolveDepth(depth) * 3 + 1]; } - /** - The index pointing after this position into the ancestor at the - given level. - */ - indexAfter(depth) { - depth = this.resolveDepth(depth); - return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1); - } - /** - The (absolute) position at the start of the node at the given - level. - */ - start(depth) { - depth = this.resolveDepth(depth); - return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; - } - /** - The (absolute) position at the end of the node at the given - level. - */ - end(depth) { - depth = this.resolveDepth(depth); - return this.start(depth) + this.node(depth).content.size; - } - /** - The (absolute) position directly before the wrapping node at the - given level, or, when `depth` is `this.depth + 1`, the original - position. - */ - before(depth) { - depth = this.resolveDepth(depth); - if (!depth) - throw new RangeError("There is no position before the top-level node"); - return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1]; - } - /** - The (absolute) position directly after the wrapping node at the - given level, or the original position when `depth` is `this.depth + 1`. - */ - after(depth) { - depth = this.resolveDepth(depth); - if (!depth) - throw new RangeError("There is no position after the top-level node"); - return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize; - } - /** - When this position points into a text node, this returns the - distance between the position and the start of the text node. - Will be zero for positions that point between nodes. - */ - get textOffset() { return this.pos - this.path[this.path.length - 1]; } - /** - Get the node directly after the position, if any. If the position - points into a text node, only the part of that node after the - position is returned. - */ - get nodeAfter() { - let parent = this.parent, index = this.index(this.depth); - if (index == parent.childCount) - return null; - let dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index); - return dOff ? parent.child(index).cut(dOff) : child; - } - /** - Get the node directly before the position, if any. If the - position points into a text node, only the part of that node - before the position is returned. - */ - get nodeBefore() { - let index = this.index(this.depth); - let dOff = this.pos - this.path[this.path.length - 1]; - if (dOff) - return this.parent.child(index).cut(0, dOff); - return index == 0 ? null : this.parent.child(index - 1); - } - /** - Get the position at the given index in the parent node at the - given depth (which defaults to `this.depth`). - */ - posAtIndex(index, depth) { - depth = this.resolveDepth(depth); - let node = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; - for (let i = 0; i < index; i++) - pos += node.child(i).nodeSize; - return pos; - } - /** - Get the marks at this position, factoring in the surrounding - marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the - position is at the start of a non-empty node, the marks of the - node after it (if any) are returned. - */ - marks() { - let parent = this.parent, index = this.index(); - // In an empty parent, return the empty array - if (parent.content.size == 0) - return Mark.none; - // When inside a text node, just return the text node's marks - if (this.textOffset) - return parent.child(index).marks; - let main = parent.maybeChild(index - 1), other = parent.maybeChild(index); - // If the `after` flag is true of there is no node before, make - // the node after this position the main reference. - if (!main) { - let tmp = main; - main = other; - other = tmp; - } - // Use all marks in the main node, except those that have - // `inclusive` set to false and are not present in the other node. - let marks = main.marks; - for (var i = 0; i < marks.length; i++) - if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks))) - marks = marks[i--].removeFromSet(marks); - return marks; - } - /** - Get the marks after the current position, if any, except those - that are non-inclusive and not present at position `$end`. This - is mostly useful for getting the set of marks to preserve after a - deletion. Will return `null` if this position is at the end of - its parent node or its parent node isn't a textblock (in which - case no marks should be preserved). - */ - marksAcross($end) { - let after = this.parent.maybeChild(this.index()); - if (!after || !after.isInline) - return null; - let marks = after.marks, next = $end.parent.maybeChild($end.index()); - for (var i = 0; i < marks.length; i++) - if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks))) - marks = marks[i--].removeFromSet(marks); - return marks; - } - /** - The depth up to which this position and the given (non-resolved) - position share the same parent nodes. - */ - sharedDepth(pos) { - for (let depth = this.depth; depth > 0; depth--) - if (this.start(depth) <= pos && this.end(depth) >= pos) - return depth; - return 0; - } - /** - Returns a range based on the place where this position and the - given position diverge around block content. If both point into - the same textblock, for example, a range around that textblock - will be returned. If they point into different blocks, the range - around those blocks in their shared ancestor is returned. You can - pass in an optional predicate that will be called with a parent - node to see if a range into that parent is acceptable. - */ - blockRange(other = this, pred) { - if (other.pos < this.pos) - return other.blockRange(this); - for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--) - if (other.pos <= this.end(d) && (!pred || pred(this.node(d)))) - return new NodeRange(this, other, d); - return null; - } - /** - Query whether the given position shares the same parent node. - */ - sameParent(other) { - return this.pos - this.parentOffset == other.pos - other.parentOffset; - } - /** - Return the greater of this and the given position. - */ - max(other) { - return other.pos > this.pos ? other : this; - } - /** - Return the smaller of this and the given position. - */ - min(other) { - return other.pos < this.pos ? other : this; - } - /** - @internal - */ - toString() { - let str = ""; - for (let i = 1; i <= this.depth; i++) - str += (str ? "/" : "") + this.node(i).type.name + "_" + this.index(i - 1); - return str + ":" + this.parentOffset; - } - /** - @internal - */ - static resolve(doc, pos) { - if (!(pos >= 0 && pos <= doc.content.size)) - throw new RangeError("Position " + pos + " out of range"); - let path = []; - let start = 0, parentOffset = pos; - for (let node = doc;;) { - let { index, offset } = node.content.findIndex(parentOffset); - let rem = parentOffset - offset; - path.push(node, index, start + offset); - if (!rem) - break; - node = node.child(index); - if (node.isText) - break; - parentOffset = rem - 1; - start += offset + 1; - } - return new ResolvedPos(pos, path, parentOffset); - } - /** - @internal - */ - static resolveCached(doc, pos) { - let cache = resolveCache.get(doc); - if (cache) { - for (let i = 0; i < cache.elts.length; i++) { - let elt = cache.elts[i]; - if (elt.pos == pos) - return elt; - } - } - else { - resolveCache.set(doc, cache = new ResolveCache); - } - let result = cache.elts[cache.i] = ResolvedPos.resolve(doc, pos); - cache.i = (cache.i + 1) % resolveCacheSize; - return result; - } -} -class ResolveCache { - constructor() { - this.elts = []; - this.i = 0; - } -} -const resolveCacheSize = 12, resolveCache = new WeakMap(); -/** -Represents a flat range of content, i.e. one that starts and -ends in the same node. -*/ -class NodeRange { - /** - Construct a node range. `$from` and `$to` should point into the - same node until at least the given `depth`, since a node range - denotes an adjacent set of nodes in a single parent node. - */ - constructor( - /** - A resolved position along the start of the content. May have a - `depth` greater than this object's `depth` property, since - these are the positions that were used to compute the range, - not re-resolved positions directly at its boundaries. - */ - $from, - /** - A position along the end of the content. See - caveat for [`$from`](https://prosemirror.net/docs/ref/#model.NodeRange.$from). - */ - $to, - /** - The depth of the node that this range points into. - */ - depth) { - this.$from = $from; - this.$to = $to; - this.depth = depth; - } - /** - The position at the start of the range. - */ - get start() { return this.$from.before(this.depth + 1); } - /** - The position at the end of the range. - */ - get end() { return this.$to.after(this.depth + 1); } - /** - The parent node that the range points into. - */ - get parent() { return this.$from.node(this.depth); } - /** - The start index of the range in the parent node. - */ - get startIndex() { return this.$from.index(this.depth); } - /** - The end index of the range in the parent node. - */ - get endIndex() { return this.$to.indexAfter(this.depth); } -} - -const emptyAttrs = Object.create(null); -/** -This class represents a node in the tree that makes up a -ProseMirror document. So a document is an instance of `Node`, with -children that are also instances of `Node`. - -Nodes are persistent data structures. Instead of changing them, you -create new ones with the content you want. Old ones keep pointing -at the old document shape. This is made cheaper by sharing -structure between the old and new data as much as possible, which a -tree shape like this (without back pointers) makes easy. - -**Do not** directly mutate the properties of a `Node` object. See -[the guide](https://prosemirror.net/docs/guide/#doc) for more information. -*/ -class Node { - /** - @internal - */ - constructor( - /** - The type of node that this is. - */ - type, - /** - An object mapping attribute names to values. The kind of - attributes allowed and required are - [determined](https://prosemirror.net/docs/ref/#model.NodeSpec.attrs) by the node type. - */ - attrs, - // A fragment holding the node's children. - content, - /** - The marks (things like whether it is emphasized or part of a - link) applied to this node. - */ - marks = Mark.none) { - this.type = type; - this.attrs = attrs; - this.marks = marks; - this.content = content || Fragment.empty; - } - /** - The array of this node's child nodes. - */ - get children() { return this.content.content; } - /** - The size of this node, as defined by the integer-based [indexing - scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the - amount of characters. For other leaf nodes, it is one. For - non-leaf nodes, it is the size of the content plus two (the - start and end token). - */ - get nodeSize() { return this.isLeaf ? 1 : 2 + this.content.size; } - /** - The number of children that the node has. - */ - get childCount() { return this.content.childCount; } - /** - Get the child node at the given index. Raises an error when the - index is out of range. - */ - child(index) { return this.content.child(index); } - /** - Get the child node at the given index, if it exists. - */ - maybeChild(index) { return this.content.maybeChild(index); } - /** - Call `f` for every child node, passing the node, its offset - into this parent node, and its index. - */ - forEach(f) { this.content.forEach(f); } - /** - Invoke a callback for all descendant nodes recursively between - the given two positions that are relative to start of this - node's content. The callback is invoked with the node, its - position relative to the original node (method receiver), - its parent node, and its child index. When the callback returns - false for a given node, that node's children will not be - recursed over. The last parameter can be used to specify a - starting position to count from. - */ - nodesBetween(from, to, f, startPos = 0) { - this.content.nodesBetween(from, to, f, startPos, this); - } - /** - Call the given callback for every descendant node. Doesn't - descend into a node when the callback returns `false`. - */ - descendants(f) { - this.nodesBetween(0, this.content.size, f); - } - /** - Concatenates all the text nodes found in this fragment and its - children. - */ - get textContent() { - return (this.isLeaf && this.type.spec.leafText) - ? this.type.spec.leafText(this) - : this.textBetween(0, this.content.size, ""); - } - /** - Get all text between positions `from` and `to`. When - `blockSeparator` is given, it will be inserted to separate text - from different block nodes. If `leafText` is given, it'll be - inserted for every non-text leaf node encountered, otherwise - [`leafText`](https://prosemirror.net/docs/ref/#model.NodeSpec^leafText) will be used. - */ - textBetween(from, to, blockSeparator, leafText) { - return this.content.textBetween(from, to, blockSeparator, leafText); - } - /** - Returns this node's first child, or `null` if there are no - children. - */ - get firstChild() { return this.content.firstChild; } - /** - Returns this node's last child, or `null` if there are no - children. - */ - get lastChild() { return this.content.lastChild; } - /** - Test whether two nodes represent the same piece of document. - */ - eq(other) { - return this == other || (this.sameMarkup(other) && this.content.eq(other.content)); - } - /** - Compare the markup (type, attributes, and marks) of this node to - those of another. Returns `true` if both have the same markup. - */ - sameMarkup(other) { - return this.hasMarkup(other.type, other.attrs, other.marks); - } - /** - Check whether this node's markup correspond to the given type, - attributes, and marks. - */ - hasMarkup(type, attrs, marks) { - return this.type == type && - compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) && - Mark.sameSet(this.marks, marks || Mark.none); - } - /** - Create a new node with the same markup as this node, containing - the given content (or empty, if no content is given). - */ - copy(content = null) { - if (content == this.content) - return this; - return new Node(this.type, this.attrs, content, this.marks); - } - /** - Create a copy of this node, with the given set of marks instead - of the node's own marks. - */ - mark(marks) { - return marks == this.marks ? this : new Node(this.type, this.attrs, this.content, marks); - } - /** - Create a copy of this node with only the content between the - given positions. If `to` is not given, it defaults to the end of - the node. - */ - cut(from, to = this.content.size) { - if (from == 0 && to == this.content.size) - return this; - return this.copy(this.content.cut(from, to)); - } - /** - Cut out the part of the document between the given positions, and - return it as a `Slice` object. - */ - slice(from, to = this.content.size, includeParents = false) { - if (from == to) - return Slice.empty; - let $from = this.resolve(from), $to = this.resolve(to); - let depth = includeParents ? 0 : $from.sharedDepth(to); - let start = $from.start(depth), node = $from.node(depth); - let content = node.content.cut($from.pos - start, $to.pos - start); - return new Slice(content, $from.depth - depth, $to.depth - depth); - } - /** - Replace the part of the document between the given positions with - the given slice. The slice must 'fit', meaning its open sides - must be able to connect to the surrounding content, and its - content nodes must be valid children for the node they are placed - into. If any of this is violated, an error of type - [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown. - */ - replace(from, to, slice) { - return replace(this.resolve(from), this.resolve(to), slice); - } - /** - Find the node directly after the given position. - */ - nodeAt(pos) { - for (let node = this;;) { - let { index, offset } = node.content.findIndex(pos); - node = node.maybeChild(index); - if (!node) - return null; - if (offset == pos || node.isText) - return node; - pos -= offset + 1; - } - } - /** - Find the (direct) child node after the given offset, if any, - and return it along with its index and offset relative to this - node. - */ - childAfter(pos) { - let { index, offset } = this.content.findIndex(pos); - return { node: this.content.maybeChild(index), index, offset }; - } - /** - Find the (direct) child node before the given offset, if any, - and return it along with its index and offset relative to this - node. - */ - childBefore(pos) { - if (pos == 0) - return { node: null, index: 0, offset: 0 }; - let { index, offset } = this.content.findIndex(pos); - if (offset < pos) - return { node: this.content.child(index), index, offset }; - let node = this.content.child(index - 1); - return { node, index: index - 1, offset: offset - node.nodeSize }; - } - /** - Resolve the given position in the document, returning an - [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context. - */ - resolve(pos) { return ResolvedPos.resolveCached(this, pos); } - /** - @internal - */ - resolveNoCache(pos) { return ResolvedPos.resolve(this, pos); } - /** - Test whether a given mark or mark type occurs in this document - between the two given positions. - */ - rangeHasMark(from, to, type) { - let found = false; - if (to > from) - this.nodesBetween(from, to, node => { - if (type.isInSet(node.marks)) - found = true; - return !found; - }); - return found; - } - /** - True when this is a block (non-inline node) - */ - get isBlock() { return this.type.isBlock; } - /** - True when this is a textblock node, a block node with inline - content. - */ - get isTextblock() { return this.type.isTextblock; } - /** - True when this node allows inline content. - */ - get inlineContent() { return this.type.inlineContent; } - /** - True when this is an inline node (a text node or a node that can - appear among text). - */ - get isInline() { return this.type.isInline; } - /** - True when this is a text node. - */ - get isText() { return this.type.isText; } - /** - True when this is a leaf node. - */ - get isLeaf() { return this.type.isLeaf; } - /** - True when this is an atom, i.e. when it does not have directly - editable content. This is usually the same as `isLeaf`, but can - be configured with the [`atom` property](https://prosemirror.net/docs/ref/#model.NodeSpec.atom) - on a node's spec (typically used when the node is displayed as - an uneditable [node view](https://prosemirror.net/docs/ref/#view.NodeView)). - */ - get isAtom() { return this.type.isAtom; } - /** - Return a string representation of this node for debugging - purposes. - */ - toString() { - if (this.type.spec.toDebugString) - return this.type.spec.toDebugString(this); - let name = this.type.name; - if (this.content.size) - name += "(" + this.content.toStringInner() + ")"; - return wrapMarks(this.marks, name); - } - /** - Get the content match in this node at the given index. - */ - contentMatchAt(index) { - let match = this.type.contentMatch.matchFragment(this.content, 0, index); - if (!match) - throw new Error("Called contentMatchAt on a node with invalid content"); - return match; - } - /** - Test whether replacing the range between `from` and `to` (by - child index) with the given replacement fragment (which defaults - to the empty fragment) would leave the node's content valid. You - can optionally pass `start` and `end` indices into the - replacement fragment. - */ - canReplace(from, to, replacement = Fragment.empty, start = 0, end = replacement.childCount) { - let one = this.contentMatchAt(from).matchFragment(replacement, start, end); - let two = one && one.matchFragment(this.content, to); - if (!two || !two.validEnd) - return false; - for (let i = start; i < end; i++) - if (!this.type.allowsMarks(replacement.child(i).marks)) - return false; - return true; - } - /** - Test whether replacing the range `from` to `to` (by index) with - a node of the given type would leave the node's content valid. - */ - canReplaceWith(from, to, type, marks) { - if (marks && !this.type.allowsMarks(marks)) - return false; - let start = this.contentMatchAt(from).matchType(type); - let end = start && start.matchFragment(this.content, to); - return end ? end.validEnd : false; - } - /** - Test whether the given node's content could be appended to this - node. If that node is empty, this will only return true if there - is at least one node type that can appear in both nodes (to avoid - merging completely incompatible nodes). - */ - canAppend(other) { - if (other.content.size) - return this.canReplace(this.childCount, this.childCount, other.content); - else - return this.type.compatibleContent(other.type); - } - /** - Check whether this node and its descendants conform to the - schema, and raise an exception when they do not. - */ - check() { - this.type.checkContent(this.content); - this.type.checkAttrs(this.attrs); - let copy = Mark.none; - for (let i = 0; i < this.marks.length; i++) { - let mark = this.marks[i]; - mark.type.checkAttrs(mark.attrs); - copy = mark.addToSet(copy); - } - if (!Mark.sameSet(copy, this.marks)) - throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(m => m.type.name)}`); - this.content.forEach(node => node.check()); - } - /** - Return a JSON-serializeable representation of this node. - */ - toJSON() { - let obj = { type: this.type.name }; - for (let _ in this.attrs) { - obj.attrs = this.attrs; - break; - } - if (this.content.size) - obj.content = this.content.toJSON(); - if (this.marks.length) - obj.marks = this.marks.map(n => n.toJSON()); - return obj; - } - /** - Deserialize a node from its JSON representation. - */ - static fromJSON(schema, json) { - if (!json) - throw new RangeError("Invalid input for Node.fromJSON"); - let marks = undefined; - if (json.marks) { - if (!Array.isArray(json.marks)) - throw new RangeError("Invalid mark data for Node.fromJSON"); - marks = json.marks.map(schema.markFromJSON); - } - if (json.type == "text") { - if (typeof json.text != "string") - throw new RangeError("Invalid text node in JSON"); - return schema.text(json.text, marks); - } - let content = Fragment.fromJSON(schema, json.content); - let node = schema.nodeType(json.type).create(json.attrs, content, marks); - node.type.checkAttrs(node.attrs); - return node; - } -} -Node.prototype.text = undefined; -class TextNode extends Node { - /** - @internal - */ - constructor(type, attrs, content, marks) { - super(type, attrs, null, marks); - if (!content) - throw new RangeError("Empty text nodes are not allowed"); - this.text = content; - } - toString() { - if (this.type.spec.toDebugString) - return this.type.spec.toDebugString(this); - return wrapMarks(this.marks, JSON.stringify(this.text)); - } - get textContent() { return this.text; } - textBetween(from, to) { return this.text.slice(from, to); } - get nodeSize() { return this.text.length; } - mark(marks) { - return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks); - } - withText(text) { - if (text == this.text) - return this; - return new TextNode(this.type, this.attrs, text, this.marks); - } - cut(from = 0, to = this.text.length) { - if (from == 0 && to == this.text.length) - return this; - return this.withText(this.text.slice(from, to)); - } - eq(other) { - return this.sameMarkup(other) && this.text == other.text; - } - toJSON() { - let base = super.toJSON(); - base.text = this.text; - return base; - } -} -function wrapMarks(marks, str) { - for (let i = marks.length - 1; i >= 0; i--) - str = marks[i].type.name + "(" + str + ")"; - return str; -} - -/** -Instances of this class represent a match state of a node type's -[content expression](https://prosemirror.net/docs/ref/#model.NodeSpec.content), and can be used to -find out whether further content matches here, and whether a given -position is a valid end of the node. -*/ -class ContentMatch { - /** - @internal - */ - constructor( - /** - True when this match state represents a valid end of the node. - */ - validEnd) { - this.validEnd = validEnd; - /** - @internal - */ - this.next = []; - /** - @internal - */ - this.wrapCache = []; - } - /** - @internal - */ - static parse(string, nodeTypes) { - let stream = new TokenStream(string, nodeTypes); - if (stream.next == null) - return ContentMatch.empty; - let expr = parseExpr(stream); - if (stream.next) - stream.err("Unexpected trailing text"); - let match = dfa(nfa(expr)); - checkForDeadEnds(match, stream); - return match; - } - /** - Match a node type, returning a match after that node if - successful. - */ - matchType(type) { - for (let i = 0; i < this.next.length; i++) - if (this.next[i].type == type) - return this.next[i].next; - return null; - } - /** - Try to match a fragment. Returns the resulting match when - successful. - */ - matchFragment(frag, start = 0, end = frag.childCount) { - let cur = this; - for (let i = start; cur && i < end; i++) - cur = cur.matchType(frag.child(i).type); - return cur; - } - /** - @internal - */ - get inlineContent() { - return this.next.length != 0 && this.next[0].type.isInline; - } - /** - Get the first matching node type at this match position that can - be generated. - */ - get defaultType() { - for (let i = 0; i < this.next.length; i++) { - let { type } = this.next[i]; - if (!(type.isText || type.hasRequiredAttrs())) - return type; - } - return null; - } - /** - @internal - */ - compatible(other) { - for (let i = 0; i < this.next.length; i++) - for (let j = 0; j < other.next.length; j++) - if (this.next[i].type == other.next[j].type) - return true; - return false; - } - /** - Try to match the given fragment, and if that fails, see if it can - be made to match by inserting nodes in front of it. When - successful, return a fragment of inserted nodes (which may be - empty if nothing had to be inserted). When `toEnd` is true, only - return a fragment if the resulting match goes to the end of the - content expression. - */ - fillBefore(after, toEnd = false, startIndex = 0) { - let seen = [this]; - function search(match, types) { - let finished = match.matchFragment(after, startIndex); - if (finished && (!toEnd || finished.validEnd)) - return Fragment.from(types.map(tp => tp.createAndFill())); - for (let i = 0; i < match.next.length; i++) { - let { type, next } = match.next[i]; - if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) { - seen.push(next); - let found = search(next, types.concat(type)); - if (found) - return found; - } - } - return null; - } - return search(this, []); - } - /** - Find a set of wrapping node types that would allow a node of the - given type to appear at this position. The result may be empty - (when it fits directly) and will be null when no such wrapping - exists. - */ - findWrapping(target) { - for (let i = 0; i < this.wrapCache.length; i += 2) - if (this.wrapCache[i] == target) - return this.wrapCache[i + 1]; - let computed = this.computeWrapping(target); - this.wrapCache.push(target, computed); - return computed; - } - /** - @internal - */ - computeWrapping(target) { - let seen = Object.create(null), active = [{ match: this, type: null, via: null }]; - while (active.length) { - let current = active.shift(), match = current.match; - if (match.matchType(target)) { - let result = []; - for (let obj = current; obj.type; obj = obj.via) - result.push(obj.type); - return result.reverse(); - } - for (let i = 0; i < match.next.length; i++) { - let { type, next } = match.next[i]; - if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) { - active.push({ match: type.contentMatch, type, via: current }); - seen[type.name] = true; - } - } - } - return null; - } - /** - The number of outgoing edges this node has in the finite - automaton that describes the content expression. - */ - get edgeCount() { - return this.next.length; - } - /** - Get the _n_​th outgoing edge from this node in the finite - automaton that describes the content expression. - */ - edge(n) { - if (n >= this.next.length) - throw new RangeError(`There's no ${n}th edge in this content match`); - return this.next[n]; - } - /** - @internal - */ - toString() { - let seen = []; - function scan(m) { - seen.push(m); - for (let i = 0; i < m.next.length; i++) - if (seen.indexOf(m.next[i].next) == -1) - scan(m.next[i].next); - } - scan(this); - return seen.map((m, i) => { - let out = i + (m.validEnd ? "*" : " ") + " "; - for (let i = 0; i < m.next.length; i++) - out += (i ? ", " : "") + m.next[i].type.name + "->" + seen.indexOf(m.next[i].next); - return out; - }).join("\n"); - } -} -/** -@internal -*/ -ContentMatch.empty = new ContentMatch(true); -class TokenStream { - constructor(string, nodeTypes) { - this.string = string; - this.nodeTypes = nodeTypes; - this.inline = null; - this.pos = 0; - this.tokens = string.split(/\s*(?=\b|\W|$)/); - if (this.tokens[this.tokens.length - 1] == "") - this.tokens.pop(); - if (this.tokens[0] == "") - this.tokens.shift(); - } - get next() { return this.tokens[this.pos]; } - eat(tok) { return this.next == tok && (this.pos++ || true); } - err(str) { throw new SyntaxError(str + " (in content expression '" + this.string + "')"); } -} -function parseExpr(stream) { - let exprs = []; - do { - exprs.push(parseExprSeq(stream)); - } while (stream.eat("|")); - return exprs.length == 1 ? exprs[0] : { type: "choice", exprs }; -} -function parseExprSeq(stream) { - let exprs = []; - do { - exprs.push(parseExprSubscript(stream)); - } while (stream.next && stream.next != ")" && stream.next != "|"); - return exprs.length == 1 ? exprs[0] : { type: "seq", exprs }; -} -function parseExprSubscript(stream) { - let expr = parseExprAtom(stream); - for (;;) { - if (stream.eat("+")) - expr = { type: "plus", expr }; - else if (stream.eat("*")) - expr = { type: "star", expr }; - else if (stream.eat("?")) - expr = { type: "opt", expr }; - else if (stream.eat("{")) - expr = parseExprRange(stream, expr); - else - break; - } - return expr; -} -function parseNum(stream) { - if (/\D/.test(stream.next)) - stream.err("Expected number, got '" + stream.next + "'"); - let result = Number(stream.next); - stream.pos++; - return result; -} -function parseExprRange(stream, expr) { - let min = parseNum(stream), max = min; - if (stream.eat(",")) { - if (stream.next != "}") - max = parseNum(stream); - else - max = -1; - } - if (!stream.eat("}")) - stream.err("Unclosed braced range"); - return { type: "range", min, max, expr }; -} -function resolveName(stream, name) { - let types = stream.nodeTypes, type = types[name]; - if (type) - return [type]; - let result = []; - for (let typeName in types) { - let type = types[typeName]; - if (type.isInGroup(name)) - result.push(type); - } - if (result.length == 0) - stream.err("No node type or group '" + name + "' found"); - return result; -} -function parseExprAtom(stream) { - if (stream.eat("(")) { - let expr = parseExpr(stream); - if (!stream.eat(")")) - stream.err("Missing closing paren"); - return expr; - } - else if (!/\W/.test(stream.next)) { - let exprs = resolveName(stream, stream.next).map(type => { - if (stream.inline == null) - stream.inline = type.isInline; - else if (stream.inline != type.isInline) - stream.err("Mixing inline and block content"); - return { type: "name", value: type }; - }); - stream.pos++; - return exprs.length == 1 ? exprs[0] : { type: "choice", exprs }; - } - else { - stream.err("Unexpected token '" + stream.next + "'"); - } -} -// Construct an NFA from an expression as returned by the parser. The -// NFA is represented as an array of states, which are themselves -// arrays of edges, which are `{term, to}` objects. The first state is -// the entry state and the last node is the success state. -// -// Note that unlike typical NFAs, the edge ordering in this one is -// significant, in that it is used to contruct filler content when -// necessary. -function nfa(expr) { - let nfa = [[]]; - connect(compile(expr, 0), node()); - return nfa; - function node() { return nfa.push([]) - 1; } - function edge(from, to, term) { - let edge = { term, to }; - nfa[from].push(edge); - return edge; - } - function connect(edges, to) { - edges.forEach(edge => edge.to = to); - } - function compile(expr, from) { - if (expr.type == "choice") { - return expr.exprs.reduce((out, expr) => out.concat(compile(expr, from)), []); - } - else if (expr.type == "seq") { - for (let i = 0;; i++) { - let next = compile(expr.exprs[i], from); - if (i == expr.exprs.length - 1) - return next; - connect(next, from = node()); - } - } - else if (expr.type == "star") { - let loop = node(); - edge(from, loop); - connect(compile(expr.expr, loop), loop); - return [edge(loop)]; - } - else if (expr.type == "plus") { - let loop = node(); - connect(compile(expr.expr, from), loop); - connect(compile(expr.expr, loop), loop); - return [edge(loop)]; - } - else if (expr.type == "opt") { - return [edge(from)].concat(compile(expr.expr, from)); - } - else if (expr.type == "range") { - let cur = from; - for (let i = 0; i < expr.min; i++) { - let next = node(); - connect(compile(expr.expr, cur), next); - cur = next; - } - if (expr.max == -1) { - connect(compile(expr.expr, cur), cur); - } - else { - for (let i = expr.min; i < expr.max; i++) { - let next = node(); - edge(cur, next); - connect(compile(expr.expr, cur), next); - cur = next; - } - } - return [edge(cur)]; - } - else if (expr.type == "name") { - return [edge(from, undefined, expr.value)]; - } - else { - throw new Error("Unknown expr type"); - } - } -} -function cmp(a, b) { return b - a; } -// Get the set of nodes reachable by null edges from `node`. Omit -// nodes with only a single null-out-edge, since they may lead to -// needless duplicated nodes. -function nullFrom(nfa, node) { - let result = []; - scan(node); - return result.sort(cmp); - function scan(node) { - let edges = nfa[node]; - if (edges.length == 1 && !edges[0].term) - return scan(edges[0].to); - result.push(node); - for (let i = 0; i < edges.length; i++) { - let { term, to } = edges[i]; - if (!term && result.indexOf(to) == -1) - scan(to); - } - } -} -// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set -// of state objects (`ContentMatch` instances) with transitions -// between them. -function dfa(nfa) { - let labeled = Object.create(null); - return explore(nullFrom(nfa, 0)); - function explore(states) { - let out = []; - states.forEach(node => { - nfa[node].forEach(({ term, to }) => { - if (!term) - return; - let set; - for (let i = 0; i < out.length; i++) - if (out[i][0] == term) - set = out[i][1]; - nullFrom(nfa, to).forEach(node => { - if (!set) - out.push([term, set = []]); - if (set.indexOf(node) == -1) - set.push(node); - }); - }); - }); - let state = labeled[states.join(",")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1); - for (let i = 0; i < out.length; i++) { - let states = out[i][1].sort(cmp); - state.next.push({ type: out[i][0], next: labeled[states.join(",")] || explore(states) }); - } - return state; - } -} -function checkForDeadEnds(match, stream) { - for (let i = 0, work = [match]; i < work.length; i++) { - let state = work[i], dead = !state.validEnd, nodes = []; - for (let j = 0; j < state.next.length; j++) { - let { type, next } = state.next[j]; - nodes.push(type.name); - if (dead && !(type.isText || type.hasRequiredAttrs())) - dead = false; - if (work.indexOf(next) == -1) - work.push(next); - } - if (dead) - stream.err("Only non-generatable nodes (" + nodes.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)"); - } -} - -// For node types where all attrs have a default value (or which don't -// have any attributes), build up a single reusable default attribute -// object, and use it for all nodes that don't specify specific -// attributes. -function defaultAttrs(attrs) { - let defaults = Object.create(null); - for (let attrName in attrs) { - let attr = attrs[attrName]; - if (!attr.hasDefault) - return null; - defaults[attrName] = attr.default; - } - return defaults; -} -function computeAttrs(attrs, value) { - let built = Object.create(null); - for (let name in attrs) { - let given = value && value[name]; - if (given === undefined) { - let attr = attrs[name]; - if (attr.hasDefault) - given = attr.default; - else - throw new RangeError("No value supplied for attribute " + name); - } - built[name] = given; - } - return built; -} -function checkAttrs(attrs, values, type, name) { - for (let name in values) - if (!(name in attrs)) - throw new RangeError(`Unsupported attribute ${name} for ${type} of type ${name}`); - for (let name in attrs) { - let attr = attrs[name]; - if (attr.validate) - attr.validate(values[name]); - } -} -function initAttrs(typeName, attrs) { - let result = Object.create(null); - if (attrs) - for (let name in attrs) - result[name] = new Attribute(typeName, name, attrs[name]); - return result; -} -/** -Node types are objects allocated once per `Schema` and used to -[tag](https://prosemirror.net/docs/ref/#model.Node.type) `Node` instances. They contain information -about the node type, such as its name and what kind of node it -represents. -*/ -class NodeType { - /** - @internal - */ - constructor( - /** - The name the node type has in this schema. - */ - name, - /** - A link back to the `Schema` the node type belongs to. - */ - schema, - /** - The spec that this type is based on - */ - spec) { - this.name = name; - this.schema = schema; - this.spec = spec; - /** - The set of marks allowed in this node. `null` means all marks - are allowed. - */ - this.markSet = null; - this.groups = spec.group ? spec.group.split(" ") : []; - this.attrs = initAttrs(name, spec.attrs); - this.defaultAttrs = defaultAttrs(this.attrs); - this.contentMatch = null; - this.inlineContent = null; - this.isBlock = !(spec.inline || name == "text"); - this.isText = name == "text"; - } - /** - True if this is an inline type. - */ - get isInline() { return !this.isBlock; } - /** - True if this is a textblock type, a block that contains inline - content. - */ - get isTextblock() { return this.isBlock && this.inlineContent; } - /** - True for node types that allow no content. - */ - get isLeaf() { return this.contentMatch == ContentMatch.empty; } - /** - True when this node is an atom, i.e. when it does not have - directly editable content. - */ - get isAtom() { return this.isLeaf || !!this.spec.atom; } - /** - Return true when this node type is part of the given - [group](https://prosemirror.net/docs/ref/#model.NodeSpec.group). - */ - isInGroup(group) { - return this.groups.indexOf(group) > -1; - } - /** - The node type's [whitespace](https://prosemirror.net/docs/ref/#model.NodeSpec.whitespace) option. - */ - get whitespace() { - return this.spec.whitespace || (this.spec.code ? "pre" : "normal"); - } - /** - Tells you whether this node type has any required attributes. - */ - hasRequiredAttrs() { - for (let n in this.attrs) - if (this.attrs[n].isRequired) - return true; - return false; - } - /** - Indicates whether this node allows some of the same content as - the given node type. - */ - compatibleContent(other) { - return this == other || this.contentMatch.compatible(other.contentMatch); - } - /** - @internal - */ - computeAttrs(attrs) { - if (!attrs && this.defaultAttrs) - return this.defaultAttrs; - else - return computeAttrs(this.attrs, attrs); - } - /** - Create a `Node` of this type. The given attributes are - checked and defaulted (you can pass `null` to use the type's - defaults entirely, if no required attributes exist). `content` - may be a `Fragment`, a node, an array of nodes, or - `null`. Similarly `marks` may be `null` to default to the empty - set of marks. - */ - create(attrs = null, content, marks) { - if (this.isText) - throw new Error("NodeType.create can't construct text nodes"); - return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks)); - } - /** - Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content - against the node type's content restrictions, and throw an error - if it doesn't match. - */ - createChecked(attrs = null, content, marks) { - content = Fragment.from(content); - this.checkContent(content); - return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks)); - } - /** - Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is - necessary to add nodes to the start or end of the given fragment - to make it fit the node. If no fitting wrapping can be found, - return null. Note that, due to the fact that required nodes can - always be created, this will always succeed if you pass null or - `Fragment.empty` as content. - */ - createAndFill(attrs = null, content, marks) { - attrs = this.computeAttrs(attrs); - content = Fragment.from(content); - if (content.size) { - let before = this.contentMatch.fillBefore(content); - if (!before) - return null; - content = before.append(content); - } - let matched = this.contentMatch.matchFragment(content); - let after = matched && matched.fillBefore(Fragment.empty, true); - if (!after) - return null; - return new Node(this, attrs, content.append(after), Mark.setFrom(marks)); - } - /** - Returns true if the given fragment is valid content for this node - type. - */ - validContent(content) { - let result = this.contentMatch.matchFragment(content); - if (!result || !result.validEnd) - return false; - for (let i = 0; i < content.childCount; i++) - if (!this.allowsMarks(content.child(i).marks)) - return false; - return true; - } - /** - Throws a RangeError if the given fragment is not valid content for this - node type. - @internal - */ - checkContent(content) { - if (!this.validContent(content)) - throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0, 50)}`); - } - /** - @internal - */ - checkAttrs(attrs) { - checkAttrs(this.attrs, attrs, "node", this.name); - } - /** - Check whether the given mark type is allowed in this node. - */ - allowsMarkType(markType) { - return this.markSet == null || this.markSet.indexOf(markType) > -1; - } - /** - Test whether the given set of marks are allowed in this node. - */ - allowsMarks(marks) { - if (this.markSet == null) - return true; - for (let i = 0; i < marks.length; i++) - if (!this.allowsMarkType(marks[i].type)) - return false; - return true; - } - /** - Removes the marks that are not allowed in this node from the given set. - */ - allowedMarks(marks) { - if (this.markSet == null) - return marks; - let copy; - for (let i = 0; i < marks.length; i++) { - if (!this.allowsMarkType(marks[i].type)) { - if (!copy) - copy = marks.slice(0, i); - } - else if (copy) { - copy.push(marks[i]); - } - } - return !copy ? marks : copy.length ? copy : Mark.none; - } - /** - @internal - */ - static compile(nodes, schema) { - let result = Object.create(null); - nodes.forEach((name, spec) => result[name] = new NodeType(name, schema, spec)); - let topType = schema.spec.topNode || "doc"; - if (!result[topType]) - throw new RangeError("Schema is missing its top node type ('" + topType + "')"); - if (!result.text) - throw new RangeError("Every schema needs a 'text' type"); - for (let _ in result.text.attrs) - throw new RangeError("The text node type should not have attributes"); - return result; - } -} -function validateType(typeName, attrName, type) { - let types = type.split("|"); - return (value) => { - let name = value === null ? "null" : typeof value; - if (types.indexOf(name) < 0) - throw new RangeError(`Expected value of type ${types} for attribute ${attrName} on type ${typeName}, got ${name}`); - }; -} -// Attribute descriptors -class Attribute { - constructor(typeName, attrName, options) { - this.hasDefault = Object.prototype.hasOwnProperty.call(options, "default"); - this.default = options.default; - this.validate = typeof options.validate == "string" ? validateType(typeName, attrName, options.validate) : options.validate; - } - get isRequired() { - return !this.hasDefault; - } -} -// Marks -/** -Like nodes, marks (which are associated with nodes to signify -things like emphasis or being part of a link) are -[tagged](https://prosemirror.net/docs/ref/#model.Mark.type) with type objects, which are -instantiated once per `Schema`. -*/ -class MarkType { - /** - @internal - */ - constructor( - /** - The name of the mark type. - */ - name, - /** - @internal - */ - rank, - /** - The schema that this mark type instance is part of. - */ - schema, - /** - The spec on which the type is based. - */ - spec) { - this.name = name; - this.rank = rank; - this.schema = schema; - this.spec = spec; - this.attrs = initAttrs(name, spec.attrs); - this.excluded = null; - let defaults = defaultAttrs(this.attrs); - this.instance = defaults ? new Mark(this, defaults) : null; - } - /** - Create a mark of this type. `attrs` may be `null` or an object - containing only some of the mark's attributes. The others, if - they have defaults, will be added. - */ - create(attrs = null) { - if (!attrs && this.instance) - return this.instance; - return new Mark(this, computeAttrs(this.attrs, attrs)); - } - /** - @internal - */ - static compile(marks, schema) { - let result = Object.create(null), rank = 0; - marks.forEach((name, spec) => result[name] = new MarkType(name, rank++, schema, spec)); - return result; - } - /** - When there is a mark of this type in the given set, a new set - without it is returned. Otherwise, the input set is returned. - */ - removeFromSet(set) { - for (var i = 0; i < set.length; i++) - if (set[i].type == this) { - set = set.slice(0, i).concat(set.slice(i + 1)); - i--; - } - return set; - } - /** - Tests whether there is a mark of this type in the given set. - */ - isInSet(set) { - for (let i = 0; i < set.length; i++) - if (set[i].type == this) - return set[i]; - } - /** - @internal - */ - checkAttrs(attrs) { - checkAttrs(this.attrs, attrs, "mark", this.name); - } - /** - Queries whether a given mark type is - [excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one. - */ - excludes(other) { - return this.excluded.indexOf(other) > -1; - } -} -/** -A document schema. Holds [node](https://prosemirror.net/docs/ref/#model.NodeType) and [mark -type](https://prosemirror.net/docs/ref/#model.MarkType) objects for the nodes and marks that may -occur in conforming documents, and provides functionality for -creating and deserializing such documents. - -When given, the type parameters provide the names of the nodes and -marks in this schema. -*/ -class Schema { - /** - Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec). - */ - constructor(spec) { - /** - The [linebreak - replacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement) node defined - in this schema, if any. - */ - this.linebreakReplacement = null; - /** - An object for storing whatever values modules may want to - compute and cache per schema. (If you want to store something - in it, try to use property names unlikely to clash.) - */ - this.cached = Object.create(null); - let instanceSpec = this.spec = {}; - for (let prop in spec) - instanceSpec[prop] = spec[prop]; - instanceSpec.nodes = OrderedMap.from(spec.nodes), - instanceSpec.marks = OrderedMap.from(spec.marks || {}), - this.nodes = NodeType.compile(this.spec.nodes, this); - this.marks = MarkType.compile(this.spec.marks, this); - let contentExprCache = Object.create(null); - for (let prop in this.nodes) { - if (prop in this.marks) - throw new RangeError(prop + " can not be both a node and a mark"); - let type = this.nodes[prop], contentExpr = type.spec.content || "", markExpr = type.spec.marks; - type.contentMatch = contentExprCache[contentExpr] || - (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes)); - type.inlineContent = type.contentMatch.inlineContent; - if (type.spec.linebreakReplacement) { - if (this.linebreakReplacement) - throw new RangeError("Multiple linebreak nodes defined"); - if (!type.isInline || !type.isLeaf) - throw new RangeError("Linebreak replacement nodes must be inline leaf nodes"); - this.linebreakReplacement = type; - } - type.markSet = markExpr == "_" ? null : - markExpr ? gatherMarks(this, markExpr.split(" ")) : - markExpr == "" || !type.inlineContent ? [] : null; - } - for (let prop in this.marks) { - let type = this.marks[prop], excl = type.spec.excludes; - type.excluded = excl == null ? [type] : excl == "" ? [] : gatherMarks(this, excl.split(" ")); - } - this.nodeFromJSON = this.nodeFromJSON.bind(this); - this.markFromJSON = this.markFromJSON.bind(this); - this.topNodeType = this.nodes[this.spec.topNode || "doc"]; - this.cached.wrappings = Object.create(null); - } - /** - Create a node in this schema. The `type` may be a string or a - `NodeType` instance. Attributes will be extended with defaults, - `content` may be a `Fragment`, `null`, a `Node`, or an array of - nodes. - */ - node(type, attrs = null, content, marks) { - if (typeof type == "string") - type = this.nodeType(type); - else if (!(type instanceof NodeType)) - throw new RangeError("Invalid node type: " + type); - else if (type.schema != this) - throw new RangeError("Node type from different schema used (" + type.name + ")"); - return type.createChecked(attrs, content, marks); - } - /** - Create a text node in the schema. Empty text nodes are not - allowed. - */ - text(text, marks) { - let type = this.nodes.text; - return new TextNode(type, type.defaultAttrs, text, Mark.setFrom(marks)); - } - /** - Create a mark with the given type and attributes. - */ - mark(type, attrs) { - if (typeof type == "string") - type = this.marks[type]; - return type.create(attrs); - } - /** - Deserialize a node from its JSON representation. This method is - bound. - */ - nodeFromJSON(json) { - return Node.fromJSON(this, json); - } - /** - Deserialize a mark from its JSON representation. This method is - bound. - */ - markFromJSON(json) { - return Mark.fromJSON(this, json); - } - /** - @internal - */ - nodeType(name) { - let found = this.nodes[name]; - if (!found) - throw new RangeError("Unknown node type: " + name); - return found; - } -} -function gatherMarks(schema, marks) { - let found = []; - for (let i = 0; i < marks.length; i++) { - let name = marks[i], mark = schema.marks[name], ok = mark; - if (mark) { - found.push(mark); - } - else { - for (let prop in schema.marks) { - let mark = schema.marks[prop]; - if (name == "_" || (mark.spec.group && mark.spec.group.split(" ").indexOf(name) > -1)) - found.push(ok = mark); - } - } - if (!ok) - throw new SyntaxError("Unknown mark type: '" + marks[i] + "'"); - } - return found; -} - -class Prosemirror { - constructor() { - this.defaultSchema = new Schema({ - nodes: { - text: {}, - doc: { content: "text*" }, - }, - }); - } - schema(schema) { - this.defaultSchema = schema; - return this; - } - fromYdoc(document, fieldName) { - const data = {}; - // allow a single field name - if (typeof fieldName === "string") { - return yDocToProsemirrorJSON(document, fieldName); - } - // default to all available fields if the given field name is empty - if (fieldName === undefined || fieldName.length === 0) { - fieldName = Array.from(document.share.keys()); - } - fieldName.forEach((field) => { - // @ts-ignore - data[field] = yDocToProsemirrorJSON(document, field); - }); - return data; - } - toYdoc(document, fieldName = "prosemirror", schema) { - if (!document) { - throw new Error(`You’ve passed an empty or invalid document to the Transformer. Make sure to pass ProseMirror-compatible JSON. Actually passed JSON: ${document}`); - } - // allow a single field name - if (typeof fieldName === "string") { - return prosemirrorJSONToYDoc(schema || this.defaultSchema, document, fieldName); - } - const ydoc = new Doc(); - fieldName.forEach((field) => { - const update = encodeStateAsUpdate(prosemirrorJSONToYDoc(schema || this.defaultSchema, document, field)); - applyUpdate(ydoc, update); - }); - return ydoc; - } -} -const ProsemirrorTransformer = new Prosemirror(); - -class Tiptap { - constructor() { - this.defaultExtensions = [StarterKit]; - } - extensions(extensions) { - this.defaultExtensions = extensions; - return this; - } - fromYdoc(document, fieldName) { - return ProsemirrorTransformer.fromYdoc(document, fieldName); - } - toYdoc(document, fieldName = "default", extensions) { - return ProsemirrorTransformer.toYdoc(document, fieldName, getSchema(extensions || this.defaultExtensions)); - } -} -const TiptapTransformer = new Tiptap(); - -export { ProsemirrorTransformer, Tiptap, TiptapTransformer }; -//# sourceMappingURL=hocuspocus-transformer.esm.js.map diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js.map deleted file mode 100644 index 66ed14d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-transformer.esm.js","sources":["../../../node_modules/orderedmap/dist/index.js","../../../node_modules/prosemirror-model/dist/index.js","../src/Prosemirror.ts","../src/Tiptap.ts"],"sourcesContent":["// ::- Persistent data structure representing an ordered mapping from\n// strings to values, with some convenient update methods.\nfunction OrderedMap(content) {\n this.content = content;\n}\n\nOrderedMap.prototype = {\n constructor: OrderedMap,\n\n find: function(key) {\n for (var i = 0; i < this.content.length; i += 2)\n if (this.content[i] === key) return i\n return -1\n },\n\n // :: (string) → ?any\n // Retrieve the value stored under `key`, or return undefined when\n // no such key exists.\n get: function(key) {\n var found = this.find(key);\n return found == -1 ? undefined : this.content[found + 1]\n },\n\n // :: (string, any, ?string) → OrderedMap\n // Create a new map by replacing the value of `key` with a new\n // value, or adding a binding to the end of the map. If `newKey` is\n // given, the key of the binding will be replaced with that key.\n update: function(key, value, newKey) {\n var self = newKey && newKey != key ? this.remove(newKey) : this;\n var found = self.find(key), content = self.content.slice();\n if (found == -1) {\n content.push(newKey || key, value);\n } else {\n content[found + 1] = value;\n if (newKey) content[found] = newKey;\n }\n return new OrderedMap(content)\n },\n\n // :: (string) → OrderedMap\n // Return a map with the given key removed, if it existed.\n remove: function(key) {\n var found = this.find(key);\n if (found == -1) return this\n var content = this.content.slice();\n content.splice(found, 2);\n return new OrderedMap(content)\n },\n\n // :: (string, any) → OrderedMap\n // Add a new key to the start of the map.\n addToStart: function(key, value) {\n return new OrderedMap([key, value].concat(this.remove(key).content))\n },\n\n // :: (string, any) → OrderedMap\n // Add a new key to the end of the map.\n addToEnd: function(key, value) {\n var content = this.remove(key).content.slice();\n content.push(key, value);\n return new OrderedMap(content)\n },\n\n // :: (string, string, any) → OrderedMap\n // Add a key after the given key. If `place` is not found, the new\n // key is added to the end.\n addBefore: function(place, key, value) {\n var without = this.remove(key), content = without.content.slice();\n var found = without.find(place);\n content.splice(found == -1 ? content.length : found, 0, key, value);\n return new OrderedMap(content)\n },\n\n // :: ((key: string, value: any))\n // Call the given function for each key/value pair in the map, in\n // order.\n forEach: function(f) {\n for (var i = 0; i < this.content.length; i += 2)\n f(this.content[i], this.content[i + 1]);\n },\n\n // :: (union) → OrderedMap\n // Create a new map by prepending the keys in this map that don't\n // appear in `map` before the keys in `map`.\n prepend: function(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this\n return new OrderedMap(map.content.concat(this.subtract(map).content))\n },\n\n // :: (union) → OrderedMap\n // Create a new map by appending the keys in this map that don't\n // appear in `map` after the keys in `map`.\n append: function(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this\n return new OrderedMap(this.subtract(map).content.concat(map.content))\n },\n\n // :: (union) → OrderedMap\n // Create a map containing all the keys in this map that don't\n // appear in `map`.\n subtract: function(map) {\n var result = this;\n map = OrderedMap.from(map);\n for (var i = 0; i < map.content.length; i += 2)\n result = result.remove(map.content[i]);\n return result\n },\n\n // :: () → Object\n // Turn ordered map into a plain object.\n toObject: function() {\n var result = {};\n this.forEach(function(key, value) { result[key] = value; });\n return result\n },\n\n // :: number\n // The amount of keys in this map.\n get size() {\n return this.content.length >> 1\n }\n};\n\n// :: (?union) → OrderedMap\n// Return a map with the given content. If null, create an empty\n// map. If given an ordered map, return that map itself. If given an\n// object, create a map from the object's properties.\nOrderedMap.from = function(value) {\n if (value instanceof OrderedMap) return value\n var content = [];\n if (value) for (var prop in value) content.push(prop, value[prop]);\n return new OrderedMap(content)\n};\n\nexport default OrderedMap;\n","import OrderedMap from 'orderedmap';\n\nfunction findDiffStart(a, b, pos) {\n for (let i = 0;; i++) {\n if (i == a.childCount || i == b.childCount)\n return a.childCount == b.childCount ? null : pos;\n let childA = a.child(i), childB = b.child(i);\n if (childA == childB) {\n pos += childA.nodeSize;\n continue;\n }\n if (!childA.sameMarkup(childB))\n return pos;\n if (childA.isText && childA.text != childB.text) {\n for (let j = 0; childA.text[j] == childB.text[j]; j++)\n pos++;\n return pos;\n }\n if (childA.content.size || childB.content.size) {\n let inner = findDiffStart(childA.content, childB.content, pos + 1);\n if (inner != null)\n return inner;\n }\n pos += childA.nodeSize;\n }\n}\nfunction findDiffEnd(a, b, posA, posB) {\n for (let iA = a.childCount, iB = b.childCount;;) {\n if (iA == 0 || iB == 0)\n return iA == iB ? null : { a: posA, b: posB };\n let childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize;\n if (childA == childB) {\n posA -= size;\n posB -= size;\n continue;\n }\n if (!childA.sameMarkup(childB))\n return { a: posA, b: posB };\n if (childA.isText && childA.text != childB.text) {\n let same = 0, minSize = Math.min(childA.text.length, childB.text.length);\n while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) {\n same++;\n posA--;\n posB--;\n }\n return { a: posA, b: posB };\n }\n if (childA.content.size || childB.content.size) {\n let inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1);\n if (inner)\n return inner;\n }\n posA -= size;\n posB -= size;\n }\n}\n\n/**\nA fragment represents a node's collection of child nodes.\n\nLike nodes, fragments are persistent data structures, and you\nshould not mutate them or their content. Rather, you create new\ninstances whenever needed. The API tries to make this easy.\n*/\nclass Fragment {\n /**\n @internal\n */\n constructor(\n /**\n The child nodes in this fragment.\n */\n content, size) {\n this.content = content;\n this.size = size || 0;\n if (size == null)\n for (let i = 0; i < content.length; i++)\n this.size += content[i].nodeSize;\n }\n /**\n Invoke a callback for all descendant nodes between the given two\n positions (relative to start of this fragment). Doesn't descend\n into a node when the callback returns `false`.\n */\n nodesBetween(from, to, f, nodeStart = 0, parent) {\n for (let i = 0, pos = 0; pos < to; i++) {\n let child = this.content[i], end = pos + child.nodeSize;\n if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) {\n let start = pos + 1;\n child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start);\n }\n pos = end;\n }\n }\n /**\n Call the given callback for every descendant node. `pos` will be\n relative to the start of the fragment. The callback may return\n `false` to prevent traversal of a given node's children.\n */\n descendants(f) {\n this.nodesBetween(0, this.size, f);\n }\n /**\n Extract the text between `from` and `to`. See the same method on\n [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween).\n */\n textBetween(from, to, blockSeparator, leafText) {\n let text = \"\", first = true;\n this.nodesBetween(from, to, (node, pos) => {\n let nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos)\n : !node.isLeaf ? \"\"\n : leafText ? (typeof leafText === \"function\" ? leafText(node) : leafText)\n : node.type.spec.leafText ? node.type.spec.leafText(node)\n : \"\";\n if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) {\n if (first)\n first = false;\n else\n text += blockSeparator;\n }\n text += nodeText;\n }, 0);\n return text;\n }\n /**\n Create a new fragment containing the combined content of this\n fragment and the other.\n */\n append(other) {\n if (!other.size)\n return this;\n if (!this.size)\n return other;\n let last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0;\n if (last.isText && last.sameMarkup(first)) {\n content[content.length - 1] = last.withText(last.text + first.text);\n i = 1;\n }\n for (; i < other.content.length; i++)\n content.push(other.content[i]);\n return new Fragment(content, this.size + other.size);\n }\n /**\n Cut out the sub-fragment between the two given positions.\n */\n cut(from, to = this.size) {\n if (from == 0 && to == this.size)\n return this;\n let result = [], size = 0;\n if (to > from)\n for (let i = 0, pos = 0; pos < to; i++) {\n let child = this.content[i], end = pos + child.nodeSize;\n if (end > from) {\n if (pos < from || end > to) {\n if (child.isText)\n child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos));\n else\n child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1));\n }\n result.push(child);\n size += child.nodeSize;\n }\n pos = end;\n }\n return new Fragment(result, size);\n }\n /**\n @internal\n */\n cutByIndex(from, to) {\n if (from == to)\n return Fragment.empty;\n if (from == 0 && to == this.content.length)\n return this;\n return new Fragment(this.content.slice(from, to));\n }\n /**\n Create a new fragment in which the node at the given index is\n replaced by the given node.\n */\n replaceChild(index, node) {\n let current = this.content[index];\n if (current == node)\n return this;\n let copy = this.content.slice();\n let size = this.size + node.nodeSize - current.nodeSize;\n copy[index] = node;\n return new Fragment(copy, size);\n }\n /**\n Create a new fragment by prepending the given node to this\n fragment.\n */\n addToStart(node) {\n return new Fragment([node].concat(this.content), this.size + node.nodeSize);\n }\n /**\n Create a new fragment by appending the given node to this\n fragment.\n */\n addToEnd(node) {\n return new Fragment(this.content.concat(node), this.size + node.nodeSize);\n }\n /**\n Compare this fragment to another one.\n */\n eq(other) {\n if (this.content.length != other.content.length)\n return false;\n for (let i = 0; i < this.content.length; i++)\n if (!this.content[i].eq(other.content[i]))\n return false;\n return true;\n }\n /**\n The first child of the fragment, or `null` if it is empty.\n */\n get firstChild() { return this.content.length ? this.content[0] : null; }\n /**\n The last child of the fragment, or `null` if it is empty.\n */\n get lastChild() { return this.content.length ? this.content[this.content.length - 1] : null; }\n /**\n The number of child nodes in this fragment.\n */\n get childCount() { return this.content.length; }\n /**\n Get the child node at the given index. Raise an error when the\n index is out of range.\n */\n child(index) {\n let found = this.content[index];\n if (!found)\n throw new RangeError(\"Index \" + index + \" out of range for \" + this);\n return found;\n }\n /**\n Get the child node at the given index, if it exists.\n */\n maybeChild(index) {\n return this.content[index] || null;\n }\n /**\n Call `f` for every child node, passing the node, its offset\n into this parent node, and its index.\n */\n forEach(f) {\n for (let i = 0, p = 0; i < this.content.length; i++) {\n let child = this.content[i];\n f(child, p, i);\n p += child.nodeSize;\n }\n }\n /**\n Find the first position at which this fragment and another\n fragment differ, or `null` if they are the same.\n */\n findDiffStart(other, pos = 0) {\n return findDiffStart(this, other, pos);\n }\n /**\n Find the first position, searching from the end, at which this\n fragment and the given fragment differ, or `null` if they are\n the same. Since this position will not be the same in both\n nodes, an object with two separate positions is returned.\n */\n findDiffEnd(other, pos = this.size, otherPos = other.size) {\n return findDiffEnd(this, other, pos, otherPos);\n }\n /**\n Find the index and inner offset corresponding to a given relative\n position in this fragment. The result object will be reused\n (overwritten) the next time the function is called. @internal\n */\n findIndex(pos, round = -1) {\n if (pos == 0)\n return retIndex(0, pos);\n if (pos == this.size)\n return retIndex(this.content.length, pos);\n if (pos > this.size || pos < 0)\n throw new RangeError(`Position ${pos} outside of fragment (${this})`);\n for (let i = 0, curPos = 0;; i++) {\n let cur = this.child(i), end = curPos + cur.nodeSize;\n if (end >= pos) {\n if (end == pos || round > 0)\n return retIndex(i + 1, end);\n return retIndex(i, curPos);\n }\n curPos = end;\n }\n }\n /**\n Return a debugging string that describes this fragment.\n */\n toString() { return \"<\" + this.toStringInner() + \">\"; }\n /**\n @internal\n */\n toStringInner() { return this.content.join(\", \"); }\n /**\n Create a JSON-serializeable representation of this fragment.\n */\n toJSON() {\n return this.content.length ? this.content.map(n => n.toJSON()) : null;\n }\n /**\n Deserialize a fragment from its JSON representation.\n */\n static fromJSON(schema, value) {\n if (!value)\n return Fragment.empty;\n if (!Array.isArray(value))\n throw new RangeError(\"Invalid input for Fragment.fromJSON\");\n return new Fragment(value.map(schema.nodeFromJSON));\n }\n /**\n Build a fragment from an array of nodes. Ensures that adjacent\n text nodes with the same marks are joined together.\n */\n static fromArray(array) {\n if (!array.length)\n return Fragment.empty;\n let joined, size = 0;\n for (let i = 0; i < array.length; i++) {\n let node = array[i];\n size += node.nodeSize;\n if (i && node.isText && array[i - 1].sameMarkup(node)) {\n if (!joined)\n joined = array.slice(0, i);\n joined[joined.length - 1] = node\n .withText(joined[joined.length - 1].text + node.text);\n }\n else if (joined) {\n joined.push(node);\n }\n }\n return new Fragment(joined || array, size);\n }\n /**\n Create a fragment from something that can be interpreted as a\n set of nodes. For `null`, it returns the empty fragment. For a\n fragment, the fragment itself. For a node or array of nodes, a\n fragment containing those nodes.\n */\n static from(nodes) {\n if (!nodes)\n return Fragment.empty;\n if (nodes instanceof Fragment)\n return nodes;\n if (Array.isArray(nodes))\n return this.fromArray(nodes);\n if (nodes.attrs)\n return new Fragment([nodes], nodes.nodeSize);\n throw new RangeError(\"Can not convert \" + nodes + \" to a Fragment\" +\n (nodes.nodesBetween ? \" (looks like multiple versions of prosemirror-model were loaded)\" : \"\"));\n }\n}\n/**\nAn empty fragment. Intended to be reused whenever a node doesn't\ncontain anything (rather than allocating a new empty fragment for\neach leaf node).\n*/\nFragment.empty = new Fragment([], 0);\nconst found = { index: 0, offset: 0 };\nfunction retIndex(index, offset) {\n found.index = index;\n found.offset = offset;\n return found;\n}\n\nfunction compareDeep(a, b) {\n if (a === b)\n return true;\n if (!(a && typeof a == \"object\") ||\n !(b && typeof b == \"object\"))\n return false;\n let array = Array.isArray(a);\n if (Array.isArray(b) != array)\n return false;\n if (array) {\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!compareDeep(a[i], b[i]))\n return false;\n }\n else {\n for (let p in a)\n if (!(p in b) || !compareDeep(a[p], b[p]))\n return false;\n for (let p in b)\n if (!(p in a))\n return false;\n }\n return true;\n}\n\n/**\nA mark is a piece of information that can be attached to a node,\nsuch as it being emphasized, in code font, or a link. It has a\ntype and optionally a set of attributes that provide further\ninformation (such as the target of the link). Marks are created\nthrough a `Schema`, which controls which types exist and which\nattributes they have.\n*/\nclass Mark {\n /**\n @internal\n */\n constructor(\n /**\n The type of this mark.\n */\n type, \n /**\n The attributes associated with this mark.\n */\n attrs) {\n this.type = type;\n this.attrs = attrs;\n }\n /**\n Given a set of marks, create a new set which contains this one as\n well, in the right position. If this mark is already in the set,\n the set itself is returned. If any marks that are set to be\n [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present,\n those are replaced by this one.\n */\n addToSet(set) {\n let copy, placed = false;\n for (let i = 0; i < set.length; i++) {\n let other = set[i];\n if (this.eq(other))\n return set;\n if (this.type.excludes(other.type)) {\n if (!copy)\n copy = set.slice(0, i);\n }\n else if (other.type.excludes(this.type)) {\n return set;\n }\n else {\n if (!placed && other.type.rank > this.type.rank) {\n if (!copy)\n copy = set.slice(0, i);\n copy.push(this);\n placed = true;\n }\n if (copy)\n copy.push(other);\n }\n }\n if (!copy)\n copy = set.slice();\n if (!placed)\n copy.push(this);\n return copy;\n }\n /**\n Remove this mark from the given set, returning a new set. If this\n mark is not in the set, the set itself is returned.\n */\n removeFromSet(set) {\n for (let i = 0; i < set.length; i++)\n if (this.eq(set[i]))\n return set.slice(0, i).concat(set.slice(i + 1));\n return set;\n }\n /**\n Test whether this mark is in the given set of marks.\n */\n isInSet(set) {\n for (let i = 0; i < set.length; i++)\n if (this.eq(set[i]))\n return true;\n return false;\n }\n /**\n Test whether this mark has the same type and attributes as\n another mark.\n */\n eq(other) {\n return this == other ||\n (this.type == other.type && compareDeep(this.attrs, other.attrs));\n }\n /**\n Convert this mark to a JSON-serializeable representation.\n */\n toJSON() {\n let obj = { type: this.type.name };\n for (let _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n return obj;\n }\n /**\n Deserialize a mark from JSON.\n */\n static fromJSON(schema, json) {\n if (!json)\n throw new RangeError(\"Invalid input for Mark.fromJSON\");\n let type = schema.marks[json.type];\n if (!type)\n throw new RangeError(`There is no mark type ${json.type} in this schema`);\n let mark = type.create(json.attrs);\n type.checkAttrs(mark.attrs);\n return mark;\n }\n /**\n Test whether two sets of marks are identical.\n */\n static sameSet(a, b) {\n if (a == b)\n return true;\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!a[i].eq(b[i]))\n return false;\n return true;\n }\n /**\n Create a properly sorted mark set from null, a single mark, or an\n unsorted array of marks.\n */\n static setFrom(marks) {\n if (!marks || Array.isArray(marks) && marks.length == 0)\n return Mark.none;\n if (marks instanceof Mark)\n return [marks];\n let copy = marks.slice();\n copy.sort((a, b) => a.type.rank - b.type.rank);\n return copy;\n }\n}\n/**\nThe empty set of marks.\n*/\nMark.none = [];\n\n/**\nError type raised by [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) when\ngiven an invalid replacement.\n*/\nclass ReplaceError extends Error {\n}\n/*\nReplaceError = function(this: any, message: string) {\n let err = Error.call(this, message)\n ;(err as any).__proto__ = ReplaceError.prototype\n return err\n} as any\n\nReplaceError.prototype = Object.create(Error.prototype)\nReplaceError.prototype.constructor = ReplaceError\nReplaceError.prototype.name = \"ReplaceError\"\n*/\n/**\nA slice represents a piece cut out of a larger document. It\nstores not only a fragment, but also the depth up to which nodes on\nboth side are ‘open’ (cut through).\n*/\nclass Slice {\n /**\n Create a slice. When specifying a non-zero open depth, you must\n make sure that there are nodes of at least that depth at the\n appropriate side of the fragment—i.e. if the fragment is an\n empty paragraph node, `openStart` and `openEnd` can't be greater\n than 1.\n \n It is not necessary for the content of open nodes to conform to\n the schema's content constraints, though it should be a valid\n start/end/middle for such a node, depending on which sides are\n open.\n */\n constructor(\n /**\n The slice's content.\n */\n content, \n /**\n The open depth at the start of the fragment.\n */\n openStart, \n /**\n The open depth at the end.\n */\n openEnd) {\n this.content = content;\n this.openStart = openStart;\n this.openEnd = openEnd;\n }\n /**\n The size this slice would add when inserted into a document.\n */\n get size() {\n return this.content.size - this.openStart - this.openEnd;\n }\n /**\n @internal\n */\n insertAt(pos, fragment) {\n let content = insertInto(this.content, pos + this.openStart, fragment);\n return content && new Slice(content, this.openStart, this.openEnd);\n }\n /**\n @internal\n */\n removeBetween(from, to) {\n return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd);\n }\n /**\n Tests whether this slice is equal to another slice.\n */\n eq(other) {\n return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd;\n }\n /**\n @internal\n */\n toString() {\n return this.content + \"(\" + this.openStart + \",\" + this.openEnd + \")\";\n }\n /**\n Convert a slice to a JSON-serializable representation.\n */\n toJSON() {\n if (!this.content.size)\n return null;\n let json = { content: this.content.toJSON() };\n if (this.openStart > 0)\n json.openStart = this.openStart;\n if (this.openEnd > 0)\n json.openEnd = this.openEnd;\n return json;\n }\n /**\n Deserialize a slice from its JSON representation.\n */\n static fromJSON(schema, json) {\n if (!json)\n return Slice.empty;\n let openStart = json.openStart || 0, openEnd = json.openEnd || 0;\n if (typeof openStart != \"number\" || typeof openEnd != \"number\")\n throw new RangeError(\"Invalid input for Slice.fromJSON\");\n return new Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd);\n }\n /**\n Create a slice from a fragment by taking the maximum possible\n open value on both side of the fragment.\n */\n static maxOpen(fragment, openIsolating = true) {\n let openStart = 0, openEnd = 0;\n for (let n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild)\n openStart++;\n for (let n = fragment.lastChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.lastChild)\n openEnd++;\n return new Slice(fragment, openStart, openEnd);\n }\n}\n/**\nThe empty slice.\n*/\nSlice.empty = new Slice(Fragment.empty, 0, 0);\nfunction removeRange(content, from, to) {\n let { index, offset } = content.findIndex(from), child = content.maybeChild(index);\n let { index: indexTo, offset: offsetTo } = content.findIndex(to);\n if (offset == from || child.isText) {\n if (offsetTo != to && !content.child(indexTo).isText)\n throw new RangeError(\"Removing non-flat range\");\n return content.cut(0, from).append(content.cut(to));\n }\n if (index != indexTo)\n throw new RangeError(\"Removing non-flat range\");\n return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)));\n}\nfunction insertInto(content, dist, insert, parent) {\n let { index, offset } = content.findIndex(dist), child = content.maybeChild(index);\n if (offset == dist || child.isText) {\n if (parent && !parent.canReplace(index, index, insert))\n return null;\n return content.cut(0, dist).append(insert).append(content.cut(dist));\n }\n let inner = insertInto(child.content, dist - offset - 1, insert);\n return inner && content.replaceChild(index, child.copy(inner));\n}\nfunction replace($from, $to, slice) {\n if (slice.openStart > $from.depth)\n throw new ReplaceError(\"Inserted content deeper than insertion position\");\n if ($from.depth - slice.openStart != $to.depth - slice.openEnd)\n throw new ReplaceError(\"Inconsistent open depths\");\n return replaceOuter($from, $to, slice, 0);\n}\nfunction replaceOuter($from, $to, slice, depth) {\n let index = $from.index(depth), node = $from.node(depth);\n if (index == $to.index(depth) && depth < $from.depth - slice.openStart) {\n let inner = replaceOuter($from, $to, slice, depth + 1);\n return node.copy(node.content.replaceChild(index, inner));\n }\n else if (!slice.content.size) {\n return close(node, replaceTwoWay($from, $to, depth));\n }\n else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { // Simple, flat case\n let parent = $from.parent, content = parent.content;\n return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)));\n }\n else {\n let { start, end } = prepareSliceForReplace(slice, $from);\n return close(node, replaceThreeWay($from, start, end, $to, depth));\n }\n}\nfunction checkJoin(main, sub) {\n if (!sub.type.compatibleContent(main.type))\n throw new ReplaceError(\"Cannot join \" + sub.type.name + \" onto \" + main.type.name);\n}\nfunction joinable($before, $after, depth) {\n let node = $before.node(depth);\n checkJoin(node, $after.node(depth));\n return node;\n}\nfunction addNode(child, target) {\n let last = target.length - 1;\n if (last >= 0 && child.isText && child.sameMarkup(target[last]))\n target[last] = child.withText(target[last].text + child.text);\n else\n target.push(child);\n}\nfunction addRange($start, $end, depth, target) {\n let node = ($end || $start).node(depth);\n let startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount;\n if ($start) {\n startIndex = $start.index(depth);\n if ($start.depth > depth) {\n startIndex++;\n }\n else if ($start.textOffset) {\n addNode($start.nodeAfter, target);\n startIndex++;\n }\n }\n for (let i = startIndex; i < endIndex; i++)\n addNode(node.child(i), target);\n if ($end && $end.depth == depth && $end.textOffset)\n addNode($end.nodeBefore, target);\n}\nfunction close(node, content) {\n node.type.checkContent(content);\n return node.copy(content);\n}\nfunction replaceThreeWay($from, $start, $end, $to, depth) {\n let openStart = $from.depth > depth && joinable($from, $start, depth + 1);\n let openEnd = $to.depth > depth && joinable($end, $to, depth + 1);\n let content = [];\n addRange(null, $from, depth, content);\n if (openStart && openEnd && $start.index(depth) == $end.index(depth)) {\n checkJoin(openStart, openEnd);\n addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content);\n }\n else {\n if (openStart)\n addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content);\n addRange($start, $end, depth, content);\n if (openEnd)\n addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\nfunction replaceTwoWay($from, $to, depth) {\n let content = [];\n addRange(null, $from, depth, content);\n if ($from.depth > depth) {\n let type = joinable($from, $to, depth + 1);\n addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\nfunction prepareSliceForReplace(slice, $along) {\n let extra = $along.depth - slice.openStart, parent = $along.node(extra);\n let node = parent.copy(slice.content);\n for (let i = extra - 1; i >= 0; i--)\n node = $along.node(i).copy(Fragment.from(node));\n return { start: node.resolveNoCache(slice.openStart + extra),\n end: node.resolveNoCache(node.content.size - slice.openEnd - extra) };\n}\n\n/**\nYou can [_resolve_](https://prosemirror.net/docs/ref/#model.Node.resolve) a position to get more\ninformation about it. Objects of this class represent such a\nresolved position, providing various pieces of context\ninformation, and some helper methods.\n\nThroughout this interface, methods that take an optional `depth`\nparameter will interpret undefined as `this.depth` and negative\nnumbers as `this.depth + value`.\n*/\nclass ResolvedPos {\n /**\n @internal\n */\n constructor(\n /**\n The position that was resolved.\n */\n pos, \n /**\n @internal\n */\n path, \n /**\n The offset this position has into its parent node.\n */\n parentOffset) {\n this.pos = pos;\n this.path = path;\n this.parentOffset = parentOffset;\n this.depth = path.length / 3 - 1;\n }\n /**\n @internal\n */\n resolveDepth(val) {\n if (val == null)\n return this.depth;\n if (val < 0)\n return this.depth + val;\n return val;\n }\n /**\n The parent node that the position points into. Note that even if\n a position points into a text node, that node is not considered\n the parent—text nodes are ‘flat’ in this model, and have no content.\n */\n get parent() { return this.node(this.depth); }\n /**\n The root node in which the position was resolved.\n */\n get doc() { return this.node(0); }\n /**\n The ancestor node at the given level. `p.node(p.depth)` is the\n same as `p.parent`.\n */\n node(depth) { return this.path[this.resolveDepth(depth) * 3]; }\n /**\n The index into the ancestor at the given level. If this points\n at the 3rd node in the 2nd paragraph on the top level, for\n example, `p.index(0)` is 1 and `p.index(1)` is 2.\n */\n index(depth) { return this.path[this.resolveDepth(depth) * 3 + 1]; }\n /**\n The index pointing after this position into the ancestor at the\n given level.\n */\n indexAfter(depth) {\n depth = this.resolveDepth(depth);\n return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1);\n }\n /**\n The (absolute) position at the start of the node at the given\n level.\n */\n start(depth) {\n depth = this.resolveDepth(depth);\n return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n }\n /**\n The (absolute) position at the end of the node at the given\n level.\n */\n end(depth) {\n depth = this.resolveDepth(depth);\n return this.start(depth) + this.node(depth).content.size;\n }\n /**\n The (absolute) position directly before the wrapping node at the\n given level, or, when `depth` is `this.depth + 1`, the original\n position.\n */\n before(depth) {\n depth = this.resolveDepth(depth);\n if (!depth)\n throw new RangeError(\"There is no position before the top-level node\");\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1];\n }\n /**\n The (absolute) position directly after the wrapping node at the\n given level, or the original position when `depth` is `this.depth + 1`.\n */\n after(depth) {\n depth = this.resolveDepth(depth);\n if (!depth)\n throw new RangeError(\"There is no position after the top-level node\");\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize;\n }\n /**\n When this position points into a text node, this returns the\n distance between the position and the start of the text node.\n Will be zero for positions that point between nodes.\n */\n get textOffset() { return this.pos - this.path[this.path.length - 1]; }\n /**\n Get the node directly after the position, if any. If the position\n points into a text node, only the part of that node after the\n position is returned.\n */\n get nodeAfter() {\n let parent = this.parent, index = this.index(this.depth);\n if (index == parent.childCount)\n return null;\n let dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index);\n return dOff ? parent.child(index).cut(dOff) : child;\n }\n /**\n Get the node directly before the position, if any. If the\n position points into a text node, only the part of that node\n before the position is returned.\n */\n get nodeBefore() {\n let index = this.index(this.depth);\n let dOff = this.pos - this.path[this.path.length - 1];\n if (dOff)\n return this.parent.child(index).cut(0, dOff);\n return index == 0 ? null : this.parent.child(index - 1);\n }\n /**\n Get the position at the given index in the parent node at the\n given depth (which defaults to `this.depth`).\n */\n posAtIndex(index, depth) {\n depth = this.resolveDepth(depth);\n let node = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n for (let i = 0; i < index; i++)\n pos += node.child(i).nodeSize;\n return pos;\n }\n /**\n Get the marks at this position, factoring in the surrounding\n marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the\n position is at the start of a non-empty node, the marks of the\n node after it (if any) are returned.\n */\n marks() {\n let parent = this.parent, index = this.index();\n // In an empty parent, return the empty array\n if (parent.content.size == 0)\n return Mark.none;\n // When inside a text node, just return the text node's marks\n if (this.textOffset)\n return parent.child(index).marks;\n let main = parent.maybeChild(index - 1), other = parent.maybeChild(index);\n // If the `after` flag is true of there is no node before, make\n // the node after this position the main reference.\n if (!main) {\n let tmp = main;\n main = other;\n other = tmp;\n }\n // Use all marks in the main node, except those that have\n // `inclusive` set to false and are not present in the other node.\n let marks = main.marks;\n for (var i = 0; i < marks.length; i++)\n if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks)))\n marks = marks[i--].removeFromSet(marks);\n return marks;\n }\n /**\n Get the marks after the current position, if any, except those\n that are non-inclusive and not present at position `$end`. This\n is mostly useful for getting the set of marks to preserve after a\n deletion. Will return `null` if this position is at the end of\n its parent node or its parent node isn't a textblock (in which\n case no marks should be preserved).\n */\n marksAcross($end) {\n let after = this.parent.maybeChild(this.index());\n if (!after || !after.isInline)\n return null;\n let marks = after.marks, next = $end.parent.maybeChild($end.index());\n for (var i = 0; i < marks.length; i++)\n if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks)))\n marks = marks[i--].removeFromSet(marks);\n return marks;\n }\n /**\n The depth up to which this position and the given (non-resolved)\n position share the same parent nodes.\n */\n sharedDepth(pos) {\n for (let depth = this.depth; depth > 0; depth--)\n if (this.start(depth) <= pos && this.end(depth) >= pos)\n return depth;\n return 0;\n }\n /**\n Returns a range based on the place where this position and the\n given position diverge around block content. If both point into\n the same textblock, for example, a range around that textblock\n will be returned. If they point into different blocks, the range\n around those blocks in their shared ancestor is returned. You can\n pass in an optional predicate that will be called with a parent\n node to see if a range into that parent is acceptable.\n */\n blockRange(other = this, pred) {\n if (other.pos < this.pos)\n return other.blockRange(this);\n for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--)\n if (other.pos <= this.end(d) && (!pred || pred(this.node(d))))\n return new NodeRange(this, other, d);\n return null;\n }\n /**\n Query whether the given position shares the same parent node.\n */\n sameParent(other) {\n return this.pos - this.parentOffset == other.pos - other.parentOffset;\n }\n /**\n Return the greater of this and the given position.\n */\n max(other) {\n return other.pos > this.pos ? other : this;\n }\n /**\n Return the smaller of this and the given position.\n */\n min(other) {\n return other.pos < this.pos ? other : this;\n }\n /**\n @internal\n */\n toString() {\n let str = \"\";\n for (let i = 1; i <= this.depth; i++)\n str += (str ? \"/\" : \"\") + this.node(i).type.name + \"_\" + this.index(i - 1);\n return str + \":\" + this.parentOffset;\n }\n /**\n @internal\n */\n static resolve(doc, pos) {\n if (!(pos >= 0 && pos <= doc.content.size))\n throw new RangeError(\"Position \" + pos + \" out of range\");\n let path = [];\n let start = 0, parentOffset = pos;\n for (let node = doc;;) {\n let { index, offset } = node.content.findIndex(parentOffset);\n let rem = parentOffset - offset;\n path.push(node, index, start + offset);\n if (!rem)\n break;\n node = node.child(index);\n if (node.isText)\n break;\n parentOffset = rem - 1;\n start += offset + 1;\n }\n return new ResolvedPos(pos, path, parentOffset);\n }\n /**\n @internal\n */\n static resolveCached(doc, pos) {\n let cache = resolveCache.get(doc);\n if (cache) {\n for (let i = 0; i < cache.elts.length; i++) {\n let elt = cache.elts[i];\n if (elt.pos == pos)\n return elt;\n }\n }\n else {\n resolveCache.set(doc, cache = new ResolveCache);\n }\n let result = cache.elts[cache.i] = ResolvedPos.resolve(doc, pos);\n cache.i = (cache.i + 1) % resolveCacheSize;\n return result;\n }\n}\nclass ResolveCache {\n constructor() {\n this.elts = [];\n this.i = 0;\n }\n}\nconst resolveCacheSize = 12, resolveCache = new WeakMap();\n/**\nRepresents a flat range of content, i.e. one that starts and\nends in the same node.\n*/\nclass NodeRange {\n /**\n Construct a node range. `$from` and `$to` should point into the\n same node until at least the given `depth`, since a node range\n denotes an adjacent set of nodes in a single parent node.\n */\n constructor(\n /**\n A resolved position along the start of the content. May have a\n `depth` greater than this object's `depth` property, since\n these are the positions that were used to compute the range,\n not re-resolved positions directly at its boundaries.\n */\n $from, \n /**\n A position along the end of the content. See\n caveat for [`$from`](https://prosemirror.net/docs/ref/#model.NodeRange.$from).\n */\n $to, \n /**\n The depth of the node that this range points into.\n */\n depth) {\n this.$from = $from;\n this.$to = $to;\n this.depth = depth;\n }\n /**\n The position at the start of the range.\n */\n get start() { return this.$from.before(this.depth + 1); }\n /**\n The position at the end of the range.\n */\n get end() { return this.$to.after(this.depth + 1); }\n /**\n The parent node that the range points into.\n */\n get parent() { return this.$from.node(this.depth); }\n /**\n The start index of the range in the parent node.\n */\n get startIndex() { return this.$from.index(this.depth); }\n /**\n The end index of the range in the parent node.\n */\n get endIndex() { return this.$to.indexAfter(this.depth); }\n}\n\nconst emptyAttrs = Object.create(null);\n/**\nThis class represents a node in the tree that makes up a\nProseMirror document. So a document is an instance of `Node`, with\nchildren that are also instances of `Node`.\n\nNodes are persistent data structures. Instead of changing them, you\ncreate new ones with the content you want. Old ones keep pointing\nat the old document shape. This is made cheaper by sharing\nstructure between the old and new data as much as possible, which a\ntree shape like this (without back pointers) makes easy.\n\n**Do not** directly mutate the properties of a `Node` object. See\n[the guide](https://prosemirror.net/docs/guide/#doc) for more information.\n*/\nclass Node {\n /**\n @internal\n */\n constructor(\n /**\n The type of node that this is.\n */\n type, \n /**\n An object mapping attribute names to values. The kind of\n attributes allowed and required are\n [determined](https://prosemirror.net/docs/ref/#model.NodeSpec.attrs) by the node type.\n */\n attrs, \n // A fragment holding the node's children.\n content, \n /**\n The marks (things like whether it is emphasized or part of a\n link) applied to this node.\n */\n marks = Mark.none) {\n this.type = type;\n this.attrs = attrs;\n this.marks = marks;\n this.content = content || Fragment.empty;\n }\n /**\n The array of this node's child nodes.\n */\n get children() { return this.content.content; }\n /**\n The size of this node, as defined by the integer-based [indexing\n scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the\n amount of characters. For other leaf nodes, it is one. For\n non-leaf nodes, it is the size of the content plus two (the\n start and end token).\n */\n get nodeSize() { return this.isLeaf ? 1 : 2 + this.content.size; }\n /**\n The number of children that the node has.\n */\n get childCount() { return this.content.childCount; }\n /**\n Get the child node at the given index. Raises an error when the\n index is out of range.\n */\n child(index) { return this.content.child(index); }\n /**\n Get the child node at the given index, if it exists.\n */\n maybeChild(index) { return this.content.maybeChild(index); }\n /**\n Call `f` for every child node, passing the node, its offset\n into this parent node, and its index.\n */\n forEach(f) { this.content.forEach(f); }\n /**\n Invoke a callback for all descendant nodes recursively between\n the given two positions that are relative to start of this\n node's content. The callback is invoked with the node, its\n position relative to the original node (method receiver),\n its parent node, and its child index. When the callback returns\n false for a given node, that node's children will not be\n recursed over. The last parameter can be used to specify a\n starting position to count from.\n */\n nodesBetween(from, to, f, startPos = 0) {\n this.content.nodesBetween(from, to, f, startPos, this);\n }\n /**\n Call the given callback for every descendant node. Doesn't\n descend into a node when the callback returns `false`.\n */\n descendants(f) {\n this.nodesBetween(0, this.content.size, f);\n }\n /**\n Concatenates all the text nodes found in this fragment and its\n children.\n */\n get textContent() {\n return (this.isLeaf && this.type.spec.leafText)\n ? this.type.spec.leafText(this)\n : this.textBetween(0, this.content.size, \"\");\n }\n /**\n Get all text between positions `from` and `to`. When\n `blockSeparator` is given, it will be inserted to separate text\n from different block nodes. If `leafText` is given, it'll be\n inserted for every non-text leaf node encountered, otherwise\n [`leafText`](https://prosemirror.net/docs/ref/#model.NodeSpec^leafText) will be used.\n */\n textBetween(from, to, blockSeparator, leafText) {\n return this.content.textBetween(from, to, blockSeparator, leafText);\n }\n /**\n Returns this node's first child, or `null` if there are no\n children.\n */\n get firstChild() { return this.content.firstChild; }\n /**\n Returns this node's last child, or `null` if there are no\n children.\n */\n get lastChild() { return this.content.lastChild; }\n /**\n Test whether two nodes represent the same piece of document.\n */\n eq(other) {\n return this == other || (this.sameMarkup(other) && this.content.eq(other.content));\n }\n /**\n Compare the markup (type, attributes, and marks) of this node to\n those of another. Returns `true` if both have the same markup.\n */\n sameMarkup(other) {\n return this.hasMarkup(other.type, other.attrs, other.marks);\n }\n /**\n Check whether this node's markup correspond to the given type,\n attributes, and marks.\n */\n hasMarkup(type, attrs, marks) {\n return this.type == type &&\n compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) &&\n Mark.sameSet(this.marks, marks || Mark.none);\n }\n /**\n Create a new node with the same markup as this node, containing\n the given content (or empty, if no content is given).\n */\n copy(content = null) {\n if (content == this.content)\n return this;\n return new Node(this.type, this.attrs, content, this.marks);\n }\n /**\n Create a copy of this node, with the given set of marks instead\n of the node's own marks.\n */\n mark(marks) {\n return marks == this.marks ? this : new Node(this.type, this.attrs, this.content, marks);\n }\n /**\n Create a copy of this node with only the content between the\n given positions. If `to` is not given, it defaults to the end of\n the node.\n */\n cut(from, to = this.content.size) {\n if (from == 0 && to == this.content.size)\n return this;\n return this.copy(this.content.cut(from, to));\n }\n /**\n Cut out the part of the document between the given positions, and\n return it as a `Slice` object.\n */\n slice(from, to = this.content.size, includeParents = false) {\n if (from == to)\n return Slice.empty;\n let $from = this.resolve(from), $to = this.resolve(to);\n let depth = includeParents ? 0 : $from.sharedDepth(to);\n let start = $from.start(depth), node = $from.node(depth);\n let content = node.content.cut($from.pos - start, $to.pos - start);\n return new Slice(content, $from.depth - depth, $to.depth - depth);\n }\n /**\n Replace the part of the document between the given positions with\n the given slice. The slice must 'fit', meaning its open sides\n must be able to connect to the surrounding content, and its\n content nodes must be valid children for the node they are placed\n into. If any of this is violated, an error of type\n [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.\n */\n replace(from, to, slice) {\n return replace(this.resolve(from), this.resolve(to), slice);\n }\n /**\n Find the node directly after the given position.\n */\n nodeAt(pos) {\n for (let node = this;;) {\n let { index, offset } = node.content.findIndex(pos);\n node = node.maybeChild(index);\n if (!node)\n return null;\n if (offset == pos || node.isText)\n return node;\n pos -= offset + 1;\n }\n }\n /**\n Find the (direct) child node after the given offset, if any,\n and return it along with its index and offset relative to this\n node.\n */\n childAfter(pos) {\n let { index, offset } = this.content.findIndex(pos);\n return { node: this.content.maybeChild(index), index, offset };\n }\n /**\n Find the (direct) child node before the given offset, if any,\n and return it along with its index and offset relative to this\n node.\n */\n childBefore(pos) {\n if (pos == 0)\n return { node: null, index: 0, offset: 0 };\n let { index, offset } = this.content.findIndex(pos);\n if (offset < pos)\n return { node: this.content.child(index), index, offset };\n let node = this.content.child(index - 1);\n return { node, index: index - 1, offset: offset - node.nodeSize };\n }\n /**\n Resolve the given position in the document, returning an\n [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.\n */\n resolve(pos) { return ResolvedPos.resolveCached(this, pos); }\n /**\n @internal\n */\n resolveNoCache(pos) { return ResolvedPos.resolve(this, pos); }\n /**\n Test whether a given mark or mark type occurs in this document\n between the two given positions.\n */\n rangeHasMark(from, to, type) {\n let found = false;\n if (to > from)\n this.nodesBetween(from, to, node => {\n if (type.isInSet(node.marks))\n found = true;\n return !found;\n });\n return found;\n }\n /**\n True when this is a block (non-inline node)\n */\n get isBlock() { return this.type.isBlock; }\n /**\n True when this is a textblock node, a block node with inline\n content.\n */\n get isTextblock() { return this.type.isTextblock; }\n /**\n True when this node allows inline content.\n */\n get inlineContent() { return this.type.inlineContent; }\n /**\n True when this is an inline node (a text node or a node that can\n appear among text).\n */\n get isInline() { return this.type.isInline; }\n /**\n True when this is a text node.\n */\n get isText() { return this.type.isText; }\n /**\n True when this is a leaf node.\n */\n get isLeaf() { return this.type.isLeaf; }\n /**\n True when this is an atom, i.e. when it does not have directly\n editable content. This is usually the same as `isLeaf`, but can\n be configured with the [`atom` property](https://prosemirror.net/docs/ref/#model.NodeSpec.atom)\n on a node's spec (typically used when the node is displayed as\n an uneditable [node view](https://prosemirror.net/docs/ref/#view.NodeView)).\n */\n get isAtom() { return this.type.isAtom; }\n /**\n Return a string representation of this node for debugging\n purposes.\n */\n toString() {\n if (this.type.spec.toDebugString)\n return this.type.spec.toDebugString(this);\n let name = this.type.name;\n if (this.content.size)\n name += \"(\" + this.content.toStringInner() + \")\";\n return wrapMarks(this.marks, name);\n }\n /**\n Get the content match in this node at the given index.\n */\n contentMatchAt(index) {\n let match = this.type.contentMatch.matchFragment(this.content, 0, index);\n if (!match)\n throw new Error(\"Called contentMatchAt on a node with invalid content\");\n return match;\n }\n /**\n Test whether replacing the range between `from` and `to` (by\n child index) with the given replacement fragment (which defaults\n to the empty fragment) would leave the node's content valid. You\n can optionally pass `start` and `end` indices into the\n replacement fragment.\n */\n canReplace(from, to, replacement = Fragment.empty, start = 0, end = replacement.childCount) {\n let one = this.contentMatchAt(from).matchFragment(replacement, start, end);\n let two = one && one.matchFragment(this.content, to);\n if (!two || !two.validEnd)\n return false;\n for (let i = start; i < end; i++)\n if (!this.type.allowsMarks(replacement.child(i).marks))\n return false;\n return true;\n }\n /**\n Test whether replacing the range `from` to `to` (by index) with\n a node of the given type would leave the node's content valid.\n */\n canReplaceWith(from, to, type, marks) {\n if (marks && !this.type.allowsMarks(marks))\n return false;\n let start = this.contentMatchAt(from).matchType(type);\n let end = start && start.matchFragment(this.content, to);\n return end ? end.validEnd : false;\n }\n /**\n Test whether the given node's content could be appended to this\n node. If that node is empty, this will only return true if there\n is at least one node type that can appear in both nodes (to avoid\n merging completely incompatible nodes).\n */\n canAppend(other) {\n if (other.content.size)\n return this.canReplace(this.childCount, this.childCount, other.content);\n else\n return this.type.compatibleContent(other.type);\n }\n /**\n Check whether this node and its descendants conform to the\n schema, and raise an exception when they do not.\n */\n check() {\n this.type.checkContent(this.content);\n this.type.checkAttrs(this.attrs);\n let copy = Mark.none;\n for (let i = 0; i < this.marks.length; i++) {\n let mark = this.marks[i];\n mark.type.checkAttrs(mark.attrs);\n copy = mark.addToSet(copy);\n }\n if (!Mark.sameSet(copy, this.marks))\n throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(m => m.type.name)}`);\n this.content.forEach(node => node.check());\n }\n /**\n Return a JSON-serializeable representation of this node.\n */\n toJSON() {\n let obj = { type: this.type.name };\n for (let _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n if (this.content.size)\n obj.content = this.content.toJSON();\n if (this.marks.length)\n obj.marks = this.marks.map(n => n.toJSON());\n return obj;\n }\n /**\n Deserialize a node from its JSON representation.\n */\n static fromJSON(schema, json) {\n if (!json)\n throw new RangeError(\"Invalid input for Node.fromJSON\");\n let marks = undefined;\n if (json.marks) {\n if (!Array.isArray(json.marks))\n throw new RangeError(\"Invalid mark data for Node.fromJSON\");\n marks = json.marks.map(schema.markFromJSON);\n }\n if (json.type == \"text\") {\n if (typeof json.text != \"string\")\n throw new RangeError(\"Invalid text node in JSON\");\n return schema.text(json.text, marks);\n }\n let content = Fragment.fromJSON(schema, json.content);\n let node = schema.nodeType(json.type).create(json.attrs, content, marks);\n node.type.checkAttrs(node.attrs);\n return node;\n }\n}\nNode.prototype.text = undefined;\nclass TextNode extends Node {\n /**\n @internal\n */\n constructor(type, attrs, content, marks) {\n super(type, attrs, null, marks);\n if (!content)\n throw new RangeError(\"Empty text nodes are not allowed\");\n this.text = content;\n }\n toString() {\n if (this.type.spec.toDebugString)\n return this.type.spec.toDebugString(this);\n return wrapMarks(this.marks, JSON.stringify(this.text));\n }\n get textContent() { return this.text; }\n textBetween(from, to) { return this.text.slice(from, to); }\n get nodeSize() { return this.text.length; }\n mark(marks) {\n return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks);\n }\n withText(text) {\n if (text == this.text)\n return this;\n return new TextNode(this.type, this.attrs, text, this.marks);\n }\n cut(from = 0, to = this.text.length) {\n if (from == 0 && to == this.text.length)\n return this;\n return this.withText(this.text.slice(from, to));\n }\n eq(other) {\n return this.sameMarkup(other) && this.text == other.text;\n }\n toJSON() {\n let base = super.toJSON();\n base.text = this.text;\n return base;\n }\n}\nfunction wrapMarks(marks, str) {\n for (let i = marks.length - 1; i >= 0; i--)\n str = marks[i].type.name + \"(\" + str + \")\";\n return str;\n}\n\n/**\nInstances of this class represent a match state of a node type's\n[content expression](https://prosemirror.net/docs/ref/#model.NodeSpec.content), and can be used to\nfind out whether further content matches here, and whether a given\nposition is a valid end of the node.\n*/\nclass ContentMatch {\n /**\n @internal\n */\n constructor(\n /**\n True when this match state represents a valid end of the node.\n */\n validEnd) {\n this.validEnd = validEnd;\n /**\n @internal\n */\n this.next = [];\n /**\n @internal\n */\n this.wrapCache = [];\n }\n /**\n @internal\n */\n static parse(string, nodeTypes) {\n let stream = new TokenStream(string, nodeTypes);\n if (stream.next == null)\n return ContentMatch.empty;\n let expr = parseExpr(stream);\n if (stream.next)\n stream.err(\"Unexpected trailing text\");\n let match = dfa(nfa(expr));\n checkForDeadEnds(match, stream);\n return match;\n }\n /**\n Match a node type, returning a match after that node if\n successful.\n */\n matchType(type) {\n for (let i = 0; i < this.next.length; i++)\n if (this.next[i].type == type)\n return this.next[i].next;\n return null;\n }\n /**\n Try to match a fragment. Returns the resulting match when\n successful.\n */\n matchFragment(frag, start = 0, end = frag.childCount) {\n let cur = this;\n for (let i = start; cur && i < end; i++)\n cur = cur.matchType(frag.child(i).type);\n return cur;\n }\n /**\n @internal\n */\n get inlineContent() {\n return this.next.length != 0 && this.next[0].type.isInline;\n }\n /**\n Get the first matching node type at this match position that can\n be generated.\n */\n get defaultType() {\n for (let i = 0; i < this.next.length; i++) {\n let { type } = this.next[i];\n if (!(type.isText || type.hasRequiredAttrs()))\n return type;\n }\n return null;\n }\n /**\n @internal\n */\n compatible(other) {\n for (let i = 0; i < this.next.length; i++)\n for (let j = 0; j < other.next.length; j++)\n if (this.next[i].type == other.next[j].type)\n return true;\n return false;\n }\n /**\n Try to match the given fragment, and if that fails, see if it can\n be made to match by inserting nodes in front of it. When\n successful, return a fragment of inserted nodes (which may be\n empty if nothing had to be inserted). When `toEnd` is true, only\n return a fragment if the resulting match goes to the end of the\n content expression.\n */\n fillBefore(after, toEnd = false, startIndex = 0) {\n let seen = [this];\n function search(match, types) {\n let finished = match.matchFragment(after, startIndex);\n if (finished && (!toEnd || finished.validEnd))\n return Fragment.from(types.map(tp => tp.createAndFill()));\n for (let i = 0; i < match.next.length; i++) {\n let { type, next } = match.next[i];\n if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {\n seen.push(next);\n let found = search(next, types.concat(type));\n if (found)\n return found;\n }\n }\n return null;\n }\n return search(this, []);\n }\n /**\n Find a set of wrapping node types that would allow a node of the\n given type to appear at this position. The result may be empty\n (when it fits directly) and will be null when no such wrapping\n exists.\n */\n findWrapping(target) {\n for (let i = 0; i < this.wrapCache.length; i += 2)\n if (this.wrapCache[i] == target)\n return this.wrapCache[i + 1];\n let computed = this.computeWrapping(target);\n this.wrapCache.push(target, computed);\n return computed;\n }\n /**\n @internal\n */\n computeWrapping(target) {\n let seen = Object.create(null), active = [{ match: this, type: null, via: null }];\n while (active.length) {\n let current = active.shift(), match = current.match;\n if (match.matchType(target)) {\n let result = [];\n for (let obj = current; obj.type; obj = obj.via)\n result.push(obj.type);\n return result.reverse();\n }\n for (let i = 0; i < match.next.length; i++) {\n let { type, next } = match.next[i];\n if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) {\n active.push({ match: type.contentMatch, type, via: current });\n seen[type.name] = true;\n }\n }\n }\n return null;\n }\n /**\n The number of outgoing edges this node has in the finite\n automaton that describes the content expression.\n */\n get edgeCount() {\n return this.next.length;\n }\n /**\n Get the _n_​th outgoing edge from this node in the finite\n automaton that describes the content expression.\n */\n edge(n) {\n if (n >= this.next.length)\n throw new RangeError(`There's no ${n}th edge in this content match`);\n return this.next[n];\n }\n /**\n @internal\n */\n toString() {\n let seen = [];\n function scan(m) {\n seen.push(m);\n for (let i = 0; i < m.next.length; i++)\n if (seen.indexOf(m.next[i].next) == -1)\n scan(m.next[i].next);\n }\n scan(this);\n return seen.map((m, i) => {\n let out = i + (m.validEnd ? \"*\" : \" \") + \" \";\n for (let i = 0; i < m.next.length; i++)\n out += (i ? \", \" : \"\") + m.next[i].type.name + \"->\" + seen.indexOf(m.next[i].next);\n return out;\n }).join(\"\\n\");\n }\n}\n/**\n@internal\n*/\nContentMatch.empty = new ContentMatch(true);\nclass TokenStream {\n constructor(string, nodeTypes) {\n this.string = string;\n this.nodeTypes = nodeTypes;\n this.inline = null;\n this.pos = 0;\n this.tokens = string.split(/\\s*(?=\\b|\\W|$)/);\n if (this.tokens[this.tokens.length - 1] == \"\")\n this.tokens.pop();\n if (this.tokens[0] == \"\")\n this.tokens.shift();\n }\n get next() { return this.tokens[this.pos]; }\n eat(tok) { return this.next == tok && (this.pos++ || true); }\n err(str) { throw new SyntaxError(str + \" (in content expression '\" + this.string + \"')\"); }\n}\nfunction parseExpr(stream) {\n let exprs = [];\n do {\n exprs.push(parseExprSeq(stream));\n } while (stream.eat(\"|\"));\n return exprs.length == 1 ? exprs[0] : { type: \"choice\", exprs };\n}\nfunction parseExprSeq(stream) {\n let exprs = [];\n do {\n exprs.push(parseExprSubscript(stream));\n } while (stream.next && stream.next != \")\" && stream.next != \"|\");\n return exprs.length == 1 ? exprs[0] : { type: \"seq\", exprs };\n}\nfunction parseExprSubscript(stream) {\n let expr = parseExprAtom(stream);\n for (;;) {\n if (stream.eat(\"+\"))\n expr = { type: \"plus\", expr };\n else if (stream.eat(\"*\"))\n expr = { type: \"star\", expr };\n else if (stream.eat(\"?\"))\n expr = { type: \"opt\", expr };\n else if (stream.eat(\"{\"))\n expr = parseExprRange(stream, expr);\n else\n break;\n }\n return expr;\n}\nfunction parseNum(stream) {\n if (/\\D/.test(stream.next))\n stream.err(\"Expected number, got '\" + stream.next + \"'\");\n let result = Number(stream.next);\n stream.pos++;\n return result;\n}\nfunction parseExprRange(stream, expr) {\n let min = parseNum(stream), max = min;\n if (stream.eat(\",\")) {\n if (stream.next != \"}\")\n max = parseNum(stream);\n else\n max = -1;\n }\n if (!stream.eat(\"}\"))\n stream.err(\"Unclosed braced range\");\n return { type: \"range\", min, max, expr };\n}\nfunction resolveName(stream, name) {\n let types = stream.nodeTypes, type = types[name];\n if (type)\n return [type];\n let result = [];\n for (let typeName in types) {\n let type = types[typeName];\n if (type.isInGroup(name))\n result.push(type);\n }\n if (result.length == 0)\n stream.err(\"No node type or group '\" + name + \"' found\");\n return result;\n}\nfunction parseExprAtom(stream) {\n if (stream.eat(\"(\")) {\n let expr = parseExpr(stream);\n if (!stream.eat(\")\"))\n stream.err(\"Missing closing paren\");\n return expr;\n }\n else if (!/\\W/.test(stream.next)) {\n let exprs = resolveName(stream, stream.next).map(type => {\n if (stream.inline == null)\n stream.inline = type.isInline;\n else if (stream.inline != type.isInline)\n stream.err(\"Mixing inline and block content\");\n return { type: \"name\", value: type };\n });\n stream.pos++;\n return exprs.length == 1 ? exprs[0] : { type: \"choice\", exprs };\n }\n else {\n stream.err(\"Unexpected token '\" + stream.next + \"'\");\n }\n}\n// Construct an NFA from an expression as returned by the parser. The\n// NFA is represented as an array of states, which are themselves\n// arrays of edges, which are `{term, to}` objects. The first state is\n// the entry state and the last node is the success state.\n//\n// Note that unlike typical NFAs, the edge ordering in this one is\n// significant, in that it is used to contruct filler content when\n// necessary.\nfunction nfa(expr) {\n let nfa = [[]];\n connect(compile(expr, 0), node());\n return nfa;\n function node() { return nfa.push([]) - 1; }\n function edge(from, to, term) {\n let edge = { term, to };\n nfa[from].push(edge);\n return edge;\n }\n function connect(edges, to) {\n edges.forEach(edge => edge.to = to);\n }\n function compile(expr, from) {\n if (expr.type == \"choice\") {\n return expr.exprs.reduce((out, expr) => out.concat(compile(expr, from)), []);\n }\n else if (expr.type == \"seq\") {\n for (let i = 0;; i++) {\n let next = compile(expr.exprs[i], from);\n if (i == expr.exprs.length - 1)\n return next;\n connect(next, from = node());\n }\n }\n else if (expr.type == \"star\") {\n let loop = node();\n edge(from, loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)];\n }\n else if (expr.type == \"plus\") {\n let loop = node();\n connect(compile(expr.expr, from), loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)];\n }\n else if (expr.type == \"opt\") {\n return [edge(from)].concat(compile(expr.expr, from));\n }\n else if (expr.type == \"range\") {\n let cur = from;\n for (let i = 0; i < expr.min; i++) {\n let next = node();\n connect(compile(expr.expr, cur), next);\n cur = next;\n }\n if (expr.max == -1) {\n connect(compile(expr.expr, cur), cur);\n }\n else {\n for (let i = expr.min; i < expr.max; i++) {\n let next = node();\n edge(cur, next);\n connect(compile(expr.expr, cur), next);\n cur = next;\n }\n }\n return [edge(cur)];\n }\n else if (expr.type == \"name\") {\n return [edge(from, undefined, expr.value)];\n }\n else {\n throw new Error(\"Unknown expr type\");\n }\n }\n}\nfunction cmp(a, b) { return b - a; }\n// Get the set of nodes reachable by null edges from `node`. Omit\n// nodes with only a single null-out-edge, since they may lead to\n// needless duplicated nodes.\nfunction nullFrom(nfa, node) {\n let result = [];\n scan(node);\n return result.sort(cmp);\n function scan(node) {\n let edges = nfa[node];\n if (edges.length == 1 && !edges[0].term)\n return scan(edges[0].to);\n result.push(node);\n for (let i = 0; i < edges.length; i++) {\n let { term, to } = edges[i];\n if (!term && result.indexOf(to) == -1)\n scan(to);\n }\n }\n}\n// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set\n// of state objects (`ContentMatch` instances) with transitions\n// between them.\nfunction dfa(nfa) {\n let labeled = Object.create(null);\n return explore(nullFrom(nfa, 0));\n function explore(states) {\n let out = [];\n states.forEach(node => {\n nfa[node].forEach(({ term, to }) => {\n if (!term)\n return;\n let set;\n for (let i = 0; i < out.length; i++)\n if (out[i][0] == term)\n set = out[i][1];\n nullFrom(nfa, to).forEach(node => {\n if (!set)\n out.push([term, set = []]);\n if (set.indexOf(node) == -1)\n set.push(node);\n });\n });\n });\n let state = labeled[states.join(\",\")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1);\n for (let i = 0; i < out.length; i++) {\n let states = out[i][1].sort(cmp);\n state.next.push({ type: out[i][0], next: labeled[states.join(\",\")] || explore(states) });\n }\n return state;\n }\n}\nfunction checkForDeadEnds(match, stream) {\n for (let i = 0, work = [match]; i < work.length; i++) {\n let state = work[i], dead = !state.validEnd, nodes = [];\n for (let j = 0; j < state.next.length; j++) {\n let { type, next } = state.next[j];\n nodes.push(type.name);\n if (dead && !(type.isText || type.hasRequiredAttrs()))\n dead = false;\n if (work.indexOf(next) == -1)\n work.push(next);\n }\n if (dead)\n stream.err(\"Only non-generatable nodes (\" + nodes.join(\", \") + \") in a required position (see https://prosemirror.net/docs/guide/#generatable)\");\n }\n}\n\n// For node types where all attrs have a default value (or which don't\n// have any attributes), build up a single reusable default attribute\n// object, and use it for all nodes that don't specify specific\n// attributes.\nfunction defaultAttrs(attrs) {\n let defaults = Object.create(null);\n for (let attrName in attrs) {\n let attr = attrs[attrName];\n if (!attr.hasDefault)\n return null;\n defaults[attrName] = attr.default;\n }\n return defaults;\n}\nfunction computeAttrs(attrs, value) {\n let built = Object.create(null);\n for (let name in attrs) {\n let given = value && value[name];\n if (given === undefined) {\n let attr = attrs[name];\n if (attr.hasDefault)\n given = attr.default;\n else\n throw new RangeError(\"No value supplied for attribute \" + name);\n }\n built[name] = given;\n }\n return built;\n}\nfunction checkAttrs(attrs, values, type, name) {\n for (let name in values)\n if (!(name in attrs))\n throw new RangeError(`Unsupported attribute ${name} for ${type} of type ${name}`);\n for (let name in attrs) {\n let attr = attrs[name];\n if (attr.validate)\n attr.validate(values[name]);\n }\n}\nfunction initAttrs(typeName, attrs) {\n let result = Object.create(null);\n if (attrs)\n for (let name in attrs)\n result[name] = new Attribute(typeName, name, attrs[name]);\n return result;\n}\n/**\nNode types are objects allocated once per `Schema` and used to\n[tag](https://prosemirror.net/docs/ref/#model.Node.type) `Node` instances. They contain information\nabout the node type, such as its name and what kind of node it\nrepresents.\n*/\nclass NodeType {\n /**\n @internal\n */\n constructor(\n /**\n The name the node type has in this schema.\n */\n name, \n /**\n A link back to the `Schema` the node type belongs to.\n */\n schema, \n /**\n The spec that this type is based on\n */\n spec) {\n this.name = name;\n this.schema = schema;\n this.spec = spec;\n /**\n The set of marks allowed in this node. `null` means all marks\n are allowed.\n */\n this.markSet = null;\n this.groups = spec.group ? spec.group.split(\" \") : [];\n this.attrs = initAttrs(name, spec.attrs);\n this.defaultAttrs = defaultAttrs(this.attrs);\n this.contentMatch = null;\n this.inlineContent = null;\n this.isBlock = !(spec.inline || name == \"text\");\n this.isText = name == \"text\";\n }\n /**\n True if this is an inline type.\n */\n get isInline() { return !this.isBlock; }\n /**\n True if this is a textblock type, a block that contains inline\n content.\n */\n get isTextblock() { return this.isBlock && this.inlineContent; }\n /**\n True for node types that allow no content.\n */\n get isLeaf() { return this.contentMatch == ContentMatch.empty; }\n /**\n True when this node is an atom, i.e. when it does not have\n directly editable content.\n */\n get isAtom() { return this.isLeaf || !!this.spec.atom; }\n /**\n Return true when this node type is part of the given\n [group](https://prosemirror.net/docs/ref/#model.NodeSpec.group).\n */\n isInGroup(group) {\n return this.groups.indexOf(group) > -1;\n }\n /**\n The node type's [whitespace](https://prosemirror.net/docs/ref/#model.NodeSpec.whitespace) option.\n */\n get whitespace() {\n return this.spec.whitespace || (this.spec.code ? \"pre\" : \"normal\");\n }\n /**\n Tells you whether this node type has any required attributes.\n */\n hasRequiredAttrs() {\n for (let n in this.attrs)\n if (this.attrs[n].isRequired)\n return true;\n return false;\n }\n /**\n Indicates whether this node allows some of the same content as\n the given node type.\n */\n compatibleContent(other) {\n return this == other || this.contentMatch.compatible(other.contentMatch);\n }\n /**\n @internal\n */\n computeAttrs(attrs) {\n if (!attrs && this.defaultAttrs)\n return this.defaultAttrs;\n else\n return computeAttrs(this.attrs, attrs);\n }\n /**\n Create a `Node` of this type. The given attributes are\n checked and defaulted (you can pass `null` to use the type's\n defaults entirely, if no required attributes exist). `content`\n may be a `Fragment`, a node, an array of nodes, or\n `null`. Similarly `marks` may be `null` to default to the empty\n set of marks.\n */\n create(attrs = null, content, marks) {\n if (this.isText)\n throw new Error(\"NodeType.create can't construct text nodes\");\n return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks));\n }\n /**\n Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content\n against the node type's content restrictions, and throw an error\n if it doesn't match.\n */\n createChecked(attrs = null, content, marks) {\n content = Fragment.from(content);\n this.checkContent(content);\n return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));\n }\n /**\n Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is\n necessary to add nodes to the start or end of the given fragment\n to make it fit the node. If no fitting wrapping can be found,\n return null. Note that, due to the fact that required nodes can\n always be created, this will always succeed if you pass null or\n `Fragment.empty` as content.\n */\n createAndFill(attrs = null, content, marks) {\n attrs = this.computeAttrs(attrs);\n content = Fragment.from(content);\n if (content.size) {\n let before = this.contentMatch.fillBefore(content);\n if (!before)\n return null;\n content = before.append(content);\n }\n let matched = this.contentMatch.matchFragment(content);\n let after = matched && matched.fillBefore(Fragment.empty, true);\n if (!after)\n return null;\n return new Node(this, attrs, content.append(after), Mark.setFrom(marks));\n }\n /**\n Returns true if the given fragment is valid content for this node\n type.\n */\n validContent(content) {\n let result = this.contentMatch.matchFragment(content);\n if (!result || !result.validEnd)\n return false;\n for (let i = 0; i < content.childCount; i++)\n if (!this.allowsMarks(content.child(i).marks))\n return false;\n return true;\n }\n /**\n Throws a RangeError if the given fragment is not valid content for this\n node type.\n @internal\n */\n checkContent(content) {\n if (!this.validContent(content))\n throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0, 50)}`);\n }\n /**\n @internal\n */\n checkAttrs(attrs) {\n checkAttrs(this.attrs, attrs, \"node\", this.name);\n }\n /**\n Check whether the given mark type is allowed in this node.\n */\n allowsMarkType(markType) {\n return this.markSet == null || this.markSet.indexOf(markType) > -1;\n }\n /**\n Test whether the given set of marks are allowed in this node.\n */\n allowsMarks(marks) {\n if (this.markSet == null)\n return true;\n for (let i = 0; i < marks.length; i++)\n if (!this.allowsMarkType(marks[i].type))\n return false;\n return true;\n }\n /**\n Removes the marks that are not allowed in this node from the given set.\n */\n allowedMarks(marks) {\n if (this.markSet == null)\n return marks;\n let copy;\n for (let i = 0; i < marks.length; i++) {\n if (!this.allowsMarkType(marks[i].type)) {\n if (!copy)\n copy = marks.slice(0, i);\n }\n else if (copy) {\n copy.push(marks[i]);\n }\n }\n return !copy ? marks : copy.length ? copy : Mark.none;\n }\n /**\n @internal\n */\n static compile(nodes, schema) {\n let result = Object.create(null);\n nodes.forEach((name, spec) => result[name] = new NodeType(name, schema, spec));\n let topType = schema.spec.topNode || \"doc\";\n if (!result[topType])\n throw new RangeError(\"Schema is missing its top node type ('\" + topType + \"')\");\n if (!result.text)\n throw new RangeError(\"Every schema needs a 'text' type\");\n for (let _ in result.text.attrs)\n throw new RangeError(\"The text node type should not have attributes\");\n return result;\n }\n}\nfunction validateType(typeName, attrName, type) {\n let types = type.split(\"|\");\n return (value) => {\n let name = value === null ? \"null\" : typeof value;\n if (types.indexOf(name) < 0)\n throw new RangeError(`Expected value of type ${types} for attribute ${attrName} on type ${typeName}, got ${name}`);\n };\n}\n// Attribute descriptors\nclass Attribute {\n constructor(typeName, attrName, options) {\n this.hasDefault = Object.prototype.hasOwnProperty.call(options, \"default\");\n this.default = options.default;\n this.validate = typeof options.validate == \"string\" ? validateType(typeName, attrName, options.validate) : options.validate;\n }\n get isRequired() {\n return !this.hasDefault;\n }\n}\n// Marks\n/**\nLike nodes, marks (which are associated with nodes to signify\nthings like emphasis or being part of a link) are\n[tagged](https://prosemirror.net/docs/ref/#model.Mark.type) with type objects, which are\ninstantiated once per `Schema`.\n*/\nclass MarkType {\n /**\n @internal\n */\n constructor(\n /**\n The name of the mark type.\n */\n name, \n /**\n @internal\n */\n rank, \n /**\n The schema that this mark type instance is part of.\n */\n schema, \n /**\n The spec on which the type is based.\n */\n spec) {\n this.name = name;\n this.rank = rank;\n this.schema = schema;\n this.spec = spec;\n this.attrs = initAttrs(name, spec.attrs);\n this.excluded = null;\n let defaults = defaultAttrs(this.attrs);\n this.instance = defaults ? new Mark(this, defaults) : null;\n }\n /**\n Create a mark of this type. `attrs` may be `null` or an object\n containing only some of the mark's attributes. The others, if\n they have defaults, will be added.\n */\n create(attrs = null) {\n if (!attrs && this.instance)\n return this.instance;\n return new Mark(this, computeAttrs(this.attrs, attrs));\n }\n /**\n @internal\n */\n static compile(marks, schema) {\n let result = Object.create(null), rank = 0;\n marks.forEach((name, spec) => result[name] = new MarkType(name, rank++, schema, spec));\n return result;\n }\n /**\n When there is a mark of this type in the given set, a new set\n without it is returned. Otherwise, the input set is returned.\n */\n removeFromSet(set) {\n for (var i = 0; i < set.length; i++)\n if (set[i].type == this) {\n set = set.slice(0, i).concat(set.slice(i + 1));\n i--;\n }\n return set;\n }\n /**\n Tests whether there is a mark of this type in the given set.\n */\n isInSet(set) {\n for (let i = 0; i < set.length; i++)\n if (set[i].type == this)\n return set[i];\n }\n /**\n @internal\n */\n checkAttrs(attrs) {\n checkAttrs(this.attrs, attrs, \"mark\", this.name);\n }\n /**\n Queries whether a given mark type is\n [excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one.\n */\n excludes(other) {\n return this.excluded.indexOf(other) > -1;\n }\n}\n/**\nA document schema. Holds [node](https://prosemirror.net/docs/ref/#model.NodeType) and [mark\ntype](https://prosemirror.net/docs/ref/#model.MarkType) objects for the nodes and marks that may\noccur in conforming documents, and provides functionality for\ncreating and deserializing such documents.\n\nWhen given, the type parameters provide the names of the nodes and\nmarks in this schema.\n*/\nclass Schema {\n /**\n Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).\n */\n constructor(spec) {\n /**\n The [linebreak\n replacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement) node defined\n in this schema, if any.\n */\n this.linebreakReplacement = null;\n /**\n An object for storing whatever values modules may want to\n compute and cache per schema. (If you want to store something\n in it, try to use property names unlikely to clash.)\n */\n this.cached = Object.create(null);\n let instanceSpec = this.spec = {};\n for (let prop in spec)\n instanceSpec[prop] = spec[prop];\n instanceSpec.nodes = OrderedMap.from(spec.nodes),\n instanceSpec.marks = OrderedMap.from(spec.marks || {}),\n this.nodes = NodeType.compile(this.spec.nodes, this);\n this.marks = MarkType.compile(this.spec.marks, this);\n let contentExprCache = Object.create(null);\n for (let prop in this.nodes) {\n if (prop in this.marks)\n throw new RangeError(prop + \" can not be both a node and a mark\");\n let type = this.nodes[prop], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] ||\n (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n if (type.spec.linebreakReplacement) {\n if (this.linebreakReplacement)\n throw new RangeError(\"Multiple linebreak nodes defined\");\n if (!type.isInline || !type.isLeaf)\n throw new RangeError(\"Linebreak replacement nodes must be inline leaf nodes\");\n this.linebreakReplacement = type;\n }\n type.markSet = markExpr == \"_\" ? null :\n markExpr ? gatherMarks(this, markExpr.split(\" \")) :\n markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (let prop in this.marks) {\n let type = this.marks[prop], excl = type.spec.excludes;\n type.excluded = excl == null ? [type] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this);\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n this.cached.wrappings = Object.create(null);\n }\n /**\n Create a node in this schema. The `type` may be a string or a\n `NodeType` instance. Attributes will be extended with defaults,\n `content` may be a `Fragment`, `null`, a `Node`, or an array of\n nodes.\n */\n node(type, attrs = null, content, marks) {\n if (typeof type == \"string\")\n type = this.nodeType(type);\n else if (!(type instanceof NodeType))\n throw new RangeError(\"Invalid node type: \" + type);\n else if (type.schema != this)\n throw new RangeError(\"Node type from different schema used (\" + type.name + \")\");\n return type.createChecked(attrs, content, marks);\n }\n /**\n Create a text node in the schema. Empty text nodes are not\n allowed.\n */\n text(text, marks) {\n let type = this.nodes.text;\n return new TextNode(type, type.defaultAttrs, text, Mark.setFrom(marks));\n }\n /**\n Create a mark with the given type and attributes.\n */\n mark(type, attrs) {\n if (typeof type == \"string\")\n type = this.marks[type];\n return type.create(attrs);\n }\n /**\n Deserialize a node from its JSON representation. This method is\n bound.\n */\n nodeFromJSON(json) {\n return Node.fromJSON(this, json);\n }\n /**\n Deserialize a mark from its JSON representation. This method is\n bound.\n */\n markFromJSON(json) {\n return Mark.fromJSON(this, json);\n }\n /**\n @internal\n */\n nodeType(name) {\n let found = this.nodes[name];\n if (!found)\n throw new RangeError(\"Unknown node type: \" + name);\n return found;\n }\n}\nfunction gatherMarks(schema, marks) {\n let found = [];\n for (let i = 0; i < marks.length; i++) {\n let name = marks[i], mark = schema.marks[name], ok = mark;\n if (mark) {\n found.push(mark);\n }\n else {\n for (let prop in schema.marks) {\n let mark = schema.marks[prop];\n if (name == \"_\" || (mark.spec.group && mark.spec.group.split(\" \").indexOf(name) > -1))\n found.push(ok = mark);\n }\n }\n if (!ok)\n throw new SyntaxError(\"Unknown mark type: '\" + marks[i] + \"'\");\n }\n return found;\n}\n\nfunction isTagRule(rule) { return rule.tag != null; }\nfunction isStyleRule(rule) { return rule.style != null; }\n/**\nA DOM parser represents a strategy for parsing DOM content into a\nProseMirror document conforming to a given schema. Its behavior is\ndefined by an array of [rules](https://prosemirror.net/docs/ref/#model.ParseRule).\n*/\nclass DOMParser {\n /**\n Create a parser that targets the given schema, using the given\n parsing rules.\n */\n constructor(\n /**\n The schema into which the parser parses.\n */\n schema, \n /**\n The set of [parse rules](https://prosemirror.net/docs/ref/#model.ParseRule) that the parser\n uses, in order of precedence.\n */\n rules) {\n this.schema = schema;\n this.rules = rules;\n /**\n @internal\n */\n this.tags = [];\n /**\n @internal\n */\n this.styles = [];\n let matchedStyles = this.matchedStyles = [];\n rules.forEach(rule => {\n if (isTagRule(rule)) {\n this.tags.push(rule);\n }\n else if (isStyleRule(rule)) {\n let prop = /[^=]*/.exec(rule.style)[0];\n if (matchedStyles.indexOf(prop) < 0)\n matchedStyles.push(prop);\n this.styles.push(rule);\n }\n });\n // Only normalize list elements when lists in the schema can't directly contain themselves\n this.normalizeLists = !this.tags.some(r => {\n if (!/^(ul|ol)\\b/.test(r.tag) || !r.node)\n return false;\n let node = schema.nodes[r.node];\n return node.contentMatch.matchType(node);\n });\n }\n /**\n Parse a document from the content of a DOM node.\n */\n parse(dom, options = {}) {\n let context = new ParseContext(this, options, false);\n context.addAll(dom, Mark.none, options.from, options.to);\n return context.finish();\n }\n /**\n Parses the content of the given DOM node, like\n [`parse`](https://prosemirror.net/docs/ref/#model.DOMParser.parse), and takes the same set of\n options. But unlike that method, which produces a whole node,\n this one returns a slice that is open at the sides, meaning that\n the schema constraints aren't applied to the start of nodes to\n the left of the input and the end of nodes at the end.\n */\n parseSlice(dom, options = {}) {\n let context = new ParseContext(this, options, true);\n context.addAll(dom, Mark.none, options.from, options.to);\n return Slice.maxOpen(context.finish());\n }\n /**\n @internal\n */\n matchTag(dom, context, after) {\n for (let i = after ? this.tags.indexOf(after) + 1 : 0; i < this.tags.length; i++) {\n let rule = this.tags[i];\n if (matches(dom, rule.tag) &&\n (rule.namespace === undefined || dom.namespaceURI == rule.namespace) &&\n (!rule.context || context.matchesContext(rule.context))) {\n if (rule.getAttrs) {\n let result = rule.getAttrs(dom);\n if (result === false)\n continue;\n rule.attrs = result || undefined;\n }\n return rule;\n }\n }\n }\n /**\n @internal\n */\n matchStyle(prop, value, context, after) {\n for (let i = after ? this.styles.indexOf(after) + 1 : 0; i < this.styles.length; i++) {\n let rule = this.styles[i], style = rule.style;\n if (style.indexOf(prop) != 0 ||\n rule.context && !context.matchesContext(rule.context) ||\n // Test that the style string either precisely matches the prop,\n // or has an '=' sign after the prop, followed by the given\n // value.\n style.length > prop.length &&\n (style.charCodeAt(prop.length) != 61 || style.slice(prop.length + 1) != value))\n continue;\n if (rule.getAttrs) {\n let result = rule.getAttrs(value);\n if (result === false)\n continue;\n rule.attrs = result || undefined;\n }\n return rule;\n }\n }\n /**\n @internal\n */\n static schemaRules(schema) {\n let result = [];\n function insert(rule) {\n let priority = rule.priority == null ? 50 : rule.priority, i = 0;\n for (; i < result.length; i++) {\n let next = result[i], nextPriority = next.priority == null ? 50 : next.priority;\n if (nextPriority < priority)\n break;\n }\n result.splice(i, 0, rule);\n }\n for (let name in schema.marks) {\n let rules = schema.marks[name].spec.parseDOM;\n if (rules)\n rules.forEach(rule => {\n insert(rule = copy(rule));\n if (!(rule.mark || rule.ignore || rule.clearMark))\n rule.mark = name;\n });\n }\n for (let name in schema.nodes) {\n let rules = schema.nodes[name].spec.parseDOM;\n if (rules)\n rules.forEach(rule => {\n insert(rule = copy(rule));\n if (!(rule.node || rule.ignore || rule.mark))\n rule.node = name;\n });\n }\n return result;\n }\n /**\n Construct a DOM parser using the parsing rules listed in a\n schema's [node specs](https://prosemirror.net/docs/ref/#model.NodeSpec.parseDOM), reordered by\n [priority](https://prosemirror.net/docs/ref/#model.ParseRule.priority).\n */\n static fromSchema(schema) {\n return schema.cached.domParser ||\n (schema.cached.domParser = new DOMParser(schema, DOMParser.schemaRules(schema)));\n }\n}\nconst blockTags = {\n address: true, article: true, aside: true, blockquote: true, canvas: true,\n dd: true, div: true, dl: true, fieldset: true, figcaption: true, figure: true,\n footer: true, form: true, h1: true, h2: true, h3: true, h4: true, h5: true,\n h6: true, header: true, hgroup: true, hr: true, li: true, noscript: true, ol: true,\n output: true, p: true, pre: true, section: true, table: true, tfoot: true, ul: true\n};\nconst ignoreTags = {\n head: true, noscript: true, object: true, script: true, style: true, title: true\n};\nconst listTags = { ol: true, ul: true };\n// Using a bitfield for node context options\nconst OPT_PRESERVE_WS = 1, OPT_PRESERVE_WS_FULL = 2, OPT_OPEN_LEFT = 4;\nfunction wsOptionsFor(type, preserveWhitespace, base) {\n if (preserveWhitespace != null)\n return (preserveWhitespace ? OPT_PRESERVE_WS : 0) |\n (preserveWhitespace === \"full\" ? OPT_PRESERVE_WS_FULL : 0);\n return type && type.whitespace == \"pre\" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base & ~OPT_OPEN_LEFT;\n}\nclass NodeContext {\n constructor(type, attrs, marks, solid, match, options) {\n this.type = type;\n this.attrs = attrs;\n this.marks = marks;\n this.solid = solid;\n this.options = options;\n this.content = [];\n // Marks applied to the node's children\n this.activeMarks = Mark.none;\n this.match = match || (options & OPT_OPEN_LEFT ? null : type.contentMatch);\n }\n findWrapping(node) {\n if (!this.match) {\n if (!this.type)\n return [];\n let fill = this.type.contentMatch.fillBefore(Fragment.from(node));\n if (fill) {\n this.match = this.type.contentMatch.matchFragment(fill);\n }\n else {\n let start = this.type.contentMatch, wrap;\n if (wrap = start.findWrapping(node.type)) {\n this.match = start;\n return wrap;\n }\n else {\n return null;\n }\n }\n }\n return this.match.findWrapping(node.type);\n }\n finish(openEnd) {\n if (!(this.options & OPT_PRESERVE_WS)) { // Strip trailing whitespace\n let last = this.content[this.content.length - 1], m;\n if (last && last.isText && (m = /[ \\t\\r\\n\\u000c]+$/.exec(last.text))) {\n let text = last;\n if (last.text.length == m[0].length)\n this.content.pop();\n else\n this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m[0].length));\n }\n }\n let content = Fragment.from(this.content);\n if (!openEnd && this.match)\n content = content.append(this.match.fillBefore(Fragment.empty, true));\n return this.type ? this.type.create(this.attrs, content, this.marks) : content;\n }\n inlineContext(node) {\n if (this.type)\n return this.type.inlineContent;\n if (this.content.length)\n return this.content[0].isInline;\n return node.parentNode && !blockTags.hasOwnProperty(node.parentNode.nodeName.toLowerCase());\n }\n}\nclass ParseContext {\n constructor(\n // The parser we are using.\n parser, \n // The options passed to this parse.\n options, isOpen) {\n this.parser = parser;\n this.options = options;\n this.isOpen = isOpen;\n this.open = 0;\n this.localPreserveWS = false;\n let topNode = options.topNode, topContext;\n let topOptions = wsOptionsFor(null, options.preserveWhitespace, 0) | (isOpen ? OPT_OPEN_LEFT : 0);\n if (topNode)\n topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, true, options.topMatch || topNode.type.contentMatch, topOptions);\n else if (isOpen)\n topContext = new NodeContext(null, null, Mark.none, true, null, topOptions);\n else\n topContext = new NodeContext(parser.schema.topNodeType, null, Mark.none, true, null, topOptions);\n this.nodes = [topContext];\n this.find = options.findPositions;\n this.needsBlock = false;\n }\n get top() {\n return this.nodes[this.open];\n }\n // Add a DOM node to the content. Text is inserted as text node,\n // otherwise, the node is passed to `addElement` or, if it has a\n // `style` attribute, `addElementWithStyles`.\n addDOM(dom, marks) {\n if (dom.nodeType == 3)\n this.addTextNode(dom, marks);\n else if (dom.nodeType == 1)\n this.addElement(dom, marks);\n }\n addTextNode(dom, marks) {\n let value = dom.nodeValue;\n let top = this.top, preserveWS = (top.options & OPT_PRESERVE_WS_FULL) ? \"full\"\n : this.localPreserveWS || (top.options & OPT_PRESERVE_WS) > 0;\n if (preserveWS === \"full\" ||\n top.inlineContext(dom) ||\n /[^ \\t\\r\\n\\u000c]/.test(value)) {\n if (!preserveWS) {\n value = value.replace(/[ \\t\\r\\n\\u000c]+/g, \" \");\n // If this starts with whitespace, and there is no node before it, or\n // a hard break, or a text node that ends with whitespace, strip the\n // leading space.\n if (/^[ \\t\\r\\n\\u000c]/.test(value) && this.open == this.nodes.length - 1) {\n let nodeBefore = top.content[top.content.length - 1];\n let domNodeBefore = dom.previousSibling;\n if (!nodeBefore ||\n (domNodeBefore && domNodeBefore.nodeName == 'BR') ||\n (nodeBefore.isText && /[ \\t\\r\\n\\u000c]$/.test(nodeBefore.text)))\n value = value.slice(1);\n }\n }\n else if (preserveWS !== \"full\") {\n value = value.replace(/\\r?\\n|\\r/g, \" \");\n }\n else {\n value = value.replace(/\\r\\n?/g, \"\\n\");\n }\n if (value)\n this.insertNode(this.parser.schema.text(value), marks, !/\\S/.test(value));\n this.findInText(dom);\n }\n else {\n this.findInside(dom);\n }\n }\n // Try to find a handler for the given tag and use that to parse. If\n // none is found, the element's content nodes are added directly.\n addElement(dom, marks, matchAfter) {\n let outerWS = this.localPreserveWS, top = this.top;\n if (dom.tagName == \"PRE\" || /pre/.test(dom.style && dom.style.whiteSpace))\n this.localPreserveWS = true;\n let name = dom.nodeName.toLowerCase(), ruleID;\n if (listTags.hasOwnProperty(name) && this.parser.normalizeLists)\n normalizeList(dom);\n let rule = (this.options.ruleFromNode && this.options.ruleFromNode(dom)) ||\n (ruleID = this.parser.matchTag(dom, this, matchAfter));\n out: if (rule ? rule.ignore : ignoreTags.hasOwnProperty(name)) {\n this.findInside(dom);\n this.ignoreFallback(dom, marks);\n }\n else if (!rule || rule.skip || rule.closeParent) {\n if (rule && rule.closeParent)\n this.open = Math.max(0, this.open - 1);\n else if (rule && rule.skip.nodeType)\n dom = rule.skip;\n let sync, oldNeedsBlock = this.needsBlock;\n if (blockTags.hasOwnProperty(name)) {\n if (top.content.length && top.content[0].isInline && this.open) {\n this.open--;\n top = this.top;\n }\n sync = true;\n if (!top.type)\n this.needsBlock = true;\n }\n else if (!dom.firstChild) {\n this.leafFallback(dom, marks);\n break out;\n }\n let innerMarks = rule && rule.skip ? marks : this.readStyles(dom, marks);\n if (innerMarks)\n this.addAll(dom, innerMarks);\n if (sync)\n this.sync(top);\n this.needsBlock = oldNeedsBlock;\n }\n else {\n let innerMarks = this.readStyles(dom, marks);\n if (innerMarks)\n this.addElementByRule(dom, rule, innerMarks, rule.consuming === false ? ruleID : undefined);\n }\n this.localPreserveWS = outerWS;\n }\n // Called for leaf DOM nodes that would otherwise be ignored\n leafFallback(dom, marks) {\n if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent)\n this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\"), marks);\n }\n // Called for ignored nodes\n ignoreFallback(dom, marks) {\n // Ignored BR nodes should at least create an inline context\n if (dom.nodeName == \"BR\" && (!this.top.type || !this.top.type.inlineContent))\n this.findPlace(this.parser.schema.text(\"-\"), marks, true);\n }\n // Run any style parser associated with the node's styles. Either\n // return an updated array of marks, or null to indicate some of the\n // styles had a rule with `ignore` set.\n readStyles(dom, marks) {\n let styles = dom.style;\n // Because many properties will only show up in 'normalized' form\n // in `style.item` (i.e. text-decoration becomes\n // text-decoration-line, text-decoration-color, etc), we directly\n // query the styles mentioned in our rules instead of iterating\n // over the items.\n if (styles && styles.length)\n for (let i = 0; i < this.parser.matchedStyles.length; i++) {\n let name = this.parser.matchedStyles[i], value = styles.getPropertyValue(name);\n if (value)\n for (let after = undefined;;) {\n let rule = this.parser.matchStyle(name, value, this, after);\n if (!rule)\n break;\n if (rule.ignore)\n return null;\n if (rule.clearMark)\n marks = marks.filter(m => !rule.clearMark(m));\n else\n marks = marks.concat(this.parser.schema.marks[rule.mark].create(rule.attrs));\n if (rule.consuming === false)\n after = rule;\n else\n break;\n }\n }\n return marks;\n }\n // Look up a handler for the given node. If none are found, return\n // false. Otherwise, apply it, use its return value to drive the way\n // the node's content is wrapped, and return true.\n addElementByRule(dom, rule, marks, continueAfter) {\n let sync, nodeType;\n if (rule.node) {\n nodeType = this.parser.schema.nodes[rule.node];\n if (!nodeType.isLeaf) {\n let inner = this.enter(nodeType, rule.attrs || null, marks, rule.preserveWhitespace);\n if (inner) {\n sync = true;\n marks = inner;\n }\n }\n else if (!this.insertNode(nodeType.create(rule.attrs), marks, dom.nodeName == \"BR\")) {\n this.leafFallback(dom, marks);\n }\n }\n else {\n let markType = this.parser.schema.marks[rule.mark];\n marks = marks.concat(markType.create(rule.attrs));\n }\n let startIn = this.top;\n if (nodeType && nodeType.isLeaf) {\n this.findInside(dom);\n }\n else if (continueAfter) {\n this.addElement(dom, marks, continueAfter);\n }\n else if (rule.getContent) {\n this.findInside(dom);\n rule.getContent(dom, this.parser.schema).forEach(node => this.insertNode(node, marks, false));\n }\n else {\n let contentDOM = dom;\n if (typeof rule.contentElement == \"string\")\n contentDOM = dom.querySelector(rule.contentElement);\n else if (typeof rule.contentElement == \"function\")\n contentDOM = rule.contentElement(dom);\n else if (rule.contentElement)\n contentDOM = rule.contentElement;\n this.findAround(dom, contentDOM, true);\n this.addAll(contentDOM, marks);\n this.findAround(dom, contentDOM, false);\n }\n if (sync && this.sync(startIn))\n this.open--;\n }\n // Add all child nodes between `startIndex` and `endIndex` (or the\n // whole node, if not given). If `sync` is passed, use it to\n // synchronize after every block element.\n addAll(parent, marks, startIndex, endIndex) {\n let index = startIndex || 0;\n for (let dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild, end = endIndex == null ? null : parent.childNodes[endIndex]; dom != end; dom = dom.nextSibling, ++index) {\n this.findAtPoint(parent, index);\n this.addDOM(dom, marks);\n }\n this.findAtPoint(parent, index);\n }\n // Try to find a way to fit the given node type into the current\n // context. May add intermediate wrappers and/or leave non-solid\n // nodes that we're in.\n findPlace(node, marks, cautious) {\n let route, sync;\n for (let depth = this.open, penalty = 0; depth >= 0; depth--) {\n let cx = this.nodes[depth];\n let found = cx.findWrapping(node);\n if (found && (!route || route.length > found.length + penalty)) {\n route = found;\n sync = cx;\n if (!found.length)\n break;\n }\n if (cx.solid) {\n if (cautious)\n break;\n penalty += 2;\n }\n }\n if (!route)\n return null;\n this.sync(sync);\n for (let i = 0; i < route.length; i++)\n marks = this.enterInner(route[i], null, marks, false);\n return marks;\n }\n // Try to insert the given node, adjusting the context when needed.\n insertNode(node, marks, cautious) {\n if (node.isInline && this.needsBlock && !this.top.type) {\n let block = this.textblockFromContext();\n if (block)\n marks = this.enterInner(block, null, marks);\n }\n let innerMarks = this.findPlace(node, marks, cautious);\n if (innerMarks) {\n this.closeExtra();\n let top = this.top;\n if (top.match)\n top.match = top.match.matchType(node.type);\n let nodeMarks = Mark.none;\n for (let m of innerMarks.concat(node.marks))\n if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, node.type))\n nodeMarks = m.addToSet(nodeMarks);\n top.content.push(node.mark(nodeMarks));\n return true;\n }\n return false;\n }\n // Try to start a node of the given type, adjusting the context when\n // necessary.\n enter(type, attrs, marks, preserveWS) {\n let innerMarks = this.findPlace(type.create(attrs), marks, false);\n if (innerMarks)\n innerMarks = this.enterInner(type, attrs, marks, true, preserveWS);\n return innerMarks;\n }\n // Open a node of the given type\n enterInner(type, attrs, marks, solid = false, preserveWS) {\n this.closeExtra();\n let top = this.top;\n top.match = top.match && top.match.matchType(type);\n let options = wsOptionsFor(type, preserveWS, top.options);\n if ((top.options & OPT_OPEN_LEFT) && top.content.length == 0)\n options |= OPT_OPEN_LEFT;\n let applyMarks = Mark.none;\n marks = marks.filter(m => {\n if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, type)) {\n applyMarks = m.addToSet(applyMarks);\n return false;\n }\n return true;\n });\n this.nodes.push(new NodeContext(type, attrs, applyMarks, solid, null, options));\n this.open++;\n return marks;\n }\n // Make sure all nodes above this.open are finished and added to\n // their parents\n closeExtra(openEnd = false) {\n let i = this.nodes.length - 1;\n if (i > this.open) {\n for (; i > this.open; i--)\n this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd));\n this.nodes.length = this.open + 1;\n }\n }\n finish() {\n this.open = 0;\n this.closeExtra(this.isOpen);\n return this.nodes[0].finish(!!(this.isOpen || this.options.topOpen));\n }\n sync(to) {\n for (let i = this.open; i >= 0; i--) {\n if (this.nodes[i] == to) {\n this.open = i;\n return true;\n }\n else if (this.localPreserveWS) {\n this.nodes[i].options |= OPT_PRESERVE_WS;\n }\n }\n return false;\n }\n get currentPos() {\n this.closeExtra();\n let pos = 0;\n for (let i = this.open; i >= 0; i--) {\n let content = this.nodes[i].content;\n for (let j = content.length - 1; j >= 0; j--)\n pos += content[j].nodeSize;\n if (i)\n pos++;\n }\n return pos;\n }\n findAtPoint(parent, offset) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].node == parent && this.find[i].offset == offset)\n this.find[i].pos = this.currentPos;\n }\n }\n findInside(parent) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node))\n this.find[i].pos = this.currentPos;\n }\n }\n findAround(parent, content, before) {\n if (parent != content && this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n let pos = content.compareDocumentPosition(this.find[i].node);\n if (pos & (before ? 2 : 4))\n this.find[i].pos = this.currentPos;\n }\n }\n }\n findInText(textNode) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].node == textNode)\n this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset);\n }\n }\n // Determines whether the given context string matches this context.\n matchesContext(context) {\n if (context.indexOf(\"|\") > -1)\n return context.split(/\\s*\\|\\s*/).some(this.matchesContext, this);\n let parts = context.split(\"/\");\n let option = this.options.context;\n let useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type);\n let minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1);\n let match = (i, depth) => {\n for (; i >= 0; i--) {\n let part = parts[i];\n if (part == \"\") {\n if (i == parts.length - 1 || i == 0)\n continue;\n for (; depth >= minDepth; depth--)\n if (match(i - 1, depth))\n return true;\n return false;\n }\n else {\n let next = depth > 0 || (depth == 0 && useRoot) ? this.nodes[depth].type\n : option && depth >= minDepth ? option.node(depth - minDepth).type\n : null;\n if (!next || (next.name != part && !next.isInGroup(part)))\n return false;\n depth--;\n }\n }\n return true;\n };\n return match(parts.length - 1, this.open);\n }\n textblockFromContext() {\n let $context = this.options.context;\n if ($context)\n for (let d = $context.depth; d >= 0; d--) {\n let deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;\n if (deflt && deflt.isTextblock && deflt.defaultAttrs)\n return deflt;\n }\n for (let name in this.parser.schema.nodes) {\n let type = this.parser.schema.nodes[name];\n if (type.isTextblock && type.defaultAttrs)\n return type;\n }\n }\n}\n// Kludge to work around directly nested list nodes produced by some\n// tools and allowed by browsers to mean that the nested list is\n// actually part of the list item above it.\nfunction normalizeList(dom) {\n for (let child = dom.firstChild, prevItem = null; child; child = child.nextSibling) {\n let name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null;\n if (name && listTags.hasOwnProperty(name) && prevItem) {\n prevItem.appendChild(child);\n child = prevItem;\n }\n else if (name == \"li\") {\n prevItem = child;\n }\n else if (name) {\n prevItem = null;\n }\n }\n}\n// Apply a CSS selector.\nfunction matches(dom, selector) {\n return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector);\n}\nfunction copy(obj) {\n let copy = {};\n for (let prop in obj)\n copy[prop] = obj[prop];\n return copy;\n}\n// Used when finding a mark at the top level of a fragment parse.\n// Checks whether it would be reasonable to apply a given mark type to\n// a given node, by looking at the way the mark occurs in the schema.\nfunction markMayApply(markType, nodeType) {\n let nodes = nodeType.schema.nodes;\n for (let name in nodes) {\n let parent = nodes[name];\n if (!parent.allowsMarkType(markType))\n continue;\n let seen = [], scan = (match) => {\n seen.push(match);\n for (let i = 0; i < match.edgeCount; i++) {\n let { type, next } = match.edge(i);\n if (type == nodeType)\n return true;\n if (seen.indexOf(next) < 0 && scan(next))\n return true;\n }\n };\n if (scan(parent.contentMatch))\n return true;\n }\n}\n\n/**\nA DOM serializer knows how to convert ProseMirror nodes and\nmarks of various types to DOM nodes.\n*/\nclass DOMSerializer {\n /**\n Create a serializer. `nodes` should map node names to functions\n that take a node and return a description of the corresponding\n DOM. `marks` does the same for mark names, but also gets an\n argument that tells it whether the mark's content is block or\n inline content (for typical use, it'll always be inline). A mark\n serializer may be `null` to indicate that marks of that type\n should not be serialized.\n */\n constructor(\n /**\n The node serialization functions.\n */\n nodes, \n /**\n The mark serialization functions.\n */\n marks) {\n this.nodes = nodes;\n this.marks = marks;\n }\n /**\n Serialize the content of this fragment to a DOM fragment. When\n not in the browser, the `document` option, containing a DOM\n document, should be passed so that the serializer can create\n nodes.\n */\n serializeFragment(fragment, options = {}, target) {\n if (!target)\n target = doc(options).createDocumentFragment();\n let top = target, active = [];\n fragment.forEach(node => {\n if (active.length || node.marks.length) {\n let keep = 0, rendered = 0;\n while (keep < active.length && rendered < node.marks.length) {\n let next = node.marks[rendered];\n if (!this.marks[next.type.name]) {\n rendered++;\n continue;\n }\n if (!next.eq(active[keep][0]) || next.type.spec.spanning === false)\n break;\n keep++;\n rendered++;\n }\n while (keep < active.length)\n top = active.pop()[1];\n while (rendered < node.marks.length) {\n let add = node.marks[rendered++];\n let markDOM = this.serializeMark(add, node.isInline, options);\n if (markDOM) {\n active.push([add, top]);\n top.appendChild(markDOM.dom);\n top = markDOM.contentDOM || markDOM.dom;\n }\n }\n }\n top.appendChild(this.serializeNodeInner(node, options));\n });\n return target;\n }\n /**\n @internal\n */\n serializeNodeInner(node, options) {\n let { dom, contentDOM } = renderSpec(doc(options), this.nodes[node.type.name](node), null, node.attrs);\n if (contentDOM) {\n if (node.isLeaf)\n throw new RangeError(\"Content hole not allowed in a leaf node spec\");\n this.serializeFragment(node.content, options, contentDOM);\n }\n return dom;\n }\n /**\n Serialize this node to a DOM node. This can be useful when you\n need to serialize a part of a document, as opposed to the whole\n document. To serialize a whole document, use\n [`serializeFragment`](https://prosemirror.net/docs/ref/#model.DOMSerializer.serializeFragment) on\n its [content](https://prosemirror.net/docs/ref/#model.Node.content).\n */\n serializeNode(node, options = {}) {\n let dom = this.serializeNodeInner(node, options);\n for (let i = node.marks.length - 1; i >= 0; i--) {\n let wrap = this.serializeMark(node.marks[i], node.isInline, options);\n if (wrap) {\n (wrap.contentDOM || wrap.dom).appendChild(dom);\n dom = wrap.dom;\n }\n }\n return dom;\n }\n /**\n @internal\n */\n serializeMark(mark, inline, options = {}) {\n let toDOM = this.marks[mark.type.name];\n return toDOM && renderSpec(doc(options), toDOM(mark, inline), null, mark.attrs);\n }\n static renderSpec(doc, structure, xmlNS = null, blockArraysIn) {\n return renderSpec(doc, structure, xmlNS, blockArraysIn);\n }\n /**\n Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)\n properties in a schema's node and mark specs.\n */\n static fromSchema(schema) {\n return schema.cached.domSerializer ||\n (schema.cached.domSerializer = new DOMSerializer(this.nodesFromSchema(schema), this.marksFromSchema(schema)));\n }\n /**\n Gather the serializers in a schema's node specs into an object.\n This can be useful as a base to build a custom serializer from.\n */\n static nodesFromSchema(schema) {\n let result = gatherToDOM(schema.nodes);\n if (!result.text)\n result.text = node => node.text;\n return result;\n }\n /**\n Gather the serializers in a schema's mark specs into an object.\n */\n static marksFromSchema(schema) {\n return gatherToDOM(schema.marks);\n }\n}\nfunction gatherToDOM(obj) {\n let result = {};\n for (let name in obj) {\n let toDOM = obj[name].spec.toDOM;\n if (toDOM)\n result[name] = toDOM;\n }\n return result;\n}\nfunction doc(options) {\n return options.document || window.document;\n}\nconst suspiciousAttributeCache = new WeakMap();\nfunction suspiciousAttributes(attrs) {\n let value = suspiciousAttributeCache.get(attrs);\n if (value === undefined)\n suspiciousAttributeCache.set(attrs, value = suspiciousAttributesInner(attrs));\n return value;\n}\nfunction suspiciousAttributesInner(attrs) {\n let result = null;\n function scan(value) {\n if (value && typeof value == \"object\") {\n if (Array.isArray(value)) {\n if (typeof value[0] == \"string\") {\n if (!result)\n result = [];\n result.push(value);\n }\n else {\n for (let i = 0; i < value.length; i++)\n scan(value[i]);\n }\n }\n else {\n for (let prop in value)\n scan(value[prop]);\n }\n }\n }\n scan(attrs);\n return result;\n}\nfunction renderSpec(doc, structure, xmlNS, blockArraysIn) {\n if (typeof structure == \"string\")\n return { dom: doc.createTextNode(structure) };\n if (structure.nodeType != null)\n return { dom: structure };\n if (structure.dom && structure.dom.nodeType != null)\n return structure;\n let tagName = structure[0], suspicious;\n if (typeof tagName != \"string\")\n throw new RangeError(\"Invalid array passed to renderSpec\");\n if (blockArraysIn && (suspicious = suspiciousAttributes(blockArraysIn)) &&\n suspicious.indexOf(structure) > -1)\n throw new RangeError(\"Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.\");\n let space = tagName.indexOf(\" \");\n if (space > 0) {\n xmlNS = tagName.slice(0, space);\n tagName = tagName.slice(space + 1);\n }\n let contentDOM;\n let dom = (xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName));\n let attrs = structure[1], start = 1;\n if (attrs && typeof attrs == \"object\" && attrs.nodeType == null && !Array.isArray(attrs)) {\n start = 2;\n for (let name in attrs)\n if (attrs[name] != null) {\n let space = name.indexOf(\" \");\n if (space > 0)\n dom.setAttributeNS(name.slice(0, space), name.slice(space + 1), attrs[name]);\n else\n dom.setAttribute(name, attrs[name]);\n }\n }\n for (let i = start; i < structure.length; i++) {\n let child = structure[i];\n if (child === 0) {\n if (i < structure.length - 1 || i > start)\n throw new RangeError(\"Content hole must be the only child of its parent node\");\n return { dom, contentDOM: dom };\n }\n else {\n let { dom: inner, contentDOM: innerContent } = renderSpec(doc, child, xmlNS, blockArraysIn);\n dom.appendChild(inner);\n if (innerContent) {\n if (contentDOM)\n throw new RangeError(\"Multiple content holes\");\n contentDOM = innerContent;\n }\n }\n }\n return { dom, contentDOM };\n}\n\nexport { ContentMatch, DOMParser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AAqB,CAC3B,MAAM,IAAI,IAAI,CAAC,aAAa,EAC5B,QAAQ,EACR,SAAS,CACT;;AAGF,QAAA,MAAM,IAAI,GAAG,IAAI,GAAG,EAAE;AAEtB,QAAA,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AAC3B,YAAA,MAAM,MAAM,GAAG,mBAAmB,CACjC,qBAAqB,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,CAAC,CACpE;AAED,YAAA,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC;AAC1B,SAAC,CAAC;AAEF,QAAA,OAAO,IAAI;;AAEZ;AAEY,MAAA,sBAAsB,GAAG,IAAI,WAAW;;MCnExC,MAAM,CAAA;AAAnB,IAAA,WAAA,GAAA;AACC,QAAA,IAAA,CAAA,iBAAiB,GAAe,CAAC,UAAU,CAAC;;AAE5C,IAAA,UAAU,CAAC,UAAsB,EAAA;AAChC,QAAA,IAAI,CAAC,iBAAiB,GAAG,UAAU;AAEnC,QAAA,OAAO,IAAI;;IAGZ,QAAQ,CAAC,QAAa,EAAE,SAAkC,EAAA;QACzD,OAAO,sBAAsB,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;;AAG5D,IAAA,MAAM,CACL,QAAa,EACb,SAAoC,GAAA,SAAS,EAC7C,UAAuB,EAAA;AAEvB,QAAA,OAAO,sBAAsB,CAAC,MAAM,CACnC,QAAQ,EACR,SAAS,EACT,SAAS,CAAC,UAAU,IAAI,IAAI,CAAC,iBAAiB,CAAC,CAC/C;;AAEF;AAEY,MAAA,iBAAiB,GAAG,IAAI,MAAM;;;;","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/model/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/model/index.d.ts deleted file mode 100644 index 149a810..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/model/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-model'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/state/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/state/index.d.ts deleted file mode 100644 index 455a4db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/state/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-state'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/transform/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/transform/index.d.ts deleted file mode 100644 index 0b4f8de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/transform/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-transform'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/view/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/view/index.d.ts deleted file mode 100644 index 8b3c631..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/node_modules/@tiptap/pm/view/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-view'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/CloseEvents.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/CloseEvents.d.ts deleted file mode 100644 index 1f397a5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/CloseEvents.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface CloseEvent { - code: number; - reason: string; -} -/** - * The server is terminating the connection because a data frame was received - * that is too large. - * See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code - */ -export declare const MessageTooBig: CloseEvent; -/** - * The server successfully processed the request, asks that the requester reset - * its document view, and is not returning any content. - */ -export declare const ResetConnection: CloseEvent; -/** - * Similar to Forbidden, but specifically for use when authentication is required and has - * failed or has not yet been provided. - */ -export declare const Unauthorized: CloseEvent; -/** - * The request contained valid data and was understood by the server, but the server - * is refusing action. - */ -export declare const Forbidden: CloseEvent; -/** - * The server timed out waiting for the request. - */ -export declare const ConnectionTimeout: CloseEvent; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/auth.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/auth.d.ts deleted file mode 100644 index fa5c56c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/auth.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as encoding from "lib0/encoding"; -import * as decoding from "lib0/decoding"; -import type { AuthorizedScope } from "../../provider/src"; -export declare enum AuthMessageType { - Token = 0, - PermissionDenied = 1, - Authenticated = 2 -} -export declare const writeAuthentication: (encoder: encoding.Encoder, auth: string) => void; -export declare const writePermissionDenied: (encoder: encoding.Encoder, reason: string) => void; -export declare const writeAuthenticated: (encoder: encoding.Encoder, scope: AuthorizedScope) => void; -export declare const writeTokenSyncRequest: (encoder: encoding.Encoder) => void; -export declare const readAuthMessage: (decoder: decoding.Decoder, sendToken: () => void, permissionDeniedHandler: (reason: string) => void, authenticatedHandler: (scope: string) => void) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/awarenessStatesToArray.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/awarenessStatesToArray.d.ts deleted file mode 100644 index 81db4ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/awarenessStatesToArray.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const awarenessStatesToArray: (states: Map>) => { - clientId: number; -}[]; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/index.d.ts deleted file mode 100644 index 8a730fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./auth.ts"; -export * from "./CloseEvents.ts"; -export * from "./awarenessStatesToArray.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/types.d.ts deleted file mode 100644 index 3672009..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/common/src/types.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * State of the WebSocket connection. - * https://developer.mozilla.org/de/docs/Web/API/WebSocket/readyState - */ -export declare enum WsReadyStates { - Connecting = 0, - Open = 1, - Closing = 2, - Closed = 3 -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-database/src/Database.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-database/src/Database.d.ts deleted file mode 100644 index 123c8d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-database/src/Database.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Extension, onChangePayload, onLoadDocumentPayload, storePayload, fetchPayload } from "@hocuspocus/server"; -export interface DatabaseConfiguration { - /** - * Pass a Promise to retrieve updates from your database. The Promise should resolve to - * an array of items with Y.js-compatible binary data. - */ - fetch: (data: fetchPayload) => Promise; - /** - * Pass a function to store updates in your database. - */ - store: (data: storePayload) => Promise; -} -export declare class Database implements Extension { - /** - * Default configuration - */ - configuration: DatabaseConfiguration; - /** - * Constructor - */ - constructor(configuration: Partial); - /** - * Get stored data from the database. - */ - onLoadDocument(data: onLoadDocumentPayload): Promise; - /** - * Store new updates in the database. - */ - onStoreDocument(data: onChangePayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-database/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-database/src/index.d.ts deleted file mode 100644 index cca6903..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-database/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Database.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-logger/src/Logger.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-logger/src/Logger.d.ts deleted file mode 100644 index 7d601c8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-logger/src/Logger.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onLoadDocumentPayload, onDestroyPayload, onDisconnectPayload, onRequestPayload, onUpgradePayload } from "@hocuspocus/server"; -export interface LoggerConfiguration { - /** - * Prepend all logging message with a string. - * - * @deprecated - */ - prefix: null | string; - /** - * Whether to log something for the `onLoadDocument` hook. - */ - onLoadDocument: boolean; - /** - * Whether to log something for the `onChange` hook. - */ - onChange: boolean; - /** - * Whether to log something for the `onStoreDocument` hook. - */ - onStoreDocument: boolean; - /** - * Whether to log something for the `onConnect` hook. - */ - onConnect: boolean; - /** - * Whether to log something for the `onDisconnect` hook. - */ - onDisconnect: boolean; - /** - * Whether to log something for the `onUpgrade` hook. - */ - onUpgrade: boolean; - /** - * Whether to log something for the `onRequest` hook. - */ - onRequest: boolean; - /** - * Whether to log something for the `onDestroy` hook. - */ - onDestroy: boolean; - /** - * Whether to log something for the `onConfigure` hook. - */ - onConfigure: boolean; - /** - * A log function, if none is provided output will go to console - */ - log: (...args: any[]) => void; -} -export declare class Logger implements Extension { - name: string | null; - configuration: LoggerConfiguration; - /** - * Constructor - */ - constructor(configuration?: Partial); - onConfigure(data: onConfigurePayload): Promise; - onLoadDocument(data: onLoadDocumentPayload): Promise; - onChange(data: onChangePayload): Promise; - onStoreDocument(data: onDisconnectPayload): Promise; - onConnect(data: onConnectPayload): Promise; - onDisconnect(data: onDisconnectPayload): Promise; - onUpgrade(data: onUpgradePayload): Promise; - onRequest(data: onRequestPayload): Promise; - onDestroy(data: onDestroyPayload): Promise; - private log; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-logger/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-logger/src/index.d.ts deleted file mode 100644 index 9a59b0a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-logger/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Logger.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-redis/src/Redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-redis/src/Redis.d.ts deleted file mode 100644 index 78dc013..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-redis/src/Redis.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import type { Extension, Hocuspocus, afterLoadDocumentPayload, afterStoreDocumentPayload, afterUnloadDocumentPayload, beforeBroadcastStatelessPayload, beforeUnloadDocumentPayload, onAwarenessUpdatePayload, onChangePayload, onConfigurePayload, onStoreDocumentPayload } from "@hocuspocus/server"; -import { type ExecutionResult, type Lock, Redlock } from "@sesamecare-oss/redlock"; -import type { Cluster, ClusterNode, ClusterOptions, RedisOptions } from "ioredis"; -import RedisClient from "ioredis"; -export type RedisInstance = RedisClient | Cluster; -export interface Configuration { - /** - * Redis port - */ - port: number; - /** - * Redis host - */ - host: string; - /** - * Redis Cluster - */ - nodes?: ClusterNode[]; - /** - * Duplicate from an existed Redis instance - */ - redis?: RedisInstance; - /** - * Redis instance creator - */ - createClient?: () => RedisInstance; - /** - * Options passed directly to Redis constructor - * - * https://github.com/luin/ioredis/blob/master/API.md#new-redisport-host-options - */ - options?: ClusterOptions | RedisOptions; - /** - * An unique instance name, required to filter messages in Redis. - * If none is provided an unique id is generated. - */ - identifier: string; - /** - * Namespace for Redis keys, if none is provided 'hocuspocus' is used - */ - prefix: string; - /** - * The maximum time for the Redis lock in ms (in case it can’t be released). - */ - lockTimeout: number; - /** - * A delay before onDisconnect is executed. This allows last minute updates' - * sync messages to be received by the subscription before it's closed. - */ - disconnectDelay: number; -} -export declare class Redis implements Extension { - /** - * Make sure to give that extension a higher priority, so - * the `onStoreDocument` hook is able to intercept the chain, - * before documents are stored to the database. - */ - priority: number; - configuration: Configuration; - redisTransactionOrigin: string; - pub: RedisInstance; - sub: RedisInstance; - instance: Hocuspocus; - redlock: Redlock; - locks: Map; - }>; - messagePrefix: Buffer; - private pendingAfterStoreDocumentResolves; - constructor(configuration: Partial); - onConfigure({ instance }: onConfigurePayload): Promise; - private getKey; - private pubKey; - private subKey; - private lockKey; - private encodeMessage; - private decodeMessage; - /** - * Once a document is loaded, subscribe to the channel in Redis. - */ - afterLoadDocument({ documentName, document, }: afterLoadDocumentPayload): Promise; - /** - * Publish the first sync step through Redis. - */ - private publishFirstSyncStep; - /** - * Let’s ask Redis who is connected already. - */ - private requestAwarenessFromOtherInstances; - /** - * Before the document is stored, make sure to set a lock in Redis. - * That’s meant to avoid conflicts with other instances trying to store the document. - */ - onStoreDocument({ documentName }: onStoreDocumentPayload): Promise; - /** - * Release the Redis lock, so other instances can store documents. - */ - afterStoreDocument({ documentName, socketId, }: afterStoreDocumentPayload): Promise; - /** - * Handle awareness update messages received directly by this Hocuspocus instance. - */ - onAwarenessUpdate({ documentName, awareness, added, updated, removed, document, }: onAwarenessUpdatePayload): Promise; - /** - * Handle incoming messages published on subscribed document channels. - * Note that this will also include messages from ourselves as it is not possible - * in Redis to filter these. - */ - private handleIncomingMessage; - /** - * if the ydoc changed, we'll need to inform other Hocuspocus servers about it. - */ - onChange(data: onChangePayload): Promise; - /** - * Delay unloading to allow syncs to finish - */ - beforeUnloadDocument(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument(data: afterUnloadDocumentPayload): Promise; - beforeBroadcastStateless(data: beforeBroadcastStatelessPayload): Promise; - /** - * Kill the Redlock connection immediately. - */ - onDestroy(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-redis/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-redis/src/index.d.ts deleted file mode 100644 index 6c9d48a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-redis/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./Redis.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-s3/src/S3.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-s3/src/S3.d.ts deleted file mode 100644 index 4d2da25..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-s3/src/S3.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { DatabaseConfiguration } from "@hocuspocus/extension-database"; -import { Database } from "@hocuspocus/extension-database"; -import { S3Client } from "@aws-sdk/client-s3"; -export interface S3Configuration extends DatabaseConfiguration { - /** - * AWS S3 region - */ - region?: string; - /** - * S3 bucket name - */ - bucket: string; - /** - * S3 key prefix for documents (optional) - */ - prefix?: string; - /** - * AWS credentials - */ - credentials?: { - accessKeyId: string; - secretAccessKey: string; - }; - /** - * S3 endpoint URL (for S3-compatible services like MinIO) - */ - endpoint?: string; - /** - * Force path style URLs (required for MinIO) - */ - forcePathStyle?: boolean; - /** - * Custom S3 client - */ - s3Client?: S3Client; -} -export declare class S3 extends Database { - private s3Client?; - configuration: S3Configuration; - constructor(configuration: Partial); - private getObjectKey; - onConfigure(): Promise; - onListen(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-s3/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-s3/src/index.d.ts deleted file mode 100644 index f782642..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-s3/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./S3.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-sqlite/src/SQLite.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-sqlite/src/SQLite.d.ts deleted file mode 100644 index 432a370..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-sqlite/src/SQLite.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { DatabaseConfiguration } from "@hocuspocus/extension-database"; -import { Database } from "@hocuspocus/extension-database"; -import sqlite3 from "sqlite3"; -export declare const schema = "CREATE TABLE IF NOT EXISTS \"documents\" (\n \"name\" varchar(255) NOT NULL,\n \"data\" blob NOT NULL,\n UNIQUE(name)\n)"; -export declare const selectQuery = "\n SELECT data FROM \"documents\" WHERE name = $name ORDER BY rowid DESC\n"; -export declare const upsertQuery = "\n INSERT INTO \"documents\" (\"name\", \"data\") VALUES ($name, $data)\n ON CONFLICT(name) DO UPDATE SET data = $data\n"; -export interface SQLiteConfiguration extends DatabaseConfiguration { - /** - * Valid values are filenames, ":memory:" for an anonymous in-memory database and an empty - * string for an anonymous disk-based database. Anonymous databases are not persisted and - * when closing the database handle, their contents are lost. - * - * https://github.com/mapbox/node-sqlite3/wiki/API#new-sqlite3databasefilename-mode-callback - */ - database: string; - /** - * The database schema to create. - */ - schema: string; -} -export declare class SQLite extends Database { - db?: sqlite3.Database; - configuration: SQLiteConfiguration; - constructor(configuration?: Partial); - onConfigure(): Promise; - onListen(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-sqlite/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-sqlite/src/index.d.ts deleted file mode 100644 index 8013efb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-sqlite/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./SQLite.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-throttle/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-throttle/src/index.d.ts deleted file mode 100644 index 0917d14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-throttle/src/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Extension, onConnectPayload } from "@hocuspocus/server"; -export interface ThrottleConfiguration { - throttle: number | null | false; - consideredSeconds: number; - banTime: number; - cleanupInterval: number; -} -export declare class Throttle implements Extension { - configuration: ThrottleConfiguration; - connectionsByIp: Map>; - bannedIps: Map; - cleanupInterval?: NodeJS.Timeout; - /** - * Constructor - */ - constructor(configuration?: Partial); - onDestroy(): Promise; - clearMaps(): void; - isBanned(ip: string): boolean; - /** - * Throttle requests - * @private - */ - private throttle; - /** - * onConnect hook - * @param data - */ - onConnect(data: onConnectPayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-webhook/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-webhook/src/index.d.ts deleted file mode 100644 index 2cc3456..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/extension-webhook/src/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { Extension, onChangePayload, onConnectPayload, onDisconnectPayload, onLoadDocumentPayload } from "@hocuspocus/server"; -import type { Transformer } from "@hocuspocus/transformer"; -import type { Doc } from "yjs"; -export declare enum Events { - onChange = "change", - onConnect = "connect", - onCreate = "create", - onDisconnect = "disconnect" -} -export interface Configuration { - debounce: number | false | null; - debounceMaxWait: number; - secret: string; - transformer: Transformer | { - toYdoc: (document: any) => Doc; - fromYdoc: (document: Doc) => any; - }; - url: string; - events: Array; -} -export declare class Webhook implements Extension { - configuration: Configuration; - debounced: Map; - /** - * Constructor - */ - constructor(configuration?: Partial); - /** - * Create a signature for the response body - */ - createSignature(body: string): string; - /** - * debounce the given function, using the given identifier - */ - debounce(id: string, func: Function): void; - /** - * Send a request to the given url containing the given data - */ - sendRequest(event: Events, payload: any): Promise>; - /** - * onChange hook - */ - onChange(data: onChangePayload): Promise; - /** - * onLoadDocument hook - */ - onLoadDocument(data: onLoadDocumentPayload): Promise; - /** - * onConnect hook - */ - onConnect(data: onConnectPayload): Promise; - onDisconnect(data: onDisconnectPayload): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/EventEmitter.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/EventEmitter.d.ts deleted file mode 100644 index df6b04e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/EventEmitter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default class EventEmitter { - callbacks: { - [key: string]: Function[]; - }; - on(event: string, fn: Function): this; - protected emit(event: string, ...args: any): this; - off(event: string, fn?: Function): this; - removeAllListeners(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/HocuspocusProvider.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/HocuspocusProvider.d.ts deleted file mode 100644 index 5f503fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/HocuspocusProvider.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -import type { Event, MessageEvent } from "ws"; -import { Awareness } from "y-protocols/awareness"; -import * as Y from "yjs"; -import EventEmitter from "./EventEmitter.ts"; -import type { CompleteHocuspocusProviderWebsocketConfiguration } from "./HocuspocusProviderWebsocket.ts"; -import { HocuspocusProviderWebsocket } from "./HocuspocusProviderWebsocket.ts"; -import type { AuthorizedScope, ConstructableOutgoingMessage, onAuthenticatedParameters, onAuthenticationFailedParameters, onAwarenessChangeParameters, onAwarenessUpdateParameters, onCloseParameters, onDisconnectParameters, onMessageParameters, onOpenParameters, onOutgoingMessageParameters, onStatelessParameters, onStatusParameters, onSyncedParameters, onUnsyncedChangesParameters } from "./types.ts"; -export type HocuspocusProviderConfiguration = Required> & Partial & ((Required> & Partial>) | Required>); -export interface CompleteHocuspocusProviderConfiguration { - /** - * The identifier/name of your document - */ - name: string; - /** - * The actual Y.js document - */ - document: Y.Doc; - /** - * An Awareness instance to keep the presence state of all clients. - * - * You can disable sharing awareness information by passing `null`. - * Note that having no awareness information shared across all connections will break our ping checks - * and thus trigger reconnects. You should always have at least one Provider with enabled awareness per - * socket connection, or ensure that the Provider receives messages before running into `HocuspocusProviderWebsocket.messageReconnectTimeout`. - */ - awareness: Awareness | null; - /** - * A token that’s sent to the backend for authentication purposes. - */ - token: string | (() => string) | (() => Promise) | null; - /** - * Hocuspocus websocket provider - */ - websocketProvider: HocuspocusProviderWebsocket; - /** - * Force syncing the document in the defined interval. - */ - forceSyncInterval: false | number; - onAuthenticated: (data: onAuthenticatedParameters) => void; - onAuthenticationFailed: (data: onAuthenticationFailedParameters) => void; - onOpen: (data: onOpenParameters) => void; - onConnect: () => void; - onStatus: (data: onStatusParameters) => void; - onMessage: (data: onMessageParameters) => void; - onOutgoingMessage: (data: onOutgoingMessageParameters) => void; - onSynced: (data: onSyncedParameters) => void; - onDisconnect: (data: onDisconnectParameters) => void; - onClose: (data: onCloseParameters) => void; - onDestroy: () => void; - onAwarenessUpdate: (data: onAwarenessUpdateParameters) => void; - onAwarenessChange: (data: onAwarenessChangeParameters) => void; - onStateless: (data: onStatelessParameters) => void; - onUnsyncedChanges: (data: onUnsyncedChangesParameters) => void; -} -export declare class AwarenessError extends Error { - code: number; -} -export declare class HocuspocusProvider extends EventEmitter { - configuration: CompleteHocuspocusProviderConfiguration; - isSynced: boolean; - unsyncedChanges: number; - isAuthenticated: boolean; - authorizedScope: AuthorizedScope | undefined; - manageSocket: boolean; - private _isAttached; - intervals: any; - constructor(configuration: HocuspocusProviderConfiguration); - boundDocumentUpdateHandler: (update: Uint8Array, origin: any) => void; - boundAwarenessUpdateHandler: ({ added, updated, removed }: any, origin: any) => void; - boundPageHide: () => void; - boundOnOpen: (event: Event) => Promise; - boundOnClose: () => void; - forwardConnect: () => this; - forwardStatus: (e: onStatusParameters) => this; - forwardClose: (e: onCloseParameters) => this; - forwardDisconnect: (e: onDisconnectParameters) => this; - forwardDestroy: () => this; - setConfiguration(configuration?: Partial): void; - get document(): Y.Doc; - get isAttached(): boolean; - get awareness(): Awareness | null; - get hasUnsyncedChanges(): boolean; - private resetUnsyncedChanges; - incrementUnsyncedChanges(): void; - decrementUnsyncedChanges(): void; - forceSync(): void; - pageHide(): void; - registerEventListeners(): void; - sendStateless(payload: string): void; - sendToken(): Promise; - documentUpdateHandler(update: Uint8Array, origin: any): void; - awarenessUpdateHandler({ added, updated, removed }: any, origin: any): void; - /** - * Indicates whether a first handshake with the server has been established - * - * Note: this does not mean all updates from the client have been persisted to the backend. For this, - * use `hasUnsyncedChanges`. - */ - get synced(): boolean; - set synced(state: boolean); - receiveStateless(payload: string): void; - connect(): Promise; - disconnect(): void; - onOpen(event: Event): Promise; - getToken(): Promise; - startSync(): void; - send(message: ConstructableOutgoingMessage, args: any): void; - onMessage(event: MessageEvent): void; - onClose(): void; - destroy(): void; - detach(): void; - attach(): void; - permissionDeniedHandler(reason: string): void; - authenticatedHandler(scope: string): void; - setAwarenessField(key: string, value: any): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts deleted file mode 100644 index 9f5a1da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -import type { Event, MessageEvent } from "ws"; -import EventEmitter from "./EventEmitter.ts"; -import type { HocuspocusProvider } from "./HocuspocusProvider.ts"; -import { WebSocketStatus, type onAwarenessChangeParameters, type onAwarenessUpdateParameters, type onCloseParameters, type onDisconnectParameters, type onMessageParameters, type onOpenParameters, type onOutgoingMessageParameters, type onStatusParameters } from "./types.ts"; -export type HocuspocusWebSocket = WebSocket & { - identifier: string; -}; -export type HocusPocusWebSocket = HocuspocusWebSocket; -export type HocuspocusProviderWebsocketConfiguration = Required> & Partial; -export interface CompleteHocuspocusProviderWebsocketConfiguration { - /** - * Whether to connect automatically when creating the provider instance. Default=true - */ - autoConnect: boolean; - /** - * URL of your @hocuspocus/server instance - */ - url: string; - /** - * By default, trailing slashes are removed from the URL. Set this to true - * to preserve trailing slashes if your server configuration requires them. - */ - preserveTrailingSlash: boolean; - /** - * An optional WebSocket polyfill, for example for Node.js - */ - WebSocketPolyfill: any; - /** - * Disconnect when no message is received for the defined amount of milliseconds. - */ - messageReconnectTimeout: number; - /** - * The delay between each attempt in milliseconds. You can provide a factor to have the delay grow exponentially. - */ - delay: number; - /** - * The initialDelay is the amount of time to wait before making the first attempt. This option should typically be 0 since you typically want the first attempt to happen immediately. - */ - initialDelay: number; - /** - * The factor option is used to grow the delay exponentially. - */ - factor: number; - /** - * The maximum number of attempts or 0 if there is no limit on number of attempts. - */ - maxAttempts: number; - /** - * minDelay is used to set a lower bound of delay when jitter is enabled. This property has no effect if jitter is disabled. - */ - minDelay: number; - /** - * The maxDelay option is used to set an upper bound for the delay when factor is enabled. A value of 0 can be provided if there should be no upper bound when calculating delay. - */ - maxDelay: number; - /** - * If jitter is true then the calculated delay will be a random integer value between minDelay and the calculated delay for the current iteration. - */ - jitter: boolean; - /** - * A timeout in milliseconds. If timeout is non-zero then a timer is set using setTimeout. If the timeout is triggered then future attempts will be aborted. - */ - timeout: number; - handleTimeout: (() => Promise) | null; - onOpen: (data: onOpenParameters) => void; - onConnect: () => void; - onMessage: (data: onMessageParameters) => void; - onOutgoingMessage: (data: onOutgoingMessageParameters) => void; - onStatus: (data: onStatusParameters) => void; - onDisconnect: (data: onDisconnectParameters) => void; - onClose: (data: onCloseParameters) => void; - onDestroy: () => void; - onAwarenessUpdate: (data: onAwarenessUpdateParameters) => void; - onAwarenessChange: (data: onAwarenessChangeParameters) => void; - /** - * Map of attached providers keyed by documentName. - */ - providerMap: Map; -} -export declare class HocuspocusProviderWebsocket extends EventEmitter { - private messageQueue; - configuration: CompleteHocuspocusProviderWebsocketConfiguration; - webSocket: HocusPocusWebSocket | null; - webSocketHandlers: { - [key: string]: any; - }; - shouldConnect: boolean; - status: WebSocketStatus; - lastMessageReceived: number; - identifier: number; - intervals: any; - connectionAttempt: { - resolve: (value?: any) => void; - reject: (reason?: any) => void; - } | null; - constructor(configuration: HocuspocusProviderWebsocketConfiguration); - receivedOnOpenPayload?: Event | undefined; - onOpen(event: Event): Promise; - attach(provider: HocuspocusProvider): void; - detach(provider: HocuspocusProvider): void; - setConfiguration(configuration?: Partial): void; - cancelWebsocketRetry?: () => void; - connect(): Promise; - attachWebSocketListeners(ws: HocusPocusWebSocket, reject: Function): void; - cleanupWebSocket(): void; - createWebSocketConnection(): Promise; - onMessage(event: MessageEvent): void; - resolveConnectionAttempt(): void; - stopConnectionAttempt(): void; - rejectConnectionAttempt(): void; - closeTries: number; - checkConnection(): void; - get serverUrl(): string; - get url(): string; - disconnect(): void; - send(message: any): void; - onClose({ event }: onCloseParameters): void; - destroy(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/IncomingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/IncomingMessage.d.ts deleted file mode 100644 index 8ce1ae6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/IncomingMessage.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import type { MessageType } from "./types.ts"; -export declare class IncomingMessage { - data: any; - encoder: Encoder; - decoder: Decoder; - constructor(data: any); - peekVarString(): string; - readVarUint(): MessageType; - readVarString(): string; - readVarUint8Array(): Uint8Array; - writeVarUint(type: MessageType): void; - writeVarString(string: string): void; - writeVarUint8Array(data: Uint8Array): void; - length(): number; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/MessageReceiver.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/MessageReceiver.d.ts deleted file mode 100644 index 06918ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/MessageReceiver.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { HocuspocusProvider } from "./HocuspocusProvider.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -export declare class MessageReceiver { - message: IncomingMessage; - constructor(message: IncomingMessage); - apply(provider: HocuspocusProvider, emitSynced: boolean): void; - private applySyncMessage; - applySyncStatusMessage(provider: HocuspocusProvider, applied: boolean): void; - private applyAwarenessMessage; - private applyAuthMessage; - private applyQueryAwarenessMessage; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/MessageSender.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/MessageSender.d.ts deleted file mode 100644 index 382772c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/MessageSender.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { ConstructableOutgoingMessage } from "./types.ts"; -export declare class MessageSender { - encoder: Encoder; - message: any; - constructor(Message: ConstructableOutgoingMessage, args?: any); - create(): Uint8Array; - send(webSocket: any): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessage.d.ts deleted file mode 100644 index 5b4db09..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { MessageType, OutgoingMessageArguments, OutgoingMessageInterface } from "./types.ts"; -export declare class OutgoingMessage implements OutgoingMessageInterface { - encoder: Encoder; - type?: MessageType; - constructor(); - get(args: Partial): Encoder | undefined; - toUint8Array(): Uint8Array; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts deleted file mode 100644 index 775990a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class AuthenticationMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts deleted file mode 100644 index b666f82..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class AwarenessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts deleted file mode 100644 index 7594c95..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class CloseMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts deleted file mode 100644 index eb37902..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class QueryAwarenessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts deleted file mode 100644 index 3349c73..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class StatelessMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts deleted file mode 100644 index 55d1ea0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class SyncStepOneMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts deleted file mode 100644 index fa39f24..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as encoding from "lib0/encoding"; -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class SyncStepTwoMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): encoding.Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts deleted file mode 100644 index 3d5b4f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { OutgoingMessageArguments } from "../types.ts"; -import { MessageType } from "../types.ts"; -import { OutgoingMessage } from "../OutgoingMessage.ts"; -export declare class UpdateMessage extends OutgoingMessage { - type: MessageType; - description: string; - get(args: Partial): import("lib0/encoding").Encoder; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/index.d.ts deleted file mode 100644 index c54d369..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./HocuspocusProvider.ts"; -export * from "./HocuspocusProviderWebsocket.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/types.d.ts deleted file mode 100644 index 3ef91a2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/provider/src/types.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { Event, MessageEvent } from "ws"; -import type { Awareness } from "y-protocols/awareness"; -import type * as Y from "yjs"; -import type { CloseEvent } from "@hocuspocus/common"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -import type { OutgoingMessage } from "./OutgoingMessage.ts"; -import type { AuthenticationMessage } from "./OutgoingMessages/AuthenticationMessage.ts"; -import type { AwarenessMessage } from "./OutgoingMessages/AwarenessMessage.ts"; -import type { QueryAwarenessMessage } from "./OutgoingMessages/QueryAwarenessMessage.ts"; -import type { SyncStepOneMessage } from "./OutgoingMessages/SyncStepOneMessage.ts"; -import type { SyncStepTwoMessage } from "./OutgoingMessages/SyncStepTwoMessage.ts"; -import type { UpdateMessage } from "./OutgoingMessages/UpdateMessage.ts"; -export declare enum MessageType { - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - Stateless = 5, - CLOSE = 7, - SyncStatus = 8 -} -export declare enum WebSocketStatus { - Connecting = "connecting", - Connected = "connected", - Disconnected = "disconnected" -} -export type AuthorizedScope = "read-write" | "readonly"; -export interface OutgoingMessageInterface { - encoder: Encoder; - type?: MessageType; -} -export interface OutgoingMessageArguments { - documentName: string; - token: string; - document: Y.Doc; - awareness: Awareness; - clients: number[]; - states: Map; - update: any; - payload: string; - encoder: Encoder; -} -export interface Constructable { - new (...args: any): T; -} -export type ConstructableOutgoingMessage = Constructable | Constructable | Constructable | Constructable | Constructable | Constructable; -export type onAuthenticationFailedParameters = { - reason: string; -}; -export type onAuthenticatedParameters = { - scope: AuthorizedScope; -}; -export type onOpenParameters = { - event: Event; -}; -export type onMessageParameters = { - event: MessageEvent; - message: IncomingMessage; -}; -export type onOutgoingMessageParameters = { - message: OutgoingMessage; -}; -export type onStatusParameters = { - status: WebSocketStatus; -}; -export type onSyncedParameters = { - state: boolean; -}; -export type onUnsyncedChangesParameters = { - number: number; -}; -export type onDisconnectParameters = { - event: CloseEvent; -}; -export type onCloseParameters = { - event: CloseEvent; -}; -export type onAwarenessUpdateParameters = { - states: StatesArray; -}; -export type onAwarenessChangeParameters = { - states: StatesArray; -}; -export type onStatelessParameters = { - payload: string; -}; -export type StatesArray = { - clientId: number; - [key: string | number]: any; -}[]; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/ClientConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/ClientConnection.d.ts deleted file mode 100644 index 93bb471..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/ClientConnection.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import { type CloseEvent } from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { onDisconnectPayload } from "./types.ts"; -/** - * The `ClientConnection` class is responsible for handling an incoming WebSocket - * - * TODO-refactor: - * - use event handlers instead of calling hooks directly, hooks should probably be called from Hocuspocus.ts - */ -export declare class ClientConnection { - private readonly websocket; - private readonly request; - private readonly documentProvider; - private readonly hooks; - private readonly opts; - private readonly defaultContext; - private readonly documentConnections; - private readonly incomingMessageQueue; - private readonly documentConnectionsEstablished; - private readonly hookPayloads; - private readonly callbacks; - private readonly socketId; - timeout: number; - pingInterval: NodeJS.Timeout; - pongReceived: boolean; - /** - * The `ClientConnection` class receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothings fails it’ll fully establish the connection and - * load the Document then. - */ - constructor(websocket: WebSocket, request: IncomingMessage, documentProvider: { - createDocument: Hocuspocus["createDocument"]; - }, hooks: Hocuspocus["hooks"], opts: { - timeout: number; - }, defaultContext?: any); - private handleWebsocketClose; - close(event?: CloseEvent): void; - handlePong: () => void; - /** - * Check if pong was received and close the connection otherwise - * @private - */ - private check; - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, payload: onDisconnectPayload) => void): ClientConnection; - /** - * Create a new connection by the given request and document - */ - private createConnection; - private setUpNewConnection; - private handleQueueingMessage; - private messageHandler; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Connection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Connection.d.ts deleted file mode 100644 index ca8fa8c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Connection.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { IncomingMessage as HTTPIncomingMessage } from "node:http"; -import { type CloseEvent } from "@hocuspocus/common"; -import type WebSocket from "ws"; -import type Document from "./Document.ts"; -import type { beforeSyncPayload, onStatelessPayload } from "./types.ts"; -export declare class Connection { - webSocket: WebSocket; - context: any; - document: Document; - request: HTTPIncomingMessage; - callbacks: { - onClose: ((document: Document, event?: CloseEvent) => void)[]; - beforeHandleMessage: (connection: Connection, update: Uint8Array) => Promise; - beforeSync: (connection: Connection, payload: Pick) => Promise; - statelessCallback: (payload: onStatelessPayload) => Promise; - onTokenSyncCallback: (payload: { - token: string; - }) => Promise; - }; - socketId: string; - readOnly: boolean; - /** - * Constructor. - */ - constructor(connection: WebSocket, request: HTTPIncomingMessage, document: Document, socketId: string, context: any, readOnly?: boolean); - /** - * Set a callback that will be triggered when the connection is closed - */ - onClose(callback: (document: Document, event?: CloseEvent) => void): Connection; - /** - * Set a callback that will be triggered when an stateless message is received - */ - onStatelessCallback(callback: (payload: onStatelessPayload) => Promise): Connection; - /** - * Set a callback that will be triggered before an message is handled - */ - beforeHandleMessage(callback: (connection: Connection, update: Uint8Array) => Promise): Connection; - /** - * Set a callback that will be triggered before a sync message is handled - */ - beforeSync(callback: (connection: Connection, payload: Pick) => Promise): Connection; - /** - * Set a callback that will be triggered when on token sync message is received - */ - onTokenSyncCallback(callback: (payload: { - token: string; - }) => Promise): Connection; - /** - * Send the given message - */ - send(message: any): void; - /** - * Send a stateless message with payload - */ - sendStateless(payload: string): void; - /** - * Request current token from the client - */ - requestToken(): void; - /** - * Graceful wrapper around the WebSocket close method. - */ - close(event?: CloseEvent): void; - /** - * Send the current document awareness to the client, if any - * @private - */ - private sendCurrentAwareness; - /** - * Handle an incoming message - * @public - */ - handleMessage(data: Uint8Array): void; -} -export default Connection; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/DirectConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/DirectConnection.d.ts deleted file mode 100644 index a1be911..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/DirectConnection.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -import type { DirectConnection as DirectConnectionInterface } from "./types.ts"; -export declare class DirectConnection implements DirectConnectionInterface { - document: Document | null; - instance: Hocuspocus; - context: any; - /** - * Constructor. - */ - constructor(document: Document, instance: Hocuspocus, context?: any); - transact(transaction: (document: Document) => void): Promise; - disconnect(): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Document.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Document.d.ts deleted file mode 100644 index 57faea7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Document.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { Mutex } from "async-mutex"; -import type WebSocket from "ws"; -import { Awareness } from "y-protocols/awareness"; -import { Doc } from "yjs"; -import type Connection from "./Connection.ts"; -export declare class Document extends Doc { - awareness: Awareness; - callbacks: { - onUpdate: (document: Document, connection: Connection, update: Uint8Array) => void; - beforeBroadcastStateless: (document: Document, stateless: string) => void; - }; - connections: Map; - connection: Connection; - }>; - directConnectionsCount: number; - name: string; - isLoading: boolean; - isDestroyed: boolean; - saveMutex: Mutex; - lastChangeTime: number; - /** - * Constructor. - */ - constructor(name: string, yDocOptions?: object); - /** - * Check if the Document (XMLFragment or Map) is empty - */ - isEmpty(fieldName: string): boolean; - /** - * Merge the given document(s) into this one - */ - merge(documents: Doc | Array): Document; - /** - * Set a callback that will be triggered when the document is updated - */ - onUpdate(callback: (document: Document, connection: Connection, update: Uint8Array) => void): Document; - /** - * Set a callback that will be triggered before a stateless message is broadcasted - */ - beforeBroadcastStateless(callback: (document: Document, stateless: string) => void): Document; - /** - * Register a connection and a set of clients on this document keyed by the - * underlying websocket connection - */ - addConnection(connection: Connection): Document; - /** - * Is the given connection registered on this document - */ - hasConnection(connection: Connection): boolean; - /** - * Remove the given connection from this document - */ - removeConnection(connection: Connection): Document; - addDirectConnection(): Document; - removeDirectConnection(): Document; - /** - * Get the number of active connections for this document - */ - getConnectionsCount(): number; - /** - * Get an array of registered connections - */ - getConnections(): Array; - /** - * Get the client ids for the given connection instance - */ - getClients(connectionInstance: WebSocket): Set; - /** - * Has the document awareness states - */ - hasAwarenessStates(): boolean; - /** - * Apply the given awareness update - */ - applyAwarenessUpdate(connection: Connection, update: Uint8Array): Document; - /** - * Handle an awareness update and sync changes to clients - * @private - */ - private handleAwarenessUpdate; - /** - * Handle an updated document and sync changes to clients - */ - private handleUpdate; - /** - * Broadcast stateless message to all connections - */ - broadcastStateless(payload: string, filter?: (conn: Connection) => boolean): void; - destroy(): void; -} -export default Document; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Hocuspocus.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Hocuspocus.d.ts deleted file mode 100644 index fa1684f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Hocuspocus.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import type WebSocket from "ws"; -import { DirectConnection } from "./DirectConnection.ts"; -import Document from "./Document.ts"; -import type { Server } from "./Server.ts"; -import type { Configuration, ConnectionConfiguration, HookName, HookPayloadByName, onStoreDocumentPayload } from "./types.ts"; -export declare const defaultConfiguration: { - name: null; - timeout: number; - debounce: number; - maxDebounce: number; - quiet: boolean; - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; - unloadImmediately: boolean; -}; -export declare class Hocuspocus { - configuration: Configuration; - loadingDocuments: Map>; - unloadingDocuments: Map>; - documents: Map; - server?: Server; - debouncer: { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; - }; - constructor(configuration?: Partial); - /** - * Configure Hocuspocus - */ - configure(configuration: Partial): Hocuspocus; - /** - * Get the total number of active documents - */ - getDocumentsCount(): number; - /** - * Get the total number of active connections - */ - getConnectionsCount(): number; - /** - * Force close one or more connections - */ - closeConnections(documentName?: string): void; - /** - * The `handleConnection` method receives incoming WebSocket connections, - * runs all hooks: - * - * - onConnect for all connections - * - onAuthenticate only if required - * - * … and if nothing fails it’ll fully establish the connection and - * load the Document then. - */ - handleConnection(incoming: WebSocket, request: IncomingMessage, defaultContext?: any): void; - /** - * Handle update of the given document - * - * "connection" is not necessarily type "Connection", it's the Yjs "origin" (which is "Connection" if - * the update is incoming from the provider, but can be anything if the updates is originated from an extension. - */ - private handleDocumentUpdate; - /** - * Create a new document by the given request - */ - createDocument(documentName: string, request: Partial>, socketId: string, connection: ConnectionConfiguration, context?: any): Promise; - loadDocument(documentName: string, request: Partial>, socketId: string, connectionConfig: ConnectionConfiguration, context?: any): Promise; - storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload, immediately?: boolean): Promise; - /** - * Run the given hook on all configured extensions. - * Runs the given callback after each hook. - */ - hooks(name: T, payload: HookPayloadByName[T], callback?: Function | null): Promise; - shouldUnloadDocument(document: Document): boolean; - unloadDocument(document: Document): Promise; - openDirectConnection(documentName: string, context?: any): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/IncomingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/IncomingMessage.d.ts deleted file mode 100644 index 639bbdf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/IncomingMessage.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Decoder } from "lib0/decoding"; -import type { Encoder } from "lib0/encoding"; -import type { MessageType } from "./types.ts"; -export declare class IncomingMessage { - /** - * Access to the received message. - */ - decoder: Decoder; - /** - * Private encoder; can be undefined. - * - * Lazy creation of the encoder speeds up IncomingMessages that need only a decoder. - */ - private encoderInternal?; - constructor(input: any); - get encoder(): Encoder; - readVarUint8Array(): Uint8Array; - peekVarUint8Array(): Uint8Array; - readVarUint(): number; - readVarString(): string; - toUint8Array(): Uint8Array; - writeVarUint(type: MessageType): void; - writeVarString(string: string): void; - get length(): number; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/MessageReceiver.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/MessageReceiver.d.ts deleted file mode 100644 index 6d864ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/MessageReceiver.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { IncomingMessage } from "./IncomingMessage.ts"; -export declare class MessageReceiver { - message: IncomingMessage; - defaultTransactionOrigin?: string; - constructor(message: IncomingMessage, defaultTransactionOrigin?: string); - apply(document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): void; - readSyncMessage(message: IncomingMessage, document: Document, connection?: Connection, reply?: (message: Uint8Array) => void, requestFirstSync?: boolean): 0 | 2 | 1; - applyQueryAwarenessMessage(document: Document, reply?: (message: Uint8Array) => void): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/OutgoingMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/OutgoingMessage.d.ts deleted file mode 100644 index e4f9be2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/OutgoingMessage.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { Encoder } from "lib0/encoding"; -import type { Awareness } from "y-protocols/awareness"; -import type Document from "./Document.ts"; -export declare class OutgoingMessage { - encoder: Encoder; - type?: number; - category?: string; - constructor(documentName: string); - createSyncMessage(): OutgoingMessage; - createSyncReplyMessage(): OutgoingMessage; - createAwarenessUpdateMessage(awareness: Awareness, changedClients?: Array): OutgoingMessage; - writeQueryAwareness(): OutgoingMessage; - writeTokenSyncRequest(): OutgoingMessage; - writeAuthenticated(readonly: boolean): OutgoingMessage; - writePermissionDenied(reason: string): OutgoingMessage; - writeFirstSyncStepFor(document: Document): OutgoingMessage; - writeUpdate(update: Uint8Array): OutgoingMessage; - writeStateless(payload: string): OutgoingMessage; - writeBroadcastStateless(payload: string): OutgoingMessage; - writeSyncStatus(updateSaved: boolean): OutgoingMessage; - writeCloseMessage(reason: string): OutgoingMessage; - toUint8Array(): Uint8Array; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Server.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Server.d.ts deleted file mode 100644 index a1df4ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/Server.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { Server as HTTPServer, IncomingMessage, ServerResponse } from "node:http"; -import { WebSocketServer } from "ws"; -import type { AddressInfo, ServerOptions } from "ws"; -import { Hocuspocus } from "./Hocuspocus.ts"; -import type { Configuration } from "./types.ts"; -export interface ServerConfiguration extends Configuration { - port?: number; - address?: string; - stopOnSignals?: boolean; -} -export declare const defaultServerConfiguration: { - port: number; - address: string; - stopOnSignals: boolean; -}; -export declare class Server { - httpServer: HTTPServer; - webSocketServer: WebSocketServer; - hocuspocus: Hocuspocus; - configuration: ServerConfiguration; - constructor(configuration?: Partial, websocketOptions?: ServerOptions); - setupWebsocketConnection: () => void; - setupHttpUpgrade: () => void; - requestHandler: (request: IncomingMessage, response: ServerResponse) => Promise; - listen(port?: number, callback?: any): Promise; - get address(): AddressInfo; - destroy(): Promise; - get URL(): string; - get webSocketURL(): string; - get httpURL(): string; - private showStartScreen; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/index.d.ts deleted file mode 100644 index 8ede6d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from "./Connection.ts"; -export * from "./Document.ts"; -export * from "./Hocuspocus.ts"; -export * from "./IncomingMessage.ts"; -export * from "./MessageReceiver.ts"; -export * from "./OutgoingMessage.ts"; -export * from "./Server.ts"; -export * from "./types.ts"; -export * from "./util/debounce.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/types.d.ts deleted file mode 100644 index 615cacc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/types.d.ts +++ /dev/null @@ -1,342 +0,0 @@ -import type { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "node:http"; -import type { URLSearchParams } from "node:url"; -import type { Awareness } from "y-protocols/awareness"; -import type Connection from "./Connection.ts"; -import type Document from "./Document.ts"; -import type { Hocuspocus } from "./Hocuspocus.ts"; -export declare enum MessageType { - Unknown = -1, - Sync = 0, - Awareness = 1, - Auth = 2, - QueryAwareness = 3, - SyncReply = 4,// same as Sync, but won't trigger another 'SyncStep1' - Stateless = 5, - BroadcastStateless = 6, - CLOSE = 7, - SyncStatus = 8 -} -export interface AwarenessUpdate { - added: Array; - updated: Array; - removed: Array; -} -export interface ConnectionConfiguration { - readOnly: boolean; - isAuthenticated: boolean; -} -export interface Extension { - priority?: number; - extensionName?: string; - onConfigure?(data: onConfigurePayload): Promise; - onListen?(data: onListenPayload): Promise; - onUpgrade?(data: onUpgradePayload): Promise; - onConnect?(data: onConnectPayload): Promise; - connected?(data: connectedPayload): Promise; - onAuthenticate?(data: onAuthenticatePayload): Promise; - onTokenSync?(data: onTokenSyncPayload): Promise; - onCreateDocument?(data: onCreateDocumentPayload): Promise; - onLoadDocument?(data: onLoadDocumentPayload): Promise; - afterLoadDocument?(data: afterLoadDocumentPayload): Promise; - beforeHandleMessage?(data: beforeHandleMessagePayload): Promise; - beforeSync?(data: beforeSyncPayload): Promise; - beforeBroadcastStateless?(data: beforeBroadcastStatelessPayload): Promise; - onStateless?(payload: onStatelessPayload): Promise; - onChange?(data: onChangePayload): Promise; - onStoreDocument?(data: onStoreDocumentPayload): Promise; - afterStoreDocument?(data: afterStoreDocumentPayload): Promise; - onAwarenessUpdate?(data: onAwarenessUpdatePayload): Promise; - onRequest?(data: onRequestPayload): Promise; - onDisconnect?(data: onDisconnectPayload): Promise; - beforeUnloadDocument?(data: beforeUnloadDocumentPayload): Promise; - afterUnloadDocument?(data: afterUnloadDocumentPayload): Promise; - onDestroy?(data: onDestroyPayload): Promise; -} -export type HookName = "onConfigure" | "onListen" | "onUpgrade" | "onConnect" | "connected" | "onAuthenticate" | "onTokenSync" | "onCreateDocument" | "onLoadDocument" | "afterLoadDocument" | "beforeHandleMessage" | "beforeBroadcastStateless" | "beforeSync" | "onStateless" | "onChange" | "onStoreDocument" | "afterStoreDocument" | "onAwarenessUpdate" | "onRequest" | "onDisconnect" | "beforeUnloadDocument" | "afterUnloadDocument" | "onDestroy"; -export type HookPayloadByName = { - onConfigure: onConfigurePayload; - onListen: onListenPayload; - onUpgrade: onUpgradePayload; - onConnect: onConnectPayload; - connected: connectedPayload; - onAuthenticate: onAuthenticatePayload; - onTokenSync: onTokenSyncPayload; - onCreateDocument: onCreateDocumentPayload; - onLoadDocument: onLoadDocumentPayload; - afterLoadDocument: afterLoadDocumentPayload; - beforeHandleMessage: beforeHandleMessagePayload; - beforeBroadcastStateless: beforeBroadcastStatelessPayload; - beforeSync: beforeSyncPayload; - onStateless: onStatelessPayload; - onChange: onChangePayload; - onStoreDocument: onStoreDocumentPayload; - afterStoreDocument: afterStoreDocumentPayload; - onAwarenessUpdate: onAwarenessUpdatePayload; - onRequest: onRequestPayload; - onDisconnect: onDisconnectPayload; - afterUnloadDocument: afterUnloadDocumentPayload; - beforeUnloadDocument: beforeUnloadDocumentPayload; - onDestroy: onDestroyPayload; -}; -export interface Configuration extends Extension { - /** - * A name for the instance, used for logging. - */ - name: string | null; - /** - * A list of hocuspocus extensions. - */ - extensions: Array; - /** - * Defines in which interval the server sends a ping, and closes the connection when no pong is sent back. - */ - timeout: number; - /** - * Debounces the call of the `onStoreDocument` hook for the given amount of time in ms. - * Otherwise every single update would be persisted. - */ - debounce: number; - /** - * Makes sure to call `onStoreDocument` at least in the given amount of time (ms). - */ - maxDebounce: number; - /** - * By default, the servers show a start screen. If passed false, the server will start quietly. - */ - quiet: boolean; - /** - * If set to false, respects the debounce time of `onStoreDocument` before unloading a document. - * Otherwise, the document will be unloaded immediately. - * - * This prevents a client from DOSing the server by repeatedly connecting and disconnecting when - * your onStoreDocument is rate-limited. - */ - unloadImmediately: boolean; - /** - * options to pass to the ydoc document - */ - yDocOptions: { - gc: boolean; - gcFilter: () => boolean; - }; -} -export interface onStatelessPayload { - connection: Connection; - documentName: string; - document: Document; - payload: string; -} -export interface onAuthenticatePayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - request: IncomingMessage; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; -} -export interface onTokenSyncPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - token: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} -export interface onCreateDocumentPayload { - context: any; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface onConnectPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface connectedPayload { - context: any; - documentName: string; - instance: Hocuspocus; - request: IncomingMessage; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; - connection: Connection; -} -export interface onLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface afterLoadDocumentPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface onChangePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - transactionOrigin: any; -} -export interface beforeHandleMessagePayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - update: Uint8Array; - socketId: string; - connection: Connection; -} -export interface beforeSyncPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - connection: Connection; - /** - * The y-protocols/sync message type - * @example - * 0: SyncStep1 - * 1: SyncStep2 - * 2: YjsUpdate - * - * @see https://github.com/yjs/y-protocols/blob/master/sync.js#L13-L40 - */ - type: number; - /** - * The payload of the y-sync message. - */ - payload: Uint8Array; -} -export interface beforeBroadcastStatelessPayload { - document: Document; - documentName: string; - payload: string; -} -export interface onStoreDocumentPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - transactionOrigin?: any; -} -export interface afterStoreDocumentPayload extends onStoreDocumentPayload { -} -export interface onAwarenessUpdatePayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - added: number[]; - updated: number[]; - removed: number[]; - awareness: Awareness; - states: StatesArray; -} -export type StatesArray = { - clientId: number; - [key: string | number]: any; -}[]; -export interface fetchPayload { - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; - connectionConfig: ConnectionConfiguration; -} -export interface storePayload extends onStoreDocumentPayload { - state: Buffer; -} -export interface onDisconnectPayload { - clientsCount: number; - context: any; - document: Document; - documentName: string; - instance: Hocuspocus; - requestHeaders: IncomingHttpHeaders; - requestParameters: URLSearchParams; - socketId: string; -} -export interface onRequestPayload { - request: IncomingMessage; - response: ServerResponse; - instance: Hocuspocus; -} -export interface onUpgradePayload { - request: IncomingMessage; - socket: any; - head: any; - instance: Hocuspocus; -} -export interface onListenPayload { - instance: Hocuspocus; - configuration: Configuration; - port: number; -} -export interface onDestroyPayload { - instance: Hocuspocus; -} -export interface onConfigurePayload { - instance: Hocuspocus; - configuration: Configuration; - version: string; -} -export interface afterUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; -} -export interface beforeUnloadDocumentPayload { - instance: Hocuspocus; - documentName: string; - document: Document; -} -export interface DirectConnection { - transact(transaction: (document: Document) => void): Promise; - disconnect(): void; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/util/debounce.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/util/debounce.d.ts deleted file mode 100644 index 4573cfd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/util/debounce.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare const useDebounce: () => { - debounce: (id: string, func: () => any | Promise<() => any>, debounce: number, maxDebounce: number) => Promise; - isDebounced: (id: string) => boolean; - isCurrentlyExecuting: (id: string) => boolean; - executeNow: (id: string) => any; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/util/getParameters.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/util/getParameters.d.ts deleted file mode 100644 index a0100ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/server/src/util/getParameters.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { IncomingMessage } from "node:http"; -import { URLSearchParams } from "node:url"; -/** - * Get parameters by the given request - */ -export declare function getParameters(request?: Pick): URLSearchParams; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/Prosemirror.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/Prosemirror.d.ts deleted file mode 100644 index 06db1a6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/Prosemirror.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Doc } from "yjs"; -import { Schema } from "@tiptap/pm/model"; -import type { Transformer } from "./types.ts"; -declare class Prosemirror implements Transformer { - defaultSchema: Schema; - schema(schema: Schema): Prosemirror; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, schema?: Schema): Doc; -} -export declare const ProsemirrorTransformer: Prosemirror; -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/Tiptap.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/Tiptap.d.ts deleted file mode 100644 index 3d64c14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/Tiptap.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Doc } from "yjs"; -import type { Extensions } from "@tiptap/core"; -import type { Transformer } from "./types.ts"; -export declare class Tiptap implements Transformer { - defaultExtensions: Extensions; - extensions(extensions: Extensions): Tiptap; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, extensions?: Extensions): Doc; -} -export declare const TiptapTransformer: Tiptap; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/index.d.ts deleted file mode 100644 index a8debe5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./Prosemirror.ts"; -export * from "./Tiptap.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/types.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/types.d.ts deleted file mode 100644 index 1c2f6da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/packages/transformer/src/types.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Doc } from "yjs"; -export interface Transformer { - fromYdoc: (document: Doc, fieldName?: string | Array) => any; - toYdoc: (document: any, fieldName: string) => Doc; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/default.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/default.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/deno.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/deno.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/deno.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/express.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/express.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/express.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/hono.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/hono.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/hono.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/koa.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/koa.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/koa.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/load-document.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/load-document.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/load-document.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/redis.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/redis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/s3-redis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/s3-redis.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/s3-redis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/s3.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/s3.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/s3.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/slow.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/slow.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/slow.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/tiptapcollab.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/tiptapcollab.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/tiptapcollab.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/webhook.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/webhook.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/backend/src/webhook.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/app/SocketContext1.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/app/SocketContext1.d.ts deleted file mode 100644 index d0725fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/app/SocketContext1.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { HocuspocusProviderWebsocket } from "@hocuspocus/provider"; -export declare const SocketContext1: import("react").Context; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/app/SocketContext2.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/app/SocketContext2.d.ts deleted file mode 100644 index ac4da99..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/app/SocketContext2.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { HocuspocusProviderWebsocket } from "@hocuspocus/provider"; -export declare const SocketContext2: import("react").Context; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/next.config.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/next.config.d.ts deleted file mode 100644 index 2821dfb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/playground/frontend/next.config.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { NextConfig } from "next"; -declare const nextConfig: NextConfig; -export default nextConfig; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-database/fetch.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-database/fetch.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-database/fetch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-logger/onListen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-logger/onListen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-logger/onListen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onAwarenessChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onAwarenessChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onAwarenessChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-redis/onStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-s3/fetch.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-s3/fetch.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-s3/fetch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-throttle/banning.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-throttle/banning.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-throttle/banning.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-throttle/configuration.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-throttle/configuration.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/extension-throttle/configuration.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/hasUnsyncedChanges.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/hasUnsyncedChanges.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/hasUnsyncedChanges.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/observe.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/observe.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/observe.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/observeDeep.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/observeDeep.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/observeDeep.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAuthenticated.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAuthenticated.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAuthenticated.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAuthenticationFailed.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAuthenticationFailed.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAuthenticationFailed.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAwarenessChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAwarenessChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAwarenessChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAwarenessUpdate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAwarenessUpdate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onAwarenessUpdate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onClose.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onClose.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onClose.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onConnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onConnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onConnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onDisconnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onDisconnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onDisconnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onMessage.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onMessage.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onOpen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onOpen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onOpen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onSynced.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onSynced.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/provider/onSynced.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/providerwebsocket/configuration.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/providerwebsocket/configuration.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/providerwebsocket/configuration.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/address.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/address.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/address.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterLoadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterLoadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterLoadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterUnloadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterUnloadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/afterUnloadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeBroadcastStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeBroadcastStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeBroadcastStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeHandleMessage.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeHandleMessage.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeHandleMessage.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeSync.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeSync.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeSync.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeUnloadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeUnloadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/beforeUnloadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/closeConnections.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/closeConnections.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/closeConnections.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/getConnectionsCount.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/getConnectionsCount.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/getConnectionsCount.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/getDocumentsCount.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/getDocumentsCount.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/getDocumentsCount.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/listen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/listen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/listen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onAuthenticate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onAuthenticate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onAuthenticate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onAwarenessUpdate.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onAwarenessUpdate.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onAwarenessUpdate.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onChange.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onChange.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onChange.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onClose.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onClose.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onClose.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onConfigure.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onConfigure.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onConfigure.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onConnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onConnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onConnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onDestroy.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onDestroy.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onDestroy.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onDisconnect.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onDisconnect.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onDisconnect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onListen.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onListen.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onListen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onLoadDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onLoadDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onLoadDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onRequest.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onRequest.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onRequest.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onStateless.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onStateless.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onStateless.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onStoreDocument.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onStoreDocument.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onStoreDocument.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onTokenSync.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onTokenSync.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onTokenSync.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onUpgrade.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onUpgrade.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/onUpgrade.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/openDirectConnection.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/openDirectConnection.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/openDirectConnection.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/websocketError.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/websocketError.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/server/websocketError.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/transformer/TiptapTransformer.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/transformer/TiptapTransformer.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/transformer/TiptapTransformer.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/createDirectory.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/createDirectory.d.ts deleted file mode 100644 index 7affbc2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/createDirectory.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const createDirectory: (dir: string) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/flushRedis.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/flushRedis.d.ts deleted file mode 100644 index 5a548da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/flushRedis.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const flushRedis: () => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/index.d.ts deleted file mode 100644 index 789d5d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from './createDirectory.ts'; -export * from './flushRedis.ts'; -export * from './newHocuspocus.ts'; -export * from './newHocuspocusProvider.ts'; -export * from './newHocuspocusProviderWebsocket.ts'; -export * from './randomInteger.ts'; -export * from './redisConnectionSettings.ts'; -export * from './removeDirectory.ts'; -export * from './sleep.ts'; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocus.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocus.d.ts deleted file mode 100644 index c3de52e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocus.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { ServerConfiguration } from '@hocuspocus/server'; -export declare const newHocuspocus: (options?: Partial) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocusProvider.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocusProvider.d.ts deleted file mode 100644 index 09e3f10..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocusProvider.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { HocuspocusProvider, type HocuspocusProviderConfiguration, type HocuspocusProviderWebsocket, type HocuspocusProviderWebsocketConfiguration } from '@hocuspocus/provider'; -import type { Hocuspocus } from '@hocuspocus/server'; -export declare const newHocuspocusProvider: (server: Hocuspocus, options?: Partial, websocketOptions?: Partial, websocketProvider?: HocuspocusProviderWebsocket) => HocuspocusProvider; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts deleted file mode 100644 index 97bb454..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/newHocuspocusProviderWebsocket.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { HocuspocusProviderWebsocketConfiguration } from '@hocuspocus/provider'; -import { HocuspocusProviderWebsocket } from '@hocuspocus/provider'; -import type { Hocuspocus } from '@hocuspocus/server'; -export declare const newHocuspocusProviderWebsocket: (hocuspocus: Hocuspocus, options?: Partial>) => HocuspocusProviderWebsocket; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/randomInteger.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/randomInteger.d.ts deleted file mode 100644 index b28e7b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/randomInteger.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const randomInteger: (min: number, max: number) => number; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/redisConnectionSettings.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/redisConnectionSettings.d.ts deleted file mode 100644 index 52c31fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/redisConnectionSettings.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const redisConnectionSettings: { - host: string; - port: number; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/removeDirectory.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/removeDirectory.d.ts deleted file mode 100644 index 71b4ffc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/removeDirectory.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const removeDirectory: (dir: string) => void; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/retryableAssertion.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/retryableAssertion.d.ts deleted file mode 100644 index 1016874..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/retryableAssertion.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { ExecutionContext } from 'ava'; -export declare const retryableAssertion: (t: ExecutionContext, recoverableTry: (tt: ExecutionContext) => void) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/sleep.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/sleep.d.ts deleted file mode 100644 index 2450ca0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/dist/tests/utils/sleep.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const sleep: (time: number) => Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/package.json b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/package.json deleted file mode 100644 index ca370c1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "@hocuspocus/transformer", - "version": "3.4.4", - "description": "hocuspocus transformation utilities", - "homepage": "https://hocuspocus.dev", - "keywords": [ - "hocuspocus", - "transformer", - "yjs" - ], - "license": "MIT", - "type": "module", - "main": "dist/hocuspocus-transformer.cjs", - "module": "dist/hocuspocus-transformer.esm.js", - "types": "dist/packages/transformer/src/index.d.ts", - "exports": { - "source": { - "import": "./src/index.ts" - }, - "default": { - "import": "./dist/hocuspocus-transformer.esm.js", - "require": "./dist/hocuspocus-transformer.cjs", - "types": "./dist/packages/transformer/src/index.d.ts" - } - }, - "files": [ - "src", - "dist" - ], - "dependencies": { - "@tiptap/starter-kit": "^3.0.1" - }, - "peerDependencies": { - "@tiptap/core": "^3.0.1", - "@tiptap/pm": "^3.0.1", - "y-prosemirror": "^1.2.1", - "yjs": "^13.6.8" - }, - "devDependencies": { - "@tiptap/pm": "^3.0.1" - }, - "gitHead": "8f2e9df95de9968d70622ea8697c303a333b6cb3", - "repository": { - "url": "https://github.com/ueberdosis/hocuspocus" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/Prosemirror.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/Prosemirror.ts deleted file mode 100644 index 38114b9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/Prosemirror.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Doc, applyUpdate, encodeStateAsUpdate } from "yjs"; -// @ts-ignore -import { yDocToProsemirrorJSON, prosemirrorJSONToYDoc } from "y-prosemirror"; -import { Schema } from "@tiptap/pm/model"; -import type { Transformer } from "./types.ts"; - -class Prosemirror implements Transformer { - defaultSchema: Schema = new Schema({ - nodes: { - text: {}, - doc: { content: "text*" }, - }, - }); - - schema(schema: Schema): Prosemirror { - this.defaultSchema = schema; - - return this; - } - - fromYdoc(document: Doc, fieldName?: string | Array): any { - const data = {}; - - // allow a single field name - if (typeof fieldName === "string") { - return yDocToProsemirrorJSON(document, fieldName); - } - - // default to all available fields if the given field name is empty - if (fieldName === undefined || fieldName.length === 0) { - fieldName = Array.from(document.share.keys()); - } - - fieldName.forEach((field) => { - // @ts-ignore - data[field] = yDocToProsemirrorJSON(document, field); - }); - - return data; - } - - toYdoc( - document: any, - fieldName: string | Array = "prosemirror", - schema?: Schema, - ): Doc { - if (!document) { - throw new Error( - `You’ve passed an empty or invalid document to the Transformer. Make sure to pass ProseMirror-compatible JSON. Actually passed JSON: ${document}`, - ); - } - - // allow a single field name - if (typeof fieldName === "string") { - return prosemirrorJSONToYDoc( - schema || this.defaultSchema, - document, - fieldName, - ); - } - - const ydoc = new Doc(); - - fieldName.forEach((field) => { - const update = encodeStateAsUpdate( - prosemirrorJSONToYDoc(schema || this.defaultSchema, document, field), - ); - - applyUpdate(ydoc, update); - }); - - return ydoc; - } -} - -export const ProsemirrorTransformer = new Prosemirror(); diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/Tiptap.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/Tiptap.ts deleted file mode 100644 index 7e84070..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/Tiptap.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { Doc } from "yjs"; -// @ts-ignore -import type { Extensions } from "@tiptap/core"; -import { getSchema } from "@tiptap/core"; -import { StarterKit } from "@tiptap/starter-kit"; -import type { Transformer } from "./types.ts"; -import { ProsemirrorTransformer } from "./Prosemirror.ts"; - -export class Tiptap implements Transformer { - defaultExtensions: Extensions = [StarterKit]; - - extensions(extensions: Extensions): Tiptap { - this.defaultExtensions = extensions; - - return this; - } - - fromYdoc(document: Doc, fieldName?: string | Array): any { - return ProsemirrorTransformer.fromYdoc(document, fieldName); - } - - toYdoc( - document: any, - fieldName: string | Array = "default", - extensions?: Extensions, - ): Doc { - return ProsemirrorTransformer.toYdoc( - document, - fieldName, - getSchema(extensions || this.defaultExtensions), - ); - } -} - -export const TiptapTransformer = new Tiptap(); diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/index.ts deleted file mode 100644 index a8debe5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./Prosemirror.ts"; -export * from "./Tiptap.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/types.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/types.ts deleted file mode 100644 index 1d5fe9a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@hocuspocus/transformer/src/types.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Doc } from "yjs"; - -export interface Transformer { - fromYdoc: (document: Doc, fieldName?: string | Array) => any; - toYdoc: (document: any, fieldName: string) => Doc; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/pm b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/pm deleted file mode 120000 index f877560..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/pm +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+pm@3.26.0/node_modules/@tiptap/pm \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/starter-kit b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/starter-kit deleted file mode 120000 index 49c64f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/@tiptap/starter-kit +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/y-prosemirror b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/y-prosemirror deleted file mode 120000 index 21d9bad..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/y-prosemirror +++ /dev/null @@ -1 +0,0 @@ -../../y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/yjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/yjs deleted file mode 120000 index c3bb19e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@3.4.4_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__8e44d35c1dcfdfc553688c88a37b3f91/node_modules/yjs +++ /dev/null @@ -1 +0,0 @@ -../../yjs@13.6.31/node_modules/yjs \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/LICENSE.md deleted file mode 100644 index 8cb2084..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/README.md b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/README.md deleted file mode 100644 index 0afc5f1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# @hocuspocus/transformer -[![Version](https://img.shields.io/npm/v/@hocuspocus/transformer.svg?label=version)](https://www.npmjs.com/package/@hocuspocus/transformer) -[![Downloads](https://img.shields.io/npm/dm/@hocuspocus/transformer.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@hocuspocus/transformer.svg)](https://www.npmjs.com/package/@hocuspocus/transformer) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction -Convert [Y.js](https://github.com/yjs/yjs) documents to and from [Tiptap](https://github.com/ueberdosis/tiptap) / ProseMirror JSON and HTML. Useful on the server side to render or process collaborative document state outside the editor – for exports, previews, or webhook payloads. - -## Official Documentation -Documentation can be found in the [GitHub repository](https://github.com/ueberdosis/hocuspocus). - -## License -Hocuspocus is open-sourced software licensed under the [MIT license](https://github.com/ueberdosis/hocuspocus/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs deleted file mode 100644 index b3f1881..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs +++ /dev/null @@ -1,64 +0,0 @@ -Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -let yjs = require("yjs"); -let y_prosemirror = require("y-prosemirror"); -let _tiptap_pm_model = require("@tiptap/pm/model"); -let _tiptap_core = require("@tiptap/core"); -let _tiptap_starter_kit = require("@tiptap/starter-kit"); - -//#region packages/transformer/src/Prosemirror.ts -var Prosemirror = class { - constructor() { - this.defaultSchema = new _tiptap_pm_model.Schema({ nodes: { - text: {}, - doc: { content: "text*" } - } }); - } - schema(schema) { - this.defaultSchema = schema; - return this; - } - fromYdoc(document, fieldName) { - const data = {}; - if (typeof fieldName === "string") return (0, y_prosemirror.yDocToProsemirrorJSON)(document, fieldName); - if (fieldName === void 0 || fieldName.length === 0) fieldName = Array.from(document.share.keys()); - fieldName.forEach((field) => { - data[field] = (0, y_prosemirror.yDocToProsemirrorJSON)(document, field); - }); - return data; - } - toYdoc(document, fieldName = "prosemirror", schema) { - if (!document) throw new Error(`You’ve passed an empty or invalid document to the Transformer. Make sure to pass ProseMirror-compatible JSON. Actually passed JSON: ${document}`); - if (typeof fieldName === "string") return (0, y_prosemirror.prosemirrorJSONToYDoc)(schema || this.defaultSchema, document, fieldName); - const ydoc = new yjs.Doc(); - fieldName.forEach((field) => { - (0, yjs.applyUpdate)(ydoc, (0, yjs.encodeStateAsUpdate)((0, y_prosemirror.prosemirrorJSONToYDoc)(schema || this.defaultSchema, document, field))); - }); - return ydoc; - } -}; -const ProsemirrorTransformer = new Prosemirror(); - -//#endregion -//#region packages/transformer/src/Tiptap.ts -var Tiptap = class { - constructor() { - this.defaultExtensions = [_tiptap_starter_kit.StarterKit]; - } - extensions(extensions) { - this.defaultExtensions = extensions; - return this; - } - fromYdoc(document, fieldName) { - return ProsemirrorTransformer.fromYdoc(document, fieldName); - } - toYdoc(document, fieldName = "default", extensions) { - return ProsemirrorTransformer.toYdoc(document, fieldName, (0, _tiptap_core.getSchema)(extensions || this.defaultExtensions)); - } -}; -const TiptapTransformer = new Tiptap(); - -//#endregion -exports.ProsemirrorTransformer = ProsemirrorTransformer; -exports.Tiptap = Tiptap; -exports.TiptapTransformer = TiptapTransformer; -//# sourceMappingURL=hocuspocus-transformer.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs.map deleted file mode 100644 index 5b0f3a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-transformer.cjs","names":["Schema","Doc","StarterKit"],"sources":["../src/Prosemirror.ts","../src/Tiptap.ts"],"sourcesContent":["import { Doc, applyUpdate, encodeStateAsUpdate } from \"yjs\";\n// @ts-expect-error\nimport { yDocToProsemirrorJSON, prosemirrorJSONToYDoc } from \"y-prosemirror\";\nimport { Schema } from \"@tiptap/pm/model\";\nimport type { Transformer } from \"./types.ts\";\n\nclass Prosemirror implements Transformer {\n\tdefaultSchema: Schema = new Schema({\n\t\tnodes: {\n\t\t\ttext: {},\n\t\t\tdoc: { content: \"text*\" },\n\t\t},\n\t});\n\n\tschema(schema: Schema): Prosemirror {\n\t\tthis.defaultSchema = schema;\n\n\t\treturn this;\n\t}\n\n\tfromYdoc(document: Doc, fieldName?: string | Array): any {\n\t\tconst data = {};\n\n\t\t// allow a single field name\n\t\tif (typeof fieldName === \"string\") {\n\t\t\treturn yDocToProsemirrorJSON(document, fieldName);\n\t\t}\n\n\t\t// default to all available fields if the given field name is empty\n\t\tif (fieldName === undefined || fieldName.length === 0) {\n\t\t\tfieldName = Array.from(document.share.keys());\n\t\t}\n\n\t\tfieldName.forEach((field) => {\n\t\t\t// @ts-expect-error\n\t\t\tdata[field] = yDocToProsemirrorJSON(document, field);\n\t\t});\n\n\t\treturn data;\n\t}\n\n\ttoYdoc(\n\t\tdocument: any,\n\t\tfieldName: string | Array = \"prosemirror\",\n\t\tschema?: Schema,\n\t): Doc {\n\t\tif (!document) {\n\t\t\tthrow new Error(\n\t\t\t\t`You’ve passed an empty or invalid document to the Transformer. Make sure to pass ProseMirror-compatible JSON. Actually passed JSON: ${document}`,\n\t\t\t);\n\t\t}\n\n\t\t// allow a single field name\n\t\tif (typeof fieldName === \"string\") {\n\t\t\treturn prosemirrorJSONToYDoc(\n\t\t\t\tschema || this.defaultSchema,\n\t\t\t\tdocument,\n\t\t\t\tfieldName,\n\t\t\t);\n\t\t}\n\n\t\tconst ydoc = new Doc();\n\n\t\tfieldName.forEach((field) => {\n\t\t\tconst update = encodeStateAsUpdate(\n\t\t\t\tprosemirrorJSONToYDoc(schema || this.defaultSchema, document, field),\n\t\t\t);\n\n\t\t\tapplyUpdate(ydoc, update);\n\t\t});\n\n\t\treturn ydoc;\n\t}\n}\n\nexport const ProsemirrorTransformer = new Prosemirror();\n","import type { Doc } from \"yjs\";\n// @ts-expect-error\nimport type { Extensions } from \"@tiptap/core\";\nimport { getSchema } from \"@tiptap/core\";\nimport { StarterKit } from \"@tiptap/starter-kit\";\nimport type { Transformer } from \"./types.ts\";\nimport { ProsemirrorTransformer } from \"./Prosemirror.ts\";\n\nexport class Tiptap implements Transformer {\n\tdefaultExtensions: Extensions = [StarterKit];\n\n\textensions(extensions: Extensions): Tiptap {\n\t\tthis.defaultExtensions = extensions;\n\n\t\treturn this;\n\t}\n\n\tfromYdoc(document: Doc, fieldName?: string | Array): any {\n\t\treturn ProsemirrorTransformer.fromYdoc(document, fieldName);\n\t}\n\n\ttoYdoc(\n\t\tdocument: any,\n\t\tfieldName: string | Array = \"default\",\n\t\textensions?: Extensions,\n\t): Doc {\n\t\treturn ProsemirrorTransformer.toYdoc(\n\t\t\tdocument,\n\t\t\tfieldName,\n\t\t\tgetSchema(extensions || this.defaultExtensions),\n\t\t);\n\t}\n}\n\nexport const TiptapTransformer = new Tiptap();\n"],"mappings":";;;;;;;;AAMA,IAAM,cAAN,MAAyC;;uBAChB,IAAIA,wBAAO,EAClC,OAAO;GACN,MAAM,EAAE;GACR,KAAK,EAAE,SAAS,SAAS;GACzB,EACD,CAAC;;CAEF,OAAO,QAA6B;AACnC,OAAK,gBAAgB;AAErB,SAAO;;CAGR,SAAS,UAAe,WAAyC;EAChE,MAAM,OAAO,EAAE;AAGf,MAAI,OAAO,cAAc,SACxB,iDAA6B,UAAU,UAAU;AAIlD,MAAI,cAAc,UAAa,UAAU,WAAW,EACnD,aAAY,MAAM,KAAK,SAAS,MAAM,MAAM,CAAC;AAG9C,YAAU,SAAS,UAAU;AAE5B,QAAK,kDAA+B,UAAU,MAAM;IACnD;AAEF,SAAO;;CAGR,OACC,UACA,YAAoC,eACpC,QACM;AACN,MAAI,CAAC,SACJ,OAAM,IAAI,MACT,uIAAuI,WACvI;AAIF,MAAI,OAAO,cAAc,SACxB,iDACC,UAAU,KAAK,eACf,UACA,UACA;EAGF,MAAM,OAAO,IAAIC,SAAK;AAEtB,YAAU,SAAS,UAAU;AAK5B,wBAAY,4EAHW,UAAU,KAAK,eAAe,UAAU,MAAM,CACpE,CAEwB;IACxB;AAEF,SAAO;;;AAIT,MAAa,yBAAyB,IAAI,aAAa;;;;ACnEvD,IAAa,SAAb,MAA2C;;2BACV,CAACC,+BAAW;;CAE5C,WAAW,YAAgC;AAC1C,OAAK,oBAAoB;AAEzB,SAAO;;CAGR,SAAS,UAAe,WAAyC;AAChE,SAAO,uBAAuB,SAAS,UAAU,UAAU;;CAG5D,OACC,UACA,YAAoC,WACpC,YACM;AACN,SAAO,uBAAuB,OAC7B,UACA,uCACU,cAAc,KAAK,kBAAkB,CAC/C;;;AAIH,MAAa,oBAAoB,IAAI,QAAQ"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js deleted file mode 100644 index b864a09..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js +++ /dev/null @@ -1,61 +0,0 @@ -import { Doc, applyUpdate, encodeStateAsUpdate } from "yjs"; -import { prosemirrorJSONToYDoc, yDocToProsemirrorJSON } from "y-prosemirror"; -import { Schema } from "@tiptap/pm/model"; -import { getSchema } from "@tiptap/core"; -import { StarterKit } from "@tiptap/starter-kit"; - -//#region packages/transformer/src/Prosemirror.ts -var Prosemirror = class { - constructor() { - this.defaultSchema = new Schema({ nodes: { - text: {}, - doc: { content: "text*" } - } }); - } - schema(schema) { - this.defaultSchema = schema; - return this; - } - fromYdoc(document, fieldName) { - const data = {}; - if (typeof fieldName === "string") return yDocToProsemirrorJSON(document, fieldName); - if (fieldName === void 0 || fieldName.length === 0) fieldName = Array.from(document.share.keys()); - fieldName.forEach((field) => { - data[field] = yDocToProsemirrorJSON(document, field); - }); - return data; - } - toYdoc(document, fieldName = "prosemirror", schema) { - if (!document) throw new Error(`You’ve passed an empty or invalid document to the Transformer. Make sure to pass ProseMirror-compatible JSON. Actually passed JSON: ${document}`); - if (typeof fieldName === "string") return prosemirrorJSONToYDoc(schema || this.defaultSchema, document, fieldName); - const ydoc = new Doc(); - fieldName.forEach((field) => { - applyUpdate(ydoc, encodeStateAsUpdate(prosemirrorJSONToYDoc(schema || this.defaultSchema, document, field))); - }); - return ydoc; - } -}; -const ProsemirrorTransformer = new Prosemirror(); - -//#endregion -//#region packages/transformer/src/Tiptap.ts -var Tiptap = class { - constructor() { - this.defaultExtensions = [StarterKit]; - } - extensions(extensions) { - this.defaultExtensions = extensions; - return this; - } - fromYdoc(document, fieldName) { - return ProsemirrorTransformer.fromYdoc(document, fieldName); - } - toYdoc(document, fieldName = "default", extensions) { - return ProsemirrorTransformer.toYdoc(document, fieldName, getSchema(extensions || this.defaultExtensions)); - } -}; -const TiptapTransformer = new Tiptap(); - -//#endregion -export { ProsemirrorTransformer, Tiptap, TiptapTransformer }; -//# sourceMappingURL=hocuspocus-transformer.esm.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js.map b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js.map deleted file mode 100644 index 7876193..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/hocuspocus-transformer.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hocuspocus-transformer.esm.js","names":[],"sources":["../src/Prosemirror.ts","../src/Tiptap.ts"],"sourcesContent":["import { Doc, applyUpdate, encodeStateAsUpdate } from \"yjs\";\n// @ts-expect-error\nimport { yDocToProsemirrorJSON, prosemirrorJSONToYDoc } from \"y-prosemirror\";\nimport { Schema } from \"@tiptap/pm/model\";\nimport type { Transformer } from \"./types.ts\";\n\nclass Prosemirror implements Transformer {\n\tdefaultSchema: Schema = new Schema({\n\t\tnodes: {\n\t\t\ttext: {},\n\t\t\tdoc: { content: \"text*\" },\n\t\t},\n\t});\n\n\tschema(schema: Schema): Prosemirror {\n\t\tthis.defaultSchema = schema;\n\n\t\treturn this;\n\t}\n\n\tfromYdoc(document: Doc, fieldName?: string | Array): any {\n\t\tconst data = {};\n\n\t\t// allow a single field name\n\t\tif (typeof fieldName === \"string\") {\n\t\t\treturn yDocToProsemirrorJSON(document, fieldName);\n\t\t}\n\n\t\t// default to all available fields if the given field name is empty\n\t\tif (fieldName === undefined || fieldName.length === 0) {\n\t\t\tfieldName = Array.from(document.share.keys());\n\t\t}\n\n\t\tfieldName.forEach((field) => {\n\t\t\t// @ts-expect-error\n\t\t\tdata[field] = yDocToProsemirrorJSON(document, field);\n\t\t});\n\n\t\treturn data;\n\t}\n\n\ttoYdoc(\n\t\tdocument: any,\n\t\tfieldName: string | Array = \"prosemirror\",\n\t\tschema?: Schema,\n\t): Doc {\n\t\tif (!document) {\n\t\t\tthrow new Error(\n\t\t\t\t`You’ve passed an empty or invalid document to the Transformer. Make sure to pass ProseMirror-compatible JSON. Actually passed JSON: ${document}`,\n\t\t\t);\n\t\t}\n\n\t\t// allow a single field name\n\t\tif (typeof fieldName === \"string\") {\n\t\t\treturn prosemirrorJSONToYDoc(\n\t\t\t\tschema || this.defaultSchema,\n\t\t\t\tdocument,\n\t\t\t\tfieldName,\n\t\t\t);\n\t\t}\n\n\t\tconst ydoc = new Doc();\n\n\t\tfieldName.forEach((field) => {\n\t\t\tconst update = encodeStateAsUpdate(\n\t\t\t\tprosemirrorJSONToYDoc(schema || this.defaultSchema, document, field),\n\t\t\t);\n\n\t\t\tapplyUpdate(ydoc, update);\n\t\t});\n\n\t\treturn ydoc;\n\t}\n}\n\nexport const ProsemirrorTransformer = new Prosemirror();\n","import type { Doc } from \"yjs\";\n// @ts-expect-error\nimport type { Extensions } from \"@tiptap/core\";\nimport { getSchema } from \"@tiptap/core\";\nimport { StarterKit } from \"@tiptap/starter-kit\";\nimport type { Transformer } from \"./types.ts\";\nimport { ProsemirrorTransformer } from \"./Prosemirror.ts\";\n\nexport class Tiptap implements Transformer {\n\tdefaultExtensions: Extensions = [StarterKit];\n\n\textensions(extensions: Extensions): Tiptap {\n\t\tthis.defaultExtensions = extensions;\n\n\t\treturn this;\n\t}\n\n\tfromYdoc(document: Doc, fieldName?: string | Array): any {\n\t\treturn ProsemirrorTransformer.fromYdoc(document, fieldName);\n\t}\n\n\ttoYdoc(\n\t\tdocument: any,\n\t\tfieldName: string | Array = \"default\",\n\t\textensions?: Extensions,\n\t): Doc {\n\t\treturn ProsemirrorTransformer.toYdoc(\n\t\t\tdocument,\n\t\t\tfieldName,\n\t\t\tgetSchema(extensions || this.defaultExtensions),\n\t\t);\n\t}\n}\n\nexport const TiptapTransformer = new Tiptap();\n"],"mappings":";;;;;;;AAMA,IAAM,cAAN,MAAyC;;uBAChB,IAAI,OAAO,EAClC,OAAO;GACN,MAAM,EAAE;GACR,KAAK,EAAE,SAAS,SAAS;GACzB,EACD,CAAC;;CAEF,OAAO,QAA6B;AACnC,OAAK,gBAAgB;AAErB,SAAO;;CAGR,SAAS,UAAe,WAAyC;EAChE,MAAM,OAAO,EAAE;AAGf,MAAI,OAAO,cAAc,SACxB,QAAO,sBAAsB,UAAU,UAAU;AAIlD,MAAI,cAAc,UAAa,UAAU,WAAW,EACnD,aAAY,MAAM,KAAK,SAAS,MAAM,MAAM,CAAC;AAG9C,YAAU,SAAS,UAAU;AAE5B,QAAK,SAAS,sBAAsB,UAAU,MAAM;IACnD;AAEF,SAAO;;CAGR,OACC,UACA,YAAoC,eACpC,QACM;AACN,MAAI,CAAC,SACJ,OAAM,IAAI,MACT,uIAAuI,WACvI;AAIF,MAAI,OAAO,cAAc,SACxB,QAAO,sBACN,UAAU,KAAK,eACf,UACA,UACA;EAGF,MAAM,OAAO,IAAI,KAAK;AAEtB,YAAU,SAAS,UAAU;AAK5B,eAAY,MAJG,oBACd,sBAAsB,UAAU,KAAK,eAAe,UAAU,MAAM,CACpE,CAEwB;IACxB;AAEF,SAAO;;;AAIT,MAAa,yBAAyB,IAAI,aAAa;;;;ACnEvD,IAAa,SAAb,MAA2C;;2BACV,CAAC,WAAW;;CAE5C,WAAW,YAAgC;AAC1C,OAAK,oBAAoB;AAEzB,SAAO;;CAGR,SAAS,UAAe,WAAyC;AAChE,SAAO,uBAAuB,SAAS,UAAU,UAAU;;CAG5D,OACC,UACA,YAAoC,WACpC,YACM;AACN,SAAO,uBAAuB,OAC7B,UACA,WACA,UAAU,cAAc,KAAK,kBAAkB,CAC/C;;;AAIH,MAAa,oBAAoB,IAAI,QAAQ"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/index.d.ts deleted file mode 100644 index fc8b282..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/dist/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Doc } from "yjs"; -import { Schema } from "@tiptap/pm/model"; -import { Extensions } from "@tiptap/core"; - -//#region packages/transformer/src/types.d.ts -interface Transformer { - fromYdoc: (document: Doc, fieldName?: string | Array) => any; - toYdoc: (document: any, fieldName: string) => Doc; -} -//#endregion -//#region packages/transformer/src/Prosemirror.d.ts -declare class Prosemirror implements Transformer { - defaultSchema: Schema; - schema(schema: Schema): Prosemirror; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, schema?: Schema): Doc; -} -declare const ProsemirrorTransformer: Prosemirror; -//#endregion -//#region packages/transformer/src/Tiptap.d.ts -declare class Tiptap implements Transformer { - defaultExtensions: Extensions; - extensions(extensions: Extensions): Tiptap; - fromYdoc(document: Doc, fieldName?: string | Array): any; - toYdoc(document: any, fieldName?: string | Array, extensions?: Extensions): Doc; -} -declare const TiptapTransformer: Tiptap; -//#endregion -export { ProsemirrorTransformer, Tiptap, TiptapTransformer, Transformer }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/package.json b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/package.json deleted file mode 100644 index a4ea8b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "@hocuspocus/transformer", - "version": "4.1.0", - "description": "hocuspocus transformation utilities", - "homepage": "https://hocuspocus.dev", - "keywords": [ - "hocuspocus", - "transformer", - "yjs" - ], - "license": "MIT", - "type": "module", - "main": "dist/hocuspocus-transformer.cjs", - "module": "dist/hocuspocus-transformer.esm.js", - "types": "dist/index.d.ts", - "exports": { - "source": { - "import": "./src/index.ts" - }, - "default": { - "import": "./dist/hocuspocus-transformer.esm.js", - "require": "./dist/hocuspocus-transformer.cjs", - "types": "./dist/index.d.ts" - } - }, - "files": [ - "src", - "dist" - ], - "dependencies": { - "@tiptap/starter-kit": "^3.0.1" - }, - "peerDependencies": { - "@tiptap/core": "^3.0.1", - "@tiptap/pm": "^3.0.1", - "y-prosemirror": "^1.2.1", - "yjs": "^13.6.8" - }, - "devDependencies": { - "@tiptap/pm": "^3.0.1" - }, - "gitHead": "702ec724b099264467c7fafa854a3988c7314ff9", - "repository": { - "url": "https://github.com/ueberdosis/hocuspocus" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/Prosemirror.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/Prosemirror.ts deleted file mode 100644 index 2c21dfa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/Prosemirror.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Doc, applyUpdate, encodeStateAsUpdate } from "yjs"; -// @ts-expect-error -import { yDocToProsemirrorJSON, prosemirrorJSONToYDoc } from "y-prosemirror"; -import { Schema } from "@tiptap/pm/model"; -import type { Transformer } from "./types.ts"; - -class Prosemirror implements Transformer { - defaultSchema: Schema = new Schema({ - nodes: { - text: {}, - doc: { content: "text*" }, - }, - }); - - schema(schema: Schema): Prosemirror { - this.defaultSchema = schema; - - return this; - } - - fromYdoc(document: Doc, fieldName?: string | Array): any { - const data = {}; - - // allow a single field name - if (typeof fieldName === "string") { - return yDocToProsemirrorJSON(document, fieldName); - } - - // default to all available fields if the given field name is empty - if (fieldName === undefined || fieldName.length === 0) { - fieldName = Array.from(document.share.keys()); - } - - fieldName.forEach((field) => { - // @ts-expect-error - data[field] = yDocToProsemirrorJSON(document, field); - }); - - return data; - } - - toYdoc( - document: any, - fieldName: string | Array = "prosemirror", - schema?: Schema, - ): Doc { - if (!document) { - throw new Error( - `You’ve passed an empty or invalid document to the Transformer. Make sure to pass ProseMirror-compatible JSON. Actually passed JSON: ${document}`, - ); - } - - // allow a single field name - if (typeof fieldName === "string") { - return prosemirrorJSONToYDoc( - schema || this.defaultSchema, - document, - fieldName, - ); - } - - const ydoc = new Doc(); - - fieldName.forEach((field) => { - const update = encodeStateAsUpdate( - prosemirrorJSONToYDoc(schema || this.defaultSchema, document, field), - ); - - applyUpdate(ydoc, update); - }); - - return ydoc; - } -} - -export const ProsemirrorTransformer = new Prosemirror(); diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/Tiptap.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/Tiptap.ts deleted file mode 100644 index 2a44013..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/Tiptap.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { Doc } from "yjs"; -// @ts-expect-error -import type { Extensions } from "@tiptap/core"; -import { getSchema } from "@tiptap/core"; -import { StarterKit } from "@tiptap/starter-kit"; -import type { Transformer } from "./types.ts"; -import { ProsemirrorTransformer } from "./Prosemirror.ts"; - -export class Tiptap implements Transformer { - defaultExtensions: Extensions = [StarterKit]; - - extensions(extensions: Extensions): Tiptap { - this.defaultExtensions = extensions; - - return this; - } - - fromYdoc(document: Doc, fieldName?: string | Array): any { - return ProsemirrorTransformer.fromYdoc(document, fieldName); - } - - toYdoc( - document: any, - fieldName: string | Array = "default", - extensions?: Extensions, - ): Doc { - return ProsemirrorTransformer.toYdoc( - document, - fieldName, - getSchema(extensions || this.defaultExtensions), - ); - } -} - -export const TiptapTransformer = new Tiptap(); diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/index.ts deleted file mode 100644 index a8debe5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./Prosemirror.ts"; -export * from "./Tiptap.ts"; -export * from "./types.ts"; diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/types.ts b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/types.ts deleted file mode 100644 index 1d5fe9a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@hocuspocus/transformer/src/types.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Doc } from "yjs"; - -export interface Transformer { - fromYdoc: (document: Doc, fieldName?: string | Array) => any; - toYdoc: (document: any, fieldName: string) => Doc; -} diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/pm b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/pm deleted file mode 120000 index f877560..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/pm +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+pm@3.26.0/node_modules/@tiptap/pm \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/starter-kit b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/starter-kit deleted file mode 120000 index 49c64f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/@tiptap/starter-kit +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/y-prosemirror b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/y-prosemirror deleted file mode 120000 index 21d9bad..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/y-prosemirror +++ /dev/null @@ -1 +0,0 @@ -../../y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/yjs b/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/yjs deleted file mode 120000 index c3bb19e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@hocuspocus+transformer@4.1.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0__3677136c53fd824df02aa71734c95d40/node_modules/yjs +++ /dev/null @@ -1 +0,0 @@ -../../yjs@13.6.31/node_modules/yjs \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@gar/promisify b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@gar/promisify deleted file mode 120000 index 38c1714..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@gar/promisify +++ /dev/null @@ -1 +0,0 @@ -../../../@gar+promisify@1.1.3/node_modules/@gar/promisify \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/LICENSE.md deleted file mode 100644 index 5fc208f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ - - -ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/README.md b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/README.md deleted file mode 100644 index bc71a11..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# @npmcli/fs - -polyfills, and extensions, of the core `fs` module. - -## Features - -- all exposed functions return promises -- `fs.rm` polyfill for node versions < 14.14.0 -- `fs.mkdir` polyfill adding support for the `recursive` and `force` options in node versions < 10.12.0 -- `fs.copyFile` extended to accept an `owner` option -- `fs.mkdir` extended to accept an `owner` option -- `fs.mkdtemp` extended to accept an `owner` option -- `fs.writeFile` extended to accept an `owner` option -- `fs.withTempDir` added -- `fs.cp` polyfill for node < 16.7.0 - -## The `owner` option - -The `copyFile`, `mkdir`, `mkdtemp`, `writeFile`, and `withTempDir` functions -all accept a new `owner` property in their options. It can be used in two ways: - -- `{ owner: { uid: 100, gid: 100 } }` - set the `uid` and `gid` explicitly -- `{ owner: 100 }` - use one value, will set both `uid` and `gid` the same - -The special string `'inherit'` may be passed instead of a number, which will -cause this module to automatically determine the correct `uid` and/or `gid` -from the nearest existing parent directory of the target. - -## `fs.withTempDir(root, fn, options) -> Promise` - -### Parameters - -- `root`: the directory in which to create the temporary directory -- `fn`: a function that will be called with the path to the temporary directory -- `options` - - `tmpPrefix`: a prefix to be used in the generated directory name - -### Usage - -The `withTempDir` function creates a temporary directory, runs the provided -function (`fn`), then removes the temporary directory and resolves or rejects -based on the result of `fn`. - -```js -const fs = require('@npmcli/fs') -const os = require('os') - -// this function will be called with the full path to the temporary directory -// it is called with `await` behind the scenes, so can be async if desired. -const myFunction = async (tempPath) => { - return 'done!' -} - -const main = async () => { - const result = await fs.withTempDir(os.tmpdir(), myFunction) - // result === 'done!' -} - -main() -``` diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js deleted file mode 100644 index 7755d1c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js +++ /dev/null @@ -1,17 +0,0 @@ -const url = require('url') - -const node = require('../node.js') -const polyfill = require('./polyfill.js') - -const useNative = node.satisfies('>=10.12.0') - -const fileURLToPath = (path) => { - // the polyfill is tested separately from this module, no need to hack - // process.version to try to trigger it just for coverage - // istanbul ignore next - return useNative - ? url.fileURLToPath(path) - : polyfill(path) -} - -module.exports = fileURLToPath diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/file-url-to-path/polyfill.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/file-url-to-path/polyfill.js deleted file mode 100644 index 6cc90f0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/file-url-to-path/polyfill.js +++ /dev/null @@ -1,121 +0,0 @@ -const { URL, domainToUnicode } = require('url') - -const CHAR_LOWERCASE_A = 97 -const CHAR_LOWERCASE_Z = 122 - -const isWindows = process.platform === 'win32' - -class ERR_INVALID_FILE_URL_HOST extends TypeError { - constructor (platform) { - super(`File URL host must be "localhost" or empty on ${platform}`) - this.code = 'ERR_INVALID_FILE_URL_HOST' - } - - toString () { - return `${this.name} [${this.code}]: ${this.message}` - } -} - -class ERR_INVALID_FILE_URL_PATH extends TypeError { - constructor (msg) { - super(`File URL path ${msg}`) - this.code = 'ERR_INVALID_FILE_URL_PATH' - } - - toString () { - return `${this.name} [${this.code}]: ${this.message}` - } -} - -class ERR_INVALID_ARG_TYPE extends TypeError { - constructor (name, actual) { - super(`The "${name}" argument must be one of type string or an instance ` + - `of URL. Received type ${typeof actual} ${actual}`) - this.code = 'ERR_INVALID_ARG_TYPE' - } - - toString () { - return `${this.name} [${this.code}]: ${this.message}` - } -} - -class ERR_INVALID_URL_SCHEME extends TypeError { - constructor (expected) { - super(`The URL must be of scheme ${expected}`) - this.code = 'ERR_INVALID_URL_SCHEME' - } - - toString () { - return `${this.name} [${this.code}]: ${this.message}` - } -} - -const isURLInstance = (input) => { - return input != null && input.href && input.origin -} - -const getPathFromURLWin32 = (url) => { - const hostname = url.hostname - let pathname = url.pathname - for (let n = 0; n < pathname.length; n++) { - if (pathname[n] === '%') { - const third = pathname.codePointAt(n + 2) | 0x20 - if ((pathname[n + 1] === '2' && third === 102) || - (pathname[n + 1] === '5' && third === 99)) { - throw new ERR_INVALID_FILE_URL_PATH('must not include encoded \\ or / characters') - } - } - } - - pathname = pathname.replace(/\//g, '\\') - pathname = decodeURIComponent(pathname) - if (hostname !== '') { - return `\\\\${domainToUnicode(hostname)}${pathname}` - } - - const letter = pathname.codePointAt(1) | 0x20 - const sep = pathname[2] - if (letter < CHAR_LOWERCASE_A || letter > CHAR_LOWERCASE_Z || - (sep !== ':')) { - throw new ERR_INVALID_FILE_URL_PATH('must be absolute') - } - - return pathname.slice(1) -} - -const getPathFromURLPosix = (url) => { - if (url.hostname !== '') { - throw new ERR_INVALID_FILE_URL_HOST(process.platform) - } - - const pathname = url.pathname - - for (let n = 0; n < pathname.length; n++) { - if (pathname[n] === '%') { - const third = pathname.codePointAt(n + 2) | 0x20 - if (pathname[n + 1] === '2' && third === 102) { - throw new ERR_INVALID_FILE_URL_PATH('must not include encoded / characters') - } - } - } - - return decodeURIComponent(pathname) -} - -const fileURLToPath = (path) => { - if (typeof path === 'string') { - path = new URL(path) - } else if (!isURLInstance(path)) { - throw new ERR_INVALID_ARG_TYPE('path', ['string', 'URL'], path) - } - - if (path.protocol !== 'file:') { - throw new ERR_INVALID_URL_SCHEME('file') - } - - return isWindows - ? getPathFromURLWin32(path) - : getPathFromURLPosix(path) -} - -module.exports = fileURLToPath diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/get-options.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/get-options.js deleted file mode 100644 index cb5982f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/get-options.js +++ /dev/null @@ -1,20 +0,0 @@ -// given an input that may or may not be an object, return an object that has -// a copy of every defined property listed in 'copy'. if the input is not an -// object, assign it to the property named by 'wrap' -const getOptions = (input, { copy, wrap }) => { - const result = {} - - if (input && typeof input === 'object') { - for (const prop of copy) { - if (input[prop] !== undefined) { - result[prop] = input[prop] - } - } - } else { - result[wrap] = input - } - - return result -} - -module.exports = getOptions diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/node.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/node.js deleted file mode 100644 index 4d13bc0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/node.js +++ /dev/null @@ -1,9 +0,0 @@ -const semver = require('semver') - -const satisfies = (range) => { - return semver.satisfies(process.version, range, { includePrerelease: true }) -} - -module.exports = { - satisfies, -} diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/owner.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/owner.js deleted file mode 100644 index e3468b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/common/owner.js +++ /dev/null @@ -1,92 +0,0 @@ -const { dirname, resolve } = require('path') - -const fileURLToPath = require('./file-url-to-path/index.js') -const fs = require('../fs.js') - -// given a path, find the owner of the nearest parent -const find = async (path) => { - // if we have no getuid, permissions are irrelevant on this platform - if (!process.getuid) { - return {} - } - - // fs methods accept URL objects with a scheme of file: so we need to unwrap - // those into an actual path string before we can resolve it - const resolved = path != null && path.href && path.origin - ? resolve(fileURLToPath(path)) - : resolve(path) - - let stat - - try { - stat = await fs.lstat(resolved) - } finally { - // if we got a stat, return its contents - if (stat) { - return { uid: stat.uid, gid: stat.gid } - } - - // try the parent directory - if (resolved !== dirname(resolved)) { - return find(dirname(resolved)) - } - - // no more parents, never got a stat, just return an empty object - return {} - } -} - -// given a path, uid, and gid update the ownership of the path if necessary -const update = async (path, uid, gid) => { - // nothing to update, just exit - if (uid === undefined && gid === undefined) { - return - } - - try { - // see if the permissions are already the same, if they are we don't - // need to do anything, so return early - const stat = await fs.stat(path) - if (uid === stat.uid && gid === stat.gid) { - return - } - } catch (err) {} - - try { - await fs.chown(path, uid, gid) - } catch (err) {} -} - -// accepts a `path` and the `owner` property of an options object and normalizes -// it into an object with numerical `uid` and `gid` -const validate = async (path, input) => { - let uid - let gid - - if (typeof input === 'string' || typeof input === 'number') { - uid = input - gid = input - } else if (input && typeof input === 'object') { - uid = input.uid - gid = input.gid - } - - if (uid === 'inherit' || gid === 'inherit') { - const owner = await find(path) - if (uid === 'inherit') { - uid = owner.uid - } - - if (gid === 'inherit') { - gid = owner.gid - } - } - - return { uid, gid } -} - -module.exports = { - find, - update, - validate, -} diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/copy-file.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/copy-file.js deleted file mode 100644 index d9875ab..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/copy-file.js +++ /dev/null @@ -1,22 +0,0 @@ -const fs = require('./fs.js') -const getOptions = require('./common/get-options.js') -const owner = require('./common/owner.js') - -const copyFile = async (src, dest, opts) => { - const options = getOptions(opts, { - copy: ['mode', 'owner'], - wrap: 'mode', - }) - - const { uid, gid } = await owner.validate(dest, options.owner) - - // the node core method as of 16.5.0 does not support the mode being in an - // object, so we have to pass the mode value directly - const result = await fs.copyFile(src, dest, options.mode) - - await owner.update(dest, uid, gid) - - return result -} - -module.exports = copyFile diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/LICENSE b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/LICENSE deleted file mode 100644 index 93546df..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -(The MIT License) - -Copyright (c) 2011-2017 JP Richardson - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files -(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/index.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/index.js deleted file mode 100644 index 5da4739..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/index.js +++ /dev/null @@ -1,22 +0,0 @@ -const fs = require('../fs.js') -const getOptions = require('../common/get-options.js') -const node = require('../common/node.js') -const polyfill = require('./polyfill.js') - -// node 16.7.0 added fs.cp -const useNative = node.satisfies('>=16.7.0') - -const cp = async (src, dest, opts) => { - const options = getOptions(opts, { - copy: ['dereference', 'errorOnExist', 'filter', 'force', 'preserveTimestamps', 'recursive'], - }) - - // the polyfill is tested separately from this module, no need to hack - // process.version to try to trigger it just for coverage - // istanbul ignore next - return useNative - ? fs.cp(src, dest, options) - : polyfill(src, dest, options) -} - -module.exports = cp diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/polyfill.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/polyfill.js deleted file mode 100644 index f83ccbf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/cp/polyfill.js +++ /dev/null @@ -1,428 +0,0 @@ -// this file is a modified version of the code in node 17.2.0 -// which is, in turn, a modified version of the fs-extra module on npm -// node core changes: -// - Use of the assert module has been replaced with core's error system. -// - All code related to the glob dependency has been removed. -// - Bring your own custom fs module is not currently supported. -// - Some basic code cleanup. -// changes here: -// - remove all callback related code -// - drop sync support -// - change assertions back to non-internal methods (see options.js) -// - throws ENOTDIR when rmdir gets an ENOENT for a path that exists in Windows -'use strict' - -const { - ERR_FS_CP_DIR_TO_NON_DIR, - ERR_FS_CP_EEXIST, - ERR_FS_CP_EINVAL, - ERR_FS_CP_FIFO_PIPE, - ERR_FS_CP_NON_DIR_TO_DIR, - ERR_FS_CP_SOCKET, - ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY, - ERR_FS_CP_UNKNOWN, - ERR_FS_EISDIR, - ERR_INVALID_ARG_TYPE, -} = require('../errors.js') -const { - constants: { - errno: { - EEXIST, - EISDIR, - EINVAL, - ENOTDIR, - }, - }, -} = require('os') -const { - chmod, - copyFile, - lstat, - mkdir, - readdir, - readlink, - stat, - symlink, - unlink, - utimes, -} = require('../fs.js') -const { - dirname, - isAbsolute, - join, - parse, - resolve, - sep, - toNamespacedPath, -} = require('path') -const { fileURLToPath } = require('url') - -const defaultOptions = { - dereference: false, - errorOnExist: false, - filter: undefined, - force: true, - preserveTimestamps: false, - recursive: false, -} - -async function cp (src, dest, opts) { - if (opts != null && typeof opts !== 'object') { - throw new ERR_INVALID_ARG_TYPE('options', ['Object'], opts) - } - return cpFn( - toNamespacedPath(getValidatedPath(src)), - toNamespacedPath(getValidatedPath(dest)), - { ...defaultOptions, ...opts }) -} - -function getValidatedPath (fileURLOrPath) { - const path = fileURLOrPath != null && fileURLOrPath.href - && fileURLOrPath.origin - ? fileURLToPath(fileURLOrPath) - : fileURLOrPath - return path -} - -async function cpFn (src, dest, opts) { - // Warn about using preserveTimestamps on 32-bit node - // istanbul ignore next - if (opts.preserveTimestamps && process.arch === 'ia32') { - const warning = 'Using the preserveTimestamps option in 32-bit ' + - 'node is not recommended' - process.emitWarning(warning, 'TimestampPrecisionWarning') - } - const stats = await checkPaths(src, dest, opts) - const { srcStat, destStat } = stats - await checkParentPaths(src, srcStat, dest) - if (opts.filter) { - return handleFilter(checkParentDir, destStat, src, dest, opts) - } - return checkParentDir(destStat, src, dest, opts) -} - -async function checkPaths (src, dest, opts) { - const { 0: srcStat, 1: destStat } = await getStats(src, dest, opts) - if (destStat) { - if (areIdentical(srcStat, destStat)) { - throw new ERR_FS_CP_EINVAL({ - message: 'src and dest cannot be the same', - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - if (srcStat.isDirectory() && !destStat.isDirectory()) { - throw new ERR_FS_CP_DIR_TO_NON_DIR({ - message: `cannot overwrite directory ${src} ` + - `with non-directory ${dest}`, - path: dest, - syscall: 'cp', - errno: EISDIR, - }) - } - if (!srcStat.isDirectory() && destStat.isDirectory()) { - throw new ERR_FS_CP_NON_DIR_TO_DIR({ - message: `cannot overwrite non-directory ${src} ` + - `with directory ${dest}`, - path: dest, - syscall: 'cp', - errno: ENOTDIR, - }) - } - } - - if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { - throw new ERR_FS_CP_EINVAL({ - message: `cannot copy ${src} to a subdirectory of self ${dest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - return { srcStat, destStat } -} - -function areIdentical (srcStat, destStat) { - return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && - destStat.dev === srcStat.dev -} - -function getStats (src, dest, opts) { - const statFunc = opts.dereference ? - (file) => stat(file, { bigint: true }) : - (file) => lstat(file, { bigint: true }) - return Promise.all([ - statFunc(src), - statFunc(dest).catch((err) => { - // istanbul ignore next: unsure how to cover. - if (err.code === 'ENOENT') { - return null - } - // istanbul ignore next: unsure how to cover. - throw err - }), - ]) -} - -async function checkParentDir (destStat, src, dest, opts) { - const destParent = dirname(dest) - const dirExists = await pathExists(destParent) - if (dirExists) { - return getStatsForCopy(destStat, src, dest, opts) - } - await mkdir(destParent, { recursive: true }) - return getStatsForCopy(destStat, src, dest, opts) -} - -function pathExists (dest) { - return stat(dest).then( - () => true, - // istanbul ignore next: not sure when this would occur - (err) => (err.code === 'ENOENT' ? false : Promise.reject(err))) -} - -// Recursively check if dest parent is a subdirectory of src. -// It works for all file types including symlinks since it -// checks the src and dest inodes. It starts from the deepest -// parent and stops once it reaches the src parent or the root path. -async function checkParentPaths (src, srcStat, dest) { - const srcParent = resolve(dirname(src)) - const destParent = resolve(dirname(dest)) - if (destParent === srcParent || destParent === parse(destParent).root) { - return - } - let destStat - try { - destStat = await stat(destParent, { bigint: true }) - } catch (err) { - // istanbul ignore else: not sure when this would occur - if (err.code === 'ENOENT') { - return - } - // istanbul ignore next: not sure when this would occur - throw err - } - if (areIdentical(srcStat, destStat)) { - throw new ERR_FS_CP_EINVAL({ - message: `cannot copy ${src} to a subdirectory of self ${dest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - return checkParentPaths(src, srcStat, destParent) -} - -const normalizePathToArray = (path) => - resolve(path).split(sep).filter(Boolean) - -// Return true if dest is a subdir of src, otherwise false. -// It only checks the path strings. -function isSrcSubdir (src, dest) { - const srcArr = normalizePathToArray(src) - const destArr = normalizePathToArray(dest) - return srcArr.every((cur, i) => destArr[i] === cur) -} - -async function handleFilter (onInclude, destStat, src, dest, opts, cb) { - const include = await opts.filter(src, dest) - if (include) { - return onInclude(destStat, src, dest, opts, cb) - } -} - -function startCopy (destStat, src, dest, opts) { - if (opts.filter) { - return handleFilter(getStatsForCopy, destStat, src, dest, opts) - } - return getStatsForCopy(destStat, src, dest, opts) -} - -async function getStatsForCopy (destStat, src, dest, opts) { - const statFn = opts.dereference ? stat : lstat - const srcStat = await statFn(src) - // istanbul ignore else: can't portably test FIFO - if (srcStat.isDirectory() && opts.recursive) { - return onDir(srcStat, destStat, src, dest, opts) - } else if (srcStat.isDirectory()) { - throw new ERR_FS_EISDIR({ - message: `${src} is a directory (not copied)`, - path: src, - syscall: 'cp', - errno: EINVAL, - }) - } else if (srcStat.isFile() || - srcStat.isCharacterDevice() || - srcStat.isBlockDevice()) { - return onFile(srcStat, destStat, src, dest, opts) - } else if (srcStat.isSymbolicLink()) { - return onLink(destStat, src, dest) - } else if (srcStat.isSocket()) { - throw new ERR_FS_CP_SOCKET({ - message: `cannot copy a socket file: ${dest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } else if (srcStat.isFIFO()) { - throw new ERR_FS_CP_FIFO_PIPE({ - message: `cannot copy a FIFO pipe: ${dest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - // istanbul ignore next: should be unreachable - throw new ERR_FS_CP_UNKNOWN({ - message: `cannot copy an unknown file type: ${dest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) -} - -function onFile (srcStat, destStat, src, dest, opts) { - if (!destStat) { - return _copyFile(srcStat, src, dest, opts) - } - return mayCopyFile(srcStat, src, dest, opts) -} - -async function mayCopyFile (srcStat, src, dest, opts) { - if (opts.force) { - await unlink(dest) - return _copyFile(srcStat, src, dest, opts) - } else if (opts.errorOnExist) { - throw new ERR_FS_CP_EEXIST({ - message: `${dest} already exists`, - path: dest, - syscall: 'cp', - errno: EEXIST, - }) - } -} - -async function _copyFile (srcStat, src, dest, opts) { - await copyFile(src, dest) - if (opts.preserveTimestamps) { - return handleTimestampsAndMode(srcStat.mode, src, dest) - } - return setDestMode(dest, srcStat.mode) -} - -async function handleTimestampsAndMode (srcMode, src, dest) { - // Make sure the file is writable before setting the timestamp - // otherwise open fails with EPERM when invoked with 'r+' - // (through utimes call) - if (fileIsNotWritable(srcMode)) { - await makeFileWritable(dest, srcMode) - return setDestTimestampsAndMode(srcMode, src, dest) - } - return setDestTimestampsAndMode(srcMode, src, dest) -} - -function fileIsNotWritable (srcMode) { - return (srcMode & 0o200) === 0 -} - -function makeFileWritable (dest, srcMode) { - return setDestMode(dest, srcMode | 0o200) -} - -async function setDestTimestampsAndMode (srcMode, src, dest) { - await setDestTimestamps(src, dest) - return setDestMode(dest, srcMode) -} - -function setDestMode (dest, srcMode) { - return chmod(dest, srcMode) -} - -async function setDestTimestamps (src, dest) { - // The initial srcStat.atime cannot be trusted - // because it is modified by the read(2) system call - // (See https://nodejs.org/api/fs.html#fs_stat_time_values) - const updatedSrcStat = await stat(src) - return utimes(dest, updatedSrcStat.atime, updatedSrcStat.mtime) -} - -function onDir (srcStat, destStat, src, dest, opts) { - if (!destStat) { - return mkDirAndCopy(srcStat.mode, src, dest, opts) - } - return copyDir(src, dest, opts) -} - -async function mkDirAndCopy (srcMode, src, dest, opts) { - await mkdir(dest) - await copyDir(src, dest, opts) - return setDestMode(dest, srcMode) -} - -async function copyDir (src, dest, opts) { - const dir = await readdir(src) - for (let i = 0; i < dir.length; i++) { - const item = dir[i] - const srcItem = join(src, item) - const destItem = join(dest, item) - const { destStat } = await checkPaths(srcItem, destItem, opts) - await startCopy(destStat, srcItem, destItem, opts) - } -} - -async function onLink (destStat, src, dest) { - let resolvedSrc = await readlink(src) - if (!isAbsolute(resolvedSrc)) { - resolvedSrc = resolve(dirname(src), resolvedSrc) - } - if (!destStat) { - return symlink(resolvedSrc, dest) - } - let resolvedDest - try { - resolvedDest = await readlink(dest) - } catch (err) { - // Dest exists and is a regular file or directory, - // Windows may throw UNKNOWN error. If dest already exists, - // fs throws error anyway, so no need to guard against it here. - // istanbul ignore next: can only test on windows - if (err.code === 'EINVAL' || err.code === 'UNKNOWN') { - return symlink(resolvedSrc, dest) - } - // istanbul ignore next: should not be possible - throw err - } - if (!isAbsolute(resolvedDest)) { - resolvedDest = resolve(dirname(dest), resolvedDest) - } - if (isSrcSubdir(resolvedSrc, resolvedDest)) { - throw new ERR_FS_CP_EINVAL({ - message: `cannot copy ${resolvedSrc} to a subdirectory of self ` + - `${resolvedDest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - // Do not copy if src is a subdir of dest since unlinking - // dest in this case would result in removing src contents - // and therefore a broken symlink would be created. - const srcStat = await stat(src) - if (srcStat.isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) { - throw new ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY({ - message: `cannot overwrite ${resolvedDest} with ${resolvedSrc}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - return copyLink(resolvedSrc, dest) -} - -async function copyLink (resolvedSrc, dest) { - await unlink(dest) - return symlink(resolvedSrc, dest) -} - -module.exports = cp diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/errors.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/errors.js deleted file mode 100644 index 1cd1e05..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/errors.js +++ /dev/null @@ -1,129 +0,0 @@ -'use strict' -const { inspect } = require('util') - -// adapted from node's internal/errors -// https://github.com/nodejs/node/blob/c8a04049/lib/internal/errors.js - -// close copy of node's internal SystemError class. -class SystemError { - constructor (code, prefix, context) { - // XXX context.code is undefined in all constructors used in cp/polyfill - // that may be a bug copied from node, maybe the constructor should use - // `code` not `errno`? nodejs/node#41104 - let message = `${prefix}: ${context.syscall} returned ` + - `${context.code} (${context.message})` - - if (context.path !== undefined) { - message += ` ${context.path}` - } - if (context.dest !== undefined) { - message += ` => ${context.dest}` - } - - this.code = code - Object.defineProperties(this, { - name: { - value: 'SystemError', - enumerable: false, - writable: true, - configurable: true, - }, - message: { - value: message, - enumerable: false, - writable: true, - configurable: true, - }, - info: { - value: context, - enumerable: true, - configurable: true, - writable: false, - }, - errno: { - get () { - return context.errno - }, - set (value) { - context.errno = value - }, - enumerable: true, - configurable: true, - }, - syscall: { - get () { - return context.syscall - }, - set (value) { - context.syscall = value - }, - enumerable: true, - configurable: true, - }, - }) - - if (context.path !== undefined) { - Object.defineProperty(this, 'path', { - get () { - return context.path - }, - set (value) { - context.path = value - }, - enumerable: true, - configurable: true, - }) - } - - if (context.dest !== undefined) { - Object.defineProperty(this, 'dest', { - get () { - return context.dest - }, - set (value) { - context.dest = value - }, - enumerable: true, - configurable: true, - }) - } - } - - toString () { - return `${this.name} [${this.code}]: ${this.message}` - } - - [Symbol.for('nodejs.util.inspect.custom')] (_recurseTimes, ctx) { - return inspect(this, { - ...ctx, - getters: true, - customInspect: false, - }) - } -} - -function E (code, message) { - module.exports[code] = class NodeError extends SystemError { - constructor (ctx) { - super(code, message, ctx) - } - } -} - -E('ERR_FS_CP_DIR_TO_NON_DIR', 'Cannot overwrite directory with non-directory') -E('ERR_FS_CP_EEXIST', 'Target already exists') -E('ERR_FS_CP_EINVAL', 'Invalid src or dest') -E('ERR_FS_CP_FIFO_PIPE', 'Cannot copy a FIFO pipe') -E('ERR_FS_CP_NON_DIR_TO_DIR', 'Cannot overwrite non-directory with directory') -E('ERR_FS_CP_SOCKET', 'Cannot copy a socket file') -E('ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY', 'Cannot overwrite symlink in subdirectory of self') -E('ERR_FS_CP_UNKNOWN', 'Cannot copy an unknown file type') -E('ERR_FS_EISDIR', 'Path is a directory') - -module.exports.ERR_INVALID_ARG_TYPE = class ERR_INVALID_ARG_TYPE extends Error { - constructor (name, expected, actual) { - super() - this.code = 'ERR_INVALID_ARG_TYPE' - this.message = `The ${name} argument must be ${expected}. Received ${typeof actual}` - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/fs.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/fs.js deleted file mode 100644 index 29e5fb5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/fs.js +++ /dev/null @@ -1,8 +0,0 @@ -const fs = require('fs') -const promisify = require('@gar/promisify') - -// this module returns the core fs module wrapped in a proxy that promisifies -// method calls within the getter. we keep it in a separate module so that the -// overridden methods have a consistent way to get to promisified fs methods -// without creating a circular dependency -module.exports = promisify(fs) diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/index.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/index.js deleted file mode 100644 index e40d748..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/index.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - ...require('./fs.js'), - copyFile: require('./copy-file.js'), - cp: require('./cp/index.js'), - mkdir: require('./mkdir/index.js'), - mkdtemp: require('./mkdtemp.js'), - rm: require('./rm/index.js'), - withTempDir: require('./with-temp-dir.js'), - writeFile: require('./write-file.js'), -} diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdir/index.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdir/index.js deleted file mode 100644 index 04ff447..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdir/index.js +++ /dev/null @@ -1,32 +0,0 @@ -const fs = require('../fs.js') -const getOptions = require('../common/get-options.js') -const node = require('../common/node.js') -const owner = require('../common/owner.js') - -const polyfill = require('./polyfill.js') - -// node 10.12.0 added the options parameter, which allows recursive and mode -// properties to be passed -const useNative = node.satisfies('>=10.12.0') - -// extends mkdir with the ability to specify an owner of the new dir -const mkdir = async (path, opts) => { - const options = getOptions(opts, { - copy: ['mode', 'recursive', 'owner'], - wrap: 'mode', - }) - const { uid, gid } = await owner.validate(path, options.owner) - - // the polyfill is tested separately from this module, no need to hack - // process.version to try to trigger it just for coverage - // istanbul ignore next - const result = useNative - ? await fs.mkdir(path, options) - : await polyfill(path, options) - - await owner.update(path, uid, gid) - - return result -} - -module.exports = mkdir diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdir/polyfill.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdir/polyfill.js deleted file mode 100644 index 4f8e6f0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdir/polyfill.js +++ /dev/null @@ -1,81 +0,0 @@ -const { dirname } = require('path') - -const fileURLToPath = require('../common/file-url-to-path/index.js') -const fs = require('../fs.js') - -const defaultOptions = { - mode: 0o777, - recursive: false, -} - -const mkdir = async (path, opts) => { - const options = { ...defaultOptions, ...opts } - - // if we're not in recursive mode, just call the real mkdir with the path and - // the mode option only - if (!options.recursive) { - return fs.mkdir(path, options.mode) - } - - const makeDirectory = async (dir, mode) => { - // we can't use dirname directly since these functions support URL - // objects with the file: protocol as the path input, so first we get a - // string path, then we can call dirname on that - const parent = dir != null && dir.href && dir.origin - ? dirname(fileURLToPath(dir)) - : dirname(dir) - - // if the parent is the dir itself, try to create it. anything but EISDIR - // should be rethrown - if (parent === dir) { - try { - await fs.mkdir(dir, opts) - } catch (err) { - if (err.code !== 'EISDIR') { - throw err - } - } - return undefined - } - - try { - await fs.mkdir(dir, mode) - return dir - } catch (err) { - // ENOENT means the parent wasn't there, so create that - if (err.code === 'ENOENT') { - const made = await makeDirectory(parent, mode) - await makeDirectory(dir, mode) - // return the shallowest path we created, i.e. the result of creating - // the parent - return made - } - - // an EEXIST means there's already something there - // an EROFS means we have a read-only filesystem and can't create a dir - // any other error is fatal and we should give up now - if (err.code !== 'EEXIST' && err.code !== 'EROFS') { - throw err - } - - // stat the directory, if the result is a directory, then we successfully - // created this one so return its path. otherwise, we reject with the - // original error by ignoring the error in the catch - try { - const stat = await fs.stat(dir) - if (stat.isDirectory()) { - // if it already existed, we didn't create anything so return - // undefined - return undefined - } - } catch (_) {} - - // if the thing that's there isn't a directory, then just re-throw - throw err - } - } - - return makeDirectory(path, options.mode) -} - -module.exports = mkdir diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdtemp.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdtemp.js deleted file mode 100644 index b7f0780..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/mkdtemp.js +++ /dev/null @@ -1,28 +0,0 @@ -const { dirname, sep } = require('path') - -const fs = require('./fs.js') -const getOptions = require('./common/get-options.js') -const owner = require('./common/owner.js') - -const mkdtemp = async (prefix, opts) => { - const options = getOptions(opts, { - copy: ['encoding', 'owner'], - wrap: 'encoding', - }) - - // mkdtemp relies on the trailing path separator to indicate if it should - // create a directory inside of the prefix. if that's the case then the root - // we infer ownership from is the prefix itself, otherwise it's the dirname - // /tmp -> /tmpABCDEF, infers from / - // /tmp/ -> /tmp/ABCDEF, infers from /tmp - const root = prefix.endsWith(sep) ? prefix : dirname(prefix) - const { uid, gid } = await owner.validate(root, options.owner) - - const result = await fs.mkdtemp(prefix, options) - - await owner.update(result, uid, gid) - - return result -} - -module.exports = mkdtemp diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/rm/index.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/rm/index.js deleted file mode 100644 index cb81fbd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/rm/index.js +++ /dev/null @@ -1,22 +0,0 @@ -const fs = require('../fs.js') -const getOptions = require('../common/get-options.js') -const node = require('../common/node.js') -const polyfill = require('./polyfill.js') - -// node 14.14.0 added fs.rm, which allows both the force and recursive options -const useNative = node.satisfies('>=14.14.0') - -const rm = async (path, opts) => { - const options = getOptions(opts, { - copy: ['retryDelay', 'maxRetries', 'recursive', 'force'], - }) - - // the polyfill is tested separately from this module, no need to hack - // process.version to try to trigger it just for coverage - // istanbul ignore next - return useNative - ? fs.rm(path, options) - : polyfill(path, options) -} - -module.exports = rm diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/rm/polyfill.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/rm/polyfill.js deleted file mode 100644 index a25c174..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/rm/polyfill.js +++ /dev/null @@ -1,239 +0,0 @@ -// this file is a modified version of the code in node core >=14.14.0 -// which is, in turn, a modified version of the rimraf module on npm -// node core changes: -// - Use of the assert module has been replaced with core's error system. -// - All code related to the glob dependency has been removed. -// - Bring your own custom fs module is not currently supported. -// - Some basic code cleanup. -// changes here: -// - remove all callback related code -// - drop sync support -// - change assertions back to non-internal methods (see options.js) -// - throws ENOTDIR when rmdir gets an ENOENT for a path that exists in Windows -const errnos = require('os').constants.errno -const { join } = require('path') -const fs = require('../fs.js') - -// error codes that mean we need to remove contents -const notEmptyCodes = new Set([ - 'ENOTEMPTY', - 'EEXIST', - 'EPERM', -]) - -// error codes we can retry later -const retryCodes = new Set([ - 'EBUSY', - 'EMFILE', - 'ENFILE', - 'ENOTEMPTY', - 'EPERM', -]) - -const isWindows = process.platform === 'win32' - -const defaultOptions = { - retryDelay: 100, - maxRetries: 0, - recursive: false, - force: false, -} - -// this is drastically simplified, but should be roughly equivalent to what -// node core throws -class ERR_FS_EISDIR extends Error { - constructor (path) { - super() - this.info = { - code: 'EISDIR', - message: 'is a directory', - path, - syscall: 'rm', - errno: errnos.EISDIR, - } - this.name = 'SystemError' - this.code = 'ERR_FS_EISDIR' - this.errno = errnos.EISDIR - this.syscall = 'rm' - this.path = path - this.message = `Path is a directory: ${this.syscall} returned ` + - `${this.info.code} (is a directory) ${path}` - } - - toString () { - return `${this.name} [${this.code}]: ${this.message}` - } -} - -class ENOTDIR extends Error { - constructor (path) { - super() - this.name = 'Error' - this.code = 'ENOTDIR' - this.errno = errnos.ENOTDIR - this.syscall = 'rmdir' - this.path = path - this.message = `not a directory, ${this.syscall} '${this.path}'` - } - - toString () { - return `${this.name}: ${this.code}: ${this.message}` - } -} - -// force is passed separately here because we respect it for the first entry -// into rimraf only, any further calls that are spawned as a result (i.e. to -// delete content within the target) will ignore ENOENT errors -const rimraf = async (path, options, isTop = false) => { - const force = isTop ? options.force : true - const stat = await fs.lstat(path) - .catch((err) => { - // we only ignore ENOENT if we're forcing this call - if (err.code === 'ENOENT' && force) { - return - } - - if (isWindows && err.code === 'EPERM') { - return fixEPERM(path, options, err, isTop) - } - - throw err - }) - - // no stat object here means either lstat threw an ENOENT, or lstat threw - // an EPERM and the fixPERM function took care of things. either way, we're - // already done, so return early - if (!stat) { - return - } - - if (stat.isDirectory()) { - return rmdir(path, options, null, isTop) - } - - return fs.unlink(path) - .catch((err) => { - if (err.code === 'ENOENT' && force) { - return - } - - if (err.code === 'EISDIR') { - return rmdir(path, options, err, isTop) - } - - if (err.code === 'EPERM') { - // in windows, we handle this through fixEPERM which will also try to - // delete things again. everywhere else since deleting the target as a - // file didn't work we go ahead and try to delete it as a directory - return isWindows - ? fixEPERM(path, options, err, isTop) - : rmdir(path, options, err, isTop) - } - - throw err - }) -} - -const fixEPERM = async (path, options, originalErr, isTop) => { - const force = isTop ? options.force : true - const targetMissing = await fs.chmod(path, 0o666) - .catch((err) => { - if (err.code === 'ENOENT' && force) { - return true - } - - throw originalErr - }) - - // got an ENOENT above, return now. no file = no problem - if (targetMissing) { - return - } - - // this function does its own lstat rather than calling rimraf again to avoid - // infinite recursion for a repeating EPERM - const stat = await fs.lstat(path) - .catch((err) => { - if (err.code === 'ENOENT' && force) { - return - } - - throw originalErr - }) - - if (!stat) { - return - } - - if (stat.isDirectory()) { - return rmdir(path, options, originalErr, isTop) - } - - return fs.unlink(path) -} - -const rmdir = async (path, options, originalErr, isTop) => { - if (!options.recursive && isTop) { - throw originalErr || new ERR_FS_EISDIR(path) - } - const force = isTop ? options.force : true - - return fs.rmdir(path) - .catch(async (err) => { - // in Windows, calling rmdir on a file path will fail with ENOENT rather - // than ENOTDIR. to determine if that's what happened, we have to do - // another lstat on the path. if the path isn't actually gone, we throw - // away the ENOENT and replace it with our own ENOTDIR - if (isWindows && err.code === 'ENOENT') { - const stillExists = await fs.lstat(path).then(() => true, () => false) - if (stillExists) { - err = new ENOTDIR(path) - } - } - - // not there, not a problem - if (err.code === 'ENOENT' && force) { - return - } - - // we may not have originalErr if lstat tells us our target is a - // directory but that changes before we actually remove it, so - // only throw it here if it's set - if (originalErr && err.code === 'ENOTDIR') { - throw originalErr - } - - // the directory isn't empty, remove the contents and try again - if (notEmptyCodes.has(err.code)) { - const files = await fs.readdir(path) - await Promise.all(files.map((file) => { - const target = join(path, file) - return rimraf(target, options) - })) - return fs.rmdir(path) - } - - throw err - }) -} - -const rm = async (path, opts) => { - const options = { ...defaultOptions, ...opts } - let retries = 0 - - const errHandler = async (err) => { - if (retryCodes.has(err.code) && ++retries < options.maxRetries) { - const delay = retries * options.retryDelay - await promiseTimeout(delay) - return rimraf(path, options, true).catch(errHandler) - } - - throw err - } - - return rimraf(path, options, true).catch(errHandler) -} - -const promiseTimeout = (ms) => new Promise((r) => setTimeout(r, ms)) - -module.exports = rm diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/with-temp-dir.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/with-temp-dir.js deleted file mode 100644 index 353d555..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/with-temp-dir.js +++ /dev/null @@ -1,39 +0,0 @@ -const { join, sep } = require('path') - -const getOptions = require('./common/get-options.js') -const mkdir = require('./mkdir/index.js') -const mkdtemp = require('./mkdtemp.js') -const rm = require('./rm/index.js') - -// create a temp directory, ensure its permissions match its parent, then call -// the supplied function passing it the path to the directory. clean up after -// the function finishes, whether it throws or not -const withTempDir = async (root, fn, opts) => { - const options = getOptions(opts, { - copy: ['tmpPrefix'], - }) - // create the directory, and fix its ownership - await mkdir(root, { recursive: true, owner: 'inherit' }) - - const target = await mkdtemp(join(`${root}${sep}`, options.tmpPrefix || ''), { owner: 'inherit' }) - let err - let result - - try { - result = await fn(target) - } catch (_err) { - err = _err - } - - try { - await rm(target, { force: true, recursive: true }) - } catch (err) {} - - if (err) { - throw err - } - - return result -} - -module.exports = withTempDir diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/write-file.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/write-file.js deleted file mode 100644 index 01de531..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/lib/write-file.js +++ /dev/null @@ -1,19 +0,0 @@ -const fs = require('./fs.js') -const getOptions = require('./common/get-options.js') -const owner = require('./common/owner.js') - -const writeFile = async (file, data, opts) => { - const options = getOptions(opts, { - copy: ['encoding', 'mode', 'flag', 'signal', 'owner'], - wrap: 'encoding', - }) - const { uid, gid } = await owner.validate(file, options.owner) - - const result = await fs.writeFile(file, data, options) - - await owner.update(file, uid, gid) - - return result -} - -module.exports = writeFile diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/node_modules/.bin/semver b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/node_modules/.bin/semver deleted file mode 100755 index 902a498..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/node_modules/.bin/semver +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../semver@7.8.3/node_modules/semver/bin/semver.js" "$@" -else - exec node "$basedir/../../../../../../semver@7.8.3/node_modules/semver/bin/semver.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/package.json b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/package.json deleted file mode 100644 index 0296aa7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/@npmcli/fs/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "@npmcli/fs", - "version": "1.1.1", - "description": "filesystem utilities for the npm cli", - "main": "lib/index.js", - "files": [ - "bin", - "lib" - ], - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "snap": "tap", - "test": "tap", - "npmclilint": "npmcli-lint", - "lint": "eslint '**/*.js'", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "postsnap": "npm run lintfix --", - "postlint": "npm-template-check" - }, - "keywords": [ - "npm", - "oss" - ], - "author": "GitHub Inc.", - "license": "ISC", - "devDependencies": { - "@npmcli/template-oss": "^2.3.1", - "tap": "^15.0.9" - }, - "dependencies": { - "@gar/promisify": "^1.0.1", - "semver": "^7.3.5" - }, - "templateVersion": "2.3.1" -} diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/semver b/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/semver deleted file mode 120000 index 81ddfca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+fs@1.1.1/node_modules/semver +++ /dev/null @@ -1 +0,0 @@ -../../semver@7.8.3/node_modules/semver \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/LICENSE.md deleted file mode 100644 index 072bf20..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/LICENSE.md +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) -Copyright (c) npm, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/README.md b/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/README.md deleted file mode 100644 index 8a5a57f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# @npmcli/move-file - -A fork of [move-file](https://github.com/sindresorhus/move-file) with -compatibility with all node 10.x versions. - -> Move a file (or directory) - -The built-in -[`fs.rename()`](https://nodejs.org/api/fs.html#fs_fs_rename_oldpath_newpath_callback) -is just a JavaScript wrapper for the C `rename(2)` function, which doesn't -support moving files across partitions or devices. This module is what you -would have expected `fs.rename()` to be. - -## Highlights - -- Promise API. -- Supports moving a file across partitions and devices. -- Optionally prevent overwriting an existing file. -- Creates non-existent destination directories for you. -- Support for Node versions that lack built-in recursive `fs.mkdir()` -- Automatically recurses when source is a directory. - -## Install - -``` -$ npm install @npmcli/move-file -``` - -## Usage - -```js -const moveFile = require('@npmcli/move-file'); - -(async () => { - await moveFile('source/unicorn.png', 'destination/unicorn.png'); - console.log('The file has been moved'); -})(); -``` - -## API - -### moveFile(source, destination, options?) - -Returns a `Promise` that resolves when the file has been moved. - -### moveFile.sync(source, destination, options?) - -#### source - -Type: `string` - -File, or directory, you want to move. - -#### destination - -Type: `string` - -Where you want the file or directory moved. - -#### options - -Type: `object` - -##### overwrite - -Type: `boolean`\ -Default: `true` - -Overwrite existing destination file(s). diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/index.js b/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/index.js deleted file mode 100644 index 95d1888..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/index.js +++ /dev/null @@ -1,162 +0,0 @@ -const { dirname, join, resolve, relative, isAbsolute } = require('path') -const rimraf_ = require('rimraf') -const { promisify } = require('util') -const { - access: access_, - accessSync, - copyFile: copyFile_, - copyFileSync, - unlink: unlink_, - unlinkSync, - readdir: readdir_, - readdirSync, - rename: rename_, - renameSync, - stat: stat_, - statSync, - lstat: lstat_, - lstatSync, - symlink: symlink_, - symlinkSync, - readlink: readlink_, - readlinkSync -} = require('fs') - -const access = promisify(access_) -const copyFile = promisify(copyFile_) -const unlink = promisify(unlink_) -const readdir = promisify(readdir_) -const rename = promisify(rename_) -const stat = promisify(stat_) -const lstat = promisify(lstat_) -const symlink = promisify(symlink_) -const readlink = promisify(readlink_) -const rimraf = promisify(rimraf_) -const rimrafSync = rimraf_.sync - -const mkdirp = require('mkdirp') - -const pathExists = async path => { - try { - await access(path) - return true - } catch (er) { - return er.code !== 'ENOENT' - } -} - -const pathExistsSync = path => { - try { - accessSync(path) - return true - } catch (er) { - return er.code !== 'ENOENT' - } -} - -const moveFile = async (source, destination, options = {}, root = true, symlinks = []) => { - if (!source || !destination) { - throw new TypeError('`source` and `destination` file required') - } - - options = { - overwrite: true, - ...options - } - - if (!options.overwrite && await pathExists(destination)) { - throw new Error(`The destination file exists: ${destination}`) - } - - await mkdirp(dirname(destination)) - - try { - await rename(source, destination) - } catch (error) { - if (error.code === 'EXDEV' || error.code === 'EPERM') { - const sourceStat = await lstat(source) - if (sourceStat.isDirectory()) { - const files = await readdir(source) - await Promise.all(files.map((file) => moveFile(join(source, file), join(destination, file), options, false, symlinks))) - } else if (sourceStat.isSymbolicLink()) { - symlinks.push({ source, destination }) - } else { - await copyFile(source, destination) - } - } else { - throw error - } - } - - if (root) { - await Promise.all(symlinks.map(async ({ source, destination }) => { - let target = await readlink(source) - // junction symlinks in windows will be absolute paths, so we need to make sure they point to the destination - if (isAbsolute(target)) - target = resolve(destination, relative(source, target)) - // try to determine what the actual file is so we can create the correct type of symlink in windows - let targetStat - try { - targetStat = await stat(resolve(dirname(source), target)) - } catch (err) {} - await symlink(target, destination, targetStat && targetStat.isDirectory() ? 'junction' : 'file') - })) - await rimraf(source) - } -} - -const moveFileSync = (source, destination, options = {}, root = true, symlinks = []) => { - if (!source || !destination) { - throw new TypeError('`source` and `destination` file required') - } - - options = { - overwrite: true, - ...options - } - - if (!options.overwrite && pathExistsSync(destination)) { - throw new Error(`The destination file exists: ${destination}`) - } - - mkdirp.sync(dirname(destination)) - - try { - renameSync(source, destination) - } catch (error) { - if (error.code === 'EXDEV' || error.code === 'EPERM') { - const sourceStat = lstatSync(source) - if (sourceStat.isDirectory()) { - const files = readdirSync(source) - for (const file of files) { - moveFileSync(join(source, file), join(destination, file), options, false, symlinks) - } - } else if (sourceStat.isSymbolicLink()) { - symlinks.push({ source, destination }) - } else { - copyFileSync(source, destination) - } - } else { - throw error - } - } - - if (root) { - for (const { source, destination } of symlinks) { - let target = readlinkSync(source) - // junction symlinks in windows will be absolute paths, so we need to make sure they point to the destination - if (isAbsolute(target)) - target = resolve(destination, relative(source, target)) - // try to determine what the actual file is so we can create the correct type of symlink in windows - let targetStat - try { - targetStat = statSync(resolve(dirname(source), target)) - } catch (err) {} - symlinkSync(target, destination, targetStat && targetStat.isDirectory() ? 'junction' : 'file') - } - rimrafSync(source) - } -} - -module.exports = moveFile -module.exports.sync = moveFileSync diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/node_modules/.bin/mkdirp b/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/node_modules/.bin/mkdirp deleted file mode 100755 index 99f4f97..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/node_modules/.bin/mkdirp +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../mkdirp@1.0.4/node_modules/mkdirp/bin/cmd.js" "$@" -else - exec node "$basedir/../../../../../../mkdirp@1.0.4/node_modules/mkdirp/bin/cmd.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/node_modules/.bin/rimraf b/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/node_modules/.bin/rimraf deleted file mode 100755 index 6b7bf38..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/node_modules/.bin/rimraf +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../../rimraf@3.0.2/node_modules/rimraf/bin.js" "$@" -else - exec node "$basedir/../../../../../../rimraf@3.0.2/node_modules/rimraf/bin.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/package.json b/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/package.json deleted file mode 100644 index 0c066db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@npmcli/move-file", - "version": "1.1.2", - "files": [ - "index.js" - ], - "description": "move a file (fork of move-file)", - "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "devDependencies": { - "require-inject": "^1.4.4", - "tap": "^14.10.7" - }, - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/npm/move-file" - }, - "tap": { - "check-coverage": true - }, - "license": "MIT", - "engines": { - "node": ">=10" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/mkdirp b/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/mkdirp deleted file mode 120000 index 42e5e74..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/mkdirp +++ /dev/null @@ -1 +0,0 @@ -../../mkdirp@1.0.4/node_modules/mkdirp \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/rimraf b/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/rimraf deleted file mode 120000 index cfdf82e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@npmcli+move-file@1.1.2/node_modules/rimraf +++ /dev/null @@ -1 +0,0 @@ -../../rimraf@3.0.2/node_modules/rimraf \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/README.md deleted file mode 100644 index e78ff4d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/core - -[![Version](https://img.shields.io/npm/v/@tiptap/core.svg?label=version)](https://www.npmjs.com/package/@tiptap/core) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/core.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/core.svg)](https://www.npmjs.com/package/@tiptap/core) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.cjs deleted file mode 100644 index 157c0a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.cjs +++ /dev/null @@ -1,7538 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - CommandManager: () => CommandManager, - Editor: () => Editor, - Extendable: () => Extendable, - Extension: () => Extension, - Fragment: () => Fragment6, - InputRule: () => InputRule, - MappablePosition: () => MappablePosition, - Mark: () => Mark, - MarkView: () => MarkView, - Node: () => Node3, - NodePos: () => NodePos, - NodeView: () => NodeView, - PasteRule: () => PasteRule, - ResizableNodeView: () => ResizableNodeView, - ResizableNodeview: () => ResizableNodeview, - Tracker: () => Tracker, - attrsEqual: () => attrsEqual, - callOrReturn: () => callOrReturn, - canInsertNode: () => canInsertNode, - combineTransactionSteps: () => combineTransactionSteps, - commands: () => commands_exports, - createAtomBlockMarkdownSpec: () => createAtomBlockMarkdownSpec, - createBlockMarkdownSpec: () => createBlockMarkdownSpec, - createChainableState: () => createChainableState, - createDocument: () => createDocument, - createElement: () => h, - createInlineMarkdownSpec: () => createInlineMarkdownSpec, - createMappablePosition: () => createMappablePosition, - createNodeFromContent: () => createNodeFromContent, - createStyleTag: () => createStyleTag, - decodeHtmlEntities: () => decodeHtmlEntities, - defaultBlockAt: () => defaultBlockAt, - deleteProps: () => deleteProps, - elementFromString: () => elementFromString, - encodeHtmlEntities: () => encodeHtmlEntities, - escapeForRegEx: () => escapeForRegEx, - extensions: () => extensions_exports, - findChildren: () => findChildren, - findChildrenInRange: () => findChildrenInRange, - findDuplicates: () => findDuplicates, - findParentNode: () => findParentNode, - findParentNodeClosestToPos: () => findParentNodeClosestToPos, - flattenExtensions: () => flattenExtensions, - fromString: () => fromString, - generateHTML: () => generateHTML, - generateJSON: () => generateJSON, - generateText: () => generateText, - getAttributes: () => getAttributes, - getAttributesFromExtensions: () => getAttributesFromExtensions, - getChangedRanges: () => getChangedRanges, - getDebugJSON: () => getDebugJSON, - getExtensionField: () => getExtensionField, - getHTMLFromFragment: () => getHTMLFromFragment, - getMarkAttributes: () => getMarkAttributes, - getMarkRange: () => getMarkRange, - getMarkType: () => getMarkType, - getMarksBetween: () => getMarksBetween, - getNodeAtPosition: () => getNodeAtPosition, - getNodeAttributes: () => getNodeAttributes, - getNodeType: () => getNodeType, - getRenderedAttributes: () => getRenderedAttributes, - getSchema: () => getSchema, - getSchemaByResolvedExtensions: () => getSchemaByResolvedExtensions, - getSchemaTypeByName: () => getSchemaTypeByName, - getSchemaTypeNameByName: () => getSchemaTypeNameByName, - getSplittedAttributes: () => getSplittedAttributes, - getStyleProperty: () => getStyleProperty, - getText: () => getText, - getTextBetween: () => getTextBetween, - getTextContentFromNodes: () => getTextContentFromNodes, - getTextSerializersFromSchema: () => getTextSerializersFromSchema, - getUpdatedPosition: () => getUpdatedPosition, - h: () => h, - injectExtensionAttributesToParseRule: () => injectExtensionAttributesToParseRule, - inputRulesPlugin: () => inputRulesPlugin, - isActive: () => isActive, - isAndroid: () => isAndroid, - isAtEndOfNode: () => isAtEndOfNode, - isAtStartOfNode: () => isAtStartOfNode, - isEmptyObject: () => isEmptyObject, - isExtensionRulesEnabled: () => isExtensionRulesEnabled, - isFirefox: () => isFirefox, - isFunction: () => isFunction, - isList: () => isList, - isMacOS: () => isMacOS, - isMarkActive: () => isMarkActive, - isNodeActive: () => isNodeActive, - isNodeEmpty: () => isNodeEmpty, - isNodeSelection: () => isNodeSelection, - isNodeViewSelected: () => isNodeViewSelected, - isNumber: () => isNumber, - isPlainObject: () => isPlainObject, - isRegExp: () => isRegExp, - isSafari: () => isSafari, - isString: () => isString, - isTextSelection: () => isTextSelection, - isiOS: () => isiOS, - markInputRule: () => markInputRule, - markPasteRule: () => markPasteRule, - markdown: () => markdown_exports, - marksEqual: () => marksEqual, - mergeAttributes: () => mergeAttributes, - mergeDeep: () => mergeDeep, - minMax: () => minMax, - nodeInputRule: () => nodeInputRule, - nodePasteRule: () => nodePasteRule, - objectIncludes: () => objectIncludes, - parseAttributes: () => parseAttributes, - parseIndentedBlocks: () => parseIndentedBlocks, - pasteRulesPlugin: () => pasteRulesPlugin, - posToDOMRect: () => posToDOMRect, - removeDuplicates: () => removeDuplicates, - renderNestedMarkdownContent: () => renderNestedMarkdownContent, - resolveExtensions: () => resolveExtensions, - resolveFocusPosition: () => resolveFocusPosition, - rewriteUnknownContent: () => rewriteUnknownContent, - selectionToInsertionEnd: () => selectionToInsertionEnd, - serializeAttributes: () => serializeAttributes, - sortExtensions: () => sortExtensions, - splitExtensions: () => splitExtensions, - textInputRule: () => textInputRule, - textPasteRule: () => textPasteRule, - textblockTypeInputRule: () => textblockTypeInputRule, - updateMarkViewAttributes: () => updateMarkViewAttributes, - wrappingInputRule: () => wrappingInputRule -}); -module.exports = __toCommonJS(index_exports); - -// src/helpers/createChainableState.ts -function createChainableState(config) { - const { state, transaction } = config; - let { selection } = transaction; - let { doc } = transaction; - let { storedMarks } = transaction; - return { - ...state, - apply: state.apply.bind(state), - applyTransaction: state.applyTransaction.bind(state), - plugins: state.plugins, - schema: state.schema, - reconfigure: state.reconfigure.bind(state), - toJSON: state.toJSON.bind(state), - get storedMarks() { - return storedMarks; - }, - get selection() { - return selection; - }, - get doc() { - return doc; - }, - get tr() { - selection = transaction.selection; - doc = transaction.doc; - storedMarks = transaction.storedMarks; - return transaction; - } - }; -} - -// src/CommandManager.ts -var CommandManager = class { - constructor(props) { - this.editor = props.editor; - this.rawCommands = this.editor.extensionManager.commands; - this.customState = props.state; - } - get hasCustomState() { - return !!this.customState; - } - get state() { - return this.customState || this.editor.state; - } - get commands() { - const { rawCommands, editor, state } = this; - const { view } = editor; - const { tr } = state; - const props = this.buildProps(tr); - return Object.fromEntries( - Object.entries(rawCommands).map(([name, command2]) => { - const method = (...args) => { - const callback = command2(...args)(props); - if (!tr.getMeta("preventDispatch") && !this.hasCustomState) { - view.dispatch(tr); - } - return callback; - }; - return [name, method]; - }) - ); - } - get chain() { - return () => this.createChain(); - } - get can() { - return () => this.createCan(); - } - createChain(startTr, shouldDispatch = true) { - const { rawCommands, editor, state } = this; - const { view } = editor; - const callbacks = []; - const hasStartTransaction = !!startTr; - const tr = startTr || state.tr; - const run3 = () => { - if (!hasStartTransaction && shouldDispatch && !tr.getMeta("preventDispatch") && !this.hasCustomState) { - view.dispatch(tr); - } - return callbacks.every((callback) => callback === true); - }; - const chain = { - ...Object.fromEntries( - Object.entries(rawCommands).map(([name, command2]) => { - const chainedCommand = (...args) => { - const props = this.buildProps(tr, shouldDispatch); - const callback = command2(...args)(props); - callbacks.push(callback); - return chain; - }; - return [name, chainedCommand]; - }) - ), - run: run3 - }; - return chain; - } - createCan(startTr) { - const { rawCommands, state } = this; - const dispatch = false; - const tr = startTr || state.tr; - const props = this.buildProps(tr, dispatch); - const formattedCommands = Object.fromEntries( - Object.entries(rawCommands).map(([name, command2]) => { - return [name, (...args) => command2(...args)({ ...props, dispatch: void 0 })]; - }) - ); - return { - ...formattedCommands, - chain: () => this.createChain(tr, dispatch) - }; - } - buildProps(tr, shouldDispatch = true) { - const { rawCommands, editor, state } = this; - const { view } = editor; - const props = { - tr, - editor, - view, - state: createChainableState({ - state, - transaction: tr - }), - dispatch: shouldDispatch ? () => void 0 : void 0, - chain: () => this.createChain(tr, shouldDispatch), - can: () => this.createCan(tr), - get commands() { - return Object.fromEntries( - Object.entries(rawCommands).map(([name, command2]) => { - return [name, (...args) => command2(...args)(props)]; - }) - ); - } - }; - return props; - } -}; - -// src/commands/index.ts -var commands_exports = {}; -__export(commands_exports, { - blur: () => blur, - clearContent: () => clearContent, - clearNodes: () => clearNodes, - command: () => command, - createParagraphNear: () => createParagraphNear, - cut: () => cut, - deleteCurrentNode: () => deleteCurrentNode, - deleteNode: () => deleteNode, - deleteRange: () => deleteRange, - deleteSelection: () => deleteSelection, - enter: () => enter, - exitCode: () => exitCode, - extendMarkRange: () => extendMarkRange, - first: () => first, - focus: () => focus, - forEach: () => forEach, - insertContent: () => insertContent, - insertContentAt: () => insertContentAt, - joinBackward: () => joinBackward, - joinDown: () => joinDown, - joinForward: () => joinForward, - joinItemBackward: () => joinItemBackward, - joinItemForward: () => joinItemForward, - joinTextblockBackward: () => joinTextblockBackward, - joinTextblockForward: () => joinTextblockForward, - joinUp: () => joinUp, - keyboardShortcut: () => keyboardShortcut, - lift: () => lift, - liftEmptyBlock: () => liftEmptyBlock, - liftListItem: () => liftListItem, - newlineInCode: () => newlineInCode, - resetAttributes: () => resetAttributes, - scrollIntoView: () => scrollIntoView, - selectAll: () => selectAll, - selectNodeBackward: () => selectNodeBackward, - selectNodeForward: () => selectNodeForward, - selectParentNode: () => selectParentNode, - selectTextblockEnd: () => selectTextblockEnd, - selectTextblockStart: () => selectTextblockStart, - setContent: () => setContent, - setMark: () => setMark, - setMeta: () => setMeta, - setNode: () => setNode, - setNodeSelection: () => setNodeSelection, - setTextDirection: () => setTextDirection, - setTextSelection: () => setTextSelection, - sinkListItem: () => sinkListItem, - splitBlock: () => splitBlock, - splitListItem: () => splitListItem, - toggleList: () => toggleList, - toggleMark: () => toggleMark, - toggleNode: () => toggleNode, - toggleWrap: () => toggleWrap, - undoInputRule: () => undoInputRule, - unsetAllMarks: () => unsetAllMarks, - unsetMark: () => unsetMark, - unsetTextDirection: () => unsetTextDirection, - updateAttributes: () => updateAttributes, - wrapIn: () => wrapIn, - wrapInList: () => wrapInList -}); - -// src/commands/blur.ts -var blur = () => ({ editor, view }) => { - requestAnimationFrame(() => { - var _a; - if (!editor.isDestroyed) { - ; - view.dom.blur(); - (_a = window == null ? void 0 : window.getSelection()) == null ? void 0 : _a.removeAllRanges(); - } - }); - return true; -}; - -// src/commands/clearContent.ts -var clearContent = (emitUpdate = true) => ({ commands }) => { - return commands.setContent("", { emitUpdate }); -}; - -// src/commands/clearNodes.ts -var import_transform = require("@tiptap/pm/transform"); -var clearNodes = () => ({ state, tr, dispatch }) => { - const { selection } = tr; - const { ranges } = selection; - if (!dispatch) { - return true; - } - ranges.forEach(({ $from, $to }) => { - state.doc.nodesBetween($from.pos, $to.pos, (node, pos) => { - if (node.type.isText) { - return; - } - const { doc, mapping } = tr; - const $mappedFrom = doc.resolve(mapping.map(pos)); - const $mappedTo = doc.resolve(mapping.map(pos + node.nodeSize)); - const nodeRange = $mappedFrom.blockRange($mappedTo); - if (!nodeRange) { - return; - } - const targetLiftDepth = (0, import_transform.liftTarget)(nodeRange); - if (node.type.isTextblock) { - const { defaultType } = $mappedFrom.parent.contentMatchAt($mappedFrom.index()); - tr.setNodeMarkup(nodeRange.start, defaultType); - } - if (targetLiftDepth || targetLiftDepth === 0) { - tr.lift(nodeRange, targetLiftDepth); - } - }); - }); - return true; -}; - -// src/commands/command.ts -var command = (fn) => (props) => { - return fn(props); -}; - -// src/commands/createParagraphNear.ts -var import_commands = require("@tiptap/pm/commands"); -var createParagraphNear = () => ({ state, dispatch }) => { - return (0, import_commands.createParagraphNear)(state, dispatch); -}; - -// src/commands/cut.ts -var import_state = require("@tiptap/pm/state"); -var cut = (originRange, targetPos) => ({ editor, tr }) => { - const { state } = editor; - const contentSlice = state.doc.slice(originRange.from, originRange.to); - tr.deleteRange(originRange.from, originRange.to); - const newPos = tr.mapping.map(targetPos); - tr.insert(newPos, contentSlice.content); - tr.setSelection(new import_state.TextSelection(tr.doc.resolve(Math.max(newPos - 1, 0)))); - return true; -}; - -// src/commands/deleteCurrentNode.ts -var deleteCurrentNode = () => ({ tr, dispatch }) => { - const { selection } = tr; - const currentNode = selection.$anchor.node(); - if (currentNode.content.size > 0) { - return false; - } - const $pos = tr.selection.$anchor; - for (let depth = $pos.depth; depth > 0; depth -= 1) { - const node = $pos.node(depth); - if (node.type === currentNode.type) { - if (dispatch) { - const from = $pos.before(depth); - const to = $pos.after(depth); - tr.delete(from, to).scrollIntoView(); - } - return true; - } - } - return false; -}; - -// src/helpers/getNodeType.ts -function getNodeType(nameOrType, schema) { - if (typeof nameOrType === "string") { - if (!schema.nodes[nameOrType]) { - throw Error( - `There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?` - ); - } - return schema.nodes[nameOrType]; - } - return nameOrType; -} - -// src/commands/deleteNode.ts -var deleteNode = (typeOrName) => ({ tr, state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - const $pos = tr.selection.$anchor; - for (let depth = $pos.depth; depth > 0; depth -= 1) { - const node = $pos.node(depth); - if (node.type === type) { - if (dispatch) { - const from = $pos.before(depth); - const to = $pos.after(depth); - tr.delete(from, to).scrollIntoView(); - } - return true; - } - } - return false; -}; - -// src/commands/deleteRange.ts -var deleteRange = (range) => ({ tr, dispatch }) => { - const { from, to } = range; - if (dispatch) { - tr.delete(from, to); - } - return true; -}; - -// src/commands/deleteSelection.ts -var hasTextContent = (nodeSpec) => { - if (!nodeSpec.content) { - return false; - } - const textRegex = /^text(\*|\+)/; - return textRegex.test(nodeSpec.content); -}; -var expandSelectionForSide = ($pos, schema, side) => { - if (!$pos.parent.isInline) { - return $pos.pos; - } - if (side === "left" && $pos.pos > $pos.start() || side === "right" && $pos.pos < $pos.end()) { - return $pos.pos; - } - const parentContent = schema.nodes[$pos.parent.type.name].spec; - if (!hasTextContent(parentContent)) { - return $pos.pos; - } - return side === "left" ? $pos.start() - 1 : $pos.end() + 1; -}; -var expandSelectionForInlineText = ($from, $to, schema) => { - const from = expandSelectionForSide($from, schema, "left"); - const to = expandSelectionForSide($to, schema, "right"); - return { from, to }; -}; -var deleteSelection = () => ({ state, dispatch }) => { - const { $from, $to } = state.selection; - if (state.selection.empty) { - return false; - } - const { from, to } = expandSelectionForInlineText($from, $to, state.schema); - if (dispatch) { - state.tr.deleteRange(from, to).scrollIntoView(); - dispatch(state.tr); - } - return true; -}; - -// src/commands/enter.ts -var enter = () => ({ commands }) => { - return commands.keyboardShortcut("Enter"); -}; - -// src/commands/exitCode.ts -var import_commands2 = require("@tiptap/pm/commands"); -var exitCode = () => ({ state, dispatch }) => { - return (0, import_commands2.exitCode)(state, dispatch); -}; - -// src/commands/extendMarkRange.ts -var import_state2 = require("@tiptap/pm/state"); - -// src/utilities/isRegExp.ts -function isRegExp(value) { - return Object.prototype.toString.call(value) === "[object RegExp]"; -} - -// src/utilities/objectIncludes.ts -function objectIncludes(object1, object2, options = { strict: true }) { - const keys = Object.keys(object2); - if (!keys.length) { - return true; - } - return keys.every((key) => { - if (options.strict) { - return object2[key] === object1[key]; - } - if (isRegExp(object2[key])) { - return object2[key].test(object1[key]); - } - return object2[key] === object1[key]; - }); -} - -// src/helpers/getMarkRange.ts -function findMarkInSet(marks, type, attributes = {}) { - return marks.find((item) => { - return item.type === type && objectIncludes( - // Only check equality for the attributes that are provided - Object.fromEntries(Object.keys(attributes).map((k) => [k, item.attrs[k]])), - attributes - ); - }); -} -function isMarkInSet(marks, type, attributes = {}) { - return !!findMarkInSet(marks, type, attributes); -} -function getMarkRange($pos, type, attributes) { - if (!$pos || !type) { - return; - } - let start = $pos.parent.childAfter($pos.parentOffset); - if (!start.node || !start.node.marks.some((mark2) => mark2.type === type)) { - start = $pos.parent.childBefore($pos.parentOffset); - } - if (!start.node || !start.node.marks.some((mark2) => mark2.type === type)) { - return; - } - if (!attributes) { - const firstMark = start.node.marks.find((mark2) => mark2.type === type); - if (firstMark) { - attributes = firstMark.attrs; - } - } - const mark = findMarkInSet([...start.node.marks], type, attributes); - if (!mark) { - return; - } - let startIndex = start.index; - let startPos = $pos.start() + start.offset; - let endIndex = startIndex + 1; - let endPos = startPos + start.node.nodeSize; - while (startIndex > 0 && isMarkInSet([...$pos.parent.child(startIndex - 1).marks], type, attributes)) { - startIndex -= 1; - startPos -= $pos.parent.child(startIndex).nodeSize; - } - while (endIndex < $pos.parent.childCount && isMarkInSet([...$pos.parent.child(endIndex).marks], type, attributes)) { - endPos += $pos.parent.child(endIndex).nodeSize; - endIndex += 1; - } - return { - from: startPos, - to: endPos - }; -} - -// src/helpers/getMarkType.ts -function getMarkType(nameOrType, schema) { - if (typeof nameOrType === "string") { - if (!schema.marks[nameOrType]) { - throw Error( - `There is no mark type named '${nameOrType}'. Maybe you forgot to add the extension?` - ); - } - return schema.marks[nameOrType]; - } - return nameOrType; -} - -// src/commands/extendMarkRange.ts -var extendMarkRange = (typeOrName, attributes) => ({ tr, state, dispatch }) => { - const type = getMarkType(typeOrName, state.schema); - const { doc, selection } = tr; - const { $from, from, to } = selection; - if (dispatch) { - const range = getMarkRange($from, type, attributes); - if (range && range.from <= from && range.to >= to) { - const newSelection = import_state2.TextSelection.create(doc, range.from, range.to); - tr.setSelection(newSelection); - } - } - return true; -}; - -// src/commands/first.ts -var first = (commands) => (props) => { - const items = typeof commands === "function" ? commands(props) : commands; - for (let i = 0; i < items.length; i += 1) { - if (items[i](props)) { - return true; - } - } - return false; -}; - -// src/helpers/isTextSelection.ts -var import_state3 = require("@tiptap/pm/state"); -function isTextSelection(value) { - return value instanceof import_state3.TextSelection; -} - -// src/helpers/resolveFocusPosition.ts -var import_state4 = require("@tiptap/pm/state"); - -// src/utilities/minMax.ts -function minMax(value = 0, min = 0, max = 0) { - return Math.min(Math.max(value, min), max); -} - -// src/helpers/resolveFocusPosition.ts -function resolveFocusPosition(doc, position = null) { - if (!position) { - return null; - } - const selectionAtStart = import_state4.Selection.atStart(doc); - const selectionAtEnd = import_state4.Selection.atEnd(doc); - if (position === "start" || position === true) { - return selectionAtStart; - } - if (position === "end") { - return selectionAtEnd; - } - const minPos = selectionAtStart.from; - const maxPos = selectionAtEnd.to; - if (position === "all") { - return import_state4.TextSelection.create( - doc, - minMax(0, minPos, maxPos), - minMax(doc.content.size, minPos, maxPos) - ); - } - return import_state4.TextSelection.create( - doc, - minMax(position, minPos, maxPos), - minMax(position, minPos, maxPos) - ); -} - -// src/utilities/isAndroid.ts -function isAndroid() { - return navigator.platform === "Android" || /android/i.test(navigator.userAgent); -} - -// src/utilities/isiOS.ts -function isiOS() { - return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes( - navigator.platform - ) || // iPad on iOS 13 detection - navigator.userAgent.includes("Mac") && "ontouchend" in document; -} - -// src/utilities/isSafari.ts -function isSafari() { - return typeof navigator !== "undefined" ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent) : false; -} - -// src/commands/focus.ts -var focus = (position = null, options = {}) => ({ editor, view, tr, dispatch }) => { - options = { - scrollIntoView: true, - ...options - }; - const delayedFocus = () => { - if (isiOS() || isAndroid()) { - ; - view.dom.focus(); - } - if (isSafari() && !isiOS() && !isAndroid()) { - ; - view.dom.focus({ preventScroll: true }); - } - requestAnimationFrame(() => { - if (!editor.isDestroyed) { - view.focus(); - if (options == null ? void 0 : options.scrollIntoView) { - editor.commands.scrollIntoView(); - } - } - }); - }; - try { - if (view.hasFocus() && position === null || position === false) { - return true; - } - } catch { - return false; - } - if (dispatch && position === null && !isTextSelection(editor.state.selection)) { - delayedFocus(); - return true; - } - const selection = resolveFocusPosition(tr.doc, position) || editor.state.selection; - const isSameSelection = editor.state.selection.eq(selection); - if (dispatch) { - if (!isSameSelection) { - tr.setSelection(selection); - } - if (isSameSelection && tr.storedMarks) { - tr.setStoredMarks(tr.storedMarks); - } - delayedFocus(); - } - return true; -}; - -// src/commands/forEach.ts -var forEach = (items, fn) => (props) => { - return items.every((item, index) => fn(item, { ...props, index })); -}; - -// src/commands/insertContent.ts -var insertContent = (value, options) => ({ tr, commands }) => { - return commands.insertContentAt( - { from: tr.selection.from, to: tr.selection.to }, - value, - options - ); -}; - -// src/commands/insertContentAt.ts -var import_model2 = require("@tiptap/pm/model"); - -// src/helpers/createNodeFromContent.ts -var import_model = require("@tiptap/pm/model"); - -// src/utilities/elementFromString.ts -var removeWhitespaces = (node) => { - const children = node.childNodes; - for (let i = children.length - 1; i >= 0; i -= 1) { - const child = children[i]; - if (child.nodeType === 3 && child.nodeValue && /^(\n\s\s|\n)$/.test(child.nodeValue)) { - node.removeChild(child); - } else if (child.nodeType === 1) { - removeWhitespaces(child); - } - } - return node; -}; -function elementFromString(value) { - if (typeof window === "undefined") { - throw new Error( - "[tiptap error]: there is no window object available, so this function cannot be used" - ); - } - const wrappedValue = `${value}`; - const html = new window.DOMParser().parseFromString(wrappedValue, "text/html").body; - return removeWhitespaces(html); -} - -// src/helpers/createNodeFromContent.ts -function createNodeFromContent(content, schema, options) { - if (content instanceof import_model.Node || content instanceof import_model.Fragment) { - return content; - } - options = { - slice: true, - parseOptions: {}, - ...options - }; - const isJSONContent = typeof content === "object" && content !== null; - const isTextContent = typeof content === "string"; - if (isJSONContent) { - try { - const isArrayContent = Array.isArray(content) && content.length > 0; - if (isArrayContent) { - return import_model.Fragment.fromArray(content.map((item) => schema.nodeFromJSON(item))); - } - const node = schema.nodeFromJSON(content); - if (options.errorOnInvalidContent) { - node.check(); - } - return node; - } catch (error) { - if (options.errorOnInvalidContent) { - throw new Error("[tiptap error]: Invalid JSON content", { cause: error }); - } - console.warn("[tiptap warn]: Invalid content.", "Passed value:", content, "Error:", error); - return createNodeFromContent("", schema, options); - } - } - if (isTextContent) { - if (options.errorOnInvalidContent) { - let hasInvalidContent = false; - let invalidContent = ""; - const contentCheckSchema = new import_model.Schema({ - topNode: schema.spec.topNode, - marks: schema.spec.marks, - // Prosemirror's schemas are executed such that: the last to execute, matches last - // This means that we can add a catch-all node at the end of the schema to catch any content that we don't know how to handle - nodes: schema.spec.nodes.append({ - __tiptap__private__unknown__catch__all__node: { - content: "inline*", - group: "block", - parseDOM: [ - { - tag: "*", - getAttrs: (e) => { - hasInvalidContent = true; - invalidContent = typeof e === "string" ? e : e.outerHTML; - return null; - } - } - ] - } - }) - }); - if (options.slice) { - import_model.DOMParser.fromSchema(contentCheckSchema).parseSlice( - elementFromString(content), - options.parseOptions - ); - } else { - import_model.DOMParser.fromSchema(contentCheckSchema).parse( - elementFromString(content), - options.parseOptions - ); - } - if (options.errorOnInvalidContent && hasInvalidContent) { - throw new Error("[tiptap error]: Invalid HTML content", { - cause: new Error(`Invalid element found: ${invalidContent}`) - }); - } - } - const parser = import_model.DOMParser.fromSchema(schema); - if (options.slice) { - return parser.parseSlice(elementFromString(content), options.parseOptions).content; - } - return parser.parse(elementFromString(content), options.parseOptions); - } - return createNodeFromContent("", schema, options); -} - -// src/helpers/selectionToInsertionEnd.ts -var import_state5 = require("@tiptap/pm/state"); -var import_transform2 = require("@tiptap/pm/transform"); -function selectionToInsertionEnd(tr, startLen, bias) { - const last = tr.steps.length - 1; - if (last < startLen) { - return; - } - const step = tr.steps[last]; - if (!(step instanceof import_transform2.ReplaceStep || step instanceof import_transform2.ReplaceAroundStep)) { - return; - } - const map = tr.mapping.maps[last]; - let end = 0; - map.forEach((_from, _to, _newFrom, newTo) => { - if (end === 0) { - end = newTo; - } - }); - tr.setSelection(import_state5.Selection.near(tr.doc.resolve(end), bias)); -} - -// src/commands/insertContentAt.ts -var isFragment = (nodeOrFragment) => { - return !("type" in nodeOrFragment); -}; -var insertContentAt = (position, value, options) => ({ tr, dispatch, editor }) => { - var _a; - if (dispatch) { - options = { - parseOptions: editor.options.parseOptions, - updateSelection: true, - applyInputRules: false, - applyPasteRules: false, - ...options - }; - let content; - const emitContentError = (error) => { - editor.emit("contentError", { - editor, - error, - disableCollaboration: () => { - if ("collaboration" in editor.storage && typeof editor.storage.collaboration === "object" && editor.storage.collaboration) { - ; - editor.storage.collaboration.isDisabled = true; - } - } - }); - }; - const parseOptions = { - preserveWhitespace: "full", - ...options.parseOptions - }; - if (!options.errorOnInvalidContent && !editor.options.enableContentCheck && editor.options.emitContentError) { - try { - createNodeFromContent(value, editor.schema, { - parseOptions, - errorOnInvalidContent: true - }); - } catch (e) { - emitContentError(e); - } - } - try { - content = createNodeFromContent(value, editor.schema, { - parseOptions, - errorOnInvalidContent: (_a = options.errorOnInvalidContent) != null ? _a : editor.options.enableContentCheck - }); - } catch (e) { - emitContentError(e); - return false; - } - let { from, to } = typeof position === "number" ? { from: position, to: position } : { from: position.from, to: position.to }; - let isOnlyTextContent = true; - let isOnlyBlockContent = true; - const nodes = isFragment(content) ? content : [content]; - nodes.forEach((node) => { - node.check(); - isOnlyTextContent = isOnlyTextContent ? node.isText && node.marks.length === 0 : false; - isOnlyBlockContent = isOnlyBlockContent ? node.isBlock : false; - }); - if (from === to && isOnlyBlockContent) { - const { parent } = tr.doc.resolve(from); - const isEmptyTextBlock = parent.isTextblock && !parent.type.spec.code && !parent.childCount; - if (isEmptyTextBlock) { - from -= 1; - to += 1; - } - } - let newContent; - if (isOnlyTextContent) { - if (Array.isArray(value)) { - newContent = value.map((v) => v.text || "").join(""); - } else if (value instanceof import_model2.Fragment) { - let text = ""; - value.forEach((node) => { - if (node.text) { - text += node.text; - } - }); - newContent = text; - } else if (typeof value === "object" && !!value && !!value.text) { - newContent = value.text; - } else { - newContent = value; - } - tr.insertText(newContent, from, to); - } else { - newContent = content; - const $from = tr.doc.resolve(from); - const $fromNode = $from.node(); - const fromSelectionAtStart = $from.parentOffset === 0; - const isTextSelection2 = $fromNode.isText || $fromNode.isTextblock; - const hasContent = $fromNode.content.size > 0; - if (fromSelectionAtStart && isTextSelection2 && hasContent && isOnlyBlockContent) { - from = Math.max(0, from - 1); - } - tr.replaceWith(from, to, newContent); - } - if (options.updateSelection) { - selectionToInsertionEnd(tr, tr.steps.length - 1, -1); - } - if (options.applyInputRules) { - tr.setMeta("applyInputRules", { from, text: newContent }); - } - if (options.applyPasteRules) { - tr.setMeta("applyPasteRules", { from, text: newContent }); - } - } - return true; -}; - -// src/commands/join.ts -var import_commands3 = require("@tiptap/pm/commands"); -var joinUp = () => ({ state, dispatch }) => { - return (0, import_commands3.joinUp)(state, dispatch); -}; -var joinDown = () => ({ state, dispatch }) => { - return (0, import_commands3.joinDown)(state, dispatch); -}; -var joinBackward = () => ({ state, dispatch }) => { - return (0, import_commands3.joinBackward)(state, dispatch); -}; -var joinForward = () => ({ state, dispatch }) => { - return (0, import_commands3.joinForward)(state, dispatch); -}; - -// src/commands/joinItemBackward.ts -var import_transform3 = require("@tiptap/pm/transform"); -var joinItemBackward = () => ({ state, dispatch, tr }) => { - try { - const point = (0, import_transform3.joinPoint)(state.doc, state.selection.$from.pos, -1); - if (point === null || point === void 0) { - return false; - } - tr.join(point, 2); - if (dispatch) { - dispatch(tr); - } - return true; - } catch { - return false; - } -}; - -// src/commands/joinItemForward.ts -var import_transform4 = require("@tiptap/pm/transform"); -var joinItemForward = () => ({ state, dispatch, tr }) => { - try { - const point = (0, import_transform4.joinPoint)(state.doc, state.selection.$from.pos, 1); - if (point === null || point === void 0) { - return false; - } - tr.join(point, 2); - if (dispatch) { - dispatch(tr); - } - return true; - } catch { - return false; - } -}; - -// src/commands/joinTextblockBackward.ts -var import_commands4 = require("@tiptap/pm/commands"); -var joinTextblockBackward = () => ({ state, dispatch }) => { - return (0, import_commands4.joinTextblockBackward)(state, dispatch); -}; - -// src/commands/joinTextblockForward.ts -var import_commands5 = require("@tiptap/pm/commands"); -var joinTextblockForward = () => ({ state, dispatch }) => { - return (0, import_commands5.joinTextblockForward)(state, dispatch); -}; - -// src/utilities/isMacOS.ts -function isMacOS() { - return typeof navigator !== "undefined" ? /Mac/.test(navigator.platform) : false; -} - -// src/commands/keyboardShortcut.ts -function normalizeKeyName(name) { - const parts = name.split(/-(?!$)/); - let result = parts[parts.length - 1]; - if (result === "Space") { - result = " "; - } - let alt; - let ctrl; - let shift; - let meta; - for (let i = 0; i < parts.length - 1; i += 1) { - const mod = parts[i]; - if (/^(cmd|meta|m)$/i.test(mod)) { - meta = true; - } else if (/^a(lt)?$/i.test(mod)) { - alt = true; - } else if (/^(c|ctrl|control)$/i.test(mod)) { - ctrl = true; - } else if (/^s(hift)?$/i.test(mod)) { - shift = true; - } else if (/^mod$/i.test(mod)) { - if (isiOS() || isMacOS()) { - meta = true; - } else { - ctrl = true; - } - } else { - throw new Error(`Unrecognized modifier name: ${mod}`); - } - } - if (alt) { - result = `Alt-${result}`; - } - if (ctrl) { - result = `Ctrl-${result}`; - } - if (meta) { - result = `Meta-${result}`; - } - if (shift) { - result = `Shift-${result}`; - } - return result; -} -var keyboardShortcut = (name) => ({ editor, view, tr, dispatch }) => { - const keys = normalizeKeyName(name).split(/-(?!$)/); - const key = keys.find((item) => !["Alt", "Ctrl", "Meta", "Shift"].includes(item)); - const event = new KeyboardEvent("keydown", { - key: key === "Space" ? " " : key, - altKey: keys.includes("Alt"), - ctrlKey: keys.includes("Ctrl"), - metaKey: keys.includes("Meta"), - shiftKey: keys.includes("Shift"), - bubbles: true, - cancelable: true - }); - const capturedTransaction = editor.captureTransaction(() => { - view.someProp("handleKeyDown", (f) => f(view, event)); - }); - capturedTransaction == null ? void 0 : capturedTransaction.steps.forEach((step) => { - const newStep = step.map(tr.mapping); - if (newStep && dispatch) { - tr.maybeStep(newStep); - } - }); - return true; -}; - -// src/commands/lift.ts -var import_commands6 = require("@tiptap/pm/commands"); - -// src/helpers/isNodeActive.ts -function isNodeActive(state, typeOrName, attributes = {}) { - const { from, to, empty } = state.selection; - const type = typeOrName ? getNodeType(typeOrName, state.schema) : null; - const nodeRanges = []; - state.doc.nodesBetween(from, to, (node, pos) => { - if (node.isText) { - return; - } - const relativeFrom = Math.max(from, pos); - const relativeTo = Math.min(to, pos + node.nodeSize); - nodeRanges.push({ - node, - from: relativeFrom, - to: relativeTo - }); - }); - const selectionRange = to - from; - const matchedNodeRanges = nodeRanges.filter((nodeRange) => { - if (!type) { - return true; - } - return type.name === nodeRange.node.type.name; - }).filter((nodeRange) => objectIncludes(nodeRange.node.attrs, attributes, { strict: false })); - if (empty) { - return !!matchedNodeRanges.length; - } - const range = matchedNodeRanges.reduce((sum, nodeRange) => sum + nodeRange.to - nodeRange.from, 0); - return range >= selectionRange; -} - -// src/commands/lift.ts -var lift = (typeOrName, attributes = {}) => ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - const isActive2 = isNodeActive(state, type, attributes); - if (!isActive2) { - return false; - } - return (0, import_commands6.lift)(state, dispatch); -}; - -// src/commands/liftEmptyBlock.ts -var import_commands7 = require("@tiptap/pm/commands"); -var liftEmptyBlock = () => ({ state, dispatch }) => { - return (0, import_commands7.liftEmptyBlock)(state, dispatch); -}; - -// src/commands/liftListItem.ts -var import_schema_list = require("@tiptap/pm/schema-list"); -var liftListItem = (typeOrName) => ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - return (0, import_schema_list.liftListItem)(type)(state, dispatch); -}; - -// src/commands/newlineInCode.ts -var import_commands8 = require("@tiptap/pm/commands"); -var newlineInCode = () => ({ state, dispatch }) => { - return (0, import_commands8.newlineInCode)(state, dispatch); -}; - -// src/helpers/getSchemaTypeNameByName.ts -function getSchemaTypeNameByName(name, schema) { - if (schema.nodes[name]) { - return "node"; - } - if (schema.marks[name]) { - return "mark"; - } - return null; -} - -// src/utilities/deleteProps.ts -function deleteProps(obj, propOrProps) { - const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps; - return Object.keys(obj).reduce((newObj, prop) => { - if (!props.includes(prop)) { - newObj[prop] = obj[prop]; - } - return newObj; - }, {}); -} - -// src/commands/resetAttributes.ts -var resetAttributes = (typeOrName, attributes) => ({ tr, state, dispatch }) => { - let nodeType = null; - let markType = null; - const schemaType = getSchemaTypeNameByName( - typeof typeOrName === "string" ? typeOrName : typeOrName.name, - state.schema - ); - if (!schemaType) { - return false; - } - if (schemaType === "node") { - nodeType = getNodeType(typeOrName, state.schema); - } - if (schemaType === "mark") { - markType = getMarkType(typeOrName, state.schema); - } - let canReset = false; - tr.selection.ranges.forEach((range) => { - state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => { - if (nodeType && nodeType === node.type) { - canReset = true; - if (dispatch) { - tr.setNodeMarkup(pos, void 0, deleteProps(node.attrs, attributes)); - } - } - if (markType && node.marks.length) { - node.marks.forEach((mark) => { - if (markType === mark.type) { - canReset = true; - if (dispatch) { - tr.addMark( - pos, - pos + node.nodeSize, - markType.create(deleteProps(mark.attrs, attributes)) - ); - } - } - }); - } - }); - }); - return canReset; -}; - -// src/commands/scrollIntoView.ts -var scrollIntoView = () => ({ tr, dispatch }) => { - if (dispatch) { - tr.scrollIntoView(); - } - return true; -}; - -// src/commands/selectAll.ts -var import_state6 = require("@tiptap/pm/state"); -var selectAll = () => ({ tr, dispatch }) => { - if (dispatch) { - const selection = new import_state6.AllSelection(tr.doc); - tr.setSelection(selection); - } - return true; -}; - -// src/commands/selectNodeBackward.ts -var import_commands9 = require("@tiptap/pm/commands"); -var selectNodeBackward = () => ({ state, dispatch }) => { - return (0, import_commands9.selectNodeBackward)(state, dispatch); -}; - -// src/commands/selectNodeForward.ts -var import_commands10 = require("@tiptap/pm/commands"); -var selectNodeForward = () => ({ state, dispatch }) => { - return (0, import_commands10.selectNodeForward)(state, dispatch); -}; - -// src/commands/selectParentNode.ts -var import_commands11 = require("@tiptap/pm/commands"); -var selectParentNode = () => ({ state, dispatch }) => { - return (0, import_commands11.selectParentNode)(state, dispatch); -}; - -// src/commands/selectTextblockEnd.ts -var import_commands12 = require("@tiptap/pm/commands"); -var selectTextblockEnd = () => ({ state, dispatch }) => { - return (0, import_commands12.selectTextblockEnd)(state, dispatch); -}; - -// src/commands/selectTextblockStart.ts -var import_commands13 = require("@tiptap/pm/commands"); -var selectTextblockStart = () => ({ state, dispatch }) => { - return (0, import_commands13.selectTextblockStart)(state, dispatch); -}; - -// src/helpers/createDocument.ts -function createDocument(content, schema, parseOptions = {}, options = {}) { - return createNodeFromContent(content, schema, { - slice: false, - parseOptions, - errorOnInvalidContent: options.errorOnInvalidContent - }); -} - -// src/commands/setContent.ts -var setContent = (content, { errorOnInvalidContent, emitUpdate = true, parseOptions = {} } = {}) => ({ editor, tr, dispatch, commands }) => { - const { doc } = tr; - if (parseOptions.preserveWhitespace !== "full") { - const document2 = createDocument(content, editor.schema, parseOptions, { - errorOnInvalidContent: errorOnInvalidContent != null ? errorOnInvalidContent : editor.options.enableContentCheck - }); - if (dispatch) { - tr.replaceWith(0, doc.content.size, document2).setMeta("preventUpdate", !emitUpdate); - } - return true; - } - if (dispatch) { - tr.setMeta("preventUpdate", !emitUpdate); - } - return commands.insertContentAt({ from: 0, to: doc.content.size }, content, { - parseOptions, - errorOnInvalidContent: errorOnInvalidContent != null ? errorOnInvalidContent : editor.options.enableContentCheck - }); -}; - -// src/helpers/getMarkAttributes.ts -function getMarkAttributes(state, typeOrName) { - const type = getMarkType(typeOrName, state.schema); - const { from, to, empty } = state.selection; - const marks = []; - if (empty) { - if (state.storedMarks) { - marks.push(...state.storedMarks); - } - marks.push(...state.selection.$head.marks()); - } else { - state.doc.nodesBetween(from, to, (node) => { - marks.push(...node.marks); - }); - } - const mark = marks.find((markItem) => markItem.type.name === type.name); - if (!mark) { - return {}; - } - return { ...mark.attrs }; -} - -// src/helpers/combineTransactionSteps.ts -var import_transform5 = require("@tiptap/pm/transform"); -function combineTransactionSteps(oldDoc, transactions) { - const transform = new import_transform5.Transform(oldDoc); - transactions.forEach((transaction) => { - transaction.steps.forEach((step) => { - transform.step(step); - }); - }); - return transform; -} - -// src/helpers/defaultBlockAt.ts -function defaultBlockAt(match) { - for (let i = 0; i < match.edgeCount; i += 1) { - const { type } = match.edge(i); - if (type.isTextblock && !type.hasRequiredAttrs()) { - return type; - } - } - return null; -} - -// src/helpers/findChildren.ts -function findChildren(node, predicate) { - const nodesWithPos = []; - node.descendants((child, pos) => { - if (predicate(child)) { - nodesWithPos.push({ - node: child, - pos - }); - } - }); - return nodesWithPos; -} - -// src/helpers/findChildrenInRange.ts -function findChildrenInRange(node, range, predicate) { - const nodesWithPos = []; - node.nodesBetween(range.from, range.to, (child, pos) => { - if (predicate(child)) { - nodesWithPos.push({ - node: child, - pos - }); - } - }); - return nodesWithPos; -} - -// src/helpers/findParentNodeClosestToPos.ts -function findParentNodeClosestToPos($pos, predicate) { - for (let i = $pos.depth; i > 0; i -= 1) { - const node = $pos.node(i); - if (predicate(node)) { - return { - pos: i > 0 ? $pos.before(i) : 0, - start: $pos.start(i), - depth: i, - node - }; - } - } -} - -// src/helpers/findParentNode.ts -function findParentNode(predicate) { - return (selection) => findParentNodeClosestToPos(selection.$from, predicate); -} - -// src/helpers/getExtensionField.ts -function getExtensionField(extension, field, context) { - if (extension.config[field] === void 0 && extension.parent) { - return getExtensionField(extension.parent, field, context); - } - if (typeof extension.config[field] === "function") { - const value = extension.config[field].bind({ - ...context, - parent: extension.parent ? getExtensionField(extension.parent, field, context) : null - }); - return value; - } - return extension.config[field]; -} - -// src/helpers/flattenExtensions.ts -function flattenExtensions(extensions) { - return extensions.map((extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage - }; - const addExtensions = getExtensionField( - extension, - "addExtensions", - context - ); - if (addExtensions) { - return [extension, ...flattenExtensions(addExtensions())]; - } - return extension; - }).flat(10); -} - -// src/helpers/generateHTML.ts -var import_model5 = require("@tiptap/pm/model"); - -// src/helpers/getHTMLFromFragment.ts -var import_model3 = require("@tiptap/pm/model"); -function getHTMLFromFragment(fragment, schema) { - const documentFragment = import_model3.DOMSerializer.fromSchema(schema).serializeFragment(fragment); - const temporaryDocument = document.implementation.createHTMLDocument(); - const container = temporaryDocument.createElement("div"); - container.appendChild(documentFragment); - return container.innerHTML; -} - -// src/helpers/getSchemaByResolvedExtensions.ts -var import_model4 = require("@tiptap/pm/model"); - -// src/utilities/isFunction.ts -function isFunction(value) { - return typeof value === "function"; -} - -// src/utilities/callOrReturn.ts -function callOrReturn(value, context = void 0, ...props) { - if (isFunction(value)) { - if (context) { - return value.bind(context)(...props); - } - return value(...props); - } - return value; -} - -// src/utilities/isEmptyObject.ts -function isEmptyObject(value = {}) { - return Object.keys(value).length === 0 && value.constructor === Object; -} - -// src/helpers/splitExtensions.ts -function splitExtensions(extensions) { - const baseExtensions = extensions.filter( - (extension) => extension.type === "extension" - ); - const nodeExtensions = extensions.filter((extension) => extension.type === "node"); - const markExtensions = extensions.filter((extension) => extension.type === "mark"); - return { - baseExtensions, - nodeExtensions, - markExtensions - }; -} - -// src/helpers/getAttributesFromExtensions.ts -function getAttributesFromExtensions(extensions) { - const extensionAttributes = []; - const { nodeExtensions, markExtensions } = splitExtensions(extensions); - const nodeAndMarkExtensions = [...nodeExtensions, ...markExtensions]; - const defaultAttribute = { - default: null, - validate: void 0, - rendered: true, - renderHTML: null, - parseHTML: null, - keepOnSplit: true, - isRequired: false - }; - const nodeExtensionTypes = nodeExtensions.filter((ext) => ext.name !== "text").map((ext) => ext.name); - const markExtensionTypes = markExtensions.map((ext) => ext.name); - const allExtensionTypes = [...nodeExtensionTypes, ...markExtensionTypes]; - extensions.forEach((extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - extensions: nodeAndMarkExtensions - }; - const addGlobalAttributes = getExtensionField( - extension, - "addGlobalAttributes", - context - ); - if (!addGlobalAttributes) { - return; - } - const globalAttributes = addGlobalAttributes(); - globalAttributes.forEach((globalAttribute) => { - let resolvedTypes; - if (Array.isArray(globalAttribute.types)) { - resolvedTypes = globalAttribute.types; - } else if (globalAttribute.types === "*") { - resolvedTypes = allExtensionTypes; - } else if (globalAttribute.types === "nodes") { - resolvedTypes = nodeExtensionTypes; - } else if (globalAttribute.types === "marks") { - resolvedTypes = markExtensionTypes; - } else { - resolvedTypes = []; - } - resolvedTypes.forEach((type) => { - Object.entries(globalAttribute.attributes).forEach(([name, attribute]) => { - extensionAttributes.push({ - type, - name, - attribute: { - ...defaultAttribute, - ...attribute - } - }); - }); - }); - }); - }); - nodeAndMarkExtensions.forEach((extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage - }; - const addAttributes = getExtensionField(extension, "addAttributes", context); - if (!addAttributes) { - return; - } - const attributes = addAttributes(); - Object.entries(attributes).forEach(([name, attribute]) => { - const mergedAttr = { - ...defaultAttribute, - ...attribute - }; - if (typeof (mergedAttr == null ? void 0 : mergedAttr.default) === "function") { - mergedAttr.default = mergedAttr.default(); - } - if ((mergedAttr == null ? void 0 : mergedAttr.isRequired) && (mergedAttr == null ? void 0 : mergedAttr.default) === void 0) { - delete mergedAttr.default; - } - extensionAttributes.push({ - type: extension.name, - name, - attribute: mergedAttr - }); - }); - }); - return extensionAttributes; -} - -// src/utilities/mergeAttributes.ts -function splitStyleDeclarations(styles) { - const result = []; - let current = ""; - let inSingleQuote = false; - let inDoubleQuote = false; - let parenDepth = 0; - const length = styles.length; - for (let i = 0; i < length; i += 1) { - const char = styles[i]; - if (char === "'" && !inDoubleQuote) { - inSingleQuote = !inSingleQuote; - current += char; - continue; - } - if (char === '"' && !inSingleQuote) { - inDoubleQuote = !inDoubleQuote; - current += char; - continue; - } - if (!inSingleQuote && !inDoubleQuote) { - if (char === "(") { - parenDepth += 1; - current += char; - continue; - } - if (char === ")" && parenDepth > 0) { - parenDepth -= 1; - current += char; - continue; - } - if (char === ";" && parenDepth === 0) { - result.push(current); - current = ""; - continue; - } - } - current += char; - } - if (current) { - result.push(current); - } - return result; -} -function parseStyleEntries(styles) { - const pairs = []; - const declarations = splitStyleDeclarations(styles || ""); - const numDeclarations = declarations.length; - for (let i = 0; i < numDeclarations; i += 1) { - const declaration = declarations[i]; - const firstColonIndex = declaration.indexOf(":"); - if (firstColonIndex === -1) { - continue; - } - const property = declaration.slice(0, firstColonIndex).trim(); - const value = declaration.slice(firstColonIndex + 1).trim(); - if (property && value) { - pairs.push([property, value]); - } - } - return pairs; -} -function mergeAttributes(...objects) { - return objects.filter((item) => !!item).reduce((items, item) => { - const mergedAttributes = { ...items }; - Object.entries(item).forEach(([key, value]) => { - const exists = mergedAttributes[key]; - if (!exists) { - mergedAttributes[key] = value; - return; - } - if (key === "class") { - const valueClasses = value ? String(value).split(" ") : []; - const existingClasses = mergedAttributes[key] ? mergedAttributes[key].split(" ") : []; - const insertClasses = valueClasses.filter( - (valueClass) => !existingClasses.includes(valueClass) - ); - mergedAttributes[key] = [...existingClasses, ...insertClasses].join(" "); - } else if (key === "style") { - const styleMap = new Map([ - ...parseStyleEntries(mergedAttributes[key]), - ...parseStyleEntries(value) - ]); - mergedAttributes[key] = Array.from(styleMap.entries()).map(([property, val]) => `${property}: ${val}`).join("; "); - } else { - mergedAttributes[key] = value; - } - }); - return mergedAttributes; - }, {}); -} - -// src/helpers/getRenderedAttributes.ts -function getRenderedAttributes(nodeOrMark, extensionAttributes) { - return extensionAttributes.filter((attribute) => attribute.type === nodeOrMark.type.name).filter((item) => item.attribute.rendered).map((item) => { - if (!item.attribute.renderHTML) { - return { - [item.name]: nodeOrMark.attrs[item.name] - }; - } - return item.attribute.renderHTML(nodeOrMark.attrs) || {}; - }).reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {}); -} - -// src/utilities/fromString.ts -function fromString(value) { - if (typeof value !== "string") { - return value; - } - if (value.match(/^[+-]?(?:\d*\.)?\d+$/)) { - return Number(value); - } - if (value === "true") { - return true; - } - if (value === "false") { - return false; - } - return value; -} - -// src/helpers/injectExtensionAttributesToParseRule.ts -function injectExtensionAttributesToParseRule(parseRule, extensionAttributes) { - if ("style" in parseRule) { - return parseRule; - } - return { - ...parseRule, - getAttrs: (node) => { - const oldAttributes = parseRule.getAttrs ? parseRule.getAttrs(node) : parseRule.attrs; - if (oldAttributes === false) { - return false; - } - const newAttributes = extensionAttributes.reduce((items, item) => { - const value = item.attribute.parseHTML ? item.attribute.parseHTML(node) : fromString(node.getAttribute(item.name)); - if (value === null || value === void 0) { - return items; - } - return { - ...items, - [item.name]: value - }; - }, {}); - return { ...oldAttributes, ...newAttributes }; - } - }; -} - -// src/helpers/getSchemaByResolvedExtensions.ts -function cleanUpSchemaItem(data) { - return Object.fromEntries( - // @ts-ignore - Object.entries(data).filter(([key, value]) => { - if (key === "attrs" && isEmptyObject(value)) { - return false; - } - return value !== null && value !== void 0; - }) - ); -} -function buildAttributeSpec(extensionAttribute) { - var _a, _b; - const spec = {}; - if (!((_a = extensionAttribute == null ? void 0 : extensionAttribute.attribute) == null ? void 0 : _a.isRequired) && "default" in ((extensionAttribute == null ? void 0 : extensionAttribute.attribute) || {})) { - spec.default = extensionAttribute.attribute.default; - } - if (((_b = extensionAttribute == null ? void 0 : extensionAttribute.attribute) == null ? void 0 : _b.validate) !== void 0) { - spec.validate = extensionAttribute.attribute.validate; - } - return [extensionAttribute.name, spec]; -} -function getSchemaByResolvedExtensions(extensions, editor) { - var _a; - const allAttributes = getAttributesFromExtensions(extensions); - const { nodeExtensions, markExtensions } = splitExtensions(extensions); - const topNode = (_a = nodeExtensions.find((extension) => getExtensionField(extension, "topNode"))) == null ? void 0 : _a.name; - const nodes = Object.fromEntries( - nodeExtensions.map((extension) => { - const extensionAttributes = allAttributes.filter( - (attribute) => attribute.type === extension.name - ); - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - editor - }; - const extraNodeFields = extensions.reduce((fields, e) => { - const extendNodeSchema = getExtensionField( - e, - "extendNodeSchema", - context - ); - return { - ...fields, - ...extendNodeSchema ? extendNodeSchema(extension) : {} - }; - }, {}); - const schema = cleanUpSchemaItem({ - ...extraNodeFields, - content: callOrReturn( - getExtensionField(extension, "content", context) - ), - marks: callOrReturn(getExtensionField(extension, "marks", context)), - group: callOrReturn(getExtensionField(extension, "group", context)), - inline: callOrReturn(getExtensionField(extension, "inline", context)), - atom: callOrReturn(getExtensionField(extension, "atom", context)), - selectable: callOrReturn( - getExtensionField(extension, "selectable", context) - ), - draggable: callOrReturn( - getExtensionField(extension, "draggable", context) - ), - code: callOrReturn(getExtensionField(extension, "code", context)), - whitespace: callOrReturn( - getExtensionField(extension, "whitespace", context) - ), - linebreakReplacement: callOrReturn( - getExtensionField( - extension, - "linebreakReplacement", - context - ) - ), - defining: callOrReturn( - getExtensionField(extension, "defining", context) - ), - isolating: callOrReturn( - getExtensionField(extension, "isolating", context) - ), - attrs: Object.fromEntries(extensionAttributes.map(buildAttributeSpec)) - }); - const parseHTML = callOrReturn( - getExtensionField(extension, "parseHTML", context) - ); - if (parseHTML) { - schema.parseDOM = parseHTML.map( - (parseRule) => injectExtensionAttributesToParseRule(parseRule, extensionAttributes) - ); - } - const renderHTML = getExtensionField( - extension, - "renderHTML", - context - ); - if (renderHTML) { - schema.toDOM = (node) => renderHTML({ - node, - HTMLAttributes: getRenderedAttributes(node, extensionAttributes) - }); - } - const renderText = getExtensionField( - extension, - "renderText", - context - ); - if (renderText) { - schema.toText = renderText; - } - return [extension.name, schema]; - }) - ); - const marks = Object.fromEntries( - markExtensions.map((extension) => { - const extensionAttributes = allAttributes.filter( - (attribute) => attribute.type === extension.name - ); - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - editor - }; - const extraMarkFields = extensions.reduce((fields, e) => { - const extendMarkSchema = getExtensionField( - e, - "extendMarkSchema", - context - ); - return { - ...fields, - ...extendMarkSchema ? extendMarkSchema(extension) : {} - }; - }, {}); - const schema = cleanUpSchemaItem({ - ...extraMarkFields, - inclusive: callOrReturn( - getExtensionField(extension, "inclusive", context) - ), - excludes: callOrReturn( - getExtensionField(extension, "excludes", context) - ), - group: callOrReturn(getExtensionField(extension, "group", context)), - spanning: callOrReturn( - getExtensionField(extension, "spanning", context) - ), - code: callOrReturn(getExtensionField(extension, "code", context)), - attrs: Object.fromEntries(extensionAttributes.map(buildAttributeSpec)) - }); - const parseHTML = callOrReturn( - getExtensionField(extension, "parseHTML", context) - ); - if (parseHTML) { - schema.parseDOM = parseHTML.map( - (parseRule) => injectExtensionAttributesToParseRule(parseRule, extensionAttributes) - ); - } - const renderHTML = getExtensionField( - extension, - "renderHTML", - context - ); - if (renderHTML) { - schema.toDOM = (mark) => renderHTML({ - mark, - HTMLAttributes: getRenderedAttributes(mark, extensionAttributes) - }); - } - return [extension.name, schema]; - }) - ); - return new import_model4.Schema({ - topNode, - nodes, - marks - }); -} - -// src/utilities/findDuplicates.ts -function findDuplicates(items) { - const filtered = items.filter((el, index) => items.indexOf(el) !== index); - return Array.from(new Set(filtered)); -} - -// src/helpers/sortExtensions.ts -function sortExtensions(extensions) { - const defaultPriority = 100; - return extensions.sort((a, b) => { - const priorityA = getExtensionField(a, "priority") || defaultPriority; - const priorityB = getExtensionField(b, "priority") || defaultPriority; - if (priorityA > priorityB) { - return -1; - } - if (priorityA < priorityB) { - return 1; - } - return 0; - }); -} - -// src/helpers/resolveExtensions.ts -function resolveExtensions(extensions) { - const resolvedExtensions = sortExtensions(flattenExtensions(extensions)); - const duplicatedNames = findDuplicates(resolvedExtensions.map((extension) => extension.name)); - if (duplicatedNames.length) { - console.warn( - `[tiptap warn]: Duplicate extension names found: [${duplicatedNames.map((item) => `'${item}'`).join(", ")}]. This can lead to issues.` - ); - } - return resolvedExtensions; -} - -// src/helpers/getSchema.ts -function getSchema(extensions, editor) { - const resolvedExtensions = resolveExtensions(extensions); - return getSchemaByResolvedExtensions(resolvedExtensions, editor); -} - -// src/helpers/generateHTML.ts -function generateHTML(doc, extensions) { - const schema = getSchema(extensions); - const contentNode = import_model5.Node.fromJSON(schema, doc); - return getHTMLFromFragment(contentNode.content, schema); -} - -// src/helpers/generateJSON.ts -var import_model6 = require("@tiptap/pm/model"); -function generateJSON(html, extensions) { - const schema = getSchema(extensions); - const dom = elementFromString(html); - return import_model6.DOMParser.fromSchema(schema).parse(dom).toJSON(); -} - -// src/helpers/generateText.ts -var import_model7 = require("@tiptap/pm/model"); - -// src/helpers/getTextBetween.ts -function getTextBetween(startNode, range, options) { - const { from, to } = range; - const { blockSeparator = "\n\n", textSerializers = {} } = options || {}; - let text = ""; - startNode.nodesBetween(from, to, (node, pos, parent, index) => { - var _a; - if (node.isBlock && pos > from) { - text += blockSeparator; - } - const textSerializer = textSerializers == null ? void 0 : textSerializers[node.type.name]; - if (textSerializer) { - if (parent) { - text += textSerializer({ - node, - pos, - parent, - index, - range - }); - } - return false; - } - if (node.isText) { - text += (_a = node == null ? void 0 : node.text) == null ? void 0 : _a.slice(Math.max(from, pos) - pos, to - pos); - } - }); - return text; -} - -// src/helpers/getText.ts -function getText(node, options) { - const range = { - from: 0, - to: node.content.size - }; - return getTextBetween(node, range, options); -} - -// src/helpers/getTextSerializersFromSchema.ts -function getTextSerializersFromSchema(schema) { - return Object.fromEntries( - Object.entries(schema.nodes).filter(([, node]) => node.spec.toText).map(([name, node]) => [name, node.spec.toText]) - ); -} - -// src/helpers/generateText.ts -function generateText(doc, extensions, options) { - const { blockSeparator = "\n\n", textSerializers = {} } = options || {}; - const schema = getSchema(extensions); - const contentNode = import_model7.Node.fromJSON(schema, doc); - return getText(contentNode, { - blockSeparator, - textSerializers: { - ...getTextSerializersFromSchema(schema), - ...textSerializers - } - }); -} - -// src/helpers/getNodeAttributes.ts -function getNodeAttributes(state, typeOrName) { - const type = getNodeType(typeOrName, state.schema); - const { from, to } = state.selection; - const nodes = []; - state.doc.nodesBetween(from, to, (node2) => { - nodes.push(node2); - }); - const node = nodes.reverse().find((nodeItem) => nodeItem.type.name === type.name); - if (!node) { - return {}; - } - return { ...node.attrs }; -} - -// src/helpers/getAttributes.ts -function getAttributes(state, typeOrName) { - const schemaType = getSchemaTypeNameByName( - typeof typeOrName === "string" ? typeOrName : typeOrName.name, - state.schema - ); - if (schemaType === "node") { - return getNodeAttributes(state, typeOrName); - } - if (schemaType === "mark") { - return getMarkAttributes(state, typeOrName); - } - return {}; -} - -// src/utilities/removeDuplicates.ts -function removeDuplicates(array, by = JSON.stringify) { - const seen = {}; - return array.filter((item) => { - const key = by(item); - return Object.prototype.hasOwnProperty.call(seen, key) ? false : seen[key] = true; - }); -} - -// src/helpers/getChangedRanges.ts -function simplifyChangedRanges(changes) { - const uniqueChanges = removeDuplicates(changes); - return uniqueChanges.length === 1 ? uniqueChanges : uniqueChanges.filter((change, index) => { - const rest = uniqueChanges.filter((_, i) => i !== index); - return !rest.some((otherChange) => { - return change.oldRange.from >= otherChange.oldRange.from && change.oldRange.to <= otherChange.oldRange.to && change.newRange.from >= otherChange.newRange.from && change.newRange.to <= otherChange.newRange.to; - }); - }); -} -function getChangedRanges(transform) { - const { mapping, steps } = transform; - const changes = []; - mapping.maps.forEach((stepMap, index) => { - const ranges = []; - if (!stepMap.ranges.length) { - const { from, to } = steps[index]; - if (from === void 0 || to === void 0) { - return; - } - ranges.push({ from, to }); - } else { - stepMap.forEach((from, to) => { - ranges.push({ from, to }); - }); - } - ranges.forEach(({ from, to }) => { - const newStart = mapping.slice(index).map(from, -1); - const newEnd = mapping.slice(index).map(to); - const oldStart = mapping.invert().map(newStart, -1); - const oldEnd = mapping.invert().map(newEnd); - changes.push({ - oldRange: { - from: oldStart, - to: oldEnd - }, - newRange: { - from: newStart, - to: newEnd - } - }); - }); - }); - return simplifyChangedRanges(changes); -} - -// src/helpers/getDebugJSON.ts -function getDebugJSON(node, startOffset = 0) { - const isTopNode = node.type === node.type.schema.topNodeType; - const increment = isTopNode ? 0 : 1; - const from = startOffset; - const to = from + node.nodeSize; - const marks = node.marks.map((mark) => { - const output2 = { - type: mark.type.name - }; - if (Object.keys(mark.attrs).length) { - output2.attrs = { ...mark.attrs }; - } - return output2; - }); - const attrs = { ...node.attrs }; - const output = { - type: node.type.name, - from, - to - }; - if (Object.keys(attrs).length) { - output.attrs = attrs; - } - if (marks.length) { - output.marks = marks; - } - if (node.content.childCount) { - output.content = []; - node.forEach((child, offset) => { - var _a; - (_a = output.content) == null ? void 0 : _a.push(getDebugJSON(child, startOffset + offset + increment)); - }); - } - if (node.text) { - output.text = node.text; - } - return output; -} - -// src/helpers/getMarksBetween.ts -function getMarksBetween(from, to, doc) { - const marks = []; - if (from === to) { - doc.resolve(from).marks().forEach((mark) => { - const $pos = doc.resolve(from); - const range = getMarkRange($pos, mark.type); - if (!range) { - return; - } - marks.push({ - mark, - ...range - }); - }); - } else { - doc.nodesBetween(from, to, (node, pos) => { - if (!node || (node == null ? void 0 : node.nodeSize) === void 0) { - return; - } - marks.push( - ...node.marks.map((mark) => ({ - from: pos, - to: pos + node.nodeSize, - mark - })) - ); - }); - } - return marks; -} - -// src/helpers/getNodeAtPosition.ts -var getNodeAtPosition = (state, typeOrName, pos, maxDepth = 20) => { - const $pos = state.doc.resolve(pos); - let currentDepth = maxDepth; - let node = null; - while (currentDepth > 0 && node === null) { - const currentNode = $pos.node(currentDepth); - if ((currentNode == null ? void 0 : currentNode.type.name) === typeOrName) { - node = currentNode; - } else { - currentDepth -= 1; - } - } - return [node, currentDepth]; -}; - -// src/helpers/getSchemaTypeByName.ts -function getSchemaTypeByName(name, schema) { - return schema.nodes[name] || schema.marks[name] || null; -} - -// src/helpers/getSplittedAttributes.ts -function getSplittedAttributes(extensionAttributes, typeName, attributes) { - return Object.fromEntries( - Object.entries(attributes).filter(([name]) => { - const extensionAttribute = extensionAttributes.find((item) => { - return item.type === typeName && item.name === name; - }); - if (!extensionAttribute) { - return false; - } - return extensionAttribute.attribute.keepOnSplit; - }) - ); -} - -// src/helpers/getTextContentFromNodes.ts -var getTextContentFromNodes = ($from, maxMatch = 500) => { - let textBefore = ""; - const sliceEndPos = $from.parentOffset; - $from.parent.nodesBetween( - Math.max(0, sliceEndPos - maxMatch), - sliceEndPos, - (node, pos, parent, index) => { - var _a, _b; - const chunk = ((_b = (_a = node.type.spec).toText) == null ? void 0 : _b.call(_a, { - node, - pos, - parent, - index - })) || node.textContent || "%leaf%"; - textBefore += node.isAtom && !node.isText ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos)); - } - ); - return textBefore; -}; - -// src/helpers/isMarkActive.ts -function isMarkActive(state, typeOrName, attributes = {}) { - const { empty, ranges } = state.selection; - const type = typeOrName ? getMarkType(typeOrName, state.schema) : null; - if (empty) { - return !!(state.storedMarks || state.selection.$from.marks()).filter((mark) => { - if (!type) { - return true; - } - return type.name === mark.type.name; - }).find((mark) => objectIncludes(mark.attrs, attributes, { strict: false })); - } - let selectionRange = 0; - const markRanges = []; - ranges.forEach(({ $from, $to }) => { - const from = $from.pos; - const to = $to.pos; - state.doc.nodesBetween(from, to, (node, pos) => { - if (type && node.inlineContent && !node.type.allowsMarkType(type)) { - return false; - } - if (!node.isText && !node.marks.length) { - return; - } - const relativeFrom = Math.max(from, pos); - const relativeTo = Math.min(to, pos + node.nodeSize); - const range2 = relativeTo - relativeFrom; - selectionRange += range2; - markRanges.push( - ...node.marks.map((mark) => ({ - mark, - from: relativeFrom, - to: relativeTo - })) - ); - }); - }); - if (selectionRange === 0) { - return false; - } - const matchedRange = markRanges.filter((markRange) => { - if (!type) { - return true; - } - return type.name === markRange.mark.type.name; - }).filter((markRange) => objectIncludes(markRange.mark.attrs, attributes, { strict: false })).reduce((sum, markRange) => sum + markRange.to - markRange.from, 0); - const excludedRange = markRanges.filter((markRange) => { - if (!type) { - return true; - } - return markRange.mark.type !== type && markRange.mark.type.excludes(type); - }).reduce((sum, markRange) => sum + markRange.to - markRange.from, 0); - const range = matchedRange > 0 ? matchedRange + excludedRange : matchedRange; - return range >= selectionRange; -} - -// src/helpers/isActive.ts -function isActive(state, name, attributes = {}) { - if (!name) { - return isNodeActive(state, null, attributes) || isMarkActive(state, null, attributes); - } - const schemaType = getSchemaTypeNameByName(name, state.schema); - if (schemaType === "node") { - return isNodeActive(state, name, attributes); - } - if (schemaType === "mark") { - return isMarkActive(state, name, attributes); - } - return false; -} - -// src/helpers/isAtEndOfNode.ts -var isAtEndOfNode = (state, nodeType) => { - const { $from, $to, $anchor } = state.selection; - if (nodeType) { - const parentNode = findParentNode((node) => node.type.name === nodeType)(state.selection); - if (!parentNode) { - return false; - } - const $parentPos = state.doc.resolve(parentNode.pos + 1); - if ($anchor.pos + 1 === $parentPos.end()) { - return true; - } - return false; - } - if ($to.parentOffset < $to.parent.nodeSize - 2 || $from.pos !== $to.pos) { - return false; - } - return true; -}; - -// src/helpers/isAtStartOfNode.ts -var isAtStartOfNode = (state) => { - const { $from, $to } = state.selection; - if ($from.parentOffset > 0 || $from.pos !== $to.pos) { - return false; - } - return true; -}; - -// src/helpers/isExtensionRulesEnabled.ts -function isExtensionRulesEnabled(extension, enabled) { - if (Array.isArray(enabled)) { - return enabled.some((enabledExtension) => { - const name = typeof enabledExtension === "string" ? enabledExtension : enabledExtension.name; - return name === extension.name; - }); - } - return enabled; -} - -// src/helpers/isList.ts -function isList(name, extensions) { - const { nodeExtensions } = splitExtensions(extensions); - const extension = nodeExtensions.find((item) => item.name === name); - if (!extension) { - return false; - } - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage - }; - const group = callOrReturn(getExtensionField(extension, "group", context)); - if (typeof group !== "string") { - return false; - } - return group.split(" ").includes("list"); -} - -// src/helpers/isNodeEmpty.ts -function isNodeEmpty(node, { - checkChildren = true, - ignoreWhitespace = false -} = {}) { - var _a; - if (ignoreWhitespace) { - if (node.type.name === "hardBreak") { - return true; - } - if (node.isText) { - return !/\S/.test((_a = node.text) != null ? _a : ""); - } - } - if (node.isText) { - return !node.text; - } - if (node.isAtom || node.isLeaf) { - return false; - } - if (node.content.childCount === 0) { - return true; - } - if (checkChildren) { - let isContentEmpty = true; - node.content.forEach((childNode) => { - if (isContentEmpty === false) { - return; - } - if (!isNodeEmpty(childNode, { ignoreWhitespace, checkChildren })) { - isContentEmpty = false; - } - }); - return isContentEmpty; - } - return false; -} - -// src/helpers/isNodeSelection.ts -var import_state7 = require("@tiptap/pm/state"); -function isNodeSelection(value) { - return value instanceof import_state7.NodeSelection; -} - -// src/helpers/isNodeViewSelected.ts -function isNodeViewSelected({ - selection, - pos, - nodeSize, - selectedOnTextSelection = false -}) { - const { from, to } = selection; - if (from <= pos && to >= pos + nodeSize) { - return true; - } - if (selectedOnTextSelection && isTextSelection(selection) && from > pos && to < pos + nodeSize) { - return true; - } - return false; -} - -// src/helpers/MappablePosition.ts -var MappablePosition = class _MappablePosition { - constructor(position) { - this.position = position; - } - /** - * Creates a MappablePosition from a JSON object. - */ - static fromJSON(json) { - return new _MappablePosition(json.position); - } - /** - * Converts the MappablePosition to a JSON object. - */ - toJSON() { - return { - position: this.position - }; - } -}; -function getUpdatedPosition(position, transaction) { - const mapResult = transaction.mapping.mapResult(position.position); - return { - position: new MappablePosition(mapResult.pos), - mapResult - }; -} -function createMappablePosition(position) { - return new MappablePosition(position); -} - -// src/helpers/posToDOMRect.ts -function posToDOMRect(view, from, to) { - const minPos = 0; - const maxPos = view.state.doc.content.size; - const resolvedFrom = minMax(from, minPos, maxPos); - const resolvedEnd = minMax(to, minPos, maxPos); - const start = view.coordsAtPos(resolvedFrom); - const end = view.coordsAtPos(resolvedEnd, -1); - const top = Math.min(start.top, end.top); - const bottom = Math.max(start.bottom, end.bottom); - const left = Math.min(start.left, end.left); - const right = Math.max(start.right, end.right); - const width = right - left; - const height = bottom - top; - const x = left; - const y = top; - const data = { - top, - bottom, - left, - right, - width, - height, - x, - y - }; - return { - ...data, - toJSON: () => data - }; -} - -// src/helpers/rewriteUnknownContent.ts -function rewriteUnknownContentInner({ - json, - validMarks, - validNodes, - options, - rewrittenContent = [] -}) { - if (json.marks && Array.isArray(json.marks)) { - json.marks = json.marks.filter((mark) => { - const name = typeof mark === "string" ? mark : mark.type; - if (validMarks.has(name)) { - return true; - } - rewrittenContent.push({ - original: JSON.parse(JSON.stringify(mark)), - unsupported: name - }); - return false; - }); - } - if (json.content && Array.isArray(json.content)) { - json.content = json.content.map( - (value) => rewriteUnknownContentInner({ - json: value, - validMarks, - validNodes, - options, - rewrittenContent - }).json - ).filter((a) => a !== null && a !== void 0); - } - if (json.type && !validNodes.has(json.type)) { - rewrittenContent.push({ - original: JSON.parse(JSON.stringify(json)), - unsupported: json.type - }); - if (json.content && Array.isArray(json.content) && (options == null ? void 0 : options.fallbackToParagraph) !== false) { - json.type = "paragraph"; - return { - json, - rewrittenContent - }; - } - return { - json: null, - rewrittenContent - }; - } - return { json, rewrittenContent }; -} -function rewriteUnknownContent(json, schema, options) { - return rewriteUnknownContentInner({ - json, - validNodes: new Set(Object.keys(schema.nodes)), - validMarks: new Set(Object.keys(schema.marks)), - options - }); -} - -// src/commands/setMark.ts -function canSetMark(state, tr, newMarkType) { - var _a; - const { selection } = tr; - let cursor = null; - if (isTextSelection(selection)) { - cursor = selection.$cursor; - } - if (cursor) { - const currentMarks = (_a = state.storedMarks) != null ? _a : cursor.marks(); - const parentAllowsMarkType = cursor.parent.type.allowsMarkType(newMarkType); - return parentAllowsMarkType && (!!newMarkType.isInSet(currentMarks) || !currentMarks.some((mark) => mark.type.excludes(newMarkType))); - } - const { ranges } = selection; - return ranges.some(({ $from, $to }) => { - let someNodeSupportsMark = $from.depth === 0 ? state.doc.inlineContent && state.doc.type.allowsMarkType(newMarkType) : false; - state.doc.nodesBetween($from.pos, $to.pos, (node, _pos, parent) => { - if (someNodeSupportsMark) { - return false; - } - if (node.isInline) { - const parentAllowsMarkType = !parent || parent.type.allowsMarkType(newMarkType); - const currentMarksAllowMarkType = !!newMarkType.isInSet(node.marks) || !node.marks.some((otherMark) => otherMark.type.excludes(newMarkType)); - someNodeSupportsMark = parentAllowsMarkType && currentMarksAllowMarkType; - } - return !someNodeSupportsMark; - }); - return someNodeSupportsMark; - }); -} -var setMark = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => { - const { selection } = tr; - const { empty, ranges } = selection; - const type = getMarkType(typeOrName, state.schema); - if (dispatch) { - if (empty) { - const oldAttributes = getMarkAttributes(state, type); - tr.addStoredMark( - type.create({ - ...oldAttributes, - ...attributes - }) - ); - } else { - ranges.forEach((range) => { - const from = range.$from.pos; - const to = range.$to.pos; - state.doc.nodesBetween(from, to, (node, pos) => { - const trimmedFrom = Math.max(pos, from); - const trimmedTo = Math.min(pos + node.nodeSize, to); - const someHasMark = node.marks.find((mark) => mark.type === type); - if (someHasMark) { - node.marks.forEach((mark) => { - if (type === mark.type) { - tr.addMark( - trimmedFrom, - trimmedTo, - type.create({ - ...mark.attrs, - ...attributes - }) - ); - } - }); - } else { - tr.addMark(trimmedFrom, trimmedTo, type.create(attributes)); - } - }); - }); - } - } - return canSetMark(state, tr, type); -}; - -// src/commands/setMeta.ts -var setMeta = (key, value) => ({ tr }) => { - tr.setMeta(key, value); - return true; -}; - -// src/commands/setNode.ts -var import_commands14 = require("@tiptap/pm/commands"); -var setNode = (typeOrName, attributes = {}) => ({ state, dispatch, chain }) => { - const type = getNodeType(typeOrName, state.schema); - let attributesToCopy; - if (state.selection.$anchor.sameParent(state.selection.$head)) { - attributesToCopy = state.selection.$anchor.parent.attrs; - } - if (!type.isTextblock) { - console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'); - return false; - } - return chain().command(({ commands }) => { - const canSetBlock = (0, import_commands14.setBlockType)(type, { ...attributesToCopy, ...attributes })(state); - if (canSetBlock) { - return true; - } - return commands.clearNodes(); - }).command(({ state: updatedState }) => { - return (0, import_commands14.setBlockType)(type, { ...attributesToCopy, ...attributes })(updatedState, dispatch); - }).run(); -}; - -// src/commands/setNodeSelection.ts -var import_state8 = require("@tiptap/pm/state"); -var setNodeSelection = (position) => ({ tr, dispatch }) => { - if (dispatch) { - const { doc } = tr; - const from = minMax(position, 0, doc.content.size); - const selection = import_state8.NodeSelection.create(doc, from); - tr.setSelection(selection); - } - return true; -}; - -// src/commands/setTextDirection.ts -var setTextDirection = (direction, position) => ({ tr, state, dispatch }) => { - const { selection } = state; - let from; - let to; - if (typeof position === "number") { - from = position; - to = position; - } else if (position && "from" in position && "to" in position) { - from = position.from; - to = position.to; - } else { - from = selection.from; - to = selection.to; - } - if (dispatch) { - tr.doc.nodesBetween(from, to, (node, pos) => { - if (node.isText) { - return; - } - tr.setNodeMarkup(pos, void 0, { - ...node.attrs, - dir: direction - }); - }); - } - return true; -}; - -// src/commands/setTextSelection.ts -var import_state9 = require("@tiptap/pm/state"); -var setTextSelection = (position) => ({ tr, dispatch }) => { - if (dispatch) { - const { doc } = tr; - const { from, to } = typeof position === "number" ? { from: position, to: position } : position; - const minPos = import_state9.TextSelection.atStart(doc).from; - const maxPos = import_state9.TextSelection.atEnd(doc).to; - const resolvedFrom = minMax(from, minPos, maxPos); - const resolvedEnd = minMax(to, minPos, maxPos); - const selection = import_state9.TextSelection.create(doc, resolvedFrom, resolvedEnd); - tr.setSelection(selection); - } - return true; -}; - -// src/commands/sinkListItem.ts -var import_schema_list2 = require("@tiptap/pm/schema-list"); -var sinkListItem = (typeOrName) => ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - return (0, import_schema_list2.sinkListItem)(type)(state, dispatch); -}; - -// src/commands/splitBlock.ts -var import_state10 = require("@tiptap/pm/state"); -var import_transform6 = require("@tiptap/pm/transform"); -function ensureMarks(state, splittableMarks) { - const marks = state.storedMarks || state.selection.$to.parentOffset && state.selection.$from.marks(); - if (marks) { - const filteredMarks = marks.filter((mark) => splittableMarks == null ? void 0 : splittableMarks.includes(mark.type.name)); - state.tr.ensureMarks(filteredMarks); - } -} -var splitBlock = ({ keepMarks = true } = {}) => ({ tr, state, dispatch, editor }) => { - const { selection, doc } = tr; - const { $from, $to } = selection; - const extensionAttributes = editor.extensionManager.attributes; - const newAttributes = getSplittedAttributes( - extensionAttributes, - $from.node().type.name, - $from.node().attrs - ); - if (selection instanceof import_state10.NodeSelection && selection.node.isBlock) { - if (!$from.parentOffset || !(0, import_transform6.canSplit)(doc, $from.pos)) { - return false; - } - if (dispatch) { - if (keepMarks) { - ensureMarks(state, editor.extensionManager.splittableMarks); - } - tr.split($from.pos).scrollIntoView(); - } - return true; - } - if (!$from.parent.isBlock) { - return false; - } - const atEnd = $to.parentOffset === $to.parent.content.size; - const deflt = $from.depth === 0 ? void 0 : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1))); - let types = atEnd && deflt ? [ - { - type: deflt, - attrs: newAttributes - } - ] : void 0; - let can = (0, import_transform6.canSplit)(tr.doc, tr.mapping.map($from.pos), 1, types); - if (!types && !can && (0, import_transform6.canSplit)(tr.doc, tr.mapping.map($from.pos), 1, deflt ? [{ type: deflt }] : void 0)) { - can = true; - types = deflt ? [ - { - type: deflt, - attrs: newAttributes - } - ] : void 0; - } - if (dispatch) { - if (can) { - if (selection instanceof import_state10.TextSelection) { - tr.deleteSelection(); - } - tr.split(tr.mapping.map($from.pos), 1, types); - if (deflt && !atEnd && !$from.parentOffset && $from.parent.type !== deflt) { - const first2 = tr.mapping.map($from.before()); - const $first = tr.doc.resolve(first2); - if ($from.node(-1).canReplaceWith($first.index(), $first.index() + 1, deflt)) { - tr.setNodeMarkup(tr.mapping.map($from.before()), deflt); - } - } - } - if (keepMarks) { - ensureMarks(state, editor.extensionManager.splittableMarks); - } - tr.scrollIntoView(); - } - return can; -}; - -// src/commands/splitListItem.ts -var import_model8 = require("@tiptap/pm/model"); -var import_state11 = require("@tiptap/pm/state"); -var import_transform7 = require("@tiptap/pm/transform"); -var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr, state, dispatch, editor }) => { - var _a; - const type = getNodeType(typeOrName, state.schema); - const { $from, $to } = state.selection; - const node = state.selection.node; - if (node && node.isBlock || $from.depth < 2 || !$from.sameParent($to)) { - return false; - } - const grandParent = $from.node(-1); - if (grandParent.type !== type) { - return false; - } - const extensionAttributes = editor.extensionManager.attributes; - if ($from.parent.content.size === 0 && $from.node(-1).childCount === $from.indexAfter(-1)) { - if ($from.depth === 2 || $from.node(-3).type !== type || $from.index(-2) !== $from.node(-2).childCount - 1) { - return false; - } - if (dispatch) { - let wrap = import_model8.Fragment.empty; - const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3; - for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d -= 1) { - wrap = import_model8.Fragment.from($from.node(d).copy(wrap)); - } - const depthAfter = ( - // oxlint-disable-next-line no-nested-ternary - $from.indexAfter(-1) < $from.node(-2).childCount ? 1 : $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3 - ); - const newNextTypeAttributes2 = { - ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs), - ...overrideAttrs - }; - const nextType2 = ((_a = type.contentMatch.defaultType) == null ? void 0 : _a.createAndFill(newNextTypeAttributes2)) || void 0; - wrap = wrap.append(import_model8.Fragment.from(type.createAndFill(null, nextType2) || void 0)); - const start = $from.before($from.depth - (depthBefore - 1)); - tr.replace(start, $from.after(-depthAfter), new import_model8.Slice(wrap, 4 - depthBefore, 0)); - let sel = -1; - tr.doc.nodesBetween(start, tr.doc.content.size, (n, pos) => { - if (sel > -1) { - return false; - } - if (n.isTextblock && n.content.size === 0) { - sel = pos + 1; - } - }); - if (sel > -1) { - tr.setSelection(import_state11.TextSelection.near(tr.doc.resolve(sel))); - } - tr.scrollIntoView(); - } - return true; - } - const nextType = $to.pos === $from.end() ? grandParent.contentMatchAt(0).defaultType : null; - const newTypeAttributes = { - ...getSplittedAttributes(extensionAttributes, grandParent.type.name, grandParent.attrs), - ...overrideAttrs - }; - const newNextTypeAttributes = { - ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs), - ...overrideAttrs - }; - tr.delete($from.pos, $to.pos); - const types = nextType ? [ - { type, attrs: newTypeAttributes }, - { type: nextType, attrs: newNextTypeAttributes } - ] : [{ type, attrs: newTypeAttributes }]; - if (!(0, import_transform7.canSplit)(tr.doc, $from.pos, 2)) { - return false; - } - if (dispatch) { - const { selection, storedMarks } = state; - const { splittableMarks } = editor.extensionManager; - const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks(); - tr.split($from.pos, 2, types).scrollIntoView(); - if (!marks || !dispatch) { - return true; - } - const filteredMarks = marks.filter((mark) => splittableMarks.includes(mark.type.name)); - tr.ensureMarks(filteredMarks); - } - return true; -}; - -// src/commands/toggleList.ts -var import_state12 = require("@tiptap/pm/state"); -var import_transform8 = require("@tiptap/pm/transform"); -var joinListBackwards = (tr, listType) => { - const list = findParentNode((node) => node.type === listType)(tr.selection); - if (!list) { - return true; - } - const before = tr.doc.resolve(Math.max(0, list.pos - 1)).before(list.depth); - if (before === void 0) { - return true; - } - const nodeBefore = tr.doc.nodeAt(before); - const canJoinBackwards = list.node.type === (nodeBefore == null ? void 0 : nodeBefore.type) && (0, import_transform8.canJoin)(tr.doc, list.pos); - if (!canJoinBackwards) { - return true; - } - tr.join(list.pos); - return true; -}; -var joinListForwards = (tr, listType) => { - const list = findParentNode((node) => node.type === listType)(tr.selection); - if (!list) { - return true; - } - const after = tr.doc.resolve(list.start).after(list.depth); - if (after === void 0) { - return true; - } - const nodeAfter = tr.doc.nodeAt(after); - const canJoinForwards = list.node.type === (nodeAfter == null ? void 0 : nodeAfter.type) && (0, import_transform8.canJoin)(tr.doc, after); - if (!canJoinForwards) { - return true; - } - tr.join(after); - return true; -}; -function createInnerSelectionForWholeDocList(tr) { - const doc = tr.doc; - const list = doc.firstChild; - if (!list) { - return null; - } - const $start = doc.resolve(1); - const $end = doc.resolve(list.nodeSize - 1); - return import_state12.TextSelection.between($start, $end); -} -var toggleList = (listTypeOrName, itemTypeOrName, keepMarks, attributes = {}) => ({ editor, tr, state, dispatch, chain, commands, can }) => { - const { extensions, splittableMarks } = editor.extensionManager; - const listType = getNodeType(listTypeOrName, state.schema); - const itemType = getNodeType(itemTypeOrName, state.schema); - const { selection, storedMarks } = state; - const { $from, $to } = selection; - const range = $from.blockRange($to); - const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks(); - if (!range) { - return false; - } - const parentList = findParentNode((node) => isList(node.type.name, extensions))(selection); - const isAllSelection = selection.from === 0 && selection.to === state.doc.content.size; - const topLevelNodes = state.doc.content.content; - const soleTopLevelNode = topLevelNodes.length === 1 ? topLevelNodes[0] : null; - const allSelectionList = isAllSelection && soleTopLevelNode && isList(soleTopLevelNode.type.name, extensions) ? { - node: soleTopLevelNode, - pos: 0, - depth: 0 - } : null; - const currentList = parentList != null ? parentList : allSelectionList; - const isInsideExistingList = !!parentList && range.depth >= 1 && range.depth - parentList.depth <= 1; - const hasWholeDocSelectedList = !!allSelectionList; - if ((isInsideExistingList || hasWholeDocSelectedList) && currentList) { - if (currentList.node.type === listType) { - if (isAllSelection && hasWholeDocSelectedList) { - return chain().command(({ tr: trx, dispatch: disp }) => { - const nextSelection = createInnerSelectionForWholeDocList(trx); - if (!nextSelection) { - return false; - } - trx.setSelection(nextSelection); - if (disp) { - disp(trx); - } - return true; - }).liftListItem(itemType).run(); - } - return commands.liftListItem(itemType); - } - if (isList(currentList.node.type.name, extensions) && listType.validContent(currentList.node.content)) { - return chain().command(() => { - tr.setNodeMarkup(currentList.pos, listType); - return true; - }).command(() => joinListBackwards(tr, listType)).command(() => joinListForwards(tr, listType)).run(); - } - } - if (!keepMarks || !marks || !dispatch) { - return chain().command(() => { - const canWrapInList = can().wrapInList(listType, attributes); - if (canWrapInList) { - return true; - } - return commands.clearNodes(); - }).wrapInList(listType, attributes).command(() => joinListBackwards(tr, listType)).command(() => joinListForwards(tr, listType)).run(); - } - return chain().command(() => { - const canWrapInList = can().wrapInList(listType, attributes); - const filteredMarks = marks.filter((mark) => splittableMarks.includes(mark.type.name)); - tr.ensureMarks(filteredMarks); - if (canWrapInList) { - return true; - } - return commands.clearNodes(); - }).wrapInList(listType, attributes).command(() => joinListBackwards(tr, listType)).command(() => joinListForwards(tr, listType)).run(); -}; - -// src/commands/toggleMark.ts -var toggleMark = (typeOrName, attributes = {}, options = {}) => ({ state, commands }) => { - const { extendEmptyMarkRange = false } = options; - const type = getMarkType(typeOrName, state.schema); - const isActive2 = isMarkActive(state, type, attributes); - if (isActive2) { - return commands.unsetMark(type, { extendEmptyMarkRange }); - } - return commands.setMark(type, attributes); -}; - -// src/commands/toggleNode.ts -var toggleNode = (typeOrName, toggleTypeOrName, attributes = {}) => ({ state, commands }) => { - const type = getNodeType(typeOrName, state.schema); - const toggleType = getNodeType(toggleTypeOrName, state.schema); - const isActive2 = isNodeActive(state, type, attributes); - let attributesToCopy; - if (state.selection.$anchor.sameParent(state.selection.$head)) { - attributesToCopy = state.selection.$anchor.parent.attrs; - } - if (isActive2) { - return commands.setNode(toggleType, attributesToCopy); - } - return commands.setNode(type, { ...attributesToCopy, ...attributes }); -}; - -// src/commands/toggleWrap.ts -var toggleWrap = (typeOrName, attributes = {}) => ({ state, commands }) => { - const type = getNodeType(typeOrName, state.schema); - const isActive2 = isNodeActive(state, type, attributes); - if (isActive2) { - return commands.lift(type); - } - return commands.wrapIn(type, attributes); -}; - -// src/commands/undoInputRule.ts -var undoInputRule = () => ({ state, dispatch }) => { - const plugins = state.plugins; - for (let i = 0; i < plugins.length; i += 1) { - const plugin = plugins[i]; - let undoable; - if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) { - if (dispatch) { - const tr = state.tr; - const toUndo = undoable.transform; - for (let j = toUndo.steps.length - 1; j >= 0; j -= 1) { - tr.step(toUndo.steps[j].invert(toUndo.docs[j])); - } - if (undoable.text) { - const marks = tr.doc.resolve(undoable.from).marks(); - tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks)); - } else { - tr.delete(undoable.from, undoable.to); - } - } - return true; - } - } - return false; -}; - -// src/commands/unsetAllMarks.ts -var unsetAllMarks = (options = {}) => ({ tr, dispatch, editor }) => { - const { ignoreClearable = false } = options; - const { selection } = tr; - const { empty, ranges } = selection; - if (empty) { - return true; - } - const { nonClearableMarks } = editor.extensionManager; - if (dispatch) { - const clearableMarkTypes = Object.values(editor.schema.marks).filter( - (markType) => ignoreClearable || !nonClearableMarks.includes(markType.name) - ); - ranges.forEach((range) => { - for (const markType of clearableMarkTypes) { - tr.removeMark(range.$from.pos, range.$to.pos, markType); - } - }); - } - return true; -}; - -// src/commands/unsetMark.ts -var unsetMark = (typeOrName, options = {}) => ({ tr, state, dispatch }) => { - var _a; - const { extendEmptyMarkRange = false } = options; - const { selection } = tr; - const type = getMarkType(typeOrName, state.schema); - const { $from, empty, ranges } = selection; - if (!dispatch) { - return true; - } - if (empty && extendEmptyMarkRange) { - let { from, to } = selection; - const attrs = (_a = $from.marks().find((mark) => mark.type === type)) == null ? void 0 : _a.attrs; - const range = getMarkRange($from, type, attrs); - if (range) { - from = range.from; - to = range.to; - } - tr.removeMark(from, to, type); - } else { - ranges.forEach((range) => { - tr.removeMark(range.$from.pos, range.$to.pos, type); - }); - } - tr.removeStoredMark(type); - return true; -}; - -// src/commands/unsetTextDirection.ts -var unsetTextDirection = (position) => ({ tr, state, dispatch }) => { - const { selection } = state; - let from; - let to; - if (typeof position === "number") { - from = position; - to = position; - } else if (position && "from" in position && "to" in position) { - from = position.from; - to = position.to; - } else { - from = selection.from; - to = selection.to; - } - if (dispatch) { - tr.doc.nodesBetween(from, to, (node, pos) => { - if (node.isText) { - return; - } - const newAttrs = { ...node.attrs }; - delete newAttrs.dir; - tr.setNodeMarkup(pos, void 0, newAttrs); - }); - } - return true; -}; - -// src/commands/updateAttributes.ts -var updateAttributes = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => { - let nodeType = null; - let markType = null; - const schemaType = getSchemaTypeNameByName( - typeof typeOrName === "string" ? typeOrName : typeOrName.name, - state.schema - ); - if (!schemaType) { - return false; - } - if (schemaType === "node") { - nodeType = getNodeType(typeOrName, state.schema); - } - if (schemaType === "mark") { - markType = getMarkType(typeOrName, state.schema); - } - let canUpdate = false; - tr.selection.ranges.forEach((range) => { - const from = range.$from.pos; - const to = range.$to.pos; - let lastPos; - let lastNode; - let trimmedFrom; - let trimmedTo; - if (tr.selection.empty) { - state.doc.nodesBetween(from, to, (node, pos) => { - if (nodeType && nodeType === node.type) { - canUpdate = true; - trimmedFrom = Math.max(pos, from); - trimmedTo = Math.min(pos + node.nodeSize, to); - lastPos = pos; - lastNode = node; - } - }); - } else { - state.doc.nodesBetween(from, to, (node, pos) => { - if (pos < from && nodeType && nodeType === node.type) { - canUpdate = true; - trimmedFrom = Math.max(pos, from); - trimmedTo = Math.min(pos + node.nodeSize, to); - lastPos = pos; - lastNode = node; - } - if (pos >= from && pos <= to) { - if (nodeType && nodeType === node.type) { - canUpdate = true; - if (dispatch) { - tr.setNodeMarkup(pos, void 0, { - ...node.attrs, - ...attributes - }); - } - } - if (markType && node.marks.length) { - node.marks.forEach((mark) => { - if (markType === mark.type) { - canUpdate = true; - if (dispatch) { - const trimmedFrom2 = Math.max(pos, from); - const trimmedTo2 = Math.min(pos + node.nodeSize, to); - tr.addMark( - trimmedFrom2, - trimmedTo2, - markType.create({ - ...mark.attrs, - ...attributes - }) - ); - } - } - }); - } - } - }); - } - if (lastNode) { - if (lastPos !== void 0 && dispatch) { - tr.setNodeMarkup(lastPos, void 0, { - ...lastNode.attrs, - ...attributes - }); - } - if (markType && lastNode.marks.length) { - lastNode.marks.forEach((mark) => { - if (markType === mark.type && dispatch) { - tr.addMark( - trimmedFrom, - trimmedTo, - markType.create({ - ...mark.attrs, - ...attributes - }) - ); - } - }); - } - } - }); - return canUpdate; -}; - -// src/commands/wrapIn.ts -var import_commands15 = require("@tiptap/pm/commands"); -var wrapIn = (typeOrName, attributes = {}) => ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - return (0, import_commands15.wrapIn)(type, attributes)(state, dispatch); -}; - -// src/commands/wrapInList.ts -var import_schema_list3 = require("@tiptap/pm/schema-list"); -var wrapInList = (typeOrName, attributes = {}) => ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - return (0, import_schema_list3.wrapInList)(type, attributes)(state, dispatch); -}; - -// src/Editor.ts -var import_state23 = require("@tiptap/pm/state"); -var import_view = require("@tiptap/pm/view"); - -// src/EventEmitter.ts -var EventEmitter = class { - constructor() { - this.callbacks = {}; - } - on(event, fn) { - if (!this.callbacks[event]) { - this.callbacks[event] = []; - } - this.callbacks[event].push(fn); - return this; - } - emit(event, ...args) { - const callbacks = this.callbacks[event]; - if (callbacks) { - callbacks.forEach((callback) => callback.apply(this, args)); - } - return this; - } - off(event, fn) { - const callbacks = this.callbacks[event]; - if (callbacks) { - if (fn) { - this.callbacks[event] = callbacks.filter((callback) => callback !== fn); - } else { - delete this.callbacks[event]; - } - } - return this; - } - once(event, fn) { - const onceFn = (...args) => { - this.off(event, onceFn); - fn.apply(this, args); - }; - return this.on(event, onceFn); - } - removeAllListeners() { - this.callbacks = {}; - } -}; - -// src/ExtensionManager.ts -var import_keymap = require("@tiptap/pm/keymap"); - -// src/InputRule.ts -var import_model9 = require("@tiptap/pm/model"); -var import_state13 = require("@tiptap/pm/state"); -var InputRule = class { - constructor(config) { - var _a; - this.find = config.find; - this.handler = config.handler; - this.undoable = (_a = config.undoable) != null ? _a : true; - } -}; -var inputRuleMatcherHandler = (text, find) => { - if (isRegExp(find)) { - return find.exec(text); - } - const inputRuleMatch = find(text); - if (!inputRuleMatch) { - return null; - } - const result = [inputRuleMatch.text]; - result.index = inputRuleMatch.index; - result.input = text; - result.data = inputRuleMatch.data; - if (inputRuleMatch.replaceWith) { - if (!inputRuleMatch.text.includes(inputRuleMatch.replaceWith)) { - console.warn( - '[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".' - ); - } - result.push(inputRuleMatch.replaceWith); - } - return result; -}; -function run(config) { - var _a; - const { editor, from, to, text, rules, plugin } = config; - const { view } = editor; - if (view.composing) { - return false; - } - const $from = view.state.doc.resolve(from); - if ( - // check for code node - $from.parent.type.spec.code || // check for code mark - !!((_a = $from.nodeBefore || $from.nodeAfter) == null ? void 0 : _a.marks.find((mark) => mark.type.spec.code)) - ) { - return false; - } - let matched = false; - const textBefore = getTextContentFromNodes($from) + text; - rules.forEach((rule) => { - if (matched) { - return; - } - const match = inputRuleMatcherHandler(textBefore, rule.find); - if (!match) { - return; - } - const tr = view.state.tr; - const state = createChainableState({ - state: view.state, - transaction: tr - }); - const range = { - from: from - (match[0].length - text.length), - to - }; - const { commands, chain, can } = new CommandManager({ - editor, - state - }); - const handler = rule.handler({ - state, - range, - match, - commands, - chain, - can - }); - if (handler === null || !tr.steps.length) { - return; - } - if (rule.undoable) { - tr.setMeta(plugin, { - transform: tr, - from, - to, - text - }); - } - view.dispatch(tr); - matched = true; - }); - return matched; -} -function inputRulesPlugin(props) { - const { editor, rules } = props; - const plugin = new import_state13.Plugin({ - state: { - init() { - return null; - }, - apply(tr, prev, state) { - const stored = tr.getMeta(plugin); - if (stored) { - return stored; - } - const simulatedInputMeta = tr.getMeta("applyInputRules"); - const isSimulatedInput = !!simulatedInputMeta; - if (isSimulatedInput) { - setTimeout(() => { - let { text } = simulatedInputMeta; - if (typeof text === "string") { - text = text; - } else { - text = getHTMLFromFragment(import_model9.Fragment.from(text), state.schema); - } - const { from } = simulatedInputMeta; - const to = from + text.length; - run({ - editor, - from, - to, - text, - rules, - plugin - }); - }); - } - return tr.selectionSet || tr.docChanged ? null : prev; - } - }, - props: { - handleTextInput(view, from, to, text) { - return run({ - editor, - from, - to, - text, - rules, - plugin - }); - }, - handleDOMEvents: { - compositionend: (view) => { - setTimeout(() => { - const { $cursor } = view.state.selection; - if ($cursor) { - run({ - editor, - from: $cursor.pos, - to: $cursor.pos, - text: "", - rules, - plugin - }); - } - }); - return false; - } - }, - // add support for input rules to trigger on enter - // this is useful for example for code blocks - handleKeyDown(view, event) { - if (event.key !== "Enter") { - return false; - } - const { $cursor } = view.state.selection; - if ($cursor) { - return run({ - editor, - from: $cursor.pos, - to: $cursor.pos, - text: "\n", - rules, - plugin - }); - } - return false; - } - }, - // @ts-ignore - isInputRules: true - }); - return plugin; -} - -// src/utilities/isPlainObject.ts -function getType(value) { - return Object.prototype.toString.call(value).slice(8, -1); -} -function isPlainObject(value) { - if (getType(value) !== "Object") { - return false; - } - return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype; -} - -// src/utilities/mergeDeep.ts -function mergeDeep(target, source) { - const output = { ...target }; - if (isPlainObject(target) && isPlainObject(source)) { - Object.keys(source).forEach((key) => { - if (isPlainObject(source[key]) && isPlainObject(target[key])) { - output[key] = mergeDeep(target[key], source[key]); - } else { - output[key] = source[key]; - } - }); - } - return output; -} - -// src/Extendable.ts -var Extendable = class { - constructor(config = {}) { - this.type = "extendable"; - this.parent = null; - this.child = null; - this.name = ""; - this.config = { - name: this.name - }; - this.config = { - ...this.config, - ...config - }; - this.name = this.config.name; - } - get options() { - return { - ...callOrReturn( - getExtensionField(this, "addOptions", { - name: this.name - }) - ) - }; - } - get storage() { - return { - ...callOrReturn( - getExtensionField(this, "addStorage", { - name: this.name, - options: this.options - }) - ) - }; - } - configure(options = {}) { - const extension = this.extend({ - ...this.config, - addOptions: () => { - return mergeDeep(this.options, options); - } - }); - extension.name = this.name; - extension.parent = this.parent; - this.child = null; - return extension; - } - extend(extendedConfig = {}) { - const extension = new this.constructor({ ...this.config, ...extendedConfig }); - extension.parent = this; - this.child = extension; - extension.name = "name" in extendedConfig ? extendedConfig.name : extension.parent.name; - return extension; - } -}; - -// src/Mark.ts -var Mark = class _Mark extends Extendable { - constructor() { - super(...arguments); - this.type = "mark"; - } - /** - * Create a new Mark instance - * @param config - Mark configuration object or a function that returns a configuration object - */ - static create(config = {}) { - const resolvedConfig = typeof config === "function" ? config() : config; - return new _Mark(resolvedConfig); - } - static handleExit({ editor, mark }) { - const { tr } = editor.state; - const currentPos = editor.state.selection.$from; - const isAtEnd = currentPos.pos === currentPos.end(); - if (isAtEnd) { - const currentMarks = currentPos.marks(); - const isInMark = !!currentMarks.find((m) => (m == null ? void 0 : m.type.name) === mark.name); - if (!isInMark) { - return false; - } - const removeMark = currentMarks.find((m) => (m == null ? void 0 : m.type.name) === mark.name); - if (removeMark) { - tr.removeStoredMark(removeMark); - } - tr.insertText(" ", currentPos.pos); - editor.view.dispatch(tr); - return true; - } - return false; - } - configure(options) { - return super.configure(options); - } - extend(extendedConfig) { - const resolvedConfig = typeof extendedConfig === "function" ? extendedConfig() : extendedConfig; - return super.extend(resolvedConfig); - } -}; - -// src/PasteRule.ts -var import_model10 = require("@tiptap/pm/model"); -var import_state14 = require("@tiptap/pm/state"); - -// src/utilities/isNumber.ts -function isNumber(value) { - return typeof value === "number"; -} - -// src/PasteRule.ts -var PasteRule = class { - constructor(config) { - this.find = config.find; - this.handler = config.handler; - } -}; -var pasteRuleMatcherHandler = (text, find, event) => { - if (isRegExp(find)) { - return [...text.matchAll(find)]; - } - const matches = find(text, event); - if (!matches) { - return []; - } - return matches.map((pasteRuleMatch) => { - const result = [pasteRuleMatch.text]; - result.index = pasteRuleMatch.index; - result.input = text; - result.data = pasteRuleMatch.data; - if (pasteRuleMatch.replaceWith) { - if (!pasteRuleMatch.text.includes(pasteRuleMatch.replaceWith)) { - console.warn( - '[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".' - ); - } - result.push(pasteRuleMatch.replaceWith); - } - return result; - }); -}; -function run2(config) { - const { editor, state, from, to, rule, pasteEvent, dropEvent } = config; - const { commands, chain, can } = new CommandManager({ - editor, - state - }); - const handlers = []; - state.doc.nodesBetween(from, to, (node, pos) => { - var _a, _b, _c, _d, _e; - if (((_b = (_a = node.type) == null ? void 0 : _a.spec) == null ? void 0 : _b.code) || !(node.isText || node.isTextblock || node.isInline)) { - return; - } - const contentSize = (_e = (_d = (_c = node.content) == null ? void 0 : _c.size) != null ? _d : node.nodeSize) != null ? _e : 0; - const resolvedFrom = Math.max(from, pos); - const resolvedTo = Math.min(to, pos + contentSize); - if (resolvedFrom >= resolvedTo) { - return; - } - const textToMatch = node.isText ? node.text || "" : node.textBetween(resolvedFrom - pos, resolvedTo - pos, void 0, "\uFFFC"); - const matches = pasteRuleMatcherHandler(textToMatch, rule.find, pasteEvent); - matches.forEach((match) => { - if (match.index === void 0) { - return; - } - const start = resolvedFrom + match.index + 1; - const end = start + match[0].length; - const range = { - from: state.tr.mapping.map(start), - to: state.tr.mapping.map(end) - }; - const handler = rule.handler({ - state, - range, - match, - commands, - chain, - can, - pasteEvent, - dropEvent - }); - handlers.push(handler); - }); - }); - const success = handlers.every((handler) => handler !== null); - return success; -} -var tiptapDragFromOtherEditor = null; -var createClipboardPasteEvent = (text) => { - var _a; - const event = new ClipboardEvent("paste", { - clipboardData: new DataTransfer() - }); - (_a = event.clipboardData) == null ? void 0 : _a.setData("text/html", text); - return event; -}; -function pasteRulesPlugin(props) { - const { editor, rules } = props; - let dragSourceElement = null; - let isPastedFromProseMirror = false; - let isDroppedFromProseMirror = false; - let pasteEvent = typeof ClipboardEvent !== "undefined" ? new ClipboardEvent("paste") : null; - let dropEvent; - try { - dropEvent = typeof DragEvent !== "undefined" ? new DragEvent("drop") : null; - } catch { - dropEvent = null; - } - const processEvent = ({ - state, - from, - to, - rule, - pasteEvt - }) => { - const tr = state.tr; - const chainableState = createChainableState({ - state, - transaction: tr - }); - const handler = run2({ - editor, - state: chainableState, - from: Math.max(from - 1, 0), - to: to.b - 1, - rule, - pasteEvent: pasteEvt, - dropEvent - }); - if (!handler || !tr.steps.length) { - return; - } - try { - dropEvent = typeof DragEvent !== "undefined" ? new DragEvent("drop") : null; - } catch { - dropEvent = null; - } - pasteEvent = typeof ClipboardEvent !== "undefined" ? new ClipboardEvent("paste") : null; - return tr; - }; - const plugins = rules.map((rule) => { - return new import_state14.Plugin({ - // we register a global drag handler to track the current drag source element - view(view) { - const handleDragstart = (event) => { - var _a; - dragSourceElement = ((_a = view.dom.parentElement) == null ? void 0 : _a.contains(event.target)) ? view.dom.parentElement : null; - if (dragSourceElement) { - tiptapDragFromOtherEditor = editor; - } - }; - const handleDragend = () => { - if (tiptapDragFromOtherEditor) { - tiptapDragFromOtherEditor = null; - } - }; - window.addEventListener("dragstart", handleDragstart); - window.addEventListener("dragend", handleDragend); - return { - destroy() { - window.removeEventListener("dragstart", handleDragstart); - window.removeEventListener("dragend", handleDragend); - } - }; - }, - props: { - handleDOMEvents: { - drop: (view, event) => { - isDroppedFromProseMirror = dragSourceElement === view.dom.parentElement; - dropEvent = event; - if (!isDroppedFromProseMirror) { - const dragFromOtherEditor = tiptapDragFromOtherEditor; - if (dragFromOtherEditor == null ? void 0 : dragFromOtherEditor.isEditable) { - setTimeout(() => { - const selection = dragFromOtherEditor.state.selection; - if (selection) { - dragFromOtherEditor.commands.deleteRange({ - from: selection.from, - to: selection.to - }); - } - }, 10); - } - } - return false; - }, - paste: (_view, event) => { - var _a; - const html = (_a = event.clipboardData) == null ? void 0 : _a.getData("text/html"); - pasteEvent = event; - isPastedFromProseMirror = !!(html == null ? void 0 : html.includes("data-pm-slice")); - return false; - } - } - }, - appendTransaction: (transactions, oldState, state) => { - const transaction = transactions[0]; - const isPaste = transaction.getMeta("uiEvent") === "paste" && !isPastedFromProseMirror; - const isDrop = transaction.getMeta("uiEvent") === "drop" && !isDroppedFromProseMirror; - const simulatedPasteMeta = transaction.getMeta("applyPasteRules"); - const isSimulatedPaste = !!simulatedPasteMeta; - if (!isPaste && !isDrop && !isSimulatedPaste) { - return; - } - if (isSimulatedPaste) { - let { text } = simulatedPasteMeta; - if (typeof text === "string") { - text = text; - } else { - text = getHTMLFromFragment(import_model10.Fragment.from(text), state.schema); - } - const { from: from2 } = simulatedPasteMeta; - const to2 = from2 + text.length; - const pasteEvt = createClipboardPasteEvent(text); - return processEvent({ - rule, - state, - from: from2, - to: { b: to2 }, - pasteEvt - }); - } - const from = oldState.doc.content.findDiffStart(state.doc.content); - const to = oldState.doc.content.findDiffEnd(state.doc.content); - if (!isNumber(from) || !to || from === to.b) { - return; - } - return processEvent({ - rule, - state, - from, - to, - pasteEvt: pasteEvent - }); - } - }); - }); - return plugins; -} - -// src/ExtensionManager.ts -var ExtensionManager = class { - constructor(extensions, editor) { - this.splittableMarks = []; - this.nonClearableMarks = []; - this.editor = editor; - this.baseExtensions = extensions; - this.extensions = resolveExtensions(extensions); - this.schema = getSchemaByResolvedExtensions(this.extensions, editor); - this.setupExtensions(); - } - /** - * Get all commands from the extensions. - * @returns An object with all commands where the key is the command name and the value is the command function - */ - get commands() { - return this.extensions.reduce((commands, extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor: this.editor, - type: getSchemaTypeByName(extension.name, this.schema) - }; - const addCommands = getExtensionField( - extension, - "addCommands", - context - ); - if (!addCommands) { - return commands; - } - return { - ...commands, - ...addCommands() - }; - }, {}); - } - /** - * Get all registered Prosemirror plugins from the extensions. - * @returns An array of Prosemirror plugins - */ - get plugins() { - const { editor } = this; - const extensions = sortExtensions([...this.extensions].reverse()); - const allPlugins = extensions.flatMap((extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor, - type: getSchemaTypeByName(extension.name, this.schema) - }; - const plugins = []; - const addKeyboardShortcuts = getExtensionField( - extension, - "addKeyboardShortcuts", - context - ); - let defaultBindings = {}; - if (extension.type === "mark" && getExtensionField(extension, "exitable", context)) { - defaultBindings.ArrowRight = () => Mark.handleExit({ editor, mark: extension }); - } - if (addKeyboardShortcuts) { - const bindings = Object.fromEntries( - Object.entries(addKeyboardShortcuts()).map(([shortcut, method]) => { - return [shortcut, () => method({ editor })]; - }) - ); - defaultBindings = { ...defaultBindings, ...bindings }; - } - const keyMapPlugin = (0, import_keymap.keymap)(defaultBindings); - plugins.push(keyMapPlugin); - const addInputRules = getExtensionField( - extension, - "addInputRules", - context - ); - if (isExtensionRulesEnabled(extension, editor.options.enableInputRules) && addInputRules) { - const rules = addInputRules(); - if (rules && rules.length) { - const inputResult = inputRulesPlugin({ - editor, - rules - }); - const inputPlugins = Array.isArray(inputResult) ? inputResult : [inputResult]; - plugins.push(...inputPlugins); - } - } - const addPasteRules = getExtensionField( - extension, - "addPasteRules", - context - ); - if (isExtensionRulesEnabled(extension, editor.options.enablePasteRules) && addPasteRules) { - const rules = addPasteRules(); - if (rules && rules.length) { - const pasteRules = pasteRulesPlugin({ editor, rules }); - plugins.push(...pasteRules); - } - } - const addProseMirrorPlugins = getExtensionField( - extension, - "addProseMirrorPlugins", - context - ); - if (addProseMirrorPlugins) { - const proseMirrorPlugins = addProseMirrorPlugins(); - plugins.push(...proseMirrorPlugins); - } - return plugins; - }); - return allPlugins; - } - /** - * Get all attributes from the extensions. - * @returns An array of attributes - */ - get attributes() { - return getAttributesFromExtensions(this.extensions); - } - /** - * Get all node views from the extensions. - * @returns An object with all node views where the key is the node name and the value is the node view function - */ - get nodeViews() { - const { editor } = this; - const { nodeExtensions } = splitExtensions(this.extensions); - return Object.fromEntries( - nodeExtensions.filter((extension) => !!getExtensionField(extension, "addNodeView")).map((extension) => { - const extensionAttributes = this.attributes.filter( - (attribute) => attribute.type === extension.name - ); - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor, - type: getNodeType(extension.name, this.schema) - }; - const addNodeView = getExtensionField( - extension, - "addNodeView", - context - ); - if (!addNodeView) { - return []; - } - const nodeViewResult = addNodeView(); - if (!nodeViewResult) { - return []; - } - const nodeview = (node, view, getPos, decorations, innerDecorations) => { - const HTMLAttributes = getRenderedAttributes(node, extensionAttributes); - return nodeViewResult({ - // pass-through - node, - view, - getPos, - decorations, - innerDecorations, - // tiptap-specific - editor, - extension, - HTMLAttributes - }); - }; - return [extension.name, nodeview]; - }) - ); - } - /** - * Get the composed dispatchTransaction function from all extensions. - * @param baseDispatch The base dispatch function (e.g. from the editor or user props) - * @returns A composed dispatch function - */ - dispatchTransaction(baseDispatch) { - const { editor } = this; - const extensions = sortExtensions([...this.extensions].reverse()); - return extensions.reduceRight((next, extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor, - type: getSchemaTypeByName(extension.name, this.schema) - }; - const dispatchTransaction = getExtensionField( - extension, - "dispatchTransaction", - context - ); - if (!dispatchTransaction) { - return next; - } - return (transaction) => { - dispatchTransaction.call(context, { transaction, next }); - }; - }, baseDispatch); - } - /** - * Get the composed transformPastedHTML function from all extensions. - * @param baseTransform The base transform function (e.g. from the editor props) - * @returns A composed transform function that chains all extension transforms - */ - transformPastedHTML(baseTransform) { - const { editor } = this; - const extensions = sortExtensions([...this.extensions]); - return extensions.reduce( - (transform, extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor, - type: getSchemaTypeByName(extension.name, this.schema) - }; - const extensionTransform = getExtensionField( - extension, - "transformPastedHTML", - context - ); - if (!extensionTransform) { - return transform; - } - return (html, view) => { - const transformedHtml = transform(html, view); - return extensionTransform.call(context, transformedHtml); - }; - }, - baseTransform || ((html) => html) - ); - } - get markViews() { - const { editor } = this; - const { markExtensions } = splitExtensions(this.extensions); - return Object.fromEntries( - markExtensions.filter((extension) => !!getExtensionField(extension, "addMarkView")).map((extension) => { - const extensionAttributes = this.attributes.filter( - (attribute) => attribute.type === extension.name - ); - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor, - type: getMarkType(extension.name, this.schema) - }; - const addMarkView = getExtensionField( - extension, - "addMarkView", - context - ); - if (!addMarkView) { - return []; - } - const markView = (mark, view, inline) => { - const HTMLAttributes = getRenderedAttributes(mark, extensionAttributes); - return addMarkView()({ - // pass-through - mark, - view, - inline, - // tiptap-specific - editor, - extension, - HTMLAttributes, - updateAttributes: (attrs) => { - updateMarkViewAttributes(mark, editor, attrs); - } - }); - }; - return [extension.name, markView]; - }) - ); - } - /** - * Destroy the extension manager and clean up all extension references - * to prevent memory leaks through parent/child extension chains. - * - * Walks each extension's full parent chain and nulls every forward - * `parent.child → current` link where the parent still points to the - * current node. This breaks the retention path from module-scope - * singleton roots through deep extend() chains. - * - * Only ancestor `.child` links matching the current chain are cleared. - * The `.parent` pointer on ancestors is never touched — extensions - * may be shared across live editors, so their own backward references - * and non-matching forward links must remain intact. - */ - destroy() { - this.extensions.forEach((extension) => { - let current = extension; - while (current.parent) { - const parent = current.parent; - if (parent.child === current) { - parent.child = null; - } - current = parent; - } - }); - this.extensions = []; - this.baseExtensions = []; - this.schema = null; - this.editor = null; - } - /** - * Go through all extensions, create extension storages & setup marks - * & bind editor event listener. - */ - setupExtensions() { - const extensions = this.extensions; - this.editor.extensionStorage = Object.fromEntries( - extensions.map((extension) => [extension.name, extension.storage]) - ); - extensions.forEach((extension) => { - var _a, _b; - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor: this.editor, - type: getSchemaTypeByName(extension.name, this.schema) - }; - if (extension.type === "mark") { - const keepOnSplit = (_a = callOrReturn(getExtensionField(extension, "keepOnSplit", context))) != null ? _a : true; - if (keepOnSplit) { - this.splittableMarks.push(extension.name); - } - const clearable = (_b = callOrReturn( - getExtensionField(extension, "clearable", context) - )) != null ? _b : true; - if (!clearable) { - this.nonClearableMarks.push(extension.name); - } - } - const onBeforeCreate = getExtensionField( - extension, - "onBeforeCreate", - context - ); - const onCreate = getExtensionField(extension, "onCreate", context); - const onUpdate = getExtensionField(extension, "onUpdate", context); - const onSelectionUpdate = getExtensionField( - extension, - "onSelectionUpdate", - context - ); - const onTransaction = getExtensionField( - extension, - "onTransaction", - context - ); - const onFocus = getExtensionField(extension, "onFocus", context); - const onBlur = getExtensionField(extension, "onBlur", context); - const onDestroy = getExtensionField(extension, "onDestroy", context); - if (onBeforeCreate) { - this.editor.on("beforeCreate", onBeforeCreate); - } - if (onCreate) { - this.editor.on("create", onCreate); - } - if (onUpdate) { - this.editor.on("update", onUpdate); - } - if (onSelectionUpdate) { - this.editor.on("selectionUpdate", onSelectionUpdate); - } - if (onTransaction) { - this.editor.on("transaction", onTransaction); - } - if (onFocus) { - this.editor.on("focus", onFocus); - } - if (onBlur) { - this.editor.on("blur", onBlur); - } - if (onDestroy) { - this.editor.on("destroy", onDestroy); - } - }); - } -}; -ExtensionManager.resolve = resolveExtensions; -ExtensionManager.sort = sortExtensions; -ExtensionManager.flatten = flattenExtensions; - -// src/extensions/index.ts -var extensions_exports = {}; -__export(extensions_exports, { - ClipboardTextSerializer: () => ClipboardTextSerializer, - Commands: () => Commands, - Delete: () => Delete, - Drop: () => Drop, - Editable: () => Editable, - FocusEvents: () => FocusEvents, - Keymap: () => Keymap, - Paste: () => Paste, - Tabindex: () => Tabindex, - TextDirection: () => TextDirection, - focusEventsPluginKey: () => focusEventsPluginKey -}); - -// src/extensions/clipboardTextSerializer.ts -var import_state15 = require("@tiptap/pm/state"); - -// src/Extension.ts -var Extension = class _Extension extends Extendable { - constructor() { - super(...arguments); - this.type = "extension"; - } - /** - * Create a new Extension instance - * @param config - Extension configuration object or a function that returns a configuration object - */ - static create(config = {}) { - const resolvedConfig = typeof config === "function" ? config() : config; - return new _Extension(resolvedConfig); - } - configure(options) { - return super.configure(options); - } - extend(extendedConfig) { - const resolvedConfig = typeof extendedConfig === "function" ? extendedConfig() : extendedConfig; - return super.extend(resolvedConfig); - } -}; - -// src/extensions/clipboardTextSerializer.ts -var ClipboardTextSerializer = Extension.create({ - name: "clipboardTextSerializer", - addOptions() { - return { - blockSeparator: void 0 - }; - }, - addProseMirrorPlugins() { - return [ - new import_state15.Plugin({ - key: new import_state15.PluginKey("clipboardTextSerializer"), - props: { - clipboardTextSerializer: () => { - const { editor } = this; - const { state, schema } = editor; - const { doc, selection } = state; - const textSerializers = getTextSerializersFromSchema(schema); - const { blockSeparator } = this.options; - const options = { - ...blockSeparator !== void 0 ? { blockSeparator } : {}, - textSerializers - }; - const sortedRanges = [...selection.ranges].sort((a, b) => a.$from.pos - b.$from.pos); - return sortedRanges.map( - ({ $from, $to }) => getTextBetween(doc, { from: $from.pos, to: $to.pos }, options) - ).join(blockSeparator != null ? blockSeparator : "\n\n"); - } - } - }) - ]; - } -}); - -// src/extensions/commands.ts -var Commands = Extension.create({ - name: "commands", - addCommands() { - return { - ...commands_exports - }; - } -}); - -// src/extensions/delete.ts -var import_transform9 = require("@tiptap/pm/transform"); -var Delete = Extension.create({ - name: "delete", - onUpdate({ transaction, appendedTransactions }) { - var _a, _b, _c; - const callback = () => { - var _a2, _b2, _c2, _d; - if ((_d = (_c2 = (_b2 = (_a2 = this.editor.options.coreExtensionOptions) == null ? void 0 : _a2.delete) == null ? void 0 : _b2.filterTransaction) == null ? void 0 : _c2.call(_b2, transaction)) != null ? _d : transaction.getMeta("y-sync$")) { - return; - } - const nextTransaction = combineTransactionSteps(transaction.before, [ - transaction, - ...appendedTransactions - ]); - const changes = getChangedRanges(nextTransaction); - changes.forEach((change) => { - if (nextTransaction.mapping.mapResult(change.oldRange.from).deletedAfter && nextTransaction.mapping.mapResult(change.oldRange.to).deletedBefore) { - nextTransaction.before.nodesBetween( - change.oldRange.from, - change.oldRange.to, - (node, from) => { - const to = from + node.nodeSize - 2; - const isFullyWithinRange = change.oldRange.from <= from && to <= change.oldRange.to; - this.editor.emit("delete", { - type: "node", - node, - from, - to, - newFrom: nextTransaction.mapping.map(from), - newTo: nextTransaction.mapping.map(to), - deletedRange: change.oldRange, - newRange: change.newRange, - partial: !isFullyWithinRange, - editor: this.editor, - transaction, - combinedTransform: nextTransaction - }); - } - ); - } - }); - const mapping = nextTransaction.mapping; - nextTransaction.steps.forEach((step, index) => { - var _a3, _b3; - if (step instanceof import_transform9.RemoveMarkStep) { - const newStart = mapping.slice(index).map(step.from, -1); - const newEnd = mapping.slice(index).map(step.to); - const oldStart = mapping.invert().map(newStart, -1); - const oldEnd = mapping.invert().map(newEnd); - const foundBeforeMark = newStart > 0 ? (_a3 = nextTransaction.doc.nodeAt(newStart - 1)) == null ? void 0 : _a3.marks.some((mark) => mark.eq(step.mark)) : false; - const foundAfterMark = (_b3 = nextTransaction.doc.nodeAt(newEnd)) == null ? void 0 : _b3.marks.some((mark) => mark.eq(step.mark)); - this.editor.emit("delete", { - type: "mark", - mark: step.mark, - from: step.from, - to: step.to, - deletedRange: { - from: oldStart, - to: oldEnd - }, - newRange: { - from: newStart, - to: newEnd - }, - partial: Boolean(foundAfterMark || foundBeforeMark), - editor: this.editor, - transaction, - combinedTransform: nextTransaction - }); - } - }); - }; - if ((_c = (_b = (_a = this.editor.options.coreExtensionOptions) == null ? void 0 : _a.delete) == null ? void 0 : _b.async) != null ? _c : true) { - setTimeout(callback, 0); - } else { - callback(); - } - } -}); - -// src/extensions/drop.ts -var import_state16 = require("@tiptap/pm/state"); -var Drop = Extension.create({ - name: "drop", - addProseMirrorPlugins() { - return [ - new import_state16.Plugin({ - key: new import_state16.PluginKey("tiptapDrop"), - props: { - handleDrop: (_, e, slice, moved) => { - this.editor.emit("drop", { - editor: this.editor, - event: e, - slice, - moved - }); - } - } - }) - ]; - } -}); - -// src/extensions/editable.ts -var import_state17 = require("@tiptap/pm/state"); -var Editable = Extension.create({ - name: "editable", - addProseMirrorPlugins() { - return [ - new import_state17.Plugin({ - key: new import_state17.PluginKey("editable"), - props: { - editable: () => this.editor.options.editable - } - }) - ]; - } -}); - -// src/extensions/focusEvents.ts -var import_state18 = require("@tiptap/pm/state"); -var focusEventsPluginKey = new import_state18.PluginKey("focusEvents"); -var FocusEvents = Extension.create({ - name: "focusEvents", - addProseMirrorPlugins() { - const { editor } = this; - return [ - new import_state18.Plugin({ - key: focusEventsPluginKey, - props: { - handleDOMEvents: { - focus: (view, event) => { - editor.isFocused = true; - const transaction = editor.state.tr.setMeta("focus", { event }).setMeta("addToHistory", false); - view.dispatch(transaction); - return false; - }, - blur: (view, event) => { - editor.isFocused = false; - const transaction = editor.state.tr.setMeta("blur", { event }).setMeta("addToHistory", false); - view.dispatch(transaction); - return false; - } - } - } - }) - ]; - } -}); - -// src/extensions/keymap.ts -var import_state19 = require("@tiptap/pm/state"); -var Keymap = Extension.create({ - name: "keymap", - addKeyboardShortcuts() { - const handleBackspace = () => this.editor.commands.first(({ commands }) => [ - () => commands.undoInputRule(), - // maybe convert first text block node to default node - () => commands.command(({ tr }) => { - const { selection, doc } = tr; - const { empty, $anchor } = selection; - const { pos, parent } = $anchor; - const $parentPos = $anchor.parent.isTextblock && pos > 0 ? tr.doc.resolve(pos - 1) : $anchor; - const parentIsIsolating = $parentPos.parent.type.spec.isolating; - const parentPos = $anchor.pos - $anchor.parentOffset; - const isAtStart = parentIsIsolating && $parentPos.parent.childCount === 1 ? parentPos === $anchor.pos : import_state19.Selection.atStart(doc).from === pos; - if (!empty || !parent.type.isTextblock || parent.textContent.length || !isAtStart || isAtStart && $anchor.parent.type.name === "paragraph") { - return false; - } - return commands.clearNodes(); - }), - () => commands.deleteSelection(), - () => commands.joinBackward(), - () => commands.selectNodeBackward() - ]); - const handleDelete = () => this.editor.commands.first(({ commands }) => [ - () => commands.deleteSelection(), - () => commands.deleteCurrentNode(), - () => commands.joinForward(), - () => commands.selectNodeForward() - ]); - const handleEnter = () => this.editor.commands.first(({ commands }) => [ - () => commands.newlineInCode(), - () => commands.createParagraphNear(), - () => commands.liftEmptyBlock(), - () => commands.splitBlock() - ]); - const baseKeymap = { - Enter: handleEnter, - "Mod-Enter": () => this.editor.commands.exitCode(), - Backspace: handleBackspace, - "Mod-Backspace": handleBackspace, - "Shift-Backspace": handleBackspace, - Delete: handleDelete, - "Mod-Delete": handleDelete, - "Mod-a": () => this.editor.commands.selectAll() - }; - const pcKeymap = { - ...baseKeymap - }; - const macKeymap = { - ...baseKeymap, - "Ctrl-h": handleBackspace, - "Alt-Backspace": handleBackspace, - "Ctrl-d": handleDelete, - "Ctrl-Alt-Backspace": handleDelete, - "Alt-Delete": handleDelete, - "Alt-d": handleDelete, - "Ctrl-a": () => this.editor.commands.selectTextblockStart(), - "Ctrl-e": () => this.editor.commands.selectTextblockEnd() - }; - if (isiOS() || isMacOS()) { - return macKeymap; - } - return pcKeymap; - }, - addProseMirrorPlugins() { - return [ - // With this plugin we check if the whole document was selected and deleted. - // In this case we will additionally call `clearNodes()` to convert e.g. a heading - // to a paragraph if necessary. - // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well - // with many other commands. - new import_state19.Plugin({ - key: new import_state19.PluginKey("clearDocument"), - appendTransaction: (transactions, oldState, newState) => { - if (transactions.some((tr2) => tr2.getMeta("composition"))) { - return; - } - const docChanges = transactions.some((transaction) => transaction.docChanged) && !oldState.doc.eq(newState.doc); - const ignoreTr = transactions.some( - (transaction) => transaction.getMeta("preventClearDocument") - ); - if (!docChanges || ignoreTr) { - return; - } - const { empty, from, to } = oldState.selection; - const allFrom = import_state19.Selection.atStart(oldState.doc).from; - const allEnd = import_state19.Selection.atEnd(oldState.doc).to; - const allWasSelected = from === allFrom && to === allEnd; - if (empty || !allWasSelected) { - return; - } - const isEmpty = isNodeEmpty(newState.doc); - if (!isEmpty) { - return; - } - const tr = newState.tr; - const state = createChainableState({ - state: newState, - transaction: tr - }); - const { commands } = new CommandManager({ - editor: this.editor, - state - }); - commands.clearNodes(); - if (!tr.steps.length) { - return; - } - return tr; - } - }) - ]; - } -}); - -// src/extensions/paste.ts -var import_state20 = require("@tiptap/pm/state"); -var Paste = Extension.create({ - name: "paste", - addProseMirrorPlugins() { - return [ - new import_state20.Plugin({ - key: new import_state20.PluginKey("tiptapPaste"), - props: { - handlePaste: (_view, e, slice) => { - this.editor.emit("paste", { - editor: this.editor, - event: e, - slice - }); - } - } - }) - ]; - } -}); - -// src/extensions/tabindex.ts -var import_state21 = require("@tiptap/pm/state"); -var Tabindex = Extension.create({ - name: "tabindex", - addOptions() { - return { - value: void 0 - }; - }, - addProseMirrorPlugins() { - return [ - new import_state21.Plugin({ - key: new import_state21.PluginKey("tabindex"), - props: { - attributes: () => { - var _a; - if (!this.editor.isEditable && this.options.value === void 0) { - return {}; - } - return { tabindex: (_a = this.options.value) != null ? _a : "0" }; - } - } - }) - ]; - } -}); - -// src/extensions/textDirection.ts -var import_state22 = require("@tiptap/pm/state"); -var TextDirection = Extension.create({ - name: "textDirection", - addOptions() { - return { - direction: void 0 - }; - }, - addGlobalAttributes() { - if (!this.options.direction) { - return []; - } - const { nodeExtensions } = splitExtensions(this.extensions); - return [ - { - types: nodeExtensions.filter((extension) => extension.name !== "text").map((extension) => extension.name), - attributes: { - dir: { - default: this.options.direction, - parseHTML: (element) => { - const dir = element.getAttribute("dir"); - if (dir && (dir === "ltr" || dir === "rtl" || dir === "auto")) { - return dir; - } - return this.options.direction; - }, - renderHTML: (attributes) => { - if (!attributes.dir) { - return {}; - } - return { - dir: attributes.dir - }; - } - } - } - } - ]; - }, - addProseMirrorPlugins() { - return [ - new import_state22.Plugin({ - key: new import_state22.PluginKey("textDirection"), - props: { - attributes: () => { - const direction = this.options.direction; - if (!direction) { - return {}; - } - return { - dir: direction - }; - } - } - }) - ]; - } -}); - -// src/NodePos.ts -var NodePos = class _NodePos { - constructor(pos, editor, isBlock = false, node = null) { - this.currentNode = null; - this.actualDepth = null; - this.isBlock = isBlock; - this.resolvedPos = pos; - this.editor = editor; - this.currentNode = node; - } - get name() { - return this.node.type.name; - } - get node() { - return this.currentNode || this.resolvedPos.node(); - } - get element() { - return this.editor.view.domAtPos(this.pos).node; - } - get depth() { - var _a; - return (_a = this.actualDepth) != null ? _a : this.resolvedPos.depth; - } - get pos() { - return this.resolvedPos.pos; - } - get content() { - return this.node.content; - } - set content(content) { - let from = this.from; - let to = this.to; - if (this.isBlock) { - if (this.content.size === 0) { - console.error( - `You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}` - ); - return; - } - from = this.from + 1; - to = this.to - 1; - } - this.editor.commands.insertContentAt({ from, to }, content); - } - get attributes() { - return this.node.attrs; - } - get textContent() { - return this.node.textContent; - } - get size() { - return this.node.nodeSize; - } - get from() { - if (this.isBlock) { - return this.pos; - } - return this.resolvedPos.start(this.resolvedPos.depth); - } - get range() { - return { - from: this.from, - to: this.to - }; - } - get to() { - if (this.isBlock) { - return this.pos + this.size; - } - return this.resolvedPos.end(this.resolvedPos.depth) + (this.node.isText ? 0 : 1); - } - get parent() { - if (this.depth === 0) { - return null; - } - const parentPos = this.resolvedPos.start(this.resolvedPos.depth - 1); - const $pos = this.resolvedPos.doc.resolve(parentPos); - return new _NodePos($pos, this.editor); - } - get before() { - let $pos = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2)); - if ($pos.depth !== this.depth) { - $pos = this.resolvedPos.doc.resolve(this.from - 3); - } - return new _NodePos($pos, this.editor); - } - get after() { - let $pos = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1)); - if ($pos.depth !== this.depth) { - $pos = this.resolvedPos.doc.resolve(this.to + 3); - } - return new _NodePos($pos, this.editor); - } - get children() { - const children = []; - this.node.content.forEach((node, offset) => { - const isBlock = node.isBlock && !node.isTextblock; - const isNonTextAtom = node.isAtom && !node.isText; - const isInline = node.isInline; - const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1); - if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) { - return; - } - const $pos = this.resolvedPos.doc.resolve(targetPos); - if (!isBlock && !isInline && $pos.depth <= this.depth) { - return; - } - const childNodePos = new _NodePos( - $pos, - this.editor, - isBlock, - isBlock || isInline ? node : null - ); - if (isBlock) { - childNodePos.actualDepth = this.depth + 1; - } - children.push(childNodePos); - }); - return children; - } - get firstChild() { - return this.children[0] || null; - } - get lastChild() { - const children = this.children; - return children[children.length - 1] || null; - } - closest(selector, attributes = {}) { - let node = null; - let currentNode = this.parent; - while (currentNode && !node) { - if (currentNode.node.type.name === selector) { - if (Object.keys(attributes).length > 0) { - const nodeAttributes = currentNode.node.attrs; - const attrKeys = Object.keys(attributes); - for (let index = 0; index < attrKeys.length; index += 1) { - const key = attrKeys[index]; - if (nodeAttributes[key] !== attributes[key]) { - break; - } - } - } else { - node = currentNode; - } - } - currentNode = currentNode.parent; - } - return node; - } - querySelector(selector, attributes = {}) { - return this.querySelectorAll(selector, attributes, true)[0] || null; - } - querySelectorAll(selector, attributes = {}, firstItemOnly = false) { - let nodes = []; - if (!this.children || this.children.length === 0) { - return nodes; - } - const attrKeys = Object.keys(attributes); - this.children.forEach((childPos) => { - if (firstItemOnly && nodes.length > 0) { - return; - } - if (childPos.node.type.name === selector) { - const doesAllAttributesMatch = attrKeys.every( - (key) => attributes[key] === childPos.node.attrs[key] - ); - if (doesAllAttributesMatch) { - nodes.push(childPos); - } - } - if (firstItemOnly && nodes.length > 0) { - return; - } - nodes = nodes.concat(childPos.querySelectorAll(selector, attributes, firstItemOnly)); - }); - return nodes; - } - setAttribute(attributes) { - const { tr } = this.editor.state; - tr.setNodeMarkup(this.from, void 0, { - ...this.node.attrs, - ...attributes - }); - this.editor.view.dispatch(tr); - } -}; - -// src/style.ts -var style = `.ProseMirror { - position: relative; -} - -.ProseMirror { - word-wrap: break-word; - white-space: pre-wrap; - white-space: break-spaces; - -webkit-font-variant-ligatures: none; - font-variant-ligatures: none; - font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ -} - -.ProseMirror [contenteditable="false"] { - white-space: normal; -} - -.ProseMirror [contenteditable="false"] [contenteditable="true"] { - white-space: pre-wrap; -} - -.ProseMirror pre { - white-space: pre-wrap; -} - -img.ProseMirror-separator { - display: inline !important; - border: none !important; - margin: 0 !important; - width: 0 !important; - height: 0 !important; -} - -.ProseMirror-gapcursor { - display: none; - pointer-events: none; - position: absolute; - margin: 0; -} - -.ProseMirror-gapcursor:after { - content: ""; - display: block; - position: absolute; - top: -2px; - width: 20px; - border-top: 1px solid black; - animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; -} - -@keyframes ProseMirror-cursor-blink { - to { - visibility: hidden; - } -} - -.ProseMirror-hideselection *::selection { - background: transparent; -} - -.ProseMirror-hideselection *::-moz-selection { - background: transparent; -} - -.ProseMirror-hideselection * { - caret-color: transparent; -} - -.ProseMirror-focused .ProseMirror-gapcursor { - display: block; -}`; - -// src/utilities/createStyleTag.ts -function createStyleTag(style2, nonce, suffix) { - const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ""}]`); - if (tiptapStyleTag !== null) { - return tiptapStyleTag; - } - const styleNode = document.createElement("style"); - if (nonce) { - styleNode.setAttribute("nonce", nonce); - } - styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ""}`, ""); - styleNode.innerHTML = style2; - document.getElementsByTagName("head")[0].appendChild(styleNode); - return styleNode; -} - -// src/Editor.ts -var Editor = class extends EventEmitter { - constructor(options = {}) { - super(); - this.css = null; - this.className = "tiptap"; - this.editorView = null; - this.isFocused = false; - this.destroyed = false; - /** - * The editor is considered initialized after the `create` event has been emitted. - */ - this.isInitialized = false; - this.extensionStorage = {}; - /** - * A unique ID for this editor instance. - */ - this.instanceId = Math.random().toString(36).slice(2, 9); - this.options = { - element: typeof document !== "undefined" ? document.createElement("div") : null, - content: "", - injectCSS: true, - injectNonce: void 0, - extensions: [], - autofocus: false, - editable: true, - textDirection: void 0, - editorProps: {}, - parseOptions: {}, - coreExtensionOptions: {}, - enableInputRules: true, - enablePasteRules: true, - enableCoreExtensions: true, - enableContentCheck: false, - emitContentError: false, - onBeforeCreate: () => null, - onCreate: () => null, - onMount: () => null, - onUnmount: () => null, - onUpdate: () => null, - onSelectionUpdate: () => null, - onTransaction: () => null, - onFocus: () => null, - onBlur: () => null, - onDestroy: () => null, - onContentError: ({ error }) => { - throw error; - }, - onPaste: () => null, - onDrop: () => null, - onDelete: () => null, - enableExtensionDispatchTransaction: true - }; - this.isCapturingTransaction = false; - this.capturedTransaction = null; - /** - * Returns a set of utilities for working with positions and ranges. - */ - this.utils = { - getUpdatedPosition, - createMappablePosition - }; - this.setOptions(options); - this.createExtensionManager(); - this.createCommandManager(); - this.createSchema(); - this.on("beforeCreate", this.options.onBeforeCreate); - this.emit("beforeCreate", { editor: this }); - this.on("mount", this.options.onMount); - this.on("unmount", this.options.onUnmount); - this.on("contentError", this.options.onContentError); - this.on("create", this.options.onCreate); - this.on("update", this.options.onUpdate); - this.on("selectionUpdate", this.options.onSelectionUpdate); - this.on("transaction", this.options.onTransaction); - this.on("focus", this.options.onFocus); - this.on("blur", this.options.onBlur); - this.on("destroy", this.options.onDestroy); - this.on("drop", ({ event, slice, moved }) => this.options.onDrop(event, slice, moved)); - this.on("paste", ({ event, slice }) => this.options.onPaste(event, slice)); - this.on("delete", this.options.onDelete); - const initialDoc = this.createDoc(); - const selection = resolveFocusPosition(initialDoc, this.options.autofocus); - this.editorState = import_state23.EditorState.create({ - doc: initialDoc, - schema: this.schema, - selection: selection || void 0 - }); - if (this.options.element) { - this.mount(this.options.element); - } - } - /** - * Attach the editor to the DOM, creating a new editor view. - */ - mount(el) { - if (typeof document === "undefined") { - throw new Error( - `[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.` - ); - } - this.createView(el); - this.emit("mount", { editor: this }); - if (this.css && !document.head.contains(this.css)) { - document.head.appendChild(this.css); - } - window.setTimeout(() => { - if (this.isDestroyed) { - return; - } - if (this.options.autofocus !== false && this.options.autofocus !== null) { - this.commands.focus(this.options.autofocus); - } - this.emit("create", { editor: this }); - this.isInitialized = true; - }, 0); - } - /** - * Remove the editor from the DOM, but still allow remounting at a different point in time - */ - unmount() { - if (this.editorView) { - const dom = this.editorView.dom; - if (dom == null ? void 0 : dom.editor) { - delete dom.editor; - } - this.editorView.destroy(); - } - this.editorView = null; - this.isInitialized = false; - if (this.css && !document.querySelectorAll(`.${this.className}`).length) { - try { - if (typeof this.css.remove === "function") { - this.css.remove(); - } else if (this.css.parentNode) { - this.css.parentNode.removeChild(this.css); - } - } catch (error) { - console.warn("Failed to remove CSS element:", error); - } - } - this.css = null; - this.emit("unmount", { editor: this }); - } - /** - * Returns the editor storage. - */ - get storage() { - return this.extensionStorage; - } - /** - * An object of all registered commands. - */ - get commands() { - return this.commandManager.commands; - } - /** - * Create a command chain to call multiple commands at once. - */ - chain() { - return this.commandManager.chain(); - } - /** - * Check if a command or a command chain can be executed. Without executing it. - */ - can() { - return this.commandManager.can(); - } - /** - * Inject CSS styles. - */ - injectCSS() { - if (this.options.injectCSS && typeof document !== "undefined") { - this.css = createStyleTag(style, this.options.injectNonce); - } - } - /** - * Update editor options. - * - * @param options A list of options - */ - setOptions(options = {}) { - this.options = { - ...this.options, - ...options - }; - if (!this.editorView || !this.state || this.isDestroyed) { - return; - } - if (this.options.editorProps) { - this.view.setProps(this.options.editorProps); - } - this.view.updateState(this.state); - } - /** - * Update editable state of the editor. - */ - setEditable(editable, emitUpdate = true) { - this.setOptions({ editable }); - if (emitUpdate) { - this.emit("update", { editor: this, transaction: this.state.tr, appendedTransactions: [] }); - } - } - /** - * Returns whether the editor is editable. - */ - get isEditable() { - return this.options.editable && this.view && this.view.editable; - } - /** - * Returns the editor view. - */ - get view() { - if (this.editorView) { - return this.editorView; - } - return new Proxy( - { - state: this.editorState, - updateState: (state) => { - this.editorState = state; - }, - dispatch: (tr) => { - this.dispatchTransaction(tr); - }, - // Stub some commonly accessed properties to prevent errors - composing: false, - dragging: null, - editable: true, - isDestroyed: false - }, - { - get: (obj, key) => { - if (this.editorView) { - return this.editorView[key]; - } - if (key === "state") { - return this.editorState; - } - if (key in obj) { - return Reflect.get(obj, key); - } - throw new Error( - `[tiptap error]: The editor view is not available. Cannot access view['${key}']. The editor may not be mounted yet.` - ); - } - } - ); - } - /** - * Returns the editor state. - */ - get state() { - if (this.editorView) { - this.editorState = this.view.state; - } - return this.editorState; - } - /** - * Register a ProseMirror plugin. - * - * @param plugin A ProseMirror plugin - * @param handlePlugins Control how to merge the plugin into the existing plugins. - * @returns The new editor state - */ - registerPlugin(plugin, handlePlugins) { - const plugins = isFunction(handlePlugins) ? handlePlugins(plugin, [...this.state.plugins]) : [...this.state.plugins, plugin]; - const state = this.state.reconfigure({ plugins }); - this.view.updateState(state); - return state; - } - /** - * Unregister a ProseMirror plugin. - * - * @param nameOrPluginKeyToRemove The plugins name - * @returns The new editor state or undefined if the editor is destroyed - */ - unregisterPlugin(nameOrPluginKeyToRemove) { - if (this.isDestroyed) { - return void 0; - } - const prevPlugins = this.state.plugins; - let plugins = prevPlugins; - [].concat(nameOrPluginKeyToRemove).forEach((nameOrPluginKey) => { - const name = typeof nameOrPluginKey === "string" ? `${nameOrPluginKey}$` : nameOrPluginKey.key; - plugins = plugins.filter((plugin) => !plugin.key.startsWith(name)); - }); - if (prevPlugins.length === plugins.length) { - return void 0; - } - const state = this.state.reconfigure({ - plugins - }); - this.view.updateState(state); - return state; - } - /** - * Creates an extension manager. - */ - createExtensionManager() { - var _a, _b, _c, _d; - const coreExtensions = this.options.enableCoreExtensions ? [ - Editable, - ClipboardTextSerializer.configure({ - blockSeparator: (_b = (_a = this.options.coreExtensionOptions) == null ? void 0 : _a.clipboardTextSerializer) == null ? void 0 : _b.blockSeparator - }), - Commands, - FocusEvents, - Keymap, - Tabindex.configure({ - value: (_d = (_c = this.options.coreExtensionOptions) == null ? void 0 : _c.tabindex) == null ? void 0 : _d.value - }), - Drop, - Paste, - Delete, - TextDirection.configure({ - direction: this.options.textDirection - }) - ].filter((ext) => { - if (typeof this.options.enableCoreExtensions === "object") { - return this.options.enableCoreExtensions[ext.name] !== false; - } - return true; - }) : []; - const allExtensions = [...coreExtensions, ...this.options.extensions].filter((extension) => { - return ["extension", "node", "mark"].includes(extension == null ? void 0 : extension.type); - }); - this.extensionManager = new ExtensionManager(allExtensions, this); - } - /** - * Creates an command manager. - */ - createCommandManager() { - this.commandManager = new CommandManager({ - editor: this - }); - } - /** - * Creates a ProseMirror schema. - */ - createSchema() { - this.schema = this.extensionManager.schema; - } - /** - * Creates the initial document. - */ - createDoc() { - let doc; - try { - doc = createDocument(this.options.content, this.schema, this.options.parseOptions, { - errorOnInvalidContent: this.options.enableContentCheck - }); - } catch (e) { - if (!(e instanceof Error) || !["[tiptap error]: Invalid JSON content", "[tiptap error]: Invalid HTML content"].includes( - e.message - )) { - throw e; - } - this.emit("contentError", { - editor: this, - error: e, - disableCollaboration: () => { - if ("collaboration" in this.storage && typeof this.storage.collaboration === "object" && this.storage.collaboration) { - ; - this.storage.collaboration.isDisabled = true; - } - this.options.extensions = this.options.extensions.filter( - (extension) => extension.name !== "collaboration" - ); - this.createExtensionManager(); - } - }); - doc = createDocument(this.options.content, this.schema, this.options.parseOptions, { - errorOnInvalidContent: false - }); - } - return doc; - } - /** - * Creates a ProseMirror view. - */ - createView(element) { - const { editorProps, enableExtensionDispatchTransaction } = this.options; - const baseDispatch = editorProps.dispatchTransaction || this.dispatchTransaction.bind(this); - const dispatch = enableExtensionDispatchTransaction ? this.extensionManager.dispatchTransaction(baseDispatch) : baseDispatch; - const baseTransformPastedHTML = editorProps.transformPastedHTML; - const transformPastedHTML = this.extensionManager.transformPastedHTML(baseTransformPastedHTML); - this.editorView = new import_view.EditorView(element, { - ...editorProps, - attributes: { - // add `role="textbox"` to the editor element - role: "textbox", - ...editorProps == null ? void 0 : editorProps.attributes - }, - dispatchTransaction: dispatch, - transformPastedHTML, - state: this.editorState, - markViews: this.extensionManager.markViews, - nodeViews: this.extensionManager.nodeViews - }); - const newState = this.state.reconfigure({ - plugins: this.extensionManager.plugins - }); - this.view.updateState(newState); - this.prependClass(); - this.injectCSS(); - const dom = this.view.dom; - dom.editor = this; - } - /** - * Creates all node and mark views. - */ - createNodeViews() { - if (this.view.isDestroyed) { - return; - } - this.view.setProps({ - markViews: this.extensionManager.markViews, - nodeViews: this.extensionManager.nodeViews - }); - } - /** - * Prepend class name to element. - */ - prependClass() { - this.view.dom.className = `${this.className} ${this.view.dom.className}`; - } - captureTransaction(fn) { - this.isCapturingTransaction = true; - fn(); - this.isCapturingTransaction = false; - const tr = this.capturedTransaction; - this.capturedTransaction = null; - return tr; - } - /** - * The callback over which to send transactions (state updates) produced by the view. - * - * @param transaction An editor state transaction - */ - dispatchTransaction(transaction) { - if (this.view.isDestroyed) { - return; - } - if (this.isCapturingTransaction) { - if (!this.capturedTransaction) { - this.capturedTransaction = transaction; - return; - } - transaction.steps.forEach((step) => { - var _a; - return (_a = this.capturedTransaction) == null ? void 0 : _a.step(step); - }); - return; - } - const { state, transactions } = this.state.applyTransaction(transaction); - const selectionHasChanged = !this.state.selection.eq(state.selection); - const rootTrWasApplied = transactions.includes(transaction); - const prevState = this.state; - this.emit("beforeTransaction", { - editor: this, - transaction, - nextState: state - }); - if (!rootTrWasApplied) { - return; - } - this.view.updateState(state); - this.emit("transaction", { - editor: this, - transaction, - appendedTransactions: transactions.slice(1) - }); - if (selectionHasChanged) { - this.emit("selectionUpdate", { - editor: this, - transaction - }); - } - const mostRecentFocusTr = transactions.findLast((tr) => tr.getMeta("focus") || tr.getMeta("blur")); - const focus2 = mostRecentFocusTr == null ? void 0 : mostRecentFocusTr.getMeta("focus"); - const blur2 = mostRecentFocusTr == null ? void 0 : mostRecentFocusTr.getMeta("blur"); - if (focus2) { - this.emit("focus", { - editor: this, - event: focus2.event, - // oxlint-disable-next-lineno-non-null-assertion - transaction: mostRecentFocusTr - }); - } - if (blur2) { - this.emit("blur", { - editor: this, - event: blur2.event, - // oxlint-disable-next-lineno-non-null-assertion - transaction: mostRecentFocusTr - }); - } - if (transaction.getMeta("preventUpdate") || !transactions.some((tr) => tr.docChanged) || prevState.doc.eq(state.doc)) { - return; - } - this.emit("update", { - editor: this, - transaction, - appendedTransactions: transactions.slice(1) - }); - } - /** - * Get attributes of the currently selected node or mark. - */ - getAttributes(nameOrType) { - return getAttributes(this.state, nameOrType); - } - isActive(nameOrAttributes, attributesOrUndefined) { - const name = typeof nameOrAttributes === "string" ? nameOrAttributes : null; - const attributes = typeof nameOrAttributes === "string" ? attributesOrUndefined : nameOrAttributes; - return isActive(this.state, name, attributes); - } - /** - * Get the document as JSON. - */ - getJSON() { - return this.state.doc.toJSON(); - } - /** - * Get the document as HTML. - */ - getHTML() { - return getHTMLFromFragment(this.state.doc.content, this.schema); - } - /** - * Get the document as text. - */ - getText(options) { - const { blockSeparator = "\n\n", textSerializers = {} } = options || {}; - return getText(this.state.doc, { - blockSeparator, - textSerializers: { - ...getTextSerializersFromSchema(this.schema), - ...textSerializers - } - }); - } - /** - * Check if there is no content. - */ - get isEmpty() { - return isNodeEmpty(this.state.doc); - } - /** - * Destroy the editor. - */ - destroy() { - if (this.destroyed) { - return; - } - this.destroyed = true; - this.emit("destroy"); - this.unmount(); - this.removeAllListeners(); - this.extensionManager.destroy(); - this.extensionManager = null; - this.schema = null; - this.commandManager = null; - this.extensionStorage = {}; - } - /** - * Check if the editor is already destroyed. - */ - get isDestroyed() { - var _a, _b; - return (_b = (_a = this.editorView) == null ? void 0 : _a.isDestroyed) != null ? _b : true; - } - $node(selector, attributes) { - var _a; - return ((_a = this.$doc) == null ? void 0 : _a.querySelector(selector, attributes)) || null; - } - $nodes(selector, attributes) { - var _a; - return ((_a = this.$doc) == null ? void 0 : _a.querySelectorAll(selector, attributes)) || null; - } - $pos(pos) { - const $pos = this.state.doc.resolve(pos); - const node = pos > 0 && $pos.nodeAfter && !$pos.nodeAfter.isText ? $pos.nodeAfter : null; - return new NodePos($pos, this, false, node); - } - get $doc() { - return this.$pos(0); - } -}; - -// src/inputRules/markInputRule.ts -function markInputRule(config) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - const attributes = callOrReturn(config.getAttributes, void 0, match); - if (attributes === false || attributes === null) { - return null; - } - const { tr } = state; - const captureGroup = match[match.length - 1]; - const fullMatch = match[0]; - if (captureGroup) { - const startSpaces = fullMatch.search(/\S/); - const textStart = range.from + fullMatch.indexOf(captureGroup); - const textEnd = textStart + captureGroup.length; - const excludedMarks = getMarksBetween(range.from, range.to, state.doc).filter((item) => { - const excluded = item.mark.type.excluded; - return excluded.find((type) => type === config.type && type !== item.mark.type); - }).filter((item) => item.to > textStart); - if (excludedMarks.length) { - return null; - } - if (textEnd < range.to) { - tr.delete(textEnd, range.to); - } - if (textStart > range.from) { - tr.delete(range.from + startSpaces, textStart); - } - const markEnd = range.from + startSpaces + captureGroup.length; - tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {})); - tr.removeStoredMark(config.type); - } - }, - undoable: config.undoable - }); -} - -// src/inputRules/nodeInputRule.ts -function nodeInputRule(config) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - const attributes = callOrReturn(config.getAttributes, void 0, match) || {}; - const { tr } = state; - const start = range.from; - let end = range.to; - const newNode = config.type.create(attributes); - if (match[1]) { - const offset = match[0].lastIndexOf(match[1]); - let matchStart = start + offset; - if (matchStart > end) { - matchStart = end; - } else { - end = matchStart + match[1].length; - } - const lastChar = match[0][match[0].length - 1]; - tr.insertText(lastChar, start + match[0].length - 1); - tr.replaceWith(matchStart, end, newNode); - } else if (match[0]) { - const insertionStart = config.type.isInline ? start : start - 1; - tr.insert(insertionStart, config.type.create(attributes)).delete( - tr.mapping.map(start), - tr.mapping.map(end) - ); - } - tr.scrollIntoView(); - }, - undoable: config.undoable - }); -} - -// src/inputRules/textblockTypeInputRule.ts -function textblockTypeInputRule(config) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - const $start = state.doc.resolve(range.from); - const attributes = callOrReturn(config.getAttributes, void 0, match) || {}; - if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), config.type)) { - return null; - } - state.tr.delete(range.from, range.to).setBlockType(range.from, range.from, config.type, attributes); - }, - undoable: config.undoable - }); -} - -// src/inputRules/textInputRule.ts -function textInputRule(config) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - let insert = config.replace; - let start = range.from; - const end = range.to; - if (match[1]) { - const offset = match[0].lastIndexOf(match[1]); - insert += match[0].slice(offset + match[1].length); - start += offset; - const cutOff = start - end; - if (cutOff > 0) { - insert = match[0].slice(offset - cutOff, offset) + insert; - start = end; - } - } - state.tr.insertText(insert, start, end); - }, - undoable: config.undoable - }); -} - -// src/inputRules/wrappingInputRule.ts -var import_transform10 = require("@tiptap/pm/transform"); -function wrappingInputRule(config) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match, chain }) => { - const attributes = callOrReturn(config.getAttributes, void 0, match) || {}; - const tr = state.tr.delete(range.from, range.to); - const $start = tr.doc.resolve(range.from); - const blockRange = $start.blockRange(); - const wrapping = blockRange && (0, import_transform10.findWrapping)(blockRange, config.type, attributes); - if (!wrapping) { - return null; - } - tr.wrap(blockRange, wrapping); - if (config.keepMarks && config.editor) { - const { selection, storedMarks } = state; - const { splittableMarks } = config.editor.extensionManager; - const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks(); - if (marks) { - const filteredMarks = marks.filter((mark) => splittableMarks.includes(mark.type.name)); - tr.ensureMarks(filteredMarks); - } - } - if (config.keepAttributes) { - const nodeType = config.type.name === "bulletList" || config.type.name === "orderedList" ? "listItem" : "taskList"; - chain().updateAttributes(nodeType, attributes).run(); - } - const before = tr.doc.resolve(range.from - 1).nodeBefore; - if (before && before.type === config.type && (0, import_transform10.canJoin)(tr.doc, range.from - 1) && (!config.joinPredicate || config.joinPredicate(match, before))) { - tr.join(range.from - 1); - } - }, - undoable: config.undoable - }); -} - -// src/jsx-runtime.ts -function Fragment6(props) { - return props.children; -} -var h = (tag, attributes) => { - if (tag === "slot") { - return 0; - } - if (tag instanceof Function) { - return tag(attributes); - } - const { children, ...rest } = attributes != null ? attributes : {}; - if (tag === "svg") { - throw new Error( - "SVG elements are not supported in the JSX syntax, use the array syntax instead" - ); - } - return [tag, rest, children]; -}; - -// src/lib/ResizableNodeView.ts -var isTouchEvent = (e) => { - return "touches" in e; -}; -var ResizableNodeView = class { - /** - * Creates a new ResizableNodeView instance. - * - * The constructor sets up the resize handles, applies initial sizing from - * node attributes, and configures all resize behavior options. - * - * @param options - Configuration options for the resizable node view - */ - constructor(options) { - /** Active resize handle directions */ - this.directions = [ - "bottom-left", - "bottom-right", - "top-left", - "top-right" - ]; - /** Minimum allowed dimensions */ - this.minSize = { - height: 8, - width: 8 - }; - /** Whether to always preserve aspect ratio */ - this.preserveAspectRatio = false; - /** CSS class names for elements */ - this.classNames = { - container: "", - wrapper: "", - handle: "", - resizing: "" - }; - /** Initial width of the element (for aspect ratio calculation) */ - this.initialWidth = 0; - /** Initial height of the element (for aspect ratio calculation) */ - this.initialHeight = 0; - /** Calculated aspect ratio (width / height) */ - this.aspectRatio = 1; - /** Whether a resize operation is currently active */ - this.isResizing = false; - /** The handle currently being dragged */ - this.activeHandle = null; - /** Starting mouse X position when resize began */ - this.startX = 0; - /** Starting mouse Y position when resize began */ - this.startY = 0; - /** Element width when resize began */ - this.startWidth = 0; - /** Element height when resize began */ - this.startHeight = 0; - /** Whether Shift key is currently pressed (for temporary aspect ratio lock) */ - this.isShiftKeyPressed = false; - /** Last known editable state of the editor */ - this.lastEditableState = void 0; - /** Map of handle elements by direction */ - this.handleMap = /* @__PURE__ */ new Map(); - /** - * Handles mouse movement during an active resize. - * - * Calculates the delta from the starting position, computes new dimensions - * based on the active handle direction, applies constraints and aspect ratio, - * then updates the element's style and calls the onResize callback. - * - * @param event - The mouse move event - */ - this.handleMouseMove = (event) => { - if (!this.isResizing || !this.activeHandle) { - return; - } - const deltaX = event.clientX - this.startX; - const deltaY = event.clientY - this.startY; - this.handleResize(deltaX, deltaY); - }; - this.handleTouchMove = (event) => { - if (!this.isResizing || !this.activeHandle) { - return; - } - const touch = event.touches[0]; - if (!touch) { - return; - } - const deltaX = touch.clientX - this.startX; - const deltaY = touch.clientY - this.startY; - this.handleResize(deltaX, deltaY); - }; - /** - * Completes the resize operation when the mouse button is released. - * - * Captures final dimensions, calls the onCommit callback to persist changes, - * removes the resizing state and class, and cleans up document-level listeners. - */ - this.handleMouseUp = () => { - if (!this.isResizing) { - return; - } - const finalWidth = this.element.offsetWidth; - const finalHeight = this.element.offsetHeight; - this.onCommit(finalWidth, finalHeight); - this.isResizing = false; - this.activeHandle = null; - this.container.dataset.resizeState = "false"; - if (this.classNames.resizing) { - this.container.classList.remove(this.classNames.resizing); - } - document.removeEventListener("mousemove", this.handleMouseMove); - document.removeEventListener("mouseup", this.handleMouseUp); - document.removeEventListener("keydown", this.handleKeyDown); - document.removeEventListener("keyup", this.handleKeyUp); - }; - /** - * Tracks Shift key state to enable temporary aspect ratio locking. - * - * When Shift is pressed during resize, aspect ratio is preserved even if - * preserveAspectRatio is false. - * - * @param event - The keyboard event - */ - this.handleKeyDown = (event) => { - if (event.key === "Shift") { - this.isShiftKeyPressed = true; - } - }; - /** - * Tracks Shift key release to disable temporary aspect ratio locking. - * - * @param event - The keyboard event - */ - this.handleKeyUp = (event) => { - if (event.key === "Shift") { - this.isShiftKeyPressed = false; - } - }; - var _a, _b, _c, _d, _e, _f; - this.node = options.node; - this.editor = options.editor; - this.element = options.element; - this.element.draggable = false; - this.contentElement = options.contentElement; - this.getPos = options.getPos; - this.onResize = options.onResize; - this.onCommit = options.onCommit; - this.onUpdate = options.onUpdate; - if ((_a = options.options) == null ? void 0 : _a.min) { - this.minSize = { - ...this.minSize, - ...options.options.min - }; - } - if ((_b = options.options) == null ? void 0 : _b.max) { - this.maxSize = options.options.max; - } - if ((_c = options == null ? void 0 : options.options) == null ? void 0 : _c.directions) { - this.directions = options.options.directions; - } - if ((_d = options.options) == null ? void 0 : _d.preserveAspectRatio) { - this.preserveAspectRatio = options.options.preserveAspectRatio; - } - if ((_e = options.options) == null ? void 0 : _e.className) { - this.classNames = { - container: options.options.className.container || "", - wrapper: options.options.className.wrapper || "", - handle: options.options.className.handle || "", - resizing: options.options.className.resizing || "" - }; - } - if ((_f = options.options) == null ? void 0 : _f.createCustomHandle) { - this.createCustomHandle = options.options.createCustomHandle; - } - this.wrapper = this.createWrapper(); - this.container = this.createContainer(); - this.applyInitialSize(); - this.attachHandles(); - this.editor.on("update", this.handleEditorUpdate.bind(this)); - } - /** - * Returns the top-level DOM node that should be placed in the editor. - * - * This is required by the ProseMirror NodeView interface. The container - * includes the wrapper, handles, and the actual content element. - * - * @returns The container element to be inserted into the editor - */ - get dom() { - return this.container; - } - get contentDOM() { - var _a; - return (_a = this.contentElement) != null ? _a : null; - } - handleEditorUpdate() { - const isEditable = this.editor.isEditable; - if (isEditable === this.lastEditableState) { - return; - } - this.lastEditableState = isEditable; - if (!isEditable) { - this.removeHandles(); - } else if (isEditable && this.handleMap.size === 0) { - this.attachHandles(); - } - } - /** - * Called when the node's content or attributes change. - * - * Updates the internal node reference. If a custom `onUpdate` callback - * was provided, it will be called to handle additional update logic. - * - * @param node - The new/updated node - * @param decorations - Node decorations - * @param innerDecorations - Inner decorations - * @returns `false` if the node type has changed (requires full rebuild), otherwise the result of `onUpdate` or `true` - */ - update(node, decorations, innerDecorations) { - if (node.type !== this.node.type) { - return false; - } - this.node = node; - if (this.onUpdate) { - return this.onUpdate(node, decorations, innerDecorations); - } - return true; - } - /** - * Cleanup method called when the node view is being removed. - * - * Removes all event listeners to prevent memory leaks. This is required - * by the ProseMirror NodeView interface. If a resize is active when - * destroy is called, it will be properly cancelled. - */ - destroy() { - if (this.isResizing) { - this.container.dataset.resizeState = "false"; - if (this.classNames.resizing) { - this.container.classList.remove(this.classNames.resizing); - } - document.removeEventListener("mousemove", this.handleMouseMove); - document.removeEventListener("mouseup", this.handleMouseUp); - document.removeEventListener("keydown", this.handleKeyDown); - document.removeEventListener("keyup", this.handleKeyUp); - this.isResizing = false; - this.activeHandle = null; - } - this.editor.off("update", this.handleEditorUpdate.bind(this)); - this.container.remove(); - } - /** - * Creates the outer container element. - * - * The container is the top-level element returned by the NodeView and - * wraps the entire resizable node. It's set up with flexbox to handle - * alignment and includes data attributes for styling and identification. - * - * @returns The container element - */ - createContainer() { - const element = document.createElement("div"); - element.dataset.resizeContainer = ""; - element.dataset.node = this.node.type.name; - element.style.display = this.node.type.isInline ? "inline-flex" : "flex"; - if (this.classNames.container) { - element.className = this.classNames.container; - } - element.appendChild(this.wrapper); - return element; - } - /** - * Creates the wrapper element that contains the content and handles. - * - * The wrapper uses relative positioning so that resize handles can be - * positioned absolutely within it. This is the direct parent of the - * content element being made resizable. - * - * @returns The wrapper element - */ - createWrapper() { - const element = document.createElement("div"); - element.style.position = "relative"; - element.style.display = "block"; - element.dataset.resizeWrapper = ""; - if (this.classNames.wrapper) { - element.className = this.classNames.wrapper; - } - element.appendChild(this.element); - return element; - } - /** - * Creates a resize handle element for a specific direction. - * - * Each handle is absolutely positioned and includes a data attribute - * identifying its direction for styling purposes. - * - * @param direction - The resize direction for this handle - * @returns The handle element - */ - createHandle(direction) { - const handle = document.createElement("div"); - handle.dataset.resizeHandle = direction; - handle.style.position = "absolute"; - if (this.classNames.handle) { - handle.className = this.classNames.handle; - } - return handle; - } - /** - * Positions a handle element according to its direction. - * - * Corner handles (e.g., 'top-left') are positioned at the intersection - * of two edges. Edge handles (e.g., 'top') span the full width or height. - * - * @param handle - The handle element to position - * @param direction - The direction determining the position - */ - positionHandle(handle, direction) { - const isTop = direction.includes("top"); - const isBottom = direction.includes("bottom"); - const isLeft = direction.includes("left"); - const isRight = direction.includes("right"); - if (isTop) { - handle.style.top = "0"; - } - if (isBottom) { - handle.style.bottom = "0"; - } - if (isLeft) { - handle.style.left = "0"; - } - if (isRight) { - handle.style.right = "0"; - } - if (direction === "top" || direction === "bottom") { - handle.style.left = "0"; - handle.style.right = "0"; - } - if (direction === "left" || direction === "right") { - handle.style.top = "0"; - handle.style.bottom = "0"; - } - } - /** - * Creates and attaches all resize handles to the wrapper. - * - * Iterates through the configured directions, creates a handle for each, - * positions it, attaches the mousedown listener, and appends it to the DOM. - */ - attachHandles() { - this.directions.forEach((direction) => { - let handle; - if (this.createCustomHandle) { - handle = this.createCustomHandle(direction); - } else { - handle = this.createHandle(direction); - } - if (!(handle instanceof HTMLElement)) { - console.warn( - `[ResizableNodeView] createCustomHandle("${direction}") did not return an HTMLElement. Falling back to default handle.` - ); - handle = this.createHandle(direction); - } - if (!this.createCustomHandle) { - this.positionHandle(handle, direction); - } - handle.addEventListener("mousedown", (event) => this.handleResizeStart(event, direction)); - handle.addEventListener( - "touchstart", - (event) => this.handleResizeStart(event, direction) - ); - this.handleMap.set(direction, handle); - this.wrapper.appendChild(handle); - }); - } - /** - * Removes all resize handles from the wrapper. - * - * Cleans up the handle map and removes each handle element from the DOM. - */ - removeHandles() { - this.handleMap.forEach((el) => el.remove()); - this.handleMap.clear(); - } - /** - * Applies initial sizing from node attributes to the element. - * - * If width/height attributes exist on the node, they're applied to the element. - * Otherwise, the element's natural/current dimensions are measured. The aspect - * ratio is calculated for later use in aspect-ratio-preserving resizes. - */ - applyInitialSize() { - const width = this.node.attrs.width; - const height = this.node.attrs.height; - if (width) { - this.element.style.width = `${width}px`; - this.initialWidth = width; - } else { - this.initialWidth = this.element.offsetWidth; - } - if (height) { - this.element.style.height = `${height}px`; - this.initialHeight = height; - } else { - this.initialHeight = this.element.offsetHeight; - } - if (this.initialWidth > 0 && this.initialHeight > 0) { - this.aspectRatio = this.initialWidth / this.initialHeight; - } - } - /** - * Initiates a resize operation when a handle is clicked. - * - * Captures the starting mouse position and element dimensions, sets up - * the resize state, adds the resizing class and state attribute, and - * attaches document-level listeners for mouse movement and keyboard input. - * - * @param event - The mouse down event - * @param direction - The direction of the handle being dragged - */ - handleResizeStart(event, direction) { - event.preventDefault(); - event.stopPropagation(); - this.isResizing = true; - this.activeHandle = direction; - if (isTouchEvent(event)) { - this.startX = event.touches[0].clientX; - this.startY = event.touches[0].clientY; - } else { - this.startX = event.clientX; - this.startY = event.clientY; - } - this.startWidth = this.element.offsetWidth; - this.startHeight = this.element.offsetHeight; - if (this.startWidth > 0 && this.startHeight > 0) { - this.aspectRatio = this.startWidth / this.startHeight; - } - const pos = this.getPos(); - if (pos !== void 0) { - } - this.container.dataset.resizeState = "true"; - if (this.classNames.resizing) { - this.container.classList.add(this.classNames.resizing); - } - document.addEventListener("mousemove", this.handleMouseMove); - document.addEventListener("touchmove", this.handleTouchMove); - document.addEventListener("mouseup", this.handleMouseUp); - document.addEventListener("keydown", this.handleKeyDown); - document.addEventListener("keyup", this.handleKeyUp); - } - handleResize(deltaX, deltaY) { - if (!this.activeHandle) { - return; - } - const shouldPreserveAspectRatio = this.preserveAspectRatio || this.isShiftKeyPressed; - const { width, height } = this.calculateNewDimensions(this.activeHandle, deltaX, deltaY); - const constrained = this.applyConstraints(width, height, shouldPreserveAspectRatio); - this.element.style.width = `${constrained.width}px`; - this.element.style.height = `${constrained.height}px`; - if (this.onResize) { - this.onResize(constrained.width, constrained.height); - } - } - /** - * Calculates new dimensions based on mouse delta and resize direction. - * - * Takes the starting dimensions and applies the mouse movement delta - * according to the handle direction. For corner handles, both dimensions - * are affected. For edge handles, only one dimension changes. If aspect - * ratio should be preserved, delegates to applyAspectRatio. - * - * @param direction - The active resize handle direction - * @param deltaX - Horizontal mouse movement since resize start - * @param deltaY - Vertical mouse movement since resize start - * @returns The calculated width and height - */ - calculateNewDimensions(direction, deltaX, deltaY) { - let newWidth = this.startWidth; - let newHeight = this.startHeight; - const isRight = direction.includes("right"); - const isLeft = direction.includes("left"); - const isBottom = direction.includes("bottom"); - const isTop = direction.includes("top"); - if (isRight) { - newWidth = this.startWidth + deltaX; - } else if (isLeft) { - newWidth = this.startWidth - deltaX; - } - if (isBottom) { - newHeight = this.startHeight + deltaY; - } else if (isTop) { - newHeight = this.startHeight - deltaY; - } - if (direction === "right" || direction === "left") { - newWidth = this.startWidth + (isRight ? deltaX : -deltaX); - } - if (direction === "top" || direction === "bottom") { - newHeight = this.startHeight + (isBottom ? deltaY : -deltaY); - } - const shouldPreserveAspectRatio = this.preserveAspectRatio || this.isShiftKeyPressed; - if (shouldPreserveAspectRatio) { - return this.applyAspectRatio(newWidth, newHeight, direction); - } - return { width: newWidth, height: newHeight }; - } - /** - * Applies min/max constraints to dimensions. - * - * When aspect ratio is NOT preserved, constraints are applied independently - * to width and height. When aspect ratio IS preserved, constraints are - * applied while maintaining the aspect ratio—if one dimension hits a limit, - * the other is recalculated proportionally. - * - * This ensures that aspect ratio is never broken when constrained. - * - * @param width - The unconstrained width - * @param height - The unconstrained height - * @param preserveAspectRatio - Whether to maintain aspect ratio while constraining - * @returns The constrained dimensions - */ - applyConstraints(width, height, preserveAspectRatio) { - var _a, _b, _c, _d; - if (!preserveAspectRatio) { - let constrainedWidth2 = Math.max(this.minSize.width, width); - let constrainedHeight2 = Math.max(this.minSize.height, height); - if ((_a = this.maxSize) == null ? void 0 : _a.width) { - constrainedWidth2 = Math.min(this.maxSize.width, constrainedWidth2); - } - if ((_b = this.maxSize) == null ? void 0 : _b.height) { - constrainedHeight2 = Math.min(this.maxSize.height, constrainedHeight2); - } - return { width: constrainedWidth2, height: constrainedHeight2 }; - } - let constrainedWidth = width; - let constrainedHeight = height; - if (constrainedWidth < this.minSize.width) { - constrainedWidth = this.minSize.width; - constrainedHeight = constrainedWidth / this.aspectRatio; - } - if (constrainedHeight < this.minSize.height) { - constrainedHeight = this.minSize.height; - constrainedWidth = constrainedHeight * this.aspectRatio; - } - if (((_c = this.maxSize) == null ? void 0 : _c.width) && constrainedWidth > this.maxSize.width) { - constrainedWidth = this.maxSize.width; - constrainedHeight = constrainedWidth / this.aspectRatio; - } - if (((_d = this.maxSize) == null ? void 0 : _d.height) && constrainedHeight > this.maxSize.height) { - constrainedHeight = this.maxSize.height; - constrainedWidth = constrainedHeight * this.aspectRatio; - } - return { width: constrainedWidth, height: constrainedHeight }; - } - /** - * Adjusts dimensions to maintain the original aspect ratio. - * - * For horizontal handles (left/right), uses width as the primary dimension - * and calculates height from it. For vertical handles (top/bottom), uses - * height as primary and calculates width. For corner handles, uses width - * as the primary dimension. - * - * @param width - The new width - * @param height - The new height - * @param direction - The active resize direction - * @returns Dimensions adjusted to preserve aspect ratio - */ - applyAspectRatio(width, height, direction) { - const isHorizontal = direction === "left" || direction === "right"; - const isVertical = direction === "top" || direction === "bottom"; - if (isHorizontal) { - return { - width, - height: width / this.aspectRatio - }; - } - if (isVertical) { - return { - width: height * this.aspectRatio, - height - }; - } - return { - width, - height: width / this.aspectRatio - }; - } -}; -var ResizableNodeview = ResizableNodeView; - -// src/utilities/attrsEqual.ts -function attrsEqual(a, b) { - if (a === b) { - return true; - } - if (!a || !b) { - return false; - } - const keysA = Object.keys(a); - const keysB = Object.keys(b); - if (keysA.length !== keysB.length) { - return false; - } - return keysA.every( - (key) => Object.prototype.hasOwnProperty.call(b, key) && Object.is(a[key], b[key]) - ); -} - -// src/utilities/canInsertNode.ts -var import_state24 = require("@tiptap/pm/state"); -function canInsertNode(state, nodeType) { - const { selection } = state; - const { $from } = selection; - if (selection instanceof import_state24.NodeSelection) { - const index = $from.index(); - const parent = $from.parent; - return parent.canReplaceWith(index, index + 1, nodeType); - } - let depth = $from.depth; - while (depth >= 0) { - const index = $from.index(depth); - const parent = $from.node(depth); - const match = parent.contentMatchAt(index); - if (match.matchType(nodeType)) { - return true; - } - depth -= 1; - } - return false; -} - -// src/utilities/escapeForRegEx.ts -function escapeForRegEx(string) { - return string.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"); -} - -// src/utilities/getStyleProperty.ts -function getStyleProperty(element, propertyName) { - const styleAttr = element.getAttribute("style"); - if (!styleAttr) { - return null; - } - const decls = styleAttr.split(";").map((decl) => decl.trim()).filter(Boolean); - const target = propertyName.toLowerCase(); - for (let i = decls.length - 1; i >= 0; i -= 1) { - const decl = decls[i]; - const colonIndex = decl.indexOf(":"); - if (colonIndex === -1) { - continue; - } - const prop = decl.slice(0, colonIndex).trim().toLowerCase(); - if (prop === target) { - return decl.slice(colonIndex + 1).trim(); - } - } - return null; -} - -// src/utilities/htmlEntities.ts -function decodeHtmlEntities(text) { - return text.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/&/g, "&"); -} -function encodeHtmlEntities(text) { - return text.replace(/&/g, "&").replace(//g, ">"); -} - -// src/utilities/isFirefox.ts -function isFirefox() { - return typeof navigator !== "undefined" ? /Firefox/.test(navigator.userAgent) : false; -} - -// src/utilities/isString.ts -function isString(value) { - return typeof value === "string"; -} - -// src/utilities/markdown/index.ts -var markdown_exports = {}; -__export(markdown_exports, { - createAtomBlockMarkdownSpec: () => createAtomBlockMarkdownSpec, - createBlockMarkdownSpec: () => createBlockMarkdownSpec, - createInlineMarkdownSpec: () => createInlineMarkdownSpec, - parseAttributes: () => parseAttributes, - parseIndentedBlocks: () => parseIndentedBlocks, - renderNestedMarkdownContent: () => renderNestedMarkdownContent, - serializeAttributes: () => serializeAttributes -}); - -// src/utilities/markdown/attributeUtils.ts -function parseAttributes(attrString) { - if (!(attrString == null ? void 0 : attrString.trim())) { - return {}; - } - const attributes = {}; - const quotedStrings = []; - const tempString = attrString.replace(/["']([^"']*)["']/g, (match) => { - quotedStrings.push(match); - return `__QUOTED_${quotedStrings.length - 1}__`; - }); - const classMatches = tempString.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g); - if (classMatches) { - const classes = classMatches.map((match) => match.trim().slice(1)); - attributes.class = classes.join(" "); - } - const idMatch = tempString.match(/(?:^|\s)#([a-zA-Z][\w-]*)/); - if (idMatch) { - attributes.id = idMatch[1]; - } - const kvRegex = /([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g; - const kvMatches = Array.from(tempString.matchAll(kvRegex)); - kvMatches.forEach(([, key, quotedRef]) => { - var _a; - const quotedIndex = parseInt(((_a = quotedRef.match(/__QUOTED_(\d+)__/)) == null ? void 0 : _a[1]) || "0", 10); - const quotedValue = quotedStrings[quotedIndex]; - if (quotedValue) { - attributes[key] = quotedValue.slice(1, -1); - } - }); - const cleanString = tempString.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g, "").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g, "").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g, "").trim(); - if (cleanString) { - const booleanAttrs = cleanString.split(/\s+/).filter(Boolean); - booleanAttrs.forEach((attr) => { - if (attr.match(/^[a-zA-Z][\w-]*$/)) { - attributes[attr] = true; - } - }); - } - return attributes; -} -function serializeAttributes(attributes) { - if (!attributes || Object.keys(attributes).length === 0) { - return ""; - } - const parts = []; - if (attributes.class) { - const classes = String(attributes.class).split(/\s+/).filter(Boolean); - classes.forEach((cls) => parts.push(`.${cls}`)); - } - if (attributes.id) { - parts.push(`#${attributes.id}`); - } - Object.entries(attributes).forEach(([key, value]) => { - if (key === "class" || key === "id") { - return; - } - if (value === true) { - parts.push(key); - } else if (value !== false && value != null) { - parts.push(`${key}="${String(value)}"`); - } - }); - return parts.join(" "); -} - -// src/utilities/markdown/createAtomBlockMarkdownSpec.ts -function createAtomBlockMarkdownSpec(options) { - const { - nodeName, - name: markdownName, - parseAttributes: parseAttributes2 = parseAttributes, - serializeAttributes: serializeAttributes2 = serializeAttributes, - defaultAttributes = {}, - requiredAttributes = [], - allowedAttributes - } = options; - const blockName = markdownName || nodeName; - const filterAttributes = (attrs) => { - if (!allowedAttributes) { - return attrs; - } - const filtered = {}; - allowedAttributes.forEach((key) => { - if (key in attrs) { - filtered[key] = attrs[key]; - } - }); - return filtered; - }; - return { - parseMarkdown: (token, h2) => { - const attrs = { ...defaultAttributes, ...token.attributes }; - return h2.createNode(nodeName, attrs, []); - }, - markdownTokenizer: { - name: nodeName, - level: "block", - start(src) { - var _a; - const regex = new RegExp(`^:::${blockName}(?:\\s|$)`, "m"); - const index = (_a = src.match(regex)) == null ? void 0 : _a.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, _tokens, _lexer) { - const regex = new RegExp(`^:::${blockName}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`); - const match = src.match(regex); - if (!match) { - return void 0; - } - const attrString = match[1] || ""; - const attributes = parseAttributes2(attrString); - const missingRequired = requiredAttributes.find((required) => !(required in attributes)); - if (missingRequired) { - return void 0; - } - return { - type: nodeName, - raw: match[0], - attributes - }; - } - }, - renderMarkdown: (node) => { - const filteredAttrs = filterAttributes(node.attrs || {}); - const attrs = serializeAttributes2(filteredAttrs); - const attrString = attrs ? ` {${attrs}}` : ""; - return `:::${blockName}${attrString} :::`; - } - }; -} - -// src/utilities/markdown/createBlockMarkdownSpec.ts -function createBlockMarkdownSpec(options) { - const { - nodeName, - name: markdownName, - getContent, - parseAttributes: parseAttributes2 = parseAttributes, - serializeAttributes: serializeAttributes2 = serializeAttributes, - defaultAttributes = {}, - content = "block", - allowedAttributes - } = options; - const blockName = markdownName || nodeName; - const filterAttributes = (attrs) => { - if (!allowedAttributes) { - return attrs; - } - const filtered = {}; - allowedAttributes.forEach((key) => { - if (key in attrs) { - filtered[key] = attrs[key]; - } - }); - return filtered; - }; - return { - parseMarkdown: (token, h2) => { - let nodeContent; - if (getContent) { - const contentResult = getContent(token); - nodeContent = typeof contentResult === "string" ? [{ type: "text", text: contentResult }] : contentResult; - } else if (content === "block") { - nodeContent = h2.parseChildren(token.tokens || []); - } else { - nodeContent = h2.parseInline(token.tokens || []); - } - const attrs = { ...defaultAttributes, ...token.attributes }; - return h2.createNode(nodeName, attrs, nodeContent); - }, - markdownTokenizer: { - name: nodeName, - level: "block", - start(src) { - var _a; - const regex = new RegExp(`^:::${blockName}`, "m"); - const index = (_a = src.match(regex)) == null ? void 0 : _a.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, _tokens, lexer) { - var _a; - const openingRegex = new RegExp(`^:::${blockName}(?:\\s+\\{([^}]*)\\})?\\s*\\n`); - const openingMatch = src.match(openingRegex); - if (!openingMatch) { - return void 0; - } - const [openingTag, attrString = ""] = openingMatch; - const attributes = parseAttributes2(attrString); - let level = 1; - const position = openingTag.length; - let matchedContent = ""; - const blockPattern = /^:::([\w-]*)(\s.*)?/gm; - const remaining = src.slice(position); - blockPattern.lastIndex = 0; - for (; ; ) { - const match = blockPattern.exec(remaining); - if (match === null) { - break; - } - const matchPos = match.index; - const blockType = match[1]; - if ((_a = match[2]) == null ? void 0 : _a.endsWith(":::")) { - continue; - } - if (blockType) { - level += 1; - } else { - level -= 1; - if (level === 0) { - const rawContent = remaining.slice(0, matchPos); - matchedContent = rawContent.trim(); - const fullMatch = src.slice(0, position + matchPos + match[0].length); - let contentTokens = []; - if (matchedContent) { - if (content === "block") { - contentTokens = lexer.blockTokens(rawContent); - contentTokens.forEach((token) => { - if (token.text && (!token.tokens || token.tokens.length === 0)) { - token.tokens = lexer.inlineTokens(token.text); - } - }); - while (contentTokens.length > 0) { - const lastToken = contentTokens[contentTokens.length - 1]; - if (lastToken.type === "paragraph" && (!lastToken.text || lastToken.text.trim() === "")) { - contentTokens.pop(); - } else { - break; - } - } - } else { - contentTokens = lexer.inlineTokens(matchedContent); - } - } - return { - type: nodeName, - raw: fullMatch, - attributes, - content: matchedContent, - tokens: contentTokens - }; - } - } - } - return void 0; - } - }, - renderMarkdown: (node, h2) => { - const filteredAttrs = filterAttributes(node.attrs || {}); - const attrs = serializeAttributes2(filteredAttrs); - const attrString = attrs ? ` {${attrs}}` : ""; - const renderedContent = h2.renderChildren(node.content || [], "\n\n"); - return `:::${blockName}${attrString} - -${renderedContent} - -:::`; - } - }; -} - -// src/utilities/markdown/createInlineMarkdownSpec.ts -function parseShortcodeAttributes(attrString) { - if (!attrString.trim()) { - return {}; - } - const attributes = {}; - const regex = /(\w+)=(?:"([^"]*)"|'([^']*)')/g; - let match = regex.exec(attrString); - while (match !== null) { - const [, key, doubleQuoted, singleQuoted] = match; - attributes[key] = doubleQuoted || singleQuoted; - match = regex.exec(attrString); - } - return attributes; -} -function serializeShortcodeAttributes(attrs) { - return Object.entries(attrs).filter(([, value]) => value !== void 0 && value !== null).map(([key, value]) => `${key}="${value}"`).join(" "); -} -function createInlineMarkdownSpec(options) { - const { - nodeName, - name: shortcodeName, - getContent, - parseAttributes: parseAttributes2 = parseShortcodeAttributes, - serializeAttributes: serializeAttributes2 = serializeShortcodeAttributes, - defaultAttributes = {}, - selfClosing = false, - allowedAttributes - } = options; - const shortcode = shortcodeName || nodeName; - const filterAttributes = (attrs) => { - if (!allowedAttributes) { - return attrs; - } - const filtered = {}; - allowedAttributes.forEach((attr) => { - const attrName = typeof attr === "string" ? attr : attr.name; - const skipIfDefault = typeof attr === "string" ? void 0 : attr.skipIfDefault; - if (attrName in attrs) { - const value = attrs[attrName]; - if (skipIfDefault !== void 0 && value === skipIfDefault) { - return; - } - filtered[attrName] = value; - } - }); - return filtered; - }; - const escapedShortcode = shortcode.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); - return { - parseMarkdown: (token, h2) => { - const attrs = { ...defaultAttributes, ...token.attributes }; - if (selfClosing) { - return h2.createNode(nodeName, attrs); - } - const content = getContent ? getContent(token) : token.content || ""; - if (content) { - return h2.createNode(nodeName, attrs, [h2.createTextNode(content)]); - } - return h2.createNode(nodeName, attrs, []); - }, - markdownTokenizer: { - name: nodeName, - level: "inline", - start(src) { - const startPattern = selfClosing ? new RegExp(`\\[${escapedShortcode}\\s*[^\\]]*\\]`) : new RegExp(`\\[${escapedShortcode}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${escapedShortcode}\\]`); - const match = src.match(startPattern); - const index = match == null ? void 0 : match.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, _tokens, _lexer) { - const tokenPattern = selfClosing ? new RegExp(`^\\[${escapedShortcode}\\s*([^\\]]*)\\]`) : new RegExp( - `^\\[${escapedShortcode}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${escapedShortcode}\\]` - ); - const match = src.match(tokenPattern); - if (!match) { - return void 0; - } - let content = ""; - let attrString = ""; - if (selfClosing) { - const [, attrs] = match; - attrString = attrs; - } else { - const [, attrs, contentMatch] = match; - attrString = attrs; - content = contentMatch || ""; - } - const attributes = parseAttributes2(attrString.trim()); - return { - type: nodeName, - raw: match[0], - content: content.trim(), - attributes - }; - } - }, - renderMarkdown: (node) => { - let content = ""; - if (getContent) { - content = getContent(node); - } else if (node.content && node.content.length > 0) { - content = node.content.filter((child) => child.type === "text").map((child) => child.text).join(""); - } - const filteredAttrs = filterAttributes(node.attrs || {}); - const attrs = serializeAttributes2(filteredAttrs); - const attrString = attrs ? ` ${attrs}` : ""; - if (selfClosing) { - return `[${shortcode}${attrString}]`; - } - return `[${shortcode}${attrString}]${content}[/${shortcode}]`; - } - }; -} - -// src/utilities/markdown/parseIndentedBlocks.ts -function parseIndentedBlocks(src, config, lexer) { - var _a, _b, _c, _d; - const lines = src.split("\n"); - const items = []; - let totalRaw = ""; - let i = 0; - const baseIndentSize = config.baseIndentSize || 2; - while (i < lines.length) { - const currentLine = lines[i]; - const itemMatch = currentLine.match(config.itemPattern); - if (!itemMatch) { - if (items.length > 0) { - break; - } else if (currentLine.trim() === "") { - i += 1; - totalRaw = `${totalRaw}${currentLine} -`; - continue; - } else { - return void 0; - } - } - const itemData = config.extractItemData(itemMatch); - const { indentLevel, mainContent } = itemData; - totalRaw = `${totalRaw}${currentLine} -`; - const itemContent = [mainContent]; - i += 1; - while (i < lines.length) { - const nextLine = lines[i]; - if (nextLine.trim() === "") { - const nextNonEmptyIndex = lines.slice(i + 1).findIndex((l) => l.trim() !== ""); - if (nextNonEmptyIndex === -1) { - break; - } - const nextNonEmpty = lines[i + 1 + nextNonEmptyIndex]; - const nextIndent2 = ((_b = (_a = nextNonEmpty.match(/^(\s*)/)) == null ? void 0 : _a[1]) == null ? void 0 : _b.length) || 0; - if (nextIndent2 > indentLevel) { - itemContent.push(nextLine); - totalRaw = `${totalRaw}${nextLine} -`; - i += 1; - continue; - } else { - break; - } - } - const nextIndent = ((_d = (_c = nextLine.match(/^(\s*)/)) == null ? void 0 : _c[1]) == null ? void 0 : _d.length) || 0; - if (nextIndent > indentLevel) { - itemContent.push(nextLine); - totalRaw = `${totalRaw}${nextLine} -`; - i += 1; - } else { - break; - } - } - let nestedTokens; - const nestedContent = itemContent.slice(1); - if (nestedContent.length > 0) { - const dedentedNested = nestedContent.map((nestedLine) => nestedLine.slice(indentLevel + baseIndentSize)).join("\n"); - if (dedentedNested.trim()) { - if (config.customNestedParser) { - nestedTokens = config.customNestedParser(dedentedNested); - } else { - nestedTokens = lexer.blockTokens(dedentedNested); - } - } - } - const token = config.createToken(itemData, nestedTokens); - items.push(token); - } - if (items.length === 0) { - return void 0; - } - return { - items, - raw: totalRaw - }; -} - -// src/utilities/markdown/renderNestedMarkdownContent.ts -function renderNestedMarkdownContent(node, h2, prefixOrGenerator, ctx) { - if (!node || !Array.isArray(node.content)) { - return ""; - } - const prefix = typeof prefixOrGenerator === "function" ? prefixOrGenerator(ctx) : prefixOrGenerator; - const [content, ...children] = node.content; - const mainContent = h2.renderChildren([content]); - let output = `${prefix}${mainContent}`; - if (children && children.length > 0) { - children.forEach((child, index) => { - var _a, _b; - const childContent = (_b = (_a = h2.renderChild) == null ? void 0 : _a.call(h2, child, index + 1)) != null ? _b : h2.renderChildren([child]); - if (childContent !== void 0 && childContent !== null) { - const indentedChild = childContent.split("\n").map((line) => line ? h2.indent(line) : h2.indent("")).join("\n"); - output += child.type === "paragraph" ? ` - -${indentedChild}` : ` -${indentedChild}`; - } - }); - } - return output; -} - -// src/utilities/marksEqual.ts -function marksEqual(a, b) { - if (a.length !== b.length) { - return false; - } - return a.every((mark, i) => { - const other = b[i]; - return mark.type === other.type && attrsEqual(mark.attrs, other.attrs); - }); -} - -// src/MarkView.ts -function updateMarkViewAttributes(checkMark, editor, attrs = {}) { - const { state } = editor; - const { doc, tr } = state; - const thisMark = checkMark; - doc.descendants((node, pos) => { - const from = tr.mapping.map(pos); - const to = tr.mapping.map(pos) + node.nodeSize; - let foundMark = null; - node.marks.forEach((mark) => { - if (mark !== thisMark) { - return false; - } - foundMark = mark; - }); - if (!foundMark) { - return; - } - let needsUpdate = false; - Object.keys(attrs).forEach((k) => { - if (attrs[k] !== foundMark.attrs[k]) { - needsUpdate = true; - } - }); - if (needsUpdate) { - const updatedMark = checkMark.type.create({ - ...checkMark.attrs, - ...attrs - }); - tr.removeMark(from, to, checkMark.type); - tr.addMark(from, to, updatedMark); - } - }); - if (tr.docChanged) { - editor.view.dispatch(tr); - } -} -var MarkView = class { - constructor(component, props, options) { - this.component = component; - this.editor = props.editor; - this.options = { ...options }; - this.mark = props.mark; - this.HTMLAttributes = props.HTMLAttributes; - } - get dom() { - return this.editor.view.dom; - } - get contentDOM() { - return null; - } - /** - * Update the attributes of the mark in the document. - * @param attrs The attributes to update. - */ - updateAttributes(attrs, checkMark) { - updateMarkViewAttributes(checkMark || this.mark, this.editor, attrs); - } - ignoreMutation(mutation) { - if (!this.dom || !this.contentDOM) { - return true; - } - if (typeof this.options.ignoreMutation === "function") { - return this.options.ignoreMutation({ mutation }); - } - if (mutation.type === "selection") { - return false; - } - if (this.dom.contains(mutation.target) && mutation.type === "childList" && (isiOS() || isAndroid()) && this.editor.isFocused) { - const changedNodes = [ - ...Array.from(mutation.addedNodes), - ...Array.from(mutation.removedNodes) - ]; - if (changedNodes.every((node) => node.isContentEditable)) { - return false; - } - } - if (this.contentDOM === mutation.target && mutation.type === "attributes") { - return true; - } - if (this.contentDOM.contains(mutation.target)) { - return false; - } - return true; - } -}; - -// src/Node.ts -var Node3 = class _Node extends Extendable { - constructor() { - super(...arguments); - this.type = "node"; - } - /** - * Create a new Node instance - * @param config - Node configuration object or a function that returns a configuration object - */ - static create(config = {}) { - const resolvedConfig = typeof config === "function" ? config() : config; - return new _Node(resolvedConfig); - } - configure(options) { - return super.configure(options); - } - extend(extendedConfig) { - const resolvedConfig = typeof extendedConfig === "function" ? extendedConfig() : extendedConfig; - return super.extend(resolvedConfig); - } -}; - -// src/NodeView.ts -var import_state25 = require("@tiptap/pm/state"); -var NodeView = class { - constructor(component, props, options) { - this.isDragging = false; - this.component = component; - this.editor = props.editor; - this.options = { - stopEvent: null, - ignoreMutation: null, - ...options - }; - this.extension = props.extension; - this.node = props.node; - this.decorations = props.decorations; - this.innerDecorations = props.innerDecorations; - this.view = props.view; - this.HTMLAttributes = props.HTMLAttributes; - this.getPos = props.getPos; - this.mount(); - } - mount() { - return; - } - get dom() { - return this.editor.view.dom; - } - get contentDOM() { - return null; - } - onDragStart(event) { - var _a, _b, _c, _d, _e, _f, _g; - const { view } = this.editor; - const target = event.target; - const dragHandle = target.nodeType === 3 ? (_a = target.parentElement) == null ? void 0 : _a.closest("[data-drag-handle]") : target.closest("[data-drag-handle]"); - if (!this.dom || ((_b = this.contentDOM) == null ? void 0 : _b.contains(target)) || !dragHandle) { - return; - } - let x = 0; - let y = 0; - if (this.dom !== dragHandle) { - const domBox = this.dom.getBoundingClientRect(); - const handleBox = dragHandle.getBoundingClientRect(); - const offsetX = (_d = event.offsetX) != null ? _d : (_c = event.nativeEvent) == null ? void 0 : _c.offsetX; - const offsetY = (_f = event.offsetY) != null ? _f : (_e = event.nativeEvent) == null ? void 0 : _e.offsetY; - x = handleBox.x - domBox.x + offsetX; - y = handleBox.y - domBox.y + offsetY; - } - const clonedNode = this.dom.cloneNode(true); - try { - const domBox = this.dom.getBoundingClientRect(); - clonedNode.style.width = `${Math.round(domBox.width)}px`; - clonedNode.style.height = `${Math.round(domBox.height)}px`; - clonedNode.style.boxSizing = "border-box"; - clonedNode.style.pointerEvents = "none"; - } catch { - } - let dragImageWrapper = null; - try { - dragImageWrapper = document.createElement("div"); - dragImageWrapper.style.position = "absolute"; - dragImageWrapper.style.top = "-9999px"; - dragImageWrapper.style.left = "-9999px"; - dragImageWrapper.style.pointerEvents = "none"; - dragImageWrapper.appendChild(clonedNode); - document.body.appendChild(dragImageWrapper); - (_g = event.dataTransfer) == null ? void 0 : _g.setDragImage(clonedNode, x, y); - } finally { - if (dragImageWrapper) { - setTimeout(() => { - try { - dragImageWrapper == null ? void 0 : dragImageWrapper.remove(); - } catch { - } - }, 0); - } - } - const pos = this.getPos(); - if (typeof pos !== "number") { - return; - } - const selection = import_state25.NodeSelection.create(view.state.doc, pos); - const transaction = view.state.tr.setSelection(selection); - view.dispatch(transaction); - } - stopEvent(event) { - var _a; - if (!this.dom) { - return false; - } - if (typeof this.options.stopEvent === "function") { - return this.options.stopEvent({ event }); - } - const target = event.target; - const isInElement = this.dom.contains(target) && !((_a = this.contentDOM) == null ? void 0 : _a.contains(target)); - if (!isInElement) { - return false; - } - const isDragEvent = event.type.startsWith("drag"); - const isDragOverEnterEvent = event.type === "dragover" || event.type === "dragenter"; - const isDropEvent = event.type === "drop"; - const isInput = ["INPUT", "BUTTON", "SELECT", "TEXTAREA"].includes(target.tagName) || target.isContentEditable; - if (isInput && !isDropEvent && !isDragEvent) { - return true; - } - const { isEditable } = this.editor; - const { isDragging } = this; - const isDraggable = !!this.node.type.spec.draggable; - const isSelectable = import_state25.NodeSelection.isSelectable(this.node); - const isCopyEvent = event.type === "copy"; - const isPasteEvent = event.type === "paste"; - const isCutEvent = event.type === "cut"; - const isClickEvent = event.type === "mousedown"; - if (!isDraggable && isSelectable && isDragEvent && event.target === this.dom) { - event.preventDefault(); - } - if (isDraggable && isDragEvent && !isDragging && event.target === this.dom) { - event.preventDefault(); - return false; - } - if (isDraggable && isEditable && !isDragging && isClickEvent) { - const dragHandle = target.closest("[data-drag-handle]"); - const isValidDragHandle = dragHandle && (this.dom === dragHandle || this.dom.contains(dragHandle)); - if (isValidDragHandle) { - this.isDragging = true; - document.addEventListener( - "dragend", - () => { - this.isDragging = false; - }, - { once: true } - ); - document.addEventListener( - "drop", - () => { - this.isDragging = false; - }, - { once: true } - ); - document.addEventListener( - "mouseup", - () => { - this.isDragging = false; - }, - { once: true } - ); - } - } - if (isDragging || isDragOverEnterEvent || isDropEvent || isCopyEvent || isPasteEvent || isCutEvent || isClickEvent && isSelectable) { - return false; - } - return true; - } - /** - * Called when a DOM [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) or a selection change happens within the view. - * @return `false` if the editor should re-read the selection or re-parse the range around the mutation - * @return `true` if it can safely be ignored. - */ - ignoreMutation(mutation) { - if (!this.dom || !this.contentDOM) { - return true; - } - if (typeof this.options.ignoreMutation === "function") { - return this.options.ignoreMutation({ mutation }); - } - if (this.node.isLeaf || this.node.isAtom) { - return true; - } - if (mutation.type === "selection") { - return false; - } - if (this.dom.contains(mutation.target) && mutation.type === "childList" && (isiOS() || isAndroid()) && this.editor.isFocused) { - const changedNodes = [ - ...Array.from(mutation.addedNodes), - ...Array.from(mutation.removedNodes) - ]; - if (changedNodes.every((node) => node.isContentEditable)) { - return false; - } - } - if (this.contentDOM === mutation.target && mutation.type === "attributes") { - return true; - } - if (this.contentDOM.contains(mutation.target)) { - return false; - } - return true; - } - /** - * Update the attributes of the prosemirror node. - */ - updateAttributes(attributes) { - this.editor.commands.command(({ tr }) => { - const pos = this.getPos(); - if (typeof pos !== "number") { - return false; - } - tr.setNodeMarkup(pos, void 0, { - ...this.node.attrs, - ...attributes - }); - return true; - }); - } - /** - * Delete the node. - */ - deleteNode() { - const from = this.getPos(); - if (typeof from !== "number") { - return; - } - const to = from + this.node.nodeSize; - this.editor.commands.deleteRange({ from, to }); - } -}; - -// src/pasteRules/markPasteRule.ts -function markPasteRule(config) { - return new PasteRule({ - find: config.find, - handler: ({ state, range, match, pasteEvent }) => { - const attributes = callOrReturn(config.getAttributes, void 0, match, pasteEvent); - if (attributes === false || attributes === null) { - return null; - } - const { tr } = state; - const captureGroup = match[match.length - 1]; - const fullMatch = match[0]; - let markEnd = range.to; - if (captureGroup) { - const startSpaces = fullMatch.search(/\S/); - const textStart = range.from + fullMatch.indexOf(captureGroup); - const textEnd = textStart + captureGroup.length; - const excludedMarks = getMarksBetween(range.from, range.to, state.doc).filter((item) => { - const excluded = item.mark.type.excluded; - return excluded.find((type) => type === config.type && type !== item.mark.type); - }).filter((item) => item.to > textStart); - if (excludedMarks.length) { - return null; - } - if (textEnd < range.to) { - tr.delete(textEnd, range.to); - } - if (textStart > range.from) { - tr.delete(range.from + startSpaces, textStart); - } - markEnd = range.from + startSpaces + captureGroup.length; - tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {})); - const isMatchAtEndOfText = match.index !== void 0 && match.input !== void 0 && match.index + match[0].length >= match.input.length; - if (!isMatchAtEndOfText) { - tr.removeStoredMark(config.type); - } - } - } - }); -} - -// src/pasteRules/nodePasteRule.ts -function nodePasteRule(config) { - return new PasteRule({ - find: config.find, - handler({ match, chain, range, pasteEvent }) { - const attributes = callOrReturn(config.getAttributes, void 0, match, pasteEvent); - const content = callOrReturn(config.getContent, void 0, attributes); - if (attributes === false || attributes === null) { - return null; - } - const node = { type: config.type.name, attrs: attributes }; - if (content) { - node.content = content; - } - if (match.input) { - chain().deleteRange(range).insertContentAt(range.from, node); - } - } - }); -} - -// src/pasteRules/textPasteRule.ts -function textPasteRule(config) { - return new PasteRule({ - find: config.find, - handler: ({ state, range, match }) => { - let insert = config.replace; - let start = range.from; - const end = range.to; - if (match[1]) { - const offset = match[0].lastIndexOf(match[1]); - insert += match[0].slice(offset + match[1].length); - start += offset; - const cutOff = start - end; - if (cutOff > 0) { - insert = match[0].slice(offset - cutOff, offset) + insert; - start = end; - } - } - state.tr.insertText(insert, start, end); - } - }); -} - -// src/Tracker.ts -var Tracker = class { - constructor(transaction) { - this.transaction = transaction; - this.currentStep = this.transaction.steps.length; - } - map(position) { - let deleted = false; - const mappedPosition = this.transaction.steps.slice(this.currentStep).reduce((newPosition, step) => { - const mapResult = step.getMap().mapResult(newPosition); - if (mapResult.deleted) { - deleted = true; - } - return mapResult.pos; - }, position); - return { - position: mappedPosition, - deleted - }; - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - CommandManager, - Editor, - Extendable, - Extension, - Fragment, - InputRule, - MappablePosition, - Mark, - MarkView, - Node, - NodePos, - NodeView, - PasteRule, - ResizableNodeView, - ResizableNodeview, - Tracker, - attrsEqual, - callOrReturn, - canInsertNode, - combineTransactionSteps, - commands, - createAtomBlockMarkdownSpec, - createBlockMarkdownSpec, - createChainableState, - createDocument, - createElement, - createInlineMarkdownSpec, - createMappablePosition, - createNodeFromContent, - createStyleTag, - decodeHtmlEntities, - defaultBlockAt, - deleteProps, - elementFromString, - encodeHtmlEntities, - escapeForRegEx, - extensions, - findChildren, - findChildrenInRange, - findDuplicates, - findParentNode, - findParentNodeClosestToPos, - flattenExtensions, - fromString, - generateHTML, - generateJSON, - generateText, - getAttributes, - getAttributesFromExtensions, - getChangedRanges, - getDebugJSON, - getExtensionField, - getHTMLFromFragment, - getMarkAttributes, - getMarkRange, - getMarkType, - getMarksBetween, - getNodeAtPosition, - getNodeAttributes, - getNodeType, - getRenderedAttributes, - getSchema, - getSchemaByResolvedExtensions, - getSchemaTypeByName, - getSchemaTypeNameByName, - getSplittedAttributes, - getStyleProperty, - getText, - getTextBetween, - getTextContentFromNodes, - getTextSerializersFromSchema, - getUpdatedPosition, - h, - injectExtensionAttributesToParseRule, - inputRulesPlugin, - isActive, - isAndroid, - isAtEndOfNode, - isAtStartOfNode, - isEmptyObject, - isExtensionRulesEnabled, - isFirefox, - isFunction, - isList, - isMacOS, - isMarkActive, - isNodeActive, - isNodeEmpty, - isNodeSelection, - isNodeViewSelected, - isNumber, - isPlainObject, - isRegExp, - isSafari, - isString, - isTextSelection, - isiOS, - markInputRule, - markPasteRule, - markdown, - marksEqual, - mergeAttributes, - mergeDeep, - minMax, - nodeInputRule, - nodePasteRule, - objectIncludes, - parseAttributes, - parseIndentedBlocks, - pasteRulesPlugin, - posToDOMRect, - removeDuplicates, - renderNestedMarkdownContent, - resolveExtensions, - resolveFocusPosition, - rewriteUnknownContent, - selectionToInsertionEnd, - serializeAttributes, - sortExtensions, - splitExtensions, - textInputRule, - textPasteRule, - textblockTypeInputRule, - updateMarkViewAttributes, - wrappingInputRule -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.cjs.map deleted file mode 100644 index 6ad68e8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/helpers/createChainableState.ts","../src/CommandManager.ts","../src/commands/index.ts","../src/commands/blur.ts","../src/commands/clearContent.ts","../src/commands/clearNodes.ts","../src/commands/command.ts","../src/commands/createParagraphNear.ts","../src/commands/cut.ts","../src/commands/deleteCurrentNode.ts","../src/helpers/getNodeType.ts","../src/commands/deleteNode.ts","../src/commands/deleteRange.ts","../src/commands/deleteSelection.ts","../src/commands/enter.ts","../src/commands/exitCode.ts","../src/commands/extendMarkRange.ts","../src/utilities/isRegExp.ts","../src/utilities/objectIncludes.ts","../src/helpers/getMarkRange.ts","../src/helpers/getMarkType.ts","../src/commands/first.ts","../src/helpers/isTextSelection.ts","../src/helpers/resolveFocusPosition.ts","../src/utilities/minMax.ts","../src/utilities/isAndroid.ts","../src/utilities/isiOS.ts","../src/utilities/isSafari.ts","../src/commands/focus.ts","../src/commands/forEach.ts","../src/commands/insertContent.ts","../src/commands/insertContentAt.ts","../src/helpers/createNodeFromContent.ts","../src/utilities/elementFromString.ts","../src/helpers/selectionToInsertionEnd.ts","../src/commands/join.ts","../src/commands/joinItemBackward.ts","../src/commands/joinItemForward.ts","../src/commands/joinTextblockBackward.ts","../src/commands/joinTextblockForward.ts","../src/utilities/isMacOS.ts","../src/commands/keyboardShortcut.ts","../src/commands/lift.ts","../src/helpers/isNodeActive.ts","../src/commands/liftEmptyBlock.ts","../src/commands/liftListItem.ts","../src/commands/newlineInCode.ts","../src/helpers/getSchemaTypeNameByName.ts","../src/utilities/deleteProps.ts","../src/commands/resetAttributes.ts","../src/commands/scrollIntoView.ts","../src/commands/selectAll.ts","../src/commands/selectNodeBackward.ts","../src/commands/selectNodeForward.ts","../src/commands/selectParentNode.ts","../src/commands/selectTextblockEnd.ts","../src/commands/selectTextblockStart.ts","../src/helpers/createDocument.ts","../src/commands/setContent.ts","../src/helpers/getMarkAttributes.ts","../src/helpers/combineTransactionSteps.ts","../src/helpers/defaultBlockAt.ts","../src/helpers/findChildren.ts","../src/helpers/findChildrenInRange.ts","../src/helpers/findParentNodeClosestToPos.ts","../src/helpers/findParentNode.ts","../src/helpers/getExtensionField.ts","../src/helpers/flattenExtensions.ts","../src/helpers/generateHTML.ts","../src/helpers/getHTMLFromFragment.ts","../src/helpers/getSchemaByResolvedExtensions.ts","../src/utilities/isFunction.ts","../src/utilities/callOrReturn.ts","../src/utilities/isEmptyObject.ts","../src/helpers/splitExtensions.ts","../src/helpers/getAttributesFromExtensions.ts","../src/utilities/mergeAttributes.ts","../src/helpers/getRenderedAttributes.ts","../src/utilities/fromString.ts","../src/helpers/injectExtensionAttributesToParseRule.ts","../src/utilities/findDuplicates.ts","../src/helpers/sortExtensions.ts","../src/helpers/resolveExtensions.ts","../src/helpers/getSchema.ts","../src/helpers/generateJSON.ts","../src/helpers/generateText.ts","../src/helpers/getTextBetween.ts","../src/helpers/getText.ts","../src/helpers/getTextSerializersFromSchema.ts","../src/helpers/getNodeAttributes.ts","../src/helpers/getAttributes.ts","../src/utilities/removeDuplicates.ts","../src/helpers/getChangedRanges.ts","../src/helpers/getDebugJSON.ts","../src/helpers/getMarksBetween.ts","../src/helpers/getNodeAtPosition.ts","../src/helpers/getSchemaTypeByName.ts","../src/helpers/getSplittedAttributes.ts","../src/helpers/getTextContentFromNodes.ts","../src/helpers/isMarkActive.ts","../src/helpers/isActive.ts","../src/helpers/isAtEndOfNode.ts","../src/helpers/isAtStartOfNode.ts","../src/helpers/isExtensionRulesEnabled.ts","../src/helpers/isList.ts","../src/helpers/isNodeEmpty.ts","../src/helpers/isNodeSelection.ts","../src/helpers/isNodeViewSelected.ts","../src/helpers/MappablePosition.ts","../src/helpers/posToDOMRect.ts","../src/helpers/rewriteUnknownContent.ts","../src/commands/setMark.ts","../src/commands/setMeta.ts","../src/commands/setNode.ts","../src/commands/setNodeSelection.ts","../src/commands/setTextDirection.ts","../src/commands/setTextSelection.ts","../src/commands/sinkListItem.ts","../src/commands/splitBlock.ts","../src/commands/splitListItem.ts","../src/commands/toggleList.ts","../src/commands/toggleMark.ts","../src/commands/toggleNode.ts","../src/commands/toggleWrap.ts","../src/commands/undoInputRule.ts","../src/commands/unsetAllMarks.ts","../src/commands/unsetMark.ts","../src/commands/unsetTextDirection.ts","../src/commands/updateAttributes.ts","../src/commands/wrapIn.ts","../src/commands/wrapInList.ts","../src/Editor.ts","../src/EventEmitter.ts","../src/ExtensionManager.ts","../src/InputRule.ts","../src/utilities/isPlainObject.ts","../src/utilities/mergeDeep.ts","../src/Extendable.ts","../src/Mark.ts","../src/PasteRule.ts","../src/utilities/isNumber.ts","../src/extensions/index.ts","../src/extensions/clipboardTextSerializer.ts","../src/Extension.ts","../src/extensions/commands.ts","../src/extensions/delete.ts","../src/extensions/drop.ts","../src/extensions/editable.ts","../src/extensions/focusEvents.ts","../src/extensions/keymap.ts","../src/extensions/paste.ts","../src/extensions/tabindex.ts","../src/extensions/textDirection.ts","../src/NodePos.ts","../src/style.ts","../src/utilities/createStyleTag.ts","../src/inputRules/markInputRule.ts","../src/inputRules/nodeInputRule.ts","../src/inputRules/textblockTypeInputRule.ts","../src/inputRules/textInputRule.ts","../src/inputRules/wrappingInputRule.ts","../src/jsx-runtime.ts","../src/lib/ResizableNodeView.ts","../src/utilities/attrsEqual.ts","../src/utilities/canInsertNode.ts","../src/utilities/escapeForRegEx.ts","../src/utilities/getStyleProperty.ts","../src/utilities/htmlEntities.ts","../src/utilities/isFirefox.ts","../src/utilities/isString.ts","../src/utilities/markdown/index.ts","../src/utilities/markdown/attributeUtils.ts","../src/utilities/markdown/createAtomBlockMarkdownSpec.ts","../src/utilities/markdown/createBlockMarkdownSpec.ts","../src/utilities/markdown/createInlineMarkdownSpec.ts","../src/utilities/markdown/parseIndentedBlocks.ts","../src/utilities/markdown/renderNestedMarkdownContent.ts","../src/utilities/marksEqual.ts","../src/MarkView.ts","../src/Node.ts","../src/NodeView.ts","../src/pasteRules/markPasteRule.ts","../src/pasteRules/nodePasteRule.ts","../src/pasteRules/textPasteRule.ts","../src/Tracker.ts"],"sourcesContent":["export * from './CommandManager.js'\nexport type * from './commands/index.js'\nexport * as commands from './commands/index.js'\nexport * from './Editor.js'\nexport * from './Extendable.js'\nexport * from './Extension.js'\nexport * as extensions from './extensions/index.js'\nexport * from './helpers/index.js'\nexport * from './InputRule.js'\nexport * from './inputRules/index.js'\nexport { createElement, Fragment, createElement as h } from './jsx-runtime.js'\nexport * from './lib/index.js'\nexport * from './Mark.js'\nexport * from './MarkView.js'\nexport * from './Node.js'\nexport * from './NodePos.js'\nexport * from './NodeView.js'\nexport * from './PasteRule.js'\nexport * from './pasteRules/index.js'\nexport * from './Tracker.js'\nexport * from './types.js'\nexport * from './utilities/index.js'\n\n// oxlint-disable-next-line\nexport interface Commands {}\n\n// oxlint-disable-next-line\nexport interface Storage {}\n","import type { EditorState, Transaction } from '@tiptap/pm/state'\n\n/**\n * Takes a Transaction & Editor State and turns it into a chainable state object\n * @param config The transaction and state to create the chainable state from\n * @returns A chainable Editor state object\n */\nexport function createChainableState(config: {\n transaction: Transaction\n state: EditorState\n}): EditorState {\n const { state, transaction } = config\n let { selection } = transaction\n let { doc } = transaction\n let { storedMarks } = transaction\n\n return {\n ...state,\n apply: state.apply.bind(state),\n applyTransaction: state.applyTransaction.bind(state),\n plugins: state.plugins,\n schema: state.schema,\n reconfigure: state.reconfigure.bind(state),\n toJSON: state.toJSON.bind(state),\n get storedMarks() {\n return storedMarks\n },\n get selection() {\n return selection\n },\n get doc() {\n return doc\n },\n get tr() {\n selection = transaction.selection\n doc = transaction.doc\n storedMarks = transaction.storedMarks\n\n return transaction\n },\n }\n}\n","import type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport type { Editor } from './Editor.js'\nimport { createChainableState } from './helpers/createChainableState.js'\nimport type {\n AnyCommands,\n CanCommands,\n ChainedCommands,\n CommandProps,\n SingleCommands,\n} from './types.js'\n\nexport class CommandManager {\n editor: Editor\n\n rawCommands: AnyCommands\n\n customState?: EditorState\n\n constructor(props: { editor: Editor; state?: EditorState }) {\n this.editor = props.editor\n this.rawCommands = this.editor.extensionManager.commands\n this.customState = props.state\n }\n\n get hasCustomState(): boolean {\n return !!this.customState\n }\n\n get state(): EditorState {\n return this.customState || this.editor.state\n }\n\n get commands(): SingleCommands {\n const { rawCommands, editor, state } = this\n const { view } = editor\n const { tr } = state\n const props = this.buildProps(tr)\n\n return Object.fromEntries(\n Object.entries(rawCommands).map(([name, command]) => {\n const method = (...args: any[]) => {\n const callback = command(...args)(props)\n\n if (!tr.getMeta('preventDispatch') && !this.hasCustomState) {\n view.dispatch(tr)\n }\n\n return callback\n }\n\n return [name, method]\n }),\n ) as unknown as SingleCommands\n }\n\n get chain(): () => ChainedCommands {\n return () => this.createChain()\n }\n\n get can(): () => CanCommands {\n return () => this.createCan()\n }\n\n public createChain(startTr?: Transaction, shouldDispatch = true): ChainedCommands {\n const { rawCommands, editor, state } = this\n const { view } = editor\n const callbacks: boolean[] = []\n const hasStartTransaction = !!startTr\n const tr = startTr || state.tr\n\n const run = () => {\n if (\n !hasStartTransaction &&\n shouldDispatch &&\n !tr.getMeta('preventDispatch') &&\n !this.hasCustomState\n ) {\n view.dispatch(tr)\n }\n\n return callbacks.every(callback => callback === true)\n }\n\n const chain = {\n ...Object.fromEntries(\n Object.entries(rawCommands).map(([name, command]) => {\n const chainedCommand = (...args: never[]) => {\n const props = this.buildProps(tr, shouldDispatch)\n const callback = command(...args)(props)\n\n callbacks.push(callback)\n\n return chain\n }\n\n return [name, chainedCommand]\n }),\n ),\n run,\n } as unknown as ChainedCommands\n\n return chain\n }\n\n public createCan(startTr?: Transaction): CanCommands {\n const { rawCommands, state } = this\n const dispatch = false\n const tr = startTr || state.tr\n const props = this.buildProps(tr, dispatch)\n const formattedCommands = Object.fromEntries(\n Object.entries(rawCommands).map(([name, command]) => {\n return [name, (...args: never[]) => command(...args)({ ...props, dispatch: undefined })]\n }),\n ) as unknown as SingleCommands\n\n return {\n ...formattedCommands,\n chain: () => this.createChain(tr, dispatch),\n } as CanCommands\n }\n\n public buildProps(tr: Transaction, shouldDispatch = true): CommandProps {\n const { rawCommands, editor, state } = this\n const { view } = editor\n\n const props: CommandProps = {\n tr,\n editor,\n view,\n state: createChainableState({\n state,\n transaction: tr,\n }),\n dispatch: shouldDispatch ? () => undefined : undefined,\n chain: () => this.createChain(tr, shouldDispatch),\n can: () => this.createCan(tr),\n get commands() {\n return Object.fromEntries(\n Object.entries(rawCommands).map(([name, command]) => {\n return [name, (...args: never[]) => command(...args)(props)]\n }),\n ) as unknown as SingleCommands\n },\n }\n\n return props\n }\n}\n","export * from './blur.js'\nexport * from './clearContent.js'\nexport * from './clearNodes.js'\nexport * from './command.js'\nexport * from './createParagraphNear.js'\nexport * from './cut.js'\nexport * from './deleteCurrentNode.js'\nexport * from './deleteNode.js'\nexport * from './deleteRange.js'\nexport * from './deleteSelection.js'\nexport * from './enter.js'\nexport * from './exitCode.js'\nexport * from './extendMarkRange.js'\nexport * from './first.js'\nexport * from './focus.js'\nexport * from './forEach.js'\nexport * from './insertContent.js'\nexport * from './insertContentAt.js'\nexport * from './join.js'\nexport * from './joinItemBackward.js'\nexport * from './joinItemForward.js'\nexport * from './joinTextblockBackward.js'\nexport * from './joinTextblockForward.js'\nexport * from './keyboardShortcut.js'\nexport * from './lift.js'\nexport * from './liftEmptyBlock.js'\nexport * from './liftListItem.js'\nexport * from './newlineInCode.js'\nexport * from './resetAttributes.js'\nexport * from './scrollIntoView.js'\nexport * from './selectAll.js'\nexport * from './selectNodeBackward.js'\nexport * from './selectNodeForward.js'\nexport * from './selectParentNode.js'\nexport * from './selectTextblockEnd.js'\nexport * from './selectTextblockStart.js'\nexport * from './setContent.js'\nexport * from './setMark.js'\nexport * from './setMeta.js'\nexport * from './setNode.js'\nexport * from './setNodeSelection.js'\nexport * from './setTextDirection.js'\nexport * from './setTextSelection.js'\nexport * from './sinkListItem.js'\nexport * from './splitBlock.js'\nexport * from './splitListItem.js'\nexport * from './toggleList.js'\nexport * from './toggleMark.js'\nexport * from './toggleNode.js'\nexport * from './toggleWrap.js'\nexport * from './undoInputRule.js'\nexport * from './unsetAllMarks.js'\nexport * from './unsetMark.js'\nexport * from './unsetTextDirection.js'\nexport * from './updateAttributes.js'\nexport * from './wrapIn.js'\nexport * from './wrapInList.js'\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n blur: {\n /**\n * Removes focus from the editor.\n * @example editor.commands.blur()\n */\n blur: () => ReturnType\n }\n }\n}\n\nexport const blur: RawCommands['blur'] =\n () =>\n ({ editor, view }) => {\n requestAnimationFrame(() => {\n if (!editor.isDestroyed) {\n ;(view.dom as HTMLElement).blur()\n\n // Browsers should remove the caret on blur but safari does not.\n // See: https://github.com/ueberdosis/tiptap/issues/2405\n window?.getSelection()?.removeAllRanges()\n }\n })\n\n return true\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n clearContent: {\n /**\n * Clear the whole document.\n * @example editor.commands.clearContent()\n */\n clearContent: (\n /**\n * Whether to emit an update event.\n * @default true\n */\n emitUpdate?: boolean,\n ) => ReturnType\n }\n }\n}\n\nexport const clearContent: RawCommands['clearContent'] =\n (emitUpdate = true) =>\n ({ commands }) => {\n return commands.setContent('', { emitUpdate })\n }\n","import { liftTarget } from '@tiptap/pm/transform'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n clearNodes: {\n /**\n * Normalize nodes to a simple paragraph.\n * @example editor.commands.clearNodes()\n */\n clearNodes: () => ReturnType\n }\n }\n}\n\nexport const clearNodes: RawCommands['clearNodes'] =\n () =>\n ({ state, tr, dispatch }) => {\n const { selection } = tr\n const { ranges } = selection\n\n if (!dispatch) {\n return true\n }\n\n ranges.forEach(({ $from, $to }) => {\n state.doc.nodesBetween($from.pos, $to.pos, (node, pos) => {\n if (node.type.isText) {\n return\n }\n\n const { doc, mapping } = tr\n const $mappedFrom = doc.resolve(mapping.map(pos))\n const $mappedTo = doc.resolve(mapping.map(pos + node.nodeSize))\n const nodeRange = $mappedFrom.blockRange($mappedTo)\n\n if (!nodeRange) {\n return\n }\n\n const targetLiftDepth = liftTarget(nodeRange)\n\n if (node.type.isTextblock) {\n const { defaultType } = $mappedFrom.parent.contentMatchAt($mappedFrom.index())\n\n tr.setNodeMarkup(nodeRange.start, defaultType)\n }\n\n if (targetLiftDepth || targetLiftDepth === 0) {\n tr.lift(nodeRange, targetLiftDepth)\n }\n })\n })\n\n return true\n }\n","import type { Command, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n command: {\n /**\n * Define a command inline.\n * @param fn The command function.\n * @example\n * editor.commands.command(({ tr, state }) => {\n * ...\n * return true\n * })\n */\n command: (fn: (props: Parameters[0]) => boolean) => ReturnType\n }\n }\n}\n\nexport const command: RawCommands['command'] = fn => props => {\n return fn(props)\n}\n","import { createParagraphNear as originalCreateParagraphNear } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n createParagraphNear: {\n /**\n * Create a paragraph nearby.\n * @example editor.commands.createParagraphNear()\n */\n createParagraphNear: () => ReturnType\n }\n }\n}\n\nexport const createParagraphNear: RawCommands['createParagraphNear'] =\n () =>\n ({ state, dispatch }) => {\n return originalCreateParagraphNear(state, dispatch)\n }\n","import { TextSelection } from '@tiptap/pm/state'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n cut: {\n /**\n * Cuts content from a range and inserts it at a given position.\n * @param range The range to cut.\n * @param range.from The start position of the range.\n * @param range.to The end position of the range.\n * @param targetPos The position to insert the content at.\n * @example editor.commands.cut({ from: 1, to: 3 }, 5)\n */\n cut: ({ from, to }: { from: number; to: number }, targetPos: number) => ReturnType\n }\n }\n}\n\nexport const cut: RawCommands['cut'] =\n (originRange, targetPos) =>\n ({ editor, tr }) => {\n const { state } = editor\n\n const contentSlice = state.doc.slice(originRange.from, originRange.to)\n\n tr.deleteRange(originRange.from, originRange.to)\n const newPos = tr.mapping.map(targetPos)\n\n tr.insert(newPos, contentSlice.content)\n\n tr.setSelection(new TextSelection(tr.doc.resolve(Math.max(newPos - 1, 0))))\n\n return true\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n deleteCurrentNode: {\n /**\n * Delete the node that currently has the selection anchor.\n * @example editor.commands.deleteCurrentNode()\n */\n deleteCurrentNode: () => ReturnType\n }\n }\n}\n\nexport const deleteCurrentNode: RawCommands['deleteCurrentNode'] =\n () =>\n ({ tr, dispatch }) => {\n const { selection } = tr\n const currentNode = selection.$anchor.node()\n\n // if there is content inside the current node, break out of this command\n if (currentNode.content.size > 0) {\n return false\n }\n\n const $pos = tr.selection.$anchor\n\n for (let depth = $pos.depth; depth > 0; depth -= 1) {\n const node = $pos.node(depth)\n\n if (node.type === currentNode.type) {\n if (dispatch) {\n const from = $pos.before(depth)\n const to = $pos.after(depth)\n\n tr.delete(from, to).scrollIntoView()\n }\n\n return true\n }\n }\n\n return false\n }\n","import type { NodeType, Schema } from '@tiptap/pm/model'\n\nexport function getNodeType(nameOrType: string | NodeType, schema: Schema): NodeType {\n if (typeof nameOrType === 'string') {\n if (!schema.nodes[nameOrType]) {\n throw Error(\n `There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`,\n )\n }\n\n return schema.nodes[nameOrType]\n }\n\n return nameOrType\n}\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n deleteNode: {\n /**\n * Delete a node with a given type or name.\n * @param typeOrName The type or name of the node.\n * @example editor.commands.deleteNode('paragraph')\n */\n deleteNode: (typeOrName: string | NodeType) => ReturnType\n }\n }\n}\n\nexport const deleteNode: RawCommands['deleteNode'] =\n typeOrName =>\n ({ tr, state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n const $pos = tr.selection.$anchor\n\n for (let depth = $pos.depth; depth > 0; depth -= 1) {\n const node = $pos.node(depth)\n\n if (node.type === type) {\n if (dispatch) {\n const from = $pos.before(depth)\n const to = $pos.after(depth)\n\n tr.delete(from, to).scrollIntoView()\n }\n\n return true\n }\n }\n\n return false\n }\n","import type { Range, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n deleteRange: {\n /**\n * Delete a given range.\n * @param range The range to delete.\n * @example editor.commands.deleteRange({ from: 1, to: 3 })\n */\n deleteRange: (range: Range) => ReturnType\n }\n }\n}\n\nexport const deleteRange: RawCommands['deleteRange'] =\n range =>\n ({ tr, dispatch }) => {\n const { from, to } = range\n\n if (dispatch) {\n tr.delete(from, to)\n }\n\n return true\n }\n","import type { ResolvedPos, Schema } from '@tiptap/pm/model'\n\nimport type { RawCommands } from '../types.js'\n\n/**\n * Check if a node has text content based on its content specification.\n * Returns true if the node's content spec matches text* or text+ patterns.\n */\nconst hasTextContent = (nodeSpec: { content?: string }): boolean => {\n if (!nodeSpec.content) {\n return false\n }\n const textRegex = /^text(\\*|\\+)/\n return textRegex.test(nodeSpec.content)\n}\n\n/**\n * Expand selection position for a specific side (left or right) to handle inline text nodes.\n * This function checks if the position is within an inline node with text content and\n * expands it to include the entire node boundaries for proper deletion.\n * @param $pos - The resolved position to expand\n * @param schema - The ProseMirror schema\n * @param side - Which side to expand ('left' or 'right')\n * @returns The expanded position for deletion\n */\nconst expandSelectionForSide = (\n $pos: ResolvedPos,\n schema: Schema,\n side: 'left' | 'right',\n): number => {\n if (!$pos.parent.isInline) {\n return $pos.pos\n }\n\n if ((side === 'left' && $pos.pos > $pos.start()) || (side === 'right' && $pos.pos < $pos.end())) {\n return $pos.pos\n }\n\n const parentContent = schema.nodes[$pos.parent.type.name].spec\n if (!hasTextContent(parentContent)) {\n return $pos.pos\n }\n\n return side === 'left' ? $pos.start() - 1 : $pos.end() + 1\n}\n\n/**\n * Expand selection range to properly handle deletion of inline text nodes.\n * Inline text nodes don't collapse correctly when text inside is deleted,\n * so we need to expand the selection to include the entire node.\n * See: https://code.haverbeke.berlin/prosemirror/prosemirror/issues/1365\n */\nconst expandSelectionForInlineText = (\n $from: ResolvedPos,\n $to: ResolvedPos,\n schema: Schema,\n): { from: number; to: number } => {\n const from = expandSelectionForSide($from, schema, 'left')\n const to = expandSelectionForSide($to, schema, 'right')\n\n return { from, to }\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n deleteSelection: {\n /**\n * Delete the selection, if there is one.\n * @example editor.commands.deleteSelection()\n */\n deleteSelection: () => ReturnType\n }\n }\n}\n\nexport const deleteSelection: RawCommands['deleteSelection'] =\n () =>\n ({ state, dispatch }) => {\n const { $from, $to } = state.selection\n if (state.selection.empty) {\n return false\n }\n\n const { from, to } = expandSelectionForInlineText($from, $to, state.schema)\n\n if (dispatch) {\n state.tr.deleteRange(from, to).scrollIntoView()\n dispatch(state.tr)\n }\n\n return true\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n enter: {\n /**\n * Trigger enter.\n * @example editor.commands.enter()\n */\n enter: () => ReturnType\n }\n }\n}\n\nexport const enter: RawCommands['enter'] =\n () =>\n ({ commands }) => {\n return commands.keyboardShortcut('Enter')\n }\n","import { exitCode as originalExitCode } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n exitCode: {\n /**\n * Exit from a code block.\n * @example editor.commands.exitCode()\n */\n exitCode: () => ReturnType\n }\n }\n}\n\nexport const exitCode: RawCommands['exitCode'] =\n () =>\n ({ state, dispatch }) => {\n return originalExitCode(state, dispatch)\n }\n","import type { MarkType } from '@tiptap/pm/model'\nimport { TextSelection } from '@tiptap/pm/state'\n\nimport { getMarkRange } from '../helpers/getMarkRange.js'\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n extendMarkRange: {\n /**\n * Extends the text selection to the current mark by type or name.\n * @param typeOrName The type or name of the mark.\n * @param attributes The attributes to match against.\n * If not provided, only the first mark at the position will be matched.\n * @example editor.commands.extendMarkRange('bold')\n * @example editor.commands.extendMarkRange('mention', { userId: \"1\" })\n */\n extendMarkRange: (\n /**\n * The type or name of the mark.\n */\n typeOrName: string | MarkType,\n\n /**\n * The attributes of the mark.\n */\n attributes?: Record,\n ) => ReturnType\n }\n }\n}\n\nexport const extendMarkRange: RawCommands['extendMarkRange'] =\n (typeOrName, attributes) =>\n ({ tr, state, dispatch }) => {\n const type = getMarkType(typeOrName, state.schema)\n const { doc, selection } = tr\n const { $from, from, to } = selection\n\n if (dispatch) {\n const range = getMarkRange($from, type, attributes)\n\n if (range && range.from <= from && range.to >= to) {\n const newSelection = TextSelection.create(doc, range.from, range.to)\n\n tr.setSelection(newSelection)\n }\n }\n\n return true\n }\n","export function isRegExp(value: any): value is RegExp {\n return Object.prototype.toString.call(value) === '[object RegExp]'\n}\n","import { isRegExp } from './isRegExp.js'\n\n/**\n * Check if object1 includes object2\n * @param object1 Object\n * @param object2 Object\n */\nexport function objectIncludes(\n object1: Record,\n object2: Record,\n options: { strict: boolean } = { strict: true },\n): boolean {\n const keys = Object.keys(object2)\n\n if (!keys.length) {\n return true\n }\n\n return keys.every(key => {\n if (options.strict) {\n return object2[key] === object1[key]\n }\n\n if (isRegExp(object2[key])) {\n return object2[key].test(object1[key])\n }\n\n return object2[key] === object1[key]\n })\n}\n","import type { Mark as ProseMirrorMark, MarkType, ResolvedPos } from '@tiptap/pm/model'\n\nimport type { Range } from '../types.js'\nimport { objectIncludes } from '../utilities/objectIncludes.js'\n\nfunction findMarkInSet(\n marks: ProseMirrorMark[],\n type: MarkType,\n attributes: Record = {},\n): ProseMirrorMark | undefined {\n return marks.find(item => {\n return (\n item.type === type &&\n objectIncludes(\n // Only check equality for the attributes that are provided\n Object.fromEntries(Object.keys(attributes).map(k => [k, item.attrs[k]])),\n attributes,\n )\n )\n })\n}\n\nfunction isMarkInSet(\n marks: ProseMirrorMark[],\n type: MarkType,\n attributes: Record = {},\n): boolean {\n return !!findMarkInSet(marks, type, attributes)\n}\n\n/**\n * Get the range of a mark at a resolved position.\n */\nexport function getMarkRange(\n /**\n * The position to get the mark range for.\n */\n $pos: ResolvedPos,\n /**\n * The mark type to get the range for.\n */\n type: MarkType,\n /**\n * The attributes to match against.\n * If not provided, only the first mark at the position will be matched.\n */\n attributes?: Record,\n): Range | void {\n if (!$pos || !type) {\n return\n }\n let start = $pos.parent.childAfter($pos.parentOffset)\n\n // If the cursor is at the start of a text node that does not have the mark, look backward\n if (!start.node || !start.node.marks.some(mark => mark.type === type)) {\n start = $pos.parent.childBefore($pos.parentOffset)\n }\n\n // If there is no text node with the mark even backward, return undefined\n if (!start.node || !start.node.marks.some(mark => mark.type === type)) {\n return\n }\n\n // Default to only matching against the attributes of the first mark with the given type\n if (!attributes) {\n const firstMark = start.node.marks.find(mark => mark.type === type)\n if (firstMark) {\n attributes = firstMark.attrs\n }\n }\n\n // We now know that the cursor is either at the start, middle or end of a text node with the specified mark\n // so we can look it up on the targeted mark\n const mark = findMarkInSet([...start.node.marks], type, attributes)\n\n if (!mark) {\n return\n }\n\n let startIndex = start.index\n let startPos = $pos.start() + start.offset\n let endIndex = startIndex + 1\n let endPos = startPos + start.node.nodeSize\n\n while (\n startIndex > 0 &&\n isMarkInSet([...$pos.parent.child(startIndex - 1).marks], type, attributes)\n ) {\n startIndex -= 1\n startPos -= $pos.parent.child(startIndex).nodeSize\n }\n\n while (\n endIndex < $pos.parent.childCount &&\n isMarkInSet([...$pos.parent.child(endIndex).marks], type, attributes)\n ) {\n endPos += $pos.parent.child(endIndex).nodeSize\n endIndex += 1\n }\n\n return {\n from: startPos,\n to: endPos,\n }\n}\n","import type { MarkType, Schema } from '@tiptap/pm/model'\n\nexport function getMarkType(nameOrType: string | MarkType, schema: Schema): MarkType {\n if (typeof nameOrType === 'string') {\n if (!schema.marks[nameOrType]) {\n throw Error(\n `There is no mark type named '${nameOrType}'. Maybe you forgot to add the extension?`,\n )\n }\n\n return schema.marks[nameOrType]\n }\n\n return nameOrType\n}\n","import type { Command, CommandProps, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n first: {\n /**\n * Runs one command after the other and stops at the first which returns true.\n * @param commands The commands to run.\n * @example editor.commands.first([command1, command2])\n */\n first: (commands: Command[] | ((props: CommandProps) => Command[])) => ReturnType\n }\n }\n}\n\nexport const first: RawCommands['first'] = commands => props => {\n const items = typeof commands === 'function' ? commands(props) : commands\n\n for (let i = 0; i < items.length; i += 1) {\n if (items[i](props)) {\n return true\n }\n }\n\n return false\n}\n","import { TextSelection } from '@tiptap/pm/state'\n\nexport function isTextSelection(value: unknown): value is TextSelection {\n return value instanceof TextSelection\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Selection, TextSelection } from '@tiptap/pm/state'\n\nimport type { FocusPosition } from '../types.js'\nimport { minMax } from '../utilities/minMax.js'\n\nexport function resolveFocusPosition(\n doc: ProseMirrorNode,\n position: FocusPosition = null,\n): Selection | null {\n if (!position) {\n return null\n }\n\n const selectionAtStart = Selection.atStart(doc)\n const selectionAtEnd = Selection.atEnd(doc)\n\n if (position === 'start' || position === true) {\n return selectionAtStart\n }\n\n if (position === 'end') {\n return selectionAtEnd\n }\n\n const minPos = selectionAtStart.from\n const maxPos = selectionAtEnd.to\n\n if (position === 'all') {\n return TextSelection.create(\n doc,\n minMax(0, minPos, maxPos),\n minMax(doc.content.size, minPos, maxPos),\n )\n }\n\n return TextSelection.create(\n doc,\n minMax(position, minPos, maxPos),\n minMax(position, minPos, maxPos),\n )\n}\n","export function minMax(value = 0, min = 0, max = 0): number {\n return Math.min(Math.max(value, min), max)\n}\n","export function isAndroid(): boolean {\n return navigator.platform === 'Android' || /android/i.test(navigator.userAgent)\n}\n","export function isiOS(): boolean {\n return (\n ['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes(\n navigator.platform,\n ) ||\n // iPad on iOS 13 detection\n (navigator.userAgent.includes('Mac') && 'ontouchend' in document)\n )\n}\n","/**\n * Detects if the current browser is Safari (but not iOS Safari or Chrome).\n * @returns `true` if the browser is Safari, `false` otherwise.\n * @example\n * if (isSafari()) {\n * // Safari-specific handling\n * }\n */\nexport function isSafari(): boolean {\n return typeof navigator !== 'undefined'\n ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent)\n : false\n}\n","import { isTextSelection } from '../helpers/isTextSelection.js'\nimport { resolveFocusPosition } from '../helpers/resolveFocusPosition.js'\nimport type { FocusPosition, RawCommands } from '../types.js'\nimport { isAndroid } from '../utilities/isAndroid.js'\nimport { isiOS } from '../utilities/isiOS.js'\nimport { isSafari } from '../utilities/isSafari.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n focus: {\n /**\n * Focus the editor at the given position.\n * @param position The position to focus at.\n * @param options.scrollIntoView Scroll the focused position into view after focusing\n * @example editor.commands.focus()\n * @example editor.commands.focus(32, { scrollIntoView: false })\n */\n focus: (\n /**\n * The position to focus at.\n */\n position?: FocusPosition,\n\n /**\n * Optional options\n * @default { scrollIntoView: true }\n */\n options?: {\n scrollIntoView?: boolean\n },\n ) => ReturnType\n }\n }\n}\n\nexport const focus: RawCommands['focus'] =\n (position = null, options = {}) =>\n ({ editor, view, tr, dispatch }) => {\n options = {\n scrollIntoView: true,\n ...options,\n }\n\n const delayedFocus = () => {\n // focus within `requestAnimationFrame` breaks focus on iOS and Android\n // so we have to call this\n if (isiOS() || isAndroid()) {\n ;(view.dom as HTMLElement).focus()\n }\n\n // Safari requires preventScroll to avoid the browser scrolling to the\n // top of the editor when focus is called before the selection is set.\n // We exclude iOS and Android since they are already handled above.\n // see: https://github.com/ueberdosis/tiptap/issues/7318\n if (isSafari() && !isiOS() && !isAndroid()) {\n ;(view.dom as HTMLElement).focus({ preventScroll: true })\n }\n\n // For React we have to focus asynchronously. Otherwise wild things happen.\n // see: https://github.com/ueberdosis/tiptap/issues/1520\n requestAnimationFrame(() => {\n if (!editor.isDestroyed) {\n view.focus()\n\n if (options?.scrollIntoView) {\n editor.commands.scrollIntoView()\n }\n }\n })\n }\n\n try {\n if ((view.hasFocus() && position === null) || position === false) {\n return true\n }\n } catch {\n // if view.hasFocus fails (view not mounted yet)\n // we will return false because there's nothing to focus\n return false\n }\n\n // we don’t try to resolve a NodeSelection or CellSelection\n if (dispatch && position === null && !isTextSelection(editor.state.selection)) {\n delayedFocus()\n return true\n }\n\n // pass through tr.doc instead of editor.state.doc\n // since transactions could change the editors state before this command has been run\n const selection = resolveFocusPosition(tr.doc, position) || editor.state.selection\n const isSameSelection = editor.state.selection.eq(selection)\n\n if (dispatch) {\n if (!isSameSelection) {\n tr.setSelection(selection)\n }\n\n // `tr.setSelection` resets the stored marks\n // so we’ll restore them if the selection is the same as before\n if (isSameSelection && tr.storedMarks) {\n tr.setStoredMarks(tr.storedMarks)\n }\n\n delayedFocus()\n }\n\n return true\n }\n","import type { CommandProps, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n forEach: {\n /**\n * Loop through an array of items.\n */\n forEach: (\n items: T[],\n fn: (\n item: T,\n props: CommandProps & {\n index: number\n },\n ) => boolean,\n ) => ReturnType\n }\n }\n}\n\nexport const forEach: RawCommands['forEach'] = (items, fn) => props => {\n return items.every((item, index) => fn(item, { ...props, index }))\n}\n","import type { Fragment, Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model'\n\nimport type { Content, RawCommands } from '../types.js'\n\nexport interface InsertContentOptions {\n /**\n * Options for parsing the content.\n */\n parseOptions?: ParseOptions\n\n /**\n * Whether to update the selection after inserting the content.\n */\n updateSelection?: boolean\n applyInputRules?: boolean\n applyPasteRules?: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n insertContent: {\n /**\n * Insert a node or string of HTML at the current position.\n * @example editor.commands.insertContent('

Example

')\n * @example editor.commands.insertContent('

Example

', { updateSelection: false })\n */\n insertContent: (\n /**\n * The ProseMirror content to insert.\n */\n value: Content | ProseMirrorNode | Fragment,\n\n /**\n * Optional options\n */\n options?: InsertContentOptions,\n ) => ReturnType\n }\n }\n}\n\nexport const insertContent: RawCommands['insertContent'] =\n (value, options) =>\n ({ tr, commands }) => {\n return commands.insertContentAt(\n { from: tr.selection.from, to: tr.selection.to },\n value,\n options,\n )\n }\n","import type { Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model'\nimport { Fragment } from '@tiptap/pm/model'\n\nimport { createNodeFromContent } from '../helpers/createNodeFromContent.js'\nimport { selectionToInsertionEnd } from '../helpers/selectionToInsertionEnd.js'\nimport type { Content, Range, RawCommands } from '../types.js'\n\nexport interface InsertContentAtOptions {\n /**\n * Options for parsing the content.\n */\n parseOptions?: ParseOptions\n\n /**\n * Whether to update the selection after inserting the content.\n */\n updateSelection?: boolean\n\n /**\n * Whether to apply input rules after inserting the content.\n */\n applyInputRules?: boolean\n\n /**\n * Whether to apply paste rules after inserting the content.\n */\n applyPasteRules?: boolean\n\n /**\n * Whether to throw an error if the content is invalid.\n */\n errorOnInvalidContent?: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n insertContentAt: {\n /**\n * Insert a node or string of HTML at a specific position.\n * @example editor.commands.insertContentAt(0, '

Example

')\n */\n insertContentAt: (\n /**\n * The position to insert the content at.\n */\n position: number | Range,\n\n /**\n * The ProseMirror content to insert.\n */\n value: Content | ProseMirrorNode | Fragment,\n\n /**\n * Optional options\n */\n options?: InsertContentAtOptions,\n ) => ReturnType\n }\n }\n}\n\nconst isFragment = (nodeOrFragment: ProseMirrorNode | Fragment): nodeOrFragment is Fragment => {\n return !('type' in nodeOrFragment)\n}\n\nexport const insertContentAt: RawCommands['insertContentAt'] =\n (position, value, options) =>\n ({ tr, dispatch, editor }) => {\n if (dispatch) {\n options = {\n parseOptions: editor.options.parseOptions,\n updateSelection: true,\n applyInputRules: false,\n applyPasteRules: false,\n ...options,\n }\n\n let content: Fragment | ProseMirrorNode\n\n const emitContentError = (error: Error) => {\n editor.emit('contentError', {\n editor,\n error,\n disableCollaboration: () => {\n if (\n 'collaboration' in editor.storage &&\n typeof editor.storage.collaboration === 'object' &&\n editor.storage.collaboration\n ) {\n ;(editor.storage.collaboration as any).isDisabled = true\n }\n },\n })\n }\n\n const parseOptions: ParseOptions = {\n preserveWhitespace: 'full',\n ...options.parseOptions,\n }\n\n // If `emitContentError` is enabled, we want to check the content for errors\n // but ignore them (do not remove the invalid content from the document)\n if (\n !options.errorOnInvalidContent &&\n !editor.options.enableContentCheck &&\n editor.options.emitContentError\n ) {\n try {\n createNodeFromContent(value, editor.schema, {\n parseOptions,\n errorOnInvalidContent: true,\n })\n } catch (e) {\n emitContentError(e as Error)\n }\n }\n\n try {\n content = createNodeFromContent(value, editor.schema, {\n parseOptions,\n errorOnInvalidContent: options.errorOnInvalidContent ?? editor.options.enableContentCheck,\n })\n } catch (e) {\n emitContentError(e as Error)\n return false\n }\n\n let { from, to } =\n typeof position === 'number'\n ? { from: position, to: position }\n : { from: position.from, to: position.to }\n\n let isOnlyTextContent = true\n let isOnlyBlockContent = true\n const nodes = isFragment(content) ? content : [content]\n\n nodes.forEach(node => {\n // check if added node is valid\n node.check()\n\n isOnlyTextContent = isOnlyTextContent ? node.isText && node.marks.length === 0 : false\n\n isOnlyBlockContent = isOnlyBlockContent ? node.isBlock : false\n })\n\n // check if we can replace the wrapping node by\n // the newly inserted content\n // example:\n // replace an empty paragraph by an inserted image\n // instead of inserting the image below the paragraph\n if (from === to && isOnlyBlockContent) {\n const { parent } = tr.doc.resolve(from)\n const isEmptyTextBlock = parent.isTextblock && !parent.type.spec.code && !parent.childCount\n\n if (isEmptyTextBlock) {\n from -= 1\n to += 1\n }\n }\n\n let newContent\n\n // if there is only plain text we have to use `insertText`\n // because this will keep the current marks\n if (isOnlyTextContent) {\n // if value is string, we can use it directly\n // otherwise if it is an array, we have to join it\n if (Array.isArray(value)) {\n newContent = value.map(v => v.text || '').join('')\n } else if (value instanceof Fragment) {\n let text = ''\n\n value.forEach(node => {\n if (node.text) {\n text += node.text\n }\n })\n\n newContent = text\n } else if (typeof value === 'object' && !!value && !!value.text) {\n newContent = value.text\n } else {\n newContent = value as string\n }\n\n tr.insertText(newContent, from, to)\n } else {\n newContent = content\n\n const $from = tr.doc.resolve(from)\n const $fromNode = $from.node()\n const fromSelectionAtStart = $from.parentOffset === 0\n const isTextSelection = $fromNode.isText || $fromNode.isTextblock\n const hasContent = $fromNode.content.size > 0\n\n if (fromSelectionAtStart && isTextSelection && hasContent && isOnlyBlockContent) {\n from = Math.max(0, from - 1)\n }\n\n tr.replaceWith(from, to, newContent)\n }\n\n // set cursor at end of inserted content\n if (options.updateSelection) {\n selectionToInsertionEnd(tr, tr.steps.length - 1, -1)\n }\n\n if (options.applyInputRules) {\n tr.setMeta('applyInputRules', { from, text: newContent })\n }\n\n if (options.applyPasteRules) {\n tr.setMeta('applyPasteRules', { from, text: newContent })\n }\n }\n\n return true\n }\n","import type { ParseOptions } from '@tiptap/pm/model'\nimport { DOMParser, Fragment, Node as ProseMirrorNode, Schema } from '@tiptap/pm/model'\n\nimport type { Content } from '../types.js'\nimport { elementFromString } from '../utilities/elementFromString.js'\n\nexport type CreateNodeFromContentOptions = {\n slice?: boolean\n parseOptions?: ParseOptions\n errorOnInvalidContent?: boolean\n}\n\n/**\n * Takes a JSON or HTML content and creates a Prosemirror node or fragment from it.\n * @param content The JSON or HTML content to create the node from\n * @param schema The Prosemirror schema to use for the node\n * @param options Options for the parser\n * @returns The created Prosemirror node or fragment\n */\nexport function createNodeFromContent(\n content: Content | ProseMirrorNode | Fragment,\n schema: Schema,\n options?: CreateNodeFromContentOptions,\n): ProseMirrorNode | Fragment {\n if (content instanceof ProseMirrorNode || content instanceof Fragment) {\n return content\n }\n options = {\n slice: true,\n parseOptions: {},\n ...options,\n }\n\n const isJSONContent = typeof content === 'object' && content !== null\n const isTextContent = typeof content === 'string'\n\n if (isJSONContent) {\n try {\n const isArrayContent = Array.isArray(content) && content.length > 0\n\n // if the JSON Content is an array of nodes, create a fragment for each node\n if (isArrayContent) {\n return Fragment.fromArray(content.map(item => schema.nodeFromJSON(item)))\n }\n\n const node = schema.nodeFromJSON(content)\n\n if (options.errorOnInvalidContent) {\n node.check()\n }\n\n return node\n } catch (error) {\n if (options.errorOnInvalidContent) {\n throw new Error('[tiptap error]: Invalid JSON content', { cause: error as Error })\n }\n\n console.warn('[tiptap warn]: Invalid content.', 'Passed value:', content, 'Error:', error)\n\n return createNodeFromContent('', schema, options)\n }\n }\n\n if (isTextContent) {\n // Check for invalid content\n if (options.errorOnInvalidContent) {\n let hasInvalidContent = false\n let invalidContent = ''\n\n // A copy of the current schema with a catch-all node at the end\n const contentCheckSchema = new Schema({\n topNode: schema.spec.topNode,\n marks: schema.spec.marks,\n // Prosemirror's schemas are executed such that: the last to execute, matches last\n // This means that we can add a catch-all node at the end of the schema to catch any content that we don't know how to handle\n nodes: schema.spec.nodes.append({\n __tiptap__private__unknown__catch__all__node: {\n content: 'inline*',\n group: 'block',\n parseDOM: [\n {\n tag: '*',\n getAttrs: e => {\n // If this is ever called, we know that the content has something that we don't know how to handle in the schema\n hasInvalidContent = true\n // Try to stringify the element for a more helpful error message\n invalidContent = typeof e === 'string' ? e : e.outerHTML\n return null\n },\n },\n ],\n },\n }),\n })\n\n if (options.slice) {\n DOMParser.fromSchema(contentCheckSchema).parseSlice(\n elementFromString(content),\n options.parseOptions,\n )\n } else {\n DOMParser.fromSchema(contentCheckSchema).parse(\n elementFromString(content),\n options.parseOptions,\n )\n }\n\n if (options.errorOnInvalidContent && hasInvalidContent) {\n throw new Error('[tiptap error]: Invalid HTML content', {\n cause: new Error(`Invalid element found: ${invalidContent}`),\n })\n }\n }\n\n const parser = DOMParser.fromSchema(schema)\n\n if (options.slice) {\n return parser.parseSlice(elementFromString(content), options.parseOptions).content\n }\n\n return parser.parse(elementFromString(content), options.parseOptions)\n }\n\n return createNodeFromContent('', schema, options)\n}\n","const removeWhitespaces = (node: HTMLElement) => {\n const children = node.childNodes\n\n for (let i = children.length - 1; i >= 0; i -= 1) {\n const child = children[i]\n\n if (child.nodeType === 3 && child.nodeValue && /^(\\n\\s\\s|\\n)$/.test(child.nodeValue)) {\n node.removeChild(child)\n } else if (child.nodeType === 1) {\n removeWhitespaces(child as HTMLElement)\n }\n }\n\n return node\n}\n\nexport function elementFromString(value: string): HTMLElement {\n if (typeof window === 'undefined') {\n throw new Error(\n '[tiptap error]: there is no window object available, so this function cannot be used',\n )\n }\n // add a wrapper to preserve leading and trailing whitespace\n const wrappedValue = `${value}`\n\n const html = new window.DOMParser().parseFromString(wrappedValue, 'text/html').body\n\n return removeWhitespaces(html)\n}\n","import type { Transaction } from '@tiptap/pm/state'\nimport { Selection } from '@tiptap/pm/state'\nimport { ReplaceAroundStep, ReplaceStep } from '@tiptap/pm/transform'\n\n// source: https://github.com/ProseMirror/prosemirror-state/blob/master/src/selection.js#L466\nexport function selectionToInsertionEnd(tr: Transaction, startLen: number, bias: number) {\n const last = tr.steps.length - 1\n\n if (last < startLen) {\n return\n }\n\n const step = tr.steps[last]\n\n if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) {\n return\n }\n\n const map = tr.mapping.maps[last]\n let end = 0\n\n map.forEach((_from, _to, _newFrom, newTo) => {\n if (end === 0) {\n end = newTo\n }\n })\n\n tr.setSelection(Selection.near(tr.doc.resolve(end), bias))\n}\n","import {\n joinBackward as originalJoinBackward,\n joinDown as originalJoinDown,\n joinForward as originalJoinForward,\n joinUp as originalJoinUp,\n} from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n joinUp: {\n /**\n * Join the selected block or, if there is a text selection, the closest ancestor block of the selection that can be joined, with the sibling above it.\n * @example editor.commands.joinUp()\n */\n joinUp: () => ReturnType\n }\n joinDown: {\n /**\n * Join the selected block, or the closest ancestor of the selection that can be joined, with the sibling after it.\n * @example editor.commands.joinDown()\n */\n joinDown: () => ReturnType\n }\n joinBackward: {\n /**\n * If the selection is empty and at the start of a textblock, try to reduce the distance between that block and the one before it—if there's a block directly before it that can be joined, join them.\n * If not, try to move the selected block closer to the next one in the document structure by lifting it out of its\n * parent or moving it into a parent of the previous block. Will use the view for accurate (bidi-aware) start-of-textblock detection if given.\n * @example editor.commands.joinBackward()\n */\n joinBackward: () => ReturnType\n }\n joinForward: {\n /**\n * If the selection is empty and the cursor is at the end of a textblock, try to reduce or remove the boundary between that block and the one after it,\n * either by joining them or by moving the other block closer to this one in the tree structure.\n * Will use the view for accurate start-of-textblock detection if given.\n * @example editor.commands.joinForward()\n */\n joinForward: () => ReturnType\n }\n }\n}\n\nexport const joinUp: RawCommands['joinUp'] =\n () =>\n ({ state, dispatch }) => {\n return originalJoinUp(state, dispatch)\n }\n\nexport const joinDown: RawCommands['joinDown'] =\n () =>\n ({ state, dispatch }) => {\n return originalJoinDown(state, dispatch)\n }\n\nexport const joinBackward: RawCommands['joinBackward'] =\n () =>\n ({ state, dispatch }) => {\n return originalJoinBackward(state, dispatch)\n }\n\nexport const joinForward: RawCommands['joinForward'] =\n () =>\n ({ state, dispatch }) => {\n return originalJoinForward(state, dispatch)\n }\n","import { joinPoint } from '@tiptap/pm/transform'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n joinItemBackward: {\n /**\n * Join two items backward.\n * @example editor.commands.joinItemBackward()\n */\n joinItemBackward: () => ReturnType\n }\n }\n}\n\nexport const joinItemBackward: RawCommands['joinItemBackward'] =\n () =>\n ({ state, dispatch, tr }) => {\n try {\n const point = joinPoint(state.doc, state.selection.$from.pos, -1)\n\n if (point === null || point === undefined) {\n return false\n }\n\n tr.join(point, 2)\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n } catch {\n return false\n }\n }\n","import { joinPoint } from '@tiptap/pm/transform'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n joinItemForward: {\n /**\n * Join two items Forwards.\n * @example editor.commands.joinItemForward()\n */\n joinItemForward: () => ReturnType\n }\n }\n}\n\nexport const joinItemForward: RawCommands['joinItemForward'] =\n () =>\n ({ state, dispatch, tr }) => {\n try {\n const point = joinPoint(state.doc, state.selection.$from.pos, +1)\n\n if (point === null || point === undefined) {\n return false\n }\n\n tr.join(point, 2)\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n } catch {\n return false\n }\n }\n","import { joinTextblockBackward as originalCommand } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n joinTextblockBackward: {\n /**\n * A more limited form of joinBackward that only tries to join the current textblock to the one before it, if the cursor is at the start of a textblock.\n */\n joinTextblockBackward: () => ReturnType\n }\n }\n}\n\nexport const joinTextblockBackward: RawCommands['joinTextblockBackward'] =\n () =>\n ({ state, dispatch }) => {\n return originalCommand(state, dispatch)\n }\n","import { joinTextblockForward as originalCommand } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n joinTextblockForward: {\n /**\n * A more limited form of joinForward that only tries to join the current textblock to the one after it, if the cursor is at the end of a textblock.\n */\n joinTextblockForward: () => ReturnType\n }\n }\n}\n\nexport const joinTextblockForward: RawCommands['joinTextblockForward'] =\n () =>\n ({ state, dispatch }) => {\n return originalCommand(state, dispatch)\n }\n","export function isMacOS(): boolean {\n return typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false\n}\n","import type { RawCommands } from '../types.js'\nimport { isiOS } from '../utilities/isiOS.js'\nimport { isMacOS } from '../utilities/isMacOS.js'\n\nfunction normalizeKeyName(name: string) {\n const parts = name.split(/-(?!$)/)\n let result = parts[parts.length - 1]\n\n if (result === 'Space') {\n result = ' '\n }\n\n let alt\n let ctrl\n let shift\n let meta\n\n for (let i = 0; i < parts.length - 1; i += 1) {\n const mod = parts[i]\n\n if (/^(cmd|meta|m)$/i.test(mod)) {\n meta = true\n } else if (/^a(lt)?$/i.test(mod)) {\n alt = true\n } else if (/^(c|ctrl|control)$/i.test(mod)) {\n ctrl = true\n } else if (/^s(hift)?$/i.test(mod)) {\n shift = true\n } else if (/^mod$/i.test(mod)) {\n if (isiOS() || isMacOS()) {\n meta = true\n } else {\n ctrl = true\n }\n } else {\n throw new Error(`Unrecognized modifier name: ${mod}`)\n }\n }\n\n if (alt) {\n result = `Alt-${result}`\n }\n\n if (ctrl) {\n result = `Ctrl-${result}`\n }\n\n if (meta) {\n result = `Meta-${result}`\n }\n\n if (shift) {\n result = `Shift-${result}`\n }\n\n return result\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n keyboardShortcut: {\n /**\n * Trigger a keyboard shortcut.\n * @param name The name of the keyboard shortcut.\n * @example editor.commands.keyboardShortcut('Mod-b')\n */\n keyboardShortcut: (name: string) => ReturnType\n }\n }\n}\n\nexport const keyboardShortcut: RawCommands['keyboardShortcut'] =\n name =>\n ({ editor, view, tr, dispatch }) => {\n const keys = normalizeKeyName(name).split(/-(?!$)/)\n const key = keys.find(item => !['Alt', 'Ctrl', 'Meta', 'Shift'].includes(item))\n const event = new KeyboardEvent('keydown', {\n key: key === 'Space' ? ' ' : key,\n altKey: keys.includes('Alt'),\n ctrlKey: keys.includes('Ctrl'),\n metaKey: keys.includes('Meta'),\n shiftKey: keys.includes('Shift'),\n bubbles: true,\n cancelable: true,\n })\n\n const capturedTransaction = editor.captureTransaction(() => {\n view.someProp('handleKeyDown', f => f(view, event))\n })\n\n capturedTransaction?.steps.forEach(step => {\n const newStep = step.map(tr.mapping)\n\n if (newStep && dispatch) {\n tr.maybeStep(newStep)\n }\n })\n\n return true\n }\n","import { lift as originalLift } from '@tiptap/pm/commands'\nimport type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isNodeActive } from '../helpers/isNodeActive.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n lift: {\n /**\n * Removes an existing wrap if possible lifting the node out of it\n * @param typeOrName The type or name of the node.\n * @param attributes The attributes of the node.\n * @example editor.commands.lift('paragraph')\n * @example editor.commands.lift('heading', { level: 1 })\n */\n lift: (typeOrName: string | NodeType, attributes?: Record) => ReturnType\n }\n }\n}\n\nexport const lift: RawCommands['lift'] =\n (typeOrName, attributes = {}) =>\n ({ state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n const isActive = isNodeActive(state, type, attributes)\n\n if (!isActive) {\n return false\n }\n\n return originalLift(state, dispatch)\n }\n","import type { NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport type { NodeRange } from '../types.js'\nimport { objectIncludes } from '../utilities/objectIncludes.js'\nimport { getNodeType } from './getNodeType.js'\n\nexport function isNodeActive(\n state: EditorState,\n typeOrName: NodeType | string | null,\n attributes: Record = {},\n): boolean {\n const { from, to, empty } = state.selection\n const type = typeOrName ? getNodeType(typeOrName, state.schema) : null\n\n const nodeRanges: NodeRange[] = []\n\n state.doc.nodesBetween(from, to, (node, pos) => {\n if (node.isText) {\n return\n }\n\n const relativeFrom = Math.max(from, pos)\n const relativeTo = Math.min(to, pos + node.nodeSize)\n\n nodeRanges.push({\n node,\n from: relativeFrom,\n to: relativeTo,\n })\n })\n\n const selectionRange = to - from\n const matchedNodeRanges = nodeRanges\n .filter(nodeRange => {\n if (!type) {\n return true\n }\n\n return type.name === nodeRange.node.type.name\n })\n .filter(nodeRange => objectIncludes(nodeRange.node.attrs, attributes, { strict: false }))\n\n if (empty) {\n return !!matchedNodeRanges.length\n }\n\n const range = matchedNodeRanges.reduce((sum, nodeRange) => sum + nodeRange.to - nodeRange.from, 0)\n\n return range >= selectionRange\n}\n","import { liftEmptyBlock as originalLiftEmptyBlock } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n liftEmptyBlock: {\n /**\n * If the cursor is in an empty textblock that can be lifted, lift the block.\n * @example editor.commands.liftEmptyBlock()\n */\n liftEmptyBlock: () => ReturnType\n }\n }\n}\n\nexport const liftEmptyBlock: RawCommands['liftEmptyBlock'] =\n () =>\n ({ state, dispatch }) => {\n return originalLiftEmptyBlock(state, dispatch)\n }\n","import type { NodeType } from '@tiptap/pm/model'\nimport { liftListItem as originalLiftListItem } from '@tiptap/pm/schema-list'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n liftListItem: {\n /**\n * Create a command to lift the list item around the selection up into a wrapping list.\n * @param typeOrName The type or name of the node.\n * @example editor.commands.liftListItem('listItem')\n */\n liftListItem: (typeOrName: string | NodeType) => ReturnType\n }\n }\n}\n\nexport const liftListItem: RawCommands['liftListItem'] =\n typeOrName =>\n ({ state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n\n return originalLiftListItem(type)(state, dispatch)\n }\n","import { newlineInCode as originalNewlineInCode } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n newlineInCode: {\n /**\n * Add a newline character in code.\n * @example editor.commands.newlineInCode()\n */\n newlineInCode: () => ReturnType\n }\n }\n}\n\nexport const newlineInCode: RawCommands['newlineInCode'] =\n () =>\n ({ state, dispatch }) => {\n return originalNewlineInCode(state, dispatch)\n }\n","import type { Schema } from '@tiptap/pm/model'\n\n/**\n * Get the type of a schema item by its name.\n * @param name The name of the schema item\n * @param schema The Prosemiror schema to search in\n * @returns The type of the schema item (`node` or `mark`), or null if it doesn't exist\n */\nexport function getSchemaTypeNameByName(name: string, schema: Schema): 'node' | 'mark' | null {\n if (schema.nodes[name]) {\n return 'node'\n }\n\n if (schema.marks[name]) {\n return 'mark'\n }\n\n return null\n}\n","/**\n * Remove a property or an array of properties from an object\n * @param obj Object\n * @param key Key to remove\n */\nexport function deleteProps(\n obj: Record,\n propOrProps: string | string[],\n): Record {\n const props = typeof propOrProps === 'string' ? [propOrProps] : propOrProps\n\n return Object.keys(obj).reduce((newObj: Record, prop) => {\n if (!props.includes(prop)) {\n newObj[prop] = obj[prop]\n }\n\n return newObj\n }, {})\n}\n","import type { MarkType, NodeType } from '@tiptap/pm/model'\n\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName.js'\nimport type { RawCommands } from '../types.js'\nimport { deleteProps } from '../utilities/deleteProps.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n resetAttributes: {\n /**\n * Resets some node attributes to the default value.\n * @param typeOrName The type or name of the node.\n * @param attributes The attributes of the node to reset.\n * @example editor.commands.resetAttributes('heading', 'level')\n */\n resetAttributes: (\n typeOrName: string | NodeType | MarkType,\n attributes: string | string[],\n ) => ReturnType\n }\n }\n}\n\nexport const resetAttributes: RawCommands['resetAttributes'] =\n (typeOrName, attributes) =>\n ({ tr, state, dispatch }) => {\n let nodeType: NodeType | null = null\n let markType: MarkType | null = null\n\n const schemaType = getSchemaTypeNameByName(\n typeof typeOrName === 'string' ? typeOrName : typeOrName.name,\n state.schema,\n )\n\n if (!schemaType) {\n return false\n }\n\n if (schemaType === 'node') {\n nodeType = getNodeType(typeOrName as NodeType, state.schema)\n }\n\n if (schemaType === 'mark') {\n markType = getMarkType(typeOrName as MarkType, state.schema)\n }\n\n let canReset = false\n\n tr.selection.ranges.forEach(range => {\n state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => {\n if (nodeType && nodeType === node.type) {\n canReset = true\n\n if (dispatch) {\n tr.setNodeMarkup(pos, undefined, deleteProps(node.attrs, attributes))\n }\n }\n\n if (markType && node.marks.length) {\n node.marks.forEach(mark => {\n if (markType === mark.type) {\n canReset = true\n\n if (dispatch) {\n tr.addMark(\n pos,\n pos + node.nodeSize,\n markType.create(deleteProps(mark.attrs, attributes)),\n )\n }\n }\n })\n }\n })\n })\n\n return canReset\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n scrollIntoView: {\n /**\n * Scroll the selection into view.\n * @example editor.commands.scrollIntoView()\n */\n scrollIntoView: () => ReturnType\n }\n }\n}\n\nexport const scrollIntoView: RawCommands['scrollIntoView'] =\n () =>\n ({ tr, dispatch }) => {\n if (dispatch) {\n tr.scrollIntoView()\n }\n\n return true\n }\n","import { AllSelection } from '@tiptap/pm/state'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectAll: {\n /**\n * Select the whole document.\n * @example editor.commands.selectAll()\n */\n selectAll: () => ReturnType\n }\n }\n}\n\nexport const selectAll: RawCommands['selectAll'] =\n () =>\n ({ tr, dispatch }) => {\n if (dispatch) {\n const selection = new AllSelection(tr.doc)\n\n tr.setSelection(selection)\n }\n\n return true\n }\n","import { selectNodeBackward as originalSelectNodeBackward } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectNodeBackward: {\n /**\n * Select a node backward.\n * @example editor.commands.selectNodeBackward()\n */\n selectNodeBackward: () => ReturnType\n }\n }\n}\n\nexport const selectNodeBackward: RawCommands['selectNodeBackward'] =\n () =>\n ({ state, dispatch }) => {\n return originalSelectNodeBackward(state, dispatch)\n }\n","import { selectNodeForward as originalSelectNodeForward } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectNodeForward: {\n /**\n * Select a node forward.\n * @example editor.commands.selectNodeForward()\n */\n selectNodeForward: () => ReturnType\n }\n }\n}\n\nexport const selectNodeForward: RawCommands['selectNodeForward'] =\n () =>\n ({ state, dispatch }) => {\n return originalSelectNodeForward(state, dispatch)\n }\n","import { selectParentNode as originalSelectParentNode } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectParentNode: {\n /**\n * Select the parent node.\n * @example editor.commands.selectParentNode()\n */\n selectParentNode: () => ReturnType\n }\n }\n}\n\nexport const selectParentNode: RawCommands['selectParentNode'] =\n () =>\n ({ state, dispatch }) => {\n return originalSelectParentNode(state, dispatch)\n }\n","// @ts-ignore\n// TODO: add types to @types/prosemirror-commands\nimport { selectTextblockEnd as originalSelectTextblockEnd } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectTextblockEnd: {\n /**\n * Moves the cursor to the end of current text block.\n * @example editor.commands.selectTextblockEnd()\n */\n selectTextblockEnd: () => ReturnType\n }\n }\n}\n\nexport const selectTextblockEnd: RawCommands['selectTextblockEnd'] =\n () =>\n ({ state, dispatch }) => {\n return originalSelectTextblockEnd(state, dispatch)\n }\n","// @ts-ignore\n// TODO: add types to @types/prosemirror-commands\nimport { selectTextblockStart as originalSelectTextblockStart } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectTextblockStart: {\n /**\n * Moves the cursor to the start of current text block.\n * @example editor.commands.selectTextblockStart()\n */\n selectTextblockStart: () => ReturnType\n }\n }\n}\n\nexport const selectTextblockStart: RawCommands['selectTextblockStart'] =\n () =>\n ({ state, dispatch }) => {\n return originalSelectTextblockStart(state, dispatch)\n }\n","import type { Fragment, Node as ProseMirrorNode, ParseOptions, Schema } from '@tiptap/pm/model'\n\nimport type { Content } from '../types.js'\nimport { createNodeFromContent } from './createNodeFromContent.js'\n\n/**\n * Create a new Prosemirror document node from content.\n * @param content The JSON or HTML content to create the document from\n * @param schema The Prosemirror schema to use for the document\n * @param parseOptions Options for the parser\n * @returns The created Prosemirror document node\n */\nexport function createDocument(\n content: Content | ProseMirrorNode | Fragment,\n schema: Schema,\n parseOptions: ParseOptions = {},\n options: { errorOnInvalidContent?: boolean } = {},\n): ProseMirrorNode {\n return createNodeFromContent(content, schema, {\n slice: false,\n parseOptions,\n errorOnInvalidContent: options.errorOnInvalidContent,\n }) as ProseMirrorNode\n}\n","import type { Fragment, Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model'\n\nimport { createDocument } from '../helpers/createDocument.js'\nimport type { Content, RawCommands } from '../types.js'\n\nexport interface SetContentOptions {\n /**\n * Options for parsing the content.\n * @default {}\n */\n parseOptions?: ParseOptions\n\n /**\n * Whether to throw an error if the content is invalid.\n */\n errorOnInvalidContent?: boolean\n\n /**\n * Whether to emit an update event.\n * @default true\n */\n emitUpdate?: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setContent: {\n /**\n * Replace the whole document with new content.\n * @param content The new content.\n * @param emitUpdate Whether to emit an update event.\n * @param parseOptions Options for parsing the content.\n * @example editor.commands.setContent('

Example text

')\n */\n setContent: (\n /**\n * The new content.\n */\n content: Content | Fragment | ProseMirrorNode,\n\n /**\n * Options for `setContent`.\n */\n options?: SetContentOptions,\n ) => ReturnType\n }\n }\n}\n\nexport const setContent: RawCommands['setContent'] =\n (content, { errorOnInvalidContent, emitUpdate = true, parseOptions = {} } = {}) =>\n ({ editor, tr, dispatch, commands }) => {\n const { doc } = tr\n\n // This is to keep backward compatibility with the previous behavior\n // TODO remove this in the next major version\n if (parseOptions.preserveWhitespace !== 'full') {\n const document = createDocument(content, editor.schema, parseOptions, {\n errorOnInvalidContent: errorOnInvalidContent ?? editor.options.enableContentCheck,\n })\n\n if (dispatch) {\n tr.replaceWith(0, doc.content.size, document).setMeta('preventUpdate', !emitUpdate)\n }\n return true\n }\n\n if (dispatch) {\n tr.setMeta('preventUpdate', !emitUpdate)\n }\n\n return commands.insertContentAt({ from: 0, to: doc.content.size }, content, {\n parseOptions,\n errorOnInvalidContent: errorOnInvalidContent ?? editor.options.enableContentCheck,\n })\n }\n","import type { Mark, MarkType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { getMarkType } from './getMarkType.js'\n\nexport function getMarkAttributes(\n state: EditorState,\n typeOrName: string | MarkType,\n): Record {\n const type = getMarkType(typeOrName, state.schema)\n const { from, to, empty } = state.selection\n const marks: Mark[] = []\n\n if (empty) {\n if (state.storedMarks) {\n marks.push(...state.storedMarks)\n }\n\n marks.push(...state.selection.$head.marks())\n } else {\n state.doc.nodesBetween(from, to, node => {\n marks.push(...node.marks)\n })\n }\n\n const mark = marks.find(markItem => markItem.type.name === type.name)\n\n if (!mark) {\n return {}\n }\n\n return { ...mark.attrs }\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport type { Transaction } from '@tiptap/pm/state'\nimport { Transform } from '@tiptap/pm/transform'\n\n/**\n * Returns a new `Transform` based on all steps of the passed transactions.\n * @param oldDoc The Prosemirror node to start from\n * @param transactions The transactions to combine\n * @returns A new `Transform` with all steps of the passed transactions\n */\nexport function combineTransactionSteps(\n oldDoc: ProseMirrorNode,\n transactions: Transaction[],\n): Transform {\n const transform = new Transform(oldDoc)\n\n transactions.forEach(transaction => {\n transaction.steps.forEach(step => {\n transform.step(step)\n })\n })\n\n return transform\n}\n","import type { ContentMatch, NodeType } from '@tiptap/pm/model'\n\n/**\n * Gets the default block type at a given match\n * @param match The content match to get the default block type from\n * @returns The default block type or null\n */\nexport function defaultBlockAt(match: ContentMatch): NodeType | null {\n for (let i = 0; i < match.edgeCount; i += 1) {\n const { type } = match.edge(i)\n\n if (type.isTextblock && !type.hasRequiredAttrs()) {\n return type\n }\n }\n\n return null\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { NodeWithPos, Predicate } from '../types.js'\n\n/**\n * Find children inside a Prosemirror node that match a predicate.\n * @param node The Prosemirror node to search in\n * @param predicate The predicate to match\n * @returns An array of nodes with their positions\n */\nexport function findChildren(node: ProseMirrorNode, predicate: Predicate): NodeWithPos[] {\n const nodesWithPos: NodeWithPos[] = []\n\n node.descendants((child, pos) => {\n if (predicate(child)) {\n nodesWithPos.push({\n node: child,\n pos,\n })\n }\n })\n\n return nodesWithPos\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { NodeWithPos, Predicate, Range } from '../types.js'\n\n/**\n * Same as `findChildren` but searches only within a `range`.\n * @param node The Prosemirror node to search in\n * @param range The range to search in\n * @param predicate The predicate to match\n * @returns An array of nodes with their positions\n */\nexport function findChildrenInRange(\n node: ProseMirrorNode,\n range: Range,\n predicate: Predicate,\n): NodeWithPos[] {\n const nodesWithPos: NodeWithPos[] = []\n\n // if (range.from === range.to) {\n // const nodeAt = node.nodeAt(range.from)\n\n // if (nodeAt) {\n // nodesWithPos.push({\n // node: nodeAt,\n // pos: range.from,\n // })\n // }\n // }\n\n node.nodesBetween(range.from, range.to, (child, pos) => {\n if (predicate(child)) {\n nodesWithPos.push({\n node: child,\n pos,\n })\n }\n })\n\n return nodesWithPos\n}\n","import type { Node as ProseMirrorNode, ResolvedPos } from '@tiptap/pm/model'\n\nimport type { Predicate } from '../types.js'\n\n/**\n * Finds the closest parent node to a resolved position that matches a predicate.\n * @param $pos The resolved position to search from\n * @param predicate The predicate to match\n * @returns The closest parent node to the resolved position that matches the predicate\n * @example ```js\n * findParentNodeClosestToPos($from, node => node.type.name === 'paragraph')\n * ```\n */\nexport function findParentNodeClosestToPos(\n $pos: ResolvedPos,\n predicate: Predicate,\n):\n | {\n pos: number\n start: number\n depth: number\n node: ProseMirrorNode\n }\n | undefined {\n for (let i = $pos.depth; i > 0; i -= 1) {\n const node = $pos.node(i)\n\n if (predicate(node)) {\n return {\n pos: i > 0 ? $pos.before(i) : 0,\n start: $pos.start(i),\n depth: i,\n node,\n }\n }\n }\n}\n","import type { Selection } from '@tiptap/pm/state'\n\nimport type { Predicate } from '../types.js'\nimport { findParentNodeClosestToPos } from './findParentNodeClosestToPos.js'\n\n/**\n * Finds the closest parent node to the current selection that matches a predicate.\n * @param predicate The predicate to match\n * @returns A command that finds the closest parent node to the current selection that matches the predicate\n * @example ```js\n * findParentNode(node => node.type.name === 'paragraph')\n * ```\n */\nexport function findParentNode(\n predicate: Predicate,\n): (selection: Selection) => ReturnType {\n return (selection: Selection) => findParentNodeClosestToPos(selection.$from, predicate)\n}\n","import type { ExtensionConfig } from '../Extension.js'\nimport type { MarkConfig } from '../Mark.js'\nimport type { NodeConfig } from '../Node.js'\nimport type { AnyExtension, MaybeThisParameterType, RemoveThis } from '../types.js'\n\n/**\n * Returns a field from an extension\n * @param extension The Tiptap extension\n * @param field The field, for example `renderHTML` or `priority`\n * @param context The context object that should be passed as `this` into the function\n * @returns The field value\n */\nexport function getExtensionField(\n extension: E,\n field: keyof ExtensionConfig | keyof MarkConfig | keyof NodeConfig,\n context?: Omit, 'parent'>,\n): RemoveThis {\n if (extension.config[field as keyof typeof extension.config] === undefined && extension.parent) {\n return getExtensionField(extension.parent, field, context)\n }\n\n if (typeof extension.config[field as keyof typeof extension.config] === 'function') {\n const value = (extension.config[field as keyof typeof extension.config] as any).bind({\n ...context,\n parent: extension.parent ? getExtensionField(extension.parent, field, context) : null,\n })\n\n return value\n }\n\n return extension.config[field as keyof typeof extension.config] as RemoveThis\n}\n","import type { AnyConfig, Extensions } from '../types.js'\nimport { getExtensionField } from './getExtensionField.js'\n\n/**\n * Create a flattened array of extensions by traversing the `addExtensions` field.\n * @param extensions An array of Tiptap extensions\n * @returns A flattened array of Tiptap extensions\n */\nexport function flattenExtensions(extensions: Extensions): Extensions {\n return (\n extensions\n .map(extension => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n\n const addExtensions = getExtensionField(\n extension,\n 'addExtensions',\n context,\n )\n\n if (addExtensions) {\n return [extension, ...flattenExtensions(addExtensions())]\n }\n\n return extension\n })\n // `Infinity` will break TypeScript so we set a number that is probably high enough\n .flat(10)\n )\n}\n","import { Node } from '@tiptap/pm/model'\n\nimport type { Extensions, JSONContent } from '../types.js'\nimport { getHTMLFromFragment } from './getHTMLFromFragment.js'\nimport { getSchema } from './getSchema.js'\n\n/**\n * Generate HTML from a JSONContent\n * @param doc The JSONContent to generate HTML from\n * @param extensions The extensions to use for the schema\n * @returns The generated HTML\n */\nexport function generateHTML(doc: JSONContent, extensions: Extensions): string {\n const schema = getSchema(extensions)\n const contentNode = Node.fromJSON(schema, doc)\n\n return getHTMLFromFragment(contentNode.content, schema)\n}\n","import type { Fragment, Schema } from '@tiptap/pm/model'\nimport { DOMSerializer } from '@tiptap/pm/model'\n\nexport function getHTMLFromFragment(fragment: Fragment, schema: Schema): string {\n const documentFragment = DOMSerializer.fromSchema(schema).serializeFragment(fragment)\n\n const temporaryDocument = document.implementation.createHTMLDocument()\n const container = temporaryDocument.createElement('div')\n\n container.appendChild(documentFragment)\n\n return container.innerHTML\n}\n","import type { MarkSpec, NodeSpec, TagParseRule } from '@tiptap/pm/model'\nimport { Schema } from '@tiptap/pm/model'\n\nimport type { Editor, MarkConfig, NodeConfig } from '../index.js'\nimport type { AnyConfig, Extensions } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\nimport { isEmptyObject } from '../utilities/isEmptyObject.js'\nimport { getAttributesFromExtensions } from './getAttributesFromExtensions.js'\nimport { getExtensionField } from './getExtensionField.js'\nimport { getRenderedAttributes } from './getRenderedAttributes.js'\nimport { injectExtensionAttributesToParseRule } from './injectExtensionAttributesToParseRule.js'\nimport { splitExtensions } from './splitExtensions.js'\n\nfunction cleanUpSchemaItem(data: T) {\n return Object.fromEntries(\n // @ts-ignore\n Object.entries(data).filter(([key, value]) => {\n if (key === 'attrs' && isEmptyObject(value as object | undefined)) {\n return false\n }\n\n return value !== null && value !== undefined\n }),\n ) as T\n}\n\n/**\n * Builds an attribute spec tuple for ProseMirror schema from an extension attribute.\n * @param extensionAttribute The extension attribute to build the spec for\n * @returns A tuple of [attributeName, spec]\n */\nfunction buildAttributeSpec(\n extensionAttribute: ReturnType[number],\n): [string, Record] {\n const spec: Record = {}\n\n // Only include 'default' if the attribute is not required and default is set on the attribute\n if (\n !extensionAttribute?.attribute?.isRequired &&\n 'default' in (extensionAttribute?.attribute || {})\n ) {\n spec.default = extensionAttribute.attribute.default\n }\n\n // Only include 'validate' if it's defined\n if (extensionAttribute?.attribute?.validate !== undefined) {\n spec.validate = extensionAttribute.attribute.validate\n }\n\n return [extensionAttribute.name, spec]\n}\n\n/**\n * Creates a new Prosemirror schema based on the given extensions.\n * @param extensions An array of Tiptap extensions\n * @param editor The editor instance\n * @returns A Prosemirror schema\n */\nexport function getSchemaByResolvedExtensions(extensions: Extensions, editor?: Editor): Schema {\n const allAttributes = getAttributesFromExtensions(extensions)\n const { nodeExtensions, markExtensions } = splitExtensions(extensions)\n const topNode = nodeExtensions.find(extension => getExtensionField(extension, 'topNode'))?.name\n\n const nodes = Object.fromEntries(\n nodeExtensions.map(extension => {\n const extensionAttributes = allAttributes.filter(\n attribute => attribute.type === extension.name,\n )\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n editor,\n }\n\n const extraNodeFields = extensions.reduce((fields, e) => {\n const extendNodeSchema = getExtensionField(\n e,\n 'extendNodeSchema',\n context,\n )\n\n return {\n ...fields,\n ...(extendNodeSchema ? extendNodeSchema(extension) : {}),\n }\n }, {})\n\n const schema: NodeSpec = cleanUpSchemaItem({\n ...extraNodeFields,\n content: callOrReturn(\n getExtensionField(extension, 'content', context),\n ),\n marks: callOrReturn(getExtensionField(extension, 'marks', context)),\n group: callOrReturn(getExtensionField(extension, 'group', context)),\n inline: callOrReturn(getExtensionField(extension, 'inline', context)),\n atom: callOrReturn(getExtensionField(extension, 'atom', context)),\n selectable: callOrReturn(\n getExtensionField(extension, 'selectable', context),\n ),\n draggable: callOrReturn(\n getExtensionField(extension, 'draggable', context),\n ),\n code: callOrReturn(getExtensionField(extension, 'code', context)),\n whitespace: callOrReturn(\n getExtensionField(extension, 'whitespace', context),\n ),\n linebreakReplacement: callOrReturn(\n getExtensionField(\n extension,\n 'linebreakReplacement',\n context,\n ),\n ),\n defining: callOrReturn(\n getExtensionField(extension, 'defining', context),\n ),\n isolating: callOrReturn(\n getExtensionField(extension, 'isolating', context),\n ),\n attrs: Object.fromEntries(extensionAttributes.map(buildAttributeSpec)),\n })\n\n const parseHTML = callOrReturn(\n getExtensionField(extension, 'parseHTML', context),\n )\n\n if (parseHTML) {\n schema.parseDOM = parseHTML.map(parseRule =>\n injectExtensionAttributesToParseRule(parseRule, extensionAttributes),\n ) as TagParseRule[]\n }\n\n const renderHTML = getExtensionField(\n extension,\n 'renderHTML',\n context,\n )\n\n if (renderHTML) {\n schema.toDOM = node =>\n renderHTML({\n node,\n HTMLAttributes: getRenderedAttributes(node, extensionAttributes),\n })\n }\n\n const renderText = getExtensionField(\n extension,\n 'renderText',\n context,\n )\n\n if (renderText) {\n schema.toText = renderText\n }\n\n return [extension.name, schema]\n }),\n )\n\n const marks = Object.fromEntries(\n markExtensions.map(extension => {\n const extensionAttributes = allAttributes.filter(\n attribute => attribute.type === extension.name,\n )\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n editor,\n }\n\n const extraMarkFields = extensions.reduce((fields, e) => {\n const extendMarkSchema = getExtensionField(\n e,\n 'extendMarkSchema',\n context,\n )\n\n return {\n ...fields,\n ...(extendMarkSchema ? extendMarkSchema(extension as any) : {}),\n }\n }, {})\n\n const schema: MarkSpec = cleanUpSchemaItem({\n ...extraMarkFields,\n inclusive: callOrReturn(\n getExtensionField(extension, 'inclusive', context),\n ),\n excludes: callOrReturn(\n getExtensionField(extension, 'excludes', context),\n ),\n group: callOrReturn(getExtensionField(extension, 'group', context)),\n spanning: callOrReturn(\n getExtensionField(extension, 'spanning', context),\n ),\n code: callOrReturn(getExtensionField(extension, 'code', context)),\n attrs: Object.fromEntries(extensionAttributes.map(buildAttributeSpec)),\n })\n\n const parseHTML = callOrReturn(\n getExtensionField(extension, 'parseHTML', context),\n )\n\n if (parseHTML) {\n schema.parseDOM = parseHTML.map(parseRule =>\n injectExtensionAttributesToParseRule(parseRule, extensionAttributes),\n )\n }\n\n const renderHTML = getExtensionField(\n extension,\n 'renderHTML',\n context,\n )\n\n if (renderHTML) {\n schema.toDOM = mark =>\n renderHTML({\n mark,\n HTMLAttributes: getRenderedAttributes(mark, extensionAttributes),\n })\n }\n\n return [extension.name, schema]\n }),\n )\n\n return new Schema({\n topNode,\n nodes,\n marks,\n })\n}\n","// oxlint-disable-next-lineno-unsafe-function-type\nexport function isFunction(value: any): value is Function {\n return typeof value === 'function'\n}\n","import type { MaybeReturnType } from '../types.js'\nimport { isFunction } from './isFunction.js'\n\n/**\n * Optionally calls `value` as a function.\n * Otherwise it is returned directly.\n * @param value Function or any value.\n * @param context Optional context to bind to function.\n * @param props Optional props to pass to function.\n */\nexport function callOrReturn(\n value: T,\n context: any = undefined,\n ...props: any[]\n): MaybeReturnType {\n if (isFunction(value)) {\n if (context) {\n return value.bind(context)(...props)\n }\n\n return value(...props)\n }\n\n return value as MaybeReturnType\n}\n","export function isEmptyObject(value = {}): boolean {\n return Object.keys(value).length === 0 && value.constructor === Object\n}\n","import type { Extension } from '../Extension.js'\nimport type { Mark } from '../Mark.js'\nimport type { Node } from '../Node.js'\nimport type { Extensions } from '../types.js'\n\nexport function splitExtensions(extensions: Extensions) {\n const baseExtensions = extensions.filter(\n extension => extension.type === 'extension',\n ) as Extension[]\n const nodeExtensions = extensions.filter(extension => extension.type === 'node') as Node[]\n const markExtensions = extensions.filter(extension => extension.type === 'mark') as Mark[]\n\n return {\n baseExtensions,\n nodeExtensions,\n markExtensions,\n }\n}\n","import type { MarkConfig, NodeConfig } from '../index.js'\nimport type { AnyConfig, Attribute, Attributes, ExtensionAttribute, Extensions } from '../types.js'\nimport { getExtensionField } from './getExtensionField.js'\nimport { splitExtensions } from './splitExtensions.js'\n\n/**\n * Get a list of all extension attributes defined in `addAttribute` and `addGlobalAttribute`.\n * @param extensions List of extensions\n */\nexport function getAttributesFromExtensions(extensions: Extensions): ExtensionAttribute[] {\n const extensionAttributes: ExtensionAttribute[] = []\n const { nodeExtensions, markExtensions } = splitExtensions(extensions)\n const nodeAndMarkExtensions = [...nodeExtensions, ...markExtensions]\n const defaultAttribute: Required> & Pick = {\n default: null,\n validate: undefined,\n rendered: true,\n renderHTML: null,\n parseHTML: null,\n keepOnSplit: true,\n isRequired: false,\n }\n\n // Precompute lists of extension types for global attribute resolution\n const nodeExtensionTypes = nodeExtensions.filter(ext => ext.name !== 'text').map(ext => ext.name)\n const markExtensionTypes = markExtensions.map(ext => ext.name)\n const allExtensionTypes = [...nodeExtensionTypes, ...markExtensionTypes]\n\n extensions.forEach(extension => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n extensions: nodeAndMarkExtensions,\n }\n\n const addGlobalAttributes = getExtensionField(\n extension,\n 'addGlobalAttributes',\n context,\n )\n\n if (!addGlobalAttributes) {\n return\n }\n\n const globalAttributes = addGlobalAttributes()\n\n globalAttributes.forEach(globalAttribute => {\n // Resolve the types based on the string shorthand or explicit array\n let resolvedTypes: string[]\n if (Array.isArray(globalAttribute.types)) {\n resolvedTypes = globalAttribute.types\n } else if (globalAttribute.types === '*') {\n resolvedTypes = allExtensionTypes\n } else if (globalAttribute.types === 'nodes') {\n resolvedTypes = nodeExtensionTypes\n } else if (globalAttribute.types === 'marks') {\n resolvedTypes = markExtensionTypes\n } else {\n resolvedTypes = []\n }\n\n resolvedTypes.forEach(type => {\n Object.entries(globalAttribute.attributes).forEach(([name, attribute]) => {\n extensionAttributes.push({\n type,\n name,\n attribute: {\n ...defaultAttribute,\n ...attribute,\n },\n })\n })\n })\n })\n })\n\n nodeAndMarkExtensions.forEach(extension => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n\n const addAttributes = getExtensionField<\n NodeConfig['addAttributes'] | MarkConfig['addAttributes']\n >(extension, 'addAttributes', context)\n\n if (!addAttributes) {\n return\n }\n\n // TODO: remove `as Attributes`\n const attributes = addAttributes() as Attributes\n\n Object.entries(attributes).forEach(([name, attribute]) => {\n const mergedAttr = {\n ...defaultAttribute,\n ...attribute,\n }\n\n if (typeof mergedAttr?.default === 'function') {\n mergedAttr.default = mergedAttr.default()\n }\n\n if (mergedAttr?.isRequired && mergedAttr?.default === undefined) {\n delete mergedAttr.default\n }\n\n extensionAttributes.push({\n type: extension.name,\n name,\n attribute: mergedAttr,\n })\n })\n })\n\n return extensionAttributes\n}\n","/** Splits a CSS style string into declarations, ignoring semicolons inside quotes/parentheses. */\nfunction splitStyleDeclarations(styles: string): string[] {\n const result: string[] = []\n\n let current = ''\n let inSingleQuote = false\n let inDoubleQuote = false\n let parenDepth = 0\n\n const length = styles.length\n for (let i = 0; i < length; i += 1) {\n const char = styles[i]\n if (char === \"'\" && !inDoubleQuote) {\n inSingleQuote = !inSingleQuote\n current += char\n continue\n }\n if (char === '\"' && !inSingleQuote) {\n inDoubleQuote = !inDoubleQuote\n current += char\n continue\n }\n if (!inSingleQuote && !inDoubleQuote) {\n if (char === '(') {\n parenDepth += 1\n current += char\n continue\n }\n if (char === ')' && parenDepth > 0) {\n parenDepth -= 1\n current += char\n continue\n }\n if (char === ';' && parenDepth === 0) {\n result.push(current)\n current = ''\n continue\n }\n }\n current += char\n }\n if (current) {\n result.push(current)\n }\n\n return result\n}\n\n/** Yields property/value pairs from a style string. */\nfunction parseStyleEntries(styles: string | undefined): [property: string, value: string][] {\n const pairs: [string, string][] = []\n\n const declarations = splitStyleDeclarations(styles || '')\n const numDeclarations = declarations.length\n\n for (let i = 0; i < numDeclarations; i += 1) {\n const declaration = declarations[i]\n\n const firstColonIndex = declaration.indexOf(':')\n if (firstColonIndex === -1) {\n continue\n }\n\n const property = declaration.slice(0, firstColonIndex).trim()\n const value = declaration.slice(firstColonIndex + 1).trim()\n if (property && value) {\n pairs.push([property, value])\n }\n }\n\n return pairs\n}\n\nexport function mergeAttributes(...objects: Record[]): Record {\n return objects\n .filter(item => !!item)\n .reduce((items, item) => {\n const mergedAttributes = { ...items }\n\n Object.entries(item).forEach(([key, value]) => {\n const exists = mergedAttributes[key]\n\n if (!exists) {\n mergedAttributes[key] = value\n\n return\n }\n\n if (key === 'class') {\n const valueClasses: string[] = value ? String(value).split(' ') : []\n const existingClasses: string[] = mergedAttributes[key]\n ? mergedAttributes[key].split(' ')\n : []\n\n const insertClasses = valueClasses.filter(\n valueClass => !existingClasses.includes(valueClass),\n )\n\n mergedAttributes[key] = [...existingClasses, ...insertClasses].join(' ')\n } else if (key === 'style') {\n const styleMap = new Map([\n ...parseStyleEntries(mergedAttributes[key]),\n ...parseStyleEntries(value),\n ])\n\n mergedAttributes[key] = Array.from(styleMap.entries())\n .map(([property, val]) => `${property}: ${val}`)\n .join('; ')\n } else {\n mergedAttributes[key] = value\n }\n })\n\n return mergedAttributes\n }, {})\n}\n","import type { Mark, Node } from '@tiptap/pm/model'\n\nimport type { ExtensionAttribute } from '../types.js'\nimport { mergeAttributes } from '../utilities/mergeAttributes.js'\n\nexport function getRenderedAttributes(\n nodeOrMark: Node | Mark,\n extensionAttributes: ExtensionAttribute[],\n): Record {\n return extensionAttributes\n .filter(attribute => attribute.type === nodeOrMark.type.name)\n .filter(item => item.attribute.rendered)\n .map(item => {\n if (!item.attribute.renderHTML) {\n return {\n [item.name]: nodeOrMark.attrs[item.name],\n }\n }\n\n return item.attribute.renderHTML(nodeOrMark.attrs) || {}\n })\n .reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {})\n}\n","export function fromString(value: any): any {\n if (typeof value !== 'string') {\n return value\n }\n\n if (value.match(/^[+-]?(?:\\d*\\.)?\\d+$/)) {\n return Number(value)\n }\n\n if (value === 'true') {\n return true\n }\n\n if (value === 'false') {\n return false\n }\n\n return value\n}\n","import type { ParseRule } from '@tiptap/pm/model'\n\nimport type { ExtensionAttribute } from '../types.js'\nimport { fromString } from '../utilities/fromString.js'\n\n/**\n * This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`).\n * Cancels when `getAttrs` returned `false`.\n * @param parseRule ProseMirror ParseRule\n * @param extensionAttributes List of attributes to inject\n */\nexport function injectExtensionAttributesToParseRule(\n parseRule: ParseRule,\n extensionAttributes: ExtensionAttribute[],\n): ParseRule {\n if ('style' in parseRule) {\n return parseRule\n }\n\n return {\n ...parseRule,\n getAttrs: (node: HTMLElement) => {\n const oldAttributes = parseRule.getAttrs ? parseRule.getAttrs(node) : parseRule.attrs\n\n if (oldAttributes === false) {\n return false\n }\n\n const newAttributes = extensionAttributes.reduce((items, item) => {\n const value = item.attribute.parseHTML\n ? item.attribute.parseHTML(node)\n : fromString(node.getAttribute(item.name))\n\n if (value === null || value === undefined) {\n return items\n }\n\n return {\n ...items,\n [item.name]: value,\n }\n }, {})\n\n return { ...oldAttributes, ...newAttributes }\n },\n }\n}\n","/**\n * Find duplicates in an array.\n */\nexport function findDuplicates(items: T[]): T[] {\n const filtered = items.filter((el, index) => items.indexOf(el) !== index)\n\n return Array.from(new Set(filtered))\n}\n","import type { AnyConfig, Extensions } from '../types.js'\nimport { getExtensionField } from './getExtensionField.js'\n\n/**\n * Sort extensions by priority.\n * @param extensions An array of Tiptap extensions\n * @returns A sorted array of Tiptap extensions by priority\n */\nexport function sortExtensions(extensions: Extensions): Extensions {\n const defaultPriority = 100\n\n return extensions.sort((a, b) => {\n const priorityA = getExtensionField(a, 'priority') || defaultPriority\n const priorityB = getExtensionField(b, 'priority') || defaultPriority\n\n if (priorityA > priorityB) {\n return -1\n }\n\n if (priorityA < priorityB) {\n return 1\n }\n\n return 0\n })\n}\n","import type { Extensions } from '../types.js'\nimport { findDuplicates } from '../utilities/findDuplicates.js'\nimport { flattenExtensions } from './flattenExtensions.js'\nimport { sortExtensions } from './sortExtensions.js'\n\n/**\n * Returns a flattened and sorted extension list while\n * also checking for duplicated extensions and warns the user.\n * @param extensions An array of Tiptap extensions\n * @returns An flattened and sorted array of Tiptap extensions\n */\nexport function resolveExtensions(extensions: Extensions): Extensions {\n const resolvedExtensions = sortExtensions(flattenExtensions(extensions))\n const duplicatedNames = findDuplicates(resolvedExtensions.map(extension => extension.name))\n\n if (duplicatedNames.length) {\n console.warn(\n `[tiptap warn]: Duplicate extension names found: [${duplicatedNames\n .map(item => `'${item}'`)\n .join(', ')}]. This can lead to issues.`,\n )\n }\n\n return resolvedExtensions\n}\n","import type { Schema } from '@tiptap/pm/model'\n\nimport type { Editor } from '../Editor.js'\nimport type { Extensions } from '../types.js'\nimport { getSchemaByResolvedExtensions } from './getSchemaByResolvedExtensions.js'\nimport { resolveExtensions } from './resolveExtensions.js'\n\nexport function getSchema(extensions: Extensions, editor?: Editor): Schema {\n const resolvedExtensions = resolveExtensions(extensions)\n\n return getSchemaByResolvedExtensions(resolvedExtensions, editor)\n}\n","import { DOMParser } from '@tiptap/pm/model'\n\nimport type { Extensions } from '../types.js'\nimport { elementFromString } from '../utilities/elementFromString.js'\nimport { getSchema } from './getSchema.js'\n\n/**\n * Generate JSONContent from HTML\n * @param html The HTML to generate JSONContent from\n * @param extensions The extensions to use for the schema\n * @returns The generated JSONContent\n */\nexport function generateJSON(html: string, extensions: Extensions): Record {\n const schema = getSchema(extensions)\n const dom = elementFromString(html)\n\n return DOMParser.fromSchema(schema).parse(dom).toJSON()\n}\n","import { Node } from '@tiptap/pm/model'\n\nimport type { Extensions, JSONContent, TextSerializer } from '../types.js'\nimport { getSchema } from './getSchema.js'\nimport { getText } from './getText.js'\nimport { getTextSerializersFromSchema } from './getTextSerializersFromSchema.js'\n\n/**\n * Generate raw text from a JSONContent\n * @param doc The JSONContent to generate text from\n * @param extensions The extensions to use for the schema\n * @param options Options for the text generation f.e. blockSeparator or textSerializers\n * @returns The generated text\n */\nexport function generateText(\n doc: JSONContent,\n extensions: Extensions,\n options?: {\n blockSeparator?: string\n textSerializers?: Record\n },\n): string {\n const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {}\n const schema = getSchema(extensions)\n const contentNode = Node.fromJSON(schema, doc)\n\n return getText(contentNode, {\n blockSeparator,\n textSerializers: {\n ...getTextSerializersFromSchema(schema),\n ...textSerializers,\n },\n })\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { Range, TextSerializer } from '../types.js'\n\n/**\n * Gets the text between two positions in a Prosemirror node\n * and serializes it using the given text serializers and block separator (see getText)\n * @param startNode The Prosemirror node to start from\n * @param range The range of the text to get\n * @param options Options for the text serializer & block separator\n * @returns The text between the two positions\n */\nexport function getTextBetween(\n startNode: ProseMirrorNode,\n range: Range,\n options?: {\n blockSeparator?: string\n textSerializers?: Record\n },\n): string {\n const { from, to } = range\n const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {}\n let text = ''\n\n startNode.nodesBetween(from, to, (node, pos, parent, index) => {\n if (node.isBlock && pos > from) {\n text += blockSeparator\n }\n\n const textSerializer = textSerializers?.[node.type.name]\n\n if (textSerializer) {\n if (parent) {\n text += textSerializer({\n node,\n pos,\n parent,\n index,\n range,\n })\n }\n // do not descend into child nodes when there exists a serializer\n return false\n }\n\n if (node.isText) {\n text += node?.text?.slice(Math.max(from, pos) - pos, to - pos) // oxlint-disable-line\n }\n })\n\n return text\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { TextSerializer } from '../types.js'\nimport { getTextBetween } from './getTextBetween.js'\n\n/**\n * Gets the text of a Prosemirror node\n * @param node The Prosemirror node\n * @param options Options for the text serializer & block separator\n * @returns The text of the node\n * @example ```js\n * const text = getText(node, { blockSeparator: '\\n' })\n * ```\n */\nexport function getText(\n node: ProseMirrorNode,\n options?: {\n blockSeparator?: string\n textSerializers?: Record\n },\n) {\n const range = {\n from: 0,\n to: node.content.size,\n }\n\n return getTextBetween(node, range, options)\n}\n","import type { Schema } from '@tiptap/pm/model'\n\nimport type { TextSerializer } from '../types.js'\n\n/**\n * Find text serializers `toText` in a Prosemirror schema\n * @param schema The Prosemirror schema to search in\n * @returns A record of text serializers by node name\n */\nexport function getTextSerializersFromSchema(schema: Schema): Record {\n return Object.fromEntries(\n Object.entries(schema.nodes)\n .filter(([, node]) => node.spec.toText)\n .map(([name, node]) => [name, node.spec.toText]),\n )\n}\n","import type { Node, NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { getNodeType } from './getNodeType.js'\n\nexport function getNodeAttributes(\n state: EditorState,\n typeOrName: string | NodeType,\n): Record {\n const type = getNodeType(typeOrName, state.schema)\n const { from, to } = state.selection\n const nodes: Node[] = []\n\n state.doc.nodesBetween(from, to, node => {\n nodes.push(node)\n })\n\n const node = nodes.reverse().find(nodeItem => nodeItem.type.name === type.name)\n\n if (!node) {\n return {}\n }\n\n return { ...node.attrs }\n}\n","import type { MarkType, NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { getMarkAttributes } from './getMarkAttributes.js'\nimport { getNodeAttributes } from './getNodeAttributes.js'\nimport { getSchemaTypeNameByName } from './getSchemaTypeNameByName.js'\n\n/**\n * Get node or mark attributes by type or name on the current editor state\n * @param state The current editor state\n * @param typeOrName The node or mark type or name\n * @returns The attributes of the node or mark or an empty object\n */\nexport function getAttributes(\n state: EditorState,\n typeOrName: string | NodeType | MarkType,\n): Record {\n const schemaType = getSchemaTypeNameByName(\n typeof typeOrName === 'string' ? typeOrName : typeOrName.name,\n state.schema,\n )\n\n if (schemaType === 'node') {\n return getNodeAttributes(state, typeOrName as NodeType)\n }\n\n if (schemaType === 'mark') {\n return getMarkAttributes(state, typeOrName as MarkType)\n }\n\n return {}\n}\n","/**\n * Removes duplicated values within an array.\n * Supports numbers, strings and objects.\n */\nexport function removeDuplicates(array: T[], by = JSON.stringify): T[] {\n const seen: Record = {}\n\n return array.filter(item => {\n const key = by(item)\n\n return Object.prototype.hasOwnProperty.call(seen, key) ? false : (seen[key] = true)\n })\n}\n","import type { Step, Transform } from '@tiptap/pm/transform'\n\nimport type { Range } from '../types.js'\nimport { removeDuplicates } from '../utilities/removeDuplicates.js'\n\nexport type ChangedRange = {\n oldRange: Range\n newRange: Range\n}\n\n/**\n * Removes duplicated ranges and ranges that are\n * fully captured by other ranges.\n */\nfunction simplifyChangedRanges(changes: ChangedRange[]): ChangedRange[] {\n const uniqueChanges = removeDuplicates(changes)\n\n return uniqueChanges.length === 1\n ? uniqueChanges\n : uniqueChanges.filter((change, index) => {\n const rest = uniqueChanges.filter((_, i) => i !== index)\n\n return !rest.some(otherChange => {\n return (\n change.oldRange.from >= otherChange.oldRange.from &&\n change.oldRange.to <= otherChange.oldRange.to &&\n change.newRange.from >= otherChange.newRange.from &&\n change.newRange.to <= otherChange.newRange.to\n )\n })\n })\n}\n\n/**\n * Returns a list of changed ranges\n * based on the first and last state of all steps.\n */\nexport function getChangedRanges(transform: Transform): ChangedRange[] {\n const { mapping, steps } = transform\n const changes: ChangedRange[] = []\n\n mapping.maps.forEach((stepMap, index) => {\n const ranges: Range[] = []\n\n // This accounts for step changes where no range was actually altered\n // e.g. when setting a mark, node attribute, etc.\n // @ts-ignore\n if (!stepMap.ranges.length) {\n const { from, to } = steps[index] as Step & {\n from?: number\n to?: number\n }\n\n if (from === undefined || to === undefined) {\n return\n }\n\n ranges.push({ from, to })\n } else {\n stepMap.forEach((from, to) => {\n ranges.push({ from, to })\n })\n }\n\n ranges.forEach(({ from, to }) => {\n const newStart = mapping.slice(index).map(from, -1)\n const newEnd = mapping.slice(index).map(to)\n const oldStart = mapping.invert().map(newStart, -1)\n const oldEnd = mapping.invert().map(newEnd)\n\n changes.push({\n oldRange: {\n from: oldStart,\n to: oldEnd,\n },\n newRange: {\n from: newStart,\n to: newEnd,\n },\n })\n })\n })\n\n return simplifyChangedRanges(changes)\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { JSONContent } from '../types.js'\n\ninterface DebugJSONContent extends JSONContent {\n from: number\n to: number\n}\n\nexport function getDebugJSON(node: ProseMirrorNode, startOffset = 0): DebugJSONContent {\n const isTopNode = node.type === node.type.schema.topNodeType\n const increment = isTopNode ? 0 : 1\n const from = startOffset\n const to = from + node.nodeSize\n const marks = node.marks.map(mark => {\n const output: { type: string; attrs?: Record } = {\n type: mark.type.name,\n }\n\n if (Object.keys(mark.attrs).length) {\n output.attrs = { ...mark.attrs }\n }\n\n return output\n })\n const attrs = { ...node.attrs }\n const output: DebugJSONContent = {\n type: node.type.name,\n from,\n to,\n }\n\n if (Object.keys(attrs).length) {\n output.attrs = attrs\n }\n\n if (marks.length) {\n output.marks = marks\n }\n\n if (node.content.childCount) {\n output.content = []\n\n node.forEach((child, offset) => {\n output.content?.push(getDebugJSON(child, startOffset + offset + increment))\n })\n }\n\n if (node.text) {\n output.text = node.text\n }\n\n return output\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { MarkRange } from '../types.js'\nimport { getMarkRange } from './getMarkRange.js'\n\nexport function getMarksBetween(from: number, to: number, doc: ProseMirrorNode): MarkRange[] {\n const marks: MarkRange[] = []\n\n // get all inclusive marks on empty selection\n if (from === to) {\n doc\n .resolve(from)\n .marks()\n .forEach(mark => {\n const $pos = doc.resolve(from)\n const range = getMarkRange($pos, mark.type)\n\n if (!range) {\n return\n }\n\n marks.push({\n mark,\n ...range,\n })\n })\n } else {\n doc.nodesBetween(from, to, (node, pos) => {\n if (!node || node?.nodeSize === undefined) {\n return\n }\n\n marks.push(\n ...node.marks.map(mark => ({\n from: pos,\n to: pos + node.nodeSize,\n mark,\n })),\n )\n })\n }\n\n return marks\n}\n","import type { Node, NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\n/**\n * Finds the first node of a given type or name in the current selection.\n * @param state The editor state.\n * @param typeOrName The node type or name.\n * @param pos The position to start searching from.\n * @param maxDepth The maximum depth to search.\n * @returns The node and the depth as an array.\n */\nexport const getNodeAtPosition = (\n state: EditorState,\n typeOrName: string | NodeType,\n pos: number,\n maxDepth = 20,\n) => {\n const $pos = state.doc.resolve(pos)\n\n let currentDepth = maxDepth\n let node: Node | null = null\n\n while (currentDepth > 0 && node === null) {\n const currentNode = $pos.node(currentDepth)\n\n if (currentNode?.type.name === typeOrName) {\n node = currentNode\n } else {\n currentDepth -= 1\n }\n }\n\n return [node, currentDepth] as [Node | null, number]\n}\n","import type { MarkType, NodeType, Schema } from '@tiptap/pm/model'\n\n/**\n * Tries to get a node or mark type by its name.\n * @param name The name of the node or mark type\n * @param schema The Prosemiror schema to search in\n * @returns The node or mark type, or null if it doesn't exist\n */\nexport function getSchemaTypeByName(name: string, schema: Schema): NodeType | MarkType | null {\n return schema.nodes[name] || schema.marks[name] || null\n}\n","import type { ExtensionAttribute } from '../types.js'\n\n/**\n * Return attributes of an extension that should be splitted by keepOnSplit flag\n * @param extensionAttributes Array of extension attributes\n * @param typeName The type of the extension\n * @param attributes The attributes of the extension\n * @returns The splitted attributes\n */\nexport function getSplittedAttributes(\n extensionAttributes: ExtensionAttribute[],\n typeName: string,\n attributes: Record,\n): Record {\n return Object.fromEntries(\n Object.entries(attributes).filter(([name]) => {\n const extensionAttribute = extensionAttributes.find(item => {\n return item.type === typeName && item.name === name\n })\n\n if (!extensionAttribute) {\n return false\n }\n\n return extensionAttribute.attribute.keepOnSplit\n }),\n )\n}\n","import type { ResolvedPos } from '@tiptap/pm/model'\n\n/**\n * Returns the text content of a resolved prosemirror position\n * @param $from The resolved position to get the text content from\n * @param maxMatch The maximum number of characters to match\n * @returns The text content\n */\nexport const getTextContentFromNodes = ($from: ResolvedPos, maxMatch = 500) => {\n let textBefore = ''\n\n const sliceEndPos = $from.parentOffset\n\n $from.parent.nodesBetween(\n Math.max(0, sliceEndPos - maxMatch),\n sliceEndPos,\n (node, pos, parent, index) => {\n const chunk =\n node.type.spec.toText?.({\n node,\n pos,\n parent,\n index,\n }) ||\n node.textContent ||\n '%leaf%'\n\n textBefore +=\n node.isAtom && !node.isText ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos))\n },\n )\n\n return textBefore\n}\n","import type { MarkType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport type { MarkRange } from '../types.js'\nimport { objectIncludes } from '../utilities/objectIncludes.js'\nimport { getMarkType } from './getMarkType.js'\n\nexport function isMarkActive(\n state: EditorState,\n typeOrName: MarkType | string | null,\n attributes: Record = {},\n): boolean {\n const { empty, ranges } = state.selection\n const type = typeOrName ? getMarkType(typeOrName, state.schema) : null\n\n if (empty) {\n return !!(state.storedMarks || state.selection.$from.marks())\n .filter(mark => {\n if (!type) {\n return true\n }\n\n return type.name === mark.type.name\n })\n .find(mark => objectIncludes(mark.attrs, attributes, { strict: false }))\n }\n\n let selectionRange = 0\n const markRanges: MarkRange[] = []\n\n ranges.forEach(({ $from, $to }) => {\n const from = $from.pos\n const to = $to.pos\n\n state.doc.nodesBetween(from, to, (node, pos) => {\n // ignore selected text inside nodes whose schema disallows this mark type\n if (type && node.inlineContent && !node.type.allowsMarkType(type)) {\n return false\n }\n\n if (!node.isText && !node.marks.length) {\n return\n }\n\n const relativeFrom = Math.max(from, pos)\n const relativeTo = Math.min(to, pos + node.nodeSize)\n const range = relativeTo - relativeFrom\n\n selectionRange += range\n\n markRanges.push(\n ...node.marks.map(mark => ({\n mark,\n from: relativeFrom,\n to: relativeTo,\n })),\n )\n })\n })\n\n if (selectionRange === 0) {\n return false\n }\n\n // calculate range of matched mark\n const matchedRange = markRanges\n .filter(markRange => {\n if (!type) {\n return true\n }\n\n return type.name === markRange.mark.type.name\n })\n .filter(markRange => objectIncludes(markRange.mark.attrs, attributes, { strict: false }))\n .reduce((sum, markRange) => sum + markRange.to - markRange.from, 0)\n\n // calculate range of marks that excludes the searched mark\n // for example `code` doesn’t allow any other marks\n const excludedRange = markRanges\n .filter(markRange => {\n if (!type) {\n return true\n }\n\n return markRange.mark.type !== type && markRange.mark.type.excludes(type)\n })\n .reduce((sum, markRange) => sum + markRange.to - markRange.from, 0)\n\n // we only include the result of `excludedRange`\n // if there is a match at all\n const range = matchedRange > 0 ? matchedRange + excludedRange : matchedRange\n\n return range >= selectionRange\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { getSchemaTypeNameByName } from './getSchemaTypeNameByName.js'\nimport { isMarkActive } from './isMarkActive.js'\nimport { isNodeActive } from './isNodeActive.js'\n\nexport function isActive(\n state: EditorState,\n name: string | null,\n attributes: Record = {},\n): boolean {\n if (!name) {\n return isNodeActive(state, null, attributes) || isMarkActive(state, null, attributes)\n }\n\n const schemaType = getSchemaTypeNameByName(name, state.schema)\n\n if (schemaType === 'node') {\n return isNodeActive(state, name, attributes)\n }\n\n if (schemaType === 'mark') {\n return isMarkActive(state, name, attributes)\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findParentNode } from './findParentNode.js'\n\nexport const isAtEndOfNode = (state: EditorState, nodeType?: string) => {\n const { $from, $to, $anchor } = state.selection\n\n if (nodeType) {\n const parentNode = findParentNode(node => node.type.name === nodeType)(state.selection)\n\n if (!parentNode) {\n return false\n }\n\n const $parentPos = state.doc.resolve(parentNode.pos + 1)\n\n if ($anchor.pos + 1 === $parentPos.end()) {\n return true\n }\n\n return false\n }\n\n if ($to.parentOffset < $to.parent.nodeSize - 2 || $from.pos !== $to.pos) {\n return false\n }\n\n return true\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const isAtStartOfNode = (state: EditorState) => {\n const { $from, $to } = state.selection\n\n if ($from.parentOffset > 0 || $from.pos !== $to.pos) {\n return false\n }\n\n return true\n}\n","import type { AnyExtension, EnableRules } from '../types.js'\n\nexport function isExtensionRulesEnabled(extension: AnyExtension, enabled: EnableRules): boolean {\n if (Array.isArray(enabled)) {\n return enabled.some(enabledExtension => {\n const name = typeof enabledExtension === 'string' ? enabledExtension : enabledExtension.name\n\n return name === extension.name\n })\n }\n\n return enabled\n}\n","import { getExtensionField } from '../helpers/getExtensionField.js'\nimport type { NodeConfig } from '../index.js'\nimport type { Extensions } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\nimport { splitExtensions } from './splitExtensions.js'\n\nexport function isList(name: string, extensions: Extensions): boolean {\n const { nodeExtensions } = splitExtensions(extensions)\n const extension = nodeExtensions.find(item => item.name === name)\n\n if (!extension) {\n return false\n }\n\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n const group = callOrReturn(getExtensionField(extension, 'group', context))\n\n if (typeof group !== 'string') {\n return false\n }\n\n return group.split(' ').includes('list')\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\n/**\n * Returns true if the given prosemirror node is empty.\n */\nexport function isNodeEmpty(\n node: ProseMirrorNode,\n {\n checkChildren = true,\n ignoreWhitespace = false,\n }: {\n /**\n * When true (default), it will also check if all children are empty.\n */\n checkChildren?: boolean\n /**\n * When true, it will ignore whitespace when checking for emptiness.\n */\n ignoreWhitespace?: boolean\n } = {},\n): boolean {\n if (ignoreWhitespace) {\n if (node.type.name === 'hardBreak') {\n // Hard breaks are considered empty\n return true\n }\n if (node.isText) {\n return !/\\S/.test(node.text ?? '')\n }\n }\n\n if (node.isText) {\n return !node.text\n }\n\n if (node.isAtom || node.isLeaf) {\n return false\n }\n\n if (node.content.childCount === 0) {\n return true\n }\n\n if (checkChildren) {\n let isContentEmpty = true\n\n node.content.forEach(childNode => {\n if (isContentEmpty === false) {\n // Exit early for perf\n return\n }\n\n if (!isNodeEmpty(childNode, { ignoreWhitespace, checkChildren })) {\n isContentEmpty = false\n }\n })\n\n return isContentEmpty\n }\n\n return false\n}\n","import { NodeSelection } from '@tiptap/pm/state'\n\nexport function isNodeSelection(value: unknown): value is NodeSelection {\n return value instanceof NodeSelection\n}\n","import type { Selection } from '@tiptap/pm/state'\n\nimport { isTextSelection } from './isTextSelection.js'\n\n/**\n * Determines whether a node view should be considered selected for the given\n * editor selection.\n *\n * A node is considered selected when the current selection fully covers it\n * (e.g. a `NodeSelection`). When `selectedOnTextSelection` is enabled, the\n * node is additionally considered selected if a `TextSelection` is fully\n * contained within the node's range.\n *\n * @param selection The current editor selection.\n * @param pos The start position of the node in the document.\n * @param nodeSize The size of the node.\n * @param selectedOnTextSelection When `true`, also treat selections inside the node as selected.\n * @returns `true` if the node view should render as selected.\n */\nexport function isNodeViewSelected({\n selection,\n pos,\n nodeSize,\n selectedOnTextSelection = false,\n}: {\n selection: Selection\n pos: number\n nodeSize: number\n selectedOnTextSelection?: boolean\n}): boolean {\n const { from, to } = selection\n\n if (from <= pos && to >= pos + nodeSize) {\n return true\n }\n\n if (selectedOnTextSelection && isTextSelection(selection) && from > pos && to < pos + nodeSize) {\n return true\n }\n\n return false\n}\n","import type { Transaction } from '@tiptap/pm/state'\nimport type { MapResult } from '@tiptap/pm/transform'\n\n/**\n * A class that represents a mappable position in the editor. It can be extended\n * by other extensions to add additional position mapping capabilities.\n */\nexport class MappablePosition {\n /**\n * The absolute position in the editor.\n */\n public position: number\n\n constructor(position: number) {\n this.position = position\n }\n\n /**\n * Creates a MappablePosition from a JSON object.\n */\n static fromJSON(json: any): MappablePosition {\n return new MappablePosition(json.position)\n }\n\n /**\n * Converts the MappablePosition to a JSON object.\n */\n toJSON(): any {\n return {\n position: this.position,\n }\n }\n}\n\n/**\n * The result of the getUpdatedPosition function.\n */\nexport interface GetUpdatedPositionResult {\n position: MappablePosition\n mapResult: MapResult | null\n}\n\n/**\n * Calculates the new position after applying a transaction.\n *\n * @returns The new mappable position and the map result.\n */\nexport function getUpdatedPosition(\n position: MappablePosition,\n transaction: Transaction,\n): GetUpdatedPositionResult {\n const mapResult = transaction.mapping.mapResult(position.position)\n return {\n position: new MappablePosition(mapResult.pos),\n mapResult,\n }\n}\n\n/**\n * Creates a MappablePosition from a position number. This is the default\n * implementation for Tiptap core. It can be overridden by other Tiptap\n * extensions.\n *\n * @param position The position (as a number) where the MappablePosition will be created.\n * @returns A new MappablePosition instance at the given position.\n */\nexport function createMappablePosition(position: number): MappablePosition {\n return new MappablePosition(position)\n}\n","import type { EditorView } from '@tiptap/pm/view'\n\nimport { minMax } from '../utilities/minMax.js'\n\nexport function posToDOMRect(view: EditorView, from: number, to: number): DOMRect {\n const minPos = 0\n const maxPos = view.state.doc.content.size\n const resolvedFrom = minMax(from, minPos, maxPos)\n const resolvedEnd = minMax(to, minPos, maxPos)\n const start = view.coordsAtPos(resolvedFrom)\n const end = view.coordsAtPos(resolvedEnd, -1)\n const top = Math.min(start.top, end.top)\n const bottom = Math.max(start.bottom, end.bottom)\n const left = Math.min(start.left, end.left)\n const right = Math.max(start.right, end.right)\n const width = right - left\n const height = bottom - top\n const x = left\n const y = top\n const data = {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x,\n y,\n }\n\n return {\n ...data,\n toJSON: () => data,\n }\n}\n","import type { Schema } from '@tiptap/pm/model'\n\nimport type { JSONContent } from '../types.js'\n\ntype RewriteUnknownContentOptions = {\n /**\n * If true, unknown nodes will be treated as paragraphs\n * @default true\n */\n fallbackToParagraph?: boolean\n}\n\ntype RewrittenContent = {\n /**\n * The original JSON content that was rewritten\n */\n original: JSONContent\n /**\n * The name of the node or mark that was unsupported\n */\n unsupported: string\n}[]\n\n/**\n * The actual implementation of the rewriteUnknownContent function\n */\nfunction rewriteUnknownContentInner({\n json,\n validMarks,\n validNodes,\n options,\n rewrittenContent = [],\n}: {\n json: JSONContent\n validMarks: Set\n validNodes: Set\n options?: RewriteUnknownContentOptions\n rewrittenContent?: RewrittenContent\n}): {\n /**\n * The cleaned JSON content\n */\n json: JSONContent | null\n /**\n * The array of nodes and marks that were rewritten\n */\n rewrittenContent: RewrittenContent\n} {\n if (json.marks && Array.isArray(json.marks)) {\n json.marks = json.marks.filter(mark => {\n const name = typeof mark === 'string' ? mark : mark.type\n\n if (validMarks.has(name)) {\n return true\n }\n\n rewrittenContent.push({\n original: JSON.parse(JSON.stringify(mark)),\n unsupported: name,\n })\n // Just ignore any unknown marks\n return false\n })\n }\n\n if (json.content && Array.isArray(json.content)) {\n json.content = json.content\n .map(\n value =>\n rewriteUnknownContentInner({\n json: value,\n validMarks,\n validNodes,\n options,\n rewrittenContent,\n }).json,\n )\n .filter(a => a !== null && a !== undefined)\n }\n\n if (json.type && !validNodes.has(json.type)) {\n rewrittenContent.push({\n original: JSON.parse(JSON.stringify(json)),\n unsupported: json.type,\n })\n\n if (json.content && Array.isArray(json.content) && options?.fallbackToParagraph !== false) {\n // Just treat it like a paragraph and hope for the best\n json.type = 'paragraph'\n\n return {\n json,\n rewrittenContent,\n }\n }\n\n // or just omit it entirely\n return {\n json: null,\n rewrittenContent,\n }\n }\n\n return { json, rewrittenContent }\n}\n\n/**\n * Rewrite unknown nodes and marks within JSON content\n * Allowing for user within the editor\n */\nexport function rewriteUnknownContent(\n /**\n * The JSON content to clean of unknown nodes and marks\n */\n json: JSONContent,\n /**\n * The schema to use for validation\n */\n schema: Schema,\n /**\n * Options for the cleaning process\n */\n options?: RewriteUnknownContentOptions,\n): {\n /**\n * The cleaned JSON content\n */\n json: JSONContent | null\n /**\n * The array of nodes and marks that were rewritten\n */\n rewrittenContent: {\n /**\n * The original JSON content that was rewritten\n */\n original: JSONContent\n /**\n * The name of the node or mark that was unsupported\n */\n unsupported: string\n }[]\n} {\n return rewriteUnknownContentInner({\n json,\n validNodes: new Set(Object.keys(schema.nodes)),\n validMarks: new Set(Object.keys(schema.marks)),\n options,\n })\n}\n","import type { MarkType, ResolvedPos } from '@tiptap/pm/model'\nimport type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { getMarkAttributes } from '../helpers/getMarkAttributes.js'\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { isTextSelection } from '../helpers/index.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setMark: {\n /**\n * Add a mark with new attributes.\n * @param typeOrName The mark type or name.\n * @example editor.commands.setMark('bold', { level: 1 })\n */\n setMark: (typeOrName: string | MarkType, attributes?: Record) => ReturnType\n }\n }\n}\n\nfunction canSetMark(state: EditorState, tr: Transaction, newMarkType: MarkType) {\n const { selection } = tr\n let cursor: ResolvedPos | null = null\n\n if (isTextSelection(selection)) {\n cursor = selection.$cursor\n }\n\n if (cursor) {\n const currentMarks = state.storedMarks ?? cursor.marks()\n const parentAllowsMarkType = cursor.parent.type.allowsMarkType(newMarkType)\n\n // There can be no current marks that exclude the new mark, and the parent must allow this mark type\n return (\n parentAllowsMarkType &&\n (!!newMarkType.isInSet(currentMarks) ||\n !currentMarks.some(mark => mark.type.excludes(newMarkType)))\n )\n }\n\n const { ranges } = selection\n\n return ranges.some(({ $from, $to }) => {\n let someNodeSupportsMark =\n $from.depth === 0\n ? state.doc.inlineContent && state.doc.type.allowsMarkType(newMarkType)\n : false\n\n state.doc.nodesBetween($from.pos, $to.pos, (node, _pos, parent) => {\n // If we already found a mark that we can enable, return false to bypass the remaining search\n if (someNodeSupportsMark) {\n return false\n }\n\n if (node.isInline) {\n const parentAllowsMarkType = !parent || parent.type.allowsMarkType(newMarkType)\n const currentMarksAllowMarkType =\n !!newMarkType.isInSet(node.marks) ||\n !node.marks.some(otherMark => otherMark.type.excludes(newMarkType))\n\n someNodeSupportsMark = parentAllowsMarkType && currentMarksAllowMarkType\n }\n return !someNodeSupportsMark\n })\n\n return someNodeSupportsMark\n })\n}\nexport const setMark: RawCommands['setMark'] =\n (typeOrName, attributes = {}) =>\n ({ tr, state, dispatch }) => {\n const { selection } = tr\n const { empty, ranges } = selection\n const type = getMarkType(typeOrName, state.schema)\n\n if (dispatch) {\n if (empty) {\n const oldAttributes = getMarkAttributes(state, type)\n\n tr.addStoredMark(\n type.create({\n ...oldAttributes,\n ...attributes,\n }),\n )\n } else {\n ranges.forEach(range => {\n const from = range.$from.pos\n const to = range.$to.pos\n\n state.doc.nodesBetween(from, to, (node, pos) => {\n const trimmedFrom = Math.max(pos, from)\n const trimmedTo = Math.min(pos + node.nodeSize, to)\n const someHasMark = node.marks.find(mark => mark.type === type)\n\n // if there is already a mark of this type\n // we know that we have to merge its attributes\n // otherwise we add a fresh new mark\n if (someHasMark) {\n node.marks.forEach(mark => {\n if (type === mark.type) {\n tr.addMark(\n trimmedFrom,\n trimmedTo,\n type.create({\n ...mark.attrs,\n ...attributes,\n }),\n )\n }\n })\n } else {\n tr.addMark(trimmedFrom, trimmedTo, type.create(attributes))\n }\n })\n })\n }\n }\n\n return canSetMark(state, tr, type)\n }\n","import type { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setMeta: {\n /**\n * Store a metadata property in the current transaction.\n * @param key The key of the metadata property.\n * @param value The value to store.\n * @example editor.commands.setMeta('foo', 'bar')\n */\n setMeta: (key: string | Plugin | PluginKey, value: any) => ReturnType\n }\n }\n}\n\nexport const setMeta: RawCommands['setMeta'] =\n (key, value) =>\n ({ tr }) => {\n tr.setMeta(key, value)\n\n return true\n }\n","import { setBlockType } from '@tiptap/pm/commands'\nimport type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setNode: {\n /**\n * Replace a given range with a node.\n * @param typeOrName The type or name of the node\n * @param attributes The attributes of the node\n * @example editor.commands.setNode('paragraph')\n */\n setNode: (typeOrName: string | NodeType, attributes?: Record) => ReturnType\n }\n }\n}\n\nexport const setNode: RawCommands['setNode'] =\n (typeOrName, attributes = {}) =>\n ({ state, dispatch, chain }) => {\n const type = getNodeType(typeOrName, state.schema)\n\n let attributesToCopy: Record | undefined\n\n if (state.selection.$anchor.sameParent(state.selection.$head)) {\n // only copy attributes if the selection is pointing to a node of the same type\n attributesToCopy = state.selection.$anchor.parent.attrs\n }\n\n // TODO: use a fallback like insertContent?\n if (!type.isTextblock) {\n console.warn('[tiptap warn]: Currently \"setNode()\" only supports text block nodes.')\n\n return false\n }\n\n return (\n chain()\n // try to convert node to default node if needed\n .command(({ commands }) => {\n const canSetBlock = setBlockType(type, { ...attributesToCopy, ...attributes })(state)\n\n if (canSetBlock) {\n return true\n }\n\n return commands.clearNodes()\n })\n .command(({ state: updatedState }) => {\n return setBlockType(type, { ...attributesToCopy, ...attributes })(updatedState, dispatch)\n })\n .run()\n )\n }\n","import { NodeSelection } from '@tiptap/pm/state'\n\nimport type { RawCommands } from '../types.js'\nimport { minMax } from '../utilities/minMax.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setNodeSelection: {\n /**\n * Creates a NodeSelection.\n * @param position - Position of the node.\n * @example editor.commands.setNodeSelection(10)\n */\n setNodeSelection: (position: number) => ReturnType\n }\n }\n}\n\nexport const setNodeSelection: RawCommands['setNodeSelection'] =\n position =>\n ({ tr, dispatch }) => {\n if (dispatch) {\n const { doc } = tr\n const from = minMax(position, 0, doc.content.size)\n const selection = NodeSelection.create(doc, from)\n\n tr.setSelection(selection)\n }\n\n return true\n }\n","import type { Range, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setTextDirection: {\n /**\n * Set the text direction for nodes.\n * If no position is provided, it will use the current selection.\n * @param direction The text direction to set ('ltr', 'rtl', or 'auto')\n * @param position Optional position or range to apply the direction to\n * @example editor.commands.setTextDirection('rtl')\n * @example editor.commands.setTextDirection('ltr', { from: 0, to: 10 })\n */\n setTextDirection: (direction: 'ltr' | 'rtl' | 'auto', position?: number | Range) => ReturnType\n }\n }\n}\n\nexport const setTextDirection: RawCommands['setTextDirection'] =\n (direction, position) =>\n ({ tr, state, dispatch }) => {\n const { selection } = state\n let from: number\n let to: number\n\n if (typeof position === 'number') {\n from = position\n to = position\n } else if (position && 'from' in position && 'to' in position) {\n from = position.from\n to = position.to\n } else {\n from = selection.from\n to = selection.to\n }\n\n if (dispatch) {\n tr.doc.nodesBetween(from, to, (node, pos) => {\n if (node.isText) {\n return\n }\n\n tr.setNodeMarkup(pos, undefined, {\n ...node.attrs,\n dir: direction,\n })\n })\n }\n\n return true\n }\n","import { TextSelection } from '@tiptap/pm/state'\n\nimport type { Range, RawCommands } from '../types.js'\nimport { minMax } from '../utilities/minMax.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setTextSelection: {\n /**\n * Creates a TextSelection.\n * @param position The position of the selection.\n * @example editor.commands.setTextSelection(10)\n */\n setTextSelection: (position: number | Range) => ReturnType\n }\n }\n}\n\nexport const setTextSelection: RawCommands['setTextSelection'] =\n position =>\n ({ tr, dispatch }) => {\n if (dispatch) {\n const { doc } = tr\n const { from, to } =\n typeof position === 'number' ? { from: position, to: position } : position\n const minPos = TextSelection.atStart(doc).from\n const maxPos = TextSelection.atEnd(doc).to\n const resolvedFrom = minMax(from, minPos, maxPos)\n const resolvedEnd = minMax(to, minPos, maxPos)\n const selection = TextSelection.create(doc, resolvedFrom, resolvedEnd)\n\n tr.setSelection(selection)\n }\n\n return true\n }\n","import type { NodeType } from '@tiptap/pm/model'\nimport { sinkListItem as originalSinkListItem } from '@tiptap/pm/schema-list'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n sinkListItem: {\n /**\n * Sink the list item down into an inner list.\n * @param typeOrName The type or name of the node.\n * @example editor.commands.sinkListItem('listItem')\n */\n sinkListItem: (typeOrName: string | NodeType) => ReturnType\n }\n }\n}\n\nexport const sinkListItem: RawCommands['sinkListItem'] =\n typeOrName =>\n ({ state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n\n return originalSinkListItem(type)(state, dispatch)\n }\n","import type { EditorState } from '@tiptap/pm/state'\nimport { NodeSelection, TextSelection } from '@tiptap/pm/state'\nimport { canSplit } from '@tiptap/pm/transform'\n\nimport { defaultBlockAt } from '../helpers/defaultBlockAt.js'\nimport { getSplittedAttributes } from '../helpers/getSplittedAttributes.js'\nimport type { RawCommands } from '../types.js'\n\nfunction ensureMarks(state: EditorState, splittableMarks?: string[]) {\n const marks =\n state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks())\n\n if (marks) {\n const filteredMarks = marks.filter(mark => splittableMarks?.includes(mark.type.name))\n\n state.tr.ensureMarks(filteredMarks)\n }\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n splitBlock: {\n /**\n * Forks a new node from an existing node.\n * @param options.keepMarks Keep marks from the previous node.\n * @example editor.commands.splitBlock()\n * @example editor.commands.splitBlock({ keepMarks: true })\n */\n splitBlock: (options?: { keepMarks?: boolean }) => ReturnType\n }\n }\n}\n\nexport const splitBlock: RawCommands['splitBlock'] =\n ({ keepMarks = true } = {}) =>\n ({ tr, state, dispatch, editor }) => {\n const { selection, doc } = tr\n const { $from, $to } = selection\n const extensionAttributes = editor.extensionManager.attributes\n const newAttributes = getSplittedAttributes(\n extensionAttributes,\n $from.node().type.name,\n $from.node().attrs,\n )\n\n if (selection instanceof NodeSelection && selection.node.isBlock) {\n if (!$from.parentOffset || !canSplit(doc, $from.pos)) {\n return false\n }\n\n if (dispatch) {\n if (keepMarks) {\n ensureMarks(state, editor.extensionManager.splittableMarks)\n }\n\n tr.split($from.pos).scrollIntoView()\n }\n\n return true\n }\n\n if (!$from.parent.isBlock) {\n return false\n }\n\n const atEnd = $to.parentOffset === $to.parent.content.size\n\n const deflt =\n $from.depth === 0\n ? undefined\n : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)))\n\n let types =\n atEnd && deflt\n ? [\n {\n type: deflt,\n attrs: newAttributes,\n },\n ]\n : undefined\n\n let can = canSplit(tr.doc, tr.mapping.map($from.pos), 1, types)\n\n if (\n !types &&\n !can &&\n canSplit(tr.doc, tr.mapping.map($from.pos), 1, deflt ? [{ type: deflt }] : undefined)\n ) {\n can = true\n types = deflt\n ? [\n {\n type: deflt,\n attrs: newAttributes,\n },\n ]\n : undefined\n }\n\n if (dispatch) {\n if (can) {\n if (selection instanceof TextSelection) {\n tr.deleteSelection()\n }\n\n tr.split(tr.mapping.map($from.pos), 1, types)\n\n if (deflt && !atEnd && !$from.parentOffset && $from.parent.type !== deflt) {\n const first = tr.mapping.map($from.before())\n const $first = tr.doc.resolve(first)\n\n if ($from.node(-1).canReplaceWith($first.index(), $first.index() + 1, deflt)) {\n tr.setNodeMarkup(tr.mapping.map($from.before()), deflt)\n }\n }\n }\n\n if (keepMarks) {\n ensureMarks(state, editor.extensionManager.splittableMarks)\n }\n\n tr.scrollIntoView()\n }\n\n return can\n }\n","import type { Node as ProseMirrorNode, NodeType } from '@tiptap/pm/model'\nimport { Fragment, Slice } from '@tiptap/pm/model'\nimport { TextSelection } from '@tiptap/pm/state'\nimport { canSplit } from '@tiptap/pm/transform'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { getSplittedAttributes } from '../helpers/getSplittedAttributes.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n splitListItem: {\n /**\n * Splits one list item into two list items.\n * @param typeOrName The type or name of the node.\n * @param overrideAttrs The attributes to ensure on the new node.\n * @example editor.commands.splitListItem('listItem')\n */\n splitListItem: (\n typeOrName: string | NodeType,\n overrideAttrs?: Record,\n ) => ReturnType\n }\n }\n}\n\nexport const splitListItem: RawCommands['splitListItem'] =\n (typeOrName, overrideAttrs = {}) =>\n ({ tr, state, dispatch, editor }) => {\n const type = getNodeType(typeOrName, state.schema)\n const { $from, $to } = state.selection\n\n // @ts-ignore\n // oxlint-disable-next-line\n const node: ProseMirrorNode = state.selection.node\n\n if ((node && node.isBlock) || $from.depth < 2 || !$from.sameParent($to)) {\n return false\n }\n\n const grandParent = $from.node(-1)\n\n if (grandParent.type !== type) {\n return false\n }\n\n const extensionAttributes = editor.extensionManager.attributes\n\n if ($from.parent.content.size === 0 && $from.node(-1).childCount === $from.indexAfter(-1)) {\n // In an empty block. If this is a nested list, the wrapping\n // list item should be split. Otherwise, bail out and let next\n // command handle lifting.\n if (\n $from.depth === 2 ||\n $from.node(-3).type !== type ||\n $from.index(-2) !== $from.node(-2).childCount - 1\n ) {\n return false\n }\n\n if (dispatch) {\n let wrap = Fragment.empty\n // oxlint-disable-next-line\n const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3\n\n // Build a fragment containing empty versions of the structure\n // from the outer list item to the parent node of the cursor\n for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d -= 1) {\n wrap = Fragment.from($from.node(d).copy(wrap))\n }\n\n const depthAfter =\n // oxlint-disable-next-line no-nested-ternary\n $from.indexAfter(-1) < $from.node(-2).childCount\n ? 1\n : $from.indexAfter(-2) < $from.node(-3).childCount\n ? 2\n : 3\n\n // Add a second list item with an empty default start node\n const newNextTypeAttributes = {\n ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs),\n ...overrideAttrs,\n }\n const nextType =\n type.contentMatch.defaultType?.createAndFill(newNextTypeAttributes) || undefined\n\n wrap = wrap.append(Fragment.from(type.createAndFill(null, nextType) || undefined))\n\n const start = $from.before($from.depth - (depthBefore - 1))\n\n tr.replace(start, $from.after(-depthAfter), new Slice(wrap, 4 - depthBefore, 0))\n\n let sel = -1\n\n tr.doc.nodesBetween(start, tr.doc.content.size, (n, pos) => {\n if (sel > -1) {\n return false\n }\n\n if (n.isTextblock && n.content.size === 0) {\n sel = pos + 1\n }\n })\n\n if (sel > -1) {\n tr.setSelection(TextSelection.near(tr.doc.resolve(sel)))\n }\n\n tr.scrollIntoView()\n }\n\n return true\n }\n\n const nextType = $to.pos === $from.end() ? grandParent.contentMatchAt(0).defaultType : null\n\n const newTypeAttributes = {\n ...getSplittedAttributes(extensionAttributes, grandParent.type.name, grandParent.attrs),\n ...overrideAttrs,\n }\n const newNextTypeAttributes = {\n ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs),\n ...overrideAttrs,\n }\n\n tr.delete($from.pos, $to.pos)\n\n const types = nextType\n ? [\n { type, attrs: newTypeAttributes },\n { type: nextType, attrs: newNextTypeAttributes },\n ]\n : [{ type, attrs: newTypeAttributes }]\n\n if (!canSplit(tr.doc, $from.pos, 2)) {\n return false\n }\n\n if (dispatch) {\n const { selection, storedMarks } = state\n const { splittableMarks } = editor.extensionManager\n const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks())\n\n tr.split($from.pos, 2, types).scrollIntoView()\n\n if (!marks || !dispatch) {\n return true\n }\n\n const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name))\n\n tr.ensureMarks(filteredMarks)\n }\n\n return true\n }\n","import type { NodeType } from '@tiptap/pm/model'\nimport type { Transaction } from '@tiptap/pm/state'\nimport { TextSelection } from '@tiptap/pm/state'\nimport { canJoin } from '@tiptap/pm/transform'\n\nimport { findParentNode } from '../helpers/findParentNode.js'\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isList } from '../helpers/isList.js'\nimport type { RawCommands } from '../types.js'\n\nconst joinListBackwards = (tr: Transaction, listType: NodeType): boolean => {\n const list = findParentNode(node => node.type === listType)(tr.selection)\n\n if (!list) {\n return true\n }\n\n const before = tr.doc.resolve(Math.max(0, list.pos - 1)).before(list.depth)\n\n if (before === undefined) {\n return true\n }\n\n const nodeBefore = tr.doc.nodeAt(before)\n const canJoinBackwards = list.node.type === nodeBefore?.type && canJoin(tr.doc, list.pos)\n\n if (!canJoinBackwards) {\n return true\n }\n\n tr.join(list.pos)\n\n return true\n}\n\nconst joinListForwards = (tr: Transaction, listType: NodeType): boolean => {\n const list = findParentNode(node => node.type === listType)(tr.selection)\n\n if (!list) {\n return true\n }\n\n const after = tr.doc.resolve(list.start).after(list.depth)\n\n if (after === undefined) {\n return true\n }\n\n const nodeAfter = tr.doc.nodeAt(after)\n const canJoinForwards = list.node.type === nodeAfter?.type && canJoin(tr.doc, after)\n\n if (!canJoinForwards) {\n return true\n }\n\n tr.join(after)\n\n return true\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n toggleList: {\n /**\n * Toggle between different list types.\n * @param listTypeOrName The type or name of the list.\n * @param itemTypeOrName The type or name of the list item.\n * @param keepMarks Keep marks when toggling.\n * @param attributes Attributes for the new list.\n * @example editor.commands.toggleList('bulletList', 'listItem')\n */\n toggleList: (\n listTypeOrName: string | NodeType,\n itemTypeOrName: string | NodeType,\n keepMarks?: boolean,\n attributes?: Record,\n ) => ReturnType\n }\n }\n}\n\nfunction createInnerSelectionForWholeDocList(tr: Transaction) {\n const doc = tr.doc\n const list = doc.firstChild\n\n if (!list) {\n return null\n }\n\n // Place the selection inside the list node so that ProseMirror's\n // liftListItem command can operate. AllSelection sits at the doc root.\n // Use TextSelection.between to resolve positions into valid inline\n // content positions, so the selection survives position mapping after\n // liftListItem removes list/item wrappers.\n const $start = doc.resolve(1)\n const $end = doc.resolve(list.nodeSize - 1)\n\n return TextSelection.between($start, $end)\n}\nexport const toggleList: RawCommands['toggleList'] =\n (listTypeOrName, itemTypeOrName, keepMarks, attributes = {}) =>\n ({ editor, tr, state, dispatch, chain, commands, can }) => {\n const { extensions, splittableMarks } = editor.extensionManager\n const listType = getNodeType(listTypeOrName, state.schema)\n const itemType = getNodeType(itemTypeOrName, state.schema)\n const { selection, storedMarks } = state\n const { $from, $to } = selection\n const range = $from.blockRange($to)\n\n const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks())\n\n if (!range) {\n return false\n }\n\n const parentList = findParentNode(node => isList(node.type.name, extensions))(selection)\n\n // When the user presses Ctrl/Cmd+A, ProseMirror creates an `AllSelection`\n // covering the entire document (0..doc.content.size). In that case\n // `findParentNode` cannot detect the surrounding list because the\n // selection sits at the document root. If the document consists of a\n // single top-level list node, treat that list as the active list so the\n // toggle logic can correctly lift or change it.\n const isAllSelection = selection.from === 0 && selection.to === state.doc.content.size\n const topLevelNodes = state.doc.content.content\n const soleTopLevelNode = topLevelNodes.length === 1 ? topLevelNodes[0] : null\n const allSelectionList =\n isAllSelection && soleTopLevelNode && isList(soleTopLevelNode.type.name, extensions)\n ? {\n node: soleTopLevelNode,\n pos: 0,\n depth: 0,\n }\n : null\n\n const currentList = parentList ?? allSelectionList\n\n const isInsideExistingList =\n !!parentList && range.depth >= 1 && range.depth - parentList.depth <= 1\n\n const hasWholeDocSelectedList = !!allSelectionList\n if ((isInsideExistingList || hasWholeDocSelectedList) && currentList) {\n // remove list\n if (currentList.node.type === listType) {\n if (isAllSelection && hasWholeDocSelectedList) {\n return chain()\n .command(({ tr: trx, dispatch: disp }) => {\n // Ctrl/Cmd+A creates an AllSelection at the document root.\n // When the whole document is a single top-level list, normalize the\n // selection into that list before lifting, since liftListItem expects\n // a selection inside a list item.\n const nextSelection = createInnerSelectionForWholeDocList(trx)\n\n if (!nextSelection) {\n return false\n }\n\n trx.setSelection(nextSelection)\n\n if (disp) {\n disp(trx)\n }\n\n return true\n })\n .liftListItem(itemType)\n .run()\n }\n\n return commands.liftListItem(itemType)\n }\n\n // change list type\n if (\n isList(currentList.node.type.name, extensions) &&\n listType.validContent(currentList.node.content)\n ) {\n return chain()\n .command(() => {\n tr.setNodeMarkup(currentList.pos, listType)\n\n return true\n })\n .command(() => joinListBackwards(tr, listType))\n .command(() => joinListForwards(tr, listType))\n .run()\n }\n }\n\n if (!keepMarks || !marks || !dispatch) {\n return (\n chain()\n // try to convert node to default node if needed\n .command(() => {\n const canWrapInList = can().wrapInList(listType, attributes)\n if (canWrapInList) {\n return true\n }\n return commands.clearNodes()\n })\n .wrapInList(listType, attributes)\n .command(() => joinListBackwards(tr, listType))\n .command(() => joinListForwards(tr, listType))\n .run()\n )\n }\n\n return (\n chain()\n // try to convert node to default node if needed\n .command(() => {\n const canWrapInList = can().wrapInList(listType, attributes)\n\n const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name))\n\n tr.ensureMarks(filteredMarks)\n\n if (canWrapInList) {\n return true\n }\n return commands.clearNodes()\n })\n .wrapInList(listType, attributes)\n .command(() => joinListBackwards(tr, listType))\n .command(() => joinListForwards(tr, listType))\n .run()\n )\n }\n","import type { MarkType } from '@tiptap/pm/model'\n\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { isMarkActive } from '../helpers/isMarkActive.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n toggleMark: {\n /**\n * Toggle a mark on and off.\n * @param typeOrName The mark type or name.\n * @param attributes The attributes of the mark.\n * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.\n * @example editor.commands.toggleMark('bold')\n */\n toggleMark: (\n /**\n * The mark type or name.\n */\n typeOrName: string | MarkType,\n\n /**\n * The attributes of the mark.\n */\n attributes?: Record,\n\n options?: {\n /**\n * Removes the mark even across the current selection. Defaults to `false`.\n */\n extendEmptyMarkRange?: boolean\n },\n ) => ReturnType\n }\n }\n}\n\nexport const toggleMark: RawCommands['toggleMark'] =\n (typeOrName, attributes = {}, options = {}) =>\n ({ state, commands }) => {\n const { extendEmptyMarkRange = false } = options\n const type = getMarkType(typeOrName, state.schema)\n const isActive = isMarkActive(state, type, attributes)\n\n if (isActive) {\n return commands.unsetMark(type, { extendEmptyMarkRange })\n }\n\n return commands.setMark(type, attributes)\n }\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isNodeActive } from '../helpers/isNodeActive.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n toggleNode: {\n /**\n * Toggle a node with another node.\n * @param typeOrName The type or name of the node.\n * @param toggleTypeOrName The type or name of the node to toggle.\n * @param attributes The attributes of the node.\n * @example editor.commands.toggleNode('heading', 'paragraph')\n */\n toggleNode: (\n typeOrName: string | NodeType,\n toggleTypeOrName: string | NodeType,\n attributes?: Record,\n ) => ReturnType\n }\n }\n}\n\nexport const toggleNode: RawCommands['toggleNode'] =\n (typeOrName, toggleTypeOrName, attributes = {}) =>\n ({ state, commands }) => {\n const type = getNodeType(typeOrName, state.schema)\n const toggleType = getNodeType(toggleTypeOrName, state.schema)\n const isActive = isNodeActive(state, type, attributes)\n\n let attributesToCopy: Record | undefined\n\n if (state.selection.$anchor.sameParent(state.selection.$head)) {\n // only copy attributes if the selection is pointing to a node of the same type\n attributesToCopy = state.selection.$anchor.parent.attrs\n }\n\n if (isActive) {\n return commands.setNode(toggleType, attributesToCopy)\n }\n\n // If the node is not active, we want to set the new node type with the given attributes\n // Copying over the attributes from the current node if the selection is pointing to a node of the same type\n return commands.setNode(type, { ...attributesToCopy, ...attributes })\n }\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isNodeActive } from '../helpers/isNodeActive.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n toggleWrap: {\n /**\n * Wraps nodes in another node, or removes an existing wrap.\n * @param typeOrName The type or name of the node.\n * @param attributes The attributes of the node.\n * @example editor.commands.toggleWrap('blockquote')\n */\n toggleWrap: (typeOrName: string | NodeType, attributes?: Record) => ReturnType\n }\n }\n}\n\nexport const toggleWrap: RawCommands['toggleWrap'] =\n (typeOrName, attributes = {}) =>\n ({ state, commands }) => {\n const type = getNodeType(typeOrName, state.schema)\n const isActive = isNodeActive(state, type, attributes)\n\n if (isActive) {\n return commands.lift(type)\n }\n\n return commands.wrapIn(type, attributes)\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n undoInputRule: {\n /**\n * Undo an input rule.\n * @example editor.commands.undoInputRule()\n */\n undoInputRule: () => ReturnType\n }\n }\n}\n\nexport const undoInputRule: RawCommands['undoInputRule'] =\n () =>\n ({ state, dispatch }) => {\n const plugins = state.plugins\n\n for (let i = 0; i < plugins.length; i += 1) {\n const plugin = plugins[i]\n let undoable\n\n // @ts-ignore\n // oxlint-disable-next-line\n if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) {\n if (dispatch) {\n const tr = state.tr\n const toUndo = undoable.transform\n\n for (let j = toUndo.steps.length - 1; j >= 0; j -= 1) {\n tr.step(toUndo.steps[j].invert(toUndo.docs[j]))\n }\n\n if (undoable.text) {\n const marks = tr.doc.resolve(undoable.from).marks()\n\n tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks))\n } else {\n tr.delete(undoable.from, undoable.to)\n }\n }\n\n return true\n }\n }\n\n return false\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n unsetAllMarks: {\n /**\n * Remove all clearable marks in the current selection.\n * Marks with `clearable: false` are preserved\n * @param options.ignoreClearable If true, removes all marks regardless of `clearable` setting. Defaults to `false`.\n * @example editor.commands.unsetAllMarks()\n * @example editor.commands.unsetAllMarks({ ignoreClearable: true })\n */\n unsetAllMarks: (options?: { ignoreClearable?: boolean }) => ReturnType\n }\n }\n}\n\nexport const unsetAllMarks: RawCommands['unsetAllMarks'] =\n (options = {}) =>\n ({ tr, dispatch, editor }) => {\n const { ignoreClearable = false } = options\n const { selection } = tr\n const { empty, ranges } = selection\n\n if (empty) {\n return true\n }\n\n const { nonClearableMarks } = editor.extensionManager\n\n if (dispatch) {\n const clearableMarkTypes = Object.values(editor.schema.marks).filter(\n markType => ignoreClearable || !nonClearableMarks.includes(markType.name),\n )\n\n ranges.forEach(range => {\n for (const markType of clearableMarkTypes) {\n tr.removeMark(range.$from.pos, range.$to.pos, markType)\n }\n })\n }\n\n return true\n }\n","import type { MarkType } from '@tiptap/pm/model'\n\nimport { getMarkRange } from '../helpers/getMarkRange.js'\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n unsetMark: {\n /**\n * Remove all marks in the current selection.\n * @param typeOrName The mark type or name.\n * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.\n * @example editor.commands.unsetMark('bold')\n */\n unsetMark: (\n /**\n * The mark type or name.\n */\n typeOrName: string | MarkType,\n\n options?: {\n /**\n * Removes the mark even across the current selection. Defaults to `false`.\n */\n extendEmptyMarkRange?: boolean\n },\n ) => ReturnType\n }\n }\n}\n\nexport const unsetMark: RawCommands['unsetMark'] =\n (typeOrName, options = {}) =>\n ({ tr, state, dispatch }) => {\n const { extendEmptyMarkRange = false } = options\n const { selection } = tr\n const type = getMarkType(typeOrName, state.schema)\n const { $from, empty, ranges } = selection\n\n if (!dispatch) {\n return true\n }\n\n if (empty && extendEmptyMarkRange) {\n let { from, to } = selection\n const attrs = $from.marks().find(mark => mark.type === type)?.attrs\n const range = getMarkRange($from, type, attrs)\n\n if (range) {\n from = range.from\n to = range.to\n }\n\n tr.removeMark(from, to, type)\n } else {\n ranges.forEach(range => {\n tr.removeMark(range.$from.pos, range.$to.pos, type)\n })\n }\n\n tr.removeStoredMark(type)\n\n return true\n }\n","import type { Range, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n unsetTextDirection: {\n /**\n * Remove the text direction attribute from nodes.\n * If no position is provided, it will use the current selection.\n * @param position Optional position or range to remove the direction from\n * @example editor.commands.unsetTextDirection()\n * @example editor.commands.unsetTextDirection({ from: 0, to: 10 })\n */\n unsetTextDirection: (position?: number | Range) => ReturnType\n }\n }\n}\n\nexport const unsetTextDirection: RawCommands['unsetTextDirection'] =\n position =>\n ({ tr, state, dispatch }) => {\n const { selection } = state\n let from: number\n let to: number\n\n if (typeof position === 'number') {\n from = position\n to = position\n } else if (position && 'from' in position && 'to' in position) {\n from = position.from\n to = position.to\n } else {\n from = selection.from\n to = selection.to\n }\n\n if (dispatch) {\n tr.doc.nodesBetween(from, to, (node, pos) => {\n if (node.isText) {\n return\n }\n\n const newAttrs = { ...node.attrs }\n\n delete newAttrs.dir\n\n tr.setNodeMarkup(pos, undefined, newAttrs)\n })\n }\n\n return true\n }\n","import type { Mark, MarkType, Node, NodeType } from '@tiptap/pm/model'\nimport type { SelectionRange } from '@tiptap/pm/state'\n\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n updateAttributes: {\n /**\n * Update attributes of a node or mark.\n * @param typeOrName The type or name of the node or mark.\n * @param attributes The attributes of the node or mark.\n * @example editor.commands.updateAttributes('mention', { userId: \"2\" })\n */\n updateAttributes: (\n /**\n * The type or name of the node or mark.\n */\n typeOrName: string | NodeType | MarkType,\n\n /**\n * The attributes of the node or mark.\n */\n attributes: Record,\n ) => ReturnType\n }\n }\n}\n\nexport const updateAttributes: RawCommands['updateAttributes'] =\n (typeOrName, attributes = {}) =>\n ({ tr, state, dispatch }) => {\n let nodeType: NodeType | null = null\n let markType: MarkType | null = null\n\n const schemaType = getSchemaTypeNameByName(\n typeof typeOrName === 'string' ? typeOrName : typeOrName.name,\n state.schema,\n )\n\n if (!schemaType) {\n return false\n }\n\n if (schemaType === 'node') {\n nodeType = getNodeType(typeOrName as NodeType, state.schema)\n }\n\n if (schemaType === 'mark') {\n markType = getMarkType(typeOrName as MarkType, state.schema)\n }\n\n let canUpdate = false\n\n tr.selection.ranges.forEach((range: SelectionRange) => {\n const from = range.$from.pos\n const to = range.$to.pos\n\n let lastPos: number | undefined\n let lastNode: Node | undefined\n let trimmedFrom: number\n let trimmedTo: number\n\n if (tr.selection.empty) {\n state.doc.nodesBetween(from, to, (node: Node, pos: number) => {\n if (nodeType && nodeType === node.type) {\n canUpdate = true\n trimmedFrom = Math.max(pos, from)\n trimmedTo = Math.min(pos + node.nodeSize, to)\n lastPos = pos\n lastNode = node\n }\n })\n } else {\n state.doc.nodesBetween(from, to, (node: Node, pos: number) => {\n if (pos < from && nodeType && nodeType === node.type) {\n canUpdate = true\n trimmedFrom = Math.max(pos, from)\n trimmedTo = Math.min(pos + node.nodeSize, to)\n lastPos = pos\n lastNode = node\n }\n\n if (pos >= from && pos <= to) {\n if (nodeType && nodeType === node.type) {\n canUpdate = true\n\n if (dispatch) {\n tr.setNodeMarkup(pos, undefined, {\n ...node.attrs,\n ...attributes,\n })\n }\n }\n\n if (markType && node.marks.length) {\n node.marks.forEach((mark: Mark) => {\n if (markType === mark.type) {\n canUpdate = true\n\n if (dispatch) {\n const trimmedFrom2 = Math.max(pos, from)\n const trimmedTo2 = Math.min(pos + node.nodeSize, to)\n\n tr.addMark(\n trimmedFrom2,\n trimmedTo2,\n markType.create({\n ...mark.attrs,\n ...attributes,\n }),\n )\n }\n }\n })\n }\n }\n })\n }\n\n if (lastNode) {\n if (lastPos !== undefined && dispatch) {\n tr.setNodeMarkup(lastPos, undefined, {\n ...lastNode.attrs,\n ...attributes,\n })\n }\n\n if (markType && lastNode.marks.length) {\n lastNode.marks.forEach((mark: Mark) => {\n if (markType === mark.type && dispatch) {\n tr.addMark(\n trimmedFrom,\n trimmedTo,\n markType.create({\n ...mark.attrs,\n ...attributes,\n }),\n )\n }\n })\n }\n }\n })\n\n return canUpdate\n }\n","import { wrapIn as originalWrapIn } from '@tiptap/pm/commands'\nimport type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n wrapIn: {\n /**\n * Wraps nodes in another node.\n * @param typeOrName The type or name of the node.\n * @param attributes The attributes of the node.\n * @example editor.commands.wrapIn('blockquote')\n */\n wrapIn: (typeOrName: string | NodeType, attributes?: Record) => ReturnType\n }\n }\n}\n\nexport const wrapIn: RawCommands['wrapIn'] =\n (typeOrName, attributes = {}) =>\n ({ state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n\n return originalWrapIn(type, attributes)(state, dispatch)\n }\n","import type { NodeType } from '@tiptap/pm/model'\nimport { wrapInList as originalWrapInList } from '@tiptap/pm/schema-list'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n wrapInList: {\n /**\n * Wrap a node in a list.\n * @param typeOrName The type or name of the node.\n * @param attributes The attributes of the node.\n * @example editor.commands.wrapInList('bulletList')\n */\n wrapInList: (typeOrName: string | NodeType, attributes?: Record) => ReturnType\n }\n }\n}\n\nexport const wrapInList: RawCommands['wrapInList'] =\n (typeOrName, attributes = {}) =>\n ({ state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n\n return originalWrapInList(type, attributes)(state, dispatch)\n }\n","/* oslint-disableno-empty-object-type */\nimport type { MarkType, Node as ProseMirrorNode, NodeType, Schema } from '@tiptap/pm/model'\nimport type { Plugin, PluginKey, Transaction } from '@tiptap/pm/state'\nimport { EditorState } from '@tiptap/pm/state'\nimport { type DirectEditorProps, EditorView } from '@tiptap/pm/view'\n\nimport { CommandManager } from './CommandManager.js'\nimport { EventEmitter } from './EventEmitter.js'\nimport { ExtensionManager } from './ExtensionManager.js'\nimport {\n ClipboardTextSerializer,\n Commands,\n Delete,\n Drop,\n Editable,\n FocusEvents,\n Keymap,\n Paste,\n Tabindex,\n TextDirection,\n} from './extensions/index.js'\nimport { createDocument } from './helpers/createDocument.js'\nimport { getAttributes } from './helpers/getAttributes.js'\nimport { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js'\nimport { getText } from './helpers/getText.js'\nimport { getTextSerializersFromSchema } from './helpers/getTextSerializersFromSchema.js'\nimport { isActive } from './helpers/isActive.js'\nimport { isNodeEmpty } from './helpers/isNodeEmpty.js'\nimport { createMappablePosition, getUpdatedPosition } from './helpers/MappablePosition.js'\nimport { resolveFocusPosition } from './helpers/resolveFocusPosition.js'\nimport type { Storage } from './index.js'\nimport { NodePos } from './NodePos.js'\nimport { style } from './style.js'\nimport type {\n CanCommands,\n ChainedCommands,\n DocumentType,\n EditorEvents,\n EditorOptions,\n NodeType as TNodeType,\n SingleCommands,\n TextSerializer,\n TextType as TTextType,\n Utils,\n} from './types.js'\nimport { createStyleTag } from './utilities/createStyleTag.js'\nimport { isFunction } from './utilities/isFunction.js'\n\nexport * as extensions from './extensions/index.js'\n\n// @ts-ignore\nexport interface TiptapEditorHTMLElement extends HTMLElement {\n editor?: Editor\n}\n\nexport class Editor extends EventEmitter {\n private commandManager!: CommandManager\n\n public extensionManager!: ExtensionManager\n\n private css: HTMLStyleElement | null = null\n\n private className = 'tiptap'\n\n public schema!: Schema\n\n private editorView: EditorView | null = null\n\n public isFocused = false\n\n private destroyed = false\n\n private editorState!: EditorState\n\n /**\n * The editor is considered initialized after the `create` event has been emitted.\n */\n public isInitialized = false\n\n public extensionStorage: Storage = {} as Storage\n\n /**\n * A unique ID for this editor instance.\n */\n public instanceId = Math.random().toString(36).slice(2, 9)\n\n public options: EditorOptions = {\n element: typeof document !== 'undefined' ? document.createElement('div') : null,\n content: '',\n injectCSS: true,\n injectNonce: undefined,\n extensions: [],\n autofocus: false,\n editable: true,\n textDirection: undefined,\n editorProps: {},\n parseOptions: {},\n coreExtensionOptions: {},\n enableInputRules: true,\n enablePasteRules: true,\n enableCoreExtensions: true,\n enableContentCheck: false,\n emitContentError: false,\n onBeforeCreate: () => null,\n onCreate: () => null,\n onMount: () => null,\n onUnmount: () => null,\n onUpdate: () => null,\n onSelectionUpdate: () => null,\n onTransaction: () => null,\n onFocus: () => null,\n onBlur: () => null,\n onDestroy: () => null,\n onContentError: ({ error }) => {\n throw error\n },\n onPaste: () => null,\n onDrop: () => null,\n onDelete: () => null,\n enableExtensionDispatchTransaction: true,\n }\n\n constructor(options: Partial = {}) {\n super()\n this.setOptions(options)\n this.createExtensionManager()\n this.createCommandManager()\n this.createSchema()\n this.on('beforeCreate', this.options.onBeforeCreate)\n this.emit('beforeCreate', { editor: this })\n this.on('mount', this.options.onMount)\n this.on('unmount', this.options.onUnmount)\n this.on('contentError', this.options.onContentError)\n this.on('create', this.options.onCreate)\n this.on('update', this.options.onUpdate)\n this.on('selectionUpdate', this.options.onSelectionUpdate)\n this.on('transaction', this.options.onTransaction)\n this.on('focus', this.options.onFocus)\n this.on('blur', this.options.onBlur)\n this.on('destroy', this.options.onDestroy)\n this.on('drop', ({ event, slice, moved }) => this.options.onDrop(event, slice, moved))\n this.on('paste', ({ event, slice }) => this.options.onPaste(event, slice))\n this.on('delete', this.options.onDelete)\n\n const initialDoc = this.createDoc()\n const selection = resolveFocusPosition(initialDoc, this.options.autofocus)\n\n // Set editor state immediately, so that it's available independently from the view\n this.editorState = EditorState.create({\n doc: initialDoc,\n schema: this.schema,\n selection: selection || undefined,\n })\n\n if (this.options.element) {\n this.mount(this.options.element)\n }\n }\n\n /**\n * Attach the editor to the DOM, creating a new editor view.\n */\n public mount(el: NonNullable & {}) {\n if (typeof document === 'undefined') {\n throw new Error(\n `[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.`,\n )\n }\n this.createView(el)\n this.emit('mount', { editor: this })\n\n if (this.css && !document.head.contains(this.css)) {\n document.head.appendChild(this.css)\n }\n\n window.setTimeout(() => {\n if (this.isDestroyed) {\n return\n }\n\n if (this.options.autofocus !== false && this.options.autofocus !== null) {\n this.commands.focus(this.options.autofocus)\n }\n this.emit('create', { editor: this })\n this.isInitialized = true\n }, 0)\n }\n\n /**\n * Remove the editor from the DOM, but still allow remounting at a different point in time\n */\n public unmount() {\n if (this.editorView) {\n // Cleanup our reference to prevent circular references which caused memory leaks\n // @ts-ignore\n const dom = this.editorView.dom as TiptapEditorHTMLElement\n\n if (dom?.editor) {\n delete dom.editor\n }\n this.editorView.destroy()\n }\n this.editorView = null\n this.isInitialized = false\n\n // Safely remove CSS element with fallback for test environments\n // Only remove CSS if no other editors exist in the document after unmount\n if (this.css && !document.querySelectorAll(`.${this.className}`).length) {\n try {\n if (typeof this.css.remove === 'function') {\n this.css.remove()\n } else if (this.css.parentNode) {\n this.css.parentNode.removeChild(this.css)\n }\n } catch (error) {\n // Silently handle any unexpected DOM removal errors in test environments\n console.warn('Failed to remove CSS element:', error)\n }\n }\n this.css = null\n this.emit('unmount', { editor: this })\n }\n\n /**\n * Returns the editor storage.\n */\n public get storage(): Storage {\n return this.extensionStorage\n }\n\n /**\n * An object of all registered commands.\n */\n public get commands(): SingleCommands {\n return this.commandManager.commands\n }\n\n /**\n * Create a command chain to call multiple commands at once.\n */\n public chain(): ChainedCommands {\n return this.commandManager.chain()\n }\n\n /**\n * Check if a command or a command chain can be executed. Without executing it.\n */\n public can(): CanCommands {\n return this.commandManager.can()\n }\n\n /**\n * Inject CSS styles.\n */\n private injectCSS(): void {\n if (this.options.injectCSS && typeof document !== 'undefined') {\n this.css = createStyleTag(style, this.options.injectNonce)\n }\n }\n\n /**\n * Update editor options.\n *\n * @param options A list of options\n */\n public setOptions(options: Partial = {}): void {\n this.options = {\n ...this.options,\n ...options,\n }\n\n if (!this.editorView || !this.state || this.isDestroyed) {\n return\n }\n\n if (this.options.editorProps) {\n this.view.setProps(this.options.editorProps)\n }\n\n this.view.updateState(this.state)\n }\n\n /**\n * Update editable state of the editor.\n */\n public setEditable(editable: boolean, emitUpdate = true): void {\n this.setOptions({ editable })\n\n if (emitUpdate) {\n this.emit('update', { editor: this, transaction: this.state.tr, appendedTransactions: [] })\n }\n }\n\n /**\n * Returns whether the editor is editable.\n */\n public get isEditable(): boolean {\n // since plugins are applied after creating the view\n // `editable` is always `true` for one tick.\n // that’s why we also have to check for `options.editable`\n return this.options.editable && this.view && this.view.editable\n }\n\n /**\n * Returns the editor view.\n */\n public get view(): EditorView {\n if (this.editorView) {\n return this.editorView\n }\n\n return new Proxy(\n {\n state: this.editorState,\n updateState: (state: EditorState): ReturnType => {\n this.editorState = state\n },\n dispatch: (tr: Transaction): ReturnType => {\n this.dispatchTransaction(tr)\n },\n\n // Stub some commonly accessed properties to prevent errors\n composing: false,\n dragging: null,\n editable: true,\n isDestroyed: false,\n } as EditorView,\n {\n get: (obj, key) => {\n if (this.editorView) {\n // If the editor view is available, but the caller has a stale reference to the proxy,\n // Just return what the editor view has.\n return this.editorView[key as keyof EditorView]\n }\n // Specifically always return the most recent editorState\n if (key === 'state') {\n return this.editorState\n }\n if (key in obj) {\n return Reflect.get(obj, key)\n }\n\n // We throw an error here, because we know the view is not available\n throw new Error(\n `[tiptap error]: The editor view is not available. Cannot access view['${key as string}']. The editor may not be mounted yet.`,\n )\n },\n },\n ) as EditorView\n }\n\n /**\n * Returns the editor state.\n */\n public get state(): EditorState {\n if (this.editorView) {\n this.editorState = this.view.state\n }\n\n return this.editorState\n }\n\n /**\n * Register a ProseMirror plugin.\n *\n * @param plugin A ProseMirror plugin\n * @param handlePlugins Control how to merge the plugin into the existing plugins.\n * @returns The new editor state\n */\n public registerPlugin(\n plugin: Plugin,\n handlePlugins?: (newPlugin: Plugin, plugins: Plugin[]) => Plugin[],\n ): EditorState {\n const plugins = isFunction(handlePlugins)\n ? handlePlugins(plugin, [...this.state.plugins])\n : [...this.state.plugins, plugin]\n\n const state = this.state.reconfigure({ plugins })\n\n this.view.updateState(state)\n\n return state\n }\n\n /**\n * Unregister a ProseMirror plugin.\n *\n * @param nameOrPluginKeyToRemove The plugins name\n * @returns The new editor state or undefined if the editor is destroyed\n */\n public unregisterPlugin(\n nameOrPluginKeyToRemove: string | PluginKey | (string | PluginKey)[],\n ): EditorState | undefined {\n if (this.isDestroyed) {\n return undefined\n }\n\n const prevPlugins = this.state.plugins\n let plugins = prevPlugins\n\n ;([] as (string | PluginKey)[]).concat(nameOrPluginKeyToRemove).forEach(nameOrPluginKey => {\n // @ts-ignore\n const name = typeof nameOrPluginKey === 'string' ? `${nameOrPluginKey}$` : nameOrPluginKey.key\n\n // @ts-ignore\n plugins = plugins.filter(plugin => !plugin.key.startsWith(name))\n })\n\n if (prevPlugins.length === plugins.length) {\n // No plugin was removed, so we don’t need to update the state\n return undefined\n }\n\n const state = this.state.reconfigure({\n plugins,\n })\n\n this.view.updateState(state)\n\n return state\n }\n\n /**\n * Creates an extension manager.\n */\n private createExtensionManager(): void {\n const coreExtensions = this.options.enableCoreExtensions\n ? [\n Editable,\n ClipboardTextSerializer.configure({\n blockSeparator:\n this.options.coreExtensionOptions?.clipboardTextSerializer?.blockSeparator,\n }),\n Commands,\n FocusEvents,\n Keymap,\n Tabindex.configure({\n value: this.options.coreExtensionOptions?.tabindex?.value,\n }),\n Drop,\n Paste,\n Delete,\n TextDirection.configure({\n direction: this.options.textDirection,\n }),\n ].filter(ext => {\n if (typeof this.options.enableCoreExtensions === 'object') {\n return (\n this.options.enableCoreExtensions[\n ext.name as keyof typeof this.options.enableCoreExtensions\n ] !== false\n )\n }\n return true\n })\n : []\n const allExtensions = [...coreExtensions, ...this.options.extensions].filter(extension => {\n return ['extension', 'node', 'mark'].includes(extension?.type)\n })\n\n this.extensionManager = new ExtensionManager(allExtensions, this)\n }\n\n /**\n * Creates an command manager.\n */\n private createCommandManager(): void {\n this.commandManager = new CommandManager({\n editor: this,\n })\n }\n\n /**\n * Creates a ProseMirror schema.\n */\n private createSchema(): void {\n this.schema = this.extensionManager.schema\n }\n\n /**\n * Creates the initial document.\n */\n private createDoc(): ProseMirrorNode {\n let doc: ProseMirrorNode\n\n try {\n doc = createDocument(this.options.content, this.schema, this.options.parseOptions, {\n errorOnInvalidContent: this.options.enableContentCheck,\n })\n } catch (e) {\n if (\n !(e instanceof Error) ||\n !['[tiptap error]: Invalid JSON content', '[tiptap error]: Invalid HTML content'].includes(\n e.message,\n )\n ) {\n // Not the content error we were expecting\n throw e\n }\n this.emit('contentError', {\n editor: this,\n error: e as Error,\n disableCollaboration: () => {\n if (\n 'collaboration' in this.storage &&\n typeof this.storage.collaboration === 'object' &&\n this.storage.collaboration\n ) {\n ;(this.storage.collaboration as any).isDisabled = true\n }\n // To avoid syncing back invalid content, reinitialize the extensions without the collaboration extension\n this.options.extensions = this.options.extensions.filter(\n extension => extension.name !== 'collaboration',\n )\n\n // Restart the initialization process by recreating the extension manager with the new set of extensions\n this.createExtensionManager()\n },\n })\n\n // Content is invalid, but attempt to create it anyway, stripping out the invalid parts\n doc = createDocument(this.options.content, this.schema, this.options.parseOptions, {\n errorOnInvalidContent: false,\n })\n }\n return doc\n }\n\n /**\n * Creates a ProseMirror view.\n */\n private createView(element: NonNullable): void {\n const { editorProps, enableExtensionDispatchTransaction } = this.options\n // If a user provided a custom `dispatchTransaction` through `editorProps`,\n // we use that as the base dispatch function.\n // Otherwise, we use Tiptap's internal `dispatchTransaction` method.\n const baseDispatch =\n (editorProps as DirectEditorProps).dispatchTransaction || this.dispatchTransaction.bind(this)\n const dispatch = enableExtensionDispatchTransaction\n ? this.extensionManager.dispatchTransaction(baseDispatch)\n : baseDispatch\n\n // Compose transformPastedHTML from extensions and user-provided editorProps\n const baseTransformPastedHTML = (editorProps as DirectEditorProps).transformPastedHTML\n const transformPastedHTML = this.extensionManager.transformPastedHTML(baseTransformPastedHTML)\n\n this.editorView = new EditorView(element, {\n ...editorProps,\n attributes: {\n // add `role=\"textbox\"` to the editor element\n role: 'textbox',\n ...editorProps?.attributes,\n },\n dispatchTransaction: dispatch,\n transformPastedHTML,\n state: this.editorState,\n markViews: this.extensionManager.markViews,\n nodeViews: this.extensionManager.nodeViews,\n })\n\n // `editor.view` is not yet available at this time.\n // Therefore we will add all plugins and node views directly afterwards.\n const newState = this.state.reconfigure({\n plugins: this.extensionManager.plugins,\n })\n\n this.view.updateState(newState)\n\n this.prependClass()\n this.injectCSS()\n\n // Let’s store the editor instance in the DOM element.\n // So we’ll have access to it for tests.\n // @ts-ignore\n const dom = this.view.dom as TiptapEditorHTMLElement\n\n dom.editor = this\n }\n\n /**\n * Creates all node and mark views.\n */\n public createNodeViews(): void {\n if (this.view.isDestroyed) {\n return\n }\n\n this.view.setProps({\n markViews: this.extensionManager.markViews,\n nodeViews: this.extensionManager.nodeViews,\n })\n }\n\n /**\n * Prepend class name to element.\n */\n public prependClass(): void {\n this.view.dom.className = `${this.className} ${this.view.dom.className}`\n }\n\n public isCapturingTransaction = false\n\n private capturedTransaction: Transaction | null = null\n\n public captureTransaction(fn: () => void) {\n this.isCapturingTransaction = true\n fn()\n this.isCapturingTransaction = false\n\n const tr = this.capturedTransaction\n\n this.capturedTransaction = null\n\n return tr\n }\n\n /**\n * The callback over which to send transactions (state updates) produced by the view.\n *\n * @param transaction An editor state transaction\n */\n private dispatchTransaction(transaction: Transaction): void {\n // if the editor / the view of the editor was destroyed\n // the transaction should not be dispatched as there is no view anymore.\n if (this.view.isDestroyed) {\n return\n }\n\n if (this.isCapturingTransaction) {\n if (!this.capturedTransaction) {\n this.capturedTransaction = transaction\n\n return\n }\n\n transaction.steps.forEach(step => this.capturedTransaction?.step(step))\n\n return\n }\n\n // Apply transaction and get resulting state and transactions\n const { state, transactions } = this.state.applyTransaction(transaction)\n const selectionHasChanged = !this.state.selection.eq(state.selection)\n const rootTrWasApplied = transactions.includes(transaction)\n const prevState = this.state\n\n this.emit('beforeTransaction', {\n editor: this,\n transaction,\n nextState: state,\n })\n\n // If transaction was filtered out, we can return early\n if (!rootTrWasApplied) {\n return\n }\n\n this.view.updateState(state)\n\n // Emit transaction event with appended transactions info\n this.emit('transaction', {\n editor: this,\n transaction,\n appendedTransactions: transactions.slice(1),\n })\n\n if (selectionHasChanged) {\n this.emit('selectionUpdate', {\n editor: this,\n transaction,\n })\n }\n\n // Only emit the latest between focus and blur events\n const mostRecentFocusTr = transactions.findLast(tr => tr.getMeta('focus') || tr.getMeta('blur'))\n const focus = mostRecentFocusTr?.getMeta('focus')\n const blur = mostRecentFocusTr?.getMeta('blur')\n\n if (focus) {\n this.emit('focus', {\n editor: this,\n event: focus.event,\n // oxlint-disable-next-lineno-non-null-assertion\n transaction: mostRecentFocusTr!,\n })\n }\n\n if (blur) {\n this.emit('blur', {\n editor: this,\n event: blur.event,\n // oxlint-disable-next-lineno-non-null-assertion\n transaction: mostRecentFocusTr!,\n })\n }\n\n // Compare states for update event\n if (\n transaction.getMeta('preventUpdate') ||\n !transactions.some(tr => tr.docChanged) ||\n prevState.doc.eq(state.doc)\n ) {\n return\n }\n\n this.emit('update', {\n editor: this,\n transaction,\n appendedTransactions: transactions.slice(1),\n })\n }\n\n /**\n * Get attributes of the currently selected node or mark.\n */\n public getAttributes(nameOrType: string | NodeType | MarkType): Record {\n return getAttributes(this.state, nameOrType)\n }\n\n /**\n * Returns if the currently selected node or mark is active.\n *\n * @param name Name of the node or mark\n * @param attributes Attributes of the node or mark\n */\n public isActive(name: string, attributes?: {}): boolean\n public isActive(attributes: {}): boolean\n public isActive(nameOrAttributes: string, attributesOrUndefined?: {}): boolean {\n const name = typeof nameOrAttributes === 'string' ? nameOrAttributes : null\n\n const attributes =\n typeof nameOrAttributes === 'string' ? attributesOrUndefined : nameOrAttributes\n\n return isActive(this.state, name, attributes)\n }\n\n /**\n * Get the document as JSON.\n */\n public getJSON(): DocumentType<\n Record | undefined,\n TNodeType, any, (TNodeType | TTextType)[]>[]\n > {\n return this.state.doc.toJSON()\n }\n\n /**\n * Get the document as HTML.\n */\n public getHTML(): string {\n return getHTMLFromFragment(this.state.doc.content, this.schema)\n }\n\n /**\n * Get the document as text.\n */\n public getText(options?: {\n blockSeparator?: string\n textSerializers?: Record\n }): string {\n const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {}\n\n return getText(this.state.doc, {\n blockSeparator,\n textSerializers: {\n ...getTextSerializersFromSchema(this.schema),\n ...textSerializers,\n },\n })\n }\n\n /**\n * Check if there is no content.\n */\n public get isEmpty(): boolean {\n return isNodeEmpty(this.state.doc)\n }\n\n /**\n * Destroy the editor.\n */\n public destroy(): void {\n if (this.destroyed) {\n return\n }\n\n this.destroyed = true\n\n this.emit('destroy')\n\n this.unmount()\n\n this.removeAllListeners()\n\n this.extensionManager.destroy()\n this.extensionManager = null as any\n this.schema = null as any\n this.commandManager = null as any\n this.extensionStorage = {} as Storage\n }\n\n /**\n * Check if the editor is already destroyed.\n */\n public get isDestroyed(): boolean {\n return this.editorView?.isDestroyed ?? true\n }\n\n public $node(selector: string, attributes?: { [key: string]: any }): NodePos | null {\n return this.$doc?.querySelector(selector, attributes) || null\n }\n\n public $nodes(selector: string, attributes?: { [key: string]: any }): NodePos[] | null {\n return this.$doc?.querySelectorAll(selector, attributes) || null\n }\n\n public $pos(pos: number) {\n const $pos = this.state.doc.resolve(pos)\n // When the position sits directly before a non-text node (e.g. an image or\n // other atom), nodeAfter is that node but resolvedPos.node() would return\n // the parent (often the doc at depth 0). Pass nodeAfter as the explicit node\n // so NodePos.node returns the expected node instead of the parent.\n // Keep $pos(0) returning the doc node; for other positions, prefer nodeAfter\n // when it points at a non-text node.\n const node = pos > 0 && $pos.nodeAfter && !$pos.nodeAfter.isText ? $pos.nodeAfter : null\n\n return new NodePos($pos, this, false, node)\n }\n\n get $doc() {\n return this.$pos(0)\n }\n\n /**\n * Returns a set of utilities for working with positions and ranges.\n */\n public utils: Utils = {\n getUpdatedPosition,\n createMappablePosition,\n }\n}\n","type StringKeyOf = Extract\ntype CallbackType<\n T extends Record,\n EventName extends StringKeyOf,\n> = T[EventName] extends any[] ? T[EventName] : [T[EventName]]\ntype CallbackFunction, EventName extends StringKeyOf> = (\n ...props: CallbackType\n) => any\n\nexport class EventEmitter> {\n private callbacks: { [key: string]: Array<(...args: any[]) => void> } = {}\n\n public on>(\n event: EventName,\n fn: CallbackFunction,\n ): this {\n if (!this.callbacks[event]) {\n this.callbacks[event] = []\n }\n\n this.callbacks[event].push(fn)\n\n return this\n }\n\n public emit>(\n event: EventName,\n ...args: CallbackType\n ): this {\n const callbacks = this.callbacks[event]\n\n if (callbacks) {\n callbacks.forEach(callback => callback.apply(this, args))\n }\n\n return this\n }\n\n public off>(\n event: EventName,\n fn?: CallbackFunction,\n ): this {\n const callbacks = this.callbacks[event]\n\n if (callbacks) {\n if (fn) {\n this.callbacks[event] = callbacks.filter(callback => callback !== fn)\n } else {\n delete this.callbacks[event]\n }\n }\n\n return this\n }\n\n public once>(\n event: EventName,\n fn: CallbackFunction,\n ): this {\n const onceFn = (...args: CallbackType) => {\n this.off(event, onceFn)\n fn.apply(this, args)\n }\n\n return this.on(event, onceFn)\n }\n\n public removeAllListeners(): void {\n this.callbacks = {}\n }\n}\n","import { keymap } from '@tiptap/pm/keymap'\nimport type { Schema } from '@tiptap/pm/model'\nimport type { Plugin, Transaction } from '@tiptap/pm/state'\nimport type { EditorView, MarkViewConstructor, NodeViewConstructor } from '@tiptap/pm/view'\n\nimport type { Editor } from './Editor.js'\nimport {\n flattenExtensions,\n getAttributesFromExtensions,\n getExtensionField,\n getNodeType,\n getRenderedAttributes,\n getSchemaByResolvedExtensions,\n getSchemaTypeByName,\n isExtensionRulesEnabled,\n resolveExtensions,\n sortExtensions,\n splitExtensions,\n} from './helpers/index.js'\nimport {\n type MarkConfig,\n type NodeConfig,\n type Storage,\n getMarkType,\n updateMarkViewAttributes,\n} from './index.js'\nimport { inputRulesPlugin } from './InputRule.js'\nimport { Mark } from './Mark.js'\nimport { pasteRulesPlugin } from './PasteRule.js'\nimport type { AnyConfig, Extensions, RawCommands } from './types.js'\nimport { callOrReturn } from './utilities/callOrReturn.js'\n\nexport class ExtensionManager {\n editor: Editor\n\n schema: Schema\n\n /**\n * A flattened and sorted array of all extensions\n */\n extensions: Extensions\n\n /**\n * A non-flattened array of base extensions (no sub-extensions)\n */\n baseExtensions: Extensions\n\n splittableMarks: string[] = []\n\n nonClearableMarks: string[] = []\n\n constructor(extensions: Extensions, editor: Editor) {\n this.editor = editor\n this.baseExtensions = extensions\n this.extensions = resolveExtensions(extensions)\n this.schema = getSchemaByResolvedExtensions(this.extensions, editor)\n this.setupExtensions()\n }\n\n static resolve = resolveExtensions\n\n static sort = sortExtensions\n\n static flatten = flattenExtensions\n\n /**\n * Get all commands from the extensions.\n * @returns An object with all commands where the key is the command name and the value is the command function\n */\n get commands(): RawCommands {\n return this.extensions.reduce((commands, extension) => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor: this.editor,\n type: getSchemaTypeByName(extension.name, this.schema),\n }\n\n const addCommands = getExtensionField(\n extension,\n 'addCommands',\n context,\n )\n\n if (!addCommands) {\n return commands\n }\n\n return {\n ...commands,\n ...addCommands(),\n }\n }, {} as RawCommands)\n }\n\n /**\n * Get all registered Prosemirror plugins from the extensions.\n * @returns An array of Prosemirror plugins\n */\n get plugins(): Plugin[] {\n const { editor } = this\n\n // With ProseMirror, first plugins within an array are executed first.\n // In Tiptap, we provide the ability to override plugins,\n // so it feels more natural to run plugins at the end of an array first.\n // That’s why we have to reverse the `extensions` array and sort again\n // based on the `priority` option.\n const extensions = sortExtensions([...this.extensions].reverse())\n\n const allPlugins = extensions.flatMap(extension => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor,\n type: getSchemaTypeByName(extension.name, this.schema),\n }\n\n const plugins: Plugin[] = []\n\n const addKeyboardShortcuts = getExtensionField(\n extension,\n 'addKeyboardShortcuts',\n context,\n )\n\n let defaultBindings: Record boolean> = {}\n\n // bind exit handling\n if (\n extension.type === 'mark' &&\n getExtensionField(extension, 'exitable', context)\n ) {\n defaultBindings.ArrowRight = () => Mark.handleExit({ editor, mark: extension as Mark })\n }\n\n if (addKeyboardShortcuts) {\n const bindings = Object.fromEntries(\n Object.entries(addKeyboardShortcuts()).map(([shortcut, method]) => {\n return [shortcut, () => method({ editor })]\n }),\n )\n\n defaultBindings = { ...defaultBindings, ...bindings }\n }\n\n const keyMapPlugin = keymap(defaultBindings)\n\n plugins.push(keyMapPlugin)\n\n const addInputRules = getExtensionField(\n extension,\n 'addInputRules',\n context,\n )\n\n if (isExtensionRulesEnabled(extension, editor.options.enableInputRules) && addInputRules) {\n const rules = addInputRules()\n\n if (rules && rules.length) {\n const inputResult = inputRulesPlugin({\n editor,\n rules,\n })\n\n const inputPlugins = Array.isArray(inputResult) ? inputResult : [inputResult]\n\n plugins.push(...inputPlugins)\n }\n }\n\n const addPasteRules = getExtensionField(\n extension,\n 'addPasteRules',\n context,\n )\n\n if (isExtensionRulesEnabled(extension, editor.options.enablePasteRules) && addPasteRules) {\n const rules = addPasteRules()\n\n if (rules && rules.length) {\n const pasteRules = pasteRulesPlugin({ editor, rules })\n\n plugins.push(...pasteRules)\n }\n }\n\n const addProseMirrorPlugins = getExtensionField(\n extension,\n 'addProseMirrorPlugins',\n context,\n )\n\n if (addProseMirrorPlugins) {\n const proseMirrorPlugins = addProseMirrorPlugins()\n\n plugins.push(...proseMirrorPlugins)\n }\n\n return plugins\n })\n\n return allPlugins\n }\n\n /**\n * Get all attributes from the extensions.\n * @returns An array of attributes\n */\n get attributes() {\n return getAttributesFromExtensions(this.extensions)\n }\n\n /**\n * Get all node views from the extensions.\n * @returns An object with all node views where the key is the node name and the value is the node view function\n */\n get nodeViews(): Record {\n const { editor } = this\n const { nodeExtensions } = splitExtensions(this.extensions)\n\n return Object.fromEntries(\n nodeExtensions\n .filter(extension => !!getExtensionField(extension, 'addNodeView'))\n .map(extension => {\n const extensionAttributes = this.attributes.filter(\n attribute => attribute.type === extension.name,\n )\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor,\n type: getNodeType(extension.name, this.schema),\n }\n const addNodeView = getExtensionField(\n extension,\n 'addNodeView',\n context,\n )\n\n if (!addNodeView) {\n return []\n }\n\n const nodeViewResult = addNodeView()\n\n if (!nodeViewResult) {\n return []\n }\n\n const nodeview: NodeViewConstructor = (\n node,\n view,\n getPos,\n decorations,\n innerDecorations,\n ) => {\n const HTMLAttributes = getRenderedAttributes(node, extensionAttributes)\n\n return nodeViewResult({\n // pass-through\n node,\n view,\n getPos: getPos as () => number,\n decorations,\n innerDecorations,\n // tiptap-specific\n editor,\n extension,\n HTMLAttributes,\n })\n }\n\n return [extension.name, nodeview]\n }),\n )\n }\n\n /**\n * Get the composed dispatchTransaction function from all extensions.\n * @param baseDispatch The base dispatch function (e.g. from the editor or user props)\n * @returns A composed dispatch function\n */\n dispatchTransaction(baseDispatch: (tr: Transaction) => void): (tr: Transaction) => void {\n const { editor } = this\n const extensions = sortExtensions([...this.extensions].reverse())\n\n return extensions.reduceRight((next, extension) => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor,\n type: getSchemaTypeByName(extension.name, this.schema),\n }\n\n const dispatchTransaction = getExtensionField(\n extension,\n 'dispatchTransaction',\n context,\n )\n\n if (!dispatchTransaction) {\n return next\n }\n\n return (transaction: Transaction) => {\n dispatchTransaction.call(context, { transaction, next })\n }\n }, baseDispatch)\n }\n\n /**\n * Get the composed transformPastedHTML function from all extensions.\n * @param baseTransform The base transform function (e.g. from the editor props)\n * @returns A composed transform function that chains all extension transforms\n */\n transformPastedHTML(\n baseTransform?: (html: string, view?: any) => string,\n ): (html: string, view?: EditorView) => string {\n const { editor } = this\n const extensions = sortExtensions([...this.extensions])\n\n return extensions.reduce(\n (transform, extension) => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor,\n type: getSchemaTypeByName(extension.name, this.schema),\n }\n\n const extensionTransform = getExtensionField(\n extension,\n 'transformPastedHTML',\n context,\n )\n\n if (!extensionTransform) {\n return transform\n }\n\n return (html: string, view?: any) => {\n // Chain the transforms: pass the result of the previous transform to the next\n const transformedHtml = transform(html, view)\n return extensionTransform.call(context, transformedHtml)\n }\n },\n baseTransform || ((html: string) => html),\n )\n }\n\n get markViews(): Record {\n const { editor } = this\n const { markExtensions } = splitExtensions(this.extensions)\n\n return Object.fromEntries(\n markExtensions\n .filter(extension => !!getExtensionField(extension, 'addMarkView'))\n .map(extension => {\n const extensionAttributes = this.attributes.filter(\n attribute => attribute.type === extension.name,\n )\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor,\n type: getMarkType(extension.name, this.schema),\n }\n const addMarkView = getExtensionField(\n extension,\n 'addMarkView',\n context,\n )\n\n if (!addMarkView) {\n return []\n }\n\n const markView: MarkViewConstructor = (mark, view, inline) => {\n const HTMLAttributes = getRenderedAttributes(mark, extensionAttributes)\n\n return addMarkView()({\n // pass-through\n mark,\n view,\n inline,\n // tiptap-specific\n editor,\n extension,\n HTMLAttributes,\n updateAttributes: (attrs: Record) => {\n updateMarkViewAttributes(mark, editor, attrs)\n },\n })\n }\n\n return [extension.name, markView]\n }),\n )\n }\n\n /**\n * Destroy the extension manager and clean up all extension references\n * to prevent memory leaks through parent/child extension chains.\n *\n * Walks each extension's full parent chain and nulls every forward\n * `parent.child → current` link where the parent still points to the\n * current node. This breaks the retention path from module-scope\n * singleton roots through deep extend() chains.\n *\n * Only ancestor `.child` links matching the current chain are cleared.\n * The `.parent` pointer on ancestors is never touched — extensions\n * may be shared across live editors, so their own backward references\n * and non-matching forward links must remain intact.\n */\n destroy() {\n this.extensions.forEach(extension => {\n let current: any = extension\n\n while (current.parent) {\n const parent = current.parent\n\n if (parent.child === current) {\n parent.child = null\n }\n\n current = parent\n }\n })\n\n this.extensions = []\n this.baseExtensions = []\n this.schema = null as any\n this.editor = null as any\n }\n\n /**\n * Go through all extensions, create extension storages & setup marks\n * & bind editor event listener.\n */\n private setupExtensions() {\n const extensions = this.extensions\n // re-initialize the extension storage object instance\n this.editor.extensionStorage = Object.fromEntries(\n extensions.map(extension => [extension.name, extension.storage]),\n ) as unknown as Storage\n\n extensions.forEach(extension => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor: this.editor,\n type: getSchemaTypeByName(extension.name, this.schema),\n }\n\n if (extension.type === 'mark') {\n const keepOnSplit =\n callOrReturn(getExtensionField(extension, 'keepOnSplit', context)) ?? true\n\n if (keepOnSplit) {\n this.splittableMarks.push(extension.name)\n }\n\n const clearable =\n callOrReturn(\n getExtensionField(extension, 'clearable', context),\n ) ?? true\n\n if (!clearable) {\n this.nonClearableMarks.push(extension.name)\n }\n }\n\n const onBeforeCreate = getExtensionField(\n extension,\n 'onBeforeCreate',\n context,\n )\n const onCreate = getExtensionField(extension, 'onCreate', context)\n const onUpdate = getExtensionField(extension, 'onUpdate', context)\n const onSelectionUpdate = getExtensionField(\n extension,\n 'onSelectionUpdate',\n context,\n )\n const onTransaction = getExtensionField(\n extension,\n 'onTransaction',\n context,\n )\n const onFocus = getExtensionField(extension, 'onFocus', context)\n const onBlur = getExtensionField(extension, 'onBlur', context)\n const onDestroy = getExtensionField(extension, 'onDestroy', context)\n\n if (onBeforeCreate) {\n this.editor.on('beforeCreate', onBeforeCreate)\n }\n\n if (onCreate) {\n this.editor.on('create', onCreate)\n }\n\n if (onUpdate) {\n this.editor.on('update', onUpdate)\n }\n\n if (onSelectionUpdate) {\n this.editor.on('selectionUpdate', onSelectionUpdate)\n }\n\n if (onTransaction) {\n this.editor.on('transaction', onTransaction)\n }\n\n if (onFocus) {\n this.editor.on('focus', onFocus)\n }\n\n if (onBlur) {\n this.editor.on('blur', onBlur)\n }\n\n if (onDestroy) {\n this.editor.on('destroy', onDestroy)\n }\n })\n }\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Fragment } from '@tiptap/pm/model'\nimport type { EditorState, TextSelection } from '@tiptap/pm/state'\nimport { Plugin } from '@tiptap/pm/state'\n\nimport { CommandManager } from './CommandManager.js'\nimport type { Editor } from './Editor.js'\nimport { createChainableState } from './helpers/createChainableState.js'\nimport { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js'\nimport { getTextContentFromNodes } from './helpers/getTextContentFromNodes.js'\nimport type {\n CanCommands,\n ChainedCommands,\n ExtendedRegExpMatchArray,\n Range,\n SingleCommands,\n} from './types.js'\nimport { isRegExp } from './utilities/isRegExp.js'\n\nexport type InputRuleMatch = {\n index: number\n text: string\n replaceWith?: string\n match?: RegExpMatchArray\n data?: Record\n}\n\nexport type InputRuleFinder = RegExp | ((text: string) => InputRuleMatch | null)\n\nexport class InputRule {\n find: InputRuleFinder\n\n handler: (props: {\n state: EditorState\n range: Range\n match: ExtendedRegExpMatchArray\n commands: SingleCommands\n chain: () => ChainedCommands\n can: () => CanCommands\n }) => void | null\n\n undoable: boolean\n\n constructor(config: {\n find: InputRuleFinder\n handler: (props: {\n state: EditorState\n range: Range\n match: ExtendedRegExpMatchArray\n commands: SingleCommands\n chain: () => ChainedCommands\n can: () => CanCommands\n }) => void | null\n undoable?: boolean\n }) {\n this.find = config.find\n this.handler = config.handler\n this.undoable = config.undoable ?? true\n }\n}\n\nconst inputRuleMatcherHandler = (\n text: string,\n find: InputRuleFinder,\n): ExtendedRegExpMatchArray | null => {\n if (isRegExp(find)) {\n return find.exec(text)\n }\n\n const inputRuleMatch = find(text)\n\n if (!inputRuleMatch) {\n return null\n }\n\n const result: ExtendedRegExpMatchArray = [inputRuleMatch.text]\n\n result.index = inputRuleMatch.index\n result.input = text\n result.data = inputRuleMatch.data\n\n if (inputRuleMatch.replaceWith) {\n if (!inputRuleMatch.text.includes(inputRuleMatch.replaceWith)) {\n console.warn(\n '[tiptap warn]: \"inputRuleMatch.replaceWith\" must be part of \"inputRuleMatch.text\".',\n )\n }\n\n result.push(inputRuleMatch.replaceWith)\n }\n\n return result\n}\n\nfunction run(config: {\n editor: Editor\n from: number\n to: number\n text: string\n rules: InputRule[]\n plugin: Plugin\n}): boolean {\n const { editor, from, to, text, rules, plugin } = config\n const { view } = editor\n\n if (view.composing) {\n return false\n }\n\n const $from = view.state.doc.resolve(from)\n\n if (\n // check for code node\n $from.parent.type.spec.code ||\n // check for code mark\n !!($from.nodeBefore || $from.nodeAfter)?.marks.find(mark => mark.type.spec.code)\n ) {\n return false\n }\n\n let matched = false\n\n const textBefore = getTextContentFromNodes($from) + text\n\n rules.forEach(rule => {\n if (matched) {\n return\n }\n\n const match = inputRuleMatcherHandler(textBefore, rule.find)\n\n if (!match) {\n return\n }\n\n const tr = view.state.tr\n const state = createChainableState({\n state: view.state,\n transaction: tr,\n })\n const range = {\n from: from - (match[0].length - text.length),\n to,\n }\n\n const { commands, chain, can } = new CommandManager({\n editor,\n state,\n })\n\n const handler = rule.handler({\n state,\n range,\n match,\n commands,\n chain,\n can,\n })\n\n // stop if there are no changes\n if (handler === null || !tr.steps.length) {\n return\n }\n\n // store transform as meta data\n // so we can undo input rules within the `undoInputRules` command\n if (rule.undoable) {\n tr.setMeta(plugin, {\n transform: tr,\n from,\n to,\n text,\n })\n }\n\n view.dispatch(tr)\n matched = true\n })\n\n return matched\n}\n\n/**\n * Create an input rules plugin. When enabled, it will cause text\n * input that matches any of the given rules to trigger the rule’s\n * action.\n */\nexport function inputRulesPlugin(props: { editor: Editor; rules: InputRule[] }): Plugin {\n const { editor, rules } = props\n const plugin = new Plugin({\n state: {\n init() {\n return null\n },\n apply(tr, prev, state) {\n const stored = tr.getMeta(plugin)\n\n if (stored) {\n return stored\n }\n\n // if InputRule is triggered by insertContent()\n const simulatedInputMeta = tr.getMeta('applyInputRules') as\n | undefined\n | {\n from: number\n text: string | ProseMirrorNode | Fragment\n }\n const isSimulatedInput = !!simulatedInputMeta\n\n if (isSimulatedInput) {\n setTimeout(() => {\n let { text } = simulatedInputMeta\n\n if (typeof text === 'string') {\n text = text as string\n } else {\n text = getHTMLFromFragment(Fragment.from(text), state.schema)\n }\n\n const { from } = simulatedInputMeta\n const to = from + text.length\n\n run({\n editor,\n from,\n to,\n text,\n rules,\n plugin,\n })\n })\n }\n\n return tr.selectionSet || tr.docChanged ? null : prev\n },\n },\n\n props: {\n handleTextInput(view, from, to, text) {\n return run({\n editor,\n from,\n to,\n text,\n rules,\n plugin,\n })\n },\n\n handleDOMEvents: {\n compositionend: view => {\n setTimeout(() => {\n const { $cursor } = view.state.selection as TextSelection\n\n if ($cursor) {\n run({\n editor,\n from: $cursor.pos,\n to: $cursor.pos,\n text: '',\n rules,\n plugin,\n })\n }\n })\n\n return false\n },\n },\n\n // add support for input rules to trigger on enter\n // this is useful for example for code blocks\n handleKeyDown(view, event) {\n if (event.key !== 'Enter') {\n return false\n }\n\n const { $cursor } = view.state.selection as TextSelection\n\n if ($cursor) {\n return run({\n editor,\n from: $cursor.pos,\n to: $cursor.pos,\n text: '\\n',\n rules,\n plugin,\n })\n }\n\n return false\n },\n },\n\n // @ts-ignore\n isInputRules: true,\n }) as Plugin\n\n return plugin\n}\n","// see: https://github.com/mesqueeb/is-what/blob/88d6e4ca92fb2baab6003c54e02eedf4e729e5ab/src/index.ts\n\nfunction getType(value: any): string {\n return Object.prototype.toString.call(value).slice(8, -1)\n}\n\nexport function isPlainObject(value: any): value is Record {\n if (getType(value) !== 'Object') {\n return false\n }\n\n return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype\n}\n","import { isPlainObject } from './isPlainObject.js'\n\nexport function mergeDeep(\n target: Record,\n source: Record,\n): Record {\n const output = { ...target }\n\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n if (isPlainObject(source[key]) && isPlainObject(target[key])) {\n output[key] = mergeDeep(target[key], source[key])\n } else {\n output[key] = source[key]\n }\n })\n }\n\n return output\n}\n","import type { Plugin } from '@tiptap/pm/state'\n\nimport type { Editor } from './Editor.js'\nimport { getExtensionField } from './helpers/getExtensionField.js'\nimport type { ExtensionConfig, MarkConfig, NodeConfig } from './index.js'\nimport type { InputRule } from './InputRule.js'\nimport type { Mark } from './Mark.js'\nimport type { Node } from './Node.js'\nimport type { PasteRule } from './PasteRule.js'\nimport type {\n AnyConfig,\n DispatchTransactionProps,\n EditorEvents,\n Extensions,\n GlobalAttributes,\n JSONContent,\n KeyboardShortcutCommand,\n MarkdownParseHelpers,\n MarkdownParseResult,\n MarkdownRendererHelpers,\n MarkdownToken,\n MarkdownTokenizer,\n ParentConfig,\n RawCommands,\n RenderContext,\n} from './types.js'\nimport { callOrReturn } from './utilities/callOrReturn.js'\nimport { mergeDeep } from './utilities/mergeDeep.js'\n\nexport interface ExtendableConfig<\n Options = any,\n Storage = any,\n Config extends\n | ExtensionConfig\n | NodeConfig\n | MarkConfig\n | ExtendableConfig = ExtendableConfig,\n PMType = any,\n> {\n /**\n * The extension name - this must be unique.\n * It will be used to identify the extension.\n *\n * @example 'myExtension'\n */\n name: string\n\n /**\n * The priority of your extension. The higher, the earlier it will be called\n * and will take precedence over other extensions with a lower priority.\n * @default 100\n * @example 101\n */\n priority?: number\n\n /**\n * This method will add options to this extension\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#settings\n * @example\n * addOptions() {\n * return {\n * myOption: 'foo',\n * myOtherOption: 10,\n * }\n */\n addOptions?: (this: { name: string; parent: ParentConfig['addOptions'] }) => Options\n\n /**\n * The default storage this extension can save data to.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#storage\n * @example\n * defaultStorage: {\n * prefetchedUsers: [],\n * loading: false,\n * }\n */\n addStorage?: (this: {\n name: string\n options: Options\n parent: ParentConfig['addStorage']\n }) => Storage\n\n /**\n * This function adds globalAttributes to specific nodes.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#global-attributes\n * @example\n * addGlobalAttributes() {\n * return [\n * {\n // Extend the following extensions\n * types: [\n * 'heading',\n * 'paragraph',\n * ],\n * // … with those attributes\n * attributes: {\n * textAlign: {\n * default: 'left',\n * renderHTML: attributes => ({\n * style: `text-align: ${attributes.textAlign}`,\n * }),\n * parseHTML: element => element.style.textAlign || 'left',\n * },\n * },\n * },\n * ]\n * }\n */\n addGlobalAttributes?: (this: {\n name: string\n options: Options\n storage: Storage\n extensions: (Node | Mark)[]\n parent: ParentConfig['addGlobalAttributes']\n }) => GlobalAttributes\n\n /**\n * This function adds commands to the editor\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#commands\n * @example\n * addCommands() {\n * return {\n * myCommand: () => ({ chain }) => chain().setMark('type', 'foo').run(),\n * }\n * }\n */\n addCommands?: (this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['addCommands']\n }) => Partial\n\n /**\n * This function registers keyboard shortcuts.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#keyboard-shortcuts\n * @example\n * addKeyboardShortcuts() {\n * return {\n * 'Mod-l': () => this.editor.commands.toggleBulletList(),\n * }\n * },\n */\n addKeyboardShortcuts?: (this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['addKeyboardShortcuts']\n }) => {\n [key: string]: KeyboardShortcutCommand\n }\n\n /**\n * This function adds input rules to the editor.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#input-rules\n * @example\n * addInputRules() {\n * return [\n * markInputRule({\n * find: inputRegex,\n * type: this.type,\n * }),\n * ]\n * },\n */\n addInputRules?: (this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['addInputRules']\n }) => InputRule[]\n\n /**\n * This function adds paste rules to the editor.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#paste-rules\n * @example\n * addPasteRules() {\n * return [\n * markPasteRule({\n * find: pasteRegex,\n * type: this.type,\n * }),\n * ]\n * },\n */\n addPasteRules?: (this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['addPasteRules']\n }) => PasteRule[]\n\n /**\n * This function adds Prosemirror plugins to the editor\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#prosemirror-plugins\n * @example\n * addProseMirrorPlugins() {\n * return [\n * customPlugin(),\n * ]\n * }\n */\n addProseMirrorPlugins?: (this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['addProseMirrorPlugins']\n }) => Plugin[]\n\n /**\n * This function transforms pasted HTML content before it's parsed.\n * Extensions can use this to modify or clean up pasted HTML.\n * The transformations are chained - each extension's transform receives\n * the output from the previous extension's transform.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#transform-pasted-html\n * @example\n * transformPastedHTML(html) {\n * // Remove all style attributes\n * return html.replace(/style=\"[^\"]*\"/g, '')\n * }\n */\n transformPastedHTML?: (\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['transformPastedHTML']\n },\n html: string,\n ) => string\n\n /**\n * This function adds additional extensions to the editor. This is useful for\n * building extension kits.\n * @example\n * addExtensions() {\n * return [\n * BulletList,\n * OrderedList,\n * ListItem\n * ]\n * }\n */\n addExtensions?: (this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig['addExtensions']\n }) => Extensions\n\n /**\n * The markdown token name\n *\n * This is the name of the token that this extension uses to parse and render markdown and comes from the Marked Lexer.\n *\n * @see https://github.com/markedjs/marked/blob/master/src/Tokens.ts\n *\n */\n markdownTokenName?: string\n\n /**\n * The parse function used by the markdown parser to convert markdown tokens to ProseMirror nodes.\n */\n parseMarkdown?: (token: MarkdownToken, helpers: MarkdownParseHelpers) => MarkdownParseResult\n\n /**\n * The serializer function used by the markdown serializer to convert ProseMirror nodes to markdown tokens.\n */\n renderMarkdown?: (\n node: JSONContent,\n helpers: MarkdownRendererHelpers,\n ctx: RenderContext,\n ) => string\n\n /**\n * The markdown tokenizer responsible for turning a markdown string into tokens\n *\n * Custom tokenizers are only needed when you want to parse non-standard markdown token.\n */\n markdownTokenizer?: MarkdownTokenizer\n\n /**\n * Optional markdown options for indentation\n */\n markdownOptions?: {\n /**\n * Defines if this markdown element should indent it's child elements\n */\n indentsContent?: boolean\n\n /**\n * Lets a mark tell the Markdown serializer which inline HTML tags it can\n * safely use when plain markdown delimiters would become ambiguous.\n *\n * This is mainly useful for overlapping marks. For example, bold followed\n * by bold+italic followed by italic cannot always be written back with only\n * `*` and `**` in a way that still parses correctly. In that case, the\n * serializer can close the overlapping section with markdown and reopen the\n * remaining tail with HTML instead.\n *\n * Example:\n * - desired formatting: `**123` + `*456*` + `789 italic`\n * - serialized result: `**123*456***789`\n *\n * If your extension defines custom mark names, set `htmlReopen` on that\n * extension so the serializer can reuse its HTML form for overlap cases.\n */\n htmlReopen?: {\n open: string\n close: string\n }\n }\n\n /**\n * This function extends the schema of the node.\n * @example\n * extendNodeSchema() {\n * return {\n * group: 'inline',\n * selectable: false,\n * }\n * }\n */\n extendNodeSchema?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig['extendNodeSchema']\n },\n extension: Node,\n ) => Record)\n | null\n\n /**\n * This function extends the schema of the mark.\n * @example\n * extendMarkSchema() {\n * return {\n * group: 'inline',\n * selectable: false,\n * }\n * }\n */\n extendMarkSchema?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig['extendMarkSchema']\n },\n extension: Mark,\n ) => Record)\n | null\n\n /**\n * The editor is not ready yet.\n */\n onBeforeCreate?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onBeforeCreate']\n },\n event: EditorEvents['beforeCreate'],\n ) => void)\n | null\n\n /**\n * The editor is ready.\n */\n onCreate?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onCreate']\n },\n event: EditorEvents['create'],\n ) => void)\n | null\n\n /**\n * The content has changed.\n */\n onUpdate?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onUpdate']\n },\n event: EditorEvents['update'],\n ) => void)\n | null\n\n /**\n * The selection has changed.\n */\n onSelectionUpdate?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onSelectionUpdate']\n },\n event: EditorEvents['selectionUpdate'],\n ) => void)\n | null\n\n /**\n * The editor state has changed.\n */\n onTransaction?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onTransaction']\n },\n event: EditorEvents['transaction'],\n ) => void)\n | null\n\n /**\n * The editor is focused.\n */\n onFocus?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onFocus']\n },\n event: EditorEvents['focus'],\n ) => void)\n | null\n\n /**\n * The editor isn’t focused anymore.\n */\n onBlur?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onBlur']\n },\n event: EditorEvents['blur'],\n ) => void)\n | null\n\n /**\n * The editor is destroyed.\n */\n onDestroy?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onDestroy']\n },\n event: EditorEvents['destroy'],\n ) => void)\n | null\n\n /**\n * This hook allows you to intercept and modify transactions before they are dispatched.\n *\n * Example\n * ```ts\n * dispatchTransaction({ transaction, next }) {\n * console.log('Dispatching transaction:', transaction)\n * next(transaction)\n * }\n * ```\n *\n * @param props - The dispatch transaction props\n */\n dispatchTransaction?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['dispatchTransaction']\n },\n props: DispatchTransactionProps,\n ) => void)\n | null\n}\n\nexport class Extendable<\n Options = any,\n Storage = any,\n Config =\n | ExtensionConfig\n | NodeConfig\n | MarkConfig,\n> {\n type = 'extendable'\n parent: Extendable | null = null\n\n child: Extendable | null = null\n\n name = ''\n\n config: Config = {\n name: this.name,\n } as Config\n\n constructor(config: Partial = {}) {\n this.config = {\n ...this.config,\n ...config,\n }\n\n this.name = (this.config as any).name\n }\n\n get options(): Options {\n return {\n ...callOrReturn(\n getExtensionField(this as any, 'addOptions', {\n name: this.name,\n }),\n ),\n }\n }\n\n get storage(): Readonly {\n return {\n ...callOrReturn(\n getExtensionField(this as any, 'addStorage', {\n name: this.name,\n options: this.options,\n }),\n ),\n }\n }\n\n configure(options: Partial = {}) {\n const extension = this.extend({\n ...this.config,\n addOptions: () => {\n return mergeDeep(this.options as Record, options) as Options\n },\n })\n\n extension.name = this.name\n extension.parent = this.parent\n\n this.child = null\n\n return extension\n }\n\n extend<\n ExtendedOptions = Options,\n ExtendedStorage = Storage,\n ExtendedConfig =\n | ExtensionConfig\n | NodeConfig\n | MarkConfig,\n >(extendedConfig: Partial = {}): Extendable {\n const extension = new (this.constructor as any)({ ...this.config, ...extendedConfig })\n\n extension.parent = this\n this.child = extension\n extension.name = 'name' in extendedConfig ? extendedConfig.name : extension.parent.name\n\n return extension\n }\n}\n","import type { DOMOutputSpec, Mark as ProseMirrorMark, MarkSpec, MarkType } from '@tiptap/pm/model'\n\nimport type { Editor } from './Editor.js'\nimport type { ExtendableConfig } from './Extendable.js'\nimport { Extendable } from './Extendable.js'\nimport type { Attributes, MarkViewRenderer, ParentConfig } from './types.js'\n\nexport interface MarkConfig extends ExtendableConfig<\n Options,\n Storage,\n MarkConfig,\n MarkType\n> {\n /**\n * Mark View\n */\n addMarkView?:\n | ((this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: MarkType\n parent: ParentConfig>['addMarkView']\n }) => MarkViewRenderer)\n | null\n\n /**\n * Keep mark after split node\n */\n keepOnSplit?: boolean | (() => boolean)\n\n /**\n * Whether this mark is removed by `unsetAllMarks`.\n * Set to `false` for semantic marks (comments, suggestions) that should survive \"clear formatting\".\n * @default true\n */\n clearable?: boolean | (() => boolean)\n\n /**\n * Inclusive\n */\n inclusive?:\n | MarkSpec['inclusive']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['inclusive']\n editor?: Editor\n }) => MarkSpec['inclusive'])\n\n /**\n * Excludes\n */\n excludes?:\n | MarkSpec['excludes']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['excludes']\n editor?: Editor\n }) => MarkSpec['excludes'])\n\n /**\n * Marks this Mark as exitable\n */\n exitable?: boolean | (() => boolean)\n\n /**\n * Group\n */\n group?:\n | MarkSpec['group']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['group']\n editor?: Editor\n }) => MarkSpec['group'])\n\n /**\n * Spanning\n */\n spanning?:\n | MarkSpec['spanning']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['spanning']\n editor?: Editor\n }) => MarkSpec['spanning'])\n\n /**\n * Code\n */\n code?:\n | boolean\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['code']\n editor?: Editor\n }) => boolean)\n\n /**\n * Parse HTML\n */\n parseHTML?: (this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['parseHTML']\n editor?: Editor\n }) => MarkSpec['parseDOM']\n\n /**\n * Render HTML\n */\n renderHTML?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['renderHTML']\n editor?: Editor\n },\n props: {\n mark: ProseMirrorMark\n HTMLAttributes: Record\n },\n ) => DOMOutputSpec)\n | null\n\n /**\n * Attributes\n */\n addAttributes?: (this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['addAttributes']\n editor?: Editor\n // oxlint-disable-next-lineno-empty-object-type\n }) => Attributes | {}\n}\n\n/**\n * The Mark class is used to create custom mark extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nexport class Mark extends Extendable<\n Options,\n Storage,\n MarkConfig\n> {\n type = 'mark'\n\n /**\n * Create a new Mark instance\n * @param config - Mark configuration object or a function that returns a configuration object\n */\n static create(\n config: Partial> | (() => Partial>) = {},\n ) {\n // If the config is a function, execute it to get the configuration object\n const resolvedConfig = typeof config === 'function' ? config() : config\n return new Mark(resolvedConfig)\n }\n\n static handleExit({ editor, mark }: { editor: Editor; mark: Mark }) {\n const { tr } = editor.state\n const currentPos = editor.state.selection.$from\n const isAtEnd = currentPos.pos === currentPos.end()\n\n if (isAtEnd) {\n const currentMarks = currentPos.marks()\n const isInMark = !!currentMarks.find(m => m?.type.name === mark.name)\n\n if (!isInMark) {\n return false\n }\n\n const removeMark = currentMarks.find(m => m?.type.name === mark.name)\n\n if (removeMark) {\n tr.removeStoredMark(removeMark)\n }\n tr.insertText(' ', currentPos.pos)\n\n editor.view.dispatch(tr)\n\n return true\n }\n\n return false\n }\n\n configure(options?: Partial) {\n return super.configure(options) as Mark\n }\n\n extend<\n ExtendedOptions = Options,\n ExtendedStorage = Storage,\n ExtendedConfig extends MarkConfig = MarkConfig<\n ExtendedOptions,\n ExtendedStorage\n >,\n >(\n extendedConfig?:\n | (() => Partial)\n | (Partial &\n ThisType<{\n name: string\n options: ExtendedOptions\n storage: ExtendedStorage\n editor: Editor\n type: MarkType\n }>),\n ): Mark {\n // If the extended config is a function, execute it to get the configuration object\n const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig\n return super.extend(resolvedConfig) as Mark\n }\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Fragment } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\nimport { Plugin } from '@tiptap/pm/state'\n\nimport { CommandManager } from './CommandManager.js'\nimport type { Editor } from './Editor.js'\nimport { createChainableState } from './helpers/createChainableState.js'\nimport { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js'\nimport type {\n CanCommands,\n ChainedCommands,\n ExtendedRegExpMatchArray,\n Range,\n SingleCommands,\n} from './types.js'\nimport { isNumber } from './utilities/isNumber.js'\nimport { isRegExp } from './utilities/isRegExp.js'\n\nexport type PasteRuleMatch = {\n index: number\n text: string\n replaceWith?: string\n match?: RegExpMatchArray\n data?: Record\n}\n\nexport type PasteRuleFinder =\n | RegExp\n | ((text: string, event?: ClipboardEvent | null) => PasteRuleMatch[] | null | undefined)\n\n/**\n * Paste rules are used to react to pasted content.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nexport class PasteRule {\n find: PasteRuleFinder\n\n handler: (props: {\n state: EditorState\n range: Range\n match: ExtendedRegExpMatchArray\n commands: SingleCommands\n chain: () => ChainedCommands\n can: () => CanCommands\n pasteEvent: ClipboardEvent | null\n dropEvent: DragEvent | null\n }) => void | null\n\n constructor(config: {\n find: PasteRuleFinder\n handler: (props: {\n can: () => CanCommands\n chain: () => ChainedCommands\n commands: SingleCommands\n dropEvent: DragEvent | null\n match: ExtendedRegExpMatchArray\n pasteEvent: ClipboardEvent | null\n range: Range\n state: EditorState\n }) => void | null\n }) {\n this.find = config.find\n this.handler = config.handler\n }\n}\n\nconst pasteRuleMatcherHandler = (\n text: string,\n find: PasteRuleFinder,\n event?: ClipboardEvent | null,\n): ExtendedRegExpMatchArray[] => {\n if (isRegExp(find)) {\n return [...text.matchAll(find)]\n }\n\n const matches = find(text, event)\n\n if (!matches) {\n return []\n }\n\n return matches.map(pasteRuleMatch => {\n const result: ExtendedRegExpMatchArray = [pasteRuleMatch.text]\n\n result.index = pasteRuleMatch.index\n result.input = text\n result.data = pasteRuleMatch.data\n\n if (pasteRuleMatch.replaceWith) {\n if (!pasteRuleMatch.text.includes(pasteRuleMatch.replaceWith)) {\n console.warn(\n '[tiptap warn]: \"pasteRuleMatch.replaceWith\" must be part of \"pasteRuleMatch.text\".',\n )\n }\n\n result.push(pasteRuleMatch.replaceWith)\n }\n\n return result\n })\n}\n\nfunction run(config: {\n editor: Editor\n state: EditorState\n from: number\n to: number\n rule: PasteRule\n pasteEvent: ClipboardEvent | null\n dropEvent: DragEvent | null\n}): boolean {\n const { editor, state, from, to, rule, pasteEvent, dropEvent } = config\n\n const { commands, chain, can } = new CommandManager({\n editor,\n state,\n })\n\n const handlers: (void | null)[] = []\n\n state.doc.nodesBetween(from, to, (node, pos) => {\n // Skip code blocks and non-textual nodes.\n // Be defensive: `node` may be a Fragment without a `type`. Only text,\n // inline, or textblock nodes are processed by paste rules.\n if (node.type?.spec?.code || !(node.isText || node.isTextblock || node.isInline)) {\n return\n }\n\n // For textblock and inline/text nodes, compute the range relative to the node.\n // Prefer `node.nodeSize` when available (some Node shapes expose this),\n // otherwise fall back to `node.content?.size`. Default to 0 if neither exists.\n const contentSize = node.content?.size ?? node.nodeSize ?? 0\n const resolvedFrom = Math.max(from, pos)\n const resolvedTo = Math.min(to, pos + contentSize)\n\n // If the resolved range is empty or invalid for this node, skip it. This\n // avoids calling `textBetween` with start > end which can cause internal\n // Fragment/Node traversal to access undefined `nodeSize` values.\n if (resolvedFrom >= resolvedTo) {\n return\n }\n\n const textToMatch = node.isText\n ? node.text || ''\n : node.textBetween(resolvedFrom - pos, resolvedTo - pos, undefined, '\\ufffc')\n\n const matches = pasteRuleMatcherHandler(textToMatch, rule.find, pasteEvent)\n\n matches.forEach(match => {\n if (match.index === undefined) {\n return\n }\n\n const start = resolvedFrom + match.index + 1\n const end = start + match[0].length\n const range = {\n from: state.tr.mapping.map(start),\n to: state.tr.mapping.map(end),\n }\n\n const handler = rule.handler({\n state,\n range,\n match,\n commands,\n chain,\n can,\n pasteEvent,\n dropEvent,\n })\n\n handlers.push(handler)\n })\n })\n\n const success = handlers.every(handler => handler !== null)\n\n return success\n}\n\n// When dragging across editors, must get another editor instance to delete selection content.\nlet tiptapDragFromOtherEditor: Editor | null = null\n\nconst createClipboardPasteEvent = (text: string) => {\n const event = new ClipboardEvent('paste', {\n clipboardData: new DataTransfer(),\n })\n\n event.clipboardData?.setData('text/html', text)\n\n return event\n}\n\n/**\n * Create an paste rules plugin. When enabled, it will cause pasted\n * text that matches any of the given rules to trigger the rule’s\n * action.\n */\nexport function pasteRulesPlugin(props: { editor: Editor; rules: PasteRule[] }): Plugin[] {\n const { editor, rules } = props\n let dragSourceElement: Element | null = null\n let isPastedFromProseMirror = false\n let isDroppedFromProseMirror = false\n let pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null\n let dropEvent: DragEvent | null\n\n try {\n dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null\n } catch {\n dropEvent = null\n }\n\n const processEvent = ({\n state,\n from,\n to,\n rule,\n pasteEvt,\n }: {\n state: EditorState\n from: number\n to: { b: number }\n rule: PasteRule\n pasteEvt: ClipboardEvent | null\n }) => {\n const tr = state.tr\n const chainableState = createChainableState({\n state,\n transaction: tr,\n })\n\n const handler = run({\n editor,\n state: chainableState,\n from: Math.max(from - 1, 0),\n to: to.b - 1,\n rule,\n pasteEvent: pasteEvt,\n dropEvent,\n })\n\n if (!handler || !tr.steps.length) {\n return\n }\n\n try {\n dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null\n } catch {\n dropEvent = null\n }\n pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null\n\n return tr\n }\n\n const plugins = rules.map(rule => {\n return new Plugin({\n // we register a global drag handler to track the current drag source element\n view(view) {\n const handleDragstart = (event: DragEvent) => {\n dragSourceElement = view.dom.parentElement?.contains(event.target as Element)\n ? view.dom.parentElement\n : null\n\n if (dragSourceElement) {\n tiptapDragFromOtherEditor = editor\n }\n }\n\n const handleDragend = () => {\n if (tiptapDragFromOtherEditor) {\n tiptapDragFromOtherEditor = null\n }\n }\n\n window.addEventListener('dragstart', handleDragstart)\n window.addEventListener('dragend', handleDragend)\n\n return {\n destroy() {\n window.removeEventListener('dragstart', handleDragstart)\n window.removeEventListener('dragend', handleDragend)\n },\n }\n },\n\n props: {\n handleDOMEvents: {\n drop: (view, event: Event) => {\n isDroppedFromProseMirror = dragSourceElement === view.dom.parentElement\n dropEvent = event as DragEvent\n\n if (!isDroppedFromProseMirror) {\n const dragFromOtherEditor = tiptapDragFromOtherEditor\n\n if (dragFromOtherEditor?.isEditable) {\n // setTimeout to avoid the wrong content after drop, timeout arg can't be empty or 0\n setTimeout(() => {\n const selection = dragFromOtherEditor.state.selection\n\n if (selection) {\n dragFromOtherEditor.commands.deleteRange({\n from: selection.from,\n to: selection.to,\n })\n }\n }, 10)\n }\n }\n return false\n },\n\n paste: (_view, event: Event) => {\n const html = (event as ClipboardEvent).clipboardData?.getData('text/html')\n\n pasteEvent = event as ClipboardEvent\n\n isPastedFromProseMirror = !!html?.includes('data-pm-slice')\n\n return false\n },\n },\n },\n\n appendTransaction: (transactions, oldState, state) => {\n const transaction = transactions[0]\n const isPaste = transaction.getMeta('uiEvent') === 'paste' && !isPastedFromProseMirror\n const isDrop = transaction.getMeta('uiEvent') === 'drop' && !isDroppedFromProseMirror\n\n // if PasteRule is triggered by insertContent()\n const simulatedPasteMeta = transaction.getMeta('applyPasteRules') as\n | undefined\n | { from: number; text: string | ProseMirrorNode | Fragment }\n const isSimulatedPaste = !!simulatedPasteMeta\n\n if (!isPaste && !isDrop && !isSimulatedPaste) {\n return\n }\n\n // Handle simulated paste\n if (isSimulatedPaste) {\n let { text } = simulatedPasteMeta\n\n if (typeof text === 'string') {\n text = text as string\n } else {\n text = getHTMLFromFragment(Fragment.from(text), state.schema)\n }\n\n const { from } = simulatedPasteMeta\n const to = from + text.length\n\n const pasteEvt = createClipboardPasteEvent(text)\n\n return processEvent({\n rule,\n state,\n from,\n to: { b: to },\n pasteEvt,\n })\n }\n\n // handle actual paste/drop\n const from = oldState.doc.content.findDiffStart(state.doc.content)\n const to = oldState.doc.content.findDiffEnd(state.doc.content)\n\n // stop if there is no changed range\n if (!isNumber(from) || !to || from === to.b) {\n return\n }\n\n return processEvent({\n rule,\n state,\n from,\n to,\n pasteEvt: pasteEvent,\n })\n },\n })\n })\n\n return plugins\n}\n","export function isNumber(value: any): value is number {\n return typeof value === 'number'\n}\n","export { ClipboardTextSerializer } from './clipboardTextSerializer.js'\nexport { Commands } from './commands.js'\nexport { Delete } from './delete.js'\nexport { Drop } from './drop.js'\nexport { Editable } from './editable.js'\nexport { FocusEvents, focusEventsPluginKey } from './focusEvents.js'\nexport { Keymap } from './keymap.js'\nexport { Paste } from './paste.js'\nexport { Tabindex } from './tabindex.js'\nexport { TextDirection } from './textDirection.js'\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\nimport { getTextBetween } from '../helpers/getTextBetween.js'\nimport { getTextSerializersFromSchema } from '../helpers/getTextSerializersFromSchema.js'\n\nexport type ClipboardTextSerializerOptions = {\n blockSeparator?: string\n}\n\nexport const ClipboardTextSerializer = Extension.create({\n name: 'clipboardTextSerializer',\n\n addOptions() {\n return {\n blockSeparator: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('clipboardTextSerializer'),\n props: {\n clipboardTextSerializer: () => {\n const { editor } = this\n const { state, schema } = editor\n const { doc, selection } = state\n const textSerializers = getTextSerializersFromSchema(schema)\n const { blockSeparator } = this.options\n const options = {\n ...(blockSeparator !== undefined ? { blockSeparator } : {}),\n textSerializers,\n }\n\n // Serialize each selection range independently and join the results.\n // CellSelection exposes one range per selected cell; flattening to\n // min(from)/max(to) would pull in unselected cells between them.\n // Sort by document position so reverse selections (e.g. dragging\n // upward) still emit text in document order.\n const sortedRanges = [...selection.ranges].sort((a, b) => a.$from.pos - b.$from.pos)\n\n return sortedRanges\n .map(({ $from, $to }) =>\n getTextBetween(doc, { from: $from.pos, to: $to.pos }, options),\n )\n .join(blockSeparator ?? '\\n\\n')\n },\n },\n }),\n ]\n },\n})\n","import type { Editor } from './Editor.js'\nimport { type ExtendableConfig, Extendable } from './Extendable.js'\n\n// oxlint-disable-next-lineno-empty-object-type\nexport interface ExtensionConfig extends ExtendableConfig<\n Options,\n Storage,\n ExtensionConfig,\n null\n> {}\n\n/**\n * The Extension class is the base class for all extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nexport class Extension extends Extendable<\n Options,\n Storage,\n ExtensionConfig\n> {\n type = 'extension'\n\n /**\n * Create a new Extension instance\n * @param config - Extension configuration object or a function that returns a configuration object\n */\n static create(\n config: Partial> | (() => Partial>) = {},\n ) {\n // If the config is a function, execute it to get the configuration object\n const resolvedConfig = typeof config === 'function' ? config() : config\n return new Extension(resolvedConfig)\n }\n\n configure(options?: Partial) {\n return super.configure(options) as Extension\n }\n\n extend<\n ExtendedOptions = Options,\n ExtendedStorage = Storage,\n ExtendedConfig = ExtensionConfig,\n >(\n extendedConfig?:\n | (() => Partial)\n | (Partial &\n ThisType<{\n name: string\n options: ExtendedOptions\n storage: ExtendedStorage\n editor: Editor\n type: null\n }>),\n ): Extension {\n // If the extended config is a function, execute it to get the configuration object\n const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig\n return super.extend(resolvedConfig) as Extension\n }\n}\n","import * as commands from '../commands/index.js'\nimport { Extension } from '../Extension.js'\n\nexport * from '../commands/index.js'\n\nexport const Commands = Extension.create({\n name: 'commands',\n\n addCommands() {\n return {\n ...commands,\n }\n },\n})\n","import { RemoveMarkStep } from '@tiptap/pm/transform'\n\nimport { Extension } from '../Extension.js'\nimport { combineTransactionSteps, getChangedRanges } from '../helpers/index.js'\n\n/**\n * This extension allows you to be notified when the user deletes content you are interested in.\n */\nexport const Delete = Extension.create({\n name: 'delete',\n\n onUpdate({ transaction, appendedTransactions }) {\n const callback = () => {\n if (\n this.editor.options.coreExtensionOptions?.delete?.filterTransaction?.(transaction) ??\n transaction.getMeta('y-sync$')\n ) {\n return\n }\n const nextTransaction = combineTransactionSteps(transaction.before, [\n transaction,\n ...appendedTransactions,\n ])\n const changes = getChangedRanges(nextTransaction)\n\n changes.forEach(change => {\n if (\n nextTransaction.mapping.mapResult(change.oldRange.from).deletedAfter &&\n nextTransaction.mapping.mapResult(change.oldRange.to).deletedBefore\n ) {\n nextTransaction.before.nodesBetween(\n change.oldRange.from,\n change.oldRange.to,\n (node, from) => {\n const to = from + node.nodeSize - 2\n const isFullyWithinRange = change.oldRange.from <= from && to <= change.oldRange.to\n\n this.editor.emit('delete', {\n type: 'node',\n node,\n from,\n to,\n newFrom: nextTransaction.mapping.map(from),\n newTo: nextTransaction.mapping.map(to),\n deletedRange: change.oldRange,\n newRange: change.newRange,\n partial: !isFullyWithinRange,\n editor: this.editor,\n transaction,\n combinedTransform: nextTransaction,\n })\n },\n )\n }\n })\n\n const mapping = nextTransaction.mapping\n nextTransaction.steps.forEach((step, index) => {\n if (step instanceof RemoveMarkStep) {\n const newStart = mapping.slice(index).map(step.from, -1)\n const newEnd = mapping.slice(index).map(step.to)\n const oldStart = mapping.invert().map(newStart, -1)\n const oldEnd = mapping.invert().map(newEnd)\n\n const foundBeforeMark =\n newStart > 0\n ? nextTransaction.doc.nodeAt(newStart - 1)?.marks.some(mark => mark.eq(step.mark))\n : false\n const foundAfterMark = nextTransaction.doc\n .nodeAt(newEnd)\n ?.marks.some(mark => mark.eq(step.mark))\n\n this.editor.emit('delete', {\n type: 'mark',\n mark: step.mark,\n from: step.from,\n to: step.to,\n deletedRange: {\n from: oldStart,\n to: oldEnd,\n },\n newRange: {\n from: newStart,\n to: newEnd,\n },\n partial: Boolean(foundAfterMark || foundBeforeMark),\n editor: this.editor,\n transaction,\n combinedTransform: nextTransaction,\n })\n }\n })\n }\n\n if (this.editor.options.coreExtensionOptions?.delete?.async ?? true) {\n setTimeout(callback, 0)\n } else {\n callback()\n }\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const Drop = Extension.create({\n name: 'drop',\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('tiptapDrop'),\n\n props: {\n handleDrop: (_, e, slice, moved) => {\n this.editor.emit('drop', {\n editor: this.editor,\n event: e,\n slice,\n moved,\n })\n },\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const Editable = Extension.create({\n name: 'editable',\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('editable'),\n props: {\n editable: () => this.editor.options.editable,\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const focusEventsPluginKey = new PluginKey('focusEvents')\n\nexport const FocusEvents = Extension.create({\n name: 'focusEvents',\n\n addProseMirrorPlugins() {\n const { editor } = this\n\n return [\n new Plugin({\n key: focusEventsPluginKey,\n props: {\n handleDOMEvents: {\n focus: (view, event: Event) => {\n editor.isFocused = true\n\n const transaction = editor.state.tr\n .setMeta('focus', { event })\n .setMeta('addToHistory', false)\n\n view.dispatch(transaction)\n\n return false\n },\n blur: (view, event: Event) => {\n editor.isFocused = false\n\n const transaction = editor.state.tr\n .setMeta('blur', { event })\n .setMeta('addToHistory', false)\n\n view.dispatch(transaction)\n\n return false\n },\n },\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey, Selection } from '@tiptap/pm/state'\n\nimport { CommandManager } from '../CommandManager.js'\nimport { Extension } from '../Extension.js'\nimport { createChainableState } from '../helpers/createChainableState.js'\nimport { isNodeEmpty } from '../helpers/isNodeEmpty.js'\nimport { isiOS } from '../utilities/isiOS.js'\nimport { isMacOS } from '../utilities/isMacOS.js'\n\nexport const Keymap = Extension.create({\n name: 'keymap',\n\n addKeyboardShortcuts() {\n const handleBackspace = () =>\n this.editor.commands.first(({ commands }) => [\n () => commands.undoInputRule(),\n\n // maybe convert first text block node to default node\n () =>\n commands.command(({ tr }) => {\n const { selection, doc } = tr\n const { empty, $anchor } = selection\n const { pos, parent } = $anchor\n const $parentPos =\n $anchor.parent.isTextblock && pos > 0 ? tr.doc.resolve(pos - 1) : $anchor\n const parentIsIsolating = $parentPos.parent.type.spec.isolating\n\n const parentPos = $anchor.pos - $anchor.parentOffset\n\n const isAtStart =\n parentIsIsolating && $parentPos.parent.childCount === 1\n ? parentPos === $anchor.pos\n : Selection.atStart(doc).from === pos\n\n if (\n !empty ||\n !parent.type.isTextblock ||\n parent.textContent.length ||\n !isAtStart ||\n (isAtStart && $anchor.parent.type.name === 'paragraph') // prevent clearNodes when no nodes to clear, otherwise history stack is appended\n ) {\n return false\n }\n\n return commands.clearNodes()\n }),\n\n () => commands.deleteSelection(),\n () => commands.joinBackward(),\n () => commands.selectNodeBackward(),\n ])\n\n const handleDelete = () =>\n this.editor.commands.first(({ commands }) => [\n () => commands.deleteSelection(),\n () => commands.deleteCurrentNode(),\n () => commands.joinForward(),\n () => commands.selectNodeForward(),\n ])\n\n const handleEnter = () =>\n this.editor.commands.first(({ commands }) => [\n () => commands.newlineInCode(),\n () => commands.createParagraphNear(),\n () => commands.liftEmptyBlock(),\n () => commands.splitBlock(),\n ])\n\n const baseKeymap = {\n Enter: handleEnter,\n 'Mod-Enter': () => this.editor.commands.exitCode(),\n Backspace: handleBackspace,\n 'Mod-Backspace': handleBackspace,\n 'Shift-Backspace': handleBackspace,\n Delete: handleDelete,\n 'Mod-Delete': handleDelete,\n 'Mod-a': () => this.editor.commands.selectAll(),\n }\n\n const pcKeymap = {\n ...baseKeymap,\n }\n\n const macKeymap = {\n ...baseKeymap,\n 'Ctrl-h': handleBackspace,\n 'Alt-Backspace': handleBackspace,\n 'Ctrl-d': handleDelete,\n 'Ctrl-Alt-Backspace': handleDelete,\n 'Alt-Delete': handleDelete,\n 'Alt-d': handleDelete,\n 'Ctrl-a': () => this.editor.commands.selectTextblockStart(),\n 'Ctrl-e': () => this.editor.commands.selectTextblockEnd(),\n }\n\n if (isiOS() || isMacOS()) {\n return macKeymap\n }\n\n return pcKeymap\n },\n\n addProseMirrorPlugins() {\n return [\n // With this plugin we check if the whole document was selected and deleted.\n // In this case we will additionally call `clearNodes()` to convert e.g. a heading\n // to a paragraph if necessary.\n // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well\n // with many other commands.\n new Plugin({\n key: new PluginKey('clearDocument'),\n appendTransaction: (transactions, oldState, newState) => {\n if (transactions.some(tr => tr.getMeta('composition'))) {\n return\n }\n\n const docChanges =\n transactions.some(transaction => transaction.docChanged) &&\n !oldState.doc.eq(newState.doc)\n\n const ignoreTr = transactions.some(transaction =>\n transaction.getMeta('preventClearDocument'),\n )\n\n if (!docChanges || ignoreTr) {\n return\n }\n\n const { empty, from, to } = oldState.selection\n const allFrom = Selection.atStart(oldState.doc).from\n const allEnd = Selection.atEnd(oldState.doc).to\n const allWasSelected = from === allFrom && to === allEnd\n\n if (empty || !allWasSelected) {\n return\n }\n\n const isEmpty = isNodeEmpty(newState.doc)\n\n if (!isEmpty) {\n return\n }\n\n const tr = newState.tr\n const state = createChainableState({\n state: newState,\n transaction: tr,\n })\n const { commands } = new CommandManager({\n editor: this.editor,\n state,\n })\n\n commands.clearNodes()\n\n if (!tr.steps.length) {\n return\n }\n\n return tr\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const Paste = Extension.create({\n name: 'paste',\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('tiptapPaste'),\n\n props: {\n handlePaste: (_view, e, slice) => {\n this.editor.emit('paste', {\n editor: this.editor,\n event: e,\n slice,\n })\n },\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\n/**\n * Options for the Tabindex extension.\n */\nexport type TabindexOptions = {\n /**\n * The value for the `tabindex` attribute on the editor element.\n * When undefined, editable editors default to `0` and non-editable editors get no tabindex.\n */\n value?: string\n}\n\n/**\n * The Tabindex extension adds a configurable tabindex attribute to the editor.\n *\n * By default, the editor gets tabindex=\"0\" when editable. This can be customized\n * via coreExtensionOptions to support specific focus ordering requirements in forms\n * or to enable focusing on non-editable editors.\n *\n * @example\n * ```ts\n * new Editor({\n * coreExtensionOptions: {\n * tabindex: {\n * value: '-1',\n * },\n * },\n * })\n * ```\n */\nexport const Tabindex = Extension.create({\n name: 'tabindex',\n\n addOptions() {\n return {\n value: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('tabindex'),\n props: {\n attributes: (): { [name: string]: string } => {\n if (!this.editor.isEditable && this.options.value === undefined) {\n return {}\n }\n return { tabindex: this.options.value ?? '0' }\n },\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\nimport { splitExtensions } from '../helpers/splitExtensions.js'\n\nexport interface TextDirectionOptions {\n direction: 'ltr' | 'rtl' | 'auto' | undefined\n}\n\n/**\n * The TextDirection extension adds support for setting text direction (LTR/RTL/auto)\n * on all nodes in the editor.\n *\n * This extension adds a global `dir` attribute to all node types, which can be used\n * to control bidirectional text rendering. The direction can be set globally via\n * editor options or per-node using commands.\n */\nexport const TextDirection = Extension.create({\n name: 'textDirection',\n\n addOptions() {\n return {\n direction: undefined,\n }\n },\n\n addGlobalAttributes() {\n // Only add the dir attribute to nodes if text direction is configured\n // This prevents null/undefined values from appearing in JSON exports\n if (!this.options.direction) {\n return []\n }\n\n const { nodeExtensions } = splitExtensions(this.extensions)\n\n return [\n {\n types: nodeExtensions\n .filter(extension => extension.name !== 'text')\n .map(extension => extension.name),\n attributes: {\n dir: {\n default: this.options.direction,\n parseHTML: element => {\n const dir = element.getAttribute('dir')\n\n if (dir && (dir === 'ltr' || dir === 'rtl' || dir === 'auto')) {\n return dir\n }\n\n return this.options.direction\n },\n renderHTML: attributes => {\n if (!attributes.dir) {\n return {}\n }\n\n return {\n dir: attributes.dir,\n }\n },\n },\n },\n },\n ]\n },\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('textDirection'),\n props: {\n attributes: (): { [name: string]: string } => {\n const direction = this.options.direction\n\n if (!direction) {\n return {}\n }\n\n return {\n dir: direction,\n }\n },\n },\n }),\n ]\n },\n})\n","import type { Fragment, Node, ResolvedPos } from '@tiptap/pm/model'\n\nimport type { Editor } from './Editor.js'\nimport type { Content, Range } from './types.js'\n\nexport class NodePos {\n private resolvedPos: ResolvedPos\n\n private isBlock: boolean\n\n private editor: Editor\n\n private get name(): string {\n return this.node.type.name\n }\n\n constructor(pos: ResolvedPos, editor: Editor, isBlock = false, node: Node | null = null) {\n this.isBlock = isBlock\n this.resolvedPos = pos\n this.editor = editor\n this.currentNode = node\n }\n\n private currentNode: Node | null = null\n\n get node(): Node {\n return this.currentNode || this.resolvedPos.node()\n }\n\n get element(): HTMLElement {\n return this.editor.view.domAtPos(this.pos).node as HTMLElement\n }\n\n public actualDepth: number | null = null\n\n get depth(): number {\n return this.actualDepth ?? this.resolvedPos.depth\n }\n\n get pos(): number {\n return this.resolvedPos.pos\n }\n\n get content(): Fragment {\n return this.node.content\n }\n\n set content(content: Content) {\n let from = this.from\n let to = this.to\n\n if (this.isBlock) {\n if (this.content.size === 0) {\n console.error(\n `You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`,\n )\n return\n }\n\n from = this.from + 1\n to = this.to - 1\n }\n\n this.editor.commands.insertContentAt({ from, to }, content)\n }\n\n get attributes(): { [key: string]: any } {\n return this.node.attrs\n }\n\n get textContent(): string {\n return this.node.textContent\n }\n\n get size(): number {\n return this.node.nodeSize\n }\n\n get from(): number {\n if (this.isBlock) {\n return this.pos\n }\n\n return this.resolvedPos.start(this.resolvedPos.depth)\n }\n\n get range(): Range {\n return {\n from: this.from,\n to: this.to,\n }\n }\n\n get to(): number {\n if (this.isBlock) {\n return this.pos + this.size\n }\n\n return this.resolvedPos.end(this.resolvedPos.depth) + (this.node.isText ? 0 : 1)\n }\n\n get parent(): NodePos | null {\n if (this.depth === 0) {\n return null\n }\n\n const parentPos = this.resolvedPos.start(this.resolvedPos.depth - 1)\n const $pos = this.resolvedPos.doc.resolve(parentPos)\n\n return new NodePos($pos, this.editor)\n }\n\n get before(): NodePos | null {\n let $pos = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2))\n\n if ($pos.depth !== this.depth) {\n $pos = this.resolvedPos.doc.resolve(this.from - 3)\n }\n\n return new NodePos($pos, this.editor)\n }\n\n get after(): NodePos | null {\n let $pos = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1))\n\n if ($pos.depth !== this.depth) {\n $pos = this.resolvedPos.doc.resolve(this.to + 3)\n }\n\n return new NodePos($pos, this.editor)\n }\n\n get children(): NodePos[] {\n const children: NodePos[] = []\n\n this.node.content.forEach((node, offset) => {\n const isBlock = node.isBlock && !node.isTextblock\n const isNonTextAtom = node.isAtom && !node.isText\n const isInline = node.isInline\n\n const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1)\n\n // Check if targetPos is within valid document range\n if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) {\n return\n }\n\n const $pos = this.resolvedPos.doc.resolve(targetPos)\n\n // Only apply depth check for non-block, non-inline nodes (i.e., textblocks)\n // Inline nodes should always be included as children since we're iterating\n // over direct children via this.node.content\n if (!isBlock && !isInline && $pos.depth <= this.depth) {\n return\n }\n\n // Pass the node for both block and inline nodes to ensure correct node reference\n const childNodePos = new NodePos(\n $pos,\n this.editor,\n isBlock,\n isBlock || isInline ? node : null,\n )\n\n if (isBlock) {\n childNodePos.actualDepth = this.depth + 1\n }\n\n children.push(childNodePos)\n })\n\n return children\n }\n\n get firstChild(): NodePos | null {\n return this.children[0] || null\n }\n\n get lastChild(): NodePos | null {\n const children = this.children\n\n return children[children.length - 1] || null\n }\n\n closest(selector: string, attributes: { [key: string]: any } = {}): NodePos | null {\n let node: NodePos | null = null\n let currentNode = this.parent\n\n while (currentNode && !node) {\n if (currentNode.node.type.name === selector) {\n if (Object.keys(attributes).length > 0) {\n const nodeAttributes = currentNode.node.attrs\n const attrKeys = Object.keys(attributes)\n\n for (let index = 0; index < attrKeys.length; index += 1) {\n const key = attrKeys[index]\n\n if (nodeAttributes[key] !== attributes[key]) {\n break\n }\n }\n } else {\n node = currentNode\n }\n }\n\n currentNode = currentNode.parent\n }\n\n return node\n }\n\n querySelector(selector: string, attributes: { [key: string]: any } = {}): NodePos | null {\n return this.querySelectorAll(selector, attributes, true)[0] || null\n }\n\n querySelectorAll(\n selector: string,\n attributes: { [key: string]: any } = {},\n firstItemOnly = false,\n ): NodePos[] {\n let nodes: NodePos[] = []\n\n if (!this.children || this.children.length === 0) {\n return nodes\n }\n const attrKeys = Object.keys(attributes)\n\n /**\n * Finds all children recursively that match the selector and attributes\n * If firstItemOnly is true, it will return the first item found\n */\n this.children.forEach(childPos => {\n // If we already found a node and we only want the first item, we dont need to keep going\n if (firstItemOnly && nodes.length > 0) {\n return\n }\n\n if (childPos.node.type.name === selector) {\n const doesAllAttributesMatch = attrKeys.every(\n key => attributes[key] === childPos.node.attrs[key],\n )\n\n if (doesAllAttributesMatch) {\n nodes.push(childPos)\n }\n }\n\n // If we already found a node and we only want the first item, we can stop here and skip the recursion\n if (firstItemOnly && nodes.length > 0) {\n return\n }\n\n nodes = nodes.concat(childPos.querySelectorAll(selector, attributes, firstItemOnly))\n })\n\n return nodes\n }\n\n setAttribute(attributes: { [key: string]: any }) {\n const { tr } = this.editor.state\n\n tr.setNodeMarkup(this.from, undefined, {\n ...this.node.attrs,\n ...attributes,\n })\n\n this.editor.view.dispatch(tr)\n }\n}\n","export const style = `.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}`\n","export function createStyleTag(style: string, nonce?: string, suffix?: string): HTMLStyleElement {\n const tiptapStyleTag = (\n document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ''}]`)\n )\n\n if (tiptapStyleTag !== null) {\n return tiptapStyleTag\n }\n\n const styleNode = document.createElement('style')\n\n if (nonce) {\n styleNode.setAttribute('nonce', nonce)\n }\n\n styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ''}`, '')\n styleNode.innerHTML = style\n document.getElementsByTagName('head')[0].appendChild(styleNode)\n\n return styleNode\n}\n","import type { MarkType } from '@tiptap/pm/model'\n\nimport { getMarksBetween } from '../helpers/getMarksBetween.js'\nimport type { InputRuleFinder } from '../InputRule.js'\nimport { InputRule } from '../InputRule.js'\nimport type { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule that adds a mark when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function markInputRule(config: {\n find: InputRuleFinder\n type: MarkType\n undoable?: boolean\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray) => Record)\n | false\n | null\n}) {\n return new InputRule({\n find: config.find,\n handler: ({ state, range, match }) => {\n const attributes = callOrReturn(config.getAttributes, undefined, match)\n\n if (attributes === false || attributes === null) {\n return null\n }\n\n const { tr } = state\n const captureGroup = match[match.length - 1]\n const fullMatch = match[0]\n\n if (captureGroup) {\n const startSpaces = fullMatch.search(/\\S/)\n const textStart = range.from + fullMatch.indexOf(captureGroup)\n const textEnd = textStart + captureGroup.length\n\n const excludedMarks = getMarksBetween(range.from, range.to, state.doc)\n .filter(item => {\n // @ts-ignore\n const excluded = item.mark.type.excluded as MarkType[]\n\n return excluded.find(type => type === config.type && type !== item.mark.type)\n })\n .filter(item => item.to > textStart)\n\n if (excludedMarks.length) {\n return null\n }\n\n if (textEnd < range.to) {\n tr.delete(textEnd, range.to)\n }\n\n if (textStart > range.from) {\n tr.delete(range.from + startSpaces, textStart)\n }\n\n const markEnd = range.from + startSpaces + captureGroup.length\n\n tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {}))\n\n tr.removeStoredMark(config.type)\n }\n },\n undoable: config.undoable,\n })\n}\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport type { InputRuleFinder } from '../InputRule.js'\nimport { InputRule } from '../InputRule.js'\nimport type { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule that adds a node when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function nodeInputRule(config: {\n /**\n * The regex to match.\n */\n find: InputRuleFinder\n\n /**\n * The node type to add.\n */\n type: NodeType\n\n /**\n * Whether the input rule should be undoable\n * when the user presses backspace.\n */\n undoable?: boolean\n\n /**\n * A function that returns the attributes for the node\n * can also be an object of attributes\n */\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray) => Record)\n | false\n | null\n}) {\n return new InputRule({\n find: config.find,\n handler: ({ state, range, match }) => {\n const attributes = callOrReturn(config.getAttributes, undefined, match) || {}\n const { tr } = state\n const start = range.from\n let end = range.to\n\n const newNode = config.type.create(attributes)\n\n if (match[1]) {\n const offset = match[0].lastIndexOf(match[1])\n let matchStart = start + offset\n\n if (matchStart > end) {\n matchStart = end\n } else {\n end = matchStart + match[1].length\n }\n\n // insert last typed character\n const lastChar = match[0][match[0].length - 1]\n\n tr.insertText(lastChar, start + match[0].length - 1)\n\n // insert node from input rule\n tr.replaceWith(matchStart, end, newNode)\n } else if (match[0]) {\n const insertionStart = config.type.isInline ? start : start - 1\n\n tr.insert(insertionStart, config.type.create(attributes)).delete(\n tr.mapping.map(start),\n tr.mapping.map(end),\n )\n }\n\n tr.scrollIntoView()\n },\n undoable: config.undoable,\n })\n}\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport type { InputRuleFinder } from '../InputRule.js'\nimport { InputRule } from '../InputRule.js'\nimport type { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule that changes the type of a textblock when the\n * matched text is typed into it. When using a regular expresion you’ll\n * probably want the regexp to start with `^`, so that the pattern can\n * only occur at the start of a textblock.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function textblockTypeInputRule(config: {\n find: InputRuleFinder\n type: NodeType\n undoable?: boolean\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray) => Record)\n | false\n | null\n}) {\n return new InputRule({\n find: config.find,\n handler: ({ state, range, match }) => {\n const $start = state.doc.resolve(range.from)\n const attributes = callOrReturn(config.getAttributes, undefined, match) || {}\n\n if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), config.type)) {\n return null\n }\n\n state.tr\n .delete(range.from, range.to)\n .setBlockType(range.from, range.from, config.type, attributes)\n },\n undoable: config.undoable,\n })\n}\n","import type { InputRuleFinder } from '../InputRule.js'\nimport { InputRule } from '../InputRule.js'\n\n/**\n * Build an input rule that replaces text when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function textInputRule(config: {\n find: InputRuleFinder\n replace: string\n undoable?: boolean\n}) {\n return new InputRule({\n find: config.find,\n handler: ({ state, range, match }) => {\n let insert = config.replace\n let start = range.from\n const end = range.to\n\n if (match[1]) {\n const offset = match[0].lastIndexOf(match[1])\n\n insert += match[0].slice(offset + match[1].length)\n start += offset\n\n const cutOff = start - end\n\n if (cutOff > 0) {\n insert = match[0].slice(offset - cutOff, offset) + insert\n start = end\n }\n }\n\n state.tr.insertText(insert, start, end)\n },\n undoable: config.undoable,\n })\n}\n","import type { Node as ProseMirrorNode, NodeType } from '@tiptap/pm/model'\nimport { canJoin, findWrapping } from '@tiptap/pm/transform'\n\nimport type { Editor } from '../Editor.js'\nimport type { InputRuleFinder } from '../InputRule.js'\nimport { InputRule } from '../InputRule.js'\nimport type { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule for automatically wrapping a textblock when a\n * given string is typed. When using a regular expresion you’ll\n * probably want the regexp to start with `^`, so that the pattern can\n * only occur at the start of a textblock.\n *\n * `type` is the type of node to wrap in.\n *\n * By default, if there’s a node with the same type above the newly\n * wrapped node, the rule will try to join those\n * two nodes. You can pass a join predicate, which takes a regular\n * expression match and the node before the wrapped node, and can\n * return a boolean to indicate whether a join should happen.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function wrappingInputRule(config: {\n find: InputRuleFinder\n type: NodeType\n keepMarks?: boolean\n keepAttributes?: boolean\n editor?: Editor\n undoable?: boolean\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray) => Record)\n | false\n | null\n joinPredicate?: (match: ExtendedRegExpMatchArray, node: ProseMirrorNode) => boolean\n}) {\n return new InputRule({\n find: config.find,\n handler: ({ state, range, match, chain }) => {\n const attributes = callOrReturn(config.getAttributes, undefined, match) || {}\n const tr = state.tr.delete(range.from, range.to)\n const $start = tr.doc.resolve(range.from)\n const blockRange = $start.blockRange()\n const wrapping = blockRange && findWrapping(blockRange, config.type, attributes)\n\n if (!wrapping) {\n return null\n }\n\n tr.wrap(blockRange, wrapping)\n\n if (config.keepMarks && config.editor) {\n const { selection, storedMarks } = state\n const { splittableMarks } = config.editor.extensionManager\n const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks())\n\n if (marks) {\n const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name))\n\n tr.ensureMarks(filteredMarks)\n }\n }\n if (config.keepAttributes) {\n /** If the nodeType is `bulletList` or `orderedList` set the `nodeType` as `listItem` */\n const nodeType =\n config.type.name === 'bulletList' || config.type.name === 'orderedList'\n ? 'listItem'\n : 'taskList'\n\n chain().updateAttributes(nodeType, attributes).run()\n }\n\n const before = tr.doc.resolve(range.from - 1).nodeBefore\n\n if (\n before &&\n before.type === config.type &&\n canJoin(tr.doc, range.from - 1) &&\n (!config.joinPredicate || config.joinPredicate(match, before))\n ) {\n tr.join(range.from - 1)\n }\n },\n undoable: config.undoable,\n })\n}\n","export type Attributes = Record\n\nexport type DOMOutputSpecElement = 0 | Attributes | DOMOutputSpecArray\n/**\n * Better describes the output of a `renderHTML` function in prosemirror\n * @see https://prosemirror.net/docs/ref/#model.DOMOutputSpec\n */\nexport type DOMOutputSpecArray =\n | [string]\n | [string, Attributes]\n | [string, 0]\n | [string, Attributes, 0]\n | [string, Attributes, DOMOutputSpecArray | 0]\n | [string, DOMOutputSpecArray]\n\n// JSX types for Tiptap's JSX runtime\n// These types only apply when using @jsxImportSource @tiptap/core\n// oxlint-disable-next-lineno-namespace\nexport namespace JSX {\n export type Element = DOMOutputSpecArray\n export interface IntrinsicElements {\n // oxlint-disable-next-lineno-explicit-any\n [key: string]: any\n }\n export interface ElementChildrenAttribute {\n children: unknown\n }\n}\n\nexport type JSXRenderer = (\n tag: 'slot' | string | ((props?: Attributes) => DOMOutputSpecArray | DOMOutputSpecElement),\n props?: Attributes,\n ...children: JSXRenderer[]\n) => DOMOutputSpecArray | DOMOutputSpecElement\n\nexport function Fragment(props: { children: JSXRenderer[] }) {\n return props.children\n}\n\nexport const h: JSXRenderer = (tag, attributes) => {\n // Treat the slot tag as the Prosemirror hole to render content into\n if (tag === 'slot') {\n return 0\n }\n\n // If the tag is a function, call it with the props\n if (tag instanceof Function) {\n return tag(attributes)\n }\n\n const { children, ...rest } = attributes ?? {}\n\n if (tag === 'svg') {\n throw new Error(\n 'SVG elements are not supported in the JSX syntax, use the array syntax instead',\n )\n }\n\n // Otherwise, return the tag, attributes, and children\n return [tag, rest, children]\n}\n\n// See\n// https://esbuild.github.io/api/#jsx-import-source\n// https://www.typescriptlang.org/tsconfig/#jsxImportSource\n\nexport { h as createElement, h as jsx, h as jsxDEV, h as jsxs }\n","import type { Node as PMNode } from '@tiptap/pm/model'\nimport type { Decoration, DecorationSource, NodeView } from '@tiptap/pm/view'\n\nimport type { Editor } from '../Editor.js'\n\nconst isTouchEvent = (e: MouseEvent | TouchEvent): e is TouchEvent => {\n return 'touches' in e\n}\n\n/**\n * Directions where resize handles can be placed\n *\n * @example\n * - `'top'` - Top edge handle\n * - `'bottom-right'` - Bottom-right corner handle\n */\nexport type ResizableNodeViewDirection =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-right'\n | 'top-left'\n | 'bottom-right'\n | 'bottom-left'\n\n/**\n * Dimensions for the resizable node in pixels\n */\nexport type ResizableNodeDimensions = {\n /** Width in pixels */\n width: number\n /** Height in pixels */\n height: number\n}\n\n/**\n * Configuration options for creating a ResizableNodeView\n *\n * @example\n * ```ts\n * new ResizableNodeView({\n * element: imgElement,\n * node,\n * getPos,\n * onResize: (width, height) => {\n * imgElement.style.width = `${width}px`\n * imgElement.style.height = `${height}px`\n * },\n * onCommit: (width, height) => {\n * editor.commands.updateAttributes('image', { width, height })\n * },\n * onUpdate: (node) => true,\n * options: {\n * directions: ['bottom-right', 'bottom-left'],\n * min: { width: 100, height: 100 },\n * preserveAspectRatio: true\n * }\n * })\n * ```\n */\nexport type ResizableNodeViewOptions = {\n /**\n * The DOM element to make resizable (e.g., an img, video, or iframe element)\n */\n element: HTMLElement\n\n /**\n * The DOM element that will hold the editable content element\n */\n contentElement?: HTMLElement\n\n /**\n * The ProseMirror node instance\n */\n node: PMNode\n\n /**\n * The Tiptap editor instance\n */\n editor: Editor\n\n /**\n * Function that returns the current position of the node in the document\n */\n getPos: () => number | undefined\n\n /**\n * Callback fired continuously during resize with current dimensions.\n * Use this to update the element's visual size in real-time.\n *\n * @param width - Current width in pixels\n * @param height - Current height in pixels\n *\n * @example\n * ```ts\n * onResize: (width, height) => {\n * element.style.width = `${width}px`\n * element.style.height = `${height}px`\n * }\n * ```\n */\n onResize?: (width: number, height: number) => void\n\n /**\n * Callback fired once when resize completes with final dimensions.\n * Use this to persist the new size to the node's attributes.\n *\n * @param width - Final width in pixels\n * @param height - Final height in pixels\n *\n * @example\n * ```ts\n * onCommit: (width, height) => {\n * const pos = getPos()\n * if (pos !== undefined) {\n * editor.commands.updateAttributes('image', { width, height })\n * }\n * }\n * ```\n */\n onCommit: (width: number, height: number) => void\n\n /**\n * Callback for handling node updates.\n * Return `true` to accept the update, `false` to reject it.\n *\n * @example\n * ```ts\n * onUpdate: (node, decorations, innerDecorations) => {\n * if (node.type !== this.node.type) return false\n * return true\n * }\n * ```\n */\n onUpdate: NodeView['update']\n\n /**\n * Optional configuration for resize behavior and styling\n */\n options?: {\n /**\n * Which resize handles to display.\n * @default ['bottom-left', 'bottom-right', 'top-left', 'top-right']\n *\n * @example\n * ```ts\n * // Only show corner handles\n * directions: ['top-left', 'top-right', 'bottom-left', 'bottom-right']\n *\n * // Only show right edge handle\n * directions: ['right']\n * ```\n */\n directions?: ResizableNodeViewDirection[]\n\n /**\n * Minimum dimensions in pixels\n * @default { width: 8, height: 8 }\n *\n * @example\n * ```ts\n * min: { width: 100, height: 50 }\n * ```\n */\n min?: Partial\n\n /**\n * Maximum dimensions in pixels\n * @default undefined (no maximum)\n *\n * @example\n * ```ts\n * max: { width: 1000, height: 800 }\n * ```\n */\n max?: Partial\n\n /**\n * Always preserve aspect ratio when resizing.\n * When `false`, aspect ratio is preserved only when Shift key is pressed.\n * @default false\n *\n * @example\n * ```ts\n * preserveAspectRatio: true // Always lock aspect ratio\n * ```\n */\n preserveAspectRatio?: boolean\n\n /**\n * Custom CSS class names for styling\n *\n * @example\n * ```ts\n * className: {\n * container: 'resize-container',\n * wrapper: 'resize-wrapper',\n * handle: 'resize-handle',\n * resizing: 'is-resizing'\n * }\n * ```\n */\n className?: {\n /** Class for the outer container element */\n container?: string\n /** Class for the wrapper element that contains the resizable element */\n wrapper?: string\n /** Class applied to all resize handles */\n handle?: string\n /** Class added to container while actively resizing */\n resizing?: string\n }\n\n /**\n * Optional callback for creating custom resize handle elements.\n *\n * This function allows developers to define their own handle element\n * (e.g., custom icons, classes, or styles) for a given resize direction.\n * It is called internally for each handle direction.\n *\n * @param direction - The direction of the handle being created (e.g., 'top', 'bottom-right').\n * @returns The custom handle HTMLElement.\n *\n * @example\n * ```ts\n * createCustomHandle: (direction) => {\n * const handle = document.createElement('div')\n * handle.dataset.resizeHandle = direction\n * handle.style.position = 'absolute'\n * handle.className = 'tiptap-custom-handle'\n *\n * const isTop = direction.includes('top')\n * const isBottom = direction.includes('bottom')\n * const isLeft = direction.includes('left')\n * const isRight = direction.includes('right')\n *\n * if (isTop) handle.style.top = '0'\n * if (isBottom) handle.style.bottom = '0'\n * if (isLeft) handle.style.left = '0'\n * if (isRight) handle.style.right = '0'\n *\n * // Edge handles span the full width or height\n * if (direction === 'top' || direction === 'bottom') {\n * handle.style.left = '0'\n * handle.style.right = '0'\n * }\n *\n * if (direction === 'left' || direction === 'right') {\n * handle.style.top = '0'\n * handle.style.bottom = '0'\n * }\n *\n * return handle\n * }\n * ```\n */\n createCustomHandle?: (direction: ResizableNodeViewDirection) => HTMLElement\n }\n}\n\n/**\n * A NodeView implementation that adds resize handles to any DOM element.\n *\n * This class creates a resizable node view for Tiptap/ProseMirror editors.\n * It wraps your element with resize handles and manages the resize interaction,\n * including aspect ratio preservation, min/max constraints, and keyboard modifiers.\n *\n * @example\n * ```ts\n * // Basic usage in a Tiptap extension\n * addNodeView() {\n * return ({ node, getPos }) => {\n * const img = document.createElement('img')\n * img.src = node.attrs.src\n *\n * return new ResizableNodeView({\n * element: img,\n * node,\n * getPos,\n * onResize: (width, height) => {\n * img.style.width = `${width}px`\n * img.style.height = `${height}px`\n * },\n * onCommit: (width, height) => {\n * this.editor.commands.updateAttributes('image', { width, height })\n * },\n * onUpdate: () => true,\n * options: {\n * min: { width: 100, height: 100 },\n * preserveAspectRatio: true\n * }\n * })\n * }\n * }\n * ```\n */\nexport class ResizableNodeView {\n /** The ProseMirror node instance */\n node: PMNode\n\n /** The Tiptap editor instance */\n editor: Editor\n\n /** The DOM element being made resizable */\n element: HTMLElement\n\n /** The editable DOM element inside the DOM */\n contentElement?: HTMLElement\n\n /** The outer container element (returned as NodeView.dom) */\n container: HTMLElement\n\n /** The wrapper element that contains the element and handles */\n wrapper: HTMLElement\n\n /** Function to get the current node position */\n getPos: () => number | undefined\n\n /** Callback fired during resize */\n onResize?: (width: number, height: number) => void\n\n /** Callback fired when resize completes */\n onCommit: (width: number, height: number) => void\n\n /** Callback for node updates */\n onUpdate?: NodeView['update']\n\n /** Active resize handle directions */\n directions: ResizableNodeViewDirection[] = [\n 'bottom-left',\n 'bottom-right',\n 'top-left',\n 'top-right',\n ]\n\n /** Minimum allowed dimensions */\n minSize: ResizableNodeDimensions = {\n height: 8,\n width: 8,\n }\n\n /** Maximum allowed dimensions (optional) */\n maxSize?: Partial\n\n /** Whether to always preserve aspect ratio */\n preserveAspectRatio: boolean = false\n\n /** CSS class names for elements */\n classNames = {\n container: '',\n wrapper: '',\n handle: '',\n resizing: '',\n }\n\n /** Optional callback for creating custom resize handles */\n createCustomHandle?: (direction: ResizableNodeViewDirection) => HTMLElement\n\n /** Initial width of the element (for aspect ratio calculation) */\n private initialWidth: number = 0\n\n /** Initial height of the element (for aspect ratio calculation) */\n private initialHeight: number = 0\n\n /** Calculated aspect ratio (width / height) */\n private aspectRatio: number = 1\n\n /** Whether a resize operation is currently active */\n private isResizing: boolean = false\n\n /** The handle currently being dragged */\n private activeHandle: ResizableNodeViewDirection | null = null\n\n /** Starting mouse X position when resize began */\n private startX: number = 0\n\n /** Starting mouse Y position when resize began */\n private startY: number = 0\n\n /** Element width when resize began */\n private startWidth: number = 0\n\n /** Element height when resize began */\n private startHeight: number = 0\n\n /** Whether Shift key is currently pressed (for temporary aspect ratio lock) */\n private isShiftKeyPressed: boolean = false\n\n /** Last known editable state of the editor */\n private lastEditableState: boolean | undefined = undefined\n\n /** Map of handle elements by direction */\n private handleMap = new Map()\n\n /**\n * Creates a new ResizableNodeView instance.\n *\n * The constructor sets up the resize handles, applies initial sizing from\n * node attributes, and configures all resize behavior options.\n *\n * @param options - Configuration options for the resizable node view\n */\n constructor(options: ResizableNodeViewOptions) {\n this.node = options.node\n this.editor = options.editor\n this.element = options.element\n this.element.draggable = false\n this.contentElement = options.contentElement\n\n this.getPos = options.getPos\n\n this.onResize = options.onResize\n this.onCommit = options.onCommit\n this.onUpdate = options.onUpdate\n\n if (options.options?.min) {\n this.minSize = {\n ...this.minSize,\n ...options.options.min,\n }\n }\n\n if (options.options?.max) {\n this.maxSize = options.options.max\n }\n\n if (options?.options?.directions) {\n this.directions = options.options.directions\n }\n\n if (options.options?.preserveAspectRatio) {\n this.preserveAspectRatio = options.options.preserveAspectRatio\n }\n\n if (options.options?.className) {\n this.classNames = {\n container: options.options.className.container || '',\n wrapper: options.options.className.wrapper || '',\n handle: options.options.className.handle || '',\n resizing: options.options.className.resizing || '',\n }\n }\n\n if (options.options?.createCustomHandle) {\n this.createCustomHandle = options.options.createCustomHandle\n }\n\n this.wrapper = this.createWrapper()\n this.container = this.createContainer()\n\n this.applyInitialSize()\n this.attachHandles()\n\n this.editor.on('update', this.handleEditorUpdate.bind(this))\n }\n\n /**\n * Returns the top-level DOM node that should be placed in the editor.\n *\n * This is required by the ProseMirror NodeView interface. The container\n * includes the wrapper, handles, and the actual content element.\n *\n * @returns The container element to be inserted into the editor\n */\n get dom() {\n return this.container\n }\n\n get contentDOM(): HTMLElement | null {\n return this.contentElement ?? null\n }\n\n private handleEditorUpdate() {\n const isEditable = this.editor.isEditable\n\n // Only if state actually changed\n if (isEditable === this.lastEditableState) {\n return\n }\n\n this.lastEditableState = isEditable\n\n if (!isEditable) {\n this.removeHandles()\n } else if (isEditable && this.handleMap.size === 0) {\n this.attachHandles()\n }\n }\n\n /**\n * Called when the node's content or attributes change.\n *\n * Updates the internal node reference. If a custom `onUpdate` callback\n * was provided, it will be called to handle additional update logic.\n *\n * @param node - The new/updated node\n * @param decorations - Node decorations\n * @param innerDecorations - Inner decorations\n * @returns `false` if the node type has changed (requires full rebuild), otherwise the result of `onUpdate` or `true`\n */\n update(\n node: PMNode,\n decorations: readonly Decoration[],\n innerDecorations: DecorationSource,\n ): boolean {\n if (node.type !== this.node.type) {\n return false\n }\n\n this.node = node\n\n if (this.onUpdate) {\n return this.onUpdate(node, decorations, innerDecorations)\n }\n\n return true\n }\n\n /**\n * Cleanup method called when the node view is being removed.\n *\n * Removes all event listeners to prevent memory leaks. This is required\n * by the ProseMirror NodeView interface. If a resize is active when\n * destroy is called, it will be properly cancelled.\n */\n destroy() {\n if (this.isResizing) {\n this.container.dataset.resizeState = 'false'\n\n if (this.classNames.resizing) {\n this.container.classList.remove(this.classNames.resizing)\n }\n\n document.removeEventListener('mousemove', this.handleMouseMove)\n document.removeEventListener('mouseup', this.handleMouseUp)\n document.removeEventListener('keydown', this.handleKeyDown)\n document.removeEventListener('keyup', this.handleKeyUp)\n this.isResizing = false\n this.activeHandle = null\n }\n\n this.editor.off('update', this.handleEditorUpdate.bind(this))\n\n this.container.remove()\n }\n\n /**\n * Creates the outer container element.\n *\n * The container is the top-level element returned by the NodeView and\n * wraps the entire resizable node. It's set up with flexbox to handle\n * alignment and includes data attributes for styling and identification.\n *\n * @returns The container element\n */\n createContainer() {\n const element = document.createElement('div')\n element.dataset.resizeContainer = ''\n element.dataset.node = this.node.type.name\n element.style.display = this.node.type.isInline ? 'inline-flex' : 'flex'\n\n if (this.classNames.container) {\n element.className = this.classNames.container\n }\n\n element.appendChild(this.wrapper)\n\n return element\n }\n\n /**\n * Creates the wrapper element that contains the content and handles.\n *\n * The wrapper uses relative positioning so that resize handles can be\n * positioned absolutely within it. This is the direct parent of the\n * content element being made resizable.\n *\n * @returns The wrapper element\n */\n createWrapper() {\n const element = document.createElement('div')\n element.style.position = 'relative'\n element.style.display = 'block'\n element.dataset.resizeWrapper = ''\n\n if (this.classNames.wrapper) {\n element.className = this.classNames.wrapper\n }\n\n element.appendChild(this.element)\n\n return element\n }\n\n /**\n * Creates a resize handle element for a specific direction.\n *\n * Each handle is absolutely positioned and includes a data attribute\n * identifying its direction for styling purposes.\n *\n * @param direction - The resize direction for this handle\n * @returns The handle element\n */\n private createHandle(direction: ResizableNodeViewDirection): HTMLElement {\n const handle = document.createElement('div')\n handle.dataset.resizeHandle = direction\n handle.style.position = 'absolute'\n\n if (this.classNames.handle) {\n handle.className = this.classNames.handle\n }\n\n return handle\n }\n\n /**\n * Positions a handle element according to its direction.\n *\n * Corner handles (e.g., 'top-left') are positioned at the intersection\n * of two edges. Edge handles (e.g., 'top') span the full width or height.\n *\n * @param handle - The handle element to position\n * @param direction - The direction determining the position\n */\n private positionHandle(handle: HTMLElement, direction: ResizableNodeViewDirection): void {\n const isTop = direction.includes('top')\n const isBottom = direction.includes('bottom')\n const isLeft = direction.includes('left')\n const isRight = direction.includes('right')\n\n if (isTop) {\n handle.style.top = '0'\n }\n\n if (isBottom) {\n handle.style.bottom = '0'\n }\n\n if (isLeft) {\n handle.style.left = '0'\n }\n\n if (isRight) {\n handle.style.right = '0'\n }\n\n // Edge handles span the full width or height\n if (direction === 'top' || direction === 'bottom') {\n handle.style.left = '0'\n handle.style.right = '0'\n }\n\n if (direction === 'left' || direction === 'right') {\n handle.style.top = '0'\n handle.style.bottom = '0'\n }\n }\n\n /**\n * Creates and attaches all resize handles to the wrapper.\n *\n * Iterates through the configured directions, creates a handle for each,\n * positions it, attaches the mousedown listener, and appends it to the DOM.\n */\n private attachHandles(): void {\n this.directions.forEach(direction => {\n let handle: HTMLElement\n\n if (this.createCustomHandle) {\n handle = this.createCustomHandle(direction)\n } else {\n handle = this.createHandle(direction)\n }\n\n if (!(handle instanceof HTMLElement)) {\n console.warn(\n `[ResizableNodeView] createCustomHandle(\"${direction}\") did not return an HTMLElement. Falling back to default handle.`,\n )\n handle = this.createHandle(direction)\n }\n\n if (!this.createCustomHandle) {\n this.positionHandle(handle, direction)\n }\n\n handle.addEventListener('mousedown', event => this.handleResizeStart(event, direction))\n handle.addEventListener('touchstart', event =>\n this.handleResizeStart(event as unknown as MouseEvent, direction),\n )\n\n this.handleMap.set(direction, handle)\n\n this.wrapper.appendChild(handle)\n })\n }\n\n /**\n * Removes all resize handles from the wrapper.\n *\n * Cleans up the handle map and removes each handle element from the DOM.\n */\n private removeHandles(): void {\n this.handleMap.forEach(el => el.remove())\n this.handleMap.clear()\n }\n\n /**\n * Applies initial sizing from node attributes to the element.\n *\n * If width/height attributes exist on the node, they're applied to the element.\n * Otherwise, the element's natural/current dimensions are measured. The aspect\n * ratio is calculated for later use in aspect-ratio-preserving resizes.\n */\n private applyInitialSize(): void {\n const width = this.node.attrs.width as number | undefined\n const height = this.node.attrs.height as number | undefined\n\n if (width) {\n this.element.style.width = `${width}px`\n this.initialWidth = width\n } else {\n this.initialWidth = this.element.offsetWidth\n }\n\n if (height) {\n this.element.style.height = `${height}px`\n this.initialHeight = height\n } else {\n this.initialHeight = this.element.offsetHeight\n }\n\n // Calculate aspect ratio for use during resizing\n if (this.initialWidth > 0 && this.initialHeight > 0) {\n this.aspectRatio = this.initialWidth / this.initialHeight\n }\n }\n\n /**\n * Initiates a resize operation when a handle is clicked.\n *\n * Captures the starting mouse position and element dimensions, sets up\n * the resize state, adds the resizing class and state attribute, and\n * attaches document-level listeners for mouse movement and keyboard input.\n *\n * @param event - The mouse down event\n * @param direction - The direction of the handle being dragged\n */\n private handleResizeStart(\n event: MouseEvent | TouchEvent,\n direction: ResizableNodeViewDirection,\n ): void {\n event.preventDefault()\n event.stopPropagation()\n\n // Capture initial state\n this.isResizing = true\n this.activeHandle = direction\n\n if (isTouchEvent(event)) {\n this.startX = event.touches[0].clientX\n this.startY = event.touches[0].clientY\n } else {\n this.startX = event.clientX\n this.startY = event.clientY\n }\n\n this.startWidth = this.element.offsetWidth\n this.startHeight = this.element.offsetHeight\n\n // Recalculate aspect ratio at resize start for accuracy\n if (this.startWidth > 0 && this.startHeight > 0) {\n this.aspectRatio = this.startWidth / this.startHeight\n }\n\n const pos = this.getPos()\n if (pos !== undefined) {\n // TODO: Select the node in the editor\n }\n\n // Update UI state\n this.container.dataset.resizeState = 'true'\n\n if (this.classNames.resizing) {\n this.container.classList.add(this.classNames.resizing)\n }\n\n // Attach document-level listeners for resize\n document.addEventListener('mousemove', this.handleMouseMove)\n document.addEventListener('touchmove', this.handleTouchMove)\n document.addEventListener('mouseup', this.handleMouseUp)\n document.addEventListener('keydown', this.handleKeyDown)\n document.addEventListener('keyup', this.handleKeyUp)\n }\n\n /**\n * Handles mouse movement during an active resize.\n *\n * Calculates the delta from the starting position, computes new dimensions\n * based on the active handle direction, applies constraints and aspect ratio,\n * then updates the element's style and calls the onResize callback.\n *\n * @param event - The mouse move event\n */\n private handleMouseMove = (event: MouseEvent): void => {\n if (!this.isResizing || !this.activeHandle) {\n return\n }\n\n const deltaX = event.clientX - this.startX\n const deltaY = event.clientY - this.startY\n\n this.handleResize(deltaX, deltaY)\n }\n\n private handleTouchMove = (event: TouchEvent): void => {\n if (!this.isResizing || !this.activeHandle) {\n return\n }\n\n const touch = event.touches[0]\n if (!touch) {\n return\n }\n\n const deltaX = touch.clientX - this.startX\n const deltaY = touch.clientY - this.startY\n\n this.handleResize(deltaX, deltaY)\n }\n\n private handleResize(deltaX: number, deltaY: number) {\n if (!this.activeHandle) {\n return\n }\n\n const shouldPreserveAspectRatio = this.preserveAspectRatio || this.isShiftKeyPressed\n const { width, height } = this.calculateNewDimensions(this.activeHandle, deltaX, deltaY)\n const constrained = this.applyConstraints(width, height, shouldPreserveAspectRatio)\n\n this.element.style.width = `${constrained.width}px`\n this.element.style.height = `${constrained.height}px`\n\n if (this.onResize) {\n this.onResize(constrained.width, constrained.height)\n }\n }\n\n /**\n * Completes the resize operation when the mouse button is released.\n *\n * Captures final dimensions, calls the onCommit callback to persist changes,\n * removes the resizing state and class, and cleans up document-level listeners.\n */\n private handleMouseUp = (): void => {\n if (!this.isResizing) {\n return\n }\n\n const finalWidth = this.element.offsetWidth\n const finalHeight = this.element.offsetHeight\n\n this.onCommit(finalWidth, finalHeight)\n\n this.isResizing = false\n this.activeHandle = null\n\n // Remove UI state\n this.container.dataset.resizeState = 'false'\n\n if (this.classNames.resizing) {\n this.container.classList.remove(this.classNames.resizing)\n }\n\n // Clean up document-level listeners\n document.removeEventListener('mousemove', this.handleMouseMove)\n document.removeEventListener('mouseup', this.handleMouseUp)\n document.removeEventListener('keydown', this.handleKeyDown)\n document.removeEventListener('keyup', this.handleKeyUp)\n }\n\n /**\n * Tracks Shift key state to enable temporary aspect ratio locking.\n *\n * When Shift is pressed during resize, aspect ratio is preserved even if\n * preserveAspectRatio is false.\n *\n * @param event - The keyboard event\n */\n private handleKeyDown = (event: KeyboardEvent): void => {\n if (event.key === 'Shift') {\n this.isShiftKeyPressed = true\n }\n }\n\n /**\n * Tracks Shift key release to disable temporary aspect ratio locking.\n *\n * @param event - The keyboard event\n */\n private handleKeyUp = (event: KeyboardEvent): void => {\n if (event.key === 'Shift') {\n this.isShiftKeyPressed = false\n }\n }\n\n /**\n * Calculates new dimensions based on mouse delta and resize direction.\n *\n * Takes the starting dimensions and applies the mouse movement delta\n * according to the handle direction. For corner handles, both dimensions\n * are affected. For edge handles, only one dimension changes. If aspect\n * ratio should be preserved, delegates to applyAspectRatio.\n *\n * @param direction - The active resize handle direction\n * @param deltaX - Horizontal mouse movement since resize start\n * @param deltaY - Vertical mouse movement since resize start\n * @returns The calculated width and height\n */\n private calculateNewDimensions(\n direction: ResizableNodeViewDirection,\n deltaX: number,\n deltaY: number,\n ): ResizableNodeDimensions {\n let newWidth = this.startWidth\n let newHeight = this.startHeight\n\n const isRight = direction.includes('right')\n const isLeft = direction.includes('left')\n const isBottom = direction.includes('bottom')\n const isTop = direction.includes('top')\n\n // Apply horizontal delta\n if (isRight) {\n newWidth = this.startWidth + deltaX\n } else if (isLeft) {\n newWidth = this.startWidth - deltaX\n }\n\n // Apply vertical delta\n if (isBottom) {\n newHeight = this.startHeight + deltaY\n } else if (isTop) {\n newHeight = this.startHeight - deltaY\n }\n\n // For pure horizontal/vertical handles, only one dimension changes\n if (direction === 'right' || direction === 'left') {\n newWidth = this.startWidth + (isRight ? deltaX : -deltaX)\n }\n\n if (direction === 'top' || direction === 'bottom') {\n newHeight = this.startHeight + (isBottom ? deltaY : -deltaY)\n }\n\n const shouldPreserveAspectRatio = this.preserveAspectRatio || this.isShiftKeyPressed\n\n if (shouldPreserveAspectRatio) {\n return this.applyAspectRatio(newWidth, newHeight, direction)\n }\n\n return { width: newWidth, height: newHeight }\n }\n\n /**\n * Applies min/max constraints to dimensions.\n *\n * When aspect ratio is NOT preserved, constraints are applied independently\n * to width and height. When aspect ratio IS preserved, constraints are\n * applied while maintaining the aspect ratio—if one dimension hits a limit,\n * the other is recalculated proportionally.\n *\n * This ensures that aspect ratio is never broken when constrained.\n *\n * @param width - The unconstrained width\n * @param height - The unconstrained height\n * @param preserveAspectRatio - Whether to maintain aspect ratio while constraining\n * @returns The constrained dimensions\n */\n private applyConstraints(\n width: number,\n height: number,\n preserveAspectRatio: boolean,\n ): ResizableNodeDimensions {\n if (!preserveAspectRatio) {\n // Independent constraints for each dimension\n let constrainedWidth = Math.max(this.minSize.width, width)\n let constrainedHeight = Math.max(this.minSize.height, height)\n\n if (this.maxSize?.width) {\n constrainedWidth = Math.min(this.maxSize.width, constrainedWidth)\n }\n\n if (this.maxSize?.height) {\n constrainedHeight = Math.min(this.maxSize.height, constrainedHeight)\n }\n\n return { width: constrainedWidth, height: constrainedHeight }\n }\n\n // Aspect-ratio-aware constraints: adjust both dimensions proportionally\n let constrainedWidth = width\n let constrainedHeight = height\n\n // Check minimum constraints\n if (constrainedWidth < this.minSize.width) {\n constrainedWidth = this.minSize.width\n constrainedHeight = constrainedWidth / this.aspectRatio\n }\n\n if (constrainedHeight < this.minSize.height) {\n constrainedHeight = this.minSize.height\n constrainedWidth = constrainedHeight * this.aspectRatio\n }\n\n // Check maximum constraints\n if (this.maxSize?.width && constrainedWidth > this.maxSize.width) {\n constrainedWidth = this.maxSize.width\n constrainedHeight = constrainedWidth / this.aspectRatio\n }\n\n if (this.maxSize?.height && constrainedHeight > this.maxSize.height) {\n constrainedHeight = this.maxSize.height\n constrainedWidth = constrainedHeight * this.aspectRatio\n }\n\n return { width: constrainedWidth, height: constrainedHeight }\n }\n\n /**\n * Adjusts dimensions to maintain the original aspect ratio.\n *\n * For horizontal handles (left/right), uses width as the primary dimension\n * and calculates height from it. For vertical handles (top/bottom), uses\n * height as primary and calculates width. For corner handles, uses width\n * as the primary dimension.\n *\n * @param width - The new width\n * @param height - The new height\n * @param direction - The active resize direction\n * @returns Dimensions adjusted to preserve aspect ratio\n */\n private applyAspectRatio(\n width: number,\n height: number,\n direction: ResizableNodeViewDirection,\n ): ResizableNodeDimensions {\n const isHorizontal = direction === 'left' || direction === 'right'\n const isVertical = direction === 'top' || direction === 'bottom'\n\n if (isHorizontal) {\n // For horizontal resize, width is primary\n return {\n width,\n height: width / this.aspectRatio,\n }\n }\n\n if (isVertical) {\n // For vertical resize, height is primary\n return {\n width: height * this.aspectRatio,\n height,\n }\n }\n\n // For corner resize, width is primary\n return {\n width,\n height: width / this.aspectRatio,\n }\n }\n}\n\n/**\n * Alias for ResizableNodeView to maintain consistent naming.\n * @deprecated Use ResizableNodeView instead - will be removed in future versions.\n */\nexport const ResizableNodeview = ResizableNodeView\n","/**\n * Compare two attribute objects for equality.\n * Handles null/undefined and asserts key presence in both objects so that\n * `{ foo: undefined }` and `{ bar: undefined }` are not treated as equal.\n */\nexport function attrsEqual(\n a: Record | null | undefined,\n b: Record | null | undefined,\n): boolean {\n if (a === b) {\n return true\n }\n if (!a || !b) {\n return false\n }\n\n const keysA = Object.keys(a)\n const keysB = Object.keys(b)\n\n if (keysA.length !== keysB.length) {\n return false\n }\n\n return keysA.every(\n key => Object.prototype.hasOwnProperty.call(b, key) && Object.is(a[key], b[key]),\n )\n}\n","import type { NodeType } from '@tiptap/pm/model'\nimport { type EditorState, NodeSelection } from '@tiptap/pm/state'\n\nexport function canInsertNode(state: EditorState, nodeType: NodeType): boolean {\n const { selection } = state\n const { $from } = selection\n\n // Special handling for NodeSelection\n if (selection instanceof NodeSelection) {\n const index = $from.index()\n const parent = $from.parent\n\n // Can we replace the selected node with the horizontal rule?\n return parent.canReplaceWith(index, index + 1, nodeType)\n }\n\n // Default: check if we can insert at the current position\n let depth = $from.depth\n\n while (depth >= 0) {\n const index = $from.index(depth)\n const parent = $from.node(depth)\n const match = parent.contentMatchAt(index)\n if (match.matchType(nodeType)) {\n return true\n }\n depth -= 1\n }\n return false\n}\n","// source: https://stackoverflow.com/a/6969486\nexport function escapeForRegEx(string: string): string {\n return string.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&')\n}\n","/**\n * Read a CSS property value directly from an element's raw inline `style`\n * attribute, bypassing the CSSOM (e.g. `element.style.fontFamily`) which\n * canonicalizes values and can change formatting. The original format is\n * preserved (quotes, hex vs rgb, etc.).\n *\n * When a property is declared more than once, the last declaration wins —\n * this matches CSS cascade order and is useful when nested spans are merged\n * and the child's value should take priority.\n *\n * Property name comparison is case-insensitive.\n *\n * @param element - The element whose `style` attribute should be read.\n * @param propertyName - The CSS property name (e.g. `font-family`).\n * @returns The raw value string, or `null` if the property is not present.\n *\n * @example\n * ```ts\n * parseHTML: element => getStyleProperty(element, 'font-family')\n * ```\n */\nexport function getStyleProperty(element: HTMLElement, propertyName: string): string | null {\n const styleAttr = element.getAttribute('style')\n\n if (!styleAttr) {\n return null\n }\n\n const decls = styleAttr\n .split(';')\n .map(decl => decl.trim())\n .filter(Boolean)\n\n const target = propertyName.toLowerCase()\n\n for (let i = decls.length - 1; i >= 0; i -= 1) {\n const decl = decls[i]\n const colonIndex = decl.indexOf(':')\n\n if (colonIndex === -1) {\n continue\n }\n\n const prop = decl.slice(0, colonIndex).trim().toLowerCase()\n\n if (prop === target) {\n return decl.slice(colonIndex + 1).trim()\n }\n }\n\n return null\n}\n","/**\n * Decode common HTML entities in text content so they display as literal\n * characters inside the editor. The decode order matters: `&` must be\n * decoded **last** so that doubly-encoded sequences like `&lt;` first\n * survive the `<` pass and then correctly become `<` (not `<`).\n */\nexport function decodeHtmlEntities(text: string): string {\n return text\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/"/g, '\"')\n .replace(/&/g, '&')\n}\n\n/**\n * Encode HTML special characters so they roundtrip safely through markdown.\n * `&` is encoded **first** to avoid double-encoding the ampersand in other\n * entities (e.g. `<` → `<`, not `&lt;`).\n *\n * Note: `\"` is intentionally NOT encoded here because double quotes are\n * ordinary characters in markdown and do not need escaping. The decode\n * function still handles `"` because the markdown tokenizer may emit it.\n */\nexport function encodeHtmlEntities(text: string): string {\n return text.replace(/&/g, '&').replace(//g, '>')\n}\n","/**\n * Detects if the current browser is Firefox.\n * @returns `true` if the browser is Firefox, `false` otherwise.\n * @example\n * if (isFirefox()) {\n * // Firefox-specific handling\n * }\n */\nexport function isFirefox(): boolean {\n return typeof navigator !== 'undefined' ? /Firefox/.test(navigator.userAgent) : false\n}\n","export function isString(value: any): value is string {\n return typeof value === 'string'\n}\n","/**\n * @fileoverview Markdown utilities for creating standardized markdown specs.\n *\n * This module provides utilities for creating complete markdown specifications\n * for different types of nodes using unified syntax patterns.\n */\n\nexport * from './attributeUtils.js'\nexport * from './createAtomBlockMarkdownSpec.js'\nexport * from './createBlockMarkdownSpec.js'\nexport * from './createInlineMarkdownSpec.js'\nexport * from './parseIndentedBlocks.js'\nexport * from './renderNestedMarkdownContent.js'\n","/**\n * @fileoverview Utility functions for parsing and serializing markdown attributes.\n *\n * These utilities handle the common patterns for parsing attribute strings\n * in various markdown syntaxes like Pandoc attributes.\n */\n\n/**\n * Parses a Pandoc-style attribute string into an object.\n *\n * Supports the following patterns:\n * - Classes: `.className` → `{ class: 'className' }`\n * - IDs: `#myId` → `{ id: 'myId' }`\n * - Key-value pairs: `key=\"value\"` → `{ key: 'value' }`\n * - Boolean attributes: `disabled` → `{ disabled: true }`\n *\n * @param attrString - The attribute string to parse\n * @returns Parsed attributes object\n *\n * @example\n * ```ts\n * parseAttributes('.btn #submit disabled type=\"button\"')\n * // → { class: 'btn', id: 'submit', disabled: true, type: 'button' }\n * ```\n */\nexport function parseAttributes(attrString: string): Record {\n if (!attrString?.trim()) {\n return {}\n }\n\n const attributes: Record = {}\n\n // First, extract and remove quoted strings to avoid parsing content inside them\n const quotedStrings: string[] = []\n const tempString = attrString.replace(/[\"']([^\"']*)[\"']/g, match => {\n quotedStrings.push(match)\n return `__QUOTED_${quotedStrings.length - 1}__`\n })\n\n // Parse classes (.className) - only outside of quoted strings\n const classMatches = tempString.match(/(?:^|\\s)\\.([a-zA-Z][\\w-]*)/g)\n if (classMatches) {\n const classes = classMatches.map(match => match.trim().slice(1)) // Remove the dot\n attributes.class = classes.join(' ')\n }\n\n // Parse IDs (#myId) - only outside of quoted strings\n const idMatch = tempString.match(/(?:^|\\s)#([a-zA-Z][\\w-]*)/)\n if (idMatch) {\n attributes.id = idMatch[1]\n }\n\n // Parse key-value pairs (key=\"value\" or key='value') - restore quoted strings\n const kvRegex = /([a-zA-Z][\\w-]*)\\s*=\\s*(__QUOTED_\\d+__)/g\n const kvMatches = Array.from(tempString.matchAll(kvRegex))\n kvMatches.forEach(([, key, quotedRef]) => {\n const quotedIndex = parseInt(quotedRef.match(/__QUOTED_(\\d+)__/)?.[1] || '0', 10)\n const quotedValue = quotedStrings[quotedIndex]\n if (quotedValue) {\n // Remove the outer quotes\n attributes[key] = quotedValue.slice(1, -1)\n }\n })\n\n // Parse boolean attributes (standalone words that aren't classes/IDs)\n const cleanString = tempString\n .replace(/(?:^|\\s)\\.([a-zA-Z][\\w-]*)/g, '') // Remove classes\n .replace(/(?:^|\\s)#([a-zA-Z][\\w-]*)/g, '') // Remove IDs\n .replace(/([a-zA-Z][\\w-]*)\\s*=\\s*__QUOTED_\\d+__/g, '') // Remove key-value pairs\n .trim()\n\n if (cleanString) {\n const booleanAttrs = cleanString.split(/\\s+/).filter(Boolean)\n booleanAttrs.forEach(attr => {\n if (attr.match(/^[a-zA-Z][\\w-]*$/)) {\n attributes[attr] = true\n }\n })\n }\n\n return attributes\n}\n\n/**\n * Serializes an attributes object back to a Pandoc-style attribute string.\n *\n * @param attributes - The attributes object to serialize\n * @returns Serialized attribute string\n *\n * @example\n * ```ts\n * serializeAttributes({ class: 'btn primary', id: 'submit', disabled: true, type: 'button' })\n * // → '.btn.primary #submit disabled type=\"button\"'\n * ```\n */\nexport function serializeAttributes(attributes: Record): string {\n if (!attributes || Object.keys(attributes).length === 0) {\n return ''\n }\n\n const parts: string[] = []\n\n // Handle classes\n if (attributes.class) {\n const classes = String(attributes.class).split(/\\s+/).filter(Boolean)\n classes.forEach(cls => parts.push(`.${cls}`))\n }\n\n // Handle ID\n if (attributes.id) {\n parts.push(`#${attributes.id}`)\n }\n\n // Handle other attributes\n Object.entries(attributes).forEach(([key, value]) => {\n if (key === 'class' || key === 'id') {\n return // Already handled\n }\n\n if (value === true) {\n // Boolean attribute\n parts.push(key)\n } else if (value !== false && value != null) {\n // Key-value attribute\n parts.push(`${key}=\"${String(value)}\"`)\n }\n })\n\n return parts.join(' ')\n}\n","import type {\n JSONContent,\n MarkdownParseHelpers,\n MarkdownParseResult,\n MarkdownToken,\n MarkdownTokenizer,\n} from '../../types.js'\nimport {\n parseAttributes as defaultParseAttributes,\n serializeAttributes as defaultSerializeAttributes,\n} from './attributeUtils.js'\n\nexport interface AtomBlockMarkdownSpecOptions {\n /** The Tiptap node name this spec is for */\n nodeName: string\n /** The markdown syntax name (defaults to nodeName if not provided) */\n name?: string\n /** Function to parse attributes from token attribute string */\n parseAttributes?: (attrString: string) => Record\n /** Function to serialize attributes back to string for rendering */\n serializeAttributes?: (attrs: Record) => string\n /** Default attributes to apply when parsing */\n defaultAttributes?: Record\n /** Required attributes that must be present for successful parsing */\n requiredAttributes?: string[]\n /** Attributes that are allowed to be rendered back to markdown (whitelist) */\n allowedAttributes?: string[]\n}\n\n/**\n * Creates a complete markdown spec for atomic block nodes using Pandoc syntax.\n *\n * The generated spec handles:\n * - Parsing self-closing blocks with `:::blockName {attributes}`\n * - Extracting and parsing attributes\n * - Validating required attributes\n * - Rendering blocks back to markdown\n *\n * @param options - Configuration for the atomic block markdown spec\n * @returns Complete markdown specification object\n *\n * @example\n * ```ts\n * const youtubeSpec = createAtomBlockMarkdownSpec({\n * nodeName: 'youtube',\n * requiredAttributes: ['src'],\n * defaultAttributes: { start: 0 },\n * allowedAttributes: ['src', 'start', 'width', 'height'] // Only these get rendered to markdown\n * })\n *\n * // Usage in extension:\n * export const Youtube = Node.create({\n * // ... other config\n * markdown: youtubeSpec\n * })\n * ```\n */\nexport function createAtomBlockMarkdownSpec(options: AtomBlockMarkdownSpecOptions): {\n parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult\n markdownTokenizer: MarkdownTokenizer\n renderMarkdown: (node: JSONContent) => string\n} {\n const {\n nodeName,\n name: markdownName,\n parseAttributes = defaultParseAttributes,\n serializeAttributes = defaultSerializeAttributes,\n defaultAttributes = {},\n requiredAttributes = [],\n allowedAttributes,\n } = options\n\n // Use markdownName for syntax, fallback to nodeName\n const blockName = markdownName || nodeName\n\n // Helper function to filter attributes based on allowlist\n const filterAttributes = (attrs: Record) => {\n if (!allowedAttributes) {\n return attrs\n }\n\n const filtered: Record = {}\n allowedAttributes.forEach(key => {\n if (key in attrs) {\n filtered[key] = attrs[key]\n }\n })\n return filtered\n }\n\n return {\n parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => {\n const attrs = { ...defaultAttributes, ...token.attributes }\n return h.createNode(nodeName, attrs, [])\n },\n\n markdownTokenizer: {\n name: nodeName,\n level: 'block' as const,\n start(src: string) {\n const regex = new RegExp(`^:::${blockName}(?:\\\\s|$)`, 'm')\n const index = src.match(regex)?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, _tokens, _lexer) {\n // Use non-global regex to match from the start of the string\n // Include optional newline to ensure we consume the entire line\n const regex = new RegExp(`^:::${blockName}(?:\\\\s+\\\\{([^}]*)\\\\})?\\\\s*:::(?:\\\\n|$)`)\n const match = src.match(regex)\n\n if (!match) {\n return undefined\n }\n\n // Parse attributes if present\n const attrString = match[1] || ''\n const attributes = parseAttributes(attrString)\n\n // Validate required attributes\n const missingRequired = requiredAttributes.find(required => !(required in attributes))\n if (missingRequired) {\n return undefined\n }\n\n return {\n type: nodeName,\n raw: match[0],\n attributes,\n }\n },\n },\n\n renderMarkdown: node => {\n const filteredAttrs = filterAttributes(node.attrs || {})\n const attrs = serializeAttributes(filteredAttrs)\n const attrString = attrs ? ` {${attrs}}` : ''\n\n return `:::${blockName}${attrString} :::`\n },\n }\n}\n","import type {\n JSONContent,\n MarkdownParseHelpers,\n MarkdownParseResult,\n MarkdownRendererHelpers,\n MarkdownToken,\n MarkdownTokenizer,\n} from '../../types.js'\nimport {\n parseAttributes as defaultParseAttributes,\n serializeAttributes as defaultSerializeAttributes,\n} from './attributeUtils.js'\n\nexport interface BlockMarkdownSpecOptions {\n /** The Tiptap node name this spec is for */\n nodeName: string\n /** The markdown syntax name (defaults to nodeName if not provided) */\n name?: string\n /** Function to extract content from the node for serialization */\n getContent?: (token: MarkdownToken) => string\n /** Function to parse attributes from the attribute string */\n parseAttributes?: (attrString: string) => Record\n /** Function to serialize attributes to string */\n serializeAttributes?: (attrs: Record) => string\n /** Default attributes to apply when parsing */\n defaultAttributes?: Record\n /** Content type: 'block' allows paragraphs/lists/etc, 'inline' only allows bold/italic/links/etc */\n content?: 'block' | 'inline'\n /** Allowlist of attributes to include in markdown (if not provided, all attributes are included) */\n allowedAttributes?: string[]\n}\n\n/**\n * Creates a complete markdown spec for block-level nodes using Pandoc syntax.\n *\n * The generated spec handles:\n * - Parsing blocks with `:::blockName {attributes}` syntax\n * - Extracting and parsing attributes\n * - Rendering blocks back to markdown with proper formatting\n * - Nested content support\n *\n * @param options - Configuration for the block markdown spec\n * @returns Complete markdown specification object\n *\n * @example\n * ```ts\n * const calloutSpec = createBlockMarkdownSpec({\n * nodeName: 'callout',\n * defaultAttributes: { type: 'info' },\n * allowedAttributes: ['type', 'title'] // Only these get rendered to markdown\n * })\n *\n * // Usage in extension:\n * export const Callout = Node.create({\n * // ... other config\n * markdown: calloutSpec\n * })\n * ```\n */\nexport function createBlockMarkdownSpec(options: BlockMarkdownSpecOptions): {\n parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult\n markdownTokenizer: MarkdownTokenizer\n renderMarkdown: (node: JSONContent, h: MarkdownRendererHelpers) => string\n} {\n const {\n nodeName,\n name: markdownName,\n getContent,\n parseAttributes = defaultParseAttributes,\n serializeAttributes = defaultSerializeAttributes,\n defaultAttributes = {},\n content = 'block',\n allowedAttributes,\n } = options\n\n // Use markdownName for syntax, fallback to nodeName\n const blockName = markdownName || nodeName\n\n // Helper function to filter attributes based on allowlist\n const filterAttributes = (attrs: Record) => {\n if (!allowedAttributes) {\n return attrs\n }\n\n const filtered: Record = {}\n allowedAttributes.forEach(key => {\n if (key in attrs) {\n filtered[key] = attrs[key]\n }\n })\n return filtered\n }\n\n return {\n parseMarkdown: (token, h) => {\n let nodeContent: JSONContent[]\n\n if (getContent) {\n const contentResult = getContent(token)\n // If getContent returns a string, wrap it in a text node\n nodeContent =\n typeof contentResult === 'string'\n ? [{ type: 'text', text: contentResult }]\n : contentResult\n } else if (content === 'block') {\n nodeContent = h.parseChildren(token.tokens || [])\n } else {\n nodeContent = h.parseInline(token.tokens || [])\n }\n\n const attrs = { ...defaultAttributes, ...token.attributes }\n\n return h.createNode(nodeName, attrs, nodeContent)\n },\n\n markdownTokenizer: {\n name: nodeName,\n level: 'block' as const,\n start(src) {\n const regex = new RegExp(`^:::${blockName}`, 'm')\n const index = src.match(regex)?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, _tokens, lexer) {\n // Match the opening tag with optional attributes\n const openingRegex = new RegExp(`^:::${blockName}(?:\\\\s+\\\\{([^}]*)\\\\})?\\\\s*\\\\n`)\n const openingMatch = src.match(openingRegex)\n\n if (!openingMatch) {\n return undefined\n }\n\n const [openingTag, attrString = ''] = openingMatch\n const attributes = parseAttributes(attrString)\n\n // Find the matching closing tag by tracking nesting level\n let level = 1\n const position = openingTag.length\n let matchedContent = ''\n\n // Pattern to match any block opening (:::word) or closing (:::)\n const blockPattern = /^:::([\\w-]*)(\\s.*)?/gm\n const remaining = src.slice(position)\n\n blockPattern.lastIndex = 0\n\n // run until no more matches are found\n for (;;) {\n const match = blockPattern.exec(remaining)\n if (match === null) {\n break\n }\n const matchPos = match.index\n const blockType = match[1] // Empty string for closing tag, block name for opening\n\n if (match[2]?.endsWith(':::')) {\n // this is an atom ::: node, we skip it\n continue\n }\n\n if (blockType) {\n // Opening tag found - increase level\n level += 1\n } else {\n // Closing tag found - decrease level\n level -= 1\n\n if (level === 0) {\n // Found our matching closing tag\n // Don't trim yet - keep newlines for tokenizer regex matching\n const rawContent = remaining.slice(0, matchPos)\n matchedContent = rawContent.trim()\n const fullMatch = src.slice(0, position + matchPos + match[0].length)\n\n // Tokenize the content\n let contentTokens: MarkdownToken[] = []\n if (matchedContent) {\n if (content === 'block') {\n // Use rawContent for tokenization to preserve line boundaries for regex matching\n contentTokens = lexer.blockTokens(rawContent)\n\n // Parse inline tokens for any token that has text content but no tokens\n contentTokens.forEach(token => {\n if (token.text && (!token.tokens || token.tokens.length === 0)) {\n token.tokens = lexer.inlineTokens(token.text)\n }\n })\n\n // Clean up empty trailing paragraphs\n while (contentTokens.length > 0) {\n const lastToken = contentTokens[contentTokens.length - 1]\n if (\n lastToken.type === 'paragraph' &&\n (!lastToken.text || lastToken.text.trim() === '')\n ) {\n contentTokens.pop()\n } else {\n break\n }\n }\n } else {\n contentTokens = lexer.inlineTokens(matchedContent)\n }\n }\n\n return {\n type: nodeName,\n raw: fullMatch,\n attributes,\n content: matchedContent,\n tokens: contentTokens,\n }\n }\n }\n }\n\n // No matching closing tag found\n return undefined\n },\n },\n\n renderMarkdown: (node, h) => {\n const filteredAttrs = filterAttributes(node.attrs || {})\n const attrs = serializeAttributes(filteredAttrs)\n const attrString = attrs ? ` {${attrs}}` : ''\n const renderedContent = h.renderChildren(node.content || [], '\\n\\n')\n\n return `:::${blockName}${attrString}\\n\\n${renderedContent}\\n\\n:::`\n },\n }\n}\n","import type {\n JSONContent,\n MarkdownParseHelpers,\n MarkdownParseResult,\n MarkdownToken,\n MarkdownTokenizer,\n} from '../../types.js'\n\n/**\n * Parse shortcode attributes like 'id=\"madonna\" handle=\"john\" name=\"John Doe\"'\n * Requires all values to be quoted with either single or double quotes\n */\nfunction parseShortcodeAttributes(attrString: string): Record {\n if (!attrString.trim()) {\n return {}\n }\n\n const attributes: Record = {}\n // Match key=value pairs, only accepting quoted values\n const regex = /(\\w+)=(?:\"([^\"]*)\"|'([^']*)')/g\n let match = regex.exec(attrString)\n\n while (match !== null) {\n const [, key, doubleQuoted, singleQuoted] = match\n attributes[key] = doubleQuoted || singleQuoted\n match = regex.exec(attrString)\n }\n\n return attributes\n}\n\n/**\n * Serialize attributes back to shortcode format\n * Always quotes all values with double quotes\n */\nfunction serializeShortcodeAttributes(attrs: Record): string {\n return Object.entries(attrs)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => `${key}=\"${value}\"`)\n .join(' ')\n}\n\n/**\n * Configuration for an allowed attribute in markdown serialization.\n * Can be a simple string (attribute name) or an object with additional options.\n */\nexport type AllowedAttribute =\n | string\n | {\n /** The attribute name */\n name: string\n /**\n * If provided, the attribute will be skipped during serialization when its value\n * equals this default value. This keeps markdown output clean by omitting\n * attributes that have their default values.\n */\n skipIfDefault?: any\n }\n\nexport interface InlineMarkdownSpecOptions {\n /** The Tiptap node name this spec is for */\n nodeName: string\n /** The shortcode name (defaults to nodeName if not provided) */\n name?: string\n /** Function to extract content from the node for serialization */\n getContent?: (node: any) => string\n /** Function to parse attributes from the attribute string */\n parseAttributes?: (attrString: string) => Record\n /** Function to serialize attributes to string */\n serializeAttributes?: (attrs: Record) => string\n /** Default attributes to apply when parsing */\n defaultAttributes?: Record\n /** Whether this is a self-closing shortcode (no content, like [emoji name=party]) */\n selfClosing?: boolean\n /**\n * Allowlist of attributes to include in markdown serialization.\n * If not provided, all attributes are included.\n *\n * Each item can be either:\n * - A string: the attribute name (always included if present)\n * - An object: `{ name: string, skipIfDefault?: any }` for conditional inclusion\n *\n * @example\n * // Simple string attributes (backward compatible)\n * allowedAttributes: ['id', 'label']\n *\n * // Mixed with conditional attributes\n * allowedAttributes: [\n * 'id',\n * 'label',\n * { name: 'mentionSuggestionChar', skipIfDefault: '@' }\n * ]\n */\n allowedAttributes?: AllowedAttribute[]\n}\n\n/**\n * Creates a complete markdown spec for inline nodes using attribute syntax.\n *\n * The generated spec handles:\n * - Parsing shortcode syntax with `[nodeName attributes]content[/nodeName]` format\n * - Self-closing shortcodes like `[emoji name=party_popper]`\n * - Extracting and parsing attributes from the opening tag\n * - Rendering inline elements back to shortcode markdown\n * - Supporting both content-based and self-closing inline elements\n *\n * @param options - Configuration for the inline markdown spec\n * @returns Complete markdown specification object\n *\n * @example\n * ```ts\n * // Self-closing mention: [mention id=\"madonna\" label=\"Madonna\"]\n * const mentionSpec = createInlineMarkdownSpec({\n * nodeName: 'mention',\n * selfClosing: true,\n * defaultAttributes: { type: 'user' },\n * allowedAttributes: ['id', 'label'] // Only these get rendered to markdown\n * })\n *\n * // Self-closing emoji: [emoji name=\"party_popper\"]\n * const emojiSpec = createInlineMarkdownSpec({\n * nodeName: 'emoji',\n * selfClosing: true,\n * allowedAttributes: ['name']\n * })\n *\n * // With content: [highlight color=\"yellow\"]text[/highlight]\n * const highlightSpec = createInlineMarkdownSpec({\n * nodeName: 'highlight',\n * selfClosing: false,\n * allowedAttributes: ['color', 'style']\n * })\n *\n * // Usage in extension:\n * export const Mention = Node.create({\n * name: 'mention', // Must match nodeName\n * // ... other config\n * markdown: mentionSpec\n * })\n * ```\n */\nexport function createInlineMarkdownSpec(options: InlineMarkdownSpecOptions): {\n parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult\n markdownTokenizer: MarkdownTokenizer\n renderMarkdown: (node: JSONContent) => string\n} {\n const {\n nodeName,\n name: shortcodeName,\n getContent,\n parseAttributes = parseShortcodeAttributes,\n serializeAttributes = serializeShortcodeAttributes,\n defaultAttributes = {},\n selfClosing = false,\n allowedAttributes,\n } = options\n\n // Use shortcodeName for markdown syntax, fallback to nodeName\n const shortcode = shortcodeName || nodeName\n\n // Helper function to filter attributes based on allowlist\n const filterAttributes = (attrs: Record) => {\n if (!allowedAttributes) {\n return attrs\n }\n\n const filtered: Record = {}\n allowedAttributes.forEach(attr => {\n // Handle both string and object formats for backward compatibility\n const attrName = typeof attr === 'string' ? attr : attr.name\n const skipIfDefault = typeof attr === 'string' ? undefined : attr.skipIfDefault\n\n if (attrName in attrs) {\n const value = attrs[attrName]\n\n // Skip if value equals the default (when skipIfDefault is specified)\n if (skipIfDefault !== undefined && value === skipIfDefault) {\n return\n }\n\n filtered[attrName] = value\n }\n })\n return filtered\n }\n\n // Escape special regex characters in shortcode name\n const escapedShortcode = shortcode.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\n return {\n parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => {\n const attrs = { ...defaultAttributes, ...token.attributes }\n\n if (selfClosing) {\n // Self-closing nodes like mentions are atomic - no content\n return h.createNode(nodeName, attrs)\n }\n\n // Nodes with content\n const content = getContent ? getContent(token) : token.content || ''\n if (content) {\n // For inline content, create text nodes using the proper helper\n return h.createNode(nodeName, attrs, [h.createTextNode(content)])\n }\n return h.createNode(nodeName, attrs, [])\n },\n\n markdownTokenizer: {\n name: nodeName,\n level: 'inline' as const,\n start(src: string) {\n // Create a non-global version for finding the start position\n const startPattern = selfClosing\n ? new RegExp(`\\\\[${escapedShortcode}\\\\s*[^\\\\]]*\\\\]`)\n : new RegExp(`\\\\[${escapedShortcode}\\\\s*[^\\\\]]*\\\\][\\\\s\\\\S]*?\\\\[\\\\/${escapedShortcode}\\\\]`)\n\n const match = src.match(startPattern)\n const index = match?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, _tokens, _lexer) {\n // Use non-global regex to match from the start of the string\n const tokenPattern = selfClosing\n ? new RegExp(`^\\\\[${escapedShortcode}\\\\s*([^\\\\]]*)\\\\]`)\n : new RegExp(\n `^\\\\[${escapedShortcode}\\\\s*([^\\\\]]*)\\\\]([\\\\s\\\\S]*?)\\\\[\\\\/${escapedShortcode}\\\\]`,\n )\n\n const match = src.match(tokenPattern)\n\n if (!match) {\n return undefined\n }\n\n let content = ''\n let attrString = ''\n\n if (selfClosing) {\n // Self-closing: [shortcode attr=\"value\"]\n const [, attrs] = match\n attrString = attrs\n } else {\n // With content: [shortcode attr=\"value\"]content[/shortcode]\n const [, attrs, contentMatch] = match\n attrString = attrs\n content = contentMatch || ''\n }\n\n // Parse attributes from the attribute string\n const attributes = parseAttributes(attrString.trim())\n\n return {\n type: nodeName,\n raw: match[0],\n content: content.trim(),\n attributes,\n }\n },\n },\n\n renderMarkdown: (node: JSONContent) => {\n let content = ''\n if (getContent) {\n content = getContent(node)\n } else if (node.content && node.content.length > 0) {\n // Extract text from content array for inline nodes\n content = node.content\n .filter((child: any) => child.type === 'text')\n .map((child: any) => child.text)\n .join('')\n }\n\n const filteredAttrs = filterAttributes(node.attrs || {})\n const attrs = serializeAttributes(filteredAttrs)\n const attrString = attrs ? ` ${attrs}` : ''\n\n if (selfClosing) {\n return `[${shortcode}${attrString}]`\n }\n\n return `[${shortcode}${attrString}]${content}[/${shortcode}]`\n },\n }\n}\n","/**\n * @fileoverview Utility for parsing indented markdown blocks with hierarchical nesting.\n *\n * This utility handles the complex logic of parsing markdown blocks that can contain\n * nested content based on indentation levels, maintaining proper hierarchical structure\n * for lists, task lists, and other indented block types.\n */\n\nexport interface ParsedBlock {\n type: string\n raw: string\n mainContent: string\n indentLevel: number\n nestedContent?: string\n nestedTokens?: any[]\n [key: string]: any\n}\n\nexport interface BlockParserConfig {\n /** Regex pattern to match block items */\n itemPattern: RegExp\n /** Function to extract data from regex match */\n extractItemData: (match: RegExpMatchArray) => {\n mainContent: string\n indentLevel: number\n [key: string]: any\n }\n /** Function to create the final token */\n createToken: (data: any, nestedTokens?: any[]) => ParsedBlock\n /** Base indentation to remove from nested content (default: 2 spaces) */\n baseIndentSize?: number\n /**\n * Custom parser for nested content. If provided, this will be called instead\n * of the default lexer.blockTokens() for parsing nested content.\n * This allows recursive parsing of the same block type.\n */\n customNestedParser?: (dedentedContent: string) => any[] | undefined\n}\n\n/**\n * Parses markdown text into hierarchical indented blocks with proper nesting.\n *\n * This utility handles:\n * - Line-by-line parsing with pattern matching\n * - Hierarchical nesting based on indentation levels\n * - Nested content collection and parsing\n * - Empty line handling\n * - Content dedenting for nested blocks\n *\n * The key difference from flat parsing is that this maintains the hierarchical\n * structure where nested items become `nestedTokens` of their parent items,\n * rather than being flattened into a single array.\n *\n * @param src - The markdown source text to parse\n * @param config - Configuration object defining how to parse and create tokens\n * @param lexer - Markdown lexer for parsing nested content\n * @returns Parsed result with hierarchical items, or undefined if no matches\n *\n * @example\n * ```ts\n * const result = parseIndentedBlocks(src, {\n * itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n * extractItemData: (match) => ({\n * indentLevel: match[1].length,\n * mainContent: match[4],\n * checked: match[3].toLowerCase() === 'x'\n * }),\n * createToken: (data, nestedTokens) => ({\n * type: 'taskItem',\n * checked: data.checked,\n * text: data.mainContent,\n * nestedTokens\n * })\n * }, lexer)\n * ```\n */\nexport function parseIndentedBlocks(\n src: string,\n config: BlockParserConfig,\n lexer: {\n inlineTokens: (src: string) => any[]\n blockTokens: (src: string) => any[]\n },\n):\n | {\n items: ParsedBlock[]\n raw: string\n }\n | undefined {\n const lines = src.split('\\n')\n const items: ParsedBlock[] = []\n let totalRaw = ''\n let i = 0\n const baseIndentSize = config.baseIndentSize || 2\n\n while (i < lines.length) {\n const currentLine = lines[i]\n const itemMatch = currentLine.match(config.itemPattern)\n\n if (!itemMatch) {\n // Not a matching item - stop if we have items, otherwise this isn't our block type\n if (items.length > 0) {\n break\n } else if (currentLine.trim() === '') {\n i += 1\n totalRaw = `${totalRaw}${currentLine}\\n`\n continue\n } else {\n return undefined\n }\n }\n\n const itemData = config.extractItemData(itemMatch)\n const { indentLevel, mainContent } = itemData\n totalRaw = `${totalRaw}${currentLine}\\n`\n\n // Collect content for this item (including nested items)\n const itemContent = [mainContent] // Start with the main text\n i += 1\n\n // Look ahead for nested content (indented more than current item)\n while (i < lines.length) {\n const nextLine = lines[i]\n\n if (nextLine.trim() === '') {\n // Empty line - might be end of nested content\n const nextNonEmptyIndex = lines.slice(i + 1).findIndex(l => l.trim() !== '')\n if (nextNonEmptyIndex === -1) {\n // No more content\n break\n }\n\n const nextNonEmpty = lines[i + 1 + nextNonEmptyIndex]\n const nextIndent = nextNonEmpty.match(/^(\\s*)/)?.[1]?.length || 0\n\n if (nextIndent > indentLevel) {\n // Nested content continues after empty line\n itemContent.push(nextLine)\n totalRaw = `${totalRaw}${nextLine}\\n`\n i += 1\n continue\n } else {\n // End of nested content\n break\n }\n }\n\n const nextIndent = nextLine.match(/^(\\s*)/)?.[1]?.length || 0\n\n if (nextIndent > indentLevel) {\n // This is nested content for the current item\n itemContent.push(nextLine)\n totalRaw = `${totalRaw}${nextLine}\\n`\n i += 1\n } else {\n // Same or less indentation - this belongs to parent level\n break\n }\n }\n\n // Parse nested content if present\n let nestedTokens: any[] | undefined\n const nestedContent = itemContent.slice(1)\n\n if (nestedContent.length > 0) {\n // Remove the base indentation from nested content\n const dedentedNested = nestedContent\n .map(nestedLine => nestedLine.slice(indentLevel + baseIndentSize)) // Remove base indent + 2 spaces\n .join('\\n')\n\n if (dedentedNested.trim()) {\n // Use custom nested parser if provided, otherwise fall back to default\n if (config.customNestedParser) {\n nestedTokens = config.customNestedParser(dedentedNested)\n } else {\n nestedTokens = lexer.blockTokens(dedentedNested)\n }\n }\n }\n\n // Create the token using the provided factory function\n const token = config.createToken(itemData, nestedTokens)\n items.push(token)\n }\n\n if (items.length === 0) {\n return undefined\n }\n\n return {\n items,\n raw: totalRaw,\n }\n}\n","import type { JSONContent } from '@tiptap/core'\n\n/**\n * @fileoverview Utility functions for rendering nested content in markdown.\n *\n * This module provides reusable utilities for extensions that need to render\n * content with a prefix on the main line and properly indented nested content.\n */\n\n/**\n * Utility function for rendering content with a main line prefix and nested indented content.\n *\n * This function handles the common pattern of rendering content with:\n * 1. A main line with a prefix (like \"- \" for lists, \"> \" for blockquotes, etc.)\n * 2. Nested content that gets indented properly\n *\n * @param node - The ProseMirror node representing the content\n * @param h - The markdown renderer helper\n * @param prefixOrGenerator - Either a string prefix or a function that generates the prefix from context\n * @param ctx - Optional context object (used when prefixOrGenerator is a function)\n * @returns The rendered markdown string\n *\n * @example\n * ```ts\n * // For a bullet list item with static prefix\n * return renderNestedMarkdownContent(node, h, '- ')\n *\n * // For a task item with static prefix\n * const prefix = `- [${node.attrs?.checked ? 'x' : ' '}] `\n * return renderNestedMarkdownContent(node, h, prefix)\n *\n * // For a blockquote with static prefix\n * return renderNestedMarkdownContent(node, h, '> ')\n *\n * // For content with dynamic prefix based on context\n * return renderNestedMarkdownContent(node, h, ctx => {\n * if (ctx.parentType === 'orderedList') {\n * return `${ctx.index + 1}. `\n * }\n * return '- '\n * }, ctx)\n *\n * // Custom extension example\n * const CustomContainer = Node.create({\n * name: 'customContainer',\n * // ... other config\n * markdown: {\n * render: (node, h) => {\n * const type = node.attrs?.type || 'info'\n * return renderNestedMarkdownContent(node, h, `[${type}] `)\n * }\n * }\n * })\n * ```\n */\nexport function renderNestedMarkdownContent(\n node: JSONContent,\n h: {\n renderChildren: (nodes: JSONContent[]) => string\n renderChild?: (node: JSONContent, index: number) => string\n indent: (text: string) => string\n },\n prefixOrGenerator: string | ((ctx: any) => string),\n ctx?: any,\n): string {\n if (!node || !Array.isArray(node.content)) {\n return ''\n }\n\n // Determine the prefix based on the input\n const prefix =\n typeof prefixOrGenerator === 'function' ? prefixOrGenerator(ctx) : prefixOrGenerator\n\n const [content, ...children] = node.content\n\n // Render the main content (typically a paragraph)\n const mainContent = h.renderChildren([content])\n let output = `${prefix}${mainContent}`\n\n // Handle nested children with proper indentation\n if (children && children.length > 0) {\n children.forEach((child, index) => {\n const childContent = h.renderChild?.(child, index + 1) ?? h.renderChildren([child])\n if (childContent !== undefined && childContent !== null) {\n // Split the child content by lines and indent each line\n const indentedChild = childContent\n .split('\\n')\n .map(line => (line ? h.indent(line) : h.indent('')))\n .join('\\n')\n\n output += child.type === 'paragraph' ? `\\n\\n${indentedChild}` : `\\n${indentedChild}`\n }\n })\n }\n\n return output\n}\n","import { attrsEqual } from './attrsEqual.js'\n\n/**\n * Compare two arrays of mark objects for equality.\n * Marks are compared by type and attributes (using attrsEqual),\n * so key ordering in attrs does not matter.\n */\nexport function marksEqual(\n a: { type: string; attrs?: Record }[],\n b: { type: string; attrs?: Record }[],\n): boolean {\n if (a.length !== b.length) {\n return false\n }\n\n return a.every((mark, i) => {\n const other = b[i]\n return mark.type === other.type && attrsEqual(mark.attrs, other.attrs)\n })\n}\n","import type { Mark } from '@tiptap/pm/model'\nimport type { ViewMutationRecord } from '@tiptap/pm/view'\n\nimport type { Editor } from './Editor.js'\nimport type { MarkViewProps, MarkViewRendererOptions } from './types.js'\nimport { isAndroid, isiOS } from './utilities/index.js'\n\nexport function updateMarkViewAttributes(\n checkMark: Mark,\n editor: Editor,\n attrs: Record = {},\n): void {\n const { state } = editor\n const { doc, tr } = state\n const thisMark = checkMark\n\n doc.descendants((node, pos) => {\n const from = tr.mapping.map(pos)\n const to = tr.mapping.map(pos) + node.nodeSize\n let foundMark: Mark | null = null\n\n // find the mark on the current node\n node.marks.forEach(mark => {\n if (mark !== thisMark) {\n return false\n }\n\n foundMark = mark\n })\n\n if (!foundMark) {\n return\n }\n\n // check if we need to update given the attributes\n let needsUpdate = false\n Object.keys(attrs).forEach(k => {\n if (attrs[k] !== foundMark!.attrs[k]) {\n needsUpdate = true\n }\n })\n\n if (needsUpdate) {\n const updatedMark = checkMark.type.create({\n ...checkMark.attrs,\n ...attrs,\n })\n\n tr.removeMark(from, to, checkMark.type)\n tr.addMark(from, to, updatedMark)\n }\n })\n\n if (tr.docChanged) {\n editor.view.dispatch(tr)\n }\n}\n\nexport class MarkView<\n Component,\n Options extends MarkViewRendererOptions = MarkViewRendererOptions,\n> {\n component: Component\n editor: Editor\n options: Options\n mark: MarkViewProps['mark']\n HTMLAttributes: MarkViewProps['HTMLAttributes']\n\n constructor(component: Component, props: MarkViewProps, options?: Partial) {\n this.component = component\n this.editor = props.editor\n this.options = { ...options } as Options\n this.mark = props.mark\n this.HTMLAttributes = props.HTMLAttributes\n }\n\n get dom(): HTMLElement {\n return this.editor.view.dom\n }\n\n get contentDOM(): HTMLElement | null {\n return null\n }\n\n /**\n * Update the attributes of the mark in the document.\n * @param attrs The attributes to update.\n */\n updateAttributes(attrs: Record, checkMark?: Mark): void {\n updateMarkViewAttributes(checkMark || this.mark, this.editor, attrs)\n }\n\n ignoreMutation(mutation: ViewMutationRecord): boolean {\n if (!this.dom || !this.contentDOM) {\n return true\n }\n\n if (typeof this.options.ignoreMutation === 'function') {\n return this.options.ignoreMutation({ mutation })\n }\n\n if (mutation.type === 'selection') {\n return false\n }\n\n if (\n this.dom.contains(mutation.target) &&\n mutation.type === 'childList' &&\n (isiOS() || isAndroid()) &&\n this.editor.isFocused\n ) {\n const changedNodes = [\n ...Array.from(mutation.addedNodes),\n ...Array.from(mutation.removedNodes),\n ] as HTMLElement[]\n\n if (changedNodes.every(node => node.isContentEditable)) {\n return false\n }\n }\n\n if (this.contentDOM === mutation.target && mutation.type === 'attributes') {\n return true\n }\n\n if (this.contentDOM.contains(mutation.target)) {\n return false\n }\n\n return true\n }\n}\n","import type { DOMOutputSpec, Node as ProseMirrorNode, NodeSpec, NodeType } from '@tiptap/pm/model'\n\nimport type { Editor } from './Editor.js'\nimport type { ExtendableConfig } from './Extendable.js'\nimport { Extendable } from './Extendable.js'\nimport type { Attributes, NodeViewRenderer, ParentConfig } from './types.js'\n\nexport interface NodeConfig extends ExtendableConfig<\n Options,\n Storage,\n NodeConfig,\n NodeType\n> {\n /**\n * Node View\n */\n addNodeView?:\n | ((this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: NodeType\n parent: ParentConfig>['addNodeView']\n }) => NodeViewRenderer | null)\n | null\n\n /**\n * Defines if this node should be a top level node (doc)\n * @default false\n * @example true\n */\n topNode?: boolean\n\n /**\n * The content expression for this node, as described in the [schema\n * guide](/docs/guide/#schema.content_expressions). When not given,\n * the node does not allow any content.\n *\n * You can read more about it on the Prosemirror documentation here\n * @see https://prosemirror.net/docs/guide/#schema.content_expressions\n * @default undefined\n * @example content: 'block+'\n * @example content: 'headline paragraph block*'\n */\n content?:\n | NodeSpec['content']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['content']\n editor?: Editor\n }) => NodeSpec['content'])\n\n /**\n * The marks that are allowed inside of this node. May be a\n * space-separated string referring to mark names or groups, `\"_\"`\n * to explicitly allow all marks, or `\"\"` to disallow marks. When\n * not given, nodes with inline content default to allowing all\n * marks, other nodes default to not allowing marks.\n *\n * @example marks: 'strong em'\n */\n marks?:\n | NodeSpec['marks']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['marks']\n editor?: Editor\n }) => NodeSpec['marks'])\n\n /**\n * The group or space-separated groups to which this node belongs,\n * which can be referred to in the content expressions for the\n * schema.\n *\n * By default Tiptap uses the groups 'block' and 'inline' for nodes. You\n * can also use custom groups if you want to group specific nodes together\n * and handle them in your schema.\n * @example group: 'block'\n * @example group: 'inline'\n * @example group: 'customBlock' // this uses a custom group\n */\n group?:\n | NodeSpec['group']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['group']\n editor?: Editor\n }) => NodeSpec['group'])\n\n /**\n * Should be set to true for inline nodes. (Implied for text nodes.)\n */\n inline?:\n | NodeSpec['inline']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['inline']\n editor?: Editor\n }) => NodeSpec['inline'])\n\n /**\n * Can be set to true to indicate that, though this isn't a [leaf\n * node](https://prosemirror.net/docs/ref/#model.NodeType.isLeaf), it doesn't have directly editable\n * content and should be treated as a single unit in the view.\n *\n * @example atom: true\n */\n atom?:\n | NodeSpec['atom']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['atom']\n editor?: Editor\n }) => NodeSpec['atom'])\n\n /**\n * Controls whether nodes of this type can be selected as a [node\n * selection](https://prosemirror.net/docs/ref/#state.NodeSelection). Defaults to true for non-text\n * nodes.\n *\n * @default true\n * @example selectable: false\n */\n selectable?:\n | NodeSpec['selectable']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['selectable']\n editor?: Editor\n }) => NodeSpec['selectable'])\n\n /**\n * Determines whether nodes of this type can be dragged without\n * being selected. Defaults to false.\n *\n * @default: false\n * @example: draggable: true\n */\n draggable?:\n | NodeSpec['draggable']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['draggable']\n editor?: Editor\n }) => NodeSpec['draggable'])\n\n /**\n * Can be used to indicate that this node contains code, which\n * causes some commands to behave differently.\n */\n code?:\n | NodeSpec['code']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['code']\n editor?: Editor\n }) => NodeSpec['code'])\n\n /**\n * Controls way whitespace in this a node is parsed. The default is\n * `\"normal\"`, which causes the [DOM parser](https://prosemirror.net/docs/ref/#model.DOMParser) to\n * collapse whitespace in normal mode, and normalize it (replacing\n * newlines and such with spaces) otherwise. `\"pre\"` causes the\n * parser to preserve spaces inside the node. When this option isn't\n * given, but [`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) is true, `whitespace`\n * will default to `\"pre\"`. Note that this option doesn't influence\n * the way the node is rendered—that should be handled by `toDOM`\n * and/or styling.\n */\n whitespace?:\n | NodeSpec['whitespace']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['whitespace']\n editor?: Editor\n }) => NodeSpec['whitespace'])\n\n /**\n * Allows a **single** node to be set as linebreak equivalent (e.g. hardBreak).\n * When converting between block types that have whitespace set to \"pre\"\n * and don't support the linebreak node (e.g. codeBlock) and other block types\n * that do support the linebreak node (e.g. paragraphs) - this node will be used\n * as the linebreak instead of stripping the newline.\n *\n * See [linebreakReplacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement).\n */\n linebreakReplacement?:\n | NodeSpec['linebreakReplacement']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['linebreakReplacement']\n editor?: Editor\n }) => NodeSpec['linebreakReplacement'])\n\n /**\n * When enabled, enables both\n * [`definingAsContext`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext) and\n * [`definingForContent`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).\n *\n * @default false\n * @example isolating: true\n */\n defining?:\n | NodeSpec['defining']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['defining']\n editor?: Editor\n }) => NodeSpec['defining'])\n\n /**\n * When enabled (default is false), the sides of nodes of this type\n * count as boundaries that regular editing operations, like\n * backspacing or lifting, won't cross. An example of a node that\n * should probably have this enabled is a table cell.\n */\n isolating?:\n | NodeSpec['isolating']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['isolating']\n editor?: Editor\n }) => NodeSpec['isolating'])\n\n /**\n * Associates DOM parser information with this node, which can be\n * used by [`DOMParser.fromSchema`](https://prosemirror.net/docs/ref/#model.DOMParser^fromSchema) to\n * automatically derive a parser. The `node` field in the rules is\n * implied (the name of this node will be filled in automatically).\n * If you supply your own parser, you do not need to also specify\n * parsing rules in your schema.\n *\n * @example parseHTML: [{ tag: 'div', attrs: { 'data-id': 'my-block' } }]\n */\n parseHTML?: (this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['parseHTML']\n editor?: Editor\n }) => NodeSpec['parseDOM']\n\n /**\n * A description of a DOM structure. Can be either a string, which is\n * interpreted as a text node, a DOM node, which is interpreted as\n * itself, a `{dom, contentDOM}` object, or an array.\n *\n * An array describes a DOM element. The first value in the array\n * should be a string—the name of the DOM element, optionally prefixed\n * by a namespace URL and a space. If the second element is plain\n * object, it is interpreted as a set of attributes for the element.\n * Any elements after that (including the 2nd if it's not an attribute\n * object) are interpreted as children of the DOM elements, and must\n * either be valid `DOMOutputSpec` values, or the number zero.\n *\n * The number zero (pronounced “hole”) is used to indicate the place\n * where a node's child nodes should be inserted. If it occurs in an\n * output spec, it should be the only child element in its parent\n * node.\n *\n * @example toDOM: ['div[data-id=\"my-block\"]', { class: 'my-block' }, 0]\n */\n renderHTML?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['renderHTML']\n editor?: Editor\n },\n props: {\n node: ProseMirrorNode\n HTMLAttributes: Record\n },\n ) => DOMOutputSpec)\n | null\n\n /**\n * renders the node as text\n * @example renderText: () => 'foo\n */\n renderText?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['renderText']\n editor?: Editor\n },\n props: {\n node: ProseMirrorNode\n pos: number\n parent: ProseMirrorNode\n index: number\n },\n ) => string)\n | null\n\n /**\n * Add attributes to the node\n * @example addAttributes: () => ({ class: 'foo' })\n */\n addAttributes?: (this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['addAttributes']\n editor?: Editor\n // oxlint-disable-next-lineno-empty-object-type\n }) => Attributes | {}\n}\n\n/**\n * The Node class is used to create custom node extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nexport class Node extends Extendable<\n Options,\n Storage,\n NodeConfig\n> {\n type = 'node'\n\n /**\n * Create a new Node instance\n * @param config - Node configuration object or a function that returns a configuration object\n */\n static create(\n config: Partial> | (() => Partial>) = {},\n ) {\n // If the config is a function, execute it to get the configuration object\n const resolvedConfig = typeof config === 'function' ? config() : config\n return new Node(resolvedConfig)\n }\n\n configure(options?: Partial) {\n return super.configure(options) as Node\n }\n\n extend<\n ExtendedOptions = Options,\n ExtendedStorage = Storage,\n ExtendedConfig extends NodeConfig = NodeConfig<\n ExtendedOptions,\n ExtendedStorage\n >,\n >(\n extendedConfig?:\n | (() => Partial)\n | (Partial &\n ThisType<{\n name: string\n options: ExtendedOptions\n storage: ExtendedStorage\n editor: Editor\n type: NodeType\n }>),\n ): Node {\n // If the extended config is a function, execute it to get the configuration object\n const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig\n return super.extend(resolvedConfig) as Node\n }\n}\n","import { NodeSelection } from '@tiptap/pm/state'\nimport type { NodeView as ProseMirrorNodeView, ViewMutationRecord } from '@tiptap/pm/view'\n\nimport type { Editor as CoreEditor } from './Editor.js'\nimport type { DecorationWithType, NodeViewRendererOptions, NodeViewRendererProps } from './types.js'\nimport { isAndroid } from './utilities/isAndroid.js'\nimport { isiOS } from './utilities/isiOS.js'\n\n/**\n * Node views are used to customize the rendered DOM structure of a node.\n * @see https://tiptap.dev/guide/node-views\n */\nexport class NodeView<\n Component,\n NodeEditor extends CoreEditor = CoreEditor,\n Options extends NodeViewRendererOptions = NodeViewRendererOptions,\n> implements ProseMirrorNodeView {\n component: Component\n\n editor: NodeEditor\n\n options: Options\n\n extension: NodeViewRendererProps['extension']\n\n node: NodeViewRendererProps['node']\n\n decorations: NodeViewRendererProps['decorations']\n\n innerDecorations: NodeViewRendererProps['innerDecorations']\n\n view: NodeViewRendererProps['view']\n\n getPos: NodeViewRendererProps['getPos']\n\n HTMLAttributes: NodeViewRendererProps['HTMLAttributes']\n\n isDragging = false\n\n constructor(component: Component, props: NodeViewRendererProps, options?: Partial) {\n this.component = component\n this.editor = props.editor as NodeEditor\n this.options = {\n stopEvent: null,\n ignoreMutation: null,\n ...options,\n } as Options\n this.extension = props.extension\n this.node = props.node\n this.decorations = props.decorations as DecorationWithType[]\n this.innerDecorations = props.innerDecorations\n this.view = props.view\n this.HTMLAttributes = props.HTMLAttributes\n this.getPos = props.getPos\n this.mount()\n }\n\n mount() {\n // oxlint-disable-next-line\n return\n }\n\n get dom(): HTMLElement {\n return this.editor.view.dom as HTMLElement\n }\n\n get contentDOM(): HTMLElement | null {\n return null\n }\n\n onDragStart(event: DragEvent) {\n const { view } = this.editor\n const target = event.target as HTMLElement\n\n // get the drag handle element\n // `closest` is not available for text nodes so we may have to use its parent\n const dragHandle =\n target.nodeType === 3\n ? target.parentElement?.closest('[data-drag-handle]')\n : target.closest('[data-drag-handle]')\n\n if (!this.dom || this.contentDOM?.contains(target) || !dragHandle) {\n return\n }\n\n let x = 0\n let y = 0\n\n // calculate offset for drag element if we use a different drag handle element\n if (this.dom !== dragHandle) {\n const domBox = this.dom.getBoundingClientRect()\n const handleBox = dragHandle.getBoundingClientRect()\n\n // In React, we have to go through nativeEvent to reach offsetX/offsetY.\n const offsetX = event.offsetX ?? (event as any).nativeEvent?.offsetX\n const offsetY = event.offsetY ?? (event as any).nativeEvent?.offsetY\n\n x = handleBox.x - domBox.x + offsetX\n y = handleBox.y - domBox.y + offsetY\n }\n\n const clonedNode = this.dom.cloneNode(true) as HTMLElement\n\n // Preserve the visual size of the original when using the clone as\n // the drag image.\n try {\n const domBox = this.dom.getBoundingClientRect()\n clonedNode.style.width = `${Math.round(domBox.width)}px`\n clonedNode.style.height = `${Math.round(domBox.height)}px`\n clonedNode.style.boxSizing = 'border-box'\n // Ensure the clone doesn't capture pointer events while offscreen\n clonedNode.style.pointerEvents = 'none'\n } catch {\n // ignore measurement errors (e.g. if element not in DOM)\n }\n\n // Some browsers (notably Safari) require the element passed to\n // setDragImage to be present in the DOM. Using a detached node can\n // cause the drag to immediately end.\n let dragImageWrapper: HTMLElement | null = null\n\n try {\n dragImageWrapper = document.createElement('div')\n dragImageWrapper.style.position = 'absolute'\n dragImageWrapper.style.top = '-9999px'\n dragImageWrapper.style.left = '-9999px'\n dragImageWrapper.style.pointerEvents = 'none'\n dragImageWrapper.appendChild(clonedNode)\n document.body.appendChild(dragImageWrapper)\n\n event.dataTransfer?.setDragImage(clonedNode, x, y)\n } finally {\n // Remove the wrapper on the next tick so the browser can use the\n // element as the drag image. A 0ms timeout is enough in practice.\n if (dragImageWrapper) {\n setTimeout(() => {\n try {\n dragImageWrapper?.remove()\n } catch {\n // ignore removal errors\n }\n }, 0)\n }\n }\n\n const pos = this.getPos()\n\n if (typeof pos !== 'number') {\n return\n }\n // we need to tell ProseMirror that we want to move the whole node\n // so we create a NodeSelection\n const selection = NodeSelection.create(view.state.doc, pos)\n const transaction = view.state.tr.setSelection(selection)\n\n view.dispatch(transaction)\n }\n\n stopEvent(event: Event) {\n if (!this.dom) {\n return false\n }\n\n if (typeof this.options.stopEvent === 'function') {\n return this.options.stopEvent({ event })\n }\n\n const target = event.target as HTMLElement\n const isInElement = this.dom.contains(target) && !this.contentDOM?.contains(target)\n\n // any event from child nodes should be handled by ProseMirror\n if (!isInElement) {\n return false\n }\n\n const isDragEvent = event.type.startsWith('drag')\n const isDragOverEnterEvent = event.type === 'dragover' || event.type === 'dragenter'\n const isDropEvent = event.type === 'drop'\n const isInput =\n ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA'].includes(target.tagName) || target.isContentEditable\n\n // any input event within node views should be ignored by ProseMirror\n if (isInput && !isDropEvent && !isDragEvent) {\n return true\n }\n\n const { isEditable } = this.editor\n const { isDragging } = this\n const isDraggable = !!this.node.type.spec.draggable\n const isSelectable = NodeSelection.isSelectable(this.node)\n const isCopyEvent = event.type === 'copy'\n const isPasteEvent = event.type === 'paste'\n const isCutEvent = event.type === 'cut'\n const isClickEvent = event.type === 'mousedown'\n\n // ProseMirror tries to drag selectable nodes\n // even if `draggable` is set to `false`\n // this fix prevents that\n if (!isDraggable && isSelectable && isDragEvent && event.target === this.dom) {\n event.preventDefault()\n }\n\n if (isDraggable && isDragEvent && !isDragging && event.target === this.dom) {\n event.preventDefault()\n return false\n }\n\n // we have to store that dragging started\n if (isDraggable && isEditable && !isDragging && isClickEvent) {\n const dragHandle = target.closest('[data-drag-handle]')\n const isValidDragHandle =\n dragHandle && (this.dom === dragHandle || this.dom.contains(dragHandle))\n\n if (isValidDragHandle) {\n this.isDragging = true\n\n document.addEventListener(\n 'dragend',\n () => {\n this.isDragging = false\n },\n { once: true },\n )\n\n document.addEventListener(\n 'drop',\n () => {\n this.isDragging = false\n },\n { once: true },\n )\n\n document.addEventListener(\n 'mouseup',\n () => {\n this.isDragging = false\n },\n { once: true },\n )\n }\n }\n\n // these events are handled by prosemirror\n if (\n isDragging ||\n isDragOverEnterEvent ||\n isDropEvent ||\n isCopyEvent ||\n isPasteEvent ||\n isCutEvent ||\n (isClickEvent && isSelectable)\n ) {\n return false\n }\n\n return true\n }\n\n /**\n * Called when a DOM [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) or a selection change happens within the view.\n * @return `false` if the editor should re-read the selection or re-parse the range around the mutation\n * @return `true` if it can safely be ignored.\n */\n ignoreMutation(mutation: ViewMutationRecord) {\n if (!this.dom || !this.contentDOM) {\n return true\n }\n\n if (typeof this.options.ignoreMutation === 'function') {\n return this.options.ignoreMutation({ mutation })\n }\n\n // a leaf/atom node is like a black box for ProseMirror\n // and should be fully handled by the node view\n if (this.node.isLeaf || this.node.isAtom) {\n return true\n }\n\n // ProseMirror should handle any selections\n if (mutation.type === 'selection') {\n return false\n }\n\n // try to prevent a bug on iOS and Android that will break node views on enter\n // this is because ProseMirror can’t preventDispatch on enter\n // this will lead to a re-render of the node view on enter\n // see: https://github.com/ueberdosis/tiptap/issues/1214\n // see: https://github.com/ueberdosis/tiptap/issues/2534\n if (\n this.dom.contains(mutation.target) &&\n mutation.type === 'childList' &&\n (isiOS() || isAndroid()) &&\n this.editor.isFocused\n ) {\n const changedNodes = [\n ...Array.from(mutation.addedNodes),\n ...Array.from(mutation.removedNodes),\n ] as HTMLElement[]\n\n // we’ll check if every changed node is contentEditable\n // to make sure it’s probably mutated by ProseMirror\n if (changedNodes.every(node => node.isContentEditable)) {\n return false\n }\n }\n\n // we will allow mutation contentDOM with attributes\n // so we can for example adding classes within our node view\n if (this.contentDOM === mutation.target && mutation.type === 'attributes') {\n return true\n }\n\n // ProseMirror should handle any changes within contentDOM\n if (this.contentDOM.contains(mutation.target)) {\n return false\n }\n\n return true\n }\n\n /**\n * Update the attributes of the prosemirror node.\n */\n updateAttributes(attributes: Record): void {\n this.editor.commands.command(({ tr }) => {\n const pos = this.getPos()\n\n if (typeof pos !== 'number') {\n return false\n }\n\n tr.setNodeMarkup(pos, undefined, {\n ...this.node.attrs,\n ...attributes,\n })\n\n return true\n })\n }\n\n /**\n * Delete the node.\n */\n deleteNode(): void {\n const from = this.getPos()\n\n if (typeof from !== 'number') {\n return\n }\n const to = from + this.node.nodeSize\n\n this.editor.commands.deleteRange({ from, to })\n }\n}\n","import type { MarkType } from '@tiptap/pm/model'\n\nimport { getMarksBetween } from '../helpers/getMarksBetween.js'\nimport type { PasteRuleFinder } from '../PasteRule.js'\nimport { PasteRule } from '../PasteRule.js'\nimport type { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an paste rule that adds a mark when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nexport function markPasteRule(config: {\n find: PasteRuleFinder\n type: MarkType\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record)\n | false\n | null\n}) {\n return new PasteRule({\n find: config.find,\n handler: ({ state, range, match, pasteEvent }) => {\n const attributes = callOrReturn(config.getAttributes, undefined, match, pasteEvent)\n\n if (attributes === false || attributes === null) {\n return null\n }\n\n const { tr } = state\n const captureGroup = match[match.length - 1]\n const fullMatch = match[0]\n let markEnd = range.to\n\n if (captureGroup) {\n const startSpaces = fullMatch.search(/\\S/)\n const textStart = range.from + fullMatch.indexOf(captureGroup)\n const textEnd = textStart + captureGroup.length\n\n const excludedMarks = getMarksBetween(range.from, range.to, state.doc)\n .filter(item => {\n // @ts-ignore\n const excluded = item.mark.type.excluded as MarkType[]\n\n return excluded.find(type => type === config.type && type !== item.mark.type)\n })\n .filter(item => item.to > textStart)\n\n if (excludedMarks.length) {\n return null\n }\n\n if (textEnd < range.to) {\n tr.delete(textEnd, range.to)\n }\n\n if (textStart > range.from) {\n tr.delete(range.from + startSpaces, textStart)\n }\n\n markEnd = range.from + startSpaces + captureGroup.length\n\n tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {}))\n\n // Only remove the stored mark if the match is not at the end of the\n // pasted text. When a mark extends to the end of the content, removing\n // it overrides the mark's `inclusive` behavior and incorrectly places\n // the cursor outside the mark.\n const isMatchAtEndOfText =\n match.index !== undefined &&\n match.input !== undefined &&\n match.index + match[0].length >= match.input.length\n\n if (!isMatchAtEndOfText) {\n tr.removeStoredMark(config.type)\n }\n }\n },\n })\n}\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport type { PasteRuleFinder } from '../PasteRule.js'\nimport { PasteRule } from '../PasteRule.js'\nimport type { ExtendedRegExpMatchArray, JSONContent } from '../types.js'\nimport { callOrReturn } from '../utilities/index.js'\n\n/**\n * Build an paste rule that adds a node when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/api/paste-rules\n */\nexport function nodePasteRule(config: {\n find: PasteRuleFinder\n type: NodeType\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record)\n | false\n | null\n getContent?: JSONContent[] | ((attrs: Record) => JSONContent[]) | false | null\n}) {\n return new PasteRule({\n find: config.find,\n handler({ match, chain, range, pasteEvent }) {\n const attributes = callOrReturn(config.getAttributes, undefined, match, pasteEvent)\n const content = callOrReturn(config.getContent, undefined, attributes)\n\n if (attributes === false || attributes === null) {\n return null\n }\n\n const node = { type: config.type.name, attrs: attributes } as JSONContent\n\n if (content) {\n node.content = content\n }\n\n if (match.input) {\n chain().deleteRange(range).insertContentAt(range.from, node)\n }\n },\n })\n}\n","import type { PasteRuleFinder } from '../PasteRule.js'\nimport { PasteRule } from '../PasteRule.js'\n\n/**\n * Build an paste rule that replaces text when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nexport function textPasteRule(config: { find: PasteRuleFinder; replace: string }) {\n return new PasteRule({\n find: config.find,\n handler: ({ state, range, match }) => {\n let insert = config.replace\n let start = range.from\n const end = range.to\n\n if (match[1]) {\n const offset = match[0].lastIndexOf(match[1])\n\n insert += match[0].slice(offset + match[1].length)\n start += offset\n\n const cutOff = start - end\n\n if (cutOff > 0) {\n insert = match[0].slice(offset - cutOff, offset) + insert\n start = end\n }\n }\n\n state.tr.insertText(insert, start, end)\n },\n })\n}\n","import type { Transaction } from '@tiptap/pm/state'\n\nexport interface TrackerResult {\n position: number\n deleted: boolean\n}\n\nexport class Tracker {\n transaction: Transaction\n\n currentStep: number\n\n constructor(transaction: Transaction) {\n this.transaction = transaction\n this.currentStep = this.transaction.steps.length\n }\n\n map(position: number): TrackerResult {\n let deleted = false\n\n const mappedPosition = this.transaction.steps\n .slice(this.currentStep)\n .reduce((newPosition, step) => {\n const mapResult = step.getMap().mapResult(newPosition)\n\n if (mapResult.deleted) {\n deleted = true\n }\n\n return mapResult.pos\n }, position)\n\n return {\n position: mappedPosition,\n deleted,\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,cAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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;AAAA,EACF,CAAC;AACH;;;AC1BO,IAAM,UAAN,MAAc;AAAA,EAKnB,YAAY,aAA0B;AACpC,SAAK,cAAc;AACnB,SAAK,cAAc,KAAK,YAAY,MAAM;AAAA,EAC5C;AAAA,EAEA,IAAI,UAAiC;AACnC,QAAI,UAAU;AAEd,UAAM,iBAAiB,KAAK,YAAY,MACrC,MAAM,KAAK,WAAW,EACtB,OAAO,CAAC,aAAa,SAAS;AAC7B,YAAM,YAAY,KAAK,OAAO,EAAE,UAAU,WAAW;AAErD,UAAI,UAAU,SAAS;AACrB,kBAAU;AAAA,MACZ;AAEA,aAAO,UAAU;AAAA,IACnB,GAAG,QAAQ;AAEb,WAAO;AAAA,MACL,UAAU;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACF;","names":["Fragment","Node","command","run","originalCreateParagraphNear","import_commands","originalExitCode","import_state","mark","import_state","import_state","import_model","ProseMirrorNode","import_state","import_transform","isTextSelection","import_commands","originalJoinUp","originalJoinDown","originalJoinBackward","originalJoinForward","import_transform","import_transform","import_commands","originalCommand","import_commands","originalCommand","import_commands","isActive","originalLift","import_commands","originalLiftEmptyBlock","originalLiftListItem","import_commands","originalNewlineInCode","import_state","import_commands","originalSelectNodeBackward","import_commands","originalSelectNodeForward","import_commands","originalSelectParentNode","import_commands","originalSelectTextblockEnd","import_commands","originalSelectTextblockStart","document","import_transform","import_model","import_model","import_model","import_model","import_model","node","output","range","import_state","import_commands","import_state","import_state","import_schema_list","originalSinkListItem","import_state","import_transform","first","import_model","import_state","import_transform","newNextTypeAttributes","nextType","import_state","import_transform","isActive","isActive","isActive","import_commands","originalWrapIn","import_schema_list","originalWrapInList","import_state","import_model","import_state","import_model","import_state","run","from","to","import_state","import_transform","_a","_b","_c","import_state","import_state","import_state","import_state","tr","import_state","import_state","import_state","style","focus","blur","import_transform","Fragment","constrainedWidth","constrainedHeight","import_state","parseAttributes","serializeAttributes","h","parseAttributes","serializeAttributes","h","parseAttributes","serializeAttributes","h","nextIndent","h","Node","import_state"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.d.cts deleted file mode 100644 index 5ac63a6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.d.cts +++ /dev/null @@ -1,5121 +0,0 @@ -import { Transaction, EditorState, Plugin, Selection, NodeSelection, TextSelection, PluginKey } from '@tiptap/pm/state'; -import { Node as Node$1, MarkType as MarkType$1, MarkSpec, Mark as Mark$1, DOMOutputSpec, NodeType as NodeType$1, NodeSpec, Slice, ParseOptions, Fragment as Fragment$1, Schema, ContentMatch, ResolvedPos, ParseRule } from '@tiptap/pm/model'; -import { NodeViewConstructor, NodeView as NodeView$1, MarkViewConstructor, MarkView as MarkView$1, EditorProps, EditorView, Decoration, DecorationAttrs, ViewMutationRecord, DecorationSource } from '@tiptap/pm/view'; -import { Transform, Mappable, MapResult } from '@tiptap/pm/transform'; - -type StringKeyOf = Extract; -type CallbackType, EventName extends StringKeyOf> = T[EventName] extends any[] ? T[EventName] : [T[EventName]]; -type CallbackFunction, EventName extends StringKeyOf> = (...props: CallbackType) => any; -declare class EventEmitter> { - private callbacks; - on>(event: EventName, fn: CallbackFunction): this; - emit>(event: EventName, ...args: CallbackType): this; - off>(event: EventName, fn?: CallbackFunction): this; - once>(event: EventName, fn: CallbackFunction): this; - removeAllListeners(): void; -} - -/** - * Returns a new `Transform` based on all steps of the passed transactions. - * @param oldDoc The Prosemirror node to start from - * @param transactions The transactions to combine - * @returns A new `Transform` with all steps of the passed transactions - */ -declare function combineTransactionSteps(oldDoc: Node$1, transactions: Transaction[]): Transform; - -/** - * Takes a Transaction & Editor State and turns it into a chainable state object - * @param config The transaction and state to create the chainable state from - * @returns A chainable Editor state object - */ -declare function createChainableState(config: { - transaction: Transaction; - state: EditorState; -}): EditorState; - -type InputRuleMatch = { - index: number; - text: string; - replaceWith?: string; - match?: RegExpMatchArray; - data?: Record; -}; -type InputRuleFinder = RegExp | ((text: string) => InputRuleMatch | null); -declare class InputRule { - find: InputRuleFinder; - handler: (props: { - state: EditorState; - range: Range; - match: ExtendedRegExpMatchArray; - commands: SingleCommands; - chain: () => ChainedCommands; - can: () => CanCommands; - }) => void | null; - undoable: boolean; - constructor(config: { - find: InputRuleFinder; - handler: (props: { - state: EditorState; - range: Range; - match: ExtendedRegExpMatchArray; - commands: SingleCommands; - chain: () => ChainedCommands; - can: () => CanCommands; - }) => void | null; - undoable?: boolean; - }); -} -/** - * Create an input rules plugin. When enabled, it will cause text - * input that matches any of the given rules to trigger the rule’s - * action. - */ -declare function inputRulesPlugin(props: { - editor: Editor; - rules: InputRule[]; -}): Plugin; - -interface MarkConfig extends ExtendableConfig, MarkType$1> { - /** - * Mark View - */ - addMarkView?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: MarkType$1; - parent: ParentConfig>['addMarkView']; - }) => MarkViewRenderer) | null; - /** - * Keep mark after split node - */ - keepOnSplit?: boolean | (() => boolean); - /** - * Whether this mark is removed by `unsetAllMarks`. - * Set to `false` for semantic marks (comments, suggestions) that should survive "clear formatting". - * @default true - */ - clearable?: boolean | (() => boolean); - /** - * Inclusive - */ - inclusive?: MarkSpec['inclusive'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['inclusive']; - editor?: Editor; - }) => MarkSpec['inclusive']); - /** - * Excludes - */ - excludes?: MarkSpec['excludes'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['excludes']; - editor?: Editor; - }) => MarkSpec['excludes']); - /** - * Marks this Mark as exitable - */ - exitable?: boolean | (() => boolean); - /** - * Group - */ - group?: MarkSpec['group'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['group']; - editor?: Editor; - }) => MarkSpec['group']); - /** - * Spanning - */ - spanning?: MarkSpec['spanning'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['spanning']; - editor?: Editor; - }) => MarkSpec['spanning']); - /** - * Code - */ - code?: boolean | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['code']; - editor?: Editor; - }) => boolean); - /** - * Parse HTML - */ - parseHTML?: (this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['parseHTML']; - editor?: Editor; - }) => MarkSpec['parseDOM']; - /** - * Render HTML - */ - renderHTML?: ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['renderHTML']; - editor?: Editor; - }, props: { - mark: Mark$1; - HTMLAttributes: Record; - }) => DOMOutputSpec) | null; - /** - * Attributes - */ - addAttributes?: (this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['addAttributes']; - editor?: Editor; - }) => Attributes$1 | {}; -} -/** - * The Mark class is used to create custom mark extensions. - * @see https://tiptap.dev/api/extensions#create-a-new-extension - */ -declare class Mark extends Extendable> { - type: string; - /** - * Create a new Mark instance - * @param config - Mark configuration object or a function that returns a configuration object - */ - static create(config?: Partial> | (() => Partial>)): Mark; - static handleExit({ editor, mark }: { - editor: Editor; - mark: Mark; - }): boolean; - configure(options?: Partial): Mark; - extend = MarkConfig>(extendedConfig?: (() => Partial) | (Partial & ThisType<{ - name: string; - options: ExtendedOptions; - storage: ExtendedStorage; - editor: Editor; - type: MarkType$1; - }>)): Mark; -} - -interface NodeConfig extends ExtendableConfig, NodeType$1> { - /** - * Node View - */ - addNodeView?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: NodeType$1; - parent: ParentConfig>['addNodeView']; - }) => NodeViewRenderer | null) | null; - /** - * Defines if this node should be a top level node (doc) - * @default false - * @example true - */ - topNode?: boolean; - /** - * The content expression for this node, as described in the [schema - * guide](/docs/guide/#schema.content_expressions). When not given, - * the node does not allow any content. - * - * You can read more about it on the Prosemirror documentation here - * @see https://prosemirror.net/docs/guide/#schema.content_expressions - * @default undefined - * @example content: 'block+' - * @example content: 'headline paragraph block*' - */ - content?: NodeSpec['content'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['content']; - editor?: Editor; - }) => NodeSpec['content']); - /** - * The marks that are allowed inside of this node. May be a - * space-separated string referring to mark names or groups, `"_"` - * to explicitly allow all marks, or `""` to disallow marks. When - * not given, nodes with inline content default to allowing all - * marks, other nodes default to not allowing marks. - * - * @example marks: 'strong em' - */ - marks?: NodeSpec['marks'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['marks']; - editor?: Editor; - }) => NodeSpec['marks']); - /** - * The group or space-separated groups to which this node belongs, - * which can be referred to in the content expressions for the - * schema. - * - * By default Tiptap uses the groups 'block' and 'inline' for nodes. You - * can also use custom groups if you want to group specific nodes together - * and handle them in your schema. - * @example group: 'block' - * @example group: 'inline' - * @example group: 'customBlock' // this uses a custom group - */ - group?: NodeSpec['group'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['group']; - editor?: Editor; - }) => NodeSpec['group']); - /** - * Should be set to true for inline nodes. (Implied for text nodes.) - */ - inline?: NodeSpec['inline'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['inline']; - editor?: Editor; - }) => NodeSpec['inline']); - /** - * Can be set to true to indicate that, though this isn't a [leaf - * node](https://prosemirror.net/docs/ref/#model.NodeType.isLeaf), it doesn't have directly editable - * content and should be treated as a single unit in the view. - * - * @example atom: true - */ - atom?: NodeSpec['atom'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['atom']; - editor?: Editor; - }) => NodeSpec['atom']); - /** - * Controls whether nodes of this type can be selected as a [node - * selection](https://prosemirror.net/docs/ref/#state.NodeSelection). Defaults to true for non-text - * nodes. - * - * @default true - * @example selectable: false - */ - selectable?: NodeSpec['selectable'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['selectable']; - editor?: Editor; - }) => NodeSpec['selectable']); - /** - * Determines whether nodes of this type can be dragged without - * being selected. Defaults to false. - * - * @default: false - * @example: draggable: true - */ - draggable?: NodeSpec['draggable'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['draggable']; - editor?: Editor; - }) => NodeSpec['draggable']); - /** - * Can be used to indicate that this node contains code, which - * causes some commands to behave differently. - */ - code?: NodeSpec['code'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['code']; - editor?: Editor; - }) => NodeSpec['code']); - /** - * Controls way whitespace in this a node is parsed. The default is - * `"normal"`, which causes the [DOM parser](https://prosemirror.net/docs/ref/#model.DOMParser) to - * collapse whitespace in normal mode, and normalize it (replacing - * newlines and such with spaces) otherwise. `"pre"` causes the - * parser to preserve spaces inside the node. When this option isn't - * given, but [`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) is true, `whitespace` - * will default to `"pre"`. Note that this option doesn't influence - * the way the node is rendered—that should be handled by `toDOM` - * and/or styling. - */ - whitespace?: NodeSpec['whitespace'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['whitespace']; - editor?: Editor; - }) => NodeSpec['whitespace']); - /** - * Allows a **single** node to be set as linebreak equivalent (e.g. hardBreak). - * When converting between block types that have whitespace set to "pre" - * and don't support the linebreak node (e.g. codeBlock) and other block types - * that do support the linebreak node (e.g. paragraphs) - this node will be used - * as the linebreak instead of stripping the newline. - * - * See [linebreakReplacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement). - */ - linebreakReplacement?: NodeSpec['linebreakReplacement'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['linebreakReplacement']; - editor?: Editor; - }) => NodeSpec['linebreakReplacement']); - /** - * When enabled, enables both - * [`definingAsContext`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext) and - * [`definingForContent`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent). - * - * @default false - * @example isolating: true - */ - defining?: NodeSpec['defining'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['defining']; - editor?: Editor; - }) => NodeSpec['defining']); - /** - * When enabled (default is false), the sides of nodes of this type - * count as boundaries that regular editing operations, like - * backspacing or lifting, won't cross. An example of a node that - * should probably have this enabled is a table cell. - */ - isolating?: NodeSpec['isolating'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['isolating']; - editor?: Editor; - }) => NodeSpec['isolating']); - /** - * Associates DOM parser information with this node, which can be - * used by [`DOMParser.fromSchema`](https://prosemirror.net/docs/ref/#model.DOMParser^fromSchema) to - * automatically derive a parser. The `node` field in the rules is - * implied (the name of this node will be filled in automatically). - * If you supply your own parser, you do not need to also specify - * parsing rules in your schema. - * - * @example parseHTML: [{ tag: 'div', attrs: { 'data-id': 'my-block' } }] - */ - parseHTML?: (this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['parseHTML']; - editor?: Editor; - }) => NodeSpec['parseDOM']; - /** - * A description of a DOM structure. Can be either a string, which is - * interpreted as a text node, a DOM node, which is interpreted as - * itself, a `{dom, contentDOM}` object, or an array. - * - * An array describes a DOM element. The first value in the array - * should be a string—the name of the DOM element, optionally prefixed - * by a namespace URL and a space. If the second element is plain - * object, it is interpreted as a set of attributes for the element. - * Any elements after that (including the 2nd if it's not an attribute - * object) are interpreted as children of the DOM elements, and must - * either be valid `DOMOutputSpec` values, or the number zero. - * - * The number zero (pronounced “hole”) is used to indicate the place - * where a node's child nodes should be inserted. If it occurs in an - * output spec, it should be the only child element in its parent - * node. - * - * @example toDOM: ['div[data-id="my-block"]', { class: 'my-block' }, 0] - */ - renderHTML?: ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['renderHTML']; - editor?: Editor; - }, props: { - node: Node$1; - HTMLAttributes: Record; - }) => DOMOutputSpec) | null; - /** - * renders the node as text - * @example renderText: () => 'foo - */ - renderText?: ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['renderText']; - editor?: Editor; - }, props: { - node: Node$1; - pos: number; - parent: Node$1; - index: number; - }) => string) | null; - /** - * Add attributes to the node - * @example addAttributes: () => ({ class: 'foo' }) - */ - addAttributes?: (this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['addAttributes']; - editor?: Editor; - }) => Attributes$1 | {}; -} -/** - * The Node class is used to create custom node extensions. - * @see https://tiptap.dev/api/extensions#create-a-new-extension - */ -declare class Node extends Extendable> { - type: string; - /** - * Create a new Node instance - * @param config - Node configuration object or a function that returns a configuration object - */ - static create(config?: Partial> | (() => Partial>)): Node; - configure(options?: Partial): Node; - extend = NodeConfig>(extendedConfig?: (() => Partial) | (Partial & ThisType<{ - name: string; - options: ExtendedOptions; - storage: ExtendedStorage; - editor: Editor; - type: NodeType$1; - }>)): Node; -} - -type PasteRuleMatch = { - index: number; - text: string; - replaceWith?: string; - match?: RegExpMatchArray; - data?: Record; -}; -type PasteRuleFinder = RegExp | ((text: string, event?: ClipboardEvent | null) => PasteRuleMatch[] | null | undefined); -/** - * Paste rules are used to react to pasted content. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules - */ -declare class PasteRule { - find: PasteRuleFinder; - handler: (props: { - state: EditorState; - range: Range; - match: ExtendedRegExpMatchArray; - commands: SingleCommands; - chain: () => ChainedCommands; - can: () => CanCommands; - pasteEvent: ClipboardEvent | null; - dropEvent: DragEvent | null; - }) => void | null; - constructor(config: { - find: PasteRuleFinder; - handler: (props: { - can: () => CanCommands; - chain: () => ChainedCommands; - commands: SingleCommands; - dropEvent: DragEvent | null; - match: ExtendedRegExpMatchArray; - pasteEvent: ClipboardEvent | null; - range: Range; - state: EditorState; - }) => void | null; - }); -} -/** - * Create an paste rules plugin. When enabled, it will cause pasted - * text that matches any of the given rules to trigger the rule’s - * action. - */ -declare function pasteRulesPlugin(props: { - editor: Editor; - rules: PasteRule[]; -}): Plugin[]; - -interface ExtendableConfig | NodeConfig | MarkConfig | ExtendableConfig = ExtendableConfig, PMType = any> { - /** - * The extension name - this must be unique. - * It will be used to identify the extension. - * - * @example 'myExtension' - */ - name: string; - /** - * The priority of your extension. The higher, the earlier it will be called - * and will take precedence over other extensions with a lower priority. - * @default 100 - * @example 101 - */ - priority?: number; - /** - * This method will add options to this extension - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#settings - * @example - * addOptions() { - * return { - * myOption: 'foo', - * myOtherOption: 10, - * } - */ - addOptions?: (this: { - name: string; - parent: ParentConfig['addOptions']; - }) => Options; - /** - * The default storage this extension can save data to. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#storage - * @example - * defaultStorage: { - * prefetchedUsers: [], - * loading: false, - * } - */ - addStorage?: (this: { - name: string; - options: Options; - parent: ParentConfig['addStorage']; - }) => Storage; - /** - * This function adds globalAttributes to specific nodes. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#global-attributes - * @example - * addGlobalAttributes() { - * return [ - * { - // Extend the following extensions - * types: [ - * 'heading', - * 'paragraph', - * ], - * // … with those attributes - * attributes: { - * textAlign: { - * default: 'left', - * renderHTML: attributes => ({ - * style: `text-align: ${attributes.textAlign}`, - * }), - * parseHTML: element => element.style.textAlign || 'left', - * }, - * }, - * }, - * ] - * } - */ - addGlobalAttributes?: (this: { - name: string; - options: Options; - storage: Storage; - extensions: (Node | Mark)[]; - parent: ParentConfig['addGlobalAttributes']; - }) => GlobalAttributes; - /** - * This function adds commands to the editor - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#commands - * @example - * addCommands() { - * return { - * myCommand: () => ({ chain }) => chain().setMark('type', 'foo').run(), - * } - * } - */ - addCommands?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['addCommands']; - }) => Partial; - /** - * This function registers keyboard shortcuts. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#keyboard-shortcuts - * @example - * addKeyboardShortcuts() { - * return { - * 'Mod-l': () => this.editor.commands.toggleBulletList(), - * } - * }, - */ - addKeyboardShortcuts?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['addKeyboardShortcuts']; - }) => { - [key: string]: KeyboardShortcutCommand; - }; - /** - * This function adds input rules to the editor. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#input-rules - * @example - * addInputRules() { - * return [ - * markInputRule({ - * find: inputRegex, - * type: this.type, - * }), - * ] - * }, - */ - addInputRules?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['addInputRules']; - }) => InputRule[]; - /** - * This function adds paste rules to the editor. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#paste-rules - * @example - * addPasteRules() { - * return [ - * markPasteRule({ - * find: pasteRegex, - * type: this.type, - * }), - * ] - * }, - */ - addPasteRules?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['addPasteRules']; - }) => PasteRule[]; - /** - * This function adds Prosemirror plugins to the editor - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#prosemirror-plugins - * @example - * addProseMirrorPlugins() { - * return [ - * customPlugin(), - * ] - * } - */ - addProseMirrorPlugins?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['addProseMirrorPlugins']; - }) => Plugin[]; - /** - * This function transforms pasted HTML content before it's parsed. - * Extensions can use this to modify or clean up pasted HTML. - * The transformations are chained - each extension's transform receives - * the output from the previous extension's transform. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#transform-pasted-html - * @example - * transformPastedHTML(html) { - * // Remove all style attributes - * return html.replace(/style="[^"]*"/g, '') - * } - */ - transformPastedHTML?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['transformPastedHTML']; - }, html: string) => string; - /** - * This function adds additional extensions to the editor. This is useful for - * building extension kits. - * @example - * addExtensions() { - * return [ - * BulletList, - * OrderedList, - * ListItem - * ] - * } - */ - addExtensions?: (this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig['addExtensions']; - }) => Extensions; - /** - * The markdown token name - * - * This is the name of the token that this extension uses to parse and render markdown and comes from the Marked Lexer. - * - * @see https://github.com/markedjs/marked/blob/master/src/Tokens.ts - * - */ - markdownTokenName?: string; - /** - * The parse function used by the markdown parser to convert markdown tokens to ProseMirror nodes. - */ - parseMarkdown?: (token: MarkdownToken, helpers: MarkdownParseHelpers) => MarkdownParseResult; - /** - * The serializer function used by the markdown serializer to convert ProseMirror nodes to markdown tokens. - */ - renderMarkdown?: (node: JSONContent, helpers: MarkdownRendererHelpers, ctx: RenderContext) => string; - /** - * The markdown tokenizer responsible for turning a markdown string into tokens - * - * Custom tokenizers are only needed when you want to parse non-standard markdown token. - */ - markdownTokenizer?: MarkdownTokenizer; - /** - * Optional markdown options for indentation - */ - markdownOptions?: { - /** - * Defines if this markdown element should indent it's child elements - */ - indentsContent?: boolean; - /** - * Lets a mark tell the Markdown serializer which inline HTML tags it can - * safely use when plain markdown delimiters would become ambiguous. - * - * This is mainly useful for overlapping marks. For example, bold followed - * by bold+italic followed by italic cannot always be written back with only - * `*` and `**` in a way that still parses correctly. In that case, the - * serializer can close the overlapping section with markdown and reopen the - * remaining tail with HTML instead. - * - * Example: - * - desired formatting: `**123` + `*456*` + `789 italic` - * - serialized result: `**123*456***789` - * - * If your extension defines custom mark names, set `htmlReopen` on that - * extension so the serializer can reuse its HTML form for overlap cases. - */ - htmlReopen?: { - open: string; - close: string; - }; - }; - /** - * This function extends the schema of the node. - * @example - * extendNodeSchema() { - * return { - * group: 'inline', - * selectable: false, - * } - * } - */ - extendNodeSchema?: ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig['extendNodeSchema']; - }, extension: Node) => Record) | null; - /** - * This function extends the schema of the mark. - * @example - * extendMarkSchema() { - * return { - * group: 'inline', - * selectable: false, - * } - * } - */ - extendMarkSchema?: ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig['extendMarkSchema']; - }, extension: Mark) => Record) | null; - /** - * The editor is not ready yet. - */ - onBeforeCreate?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onBeforeCreate']; - }, event: EditorEvents['beforeCreate']) => void) | null; - /** - * The editor is ready. - */ - onCreate?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onCreate']; - }, event: EditorEvents['create']) => void) | null; - /** - * The content has changed. - */ - onUpdate?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onUpdate']; - }, event: EditorEvents['update']) => void) | null; - /** - * The selection has changed. - */ - onSelectionUpdate?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onSelectionUpdate']; - }, event: EditorEvents['selectionUpdate']) => void) | null; - /** - * The editor state has changed. - */ - onTransaction?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onTransaction']; - }, event: EditorEvents['transaction']) => void) | null; - /** - * The editor is focused. - */ - onFocus?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onFocus']; - }, event: EditorEvents['focus']) => void) | null; - /** - * The editor isn’t focused anymore. - */ - onBlur?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onBlur']; - }, event: EditorEvents['blur']) => void) | null; - /** - * The editor is destroyed. - */ - onDestroy?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onDestroy']; - }, event: EditorEvents['destroy']) => void) | null; - /** - * This hook allows you to intercept and modify transactions before they are dispatched. - * - * Example - * ```ts - * dispatchTransaction({ transaction, next }) { - * console.log('Dispatching transaction:', transaction) - * next(transaction) - * } - * ``` - * - * @param props - The dispatch transaction props - */ - dispatchTransaction?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['dispatchTransaction']; - }, props: DispatchTransactionProps) => void) | null; -} -declare class Extendable | NodeConfig | MarkConfig> { - type: string; - parent: Extendable | null; - child: Extendable | null; - name: string; - config: Config; - constructor(config?: Partial); - get options(): Options; - get storage(): Readonly; - configure(options?: Partial): Extendable | NodeConfig | MarkConfig>; - extend | NodeConfig | MarkConfig>(extendedConfig?: Partial): Extendable; -} - -type AnyConfig = ExtensionConfig | NodeConfig | MarkConfig; -type AnyExtension = Extendable; -type Extensions = AnyExtension[]; -type ParentConfig = Partial<{ - [P in keyof T]: Required[P] extends (...args: any) => any ? (...args: Parameters[P]>) => ReturnType[P]> : T[P]; -}>; -type Primitive = null | undefined | string | number | boolean | symbol | bigint; -type RemoveThis = T extends (...args: any) => any ? (...args: Parameters) => ReturnType : T; -type MaybeReturnType = T extends (...args: any) => any ? ReturnType : T; -type MaybeThisParameterType = Exclude extends (...args: any) => any ? ThisParameterType> : any; -interface EditorEvents { - mount: { - /** - * The editor instance - */ - editor: Editor; - }; - unmount: { - /** - * The editor instance - */ - editor: Editor; - }; - beforeCreate: { - /** - * The editor instance - */ - editor: Editor; - }; - create: { - /** - * The editor instance - */ - editor: Editor; - }; - contentError: { - /** - * The editor instance - */ - editor: Editor; - /** - * The error that occurred while parsing the content - */ - error: Error; - /** - * If called, will re-initialize the editor with the collaboration extension removed. - * This will prevent syncing back deletions of content not present in the current schema. - */ - disableCollaboration: () => void; - }; - update: { - /** - * The editor instance - */ - editor: Editor; - /** - * The transaction that caused the update - */ - transaction: Transaction; - /** - * Appended transactions that were added to the initial transaction by plugins - */ - appendedTransactions: Transaction[]; - }; - selectionUpdate: { - /** - * The editor instance - */ - editor: Editor; - /** - * The transaction that caused the selection update - */ - transaction: Transaction; - }; - beforeTransaction: { - /** - * The editor instance - */ - editor: Editor; - /** - * The transaction that will be applied - */ - transaction: Transaction; - /** - * The next state of the editor after the transaction is applied - */ - nextState: EditorState; - }; - transaction: { - /** - * The editor instance - */ - editor: Editor; - /** - * The initial transaction - */ - transaction: Transaction; - /** - * Appended transactions that were added to the initial transaction by plugins - */ - appendedTransactions: Transaction[]; - }; - focus: { - /** - * The editor instance - */ - editor: Editor; - /** - * The focus event - */ - event: FocusEvent; - /** - * The transaction that caused the focus - */ - transaction: Transaction; - }; - blur: { - /** - * The editor instance - */ - editor: Editor; - /** - * The focus event - */ - event: FocusEvent; - /** - * The transaction that caused the blur - */ - transaction: Transaction; - }; - destroy: void; - paste: { - /** - * The editor instance - */ - editor: Editor; - /** - * The clipboard event - */ - event: ClipboardEvent; - /** - * The slice that was pasted - */ - slice: Slice; - }; - drop: { - /** - * The editor instance - */ - editor: Editor; - /** - * The drag event - */ - event: DragEvent; - /** - * The slice that was dropped - */ - slice: Slice; - /** - * Whether the content was moved (true) or copied (false) - */ - moved: boolean; - }; - delete: { - /** - * The editor instance - */ - editor: Editor; - /** - * The range of the deleted content (before the deletion) - */ - deletedRange: Range; - /** - * The new range of positions of where the deleted content was in the new document (after the deletion) - */ - newRange: Range; - /** - * The transaction that caused the deletion - */ - transaction: Transaction; - /** - * The combined transform (including all appended transactions) that caused the deletion - */ - combinedTransform: Transform; - /** - * Whether the deletion was partial (only a part of this content was deleted) - */ - partial: boolean; - /** - * This is the start position of the mark in the document (before the deletion) - */ - from: number; - /** - * This is the end position of the mark in the document (before the deletion) - */ - to: number; - } & ({ - /** - * The content that was deleted - */ - type: 'node'; - /** - * The node which the deletion occurred in - * @note This can be a parent node of the deleted content - */ - node: Node$1; - /** - * The new start position of the node in the document (after the deletion) - */ - newFrom: number; - /** - * The new end position of the node in the document (after the deletion) - */ - newTo: number; - } | { - /** - * The content that was deleted - */ - type: 'mark'; - /** - * The mark that was deleted - */ - mark: Mark$1; - }); -} -/** - * Props passed to the `dispatchTransaction` hook in extensions. - */ -type DispatchTransactionProps = { - /** - * The transaction that is about to be dispatched. - */ - transaction: Transaction; - /** - * A function that should be called to pass the transaction down to the next extension - * (or eventually to the editor). - * - * @param transaction The transaction to dispatch - */ - next: (transaction: Transaction) => void; -}; -type EnableRules = (AnyExtension | string)[] | boolean; -interface EditorOptions { - /** - * The element to bind the editor to: - * - If an `Element` is passed, the editor will be mounted appended to that element - * - If `null` is passed, the editor will not be mounted automatically - * - If an object with a `mount` property is passed, the editor will be mounted to that element - * - If a function is passed, it will be called with the editor's element, which should place the editor within the document - */ - element: Element | { - mount: HTMLElement; - } | ((editor: HTMLElement) => void) | null; - /** - * The content of the editor (HTML, JSON, or a JSON array) - */ - content: Content; - /** - * The extensions to use - */ - extensions: Extensions; - /** - * Whether to inject base CSS styles - */ - injectCSS: boolean; - /** - * A nonce to use for CSP while injecting styles - */ - injectNonce: string | undefined; - /** - * The editor's initial focus position - */ - autofocus: FocusPosition; - /** - * Whether the editor is editable - */ - editable: boolean; - /** - * The default text direction for all content in the editor. - * When set to 'ltr' or 'rtl', all nodes will have the corresponding dir attribute. - * When set to 'auto', the dir attribute will be set based on content detection. - * When undefined, no dir attribute will be added. - * @default undefined - */ - textDirection?: 'ltr' | 'rtl' | 'auto'; - /** - * The editor's props - */ - editorProps: EditorProps; - /** - * The editor's content parser options - */ - parseOptions: ParseOptions; - /** - * The editor's core extension options - */ - coreExtensionOptions?: { - clipboardTextSerializer?: { - blockSeparator?: string; - }; - /** - * Options for the `tabindex` core extension. - */ - tabindex?: { - /** - * The value for the `tabindex` attribute on the editor element. - */ - value?: string; - }; - delete?: { - /** - * Whether the `delete` extension should be called asynchronously to avoid blocking the editor while processing deletions - * @default true deletion events are called asynchronously - */ - async?: boolean; - /** - * Allows filtering the transactions that are processed by the `delete` extension. - * If the function returns `true`, the transaction will be ignored. - */ - filterTransaction?: (transaction: Transaction) => boolean; - }; - }; - /** - * Whether to enable input rules behavior - */ - enableInputRules: EnableRules; - /** - * Whether to enable paste rules behavior - */ - enablePasteRules: EnableRules; - /** - * Determines whether core extensions are enabled. - * - * If set to `false`, all core extensions will be disabled. - * To disable specific core extensions, provide an object where the keys are the extension names and the values are `false`. - * Extensions not listed in the object will remain enabled. - * - * @example - * // Disable all core extensions - * enabledCoreExtensions: false - * - * @example - * // Disable only the keymap core extension - * enabledCoreExtensions: { keymap: false } - * - * @default true - */ - enableCoreExtensions?: boolean | Partial>; - /** - * If `true`, the editor will check the content for errors on initialization. - * Emitting the `contentError` event if the content is invalid. - * Which can be used to show a warning or error message to the user. - * @default false - */ - enableContentCheck: boolean; - /** - * If `true`, the editor will emit the `contentError` event if invalid content is - * encountered but `enableContentCheck` is `false`. This lets you preserve the - * invalid editor content while still showing a warning or error message to - * the user. - * - * @default false - */ - emitContentError: boolean; - /** - * Called before the editor is constructed. - */ - onBeforeCreate: (props: EditorEvents['beforeCreate']) => void; - /** - * Called after the editor is constructed. - */ - onCreate: (props: EditorEvents['create']) => void; - /** - * Called when the editor is mounted. - */ - onMount: (props: EditorEvents['mount']) => void; - /** - * Called when the editor is unmounted. - */ - onUnmount: (props: EditorEvents['unmount']) => void; - /** - * Called when the editor encounters an error while parsing the content. - * Only enabled if `enableContentCheck` is `true`. - */ - onContentError: (props: EditorEvents['contentError']) => void; - /** - * Called when the editor's content is updated. - */ - onUpdate: (props: EditorEvents['update']) => void; - /** - * Called when the editor's selection is updated. - */ - onSelectionUpdate: (props: EditorEvents['selectionUpdate']) => void; - /** - * Called after a transaction is applied to the editor. - */ - onTransaction: (props: EditorEvents['transaction']) => void; - /** - * Called on focus events. - */ - onFocus: (props: EditorEvents['focus']) => void; - /** - * Called on blur events. - */ - onBlur: (props: EditorEvents['blur']) => void; - /** - * Called when the editor is destroyed. - */ - onDestroy: (props: EditorEvents['destroy']) => void; - /** - * Called when content is pasted into the editor. - */ - onPaste: (e: ClipboardEvent, slice: Slice) => void; - /** - * Called when content is dropped into the editor. - */ - onDrop: (e: DragEvent, slice: Slice, moved: boolean) => void; - /** - * Called when content is deleted from the editor. - */ - onDelete: (props: EditorEvents['delete']) => void; - /** - * Whether to enable extension-level dispatching of transactions. - * If `false`, extensions cannot define their own `dispatchTransaction` hook. - * - * @default true - * @example - * new Editor({ - * enableExtensionDispatchTransaction: false, - * }) - */ - enableExtensionDispatchTransaction?: boolean; -} -/** - * The editor's content as HTML - */ -type HTMLContent = string; -/** - * A Tiptap JSON node or document. Tiptap JSON is the standard format for - * storing and manipulating Tiptap content. It is equivalent to the JSON - * representation of a Prosemirror node. - * - * Tiptap JSON documents are trees of nodes. The root node is usually of type - * `doc`. Nodes can have other nodes as children. Nodes can also have marks and - * attributes. Text nodes (nodes with type `text`) have a `text` property and no - * children. - * - * @example - * ```ts - * const content: JSONContent = { - * type: 'doc', - * content: [ - * { - * type: 'paragraph', - * content: [ - * { - * type: 'text', - * text: 'Hello ', - * }, - * { - * type: 'text', - * text: 'world', - * marks: [{ type: 'bold' }], - * }, - * ], - * }, - * ], - * } - * ``` - */ -type JSONContent = { - /** - * The type of the node - */ - type?: string; - /** - * The attributes of the node. Attributes can have any JSON-serializable value. - */ - attrs?: Record | undefined; - /** - * The children of the node. A node can have other nodes as children. - */ - content?: JSONContent[]; - /** - * A list of marks of the node. Inline nodes can have marks. - */ - marks?: { - /** - * The type of the mark - */ - type: string; - /** - * The attributes of the mark. Attributes can have any JSON-serializable value. - */ - attrs?: Record; - [key: string]: any; - }[]; - /** - * The text content of the node. This property is only present on text nodes - * (i.e. nodes with `type: 'text'`). - * - * Text nodes cannot have children, but they can have marks. - */ - text?: string; - [key: string]: any; -}; -/** - * A mark type is either a JSON representation of a mark or a Prosemirror mark instance - */ -type MarkType = any> = { - type: Type; - attrs: TAttributes; -}; -/** - * A node type is either a JSON representation of a node or a Prosemirror node instance - */ -type NodeType = any, NodeMarkType extends MarkType = any, TContent extends (NodeType | TextType)[] = any> = { - type: Type; - attrs: TAttributes; - content?: TContent; - marks?: NodeMarkType[]; -}; -/** - * A node type is either a JSON representation of a doc node or a Prosemirror doc node instance - */ -type DocumentType | undefined = Record, TContentType extends NodeType[] = NodeType[]> = Omit, 'marks' | 'content'> & { - content: TContentType; -}; -/** - * A node type is either a JSON representation of a text node or a Prosemirror text node instance - */ -type TextType = { - type: 'text'; - text: string; - marks: TMarkType[]; -}; -/** - * Describes the output of a `renderHTML` function in prosemirror - * @see https://prosemirror.net/docs/ref/#model.DOMOutputSpec - */ -type DOMOutputSpecArray$1 = [string] | [string, Record] | [string, 0] | [string, Record, 0] | [string, Record, DOMOutputSpecArray$1 | 0] | [string, DOMOutputSpecArray$1]; -type Content = HTMLContent | JSONContent | JSONContent[] | null; -type CommandProps = { - editor: Editor; - tr: Transaction; - commands: SingleCommands; - can: () => CanCommands; - chain: () => ChainedCommands; - state: EditorState; - view: EditorView; - dispatch: ((args?: any) => any) | undefined; -}; -type Command = (props: CommandProps) => boolean; -type CommandSpec = (...args: any[]) => Command; -type KeyboardShortcutCommand = (props: { - editor: Editor; -}) => boolean; -type Attribute = { - default?: any; - validate?: string | ((value: any) => void); - rendered?: boolean; - renderHTML?: ((attributes: Record) => Record | null) | null; - parseHTML?: ((element: HTMLElement) => any | null) | null; - keepOnSplit?: boolean; - isRequired?: boolean; -}; -type Attributes$1 = { - [key: string]: Attribute; -}; -type ExtensionAttribute = { - type: string; - name: string; - attribute: Required> & Pick; -}; -type GlobalAttributes = { - /** - * The node & mark types this attribute should be applied to. - * Can be a specific array of type names, or a shorthand string: - * - `'*'` applies to all nodes (excluding text) and all marks - * - `'nodes'` applies to all nodes (excluding the built-in text node) - * - `'marks'` applies to all marks - * - `string[]` applies to specific node/mark types by name - * @example - * types: '*' // All nodes and marks - * types: 'nodes' // All nodes - * types: 'marks' // All marks - * types: ['heading', 'paragraph'] // Specific types - */ - types: string[] | 'nodes' | 'marks' | '*'; - /** - * The attributes to add to the node or mark types. - */ - attributes: Record; -}[]; -type PickValue = T[K]; -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; -type Diff = ({ - [P in T]: P; -} & { - [P in U]: never; -} & { - [x: string]: never; -})[T]; -type Overwrite = Pick> & U; -type ValuesOf = T[keyof T]; -type KeysWithTypeOf = { - [P in keyof T]: T[P] extends Type ? P : never; -}[keyof T]; -type DOMNode = InstanceType; -/** - * prosemirror-view does not export the `type` property of `Decoration`. - * So, this defines the `DecorationType` interface to include the `type` property. - */ -interface DecorationType { - spec: any; - map(mapping: Mappable, span: Decoration, offset: number, oldOffset: number): Decoration | null; - valid(node: Node, span: Decoration): boolean; - eq(other: DecorationType): boolean; - destroy(dom: DOMNode): void; - readonly attrs: DecorationAttrs; -} -/** - * prosemirror-view does not export the `type` property of `Decoration`. - * This adds the `type` property to the `Decoration` type. - */ -type DecorationWithType = Decoration & { - type: DecorationType; -}; -interface NodeViewProps extends NodeViewRendererProps { - decorations: readonly DecorationWithType[]; - selected: boolean; - updateAttributes: (attributes: Record) => void; - deleteNode: () => void; -} -interface NodeViewRendererOptions { - stopEvent: ((props: { - event: Event; - }) => boolean) | null; - ignoreMutation: ((props: { - mutation: ViewMutationRecord; - }) => boolean) | null; - contentDOMElementTag: string; - /** - * When `true`, the `selected` prop also becomes `true` if a `TextSelection` - * is fully inside the node's range (e.g. the cursor is placed within the - * node's content), not only when there is a `NodeSelection` on the node. - * Defaults to `false` to preserve existing behavior. - */ - selectedOnTextSelection?: boolean; - /** - * When `true`, the component re-renders on every position shift so calls - * to `getPos()` stay current in render output. - * Without this option, `getPos()` is still always current for imperative - * use (click handlers, commands) — it only becomes stale when directly - * rendered in JSX or used in reactive template expressions. - * @default false - */ - trackNodeViewPosition?: boolean; -} -interface NodeViewRendererProps { - /** - * The node that is being rendered. - */ - node: Parameters[0]; - /** - * The editor's view. - */ - view: Parameters[1]; - /** - * A function that can be called to get the node's current position in the document. - */ - getPos: Parameters[2]; - /** - * is an array of node or inline decorations that are active around the node. - * They are automatically drawn in the normal way, and you will usually just want to ignore this, but they can also be used as a way to provide context information to the node view without adding it to the document itself. - */ - decorations: Parameters[3]; - /** - * holds the decorations for the node's content. You can safely ignore this if your view has no content or a contentDOM property, since the editor will draw the decorations on the content. - * But if you, for example, want to create a nested editor with the content, it may make sense to provide it with the inner decorations. - */ - innerDecorations: Parameters[4]; - /** - * The editor instance. - */ - editor: Editor; - /** - * The extension that is responsible for the node. - */ - extension: Node; - /** - * The HTML attributes that should be added to the node's DOM element. - */ - HTMLAttributes: Record; -} -type NodeViewRenderer = (props: NodeViewRendererProps) => NodeView$1; -interface MarkViewProps extends MarkViewRendererProps { -} -interface MarkViewRendererProps { - /** - * The node that is being rendered. - */ - mark: Parameters[0]; - /** - * The editor's view. - */ - view: Parameters[1]; - /** - * indicates whether the mark's content is inline - */ - inline: Parameters[2]; - /** - * The editor instance. - */ - editor: Editor; - /** - * The extension that is responsible for the mark. - */ - extension: Mark; - /** - * The HTML attributes that should be added to the mark's DOM element. - */ - HTMLAttributes: Record; - updateAttributes: (attrs: Record) => void; -} -type MarkViewRenderer = (props: Props) => MarkView$1; -interface MarkViewRendererOptions { - ignoreMutation: ((props: { - mutation: ViewMutationRecord; - }) => boolean) | null; -} -type AnyCommands = Record Command>; -type UnionCommands = UnionToIntersection, KeysWithTypeOf, object>>>>; -type RawCommands = { - [Item in keyof UnionCommands]: UnionCommands[Item]; -}; -type SingleCommands = { - [Item in keyof UnionCommands]: UnionCommands[Item]; -}; -type ChainedCommands = { - [Item in keyof UnionCommands]: UnionCommands[Item]; -} & { - run: () => boolean; -}; -type CanCommands = SingleCommands & { - chain: () => ChainedCommands; -}; -type FocusPosition = 'start' | 'end' | 'all' | number | boolean | null; -type Range = { - from: number; - to: number; -}; -type NodeRange = { - node: Node$1; - from: number; - to: number; -}; -type MarkRange = { - mark: Mark$1; - from: number; - to: number; -}; -type Predicate = (node: Node$1) => boolean; -type NodeWithPos = { - node: Node$1; - pos: number; -}; -type TextSerializer = (props: { - node: Node$1; - pos: number; - parent: Node$1; - index: number; - range: Range; -}) => string; -type ExtendedRegExpMatchArray = RegExpMatchArray & { - data?: Record; -}; -type Dispatch = ((args?: any) => any) | undefined; -/** Markdown related types */ -type MarkdownToken = { - type?: string; - raw?: string; - text?: string; - tokens?: MarkdownToken[]; - depth?: number; - items?: MarkdownToken[]; - [key: string]: any; -}; -type MarkdownHelpers = { - parseInline: (tokens: MarkdownToken[]) => any[]; - /** - * Render children. The second argument may be a legacy separator string - * or a RenderContext (preferred). - */ - renderChildren: (node: Node[] | Node, ctxOrSeparator?: RenderContext | string) => string; - text: (token: MarkdownToken) => any; -}; -/** - * Helpers specifically for parsing markdown tokens into Tiptap JSON. - * These are provided to extension parse handlers. - */ -type MarkdownParseHelpers = { - /** Parse an array of inline tokens into text nodes with marks */ - parseInline: (tokens: MarkdownToken[]) => JSONContent[]; - /** Tokenize source text as inline markdown when supported by the markdown parser */ - tokenizeInline?: (src: string) => MarkdownToken[]; - /** Parse an array of block-level tokens */ - parseChildren: (tokens: MarkdownToken[]) => JSONContent[]; - /** Parse block-level tokens while preserving implicit empty paragraphs from blank lines */ - parseBlockChildren?: (tokens: MarkdownToken[]) => JSONContent[]; - /** Create a text node with optional marks */ - createTextNode: (text: string, marks?: Array<{ - type: string; - attrs?: any; - }>) => JSONContent; - /** Create any node type with attributes and content */ - createNode: (type: string, attrs?: any, content?: JSONContent[]) => JSONContent; - /** Apply a mark to content (used for inline marks like bold, italic) */ - applyMark: (markType: string, content: JSONContent[], attrs?: any) => { - mark: string; - content: JSONContent[]; - attrs?: any; - }; -}; -/** - * Full runtime helpers object provided by MarkdownManager to handlers. - * This includes the small author-facing helpers plus internal helpers - * that can be useful for advanced handlers. - */ -type FullMarkdownHelpers = MarkdownHelpers & { - parseChildren: (tokens: MarkdownToken[]) => any[]; - getExtension: (name: string) => any; - createNode: (type: string, attrs?: any, content?: any[]) => any; - /** Current render context when calling renderers; undefined during parse. */ - currentContext?: RenderContext; - /** Indent a multi-line string according to the provided RenderContext. */ - indent: (text: string, ctx?: RenderContext) => string; - /** Return the indent string for a given level (e.g. ' ' or '\t'). */ - getIndentString: (level?: number) => string; -}; - -/** - * Return shape for parser-level `parse` handlers. - * - a single JSON-like node - * - an array of JSON-like nodes - * - or a `{ mark: string, content: JSONLike[] }` shape to apply a mark - */ -type MarkdownParseResult = JSONContent | JSONContent[] | { - mark: string; - content: JSONContent[]; - attrs?: any; -}; -type RenderContext = { - index: number; - level: number; - meta?: Record; - parentType?: string | null; - previousNode?: JSONContent | null; -}; -/** Extension contract for markdown parsing/serialization. */ -interface MarkdownExtensionSpec { - /** Token name used for parsing (e.g., 'codespan', 'code', 'strong') */ - tokenName?: string; - /** Node/mark name used for rendering (typically the extension name) */ - nodeName?: string; - parseMarkdown?: (token: MarkdownToken, helpers: MarkdownParseHelpers) => MarkdownParseResult; - renderMarkdown?: (node: any, helpers: MarkdownRendererHelpers, ctx: RenderContext) => string; - isIndenting?: boolean; - htmlReopen?: { - open: string; - close: string; - }; - /** Custom tokenizer for marked.js to handle non-standard markdown syntax */ - tokenizer?: MarkdownTokenizer; -} -/** - * Configuration object passed to custom marked.js tokenizers - */ -type MarkdownLexerConfiguration = { - /** - * Can be used to transform source text into inline tokens - useful while tokenizing child tokens. - * @param src - * @returns Array of inline tokens - */ - inlineTokens: (src: string) => MarkdownToken[]; - /** - * Can be used to transform source text into block-level tokens - useful while tokenizing child tokens. - * @param src - * @returns Array of block-level tokens - */ - blockTokens: (src: string) => MarkdownToken[]; -}; -/** Custom tokenizer function for marked.js extensions */ -type MarkdownTokenizer = { - /** Token name this tokenizer creates */ - name: string; - /** Priority level for tokenizer ordering (higher = earlier) */ - level?: 'block' | 'inline'; - /** A string to look for or a function that returns the start index of the token in the source string */ - start?: string | ((src: string) => number); - /** Function that attempts to parse custom syntax from start of text */ - tokenize: (src: string, tokens: MarkdownToken[], lexer: MarkdownLexerConfiguration) => MarkdownToken | undefined | void; -}; -type MarkdownRendererHelpers = { - /** - * Render children nodes to a markdown string, optionally separated by a string. - * @param nodes The node or array of nodes to render - * @param separator An optional separator string (legacy) or RenderContext - * @returns The rendered markdown string - */ - renderChildren: (nodes: JSONContent | JSONContent[], separator?: string) => string; - /** Render a single child node with its sibling index preserved */ - renderChild?: (node: JSONContent, index: number) => string; - /** - * Render a text token to a markdown string - * @param prefix The prefix to add before the content - * @param content The content to wrap - * @returns The wrapped content - */ - wrapInBlock: (prefix: string, content: string) => string; - /** - * Indent a markdown string according to the provided RenderContext - * @param content The content to indent - * @returns The indented content - */ - indent: (content: string) => string; -}; -type Utils = { - /** - * Returns the new position after applying a transaction. - * - * @param position The position to update. A MappablePosition instance. - * @param transaction The transaction to apply. - * @returns The new position after applying the transaction. - * - * @example - * const position = editor.utils.createMappablePosition(10) - * const {position, mapResult} = editor.utils.getUpdatedPosition(position, transaction) - */ - getUpdatedPosition: (position: MappablePosition, transaction: Transaction) => GetUpdatedPositionResult; - /** - * Creates a MappablePosition from a position number. A mappable position can be used to track the - * next position after applying a transaction. - * - * @param position The position (as a number) where the MappablePosition will be created. - * @returns A new MappablePosition instance at the given position. - * - * @example - * const position = editor.utils.createMappablePosition(10) - */ - createMappablePosition: (position: number) => MappablePosition; -}; - -/** - * Create a new Prosemirror document node from content. - * @param content The JSON or HTML content to create the document from - * @param schema The Prosemirror schema to use for the document - * @param parseOptions Options for the parser - * @returns The created Prosemirror document node - */ -declare function createDocument(content: Content | Node$1 | Fragment$1, schema: Schema, parseOptions?: ParseOptions, options?: { - errorOnInvalidContent?: boolean; -}): Node$1; - -type CreateNodeFromContentOptions = { - slice?: boolean; - parseOptions?: ParseOptions; - errorOnInvalidContent?: boolean; -}; -/** - * Takes a JSON or HTML content and creates a Prosemirror node or fragment from it. - * @param content The JSON or HTML content to create the node from - * @param schema The Prosemirror schema to use for the node - * @param options Options for the parser - * @returns The created Prosemirror node or fragment - */ -declare function createNodeFromContent(content: Content | Node$1 | Fragment$1, schema: Schema, options?: CreateNodeFromContentOptions): Node$1 | Fragment$1; - -/** - * Gets the default block type at a given match - * @param match The content match to get the default block type from - * @returns The default block type or null - */ -declare function defaultBlockAt(match: ContentMatch): NodeType$1 | null; - -/** - * Find children inside a Prosemirror node that match a predicate. - * @param node The Prosemirror node to search in - * @param predicate The predicate to match - * @returns An array of nodes with their positions - */ -declare function findChildren(node: Node$1, predicate: Predicate): NodeWithPos[]; - -/** - * Same as `findChildren` but searches only within a `range`. - * @param node The Prosemirror node to search in - * @param range The range to search in - * @param predicate The predicate to match - * @returns An array of nodes with their positions - */ -declare function findChildrenInRange(node: Node$1, range: Range, predicate: Predicate): NodeWithPos[]; - -/** - * Finds the closest parent node to a resolved position that matches a predicate. - * @param $pos The resolved position to search from - * @param predicate The predicate to match - * @returns The closest parent node to the resolved position that matches the predicate - * @example ```js - * findParentNodeClosestToPos($from, node => node.type.name === 'paragraph') - * ``` - */ -declare function findParentNodeClosestToPos($pos: ResolvedPos, predicate: Predicate): { - pos: number; - start: number; - depth: number; - node: Node$1; -} | undefined; - -/** - * Finds the closest parent node to the current selection that matches a predicate. - * @param predicate The predicate to match - * @returns A command that finds the closest parent node to the current selection that matches the predicate - * @example ```js - * findParentNode(node => node.type.name === 'paragraph') - * ``` - */ -declare function findParentNode(predicate: Predicate): (selection: Selection) => ReturnType; - -/** - * Create a flattened array of extensions by traversing the `addExtensions` field. - * @param extensions An array of Tiptap extensions - * @returns A flattened array of Tiptap extensions - */ -declare function flattenExtensions(extensions: Extensions): Extensions; - -/** - * Generate HTML from a JSONContent - * @param doc The JSONContent to generate HTML from - * @param extensions The extensions to use for the schema - * @returns The generated HTML - */ -declare function generateHTML(doc: JSONContent, extensions: Extensions): string; - -/** - * Generate JSONContent from HTML - * @param html The HTML to generate JSONContent from - * @param extensions The extensions to use for the schema - * @returns The generated JSONContent - */ -declare function generateJSON(html: string, extensions: Extensions): Record; - -/** - * Generate raw text from a JSONContent - * @param doc The JSONContent to generate text from - * @param extensions The extensions to use for the schema - * @param options Options for the text generation f.e. blockSeparator or textSerializers - * @returns The generated text - */ -declare function generateText(doc: JSONContent, extensions: Extensions, options?: { - blockSeparator?: string; - textSerializers?: Record; -}): string; - -/** - * Get node or mark attributes by type or name on the current editor state - * @param state The current editor state - * @param typeOrName The node or mark type or name - * @returns The attributes of the node or mark or an empty object - */ -declare function getAttributes(state: EditorState, typeOrName: string | NodeType$1 | MarkType$1): Record; - -/** - * Get a list of all extension attributes defined in `addAttribute` and `addGlobalAttribute`. - * @param extensions List of extensions - */ -declare function getAttributesFromExtensions(extensions: Extensions): ExtensionAttribute[]; - -type ChangedRange = { - oldRange: Range; - newRange: Range; -}; -/** - * Returns a list of changed ranges - * based on the first and last state of all steps. - */ -declare function getChangedRanges(transform: Transform): ChangedRange[]; - -interface DebugJSONContent extends JSONContent { - from: number; - to: number; -} -declare function getDebugJSON(node: Node$1, startOffset?: number): DebugJSONContent; - -interface ExtensionConfig extends ExtendableConfig, null> { -} -/** - * The Extension class is the base class for all extensions. - * @see https://tiptap.dev/api/extensions#create-a-new-extension - */ -declare class Extension extends Extendable> { - type: string; - /** - * Create a new Extension instance - * @param config - Extension configuration object or a function that returns a configuration object - */ - static create(config?: Partial> | (() => Partial>)): Extension; - configure(options?: Partial): Extension; - extend>(extendedConfig?: (() => Partial) | (Partial & ThisType<{ - name: string; - options: ExtendedOptions; - storage: ExtendedStorage; - editor: Editor; - type: null; - }>)): Extension; -} - -/** - * Returns a field from an extension - * @param extension The Tiptap extension - * @param field The field, for example `renderHTML` or `priority` - * @param context The context object that should be passed as `this` into the function - * @returns The field value - */ -declare function getExtensionField(extension: E, field: keyof ExtensionConfig | keyof MarkConfig | keyof NodeConfig, context?: Omit, 'parent'>): RemoveThis; - -declare function getHTMLFromFragment(fragment: Fragment$1, schema: Schema): string; - -declare function getMarkAttributes(state: EditorState, typeOrName: string | MarkType$1): Record; - -/** - * Get the range of a mark at a resolved position. - */ -declare function getMarkRange( -/** - * The position to get the mark range for. - */ -$pos: ResolvedPos, -/** - * The mark type to get the range for. - */ -type: MarkType$1, -/** - * The attributes to match against. - * If not provided, only the first mark at the position will be matched. - */ -attributes?: Record): Range | void; - -declare function getMarksBetween(from: number, to: number, doc: Node$1): MarkRange[]; - -declare function getMarkType(nameOrType: string | MarkType$1, schema: Schema): MarkType$1; - -/** - * Finds the first node of a given type or name in the current selection. - * @param state The editor state. - * @param typeOrName The node type or name. - * @param pos The position to start searching from. - * @param maxDepth The maximum depth to search. - * @returns The node and the depth as an array. - */ -declare const getNodeAtPosition: (state: EditorState, typeOrName: string | NodeType$1, pos: number, maxDepth?: number) => [Node$1 | null, number]; - -declare function getNodeAttributes(state: EditorState, typeOrName: string | NodeType$1): Record; - -declare function getNodeType(nameOrType: string | NodeType$1, schema: Schema): NodeType$1; - -declare function getRenderedAttributes(nodeOrMark: Node$1 | Mark$1, extensionAttributes: ExtensionAttribute[]): Record; - -declare function getSchema(extensions: Extensions, editor?: Editor): Schema; - -/** - * Creates a new Prosemirror schema based on the given extensions. - * @param extensions An array of Tiptap extensions - * @param editor The editor instance - * @returns A Prosemirror schema - */ -declare function getSchemaByResolvedExtensions(extensions: Extensions, editor?: Editor): Schema; - -/** - * Tries to get a node or mark type by its name. - * @param name The name of the node or mark type - * @param schema The Prosemiror schema to search in - * @returns The node or mark type, or null if it doesn't exist - */ -declare function getSchemaTypeByName(name: string, schema: Schema): NodeType$1 | MarkType$1 | null; - -/** - * Get the type of a schema item by its name. - * @param name The name of the schema item - * @param schema The Prosemiror schema to search in - * @returns The type of the schema item (`node` or `mark`), or null if it doesn't exist - */ -declare function getSchemaTypeNameByName(name: string, schema: Schema): 'node' | 'mark' | null; - -/** - * Return attributes of an extension that should be splitted by keepOnSplit flag - * @param extensionAttributes Array of extension attributes - * @param typeName The type of the extension - * @param attributes The attributes of the extension - * @returns The splitted attributes - */ -declare function getSplittedAttributes(extensionAttributes: ExtensionAttribute[], typeName: string, attributes: Record): Record; - -/** - * Gets the text of a Prosemirror node - * @param node The Prosemirror node - * @param options Options for the text serializer & block separator - * @returns The text of the node - * @example ```js - * const text = getText(node, { blockSeparator: '\n' }) - * ``` - */ -declare function getText(node: Node$1, options?: { - blockSeparator?: string; - textSerializers?: Record; -}): string; - -/** - * Gets the text between two positions in a Prosemirror node - * and serializes it using the given text serializers and block separator (see getText) - * @param startNode The Prosemirror node to start from - * @param range The range of the text to get - * @param options Options for the text serializer & block separator - * @returns The text between the two positions - */ -declare function getTextBetween(startNode: Node$1, range: Range, options?: { - blockSeparator?: string; - textSerializers?: Record; -}): string; - -/** - * Returns the text content of a resolved prosemirror position - * @param $from The resolved position to get the text content from - * @param maxMatch The maximum number of characters to match - * @returns The text content - */ -declare const getTextContentFromNodes: ($from: ResolvedPos, maxMatch?: number) => string; - -/** - * Find text serializers `toText` in a Prosemirror schema - * @param schema The Prosemirror schema to search in - * @returns A record of text serializers by node name - */ -declare function getTextSerializersFromSchema(schema: Schema): Record; - -/** - * This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`). - * Cancels when `getAttrs` returned `false`. - * @param parseRule ProseMirror ParseRule - * @param extensionAttributes List of attributes to inject - */ -declare function injectExtensionAttributesToParseRule(parseRule: ParseRule, extensionAttributes: ExtensionAttribute[]): ParseRule; - -declare function isActive(state: EditorState, name: string | null, attributes?: Record): boolean; - -declare const isAtEndOfNode: (state: EditorState, nodeType?: string) => boolean; - -declare const isAtStartOfNode: (state: EditorState) => boolean; - -declare function isExtensionRulesEnabled(extension: AnyExtension, enabled: EnableRules): boolean; - -declare function isList(name: string, extensions: Extensions): boolean; - -declare function isMarkActive(state: EditorState, typeOrName: MarkType$1 | string | null, attributes?: Record): boolean; - -declare function isNodeActive(state: EditorState, typeOrName: NodeType$1 | string | null, attributes?: Record): boolean; - -/** - * Returns true if the given prosemirror node is empty. - */ -declare function isNodeEmpty(node: Node$1, { checkChildren, ignoreWhitespace, }?: { - /** - * When true (default), it will also check if all children are empty. - */ - checkChildren?: boolean; - /** - * When true, it will ignore whitespace when checking for emptiness. - */ - ignoreWhitespace?: boolean; -}): boolean; - -declare function isNodeSelection(value: unknown): value is NodeSelection; - -/** - * Determines whether a node view should be considered selected for the given - * editor selection. - * - * A node is considered selected when the current selection fully covers it - * (e.g. a `NodeSelection`). When `selectedOnTextSelection` is enabled, the - * node is additionally considered selected if a `TextSelection` is fully - * contained within the node's range. - * - * @param selection The current editor selection. - * @param pos The start position of the node in the document. - * @param nodeSize The size of the node. - * @param selectedOnTextSelection When `true`, also treat selections inside the node as selected. - * @returns `true` if the node view should render as selected. - */ -declare function isNodeViewSelected({ selection, pos, nodeSize, selectedOnTextSelection, }: { - selection: Selection; - pos: number; - nodeSize: number; - selectedOnTextSelection?: boolean; -}): boolean; - -declare function isTextSelection(value: unknown): value is TextSelection; - -/** - * A class that represents a mappable position in the editor. It can be extended - * by other extensions to add additional position mapping capabilities. - */ -declare class MappablePosition { - /** - * The absolute position in the editor. - */ - position: number; - constructor(position: number); - /** - * Creates a MappablePosition from a JSON object. - */ - static fromJSON(json: any): MappablePosition; - /** - * Converts the MappablePosition to a JSON object. - */ - toJSON(): any; -} -/** - * The result of the getUpdatedPosition function. - */ -interface GetUpdatedPositionResult { - position: MappablePosition; - mapResult: MapResult | null; -} -/** - * Calculates the new position after applying a transaction. - * - * @returns The new mappable position and the map result. - */ -declare function getUpdatedPosition(position: MappablePosition, transaction: Transaction): GetUpdatedPositionResult; -/** - * Creates a MappablePosition from a position number. This is the default - * implementation for Tiptap core. It can be overridden by other Tiptap - * extensions. - * - * @param position The position (as a number) where the MappablePosition will be created. - * @returns A new MappablePosition instance at the given position. - */ -declare function createMappablePosition(position: number): MappablePosition; - -declare function posToDOMRect(view: EditorView, from: number, to: number): DOMRect; - -/** - * Returns a flattened and sorted extension list while - * also checking for duplicated extensions and warns the user. - * @param extensions An array of Tiptap extensions - * @returns An flattened and sorted array of Tiptap extensions - */ -declare function resolveExtensions(extensions: Extensions): Extensions; - -declare function resolveFocusPosition(doc: Node$1, position?: FocusPosition): Selection | null; - -type RewriteUnknownContentOptions = { - /** - * If true, unknown nodes will be treated as paragraphs - * @default true - */ - fallbackToParagraph?: boolean; -}; -/** - * Rewrite unknown nodes and marks within JSON content - * Allowing for user within the editor - */ -declare function rewriteUnknownContent( -/** - * The JSON content to clean of unknown nodes and marks - */ -json: JSONContent, -/** - * The schema to use for validation - */ -schema: Schema, -/** - * Options for the cleaning process - */ -options?: RewriteUnknownContentOptions): { - /** - * The cleaned JSON content - */ - json: JSONContent | null; - /** - * The array of nodes and marks that were rewritten - */ - rewrittenContent: { - /** - * The original JSON content that was rewritten - */ - original: JSONContent; - /** - * The name of the node or mark that was unsupported - */ - unsupported: string; - }[]; -}; - -declare function selectionToInsertionEnd(tr: Transaction, startLen: number, bias: number): void; - -/** - * Sort extensions by priority. - * @param extensions An array of Tiptap extensions - * @returns A sorted array of Tiptap extensions by priority - */ -declare function sortExtensions(extensions: Extensions): Extensions; - -declare function splitExtensions(extensions: Extensions): { - baseExtensions: Extension[]; - nodeExtensions: Node[]; - markExtensions: Mark[]; -}; - -declare class ExtensionManager { - editor: Editor; - schema: Schema; - /** - * A flattened and sorted array of all extensions - */ - extensions: Extensions; - /** - * A non-flattened array of base extensions (no sub-extensions) - */ - baseExtensions: Extensions; - splittableMarks: string[]; - nonClearableMarks: string[]; - constructor(extensions: Extensions, editor: Editor); - static resolve: typeof resolveExtensions; - static sort: typeof sortExtensions; - static flatten: typeof flattenExtensions; - /** - * Get all commands from the extensions. - * @returns An object with all commands where the key is the command name and the value is the command function - */ - get commands(): RawCommands; - /** - * Get all registered Prosemirror plugins from the extensions. - * @returns An array of Prosemirror plugins - */ - get plugins(): Plugin[]; - /** - * Get all attributes from the extensions. - * @returns An array of attributes - */ - get attributes(): ExtensionAttribute[]; - /** - * Get all node views from the extensions. - * @returns An object with all node views where the key is the node name and the value is the node view function - */ - get nodeViews(): Record; - /** - * Get the composed dispatchTransaction function from all extensions. - * @param baseDispatch The base dispatch function (e.g. from the editor or user props) - * @returns A composed dispatch function - */ - dispatchTransaction(baseDispatch: (tr: Transaction) => void): (tr: Transaction) => void; - /** - * Get the composed transformPastedHTML function from all extensions. - * @param baseTransform The base transform function (e.g. from the editor props) - * @returns A composed transform function that chains all extension transforms - */ - transformPastedHTML(baseTransform?: (html: string, view?: any) => string): (html: string, view?: EditorView) => string; - get markViews(): Record; - /** - * Destroy the extension manager and clean up all extension references - * to prevent memory leaks through parent/child extension chains. - * - * Walks each extension's full parent chain and nulls every forward - * `parent.child → current` link where the parent still points to the - * current node. This breaks the retention path from module-scope - * singleton roots through deep extend() chains. - * - * Only ancestor `.child` links matching the current chain are cleared. - * The `.parent` pointer on ancestors is never touched — extensions - * may be shared across live editors, so their own backward references - * and non-matching forward links must remain intact. - */ - destroy(): void; - /** - * Go through all extensions, create extension storages & setup marks - * & bind editor event listener. - */ - private setupExtensions; -} - -declare class NodePos { - private resolvedPos; - private isBlock; - private editor; - private get name(); - constructor(pos: ResolvedPos, editor: Editor, isBlock?: boolean, node?: Node$1 | null); - private currentNode; - get node(): Node$1; - get element(): HTMLElement; - actualDepth: number | null; - get depth(): number; - get pos(): number; - get content(): Fragment$1; - set content(content: Content); - get attributes(): { - [key: string]: any; - }; - get textContent(): string; - get size(): number; - get from(): number; - get range(): Range; - get to(): number; - get parent(): NodePos | null; - get before(): NodePos | null; - get after(): NodePos | null; - get children(): NodePos[]; - get firstChild(): NodePos | null; - get lastChild(): NodePos | null; - closest(selector: string, attributes?: { - [key: string]: any; - }): NodePos | null; - querySelector(selector: string, attributes?: { - [key: string]: any; - }): NodePos | null; - querySelectorAll(selector: string, attributes?: { - [key: string]: any; - }, firstItemOnly?: boolean): NodePos[]; - setAttribute(attributes: { - [key: string]: any; - }): void; -} - -type ClipboardTextSerializerOptions = { - blockSeparator?: string; -}; -declare const ClipboardTextSerializer: Extension; - -declare module '@tiptap/core' { - interface Commands { - blur: { - /** - * Removes focus from the editor. - * @example editor.commands.blur() - */ - blur: () => ReturnType; - }; - } -} -declare const blur: RawCommands['blur']; - -declare module '@tiptap/core' { - interface Commands { - clearContent: { - /** - * Clear the whole document. - * @example editor.commands.clearContent() - */ - clearContent: ( - /** - * Whether to emit an update event. - * @default true - */ - emitUpdate?: boolean) => ReturnType; - }; - } -} -declare const clearContent: RawCommands['clearContent']; - -declare module '@tiptap/core' { - interface Commands { - clearNodes: { - /** - * Normalize nodes to a simple paragraph. - * @example editor.commands.clearNodes() - */ - clearNodes: () => ReturnType; - }; - } -} -declare const clearNodes: RawCommands['clearNodes']; - -declare module '@tiptap/core' { - interface Commands { - command: { - /** - * Define a command inline. - * @param fn The command function. - * @example - * editor.commands.command(({ tr, state }) => { - * ... - * return true - * }) - */ - command: (fn: (props: Parameters[0]) => boolean) => ReturnType; - }; - } -} -declare const command: RawCommands['command']; - -declare module '@tiptap/core' { - interface Commands { - createParagraphNear: { - /** - * Create a paragraph nearby. - * @example editor.commands.createParagraphNear() - */ - createParagraphNear: () => ReturnType; - }; - } -} -declare const createParagraphNear: RawCommands['createParagraphNear']; - -declare module '@tiptap/core' { - interface Commands { - cut: { - /** - * Cuts content from a range and inserts it at a given position. - * @param range The range to cut. - * @param range.from The start position of the range. - * @param range.to The end position of the range. - * @param targetPos The position to insert the content at. - * @example editor.commands.cut({ from: 1, to: 3 }, 5) - */ - cut: ({ from, to }: { - from: number; - to: number; - }, targetPos: number) => ReturnType; - }; - } -} -declare const cut: RawCommands['cut']; - -declare module '@tiptap/core' { - interface Commands { - deleteCurrentNode: { - /** - * Delete the node that currently has the selection anchor. - * @example editor.commands.deleteCurrentNode() - */ - deleteCurrentNode: () => ReturnType; - }; - } -} -declare const deleteCurrentNode: RawCommands['deleteCurrentNode']; - -declare module '@tiptap/core' { - interface Commands { - deleteNode: { - /** - * Delete a node with a given type or name. - * @param typeOrName The type or name of the node. - * @example editor.commands.deleteNode('paragraph') - */ - deleteNode: (typeOrName: string | NodeType$1) => ReturnType; - }; - } -} -declare const deleteNode: RawCommands['deleteNode']; - -declare module '@tiptap/core' { - interface Commands { - deleteRange: { - /** - * Delete a given range. - * @param range The range to delete. - * @example editor.commands.deleteRange({ from: 1, to: 3 }) - */ - deleteRange: (range: Range) => ReturnType; - }; - } -} -declare const deleteRange: RawCommands['deleteRange']; - -declare module '@tiptap/core' { - interface Commands { - deleteSelection: { - /** - * Delete the selection, if there is one. - * @example editor.commands.deleteSelection() - */ - deleteSelection: () => ReturnType; - }; - } -} -declare const deleteSelection: RawCommands['deleteSelection']; - -declare module '@tiptap/core' { - interface Commands { - enter: { - /** - * Trigger enter. - * @example editor.commands.enter() - */ - enter: () => ReturnType; - }; - } -} -declare const enter: RawCommands['enter']; - -declare module '@tiptap/core' { - interface Commands { - exitCode: { - /** - * Exit from a code block. - * @example editor.commands.exitCode() - */ - exitCode: () => ReturnType; - }; - } -} -declare const exitCode: RawCommands['exitCode']; - -declare module '@tiptap/core' { - interface Commands { - extendMarkRange: { - /** - * Extends the text selection to the current mark by type or name. - * @param typeOrName The type or name of the mark. - * @param attributes The attributes to match against. - * If not provided, only the first mark at the position will be matched. - * @example editor.commands.extendMarkRange('bold') - * @example editor.commands.extendMarkRange('mention', { userId: "1" }) - */ - extendMarkRange: ( - /** - * The type or name of the mark. - */ - typeOrName: string | MarkType$1, - /** - * The attributes of the mark. - */ - attributes?: Record) => ReturnType; - }; - } -} -declare const extendMarkRange: RawCommands['extendMarkRange']; - -declare module '@tiptap/core' { - interface Commands { - first: { - /** - * Runs one command after the other and stops at the first which returns true. - * @param commands The commands to run. - * @example editor.commands.first([command1, command2]) - */ - first: (commands: Command[] | ((props: CommandProps) => Command[])) => ReturnType; - }; - } -} -declare const first: RawCommands['first']; - -declare module '@tiptap/core' { - interface Commands { - focus: { - /** - * Focus the editor at the given position. - * @param position The position to focus at. - * @param options.scrollIntoView Scroll the focused position into view after focusing - * @example editor.commands.focus() - * @example editor.commands.focus(32, { scrollIntoView: false }) - */ - focus: ( - /** - * The position to focus at. - */ - position?: FocusPosition, - /** - * Optional options - * @default { scrollIntoView: true } - */ - options?: { - scrollIntoView?: boolean; - }) => ReturnType; - }; - } -} -declare const focus: RawCommands['focus']; - -declare module '@tiptap/core' { - interface Commands { - forEach: { - /** - * Loop through an array of items. - */ - forEach: (items: T[], fn: (item: T, props: CommandProps & { - index: number; - }) => boolean) => ReturnType; - }; - } -} -declare const forEach: RawCommands['forEach']; - -interface InsertContentOptions { - /** - * Options for parsing the content. - */ - parseOptions?: ParseOptions; - /** - * Whether to update the selection after inserting the content. - */ - updateSelection?: boolean; - applyInputRules?: boolean; - applyPasteRules?: boolean; -} -declare module '@tiptap/core' { - interface Commands { - insertContent: { - /** - * Insert a node or string of HTML at the current position. - * @example editor.commands.insertContent('

Example

') - * @example editor.commands.insertContent('

Example

', { updateSelection: false }) - */ - insertContent: ( - /** - * The ProseMirror content to insert. - */ - value: Content | Node$1 | Fragment$1, - /** - * Optional options - */ - options?: InsertContentOptions) => ReturnType; - }; - } -} -declare const insertContent: RawCommands['insertContent']; - -interface InsertContentAtOptions { - /** - * Options for parsing the content. - */ - parseOptions?: ParseOptions; - /** - * Whether to update the selection after inserting the content. - */ - updateSelection?: boolean; - /** - * Whether to apply input rules after inserting the content. - */ - applyInputRules?: boolean; - /** - * Whether to apply paste rules after inserting the content. - */ - applyPasteRules?: boolean; - /** - * Whether to throw an error if the content is invalid. - */ - errorOnInvalidContent?: boolean; -} -declare module '@tiptap/core' { - interface Commands { - insertContentAt: { - /** - * Insert a node or string of HTML at a specific position. - * @example editor.commands.insertContentAt(0, '

Example

') - */ - insertContentAt: ( - /** - * The position to insert the content at. - */ - position: number | Range, - /** - * The ProseMirror content to insert. - */ - value: Content | Node$1 | Fragment$1, - /** - * Optional options - */ - options?: InsertContentAtOptions) => ReturnType; - }; - } -} -declare const insertContentAt: RawCommands['insertContentAt']; - -declare module '@tiptap/core' { - interface Commands { - joinUp: { - /** - * Join the selected block or, if there is a text selection, the closest ancestor block of the selection that can be joined, with the sibling above it. - * @example editor.commands.joinUp() - */ - joinUp: () => ReturnType; - }; - joinDown: { - /** - * Join the selected block, or the closest ancestor of the selection that can be joined, with the sibling after it. - * @example editor.commands.joinDown() - */ - joinDown: () => ReturnType; - }; - joinBackward: { - /** - * If the selection is empty and at the start of a textblock, try to reduce the distance between that block and the one before it—if there's a block directly before it that can be joined, join them. - * If not, try to move the selected block closer to the next one in the document structure by lifting it out of its - * parent or moving it into a parent of the previous block. Will use the view for accurate (bidi-aware) start-of-textblock detection if given. - * @example editor.commands.joinBackward() - */ - joinBackward: () => ReturnType; - }; - joinForward: { - /** - * If the selection is empty and the cursor is at the end of a textblock, try to reduce or remove the boundary between that block and the one after it, - * either by joining them or by moving the other block closer to this one in the tree structure. - * Will use the view for accurate start-of-textblock detection if given. - * @example editor.commands.joinForward() - */ - joinForward: () => ReturnType; - }; - } -} -declare const joinUp: RawCommands['joinUp']; -declare const joinDown: RawCommands['joinDown']; -declare const joinBackward: RawCommands['joinBackward']; -declare const joinForward: RawCommands['joinForward']; - -declare module '@tiptap/core' { - interface Commands { - joinItemBackward: { - /** - * Join two items backward. - * @example editor.commands.joinItemBackward() - */ - joinItemBackward: () => ReturnType; - }; - } -} -declare const joinItemBackward: RawCommands['joinItemBackward']; - -declare module '@tiptap/core' { - interface Commands { - joinItemForward: { - /** - * Join two items Forwards. - * @example editor.commands.joinItemForward() - */ - joinItemForward: () => ReturnType; - }; - } -} -declare const joinItemForward: RawCommands['joinItemForward']; - -declare module '@tiptap/core' { - interface Commands { - joinTextblockBackward: { - /** - * A more limited form of joinBackward that only tries to join the current textblock to the one before it, if the cursor is at the start of a textblock. - */ - joinTextblockBackward: () => ReturnType; - }; - } -} -declare const joinTextblockBackward: RawCommands['joinTextblockBackward']; - -declare module '@tiptap/core' { - interface Commands { - joinTextblockForward: { - /** - * A more limited form of joinForward that only tries to join the current textblock to the one after it, if the cursor is at the end of a textblock. - */ - joinTextblockForward: () => ReturnType; - }; - } -} -declare const joinTextblockForward: RawCommands['joinTextblockForward']; - -declare module '@tiptap/core' { - interface Commands { - keyboardShortcut: { - /** - * Trigger a keyboard shortcut. - * @param name The name of the keyboard shortcut. - * @example editor.commands.keyboardShortcut('Mod-b') - */ - keyboardShortcut: (name: string) => ReturnType; - }; - } -} -declare const keyboardShortcut: RawCommands['keyboardShortcut']; - -declare module '@tiptap/core' { - interface Commands { - lift: { - /** - * Removes an existing wrap if possible lifting the node out of it - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.lift('paragraph') - * @example editor.commands.lift('heading', { level: 1 }) - */ - lift: (typeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const lift: RawCommands['lift']; - -declare module '@tiptap/core' { - interface Commands { - liftEmptyBlock: { - /** - * If the cursor is in an empty textblock that can be lifted, lift the block. - * @example editor.commands.liftEmptyBlock() - */ - liftEmptyBlock: () => ReturnType; - }; - } -} -declare const liftEmptyBlock: RawCommands['liftEmptyBlock']; - -declare module '@tiptap/core' { - interface Commands { - liftListItem: { - /** - * Create a command to lift the list item around the selection up into a wrapping list. - * @param typeOrName The type or name of the node. - * @example editor.commands.liftListItem('listItem') - */ - liftListItem: (typeOrName: string | NodeType$1) => ReturnType; - }; - } -} -declare const liftListItem: RawCommands['liftListItem']; - -declare module '@tiptap/core' { - interface Commands { - newlineInCode: { - /** - * Add a newline character in code. - * @example editor.commands.newlineInCode() - */ - newlineInCode: () => ReturnType; - }; - } -} -declare const newlineInCode: RawCommands['newlineInCode']; - -declare module '@tiptap/core' { - interface Commands { - resetAttributes: { - /** - * Resets some node attributes to the default value. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node to reset. - * @example editor.commands.resetAttributes('heading', 'level') - */ - resetAttributes: (typeOrName: string | NodeType$1 | MarkType$1, attributes: string | string[]) => ReturnType; - }; - } -} -declare const resetAttributes: RawCommands['resetAttributes']; - -declare module '@tiptap/core' { - interface Commands { - scrollIntoView: { - /** - * Scroll the selection into view. - * @example editor.commands.scrollIntoView() - */ - scrollIntoView: () => ReturnType; - }; - } -} -declare const scrollIntoView: RawCommands['scrollIntoView']; - -declare module '@tiptap/core' { - interface Commands { - selectAll: { - /** - * Select the whole document. - * @example editor.commands.selectAll() - */ - selectAll: () => ReturnType; - }; - } -} -declare const selectAll: RawCommands['selectAll']; - -declare module '@tiptap/core' { - interface Commands { - selectNodeBackward: { - /** - * Select a node backward. - * @example editor.commands.selectNodeBackward() - */ - selectNodeBackward: () => ReturnType; - }; - } -} -declare const selectNodeBackward: RawCommands['selectNodeBackward']; - -declare module '@tiptap/core' { - interface Commands { - selectNodeForward: { - /** - * Select a node forward. - * @example editor.commands.selectNodeForward() - */ - selectNodeForward: () => ReturnType; - }; - } -} -declare const selectNodeForward: RawCommands['selectNodeForward']; - -declare module '@tiptap/core' { - interface Commands { - selectParentNode: { - /** - * Select the parent node. - * @example editor.commands.selectParentNode() - */ - selectParentNode: () => ReturnType; - }; - } -} -declare const selectParentNode: RawCommands['selectParentNode']; - -declare module '@tiptap/core' { - interface Commands { - selectTextblockEnd: { - /** - * Moves the cursor to the end of current text block. - * @example editor.commands.selectTextblockEnd() - */ - selectTextblockEnd: () => ReturnType; - }; - } -} -declare const selectTextblockEnd: RawCommands['selectTextblockEnd']; - -declare module '@tiptap/core' { - interface Commands { - selectTextblockStart: { - /** - * Moves the cursor to the start of current text block. - * @example editor.commands.selectTextblockStart() - */ - selectTextblockStart: () => ReturnType; - }; - } -} -declare const selectTextblockStart: RawCommands['selectTextblockStart']; - -interface SetContentOptions { - /** - * Options for parsing the content. - * @default {} - */ - parseOptions?: ParseOptions; - /** - * Whether to throw an error if the content is invalid. - */ - errorOnInvalidContent?: boolean; - /** - * Whether to emit an update event. - * @default true - */ - emitUpdate?: boolean; -} -declare module '@tiptap/core' { - interface Commands { - setContent: { - /** - * Replace the whole document with new content. - * @param content The new content. - * @param emitUpdate Whether to emit an update event. - * @param parseOptions Options for parsing the content. - * @example editor.commands.setContent('

Example text

') - */ - setContent: ( - /** - * The new content. - */ - content: Content | Fragment$1 | Node$1, - /** - * Options for `setContent`. - */ - options?: SetContentOptions) => ReturnType; - }; - } -} -declare const setContent: RawCommands['setContent']; - -declare module '@tiptap/core' { - interface Commands { - setMark: { - /** - * Add a mark with new attributes. - * @param typeOrName The mark type or name. - * @example editor.commands.setMark('bold', { level: 1 }) - */ - setMark: (typeOrName: string | MarkType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const setMark: RawCommands['setMark']; - -declare module '@tiptap/core' { - interface Commands { - setMeta: { - /** - * Store a metadata property in the current transaction. - * @param key The key of the metadata property. - * @param value The value to store. - * @example editor.commands.setMeta('foo', 'bar') - */ - setMeta: (key: string | Plugin | PluginKey, value: any) => ReturnType; - }; - } -} -declare const setMeta: RawCommands['setMeta']; - -declare module '@tiptap/core' { - interface Commands { - setNode: { - /** - * Replace a given range with a node. - * @param typeOrName The type or name of the node - * @param attributes The attributes of the node - * @example editor.commands.setNode('paragraph') - */ - setNode: (typeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const setNode: RawCommands['setNode']; - -declare module '@tiptap/core' { - interface Commands { - setNodeSelection: { - /** - * Creates a NodeSelection. - * @param position - Position of the node. - * @example editor.commands.setNodeSelection(10) - */ - setNodeSelection: (position: number) => ReturnType; - }; - } -} -declare const setNodeSelection: RawCommands['setNodeSelection']; - -declare module '@tiptap/core' { - interface Commands { - setTextDirection: { - /** - * Set the text direction for nodes. - * If no position is provided, it will use the current selection. - * @param direction The text direction to set ('ltr', 'rtl', or 'auto') - * @param position Optional position or range to apply the direction to - * @example editor.commands.setTextDirection('rtl') - * @example editor.commands.setTextDirection('ltr', { from: 0, to: 10 }) - */ - setTextDirection: (direction: 'ltr' | 'rtl' | 'auto', position?: number | Range) => ReturnType; - }; - } -} -declare const setTextDirection: RawCommands['setTextDirection']; - -declare module '@tiptap/core' { - interface Commands { - setTextSelection: { - /** - * Creates a TextSelection. - * @param position The position of the selection. - * @example editor.commands.setTextSelection(10) - */ - setTextSelection: (position: number | Range) => ReturnType; - }; - } -} -declare const setTextSelection: RawCommands['setTextSelection']; - -declare module '@tiptap/core' { - interface Commands { - sinkListItem: { - /** - * Sink the list item down into an inner list. - * @param typeOrName The type or name of the node. - * @example editor.commands.sinkListItem('listItem') - */ - sinkListItem: (typeOrName: string | NodeType$1) => ReturnType; - }; - } -} -declare const sinkListItem: RawCommands['sinkListItem']; - -declare module '@tiptap/core' { - interface Commands { - splitBlock: { - /** - * Forks a new node from an existing node. - * @param options.keepMarks Keep marks from the previous node. - * @example editor.commands.splitBlock() - * @example editor.commands.splitBlock({ keepMarks: true }) - */ - splitBlock: (options?: { - keepMarks?: boolean; - }) => ReturnType; - }; - } -} -declare const splitBlock: RawCommands['splitBlock']; - -declare module '@tiptap/core' { - interface Commands { - splitListItem: { - /** - * Splits one list item into two list items. - * @param typeOrName The type or name of the node. - * @param overrideAttrs The attributes to ensure on the new node. - * @example editor.commands.splitListItem('listItem') - */ - splitListItem: (typeOrName: string | NodeType$1, overrideAttrs?: Record) => ReturnType; - }; - } -} -declare const splitListItem: RawCommands['splitListItem']; - -declare module '@tiptap/core' { - interface Commands { - toggleList: { - /** - * Toggle between different list types. - * @param listTypeOrName The type or name of the list. - * @param itemTypeOrName The type or name of the list item. - * @param keepMarks Keep marks when toggling. - * @param attributes Attributes for the new list. - * @example editor.commands.toggleList('bulletList', 'listItem') - */ - toggleList: (listTypeOrName: string | NodeType$1, itemTypeOrName: string | NodeType$1, keepMarks?: boolean, attributes?: Record) => ReturnType; - }; - } -} -declare const toggleList: RawCommands['toggleList']; - -declare module '@tiptap/core' { - interface Commands { - toggleMark: { - /** - * Toggle a mark on and off. - * @param typeOrName The mark type or name. - * @param attributes The attributes of the mark. - * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`. - * @example editor.commands.toggleMark('bold') - */ - toggleMark: ( - /** - * The mark type or name. - */ - typeOrName: string | MarkType$1, - /** - * The attributes of the mark. - */ - attributes?: Record, options?: { - /** - * Removes the mark even across the current selection. Defaults to `false`. - */ - extendEmptyMarkRange?: boolean; - }) => ReturnType; - }; - } -} -declare const toggleMark: RawCommands['toggleMark']; - -declare module '@tiptap/core' { - interface Commands { - toggleNode: { - /** - * Toggle a node with another node. - * @param typeOrName The type or name of the node. - * @param toggleTypeOrName The type or name of the node to toggle. - * @param attributes The attributes of the node. - * @example editor.commands.toggleNode('heading', 'paragraph') - */ - toggleNode: (typeOrName: string | NodeType$1, toggleTypeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const toggleNode: RawCommands['toggleNode']; - -declare module '@tiptap/core' { - interface Commands { - toggleWrap: { - /** - * Wraps nodes in another node, or removes an existing wrap. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.toggleWrap('blockquote') - */ - toggleWrap: (typeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const toggleWrap: RawCommands['toggleWrap']; - -declare module '@tiptap/core' { - interface Commands { - undoInputRule: { - /** - * Undo an input rule. - * @example editor.commands.undoInputRule() - */ - undoInputRule: () => ReturnType; - }; - } -} -declare const undoInputRule: RawCommands['undoInputRule']; - -declare module '@tiptap/core' { - interface Commands { - unsetAllMarks: { - /** - * Remove all clearable marks in the current selection. - * Marks with `clearable: false` are preserved - * @param options.ignoreClearable If true, removes all marks regardless of `clearable` setting. Defaults to `false`. - * @example editor.commands.unsetAllMarks() - * @example editor.commands.unsetAllMarks({ ignoreClearable: true }) - */ - unsetAllMarks: (options?: { - ignoreClearable?: boolean; - }) => ReturnType; - }; - } -} -declare const unsetAllMarks: RawCommands['unsetAllMarks']; - -declare module '@tiptap/core' { - interface Commands { - unsetMark: { - /** - * Remove all marks in the current selection. - * @param typeOrName The mark type or name. - * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`. - * @example editor.commands.unsetMark('bold') - */ - unsetMark: ( - /** - * The mark type or name. - */ - typeOrName: string | MarkType$1, options?: { - /** - * Removes the mark even across the current selection. Defaults to `false`. - */ - extendEmptyMarkRange?: boolean; - }) => ReturnType; - }; - } -} -declare const unsetMark: RawCommands['unsetMark']; - -declare module '@tiptap/core' { - interface Commands { - unsetTextDirection: { - /** - * Remove the text direction attribute from nodes. - * If no position is provided, it will use the current selection. - * @param position Optional position or range to remove the direction from - * @example editor.commands.unsetTextDirection() - * @example editor.commands.unsetTextDirection({ from: 0, to: 10 }) - */ - unsetTextDirection: (position?: number | Range) => ReturnType; - }; - } -} -declare const unsetTextDirection: RawCommands['unsetTextDirection']; - -declare module '@tiptap/core' { - interface Commands { - updateAttributes: { - /** - * Update attributes of a node or mark. - * @param typeOrName The type or name of the node or mark. - * @param attributes The attributes of the node or mark. - * @example editor.commands.updateAttributes('mention', { userId: "2" }) - */ - updateAttributes: ( - /** - * The type or name of the node or mark. - */ - typeOrName: string | NodeType$1 | MarkType$1, - /** - * The attributes of the node or mark. - */ - attributes: Record) => ReturnType; - }; - } -} -declare const updateAttributes: RawCommands['updateAttributes']; - -declare module '@tiptap/core' { - interface Commands { - wrapIn: { - /** - * Wraps nodes in another node. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.wrapIn('blockquote') - */ - wrapIn: (typeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const wrapIn: RawCommands['wrapIn']; - -declare module '@tiptap/core' { - interface Commands { - wrapInList: { - /** - * Wrap a node in a list. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.wrapInList('bulletList') - */ - wrapInList: (typeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const wrapInList: RawCommands['wrapInList']; - -type index$2_InsertContentAtOptions = InsertContentAtOptions; -type index$2_InsertContentOptions = InsertContentOptions; -type index$2_SetContentOptions = SetContentOptions; -declare const index$2_blur: typeof blur; -declare const index$2_clearContent: typeof clearContent; -declare const index$2_clearNodes: typeof clearNodes; -declare const index$2_command: typeof command; -declare const index$2_createParagraphNear: typeof createParagraphNear; -declare const index$2_cut: typeof cut; -declare const index$2_deleteCurrentNode: typeof deleteCurrentNode; -declare const index$2_deleteNode: typeof deleteNode; -declare const index$2_deleteRange: typeof deleteRange; -declare const index$2_deleteSelection: typeof deleteSelection; -declare const index$2_enter: typeof enter; -declare const index$2_exitCode: typeof exitCode; -declare const index$2_extendMarkRange: typeof extendMarkRange; -declare const index$2_first: typeof first; -declare const index$2_focus: typeof focus; -declare const index$2_forEach: typeof forEach; -declare const index$2_insertContent: typeof insertContent; -declare const index$2_insertContentAt: typeof insertContentAt; -declare const index$2_joinBackward: typeof joinBackward; -declare const index$2_joinDown: typeof joinDown; -declare const index$2_joinForward: typeof joinForward; -declare const index$2_joinItemBackward: typeof joinItemBackward; -declare const index$2_joinItemForward: typeof joinItemForward; -declare const index$2_joinTextblockBackward: typeof joinTextblockBackward; -declare const index$2_joinTextblockForward: typeof joinTextblockForward; -declare const index$2_joinUp: typeof joinUp; -declare const index$2_keyboardShortcut: typeof keyboardShortcut; -declare const index$2_lift: typeof lift; -declare const index$2_liftEmptyBlock: typeof liftEmptyBlock; -declare const index$2_liftListItem: typeof liftListItem; -declare const index$2_newlineInCode: typeof newlineInCode; -declare const index$2_resetAttributes: typeof resetAttributes; -declare const index$2_scrollIntoView: typeof scrollIntoView; -declare const index$2_selectAll: typeof selectAll; -declare const index$2_selectNodeBackward: typeof selectNodeBackward; -declare const index$2_selectNodeForward: typeof selectNodeForward; -declare const index$2_selectParentNode: typeof selectParentNode; -declare const index$2_selectTextblockEnd: typeof selectTextblockEnd; -declare const index$2_selectTextblockStart: typeof selectTextblockStart; -declare const index$2_setContent: typeof setContent; -declare const index$2_setMark: typeof setMark; -declare const index$2_setMeta: typeof setMeta; -declare const index$2_setNode: typeof setNode; -declare const index$2_setNodeSelection: typeof setNodeSelection; -declare const index$2_setTextDirection: typeof setTextDirection; -declare const index$2_setTextSelection: typeof setTextSelection; -declare const index$2_sinkListItem: typeof sinkListItem; -declare const index$2_splitBlock: typeof splitBlock; -declare const index$2_splitListItem: typeof splitListItem; -declare const index$2_toggleList: typeof toggleList; -declare const index$2_toggleMark: typeof toggleMark; -declare const index$2_toggleNode: typeof toggleNode; -declare const index$2_toggleWrap: typeof toggleWrap; -declare const index$2_undoInputRule: typeof undoInputRule; -declare const index$2_unsetAllMarks: typeof unsetAllMarks; -declare const index$2_unsetMark: typeof unsetMark; -declare const index$2_unsetTextDirection: typeof unsetTextDirection; -declare const index$2_updateAttributes: typeof updateAttributes; -declare const index$2_wrapIn: typeof wrapIn; -declare const index$2_wrapInList: typeof wrapInList; -declare namespace index$2 { - export { type index$2_InsertContentAtOptions as InsertContentAtOptions, type index$2_InsertContentOptions as InsertContentOptions, type index$2_SetContentOptions as SetContentOptions, index$2_blur as blur, index$2_clearContent as clearContent, index$2_clearNodes as clearNodes, index$2_command as command, index$2_createParagraphNear as createParagraphNear, index$2_cut as cut, index$2_deleteCurrentNode as deleteCurrentNode, index$2_deleteNode as deleteNode, index$2_deleteRange as deleteRange, index$2_deleteSelection as deleteSelection, index$2_enter as enter, index$2_exitCode as exitCode, index$2_extendMarkRange as extendMarkRange, index$2_first as first, index$2_focus as focus, index$2_forEach as forEach, index$2_insertContent as insertContent, index$2_insertContentAt as insertContentAt, index$2_joinBackward as joinBackward, index$2_joinDown as joinDown, index$2_joinForward as joinForward, index$2_joinItemBackward as joinItemBackward, index$2_joinItemForward as joinItemForward, index$2_joinTextblockBackward as joinTextblockBackward, index$2_joinTextblockForward as joinTextblockForward, index$2_joinUp as joinUp, index$2_keyboardShortcut as keyboardShortcut, index$2_lift as lift, index$2_liftEmptyBlock as liftEmptyBlock, index$2_liftListItem as liftListItem, index$2_newlineInCode as newlineInCode, index$2_resetAttributes as resetAttributes, index$2_scrollIntoView as scrollIntoView, index$2_selectAll as selectAll, index$2_selectNodeBackward as selectNodeBackward, index$2_selectNodeForward as selectNodeForward, index$2_selectParentNode as selectParentNode, index$2_selectTextblockEnd as selectTextblockEnd, index$2_selectTextblockStart as selectTextblockStart, index$2_setContent as setContent, index$2_setMark as setMark, index$2_setMeta as setMeta, index$2_setNode as setNode, index$2_setNodeSelection as setNodeSelection, index$2_setTextDirection as setTextDirection, index$2_setTextSelection as setTextSelection, index$2_sinkListItem as sinkListItem, index$2_splitBlock as splitBlock, index$2_splitListItem as splitListItem, index$2_toggleList as toggleList, index$2_toggleMark as toggleMark, index$2_toggleNode as toggleNode, index$2_toggleWrap as toggleWrap, index$2_undoInputRule as undoInputRule, index$2_unsetAllMarks as unsetAllMarks, index$2_unsetMark as unsetMark, index$2_unsetTextDirection as unsetTextDirection, index$2_updateAttributes as updateAttributes, index$2_wrapIn as wrapIn, index$2_wrapInList as wrapInList }; -} - -declare const Commands$1: Extension; - -/** - * This extension allows you to be notified when the user deletes content you are interested in. - */ -declare const Delete: Extension; - -declare const Drop: Extension; - -declare const Editable: Extension; - -declare const focusEventsPluginKey: PluginKey; -declare const FocusEvents: Extension; - -declare const Keymap: Extension; - -declare const Paste: Extension; - -/** - * Options for the Tabindex extension. - */ -type TabindexOptions = { - /** - * The value for the `tabindex` attribute on the editor element. - * When undefined, editable editors default to `0` and non-editable editors get no tabindex. - */ - value?: string; -}; -/** - * The Tabindex extension adds a configurable tabindex attribute to the editor. - * - * By default, the editor gets tabindex="0" when editable. This can be customized - * via coreExtensionOptions to support specific focus ordering requirements in forms - * or to enable focusing on non-editable editors. - * - * @example - * ```ts - * new Editor({ - * coreExtensionOptions: { - * tabindex: { - * value: '-1', - * }, - * }, - * }) - * ``` - */ -declare const Tabindex: Extension; - -interface TextDirectionOptions { - direction: 'ltr' | 'rtl' | 'auto' | undefined; -} -/** - * The TextDirection extension adds support for setting text direction (LTR/RTL/auto) - * on all nodes in the editor. - * - * This extension adds a global `dir` attribute to all node types, which can be used - * to control bidirectional text rendering. The direction can be set globally via - * editor options or per-node using commands. - */ -declare const TextDirection: Extension; - -declare const index$1_ClipboardTextSerializer: typeof ClipboardTextSerializer; -declare const index$1_Delete: typeof Delete; -declare const index$1_Drop: typeof Drop; -declare const index$1_Editable: typeof Editable; -declare const index$1_FocusEvents: typeof FocusEvents; -declare const index$1_Keymap: typeof Keymap; -declare const index$1_Paste: typeof Paste; -declare const index$1_Tabindex: typeof Tabindex; -declare const index$1_TextDirection: typeof TextDirection; -declare const index$1_focusEventsPluginKey: typeof focusEventsPluginKey; -declare namespace index$1 { - export { index$1_ClipboardTextSerializer as ClipboardTextSerializer, Commands$1 as Commands, index$1_Delete as Delete, index$1_Drop as Drop, index$1_Editable as Editable, index$1_FocusEvents as FocusEvents, index$1_Keymap as Keymap, index$1_Paste as Paste, index$1_Tabindex as Tabindex, index$1_TextDirection as TextDirection, index$1_focusEventsPluginKey as focusEventsPluginKey }; -} - -interface TiptapEditorHTMLElement extends HTMLElement { - editor?: Editor; -} -declare class Editor extends EventEmitter { - private commandManager; - extensionManager: ExtensionManager; - private css; - private className; - schema: Schema; - private editorView; - isFocused: boolean; - private destroyed; - private editorState; - /** - * The editor is considered initialized after the `create` event has been emitted. - */ - isInitialized: boolean; - extensionStorage: Storage; - /** - * A unique ID for this editor instance. - */ - instanceId: string; - options: EditorOptions; - constructor(options?: Partial); - /** - * Attach the editor to the DOM, creating a new editor view. - */ - mount(el: NonNullable & {}): void; - /** - * Remove the editor from the DOM, but still allow remounting at a different point in time - */ - unmount(): void; - /** - * Returns the editor storage. - */ - get storage(): Storage; - /** - * An object of all registered commands. - */ - get commands(): SingleCommands; - /** - * Create a command chain to call multiple commands at once. - */ - chain(): ChainedCommands; - /** - * Check if a command or a command chain can be executed. Without executing it. - */ - can(): CanCommands; - /** - * Inject CSS styles. - */ - private injectCSS; - /** - * Update editor options. - * - * @param options A list of options - */ - setOptions(options?: Partial): void; - /** - * Update editable state of the editor. - */ - setEditable(editable: boolean, emitUpdate?: boolean): void; - /** - * Returns whether the editor is editable. - */ - get isEditable(): boolean; - /** - * Returns the editor view. - */ - get view(): EditorView; - /** - * Returns the editor state. - */ - get state(): EditorState; - /** - * Register a ProseMirror plugin. - * - * @param plugin A ProseMirror plugin - * @param handlePlugins Control how to merge the plugin into the existing plugins. - * @returns The new editor state - */ - registerPlugin(plugin: Plugin, handlePlugins?: (newPlugin: Plugin, plugins: Plugin[]) => Plugin[]): EditorState; - /** - * Unregister a ProseMirror plugin. - * - * @param nameOrPluginKeyToRemove The plugins name - * @returns The new editor state or undefined if the editor is destroyed - */ - unregisterPlugin(nameOrPluginKeyToRemove: string | PluginKey | (string | PluginKey)[]): EditorState | undefined; - /** - * Creates an extension manager. - */ - private createExtensionManager; - /** - * Creates an command manager. - */ - private createCommandManager; - /** - * Creates a ProseMirror schema. - */ - private createSchema; - /** - * Creates the initial document. - */ - private createDoc; - /** - * Creates a ProseMirror view. - */ - private createView; - /** - * Creates all node and mark views. - */ - createNodeViews(): void; - /** - * Prepend class name to element. - */ - prependClass(): void; - isCapturingTransaction: boolean; - private capturedTransaction; - captureTransaction(fn: () => void): Transaction | null; - /** - * The callback over which to send transactions (state updates) produced by the view. - * - * @param transaction An editor state transaction - */ - private dispatchTransaction; - /** - * Get attributes of the currently selected node or mark. - */ - getAttributes(nameOrType: string | NodeType$1 | MarkType$1): Record; - /** - * Returns if the currently selected node or mark is active. - * - * @param name Name of the node or mark - * @param attributes Attributes of the node or mark - */ - isActive(name: string, attributes?: {}): boolean; - isActive(attributes: {}): boolean; - /** - * Get the document as JSON. - */ - getJSON(): DocumentType | undefined, NodeType, any, (NodeType | TextType)[]>[]>; - /** - * Get the document as HTML. - */ - getHTML(): string; - /** - * Get the document as text. - */ - getText(options?: { - blockSeparator?: string; - textSerializers?: Record; - }): string; - /** - * Check if there is no content. - */ - get isEmpty(): boolean; - /** - * Destroy the editor. - */ - destroy(): void; - /** - * Check if the editor is already destroyed. - */ - get isDestroyed(): boolean; - $node(selector: string, attributes?: { - [key: string]: any; - }): NodePos | null; - $nodes(selector: string, attributes?: { - [key: string]: any; - }): NodePos[] | null; - $pos(pos: number): NodePos; - get $doc(): NodePos; - /** - * Returns a set of utilities for working with positions and ranges. - */ - utils: Utils; -} - -declare class CommandManager { - editor: Editor; - rawCommands: AnyCommands; - customState?: EditorState; - constructor(props: { - editor: Editor; - state?: EditorState; - }); - get hasCustomState(): boolean; - get state(): EditorState; - get commands(): SingleCommands; - get chain(): () => ChainedCommands; - get can(): () => CanCommands; - createChain(startTr?: Transaction, shouldDispatch?: boolean): ChainedCommands; - createCan(startTr?: Transaction): CanCommands; - buildProps(tr: Transaction, shouldDispatch?: boolean): CommandProps; -} - -/** - * Build an input rule that adds a mark when the - * matched text is typed into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -declare function markInputRule(config: { - find: InputRuleFinder; - type: MarkType$1; - undoable?: boolean; - getAttributes?: Record | ((match: ExtendedRegExpMatchArray) => Record) | false | null; -}): InputRule; - -/** - * Build an input rule that adds a node when the - * matched text is typed into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -declare function nodeInputRule(config: { - /** - * The regex to match. - */ - find: InputRuleFinder; - /** - * The node type to add. - */ - type: NodeType$1; - /** - * Whether the input rule should be undoable - * when the user presses backspace. - */ - undoable?: boolean; - /** - * A function that returns the attributes for the node - * can also be an object of attributes - */ - getAttributes?: Record | ((match: ExtendedRegExpMatchArray) => Record) | false | null; -}): InputRule; - -/** - * Build an input rule that changes the type of a textblock when the - * matched text is typed into it. When using a regular expresion you’ll - * probably want the regexp to start with `^`, so that the pattern can - * only occur at the start of a textblock. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -declare function textblockTypeInputRule(config: { - find: InputRuleFinder; - type: NodeType$1; - undoable?: boolean; - getAttributes?: Record | ((match: ExtendedRegExpMatchArray) => Record) | false | null; -}): InputRule; - -/** - * Build an input rule that replaces text when the - * matched text is typed into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -declare function textInputRule(config: { - find: InputRuleFinder; - replace: string; - undoable?: boolean; -}): InputRule; - -/** - * Build an input rule for automatically wrapping a textblock when a - * given string is typed. When using a regular expresion you’ll - * probably want the regexp to start with `^`, so that the pattern can - * only occur at the start of a textblock. - * - * `type` is the type of node to wrap in. - * - * By default, if there’s a node with the same type above the newly - * wrapped node, the rule will try to join those - * two nodes. You can pass a join predicate, which takes a regular - * expression match and the node before the wrapped node, and can - * return a boolean to indicate whether a join should happen. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -declare function wrappingInputRule(config: { - find: InputRuleFinder; - type: NodeType$1; - keepMarks?: boolean; - keepAttributes?: boolean; - editor?: Editor; - undoable?: boolean; - getAttributes?: Record | ((match: ExtendedRegExpMatchArray) => Record) | false | null; - joinPredicate?: (match: ExtendedRegExpMatchArray, node: Node$1) => boolean; -}): InputRule; - -type Attributes = Record; -type DOMOutputSpecElement = 0 | Attributes | DOMOutputSpecArray; -/** - * Better describes the output of a `renderHTML` function in prosemirror - * @see https://prosemirror.net/docs/ref/#model.DOMOutputSpec - */ -type DOMOutputSpecArray = [string] | [string, Attributes] | [string, 0] | [string, Attributes, 0] | [string, Attributes, DOMOutputSpecArray | 0] | [string, DOMOutputSpecArray]; -type JSXRenderer = (tag: 'slot' | string | ((props?: Attributes) => DOMOutputSpecArray | DOMOutputSpecElement), props?: Attributes, ...children: JSXRenderer[]) => DOMOutputSpecArray | DOMOutputSpecElement; -declare function Fragment(props: { - children: JSXRenderer[]; -}): JSXRenderer[]; -declare const h: JSXRenderer; - -/** - * Directions where resize handles can be placed - * - * @example - * - `'top'` - Top edge handle - * - `'bottom-right'` - Bottom-right corner handle - */ -type ResizableNodeViewDirection = 'top' | 'right' | 'bottom' | 'left' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; -/** - * Dimensions for the resizable node in pixels - */ -type ResizableNodeDimensions = { - /** Width in pixels */ - width: number; - /** Height in pixels */ - height: number; -}; -/** - * Configuration options for creating a ResizableNodeView - * - * @example - * ```ts - * new ResizableNodeView({ - * element: imgElement, - * node, - * getPos, - * onResize: (width, height) => { - * imgElement.style.width = `${width}px` - * imgElement.style.height = `${height}px` - * }, - * onCommit: (width, height) => { - * editor.commands.updateAttributes('image', { width, height }) - * }, - * onUpdate: (node) => true, - * options: { - * directions: ['bottom-right', 'bottom-left'], - * min: { width: 100, height: 100 }, - * preserveAspectRatio: true - * } - * }) - * ``` - */ -type ResizableNodeViewOptions = { - /** - * The DOM element to make resizable (e.g., an img, video, or iframe element) - */ - element: HTMLElement; - /** - * The DOM element that will hold the editable content element - */ - contentElement?: HTMLElement; - /** - * The ProseMirror node instance - */ - node: Node$1; - /** - * The Tiptap editor instance - */ - editor: Editor; - /** - * Function that returns the current position of the node in the document - */ - getPos: () => number | undefined; - /** - * Callback fired continuously during resize with current dimensions. - * Use this to update the element's visual size in real-time. - * - * @param width - Current width in pixels - * @param height - Current height in pixels - * - * @example - * ```ts - * onResize: (width, height) => { - * element.style.width = `${width}px` - * element.style.height = `${height}px` - * } - * ``` - */ - onResize?: (width: number, height: number) => void; - /** - * Callback fired once when resize completes with final dimensions. - * Use this to persist the new size to the node's attributes. - * - * @param width - Final width in pixels - * @param height - Final height in pixels - * - * @example - * ```ts - * onCommit: (width, height) => { - * const pos = getPos() - * if (pos !== undefined) { - * editor.commands.updateAttributes('image', { width, height }) - * } - * } - * ``` - */ - onCommit: (width: number, height: number) => void; - /** - * Callback for handling node updates. - * Return `true` to accept the update, `false` to reject it. - * - * @example - * ```ts - * onUpdate: (node, decorations, innerDecorations) => { - * if (node.type !== this.node.type) return false - * return true - * } - * ``` - */ - onUpdate: NodeView$1['update']; - /** - * Optional configuration for resize behavior and styling - */ - options?: { - /** - * Which resize handles to display. - * @default ['bottom-left', 'bottom-right', 'top-left', 'top-right'] - * - * @example - * ```ts - * // Only show corner handles - * directions: ['top-left', 'top-right', 'bottom-left', 'bottom-right'] - * - * // Only show right edge handle - * directions: ['right'] - * ``` - */ - directions?: ResizableNodeViewDirection[]; - /** - * Minimum dimensions in pixels - * @default { width: 8, height: 8 } - * - * @example - * ```ts - * min: { width: 100, height: 50 } - * ``` - */ - min?: Partial; - /** - * Maximum dimensions in pixels - * @default undefined (no maximum) - * - * @example - * ```ts - * max: { width: 1000, height: 800 } - * ``` - */ - max?: Partial; - /** - * Always preserve aspect ratio when resizing. - * When `false`, aspect ratio is preserved only when Shift key is pressed. - * @default false - * - * @example - * ```ts - * preserveAspectRatio: true // Always lock aspect ratio - * ``` - */ - preserveAspectRatio?: boolean; - /** - * Custom CSS class names for styling - * - * @example - * ```ts - * className: { - * container: 'resize-container', - * wrapper: 'resize-wrapper', - * handle: 'resize-handle', - * resizing: 'is-resizing' - * } - * ``` - */ - className?: { - /** Class for the outer container element */ - container?: string; - /** Class for the wrapper element that contains the resizable element */ - wrapper?: string; - /** Class applied to all resize handles */ - handle?: string; - /** Class added to container while actively resizing */ - resizing?: string; - }; - /** - * Optional callback for creating custom resize handle elements. - * - * This function allows developers to define their own handle element - * (e.g., custom icons, classes, or styles) for a given resize direction. - * It is called internally for each handle direction. - * - * @param direction - The direction of the handle being created (e.g., 'top', 'bottom-right'). - * @returns The custom handle HTMLElement. - * - * @example - * ```ts - * createCustomHandle: (direction) => { - * const handle = document.createElement('div') - * handle.dataset.resizeHandle = direction - * handle.style.position = 'absolute' - * handle.className = 'tiptap-custom-handle' - * - * const isTop = direction.includes('top') - * const isBottom = direction.includes('bottom') - * const isLeft = direction.includes('left') - * const isRight = direction.includes('right') - * - * if (isTop) handle.style.top = '0' - * if (isBottom) handle.style.bottom = '0' - * if (isLeft) handle.style.left = '0' - * if (isRight) handle.style.right = '0' - * - * // Edge handles span the full width or height - * if (direction === 'top' || direction === 'bottom') { - * handle.style.left = '0' - * handle.style.right = '0' - * } - * - * if (direction === 'left' || direction === 'right') { - * handle.style.top = '0' - * handle.style.bottom = '0' - * } - * - * return handle - * } - * ``` - */ - createCustomHandle?: (direction: ResizableNodeViewDirection) => HTMLElement; - }; -}; -/** - * A NodeView implementation that adds resize handles to any DOM element. - * - * This class creates a resizable node view for Tiptap/ProseMirror editors. - * It wraps your element with resize handles and manages the resize interaction, - * including aspect ratio preservation, min/max constraints, and keyboard modifiers. - * - * @example - * ```ts - * // Basic usage in a Tiptap extension - * addNodeView() { - * return ({ node, getPos }) => { - * const img = document.createElement('img') - * img.src = node.attrs.src - * - * return new ResizableNodeView({ - * element: img, - * node, - * getPos, - * onResize: (width, height) => { - * img.style.width = `${width}px` - * img.style.height = `${height}px` - * }, - * onCommit: (width, height) => { - * this.editor.commands.updateAttributes('image', { width, height }) - * }, - * onUpdate: () => true, - * options: { - * min: { width: 100, height: 100 }, - * preserveAspectRatio: true - * } - * }) - * } - * } - * ``` - */ -declare class ResizableNodeView { - /** The ProseMirror node instance */ - node: Node$1; - /** The Tiptap editor instance */ - editor: Editor; - /** The DOM element being made resizable */ - element: HTMLElement; - /** The editable DOM element inside the DOM */ - contentElement?: HTMLElement; - /** The outer container element (returned as NodeView.dom) */ - container: HTMLElement; - /** The wrapper element that contains the element and handles */ - wrapper: HTMLElement; - /** Function to get the current node position */ - getPos: () => number | undefined; - /** Callback fired during resize */ - onResize?: (width: number, height: number) => void; - /** Callback fired when resize completes */ - onCommit: (width: number, height: number) => void; - /** Callback for node updates */ - onUpdate?: NodeView$1['update']; - /** Active resize handle directions */ - directions: ResizableNodeViewDirection[]; - /** Minimum allowed dimensions */ - minSize: ResizableNodeDimensions; - /** Maximum allowed dimensions (optional) */ - maxSize?: Partial; - /** Whether to always preserve aspect ratio */ - preserveAspectRatio: boolean; - /** CSS class names for elements */ - classNames: { - container: string; - wrapper: string; - handle: string; - resizing: string; - }; - /** Optional callback for creating custom resize handles */ - createCustomHandle?: (direction: ResizableNodeViewDirection) => HTMLElement; - /** Initial width of the element (for aspect ratio calculation) */ - private initialWidth; - /** Initial height of the element (for aspect ratio calculation) */ - private initialHeight; - /** Calculated aspect ratio (width / height) */ - private aspectRatio; - /** Whether a resize operation is currently active */ - private isResizing; - /** The handle currently being dragged */ - private activeHandle; - /** Starting mouse X position when resize began */ - private startX; - /** Starting mouse Y position when resize began */ - private startY; - /** Element width when resize began */ - private startWidth; - /** Element height when resize began */ - private startHeight; - /** Whether Shift key is currently pressed (for temporary aspect ratio lock) */ - private isShiftKeyPressed; - /** Last known editable state of the editor */ - private lastEditableState; - /** Map of handle elements by direction */ - private handleMap; - /** - * Creates a new ResizableNodeView instance. - * - * The constructor sets up the resize handles, applies initial sizing from - * node attributes, and configures all resize behavior options. - * - * @param options - Configuration options for the resizable node view - */ - constructor(options: ResizableNodeViewOptions); - /** - * Returns the top-level DOM node that should be placed in the editor. - * - * This is required by the ProseMirror NodeView interface. The container - * includes the wrapper, handles, and the actual content element. - * - * @returns The container element to be inserted into the editor - */ - get dom(): HTMLElement; - get contentDOM(): HTMLElement | null; - private handleEditorUpdate; - /** - * Called when the node's content or attributes change. - * - * Updates the internal node reference. If a custom `onUpdate` callback - * was provided, it will be called to handle additional update logic. - * - * @param node - The new/updated node - * @param decorations - Node decorations - * @param innerDecorations - Inner decorations - * @returns `false` if the node type has changed (requires full rebuild), otherwise the result of `onUpdate` or `true` - */ - update(node: Node$1, decorations: readonly Decoration[], innerDecorations: DecorationSource): boolean; - /** - * Cleanup method called when the node view is being removed. - * - * Removes all event listeners to prevent memory leaks. This is required - * by the ProseMirror NodeView interface. If a resize is active when - * destroy is called, it will be properly cancelled. - */ - destroy(): void; - /** - * Creates the outer container element. - * - * The container is the top-level element returned by the NodeView and - * wraps the entire resizable node. It's set up with flexbox to handle - * alignment and includes data attributes for styling and identification. - * - * @returns The container element - */ - createContainer(): HTMLDivElement; - /** - * Creates the wrapper element that contains the content and handles. - * - * The wrapper uses relative positioning so that resize handles can be - * positioned absolutely within it. This is the direct parent of the - * content element being made resizable. - * - * @returns The wrapper element - */ - createWrapper(): HTMLDivElement; - /** - * Creates a resize handle element for a specific direction. - * - * Each handle is absolutely positioned and includes a data attribute - * identifying its direction for styling purposes. - * - * @param direction - The resize direction for this handle - * @returns The handle element - */ - private createHandle; - /** - * Positions a handle element according to its direction. - * - * Corner handles (e.g., 'top-left') are positioned at the intersection - * of two edges. Edge handles (e.g., 'top') span the full width or height. - * - * @param handle - The handle element to position - * @param direction - The direction determining the position - */ - private positionHandle; - /** - * Creates and attaches all resize handles to the wrapper. - * - * Iterates through the configured directions, creates a handle for each, - * positions it, attaches the mousedown listener, and appends it to the DOM. - */ - private attachHandles; - /** - * Removes all resize handles from the wrapper. - * - * Cleans up the handle map and removes each handle element from the DOM. - */ - private removeHandles; - /** - * Applies initial sizing from node attributes to the element. - * - * If width/height attributes exist on the node, they're applied to the element. - * Otherwise, the element's natural/current dimensions are measured. The aspect - * ratio is calculated for later use in aspect-ratio-preserving resizes. - */ - private applyInitialSize; - /** - * Initiates a resize operation when a handle is clicked. - * - * Captures the starting mouse position and element dimensions, sets up - * the resize state, adds the resizing class and state attribute, and - * attaches document-level listeners for mouse movement and keyboard input. - * - * @param event - The mouse down event - * @param direction - The direction of the handle being dragged - */ - private handleResizeStart; - /** - * Handles mouse movement during an active resize. - * - * Calculates the delta from the starting position, computes new dimensions - * based on the active handle direction, applies constraints and aspect ratio, - * then updates the element's style and calls the onResize callback. - * - * @param event - The mouse move event - */ - private handleMouseMove; - private handleTouchMove; - private handleResize; - /** - * Completes the resize operation when the mouse button is released. - * - * Captures final dimensions, calls the onCommit callback to persist changes, - * removes the resizing state and class, and cleans up document-level listeners. - */ - private handleMouseUp; - /** - * Tracks Shift key state to enable temporary aspect ratio locking. - * - * When Shift is pressed during resize, aspect ratio is preserved even if - * preserveAspectRatio is false. - * - * @param event - The keyboard event - */ - private handleKeyDown; - /** - * Tracks Shift key release to disable temporary aspect ratio locking. - * - * @param event - The keyboard event - */ - private handleKeyUp; - /** - * Calculates new dimensions based on mouse delta and resize direction. - * - * Takes the starting dimensions and applies the mouse movement delta - * according to the handle direction. For corner handles, both dimensions - * are affected. For edge handles, only one dimension changes. If aspect - * ratio should be preserved, delegates to applyAspectRatio. - * - * @param direction - The active resize handle direction - * @param deltaX - Horizontal mouse movement since resize start - * @param deltaY - Vertical mouse movement since resize start - * @returns The calculated width and height - */ - private calculateNewDimensions; - /** - * Applies min/max constraints to dimensions. - * - * When aspect ratio is NOT preserved, constraints are applied independently - * to width and height. When aspect ratio IS preserved, constraints are - * applied while maintaining the aspect ratio—if one dimension hits a limit, - * the other is recalculated proportionally. - * - * This ensures that aspect ratio is never broken when constrained. - * - * @param width - The unconstrained width - * @param height - The unconstrained height - * @param preserveAspectRatio - Whether to maintain aspect ratio while constraining - * @returns The constrained dimensions - */ - private applyConstraints; - /** - * Adjusts dimensions to maintain the original aspect ratio. - * - * For horizontal handles (left/right), uses width as the primary dimension - * and calculates height from it. For vertical handles (top/bottom), uses - * height as primary and calculates width. For corner handles, uses width - * as the primary dimension. - * - * @param width - The new width - * @param height - The new height - * @param direction - The active resize direction - * @returns Dimensions adjusted to preserve aspect ratio - */ - private applyAspectRatio; -} -/** - * Alias for ResizableNodeView to maintain consistent naming. - * @deprecated Use ResizableNodeView instead - will be removed in future versions. - */ -declare const ResizableNodeview: typeof ResizableNodeView; - -declare function updateMarkViewAttributes(checkMark: Mark$1, editor: Editor, attrs?: Record): void; -declare class MarkView { - component: Component; - editor: Editor; - options: Options; - mark: MarkViewProps['mark']; - HTMLAttributes: MarkViewProps['HTMLAttributes']; - constructor(component: Component, props: MarkViewProps, options?: Partial); - get dom(): HTMLElement; - get contentDOM(): HTMLElement | null; - /** - * Update the attributes of the mark in the document. - * @param attrs The attributes to update. - */ - updateAttributes(attrs: Record, checkMark?: Mark$1): void; - ignoreMutation(mutation: ViewMutationRecord): boolean; -} - -/** - * Node views are used to customize the rendered DOM structure of a node. - * @see https://tiptap.dev/guide/node-views - */ -declare class NodeView implements NodeView$1 { - component: Component; - editor: NodeEditor; - options: Options; - extension: NodeViewRendererProps['extension']; - node: NodeViewRendererProps['node']; - decorations: NodeViewRendererProps['decorations']; - innerDecorations: NodeViewRendererProps['innerDecorations']; - view: NodeViewRendererProps['view']; - getPos: NodeViewRendererProps['getPos']; - HTMLAttributes: NodeViewRendererProps['HTMLAttributes']; - isDragging: boolean; - constructor(component: Component, props: NodeViewRendererProps, options?: Partial); - mount(): void; - get dom(): HTMLElement; - get contentDOM(): HTMLElement | null; - onDragStart(event: DragEvent): void; - stopEvent(event: Event): boolean; - /** - * Called when a DOM [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) or a selection change happens within the view. - * @return `false` if the editor should re-read the selection or re-parse the range around the mutation - * @return `true` if it can safely be ignored. - */ - ignoreMutation(mutation: ViewMutationRecord): boolean; - /** - * Update the attributes of the prosemirror node. - */ - updateAttributes(attributes: Record): void; - /** - * Delete the node. - */ - deleteNode(): void; -} - -/** - * Build an paste rule that adds a mark when the - * matched text is pasted into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules - */ -declare function markPasteRule(config: { - find: PasteRuleFinder; - type: MarkType$1; - getAttributes?: Record | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record) | false | null; -}): PasteRule; - -/** - * Build an paste rule that adds a node when the - * matched text is pasted into it. - * @see https://tiptap.dev/docs/editor/api/paste-rules - */ -declare function nodePasteRule(config: { - find: PasteRuleFinder; - type: NodeType$1; - getAttributes?: Record | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record) | false | null; - getContent?: JSONContent[] | ((attrs: Record) => JSONContent[]) | false | null; -}): PasteRule; - -/** - * Build an paste rule that replaces text when the - * matched text is pasted into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules - */ -declare function textPasteRule(config: { - find: PasteRuleFinder; - replace: string; -}): PasteRule; - -interface TrackerResult { - position: number; - deleted: boolean; -} -declare class Tracker { - transaction: Transaction; - currentStep: number; - constructor(transaction: Transaction); - map(position: number): TrackerResult; -} - -/** - * Compare two attribute objects for equality. - * Handles null/undefined and asserts key presence in both objects so that - * `{ foo: undefined }` and `{ bar: undefined }` are not treated as equal. - */ -declare function attrsEqual(a: Record | null | undefined, b: Record | null | undefined): boolean; - -/** - * Optionally calls `value` as a function. - * Otherwise it is returned directly. - * @param value Function or any value. - * @param context Optional context to bind to function. - * @param props Optional props to pass to function. - */ -declare function callOrReturn(value: T, context?: any, ...props: any[]): MaybeReturnType; - -declare function canInsertNode(state: EditorState, nodeType: NodeType$1): boolean; - -declare function createStyleTag(style: string, nonce?: string, suffix?: string): HTMLStyleElement; - -/** - * Remove a property or an array of properties from an object - * @param obj Object - * @param key Key to remove - */ -declare function deleteProps(obj: Record, propOrProps: string | string[]): Record; - -declare function elementFromString(value: string): HTMLElement; - -declare function escapeForRegEx(string: string): string; - -/** - * Find duplicates in an array. - */ -declare function findDuplicates(items: T[]): T[]; - -declare function fromString(value: any): any; - -/** - * Read a CSS property value directly from an element's raw inline `style` - * attribute, bypassing the CSSOM (e.g. `element.style.fontFamily`) which - * canonicalizes values and can change formatting. The original format is - * preserved (quotes, hex vs rgb, etc.). - * - * When a property is declared more than once, the last declaration wins — - * this matches CSS cascade order and is useful when nested spans are merged - * and the child's value should take priority. - * - * Property name comparison is case-insensitive. - * - * @param element - The element whose `style` attribute should be read. - * @param propertyName - The CSS property name (e.g. `font-family`). - * @returns The raw value string, or `null` if the property is not present. - * - * @example - * ```ts - * parseHTML: element => getStyleProperty(element, 'font-family') - * ``` - */ -declare function getStyleProperty(element: HTMLElement, propertyName: string): string | null; - -/** - * Decode common HTML entities in text content so they display as literal - * characters inside the editor. The decode order matters: `&` must be - * decoded **last** so that doubly-encoded sequences like `&lt;` first - * survive the `<` pass and then correctly become `<` (not `<`). - */ -declare function decodeHtmlEntities(text: string): string; -/** - * Encode HTML special characters so they roundtrip safely through markdown. - * `&` is encoded **first** to avoid double-encoding the ampersand in other - * entities (e.g. `<` → `<`, not `&lt;`). - * - * Note: `"` is intentionally NOT encoded here because double quotes are - * ordinary characters in markdown and do not need escaping. The decode - * function still handles `"` because the markdown tokenizer may emit it. - */ -declare function encodeHtmlEntities(text: string): string; - -declare function isAndroid(): boolean; - -declare function isEmptyObject(value?: {}): boolean; - -/** - * Detects if the current browser is Firefox. - * @returns `true` if the browser is Firefox, `false` otherwise. - * @example - * if (isFirefox()) { - * // Firefox-specific handling - * } - */ -declare function isFirefox(): boolean; - -declare function isFunction(value: any): value is Function; - -declare function isiOS(): boolean; - -declare function isMacOS(): boolean; - -declare function isNumber(value: any): value is number; - -declare function isPlainObject(value: any): value is Record; - -declare function isRegExp(value: any): value is RegExp; - -/** - * Detects if the current browser is Safari (but not iOS Safari or Chrome). - * @returns `true` if the browser is Safari, `false` otherwise. - * @example - * if (isSafari()) { - * // Safari-specific handling - * } - */ -declare function isSafari(): boolean; - -declare function isString(value: any): value is string; - -/** - * @fileoverview Utility functions for parsing and serializing markdown attributes. - * - * These utilities handle the common patterns for parsing attribute strings - * in various markdown syntaxes like Pandoc attributes. - */ -/** - * Parses a Pandoc-style attribute string into an object. - * - * Supports the following patterns: - * - Classes: `.className` → `{ class: 'className' }` - * - IDs: `#myId` → `{ id: 'myId' }` - * - Key-value pairs: `key="value"` → `{ key: 'value' }` - * - Boolean attributes: `disabled` → `{ disabled: true }` - * - * @param attrString - The attribute string to parse - * @returns Parsed attributes object - * - * @example - * ```ts - * parseAttributes('.btn #submit disabled type="button"') - * // → { class: 'btn', id: 'submit', disabled: true, type: 'button' } - * ``` - */ -declare function parseAttributes(attrString: string): Record; -/** - * Serializes an attributes object back to a Pandoc-style attribute string. - * - * @param attributes - The attributes object to serialize - * @returns Serialized attribute string - * - * @example - * ```ts - * serializeAttributes({ class: 'btn primary', id: 'submit', disabled: true, type: 'button' }) - * // → '.btn.primary #submit disabled type="button"' - * ``` - */ -declare function serializeAttributes(attributes: Record): string; - -interface AtomBlockMarkdownSpecOptions { - /** The Tiptap node name this spec is for */ - nodeName: string; - /** The markdown syntax name (defaults to nodeName if not provided) */ - name?: string; - /** Function to parse attributes from token attribute string */ - parseAttributes?: (attrString: string) => Record; - /** Function to serialize attributes back to string for rendering */ - serializeAttributes?: (attrs: Record) => string; - /** Default attributes to apply when parsing */ - defaultAttributes?: Record; - /** Required attributes that must be present for successful parsing */ - requiredAttributes?: string[]; - /** Attributes that are allowed to be rendered back to markdown (whitelist) */ - allowedAttributes?: string[]; -} -/** - * Creates a complete markdown spec for atomic block nodes using Pandoc syntax. - * - * The generated spec handles: - * - Parsing self-closing blocks with `:::blockName {attributes}` - * - Extracting and parsing attributes - * - Validating required attributes - * - Rendering blocks back to markdown - * - * @param options - Configuration for the atomic block markdown spec - * @returns Complete markdown specification object - * - * @example - * ```ts - * const youtubeSpec = createAtomBlockMarkdownSpec({ - * nodeName: 'youtube', - * requiredAttributes: ['src'], - * defaultAttributes: { start: 0 }, - * allowedAttributes: ['src', 'start', 'width', 'height'] // Only these get rendered to markdown - * }) - * - * // Usage in extension: - * export const Youtube = Node.create({ - * // ... other config - * markdown: youtubeSpec - * }) - * ``` - */ -declare function createAtomBlockMarkdownSpec(options: AtomBlockMarkdownSpecOptions): { - parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult; - markdownTokenizer: MarkdownTokenizer; - renderMarkdown: (node: JSONContent) => string; -}; - -interface BlockMarkdownSpecOptions { - /** The Tiptap node name this spec is for */ - nodeName: string; - /** The markdown syntax name (defaults to nodeName if not provided) */ - name?: string; - /** Function to extract content from the node for serialization */ - getContent?: (token: MarkdownToken) => string; - /** Function to parse attributes from the attribute string */ - parseAttributes?: (attrString: string) => Record; - /** Function to serialize attributes to string */ - serializeAttributes?: (attrs: Record) => string; - /** Default attributes to apply when parsing */ - defaultAttributes?: Record; - /** Content type: 'block' allows paragraphs/lists/etc, 'inline' only allows bold/italic/links/etc */ - content?: 'block' | 'inline'; - /** Allowlist of attributes to include in markdown (if not provided, all attributes are included) */ - allowedAttributes?: string[]; -} -/** - * Creates a complete markdown spec for block-level nodes using Pandoc syntax. - * - * The generated spec handles: - * - Parsing blocks with `:::blockName {attributes}` syntax - * - Extracting and parsing attributes - * - Rendering blocks back to markdown with proper formatting - * - Nested content support - * - * @param options - Configuration for the block markdown spec - * @returns Complete markdown specification object - * - * @example - * ```ts - * const calloutSpec = createBlockMarkdownSpec({ - * nodeName: 'callout', - * defaultAttributes: { type: 'info' }, - * allowedAttributes: ['type', 'title'] // Only these get rendered to markdown - * }) - * - * // Usage in extension: - * export const Callout = Node.create({ - * // ... other config - * markdown: calloutSpec - * }) - * ``` - */ -declare function createBlockMarkdownSpec(options: BlockMarkdownSpecOptions): { - parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult; - markdownTokenizer: MarkdownTokenizer; - renderMarkdown: (node: JSONContent, h: MarkdownRendererHelpers) => string; -}; - -/** - * Configuration for an allowed attribute in markdown serialization. - * Can be a simple string (attribute name) or an object with additional options. - */ -type AllowedAttribute = string | { - /** The attribute name */ - name: string; - /** - * If provided, the attribute will be skipped during serialization when its value - * equals this default value. This keeps markdown output clean by omitting - * attributes that have their default values. - */ - skipIfDefault?: any; -}; -interface InlineMarkdownSpecOptions { - /** The Tiptap node name this spec is for */ - nodeName: string; - /** The shortcode name (defaults to nodeName if not provided) */ - name?: string; - /** Function to extract content from the node for serialization */ - getContent?: (node: any) => string; - /** Function to parse attributes from the attribute string */ - parseAttributes?: (attrString: string) => Record; - /** Function to serialize attributes to string */ - serializeAttributes?: (attrs: Record) => string; - /** Default attributes to apply when parsing */ - defaultAttributes?: Record; - /** Whether this is a self-closing shortcode (no content, like [emoji name=party]) */ - selfClosing?: boolean; - /** - * Allowlist of attributes to include in markdown serialization. - * If not provided, all attributes are included. - * - * Each item can be either: - * - A string: the attribute name (always included if present) - * - An object: `{ name: string, skipIfDefault?: any }` for conditional inclusion - * - * @example - * // Simple string attributes (backward compatible) - * allowedAttributes: ['id', 'label'] - * - * // Mixed with conditional attributes - * allowedAttributes: [ - * 'id', - * 'label', - * { name: 'mentionSuggestionChar', skipIfDefault: '@' } - * ] - */ - allowedAttributes?: AllowedAttribute[]; -} -/** - * Creates a complete markdown spec for inline nodes using attribute syntax. - * - * The generated spec handles: - * - Parsing shortcode syntax with `[nodeName attributes]content[/nodeName]` format - * - Self-closing shortcodes like `[emoji name=party_popper]` - * - Extracting and parsing attributes from the opening tag - * - Rendering inline elements back to shortcode markdown - * - Supporting both content-based and self-closing inline elements - * - * @param options - Configuration for the inline markdown spec - * @returns Complete markdown specification object - * - * @example - * ```ts - * // Self-closing mention: [mention id="madonna" label="Madonna"] - * const mentionSpec = createInlineMarkdownSpec({ - * nodeName: 'mention', - * selfClosing: true, - * defaultAttributes: { type: 'user' }, - * allowedAttributes: ['id', 'label'] // Only these get rendered to markdown - * }) - * - * // Self-closing emoji: [emoji name="party_popper"] - * const emojiSpec = createInlineMarkdownSpec({ - * nodeName: 'emoji', - * selfClosing: true, - * allowedAttributes: ['name'] - * }) - * - * // With content: [highlight color="yellow"]text[/highlight] - * const highlightSpec = createInlineMarkdownSpec({ - * nodeName: 'highlight', - * selfClosing: false, - * allowedAttributes: ['color', 'style'] - * }) - * - * // Usage in extension: - * export const Mention = Node.create({ - * name: 'mention', // Must match nodeName - * // ... other config - * markdown: mentionSpec - * }) - * ``` - */ -declare function createInlineMarkdownSpec(options: InlineMarkdownSpecOptions): { - parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult; - markdownTokenizer: MarkdownTokenizer; - renderMarkdown: (node: JSONContent) => string; -}; - -/** - * @fileoverview Utility for parsing indented markdown blocks with hierarchical nesting. - * - * This utility handles the complex logic of parsing markdown blocks that can contain - * nested content based on indentation levels, maintaining proper hierarchical structure - * for lists, task lists, and other indented block types. - */ -interface ParsedBlock { - type: string; - raw: string; - mainContent: string; - indentLevel: number; - nestedContent?: string; - nestedTokens?: any[]; - [key: string]: any; -} -interface BlockParserConfig { - /** Regex pattern to match block items */ - itemPattern: RegExp; - /** Function to extract data from regex match */ - extractItemData: (match: RegExpMatchArray) => { - mainContent: string; - indentLevel: number; - [key: string]: any; - }; - /** Function to create the final token */ - createToken: (data: any, nestedTokens?: any[]) => ParsedBlock; - /** Base indentation to remove from nested content (default: 2 spaces) */ - baseIndentSize?: number; - /** - * Custom parser for nested content. If provided, this will be called instead - * of the default lexer.blockTokens() for parsing nested content. - * This allows recursive parsing of the same block type. - */ - customNestedParser?: (dedentedContent: string) => any[] | undefined; -} -/** - * Parses markdown text into hierarchical indented blocks with proper nesting. - * - * This utility handles: - * - Line-by-line parsing with pattern matching - * - Hierarchical nesting based on indentation levels - * - Nested content collection and parsing - * - Empty line handling - * - Content dedenting for nested blocks - * - * The key difference from flat parsing is that this maintains the hierarchical - * structure where nested items become `nestedTokens` of their parent items, - * rather than being flattened into a single array. - * - * @param src - The markdown source text to parse - * @param config - Configuration object defining how to parse and create tokens - * @param lexer - Markdown lexer for parsing nested content - * @returns Parsed result with hierarchical items, or undefined if no matches - * - * @example - * ```ts - * const result = parseIndentedBlocks(src, { - * itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - * extractItemData: (match) => ({ - * indentLevel: match[1].length, - * mainContent: match[4], - * checked: match[3].toLowerCase() === 'x' - * }), - * createToken: (data, nestedTokens) => ({ - * type: 'taskItem', - * checked: data.checked, - * text: data.mainContent, - * nestedTokens - * }) - * }, lexer) - * ``` - */ -declare function parseIndentedBlocks(src: string, config: BlockParserConfig, lexer: { - inlineTokens: (src: string) => any[]; - blockTokens: (src: string) => any[]; -}): { - items: ParsedBlock[]; - raw: string; -} | undefined; - -/** - * @fileoverview Utility functions for rendering nested content in markdown. - * - * This module provides reusable utilities for extensions that need to render - * content with a prefix on the main line and properly indented nested content. - */ -/** - * Utility function for rendering content with a main line prefix and nested indented content. - * - * This function handles the common pattern of rendering content with: - * 1. A main line with a prefix (like "- " for lists, "> " for blockquotes, etc.) - * 2. Nested content that gets indented properly - * - * @param node - The ProseMirror node representing the content - * @param h - The markdown renderer helper - * @param prefixOrGenerator - Either a string prefix or a function that generates the prefix from context - * @param ctx - Optional context object (used when prefixOrGenerator is a function) - * @returns The rendered markdown string - * - * @example - * ```ts - * // For a bullet list item with static prefix - * return renderNestedMarkdownContent(node, h, '- ') - * - * // For a task item with static prefix - * const prefix = `- [${node.attrs?.checked ? 'x' : ' '}] ` - * return renderNestedMarkdownContent(node, h, prefix) - * - * // For a blockquote with static prefix - * return renderNestedMarkdownContent(node, h, '> ') - * - * // For content with dynamic prefix based on context - * return renderNestedMarkdownContent(node, h, ctx => { - * if (ctx.parentType === 'orderedList') { - * return `${ctx.index + 1}. ` - * } - * return '- ' - * }, ctx) - * - * // Custom extension example - * const CustomContainer = Node.create({ - * name: 'customContainer', - * // ... other config - * markdown: { - * render: (node, h) => { - * const type = node.attrs?.type || 'info' - * return renderNestedMarkdownContent(node, h, `[${type}] `) - * } - * } - * }) - * ``` - */ -declare function renderNestedMarkdownContent(node: JSONContent, h: { - renderChildren: (nodes: JSONContent[]) => string; - renderChild?: (node: JSONContent, index: number) => string; - indent: (text: string) => string; -}, prefixOrGenerator: string | ((ctx: any) => string), ctx?: any): string; - -/** - * @fileoverview Markdown utilities for creating standardized markdown specs. - * - * This module provides utilities for creating complete markdown specifications - * for different types of nodes using unified syntax patterns. - */ - -type index_AllowedAttribute = AllowedAttribute; -type index_AtomBlockMarkdownSpecOptions = AtomBlockMarkdownSpecOptions; -type index_BlockMarkdownSpecOptions = BlockMarkdownSpecOptions; -type index_BlockParserConfig = BlockParserConfig; -type index_InlineMarkdownSpecOptions = InlineMarkdownSpecOptions; -type index_ParsedBlock = ParsedBlock; -declare const index_createAtomBlockMarkdownSpec: typeof createAtomBlockMarkdownSpec; -declare const index_createBlockMarkdownSpec: typeof createBlockMarkdownSpec; -declare const index_createInlineMarkdownSpec: typeof createInlineMarkdownSpec; -declare const index_parseAttributes: typeof parseAttributes; -declare const index_parseIndentedBlocks: typeof parseIndentedBlocks; -declare const index_renderNestedMarkdownContent: typeof renderNestedMarkdownContent; -declare const index_serializeAttributes: typeof serializeAttributes; -declare namespace index { - export { type index_AllowedAttribute as AllowedAttribute, type index_AtomBlockMarkdownSpecOptions as AtomBlockMarkdownSpecOptions, type index_BlockMarkdownSpecOptions as BlockMarkdownSpecOptions, type index_BlockParserConfig as BlockParserConfig, type index_InlineMarkdownSpecOptions as InlineMarkdownSpecOptions, type index_ParsedBlock as ParsedBlock, index_createAtomBlockMarkdownSpec as createAtomBlockMarkdownSpec, index_createBlockMarkdownSpec as createBlockMarkdownSpec, index_createInlineMarkdownSpec as createInlineMarkdownSpec, index_parseAttributes as parseAttributes, index_parseIndentedBlocks as parseIndentedBlocks, index_renderNestedMarkdownContent as renderNestedMarkdownContent, index_serializeAttributes as serializeAttributes }; -} - -/** - * Compare two arrays of mark objects for equality. - * Marks are compared by type and attributes (using attrsEqual), - * so key ordering in attrs does not matter. - */ -declare function marksEqual(a: { - type: string; - attrs?: Record; -}[], b: { - type: string; - attrs?: Record; -}[]): boolean; - -declare function mergeAttributes(...objects: Record[]): Record; - -declare function mergeDeep(target: Record, source: Record): Record; - -declare function minMax(value?: number, min?: number, max?: number): number; - -/** - * Check if object1 includes object2 - * @param object1 Object - * @param object2 Object - */ -declare function objectIncludes(object1: Record, object2: Record, options?: { - strict: boolean; -}): boolean; - -/** - * Removes duplicated values within an array. - * Supports numbers, strings and objects. - */ -declare function removeDuplicates(array: T[], by?: { - (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - (value: any, replacer?: (number | string)[] | null, space?: string | number): string; -}): T[]; - -interface Commands { -} -interface Storage { -} - -export { type AllowedAttribute, type AnyCommands, type AnyConfig, type AnyExtension, type AtomBlockMarkdownSpecOptions, type Attribute, type Attributes$1 as Attributes, type BlockMarkdownSpecOptions, type BlockParserConfig, type CanCommands, type ChainedCommands, type ChangedRange, type Command, CommandManager, type CommandProps, type CommandSpec, type Commands, type Content, type CreateNodeFromContentOptions, type DOMNode, type DOMOutputSpecArray$1 as DOMOutputSpecArray, type DecorationType, type DecorationWithType, type Diff, type Dispatch, type DispatchTransactionProps, type DocumentType, Editor, type EditorEvents, type EditorOptions, type EnableRules, Extendable, type ExtendableConfig, type ExtendedRegExpMatchArray, Extension, type ExtensionAttribute, type ExtensionConfig, type Extensions, type FocusPosition, Fragment, type FullMarkdownHelpers, type GetUpdatedPositionResult, type GlobalAttributes, type HTMLContent, type InlineMarkdownSpecOptions, InputRule, type InputRuleFinder, type InputRuleMatch, type InsertContentAtOptions, type InsertContentOptions, type JSONContent, type KeyboardShortcutCommand, type KeysWithTypeOf, MappablePosition, Mark, type MarkConfig, type MarkRange, type MarkType, MarkView, type MarkViewProps, type MarkViewRenderer, type MarkViewRendererOptions, type MarkViewRendererProps, type MarkdownExtensionSpec, type MarkdownHelpers, type MarkdownLexerConfiguration, type MarkdownParseHelpers, type MarkdownParseResult, type MarkdownRendererHelpers, type MarkdownToken, type MarkdownTokenizer, type MaybeReturnType, type MaybeThisParameterType, Node, type NodeConfig, NodePos, type NodeRange, type NodeType, NodeView, type NodeViewProps, type NodeViewRenderer, type NodeViewRendererOptions, type NodeViewRendererProps, type NodeWithPos, type Overwrite, type ParentConfig, type ParsedBlock, PasteRule, type PasteRuleFinder, type PasteRuleMatch, type PickValue, type Predicate, type Primitive, type Range, type RawCommands, type RemoveThis, type RenderContext, type ResizableNodeDimensions, ResizableNodeView, type ResizableNodeViewDirection, type ResizableNodeViewOptions, ResizableNodeview, type SetContentOptions, type SingleCommands, type Storage, type TextSerializer, type TextType, type TiptapEditorHTMLElement, Tracker, type TrackerResult, type UnionCommands, type UnionToIntersection, type Utils, type ValuesOf, attrsEqual, blur, callOrReturn, canInsertNode, clearContent, clearNodes, combineTransactionSteps, command, index$2 as commands, createAtomBlockMarkdownSpec, createBlockMarkdownSpec, createChainableState, createDocument, h as createElement, createInlineMarkdownSpec, createMappablePosition, createNodeFromContent, createParagraphNear, createStyleTag, cut, decodeHtmlEntities, defaultBlockAt, deleteCurrentNode, deleteNode, deleteProps, deleteRange, deleteSelection, elementFromString, encodeHtmlEntities, enter, escapeForRegEx, exitCode, extendMarkRange, index$1 as extensions, findChildren, findChildrenInRange, findDuplicates, findParentNode, findParentNodeClosestToPos, first, flattenExtensions, focus, forEach, fromString, generateHTML, generateJSON, generateText, getAttributes, getAttributesFromExtensions, getChangedRanges, getDebugJSON, getExtensionField, getHTMLFromFragment, getMarkAttributes, getMarkRange, getMarkType, getMarksBetween, getNodeAtPosition, getNodeAttributes, getNodeType, getRenderedAttributes, getSchema, getSchemaByResolvedExtensions, getSchemaTypeByName, getSchemaTypeNameByName, getSplittedAttributes, getStyleProperty, getText, getTextBetween, getTextContentFromNodes, getTextSerializersFromSchema, getUpdatedPosition, h, injectExtensionAttributesToParseRule, inputRulesPlugin, insertContent, insertContentAt, isActive, isAndroid, isAtEndOfNode, isAtStartOfNode, isEmptyObject, isExtensionRulesEnabled, isFirefox, isFunction, isList, isMacOS, isMarkActive, isNodeActive, isNodeEmpty, isNodeSelection, isNodeViewSelected, isNumber, isPlainObject, isRegExp, isSafari, isString, isTextSelection, isiOS, joinBackward, joinDown, joinForward, joinItemBackward, joinItemForward, joinTextblockBackward, joinTextblockForward, joinUp, keyboardShortcut, lift, liftEmptyBlock, liftListItem, markInputRule, markPasteRule, index as markdown, marksEqual, mergeAttributes, mergeDeep, minMax, newlineInCode, nodeInputRule, nodePasteRule, objectIncludes, parseAttributes, parseIndentedBlocks, pasteRulesPlugin, posToDOMRect, removeDuplicates, renderNestedMarkdownContent, resetAttributes, resolveExtensions, resolveFocusPosition, rewriteUnknownContent, scrollIntoView, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, selectTextblockEnd, selectTextblockStart, selectionToInsertionEnd, serializeAttributes, setContent, setMark, setMeta, setNode, setNodeSelection, setTextDirection, setTextSelection, sinkListItem, sortExtensions, splitBlock, splitExtensions, splitListItem, textInputRule, textPasteRule, textblockTypeInputRule, toggleList, toggleMark, toggleNode, toggleWrap, undoInputRule, unsetAllMarks, unsetMark, unsetTextDirection, updateAttributes, updateMarkViewAttributes, wrapIn, wrapInList, wrappingInputRule }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.d.ts deleted file mode 100644 index 5ac63a6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.d.ts +++ /dev/null @@ -1,5121 +0,0 @@ -import { Transaction, EditorState, Plugin, Selection, NodeSelection, TextSelection, PluginKey } from '@tiptap/pm/state'; -import { Node as Node$1, MarkType as MarkType$1, MarkSpec, Mark as Mark$1, DOMOutputSpec, NodeType as NodeType$1, NodeSpec, Slice, ParseOptions, Fragment as Fragment$1, Schema, ContentMatch, ResolvedPos, ParseRule } from '@tiptap/pm/model'; -import { NodeViewConstructor, NodeView as NodeView$1, MarkViewConstructor, MarkView as MarkView$1, EditorProps, EditorView, Decoration, DecorationAttrs, ViewMutationRecord, DecorationSource } from '@tiptap/pm/view'; -import { Transform, Mappable, MapResult } from '@tiptap/pm/transform'; - -type StringKeyOf = Extract; -type CallbackType, EventName extends StringKeyOf> = T[EventName] extends any[] ? T[EventName] : [T[EventName]]; -type CallbackFunction, EventName extends StringKeyOf> = (...props: CallbackType) => any; -declare class EventEmitter> { - private callbacks; - on>(event: EventName, fn: CallbackFunction): this; - emit>(event: EventName, ...args: CallbackType): this; - off>(event: EventName, fn?: CallbackFunction): this; - once>(event: EventName, fn: CallbackFunction): this; - removeAllListeners(): void; -} - -/** - * Returns a new `Transform` based on all steps of the passed transactions. - * @param oldDoc The Prosemirror node to start from - * @param transactions The transactions to combine - * @returns A new `Transform` with all steps of the passed transactions - */ -declare function combineTransactionSteps(oldDoc: Node$1, transactions: Transaction[]): Transform; - -/** - * Takes a Transaction & Editor State and turns it into a chainable state object - * @param config The transaction and state to create the chainable state from - * @returns A chainable Editor state object - */ -declare function createChainableState(config: { - transaction: Transaction; - state: EditorState; -}): EditorState; - -type InputRuleMatch = { - index: number; - text: string; - replaceWith?: string; - match?: RegExpMatchArray; - data?: Record; -}; -type InputRuleFinder = RegExp | ((text: string) => InputRuleMatch | null); -declare class InputRule { - find: InputRuleFinder; - handler: (props: { - state: EditorState; - range: Range; - match: ExtendedRegExpMatchArray; - commands: SingleCommands; - chain: () => ChainedCommands; - can: () => CanCommands; - }) => void | null; - undoable: boolean; - constructor(config: { - find: InputRuleFinder; - handler: (props: { - state: EditorState; - range: Range; - match: ExtendedRegExpMatchArray; - commands: SingleCommands; - chain: () => ChainedCommands; - can: () => CanCommands; - }) => void | null; - undoable?: boolean; - }); -} -/** - * Create an input rules plugin. When enabled, it will cause text - * input that matches any of the given rules to trigger the rule’s - * action. - */ -declare function inputRulesPlugin(props: { - editor: Editor; - rules: InputRule[]; -}): Plugin; - -interface MarkConfig extends ExtendableConfig, MarkType$1> { - /** - * Mark View - */ - addMarkView?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: MarkType$1; - parent: ParentConfig>['addMarkView']; - }) => MarkViewRenderer) | null; - /** - * Keep mark after split node - */ - keepOnSplit?: boolean | (() => boolean); - /** - * Whether this mark is removed by `unsetAllMarks`. - * Set to `false` for semantic marks (comments, suggestions) that should survive "clear formatting". - * @default true - */ - clearable?: boolean | (() => boolean); - /** - * Inclusive - */ - inclusive?: MarkSpec['inclusive'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['inclusive']; - editor?: Editor; - }) => MarkSpec['inclusive']); - /** - * Excludes - */ - excludes?: MarkSpec['excludes'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['excludes']; - editor?: Editor; - }) => MarkSpec['excludes']); - /** - * Marks this Mark as exitable - */ - exitable?: boolean | (() => boolean); - /** - * Group - */ - group?: MarkSpec['group'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['group']; - editor?: Editor; - }) => MarkSpec['group']); - /** - * Spanning - */ - spanning?: MarkSpec['spanning'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['spanning']; - editor?: Editor; - }) => MarkSpec['spanning']); - /** - * Code - */ - code?: boolean | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['code']; - editor?: Editor; - }) => boolean); - /** - * Parse HTML - */ - parseHTML?: (this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['parseHTML']; - editor?: Editor; - }) => MarkSpec['parseDOM']; - /** - * Render HTML - */ - renderHTML?: ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['renderHTML']; - editor?: Editor; - }, props: { - mark: Mark$1; - HTMLAttributes: Record; - }) => DOMOutputSpec) | null; - /** - * Attributes - */ - addAttributes?: (this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['addAttributes']; - editor?: Editor; - }) => Attributes$1 | {}; -} -/** - * The Mark class is used to create custom mark extensions. - * @see https://tiptap.dev/api/extensions#create-a-new-extension - */ -declare class Mark extends Extendable> { - type: string; - /** - * Create a new Mark instance - * @param config - Mark configuration object or a function that returns a configuration object - */ - static create(config?: Partial> | (() => Partial>)): Mark; - static handleExit({ editor, mark }: { - editor: Editor; - mark: Mark; - }): boolean; - configure(options?: Partial): Mark; - extend = MarkConfig>(extendedConfig?: (() => Partial) | (Partial & ThisType<{ - name: string; - options: ExtendedOptions; - storage: ExtendedStorage; - editor: Editor; - type: MarkType$1; - }>)): Mark; -} - -interface NodeConfig extends ExtendableConfig, NodeType$1> { - /** - * Node View - */ - addNodeView?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: NodeType$1; - parent: ParentConfig>['addNodeView']; - }) => NodeViewRenderer | null) | null; - /** - * Defines if this node should be a top level node (doc) - * @default false - * @example true - */ - topNode?: boolean; - /** - * The content expression for this node, as described in the [schema - * guide](/docs/guide/#schema.content_expressions). When not given, - * the node does not allow any content. - * - * You can read more about it on the Prosemirror documentation here - * @see https://prosemirror.net/docs/guide/#schema.content_expressions - * @default undefined - * @example content: 'block+' - * @example content: 'headline paragraph block*' - */ - content?: NodeSpec['content'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['content']; - editor?: Editor; - }) => NodeSpec['content']); - /** - * The marks that are allowed inside of this node. May be a - * space-separated string referring to mark names or groups, `"_"` - * to explicitly allow all marks, or `""` to disallow marks. When - * not given, nodes with inline content default to allowing all - * marks, other nodes default to not allowing marks. - * - * @example marks: 'strong em' - */ - marks?: NodeSpec['marks'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['marks']; - editor?: Editor; - }) => NodeSpec['marks']); - /** - * The group or space-separated groups to which this node belongs, - * which can be referred to in the content expressions for the - * schema. - * - * By default Tiptap uses the groups 'block' and 'inline' for nodes. You - * can also use custom groups if you want to group specific nodes together - * and handle them in your schema. - * @example group: 'block' - * @example group: 'inline' - * @example group: 'customBlock' // this uses a custom group - */ - group?: NodeSpec['group'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['group']; - editor?: Editor; - }) => NodeSpec['group']); - /** - * Should be set to true for inline nodes. (Implied for text nodes.) - */ - inline?: NodeSpec['inline'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['inline']; - editor?: Editor; - }) => NodeSpec['inline']); - /** - * Can be set to true to indicate that, though this isn't a [leaf - * node](https://prosemirror.net/docs/ref/#model.NodeType.isLeaf), it doesn't have directly editable - * content and should be treated as a single unit in the view. - * - * @example atom: true - */ - atom?: NodeSpec['atom'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['atom']; - editor?: Editor; - }) => NodeSpec['atom']); - /** - * Controls whether nodes of this type can be selected as a [node - * selection](https://prosemirror.net/docs/ref/#state.NodeSelection). Defaults to true for non-text - * nodes. - * - * @default true - * @example selectable: false - */ - selectable?: NodeSpec['selectable'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['selectable']; - editor?: Editor; - }) => NodeSpec['selectable']); - /** - * Determines whether nodes of this type can be dragged without - * being selected. Defaults to false. - * - * @default: false - * @example: draggable: true - */ - draggable?: NodeSpec['draggable'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['draggable']; - editor?: Editor; - }) => NodeSpec['draggable']); - /** - * Can be used to indicate that this node contains code, which - * causes some commands to behave differently. - */ - code?: NodeSpec['code'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['code']; - editor?: Editor; - }) => NodeSpec['code']); - /** - * Controls way whitespace in this a node is parsed. The default is - * `"normal"`, which causes the [DOM parser](https://prosemirror.net/docs/ref/#model.DOMParser) to - * collapse whitespace in normal mode, and normalize it (replacing - * newlines and such with spaces) otherwise. `"pre"` causes the - * parser to preserve spaces inside the node. When this option isn't - * given, but [`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) is true, `whitespace` - * will default to `"pre"`. Note that this option doesn't influence - * the way the node is rendered—that should be handled by `toDOM` - * and/or styling. - */ - whitespace?: NodeSpec['whitespace'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['whitespace']; - editor?: Editor; - }) => NodeSpec['whitespace']); - /** - * Allows a **single** node to be set as linebreak equivalent (e.g. hardBreak). - * When converting between block types that have whitespace set to "pre" - * and don't support the linebreak node (e.g. codeBlock) and other block types - * that do support the linebreak node (e.g. paragraphs) - this node will be used - * as the linebreak instead of stripping the newline. - * - * See [linebreakReplacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement). - */ - linebreakReplacement?: NodeSpec['linebreakReplacement'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['linebreakReplacement']; - editor?: Editor; - }) => NodeSpec['linebreakReplacement']); - /** - * When enabled, enables both - * [`definingAsContext`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext) and - * [`definingForContent`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent). - * - * @default false - * @example isolating: true - */ - defining?: NodeSpec['defining'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['defining']; - editor?: Editor; - }) => NodeSpec['defining']); - /** - * When enabled (default is false), the sides of nodes of this type - * count as boundaries that regular editing operations, like - * backspacing or lifting, won't cross. An example of a node that - * should probably have this enabled is a table cell. - */ - isolating?: NodeSpec['isolating'] | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['isolating']; - editor?: Editor; - }) => NodeSpec['isolating']); - /** - * Associates DOM parser information with this node, which can be - * used by [`DOMParser.fromSchema`](https://prosemirror.net/docs/ref/#model.DOMParser^fromSchema) to - * automatically derive a parser. The `node` field in the rules is - * implied (the name of this node will be filled in automatically). - * If you supply your own parser, you do not need to also specify - * parsing rules in your schema. - * - * @example parseHTML: [{ tag: 'div', attrs: { 'data-id': 'my-block' } }] - */ - parseHTML?: (this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['parseHTML']; - editor?: Editor; - }) => NodeSpec['parseDOM']; - /** - * A description of a DOM structure. Can be either a string, which is - * interpreted as a text node, a DOM node, which is interpreted as - * itself, a `{dom, contentDOM}` object, or an array. - * - * An array describes a DOM element. The first value in the array - * should be a string—the name of the DOM element, optionally prefixed - * by a namespace URL and a space. If the second element is plain - * object, it is interpreted as a set of attributes for the element. - * Any elements after that (including the 2nd if it's not an attribute - * object) are interpreted as children of the DOM elements, and must - * either be valid `DOMOutputSpec` values, or the number zero. - * - * The number zero (pronounced “hole”) is used to indicate the place - * where a node's child nodes should be inserted. If it occurs in an - * output spec, it should be the only child element in its parent - * node. - * - * @example toDOM: ['div[data-id="my-block"]', { class: 'my-block' }, 0] - */ - renderHTML?: ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['renderHTML']; - editor?: Editor; - }, props: { - node: Node$1; - HTMLAttributes: Record; - }) => DOMOutputSpec) | null; - /** - * renders the node as text - * @example renderText: () => 'foo - */ - renderText?: ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['renderText']; - editor?: Editor; - }, props: { - node: Node$1; - pos: number; - parent: Node$1; - index: number; - }) => string) | null; - /** - * Add attributes to the node - * @example addAttributes: () => ({ class: 'foo' }) - */ - addAttributes?: (this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['addAttributes']; - editor?: Editor; - }) => Attributes$1 | {}; -} -/** - * The Node class is used to create custom node extensions. - * @see https://tiptap.dev/api/extensions#create-a-new-extension - */ -declare class Node extends Extendable> { - type: string; - /** - * Create a new Node instance - * @param config - Node configuration object or a function that returns a configuration object - */ - static create(config?: Partial> | (() => Partial>)): Node; - configure(options?: Partial): Node; - extend = NodeConfig>(extendedConfig?: (() => Partial) | (Partial & ThisType<{ - name: string; - options: ExtendedOptions; - storage: ExtendedStorage; - editor: Editor; - type: NodeType$1; - }>)): Node; -} - -type PasteRuleMatch = { - index: number; - text: string; - replaceWith?: string; - match?: RegExpMatchArray; - data?: Record; -}; -type PasteRuleFinder = RegExp | ((text: string, event?: ClipboardEvent | null) => PasteRuleMatch[] | null | undefined); -/** - * Paste rules are used to react to pasted content. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules - */ -declare class PasteRule { - find: PasteRuleFinder; - handler: (props: { - state: EditorState; - range: Range; - match: ExtendedRegExpMatchArray; - commands: SingleCommands; - chain: () => ChainedCommands; - can: () => CanCommands; - pasteEvent: ClipboardEvent | null; - dropEvent: DragEvent | null; - }) => void | null; - constructor(config: { - find: PasteRuleFinder; - handler: (props: { - can: () => CanCommands; - chain: () => ChainedCommands; - commands: SingleCommands; - dropEvent: DragEvent | null; - match: ExtendedRegExpMatchArray; - pasteEvent: ClipboardEvent | null; - range: Range; - state: EditorState; - }) => void | null; - }); -} -/** - * Create an paste rules plugin. When enabled, it will cause pasted - * text that matches any of the given rules to trigger the rule’s - * action. - */ -declare function pasteRulesPlugin(props: { - editor: Editor; - rules: PasteRule[]; -}): Plugin[]; - -interface ExtendableConfig | NodeConfig | MarkConfig | ExtendableConfig = ExtendableConfig, PMType = any> { - /** - * The extension name - this must be unique. - * It will be used to identify the extension. - * - * @example 'myExtension' - */ - name: string; - /** - * The priority of your extension. The higher, the earlier it will be called - * and will take precedence over other extensions with a lower priority. - * @default 100 - * @example 101 - */ - priority?: number; - /** - * This method will add options to this extension - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#settings - * @example - * addOptions() { - * return { - * myOption: 'foo', - * myOtherOption: 10, - * } - */ - addOptions?: (this: { - name: string; - parent: ParentConfig['addOptions']; - }) => Options; - /** - * The default storage this extension can save data to. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#storage - * @example - * defaultStorage: { - * prefetchedUsers: [], - * loading: false, - * } - */ - addStorage?: (this: { - name: string; - options: Options; - parent: ParentConfig['addStorage']; - }) => Storage; - /** - * This function adds globalAttributes to specific nodes. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#global-attributes - * @example - * addGlobalAttributes() { - * return [ - * { - // Extend the following extensions - * types: [ - * 'heading', - * 'paragraph', - * ], - * // … with those attributes - * attributes: { - * textAlign: { - * default: 'left', - * renderHTML: attributes => ({ - * style: `text-align: ${attributes.textAlign}`, - * }), - * parseHTML: element => element.style.textAlign || 'left', - * }, - * }, - * }, - * ] - * } - */ - addGlobalAttributes?: (this: { - name: string; - options: Options; - storage: Storage; - extensions: (Node | Mark)[]; - parent: ParentConfig['addGlobalAttributes']; - }) => GlobalAttributes; - /** - * This function adds commands to the editor - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#commands - * @example - * addCommands() { - * return { - * myCommand: () => ({ chain }) => chain().setMark('type', 'foo').run(), - * } - * } - */ - addCommands?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['addCommands']; - }) => Partial; - /** - * This function registers keyboard shortcuts. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#keyboard-shortcuts - * @example - * addKeyboardShortcuts() { - * return { - * 'Mod-l': () => this.editor.commands.toggleBulletList(), - * } - * }, - */ - addKeyboardShortcuts?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['addKeyboardShortcuts']; - }) => { - [key: string]: KeyboardShortcutCommand; - }; - /** - * This function adds input rules to the editor. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#input-rules - * @example - * addInputRules() { - * return [ - * markInputRule({ - * find: inputRegex, - * type: this.type, - * }), - * ] - * }, - */ - addInputRules?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['addInputRules']; - }) => InputRule[]; - /** - * This function adds paste rules to the editor. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#paste-rules - * @example - * addPasteRules() { - * return [ - * markPasteRule({ - * find: pasteRegex, - * type: this.type, - * }), - * ] - * }, - */ - addPasteRules?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['addPasteRules']; - }) => PasteRule[]; - /** - * This function adds Prosemirror plugins to the editor - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#prosemirror-plugins - * @example - * addProseMirrorPlugins() { - * return [ - * customPlugin(), - * ] - * } - */ - addProseMirrorPlugins?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['addProseMirrorPlugins']; - }) => Plugin[]; - /** - * This function transforms pasted HTML content before it's parsed. - * Extensions can use this to modify or clean up pasted HTML. - * The transformations are chained - each extension's transform receives - * the output from the previous extension's transform. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#transform-pasted-html - * @example - * transformPastedHTML(html) { - * // Remove all style attributes - * return html.replace(/style="[^"]*"/g, '') - * } - */ - transformPastedHTML?: (this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['transformPastedHTML']; - }, html: string) => string; - /** - * This function adds additional extensions to the editor. This is useful for - * building extension kits. - * @example - * addExtensions() { - * return [ - * BulletList, - * OrderedList, - * ListItem - * ] - * } - */ - addExtensions?: (this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig['addExtensions']; - }) => Extensions; - /** - * The markdown token name - * - * This is the name of the token that this extension uses to parse and render markdown and comes from the Marked Lexer. - * - * @see https://github.com/markedjs/marked/blob/master/src/Tokens.ts - * - */ - markdownTokenName?: string; - /** - * The parse function used by the markdown parser to convert markdown tokens to ProseMirror nodes. - */ - parseMarkdown?: (token: MarkdownToken, helpers: MarkdownParseHelpers) => MarkdownParseResult; - /** - * The serializer function used by the markdown serializer to convert ProseMirror nodes to markdown tokens. - */ - renderMarkdown?: (node: JSONContent, helpers: MarkdownRendererHelpers, ctx: RenderContext) => string; - /** - * The markdown tokenizer responsible for turning a markdown string into tokens - * - * Custom tokenizers are only needed when you want to parse non-standard markdown token. - */ - markdownTokenizer?: MarkdownTokenizer; - /** - * Optional markdown options for indentation - */ - markdownOptions?: { - /** - * Defines if this markdown element should indent it's child elements - */ - indentsContent?: boolean; - /** - * Lets a mark tell the Markdown serializer which inline HTML tags it can - * safely use when plain markdown delimiters would become ambiguous. - * - * This is mainly useful for overlapping marks. For example, bold followed - * by bold+italic followed by italic cannot always be written back with only - * `*` and `**` in a way that still parses correctly. In that case, the - * serializer can close the overlapping section with markdown and reopen the - * remaining tail with HTML instead. - * - * Example: - * - desired formatting: `**123` + `*456*` + `789 italic` - * - serialized result: `**123*456***789` - * - * If your extension defines custom mark names, set `htmlReopen` on that - * extension so the serializer can reuse its HTML form for overlap cases. - */ - htmlReopen?: { - open: string; - close: string; - }; - }; - /** - * This function extends the schema of the node. - * @example - * extendNodeSchema() { - * return { - * group: 'inline', - * selectable: false, - * } - * } - */ - extendNodeSchema?: ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig['extendNodeSchema']; - }, extension: Node) => Record) | null; - /** - * This function extends the schema of the mark. - * @example - * extendMarkSchema() { - * return { - * group: 'inline', - * selectable: false, - * } - * } - */ - extendMarkSchema?: ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig['extendMarkSchema']; - }, extension: Mark) => Record) | null; - /** - * The editor is not ready yet. - */ - onBeforeCreate?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onBeforeCreate']; - }, event: EditorEvents['beforeCreate']) => void) | null; - /** - * The editor is ready. - */ - onCreate?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onCreate']; - }, event: EditorEvents['create']) => void) | null; - /** - * The content has changed. - */ - onUpdate?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onUpdate']; - }, event: EditorEvents['update']) => void) | null; - /** - * The selection has changed. - */ - onSelectionUpdate?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onSelectionUpdate']; - }, event: EditorEvents['selectionUpdate']) => void) | null; - /** - * The editor state has changed. - */ - onTransaction?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onTransaction']; - }, event: EditorEvents['transaction']) => void) | null; - /** - * The editor is focused. - */ - onFocus?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onFocus']; - }, event: EditorEvents['focus']) => void) | null; - /** - * The editor isn’t focused anymore. - */ - onBlur?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onBlur']; - }, event: EditorEvents['blur']) => void) | null; - /** - * The editor is destroyed. - */ - onDestroy?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['onDestroy']; - }, event: EditorEvents['destroy']) => void) | null; - /** - * This hook allows you to intercept and modify transactions before they are dispatched. - * - * Example - * ```ts - * dispatchTransaction({ transaction, next }) { - * console.log('Dispatching transaction:', transaction) - * next(transaction) - * } - * ``` - * - * @param props - The dispatch transaction props - */ - dispatchTransaction?: ((this: { - name: string; - options: Options; - storage: Storage; - editor: Editor; - type: PMType; - parent: ParentConfig['dispatchTransaction']; - }, props: DispatchTransactionProps) => void) | null; -} -declare class Extendable | NodeConfig | MarkConfig> { - type: string; - parent: Extendable | null; - child: Extendable | null; - name: string; - config: Config; - constructor(config?: Partial); - get options(): Options; - get storage(): Readonly; - configure(options?: Partial): Extendable | NodeConfig | MarkConfig>; - extend | NodeConfig | MarkConfig>(extendedConfig?: Partial): Extendable; -} - -type AnyConfig = ExtensionConfig | NodeConfig | MarkConfig; -type AnyExtension = Extendable; -type Extensions = AnyExtension[]; -type ParentConfig = Partial<{ - [P in keyof T]: Required[P] extends (...args: any) => any ? (...args: Parameters[P]>) => ReturnType[P]> : T[P]; -}>; -type Primitive = null | undefined | string | number | boolean | symbol | bigint; -type RemoveThis = T extends (...args: any) => any ? (...args: Parameters) => ReturnType : T; -type MaybeReturnType = T extends (...args: any) => any ? ReturnType : T; -type MaybeThisParameterType = Exclude extends (...args: any) => any ? ThisParameterType> : any; -interface EditorEvents { - mount: { - /** - * The editor instance - */ - editor: Editor; - }; - unmount: { - /** - * The editor instance - */ - editor: Editor; - }; - beforeCreate: { - /** - * The editor instance - */ - editor: Editor; - }; - create: { - /** - * The editor instance - */ - editor: Editor; - }; - contentError: { - /** - * The editor instance - */ - editor: Editor; - /** - * The error that occurred while parsing the content - */ - error: Error; - /** - * If called, will re-initialize the editor with the collaboration extension removed. - * This will prevent syncing back deletions of content not present in the current schema. - */ - disableCollaboration: () => void; - }; - update: { - /** - * The editor instance - */ - editor: Editor; - /** - * The transaction that caused the update - */ - transaction: Transaction; - /** - * Appended transactions that were added to the initial transaction by plugins - */ - appendedTransactions: Transaction[]; - }; - selectionUpdate: { - /** - * The editor instance - */ - editor: Editor; - /** - * The transaction that caused the selection update - */ - transaction: Transaction; - }; - beforeTransaction: { - /** - * The editor instance - */ - editor: Editor; - /** - * The transaction that will be applied - */ - transaction: Transaction; - /** - * The next state of the editor after the transaction is applied - */ - nextState: EditorState; - }; - transaction: { - /** - * The editor instance - */ - editor: Editor; - /** - * The initial transaction - */ - transaction: Transaction; - /** - * Appended transactions that were added to the initial transaction by plugins - */ - appendedTransactions: Transaction[]; - }; - focus: { - /** - * The editor instance - */ - editor: Editor; - /** - * The focus event - */ - event: FocusEvent; - /** - * The transaction that caused the focus - */ - transaction: Transaction; - }; - blur: { - /** - * The editor instance - */ - editor: Editor; - /** - * The focus event - */ - event: FocusEvent; - /** - * The transaction that caused the blur - */ - transaction: Transaction; - }; - destroy: void; - paste: { - /** - * The editor instance - */ - editor: Editor; - /** - * The clipboard event - */ - event: ClipboardEvent; - /** - * The slice that was pasted - */ - slice: Slice; - }; - drop: { - /** - * The editor instance - */ - editor: Editor; - /** - * The drag event - */ - event: DragEvent; - /** - * The slice that was dropped - */ - slice: Slice; - /** - * Whether the content was moved (true) or copied (false) - */ - moved: boolean; - }; - delete: { - /** - * The editor instance - */ - editor: Editor; - /** - * The range of the deleted content (before the deletion) - */ - deletedRange: Range; - /** - * The new range of positions of where the deleted content was in the new document (after the deletion) - */ - newRange: Range; - /** - * The transaction that caused the deletion - */ - transaction: Transaction; - /** - * The combined transform (including all appended transactions) that caused the deletion - */ - combinedTransform: Transform; - /** - * Whether the deletion was partial (only a part of this content was deleted) - */ - partial: boolean; - /** - * This is the start position of the mark in the document (before the deletion) - */ - from: number; - /** - * This is the end position of the mark in the document (before the deletion) - */ - to: number; - } & ({ - /** - * The content that was deleted - */ - type: 'node'; - /** - * The node which the deletion occurred in - * @note This can be a parent node of the deleted content - */ - node: Node$1; - /** - * The new start position of the node in the document (after the deletion) - */ - newFrom: number; - /** - * The new end position of the node in the document (after the deletion) - */ - newTo: number; - } | { - /** - * The content that was deleted - */ - type: 'mark'; - /** - * The mark that was deleted - */ - mark: Mark$1; - }); -} -/** - * Props passed to the `dispatchTransaction` hook in extensions. - */ -type DispatchTransactionProps = { - /** - * The transaction that is about to be dispatched. - */ - transaction: Transaction; - /** - * A function that should be called to pass the transaction down to the next extension - * (or eventually to the editor). - * - * @param transaction The transaction to dispatch - */ - next: (transaction: Transaction) => void; -}; -type EnableRules = (AnyExtension | string)[] | boolean; -interface EditorOptions { - /** - * The element to bind the editor to: - * - If an `Element` is passed, the editor will be mounted appended to that element - * - If `null` is passed, the editor will not be mounted automatically - * - If an object with a `mount` property is passed, the editor will be mounted to that element - * - If a function is passed, it will be called with the editor's element, which should place the editor within the document - */ - element: Element | { - mount: HTMLElement; - } | ((editor: HTMLElement) => void) | null; - /** - * The content of the editor (HTML, JSON, or a JSON array) - */ - content: Content; - /** - * The extensions to use - */ - extensions: Extensions; - /** - * Whether to inject base CSS styles - */ - injectCSS: boolean; - /** - * A nonce to use for CSP while injecting styles - */ - injectNonce: string | undefined; - /** - * The editor's initial focus position - */ - autofocus: FocusPosition; - /** - * Whether the editor is editable - */ - editable: boolean; - /** - * The default text direction for all content in the editor. - * When set to 'ltr' or 'rtl', all nodes will have the corresponding dir attribute. - * When set to 'auto', the dir attribute will be set based on content detection. - * When undefined, no dir attribute will be added. - * @default undefined - */ - textDirection?: 'ltr' | 'rtl' | 'auto'; - /** - * The editor's props - */ - editorProps: EditorProps; - /** - * The editor's content parser options - */ - parseOptions: ParseOptions; - /** - * The editor's core extension options - */ - coreExtensionOptions?: { - clipboardTextSerializer?: { - blockSeparator?: string; - }; - /** - * Options for the `tabindex` core extension. - */ - tabindex?: { - /** - * The value for the `tabindex` attribute on the editor element. - */ - value?: string; - }; - delete?: { - /** - * Whether the `delete` extension should be called asynchronously to avoid blocking the editor while processing deletions - * @default true deletion events are called asynchronously - */ - async?: boolean; - /** - * Allows filtering the transactions that are processed by the `delete` extension. - * If the function returns `true`, the transaction will be ignored. - */ - filterTransaction?: (transaction: Transaction) => boolean; - }; - }; - /** - * Whether to enable input rules behavior - */ - enableInputRules: EnableRules; - /** - * Whether to enable paste rules behavior - */ - enablePasteRules: EnableRules; - /** - * Determines whether core extensions are enabled. - * - * If set to `false`, all core extensions will be disabled. - * To disable specific core extensions, provide an object where the keys are the extension names and the values are `false`. - * Extensions not listed in the object will remain enabled. - * - * @example - * // Disable all core extensions - * enabledCoreExtensions: false - * - * @example - * // Disable only the keymap core extension - * enabledCoreExtensions: { keymap: false } - * - * @default true - */ - enableCoreExtensions?: boolean | Partial>; - /** - * If `true`, the editor will check the content for errors on initialization. - * Emitting the `contentError` event if the content is invalid. - * Which can be used to show a warning or error message to the user. - * @default false - */ - enableContentCheck: boolean; - /** - * If `true`, the editor will emit the `contentError` event if invalid content is - * encountered but `enableContentCheck` is `false`. This lets you preserve the - * invalid editor content while still showing a warning or error message to - * the user. - * - * @default false - */ - emitContentError: boolean; - /** - * Called before the editor is constructed. - */ - onBeforeCreate: (props: EditorEvents['beforeCreate']) => void; - /** - * Called after the editor is constructed. - */ - onCreate: (props: EditorEvents['create']) => void; - /** - * Called when the editor is mounted. - */ - onMount: (props: EditorEvents['mount']) => void; - /** - * Called when the editor is unmounted. - */ - onUnmount: (props: EditorEvents['unmount']) => void; - /** - * Called when the editor encounters an error while parsing the content. - * Only enabled if `enableContentCheck` is `true`. - */ - onContentError: (props: EditorEvents['contentError']) => void; - /** - * Called when the editor's content is updated. - */ - onUpdate: (props: EditorEvents['update']) => void; - /** - * Called when the editor's selection is updated. - */ - onSelectionUpdate: (props: EditorEvents['selectionUpdate']) => void; - /** - * Called after a transaction is applied to the editor. - */ - onTransaction: (props: EditorEvents['transaction']) => void; - /** - * Called on focus events. - */ - onFocus: (props: EditorEvents['focus']) => void; - /** - * Called on blur events. - */ - onBlur: (props: EditorEvents['blur']) => void; - /** - * Called when the editor is destroyed. - */ - onDestroy: (props: EditorEvents['destroy']) => void; - /** - * Called when content is pasted into the editor. - */ - onPaste: (e: ClipboardEvent, slice: Slice) => void; - /** - * Called when content is dropped into the editor. - */ - onDrop: (e: DragEvent, slice: Slice, moved: boolean) => void; - /** - * Called when content is deleted from the editor. - */ - onDelete: (props: EditorEvents['delete']) => void; - /** - * Whether to enable extension-level dispatching of transactions. - * If `false`, extensions cannot define their own `dispatchTransaction` hook. - * - * @default true - * @example - * new Editor({ - * enableExtensionDispatchTransaction: false, - * }) - */ - enableExtensionDispatchTransaction?: boolean; -} -/** - * The editor's content as HTML - */ -type HTMLContent = string; -/** - * A Tiptap JSON node or document. Tiptap JSON is the standard format for - * storing and manipulating Tiptap content. It is equivalent to the JSON - * representation of a Prosemirror node. - * - * Tiptap JSON documents are trees of nodes. The root node is usually of type - * `doc`. Nodes can have other nodes as children. Nodes can also have marks and - * attributes. Text nodes (nodes with type `text`) have a `text` property and no - * children. - * - * @example - * ```ts - * const content: JSONContent = { - * type: 'doc', - * content: [ - * { - * type: 'paragraph', - * content: [ - * { - * type: 'text', - * text: 'Hello ', - * }, - * { - * type: 'text', - * text: 'world', - * marks: [{ type: 'bold' }], - * }, - * ], - * }, - * ], - * } - * ``` - */ -type JSONContent = { - /** - * The type of the node - */ - type?: string; - /** - * The attributes of the node. Attributes can have any JSON-serializable value. - */ - attrs?: Record | undefined; - /** - * The children of the node. A node can have other nodes as children. - */ - content?: JSONContent[]; - /** - * A list of marks of the node. Inline nodes can have marks. - */ - marks?: { - /** - * The type of the mark - */ - type: string; - /** - * The attributes of the mark. Attributes can have any JSON-serializable value. - */ - attrs?: Record; - [key: string]: any; - }[]; - /** - * The text content of the node. This property is only present on text nodes - * (i.e. nodes with `type: 'text'`). - * - * Text nodes cannot have children, but they can have marks. - */ - text?: string; - [key: string]: any; -}; -/** - * A mark type is either a JSON representation of a mark or a Prosemirror mark instance - */ -type MarkType = any> = { - type: Type; - attrs: TAttributes; -}; -/** - * A node type is either a JSON representation of a node or a Prosemirror node instance - */ -type NodeType = any, NodeMarkType extends MarkType = any, TContent extends (NodeType | TextType)[] = any> = { - type: Type; - attrs: TAttributes; - content?: TContent; - marks?: NodeMarkType[]; -}; -/** - * A node type is either a JSON representation of a doc node or a Prosemirror doc node instance - */ -type DocumentType | undefined = Record, TContentType extends NodeType[] = NodeType[]> = Omit, 'marks' | 'content'> & { - content: TContentType; -}; -/** - * A node type is either a JSON representation of a text node or a Prosemirror text node instance - */ -type TextType = { - type: 'text'; - text: string; - marks: TMarkType[]; -}; -/** - * Describes the output of a `renderHTML` function in prosemirror - * @see https://prosemirror.net/docs/ref/#model.DOMOutputSpec - */ -type DOMOutputSpecArray$1 = [string] | [string, Record] | [string, 0] | [string, Record, 0] | [string, Record, DOMOutputSpecArray$1 | 0] | [string, DOMOutputSpecArray$1]; -type Content = HTMLContent | JSONContent | JSONContent[] | null; -type CommandProps = { - editor: Editor; - tr: Transaction; - commands: SingleCommands; - can: () => CanCommands; - chain: () => ChainedCommands; - state: EditorState; - view: EditorView; - dispatch: ((args?: any) => any) | undefined; -}; -type Command = (props: CommandProps) => boolean; -type CommandSpec = (...args: any[]) => Command; -type KeyboardShortcutCommand = (props: { - editor: Editor; -}) => boolean; -type Attribute = { - default?: any; - validate?: string | ((value: any) => void); - rendered?: boolean; - renderHTML?: ((attributes: Record) => Record | null) | null; - parseHTML?: ((element: HTMLElement) => any | null) | null; - keepOnSplit?: boolean; - isRequired?: boolean; -}; -type Attributes$1 = { - [key: string]: Attribute; -}; -type ExtensionAttribute = { - type: string; - name: string; - attribute: Required> & Pick; -}; -type GlobalAttributes = { - /** - * The node & mark types this attribute should be applied to. - * Can be a specific array of type names, or a shorthand string: - * - `'*'` applies to all nodes (excluding text) and all marks - * - `'nodes'` applies to all nodes (excluding the built-in text node) - * - `'marks'` applies to all marks - * - `string[]` applies to specific node/mark types by name - * @example - * types: '*' // All nodes and marks - * types: 'nodes' // All nodes - * types: 'marks' // All marks - * types: ['heading', 'paragraph'] // Specific types - */ - types: string[] | 'nodes' | 'marks' | '*'; - /** - * The attributes to add to the node or mark types. - */ - attributes: Record; -}[]; -type PickValue = T[K]; -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; -type Diff = ({ - [P in T]: P; -} & { - [P in U]: never; -} & { - [x: string]: never; -})[T]; -type Overwrite = Pick> & U; -type ValuesOf = T[keyof T]; -type KeysWithTypeOf = { - [P in keyof T]: T[P] extends Type ? P : never; -}[keyof T]; -type DOMNode = InstanceType; -/** - * prosemirror-view does not export the `type` property of `Decoration`. - * So, this defines the `DecorationType` interface to include the `type` property. - */ -interface DecorationType { - spec: any; - map(mapping: Mappable, span: Decoration, offset: number, oldOffset: number): Decoration | null; - valid(node: Node, span: Decoration): boolean; - eq(other: DecorationType): boolean; - destroy(dom: DOMNode): void; - readonly attrs: DecorationAttrs; -} -/** - * prosemirror-view does not export the `type` property of `Decoration`. - * This adds the `type` property to the `Decoration` type. - */ -type DecorationWithType = Decoration & { - type: DecorationType; -}; -interface NodeViewProps extends NodeViewRendererProps { - decorations: readonly DecorationWithType[]; - selected: boolean; - updateAttributes: (attributes: Record) => void; - deleteNode: () => void; -} -interface NodeViewRendererOptions { - stopEvent: ((props: { - event: Event; - }) => boolean) | null; - ignoreMutation: ((props: { - mutation: ViewMutationRecord; - }) => boolean) | null; - contentDOMElementTag: string; - /** - * When `true`, the `selected` prop also becomes `true` if a `TextSelection` - * is fully inside the node's range (e.g. the cursor is placed within the - * node's content), not only when there is a `NodeSelection` on the node. - * Defaults to `false` to preserve existing behavior. - */ - selectedOnTextSelection?: boolean; - /** - * When `true`, the component re-renders on every position shift so calls - * to `getPos()` stay current in render output. - * Without this option, `getPos()` is still always current for imperative - * use (click handlers, commands) — it only becomes stale when directly - * rendered in JSX or used in reactive template expressions. - * @default false - */ - trackNodeViewPosition?: boolean; -} -interface NodeViewRendererProps { - /** - * The node that is being rendered. - */ - node: Parameters[0]; - /** - * The editor's view. - */ - view: Parameters[1]; - /** - * A function that can be called to get the node's current position in the document. - */ - getPos: Parameters[2]; - /** - * is an array of node or inline decorations that are active around the node. - * They are automatically drawn in the normal way, and you will usually just want to ignore this, but they can also be used as a way to provide context information to the node view without adding it to the document itself. - */ - decorations: Parameters[3]; - /** - * holds the decorations for the node's content. You can safely ignore this if your view has no content or a contentDOM property, since the editor will draw the decorations on the content. - * But if you, for example, want to create a nested editor with the content, it may make sense to provide it with the inner decorations. - */ - innerDecorations: Parameters[4]; - /** - * The editor instance. - */ - editor: Editor; - /** - * The extension that is responsible for the node. - */ - extension: Node; - /** - * The HTML attributes that should be added to the node's DOM element. - */ - HTMLAttributes: Record; -} -type NodeViewRenderer = (props: NodeViewRendererProps) => NodeView$1; -interface MarkViewProps extends MarkViewRendererProps { -} -interface MarkViewRendererProps { - /** - * The node that is being rendered. - */ - mark: Parameters[0]; - /** - * The editor's view. - */ - view: Parameters[1]; - /** - * indicates whether the mark's content is inline - */ - inline: Parameters[2]; - /** - * The editor instance. - */ - editor: Editor; - /** - * The extension that is responsible for the mark. - */ - extension: Mark; - /** - * The HTML attributes that should be added to the mark's DOM element. - */ - HTMLAttributes: Record; - updateAttributes: (attrs: Record) => void; -} -type MarkViewRenderer = (props: Props) => MarkView$1; -interface MarkViewRendererOptions { - ignoreMutation: ((props: { - mutation: ViewMutationRecord; - }) => boolean) | null; -} -type AnyCommands = Record Command>; -type UnionCommands = UnionToIntersection, KeysWithTypeOf, object>>>>; -type RawCommands = { - [Item in keyof UnionCommands]: UnionCommands[Item]; -}; -type SingleCommands = { - [Item in keyof UnionCommands]: UnionCommands[Item]; -}; -type ChainedCommands = { - [Item in keyof UnionCommands]: UnionCommands[Item]; -} & { - run: () => boolean; -}; -type CanCommands = SingleCommands & { - chain: () => ChainedCommands; -}; -type FocusPosition = 'start' | 'end' | 'all' | number | boolean | null; -type Range = { - from: number; - to: number; -}; -type NodeRange = { - node: Node$1; - from: number; - to: number; -}; -type MarkRange = { - mark: Mark$1; - from: number; - to: number; -}; -type Predicate = (node: Node$1) => boolean; -type NodeWithPos = { - node: Node$1; - pos: number; -}; -type TextSerializer = (props: { - node: Node$1; - pos: number; - parent: Node$1; - index: number; - range: Range; -}) => string; -type ExtendedRegExpMatchArray = RegExpMatchArray & { - data?: Record; -}; -type Dispatch = ((args?: any) => any) | undefined; -/** Markdown related types */ -type MarkdownToken = { - type?: string; - raw?: string; - text?: string; - tokens?: MarkdownToken[]; - depth?: number; - items?: MarkdownToken[]; - [key: string]: any; -}; -type MarkdownHelpers = { - parseInline: (tokens: MarkdownToken[]) => any[]; - /** - * Render children. The second argument may be a legacy separator string - * or a RenderContext (preferred). - */ - renderChildren: (node: Node[] | Node, ctxOrSeparator?: RenderContext | string) => string; - text: (token: MarkdownToken) => any; -}; -/** - * Helpers specifically for parsing markdown tokens into Tiptap JSON. - * These are provided to extension parse handlers. - */ -type MarkdownParseHelpers = { - /** Parse an array of inline tokens into text nodes with marks */ - parseInline: (tokens: MarkdownToken[]) => JSONContent[]; - /** Tokenize source text as inline markdown when supported by the markdown parser */ - tokenizeInline?: (src: string) => MarkdownToken[]; - /** Parse an array of block-level tokens */ - parseChildren: (tokens: MarkdownToken[]) => JSONContent[]; - /** Parse block-level tokens while preserving implicit empty paragraphs from blank lines */ - parseBlockChildren?: (tokens: MarkdownToken[]) => JSONContent[]; - /** Create a text node with optional marks */ - createTextNode: (text: string, marks?: Array<{ - type: string; - attrs?: any; - }>) => JSONContent; - /** Create any node type with attributes and content */ - createNode: (type: string, attrs?: any, content?: JSONContent[]) => JSONContent; - /** Apply a mark to content (used for inline marks like bold, italic) */ - applyMark: (markType: string, content: JSONContent[], attrs?: any) => { - mark: string; - content: JSONContent[]; - attrs?: any; - }; -}; -/** - * Full runtime helpers object provided by MarkdownManager to handlers. - * This includes the small author-facing helpers plus internal helpers - * that can be useful for advanced handlers. - */ -type FullMarkdownHelpers = MarkdownHelpers & { - parseChildren: (tokens: MarkdownToken[]) => any[]; - getExtension: (name: string) => any; - createNode: (type: string, attrs?: any, content?: any[]) => any; - /** Current render context when calling renderers; undefined during parse. */ - currentContext?: RenderContext; - /** Indent a multi-line string according to the provided RenderContext. */ - indent: (text: string, ctx?: RenderContext) => string; - /** Return the indent string for a given level (e.g. ' ' or '\t'). */ - getIndentString: (level?: number) => string; -}; - -/** - * Return shape for parser-level `parse` handlers. - * - a single JSON-like node - * - an array of JSON-like nodes - * - or a `{ mark: string, content: JSONLike[] }` shape to apply a mark - */ -type MarkdownParseResult = JSONContent | JSONContent[] | { - mark: string; - content: JSONContent[]; - attrs?: any; -}; -type RenderContext = { - index: number; - level: number; - meta?: Record; - parentType?: string | null; - previousNode?: JSONContent | null; -}; -/** Extension contract for markdown parsing/serialization. */ -interface MarkdownExtensionSpec { - /** Token name used for parsing (e.g., 'codespan', 'code', 'strong') */ - tokenName?: string; - /** Node/mark name used for rendering (typically the extension name) */ - nodeName?: string; - parseMarkdown?: (token: MarkdownToken, helpers: MarkdownParseHelpers) => MarkdownParseResult; - renderMarkdown?: (node: any, helpers: MarkdownRendererHelpers, ctx: RenderContext) => string; - isIndenting?: boolean; - htmlReopen?: { - open: string; - close: string; - }; - /** Custom tokenizer for marked.js to handle non-standard markdown syntax */ - tokenizer?: MarkdownTokenizer; -} -/** - * Configuration object passed to custom marked.js tokenizers - */ -type MarkdownLexerConfiguration = { - /** - * Can be used to transform source text into inline tokens - useful while tokenizing child tokens. - * @param src - * @returns Array of inline tokens - */ - inlineTokens: (src: string) => MarkdownToken[]; - /** - * Can be used to transform source text into block-level tokens - useful while tokenizing child tokens. - * @param src - * @returns Array of block-level tokens - */ - blockTokens: (src: string) => MarkdownToken[]; -}; -/** Custom tokenizer function for marked.js extensions */ -type MarkdownTokenizer = { - /** Token name this tokenizer creates */ - name: string; - /** Priority level for tokenizer ordering (higher = earlier) */ - level?: 'block' | 'inline'; - /** A string to look for or a function that returns the start index of the token in the source string */ - start?: string | ((src: string) => number); - /** Function that attempts to parse custom syntax from start of text */ - tokenize: (src: string, tokens: MarkdownToken[], lexer: MarkdownLexerConfiguration) => MarkdownToken | undefined | void; -}; -type MarkdownRendererHelpers = { - /** - * Render children nodes to a markdown string, optionally separated by a string. - * @param nodes The node or array of nodes to render - * @param separator An optional separator string (legacy) or RenderContext - * @returns The rendered markdown string - */ - renderChildren: (nodes: JSONContent | JSONContent[], separator?: string) => string; - /** Render a single child node with its sibling index preserved */ - renderChild?: (node: JSONContent, index: number) => string; - /** - * Render a text token to a markdown string - * @param prefix The prefix to add before the content - * @param content The content to wrap - * @returns The wrapped content - */ - wrapInBlock: (prefix: string, content: string) => string; - /** - * Indent a markdown string according to the provided RenderContext - * @param content The content to indent - * @returns The indented content - */ - indent: (content: string) => string; -}; -type Utils = { - /** - * Returns the new position after applying a transaction. - * - * @param position The position to update. A MappablePosition instance. - * @param transaction The transaction to apply. - * @returns The new position after applying the transaction. - * - * @example - * const position = editor.utils.createMappablePosition(10) - * const {position, mapResult} = editor.utils.getUpdatedPosition(position, transaction) - */ - getUpdatedPosition: (position: MappablePosition, transaction: Transaction) => GetUpdatedPositionResult; - /** - * Creates a MappablePosition from a position number. A mappable position can be used to track the - * next position after applying a transaction. - * - * @param position The position (as a number) where the MappablePosition will be created. - * @returns A new MappablePosition instance at the given position. - * - * @example - * const position = editor.utils.createMappablePosition(10) - */ - createMappablePosition: (position: number) => MappablePosition; -}; - -/** - * Create a new Prosemirror document node from content. - * @param content The JSON or HTML content to create the document from - * @param schema The Prosemirror schema to use for the document - * @param parseOptions Options for the parser - * @returns The created Prosemirror document node - */ -declare function createDocument(content: Content | Node$1 | Fragment$1, schema: Schema, parseOptions?: ParseOptions, options?: { - errorOnInvalidContent?: boolean; -}): Node$1; - -type CreateNodeFromContentOptions = { - slice?: boolean; - parseOptions?: ParseOptions; - errorOnInvalidContent?: boolean; -}; -/** - * Takes a JSON or HTML content and creates a Prosemirror node or fragment from it. - * @param content The JSON or HTML content to create the node from - * @param schema The Prosemirror schema to use for the node - * @param options Options for the parser - * @returns The created Prosemirror node or fragment - */ -declare function createNodeFromContent(content: Content | Node$1 | Fragment$1, schema: Schema, options?: CreateNodeFromContentOptions): Node$1 | Fragment$1; - -/** - * Gets the default block type at a given match - * @param match The content match to get the default block type from - * @returns The default block type or null - */ -declare function defaultBlockAt(match: ContentMatch): NodeType$1 | null; - -/** - * Find children inside a Prosemirror node that match a predicate. - * @param node The Prosemirror node to search in - * @param predicate The predicate to match - * @returns An array of nodes with their positions - */ -declare function findChildren(node: Node$1, predicate: Predicate): NodeWithPos[]; - -/** - * Same as `findChildren` but searches only within a `range`. - * @param node The Prosemirror node to search in - * @param range The range to search in - * @param predicate The predicate to match - * @returns An array of nodes with their positions - */ -declare function findChildrenInRange(node: Node$1, range: Range, predicate: Predicate): NodeWithPos[]; - -/** - * Finds the closest parent node to a resolved position that matches a predicate. - * @param $pos The resolved position to search from - * @param predicate The predicate to match - * @returns The closest parent node to the resolved position that matches the predicate - * @example ```js - * findParentNodeClosestToPos($from, node => node.type.name === 'paragraph') - * ``` - */ -declare function findParentNodeClosestToPos($pos: ResolvedPos, predicate: Predicate): { - pos: number; - start: number; - depth: number; - node: Node$1; -} | undefined; - -/** - * Finds the closest parent node to the current selection that matches a predicate. - * @param predicate The predicate to match - * @returns A command that finds the closest parent node to the current selection that matches the predicate - * @example ```js - * findParentNode(node => node.type.name === 'paragraph') - * ``` - */ -declare function findParentNode(predicate: Predicate): (selection: Selection) => ReturnType; - -/** - * Create a flattened array of extensions by traversing the `addExtensions` field. - * @param extensions An array of Tiptap extensions - * @returns A flattened array of Tiptap extensions - */ -declare function flattenExtensions(extensions: Extensions): Extensions; - -/** - * Generate HTML from a JSONContent - * @param doc The JSONContent to generate HTML from - * @param extensions The extensions to use for the schema - * @returns The generated HTML - */ -declare function generateHTML(doc: JSONContent, extensions: Extensions): string; - -/** - * Generate JSONContent from HTML - * @param html The HTML to generate JSONContent from - * @param extensions The extensions to use for the schema - * @returns The generated JSONContent - */ -declare function generateJSON(html: string, extensions: Extensions): Record; - -/** - * Generate raw text from a JSONContent - * @param doc The JSONContent to generate text from - * @param extensions The extensions to use for the schema - * @param options Options for the text generation f.e. blockSeparator or textSerializers - * @returns The generated text - */ -declare function generateText(doc: JSONContent, extensions: Extensions, options?: { - blockSeparator?: string; - textSerializers?: Record; -}): string; - -/** - * Get node or mark attributes by type or name on the current editor state - * @param state The current editor state - * @param typeOrName The node or mark type or name - * @returns The attributes of the node or mark or an empty object - */ -declare function getAttributes(state: EditorState, typeOrName: string | NodeType$1 | MarkType$1): Record; - -/** - * Get a list of all extension attributes defined in `addAttribute` and `addGlobalAttribute`. - * @param extensions List of extensions - */ -declare function getAttributesFromExtensions(extensions: Extensions): ExtensionAttribute[]; - -type ChangedRange = { - oldRange: Range; - newRange: Range; -}; -/** - * Returns a list of changed ranges - * based on the first and last state of all steps. - */ -declare function getChangedRanges(transform: Transform): ChangedRange[]; - -interface DebugJSONContent extends JSONContent { - from: number; - to: number; -} -declare function getDebugJSON(node: Node$1, startOffset?: number): DebugJSONContent; - -interface ExtensionConfig extends ExtendableConfig, null> { -} -/** - * The Extension class is the base class for all extensions. - * @see https://tiptap.dev/api/extensions#create-a-new-extension - */ -declare class Extension extends Extendable> { - type: string; - /** - * Create a new Extension instance - * @param config - Extension configuration object or a function that returns a configuration object - */ - static create(config?: Partial> | (() => Partial>)): Extension; - configure(options?: Partial): Extension; - extend>(extendedConfig?: (() => Partial) | (Partial & ThisType<{ - name: string; - options: ExtendedOptions; - storage: ExtendedStorage; - editor: Editor; - type: null; - }>)): Extension; -} - -/** - * Returns a field from an extension - * @param extension The Tiptap extension - * @param field The field, for example `renderHTML` or `priority` - * @param context The context object that should be passed as `this` into the function - * @returns The field value - */ -declare function getExtensionField(extension: E, field: keyof ExtensionConfig | keyof MarkConfig | keyof NodeConfig, context?: Omit, 'parent'>): RemoveThis; - -declare function getHTMLFromFragment(fragment: Fragment$1, schema: Schema): string; - -declare function getMarkAttributes(state: EditorState, typeOrName: string | MarkType$1): Record; - -/** - * Get the range of a mark at a resolved position. - */ -declare function getMarkRange( -/** - * The position to get the mark range for. - */ -$pos: ResolvedPos, -/** - * The mark type to get the range for. - */ -type: MarkType$1, -/** - * The attributes to match against. - * If not provided, only the first mark at the position will be matched. - */ -attributes?: Record): Range | void; - -declare function getMarksBetween(from: number, to: number, doc: Node$1): MarkRange[]; - -declare function getMarkType(nameOrType: string | MarkType$1, schema: Schema): MarkType$1; - -/** - * Finds the first node of a given type or name in the current selection. - * @param state The editor state. - * @param typeOrName The node type or name. - * @param pos The position to start searching from. - * @param maxDepth The maximum depth to search. - * @returns The node and the depth as an array. - */ -declare const getNodeAtPosition: (state: EditorState, typeOrName: string | NodeType$1, pos: number, maxDepth?: number) => [Node$1 | null, number]; - -declare function getNodeAttributes(state: EditorState, typeOrName: string | NodeType$1): Record; - -declare function getNodeType(nameOrType: string | NodeType$1, schema: Schema): NodeType$1; - -declare function getRenderedAttributes(nodeOrMark: Node$1 | Mark$1, extensionAttributes: ExtensionAttribute[]): Record; - -declare function getSchema(extensions: Extensions, editor?: Editor): Schema; - -/** - * Creates a new Prosemirror schema based on the given extensions. - * @param extensions An array of Tiptap extensions - * @param editor The editor instance - * @returns A Prosemirror schema - */ -declare function getSchemaByResolvedExtensions(extensions: Extensions, editor?: Editor): Schema; - -/** - * Tries to get a node or mark type by its name. - * @param name The name of the node or mark type - * @param schema The Prosemiror schema to search in - * @returns The node or mark type, or null if it doesn't exist - */ -declare function getSchemaTypeByName(name: string, schema: Schema): NodeType$1 | MarkType$1 | null; - -/** - * Get the type of a schema item by its name. - * @param name The name of the schema item - * @param schema The Prosemiror schema to search in - * @returns The type of the schema item (`node` or `mark`), or null if it doesn't exist - */ -declare function getSchemaTypeNameByName(name: string, schema: Schema): 'node' | 'mark' | null; - -/** - * Return attributes of an extension that should be splitted by keepOnSplit flag - * @param extensionAttributes Array of extension attributes - * @param typeName The type of the extension - * @param attributes The attributes of the extension - * @returns The splitted attributes - */ -declare function getSplittedAttributes(extensionAttributes: ExtensionAttribute[], typeName: string, attributes: Record): Record; - -/** - * Gets the text of a Prosemirror node - * @param node The Prosemirror node - * @param options Options for the text serializer & block separator - * @returns The text of the node - * @example ```js - * const text = getText(node, { blockSeparator: '\n' }) - * ``` - */ -declare function getText(node: Node$1, options?: { - blockSeparator?: string; - textSerializers?: Record; -}): string; - -/** - * Gets the text between two positions in a Prosemirror node - * and serializes it using the given text serializers and block separator (see getText) - * @param startNode The Prosemirror node to start from - * @param range The range of the text to get - * @param options Options for the text serializer & block separator - * @returns The text between the two positions - */ -declare function getTextBetween(startNode: Node$1, range: Range, options?: { - blockSeparator?: string; - textSerializers?: Record; -}): string; - -/** - * Returns the text content of a resolved prosemirror position - * @param $from The resolved position to get the text content from - * @param maxMatch The maximum number of characters to match - * @returns The text content - */ -declare const getTextContentFromNodes: ($from: ResolvedPos, maxMatch?: number) => string; - -/** - * Find text serializers `toText` in a Prosemirror schema - * @param schema The Prosemirror schema to search in - * @returns A record of text serializers by node name - */ -declare function getTextSerializersFromSchema(schema: Schema): Record; - -/** - * This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`). - * Cancels when `getAttrs` returned `false`. - * @param parseRule ProseMirror ParseRule - * @param extensionAttributes List of attributes to inject - */ -declare function injectExtensionAttributesToParseRule(parseRule: ParseRule, extensionAttributes: ExtensionAttribute[]): ParseRule; - -declare function isActive(state: EditorState, name: string | null, attributes?: Record): boolean; - -declare const isAtEndOfNode: (state: EditorState, nodeType?: string) => boolean; - -declare const isAtStartOfNode: (state: EditorState) => boolean; - -declare function isExtensionRulesEnabled(extension: AnyExtension, enabled: EnableRules): boolean; - -declare function isList(name: string, extensions: Extensions): boolean; - -declare function isMarkActive(state: EditorState, typeOrName: MarkType$1 | string | null, attributes?: Record): boolean; - -declare function isNodeActive(state: EditorState, typeOrName: NodeType$1 | string | null, attributes?: Record): boolean; - -/** - * Returns true if the given prosemirror node is empty. - */ -declare function isNodeEmpty(node: Node$1, { checkChildren, ignoreWhitespace, }?: { - /** - * When true (default), it will also check if all children are empty. - */ - checkChildren?: boolean; - /** - * When true, it will ignore whitespace when checking for emptiness. - */ - ignoreWhitespace?: boolean; -}): boolean; - -declare function isNodeSelection(value: unknown): value is NodeSelection; - -/** - * Determines whether a node view should be considered selected for the given - * editor selection. - * - * A node is considered selected when the current selection fully covers it - * (e.g. a `NodeSelection`). When `selectedOnTextSelection` is enabled, the - * node is additionally considered selected if a `TextSelection` is fully - * contained within the node's range. - * - * @param selection The current editor selection. - * @param pos The start position of the node in the document. - * @param nodeSize The size of the node. - * @param selectedOnTextSelection When `true`, also treat selections inside the node as selected. - * @returns `true` if the node view should render as selected. - */ -declare function isNodeViewSelected({ selection, pos, nodeSize, selectedOnTextSelection, }: { - selection: Selection; - pos: number; - nodeSize: number; - selectedOnTextSelection?: boolean; -}): boolean; - -declare function isTextSelection(value: unknown): value is TextSelection; - -/** - * A class that represents a mappable position in the editor. It can be extended - * by other extensions to add additional position mapping capabilities. - */ -declare class MappablePosition { - /** - * The absolute position in the editor. - */ - position: number; - constructor(position: number); - /** - * Creates a MappablePosition from a JSON object. - */ - static fromJSON(json: any): MappablePosition; - /** - * Converts the MappablePosition to a JSON object. - */ - toJSON(): any; -} -/** - * The result of the getUpdatedPosition function. - */ -interface GetUpdatedPositionResult { - position: MappablePosition; - mapResult: MapResult | null; -} -/** - * Calculates the new position after applying a transaction. - * - * @returns The new mappable position and the map result. - */ -declare function getUpdatedPosition(position: MappablePosition, transaction: Transaction): GetUpdatedPositionResult; -/** - * Creates a MappablePosition from a position number. This is the default - * implementation for Tiptap core. It can be overridden by other Tiptap - * extensions. - * - * @param position The position (as a number) where the MappablePosition will be created. - * @returns A new MappablePosition instance at the given position. - */ -declare function createMappablePosition(position: number): MappablePosition; - -declare function posToDOMRect(view: EditorView, from: number, to: number): DOMRect; - -/** - * Returns a flattened and sorted extension list while - * also checking for duplicated extensions and warns the user. - * @param extensions An array of Tiptap extensions - * @returns An flattened and sorted array of Tiptap extensions - */ -declare function resolveExtensions(extensions: Extensions): Extensions; - -declare function resolveFocusPosition(doc: Node$1, position?: FocusPosition): Selection | null; - -type RewriteUnknownContentOptions = { - /** - * If true, unknown nodes will be treated as paragraphs - * @default true - */ - fallbackToParagraph?: boolean; -}; -/** - * Rewrite unknown nodes and marks within JSON content - * Allowing for user within the editor - */ -declare function rewriteUnknownContent( -/** - * The JSON content to clean of unknown nodes and marks - */ -json: JSONContent, -/** - * The schema to use for validation - */ -schema: Schema, -/** - * Options for the cleaning process - */ -options?: RewriteUnknownContentOptions): { - /** - * The cleaned JSON content - */ - json: JSONContent | null; - /** - * The array of nodes and marks that were rewritten - */ - rewrittenContent: { - /** - * The original JSON content that was rewritten - */ - original: JSONContent; - /** - * The name of the node or mark that was unsupported - */ - unsupported: string; - }[]; -}; - -declare function selectionToInsertionEnd(tr: Transaction, startLen: number, bias: number): void; - -/** - * Sort extensions by priority. - * @param extensions An array of Tiptap extensions - * @returns A sorted array of Tiptap extensions by priority - */ -declare function sortExtensions(extensions: Extensions): Extensions; - -declare function splitExtensions(extensions: Extensions): { - baseExtensions: Extension[]; - nodeExtensions: Node[]; - markExtensions: Mark[]; -}; - -declare class ExtensionManager { - editor: Editor; - schema: Schema; - /** - * A flattened and sorted array of all extensions - */ - extensions: Extensions; - /** - * A non-flattened array of base extensions (no sub-extensions) - */ - baseExtensions: Extensions; - splittableMarks: string[]; - nonClearableMarks: string[]; - constructor(extensions: Extensions, editor: Editor); - static resolve: typeof resolveExtensions; - static sort: typeof sortExtensions; - static flatten: typeof flattenExtensions; - /** - * Get all commands from the extensions. - * @returns An object with all commands where the key is the command name and the value is the command function - */ - get commands(): RawCommands; - /** - * Get all registered Prosemirror plugins from the extensions. - * @returns An array of Prosemirror plugins - */ - get plugins(): Plugin[]; - /** - * Get all attributes from the extensions. - * @returns An array of attributes - */ - get attributes(): ExtensionAttribute[]; - /** - * Get all node views from the extensions. - * @returns An object with all node views where the key is the node name and the value is the node view function - */ - get nodeViews(): Record; - /** - * Get the composed dispatchTransaction function from all extensions. - * @param baseDispatch The base dispatch function (e.g. from the editor or user props) - * @returns A composed dispatch function - */ - dispatchTransaction(baseDispatch: (tr: Transaction) => void): (tr: Transaction) => void; - /** - * Get the composed transformPastedHTML function from all extensions. - * @param baseTransform The base transform function (e.g. from the editor props) - * @returns A composed transform function that chains all extension transforms - */ - transformPastedHTML(baseTransform?: (html: string, view?: any) => string): (html: string, view?: EditorView) => string; - get markViews(): Record; - /** - * Destroy the extension manager and clean up all extension references - * to prevent memory leaks through parent/child extension chains. - * - * Walks each extension's full parent chain and nulls every forward - * `parent.child → current` link where the parent still points to the - * current node. This breaks the retention path from module-scope - * singleton roots through deep extend() chains. - * - * Only ancestor `.child` links matching the current chain are cleared. - * The `.parent` pointer on ancestors is never touched — extensions - * may be shared across live editors, so their own backward references - * and non-matching forward links must remain intact. - */ - destroy(): void; - /** - * Go through all extensions, create extension storages & setup marks - * & bind editor event listener. - */ - private setupExtensions; -} - -declare class NodePos { - private resolvedPos; - private isBlock; - private editor; - private get name(); - constructor(pos: ResolvedPos, editor: Editor, isBlock?: boolean, node?: Node$1 | null); - private currentNode; - get node(): Node$1; - get element(): HTMLElement; - actualDepth: number | null; - get depth(): number; - get pos(): number; - get content(): Fragment$1; - set content(content: Content); - get attributes(): { - [key: string]: any; - }; - get textContent(): string; - get size(): number; - get from(): number; - get range(): Range; - get to(): number; - get parent(): NodePos | null; - get before(): NodePos | null; - get after(): NodePos | null; - get children(): NodePos[]; - get firstChild(): NodePos | null; - get lastChild(): NodePos | null; - closest(selector: string, attributes?: { - [key: string]: any; - }): NodePos | null; - querySelector(selector: string, attributes?: { - [key: string]: any; - }): NodePos | null; - querySelectorAll(selector: string, attributes?: { - [key: string]: any; - }, firstItemOnly?: boolean): NodePos[]; - setAttribute(attributes: { - [key: string]: any; - }): void; -} - -type ClipboardTextSerializerOptions = { - blockSeparator?: string; -}; -declare const ClipboardTextSerializer: Extension; - -declare module '@tiptap/core' { - interface Commands { - blur: { - /** - * Removes focus from the editor. - * @example editor.commands.blur() - */ - blur: () => ReturnType; - }; - } -} -declare const blur: RawCommands['blur']; - -declare module '@tiptap/core' { - interface Commands { - clearContent: { - /** - * Clear the whole document. - * @example editor.commands.clearContent() - */ - clearContent: ( - /** - * Whether to emit an update event. - * @default true - */ - emitUpdate?: boolean) => ReturnType; - }; - } -} -declare const clearContent: RawCommands['clearContent']; - -declare module '@tiptap/core' { - interface Commands { - clearNodes: { - /** - * Normalize nodes to a simple paragraph. - * @example editor.commands.clearNodes() - */ - clearNodes: () => ReturnType; - }; - } -} -declare const clearNodes: RawCommands['clearNodes']; - -declare module '@tiptap/core' { - interface Commands { - command: { - /** - * Define a command inline. - * @param fn The command function. - * @example - * editor.commands.command(({ tr, state }) => { - * ... - * return true - * }) - */ - command: (fn: (props: Parameters[0]) => boolean) => ReturnType; - }; - } -} -declare const command: RawCommands['command']; - -declare module '@tiptap/core' { - interface Commands { - createParagraphNear: { - /** - * Create a paragraph nearby. - * @example editor.commands.createParagraphNear() - */ - createParagraphNear: () => ReturnType; - }; - } -} -declare const createParagraphNear: RawCommands['createParagraphNear']; - -declare module '@tiptap/core' { - interface Commands { - cut: { - /** - * Cuts content from a range and inserts it at a given position. - * @param range The range to cut. - * @param range.from The start position of the range. - * @param range.to The end position of the range. - * @param targetPos The position to insert the content at. - * @example editor.commands.cut({ from: 1, to: 3 }, 5) - */ - cut: ({ from, to }: { - from: number; - to: number; - }, targetPos: number) => ReturnType; - }; - } -} -declare const cut: RawCommands['cut']; - -declare module '@tiptap/core' { - interface Commands { - deleteCurrentNode: { - /** - * Delete the node that currently has the selection anchor. - * @example editor.commands.deleteCurrentNode() - */ - deleteCurrentNode: () => ReturnType; - }; - } -} -declare const deleteCurrentNode: RawCommands['deleteCurrentNode']; - -declare module '@tiptap/core' { - interface Commands { - deleteNode: { - /** - * Delete a node with a given type or name. - * @param typeOrName The type or name of the node. - * @example editor.commands.deleteNode('paragraph') - */ - deleteNode: (typeOrName: string | NodeType$1) => ReturnType; - }; - } -} -declare const deleteNode: RawCommands['deleteNode']; - -declare module '@tiptap/core' { - interface Commands { - deleteRange: { - /** - * Delete a given range. - * @param range The range to delete. - * @example editor.commands.deleteRange({ from: 1, to: 3 }) - */ - deleteRange: (range: Range) => ReturnType; - }; - } -} -declare const deleteRange: RawCommands['deleteRange']; - -declare module '@tiptap/core' { - interface Commands { - deleteSelection: { - /** - * Delete the selection, if there is one. - * @example editor.commands.deleteSelection() - */ - deleteSelection: () => ReturnType; - }; - } -} -declare const deleteSelection: RawCommands['deleteSelection']; - -declare module '@tiptap/core' { - interface Commands { - enter: { - /** - * Trigger enter. - * @example editor.commands.enter() - */ - enter: () => ReturnType; - }; - } -} -declare const enter: RawCommands['enter']; - -declare module '@tiptap/core' { - interface Commands { - exitCode: { - /** - * Exit from a code block. - * @example editor.commands.exitCode() - */ - exitCode: () => ReturnType; - }; - } -} -declare const exitCode: RawCommands['exitCode']; - -declare module '@tiptap/core' { - interface Commands { - extendMarkRange: { - /** - * Extends the text selection to the current mark by type or name. - * @param typeOrName The type or name of the mark. - * @param attributes The attributes to match against. - * If not provided, only the first mark at the position will be matched. - * @example editor.commands.extendMarkRange('bold') - * @example editor.commands.extendMarkRange('mention', { userId: "1" }) - */ - extendMarkRange: ( - /** - * The type or name of the mark. - */ - typeOrName: string | MarkType$1, - /** - * The attributes of the mark. - */ - attributes?: Record) => ReturnType; - }; - } -} -declare const extendMarkRange: RawCommands['extendMarkRange']; - -declare module '@tiptap/core' { - interface Commands { - first: { - /** - * Runs one command after the other and stops at the first which returns true. - * @param commands The commands to run. - * @example editor.commands.first([command1, command2]) - */ - first: (commands: Command[] | ((props: CommandProps) => Command[])) => ReturnType; - }; - } -} -declare const first: RawCommands['first']; - -declare module '@tiptap/core' { - interface Commands { - focus: { - /** - * Focus the editor at the given position. - * @param position The position to focus at. - * @param options.scrollIntoView Scroll the focused position into view after focusing - * @example editor.commands.focus() - * @example editor.commands.focus(32, { scrollIntoView: false }) - */ - focus: ( - /** - * The position to focus at. - */ - position?: FocusPosition, - /** - * Optional options - * @default { scrollIntoView: true } - */ - options?: { - scrollIntoView?: boolean; - }) => ReturnType; - }; - } -} -declare const focus: RawCommands['focus']; - -declare module '@tiptap/core' { - interface Commands { - forEach: { - /** - * Loop through an array of items. - */ - forEach: (items: T[], fn: (item: T, props: CommandProps & { - index: number; - }) => boolean) => ReturnType; - }; - } -} -declare const forEach: RawCommands['forEach']; - -interface InsertContentOptions { - /** - * Options for parsing the content. - */ - parseOptions?: ParseOptions; - /** - * Whether to update the selection after inserting the content. - */ - updateSelection?: boolean; - applyInputRules?: boolean; - applyPasteRules?: boolean; -} -declare module '@tiptap/core' { - interface Commands { - insertContent: { - /** - * Insert a node or string of HTML at the current position. - * @example editor.commands.insertContent('

Example

') - * @example editor.commands.insertContent('

Example

', { updateSelection: false }) - */ - insertContent: ( - /** - * The ProseMirror content to insert. - */ - value: Content | Node$1 | Fragment$1, - /** - * Optional options - */ - options?: InsertContentOptions) => ReturnType; - }; - } -} -declare const insertContent: RawCommands['insertContent']; - -interface InsertContentAtOptions { - /** - * Options for parsing the content. - */ - parseOptions?: ParseOptions; - /** - * Whether to update the selection after inserting the content. - */ - updateSelection?: boolean; - /** - * Whether to apply input rules after inserting the content. - */ - applyInputRules?: boolean; - /** - * Whether to apply paste rules after inserting the content. - */ - applyPasteRules?: boolean; - /** - * Whether to throw an error if the content is invalid. - */ - errorOnInvalidContent?: boolean; -} -declare module '@tiptap/core' { - interface Commands { - insertContentAt: { - /** - * Insert a node or string of HTML at a specific position. - * @example editor.commands.insertContentAt(0, '

Example

') - */ - insertContentAt: ( - /** - * The position to insert the content at. - */ - position: number | Range, - /** - * The ProseMirror content to insert. - */ - value: Content | Node$1 | Fragment$1, - /** - * Optional options - */ - options?: InsertContentAtOptions) => ReturnType; - }; - } -} -declare const insertContentAt: RawCommands['insertContentAt']; - -declare module '@tiptap/core' { - interface Commands { - joinUp: { - /** - * Join the selected block or, if there is a text selection, the closest ancestor block of the selection that can be joined, with the sibling above it. - * @example editor.commands.joinUp() - */ - joinUp: () => ReturnType; - }; - joinDown: { - /** - * Join the selected block, or the closest ancestor of the selection that can be joined, with the sibling after it. - * @example editor.commands.joinDown() - */ - joinDown: () => ReturnType; - }; - joinBackward: { - /** - * If the selection is empty and at the start of a textblock, try to reduce the distance between that block and the one before it—if there's a block directly before it that can be joined, join them. - * If not, try to move the selected block closer to the next one in the document structure by lifting it out of its - * parent or moving it into a parent of the previous block. Will use the view for accurate (bidi-aware) start-of-textblock detection if given. - * @example editor.commands.joinBackward() - */ - joinBackward: () => ReturnType; - }; - joinForward: { - /** - * If the selection is empty and the cursor is at the end of a textblock, try to reduce or remove the boundary between that block and the one after it, - * either by joining them or by moving the other block closer to this one in the tree structure. - * Will use the view for accurate start-of-textblock detection if given. - * @example editor.commands.joinForward() - */ - joinForward: () => ReturnType; - }; - } -} -declare const joinUp: RawCommands['joinUp']; -declare const joinDown: RawCommands['joinDown']; -declare const joinBackward: RawCommands['joinBackward']; -declare const joinForward: RawCommands['joinForward']; - -declare module '@tiptap/core' { - interface Commands { - joinItemBackward: { - /** - * Join two items backward. - * @example editor.commands.joinItemBackward() - */ - joinItemBackward: () => ReturnType; - }; - } -} -declare const joinItemBackward: RawCommands['joinItemBackward']; - -declare module '@tiptap/core' { - interface Commands { - joinItemForward: { - /** - * Join two items Forwards. - * @example editor.commands.joinItemForward() - */ - joinItemForward: () => ReturnType; - }; - } -} -declare const joinItemForward: RawCommands['joinItemForward']; - -declare module '@tiptap/core' { - interface Commands { - joinTextblockBackward: { - /** - * A more limited form of joinBackward that only tries to join the current textblock to the one before it, if the cursor is at the start of a textblock. - */ - joinTextblockBackward: () => ReturnType; - }; - } -} -declare const joinTextblockBackward: RawCommands['joinTextblockBackward']; - -declare module '@tiptap/core' { - interface Commands { - joinTextblockForward: { - /** - * A more limited form of joinForward that only tries to join the current textblock to the one after it, if the cursor is at the end of a textblock. - */ - joinTextblockForward: () => ReturnType; - }; - } -} -declare const joinTextblockForward: RawCommands['joinTextblockForward']; - -declare module '@tiptap/core' { - interface Commands { - keyboardShortcut: { - /** - * Trigger a keyboard shortcut. - * @param name The name of the keyboard shortcut. - * @example editor.commands.keyboardShortcut('Mod-b') - */ - keyboardShortcut: (name: string) => ReturnType; - }; - } -} -declare const keyboardShortcut: RawCommands['keyboardShortcut']; - -declare module '@tiptap/core' { - interface Commands { - lift: { - /** - * Removes an existing wrap if possible lifting the node out of it - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.lift('paragraph') - * @example editor.commands.lift('heading', { level: 1 }) - */ - lift: (typeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const lift: RawCommands['lift']; - -declare module '@tiptap/core' { - interface Commands { - liftEmptyBlock: { - /** - * If the cursor is in an empty textblock that can be lifted, lift the block. - * @example editor.commands.liftEmptyBlock() - */ - liftEmptyBlock: () => ReturnType; - }; - } -} -declare const liftEmptyBlock: RawCommands['liftEmptyBlock']; - -declare module '@tiptap/core' { - interface Commands { - liftListItem: { - /** - * Create a command to lift the list item around the selection up into a wrapping list. - * @param typeOrName The type or name of the node. - * @example editor.commands.liftListItem('listItem') - */ - liftListItem: (typeOrName: string | NodeType$1) => ReturnType; - }; - } -} -declare const liftListItem: RawCommands['liftListItem']; - -declare module '@tiptap/core' { - interface Commands { - newlineInCode: { - /** - * Add a newline character in code. - * @example editor.commands.newlineInCode() - */ - newlineInCode: () => ReturnType; - }; - } -} -declare const newlineInCode: RawCommands['newlineInCode']; - -declare module '@tiptap/core' { - interface Commands { - resetAttributes: { - /** - * Resets some node attributes to the default value. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node to reset. - * @example editor.commands.resetAttributes('heading', 'level') - */ - resetAttributes: (typeOrName: string | NodeType$1 | MarkType$1, attributes: string | string[]) => ReturnType; - }; - } -} -declare const resetAttributes: RawCommands['resetAttributes']; - -declare module '@tiptap/core' { - interface Commands { - scrollIntoView: { - /** - * Scroll the selection into view. - * @example editor.commands.scrollIntoView() - */ - scrollIntoView: () => ReturnType; - }; - } -} -declare const scrollIntoView: RawCommands['scrollIntoView']; - -declare module '@tiptap/core' { - interface Commands { - selectAll: { - /** - * Select the whole document. - * @example editor.commands.selectAll() - */ - selectAll: () => ReturnType; - }; - } -} -declare const selectAll: RawCommands['selectAll']; - -declare module '@tiptap/core' { - interface Commands { - selectNodeBackward: { - /** - * Select a node backward. - * @example editor.commands.selectNodeBackward() - */ - selectNodeBackward: () => ReturnType; - }; - } -} -declare const selectNodeBackward: RawCommands['selectNodeBackward']; - -declare module '@tiptap/core' { - interface Commands { - selectNodeForward: { - /** - * Select a node forward. - * @example editor.commands.selectNodeForward() - */ - selectNodeForward: () => ReturnType; - }; - } -} -declare const selectNodeForward: RawCommands['selectNodeForward']; - -declare module '@tiptap/core' { - interface Commands { - selectParentNode: { - /** - * Select the parent node. - * @example editor.commands.selectParentNode() - */ - selectParentNode: () => ReturnType; - }; - } -} -declare const selectParentNode: RawCommands['selectParentNode']; - -declare module '@tiptap/core' { - interface Commands { - selectTextblockEnd: { - /** - * Moves the cursor to the end of current text block. - * @example editor.commands.selectTextblockEnd() - */ - selectTextblockEnd: () => ReturnType; - }; - } -} -declare const selectTextblockEnd: RawCommands['selectTextblockEnd']; - -declare module '@tiptap/core' { - interface Commands { - selectTextblockStart: { - /** - * Moves the cursor to the start of current text block. - * @example editor.commands.selectTextblockStart() - */ - selectTextblockStart: () => ReturnType; - }; - } -} -declare const selectTextblockStart: RawCommands['selectTextblockStart']; - -interface SetContentOptions { - /** - * Options for parsing the content. - * @default {} - */ - parseOptions?: ParseOptions; - /** - * Whether to throw an error if the content is invalid. - */ - errorOnInvalidContent?: boolean; - /** - * Whether to emit an update event. - * @default true - */ - emitUpdate?: boolean; -} -declare module '@tiptap/core' { - interface Commands { - setContent: { - /** - * Replace the whole document with new content. - * @param content The new content. - * @param emitUpdate Whether to emit an update event. - * @param parseOptions Options for parsing the content. - * @example editor.commands.setContent('

Example text

') - */ - setContent: ( - /** - * The new content. - */ - content: Content | Fragment$1 | Node$1, - /** - * Options for `setContent`. - */ - options?: SetContentOptions) => ReturnType; - }; - } -} -declare const setContent: RawCommands['setContent']; - -declare module '@tiptap/core' { - interface Commands { - setMark: { - /** - * Add a mark with new attributes. - * @param typeOrName The mark type or name. - * @example editor.commands.setMark('bold', { level: 1 }) - */ - setMark: (typeOrName: string | MarkType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const setMark: RawCommands['setMark']; - -declare module '@tiptap/core' { - interface Commands { - setMeta: { - /** - * Store a metadata property in the current transaction. - * @param key The key of the metadata property. - * @param value The value to store. - * @example editor.commands.setMeta('foo', 'bar') - */ - setMeta: (key: string | Plugin | PluginKey, value: any) => ReturnType; - }; - } -} -declare const setMeta: RawCommands['setMeta']; - -declare module '@tiptap/core' { - interface Commands { - setNode: { - /** - * Replace a given range with a node. - * @param typeOrName The type or name of the node - * @param attributes The attributes of the node - * @example editor.commands.setNode('paragraph') - */ - setNode: (typeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const setNode: RawCommands['setNode']; - -declare module '@tiptap/core' { - interface Commands { - setNodeSelection: { - /** - * Creates a NodeSelection. - * @param position - Position of the node. - * @example editor.commands.setNodeSelection(10) - */ - setNodeSelection: (position: number) => ReturnType; - }; - } -} -declare const setNodeSelection: RawCommands['setNodeSelection']; - -declare module '@tiptap/core' { - interface Commands { - setTextDirection: { - /** - * Set the text direction for nodes. - * If no position is provided, it will use the current selection. - * @param direction The text direction to set ('ltr', 'rtl', or 'auto') - * @param position Optional position or range to apply the direction to - * @example editor.commands.setTextDirection('rtl') - * @example editor.commands.setTextDirection('ltr', { from: 0, to: 10 }) - */ - setTextDirection: (direction: 'ltr' | 'rtl' | 'auto', position?: number | Range) => ReturnType; - }; - } -} -declare const setTextDirection: RawCommands['setTextDirection']; - -declare module '@tiptap/core' { - interface Commands { - setTextSelection: { - /** - * Creates a TextSelection. - * @param position The position of the selection. - * @example editor.commands.setTextSelection(10) - */ - setTextSelection: (position: number | Range) => ReturnType; - }; - } -} -declare const setTextSelection: RawCommands['setTextSelection']; - -declare module '@tiptap/core' { - interface Commands { - sinkListItem: { - /** - * Sink the list item down into an inner list. - * @param typeOrName The type or name of the node. - * @example editor.commands.sinkListItem('listItem') - */ - sinkListItem: (typeOrName: string | NodeType$1) => ReturnType; - }; - } -} -declare const sinkListItem: RawCommands['sinkListItem']; - -declare module '@tiptap/core' { - interface Commands { - splitBlock: { - /** - * Forks a new node from an existing node. - * @param options.keepMarks Keep marks from the previous node. - * @example editor.commands.splitBlock() - * @example editor.commands.splitBlock({ keepMarks: true }) - */ - splitBlock: (options?: { - keepMarks?: boolean; - }) => ReturnType; - }; - } -} -declare const splitBlock: RawCommands['splitBlock']; - -declare module '@tiptap/core' { - interface Commands { - splitListItem: { - /** - * Splits one list item into two list items. - * @param typeOrName The type or name of the node. - * @param overrideAttrs The attributes to ensure on the new node. - * @example editor.commands.splitListItem('listItem') - */ - splitListItem: (typeOrName: string | NodeType$1, overrideAttrs?: Record) => ReturnType; - }; - } -} -declare const splitListItem: RawCommands['splitListItem']; - -declare module '@tiptap/core' { - interface Commands { - toggleList: { - /** - * Toggle between different list types. - * @param listTypeOrName The type or name of the list. - * @param itemTypeOrName The type or name of the list item. - * @param keepMarks Keep marks when toggling. - * @param attributes Attributes for the new list. - * @example editor.commands.toggleList('bulletList', 'listItem') - */ - toggleList: (listTypeOrName: string | NodeType$1, itemTypeOrName: string | NodeType$1, keepMarks?: boolean, attributes?: Record) => ReturnType; - }; - } -} -declare const toggleList: RawCommands['toggleList']; - -declare module '@tiptap/core' { - interface Commands { - toggleMark: { - /** - * Toggle a mark on and off. - * @param typeOrName The mark type or name. - * @param attributes The attributes of the mark. - * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`. - * @example editor.commands.toggleMark('bold') - */ - toggleMark: ( - /** - * The mark type or name. - */ - typeOrName: string | MarkType$1, - /** - * The attributes of the mark. - */ - attributes?: Record, options?: { - /** - * Removes the mark even across the current selection. Defaults to `false`. - */ - extendEmptyMarkRange?: boolean; - }) => ReturnType; - }; - } -} -declare const toggleMark: RawCommands['toggleMark']; - -declare module '@tiptap/core' { - interface Commands { - toggleNode: { - /** - * Toggle a node with another node. - * @param typeOrName The type or name of the node. - * @param toggleTypeOrName The type or name of the node to toggle. - * @param attributes The attributes of the node. - * @example editor.commands.toggleNode('heading', 'paragraph') - */ - toggleNode: (typeOrName: string | NodeType$1, toggleTypeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const toggleNode: RawCommands['toggleNode']; - -declare module '@tiptap/core' { - interface Commands { - toggleWrap: { - /** - * Wraps nodes in another node, or removes an existing wrap. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.toggleWrap('blockquote') - */ - toggleWrap: (typeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const toggleWrap: RawCommands['toggleWrap']; - -declare module '@tiptap/core' { - interface Commands { - undoInputRule: { - /** - * Undo an input rule. - * @example editor.commands.undoInputRule() - */ - undoInputRule: () => ReturnType; - }; - } -} -declare const undoInputRule: RawCommands['undoInputRule']; - -declare module '@tiptap/core' { - interface Commands { - unsetAllMarks: { - /** - * Remove all clearable marks in the current selection. - * Marks with `clearable: false` are preserved - * @param options.ignoreClearable If true, removes all marks regardless of `clearable` setting. Defaults to `false`. - * @example editor.commands.unsetAllMarks() - * @example editor.commands.unsetAllMarks({ ignoreClearable: true }) - */ - unsetAllMarks: (options?: { - ignoreClearable?: boolean; - }) => ReturnType; - }; - } -} -declare const unsetAllMarks: RawCommands['unsetAllMarks']; - -declare module '@tiptap/core' { - interface Commands { - unsetMark: { - /** - * Remove all marks in the current selection. - * @param typeOrName The mark type or name. - * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`. - * @example editor.commands.unsetMark('bold') - */ - unsetMark: ( - /** - * The mark type or name. - */ - typeOrName: string | MarkType$1, options?: { - /** - * Removes the mark even across the current selection. Defaults to `false`. - */ - extendEmptyMarkRange?: boolean; - }) => ReturnType; - }; - } -} -declare const unsetMark: RawCommands['unsetMark']; - -declare module '@tiptap/core' { - interface Commands { - unsetTextDirection: { - /** - * Remove the text direction attribute from nodes. - * If no position is provided, it will use the current selection. - * @param position Optional position or range to remove the direction from - * @example editor.commands.unsetTextDirection() - * @example editor.commands.unsetTextDirection({ from: 0, to: 10 }) - */ - unsetTextDirection: (position?: number | Range) => ReturnType; - }; - } -} -declare const unsetTextDirection: RawCommands['unsetTextDirection']; - -declare module '@tiptap/core' { - interface Commands { - updateAttributes: { - /** - * Update attributes of a node or mark. - * @param typeOrName The type or name of the node or mark. - * @param attributes The attributes of the node or mark. - * @example editor.commands.updateAttributes('mention', { userId: "2" }) - */ - updateAttributes: ( - /** - * The type or name of the node or mark. - */ - typeOrName: string | NodeType$1 | MarkType$1, - /** - * The attributes of the node or mark. - */ - attributes: Record) => ReturnType; - }; - } -} -declare const updateAttributes: RawCommands['updateAttributes']; - -declare module '@tiptap/core' { - interface Commands { - wrapIn: { - /** - * Wraps nodes in another node. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.wrapIn('blockquote') - */ - wrapIn: (typeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const wrapIn: RawCommands['wrapIn']; - -declare module '@tiptap/core' { - interface Commands { - wrapInList: { - /** - * Wrap a node in a list. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.wrapInList('bulletList') - */ - wrapInList: (typeOrName: string | NodeType$1, attributes?: Record) => ReturnType; - }; - } -} -declare const wrapInList: RawCommands['wrapInList']; - -type index$2_InsertContentAtOptions = InsertContentAtOptions; -type index$2_InsertContentOptions = InsertContentOptions; -type index$2_SetContentOptions = SetContentOptions; -declare const index$2_blur: typeof blur; -declare const index$2_clearContent: typeof clearContent; -declare const index$2_clearNodes: typeof clearNodes; -declare const index$2_command: typeof command; -declare const index$2_createParagraphNear: typeof createParagraphNear; -declare const index$2_cut: typeof cut; -declare const index$2_deleteCurrentNode: typeof deleteCurrentNode; -declare const index$2_deleteNode: typeof deleteNode; -declare const index$2_deleteRange: typeof deleteRange; -declare const index$2_deleteSelection: typeof deleteSelection; -declare const index$2_enter: typeof enter; -declare const index$2_exitCode: typeof exitCode; -declare const index$2_extendMarkRange: typeof extendMarkRange; -declare const index$2_first: typeof first; -declare const index$2_focus: typeof focus; -declare const index$2_forEach: typeof forEach; -declare const index$2_insertContent: typeof insertContent; -declare const index$2_insertContentAt: typeof insertContentAt; -declare const index$2_joinBackward: typeof joinBackward; -declare const index$2_joinDown: typeof joinDown; -declare const index$2_joinForward: typeof joinForward; -declare const index$2_joinItemBackward: typeof joinItemBackward; -declare const index$2_joinItemForward: typeof joinItemForward; -declare const index$2_joinTextblockBackward: typeof joinTextblockBackward; -declare const index$2_joinTextblockForward: typeof joinTextblockForward; -declare const index$2_joinUp: typeof joinUp; -declare const index$2_keyboardShortcut: typeof keyboardShortcut; -declare const index$2_lift: typeof lift; -declare const index$2_liftEmptyBlock: typeof liftEmptyBlock; -declare const index$2_liftListItem: typeof liftListItem; -declare const index$2_newlineInCode: typeof newlineInCode; -declare const index$2_resetAttributes: typeof resetAttributes; -declare const index$2_scrollIntoView: typeof scrollIntoView; -declare const index$2_selectAll: typeof selectAll; -declare const index$2_selectNodeBackward: typeof selectNodeBackward; -declare const index$2_selectNodeForward: typeof selectNodeForward; -declare const index$2_selectParentNode: typeof selectParentNode; -declare const index$2_selectTextblockEnd: typeof selectTextblockEnd; -declare const index$2_selectTextblockStart: typeof selectTextblockStart; -declare const index$2_setContent: typeof setContent; -declare const index$2_setMark: typeof setMark; -declare const index$2_setMeta: typeof setMeta; -declare const index$2_setNode: typeof setNode; -declare const index$2_setNodeSelection: typeof setNodeSelection; -declare const index$2_setTextDirection: typeof setTextDirection; -declare const index$2_setTextSelection: typeof setTextSelection; -declare const index$2_sinkListItem: typeof sinkListItem; -declare const index$2_splitBlock: typeof splitBlock; -declare const index$2_splitListItem: typeof splitListItem; -declare const index$2_toggleList: typeof toggleList; -declare const index$2_toggleMark: typeof toggleMark; -declare const index$2_toggleNode: typeof toggleNode; -declare const index$2_toggleWrap: typeof toggleWrap; -declare const index$2_undoInputRule: typeof undoInputRule; -declare const index$2_unsetAllMarks: typeof unsetAllMarks; -declare const index$2_unsetMark: typeof unsetMark; -declare const index$2_unsetTextDirection: typeof unsetTextDirection; -declare const index$2_updateAttributes: typeof updateAttributes; -declare const index$2_wrapIn: typeof wrapIn; -declare const index$2_wrapInList: typeof wrapInList; -declare namespace index$2 { - export { type index$2_InsertContentAtOptions as InsertContentAtOptions, type index$2_InsertContentOptions as InsertContentOptions, type index$2_SetContentOptions as SetContentOptions, index$2_blur as blur, index$2_clearContent as clearContent, index$2_clearNodes as clearNodes, index$2_command as command, index$2_createParagraphNear as createParagraphNear, index$2_cut as cut, index$2_deleteCurrentNode as deleteCurrentNode, index$2_deleteNode as deleteNode, index$2_deleteRange as deleteRange, index$2_deleteSelection as deleteSelection, index$2_enter as enter, index$2_exitCode as exitCode, index$2_extendMarkRange as extendMarkRange, index$2_first as first, index$2_focus as focus, index$2_forEach as forEach, index$2_insertContent as insertContent, index$2_insertContentAt as insertContentAt, index$2_joinBackward as joinBackward, index$2_joinDown as joinDown, index$2_joinForward as joinForward, index$2_joinItemBackward as joinItemBackward, index$2_joinItemForward as joinItemForward, index$2_joinTextblockBackward as joinTextblockBackward, index$2_joinTextblockForward as joinTextblockForward, index$2_joinUp as joinUp, index$2_keyboardShortcut as keyboardShortcut, index$2_lift as lift, index$2_liftEmptyBlock as liftEmptyBlock, index$2_liftListItem as liftListItem, index$2_newlineInCode as newlineInCode, index$2_resetAttributes as resetAttributes, index$2_scrollIntoView as scrollIntoView, index$2_selectAll as selectAll, index$2_selectNodeBackward as selectNodeBackward, index$2_selectNodeForward as selectNodeForward, index$2_selectParentNode as selectParentNode, index$2_selectTextblockEnd as selectTextblockEnd, index$2_selectTextblockStart as selectTextblockStart, index$2_setContent as setContent, index$2_setMark as setMark, index$2_setMeta as setMeta, index$2_setNode as setNode, index$2_setNodeSelection as setNodeSelection, index$2_setTextDirection as setTextDirection, index$2_setTextSelection as setTextSelection, index$2_sinkListItem as sinkListItem, index$2_splitBlock as splitBlock, index$2_splitListItem as splitListItem, index$2_toggleList as toggleList, index$2_toggleMark as toggleMark, index$2_toggleNode as toggleNode, index$2_toggleWrap as toggleWrap, index$2_undoInputRule as undoInputRule, index$2_unsetAllMarks as unsetAllMarks, index$2_unsetMark as unsetMark, index$2_unsetTextDirection as unsetTextDirection, index$2_updateAttributes as updateAttributes, index$2_wrapIn as wrapIn, index$2_wrapInList as wrapInList }; -} - -declare const Commands$1: Extension; - -/** - * This extension allows you to be notified when the user deletes content you are interested in. - */ -declare const Delete: Extension; - -declare const Drop: Extension; - -declare const Editable: Extension; - -declare const focusEventsPluginKey: PluginKey; -declare const FocusEvents: Extension; - -declare const Keymap: Extension; - -declare const Paste: Extension; - -/** - * Options for the Tabindex extension. - */ -type TabindexOptions = { - /** - * The value for the `tabindex` attribute on the editor element. - * When undefined, editable editors default to `0` and non-editable editors get no tabindex. - */ - value?: string; -}; -/** - * The Tabindex extension adds a configurable tabindex attribute to the editor. - * - * By default, the editor gets tabindex="0" when editable. This can be customized - * via coreExtensionOptions to support specific focus ordering requirements in forms - * or to enable focusing on non-editable editors. - * - * @example - * ```ts - * new Editor({ - * coreExtensionOptions: { - * tabindex: { - * value: '-1', - * }, - * }, - * }) - * ``` - */ -declare const Tabindex: Extension; - -interface TextDirectionOptions { - direction: 'ltr' | 'rtl' | 'auto' | undefined; -} -/** - * The TextDirection extension adds support for setting text direction (LTR/RTL/auto) - * on all nodes in the editor. - * - * This extension adds a global `dir` attribute to all node types, which can be used - * to control bidirectional text rendering. The direction can be set globally via - * editor options or per-node using commands. - */ -declare const TextDirection: Extension; - -declare const index$1_ClipboardTextSerializer: typeof ClipboardTextSerializer; -declare const index$1_Delete: typeof Delete; -declare const index$1_Drop: typeof Drop; -declare const index$1_Editable: typeof Editable; -declare const index$1_FocusEvents: typeof FocusEvents; -declare const index$1_Keymap: typeof Keymap; -declare const index$1_Paste: typeof Paste; -declare const index$1_Tabindex: typeof Tabindex; -declare const index$1_TextDirection: typeof TextDirection; -declare const index$1_focusEventsPluginKey: typeof focusEventsPluginKey; -declare namespace index$1 { - export { index$1_ClipboardTextSerializer as ClipboardTextSerializer, Commands$1 as Commands, index$1_Delete as Delete, index$1_Drop as Drop, index$1_Editable as Editable, index$1_FocusEvents as FocusEvents, index$1_Keymap as Keymap, index$1_Paste as Paste, index$1_Tabindex as Tabindex, index$1_TextDirection as TextDirection, index$1_focusEventsPluginKey as focusEventsPluginKey }; -} - -interface TiptapEditorHTMLElement extends HTMLElement { - editor?: Editor; -} -declare class Editor extends EventEmitter { - private commandManager; - extensionManager: ExtensionManager; - private css; - private className; - schema: Schema; - private editorView; - isFocused: boolean; - private destroyed; - private editorState; - /** - * The editor is considered initialized after the `create` event has been emitted. - */ - isInitialized: boolean; - extensionStorage: Storage; - /** - * A unique ID for this editor instance. - */ - instanceId: string; - options: EditorOptions; - constructor(options?: Partial); - /** - * Attach the editor to the DOM, creating a new editor view. - */ - mount(el: NonNullable & {}): void; - /** - * Remove the editor from the DOM, but still allow remounting at a different point in time - */ - unmount(): void; - /** - * Returns the editor storage. - */ - get storage(): Storage; - /** - * An object of all registered commands. - */ - get commands(): SingleCommands; - /** - * Create a command chain to call multiple commands at once. - */ - chain(): ChainedCommands; - /** - * Check if a command or a command chain can be executed. Without executing it. - */ - can(): CanCommands; - /** - * Inject CSS styles. - */ - private injectCSS; - /** - * Update editor options. - * - * @param options A list of options - */ - setOptions(options?: Partial): void; - /** - * Update editable state of the editor. - */ - setEditable(editable: boolean, emitUpdate?: boolean): void; - /** - * Returns whether the editor is editable. - */ - get isEditable(): boolean; - /** - * Returns the editor view. - */ - get view(): EditorView; - /** - * Returns the editor state. - */ - get state(): EditorState; - /** - * Register a ProseMirror plugin. - * - * @param plugin A ProseMirror plugin - * @param handlePlugins Control how to merge the plugin into the existing plugins. - * @returns The new editor state - */ - registerPlugin(plugin: Plugin, handlePlugins?: (newPlugin: Plugin, plugins: Plugin[]) => Plugin[]): EditorState; - /** - * Unregister a ProseMirror plugin. - * - * @param nameOrPluginKeyToRemove The plugins name - * @returns The new editor state or undefined if the editor is destroyed - */ - unregisterPlugin(nameOrPluginKeyToRemove: string | PluginKey | (string | PluginKey)[]): EditorState | undefined; - /** - * Creates an extension manager. - */ - private createExtensionManager; - /** - * Creates an command manager. - */ - private createCommandManager; - /** - * Creates a ProseMirror schema. - */ - private createSchema; - /** - * Creates the initial document. - */ - private createDoc; - /** - * Creates a ProseMirror view. - */ - private createView; - /** - * Creates all node and mark views. - */ - createNodeViews(): void; - /** - * Prepend class name to element. - */ - prependClass(): void; - isCapturingTransaction: boolean; - private capturedTransaction; - captureTransaction(fn: () => void): Transaction | null; - /** - * The callback over which to send transactions (state updates) produced by the view. - * - * @param transaction An editor state transaction - */ - private dispatchTransaction; - /** - * Get attributes of the currently selected node or mark. - */ - getAttributes(nameOrType: string | NodeType$1 | MarkType$1): Record; - /** - * Returns if the currently selected node or mark is active. - * - * @param name Name of the node or mark - * @param attributes Attributes of the node or mark - */ - isActive(name: string, attributes?: {}): boolean; - isActive(attributes: {}): boolean; - /** - * Get the document as JSON. - */ - getJSON(): DocumentType | undefined, NodeType, any, (NodeType | TextType)[]>[]>; - /** - * Get the document as HTML. - */ - getHTML(): string; - /** - * Get the document as text. - */ - getText(options?: { - blockSeparator?: string; - textSerializers?: Record; - }): string; - /** - * Check if there is no content. - */ - get isEmpty(): boolean; - /** - * Destroy the editor. - */ - destroy(): void; - /** - * Check if the editor is already destroyed. - */ - get isDestroyed(): boolean; - $node(selector: string, attributes?: { - [key: string]: any; - }): NodePos | null; - $nodes(selector: string, attributes?: { - [key: string]: any; - }): NodePos[] | null; - $pos(pos: number): NodePos; - get $doc(): NodePos; - /** - * Returns a set of utilities for working with positions and ranges. - */ - utils: Utils; -} - -declare class CommandManager { - editor: Editor; - rawCommands: AnyCommands; - customState?: EditorState; - constructor(props: { - editor: Editor; - state?: EditorState; - }); - get hasCustomState(): boolean; - get state(): EditorState; - get commands(): SingleCommands; - get chain(): () => ChainedCommands; - get can(): () => CanCommands; - createChain(startTr?: Transaction, shouldDispatch?: boolean): ChainedCommands; - createCan(startTr?: Transaction): CanCommands; - buildProps(tr: Transaction, shouldDispatch?: boolean): CommandProps; -} - -/** - * Build an input rule that adds a mark when the - * matched text is typed into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -declare function markInputRule(config: { - find: InputRuleFinder; - type: MarkType$1; - undoable?: boolean; - getAttributes?: Record | ((match: ExtendedRegExpMatchArray) => Record) | false | null; -}): InputRule; - -/** - * Build an input rule that adds a node when the - * matched text is typed into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -declare function nodeInputRule(config: { - /** - * The regex to match. - */ - find: InputRuleFinder; - /** - * The node type to add. - */ - type: NodeType$1; - /** - * Whether the input rule should be undoable - * when the user presses backspace. - */ - undoable?: boolean; - /** - * A function that returns the attributes for the node - * can also be an object of attributes - */ - getAttributes?: Record | ((match: ExtendedRegExpMatchArray) => Record) | false | null; -}): InputRule; - -/** - * Build an input rule that changes the type of a textblock when the - * matched text is typed into it. When using a regular expresion you’ll - * probably want the regexp to start with `^`, so that the pattern can - * only occur at the start of a textblock. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -declare function textblockTypeInputRule(config: { - find: InputRuleFinder; - type: NodeType$1; - undoable?: boolean; - getAttributes?: Record | ((match: ExtendedRegExpMatchArray) => Record) | false | null; -}): InputRule; - -/** - * Build an input rule that replaces text when the - * matched text is typed into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -declare function textInputRule(config: { - find: InputRuleFinder; - replace: string; - undoable?: boolean; -}): InputRule; - -/** - * Build an input rule for automatically wrapping a textblock when a - * given string is typed. When using a regular expresion you’ll - * probably want the regexp to start with `^`, so that the pattern can - * only occur at the start of a textblock. - * - * `type` is the type of node to wrap in. - * - * By default, if there’s a node with the same type above the newly - * wrapped node, the rule will try to join those - * two nodes. You can pass a join predicate, which takes a regular - * expression match and the node before the wrapped node, and can - * return a boolean to indicate whether a join should happen. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -declare function wrappingInputRule(config: { - find: InputRuleFinder; - type: NodeType$1; - keepMarks?: boolean; - keepAttributes?: boolean; - editor?: Editor; - undoable?: boolean; - getAttributes?: Record | ((match: ExtendedRegExpMatchArray) => Record) | false | null; - joinPredicate?: (match: ExtendedRegExpMatchArray, node: Node$1) => boolean; -}): InputRule; - -type Attributes = Record; -type DOMOutputSpecElement = 0 | Attributes | DOMOutputSpecArray; -/** - * Better describes the output of a `renderHTML` function in prosemirror - * @see https://prosemirror.net/docs/ref/#model.DOMOutputSpec - */ -type DOMOutputSpecArray = [string] | [string, Attributes] | [string, 0] | [string, Attributes, 0] | [string, Attributes, DOMOutputSpecArray | 0] | [string, DOMOutputSpecArray]; -type JSXRenderer = (tag: 'slot' | string | ((props?: Attributes) => DOMOutputSpecArray | DOMOutputSpecElement), props?: Attributes, ...children: JSXRenderer[]) => DOMOutputSpecArray | DOMOutputSpecElement; -declare function Fragment(props: { - children: JSXRenderer[]; -}): JSXRenderer[]; -declare const h: JSXRenderer; - -/** - * Directions where resize handles can be placed - * - * @example - * - `'top'` - Top edge handle - * - `'bottom-right'` - Bottom-right corner handle - */ -type ResizableNodeViewDirection = 'top' | 'right' | 'bottom' | 'left' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; -/** - * Dimensions for the resizable node in pixels - */ -type ResizableNodeDimensions = { - /** Width in pixels */ - width: number; - /** Height in pixels */ - height: number; -}; -/** - * Configuration options for creating a ResizableNodeView - * - * @example - * ```ts - * new ResizableNodeView({ - * element: imgElement, - * node, - * getPos, - * onResize: (width, height) => { - * imgElement.style.width = `${width}px` - * imgElement.style.height = `${height}px` - * }, - * onCommit: (width, height) => { - * editor.commands.updateAttributes('image', { width, height }) - * }, - * onUpdate: (node) => true, - * options: { - * directions: ['bottom-right', 'bottom-left'], - * min: { width: 100, height: 100 }, - * preserveAspectRatio: true - * } - * }) - * ``` - */ -type ResizableNodeViewOptions = { - /** - * The DOM element to make resizable (e.g., an img, video, or iframe element) - */ - element: HTMLElement; - /** - * The DOM element that will hold the editable content element - */ - contentElement?: HTMLElement; - /** - * The ProseMirror node instance - */ - node: Node$1; - /** - * The Tiptap editor instance - */ - editor: Editor; - /** - * Function that returns the current position of the node in the document - */ - getPos: () => number | undefined; - /** - * Callback fired continuously during resize with current dimensions. - * Use this to update the element's visual size in real-time. - * - * @param width - Current width in pixels - * @param height - Current height in pixels - * - * @example - * ```ts - * onResize: (width, height) => { - * element.style.width = `${width}px` - * element.style.height = `${height}px` - * } - * ``` - */ - onResize?: (width: number, height: number) => void; - /** - * Callback fired once when resize completes with final dimensions. - * Use this to persist the new size to the node's attributes. - * - * @param width - Final width in pixels - * @param height - Final height in pixels - * - * @example - * ```ts - * onCommit: (width, height) => { - * const pos = getPos() - * if (pos !== undefined) { - * editor.commands.updateAttributes('image', { width, height }) - * } - * } - * ``` - */ - onCommit: (width: number, height: number) => void; - /** - * Callback for handling node updates. - * Return `true` to accept the update, `false` to reject it. - * - * @example - * ```ts - * onUpdate: (node, decorations, innerDecorations) => { - * if (node.type !== this.node.type) return false - * return true - * } - * ``` - */ - onUpdate: NodeView$1['update']; - /** - * Optional configuration for resize behavior and styling - */ - options?: { - /** - * Which resize handles to display. - * @default ['bottom-left', 'bottom-right', 'top-left', 'top-right'] - * - * @example - * ```ts - * // Only show corner handles - * directions: ['top-left', 'top-right', 'bottom-left', 'bottom-right'] - * - * // Only show right edge handle - * directions: ['right'] - * ``` - */ - directions?: ResizableNodeViewDirection[]; - /** - * Minimum dimensions in pixels - * @default { width: 8, height: 8 } - * - * @example - * ```ts - * min: { width: 100, height: 50 } - * ``` - */ - min?: Partial; - /** - * Maximum dimensions in pixels - * @default undefined (no maximum) - * - * @example - * ```ts - * max: { width: 1000, height: 800 } - * ``` - */ - max?: Partial; - /** - * Always preserve aspect ratio when resizing. - * When `false`, aspect ratio is preserved only when Shift key is pressed. - * @default false - * - * @example - * ```ts - * preserveAspectRatio: true // Always lock aspect ratio - * ``` - */ - preserveAspectRatio?: boolean; - /** - * Custom CSS class names for styling - * - * @example - * ```ts - * className: { - * container: 'resize-container', - * wrapper: 'resize-wrapper', - * handle: 'resize-handle', - * resizing: 'is-resizing' - * } - * ``` - */ - className?: { - /** Class for the outer container element */ - container?: string; - /** Class for the wrapper element that contains the resizable element */ - wrapper?: string; - /** Class applied to all resize handles */ - handle?: string; - /** Class added to container while actively resizing */ - resizing?: string; - }; - /** - * Optional callback for creating custom resize handle elements. - * - * This function allows developers to define their own handle element - * (e.g., custom icons, classes, or styles) for a given resize direction. - * It is called internally for each handle direction. - * - * @param direction - The direction of the handle being created (e.g., 'top', 'bottom-right'). - * @returns The custom handle HTMLElement. - * - * @example - * ```ts - * createCustomHandle: (direction) => { - * const handle = document.createElement('div') - * handle.dataset.resizeHandle = direction - * handle.style.position = 'absolute' - * handle.className = 'tiptap-custom-handle' - * - * const isTop = direction.includes('top') - * const isBottom = direction.includes('bottom') - * const isLeft = direction.includes('left') - * const isRight = direction.includes('right') - * - * if (isTop) handle.style.top = '0' - * if (isBottom) handle.style.bottom = '0' - * if (isLeft) handle.style.left = '0' - * if (isRight) handle.style.right = '0' - * - * // Edge handles span the full width or height - * if (direction === 'top' || direction === 'bottom') { - * handle.style.left = '0' - * handle.style.right = '0' - * } - * - * if (direction === 'left' || direction === 'right') { - * handle.style.top = '0' - * handle.style.bottom = '0' - * } - * - * return handle - * } - * ``` - */ - createCustomHandle?: (direction: ResizableNodeViewDirection) => HTMLElement; - }; -}; -/** - * A NodeView implementation that adds resize handles to any DOM element. - * - * This class creates a resizable node view for Tiptap/ProseMirror editors. - * It wraps your element with resize handles and manages the resize interaction, - * including aspect ratio preservation, min/max constraints, and keyboard modifiers. - * - * @example - * ```ts - * // Basic usage in a Tiptap extension - * addNodeView() { - * return ({ node, getPos }) => { - * const img = document.createElement('img') - * img.src = node.attrs.src - * - * return new ResizableNodeView({ - * element: img, - * node, - * getPos, - * onResize: (width, height) => { - * img.style.width = `${width}px` - * img.style.height = `${height}px` - * }, - * onCommit: (width, height) => { - * this.editor.commands.updateAttributes('image', { width, height }) - * }, - * onUpdate: () => true, - * options: { - * min: { width: 100, height: 100 }, - * preserveAspectRatio: true - * } - * }) - * } - * } - * ``` - */ -declare class ResizableNodeView { - /** The ProseMirror node instance */ - node: Node$1; - /** The Tiptap editor instance */ - editor: Editor; - /** The DOM element being made resizable */ - element: HTMLElement; - /** The editable DOM element inside the DOM */ - contentElement?: HTMLElement; - /** The outer container element (returned as NodeView.dom) */ - container: HTMLElement; - /** The wrapper element that contains the element and handles */ - wrapper: HTMLElement; - /** Function to get the current node position */ - getPos: () => number | undefined; - /** Callback fired during resize */ - onResize?: (width: number, height: number) => void; - /** Callback fired when resize completes */ - onCommit: (width: number, height: number) => void; - /** Callback for node updates */ - onUpdate?: NodeView$1['update']; - /** Active resize handle directions */ - directions: ResizableNodeViewDirection[]; - /** Minimum allowed dimensions */ - minSize: ResizableNodeDimensions; - /** Maximum allowed dimensions (optional) */ - maxSize?: Partial; - /** Whether to always preserve aspect ratio */ - preserveAspectRatio: boolean; - /** CSS class names for elements */ - classNames: { - container: string; - wrapper: string; - handle: string; - resizing: string; - }; - /** Optional callback for creating custom resize handles */ - createCustomHandle?: (direction: ResizableNodeViewDirection) => HTMLElement; - /** Initial width of the element (for aspect ratio calculation) */ - private initialWidth; - /** Initial height of the element (for aspect ratio calculation) */ - private initialHeight; - /** Calculated aspect ratio (width / height) */ - private aspectRatio; - /** Whether a resize operation is currently active */ - private isResizing; - /** The handle currently being dragged */ - private activeHandle; - /** Starting mouse X position when resize began */ - private startX; - /** Starting mouse Y position when resize began */ - private startY; - /** Element width when resize began */ - private startWidth; - /** Element height when resize began */ - private startHeight; - /** Whether Shift key is currently pressed (for temporary aspect ratio lock) */ - private isShiftKeyPressed; - /** Last known editable state of the editor */ - private lastEditableState; - /** Map of handle elements by direction */ - private handleMap; - /** - * Creates a new ResizableNodeView instance. - * - * The constructor sets up the resize handles, applies initial sizing from - * node attributes, and configures all resize behavior options. - * - * @param options - Configuration options for the resizable node view - */ - constructor(options: ResizableNodeViewOptions); - /** - * Returns the top-level DOM node that should be placed in the editor. - * - * This is required by the ProseMirror NodeView interface. The container - * includes the wrapper, handles, and the actual content element. - * - * @returns The container element to be inserted into the editor - */ - get dom(): HTMLElement; - get contentDOM(): HTMLElement | null; - private handleEditorUpdate; - /** - * Called when the node's content or attributes change. - * - * Updates the internal node reference. If a custom `onUpdate` callback - * was provided, it will be called to handle additional update logic. - * - * @param node - The new/updated node - * @param decorations - Node decorations - * @param innerDecorations - Inner decorations - * @returns `false` if the node type has changed (requires full rebuild), otherwise the result of `onUpdate` or `true` - */ - update(node: Node$1, decorations: readonly Decoration[], innerDecorations: DecorationSource): boolean; - /** - * Cleanup method called when the node view is being removed. - * - * Removes all event listeners to prevent memory leaks. This is required - * by the ProseMirror NodeView interface. If a resize is active when - * destroy is called, it will be properly cancelled. - */ - destroy(): void; - /** - * Creates the outer container element. - * - * The container is the top-level element returned by the NodeView and - * wraps the entire resizable node. It's set up with flexbox to handle - * alignment and includes data attributes for styling and identification. - * - * @returns The container element - */ - createContainer(): HTMLDivElement; - /** - * Creates the wrapper element that contains the content and handles. - * - * The wrapper uses relative positioning so that resize handles can be - * positioned absolutely within it. This is the direct parent of the - * content element being made resizable. - * - * @returns The wrapper element - */ - createWrapper(): HTMLDivElement; - /** - * Creates a resize handle element for a specific direction. - * - * Each handle is absolutely positioned and includes a data attribute - * identifying its direction for styling purposes. - * - * @param direction - The resize direction for this handle - * @returns The handle element - */ - private createHandle; - /** - * Positions a handle element according to its direction. - * - * Corner handles (e.g., 'top-left') are positioned at the intersection - * of two edges. Edge handles (e.g., 'top') span the full width or height. - * - * @param handle - The handle element to position - * @param direction - The direction determining the position - */ - private positionHandle; - /** - * Creates and attaches all resize handles to the wrapper. - * - * Iterates through the configured directions, creates a handle for each, - * positions it, attaches the mousedown listener, and appends it to the DOM. - */ - private attachHandles; - /** - * Removes all resize handles from the wrapper. - * - * Cleans up the handle map and removes each handle element from the DOM. - */ - private removeHandles; - /** - * Applies initial sizing from node attributes to the element. - * - * If width/height attributes exist on the node, they're applied to the element. - * Otherwise, the element's natural/current dimensions are measured. The aspect - * ratio is calculated for later use in aspect-ratio-preserving resizes. - */ - private applyInitialSize; - /** - * Initiates a resize operation when a handle is clicked. - * - * Captures the starting mouse position and element dimensions, sets up - * the resize state, adds the resizing class and state attribute, and - * attaches document-level listeners for mouse movement and keyboard input. - * - * @param event - The mouse down event - * @param direction - The direction of the handle being dragged - */ - private handleResizeStart; - /** - * Handles mouse movement during an active resize. - * - * Calculates the delta from the starting position, computes new dimensions - * based on the active handle direction, applies constraints and aspect ratio, - * then updates the element's style and calls the onResize callback. - * - * @param event - The mouse move event - */ - private handleMouseMove; - private handleTouchMove; - private handleResize; - /** - * Completes the resize operation when the mouse button is released. - * - * Captures final dimensions, calls the onCommit callback to persist changes, - * removes the resizing state and class, and cleans up document-level listeners. - */ - private handleMouseUp; - /** - * Tracks Shift key state to enable temporary aspect ratio locking. - * - * When Shift is pressed during resize, aspect ratio is preserved even if - * preserveAspectRatio is false. - * - * @param event - The keyboard event - */ - private handleKeyDown; - /** - * Tracks Shift key release to disable temporary aspect ratio locking. - * - * @param event - The keyboard event - */ - private handleKeyUp; - /** - * Calculates new dimensions based on mouse delta and resize direction. - * - * Takes the starting dimensions and applies the mouse movement delta - * according to the handle direction. For corner handles, both dimensions - * are affected. For edge handles, only one dimension changes. If aspect - * ratio should be preserved, delegates to applyAspectRatio. - * - * @param direction - The active resize handle direction - * @param deltaX - Horizontal mouse movement since resize start - * @param deltaY - Vertical mouse movement since resize start - * @returns The calculated width and height - */ - private calculateNewDimensions; - /** - * Applies min/max constraints to dimensions. - * - * When aspect ratio is NOT preserved, constraints are applied independently - * to width and height. When aspect ratio IS preserved, constraints are - * applied while maintaining the aspect ratio—if one dimension hits a limit, - * the other is recalculated proportionally. - * - * This ensures that aspect ratio is never broken when constrained. - * - * @param width - The unconstrained width - * @param height - The unconstrained height - * @param preserveAspectRatio - Whether to maintain aspect ratio while constraining - * @returns The constrained dimensions - */ - private applyConstraints; - /** - * Adjusts dimensions to maintain the original aspect ratio. - * - * For horizontal handles (left/right), uses width as the primary dimension - * and calculates height from it. For vertical handles (top/bottom), uses - * height as primary and calculates width. For corner handles, uses width - * as the primary dimension. - * - * @param width - The new width - * @param height - The new height - * @param direction - The active resize direction - * @returns Dimensions adjusted to preserve aspect ratio - */ - private applyAspectRatio; -} -/** - * Alias for ResizableNodeView to maintain consistent naming. - * @deprecated Use ResizableNodeView instead - will be removed in future versions. - */ -declare const ResizableNodeview: typeof ResizableNodeView; - -declare function updateMarkViewAttributes(checkMark: Mark$1, editor: Editor, attrs?: Record): void; -declare class MarkView { - component: Component; - editor: Editor; - options: Options; - mark: MarkViewProps['mark']; - HTMLAttributes: MarkViewProps['HTMLAttributes']; - constructor(component: Component, props: MarkViewProps, options?: Partial); - get dom(): HTMLElement; - get contentDOM(): HTMLElement | null; - /** - * Update the attributes of the mark in the document. - * @param attrs The attributes to update. - */ - updateAttributes(attrs: Record, checkMark?: Mark$1): void; - ignoreMutation(mutation: ViewMutationRecord): boolean; -} - -/** - * Node views are used to customize the rendered DOM structure of a node. - * @see https://tiptap.dev/guide/node-views - */ -declare class NodeView implements NodeView$1 { - component: Component; - editor: NodeEditor; - options: Options; - extension: NodeViewRendererProps['extension']; - node: NodeViewRendererProps['node']; - decorations: NodeViewRendererProps['decorations']; - innerDecorations: NodeViewRendererProps['innerDecorations']; - view: NodeViewRendererProps['view']; - getPos: NodeViewRendererProps['getPos']; - HTMLAttributes: NodeViewRendererProps['HTMLAttributes']; - isDragging: boolean; - constructor(component: Component, props: NodeViewRendererProps, options?: Partial); - mount(): void; - get dom(): HTMLElement; - get contentDOM(): HTMLElement | null; - onDragStart(event: DragEvent): void; - stopEvent(event: Event): boolean; - /** - * Called when a DOM [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) or a selection change happens within the view. - * @return `false` if the editor should re-read the selection or re-parse the range around the mutation - * @return `true` if it can safely be ignored. - */ - ignoreMutation(mutation: ViewMutationRecord): boolean; - /** - * Update the attributes of the prosemirror node. - */ - updateAttributes(attributes: Record): void; - /** - * Delete the node. - */ - deleteNode(): void; -} - -/** - * Build an paste rule that adds a mark when the - * matched text is pasted into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules - */ -declare function markPasteRule(config: { - find: PasteRuleFinder; - type: MarkType$1; - getAttributes?: Record | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record) | false | null; -}): PasteRule; - -/** - * Build an paste rule that adds a node when the - * matched text is pasted into it. - * @see https://tiptap.dev/docs/editor/api/paste-rules - */ -declare function nodePasteRule(config: { - find: PasteRuleFinder; - type: NodeType$1; - getAttributes?: Record | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record) | false | null; - getContent?: JSONContent[] | ((attrs: Record) => JSONContent[]) | false | null; -}): PasteRule; - -/** - * Build an paste rule that replaces text when the - * matched text is pasted into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules - */ -declare function textPasteRule(config: { - find: PasteRuleFinder; - replace: string; -}): PasteRule; - -interface TrackerResult { - position: number; - deleted: boolean; -} -declare class Tracker { - transaction: Transaction; - currentStep: number; - constructor(transaction: Transaction); - map(position: number): TrackerResult; -} - -/** - * Compare two attribute objects for equality. - * Handles null/undefined and asserts key presence in both objects so that - * `{ foo: undefined }` and `{ bar: undefined }` are not treated as equal. - */ -declare function attrsEqual(a: Record | null | undefined, b: Record | null | undefined): boolean; - -/** - * Optionally calls `value` as a function. - * Otherwise it is returned directly. - * @param value Function or any value. - * @param context Optional context to bind to function. - * @param props Optional props to pass to function. - */ -declare function callOrReturn(value: T, context?: any, ...props: any[]): MaybeReturnType; - -declare function canInsertNode(state: EditorState, nodeType: NodeType$1): boolean; - -declare function createStyleTag(style: string, nonce?: string, suffix?: string): HTMLStyleElement; - -/** - * Remove a property or an array of properties from an object - * @param obj Object - * @param key Key to remove - */ -declare function deleteProps(obj: Record, propOrProps: string | string[]): Record; - -declare function elementFromString(value: string): HTMLElement; - -declare function escapeForRegEx(string: string): string; - -/** - * Find duplicates in an array. - */ -declare function findDuplicates(items: T[]): T[]; - -declare function fromString(value: any): any; - -/** - * Read a CSS property value directly from an element's raw inline `style` - * attribute, bypassing the CSSOM (e.g. `element.style.fontFamily`) which - * canonicalizes values and can change formatting. The original format is - * preserved (quotes, hex vs rgb, etc.). - * - * When a property is declared more than once, the last declaration wins — - * this matches CSS cascade order and is useful when nested spans are merged - * and the child's value should take priority. - * - * Property name comparison is case-insensitive. - * - * @param element - The element whose `style` attribute should be read. - * @param propertyName - The CSS property name (e.g. `font-family`). - * @returns The raw value string, or `null` if the property is not present. - * - * @example - * ```ts - * parseHTML: element => getStyleProperty(element, 'font-family') - * ``` - */ -declare function getStyleProperty(element: HTMLElement, propertyName: string): string | null; - -/** - * Decode common HTML entities in text content so they display as literal - * characters inside the editor. The decode order matters: `&` must be - * decoded **last** so that doubly-encoded sequences like `&lt;` first - * survive the `<` pass and then correctly become `<` (not `<`). - */ -declare function decodeHtmlEntities(text: string): string; -/** - * Encode HTML special characters so they roundtrip safely through markdown. - * `&` is encoded **first** to avoid double-encoding the ampersand in other - * entities (e.g. `<` → `<`, not `&lt;`). - * - * Note: `"` is intentionally NOT encoded here because double quotes are - * ordinary characters in markdown and do not need escaping. The decode - * function still handles `"` because the markdown tokenizer may emit it. - */ -declare function encodeHtmlEntities(text: string): string; - -declare function isAndroid(): boolean; - -declare function isEmptyObject(value?: {}): boolean; - -/** - * Detects if the current browser is Firefox. - * @returns `true` if the browser is Firefox, `false` otherwise. - * @example - * if (isFirefox()) { - * // Firefox-specific handling - * } - */ -declare function isFirefox(): boolean; - -declare function isFunction(value: any): value is Function; - -declare function isiOS(): boolean; - -declare function isMacOS(): boolean; - -declare function isNumber(value: any): value is number; - -declare function isPlainObject(value: any): value is Record; - -declare function isRegExp(value: any): value is RegExp; - -/** - * Detects if the current browser is Safari (but not iOS Safari or Chrome). - * @returns `true` if the browser is Safari, `false` otherwise. - * @example - * if (isSafari()) { - * // Safari-specific handling - * } - */ -declare function isSafari(): boolean; - -declare function isString(value: any): value is string; - -/** - * @fileoverview Utility functions for parsing and serializing markdown attributes. - * - * These utilities handle the common patterns for parsing attribute strings - * in various markdown syntaxes like Pandoc attributes. - */ -/** - * Parses a Pandoc-style attribute string into an object. - * - * Supports the following patterns: - * - Classes: `.className` → `{ class: 'className' }` - * - IDs: `#myId` → `{ id: 'myId' }` - * - Key-value pairs: `key="value"` → `{ key: 'value' }` - * - Boolean attributes: `disabled` → `{ disabled: true }` - * - * @param attrString - The attribute string to parse - * @returns Parsed attributes object - * - * @example - * ```ts - * parseAttributes('.btn #submit disabled type="button"') - * // → { class: 'btn', id: 'submit', disabled: true, type: 'button' } - * ``` - */ -declare function parseAttributes(attrString: string): Record; -/** - * Serializes an attributes object back to a Pandoc-style attribute string. - * - * @param attributes - The attributes object to serialize - * @returns Serialized attribute string - * - * @example - * ```ts - * serializeAttributes({ class: 'btn primary', id: 'submit', disabled: true, type: 'button' }) - * // → '.btn.primary #submit disabled type="button"' - * ``` - */ -declare function serializeAttributes(attributes: Record): string; - -interface AtomBlockMarkdownSpecOptions { - /** The Tiptap node name this spec is for */ - nodeName: string; - /** The markdown syntax name (defaults to nodeName if not provided) */ - name?: string; - /** Function to parse attributes from token attribute string */ - parseAttributes?: (attrString: string) => Record; - /** Function to serialize attributes back to string for rendering */ - serializeAttributes?: (attrs: Record) => string; - /** Default attributes to apply when parsing */ - defaultAttributes?: Record; - /** Required attributes that must be present for successful parsing */ - requiredAttributes?: string[]; - /** Attributes that are allowed to be rendered back to markdown (whitelist) */ - allowedAttributes?: string[]; -} -/** - * Creates a complete markdown spec for atomic block nodes using Pandoc syntax. - * - * The generated spec handles: - * - Parsing self-closing blocks with `:::blockName {attributes}` - * - Extracting and parsing attributes - * - Validating required attributes - * - Rendering blocks back to markdown - * - * @param options - Configuration for the atomic block markdown spec - * @returns Complete markdown specification object - * - * @example - * ```ts - * const youtubeSpec = createAtomBlockMarkdownSpec({ - * nodeName: 'youtube', - * requiredAttributes: ['src'], - * defaultAttributes: { start: 0 }, - * allowedAttributes: ['src', 'start', 'width', 'height'] // Only these get rendered to markdown - * }) - * - * // Usage in extension: - * export const Youtube = Node.create({ - * // ... other config - * markdown: youtubeSpec - * }) - * ``` - */ -declare function createAtomBlockMarkdownSpec(options: AtomBlockMarkdownSpecOptions): { - parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult; - markdownTokenizer: MarkdownTokenizer; - renderMarkdown: (node: JSONContent) => string; -}; - -interface BlockMarkdownSpecOptions { - /** The Tiptap node name this spec is for */ - nodeName: string; - /** The markdown syntax name (defaults to nodeName if not provided) */ - name?: string; - /** Function to extract content from the node for serialization */ - getContent?: (token: MarkdownToken) => string; - /** Function to parse attributes from the attribute string */ - parseAttributes?: (attrString: string) => Record; - /** Function to serialize attributes to string */ - serializeAttributes?: (attrs: Record) => string; - /** Default attributes to apply when parsing */ - defaultAttributes?: Record; - /** Content type: 'block' allows paragraphs/lists/etc, 'inline' only allows bold/italic/links/etc */ - content?: 'block' | 'inline'; - /** Allowlist of attributes to include in markdown (if not provided, all attributes are included) */ - allowedAttributes?: string[]; -} -/** - * Creates a complete markdown spec for block-level nodes using Pandoc syntax. - * - * The generated spec handles: - * - Parsing blocks with `:::blockName {attributes}` syntax - * - Extracting and parsing attributes - * - Rendering blocks back to markdown with proper formatting - * - Nested content support - * - * @param options - Configuration for the block markdown spec - * @returns Complete markdown specification object - * - * @example - * ```ts - * const calloutSpec = createBlockMarkdownSpec({ - * nodeName: 'callout', - * defaultAttributes: { type: 'info' }, - * allowedAttributes: ['type', 'title'] // Only these get rendered to markdown - * }) - * - * // Usage in extension: - * export const Callout = Node.create({ - * // ... other config - * markdown: calloutSpec - * }) - * ``` - */ -declare function createBlockMarkdownSpec(options: BlockMarkdownSpecOptions): { - parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult; - markdownTokenizer: MarkdownTokenizer; - renderMarkdown: (node: JSONContent, h: MarkdownRendererHelpers) => string; -}; - -/** - * Configuration for an allowed attribute in markdown serialization. - * Can be a simple string (attribute name) or an object with additional options. - */ -type AllowedAttribute = string | { - /** The attribute name */ - name: string; - /** - * If provided, the attribute will be skipped during serialization when its value - * equals this default value. This keeps markdown output clean by omitting - * attributes that have their default values. - */ - skipIfDefault?: any; -}; -interface InlineMarkdownSpecOptions { - /** The Tiptap node name this spec is for */ - nodeName: string; - /** The shortcode name (defaults to nodeName if not provided) */ - name?: string; - /** Function to extract content from the node for serialization */ - getContent?: (node: any) => string; - /** Function to parse attributes from the attribute string */ - parseAttributes?: (attrString: string) => Record; - /** Function to serialize attributes to string */ - serializeAttributes?: (attrs: Record) => string; - /** Default attributes to apply when parsing */ - defaultAttributes?: Record; - /** Whether this is a self-closing shortcode (no content, like [emoji name=party]) */ - selfClosing?: boolean; - /** - * Allowlist of attributes to include in markdown serialization. - * If not provided, all attributes are included. - * - * Each item can be either: - * - A string: the attribute name (always included if present) - * - An object: `{ name: string, skipIfDefault?: any }` for conditional inclusion - * - * @example - * // Simple string attributes (backward compatible) - * allowedAttributes: ['id', 'label'] - * - * // Mixed with conditional attributes - * allowedAttributes: [ - * 'id', - * 'label', - * { name: 'mentionSuggestionChar', skipIfDefault: '@' } - * ] - */ - allowedAttributes?: AllowedAttribute[]; -} -/** - * Creates a complete markdown spec for inline nodes using attribute syntax. - * - * The generated spec handles: - * - Parsing shortcode syntax with `[nodeName attributes]content[/nodeName]` format - * - Self-closing shortcodes like `[emoji name=party_popper]` - * - Extracting and parsing attributes from the opening tag - * - Rendering inline elements back to shortcode markdown - * - Supporting both content-based and self-closing inline elements - * - * @param options - Configuration for the inline markdown spec - * @returns Complete markdown specification object - * - * @example - * ```ts - * // Self-closing mention: [mention id="madonna" label="Madonna"] - * const mentionSpec = createInlineMarkdownSpec({ - * nodeName: 'mention', - * selfClosing: true, - * defaultAttributes: { type: 'user' }, - * allowedAttributes: ['id', 'label'] // Only these get rendered to markdown - * }) - * - * // Self-closing emoji: [emoji name="party_popper"] - * const emojiSpec = createInlineMarkdownSpec({ - * nodeName: 'emoji', - * selfClosing: true, - * allowedAttributes: ['name'] - * }) - * - * // With content: [highlight color="yellow"]text[/highlight] - * const highlightSpec = createInlineMarkdownSpec({ - * nodeName: 'highlight', - * selfClosing: false, - * allowedAttributes: ['color', 'style'] - * }) - * - * // Usage in extension: - * export const Mention = Node.create({ - * name: 'mention', // Must match nodeName - * // ... other config - * markdown: mentionSpec - * }) - * ``` - */ -declare function createInlineMarkdownSpec(options: InlineMarkdownSpecOptions): { - parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult; - markdownTokenizer: MarkdownTokenizer; - renderMarkdown: (node: JSONContent) => string; -}; - -/** - * @fileoverview Utility for parsing indented markdown blocks with hierarchical nesting. - * - * This utility handles the complex logic of parsing markdown blocks that can contain - * nested content based on indentation levels, maintaining proper hierarchical structure - * for lists, task lists, and other indented block types. - */ -interface ParsedBlock { - type: string; - raw: string; - mainContent: string; - indentLevel: number; - nestedContent?: string; - nestedTokens?: any[]; - [key: string]: any; -} -interface BlockParserConfig { - /** Regex pattern to match block items */ - itemPattern: RegExp; - /** Function to extract data from regex match */ - extractItemData: (match: RegExpMatchArray) => { - mainContent: string; - indentLevel: number; - [key: string]: any; - }; - /** Function to create the final token */ - createToken: (data: any, nestedTokens?: any[]) => ParsedBlock; - /** Base indentation to remove from nested content (default: 2 spaces) */ - baseIndentSize?: number; - /** - * Custom parser for nested content. If provided, this will be called instead - * of the default lexer.blockTokens() for parsing nested content. - * This allows recursive parsing of the same block type. - */ - customNestedParser?: (dedentedContent: string) => any[] | undefined; -} -/** - * Parses markdown text into hierarchical indented blocks with proper nesting. - * - * This utility handles: - * - Line-by-line parsing with pattern matching - * - Hierarchical nesting based on indentation levels - * - Nested content collection and parsing - * - Empty line handling - * - Content dedenting for nested blocks - * - * The key difference from flat parsing is that this maintains the hierarchical - * structure where nested items become `nestedTokens` of their parent items, - * rather than being flattened into a single array. - * - * @param src - The markdown source text to parse - * @param config - Configuration object defining how to parse and create tokens - * @param lexer - Markdown lexer for parsing nested content - * @returns Parsed result with hierarchical items, or undefined if no matches - * - * @example - * ```ts - * const result = parseIndentedBlocks(src, { - * itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - * extractItemData: (match) => ({ - * indentLevel: match[1].length, - * mainContent: match[4], - * checked: match[3].toLowerCase() === 'x' - * }), - * createToken: (data, nestedTokens) => ({ - * type: 'taskItem', - * checked: data.checked, - * text: data.mainContent, - * nestedTokens - * }) - * }, lexer) - * ``` - */ -declare function parseIndentedBlocks(src: string, config: BlockParserConfig, lexer: { - inlineTokens: (src: string) => any[]; - blockTokens: (src: string) => any[]; -}): { - items: ParsedBlock[]; - raw: string; -} | undefined; - -/** - * @fileoverview Utility functions for rendering nested content in markdown. - * - * This module provides reusable utilities for extensions that need to render - * content with a prefix on the main line and properly indented nested content. - */ -/** - * Utility function for rendering content with a main line prefix and nested indented content. - * - * This function handles the common pattern of rendering content with: - * 1. A main line with a prefix (like "- " for lists, "> " for blockquotes, etc.) - * 2. Nested content that gets indented properly - * - * @param node - The ProseMirror node representing the content - * @param h - The markdown renderer helper - * @param prefixOrGenerator - Either a string prefix or a function that generates the prefix from context - * @param ctx - Optional context object (used when prefixOrGenerator is a function) - * @returns The rendered markdown string - * - * @example - * ```ts - * // For a bullet list item with static prefix - * return renderNestedMarkdownContent(node, h, '- ') - * - * // For a task item with static prefix - * const prefix = `- [${node.attrs?.checked ? 'x' : ' '}] ` - * return renderNestedMarkdownContent(node, h, prefix) - * - * // For a blockquote with static prefix - * return renderNestedMarkdownContent(node, h, '> ') - * - * // For content with dynamic prefix based on context - * return renderNestedMarkdownContent(node, h, ctx => { - * if (ctx.parentType === 'orderedList') { - * return `${ctx.index + 1}. ` - * } - * return '- ' - * }, ctx) - * - * // Custom extension example - * const CustomContainer = Node.create({ - * name: 'customContainer', - * // ... other config - * markdown: { - * render: (node, h) => { - * const type = node.attrs?.type || 'info' - * return renderNestedMarkdownContent(node, h, `[${type}] `) - * } - * } - * }) - * ``` - */ -declare function renderNestedMarkdownContent(node: JSONContent, h: { - renderChildren: (nodes: JSONContent[]) => string; - renderChild?: (node: JSONContent, index: number) => string; - indent: (text: string) => string; -}, prefixOrGenerator: string | ((ctx: any) => string), ctx?: any): string; - -/** - * @fileoverview Markdown utilities for creating standardized markdown specs. - * - * This module provides utilities for creating complete markdown specifications - * for different types of nodes using unified syntax patterns. - */ - -type index_AllowedAttribute = AllowedAttribute; -type index_AtomBlockMarkdownSpecOptions = AtomBlockMarkdownSpecOptions; -type index_BlockMarkdownSpecOptions = BlockMarkdownSpecOptions; -type index_BlockParserConfig = BlockParserConfig; -type index_InlineMarkdownSpecOptions = InlineMarkdownSpecOptions; -type index_ParsedBlock = ParsedBlock; -declare const index_createAtomBlockMarkdownSpec: typeof createAtomBlockMarkdownSpec; -declare const index_createBlockMarkdownSpec: typeof createBlockMarkdownSpec; -declare const index_createInlineMarkdownSpec: typeof createInlineMarkdownSpec; -declare const index_parseAttributes: typeof parseAttributes; -declare const index_parseIndentedBlocks: typeof parseIndentedBlocks; -declare const index_renderNestedMarkdownContent: typeof renderNestedMarkdownContent; -declare const index_serializeAttributes: typeof serializeAttributes; -declare namespace index { - export { type index_AllowedAttribute as AllowedAttribute, type index_AtomBlockMarkdownSpecOptions as AtomBlockMarkdownSpecOptions, type index_BlockMarkdownSpecOptions as BlockMarkdownSpecOptions, type index_BlockParserConfig as BlockParserConfig, type index_InlineMarkdownSpecOptions as InlineMarkdownSpecOptions, type index_ParsedBlock as ParsedBlock, index_createAtomBlockMarkdownSpec as createAtomBlockMarkdownSpec, index_createBlockMarkdownSpec as createBlockMarkdownSpec, index_createInlineMarkdownSpec as createInlineMarkdownSpec, index_parseAttributes as parseAttributes, index_parseIndentedBlocks as parseIndentedBlocks, index_renderNestedMarkdownContent as renderNestedMarkdownContent, index_serializeAttributes as serializeAttributes }; -} - -/** - * Compare two arrays of mark objects for equality. - * Marks are compared by type and attributes (using attrsEqual), - * so key ordering in attrs does not matter. - */ -declare function marksEqual(a: { - type: string; - attrs?: Record; -}[], b: { - type: string; - attrs?: Record; -}[]): boolean; - -declare function mergeAttributes(...objects: Record[]): Record; - -declare function mergeDeep(target: Record, source: Record): Record; - -declare function minMax(value?: number, min?: number, max?: number): number; - -/** - * Check if object1 includes object2 - * @param object1 Object - * @param object2 Object - */ -declare function objectIncludes(object1: Record, object2: Record, options?: { - strict: boolean; -}): boolean; - -/** - * Removes duplicated values within an array. - * Supports numbers, strings and objects. - */ -declare function removeDuplicates(array: T[], by?: { - (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - (value: any, replacer?: (number | string)[] | null, space?: string | number): string; -}): T[]; - -interface Commands { -} -interface Storage { -} - -export { type AllowedAttribute, type AnyCommands, type AnyConfig, type AnyExtension, type AtomBlockMarkdownSpecOptions, type Attribute, type Attributes$1 as Attributes, type BlockMarkdownSpecOptions, type BlockParserConfig, type CanCommands, type ChainedCommands, type ChangedRange, type Command, CommandManager, type CommandProps, type CommandSpec, type Commands, type Content, type CreateNodeFromContentOptions, type DOMNode, type DOMOutputSpecArray$1 as DOMOutputSpecArray, type DecorationType, type DecorationWithType, type Diff, type Dispatch, type DispatchTransactionProps, type DocumentType, Editor, type EditorEvents, type EditorOptions, type EnableRules, Extendable, type ExtendableConfig, type ExtendedRegExpMatchArray, Extension, type ExtensionAttribute, type ExtensionConfig, type Extensions, type FocusPosition, Fragment, type FullMarkdownHelpers, type GetUpdatedPositionResult, type GlobalAttributes, type HTMLContent, type InlineMarkdownSpecOptions, InputRule, type InputRuleFinder, type InputRuleMatch, type InsertContentAtOptions, type InsertContentOptions, type JSONContent, type KeyboardShortcutCommand, type KeysWithTypeOf, MappablePosition, Mark, type MarkConfig, type MarkRange, type MarkType, MarkView, type MarkViewProps, type MarkViewRenderer, type MarkViewRendererOptions, type MarkViewRendererProps, type MarkdownExtensionSpec, type MarkdownHelpers, type MarkdownLexerConfiguration, type MarkdownParseHelpers, type MarkdownParseResult, type MarkdownRendererHelpers, type MarkdownToken, type MarkdownTokenizer, type MaybeReturnType, type MaybeThisParameterType, Node, type NodeConfig, NodePos, type NodeRange, type NodeType, NodeView, type NodeViewProps, type NodeViewRenderer, type NodeViewRendererOptions, type NodeViewRendererProps, type NodeWithPos, type Overwrite, type ParentConfig, type ParsedBlock, PasteRule, type PasteRuleFinder, type PasteRuleMatch, type PickValue, type Predicate, type Primitive, type Range, type RawCommands, type RemoveThis, type RenderContext, type ResizableNodeDimensions, ResizableNodeView, type ResizableNodeViewDirection, type ResizableNodeViewOptions, ResizableNodeview, type SetContentOptions, type SingleCommands, type Storage, type TextSerializer, type TextType, type TiptapEditorHTMLElement, Tracker, type TrackerResult, type UnionCommands, type UnionToIntersection, type Utils, type ValuesOf, attrsEqual, blur, callOrReturn, canInsertNode, clearContent, clearNodes, combineTransactionSteps, command, index$2 as commands, createAtomBlockMarkdownSpec, createBlockMarkdownSpec, createChainableState, createDocument, h as createElement, createInlineMarkdownSpec, createMappablePosition, createNodeFromContent, createParagraphNear, createStyleTag, cut, decodeHtmlEntities, defaultBlockAt, deleteCurrentNode, deleteNode, deleteProps, deleteRange, deleteSelection, elementFromString, encodeHtmlEntities, enter, escapeForRegEx, exitCode, extendMarkRange, index$1 as extensions, findChildren, findChildrenInRange, findDuplicates, findParentNode, findParentNodeClosestToPos, first, flattenExtensions, focus, forEach, fromString, generateHTML, generateJSON, generateText, getAttributes, getAttributesFromExtensions, getChangedRanges, getDebugJSON, getExtensionField, getHTMLFromFragment, getMarkAttributes, getMarkRange, getMarkType, getMarksBetween, getNodeAtPosition, getNodeAttributes, getNodeType, getRenderedAttributes, getSchema, getSchemaByResolvedExtensions, getSchemaTypeByName, getSchemaTypeNameByName, getSplittedAttributes, getStyleProperty, getText, getTextBetween, getTextContentFromNodes, getTextSerializersFromSchema, getUpdatedPosition, h, injectExtensionAttributesToParseRule, inputRulesPlugin, insertContent, insertContentAt, isActive, isAndroid, isAtEndOfNode, isAtStartOfNode, isEmptyObject, isExtensionRulesEnabled, isFirefox, isFunction, isList, isMacOS, isMarkActive, isNodeActive, isNodeEmpty, isNodeSelection, isNodeViewSelected, isNumber, isPlainObject, isRegExp, isSafari, isString, isTextSelection, isiOS, joinBackward, joinDown, joinForward, joinItemBackward, joinItemForward, joinTextblockBackward, joinTextblockForward, joinUp, keyboardShortcut, lift, liftEmptyBlock, liftListItem, markInputRule, markPasteRule, index as markdown, marksEqual, mergeAttributes, mergeDeep, minMax, newlineInCode, nodeInputRule, nodePasteRule, objectIncludes, parseAttributes, parseIndentedBlocks, pasteRulesPlugin, posToDOMRect, removeDuplicates, renderNestedMarkdownContent, resetAttributes, resolveExtensions, resolveFocusPosition, rewriteUnknownContent, scrollIntoView, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, selectTextblockEnd, selectTextblockStart, selectionToInsertionEnd, serializeAttributes, setContent, setMark, setMeta, setNode, setNodeSelection, setTextDirection, setTextSelection, sinkListItem, sortExtensions, splitBlock, splitExtensions, splitListItem, textInputRule, textPasteRule, textblockTypeInputRule, toggleList, toggleMark, toggleNode, toggleWrap, undoInputRule, unsetAllMarks, unsetMark, unsetTextDirection, updateAttributes, updateMarkViewAttributes, wrapIn, wrapInList, wrappingInputRule }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.js deleted file mode 100644 index 138d909..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.js +++ /dev/null @@ -1,7398 +0,0 @@ -var __defProp = Object.defineProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; - -// src/helpers/createChainableState.ts -function createChainableState(config) { - const { state, transaction } = config; - let { selection } = transaction; - let { doc } = transaction; - let { storedMarks } = transaction; - return { - ...state, - apply: state.apply.bind(state), - applyTransaction: state.applyTransaction.bind(state), - plugins: state.plugins, - schema: state.schema, - reconfigure: state.reconfigure.bind(state), - toJSON: state.toJSON.bind(state), - get storedMarks() { - return storedMarks; - }, - get selection() { - return selection; - }, - get doc() { - return doc; - }, - get tr() { - selection = transaction.selection; - doc = transaction.doc; - storedMarks = transaction.storedMarks; - return transaction; - } - }; -} - -// src/CommandManager.ts -var CommandManager = class { - constructor(props) { - this.editor = props.editor; - this.rawCommands = this.editor.extensionManager.commands; - this.customState = props.state; - } - get hasCustomState() { - return !!this.customState; - } - get state() { - return this.customState || this.editor.state; - } - get commands() { - const { rawCommands, editor, state } = this; - const { view } = editor; - const { tr } = state; - const props = this.buildProps(tr); - return Object.fromEntries( - Object.entries(rawCommands).map(([name, command2]) => { - const method = (...args) => { - const callback = command2(...args)(props); - if (!tr.getMeta("preventDispatch") && !this.hasCustomState) { - view.dispatch(tr); - } - return callback; - }; - return [name, method]; - }) - ); - } - get chain() { - return () => this.createChain(); - } - get can() { - return () => this.createCan(); - } - createChain(startTr, shouldDispatch = true) { - const { rawCommands, editor, state } = this; - const { view } = editor; - const callbacks = []; - const hasStartTransaction = !!startTr; - const tr = startTr || state.tr; - const run3 = () => { - if (!hasStartTransaction && shouldDispatch && !tr.getMeta("preventDispatch") && !this.hasCustomState) { - view.dispatch(tr); - } - return callbacks.every((callback) => callback === true); - }; - const chain = { - ...Object.fromEntries( - Object.entries(rawCommands).map(([name, command2]) => { - const chainedCommand = (...args) => { - const props = this.buildProps(tr, shouldDispatch); - const callback = command2(...args)(props); - callbacks.push(callback); - return chain; - }; - return [name, chainedCommand]; - }) - ), - run: run3 - }; - return chain; - } - createCan(startTr) { - const { rawCommands, state } = this; - const dispatch = false; - const tr = startTr || state.tr; - const props = this.buildProps(tr, dispatch); - const formattedCommands = Object.fromEntries( - Object.entries(rawCommands).map(([name, command2]) => { - return [name, (...args) => command2(...args)({ ...props, dispatch: void 0 })]; - }) - ); - return { - ...formattedCommands, - chain: () => this.createChain(tr, dispatch) - }; - } - buildProps(tr, shouldDispatch = true) { - const { rawCommands, editor, state } = this; - const { view } = editor; - const props = { - tr, - editor, - view, - state: createChainableState({ - state, - transaction: tr - }), - dispatch: shouldDispatch ? () => void 0 : void 0, - chain: () => this.createChain(tr, shouldDispatch), - can: () => this.createCan(tr), - get commands() { - return Object.fromEntries( - Object.entries(rawCommands).map(([name, command2]) => { - return [name, (...args) => command2(...args)(props)]; - }) - ); - } - }; - return props; - } -}; - -// src/commands/index.ts -var commands_exports = {}; -__export(commands_exports, { - blur: () => blur, - clearContent: () => clearContent, - clearNodes: () => clearNodes, - command: () => command, - createParagraphNear: () => createParagraphNear, - cut: () => cut, - deleteCurrentNode: () => deleteCurrentNode, - deleteNode: () => deleteNode, - deleteRange: () => deleteRange, - deleteSelection: () => deleteSelection, - enter: () => enter, - exitCode: () => exitCode, - extendMarkRange: () => extendMarkRange, - first: () => first, - focus: () => focus, - forEach: () => forEach, - insertContent: () => insertContent, - insertContentAt: () => insertContentAt, - joinBackward: () => joinBackward, - joinDown: () => joinDown, - joinForward: () => joinForward, - joinItemBackward: () => joinItemBackward, - joinItemForward: () => joinItemForward, - joinTextblockBackward: () => joinTextblockBackward, - joinTextblockForward: () => joinTextblockForward, - joinUp: () => joinUp, - keyboardShortcut: () => keyboardShortcut, - lift: () => lift, - liftEmptyBlock: () => liftEmptyBlock, - liftListItem: () => liftListItem, - newlineInCode: () => newlineInCode, - resetAttributes: () => resetAttributes, - scrollIntoView: () => scrollIntoView, - selectAll: () => selectAll, - selectNodeBackward: () => selectNodeBackward, - selectNodeForward: () => selectNodeForward, - selectParentNode: () => selectParentNode, - selectTextblockEnd: () => selectTextblockEnd, - selectTextblockStart: () => selectTextblockStart, - setContent: () => setContent, - setMark: () => setMark, - setMeta: () => setMeta, - setNode: () => setNode, - setNodeSelection: () => setNodeSelection, - setTextDirection: () => setTextDirection, - setTextSelection: () => setTextSelection, - sinkListItem: () => sinkListItem, - splitBlock: () => splitBlock, - splitListItem: () => splitListItem, - toggleList: () => toggleList, - toggleMark: () => toggleMark, - toggleNode: () => toggleNode, - toggleWrap: () => toggleWrap, - undoInputRule: () => undoInputRule, - unsetAllMarks: () => unsetAllMarks, - unsetMark: () => unsetMark, - unsetTextDirection: () => unsetTextDirection, - updateAttributes: () => updateAttributes, - wrapIn: () => wrapIn, - wrapInList: () => wrapInList -}); - -// src/commands/blur.ts -var blur = () => ({ editor, view }) => { - requestAnimationFrame(() => { - var _a; - if (!editor.isDestroyed) { - ; - view.dom.blur(); - (_a = window == null ? void 0 : window.getSelection()) == null ? void 0 : _a.removeAllRanges(); - } - }); - return true; -}; - -// src/commands/clearContent.ts -var clearContent = (emitUpdate = true) => ({ commands }) => { - return commands.setContent("", { emitUpdate }); -}; - -// src/commands/clearNodes.ts -import { liftTarget } from "@tiptap/pm/transform"; -var clearNodes = () => ({ state, tr, dispatch }) => { - const { selection } = tr; - const { ranges } = selection; - if (!dispatch) { - return true; - } - ranges.forEach(({ $from, $to }) => { - state.doc.nodesBetween($from.pos, $to.pos, (node, pos) => { - if (node.type.isText) { - return; - } - const { doc, mapping } = tr; - const $mappedFrom = doc.resolve(mapping.map(pos)); - const $mappedTo = doc.resolve(mapping.map(pos + node.nodeSize)); - const nodeRange = $mappedFrom.blockRange($mappedTo); - if (!nodeRange) { - return; - } - const targetLiftDepth = liftTarget(nodeRange); - if (node.type.isTextblock) { - const { defaultType } = $mappedFrom.parent.contentMatchAt($mappedFrom.index()); - tr.setNodeMarkup(nodeRange.start, defaultType); - } - if (targetLiftDepth || targetLiftDepth === 0) { - tr.lift(nodeRange, targetLiftDepth); - } - }); - }); - return true; -}; - -// src/commands/command.ts -var command = (fn) => (props) => { - return fn(props); -}; - -// src/commands/createParagraphNear.ts -import { createParagraphNear as originalCreateParagraphNear } from "@tiptap/pm/commands"; -var createParagraphNear = () => ({ state, dispatch }) => { - return originalCreateParagraphNear(state, dispatch); -}; - -// src/commands/cut.ts -import { TextSelection } from "@tiptap/pm/state"; -var cut = (originRange, targetPos) => ({ editor, tr }) => { - const { state } = editor; - const contentSlice = state.doc.slice(originRange.from, originRange.to); - tr.deleteRange(originRange.from, originRange.to); - const newPos = tr.mapping.map(targetPos); - tr.insert(newPos, contentSlice.content); - tr.setSelection(new TextSelection(tr.doc.resolve(Math.max(newPos - 1, 0)))); - return true; -}; - -// src/commands/deleteCurrentNode.ts -var deleteCurrentNode = () => ({ tr, dispatch }) => { - const { selection } = tr; - const currentNode = selection.$anchor.node(); - if (currentNode.content.size > 0) { - return false; - } - const $pos = tr.selection.$anchor; - for (let depth = $pos.depth; depth > 0; depth -= 1) { - const node = $pos.node(depth); - if (node.type === currentNode.type) { - if (dispatch) { - const from = $pos.before(depth); - const to = $pos.after(depth); - tr.delete(from, to).scrollIntoView(); - } - return true; - } - } - return false; -}; - -// src/helpers/getNodeType.ts -function getNodeType(nameOrType, schema) { - if (typeof nameOrType === "string") { - if (!schema.nodes[nameOrType]) { - throw Error( - `There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?` - ); - } - return schema.nodes[nameOrType]; - } - return nameOrType; -} - -// src/commands/deleteNode.ts -var deleteNode = (typeOrName) => ({ tr, state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - const $pos = tr.selection.$anchor; - for (let depth = $pos.depth; depth > 0; depth -= 1) { - const node = $pos.node(depth); - if (node.type === type) { - if (dispatch) { - const from = $pos.before(depth); - const to = $pos.after(depth); - tr.delete(from, to).scrollIntoView(); - } - return true; - } - } - return false; -}; - -// src/commands/deleteRange.ts -var deleteRange = (range) => ({ tr, dispatch }) => { - const { from, to } = range; - if (dispatch) { - tr.delete(from, to); - } - return true; -}; - -// src/commands/deleteSelection.ts -var hasTextContent = (nodeSpec) => { - if (!nodeSpec.content) { - return false; - } - const textRegex = /^text(\*|\+)/; - return textRegex.test(nodeSpec.content); -}; -var expandSelectionForSide = ($pos, schema, side) => { - if (!$pos.parent.isInline) { - return $pos.pos; - } - if (side === "left" && $pos.pos > $pos.start() || side === "right" && $pos.pos < $pos.end()) { - return $pos.pos; - } - const parentContent = schema.nodes[$pos.parent.type.name].spec; - if (!hasTextContent(parentContent)) { - return $pos.pos; - } - return side === "left" ? $pos.start() - 1 : $pos.end() + 1; -}; -var expandSelectionForInlineText = ($from, $to, schema) => { - const from = expandSelectionForSide($from, schema, "left"); - const to = expandSelectionForSide($to, schema, "right"); - return { from, to }; -}; -var deleteSelection = () => ({ state, dispatch }) => { - const { $from, $to } = state.selection; - if (state.selection.empty) { - return false; - } - const { from, to } = expandSelectionForInlineText($from, $to, state.schema); - if (dispatch) { - state.tr.deleteRange(from, to).scrollIntoView(); - dispatch(state.tr); - } - return true; -}; - -// src/commands/enter.ts -var enter = () => ({ commands }) => { - return commands.keyboardShortcut("Enter"); -}; - -// src/commands/exitCode.ts -import { exitCode as originalExitCode } from "@tiptap/pm/commands"; -var exitCode = () => ({ state, dispatch }) => { - return originalExitCode(state, dispatch); -}; - -// src/commands/extendMarkRange.ts -import { TextSelection as TextSelection2 } from "@tiptap/pm/state"; - -// src/utilities/isRegExp.ts -function isRegExp(value) { - return Object.prototype.toString.call(value) === "[object RegExp]"; -} - -// src/utilities/objectIncludes.ts -function objectIncludes(object1, object2, options = { strict: true }) { - const keys = Object.keys(object2); - if (!keys.length) { - return true; - } - return keys.every((key) => { - if (options.strict) { - return object2[key] === object1[key]; - } - if (isRegExp(object2[key])) { - return object2[key].test(object1[key]); - } - return object2[key] === object1[key]; - }); -} - -// src/helpers/getMarkRange.ts -function findMarkInSet(marks, type, attributes = {}) { - return marks.find((item) => { - return item.type === type && objectIncludes( - // Only check equality for the attributes that are provided - Object.fromEntries(Object.keys(attributes).map((k) => [k, item.attrs[k]])), - attributes - ); - }); -} -function isMarkInSet(marks, type, attributes = {}) { - return !!findMarkInSet(marks, type, attributes); -} -function getMarkRange($pos, type, attributes) { - if (!$pos || !type) { - return; - } - let start = $pos.parent.childAfter($pos.parentOffset); - if (!start.node || !start.node.marks.some((mark2) => mark2.type === type)) { - start = $pos.parent.childBefore($pos.parentOffset); - } - if (!start.node || !start.node.marks.some((mark2) => mark2.type === type)) { - return; - } - if (!attributes) { - const firstMark = start.node.marks.find((mark2) => mark2.type === type); - if (firstMark) { - attributes = firstMark.attrs; - } - } - const mark = findMarkInSet([...start.node.marks], type, attributes); - if (!mark) { - return; - } - let startIndex = start.index; - let startPos = $pos.start() + start.offset; - let endIndex = startIndex + 1; - let endPos = startPos + start.node.nodeSize; - while (startIndex > 0 && isMarkInSet([...$pos.parent.child(startIndex - 1).marks], type, attributes)) { - startIndex -= 1; - startPos -= $pos.parent.child(startIndex).nodeSize; - } - while (endIndex < $pos.parent.childCount && isMarkInSet([...$pos.parent.child(endIndex).marks], type, attributes)) { - endPos += $pos.parent.child(endIndex).nodeSize; - endIndex += 1; - } - return { - from: startPos, - to: endPos - }; -} - -// src/helpers/getMarkType.ts -function getMarkType(nameOrType, schema) { - if (typeof nameOrType === "string") { - if (!schema.marks[nameOrType]) { - throw Error( - `There is no mark type named '${nameOrType}'. Maybe you forgot to add the extension?` - ); - } - return schema.marks[nameOrType]; - } - return nameOrType; -} - -// src/commands/extendMarkRange.ts -var extendMarkRange = (typeOrName, attributes) => ({ tr, state, dispatch }) => { - const type = getMarkType(typeOrName, state.schema); - const { doc, selection } = tr; - const { $from, from, to } = selection; - if (dispatch) { - const range = getMarkRange($from, type, attributes); - if (range && range.from <= from && range.to >= to) { - const newSelection = TextSelection2.create(doc, range.from, range.to); - tr.setSelection(newSelection); - } - } - return true; -}; - -// src/commands/first.ts -var first = (commands) => (props) => { - const items = typeof commands === "function" ? commands(props) : commands; - for (let i = 0; i < items.length; i += 1) { - if (items[i](props)) { - return true; - } - } - return false; -}; - -// src/helpers/isTextSelection.ts -import { TextSelection as TextSelection3 } from "@tiptap/pm/state"; -function isTextSelection(value) { - return value instanceof TextSelection3; -} - -// src/helpers/resolveFocusPosition.ts -import { Selection, TextSelection as TextSelection4 } from "@tiptap/pm/state"; - -// src/utilities/minMax.ts -function minMax(value = 0, min = 0, max = 0) { - return Math.min(Math.max(value, min), max); -} - -// src/helpers/resolveFocusPosition.ts -function resolveFocusPosition(doc, position = null) { - if (!position) { - return null; - } - const selectionAtStart = Selection.atStart(doc); - const selectionAtEnd = Selection.atEnd(doc); - if (position === "start" || position === true) { - return selectionAtStart; - } - if (position === "end") { - return selectionAtEnd; - } - const minPos = selectionAtStart.from; - const maxPos = selectionAtEnd.to; - if (position === "all") { - return TextSelection4.create( - doc, - minMax(0, minPos, maxPos), - minMax(doc.content.size, minPos, maxPos) - ); - } - return TextSelection4.create( - doc, - minMax(position, minPos, maxPos), - minMax(position, minPos, maxPos) - ); -} - -// src/utilities/isAndroid.ts -function isAndroid() { - return navigator.platform === "Android" || /android/i.test(navigator.userAgent); -} - -// src/utilities/isiOS.ts -function isiOS() { - return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes( - navigator.platform - ) || // iPad on iOS 13 detection - navigator.userAgent.includes("Mac") && "ontouchend" in document; -} - -// src/utilities/isSafari.ts -function isSafari() { - return typeof navigator !== "undefined" ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent) : false; -} - -// src/commands/focus.ts -var focus = (position = null, options = {}) => ({ editor, view, tr, dispatch }) => { - options = { - scrollIntoView: true, - ...options - }; - const delayedFocus = () => { - if (isiOS() || isAndroid()) { - ; - view.dom.focus(); - } - if (isSafari() && !isiOS() && !isAndroid()) { - ; - view.dom.focus({ preventScroll: true }); - } - requestAnimationFrame(() => { - if (!editor.isDestroyed) { - view.focus(); - if (options == null ? void 0 : options.scrollIntoView) { - editor.commands.scrollIntoView(); - } - } - }); - }; - try { - if (view.hasFocus() && position === null || position === false) { - return true; - } - } catch { - return false; - } - if (dispatch && position === null && !isTextSelection(editor.state.selection)) { - delayedFocus(); - return true; - } - const selection = resolveFocusPosition(tr.doc, position) || editor.state.selection; - const isSameSelection = editor.state.selection.eq(selection); - if (dispatch) { - if (!isSameSelection) { - tr.setSelection(selection); - } - if (isSameSelection && tr.storedMarks) { - tr.setStoredMarks(tr.storedMarks); - } - delayedFocus(); - } - return true; -}; - -// src/commands/forEach.ts -var forEach = (items, fn) => (props) => { - return items.every((item, index) => fn(item, { ...props, index })); -}; - -// src/commands/insertContent.ts -var insertContent = (value, options) => ({ tr, commands }) => { - return commands.insertContentAt( - { from: tr.selection.from, to: tr.selection.to }, - value, - options - ); -}; - -// src/commands/insertContentAt.ts -import { Fragment as Fragment2 } from "@tiptap/pm/model"; - -// src/helpers/createNodeFromContent.ts -import { DOMParser, Fragment, Node as ProseMirrorNode, Schema } from "@tiptap/pm/model"; - -// src/utilities/elementFromString.ts -var removeWhitespaces = (node) => { - const children = node.childNodes; - for (let i = children.length - 1; i >= 0; i -= 1) { - const child = children[i]; - if (child.nodeType === 3 && child.nodeValue && /^(\n\s\s|\n)$/.test(child.nodeValue)) { - node.removeChild(child); - } else if (child.nodeType === 1) { - removeWhitespaces(child); - } - } - return node; -}; -function elementFromString(value) { - if (typeof window === "undefined") { - throw new Error( - "[tiptap error]: there is no window object available, so this function cannot be used" - ); - } - const wrappedValue = `${value}`; - const html = new window.DOMParser().parseFromString(wrappedValue, "text/html").body; - return removeWhitespaces(html); -} - -// src/helpers/createNodeFromContent.ts -function createNodeFromContent(content, schema, options) { - if (content instanceof ProseMirrorNode || content instanceof Fragment) { - return content; - } - options = { - slice: true, - parseOptions: {}, - ...options - }; - const isJSONContent = typeof content === "object" && content !== null; - const isTextContent = typeof content === "string"; - if (isJSONContent) { - try { - const isArrayContent = Array.isArray(content) && content.length > 0; - if (isArrayContent) { - return Fragment.fromArray(content.map((item) => schema.nodeFromJSON(item))); - } - const node = schema.nodeFromJSON(content); - if (options.errorOnInvalidContent) { - node.check(); - } - return node; - } catch (error) { - if (options.errorOnInvalidContent) { - throw new Error("[tiptap error]: Invalid JSON content", { cause: error }); - } - console.warn("[tiptap warn]: Invalid content.", "Passed value:", content, "Error:", error); - return createNodeFromContent("", schema, options); - } - } - if (isTextContent) { - if (options.errorOnInvalidContent) { - let hasInvalidContent = false; - let invalidContent = ""; - const contentCheckSchema = new Schema({ - topNode: schema.spec.topNode, - marks: schema.spec.marks, - // Prosemirror's schemas are executed such that: the last to execute, matches last - // This means that we can add a catch-all node at the end of the schema to catch any content that we don't know how to handle - nodes: schema.spec.nodes.append({ - __tiptap__private__unknown__catch__all__node: { - content: "inline*", - group: "block", - parseDOM: [ - { - tag: "*", - getAttrs: (e) => { - hasInvalidContent = true; - invalidContent = typeof e === "string" ? e : e.outerHTML; - return null; - } - } - ] - } - }) - }); - if (options.slice) { - DOMParser.fromSchema(contentCheckSchema).parseSlice( - elementFromString(content), - options.parseOptions - ); - } else { - DOMParser.fromSchema(contentCheckSchema).parse( - elementFromString(content), - options.parseOptions - ); - } - if (options.errorOnInvalidContent && hasInvalidContent) { - throw new Error("[tiptap error]: Invalid HTML content", { - cause: new Error(`Invalid element found: ${invalidContent}`) - }); - } - } - const parser = DOMParser.fromSchema(schema); - if (options.slice) { - return parser.parseSlice(elementFromString(content), options.parseOptions).content; - } - return parser.parse(elementFromString(content), options.parseOptions); - } - return createNodeFromContent("", schema, options); -} - -// src/helpers/selectionToInsertionEnd.ts -import { Selection as Selection2 } from "@tiptap/pm/state"; -import { ReplaceAroundStep, ReplaceStep } from "@tiptap/pm/transform"; -function selectionToInsertionEnd(tr, startLen, bias) { - const last = tr.steps.length - 1; - if (last < startLen) { - return; - } - const step = tr.steps[last]; - if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) { - return; - } - const map = tr.mapping.maps[last]; - let end = 0; - map.forEach((_from, _to, _newFrom, newTo) => { - if (end === 0) { - end = newTo; - } - }); - tr.setSelection(Selection2.near(tr.doc.resolve(end), bias)); -} - -// src/commands/insertContentAt.ts -var isFragment = (nodeOrFragment) => { - return !("type" in nodeOrFragment); -}; -var insertContentAt = (position, value, options) => ({ tr, dispatch, editor }) => { - var _a; - if (dispatch) { - options = { - parseOptions: editor.options.parseOptions, - updateSelection: true, - applyInputRules: false, - applyPasteRules: false, - ...options - }; - let content; - const emitContentError = (error) => { - editor.emit("contentError", { - editor, - error, - disableCollaboration: () => { - if ("collaboration" in editor.storage && typeof editor.storage.collaboration === "object" && editor.storage.collaboration) { - ; - editor.storage.collaboration.isDisabled = true; - } - } - }); - }; - const parseOptions = { - preserveWhitespace: "full", - ...options.parseOptions - }; - if (!options.errorOnInvalidContent && !editor.options.enableContentCheck && editor.options.emitContentError) { - try { - createNodeFromContent(value, editor.schema, { - parseOptions, - errorOnInvalidContent: true - }); - } catch (e) { - emitContentError(e); - } - } - try { - content = createNodeFromContent(value, editor.schema, { - parseOptions, - errorOnInvalidContent: (_a = options.errorOnInvalidContent) != null ? _a : editor.options.enableContentCheck - }); - } catch (e) { - emitContentError(e); - return false; - } - let { from, to } = typeof position === "number" ? { from: position, to: position } : { from: position.from, to: position.to }; - let isOnlyTextContent = true; - let isOnlyBlockContent = true; - const nodes = isFragment(content) ? content : [content]; - nodes.forEach((node) => { - node.check(); - isOnlyTextContent = isOnlyTextContent ? node.isText && node.marks.length === 0 : false; - isOnlyBlockContent = isOnlyBlockContent ? node.isBlock : false; - }); - if (from === to && isOnlyBlockContent) { - const { parent } = tr.doc.resolve(from); - const isEmptyTextBlock = parent.isTextblock && !parent.type.spec.code && !parent.childCount; - if (isEmptyTextBlock) { - from -= 1; - to += 1; - } - } - let newContent; - if (isOnlyTextContent) { - if (Array.isArray(value)) { - newContent = value.map((v) => v.text || "").join(""); - } else if (value instanceof Fragment2) { - let text = ""; - value.forEach((node) => { - if (node.text) { - text += node.text; - } - }); - newContent = text; - } else if (typeof value === "object" && !!value && !!value.text) { - newContent = value.text; - } else { - newContent = value; - } - tr.insertText(newContent, from, to); - } else { - newContent = content; - const $from = tr.doc.resolve(from); - const $fromNode = $from.node(); - const fromSelectionAtStart = $from.parentOffset === 0; - const isTextSelection2 = $fromNode.isText || $fromNode.isTextblock; - const hasContent = $fromNode.content.size > 0; - if (fromSelectionAtStart && isTextSelection2 && hasContent && isOnlyBlockContent) { - from = Math.max(0, from - 1); - } - tr.replaceWith(from, to, newContent); - } - if (options.updateSelection) { - selectionToInsertionEnd(tr, tr.steps.length - 1, -1); - } - if (options.applyInputRules) { - tr.setMeta("applyInputRules", { from, text: newContent }); - } - if (options.applyPasteRules) { - tr.setMeta("applyPasteRules", { from, text: newContent }); - } - } - return true; -}; - -// src/commands/join.ts -import { - joinBackward as originalJoinBackward, - joinDown as originalJoinDown, - joinForward as originalJoinForward, - joinUp as originalJoinUp -} from "@tiptap/pm/commands"; -var joinUp = () => ({ state, dispatch }) => { - return originalJoinUp(state, dispatch); -}; -var joinDown = () => ({ state, dispatch }) => { - return originalJoinDown(state, dispatch); -}; -var joinBackward = () => ({ state, dispatch }) => { - return originalJoinBackward(state, dispatch); -}; -var joinForward = () => ({ state, dispatch }) => { - return originalJoinForward(state, dispatch); -}; - -// src/commands/joinItemBackward.ts -import { joinPoint } from "@tiptap/pm/transform"; -var joinItemBackward = () => ({ state, dispatch, tr }) => { - try { - const point = joinPoint(state.doc, state.selection.$from.pos, -1); - if (point === null || point === void 0) { - return false; - } - tr.join(point, 2); - if (dispatch) { - dispatch(tr); - } - return true; - } catch { - return false; - } -}; - -// src/commands/joinItemForward.ts -import { joinPoint as joinPoint2 } from "@tiptap/pm/transform"; -var joinItemForward = () => ({ state, dispatch, tr }) => { - try { - const point = joinPoint2(state.doc, state.selection.$from.pos, 1); - if (point === null || point === void 0) { - return false; - } - tr.join(point, 2); - if (dispatch) { - dispatch(tr); - } - return true; - } catch { - return false; - } -}; - -// src/commands/joinTextblockBackward.ts -import { joinTextblockBackward as originalCommand } from "@tiptap/pm/commands"; -var joinTextblockBackward = () => ({ state, dispatch }) => { - return originalCommand(state, dispatch); -}; - -// src/commands/joinTextblockForward.ts -import { joinTextblockForward as originalCommand2 } from "@tiptap/pm/commands"; -var joinTextblockForward = () => ({ state, dispatch }) => { - return originalCommand2(state, dispatch); -}; - -// src/utilities/isMacOS.ts -function isMacOS() { - return typeof navigator !== "undefined" ? /Mac/.test(navigator.platform) : false; -} - -// src/commands/keyboardShortcut.ts -function normalizeKeyName(name) { - const parts = name.split(/-(?!$)/); - let result = parts[parts.length - 1]; - if (result === "Space") { - result = " "; - } - let alt; - let ctrl; - let shift; - let meta; - for (let i = 0; i < parts.length - 1; i += 1) { - const mod = parts[i]; - if (/^(cmd|meta|m)$/i.test(mod)) { - meta = true; - } else if (/^a(lt)?$/i.test(mod)) { - alt = true; - } else if (/^(c|ctrl|control)$/i.test(mod)) { - ctrl = true; - } else if (/^s(hift)?$/i.test(mod)) { - shift = true; - } else if (/^mod$/i.test(mod)) { - if (isiOS() || isMacOS()) { - meta = true; - } else { - ctrl = true; - } - } else { - throw new Error(`Unrecognized modifier name: ${mod}`); - } - } - if (alt) { - result = `Alt-${result}`; - } - if (ctrl) { - result = `Ctrl-${result}`; - } - if (meta) { - result = `Meta-${result}`; - } - if (shift) { - result = `Shift-${result}`; - } - return result; -} -var keyboardShortcut = (name) => ({ editor, view, tr, dispatch }) => { - const keys = normalizeKeyName(name).split(/-(?!$)/); - const key = keys.find((item) => !["Alt", "Ctrl", "Meta", "Shift"].includes(item)); - const event = new KeyboardEvent("keydown", { - key: key === "Space" ? " " : key, - altKey: keys.includes("Alt"), - ctrlKey: keys.includes("Ctrl"), - metaKey: keys.includes("Meta"), - shiftKey: keys.includes("Shift"), - bubbles: true, - cancelable: true - }); - const capturedTransaction = editor.captureTransaction(() => { - view.someProp("handleKeyDown", (f) => f(view, event)); - }); - capturedTransaction == null ? void 0 : capturedTransaction.steps.forEach((step) => { - const newStep = step.map(tr.mapping); - if (newStep && dispatch) { - tr.maybeStep(newStep); - } - }); - return true; -}; - -// src/commands/lift.ts -import { lift as originalLift } from "@tiptap/pm/commands"; - -// src/helpers/isNodeActive.ts -function isNodeActive(state, typeOrName, attributes = {}) { - const { from, to, empty } = state.selection; - const type = typeOrName ? getNodeType(typeOrName, state.schema) : null; - const nodeRanges = []; - state.doc.nodesBetween(from, to, (node, pos) => { - if (node.isText) { - return; - } - const relativeFrom = Math.max(from, pos); - const relativeTo = Math.min(to, pos + node.nodeSize); - nodeRanges.push({ - node, - from: relativeFrom, - to: relativeTo - }); - }); - const selectionRange = to - from; - const matchedNodeRanges = nodeRanges.filter((nodeRange) => { - if (!type) { - return true; - } - return type.name === nodeRange.node.type.name; - }).filter((nodeRange) => objectIncludes(nodeRange.node.attrs, attributes, { strict: false })); - if (empty) { - return !!matchedNodeRanges.length; - } - const range = matchedNodeRanges.reduce((sum, nodeRange) => sum + nodeRange.to - nodeRange.from, 0); - return range >= selectionRange; -} - -// src/commands/lift.ts -var lift = (typeOrName, attributes = {}) => ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - const isActive2 = isNodeActive(state, type, attributes); - if (!isActive2) { - return false; - } - return originalLift(state, dispatch); -}; - -// src/commands/liftEmptyBlock.ts -import { liftEmptyBlock as originalLiftEmptyBlock } from "@tiptap/pm/commands"; -var liftEmptyBlock = () => ({ state, dispatch }) => { - return originalLiftEmptyBlock(state, dispatch); -}; - -// src/commands/liftListItem.ts -import { liftListItem as originalLiftListItem } from "@tiptap/pm/schema-list"; -var liftListItem = (typeOrName) => ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - return originalLiftListItem(type)(state, dispatch); -}; - -// src/commands/newlineInCode.ts -import { newlineInCode as originalNewlineInCode } from "@tiptap/pm/commands"; -var newlineInCode = () => ({ state, dispatch }) => { - return originalNewlineInCode(state, dispatch); -}; - -// src/helpers/getSchemaTypeNameByName.ts -function getSchemaTypeNameByName(name, schema) { - if (schema.nodes[name]) { - return "node"; - } - if (schema.marks[name]) { - return "mark"; - } - return null; -} - -// src/utilities/deleteProps.ts -function deleteProps(obj, propOrProps) { - const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps; - return Object.keys(obj).reduce((newObj, prop) => { - if (!props.includes(prop)) { - newObj[prop] = obj[prop]; - } - return newObj; - }, {}); -} - -// src/commands/resetAttributes.ts -var resetAttributes = (typeOrName, attributes) => ({ tr, state, dispatch }) => { - let nodeType = null; - let markType = null; - const schemaType = getSchemaTypeNameByName( - typeof typeOrName === "string" ? typeOrName : typeOrName.name, - state.schema - ); - if (!schemaType) { - return false; - } - if (schemaType === "node") { - nodeType = getNodeType(typeOrName, state.schema); - } - if (schemaType === "mark") { - markType = getMarkType(typeOrName, state.schema); - } - let canReset = false; - tr.selection.ranges.forEach((range) => { - state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => { - if (nodeType && nodeType === node.type) { - canReset = true; - if (dispatch) { - tr.setNodeMarkup(pos, void 0, deleteProps(node.attrs, attributes)); - } - } - if (markType && node.marks.length) { - node.marks.forEach((mark) => { - if (markType === mark.type) { - canReset = true; - if (dispatch) { - tr.addMark( - pos, - pos + node.nodeSize, - markType.create(deleteProps(mark.attrs, attributes)) - ); - } - } - }); - } - }); - }); - return canReset; -}; - -// src/commands/scrollIntoView.ts -var scrollIntoView = () => ({ tr, dispatch }) => { - if (dispatch) { - tr.scrollIntoView(); - } - return true; -}; - -// src/commands/selectAll.ts -import { AllSelection } from "@tiptap/pm/state"; -var selectAll = () => ({ tr, dispatch }) => { - if (dispatch) { - const selection = new AllSelection(tr.doc); - tr.setSelection(selection); - } - return true; -}; - -// src/commands/selectNodeBackward.ts -import { selectNodeBackward as originalSelectNodeBackward } from "@tiptap/pm/commands"; -var selectNodeBackward = () => ({ state, dispatch }) => { - return originalSelectNodeBackward(state, dispatch); -}; - -// src/commands/selectNodeForward.ts -import { selectNodeForward as originalSelectNodeForward } from "@tiptap/pm/commands"; -var selectNodeForward = () => ({ state, dispatch }) => { - return originalSelectNodeForward(state, dispatch); -}; - -// src/commands/selectParentNode.ts -import { selectParentNode as originalSelectParentNode } from "@tiptap/pm/commands"; -var selectParentNode = () => ({ state, dispatch }) => { - return originalSelectParentNode(state, dispatch); -}; - -// src/commands/selectTextblockEnd.ts -import { selectTextblockEnd as originalSelectTextblockEnd } from "@tiptap/pm/commands"; -var selectTextblockEnd = () => ({ state, dispatch }) => { - return originalSelectTextblockEnd(state, dispatch); -}; - -// src/commands/selectTextblockStart.ts -import { selectTextblockStart as originalSelectTextblockStart } from "@tiptap/pm/commands"; -var selectTextblockStart = () => ({ state, dispatch }) => { - return originalSelectTextblockStart(state, dispatch); -}; - -// src/helpers/createDocument.ts -function createDocument(content, schema, parseOptions = {}, options = {}) { - return createNodeFromContent(content, schema, { - slice: false, - parseOptions, - errorOnInvalidContent: options.errorOnInvalidContent - }); -} - -// src/commands/setContent.ts -var setContent = (content, { errorOnInvalidContent, emitUpdate = true, parseOptions = {} } = {}) => ({ editor, tr, dispatch, commands }) => { - const { doc } = tr; - if (parseOptions.preserveWhitespace !== "full") { - const document2 = createDocument(content, editor.schema, parseOptions, { - errorOnInvalidContent: errorOnInvalidContent != null ? errorOnInvalidContent : editor.options.enableContentCheck - }); - if (dispatch) { - tr.replaceWith(0, doc.content.size, document2).setMeta("preventUpdate", !emitUpdate); - } - return true; - } - if (dispatch) { - tr.setMeta("preventUpdate", !emitUpdate); - } - return commands.insertContentAt({ from: 0, to: doc.content.size }, content, { - parseOptions, - errorOnInvalidContent: errorOnInvalidContent != null ? errorOnInvalidContent : editor.options.enableContentCheck - }); -}; - -// src/helpers/getMarkAttributes.ts -function getMarkAttributes(state, typeOrName) { - const type = getMarkType(typeOrName, state.schema); - const { from, to, empty } = state.selection; - const marks = []; - if (empty) { - if (state.storedMarks) { - marks.push(...state.storedMarks); - } - marks.push(...state.selection.$head.marks()); - } else { - state.doc.nodesBetween(from, to, (node) => { - marks.push(...node.marks); - }); - } - const mark = marks.find((markItem) => markItem.type.name === type.name); - if (!mark) { - return {}; - } - return { ...mark.attrs }; -} - -// src/helpers/combineTransactionSteps.ts -import { Transform } from "@tiptap/pm/transform"; -function combineTransactionSteps(oldDoc, transactions) { - const transform = new Transform(oldDoc); - transactions.forEach((transaction) => { - transaction.steps.forEach((step) => { - transform.step(step); - }); - }); - return transform; -} - -// src/helpers/defaultBlockAt.ts -function defaultBlockAt(match) { - for (let i = 0; i < match.edgeCount; i += 1) { - const { type } = match.edge(i); - if (type.isTextblock && !type.hasRequiredAttrs()) { - return type; - } - } - return null; -} - -// src/helpers/findChildren.ts -function findChildren(node, predicate) { - const nodesWithPos = []; - node.descendants((child, pos) => { - if (predicate(child)) { - nodesWithPos.push({ - node: child, - pos - }); - } - }); - return nodesWithPos; -} - -// src/helpers/findChildrenInRange.ts -function findChildrenInRange(node, range, predicate) { - const nodesWithPos = []; - node.nodesBetween(range.from, range.to, (child, pos) => { - if (predicate(child)) { - nodesWithPos.push({ - node: child, - pos - }); - } - }); - return nodesWithPos; -} - -// src/helpers/findParentNodeClosestToPos.ts -function findParentNodeClosestToPos($pos, predicate) { - for (let i = $pos.depth; i > 0; i -= 1) { - const node = $pos.node(i); - if (predicate(node)) { - return { - pos: i > 0 ? $pos.before(i) : 0, - start: $pos.start(i), - depth: i, - node - }; - } - } -} - -// src/helpers/findParentNode.ts -function findParentNode(predicate) { - return (selection) => findParentNodeClosestToPos(selection.$from, predicate); -} - -// src/helpers/getExtensionField.ts -function getExtensionField(extension, field, context) { - if (extension.config[field] === void 0 && extension.parent) { - return getExtensionField(extension.parent, field, context); - } - if (typeof extension.config[field] === "function") { - const value = extension.config[field].bind({ - ...context, - parent: extension.parent ? getExtensionField(extension.parent, field, context) : null - }); - return value; - } - return extension.config[field]; -} - -// src/helpers/flattenExtensions.ts -function flattenExtensions(extensions) { - return extensions.map((extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage - }; - const addExtensions = getExtensionField( - extension, - "addExtensions", - context - ); - if (addExtensions) { - return [extension, ...flattenExtensions(addExtensions())]; - } - return extension; - }).flat(10); -} - -// src/helpers/generateHTML.ts -import { Node } from "@tiptap/pm/model"; - -// src/helpers/getHTMLFromFragment.ts -import { DOMSerializer } from "@tiptap/pm/model"; -function getHTMLFromFragment(fragment, schema) { - const documentFragment = DOMSerializer.fromSchema(schema).serializeFragment(fragment); - const temporaryDocument = document.implementation.createHTMLDocument(); - const container = temporaryDocument.createElement("div"); - container.appendChild(documentFragment); - return container.innerHTML; -} - -// src/helpers/getSchemaByResolvedExtensions.ts -import { Schema as Schema2 } from "@tiptap/pm/model"; - -// src/utilities/isFunction.ts -function isFunction(value) { - return typeof value === "function"; -} - -// src/utilities/callOrReturn.ts -function callOrReturn(value, context = void 0, ...props) { - if (isFunction(value)) { - if (context) { - return value.bind(context)(...props); - } - return value(...props); - } - return value; -} - -// src/utilities/isEmptyObject.ts -function isEmptyObject(value = {}) { - return Object.keys(value).length === 0 && value.constructor === Object; -} - -// src/helpers/splitExtensions.ts -function splitExtensions(extensions) { - const baseExtensions = extensions.filter( - (extension) => extension.type === "extension" - ); - const nodeExtensions = extensions.filter((extension) => extension.type === "node"); - const markExtensions = extensions.filter((extension) => extension.type === "mark"); - return { - baseExtensions, - nodeExtensions, - markExtensions - }; -} - -// src/helpers/getAttributesFromExtensions.ts -function getAttributesFromExtensions(extensions) { - const extensionAttributes = []; - const { nodeExtensions, markExtensions } = splitExtensions(extensions); - const nodeAndMarkExtensions = [...nodeExtensions, ...markExtensions]; - const defaultAttribute = { - default: null, - validate: void 0, - rendered: true, - renderHTML: null, - parseHTML: null, - keepOnSplit: true, - isRequired: false - }; - const nodeExtensionTypes = nodeExtensions.filter((ext) => ext.name !== "text").map((ext) => ext.name); - const markExtensionTypes = markExtensions.map((ext) => ext.name); - const allExtensionTypes = [...nodeExtensionTypes, ...markExtensionTypes]; - extensions.forEach((extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - extensions: nodeAndMarkExtensions - }; - const addGlobalAttributes = getExtensionField( - extension, - "addGlobalAttributes", - context - ); - if (!addGlobalAttributes) { - return; - } - const globalAttributes = addGlobalAttributes(); - globalAttributes.forEach((globalAttribute) => { - let resolvedTypes; - if (Array.isArray(globalAttribute.types)) { - resolvedTypes = globalAttribute.types; - } else if (globalAttribute.types === "*") { - resolvedTypes = allExtensionTypes; - } else if (globalAttribute.types === "nodes") { - resolvedTypes = nodeExtensionTypes; - } else if (globalAttribute.types === "marks") { - resolvedTypes = markExtensionTypes; - } else { - resolvedTypes = []; - } - resolvedTypes.forEach((type) => { - Object.entries(globalAttribute.attributes).forEach(([name, attribute]) => { - extensionAttributes.push({ - type, - name, - attribute: { - ...defaultAttribute, - ...attribute - } - }); - }); - }); - }); - }); - nodeAndMarkExtensions.forEach((extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage - }; - const addAttributes = getExtensionField(extension, "addAttributes", context); - if (!addAttributes) { - return; - } - const attributes = addAttributes(); - Object.entries(attributes).forEach(([name, attribute]) => { - const mergedAttr = { - ...defaultAttribute, - ...attribute - }; - if (typeof (mergedAttr == null ? void 0 : mergedAttr.default) === "function") { - mergedAttr.default = mergedAttr.default(); - } - if ((mergedAttr == null ? void 0 : mergedAttr.isRequired) && (mergedAttr == null ? void 0 : mergedAttr.default) === void 0) { - delete mergedAttr.default; - } - extensionAttributes.push({ - type: extension.name, - name, - attribute: mergedAttr - }); - }); - }); - return extensionAttributes; -} - -// src/utilities/mergeAttributes.ts -function splitStyleDeclarations(styles) { - const result = []; - let current = ""; - let inSingleQuote = false; - let inDoubleQuote = false; - let parenDepth = 0; - const length = styles.length; - for (let i = 0; i < length; i += 1) { - const char = styles[i]; - if (char === "'" && !inDoubleQuote) { - inSingleQuote = !inSingleQuote; - current += char; - continue; - } - if (char === '"' && !inSingleQuote) { - inDoubleQuote = !inDoubleQuote; - current += char; - continue; - } - if (!inSingleQuote && !inDoubleQuote) { - if (char === "(") { - parenDepth += 1; - current += char; - continue; - } - if (char === ")" && parenDepth > 0) { - parenDepth -= 1; - current += char; - continue; - } - if (char === ";" && parenDepth === 0) { - result.push(current); - current = ""; - continue; - } - } - current += char; - } - if (current) { - result.push(current); - } - return result; -} -function parseStyleEntries(styles) { - const pairs = []; - const declarations = splitStyleDeclarations(styles || ""); - const numDeclarations = declarations.length; - for (let i = 0; i < numDeclarations; i += 1) { - const declaration = declarations[i]; - const firstColonIndex = declaration.indexOf(":"); - if (firstColonIndex === -1) { - continue; - } - const property = declaration.slice(0, firstColonIndex).trim(); - const value = declaration.slice(firstColonIndex + 1).trim(); - if (property && value) { - pairs.push([property, value]); - } - } - return pairs; -} -function mergeAttributes(...objects) { - return objects.filter((item) => !!item).reduce((items, item) => { - const mergedAttributes = { ...items }; - Object.entries(item).forEach(([key, value]) => { - const exists = mergedAttributes[key]; - if (!exists) { - mergedAttributes[key] = value; - return; - } - if (key === "class") { - const valueClasses = value ? String(value).split(" ") : []; - const existingClasses = mergedAttributes[key] ? mergedAttributes[key].split(" ") : []; - const insertClasses = valueClasses.filter( - (valueClass) => !existingClasses.includes(valueClass) - ); - mergedAttributes[key] = [...existingClasses, ...insertClasses].join(" "); - } else if (key === "style") { - const styleMap = new Map([ - ...parseStyleEntries(mergedAttributes[key]), - ...parseStyleEntries(value) - ]); - mergedAttributes[key] = Array.from(styleMap.entries()).map(([property, val]) => `${property}: ${val}`).join("; "); - } else { - mergedAttributes[key] = value; - } - }); - return mergedAttributes; - }, {}); -} - -// src/helpers/getRenderedAttributes.ts -function getRenderedAttributes(nodeOrMark, extensionAttributes) { - return extensionAttributes.filter((attribute) => attribute.type === nodeOrMark.type.name).filter((item) => item.attribute.rendered).map((item) => { - if (!item.attribute.renderHTML) { - return { - [item.name]: nodeOrMark.attrs[item.name] - }; - } - return item.attribute.renderHTML(nodeOrMark.attrs) || {}; - }).reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {}); -} - -// src/utilities/fromString.ts -function fromString(value) { - if (typeof value !== "string") { - return value; - } - if (value.match(/^[+-]?(?:\d*\.)?\d+$/)) { - return Number(value); - } - if (value === "true") { - return true; - } - if (value === "false") { - return false; - } - return value; -} - -// src/helpers/injectExtensionAttributesToParseRule.ts -function injectExtensionAttributesToParseRule(parseRule, extensionAttributes) { - if ("style" in parseRule) { - return parseRule; - } - return { - ...parseRule, - getAttrs: (node) => { - const oldAttributes = parseRule.getAttrs ? parseRule.getAttrs(node) : parseRule.attrs; - if (oldAttributes === false) { - return false; - } - const newAttributes = extensionAttributes.reduce((items, item) => { - const value = item.attribute.parseHTML ? item.attribute.parseHTML(node) : fromString(node.getAttribute(item.name)); - if (value === null || value === void 0) { - return items; - } - return { - ...items, - [item.name]: value - }; - }, {}); - return { ...oldAttributes, ...newAttributes }; - } - }; -} - -// src/helpers/getSchemaByResolvedExtensions.ts -function cleanUpSchemaItem(data) { - return Object.fromEntries( - // @ts-ignore - Object.entries(data).filter(([key, value]) => { - if (key === "attrs" && isEmptyObject(value)) { - return false; - } - return value !== null && value !== void 0; - }) - ); -} -function buildAttributeSpec(extensionAttribute) { - var _a, _b; - const spec = {}; - if (!((_a = extensionAttribute == null ? void 0 : extensionAttribute.attribute) == null ? void 0 : _a.isRequired) && "default" in ((extensionAttribute == null ? void 0 : extensionAttribute.attribute) || {})) { - spec.default = extensionAttribute.attribute.default; - } - if (((_b = extensionAttribute == null ? void 0 : extensionAttribute.attribute) == null ? void 0 : _b.validate) !== void 0) { - spec.validate = extensionAttribute.attribute.validate; - } - return [extensionAttribute.name, spec]; -} -function getSchemaByResolvedExtensions(extensions, editor) { - var _a; - const allAttributes = getAttributesFromExtensions(extensions); - const { nodeExtensions, markExtensions } = splitExtensions(extensions); - const topNode = (_a = nodeExtensions.find((extension) => getExtensionField(extension, "topNode"))) == null ? void 0 : _a.name; - const nodes = Object.fromEntries( - nodeExtensions.map((extension) => { - const extensionAttributes = allAttributes.filter( - (attribute) => attribute.type === extension.name - ); - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - editor - }; - const extraNodeFields = extensions.reduce((fields, e) => { - const extendNodeSchema = getExtensionField( - e, - "extendNodeSchema", - context - ); - return { - ...fields, - ...extendNodeSchema ? extendNodeSchema(extension) : {} - }; - }, {}); - const schema = cleanUpSchemaItem({ - ...extraNodeFields, - content: callOrReturn( - getExtensionField(extension, "content", context) - ), - marks: callOrReturn(getExtensionField(extension, "marks", context)), - group: callOrReturn(getExtensionField(extension, "group", context)), - inline: callOrReturn(getExtensionField(extension, "inline", context)), - atom: callOrReturn(getExtensionField(extension, "atom", context)), - selectable: callOrReturn( - getExtensionField(extension, "selectable", context) - ), - draggable: callOrReturn( - getExtensionField(extension, "draggable", context) - ), - code: callOrReturn(getExtensionField(extension, "code", context)), - whitespace: callOrReturn( - getExtensionField(extension, "whitespace", context) - ), - linebreakReplacement: callOrReturn( - getExtensionField( - extension, - "linebreakReplacement", - context - ) - ), - defining: callOrReturn( - getExtensionField(extension, "defining", context) - ), - isolating: callOrReturn( - getExtensionField(extension, "isolating", context) - ), - attrs: Object.fromEntries(extensionAttributes.map(buildAttributeSpec)) - }); - const parseHTML = callOrReturn( - getExtensionField(extension, "parseHTML", context) - ); - if (parseHTML) { - schema.parseDOM = parseHTML.map( - (parseRule) => injectExtensionAttributesToParseRule(parseRule, extensionAttributes) - ); - } - const renderHTML = getExtensionField( - extension, - "renderHTML", - context - ); - if (renderHTML) { - schema.toDOM = (node) => renderHTML({ - node, - HTMLAttributes: getRenderedAttributes(node, extensionAttributes) - }); - } - const renderText = getExtensionField( - extension, - "renderText", - context - ); - if (renderText) { - schema.toText = renderText; - } - return [extension.name, schema]; - }) - ); - const marks = Object.fromEntries( - markExtensions.map((extension) => { - const extensionAttributes = allAttributes.filter( - (attribute) => attribute.type === extension.name - ); - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - editor - }; - const extraMarkFields = extensions.reduce((fields, e) => { - const extendMarkSchema = getExtensionField( - e, - "extendMarkSchema", - context - ); - return { - ...fields, - ...extendMarkSchema ? extendMarkSchema(extension) : {} - }; - }, {}); - const schema = cleanUpSchemaItem({ - ...extraMarkFields, - inclusive: callOrReturn( - getExtensionField(extension, "inclusive", context) - ), - excludes: callOrReturn( - getExtensionField(extension, "excludes", context) - ), - group: callOrReturn(getExtensionField(extension, "group", context)), - spanning: callOrReturn( - getExtensionField(extension, "spanning", context) - ), - code: callOrReturn(getExtensionField(extension, "code", context)), - attrs: Object.fromEntries(extensionAttributes.map(buildAttributeSpec)) - }); - const parseHTML = callOrReturn( - getExtensionField(extension, "parseHTML", context) - ); - if (parseHTML) { - schema.parseDOM = parseHTML.map( - (parseRule) => injectExtensionAttributesToParseRule(parseRule, extensionAttributes) - ); - } - const renderHTML = getExtensionField( - extension, - "renderHTML", - context - ); - if (renderHTML) { - schema.toDOM = (mark) => renderHTML({ - mark, - HTMLAttributes: getRenderedAttributes(mark, extensionAttributes) - }); - } - return [extension.name, schema]; - }) - ); - return new Schema2({ - topNode, - nodes, - marks - }); -} - -// src/utilities/findDuplicates.ts -function findDuplicates(items) { - const filtered = items.filter((el, index) => items.indexOf(el) !== index); - return Array.from(new Set(filtered)); -} - -// src/helpers/sortExtensions.ts -function sortExtensions(extensions) { - const defaultPriority = 100; - return extensions.sort((a, b) => { - const priorityA = getExtensionField(a, "priority") || defaultPriority; - const priorityB = getExtensionField(b, "priority") || defaultPriority; - if (priorityA > priorityB) { - return -1; - } - if (priorityA < priorityB) { - return 1; - } - return 0; - }); -} - -// src/helpers/resolveExtensions.ts -function resolveExtensions(extensions) { - const resolvedExtensions = sortExtensions(flattenExtensions(extensions)); - const duplicatedNames = findDuplicates(resolvedExtensions.map((extension) => extension.name)); - if (duplicatedNames.length) { - console.warn( - `[tiptap warn]: Duplicate extension names found: [${duplicatedNames.map((item) => `'${item}'`).join(", ")}]. This can lead to issues.` - ); - } - return resolvedExtensions; -} - -// src/helpers/getSchema.ts -function getSchema(extensions, editor) { - const resolvedExtensions = resolveExtensions(extensions); - return getSchemaByResolvedExtensions(resolvedExtensions, editor); -} - -// src/helpers/generateHTML.ts -function generateHTML(doc, extensions) { - const schema = getSchema(extensions); - const contentNode = Node.fromJSON(schema, doc); - return getHTMLFromFragment(contentNode.content, schema); -} - -// src/helpers/generateJSON.ts -import { DOMParser as DOMParser2 } from "@tiptap/pm/model"; -function generateJSON(html, extensions) { - const schema = getSchema(extensions); - const dom = elementFromString(html); - return DOMParser2.fromSchema(schema).parse(dom).toJSON(); -} - -// src/helpers/generateText.ts -import { Node as Node2 } from "@tiptap/pm/model"; - -// src/helpers/getTextBetween.ts -function getTextBetween(startNode, range, options) { - const { from, to } = range; - const { blockSeparator = "\n\n", textSerializers = {} } = options || {}; - let text = ""; - startNode.nodesBetween(from, to, (node, pos, parent, index) => { - var _a; - if (node.isBlock && pos > from) { - text += blockSeparator; - } - const textSerializer = textSerializers == null ? void 0 : textSerializers[node.type.name]; - if (textSerializer) { - if (parent) { - text += textSerializer({ - node, - pos, - parent, - index, - range - }); - } - return false; - } - if (node.isText) { - text += (_a = node == null ? void 0 : node.text) == null ? void 0 : _a.slice(Math.max(from, pos) - pos, to - pos); - } - }); - return text; -} - -// src/helpers/getText.ts -function getText(node, options) { - const range = { - from: 0, - to: node.content.size - }; - return getTextBetween(node, range, options); -} - -// src/helpers/getTextSerializersFromSchema.ts -function getTextSerializersFromSchema(schema) { - return Object.fromEntries( - Object.entries(schema.nodes).filter(([, node]) => node.spec.toText).map(([name, node]) => [name, node.spec.toText]) - ); -} - -// src/helpers/generateText.ts -function generateText(doc, extensions, options) { - const { blockSeparator = "\n\n", textSerializers = {} } = options || {}; - const schema = getSchema(extensions); - const contentNode = Node2.fromJSON(schema, doc); - return getText(contentNode, { - blockSeparator, - textSerializers: { - ...getTextSerializersFromSchema(schema), - ...textSerializers - } - }); -} - -// src/helpers/getNodeAttributes.ts -function getNodeAttributes(state, typeOrName) { - const type = getNodeType(typeOrName, state.schema); - const { from, to } = state.selection; - const nodes = []; - state.doc.nodesBetween(from, to, (node2) => { - nodes.push(node2); - }); - const node = nodes.reverse().find((nodeItem) => nodeItem.type.name === type.name); - if (!node) { - return {}; - } - return { ...node.attrs }; -} - -// src/helpers/getAttributes.ts -function getAttributes(state, typeOrName) { - const schemaType = getSchemaTypeNameByName( - typeof typeOrName === "string" ? typeOrName : typeOrName.name, - state.schema - ); - if (schemaType === "node") { - return getNodeAttributes(state, typeOrName); - } - if (schemaType === "mark") { - return getMarkAttributes(state, typeOrName); - } - return {}; -} - -// src/utilities/removeDuplicates.ts -function removeDuplicates(array, by = JSON.stringify) { - const seen = {}; - return array.filter((item) => { - const key = by(item); - return Object.prototype.hasOwnProperty.call(seen, key) ? false : seen[key] = true; - }); -} - -// src/helpers/getChangedRanges.ts -function simplifyChangedRanges(changes) { - const uniqueChanges = removeDuplicates(changes); - return uniqueChanges.length === 1 ? uniqueChanges : uniqueChanges.filter((change, index) => { - const rest = uniqueChanges.filter((_, i) => i !== index); - return !rest.some((otherChange) => { - return change.oldRange.from >= otherChange.oldRange.from && change.oldRange.to <= otherChange.oldRange.to && change.newRange.from >= otherChange.newRange.from && change.newRange.to <= otherChange.newRange.to; - }); - }); -} -function getChangedRanges(transform) { - const { mapping, steps } = transform; - const changes = []; - mapping.maps.forEach((stepMap, index) => { - const ranges = []; - if (!stepMap.ranges.length) { - const { from, to } = steps[index]; - if (from === void 0 || to === void 0) { - return; - } - ranges.push({ from, to }); - } else { - stepMap.forEach((from, to) => { - ranges.push({ from, to }); - }); - } - ranges.forEach(({ from, to }) => { - const newStart = mapping.slice(index).map(from, -1); - const newEnd = mapping.slice(index).map(to); - const oldStart = mapping.invert().map(newStart, -1); - const oldEnd = mapping.invert().map(newEnd); - changes.push({ - oldRange: { - from: oldStart, - to: oldEnd - }, - newRange: { - from: newStart, - to: newEnd - } - }); - }); - }); - return simplifyChangedRanges(changes); -} - -// src/helpers/getDebugJSON.ts -function getDebugJSON(node, startOffset = 0) { - const isTopNode = node.type === node.type.schema.topNodeType; - const increment = isTopNode ? 0 : 1; - const from = startOffset; - const to = from + node.nodeSize; - const marks = node.marks.map((mark) => { - const output2 = { - type: mark.type.name - }; - if (Object.keys(mark.attrs).length) { - output2.attrs = { ...mark.attrs }; - } - return output2; - }); - const attrs = { ...node.attrs }; - const output = { - type: node.type.name, - from, - to - }; - if (Object.keys(attrs).length) { - output.attrs = attrs; - } - if (marks.length) { - output.marks = marks; - } - if (node.content.childCount) { - output.content = []; - node.forEach((child, offset) => { - var _a; - (_a = output.content) == null ? void 0 : _a.push(getDebugJSON(child, startOffset + offset + increment)); - }); - } - if (node.text) { - output.text = node.text; - } - return output; -} - -// src/helpers/getMarksBetween.ts -function getMarksBetween(from, to, doc) { - const marks = []; - if (from === to) { - doc.resolve(from).marks().forEach((mark) => { - const $pos = doc.resolve(from); - const range = getMarkRange($pos, mark.type); - if (!range) { - return; - } - marks.push({ - mark, - ...range - }); - }); - } else { - doc.nodesBetween(from, to, (node, pos) => { - if (!node || (node == null ? void 0 : node.nodeSize) === void 0) { - return; - } - marks.push( - ...node.marks.map((mark) => ({ - from: pos, - to: pos + node.nodeSize, - mark - })) - ); - }); - } - return marks; -} - -// src/helpers/getNodeAtPosition.ts -var getNodeAtPosition = (state, typeOrName, pos, maxDepth = 20) => { - const $pos = state.doc.resolve(pos); - let currentDepth = maxDepth; - let node = null; - while (currentDepth > 0 && node === null) { - const currentNode = $pos.node(currentDepth); - if ((currentNode == null ? void 0 : currentNode.type.name) === typeOrName) { - node = currentNode; - } else { - currentDepth -= 1; - } - } - return [node, currentDepth]; -}; - -// src/helpers/getSchemaTypeByName.ts -function getSchemaTypeByName(name, schema) { - return schema.nodes[name] || schema.marks[name] || null; -} - -// src/helpers/getSplittedAttributes.ts -function getSplittedAttributes(extensionAttributes, typeName, attributes) { - return Object.fromEntries( - Object.entries(attributes).filter(([name]) => { - const extensionAttribute = extensionAttributes.find((item) => { - return item.type === typeName && item.name === name; - }); - if (!extensionAttribute) { - return false; - } - return extensionAttribute.attribute.keepOnSplit; - }) - ); -} - -// src/helpers/getTextContentFromNodes.ts -var getTextContentFromNodes = ($from, maxMatch = 500) => { - let textBefore = ""; - const sliceEndPos = $from.parentOffset; - $from.parent.nodesBetween( - Math.max(0, sliceEndPos - maxMatch), - sliceEndPos, - (node, pos, parent, index) => { - var _a, _b; - const chunk = ((_b = (_a = node.type.spec).toText) == null ? void 0 : _b.call(_a, { - node, - pos, - parent, - index - })) || node.textContent || "%leaf%"; - textBefore += node.isAtom && !node.isText ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos)); - } - ); - return textBefore; -}; - -// src/helpers/isMarkActive.ts -function isMarkActive(state, typeOrName, attributes = {}) { - const { empty, ranges } = state.selection; - const type = typeOrName ? getMarkType(typeOrName, state.schema) : null; - if (empty) { - return !!(state.storedMarks || state.selection.$from.marks()).filter((mark) => { - if (!type) { - return true; - } - return type.name === mark.type.name; - }).find((mark) => objectIncludes(mark.attrs, attributes, { strict: false })); - } - let selectionRange = 0; - const markRanges = []; - ranges.forEach(({ $from, $to }) => { - const from = $from.pos; - const to = $to.pos; - state.doc.nodesBetween(from, to, (node, pos) => { - if (type && node.inlineContent && !node.type.allowsMarkType(type)) { - return false; - } - if (!node.isText && !node.marks.length) { - return; - } - const relativeFrom = Math.max(from, pos); - const relativeTo = Math.min(to, pos + node.nodeSize); - const range2 = relativeTo - relativeFrom; - selectionRange += range2; - markRanges.push( - ...node.marks.map((mark) => ({ - mark, - from: relativeFrom, - to: relativeTo - })) - ); - }); - }); - if (selectionRange === 0) { - return false; - } - const matchedRange = markRanges.filter((markRange) => { - if (!type) { - return true; - } - return type.name === markRange.mark.type.name; - }).filter((markRange) => objectIncludes(markRange.mark.attrs, attributes, { strict: false })).reduce((sum, markRange) => sum + markRange.to - markRange.from, 0); - const excludedRange = markRanges.filter((markRange) => { - if (!type) { - return true; - } - return markRange.mark.type !== type && markRange.mark.type.excludes(type); - }).reduce((sum, markRange) => sum + markRange.to - markRange.from, 0); - const range = matchedRange > 0 ? matchedRange + excludedRange : matchedRange; - return range >= selectionRange; -} - -// src/helpers/isActive.ts -function isActive(state, name, attributes = {}) { - if (!name) { - return isNodeActive(state, null, attributes) || isMarkActive(state, null, attributes); - } - const schemaType = getSchemaTypeNameByName(name, state.schema); - if (schemaType === "node") { - return isNodeActive(state, name, attributes); - } - if (schemaType === "mark") { - return isMarkActive(state, name, attributes); - } - return false; -} - -// src/helpers/isAtEndOfNode.ts -var isAtEndOfNode = (state, nodeType) => { - const { $from, $to, $anchor } = state.selection; - if (nodeType) { - const parentNode = findParentNode((node) => node.type.name === nodeType)(state.selection); - if (!parentNode) { - return false; - } - const $parentPos = state.doc.resolve(parentNode.pos + 1); - if ($anchor.pos + 1 === $parentPos.end()) { - return true; - } - return false; - } - if ($to.parentOffset < $to.parent.nodeSize - 2 || $from.pos !== $to.pos) { - return false; - } - return true; -}; - -// src/helpers/isAtStartOfNode.ts -var isAtStartOfNode = (state) => { - const { $from, $to } = state.selection; - if ($from.parentOffset > 0 || $from.pos !== $to.pos) { - return false; - } - return true; -}; - -// src/helpers/isExtensionRulesEnabled.ts -function isExtensionRulesEnabled(extension, enabled) { - if (Array.isArray(enabled)) { - return enabled.some((enabledExtension) => { - const name = typeof enabledExtension === "string" ? enabledExtension : enabledExtension.name; - return name === extension.name; - }); - } - return enabled; -} - -// src/helpers/isList.ts -function isList(name, extensions) { - const { nodeExtensions } = splitExtensions(extensions); - const extension = nodeExtensions.find((item) => item.name === name); - if (!extension) { - return false; - } - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage - }; - const group = callOrReturn(getExtensionField(extension, "group", context)); - if (typeof group !== "string") { - return false; - } - return group.split(" ").includes("list"); -} - -// src/helpers/isNodeEmpty.ts -function isNodeEmpty(node, { - checkChildren = true, - ignoreWhitespace = false -} = {}) { - var _a; - if (ignoreWhitespace) { - if (node.type.name === "hardBreak") { - return true; - } - if (node.isText) { - return !/\S/.test((_a = node.text) != null ? _a : ""); - } - } - if (node.isText) { - return !node.text; - } - if (node.isAtom || node.isLeaf) { - return false; - } - if (node.content.childCount === 0) { - return true; - } - if (checkChildren) { - let isContentEmpty = true; - node.content.forEach((childNode) => { - if (isContentEmpty === false) { - return; - } - if (!isNodeEmpty(childNode, { ignoreWhitespace, checkChildren })) { - isContentEmpty = false; - } - }); - return isContentEmpty; - } - return false; -} - -// src/helpers/isNodeSelection.ts -import { NodeSelection } from "@tiptap/pm/state"; -function isNodeSelection(value) { - return value instanceof NodeSelection; -} - -// src/helpers/isNodeViewSelected.ts -function isNodeViewSelected({ - selection, - pos, - nodeSize, - selectedOnTextSelection = false -}) { - const { from, to } = selection; - if (from <= pos && to >= pos + nodeSize) { - return true; - } - if (selectedOnTextSelection && isTextSelection(selection) && from > pos && to < pos + nodeSize) { - return true; - } - return false; -} - -// src/helpers/MappablePosition.ts -var MappablePosition = class _MappablePosition { - constructor(position) { - this.position = position; - } - /** - * Creates a MappablePosition from a JSON object. - */ - static fromJSON(json) { - return new _MappablePosition(json.position); - } - /** - * Converts the MappablePosition to a JSON object. - */ - toJSON() { - return { - position: this.position - }; - } -}; -function getUpdatedPosition(position, transaction) { - const mapResult = transaction.mapping.mapResult(position.position); - return { - position: new MappablePosition(mapResult.pos), - mapResult - }; -} -function createMappablePosition(position) { - return new MappablePosition(position); -} - -// src/helpers/posToDOMRect.ts -function posToDOMRect(view, from, to) { - const minPos = 0; - const maxPos = view.state.doc.content.size; - const resolvedFrom = minMax(from, minPos, maxPos); - const resolvedEnd = minMax(to, minPos, maxPos); - const start = view.coordsAtPos(resolvedFrom); - const end = view.coordsAtPos(resolvedEnd, -1); - const top = Math.min(start.top, end.top); - const bottom = Math.max(start.bottom, end.bottom); - const left = Math.min(start.left, end.left); - const right = Math.max(start.right, end.right); - const width = right - left; - const height = bottom - top; - const x = left; - const y = top; - const data = { - top, - bottom, - left, - right, - width, - height, - x, - y - }; - return { - ...data, - toJSON: () => data - }; -} - -// src/helpers/rewriteUnknownContent.ts -function rewriteUnknownContentInner({ - json, - validMarks, - validNodes, - options, - rewrittenContent = [] -}) { - if (json.marks && Array.isArray(json.marks)) { - json.marks = json.marks.filter((mark) => { - const name = typeof mark === "string" ? mark : mark.type; - if (validMarks.has(name)) { - return true; - } - rewrittenContent.push({ - original: JSON.parse(JSON.stringify(mark)), - unsupported: name - }); - return false; - }); - } - if (json.content && Array.isArray(json.content)) { - json.content = json.content.map( - (value) => rewriteUnknownContentInner({ - json: value, - validMarks, - validNodes, - options, - rewrittenContent - }).json - ).filter((a) => a !== null && a !== void 0); - } - if (json.type && !validNodes.has(json.type)) { - rewrittenContent.push({ - original: JSON.parse(JSON.stringify(json)), - unsupported: json.type - }); - if (json.content && Array.isArray(json.content) && (options == null ? void 0 : options.fallbackToParagraph) !== false) { - json.type = "paragraph"; - return { - json, - rewrittenContent - }; - } - return { - json: null, - rewrittenContent - }; - } - return { json, rewrittenContent }; -} -function rewriteUnknownContent(json, schema, options) { - return rewriteUnknownContentInner({ - json, - validNodes: new Set(Object.keys(schema.nodes)), - validMarks: new Set(Object.keys(schema.marks)), - options - }); -} - -// src/commands/setMark.ts -function canSetMark(state, tr, newMarkType) { - var _a; - const { selection } = tr; - let cursor = null; - if (isTextSelection(selection)) { - cursor = selection.$cursor; - } - if (cursor) { - const currentMarks = (_a = state.storedMarks) != null ? _a : cursor.marks(); - const parentAllowsMarkType = cursor.parent.type.allowsMarkType(newMarkType); - return parentAllowsMarkType && (!!newMarkType.isInSet(currentMarks) || !currentMarks.some((mark) => mark.type.excludes(newMarkType))); - } - const { ranges } = selection; - return ranges.some(({ $from, $to }) => { - let someNodeSupportsMark = $from.depth === 0 ? state.doc.inlineContent && state.doc.type.allowsMarkType(newMarkType) : false; - state.doc.nodesBetween($from.pos, $to.pos, (node, _pos, parent) => { - if (someNodeSupportsMark) { - return false; - } - if (node.isInline) { - const parentAllowsMarkType = !parent || parent.type.allowsMarkType(newMarkType); - const currentMarksAllowMarkType = !!newMarkType.isInSet(node.marks) || !node.marks.some((otherMark) => otherMark.type.excludes(newMarkType)); - someNodeSupportsMark = parentAllowsMarkType && currentMarksAllowMarkType; - } - return !someNodeSupportsMark; - }); - return someNodeSupportsMark; - }); -} -var setMark = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => { - const { selection } = tr; - const { empty, ranges } = selection; - const type = getMarkType(typeOrName, state.schema); - if (dispatch) { - if (empty) { - const oldAttributes = getMarkAttributes(state, type); - tr.addStoredMark( - type.create({ - ...oldAttributes, - ...attributes - }) - ); - } else { - ranges.forEach((range) => { - const from = range.$from.pos; - const to = range.$to.pos; - state.doc.nodesBetween(from, to, (node, pos) => { - const trimmedFrom = Math.max(pos, from); - const trimmedTo = Math.min(pos + node.nodeSize, to); - const someHasMark = node.marks.find((mark) => mark.type === type); - if (someHasMark) { - node.marks.forEach((mark) => { - if (type === mark.type) { - tr.addMark( - trimmedFrom, - trimmedTo, - type.create({ - ...mark.attrs, - ...attributes - }) - ); - } - }); - } else { - tr.addMark(trimmedFrom, trimmedTo, type.create(attributes)); - } - }); - }); - } - } - return canSetMark(state, tr, type); -}; - -// src/commands/setMeta.ts -var setMeta = (key, value) => ({ tr }) => { - tr.setMeta(key, value); - return true; -}; - -// src/commands/setNode.ts -import { setBlockType } from "@tiptap/pm/commands"; -var setNode = (typeOrName, attributes = {}) => ({ state, dispatch, chain }) => { - const type = getNodeType(typeOrName, state.schema); - let attributesToCopy; - if (state.selection.$anchor.sameParent(state.selection.$head)) { - attributesToCopy = state.selection.$anchor.parent.attrs; - } - if (!type.isTextblock) { - console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'); - return false; - } - return chain().command(({ commands }) => { - const canSetBlock = setBlockType(type, { ...attributesToCopy, ...attributes })(state); - if (canSetBlock) { - return true; - } - return commands.clearNodes(); - }).command(({ state: updatedState }) => { - return setBlockType(type, { ...attributesToCopy, ...attributes })(updatedState, dispatch); - }).run(); -}; - -// src/commands/setNodeSelection.ts -import { NodeSelection as NodeSelection2 } from "@tiptap/pm/state"; -var setNodeSelection = (position) => ({ tr, dispatch }) => { - if (dispatch) { - const { doc } = tr; - const from = minMax(position, 0, doc.content.size); - const selection = NodeSelection2.create(doc, from); - tr.setSelection(selection); - } - return true; -}; - -// src/commands/setTextDirection.ts -var setTextDirection = (direction, position) => ({ tr, state, dispatch }) => { - const { selection } = state; - let from; - let to; - if (typeof position === "number") { - from = position; - to = position; - } else if (position && "from" in position && "to" in position) { - from = position.from; - to = position.to; - } else { - from = selection.from; - to = selection.to; - } - if (dispatch) { - tr.doc.nodesBetween(from, to, (node, pos) => { - if (node.isText) { - return; - } - tr.setNodeMarkup(pos, void 0, { - ...node.attrs, - dir: direction - }); - }); - } - return true; -}; - -// src/commands/setTextSelection.ts -import { TextSelection as TextSelection5 } from "@tiptap/pm/state"; -var setTextSelection = (position) => ({ tr, dispatch }) => { - if (dispatch) { - const { doc } = tr; - const { from, to } = typeof position === "number" ? { from: position, to: position } : position; - const minPos = TextSelection5.atStart(doc).from; - const maxPos = TextSelection5.atEnd(doc).to; - const resolvedFrom = minMax(from, minPos, maxPos); - const resolvedEnd = minMax(to, minPos, maxPos); - const selection = TextSelection5.create(doc, resolvedFrom, resolvedEnd); - tr.setSelection(selection); - } - return true; -}; - -// src/commands/sinkListItem.ts -import { sinkListItem as originalSinkListItem } from "@tiptap/pm/schema-list"; -var sinkListItem = (typeOrName) => ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - return originalSinkListItem(type)(state, dispatch); -}; - -// src/commands/splitBlock.ts -import { NodeSelection as NodeSelection3, TextSelection as TextSelection6 } from "@tiptap/pm/state"; -import { canSplit } from "@tiptap/pm/transform"; -function ensureMarks(state, splittableMarks) { - const marks = state.storedMarks || state.selection.$to.parentOffset && state.selection.$from.marks(); - if (marks) { - const filteredMarks = marks.filter((mark) => splittableMarks == null ? void 0 : splittableMarks.includes(mark.type.name)); - state.tr.ensureMarks(filteredMarks); - } -} -var splitBlock = ({ keepMarks = true } = {}) => ({ tr, state, dispatch, editor }) => { - const { selection, doc } = tr; - const { $from, $to } = selection; - const extensionAttributes = editor.extensionManager.attributes; - const newAttributes = getSplittedAttributes( - extensionAttributes, - $from.node().type.name, - $from.node().attrs - ); - if (selection instanceof NodeSelection3 && selection.node.isBlock) { - if (!$from.parentOffset || !canSplit(doc, $from.pos)) { - return false; - } - if (dispatch) { - if (keepMarks) { - ensureMarks(state, editor.extensionManager.splittableMarks); - } - tr.split($from.pos).scrollIntoView(); - } - return true; - } - if (!$from.parent.isBlock) { - return false; - } - const atEnd = $to.parentOffset === $to.parent.content.size; - const deflt = $from.depth === 0 ? void 0 : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1))); - let types = atEnd && deflt ? [ - { - type: deflt, - attrs: newAttributes - } - ] : void 0; - let can = canSplit(tr.doc, tr.mapping.map($from.pos), 1, types); - if (!types && !can && canSplit(tr.doc, tr.mapping.map($from.pos), 1, deflt ? [{ type: deflt }] : void 0)) { - can = true; - types = deflt ? [ - { - type: deflt, - attrs: newAttributes - } - ] : void 0; - } - if (dispatch) { - if (can) { - if (selection instanceof TextSelection6) { - tr.deleteSelection(); - } - tr.split(tr.mapping.map($from.pos), 1, types); - if (deflt && !atEnd && !$from.parentOffset && $from.parent.type !== deflt) { - const first2 = tr.mapping.map($from.before()); - const $first = tr.doc.resolve(first2); - if ($from.node(-1).canReplaceWith($first.index(), $first.index() + 1, deflt)) { - tr.setNodeMarkup(tr.mapping.map($from.before()), deflt); - } - } - } - if (keepMarks) { - ensureMarks(state, editor.extensionManager.splittableMarks); - } - tr.scrollIntoView(); - } - return can; -}; - -// src/commands/splitListItem.ts -import { Fragment as Fragment3, Slice } from "@tiptap/pm/model"; -import { TextSelection as TextSelection7 } from "@tiptap/pm/state"; -import { canSplit as canSplit2 } from "@tiptap/pm/transform"; -var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr, state, dispatch, editor }) => { - var _a; - const type = getNodeType(typeOrName, state.schema); - const { $from, $to } = state.selection; - const node = state.selection.node; - if (node && node.isBlock || $from.depth < 2 || !$from.sameParent($to)) { - return false; - } - const grandParent = $from.node(-1); - if (grandParent.type !== type) { - return false; - } - const extensionAttributes = editor.extensionManager.attributes; - if ($from.parent.content.size === 0 && $from.node(-1).childCount === $from.indexAfter(-1)) { - if ($from.depth === 2 || $from.node(-3).type !== type || $from.index(-2) !== $from.node(-2).childCount - 1) { - return false; - } - if (dispatch) { - let wrap = Fragment3.empty; - const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3; - for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d -= 1) { - wrap = Fragment3.from($from.node(d).copy(wrap)); - } - const depthAfter = ( - // oxlint-disable-next-line no-nested-ternary - $from.indexAfter(-1) < $from.node(-2).childCount ? 1 : $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3 - ); - const newNextTypeAttributes2 = { - ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs), - ...overrideAttrs - }; - const nextType2 = ((_a = type.contentMatch.defaultType) == null ? void 0 : _a.createAndFill(newNextTypeAttributes2)) || void 0; - wrap = wrap.append(Fragment3.from(type.createAndFill(null, nextType2) || void 0)); - const start = $from.before($from.depth - (depthBefore - 1)); - tr.replace(start, $from.after(-depthAfter), new Slice(wrap, 4 - depthBefore, 0)); - let sel = -1; - tr.doc.nodesBetween(start, tr.doc.content.size, (n, pos) => { - if (sel > -1) { - return false; - } - if (n.isTextblock && n.content.size === 0) { - sel = pos + 1; - } - }); - if (sel > -1) { - tr.setSelection(TextSelection7.near(tr.doc.resolve(sel))); - } - tr.scrollIntoView(); - } - return true; - } - const nextType = $to.pos === $from.end() ? grandParent.contentMatchAt(0).defaultType : null; - const newTypeAttributes = { - ...getSplittedAttributes(extensionAttributes, grandParent.type.name, grandParent.attrs), - ...overrideAttrs - }; - const newNextTypeAttributes = { - ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs), - ...overrideAttrs - }; - tr.delete($from.pos, $to.pos); - const types = nextType ? [ - { type, attrs: newTypeAttributes }, - { type: nextType, attrs: newNextTypeAttributes } - ] : [{ type, attrs: newTypeAttributes }]; - if (!canSplit2(tr.doc, $from.pos, 2)) { - return false; - } - if (dispatch) { - const { selection, storedMarks } = state; - const { splittableMarks } = editor.extensionManager; - const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks(); - tr.split($from.pos, 2, types).scrollIntoView(); - if (!marks || !dispatch) { - return true; - } - const filteredMarks = marks.filter((mark) => splittableMarks.includes(mark.type.name)); - tr.ensureMarks(filteredMarks); - } - return true; -}; - -// src/commands/toggleList.ts -import { TextSelection as TextSelection8 } from "@tiptap/pm/state"; -import { canJoin } from "@tiptap/pm/transform"; -var joinListBackwards = (tr, listType) => { - const list = findParentNode((node) => node.type === listType)(tr.selection); - if (!list) { - return true; - } - const before = tr.doc.resolve(Math.max(0, list.pos - 1)).before(list.depth); - if (before === void 0) { - return true; - } - const nodeBefore = tr.doc.nodeAt(before); - const canJoinBackwards = list.node.type === (nodeBefore == null ? void 0 : nodeBefore.type) && canJoin(tr.doc, list.pos); - if (!canJoinBackwards) { - return true; - } - tr.join(list.pos); - return true; -}; -var joinListForwards = (tr, listType) => { - const list = findParentNode((node) => node.type === listType)(tr.selection); - if (!list) { - return true; - } - const after = tr.doc.resolve(list.start).after(list.depth); - if (after === void 0) { - return true; - } - const nodeAfter = tr.doc.nodeAt(after); - const canJoinForwards = list.node.type === (nodeAfter == null ? void 0 : nodeAfter.type) && canJoin(tr.doc, after); - if (!canJoinForwards) { - return true; - } - tr.join(after); - return true; -}; -function createInnerSelectionForWholeDocList(tr) { - const doc = tr.doc; - const list = doc.firstChild; - if (!list) { - return null; - } - const $start = doc.resolve(1); - const $end = doc.resolve(list.nodeSize - 1); - return TextSelection8.between($start, $end); -} -var toggleList = (listTypeOrName, itemTypeOrName, keepMarks, attributes = {}) => ({ editor, tr, state, dispatch, chain, commands, can }) => { - const { extensions, splittableMarks } = editor.extensionManager; - const listType = getNodeType(listTypeOrName, state.schema); - const itemType = getNodeType(itemTypeOrName, state.schema); - const { selection, storedMarks } = state; - const { $from, $to } = selection; - const range = $from.blockRange($to); - const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks(); - if (!range) { - return false; - } - const parentList = findParentNode((node) => isList(node.type.name, extensions))(selection); - const isAllSelection = selection.from === 0 && selection.to === state.doc.content.size; - const topLevelNodes = state.doc.content.content; - const soleTopLevelNode = topLevelNodes.length === 1 ? topLevelNodes[0] : null; - const allSelectionList = isAllSelection && soleTopLevelNode && isList(soleTopLevelNode.type.name, extensions) ? { - node: soleTopLevelNode, - pos: 0, - depth: 0 - } : null; - const currentList = parentList != null ? parentList : allSelectionList; - const isInsideExistingList = !!parentList && range.depth >= 1 && range.depth - parentList.depth <= 1; - const hasWholeDocSelectedList = !!allSelectionList; - if ((isInsideExistingList || hasWholeDocSelectedList) && currentList) { - if (currentList.node.type === listType) { - if (isAllSelection && hasWholeDocSelectedList) { - return chain().command(({ tr: trx, dispatch: disp }) => { - const nextSelection = createInnerSelectionForWholeDocList(trx); - if (!nextSelection) { - return false; - } - trx.setSelection(nextSelection); - if (disp) { - disp(trx); - } - return true; - }).liftListItem(itemType).run(); - } - return commands.liftListItem(itemType); - } - if (isList(currentList.node.type.name, extensions) && listType.validContent(currentList.node.content)) { - return chain().command(() => { - tr.setNodeMarkup(currentList.pos, listType); - return true; - }).command(() => joinListBackwards(tr, listType)).command(() => joinListForwards(tr, listType)).run(); - } - } - if (!keepMarks || !marks || !dispatch) { - return chain().command(() => { - const canWrapInList = can().wrapInList(listType, attributes); - if (canWrapInList) { - return true; - } - return commands.clearNodes(); - }).wrapInList(listType, attributes).command(() => joinListBackwards(tr, listType)).command(() => joinListForwards(tr, listType)).run(); - } - return chain().command(() => { - const canWrapInList = can().wrapInList(listType, attributes); - const filteredMarks = marks.filter((mark) => splittableMarks.includes(mark.type.name)); - tr.ensureMarks(filteredMarks); - if (canWrapInList) { - return true; - } - return commands.clearNodes(); - }).wrapInList(listType, attributes).command(() => joinListBackwards(tr, listType)).command(() => joinListForwards(tr, listType)).run(); -}; - -// src/commands/toggleMark.ts -var toggleMark = (typeOrName, attributes = {}, options = {}) => ({ state, commands }) => { - const { extendEmptyMarkRange = false } = options; - const type = getMarkType(typeOrName, state.schema); - const isActive2 = isMarkActive(state, type, attributes); - if (isActive2) { - return commands.unsetMark(type, { extendEmptyMarkRange }); - } - return commands.setMark(type, attributes); -}; - -// src/commands/toggleNode.ts -var toggleNode = (typeOrName, toggleTypeOrName, attributes = {}) => ({ state, commands }) => { - const type = getNodeType(typeOrName, state.schema); - const toggleType = getNodeType(toggleTypeOrName, state.schema); - const isActive2 = isNodeActive(state, type, attributes); - let attributesToCopy; - if (state.selection.$anchor.sameParent(state.selection.$head)) { - attributesToCopy = state.selection.$anchor.parent.attrs; - } - if (isActive2) { - return commands.setNode(toggleType, attributesToCopy); - } - return commands.setNode(type, { ...attributesToCopy, ...attributes }); -}; - -// src/commands/toggleWrap.ts -var toggleWrap = (typeOrName, attributes = {}) => ({ state, commands }) => { - const type = getNodeType(typeOrName, state.schema); - const isActive2 = isNodeActive(state, type, attributes); - if (isActive2) { - return commands.lift(type); - } - return commands.wrapIn(type, attributes); -}; - -// src/commands/undoInputRule.ts -var undoInputRule = () => ({ state, dispatch }) => { - const plugins = state.plugins; - for (let i = 0; i < plugins.length; i += 1) { - const plugin = plugins[i]; - let undoable; - if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) { - if (dispatch) { - const tr = state.tr; - const toUndo = undoable.transform; - for (let j = toUndo.steps.length - 1; j >= 0; j -= 1) { - tr.step(toUndo.steps[j].invert(toUndo.docs[j])); - } - if (undoable.text) { - const marks = tr.doc.resolve(undoable.from).marks(); - tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks)); - } else { - tr.delete(undoable.from, undoable.to); - } - } - return true; - } - } - return false; -}; - -// src/commands/unsetAllMarks.ts -var unsetAllMarks = (options = {}) => ({ tr, dispatch, editor }) => { - const { ignoreClearable = false } = options; - const { selection } = tr; - const { empty, ranges } = selection; - if (empty) { - return true; - } - const { nonClearableMarks } = editor.extensionManager; - if (dispatch) { - const clearableMarkTypes = Object.values(editor.schema.marks).filter( - (markType) => ignoreClearable || !nonClearableMarks.includes(markType.name) - ); - ranges.forEach((range) => { - for (const markType of clearableMarkTypes) { - tr.removeMark(range.$from.pos, range.$to.pos, markType); - } - }); - } - return true; -}; - -// src/commands/unsetMark.ts -var unsetMark = (typeOrName, options = {}) => ({ tr, state, dispatch }) => { - var _a; - const { extendEmptyMarkRange = false } = options; - const { selection } = tr; - const type = getMarkType(typeOrName, state.schema); - const { $from, empty, ranges } = selection; - if (!dispatch) { - return true; - } - if (empty && extendEmptyMarkRange) { - let { from, to } = selection; - const attrs = (_a = $from.marks().find((mark) => mark.type === type)) == null ? void 0 : _a.attrs; - const range = getMarkRange($from, type, attrs); - if (range) { - from = range.from; - to = range.to; - } - tr.removeMark(from, to, type); - } else { - ranges.forEach((range) => { - tr.removeMark(range.$from.pos, range.$to.pos, type); - }); - } - tr.removeStoredMark(type); - return true; -}; - -// src/commands/unsetTextDirection.ts -var unsetTextDirection = (position) => ({ tr, state, dispatch }) => { - const { selection } = state; - let from; - let to; - if (typeof position === "number") { - from = position; - to = position; - } else if (position && "from" in position && "to" in position) { - from = position.from; - to = position.to; - } else { - from = selection.from; - to = selection.to; - } - if (dispatch) { - tr.doc.nodesBetween(from, to, (node, pos) => { - if (node.isText) { - return; - } - const newAttrs = { ...node.attrs }; - delete newAttrs.dir; - tr.setNodeMarkup(pos, void 0, newAttrs); - }); - } - return true; -}; - -// src/commands/updateAttributes.ts -var updateAttributes = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => { - let nodeType = null; - let markType = null; - const schemaType = getSchemaTypeNameByName( - typeof typeOrName === "string" ? typeOrName : typeOrName.name, - state.schema - ); - if (!schemaType) { - return false; - } - if (schemaType === "node") { - nodeType = getNodeType(typeOrName, state.schema); - } - if (schemaType === "mark") { - markType = getMarkType(typeOrName, state.schema); - } - let canUpdate = false; - tr.selection.ranges.forEach((range) => { - const from = range.$from.pos; - const to = range.$to.pos; - let lastPos; - let lastNode; - let trimmedFrom; - let trimmedTo; - if (tr.selection.empty) { - state.doc.nodesBetween(from, to, (node, pos) => { - if (nodeType && nodeType === node.type) { - canUpdate = true; - trimmedFrom = Math.max(pos, from); - trimmedTo = Math.min(pos + node.nodeSize, to); - lastPos = pos; - lastNode = node; - } - }); - } else { - state.doc.nodesBetween(from, to, (node, pos) => { - if (pos < from && nodeType && nodeType === node.type) { - canUpdate = true; - trimmedFrom = Math.max(pos, from); - trimmedTo = Math.min(pos + node.nodeSize, to); - lastPos = pos; - lastNode = node; - } - if (pos >= from && pos <= to) { - if (nodeType && nodeType === node.type) { - canUpdate = true; - if (dispatch) { - tr.setNodeMarkup(pos, void 0, { - ...node.attrs, - ...attributes - }); - } - } - if (markType && node.marks.length) { - node.marks.forEach((mark) => { - if (markType === mark.type) { - canUpdate = true; - if (dispatch) { - const trimmedFrom2 = Math.max(pos, from); - const trimmedTo2 = Math.min(pos + node.nodeSize, to); - tr.addMark( - trimmedFrom2, - trimmedTo2, - markType.create({ - ...mark.attrs, - ...attributes - }) - ); - } - } - }); - } - } - }); - } - if (lastNode) { - if (lastPos !== void 0 && dispatch) { - tr.setNodeMarkup(lastPos, void 0, { - ...lastNode.attrs, - ...attributes - }); - } - if (markType && lastNode.marks.length) { - lastNode.marks.forEach((mark) => { - if (markType === mark.type && dispatch) { - tr.addMark( - trimmedFrom, - trimmedTo, - markType.create({ - ...mark.attrs, - ...attributes - }) - ); - } - }); - } - } - }); - return canUpdate; -}; - -// src/commands/wrapIn.ts -import { wrapIn as originalWrapIn } from "@tiptap/pm/commands"; -var wrapIn = (typeOrName, attributes = {}) => ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - return originalWrapIn(type, attributes)(state, dispatch); -}; - -// src/commands/wrapInList.ts -import { wrapInList as originalWrapInList } from "@tiptap/pm/schema-list"; -var wrapInList = (typeOrName, attributes = {}) => ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema); - return originalWrapInList(type, attributes)(state, dispatch); -}; - -// src/Editor.ts -import { EditorState } from "@tiptap/pm/state"; -import { EditorView } from "@tiptap/pm/view"; - -// src/EventEmitter.ts -var EventEmitter = class { - constructor() { - this.callbacks = {}; - } - on(event, fn) { - if (!this.callbacks[event]) { - this.callbacks[event] = []; - } - this.callbacks[event].push(fn); - return this; - } - emit(event, ...args) { - const callbacks = this.callbacks[event]; - if (callbacks) { - callbacks.forEach((callback) => callback.apply(this, args)); - } - return this; - } - off(event, fn) { - const callbacks = this.callbacks[event]; - if (callbacks) { - if (fn) { - this.callbacks[event] = callbacks.filter((callback) => callback !== fn); - } else { - delete this.callbacks[event]; - } - } - return this; - } - once(event, fn) { - const onceFn = (...args) => { - this.off(event, onceFn); - fn.apply(this, args); - }; - return this.on(event, onceFn); - } - removeAllListeners() { - this.callbacks = {}; - } -}; - -// src/ExtensionManager.ts -import { keymap } from "@tiptap/pm/keymap"; - -// src/InputRule.ts -import { Fragment as Fragment4 } from "@tiptap/pm/model"; -import { Plugin } from "@tiptap/pm/state"; -var InputRule = class { - constructor(config) { - var _a; - this.find = config.find; - this.handler = config.handler; - this.undoable = (_a = config.undoable) != null ? _a : true; - } -}; -var inputRuleMatcherHandler = (text, find) => { - if (isRegExp(find)) { - return find.exec(text); - } - const inputRuleMatch = find(text); - if (!inputRuleMatch) { - return null; - } - const result = [inputRuleMatch.text]; - result.index = inputRuleMatch.index; - result.input = text; - result.data = inputRuleMatch.data; - if (inputRuleMatch.replaceWith) { - if (!inputRuleMatch.text.includes(inputRuleMatch.replaceWith)) { - console.warn( - '[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".' - ); - } - result.push(inputRuleMatch.replaceWith); - } - return result; -}; -function run(config) { - var _a; - const { editor, from, to, text, rules, plugin } = config; - const { view } = editor; - if (view.composing) { - return false; - } - const $from = view.state.doc.resolve(from); - if ( - // check for code node - $from.parent.type.spec.code || // check for code mark - !!((_a = $from.nodeBefore || $from.nodeAfter) == null ? void 0 : _a.marks.find((mark) => mark.type.spec.code)) - ) { - return false; - } - let matched = false; - const textBefore = getTextContentFromNodes($from) + text; - rules.forEach((rule) => { - if (matched) { - return; - } - const match = inputRuleMatcherHandler(textBefore, rule.find); - if (!match) { - return; - } - const tr = view.state.tr; - const state = createChainableState({ - state: view.state, - transaction: tr - }); - const range = { - from: from - (match[0].length - text.length), - to - }; - const { commands, chain, can } = new CommandManager({ - editor, - state - }); - const handler = rule.handler({ - state, - range, - match, - commands, - chain, - can - }); - if (handler === null || !tr.steps.length) { - return; - } - if (rule.undoable) { - tr.setMeta(plugin, { - transform: tr, - from, - to, - text - }); - } - view.dispatch(tr); - matched = true; - }); - return matched; -} -function inputRulesPlugin(props) { - const { editor, rules } = props; - const plugin = new Plugin({ - state: { - init() { - return null; - }, - apply(tr, prev, state) { - const stored = tr.getMeta(plugin); - if (stored) { - return stored; - } - const simulatedInputMeta = tr.getMeta("applyInputRules"); - const isSimulatedInput = !!simulatedInputMeta; - if (isSimulatedInput) { - setTimeout(() => { - let { text } = simulatedInputMeta; - if (typeof text === "string") { - text = text; - } else { - text = getHTMLFromFragment(Fragment4.from(text), state.schema); - } - const { from } = simulatedInputMeta; - const to = from + text.length; - run({ - editor, - from, - to, - text, - rules, - plugin - }); - }); - } - return tr.selectionSet || tr.docChanged ? null : prev; - } - }, - props: { - handleTextInput(view, from, to, text) { - return run({ - editor, - from, - to, - text, - rules, - plugin - }); - }, - handleDOMEvents: { - compositionend: (view) => { - setTimeout(() => { - const { $cursor } = view.state.selection; - if ($cursor) { - run({ - editor, - from: $cursor.pos, - to: $cursor.pos, - text: "", - rules, - plugin - }); - } - }); - return false; - } - }, - // add support for input rules to trigger on enter - // this is useful for example for code blocks - handleKeyDown(view, event) { - if (event.key !== "Enter") { - return false; - } - const { $cursor } = view.state.selection; - if ($cursor) { - return run({ - editor, - from: $cursor.pos, - to: $cursor.pos, - text: "\n", - rules, - plugin - }); - } - return false; - } - }, - // @ts-ignore - isInputRules: true - }); - return plugin; -} - -// src/utilities/isPlainObject.ts -function getType(value) { - return Object.prototype.toString.call(value).slice(8, -1); -} -function isPlainObject(value) { - if (getType(value) !== "Object") { - return false; - } - return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype; -} - -// src/utilities/mergeDeep.ts -function mergeDeep(target, source) { - const output = { ...target }; - if (isPlainObject(target) && isPlainObject(source)) { - Object.keys(source).forEach((key) => { - if (isPlainObject(source[key]) && isPlainObject(target[key])) { - output[key] = mergeDeep(target[key], source[key]); - } else { - output[key] = source[key]; - } - }); - } - return output; -} - -// src/Extendable.ts -var Extendable = class { - constructor(config = {}) { - this.type = "extendable"; - this.parent = null; - this.child = null; - this.name = ""; - this.config = { - name: this.name - }; - this.config = { - ...this.config, - ...config - }; - this.name = this.config.name; - } - get options() { - return { - ...callOrReturn( - getExtensionField(this, "addOptions", { - name: this.name - }) - ) - }; - } - get storage() { - return { - ...callOrReturn( - getExtensionField(this, "addStorage", { - name: this.name, - options: this.options - }) - ) - }; - } - configure(options = {}) { - const extension = this.extend({ - ...this.config, - addOptions: () => { - return mergeDeep(this.options, options); - } - }); - extension.name = this.name; - extension.parent = this.parent; - this.child = null; - return extension; - } - extend(extendedConfig = {}) { - const extension = new this.constructor({ ...this.config, ...extendedConfig }); - extension.parent = this; - this.child = extension; - extension.name = "name" in extendedConfig ? extendedConfig.name : extension.parent.name; - return extension; - } -}; - -// src/Mark.ts -var Mark = class _Mark extends Extendable { - constructor() { - super(...arguments); - this.type = "mark"; - } - /** - * Create a new Mark instance - * @param config - Mark configuration object or a function that returns a configuration object - */ - static create(config = {}) { - const resolvedConfig = typeof config === "function" ? config() : config; - return new _Mark(resolvedConfig); - } - static handleExit({ editor, mark }) { - const { tr } = editor.state; - const currentPos = editor.state.selection.$from; - const isAtEnd = currentPos.pos === currentPos.end(); - if (isAtEnd) { - const currentMarks = currentPos.marks(); - const isInMark = !!currentMarks.find((m) => (m == null ? void 0 : m.type.name) === mark.name); - if (!isInMark) { - return false; - } - const removeMark = currentMarks.find((m) => (m == null ? void 0 : m.type.name) === mark.name); - if (removeMark) { - tr.removeStoredMark(removeMark); - } - tr.insertText(" ", currentPos.pos); - editor.view.dispatch(tr); - return true; - } - return false; - } - configure(options) { - return super.configure(options); - } - extend(extendedConfig) { - const resolvedConfig = typeof extendedConfig === "function" ? extendedConfig() : extendedConfig; - return super.extend(resolvedConfig); - } -}; - -// src/PasteRule.ts -import { Fragment as Fragment5 } from "@tiptap/pm/model"; -import { Plugin as Plugin2 } from "@tiptap/pm/state"; - -// src/utilities/isNumber.ts -function isNumber(value) { - return typeof value === "number"; -} - -// src/PasteRule.ts -var PasteRule = class { - constructor(config) { - this.find = config.find; - this.handler = config.handler; - } -}; -var pasteRuleMatcherHandler = (text, find, event) => { - if (isRegExp(find)) { - return [...text.matchAll(find)]; - } - const matches = find(text, event); - if (!matches) { - return []; - } - return matches.map((pasteRuleMatch) => { - const result = [pasteRuleMatch.text]; - result.index = pasteRuleMatch.index; - result.input = text; - result.data = pasteRuleMatch.data; - if (pasteRuleMatch.replaceWith) { - if (!pasteRuleMatch.text.includes(pasteRuleMatch.replaceWith)) { - console.warn( - '[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".' - ); - } - result.push(pasteRuleMatch.replaceWith); - } - return result; - }); -}; -function run2(config) { - const { editor, state, from, to, rule, pasteEvent, dropEvent } = config; - const { commands, chain, can } = new CommandManager({ - editor, - state - }); - const handlers = []; - state.doc.nodesBetween(from, to, (node, pos) => { - var _a, _b, _c, _d, _e; - if (((_b = (_a = node.type) == null ? void 0 : _a.spec) == null ? void 0 : _b.code) || !(node.isText || node.isTextblock || node.isInline)) { - return; - } - const contentSize = (_e = (_d = (_c = node.content) == null ? void 0 : _c.size) != null ? _d : node.nodeSize) != null ? _e : 0; - const resolvedFrom = Math.max(from, pos); - const resolvedTo = Math.min(to, pos + contentSize); - if (resolvedFrom >= resolvedTo) { - return; - } - const textToMatch = node.isText ? node.text || "" : node.textBetween(resolvedFrom - pos, resolvedTo - pos, void 0, "\uFFFC"); - const matches = pasteRuleMatcherHandler(textToMatch, rule.find, pasteEvent); - matches.forEach((match) => { - if (match.index === void 0) { - return; - } - const start = resolvedFrom + match.index + 1; - const end = start + match[0].length; - const range = { - from: state.tr.mapping.map(start), - to: state.tr.mapping.map(end) - }; - const handler = rule.handler({ - state, - range, - match, - commands, - chain, - can, - pasteEvent, - dropEvent - }); - handlers.push(handler); - }); - }); - const success = handlers.every((handler) => handler !== null); - return success; -} -var tiptapDragFromOtherEditor = null; -var createClipboardPasteEvent = (text) => { - var _a; - const event = new ClipboardEvent("paste", { - clipboardData: new DataTransfer() - }); - (_a = event.clipboardData) == null ? void 0 : _a.setData("text/html", text); - return event; -}; -function pasteRulesPlugin(props) { - const { editor, rules } = props; - let dragSourceElement = null; - let isPastedFromProseMirror = false; - let isDroppedFromProseMirror = false; - let pasteEvent = typeof ClipboardEvent !== "undefined" ? new ClipboardEvent("paste") : null; - let dropEvent; - try { - dropEvent = typeof DragEvent !== "undefined" ? new DragEvent("drop") : null; - } catch { - dropEvent = null; - } - const processEvent = ({ - state, - from, - to, - rule, - pasteEvt - }) => { - const tr = state.tr; - const chainableState = createChainableState({ - state, - transaction: tr - }); - const handler = run2({ - editor, - state: chainableState, - from: Math.max(from - 1, 0), - to: to.b - 1, - rule, - pasteEvent: pasteEvt, - dropEvent - }); - if (!handler || !tr.steps.length) { - return; - } - try { - dropEvent = typeof DragEvent !== "undefined" ? new DragEvent("drop") : null; - } catch { - dropEvent = null; - } - pasteEvent = typeof ClipboardEvent !== "undefined" ? new ClipboardEvent("paste") : null; - return tr; - }; - const plugins = rules.map((rule) => { - return new Plugin2({ - // we register a global drag handler to track the current drag source element - view(view) { - const handleDragstart = (event) => { - var _a; - dragSourceElement = ((_a = view.dom.parentElement) == null ? void 0 : _a.contains(event.target)) ? view.dom.parentElement : null; - if (dragSourceElement) { - tiptapDragFromOtherEditor = editor; - } - }; - const handleDragend = () => { - if (tiptapDragFromOtherEditor) { - tiptapDragFromOtherEditor = null; - } - }; - window.addEventListener("dragstart", handleDragstart); - window.addEventListener("dragend", handleDragend); - return { - destroy() { - window.removeEventListener("dragstart", handleDragstart); - window.removeEventListener("dragend", handleDragend); - } - }; - }, - props: { - handleDOMEvents: { - drop: (view, event) => { - isDroppedFromProseMirror = dragSourceElement === view.dom.parentElement; - dropEvent = event; - if (!isDroppedFromProseMirror) { - const dragFromOtherEditor = tiptapDragFromOtherEditor; - if (dragFromOtherEditor == null ? void 0 : dragFromOtherEditor.isEditable) { - setTimeout(() => { - const selection = dragFromOtherEditor.state.selection; - if (selection) { - dragFromOtherEditor.commands.deleteRange({ - from: selection.from, - to: selection.to - }); - } - }, 10); - } - } - return false; - }, - paste: (_view, event) => { - var _a; - const html = (_a = event.clipboardData) == null ? void 0 : _a.getData("text/html"); - pasteEvent = event; - isPastedFromProseMirror = !!(html == null ? void 0 : html.includes("data-pm-slice")); - return false; - } - } - }, - appendTransaction: (transactions, oldState, state) => { - const transaction = transactions[0]; - const isPaste = transaction.getMeta("uiEvent") === "paste" && !isPastedFromProseMirror; - const isDrop = transaction.getMeta("uiEvent") === "drop" && !isDroppedFromProseMirror; - const simulatedPasteMeta = transaction.getMeta("applyPasteRules"); - const isSimulatedPaste = !!simulatedPasteMeta; - if (!isPaste && !isDrop && !isSimulatedPaste) { - return; - } - if (isSimulatedPaste) { - let { text } = simulatedPasteMeta; - if (typeof text === "string") { - text = text; - } else { - text = getHTMLFromFragment(Fragment5.from(text), state.schema); - } - const { from: from2 } = simulatedPasteMeta; - const to2 = from2 + text.length; - const pasteEvt = createClipboardPasteEvent(text); - return processEvent({ - rule, - state, - from: from2, - to: { b: to2 }, - pasteEvt - }); - } - const from = oldState.doc.content.findDiffStart(state.doc.content); - const to = oldState.doc.content.findDiffEnd(state.doc.content); - if (!isNumber(from) || !to || from === to.b) { - return; - } - return processEvent({ - rule, - state, - from, - to, - pasteEvt: pasteEvent - }); - } - }); - }); - return plugins; -} - -// src/ExtensionManager.ts -var ExtensionManager = class { - constructor(extensions, editor) { - this.splittableMarks = []; - this.nonClearableMarks = []; - this.editor = editor; - this.baseExtensions = extensions; - this.extensions = resolveExtensions(extensions); - this.schema = getSchemaByResolvedExtensions(this.extensions, editor); - this.setupExtensions(); - } - /** - * Get all commands from the extensions. - * @returns An object with all commands where the key is the command name and the value is the command function - */ - get commands() { - return this.extensions.reduce((commands, extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor: this.editor, - type: getSchemaTypeByName(extension.name, this.schema) - }; - const addCommands = getExtensionField( - extension, - "addCommands", - context - ); - if (!addCommands) { - return commands; - } - return { - ...commands, - ...addCommands() - }; - }, {}); - } - /** - * Get all registered Prosemirror plugins from the extensions. - * @returns An array of Prosemirror plugins - */ - get plugins() { - const { editor } = this; - const extensions = sortExtensions([...this.extensions].reverse()); - const allPlugins = extensions.flatMap((extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor, - type: getSchemaTypeByName(extension.name, this.schema) - }; - const plugins = []; - const addKeyboardShortcuts = getExtensionField( - extension, - "addKeyboardShortcuts", - context - ); - let defaultBindings = {}; - if (extension.type === "mark" && getExtensionField(extension, "exitable", context)) { - defaultBindings.ArrowRight = () => Mark.handleExit({ editor, mark: extension }); - } - if (addKeyboardShortcuts) { - const bindings = Object.fromEntries( - Object.entries(addKeyboardShortcuts()).map(([shortcut, method]) => { - return [shortcut, () => method({ editor })]; - }) - ); - defaultBindings = { ...defaultBindings, ...bindings }; - } - const keyMapPlugin = keymap(defaultBindings); - plugins.push(keyMapPlugin); - const addInputRules = getExtensionField( - extension, - "addInputRules", - context - ); - if (isExtensionRulesEnabled(extension, editor.options.enableInputRules) && addInputRules) { - const rules = addInputRules(); - if (rules && rules.length) { - const inputResult = inputRulesPlugin({ - editor, - rules - }); - const inputPlugins = Array.isArray(inputResult) ? inputResult : [inputResult]; - plugins.push(...inputPlugins); - } - } - const addPasteRules = getExtensionField( - extension, - "addPasteRules", - context - ); - if (isExtensionRulesEnabled(extension, editor.options.enablePasteRules) && addPasteRules) { - const rules = addPasteRules(); - if (rules && rules.length) { - const pasteRules = pasteRulesPlugin({ editor, rules }); - plugins.push(...pasteRules); - } - } - const addProseMirrorPlugins = getExtensionField( - extension, - "addProseMirrorPlugins", - context - ); - if (addProseMirrorPlugins) { - const proseMirrorPlugins = addProseMirrorPlugins(); - plugins.push(...proseMirrorPlugins); - } - return plugins; - }); - return allPlugins; - } - /** - * Get all attributes from the extensions. - * @returns An array of attributes - */ - get attributes() { - return getAttributesFromExtensions(this.extensions); - } - /** - * Get all node views from the extensions. - * @returns An object with all node views where the key is the node name and the value is the node view function - */ - get nodeViews() { - const { editor } = this; - const { nodeExtensions } = splitExtensions(this.extensions); - return Object.fromEntries( - nodeExtensions.filter((extension) => !!getExtensionField(extension, "addNodeView")).map((extension) => { - const extensionAttributes = this.attributes.filter( - (attribute) => attribute.type === extension.name - ); - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor, - type: getNodeType(extension.name, this.schema) - }; - const addNodeView = getExtensionField( - extension, - "addNodeView", - context - ); - if (!addNodeView) { - return []; - } - const nodeViewResult = addNodeView(); - if (!nodeViewResult) { - return []; - } - const nodeview = (node, view, getPos, decorations, innerDecorations) => { - const HTMLAttributes = getRenderedAttributes(node, extensionAttributes); - return nodeViewResult({ - // pass-through - node, - view, - getPos, - decorations, - innerDecorations, - // tiptap-specific - editor, - extension, - HTMLAttributes - }); - }; - return [extension.name, nodeview]; - }) - ); - } - /** - * Get the composed dispatchTransaction function from all extensions. - * @param baseDispatch The base dispatch function (e.g. from the editor or user props) - * @returns A composed dispatch function - */ - dispatchTransaction(baseDispatch) { - const { editor } = this; - const extensions = sortExtensions([...this.extensions].reverse()); - return extensions.reduceRight((next, extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor, - type: getSchemaTypeByName(extension.name, this.schema) - }; - const dispatchTransaction = getExtensionField( - extension, - "dispatchTransaction", - context - ); - if (!dispatchTransaction) { - return next; - } - return (transaction) => { - dispatchTransaction.call(context, { transaction, next }); - }; - }, baseDispatch); - } - /** - * Get the composed transformPastedHTML function from all extensions. - * @param baseTransform The base transform function (e.g. from the editor props) - * @returns A composed transform function that chains all extension transforms - */ - transformPastedHTML(baseTransform) { - const { editor } = this; - const extensions = sortExtensions([...this.extensions]); - return extensions.reduce( - (transform, extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor, - type: getSchemaTypeByName(extension.name, this.schema) - }; - const extensionTransform = getExtensionField( - extension, - "transformPastedHTML", - context - ); - if (!extensionTransform) { - return transform; - } - return (html, view) => { - const transformedHtml = transform(html, view); - return extensionTransform.call(context, transformedHtml); - }; - }, - baseTransform || ((html) => html) - ); - } - get markViews() { - const { editor } = this; - const { markExtensions } = splitExtensions(this.extensions); - return Object.fromEntries( - markExtensions.filter((extension) => !!getExtensionField(extension, "addMarkView")).map((extension) => { - const extensionAttributes = this.attributes.filter( - (attribute) => attribute.type === extension.name - ); - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor, - type: getMarkType(extension.name, this.schema) - }; - const addMarkView = getExtensionField( - extension, - "addMarkView", - context - ); - if (!addMarkView) { - return []; - } - const markView = (mark, view, inline) => { - const HTMLAttributes = getRenderedAttributes(mark, extensionAttributes); - return addMarkView()({ - // pass-through - mark, - view, - inline, - // tiptap-specific - editor, - extension, - HTMLAttributes, - updateAttributes: (attrs) => { - updateMarkViewAttributes(mark, editor, attrs); - } - }); - }; - return [extension.name, markView]; - }) - ); - } - /** - * Destroy the extension manager and clean up all extension references - * to prevent memory leaks through parent/child extension chains. - * - * Walks each extension's full parent chain and nulls every forward - * `parent.child → current` link where the parent still points to the - * current node. This breaks the retention path from module-scope - * singleton roots through deep extend() chains. - * - * Only ancestor `.child` links matching the current chain are cleared. - * The `.parent` pointer on ancestors is never touched — extensions - * may be shared across live editors, so their own backward references - * and non-matching forward links must remain intact. - */ - destroy() { - this.extensions.forEach((extension) => { - let current = extension; - while (current.parent) { - const parent = current.parent; - if (parent.child === current) { - parent.child = null; - } - current = parent; - } - }); - this.extensions = []; - this.baseExtensions = []; - this.schema = null; - this.editor = null; - } - /** - * Go through all extensions, create extension storages & setup marks - * & bind editor event listener. - */ - setupExtensions() { - const extensions = this.extensions; - this.editor.extensionStorage = Object.fromEntries( - extensions.map((extension) => [extension.name, extension.storage]) - ); - extensions.forEach((extension) => { - var _a, _b; - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name], - editor: this.editor, - type: getSchemaTypeByName(extension.name, this.schema) - }; - if (extension.type === "mark") { - const keepOnSplit = (_a = callOrReturn(getExtensionField(extension, "keepOnSplit", context))) != null ? _a : true; - if (keepOnSplit) { - this.splittableMarks.push(extension.name); - } - const clearable = (_b = callOrReturn( - getExtensionField(extension, "clearable", context) - )) != null ? _b : true; - if (!clearable) { - this.nonClearableMarks.push(extension.name); - } - } - const onBeforeCreate = getExtensionField( - extension, - "onBeforeCreate", - context - ); - const onCreate = getExtensionField(extension, "onCreate", context); - const onUpdate = getExtensionField(extension, "onUpdate", context); - const onSelectionUpdate = getExtensionField( - extension, - "onSelectionUpdate", - context - ); - const onTransaction = getExtensionField( - extension, - "onTransaction", - context - ); - const onFocus = getExtensionField(extension, "onFocus", context); - const onBlur = getExtensionField(extension, "onBlur", context); - const onDestroy = getExtensionField(extension, "onDestroy", context); - if (onBeforeCreate) { - this.editor.on("beforeCreate", onBeforeCreate); - } - if (onCreate) { - this.editor.on("create", onCreate); - } - if (onUpdate) { - this.editor.on("update", onUpdate); - } - if (onSelectionUpdate) { - this.editor.on("selectionUpdate", onSelectionUpdate); - } - if (onTransaction) { - this.editor.on("transaction", onTransaction); - } - if (onFocus) { - this.editor.on("focus", onFocus); - } - if (onBlur) { - this.editor.on("blur", onBlur); - } - if (onDestroy) { - this.editor.on("destroy", onDestroy); - } - }); - } -}; -ExtensionManager.resolve = resolveExtensions; -ExtensionManager.sort = sortExtensions; -ExtensionManager.flatten = flattenExtensions; - -// src/extensions/index.ts -var extensions_exports = {}; -__export(extensions_exports, { - ClipboardTextSerializer: () => ClipboardTextSerializer, - Commands: () => Commands, - Delete: () => Delete, - Drop: () => Drop, - Editable: () => Editable, - FocusEvents: () => FocusEvents, - Keymap: () => Keymap, - Paste: () => Paste, - Tabindex: () => Tabindex, - TextDirection: () => TextDirection, - focusEventsPluginKey: () => focusEventsPluginKey -}); - -// src/extensions/clipboardTextSerializer.ts -import { Plugin as Plugin3, PluginKey } from "@tiptap/pm/state"; - -// src/Extension.ts -var Extension = class _Extension extends Extendable { - constructor() { - super(...arguments); - this.type = "extension"; - } - /** - * Create a new Extension instance - * @param config - Extension configuration object or a function that returns a configuration object - */ - static create(config = {}) { - const resolvedConfig = typeof config === "function" ? config() : config; - return new _Extension(resolvedConfig); - } - configure(options) { - return super.configure(options); - } - extend(extendedConfig) { - const resolvedConfig = typeof extendedConfig === "function" ? extendedConfig() : extendedConfig; - return super.extend(resolvedConfig); - } -}; - -// src/extensions/clipboardTextSerializer.ts -var ClipboardTextSerializer = Extension.create({ - name: "clipboardTextSerializer", - addOptions() { - return { - blockSeparator: void 0 - }; - }, - addProseMirrorPlugins() { - return [ - new Plugin3({ - key: new PluginKey("clipboardTextSerializer"), - props: { - clipboardTextSerializer: () => { - const { editor } = this; - const { state, schema } = editor; - const { doc, selection } = state; - const textSerializers = getTextSerializersFromSchema(schema); - const { blockSeparator } = this.options; - const options = { - ...blockSeparator !== void 0 ? { blockSeparator } : {}, - textSerializers - }; - const sortedRanges = [...selection.ranges].sort((a, b) => a.$from.pos - b.$from.pos); - return sortedRanges.map( - ({ $from, $to }) => getTextBetween(doc, { from: $from.pos, to: $to.pos }, options) - ).join(blockSeparator != null ? blockSeparator : "\n\n"); - } - } - }) - ]; - } -}); - -// src/extensions/commands.ts -var Commands = Extension.create({ - name: "commands", - addCommands() { - return { - ...commands_exports - }; - } -}); - -// src/extensions/delete.ts -import { RemoveMarkStep } from "@tiptap/pm/transform"; -var Delete = Extension.create({ - name: "delete", - onUpdate({ transaction, appendedTransactions }) { - var _a, _b, _c; - const callback = () => { - var _a2, _b2, _c2, _d; - if ((_d = (_c2 = (_b2 = (_a2 = this.editor.options.coreExtensionOptions) == null ? void 0 : _a2.delete) == null ? void 0 : _b2.filterTransaction) == null ? void 0 : _c2.call(_b2, transaction)) != null ? _d : transaction.getMeta("y-sync$")) { - return; - } - const nextTransaction = combineTransactionSteps(transaction.before, [ - transaction, - ...appendedTransactions - ]); - const changes = getChangedRanges(nextTransaction); - changes.forEach((change) => { - if (nextTransaction.mapping.mapResult(change.oldRange.from).deletedAfter && nextTransaction.mapping.mapResult(change.oldRange.to).deletedBefore) { - nextTransaction.before.nodesBetween( - change.oldRange.from, - change.oldRange.to, - (node, from) => { - const to = from + node.nodeSize - 2; - const isFullyWithinRange = change.oldRange.from <= from && to <= change.oldRange.to; - this.editor.emit("delete", { - type: "node", - node, - from, - to, - newFrom: nextTransaction.mapping.map(from), - newTo: nextTransaction.mapping.map(to), - deletedRange: change.oldRange, - newRange: change.newRange, - partial: !isFullyWithinRange, - editor: this.editor, - transaction, - combinedTransform: nextTransaction - }); - } - ); - } - }); - const mapping = nextTransaction.mapping; - nextTransaction.steps.forEach((step, index) => { - var _a3, _b3; - if (step instanceof RemoveMarkStep) { - const newStart = mapping.slice(index).map(step.from, -1); - const newEnd = mapping.slice(index).map(step.to); - const oldStart = mapping.invert().map(newStart, -1); - const oldEnd = mapping.invert().map(newEnd); - const foundBeforeMark = newStart > 0 ? (_a3 = nextTransaction.doc.nodeAt(newStart - 1)) == null ? void 0 : _a3.marks.some((mark) => mark.eq(step.mark)) : false; - const foundAfterMark = (_b3 = nextTransaction.doc.nodeAt(newEnd)) == null ? void 0 : _b3.marks.some((mark) => mark.eq(step.mark)); - this.editor.emit("delete", { - type: "mark", - mark: step.mark, - from: step.from, - to: step.to, - deletedRange: { - from: oldStart, - to: oldEnd - }, - newRange: { - from: newStart, - to: newEnd - }, - partial: Boolean(foundAfterMark || foundBeforeMark), - editor: this.editor, - transaction, - combinedTransform: nextTransaction - }); - } - }); - }; - if ((_c = (_b = (_a = this.editor.options.coreExtensionOptions) == null ? void 0 : _a.delete) == null ? void 0 : _b.async) != null ? _c : true) { - setTimeout(callback, 0); - } else { - callback(); - } - } -}); - -// src/extensions/drop.ts -import { Plugin as Plugin4, PluginKey as PluginKey2 } from "@tiptap/pm/state"; -var Drop = Extension.create({ - name: "drop", - addProseMirrorPlugins() { - return [ - new Plugin4({ - key: new PluginKey2("tiptapDrop"), - props: { - handleDrop: (_, e, slice, moved) => { - this.editor.emit("drop", { - editor: this.editor, - event: e, - slice, - moved - }); - } - } - }) - ]; - } -}); - -// src/extensions/editable.ts -import { Plugin as Plugin5, PluginKey as PluginKey3 } from "@tiptap/pm/state"; -var Editable = Extension.create({ - name: "editable", - addProseMirrorPlugins() { - return [ - new Plugin5({ - key: new PluginKey3("editable"), - props: { - editable: () => this.editor.options.editable - } - }) - ]; - } -}); - -// src/extensions/focusEvents.ts -import { Plugin as Plugin6, PluginKey as PluginKey4 } from "@tiptap/pm/state"; -var focusEventsPluginKey = new PluginKey4("focusEvents"); -var FocusEvents = Extension.create({ - name: "focusEvents", - addProseMirrorPlugins() { - const { editor } = this; - return [ - new Plugin6({ - key: focusEventsPluginKey, - props: { - handleDOMEvents: { - focus: (view, event) => { - editor.isFocused = true; - const transaction = editor.state.tr.setMeta("focus", { event }).setMeta("addToHistory", false); - view.dispatch(transaction); - return false; - }, - blur: (view, event) => { - editor.isFocused = false; - const transaction = editor.state.tr.setMeta("blur", { event }).setMeta("addToHistory", false); - view.dispatch(transaction); - return false; - } - } - } - }) - ]; - } -}); - -// src/extensions/keymap.ts -import { Plugin as Plugin7, PluginKey as PluginKey5, Selection as Selection3 } from "@tiptap/pm/state"; -var Keymap = Extension.create({ - name: "keymap", - addKeyboardShortcuts() { - const handleBackspace = () => this.editor.commands.first(({ commands }) => [ - () => commands.undoInputRule(), - // maybe convert first text block node to default node - () => commands.command(({ tr }) => { - const { selection, doc } = tr; - const { empty, $anchor } = selection; - const { pos, parent } = $anchor; - const $parentPos = $anchor.parent.isTextblock && pos > 0 ? tr.doc.resolve(pos - 1) : $anchor; - const parentIsIsolating = $parentPos.parent.type.spec.isolating; - const parentPos = $anchor.pos - $anchor.parentOffset; - const isAtStart = parentIsIsolating && $parentPos.parent.childCount === 1 ? parentPos === $anchor.pos : Selection3.atStart(doc).from === pos; - if (!empty || !parent.type.isTextblock || parent.textContent.length || !isAtStart || isAtStart && $anchor.parent.type.name === "paragraph") { - return false; - } - return commands.clearNodes(); - }), - () => commands.deleteSelection(), - () => commands.joinBackward(), - () => commands.selectNodeBackward() - ]); - const handleDelete = () => this.editor.commands.first(({ commands }) => [ - () => commands.deleteSelection(), - () => commands.deleteCurrentNode(), - () => commands.joinForward(), - () => commands.selectNodeForward() - ]); - const handleEnter = () => this.editor.commands.first(({ commands }) => [ - () => commands.newlineInCode(), - () => commands.createParagraphNear(), - () => commands.liftEmptyBlock(), - () => commands.splitBlock() - ]); - const baseKeymap = { - Enter: handleEnter, - "Mod-Enter": () => this.editor.commands.exitCode(), - Backspace: handleBackspace, - "Mod-Backspace": handleBackspace, - "Shift-Backspace": handleBackspace, - Delete: handleDelete, - "Mod-Delete": handleDelete, - "Mod-a": () => this.editor.commands.selectAll() - }; - const pcKeymap = { - ...baseKeymap - }; - const macKeymap = { - ...baseKeymap, - "Ctrl-h": handleBackspace, - "Alt-Backspace": handleBackspace, - "Ctrl-d": handleDelete, - "Ctrl-Alt-Backspace": handleDelete, - "Alt-Delete": handleDelete, - "Alt-d": handleDelete, - "Ctrl-a": () => this.editor.commands.selectTextblockStart(), - "Ctrl-e": () => this.editor.commands.selectTextblockEnd() - }; - if (isiOS() || isMacOS()) { - return macKeymap; - } - return pcKeymap; - }, - addProseMirrorPlugins() { - return [ - // With this plugin we check if the whole document was selected and deleted. - // In this case we will additionally call `clearNodes()` to convert e.g. a heading - // to a paragraph if necessary. - // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well - // with many other commands. - new Plugin7({ - key: new PluginKey5("clearDocument"), - appendTransaction: (transactions, oldState, newState) => { - if (transactions.some((tr2) => tr2.getMeta("composition"))) { - return; - } - const docChanges = transactions.some((transaction) => transaction.docChanged) && !oldState.doc.eq(newState.doc); - const ignoreTr = transactions.some( - (transaction) => transaction.getMeta("preventClearDocument") - ); - if (!docChanges || ignoreTr) { - return; - } - const { empty, from, to } = oldState.selection; - const allFrom = Selection3.atStart(oldState.doc).from; - const allEnd = Selection3.atEnd(oldState.doc).to; - const allWasSelected = from === allFrom && to === allEnd; - if (empty || !allWasSelected) { - return; - } - const isEmpty = isNodeEmpty(newState.doc); - if (!isEmpty) { - return; - } - const tr = newState.tr; - const state = createChainableState({ - state: newState, - transaction: tr - }); - const { commands } = new CommandManager({ - editor: this.editor, - state - }); - commands.clearNodes(); - if (!tr.steps.length) { - return; - } - return tr; - } - }) - ]; - } -}); - -// src/extensions/paste.ts -import { Plugin as Plugin8, PluginKey as PluginKey6 } from "@tiptap/pm/state"; -var Paste = Extension.create({ - name: "paste", - addProseMirrorPlugins() { - return [ - new Plugin8({ - key: new PluginKey6("tiptapPaste"), - props: { - handlePaste: (_view, e, slice) => { - this.editor.emit("paste", { - editor: this.editor, - event: e, - slice - }); - } - } - }) - ]; - } -}); - -// src/extensions/tabindex.ts -import { Plugin as Plugin9, PluginKey as PluginKey7 } from "@tiptap/pm/state"; -var Tabindex = Extension.create({ - name: "tabindex", - addOptions() { - return { - value: void 0 - }; - }, - addProseMirrorPlugins() { - return [ - new Plugin9({ - key: new PluginKey7("tabindex"), - props: { - attributes: () => { - var _a; - if (!this.editor.isEditable && this.options.value === void 0) { - return {}; - } - return { tabindex: (_a = this.options.value) != null ? _a : "0" }; - } - } - }) - ]; - } -}); - -// src/extensions/textDirection.ts -import { Plugin as Plugin10, PluginKey as PluginKey8 } from "@tiptap/pm/state"; -var TextDirection = Extension.create({ - name: "textDirection", - addOptions() { - return { - direction: void 0 - }; - }, - addGlobalAttributes() { - if (!this.options.direction) { - return []; - } - const { nodeExtensions } = splitExtensions(this.extensions); - return [ - { - types: nodeExtensions.filter((extension) => extension.name !== "text").map((extension) => extension.name), - attributes: { - dir: { - default: this.options.direction, - parseHTML: (element) => { - const dir = element.getAttribute("dir"); - if (dir && (dir === "ltr" || dir === "rtl" || dir === "auto")) { - return dir; - } - return this.options.direction; - }, - renderHTML: (attributes) => { - if (!attributes.dir) { - return {}; - } - return { - dir: attributes.dir - }; - } - } - } - } - ]; - }, - addProseMirrorPlugins() { - return [ - new Plugin10({ - key: new PluginKey8("textDirection"), - props: { - attributes: () => { - const direction = this.options.direction; - if (!direction) { - return {}; - } - return { - dir: direction - }; - } - } - }) - ]; - } -}); - -// src/NodePos.ts -var NodePos = class _NodePos { - constructor(pos, editor, isBlock = false, node = null) { - this.currentNode = null; - this.actualDepth = null; - this.isBlock = isBlock; - this.resolvedPos = pos; - this.editor = editor; - this.currentNode = node; - } - get name() { - return this.node.type.name; - } - get node() { - return this.currentNode || this.resolvedPos.node(); - } - get element() { - return this.editor.view.domAtPos(this.pos).node; - } - get depth() { - var _a; - return (_a = this.actualDepth) != null ? _a : this.resolvedPos.depth; - } - get pos() { - return this.resolvedPos.pos; - } - get content() { - return this.node.content; - } - set content(content) { - let from = this.from; - let to = this.to; - if (this.isBlock) { - if (this.content.size === 0) { - console.error( - `You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}` - ); - return; - } - from = this.from + 1; - to = this.to - 1; - } - this.editor.commands.insertContentAt({ from, to }, content); - } - get attributes() { - return this.node.attrs; - } - get textContent() { - return this.node.textContent; - } - get size() { - return this.node.nodeSize; - } - get from() { - if (this.isBlock) { - return this.pos; - } - return this.resolvedPos.start(this.resolvedPos.depth); - } - get range() { - return { - from: this.from, - to: this.to - }; - } - get to() { - if (this.isBlock) { - return this.pos + this.size; - } - return this.resolvedPos.end(this.resolvedPos.depth) + (this.node.isText ? 0 : 1); - } - get parent() { - if (this.depth === 0) { - return null; - } - const parentPos = this.resolvedPos.start(this.resolvedPos.depth - 1); - const $pos = this.resolvedPos.doc.resolve(parentPos); - return new _NodePos($pos, this.editor); - } - get before() { - let $pos = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2)); - if ($pos.depth !== this.depth) { - $pos = this.resolvedPos.doc.resolve(this.from - 3); - } - return new _NodePos($pos, this.editor); - } - get after() { - let $pos = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1)); - if ($pos.depth !== this.depth) { - $pos = this.resolvedPos.doc.resolve(this.to + 3); - } - return new _NodePos($pos, this.editor); - } - get children() { - const children = []; - this.node.content.forEach((node, offset) => { - const isBlock = node.isBlock && !node.isTextblock; - const isNonTextAtom = node.isAtom && !node.isText; - const isInline = node.isInline; - const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1); - if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) { - return; - } - const $pos = this.resolvedPos.doc.resolve(targetPos); - if (!isBlock && !isInline && $pos.depth <= this.depth) { - return; - } - const childNodePos = new _NodePos( - $pos, - this.editor, - isBlock, - isBlock || isInline ? node : null - ); - if (isBlock) { - childNodePos.actualDepth = this.depth + 1; - } - children.push(childNodePos); - }); - return children; - } - get firstChild() { - return this.children[0] || null; - } - get lastChild() { - const children = this.children; - return children[children.length - 1] || null; - } - closest(selector, attributes = {}) { - let node = null; - let currentNode = this.parent; - while (currentNode && !node) { - if (currentNode.node.type.name === selector) { - if (Object.keys(attributes).length > 0) { - const nodeAttributes = currentNode.node.attrs; - const attrKeys = Object.keys(attributes); - for (let index = 0; index < attrKeys.length; index += 1) { - const key = attrKeys[index]; - if (nodeAttributes[key] !== attributes[key]) { - break; - } - } - } else { - node = currentNode; - } - } - currentNode = currentNode.parent; - } - return node; - } - querySelector(selector, attributes = {}) { - return this.querySelectorAll(selector, attributes, true)[0] || null; - } - querySelectorAll(selector, attributes = {}, firstItemOnly = false) { - let nodes = []; - if (!this.children || this.children.length === 0) { - return nodes; - } - const attrKeys = Object.keys(attributes); - this.children.forEach((childPos) => { - if (firstItemOnly && nodes.length > 0) { - return; - } - if (childPos.node.type.name === selector) { - const doesAllAttributesMatch = attrKeys.every( - (key) => attributes[key] === childPos.node.attrs[key] - ); - if (doesAllAttributesMatch) { - nodes.push(childPos); - } - } - if (firstItemOnly && nodes.length > 0) { - return; - } - nodes = nodes.concat(childPos.querySelectorAll(selector, attributes, firstItemOnly)); - }); - return nodes; - } - setAttribute(attributes) { - const { tr } = this.editor.state; - tr.setNodeMarkup(this.from, void 0, { - ...this.node.attrs, - ...attributes - }); - this.editor.view.dispatch(tr); - } -}; - -// src/style.ts -var style = `.ProseMirror { - position: relative; -} - -.ProseMirror { - word-wrap: break-word; - white-space: pre-wrap; - white-space: break-spaces; - -webkit-font-variant-ligatures: none; - font-variant-ligatures: none; - font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ -} - -.ProseMirror [contenteditable="false"] { - white-space: normal; -} - -.ProseMirror [contenteditable="false"] [contenteditable="true"] { - white-space: pre-wrap; -} - -.ProseMirror pre { - white-space: pre-wrap; -} - -img.ProseMirror-separator { - display: inline !important; - border: none !important; - margin: 0 !important; - width: 0 !important; - height: 0 !important; -} - -.ProseMirror-gapcursor { - display: none; - pointer-events: none; - position: absolute; - margin: 0; -} - -.ProseMirror-gapcursor:after { - content: ""; - display: block; - position: absolute; - top: -2px; - width: 20px; - border-top: 1px solid black; - animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; -} - -@keyframes ProseMirror-cursor-blink { - to { - visibility: hidden; - } -} - -.ProseMirror-hideselection *::selection { - background: transparent; -} - -.ProseMirror-hideselection *::-moz-selection { - background: transparent; -} - -.ProseMirror-hideselection * { - caret-color: transparent; -} - -.ProseMirror-focused .ProseMirror-gapcursor { - display: block; -}`; - -// src/utilities/createStyleTag.ts -function createStyleTag(style2, nonce, suffix) { - const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ""}]`); - if (tiptapStyleTag !== null) { - return tiptapStyleTag; - } - const styleNode = document.createElement("style"); - if (nonce) { - styleNode.setAttribute("nonce", nonce); - } - styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ""}`, ""); - styleNode.innerHTML = style2; - document.getElementsByTagName("head")[0].appendChild(styleNode); - return styleNode; -} - -// src/Editor.ts -var Editor = class extends EventEmitter { - constructor(options = {}) { - super(); - this.css = null; - this.className = "tiptap"; - this.editorView = null; - this.isFocused = false; - this.destroyed = false; - /** - * The editor is considered initialized after the `create` event has been emitted. - */ - this.isInitialized = false; - this.extensionStorage = {}; - /** - * A unique ID for this editor instance. - */ - this.instanceId = Math.random().toString(36).slice(2, 9); - this.options = { - element: typeof document !== "undefined" ? document.createElement("div") : null, - content: "", - injectCSS: true, - injectNonce: void 0, - extensions: [], - autofocus: false, - editable: true, - textDirection: void 0, - editorProps: {}, - parseOptions: {}, - coreExtensionOptions: {}, - enableInputRules: true, - enablePasteRules: true, - enableCoreExtensions: true, - enableContentCheck: false, - emitContentError: false, - onBeforeCreate: () => null, - onCreate: () => null, - onMount: () => null, - onUnmount: () => null, - onUpdate: () => null, - onSelectionUpdate: () => null, - onTransaction: () => null, - onFocus: () => null, - onBlur: () => null, - onDestroy: () => null, - onContentError: ({ error }) => { - throw error; - }, - onPaste: () => null, - onDrop: () => null, - onDelete: () => null, - enableExtensionDispatchTransaction: true - }; - this.isCapturingTransaction = false; - this.capturedTransaction = null; - /** - * Returns a set of utilities for working with positions and ranges. - */ - this.utils = { - getUpdatedPosition, - createMappablePosition - }; - this.setOptions(options); - this.createExtensionManager(); - this.createCommandManager(); - this.createSchema(); - this.on("beforeCreate", this.options.onBeforeCreate); - this.emit("beforeCreate", { editor: this }); - this.on("mount", this.options.onMount); - this.on("unmount", this.options.onUnmount); - this.on("contentError", this.options.onContentError); - this.on("create", this.options.onCreate); - this.on("update", this.options.onUpdate); - this.on("selectionUpdate", this.options.onSelectionUpdate); - this.on("transaction", this.options.onTransaction); - this.on("focus", this.options.onFocus); - this.on("blur", this.options.onBlur); - this.on("destroy", this.options.onDestroy); - this.on("drop", ({ event, slice, moved }) => this.options.onDrop(event, slice, moved)); - this.on("paste", ({ event, slice }) => this.options.onPaste(event, slice)); - this.on("delete", this.options.onDelete); - const initialDoc = this.createDoc(); - const selection = resolveFocusPosition(initialDoc, this.options.autofocus); - this.editorState = EditorState.create({ - doc: initialDoc, - schema: this.schema, - selection: selection || void 0 - }); - if (this.options.element) { - this.mount(this.options.element); - } - } - /** - * Attach the editor to the DOM, creating a new editor view. - */ - mount(el) { - if (typeof document === "undefined") { - throw new Error( - `[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.` - ); - } - this.createView(el); - this.emit("mount", { editor: this }); - if (this.css && !document.head.contains(this.css)) { - document.head.appendChild(this.css); - } - window.setTimeout(() => { - if (this.isDestroyed) { - return; - } - if (this.options.autofocus !== false && this.options.autofocus !== null) { - this.commands.focus(this.options.autofocus); - } - this.emit("create", { editor: this }); - this.isInitialized = true; - }, 0); - } - /** - * Remove the editor from the DOM, but still allow remounting at a different point in time - */ - unmount() { - if (this.editorView) { - const dom = this.editorView.dom; - if (dom == null ? void 0 : dom.editor) { - delete dom.editor; - } - this.editorView.destroy(); - } - this.editorView = null; - this.isInitialized = false; - if (this.css && !document.querySelectorAll(`.${this.className}`).length) { - try { - if (typeof this.css.remove === "function") { - this.css.remove(); - } else if (this.css.parentNode) { - this.css.parentNode.removeChild(this.css); - } - } catch (error) { - console.warn("Failed to remove CSS element:", error); - } - } - this.css = null; - this.emit("unmount", { editor: this }); - } - /** - * Returns the editor storage. - */ - get storage() { - return this.extensionStorage; - } - /** - * An object of all registered commands. - */ - get commands() { - return this.commandManager.commands; - } - /** - * Create a command chain to call multiple commands at once. - */ - chain() { - return this.commandManager.chain(); - } - /** - * Check if a command or a command chain can be executed. Without executing it. - */ - can() { - return this.commandManager.can(); - } - /** - * Inject CSS styles. - */ - injectCSS() { - if (this.options.injectCSS && typeof document !== "undefined") { - this.css = createStyleTag(style, this.options.injectNonce); - } - } - /** - * Update editor options. - * - * @param options A list of options - */ - setOptions(options = {}) { - this.options = { - ...this.options, - ...options - }; - if (!this.editorView || !this.state || this.isDestroyed) { - return; - } - if (this.options.editorProps) { - this.view.setProps(this.options.editorProps); - } - this.view.updateState(this.state); - } - /** - * Update editable state of the editor. - */ - setEditable(editable, emitUpdate = true) { - this.setOptions({ editable }); - if (emitUpdate) { - this.emit("update", { editor: this, transaction: this.state.tr, appendedTransactions: [] }); - } - } - /** - * Returns whether the editor is editable. - */ - get isEditable() { - return this.options.editable && this.view && this.view.editable; - } - /** - * Returns the editor view. - */ - get view() { - if (this.editorView) { - return this.editorView; - } - return new Proxy( - { - state: this.editorState, - updateState: (state) => { - this.editorState = state; - }, - dispatch: (tr) => { - this.dispatchTransaction(tr); - }, - // Stub some commonly accessed properties to prevent errors - composing: false, - dragging: null, - editable: true, - isDestroyed: false - }, - { - get: (obj, key) => { - if (this.editorView) { - return this.editorView[key]; - } - if (key === "state") { - return this.editorState; - } - if (key in obj) { - return Reflect.get(obj, key); - } - throw new Error( - `[tiptap error]: The editor view is not available. Cannot access view['${key}']. The editor may not be mounted yet.` - ); - } - } - ); - } - /** - * Returns the editor state. - */ - get state() { - if (this.editorView) { - this.editorState = this.view.state; - } - return this.editorState; - } - /** - * Register a ProseMirror plugin. - * - * @param plugin A ProseMirror plugin - * @param handlePlugins Control how to merge the plugin into the existing plugins. - * @returns The new editor state - */ - registerPlugin(plugin, handlePlugins) { - const plugins = isFunction(handlePlugins) ? handlePlugins(plugin, [...this.state.plugins]) : [...this.state.plugins, plugin]; - const state = this.state.reconfigure({ plugins }); - this.view.updateState(state); - return state; - } - /** - * Unregister a ProseMirror plugin. - * - * @param nameOrPluginKeyToRemove The plugins name - * @returns The new editor state or undefined if the editor is destroyed - */ - unregisterPlugin(nameOrPluginKeyToRemove) { - if (this.isDestroyed) { - return void 0; - } - const prevPlugins = this.state.plugins; - let plugins = prevPlugins; - [].concat(nameOrPluginKeyToRemove).forEach((nameOrPluginKey) => { - const name = typeof nameOrPluginKey === "string" ? `${nameOrPluginKey}$` : nameOrPluginKey.key; - plugins = plugins.filter((plugin) => !plugin.key.startsWith(name)); - }); - if (prevPlugins.length === plugins.length) { - return void 0; - } - const state = this.state.reconfigure({ - plugins - }); - this.view.updateState(state); - return state; - } - /** - * Creates an extension manager. - */ - createExtensionManager() { - var _a, _b, _c, _d; - const coreExtensions = this.options.enableCoreExtensions ? [ - Editable, - ClipboardTextSerializer.configure({ - blockSeparator: (_b = (_a = this.options.coreExtensionOptions) == null ? void 0 : _a.clipboardTextSerializer) == null ? void 0 : _b.blockSeparator - }), - Commands, - FocusEvents, - Keymap, - Tabindex.configure({ - value: (_d = (_c = this.options.coreExtensionOptions) == null ? void 0 : _c.tabindex) == null ? void 0 : _d.value - }), - Drop, - Paste, - Delete, - TextDirection.configure({ - direction: this.options.textDirection - }) - ].filter((ext) => { - if (typeof this.options.enableCoreExtensions === "object") { - return this.options.enableCoreExtensions[ext.name] !== false; - } - return true; - }) : []; - const allExtensions = [...coreExtensions, ...this.options.extensions].filter((extension) => { - return ["extension", "node", "mark"].includes(extension == null ? void 0 : extension.type); - }); - this.extensionManager = new ExtensionManager(allExtensions, this); - } - /** - * Creates an command manager. - */ - createCommandManager() { - this.commandManager = new CommandManager({ - editor: this - }); - } - /** - * Creates a ProseMirror schema. - */ - createSchema() { - this.schema = this.extensionManager.schema; - } - /** - * Creates the initial document. - */ - createDoc() { - let doc; - try { - doc = createDocument(this.options.content, this.schema, this.options.parseOptions, { - errorOnInvalidContent: this.options.enableContentCheck - }); - } catch (e) { - if (!(e instanceof Error) || !["[tiptap error]: Invalid JSON content", "[tiptap error]: Invalid HTML content"].includes( - e.message - )) { - throw e; - } - this.emit("contentError", { - editor: this, - error: e, - disableCollaboration: () => { - if ("collaboration" in this.storage && typeof this.storage.collaboration === "object" && this.storage.collaboration) { - ; - this.storage.collaboration.isDisabled = true; - } - this.options.extensions = this.options.extensions.filter( - (extension) => extension.name !== "collaboration" - ); - this.createExtensionManager(); - } - }); - doc = createDocument(this.options.content, this.schema, this.options.parseOptions, { - errorOnInvalidContent: false - }); - } - return doc; - } - /** - * Creates a ProseMirror view. - */ - createView(element) { - const { editorProps, enableExtensionDispatchTransaction } = this.options; - const baseDispatch = editorProps.dispatchTransaction || this.dispatchTransaction.bind(this); - const dispatch = enableExtensionDispatchTransaction ? this.extensionManager.dispatchTransaction(baseDispatch) : baseDispatch; - const baseTransformPastedHTML = editorProps.transformPastedHTML; - const transformPastedHTML = this.extensionManager.transformPastedHTML(baseTransformPastedHTML); - this.editorView = new EditorView(element, { - ...editorProps, - attributes: { - // add `role="textbox"` to the editor element - role: "textbox", - ...editorProps == null ? void 0 : editorProps.attributes - }, - dispatchTransaction: dispatch, - transformPastedHTML, - state: this.editorState, - markViews: this.extensionManager.markViews, - nodeViews: this.extensionManager.nodeViews - }); - const newState = this.state.reconfigure({ - plugins: this.extensionManager.plugins - }); - this.view.updateState(newState); - this.prependClass(); - this.injectCSS(); - const dom = this.view.dom; - dom.editor = this; - } - /** - * Creates all node and mark views. - */ - createNodeViews() { - if (this.view.isDestroyed) { - return; - } - this.view.setProps({ - markViews: this.extensionManager.markViews, - nodeViews: this.extensionManager.nodeViews - }); - } - /** - * Prepend class name to element. - */ - prependClass() { - this.view.dom.className = `${this.className} ${this.view.dom.className}`; - } - captureTransaction(fn) { - this.isCapturingTransaction = true; - fn(); - this.isCapturingTransaction = false; - const tr = this.capturedTransaction; - this.capturedTransaction = null; - return tr; - } - /** - * The callback over which to send transactions (state updates) produced by the view. - * - * @param transaction An editor state transaction - */ - dispatchTransaction(transaction) { - if (this.view.isDestroyed) { - return; - } - if (this.isCapturingTransaction) { - if (!this.capturedTransaction) { - this.capturedTransaction = transaction; - return; - } - transaction.steps.forEach((step) => { - var _a; - return (_a = this.capturedTransaction) == null ? void 0 : _a.step(step); - }); - return; - } - const { state, transactions } = this.state.applyTransaction(transaction); - const selectionHasChanged = !this.state.selection.eq(state.selection); - const rootTrWasApplied = transactions.includes(transaction); - const prevState = this.state; - this.emit("beforeTransaction", { - editor: this, - transaction, - nextState: state - }); - if (!rootTrWasApplied) { - return; - } - this.view.updateState(state); - this.emit("transaction", { - editor: this, - transaction, - appendedTransactions: transactions.slice(1) - }); - if (selectionHasChanged) { - this.emit("selectionUpdate", { - editor: this, - transaction - }); - } - const mostRecentFocusTr = transactions.findLast((tr) => tr.getMeta("focus") || tr.getMeta("blur")); - const focus2 = mostRecentFocusTr == null ? void 0 : mostRecentFocusTr.getMeta("focus"); - const blur2 = mostRecentFocusTr == null ? void 0 : mostRecentFocusTr.getMeta("blur"); - if (focus2) { - this.emit("focus", { - editor: this, - event: focus2.event, - // oxlint-disable-next-lineno-non-null-assertion - transaction: mostRecentFocusTr - }); - } - if (blur2) { - this.emit("blur", { - editor: this, - event: blur2.event, - // oxlint-disable-next-lineno-non-null-assertion - transaction: mostRecentFocusTr - }); - } - if (transaction.getMeta("preventUpdate") || !transactions.some((tr) => tr.docChanged) || prevState.doc.eq(state.doc)) { - return; - } - this.emit("update", { - editor: this, - transaction, - appendedTransactions: transactions.slice(1) - }); - } - /** - * Get attributes of the currently selected node or mark. - */ - getAttributes(nameOrType) { - return getAttributes(this.state, nameOrType); - } - isActive(nameOrAttributes, attributesOrUndefined) { - const name = typeof nameOrAttributes === "string" ? nameOrAttributes : null; - const attributes = typeof nameOrAttributes === "string" ? attributesOrUndefined : nameOrAttributes; - return isActive(this.state, name, attributes); - } - /** - * Get the document as JSON. - */ - getJSON() { - return this.state.doc.toJSON(); - } - /** - * Get the document as HTML. - */ - getHTML() { - return getHTMLFromFragment(this.state.doc.content, this.schema); - } - /** - * Get the document as text. - */ - getText(options) { - const { blockSeparator = "\n\n", textSerializers = {} } = options || {}; - return getText(this.state.doc, { - blockSeparator, - textSerializers: { - ...getTextSerializersFromSchema(this.schema), - ...textSerializers - } - }); - } - /** - * Check if there is no content. - */ - get isEmpty() { - return isNodeEmpty(this.state.doc); - } - /** - * Destroy the editor. - */ - destroy() { - if (this.destroyed) { - return; - } - this.destroyed = true; - this.emit("destroy"); - this.unmount(); - this.removeAllListeners(); - this.extensionManager.destroy(); - this.extensionManager = null; - this.schema = null; - this.commandManager = null; - this.extensionStorage = {}; - } - /** - * Check if the editor is already destroyed. - */ - get isDestroyed() { - var _a, _b; - return (_b = (_a = this.editorView) == null ? void 0 : _a.isDestroyed) != null ? _b : true; - } - $node(selector, attributes) { - var _a; - return ((_a = this.$doc) == null ? void 0 : _a.querySelector(selector, attributes)) || null; - } - $nodes(selector, attributes) { - var _a; - return ((_a = this.$doc) == null ? void 0 : _a.querySelectorAll(selector, attributes)) || null; - } - $pos(pos) { - const $pos = this.state.doc.resolve(pos); - const node = pos > 0 && $pos.nodeAfter && !$pos.nodeAfter.isText ? $pos.nodeAfter : null; - return new NodePos($pos, this, false, node); - } - get $doc() { - return this.$pos(0); - } -}; - -// src/inputRules/markInputRule.ts -function markInputRule(config) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - const attributes = callOrReturn(config.getAttributes, void 0, match); - if (attributes === false || attributes === null) { - return null; - } - const { tr } = state; - const captureGroup = match[match.length - 1]; - const fullMatch = match[0]; - if (captureGroup) { - const startSpaces = fullMatch.search(/\S/); - const textStart = range.from + fullMatch.indexOf(captureGroup); - const textEnd = textStart + captureGroup.length; - const excludedMarks = getMarksBetween(range.from, range.to, state.doc).filter((item) => { - const excluded = item.mark.type.excluded; - return excluded.find((type) => type === config.type && type !== item.mark.type); - }).filter((item) => item.to > textStart); - if (excludedMarks.length) { - return null; - } - if (textEnd < range.to) { - tr.delete(textEnd, range.to); - } - if (textStart > range.from) { - tr.delete(range.from + startSpaces, textStart); - } - const markEnd = range.from + startSpaces + captureGroup.length; - tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {})); - tr.removeStoredMark(config.type); - } - }, - undoable: config.undoable - }); -} - -// src/inputRules/nodeInputRule.ts -function nodeInputRule(config) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - const attributes = callOrReturn(config.getAttributes, void 0, match) || {}; - const { tr } = state; - const start = range.from; - let end = range.to; - const newNode = config.type.create(attributes); - if (match[1]) { - const offset = match[0].lastIndexOf(match[1]); - let matchStart = start + offset; - if (matchStart > end) { - matchStart = end; - } else { - end = matchStart + match[1].length; - } - const lastChar = match[0][match[0].length - 1]; - tr.insertText(lastChar, start + match[0].length - 1); - tr.replaceWith(matchStart, end, newNode); - } else if (match[0]) { - const insertionStart = config.type.isInline ? start : start - 1; - tr.insert(insertionStart, config.type.create(attributes)).delete( - tr.mapping.map(start), - tr.mapping.map(end) - ); - } - tr.scrollIntoView(); - }, - undoable: config.undoable - }); -} - -// src/inputRules/textblockTypeInputRule.ts -function textblockTypeInputRule(config) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - const $start = state.doc.resolve(range.from); - const attributes = callOrReturn(config.getAttributes, void 0, match) || {}; - if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), config.type)) { - return null; - } - state.tr.delete(range.from, range.to).setBlockType(range.from, range.from, config.type, attributes); - }, - undoable: config.undoable - }); -} - -// src/inputRules/textInputRule.ts -function textInputRule(config) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - let insert = config.replace; - let start = range.from; - const end = range.to; - if (match[1]) { - const offset = match[0].lastIndexOf(match[1]); - insert += match[0].slice(offset + match[1].length); - start += offset; - const cutOff = start - end; - if (cutOff > 0) { - insert = match[0].slice(offset - cutOff, offset) + insert; - start = end; - } - } - state.tr.insertText(insert, start, end); - }, - undoable: config.undoable - }); -} - -// src/inputRules/wrappingInputRule.ts -import { canJoin as canJoin2, findWrapping } from "@tiptap/pm/transform"; -function wrappingInputRule(config) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match, chain }) => { - const attributes = callOrReturn(config.getAttributes, void 0, match) || {}; - const tr = state.tr.delete(range.from, range.to); - const $start = tr.doc.resolve(range.from); - const blockRange = $start.blockRange(); - const wrapping = blockRange && findWrapping(blockRange, config.type, attributes); - if (!wrapping) { - return null; - } - tr.wrap(blockRange, wrapping); - if (config.keepMarks && config.editor) { - const { selection, storedMarks } = state; - const { splittableMarks } = config.editor.extensionManager; - const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks(); - if (marks) { - const filteredMarks = marks.filter((mark) => splittableMarks.includes(mark.type.name)); - tr.ensureMarks(filteredMarks); - } - } - if (config.keepAttributes) { - const nodeType = config.type.name === "bulletList" || config.type.name === "orderedList" ? "listItem" : "taskList"; - chain().updateAttributes(nodeType, attributes).run(); - } - const before = tr.doc.resolve(range.from - 1).nodeBefore; - if (before && before.type === config.type && canJoin2(tr.doc, range.from - 1) && (!config.joinPredicate || config.joinPredicate(match, before))) { - tr.join(range.from - 1); - } - }, - undoable: config.undoable - }); -} - -// src/jsx-runtime.ts -function Fragment6(props) { - return props.children; -} -var h = (tag, attributes) => { - if (tag === "slot") { - return 0; - } - if (tag instanceof Function) { - return tag(attributes); - } - const { children, ...rest } = attributes != null ? attributes : {}; - if (tag === "svg") { - throw new Error( - "SVG elements are not supported in the JSX syntax, use the array syntax instead" - ); - } - return [tag, rest, children]; -}; - -// src/lib/ResizableNodeView.ts -var isTouchEvent = (e) => { - return "touches" in e; -}; -var ResizableNodeView = class { - /** - * Creates a new ResizableNodeView instance. - * - * The constructor sets up the resize handles, applies initial sizing from - * node attributes, and configures all resize behavior options. - * - * @param options - Configuration options for the resizable node view - */ - constructor(options) { - /** Active resize handle directions */ - this.directions = [ - "bottom-left", - "bottom-right", - "top-left", - "top-right" - ]; - /** Minimum allowed dimensions */ - this.minSize = { - height: 8, - width: 8 - }; - /** Whether to always preserve aspect ratio */ - this.preserveAspectRatio = false; - /** CSS class names for elements */ - this.classNames = { - container: "", - wrapper: "", - handle: "", - resizing: "" - }; - /** Initial width of the element (for aspect ratio calculation) */ - this.initialWidth = 0; - /** Initial height of the element (for aspect ratio calculation) */ - this.initialHeight = 0; - /** Calculated aspect ratio (width / height) */ - this.aspectRatio = 1; - /** Whether a resize operation is currently active */ - this.isResizing = false; - /** The handle currently being dragged */ - this.activeHandle = null; - /** Starting mouse X position when resize began */ - this.startX = 0; - /** Starting mouse Y position when resize began */ - this.startY = 0; - /** Element width when resize began */ - this.startWidth = 0; - /** Element height when resize began */ - this.startHeight = 0; - /** Whether Shift key is currently pressed (for temporary aspect ratio lock) */ - this.isShiftKeyPressed = false; - /** Last known editable state of the editor */ - this.lastEditableState = void 0; - /** Map of handle elements by direction */ - this.handleMap = /* @__PURE__ */ new Map(); - /** - * Handles mouse movement during an active resize. - * - * Calculates the delta from the starting position, computes new dimensions - * based on the active handle direction, applies constraints and aspect ratio, - * then updates the element's style and calls the onResize callback. - * - * @param event - The mouse move event - */ - this.handleMouseMove = (event) => { - if (!this.isResizing || !this.activeHandle) { - return; - } - const deltaX = event.clientX - this.startX; - const deltaY = event.clientY - this.startY; - this.handleResize(deltaX, deltaY); - }; - this.handleTouchMove = (event) => { - if (!this.isResizing || !this.activeHandle) { - return; - } - const touch = event.touches[0]; - if (!touch) { - return; - } - const deltaX = touch.clientX - this.startX; - const deltaY = touch.clientY - this.startY; - this.handleResize(deltaX, deltaY); - }; - /** - * Completes the resize operation when the mouse button is released. - * - * Captures final dimensions, calls the onCommit callback to persist changes, - * removes the resizing state and class, and cleans up document-level listeners. - */ - this.handleMouseUp = () => { - if (!this.isResizing) { - return; - } - const finalWidth = this.element.offsetWidth; - const finalHeight = this.element.offsetHeight; - this.onCommit(finalWidth, finalHeight); - this.isResizing = false; - this.activeHandle = null; - this.container.dataset.resizeState = "false"; - if (this.classNames.resizing) { - this.container.classList.remove(this.classNames.resizing); - } - document.removeEventListener("mousemove", this.handleMouseMove); - document.removeEventListener("mouseup", this.handleMouseUp); - document.removeEventListener("keydown", this.handleKeyDown); - document.removeEventListener("keyup", this.handleKeyUp); - }; - /** - * Tracks Shift key state to enable temporary aspect ratio locking. - * - * When Shift is pressed during resize, aspect ratio is preserved even if - * preserveAspectRatio is false. - * - * @param event - The keyboard event - */ - this.handleKeyDown = (event) => { - if (event.key === "Shift") { - this.isShiftKeyPressed = true; - } - }; - /** - * Tracks Shift key release to disable temporary aspect ratio locking. - * - * @param event - The keyboard event - */ - this.handleKeyUp = (event) => { - if (event.key === "Shift") { - this.isShiftKeyPressed = false; - } - }; - var _a, _b, _c, _d, _e, _f; - this.node = options.node; - this.editor = options.editor; - this.element = options.element; - this.element.draggable = false; - this.contentElement = options.contentElement; - this.getPos = options.getPos; - this.onResize = options.onResize; - this.onCommit = options.onCommit; - this.onUpdate = options.onUpdate; - if ((_a = options.options) == null ? void 0 : _a.min) { - this.minSize = { - ...this.minSize, - ...options.options.min - }; - } - if ((_b = options.options) == null ? void 0 : _b.max) { - this.maxSize = options.options.max; - } - if ((_c = options == null ? void 0 : options.options) == null ? void 0 : _c.directions) { - this.directions = options.options.directions; - } - if ((_d = options.options) == null ? void 0 : _d.preserveAspectRatio) { - this.preserveAspectRatio = options.options.preserveAspectRatio; - } - if ((_e = options.options) == null ? void 0 : _e.className) { - this.classNames = { - container: options.options.className.container || "", - wrapper: options.options.className.wrapper || "", - handle: options.options.className.handle || "", - resizing: options.options.className.resizing || "" - }; - } - if ((_f = options.options) == null ? void 0 : _f.createCustomHandle) { - this.createCustomHandle = options.options.createCustomHandle; - } - this.wrapper = this.createWrapper(); - this.container = this.createContainer(); - this.applyInitialSize(); - this.attachHandles(); - this.editor.on("update", this.handleEditorUpdate.bind(this)); - } - /** - * Returns the top-level DOM node that should be placed in the editor. - * - * This is required by the ProseMirror NodeView interface. The container - * includes the wrapper, handles, and the actual content element. - * - * @returns The container element to be inserted into the editor - */ - get dom() { - return this.container; - } - get contentDOM() { - var _a; - return (_a = this.contentElement) != null ? _a : null; - } - handleEditorUpdate() { - const isEditable = this.editor.isEditable; - if (isEditable === this.lastEditableState) { - return; - } - this.lastEditableState = isEditable; - if (!isEditable) { - this.removeHandles(); - } else if (isEditable && this.handleMap.size === 0) { - this.attachHandles(); - } - } - /** - * Called when the node's content or attributes change. - * - * Updates the internal node reference. If a custom `onUpdate` callback - * was provided, it will be called to handle additional update logic. - * - * @param node - The new/updated node - * @param decorations - Node decorations - * @param innerDecorations - Inner decorations - * @returns `false` if the node type has changed (requires full rebuild), otherwise the result of `onUpdate` or `true` - */ - update(node, decorations, innerDecorations) { - if (node.type !== this.node.type) { - return false; - } - this.node = node; - if (this.onUpdate) { - return this.onUpdate(node, decorations, innerDecorations); - } - return true; - } - /** - * Cleanup method called when the node view is being removed. - * - * Removes all event listeners to prevent memory leaks. This is required - * by the ProseMirror NodeView interface. If a resize is active when - * destroy is called, it will be properly cancelled. - */ - destroy() { - if (this.isResizing) { - this.container.dataset.resizeState = "false"; - if (this.classNames.resizing) { - this.container.classList.remove(this.classNames.resizing); - } - document.removeEventListener("mousemove", this.handleMouseMove); - document.removeEventListener("mouseup", this.handleMouseUp); - document.removeEventListener("keydown", this.handleKeyDown); - document.removeEventListener("keyup", this.handleKeyUp); - this.isResizing = false; - this.activeHandle = null; - } - this.editor.off("update", this.handleEditorUpdate.bind(this)); - this.container.remove(); - } - /** - * Creates the outer container element. - * - * The container is the top-level element returned by the NodeView and - * wraps the entire resizable node. It's set up with flexbox to handle - * alignment and includes data attributes for styling and identification. - * - * @returns The container element - */ - createContainer() { - const element = document.createElement("div"); - element.dataset.resizeContainer = ""; - element.dataset.node = this.node.type.name; - element.style.display = this.node.type.isInline ? "inline-flex" : "flex"; - if (this.classNames.container) { - element.className = this.classNames.container; - } - element.appendChild(this.wrapper); - return element; - } - /** - * Creates the wrapper element that contains the content and handles. - * - * The wrapper uses relative positioning so that resize handles can be - * positioned absolutely within it. This is the direct parent of the - * content element being made resizable. - * - * @returns The wrapper element - */ - createWrapper() { - const element = document.createElement("div"); - element.style.position = "relative"; - element.style.display = "block"; - element.dataset.resizeWrapper = ""; - if (this.classNames.wrapper) { - element.className = this.classNames.wrapper; - } - element.appendChild(this.element); - return element; - } - /** - * Creates a resize handle element for a specific direction. - * - * Each handle is absolutely positioned and includes a data attribute - * identifying its direction for styling purposes. - * - * @param direction - The resize direction for this handle - * @returns The handle element - */ - createHandle(direction) { - const handle = document.createElement("div"); - handle.dataset.resizeHandle = direction; - handle.style.position = "absolute"; - if (this.classNames.handle) { - handle.className = this.classNames.handle; - } - return handle; - } - /** - * Positions a handle element according to its direction. - * - * Corner handles (e.g., 'top-left') are positioned at the intersection - * of two edges. Edge handles (e.g., 'top') span the full width or height. - * - * @param handle - The handle element to position - * @param direction - The direction determining the position - */ - positionHandle(handle, direction) { - const isTop = direction.includes("top"); - const isBottom = direction.includes("bottom"); - const isLeft = direction.includes("left"); - const isRight = direction.includes("right"); - if (isTop) { - handle.style.top = "0"; - } - if (isBottom) { - handle.style.bottom = "0"; - } - if (isLeft) { - handle.style.left = "0"; - } - if (isRight) { - handle.style.right = "0"; - } - if (direction === "top" || direction === "bottom") { - handle.style.left = "0"; - handle.style.right = "0"; - } - if (direction === "left" || direction === "right") { - handle.style.top = "0"; - handle.style.bottom = "0"; - } - } - /** - * Creates and attaches all resize handles to the wrapper. - * - * Iterates through the configured directions, creates a handle for each, - * positions it, attaches the mousedown listener, and appends it to the DOM. - */ - attachHandles() { - this.directions.forEach((direction) => { - let handle; - if (this.createCustomHandle) { - handle = this.createCustomHandle(direction); - } else { - handle = this.createHandle(direction); - } - if (!(handle instanceof HTMLElement)) { - console.warn( - `[ResizableNodeView] createCustomHandle("${direction}") did not return an HTMLElement. Falling back to default handle.` - ); - handle = this.createHandle(direction); - } - if (!this.createCustomHandle) { - this.positionHandle(handle, direction); - } - handle.addEventListener("mousedown", (event) => this.handleResizeStart(event, direction)); - handle.addEventListener( - "touchstart", - (event) => this.handleResizeStart(event, direction) - ); - this.handleMap.set(direction, handle); - this.wrapper.appendChild(handle); - }); - } - /** - * Removes all resize handles from the wrapper. - * - * Cleans up the handle map and removes each handle element from the DOM. - */ - removeHandles() { - this.handleMap.forEach((el) => el.remove()); - this.handleMap.clear(); - } - /** - * Applies initial sizing from node attributes to the element. - * - * If width/height attributes exist on the node, they're applied to the element. - * Otherwise, the element's natural/current dimensions are measured. The aspect - * ratio is calculated for later use in aspect-ratio-preserving resizes. - */ - applyInitialSize() { - const width = this.node.attrs.width; - const height = this.node.attrs.height; - if (width) { - this.element.style.width = `${width}px`; - this.initialWidth = width; - } else { - this.initialWidth = this.element.offsetWidth; - } - if (height) { - this.element.style.height = `${height}px`; - this.initialHeight = height; - } else { - this.initialHeight = this.element.offsetHeight; - } - if (this.initialWidth > 0 && this.initialHeight > 0) { - this.aspectRatio = this.initialWidth / this.initialHeight; - } - } - /** - * Initiates a resize operation when a handle is clicked. - * - * Captures the starting mouse position and element dimensions, sets up - * the resize state, adds the resizing class and state attribute, and - * attaches document-level listeners for mouse movement and keyboard input. - * - * @param event - The mouse down event - * @param direction - The direction of the handle being dragged - */ - handleResizeStart(event, direction) { - event.preventDefault(); - event.stopPropagation(); - this.isResizing = true; - this.activeHandle = direction; - if (isTouchEvent(event)) { - this.startX = event.touches[0].clientX; - this.startY = event.touches[0].clientY; - } else { - this.startX = event.clientX; - this.startY = event.clientY; - } - this.startWidth = this.element.offsetWidth; - this.startHeight = this.element.offsetHeight; - if (this.startWidth > 0 && this.startHeight > 0) { - this.aspectRatio = this.startWidth / this.startHeight; - } - const pos = this.getPos(); - if (pos !== void 0) { - } - this.container.dataset.resizeState = "true"; - if (this.classNames.resizing) { - this.container.classList.add(this.classNames.resizing); - } - document.addEventListener("mousemove", this.handleMouseMove); - document.addEventListener("touchmove", this.handleTouchMove); - document.addEventListener("mouseup", this.handleMouseUp); - document.addEventListener("keydown", this.handleKeyDown); - document.addEventListener("keyup", this.handleKeyUp); - } - handleResize(deltaX, deltaY) { - if (!this.activeHandle) { - return; - } - const shouldPreserveAspectRatio = this.preserveAspectRatio || this.isShiftKeyPressed; - const { width, height } = this.calculateNewDimensions(this.activeHandle, deltaX, deltaY); - const constrained = this.applyConstraints(width, height, shouldPreserveAspectRatio); - this.element.style.width = `${constrained.width}px`; - this.element.style.height = `${constrained.height}px`; - if (this.onResize) { - this.onResize(constrained.width, constrained.height); - } - } - /** - * Calculates new dimensions based on mouse delta and resize direction. - * - * Takes the starting dimensions and applies the mouse movement delta - * according to the handle direction. For corner handles, both dimensions - * are affected. For edge handles, only one dimension changes. If aspect - * ratio should be preserved, delegates to applyAspectRatio. - * - * @param direction - The active resize handle direction - * @param deltaX - Horizontal mouse movement since resize start - * @param deltaY - Vertical mouse movement since resize start - * @returns The calculated width and height - */ - calculateNewDimensions(direction, deltaX, deltaY) { - let newWidth = this.startWidth; - let newHeight = this.startHeight; - const isRight = direction.includes("right"); - const isLeft = direction.includes("left"); - const isBottom = direction.includes("bottom"); - const isTop = direction.includes("top"); - if (isRight) { - newWidth = this.startWidth + deltaX; - } else if (isLeft) { - newWidth = this.startWidth - deltaX; - } - if (isBottom) { - newHeight = this.startHeight + deltaY; - } else if (isTop) { - newHeight = this.startHeight - deltaY; - } - if (direction === "right" || direction === "left") { - newWidth = this.startWidth + (isRight ? deltaX : -deltaX); - } - if (direction === "top" || direction === "bottom") { - newHeight = this.startHeight + (isBottom ? deltaY : -deltaY); - } - const shouldPreserveAspectRatio = this.preserveAspectRatio || this.isShiftKeyPressed; - if (shouldPreserveAspectRatio) { - return this.applyAspectRatio(newWidth, newHeight, direction); - } - return { width: newWidth, height: newHeight }; - } - /** - * Applies min/max constraints to dimensions. - * - * When aspect ratio is NOT preserved, constraints are applied independently - * to width and height. When aspect ratio IS preserved, constraints are - * applied while maintaining the aspect ratio—if one dimension hits a limit, - * the other is recalculated proportionally. - * - * This ensures that aspect ratio is never broken when constrained. - * - * @param width - The unconstrained width - * @param height - The unconstrained height - * @param preserveAspectRatio - Whether to maintain aspect ratio while constraining - * @returns The constrained dimensions - */ - applyConstraints(width, height, preserveAspectRatio) { - var _a, _b, _c, _d; - if (!preserveAspectRatio) { - let constrainedWidth2 = Math.max(this.minSize.width, width); - let constrainedHeight2 = Math.max(this.minSize.height, height); - if ((_a = this.maxSize) == null ? void 0 : _a.width) { - constrainedWidth2 = Math.min(this.maxSize.width, constrainedWidth2); - } - if ((_b = this.maxSize) == null ? void 0 : _b.height) { - constrainedHeight2 = Math.min(this.maxSize.height, constrainedHeight2); - } - return { width: constrainedWidth2, height: constrainedHeight2 }; - } - let constrainedWidth = width; - let constrainedHeight = height; - if (constrainedWidth < this.minSize.width) { - constrainedWidth = this.minSize.width; - constrainedHeight = constrainedWidth / this.aspectRatio; - } - if (constrainedHeight < this.minSize.height) { - constrainedHeight = this.minSize.height; - constrainedWidth = constrainedHeight * this.aspectRatio; - } - if (((_c = this.maxSize) == null ? void 0 : _c.width) && constrainedWidth > this.maxSize.width) { - constrainedWidth = this.maxSize.width; - constrainedHeight = constrainedWidth / this.aspectRatio; - } - if (((_d = this.maxSize) == null ? void 0 : _d.height) && constrainedHeight > this.maxSize.height) { - constrainedHeight = this.maxSize.height; - constrainedWidth = constrainedHeight * this.aspectRatio; - } - return { width: constrainedWidth, height: constrainedHeight }; - } - /** - * Adjusts dimensions to maintain the original aspect ratio. - * - * For horizontal handles (left/right), uses width as the primary dimension - * and calculates height from it. For vertical handles (top/bottom), uses - * height as primary and calculates width. For corner handles, uses width - * as the primary dimension. - * - * @param width - The new width - * @param height - The new height - * @param direction - The active resize direction - * @returns Dimensions adjusted to preserve aspect ratio - */ - applyAspectRatio(width, height, direction) { - const isHorizontal = direction === "left" || direction === "right"; - const isVertical = direction === "top" || direction === "bottom"; - if (isHorizontal) { - return { - width, - height: width / this.aspectRatio - }; - } - if (isVertical) { - return { - width: height * this.aspectRatio, - height - }; - } - return { - width, - height: width / this.aspectRatio - }; - } -}; -var ResizableNodeview = ResizableNodeView; - -// src/utilities/attrsEqual.ts -function attrsEqual(a, b) { - if (a === b) { - return true; - } - if (!a || !b) { - return false; - } - const keysA = Object.keys(a); - const keysB = Object.keys(b); - if (keysA.length !== keysB.length) { - return false; - } - return keysA.every( - (key) => Object.prototype.hasOwnProperty.call(b, key) && Object.is(a[key], b[key]) - ); -} - -// src/utilities/canInsertNode.ts -import { NodeSelection as NodeSelection4 } from "@tiptap/pm/state"; -function canInsertNode(state, nodeType) { - const { selection } = state; - const { $from } = selection; - if (selection instanceof NodeSelection4) { - const index = $from.index(); - const parent = $from.parent; - return parent.canReplaceWith(index, index + 1, nodeType); - } - let depth = $from.depth; - while (depth >= 0) { - const index = $from.index(depth); - const parent = $from.node(depth); - const match = parent.contentMatchAt(index); - if (match.matchType(nodeType)) { - return true; - } - depth -= 1; - } - return false; -} - -// src/utilities/escapeForRegEx.ts -function escapeForRegEx(string) { - return string.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"); -} - -// src/utilities/getStyleProperty.ts -function getStyleProperty(element, propertyName) { - const styleAttr = element.getAttribute("style"); - if (!styleAttr) { - return null; - } - const decls = styleAttr.split(";").map((decl) => decl.trim()).filter(Boolean); - const target = propertyName.toLowerCase(); - for (let i = decls.length - 1; i >= 0; i -= 1) { - const decl = decls[i]; - const colonIndex = decl.indexOf(":"); - if (colonIndex === -1) { - continue; - } - const prop = decl.slice(0, colonIndex).trim().toLowerCase(); - if (prop === target) { - return decl.slice(colonIndex + 1).trim(); - } - } - return null; -} - -// src/utilities/htmlEntities.ts -function decodeHtmlEntities(text) { - return text.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/&/g, "&"); -} -function encodeHtmlEntities(text) { - return text.replace(/&/g, "&").replace(//g, ">"); -} - -// src/utilities/isFirefox.ts -function isFirefox() { - return typeof navigator !== "undefined" ? /Firefox/.test(navigator.userAgent) : false; -} - -// src/utilities/isString.ts -function isString(value) { - return typeof value === "string"; -} - -// src/utilities/markdown/index.ts -var markdown_exports = {}; -__export(markdown_exports, { - createAtomBlockMarkdownSpec: () => createAtomBlockMarkdownSpec, - createBlockMarkdownSpec: () => createBlockMarkdownSpec, - createInlineMarkdownSpec: () => createInlineMarkdownSpec, - parseAttributes: () => parseAttributes, - parseIndentedBlocks: () => parseIndentedBlocks, - renderNestedMarkdownContent: () => renderNestedMarkdownContent, - serializeAttributes: () => serializeAttributes -}); - -// src/utilities/markdown/attributeUtils.ts -function parseAttributes(attrString) { - if (!(attrString == null ? void 0 : attrString.trim())) { - return {}; - } - const attributes = {}; - const quotedStrings = []; - const tempString = attrString.replace(/["']([^"']*)["']/g, (match) => { - quotedStrings.push(match); - return `__QUOTED_${quotedStrings.length - 1}__`; - }); - const classMatches = tempString.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g); - if (classMatches) { - const classes = classMatches.map((match) => match.trim().slice(1)); - attributes.class = classes.join(" "); - } - const idMatch = tempString.match(/(?:^|\s)#([a-zA-Z][\w-]*)/); - if (idMatch) { - attributes.id = idMatch[1]; - } - const kvRegex = /([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g; - const kvMatches = Array.from(tempString.matchAll(kvRegex)); - kvMatches.forEach(([, key, quotedRef]) => { - var _a; - const quotedIndex = parseInt(((_a = quotedRef.match(/__QUOTED_(\d+)__/)) == null ? void 0 : _a[1]) || "0", 10); - const quotedValue = quotedStrings[quotedIndex]; - if (quotedValue) { - attributes[key] = quotedValue.slice(1, -1); - } - }); - const cleanString = tempString.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g, "").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g, "").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g, "").trim(); - if (cleanString) { - const booleanAttrs = cleanString.split(/\s+/).filter(Boolean); - booleanAttrs.forEach((attr) => { - if (attr.match(/^[a-zA-Z][\w-]*$/)) { - attributes[attr] = true; - } - }); - } - return attributes; -} -function serializeAttributes(attributes) { - if (!attributes || Object.keys(attributes).length === 0) { - return ""; - } - const parts = []; - if (attributes.class) { - const classes = String(attributes.class).split(/\s+/).filter(Boolean); - classes.forEach((cls) => parts.push(`.${cls}`)); - } - if (attributes.id) { - parts.push(`#${attributes.id}`); - } - Object.entries(attributes).forEach(([key, value]) => { - if (key === "class" || key === "id") { - return; - } - if (value === true) { - parts.push(key); - } else if (value !== false && value != null) { - parts.push(`${key}="${String(value)}"`); - } - }); - return parts.join(" "); -} - -// src/utilities/markdown/createAtomBlockMarkdownSpec.ts -function createAtomBlockMarkdownSpec(options) { - const { - nodeName, - name: markdownName, - parseAttributes: parseAttributes2 = parseAttributes, - serializeAttributes: serializeAttributes2 = serializeAttributes, - defaultAttributes = {}, - requiredAttributes = [], - allowedAttributes - } = options; - const blockName = markdownName || nodeName; - const filterAttributes = (attrs) => { - if (!allowedAttributes) { - return attrs; - } - const filtered = {}; - allowedAttributes.forEach((key) => { - if (key in attrs) { - filtered[key] = attrs[key]; - } - }); - return filtered; - }; - return { - parseMarkdown: (token, h2) => { - const attrs = { ...defaultAttributes, ...token.attributes }; - return h2.createNode(nodeName, attrs, []); - }, - markdownTokenizer: { - name: nodeName, - level: "block", - start(src) { - var _a; - const regex = new RegExp(`^:::${blockName}(?:\\s|$)`, "m"); - const index = (_a = src.match(regex)) == null ? void 0 : _a.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, _tokens, _lexer) { - const regex = new RegExp(`^:::${blockName}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`); - const match = src.match(regex); - if (!match) { - return void 0; - } - const attrString = match[1] || ""; - const attributes = parseAttributes2(attrString); - const missingRequired = requiredAttributes.find((required) => !(required in attributes)); - if (missingRequired) { - return void 0; - } - return { - type: nodeName, - raw: match[0], - attributes - }; - } - }, - renderMarkdown: (node) => { - const filteredAttrs = filterAttributes(node.attrs || {}); - const attrs = serializeAttributes2(filteredAttrs); - const attrString = attrs ? ` {${attrs}}` : ""; - return `:::${blockName}${attrString} :::`; - } - }; -} - -// src/utilities/markdown/createBlockMarkdownSpec.ts -function createBlockMarkdownSpec(options) { - const { - nodeName, - name: markdownName, - getContent, - parseAttributes: parseAttributes2 = parseAttributes, - serializeAttributes: serializeAttributes2 = serializeAttributes, - defaultAttributes = {}, - content = "block", - allowedAttributes - } = options; - const blockName = markdownName || nodeName; - const filterAttributes = (attrs) => { - if (!allowedAttributes) { - return attrs; - } - const filtered = {}; - allowedAttributes.forEach((key) => { - if (key in attrs) { - filtered[key] = attrs[key]; - } - }); - return filtered; - }; - return { - parseMarkdown: (token, h2) => { - let nodeContent; - if (getContent) { - const contentResult = getContent(token); - nodeContent = typeof contentResult === "string" ? [{ type: "text", text: contentResult }] : contentResult; - } else if (content === "block") { - nodeContent = h2.parseChildren(token.tokens || []); - } else { - nodeContent = h2.parseInline(token.tokens || []); - } - const attrs = { ...defaultAttributes, ...token.attributes }; - return h2.createNode(nodeName, attrs, nodeContent); - }, - markdownTokenizer: { - name: nodeName, - level: "block", - start(src) { - var _a; - const regex = new RegExp(`^:::${blockName}`, "m"); - const index = (_a = src.match(regex)) == null ? void 0 : _a.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, _tokens, lexer) { - var _a; - const openingRegex = new RegExp(`^:::${blockName}(?:\\s+\\{([^}]*)\\})?\\s*\\n`); - const openingMatch = src.match(openingRegex); - if (!openingMatch) { - return void 0; - } - const [openingTag, attrString = ""] = openingMatch; - const attributes = parseAttributes2(attrString); - let level = 1; - const position = openingTag.length; - let matchedContent = ""; - const blockPattern = /^:::([\w-]*)(\s.*)?/gm; - const remaining = src.slice(position); - blockPattern.lastIndex = 0; - for (; ; ) { - const match = blockPattern.exec(remaining); - if (match === null) { - break; - } - const matchPos = match.index; - const blockType = match[1]; - if ((_a = match[2]) == null ? void 0 : _a.endsWith(":::")) { - continue; - } - if (blockType) { - level += 1; - } else { - level -= 1; - if (level === 0) { - const rawContent = remaining.slice(0, matchPos); - matchedContent = rawContent.trim(); - const fullMatch = src.slice(0, position + matchPos + match[0].length); - let contentTokens = []; - if (matchedContent) { - if (content === "block") { - contentTokens = lexer.blockTokens(rawContent); - contentTokens.forEach((token) => { - if (token.text && (!token.tokens || token.tokens.length === 0)) { - token.tokens = lexer.inlineTokens(token.text); - } - }); - while (contentTokens.length > 0) { - const lastToken = contentTokens[contentTokens.length - 1]; - if (lastToken.type === "paragraph" && (!lastToken.text || lastToken.text.trim() === "")) { - contentTokens.pop(); - } else { - break; - } - } - } else { - contentTokens = lexer.inlineTokens(matchedContent); - } - } - return { - type: nodeName, - raw: fullMatch, - attributes, - content: matchedContent, - tokens: contentTokens - }; - } - } - } - return void 0; - } - }, - renderMarkdown: (node, h2) => { - const filteredAttrs = filterAttributes(node.attrs || {}); - const attrs = serializeAttributes2(filteredAttrs); - const attrString = attrs ? ` {${attrs}}` : ""; - const renderedContent = h2.renderChildren(node.content || [], "\n\n"); - return `:::${blockName}${attrString} - -${renderedContent} - -:::`; - } - }; -} - -// src/utilities/markdown/createInlineMarkdownSpec.ts -function parseShortcodeAttributes(attrString) { - if (!attrString.trim()) { - return {}; - } - const attributes = {}; - const regex = /(\w+)=(?:"([^"]*)"|'([^']*)')/g; - let match = regex.exec(attrString); - while (match !== null) { - const [, key, doubleQuoted, singleQuoted] = match; - attributes[key] = doubleQuoted || singleQuoted; - match = regex.exec(attrString); - } - return attributes; -} -function serializeShortcodeAttributes(attrs) { - return Object.entries(attrs).filter(([, value]) => value !== void 0 && value !== null).map(([key, value]) => `${key}="${value}"`).join(" "); -} -function createInlineMarkdownSpec(options) { - const { - nodeName, - name: shortcodeName, - getContent, - parseAttributes: parseAttributes2 = parseShortcodeAttributes, - serializeAttributes: serializeAttributes2 = serializeShortcodeAttributes, - defaultAttributes = {}, - selfClosing = false, - allowedAttributes - } = options; - const shortcode = shortcodeName || nodeName; - const filterAttributes = (attrs) => { - if (!allowedAttributes) { - return attrs; - } - const filtered = {}; - allowedAttributes.forEach((attr) => { - const attrName = typeof attr === "string" ? attr : attr.name; - const skipIfDefault = typeof attr === "string" ? void 0 : attr.skipIfDefault; - if (attrName in attrs) { - const value = attrs[attrName]; - if (skipIfDefault !== void 0 && value === skipIfDefault) { - return; - } - filtered[attrName] = value; - } - }); - return filtered; - }; - const escapedShortcode = shortcode.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); - return { - parseMarkdown: (token, h2) => { - const attrs = { ...defaultAttributes, ...token.attributes }; - if (selfClosing) { - return h2.createNode(nodeName, attrs); - } - const content = getContent ? getContent(token) : token.content || ""; - if (content) { - return h2.createNode(nodeName, attrs, [h2.createTextNode(content)]); - } - return h2.createNode(nodeName, attrs, []); - }, - markdownTokenizer: { - name: nodeName, - level: "inline", - start(src) { - const startPattern = selfClosing ? new RegExp(`\\[${escapedShortcode}\\s*[^\\]]*\\]`) : new RegExp(`\\[${escapedShortcode}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${escapedShortcode}\\]`); - const match = src.match(startPattern); - const index = match == null ? void 0 : match.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, _tokens, _lexer) { - const tokenPattern = selfClosing ? new RegExp(`^\\[${escapedShortcode}\\s*([^\\]]*)\\]`) : new RegExp( - `^\\[${escapedShortcode}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${escapedShortcode}\\]` - ); - const match = src.match(tokenPattern); - if (!match) { - return void 0; - } - let content = ""; - let attrString = ""; - if (selfClosing) { - const [, attrs] = match; - attrString = attrs; - } else { - const [, attrs, contentMatch] = match; - attrString = attrs; - content = contentMatch || ""; - } - const attributes = parseAttributes2(attrString.trim()); - return { - type: nodeName, - raw: match[0], - content: content.trim(), - attributes - }; - } - }, - renderMarkdown: (node) => { - let content = ""; - if (getContent) { - content = getContent(node); - } else if (node.content && node.content.length > 0) { - content = node.content.filter((child) => child.type === "text").map((child) => child.text).join(""); - } - const filteredAttrs = filterAttributes(node.attrs || {}); - const attrs = serializeAttributes2(filteredAttrs); - const attrString = attrs ? ` ${attrs}` : ""; - if (selfClosing) { - return `[${shortcode}${attrString}]`; - } - return `[${shortcode}${attrString}]${content}[/${shortcode}]`; - } - }; -} - -// src/utilities/markdown/parseIndentedBlocks.ts -function parseIndentedBlocks(src, config, lexer) { - var _a, _b, _c, _d; - const lines = src.split("\n"); - const items = []; - let totalRaw = ""; - let i = 0; - const baseIndentSize = config.baseIndentSize || 2; - while (i < lines.length) { - const currentLine = lines[i]; - const itemMatch = currentLine.match(config.itemPattern); - if (!itemMatch) { - if (items.length > 0) { - break; - } else if (currentLine.trim() === "") { - i += 1; - totalRaw = `${totalRaw}${currentLine} -`; - continue; - } else { - return void 0; - } - } - const itemData = config.extractItemData(itemMatch); - const { indentLevel, mainContent } = itemData; - totalRaw = `${totalRaw}${currentLine} -`; - const itemContent = [mainContent]; - i += 1; - while (i < lines.length) { - const nextLine = lines[i]; - if (nextLine.trim() === "") { - const nextNonEmptyIndex = lines.slice(i + 1).findIndex((l) => l.trim() !== ""); - if (nextNonEmptyIndex === -1) { - break; - } - const nextNonEmpty = lines[i + 1 + nextNonEmptyIndex]; - const nextIndent2 = ((_b = (_a = nextNonEmpty.match(/^(\s*)/)) == null ? void 0 : _a[1]) == null ? void 0 : _b.length) || 0; - if (nextIndent2 > indentLevel) { - itemContent.push(nextLine); - totalRaw = `${totalRaw}${nextLine} -`; - i += 1; - continue; - } else { - break; - } - } - const nextIndent = ((_d = (_c = nextLine.match(/^(\s*)/)) == null ? void 0 : _c[1]) == null ? void 0 : _d.length) || 0; - if (nextIndent > indentLevel) { - itemContent.push(nextLine); - totalRaw = `${totalRaw}${nextLine} -`; - i += 1; - } else { - break; - } - } - let nestedTokens; - const nestedContent = itemContent.slice(1); - if (nestedContent.length > 0) { - const dedentedNested = nestedContent.map((nestedLine) => nestedLine.slice(indentLevel + baseIndentSize)).join("\n"); - if (dedentedNested.trim()) { - if (config.customNestedParser) { - nestedTokens = config.customNestedParser(dedentedNested); - } else { - nestedTokens = lexer.blockTokens(dedentedNested); - } - } - } - const token = config.createToken(itemData, nestedTokens); - items.push(token); - } - if (items.length === 0) { - return void 0; - } - return { - items, - raw: totalRaw - }; -} - -// src/utilities/markdown/renderNestedMarkdownContent.ts -function renderNestedMarkdownContent(node, h2, prefixOrGenerator, ctx) { - if (!node || !Array.isArray(node.content)) { - return ""; - } - const prefix = typeof prefixOrGenerator === "function" ? prefixOrGenerator(ctx) : prefixOrGenerator; - const [content, ...children] = node.content; - const mainContent = h2.renderChildren([content]); - let output = `${prefix}${mainContent}`; - if (children && children.length > 0) { - children.forEach((child, index) => { - var _a, _b; - const childContent = (_b = (_a = h2.renderChild) == null ? void 0 : _a.call(h2, child, index + 1)) != null ? _b : h2.renderChildren([child]); - if (childContent !== void 0 && childContent !== null) { - const indentedChild = childContent.split("\n").map((line) => line ? h2.indent(line) : h2.indent("")).join("\n"); - output += child.type === "paragraph" ? ` - -${indentedChild}` : ` -${indentedChild}`; - } - }); - } - return output; -} - -// src/utilities/marksEqual.ts -function marksEqual(a, b) { - if (a.length !== b.length) { - return false; - } - return a.every((mark, i) => { - const other = b[i]; - return mark.type === other.type && attrsEqual(mark.attrs, other.attrs); - }); -} - -// src/MarkView.ts -function updateMarkViewAttributes(checkMark, editor, attrs = {}) { - const { state } = editor; - const { doc, tr } = state; - const thisMark = checkMark; - doc.descendants((node, pos) => { - const from = tr.mapping.map(pos); - const to = tr.mapping.map(pos) + node.nodeSize; - let foundMark = null; - node.marks.forEach((mark) => { - if (mark !== thisMark) { - return false; - } - foundMark = mark; - }); - if (!foundMark) { - return; - } - let needsUpdate = false; - Object.keys(attrs).forEach((k) => { - if (attrs[k] !== foundMark.attrs[k]) { - needsUpdate = true; - } - }); - if (needsUpdate) { - const updatedMark = checkMark.type.create({ - ...checkMark.attrs, - ...attrs - }); - tr.removeMark(from, to, checkMark.type); - tr.addMark(from, to, updatedMark); - } - }); - if (tr.docChanged) { - editor.view.dispatch(tr); - } -} -var MarkView = class { - constructor(component, props, options) { - this.component = component; - this.editor = props.editor; - this.options = { ...options }; - this.mark = props.mark; - this.HTMLAttributes = props.HTMLAttributes; - } - get dom() { - return this.editor.view.dom; - } - get contentDOM() { - return null; - } - /** - * Update the attributes of the mark in the document. - * @param attrs The attributes to update. - */ - updateAttributes(attrs, checkMark) { - updateMarkViewAttributes(checkMark || this.mark, this.editor, attrs); - } - ignoreMutation(mutation) { - if (!this.dom || !this.contentDOM) { - return true; - } - if (typeof this.options.ignoreMutation === "function") { - return this.options.ignoreMutation({ mutation }); - } - if (mutation.type === "selection") { - return false; - } - if (this.dom.contains(mutation.target) && mutation.type === "childList" && (isiOS() || isAndroid()) && this.editor.isFocused) { - const changedNodes = [ - ...Array.from(mutation.addedNodes), - ...Array.from(mutation.removedNodes) - ]; - if (changedNodes.every((node) => node.isContentEditable)) { - return false; - } - } - if (this.contentDOM === mutation.target && mutation.type === "attributes") { - return true; - } - if (this.contentDOM.contains(mutation.target)) { - return false; - } - return true; - } -}; - -// src/Node.ts -var Node3 = class _Node extends Extendable { - constructor() { - super(...arguments); - this.type = "node"; - } - /** - * Create a new Node instance - * @param config - Node configuration object or a function that returns a configuration object - */ - static create(config = {}) { - const resolvedConfig = typeof config === "function" ? config() : config; - return new _Node(resolvedConfig); - } - configure(options) { - return super.configure(options); - } - extend(extendedConfig) { - const resolvedConfig = typeof extendedConfig === "function" ? extendedConfig() : extendedConfig; - return super.extend(resolvedConfig); - } -}; - -// src/NodeView.ts -import { NodeSelection as NodeSelection5 } from "@tiptap/pm/state"; -var NodeView = class { - constructor(component, props, options) { - this.isDragging = false; - this.component = component; - this.editor = props.editor; - this.options = { - stopEvent: null, - ignoreMutation: null, - ...options - }; - this.extension = props.extension; - this.node = props.node; - this.decorations = props.decorations; - this.innerDecorations = props.innerDecorations; - this.view = props.view; - this.HTMLAttributes = props.HTMLAttributes; - this.getPos = props.getPos; - this.mount(); - } - mount() { - return; - } - get dom() { - return this.editor.view.dom; - } - get contentDOM() { - return null; - } - onDragStart(event) { - var _a, _b, _c, _d, _e, _f, _g; - const { view } = this.editor; - const target = event.target; - const dragHandle = target.nodeType === 3 ? (_a = target.parentElement) == null ? void 0 : _a.closest("[data-drag-handle]") : target.closest("[data-drag-handle]"); - if (!this.dom || ((_b = this.contentDOM) == null ? void 0 : _b.contains(target)) || !dragHandle) { - return; - } - let x = 0; - let y = 0; - if (this.dom !== dragHandle) { - const domBox = this.dom.getBoundingClientRect(); - const handleBox = dragHandle.getBoundingClientRect(); - const offsetX = (_d = event.offsetX) != null ? _d : (_c = event.nativeEvent) == null ? void 0 : _c.offsetX; - const offsetY = (_f = event.offsetY) != null ? _f : (_e = event.nativeEvent) == null ? void 0 : _e.offsetY; - x = handleBox.x - domBox.x + offsetX; - y = handleBox.y - domBox.y + offsetY; - } - const clonedNode = this.dom.cloneNode(true); - try { - const domBox = this.dom.getBoundingClientRect(); - clonedNode.style.width = `${Math.round(domBox.width)}px`; - clonedNode.style.height = `${Math.round(domBox.height)}px`; - clonedNode.style.boxSizing = "border-box"; - clonedNode.style.pointerEvents = "none"; - } catch { - } - let dragImageWrapper = null; - try { - dragImageWrapper = document.createElement("div"); - dragImageWrapper.style.position = "absolute"; - dragImageWrapper.style.top = "-9999px"; - dragImageWrapper.style.left = "-9999px"; - dragImageWrapper.style.pointerEvents = "none"; - dragImageWrapper.appendChild(clonedNode); - document.body.appendChild(dragImageWrapper); - (_g = event.dataTransfer) == null ? void 0 : _g.setDragImage(clonedNode, x, y); - } finally { - if (dragImageWrapper) { - setTimeout(() => { - try { - dragImageWrapper == null ? void 0 : dragImageWrapper.remove(); - } catch { - } - }, 0); - } - } - const pos = this.getPos(); - if (typeof pos !== "number") { - return; - } - const selection = NodeSelection5.create(view.state.doc, pos); - const transaction = view.state.tr.setSelection(selection); - view.dispatch(transaction); - } - stopEvent(event) { - var _a; - if (!this.dom) { - return false; - } - if (typeof this.options.stopEvent === "function") { - return this.options.stopEvent({ event }); - } - const target = event.target; - const isInElement = this.dom.contains(target) && !((_a = this.contentDOM) == null ? void 0 : _a.contains(target)); - if (!isInElement) { - return false; - } - const isDragEvent = event.type.startsWith("drag"); - const isDragOverEnterEvent = event.type === "dragover" || event.type === "dragenter"; - const isDropEvent = event.type === "drop"; - const isInput = ["INPUT", "BUTTON", "SELECT", "TEXTAREA"].includes(target.tagName) || target.isContentEditable; - if (isInput && !isDropEvent && !isDragEvent) { - return true; - } - const { isEditable } = this.editor; - const { isDragging } = this; - const isDraggable = !!this.node.type.spec.draggable; - const isSelectable = NodeSelection5.isSelectable(this.node); - const isCopyEvent = event.type === "copy"; - const isPasteEvent = event.type === "paste"; - const isCutEvent = event.type === "cut"; - const isClickEvent = event.type === "mousedown"; - if (!isDraggable && isSelectable && isDragEvent && event.target === this.dom) { - event.preventDefault(); - } - if (isDraggable && isDragEvent && !isDragging && event.target === this.dom) { - event.preventDefault(); - return false; - } - if (isDraggable && isEditable && !isDragging && isClickEvent) { - const dragHandle = target.closest("[data-drag-handle]"); - const isValidDragHandle = dragHandle && (this.dom === dragHandle || this.dom.contains(dragHandle)); - if (isValidDragHandle) { - this.isDragging = true; - document.addEventListener( - "dragend", - () => { - this.isDragging = false; - }, - { once: true } - ); - document.addEventListener( - "drop", - () => { - this.isDragging = false; - }, - { once: true } - ); - document.addEventListener( - "mouseup", - () => { - this.isDragging = false; - }, - { once: true } - ); - } - } - if (isDragging || isDragOverEnterEvent || isDropEvent || isCopyEvent || isPasteEvent || isCutEvent || isClickEvent && isSelectable) { - return false; - } - return true; - } - /** - * Called when a DOM [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) or a selection change happens within the view. - * @return `false` if the editor should re-read the selection or re-parse the range around the mutation - * @return `true` if it can safely be ignored. - */ - ignoreMutation(mutation) { - if (!this.dom || !this.contentDOM) { - return true; - } - if (typeof this.options.ignoreMutation === "function") { - return this.options.ignoreMutation({ mutation }); - } - if (this.node.isLeaf || this.node.isAtom) { - return true; - } - if (mutation.type === "selection") { - return false; - } - if (this.dom.contains(mutation.target) && mutation.type === "childList" && (isiOS() || isAndroid()) && this.editor.isFocused) { - const changedNodes = [ - ...Array.from(mutation.addedNodes), - ...Array.from(mutation.removedNodes) - ]; - if (changedNodes.every((node) => node.isContentEditable)) { - return false; - } - } - if (this.contentDOM === mutation.target && mutation.type === "attributes") { - return true; - } - if (this.contentDOM.contains(mutation.target)) { - return false; - } - return true; - } - /** - * Update the attributes of the prosemirror node. - */ - updateAttributes(attributes) { - this.editor.commands.command(({ tr }) => { - const pos = this.getPos(); - if (typeof pos !== "number") { - return false; - } - tr.setNodeMarkup(pos, void 0, { - ...this.node.attrs, - ...attributes - }); - return true; - }); - } - /** - * Delete the node. - */ - deleteNode() { - const from = this.getPos(); - if (typeof from !== "number") { - return; - } - const to = from + this.node.nodeSize; - this.editor.commands.deleteRange({ from, to }); - } -}; - -// src/pasteRules/markPasteRule.ts -function markPasteRule(config) { - return new PasteRule({ - find: config.find, - handler: ({ state, range, match, pasteEvent }) => { - const attributes = callOrReturn(config.getAttributes, void 0, match, pasteEvent); - if (attributes === false || attributes === null) { - return null; - } - const { tr } = state; - const captureGroup = match[match.length - 1]; - const fullMatch = match[0]; - let markEnd = range.to; - if (captureGroup) { - const startSpaces = fullMatch.search(/\S/); - const textStart = range.from + fullMatch.indexOf(captureGroup); - const textEnd = textStart + captureGroup.length; - const excludedMarks = getMarksBetween(range.from, range.to, state.doc).filter((item) => { - const excluded = item.mark.type.excluded; - return excluded.find((type) => type === config.type && type !== item.mark.type); - }).filter((item) => item.to > textStart); - if (excludedMarks.length) { - return null; - } - if (textEnd < range.to) { - tr.delete(textEnd, range.to); - } - if (textStart > range.from) { - tr.delete(range.from + startSpaces, textStart); - } - markEnd = range.from + startSpaces + captureGroup.length; - tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {})); - const isMatchAtEndOfText = match.index !== void 0 && match.input !== void 0 && match.index + match[0].length >= match.input.length; - if (!isMatchAtEndOfText) { - tr.removeStoredMark(config.type); - } - } - } - }); -} - -// src/pasteRules/nodePasteRule.ts -function nodePasteRule(config) { - return new PasteRule({ - find: config.find, - handler({ match, chain, range, pasteEvent }) { - const attributes = callOrReturn(config.getAttributes, void 0, match, pasteEvent); - const content = callOrReturn(config.getContent, void 0, attributes); - if (attributes === false || attributes === null) { - return null; - } - const node = { type: config.type.name, attrs: attributes }; - if (content) { - node.content = content; - } - if (match.input) { - chain().deleteRange(range).insertContentAt(range.from, node); - } - } - }); -} - -// src/pasteRules/textPasteRule.ts -function textPasteRule(config) { - return new PasteRule({ - find: config.find, - handler: ({ state, range, match }) => { - let insert = config.replace; - let start = range.from; - const end = range.to; - if (match[1]) { - const offset = match[0].lastIndexOf(match[1]); - insert += match[0].slice(offset + match[1].length); - start += offset; - const cutOff = start - end; - if (cutOff > 0) { - insert = match[0].slice(offset - cutOff, offset) + insert; - start = end; - } - } - state.tr.insertText(insert, start, end); - } - }); -} - -// src/Tracker.ts -var Tracker = class { - constructor(transaction) { - this.transaction = transaction; - this.currentStep = this.transaction.steps.length; - } - map(position) { - let deleted = false; - const mappedPosition = this.transaction.steps.slice(this.currentStep).reduce((newPosition, step) => { - const mapResult = step.getMap().mapResult(newPosition); - if (mapResult.deleted) { - deleted = true; - } - return mapResult.pos; - }, position); - return { - position: mappedPosition, - deleted - }; - } -}; -export { - CommandManager, - Editor, - Extendable, - Extension, - Fragment6 as Fragment, - InputRule, - MappablePosition, - Mark, - MarkView, - Node3 as Node, - NodePos, - NodeView, - PasteRule, - ResizableNodeView, - ResizableNodeview, - Tracker, - attrsEqual, - callOrReturn, - canInsertNode, - combineTransactionSteps, - commands_exports as commands, - createAtomBlockMarkdownSpec, - createBlockMarkdownSpec, - createChainableState, - createDocument, - h as createElement, - createInlineMarkdownSpec, - createMappablePosition, - createNodeFromContent, - createStyleTag, - decodeHtmlEntities, - defaultBlockAt, - deleteProps, - elementFromString, - encodeHtmlEntities, - escapeForRegEx, - extensions_exports as extensions, - findChildren, - findChildrenInRange, - findDuplicates, - findParentNode, - findParentNodeClosestToPos, - flattenExtensions, - fromString, - generateHTML, - generateJSON, - generateText, - getAttributes, - getAttributesFromExtensions, - getChangedRanges, - getDebugJSON, - getExtensionField, - getHTMLFromFragment, - getMarkAttributes, - getMarkRange, - getMarkType, - getMarksBetween, - getNodeAtPosition, - getNodeAttributes, - getNodeType, - getRenderedAttributes, - getSchema, - getSchemaByResolvedExtensions, - getSchemaTypeByName, - getSchemaTypeNameByName, - getSplittedAttributes, - getStyleProperty, - getText, - getTextBetween, - getTextContentFromNodes, - getTextSerializersFromSchema, - getUpdatedPosition, - h, - injectExtensionAttributesToParseRule, - inputRulesPlugin, - isActive, - isAndroid, - isAtEndOfNode, - isAtStartOfNode, - isEmptyObject, - isExtensionRulesEnabled, - isFirefox, - isFunction, - isList, - isMacOS, - isMarkActive, - isNodeActive, - isNodeEmpty, - isNodeSelection, - isNodeViewSelected, - isNumber, - isPlainObject, - isRegExp, - isSafari, - isString, - isTextSelection, - isiOS, - markInputRule, - markPasteRule, - markdown_exports as markdown, - marksEqual, - mergeAttributes, - mergeDeep, - minMax, - nodeInputRule, - nodePasteRule, - objectIncludes, - parseAttributes, - parseIndentedBlocks, - pasteRulesPlugin, - posToDOMRect, - removeDuplicates, - renderNestedMarkdownContent, - resolveExtensions, - resolveFocusPosition, - rewriteUnknownContent, - selectionToInsertionEnd, - serializeAttributes, - sortExtensions, - splitExtensions, - textInputRule, - textPasteRule, - textblockTypeInputRule, - updateMarkViewAttributes, - wrappingInputRule -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.js.map deleted file mode 100644 index fb9f0e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/helpers/createChainableState.ts","../src/CommandManager.ts","../src/commands/index.ts","../src/commands/blur.ts","../src/commands/clearContent.ts","../src/commands/clearNodes.ts","../src/commands/command.ts","../src/commands/createParagraphNear.ts","../src/commands/cut.ts","../src/commands/deleteCurrentNode.ts","../src/helpers/getNodeType.ts","../src/commands/deleteNode.ts","../src/commands/deleteRange.ts","../src/commands/deleteSelection.ts","../src/commands/enter.ts","../src/commands/exitCode.ts","../src/commands/extendMarkRange.ts","../src/utilities/isRegExp.ts","../src/utilities/objectIncludes.ts","../src/helpers/getMarkRange.ts","../src/helpers/getMarkType.ts","../src/commands/first.ts","../src/helpers/isTextSelection.ts","../src/helpers/resolveFocusPosition.ts","../src/utilities/minMax.ts","../src/utilities/isAndroid.ts","../src/utilities/isiOS.ts","../src/utilities/isSafari.ts","../src/commands/focus.ts","../src/commands/forEach.ts","../src/commands/insertContent.ts","../src/commands/insertContentAt.ts","../src/helpers/createNodeFromContent.ts","../src/utilities/elementFromString.ts","../src/helpers/selectionToInsertionEnd.ts","../src/commands/join.ts","../src/commands/joinItemBackward.ts","../src/commands/joinItemForward.ts","../src/commands/joinTextblockBackward.ts","../src/commands/joinTextblockForward.ts","../src/utilities/isMacOS.ts","../src/commands/keyboardShortcut.ts","../src/commands/lift.ts","../src/helpers/isNodeActive.ts","../src/commands/liftEmptyBlock.ts","../src/commands/liftListItem.ts","../src/commands/newlineInCode.ts","../src/helpers/getSchemaTypeNameByName.ts","../src/utilities/deleteProps.ts","../src/commands/resetAttributes.ts","../src/commands/scrollIntoView.ts","../src/commands/selectAll.ts","../src/commands/selectNodeBackward.ts","../src/commands/selectNodeForward.ts","../src/commands/selectParentNode.ts","../src/commands/selectTextblockEnd.ts","../src/commands/selectTextblockStart.ts","../src/helpers/createDocument.ts","../src/commands/setContent.ts","../src/helpers/getMarkAttributes.ts","../src/helpers/combineTransactionSteps.ts","../src/helpers/defaultBlockAt.ts","../src/helpers/findChildren.ts","../src/helpers/findChildrenInRange.ts","../src/helpers/findParentNodeClosestToPos.ts","../src/helpers/findParentNode.ts","../src/helpers/getExtensionField.ts","../src/helpers/flattenExtensions.ts","../src/helpers/generateHTML.ts","../src/helpers/getHTMLFromFragment.ts","../src/helpers/getSchemaByResolvedExtensions.ts","../src/utilities/isFunction.ts","../src/utilities/callOrReturn.ts","../src/utilities/isEmptyObject.ts","../src/helpers/splitExtensions.ts","../src/helpers/getAttributesFromExtensions.ts","../src/utilities/mergeAttributes.ts","../src/helpers/getRenderedAttributes.ts","../src/utilities/fromString.ts","../src/helpers/injectExtensionAttributesToParseRule.ts","../src/utilities/findDuplicates.ts","../src/helpers/sortExtensions.ts","../src/helpers/resolveExtensions.ts","../src/helpers/getSchema.ts","../src/helpers/generateJSON.ts","../src/helpers/generateText.ts","../src/helpers/getTextBetween.ts","../src/helpers/getText.ts","../src/helpers/getTextSerializersFromSchema.ts","../src/helpers/getNodeAttributes.ts","../src/helpers/getAttributes.ts","../src/utilities/removeDuplicates.ts","../src/helpers/getChangedRanges.ts","../src/helpers/getDebugJSON.ts","../src/helpers/getMarksBetween.ts","../src/helpers/getNodeAtPosition.ts","../src/helpers/getSchemaTypeByName.ts","../src/helpers/getSplittedAttributes.ts","../src/helpers/getTextContentFromNodes.ts","../src/helpers/isMarkActive.ts","../src/helpers/isActive.ts","../src/helpers/isAtEndOfNode.ts","../src/helpers/isAtStartOfNode.ts","../src/helpers/isExtensionRulesEnabled.ts","../src/helpers/isList.ts","../src/helpers/isNodeEmpty.ts","../src/helpers/isNodeSelection.ts","../src/helpers/isNodeViewSelected.ts","../src/helpers/MappablePosition.ts","../src/helpers/posToDOMRect.ts","../src/helpers/rewriteUnknownContent.ts","../src/commands/setMark.ts","../src/commands/setMeta.ts","../src/commands/setNode.ts","../src/commands/setNodeSelection.ts","../src/commands/setTextDirection.ts","../src/commands/setTextSelection.ts","../src/commands/sinkListItem.ts","../src/commands/splitBlock.ts","../src/commands/splitListItem.ts","../src/commands/toggleList.ts","../src/commands/toggleMark.ts","../src/commands/toggleNode.ts","../src/commands/toggleWrap.ts","../src/commands/undoInputRule.ts","../src/commands/unsetAllMarks.ts","../src/commands/unsetMark.ts","../src/commands/unsetTextDirection.ts","../src/commands/updateAttributes.ts","../src/commands/wrapIn.ts","../src/commands/wrapInList.ts","../src/Editor.ts","../src/EventEmitter.ts","../src/ExtensionManager.ts","../src/InputRule.ts","../src/utilities/isPlainObject.ts","../src/utilities/mergeDeep.ts","../src/Extendable.ts","../src/Mark.ts","../src/PasteRule.ts","../src/utilities/isNumber.ts","../src/extensions/index.ts","../src/extensions/clipboardTextSerializer.ts","../src/Extension.ts","../src/extensions/commands.ts","../src/extensions/delete.ts","../src/extensions/drop.ts","../src/extensions/editable.ts","../src/extensions/focusEvents.ts","../src/extensions/keymap.ts","../src/extensions/paste.ts","../src/extensions/tabindex.ts","../src/extensions/textDirection.ts","../src/NodePos.ts","../src/style.ts","../src/utilities/createStyleTag.ts","../src/inputRules/markInputRule.ts","../src/inputRules/nodeInputRule.ts","../src/inputRules/textblockTypeInputRule.ts","../src/inputRules/textInputRule.ts","../src/inputRules/wrappingInputRule.ts","../src/jsx-runtime.ts","../src/lib/ResizableNodeView.ts","../src/utilities/attrsEqual.ts","../src/utilities/canInsertNode.ts","../src/utilities/escapeForRegEx.ts","../src/utilities/getStyleProperty.ts","../src/utilities/htmlEntities.ts","../src/utilities/isFirefox.ts","../src/utilities/isString.ts","../src/utilities/markdown/index.ts","../src/utilities/markdown/attributeUtils.ts","../src/utilities/markdown/createAtomBlockMarkdownSpec.ts","../src/utilities/markdown/createBlockMarkdownSpec.ts","../src/utilities/markdown/createInlineMarkdownSpec.ts","../src/utilities/markdown/parseIndentedBlocks.ts","../src/utilities/markdown/renderNestedMarkdownContent.ts","../src/utilities/marksEqual.ts","../src/MarkView.ts","../src/Node.ts","../src/NodeView.ts","../src/pasteRules/markPasteRule.ts","../src/pasteRules/nodePasteRule.ts","../src/pasteRules/textPasteRule.ts","../src/Tracker.ts"],"sourcesContent":["import type { EditorState, Transaction } from '@tiptap/pm/state'\n\n/**\n * Takes a Transaction & Editor State and turns it into a chainable state object\n * @param config The transaction and state to create the chainable state from\n * @returns A chainable Editor state object\n */\nexport function createChainableState(config: {\n transaction: Transaction\n state: EditorState\n}): EditorState {\n const { state, transaction } = config\n let { selection } = transaction\n let { doc } = transaction\n let { storedMarks } = transaction\n\n return {\n ...state,\n apply: state.apply.bind(state),\n applyTransaction: state.applyTransaction.bind(state),\n plugins: state.plugins,\n schema: state.schema,\n reconfigure: state.reconfigure.bind(state),\n toJSON: state.toJSON.bind(state),\n get storedMarks() {\n return storedMarks\n },\n get selection() {\n return selection\n },\n get doc() {\n return doc\n },\n get tr() {\n selection = transaction.selection\n doc = transaction.doc\n storedMarks = transaction.storedMarks\n\n return transaction\n },\n }\n}\n","import type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport type { Editor } from './Editor.js'\nimport { createChainableState } from './helpers/createChainableState.js'\nimport type {\n AnyCommands,\n CanCommands,\n ChainedCommands,\n CommandProps,\n SingleCommands,\n} from './types.js'\n\nexport class CommandManager {\n editor: Editor\n\n rawCommands: AnyCommands\n\n customState?: EditorState\n\n constructor(props: { editor: Editor; state?: EditorState }) {\n this.editor = props.editor\n this.rawCommands = this.editor.extensionManager.commands\n this.customState = props.state\n }\n\n get hasCustomState(): boolean {\n return !!this.customState\n }\n\n get state(): EditorState {\n return this.customState || this.editor.state\n }\n\n get commands(): SingleCommands {\n const { rawCommands, editor, state } = this\n const { view } = editor\n const { tr } = state\n const props = this.buildProps(tr)\n\n return Object.fromEntries(\n Object.entries(rawCommands).map(([name, command]) => {\n const method = (...args: any[]) => {\n const callback = command(...args)(props)\n\n if (!tr.getMeta('preventDispatch') && !this.hasCustomState) {\n view.dispatch(tr)\n }\n\n return callback\n }\n\n return [name, method]\n }),\n ) as unknown as SingleCommands\n }\n\n get chain(): () => ChainedCommands {\n return () => this.createChain()\n }\n\n get can(): () => CanCommands {\n return () => this.createCan()\n }\n\n public createChain(startTr?: Transaction, shouldDispatch = true): ChainedCommands {\n const { rawCommands, editor, state } = this\n const { view } = editor\n const callbacks: boolean[] = []\n const hasStartTransaction = !!startTr\n const tr = startTr || state.tr\n\n const run = () => {\n if (\n !hasStartTransaction &&\n shouldDispatch &&\n !tr.getMeta('preventDispatch') &&\n !this.hasCustomState\n ) {\n view.dispatch(tr)\n }\n\n return callbacks.every(callback => callback === true)\n }\n\n const chain = {\n ...Object.fromEntries(\n Object.entries(rawCommands).map(([name, command]) => {\n const chainedCommand = (...args: never[]) => {\n const props = this.buildProps(tr, shouldDispatch)\n const callback = command(...args)(props)\n\n callbacks.push(callback)\n\n return chain\n }\n\n return [name, chainedCommand]\n }),\n ),\n run,\n } as unknown as ChainedCommands\n\n return chain\n }\n\n public createCan(startTr?: Transaction): CanCommands {\n const { rawCommands, state } = this\n const dispatch = false\n const tr = startTr || state.tr\n const props = this.buildProps(tr, dispatch)\n const formattedCommands = Object.fromEntries(\n Object.entries(rawCommands).map(([name, command]) => {\n return [name, (...args: never[]) => command(...args)({ ...props, dispatch: undefined })]\n }),\n ) as unknown as SingleCommands\n\n return {\n ...formattedCommands,\n chain: () => this.createChain(tr, dispatch),\n } as CanCommands\n }\n\n public buildProps(tr: Transaction, shouldDispatch = true): CommandProps {\n const { rawCommands, editor, state } = this\n const { view } = editor\n\n const props: CommandProps = {\n tr,\n editor,\n view,\n state: createChainableState({\n state,\n transaction: tr,\n }),\n dispatch: shouldDispatch ? () => undefined : undefined,\n chain: () => this.createChain(tr, shouldDispatch),\n can: () => this.createCan(tr),\n get commands() {\n return Object.fromEntries(\n Object.entries(rawCommands).map(([name, command]) => {\n return [name, (...args: never[]) => command(...args)(props)]\n }),\n ) as unknown as SingleCommands\n },\n }\n\n return props\n }\n}\n","export * from './blur.js'\nexport * from './clearContent.js'\nexport * from './clearNodes.js'\nexport * from './command.js'\nexport * from './createParagraphNear.js'\nexport * from './cut.js'\nexport * from './deleteCurrentNode.js'\nexport * from './deleteNode.js'\nexport * from './deleteRange.js'\nexport * from './deleteSelection.js'\nexport * from './enter.js'\nexport * from './exitCode.js'\nexport * from './extendMarkRange.js'\nexport * from './first.js'\nexport * from './focus.js'\nexport * from './forEach.js'\nexport * from './insertContent.js'\nexport * from './insertContentAt.js'\nexport * from './join.js'\nexport * from './joinItemBackward.js'\nexport * from './joinItemForward.js'\nexport * from './joinTextblockBackward.js'\nexport * from './joinTextblockForward.js'\nexport * from './keyboardShortcut.js'\nexport * from './lift.js'\nexport * from './liftEmptyBlock.js'\nexport * from './liftListItem.js'\nexport * from './newlineInCode.js'\nexport * from './resetAttributes.js'\nexport * from './scrollIntoView.js'\nexport * from './selectAll.js'\nexport * from './selectNodeBackward.js'\nexport * from './selectNodeForward.js'\nexport * from './selectParentNode.js'\nexport * from './selectTextblockEnd.js'\nexport * from './selectTextblockStart.js'\nexport * from './setContent.js'\nexport * from './setMark.js'\nexport * from './setMeta.js'\nexport * from './setNode.js'\nexport * from './setNodeSelection.js'\nexport * from './setTextDirection.js'\nexport * from './setTextSelection.js'\nexport * from './sinkListItem.js'\nexport * from './splitBlock.js'\nexport * from './splitListItem.js'\nexport * from './toggleList.js'\nexport * from './toggleMark.js'\nexport * from './toggleNode.js'\nexport * from './toggleWrap.js'\nexport * from './undoInputRule.js'\nexport * from './unsetAllMarks.js'\nexport * from './unsetMark.js'\nexport * from './unsetTextDirection.js'\nexport * from './updateAttributes.js'\nexport * from './wrapIn.js'\nexport * from './wrapInList.js'\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n blur: {\n /**\n * Removes focus from the editor.\n * @example editor.commands.blur()\n */\n blur: () => ReturnType\n }\n }\n}\n\nexport const blur: RawCommands['blur'] =\n () =>\n ({ editor, view }) => {\n requestAnimationFrame(() => {\n if (!editor.isDestroyed) {\n ;(view.dom as HTMLElement).blur()\n\n // Browsers should remove the caret on blur but safari does not.\n // See: https://github.com/ueberdosis/tiptap/issues/2405\n window?.getSelection()?.removeAllRanges()\n }\n })\n\n return true\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n clearContent: {\n /**\n * Clear the whole document.\n * @example editor.commands.clearContent()\n */\n clearContent: (\n /**\n * Whether to emit an update event.\n * @default true\n */\n emitUpdate?: boolean,\n ) => ReturnType\n }\n }\n}\n\nexport const clearContent: RawCommands['clearContent'] =\n (emitUpdate = true) =>\n ({ commands }) => {\n return commands.setContent('', { emitUpdate })\n }\n","import { liftTarget } from '@tiptap/pm/transform'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n clearNodes: {\n /**\n * Normalize nodes to a simple paragraph.\n * @example editor.commands.clearNodes()\n */\n clearNodes: () => ReturnType\n }\n }\n}\n\nexport const clearNodes: RawCommands['clearNodes'] =\n () =>\n ({ state, tr, dispatch }) => {\n const { selection } = tr\n const { ranges } = selection\n\n if (!dispatch) {\n return true\n }\n\n ranges.forEach(({ $from, $to }) => {\n state.doc.nodesBetween($from.pos, $to.pos, (node, pos) => {\n if (node.type.isText) {\n return\n }\n\n const { doc, mapping } = tr\n const $mappedFrom = doc.resolve(mapping.map(pos))\n const $mappedTo = doc.resolve(mapping.map(pos + node.nodeSize))\n const nodeRange = $mappedFrom.blockRange($mappedTo)\n\n if (!nodeRange) {\n return\n }\n\n const targetLiftDepth = liftTarget(nodeRange)\n\n if (node.type.isTextblock) {\n const { defaultType } = $mappedFrom.parent.contentMatchAt($mappedFrom.index())\n\n tr.setNodeMarkup(nodeRange.start, defaultType)\n }\n\n if (targetLiftDepth || targetLiftDepth === 0) {\n tr.lift(nodeRange, targetLiftDepth)\n }\n })\n })\n\n return true\n }\n","import type { Command, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n command: {\n /**\n * Define a command inline.\n * @param fn The command function.\n * @example\n * editor.commands.command(({ tr, state }) => {\n * ...\n * return true\n * })\n */\n command: (fn: (props: Parameters[0]) => boolean) => ReturnType\n }\n }\n}\n\nexport const command: RawCommands['command'] = fn => props => {\n return fn(props)\n}\n","import { createParagraphNear as originalCreateParagraphNear } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n createParagraphNear: {\n /**\n * Create a paragraph nearby.\n * @example editor.commands.createParagraphNear()\n */\n createParagraphNear: () => ReturnType\n }\n }\n}\n\nexport const createParagraphNear: RawCommands['createParagraphNear'] =\n () =>\n ({ state, dispatch }) => {\n return originalCreateParagraphNear(state, dispatch)\n }\n","import { TextSelection } from '@tiptap/pm/state'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n cut: {\n /**\n * Cuts content from a range and inserts it at a given position.\n * @param range The range to cut.\n * @param range.from The start position of the range.\n * @param range.to The end position of the range.\n * @param targetPos The position to insert the content at.\n * @example editor.commands.cut({ from: 1, to: 3 }, 5)\n */\n cut: ({ from, to }: { from: number; to: number }, targetPos: number) => ReturnType\n }\n }\n}\n\nexport const cut: RawCommands['cut'] =\n (originRange, targetPos) =>\n ({ editor, tr }) => {\n const { state } = editor\n\n const contentSlice = state.doc.slice(originRange.from, originRange.to)\n\n tr.deleteRange(originRange.from, originRange.to)\n const newPos = tr.mapping.map(targetPos)\n\n tr.insert(newPos, contentSlice.content)\n\n tr.setSelection(new TextSelection(tr.doc.resolve(Math.max(newPos - 1, 0))))\n\n return true\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n deleteCurrentNode: {\n /**\n * Delete the node that currently has the selection anchor.\n * @example editor.commands.deleteCurrentNode()\n */\n deleteCurrentNode: () => ReturnType\n }\n }\n}\n\nexport const deleteCurrentNode: RawCommands['deleteCurrentNode'] =\n () =>\n ({ tr, dispatch }) => {\n const { selection } = tr\n const currentNode = selection.$anchor.node()\n\n // if there is content inside the current node, break out of this command\n if (currentNode.content.size > 0) {\n return false\n }\n\n const $pos = tr.selection.$anchor\n\n for (let depth = $pos.depth; depth > 0; depth -= 1) {\n const node = $pos.node(depth)\n\n if (node.type === currentNode.type) {\n if (dispatch) {\n const from = $pos.before(depth)\n const to = $pos.after(depth)\n\n tr.delete(from, to).scrollIntoView()\n }\n\n return true\n }\n }\n\n return false\n }\n","import type { NodeType, Schema } from '@tiptap/pm/model'\n\nexport function getNodeType(nameOrType: string | NodeType, schema: Schema): NodeType {\n if (typeof nameOrType === 'string') {\n if (!schema.nodes[nameOrType]) {\n throw Error(\n `There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`,\n )\n }\n\n return schema.nodes[nameOrType]\n }\n\n return nameOrType\n}\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n deleteNode: {\n /**\n * Delete a node with a given type or name.\n * @param typeOrName The type or name of the node.\n * @example editor.commands.deleteNode('paragraph')\n */\n deleteNode: (typeOrName: string | NodeType) => ReturnType\n }\n }\n}\n\nexport const deleteNode: RawCommands['deleteNode'] =\n typeOrName =>\n ({ tr, state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n const $pos = tr.selection.$anchor\n\n for (let depth = $pos.depth; depth > 0; depth -= 1) {\n const node = $pos.node(depth)\n\n if (node.type === type) {\n if (dispatch) {\n const from = $pos.before(depth)\n const to = $pos.after(depth)\n\n tr.delete(from, to).scrollIntoView()\n }\n\n return true\n }\n }\n\n return false\n }\n","import type { Range, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n deleteRange: {\n /**\n * Delete a given range.\n * @param range The range to delete.\n * @example editor.commands.deleteRange({ from: 1, to: 3 })\n */\n deleteRange: (range: Range) => ReturnType\n }\n }\n}\n\nexport const deleteRange: RawCommands['deleteRange'] =\n range =>\n ({ tr, dispatch }) => {\n const { from, to } = range\n\n if (dispatch) {\n tr.delete(from, to)\n }\n\n return true\n }\n","import type { ResolvedPos, Schema } from '@tiptap/pm/model'\n\nimport type { RawCommands } from '../types.js'\n\n/**\n * Check if a node has text content based on its content specification.\n * Returns true if the node's content spec matches text* or text+ patterns.\n */\nconst hasTextContent = (nodeSpec: { content?: string }): boolean => {\n if (!nodeSpec.content) {\n return false\n }\n const textRegex = /^text(\\*|\\+)/\n return textRegex.test(nodeSpec.content)\n}\n\n/**\n * Expand selection position for a specific side (left or right) to handle inline text nodes.\n * This function checks if the position is within an inline node with text content and\n * expands it to include the entire node boundaries for proper deletion.\n * @param $pos - The resolved position to expand\n * @param schema - The ProseMirror schema\n * @param side - Which side to expand ('left' or 'right')\n * @returns The expanded position for deletion\n */\nconst expandSelectionForSide = (\n $pos: ResolvedPos,\n schema: Schema,\n side: 'left' | 'right',\n): number => {\n if (!$pos.parent.isInline) {\n return $pos.pos\n }\n\n if ((side === 'left' && $pos.pos > $pos.start()) || (side === 'right' && $pos.pos < $pos.end())) {\n return $pos.pos\n }\n\n const parentContent = schema.nodes[$pos.parent.type.name].spec\n if (!hasTextContent(parentContent)) {\n return $pos.pos\n }\n\n return side === 'left' ? $pos.start() - 1 : $pos.end() + 1\n}\n\n/**\n * Expand selection range to properly handle deletion of inline text nodes.\n * Inline text nodes don't collapse correctly when text inside is deleted,\n * so we need to expand the selection to include the entire node.\n * See: https://code.haverbeke.berlin/prosemirror/prosemirror/issues/1365\n */\nconst expandSelectionForInlineText = (\n $from: ResolvedPos,\n $to: ResolvedPos,\n schema: Schema,\n): { from: number; to: number } => {\n const from = expandSelectionForSide($from, schema, 'left')\n const to = expandSelectionForSide($to, schema, 'right')\n\n return { from, to }\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n deleteSelection: {\n /**\n * Delete the selection, if there is one.\n * @example editor.commands.deleteSelection()\n */\n deleteSelection: () => ReturnType\n }\n }\n}\n\nexport const deleteSelection: RawCommands['deleteSelection'] =\n () =>\n ({ state, dispatch }) => {\n const { $from, $to } = state.selection\n if (state.selection.empty) {\n return false\n }\n\n const { from, to } = expandSelectionForInlineText($from, $to, state.schema)\n\n if (dispatch) {\n state.tr.deleteRange(from, to).scrollIntoView()\n dispatch(state.tr)\n }\n\n return true\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n enter: {\n /**\n * Trigger enter.\n * @example editor.commands.enter()\n */\n enter: () => ReturnType\n }\n }\n}\n\nexport const enter: RawCommands['enter'] =\n () =>\n ({ commands }) => {\n return commands.keyboardShortcut('Enter')\n }\n","import { exitCode as originalExitCode } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n exitCode: {\n /**\n * Exit from a code block.\n * @example editor.commands.exitCode()\n */\n exitCode: () => ReturnType\n }\n }\n}\n\nexport const exitCode: RawCommands['exitCode'] =\n () =>\n ({ state, dispatch }) => {\n return originalExitCode(state, dispatch)\n }\n","import type { MarkType } from '@tiptap/pm/model'\nimport { TextSelection } from '@tiptap/pm/state'\n\nimport { getMarkRange } from '../helpers/getMarkRange.js'\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n extendMarkRange: {\n /**\n * Extends the text selection to the current mark by type or name.\n * @param typeOrName The type or name of the mark.\n * @param attributes The attributes to match against.\n * If not provided, only the first mark at the position will be matched.\n * @example editor.commands.extendMarkRange('bold')\n * @example editor.commands.extendMarkRange('mention', { userId: \"1\" })\n */\n extendMarkRange: (\n /**\n * The type or name of the mark.\n */\n typeOrName: string | MarkType,\n\n /**\n * The attributes of the mark.\n */\n attributes?: Record,\n ) => ReturnType\n }\n }\n}\n\nexport const extendMarkRange: RawCommands['extendMarkRange'] =\n (typeOrName, attributes) =>\n ({ tr, state, dispatch }) => {\n const type = getMarkType(typeOrName, state.schema)\n const { doc, selection } = tr\n const { $from, from, to } = selection\n\n if (dispatch) {\n const range = getMarkRange($from, type, attributes)\n\n if (range && range.from <= from && range.to >= to) {\n const newSelection = TextSelection.create(doc, range.from, range.to)\n\n tr.setSelection(newSelection)\n }\n }\n\n return true\n }\n","export function isRegExp(value: any): value is RegExp {\n return Object.prototype.toString.call(value) === '[object RegExp]'\n}\n","import { isRegExp } from './isRegExp.js'\n\n/**\n * Check if object1 includes object2\n * @param object1 Object\n * @param object2 Object\n */\nexport function objectIncludes(\n object1: Record,\n object2: Record,\n options: { strict: boolean } = { strict: true },\n): boolean {\n const keys = Object.keys(object2)\n\n if (!keys.length) {\n return true\n }\n\n return keys.every(key => {\n if (options.strict) {\n return object2[key] === object1[key]\n }\n\n if (isRegExp(object2[key])) {\n return object2[key].test(object1[key])\n }\n\n return object2[key] === object1[key]\n })\n}\n","import type { Mark as ProseMirrorMark, MarkType, ResolvedPos } from '@tiptap/pm/model'\n\nimport type { Range } from '../types.js'\nimport { objectIncludes } from '../utilities/objectIncludes.js'\n\nfunction findMarkInSet(\n marks: ProseMirrorMark[],\n type: MarkType,\n attributes: Record = {},\n): ProseMirrorMark | undefined {\n return marks.find(item => {\n return (\n item.type === type &&\n objectIncludes(\n // Only check equality for the attributes that are provided\n Object.fromEntries(Object.keys(attributes).map(k => [k, item.attrs[k]])),\n attributes,\n )\n )\n })\n}\n\nfunction isMarkInSet(\n marks: ProseMirrorMark[],\n type: MarkType,\n attributes: Record = {},\n): boolean {\n return !!findMarkInSet(marks, type, attributes)\n}\n\n/**\n * Get the range of a mark at a resolved position.\n */\nexport function getMarkRange(\n /**\n * The position to get the mark range for.\n */\n $pos: ResolvedPos,\n /**\n * The mark type to get the range for.\n */\n type: MarkType,\n /**\n * The attributes to match against.\n * If not provided, only the first mark at the position will be matched.\n */\n attributes?: Record,\n): Range | void {\n if (!$pos || !type) {\n return\n }\n let start = $pos.parent.childAfter($pos.parentOffset)\n\n // If the cursor is at the start of a text node that does not have the mark, look backward\n if (!start.node || !start.node.marks.some(mark => mark.type === type)) {\n start = $pos.parent.childBefore($pos.parentOffset)\n }\n\n // If there is no text node with the mark even backward, return undefined\n if (!start.node || !start.node.marks.some(mark => mark.type === type)) {\n return\n }\n\n // Default to only matching against the attributes of the first mark with the given type\n if (!attributes) {\n const firstMark = start.node.marks.find(mark => mark.type === type)\n if (firstMark) {\n attributes = firstMark.attrs\n }\n }\n\n // We now know that the cursor is either at the start, middle or end of a text node with the specified mark\n // so we can look it up on the targeted mark\n const mark = findMarkInSet([...start.node.marks], type, attributes)\n\n if (!mark) {\n return\n }\n\n let startIndex = start.index\n let startPos = $pos.start() + start.offset\n let endIndex = startIndex + 1\n let endPos = startPos + start.node.nodeSize\n\n while (\n startIndex > 0 &&\n isMarkInSet([...$pos.parent.child(startIndex - 1).marks], type, attributes)\n ) {\n startIndex -= 1\n startPos -= $pos.parent.child(startIndex).nodeSize\n }\n\n while (\n endIndex < $pos.parent.childCount &&\n isMarkInSet([...$pos.parent.child(endIndex).marks], type, attributes)\n ) {\n endPos += $pos.parent.child(endIndex).nodeSize\n endIndex += 1\n }\n\n return {\n from: startPos,\n to: endPos,\n }\n}\n","import type { MarkType, Schema } from '@tiptap/pm/model'\n\nexport function getMarkType(nameOrType: string | MarkType, schema: Schema): MarkType {\n if (typeof nameOrType === 'string') {\n if (!schema.marks[nameOrType]) {\n throw Error(\n `There is no mark type named '${nameOrType}'. Maybe you forgot to add the extension?`,\n )\n }\n\n return schema.marks[nameOrType]\n }\n\n return nameOrType\n}\n","import type { Command, CommandProps, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n first: {\n /**\n * Runs one command after the other and stops at the first which returns true.\n * @param commands The commands to run.\n * @example editor.commands.first([command1, command2])\n */\n first: (commands: Command[] | ((props: CommandProps) => Command[])) => ReturnType\n }\n }\n}\n\nexport const first: RawCommands['first'] = commands => props => {\n const items = typeof commands === 'function' ? commands(props) : commands\n\n for (let i = 0; i < items.length; i += 1) {\n if (items[i](props)) {\n return true\n }\n }\n\n return false\n}\n","import { TextSelection } from '@tiptap/pm/state'\n\nexport function isTextSelection(value: unknown): value is TextSelection {\n return value instanceof TextSelection\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Selection, TextSelection } from '@tiptap/pm/state'\n\nimport type { FocusPosition } from '../types.js'\nimport { minMax } from '../utilities/minMax.js'\n\nexport function resolveFocusPosition(\n doc: ProseMirrorNode,\n position: FocusPosition = null,\n): Selection | null {\n if (!position) {\n return null\n }\n\n const selectionAtStart = Selection.atStart(doc)\n const selectionAtEnd = Selection.atEnd(doc)\n\n if (position === 'start' || position === true) {\n return selectionAtStart\n }\n\n if (position === 'end') {\n return selectionAtEnd\n }\n\n const minPos = selectionAtStart.from\n const maxPos = selectionAtEnd.to\n\n if (position === 'all') {\n return TextSelection.create(\n doc,\n minMax(0, minPos, maxPos),\n minMax(doc.content.size, minPos, maxPos),\n )\n }\n\n return TextSelection.create(\n doc,\n minMax(position, minPos, maxPos),\n minMax(position, minPos, maxPos),\n )\n}\n","export function minMax(value = 0, min = 0, max = 0): number {\n return Math.min(Math.max(value, min), max)\n}\n","export function isAndroid(): boolean {\n return navigator.platform === 'Android' || /android/i.test(navigator.userAgent)\n}\n","export function isiOS(): boolean {\n return (\n ['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes(\n navigator.platform,\n ) ||\n // iPad on iOS 13 detection\n (navigator.userAgent.includes('Mac') && 'ontouchend' in document)\n )\n}\n","/**\n * Detects if the current browser is Safari (but not iOS Safari or Chrome).\n * @returns `true` if the browser is Safari, `false` otherwise.\n * @example\n * if (isSafari()) {\n * // Safari-specific handling\n * }\n */\nexport function isSafari(): boolean {\n return typeof navigator !== 'undefined'\n ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent)\n : false\n}\n","import { isTextSelection } from '../helpers/isTextSelection.js'\nimport { resolveFocusPosition } from '../helpers/resolveFocusPosition.js'\nimport type { FocusPosition, RawCommands } from '../types.js'\nimport { isAndroid } from '../utilities/isAndroid.js'\nimport { isiOS } from '../utilities/isiOS.js'\nimport { isSafari } from '../utilities/isSafari.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n focus: {\n /**\n * Focus the editor at the given position.\n * @param position The position to focus at.\n * @param options.scrollIntoView Scroll the focused position into view after focusing\n * @example editor.commands.focus()\n * @example editor.commands.focus(32, { scrollIntoView: false })\n */\n focus: (\n /**\n * The position to focus at.\n */\n position?: FocusPosition,\n\n /**\n * Optional options\n * @default { scrollIntoView: true }\n */\n options?: {\n scrollIntoView?: boolean\n },\n ) => ReturnType\n }\n }\n}\n\nexport const focus: RawCommands['focus'] =\n (position = null, options = {}) =>\n ({ editor, view, tr, dispatch }) => {\n options = {\n scrollIntoView: true,\n ...options,\n }\n\n const delayedFocus = () => {\n // focus within `requestAnimationFrame` breaks focus on iOS and Android\n // so we have to call this\n if (isiOS() || isAndroid()) {\n ;(view.dom as HTMLElement).focus()\n }\n\n // Safari requires preventScroll to avoid the browser scrolling to the\n // top of the editor when focus is called before the selection is set.\n // We exclude iOS and Android since they are already handled above.\n // see: https://github.com/ueberdosis/tiptap/issues/7318\n if (isSafari() && !isiOS() && !isAndroid()) {\n ;(view.dom as HTMLElement).focus({ preventScroll: true })\n }\n\n // For React we have to focus asynchronously. Otherwise wild things happen.\n // see: https://github.com/ueberdosis/tiptap/issues/1520\n requestAnimationFrame(() => {\n if (!editor.isDestroyed) {\n view.focus()\n\n if (options?.scrollIntoView) {\n editor.commands.scrollIntoView()\n }\n }\n })\n }\n\n try {\n if ((view.hasFocus() && position === null) || position === false) {\n return true\n }\n } catch {\n // if view.hasFocus fails (view not mounted yet)\n // we will return false because there's nothing to focus\n return false\n }\n\n // we don’t try to resolve a NodeSelection or CellSelection\n if (dispatch && position === null && !isTextSelection(editor.state.selection)) {\n delayedFocus()\n return true\n }\n\n // pass through tr.doc instead of editor.state.doc\n // since transactions could change the editors state before this command has been run\n const selection = resolveFocusPosition(tr.doc, position) || editor.state.selection\n const isSameSelection = editor.state.selection.eq(selection)\n\n if (dispatch) {\n if (!isSameSelection) {\n tr.setSelection(selection)\n }\n\n // `tr.setSelection` resets the stored marks\n // so we’ll restore them if the selection is the same as before\n if (isSameSelection && tr.storedMarks) {\n tr.setStoredMarks(tr.storedMarks)\n }\n\n delayedFocus()\n }\n\n return true\n }\n","import type { CommandProps, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n forEach: {\n /**\n * Loop through an array of items.\n */\n forEach: (\n items: T[],\n fn: (\n item: T,\n props: CommandProps & {\n index: number\n },\n ) => boolean,\n ) => ReturnType\n }\n }\n}\n\nexport const forEach: RawCommands['forEach'] = (items, fn) => props => {\n return items.every((item, index) => fn(item, { ...props, index }))\n}\n","import type { Fragment, Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model'\n\nimport type { Content, RawCommands } from '../types.js'\n\nexport interface InsertContentOptions {\n /**\n * Options for parsing the content.\n */\n parseOptions?: ParseOptions\n\n /**\n * Whether to update the selection after inserting the content.\n */\n updateSelection?: boolean\n applyInputRules?: boolean\n applyPasteRules?: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n insertContent: {\n /**\n * Insert a node or string of HTML at the current position.\n * @example editor.commands.insertContent('

Example

')\n * @example editor.commands.insertContent('

Example

', { updateSelection: false })\n */\n insertContent: (\n /**\n * The ProseMirror content to insert.\n */\n value: Content | ProseMirrorNode | Fragment,\n\n /**\n * Optional options\n */\n options?: InsertContentOptions,\n ) => ReturnType\n }\n }\n}\n\nexport const insertContent: RawCommands['insertContent'] =\n (value, options) =>\n ({ tr, commands }) => {\n return commands.insertContentAt(\n { from: tr.selection.from, to: tr.selection.to },\n value,\n options,\n )\n }\n","import type { Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model'\nimport { Fragment } from '@tiptap/pm/model'\n\nimport { createNodeFromContent } from '../helpers/createNodeFromContent.js'\nimport { selectionToInsertionEnd } from '../helpers/selectionToInsertionEnd.js'\nimport type { Content, Range, RawCommands } from '../types.js'\n\nexport interface InsertContentAtOptions {\n /**\n * Options for parsing the content.\n */\n parseOptions?: ParseOptions\n\n /**\n * Whether to update the selection after inserting the content.\n */\n updateSelection?: boolean\n\n /**\n * Whether to apply input rules after inserting the content.\n */\n applyInputRules?: boolean\n\n /**\n * Whether to apply paste rules after inserting the content.\n */\n applyPasteRules?: boolean\n\n /**\n * Whether to throw an error if the content is invalid.\n */\n errorOnInvalidContent?: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n insertContentAt: {\n /**\n * Insert a node or string of HTML at a specific position.\n * @example editor.commands.insertContentAt(0, '

Example

')\n */\n insertContentAt: (\n /**\n * The position to insert the content at.\n */\n position: number | Range,\n\n /**\n * The ProseMirror content to insert.\n */\n value: Content | ProseMirrorNode | Fragment,\n\n /**\n * Optional options\n */\n options?: InsertContentAtOptions,\n ) => ReturnType\n }\n }\n}\n\nconst isFragment = (nodeOrFragment: ProseMirrorNode | Fragment): nodeOrFragment is Fragment => {\n return !('type' in nodeOrFragment)\n}\n\nexport const insertContentAt: RawCommands['insertContentAt'] =\n (position, value, options) =>\n ({ tr, dispatch, editor }) => {\n if (dispatch) {\n options = {\n parseOptions: editor.options.parseOptions,\n updateSelection: true,\n applyInputRules: false,\n applyPasteRules: false,\n ...options,\n }\n\n let content: Fragment | ProseMirrorNode\n\n const emitContentError = (error: Error) => {\n editor.emit('contentError', {\n editor,\n error,\n disableCollaboration: () => {\n if (\n 'collaboration' in editor.storage &&\n typeof editor.storage.collaboration === 'object' &&\n editor.storage.collaboration\n ) {\n ;(editor.storage.collaboration as any).isDisabled = true\n }\n },\n })\n }\n\n const parseOptions: ParseOptions = {\n preserveWhitespace: 'full',\n ...options.parseOptions,\n }\n\n // If `emitContentError` is enabled, we want to check the content for errors\n // but ignore them (do not remove the invalid content from the document)\n if (\n !options.errorOnInvalidContent &&\n !editor.options.enableContentCheck &&\n editor.options.emitContentError\n ) {\n try {\n createNodeFromContent(value, editor.schema, {\n parseOptions,\n errorOnInvalidContent: true,\n })\n } catch (e) {\n emitContentError(e as Error)\n }\n }\n\n try {\n content = createNodeFromContent(value, editor.schema, {\n parseOptions,\n errorOnInvalidContent: options.errorOnInvalidContent ?? editor.options.enableContentCheck,\n })\n } catch (e) {\n emitContentError(e as Error)\n return false\n }\n\n let { from, to } =\n typeof position === 'number'\n ? { from: position, to: position }\n : { from: position.from, to: position.to }\n\n let isOnlyTextContent = true\n let isOnlyBlockContent = true\n const nodes = isFragment(content) ? content : [content]\n\n nodes.forEach(node => {\n // check if added node is valid\n node.check()\n\n isOnlyTextContent = isOnlyTextContent ? node.isText && node.marks.length === 0 : false\n\n isOnlyBlockContent = isOnlyBlockContent ? node.isBlock : false\n })\n\n // check if we can replace the wrapping node by\n // the newly inserted content\n // example:\n // replace an empty paragraph by an inserted image\n // instead of inserting the image below the paragraph\n if (from === to && isOnlyBlockContent) {\n const { parent } = tr.doc.resolve(from)\n const isEmptyTextBlock = parent.isTextblock && !parent.type.spec.code && !parent.childCount\n\n if (isEmptyTextBlock) {\n from -= 1\n to += 1\n }\n }\n\n let newContent\n\n // if there is only plain text we have to use `insertText`\n // because this will keep the current marks\n if (isOnlyTextContent) {\n // if value is string, we can use it directly\n // otherwise if it is an array, we have to join it\n if (Array.isArray(value)) {\n newContent = value.map(v => v.text || '').join('')\n } else if (value instanceof Fragment) {\n let text = ''\n\n value.forEach(node => {\n if (node.text) {\n text += node.text\n }\n })\n\n newContent = text\n } else if (typeof value === 'object' && !!value && !!value.text) {\n newContent = value.text\n } else {\n newContent = value as string\n }\n\n tr.insertText(newContent, from, to)\n } else {\n newContent = content\n\n const $from = tr.doc.resolve(from)\n const $fromNode = $from.node()\n const fromSelectionAtStart = $from.parentOffset === 0\n const isTextSelection = $fromNode.isText || $fromNode.isTextblock\n const hasContent = $fromNode.content.size > 0\n\n if (fromSelectionAtStart && isTextSelection && hasContent && isOnlyBlockContent) {\n from = Math.max(0, from - 1)\n }\n\n tr.replaceWith(from, to, newContent)\n }\n\n // set cursor at end of inserted content\n if (options.updateSelection) {\n selectionToInsertionEnd(tr, tr.steps.length - 1, -1)\n }\n\n if (options.applyInputRules) {\n tr.setMeta('applyInputRules', { from, text: newContent })\n }\n\n if (options.applyPasteRules) {\n tr.setMeta('applyPasteRules', { from, text: newContent })\n }\n }\n\n return true\n }\n","import type { ParseOptions } from '@tiptap/pm/model'\nimport { DOMParser, Fragment, Node as ProseMirrorNode, Schema } from '@tiptap/pm/model'\n\nimport type { Content } from '../types.js'\nimport { elementFromString } from '../utilities/elementFromString.js'\n\nexport type CreateNodeFromContentOptions = {\n slice?: boolean\n parseOptions?: ParseOptions\n errorOnInvalidContent?: boolean\n}\n\n/**\n * Takes a JSON or HTML content and creates a Prosemirror node or fragment from it.\n * @param content The JSON or HTML content to create the node from\n * @param schema The Prosemirror schema to use for the node\n * @param options Options for the parser\n * @returns The created Prosemirror node or fragment\n */\nexport function createNodeFromContent(\n content: Content | ProseMirrorNode | Fragment,\n schema: Schema,\n options?: CreateNodeFromContentOptions,\n): ProseMirrorNode | Fragment {\n if (content instanceof ProseMirrorNode || content instanceof Fragment) {\n return content\n }\n options = {\n slice: true,\n parseOptions: {},\n ...options,\n }\n\n const isJSONContent = typeof content === 'object' && content !== null\n const isTextContent = typeof content === 'string'\n\n if (isJSONContent) {\n try {\n const isArrayContent = Array.isArray(content) && content.length > 0\n\n // if the JSON Content is an array of nodes, create a fragment for each node\n if (isArrayContent) {\n return Fragment.fromArray(content.map(item => schema.nodeFromJSON(item)))\n }\n\n const node = schema.nodeFromJSON(content)\n\n if (options.errorOnInvalidContent) {\n node.check()\n }\n\n return node\n } catch (error) {\n if (options.errorOnInvalidContent) {\n throw new Error('[tiptap error]: Invalid JSON content', { cause: error as Error })\n }\n\n console.warn('[tiptap warn]: Invalid content.', 'Passed value:', content, 'Error:', error)\n\n return createNodeFromContent('', schema, options)\n }\n }\n\n if (isTextContent) {\n // Check for invalid content\n if (options.errorOnInvalidContent) {\n let hasInvalidContent = false\n let invalidContent = ''\n\n // A copy of the current schema with a catch-all node at the end\n const contentCheckSchema = new Schema({\n topNode: schema.spec.topNode,\n marks: schema.spec.marks,\n // Prosemirror's schemas are executed such that: the last to execute, matches last\n // This means that we can add a catch-all node at the end of the schema to catch any content that we don't know how to handle\n nodes: schema.spec.nodes.append({\n __tiptap__private__unknown__catch__all__node: {\n content: 'inline*',\n group: 'block',\n parseDOM: [\n {\n tag: '*',\n getAttrs: e => {\n // If this is ever called, we know that the content has something that we don't know how to handle in the schema\n hasInvalidContent = true\n // Try to stringify the element for a more helpful error message\n invalidContent = typeof e === 'string' ? e : e.outerHTML\n return null\n },\n },\n ],\n },\n }),\n })\n\n if (options.slice) {\n DOMParser.fromSchema(contentCheckSchema).parseSlice(\n elementFromString(content),\n options.parseOptions,\n )\n } else {\n DOMParser.fromSchema(contentCheckSchema).parse(\n elementFromString(content),\n options.parseOptions,\n )\n }\n\n if (options.errorOnInvalidContent && hasInvalidContent) {\n throw new Error('[tiptap error]: Invalid HTML content', {\n cause: new Error(`Invalid element found: ${invalidContent}`),\n })\n }\n }\n\n const parser = DOMParser.fromSchema(schema)\n\n if (options.slice) {\n return parser.parseSlice(elementFromString(content), options.parseOptions).content\n }\n\n return parser.parse(elementFromString(content), options.parseOptions)\n }\n\n return createNodeFromContent('', schema, options)\n}\n","const removeWhitespaces = (node: HTMLElement) => {\n const children = node.childNodes\n\n for (let i = children.length - 1; i >= 0; i -= 1) {\n const child = children[i]\n\n if (child.nodeType === 3 && child.nodeValue && /^(\\n\\s\\s|\\n)$/.test(child.nodeValue)) {\n node.removeChild(child)\n } else if (child.nodeType === 1) {\n removeWhitespaces(child as HTMLElement)\n }\n }\n\n return node\n}\n\nexport function elementFromString(value: string): HTMLElement {\n if (typeof window === 'undefined') {\n throw new Error(\n '[tiptap error]: there is no window object available, so this function cannot be used',\n )\n }\n // add a wrapper to preserve leading and trailing whitespace\n const wrappedValue = `${value}`\n\n const html = new window.DOMParser().parseFromString(wrappedValue, 'text/html').body\n\n return removeWhitespaces(html)\n}\n","import type { Transaction } from '@tiptap/pm/state'\nimport { Selection } from '@tiptap/pm/state'\nimport { ReplaceAroundStep, ReplaceStep } from '@tiptap/pm/transform'\n\n// source: https://github.com/ProseMirror/prosemirror-state/blob/master/src/selection.js#L466\nexport function selectionToInsertionEnd(tr: Transaction, startLen: number, bias: number) {\n const last = tr.steps.length - 1\n\n if (last < startLen) {\n return\n }\n\n const step = tr.steps[last]\n\n if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) {\n return\n }\n\n const map = tr.mapping.maps[last]\n let end = 0\n\n map.forEach((_from, _to, _newFrom, newTo) => {\n if (end === 0) {\n end = newTo\n }\n })\n\n tr.setSelection(Selection.near(tr.doc.resolve(end), bias))\n}\n","import {\n joinBackward as originalJoinBackward,\n joinDown as originalJoinDown,\n joinForward as originalJoinForward,\n joinUp as originalJoinUp,\n} from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n joinUp: {\n /**\n * Join the selected block or, if there is a text selection, the closest ancestor block of the selection that can be joined, with the sibling above it.\n * @example editor.commands.joinUp()\n */\n joinUp: () => ReturnType\n }\n joinDown: {\n /**\n * Join the selected block, or the closest ancestor of the selection that can be joined, with the sibling after it.\n * @example editor.commands.joinDown()\n */\n joinDown: () => ReturnType\n }\n joinBackward: {\n /**\n * If the selection is empty and at the start of a textblock, try to reduce the distance between that block and the one before it—if there's a block directly before it that can be joined, join them.\n * If not, try to move the selected block closer to the next one in the document structure by lifting it out of its\n * parent or moving it into a parent of the previous block. Will use the view for accurate (bidi-aware) start-of-textblock detection if given.\n * @example editor.commands.joinBackward()\n */\n joinBackward: () => ReturnType\n }\n joinForward: {\n /**\n * If the selection is empty and the cursor is at the end of a textblock, try to reduce or remove the boundary between that block and the one after it,\n * either by joining them or by moving the other block closer to this one in the tree structure.\n * Will use the view for accurate start-of-textblock detection if given.\n * @example editor.commands.joinForward()\n */\n joinForward: () => ReturnType\n }\n }\n}\n\nexport const joinUp: RawCommands['joinUp'] =\n () =>\n ({ state, dispatch }) => {\n return originalJoinUp(state, dispatch)\n }\n\nexport const joinDown: RawCommands['joinDown'] =\n () =>\n ({ state, dispatch }) => {\n return originalJoinDown(state, dispatch)\n }\n\nexport const joinBackward: RawCommands['joinBackward'] =\n () =>\n ({ state, dispatch }) => {\n return originalJoinBackward(state, dispatch)\n }\n\nexport const joinForward: RawCommands['joinForward'] =\n () =>\n ({ state, dispatch }) => {\n return originalJoinForward(state, dispatch)\n }\n","import { joinPoint } from '@tiptap/pm/transform'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n joinItemBackward: {\n /**\n * Join two items backward.\n * @example editor.commands.joinItemBackward()\n */\n joinItemBackward: () => ReturnType\n }\n }\n}\n\nexport const joinItemBackward: RawCommands['joinItemBackward'] =\n () =>\n ({ state, dispatch, tr }) => {\n try {\n const point = joinPoint(state.doc, state.selection.$from.pos, -1)\n\n if (point === null || point === undefined) {\n return false\n }\n\n tr.join(point, 2)\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n } catch {\n return false\n }\n }\n","import { joinPoint } from '@tiptap/pm/transform'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n joinItemForward: {\n /**\n * Join two items Forwards.\n * @example editor.commands.joinItemForward()\n */\n joinItemForward: () => ReturnType\n }\n }\n}\n\nexport const joinItemForward: RawCommands['joinItemForward'] =\n () =>\n ({ state, dispatch, tr }) => {\n try {\n const point = joinPoint(state.doc, state.selection.$from.pos, +1)\n\n if (point === null || point === undefined) {\n return false\n }\n\n tr.join(point, 2)\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n } catch {\n return false\n }\n }\n","import { joinTextblockBackward as originalCommand } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n joinTextblockBackward: {\n /**\n * A more limited form of joinBackward that only tries to join the current textblock to the one before it, if the cursor is at the start of a textblock.\n */\n joinTextblockBackward: () => ReturnType\n }\n }\n}\n\nexport const joinTextblockBackward: RawCommands['joinTextblockBackward'] =\n () =>\n ({ state, dispatch }) => {\n return originalCommand(state, dispatch)\n }\n","import { joinTextblockForward as originalCommand } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n joinTextblockForward: {\n /**\n * A more limited form of joinForward that only tries to join the current textblock to the one after it, if the cursor is at the end of a textblock.\n */\n joinTextblockForward: () => ReturnType\n }\n }\n}\n\nexport const joinTextblockForward: RawCommands['joinTextblockForward'] =\n () =>\n ({ state, dispatch }) => {\n return originalCommand(state, dispatch)\n }\n","export function isMacOS(): boolean {\n return typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false\n}\n","import type { RawCommands } from '../types.js'\nimport { isiOS } from '../utilities/isiOS.js'\nimport { isMacOS } from '../utilities/isMacOS.js'\n\nfunction normalizeKeyName(name: string) {\n const parts = name.split(/-(?!$)/)\n let result = parts[parts.length - 1]\n\n if (result === 'Space') {\n result = ' '\n }\n\n let alt\n let ctrl\n let shift\n let meta\n\n for (let i = 0; i < parts.length - 1; i += 1) {\n const mod = parts[i]\n\n if (/^(cmd|meta|m)$/i.test(mod)) {\n meta = true\n } else if (/^a(lt)?$/i.test(mod)) {\n alt = true\n } else if (/^(c|ctrl|control)$/i.test(mod)) {\n ctrl = true\n } else if (/^s(hift)?$/i.test(mod)) {\n shift = true\n } else if (/^mod$/i.test(mod)) {\n if (isiOS() || isMacOS()) {\n meta = true\n } else {\n ctrl = true\n }\n } else {\n throw new Error(`Unrecognized modifier name: ${mod}`)\n }\n }\n\n if (alt) {\n result = `Alt-${result}`\n }\n\n if (ctrl) {\n result = `Ctrl-${result}`\n }\n\n if (meta) {\n result = `Meta-${result}`\n }\n\n if (shift) {\n result = `Shift-${result}`\n }\n\n return result\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n keyboardShortcut: {\n /**\n * Trigger a keyboard shortcut.\n * @param name The name of the keyboard shortcut.\n * @example editor.commands.keyboardShortcut('Mod-b')\n */\n keyboardShortcut: (name: string) => ReturnType\n }\n }\n}\n\nexport const keyboardShortcut: RawCommands['keyboardShortcut'] =\n name =>\n ({ editor, view, tr, dispatch }) => {\n const keys = normalizeKeyName(name).split(/-(?!$)/)\n const key = keys.find(item => !['Alt', 'Ctrl', 'Meta', 'Shift'].includes(item))\n const event = new KeyboardEvent('keydown', {\n key: key === 'Space' ? ' ' : key,\n altKey: keys.includes('Alt'),\n ctrlKey: keys.includes('Ctrl'),\n metaKey: keys.includes('Meta'),\n shiftKey: keys.includes('Shift'),\n bubbles: true,\n cancelable: true,\n })\n\n const capturedTransaction = editor.captureTransaction(() => {\n view.someProp('handleKeyDown', f => f(view, event))\n })\n\n capturedTransaction?.steps.forEach(step => {\n const newStep = step.map(tr.mapping)\n\n if (newStep && dispatch) {\n tr.maybeStep(newStep)\n }\n })\n\n return true\n }\n","import { lift as originalLift } from '@tiptap/pm/commands'\nimport type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isNodeActive } from '../helpers/isNodeActive.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n lift: {\n /**\n * Removes an existing wrap if possible lifting the node out of it\n * @param typeOrName The type or name of the node.\n * @param attributes The attributes of the node.\n * @example editor.commands.lift('paragraph')\n * @example editor.commands.lift('heading', { level: 1 })\n */\n lift: (typeOrName: string | NodeType, attributes?: Record) => ReturnType\n }\n }\n}\n\nexport const lift: RawCommands['lift'] =\n (typeOrName, attributes = {}) =>\n ({ state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n const isActive = isNodeActive(state, type, attributes)\n\n if (!isActive) {\n return false\n }\n\n return originalLift(state, dispatch)\n }\n","import type { NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport type { NodeRange } from '../types.js'\nimport { objectIncludes } from '../utilities/objectIncludes.js'\nimport { getNodeType } from './getNodeType.js'\n\nexport function isNodeActive(\n state: EditorState,\n typeOrName: NodeType | string | null,\n attributes: Record = {},\n): boolean {\n const { from, to, empty } = state.selection\n const type = typeOrName ? getNodeType(typeOrName, state.schema) : null\n\n const nodeRanges: NodeRange[] = []\n\n state.doc.nodesBetween(from, to, (node, pos) => {\n if (node.isText) {\n return\n }\n\n const relativeFrom = Math.max(from, pos)\n const relativeTo = Math.min(to, pos + node.nodeSize)\n\n nodeRanges.push({\n node,\n from: relativeFrom,\n to: relativeTo,\n })\n })\n\n const selectionRange = to - from\n const matchedNodeRanges = nodeRanges\n .filter(nodeRange => {\n if (!type) {\n return true\n }\n\n return type.name === nodeRange.node.type.name\n })\n .filter(nodeRange => objectIncludes(nodeRange.node.attrs, attributes, { strict: false }))\n\n if (empty) {\n return !!matchedNodeRanges.length\n }\n\n const range = matchedNodeRanges.reduce((sum, nodeRange) => sum + nodeRange.to - nodeRange.from, 0)\n\n return range >= selectionRange\n}\n","import { liftEmptyBlock as originalLiftEmptyBlock } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n liftEmptyBlock: {\n /**\n * If the cursor is in an empty textblock that can be lifted, lift the block.\n * @example editor.commands.liftEmptyBlock()\n */\n liftEmptyBlock: () => ReturnType\n }\n }\n}\n\nexport const liftEmptyBlock: RawCommands['liftEmptyBlock'] =\n () =>\n ({ state, dispatch }) => {\n return originalLiftEmptyBlock(state, dispatch)\n }\n","import type { NodeType } from '@tiptap/pm/model'\nimport { liftListItem as originalLiftListItem } from '@tiptap/pm/schema-list'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n liftListItem: {\n /**\n * Create a command to lift the list item around the selection up into a wrapping list.\n * @param typeOrName The type or name of the node.\n * @example editor.commands.liftListItem('listItem')\n */\n liftListItem: (typeOrName: string | NodeType) => ReturnType\n }\n }\n}\n\nexport const liftListItem: RawCommands['liftListItem'] =\n typeOrName =>\n ({ state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n\n return originalLiftListItem(type)(state, dispatch)\n }\n","import { newlineInCode as originalNewlineInCode } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n newlineInCode: {\n /**\n * Add a newline character in code.\n * @example editor.commands.newlineInCode()\n */\n newlineInCode: () => ReturnType\n }\n }\n}\n\nexport const newlineInCode: RawCommands['newlineInCode'] =\n () =>\n ({ state, dispatch }) => {\n return originalNewlineInCode(state, dispatch)\n }\n","import type { Schema } from '@tiptap/pm/model'\n\n/**\n * Get the type of a schema item by its name.\n * @param name The name of the schema item\n * @param schema The Prosemiror schema to search in\n * @returns The type of the schema item (`node` or `mark`), or null if it doesn't exist\n */\nexport function getSchemaTypeNameByName(name: string, schema: Schema): 'node' | 'mark' | null {\n if (schema.nodes[name]) {\n return 'node'\n }\n\n if (schema.marks[name]) {\n return 'mark'\n }\n\n return null\n}\n","/**\n * Remove a property or an array of properties from an object\n * @param obj Object\n * @param key Key to remove\n */\nexport function deleteProps(\n obj: Record,\n propOrProps: string | string[],\n): Record {\n const props = typeof propOrProps === 'string' ? [propOrProps] : propOrProps\n\n return Object.keys(obj).reduce((newObj: Record, prop) => {\n if (!props.includes(prop)) {\n newObj[prop] = obj[prop]\n }\n\n return newObj\n }, {})\n}\n","import type { MarkType, NodeType } from '@tiptap/pm/model'\n\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName.js'\nimport type { RawCommands } from '../types.js'\nimport { deleteProps } from '../utilities/deleteProps.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n resetAttributes: {\n /**\n * Resets some node attributes to the default value.\n * @param typeOrName The type or name of the node.\n * @param attributes The attributes of the node to reset.\n * @example editor.commands.resetAttributes('heading', 'level')\n */\n resetAttributes: (\n typeOrName: string | NodeType | MarkType,\n attributes: string | string[],\n ) => ReturnType\n }\n }\n}\n\nexport const resetAttributes: RawCommands['resetAttributes'] =\n (typeOrName, attributes) =>\n ({ tr, state, dispatch }) => {\n let nodeType: NodeType | null = null\n let markType: MarkType | null = null\n\n const schemaType = getSchemaTypeNameByName(\n typeof typeOrName === 'string' ? typeOrName : typeOrName.name,\n state.schema,\n )\n\n if (!schemaType) {\n return false\n }\n\n if (schemaType === 'node') {\n nodeType = getNodeType(typeOrName as NodeType, state.schema)\n }\n\n if (schemaType === 'mark') {\n markType = getMarkType(typeOrName as MarkType, state.schema)\n }\n\n let canReset = false\n\n tr.selection.ranges.forEach(range => {\n state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => {\n if (nodeType && nodeType === node.type) {\n canReset = true\n\n if (dispatch) {\n tr.setNodeMarkup(pos, undefined, deleteProps(node.attrs, attributes))\n }\n }\n\n if (markType && node.marks.length) {\n node.marks.forEach(mark => {\n if (markType === mark.type) {\n canReset = true\n\n if (dispatch) {\n tr.addMark(\n pos,\n pos + node.nodeSize,\n markType.create(deleteProps(mark.attrs, attributes)),\n )\n }\n }\n })\n }\n })\n })\n\n return canReset\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n scrollIntoView: {\n /**\n * Scroll the selection into view.\n * @example editor.commands.scrollIntoView()\n */\n scrollIntoView: () => ReturnType\n }\n }\n}\n\nexport const scrollIntoView: RawCommands['scrollIntoView'] =\n () =>\n ({ tr, dispatch }) => {\n if (dispatch) {\n tr.scrollIntoView()\n }\n\n return true\n }\n","import { AllSelection } from '@tiptap/pm/state'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectAll: {\n /**\n * Select the whole document.\n * @example editor.commands.selectAll()\n */\n selectAll: () => ReturnType\n }\n }\n}\n\nexport const selectAll: RawCommands['selectAll'] =\n () =>\n ({ tr, dispatch }) => {\n if (dispatch) {\n const selection = new AllSelection(tr.doc)\n\n tr.setSelection(selection)\n }\n\n return true\n }\n","import { selectNodeBackward as originalSelectNodeBackward } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectNodeBackward: {\n /**\n * Select a node backward.\n * @example editor.commands.selectNodeBackward()\n */\n selectNodeBackward: () => ReturnType\n }\n }\n}\n\nexport const selectNodeBackward: RawCommands['selectNodeBackward'] =\n () =>\n ({ state, dispatch }) => {\n return originalSelectNodeBackward(state, dispatch)\n }\n","import { selectNodeForward as originalSelectNodeForward } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectNodeForward: {\n /**\n * Select a node forward.\n * @example editor.commands.selectNodeForward()\n */\n selectNodeForward: () => ReturnType\n }\n }\n}\n\nexport const selectNodeForward: RawCommands['selectNodeForward'] =\n () =>\n ({ state, dispatch }) => {\n return originalSelectNodeForward(state, dispatch)\n }\n","import { selectParentNode as originalSelectParentNode } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectParentNode: {\n /**\n * Select the parent node.\n * @example editor.commands.selectParentNode()\n */\n selectParentNode: () => ReturnType\n }\n }\n}\n\nexport const selectParentNode: RawCommands['selectParentNode'] =\n () =>\n ({ state, dispatch }) => {\n return originalSelectParentNode(state, dispatch)\n }\n","// @ts-ignore\n// TODO: add types to @types/prosemirror-commands\nimport { selectTextblockEnd as originalSelectTextblockEnd } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectTextblockEnd: {\n /**\n * Moves the cursor to the end of current text block.\n * @example editor.commands.selectTextblockEnd()\n */\n selectTextblockEnd: () => ReturnType\n }\n }\n}\n\nexport const selectTextblockEnd: RawCommands['selectTextblockEnd'] =\n () =>\n ({ state, dispatch }) => {\n return originalSelectTextblockEnd(state, dispatch)\n }\n","// @ts-ignore\n// TODO: add types to @types/prosemirror-commands\nimport { selectTextblockStart as originalSelectTextblockStart } from '@tiptap/pm/commands'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n selectTextblockStart: {\n /**\n * Moves the cursor to the start of current text block.\n * @example editor.commands.selectTextblockStart()\n */\n selectTextblockStart: () => ReturnType\n }\n }\n}\n\nexport const selectTextblockStart: RawCommands['selectTextblockStart'] =\n () =>\n ({ state, dispatch }) => {\n return originalSelectTextblockStart(state, dispatch)\n }\n","import type { Fragment, Node as ProseMirrorNode, ParseOptions, Schema } from '@tiptap/pm/model'\n\nimport type { Content } from '../types.js'\nimport { createNodeFromContent } from './createNodeFromContent.js'\n\n/**\n * Create a new Prosemirror document node from content.\n * @param content The JSON or HTML content to create the document from\n * @param schema The Prosemirror schema to use for the document\n * @param parseOptions Options for the parser\n * @returns The created Prosemirror document node\n */\nexport function createDocument(\n content: Content | ProseMirrorNode | Fragment,\n schema: Schema,\n parseOptions: ParseOptions = {},\n options: { errorOnInvalidContent?: boolean } = {},\n): ProseMirrorNode {\n return createNodeFromContent(content, schema, {\n slice: false,\n parseOptions,\n errorOnInvalidContent: options.errorOnInvalidContent,\n }) as ProseMirrorNode\n}\n","import type { Fragment, Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model'\n\nimport { createDocument } from '../helpers/createDocument.js'\nimport type { Content, RawCommands } from '../types.js'\n\nexport interface SetContentOptions {\n /**\n * Options for parsing the content.\n * @default {}\n */\n parseOptions?: ParseOptions\n\n /**\n * Whether to throw an error if the content is invalid.\n */\n errorOnInvalidContent?: boolean\n\n /**\n * Whether to emit an update event.\n * @default true\n */\n emitUpdate?: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setContent: {\n /**\n * Replace the whole document with new content.\n * @param content The new content.\n * @param emitUpdate Whether to emit an update event.\n * @param parseOptions Options for parsing the content.\n * @example editor.commands.setContent('

Example text

')\n */\n setContent: (\n /**\n * The new content.\n */\n content: Content | Fragment | ProseMirrorNode,\n\n /**\n * Options for `setContent`.\n */\n options?: SetContentOptions,\n ) => ReturnType\n }\n }\n}\n\nexport const setContent: RawCommands['setContent'] =\n (content, { errorOnInvalidContent, emitUpdate = true, parseOptions = {} } = {}) =>\n ({ editor, tr, dispatch, commands }) => {\n const { doc } = tr\n\n // This is to keep backward compatibility with the previous behavior\n // TODO remove this in the next major version\n if (parseOptions.preserveWhitespace !== 'full') {\n const document = createDocument(content, editor.schema, parseOptions, {\n errorOnInvalidContent: errorOnInvalidContent ?? editor.options.enableContentCheck,\n })\n\n if (dispatch) {\n tr.replaceWith(0, doc.content.size, document).setMeta('preventUpdate', !emitUpdate)\n }\n return true\n }\n\n if (dispatch) {\n tr.setMeta('preventUpdate', !emitUpdate)\n }\n\n return commands.insertContentAt({ from: 0, to: doc.content.size }, content, {\n parseOptions,\n errorOnInvalidContent: errorOnInvalidContent ?? editor.options.enableContentCheck,\n })\n }\n","import type { Mark, MarkType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { getMarkType } from './getMarkType.js'\n\nexport function getMarkAttributes(\n state: EditorState,\n typeOrName: string | MarkType,\n): Record {\n const type = getMarkType(typeOrName, state.schema)\n const { from, to, empty } = state.selection\n const marks: Mark[] = []\n\n if (empty) {\n if (state.storedMarks) {\n marks.push(...state.storedMarks)\n }\n\n marks.push(...state.selection.$head.marks())\n } else {\n state.doc.nodesBetween(from, to, node => {\n marks.push(...node.marks)\n })\n }\n\n const mark = marks.find(markItem => markItem.type.name === type.name)\n\n if (!mark) {\n return {}\n }\n\n return { ...mark.attrs }\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport type { Transaction } from '@tiptap/pm/state'\nimport { Transform } from '@tiptap/pm/transform'\n\n/**\n * Returns a new `Transform` based on all steps of the passed transactions.\n * @param oldDoc The Prosemirror node to start from\n * @param transactions The transactions to combine\n * @returns A new `Transform` with all steps of the passed transactions\n */\nexport function combineTransactionSteps(\n oldDoc: ProseMirrorNode,\n transactions: Transaction[],\n): Transform {\n const transform = new Transform(oldDoc)\n\n transactions.forEach(transaction => {\n transaction.steps.forEach(step => {\n transform.step(step)\n })\n })\n\n return transform\n}\n","import type { ContentMatch, NodeType } from '@tiptap/pm/model'\n\n/**\n * Gets the default block type at a given match\n * @param match The content match to get the default block type from\n * @returns The default block type or null\n */\nexport function defaultBlockAt(match: ContentMatch): NodeType | null {\n for (let i = 0; i < match.edgeCount; i += 1) {\n const { type } = match.edge(i)\n\n if (type.isTextblock && !type.hasRequiredAttrs()) {\n return type\n }\n }\n\n return null\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { NodeWithPos, Predicate } from '../types.js'\n\n/**\n * Find children inside a Prosemirror node that match a predicate.\n * @param node The Prosemirror node to search in\n * @param predicate The predicate to match\n * @returns An array of nodes with their positions\n */\nexport function findChildren(node: ProseMirrorNode, predicate: Predicate): NodeWithPos[] {\n const nodesWithPos: NodeWithPos[] = []\n\n node.descendants((child, pos) => {\n if (predicate(child)) {\n nodesWithPos.push({\n node: child,\n pos,\n })\n }\n })\n\n return nodesWithPos\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { NodeWithPos, Predicate, Range } from '../types.js'\n\n/**\n * Same as `findChildren` but searches only within a `range`.\n * @param node The Prosemirror node to search in\n * @param range The range to search in\n * @param predicate The predicate to match\n * @returns An array of nodes with their positions\n */\nexport function findChildrenInRange(\n node: ProseMirrorNode,\n range: Range,\n predicate: Predicate,\n): NodeWithPos[] {\n const nodesWithPos: NodeWithPos[] = []\n\n // if (range.from === range.to) {\n // const nodeAt = node.nodeAt(range.from)\n\n // if (nodeAt) {\n // nodesWithPos.push({\n // node: nodeAt,\n // pos: range.from,\n // })\n // }\n // }\n\n node.nodesBetween(range.from, range.to, (child, pos) => {\n if (predicate(child)) {\n nodesWithPos.push({\n node: child,\n pos,\n })\n }\n })\n\n return nodesWithPos\n}\n","import type { Node as ProseMirrorNode, ResolvedPos } from '@tiptap/pm/model'\n\nimport type { Predicate } from '../types.js'\n\n/**\n * Finds the closest parent node to a resolved position that matches a predicate.\n * @param $pos The resolved position to search from\n * @param predicate The predicate to match\n * @returns The closest parent node to the resolved position that matches the predicate\n * @example ```js\n * findParentNodeClosestToPos($from, node => node.type.name === 'paragraph')\n * ```\n */\nexport function findParentNodeClosestToPos(\n $pos: ResolvedPos,\n predicate: Predicate,\n):\n | {\n pos: number\n start: number\n depth: number\n node: ProseMirrorNode\n }\n | undefined {\n for (let i = $pos.depth; i > 0; i -= 1) {\n const node = $pos.node(i)\n\n if (predicate(node)) {\n return {\n pos: i > 0 ? $pos.before(i) : 0,\n start: $pos.start(i),\n depth: i,\n node,\n }\n }\n }\n}\n","import type { Selection } from '@tiptap/pm/state'\n\nimport type { Predicate } from '../types.js'\nimport { findParentNodeClosestToPos } from './findParentNodeClosestToPos.js'\n\n/**\n * Finds the closest parent node to the current selection that matches a predicate.\n * @param predicate The predicate to match\n * @returns A command that finds the closest parent node to the current selection that matches the predicate\n * @example ```js\n * findParentNode(node => node.type.name === 'paragraph')\n * ```\n */\nexport function findParentNode(\n predicate: Predicate,\n): (selection: Selection) => ReturnType {\n return (selection: Selection) => findParentNodeClosestToPos(selection.$from, predicate)\n}\n","import type { ExtensionConfig } from '../Extension.js'\nimport type { MarkConfig } from '../Mark.js'\nimport type { NodeConfig } from '../Node.js'\nimport type { AnyExtension, MaybeThisParameterType, RemoveThis } from '../types.js'\n\n/**\n * Returns a field from an extension\n * @param extension The Tiptap extension\n * @param field The field, for example `renderHTML` or `priority`\n * @param context The context object that should be passed as `this` into the function\n * @returns The field value\n */\nexport function getExtensionField(\n extension: E,\n field: keyof ExtensionConfig | keyof MarkConfig | keyof NodeConfig,\n context?: Omit, 'parent'>,\n): RemoveThis {\n if (extension.config[field as keyof typeof extension.config] === undefined && extension.parent) {\n return getExtensionField(extension.parent, field, context)\n }\n\n if (typeof extension.config[field as keyof typeof extension.config] === 'function') {\n const value = (extension.config[field as keyof typeof extension.config] as any).bind({\n ...context,\n parent: extension.parent ? getExtensionField(extension.parent, field, context) : null,\n })\n\n return value\n }\n\n return extension.config[field as keyof typeof extension.config] as RemoveThis\n}\n","import type { AnyConfig, Extensions } from '../types.js'\nimport { getExtensionField } from './getExtensionField.js'\n\n/**\n * Create a flattened array of extensions by traversing the `addExtensions` field.\n * @param extensions An array of Tiptap extensions\n * @returns A flattened array of Tiptap extensions\n */\nexport function flattenExtensions(extensions: Extensions): Extensions {\n return (\n extensions\n .map(extension => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n\n const addExtensions = getExtensionField(\n extension,\n 'addExtensions',\n context,\n )\n\n if (addExtensions) {\n return [extension, ...flattenExtensions(addExtensions())]\n }\n\n return extension\n })\n // `Infinity` will break TypeScript so we set a number that is probably high enough\n .flat(10)\n )\n}\n","import { Node } from '@tiptap/pm/model'\n\nimport type { Extensions, JSONContent } from '../types.js'\nimport { getHTMLFromFragment } from './getHTMLFromFragment.js'\nimport { getSchema } from './getSchema.js'\n\n/**\n * Generate HTML from a JSONContent\n * @param doc The JSONContent to generate HTML from\n * @param extensions The extensions to use for the schema\n * @returns The generated HTML\n */\nexport function generateHTML(doc: JSONContent, extensions: Extensions): string {\n const schema = getSchema(extensions)\n const contentNode = Node.fromJSON(schema, doc)\n\n return getHTMLFromFragment(contentNode.content, schema)\n}\n","import type { Fragment, Schema } from '@tiptap/pm/model'\nimport { DOMSerializer } from '@tiptap/pm/model'\n\nexport function getHTMLFromFragment(fragment: Fragment, schema: Schema): string {\n const documentFragment = DOMSerializer.fromSchema(schema).serializeFragment(fragment)\n\n const temporaryDocument = document.implementation.createHTMLDocument()\n const container = temporaryDocument.createElement('div')\n\n container.appendChild(documentFragment)\n\n return container.innerHTML\n}\n","import type { MarkSpec, NodeSpec, TagParseRule } from '@tiptap/pm/model'\nimport { Schema } from '@tiptap/pm/model'\n\nimport type { Editor, MarkConfig, NodeConfig } from '../index.js'\nimport type { AnyConfig, Extensions } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\nimport { isEmptyObject } from '../utilities/isEmptyObject.js'\nimport { getAttributesFromExtensions } from './getAttributesFromExtensions.js'\nimport { getExtensionField } from './getExtensionField.js'\nimport { getRenderedAttributes } from './getRenderedAttributes.js'\nimport { injectExtensionAttributesToParseRule } from './injectExtensionAttributesToParseRule.js'\nimport { splitExtensions } from './splitExtensions.js'\n\nfunction cleanUpSchemaItem(data: T) {\n return Object.fromEntries(\n // @ts-ignore\n Object.entries(data).filter(([key, value]) => {\n if (key === 'attrs' && isEmptyObject(value as object | undefined)) {\n return false\n }\n\n return value !== null && value !== undefined\n }),\n ) as T\n}\n\n/**\n * Builds an attribute spec tuple for ProseMirror schema from an extension attribute.\n * @param extensionAttribute The extension attribute to build the spec for\n * @returns A tuple of [attributeName, spec]\n */\nfunction buildAttributeSpec(\n extensionAttribute: ReturnType[number],\n): [string, Record] {\n const spec: Record = {}\n\n // Only include 'default' if the attribute is not required and default is set on the attribute\n if (\n !extensionAttribute?.attribute?.isRequired &&\n 'default' in (extensionAttribute?.attribute || {})\n ) {\n spec.default = extensionAttribute.attribute.default\n }\n\n // Only include 'validate' if it's defined\n if (extensionAttribute?.attribute?.validate !== undefined) {\n spec.validate = extensionAttribute.attribute.validate\n }\n\n return [extensionAttribute.name, spec]\n}\n\n/**\n * Creates a new Prosemirror schema based on the given extensions.\n * @param extensions An array of Tiptap extensions\n * @param editor The editor instance\n * @returns A Prosemirror schema\n */\nexport function getSchemaByResolvedExtensions(extensions: Extensions, editor?: Editor): Schema {\n const allAttributes = getAttributesFromExtensions(extensions)\n const { nodeExtensions, markExtensions } = splitExtensions(extensions)\n const topNode = nodeExtensions.find(extension => getExtensionField(extension, 'topNode'))?.name\n\n const nodes = Object.fromEntries(\n nodeExtensions.map(extension => {\n const extensionAttributes = allAttributes.filter(\n attribute => attribute.type === extension.name,\n )\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n editor,\n }\n\n const extraNodeFields = extensions.reduce((fields, e) => {\n const extendNodeSchema = getExtensionField(\n e,\n 'extendNodeSchema',\n context,\n )\n\n return {\n ...fields,\n ...(extendNodeSchema ? extendNodeSchema(extension) : {}),\n }\n }, {})\n\n const schema: NodeSpec = cleanUpSchemaItem({\n ...extraNodeFields,\n content: callOrReturn(\n getExtensionField(extension, 'content', context),\n ),\n marks: callOrReturn(getExtensionField(extension, 'marks', context)),\n group: callOrReturn(getExtensionField(extension, 'group', context)),\n inline: callOrReturn(getExtensionField(extension, 'inline', context)),\n atom: callOrReturn(getExtensionField(extension, 'atom', context)),\n selectable: callOrReturn(\n getExtensionField(extension, 'selectable', context),\n ),\n draggable: callOrReturn(\n getExtensionField(extension, 'draggable', context),\n ),\n code: callOrReturn(getExtensionField(extension, 'code', context)),\n whitespace: callOrReturn(\n getExtensionField(extension, 'whitespace', context),\n ),\n linebreakReplacement: callOrReturn(\n getExtensionField(\n extension,\n 'linebreakReplacement',\n context,\n ),\n ),\n defining: callOrReturn(\n getExtensionField(extension, 'defining', context),\n ),\n isolating: callOrReturn(\n getExtensionField(extension, 'isolating', context),\n ),\n attrs: Object.fromEntries(extensionAttributes.map(buildAttributeSpec)),\n })\n\n const parseHTML = callOrReturn(\n getExtensionField(extension, 'parseHTML', context),\n )\n\n if (parseHTML) {\n schema.parseDOM = parseHTML.map(parseRule =>\n injectExtensionAttributesToParseRule(parseRule, extensionAttributes),\n ) as TagParseRule[]\n }\n\n const renderHTML = getExtensionField(\n extension,\n 'renderHTML',\n context,\n )\n\n if (renderHTML) {\n schema.toDOM = node =>\n renderHTML({\n node,\n HTMLAttributes: getRenderedAttributes(node, extensionAttributes),\n })\n }\n\n const renderText = getExtensionField(\n extension,\n 'renderText',\n context,\n )\n\n if (renderText) {\n schema.toText = renderText\n }\n\n return [extension.name, schema]\n }),\n )\n\n const marks = Object.fromEntries(\n markExtensions.map(extension => {\n const extensionAttributes = allAttributes.filter(\n attribute => attribute.type === extension.name,\n )\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n editor,\n }\n\n const extraMarkFields = extensions.reduce((fields, e) => {\n const extendMarkSchema = getExtensionField(\n e,\n 'extendMarkSchema',\n context,\n )\n\n return {\n ...fields,\n ...(extendMarkSchema ? extendMarkSchema(extension as any) : {}),\n }\n }, {})\n\n const schema: MarkSpec = cleanUpSchemaItem({\n ...extraMarkFields,\n inclusive: callOrReturn(\n getExtensionField(extension, 'inclusive', context),\n ),\n excludes: callOrReturn(\n getExtensionField(extension, 'excludes', context),\n ),\n group: callOrReturn(getExtensionField(extension, 'group', context)),\n spanning: callOrReturn(\n getExtensionField(extension, 'spanning', context),\n ),\n code: callOrReturn(getExtensionField(extension, 'code', context)),\n attrs: Object.fromEntries(extensionAttributes.map(buildAttributeSpec)),\n })\n\n const parseHTML = callOrReturn(\n getExtensionField(extension, 'parseHTML', context),\n )\n\n if (parseHTML) {\n schema.parseDOM = parseHTML.map(parseRule =>\n injectExtensionAttributesToParseRule(parseRule, extensionAttributes),\n )\n }\n\n const renderHTML = getExtensionField(\n extension,\n 'renderHTML',\n context,\n )\n\n if (renderHTML) {\n schema.toDOM = mark =>\n renderHTML({\n mark,\n HTMLAttributes: getRenderedAttributes(mark, extensionAttributes),\n })\n }\n\n return [extension.name, schema]\n }),\n )\n\n return new Schema({\n topNode,\n nodes,\n marks,\n })\n}\n","// oxlint-disable-next-lineno-unsafe-function-type\nexport function isFunction(value: any): value is Function {\n return typeof value === 'function'\n}\n","import type { MaybeReturnType } from '../types.js'\nimport { isFunction } from './isFunction.js'\n\n/**\n * Optionally calls `value` as a function.\n * Otherwise it is returned directly.\n * @param value Function or any value.\n * @param context Optional context to bind to function.\n * @param props Optional props to pass to function.\n */\nexport function callOrReturn(\n value: T,\n context: any = undefined,\n ...props: any[]\n): MaybeReturnType {\n if (isFunction(value)) {\n if (context) {\n return value.bind(context)(...props)\n }\n\n return value(...props)\n }\n\n return value as MaybeReturnType\n}\n","export function isEmptyObject(value = {}): boolean {\n return Object.keys(value).length === 0 && value.constructor === Object\n}\n","import type { Extension } from '../Extension.js'\nimport type { Mark } from '../Mark.js'\nimport type { Node } from '../Node.js'\nimport type { Extensions } from '../types.js'\n\nexport function splitExtensions(extensions: Extensions) {\n const baseExtensions = extensions.filter(\n extension => extension.type === 'extension',\n ) as Extension[]\n const nodeExtensions = extensions.filter(extension => extension.type === 'node') as Node[]\n const markExtensions = extensions.filter(extension => extension.type === 'mark') as Mark[]\n\n return {\n baseExtensions,\n nodeExtensions,\n markExtensions,\n }\n}\n","import type { MarkConfig, NodeConfig } from '../index.js'\nimport type { AnyConfig, Attribute, Attributes, ExtensionAttribute, Extensions } from '../types.js'\nimport { getExtensionField } from './getExtensionField.js'\nimport { splitExtensions } from './splitExtensions.js'\n\n/**\n * Get a list of all extension attributes defined in `addAttribute` and `addGlobalAttribute`.\n * @param extensions List of extensions\n */\nexport function getAttributesFromExtensions(extensions: Extensions): ExtensionAttribute[] {\n const extensionAttributes: ExtensionAttribute[] = []\n const { nodeExtensions, markExtensions } = splitExtensions(extensions)\n const nodeAndMarkExtensions = [...nodeExtensions, ...markExtensions]\n const defaultAttribute: Required> & Pick = {\n default: null,\n validate: undefined,\n rendered: true,\n renderHTML: null,\n parseHTML: null,\n keepOnSplit: true,\n isRequired: false,\n }\n\n // Precompute lists of extension types for global attribute resolution\n const nodeExtensionTypes = nodeExtensions.filter(ext => ext.name !== 'text').map(ext => ext.name)\n const markExtensionTypes = markExtensions.map(ext => ext.name)\n const allExtensionTypes = [...nodeExtensionTypes, ...markExtensionTypes]\n\n extensions.forEach(extension => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n extensions: nodeAndMarkExtensions,\n }\n\n const addGlobalAttributes = getExtensionField(\n extension,\n 'addGlobalAttributes',\n context,\n )\n\n if (!addGlobalAttributes) {\n return\n }\n\n const globalAttributes = addGlobalAttributes()\n\n globalAttributes.forEach(globalAttribute => {\n // Resolve the types based on the string shorthand or explicit array\n let resolvedTypes: string[]\n if (Array.isArray(globalAttribute.types)) {\n resolvedTypes = globalAttribute.types\n } else if (globalAttribute.types === '*') {\n resolvedTypes = allExtensionTypes\n } else if (globalAttribute.types === 'nodes') {\n resolvedTypes = nodeExtensionTypes\n } else if (globalAttribute.types === 'marks') {\n resolvedTypes = markExtensionTypes\n } else {\n resolvedTypes = []\n }\n\n resolvedTypes.forEach(type => {\n Object.entries(globalAttribute.attributes).forEach(([name, attribute]) => {\n extensionAttributes.push({\n type,\n name,\n attribute: {\n ...defaultAttribute,\n ...attribute,\n },\n })\n })\n })\n })\n })\n\n nodeAndMarkExtensions.forEach(extension => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n\n const addAttributes = getExtensionField<\n NodeConfig['addAttributes'] | MarkConfig['addAttributes']\n >(extension, 'addAttributes', context)\n\n if (!addAttributes) {\n return\n }\n\n // TODO: remove `as Attributes`\n const attributes = addAttributes() as Attributes\n\n Object.entries(attributes).forEach(([name, attribute]) => {\n const mergedAttr = {\n ...defaultAttribute,\n ...attribute,\n }\n\n if (typeof mergedAttr?.default === 'function') {\n mergedAttr.default = mergedAttr.default()\n }\n\n if (mergedAttr?.isRequired && mergedAttr?.default === undefined) {\n delete mergedAttr.default\n }\n\n extensionAttributes.push({\n type: extension.name,\n name,\n attribute: mergedAttr,\n })\n })\n })\n\n return extensionAttributes\n}\n","/** Splits a CSS style string into declarations, ignoring semicolons inside quotes/parentheses. */\nfunction splitStyleDeclarations(styles: string): string[] {\n const result: string[] = []\n\n let current = ''\n let inSingleQuote = false\n let inDoubleQuote = false\n let parenDepth = 0\n\n const length = styles.length\n for (let i = 0; i < length; i += 1) {\n const char = styles[i]\n if (char === \"'\" && !inDoubleQuote) {\n inSingleQuote = !inSingleQuote\n current += char\n continue\n }\n if (char === '\"' && !inSingleQuote) {\n inDoubleQuote = !inDoubleQuote\n current += char\n continue\n }\n if (!inSingleQuote && !inDoubleQuote) {\n if (char === '(') {\n parenDepth += 1\n current += char\n continue\n }\n if (char === ')' && parenDepth > 0) {\n parenDepth -= 1\n current += char\n continue\n }\n if (char === ';' && parenDepth === 0) {\n result.push(current)\n current = ''\n continue\n }\n }\n current += char\n }\n if (current) {\n result.push(current)\n }\n\n return result\n}\n\n/** Yields property/value pairs from a style string. */\nfunction parseStyleEntries(styles: string | undefined): [property: string, value: string][] {\n const pairs: [string, string][] = []\n\n const declarations = splitStyleDeclarations(styles || '')\n const numDeclarations = declarations.length\n\n for (let i = 0; i < numDeclarations; i += 1) {\n const declaration = declarations[i]\n\n const firstColonIndex = declaration.indexOf(':')\n if (firstColonIndex === -1) {\n continue\n }\n\n const property = declaration.slice(0, firstColonIndex).trim()\n const value = declaration.slice(firstColonIndex + 1).trim()\n if (property && value) {\n pairs.push([property, value])\n }\n }\n\n return pairs\n}\n\nexport function mergeAttributes(...objects: Record[]): Record {\n return objects\n .filter(item => !!item)\n .reduce((items, item) => {\n const mergedAttributes = { ...items }\n\n Object.entries(item).forEach(([key, value]) => {\n const exists = mergedAttributes[key]\n\n if (!exists) {\n mergedAttributes[key] = value\n\n return\n }\n\n if (key === 'class') {\n const valueClasses: string[] = value ? String(value).split(' ') : []\n const existingClasses: string[] = mergedAttributes[key]\n ? mergedAttributes[key].split(' ')\n : []\n\n const insertClasses = valueClasses.filter(\n valueClass => !existingClasses.includes(valueClass),\n )\n\n mergedAttributes[key] = [...existingClasses, ...insertClasses].join(' ')\n } else if (key === 'style') {\n const styleMap = new Map([\n ...parseStyleEntries(mergedAttributes[key]),\n ...parseStyleEntries(value),\n ])\n\n mergedAttributes[key] = Array.from(styleMap.entries())\n .map(([property, val]) => `${property}: ${val}`)\n .join('; ')\n } else {\n mergedAttributes[key] = value\n }\n })\n\n return mergedAttributes\n }, {})\n}\n","import type { Mark, Node } from '@tiptap/pm/model'\n\nimport type { ExtensionAttribute } from '../types.js'\nimport { mergeAttributes } from '../utilities/mergeAttributes.js'\n\nexport function getRenderedAttributes(\n nodeOrMark: Node | Mark,\n extensionAttributes: ExtensionAttribute[],\n): Record {\n return extensionAttributes\n .filter(attribute => attribute.type === nodeOrMark.type.name)\n .filter(item => item.attribute.rendered)\n .map(item => {\n if (!item.attribute.renderHTML) {\n return {\n [item.name]: nodeOrMark.attrs[item.name],\n }\n }\n\n return item.attribute.renderHTML(nodeOrMark.attrs) || {}\n })\n .reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {})\n}\n","export function fromString(value: any): any {\n if (typeof value !== 'string') {\n return value\n }\n\n if (value.match(/^[+-]?(?:\\d*\\.)?\\d+$/)) {\n return Number(value)\n }\n\n if (value === 'true') {\n return true\n }\n\n if (value === 'false') {\n return false\n }\n\n return value\n}\n","import type { ParseRule } from '@tiptap/pm/model'\n\nimport type { ExtensionAttribute } from '../types.js'\nimport { fromString } from '../utilities/fromString.js'\n\n/**\n * This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`).\n * Cancels when `getAttrs` returned `false`.\n * @param parseRule ProseMirror ParseRule\n * @param extensionAttributes List of attributes to inject\n */\nexport function injectExtensionAttributesToParseRule(\n parseRule: ParseRule,\n extensionAttributes: ExtensionAttribute[],\n): ParseRule {\n if ('style' in parseRule) {\n return parseRule\n }\n\n return {\n ...parseRule,\n getAttrs: (node: HTMLElement) => {\n const oldAttributes = parseRule.getAttrs ? parseRule.getAttrs(node) : parseRule.attrs\n\n if (oldAttributes === false) {\n return false\n }\n\n const newAttributes = extensionAttributes.reduce((items, item) => {\n const value = item.attribute.parseHTML\n ? item.attribute.parseHTML(node)\n : fromString(node.getAttribute(item.name))\n\n if (value === null || value === undefined) {\n return items\n }\n\n return {\n ...items,\n [item.name]: value,\n }\n }, {})\n\n return { ...oldAttributes, ...newAttributes }\n },\n }\n}\n","/**\n * Find duplicates in an array.\n */\nexport function findDuplicates(items: T[]): T[] {\n const filtered = items.filter((el, index) => items.indexOf(el) !== index)\n\n return Array.from(new Set(filtered))\n}\n","import type { AnyConfig, Extensions } from '../types.js'\nimport { getExtensionField } from './getExtensionField.js'\n\n/**\n * Sort extensions by priority.\n * @param extensions An array of Tiptap extensions\n * @returns A sorted array of Tiptap extensions by priority\n */\nexport function sortExtensions(extensions: Extensions): Extensions {\n const defaultPriority = 100\n\n return extensions.sort((a, b) => {\n const priorityA = getExtensionField(a, 'priority') || defaultPriority\n const priorityB = getExtensionField(b, 'priority') || defaultPriority\n\n if (priorityA > priorityB) {\n return -1\n }\n\n if (priorityA < priorityB) {\n return 1\n }\n\n return 0\n })\n}\n","import type { Extensions } from '../types.js'\nimport { findDuplicates } from '../utilities/findDuplicates.js'\nimport { flattenExtensions } from './flattenExtensions.js'\nimport { sortExtensions } from './sortExtensions.js'\n\n/**\n * Returns a flattened and sorted extension list while\n * also checking for duplicated extensions and warns the user.\n * @param extensions An array of Tiptap extensions\n * @returns An flattened and sorted array of Tiptap extensions\n */\nexport function resolveExtensions(extensions: Extensions): Extensions {\n const resolvedExtensions = sortExtensions(flattenExtensions(extensions))\n const duplicatedNames = findDuplicates(resolvedExtensions.map(extension => extension.name))\n\n if (duplicatedNames.length) {\n console.warn(\n `[tiptap warn]: Duplicate extension names found: [${duplicatedNames\n .map(item => `'${item}'`)\n .join(', ')}]. This can lead to issues.`,\n )\n }\n\n return resolvedExtensions\n}\n","import type { Schema } from '@tiptap/pm/model'\n\nimport type { Editor } from '../Editor.js'\nimport type { Extensions } from '../types.js'\nimport { getSchemaByResolvedExtensions } from './getSchemaByResolvedExtensions.js'\nimport { resolveExtensions } from './resolveExtensions.js'\n\nexport function getSchema(extensions: Extensions, editor?: Editor): Schema {\n const resolvedExtensions = resolveExtensions(extensions)\n\n return getSchemaByResolvedExtensions(resolvedExtensions, editor)\n}\n","import { DOMParser } from '@tiptap/pm/model'\n\nimport type { Extensions } from '../types.js'\nimport { elementFromString } from '../utilities/elementFromString.js'\nimport { getSchema } from './getSchema.js'\n\n/**\n * Generate JSONContent from HTML\n * @param html The HTML to generate JSONContent from\n * @param extensions The extensions to use for the schema\n * @returns The generated JSONContent\n */\nexport function generateJSON(html: string, extensions: Extensions): Record {\n const schema = getSchema(extensions)\n const dom = elementFromString(html)\n\n return DOMParser.fromSchema(schema).parse(dom).toJSON()\n}\n","import { Node } from '@tiptap/pm/model'\n\nimport type { Extensions, JSONContent, TextSerializer } from '../types.js'\nimport { getSchema } from './getSchema.js'\nimport { getText } from './getText.js'\nimport { getTextSerializersFromSchema } from './getTextSerializersFromSchema.js'\n\n/**\n * Generate raw text from a JSONContent\n * @param doc The JSONContent to generate text from\n * @param extensions The extensions to use for the schema\n * @param options Options for the text generation f.e. blockSeparator or textSerializers\n * @returns The generated text\n */\nexport function generateText(\n doc: JSONContent,\n extensions: Extensions,\n options?: {\n blockSeparator?: string\n textSerializers?: Record\n },\n): string {\n const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {}\n const schema = getSchema(extensions)\n const contentNode = Node.fromJSON(schema, doc)\n\n return getText(contentNode, {\n blockSeparator,\n textSerializers: {\n ...getTextSerializersFromSchema(schema),\n ...textSerializers,\n },\n })\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { Range, TextSerializer } from '../types.js'\n\n/**\n * Gets the text between two positions in a Prosemirror node\n * and serializes it using the given text serializers and block separator (see getText)\n * @param startNode The Prosemirror node to start from\n * @param range The range of the text to get\n * @param options Options for the text serializer & block separator\n * @returns The text between the two positions\n */\nexport function getTextBetween(\n startNode: ProseMirrorNode,\n range: Range,\n options?: {\n blockSeparator?: string\n textSerializers?: Record\n },\n): string {\n const { from, to } = range\n const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {}\n let text = ''\n\n startNode.nodesBetween(from, to, (node, pos, parent, index) => {\n if (node.isBlock && pos > from) {\n text += blockSeparator\n }\n\n const textSerializer = textSerializers?.[node.type.name]\n\n if (textSerializer) {\n if (parent) {\n text += textSerializer({\n node,\n pos,\n parent,\n index,\n range,\n })\n }\n // do not descend into child nodes when there exists a serializer\n return false\n }\n\n if (node.isText) {\n text += node?.text?.slice(Math.max(from, pos) - pos, to - pos) // oxlint-disable-line\n }\n })\n\n return text\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { TextSerializer } from '../types.js'\nimport { getTextBetween } from './getTextBetween.js'\n\n/**\n * Gets the text of a Prosemirror node\n * @param node The Prosemirror node\n * @param options Options for the text serializer & block separator\n * @returns The text of the node\n * @example ```js\n * const text = getText(node, { blockSeparator: '\\n' })\n * ```\n */\nexport function getText(\n node: ProseMirrorNode,\n options?: {\n blockSeparator?: string\n textSerializers?: Record\n },\n) {\n const range = {\n from: 0,\n to: node.content.size,\n }\n\n return getTextBetween(node, range, options)\n}\n","import type { Schema } from '@tiptap/pm/model'\n\nimport type { TextSerializer } from '../types.js'\n\n/**\n * Find text serializers `toText` in a Prosemirror schema\n * @param schema The Prosemirror schema to search in\n * @returns A record of text serializers by node name\n */\nexport function getTextSerializersFromSchema(schema: Schema): Record {\n return Object.fromEntries(\n Object.entries(schema.nodes)\n .filter(([, node]) => node.spec.toText)\n .map(([name, node]) => [name, node.spec.toText]),\n )\n}\n","import type { Node, NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { getNodeType } from './getNodeType.js'\n\nexport function getNodeAttributes(\n state: EditorState,\n typeOrName: string | NodeType,\n): Record {\n const type = getNodeType(typeOrName, state.schema)\n const { from, to } = state.selection\n const nodes: Node[] = []\n\n state.doc.nodesBetween(from, to, node => {\n nodes.push(node)\n })\n\n const node = nodes.reverse().find(nodeItem => nodeItem.type.name === type.name)\n\n if (!node) {\n return {}\n }\n\n return { ...node.attrs }\n}\n","import type { MarkType, NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { getMarkAttributes } from './getMarkAttributes.js'\nimport { getNodeAttributes } from './getNodeAttributes.js'\nimport { getSchemaTypeNameByName } from './getSchemaTypeNameByName.js'\n\n/**\n * Get node or mark attributes by type or name on the current editor state\n * @param state The current editor state\n * @param typeOrName The node or mark type or name\n * @returns The attributes of the node or mark or an empty object\n */\nexport function getAttributes(\n state: EditorState,\n typeOrName: string | NodeType | MarkType,\n): Record {\n const schemaType = getSchemaTypeNameByName(\n typeof typeOrName === 'string' ? typeOrName : typeOrName.name,\n state.schema,\n )\n\n if (schemaType === 'node') {\n return getNodeAttributes(state, typeOrName as NodeType)\n }\n\n if (schemaType === 'mark') {\n return getMarkAttributes(state, typeOrName as MarkType)\n }\n\n return {}\n}\n","/**\n * Removes duplicated values within an array.\n * Supports numbers, strings and objects.\n */\nexport function removeDuplicates(array: T[], by = JSON.stringify): T[] {\n const seen: Record = {}\n\n return array.filter(item => {\n const key = by(item)\n\n return Object.prototype.hasOwnProperty.call(seen, key) ? false : (seen[key] = true)\n })\n}\n","import type { Step, Transform } from '@tiptap/pm/transform'\n\nimport type { Range } from '../types.js'\nimport { removeDuplicates } from '../utilities/removeDuplicates.js'\n\nexport type ChangedRange = {\n oldRange: Range\n newRange: Range\n}\n\n/**\n * Removes duplicated ranges and ranges that are\n * fully captured by other ranges.\n */\nfunction simplifyChangedRanges(changes: ChangedRange[]): ChangedRange[] {\n const uniqueChanges = removeDuplicates(changes)\n\n return uniqueChanges.length === 1\n ? uniqueChanges\n : uniqueChanges.filter((change, index) => {\n const rest = uniqueChanges.filter((_, i) => i !== index)\n\n return !rest.some(otherChange => {\n return (\n change.oldRange.from >= otherChange.oldRange.from &&\n change.oldRange.to <= otherChange.oldRange.to &&\n change.newRange.from >= otherChange.newRange.from &&\n change.newRange.to <= otherChange.newRange.to\n )\n })\n })\n}\n\n/**\n * Returns a list of changed ranges\n * based on the first and last state of all steps.\n */\nexport function getChangedRanges(transform: Transform): ChangedRange[] {\n const { mapping, steps } = transform\n const changes: ChangedRange[] = []\n\n mapping.maps.forEach((stepMap, index) => {\n const ranges: Range[] = []\n\n // This accounts for step changes where no range was actually altered\n // e.g. when setting a mark, node attribute, etc.\n // @ts-ignore\n if (!stepMap.ranges.length) {\n const { from, to } = steps[index] as Step & {\n from?: number\n to?: number\n }\n\n if (from === undefined || to === undefined) {\n return\n }\n\n ranges.push({ from, to })\n } else {\n stepMap.forEach((from, to) => {\n ranges.push({ from, to })\n })\n }\n\n ranges.forEach(({ from, to }) => {\n const newStart = mapping.slice(index).map(from, -1)\n const newEnd = mapping.slice(index).map(to)\n const oldStart = mapping.invert().map(newStart, -1)\n const oldEnd = mapping.invert().map(newEnd)\n\n changes.push({\n oldRange: {\n from: oldStart,\n to: oldEnd,\n },\n newRange: {\n from: newStart,\n to: newEnd,\n },\n })\n })\n })\n\n return simplifyChangedRanges(changes)\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { JSONContent } from '../types.js'\n\ninterface DebugJSONContent extends JSONContent {\n from: number\n to: number\n}\n\nexport function getDebugJSON(node: ProseMirrorNode, startOffset = 0): DebugJSONContent {\n const isTopNode = node.type === node.type.schema.topNodeType\n const increment = isTopNode ? 0 : 1\n const from = startOffset\n const to = from + node.nodeSize\n const marks = node.marks.map(mark => {\n const output: { type: string; attrs?: Record } = {\n type: mark.type.name,\n }\n\n if (Object.keys(mark.attrs).length) {\n output.attrs = { ...mark.attrs }\n }\n\n return output\n })\n const attrs = { ...node.attrs }\n const output: DebugJSONContent = {\n type: node.type.name,\n from,\n to,\n }\n\n if (Object.keys(attrs).length) {\n output.attrs = attrs\n }\n\n if (marks.length) {\n output.marks = marks\n }\n\n if (node.content.childCount) {\n output.content = []\n\n node.forEach((child, offset) => {\n output.content?.push(getDebugJSON(child, startOffset + offset + increment))\n })\n }\n\n if (node.text) {\n output.text = node.text\n }\n\n return output\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport type { MarkRange } from '../types.js'\nimport { getMarkRange } from './getMarkRange.js'\n\nexport function getMarksBetween(from: number, to: number, doc: ProseMirrorNode): MarkRange[] {\n const marks: MarkRange[] = []\n\n // get all inclusive marks on empty selection\n if (from === to) {\n doc\n .resolve(from)\n .marks()\n .forEach(mark => {\n const $pos = doc.resolve(from)\n const range = getMarkRange($pos, mark.type)\n\n if (!range) {\n return\n }\n\n marks.push({\n mark,\n ...range,\n })\n })\n } else {\n doc.nodesBetween(from, to, (node, pos) => {\n if (!node || node?.nodeSize === undefined) {\n return\n }\n\n marks.push(\n ...node.marks.map(mark => ({\n from: pos,\n to: pos + node.nodeSize,\n mark,\n })),\n )\n })\n }\n\n return marks\n}\n","import type { Node, NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\n/**\n * Finds the first node of a given type or name in the current selection.\n * @param state The editor state.\n * @param typeOrName The node type or name.\n * @param pos The position to start searching from.\n * @param maxDepth The maximum depth to search.\n * @returns The node and the depth as an array.\n */\nexport const getNodeAtPosition = (\n state: EditorState,\n typeOrName: string | NodeType,\n pos: number,\n maxDepth = 20,\n) => {\n const $pos = state.doc.resolve(pos)\n\n let currentDepth = maxDepth\n let node: Node | null = null\n\n while (currentDepth > 0 && node === null) {\n const currentNode = $pos.node(currentDepth)\n\n if (currentNode?.type.name === typeOrName) {\n node = currentNode\n } else {\n currentDepth -= 1\n }\n }\n\n return [node, currentDepth] as [Node | null, number]\n}\n","import type { MarkType, NodeType, Schema } from '@tiptap/pm/model'\n\n/**\n * Tries to get a node or mark type by its name.\n * @param name The name of the node or mark type\n * @param schema The Prosemiror schema to search in\n * @returns The node or mark type, or null if it doesn't exist\n */\nexport function getSchemaTypeByName(name: string, schema: Schema): NodeType | MarkType | null {\n return schema.nodes[name] || schema.marks[name] || null\n}\n","import type { ExtensionAttribute } from '../types.js'\n\n/**\n * Return attributes of an extension that should be splitted by keepOnSplit flag\n * @param extensionAttributes Array of extension attributes\n * @param typeName The type of the extension\n * @param attributes The attributes of the extension\n * @returns The splitted attributes\n */\nexport function getSplittedAttributes(\n extensionAttributes: ExtensionAttribute[],\n typeName: string,\n attributes: Record,\n): Record {\n return Object.fromEntries(\n Object.entries(attributes).filter(([name]) => {\n const extensionAttribute = extensionAttributes.find(item => {\n return item.type === typeName && item.name === name\n })\n\n if (!extensionAttribute) {\n return false\n }\n\n return extensionAttribute.attribute.keepOnSplit\n }),\n )\n}\n","import type { ResolvedPos } from '@tiptap/pm/model'\n\n/**\n * Returns the text content of a resolved prosemirror position\n * @param $from The resolved position to get the text content from\n * @param maxMatch The maximum number of characters to match\n * @returns The text content\n */\nexport const getTextContentFromNodes = ($from: ResolvedPos, maxMatch = 500) => {\n let textBefore = ''\n\n const sliceEndPos = $from.parentOffset\n\n $from.parent.nodesBetween(\n Math.max(0, sliceEndPos - maxMatch),\n sliceEndPos,\n (node, pos, parent, index) => {\n const chunk =\n node.type.spec.toText?.({\n node,\n pos,\n parent,\n index,\n }) ||\n node.textContent ||\n '%leaf%'\n\n textBefore +=\n node.isAtom && !node.isText ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos))\n },\n )\n\n return textBefore\n}\n","import type { MarkType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport type { MarkRange } from '../types.js'\nimport { objectIncludes } from '../utilities/objectIncludes.js'\nimport { getMarkType } from './getMarkType.js'\n\nexport function isMarkActive(\n state: EditorState,\n typeOrName: MarkType | string | null,\n attributes: Record = {},\n): boolean {\n const { empty, ranges } = state.selection\n const type = typeOrName ? getMarkType(typeOrName, state.schema) : null\n\n if (empty) {\n return !!(state.storedMarks || state.selection.$from.marks())\n .filter(mark => {\n if (!type) {\n return true\n }\n\n return type.name === mark.type.name\n })\n .find(mark => objectIncludes(mark.attrs, attributes, { strict: false }))\n }\n\n let selectionRange = 0\n const markRanges: MarkRange[] = []\n\n ranges.forEach(({ $from, $to }) => {\n const from = $from.pos\n const to = $to.pos\n\n state.doc.nodesBetween(from, to, (node, pos) => {\n // ignore selected text inside nodes whose schema disallows this mark type\n if (type && node.inlineContent && !node.type.allowsMarkType(type)) {\n return false\n }\n\n if (!node.isText && !node.marks.length) {\n return\n }\n\n const relativeFrom = Math.max(from, pos)\n const relativeTo = Math.min(to, pos + node.nodeSize)\n const range = relativeTo - relativeFrom\n\n selectionRange += range\n\n markRanges.push(\n ...node.marks.map(mark => ({\n mark,\n from: relativeFrom,\n to: relativeTo,\n })),\n )\n })\n })\n\n if (selectionRange === 0) {\n return false\n }\n\n // calculate range of matched mark\n const matchedRange = markRanges\n .filter(markRange => {\n if (!type) {\n return true\n }\n\n return type.name === markRange.mark.type.name\n })\n .filter(markRange => objectIncludes(markRange.mark.attrs, attributes, { strict: false }))\n .reduce((sum, markRange) => sum + markRange.to - markRange.from, 0)\n\n // calculate range of marks that excludes the searched mark\n // for example `code` doesn’t allow any other marks\n const excludedRange = markRanges\n .filter(markRange => {\n if (!type) {\n return true\n }\n\n return markRange.mark.type !== type && markRange.mark.type.excludes(type)\n })\n .reduce((sum, markRange) => sum + markRange.to - markRange.from, 0)\n\n // we only include the result of `excludedRange`\n // if there is a match at all\n const range = matchedRange > 0 ? matchedRange + excludedRange : matchedRange\n\n return range >= selectionRange\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { getSchemaTypeNameByName } from './getSchemaTypeNameByName.js'\nimport { isMarkActive } from './isMarkActive.js'\nimport { isNodeActive } from './isNodeActive.js'\n\nexport function isActive(\n state: EditorState,\n name: string | null,\n attributes: Record = {},\n): boolean {\n if (!name) {\n return isNodeActive(state, null, attributes) || isMarkActive(state, null, attributes)\n }\n\n const schemaType = getSchemaTypeNameByName(name, state.schema)\n\n if (schemaType === 'node') {\n return isNodeActive(state, name, attributes)\n }\n\n if (schemaType === 'mark') {\n return isMarkActive(state, name, attributes)\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findParentNode } from './findParentNode.js'\n\nexport const isAtEndOfNode = (state: EditorState, nodeType?: string) => {\n const { $from, $to, $anchor } = state.selection\n\n if (nodeType) {\n const parentNode = findParentNode(node => node.type.name === nodeType)(state.selection)\n\n if (!parentNode) {\n return false\n }\n\n const $parentPos = state.doc.resolve(parentNode.pos + 1)\n\n if ($anchor.pos + 1 === $parentPos.end()) {\n return true\n }\n\n return false\n }\n\n if ($to.parentOffset < $to.parent.nodeSize - 2 || $from.pos !== $to.pos) {\n return false\n }\n\n return true\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const isAtStartOfNode = (state: EditorState) => {\n const { $from, $to } = state.selection\n\n if ($from.parentOffset > 0 || $from.pos !== $to.pos) {\n return false\n }\n\n return true\n}\n","import type { AnyExtension, EnableRules } from '../types.js'\n\nexport function isExtensionRulesEnabled(extension: AnyExtension, enabled: EnableRules): boolean {\n if (Array.isArray(enabled)) {\n return enabled.some(enabledExtension => {\n const name = typeof enabledExtension === 'string' ? enabledExtension : enabledExtension.name\n\n return name === extension.name\n })\n }\n\n return enabled\n}\n","import { getExtensionField } from '../helpers/getExtensionField.js'\nimport type { NodeConfig } from '../index.js'\nimport type { Extensions } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\nimport { splitExtensions } from './splitExtensions.js'\n\nexport function isList(name: string, extensions: Extensions): boolean {\n const { nodeExtensions } = splitExtensions(extensions)\n const extension = nodeExtensions.find(item => item.name === name)\n\n if (!extension) {\n return false\n }\n\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n const group = callOrReturn(getExtensionField(extension, 'group', context))\n\n if (typeof group !== 'string') {\n return false\n }\n\n return group.split(' ').includes('list')\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\n/**\n * Returns true if the given prosemirror node is empty.\n */\nexport function isNodeEmpty(\n node: ProseMirrorNode,\n {\n checkChildren = true,\n ignoreWhitespace = false,\n }: {\n /**\n * When true (default), it will also check if all children are empty.\n */\n checkChildren?: boolean\n /**\n * When true, it will ignore whitespace when checking for emptiness.\n */\n ignoreWhitespace?: boolean\n } = {},\n): boolean {\n if (ignoreWhitespace) {\n if (node.type.name === 'hardBreak') {\n // Hard breaks are considered empty\n return true\n }\n if (node.isText) {\n return !/\\S/.test(node.text ?? '')\n }\n }\n\n if (node.isText) {\n return !node.text\n }\n\n if (node.isAtom || node.isLeaf) {\n return false\n }\n\n if (node.content.childCount === 0) {\n return true\n }\n\n if (checkChildren) {\n let isContentEmpty = true\n\n node.content.forEach(childNode => {\n if (isContentEmpty === false) {\n // Exit early for perf\n return\n }\n\n if (!isNodeEmpty(childNode, { ignoreWhitespace, checkChildren })) {\n isContentEmpty = false\n }\n })\n\n return isContentEmpty\n }\n\n return false\n}\n","import { NodeSelection } from '@tiptap/pm/state'\n\nexport function isNodeSelection(value: unknown): value is NodeSelection {\n return value instanceof NodeSelection\n}\n","import type { Selection } from '@tiptap/pm/state'\n\nimport { isTextSelection } from './isTextSelection.js'\n\n/**\n * Determines whether a node view should be considered selected for the given\n * editor selection.\n *\n * A node is considered selected when the current selection fully covers it\n * (e.g. a `NodeSelection`). When `selectedOnTextSelection` is enabled, the\n * node is additionally considered selected if a `TextSelection` is fully\n * contained within the node's range.\n *\n * @param selection The current editor selection.\n * @param pos The start position of the node in the document.\n * @param nodeSize The size of the node.\n * @param selectedOnTextSelection When `true`, also treat selections inside the node as selected.\n * @returns `true` if the node view should render as selected.\n */\nexport function isNodeViewSelected({\n selection,\n pos,\n nodeSize,\n selectedOnTextSelection = false,\n}: {\n selection: Selection\n pos: number\n nodeSize: number\n selectedOnTextSelection?: boolean\n}): boolean {\n const { from, to } = selection\n\n if (from <= pos && to >= pos + nodeSize) {\n return true\n }\n\n if (selectedOnTextSelection && isTextSelection(selection) && from > pos && to < pos + nodeSize) {\n return true\n }\n\n return false\n}\n","import type { Transaction } from '@tiptap/pm/state'\nimport type { MapResult } from '@tiptap/pm/transform'\n\n/**\n * A class that represents a mappable position in the editor. It can be extended\n * by other extensions to add additional position mapping capabilities.\n */\nexport class MappablePosition {\n /**\n * The absolute position in the editor.\n */\n public position: number\n\n constructor(position: number) {\n this.position = position\n }\n\n /**\n * Creates a MappablePosition from a JSON object.\n */\n static fromJSON(json: any): MappablePosition {\n return new MappablePosition(json.position)\n }\n\n /**\n * Converts the MappablePosition to a JSON object.\n */\n toJSON(): any {\n return {\n position: this.position,\n }\n }\n}\n\n/**\n * The result of the getUpdatedPosition function.\n */\nexport interface GetUpdatedPositionResult {\n position: MappablePosition\n mapResult: MapResult | null\n}\n\n/**\n * Calculates the new position after applying a transaction.\n *\n * @returns The new mappable position and the map result.\n */\nexport function getUpdatedPosition(\n position: MappablePosition,\n transaction: Transaction,\n): GetUpdatedPositionResult {\n const mapResult = transaction.mapping.mapResult(position.position)\n return {\n position: new MappablePosition(mapResult.pos),\n mapResult,\n }\n}\n\n/**\n * Creates a MappablePosition from a position number. This is the default\n * implementation for Tiptap core. It can be overridden by other Tiptap\n * extensions.\n *\n * @param position The position (as a number) where the MappablePosition will be created.\n * @returns A new MappablePosition instance at the given position.\n */\nexport function createMappablePosition(position: number): MappablePosition {\n return new MappablePosition(position)\n}\n","import type { EditorView } from '@tiptap/pm/view'\n\nimport { minMax } from '../utilities/minMax.js'\n\nexport function posToDOMRect(view: EditorView, from: number, to: number): DOMRect {\n const minPos = 0\n const maxPos = view.state.doc.content.size\n const resolvedFrom = minMax(from, minPos, maxPos)\n const resolvedEnd = minMax(to, minPos, maxPos)\n const start = view.coordsAtPos(resolvedFrom)\n const end = view.coordsAtPos(resolvedEnd, -1)\n const top = Math.min(start.top, end.top)\n const bottom = Math.max(start.bottom, end.bottom)\n const left = Math.min(start.left, end.left)\n const right = Math.max(start.right, end.right)\n const width = right - left\n const height = bottom - top\n const x = left\n const y = top\n const data = {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x,\n y,\n }\n\n return {\n ...data,\n toJSON: () => data,\n }\n}\n","import type { Schema } from '@tiptap/pm/model'\n\nimport type { JSONContent } from '../types.js'\n\ntype RewriteUnknownContentOptions = {\n /**\n * If true, unknown nodes will be treated as paragraphs\n * @default true\n */\n fallbackToParagraph?: boolean\n}\n\ntype RewrittenContent = {\n /**\n * The original JSON content that was rewritten\n */\n original: JSONContent\n /**\n * The name of the node or mark that was unsupported\n */\n unsupported: string\n}[]\n\n/**\n * The actual implementation of the rewriteUnknownContent function\n */\nfunction rewriteUnknownContentInner({\n json,\n validMarks,\n validNodes,\n options,\n rewrittenContent = [],\n}: {\n json: JSONContent\n validMarks: Set\n validNodes: Set\n options?: RewriteUnknownContentOptions\n rewrittenContent?: RewrittenContent\n}): {\n /**\n * The cleaned JSON content\n */\n json: JSONContent | null\n /**\n * The array of nodes and marks that were rewritten\n */\n rewrittenContent: RewrittenContent\n} {\n if (json.marks && Array.isArray(json.marks)) {\n json.marks = json.marks.filter(mark => {\n const name = typeof mark === 'string' ? mark : mark.type\n\n if (validMarks.has(name)) {\n return true\n }\n\n rewrittenContent.push({\n original: JSON.parse(JSON.stringify(mark)),\n unsupported: name,\n })\n // Just ignore any unknown marks\n return false\n })\n }\n\n if (json.content && Array.isArray(json.content)) {\n json.content = json.content\n .map(\n value =>\n rewriteUnknownContentInner({\n json: value,\n validMarks,\n validNodes,\n options,\n rewrittenContent,\n }).json,\n )\n .filter(a => a !== null && a !== undefined)\n }\n\n if (json.type && !validNodes.has(json.type)) {\n rewrittenContent.push({\n original: JSON.parse(JSON.stringify(json)),\n unsupported: json.type,\n })\n\n if (json.content && Array.isArray(json.content) && options?.fallbackToParagraph !== false) {\n // Just treat it like a paragraph and hope for the best\n json.type = 'paragraph'\n\n return {\n json,\n rewrittenContent,\n }\n }\n\n // or just omit it entirely\n return {\n json: null,\n rewrittenContent,\n }\n }\n\n return { json, rewrittenContent }\n}\n\n/**\n * Rewrite unknown nodes and marks within JSON content\n * Allowing for user within the editor\n */\nexport function rewriteUnknownContent(\n /**\n * The JSON content to clean of unknown nodes and marks\n */\n json: JSONContent,\n /**\n * The schema to use for validation\n */\n schema: Schema,\n /**\n * Options for the cleaning process\n */\n options?: RewriteUnknownContentOptions,\n): {\n /**\n * The cleaned JSON content\n */\n json: JSONContent | null\n /**\n * The array of nodes and marks that were rewritten\n */\n rewrittenContent: {\n /**\n * The original JSON content that was rewritten\n */\n original: JSONContent\n /**\n * The name of the node or mark that was unsupported\n */\n unsupported: string\n }[]\n} {\n return rewriteUnknownContentInner({\n json,\n validNodes: new Set(Object.keys(schema.nodes)),\n validMarks: new Set(Object.keys(schema.marks)),\n options,\n })\n}\n","import type { MarkType, ResolvedPos } from '@tiptap/pm/model'\nimport type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { getMarkAttributes } from '../helpers/getMarkAttributes.js'\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { isTextSelection } from '../helpers/index.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setMark: {\n /**\n * Add a mark with new attributes.\n * @param typeOrName The mark type or name.\n * @example editor.commands.setMark('bold', { level: 1 })\n */\n setMark: (typeOrName: string | MarkType, attributes?: Record) => ReturnType\n }\n }\n}\n\nfunction canSetMark(state: EditorState, tr: Transaction, newMarkType: MarkType) {\n const { selection } = tr\n let cursor: ResolvedPos | null = null\n\n if (isTextSelection(selection)) {\n cursor = selection.$cursor\n }\n\n if (cursor) {\n const currentMarks = state.storedMarks ?? cursor.marks()\n const parentAllowsMarkType = cursor.parent.type.allowsMarkType(newMarkType)\n\n // There can be no current marks that exclude the new mark, and the parent must allow this mark type\n return (\n parentAllowsMarkType &&\n (!!newMarkType.isInSet(currentMarks) ||\n !currentMarks.some(mark => mark.type.excludes(newMarkType)))\n )\n }\n\n const { ranges } = selection\n\n return ranges.some(({ $from, $to }) => {\n let someNodeSupportsMark =\n $from.depth === 0\n ? state.doc.inlineContent && state.doc.type.allowsMarkType(newMarkType)\n : false\n\n state.doc.nodesBetween($from.pos, $to.pos, (node, _pos, parent) => {\n // If we already found a mark that we can enable, return false to bypass the remaining search\n if (someNodeSupportsMark) {\n return false\n }\n\n if (node.isInline) {\n const parentAllowsMarkType = !parent || parent.type.allowsMarkType(newMarkType)\n const currentMarksAllowMarkType =\n !!newMarkType.isInSet(node.marks) ||\n !node.marks.some(otherMark => otherMark.type.excludes(newMarkType))\n\n someNodeSupportsMark = parentAllowsMarkType && currentMarksAllowMarkType\n }\n return !someNodeSupportsMark\n })\n\n return someNodeSupportsMark\n })\n}\nexport const setMark: RawCommands['setMark'] =\n (typeOrName, attributes = {}) =>\n ({ tr, state, dispatch }) => {\n const { selection } = tr\n const { empty, ranges } = selection\n const type = getMarkType(typeOrName, state.schema)\n\n if (dispatch) {\n if (empty) {\n const oldAttributes = getMarkAttributes(state, type)\n\n tr.addStoredMark(\n type.create({\n ...oldAttributes,\n ...attributes,\n }),\n )\n } else {\n ranges.forEach(range => {\n const from = range.$from.pos\n const to = range.$to.pos\n\n state.doc.nodesBetween(from, to, (node, pos) => {\n const trimmedFrom = Math.max(pos, from)\n const trimmedTo = Math.min(pos + node.nodeSize, to)\n const someHasMark = node.marks.find(mark => mark.type === type)\n\n // if there is already a mark of this type\n // we know that we have to merge its attributes\n // otherwise we add a fresh new mark\n if (someHasMark) {\n node.marks.forEach(mark => {\n if (type === mark.type) {\n tr.addMark(\n trimmedFrom,\n trimmedTo,\n type.create({\n ...mark.attrs,\n ...attributes,\n }),\n )\n }\n })\n } else {\n tr.addMark(trimmedFrom, trimmedTo, type.create(attributes))\n }\n })\n })\n }\n }\n\n return canSetMark(state, tr, type)\n }\n","import type { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setMeta: {\n /**\n * Store a metadata property in the current transaction.\n * @param key The key of the metadata property.\n * @param value The value to store.\n * @example editor.commands.setMeta('foo', 'bar')\n */\n setMeta: (key: string | Plugin | PluginKey, value: any) => ReturnType\n }\n }\n}\n\nexport const setMeta: RawCommands['setMeta'] =\n (key, value) =>\n ({ tr }) => {\n tr.setMeta(key, value)\n\n return true\n }\n","import { setBlockType } from '@tiptap/pm/commands'\nimport type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setNode: {\n /**\n * Replace a given range with a node.\n * @param typeOrName The type or name of the node\n * @param attributes The attributes of the node\n * @example editor.commands.setNode('paragraph')\n */\n setNode: (typeOrName: string | NodeType, attributes?: Record) => ReturnType\n }\n }\n}\n\nexport const setNode: RawCommands['setNode'] =\n (typeOrName, attributes = {}) =>\n ({ state, dispatch, chain }) => {\n const type = getNodeType(typeOrName, state.schema)\n\n let attributesToCopy: Record | undefined\n\n if (state.selection.$anchor.sameParent(state.selection.$head)) {\n // only copy attributes if the selection is pointing to a node of the same type\n attributesToCopy = state.selection.$anchor.parent.attrs\n }\n\n // TODO: use a fallback like insertContent?\n if (!type.isTextblock) {\n console.warn('[tiptap warn]: Currently \"setNode()\" only supports text block nodes.')\n\n return false\n }\n\n return (\n chain()\n // try to convert node to default node if needed\n .command(({ commands }) => {\n const canSetBlock = setBlockType(type, { ...attributesToCopy, ...attributes })(state)\n\n if (canSetBlock) {\n return true\n }\n\n return commands.clearNodes()\n })\n .command(({ state: updatedState }) => {\n return setBlockType(type, { ...attributesToCopy, ...attributes })(updatedState, dispatch)\n })\n .run()\n )\n }\n","import { NodeSelection } from '@tiptap/pm/state'\n\nimport type { RawCommands } from '../types.js'\nimport { minMax } from '../utilities/minMax.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setNodeSelection: {\n /**\n * Creates a NodeSelection.\n * @param position - Position of the node.\n * @example editor.commands.setNodeSelection(10)\n */\n setNodeSelection: (position: number) => ReturnType\n }\n }\n}\n\nexport const setNodeSelection: RawCommands['setNodeSelection'] =\n position =>\n ({ tr, dispatch }) => {\n if (dispatch) {\n const { doc } = tr\n const from = minMax(position, 0, doc.content.size)\n const selection = NodeSelection.create(doc, from)\n\n tr.setSelection(selection)\n }\n\n return true\n }\n","import type { Range, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setTextDirection: {\n /**\n * Set the text direction for nodes.\n * If no position is provided, it will use the current selection.\n * @param direction The text direction to set ('ltr', 'rtl', or 'auto')\n * @param position Optional position or range to apply the direction to\n * @example editor.commands.setTextDirection('rtl')\n * @example editor.commands.setTextDirection('ltr', { from: 0, to: 10 })\n */\n setTextDirection: (direction: 'ltr' | 'rtl' | 'auto', position?: number | Range) => ReturnType\n }\n }\n}\n\nexport const setTextDirection: RawCommands['setTextDirection'] =\n (direction, position) =>\n ({ tr, state, dispatch }) => {\n const { selection } = state\n let from: number\n let to: number\n\n if (typeof position === 'number') {\n from = position\n to = position\n } else if (position && 'from' in position && 'to' in position) {\n from = position.from\n to = position.to\n } else {\n from = selection.from\n to = selection.to\n }\n\n if (dispatch) {\n tr.doc.nodesBetween(from, to, (node, pos) => {\n if (node.isText) {\n return\n }\n\n tr.setNodeMarkup(pos, undefined, {\n ...node.attrs,\n dir: direction,\n })\n })\n }\n\n return true\n }\n","import { TextSelection } from '@tiptap/pm/state'\n\nimport type { Range, RawCommands } from '../types.js'\nimport { minMax } from '../utilities/minMax.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n setTextSelection: {\n /**\n * Creates a TextSelection.\n * @param position The position of the selection.\n * @example editor.commands.setTextSelection(10)\n */\n setTextSelection: (position: number | Range) => ReturnType\n }\n }\n}\n\nexport const setTextSelection: RawCommands['setTextSelection'] =\n position =>\n ({ tr, dispatch }) => {\n if (dispatch) {\n const { doc } = tr\n const { from, to } =\n typeof position === 'number' ? { from: position, to: position } : position\n const minPos = TextSelection.atStart(doc).from\n const maxPos = TextSelection.atEnd(doc).to\n const resolvedFrom = minMax(from, minPos, maxPos)\n const resolvedEnd = minMax(to, minPos, maxPos)\n const selection = TextSelection.create(doc, resolvedFrom, resolvedEnd)\n\n tr.setSelection(selection)\n }\n\n return true\n }\n","import type { NodeType } from '@tiptap/pm/model'\nimport { sinkListItem as originalSinkListItem } from '@tiptap/pm/schema-list'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n sinkListItem: {\n /**\n * Sink the list item down into an inner list.\n * @param typeOrName The type or name of the node.\n * @example editor.commands.sinkListItem('listItem')\n */\n sinkListItem: (typeOrName: string | NodeType) => ReturnType\n }\n }\n}\n\nexport const sinkListItem: RawCommands['sinkListItem'] =\n typeOrName =>\n ({ state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n\n return originalSinkListItem(type)(state, dispatch)\n }\n","import type { EditorState } from '@tiptap/pm/state'\nimport { NodeSelection, TextSelection } from '@tiptap/pm/state'\nimport { canSplit } from '@tiptap/pm/transform'\n\nimport { defaultBlockAt } from '../helpers/defaultBlockAt.js'\nimport { getSplittedAttributes } from '../helpers/getSplittedAttributes.js'\nimport type { RawCommands } from '../types.js'\n\nfunction ensureMarks(state: EditorState, splittableMarks?: string[]) {\n const marks =\n state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks())\n\n if (marks) {\n const filteredMarks = marks.filter(mark => splittableMarks?.includes(mark.type.name))\n\n state.tr.ensureMarks(filteredMarks)\n }\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n splitBlock: {\n /**\n * Forks a new node from an existing node.\n * @param options.keepMarks Keep marks from the previous node.\n * @example editor.commands.splitBlock()\n * @example editor.commands.splitBlock({ keepMarks: true })\n */\n splitBlock: (options?: { keepMarks?: boolean }) => ReturnType\n }\n }\n}\n\nexport const splitBlock: RawCommands['splitBlock'] =\n ({ keepMarks = true } = {}) =>\n ({ tr, state, dispatch, editor }) => {\n const { selection, doc } = tr\n const { $from, $to } = selection\n const extensionAttributes = editor.extensionManager.attributes\n const newAttributes = getSplittedAttributes(\n extensionAttributes,\n $from.node().type.name,\n $from.node().attrs,\n )\n\n if (selection instanceof NodeSelection && selection.node.isBlock) {\n if (!$from.parentOffset || !canSplit(doc, $from.pos)) {\n return false\n }\n\n if (dispatch) {\n if (keepMarks) {\n ensureMarks(state, editor.extensionManager.splittableMarks)\n }\n\n tr.split($from.pos).scrollIntoView()\n }\n\n return true\n }\n\n if (!$from.parent.isBlock) {\n return false\n }\n\n const atEnd = $to.parentOffset === $to.parent.content.size\n\n const deflt =\n $from.depth === 0\n ? undefined\n : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)))\n\n let types =\n atEnd && deflt\n ? [\n {\n type: deflt,\n attrs: newAttributes,\n },\n ]\n : undefined\n\n let can = canSplit(tr.doc, tr.mapping.map($from.pos), 1, types)\n\n if (\n !types &&\n !can &&\n canSplit(tr.doc, tr.mapping.map($from.pos), 1, deflt ? [{ type: deflt }] : undefined)\n ) {\n can = true\n types = deflt\n ? [\n {\n type: deflt,\n attrs: newAttributes,\n },\n ]\n : undefined\n }\n\n if (dispatch) {\n if (can) {\n if (selection instanceof TextSelection) {\n tr.deleteSelection()\n }\n\n tr.split(tr.mapping.map($from.pos), 1, types)\n\n if (deflt && !atEnd && !$from.parentOffset && $from.parent.type !== deflt) {\n const first = tr.mapping.map($from.before())\n const $first = tr.doc.resolve(first)\n\n if ($from.node(-1).canReplaceWith($first.index(), $first.index() + 1, deflt)) {\n tr.setNodeMarkup(tr.mapping.map($from.before()), deflt)\n }\n }\n }\n\n if (keepMarks) {\n ensureMarks(state, editor.extensionManager.splittableMarks)\n }\n\n tr.scrollIntoView()\n }\n\n return can\n }\n","import type { Node as ProseMirrorNode, NodeType } from '@tiptap/pm/model'\nimport { Fragment, Slice } from '@tiptap/pm/model'\nimport { TextSelection } from '@tiptap/pm/state'\nimport { canSplit } from '@tiptap/pm/transform'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { getSplittedAttributes } from '../helpers/getSplittedAttributes.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n splitListItem: {\n /**\n * Splits one list item into two list items.\n * @param typeOrName The type or name of the node.\n * @param overrideAttrs The attributes to ensure on the new node.\n * @example editor.commands.splitListItem('listItem')\n */\n splitListItem: (\n typeOrName: string | NodeType,\n overrideAttrs?: Record,\n ) => ReturnType\n }\n }\n}\n\nexport const splitListItem: RawCommands['splitListItem'] =\n (typeOrName, overrideAttrs = {}) =>\n ({ tr, state, dispatch, editor }) => {\n const type = getNodeType(typeOrName, state.schema)\n const { $from, $to } = state.selection\n\n // @ts-ignore\n // oxlint-disable-next-line\n const node: ProseMirrorNode = state.selection.node\n\n if ((node && node.isBlock) || $from.depth < 2 || !$from.sameParent($to)) {\n return false\n }\n\n const grandParent = $from.node(-1)\n\n if (grandParent.type !== type) {\n return false\n }\n\n const extensionAttributes = editor.extensionManager.attributes\n\n if ($from.parent.content.size === 0 && $from.node(-1).childCount === $from.indexAfter(-1)) {\n // In an empty block. If this is a nested list, the wrapping\n // list item should be split. Otherwise, bail out and let next\n // command handle lifting.\n if (\n $from.depth === 2 ||\n $from.node(-3).type !== type ||\n $from.index(-2) !== $from.node(-2).childCount - 1\n ) {\n return false\n }\n\n if (dispatch) {\n let wrap = Fragment.empty\n // oxlint-disable-next-line\n const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3\n\n // Build a fragment containing empty versions of the structure\n // from the outer list item to the parent node of the cursor\n for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d -= 1) {\n wrap = Fragment.from($from.node(d).copy(wrap))\n }\n\n const depthAfter =\n // oxlint-disable-next-line no-nested-ternary\n $from.indexAfter(-1) < $from.node(-2).childCount\n ? 1\n : $from.indexAfter(-2) < $from.node(-3).childCount\n ? 2\n : 3\n\n // Add a second list item with an empty default start node\n const newNextTypeAttributes = {\n ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs),\n ...overrideAttrs,\n }\n const nextType =\n type.contentMatch.defaultType?.createAndFill(newNextTypeAttributes) || undefined\n\n wrap = wrap.append(Fragment.from(type.createAndFill(null, nextType) || undefined))\n\n const start = $from.before($from.depth - (depthBefore - 1))\n\n tr.replace(start, $from.after(-depthAfter), new Slice(wrap, 4 - depthBefore, 0))\n\n let sel = -1\n\n tr.doc.nodesBetween(start, tr.doc.content.size, (n, pos) => {\n if (sel > -1) {\n return false\n }\n\n if (n.isTextblock && n.content.size === 0) {\n sel = pos + 1\n }\n })\n\n if (sel > -1) {\n tr.setSelection(TextSelection.near(tr.doc.resolve(sel)))\n }\n\n tr.scrollIntoView()\n }\n\n return true\n }\n\n const nextType = $to.pos === $from.end() ? grandParent.contentMatchAt(0).defaultType : null\n\n const newTypeAttributes = {\n ...getSplittedAttributes(extensionAttributes, grandParent.type.name, grandParent.attrs),\n ...overrideAttrs,\n }\n const newNextTypeAttributes = {\n ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs),\n ...overrideAttrs,\n }\n\n tr.delete($from.pos, $to.pos)\n\n const types = nextType\n ? [\n { type, attrs: newTypeAttributes },\n { type: nextType, attrs: newNextTypeAttributes },\n ]\n : [{ type, attrs: newTypeAttributes }]\n\n if (!canSplit(tr.doc, $from.pos, 2)) {\n return false\n }\n\n if (dispatch) {\n const { selection, storedMarks } = state\n const { splittableMarks } = editor.extensionManager\n const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks())\n\n tr.split($from.pos, 2, types).scrollIntoView()\n\n if (!marks || !dispatch) {\n return true\n }\n\n const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name))\n\n tr.ensureMarks(filteredMarks)\n }\n\n return true\n }\n","import type { NodeType } from '@tiptap/pm/model'\nimport type { Transaction } from '@tiptap/pm/state'\nimport { TextSelection } from '@tiptap/pm/state'\nimport { canJoin } from '@tiptap/pm/transform'\n\nimport { findParentNode } from '../helpers/findParentNode.js'\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isList } from '../helpers/isList.js'\nimport type { RawCommands } from '../types.js'\n\nconst joinListBackwards = (tr: Transaction, listType: NodeType): boolean => {\n const list = findParentNode(node => node.type === listType)(tr.selection)\n\n if (!list) {\n return true\n }\n\n const before = tr.doc.resolve(Math.max(0, list.pos - 1)).before(list.depth)\n\n if (before === undefined) {\n return true\n }\n\n const nodeBefore = tr.doc.nodeAt(before)\n const canJoinBackwards = list.node.type === nodeBefore?.type && canJoin(tr.doc, list.pos)\n\n if (!canJoinBackwards) {\n return true\n }\n\n tr.join(list.pos)\n\n return true\n}\n\nconst joinListForwards = (tr: Transaction, listType: NodeType): boolean => {\n const list = findParentNode(node => node.type === listType)(tr.selection)\n\n if (!list) {\n return true\n }\n\n const after = tr.doc.resolve(list.start).after(list.depth)\n\n if (after === undefined) {\n return true\n }\n\n const nodeAfter = tr.doc.nodeAt(after)\n const canJoinForwards = list.node.type === nodeAfter?.type && canJoin(tr.doc, after)\n\n if (!canJoinForwards) {\n return true\n }\n\n tr.join(after)\n\n return true\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n toggleList: {\n /**\n * Toggle between different list types.\n * @param listTypeOrName The type or name of the list.\n * @param itemTypeOrName The type or name of the list item.\n * @param keepMarks Keep marks when toggling.\n * @param attributes Attributes for the new list.\n * @example editor.commands.toggleList('bulletList', 'listItem')\n */\n toggleList: (\n listTypeOrName: string | NodeType,\n itemTypeOrName: string | NodeType,\n keepMarks?: boolean,\n attributes?: Record,\n ) => ReturnType\n }\n }\n}\n\nfunction createInnerSelectionForWholeDocList(tr: Transaction) {\n const doc = tr.doc\n const list = doc.firstChild\n\n if (!list) {\n return null\n }\n\n // Place the selection inside the list node so that ProseMirror's\n // liftListItem command can operate. AllSelection sits at the doc root.\n // Use TextSelection.between to resolve positions into valid inline\n // content positions, so the selection survives position mapping after\n // liftListItem removes list/item wrappers.\n const $start = doc.resolve(1)\n const $end = doc.resolve(list.nodeSize - 1)\n\n return TextSelection.between($start, $end)\n}\nexport const toggleList: RawCommands['toggleList'] =\n (listTypeOrName, itemTypeOrName, keepMarks, attributes = {}) =>\n ({ editor, tr, state, dispatch, chain, commands, can }) => {\n const { extensions, splittableMarks } = editor.extensionManager\n const listType = getNodeType(listTypeOrName, state.schema)\n const itemType = getNodeType(itemTypeOrName, state.schema)\n const { selection, storedMarks } = state\n const { $from, $to } = selection\n const range = $from.blockRange($to)\n\n const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks())\n\n if (!range) {\n return false\n }\n\n const parentList = findParentNode(node => isList(node.type.name, extensions))(selection)\n\n // When the user presses Ctrl/Cmd+A, ProseMirror creates an `AllSelection`\n // covering the entire document (0..doc.content.size). In that case\n // `findParentNode` cannot detect the surrounding list because the\n // selection sits at the document root. If the document consists of a\n // single top-level list node, treat that list as the active list so the\n // toggle logic can correctly lift or change it.\n const isAllSelection = selection.from === 0 && selection.to === state.doc.content.size\n const topLevelNodes = state.doc.content.content\n const soleTopLevelNode = topLevelNodes.length === 1 ? topLevelNodes[0] : null\n const allSelectionList =\n isAllSelection && soleTopLevelNode && isList(soleTopLevelNode.type.name, extensions)\n ? {\n node: soleTopLevelNode,\n pos: 0,\n depth: 0,\n }\n : null\n\n const currentList = parentList ?? allSelectionList\n\n const isInsideExistingList =\n !!parentList && range.depth >= 1 && range.depth - parentList.depth <= 1\n\n const hasWholeDocSelectedList = !!allSelectionList\n if ((isInsideExistingList || hasWholeDocSelectedList) && currentList) {\n // remove list\n if (currentList.node.type === listType) {\n if (isAllSelection && hasWholeDocSelectedList) {\n return chain()\n .command(({ tr: trx, dispatch: disp }) => {\n // Ctrl/Cmd+A creates an AllSelection at the document root.\n // When the whole document is a single top-level list, normalize the\n // selection into that list before lifting, since liftListItem expects\n // a selection inside a list item.\n const nextSelection = createInnerSelectionForWholeDocList(trx)\n\n if (!nextSelection) {\n return false\n }\n\n trx.setSelection(nextSelection)\n\n if (disp) {\n disp(trx)\n }\n\n return true\n })\n .liftListItem(itemType)\n .run()\n }\n\n return commands.liftListItem(itemType)\n }\n\n // change list type\n if (\n isList(currentList.node.type.name, extensions) &&\n listType.validContent(currentList.node.content)\n ) {\n return chain()\n .command(() => {\n tr.setNodeMarkup(currentList.pos, listType)\n\n return true\n })\n .command(() => joinListBackwards(tr, listType))\n .command(() => joinListForwards(tr, listType))\n .run()\n }\n }\n\n if (!keepMarks || !marks || !dispatch) {\n return (\n chain()\n // try to convert node to default node if needed\n .command(() => {\n const canWrapInList = can().wrapInList(listType, attributes)\n if (canWrapInList) {\n return true\n }\n return commands.clearNodes()\n })\n .wrapInList(listType, attributes)\n .command(() => joinListBackwards(tr, listType))\n .command(() => joinListForwards(tr, listType))\n .run()\n )\n }\n\n return (\n chain()\n // try to convert node to default node if needed\n .command(() => {\n const canWrapInList = can().wrapInList(listType, attributes)\n\n const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name))\n\n tr.ensureMarks(filteredMarks)\n\n if (canWrapInList) {\n return true\n }\n return commands.clearNodes()\n })\n .wrapInList(listType, attributes)\n .command(() => joinListBackwards(tr, listType))\n .command(() => joinListForwards(tr, listType))\n .run()\n )\n }\n","import type { MarkType } from '@tiptap/pm/model'\n\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { isMarkActive } from '../helpers/isMarkActive.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n toggleMark: {\n /**\n * Toggle a mark on and off.\n * @param typeOrName The mark type or name.\n * @param attributes The attributes of the mark.\n * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.\n * @example editor.commands.toggleMark('bold')\n */\n toggleMark: (\n /**\n * The mark type or name.\n */\n typeOrName: string | MarkType,\n\n /**\n * The attributes of the mark.\n */\n attributes?: Record,\n\n options?: {\n /**\n * Removes the mark even across the current selection. Defaults to `false`.\n */\n extendEmptyMarkRange?: boolean\n },\n ) => ReturnType\n }\n }\n}\n\nexport const toggleMark: RawCommands['toggleMark'] =\n (typeOrName, attributes = {}, options = {}) =>\n ({ state, commands }) => {\n const { extendEmptyMarkRange = false } = options\n const type = getMarkType(typeOrName, state.schema)\n const isActive = isMarkActive(state, type, attributes)\n\n if (isActive) {\n return commands.unsetMark(type, { extendEmptyMarkRange })\n }\n\n return commands.setMark(type, attributes)\n }\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isNodeActive } from '../helpers/isNodeActive.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n toggleNode: {\n /**\n * Toggle a node with another node.\n * @param typeOrName The type or name of the node.\n * @param toggleTypeOrName The type or name of the node to toggle.\n * @param attributes The attributes of the node.\n * @example editor.commands.toggleNode('heading', 'paragraph')\n */\n toggleNode: (\n typeOrName: string | NodeType,\n toggleTypeOrName: string | NodeType,\n attributes?: Record,\n ) => ReturnType\n }\n }\n}\n\nexport const toggleNode: RawCommands['toggleNode'] =\n (typeOrName, toggleTypeOrName, attributes = {}) =>\n ({ state, commands }) => {\n const type = getNodeType(typeOrName, state.schema)\n const toggleType = getNodeType(toggleTypeOrName, state.schema)\n const isActive = isNodeActive(state, type, attributes)\n\n let attributesToCopy: Record | undefined\n\n if (state.selection.$anchor.sameParent(state.selection.$head)) {\n // only copy attributes if the selection is pointing to a node of the same type\n attributesToCopy = state.selection.$anchor.parent.attrs\n }\n\n if (isActive) {\n return commands.setNode(toggleType, attributesToCopy)\n }\n\n // If the node is not active, we want to set the new node type with the given attributes\n // Copying over the attributes from the current node if the selection is pointing to a node of the same type\n return commands.setNode(type, { ...attributesToCopy, ...attributes })\n }\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { isNodeActive } from '../helpers/isNodeActive.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n toggleWrap: {\n /**\n * Wraps nodes in another node, or removes an existing wrap.\n * @param typeOrName The type or name of the node.\n * @param attributes The attributes of the node.\n * @example editor.commands.toggleWrap('blockquote')\n */\n toggleWrap: (typeOrName: string | NodeType, attributes?: Record) => ReturnType\n }\n }\n}\n\nexport const toggleWrap: RawCommands['toggleWrap'] =\n (typeOrName, attributes = {}) =>\n ({ state, commands }) => {\n const type = getNodeType(typeOrName, state.schema)\n const isActive = isNodeActive(state, type, attributes)\n\n if (isActive) {\n return commands.lift(type)\n }\n\n return commands.wrapIn(type, attributes)\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n undoInputRule: {\n /**\n * Undo an input rule.\n * @example editor.commands.undoInputRule()\n */\n undoInputRule: () => ReturnType\n }\n }\n}\n\nexport const undoInputRule: RawCommands['undoInputRule'] =\n () =>\n ({ state, dispatch }) => {\n const plugins = state.plugins\n\n for (let i = 0; i < plugins.length; i += 1) {\n const plugin = plugins[i]\n let undoable\n\n // @ts-ignore\n // oxlint-disable-next-line\n if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) {\n if (dispatch) {\n const tr = state.tr\n const toUndo = undoable.transform\n\n for (let j = toUndo.steps.length - 1; j >= 0; j -= 1) {\n tr.step(toUndo.steps[j].invert(toUndo.docs[j]))\n }\n\n if (undoable.text) {\n const marks = tr.doc.resolve(undoable.from).marks()\n\n tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks))\n } else {\n tr.delete(undoable.from, undoable.to)\n }\n }\n\n return true\n }\n }\n\n return false\n }\n","import type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n unsetAllMarks: {\n /**\n * Remove all clearable marks in the current selection.\n * Marks with `clearable: false` are preserved\n * @param options.ignoreClearable If true, removes all marks regardless of `clearable` setting. Defaults to `false`.\n * @example editor.commands.unsetAllMarks()\n * @example editor.commands.unsetAllMarks({ ignoreClearable: true })\n */\n unsetAllMarks: (options?: { ignoreClearable?: boolean }) => ReturnType\n }\n }\n}\n\nexport const unsetAllMarks: RawCommands['unsetAllMarks'] =\n (options = {}) =>\n ({ tr, dispatch, editor }) => {\n const { ignoreClearable = false } = options\n const { selection } = tr\n const { empty, ranges } = selection\n\n if (empty) {\n return true\n }\n\n const { nonClearableMarks } = editor.extensionManager\n\n if (dispatch) {\n const clearableMarkTypes = Object.values(editor.schema.marks).filter(\n markType => ignoreClearable || !nonClearableMarks.includes(markType.name),\n )\n\n ranges.forEach(range => {\n for (const markType of clearableMarkTypes) {\n tr.removeMark(range.$from.pos, range.$to.pos, markType)\n }\n })\n }\n\n return true\n }\n","import type { MarkType } from '@tiptap/pm/model'\n\nimport { getMarkRange } from '../helpers/getMarkRange.js'\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n unsetMark: {\n /**\n * Remove all marks in the current selection.\n * @param typeOrName The mark type or name.\n * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.\n * @example editor.commands.unsetMark('bold')\n */\n unsetMark: (\n /**\n * The mark type or name.\n */\n typeOrName: string | MarkType,\n\n options?: {\n /**\n * Removes the mark even across the current selection. Defaults to `false`.\n */\n extendEmptyMarkRange?: boolean\n },\n ) => ReturnType\n }\n }\n}\n\nexport const unsetMark: RawCommands['unsetMark'] =\n (typeOrName, options = {}) =>\n ({ tr, state, dispatch }) => {\n const { extendEmptyMarkRange = false } = options\n const { selection } = tr\n const type = getMarkType(typeOrName, state.schema)\n const { $from, empty, ranges } = selection\n\n if (!dispatch) {\n return true\n }\n\n if (empty && extendEmptyMarkRange) {\n let { from, to } = selection\n const attrs = $from.marks().find(mark => mark.type === type)?.attrs\n const range = getMarkRange($from, type, attrs)\n\n if (range) {\n from = range.from\n to = range.to\n }\n\n tr.removeMark(from, to, type)\n } else {\n ranges.forEach(range => {\n tr.removeMark(range.$from.pos, range.$to.pos, type)\n })\n }\n\n tr.removeStoredMark(type)\n\n return true\n }\n","import type { Range, RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n unsetTextDirection: {\n /**\n * Remove the text direction attribute from nodes.\n * If no position is provided, it will use the current selection.\n * @param position Optional position or range to remove the direction from\n * @example editor.commands.unsetTextDirection()\n * @example editor.commands.unsetTextDirection({ from: 0, to: 10 })\n */\n unsetTextDirection: (position?: number | Range) => ReturnType\n }\n }\n}\n\nexport const unsetTextDirection: RawCommands['unsetTextDirection'] =\n position =>\n ({ tr, state, dispatch }) => {\n const { selection } = state\n let from: number\n let to: number\n\n if (typeof position === 'number') {\n from = position\n to = position\n } else if (position && 'from' in position && 'to' in position) {\n from = position.from\n to = position.to\n } else {\n from = selection.from\n to = selection.to\n }\n\n if (dispatch) {\n tr.doc.nodesBetween(from, to, (node, pos) => {\n if (node.isText) {\n return\n }\n\n const newAttrs = { ...node.attrs }\n\n delete newAttrs.dir\n\n tr.setNodeMarkup(pos, undefined, newAttrs)\n })\n }\n\n return true\n }\n","import type { Mark, MarkType, Node, NodeType } from '@tiptap/pm/model'\nimport type { SelectionRange } from '@tiptap/pm/state'\n\nimport { getMarkType } from '../helpers/getMarkType.js'\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n updateAttributes: {\n /**\n * Update attributes of a node or mark.\n * @param typeOrName The type or name of the node or mark.\n * @param attributes The attributes of the node or mark.\n * @example editor.commands.updateAttributes('mention', { userId: \"2\" })\n */\n updateAttributes: (\n /**\n * The type or name of the node or mark.\n */\n typeOrName: string | NodeType | MarkType,\n\n /**\n * The attributes of the node or mark.\n */\n attributes: Record,\n ) => ReturnType\n }\n }\n}\n\nexport const updateAttributes: RawCommands['updateAttributes'] =\n (typeOrName, attributes = {}) =>\n ({ tr, state, dispatch }) => {\n let nodeType: NodeType | null = null\n let markType: MarkType | null = null\n\n const schemaType = getSchemaTypeNameByName(\n typeof typeOrName === 'string' ? typeOrName : typeOrName.name,\n state.schema,\n )\n\n if (!schemaType) {\n return false\n }\n\n if (schemaType === 'node') {\n nodeType = getNodeType(typeOrName as NodeType, state.schema)\n }\n\n if (schemaType === 'mark') {\n markType = getMarkType(typeOrName as MarkType, state.schema)\n }\n\n let canUpdate = false\n\n tr.selection.ranges.forEach((range: SelectionRange) => {\n const from = range.$from.pos\n const to = range.$to.pos\n\n let lastPos: number | undefined\n let lastNode: Node | undefined\n let trimmedFrom: number\n let trimmedTo: number\n\n if (tr.selection.empty) {\n state.doc.nodesBetween(from, to, (node: Node, pos: number) => {\n if (nodeType && nodeType === node.type) {\n canUpdate = true\n trimmedFrom = Math.max(pos, from)\n trimmedTo = Math.min(pos + node.nodeSize, to)\n lastPos = pos\n lastNode = node\n }\n })\n } else {\n state.doc.nodesBetween(from, to, (node: Node, pos: number) => {\n if (pos < from && nodeType && nodeType === node.type) {\n canUpdate = true\n trimmedFrom = Math.max(pos, from)\n trimmedTo = Math.min(pos + node.nodeSize, to)\n lastPos = pos\n lastNode = node\n }\n\n if (pos >= from && pos <= to) {\n if (nodeType && nodeType === node.type) {\n canUpdate = true\n\n if (dispatch) {\n tr.setNodeMarkup(pos, undefined, {\n ...node.attrs,\n ...attributes,\n })\n }\n }\n\n if (markType && node.marks.length) {\n node.marks.forEach((mark: Mark) => {\n if (markType === mark.type) {\n canUpdate = true\n\n if (dispatch) {\n const trimmedFrom2 = Math.max(pos, from)\n const trimmedTo2 = Math.min(pos + node.nodeSize, to)\n\n tr.addMark(\n trimmedFrom2,\n trimmedTo2,\n markType.create({\n ...mark.attrs,\n ...attributes,\n }),\n )\n }\n }\n })\n }\n }\n })\n }\n\n if (lastNode) {\n if (lastPos !== undefined && dispatch) {\n tr.setNodeMarkup(lastPos, undefined, {\n ...lastNode.attrs,\n ...attributes,\n })\n }\n\n if (markType && lastNode.marks.length) {\n lastNode.marks.forEach((mark: Mark) => {\n if (markType === mark.type && dispatch) {\n tr.addMark(\n trimmedFrom,\n trimmedTo,\n markType.create({\n ...mark.attrs,\n ...attributes,\n }),\n )\n }\n })\n }\n }\n })\n\n return canUpdate\n }\n","import { wrapIn as originalWrapIn } from '@tiptap/pm/commands'\nimport type { NodeType } from '@tiptap/pm/model'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n wrapIn: {\n /**\n * Wraps nodes in another node.\n * @param typeOrName The type or name of the node.\n * @param attributes The attributes of the node.\n * @example editor.commands.wrapIn('blockquote')\n */\n wrapIn: (typeOrName: string | NodeType, attributes?: Record) => ReturnType\n }\n }\n}\n\nexport const wrapIn: RawCommands['wrapIn'] =\n (typeOrName, attributes = {}) =>\n ({ state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n\n return originalWrapIn(type, attributes)(state, dispatch)\n }\n","import type { NodeType } from '@tiptap/pm/model'\nimport { wrapInList as originalWrapInList } from '@tiptap/pm/schema-list'\n\nimport { getNodeType } from '../helpers/getNodeType.js'\nimport type { RawCommands } from '../types.js'\n\ndeclare module '@tiptap/core' {\n interface Commands {\n wrapInList: {\n /**\n * Wrap a node in a list.\n * @param typeOrName The type or name of the node.\n * @param attributes The attributes of the node.\n * @example editor.commands.wrapInList('bulletList')\n */\n wrapInList: (typeOrName: string | NodeType, attributes?: Record) => ReturnType\n }\n }\n}\n\nexport const wrapInList: RawCommands['wrapInList'] =\n (typeOrName, attributes = {}) =>\n ({ state, dispatch }) => {\n const type = getNodeType(typeOrName, state.schema)\n\n return originalWrapInList(type, attributes)(state, dispatch)\n }\n","/* oslint-disableno-empty-object-type */\nimport type { MarkType, Node as ProseMirrorNode, NodeType, Schema } from '@tiptap/pm/model'\nimport type { Plugin, PluginKey, Transaction } from '@tiptap/pm/state'\nimport { EditorState } from '@tiptap/pm/state'\nimport { type DirectEditorProps, EditorView } from '@tiptap/pm/view'\n\nimport { CommandManager } from './CommandManager.js'\nimport { EventEmitter } from './EventEmitter.js'\nimport { ExtensionManager } from './ExtensionManager.js'\nimport {\n ClipboardTextSerializer,\n Commands,\n Delete,\n Drop,\n Editable,\n FocusEvents,\n Keymap,\n Paste,\n Tabindex,\n TextDirection,\n} from './extensions/index.js'\nimport { createDocument } from './helpers/createDocument.js'\nimport { getAttributes } from './helpers/getAttributes.js'\nimport { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js'\nimport { getText } from './helpers/getText.js'\nimport { getTextSerializersFromSchema } from './helpers/getTextSerializersFromSchema.js'\nimport { isActive } from './helpers/isActive.js'\nimport { isNodeEmpty } from './helpers/isNodeEmpty.js'\nimport { createMappablePosition, getUpdatedPosition } from './helpers/MappablePosition.js'\nimport { resolveFocusPosition } from './helpers/resolveFocusPosition.js'\nimport type { Storage } from './index.js'\nimport { NodePos } from './NodePos.js'\nimport { style } from './style.js'\nimport type {\n CanCommands,\n ChainedCommands,\n DocumentType,\n EditorEvents,\n EditorOptions,\n NodeType as TNodeType,\n SingleCommands,\n TextSerializer,\n TextType as TTextType,\n Utils,\n} from './types.js'\nimport { createStyleTag } from './utilities/createStyleTag.js'\nimport { isFunction } from './utilities/isFunction.js'\n\nexport * as extensions from './extensions/index.js'\n\n// @ts-ignore\nexport interface TiptapEditorHTMLElement extends HTMLElement {\n editor?: Editor\n}\n\nexport class Editor extends EventEmitter {\n private commandManager!: CommandManager\n\n public extensionManager!: ExtensionManager\n\n private css: HTMLStyleElement | null = null\n\n private className = 'tiptap'\n\n public schema!: Schema\n\n private editorView: EditorView | null = null\n\n public isFocused = false\n\n private destroyed = false\n\n private editorState!: EditorState\n\n /**\n * The editor is considered initialized after the `create` event has been emitted.\n */\n public isInitialized = false\n\n public extensionStorage: Storage = {} as Storage\n\n /**\n * A unique ID for this editor instance.\n */\n public instanceId = Math.random().toString(36).slice(2, 9)\n\n public options: EditorOptions = {\n element: typeof document !== 'undefined' ? document.createElement('div') : null,\n content: '',\n injectCSS: true,\n injectNonce: undefined,\n extensions: [],\n autofocus: false,\n editable: true,\n textDirection: undefined,\n editorProps: {},\n parseOptions: {},\n coreExtensionOptions: {},\n enableInputRules: true,\n enablePasteRules: true,\n enableCoreExtensions: true,\n enableContentCheck: false,\n emitContentError: false,\n onBeforeCreate: () => null,\n onCreate: () => null,\n onMount: () => null,\n onUnmount: () => null,\n onUpdate: () => null,\n onSelectionUpdate: () => null,\n onTransaction: () => null,\n onFocus: () => null,\n onBlur: () => null,\n onDestroy: () => null,\n onContentError: ({ error }) => {\n throw error\n },\n onPaste: () => null,\n onDrop: () => null,\n onDelete: () => null,\n enableExtensionDispatchTransaction: true,\n }\n\n constructor(options: Partial = {}) {\n super()\n this.setOptions(options)\n this.createExtensionManager()\n this.createCommandManager()\n this.createSchema()\n this.on('beforeCreate', this.options.onBeforeCreate)\n this.emit('beforeCreate', { editor: this })\n this.on('mount', this.options.onMount)\n this.on('unmount', this.options.onUnmount)\n this.on('contentError', this.options.onContentError)\n this.on('create', this.options.onCreate)\n this.on('update', this.options.onUpdate)\n this.on('selectionUpdate', this.options.onSelectionUpdate)\n this.on('transaction', this.options.onTransaction)\n this.on('focus', this.options.onFocus)\n this.on('blur', this.options.onBlur)\n this.on('destroy', this.options.onDestroy)\n this.on('drop', ({ event, slice, moved }) => this.options.onDrop(event, slice, moved))\n this.on('paste', ({ event, slice }) => this.options.onPaste(event, slice))\n this.on('delete', this.options.onDelete)\n\n const initialDoc = this.createDoc()\n const selection = resolveFocusPosition(initialDoc, this.options.autofocus)\n\n // Set editor state immediately, so that it's available independently from the view\n this.editorState = EditorState.create({\n doc: initialDoc,\n schema: this.schema,\n selection: selection || undefined,\n })\n\n if (this.options.element) {\n this.mount(this.options.element)\n }\n }\n\n /**\n * Attach the editor to the DOM, creating a new editor view.\n */\n public mount(el: NonNullable & {}) {\n if (typeof document === 'undefined') {\n throw new Error(\n `[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.`,\n )\n }\n this.createView(el)\n this.emit('mount', { editor: this })\n\n if (this.css && !document.head.contains(this.css)) {\n document.head.appendChild(this.css)\n }\n\n window.setTimeout(() => {\n if (this.isDestroyed) {\n return\n }\n\n if (this.options.autofocus !== false && this.options.autofocus !== null) {\n this.commands.focus(this.options.autofocus)\n }\n this.emit('create', { editor: this })\n this.isInitialized = true\n }, 0)\n }\n\n /**\n * Remove the editor from the DOM, but still allow remounting at a different point in time\n */\n public unmount() {\n if (this.editorView) {\n // Cleanup our reference to prevent circular references which caused memory leaks\n // @ts-ignore\n const dom = this.editorView.dom as TiptapEditorHTMLElement\n\n if (dom?.editor) {\n delete dom.editor\n }\n this.editorView.destroy()\n }\n this.editorView = null\n this.isInitialized = false\n\n // Safely remove CSS element with fallback for test environments\n // Only remove CSS if no other editors exist in the document after unmount\n if (this.css && !document.querySelectorAll(`.${this.className}`).length) {\n try {\n if (typeof this.css.remove === 'function') {\n this.css.remove()\n } else if (this.css.parentNode) {\n this.css.parentNode.removeChild(this.css)\n }\n } catch (error) {\n // Silently handle any unexpected DOM removal errors in test environments\n console.warn('Failed to remove CSS element:', error)\n }\n }\n this.css = null\n this.emit('unmount', { editor: this })\n }\n\n /**\n * Returns the editor storage.\n */\n public get storage(): Storage {\n return this.extensionStorage\n }\n\n /**\n * An object of all registered commands.\n */\n public get commands(): SingleCommands {\n return this.commandManager.commands\n }\n\n /**\n * Create a command chain to call multiple commands at once.\n */\n public chain(): ChainedCommands {\n return this.commandManager.chain()\n }\n\n /**\n * Check if a command or a command chain can be executed. Without executing it.\n */\n public can(): CanCommands {\n return this.commandManager.can()\n }\n\n /**\n * Inject CSS styles.\n */\n private injectCSS(): void {\n if (this.options.injectCSS && typeof document !== 'undefined') {\n this.css = createStyleTag(style, this.options.injectNonce)\n }\n }\n\n /**\n * Update editor options.\n *\n * @param options A list of options\n */\n public setOptions(options: Partial = {}): void {\n this.options = {\n ...this.options,\n ...options,\n }\n\n if (!this.editorView || !this.state || this.isDestroyed) {\n return\n }\n\n if (this.options.editorProps) {\n this.view.setProps(this.options.editorProps)\n }\n\n this.view.updateState(this.state)\n }\n\n /**\n * Update editable state of the editor.\n */\n public setEditable(editable: boolean, emitUpdate = true): void {\n this.setOptions({ editable })\n\n if (emitUpdate) {\n this.emit('update', { editor: this, transaction: this.state.tr, appendedTransactions: [] })\n }\n }\n\n /**\n * Returns whether the editor is editable.\n */\n public get isEditable(): boolean {\n // since plugins are applied after creating the view\n // `editable` is always `true` for one tick.\n // that’s why we also have to check for `options.editable`\n return this.options.editable && this.view && this.view.editable\n }\n\n /**\n * Returns the editor view.\n */\n public get view(): EditorView {\n if (this.editorView) {\n return this.editorView\n }\n\n return new Proxy(\n {\n state: this.editorState,\n updateState: (state: EditorState): ReturnType => {\n this.editorState = state\n },\n dispatch: (tr: Transaction): ReturnType => {\n this.dispatchTransaction(tr)\n },\n\n // Stub some commonly accessed properties to prevent errors\n composing: false,\n dragging: null,\n editable: true,\n isDestroyed: false,\n } as EditorView,\n {\n get: (obj, key) => {\n if (this.editorView) {\n // If the editor view is available, but the caller has a stale reference to the proxy,\n // Just return what the editor view has.\n return this.editorView[key as keyof EditorView]\n }\n // Specifically always return the most recent editorState\n if (key === 'state') {\n return this.editorState\n }\n if (key in obj) {\n return Reflect.get(obj, key)\n }\n\n // We throw an error here, because we know the view is not available\n throw new Error(\n `[tiptap error]: The editor view is not available. Cannot access view['${key as string}']. The editor may not be mounted yet.`,\n )\n },\n },\n ) as EditorView\n }\n\n /**\n * Returns the editor state.\n */\n public get state(): EditorState {\n if (this.editorView) {\n this.editorState = this.view.state\n }\n\n return this.editorState\n }\n\n /**\n * Register a ProseMirror plugin.\n *\n * @param plugin A ProseMirror plugin\n * @param handlePlugins Control how to merge the plugin into the existing plugins.\n * @returns The new editor state\n */\n public registerPlugin(\n plugin: Plugin,\n handlePlugins?: (newPlugin: Plugin, plugins: Plugin[]) => Plugin[],\n ): EditorState {\n const plugins = isFunction(handlePlugins)\n ? handlePlugins(plugin, [...this.state.plugins])\n : [...this.state.plugins, plugin]\n\n const state = this.state.reconfigure({ plugins })\n\n this.view.updateState(state)\n\n return state\n }\n\n /**\n * Unregister a ProseMirror plugin.\n *\n * @param nameOrPluginKeyToRemove The plugins name\n * @returns The new editor state or undefined if the editor is destroyed\n */\n public unregisterPlugin(\n nameOrPluginKeyToRemove: string | PluginKey | (string | PluginKey)[],\n ): EditorState | undefined {\n if (this.isDestroyed) {\n return undefined\n }\n\n const prevPlugins = this.state.plugins\n let plugins = prevPlugins\n\n ;([] as (string | PluginKey)[]).concat(nameOrPluginKeyToRemove).forEach(nameOrPluginKey => {\n // @ts-ignore\n const name = typeof nameOrPluginKey === 'string' ? `${nameOrPluginKey}$` : nameOrPluginKey.key\n\n // @ts-ignore\n plugins = plugins.filter(plugin => !plugin.key.startsWith(name))\n })\n\n if (prevPlugins.length === plugins.length) {\n // No plugin was removed, so we don’t need to update the state\n return undefined\n }\n\n const state = this.state.reconfigure({\n plugins,\n })\n\n this.view.updateState(state)\n\n return state\n }\n\n /**\n * Creates an extension manager.\n */\n private createExtensionManager(): void {\n const coreExtensions = this.options.enableCoreExtensions\n ? [\n Editable,\n ClipboardTextSerializer.configure({\n blockSeparator:\n this.options.coreExtensionOptions?.clipboardTextSerializer?.blockSeparator,\n }),\n Commands,\n FocusEvents,\n Keymap,\n Tabindex.configure({\n value: this.options.coreExtensionOptions?.tabindex?.value,\n }),\n Drop,\n Paste,\n Delete,\n TextDirection.configure({\n direction: this.options.textDirection,\n }),\n ].filter(ext => {\n if (typeof this.options.enableCoreExtensions === 'object') {\n return (\n this.options.enableCoreExtensions[\n ext.name as keyof typeof this.options.enableCoreExtensions\n ] !== false\n )\n }\n return true\n })\n : []\n const allExtensions = [...coreExtensions, ...this.options.extensions].filter(extension => {\n return ['extension', 'node', 'mark'].includes(extension?.type)\n })\n\n this.extensionManager = new ExtensionManager(allExtensions, this)\n }\n\n /**\n * Creates an command manager.\n */\n private createCommandManager(): void {\n this.commandManager = new CommandManager({\n editor: this,\n })\n }\n\n /**\n * Creates a ProseMirror schema.\n */\n private createSchema(): void {\n this.schema = this.extensionManager.schema\n }\n\n /**\n * Creates the initial document.\n */\n private createDoc(): ProseMirrorNode {\n let doc: ProseMirrorNode\n\n try {\n doc = createDocument(this.options.content, this.schema, this.options.parseOptions, {\n errorOnInvalidContent: this.options.enableContentCheck,\n })\n } catch (e) {\n if (\n !(e instanceof Error) ||\n !['[tiptap error]: Invalid JSON content', '[tiptap error]: Invalid HTML content'].includes(\n e.message,\n )\n ) {\n // Not the content error we were expecting\n throw e\n }\n this.emit('contentError', {\n editor: this,\n error: e as Error,\n disableCollaboration: () => {\n if (\n 'collaboration' in this.storage &&\n typeof this.storage.collaboration === 'object' &&\n this.storage.collaboration\n ) {\n ;(this.storage.collaboration as any).isDisabled = true\n }\n // To avoid syncing back invalid content, reinitialize the extensions without the collaboration extension\n this.options.extensions = this.options.extensions.filter(\n extension => extension.name !== 'collaboration',\n )\n\n // Restart the initialization process by recreating the extension manager with the new set of extensions\n this.createExtensionManager()\n },\n })\n\n // Content is invalid, but attempt to create it anyway, stripping out the invalid parts\n doc = createDocument(this.options.content, this.schema, this.options.parseOptions, {\n errorOnInvalidContent: false,\n })\n }\n return doc\n }\n\n /**\n * Creates a ProseMirror view.\n */\n private createView(element: NonNullable): void {\n const { editorProps, enableExtensionDispatchTransaction } = this.options\n // If a user provided a custom `dispatchTransaction` through `editorProps`,\n // we use that as the base dispatch function.\n // Otherwise, we use Tiptap's internal `dispatchTransaction` method.\n const baseDispatch =\n (editorProps as DirectEditorProps).dispatchTransaction || this.dispatchTransaction.bind(this)\n const dispatch = enableExtensionDispatchTransaction\n ? this.extensionManager.dispatchTransaction(baseDispatch)\n : baseDispatch\n\n // Compose transformPastedHTML from extensions and user-provided editorProps\n const baseTransformPastedHTML = (editorProps as DirectEditorProps).transformPastedHTML\n const transformPastedHTML = this.extensionManager.transformPastedHTML(baseTransformPastedHTML)\n\n this.editorView = new EditorView(element, {\n ...editorProps,\n attributes: {\n // add `role=\"textbox\"` to the editor element\n role: 'textbox',\n ...editorProps?.attributes,\n },\n dispatchTransaction: dispatch,\n transformPastedHTML,\n state: this.editorState,\n markViews: this.extensionManager.markViews,\n nodeViews: this.extensionManager.nodeViews,\n })\n\n // `editor.view` is not yet available at this time.\n // Therefore we will add all plugins and node views directly afterwards.\n const newState = this.state.reconfigure({\n plugins: this.extensionManager.plugins,\n })\n\n this.view.updateState(newState)\n\n this.prependClass()\n this.injectCSS()\n\n // Let’s store the editor instance in the DOM element.\n // So we’ll have access to it for tests.\n // @ts-ignore\n const dom = this.view.dom as TiptapEditorHTMLElement\n\n dom.editor = this\n }\n\n /**\n * Creates all node and mark views.\n */\n public createNodeViews(): void {\n if (this.view.isDestroyed) {\n return\n }\n\n this.view.setProps({\n markViews: this.extensionManager.markViews,\n nodeViews: this.extensionManager.nodeViews,\n })\n }\n\n /**\n * Prepend class name to element.\n */\n public prependClass(): void {\n this.view.dom.className = `${this.className} ${this.view.dom.className}`\n }\n\n public isCapturingTransaction = false\n\n private capturedTransaction: Transaction | null = null\n\n public captureTransaction(fn: () => void) {\n this.isCapturingTransaction = true\n fn()\n this.isCapturingTransaction = false\n\n const tr = this.capturedTransaction\n\n this.capturedTransaction = null\n\n return tr\n }\n\n /**\n * The callback over which to send transactions (state updates) produced by the view.\n *\n * @param transaction An editor state transaction\n */\n private dispatchTransaction(transaction: Transaction): void {\n // if the editor / the view of the editor was destroyed\n // the transaction should not be dispatched as there is no view anymore.\n if (this.view.isDestroyed) {\n return\n }\n\n if (this.isCapturingTransaction) {\n if (!this.capturedTransaction) {\n this.capturedTransaction = transaction\n\n return\n }\n\n transaction.steps.forEach(step => this.capturedTransaction?.step(step))\n\n return\n }\n\n // Apply transaction and get resulting state and transactions\n const { state, transactions } = this.state.applyTransaction(transaction)\n const selectionHasChanged = !this.state.selection.eq(state.selection)\n const rootTrWasApplied = transactions.includes(transaction)\n const prevState = this.state\n\n this.emit('beforeTransaction', {\n editor: this,\n transaction,\n nextState: state,\n })\n\n // If transaction was filtered out, we can return early\n if (!rootTrWasApplied) {\n return\n }\n\n this.view.updateState(state)\n\n // Emit transaction event with appended transactions info\n this.emit('transaction', {\n editor: this,\n transaction,\n appendedTransactions: transactions.slice(1),\n })\n\n if (selectionHasChanged) {\n this.emit('selectionUpdate', {\n editor: this,\n transaction,\n })\n }\n\n // Only emit the latest between focus and blur events\n const mostRecentFocusTr = transactions.findLast(tr => tr.getMeta('focus') || tr.getMeta('blur'))\n const focus = mostRecentFocusTr?.getMeta('focus')\n const blur = mostRecentFocusTr?.getMeta('blur')\n\n if (focus) {\n this.emit('focus', {\n editor: this,\n event: focus.event,\n // oxlint-disable-next-lineno-non-null-assertion\n transaction: mostRecentFocusTr!,\n })\n }\n\n if (blur) {\n this.emit('blur', {\n editor: this,\n event: blur.event,\n // oxlint-disable-next-lineno-non-null-assertion\n transaction: mostRecentFocusTr!,\n })\n }\n\n // Compare states for update event\n if (\n transaction.getMeta('preventUpdate') ||\n !transactions.some(tr => tr.docChanged) ||\n prevState.doc.eq(state.doc)\n ) {\n return\n }\n\n this.emit('update', {\n editor: this,\n transaction,\n appendedTransactions: transactions.slice(1),\n })\n }\n\n /**\n * Get attributes of the currently selected node or mark.\n */\n public getAttributes(nameOrType: string | NodeType | MarkType): Record {\n return getAttributes(this.state, nameOrType)\n }\n\n /**\n * Returns if the currently selected node or mark is active.\n *\n * @param name Name of the node or mark\n * @param attributes Attributes of the node or mark\n */\n public isActive(name: string, attributes?: {}): boolean\n public isActive(attributes: {}): boolean\n public isActive(nameOrAttributes: string, attributesOrUndefined?: {}): boolean {\n const name = typeof nameOrAttributes === 'string' ? nameOrAttributes : null\n\n const attributes =\n typeof nameOrAttributes === 'string' ? attributesOrUndefined : nameOrAttributes\n\n return isActive(this.state, name, attributes)\n }\n\n /**\n * Get the document as JSON.\n */\n public getJSON(): DocumentType<\n Record | undefined,\n TNodeType, any, (TNodeType | TTextType)[]>[]\n > {\n return this.state.doc.toJSON()\n }\n\n /**\n * Get the document as HTML.\n */\n public getHTML(): string {\n return getHTMLFromFragment(this.state.doc.content, this.schema)\n }\n\n /**\n * Get the document as text.\n */\n public getText(options?: {\n blockSeparator?: string\n textSerializers?: Record\n }): string {\n const { blockSeparator = '\\n\\n', textSerializers = {} } = options || {}\n\n return getText(this.state.doc, {\n blockSeparator,\n textSerializers: {\n ...getTextSerializersFromSchema(this.schema),\n ...textSerializers,\n },\n })\n }\n\n /**\n * Check if there is no content.\n */\n public get isEmpty(): boolean {\n return isNodeEmpty(this.state.doc)\n }\n\n /**\n * Destroy the editor.\n */\n public destroy(): void {\n if (this.destroyed) {\n return\n }\n\n this.destroyed = true\n\n this.emit('destroy')\n\n this.unmount()\n\n this.removeAllListeners()\n\n this.extensionManager.destroy()\n this.extensionManager = null as any\n this.schema = null as any\n this.commandManager = null as any\n this.extensionStorage = {} as Storage\n }\n\n /**\n * Check if the editor is already destroyed.\n */\n public get isDestroyed(): boolean {\n return this.editorView?.isDestroyed ?? true\n }\n\n public $node(selector: string, attributes?: { [key: string]: any }): NodePos | null {\n return this.$doc?.querySelector(selector, attributes) || null\n }\n\n public $nodes(selector: string, attributes?: { [key: string]: any }): NodePos[] | null {\n return this.$doc?.querySelectorAll(selector, attributes) || null\n }\n\n public $pos(pos: number) {\n const $pos = this.state.doc.resolve(pos)\n // When the position sits directly before a non-text node (e.g. an image or\n // other atom), nodeAfter is that node but resolvedPos.node() would return\n // the parent (often the doc at depth 0). Pass nodeAfter as the explicit node\n // so NodePos.node returns the expected node instead of the parent.\n // Keep $pos(0) returning the doc node; for other positions, prefer nodeAfter\n // when it points at a non-text node.\n const node = pos > 0 && $pos.nodeAfter && !$pos.nodeAfter.isText ? $pos.nodeAfter : null\n\n return new NodePos($pos, this, false, node)\n }\n\n get $doc() {\n return this.$pos(0)\n }\n\n /**\n * Returns a set of utilities for working with positions and ranges.\n */\n public utils: Utils = {\n getUpdatedPosition,\n createMappablePosition,\n }\n}\n","type StringKeyOf = Extract\ntype CallbackType<\n T extends Record,\n EventName extends StringKeyOf,\n> = T[EventName] extends any[] ? T[EventName] : [T[EventName]]\ntype CallbackFunction, EventName extends StringKeyOf> = (\n ...props: CallbackType\n) => any\n\nexport class EventEmitter> {\n private callbacks: { [key: string]: Array<(...args: any[]) => void> } = {}\n\n public on>(\n event: EventName,\n fn: CallbackFunction,\n ): this {\n if (!this.callbacks[event]) {\n this.callbacks[event] = []\n }\n\n this.callbacks[event].push(fn)\n\n return this\n }\n\n public emit>(\n event: EventName,\n ...args: CallbackType\n ): this {\n const callbacks = this.callbacks[event]\n\n if (callbacks) {\n callbacks.forEach(callback => callback.apply(this, args))\n }\n\n return this\n }\n\n public off>(\n event: EventName,\n fn?: CallbackFunction,\n ): this {\n const callbacks = this.callbacks[event]\n\n if (callbacks) {\n if (fn) {\n this.callbacks[event] = callbacks.filter(callback => callback !== fn)\n } else {\n delete this.callbacks[event]\n }\n }\n\n return this\n }\n\n public once>(\n event: EventName,\n fn: CallbackFunction,\n ): this {\n const onceFn = (...args: CallbackType) => {\n this.off(event, onceFn)\n fn.apply(this, args)\n }\n\n return this.on(event, onceFn)\n }\n\n public removeAllListeners(): void {\n this.callbacks = {}\n }\n}\n","import { keymap } from '@tiptap/pm/keymap'\nimport type { Schema } from '@tiptap/pm/model'\nimport type { Plugin, Transaction } from '@tiptap/pm/state'\nimport type { EditorView, MarkViewConstructor, NodeViewConstructor } from '@tiptap/pm/view'\n\nimport type { Editor } from './Editor.js'\nimport {\n flattenExtensions,\n getAttributesFromExtensions,\n getExtensionField,\n getNodeType,\n getRenderedAttributes,\n getSchemaByResolvedExtensions,\n getSchemaTypeByName,\n isExtensionRulesEnabled,\n resolveExtensions,\n sortExtensions,\n splitExtensions,\n} from './helpers/index.js'\nimport {\n type MarkConfig,\n type NodeConfig,\n type Storage,\n getMarkType,\n updateMarkViewAttributes,\n} from './index.js'\nimport { inputRulesPlugin } from './InputRule.js'\nimport { Mark } from './Mark.js'\nimport { pasteRulesPlugin } from './PasteRule.js'\nimport type { AnyConfig, Extensions, RawCommands } from './types.js'\nimport { callOrReturn } from './utilities/callOrReturn.js'\n\nexport class ExtensionManager {\n editor: Editor\n\n schema: Schema\n\n /**\n * A flattened and sorted array of all extensions\n */\n extensions: Extensions\n\n /**\n * A non-flattened array of base extensions (no sub-extensions)\n */\n baseExtensions: Extensions\n\n splittableMarks: string[] = []\n\n nonClearableMarks: string[] = []\n\n constructor(extensions: Extensions, editor: Editor) {\n this.editor = editor\n this.baseExtensions = extensions\n this.extensions = resolveExtensions(extensions)\n this.schema = getSchemaByResolvedExtensions(this.extensions, editor)\n this.setupExtensions()\n }\n\n static resolve = resolveExtensions\n\n static sort = sortExtensions\n\n static flatten = flattenExtensions\n\n /**\n * Get all commands from the extensions.\n * @returns An object with all commands where the key is the command name and the value is the command function\n */\n get commands(): RawCommands {\n return this.extensions.reduce((commands, extension) => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor: this.editor,\n type: getSchemaTypeByName(extension.name, this.schema),\n }\n\n const addCommands = getExtensionField(\n extension,\n 'addCommands',\n context,\n )\n\n if (!addCommands) {\n return commands\n }\n\n return {\n ...commands,\n ...addCommands(),\n }\n }, {} as RawCommands)\n }\n\n /**\n * Get all registered Prosemirror plugins from the extensions.\n * @returns An array of Prosemirror plugins\n */\n get plugins(): Plugin[] {\n const { editor } = this\n\n // With ProseMirror, first plugins within an array are executed first.\n // In Tiptap, we provide the ability to override plugins,\n // so it feels more natural to run plugins at the end of an array first.\n // That’s why we have to reverse the `extensions` array and sort again\n // based on the `priority` option.\n const extensions = sortExtensions([...this.extensions].reverse())\n\n const allPlugins = extensions.flatMap(extension => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor,\n type: getSchemaTypeByName(extension.name, this.schema),\n }\n\n const plugins: Plugin[] = []\n\n const addKeyboardShortcuts = getExtensionField(\n extension,\n 'addKeyboardShortcuts',\n context,\n )\n\n let defaultBindings: Record boolean> = {}\n\n // bind exit handling\n if (\n extension.type === 'mark' &&\n getExtensionField(extension, 'exitable', context)\n ) {\n defaultBindings.ArrowRight = () => Mark.handleExit({ editor, mark: extension as Mark })\n }\n\n if (addKeyboardShortcuts) {\n const bindings = Object.fromEntries(\n Object.entries(addKeyboardShortcuts()).map(([shortcut, method]) => {\n return [shortcut, () => method({ editor })]\n }),\n )\n\n defaultBindings = { ...defaultBindings, ...bindings }\n }\n\n const keyMapPlugin = keymap(defaultBindings)\n\n plugins.push(keyMapPlugin)\n\n const addInputRules = getExtensionField(\n extension,\n 'addInputRules',\n context,\n )\n\n if (isExtensionRulesEnabled(extension, editor.options.enableInputRules) && addInputRules) {\n const rules = addInputRules()\n\n if (rules && rules.length) {\n const inputResult = inputRulesPlugin({\n editor,\n rules,\n })\n\n const inputPlugins = Array.isArray(inputResult) ? inputResult : [inputResult]\n\n plugins.push(...inputPlugins)\n }\n }\n\n const addPasteRules = getExtensionField(\n extension,\n 'addPasteRules',\n context,\n )\n\n if (isExtensionRulesEnabled(extension, editor.options.enablePasteRules) && addPasteRules) {\n const rules = addPasteRules()\n\n if (rules && rules.length) {\n const pasteRules = pasteRulesPlugin({ editor, rules })\n\n plugins.push(...pasteRules)\n }\n }\n\n const addProseMirrorPlugins = getExtensionField(\n extension,\n 'addProseMirrorPlugins',\n context,\n )\n\n if (addProseMirrorPlugins) {\n const proseMirrorPlugins = addProseMirrorPlugins()\n\n plugins.push(...proseMirrorPlugins)\n }\n\n return plugins\n })\n\n return allPlugins\n }\n\n /**\n * Get all attributes from the extensions.\n * @returns An array of attributes\n */\n get attributes() {\n return getAttributesFromExtensions(this.extensions)\n }\n\n /**\n * Get all node views from the extensions.\n * @returns An object with all node views where the key is the node name and the value is the node view function\n */\n get nodeViews(): Record {\n const { editor } = this\n const { nodeExtensions } = splitExtensions(this.extensions)\n\n return Object.fromEntries(\n nodeExtensions\n .filter(extension => !!getExtensionField(extension, 'addNodeView'))\n .map(extension => {\n const extensionAttributes = this.attributes.filter(\n attribute => attribute.type === extension.name,\n )\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor,\n type: getNodeType(extension.name, this.schema),\n }\n const addNodeView = getExtensionField(\n extension,\n 'addNodeView',\n context,\n )\n\n if (!addNodeView) {\n return []\n }\n\n const nodeViewResult = addNodeView()\n\n if (!nodeViewResult) {\n return []\n }\n\n const nodeview: NodeViewConstructor = (\n node,\n view,\n getPos,\n decorations,\n innerDecorations,\n ) => {\n const HTMLAttributes = getRenderedAttributes(node, extensionAttributes)\n\n return nodeViewResult({\n // pass-through\n node,\n view,\n getPos: getPos as () => number,\n decorations,\n innerDecorations,\n // tiptap-specific\n editor,\n extension,\n HTMLAttributes,\n })\n }\n\n return [extension.name, nodeview]\n }),\n )\n }\n\n /**\n * Get the composed dispatchTransaction function from all extensions.\n * @param baseDispatch The base dispatch function (e.g. from the editor or user props)\n * @returns A composed dispatch function\n */\n dispatchTransaction(baseDispatch: (tr: Transaction) => void): (tr: Transaction) => void {\n const { editor } = this\n const extensions = sortExtensions([...this.extensions].reverse())\n\n return extensions.reduceRight((next, extension) => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor,\n type: getSchemaTypeByName(extension.name, this.schema),\n }\n\n const dispatchTransaction = getExtensionField(\n extension,\n 'dispatchTransaction',\n context,\n )\n\n if (!dispatchTransaction) {\n return next\n }\n\n return (transaction: Transaction) => {\n dispatchTransaction.call(context, { transaction, next })\n }\n }, baseDispatch)\n }\n\n /**\n * Get the composed transformPastedHTML function from all extensions.\n * @param baseTransform The base transform function (e.g. from the editor props)\n * @returns A composed transform function that chains all extension transforms\n */\n transformPastedHTML(\n baseTransform?: (html: string, view?: any) => string,\n ): (html: string, view?: EditorView) => string {\n const { editor } = this\n const extensions = sortExtensions([...this.extensions])\n\n return extensions.reduce(\n (transform, extension) => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor,\n type: getSchemaTypeByName(extension.name, this.schema),\n }\n\n const extensionTransform = getExtensionField(\n extension,\n 'transformPastedHTML',\n context,\n )\n\n if (!extensionTransform) {\n return transform\n }\n\n return (html: string, view?: any) => {\n // Chain the transforms: pass the result of the previous transform to the next\n const transformedHtml = transform(html, view)\n return extensionTransform.call(context, transformedHtml)\n }\n },\n baseTransform || ((html: string) => html),\n )\n }\n\n get markViews(): Record {\n const { editor } = this\n const { markExtensions } = splitExtensions(this.extensions)\n\n return Object.fromEntries(\n markExtensions\n .filter(extension => !!getExtensionField(extension, 'addMarkView'))\n .map(extension => {\n const extensionAttributes = this.attributes.filter(\n attribute => attribute.type === extension.name,\n )\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor,\n type: getMarkType(extension.name, this.schema),\n }\n const addMarkView = getExtensionField(\n extension,\n 'addMarkView',\n context,\n )\n\n if (!addMarkView) {\n return []\n }\n\n const markView: MarkViewConstructor = (mark, view, inline) => {\n const HTMLAttributes = getRenderedAttributes(mark, extensionAttributes)\n\n return addMarkView()({\n // pass-through\n mark,\n view,\n inline,\n // tiptap-specific\n editor,\n extension,\n HTMLAttributes,\n updateAttributes: (attrs: Record) => {\n updateMarkViewAttributes(mark, editor, attrs)\n },\n })\n }\n\n return [extension.name, markView]\n }),\n )\n }\n\n /**\n * Destroy the extension manager and clean up all extension references\n * to prevent memory leaks through parent/child extension chains.\n *\n * Walks each extension's full parent chain and nulls every forward\n * `parent.child → current` link where the parent still points to the\n * current node. This breaks the retention path from module-scope\n * singleton roots through deep extend() chains.\n *\n * Only ancestor `.child` links matching the current chain are cleared.\n * The `.parent` pointer on ancestors is never touched — extensions\n * may be shared across live editors, so their own backward references\n * and non-matching forward links must remain intact.\n */\n destroy() {\n this.extensions.forEach(extension => {\n let current: any = extension\n\n while (current.parent) {\n const parent = current.parent\n\n if (parent.child === current) {\n parent.child = null\n }\n\n current = parent\n }\n })\n\n this.extensions = []\n this.baseExtensions = []\n this.schema = null as any\n this.editor = null as any\n }\n\n /**\n * Go through all extensions, create extension storages & setup marks\n * & bind editor event listener.\n */\n private setupExtensions() {\n const extensions = this.extensions\n // re-initialize the extension storage object instance\n this.editor.extensionStorage = Object.fromEntries(\n extensions.map(extension => [extension.name, extension.storage]),\n ) as unknown as Storage\n\n extensions.forEach(extension => {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: this.editor.extensionStorage[extension.name as keyof Storage],\n editor: this.editor,\n type: getSchemaTypeByName(extension.name, this.schema),\n }\n\n if (extension.type === 'mark') {\n const keepOnSplit =\n callOrReturn(getExtensionField(extension, 'keepOnSplit', context)) ?? true\n\n if (keepOnSplit) {\n this.splittableMarks.push(extension.name)\n }\n\n const clearable =\n callOrReturn(\n getExtensionField(extension, 'clearable', context),\n ) ?? true\n\n if (!clearable) {\n this.nonClearableMarks.push(extension.name)\n }\n }\n\n const onBeforeCreate = getExtensionField(\n extension,\n 'onBeforeCreate',\n context,\n )\n const onCreate = getExtensionField(extension, 'onCreate', context)\n const onUpdate = getExtensionField(extension, 'onUpdate', context)\n const onSelectionUpdate = getExtensionField(\n extension,\n 'onSelectionUpdate',\n context,\n )\n const onTransaction = getExtensionField(\n extension,\n 'onTransaction',\n context,\n )\n const onFocus = getExtensionField(extension, 'onFocus', context)\n const onBlur = getExtensionField(extension, 'onBlur', context)\n const onDestroy = getExtensionField(extension, 'onDestroy', context)\n\n if (onBeforeCreate) {\n this.editor.on('beforeCreate', onBeforeCreate)\n }\n\n if (onCreate) {\n this.editor.on('create', onCreate)\n }\n\n if (onUpdate) {\n this.editor.on('update', onUpdate)\n }\n\n if (onSelectionUpdate) {\n this.editor.on('selectionUpdate', onSelectionUpdate)\n }\n\n if (onTransaction) {\n this.editor.on('transaction', onTransaction)\n }\n\n if (onFocus) {\n this.editor.on('focus', onFocus)\n }\n\n if (onBlur) {\n this.editor.on('blur', onBlur)\n }\n\n if (onDestroy) {\n this.editor.on('destroy', onDestroy)\n }\n })\n }\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Fragment } from '@tiptap/pm/model'\nimport type { EditorState, TextSelection } from '@tiptap/pm/state'\nimport { Plugin } from '@tiptap/pm/state'\n\nimport { CommandManager } from './CommandManager.js'\nimport type { Editor } from './Editor.js'\nimport { createChainableState } from './helpers/createChainableState.js'\nimport { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js'\nimport { getTextContentFromNodes } from './helpers/getTextContentFromNodes.js'\nimport type {\n CanCommands,\n ChainedCommands,\n ExtendedRegExpMatchArray,\n Range,\n SingleCommands,\n} from './types.js'\nimport { isRegExp } from './utilities/isRegExp.js'\n\nexport type InputRuleMatch = {\n index: number\n text: string\n replaceWith?: string\n match?: RegExpMatchArray\n data?: Record\n}\n\nexport type InputRuleFinder = RegExp | ((text: string) => InputRuleMatch | null)\n\nexport class InputRule {\n find: InputRuleFinder\n\n handler: (props: {\n state: EditorState\n range: Range\n match: ExtendedRegExpMatchArray\n commands: SingleCommands\n chain: () => ChainedCommands\n can: () => CanCommands\n }) => void | null\n\n undoable: boolean\n\n constructor(config: {\n find: InputRuleFinder\n handler: (props: {\n state: EditorState\n range: Range\n match: ExtendedRegExpMatchArray\n commands: SingleCommands\n chain: () => ChainedCommands\n can: () => CanCommands\n }) => void | null\n undoable?: boolean\n }) {\n this.find = config.find\n this.handler = config.handler\n this.undoable = config.undoable ?? true\n }\n}\n\nconst inputRuleMatcherHandler = (\n text: string,\n find: InputRuleFinder,\n): ExtendedRegExpMatchArray | null => {\n if (isRegExp(find)) {\n return find.exec(text)\n }\n\n const inputRuleMatch = find(text)\n\n if (!inputRuleMatch) {\n return null\n }\n\n const result: ExtendedRegExpMatchArray = [inputRuleMatch.text]\n\n result.index = inputRuleMatch.index\n result.input = text\n result.data = inputRuleMatch.data\n\n if (inputRuleMatch.replaceWith) {\n if (!inputRuleMatch.text.includes(inputRuleMatch.replaceWith)) {\n console.warn(\n '[tiptap warn]: \"inputRuleMatch.replaceWith\" must be part of \"inputRuleMatch.text\".',\n )\n }\n\n result.push(inputRuleMatch.replaceWith)\n }\n\n return result\n}\n\nfunction run(config: {\n editor: Editor\n from: number\n to: number\n text: string\n rules: InputRule[]\n plugin: Plugin\n}): boolean {\n const { editor, from, to, text, rules, plugin } = config\n const { view } = editor\n\n if (view.composing) {\n return false\n }\n\n const $from = view.state.doc.resolve(from)\n\n if (\n // check for code node\n $from.parent.type.spec.code ||\n // check for code mark\n !!($from.nodeBefore || $from.nodeAfter)?.marks.find(mark => mark.type.spec.code)\n ) {\n return false\n }\n\n let matched = false\n\n const textBefore = getTextContentFromNodes($from) + text\n\n rules.forEach(rule => {\n if (matched) {\n return\n }\n\n const match = inputRuleMatcherHandler(textBefore, rule.find)\n\n if (!match) {\n return\n }\n\n const tr = view.state.tr\n const state = createChainableState({\n state: view.state,\n transaction: tr,\n })\n const range = {\n from: from - (match[0].length - text.length),\n to,\n }\n\n const { commands, chain, can } = new CommandManager({\n editor,\n state,\n })\n\n const handler = rule.handler({\n state,\n range,\n match,\n commands,\n chain,\n can,\n })\n\n // stop if there are no changes\n if (handler === null || !tr.steps.length) {\n return\n }\n\n // store transform as meta data\n // so we can undo input rules within the `undoInputRules` command\n if (rule.undoable) {\n tr.setMeta(plugin, {\n transform: tr,\n from,\n to,\n text,\n })\n }\n\n view.dispatch(tr)\n matched = true\n })\n\n return matched\n}\n\n/**\n * Create an input rules plugin. When enabled, it will cause text\n * input that matches any of the given rules to trigger the rule’s\n * action.\n */\nexport function inputRulesPlugin(props: { editor: Editor; rules: InputRule[] }): Plugin {\n const { editor, rules } = props\n const plugin = new Plugin({\n state: {\n init() {\n return null\n },\n apply(tr, prev, state) {\n const stored = tr.getMeta(plugin)\n\n if (stored) {\n return stored\n }\n\n // if InputRule is triggered by insertContent()\n const simulatedInputMeta = tr.getMeta('applyInputRules') as\n | undefined\n | {\n from: number\n text: string | ProseMirrorNode | Fragment\n }\n const isSimulatedInput = !!simulatedInputMeta\n\n if (isSimulatedInput) {\n setTimeout(() => {\n let { text } = simulatedInputMeta\n\n if (typeof text === 'string') {\n text = text as string\n } else {\n text = getHTMLFromFragment(Fragment.from(text), state.schema)\n }\n\n const { from } = simulatedInputMeta\n const to = from + text.length\n\n run({\n editor,\n from,\n to,\n text,\n rules,\n plugin,\n })\n })\n }\n\n return tr.selectionSet || tr.docChanged ? null : prev\n },\n },\n\n props: {\n handleTextInput(view, from, to, text) {\n return run({\n editor,\n from,\n to,\n text,\n rules,\n plugin,\n })\n },\n\n handleDOMEvents: {\n compositionend: view => {\n setTimeout(() => {\n const { $cursor } = view.state.selection as TextSelection\n\n if ($cursor) {\n run({\n editor,\n from: $cursor.pos,\n to: $cursor.pos,\n text: '',\n rules,\n plugin,\n })\n }\n })\n\n return false\n },\n },\n\n // add support for input rules to trigger on enter\n // this is useful for example for code blocks\n handleKeyDown(view, event) {\n if (event.key !== 'Enter') {\n return false\n }\n\n const { $cursor } = view.state.selection as TextSelection\n\n if ($cursor) {\n return run({\n editor,\n from: $cursor.pos,\n to: $cursor.pos,\n text: '\\n',\n rules,\n plugin,\n })\n }\n\n return false\n },\n },\n\n // @ts-ignore\n isInputRules: true,\n }) as Plugin\n\n return plugin\n}\n","// see: https://github.com/mesqueeb/is-what/blob/88d6e4ca92fb2baab6003c54e02eedf4e729e5ab/src/index.ts\n\nfunction getType(value: any): string {\n return Object.prototype.toString.call(value).slice(8, -1)\n}\n\nexport function isPlainObject(value: any): value is Record {\n if (getType(value) !== 'Object') {\n return false\n }\n\n return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype\n}\n","import { isPlainObject } from './isPlainObject.js'\n\nexport function mergeDeep(\n target: Record,\n source: Record,\n): Record {\n const output = { ...target }\n\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n if (isPlainObject(source[key]) && isPlainObject(target[key])) {\n output[key] = mergeDeep(target[key], source[key])\n } else {\n output[key] = source[key]\n }\n })\n }\n\n return output\n}\n","import type { Plugin } from '@tiptap/pm/state'\n\nimport type { Editor } from './Editor.js'\nimport { getExtensionField } from './helpers/getExtensionField.js'\nimport type { ExtensionConfig, MarkConfig, NodeConfig } from './index.js'\nimport type { InputRule } from './InputRule.js'\nimport type { Mark } from './Mark.js'\nimport type { Node } from './Node.js'\nimport type { PasteRule } from './PasteRule.js'\nimport type {\n AnyConfig,\n DispatchTransactionProps,\n EditorEvents,\n Extensions,\n GlobalAttributes,\n JSONContent,\n KeyboardShortcutCommand,\n MarkdownParseHelpers,\n MarkdownParseResult,\n MarkdownRendererHelpers,\n MarkdownToken,\n MarkdownTokenizer,\n ParentConfig,\n RawCommands,\n RenderContext,\n} from './types.js'\nimport { callOrReturn } from './utilities/callOrReturn.js'\nimport { mergeDeep } from './utilities/mergeDeep.js'\n\nexport interface ExtendableConfig<\n Options = any,\n Storage = any,\n Config extends\n | ExtensionConfig\n | NodeConfig\n | MarkConfig\n | ExtendableConfig = ExtendableConfig,\n PMType = any,\n> {\n /**\n * The extension name - this must be unique.\n * It will be used to identify the extension.\n *\n * @example 'myExtension'\n */\n name: string\n\n /**\n * The priority of your extension. The higher, the earlier it will be called\n * and will take precedence over other extensions with a lower priority.\n * @default 100\n * @example 101\n */\n priority?: number\n\n /**\n * This method will add options to this extension\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#settings\n * @example\n * addOptions() {\n * return {\n * myOption: 'foo',\n * myOtherOption: 10,\n * }\n */\n addOptions?: (this: { name: string; parent: ParentConfig['addOptions'] }) => Options\n\n /**\n * The default storage this extension can save data to.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#storage\n * @example\n * defaultStorage: {\n * prefetchedUsers: [],\n * loading: false,\n * }\n */\n addStorage?: (this: {\n name: string\n options: Options\n parent: ParentConfig['addStorage']\n }) => Storage\n\n /**\n * This function adds globalAttributes to specific nodes.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#global-attributes\n * @example\n * addGlobalAttributes() {\n * return [\n * {\n // Extend the following extensions\n * types: [\n * 'heading',\n * 'paragraph',\n * ],\n * // … with those attributes\n * attributes: {\n * textAlign: {\n * default: 'left',\n * renderHTML: attributes => ({\n * style: `text-align: ${attributes.textAlign}`,\n * }),\n * parseHTML: element => element.style.textAlign || 'left',\n * },\n * },\n * },\n * ]\n * }\n */\n addGlobalAttributes?: (this: {\n name: string\n options: Options\n storage: Storage\n extensions: (Node | Mark)[]\n parent: ParentConfig['addGlobalAttributes']\n }) => GlobalAttributes\n\n /**\n * This function adds commands to the editor\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#commands\n * @example\n * addCommands() {\n * return {\n * myCommand: () => ({ chain }) => chain().setMark('type', 'foo').run(),\n * }\n * }\n */\n addCommands?: (this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['addCommands']\n }) => Partial\n\n /**\n * This function registers keyboard shortcuts.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#keyboard-shortcuts\n * @example\n * addKeyboardShortcuts() {\n * return {\n * 'Mod-l': () => this.editor.commands.toggleBulletList(),\n * }\n * },\n */\n addKeyboardShortcuts?: (this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['addKeyboardShortcuts']\n }) => {\n [key: string]: KeyboardShortcutCommand\n }\n\n /**\n * This function adds input rules to the editor.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#input-rules\n * @example\n * addInputRules() {\n * return [\n * markInputRule({\n * find: inputRegex,\n * type: this.type,\n * }),\n * ]\n * },\n */\n addInputRules?: (this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['addInputRules']\n }) => InputRule[]\n\n /**\n * This function adds paste rules to the editor.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#paste-rules\n * @example\n * addPasteRules() {\n * return [\n * markPasteRule({\n * find: pasteRegex,\n * type: this.type,\n * }),\n * ]\n * },\n */\n addPasteRules?: (this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['addPasteRules']\n }) => PasteRule[]\n\n /**\n * This function adds Prosemirror plugins to the editor\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#prosemirror-plugins\n * @example\n * addProseMirrorPlugins() {\n * return [\n * customPlugin(),\n * ]\n * }\n */\n addProseMirrorPlugins?: (this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['addProseMirrorPlugins']\n }) => Plugin[]\n\n /**\n * This function transforms pasted HTML content before it's parsed.\n * Extensions can use this to modify or clean up pasted HTML.\n * The transformations are chained - each extension's transform receives\n * the output from the previous extension's transform.\n * @see https://tiptap.dev/docs/editor/guide/custom-extensions#transform-pasted-html\n * @example\n * transformPastedHTML(html) {\n * // Remove all style attributes\n * return html.replace(/style=\"[^\"]*\"/g, '')\n * }\n */\n transformPastedHTML?: (\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['transformPastedHTML']\n },\n html: string,\n ) => string\n\n /**\n * This function adds additional extensions to the editor. This is useful for\n * building extension kits.\n * @example\n * addExtensions() {\n * return [\n * BulletList,\n * OrderedList,\n * ListItem\n * ]\n * }\n */\n addExtensions?: (this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig['addExtensions']\n }) => Extensions\n\n /**\n * The markdown token name\n *\n * This is the name of the token that this extension uses to parse and render markdown and comes from the Marked Lexer.\n *\n * @see https://github.com/markedjs/marked/blob/master/src/Tokens.ts\n *\n */\n markdownTokenName?: string\n\n /**\n * The parse function used by the markdown parser to convert markdown tokens to ProseMirror nodes.\n */\n parseMarkdown?: (token: MarkdownToken, helpers: MarkdownParseHelpers) => MarkdownParseResult\n\n /**\n * The serializer function used by the markdown serializer to convert ProseMirror nodes to markdown tokens.\n */\n renderMarkdown?: (\n node: JSONContent,\n helpers: MarkdownRendererHelpers,\n ctx: RenderContext,\n ) => string\n\n /**\n * The markdown tokenizer responsible for turning a markdown string into tokens\n *\n * Custom tokenizers are only needed when you want to parse non-standard markdown token.\n */\n markdownTokenizer?: MarkdownTokenizer\n\n /**\n * Optional markdown options for indentation\n */\n markdownOptions?: {\n /**\n * Defines if this markdown element should indent it's child elements\n */\n indentsContent?: boolean\n\n /**\n * Lets a mark tell the Markdown serializer which inline HTML tags it can\n * safely use when plain markdown delimiters would become ambiguous.\n *\n * This is mainly useful for overlapping marks. For example, bold followed\n * by bold+italic followed by italic cannot always be written back with only\n * `*` and `**` in a way that still parses correctly. In that case, the\n * serializer can close the overlapping section with markdown and reopen the\n * remaining tail with HTML instead.\n *\n * Example:\n * - desired formatting: `**123` + `*456*` + `789 italic`\n * - serialized result: `**123*456***789`\n *\n * If your extension defines custom mark names, set `htmlReopen` on that\n * extension so the serializer can reuse its HTML form for overlap cases.\n */\n htmlReopen?: {\n open: string\n close: string\n }\n }\n\n /**\n * This function extends the schema of the node.\n * @example\n * extendNodeSchema() {\n * return {\n * group: 'inline',\n * selectable: false,\n * }\n * }\n */\n extendNodeSchema?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig['extendNodeSchema']\n },\n extension: Node,\n ) => Record)\n | null\n\n /**\n * This function extends the schema of the mark.\n * @example\n * extendMarkSchema() {\n * return {\n * group: 'inline',\n * selectable: false,\n * }\n * }\n */\n extendMarkSchema?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig['extendMarkSchema']\n },\n extension: Mark,\n ) => Record)\n | null\n\n /**\n * The editor is not ready yet.\n */\n onBeforeCreate?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onBeforeCreate']\n },\n event: EditorEvents['beforeCreate'],\n ) => void)\n | null\n\n /**\n * The editor is ready.\n */\n onCreate?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onCreate']\n },\n event: EditorEvents['create'],\n ) => void)\n | null\n\n /**\n * The content has changed.\n */\n onUpdate?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onUpdate']\n },\n event: EditorEvents['update'],\n ) => void)\n | null\n\n /**\n * The selection has changed.\n */\n onSelectionUpdate?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onSelectionUpdate']\n },\n event: EditorEvents['selectionUpdate'],\n ) => void)\n | null\n\n /**\n * The editor state has changed.\n */\n onTransaction?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onTransaction']\n },\n event: EditorEvents['transaction'],\n ) => void)\n | null\n\n /**\n * The editor is focused.\n */\n onFocus?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onFocus']\n },\n event: EditorEvents['focus'],\n ) => void)\n | null\n\n /**\n * The editor isn’t focused anymore.\n */\n onBlur?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onBlur']\n },\n event: EditorEvents['blur'],\n ) => void)\n | null\n\n /**\n * The editor is destroyed.\n */\n onDestroy?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['onDestroy']\n },\n event: EditorEvents['destroy'],\n ) => void)\n | null\n\n /**\n * This hook allows you to intercept and modify transactions before they are dispatched.\n *\n * Example\n * ```ts\n * dispatchTransaction({ transaction, next }) {\n * console.log('Dispatching transaction:', transaction)\n * next(transaction)\n * }\n * ```\n *\n * @param props - The dispatch transaction props\n */\n dispatchTransaction?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: PMType\n parent: ParentConfig['dispatchTransaction']\n },\n props: DispatchTransactionProps,\n ) => void)\n | null\n}\n\nexport class Extendable<\n Options = any,\n Storage = any,\n Config =\n | ExtensionConfig\n | NodeConfig\n | MarkConfig,\n> {\n type = 'extendable'\n parent: Extendable | null = null\n\n child: Extendable | null = null\n\n name = ''\n\n config: Config = {\n name: this.name,\n } as Config\n\n constructor(config: Partial = {}) {\n this.config = {\n ...this.config,\n ...config,\n }\n\n this.name = (this.config as any).name\n }\n\n get options(): Options {\n return {\n ...callOrReturn(\n getExtensionField(this as any, 'addOptions', {\n name: this.name,\n }),\n ),\n }\n }\n\n get storage(): Readonly {\n return {\n ...callOrReturn(\n getExtensionField(this as any, 'addStorage', {\n name: this.name,\n options: this.options,\n }),\n ),\n }\n }\n\n configure(options: Partial = {}) {\n const extension = this.extend({\n ...this.config,\n addOptions: () => {\n return mergeDeep(this.options as Record, options) as Options\n },\n })\n\n extension.name = this.name\n extension.parent = this.parent\n\n this.child = null\n\n return extension\n }\n\n extend<\n ExtendedOptions = Options,\n ExtendedStorage = Storage,\n ExtendedConfig =\n | ExtensionConfig\n | NodeConfig\n | MarkConfig,\n >(extendedConfig: Partial = {}): Extendable {\n const extension = new (this.constructor as any)({ ...this.config, ...extendedConfig })\n\n extension.parent = this\n this.child = extension\n extension.name = 'name' in extendedConfig ? extendedConfig.name : extension.parent.name\n\n return extension\n }\n}\n","import type { DOMOutputSpec, Mark as ProseMirrorMark, MarkSpec, MarkType } from '@tiptap/pm/model'\n\nimport type { Editor } from './Editor.js'\nimport type { ExtendableConfig } from './Extendable.js'\nimport { Extendable } from './Extendable.js'\nimport type { Attributes, MarkViewRenderer, ParentConfig } from './types.js'\n\nexport interface MarkConfig extends ExtendableConfig<\n Options,\n Storage,\n MarkConfig,\n MarkType\n> {\n /**\n * Mark View\n */\n addMarkView?:\n | ((this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: MarkType\n parent: ParentConfig>['addMarkView']\n }) => MarkViewRenderer)\n | null\n\n /**\n * Keep mark after split node\n */\n keepOnSplit?: boolean | (() => boolean)\n\n /**\n * Whether this mark is removed by `unsetAllMarks`.\n * Set to `false` for semantic marks (comments, suggestions) that should survive \"clear formatting\".\n * @default true\n */\n clearable?: boolean | (() => boolean)\n\n /**\n * Inclusive\n */\n inclusive?:\n | MarkSpec['inclusive']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['inclusive']\n editor?: Editor\n }) => MarkSpec['inclusive'])\n\n /**\n * Excludes\n */\n excludes?:\n | MarkSpec['excludes']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['excludes']\n editor?: Editor\n }) => MarkSpec['excludes'])\n\n /**\n * Marks this Mark as exitable\n */\n exitable?: boolean | (() => boolean)\n\n /**\n * Group\n */\n group?:\n | MarkSpec['group']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['group']\n editor?: Editor\n }) => MarkSpec['group'])\n\n /**\n * Spanning\n */\n spanning?:\n | MarkSpec['spanning']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['spanning']\n editor?: Editor\n }) => MarkSpec['spanning'])\n\n /**\n * Code\n */\n code?:\n | boolean\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['code']\n editor?: Editor\n }) => boolean)\n\n /**\n * Parse HTML\n */\n parseHTML?: (this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['parseHTML']\n editor?: Editor\n }) => MarkSpec['parseDOM']\n\n /**\n * Render HTML\n */\n renderHTML?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['renderHTML']\n editor?: Editor\n },\n props: {\n mark: ProseMirrorMark\n HTMLAttributes: Record\n },\n ) => DOMOutputSpec)\n | null\n\n /**\n * Attributes\n */\n addAttributes?: (this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['addAttributes']\n editor?: Editor\n // oxlint-disable-next-lineno-empty-object-type\n }) => Attributes | {}\n}\n\n/**\n * The Mark class is used to create custom mark extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nexport class Mark extends Extendable<\n Options,\n Storage,\n MarkConfig\n> {\n type = 'mark'\n\n /**\n * Create a new Mark instance\n * @param config - Mark configuration object or a function that returns a configuration object\n */\n static create(\n config: Partial> | (() => Partial>) = {},\n ) {\n // If the config is a function, execute it to get the configuration object\n const resolvedConfig = typeof config === 'function' ? config() : config\n return new Mark(resolvedConfig)\n }\n\n static handleExit({ editor, mark }: { editor: Editor; mark: Mark }) {\n const { tr } = editor.state\n const currentPos = editor.state.selection.$from\n const isAtEnd = currentPos.pos === currentPos.end()\n\n if (isAtEnd) {\n const currentMarks = currentPos.marks()\n const isInMark = !!currentMarks.find(m => m?.type.name === mark.name)\n\n if (!isInMark) {\n return false\n }\n\n const removeMark = currentMarks.find(m => m?.type.name === mark.name)\n\n if (removeMark) {\n tr.removeStoredMark(removeMark)\n }\n tr.insertText(' ', currentPos.pos)\n\n editor.view.dispatch(tr)\n\n return true\n }\n\n return false\n }\n\n configure(options?: Partial) {\n return super.configure(options) as Mark\n }\n\n extend<\n ExtendedOptions = Options,\n ExtendedStorage = Storage,\n ExtendedConfig extends MarkConfig = MarkConfig<\n ExtendedOptions,\n ExtendedStorage\n >,\n >(\n extendedConfig?:\n | (() => Partial)\n | (Partial &\n ThisType<{\n name: string\n options: ExtendedOptions\n storage: ExtendedStorage\n editor: Editor\n type: MarkType\n }>),\n ): Mark {\n // If the extended config is a function, execute it to get the configuration object\n const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig\n return super.extend(resolvedConfig) as Mark\n }\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Fragment } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\nimport { Plugin } from '@tiptap/pm/state'\n\nimport { CommandManager } from './CommandManager.js'\nimport type { Editor } from './Editor.js'\nimport { createChainableState } from './helpers/createChainableState.js'\nimport { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js'\nimport type {\n CanCommands,\n ChainedCommands,\n ExtendedRegExpMatchArray,\n Range,\n SingleCommands,\n} from './types.js'\nimport { isNumber } from './utilities/isNumber.js'\nimport { isRegExp } from './utilities/isRegExp.js'\n\nexport type PasteRuleMatch = {\n index: number\n text: string\n replaceWith?: string\n match?: RegExpMatchArray\n data?: Record\n}\n\nexport type PasteRuleFinder =\n | RegExp\n | ((text: string, event?: ClipboardEvent | null) => PasteRuleMatch[] | null | undefined)\n\n/**\n * Paste rules are used to react to pasted content.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nexport class PasteRule {\n find: PasteRuleFinder\n\n handler: (props: {\n state: EditorState\n range: Range\n match: ExtendedRegExpMatchArray\n commands: SingleCommands\n chain: () => ChainedCommands\n can: () => CanCommands\n pasteEvent: ClipboardEvent | null\n dropEvent: DragEvent | null\n }) => void | null\n\n constructor(config: {\n find: PasteRuleFinder\n handler: (props: {\n can: () => CanCommands\n chain: () => ChainedCommands\n commands: SingleCommands\n dropEvent: DragEvent | null\n match: ExtendedRegExpMatchArray\n pasteEvent: ClipboardEvent | null\n range: Range\n state: EditorState\n }) => void | null\n }) {\n this.find = config.find\n this.handler = config.handler\n }\n}\n\nconst pasteRuleMatcherHandler = (\n text: string,\n find: PasteRuleFinder,\n event?: ClipboardEvent | null,\n): ExtendedRegExpMatchArray[] => {\n if (isRegExp(find)) {\n return [...text.matchAll(find)]\n }\n\n const matches = find(text, event)\n\n if (!matches) {\n return []\n }\n\n return matches.map(pasteRuleMatch => {\n const result: ExtendedRegExpMatchArray = [pasteRuleMatch.text]\n\n result.index = pasteRuleMatch.index\n result.input = text\n result.data = pasteRuleMatch.data\n\n if (pasteRuleMatch.replaceWith) {\n if (!pasteRuleMatch.text.includes(pasteRuleMatch.replaceWith)) {\n console.warn(\n '[tiptap warn]: \"pasteRuleMatch.replaceWith\" must be part of \"pasteRuleMatch.text\".',\n )\n }\n\n result.push(pasteRuleMatch.replaceWith)\n }\n\n return result\n })\n}\n\nfunction run(config: {\n editor: Editor\n state: EditorState\n from: number\n to: number\n rule: PasteRule\n pasteEvent: ClipboardEvent | null\n dropEvent: DragEvent | null\n}): boolean {\n const { editor, state, from, to, rule, pasteEvent, dropEvent } = config\n\n const { commands, chain, can } = new CommandManager({\n editor,\n state,\n })\n\n const handlers: (void | null)[] = []\n\n state.doc.nodesBetween(from, to, (node, pos) => {\n // Skip code blocks and non-textual nodes.\n // Be defensive: `node` may be a Fragment without a `type`. Only text,\n // inline, or textblock nodes are processed by paste rules.\n if (node.type?.spec?.code || !(node.isText || node.isTextblock || node.isInline)) {\n return\n }\n\n // For textblock and inline/text nodes, compute the range relative to the node.\n // Prefer `node.nodeSize` when available (some Node shapes expose this),\n // otherwise fall back to `node.content?.size`. Default to 0 if neither exists.\n const contentSize = node.content?.size ?? node.nodeSize ?? 0\n const resolvedFrom = Math.max(from, pos)\n const resolvedTo = Math.min(to, pos + contentSize)\n\n // If the resolved range is empty or invalid for this node, skip it. This\n // avoids calling `textBetween` with start > end which can cause internal\n // Fragment/Node traversal to access undefined `nodeSize` values.\n if (resolvedFrom >= resolvedTo) {\n return\n }\n\n const textToMatch = node.isText\n ? node.text || ''\n : node.textBetween(resolvedFrom - pos, resolvedTo - pos, undefined, '\\ufffc')\n\n const matches = pasteRuleMatcherHandler(textToMatch, rule.find, pasteEvent)\n\n matches.forEach(match => {\n if (match.index === undefined) {\n return\n }\n\n const start = resolvedFrom + match.index + 1\n const end = start + match[0].length\n const range = {\n from: state.tr.mapping.map(start),\n to: state.tr.mapping.map(end),\n }\n\n const handler = rule.handler({\n state,\n range,\n match,\n commands,\n chain,\n can,\n pasteEvent,\n dropEvent,\n })\n\n handlers.push(handler)\n })\n })\n\n const success = handlers.every(handler => handler !== null)\n\n return success\n}\n\n// When dragging across editors, must get another editor instance to delete selection content.\nlet tiptapDragFromOtherEditor: Editor | null = null\n\nconst createClipboardPasteEvent = (text: string) => {\n const event = new ClipboardEvent('paste', {\n clipboardData: new DataTransfer(),\n })\n\n event.clipboardData?.setData('text/html', text)\n\n return event\n}\n\n/**\n * Create an paste rules plugin. When enabled, it will cause pasted\n * text that matches any of the given rules to trigger the rule’s\n * action.\n */\nexport function pasteRulesPlugin(props: { editor: Editor; rules: PasteRule[] }): Plugin[] {\n const { editor, rules } = props\n let dragSourceElement: Element | null = null\n let isPastedFromProseMirror = false\n let isDroppedFromProseMirror = false\n let pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null\n let dropEvent: DragEvent | null\n\n try {\n dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null\n } catch {\n dropEvent = null\n }\n\n const processEvent = ({\n state,\n from,\n to,\n rule,\n pasteEvt,\n }: {\n state: EditorState\n from: number\n to: { b: number }\n rule: PasteRule\n pasteEvt: ClipboardEvent | null\n }) => {\n const tr = state.tr\n const chainableState = createChainableState({\n state,\n transaction: tr,\n })\n\n const handler = run({\n editor,\n state: chainableState,\n from: Math.max(from - 1, 0),\n to: to.b - 1,\n rule,\n pasteEvent: pasteEvt,\n dropEvent,\n })\n\n if (!handler || !tr.steps.length) {\n return\n }\n\n try {\n dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null\n } catch {\n dropEvent = null\n }\n pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null\n\n return tr\n }\n\n const plugins = rules.map(rule => {\n return new Plugin({\n // we register a global drag handler to track the current drag source element\n view(view) {\n const handleDragstart = (event: DragEvent) => {\n dragSourceElement = view.dom.parentElement?.contains(event.target as Element)\n ? view.dom.parentElement\n : null\n\n if (dragSourceElement) {\n tiptapDragFromOtherEditor = editor\n }\n }\n\n const handleDragend = () => {\n if (tiptapDragFromOtherEditor) {\n tiptapDragFromOtherEditor = null\n }\n }\n\n window.addEventListener('dragstart', handleDragstart)\n window.addEventListener('dragend', handleDragend)\n\n return {\n destroy() {\n window.removeEventListener('dragstart', handleDragstart)\n window.removeEventListener('dragend', handleDragend)\n },\n }\n },\n\n props: {\n handleDOMEvents: {\n drop: (view, event: Event) => {\n isDroppedFromProseMirror = dragSourceElement === view.dom.parentElement\n dropEvent = event as DragEvent\n\n if (!isDroppedFromProseMirror) {\n const dragFromOtherEditor = tiptapDragFromOtherEditor\n\n if (dragFromOtherEditor?.isEditable) {\n // setTimeout to avoid the wrong content after drop, timeout arg can't be empty or 0\n setTimeout(() => {\n const selection = dragFromOtherEditor.state.selection\n\n if (selection) {\n dragFromOtherEditor.commands.deleteRange({\n from: selection.from,\n to: selection.to,\n })\n }\n }, 10)\n }\n }\n return false\n },\n\n paste: (_view, event: Event) => {\n const html = (event as ClipboardEvent).clipboardData?.getData('text/html')\n\n pasteEvent = event as ClipboardEvent\n\n isPastedFromProseMirror = !!html?.includes('data-pm-slice')\n\n return false\n },\n },\n },\n\n appendTransaction: (transactions, oldState, state) => {\n const transaction = transactions[0]\n const isPaste = transaction.getMeta('uiEvent') === 'paste' && !isPastedFromProseMirror\n const isDrop = transaction.getMeta('uiEvent') === 'drop' && !isDroppedFromProseMirror\n\n // if PasteRule is triggered by insertContent()\n const simulatedPasteMeta = transaction.getMeta('applyPasteRules') as\n | undefined\n | { from: number; text: string | ProseMirrorNode | Fragment }\n const isSimulatedPaste = !!simulatedPasteMeta\n\n if (!isPaste && !isDrop && !isSimulatedPaste) {\n return\n }\n\n // Handle simulated paste\n if (isSimulatedPaste) {\n let { text } = simulatedPasteMeta\n\n if (typeof text === 'string') {\n text = text as string\n } else {\n text = getHTMLFromFragment(Fragment.from(text), state.schema)\n }\n\n const { from } = simulatedPasteMeta\n const to = from + text.length\n\n const pasteEvt = createClipboardPasteEvent(text)\n\n return processEvent({\n rule,\n state,\n from,\n to: { b: to },\n pasteEvt,\n })\n }\n\n // handle actual paste/drop\n const from = oldState.doc.content.findDiffStart(state.doc.content)\n const to = oldState.doc.content.findDiffEnd(state.doc.content)\n\n // stop if there is no changed range\n if (!isNumber(from) || !to || from === to.b) {\n return\n }\n\n return processEvent({\n rule,\n state,\n from,\n to,\n pasteEvt: pasteEvent,\n })\n },\n })\n })\n\n return plugins\n}\n","export function isNumber(value: any): value is number {\n return typeof value === 'number'\n}\n","export { ClipboardTextSerializer } from './clipboardTextSerializer.js'\nexport { Commands } from './commands.js'\nexport { Delete } from './delete.js'\nexport { Drop } from './drop.js'\nexport { Editable } from './editable.js'\nexport { FocusEvents, focusEventsPluginKey } from './focusEvents.js'\nexport { Keymap } from './keymap.js'\nexport { Paste } from './paste.js'\nexport { Tabindex } from './tabindex.js'\nexport { TextDirection } from './textDirection.js'\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\nimport { getTextBetween } from '../helpers/getTextBetween.js'\nimport { getTextSerializersFromSchema } from '../helpers/getTextSerializersFromSchema.js'\n\nexport type ClipboardTextSerializerOptions = {\n blockSeparator?: string\n}\n\nexport const ClipboardTextSerializer = Extension.create({\n name: 'clipboardTextSerializer',\n\n addOptions() {\n return {\n blockSeparator: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('clipboardTextSerializer'),\n props: {\n clipboardTextSerializer: () => {\n const { editor } = this\n const { state, schema } = editor\n const { doc, selection } = state\n const textSerializers = getTextSerializersFromSchema(schema)\n const { blockSeparator } = this.options\n const options = {\n ...(blockSeparator !== undefined ? { blockSeparator } : {}),\n textSerializers,\n }\n\n // Serialize each selection range independently and join the results.\n // CellSelection exposes one range per selected cell; flattening to\n // min(from)/max(to) would pull in unselected cells between them.\n // Sort by document position so reverse selections (e.g. dragging\n // upward) still emit text in document order.\n const sortedRanges = [...selection.ranges].sort((a, b) => a.$from.pos - b.$from.pos)\n\n return sortedRanges\n .map(({ $from, $to }) =>\n getTextBetween(doc, { from: $from.pos, to: $to.pos }, options),\n )\n .join(blockSeparator ?? '\\n\\n')\n },\n },\n }),\n ]\n },\n})\n","import type { Editor } from './Editor.js'\nimport { type ExtendableConfig, Extendable } from './Extendable.js'\n\n// oxlint-disable-next-lineno-empty-object-type\nexport interface ExtensionConfig extends ExtendableConfig<\n Options,\n Storage,\n ExtensionConfig,\n null\n> {}\n\n/**\n * The Extension class is the base class for all extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nexport class Extension extends Extendable<\n Options,\n Storage,\n ExtensionConfig\n> {\n type = 'extension'\n\n /**\n * Create a new Extension instance\n * @param config - Extension configuration object or a function that returns a configuration object\n */\n static create(\n config: Partial> | (() => Partial>) = {},\n ) {\n // If the config is a function, execute it to get the configuration object\n const resolvedConfig = typeof config === 'function' ? config() : config\n return new Extension(resolvedConfig)\n }\n\n configure(options?: Partial) {\n return super.configure(options) as Extension\n }\n\n extend<\n ExtendedOptions = Options,\n ExtendedStorage = Storage,\n ExtendedConfig = ExtensionConfig,\n >(\n extendedConfig?:\n | (() => Partial)\n | (Partial &\n ThisType<{\n name: string\n options: ExtendedOptions\n storage: ExtendedStorage\n editor: Editor\n type: null\n }>),\n ): Extension {\n // If the extended config is a function, execute it to get the configuration object\n const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig\n return super.extend(resolvedConfig) as Extension\n }\n}\n","import * as commands from '../commands/index.js'\nimport { Extension } from '../Extension.js'\n\nexport * from '../commands/index.js'\n\nexport const Commands = Extension.create({\n name: 'commands',\n\n addCommands() {\n return {\n ...commands,\n }\n },\n})\n","import { RemoveMarkStep } from '@tiptap/pm/transform'\n\nimport { Extension } from '../Extension.js'\nimport { combineTransactionSteps, getChangedRanges } from '../helpers/index.js'\n\n/**\n * This extension allows you to be notified when the user deletes content you are interested in.\n */\nexport const Delete = Extension.create({\n name: 'delete',\n\n onUpdate({ transaction, appendedTransactions }) {\n const callback = () => {\n if (\n this.editor.options.coreExtensionOptions?.delete?.filterTransaction?.(transaction) ??\n transaction.getMeta('y-sync$')\n ) {\n return\n }\n const nextTransaction = combineTransactionSteps(transaction.before, [\n transaction,\n ...appendedTransactions,\n ])\n const changes = getChangedRanges(nextTransaction)\n\n changes.forEach(change => {\n if (\n nextTransaction.mapping.mapResult(change.oldRange.from).deletedAfter &&\n nextTransaction.mapping.mapResult(change.oldRange.to).deletedBefore\n ) {\n nextTransaction.before.nodesBetween(\n change.oldRange.from,\n change.oldRange.to,\n (node, from) => {\n const to = from + node.nodeSize - 2\n const isFullyWithinRange = change.oldRange.from <= from && to <= change.oldRange.to\n\n this.editor.emit('delete', {\n type: 'node',\n node,\n from,\n to,\n newFrom: nextTransaction.mapping.map(from),\n newTo: nextTransaction.mapping.map(to),\n deletedRange: change.oldRange,\n newRange: change.newRange,\n partial: !isFullyWithinRange,\n editor: this.editor,\n transaction,\n combinedTransform: nextTransaction,\n })\n },\n )\n }\n })\n\n const mapping = nextTransaction.mapping\n nextTransaction.steps.forEach((step, index) => {\n if (step instanceof RemoveMarkStep) {\n const newStart = mapping.slice(index).map(step.from, -1)\n const newEnd = mapping.slice(index).map(step.to)\n const oldStart = mapping.invert().map(newStart, -1)\n const oldEnd = mapping.invert().map(newEnd)\n\n const foundBeforeMark =\n newStart > 0\n ? nextTransaction.doc.nodeAt(newStart - 1)?.marks.some(mark => mark.eq(step.mark))\n : false\n const foundAfterMark = nextTransaction.doc\n .nodeAt(newEnd)\n ?.marks.some(mark => mark.eq(step.mark))\n\n this.editor.emit('delete', {\n type: 'mark',\n mark: step.mark,\n from: step.from,\n to: step.to,\n deletedRange: {\n from: oldStart,\n to: oldEnd,\n },\n newRange: {\n from: newStart,\n to: newEnd,\n },\n partial: Boolean(foundAfterMark || foundBeforeMark),\n editor: this.editor,\n transaction,\n combinedTransform: nextTransaction,\n })\n }\n })\n }\n\n if (this.editor.options.coreExtensionOptions?.delete?.async ?? true) {\n setTimeout(callback, 0)\n } else {\n callback()\n }\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const Drop = Extension.create({\n name: 'drop',\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('tiptapDrop'),\n\n props: {\n handleDrop: (_, e, slice, moved) => {\n this.editor.emit('drop', {\n editor: this.editor,\n event: e,\n slice,\n moved,\n })\n },\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const Editable = Extension.create({\n name: 'editable',\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('editable'),\n props: {\n editable: () => this.editor.options.editable,\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const focusEventsPluginKey = new PluginKey('focusEvents')\n\nexport const FocusEvents = Extension.create({\n name: 'focusEvents',\n\n addProseMirrorPlugins() {\n const { editor } = this\n\n return [\n new Plugin({\n key: focusEventsPluginKey,\n props: {\n handleDOMEvents: {\n focus: (view, event: Event) => {\n editor.isFocused = true\n\n const transaction = editor.state.tr\n .setMeta('focus', { event })\n .setMeta('addToHistory', false)\n\n view.dispatch(transaction)\n\n return false\n },\n blur: (view, event: Event) => {\n editor.isFocused = false\n\n const transaction = editor.state.tr\n .setMeta('blur', { event })\n .setMeta('addToHistory', false)\n\n view.dispatch(transaction)\n\n return false\n },\n },\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey, Selection } from '@tiptap/pm/state'\n\nimport { CommandManager } from '../CommandManager.js'\nimport { Extension } from '../Extension.js'\nimport { createChainableState } from '../helpers/createChainableState.js'\nimport { isNodeEmpty } from '../helpers/isNodeEmpty.js'\nimport { isiOS } from '../utilities/isiOS.js'\nimport { isMacOS } from '../utilities/isMacOS.js'\n\nexport const Keymap = Extension.create({\n name: 'keymap',\n\n addKeyboardShortcuts() {\n const handleBackspace = () =>\n this.editor.commands.first(({ commands }) => [\n () => commands.undoInputRule(),\n\n // maybe convert first text block node to default node\n () =>\n commands.command(({ tr }) => {\n const { selection, doc } = tr\n const { empty, $anchor } = selection\n const { pos, parent } = $anchor\n const $parentPos =\n $anchor.parent.isTextblock && pos > 0 ? tr.doc.resolve(pos - 1) : $anchor\n const parentIsIsolating = $parentPos.parent.type.spec.isolating\n\n const parentPos = $anchor.pos - $anchor.parentOffset\n\n const isAtStart =\n parentIsIsolating && $parentPos.parent.childCount === 1\n ? parentPos === $anchor.pos\n : Selection.atStart(doc).from === pos\n\n if (\n !empty ||\n !parent.type.isTextblock ||\n parent.textContent.length ||\n !isAtStart ||\n (isAtStart && $anchor.parent.type.name === 'paragraph') // prevent clearNodes when no nodes to clear, otherwise history stack is appended\n ) {\n return false\n }\n\n return commands.clearNodes()\n }),\n\n () => commands.deleteSelection(),\n () => commands.joinBackward(),\n () => commands.selectNodeBackward(),\n ])\n\n const handleDelete = () =>\n this.editor.commands.first(({ commands }) => [\n () => commands.deleteSelection(),\n () => commands.deleteCurrentNode(),\n () => commands.joinForward(),\n () => commands.selectNodeForward(),\n ])\n\n const handleEnter = () =>\n this.editor.commands.first(({ commands }) => [\n () => commands.newlineInCode(),\n () => commands.createParagraphNear(),\n () => commands.liftEmptyBlock(),\n () => commands.splitBlock(),\n ])\n\n const baseKeymap = {\n Enter: handleEnter,\n 'Mod-Enter': () => this.editor.commands.exitCode(),\n Backspace: handleBackspace,\n 'Mod-Backspace': handleBackspace,\n 'Shift-Backspace': handleBackspace,\n Delete: handleDelete,\n 'Mod-Delete': handleDelete,\n 'Mod-a': () => this.editor.commands.selectAll(),\n }\n\n const pcKeymap = {\n ...baseKeymap,\n }\n\n const macKeymap = {\n ...baseKeymap,\n 'Ctrl-h': handleBackspace,\n 'Alt-Backspace': handleBackspace,\n 'Ctrl-d': handleDelete,\n 'Ctrl-Alt-Backspace': handleDelete,\n 'Alt-Delete': handleDelete,\n 'Alt-d': handleDelete,\n 'Ctrl-a': () => this.editor.commands.selectTextblockStart(),\n 'Ctrl-e': () => this.editor.commands.selectTextblockEnd(),\n }\n\n if (isiOS() || isMacOS()) {\n return macKeymap\n }\n\n return pcKeymap\n },\n\n addProseMirrorPlugins() {\n return [\n // With this plugin we check if the whole document was selected and deleted.\n // In this case we will additionally call `clearNodes()` to convert e.g. a heading\n // to a paragraph if necessary.\n // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well\n // with many other commands.\n new Plugin({\n key: new PluginKey('clearDocument'),\n appendTransaction: (transactions, oldState, newState) => {\n if (transactions.some(tr => tr.getMeta('composition'))) {\n return\n }\n\n const docChanges =\n transactions.some(transaction => transaction.docChanged) &&\n !oldState.doc.eq(newState.doc)\n\n const ignoreTr = transactions.some(transaction =>\n transaction.getMeta('preventClearDocument'),\n )\n\n if (!docChanges || ignoreTr) {\n return\n }\n\n const { empty, from, to } = oldState.selection\n const allFrom = Selection.atStart(oldState.doc).from\n const allEnd = Selection.atEnd(oldState.doc).to\n const allWasSelected = from === allFrom && to === allEnd\n\n if (empty || !allWasSelected) {\n return\n }\n\n const isEmpty = isNodeEmpty(newState.doc)\n\n if (!isEmpty) {\n return\n }\n\n const tr = newState.tr\n const state = createChainableState({\n state: newState,\n transaction: tr,\n })\n const { commands } = new CommandManager({\n editor: this.editor,\n state,\n })\n\n commands.clearNodes()\n\n if (!tr.steps.length) {\n return\n }\n\n return tr\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\nexport const Paste = Extension.create({\n name: 'paste',\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('tiptapPaste'),\n\n props: {\n handlePaste: (_view, e, slice) => {\n this.editor.emit('paste', {\n editor: this.editor,\n event: e,\n slice,\n })\n },\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\n\n/**\n * Options for the Tabindex extension.\n */\nexport type TabindexOptions = {\n /**\n * The value for the `tabindex` attribute on the editor element.\n * When undefined, editable editors default to `0` and non-editable editors get no tabindex.\n */\n value?: string\n}\n\n/**\n * The Tabindex extension adds a configurable tabindex attribute to the editor.\n *\n * By default, the editor gets tabindex=\"0\" when editable. This can be customized\n * via coreExtensionOptions to support specific focus ordering requirements in forms\n * or to enable focusing on non-editable editors.\n *\n * @example\n * ```ts\n * new Editor({\n * coreExtensionOptions: {\n * tabindex: {\n * value: '-1',\n * },\n * },\n * })\n * ```\n */\nexport const Tabindex = Extension.create({\n name: 'tabindex',\n\n addOptions() {\n return {\n value: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('tabindex'),\n props: {\n attributes: (): { [name: string]: string } => {\n if (!this.editor.isEditable && this.options.value === undefined) {\n return {}\n }\n return { tabindex: this.options.value ?? '0' }\n },\n },\n }),\n ]\n },\n})\n","import { Plugin, PluginKey } from '@tiptap/pm/state'\n\nimport { Extension } from '../Extension.js'\nimport { splitExtensions } from '../helpers/splitExtensions.js'\n\nexport interface TextDirectionOptions {\n direction: 'ltr' | 'rtl' | 'auto' | undefined\n}\n\n/**\n * The TextDirection extension adds support for setting text direction (LTR/RTL/auto)\n * on all nodes in the editor.\n *\n * This extension adds a global `dir` attribute to all node types, which can be used\n * to control bidirectional text rendering. The direction can be set globally via\n * editor options or per-node using commands.\n */\nexport const TextDirection = Extension.create({\n name: 'textDirection',\n\n addOptions() {\n return {\n direction: undefined,\n }\n },\n\n addGlobalAttributes() {\n // Only add the dir attribute to nodes if text direction is configured\n // This prevents null/undefined values from appearing in JSON exports\n if (!this.options.direction) {\n return []\n }\n\n const { nodeExtensions } = splitExtensions(this.extensions)\n\n return [\n {\n types: nodeExtensions\n .filter(extension => extension.name !== 'text')\n .map(extension => extension.name),\n attributes: {\n dir: {\n default: this.options.direction,\n parseHTML: element => {\n const dir = element.getAttribute('dir')\n\n if (dir && (dir === 'ltr' || dir === 'rtl' || dir === 'auto')) {\n return dir\n }\n\n return this.options.direction\n },\n renderHTML: attributes => {\n if (!attributes.dir) {\n return {}\n }\n\n return {\n dir: attributes.dir,\n }\n },\n },\n },\n },\n ]\n },\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('textDirection'),\n props: {\n attributes: (): { [name: string]: string } => {\n const direction = this.options.direction\n\n if (!direction) {\n return {}\n }\n\n return {\n dir: direction,\n }\n },\n },\n }),\n ]\n },\n})\n","import type { Fragment, Node, ResolvedPos } from '@tiptap/pm/model'\n\nimport type { Editor } from './Editor.js'\nimport type { Content, Range } from './types.js'\n\nexport class NodePos {\n private resolvedPos: ResolvedPos\n\n private isBlock: boolean\n\n private editor: Editor\n\n private get name(): string {\n return this.node.type.name\n }\n\n constructor(pos: ResolvedPos, editor: Editor, isBlock = false, node: Node | null = null) {\n this.isBlock = isBlock\n this.resolvedPos = pos\n this.editor = editor\n this.currentNode = node\n }\n\n private currentNode: Node | null = null\n\n get node(): Node {\n return this.currentNode || this.resolvedPos.node()\n }\n\n get element(): HTMLElement {\n return this.editor.view.domAtPos(this.pos).node as HTMLElement\n }\n\n public actualDepth: number | null = null\n\n get depth(): number {\n return this.actualDepth ?? this.resolvedPos.depth\n }\n\n get pos(): number {\n return this.resolvedPos.pos\n }\n\n get content(): Fragment {\n return this.node.content\n }\n\n set content(content: Content) {\n let from = this.from\n let to = this.to\n\n if (this.isBlock) {\n if (this.content.size === 0) {\n console.error(\n `You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`,\n )\n return\n }\n\n from = this.from + 1\n to = this.to - 1\n }\n\n this.editor.commands.insertContentAt({ from, to }, content)\n }\n\n get attributes(): { [key: string]: any } {\n return this.node.attrs\n }\n\n get textContent(): string {\n return this.node.textContent\n }\n\n get size(): number {\n return this.node.nodeSize\n }\n\n get from(): number {\n if (this.isBlock) {\n return this.pos\n }\n\n return this.resolvedPos.start(this.resolvedPos.depth)\n }\n\n get range(): Range {\n return {\n from: this.from,\n to: this.to,\n }\n }\n\n get to(): number {\n if (this.isBlock) {\n return this.pos + this.size\n }\n\n return this.resolvedPos.end(this.resolvedPos.depth) + (this.node.isText ? 0 : 1)\n }\n\n get parent(): NodePos | null {\n if (this.depth === 0) {\n return null\n }\n\n const parentPos = this.resolvedPos.start(this.resolvedPos.depth - 1)\n const $pos = this.resolvedPos.doc.resolve(parentPos)\n\n return new NodePos($pos, this.editor)\n }\n\n get before(): NodePos | null {\n let $pos = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2))\n\n if ($pos.depth !== this.depth) {\n $pos = this.resolvedPos.doc.resolve(this.from - 3)\n }\n\n return new NodePos($pos, this.editor)\n }\n\n get after(): NodePos | null {\n let $pos = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1))\n\n if ($pos.depth !== this.depth) {\n $pos = this.resolvedPos.doc.resolve(this.to + 3)\n }\n\n return new NodePos($pos, this.editor)\n }\n\n get children(): NodePos[] {\n const children: NodePos[] = []\n\n this.node.content.forEach((node, offset) => {\n const isBlock = node.isBlock && !node.isTextblock\n const isNonTextAtom = node.isAtom && !node.isText\n const isInline = node.isInline\n\n const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1)\n\n // Check if targetPos is within valid document range\n if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) {\n return\n }\n\n const $pos = this.resolvedPos.doc.resolve(targetPos)\n\n // Only apply depth check for non-block, non-inline nodes (i.e., textblocks)\n // Inline nodes should always be included as children since we're iterating\n // over direct children via this.node.content\n if (!isBlock && !isInline && $pos.depth <= this.depth) {\n return\n }\n\n // Pass the node for both block and inline nodes to ensure correct node reference\n const childNodePos = new NodePos(\n $pos,\n this.editor,\n isBlock,\n isBlock || isInline ? node : null,\n )\n\n if (isBlock) {\n childNodePos.actualDepth = this.depth + 1\n }\n\n children.push(childNodePos)\n })\n\n return children\n }\n\n get firstChild(): NodePos | null {\n return this.children[0] || null\n }\n\n get lastChild(): NodePos | null {\n const children = this.children\n\n return children[children.length - 1] || null\n }\n\n closest(selector: string, attributes: { [key: string]: any } = {}): NodePos | null {\n let node: NodePos | null = null\n let currentNode = this.parent\n\n while (currentNode && !node) {\n if (currentNode.node.type.name === selector) {\n if (Object.keys(attributes).length > 0) {\n const nodeAttributes = currentNode.node.attrs\n const attrKeys = Object.keys(attributes)\n\n for (let index = 0; index < attrKeys.length; index += 1) {\n const key = attrKeys[index]\n\n if (nodeAttributes[key] !== attributes[key]) {\n break\n }\n }\n } else {\n node = currentNode\n }\n }\n\n currentNode = currentNode.parent\n }\n\n return node\n }\n\n querySelector(selector: string, attributes: { [key: string]: any } = {}): NodePos | null {\n return this.querySelectorAll(selector, attributes, true)[0] || null\n }\n\n querySelectorAll(\n selector: string,\n attributes: { [key: string]: any } = {},\n firstItemOnly = false,\n ): NodePos[] {\n let nodes: NodePos[] = []\n\n if (!this.children || this.children.length === 0) {\n return nodes\n }\n const attrKeys = Object.keys(attributes)\n\n /**\n * Finds all children recursively that match the selector and attributes\n * If firstItemOnly is true, it will return the first item found\n */\n this.children.forEach(childPos => {\n // If we already found a node and we only want the first item, we dont need to keep going\n if (firstItemOnly && nodes.length > 0) {\n return\n }\n\n if (childPos.node.type.name === selector) {\n const doesAllAttributesMatch = attrKeys.every(\n key => attributes[key] === childPos.node.attrs[key],\n )\n\n if (doesAllAttributesMatch) {\n nodes.push(childPos)\n }\n }\n\n // If we already found a node and we only want the first item, we can stop here and skip the recursion\n if (firstItemOnly && nodes.length > 0) {\n return\n }\n\n nodes = nodes.concat(childPos.querySelectorAll(selector, attributes, firstItemOnly))\n })\n\n return nodes\n }\n\n setAttribute(attributes: { [key: string]: any }) {\n const { tr } = this.editor.state\n\n tr.setNodeMarkup(this.from, undefined, {\n ...this.node.attrs,\n ...attributes,\n })\n\n this.editor.view.dispatch(tr)\n }\n}\n","export const style = `.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}`\n","export function createStyleTag(style: string, nonce?: string, suffix?: string): HTMLStyleElement {\n const tiptapStyleTag = (\n document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ''}]`)\n )\n\n if (tiptapStyleTag !== null) {\n return tiptapStyleTag\n }\n\n const styleNode = document.createElement('style')\n\n if (nonce) {\n styleNode.setAttribute('nonce', nonce)\n }\n\n styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ''}`, '')\n styleNode.innerHTML = style\n document.getElementsByTagName('head')[0].appendChild(styleNode)\n\n return styleNode\n}\n","import type { MarkType } from '@tiptap/pm/model'\n\nimport { getMarksBetween } from '../helpers/getMarksBetween.js'\nimport type { InputRuleFinder } from '../InputRule.js'\nimport { InputRule } from '../InputRule.js'\nimport type { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule that adds a mark when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function markInputRule(config: {\n find: InputRuleFinder\n type: MarkType\n undoable?: boolean\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray) => Record)\n | false\n | null\n}) {\n return new InputRule({\n find: config.find,\n handler: ({ state, range, match }) => {\n const attributes = callOrReturn(config.getAttributes, undefined, match)\n\n if (attributes === false || attributes === null) {\n return null\n }\n\n const { tr } = state\n const captureGroup = match[match.length - 1]\n const fullMatch = match[0]\n\n if (captureGroup) {\n const startSpaces = fullMatch.search(/\\S/)\n const textStart = range.from + fullMatch.indexOf(captureGroup)\n const textEnd = textStart + captureGroup.length\n\n const excludedMarks = getMarksBetween(range.from, range.to, state.doc)\n .filter(item => {\n // @ts-ignore\n const excluded = item.mark.type.excluded as MarkType[]\n\n return excluded.find(type => type === config.type && type !== item.mark.type)\n })\n .filter(item => item.to > textStart)\n\n if (excludedMarks.length) {\n return null\n }\n\n if (textEnd < range.to) {\n tr.delete(textEnd, range.to)\n }\n\n if (textStart > range.from) {\n tr.delete(range.from + startSpaces, textStart)\n }\n\n const markEnd = range.from + startSpaces + captureGroup.length\n\n tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {}))\n\n tr.removeStoredMark(config.type)\n }\n },\n undoable: config.undoable,\n })\n}\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport type { InputRuleFinder } from '../InputRule.js'\nimport { InputRule } from '../InputRule.js'\nimport type { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule that adds a node when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function nodeInputRule(config: {\n /**\n * The regex to match.\n */\n find: InputRuleFinder\n\n /**\n * The node type to add.\n */\n type: NodeType\n\n /**\n * Whether the input rule should be undoable\n * when the user presses backspace.\n */\n undoable?: boolean\n\n /**\n * A function that returns the attributes for the node\n * can also be an object of attributes\n */\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray) => Record)\n | false\n | null\n}) {\n return new InputRule({\n find: config.find,\n handler: ({ state, range, match }) => {\n const attributes = callOrReturn(config.getAttributes, undefined, match) || {}\n const { tr } = state\n const start = range.from\n let end = range.to\n\n const newNode = config.type.create(attributes)\n\n if (match[1]) {\n const offset = match[0].lastIndexOf(match[1])\n let matchStart = start + offset\n\n if (matchStart > end) {\n matchStart = end\n } else {\n end = matchStart + match[1].length\n }\n\n // insert last typed character\n const lastChar = match[0][match[0].length - 1]\n\n tr.insertText(lastChar, start + match[0].length - 1)\n\n // insert node from input rule\n tr.replaceWith(matchStart, end, newNode)\n } else if (match[0]) {\n const insertionStart = config.type.isInline ? start : start - 1\n\n tr.insert(insertionStart, config.type.create(attributes)).delete(\n tr.mapping.map(start),\n tr.mapping.map(end),\n )\n }\n\n tr.scrollIntoView()\n },\n undoable: config.undoable,\n })\n}\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport type { InputRuleFinder } from '../InputRule.js'\nimport { InputRule } from '../InputRule.js'\nimport type { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule that changes the type of a textblock when the\n * matched text is typed into it. When using a regular expresion you’ll\n * probably want the regexp to start with `^`, so that the pattern can\n * only occur at the start of a textblock.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function textblockTypeInputRule(config: {\n find: InputRuleFinder\n type: NodeType\n undoable?: boolean\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray) => Record)\n | false\n | null\n}) {\n return new InputRule({\n find: config.find,\n handler: ({ state, range, match }) => {\n const $start = state.doc.resolve(range.from)\n const attributes = callOrReturn(config.getAttributes, undefined, match) || {}\n\n if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), config.type)) {\n return null\n }\n\n state.tr\n .delete(range.from, range.to)\n .setBlockType(range.from, range.from, config.type, attributes)\n },\n undoable: config.undoable,\n })\n}\n","import type { InputRuleFinder } from '../InputRule.js'\nimport { InputRule } from '../InputRule.js'\n\n/**\n * Build an input rule that replaces text when the\n * matched text is typed into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function textInputRule(config: {\n find: InputRuleFinder\n replace: string\n undoable?: boolean\n}) {\n return new InputRule({\n find: config.find,\n handler: ({ state, range, match }) => {\n let insert = config.replace\n let start = range.from\n const end = range.to\n\n if (match[1]) {\n const offset = match[0].lastIndexOf(match[1])\n\n insert += match[0].slice(offset + match[1].length)\n start += offset\n\n const cutOff = start - end\n\n if (cutOff > 0) {\n insert = match[0].slice(offset - cutOff, offset) + insert\n start = end\n }\n }\n\n state.tr.insertText(insert, start, end)\n },\n undoable: config.undoable,\n })\n}\n","import type { Node as ProseMirrorNode, NodeType } from '@tiptap/pm/model'\nimport { canJoin, findWrapping } from '@tiptap/pm/transform'\n\nimport type { Editor } from '../Editor.js'\nimport type { InputRuleFinder } from '../InputRule.js'\nimport { InputRule } from '../InputRule.js'\nimport type { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an input rule for automatically wrapping a textblock when a\n * given string is typed. When using a regular expresion you’ll\n * probably want the regexp to start with `^`, so that the pattern can\n * only occur at the start of a textblock.\n *\n * `type` is the type of node to wrap in.\n *\n * By default, if there’s a node with the same type above the newly\n * wrapped node, the rule will try to join those\n * two nodes. You can pass a join predicate, which takes a regular\n * expression match and the node before the wrapped node, and can\n * return a boolean to indicate whether a join should happen.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules\n */\nexport function wrappingInputRule(config: {\n find: InputRuleFinder\n type: NodeType\n keepMarks?: boolean\n keepAttributes?: boolean\n editor?: Editor\n undoable?: boolean\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray) => Record)\n | false\n | null\n joinPredicate?: (match: ExtendedRegExpMatchArray, node: ProseMirrorNode) => boolean\n}) {\n return new InputRule({\n find: config.find,\n handler: ({ state, range, match, chain }) => {\n const attributes = callOrReturn(config.getAttributes, undefined, match) || {}\n const tr = state.tr.delete(range.from, range.to)\n const $start = tr.doc.resolve(range.from)\n const blockRange = $start.blockRange()\n const wrapping = blockRange && findWrapping(blockRange, config.type, attributes)\n\n if (!wrapping) {\n return null\n }\n\n tr.wrap(blockRange, wrapping)\n\n if (config.keepMarks && config.editor) {\n const { selection, storedMarks } = state\n const { splittableMarks } = config.editor.extensionManager\n const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks())\n\n if (marks) {\n const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name))\n\n tr.ensureMarks(filteredMarks)\n }\n }\n if (config.keepAttributes) {\n /** If the nodeType is `bulletList` or `orderedList` set the `nodeType` as `listItem` */\n const nodeType =\n config.type.name === 'bulletList' || config.type.name === 'orderedList'\n ? 'listItem'\n : 'taskList'\n\n chain().updateAttributes(nodeType, attributes).run()\n }\n\n const before = tr.doc.resolve(range.from - 1).nodeBefore\n\n if (\n before &&\n before.type === config.type &&\n canJoin(tr.doc, range.from - 1) &&\n (!config.joinPredicate || config.joinPredicate(match, before))\n ) {\n tr.join(range.from - 1)\n }\n },\n undoable: config.undoable,\n })\n}\n","export type Attributes = Record\n\nexport type DOMOutputSpecElement = 0 | Attributes | DOMOutputSpecArray\n/**\n * Better describes the output of a `renderHTML` function in prosemirror\n * @see https://prosemirror.net/docs/ref/#model.DOMOutputSpec\n */\nexport type DOMOutputSpecArray =\n | [string]\n | [string, Attributes]\n | [string, 0]\n | [string, Attributes, 0]\n | [string, Attributes, DOMOutputSpecArray | 0]\n | [string, DOMOutputSpecArray]\n\n// JSX types for Tiptap's JSX runtime\n// These types only apply when using @jsxImportSource @tiptap/core\n// oxlint-disable-next-lineno-namespace\nexport namespace JSX {\n export type Element = DOMOutputSpecArray\n export interface IntrinsicElements {\n // oxlint-disable-next-lineno-explicit-any\n [key: string]: any\n }\n export interface ElementChildrenAttribute {\n children: unknown\n }\n}\n\nexport type JSXRenderer = (\n tag: 'slot' | string | ((props?: Attributes) => DOMOutputSpecArray | DOMOutputSpecElement),\n props?: Attributes,\n ...children: JSXRenderer[]\n) => DOMOutputSpecArray | DOMOutputSpecElement\n\nexport function Fragment(props: { children: JSXRenderer[] }) {\n return props.children\n}\n\nexport const h: JSXRenderer = (tag, attributes) => {\n // Treat the slot tag as the Prosemirror hole to render content into\n if (tag === 'slot') {\n return 0\n }\n\n // If the tag is a function, call it with the props\n if (tag instanceof Function) {\n return tag(attributes)\n }\n\n const { children, ...rest } = attributes ?? {}\n\n if (tag === 'svg') {\n throw new Error(\n 'SVG elements are not supported in the JSX syntax, use the array syntax instead',\n )\n }\n\n // Otherwise, return the tag, attributes, and children\n return [tag, rest, children]\n}\n\n// See\n// https://esbuild.github.io/api/#jsx-import-source\n// https://www.typescriptlang.org/tsconfig/#jsxImportSource\n\nexport { h as createElement, h as jsx, h as jsxDEV, h as jsxs }\n","import type { Node as PMNode } from '@tiptap/pm/model'\nimport type { Decoration, DecorationSource, NodeView } from '@tiptap/pm/view'\n\nimport type { Editor } from '../Editor.js'\n\nconst isTouchEvent = (e: MouseEvent | TouchEvent): e is TouchEvent => {\n return 'touches' in e\n}\n\n/**\n * Directions where resize handles can be placed\n *\n * @example\n * - `'top'` - Top edge handle\n * - `'bottom-right'` - Bottom-right corner handle\n */\nexport type ResizableNodeViewDirection =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-right'\n | 'top-left'\n | 'bottom-right'\n | 'bottom-left'\n\n/**\n * Dimensions for the resizable node in pixels\n */\nexport type ResizableNodeDimensions = {\n /** Width in pixels */\n width: number\n /** Height in pixels */\n height: number\n}\n\n/**\n * Configuration options for creating a ResizableNodeView\n *\n * @example\n * ```ts\n * new ResizableNodeView({\n * element: imgElement,\n * node,\n * getPos,\n * onResize: (width, height) => {\n * imgElement.style.width = `${width}px`\n * imgElement.style.height = `${height}px`\n * },\n * onCommit: (width, height) => {\n * editor.commands.updateAttributes('image', { width, height })\n * },\n * onUpdate: (node) => true,\n * options: {\n * directions: ['bottom-right', 'bottom-left'],\n * min: { width: 100, height: 100 },\n * preserveAspectRatio: true\n * }\n * })\n * ```\n */\nexport type ResizableNodeViewOptions = {\n /**\n * The DOM element to make resizable (e.g., an img, video, or iframe element)\n */\n element: HTMLElement\n\n /**\n * The DOM element that will hold the editable content element\n */\n contentElement?: HTMLElement\n\n /**\n * The ProseMirror node instance\n */\n node: PMNode\n\n /**\n * The Tiptap editor instance\n */\n editor: Editor\n\n /**\n * Function that returns the current position of the node in the document\n */\n getPos: () => number | undefined\n\n /**\n * Callback fired continuously during resize with current dimensions.\n * Use this to update the element's visual size in real-time.\n *\n * @param width - Current width in pixels\n * @param height - Current height in pixels\n *\n * @example\n * ```ts\n * onResize: (width, height) => {\n * element.style.width = `${width}px`\n * element.style.height = `${height}px`\n * }\n * ```\n */\n onResize?: (width: number, height: number) => void\n\n /**\n * Callback fired once when resize completes with final dimensions.\n * Use this to persist the new size to the node's attributes.\n *\n * @param width - Final width in pixels\n * @param height - Final height in pixels\n *\n * @example\n * ```ts\n * onCommit: (width, height) => {\n * const pos = getPos()\n * if (pos !== undefined) {\n * editor.commands.updateAttributes('image', { width, height })\n * }\n * }\n * ```\n */\n onCommit: (width: number, height: number) => void\n\n /**\n * Callback for handling node updates.\n * Return `true` to accept the update, `false` to reject it.\n *\n * @example\n * ```ts\n * onUpdate: (node, decorations, innerDecorations) => {\n * if (node.type !== this.node.type) return false\n * return true\n * }\n * ```\n */\n onUpdate: NodeView['update']\n\n /**\n * Optional configuration for resize behavior and styling\n */\n options?: {\n /**\n * Which resize handles to display.\n * @default ['bottom-left', 'bottom-right', 'top-left', 'top-right']\n *\n * @example\n * ```ts\n * // Only show corner handles\n * directions: ['top-left', 'top-right', 'bottom-left', 'bottom-right']\n *\n * // Only show right edge handle\n * directions: ['right']\n * ```\n */\n directions?: ResizableNodeViewDirection[]\n\n /**\n * Minimum dimensions in pixels\n * @default { width: 8, height: 8 }\n *\n * @example\n * ```ts\n * min: { width: 100, height: 50 }\n * ```\n */\n min?: Partial\n\n /**\n * Maximum dimensions in pixels\n * @default undefined (no maximum)\n *\n * @example\n * ```ts\n * max: { width: 1000, height: 800 }\n * ```\n */\n max?: Partial\n\n /**\n * Always preserve aspect ratio when resizing.\n * When `false`, aspect ratio is preserved only when Shift key is pressed.\n * @default false\n *\n * @example\n * ```ts\n * preserveAspectRatio: true // Always lock aspect ratio\n * ```\n */\n preserveAspectRatio?: boolean\n\n /**\n * Custom CSS class names for styling\n *\n * @example\n * ```ts\n * className: {\n * container: 'resize-container',\n * wrapper: 'resize-wrapper',\n * handle: 'resize-handle',\n * resizing: 'is-resizing'\n * }\n * ```\n */\n className?: {\n /** Class for the outer container element */\n container?: string\n /** Class for the wrapper element that contains the resizable element */\n wrapper?: string\n /** Class applied to all resize handles */\n handle?: string\n /** Class added to container while actively resizing */\n resizing?: string\n }\n\n /**\n * Optional callback for creating custom resize handle elements.\n *\n * This function allows developers to define their own handle element\n * (e.g., custom icons, classes, or styles) for a given resize direction.\n * It is called internally for each handle direction.\n *\n * @param direction - The direction of the handle being created (e.g., 'top', 'bottom-right').\n * @returns The custom handle HTMLElement.\n *\n * @example\n * ```ts\n * createCustomHandle: (direction) => {\n * const handle = document.createElement('div')\n * handle.dataset.resizeHandle = direction\n * handle.style.position = 'absolute'\n * handle.className = 'tiptap-custom-handle'\n *\n * const isTop = direction.includes('top')\n * const isBottom = direction.includes('bottom')\n * const isLeft = direction.includes('left')\n * const isRight = direction.includes('right')\n *\n * if (isTop) handle.style.top = '0'\n * if (isBottom) handle.style.bottom = '0'\n * if (isLeft) handle.style.left = '0'\n * if (isRight) handle.style.right = '0'\n *\n * // Edge handles span the full width or height\n * if (direction === 'top' || direction === 'bottom') {\n * handle.style.left = '0'\n * handle.style.right = '0'\n * }\n *\n * if (direction === 'left' || direction === 'right') {\n * handle.style.top = '0'\n * handle.style.bottom = '0'\n * }\n *\n * return handle\n * }\n * ```\n */\n createCustomHandle?: (direction: ResizableNodeViewDirection) => HTMLElement\n }\n}\n\n/**\n * A NodeView implementation that adds resize handles to any DOM element.\n *\n * This class creates a resizable node view for Tiptap/ProseMirror editors.\n * It wraps your element with resize handles and manages the resize interaction,\n * including aspect ratio preservation, min/max constraints, and keyboard modifiers.\n *\n * @example\n * ```ts\n * // Basic usage in a Tiptap extension\n * addNodeView() {\n * return ({ node, getPos }) => {\n * const img = document.createElement('img')\n * img.src = node.attrs.src\n *\n * return new ResizableNodeView({\n * element: img,\n * node,\n * getPos,\n * onResize: (width, height) => {\n * img.style.width = `${width}px`\n * img.style.height = `${height}px`\n * },\n * onCommit: (width, height) => {\n * this.editor.commands.updateAttributes('image', { width, height })\n * },\n * onUpdate: () => true,\n * options: {\n * min: { width: 100, height: 100 },\n * preserveAspectRatio: true\n * }\n * })\n * }\n * }\n * ```\n */\nexport class ResizableNodeView {\n /** The ProseMirror node instance */\n node: PMNode\n\n /** The Tiptap editor instance */\n editor: Editor\n\n /** The DOM element being made resizable */\n element: HTMLElement\n\n /** The editable DOM element inside the DOM */\n contentElement?: HTMLElement\n\n /** The outer container element (returned as NodeView.dom) */\n container: HTMLElement\n\n /** The wrapper element that contains the element and handles */\n wrapper: HTMLElement\n\n /** Function to get the current node position */\n getPos: () => number | undefined\n\n /** Callback fired during resize */\n onResize?: (width: number, height: number) => void\n\n /** Callback fired when resize completes */\n onCommit: (width: number, height: number) => void\n\n /** Callback for node updates */\n onUpdate?: NodeView['update']\n\n /** Active resize handle directions */\n directions: ResizableNodeViewDirection[] = [\n 'bottom-left',\n 'bottom-right',\n 'top-left',\n 'top-right',\n ]\n\n /** Minimum allowed dimensions */\n minSize: ResizableNodeDimensions = {\n height: 8,\n width: 8,\n }\n\n /** Maximum allowed dimensions (optional) */\n maxSize?: Partial\n\n /** Whether to always preserve aspect ratio */\n preserveAspectRatio: boolean = false\n\n /** CSS class names for elements */\n classNames = {\n container: '',\n wrapper: '',\n handle: '',\n resizing: '',\n }\n\n /** Optional callback for creating custom resize handles */\n createCustomHandle?: (direction: ResizableNodeViewDirection) => HTMLElement\n\n /** Initial width of the element (for aspect ratio calculation) */\n private initialWidth: number = 0\n\n /** Initial height of the element (for aspect ratio calculation) */\n private initialHeight: number = 0\n\n /** Calculated aspect ratio (width / height) */\n private aspectRatio: number = 1\n\n /** Whether a resize operation is currently active */\n private isResizing: boolean = false\n\n /** The handle currently being dragged */\n private activeHandle: ResizableNodeViewDirection | null = null\n\n /** Starting mouse X position when resize began */\n private startX: number = 0\n\n /** Starting mouse Y position when resize began */\n private startY: number = 0\n\n /** Element width when resize began */\n private startWidth: number = 0\n\n /** Element height when resize began */\n private startHeight: number = 0\n\n /** Whether Shift key is currently pressed (for temporary aspect ratio lock) */\n private isShiftKeyPressed: boolean = false\n\n /** Last known editable state of the editor */\n private lastEditableState: boolean | undefined = undefined\n\n /** Map of handle elements by direction */\n private handleMap = new Map()\n\n /**\n * Creates a new ResizableNodeView instance.\n *\n * The constructor sets up the resize handles, applies initial sizing from\n * node attributes, and configures all resize behavior options.\n *\n * @param options - Configuration options for the resizable node view\n */\n constructor(options: ResizableNodeViewOptions) {\n this.node = options.node\n this.editor = options.editor\n this.element = options.element\n this.element.draggable = false\n this.contentElement = options.contentElement\n\n this.getPos = options.getPos\n\n this.onResize = options.onResize\n this.onCommit = options.onCommit\n this.onUpdate = options.onUpdate\n\n if (options.options?.min) {\n this.minSize = {\n ...this.minSize,\n ...options.options.min,\n }\n }\n\n if (options.options?.max) {\n this.maxSize = options.options.max\n }\n\n if (options?.options?.directions) {\n this.directions = options.options.directions\n }\n\n if (options.options?.preserveAspectRatio) {\n this.preserveAspectRatio = options.options.preserveAspectRatio\n }\n\n if (options.options?.className) {\n this.classNames = {\n container: options.options.className.container || '',\n wrapper: options.options.className.wrapper || '',\n handle: options.options.className.handle || '',\n resizing: options.options.className.resizing || '',\n }\n }\n\n if (options.options?.createCustomHandle) {\n this.createCustomHandle = options.options.createCustomHandle\n }\n\n this.wrapper = this.createWrapper()\n this.container = this.createContainer()\n\n this.applyInitialSize()\n this.attachHandles()\n\n this.editor.on('update', this.handleEditorUpdate.bind(this))\n }\n\n /**\n * Returns the top-level DOM node that should be placed in the editor.\n *\n * This is required by the ProseMirror NodeView interface. The container\n * includes the wrapper, handles, and the actual content element.\n *\n * @returns The container element to be inserted into the editor\n */\n get dom() {\n return this.container\n }\n\n get contentDOM(): HTMLElement | null {\n return this.contentElement ?? null\n }\n\n private handleEditorUpdate() {\n const isEditable = this.editor.isEditable\n\n // Only if state actually changed\n if (isEditable === this.lastEditableState) {\n return\n }\n\n this.lastEditableState = isEditable\n\n if (!isEditable) {\n this.removeHandles()\n } else if (isEditable && this.handleMap.size === 0) {\n this.attachHandles()\n }\n }\n\n /**\n * Called when the node's content or attributes change.\n *\n * Updates the internal node reference. If a custom `onUpdate` callback\n * was provided, it will be called to handle additional update logic.\n *\n * @param node - The new/updated node\n * @param decorations - Node decorations\n * @param innerDecorations - Inner decorations\n * @returns `false` if the node type has changed (requires full rebuild), otherwise the result of `onUpdate` or `true`\n */\n update(\n node: PMNode,\n decorations: readonly Decoration[],\n innerDecorations: DecorationSource,\n ): boolean {\n if (node.type !== this.node.type) {\n return false\n }\n\n this.node = node\n\n if (this.onUpdate) {\n return this.onUpdate(node, decorations, innerDecorations)\n }\n\n return true\n }\n\n /**\n * Cleanup method called when the node view is being removed.\n *\n * Removes all event listeners to prevent memory leaks. This is required\n * by the ProseMirror NodeView interface. If a resize is active when\n * destroy is called, it will be properly cancelled.\n */\n destroy() {\n if (this.isResizing) {\n this.container.dataset.resizeState = 'false'\n\n if (this.classNames.resizing) {\n this.container.classList.remove(this.classNames.resizing)\n }\n\n document.removeEventListener('mousemove', this.handleMouseMove)\n document.removeEventListener('mouseup', this.handleMouseUp)\n document.removeEventListener('keydown', this.handleKeyDown)\n document.removeEventListener('keyup', this.handleKeyUp)\n this.isResizing = false\n this.activeHandle = null\n }\n\n this.editor.off('update', this.handleEditorUpdate.bind(this))\n\n this.container.remove()\n }\n\n /**\n * Creates the outer container element.\n *\n * The container is the top-level element returned by the NodeView and\n * wraps the entire resizable node. It's set up with flexbox to handle\n * alignment and includes data attributes for styling and identification.\n *\n * @returns The container element\n */\n createContainer() {\n const element = document.createElement('div')\n element.dataset.resizeContainer = ''\n element.dataset.node = this.node.type.name\n element.style.display = this.node.type.isInline ? 'inline-flex' : 'flex'\n\n if (this.classNames.container) {\n element.className = this.classNames.container\n }\n\n element.appendChild(this.wrapper)\n\n return element\n }\n\n /**\n * Creates the wrapper element that contains the content and handles.\n *\n * The wrapper uses relative positioning so that resize handles can be\n * positioned absolutely within it. This is the direct parent of the\n * content element being made resizable.\n *\n * @returns The wrapper element\n */\n createWrapper() {\n const element = document.createElement('div')\n element.style.position = 'relative'\n element.style.display = 'block'\n element.dataset.resizeWrapper = ''\n\n if (this.classNames.wrapper) {\n element.className = this.classNames.wrapper\n }\n\n element.appendChild(this.element)\n\n return element\n }\n\n /**\n * Creates a resize handle element for a specific direction.\n *\n * Each handle is absolutely positioned and includes a data attribute\n * identifying its direction for styling purposes.\n *\n * @param direction - The resize direction for this handle\n * @returns The handle element\n */\n private createHandle(direction: ResizableNodeViewDirection): HTMLElement {\n const handle = document.createElement('div')\n handle.dataset.resizeHandle = direction\n handle.style.position = 'absolute'\n\n if (this.classNames.handle) {\n handle.className = this.classNames.handle\n }\n\n return handle\n }\n\n /**\n * Positions a handle element according to its direction.\n *\n * Corner handles (e.g., 'top-left') are positioned at the intersection\n * of two edges. Edge handles (e.g., 'top') span the full width or height.\n *\n * @param handle - The handle element to position\n * @param direction - The direction determining the position\n */\n private positionHandle(handle: HTMLElement, direction: ResizableNodeViewDirection): void {\n const isTop = direction.includes('top')\n const isBottom = direction.includes('bottom')\n const isLeft = direction.includes('left')\n const isRight = direction.includes('right')\n\n if (isTop) {\n handle.style.top = '0'\n }\n\n if (isBottom) {\n handle.style.bottom = '0'\n }\n\n if (isLeft) {\n handle.style.left = '0'\n }\n\n if (isRight) {\n handle.style.right = '0'\n }\n\n // Edge handles span the full width or height\n if (direction === 'top' || direction === 'bottom') {\n handle.style.left = '0'\n handle.style.right = '0'\n }\n\n if (direction === 'left' || direction === 'right') {\n handle.style.top = '0'\n handle.style.bottom = '0'\n }\n }\n\n /**\n * Creates and attaches all resize handles to the wrapper.\n *\n * Iterates through the configured directions, creates a handle for each,\n * positions it, attaches the mousedown listener, and appends it to the DOM.\n */\n private attachHandles(): void {\n this.directions.forEach(direction => {\n let handle: HTMLElement\n\n if (this.createCustomHandle) {\n handle = this.createCustomHandle(direction)\n } else {\n handle = this.createHandle(direction)\n }\n\n if (!(handle instanceof HTMLElement)) {\n console.warn(\n `[ResizableNodeView] createCustomHandle(\"${direction}\") did not return an HTMLElement. Falling back to default handle.`,\n )\n handle = this.createHandle(direction)\n }\n\n if (!this.createCustomHandle) {\n this.positionHandle(handle, direction)\n }\n\n handle.addEventListener('mousedown', event => this.handleResizeStart(event, direction))\n handle.addEventListener('touchstart', event =>\n this.handleResizeStart(event as unknown as MouseEvent, direction),\n )\n\n this.handleMap.set(direction, handle)\n\n this.wrapper.appendChild(handle)\n })\n }\n\n /**\n * Removes all resize handles from the wrapper.\n *\n * Cleans up the handle map and removes each handle element from the DOM.\n */\n private removeHandles(): void {\n this.handleMap.forEach(el => el.remove())\n this.handleMap.clear()\n }\n\n /**\n * Applies initial sizing from node attributes to the element.\n *\n * If width/height attributes exist on the node, they're applied to the element.\n * Otherwise, the element's natural/current dimensions are measured. The aspect\n * ratio is calculated for later use in aspect-ratio-preserving resizes.\n */\n private applyInitialSize(): void {\n const width = this.node.attrs.width as number | undefined\n const height = this.node.attrs.height as number | undefined\n\n if (width) {\n this.element.style.width = `${width}px`\n this.initialWidth = width\n } else {\n this.initialWidth = this.element.offsetWidth\n }\n\n if (height) {\n this.element.style.height = `${height}px`\n this.initialHeight = height\n } else {\n this.initialHeight = this.element.offsetHeight\n }\n\n // Calculate aspect ratio for use during resizing\n if (this.initialWidth > 0 && this.initialHeight > 0) {\n this.aspectRatio = this.initialWidth / this.initialHeight\n }\n }\n\n /**\n * Initiates a resize operation when a handle is clicked.\n *\n * Captures the starting mouse position and element dimensions, sets up\n * the resize state, adds the resizing class and state attribute, and\n * attaches document-level listeners for mouse movement and keyboard input.\n *\n * @param event - The mouse down event\n * @param direction - The direction of the handle being dragged\n */\n private handleResizeStart(\n event: MouseEvent | TouchEvent,\n direction: ResizableNodeViewDirection,\n ): void {\n event.preventDefault()\n event.stopPropagation()\n\n // Capture initial state\n this.isResizing = true\n this.activeHandle = direction\n\n if (isTouchEvent(event)) {\n this.startX = event.touches[0].clientX\n this.startY = event.touches[0].clientY\n } else {\n this.startX = event.clientX\n this.startY = event.clientY\n }\n\n this.startWidth = this.element.offsetWidth\n this.startHeight = this.element.offsetHeight\n\n // Recalculate aspect ratio at resize start for accuracy\n if (this.startWidth > 0 && this.startHeight > 0) {\n this.aspectRatio = this.startWidth / this.startHeight\n }\n\n const pos = this.getPos()\n if (pos !== undefined) {\n // TODO: Select the node in the editor\n }\n\n // Update UI state\n this.container.dataset.resizeState = 'true'\n\n if (this.classNames.resizing) {\n this.container.classList.add(this.classNames.resizing)\n }\n\n // Attach document-level listeners for resize\n document.addEventListener('mousemove', this.handleMouseMove)\n document.addEventListener('touchmove', this.handleTouchMove)\n document.addEventListener('mouseup', this.handleMouseUp)\n document.addEventListener('keydown', this.handleKeyDown)\n document.addEventListener('keyup', this.handleKeyUp)\n }\n\n /**\n * Handles mouse movement during an active resize.\n *\n * Calculates the delta from the starting position, computes new dimensions\n * based on the active handle direction, applies constraints and aspect ratio,\n * then updates the element's style and calls the onResize callback.\n *\n * @param event - The mouse move event\n */\n private handleMouseMove = (event: MouseEvent): void => {\n if (!this.isResizing || !this.activeHandle) {\n return\n }\n\n const deltaX = event.clientX - this.startX\n const deltaY = event.clientY - this.startY\n\n this.handleResize(deltaX, deltaY)\n }\n\n private handleTouchMove = (event: TouchEvent): void => {\n if (!this.isResizing || !this.activeHandle) {\n return\n }\n\n const touch = event.touches[0]\n if (!touch) {\n return\n }\n\n const deltaX = touch.clientX - this.startX\n const deltaY = touch.clientY - this.startY\n\n this.handleResize(deltaX, deltaY)\n }\n\n private handleResize(deltaX: number, deltaY: number) {\n if (!this.activeHandle) {\n return\n }\n\n const shouldPreserveAspectRatio = this.preserveAspectRatio || this.isShiftKeyPressed\n const { width, height } = this.calculateNewDimensions(this.activeHandle, deltaX, deltaY)\n const constrained = this.applyConstraints(width, height, shouldPreserveAspectRatio)\n\n this.element.style.width = `${constrained.width}px`\n this.element.style.height = `${constrained.height}px`\n\n if (this.onResize) {\n this.onResize(constrained.width, constrained.height)\n }\n }\n\n /**\n * Completes the resize operation when the mouse button is released.\n *\n * Captures final dimensions, calls the onCommit callback to persist changes,\n * removes the resizing state and class, and cleans up document-level listeners.\n */\n private handleMouseUp = (): void => {\n if (!this.isResizing) {\n return\n }\n\n const finalWidth = this.element.offsetWidth\n const finalHeight = this.element.offsetHeight\n\n this.onCommit(finalWidth, finalHeight)\n\n this.isResizing = false\n this.activeHandle = null\n\n // Remove UI state\n this.container.dataset.resizeState = 'false'\n\n if (this.classNames.resizing) {\n this.container.classList.remove(this.classNames.resizing)\n }\n\n // Clean up document-level listeners\n document.removeEventListener('mousemove', this.handleMouseMove)\n document.removeEventListener('mouseup', this.handleMouseUp)\n document.removeEventListener('keydown', this.handleKeyDown)\n document.removeEventListener('keyup', this.handleKeyUp)\n }\n\n /**\n * Tracks Shift key state to enable temporary aspect ratio locking.\n *\n * When Shift is pressed during resize, aspect ratio is preserved even if\n * preserveAspectRatio is false.\n *\n * @param event - The keyboard event\n */\n private handleKeyDown = (event: KeyboardEvent): void => {\n if (event.key === 'Shift') {\n this.isShiftKeyPressed = true\n }\n }\n\n /**\n * Tracks Shift key release to disable temporary aspect ratio locking.\n *\n * @param event - The keyboard event\n */\n private handleKeyUp = (event: KeyboardEvent): void => {\n if (event.key === 'Shift') {\n this.isShiftKeyPressed = false\n }\n }\n\n /**\n * Calculates new dimensions based on mouse delta and resize direction.\n *\n * Takes the starting dimensions and applies the mouse movement delta\n * according to the handle direction. For corner handles, both dimensions\n * are affected. For edge handles, only one dimension changes. If aspect\n * ratio should be preserved, delegates to applyAspectRatio.\n *\n * @param direction - The active resize handle direction\n * @param deltaX - Horizontal mouse movement since resize start\n * @param deltaY - Vertical mouse movement since resize start\n * @returns The calculated width and height\n */\n private calculateNewDimensions(\n direction: ResizableNodeViewDirection,\n deltaX: number,\n deltaY: number,\n ): ResizableNodeDimensions {\n let newWidth = this.startWidth\n let newHeight = this.startHeight\n\n const isRight = direction.includes('right')\n const isLeft = direction.includes('left')\n const isBottom = direction.includes('bottom')\n const isTop = direction.includes('top')\n\n // Apply horizontal delta\n if (isRight) {\n newWidth = this.startWidth + deltaX\n } else if (isLeft) {\n newWidth = this.startWidth - deltaX\n }\n\n // Apply vertical delta\n if (isBottom) {\n newHeight = this.startHeight + deltaY\n } else if (isTop) {\n newHeight = this.startHeight - deltaY\n }\n\n // For pure horizontal/vertical handles, only one dimension changes\n if (direction === 'right' || direction === 'left') {\n newWidth = this.startWidth + (isRight ? deltaX : -deltaX)\n }\n\n if (direction === 'top' || direction === 'bottom') {\n newHeight = this.startHeight + (isBottom ? deltaY : -deltaY)\n }\n\n const shouldPreserveAspectRatio = this.preserveAspectRatio || this.isShiftKeyPressed\n\n if (shouldPreserveAspectRatio) {\n return this.applyAspectRatio(newWidth, newHeight, direction)\n }\n\n return { width: newWidth, height: newHeight }\n }\n\n /**\n * Applies min/max constraints to dimensions.\n *\n * When aspect ratio is NOT preserved, constraints are applied independently\n * to width and height. When aspect ratio IS preserved, constraints are\n * applied while maintaining the aspect ratio—if one dimension hits a limit,\n * the other is recalculated proportionally.\n *\n * This ensures that aspect ratio is never broken when constrained.\n *\n * @param width - The unconstrained width\n * @param height - The unconstrained height\n * @param preserveAspectRatio - Whether to maintain aspect ratio while constraining\n * @returns The constrained dimensions\n */\n private applyConstraints(\n width: number,\n height: number,\n preserveAspectRatio: boolean,\n ): ResizableNodeDimensions {\n if (!preserveAspectRatio) {\n // Independent constraints for each dimension\n let constrainedWidth = Math.max(this.minSize.width, width)\n let constrainedHeight = Math.max(this.minSize.height, height)\n\n if (this.maxSize?.width) {\n constrainedWidth = Math.min(this.maxSize.width, constrainedWidth)\n }\n\n if (this.maxSize?.height) {\n constrainedHeight = Math.min(this.maxSize.height, constrainedHeight)\n }\n\n return { width: constrainedWidth, height: constrainedHeight }\n }\n\n // Aspect-ratio-aware constraints: adjust both dimensions proportionally\n let constrainedWidth = width\n let constrainedHeight = height\n\n // Check minimum constraints\n if (constrainedWidth < this.minSize.width) {\n constrainedWidth = this.minSize.width\n constrainedHeight = constrainedWidth / this.aspectRatio\n }\n\n if (constrainedHeight < this.minSize.height) {\n constrainedHeight = this.minSize.height\n constrainedWidth = constrainedHeight * this.aspectRatio\n }\n\n // Check maximum constraints\n if (this.maxSize?.width && constrainedWidth > this.maxSize.width) {\n constrainedWidth = this.maxSize.width\n constrainedHeight = constrainedWidth / this.aspectRatio\n }\n\n if (this.maxSize?.height && constrainedHeight > this.maxSize.height) {\n constrainedHeight = this.maxSize.height\n constrainedWidth = constrainedHeight * this.aspectRatio\n }\n\n return { width: constrainedWidth, height: constrainedHeight }\n }\n\n /**\n * Adjusts dimensions to maintain the original aspect ratio.\n *\n * For horizontal handles (left/right), uses width as the primary dimension\n * and calculates height from it. For vertical handles (top/bottom), uses\n * height as primary and calculates width. For corner handles, uses width\n * as the primary dimension.\n *\n * @param width - The new width\n * @param height - The new height\n * @param direction - The active resize direction\n * @returns Dimensions adjusted to preserve aspect ratio\n */\n private applyAspectRatio(\n width: number,\n height: number,\n direction: ResizableNodeViewDirection,\n ): ResizableNodeDimensions {\n const isHorizontal = direction === 'left' || direction === 'right'\n const isVertical = direction === 'top' || direction === 'bottom'\n\n if (isHorizontal) {\n // For horizontal resize, width is primary\n return {\n width,\n height: width / this.aspectRatio,\n }\n }\n\n if (isVertical) {\n // For vertical resize, height is primary\n return {\n width: height * this.aspectRatio,\n height,\n }\n }\n\n // For corner resize, width is primary\n return {\n width,\n height: width / this.aspectRatio,\n }\n }\n}\n\n/**\n * Alias for ResizableNodeView to maintain consistent naming.\n * @deprecated Use ResizableNodeView instead - will be removed in future versions.\n */\nexport const ResizableNodeview = ResizableNodeView\n","/**\n * Compare two attribute objects for equality.\n * Handles null/undefined and asserts key presence in both objects so that\n * `{ foo: undefined }` and `{ bar: undefined }` are not treated as equal.\n */\nexport function attrsEqual(\n a: Record | null | undefined,\n b: Record | null | undefined,\n): boolean {\n if (a === b) {\n return true\n }\n if (!a || !b) {\n return false\n }\n\n const keysA = Object.keys(a)\n const keysB = Object.keys(b)\n\n if (keysA.length !== keysB.length) {\n return false\n }\n\n return keysA.every(\n key => Object.prototype.hasOwnProperty.call(b, key) && Object.is(a[key], b[key]),\n )\n}\n","import type { NodeType } from '@tiptap/pm/model'\nimport { type EditorState, NodeSelection } from '@tiptap/pm/state'\n\nexport function canInsertNode(state: EditorState, nodeType: NodeType): boolean {\n const { selection } = state\n const { $from } = selection\n\n // Special handling for NodeSelection\n if (selection instanceof NodeSelection) {\n const index = $from.index()\n const parent = $from.parent\n\n // Can we replace the selected node with the horizontal rule?\n return parent.canReplaceWith(index, index + 1, nodeType)\n }\n\n // Default: check if we can insert at the current position\n let depth = $from.depth\n\n while (depth >= 0) {\n const index = $from.index(depth)\n const parent = $from.node(depth)\n const match = parent.contentMatchAt(index)\n if (match.matchType(nodeType)) {\n return true\n }\n depth -= 1\n }\n return false\n}\n","// source: https://stackoverflow.com/a/6969486\nexport function escapeForRegEx(string: string): string {\n return string.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&')\n}\n","/**\n * Read a CSS property value directly from an element's raw inline `style`\n * attribute, bypassing the CSSOM (e.g. `element.style.fontFamily`) which\n * canonicalizes values and can change formatting. The original format is\n * preserved (quotes, hex vs rgb, etc.).\n *\n * When a property is declared more than once, the last declaration wins —\n * this matches CSS cascade order and is useful when nested spans are merged\n * and the child's value should take priority.\n *\n * Property name comparison is case-insensitive.\n *\n * @param element - The element whose `style` attribute should be read.\n * @param propertyName - The CSS property name (e.g. `font-family`).\n * @returns The raw value string, or `null` if the property is not present.\n *\n * @example\n * ```ts\n * parseHTML: element => getStyleProperty(element, 'font-family')\n * ```\n */\nexport function getStyleProperty(element: HTMLElement, propertyName: string): string | null {\n const styleAttr = element.getAttribute('style')\n\n if (!styleAttr) {\n return null\n }\n\n const decls = styleAttr\n .split(';')\n .map(decl => decl.trim())\n .filter(Boolean)\n\n const target = propertyName.toLowerCase()\n\n for (let i = decls.length - 1; i >= 0; i -= 1) {\n const decl = decls[i]\n const colonIndex = decl.indexOf(':')\n\n if (colonIndex === -1) {\n continue\n }\n\n const prop = decl.slice(0, colonIndex).trim().toLowerCase()\n\n if (prop === target) {\n return decl.slice(colonIndex + 1).trim()\n }\n }\n\n return null\n}\n","/**\n * Decode common HTML entities in text content so they display as literal\n * characters inside the editor. The decode order matters: `&` must be\n * decoded **last** so that doubly-encoded sequences like `&lt;` first\n * survive the `<` pass and then correctly become `<` (not `<`).\n */\nexport function decodeHtmlEntities(text: string): string {\n return text\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/"/g, '\"')\n .replace(/&/g, '&')\n}\n\n/**\n * Encode HTML special characters so they roundtrip safely through markdown.\n * `&` is encoded **first** to avoid double-encoding the ampersand in other\n * entities (e.g. `<` → `<`, not `&lt;`).\n *\n * Note: `\"` is intentionally NOT encoded here because double quotes are\n * ordinary characters in markdown and do not need escaping. The decode\n * function still handles `"` because the markdown tokenizer may emit it.\n */\nexport function encodeHtmlEntities(text: string): string {\n return text.replace(/&/g, '&').replace(//g, '>')\n}\n","/**\n * Detects if the current browser is Firefox.\n * @returns `true` if the browser is Firefox, `false` otherwise.\n * @example\n * if (isFirefox()) {\n * // Firefox-specific handling\n * }\n */\nexport function isFirefox(): boolean {\n return typeof navigator !== 'undefined' ? /Firefox/.test(navigator.userAgent) : false\n}\n","export function isString(value: any): value is string {\n return typeof value === 'string'\n}\n","/**\n * @fileoverview Markdown utilities for creating standardized markdown specs.\n *\n * This module provides utilities for creating complete markdown specifications\n * for different types of nodes using unified syntax patterns.\n */\n\nexport * from './attributeUtils.js'\nexport * from './createAtomBlockMarkdownSpec.js'\nexport * from './createBlockMarkdownSpec.js'\nexport * from './createInlineMarkdownSpec.js'\nexport * from './parseIndentedBlocks.js'\nexport * from './renderNestedMarkdownContent.js'\n","/**\n * @fileoverview Utility functions for parsing and serializing markdown attributes.\n *\n * These utilities handle the common patterns for parsing attribute strings\n * in various markdown syntaxes like Pandoc attributes.\n */\n\n/**\n * Parses a Pandoc-style attribute string into an object.\n *\n * Supports the following patterns:\n * - Classes: `.className` → `{ class: 'className' }`\n * - IDs: `#myId` → `{ id: 'myId' }`\n * - Key-value pairs: `key=\"value\"` → `{ key: 'value' }`\n * - Boolean attributes: `disabled` → `{ disabled: true }`\n *\n * @param attrString - The attribute string to parse\n * @returns Parsed attributes object\n *\n * @example\n * ```ts\n * parseAttributes('.btn #submit disabled type=\"button\"')\n * // → { class: 'btn', id: 'submit', disabled: true, type: 'button' }\n * ```\n */\nexport function parseAttributes(attrString: string): Record {\n if (!attrString?.trim()) {\n return {}\n }\n\n const attributes: Record = {}\n\n // First, extract and remove quoted strings to avoid parsing content inside them\n const quotedStrings: string[] = []\n const tempString = attrString.replace(/[\"']([^\"']*)[\"']/g, match => {\n quotedStrings.push(match)\n return `__QUOTED_${quotedStrings.length - 1}__`\n })\n\n // Parse classes (.className) - only outside of quoted strings\n const classMatches = tempString.match(/(?:^|\\s)\\.([a-zA-Z][\\w-]*)/g)\n if (classMatches) {\n const classes = classMatches.map(match => match.trim().slice(1)) // Remove the dot\n attributes.class = classes.join(' ')\n }\n\n // Parse IDs (#myId) - only outside of quoted strings\n const idMatch = tempString.match(/(?:^|\\s)#([a-zA-Z][\\w-]*)/)\n if (idMatch) {\n attributes.id = idMatch[1]\n }\n\n // Parse key-value pairs (key=\"value\" or key='value') - restore quoted strings\n const kvRegex = /([a-zA-Z][\\w-]*)\\s*=\\s*(__QUOTED_\\d+__)/g\n const kvMatches = Array.from(tempString.matchAll(kvRegex))\n kvMatches.forEach(([, key, quotedRef]) => {\n const quotedIndex = parseInt(quotedRef.match(/__QUOTED_(\\d+)__/)?.[1] || '0', 10)\n const quotedValue = quotedStrings[quotedIndex]\n if (quotedValue) {\n // Remove the outer quotes\n attributes[key] = quotedValue.slice(1, -1)\n }\n })\n\n // Parse boolean attributes (standalone words that aren't classes/IDs)\n const cleanString = tempString\n .replace(/(?:^|\\s)\\.([a-zA-Z][\\w-]*)/g, '') // Remove classes\n .replace(/(?:^|\\s)#([a-zA-Z][\\w-]*)/g, '') // Remove IDs\n .replace(/([a-zA-Z][\\w-]*)\\s*=\\s*__QUOTED_\\d+__/g, '') // Remove key-value pairs\n .trim()\n\n if (cleanString) {\n const booleanAttrs = cleanString.split(/\\s+/).filter(Boolean)\n booleanAttrs.forEach(attr => {\n if (attr.match(/^[a-zA-Z][\\w-]*$/)) {\n attributes[attr] = true\n }\n })\n }\n\n return attributes\n}\n\n/**\n * Serializes an attributes object back to a Pandoc-style attribute string.\n *\n * @param attributes - The attributes object to serialize\n * @returns Serialized attribute string\n *\n * @example\n * ```ts\n * serializeAttributes({ class: 'btn primary', id: 'submit', disabled: true, type: 'button' })\n * // → '.btn.primary #submit disabled type=\"button\"'\n * ```\n */\nexport function serializeAttributes(attributes: Record): string {\n if (!attributes || Object.keys(attributes).length === 0) {\n return ''\n }\n\n const parts: string[] = []\n\n // Handle classes\n if (attributes.class) {\n const classes = String(attributes.class).split(/\\s+/).filter(Boolean)\n classes.forEach(cls => parts.push(`.${cls}`))\n }\n\n // Handle ID\n if (attributes.id) {\n parts.push(`#${attributes.id}`)\n }\n\n // Handle other attributes\n Object.entries(attributes).forEach(([key, value]) => {\n if (key === 'class' || key === 'id') {\n return // Already handled\n }\n\n if (value === true) {\n // Boolean attribute\n parts.push(key)\n } else if (value !== false && value != null) {\n // Key-value attribute\n parts.push(`${key}=\"${String(value)}\"`)\n }\n })\n\n return parts.join(' ')\n}\n","import type {\n JSONContent,\n MarkdownParseHelpers,\n MarkdownParseResult,\n MarkdownToken,\n MarkdownTokenizer,\n} from '../../types.js'\nimport {\n parseAttributes as defaultParseAttributes,\n serializeAttributes as defaultSerializeAttributes,\n} from './attributeUtils.js'\n\nexport interface AtomBlockMarkdownSpecOptions {\n /** The Tiptap node name this spec is for */\n nodeName: string\n /** The markdown syntax name (defaults to nodeName if not provided) */\n name?: string\n /** Function to parse attributes from token attribute string */\n parseAttributes?: (attrString: string) => Record\n /** Function to serialize attributes back to string for rendering */\n serializeAttributes?: (attrs: Record) => string\n /** Default attributes to apply when parsing */\n defaultAttributes?: Record\n /** Required attributes that must be present for successful parsing */\n requiredAttributes?: string[]\n /** Attributes that are allowed to be rendered back to markdown (whitelist) */\n allowedAttributes?: string[]\n}\n\n/**\n * Creates a complete markdown spec for atomic block nodes using Pandoc syntax.\n *\n * The generated spec handles:\n * - Parsing self-closing blocks with `:::blockName {attributes}`\n * - Extracting and parsing attributes\n * - Validating required attributes\n * - Rendering blocks back to markdown\n *\n * @param options - Configuration for the atomic block markdown spec\n * @returns Complete markdown specification object\n *\n * @example\n * ```ts\n * const youtubeSpec = createAtomBlockMarkdownSpec({\n * nodeName: 'youtube',\n * requiredAttributes: ['src'],\n * defaultAttributes: { start: 0 },\n * allowedAttributes: ['src', 'start', 'width', 'height'] // Only these get rendered to markdown\n * })\n *\n * // Usage in extension:\n * export const Youtube = Node.create({\n * // ... other config\n * markdown: youtubeSpec\n * })\n * ```\n */\nexport function createAtomBlockMarkdownSpec(options: AtomBlockMarkdownSpecOptions): {\n parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult\n markdownTokenizer: MarkdownTokenizer\n renderMarkdown: (node: JSONContent) => string\n} {\n const {\n nodeName,\n name: markdownName,\n parseAttributes = defaultParseAttributes,\n serializeAttributes = defaultSerializeAttributes,\n defaultAttributes = {},\n requiredAttributes = [],\n allowedAttributes,\n } = options\n\n // Use markdownName for syntax, fallback to nodeName\n const blockName = markdownName || nodeName\n\n // Helper function to filter attributes based on allowlist\n const filterAttributes = (attrs: Record) => {\n if (!allowedAttributes) {\n return attrs\n }\n\n const filtered: Record = {}\n allowedAttributes.forEach(key => {\n if (key in attrs) {\n filtered[key] = attrs[key]\n }\n })\n return filtered\n }\n\n return {\n parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => {\n const attrs = { ...defaultAttributes, ...token.attributes }\n return h.createNode(nodeName, attrs, [])\n },\n\n markdownTokenizer: {\n name: nodeName,\n level: 'block' as const,\n start(src: string) {\n const regex = new RegExp(`^:::${blockName}(?:\\\\s|$)`, 'm')\n const index = src.match(regex)?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, _tokens, _lexer) {\n // Use non-global regex to match from the start of the string\n // Include optional newline to ensure we consume the entire line\n const regex = new RegExp(`^:::${blockName}(?:\\\\s+\\\\{([^}]*)\\\\})?\\\\s*:::(?:\\\\n|$)`)\n const match = src.match(regex)\n\n if (!match) {\n return undefined\n }\n\n // Parse attributes if present\n const attrString = match[1] || ''\n const attributes = parseAttributes(attrString)\n\n // Validate required attributes\n const missingRequired = requiredAttributes.find(required => !(required in attributes))\n if (missingRequired) {\n return undefined\n }\n\n return {\n type: nodeName,\n raw: match[0],\n attributes,\n }\n },\n },\n\n renderMarkdown: node => {\n const filteredAttrs = filterAttributes(node.attrs || {})\n const attrs = serializeAttributes(filteredAttrs)\n const attrString = attrs ? ` {${attrs}}` : ''\n\n return `:::${blockName}${attrString} :::`\n },\n }\n}\n","import type {\n JSONContent,\n MarkdownParseHelpers,\n MarkdownParseResult,\n MarkdownRendererHelpers,\n MarkdownToken,\n MarkdownTokenizer,\n} from '../../types.js'\nimport {\n parseAttributes as defaultParseAttributes,\n serializeAttributes as defaultSerializeAttributes,\n} from './attributeUtils.js'\n\nexport interface BlockMarkdownSpecOptions {\n /** The Tiptap node name this spec is for */\n nodeName: string\n /** The markdown syntax name (defaults to nodeName if not provided) */\n name?: string\n /** Function to extract content from the node for serialization */\n getContent?: (token: MarkdownToken) => string\n /** Function to parse attributes from the attribute string */\n parseAttributes?: (attrString: string) => Record\n /** Function to serialize attributes to string */\n serializeAttributes?: (attrs: Record) => string\n /** Default attributes to apply when parsing */\n defaultAttributes?: Record\n /** Content type: 'block' allows paragraphs/lists/etc, 'inline' only allows bold/italic/links/etc */\n content?: 'block' | 'inline'\n /** Allowlist of attributes to include in markdown (if not provided, all attributes are included) */\n allowedAttributes?: string[]\n}\n\n/**\n * Creates a complete markdown spec for block-level nodes using Pandoc syntax.\n *\n * The generated spec handles:\n * - Parsing blocks with `:::blockName {attributes}` syntax\n * - Extracting and parsing attributes\n * - Rendering blocks back to markdown with proper formatting\n * - Nested content support\n *\n * @param options - Configuration for the block markdown spec\n * @returns Complete markdown specification object\n *\n * @example\n * ```ts\n * const calloutSpec = createBlockMarkdownSpec({\n * nodeName: 'callout',\n * defaultAttributes: { type: 'info' },\n * allowedAttributes: ['type', 'title'] // Only these get rendered to markdown\n * })\n *\n * // Usage in extension:\n * export const Callout = Node.create({\n * // ... other config\n * markdown: calloutSpec\n * })\n * ```\n */\nexport function createBlockMarkdownSpec(options: BlockMarkdownSpecOptions): {\n parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult\n markdownTokenizer: MarkdownTokenizer\n renderMarkdown: (node: JSONContent, h: MarkdownRendererHelpers) => string\n} {\n const {\n nodeName,\n name: markdownName,\n getContent,\n parseAttributes = defaultParseAttributes,\n serializeAttributes = defaultSerializeAttributes,\n defaultAttributes = {},\n content = 'block',\n allowedAttributes,\n } = options\n\n // Use markdownName for syntax, fallback to nodeName\n const blockName = markdownName || nodeName\n\n // Helper function to filter attributes based on allowlist\n const filterAttributes = (attrs: Record) => {\n if (!allowedAttributes) {\n return attrs\n }\n\n const filtered: Record = {}\n allowedAttributes.forEach(key => {\n if (key in attrs) {\n filtered[key] = attrs[key]\n }\n })\n return filtered\n }\n\n return {\n parseMarkdown: (token, h) => {\n let nodeContent: JSONContent[]\n\n if (getContent) {\n const contentResult = getContent(token)\n // If getContent returns a string, wrap it in a text node\n nodeContent =\n typeof contentResult === 'string'\n ? [{ type: 'text', text: contentResult }]\n : contentResult\n } else if (content === 'block') {\n nodeContent = h.parseChildren(token.tokens || [])\n } else {\n nodeContent = h.parseInline(token.tokens || [])\n }\n\n const attrs = { ...defaultAttributes, ...token.attributes }\n\n return h.createNode(nodeName, attrs, nodeContent)\n },\n\n markdownTokenizer: {\n name: nodeName,\n level: 'block' as const,\n start(src) {\n const regex = new RegExp(`^:::${blockName}`, 'm')\n const index = src.match(regex)?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, _tokens, lexer) {\n // Match the opening tag with optional attributes\n const openingRegex = new RegExp(`^:::${blockName}(?:\\\\s+\\\\{([^}]*)\\\\})?\\\\s*\\\\n`)\n const openingMatch = src.match(openingRegex)\n\n if (!openingMatch) {\n return undefined\n }\n\n const [openingTag, attrString = ''] = openingMatch\n const attributes = parseAttributes(attrString)\n\n // Find the matching closing tag by tracking nesting level\n let level = 1\n const position = openingTag.length\n let matchedContent = ''\n\n // Pattern to match any block opening (:::word) or closing (:::)\n const blockPattern = /^:::([\\w-]*)(\\s.*)?/gm\n const remaining = src.slice(position)\n\n blockPattern.lastIndex = 0\n\n // run until no more matches are found\n for (;;) {\n const match = blockPattern.exec(remaining)\n if (match === null) {\n break\n }\n const matchPos = match.index\n const blockType = match[1] // Empty string for closing tag, block name for opening\n\n if (match[2]?.endsWith(':::')) {\n // this is an atom ::: node, we skip it\n continue\n }\n\n if (blockType) {\n // Opening tag found - increase level\n level += 1\n } else {\n // Closing tag found - decrease level\n level -= 1\n\n if (level === 0) {\n // Found our matching closing tag\n // Don't trim yet - keep newlines for tokenizer regex matching\n const rawContent = remaining.slice(0, matchPos)\n matchedContent = rawContent.trim()\n const fullMatch = src.slice(0, position + matchPos + match[0].length)\n\n // Tokenize the content\n let contentTokens: MarkdownToken[] = []\n if (matchedContent) {\n if (content === 'block') {\n // Use rawContent for tokenization to preserve line boundaries for regex matching\n contentTokens = lexer.blockTokens(rawContent)\n\n // Parse inline tokens for any token that has text content but no tokens\n contentTokens.forEach(token => {\n if (token.text && (!token.tokens || token.tokens.length === 0)) {\n token.tokens = lexer.inlineTokens(token.text)\n }\n })\n\n // Clean up empty trailing paragraphs\n while (contentTokens.length > 0) {\n const lastToken = contentTokens[contentTokens.length - 1]\n if (\n lastToken.type === 'paragraph' &&\n (!lastToken.text || lastToken.text.trim() === '')\n ) {\n contentTokens.pop()\n } else {\n break\n }\n }\n } else {\n contentTokens = lexer.inlineTokens(matchedContent)\n }\n }\n\n return {\n type: nodeName,\n raw: fullMatch,\n attributes,\n content: matchedContent,\n tokens: contentTokens,\n }\n }\n }\n }\n\n // No matching closing tag found\n return undefined\n },\n },\n\n renderMarkdown: (node, h) => {\n const filteredAttrs = filterAttributes(node.attrs || {})\n const attrs = serializeAttributes(filteredAttrs)\n const attrString = attrs ? ` {${attrs}}` : ''\n const renderedContent = h.renderChildren(node.content || [], '\\n\\n')\n\n return `:::${blockName}${attrString}\\n\\n${renderedContent}\\n\\n:::`\n },\n }\n}\n","import type {\n JSONContent,\n MarkdownParseHelpers,\n MarkdownParseResult,\n MarkdownToken,\n MarkdownTokenizer,\n} from '../../types.js'\n\n/**\n * Parse shortcode attributes like 'id=\"madonna\" handle=\"john\" name=\"John Doe\"'\n * Requires all values to be quoted with either single or double quotes\n */\nfunction parseShortcodeAttributes(attrString: string): Record {\n if (!attrString.trim()) {\n return {}\n }\n\n const attributes: Record = {}\n // Match key=value pairs, only accepting quoted values\n const regex = /(\\w+)=(?:\"([^\"]*)\"|'([^']*)')/g\n let match = regex.exec(attrString)\n\n while (match !== null) {\n const [, key, doubleQuoted, singleQuoted] = match\n attributes[key] = doubleQuoted || singleQuoted\n match = regex.exec(attrString)\n }\n\n return attributes\n}\n\n/**\n * Serialize attributes back to shortcode format\n * Always quotes all values with double quotes\n */\nfunction serializeShortcodeAttributes(attrs: Record): string {\n return Object.entries(attrs)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => `${key}=\"${value}\"`)\n .join(' ')\n}\n\n/**\n * Configuration for an allowed attribute in markdown serialization.\n * Can be a simple string (attribute name) or an object with additional options.\n */\nexport type AllowedAttribute =\n | string\n | {\n /** The attribute name */\n name: string\n /**\n * If provided, the attribute will be skipped during serialization when its value\n * equals this default value. This keeps markdown output clean by omitting\n * attributes that have their default values.\n */\n skipIfDefault?: any\n }\n\nexport interface InlineMarkdownSpecOptions {\n /** The Tiptap node name this spec is for */\n nodeName: string\n /** The shortcode name (defaults to nodeName if not provided) */\n name?: string\n /** Function to extract content from the node for serialization */\n getContent?: (node: any) => string\n /** Function to parse attributes from the attribute string */\n parseAttributes?: (attrString: string) => Record\n /** Function to serialize attributes to string */\n serializeAttributes?: (attrs: Record) => string\n /** Default attributes to apply when parsing */\n defaultAttributes?: Record\n /** Whether this is a self-closing shortcode (no content, like [emoji name=party]) */\n selfClosing?: boolean\n /**\n * Allowlist of attributes to include in markdown serialization.\n * If not provided, all attributes are included.\n *\n * Each item can be either:\n * - A string: the attribute name (always included if present)\n * - An object: `{ name: string, skipIfDefault?: any }` for conditional inclusion\n *\n * @example\n * // Simple string attributes (backward compatible)\n * allowedAttributes: ['id', 'label']\n *\n * // Mixed with conditional attributes\n * allowedAttributes: [\n * 'id',\n * 'label',\n * { name: 'mentionSuggestionChar', skipIfDefault: '@' }\n * ]\n */\n allowedAttributes?: AllowedAttribute[]\n}\n\n/**\n * Creates a complete markdown spec for inline nodes using attribute syntax.\n *\n * The generated spec handles:\n * - Parsing shortcode syntax with `[nodeName attributes]content[/nodeName]` format\n * - Self-closing shortcodes like `[emoji name=party_popper]`\n * - Extracting and parsing attributes from the opening tag\n * - Rendering inline elements back to shortcode markdown\n * - Supporting both content-based and self-closing inline elements\n *\n * @param options - Configuration for the inline markdown spec\n * @returns Complete markdown specification object\n *\n * @example\n * ```ts\n * // Self-closing mention: [mention id=\"madonna\" label=\"Madonna\"]\n * const mentionSpec = createInlineMarkdownSpec({\n * nodeName: 'mention',\n * selfClosing: true,\n * defaultAttributes: { type: 'user' },\n * allowedAttributes: ['id', 'label'] // Only these get rendered to markdown\n * })\n *\n * // Self-closing emoji: [emoji name=\"party_popper\"]\n * const emojiSpec = createInlineMarkdownSpec({\n * nodeName: 'emoji',\n * selfClosing: true,\n * allowedAttributes: ['name']\n * })\n *\n * // With content: [highlight color=\"yellow\"]text[/highlight]\n * const highlightSpec = createInlineMarkdownSpec({\n * nodeName: 'highlight',\n * selfClosing: false,\n * allowedAttributes: ['color', 'style']\n * })\n *\n * // Usage in extension:\n * export const Mention = Node.create({\n * name: 'mention', // Must match nodeName\n * // ... other config\n * markdown: mentionSpec\n * })\n * ```\n */\nexport function createInlineMarkdownSpec(options: InlineMarkdownSpecOptions): {\n parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult\n markdownTokenizer: MarkdownTokenizer\n renderMarkdown: (node: JSONContent) => string\n} {\n const {\n nodeName,\n name: shortcodeName,\n getContent,\n parseAttributes = parseShortcodeAttributes,\n serializeAttributes = serializeShortcodeAttributes,\n defaultAttributes = {},\n selfClosing = false,\n allowedAttributes,\n } = options\n\n // Use shortcodeName for markdown syntax, fallback to nodeName\n const shortcode = shortcodeName || nodeName\n\n // Helper function to filter attributes based on allowlist\n const filterAttributes = (attrs: Record) => {\n if (!allowedAttributes) {\n return attrs\n }\n\n const filtered: Record = {}\n allowedAttributes.forEach(attr => {\n // Handle both string and object formats for backward compatibility\n const attrName = typeof attr === 'string' ? attr : attr.name\n const skipIfDefault = typeof attr === 'string' ? undefined : attr.skipIfDefault\n\n if (attrName in attrs) {\n const value = attrs[attrName]\n\n // Skip if value equals the default (when skipIfDefault is specified)\n if (skipIfDefault !== undefined && value === skipIfDefault) {\n return\n }\n\n filtered[attrName] = value\n }\n })\n return filtered\n }\n\n // Escape special regex characters in shortcode name\n const escapedShortcode = shortcode.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\n return {\n parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => {\n const attrs = { ...defaultAttributes, ...token.attributes }\n\n if (selfClosing) {\n // Self-closing nodes like mentions are atomic - no content\n return h.createNode(nodeName, attrs)\n }\n\n // Nodes with content\n const content = getContent ? getContent(token) : token.content || ''\n if (content) {\n // For inline content, create text nodes using the proper helper\n return h.createNode(nodeName, attrs, [h.createTextNode(content)])\n }\n return h.createNode(nodeName, attrs, [])\n },\n\n markdownTokenizer: {\n name: nodeName,\n level: 'inline' as const,\n start(src: string) {\n // Create a non-global version for finding the start position\n const startPattern = selfClosing\n ? new RegExp(`\\\\[${escapedShortcode}\\\\s*[^\\\\]]*\\\\]`)\n : new RegExp(`\\\\[${escapedShortcode}\\\\s*[^\\\\]]*\\\\][\\\\s\\\\S]*?\\\\[\\\\/${escapedShortcode}\\\\]`)\n\n const match = src.match(startPattern)\n const index = match?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, _tokens, _lexer) {\n // Use non-global regex to match from the start of the string\n const tokenPattern = selfClosing\n ? new RegExp(`^\\\\[${escapedShortcode}\\\\s*([^\\\\]]*)\\\\]`)\n : new RegExp(\n `^\\\\[${escapedShortcode}\\\\s*([^\\\\]]*)\\\\]([\\\\s\\\\S]*?)\\\\[\\\\/${escapedShortcode}\\\\]`,\n )\n\n const match = src.match(tokenPattern)\n\n if (!match) {\n return undefined\n }\n\n let content = ''\n let attrString = ''\n\n if (selfClosing) {\n // Self-closing: [shortcode attr=\"value\"]\n const [, attrs] = match\n attrString = attrs\n } else {\n // With content: [shortcode attr=\"value\"]content[/shortcode]\n const [, attrs, contentMatch] = match\n attrString = attrs\n content = contentMatch || ''\n }\n\n // Parse attributes from the attribute string\n const attributes = parseAttributes(attrString.trim())\n\n return {\n type: nodeName,\n raw: match[0],\n content: content.trim(),\n attributes,\n }\n },\n },\n\n renderMarkdown: (node: JSONContent) => {\n let content = ''\n if (getContent) {\n content = getContent(node)\n } else if (node.content && node.content.length > 0) {\n // Extract text from content array for inline nodes\n content = node.content\n .filter((child: any) => child.type === 'text')\n .map((child: any) => child.text)\n .join('')\n }\n\n const filteredAttrs = filterAttributes(node.attrs || {})\n const attrs = serializeAttributes(filteredAttrs)\n const attrString = attrs ? ` ${attrs}` : ''\n\n if (selfClosing) {\n return `[${shortcode}${attrString}]`\n }\n\n return `[${shortcode}${attrString}]${content}[/${shortcode}]`\n },\n }\n}\n","/**\n * @fileoverview Utility for parsing indented markdown blocks with hierarchical nesting.\n *\n * This utility handles the complex logic of parsing markdown blocks that can contain\n * nested content based on indentation levels, maintaining proper hierarchical structure\n * for lists, task lists, and other indented block types.\n */\n\nexport interface ParsedBlock {\n type: string\n raw: string\n mainContent: string\n indentLevel: number\n nestedContent?: string\n nestedTokens?: any[]\n [key: string]: any\n}\n\nexport interface BlockParserConfig {\n /** Regex pattern to match block items */\n itemPattern: RegExp\n /** Function to extract data from regex match */\n extractItemData: (match: RegExpMatchArray) => {\n mainContent: string\n indentLevel: number\n [key: string]: any\n }\n /** Function to create the final token */\n createToken: (data: any, nestedTokens?: any[]) => ParsedBlock\n /** Base indentation to remove from nested content (default: 2 spaces) */\n baseIndentSize?: number\n /**\n * Custom parser for nested content. If provided, this will be called instead\n * of the default lexer.blockTokens() for parsing nested content.\n * This allows recursive parsing of the same block type.\n */\n customNestedParser?: (dedentedContent: string) => any[] | undefined\n}\n\n/**\n * Parses markdown text into hierarchical indented blocks with proper nesting.\n *\n * This utility handles:\n * - Line-by-line parsing with pattern matching\n * - Hierarchical nesting based on indentation levels\n * - Nested content collection and parsing\n * - Empty line handling\n * - Content dedenting for nested blocks\n *\n * The key difference from flat parsing is that this maintains the hierarchical\n * structure where nested items become `nestedTokens` of their parent items,\n * rather than being flattened into a single array.\n *\n * @param src - The markdown source text to parse\n * @param config - Configuration object defining how to parse and create tokens\n * @param lexer - Markdown lexer for parsing nested content\n * @returns Parsed result with hierarchical items, or undefined if no matches\n *\n * @example\n * ```ts\n * const result = parseIndentedBlocks(src, {\n * itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n * extractItemData: (match) => ({\n * indentLevel: match[1].length,\n * mainContent: match[4],\n * checked: match[3].toLowerCase() === 'x'\n * }),\n * createToken: (data, nestedTokens) => ({\n * type: 'taskItem',\n * checked: data.checked,\n * text: data.mainContent,\n * nestedTokens\n * })\n * }, lexer)\n * ```\n */\nexport function parseIndentedBlocks(\n src: string,\n config: BlockParserConfig,\n lexer: {\n inlineTokens: (src: string) => any[]\n blockTokens: (src: string) => any[]\n },\n):\n | {\n items: ParsedBlock[]\n raw: string\n }\n | undefined {\n const lines = src.split('\\n')\n const items: ParsedBlock[] = []\n let totalRaw = ''\n let i = 0\n const baseIndentSize = config.baseIndentSize || 2\n\n while (i < lines.length) {\n const currentLine = lines[i]\n const itemMatch = currentLine.match(config.itemPattern)\n\n if (!itemMatch) {\n // Not a matching item - stop if we have items, otherwise this isn't our block type\n if (items.length > 0) {\n break\n } else if (currentLine.trim() === '') {\n i += 1\n totalRaw = `${totalRaw}${currentLine}\\n`\n continue\n } else {\n return undefined\n }\n }\n\n const itemData = config.extractItemData(itemMatch)\n const { indentLevel, mainContent } = itemData\n totalRaw = `${totalRaw}${currentLine}\\n`\n\n // Collect content for this item (including nested items)\n const itemContent = [mainContent] // Start with the main text\n i += 1\n\n // Look ahead for nested content (indented more than current item)\n while (i < lines.length) {\n const nextLine = lines[i]\n\n if (nextLine.trim() === '') {\n // Empty line - might be end of nested content\n const nextNonEmptyIndex = lines.slice(i + 1).findIndex(l => l.trim() !== '')\n if (nextNonEmptyIndex === -1) {\n // No more content\n break\n }\n\n const nextNonEmpty = lines[i + 1 + nextNonEmptyIndex]\n const nextIndent = nextNonEmpty.match(/^(\\s*)/)?.[1]?.length || 0\n\n if (nextIndent > indentLevel) {\n // Nested content continues after empty line\n itemContent.push(nextLine)\n totalRaw = `${totalRaw}${nextLine}\\n`\n i += 1\n continue\n } else {\n // End of nested content\n break\n }\n }\n\n const nextIndent = nextLine.match(/^(\\s*)/)?.[1]?.length || 0\n\n if (nextIndent > indentLevel) {\n // This is nested content for the current item\n itemContent.push(nextLine)\n totalRaw = `${totalRaw}${nextLine}\\n`\n i += 1\n } else {\n // Same or less indentation - this belongs to parent level\n break\n }\n }\n\n // Parse nested content if present\n let nestedTokens: any[] | undefined\n const nestedContent = itemContent.slice(1)\n\n if (nestedContent.length > 0) {\n // Remove the base indentation from nested content\n const dedentedNested = nestedContent\n .map(nestedLine => nestedLine.slice(indentLevel + baseIndentSize)) // Remove base indent + 2 spaces\n .join('\\n')\n\n if (dedentedNested.trim()) {\n // Use custom nested parser if provided, otherwise fall back to default\n if (config.customNestedParser) {\n nestedTokens = config.customNestedParser(dedentedNested)\n } else {\n nestedTokens = lexer.blockTokens(dedentedNested)\n }\n }\n }\n\n // Create the token using the provided factory function\n const token = config.createToken(itemData, nestedTokens)\n items.push(token)\n }\n\n if (items.length === 0) {\n return undefined\n }\n\n return {\n items,\n raw: totalRaw,\n }\n}\n","import type { JSONContent } from '@tiptap/core'\n\n/**\n * @fileoverview Utility functions for rendering nested content in markdown.\n *\n * This module provides reusable utilities for extensions that need to render\n * content with a prefix on the main line and properly indented nested content.\n */\n\n/**\n * Utility function for rendering content with a main line prefix and nested indented content.\n *\n * This function handles the common pattern of rendering content with:\n * 1. A main line with a prefix (like \"- \" for lists, \"> \" for blockquotes, etc.)\n * 2. Nested content that gets indented properly\n *\n * @param node - The ProseMirror node representing the content\n * @param h - The markdown renderer helper\n * @param prefixOrGenerator - Either a string prefix or a function that generates the prefix from context\n * @param ctx - Optional context object (used when prefixOrGenerator is a function)\n * @returns The rendered markdown string\n *\n * @example\n * ```ts\n * // For a bullet list item with static prefix\n * return renderNestedMarkdownContent(node, h, '- ')\n *\n * // For a task item with static prefix\n * const prefix = `- [${node.attrs?.checked ? 'x' : ' '}] `\n * return renderNestedMarkdownContent(node, h, prefix)\n *\n * // For a blockquote with static prefix\n * return renderNestedMarkdownContent(node, h, '> ')\n *\n * // For content with dynamic prefix based on context\n * return renderNestedMarkdownContent(node, h, ctx => {\n * if (ctx.parentType === 'orderedList') {\n * return `${ctx.index + 1}. `\n * }\n * return '- '\n * }, ctx)\n *\n * // Custom extension example\n * const CustomContainer = Node.create({\n * name: 'customContainer',\n * // ... other config\n * markdown: {\n * render: (node, h) => {\n * const type = node.attrs?.type || 'info'\n * return renderNestedMarkdownContent(node, h, `[${type}] `)\n * }\n * }\n * })\n * ```\n */\nexport function renderNestedMarkdownContent(\n node: JSONContent,\n h: {\n renderChildren: (nodes: JSONContent[]) => string\n renderChild?: (node: JSONContent, index: number) => string\n indent: (text: string) => string\n },\n prefixOrGenerator: string | ((ctx: any) => string),\n ctx?: any,\n): string {\n if (!node || !Array.isArray(node.content)) {\n return ''\n }\n\n // Determine the prefix based on the input\n const prefix =\n typeof prefixOrGenerator === 'function' ? prefixOrGenerator(ctx) : prefixOrGenerator\n\n const [content, ...children] = node.content\n\n // Render the main content (typically a paragraph)\n const mainContent = h.renderChildren([content])\n let output = `${prefix}${mainContent}`\n\n // Handle nested children with proper indentation\n if (children && children.length > 0) {\n children.forEach((child, index) => {\n const childContent = h.renderChild?.(child, index + 1) ?? h.renderChildren([child])\n if (childContent !== undefined && childContent !== null) {\n // Split the child content by lines and indent each line\n const indentedChild = childContent\n .split('\\n')\n .map(line => (line ? h.indent(line) : h.indent('')))\n .join('\\n')\n\n output += child.type === 'paragraph' ? `\\n\\n${indentedChild}` : `\\n${indentedChild}`\n }\n })\n }\n\n return output\n}\n","import { attrsEqual } from './attrsEqual.js'\n\n/**\n * Compare two arrays of mark objects for equality.\n * Marks are compared by type and attributes (using attrsEqual),\n * so key ordering in attrs does not matter.\n */\nexport function marksEqual(\n a: { type: string; attrs?: Record }[],\n b: { type: string; attrs?: Record }[],\n): boolean {\n if (a.length !== b.length) {\n return false\n }\n\n return a.every((mark, i) => {\n const other = b[i]\n return mark.type === other.type && attrsEqual(mark.attrs, other.attrs)\n })\n}\n","import type { Mark } from '@tiptap/pm/model'\nimport type { ViewMutationRecord } from '@tiptap/pm/view'\n\nimport type { Editor } from './Editor.js'\nimport type { MarkViewProps, MarkViewRendererOptions } from './types.js'\nimport { isAndroid, isiOS } from './utilities/index.js'\n\nexport function updateMarkViewAttributes(\n checkMark: Mark,\n editor: Editor,\n attrs: Record = {},\n): void {\n const { state } = editor\n const { doc, tr } = state\n const thisMark = checkMark\n\n doc.descendants((node, pos) => {\n const from = tr.mapping.map(pos)\n const to = tr.mapping.map(pos) + node.nodeSize\n let foundMark: Mark | null = null\n\n // find the mark on the current node\n node.marks.forEach(mark => {\n if (mark !== thisMark) {\n return false\n }\n\n foundMark = mark\n })\n\n if (!foundMark) {\n return\n }\n\n // check if we need to update given the attributes\n let needsUpdate = false\n Object.keys(attrs).forEach(k => {\n if (attrs[k] !== foundMark!.attrs[k]) {\n needsUpdate = true\n }\n })\n\n if (needsUpdate) {\n const updatedMark = checkMark.type.create({\n ...checkMark.attrs,\n ...attrs,\n })\n\n tr.removeMark(from, to, checkMark.type)\n tr.addMark(from, to, updatedMark)\n }\n })\n\n if (tr.docChanged) {\n editor.view.dispatch(tr)\n }\n}\n\nexport class MarkView<\n Component,\n Options extends MarkViewRendererOptions = MarkViewRendererOptions,\n> {\n component: Component\n editor: Editor\n options: Options\n mark: MarkViewProps['mark']\n HTMLAttributes: MarkViewProps['HTMLAttributes']\n\n constructor(component: Component, props: MarkViewProps, options?: Partial) {\n this.component = component\n this.editor = props.editor\n this.options = { ...options } as Options\n this.mark = props.mark\n this.HTMLAttributes = props.HTMLAttributes\n }\n\n get dom(): HTMLElement {\n return this.editor.view.dom\n }\n\n get contentDOM(): HTMLElement | null {\n return null\n }\n\n /**\n * Update the attributes of the mark in the document.\n * @param attrs The attributes to update.\n */\n updateAttributes(attrs: Record, checkMark?: Mark): void {\n updateMarkViewAttributes(checkMark || this.mark, this.editor, attrs)\n }\n\n ignoreMutation(mutation: ViewMutationRecord): boolean {\n if (!this.dom || !this.contentDOM) {\n return true\n }\n\n if (typeof this.options.ignoreMutation === 'function') {\n return this.options.ignoreMutation({ mutation })\n }\n\n if (mutation.type === 'selection') {\n return false\n }\n\n if (\n this.dom.contains(mutation.target) &&\n mutation.type === 'childList' &&\n (isiOS() || isAndroid()) &&\n this.editor.isFocused\n ) {\n const changedNodes = [\n ...Array.from(mutation.addedNodes),\n ...Array.from(mutation.removedNodes),\n ] as HTMLElement[]\n\n if (changedNodes.every(node => node.isContentEditable)) {\n return false\n }\n }\n\n if (this.contentDOM === mutation.target && mutation.type === 'attributes') {\n return true\n }\n\n if (this.contentDOM.contains(mutation.target)) {\n return false\n }\n\n return true\n }\n}\n","import type { DOMOutputSpec, Node as ProseMirrorNode, NodeSpec, NodeType } from '@tiptap/pm/model'\n\nimport type { Editor } from './Editor.js'\nimport type { ExtendableConfig } from './Extendable.js'\nimport { Extendable } from './Extendable.js'\nimport type { Attributes, NodeViewRenderer, ParentConfig } from './types.js'\n\nexport interface NodeConfig extends ExtendableConfig<\n Options,\n Storage,\n NodeConfig,\n NodeType\n> {\n /**\n * Node View\n */\n addNodeView?:\n | ((this: {\n name: string\n options: Options\n storage: Storage\n editor: Editor\n type: NodeType\n parent: ParentConfig>['addNodeView']\n }) => NodeViewRenderer | null)\n | null\n\n /**\n * Defines if this node should be a top level node (doc)\n * @default false\n * @example true\n */\n topNode?: boolean\n\n /**\n * The content expression for this node, as described in the [schema\n * guide](/docs/guide/#schema.content_expressions). When not given,\n * the node does not allow any content.\n *\n * You can read more about it on the Prosemirror documentation here\n * @see https://prosemirror.net/docs/guide/#schema.content_expressions\n * @default undefined\n * @example content: 'block+'\n * @example content: 'headline paragraph block*'\n */\n content?:\n | NodeSpec['content']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['content']\n editor?: Editor\n }) => NodeSpec['content'])\n\n /**\n * The marks that are allowed inside of this node. May be a\n * space-separated string referring to mark names or groups, `\"_\"`\n * to explicitly allow all marks, or `\"\"` to disallow marks. When\n * not given, nodes with inline content default to allowing all\n * marks, other nodes default to not allowing marks.\n *\n * @example marks: 'strong em'\n */\n marks?:\n | NodeSpec['marks']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['marks']\n editor?: Editor\n }) => NodeSpec['marks'])\n\n /**\n * The group or space-separated groups to which this node belongs,\n * which can be referred to in the content expressions for the\n * schema.\n *\n * By default Tiptap uses the groups 'block' and 'inline' for nodes. You\n * can also use custom groups if you want to group specific nodes together\n * and handle them in your schema.\n * @example group: 'block'\n * @example group: 'inline'\n * @example group: 'customBlock' // this uses a custom group\n */\n group?:\n | NodeSpec['group']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['group']\n editor?: Editor\n }) => NodeSpec['group'])\n\n /**\n * Should be set to true for inline nodes. (Implied for text nodes.)\n */\n inline?:\n | NodeSpec['inline']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['inline']\n editor?: Editor\n }) => NodeSpec['inline'])\n\n /**\n * Can be set to true to indicate that, though this isn't a [leaf\n * node](https://prosemirror.net/docs/ref/#model.NodeType.isLeaf), it doesn't have directly editable\n * content and should be treated as a single unit in the view.\n *\n * @example atom: true\n */\n atom?:\n | NodeSpec['atom']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['atom']\n editor?: Editor\n }) => NodeSpec['atom'])\n\n /**\n * Controls whether nodes of this type can be selected as a [node\n * selection](https://prosemirror.net/docs/ref/#state.NodeSelection). Defaults to true for non-text\n * nodes.\n *\n * @default true\n * @example selectable: false\n */\n selectable?:\n | NodeSpec['selectable']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['selectable']\n editor?: Editor\n }) => NodeSpec['selectable'])\n\n /**\n * Determines whether nodes of this type can be dragged without\n * being selected. Defaults to false.\n *\n * @default: false\n * @example: draggable: true\n */\n draggable?:\n | NodeSpec['draggable']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['draggable']\n editor?: Editor\n }) => NodeSpec['draggable'])\n\n /**\n * Can be used to indicate that this node contains code, which\n * causes some commands to behave differently.\n */\n code?:\n | NodeSpec['code']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['code']\n editor?: Editor\n }) => NodeSpec['code'])\n\n /**\n * Controls way whitespace in this a node is parsed. The default is\n * `\"normal\"`, which causes the [DOM parser](https://prosemirror.net/docs/ref/#model.DOMParser) to\n * collapse whitespace in normal mode, and normalize it (replacing\n * newlines and such with spaces) otherwise. `\"pre\"` causes the\n * parser to preserve spaces inside the node. When this option isn't\n * given, but [`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) is true, `whitespace`\n * will default to `\"pre\"`. Note that this option doesn't influence\n * the way the node is rendered—that should be handled by `toDOM`\n * and/or styling.\n */\n whitespace?:\n | NodeSpec['whitespace']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['whitespace']\n editor?: Editor\n }) => NodeSpec['whitespace'])\n\n /**\n * Allows a **single** node to be set as linebreak equivalent (e.g. hardBreak).\n * When converting between block types that have whitespace set to \"pre\"\n * and don't support the linebreak node (e.g. codeBlock) and other block types\n * that do support the linebreak node (e.g. paragraphs) - this node will be used\n * as the linebreak instead of stripping the newline.\n *\n * See [linebreakReplacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement).\n */\n linebreakReplacement?:\n | NodeSpec['linebreakReplacement']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['linebreakReplacement']\n editor?: Editor\n }) => NodeSpec['linebreakReplacement'])\n\n /**\n * When enabled, enables both\n * [`definingAsContext`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext) and\n * [`definingForContent`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).\n *\n * @default false\n * @example isolating: true\n */\n defining?:\n | NodeSpec['defining']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['defining']\n editor?: Editor\n }) => NodeSpec['defining'])\n\n /**\n * When enabled (default is false), the sides of nodes of this type\n * count as boundaries that regular editing operations, like\n * backspacing or lifting, won't cross. An example of a node that\n * should probably have this enabled is a table cell.\n */\n isolating?:\n | NodeSpec['isolating']\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['isolating']\n editor?: Editor\n }) => NodeSpec['isolating'])\n\n /**\n * Associates DOM parser information with this node, which can be\n * used by [`DOMParser.fromSchema`](https://prosemirror.net/docs/ref/#model.DOMParser^fromSchema) to\n * automatically derive a parser. The `node` field in the rules is\n * implied (the name of this node will be filled in automatically).\n * If you supply your own parser, you do not need to also specify\n * parsing rules in your schema.\n *\n * @example parseHTML: [{ tag: 'div', attrs: { 'data-id': 'my-block' } }]\n */\n parseHTML?: (this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['parseHTML']\n editor?: Editor\n }) => NodeSpec['parseDOM']\n\n /**\n * A description of a DOM structure. Can be either a string, which is\n * interpreted as a text node, a DOM node, which is interpreted as\n * itself, a `{dom, contentDOM}` object, or an array.\n *\n * An array describes a DOM element. The first value in the array\n * should be a string—the name of the DOM element, optionally prefixed\n * by a namespace URL and a space. If the second element is plain\n * object, it is interpreted as a set of attributes for the element.\n * Any elements after that (including the 2nd if it's not an attribute\n * object) are interpreted as children of the DOM elements, and must\n * either be valid `DOMOutputSpec` values, or the number zero.\n *\n * The number zero (pronounced “hole”) is used to indicate the place\n * where a node's child nodes should be inserted. If it occurs in an\n * output spec, it should be the only child element in its parent\n * node.\n *\n * @example toDOM: ['div[data-id=\"my-block\"]', { class: 'my-block' }, 0]\n */\n renderHTML?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['renderHTML']\n editor?: Editor\n },\n props: {\n node: ProseMirrorNode\n HTMLAttributes: Record\n },\n ) => DOMOutputSpec)\n | null\n\n /**\n * renders the node as text\n * @example renderText: () => 'foo\n */\n renderText?:\n | ((\n this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['renderText']\n editor?: Editor\n },\n props: {\n node: ProseMirrorNode\n pos: number\n parent: ProseMirrorNode\n index: number\n },\n ) => string)\n | null\n\n /**\n * Add attributes to the node\n * @example addAttributes: () => ({ class: 'foo' })\n */\n addAttributes?: (this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['addAttributes']\n editor?: Editor\n // oxlint-disable-next-lineno-empty-object-type\n }) => Attributes | {}\n}\n\n/**\n * The Node class is used to create custom node extensions.\n * @see https://tiptap.dev/api/extensions#create-a-new-extension\n */\nexport class Node extends Extendable<\n Options,\n Storage,\n NodeConfig\n> {\n type = 'node'\n\n /**\n * Create a new Node instance\n * @param config - Node configuration object or a function that returns a configuration object\n */\n static create(\n config: Partial> | (() => Partial>) = {},\n ) {\n // If the config is a function, execute it to get the configuration object\n const resolvedConfig = typeof config === 'function' ? config() : config\n return new Node(resolvedConfig)\n }\n\n configure(options?: Partial) {\n return super.configure(options) as Node\n }\n\n extend<\n ExtendedOptions = Options,\n ExtendedStorage = Storage,\n ExtendedConfig extends NodeConfig = NodeConfig<\n ExtendedOptions,\n ExtendedStorage\n >,\n >(\n extendedConfig?:\n | (() => Partial)\n | (Partial &\n ThisType<{\n name: string\n options: ExtendedOptions\n storage: ExtendedStorage\n editor: Editor\n type: NodeType\n }>),\n ): Node {\n // If the extended config is a function, execute it to get the configuration object\n const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig\n return super.extend(resolvedConfig) as Node\n }\n}\n","import { NodeSelection } from '@tiptap/pm/state'\nimport type { NodeView as ProseMirrorNodeView, ViewMutationRecord } from '@tiptap/pm/view'\n\nimport type { Editor as CoreEditor } from './Editor.js'\nimport type { DecorationWithType, NodeViewRendererOptions, NodeViewRendererProps } from './types.js'\nimport { isAndroid } from './utilities/isAndroid.js'\nimport { isiOS } from './utilities/isiOS.js'\n\n/**\n * Node views are used to customize the rendered DOM structure of a node.\n * @see https://tiptap.dev/guide/node-views\n */\nexport class NodeView<\n Component,\n NodeEditor extends CoreEditor = CoreEditor,\n Options extends NodeViewRendererOptions = NodeViewRendererOptions,\n> implements ProseMirrorNodeView {\n component: Component\n\n editor: NodeEditor\n\n options: Options\n\n extension: NodeViewRendererProps['extension']\n\n node: NodeViewRendererProps['node']\n\n decorations: NodeViewRendererProps['decorations']\n\n innerDecorations: NodeViewRendererProps['innerDecorations']\n\n view: NodeViewRendererProps['view']\n\n getPos: NodeViewRendererProps['getPos']\n\n HTMLAttributes: NodeViewRendererProps['HTMLAttributes']\n\n isDragging = false\n\n constructor(component: Component, props: NodeViewRendererProps, options?: Partial) {\n this.component = component\n this.editor = props.editor as NodeEditor\n this.options = {\n stopEvent: null,\n ignoreMutation: null,\n ...options,\n } as Options\n this.extension = props.extension\n this.node = props.node\n this.decorations = props.decorations as DecorationWithType[]\n this.innerDecorations = props.innerDecorations\n this.view = props.view\n this.HTMLAttributes = props.HTMLAttributes\n this.getPos = props.getPos\n this.mount()\n }\n\n mount() {\n // oxlint-disable-next-line\n return\n }\n\n get dom(): HTMLElement {\n return this.editor.view.dom as HTMLElement\n }\n\n get contentDOM(): HTMLElement | null {\n return null\n }\n\n onDragStart(event: DragEvent) {\n const { view } = this.editor\n const target = event.target as HTMLElement\n\n // get the drag handle element\n // `closest` is not available for text nodes so we may have to use its parent\n const dragHandle =\n target.nodeType === 3\n ? target.parentElement?.closest('[data-drag-handle]')\n : target.closest('[data-drag-handle]')\n\n if (!this.dom || this.contentDOM?.contains(target) || !dragHandle) {\n return\n }\n\n let x = 0\n let y = 0\n\n // calculate offset for drag element if we use a different drag handle element\n if (this.dom !== dragHandle) {\n const domBox = this.dom.getBoundingClientRect()\n const handleBox = dragHandle.getBoundingClientRect()\n\n // In React, we have to go through nativeEvent to reach offsetX/offsetY.\n const offsetX = event.offsetX ?? (event as any).nativeEvent?.offsetX\n const offsetY = event.offsetY ?? (event as any).nativeEvent?.offsetY\n\n x = handleBox.x - domBox.x + offsetX\n y = handleBox.y - domBox.y + offsetY\n }\n\n const clonedNode = this.dom.cloneNode(true) as HTMLElement\n\n // Preserve the visual size of the original when using the clone as\n // the drag image.\n try {\n const domBox = this.dom.getBoundingClientRect()\n clonedNode.style.width = `${Math.round(domBox.width)}px`\n clonedNode.style.height = `${Math.round(domBox.height)}px`\n clonedNode.style.boxSizing = 'border-box'\n // Ensure the clone doesn't capture pointer events while offscreen\n clonedNode.style.pointerEvents = 'none'\n } catch {\n // ignore measurement errors (e.g. if element not in DOM)\n }\n\n // Some browsers (notably Safari) require the element passed to\n // setDragImage to be present in the DOM. Using a detached node can\n // cause the drag to immediately end.\n let dragImageWrapper: HTMLElement | null = null\n\n try {\n dragImageWrapper = document.createElement('div')\n dragImageWrapper.style.position = 'absolute'\n dragImageWrapper.style.top = '-9999px'\n dragImageWrapper.style.left = '-9999px'\n dragImageWrapper.style.pointerEvents = 'none'\n dragImageWrapper.appendChild(clonedNode)\n document.body.appendChild(dragImageWrapper)\n\n event.dataTransfer?.setDragImage(clonedNode, x, y)\n } finally {\n // Remove the wrapper on the next tick so the browser can use the\n // element as the drag image. A 0ms timeout is enough in practice.\n if (dragImageWrapper) {\n setTimeout(() => {\n try {\n dragImageWrapper?.remove()\n } catch {\n // ignore removal errors\n }\n }, 0)\n }\n }\n\n const pos = this.getPos()\n\n if (typeof pos !== 'number') {\n return\n }\n // we need to tell ProseMirror that we want to move the whole node\n // so we create a NodeSelection\n const selection = NodeSelection.create(view.state.doc, pos)\n const transaction = view.state.tr.setSelection(selection)\n\n view.dispatch(transaction)\n }\n\n stopEvent(event: Event) {\n if (!this.dom) {\n return false\n }\n\n if (typeof this.options.stopEvent === 'function') {\n return this.options.stopEvent({ event })\n }\n\n const target = event.target as HTMLElement\n const isInElement = this.dom.contains(target) && !this.contentDOM?.contains(target)\n\n // any event from child nodes should be handled by ProseMirror\n if (!isInElement) {\n return false\n }\n\n const isDragEvent = event.type.startsWith('drag')\n const isDragOverEnterEvent = event.type === 'dragover' || event.type === 'dragenter'\n const isDropEvent = event.type === 'drop'\n const isInput =\n ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA'].includes(target.tagName) || target.isContentEditable\n\n // any input event within node views should be ignored by ProseMirror\n if (isInput && !isDropEvent && !isDragEvent) {\n return true\n }\n\n const { isEditable } = this.editor\n const { isDragging } = this\n const isDraggable = !!this.node.type.spec.draggable\n const isSelectable = NodeSelection.isSelectable(this.node)\n const isCopyEvent = event.type === 'copy'\n const isPasteEvent = event.type === 'paste'\n const isCutEvent = event.type === 'cut'\n const isClickEvent = event.type === 'mousedown'\n\n // ProseMirror tries to drag selectable nodes\n // even if `draggable` is set to `false`\n // this fix prevents that\n if (!isDraggable && isSelectable && isDragEvent && event.target === this.dom) {\n event.preventDefault()\n }\n\n if (isDraggable && isDragEvent && !isDragging && event.target === this.dom) {\n event.preventDefault()\n return false\n }\n\n // we have to store that dragging started\n if (isDraggable && isEditable && !isDragging && isClickEvent) {\n const dragHandle = target.closest('[data-drag-handle]')\n const isValidDragHandle =\n dragHandle && (this.dom === dragHandle || this.dom.contains(dragHandle))\n\n if (isValidDragHandle) {\n this.isDragging = true\n\n document.addEventListener(\n 'dragend',\n () => {\n this.isDragging = false\n },\n { once: true },\n )\n\n document.addEventListener(\n 'drop',\n () => {\n this.isDragging = false\n },\n { once: true },\n )\n\n document.addEventListener(\n 'mouseup',\n () => {\n this.isDragging = false\n },\n { once: true },\n )\n }\n }\n\n // these events are handled by prosemirror\n if (\n isDragging ||\n isDragOverEnterEvent ||\n isDropEvent ||\n isCopyEvent ||\n isPasteEvent ||\n isCutEvent ||\n (isClickEvent && isSelectable)\n ) {\n return false\n }\n\n return true\n }\n\n /**\n * Called when a DOM [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) or a selection change happens within the view.\n * @return `false` if the editor should re-read the selection or re-parse the range around the mutation\n * @return `true` if it can safely be ignored.\n */\n ignoreMutation(mutation: ViewMutationRecord) {\n if (!this.dom || !this.contentDOM) {\n return true\n }\n\n if (typeof this.options.ignoreMutation === 'function') {\n return this.options.ignoreMutation({ mutation })\n }\n\n // a leaf/atom node is like a black box for ProseMirror\n // and should be fully handled by the node view\n if (this.node.isLeaf || this.node.isAtom) {\n return true\n }\n\n // ProseMirror should handle any selections\n if (mutation.type === 'selection') {\n return false\n }\n\n // try to prevent a bug on iOS and Android that will break node views on enter\n // this is because ProseMirror can’t preventDispatch on enter\n // this will lead to a re-render of the node view on enter\n // see: https://github.com/ueberdosis/tiptap/issues/1214\n // see: https://github.com/ueberdosis/tiptap/issues/2534\n if (\n this.dom.contains(mutation.target) &&\n mutation.type === 'childList' &&\n (isiOS() || isAndroid()) &&\n this.editor.isFocused\n ) {\n const changedNodes = [\n ...Array.from(mutation.addedNodes),\n ...Array.from(mutation.removedNodes),\n ] as HTMLElement[]\n\n // we’ll check if every changed node is contentEditable\n // to make sure it’s probably mutated by ProseMirror\n if (changedNodes.every(node => node.isContentEditable)) {\n return false\n }\n }\n\n // we will allow mutation contentDOM with attributes\n // so we can for example adding classes within our node view\n if (this.contentDOM === mutation.target && mutation.type === 'attributes') {\n return true\n }\n\n // ProseMirror should handle any changes within contentDOM\n if (this.contentDOM.contains(mutation.target)) {\n return false\n }\n\n return true\n }\n\n /**\n * Update the attributes of the prosemirror node.\n */\n updateAttributes(attributes: Record): void {\n this.editor.commands.command(({ tr }) => {\n const pos = this.getPos()\n\n if (typeof pos !== 'number') {\n return false\n }\n\n tr.setNodeMarkup(pos, undefined, {\n ...this.node.attrs,\n ...attributes,\n })\n\n return true\n })\n }\n\n /**\n * Delete the node.\n */\n deleteNode(): void {\n const from = this.getPos()\n\n if (typeof from !== 'number') {\n return\n }\n const to = from + this.node.nodeSize\n\n this.editor.commands.deleteRange({ from, to })\n }\n}\n","import type { MarkType } from '@tiptap/pm/model'\n\nimport { getMarksBetween } from '../helpers/getMarksBetween.js'\nimport type { PasteRuleFinder } from '../PasteRule.js'\nimport { PasteRule } from '../PasteRule.js'\nimport type { ExtendedRegExpMatchArray } from '../types.js'\nimport { callOrReturn } from '../utilities/callOrReturn.js'\n\n/**\n * Build an paste rule that adds a mark when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nexport function markPasteRule(config: {\n find: PasteRuleFinder\n type: MarkType\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record)\n | false\n | null\n}) {\n return new PasteRule({\n find: config.find,\n handler: ({ state, range, match, pasteEvent }) => {\n const attributes = callOrReturn(config.getAttributes, undefined, match, pasteEvent)\n\n if (attributes === false || attributes === null) {\n return null\n }\n\n const { tr } = state\n const captureGroup = match[match.length - 1]\n const fullMatch = match[0]\n let markEnd = range.to\n\n if (captureGroup) {\n const startSpaces = fullMatch.search(/\\S/)\n const textStart = range.from + fullMatch.indexOf(captureGroup)\n const textEnd = textStart + captureGroup.length\n\n const excludedMarks = getMarksBetween(range.from, range.to, state.doc)\n .filter(item => {\n // @ts-ignore\n const excluded = item.mark.type.excluded as MarkType[]\n\n return excluded.find(type => type === config.type && type !== item.mark.type)\n })\n .filter(item => item.to > textStart)\n\n if (excludedMarks.length) {\n return null\n }\n\n if (textEnd < range.to) {\n tr.delete(textEnd, range.to)\n }\n\n if (textStart > range.from) {\n tr.delete(range.from + startSpaces, textStart)\n }\n\n markEnd = range.from + startSpaces + captureGroup.length\n\n tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {}))\n\n // Only remove the stored mark if the match is not at the end of the\n // pasted text. When a mark extends to the end of the content, removing\n // it overrides the mark's `inclusive` behavior and incorrectly places\n // the cursor outside the mark.\n const isMatchAtEndOfText =\n match.index !== undefined &&\n match.input !== undefined &&\n match.index + match[0].length >= match.input.length\n\n if (!isMatchAtEndOfText) {\n tr.removeStoredMark(config.type)\n }\n }\n },\n })\n}\n","import type { NodeType } from '@tiptap/pm/model'\n\nimport type { PasteRuleFinder } from '../PasteRule.js'\nimport { PasteRule } from '../PasteRule.js'\nimport type { ExtendedRegExpMatchArray, JSONContent } from '../types.js'\nimport { callOrReturn } from '../utilities/index.js'\n\n/**\n * Build an paste rule that adds a node when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/api/paste-rules\n */\nexport function nodePasteRule(config: {\n find: PasteRuleFinder\n type: NodeType\n getAttributes?:\n | Record\n | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record)\n | false\n | null\n getContent?: JSONContent[] | ((attrs: Record) => JSONContent[]) | false | null\n}) {\n return new PasteRule({\n find: config.find,\n handler({ match, chain, range, pasteEvent }) {\n const attributes = callOrReturn(config.getAttributes, undefined, match, pasteEvent)\n const content = callOrReturn(config.getContent, undefined, attributes)\n\n if (attributes === false || attributes === null) {\n return null\n }\n\n const node = { type: config.type.name, attrs: attributes } as JSONContent\n\n if (content) {\n node.content = content\n }\n\n if (match.input) {\n chain().deleteRange(range).insertContentAt(range.from, node)\n }\n },\n })\n}\n","import type { PasteRuleFinder } from '../PasteRule.js'\nimport { PasteRule } from '../PasteRule.js'\n\n/**\n * Build an paste rule that replaces text when the\n * matched text is pasted into it.\n * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules\n */\nexport function textPasteRule(config: { find: PasteRuleFinder; replace: string }) {\n return new PasteRule({\n find: config.find,\n handler: ({ state, range, match }) => {\n let insert = config.replace\n let start = range.from\n const end = range.to\n\n if (match[1]) {\n const offset = match[0].lastIndexOf(match[1])\n\n insert += match[0].slice(offset + match[1].length)\n start += offset\n\n const cutOff = start - end\n\n if (cutOff > 0) {\n insert = match[0].slice(offset - cutOff, offset) + insert\n start = end\n }\n }\n\n state.tr.insertText(insert, start, end)\n },\n })\n}\n","import type { Transaction } from '@tiptap/pm/state'\n\nexport interface TrackerResult {\n position: number\n deleted: boolean\n}\n\nexport class Tracker {\n transaction: Transaction\n\n currentStep: number\n\n constructor(transaction: Transaction) {\n this.transaction = transaction\n this.currentStep = this.transaction.steps.length\n }\n\n map(position: number): TrackerResult {\n let deleted = false\n\n const mappedPosition = this.transaction.steps\n .slice(this.currentStep)\n .reduce((newPosition, step) => {\n const mapResult = step.getMap().mapResult(newPosition)\n\n if (mapResult.deleted) {\n deleted = true\n }\n\n return mapResult.pos\n }, position)\n\n return {\n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AAM,MAAM;AAElB,UAAI,MAAM,CAAC,GAAG;AACZ,cAAM,SAAS,MAAM,CAAC,EAAE,YAAY,MAAM,CAAC,CAAC;AAE5C,kBAAU,MAAM,CAAC,EAAE,MAAM,SAAS,MAAM,CAAC,EAAE,MAAM;AACjD,iBAAS;AAET,cAAM,SAAS,QAAQ;AAEvB,YAAI,SAAS,GAAG;AACd,mBAAS,MAAM,CAAC,EAAE,MAAM,SAAS,QAAQ,MAAM,IAAI;AACnD,kBAAQ;AAAA,QACV;AAAA,MACF;AAEA,YAAM,GAAG,WAAW,QAAQ,OAAO,GAAG;AAAA,IACxC;AAAA,EACF,CAAC;AACH;;;AC1BO,IAAM,UAAN,MAAc;AAAA,EAKnB,YAAY,aAA0B;AACpC,SAAK,cAAc;AACnB,SAAK,cAAc,KAAK,YAAY,MAAM;AAAA,EAC5C;AAAA,EAEA,IAAI,UAAiC;AACnC,QAAI,UAAU;AAEd,UAAM,iBAAiB,KAAK,YAAY,MACrC,MAAM,KAAK,WAAW,EACtB,OAAO,CAAC,aAAa,SAAS;AAC7B,YAAM,YAAY,KAAK,OAAO,EAAE,UAAU,WAAW;AAErD,UAAI,UAAU,SAAS;AACrB,kBAAU;AAAA,MACZ;AAEA,aAAO,UAAU;AAAA,IACnB,GAAG,QAAQ;AAEb,WAAO;AAAA,MACL,UAAU;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACF;","names":["command","run","TextSelection","mark","TextSelection","TextSelection","TextSelection","TextSelection","Fragment","Selection","Fragment","isTextSelection","joinPoint","originalCommand","isActive","document","Schema","Schema","DOMParser","DOMParser","Node","Node","node","output","range","NodeSelection","NodeSelection","TextSelection","TextSelection","NodeSelection","TextSelection","NodeSelection","TextSelection","first","Fragment","TextSelection","canSplit","Fragment","newNextTypeAttributes","nextType","TextSelection","canSplit","TextSelection","TextSelection","isActive","isActive","isActive","Fragment","Fragment","Fragment","Plugin","run","Plugin","Fragment","from","to","Plugin","Plugin","_a","_b","_c","Plugin","PluginKey","Plugin","PluginKey","Plugin","PluginKey","Plugin","PluginKey","Plugin","PluginKey","PluginKey","Plugin","Plugin","PluginKey","Selection","Selection","Plugin","PluginKey","tr","Plugin","PluginKey","Plugin","PluginKey","Plugin","PluginKey","Plugin","PluginKey","Plugin","PluginKey","Plugin","PluginKey","style","focus","blur","canJoin","canJoin","Fragment","constrainedWidth","constrainedHeight","NodeSelection","parseAttributes","serializeAttributes","h","parseAttributes","serializeAttributes","h","parseAttributes","serializeAttributes","h","nextIndent","h","Node","NodeSelection","NodeSelection"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs deleted file mode 100644 index 223fdc2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/jsx-runtime.ts -var jsx_runtime_exports = {}; -__export(jsx_runtime_exports, { - Fragment: () => Fragment, - createElement: () => h, - h: () => h, - jsx: () => h, - jsxDEV: () => h, - jsxs: () => h -}); -module.exports = __toCommonJS(jsx_runtime_exports); -function Fragment(props) { - return props.children; -} -var h = (tag, attributes) => { - if (tag === "slot") { - return 0; - } - if (tag instanceof Function) { - return tag(attributes); - } - const { children, ...rest } = attributes != null ? attributes : {}; - if (tag === "svg") { - throw new Error( - "SVG elements are not supported in the JSX syntax, use the array syntax instead" - ); - } - return [tag, rest, children]; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Fragment, - createElement, - h, - jsx, - jsxDEV, - jsxs -}); -//# sourceMappingURL=jsx-runtime.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs.map deleted file mode 100644 index 6104463..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/jsx-runtime.ts"],"sourcesContent":["export type Attributes = Record\n\nexport type DOMOutputSpecElement = 0 | Attributes | DOMOutputSpecArray\n/**\n * Better describes the output of a `renderHTML` function in prosemirror\n * @see https://prosemirror.net/docs/ref/#model.DOMOutputSpec\n */\nexport type DOMOutputSpecArray =\n | [string]\n | [string, Attributes]\n | [string, 0]\n | [string, Attributes, 0]\n | [string, Attributes, DOMOutputSpecArray | 0]\n | [string, DOMOutputSpecArray]\n\n// JSX types for Tiptap's JSX runtime\n// These types only apply when using @jsxImportSource @tiptap/core\n// oxlint-disable-next-lineno-namespace\nexport namespace JSX {\n export type Element = DOMOutputSpecArray\n export interface IntrinsicElements {\n // oxlint-disable-next-lineno-explicit-any\n [key: string]: any\n }\n export interface ElementChildrenAttribute {\n children: unknown\n }\n}\n\nexport type JSXRenderer = (\n tag: 'slot' | string | ((props?: Attributes) => DOMOutputSpecArray | DOMOutputSpecElement),\n props?: Attributes,\n ...children: JSXRenderer[]\n) => DOMOutputSpecArray | DOMOutputSpecElement\n\nexport function Fragment(props: { children: JSXRenderer[] }) {\n return props.children\n}\n\nexport const h: JSXRenderer = (tag, attributes) => {\n // Treat the slot tag as the Prosemirror hole to render content into\n if (tag === 'slot') {\n return 0\n }\n\n // If the tag is a function, call it with the props\n if (tag instanceof Function) {\n return tag(attributes)\n }\n\n const { children, ...rest } = attributes ?? {}\n\n if (tag === 'svg') {\n throw new Error(\n 'SVG elements are not supported in the JSX syntax, use the array syntax instead',\n )\n }\n\n // Otherwise, return the tag, attributes, and children\n return [tag, rest, children]\n}\n\n// See\n// https://esbuild.github.io/api/#jsx-import-source\n// https://www.typescriptlang.org/tsconfig/#jsxImportSource\n\nexport { h as createElement, h as jsx, h as jsxDEV, h as jsxs }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmCO,SAAS,SAAS,OAAoC;AAC3D,SAAO,MAAM;AACf;AAEO,IAAM,IAAiB,CAAC,KAAK,eAAe;AAEjD,MAAI,QAAQ,QAAQ;AAClB,WAAO;AAAA,EACT;AAGA,MAAI,eAAe,UAAU;AAC3B,WAAO,IAAI,UAAU;AAAA,EACvB;AAEA,QAAM,EAAE,UAAU,GAAG,KAAK,IAAI,kCAAc,CAAC;AAE7C,MAAI,QAAQ,OAAO;AACjB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAGA,SAAO,CAAC,KAAK,MAAM,QAAQ;AAC7B;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js deleted file mode 100644 index 69a681b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +++ /dev/null @@ -1,28 +0,0 @@ -// src/jsx-runtime.ts -function Fragment(props) { - return props.children; -} -var h = (tag, attributes) => { - if (tag === "slot") { - return 0; - } - if (tag instanceof Function) { - return tag(attributes); - } - const { children, ...rest } = attributes != null ? attributes : {}; - if (tag === "svg") { - throw new Error( - "SVG elements are not supported in the JSX syntax, use the array syntax instead" - ); - } - return [tag, rest, children]; -}; -export { - Fragment, - h as createElement, - h, - h as jsx, - h as jsxDEV, - h as jsxs -}; -//# sourceMappingURL=jsx-runtime.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map deleted file mode 100644 index 34ce071..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/jsx-runtime.ts"],"sourcesContent":["export type Attributes = Record\n\nexport type DOMOutputSpecElement = 0 | Attributes | DOMOutputSpecArray\n/**\n * Better describes the output of a `renderHTML` function in prosemirror\n * @see https://prosemirror.net/docs/ref/#model.DOMOutputSpec\n */\nexport type DOMOutputSpecArray =\n | [string]\n | [string, Attributes]\n | [string, 0]\n | [string, Attributes, 0]\n | [string, Attributes, DOMOutputSpecArray | 0]\n | [string, DOMOutputSpecArray]\n\n// JSX types for Tiptap's JSX runtime\n// These types only apply when using @jsxImportSource @tiptap/core\n// oxlint-disable-next-lineno-namespace\nexport namespace JSX {\n export type Element = DOMOutputSpecArray\n export interface IntrinsicElements {\n // oxlint-disable-next-lineno-explicit-any\n [key: string]: any\n }\n export interface ElementChildrenAttribute {\n children: unknown\n }\n}\n\nexport type JSXRenderer = (\n tag: 'slot' | string | ((props?: Attributes) => DOMOutputSpecArray | DOMOutputSpecElement),\n props?: Attributes,\n ...children: JSXRenderer[]\n) => DOMOutputSpecArray | DOMOutputSpecElement\n\nexport function Fragment(props: { children: JSXRenderer[] }) {\n return props.children\n}\n\nexport const h: JSXRenderer = (tag, attributes) => {\n // Treat the slot tag as the Prosemirror hole to render content into\n if (tag === 'slot') {\n return 0\n }\n\n // If the tag is a function, call it with the props\n if (tag instanceof Function) {\n return tag(attributes)\n }\n\n const { children, ...rest } = attributes ?? {}\n\n if (tag === 'svg') {\n throw new Error(\n 'SVG elements are not supported in the JSX syntax, use the array syntax instead',\n )\n }\n\n // Otherwise, return the tag, attributes, and children\n return [tag, rest, children]\n}\n\n// See\n// https://esbuild.github.io/api/#jsx-import-source\n// https://www.typescriptlang.org/tsconfig/#jsxImportSource\n\nexport { h as createElement, h as jsx, h as jsxDEV, h as jsxs }\n"],"mappings":";AAmCO,SAAS,SAAS,OAAoC;AAC3D,SAAO,MAAM;AACf;AAEO,IAAM,IAAiB,CAAC,KAAK,eAAe;AAEjD,MAAI,QAAQ,QAAQ;AAClB,WAAO;AAAA,EACT;AAGA,MAAI,eAAe,UAAU;AAC3B,WAAO,IAAI,UAAU;AAAA,EACvB;AAEA,QAAM,EAAE,UAAU,GAAG,KAAK,IAAI,kCAAc,CAAC;AAE7C,MAAI,QAAQ,OAAO;AACjB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAGA,SAAO,CAAC,KAAK,MAAM,QAAQ;AAC7B;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.cjs deleted file mode 100644 index dc486a3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.cjs +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/jsx-runtime/jsx-runtime.cjs') diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.d.cts deleted file mode 100644 index 75d9136..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from '../src/jsx-runtime.ts' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.d.ts deleted file mode 100644 index 644513c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type * from '../src/jsx-runtime.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.js deleted file mode 100644 index 856e5ed..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-dev-runtime/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from '../dist/jsx-runtime/jsx-runtime.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.cjs deleted file mode 100644 index dc486a3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.cjs +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/jsx-runtime/jsx-runtime.cjs') diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.d.cts deleted file mode 100644 index 75d9136..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from '../src/jsx-runtime.ts' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.d.ts deleted file mode 100644 index 5a1c2c9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type * from '../src/jsx-runtime.ts' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.js deleted file mode 100644 index 856e5ed..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/jsx-runtime/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from '../dist/jsx-runtime/jsx-runtime.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/package.json deleted file mode 100644 index 9782f8b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "@tiptap/core", - "version": "3.26.0", - "description": "headless rich text editor", - "keywords": [ - "headless", - "prosemirror", - "text editor", - "tiptap", - "wysiwyg" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/core" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist", - "jsx-runtime", - "jsx-dev-runtime" - ], - "type": "module", - "sideEffects": false, - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "./jsx-runtime": { - "types": { - "import": "./jsx-runtime/index.d.ts", - "require": "./jsx-runtime/index.d.cts" - }, - "import": "./jsx-runtime/index.js", - "require": "./jsx-runtime/index.cjs" - }, - "./jsx-dev-runtime": { - "types": { - "import": "./jsx-dev-runtime/index.d.ts", - "require": "./jsx-dev-runtime/index.d.cts" - }, - "import": "./jsx-dev-runtime/index.js", - "require": "./jsx-dev-runtime/index.cjs" - } - }, - "devDependencies": { - "@tiptap/pm": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/pm": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/CommandManager.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/CommandManager.ts deleted file mode 100644 index 548fe9f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/CommandManager.ts +++ /dev/null @@ -1,149 +0,0 @@ -import type { EditorState, Transaction } from '@tiptap/pm/state' - -import type { Editor } from './Editor.js' -import { createChainableState } from './helpers/createChainableState.js' -import type { - AnyCommands, - CanCommands, - ChainedCommands, - CommandProps, - SingleCommands, -} from './types.js' - -export class CommandManager { - editor: Editor - - rawCommands: AnyCommands - - customState?: EditorState - - constructor(props: { editor: Editor; state?: EditorState }) { - this.editor = props.editor - this.rawCommands = this.editor.extensionManager.commands - this.customState = props.state - } - - get hasCustomState(): boolean { - return !!this.customState - } - - get state(): EditorState { - return this.customState || this.editor.state - } - - get commands(): SingleCommands { - const { rawCommands, editor, state } = this - const { view } = editor - const { tr } = state - const props = this.buildProps(tr) - - return Object.fromEntries( - Object.entries(rawCommands).map(([name, command]) => { - const method = (...args: any[]) => { - const callback = command(...args)(props) - - if (!tr.getMeta('preventDispatch') && !this.hasCustomState) { - view.dispatch(tr) - } - - return callback - } - - return [name, method] - }), - ) as unknown as SingleCommands - } - - get chain(): () => ChainedCommands { - return () => this.createChain() - } - - get can(): () => CanCommands { - return () => this.createCan() - } - - public createChain(startTr?: Transaction, shouldDispatch = true): ChainedCommands { - const { rawCommands, editor, state } = this - const { view } = editor - const callbacks: boolean[] = [] - const hasStartTransaction = !!startTr - const tr = startTr || state.tr - - const run = () => { - if ( - !hasStartTransaction && - shouldDispatch && - !tr.getMeta('preventDispatch') && - !this.hasCustomState - ) { - view.dispatch(tr) - } - - return callbacks.every(callback => callback === true) - } - - const chain = { - ...Object.fromEntries( - Object.entries(rawCommands).map(([name, command]) => { - const chainedCommand = (...args: never[]) => { - const props = this.buildProps(tr, shouldDispatch) - const callback = command(...args)(props) - - callbacks.push(callback) - - return chain - } - - return [name, chainedCommand] - }), - ), - run, - } as unknown as ChainedCommands - - return chain - } - - public createCan(startTr?: Transaction): CanCommands { - const { rawCommands, state } = this - const dispatch = false - const tr = startTr || state.tr - const props = this.buildProps(tr, dispatch) - const formattedCommands = Object.fromEntries( - Object.entries(rawCommands).map(([name, command]) => { - return [name, (...args: never[]) => command(...args)({ ...props, dispatch: undefined })] - }), - ) as unknown as SingleCommands - - return { - ...formattedCommands, - chain: () => this.createChain(tr, dispatch), - } as CanCommands - } - - public buildProps(tr: Transaction, shouldDispatch = true): CommandProps { - const { rawCommands, editor, state } = this - const { view } = editor - - const props: CommandProps = { - tr, - editor, - view, - state: createChainableState({ - state, - transaction: tr, - }), - dispatch: shouldDispatch ? () => undefined : undefined, - chain: () => this.createChain(tr, shouldDispatch), - can: () => this.createCan(tr), - get commands() { - return Object.fromEntries( - Object.entries(rawCommands).map(([name, command]) => { - return [name, (...args: never[]) => command(...args)(props)] - }), - ) as unknown as SingleCommands - }, - } - - return props - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Editor.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Editor.ts deleted file mode 100644 index 640d0a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Editor.ts +++ /dev/null @@ -1,841 +0,0 @@ -/* oslint-disableno-empty-object-type */ -import type { MarkType, Node as ProseMirrorNode, NodeType, Schema } from '@tiptap/pm/model' -import type { Plugin, PluginKey, Transaction } from '@tiptap/pm/state' -import { EditorState } from '@tiptap/pm/state' -import { type DirectEditorProps, EditorView } from '@tiptap/pm/view' - -import { CommandManager } from './CommandManager.js' -import { EventEmitter } from './EventEmitter.js' -import { ExtensionManager } from './ExtensionManager.js' -import { - ClipboardTextSerializer, - Commands, - Delete, - Drop, - Editable, - FocusEvents, - Keymap, - Paste, - Tabindex, - TextDirection, -} from './extensions/index.js' -import { createDocument } from './helpers/createDocument.js' -import { getAttributes } from './helpers/getAttributes.js' -import { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js' -import { getText } from './helpers/getText.js' -import { getTextSerializersFromSchema } from './helpers/getTextSerializersFromSchema.js' -import { isActive } from './helpers/isActive.js' -import { isNodeEmpty } from './helpers/isNodeEmpty.js' -import { createMappablePosition, getUpdatedPosition } from './helpers/MappablePosition.js' -import { resolveFocusPosition } from './helpers/resolveFocusPosition.js' -import type { Storage } from './index.js' -import { NodePos } from './NodePos.js' -import { style } from './style.js' -import type { - CanCommands, - ChainedCommands, - DocumentType, - EditorEvents, - EditorOptions, - NodeType as TNodeType, - SingleCommands, - TextSerializer, - TextType as TTextType, - Utils, -} from './types.js' -import { createStyleTag } from './utilities/createStyleTag.js' -import { isFunction } from './utilities/isFunction.js' - -export * as extensions from './extensions/index.js' - -// @ts-ignore -export interface TiptapEditorHTMLElement extends HTMLElement { - editor?: Editor -} - -export class Editor extends EventEmitter { - private commandManager!: CommandManager - - public extensionManager!: ExtensionManager - - private css: HTMLStyleElement | null = null - - private className = 'tiptap' - - public schema!: Schema - - private editorView: EditorView | null = null - - public isFocused = false - - private destroyed = false - - private editorState!: EditorState - - /** - * The editor is considered initialized after the `create` event has been emitted. - */ - public isInitialized = false - - public extensionStorage: Storage = {} as Storage - - /** - * A unique ID for this editor instance. - */ - public instanceId = Math.random().toString(36).slice(2, 9) - - public options: EditorOptions = { - element: typeof document !== 'undefined' ? document.createElement('div') : null, - content: '', - injectCSS: true, - injectNonce: undefined, - extensions: [], - autofocus: false, - editable: true, - textDirection: undefined, - editorProps: {}, - parseOptions: {}, - coreExtensionOptions: {}, - enableInputRules: true, - enablePasteRules: true, - enableCoreExtensions: true, - enableContentCheck: false, - emitContentError: false, - onBeforeCreate: () => null, - onCreate: () => null, - onMount: () => null, - onUnmount: () => null, - onUpdate: () => null, - onSelectionUpdate: () => null, - onTransaction: () => null, - onFocus: () => null, - onBlur: () => null, - onDestroy: () => null, - onContentError: ({ error }) => { - throw error - }, - onPaste: () => null, - onDrop: () => null, - onDelete: () => null, - enableExtensionDispatchTransaction: true, - } - - constructor(options: Partial = {}) { - super() - this.setOptions(options) - this.createExtensionManager() - this.createCommandManager() - this.createSchema() - this.on('beforeCreate', this.options.onBeforeCreate) - this.emit('beforeCreate', { editor: this }) - this.on('mount', this.options.onMount) - this.on('unmount', this.options.onUnmount) - this.on('contentError', this.options.onContentError) - this.on('create', this.options.onCreate) - this.on('update', this.options.onUpdate) - this.on('selectionUpdate', this.options.onSelectionUpdate) - this.on('transaction', this.options.onTransaction) - this.on('focus', this.options.onFocus) - this.on('blur', this.options.onBlur) - this.on('destroy', this.options.onDestroy) - this.on('drop', ({ event, slice, moved }) => this.options.onDrop(event, slice, moved)) - this.on('paste', ({ event, slice }) => this.options.onPaste(event, slice)) - this.on('delete', this.options.onDelete) - - const initialDoc = this.createDoc() - const selection = resolveFocusPosition(initialDoc, this.options.autofocus) - - // Set editor state immediately, so that it's available independently from the view - this.editorState = EditorState.create({ - doc: initialDoc, - schema: this.schema, - selection: selection || undefined, - }) - - if (this.options.element) { - this.mount(this.options.element) - } - } - - /** - * Attach the editor to the DOM, creating a new editor view. - */ - public mount(el: NonNullable & {}) { - if (typeof document === 'undefined') { - throw new Error( - `[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.`, - ) - } - this.createView(el) - this.emit('mount', { editor: this }) - - if (this.css && !document.head.contains(this.css)) { - document.head.appendChild(this.css) - } - - window.setTimeout(() => { - if (this.isDestroyed) { - return - } - - if (this.options.autofocus !== false && this.options.autofocus !== null) { - this.commands.focus(this.options.autofocus) - } - this.emit('create', { editor: this }) - this.isInitialized = true - }, 0) - } - - /** - * Remove the editor from the DOM, but still allow remounting at a different point in time - */ - public unmount() { - if (this.editorView) { - // Cleanup our reference to prevent circular references which caused memory leaks - // @ts-ignore - const dom = this.editorView.dom as TiptapEditorHTMLElement - - if (dom?.editor) { - delete dom.editor - } - this.editorView.destroy() - } - this.editorView = null - this.isInitialized = false - - // Safely remove CSS element with fallback for test environments - // Only remove CSS if no other editors exist in the document after unmount - if (this.css && !document.querySelectorAll(`.${this.className}`).length) { - try { - if (typeof this.css.remove === 'function') { - this.css.remove() - } else if (this.css.parentNode) { - this.css.parentNode.removeChild(this.css) - } - } catch (error) { - // Silently handle any unexpected DOM removal errors in test environments - console.warn('Failed to remove CSS element:', error) - } - } - this.css = null - this.emit('unmount', { editor: this }) - } - - /** - * Returns the editor storage. - */ - public get storage(): Storage { - return this.extensionStorage - } - - /** - * An object of all registered commands. - */ - public get commands(): SingleCommands { - return this.commandManager.commands - } - - /** - * Create a command chain to call multiple commands at once. - */ - public chain(): ChainedCommands { - return this.commandManager.chain() - } - - /** - * Check if a command or a command chain can be executed. Without executing it. - */ - public can(): CanCommands { - return this.commandManager.can() - } - - /** - * Inject CSS styles. - */ - private injectCSS(): void { - if (this.options.injectCSS && typeof document !== 'undefined') { - this.css = createStyleTag(style, this.options.injectNonce) - } - } - - /** - * Update editor options. - * - * @param options A list of options - */ - public setOptions(options: Partial = {}): void { - this.options = { - ...this.options, - ...options, - } - - if (!this.editorView || !this.state || this.isDestroyed) { - return - } - - if (this.options.editorProps) { - this.view.setProps(this.options.editorProps) - } - - this.view.updateState(this.state) - } - - /** - * Update editable state of the editor. - */ - public setEditable(editable: boolean, emitUpdate = true): void { - this.setOptions({ editable }) - - if (emitUpdate) { - this.emit('update', { editor: this, transaction: this.state.tr, appendedTransactions: [] }) - } - } - - /** - * Returns whether the editor is editable. - */ - public get isEditable(): boolean { - // since plugins are applied after creating the view - // `editable` is always `true` for one tick. - // that’s why we also have to check for `options.editable` - return this.options.editable && this.view && this.view.editable - } - - /** - * Returns the editor view. - */ - public get view(): EditorView { - if (this.editorView) { - return this.editorView - } - - return new Proxy( - { - state: this.editorState, - updateState: (state: EditorState): ReturnType => { - this.editorState = state - }, - dispatch: (tr: Transaction): ReturnType => { - this.dispatchTransaction(tr) - }, - - // Stub some commonly accessed properties to prevent errors - composing: false, - dragging: null, - editable: true, - isDestroyed: false, - } as EditorView, - { - get: (obj, key) => { - if (this.editorView) { - // If the editor view is available, but the caller has a stale reference to the proxy, - // Just return what the editor view has. - return this.editorView[key as keyof EditorView] - } - // Specifically always return the most recent editorState - if (key === 'state') { - return this.editorState - } - if (key in obj) { - return Reflect.get(obj, key) - } - - // We throw an error here, because we know the view is not available - throw new Error( - `[tiptap error]: The editor view is not available. Cannot access view['${key as string}']. The editor may not be mounted yet.`, - ) - }, - }, - ) as EditorView - } - - /** - * Returns the editor state. - */ - public get state(): EditorState { - if (this.editorView) { - this.editorState = this.view.state - } - - return this.editorState - } - - /** - * Register a ProseMirror plugin. - * - * @param plugin A ProseMirror plugin - * @param handlePlugins Control how to merge the plugin into the existing plugins. - * @returns The new editor state - */ - public registerPlugin( - plugin: Plugin, - handlePlugins?: (newPlugin: Plugin, plugins: Plugin[]) => Plugin[], - ): EditorState { - const plugins = isFunction(handlePlugins) - ? handlePlugins(plugin, [...this.state.plugins]) - : [...this.state.plugins, plugin] - - const state = this.state.reconfigure({ plugins }) - - this.view.updateState(state) - - return state - } - - /** - * Unregister a ProseMirror plugin. - * - * @param nameOrPluginKeyToRemove The plugins name - * @returns The new editor state or undefined if the editor is destroyed - */ - public unregisterPlugin( - nameOrPluginKeyToRemove: string | PluginKey | (string | PluginKey)[], - ): EditorState | undefined { - if (this.isDestroyed) { - return undefined - } - - const prevPlugins = this.state.plugins - let plugins = prevPlugins - - ;([] as (string | PluginKey)[]).concat(nameOrPluginKeyToRemove).forEach(nameOrPluginKey => { - // @ts-ignore - const name = typeof nameOrPluginKey === 'string' ? `${nameOrPluginKey}$` : nameOrPluginKey.key - - // @ts-ignore - plugins = plugins.filter(plugin => !plugin.key.startsWith(name)) - }) - - if (prevPlugins.length === plugins.length) { - // No plugin was removed, so we don’t need to update the state - return undefined - } - - const state = this.state.reconfigure({ - plugins, - }) - - this.view.updateState(state) - - return state - } - - /** - * Creates an extension manager. - */ - private createExtensionManager(): void { - const coreExtensions = this.options.enableCoreExtensions - ? [ - Editable, - ClipboardTextSerializer.configure({ - blockSeparator: - this.options.coreExtensionOptions?.clipboardTextSerializer?.blockSeparator, - }), - Commands, - FocusEvents, - Keymap, - Tabindex.configure({ - value: this.options.coreExtensionOptions?.tabindex?.value, - }), - Drop, - Paste, - Delete, - TextDirection.configure({ - direction: this.options.textDirection, - }), - ].filter(ext => { - if (typeof this.options.enableCoreExtensions === 'object') { - return ( - this.options.enableCoreExtensions[ - ext.name as keyof typeof this.options.enableCoreExtensions - ] !== false - ) - } - return true - }) - : [] - const allExtensions = [...coreExtensions, ...this.options.extensions].filter(extension => { - return ['extension', 'node', 'mark'].includes(extension?.type) - }) - - this.extensionManager = new ExtensionManager(allExtensions, this) - } - - /** - * Creates an command manager. - */ - private createCommandManager(): void { - this.commandManager = new CommandManager({ - editor: this, - }) - } - - /** - * Creates a ProseMirror schema. - */ - private createSchema(): void { - this.schema = this.extensionManager.schema - } - - /** - * Creates the initial document. - */ - private createDoc(): ProseMirrorNode { - let doc: ProseMirrorNode - - try { - doc = createDocument(this.options.content, this.schema, this.options.parseOptions, { - errorOnInvalidContent: this.options.enableContentCheck, - }) - } catch (e) { - if ( - !(e instanceof Error) || - !['[tiptap error]: Invalid JSON content', '[tiptap error]: Invalid HTML content'].includes( - e.message, - ) - ) { - // Not the content error we were expecting - throw e - } - this.emit('contentError', { - editor: this, - error: e as Error, - disableCollaboration: () => { - if ( - 'collaboration' in this.storage && - typeof this.storage.collaboration === 'object' && - this.storage.collaboration - ) { - ;(this.storage.collaboration as any).isDisabled = true - } - // To avoid syncing back invalid content, reinitialize the extensions without the collaboration extension - this.options.extensions = this.options.extensions.filter( - extension => extension.name !== 'collaboration', - ) - - // Restart the initialization process by recreating the extension manager with the new set of extensions - this.createExtensionManager() - }, - }) - - // Content is invalid, but attempt to create it anyway, stripping out the invalid parts - doc = createDocument(this.options.content, this.schema, this.options.parseOptions, { - errorOnInvalidContent: false, - }) - } - return doc - } - - /** - * Creates a ProseMirror view. - */ - private createView(element: NonNullable): void { - const { editorProps, enableExtensionDispatchTransaction } = this.options - // If a user provided a custom `dispatchTransaction` through `editorProps`, - // we use that as the base dispatch function. - // Otherwise, we use Tiptap's internal `dispatchTransaction` method. - const baseDispatch = - (editorProps as DirectEditorProps).dispatchTransaction || this.dispatchTransaction.bind(this) - const dispatch = enableExtensionDispatchTransaction - ? this.extensionManager.dispatchTransaction(baseDispatch) - : baseDispatch - - // Compose transformPastedHTML from extensions and user-provided editorProps - const baseTransformPastedHTML = (editorProps as DirectEditorProps).transformPastedHTML - const transformPastedHTML = this.extensionManager.transformPastedHTML(baseTransformPastedHTML) - - this.editorView = new EditorView(element, { - ...editorProps, - attributes: { - // add `role="textbox"` to the editor element - role: 'textbox', - ...editorProps?.attributes, - }, - dispatchTransaction: dispatch, - transformPastedHTML, - state: this.editorState, - markViews: this.extensionManager.markViews, - nodeViews: this.extensionManager.nodeViews, - }) - - // `editor.view` is not yet available at this time. - // Therefore we will add all plugins and node views directly afterwards. - const newState = this.state.reconfigure({ - plugins: this.extensionManager.plugins, - }) - - this.view.updateState(newState) - - this.prependClass() - this.injectCSS() - - // Let’s store the editor instance in the DOM element. - // So we’ll have access to it for tests. - // @ts-ignore - const dom = this.view.dom as TiptapEditorHTMLElement - - dom.editor = this - } - - /** - * Creates all node and mark views. - */ - public createNodeViews(): void { - if (this.view.isDestroyed) { - return - } - - this.view.setProps({ - markViews: this.extensionManager.markViews, - nodeViews: this.extensionManager.nodeViews, - }) - } - - /** - * Prepend class name to element. - */ - public prependClass(): void { - this.view.dom.className = `${this.className} ${this.view.dom.className}` - } - - public isCapturingTransaction = false - - private capturedTransaction: Transaction | null = null - - public captureTransaction(fn: () => void) { - this.isCapturingTransaction = true - fn() - this.isCapturingTransaction = false - - const tr = this.capturedTransaction - - this.capturedTransaction = null - - return tr - } - - /** - * The callback over which to send transactions (state updates) produced by the view. - * - * @param transaction An editor state transaction - */ - private dispatchTransaction(transaction: Transaction): void { - // if the editor / the view of the editor was destroyed - // the transaction should not be dispatched as there is no view anymore. - if (this.view.isDestroyed) { - return - } - - if (this.isCapturingTransaction) { - if (!this.capturedTransaction) { - this.capturedTransaction = transaction - - return - } - - transaction.steps.forEach(step => this.capturedTransaction?.step(step)) - - return - } - - // Apply transaction and get resulting state and transactions - const { state, transactions } = this.state.applyTransaction(transaction) - const selectionHasChanged = !this.state.selection.eq(state.selection) - const rootTrWasApplied = transactions.includes(transaction) - const prevState = this.state - - this.emit('beforeTransaction', { - editor: this, - transaction, - nextState: state, - }) - - // If transaction was filtered out, we can return early - if (!rootTrWasApplied) { - return - } - - this.view.updateState(state) - - // Emit transaction event with appended transactions info - this.emit('transaction', { - editor: this, - transaction, - appendedTransactions: transactions.slice(1), - }) - - if (selectionHasChanged) { - this.emit('selectionUpdate', { - editor: this, - transaction, - }) - } - - // Only emit the latest between focus and blur events - const mostRecentFocusTr = transactions.findLast(tr => tr.getMeta('focus') || tr.getMeta('blur')) - const focus = mostRecentFocusTr?.getMeta('focus') - const blur = mostRecentFocusTr?.getMeta('blur') - - if (focus) { - this.emit('focus', { - editor: this, - event: focus.event, - // oxlint-disable-next-lineno-non-null-assertion - transaction: mostRecentFocusTr!, - }) - } - - if (blur) { - this.emit('blur', { - editor: this, - event: blur.event, - // oxlint-disable-next-lineno-non-null-assertion - transaction: mostRecentFocusTr!, - }) - } - - // Compare states for update event - if ( - transaction.getMeta('preventUpdate') || - !transactions.some(tr => tr.docChanged) || - prevState.doc.eq(state.doc) - ) { - return - } - - this.emit('update', { - editor: this, - transaction, - appendedTransactions: transactions.slice(1), - }) - } - - /** - * Get attributes of the currently selected node or mark. - */ - public getAttributes(nameOrType: string | NodeType | MarkType): Record { - return getAttributes(this.state, nameOrType) - } - - /** - * Returns if the currently selected node or mark is active. - * - * @param name Name of the node or mark - * @param attributes Attributes of the node or mark - */ - public isActive(name: string, attributes?: {}): boolean - public isActive(attributes: {}): boolean - public isActive(nameOrAttributes: string, attributesOrUndefined?: {}): boolean { - const name = typeof nameOrAttributes === 'string' ? nameOrAttributes : null - - const attributes = - typeof nameOrAttributes === 'string' ? attributesOrUndefined : nameOrAttributes - - return isActive(this.state, name, attributes) - } - - /** - * Get the document as JSON. - */ - public getJSON(): DocumentType< - Record | undefined, - TNodeType, any, (TNodeType | TTextType)[]>[] - > { - return this.state.doc.toJSON() - } - - /** - * Get the document as HTML. - */ - public getHTML(): string { - return getHTMLFromFragment(this.state.doc.content, this.schema) - } - - /** - * Get the document as text. - */ - public getText(options?: { - blockSeparator?: string - textSerializers?: Record - }): string { - const { blockSeparator = '\n\n', textSerializers = {} } = options || {} - - return getText(this.state.doc, { - blockSeparator, - textSerializers: { - ...getTextSerializersFromSchema(this.schema), - ...textSerializers, - }, - }) - } - - /** - * Check if there is no content. - */ - public get isEmpty(): boolean { - return isNodeEmpty(this.state.doc) - } - - /** - * Destroy the editor. - */ - public destroy(): void { - if (this.destroyed) { - return - } - - this.destroyed = true - - this.emit('destroy') - - this.unmount() - - this.removeAllListeners() - - this.extensionManager.destroy() - this.extensionManager = null as any - this.schema = null as any - this.commandManager = null as any - this.extensionStorage = {} as Storage - } - - /** - * Check if the editor is already destroyed. - */ - public get isDestroyed(): boolean { - return this.editorView?.isDestroyed ?? true - } - - public $node(selector: string, attributes?: { [key: string]: any }): NodePos | null { - return this.$doc?.querySelector(selector, attributes) || null - } - - public $nodes(selector: string, attributes?: { [key: string]: any }): NodePos[] | null { - return this.$doc?.querySelectorAll(selector, attributes) || null - } - - public $pos(pos: number) { - const $pos = this.state.doc.resolve(pos) - // When the position sits directly before a non-text node (e.g. an image or - // other atom), nodeAfter is that node but resolvedPos.node() would return - // the parent (often the doc at depth 0). Pass nodeAfter as the explicit node - // so NodePos.node returns the expected node instead of the parent. - // Keep $pos(0) returning the doc node; for other positions, prefer nodeAfter - // when it points at a non-text node. - const node = pos > 0 && $pos.nodeAfter && !$pos.nodeAfter.isText ? $pos.nodeAfter : null - - return new NodePos($pos, this, false, node) - } - - get $doc() { - return this.$pos(0) - } - - /** - * Returns a set of utilities for working with positions and ranges. - */ - public utils: Utils = { - getUpdatedPosition, - createMappablePosition, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/EventEmitter.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/EventEmitter.ts deleted file mode 100644 index 2dbe08e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/EventEmitter.ts +++ /dev/null @@ -1,71 +0,0 @@ -type StringKeyOf = Extract -type CallbackType< - T extends Record, - EventName extends StringKeyOf, -> = T[EventName] extends any[] ? T[EventName] : [T[EventName]] -type CallbackFunction, EventName extends StringKeyOf> = ( - ...props: CallbackType -) => any - -export class EventEmitter> { - private callbacks: { [key: string]: Array<(...args: any[]) => void> } = {} - - public on>( - event: EventName, - fn: CallbackFunction, - ): this { - if (!this.callbacks[event]) { - this.callbacks[event] = [] - } - - this.callbacks[event].push(fn) - - return this - } - - public emit>( - event: EventName, - ...args: CallbackType - ): this { - const callbacks = this.callbacks[event] - - if (callbacks) { - callbacks.forEach(callback => callback.apply(this, args)) - } - - return this - } - - public off>( - event: EventName, - fn?: CallbackFunction, - ): this { - const callbacks = this.callbacks[event] - - if (callbacks) { - if (fn) { - this.callbacks[event] = callbacks.filter(callback => callback !== fn) - } else { - delete this.callbacks[event] - } - } - - return this - } - - public once>( - event: EventName, - fn: CallbackFunction, - ): this { - const onceFn = (...args: CallbackType) => { - this.off(event, onceFn) - fn.apply(this, args) - } - - return this.on(event, onceFn) - } - - public removeAllListeners(): void { - this.callbacks = {} - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Extendable.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Extendable.ts deleted file mode 100644 index 0898e2c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Extendable.ts +++ /dev/null @@ -1,615 +0,0 @@ -import type { Plugin } from '@tiptap/pm/state' - -import type { Editor } from './Editor.js' -import { getExtensionField } from './helpers/getExtensionField.js' -import type { ExtensionConfig, MarkConfig, NodeConfig } from './index.js' -import type { InputRule } from './InputRule.js' -import type { Mark } from './Mark.js' -import type { Node } from './Node.js' -import type { PasteRule } from './PasteRule.js' -import type { - AnyConfig, - DispatchTransactionProps, - EditorEvents, - Extensions, - GlobalAttributes, - JSONContent, - KeyboardShortcutCommand, - MarkdownParseHelpers, - MarkdownParseResult, - MarkdownRendererHelpers, - MarkdownToken, - MarkdownTokenizer, - ParentConfig, - RawCommands, - RenderContext, -} from './types.js' -import { callOrReturn } from './utilities/callOrReturn.js' -import { mergeDeep } from './utilities/mergeDeep.js' - -export interface ExtendableConfig< - Options = any, - Storage = any, - Config extends - | ExtensionConfig - | NodeConfig - | MarkConfig - | ExtendableConfig = ExtendableConfig, - PMType = any, -> { - /** - * The extension name - this must be unique. - * It will be used to identify the extension. - * - * @example 'myExtension' - */ - name: string - - /** - * The priority of your extension. The higher, the earlier it will be called - * and will take precedence over other extensions with a lower priority. - * @default 100 - * @example 101 - */ - priority?: number - - /** - * This method will add options to this extension - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#settings - * @example - * addOptions() { - * return { - * myOption: 'foo', - * myOtherOption: 10, - * } - */ - addOptions?: (this: { name: string; parent: ParentConfig['addOptions'] }) => Options - - /** - * The default storage this extension can save data to. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#storage - * @example - * defaultStorage: { - * prefetchedUsers: [], - * loading: false, - * } - */ - addStorage?: (this: { - name: string - options: Options - parent: ParentConfig['addStorage'] - }) => Storage - - /** - * This function adds globalAttributes to specific nodes. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#global-attributes - * @example - * addGlobalAttributes() { - * return [ - * { - // Extend the following extensions - * types: [ - * 'heading', - * 'paragraph', - * ], - * // … with those attributes - * attributes: { - * textAlign: { - * default: 'left', - * renderHTML: attributes => ({ - * style: `text-align: ${attributes.textAlign}`, - * }), - * parseHTML: element => element.style.textAlign || 'left', - * }, - * }, - * }, - * ] - * } - */ - addGlobalAttributes?: (this: { - name: string - options: Options - storage: Storage - extensions: (Node | Mark)[] - parent: ParentConfig['addGlobalAttributes'] - }) => GlobalAttributes - - /** - * This function adds commands to the editor - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#commands - * @example - * addCommands() { - * return { - * myCommand: () => ({ chain }) => chain().setMark('type', 'foo').run(), - * } - * } - */ - addCommands?: (this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['addCommands'] - }) => Partial - - /** - * This function registers keyboard shortcuts. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#keyboard-shortcuts - * @example - * addKeyboardShortcuts() { - * return { - * 'Mod-l': () => this.editor.commands.toggleBulletList(), - * } - * }, - */ - addKeyboardShortcuts?: (this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['addKeyboardShortcuts'] - }) => { - [key: string]: KeyboardShortcutCommand - } - - /** - * This function adds input rules to the editor. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#input-rules - * @example - * addInputRules() { - * return [ - * markInputRule({ - * find: inputRegex, - * type: this.type, - * }), - * ] - * }, - */ - addInputRules?: (this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['addInputRules'] - }) => InputRule[] - - /** - * This function adds paste rules to the editor. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#paste-rules - * @example - * addPasteRules() { - * return [ - * markPasteRule({ - * find: pasteRegex, - * type: this.type, - * }), - * ] - * }, - */ - addPasteRules?: (this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['addPasteRules'] - }) => PasteRule[] - - /** - * This function adds Prosemirror plugins to the editor - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#prosemirror-plugins - * @example - * addProseMirrorPlugins() { - * return [ - * customPlugin(), - * ] - * } - */ - addProseMirrorPlugins?: (this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['addProseMirrorPlugins'] - }) => Plugin[] - - /** - * This function transforms pasted HTML content before it's parsed. - * Extensions can use this to modify or clean up pasted HTML. - * The transformations are chained - each extension's transform receives - * the output from the previous extension's transform. - * @see https://tiptap.dev/docs/editor/guide/custom-extensions#transform-pasted-html - * @example - * transformPastedHTML(html) { - * // Remove all style attributes - * return html.replace(/style="[^"]*"/g, '') - * } - */ - transformPastedHTML?: ( - this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['transformPastedHTML'] - }, - html: string, - ) => string - - /** - * This function adds additional extensions to the editor. This is useful for - * building extension kits. - * @example - * addExtensions() { - * return [ - * BulletList, - * OrderedList, - * ListItem - * ] - * } - */ - addExtensions?: (this: { - name: string - options: Options - storage: Storage - parent: ParentConfig['addExtensions'] - }) => Extensions - - /** - * The markdown token name - * - * This is the name of the token that this extension uses to parse and render markdown and comes from the Marked Lexer. - * - * @see https://github.com/markedjs/marked/blob/master/src/Tokens.ts - * - */ - markdownTokenName?: string - - /** - * The parse function used by the markdown parser to convert markdown tokens to ProseMirror nodes. - */ - parseMarkdown?: (token: MarkdownToken, helpers: MarkdownParseHelpers) => MarkdownParseResult - - /** - * The serializer function used by the markdown serializer to convert ProseMirror nodes to markdown tokens. - */ - renderMarkdown?: ( - node: JSONContent, - helpers: MarkdownRendererHelpers, - ctx: RenderContext, - ) => string - - /** - * The markdown tokenizer responsible for turning a markdown string into tokens - * - * Custom tokenizers are only needed when you want to parse non-standard markdown token. - */ - markdownTokenizer?: MarkdownTokenizer - - /** - * Optional markdown options for indentation - */ - markdownOptions?: { - /** - * Defines if this markdown element should indent it's child elements - */ - indentsContent?: boolean - - /** - * Lets a mark tell the Markdown serializer which inline HTML tags it can - * safely use when plain markdown delimiters would become ambiguous. - * - * This is mainly useful for overlapping marks. For example, bold followed - * by bold+italic followed by italic cannot always be written back with only - * `*` and `**` in a way that still parses correctly. In that case, the - * serializer can close the overlapping section with markdown and reopen the - * remaining tail with HTML instead. - * - * Example: - * - desired formatting: `**123` + `*456*` + `789 italic` - * - serialized result: `**123*456***789` - * - * If your extension defines custom mark names, set `htmlReopen` on that - * extension so the serializer can reuse its HTML form for overlap cases. - */ - htmlReopen?: { - open: string - close: string - } - } - - /** - * This function extends the schema of the node. - * @example - * extendNodeSchema() { - * return { - * group: 'inline', - * selectable: false, - * } - * } - */ - extendNodeSchema?: - | (( - this: { - name: string - options: Options - storage: Storage - parent: ParentConfig['extendNodeSchema'] - }, - extension: Node, - ) => Record) - | null - - /** - * This function extends the schema of the mark. - * @example - * extendMarkSchema() { - * return { - * group: 'inline', - * selectable: false, - * } - * } - */ - extendMarkSchema?: - | (( - this: { - name: string - options: Options - storage: Storage - parent: ParentConfig['extendMarkSchema'] - }, - extension: Mark, - ) => Record) - | null - - /** - * The editor is not ready yet. - */ - onBeforeCreate?: - | (( - this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['onBeforeCreate'] - }, - event: EditorEvents['beforeCreate'], - ) => void) - | null - - /** - * The editor is ready. - */ - onCreate?: - | (( - this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['onCreate'] - }, - event: EditorEvents['create'], - ) => void) - | null - - /** - * The content has changed. - */ - onUpdate?: - | (( - this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['onUpdate'] - }, - event: EditorEvents['update'], - ) => void) - | null - - /** - * The selection has changed. - */ - onSelectionUpdate?: - | (( - this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['onSelectionUpdate'] - }, - event: EditorEvents['selectionUpdate'], - ) => void) - | null - - /** - * The editor state has changed. - */ - onTransaction?: - | (( - this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['onTransaction'] - }, - event: EditorEvents['transaction'], - ) => void) - | null - - /** - * The editor is focused. - */ - onFocus?: - | (( - this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['onFocus'] - }, - event: EditorEvents['focus'], - ) => void) - | null - - /** - * The editor isn’t focused anymore. - */ - onBlur?: - | (( - this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['onBlur'] - }, - event: EditorEvents['blur'], - ) => void) - | null - - /** - * The editor is destroyed. - */ - onDestroy?: - | (( - this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['onDestroy'] - }, - event: EditorEvents['destroy'], - ) => void) - | null - - /** - * This hook allows you to intercept and modify transactions before they are dispatched. - * - * Example - * ```ts - * dispatchTransaction({ transaction, next }) { - * console.log('Dispatching transaction:', transaction) - * next(transaction) - * } - * ``` - * - * @param props - The dispatch transaction props - */ - dispatchTransaction?: - | (( - this: { - name: string - options: Options - storage: Storage - editor: Editor - type: PMType - parent: ParentConfig['dispatchTransaction'] - }, - props: DispatchTransactionProps, - ) => void) - | null -} - -export class Extendable< - Options = any, - Storage = any, - Config = - | ExtensionConfig - | NodeConfig - | MarkConfig, -> { - type = 'extendable' - parent: Extendable | null = null - - child: Extendable | null = null - - name = '' - - config: Config = { - name: this.name, - } as Config - - constructor(config: Partial = {}) { - this.config = { - ...this.config, - ...config, - } - - this.name = (this.config as any).name - } - - get options(): Options { - return { - ...callOrReturn( - getExtensionField(this as any, 'addOptions', { - name: this.name, - }), - ), - } - } - - get storage(): Readonly { - return { - ...callOrReturn( - getExtensionField(this as any, 'addStorage', { - name: this.name, - options: this.options, - }), - ), - } - } - - configure(options: Partial = {}) { - const extension = this.extend({ - ...this.config, - addOptions: () => { - return mergeDeep(this.options as Record, options) as Options - }, - }) - - extension.name = this.name - extension.parent = this.parent - - this.child = null - - return extension - } - - extend< - ExtendedOptions = Options, - ExtendedStorage = Storage, - ExtendedConfig = - | ExtensionConfig - | NodeConfig - | MarkConfig, - >(extendedConfig: Partial = {}): Extendable { - const extension = new (this.constructor as any)({ ...this.config, ...extendedConfig }) - - extension.parent = this - this.child = extension - extension.name = 'name' in extendedConfig ? extendedConfig.name : extension.parent.name - - return extension - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Extension.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Extension.ts deleted file mode 100644 index 03a4306..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Extension.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { Editor } from './Editor.js' -import { type ExtendableConfig, Extendable } from './Extendable.js' - -// oxlint-disable-next-lineno-empty-object-type -export interface ExtensionConfig extends ExtendableConfig< - Options, - Storage, - ExtensionConfig, - null -> {} - -/** - * The Extension class is the base class for all extensions. - * @see https://tiptap.dev/api/extensions#create-a-new-extension - */ -export class Extension extends Extendable< - Options, - Storage, - ExtensionConfig -> { - type = 'extension' - - /** - * Create a new Extension instance - * @param config - Extension configuration object or a function that returns a configuration object - */ - static create( - config: Partial> | (() => Partial>) = {}, - ) { - // If the config is a function, execute it to get the configuration object - const resolvedConfig = typeof config === 'function' ? config() : config - return new Extension(resolvedConfig) - } - - configure(options?: Partial) { - return super.configure(options) as Extension - } - - extend< - ExtendedOptions = Options, - ExtendedStorage = Storage, - ExtendedConfig = ExtensionConfig, - >( - extendedConfig?: - | (() => Partial) - | (Partial & - ThisType<{ - name: string - options: ExtendedOptions - storage: ExtendedStorage - editor: Editor - type: null - }>), - ): Extension { - // If the extended config is a function, execute it to get the configuration object - const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig - return super.extend(resolvedConfig) as Extension - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/ExtensionManager.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/ExtensionManager.ts deleted file mode 100644 index 0ca4791..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/ExtensionManager.ts +++ /dev/null @@ -1,534 +0,0 @@ -import { keymap } from '@tiptap/pm/keymap' -import type { Schema } from '@tiptap/pm/model' -import type { Plugin, Transaction } from '@tiptap/pm/state' -import type { EditorView, MarkViewConstructor, NodeViewConstructor } from '@tiptap/pm/view' - -import type { Editor } from './Editor.js' -import { - flattenExtensions, - getAttributesFromExtensions, - getExtensionField, - getNodeType, - getRenderedAttributes, - getSchemaByResolvedExtensions, - getSchemaTypeByName, - isExtensionRulesEnabled, - resolveExtensions, - sortExtensions, - splitExtensions, -} from './helpers/index.js' -import { - type MarkConfig, - type NodeConfig, - type Storage, - getMarkType, - updateMarkViewAttributes, -} from './index.js' -import { inputRulesPlugin } from './InputRule.js' -import { Mark } from './Mark.js' -import { pasteRulesPlugin } from './PasteRule.js' -import type { AnyConfig, Extensions, RawCommands } from './types.js' -import { callOrReturn } from './utilities/callOrReturn.js' - -export class ExtensionManager { - editor: Editor - - schema: Schema - - /** - * A flattened and sorted array of all extensions - */ - extensions: Extensions - - /** - * A non-flattened array of base extensions (no sub-extensions) - */ - baseExtensions: Extensions - - splittableMarks: string[] = [] - - nonClearableMarks: string[] = [] - - constructor(extensions: Extensions, editor: Editor) { - this.editor = editor - this.baseExtensions = extensions - this.extensions = resolveExtensions(extensions) - this.schema = getSchemaByResolvedExtensions(this.extensions, editor) - this.setupExtensions() - } - - static resolve = resolveExtensions - - static sort = sortExtensions - - static flatten = flattenExtensions - - /** - * Get all commands from the extensions. - * @returns An object with all commands where the key is the command name and the value is the command function - */ - get commands(): RawCommands { - return this.extensions.reduce((commands, extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name as keyof Storage], - editor: this.editor, - type: getSchemaTypeByName(extension.name, this.schema), - } - - const addCommands = getExtensionField( - extension, - 'addCommands', - context, - ) - - if (!addCommands) { - return commands - } - - return { - ...commands, - ...addCommands(), - } - }, {} as RawCommands) - } - - /** - * Get all registered Prosemirror plugins from the extensions. - * @returns An array of Prosemirror plugins - */ - get plugins(): Plugin[] { - const { editor } = this - - // With ProseMirror, first plugins within an array are executed first. - // In Tiptap, we provide the ability to override plugins, - // so it feels more natural to run plugins at the end of an array first. - // That’s why we have to reverse the `extensions` array and sort again - // based on the `priority` option. - const extensions = sortExtensions([...this.extensions].reverse()) - - const allPlugins = extensions.flatMap(extension => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name as keyof Storage], - editor, - type: getSchemaTypeByName(extension.name, this.schema), - } - - const plugins: Plugin[] = [] - - const addKeyboardShortcuts = getExtensionField( - extension, - 'addKeyboardShortcuts', - context, - ) - - let defaultBindings: Record boolean> = {} - - // bind exit handling - if ( - extension.type === 'mark' && - getExtensionField(extension, 'exitable', context) - ) { - defaultBindings.ArrowRight = () => Mark.handleExit({ editor, mark: extension as Mark }) - } - - if (addKeyboardShortcuts) { - const bindings = Object.fromEntries( - Object.entries(addKeyboardShortcuts()).map(([shortcut, method]) => { - return [shortcut, () => method({ editor })] - }), - ) - - defaultBindings = { ...defaultBindings, ...bindings } - } - - const keyMapPlugin = keymap(defaultBindings) - - plugins.push(keyMapPlugin) - - const addInputRules = getExtensionField( - extension, - 'addInputRules', - context, - ) - - if (isExtensionRulesEnabled(extension, editor.options.enableInputRules) && addInputRules) { - const rules = addInputRules() - - if (rules && rules.length) { - const inputResult = inputRulesPlugin({ - editor, - rules, - }) - - const inputPlugins = Array.isArray(inputResult) ? inputResult : [inputResult] - - plugins.push(...inputPlugins) - } - } - - const addPasteRules = getExtensionField( - extension, - 'addPasteRules', - context, - ) - - if (isExtensionRulesEnabled(extension, editor.options.enablePasteRules) && addPasteRules) { - const rules = addPasteRules() - - if (rules && rules.length) { - const pasteRules = pasteRulesPlugin({ editor, rules }) - - plugins.push(...pasteRules) - } - } - - const addProseMirrorPlugins = getExtensionField( - extension, - 'addProseMirrorPlugins', - context, - ) - - if (addProseMirrorPlugins) { - const proseMirrorPlugins = addProseMirrorPlugins() - - plugins.push(...proseMirrorPlugins) - } - - return plugins - }) - - return allPlugins - } - - /** - * Get all attributes from the extensions. - * @returns An array of attributes - */ - get attributes() { - return getAttributesFromExtensions(this.extensions) - } - - /** - * Get all node views from the extensions. - * @returns An object with all node views where the key is the node name and the value is the node view function - */ - get nodeViews(): Record { - const { editor } = this - const { nodeExtensions } = splitExtensions(this.extensions) - - return Object.fromEntries( - nodeExtensions - .filter(extension => !!getExtensionField(extension, 'addNodeView')) - .map(extension => { - const extensionAttributes = this.attributes.filter( - attribute => attribute.type === extension.name, - ) - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name as keyof Storage], - editor, - type: getNodeType(extension.name, this.schema), - } - const addNodeView = getExtensionField( - extension, - 'addNodeView', - context, - ) - - if (!addNodeView) { - return [] - } - - const nodeViewResult = addNodeView() - - if (!nodeViewResult) { - return [] - } - - const nodeview: NodeViewConstructor = ( - node, - view, - getPos, - decorations, - innerDecorations, - ) => { - const HTMLAttributes = getRenderedAttributes(node, extensionAttributes) - - return nodeViewResult({ - // pass-through - node, - view, - getPos: getPos as () => number, - decorations, - innerDecorations, - // tiptap-specific - editor, - extension, - HTMLAttributes, - }) - } - - return [extension.name, nodeview] - }), - ) - } - - /** - * Get the composed dispatchTransaction function from all extensions. - * @param baseDispatch The base dispatch function (e.g. from the editor or user props) - * @returns A composed dispatch function - */ - dispatchTransaction(baseDispatch: (tr: Transaction) => void): (tr: Transaction) => void { - const { editor } = this - const extensions = sortExtensions([...this.extensions].reverse()) - - return extensions.reduceRight((next, extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name as keyof Storage], - editor, - type: getSchemaTypeByName(extension.name, this.schema), - } - - const dispatchTransaction = getExtensionField( - extension, - 'dispatchTransaction', - context, - ) - - if (!dispatchTransaction) { - return next - } - - return (transaction: Transaction) => { - dispatchTransaction.call(context, { transaction, next }) - } - }, baseDispatch) - } - - /** - * Get the composed transformPastedHTML function from all extensions. - * @param baseTransform The base transform function (e.g. from the editor props) - * @returns A composed transform function that chains all extension transforms - */ - transformPastedHTML( - baseTransform?: (html: string, view?: any) => string, - ): (html: string, view?: EditorView) => string { - const { editor } = this - const extensions = sortExtensions([...this.extensions]) - - return extensions.reduce( - (transform, extension) => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name as keyof Storage], - editor, - type: getSchemaTypeByName(extension.name, this.schema), - } - - const extensionTransform = getExtensionField( - extension, - 'transformPastedHTML', - context, - ) - - if (!extensionTransform) { - return transform - } - - return (html: string, view?: any) => { - // Chain the transforms: pass the result of the previous transform to the next - const transformedHtml = transform(html, view) - return extensionTransform.call(context, transformedHtml) - } - }, - baseTransform || ((html: string) => html), - ) - } - - get markViews(): Record { - const { editor } = this - const { markExtensions } = splitExtensions(this.extensions) - - return Object.fromEntries( - markExtensions - .filter(extension => !!getExtensionField(extension, 'addMarkView')) - .map(extension => { - const extensionAttributes = this.attributes.filter( - attribute => attribute.type === extension.name, - ) - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name as keyof Storage], - editor, - type: getMarkType(extension.name, this.schema), - } - const addMarkView = getExtensionField( - extension, - 'addMarkView', - context, - ) - - if (!addMarkView) { - return [] - } - - const markView: MarkViewConstructor = (mark, view, inline) => { - const HTMLAttributes = getRenderedAttributes(mark, extensionAttributes) - - return addMarkView()({ - // pass-through - mark, - view, - inline, - // tiptap-specific - editor, - extension, - HTMLAttributes, - updateAttributes: (attrs: Record) => { - updateMarkViewAttributes(mark, editor, attrs) - }, - }) - } - - return [extension.name, markView] - }), - ) - } - - /** - * Destroy the extension manager and clean up all extension references - * to prevent memory leaks through parent/child extension chains. - * - * Walks each extension's full parent chain and nulls every forward - * `parent.child → current` link where the parent still points to the - * current node. This breaks the retention path from module-scope - * singleton roots through deep extend() chains. - * - * Only ancestor `.child` links matching the current chain are cleared. - * The `.parent` pointer on ancestors is never touched — extensions - * may be shared across live editors, so their own backward references - * and non-matching forward links must remain intact. - */ - destroy() { - this.extensions.forEach(extension => { - let current: any = extension - - while (current.parent) { - const parent = current.parent - - if (parent.child === current) { - parent.child = null - } - - current = parent - } - }) - - this.extensions = [] - this.baseExtensions = [] - this.schema = null as any - this.editor = null as any - } - - /** - * Go through all extensions, create extension storages & setup marks - * & bind editor event listener. - */ - private setupExtensions() { - const extensions = this.extensions - // re-initialize the extension storage object instance - this.editor.extensionStorage = Object.fromEntries( - extensions.map(extension => [extension.name, extension.storage]), - ) as unknown as Storage - - extensions.forEach(extension => { - const context = { - name: extension.name, - options: extension.options, - storage: this.editor.extensionStorage[extension.name as keyof Storage], - editor: this.editor, - type: getSchemaTypeByName(extension.name, this.schema), - } - - if (extension.type === 'mark') { - const keepOnSplit = - callOrReturn(getExtensionField(extension, 'keepOnSplit', context)) ?? true - - if (keepOnSplit) { - this.splittableMarks.push(extension.name) - } - - const clearable = - callOrReturn( - getExtensionField(extension, 'clearable', context), - ) ?? true - - if (!clearable) { - this.nonClearableMarks.push(extension.name) - } - } - - const onBeforeCreate = getExtensionField( - extension, - 'onBeforeCreate', - context, - ) - const onCreate = getExtensionField(extension, 'onCreate', context) - const onUpdate = getExtensionField(extension, 'onUpdate', context) - const onSelectionUpdate = getExtensionField( - extension, - 'onSelectionUpdate', - context, - ) - const onTransaction = getExtensionField( - extension, - 'onTransaction', - context, - ) - const onFocus = getExtensionField(extension, 'onFocus', context) - const onBlur = getExtensionField(extension, 'onBlur', context) - const onDestroy = getExtensionField(extension, 'onDestroy', context) - - if (onBeforeCreate) { - this.editor.on('beforeCreate', onBeforeCreate) - } - - if (onCreate) { - this.editor.on('create', onCreate) - } - - if (onUpdate) { - this.editor.on('update', onUpdate) - } - - if (onSelectionUpdate) { - this.editor.on('selectionUpdate', onSelectionUpdate) - } - - if (onTransaction) { - this.editor.on('transaction', onTransaction) - } - - if (onFocus) { - this.editor.on('focus', onFocus) - } - - if (onBlur) { - this.editor.on('blur', onBlur) - } - - if (onDestroy) { - this.editor.on('destroy', onDestroy) - } - }) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/InputRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/InputRule.ts deleted file mode 100644 index f43dd5e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/InputRule.ts +++ /dev/null @@ -1,301 +0,0 @@ -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' -import { Fragment } from '@tiptap/pm/model' -import type { EditorState, TextSelection } from '@tiptap/pm/state' -import { Plugin } from '@tiptap/pm/state' - -import { CommandManager } from './CommandManager.js' -import type { Editor } from './Editor.js' -import { createChainableState } from './helpers/createChainableState.js' -import { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js' -import { getTextContentFromNodes } from './helpers/getTextContentFromNodes.js' -import type { - CanCommands, - ChainedCommands, - ExtendedRegExpMatchArray, - Range, - SingleCommands, -} from './types.js' -import { isRegExp } from './utilities/isRegExp.js' - -export type InputRuleMatch = { - index: number - text: string - replaceWith?: string - match?: RegExpMatchArray - data?: Record -} - -export type InputRuleFinder = RegExp | ((text: string) => InputRuleMatch | null) - -export class InputRule { - find: InputRuleFinder - - handler: (props: { - state: EditorState - range: Range - match: ExtendedRegExpMatchArray - commands: SingleCommands - chain: () => ChainedCommands - can: () => CanCommands - }) => void | null - - undoable: boolean - - constructor(config: { - find: InputRuleFinder - handler: (props: { - state: EditorState - range: Range - match: ExtendedRegExpMatchArray - commands: SingleCommands - chain: () => ChainedCommands - can: () => CanCommands - }) => void | null - undoable?: boolean - }) { - this.find = config.find - this.handler = config.handler - this.undoable = config.undoable ?? true - } -} - -const inputRuleMatcherHandler = ( - text: string, - find: InputRuleFinder, -): ExtendedRegExpMatchArray | null => { - if (isRegExp(find)) { - return find.exec(text) - } - - const inputRuleMatch = find(text) - - if (!inputRuleMatch) { - return null - } - - const result: ExtendedRegExpMatchArray = [inputRuleMatch.text] - - result.index = inputRuleMatch.index - result.input = text - result.data = inputRuleMatch.data - - if (inputRuleMatch.replaceWith) { - if (!inputRuleMatch.text.includes(inputRuleMatch.replaceWith)) { - console.warn( - '[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".', - ) - } - - result.push(inputRuleMatch.replaceWith) - } - - return result -} - -function run(config: { - editor: Editor - from: number - to: number - text: string - rules: InputRule[] - plugin: Plugin -}): boolean { - const { editor, from, to, text, rules, plugin } = config - const { view } = editor - - if (view.composing) { - return false - } - - const $from = view.state.doc.resolve(from) - - if ( - // check for code node - $from.parent.type.spec.code || - // check for code mark - !!($from.nodeBefore || $from.nodeAfter)?.marks.find(mark => mark.type.spec.code) - ) { - return false - } - - let matched = false - - const textBefore = getTextContentFromNodes($from) + text - - rules.forEach(rule => { - if (matched) { - return - } - - const match = inputRuleMatcherHandler(textBefore, rule.find) - - if (!match) { - return - } - - const tr = view.state.tr - const state = createChainableState({ - state: view.state, - transaction: tr, - }) - const range = { - from: from - (match[0].length - text.length), - to, - } - - const { commands, chain, can } = new CommandManager({ - editor, - state, - }) - - const handler = rule.handler({ - state, - range, - match, - commands, - chain, - can, - }) - - // stop if there are no changes - if (handler === null || !tr.steps.length) { - return - } - - // store transform as meta data - // so we can undo input rules within the `undoInputRules` command - if (rule.undoable) { - tr.setMeta(plugin, { - transform: tr, - from, - to, - text, - }) - } - - view.dispatch(tr) - matched = true - }) - - return matched -} - -/** - * Create an input rules plugin. When enabled, it will cause text - * input that matches any of the given rules to trigger the rule’s - * action. - */ -export function inputRulesPlugin(props: { editor: Editor; rules: InputRule[] }): Plugin { - const { editor, rules } = props - const plugin = new Plugin({ - state: { - init() { - return null - }, - apply(tr, prev, state) { - const stored = tr.getMeta(plugin) - - if (stored) { - return stored - } - - // if InputRule is triggered by insertContent() - const simulatedInputMeta = tr.getMeta('applyInputRules') as - | undefined - | { - from: number - text: string | ProseMirrorNode | Fragment - } - const isSimulatedInput = !!simulatedInputMeta - - if (isSimulatedInput) { - setTimeout(() => { - let { text } = simulatedInputMeta - - if (typeof text === 'string') { - text = text as string - } else { - text = getHTMLFromFragment(Fragment.from(text), state.schema) - } - - const { from } = simulatedInputMeta - const to = from + text.length - - run({ - editor, - from, - to, - text, - rules, - plugin, - }) - }) - } - - return tr.selectionSet || tr.docChanged ? null : prev - }, - }, - - props: { - handleTextInput(view, from, to, text) { - return run({ - editor, - from, - to, - text, - rules, - plugin, - }) - }, - - handleDOMEvents: { - compositionend: view => { - setTimeout(() => { - const { $cursor } = view.state.selection as TextSelection - - if ($cursor) { - run({ - editor, - from: $cursor.pos, - to: $cursor.pos, - text: '', - rules, - plugin, - }) - } - }) - - return false - }, - }, - - // add support for input rules to trigger on enter - // this is useful for example for code blocks - handleKeyDown(view, event) { - if (event.key !== 'Enter') { - return false - } - - const { $cursor } = view.state.selection as TextSelection - - if ($cursor) { - return run({ - editor, - from: $cursor.pos, - to: $cursor.pos, - text: '\n', - rules, - plugin, - }) - } - - return false - }, - }, - - // @ts-ignore - isInputRules: true, - }) as Plugin - - return plugin -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Mark.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Mark.ts deleted file mode 100644 index cf4a78f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Mark.ts +++ /dev/null @@ -1,231 +0,0 @@ -import type { DOMOutputSpec, Mark as ProseMirrorMark, MarkSpec, MarkType } from '@tiptap/pm/model' - -import type { Editor } from './Editor.js' -import type { ExtendableConfig } from './Extendable.js' -import { Extendable } from './Extendable.js' -import type { Attributes, MarkViewRenderer, ParentConfig } from './types.js' - -export interface MarkConfig extends ExtendableConfig< - Options, - Storage, - MarkConfig, - MarkType -> { - /** - * Mark View - */ - addMarkView?: - | ((this: { - name: string - options: Options - storage: Storage - editor: Editor - type: MarkType - parent: ParentConfig>['addMarkView'] - }) => MarkViewRenderer) - | null - - /** - * Keep mark after split node - */ - keepOnSplit?: boolean | (() => boolean) - - /** - * Whether this mark is removed by `unsetAllMarks`. - * Set to `false` for semantic marks (comments, suggestions) that should survive "clear formatting". - * @default true - */ - clearable?: boolean | (() => boolean) - - /** - * Inclusive - */ - inclusive?: - | MarkSpec['inclusive'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['inclusive'] - editor?: Editor - }) => MarkSpec['inclusive']) - - /** - * Excludes - */ - excludes?: - | MarkSpec['excludes'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['excludes'] - editor?: Editor - }) => MarkSpec['excludes']) - - /** - * Marks this Mark as exitable - */ - exitable?: boolean | (() => boolean) - - /** - * Group - */ - group?: - | MarkSpec['group'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['group'] - editor?: Editor - }) => MarkSpec['group']) - - /** - * Spanning - */ - spanning?: - | MarkSpec['spanning'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['spanning'] - editor?: Editor - }) => MarkSpec['spanning']) - - /** - * Code - */ - code?: - | boolean - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['code'] - editor?: Editor - }) => boolean) - - /** - * Parse HTML - */ - parseHTML?: (this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['parseHTML'] - editor?: Editor - }) => MarkSpec['parseDOM'] - - /** - * Render HTML - */ - renderHTML?: - | (( - this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['renderHTML'] - editor?: Editor - }, - props: { - mark: ProseMirrorMark - HTMLAttributes: Record - }, - ) => DOMOutputSpec) - | null - - /** - * Attributes - */ - addAttributes?: (this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['addAttributes'] - editor?: Editor - // oxlint-disable-next-lineno-empty-object-type - }) => Attributes | {} -} - -/** - * The Mark class is used to create custom mark extensions. - * @see https://tiptap.dev/api/extensions#create-a-new-extension - */ -export class Mark extends Extendable< - Options, - Storage, - MarkConfig -> { - type = 'mark' - - /** - * Create a new Mark instance - * @param config - Mark configuration object or a function that returns a configuration object - */ - static create( - config: Partial> | (() => Partial>) = {}, - ) { - // If the config is a function, execute it to get the configuration object - const resolvedConfig = typeof config === 'function' ? config() : config - return new Mark(resolvedConfig) - } - - static handleExit({ editor, mark }: { editor: Editor; mark: Mark }) { - const { tr } = editor.state - const currentPos = editor.state.selection.$from - const isAtEnd = currentPos.pos === currentPos.end() - - if (isAtEnd) { - const currentMarks = currentPos.marks() - const isInMark = !!currentMarks.find(m => m?.type.name === mark.name) - - if (!isInMark) { - return false - } - - const removeMark = currentMarks.find(m => m?.type.name === mark.name) - - if (removeMark) { - tr.removeStoredMark(removeMark) - } - tr.insertText(' ', currentPos.pos) - - editor.view.dispatch(tr) - - return true - } - - return false - } - - configure(options?: Partial) { - return super.configure(options) as Mark - } - - extend< - ExtendedOptions = Options, - ExtendedStorage = Storage, - ExtendedConfig extends MarkConfig = MarkConfig< - ExtendedOptions, - ExtendedStorage - >, - >( - extendedConfig?: - | (() => Partial) - | (Partial & - ThisType<{ - name: string - options: ExtendedOptions - storage: ExtendedStorage - editor: Editor - type: MarkType - }>), - ): Mark { - // If the extended config is a function, execute it to get the configuration object - const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig - return super.extend(resolvedConfig) as Mark - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/MarkView.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/MarkView.ts deleted file mode 100644 index f3ffdc9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/MarkView.ts +++ /dev/null @@ -1,132 +0,0 @@ -import type { Mark } from '@tiptap/pm/model' -import type { ViewMutationRecord } from '@tiptap/pm/view' - -import type { Editor } from './Editor.js' -import type { MarkViewProps, MarkViewRendererOptions } from './types.js' -import { isAndroid, isiOS } from './utilities/index.js' - -export function updateMarkViewAttributes( - checkMark: Mark, - editor: Editor, - attrs: Record = {}, -): void { - const { state } = editor - const { doc, tr } = state - const thisMark = checkMark - - doc.descendants((node, pos) => { - const from = tr.mapping.map(pos) - const to = tr.mapping.map(pos) + node.nodeSize - let foundMark: Mark | null = null - - // find the mark on the current node - node.marks.forEach(mark => { - if (mark !== thisMark) { - return false - } - - foundMark = mark - }) - - if (!foundMark) { - return - } - - // check if we need to update given the attributes - let needsUpdate = false - Object.keys(attrs).forEach(k => { - if (attrs[k] !== foundMark!.attrs[k]) { - needsUpdate = true - } - }) - - if (needsUpdate) { - const updatedMark = checkMark.type.create({ - ...checkMark.attrs, - ...attrs, - }) - - tr.removeMark(from, to, checkMark.type) - tr.addMark(from, to, updatedMark) - } - }) - - if (tr.docChanged) { - editor.view.dispatch(tr) - } -} - -export class MarkView< - Component, - Options extends MarkViewRendererOptions = MarkViewRendererOptions, -> { - component: Component - editor: Editor - options: Options - mark: MarkViewProps['mark'] - HTMLAttributes: MarkViewProps['HTMLAttributes'] - - constructor(component: Component, props: MarkViewProps, options?: Partial) { - this.component = component - this.editor = props.editor - this.options = { ...options } as Options - this.mark = props.mark - this.HTMLAttributes = props.HTMLAttributes - } - - get dom(): HTMLElement { - return this.editor.view.dom - } - - get contentDOM(): HTMLElement | null { - return null - } - - /** - * Update the attributes of the mark in the document. - * @param attrs The attributes to update. - */ - updateAttributes(attrs: Record, checkMark?: Mark): void { - updateMarkViewAttributes(checkMark || this.mark, this.editor, attrs) - } - - ignoreMutation(mutation: ViewMutationRecord): boolean { - if (!this.dom || !this.contentDOM) { - return true - } - - if (typeof this.options.ignoreMutation === 'function') { - return this.options.ignoreMutation({ mutation }) - } - - if (mutation.type === 'selection') { - return false - } - - if ( - this.dom.contains(mutation.target) && - mutation.type === 'childList' && - (isiOS() || isAndroid()) && - this.editor.isFocused - ) { - const changedNodes = [ - ...Array.from(mutation.addedNodes), - ...Array.from(mutation.removedNodes), - ] as HTMLElement[] - - if (changedNodes.every(node => node.isContentEditable)) { - return false - } - } - - if (this.contentDOM === mutation.target && mutation.type === 'attributes') { - return true - } - - if (this.contentDOM.contains(mutation.target)) { - return false - } - - return true - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Node.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Node.ts deleted file mode 100644 index 46cc87d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Node.ts +++ /dev/null @@ -1,390 +0,0 @@ -import type { DOMOutputSpec, Node as ProseMirrorNode, NodeSpec, NodeType } from '@tiptap/pm/model' - -import type { Editor } from './Editor.js' -import type { ExtendableConfig } from './Extendable.js' -import { Extendable } from './Extendable.js' -import type { Attributes, NodeViewRenderer, ParentConfig } from './types.js' - -export interface NodeConfig extends ExtendableConfig< - Options, - Storage, - NodeConfig, - NodeType -> { - /** - * Node View - */ - addNodeView?: - | ((this: { - name: string - options: Options - storage: Storage - editor: Editor - type: NodeType - parent: ParentConfig>['addNodeView'] - }) => NodeViewRenderer | null) - | null - - /** - * Defines if this node should be a top level node (doc) - * @default false - * @example true - */ - topNode?: boolean - - /** - * The content expression for this node, as described in the [schema - * guide](/docs/guide/#schema.content_expressions). When not given, - * the node does not allow any content. - * - * You can read more about it on the Prosemirror documentation here - * @see https://prosemirror.net/docs/guide/#schema.content_expressions - * @default undefined - * @example content: 'block+' - * @example content: 'headline paragraph block*' - */ - content?: - | NodeSpec['content'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['content'] - editor?: Editor - }) => NodeSpec['content']) - - /** - * The marks that are allowed inside of this node. May be a - * space-separated string referring to mark names or groups, `"_"` - * to explicitly allow all marks, or `""` to disallow marks. When - * not given, nodes with inline content default to allowing all - * marks, other nodes default to not allowing marks. - * - * @example marks: 'strong em' - */ - marks?: - | NodeSpec['marks'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['marks'] - editor?: Editor - }) => NodeSpec['marks']) - - /** - * The group or space-separated groups to which this node belongs, - * which can be referred to in the content expressions for the - * schema. - * - * By default Tiptap uses the groups 'block' and 'inline' for nodes. You - * can also use custom groups if you want to group specific nodes together - * and handle them in your schema. - * @example group: 'block' - * @example group: 'inline' - * @example group: 'customBlock' // this uses a custom group - */ - group?: - | NodeSpec['group'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['group'] - editor?: Editor - }) => NodeSpec['group']) - - /** - * Should be set to true for inline nodes. (Implied for text nodes.) - */ - inline?: - | NodeSpec['inline'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['inline'] - editor?: Editor - }) => NodeSpec['inline']) - - /** - * Can be set to true to indicate that, though this isn't a [leaf - * node](https://prosemirror.net/docs/ref/#model.NodeType.isLeaf), it doesn't have directly editable - * content and should be treated as a single unit in the view. - * - * @example atom: true - */ - atom?: - | NodeSpec['atom'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['atom'] - editor?: Editor - }) => NodeSpec['atom']) - - /** - * Controls whether nodes of this type can be selected as a [node - * selection](https://prosemirror.net/docs/ref/#state.NodeSelection). Defaults to true for non-text - * nodes. - * - * @default true - * @example selectable: false - */ - selectable?: - | NodeSpec['selectable'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['selectable'] - editor?: Editor - }) => NodeSpec['selectable']) - - /** - * Determines whether nodes of this type can be dragged without - * being selected. Defaults to false. - * - * @default: false - * @example: draggable: true - */ - draggable?: - | NodeSpec['draggable'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['draggable'] - editor?: Editor - }) => NodeSpec['draggable']) - - /** - * Can be used to indicate that this node contains code, which - * causes some commands to behave differently. - */ - code?: - | NodeSpec['code'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['code'] - editor?: Editor - }) => NodeSpec['code']) - - /** - * Controls way whitespace in this a node is parsed. The default is - * `"normal"`, which causes the [DOM parser](https://prosemirror.net/docs/ref/#model.DOMParser) to - * collapse whitespace in normal mode, and normalize it (replacing - * newlines and such with spaces) otherwise. `"pre"` causes the - * parser to preserve spaces inside the node. When this option isn't - * given, but [`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) is true, `whitespace` - * will default to `"pre"`. Note that this option doesn't influence - * the way the node is rendered—that should be handled by `toDOM` - * and/or styling. - */ - whitespace?: - | NodeSpec['whitespace'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['whitespace'] - editor?: Editor - }) => NodeSpec['whitespace']) - - /** - * Allows a **single** node to be set as linebreak equivalent (e.g. hardBreak). - * When converting between block types that have whitespace set to "pre" - * and don't support the linebreak node (e.g. codeBlock) and other block types - * that do support the linebreak node (e.g. paragraphs) - this node will be used - * as the linebreak instead of stripping the newline. - * - * See [linebreakReplacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement). - */ - linebreakReplacement?: - | NodeSpec['linebreakReplacement'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['linebreakReplacement'] - editor?: Editor - }) => NodeSpec['linebreakReplacement']) - - /** - * When enabled, enables both - * [`definingAsContext`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext) and - * [`definingForContent`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent). - * - * @default false - * @example isolating: true - */ - defining?: - | NodeSpec['defining'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['defining'] - editor?: Editor - }) => NodeSpec['defining']) - - /** - * When enabled (default is false), the sides of nodes of this type - * count as boundaries that regular editing operations, like - * backspacing or lifting, won't cross. An example of a node that - * should probably have this enabled is a table cell. - */ - isolating?: - | NodeSpec['isolating'] - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['isolating'] - editor?: Editor - }) => NodeSpec['isolating']) - - /** - * Associates DOM parser information with this node, which can be - * used by [`DOMParser.fromSchema`](https://prosemirror.net/docs/ref/#model.DOMParser^fromSchema) to - * automatically derive a parser. The `node` field in the rules is - * implied (the name of this node will be filled in automatically). - * If you supply your own parser, you do not need to also specify - * parsing rules in your schema. - * - * @example parseHTML: [{ tag: 'div', attrs: { 'data-id': 'my-block' } }] - */ - parseHTML?: (this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['parseHTML'] - editor?: Editor - }) => NodeSpec['parseDOM'] - - /** - * A description of a DOM structure. Can be either a string, which is - * interpreted as a text node, a DOM node, which is interpreted as - * itself, a `{dom, contentDOM}` object, or an array. - * - * An array describes a DOM element. The first value in the array - * should be a string—the name of the DOM element, optionally prefixed - * by a namespace URL and a space. If the second element is plain - * object, it is interpreted as a set of attributes for the element. - * Any elements after that (including the 2nd if it's not an attribute - * object) are interpreted as children of the DOM elements, and must - * either be valid `DOMOutputSpec` values, or the number zero. - * - * The number zero (pronounced “hole”) is used to indicate the place - * where a node's child nodes should be inserted. If it occurs in an - * output spec, it should be the only child element in its parent - * node. - * - * @example toDOM: ['div[data-id="my-block"]', { class: 'my-block' }, 0] - */ - renderHTML?: - | (( - this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['renderHTML'] - editor?: Editor - }, - props: { - node: ProseMirrorNode - HTMLAttributes: Record - }, - ) => DOMOutputSpec) - | null - - /** - * renders the node as text - * @example renderText: () => 'foo - */ - renderText?: - | (( - this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['renderText'] - editor?: Editor - }, - props: { - node: ProseMirrorNode - pos: number - parent: ProseMirrorNode - index: number - }, - ) => string) - | null - - /** - * Add attributes to the node - * @example addAttributes: () => ({ class: 'foo' }) - */ - addAttributes?: (this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['addAttributes'] - editor?: Editor - // oxlint-disable-next-lineno-empty-object-type - }) => Attributes | {} -} - -/** - * The Node class is used to create custom node extensions. - * @see https://tiptap.dev/api/extensions#create-a-new-extension - */ -export class Node extends Extendable< - Options, - Storage, - NodeConfig -> { - type = 'node' - - /** - * Create a new Node instance - * @param config - Node configuration object or a function that returns a configuration object - */ - static create( - config: Partial> | (() => Partial>) = {}, - ) { - // If the config is a function, execute it to get the configuration object - const resolvedConfig = typeof config === 'function' ? config() : config - return new Node(resolvedConfig) - } - - configure(options?: Partial) { - return super.configure(options) as Node - } - - extend< - ExtendedOptions = Options, - ExtendedStorage = Storage, - ExtendedConfig extends NodeConfig = NodeConfig< - ExtendedOptions, - ExtendedStorage - >, - >( - extendedConfig?: - | (() => Partial) - | (Partial & - ThisType<{ - name: string - options: ExtendedOptions - storage: ExtendedStorage - editor: Editor - type: NodeType - }>), - ): Node { - // If the extended config is a function, execute it to get the configuration object - const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig - return super.extend(resolvedConfig) as Node - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/NodePos.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/NodePos.ts deleted file mode 100644 index 0cd7071..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/NodePos.ts +++ /dev/null @@ -1,270 +0,0 @@ -import type { Fragment, Node, ResolvedPos } from '@tiptap/pm/model' - -import type { Editor } from './Editor.js' -import type { Content, Range } from './types.js' - -export class NodePos { - private resolvedPos: ResolvedPos - - private isBlock: boolean - - private editor: Editor - - private get name(): string { - return this.node.type.name - } - - constructor(pos: ResolvedPos, editor: Editor, isBlock = false, node: Node | null = null) { - this.isBlock = isBlock - this.resolvedPos = pos - this.editor = editor - this.currentNode = node - } - - private currentNode: Node | null = null - - get node(): Node { - return this.currentNode || this.resolvedPos.node() - } - - get element(): HTMLElement { - return this.editor.view.domAtPos(this.pos).node as HTMLElement - } - - public actualDepth: number | null = null - - get depth(): number { - return this.actualDepth ?? this.resolvedPos.depth - } - - get pos(): number { - return this.resolvedPos.pos - } - - get content(): Fragment { - return this.node.content - } - - set content(content: Content) { - let from = this.from - let to = this.to - - if (this.isBlock) { - if (this.content.size === 0) { - console.error( - `You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`, - ) - return - } - - from = this.from + 1 - to = this.to - 1 - } - - this.editor.commands.insertContentAt({ from, to }, content) - } - - get attributes(): { [key: string]: any } { - return this.node.attrs - } - - get textContent(): string { - return this.node.textContent - } - - get size(): number { - return this.node.nodeSize - } - - get from(): number { - if (this.isBlock) { - return this.pos - } - - return this.resolvedPos.start(this.resolvedPos.depth) - } - - get range(): Range { - return { - from: this.from, - to: this.to, - } - } - - get to(): number { - if (this.isBlock) { - return this.pos + this.size - } - - return this.resolvedPos.end(this.resolvedPos.depth) + (this.node.isText ? 0 : 1) - } - - get parent(): NodePos | null { - if (this.depth === 0) { - return null - } - - const parentPos = this.resolvedPos.start(this.resolvedPos.depth - 1) - const $pos = this.resolvedPos.doc.resolve(parentPos) - - return new NodePos($pos, this.editor) - } - - get before(): NodePos | null { - let $pos = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2)) - - if ($pos.depth !== this.depth) { - $pos = this.resolvedPos.doc.resolve(this.from - 3) - } - - return new NodePos($pos, this.editor) - } - - get after(): NodePos | null { - let $pos = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1)) - - if ($pos.depth !== this.depth) { - $pos = this.resolvedPos.doc.resolve(this.to + 3) - } - - return new NodePos($pos, this.editor) - } - - get children(): NodePos[] { - const children: NodePos[] = [] - - this.node.content.forEach((node, offset) => { - const isBlock = node.isBlock && !node.isTextblock - const isNonTextAtom = node.isAtom && !node.isText - const isInline = node.isInline - - const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1) - - // Check if targetPos is within valid document range - if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) { - return - } - - const $pos = this.resolvedPos.doc.resolve(targetPos) - - // Only apply depth check for non-block, non-inline nodes (i.e., textblocks) - // Inline nodes should always be included as children since we're iterating - // over direct children via this.node.content - if (!isBlock && !isInline && $pos.depth <= this.depth) { - return - } - - // Pass the node for both block and inline nodes to ensure correct node reference - const childNodePos = new NodePos( - $pos, - this.editor, - isBlock, - isBlock || isInline ? node : null, - ) - - if (isBlock) { - childNodePos.actualDepth = this.depth + 1 - } - - children.push(childNodePos) - }) - - return children - } - - get firstChild(): NodePos | null { - return this.children[0] || null - } - - get lastChild(): NodePos | null { - const children = this.children - - return children[children.length - 1] || null - } - - closest(selector: string, attributes: { [key: string]: any } = {}): NodePos | null { - let node: NodePos | null = null - let currentNode = this.parent - - while (currentNode && !node) { - if (currentNode.node.type.name === selector) { - if (Object.keys(attributes).length > 0) { - const nodeAttributes = currentNode.node.attrs - const attrKeys = Object.keys(attributes) - - for (let index = 0; index < attrKeys.length; index += 1) { - const key = attrKeys[index] - - if (nodeAttributes[key] !== attributes[key]) { - break - } - } - } else { - node = currentNode - } - } - - currentNode = currentNode.parent - } - - return node - } - - querySelector(selector: string, attributes: { [key: string]: any } = {}): NodePos | null { - return this.querySelectorAll(selector, attributes, true)[0] || null - } - - querySelectorAll( - selector: string, - attributes: { [key: string]: any } = {}, - firstItemOnly = false, - ): NodePos[] { - let nodes: NodePos[] = [] - - if (!this.children || this.children.length === 0) { - return nodes - } - const attrKeys = Object.keys(attributes) - - /** - * Finds all children recursively that match the selector and attributes - * If firstItemOnly is true, it will return the first item found - */ - this.children.forEach(childPos => { - // If we already found a node and we only want the first item, we dont need to keep going - if (firstItemOnly && nodes.length > 0) { - return - } - - if (childPos.node.type.name === selector) { - const doesAllAttributesMatch = attrKeys.every( - key => attributes[key] === childPos.node.attrs[key], - ) - - if (doesAllAttributesMatch) { - nodes.push(childPos) - } - } - - // If we already found a node and we only want the first item, we can stop here and skip the recursion - if (firstItemOnly && nodes.length > 0) { - return - } - - nodes = nodes.concat(childPos.querySelectorAll(selector, attributes, firstItemOnly)) - }) - - return nodes - } - - setAttribute(attributes: { [key: string]: any }) { - const { tr } = this.editor.state - - tr.setNodeMarkup(this.from, undefined, { - ...this.node.attrs, - ...attributes, - }) - - this.editor.view.dispatch(tr) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/NodeView.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/NodeView.ts deleted file mode 100644 index 5f50c7f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/NodeView.ts +++ /dev/null @@ -1,354 +0,0 @@ -import { NodeSelection } from '@tiptap/pm/state' -import type { NodeView as ProseMirrorNodeView, ViewMutationRecord } from '@tiptap/pm/view' - -import type { Editor as CoreEditor } from './Editor.js' -import type { DecorationWithType, NodeViewRendererOptions, NodeViewRendererProps } from './types.js' -import { isAndroid } from './utilities/isAndroid.js' -import { isiOS } from './utilities/isiOS.js' - -/** - * Node views are used to customize the rendered DOM structure of a node. - * @see https://tiptap.dev/guide/node-views - */ -export class NodeView< - Component, - NodeEditor extends CoreEditor = CoreEditor, - Options extends NodeViewRendererOptions = NodeViewRendererOptions, -> implements ProseMirrorNodeView { - component: Component - - editor: NodeEditor - - options: Options - - extension: NodeViewRendererProps['extension'] - - node: NodeViewRendererProps['node'] - - decorations: NodeViewRendererProps['decorations'] - - innerDecorations: NodeViewRendererProps['innerDecorations'] - - view: NodeViewRendererProps['view'] - - getPos: NodeViewRendererProps['getPos'] - - HTMLAttributes: NodeViewRendererProps['HTMLAttributes'] - - isDragging = false - - constructor(component: Component, props: NodeViewRendererProps, options?: Partial) { - this.component = component - this.editor = props.editor as NodeEditor - this.options = { - stopEvent: null, - ignoreMutation: null, - ...options, - } as Options - this.extension = props.extension - this.node = props.node - this.decorations = props.decorations as DecorationWithType[] - this.innerDecorations = props.innerDecorations - this.view = props.view - this.HTMLAttributes = props.HTMLAttributes - this.getPos = props.getPos - this.mount() - } - - mount() { - // oxlint-disable-next-line - return - } - - get dom(): HTMLElement { - return this.editor.view.dom as HTMLElement - } - - get contentDOM(): HTMLElement | null { - return null - } - - onDragStart(event: DragEvent) { - const { view } = this.editor - const target = event.target as HTMLElement - - // get the drag handle element - // `closest` is not available for text nodes so we may have to use its parent - const dragHandle = - target.nodeType === 3 - ? target.parentElement?.closest('[data-drag-handle]') - : target.closest('[data-drag-handle]') - - if (!this.dom || this.contentDOM?.contains(target) || !dragHandle) { - return - } - - let x = 0 - let y = 0 - - // calculate offset for drag element if we use a different drag handle element - if (this.dom !== dragHandle) { - const domBox = this.dom.getBoundingClientRect() - const handleBox = dragHandle.getBoundingClientRect() - - // In React, we have to go through nativeEvent to reach offsetX/offsetY. - const offsetX = event.offsetX ?? (event as any).nativeEvent?.offsetX - const offsetY = event.offsetY ?? (event as any).nativeEvent?.offsetY - - x = handleBox.x - domBox.x + offsetX - y = handleBox.y - domBox.y + offsetY - } - - const clonedNode = this.dom.cloneNode(true) as HTMLElement - - // Preserve the visual size of the original when using the clone as - // the drag image. - try { - const domBox = this.dom.getBoundingClientRect() - clonedNode.style.width = `${Math.round(domBox.width)}px` - clonedNode.style.height = `${Math.round(domBox.height)}px` - clonedNode.style.boxSizing = 'border-box' - // Ensure the clone doesn't capture pointer events while offscreen - clonedNode.style.pointerEvents = 'none' - } catch { - // ignore measurement errors (e.g. if element not in DOM) - } - - // Some browsers (notably Safari) require the element passed to - // setDragImage to be present in the DOM. Using a detached node can - // cause the drag to immediately end. - let dragImageWrapper: HTMLElement | null = null - - try { - dragImageWrapper = document.createElement('div') - dragImageWrapper.style.position = 'absolute' - dragImageWrapper.style.top = '-9999px' - dragImageWrapper.style.left = '-9999px' - dragImageWrapper.style.pointerEvents = 'none' - dragImageWrapper.appendChild(clonedNode) - document.body.appendChild(dragImageWrapper) - - event.dataTransfer?.setDragImage(clonedNode, x, y) - } finally { - // Remove the wrapper on the next tick so the browser can use the - // element as the drag image. A 0ms timeout is enough in practice. - if (dragImageWrapper) { - setTimeout(() => { - try { - dragImageWrapper?.remove() - } catch { - // ignore removal errors - } - }, 0) - } - } - - const pos = this.getPos() - - if (typeof pos !== 'number') { - return - } - // we need to tell ProseMirror that we want to move the whole node - // so we create a NodeSelection - const selection = NodeSelection.create(view.state.doc, pos) - const transaction = view.state.tr.setSelection(selection) - - view.dispatch(transaction) - } - - stopEvent(event: Event) { - if (!this.dom) { - return false - } - - if (typeof this.options.stopEvent === 'function') { - return this.options.stopEvent({ event }) - } - - const target = event.target as HTMLElement - const isInElement = this.dom.contains(target) && !this.contentDOM?.contains(target) - - // any event from child nodes should be handled by ProseMirror - if (!isInElement) { - return false - } - - const isDragEvent = event.type.startsWith('drag') - const isDragOverEnterEvent = event.type === 'dragover' || event.type === 'dragenter' - const isDropEvent = event.type === 'drop' - const isInput = - ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA'].includes(target.tagName) || target.isContentEditable - - // any input event within node views should be ignored by ProseMirror - if (isInput && !isDropEvent && !isDragEvent) { - return true - } - - const { isEditable } = this.editor - const { isDragging } = this - const isDraggable = !!this.node.type.spec.draggable - const isSelectable = NodeSelection.isSelectable(this.node) - const isCopyEvent = event.type === 'copy' - const isPasteEvent = event.type === 'paste' - const isCutEvent = event.type === 'cut' - const isClickEvent = event.type === 'mousedown' - - // ProseMirror tries to drag selectable nodes - // even if `draggable` is set to `false` - // this fix prevents that - if (!isDraggable && isSelectable && isDragEvent && event.target === this.dom) { - event.preventDefault() - } - - if (isDraggable && isDragEvent && !isDragging && event.target === this.dom) { - event.preventDefault() - return false - } - - // we have to store that dragging started - if (isDraggable && isEditable && !isDragging && isClickEvent) { - const dragHandle = target.closest('[data-drag-handle]') - const isValidDragHandle = - dragHandle && (this.dom === dragHandle || this.dom.contains(dragHandle)) - - if (isValidDragHandle) { - this.isDragging = true - - document.addEventListener( - 'dragend', - () => { - this.isDragging = false - }, - { once: true }, - ) - - document.addEventListener( - 'drop', - () => { - this.isDragging = false - }, - { once: true }, - ) - - document.addEventListener( - 'mouseup', - () => { - this.isDragging = false - }, - { once: true }, - ) - } - } - - // these events are handled by prosemirror - if ( - isDragging || - isDragOverEnterEvent || - isDropEvent || - isCopyEvent || - isPasteEvent || - isCutEvent || - (isClickEvent && isSelectable) - ) { - return false - } - - return true - } - - /** - * Called when a DOM [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) or a selection change happens within the view. - * @return `false` if the editor should re-read the selection or re-parse the range around the mutation - * @return `true` if it can safely be ignored. - */ - ignoreMutation(mutation: ViewMutationRecord) { - if (!this.dom || !this.contentDOM) { - return true - } - - if (typeof this.options.ignoreMutation === 'function') { - return this.options.ignoreMutation({ mutation }) - } - - // a leaf/atom node is like a black box for ProseMirror - // and should be fully handled by the node view - if (this.node.isLeaf || this.node.isAtom) { - return true - } - - // ProseMirror should handle any selections - if (mutation.type === 'selection') { - return false - } - - // try to prevent a bug on iOS and Android that will break node views on enter - // this is because ProseMirror can’t preventDispatch on enter - // this will lead to a re-render of the node view on enter - // see: https://github.com/ueberdosis/tiptap/issues/1214 - // see: https://github.com/ueberdosis/tiptap/issues/2534 - if ( - this.dom.contains(mutation.target) && - mutation.type === 'childList' && - (isiOS() || isAndroid()) && - this.editor.isFocused - ) { - const changedNodes = [ - ...Array.from(mutation.addedNodes), - ...Array.from(mutation.removedNodes), - ] as HTMLElement[] - - // we’ll check if every changed node is contentEditable - // to make sure it’s probably mutated by ProseMirror - if (changedNodes.every(node => node.isContentEditable)) { - return false - } - } - - // we will allow mutation contentDOM with attributes - // so we can for example adding classes within our node view - if (this.contentDOM === mutation.target && mutation.type === 'attributes') { - return true - } - - // ProseMirror should handle any changes within contentDOM - if (this.contentDOM.contains(mutation.target)) { - return false - } - - return true - } - - /** - * Update the attributes of the prosemirror node. - */ - updateAttributes(attributes: Record): void { - this.editor.commands.command(({ tr }) => { - const pos = this.getPos() - - if (typeof pos !== 'number') { - return false - } - - tr.setNodeMarkup(pos, undefined, { - ...this.node.attrs, - ...attributes, - }) - - return true - }) - } - - /** - * Delete the node. - */ - deleteNode(): void { - const from = this.getPos() - - if (typeof from !== 'number') { - return - } - const to = from + this.node.nodeSize - - this.editor.commands.deleteRange({ from, to }) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/PasteRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/PasteRule.ts deleted file mode 100644 index d050b8d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/PasteRule.ts +++ /dev/null @@ -1,386 +0,0 @@ -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' -import { Fragment } from '@tiptap/pm/model' -import type { EditorState } from '@tiptap/pm/state' -import { Plugin } from '@tiptap/pm/state' - -import { CommandManager } from './CommandManager.js' -import type { Editor } from './Editor.js' -import { createChainableState } from './helpers/createChainableState.js' -import { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js' -import type { - CanCommands, - ChainedCommands, - ExtendedRegExpMatchArray, - Range, - SingleCommands, -} from './types.js' -import { isNumber } from './utilities/isNumber.js' -import { isRegExp } from './utilities/isRegExp.js' - -export type PasteRuleMatch = { - index: number - text: string - replaceWith?: string - match?: RegExpMatchArray - data?: Record -} - -export type PasteRuleFinder = - | RegExp - | ((text: string, event?: ClipboardEvent | null) => PasteRuleMatch[] | null | undefined) - -/** - * Paste rules are used to react to pasted content. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules - */ -export class PasteRule { - find: PasteRuleFinder - - handler: (props: { - state: EditorState - range: Range - match: ExtendedRegExpMatchArray - commands: SingleCommands - chain: () => ChainedCommands - can: () => CanCommands - pasteEvent: ClipboardEvent | null - dropEvent: DragEvent | null - }) => void | null - - constructor(config: { - find: PasteRuleFinder - handler: (props: { - can: () => CanCommands - chain: () => ChainedCommands - commands: SingleCommands - dropEvent: DragEvent | null - match: ExtendedRegExpMatchArray - pasteEvent: ClipboardEvent | null - range: Range - state: EditorState - }) => void | null - }) { - this.find = config.find - this.handler = config.handler - } -} - -const pasteRuleMatcherHandler = ( - text: string, - find: PasteRuleFinder, - event?: ClipboardEvent | null, -): ExtendedRegExpMatchArray[] => { - if (isRegExp(find)) { - return [...text.matchAll(find)] - } - - const matches = find(text, event) - - if (!matches) { - return [] - } - - return matches.map(pasteRuleMatch => { - const result: ExtendedRegExpMatchArray = [pasteRuleMatch.text] - - result.index = pasteRuleMatch.index - result.input = text - result.data = pasteRuleMatch.data - - if (pasteRuleMatch.replaceWith) { - if (!pasteRuleMatch.text.includes(pasteRuleMatch.replaceWith)) { - console.warn( - '[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".', - ) - } - - result.push(pasteRuleMatch.replaceWith) - } - - return result - }) -} - -function run(config: { - editor: Editor - state: EditorState - from: number - to: number - rule: PasteRule - pasteEvent: ClipboardEvent | null - dropEvent: DragEvent | null -}): boolean { - const { editor, state, from, to, rule, pasteEvent, dropEvent } = config - - const { commands, chain, can } = new CommandManager({ - editor, - state, - }) - - const handlers: (void | null)[] = [] - - state.doc.nodesBetween(from, to, (node, pos) => { - // Skip code blocks and non-textual nodes. - // Be defensive: `node` may be a Fragment without a `type`. Only text, - // inline, or textblock nodes are processed by paste rules. - if (node.type?.spec?.code || !(node.isText || node.isTextblock || node.isInline)) { - return - } - - // For textblock and inline/text nodes, compute the range relative to the node. - // Prefer `node.nodeSize` when available (some Node shapes expose this), - // otherwise fall back to `node.content?.size`. Default to 0 if neither exists. - const contentSize = node.content?.size ?? node.nodeSize ?? 0 - const resolvedFrom = Math.max(from, pos) - const resolvedTo = Math.min(to, pos + contentSize) - - // If the resolved range is empty or invalid for this node, skip it. This - // avoids calling `textBetween` with start > end which can cause internal - // Fragment/Node traversal to access undefined `nodeSize` values. - if (resolvedFrom >= resolvedTo) { - return - } - - const textToMatch = node.isText - ? node.text || '' - : node.textBetween(resolvedFrom - pos, resolvedTo - pos, undefined, '\ufffc') - - const matches = pasteRuleMatcherHandler(textToMatch, rule.find, pasteEvent) - - matches.forEach(match => { - if (match.index === undefined) { - return - } - - const start = resolvedFrom + match.index + 1 - const end = start + match[0].length - const range = { - from: state.tr.mapping.map(start), - to: state.tr.mapping.map(end), - } - - const handler = rule.handler({ - state, - range, - match, - commands, - chain, - can, - pasteEvent, - dropEvent, - }) - - handlers.push(handler) - }) - }) - - const success = handlers.every(handler => handler !== null) - - return success -} - -// When dragging across editors, must get another editor instance to delete selection content. -let tiptapDragFromOtherEditor: Editor | null = null - -const createClipboardPasteEvent = (text: string) => { - const event = new ClipboardEvent('paste', { - clipboardData: new DataTransfer(), - }) - - event.clipboardData?.setData('text/html', text) - - return event -} - -/** - * Create an paste rules plugin. When enabled, it will cause pasted - * text that matches any of the given rules to trigger the rule’s - * action. - */ -export function pasteRulesPlugin(props: { editor: Editor; rules: PasteRule[] }): Plugin[] { - const { editor, rules } = props - let dragSourceElement: Element | null = null - let isPastedFromProseMirror = false - let isDroppedFromProseMirror = false - let pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null - let dropEvent: DragEvent | null - - try { - dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null - } catch { - dropEvent = null - } - - const processEvent = ({ - state, - from, - to, - rule, - pasteEvt, - }: { - state: EditorState - from: number - to: { b: number } - rule: PasteRule - pasteEvt: ClipboardEvent | null - }) => { - const tr = state.tr - const chainableState = createChainableState({ - state, - transaction: tr, - }) - - const handler = run({ - editor, - state: chainableState, - from: Math.max(from - 1, 0), - to: to.b - 1, - rule, - pasteEvent: pasteEvt, - dropEvent, - }) - - if (!handler || !tr.steps.length) { - return - } - - try { - dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null - } catch { - dropEvent = null - } - pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null - - return tr - } - - const plugins = rules.map(rule => { - return new Plugin({ - // we register a global drag handler to track the current drag source element - view(view) { - const handleDragstart = (event: DragEvent) => { - dragSourceElement = view.dom.parentElement?.contains(event.target as Element) - ? view.dom.parentElement - : null - - if (dragSourceElement) { - tiptapDragFromOtherEditor = editor - } - } - - const handleDragend = () => { - if (tiptapDragFromOtherEditor) { - tiptapDragFromOtherEditor = null - } - } - - window.addEventListener('dragstart', handleDragstart) - window.addEventListener('dragend', handleDragend) - - return { - destroy() { - window.removeEventListener('dragstart', handleDragstart) - window.removeEventListener('dragend', handleDragend) - }, - } - }, - - props: { - handleDOMEvents: { - drop: (view, event: Event) => { - isDroppedFromProseMirror = dragSourceElement === view.dom.parentElement - dropEvent = event as DragEvent - - if (!isDroppedFromProseMirror) { - const dragFromOtherEditor = tiptapDragFromOtherEditor - - if (dragFromOtherEditor?.isEditable) { - // setTimeout to avoid the wrong content after drop, timeout arg can't be empty or 0 - setTimeout(() => { - const selection = dragFromOtherEditor.state.selection - - if (selection) { - dragFromOtherEditor.commands.deleteRange({ - from: selection.from, - to: selection.to, - }) - } - }, 10) - } - } - return false - }, - - paste: (_view, event: Event) => { - const html = (event as ClipboardEvent).clipboardData?.getData('text/html') - - pasteEvent = event as ClipboardEvent - - isPastedFromProseMirror = !!html?.includes('data-pm-slice') - - return false - }, - }, - }, - - appendTransaction: (transactions, oldState, state) => { - const transaction = transactions[0] - const isPaste = transaction.getMeta('uiEvent') === 'paste' && !isPastedFromProseMirror - const isDrop = transaction.getMeta('uiEvent') === 'drop' && !isDroppedFromProseMirror - - // if PasteRule is triggered by insertContent() - const simulatedPasteMeta = transaction.getMeta('applyPasteRules') as - | undefined - | { from: number; text: string | ProseMirrorNode | Fragment } - const isSimulatedPaste = !!simulatedPasteMeta - - if (!isPaste && !isDrop && !isSimulatedPaste) { - return - } - - // Handle simulated paste - if (isSimulatedPaste) { - let { text } = simulatedPasteMeta - - if (typeof text === 'string') { - text = text as string - } else { - text = getHTMLFromFragment(Fragment.from(text), state.schema) - } - - const { from } = simulatedPasteMeta - const to = from + text.length - - const pasteEvt = createClipboardPasteEvent(text) - - return processEvent({ - rule, - state, - from, - to: { b: to }, - pasteEvt, - }) - } - - // handle actual paste/drop - const from = oldState.doc.content.findDiffStart(state.doc.content) - const to = oldState.doc.content.findDiffEnd(state.doc.content) - - // stop if there is no changed range - if (!isNumber(from) || !to || from === to.b) { - return - } - - return processEvent({ - rule, - state, - from, - to, - pasteEvt: pasteEvent, - }) - }, - }) - }) - - return plugins -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Tracker.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Tracker.ts deleted file mode 100644 index 81e1801..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/Tracker.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { Transaction } from '@tiptap/pm/state' - -export interface TrackerResult { - position: number - deleted: boolean -} - -export class Tracker { - transaction: Transaction - - currentStep: number - - constructor(transaction: Transaction) { - this.transaction = transaction - this.currentStep = this.transaction.steps.length - } - - map(position: number): TrackerResult { - let deleted = false - - const mappedPosition = this.transaction.steps - .slice(this.currentStep) - .reduce((newPosition, step) => { - const mapResult = step.getMap().mapResult(newPosition) - - if (mapResult.deleted) { - deleted = true - } - - return mapResult.pos - }, position) - - return { - position: mappedPosition, - deleted, - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/__tests__/htmlEntities.test.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/__tests__/htmlEntities.test.ts deleted file mode 100644 index e5e13d0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/__tests__/htmlEntities.test.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { describe, expect, it } from 'vitest' - -import { decodeHtmlEntities, encodeHtmlEntities } from '../utilities/htmlEntities.js' - -describe('decodeHtmlEntities', () => { - it('decodes < to <', () => { - expect(decodeHtmlEntities('<div>')).toBe('
') - }) - - it('decodes & to &', () => { - expect(decodeHtmlEntities('a & b')).toBe('a & b') - }) - - it('decodes " to "', () => { - expect(decodeHtmlEntities('"hello"')).toBe('"hello"') - }) - - it('handles doubly-encoded sequences like &lt;', () => { - expect(decodeHtmlEntities('&lt;')).toBe('<') - }) - - it('returns plain text unchanged', () => { - expect(decodeHtmlEntities('hello world')).toBe('hello world') - }) -}) - -describe('encodeHtmlEntities', () => { - it('encodes < to <', () => { - expect(encodeHtmlEntities('
')).toBe('<div>') - }) - - it('encodes & to &', () => { - expect(encodeHtmlEntities('a & b')).toBe('a & b') - }) - - it('does not encode " (quotes are valid in markdown)', () => { - expect(encodeHtmlEntities('"hello"')).toBe('"hello"') - }) - - it('returns plain text unchanged', () => { - expect(encodeHtmlEntities('hello world')).toBe('hello world') - }) -}) - -describe('roundtrip', () => { - it.each(['
', 'a & b', 'x < y & y > z'])('encode then decode roundtrips: %s', input => { - expect(decodeHtmlEntities(encodeHtmlEntities(input))).toBe(input) - }) - - it('decode is a superset of encode – " decodes but " is not encoded', () => { - // " passes through encode unchanged, " decodes to " - expect(encodeHtmlEntities('"hello"')).toBe('"hello"') - expect(decodeHtmlEntities('"hello"')).toBe('"hello"') - }) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/__tests__/transformPastedHTML.test.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/__tests__/transformPastedHTML.test.ts deleted file mode 100644 index 908d1a1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/__tests__/transformPastedHTML.test.ts +++ /dev/null @@ -1,581 +0,0 @@ -import { Editor, Extension } from '@tiptap/core' -import Document from '@tiptap/extension-document' -import Paragraph from '@tiptap/extension-paragraph' -import Text from '@tiptap/extension-text' -import { describe, expect, it } from 'vitest' - -describe('transformPastedHTML', () => { - describe('priority ordering', () => { - it('should execute transforms in priority order (higher priority first)', () => { - const executionOrder: number[] = [] - - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'low-priority', - priority: 50, - transformPastedHTML(html) { - executionOrder.push(3) - return html - }, - }), - Extension.create({ - name: 'high-priority', - priority: 200, - transformPastedHTML(html) { - executionOrder.push(1) - return html - }, - }), - Extension.create({ - name: 'medium-priority', - priority: 100, - transformPastedHTML(html) { - executionOrder.push(2) - return html - }, - }), - ], - }) - - editor.view.props.transformPastedHTML?.('

test

') - - expect(executionOrder).toEqual([1, 2, 3]) - - editor.destroy() - }) - - it('should execute transforms in default priority order when priorities are equal', () => { - const executionOrder: string[] = [] - - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'first', - transformPastedHTML(html) { - executionOrder.push('first') - return html - }, - }), - Extension.create({ - name: 'second', - transformPastedHTML(html) { - executionOrder.push('second') - return html - }, - }), - ], - }) - - editor.view.props.transformPastedHTML?.('

test

') - - expect(executionOrder).toEqual(['first', 'second']) - - editor.destroy() - }) - }) - - describe('transform chaining', () => { - it('should chain transforms correctly', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'first-transform', - priority: 100, - transformPastedHTML(html) { - return html.replace(/foo/g, 'bar') - }, - }), - Extension.create({ - name: 'second-transform', - priority: 90, - transformPastedHTML(html) { - return html.replace(/bar/g, 'baz') - }, - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.('

foo

') - - expect(result).toBe('

baz

') - - editor.destroy() - }) - - it('should pass transformed HTML through entire chain', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'add-prefix', - priority: 100, - transformPastedHTML(html) { - return `PREFIX-${html}` - }, - }), - Extension.create({ - name: 'add-suffix', - priority: 90, - transformPastedHTML(html) { - return `${html}-SUFFIX` - }, - }), - Extension.create({ - name: 'add-wrapper', - priority: 80, - transformPastedHTML(html) { - return `[${html}]` - }, - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.('TEST') - - expect(result).toBe('[PREFIX-TEST-SUFFIX]') - - editor.destroy() - }) - }) - - describe('baseTransform integration', () => { - it('should run baseTransform before extension transforms', () => { - const editor = new Editor({ - editorProps: { - transformPastedHTML(html) { - return html.replace(/original/g, 'base') - }, - }, - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'extension-transform', - transformPastedHTML(html) { - return html.replace(/base/g, 'final') - }, - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.('

original

') - - expect(result).toBe('

final

') - - editor.destroy() - }) - - it('should work when baseTransform is undefined', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'extension-transform', - transformPastedHTML(html) { - return html.replace(/test/g, 'success') - }, - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.('

test

') - - expect(result).toBe('

success

') - - editor.destroy() - }) - }) - - describe('extensions without transforms', () => { - it('should skip extensions without transformPastedHTML', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'no-transform', - // No transformPastedHTML defined - }), - Extension.create({ - name: 'with-transform', - transformPastedHTML(html) { - return html.replace(/test/g, 'success') - }, - }), - Extension.create({ - name: 'another-no-transform', - // No transformPastedHTML defined - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.('

test

') - - expect(result).toBe('

success

') - - editor.destroy() - }) - - it('should return original HTML when no transforms are defined', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'extension-1', - }), - Extension.create({ - name: 'extension-2', - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.('

unchanged

') - - expect(result).toBe('

unchanged

') - - editor.destroy() - }) - }) - - describe('extension context', () => { - it('should provide correct context to transformPastedHTML', () => { - let capturedContext: any = null - - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'test-extension', - addOptions() { - return { - customOption: 'value', - } - }, - addStorage() { - return { - customStorage: 'stored', - } - }, - transformPastedHTML(html) { - capturedContext = { - name: this.name, - options: this.options, - storage: this.storage, - editor: this.editor, - } - return html - }, - }), - ], - }) - - editor.view.props.transformPastedHTML?.('

test

') - - expect(capturedContext).toBeDefined() - expect(capturedContext.name).toBe('test-extension') - expect(capturedContext.options).toMatchObject({ customOption: 'value' }) - expect(capturedContext.storage).toMatchObject({ customStorage: 'stored' }) - expect(capturedContext.editor).toBe(editor) - - editor.destroy() - }) - - it('should allow accessing editor state in transformPastedHTML', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'state-aware', - transformPastedHTML(html) { - const isEmpty = this.editor.isEmpty - return isEmpty ? `${html}` : html - }, - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.('

test

') - - expect(result).toContain('') - - editor.destroy() - }) - }) - - describe('edge cases', () => { - it('should handle empty HTML string', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'transform', - transformPastedHTML(html) { - return html || '

default

' - }, - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.('') - - expect(result).toBe('

default

') - - editor.destroy() - }) - - it('should handle HTML with special characters', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'preserve-special', - transformPastedHTML(html) { - return html.replace(/&/g, '&') - }, - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.('

&test&

') - - expect(result).toBe('

&test&

') - - editor.destroy() - }) - - it('should handle very long HTML strings', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'transform', - transformPastedHTML(html) { - return html.replace(/test/g, 'success') - }, - }), - ], - }) - - const longHtml = `

${'test '.repeat(10000)}

` - const result = editor.view.props.transformPastedHTML?.(longHtml) - - expect(result).toContain('success') - expect(result).not.toContain('test') - - editor.destroy() - }) - - it('should handle malformed HTML gracefully', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'transform', - transformPastedHTML(html) { - return html.replace(/test/g, 'success') - }, - }), - ], - }) - - const malformedHtml = '

test' - const result = editor.view.props.transformPastedHTML?.(malformedHtml) - - expect(result).toBe('

success') - - editor.destroy() - }) - }) - - describe('view parameter', () => { - it('should pass view parameter to baseTransform', () => { - let viewReceived: any = null - - const editor = new Editor({ - editorProps: { - transformPastedHTML(html, view) { - viewReceived = view - return html - }, - }, - extensions: [Document, Paragraph, Text], - }) - - editor.view.props.transformPastedHTML?.('

test

', editor.view) - - expect(viewReceived).toBe(editor.view) - - editor.destroy() - }) - - it('should work when view parameter is undefined', () => { - const editor = new Editor({ - editorProps: { - transformPastedHTML(html, view) { - return view ? html : `${html}` - }, - }, - extensions: [Document, Paragraph, Text], - }) - - const result = editor.view.props.transformPastedHTML?.('

test

') - - expect(result).toContain('') - - editor.destroy() - }) - }) - - describe('real-world scenarios', () => { - it('should remove inline styles and dangerous attributes', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'security', - priority: 100, - transformPastedHTML(html) { - return html.replace(/\s+style="[^"]*"/gi, '').replace(/\s+on\w+="[^"]*"/gi, '') - }, - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.( - '

test

', - ) - - expect(result).toBe('

test

') - - editor.destroy() - }) - - it('should normalize whitespace from word processors', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'normalize-whitespace', - transformPastedHTML(html) { - return html - .replace(/\t/g, ' ') - .replace(/\u00a0/g, ' ') - .replace(/\s+/g, ' ') - }, - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.( - '

test\t\u00a0 multiple spaces

', - ) - - expect(result).toBe('

test multiple spaces

') - - editor.destroy() - }) - - it('should chain multiple practical transforms', () => { - const editor = new Editor({ - extensions: [ - Document, - Paragraph, - Text, - Extension.create({ - name: 'remove-styles', - priority: 100, - transformPastedHTML(html) { - return html.replace(/\s+style="[^"]*"/gi, '') - }, - }), - Extension.create({ - name: 'normalize-tags', - priority: 90, - transformPastedHTML(html) { - return html.replace(//g, '').replace(/<\/b>/g, '') - }, - }), - Extension.create({ - name: 'add-classes', - priority: 80, - transformPastedHTML(html) { - return html.replace(/

/g, '

') - }, - }), - ], - }) - - const result = editor.view.props.transformPastedHTML?.( - '

test

', - ) - - expect(result).toBe('

test

') - - editor.destroy() - }) - }) - - describe('performance', () => { - it('should handle many extensions efficiently', () => { - const extensions = [Document, Paragraph, Text] - - // Add 50 extensions with transforms - for (let i = 0; i < 50; i += 1) { - extensions.push( - Extension.create({ - name: `extension-${i}`, - priority: 1000 - i, - transformPastedHTML(html) { - return html // Pass through - }, - }), - ) - } - - const editor = new Editor({ extensions }) - - const start = Date.now() - const result = editor.view.props.transformPastedHTML?.('

test

') - const duration = Date.now() - start - - expect(result).toBe('

test

') - expect(duration).toBeLessThan(100) // Should complete quickly - - editor.destroy() - }) - }) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/blur.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/blur.ts deleted file mode 100644 index 14e8baf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/blur.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - blur: { - /** - * Removes focus from the editor. - * @example editor.commands.blur() - */ - blur: () => ReturnType - } - } -} - -export const blur: RawCommands['blur'] = - () => - ({ editor, view }) => { - requestAnimationFrame(() => { - if (!editor.isDestroyed) { - ;(view.dom as HTMLElement).blur() - - // Browsers should remove the caret on blur but safari does not. - // See: https://github.com/ueberdosis/tiptap/issues/2405 - window?.getSelection()?.removeAllRanges() - } - }) - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/clearContent.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/clearContent.ts deleted file mode 100644 index 792a3d6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/clearContent.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - clearContent: { - /** - * Clear the whole document. - * @example editor.commands.clearContent() - */ - clearContent: ( - /** - * Whether to emit an update event. - * @default true - */ - emitUpdate?: boolean, - ) => ReturnType - } - } -} - -export const clearContent: RawCommands['clearContent'] = - (emitUpdate = true) => - ({ commands }) => { - return commands.setContent('', { emitUpdate }) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/clearNodes.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/clearNodes.ts deleted file mode 100644 index b765084..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/clearNodes.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { liftTarget } from '@tiptap/pm/transform' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - clearNodes: { - /** - * Normalize nodes to a simple paragraph. - * @example editor.commands.clearNodes() - */ - clearNodes: () => ReturnType - } - } -} - -export const clearNodes: RawCommands['clearNodes'] = - () => - ({ state, tr, dispatch }) => { - const { selection } = tr - const { ranges } = selection - - if (!dispatch) { - return true - } - - ranges.forEach(({ $from, $to }) => { - state.doc.nodesBetween($from.pos, $to.pos, (node, pos) => { - if (node.type.isText) { - return - } - - const { doc, mapping } = tr - const $mappedFrom = doc.resolve(mapping.map(pos)) - const $mappedTo = doc.resolve(mapping.map(pos + node.nodeSize)) - const nodeRange = $mappedFrom.blockRange($mappedTo) - - if (!nodeRange) { - return - } - - const targetLiftDepth = liftTarget(nodeRange) - - if (node.type.isTextblock) { - const { defaultType } = $mappedFrom.parent.contentMatchAt($mappedFrom.index()) - - tr.setNodeMarkup(nodeRange.start, defaultType) - } - - if (targetLiftDepth || targetLiftDepth === 0) { - tr.lift(nodeRange, targetLiftDepth) - } - }) - }) - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/command.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/command.ts deleted file mode 100644 index 6ae5e4e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/command.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { Command, RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - command: { - /** - * Define a command inline. - * @param fn The command function. - * @example - * editor.commands.command(({ tr, state }) => { - * ... - * return true - * }) - */ - command: (fn: (props: Parameters[0]) => boolean) => ReturnType - } - } -} - -export const command: RawCommands['command'] = fn => props => { - return fn(props) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/createParagraphNear.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/createParagraphNear.ts deleted file mode 100644 index 015b760..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/createParagraphNear.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { createParagraphNear as originalCreateParagraphNear } from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - createParagraphNear: { - /** - * Create a paragraph nearby. - * @example editor.commands.createParagraphNear() - */ - createParagraphNear: () => ReturnType - } - } -} - -export const createParagraphNear: RawCommands['createParagraphNear'] = - () => - ({ state, dispatch }) => { - return originalCreateParagraphNear(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/cut.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/cut.ts deleted file mode 100644 index 33008b5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/cut.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { TextSelection } from '@tiptap/pm/state' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - cut: { - /** - * Cuts content from a range and inserts it at a given position. - * @param range The range to cut. - * @param range.from The start position of the range. - * @param range.to The end position of the range. - * @param targetPos The position to insert the content at. - * @example editor.commands.cut({ from: 1, to: 3 }, 5) - */ - cut: ({ from, to }: { from: number; to: number }, targetPos: number) => ReturnType - } - } -} - -export const cut: RawCommands['cut'] = - (originRange, targetPos) => - ({ editor, tr }) => { - const { state } = editor - - const contentSlice = state.doc.slice(originRange.from, originRange.to) - - tr.deleteRange(originRange.from, originRange.to) - const newPos = tr.mapping.map(targetPos) - - tr.insert(newPos, contentSlice.content) - - tr.setSelection(new TextSelection(tr.doc.resolve(Math.max(newPos - 1, 0)))) - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteCurrentNode.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteCurrentNode.ts deleted file mode 100644 index d933b46..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteCurrentNode.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - deleteCurrentNode: { - /** - * Delete the node that currently has the selection anchor. - * @example editor.commands.deleteCurrentNode() - */ - deleteCurrentNode: () => ReturnType - } - } -} - -export const deleteCurrentNode: RawCommands['deleteCurrentNode'] = - () => - ({ tr, dispatch }) => { - const { selection } = tr - const currentNode = selection.$anchor.node() - - // if there is content inside the current node, break out of this command - if (currentNode.content.size > 0) { - return false - } - - const $pos = tr.selection.$anchor - - for (let depth = $pos.depth; depth > 0; depth -= 1) { - const node = $pos.node(depth) - - if (node.type === currentNode.type) { - if (dispatch) { - const from = $pos.before(depth) - const to = $pos.after(depth) - - tr.delete(from, to).scrollIntoView() - } - - return true - } - } - - return false - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteNode.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteNode.ts deleted file mode 100644 index f935e25..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteNode.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' - -import { getNodeType } from '../helpers/getNodeType.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - deleteNode: { - /** - * Delete a node with a given type or name. - * @param typeOrName The type or name of the node. - * @example editor.commands.deleteNode('paragraph') - */ - deleteNode: (typeOrName: string | NodeType) => ReturnType - } - } -} - -export const deleteNode: RawCommands['deleteNode'] = - typeOrName => - ({ tr, state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema) - const $pos = tr.selection.$anchor - - for (let depth = $pos.depth; depth > 0; depth -= 1) { - const node = $pos.node(depth) - - if (node.type === type) { - if (dispatch) { - const from = $pos.before(depth) - const to = $pos.after(depth) - - tr.delete(from, to).scrollIntoView() - } - - return true - } - } - - return false - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteRange.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteRange.ts deleted file mode 100644 index 6d7859c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteRange.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { Range, RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - deleteRange: { - /** - * Delete a given range. - * @param range The range to delete. - * @example editor.commands.deleteRange({ from: 1, to: 3 }) - */ - deleteRange: (range: Range) => ReturnType - } - } -} - -export const deleteRange: RawCommands['deleteRange'] = - range => - ({ tr, dispatch }) => { - const { from, to } = range - - if (dispatch) { - tr.delete(from, to) - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteSelection.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteSelection.ts deleted file mode 100644 index dd0a793..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/deleteSelection.ts +++ /dev/null @@ -1,92 +0,0 @@ -import type { ResolvedPos, Schema } from '@tiptap/pm/model' - -import type { RawCommands } from '../types.js' - -/** - * Check if a node has text content based on its content specification. - * Returns true if the node's content spec matches text* or text+ patterns. - */ -const hasTextContent = (nodeSpec: { content?: string }): boolean => { - if (!nodeSpec.content) { - return false - } - const textRegex = /^text(\*|\+)/ - return textRegex.test(nodeSpec.content) -} - -/** - * Expand selection position for a specific side (left or right) to handle inline text nodes. - * This function checks if the position is within an inline node with text content and - * expands it to include the entire node boundaries for proper deletion. - * @param $pos - The resolved position to expand - * @param schema - The ProseMirror schema - * @param side - Which side to expand ('left' or 'right') - * @returns The expanded position for deletion - */ -const expandSelectionForSide = ( - $pos: ResolvedPos, - schema: Schema, - side: 'left' | 'right', -): number => { - if (!$pos.parent.isInline) { - return $pos.pos - } - - if ((side === 'left' && $pos.pos > $pos.start()) || (side === 'right' && $pos.pos < $pos.end())) { - return $pos.pos - } - - const parentContent = schema.nodes[$pos.parent.type.name].spec - if (!hasTextContent(parentContent)) { - return $pos.pos - } - - return side === 'left' ? $pos.start() - 1 : $pos.end() + 1 -} - -/** - * Expand selection range to properly handle deletion of inline text nodes. - * Inline text nodes don't collapse correctly when text inside is deleted, - * so we need to expand the selection to include the entire node. - * See: https://code.haverbeke.berlin/prosemirror/prosemirror/issues/1365 - */ -const expandSelectionForInlineText = ( - $from: ResolvedPos, - $to: ResolvedPos, - schema: Schema, -): { from: number; to: number } => { - const from = expandSelectionForSide($from, schema, 'left') - const to = expandSelectionForSide($to, schema, 'right') - - return { from, to } -} - -declare module '@tiptap/core' { - interface Commands { - deleteSelection: { - /** - * Delete the selection, if there is one. - * @example editor.commands.deleteSelection() - */ - deleteSelection: () => ReturnType - } - } -} - -export const deleteSelection: RawCommands['deleteSelection'] = - () => - ({ state, dispatch }) => { - const { $from, $to } = state.selection - if (state.selection.empty) { - return false - } - - const { from, to } = expandSelectionForInlineText($from, $to, state.schema) - - if (dispatch) { - state.tr.deleteRange(from, to).scrollIntoView() - dispatch(state.tr) - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/enter.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/enter.ts deleted file mode 100644 index fd13a16..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/enter.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - enter: { - /** - * Trigger enter. - * @example editor.commands.enter() - */ - enter: () => ReturnType - } - } -} - -export const enter: RawCommands['enter'] = - () => - ({ commands }) => { - return commands.keyboardShortcut('Enter') - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/exitCode.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/exitCode.ts deleted file mode 100644 index 748578a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/exitCode.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { exitCode as originalExitCode } from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - exitCode: { - /** - * Exit from a code block. - * @example editor.commands.exitCode() - */ - exitCode: () => ReturnType - } - } -} - -export const exitCode: RawCommands['exitCode'] = - () => - ({ state, dispatch }) => { - return originalExitCode(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/extendMarkRange.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/extendMarkRange.ts deleted file mode 100644 index 5e1f58d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/extendMarkRange.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { MarkType } from '@tiptap/pm/model' -import { TextSelection } from '@tiptap/pm/state' - -import { getMarkRange } from '../helpers/getMarkRange.js' -import { getMarkType } from '../helpers/getMarkType.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - extendMarkRange: { - /** - * Extends the text selection to the current mark by type or name. - * @param typeOrName The type or name of the mark. - * @param attributes The attributes to match against. - * If not provided, only the first mark at the position will be matched. - * @example editor.commands.extendMarkRange('bold') - * @example editor.commands.extendMarkRange('mention', { userId: "1" }) - */ - extendMarkRange: ( - /** - * The type or name of the mark. - */ - typeOrName: string | MarkType, - - /** - * The attributes of the mark. - */ - attributes?: Record, - ) => ReturnType - } - } -} - -export const extendMarkRange: RawCommands['extendMarkRange'] = - (typeOrName, attributes) => - ({ tr, state, dispatch }) => { - const type = getMarkType(typeOrName, state.schema) - const { doc, selection } = tr - const { $from, from, to } = selection - - if (dispatch) { - const range = getMarkRange($from, type, attributes) - - if (range && range.from <= from && range.to >= to) { - const newSelection = TextSelection.create(doc, range.from, range.to) - - tr.setSelection(newSelection) - } - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/first.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/first.ts deleted file mode 100644 index 9c23186..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/first.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { Command, CommandProps, RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - first: { - /** - * Runs one command after the other and stops at the first which returns true. - * @param commands The commands to run. - * @example editor.commands.first([command1, command2]) - */ - first: (commands: Command[] | ((props: CommandProps) => Command[])) => ReturnType - } - } -} - -export const first: RawCommands['first'] = commands => props => { - const items = typeof commands === 'function' ? commands(props) : commands - - for (let i = 0; i < items.length; i += 1) { - if (items[i](props)) { - return true - } - } - - return false -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/focus.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/focus.ts deleted file mode 100644 index 61201b5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/focus.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { isTextSelection } from '../helpers/isTextSelection.js' -import { resolveFocusPosition } from '../helpers/resolveFocusPosition.js' -import type { FocusPosition, RawCommands } from '../types.js' -import { isAndroid } from '../utilities/isAndroid.js' -import { isiOS } from '../utilities/isiOS.js' -import { isSafari } from '../utilities/isSafari.js' - -declare module '@tiptap/core' { - interface Commands { - focus: { - /** - * Focus the editor at the given position. - * @param position The position to focus at. - * @param options.scrollIntoView Scroll the focused position into view after focusing - * @example editor.commands.focus() - * @example editor.commands.focus(32, { scrollIntoView: false }) - */ - focus: ( - /** - * The position to focus at. - */ - position?: FocusPosition, - - /** - * Optional options - * @default { scrollIntoView: true } - */ - options?: { - scrollIntoView?: boolean - }, - ) => ReturnType - } - } -} - -export const focus: RawCommands['focus'] = - (position = null, options = {}) => - ({ editor, view, tr, dispatch }) => { - options = { - scrollIntoView: true, - ...options, - } - - const delayedFocus = () => { - // focus within `requestAnimationFrame` breaks focus on iOS and Android - // so we have to call this - if (isiOS() || isAndroid()) { - ;(view.dom as HTMLElement).focus() - } - - // Safari requires preventScroll to avoid the browser scrolling to the - // top of the editor when focus is called before the selection is set. - // We exclude iOS and Android since they are already handled above. - // see: https://github.com/ueberdosis/tiptap/issues/7318 - if (isSafari() && !isiOS() && !isAndroid()) { - ;(view.dom as HTMLElement).focus({ preventScroll: true }) - } - - // For React we have to focus asynchronously. Otherwise wild things happen. - // see: https://github.com/ueberdosis/tiptap/issues/1520 - requestAnimationFrame(() => { - if (!editor.isDestroyed) { - view.focus() - - if (options?.scrollIntoView) { - editor.commands.scrollIntoView() - } - } - }) - } - - try { - if ((view.hasFocus() && position === null) || position === false) { - return true - } - } catch { - // if view.hasFocus fails (view not mounted yet) - // we will return false because there's nothing to focus - return false - } - - // we don’t try to resolve a NodeSelection or CellSelection - if (dispatch && position === null && !isTextSelection(editor.state.selection)) { - delayedFocus() - return true - } - - // pass through tr.doc instead of editor.state.doc - // since transactions could change the editors state before this command has been run - const selection = resolveFocusPosition(tr.doc, position) || editor.state.selection - const isSameSelection = editor.state.selection.eq(selection) - - if (dispatch) { - if (!isSameSelection) { - tr.setSelection(selection) - } - - // `tr.setSelection` resets the stored marks - // so we’ll restore them if the selection is the same as before - if (isSameSelection && tr.storedMarks) { - tr.setStoredMarks(tr.storedMarks) - } - - delayedFocus() - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/forEach.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/forEach.ts deleted file mode 100644 index f5ba3df..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/forEach.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { CommandProps, RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - forEach: { - /** - * Loop through an array of items. - */ - forEach: ( - items: T[], - fn: ( - item: T, - props: CommandProps & { - index: number - }, - ) => boolean, - ) => ReturnType - } - } -} - -export const forEach: RawCommands['forEach'] = (items, fn) => props => { - return items.every((item, index) => fn(item, { ...props, index })) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/index.ts deleted file mode 100644 index 6c1ae90..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -export * from './blur.js' -export * from './clearContent.js' -export * from './clearNodes.js' -export * from './command.js' -export * from './createParagraphNear.js' -export * from './cut.js' -export * from './deleteCurrentNode.js' -export * from './deleteNode.js' -export * from './deleteRange.js' -export * from './deleteSelection.js' -export * from './enter.js' -export * from './exitCode.js' -export * from './extendMarkRange.js' -export * from './first.js' -export * from './focus.js' -export * from './forEach.js' -export * from './insertContent.js' -export * from './insertContentAt.js' -export * from './join.js' -export * from './joinItemBackward.js' -export * from './joinItemForward.js' -export * from './joinTextblockBackward.js' -export * from './joinTextblockForward.js' -export * from './keyboardShortcut.js' -export * from './lift.js' -export * from './liftEmptyBlock.js' -export * from './liftListItem.js' -export * from './newlineInCode.js' -export * from './resetAttributes.js' -export * from './scrollIntoView.js' -export * from './selectAll.js' -export * from './selectNodeBackward.js' -export * from './selectNodeForward.js' -export * from './selectParentNode.js' -export * from './selectTextblockEnd.js' -export * from './selectTextblockStart.js' -export * from './setContent.js' -export * from './setMark.js' -export * from './setMeta.js' -export * from './setNode.js' -export * from './setNodeSelection.js' -export * from './setTextDirection.js' -export * from './setTextSelection.js' -export * from './sinkListItem.js' -export * from './splitBlock.js' -export * from './splitListItem.js' -export * from './toggleList.js' -export * from './toggleMark.js' -export * from './toggleNode.js' -export * from './toggleWrap.js' -export * from './undoInputRule.js' -export * from './unsetAllMarks.js' -export * from './unsetMark.js' -export * from './unsetTextDirection.js' -export * from './updateAttributes.js' -export * from './wrapIn.js' -export * from './wrapInList.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/insertContent.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/insertContent.ts deleted file mode 100644 index 3fef205..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/insertContent.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { Fragment, Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model' - -import type { Content, RawCommands } from '../types.js' - -export interface InsertContentOptions { - /** - * Options for parsing the content. - */ - parseOptions?: ParseOptions - - /** - * Whether to update the selection after inserting the content. - */ - updateSelection?: boolean - applyInputRules?: boolean - applyPasteRules?: boolean -} - -declare module '@tiptap/core' { - interface Commands { - insertContent: { - /** - * Insert a node or string of HTML at the current position. - * @example editor.commands.insertContent('

Example

') - * @example editor.commands.insertContent('

Example

', { updateSelection: false }) - */ - insertContent: ( - /** - * The ProseMirror content to insert. - */ - value: Content | ProseMirrorNode | Fragment, - - /** - * Optional options - */ - options?: InsertContentOptions, - ) => ReturnType - } - } -} - -export const insertContent: RawCommands['insertContent'] = - (value, options) => - ({ tr, commands }) => { - return commands.insertContentAt( - { from: tr.selection.from, to: tr.selection.to }, - value, - options, - ) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/insertContentAt.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/insertContentAt.ts deleted file mode 100644 index b44b360..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/insertContentAt.ts +++ /dev/null @@ -1,218 +0,0 @@ -import type { Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model' -import { Fragment } from '@tiptap/pm/model' - -import { createNodeFromContent } from '../helpers/createNodeFromContent.js' -import { selectionToInsertionEnd } from '../helpers/selectionToInsertionEnd.js' -import type { Content, Range, RawCommands } from '../types.js' - -export interface InsertContentAtOptions { - /** - * Options for parsing the content. - */ - parseOptions?: ParseOptions - - /** - * Whether to update the selection after inserting the content. - */ - updateSelection?: boolean - - /** - * Whether to apply input rules after inserting the content. - */ - applyInputRules?: boolean - - /** - * Whether to apply paste rules after inserting the content. - */ - applyPasteRules?: boolean - - /** - * Whether to throw an error if the content is invalid. - */ - errorOnInvalidContent?: boolean -} - -declare module '@tiptap/core' { - interface Commands { - insertContentAt: { - /** - * Insert a node or string of HTML at a specific position. - * @example editor.commands.insertContentAt(0, '

Example

') - */ - insertContentAt: ( - /** - * The position to insert the content at. - */ - position: number | Range, - - /** - * The ProseMirror content to insert. - */ - value: Content | ProseMirrorNode | Fragment, - - /** - * Optional options - */ - options?: InsertContentAtOptions, - ) => ReturnType - } - } -} - -const isFragment = (nodeOrFragment: ProseMirrorNode | Fragment): nodeOrFragment is Fragment => { - return !('type' in nodeOrFragment) -} - -export const insertContentAt: RawCommands['insertContentAt'] = - (position, value, options) => - ({ tr, dispatch, editor }) => { - if (dispatch) { - options = { - parseOptions: editor.options.parseOptions, - updateSelection: true, - applyInputRules: false, - applyPasteRules: false, - ...options, - } - - let content: Fragment | ProseMirrorNode - - const emitContentError = (error: Error) => { - editor.emit('contentError', { - editor, - error, - disableCollaboration: () => { - if ( - 'collaboration' in editor.storage && - typeof editor.storage.collaboration === 'object' && - editor.storage.collaboration - ) { - ;(editor.storage.collaboration as any).isDisabled = true - } - }, - }) - } - - const parseOptions: ParseOptions = { - preserveWhitespace: 'full', - ...options.parseOptions, - } - - // If `emitContentError` is enabled, we want to check the content for errors - // but ignore them (do not remove the invalid content from the document) - if ( - !options.errorOnInvalidContent && - !editor.options.enableContentCheck && - editor.options.emitContentError - ) { - try { - createNodeFromContent(value, editor.schema, { - parseOptions, - errorOnInvalidContent: true, - }) - } catch (e) { - emitContentError(e as Error) - } - } - - try { - content = createNodeFromContent(value, editor.schema, { - parseOptions, - errorOnInvalidContent: options.errorOnInvalidContent ?? editor.options.enableContentCheck, - }) - } catch (e) { - emitContentError(e as Error) - return false - } - - let { from, to } = - typeof position === 'number' - ? { from: position, to: position } - : { from: position.from, to: position.to } - - let isOnlyTextContent = true - let isOnlyBlockContent = true - const nodes = isFragment(content) ? content : [content] - - nodes.forEach(node => { - // check if added node is valid - node.check() - - isOnlyTextContent = isOnlyTextContent ? node.isText && node.marks.length === 0 : false - - isOnlyBlockContent = isOnlyBlockContent ? node.isBlock : false - }) - - // check if we can replace the wrapping node by - // the newly inserted content - // example: - // replace an empty paragraph by an inserted image - // instead of inserting the image below the paragraph - if (from === to && isOnlyBlockContent) { - const { parent } = tr.doc.resolve(from) - const isEmptyTextBlock = parent.isTextblock && !parent.type.spec.code && !parent.childCount - - if (isEmptyTextBlock) { - from -= 1 - to += 1 - } - } - - let newContent - - // if there is only plain text we have to use `insertText` - // because this will keep the current marks - if (isOnlyTextContent) { - // if value is string, we can use it directly - // otherwise if it is an array, we have to join it - if (Array.isArray(value)) { - newContent = value.map(v => v.text || '').join('') - } else if (value instanceof Fragment) { - let text = '' - - value.forEach(node => { - if (node.text) { - text += node.text - } - }) - - newContent = text - } else if (typeof value === 'object' && !!value && !!value.text) { - newContent = value.text - } else { - newContent = value as string - } - - tr.insertText(newContent, from, to) - } else { - newContent = content - - const $from = tr.doc.resolve(from) - const $fromNode = $from.node() - const fromSelectionAtStart = $from.parentOffset === 0 - const isTextSelection = $fromNode.isText || $fromNode.isTextblock - const hasContent = $fromNode.content.size > 0 - - if (fromSelectionAtStart && isTextSelection && hasContent && isOnlyBlockContent) { - from = Math.max(0, from - 1) - } - - tr.replaceWith(from, to, newContent) - } - - // set cursor at end of inserted content - if (options.updateSelection) { - selectionToInsertionEnd(tr, tr.steps.length - 1, -1) - } - - if (options.applyInputRules) { - tr.setMeta('applyInputRules', { from, text: newContent }) - } - - if (options.applyPasteRules) { - tr.setMeta('applyPasteRules', { from, text: newContent }) - } - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/join.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/join.ts deleted file mode 100644 index ec64ab5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/join.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { - joinBackward as originalJoinBackward, - joinDown as originalJoinDown, - joinForward as originalJoinForward, - joinUp as originalJoinUp, -} from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - joinUp: { - /** - * Join the selected block or, if there is a text selection, the closest ancestor block of the selection that can be joined, with the sibling above it. - * @example editor.commands.joinUp() - */ - joinUp: () => ReturnType - } - joinDown: { - /** - * Join the selected block, or the closest ancestor of the selection that can be joined, with the sibling after it. - * @example editor.commands.joinDown() - */ - joinDown: () => ReturnType - } - joinBackward: { - /** - * If the selection is empty and at the start of a textblock, try to reduce the distance between that block and the one before it—if there's a block directly before it that can be joined, join them. - * If not, try to move the selected block closer to the next one in the document structure by lifting it out of its - * parent or moving it into a parent of the previous block. Will use the view for accurate (bidi-aware) start-of-textblock detection if given. - * @example editor.commands.joinBackward() - */ - joinBackward: () => ReturnType - } - joinForward: { - /** - * If the selection is empty and the cursor is at the end of a textblock, try to reduce or remove the boundary between that block and the one after it, - * either by joining them or by moving the other block closer to this one in the tree structure. - * Will use the view for accurate start-of-textblock detection if given. - * @example editor.commands.joinForward() - */ - joinForward: () => ReturnType - } - } -} - -export const joinUp: RawCommands['joinUp'] = - () => - ({ state, dispatch }) => { - return originalJoinUp(state, dispatch) - } - -export const joinDown: RawCommands['joinDown'] = - () => - ({ state, dispatch }) => { - return originalJoinDown(state, dispatch) - } - -export const joinBackward: RawCommands['joinBackward'] = - () => - ({ state, dispatch }) => { - return originalJoinBackward(state, dispatch) - } - -export const joinForward: RawCommands['joinForward'] = - () => - ({ state, dispatch }) => { - return originalJoinForward(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinItemBackward.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinItemBackward.ts deleted file mode 100644 index 45b69f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinItemBackward.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { joinPoint } from '@tiptap/pm/transform' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - joinItemBackward: { - /** - * Join two items backward. - * @example editor.commands.joinItemBackward() - */ - joinItemBackward: () => ReturnType - } - } -} - -export const joinItemBackward: RawCommands['joinItemBackward'] = - () => - ({ state, dispatch, tr }) => { - try { - const point = joinPoint(state.doc, state.selection.$from.pos, -1) - - if (point === null || point === undefined) { - return false - } - - tr.join(point, 2) - - if (dispatch) { - dispatch(tr) - } - - return true - } catch { - return false - } - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinItemForward.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinItemForward.ts deleted file mode 100644 index e292959..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinItemForward.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { joinPoint } from '@tiptap/pm/transform' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - joinItemForward: { - /** - * Join two items Forwards. - * @example editor.commands.joinItemForward() - */ - joinItemForward: () => ReturnType - } - } -} - -export const joinItemForward: RawCommands['joinItemForward'] = - () => - ({ state, dispatch, tr }) => { - try { - const point = joinPoint(state.doc, state.selection.$from.pos, +1) - - if (point === null || point === undefined) { - return false - } - - tr.join(point, 2) - - if (dispatch) { - dispatch(tr) - } - - return true - } catch { - return false - } - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinTextblockBackward.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinTextblockBackward.ts deleted file mode 100644 index 40add29..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinTextblockBackward.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { joinTextblockBackward as originalCommand } from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - joinTextblockBackward: { - /** - * A more limited form of joinBackward that only tries to join the current textblock to the one before it, if the cursor is at the start of a textblock. - */ - joinTextblockBackward: () => ReturnType - } - } -} - -export const joinTextblockBackward: RawCommands['joinTextblockBackward'] = - () => - ({ state, dispatch }) => { - return originalCommand(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinTextblockForward.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinTextblockForward.ts deleted file mode 100644 index 23d8338..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/joinTextblockForward.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { joinTextblockForward as originalCommand } from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - joinTextblockForward: { - /** - * A more limited form of joinForward that only tries to join the current textblock to the one after it, if the cursor is at the end of a textblock. - */ - joinTextblockForward: () => ReturnType - } - } -} - -export const joinTextblockForward: RawCommands['joinTextblockForward'] = - () => - ({ state, dispatch }) => { - return originalCommand(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/keyboardShortcut.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/keyboardShortcut.ts deleted file mode 100644 index 3dfd26f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/keyboardShortcut.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { RawCommands } from '../types.js' -import { isiOS } from '../utilities/isiOS.js' -import { isMacOS } from '../utilities/isMacOS.js' - -function normalizeKeyName(name: string) { - const parts = name.split(/-(?!$)/) - let result = parts[parts.length - 1] - - if (result === 'Space') { - result = ' ' - } - - let alt - let ctrl - let shift - let meta - - for (let i = 0; i < parts.length - 1; i += 1) { - const mod = parts[i] - - if (/^(cmd|meta|m)$/i.test(mod)) { - meta = true - } else if (/^a(lt)?$/i.test(mod)) { - alt = true - } else if (/^(c|ctrl|control)$/i.test(mod)) { - ctrl = true - } else if (/^s(hift)?$/i.test(mod)) { - shift = true - } else if (/^mod$/i.test(mod)) { - if (isiOS() || isMacOS()) { - meta = true - } else { - ctrl = true - } - } else { - throw new Error(`Unrecognized modifier name: ${mod}`) - } - } - - if (alt) { - result = `Alt-${result}` - } - - if (ctrl) { - result = `Ctrl-${result}` - } - - if (meta) { - result = `Meta-${result}` - } - - if (shift) { - result = `Shift-${result}` - } - - return result -} - -declare module '@tiptap/core' { - interface Commands { - keyboardShortcut: { - /** - * Trigger a keyboard shortcut. - * @param name The name of the keyboard shortcut. - * @example editor.commands.keyboardShortcut('Mod-b') - */ - keyboardShortcut: (name: string) => ReturnType - } - } -} - -export const keyboardShortcut: RawCommands['keyboardShortcut'] = - name => - ({ editor, view, tr, dispatch }) => { - const keys = normalizeKeyName(name).split(/-(?!$)/) - const key = keys.find(item => !['Alt', 'Ctrl', 'Meta', 'Shift'].includes(item)) - const event = new KeyboardEvent('keydown', { - key: key === 'Space' ? ' ' : key, - altKey: keys.includes('Alt'), - ctrlKey: keys.includes('Ctrl'), - metaKey: keys.includes('Meta'), - shiftKey: keys.includes('Shift'), - bubbles: true, - cancelable: true, - }) - - const capturedTransaction = editor.captureTransaction(() => { - view.someProp('handleKeyDown', f => f(view, event)) - }) - - capturedTransaction?.steps.forEach(step => { - const newStep = step.map(tr.mapping) - - if (newStep && dispatch) { - tr.maybeStep(newStep) - } - }) - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/lift.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/lift.ts deleted file mode 100644 index 66954cf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/lift.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { lift as originalLift } from '@tiptap/pm/commands' -import type { NodeType } from '@tiptap/pm/model' - -import { getNodeType } from '../helpers/getNodeType.js' -import { isNodeActive } from '../helpers/isNodeActive.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - lift: { - /** - * Removes an existing wrap if possible lifting the node out of it - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.lift('paragraph') - * @example editor.commands.lift('heading', { level: 1 }) - */ - lift: (typeOrName: string | NodeType, attributes?: Record) => ReturnType - } - } -} - -export const lift: RawCommands['lift'] = - (typeOrName, attributes = {}) => - ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema) - const isActive = isNodeActive(state, type, attributes) - - if (!isActive) { - return false - } - - return originalLift(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/liftEmptyBlock.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/liftEmptyBlock.ts deleted file mode 100644 index a61600e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/liftEmptyBlock.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { liftEmptyBlock as originalLiftEmptyBlock } from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - liftEmptyBlock: { - /** - * If the cursor is in an empty textblock that can be lifted, lift the block. - * @example editor.commands.liftEmptyBlock() - */ - liftEmptyBlock: () => ReturnType - } - } -} - -export const liftEmptyBlock: RawCommands['liftEmptyBlock'] = - () => - ({ state, dispatch }) => { - return originalLiftEmptyBlock(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/liftListItem.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/liftListItem.ts deleted file mode 100644 index c46c097..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/liftListItem.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' -import { liftListItem as originalLiftListItem } from '@tiptap/pm/schema-list' - -import { getNodeType } from '../helpers/getNodeType.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - liftListItem: { - /** - * Create a command to lift the list item around the selection up into a wrapping list. - * @param typeOrName The type or name of the node. - * @example editor.commands.liftListItem('listItem') - */ - liftListItem: (typeOrName: string | NodeType) => ReturnType - } - } -} - -export const liftListItem: RawCommands['liftListItem'] = - typeOrName => - ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema) - - return originalLiftListItem(type)(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/newlineInCode.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/newlineInCode.ts deleted file mode 100644 index fbd7773..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/newlineInCode.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { newlineInCode as originalNewlineInCode } from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - newlineInCode: { - /** - * Add a newline character in code. - * @example editor.commands.newlineInCode() - */ - newlineInCode: () => ReturnType - } - } -} - -export const newlineInCode: RawCommands['newlineInCode'] = - () => - ({ state, dispatch }) => { - return originalNewlineInCode(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/resetAttributes.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/resetAttributes.ts deleted file mode 100644 index 705ec3e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/resetAttributes.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { MarkType, NodeType } from '@tiptap/pm/model' - -import { getMarkType } from '../helpers/getMarkType.js' -import { getNodeType } from '../helpers/getNodeType.js' -import { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName.js' -import type { RawCommands } from '../types.js' -import { deleteProps } from '../utilities/deleteProps.js' - -declare module '@tiptap/core' { - interface Commands { - resetAttributes: { - /** - * Resets some node attributes to the default value. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node to reset. - * @example editor.commands.resetAttributes('heading', 'level') - */ - resetAttributes: ( - typeOrName: string | NodeType | MarkType, - attributes: string | string[], - ) => ReturnType - } - } -} - -export const resetAttributes: RawCommands['resetAttributes'] = - (typeOrName, attributes) => - ({ tr, state, dispatch }) => { - let nodeType: NodeType | null = null - let markType: MarkType | null = null - - const schemaType = getSchemaTypeNameByName( - typeof typeOrName === 'string' ? typeOrName : typeOrName.name, - state.schema, - ) - - if (!schemaType) { - return false - } - - if (schemaType === 'node') { - nodeType = getNodeType(typeOrName as NodeType, state.schema) - } - - if (schemaType === 'mark') { - markType = getMarkType(typeOrName as MarkType, state.schema) - } - - let canReset = false - - tr.selection.ranges.forEach(range => { - state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => { - if (nodeType && nodeType === node.type) { - canReset = true - - if (dispatch) { - tr.setNodeMarkup(pos, undefined, deleteProps(node.attrs, attributes)) - } - } - - if (markType && node.marks.length) { - node.marks.forEach(mark => { - if (markType === mark.type) { - canReset = true - - if (dispatch) { - tr.addMark( - pos, - pos + node.nodeSize, - markType.create(deleteProps(mark.attrs, attributes)), - ) - } - } - }) - } - }) - }) - - return canReset - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/scrollIntoView.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/scrollIntoView.ts deleted file mode 100644 index cba9b55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/scrollIntoView.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - scrollIntoView: { - /** - * Scroll the selection into view. - * @example editor.commands.scrollIntoView() - */ - scrollIntoView: () => ReturnType - } - } -} - -export const scrollIntoView: RawCommands['scrollIntoView'] = - () => - ({ tr, dispatch }) => { - if (dispatch) { - tr.scrollIntoView() - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectAll.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectAll.ts deleted file mode 100644 index 2dfa091..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectAll.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { AllSelection } from '@tiptap/pm/state' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - selectAll: { - /** - * Select the whole document. - * @example editor.commands.selectAll() - */ - selectAll: () => ReturnType - } - } -} - -export const selectAll: RawCommands['selectAll'] = - () => - ({ tr, dispatch }) => { - if (dispatch) { - const selection = new AllSelection(tr.doc) - - tr.setSelection(selection) - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectNodeBackward.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectNodeBackward.ts deleted file mode 100644 index 7400c71..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectNodeBackward.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { selectNodeBackward as originalSelectNodeBackward } from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - selectNodeBackward: { - /** - * Select a node backward. - * @example editor.commands.selectNodeBackward() - */ - selectNodeBackward: () => ReturnType - } - } -} - -export const selectNodeBackward: RawCommands['selectNodeBackward'] = - () => - ({ state, dispatch }) => { - return originalSelectNodeBackward(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectNodeForward.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectNodeForward.ts deleted file mode 100644 index c5dc6e1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectNodeForward.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { selectNodeForward as originalSelectNodeForward } from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - selectNodeForward: { - /** - * Select a node forward. - * @example editor.commands.selectNodeForward() - */ - selectNodeForward: () => ReturnType - } - } -} - -export const selectNodeForward: RawCommands['selectNodeForward'] = - () => - ({ state, dispatch }) => { - return originalSelectNodeForward(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectParentNode.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectParentNode.ts deleted file mode 100644 index 5820eec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectParentNode.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { selectParentNode as originalSelectParentNode } from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - selectParentNode: { - /** - * Select the parent node. - * @example editor.commands.selectParentNode() - */ - selectParentNode: () => ReturnType - } - } -} - -export const selectParentNode: RawCommands['selectParentNode'] = - () => - ({ state, dispatch }) => { - return originalSelectParentNode(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectTextblockEnd.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectTextblockEnd.ts deleted file mode 100644 index 6ec9cf0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectTextblockEnd.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @ts-ignore -// TODO: add types to @types/prosemirror-commands -import { selectTextblockEnd as originalSelectTextblockEnd } from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - selectTextblockEnd: { - /** - * Moves the cursor to the end of current text block. - * @example editor.commands.selectTextblockEnd() - */ - selectTextblockEnd: () => ReturnType - } - } -} - -export const selectTextblockEnd: RawCommands['selectTextblockEnd'] = - () => - ({ state, dispatch }) => { - return originalSelectTextblockEnd(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectTextblockStart.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectTextblockStart.ts deleted file mode 100644 index 1d6ec79..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/selectTextblockStart.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @ts-ignore -// TODO: add types to @types/prosemirror-commands -import { selectTextblockStart as originalSelectTextblockStart } from '@tiptap/pm/commands' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - selectTextblockStart: { - /** - * Moves the cursor to the start of current text block. - * @example editor.commands.selectTextblockStart() - */ - selectTextblockStart: () => ReturnType - } - } -} - -export const selectTextblockStart: RawCommands['selectTextblockStart'] = - () => - ({ state, dispatch }) => { - return originalSelectTextblockStart(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setContent.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setContent.ts deleted file mode 100644 index 7cae86b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setContent.ts +++ /dev/null @@ -1,76 +0,0 @@ -import type { Fragment, Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model' - -import { createDocument } from '../helpers/createDocument.js' -import type { Content, RawCommands } from '../types.js' - -export interface SetContentOptions { - /** - * Options for parsing the content. - * @default {} - */ - parseOptions?: ParseOptions - - /** - * Whether to throw an error if the content is invalid. - */ - errorOnInvalidContent?: boolean - - /** - * Whether to emit an update event. - * @default true - */ - emitUpdate?: boolean -} - -declare module '@tiptap/core' { - interface Commands { - setContent: { - /** - * Replace the whole document with new content. - * @param content The new content. - * @param emitUpdate Whether to emit an update event. - * @param parseOptions Options for parsing the content. - * @example editor.commands.setContent('

Example text

') - */ - setContent: ( - /** - * The new content. - */ - content: Content | Fragment | ProseMirrorNode, - - /** - * Options for `setContent`. - */ - options?: SetContentOptions, - ) => ReturnType - } - } -} - -export const setContent: RawCommands['setContent'] = - (content, { errorOnInvalidContent, emitUpdate = true, parseOptions = {} } = {}) => - ({ editor, tr, dispatch, commands }) => { - const { doc } = tr - - // This is to keep backward compatibility with the previous behavior - // TODO remove this in the next major version - if (parseOptions.preserveWhitespace !== 'full') { - const document = createDocument(content, editor.schema, parseOptions, { - errorOnInvalidContent: errorOnInvalidContent ?? editor.options.enableContentCheck, - }) - - if (dispatch) { - tr.replaceWith(0, doc.content.size, document).setMeta('preventUpdate', !emitUpdate) - } - return true - } - - if (dispatch) { - tr.setMeta('preventUpdate', !emitUpdate) - } - - return commands.insertContentAt({ from: 0, to: doc.content.size }, content, { - parseOptions, - errorOnInvalidContent: errorOnInvalidContent ?? editor.options.enableContentCheck, - }) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setMark.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setMark.ts deleted file mode 100644 index d9b2242..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setMark.ts +++ /dev/null @@ -1,122 +0,0 @@ -import type { MarkType, ResolvedPos } from '@tiptap/pm/model' -import type { EditorState, Transaction } from '@tiptap/pm/state' - -import { getMarkAttributes } from '../helpers/getMarkAttributes.js' -import { getMarkType } from '../helpers/getMarkType.js' -import { isTextSelection } from '../helpers/index.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - setMark: { - /** - * Add a mark with new attributes. - * @param typeOrName The mark type or name. - * @example editor.commands.setMark('bold', { level: 1 }) - */ - setMark: (typeOrName: string | MarkType, attributes?: Record) => ReturnType - } - } -} - -function canSetMark(state: EditorState, tr: Transaction, newMarkType: MarkType) { - const { selection } = tr - let cursor: ResolvedPos | null = null - - if (isTextSelection(selection)) { - cursor = selection.$cursor - } - - if (cursor) { - const currentMarks = state.storedMarks ?? cursor.marks() - const parentAllowsMarkType = cursor.parent.type.allowsMarkType(newMarkType) - - // There can be no current marks that exclude the new mark, and the parent must allow this mark type - return ( - parentAllowsMarkType && - (!!newMarkType.isInSet(currentMarks) || - !currentMarks.some(mark => mark.type.excludes(newMarkType))) - ) - } - - const { ranges } = selection - - return ranges.some(({ $from, $to }) => { - let someNodeSupportsMark = - $from.depth === 0 - ? state.doc.inlineContent && state.doc.type.allowsMarkType(newMarkType) - : false - - state.doc.nodesBetween($from.pos, $to.pos, (node, _pos, parent) => { - // If we already found a mark that we can enable, return false to bypass the remaining search - if (someNodeSupportsMark) { - return false - } - - if (node.isInline) { - const parentAllowsMarkType = !parent || parent.type.allowsMarkType(newMarkType) - const currentMarksAllowMarkType = - !!newMarkType.isInSet(node.marks) || - !node.marks.some(otherMark => otherMark.type.excludes(newMarkType)) - - someNodeSupportsMark = parentAllowsMarkType && currentMarksAllowMarkType - } - return !someNodeSupportsMark - }) - - return someNodeSupportsMark - }) -} -export const setMark: RawCommands['setMark'] = - (typeOrName, attributes = {}) => - ({ tr, state, dispatch }) => { - const { selection } = tr - const { empty, ranges } = selection - const type = getMarkType(typeOrName, state.schema) - - if (dispatch) { - if (empty) { - const oldAttributes = getMarkAttributes(state, type) - - tr.addStoredMark( - type.create({ - ...oldAttributes, - ...attributes, - }), - ) - } else { - ranges.forEach(range => { - const from = range.$from.pos - const to = range.$to.pos - - state.doc.nodesBetween(from, to, (node, pos) => { - const trimmedFrom = Math.max(pos, from) - const trimmedTo = Math.min(pos + node.nodeSize, to) - const someHasMark = node.marks.find(mark => mark.type === type) - - // if there is already a mark of this type - // we know that we have to merge its attributes - // otherwise we add a fresh new mark - if (someHasMark) { - node.marks.forEach(mark => { - if (type === mark.type) { - tr.addMark( - trimmedFrom, - trimmedTo, - type.create({ - ...mark.attrs, - ...attributes, - }), - ) - } - }) - } else { - tr.addMark(trimmedFrom, trimmedTo, type.create(attributes)) - } - }) - }) - } - } - - return canSetMark(state, tr, type) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setMeta.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setMeta.ts deleted file mode 100644 index b1dad85..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setMeta.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Plugin, PluginKey } from '@tiptap/pm/state' - -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - setMeta: { - /** - * Store a metadata property in the current transaction. - * @param key The key of the metadata property. - * @param value The value to store. - * @example editor.commands.setMeta('foo', 'bar') - */ - setMeta: (key: string | Plugin | PluginKey, value: any) => ReturnType - } - } -} - -export const setMeta: RawCommands['setMeta'] = - (key, value) => - ({ tr }) => { - tr.setMeta(key, value) - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setNode.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setNode.ts deleted file mode 100644 index e66f701..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setNode.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { setBlockType } from '@tiptap/pm/commands' -import type { NodeType } from '@tiptap/pm/model' - -import { getNodeType } from '../helpers/getNodeType.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - setNode: { - /** - * Replace a given range with a node. - * @param typeOrName The type or name of the node - * @param attributes The attributes of the node - * @example editor.commands.setNode('paragraph') - */ - setNode: (typeOrName: string | NodeType, attributes?: Record) => ReturnType - } - } -} - -export const setNode: RawCommands['setNode'] = - (typeOrName, attributes = {}) => - ({ state, dispatch, chain }) => { - const type = getNodeType(typeOrName, state.schema) - - let attributesToCopy: Record | undefined - - if (state.selection.$anchor.sameParent(state.selection.$head)) { - // only copy attributes if the selection is pointing to a node of the same type - attributesToCopy = state.selection.$anchor.parent.attrs - } - - // TODO: use a fallback like insertContent? - if (!type.isTextblock) { - console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.') - - return false - } - - return ( - chain() - // try to convert node to default node if needed - .command(({ commands }) => { - const canSetBlock = setBlockType(type, { ...attributesToCopy, ...attributes })(state) - - if (canSetBlock) { - return true - } - - return commands.clearNodes() - }) - .command(({ state: updatedState }) => { - return setBlockType(type, { ...attributesToCopy, ...attributes })(updatedState, dispatch) - }) - .run() - ) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setNodeSelection.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setNodeSelection.ts deleted file mode 100644 index 4c9ea30..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setNodeSelection.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { NodeSelection } from '@tiptap/pm/state' - -import type { RawCommands } from '../types.js' -import { minMax } from '../utilities/minMax.js' - -declare module '@tiptap/core' { - interface Commands { - setNodeSelection: { - /** - * Creates a NodeSelection. - * @param position - Position of the node. - * @example editor.commands.setNodeSelection(10) - */ - setNodeSelection: (position: number) => ReturnType - } - } -} - -export const setNodeSelection: RawCommands['setNodeSelection'] = - position => - ({ tr, dispatch }) => { - if (dispatch) { - const { doc } = tr - const from = minMax(position, 0, doc.content.size) - const selection = NodeSelection.create(doc, from) - - tr.setSelection(selection) - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setTextDirection.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setTextDirection.ts deleted file mode 100644 index 8c62f84..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setTextDirection.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { Range, RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - setTextDirection: { - /** - * Set the text direction for nodes. - * If no position is provided, it will use the current selection. - * @param direction The text direction to set ('ltr', 'rtl', or 'auto') - * @param position Optional position or range to apply the direction to - * @example editor.commands.setTextDirection('rtl') - * @example editor.commands.setTextDirection('ltr', { from: 0, to: 10 }) - */ - setTextDirection: (direction: 'ltr' | 'rtl' | 'auto', position?: number | Range) => ReturnType - } - } -} - -export const setTextDirection: RawCommands['setTextDirection'] = - (direction, position) => - ({ tr, state, dispatch }) => { - const { selection } = state - let from: number - let to: number - - if (typeof position === 'number') { - from = position - to = position - } else if (position && 'from' in position && 'to' in position) { - from = position.from - to = position.to - } else { - from = selection.from - to = selection.to - } - - if (dispatch) { - tr.doc.nodesBetween(from, to, (node, pos) => { - if (node.isText) { - return - } - - tr.setNodeMarkup(pos, undefined, { - ...node.attrs, - dir: direction, - }) - }) - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setTextSelection.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setTextSelection.ts deleted file mode 100644 index eec3783..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/setTextSelection.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { TextSelection } from '@tiptap/pm/state' - -import type { Range, RawCommands } from '../types.js' -import { minMax } from '../utilities/minMax.js' - -declare module '@tiptap/core' { - interface Commands { - setTextSelection: { - /** - * Creates a TextSelection. - * @param position The position of the selection. - * @example editor.commands.setTextSelection(10) - */ - setTextSelection: (position: number | Range) => ReturnType - } - } -} - -export const setTextSelection: RawCommands['setTextSelection'] = - position => - ({ tr, dispatch }) => { - if (dispatch) { - const { doc } = tr - const { from, to } = - typeof position === 'number' ? { from: position, to: position } : position - const minPos = TextSelection.atStart(doc).from - const maxPos = TextSelection.atEnd(doc).to - const resolvedFrom = minMax(from, minPos, maxPos) - const resolvedEnd = minMax(to, minPos, maxPos) - const selection = TextSelection.create(doc, resolvedFrom, resolvedEnd) - - tr.setSelection(selection) - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/sinkListItem.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/sinkListItem.ts deleted file mode 100644 index 4188dea..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/sinkListItem.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' -import { sinkListItem as originalSinkListItem } from '@tiptap/pm/schema-list' - -import { getNodeType } from '../helpers/getNodeType.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - sinkListItem: { - /** - * Sink the list item down into an inner list. - * @param typeOrName The type or name of the node. - * @example editor.commands.sinkListItem('listItem') - */ - sinkListItem: (typeOrName: string | NodeType) => ReturnType - } - } -} - -export const sinkListItem: RawCommands['sinkListItem'] = - typeOrName => - ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema) - - return originalSinkListItem(type)(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/splitBlock.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/splitBlock.ts deleted file mode 100644 index 6f264da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/splitBlock.ts +++ /dev/null @@ -1,127 +0,0 @@ -import type { EditorState } from '@tiptap/pm/state' -import { NodeSelection, TextSelection } from '@tiptap/pm/state' -import { canSplit } from '@tiptap/pm/transform' - -import { defaultBlockAt } from '../helpers/defaultBlockAt.js' -import { getSplittedAttributes } from '../helpers/getSplittedAttributes.js' -import type { RawCommands } from '../types.js' - -function ensureMarks(state: EditorState, splittableMarks?: string[]) { - const marks = - state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks()) - - if (marks) { - const filteredMarks = marks.filter(mark => splittableMarks?.includes(mark.type.name)) - - state.tr.ensureMarks(filteredMarks) - } -} - -declare module '@tiptap/core' { - interface Commands { - splitBlock: { - /** - * Forks a new node from an existing node. - * @param options.keepMarks Keep marks from the previous node. - * @example editor.commands.splitBlock() - * @example editor.commands.splitBlock({ keepMarks: true }) - */ - splitBlock: (options?: { keepMarks?: boolean }) => ReturnType - } - } -} - -export const splitBlock: RawCommands['splitBlock'] = - ({ keepMarks = true } = {}) => - ({ tr, state, dispatch, editor }) => { - const { selection, doc } = tr - const { $from, $to } = selection - const extensionAttributes = editor.extensionManager.attributes - const newAttributes = getSplittedAttributes( - extensionAttributes, - $from.node().type.name, - $from.node().attrs, - ) - - if (selection instanceof NodeSelection && selection.node.isBlock) { - if (!$from.parentOffset || !canSplit(doc, $from.pos)) { - return false - } - - if (dispatch) { - if (keepMarks) { - ensureMarks(state, editor.extensionManager.splittableMarks) - } - - tr.split($from.pos).scrollIntoView() - } - - return true - } - - if (!$from.parent.isBlock) { - return false - } - - const atEnd = $to.parentOffset === $to.parent.content.size - - const deflt = - $from.depth === 0 - ? undefined - : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1))) - - let types = - atEnd && deflt - ? [ - { - type: deflt, - attrs: newAttributes, - }, - ] - : undefined - - let can = canSplit(tr.doc, tr.mapping.map($from.pos), 1, types) - - if ( - !types && - !can && - canSplit(tr.doc, tr.mapping.map($from.pos), 1, deflt ? [{ type: deflt }] : undefined) - ) { - can = true - types = deflt - ? [ - { - type: deflt, - attrs: newAttributes, - }, - ] - : undefined - } - - if (dispatch) { - if (can) { - if (selection instanceof TextSelection) { - tr.deleteSelection() - } - - tr.split(tr.mapping.map($from.pos), 1, types) - - if (deflt && !atEnd && !$from.parentOffset && $from.parent.type !== deflt) { - const first = tr.mapping.map($from.before()) - const $first = tr.doc.resolve(first) - - if ($from.node(-1).canReplaceWith($first.index(), $first.index() + 1, deflt)) { - tr.setNodeMarkup(tr.mapping.map($from.before()), deflt) - } - } - } - - if (keepMarks) { - ensureMarks(state, editor.extensionManager.splittableMarks) - } - - tr.scrollIntoView() - } - - return can - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/splitListItem.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/splitListItem.ts deleted file mode 100644 index bdcffaf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/splitListItem.ts +++ /dev/null @@ -1,157 +0,0 @@ -import type { Node as ProseMirrorNode, NodeType } from '@tiptap/pm/model' -import { Fragment, Slice } from '@tiptap/pm/model' -import { TextSelection } from '@tiptap/pm/state' -import { canSplit } from '@tiptap/pm/transform' - -import { getNodeType } from '../helpers/getNodeType.js' -import { getSplittedAttributes } from '../helpers/getSplittedAttributes.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - splitListItem: { - /** - * Splits one list item into two list items. - * @param typeOrName The type or name of the node. - * @param overrideAttrs The attributes to ensure on the new node. - * @example editor.commands.splitListItem('listItem') - */ - splitListItem: ( - typeOrName: string | NodeType, - overrideAttrs?: Record, - ) => ReturnType - } - } -} - -export const splitListItem: RawCommands['splitListItem'] = - (typeOrName, overrideAttrs = {}) => - ({ tr, state, dispatch, editor }) => { - const type = getNodeType(typeOrName, state.schema) - const { $from, $to } = state.selection - - // @ts-ignore - // oxlint-disable-next-line - const node: ProseMirrorNode = state.selection.node - - if ((node && node.isBlock) || $from.depth < 2 || !$from.sameParent($to)) { - return false - } - - const grandParent = $from.node(-1) - - if (grandParent.type !== type) { - return false - } - - const extensionAttributes = editor.extensionManager.attributes - - if ($from.parent.content.size === 0 && $from.node(-1).childCount === $from.indexAfter(-1)) { - // In an empty block. If this is a nested list, the wrapping - // list item should be split. Otherwise, bail out and let next - // command handle lifting. - if ( - $from.depth === 2 || - $from.node(-3).type !== type || - $from.index(-2) !== $from.node(-2).childCount - 1 - ) { - return false - } - - if (dispatch) { - let wrap = Fragment.empty - // oxlint-disable-next-line - const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3 - - // Build a fragment containing empty versions of the structure - // from the outer list item to the parent node of the cursor - for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d -= 1) { - wrap = Fragment.from($from.node(d).copy(wrap)) - } - - const depthAfter = - // oxlint-disable-next-line no-nested-ternary - $from.indexAfter(-1) < $from.node(-2).childCount - ? 1 - : $from.indexAfter(-2) < $from.node(-3).childCount - ? 2 - : 3 - - // Add a second list item with an empty default start node - const newNextTypeAttributes = { - ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs), - ...overrideAttrs, - } - const nextType = - type.contentMatch.defaultType?.createAndFill(newNextTypeAttributes) || undefined - - wrap = wrap.append(Fragment.from(type.createAndFill(null, nextType) || undefined)) - - const start = $from.before($from.depth - (depthBefore - 1)) - - tr.replace(start, $from.after(-depthAfter), new Slice(wrap, 4 - depthBefore, 0)) - - let sel = -1 - - tr.doc.nodesBetween(start, tr.doc.content.size, (n, pos) => { - if (sel > -1) { - return false - } - - if (n.isTextblock && n.content.size === 0) { - sel = pos + 1 - } - }) - - if (sel > -1) { - tr.setSelection(TextSelection.near(tr.doc.resolve(sel))) - } - - tr.scrollIntoView() - } - - return true - } - - const nextType = $to.pos === $from.end() ? grandParent.contentMatchAt(0).defaultType : null - - const newTypeAttributes = { - ...getSplittedAttributes(extensionAttributes, grandParent.type.name, grandParent.attrs), - ...overrideAttrs, - } - const newNextTypeAttributes = { - ...getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs), - ...overrideAttrs, - } - - tr.delete($from.pos, $to.pos) - - const types = nextType - ? [ - { type, attrs: newTypeAttributes }, - { type: nextType, attrs: newNextTypeAttributes }, - ] - : [{ type, attrs: newTypeAttributes }] - - if (!canSplit(tr.doc, $from.pos, 2)) { - return false - } - - if (dispatch) { - const { selection, storedMarks } = state - const { splittableMarks } = editor.extensionManager - const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks()) - - tr.split($from.pos, 2, types).scrollIntoView() - - if (!marks || !dispatch) { - return true - } - - const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name)) - - tr.ensureMarks(filteredMarks) - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleList.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleList.ts deleted file mode 100644 index de4cc02..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleList.ts +++ /dev/null @@ -1,228 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' -import type { Transaction } from '@tiptap/pm/state' -import { TextSelection } from '@tiptap/pm/state' -import { canJoin } from '@tiptap/pm/transform' - -import { findParentNode } from '../helpers/findParentNode.js' -import { getNodeType } from '../helpers/getNodeType.js' -import { isList } from '../helpers/isList.js' -import type { RawCommands } from '../types.js' - -const joinListBackwards = (tr: Transaction, listType: NodeType): boolean => { - const list = findParentNode(node => node.type === listType)(tr.selection) - - if (!list) { - return true - } - - const before = tr.doc.resolve(Math.max(0, list.pos - 1)).before(list.depth) - - if (before === undefined) { - return true - } - - const nodeBefore = tr.doc.nodeAt(before) - const canJoinBackwards = list.node.type === nodeBefore?.type && canJoin(tr.doc, list.pos) - - if (!canJoinBackwards) { - return true - } - - tr.join(list.pos) - - return true -} - -const joinListForwards = (tr: Transaction, listType: NodeType): boolean => { - const list = findParentNode(node => node.type === listType)(tr.selection) - - if (!list) { - return true - } - - const after = tr.doc.resolve(list.start).after(list.depth) - - if (after === undefined) { - return true - } - - const nodeAfter = tr.doc.nodeAt(after) - const canJoinForwards = list.node.type === nodeAfter?.type && canJoin(tr.doc, after) - - if (!canJoinForwards) { - return true - } - - tr.join(after) - - return true -} - -declare module '@tiptap/core' { - interface Commands { - toggleList: { - /** - * Toggle between different list types. - * @param listTypeOrName The type or name of the list. - * @param itemTypeOrName The type or name of the list item. - * @param keepMarks Keep marks when toggling. - * @param attributes Attributes for the new list. - * @example editor.commands.toggleList('bulletList', 'listItem') - */ - toggleList: ( - listTypeOrName: string | NodeType, - itemTypeOrName: string | NodeType, - keepMarks?: boolean, - attributes?: Record, - ) => ReturnType - } - } -} - -function createInnerSelectionForWholeDocList(tr: Transaction) { - const doc = tr.doc - const list = doc.firstChild - - if (!list) { - return null - } - - // Place the selection inside the list node so that ProseMirror's - // liftListItem command can operate. AllSelection sits at the doc root. - // Use TextSelection.between to resolve positions into valid inline - // content positions, so the selection survives position mapping after - // liftListItem removes list/item wrappers. - const $start = doc.resolve(1) - const $end = doc.resolve(list.nodeSize - 1) - - return TextSelection.between($start, $end) -} -export const toggleList: RawCommands['toggleList'] = - (listTypeOrName, itemTypeOrName, keepMarks, attributes = {}) => - ({ editor, tr, state, dispatch, chain, commands, can }) => { - const { extensions, splittableMarks } = editor.extensionManager - const listType = getNodeType(listTypeOrName, state.schema) - const itemType = getNodeType(itemTypeOrName, state.schema) - const { selection, storedMarks } = state - const { $from, $to } = selection - const range = $from.blockRange($to) - - const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks()) - - if (!range) { - return false - } - - const parentList = findParentNode(node => isList(node.type.name, extensions))(selection) - - // When the user presses Ctrl/Cmd+A, ProseMirror creates an `AllSelection` - // covering the entire document (0..doc.content.size). In that case - // `findParentNode` cannot detect the surrounding list because the - // selection sits at the document root. If the document consists of a - // single top-level list node, treat that list as the active list so the - // toggle logic can correctly lift or change it. - const isAllSelection = selection.from === 0 && selection.to === state.doc.content.size - const topLevelNodes = state.doc.content.content - const soleTopLevelNode = topLevelNodes.length === 1 ? topLevelNodes[0] : null - const allSelectionList = - isAllSelection && soleTopLevelNode && isList(soleTopLevelNode.type.name, extensions) - ? { - node: soleTopLevelNode, - pos: 0, - depth: 0, - } - : null - - const currentList = parentList ?? allSelectionList - - const isInsideExistingList = - !!parentList && range.depth >= 1 && range.depth - parentList.depth <= 1 - - const hasWholeDocSelectedList = !!allSelectionList - if ((isInsideExistingList || hasWholeDocSelectedList) && currentList) { - // remove list - if (currentList.node.type === listType) { - if (isAllSelection && hasWholeDocSelectedList) { - return chain() - .command(({ tr: trx, dispatch: disp }) => { - // Ctrl/Cmd+A creates an AllSelection at the document root. - // When the whole document is a single top-level list, normalize the - // selection into that list before lifting, since liftListItem expects - // a selection inside a list item. - const nextSelection = createInnerSelectionForWholeDocList(trx) - - if (!nextSelection) { - return false - } - - trx.setSelection(nextSelection) - - if (disp) { - disp(trx) - } - - return true - }) - .liftListItem(itemType) - .run() - } - - return commands.liftListItem(itemType) - } - - // change list type - if ( - isList(currentList.node.type.name, extensions) && - listType.validContent(currentList.node.content) - ) { - return chain() - .command(() => { - tr.setNodeMarkup(currentList.pos, listType) - - return true - }) - .command(() => joinListBackwards(tr, listType)) - .command(() => joinListForwards(tr, listType)) - .run() - } - } - - if (!keepMarks || !marks || !dispatch) { - return ( - chain() - // try to convert node to default node if needed - .command(() => { - const canWrapInList = can().wrapInList(listType, attributes) - if (canWrapInList) { - return true - } - return commands.clearNodes() - }) - .wrapInList(listType, attributes) - .command(() => joinListBackwards(tr, listType)) - .command(() => joinListForwards(tr, listType)) - .run() - ) - } - - return ( - chain() - // try to convert node to default node if needed - .command(() => { - const canWrapInList = can().wrapInList(listType, attributes) - - const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name)) - - tr.ensureMarks(filteredMarks) - - if (canWrapInList) { - return true - } - return commands.clearNodes() - }) - .wrapInList(listType, attributes) - .command(() => joinListBackwards(tr, listType)) - .command(() => joinListForwards(tr, listType)) - .run() - ) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleMark.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleMark.ts deleted file mode 100644 index e83cf28..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleMark.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { MarkType } from '@tiptap/pm/model' - -import { getMarkType } from '../helpers/getMarkType.js' -import { isMarkActive } from '../helpers/isMarkActive.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - toggleMark: { - /** - * Toggle a mark on and off. - * @param typeOrName The mark type or name. - * @param attributes The attributes of the mark. - * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`. - * @example editor.commands.toggleMark('bold') - */ - toggleMark: ( - /** - * The mark type or name. - */ - typeOrName: string | MarkType, - - /** - * The attributes of the mark. - */ - attributes?: Record, - - options?: { - /** - * Removes the mark even across the current selection. Defaults to `false`. - */ - extendEmptyMarkRange?: boolean - }, - ) => ReturnType - } - } -} - -export const toggleMark: RawCommands['toggleMark'] = - (typeOrName, attributes = {}, options = {}) => - ({ state, commands }) => { - const { extendEmptyMarkRange = false } = options - const type = getMarkType(typeOrName, state.schema) - const isActive = isMarkActive(state, type, attributes) - - if (isActive) { - return commands.unsetMark(type, { extendEmptyMarkRange }) - } - - return commands.setMark(type, attributes) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleNode.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleNode.ts deleted file mode 100644 index 502ea82..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleNode.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' - -import { getNodeType } from '../helpers/getNodeType.js' -import { isNodeActive } from '../helpers/isNodeActive.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - toggleNode: { - /** - * Toggle a node with another node. - * @param typeOrName The type or name of the node. - * @param toggleTypeOrName The type or name of the node to toggle. - * @param attributes The attributes of the node. - * @example editor.commands.toggleNode('heading', 'paragraph') - */ - toggleNode: ( - typeOrName: string | NodeType, - toggleTypeOrName: string | NodeType, - attributes?: Record, - ) => ReturnType - } - } -} - -export const toggleNode: RawCommands['toggleNode'] = - (typeOrName, toggleTypeOrName, attributes = {}) => - ({ state, commands }) => { - const type = getNodeType(typeOrName, state.schema) - const toggleType = getNodeType(toggleTypeOrName, state.schema) - const isActive = isNodeActive(state, type, attributes) - - let attributesToCopy: Record | undefined - - if (state.selection.$anchor.sameParent(state.selection.$head)) { - // only copy attributes if the selection is pointing to a node of the same type - attributesToCopy = state.selection.$anchor.parent.attrs - } - - if (isActive) { - return commands.setNode(toggleType, attributesToCopy) - } - - // If the node is not active, we want to set the new node type with the given attributes - // Copying over the attributes from the current node if the selection is pointing to a node of the same type - return commands.setNode(type, { ...attributesToCopy, ...attributes }) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleWrap.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleWrap.ts deleted file mode 100644 index 442a614..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/toggleWrap.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' - -import { getNodeType } from '../helpers/getNodeType.js' -import { isNodeActive } from '../helpers/isNodeActive.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - toggleWrap: { - /** - * Wraps nodes in another node, or removes an existing wrap. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.toggleWrap('blockquote') - */ - toggleWrap: (typeOrName: string | NodeType, attributes?: Record) => ReturnType - } - } -} - -export const toggleWrap: RawCommands['toggleWrap'] = - (typeOrName, attributes = {}) => - ({ state, commands }) => { - const type = getNodeType(typeOrName, state.schema) - const isActive = isNodeActive(state, type, attributes) - - if (isActive) { - return commands.lift(type) - } - - return commands.wrapIn(type, attributes) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/undoInputRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/undoInputRule.ts deleted file mode 100644 index 211e6c9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/undoInputRule.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - undoInputRule: { - /** - * Undo an input rule. - * @example editor.commands.undoInputRule() - */ - undoInputRule: () => ReturnType - } - } -} - -export const undoInputRule: RawCommands['undoInputRule'] = - () => - ({ state, dispatch }) => { - const plugins = state.plugins - - for (let i = 0; i < plugins.length; i += 1) { - const plugin = plugins[i] - let undoable - - // @ts-ignore - // oxlint-disable-next-line - if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) { - if (dispatch) { - const tr = state.tr - const toUndo = undoable.transform - - for (let j = toUndo.steps.length - 1; j >= 0; j -= 1) { - tr.step(toUndo.steps[j].invert(toUndo.docs[j])) - } - - if (undoable.text) { - const marks = tr.doc.resolve(undoable.from).marks() - - tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks)) - } else { - tr.delete(undoable.from, undoable.to) - } - } - - return true - } - } - - return false - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetAllMarks.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetAllMarks.ts deleted file mode 100644 index 4e3ce9a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetAllMarks.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - unsetAllMarks: { - /** - * Remove all clearable marks in the current selection. - * Marks with `clearable: false` are preserved - * @param options.ignoreClearable If true, removes all marks regardless of `clearable` setting. Defaults to `false`. - * @example editor.commands.unsetAllMarks() - * @example editor.commands.unsetAllMarks({ ignoreClearable: true }) - */ - unsetAllMarks: (options?: { ignoreClearable?: boolean }) => ReturnType - } - } -} - -export const unsetAllMarks: RawCommands['unsetAllMarks'] = - (options = {}) => - ({ tr, dispatch, editor }) => { - const { ignoreClearable = false } = options - const { selection } = tr - const { empty, ranges } = selection - - if (empty) { - return true - } - - const { nonClearableMarks } = editor.extensionManager - - if (dispatch) { - const clearableMarkTypes = Object.values(editor.schema.marks).filter( - markType => ignoreClearable || !nonClearableMarks.includes(markType.name), - ) - - ranges.forEach(range => { - for (const markType of clearableMarkTypes) { - tr.removeMark(range.$from.pos, range.$to.pos, markType) - } - }) - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetMark.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetMark.ts deleted file mode 100644 index dd2c009..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetMark.ts +++ /dev/null @@ -1,65 +0,0 @@ -import type { MarkType } from '@tiptap/pm/model' - -import { getMarkRange } from '../helpers/getMarkRange.js' -import { getMarkType } from '../helpers/getMarkType.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - unsetMark: { - /** - * Remove all marks in the current selection. - * @param typeOrName The mark type or name. - * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`. - * @example editor.commands.unsetMark('bold') - */ - unsetMark: ( - /** - * The mark type or name. - */ - typeOrName: string | MarkType, - - options?: { - /** - * Removes the mark even across the current selection. Defaults to `false`. - */ - extendEmptyMarkRange?: boolean - }, - ) => ReturnType - } - } -} - -export const unsetMark: RawCommands['unsetMark'] = - (typeOrName, options = {}) => - ({ tr, state, dispatch }) => { - const { extendEmptyMarkRange = false } = options - const { selection } = tr - const type = getMarkType(typeOrName, state.schema) - const { $from, empty, ranges } = selection - - if (!dispatch) { - return true - } - - if (empty && extendEmptyMarkRange) { - let { from, to } = selection - const attrs = $from.marks().find(mark => mark.type === type)?.attrs - const range = getMarkRange($from, type, attrs) - - if (range) { - from = range.from - to = range.to - } - - tr.removeMark(from, to, type) - } else { - ranges.forEach(range => { - tr.removeMark(range.$from.pos, range.$to.pos, type) - }) - } - - tr.removeStoredMark(type) - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetTextDirection.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetTextDirection.ts deleted file mode 100644 index 5423f80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/unsetTextDirection.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { Range, RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - unsetTextDirection: { - /** - * Remove the text direction attribute from nodes. - * If no position is provided, it will use the current selection. - * @param position Optional position or range to remove the direction from - * @example editor.commands.unsetTextDirection() - * @example editor.commands.unsetTextDirection({ from: 0, to: 10 }) - */ - unsetTextDirection: (position?: number | Range) => ReturnType - } - } -} - -export const unsetTextDirection: RawCommands['unsetTextDirection'] = - position => - ({ tr, state, dispatch }) => { - const { selection } = state - let from: number - let to: number - - if (typeof position === 'number') { - from = position - to = position - } else if (position && 'from' in position && 'to' in position) { - from = position.from - to = position.to - } else { - from = selection.from - to = selection.to - } - - if (dispatch) { - tr.doc.nodesBetween(from, to, (node, pos) => { - if (node.isText) { - return - } - - const newAttrs = { ...node.attrs } - - delete newAttrs.dir - - tr.setNodeMarkup(pos, undefined, newAttrs) - }) - } - - return true - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/updateAttributes.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/updateAttributes.ts deleted file mode 100644 index a488065..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/updateAttributes.ts +++ /dev/null @@ -1,150 +0,0 @@ -import type { Mark, MarkType, Node, NodeType } from '@tiptap/pm/model' -import type { SelectionRange } from '@tiptap/pm/state' - -import { getMarkType } from '../helpers/getMarkType.js' -import { getNodeType } from '../helpers/getNodeType.js' -import { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - updateAttributes: { - /** - * Update attributes of a node or mark. - * @param typeOrName The type or name of the node or mark. - * @param attributes The attributes of the node or mark. - * @example editor.commands.updateAttributes('mention', { userId: "2" }) - */ - updateAttributes: ( - /** - * The type or name of the node or mark. - */ - typeOrName: string | NodeType | MarkType, - - /** - * The attributes of the node or mark. - */ - attributes: Record, - ) => ReturnType - } - } -} - -export const updateAttributes: RawCommands['updateAttributes'] = - (typeOrName, attributes = {}) => - ({ tr, state, dispatch }) => { - let nodeType: NodeType | null = null - let markType: MarkType | null = null - - const schemaType = getSchemaTypeNameByName( - typeof typeOrName === 'string' ? typeOrName : typeOrName.name, - state.schema, - ) - - if (!schemaType) { - return false - } - - if (schemaType === 'node') { - nodeType = getNodeType(typeOrName as NodeType, state.schema) - } - - if (schemaType === 'mark') { - markType = getMarkType(typeOrName as MarkType, state.schema) - } - - let canUpdate = false - - tr.selection.ranges.forEach((range: SelectionRange) => { - const from = range.$from.pos - const to = range.$to.pos - - let lastPos: number | undefined - let lastNode: Node | undefined - let trimmedFrom: number - let trimmedTo: number - - if (tr.selection.empty) { - state.doc.nodesBetween(from, to, (node: Node, pos: number) => { - if (nodeType && nodeType === node.type) { - canUpdate = true - trimmedFrom = Math.max(pos, from) - trimmedTo = Math.min(pos + node.nodeSize, to) - lastPos = pos - lastNode = node - } - }) - } else { - state.doc.nodesBetween(from, to, (node: Node, pos: number) => { - if (pos < from && nodeType && nodeType === node.type) { - canUpdate = true - trimmedFrom = Math.max(pos, from) - trimmedTo = Math.min(pos + node.nodeSize, to) - lastPos = pos - lastNode = node - } - - if (pos >= from && pos <= to) { - if (nodeType && nodeType === node.type) { - canUpdate = true - - if (dispatch) { - tr.setNodeMarkup(pos, undefined, { - ...node.attrs, - ...attributes, - }) - } - } - - if (markType && node.marks.length) { - node.marks.forEach((mark: Mark) => { - if (markType === mark.type) { - canUpdate = true - - if (dispatch) { - const trimmedFrom2 = Math.max(pos, from) - const trimmedTo2 = Math.min(pos + node.nodeSize, to) - - tr.addMark( - trimmedFrom2, - trimmedTo2, - markType.create({ - ...mark.attrs, - ...attributes, - }), - ) - } - } - }) - } - } - }) - } - - if (lastNode) { - if (lastPos !== undefined && dispatch) { - tr.setNodeMarkup(lastPos, undefined, { - ...lastNode.attrs, - ...attributes, - }) - } - - if (markType && lastNode.marks.length) { - lastNode.marks.forEach((mark: Mark) => { - if (markType === mark.type && dispatch) { - tr.addMark( - trimmedFrom, - trimmedTo, - markType.create({ - ...mark.attrs, - ...attributes, - }), - ) - } - }) - } - } - }) - - return canUpdate - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/wrapIn.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/wrapIn.ts deleted file mode 100644 index 7e39b28..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/wrapIn.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { wrapIn as originalWrapIn } from '@tiptap/pm/commands' -import type { NodeType } from '@tiptap/pm/model' - -import { getNodeType } from '../helpers/getNodeType.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - wrapIn: { - /** - * Wraps nodes in another node. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.wrapIn('blockquote') - */ - wrapIn: (typeOrName: string | NodeType, attributes?: Record) => ReturnType - } - } -} - -export const wrapIn: RawCommands['wrapIn'] = - (typeOrName, attributes = {}) => - ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema) - - return originalWrapIn(type, attributes)(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/wrapInList.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/wrapInList.ts deleted file mode 100644 index 66eec3a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/commands/wrapInList.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' -import { wrapInList as originalWrapInList } from '@tiptap/pm/schema-list' - -import { getNodeType } from '../helpers/getNodeType.js' -import type { RawCommands } from '../types.js' - -declare module '@tiptap/core' { - interface Commands { - wrapInList: { - /** - * Wrap a node in a list. - * @param typeOrName The type or name of the node. - * @param attributes The attributes of the node. - * @example editor.commands.wrapInList('bulletList') - */ - wrapInList: (typeOrName: string | NodeType, attributes?: Record) => ReturnType - } - } -} - -export const wrapInList: RawCommands['wrapInList'] = - (typeOrName, attributes = {}) => - ({ state, dispatch }) => { - const type = getNodeType(typeOrName, state.schema) - - return originalWrapInList(type, attributes)(state, dispatch) - } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.ts deleted file mode 100644 index ac2123a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Plugin, PluginKey } from '@tiptap/pm/state' - -import { Extension } from '../Extension.js' -import { getTextBetween } from '../helpers/getTextBetween.js' -import { getTextSerializersFromSchema } from '../helpers/getTextSerializersFromSchema.js' - -export type ClipboardTextSerializerOptions = { - blockSeparator?: string -} - -export const ClipboardTextSerializer = Extension.create({ - name: 'clipboardTextSerializer', - - addOptions() { - return { - blockSeparator: undefined, - } - }, - - addProseMirrorPlugins() { - return [ - new Plugin({ - key: new PluginKey('clipboardTextSerializer'), - props: { - clipboardTextSerializer: () => { - const { editor } = this - const { state, schema } = editor - const { doc, selection } = state - const textSerializers = getTextSerializersFromSchema(schema) - const { blockSeparator } = this.options - const options = { - ...(blockSeparator !== undefined ? { blockSeparator } : {}), - textSerializers, - } - - // Serialize each selection range independently and join the results. - // CellSelection exposes one range per selected cell; flattening to - // min(from)/max(to) would pull in unselected cells between them. - // Sort by document position so reverse selections (e.g. dragging - // upward) still emit text in document order. - const sortedRanges = [...selection.ranges].sort((a, b) => a.$from.pos - b.$from.pos) - - return sortedRanges - .map(({ $from, $to }) => - getTextBetween(doc, { from: $from.pos, to: $to.pos }, options), - ) - .join(blockSeparator ?? '\n\n') - }, - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/commands.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/commands.ts deleted file mode 100644 index e25e3bd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/commands.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as commands from '../commands/index.js' -import { Extension } from '../Extension.js' - -export * from '../commands/index.js' - -export const Commands = Extension.create({ - name: 'commands', - - addCommands() { - return { - ...commands, - } - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/delete.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/delete.ts deleted file mode 100644 index c6ae61b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/delete.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { RemoveMarkStep } from '@tiptap/pm/transform' - -import { Extension } from '../Extension.js' -import { combineTransactionSteps, getChangedRanges } from '../helpers/index.js' - -/** - * This extension allows you to be notified when the user deletes content you are interested in. - */ -export const Delete = Extension.create({ - name: 'delete', - - onUpdate({ transaction, appendedTransactions }) { - const callback = () => { - if ( - this.editor.options.coreExtensionOptions?.delete?.filterTransaction?.(transaction) ?? - transaction.getMeta('y-sync$') - ) { - return - } - const nextTransaction = combineTransactionSteps(transaction.before, [ - transaction, - ...appendedTransactions, - ]) - const changes = getChangedRanges(nextTransaction) - - changes.forEach(change => { - if ( - nextTransaction.mapping.mapResult(change.oldRange.from).deletedAfter && - nextTransaction.mapping.mapResult(change.oldRange.to).deletedBefore - ) { - nextTransaction.before.nodesBetween( - change.oldRange.from, - change.oldRange.to, - (node, from) => { - const to = from + node.nodeSize - 2 - const isFullyWithinRange = change.oldRange.from <= from && to <= change.oldRange.to - - this.editor.emit('delete', { - type: 'node', - node, - from, - to, - newFrom: nextTransaction.mapping.map(from), - newTo: nextTransaction.mapping.map(to), - deletedRange: change.oldRange, - newRange: change.newRange, - partial: !isFullyWithinRange, - editor: this.editor, - transaction, - combinedTransform: nextTransaction, - }) - }, - ) - } - }) - - const mapping = nextTransaction.mapping - nextTransaction.steps.forEach((step, index) => { - if (step instanceof RemoveMarkStep) { - const newStart = mapping.slice(index).map(step.from, -1) - const newEnd = mapping.slice(index).map(step.to) - const oldStart = mapping.invert().map(newStart, -1) - const oldEnd = mapping.invert().map(newEnd) - - const foundBeforeMark = - newStart > 0 - ? nextTransaction.doc.nodeAt(newStart - 1)?.marks.some(mark => mark.eq(step.mark)) - : false - const foundAfterMark = nextTransaction.doc - .nodeAt(newEnd) - ?.marks.some(mark => mark.eq(step.mark)) - - this.editor.emit('delete', { - type: 'mark', - mark: step.mark, - from: step.from, - to: step.to, - deletedRange: { - from: oldStart, - to: oldEnd, - }, - newRange: { - from: newStart, - to: newEnd, - }, - partial: Boolean(foundAfterMark || foundBeforeMark), - editor: this.editor, - transaction, - combinedTransform: nextTransaction, - }) - } - }) - } - - if (this.editor.options.coreExtensionOptions?.delete?.async ?? true) { - setTimeout(callback, 0) - } else { - callback() - } - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/drop.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/drop.ts deleted file mode 100644 index 0d079a0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/drop.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Plugin, PluginKey } from '@tiptap/pm/state' - -import { Extension } from '../Extension.js' - -export const Drop = Extension.create({ - name: 'drop', - - addProseMirrorPlugins() { - return [ - new Plugin({ - key: new PluginKey('tiptapDrop'), - - props: { - handleDrop: (_, e, slice, moved) => { - this.editor.emit('drop', { - editor: this.editor, - event: e, - slice, - moved, - }) - }, - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/editable.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/editable.ts deleted file mode 100644 index 60c977d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/editable.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Plugin, PluginKey } from '@tiptap/pm/state' - -import { Extension } from '../Extension.js' - -export const Editable = Extension.create({ - name: 'editable', - - addProseMirrorPlugins() { - return [ - new Plugin({ - key: new PluginKey('editable'), - props: { - editable: () => this.editor.options.editable, - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/focusEvents.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/focusEvents.ts deleted file mode 100644 index 69d03ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/focusEvents.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Plugin, PluginKey } from '@tiptap/pm/state' - -import { Extension } from '../Extension.js' - -export const focusEventsPluginKey = new PluginKey('focusEvents') - -export const FocusEvents = Extension.create({ - name: 'focusEvents', - - addProseMirrorPlugins() { - const { editor } = this - - return [ - new Plugin({ - key: focusEventsPluginKey, - props: { - handleDOMEvents: { - focus: (view, event: Event) => { - editor.isFocused = true - - const transaction = editor.state.tr - .setMeta('focus', { event }) - .setMeta('addToHistory', false) - - view.dispatch(transaction) - - return false - }, - blur: (view, event: Event) => { - editor.isFocused = false - - const transaction = editor.state.tr - .setMeta('blur', { event }) - .setMeta('addToHistory', false) - - view.dispatch(transaction) - - return false - }, - }, - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/index.ts deleted file mode 100644 index f962aff..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export { ClipboardTextSerializer } from './clipboardTextSerializer.js' -export { Commands } from './commands.js' -export { Delete } from './delete.js' -export { Drop } from './drop.js' -export { Editable } from './editable.js' -export { FocusEvents, focusEventsPluginKey } from './focusEvents.js' -export { Keymap } from './keymap.js' -export { Paste } from './paste.js' -export { Tabindex } from './tabindex.js' -export { TextDirection } from './textDirection.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/keymap.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/keymap.ts deleted file mode 100644 index 3d3b75a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/keymap.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { Plugin, PluginKey, Selection } from '@tiptap/pm/state' - -import { CommandManager } from '../CommandManager.js' -import { Extension } from '../Extension.js' -import { createChainableState } from '../helpers/createChainableState.js' -import { isNodeEmpty } from '../helpers/isNodeEmpty.js' -import { isiOS } from '../utilities/isiOS.js' -import { isMacOS } from '../utilities/isMacOS.js' - -export const Keymap = Extension.create({ - name: 'keymap', - - addKeyboardShortcuts() { - const handleBackspace = () => - this.editor.commands.first(({ commands }) => [ - () => commands.undoInputRule(), - - // maybe convert first text block node to default node - () => - commands.command(({ tr }) => { - const { selection, doc } = tr - const { empty, $anchor } = selection - const { pos, parent } = $anchor - const $parentPos = - $anchor.parent.isTextblock && pos > 0 ? tr.doc.resolve(pos - 1) : $anchor - const parentIsIsolating = $parentPos.parent.type.spec.isolating - - const parentPos = $anchor.pos - $anchor.parentOffset - - const isAtStart = - parentIsIsolating && $parentPos.parent.childCount === 1 - ? parentPos === $anchor.pos - : Selection.atStart(doc).from === pos - - if ( - !empty || - !parent.type.isTextblock || - parent.textContent.length || - !isAtStart || - (isAtStart && $anchor.parent.type.name === 'paragraph') // prevent clearNodes when no nodes to clear, otherwise history stack is appended - ) { - return false - } - - return commands.clearNodes() - }), - - () => commands.deleteSelection(), - () => commands.joinBackward(), - () => commands.selectNodeBackward(), - ]) - - const handleDelete = () => - this.editor.commands.first(({ commands }) => [ - () => commands.deleteSelection(), - () => commands.deleteCurrentNode(), - () => commands.joinForward(), - () => commands.selectNodeForward(), - ]) - - const handleEnter = () => - this.editor.commands.first(({ commands }) => [ - () => commands.newlineInCode(), - () => commands.createParagraphNear(), - () => commands.liftEmptyBlock(), - () => commands.splitBlock(), - ]) - - const baseKeymap = { - Enter: handleEnter, - 'Mod-Enter': () => this.editor.commands.exitCode(), - Backspace: handleBackspace, - 'Mod-Backspace': handleBackspace, - 'Shift-Backspace': handleBackspace, - Delete: handleDelete, - 'Mod-Delete': handleDelete, - 'Mod-a': () => this.editor.commands.selectAll(), - } - - const pcKeymap = { - ...baseKeymap, - } - - const macKeymap = { - ...baseKeymap, - 'Ctrl-h': handleBackspace, - 'Alt-Backspace': handleBackspace, - 'Ctrl-d': handleDelete, - 'Ctrl-Alt-Backspace': handleDelete, - 'Alt-Delete': handleDelete, - 'Alt-d': handleDelete, - 'Ctrl-a': () => this.editor.commands.selectTextblockStart(), - 'Ctrl-e': () => this.editor.commands.selectTextblockEnd(), - } - - if (isiOS() || isMacOS()) { - return macKeymap - } - - return pcKeymap - }, - - addProseMirrorPlugins() { - return [ - // With this plugin we check if the whole document was selected and deleted. - // In this case we will additionally call `clearNodes()` to convert e.g. a heading - // to a paragraph if necessary. - // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well - // with many other commands. - new Plugin({ - key: new PluginKey('clearDocument'), - appendTransaction: (transactions, oldState, newState) => { - if (transactions.some(tr => tr.getMeta('composition'))) { - return - } - - const docChanges = - transactions.some(transaction => transaction.docChanged) && - !oldState.doc.eq(newState.doc) - - const ignoreTr = transactions.some(transaction => - transaction.getMeta('preventClearDocument'), - ) - - if (!docChanges || ignoreTr) { - return - } - - const { empty, from, to } = oldState.selection - const allFrom = Selection.atStart(oldState.doc).from - const allEnd = Selection.atEnd(oldState.doc).to - const allWasSelected = from === allFrom && to === allEnd - - if (empty || !allWasSelected) { - return - } - - const isEmpty = isNodeEmpty(newState.doc) - - if (!isEmpty) { - return - } - - const tr = newState.tr - const state = createChainableState({ - state: newState, - transaction: tr, - }) - const { commands } = new CommandManager({ - editor: this.editor, - state, - }) - - commands.clearNodes() - - if (!tr.steps.length) { - return - } - - return tr - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/paste.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/paste.ts deleted file mode 100644 index 82ce7a4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/paste.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Plugin, PluginKey } from '@tiptap/pm/state' - -import { Extension } from '../Extension.js' - -export const Paste = Extension.create({ - name: 'paste', - - addProseMirrorPlugins() { - return [ - new Plugin({ - key: new PluginKey('tiptapPaste'), - - props: { - handlePaste: (_view, e, slice) => { - this.editor.emit('paste', { - editor: this.editor, - event: e, - slice, - }) - }, - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/tabindex.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/tabindex.ts deleted file mode 100644 index aa886c8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/tabindex.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Plugin, PluginKey } from '@tiptap/pm/state' - -import { Extension } from '../Extension.js' - -/** - * Options for the Tabindex extension. - */ -export type TabindexOptions = { - /** - * The value for the `tabindex` attribute on the editor element. - * When undefined, editable editors default to `0` and non-editable editors get no tabindex. - */ - value?: string -} - -/** - * The Tabindex extension adds a configurable tabindex attribute to the editor. - * - * By default, the editor gets tabindex="0" when editable. This can be customized - * via coreExtensionOptions to support specific focus ordering requirements in forms - * or to enable focusing on non-editable editors. - * - * @example - * ```ts - * new Editor({ - * coreExtensionOptions: { - * tabindex: { - * value: '-1', - * }, - * }, - * }) - * ``` - */ -export const Tabindex = Extension.create({ - name: 'tabindex', - - addOptions() { - return { - value: undefined, - } - }, - - addProseMirrorPlugins() { - return [ - new Plugin({ - key: new PluginKey('tabindex'), - props: { - attributes: (): { [name: string]: string } => { - if (!this.editor.isEditable && this.options.value === undefined) { - return {} - } - return { tabindex: this.options.value ?? '0' } - }, - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/textDirection.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/textDirection.ts deleted file mode 100644 index be6c2fc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/extensions/textDirection.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { Plugin, PluginKey } from '@tiptap/pm/state' - -import { Extension } from '../Extension.js' -import { splitExtensions } from '../helpers/splitExtensions.js' - -export interface TextDirectionOptions { - direction: 'ltr' | 'rtl' | 'auto' | undefined -} - -/** - * The TextDirection extension adds support for setting text direction (LTR/RTL/auto) - * on all nodes in the editor. - * - * This extension adds a global `dir` attribute to all node types, which can be used - * to control bidirectional text rendering. The direction can be set globally via - * editor options or per-node using commands. - */ -export const TextDirection = Extension.create({ - name: 'textDirection', - - addOptions() { - return { - direction: undefined, - } - }, - - addGlobalAttributes() { - // Only add the dir attribute to nodes if text direction is configured - // This prevents null/undefined values from appearing in JSON exports - if (!this.options.direction) { - return [] - } - - const { nodeExtensions } = splitExtensions(this.extensions) - - return [ - { - types: nodeExtensions - .filter(extension => extension.name !== 'text') - .map(extension => extension.name), - attributes: { - dir: { - default: this.options.direction, - parseHTML: element => { - const dir = element.getAttribute('dir') - - if (dir && (dir === 'ltr' || dir === 'rtl' || dir === 'auto')) { - return dir - } - - return this.options.direction - }, - renderHTML: attributes => { - if (!attributes.dir) { - return {} - } - - return { - dir: attributes.dir, - } - }, - }, - }, - }, - ] - }, - - addProseMirrorPlugins() { - return [ - new Plugin({ - key: new PluginKey('textDirection'), - props: { - attributes: (): { [name: string]: string } => { - const direction = this.options.direction - - if (!direction) { - return {} - } - - return { - dir: direction, - } - }, - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/MappablePosition.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/MappablePosition.ts deleted file mode 100644 index 3d07569..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/MappablePosition.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { Transaction } from '@tiptap/pm/state' -import type { MapResult } from '@tiptap/pm/transform' - -/** - * A class that represents a mappable position in the editor. It can be extended - * by other extensions to add additional position mapping capabilities. - */ -export class MappablePosition { - /** - * The absolute position in the editor. - */ - public position: number - - constructor(position: number) { - this.position = position - } - - /** - * Creates a MappablePosition from a JSON object. - */ - static fromJSON(json: any): MappablePosition { - return new MappablePosition(json.position) - } - - /** - * Converts the MappablePosition to a JSON object. - */ - toJSON(): any { - return { - position: this.position, - } - } -} - -/** - * The result of the getUpdatedPosition function. - */ -export interface GetUpdatedPositionResult { - position: MappablePosition - mapResult: MapResult | null -} - -/** - * Calculates the new position after applying a transaction. - * - * @returns The new mappable position and the map result. - */ -export function getUpdatedPosition( - position: MappablePosition, - transaction: Transaction, -): GetUpdatedPositionResult { - const mapResult = transaction.mapping.mapResult(position.position) - return { - position: new MappablePosition(mapResult.pos), - mapResult, - } -} - -/** - * Creates a MappablePosition from a position number. This is the default - * implementation for Tiptap core. It can be overridden by other Tiptap - * extensions. - * - * @param position The position (as a number) where the MappablePosition will be created. - * @returns A new MappablePosition instance at the given position. - */ -export function createMappablePosition(position: number): MappablePosition { - return new MappablePosition(position) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/combineTransactionSteps.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/combineTransactionSteps.ts deleted file mode 100644 index 3f6af72..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/combineTransactionSteps.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' -import type { Transaction } from '@tiptap/pm/state' -import { Transform } from '@tiptap/pm/transform' - -/** - * Returns a new `Transform` based on all steps of the passed transactions. - * @param oldDoc The Prosemirror node to start from - * @param transactions The transactions to combine - * @returns A new `Transform` with all steps of the passed transactions - */ -export function combineTransactionSteps( - oldDoc: ProseMirrorNode, - transactions: Transaction[], -): Transform { - const transform = new Transform(oldDoc) - - transactions.forEach(transaction => { - transaction.steps.forEach(step => { - transform.step(step) - }) - }) - - return transform -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createChainableState.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createChainableState.ts deleted file mode 100644 index 0c795a5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createChainableState.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { EditorState, Transaction } from '@tiptap/pm/state' - -/** - * Takes a Transaction & Editor State and turns it into a chainable state object - * @param config The transaction and state to create the chainable state from - * @returns A chainable Editor state object - */ -export function createChainableState(config: { - transaction: Transaction - state: EditorState -}): EditorState { - const { state, transaction } = config - let { selection } = transaction - let { doc } = transaction - let { storedMarks } = transaction - - return { - ...state, - apply: state.apply.bind(state), - applyTransaction: state.applyTransaction.bind(state), - plugins: state.plugins, - schema: state.schema, - reconfigure: state.reconfigure.bind(state), - toJSON: state.toJSON.bind(state), - get storedMarks() { - return storedMarks - }, - get selection() { - return selection - }, - get doc() { - return doc - }, - get tr() { - selection = transaction.selection - doc = transaction.doc - storedMarks = transaction.storedMarks - - return transaction - }, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createDocument.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createDocument.ts deleted file mode 100644 index 395f9f7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createDocument.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { Fragment, Node as ProseMirrorNode, ParseOptions, Schema } from '@tiptap/pm/model' - -import type { Content } from '../types.js' -import { createNodeFromContent } from './createNodeFromContent.js' - -/** - * Create a new Prosemirror document node from content. - * @param content The JSON or HTML content to create the document from - * @param schema The Prosemirror schema to use for the document - * @param parseOptions Options for the parser - * @returns The created Prosemirror document node - */ -export function createDocument( - content: Content | ProseMirrorNode | Fragment, - schema: Schema, - parseOptions: ParseOptions = {}, - options: { errorOnInvalidContent?: boolean } = {}, -): ProseMirrorNode { - return createNodeFromContent(content, schema, { - slice: false, - parseOptions, - errorOnInvalidContent: options.errorOnInvalidContent, - }) as ProseMirrorNode -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createNodeFromContent.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createNodeFromContent.ts deleted file mode 100644 index 31db037..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/createNodeFromContent.ts +++ /dev/null @@ -1,125 +0,0 @@ -import type { ParseOptions } from '@tiptap/pm/model' -import { DOMParser, Fragment, Node as ProseMirrorNode, Schema } from '@tiptap/pm/model' - -import type { Content } from '../types.js' -import { elementFromString } from '../utilities/elementFromString.js' - -export type CreateNodeFromContentOptions = { - slice?: boolean - parseOptions?: ParseOptions - errorOnInvalidContent?: boolean -} - -/** - * Takes a JSON or HTML content and creates a Prosemirror node or fragment from it. - * @param content The JSON or HTML content to create the node from - * @param schema The Prosemirror schema to use for the node - * @param options Options for the parser - * @returns The created Prosemirror node or fragment - */ -export function createNodeFromContent( - content: Content | ProseMirrorNode | Fragment, - schema: Schema, - options?: CreateNodeFromContentOptions, -): ProseMirrorNode | Fragment { - if (content instanceof ProseMirrorNode || content instanceof Fragment) { - return content - } - options = { - slice: true, - parseOptions: {}, - ...options, - } - - const isJSONContent = typeof content === 'object' && content !== null - const isTextContent = typeof content === 'string' - - if (isJSONContent) { - try { - const isArrayContent = Array.isArray(content) && content.length > 0 - - // if the JSON Content is an array of nodes, create a fragment for each node - if (isArrayContent) { - return Fragment.fromArray(content.map(item => schema.nodeFromJSON(item))) - } - - const node = schema.nodeFromJSON(content) - - if (options.errorOnInvalidContent) { - node.check() - } - - return node - } catch (error) { - if (options.errorOnInvalidContent) { - throw new Error('[tiptap error]: Invalid JSON content', { cause: error as Error }) - } - - console.warn('[tiptap warn]: Invalid content.', 'Passed value:', content, 'Error:', error) - - return createNodeFromContent('', schema, options) - } - } - - if (isTextContent) { - // Check for invalid content - if (options.errorOnInvalidContent) { - let hasInvalidContent = false - let invalidContent = '' - - // A copy of the current schema with a catch-all node at the end - const contentCheckSchema = new Schema({ - topNode: schema.spec.topNode, - marks: schema.spec.marks, - // Prosemirror's schemas are executed such that: the last to execute, matches last - // This means that we can add a catch-all node at the end of the schema to catch any content that we don't know how to handle - nodes: schema.spec.nodes.append({ - __tiptap__private__unknown__catch__all__node: { - content: 'inline*', - group: 'block', - parseDOM: [ - { - tag: '*', - getAttrs: e => { - // If this is ever called, we know that the content has something that we don't know how to handle in the schema - hasInvalidContent = true - // Try to stringify the element for a more helpful error message - invalidContent = typeof e === 'string' ? e : e.outerHTML - return null - }, - }, - ], - }, - }), - }) - - if (options.slice) { - DOMParser.fromSchema(contentCheckSchema).parseSlice( - elementFromString(content), - options.parseOptions, - ) - } else { - DOMParser.fromSchema(contentCheckSchema).parse( - elementFromString(content), - options.parseOptions, - ) - } - - if (options.errorOnInvalidContent && hasInvalidContent) { - throw new Error('[tiptap error]: Invalid HTML content', { - cause: new Error(`Invalid element found: ${invalidContent}`), - }) - } - } - - const parser = DOMParser.fromSchema(schema) - - if (options.slice) { - return parser.parseSlice(elementFromString(content), options.parseOptions).content - } - - return parser.parse(elementFromString(content), options.parseOptions) - } - - return createNodeFromContent('', schema, options) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/defaultBlockAt.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/defaultBlockAt.ts deleted file mode 100644 index fbd00d9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/defaultBlockAt.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { ContentMatch, NodeType } from '@tiptap/pm/model' - -/** - * Gets the default block type at a given match - * @param match The content match to get the default block type from - * @returns The default block type or null - */ -export function defaultBlockAt(match: ContentMatch): NodeType | null { - for (let i = 0; i < match.edgeCount; i += 1) { - const { type } = match.edge(i) - - if (type.isTextblock && !type.hasRequiredAttrs()) { - return type - } - } - - return null -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findChildren.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findChildren.ts deleted file mode 100644 index d2509a4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findChildren.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' - -import type { NodeWithPos, Predicate } from '../types.js' - -/** - * Find children inside a Prosemirror node that match a predicate. - * @param node The Prosemirror node to search in - * @param predicate The predicate to match - * @returns An array of nodes with their positions - */ -export function findChildren(node: ProseMirrorNode, predicate: Predicate): NodeWithPos[] { - const nodesWithPos: NodeWithPos[] = [] - - node.descendants((child, pos) => { - if (predicate(child)) { - nodesWithPos.push({ - node: child, - pos, - }) - } - }) - - return nodesWithPos -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findChildrenInRange.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findChildrenInRange.ts deleted file mode 100644 index 593580c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findChildrenInRange.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' - -import type { NodeWithPos, Predicate, Range } from '../types.js' - -/** - * Same as `findChildren` but searches only within a `range`. - * @param node The Prosemirror node to search in - * @param range The range to search in - * @param predicate The predicate to match - * @returns An array of nodes with their positions - */ -export function findChildrenInRange( - node: ProseMirrorNode, - range: Range, - predicate: Predicate, -): NodeWithPos[] { - const nodesWithPos: NodeWithPos[] = [] - - // if (range.from === range.to) { - // const nodeAt = node.nodeAt(range.from) - - // if (nodeAt) { - // nodesWithPos.push({ - // node: nodeAt, - // pos: range.from, - // }) - // } - // } - - node.nodesBetween(range.from, range.to, (child, pos) => { - if (predicate(child)) { - nodesWithPos.push({ - node: child, - pos, - }) - } - }) - - return nodesWithPos -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findParentNode.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findParentNode.ts deleted file mode 100644 index 2ccccd4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findParentNode.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { Selection } from '@tiptap/pm/state' - -import type { Predicate } from '../types.js' -import { findParentNodeClosestToPos } from './findParentNodeClosestToPos.js' - -/** - * Finds the closest parent node to the current selection that matches a predicate. - * @param predicate The predicate to match - * @returns A command that finds the closest parent node to the current selection that matches the predicate - * @example ```js - * findParentNode(node => node.type.name === 'paragraph') - * ``` - */ -export function findParentNode( - predicate: Predicate, -): (selection: Selection) => ReturnType { - return (selection: Selection) => findParentNodeClosestToPos(selection.$from, predicate) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findParentNodeClosestToPos.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findParentNodeClosestToPos.ts deleted file mode 100644 index f019667..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/findParentNodeClosestToPos.ts +++ /dev/null @@ -1,37 +0,0 @@ -import type { Node as ProseMirrorNode, ResolvedPos } from '@tiptap/pm/model' - -import type { Predicate } from '../types.js' - -/** - * Finds the closest parent node to a resolved position that matches a predicate. - * @param $pos The resolved position to search from - * @param predicate The predicate to match - * @returns The closest parent node to the resolved position that matches the predicate - * @example ```js - * findParentNodeClosestToPos($from, node => node.type.name === 'paragraph') - * ``` - */ -export function findParentNodeClosestToPos( - $pos: ResolvedPos, - predicate: Predicate, -): - | { - pos: number - start: number - depth: number - node: ProseMirrorNode - } - | undefined { - for (let i = $pos.depth; i > 0; i -= 1) { - const node = $pos.node(i) - - if (predicate(node)) { - return { - pos: i > 0 ? $pos.before(i) : 0, - start: $pos.start(i), - depth: i, - node, - } - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/flattenExtensions.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/flattenExtensions.ts deleted file mode 100644 index a5778b6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/flattenExtensions.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { AnyConfig, Extensions } from '../types.js' -import { getExtensionField } from './getExtensionField.js' - -/** - * Create a flattened array of extensions by traversing the `addExtensions` field. - * @param extensions An array of Tiptap extensions - * @returns A flattened array of Tiptap extensions - */ -export function flattenExtensions(extensions: Extensions): Extensions { - return ( - extensions - .map(extension => { - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - } - - const addExtensions = getExtensionField( - extension, - 'addExtensions', - context, - ) - - if (addExtensions) { - return [extension, ...flattenExtensions(addExtensions())] - } - - return extension - }) - // `Infinity` will break TypeScript so we set a number that is probably high enough - .flat(10) - ) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateHTML.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateHTML.ts deleted file mode 100644 index 2c421d9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateHTML.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Node } from '@tiptap/pm/model' - -import type { Extensions, JSONContent } from '../types.js' -import { getHTMLFromFragment } from './getHTMLFromFragment.js' -import { getSchema } from './getSchema.js' - -/** - * Generate HTML from a JSONContent - * @param doc The JSONContent to generate HTML from - * @param extensions The extensions to use for the schema - * @returns The generated HTML - */ -export function generateHTML(doc: JSONContent, extensions: Extensions): string { - const schema = getSchema(extensions) - const contentNode = Node.fromJSON(schema, doc) - - return getHTMLFromFragment(contentNode.content, schema) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateJSON.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateJSON.ts deleted file mode 100644 index d1ef80e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateJSON.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { DOMParser } from '@tiptap/pm/model' - -import type { Extensions } from '../types.js' -import { elementFromString } from '../utilities/elementFromString.js' -import { getSchema } from './getSchema.js' - -/** - * Generate JSONContent from HTML - * @param html The HTML to generate JSONContent from - * @param extensions The extensions to use for the schema - * @returns The generated JSONContent - */ -export function generateJSON(html: string, extensions: Extensions): Record { - const schema = getSchema(extensions) - const dom = elementFromString(html) - - return DOMParser.fromSchema(schema).parse(dom).toJSON() -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateText.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateText.ts deleted file mode 100644 index effac27..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/generateText.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Node } from '@tiptap/pm/model' - -import type { Extensions, JSONContent, TextSerializer } from '../types.js' -import { getSchema } from './getSchema.js' -import { getText } from './getText.js' -import { getTextSerializersFromSchema } from './getTextSerializersFromSchema.js' - -/** - * Generate raw text from a JSONContent - * @param doc The JSONContent to generate text from - * @param extensions The extensions to use for the schema - * @param options Options for the text generation f.e. blockSeparator or textSerializers - * @returns The generated text - */ -export function generateText( - doc: JSONContent, - extensions: Extensions, - options?: { - blockSeparator?: string - textSerializers?: Record - }, -): string { - const { blockSeparator = '\n\n', textSerializers = {} } = options || {} - const schema = getSchema(extensions) - const contentNode = Node.fromJSON(schema, doc) - - return getText(contentNode, { - blockSeparator, - textSerializers: { - ...getTextSerializersFromSchema(schema), - ...textSerializers, - }, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getAttributes.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getAttributes.ts deleted file mode 100644 index eba7a09..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getAttributes.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { MarkType, NodeType } from '@tiptap/pm/model' -import type { EditorState } from '@tiptap/pm/state' - -import { getMarkAttributes } from './getMarkAttributes.js' -import { getNodeAttributes } from './getNodeAttributes.js' -import { getSchemaTypeNameByName } from './getSchemaTypeNameByName.js' - -/** - * Get node or mark attributes by type or name on the current editor state - * @param state The current editor state - * @param typeOrName The node or mark type or name - * @returns The attributes of the node or mark or an empty object - */ -export function getAttributes( - state: EditorState, - typeOrName: string | NodeType | MarkType, -): Record { - const schemaType = getSchemaTypeNameByName( - typeof typeOrName === 'string' ? typeOrName : typeOrName.name, - state.schema, - ) - - if (schemaType === 'node') { - return getNodeAttributes(state, typeOrName as NodeType) - } - - if (schemaType === 'mark') { - return getMarkAttributes(state, typeOrName as MarkType) - } - - return {} -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.ts deleted file mode 100644 index a1e8ef1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.ts +++ /dev/null @@ -1,120 +0,0 @@ -import type { MarkConfig, NodeConfig } from '../index.js' -import type { AnyConfig, Attribute, Attributes, ExtensionAttribute, Extensions } from '../types.js' -import { getExtensionField } from './getExtensionField.js' -import { splitExtensions } from './splitExtensions.js' - -/** - * Get a list of all extension attributes defined in `addAttribute` and `addGlobalAttribute`. - * @param extensions List of extensions - */ -export function getAttributesFromExtensions(extensions: Extensions): ExtensionAttribute[] { - const extensionAttributes: ExtensionAttribute[] = [] - const { nodeExtensions, markExtensions } = splitExtensions(extensions) - const nodeAndMarkExtensions = [...nodeExtensions, ...markExtensions] - const defaultAttribute: Required> & Pick = { - default: null, - validate: undefined, - rendered: true, - renderHTML: null, - parseHTML: null, - keepOnSplit: true, - isRequired: false, - } - - // Precompute lists of extension types for global attribute resolution - const nodeExtensionTypes = nodeExtensions.filter(ext => ext.name !== 'text').map(ext => ext.name) - const markExtensionTypes = markExtensions.map(ext => ext.name) - const allExtensionTypes = [...nodeExtensionTypes, ...markExtensionTypes] - - extensions.forEach(extension => { - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - extensions: nodeAndMarkExtensions, - } - - const addGlobalAttributes = getExtensionField( - extension, - 'addGlobalAttributes', - context, - ) - - if (!addGlobalAttributes) { - return - } - - const globalAttributes = addGlobalAttributes() - - globalAttributes.forEach(globalAttribute => { - // Resolve the types based on the string shorthand or explicit array - let resolvedTypes: string[] - if (Array.isArray(globalAttribute.types)) { - resolvedTypes = globalAttribute.types - } else if (globalAttribute.types === '*') { - resolvedTypes = allExtensionTypes - } else if (globalAttribute.types === 'nodes') { - resolvedTypes = nodeExtensionTypes - } else if (globalAttribute.types === 'marks') { - resolvedTypes = markExtensionTypes - } else { - resolvedTypes = [] - } - - resolvedTypes.forEach(type => { - Object.entries(globalAttribute.attributes).forEach(([name, attribute]) => { - extensionAttributes.push({ - type, - name, - attribute: { - ...defaultAttribute, - ...attribute, - }, - }) - }) - }) - }) - }) - - nodeAndMarkExtensions.forEach(extension => { - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - } - - const addAttributes = getExtensionField< - NodeConfig['addAttributes'] | MarkConfig['addAttributes'] - >(extension, 'addAttributes', context) - - if (!addAttributes) { - return - } - - // TODO: remove `as Attributes` - const attributes = addAttributes() as Attributes - - Object.entries(attributes).forEach(([name, attribute]) => { - const mergedAttr = { - ...defaultAttribute, - ...attribute, - } - - if (typeof mergedAttr?.default === 'function') { - mergedAttr.default = mergedAttr.default() - } - - if (mergedAttr?.isRequired && mergedAttr?.default === undefined) { - delete mergedAttr.default - } - - extensionAttributes.push({ - type: extension.name, - name, - attribute: mergedAttr, - }) - }) - }) - - return extensionAttributes -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getChangedRanges.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getChangedRanges.ts deleted file mode 100644 index 71a007f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getChangedRanges.ts +++ /dev/null @@ -1,85 +0,0 @@ -import type { Step, Transform } from '@tiptap/pm/transform' - -import type { Range } from '../types.js' -import { removeDuplicates } from '../utilities/removeDuplicates.js' - -export type ChangedRange = { - oldRange: Range - newRange: Range -} - -/** - * Removes duplicated ranges and ranges that are - * fully captured by other ranges. - */ -function simplifyChangedRanges(changes: ChangedRange[]): ChangedRange[] { - const uniqueChanges = removeDuplicates(changes) - - return uniqueChanges.length === 1 - ? uniqueChanges - : uniqueChanges.filter((change, index) => { - const rest = uniqueChanges.filter((_, i) => i !== index) - - return !rest.some(otherChange => { - return ( - change.oldRange.from >= otherChange.oldRange.from && - change.oldRange.to <= otherChange.oldRange.to && - change.newRange.from >= otherChange.newRange.from && - change.newRange.to <= otherChange.newRange.to - ) - }) - }) -} - -/** - * Returns a list of changed ranges - * based on the first and last state of all steps. - */ -export function getChangedRanges(transform: Transform): ChangedRange[] { - const { mapping, steps } = transform - const changes: ChangedRange[] = [] - - mapping.maps.forEach((stepMap, index) => { - const ranges: Range[] = [] - - // This accounts for step changes where no range was actually altered - // e.g. when setting a mark, node attribute, etc. - // @ts-ignore - if (!stepMap.ranges.length) { - const { from, to } = steps[index] as Step & { - from?: number - to?: number - } - - if (from === undefined || to === undefined) { - return - } - - ranges.push({ from, to }) - } else { - stepMap.forEach((from, to) => { - ranges.push({ from, to }) - }) - } - - ranges.forEach(({ from, to }) => { - const newStart = mapping.slice(index).map(from, -1) - const newEnd = mapping.slice(index).map(to) - const oldStart = mapping.invert().map(newStart, -1) - const oldEnd = mapping.invert().map(newEnd) - - changes.push({ - oldRange: { - from: oldStart, - to: oldEnd, - }, - newRange: { - from: newStart, - to: newEnd, - }, - }) - }) - }) - - return simplifyChangedRanges(changes) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getDebugJSON.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getDebugJSON.ts deleted file mode 100644 index a114ab3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getDebugJSON.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' - -import type { JSONContent } from '../types.js' - -interface DebugJSONContent extends JSONContent { - from: number - to: number -} - -export function getDebugJSON(node: ProseMirrorNode, startOffset = 0): DebugJSONContent { - const isTopNode = node.type === node.type.schema.topNodeType - const increment = isTopNode ? 0 : 1 - const from = startOffset - const to = from + node.nodeSize - const marks = node.marks.map(mark => { - const output: { type: string; attrs?: Record } = { - type: mark.type.name, - } - - if (Object.keys(mark.attrs).length) { - output.attrs = { ...mark.attrs } - } - - return output - }) - const attrs = { ...node.attrs } - const output: DebugJSONContent = { - type: node.type.name, - from, - to, - } - - if (Object.keys(attrs).length) { - output.attrs = attrs - } - - if (marks.length) { - output.marks = marks - } - - if (node.content.childCount) { - output.content = [] - - node.forEach((child, offset) => { - output.content?.push(getDebugJSON(child, startOffset + offset + increment)) - }) - } - - if (node.text) { - output.text = node.text - } - - return output -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getExtensionField.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getExtensionField.ts deleted file mode 100644 index 1406462..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getExtensionField.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { ExtensionConfig } from '../Extension.js' -import type { MarkConfig } from '../Mark.js' -import type { NodeConfig } from '../Node.js' -import type { AnyExtension, MaybeThisParameterType, RemoveThis } from '../types.js' - -/** - * Returns a field from an extension - * @param extension The Tiptap extension - * @param field The field, for example `renderHTML` or `priority` - * @param context The context object that should be passed as `this` into the function - * @returns The field value - */ -export function getExtensionField( - extension: E, - field: keyof ExtensionConfig | keyof MarkConfig | keyof NodeConfig, - context?: Omit, 'parent'>, -): RemoveThis { - if (extension.config[field as keyof typeof extension.config] === undefined && extension.parent) { - return getExtensionField(extension.parent, field, context) - } - - if (typeof extension.config[field as keyof typeof extension.config] === 'function') { - const value = (extension.config[field as keyof typeof extension.config] as any).bind({ - ...context, - parent: extension.parent ? getExtensionField(extension.parent, field, context) : null, - }) - - return value - } - - return extension.config[field as keyof typeof extension.config] as RemoveThis -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getHTMLFromFragment.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getHTMLFromFragment.ts deleted file mode 100644 index fa058f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getHTMLFromFragment.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Fragment, Schema } from '@tiptap/pm/model' -import { DOMSerializer } from '@tiptap/pm/model' - -export function getHTMLFromFragment(fragment: Fragment, schema: Schema): string { - const documentFragment = DOMSerializer.fromSchema(schema).serializeFragment(fragment) - - const temporaryDocument = document.implementation.createHTMLDocument() - const container = temporaryDocument.createElement('div') - - container.appendChild(documentFragment) - - return container.innerHTML -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkAttributes.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkAttributes.ts deleted file mode 100644 index 98df17f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkAttributes.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { Mark, MarkType } from '@tiptap/pm/model' -import type { EditorState } from '@tiptap/pm/state' - -import { getMarkType } from './getMarkType.js' - -export function getMarkAttributes( - state: EditorState, - typeOrName: string | MarkType, -): Record { - const type = getMarkType(typeOrName, state.schema) - const { from, to, empty } = state.selection - const marks: Mark[] = [] - - if (empty) { - if (state.storedMarks) { - marks.push(...state.storedMarks) - } - - marks.push(...state.selection.$head.marks()) - } else { - state.doc.nodesBetween(from, to, node => { - marks.push(...node.marks) - }) - } - - const mark = marks.find(markItem => markItem.type.name === type.name) - - if (!mark) { - return {} - } - - return { ...mark.attrs } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkRange.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkRange.ts deleted file mode 100644 index f7797be..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkRange.ts +++ /dev/null @@ -1,105 +0,0 @@ -import type { Mark as ProseMirrorMark, MarkType, ResolvedPos } from '@tiptap/pm/model' - -import type { Range } from '../types.js' -import { objectIncludes } from '../utilities/objectIncludes.js' - -function findMarkInSet( - marks: ProseMirrorMark[], - type: MarkType, - attributes: Record = {}, -): ProseMirrorMark | undefined { - return marks.find(item => { - return ( - item.type === type && - objectIncludes( - // Only check equality for the attributes that are provided - Object.fromEntries(Object.keys(attributes).map(k => [k, item.attrs[k]])), - attributes, - ) - ) - }) -} - -function isMarkInSet( - marks: ProseMirrorMark[], - type: MarkType, - attributes: Record = {}, -): boolean { - return !!findMarkInSet(marks, type, attributes) -} - -/** - * Get the range of a mark at a resolved position. - */ -export function getMarkRange( - /** - * The position to get the mark range for. - */ - $pos: ResolvedPos, - /** - * The mark type to get the range for. - */ - type: MarkType, - /** - * The attributes to match against. - * If not provided, only the first mark at the position will be matched. - */ - attributes?: Record, -): Range | void { - if (!$pos || !type) { - return - } - let start = $pos.parent.childAfter($pos.parentOffset) - - // If the cursor is at the start of a text node that does not have the mark, look backward - if (!start.node || !start.node.marks.some(mark => mark.type === type)) { - start = $pos.parent.childBefore($pos.parentOffset) - } - - // If there is no text node with the mark even backward, return undefined - if (!start.node || !start.node.marks.some(mark => mark.type === type)) { - return - } - - // Default to only matching against the attributes of the first mark with the given type - if (!attributes) { - const firstMark = start.node.marks.find(mark => mark.type === type) - if (firstMark) { - attributes = firstMark.attrs - } - } - - // We now know that the cursor is either at the start, middle or end of a text node with the specified mark - // so we can look it up on the targeted mark - const mark = findMarkInSet([...start.node.marks], type, attributes) - - if (!mark) { - return - } - - let startIndex = start.index - let startPos = $pos.start() + start.offset - let endIndex = startIndex + 1 - let endPos = startPos + start.node.nodeSize - - while ( - startIndex > 0 && - isMarkInSet([...$pos.parent.child(startIndex - 1).marks], type, attributes) - ) { - startIndex -= 1 - startPos -= $pos.parent.child(startIndex).nodeSize - } - - while ( - endIndex < $pos.parent.childCount && - isMarkInSet([...$pos.parent.child(endIndex).marks], type, attributes) - ) { - endPos += $pos.parent.child(endIndex).nodeSize - endIndex += 1 - } - - return { - from: startPos, - to: endPos, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkType.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkType.ts deleted file mode 100644 index 9889cdb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarkType.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { MarkType, Schema } from '@tiptap/pm/model' - -export function getMarkType(nameOrType: string | MarkType, schema: Schema): MarkType { - if (typeof nameOrType === 'string') { - if (!schema.marks[nameOrType]) { - throw Error( - `There is no mark type named '${nameOrType}'. Maybe you forgot to add the extension?`, - ) - } - - return schema.marks[nameOrType] - } - - return nameOrType -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarksBetween.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarksBetween.ts deleted file mode 100644 index 83fd10d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getMarksBetween.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' - -import type { MarkRange } from '../types.js' -import { getMarkRange } from './getMarkRange.js' - -export function getMarksBetween(from: number, to: number, doc: ProseMirrorNode): MarkRange[] { - const marks: MarkRange[] = [] - - // get all inclusive marks on empty selection - if (from === to) { - doc - .resolve(from) - .marks() - .forEach(mark => { - const $pos = doc.resolve(from) - const range = getMarkRange($pos, mark.type) - - if (!range) { - return - } - - marks.push({ - mark, - ...range, - }) - }) - } else { - doc.nodesBetween(from, to, (node, pos) => { - if (!node || node?.nodeSize === undefined) { - return - } - - marks.push( - ...node.marks.map(mark => ({ - from: pos, - to: pos + node.nodeSize, - mark, - })), - ) - }) - } - - return marks -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeAtPosition.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeAtPosition.ts deleted file mode 100644 index 114d30b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeAtPosition.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { Node, NodeType } from '@tiptap/pm/model' -import type { EditorState } from '@tiptap/pm/state' - -/** - * Finds the first node of a given type or name in the current selection. - * @param state The editor state. - * @param typeOrName The node type or name. - * @param pos The position to start searching from. - * @param maxDepth The maximum depth to search. - * @returns The node and the depth as an array. - */ -export const getNodeAtPosition = ( - state: EditorState, - typeOrName: string | NodeType, - pos: number, - maxDepth = 20, -) => { - const $pos = state.doc.resolve(pos) - - let currentDepth = maxDepth - let node: Node | null = null - - while (currentDepth > 0 && node === null) { - const currentNode = $pos.node(currentDepth) - - if (currentNode?.type.name === typeOrName) { - node = currentNode - } else { - currentDepth -= 1 - } - } - - return [node, currentDepth] as [Node | null, number] -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeAttributes.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeAttributes.ts deleted file mode 100644 index 092b3cf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeAttributes.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Node, NodeType } from '@tiptap/pm/model' -import type { EditorState } from '@tiptap/pm/state' - -import { getNodeType } from './getNodeType.js' - -export function getNodeAttributes( - state: EditorState, - typeOrName: string | NodeType, -): Record { - const type = getNodeType(typeOrName, state.schema) - const { from, to } = state.selection - const nodes: Node[] = [] - - state.doc.nodesBetween(from, to, node => { - nodes.push(node) - }) - - const node = nodes.reverse().find(nodeItem => nodeItem.type.name === type.name) - - if (!node) { - return {} - } - - return { ...node.attrs } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeType.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeType.ts deleted file mode 100644 index fe37402..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getNodeType.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { NodeType, Schema } from '@tiptap/pm/model' - -export function getNodeType(nameOrType: string | NodeType, schema: Schema): NodeType { - if (typeof nameOrType === 'string') { - if (!schema.nodes[nameOrType]) { - throw Error( - `There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`, - ) - } - - return schema.nodes[nameOrType] - } - - return nameOrType -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getRenderedAttributes.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getRenderedAttributes.ts deleted file mode 100644 index af27285..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getRenderedAttributes.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { Mark, Node } from '@tiptap/pm/model' - -import type { ExtensionAttribute } from '../types.js' -import { mergeAttributes } from '../utilities/mergeAttributes.js' - -export function getRenderedAttributes( - nodeOrMark: Node | Mark, - extensionAttributes: ExtensionAttribute[], -): Record { - return extensionAttributes - .filter(attribute => attribute.type === nodeOrMark.type.name) - .filter(item => item.attribute.rendered) - .map(item => { - if (!item.attribute.renderHTML) { - return { - [item.name]: nodeOrMark.attrs[item.name], - } - } - - return item.attribute.renderHTML(nodeOrMark.attrs) || {} - }) - .reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {}) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchema.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchema.ts deleted file mode 100644 index 51898b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchema.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Schema } from '@tiptap/pm/model' - -import type { Editor } from '../Editor.js' -import type { Extensions } from '../types.js' -import { getSchemaByResolvedExtensions } from './getSchemaByResolvedExtensions.js' -import { resolveExtensions } from './resolveExtensions.js' - -export function getSchema(extensions: Extensions, editor?: Editor): Schema { - const resolvedExtensions = resolveExtensions(extensions) - - return getSchemaByResolvedExtensions(resolvedExtensions, editor) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.ts deleted file mode 100644 index f576934..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.ts +++ /dev/null @@ -1,236 +0,0 @@ -import type { MarkSpec, NodeSpec, TagParseRule } from '@tiptap/pm/model' -import { Schema } from '@tiptap/pm/model' - -import type { Editor, MarkConfig, NodeConfig } from '../index.js' -import type { AnyConfig, Extensions } from '../types.js' -import { callOrReturn } from '../utilities/callOrReturn.js' -import { isEmptyObject } from '../utilities/isEmptyObject.js' -import { getAttributesFromExtensions } from './getAttributesFromExtensions.js' -import { getExtensionField } from './getExtensionField.js' -import { getRenderedAttributes } from './getRenderedAttributes.js' -import { injectExtensionAttributesToParseRule } from './injectExtensionAttributesToParseRule.js' -import { splitExtensions } from './splitExtensions.js' - -function cleanUpSchemaItem(data: T) { - return Object.fromEntries( - // @ts-ignore - Object.entries(data).filter(([key, value]) => { - if (key === 'attrs' && isEmptyObject(value as object | undefined)) { - return false - } - - return value !== null && value !== undefined - }), - ) as T -} - -/** - * Builds an attribute spec tuple for ProseMirror schema from an extension attribute. - * @param extensionAttribute The extension attribute to build the spec for - * @returns A tuple of [attributeName, spec] - */ -function buildAttributeSpec( - extensionAttribute: ReturnType[number], -): [string, Record] { - const spec: Record = {} - - // Only include 'default' if the attribute is not required and default is set on the attribute - if ( - !extensionAttribute?.attribute?.isRequired && - 'default' in (extensionAttribute?.attribute || {}) - ) { - spec.default = extensionAttribute.attribute.default - } - - // Only include 'validate' if it's defined - if (extensionAttribute?.attribute?.validate !== undefined) { - spec.validate = extensionAttribute.attribute.validate - } - - return [extensionAttribute.name, spec] -} - -/** - * Creates a new Prosemirror schema based on the given extensions. - * @param extensions An array of Tiptap extensions - * @param editor The editor instance - * @returns A Prosemirror schema - */ -export function getSchemaByResolvedExtensions(extensions: Extensions, editor?: Editor): Schema { - const allAttributes = getAttributesFromExtensions(extensions) - const { nodeExtensions, markExtensions } = splitExtensions(extensions) - const topNode = nodeExtensions.find(extension => getExtensionField(extension, 'topNode'))?.name - - const nodes = Object.fromEntries( - nodeExtensions.map(extension => { - const extensionAttributes = allAttributes.filter( - attribute => attribute.type === extension.name, - ) - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - editor, - } - - const extraNodeFields = extensions.reduce((fields, e) => { - const extendNodeSchema = getExtensionField( - e, - 'extendNodeSchema', - context, - ) - - return { - ...fields, - ...(extendNodeSchema ? extendNodeSchema(extension) : {}), - } - }, {}) - - const schema: NodeSpec = cleanUpSchemaItem({ - ...extraNodeFields, - content: callOrReturn( - getExtensionField(extension, 'content', context), - ), - marks: callOrReturn(getExtensionField(extension, 'marks', context)), - group: callOrReturn(getExtensionField(extension, 'group', context)), - inline: callOrReturn(getExtensionField(extension, 'inline', context)), - atom: callOrReturn(getExtensionField(extension, 'atom', context)), - selectable: callOrReturn( - getExtensionField(extension, 'selectable', context), - ), - draggable: callOrReturn( - getExtensionField(extension, 'draggable', context), - ), - code: callOrReturn(getExtensionField(extension, 'code', context)), - whitespace: callOrReturn( - getExtensionField(extension, 'whitespace', context), - ), - linebreakReplacement: callOrReturn( - getExtensionField( - extension, - 'linebreakReplacement', - context, - ), - ), - defining: callOrReturn( - getExtensionField(extension, 'defining', context), - ), - isolating: callOrReturn( - getExtensionField(extension, 'isolating', context), - ), - attrs: Object.fromEntries(extensionAttributes.map(buildAttributeSpec)), - }) - - const parseHTML = callOrReturn( - getExtensionField(extension, 'parseHTML', context), - ) - - if (parseHTML) { - schema.parseDOM = parseHTML.map(parseRule => - injectExtensionAttributesToParseRule(parseRule, extensionAttributes), - ) as TagParseRule[] - } - - const renderHTML = getExtensionField( - extension, - 'renderHTML', - context, - ) - - if (renderHTML) { - schema.toDOM = node => - renderHTML({ - node, - HTMLAttributes: getRenderedAttributes(node, extensionAttributes), - }) - } - - const renderText = getExtensionField( - extension, - 'renderText', - context, - ) - - if (renderText) { - schema.toText = renderText - } - - return [extension.name, schema] - }), - ) - - const marks = Object.fromEntries( - markExtensions.map(extension => { - const extensionAttributes = allAttributes.filter( - attribute => attribute.type === extension.name, - ) - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - editor, - } - - const extraMarkFields = extensions.reduce((fields, e) => { - const extendMarkSchema = getExtensionField( - e, - 'extendMarkSchema', - context, - ) - - return { - ...fields, - ...(extendMarkSchema ? extendMarkSchema(extension as any) : {}), - } - }, {}) - - const schema: MarkSpec = cleanUpSchemaItem({ - ...extraMarkFields, - inclusive: callOrReturn( - getExtensionField(extension, 'inclusive', context), - ), - excludes: callOrReturn( - getExtensionField(extension, 'excludes', context), - ), - group: callOrReturn(getExtensionField(extension, 'group', context)), - spanning: callOrReturn( - getExtensionField(extension, 'spanning', context), - ), - code: callOrReturn(getExtensionField(extension, 'code', context)), - attrs: Object.fromEntries(extensionAttributes.map(buildAttributeSpec)), - }) - - const parseHTML = callOrReturn( - getExtensionField(extension, 'parseHTML', context), - ) - - if (parseHTML) { - schema.parseDOM = parseHTML.map(parseRule => - injectExtensionAttributesToParseRule(parseRule, extensionAttributes), - ) - } - - const renderHTML = getExtensionField( - extension, - 'renderHTML', - context, - ) - - if (renderHTML) { - schema.toDOM = mark => - renderHTML({ - mark, - HTMLAttributes: getRenderedAttributes(mark, extensionAttributes), - }) - } - - return [extension.name, schema] - }), - ) - - return new Schema({ - topNode, - nodes, - marks, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaTypeByName.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaTypeByName.ts deleted file mode 100644 index f5e1b2b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaTypeByName.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { MarkType, NodeType, Schema } from '@tiptap/pm/model' - -/** - * Tries to get a node or mark type by its name. - * @param name The name of the node or mark type - * @param schema The Prosemiror schema to search in - * @returns The node or mark type, or null if it doesn't exist - */ -export function getSchemaTypeByName(name: string, schema: Schema): NodeType | MarkType | null { - return schema.nodes[name] || schema.marks[name] || null -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaTypeNameByName.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaTypeNameByName.ts deleted file mode 100644 index 63cce15..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSchemaTypeNameByName.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Schema } from '@tiptap/pm/model' - -/** - * Get the type of a schema item by its name. - * @param name The name of the schema item - * @param schema The Prosemiror schema to search in - * @returns The type of the schema item (`node` or `mark`), or null if it doesn't exist - */ -export function getSchemaTypeNameByName(name: string, schema: Schema): 'node' | 'mark' | null { - if (schema.nodes[name]) { - return 'node' - } - - if (schema.marks[name]) { - return 'mark' - } - - return null -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSplittedAttributes.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSplittedAttributes.ts deleted file mode 100644 index 4f194a9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getSplittedAttributes.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { ExtensionAttribute } from '../types.js' - -/** - * Return attributes of an extension that should be splitted by keepOnSplit flag - * @param extensionAttributes Array of extension attributes - * @param typeName The type of the extension - * @param attributes The attributes of the extension - * @returns The splitted attributes - */ -export function getSplittedAttributes( - extensionAttributes: ExtensionAttribute[], - typeName: string, - attributes: Record, -): Record { - return Object.fromEntries( - Object.entries(attributes).filter(([name]) => { - const extensionAttribute = extensionAttributes.find(item => { - return item.type === typeName && item.name === name - }) - - if (!extensionAttribute) { - return false - } - - return extensionAttribute.attribute.keepOnSplit - }), - ) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getText.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getText.ts deleted file mode 100644 index 553f670..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getText.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' - -import type { TextSerializer } from '../types.js' -import { getTextBetween } from './getTextBetween.js' - -/** - * Gets the text of a Prosemirror node - * @param node The Prosemirror node - * @param options Options for the text serializer & block separator - * @returns The text of the node - * @example ```js - * const text = getText(node, { blockSeparator: '\n' }) - * ``` - */ -export function getText( - node: ProseMirrorNode, - options?: { - blockSeparator?: string - textSerializers?: Record - }, -) { - const range = { - from: 0, - to: node.content.size, - } - - return getTextBetween(node, range, options) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextBetween.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextBetween.ts deleted file mode 100644 index d3b2a3b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextBetween.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' - -import type { Range, TextSerializer } from '../types.js' - -/** - * Gets the text between two positions in a Prosemirror node - * and serializes it using the given text serializers and block separator (see getText) - * @param startNode The Prosemirror node to start from - * @param range The range of the text to get - * @param options Options for the text serializer & block separator - * @returns The text between the two positions - */ -export function getTextBetween( - startNode: ProseMirrorNode, - range: Range, - options?: { - blockSeparator?: string - textSerializers?: Record - }, -): string { - const { from, to } = range - const { blockSeparator = '\n\n', textSerializers = {} } = options || {} - let text = '' - - startNode.nodesBetween(from, to, (node, pos, parent, index) => { - if (node.isBlock && pos > from) { - text += blockSeparator - } - - const textSerializer = textSerializers?.[node.type.name] - - if (textSerializer) { - if (parent) { - text += textSerializer({ - node, - pos, - parent, - index, - range, - }) - } - // do not descend into child nodes when there exists a serializer - return false - } - - if (node.isText) { - text += node?.text?.slice(Math.max(from, pos) - pos, to - pos) // oxlint-disable-line - } - }) - - return text -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.ts deleted file mode 100644 index 5a04a85..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { ResolvedPos } from '@tiptap/pm/model' - -/** - * Returns the text content of a resolved prosemirror position - * @param $from The resolved position to get the text content from - * @param maxMatch The maximum number of characters to match - * @returns The text content - */ -export const getTextContentFromNodes = ($from: ResolvedPos, maxMatch = 500) => { - let textBefore = '' - - const sliceEndPos = $from.parentOffset - - $from.parent.nodesBetween( - Math.max(0, sliceEndPos - maxMatch), - sliceEndPos, - (node, pos, parent, index) => { - const chunk = - node.type.spec.toText?.({ - node, - pos, - parent, - index, - }) || - node.textContent || - '%leaf%' - - textBefore += - node.isAtom && !node.isText ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos)) - }, - ) - - return textBefore -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextSerializersFromSchema.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextSerializersFromSchema.ts deleted file mode 100644 index fa99724..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/getTextSerializersFromSchema.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { Schema } from '@tiptap/pm/model' - -import type { TextSerializer } from '../types.js' - -/** - * Find text serializers `toText` in a Prosemirror schema - * @param schema The Prosemirror schema to search in - * @returns A record of text serializers by node name - */ -export function getTextSerializersFromSchema(schema: Schema): Record { - return Object.fromEntries( - Object.entries(schema.nodes) - .filter(([, node]) => node.spec.toText) - .map(([name, node]) => [name, node.spec.toText]), - ) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/index.ts deleted file mode 100644 index d9dd101..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/index.ts +++ /dev/null @@ -1,56 +0,0 @@ -export * from './combineTransactionSteps.js' -export * from './createChainableState.js' -export * from './createDocument.js' -export * from './createNodeFromContent.js' -export * from './defaultBlockAt.js' -export * from './findChildren.js' -export * from './findChildrenInRange.js' -export * from './findParentNode.js' -export * from './findParentNodeClosestToPos.js' -export * from './flattenExtensions.js' -export * from './generateHTML.js' -export * from './generateJSON.js' -export * from './generateText.js' -export * from './getAttributes.js' -export * from './getAttributesFromExtensions.js' -export * from './getChangedRanges.js' -export * from './getDebugJSON.js' -export * from './getExtensionField.js' -export * from './getHTMLFromFragment.js' -export * from './getMarkAttributes.js' -export * from './getMarkRange.js' -export * from './getMarksBetween.js' -export * from './getMarkType.js' -export * from './getNodeAtPosition.js' -export * from './getNodeAttributes.js' -export * from './getNodeType.js' -export * from './getRenderedAttributes.js' -export * from './getSchema.js' -export * from './getSchemaByResolvedExtensions.js' -export * from './getSchemaTypeByName.js' -export * from './getSchemaTypeNameByName.js' -export * from './getSplittedAttributes.js' -export * from './getText.js' -export * from './getTextBetween.js' -export * from './getTextContentFromNodes.js' -export * from './getTextSerializersFromSchema.js' -export * from './injectExtensionAttributesToParseRule.js' -export * from './isActive.js' -export * from './isAtEndOfNode.js' -export * from './isAtStartOfNode.js' -export * from './isExtensionRulesEnabled.js' -export * from './isList.js' -export * from './isMarkActive.js' -export * from './isNodeActive.js' -export * from './isNodeEmpty.js' -export * from './isNodeSelection.js' -export * from './isNodeViewSelected.js' -export * from './isTextSelection.js' -export * from './MappablePosition.js' -export * from './posToDOMRect.js' -export * from './resolveExtensions.js' -export * from './resolveFocusPosition.js' -export * from './rewriteUnknownContent.js' -export * from './selectionToInsertionEnd.js' -export * from './sortExtensions.js' -export * from './splitExtensions.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/injectExtensionAttributesToParseRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/injectExtensionAttributesToParseRule.ts deleted file mode 100644 index 32b8097..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/injectExtensionAttributesToParseRule.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { ParseRule } from '@tiptap/pm/model' - -import type { ExtensionAttribute } from '../types.js' -import { fromString } from '../utilities/fromString.js' - -/** - * This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`). - * Cancels when `getAttrs` returned `false`. - * @param parseRule ProseMirror ParseRule - * @param extensionAttributes List of attributes to inject - */ -export function injectExtensionAttributesToParseRule( - parseRule: ParseRule, - extensionAttributes: ExtensionAttribute[], -): ParseRule { - if ('style' in parseRule) { - return parseRule - } - - return { - ...parseRule, - getAttrs: (node: HTMLElement) => { - const oldAttributes = parseRule.getAttrs ? parseRule.getAttrs(node) : parseRule.attrs - - if (oldAttributes === false) { - return false - } - - const newAttributes = extensionAttributes.reduce((items, item) => { - const value = item.attribute.parseHTML - ? item.attribute.parseHTML(node) - : fromString(node.getAttribute(item.name)) - - if (value === null || value === undefined) { - return items - } - - return { - ...items, - [item.name]: value, - } - }, {}) - - return { ...oldAttributes, ...newAttributes } - }, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isActive.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isActive.ts deleted file mode 100644 index c9e006e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isActive.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { EditorState } from '@tiptap/pm/state' - -import { getSchemaTypeNameByName } from './getSchemaTypeNameByName.js' -import { isMarkActive } from './isMarkActive.js' -import { isNodeActive } from './isNodeActive.js' - -export function isActive( - state: EditorState, - name: string | null, - attributes: Record = {}, -): boolean { - if (!name) { - return isNodeActive(state, null, attributes) || isMarkActive(state, null, attributes) - } - - const schemaType = getSchemaTypeNameByName(name, state.schema) - - if (schemaType === 'node') { - return isNodeActive(state, name, attributes) - } - - if (schemaType === 'mark') { - return isMarkActive(state, name, attributes) - } - - return false -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isAtEndOfNode.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isAtEndOfNode.ts deleted file mode 100644 index 35efe32..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isAtEndOfNode.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { EditorState } from '@tiptap/pm/state' - -import { findParentNode } from './findParentNode.js' - -export const isAtEndOfNode = (state: EditorState, nodeType?: string) => { - const { $from, $to, $anchor } = state.selection - - if (nodeType) { - const parentNode = findParentNode(node => node.type.name === nodeType)(state.selection) - - if (!parentNode) { - return false - } - - const $parentPos = state.doc.resolve(parentNode.pos + 1) - - if ($anchor.pos + 1 === $parentPos.end()) { - return true - } - - return false - } - - if ($to.parentOffset < $to.parent.nodeSize - 2 || $from.pos !== $to.pos) { - return false - } - - return true -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isAtStartOfNode.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isAtStartOfNode.ts deleted file mode 100644 index a5b21ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isAtStartOfNode.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { EditorState } from '@tiptap/pm/state' - -export const isAtStartOfNode = (state: EditorState) => { - const { $from, $to } = state.selection - - if ($from.parentOffset > 0 || $from.pos !== $to.pos) { - return false - } - - return true -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isExtensionRulesEnabled.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isExtensionRulesEnabled.ts deleted file mode 100644 index c9d91ea..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isExtensionRulesEnabled.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { AnyExtension, EnableRules } from '../types.js' - -export function isExtensionRulesEnabled(extension: AnyExtension, enabled: EnableRules): boolean { - if (Array.isArray(enabled)) { - return enabled.some(enabledExtension => { - const name = typeof enabledExtension === 'string' ? enabledExtension : enabledExtension.name - - return name === extension.name - }) - } - - return enabled -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isList.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isList.ts deleted file mode 100644 index 40088bd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isList.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { getExtensionField } from '../helpers/getExtensionField.js' -import type { NodeConfig } from '../index.js' -import type { Extensions } from '../types.js' -import { callOrReturn } from '../utilities/callOrReturn.js' -import { splitExtensions } from './splitExtensions.js' - -export function isList(name: string, extensions: Extensions): boolean { - const { nodeExtensions } = splitExtensions(extensions) - const extension = nodeExtensions.find(item => item.name === name) - - if (!extension) { - return false - } - - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - } - const group = callOrReturn(getExtensionField(extension, 'group', context)) - - if (typeof group !== 'string') { - return false - } - - return group.split(' ').includes('list') -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isMarkActive.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isMarkActive.ts deleted file mode 100644 index ddfc31e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isMarkActive.ts +++ /dev/null @@ -1,94 +0,0 @@ -import type { MarkType } from '@tiptap/pm/model' -import type { EditorState } from '@tiptap/pm/state' - -import type { MarkRange } from '../types.js' -import { objectIncludes } from '../utilities/objectIncludes.js' -import { getMarkType } from './getMarkType.js' - -export function isMarkActive( - state: EditorState, - typeOrName: MarkType | string | null, - attributes: Record = {}, -): boolean { - const { empty, ranges } = state.selection - const type = typeOrName ? getMarkType(typeOrName, state.schema) : null - - if (empty) { - return !!(state.storedMarks || state.selection.$from.marks()) - .filter(mark => { - if (!type) { - return true - } - - return type.name === mark.type.name - }) - .find(mark => objectIncludes(mark.attrs, attributes, { strict: false })) - } - - let selectionRange = 0 - const markRanges: MarkRange[] = [] - - ranges.forEach(({ $from, $to }) => { - const from = $from.pos - const to = $to.pos - - state.doc.nodesBetween(from, to, (node, pos) => { - // ignore selected text inside nodes whose schema disallows this mark type - if (type && node.inlineContent && !node.type.allowsMarkType(type)) { - return false - } - - if (!node.isText && !node.marks.length) { - return - } - - const relativeFrom = Math.max(from, pos) - const relativeTo = Math.min(to, pos + node.nodeSize) - const range = relativeTo - relativeFrom - - selectionRange += range - - markRanges.push( - ...node.marks.map(mark => ({ - mark, - from: relativeFrom, - to: relativeTo, - })), - ) - }) - }) - - if (selectionRange === 0) { - return false - } - - // calculate range of matched mark - const matchedRange = markRanges - .filter(markRange => { - if (!type) { - return true - } - - return type.name === markRange.mark.type.name - }) - .filter(markRange => objectIncludes(markRange.mark.attrs, attributes, { strict: false })) - .reduce((sum, markRange) => sum + markRange.to - markRange.from, 0) - - // calculate range of marks that excludes the searched mark - // for example `code` doesn’t allow any other marks - const excludedRange = markRanges - .filter(markRange => { - if (!type) { - return true - } - - return markRange.mark.type !== type && markRange.mark.type.excludes(type) - }) - .reduce((sum, markRange) => sum + markRange.to - markRange.from, 0) - - // we only include the result of `excludedRange` - // if there is a match at all - const range = matchedRange > 0 ? matchedRange + excludedRange : matchedRange - - return range >= selectionRange -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeActive.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeActive.ts deleted file mode 100644 index 8e21eb6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeActive.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' -import type { EditorState } from '@tiptap/pm/state' - -import type { NodeRange } from '../types.js' -import { objectIncludes } from '../utilities/objectIncludes.js' -import { getNodeType } from './getNodeType.js' - -export function isNodeActive( - state: EditorState, - typeOrName: NodeType | string | null, - attributes: Record = {}, -): boolean { - const { from, to, empty } = state.selection - const type = typeOrName ? getNodeType(typeOrName, state.schema) : null - - const nodeRanges: NodeRange[] = [] - - state.doc.nodesBetween(from, to, (node, pos) => { - if (node.isText) { - return - } - - const relativeFrom = Math.max(from, pos) - const relativeTo = Math.min(to, pos + node.nodeSize) - - nodeRanges.push({ - node, - from: relativeFrom, - to: relativeTo, - }) - }) - - const selectionRange = to - from - const matchedNodeRanges = nodeRanges - .filter(nodeRange => { - if (!type) { - return true - } - - return type.name === nodeRange.node.type.name - }) - .filter(nodeRange => objectIncludes(nodeRange.node.attrs, attributes, { strict: false })) - - if (empty) { - return !!matchedNodeRanges.length - } - - const range = matchedNodeRanges.reduce((sum, nodeRange) => sum + nodeRange.to - nodeRange.from, 0) - - return range >= selectionRange -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeEmpty.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeEmpty.ts deleted file mode 100644 index 0e97d11..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeEmpty.ts +++ /dev/null @@ -1,62 +0,0 @@ -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' - -/** - * Returns true if the given prosemirror node is empty. - */ -export function isNodeEmpty( - node: ProseMirrorNode, - { - checkChildren = true, - ignoreWhitespace = false, - }: { - /** - * When true (default), it will also check if all children are empty. - */ - checkChildren?: boolean - /** - * When true, it will ignore whitespace when checking for emptiness. - */ - ignoreWhitespace?: boolean - } = {}, -): boolean { - if (ignoreWhitespace) { - if (node.type.name === 'hardBreak') { - // Hard breaks are considered empty - return true - } - if (node.isText) { - return !/\S/.test(node.text ?? '') - } - } - - if (node.isText) { - return !node.text - } - - if (node.isAtom || node.isLeaf) { - return false - } - - if (node.content.childCount === 0) { - return true - } - - if (checkChildren) { - let isContentEmpty = true - - node.content.forEach(childNode => { - if (isContentEmpty === false) { - // Exit early for perf - return - } - - if (!isNodeEmpty(childNode, { ignoreWhitespace, checkChildren })) { - isContentEmpty = false - } - }) - - return isContentEmpty - } - - return false -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeSelection.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeSelection.ts deleted file mode 100644 index f915606..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeSelection.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { NodeSelection } from '@tiptap/pm/state' - -export function isNodeSelection(value: unknown): value is NodeSelection { - return value instanceof NodeSelection -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeViewSelected.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeViewSelected.ts deleted file mode 100644 index 6b37838..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isNodeViewSelected.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { Selection } from '@tiptap/pm/state' - -import { isTextSelection } from './isTextSelection.js' - -/** - * Determines whether a node view should be considered selected for the given - * editor selection. - * - * A node is considered selected when the current selection fully covers it - * (e.g. a `NodeSelection`). When `selectedOnTextSelection` is enabled, the - * node is additionally considered selected if a `TextSelection` is fully - * contained within the node's range. - * - * @param selection The current editor selection. - * @param pos The start position of the node in the document. - * @param nodeSize The size of the node. - * @param selectedOnTextSelection When `true`, also treat selections inside the node as selected. - * @returns `true` if the node view should render as selected. - */ -export function isNodeViewSelected({ - selection, - pos, - nodeSize, - selectedOnTextSelection = false, -}: { - selection: Selection - pos: number - nodeSize: number - selectedOnTextSelection?: boolean -}): boolean { - const { from, to } = selection - - if (from <= pos && to >= pos + nodeSize) { - return true - } - - if (selectedOnTextSelection && isTextSelection(selection) && from > pos && to < pos + nodeSize) { - return true - } - - return false -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isTextSelection.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isTextSelection.ts deleted file mode 100644 index 651a1a5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/isTextSelection.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { TextSelection } from '@tiptap/pm/state' - -export function isTextSelection(value: unknown): value is TextSelection { - return value instanceof TextSelection -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/posToDOMRect.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/posToDOMRect.ts deleted file mode 100644 index 5af0ce9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/posToDOMRect.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { EditorView } from '@tiptap/pm/view' - -import { minMax } from '../utilities/minMax.js' - -export function posToDOMRect(view: EditorView, from: number, to: number): DOMRect { - const minPos = 0 - const maxPos = view.state.doc.content.size - const resolvedFrom = minMax(from, minPos, maxPos) - const resolvedEnd = minMax(to, minPos, maxPos) - const start = view.coordsAtPos(resolvedFrom) - const end = view.coordsAtPos(resolvedEnd, -1) - const top = Math.min(start.top, end.top) - const bottom = Math.max(start.bottom, end.bottom) - const left = Math.min(start.left, end.left) - const right = Math.max(start.right, end.right) - const width = right - left - const height = bottom - top - const x = left - const y = top - const data = { - top, - bottom, - left, - right, - width, - height, - x, - y, - } - - return { - ...data, - toJSON: () => data, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/resolveExtensions.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/resolveExtensions.ts deleted file mode 100644 index 99d9e7a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/resolveExtensions.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Extensions } from '../types.js' -import { findDuplicates } from '../utilities/findDuplicates.js' -import { flattenExtensions } from './flattenExtensions.js' -import { sortExtensions } from './sortExtensions.js' - -/** - * Returns a flattened and sorted extension list while - * also checking for duplicated extensions and warns the user. - * @param extensions An array of Tiptap extensions - * @returns An flattened and sorted array of Tiptap extensions - */ -export function resolveExtensions(extensions: Extensions): Extensions { - const resolvedExtensions = sortExtensions(flattenExtensions(extensions)) - const duplicatedNames = findDuplicates(resolvedExtensions.map(extension => extension.name)) - - if (duplicatedNames.length) { - console.warn( - `[tiptap warn]: Duplicate extension names found: [${duplicatedNames - .map(item => `'${item}'`) - .join(', ')}]. This can lead to issues.`, - ) - } - - return resolvedExtensions -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/resolveFocusPosition.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/resolveFocusPosition.ts deleted file mode 100644 index 986ea20..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/resolveFocusPosition.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' -import { Selection, TextSelection } from '@tiptap/pm/state' - -import type { FocusPosition } from '../types.js' -import { minMax } from '../utilities/minMax.js' - -export function resolveFocusPosition( - doc: ProseMirrorNode, - position: FocusPosition = null, -): Selection | null { - if (!position) { - return null - } - - const selectionAtStart = Selection.atStart(doc) - const selectionAtEnd = Selection.atEnd(doc) - - if (position === 'start' || position === true) { - return selectionAtStart - } - - if (position === 'end') { - return selectionAtEnd - } - - const minPos = selectionAtStart.from - const maxPos = selectionAtEnd.to - - if (position === 'all') { - return TextSelection.create( - doc, - minMax(0, minPos, maxPos), - minMax(doc.content.size, minPos, maxPos), - ) - } - - return TextSelection.create( - doc, - minMax(position, minPos, maxPos), - minMax(position, minPos, maxPos), - ) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.ts deleted file mode 100644 index e42a8b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.ts +++ /dev/null @@ -1,149 +0,0 @@ -import type { Schema } from '@tiptap/pm/model' - -import type { JSONContent } from '../types.js' - -type RewriteUnknownContentOptions = { - /** - * If true, unknown nodes will be treated as paragraphs - * @default true - */ - fallbackToParagraph?: boolean -} - -type RewrittenContent = { - /** - * The original JSON content that was rewritten - */ - original: JSONContent - /** - * The name of the node or mark that was unsupported - */ - unsupported: string -}[] - -/** - * The actual implementation of the rewriteUnknownContent function - */ -function rewriteUnknownContentInner({ - json, - validMarks, - validNodes, - options, - rewrittenContent = [], -}: { - json: JSONContent - validMarks: Set - validNodes: Set - options?: RewriteUnknownContentOptions - rewrittenContent?: RewrittenContent -}): { - /** - * The cleaned JSON content - */ - json: JSONContent | null - /** - * The array of nodes and marks that were rewritten - */ - rewrittenContent: RewrittenContent -} { - if (json.marks && Array.isArray(json.marks)) { - json.marks = json.marks.filter(mark => { - const name = typeof mark === 'string' ? mark : mark.type - - if (validMarks.has(name)) { - return true - } - - rewrittenContent.push({ - original: JSON.parse(JSON.stringify(mark)), - unsupported: name, - }) - // Just ignore any unknown marks - return false - }) - } - - if (json.content && Array.isArray(json.content)) { - json.content = json.content - .map( - value => - rewriteUnknownContentInner({ - json: value, - validMarks, - validNodes, - options, - rewrittenContent, - }).json, - ) - .filter(a => a !== null && a !== undefined) - } - - if (json.type && !validNodes.has(json.type)) { - rewrittenContent.push({ - original: JSON.parse(JSON.stringify(json)), - unsupported: json.type, - }) - - if (json.content && Array.isArray(json.content) && options?.fallbackToParagraph !== false) { - // Just treat it like a paragraph and hope for the best - json.type = 'paragraph' - - return { - json, - rewrittenContent, - } - } - - // or just omit it entirely - return { - json: null, - rewrittenContent, - } - } - - return { json, rewrittenContent } -} - -/** - * Rewrite unknown nodes and marks within JSON content - * Allowing for user within the editor - */ -export function rewriteUnknownContent( - /** - * The JSON content to clean of unknown nodes and marks - */ - json: JSONContent, - /** - * The schema to use for validation - */ - schema: Schema, - /** - * Options for the cleaning process - */ - options?: RewriteUnknownContentOptions, -): { - /** - * The cleaned JSON content - */ - json: JSONContent | null - /** - * The array of nodes and marks that were rewritten - */ - rewrittenContent: { - /** - * The original JSON content that was rewritten - */ - original: JSONContent - /** - * The name of the node or mark that was unsupported - */ - unsupported: string - }[] -} { - return rewriteUnknownContentInner({ - json, - validNodes: new Set(Object.keys(schema.nodes)), - validMarks: new Set(Object.keys(schema.marks)), - options, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/selectionToInsertionEnd.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/selectionToInsertionEnd.ts deleted file mode 100644 index 0ad416a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/selectionToInsertionEnd.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { Transaction } from '@tiptap/pm/state' -import { Selection } from '@tiptap/pm/state' -import { ReplaceAroundStep, ReplaceStep } from '@tiptap/pm/transform' - -// source: https://github.com/ProseMirror/prosemirror-state/blob/master/src/selection.js#L466 -export function selectionToInsertionEnd(tr: Transaction, startLen: number, bias: number) { - const last = tr.steps.length - 1 - - if (last < startLen) { - return - } - - const step = tr.steps[last] - - if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) { - return - } - - const map = tr.mapping.maps[last] - let end = 0 - - map.forEach((_from, _to, _newFrom, newTo) => { - if (end === 0) { - end = newTo - } - }) - - tr.setSelection(Selection.near(tr.doc.resolve(end), bias)) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/sortExtensions.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/sortExtensions.ts deleted file mode 100644 index 99fa41f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/sortExtensions.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { AnyConfig, Extensions } from '../types.js' -import { getExtensionField } from './getExtensionField.js' - -/** - * Sort extensions by priority. - * @param extensions An array of Tiptap extensions - * @returns A sorted array of Tiptap extensions by priority - */ -export function sortExtensions(extensions: Extensions): Extensions { - const defaultPriority = 100 - - return extensions.sort((a, b) => { - const priorityA = getExtensionField(a, 'priority') || defaultPriority - const priorityB = getExtensionField(b, 'priority') || defaultPriority - - if (priorityA > priorityB) { - return -1 - } - - if (priorityA < priorityB) { - return 1 - } - - return 0 - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/splitExtensions.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/splitExtensions.ts deleted file mode 100644 index 3389cf1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/helpers/splitExtensions.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { Extension } from '../Extension.js' -import type { Mark } from '../Mark.js' -import type { Node } from '../Node.js' -import type { Extensions } from '../types.js' - -export function splitExtensions(extensions: Extensions) { - const baseExtensions = extensions.filter( - extension => extension.type === 'extension', - ) as Extension[] - const nodeExtensions = extensions.filter(extension => extension.type === 'node') as Node[] - const markExtensions = extensions.filter(extension => extension.type === 'mark') as Mark[] - - return { - baseExtensions, - nodeExtensions, - markExtensions, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/index.ts deleted file mode 100644 index 73f68d8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -export * from './CommandManager.js' -export type * from './commands/index.js' -export * as commands from './commands/index.js' -export * from './Editor.js' -export * from './Extendable.js' -export * from './Extension.js' -export * as extensions from './extensions/index.js' -export * from './helpers/index.js' -export * from './InputRule.js' -export * from './inputRules/index.js' -export { createElement, Fragment, createElement as h } from './jsx-runtime.js' -export * from './lib/index.js' -export * from './Mark.js' -export * from './MarkView.js' -export * from './Node.js' -export * from './NodePos.js' -export * from './NodeView.js' -export * from './PasteRule.js' -export * from './pasteRules/index.js' -export * from './Tracker.js' -export * from './types.js' -export * from './utilities/index.js' - -// oxlint-disable-next-line -export interface Commands {} - -// oxlint-disable-next-line -export interface Storage {} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/index.ts deleted file mode 100644 index 936d514..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './markInputRule.js' -export * from './nodeInputRule.js' -export * from './textblockTypeInputRule.js' -export * from './textInputRule.js' -export * from './wrappingInputRule.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/markInputRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/markInputRule.ts deleted file mode 100644 index 9281b37..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/markInputRule.ts +++ /dev/null @@ -1,72 +0,0 @@ -import type { MarkType } from '@tiptap/pm/model' - -import { getMarksBetween } from '../helpers/getMarksBetween.js' -import type { InputRuleFinder } from '../InputRule.js' -import { InputRule } from '../InputRule.js' -import type { ExtendedRegExpMatchArray } from '../types.js' -import { callOrReturn } from '../utilities/callOrReturn.js' - -/** - * Build an input rule that adds a mark when the - * matched text is typed into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -export function markInputRule(config: { - find: InputRuleFinder - type: MarkType - undoable?: boolean - getAttributes?: - | Record - | ((match: ExtendedRegExpMatchArray) => Record) - | false - | null -}) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - const attributes = callOrReturn(config.getAttributes, undefined, match) - - if (attributes === false || attributes === null) { - return null - } - - const { tr } = state - const captureGroup = match[match.length - 1] - const fullMatch = match[0] - - if (captureGroup) { - const startSpaces = fullMatch.search(/\S/) - const textStart = range.from + fullMatch.indexOf(captureGroup) - const textEnd = textStart + captureGroup.length - - const excludedMarks = getMarksBetween(range.from, range.to, state.doc) - .filter(item => { - // @ts-ignore - const excluded = item.mark.type.excluded as MarkType[] - - return excluded.find(type => type === config.type && type !== item.mark.type) - }) - .filter(item => item.to > textStart) - - if (excludedMarks.length) { - return null - } - - if (textEnd < range.to) { - tr.delete(textEnd, range.to) - } - - if (textStart > range.from) { - tr.delete(range.from + startSpaces, textStart) - } - - const markEnd = range.from + startSpaces + captureGroup.length - - tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {})) - - tr.removeStoredMark(config.type) - } - }, - undoable: config.undoable, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/nodeInputRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/nodeInputRule.ts deleted file mode 100644 index bae54fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/nodeInputRule.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' - -import type { InputRuleFinder } from '../InputRule.js' -import { InputRule } from '../InputRule.js' -import type { ExtendedRegExpMatchArray } from '../types.js' -import { callOrReturn } from '../utilities/callOrReturn.js' - -/** - * Build an input rule that adds a node when the - * matched text is typed into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -export function nodeInputRule(config: { - /** - * The regex to match. - */ - find: InputRuleFinder - - /** - * The node type to add. - */ - type: NodeType - - /** - * Whether the input rule should be undoable - * when the user presses backspace. - */ - undoable?: boolean - - /** - * A function that returns the attributes for the node - * can also be an object of attributes - */ - getAttributes?: - | Record - | ((match: ExtendedRegExpMatchArray) => Record) - | false - | null -}) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - const attributes = callOrReturn(config.getAttributes, undefined, match) || {} - const { tr } = state - const start = range.from - let end = range.to - - const newNode = config.type.create(attributes) - - if (match[1]) { - const offset = match[0].lastIndexOf(match[1]) - let matchStart = start + offset - - if (matchStart > end) { - matchStart = end - } else { - end = matchStart + match[1].length - } - - // insert last typed character - const lastChar = match[0][match[0].length - 1] - - tr.insertText(lastChar, start + match[0].length - 1) - - // insert node from input rule - tr.replaceWith(matchStart, end, newNode) - } else if (match[0]) { - const insertionStart = config.type.isInline ? start : start - 1 - - tr.insert(insertionStart, config.type.create(attributes)).delete( - tr.mapping.map(start), - tr.mapping.map(end), - ) - } - - tr.scrollIntoView() - }, - undoable: config.undoable, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/textInputRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/textInputRule.ts deleted file mode 100644 index 972d229..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/textInputRule.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { InputRuleFinder } from '../InputRule.js' -import { InputRule } from '../InputRule.js' - -/** - * Build an input rule that replaces text when the - * matched text is typed into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -export function textInputRule(config: { - find: InputRuleFinder - replace: string - undoable?: boolean -}) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - let insert = config.replace - let start = range.from - const end = range.to - - if (match[1]) { - const offset = match[0].lastIndexOf(match[1]) - - insert += match[0].slice(offset + match[1].length) - start += offset - - const cutOff = start - end - - if (cutOff > 0) { - insert = match[0].slice(offset - cutOff, offset) + insert - start = end - } - } - - state.tr.insertText(insert, start, end) - }, - undoable: config.undoable, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/textblockTypeInputRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/textblockTypeInputRule.ts deleted file mode 100644 index 9058b82..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/textblockTypeInputRule.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' - -import type { InputRuleFinder } from '../InputRule.js' -import { InputRule } from '../InputRule.js' -import type { ExtendedRegExpMatchArray } from '../types.js' -import { callOrReturn } from '../utilities/callOrReturn.js' - -/** - * Build an input rule that changes the type of a textblock when the - * matched text is typed into it. When using a regular expresion you’ll - * probably want the regexp to start with `^`, so that the pattern can - * only occur at the start of a textblock. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -export function textblockTypeInputRule(config: { - find: InputRuleFinder - type: NodeType - undoable?: boolean - getAttributes?: - | Record - | ((match: ExtendedRegExpMatchArray) => Record) - | false - | null -}) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match }) => { - const $start = state.doc.resolve(range.from) - const attributes = callOrReturn(config.getAttributes, undefined, match) || {} - - if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), config.type)) { - return null - } - - state.tr - .delete(range.from, range.to) - .setBlockType(range.from, range.from, config.type, attributes) - }, - undoable: config.undoable, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/wrappingInputRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/wrappingInputRule.ts deleted file mode 100644 index eccf8f4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/inputRules/wrappingInputRule.ts +++ /dev/null @@ -1,88 +0,0 @@ -import type { Node as ProseMirrorNode, NodeType } from '@tiptap/pm/model' -import { canJoin, findWrapping } from '@tiptap/pm/transform' - -import type { Editor } from '../Editor.js' -import type { InputRuleFinder } from '../InputRule.js' -import { InputRule } from '../InputRule.js' -import type { ExtendedRegExpMatchArray } from '../types.js' -import { callOrReturn } from '../utilities/callOrReturn.js' - -/** - * Build an input rule for automatically wrapping a textblock when a - * given string is typed. When using a regular expresion you’ll - * probably want the regexp to start with `^`, so that the pattern can - * only occur at the start of a textblock. - * - * `type` is the type of node to wrap in. - * - * By default, if there’s a node with the same type above the newly - * wrapped node, the rule will try to join those - * two nodes. You can pass a join predicate, which takes a regular - * expression match and the node before the wrapped node, and can - * return a boolean to indicate whether a join should happen. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#input-rules - */ -export function wrappingInputRule(config: { - find: InputRuleFinder - type: NodeType - keepMarks?: boolean - keepAttributes?: boolean - editor?: Editor - undoable?: boolean - getAttributes?: - | Record - | ((match: ExtendedRegExpMatchArray) => Record) - | false - | null - joinPredicate?: (match: ExtendedRegExpMatchArray, node: ProseMirrorNode) => boolean -}) { - return new InputRule({ - find: config.find, - handler: ({ state, range, match, chain }) => { - const attributes = callOrReturn(config.getAttributes, undefined, match) || {} - const tr = state.tr.delete(range.from, range.to) - const $start = tr.doc.resolve(range.from) - const blockRange = $start.blockRange() - const wrapping = blockRange && findWrapping(blockRange, config.type, attributes) - - if (!wrapping) { - return null - } - - tr.wrap(blockRange, wrapping) - - if (config.keepMarks && config.editor) { - const { selection, storedMarks } = state - const { splittableMarks } = config.editor.extensionManager - const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks()) - - if (marks) { - const filteredMarks = marks.filter(mark => splittableMarks.includes(mark.type.name)) - - tr.ensureMarks(filteredMarks) - } - } - if (config.keepAttributes) { - /** If the nodeType is `bulletList` or `orderedList` set the `nodeType` as `listItem` */ - const nodeType = - config.type.name === 'bulletList' || config.type.name === 'orderedList' - ? 'listItem' - : 'taskList' - - chain().updateAttributes(nodeType, attributes).run() - } - - const before = tr.doc.resolve(range.from - 1).nodeBefore - - if ( - before && - before.type === config.type && - canJoin(tr.doc, range.from - 1) && - (!config.joinPredicate || config.joinPredicate(match, before)) - ) { - tr.join(range.from - 1) - } - }, - undoable: config.undoable, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/jsx-runtime.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/jsx-runtime.ts deleted file mode 100644 index f844f18..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/jsx-runtime.ts +++ /dev/null @@ -1,67 +0,0 @@ -export type Attributes = Record - -export type DOMOutputSpecElement = 0 | Attributes | DOMOutputSpecArray -/** - * Better describes the output of a `renderHTML` function in prosemirror - * @see https://prosemirror.net/docs/ref/#model.DOMOutputSpec - */ -export type DOMOutputSpecArray = - | [string] - | [string, Attributes] - | [string, 0] - | [string, Attributes, 0] - | [string, Attributes, DOMOutputSpecArray | 0] - | [string, DOMOutputSpecArray] - -// JSX types for Tiptap's JSX runtime -// These types only apply when using @jsxImportSource @tiptap/core -// oxlint-disable-next-lineno-namespace -export namespace JSX { - export type Element = DOMOutputSpecArray - export interface IntrinsicElements { - // oxlint-disable-next-lineno-explicit-any - [key: string]: any - } - export interface ElementChildrenAttribute { - children: unknown - } -} - -export type JSXRenderer = ( - tag: 'slot' | string | ((props?: Attributes) => DOMOutputSpecArray | DOMOutputSpecElement), - props?: Attributes, - ...children: JSXRenderer[] -) => DOMOutputSpecArray | DOMOutputSpecElement - -export function Fragment(props: { children: JSXRenderer[] }) { - return props.children -} - -export const h: JSXRenderer = (tag, attributes) => { - // Treat the slot tag as the Prosemirror hole to render content into - if (tag === 'slot') { - return 0 - } - - // If the tag is a function, call it with the props - if (tag instanceof Function) { - return tag(attributes) - } - - const { children, ...rest } = attributes ?? {} - - if (tag === 'svg') { - throw new Error( - 'SVG elements are not supported in the JSX syntax, use the array syntax instead', - ) - } - - // Otherwise, return the tag, attributes, and children - return [tag, rest, children] -} - -// See -// https://esbuild.github.io/api/#jsx-import-source -// https://www.typescriptlang.org/tsconfig/#jsxImportSource - -export { h as createElement, h as jsx, h as jsxDEV, h as jsxs } diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/lib/ResizableNodeView.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/lib/ResizableNodeView.ts deleted file mode 100644 index b2f309e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/lib/ResizableNodeView.ts +++ /dev/null @@ -1,1079 +0,0 @@ -import type { Node as PMNode } from '@tiptap/pm/model' -import type { Decoration, DecorationSource, NodeView } from '@tiptap/pm/view' - -import type { Editor } from '../Editor.js' - -const isTouchEvent = (e: MouseEvent | TouchEvent): e is TouchEvent => { - return 'touches' in e -} - -/** - * Directions where resize handles can be placed - * - * @example - * - `'top'` - Top edge handle - * - `'bottom-right'` - Bottom-right corner handle - */ -export type ResizableNodeViewDirection = - | 'top' - | 'right' - | 'bottom' - | 'left' - | 'top-right' - | 'top-left' - | 'bottom-right' - | 'bottom-left' - -/** - * Dimensions for the resizable node in pixels - */ -export type ResizableNodeDimensions = { - /** Width in pixels */ - width: number - /** Height in pixels */ - height: number -} - -/** - * Configuration options for creating a ResizableNodeView - * - * @example - * ```ts - * new ResizableNodeView({ - * element: imgElement, - * node, - * getPos, - * onResize: (width, height) => { - * imgElement.style.width = `${width}px` - * imgElement.style.height = `${height}px` - * }, - * onCommit: (width, height) => { - * editor.commands.updateAttributes('image', { width, height }) - * }, - * onUpdate: (node) => true, - * options: { - * directions: ['bottom-right', 'bottom-left'], - * min: { width: 100, height: 100 }, - * preserveAspectRatio: true - * } - * }) - * ``` - */ -export type ResizableNodeViewOptions = { - /** - * The DOM element to make resizable (e.g., an img, video, or iframe element) - */ - element: HTMLElement - - /** - * The DOM element that will hold the editable content element - */ - contentElement?: HTMLElement - - /** - * The ProseMirror node instance - */ - node: PMNode - - /** - * The Tiptap editor instance - */ - editor: Editor - - /** - * Function that returns the current position of the node in the document - */ - getPos: () => number | undefined - - /** - * Callback fired continuously during resize with current dimensions. - * Use this to update the element's visual size in real-time. - * - * @param width - Current width in pixels - * @param height - Current height in pixels - * - * @example - * ```ts - * onResize: (width, height) => { - * element.style.width = `${width}px` - * element.style.height = `${height}px` - * } - * ``` - */ - onResize?: (width: number, height: number) => void - - /** - * Callback fired once when resize completes with final dimensions. - * Use this to persist the new size to the node's attributes. - * - * @param width - Final width in pixels - * @param height - Final height in pixels - * - * @example - * ```ts - * onCommit: (width, height) => { - * const pos = getPos() - * if (pos !== undefined) { - * editor.commands.updateAttributes('image', { width, height }) - * } - * } - * ``` - */ - onCommit: (width: number, height: number) => void - - /** - * Callback for handling node updates. - * Return `true` to accept the update, `false` to reject it. - * - * @example - * ```ts - * onUpdate: (node, decorations, innerDecorations) => { - * if (node.type !== this.node.type) return false - * return true - * } - * ``` - */ - onUpdate: NodeView['update'] - - /** - * Optional configuration for resize behavior and styling - */ - options?: { - /** - * Which resize handles to display. - * @default ['bottom-left', 'bottom-right', 'top-left', 'top-right'] - * - * @example - * ```ts - * // Only show corner handles - * directions: ['top-left', 'top-right', 'bottom-left', 'bottom-right'] - * - * // Only show right edge handle - * directions: ['right'] - * ``` - */ - directions?: ResizableNodeViewDirection[] - - /** - * Minimum dimensions in pixels - * @default { width: 8, height: 8 } - * - * @example - * ```ts - * min: { width: 100, height: 50 } - * ``` - */ - min?: Partial - - /** - * Maximum dimensions in pixels - * @default undefined (no maximum) - * - * @example - * ```ts - * max: { width: 1000, height: 800 } - * ``` - */ - max?: Partial - - /** - * Always preserve aspect ratio when resizing. - * When `false`, aspect ratio is preserved only when Shift key is pressed. - * @default false - * - * @example - * ```ts - * preserveAspectRatio: true // Always lock aspect ratio - * ``` - */ - preserveAspectRatio?: boolean - - /** - * Custom CSS class names for styling - * - * @example - * ```ts - * className: { - * container: 'resize-container', - * wrapper: 'resize-wrapper', - * handle: 'resize-handle', - * resizing: 'is-resizing' - * } - * ``` - */ - className?: { - /** Class for the outer container element */ - container?: string - /** Class for the wrapper element that contains the resizable element */ - wrapper?: string - /** Class applied to all resize handles */ - handle?: string - /** Class added to container while actively resizing */ - resizing?: string - } - - /** - * Optional callback for creating custom resize handle elements. - * - * This function allows developers to define their own handle element - * (e.g., custom icons, classes, or styles) for a given resize direction. - * It is called internally for each handle direction. - * - * @param direction - The direction of the handle being created (e.g., 'top', 'bottom-right'). - * @returns The custom handle HTMLElement. - * - * @example - * ```ts - * createCustomHandle: (direction) => { - * const handle = document.createElement('div') - * handle.dataset.resizeHandle = direction - * handle.style.position = 'absolute' - * handle.className = 'tiptap-custom-handle' - * - * const isTop = direction.includes('top') - * const isBottom = direction.includes('bottom') - * const isLeft = direction.includes('left') - * const isRight = direction.includes('right') - * - * if (isTop) handle.style.top = '0' - * if (isBottom) handle.style.bottom = '0' - * if (isLeft) handle.style.left = '0' - * if (isRight) handle.style.right = '0' - * - * // Edge handles span the full width or height - * if (direction === 'top' || direction === 'bottom') { - * handle.style.left = '0' - * handle.style.right = '0' - * } - * - * if (direction === 'left' || direction === 'right') { - * handle.style.top = '0' - * handle.style.bottom = '0' - * } - * - * return handle - * } - * ``` - */ - createCustomHandle?: (direction: ResizableNodeViewDirection) => HTMLElement - } -} - -/** - * A NodeView implementation that adds resize handles to any DOM element. - * - * This class creates a resizable node view for Tiptap/ProseMirror editors. - * It wraps your element with resize handles and manages the resize interaction, - * including aspect ratio preservation, min/max constraints, and keyboard modifiers. - * - * @example - * ```ts - * // Basic usage in a Tiptap extension - * addNodeView() { - * return ({ node, getPos }) => { - * const img = document.createElement('img') - * img.src = node.attrs.src - * - * return new ResizableNodeView({ - * element: img, - * node, - * getPos, - * onResize: (width, height) => { - * img.style.width = `${width}px` - * img.style.height = `${height}px` - * }, - * onCommit: (width, height) => { - * this.editor.commands.updateAttributes('image', { width, height }) - * }, - * onUpdate: () => true, - * options: { - * min: { width: 100, height: 100 }, - * preserveAspectRatio: true - * } - * }) - * } - * } - * ``` - */ -export class ResizableNodeView { - /** The ProseMirror node instance */ - node: PMNode - - /** The Tiptap editor instance */ - editor: Editor - - /** The DOM element being made resizable */ - element: HTMLElement - - /** The editable DOM element inside the DOM */ - contentElement?: HTMLElement - - /** The outer container element (returned as NodeView.dom) */ - container: HTMLElement - - /** The wrapper element that contains the element and handles */ - wrapper: HTMLElement - - /** Function to get the current node position */ - getPos: () => number | undefined - - /** Callback fired during resize */ - onResize?: (width: number, height: number) => void - - /** Callback fired when resize completes */ - onCommit: (width: number, height: number) => void - - /** Callback for node updates */ - onUpdate?: NodeView['update'] - - /** Active resize handle directions */ - directions: ResizableNodeViewDirection[] = [ - 'bottom-left', - 'bottom-right', - 'top-left', - 'top-right', - ] - - /** Minimum allowed dimensions */ - minSize: ResizableNodeDimensions = { - height: 8, - width: 8, - } - - /** Maximum allowed dimensions (optional) */ - maxSize?: Partial - - /** Whether to always preserve aspect ratio */ - preserveAspectRatio: boolean = false - - /** CSS class names for elements */ - classNames = { - container: '', - wrapper: '', - handle: '', - resizing: '', - } - - /** Optional callback for creating custom resize handles */ - createCustomHandle?: (direction: ResizableNodeViewDirection) => HTMLElement - - /** Initial width of the element (for aspect ratio calculation) */ - private initialWidth: number = 0 - - /** Initial height of the element (for aspect ratio calculation) */ - private initialHeight: number = 0 - - /** Calculated aspect ratio (width / height) */ - private aspectRatio: number = 1 - - /** Whether a resize operation is currently active */ - private isResizing: boolean = false - - /** The handle currently being dragged */ - private activeHandle: ResizableNodeViewDirection | null = null - - /** Starting mouse X position when resize began */ - private startX: number = 0 - - /** Starting mouse Y position when resize began */ - private startY: number = 0 - - /** Element width when resize began */ - private startWidth: number = 0 - - /** Element height when resize began */ - private startHeight: number = 0 - - /** Whether Shift key is currently pressed (for temporary aspect ratio lock) */ - private isShiftKeyPressed: boolean = false - - /** Last known editable state of the editor */ - private lastEditableState: boolean | undefined = undefined - - /** Map of handle elements by direction */ - private handleMap = new Map() - - /** - * Creates a new ResizableNodeView instance. - * - * The constructor sets up the resize handles, applies initial sizing from - * node attributes, and configures all resize behavior options. - * - * @param options - Configuration options for the resizable node view - */ - constructor(options: ResizableNodeViewOptions) { - this.node = options.node - this.editor = options.editor - this.element = options.element - this.element.draggable = false - this.contentElement = options.contentElement - - this.getPos = options.getPos - - this.onResize = options.onResize - this.onCommit = options.onCommit - this.onUpdate = options.onUpdate - - if (options.options?.min) { - this.minSize = { - ...this.minSize, - ...options.options.min, - } - } - - if (options.options?.max) { - this.maxSize = options.options.max - } - - if (options?.options?.directions) { - this.directions = options.options.directions - } - - if (options.options?.preserveAspectRatio) { - this.preserveAspectRatio = options.options.preserveAspectRatio - } - - if (options.options?.className) { - this.classNames = { - container: options.options.className.container || '', - wrapper: options.options.className.wrapper || '', - handle: options.options.className.handle || '', - resizing: options.options.className.resizing || '', - } - } - - if (options.options?.createCustomHandle) { - this.createCustomHandle = options.options.createCustomHandle - } - - this.wrapper = this.createWrapper() - this.container = this.createContainer() - - this.applyInitialSize() - this.attachHandles() - - this.editor.on('update', this.handleEditorUpdate.bind(this)) - } - - /** - * Returns the top-level DOM node that should be placed in the editor. - * - * This is required by the ProseMirror NodeView interface. The container - * includes the wrapper, handles, and the actual content element. - * - * @returns The container element to be inserted into the editor - */ - get dom() { - return this.container - } - - get contentDOM(): HTMLElement | null { - return this.contentElement ?? null - } - - private handleEditorUpdate() { - const isEditable = this.editor.isEditable - - // Only if state actually changed - if (isEditable === this.lastEditableState) { - return - } - - this.lastEditableState = isEditable - - if (!isEditable) { - this.removeHandles() - } else if (isEditable && this.handleMap.size === 0) { - this.attachHandles() - } - } - - /** - * Called when the node's content or attributes change. - * - * Updates the internal node reference. If a custom `onUpdate` callback - * was provided, it will be called to handle additional update logic. - * - * @param node - The new/updated node - * @param decorations - Node decorations - * @param innerDecorations - Inner decorations - * @returns `false` if the node type has changed (requires full rebuild), otherwise the result of `onUpdate` or `true` - */ - update( - node: PMNode, - decorations: readonly Decoration[], - innerDecorations: DecorationSource, - ): boolean { - if (node.type !== this.node.type) { - return false - } - - this.node = node - - if (this.onUpdate) { - return this.onUpdate(node, decorations, innerDecorations) - } - - return true - } - - /** - * Cleanup method called when the node view is being removed. - * - * Removes all event listeners to prevent memory leaks. This is required - * by the ProseMirror NodeView interface. If a resize is active when - * destroy is called, it will be properly cancelled. - */ - destroy() { - if (this.isResizing) { - this.container.dataset.resizeState = 'false' - - if (this.classNames.resizing) { - this.container.classList.remove(this.classNames.resizing) - } - - document.removeEventListener('mousemove', this.handleMouseMove) - document.removeEventListener('mouseup', this.handleMouseUp) - document.removeEventListener('keydown', this.handleKeyDown) - document.removeEventListener('keyup', this.handleKeyUp) - this.isResizing = false - this.activeHandle = null - } - - this.editor.off('update', this.handleEditorUpdate.bind(this)) - - this.container.remove() - } - - /** - * Creates the outer container element. - * - * The container is the top-level element returned by the NodeView and - * wraps the entire resizable node. It's set up with flexbox to handle - * alignment and includes data attributes for styling and identification. - * - * @returns The container element - */ - createContainer() { - const element = document.createElement('div') - element.dataset.resizeContainer = '' - element.dataset.node = this.node.type.name - element.style.display = this.node.type.isInline ? 'inline-flex' : 'flex' - - if (this.classNames.container) { - element.className = this.classNames.container - } - - element.appendChild(this.wrapper) - - return element - } - - /** - * Creates the wrapper element that contains the content and handles. - * - * The wrapper uses relative positioning so that resize handles can be - * positioned absolutely within it. This is the direct parent of the - * content element being made resizable. - * - * @returns The wrapper element - */ - createWrapper() { - const element = document.createElement('div') - element.style.position = 'relative' - element.style.display = 'block' - element.dataset.resizeWrapper = '' - - if (this.classNames.wrapper) { - element.className = this.classNames.wrapper - } - - element.appendChild(this.element) - - return element - } - - /** - * Creates a resize handle element for a specific direction. - * - * Each handle is absolutely positioned and includes a data attribute - * identifying its direction for styling purposes. - * - * @param direction - The resize direction for this handle - * @returns The handle element - */ - private createHandle(direction: ResizableNodeViewDirection): HTMLElement { - const handle = document.createElement('div') - handle.dataset.resizeHandle = direction - handle.style.position = 'absolute' - - if (this.classNames.handle) { - handle.className = this.classNames.handle - } - - return handle - } - - /** - * Positions a handle element according to its direction. - * - * Corner handles (e.g., 'top-left') are positioned at the intersection - * of two edges. Edge handles (e.g., 'top') span the full width or height. - * - * @param handle - The handle element to position - * @param direction - The direction determining the position - */ - private positionHandle(handle: HTMLElement, direction: ResizableNodeViewDirection): void { - const isTop = direction.includes('top') - const isBottom = direction.includes('bottom') - const isLeft = direction.includes('left') - const isRight = direction.includes('right') - - if (isTop) { - handle.style.top = '0' - } - - if (isBottom) { - handle.style.bottom = '0' - } - - if (isLeft) { - handle.style.left = '0' - } - - if (isRight) { - handle.style.right = '0' - } - - // Edge handles span the full width or height - if (direction === 'top' || direction === 'bottom') { - handle.style.left = '0' - handle.style.right = '0' - } - - if (direction === 'left' || direction === 'right') { - handle.style.top = '0' - handle.style.bottom = '0' - } - } - - /** - * Creates and attaches all resize handles to the wrapper. - * - * Iterates through the configured directions, creates a handle for each, - * positions it, attaches the mousedown listener, and appends it to the DOM. - */ - private attachHandles(): void { - this.directions.forEach(direction => { - let handle: HTMLElement - - if (this.createCustomHandle) { - handle = this.createCustomHandle(direction) - } else { - handle = this.createHandle(direction) - } - - if (!(handle instanceof HTMLElement)) { - console.warn( - `[ResizableNodeView] createCustomHandle("${direction}") did not return an HTMLElement. Falling back to default handle.`, - ) - handle = this.createHandle(direction) - } - - if (!this.createCustomHandle) { - this.positionHandle(handle, direction) - } - - handle.addEventListener('mousedown', event => this.handleResizeStart(event, direction)) - handle.addEventListener('touchstart', event => - this.handleResizeStart(event as unknown as MouseEvent, direction), - ) - - this.handleMap.set(direction, handle) - - this.wrapper.appendChild(handle) - }) - } - - /** - * Removes all resize handles from the wrapper. - * - * Cleans up the handle map and removes each handle element from the DOM. - */ - private removeHandles(): void { - this.handleMap.forEach(el => el.remove()) - this.handleMap.clear() - } - - /** - * Applies initial sizing from node attributes to the element. - * - * If width/height attributes exist on the node, they're applied to the element. - * Otherwise, the element's natural/current dimensions are measured. The aspect - * ratio is calculated for later use in aspect-ratio-preserving resizes. - */ - private applyInitialSize(): void { - const width = this.node.attrs.width as number | undefined - const height = this.node.attrs.height as number | undefined - - if (width) { - this.element.style.width = `${width}px` - this.initialWidth = width - } else { - this.initialWidth = this.element.offsetWidth - } - - if (height) { - this.element.style.height = `${height}px` - this.initialHeight = height - } else { - this.initialHeight = this.element.offsetHeight - } - - // Calculate aspect ratio for use during resizing - if (this.initialWidth > 0 && this.initialHeight > 0) { - this.aspectRatio = this.initialWidth / this.initialHeight - } - } - - /** - * Initiates a resize operation when a handle is clicked. - * - * Captures the starting mouse position and element dimensions, sets up - * the resize state, adds the resizing class and state attribute, and - * attaches document-level listeners for mouse movement and keyboard input. - * - * @param event - The mouse down event - * @param direction - The direction of the handle being dragged - */ - private handleResizeStart( - event: MouseEvent | TouchEvent, - direction: ResizableNodeViewDirection, - ): void { - event.preventDefault() - event.stopPropagation() - - // Capture initial state - this.isResizing = true - this.activeHandle = direction - - if (isTouchEvent(event)) { - this.startX = event.touches[0].clientX - this.startY = event.touches[0].clientY - } else { - this.startX = event.clientX - this.startY = event.clientY - } - - this.startWidth = this.element.offsetWidth - this.startHeight = this.element.offsetHeight - - // Recalculate aspect ratio at resize start for accuracy - if (this.startWidth > 0 && this.startHeight > 0) { - this.aspectRatio = this.startWidth / this.startHeight - } - - const pos = this.getPos() - if (pos !== undefined) { - // TODO: Select the node in the editor - } - - // Update UI state - this.container.dataset.resizeState = 'true' - - if (this.classNames.resizing) { - this.container.classList.add(this.classNames.resizing) - } - - // Attach document-level listeners for resize - document.addEventListener('mousemove', this.handleMouseMove) - document.addEventListener('touchmove', this.handleTouchMove) - document.addEventListener('mouseup', this.handleMouseUp) - document.addEventListener('keydown', this.handleKeyDown) - document.addEventListener('keyup', this.handleKeyUp) - } - - /** - * Handles mouse movement during an active resize. - * - * Calculates the delta from the starting position, computes new dimensions - * based on the active handle direction, applies constraints and aspect ratio, - * then updates the element's style and calls the onResize callback. - * - * @param event - The mouse move event - */ - private handleMouseMove = (event: MouseEvent): void => { - if (!this.isResizing || !this.activeHandle) { - return - } - - const deltaX = event.clientX - this.startX - const deltaY = event.clientY - this.startY - - this.handleResize(deltaX, deltaY) - } - - private handleTouchMove = (event: TouchEvent): void => { - if (!this.isResizing || !this.activeHandle) { - return - } - - const touch = event.touches[0] - if (!touch) { - return - } - - const deltaX = touch.clientX - this.startX - const deltaY = touch.clientY - this.startY - - this.handleResize(deltaX, deltaY) - } - - private handleResize(deltaX: number, deltaY: number) { - if (!this.activeHandle) { - return - } - - const shouldPreserveAspectRatio = this.preserveAspectRatio || this.isShiftKeyPressed - const { width, height } = this.calculateNewDimensions(this.activeHandle, deltaX, deltaY) - const constrained = this.applyConstraints(width, height, shouldPreserveAspectRatio) - - this.element.style.width = `${constrained.width}px` - this.element.style.height = `${constrained.height}px` - - if (this.onResize) { - this.onResize(constrained.width, constrained.height) - } - } - - /** - * Completes the resize operation when the mouse button is released. - * - * Captures final dimensions, calls the onCommit callback to persist changes, - * removes the resizing state and class, and cleans up document-level listeners. - */ - private handleMouseUp = (): void => { - if (!this.isResizing) { - return - } - - const finalWidth = this.element.offsetWidth - const finalHeight = this.element.offsetHeight - - this.onCommit(finalWidth, finalHeight) - - this.isResizing = false - this.activeHandle = null - - // Remove UI state - this.container.dataset.resizeState = 'false' - - if (this.classNames.resizing) { - this.container.classList.remove(this.classNames.resizing) - } - - // Clean up document-level listeners - document.removeEventListener('mousemove', this.handleMouseMove) - document.removeEventListener('mouseup', this.handleMouseUp) - document.removeEventListener('keydown', this.handleKeyDown) - document.removeEventListener('keyup', this.handleKeyUp) - } - - /** - * Tracks Shift key state to enable temporary aspect ratio locking. - * - * When Shift is pressed during resize, aspect ratio is preserved even if - * preserveAspectRatio is false. - * - * @param event - The keyboard event - */ - private handleKeyDown = (event: KeyboardEvent): void => { - if (event.key === 'Shift') { - this.isShiftKeyPressed = true - } - } - - /** - * Tracks Shift key release to disable temporary aspect ratio locking. - * - * @param event - The keyboard event - */ - private handleKeyUp = (event: KeyboardEvent): void => { - if (event.key === 'Shift') { - this.isShiftKeyPressed = false - } - } - - /** - * Calculates new dimensions based on mouse delta and resize direction. - * - * Takes the starting dimensions and applies the mouse movement delta - * according to the handle direction. For corner handles, both dimensions - * are affected. For edge handles, only one dimension changes. If aspect - * ratio should be preserved, delegates to applyAspectRatio. - * - * @param direction - The active resize handle direction - * @param deltaX - Horizontal mouse movement since resize start - * @param deltaY - Vertical mouse movement since resize start - * @returns The calculated width and height - */ - private calculateNewDimensions( - direction: ResizableNodeViewDirection, - deltaX: number, - deltaY: number, - ): ResizableNodeDimensions { - let newWidth = this.startWidth - let newHeight = this.startHeight - - const isRight = direction.includes('right') - const isLeft = direction.includes('left') - const isBottom = direction.includes('bottom') - const isTop = direction.includes('top') - - // Apply horizontal delta - if (isRight) { - newWidth = this.startWidth + deltaX - } else if (isLeft) { - newWidth = this.startWidth - deltaX - } - - // Apply vertical delta - if (isBottom) { - newHeight = this.startHeight + deltaY - } else if (isTop) { - newHeight = this.startHeight - deltaY - } - - // For pure horizontal/vertical handles, only one dimension changes - if (direction === 'right' || direction === 'left') { - newWidth = this.startWidth + (isRight ? deltaX : -deltaX) - } - - if (direction === 'top' || direction === 'bottom') { - newHeight = this.startHeight + (isBottom ? deltaY : -deltaY) - } - - const shouldPreserveAspectRatio = this.preserveAspectRatio || this.isShiftKeyPressed - - if (shouldPreserveAspectRatio) { - return this.applyAspectRatio(newWidth, newHeight, direction) - } - - return { width: newWidth, height: newHeight } - } - - /** - * Applies min/max constraints to dimensions. - * - * When aspect ratio is NOT preserved, constraints are applied independently - * to width and height. When aspect ratio IS preserved, constraints are - * applied while maintaining the aspect ratio—if one dimension hits a limit, - * the other is recalculated proportionally. - * - * This ensures that aspect ratio is never broken when constrained. - * - * @param width - The unconstrained width - * @param height - The unconstrained height - * @param preserveAspectRatio - Whether to maintain aspect ratio while constraining - * @returns The constrained dimensions - */ - private applyConstraints( - width: number, - height: number, - preserveAspectRatio: boolean, - ): ResizableNodeDimensions { - if (!preserveAspectRatio) { - // Independent constraints for each dimension - let constrainedWidth = Math.max(this.minSize.width, width) - let constrainedHeight = Math.max(this.minSize.height, height) - - if (this.maxSize?.width) { - constrainedWidth = Math.min(this.maxSize.width, constrainedWidth) - } - - if (this.maxSize?.height) { - constrainedHeight = Math.min(this.maxSize.height, constrainedHeight) - } - - return { width: constrainedWidth, height: constrainedHeight } - } - - // Aspect-ratio-aware constraints: adjust both dimensions proportionally - let constrainedWidth = width - let constrainedHeight = height - - // Check minimum constraints - if (constrainedWidth < this.minSize.width) { - constrainedWidth = this.minSize.width - constrainedHeight = constrainedWidth / this.aspectRatio - } - - if (constrainedHeight < this.minSize.height) { - constrainedHeight = this.minSize.height - constrainedWidth = constrainedHeight * this.aspectRatio - } - - // Check maximum constraints - if (this.maxSize?.width && constrainedWidth > this.maxSize.width) { - constrainedWidth = this.maxSize.width - constrainedHeight = constrainedWidth / this.aspectRatio - } - - if (this.maxSize?.height && constrainedHeight > this.maxSize.height) { - constrainedHeight = this.maxSize.height - constrainedWidth = constrainedHeight * this.aspectRatio - } - - return { width: constrainedWidth, height: constrainedHeight } - } - - /** - * Adjusts dimensions to maintain the original aspect ratio. - * - * For horizontal handles (left/right), uses width as the primary dimension - * and calculates height from it. For vertical handles (top/bottom), uses - * height as primary and calculates width. For corner handles, uses width - * as the primary dimension. - * - * @param width - The new width - * @param height - The new height - * @param direction - The active resize direction - * @returns Dimensions adjusted to preserve aspect ratio - */ - private applyAspectRatio( - width: number, - height: number, - direction: ResizableNodeViewDirection, - ): ResizableNodeDimensions { - const isHorizontal = direction === 'left' || direction === 'right' - const isVertical = direction === 'top' || direction === 'bottom' - - if (isHorizontal) { - // For horizontal resize, width is primary - return { - width, - height: width / this.aspectRatio, - } - } - - if (isVertical) { - // For vertical resize, height is primary - return { - width: height * this.aspectRatio, - height, - } - } - - // For corner resize, width is primary - return { - width, - height: width / this.aspectRatio, - } - } -} - -/** - * Alias for ResizableNodeView to maintain consistent naming. - * @deprecated Use ResizableNodeView instead - will be removed in future versions. - */ -export const ResizableNodeview = ResizableNodeView diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/lib/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/lib/index.ts deleted file mode 100644 index c6e003d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/lib/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ResizableNodeView.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/index.ts deleted file mode 100644 index 2483769..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './markPasteRule.js' -export * from './nodePasteRule.js' -export * from './textPasteRule.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/markPasteRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/markPasteRule.ts deleted file mode 100644 index b76a207..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/markPasteRule.ts +++ /dev/null @@ -1,82 +0,0 @@ -import type { MarkType } from '@tiptap/pm/model' - -import { getMarksBetween } from '../helpers/getMarksBetween.js' -import type { PasteRuleFinder } from '../PasteRule.js' -import { PasteRule } from '../PasteRule.js' -import type { ExtendedRegExpMatchArray } from '../types.js' -import { callOrReturn } from '../utilities/callOrReturn.js' - -/** - * Build an paste rule that adds a mark when the - * matched text is pasted into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules - */ -export function markPasteRule(config: { - find: PasteRuleFinder - type: MarkType - getAttributes?: - | Record - | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record) - | false - | null -}) { - return new PasteRule({ - find: config.find, - handler: ({ state, range, match, pasteEvent }) => { - const attributes = callOrReturn(config.getAttributes, undefined, match, pasteEvent) - - if (attributes === false || attributes === null) { - return null - } - - const { tr } = state - const captureGroup = match[match.length - 1] - const fullMatch = match[0] - let markEnd = range.to - - if (captureGroup) { - const startSpaces = fullMatch.search(/\S/) - const textStart = range.from + fullMatch.indexOf(captureGroup) - const textEnd = textStart + captureGroup.length - - const excludedMarks = getMarksBetween(range.from, range.to, state.doc) - .filter(item => { - // @ts-ignore - const excluded = item.mark.type.excluded as MarkType[] - - return excluded.find(type => type === config.type && type !== item.mark.type) - }) - .filter(item => item.to > textStart) - - if (excludedMarks.length) { - return null - } - - if (textEnd < range.to) { - tr.delete(textEnd, range.to) - } - - if (textStart > range.from) { - tr.delete(range.from + startSpaces, textStart) - } - - markEnd = range.from + startSpaces + captureGroup.length - - tr.addMark(range.from + startSpaces, markEnd, config.type.create(attributes || {})) - - // Only remove the stored mark if the match is not at the end of the - // pasted text. When a mark extends to the end of the content, removing - // it overrides the mark's `inclusive` behavior and incorrectly places - // the cursor outside the mark. - const isMatchAtEndOfText = - match.index !== undefined && - match.input !== undefined && - match.index + match[0].length >= match.input.length - - if (!isMatchAtEndOfText) { - tr.removeStoredMark(config.type) - } - } - }, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/nodePasteRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/nodePasteRule.ts deleted file mode 100644 index 11f2e63..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/nodePasteRule.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' - -import type { PasteRuleFinder } from '../PasteRule.js' -import { PasteRule } from '../PasteRule.js' -import type { ExtendedRegExpMatchArray, JSONContent } from '../types.js' -import { callOrReturn } from '../utilities/index.js' - -/** - * Build an paste rule that adds a node when the - * matched text is pasted into it. - * @see https://tiptap.dev/docs/editor/api/paste-rules - */ -export function nodePasteRule(config: { - find: PasteRuleFinder - type: NodeType - getAttributes?: - | Record - | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record) - | false - | null - getContent?: JSONContent[] | ((attrs: Record) => JSONContent[]) | false | null -}) { - return new PasteRule({ - find: config.find, - handler({ match, chain, range, pasteEvent }) { - const attributes = callOrReturn(config.getAttributes, undefined, match, pasteEvent) - const content = callOrReturn(config.getContent, undefined, attributes) - - if (attributes === false || attributes === null) { - return null - } - - const node = { type: config.type.name, attrs: attributes } as JSONContent - - if (content) { - node.content = content - } - - if (match.input) { - chain().deleteRange(range).insertContentAt(range.from, node) - } - }, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/textPasteRule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/textPasteRule.ts deleted file mode 100644 index 82faaa0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/pasteRules/textPasteRule.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { PasteRuleFinder } from '../PasteRule.js' -import { PasteRule } from '../PasteRule.js' - -/** - * Build an paste rule that replaces text when the - * matched text is pasted into it. - * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules - */ -export function textPasteRule(config: { find: PasteRuleFinder; replace: string }) { - return new PasteRule({ - find: config.find, - handler: ({ state, range, match }) => { - let insert = config.replace - let start = range.from - const end = range.to - - if (match[1]) { - const offset = match[0].lastIndexOf(match[1]) - - insert += match[0].slice(offset + match[1].length) - start += offset - - const cutOff = start - end - - if (cutOff > 0) { - insert = match[0].slice(offset - cutOff, offset) + insert - start = end - } - } - - state.tr.insertText(insert, start, end) - }, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/style.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/style.ts deleted file mode 100644 index 8fea94f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/style.ts +++ /dev/null @@ -1,71 +0,0 @@ -export const style = `.ProseMirror { - position: relative; -} - -.ProseMirror { - word-wrap: break-word; - white-space: pre-wrap; - white-space: break-spaces; - -webkit-font-variant-ligatures: none; - font-variant-ligatures: none; - font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ -} - -.ProseMirror [contenteditable="false"] { - white-space: normal; -} - -.ProseMirror [contenteditable="false"] [contenteditable="true"] { - white-space: pre-wrap; -} - -.ProseMirror pre { - white-space: pre-wrap; -} - -img.ProseMirror-separator { - display: inline !important; - border: none !important; - margin: 0 !important; - width: 0 !important; - height: 0 !important; -} - -.ProseMirror-gapcursor { - display: none; - pointer-events: none; - position: absolute; - margin: 0; -} - -.ProseMirror-gapcursor:after { - content: ""; - display: block; - position: absolute; - top: -2px; - width: 20px; - border-top: 1px solid black; - animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; -} - -@keyframes ProseMirror-cursor-blink { - to { - visibility: hidden; - } -} - -.ProseMirror-hideselection *::selection { - background: transparent; -} - -.ProseMirror-hideselection *::-moz-selection { - background: transparent; -} - -.ProseMirror-hideselection * { - caret-color: transparent; -} - -.ProseMirror-focused .ProseMirror-gapcursor { - display: block; -}` diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/types.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/types.ts deleted file mode 100644 index 36904f3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/types.ts +++ /dev/null @@ -1,1106 +0,0 @@ -import type { - Mark as ProseMirrorMark, - Node as ProseMirrorNode, - ParseOptions, - Slice, -} from '@tiptap/pm/model' -import type { EditorState, Transaction } from '@tiptap/pm/state' -import type { Mappable, Transform } from '@tiptap/pm/transform' -import type { - Decoration, - DecorationAttrs, - EditorProps, - EditorView, - MarkView, - MarkViewConstructor, - NodeView, - NodeViewConstructor, - ViewMutationRecord, -} from '@tiptap/pm/view' - -import type { Editor } from './Editor.js' -import type { Extendable } from './Extendable.js' -import type { - Commands, - ExtensionConfig, - GetUpdatedPositionResult, - MappablePosition, - MarkConfig, - NodeConfig, -} from './index.js' -import type { Mark } from './Mark.js' -import type { Node } from './Node.js' - -export type AnyConfig = ExtensionConfig | NodeConfig | MarkConfig -export type AnyExtension = Extendable -export type Extensions = AnyExtension[] - -export type ParentConfig = Partial<{ - [P in keyof T]: Required[P] extends (...args: any) => any - ? (...args: Parameters[P]>) => ReturnType[P]> - : T[P] -}> - -export type Primitive = null | undefined | string | number | boolean | symbol | bigint - -export type RemoveThis = T extends (...args: any) => any - ? (...args: Parameters) => ReturnType - : T - -export type MaybeReturnType = T extends (...args: any) => any ? ReturnType : T - -export type MaybeThisParameterType = - Exclude extends (...args: any) => any - ? ThisParameterType> - : any - -export interface EditorEvents { - mount: { - /** - * The editor instance - */ - editor: Editor - } - unmount: { - /** - * The editor instance - */ - editor: Editor - } - beforeCreate: { - /** - * The editor instance - */ - editor: Editor - } - create: { - /** - * The editor instance - */ - editor: Editor - } - contentError: { - /** - * The editor instance - */ - editor: Editor - /** - * The error that occurred while parsing the content - */ - error: Error - /** - * If called, will re-initialize the editor with the collaboration extension removed. - * This will prevent syncing back deletions of content not present in the current schema. - */ - disableCollaboration: () => void - } - update: { - /** - * The editor instance - */ - editor: Editor - /** - * The transaction that caused the update - */ - transaction: Transaction - /** - * Appended transactions that were added to the initial transaction by plugins - */ - appendedTransactions: Transaction[] - } - selectionUpdate: { - /** - * The editor instance - */ - editor: Editor - /** - * The transaction that caused the selection update - */ - transaction: Transaction - } - beforeTransaction: { - /** - * The editor instance - */ - editor: Editor - /** - * The transaction that will be applied - */ - transaction: Transaction - /** - * The next state of the editor after the transaction is applied - */ - nextState: EditorState - } - transaction: { - /** - * The editor instance - */ - editor: Editor - /** - * The initial transaction - */ - transaction: Transaction - /** - * Appended transactions that were added to the initial transaction by plugins - */ - appendedTransactions: Transaction[] - } - focus: { - /** - * The editor instance - */ - editor: Editor - /** - * The focus event - */ - event: FocusEvent - /** - * The transaction that caused the focus - */ - transaction: Transaction - } - blur: { - /** - * The editor instance - */ - editor: Editor - /** - * The focus event - */ - event: FocusEvent - /** - * The transaction that caused the blur - */ - transaction: Transaction - } - destroy: void - paste: { - /** - * The editor instance - */ - editor: Editor - /** - * The clipboard event - */ - event: ClipboardEvent - /** - * The slice that was pasted - */ - slice: Slice - } - drop: { - /** - * The editor instance - */ - editor: Editor - /** - * The drag event - */ - event: DragEvent - /** - * The slice that was dropped - */ - slice: Slice - /** - * Whether the content was moved (true) or copied (false) - */ - moved: boolean - } - delete: { - /** - * The editor instance - */ - editor: Editor - /** - * The range of the deleted content (before the deletion) - */ - deletedRange: Range - /** - * The new range of positions of where the deleted content was in the new document (after the deletion) - */ - newRange: Range - /** - * The transaction that caused the deletion - */ - transaction: Transaction - /** - * The combined transform (including all appended transactions) that caused the deletion - */ - combinedTransform: Transform - /** - * Whether the deletion was partial (only a part of this content was deleted) - */ - partial: boolean - /** - * This is the start position of the mark in the document (before the deletion) - */ - from: number - /** - * This is the end position of the mark in the document (before the deletion) - */ - to: number - } & ( - | { - /** - * The content that was deleted - */ - type: 'node' - /** - * The node which the deletion occurred in - * @note This can be a parent node of the deleted content - */ - node: ProseMirrorNode - /** - * The new start position of the node in the document (after the deletion) - */ - newFrom: number - /** - * The new end position of the node in the document (after the deletion) - */ - newTo: number - } - | { - /** - * The content that was deleted - */ - type: 'mark' - /** - * The mark that was deleted - */ - mark: ProseMirrorMark - } - ) -} - -/** - * Props passed to the `dispatchTransaction` hook in extensions. - */ -export type DispatchTransactionProps = { - /** - * The transaction that is about to be dispatched. - */ - transaction: Transaction - /** - * A function that should be called to pass the transaction down to the next extension - * (or eventually to the editor). - * - * @param transaction The transaction to dispatch - */ - next: (transaction: Transaction) => void -} - -export type EnableRules = (AnyExtension | string)[] | boolean - -export interface EditorOptions { - /** - * The element to bind the editor to: - * - If an `Element` is passed, the editor will be mounted appended to that element - * - If `null` is passed, the editor will not be mounted automatically - * - If an object with a `mount` property is passed, the editor will be mounted to that element - * - If a function is passed, it will be called with the editor's element, which should place the editor within the document - */ - element: Element | { mount: HTMLElement } | ((editor: HTMLElement) => void) | null - /** - * The content of the editor (HTML, JSON, or a JSON array) - */ - content: Content - /** - * The extensions to use - */ - extensions: Extensions - /** - * Whether to inject base CSS styles - */ - injectCSS: boolean - /** - * A nonce to use for CSP while injecting styles - */ - injectNonce: string | undefined - /** - * The editor's initial focus position - */ - autofocus: FocusPosition - /** - * Whether the editor is editable - */ - editable: boolean - /** - * The default text direction for all content in the editor. - * When set to 'ltr' or 'rtl', all nodes will have the corresponding dir attribute. - * When set to 'auto', the dir attribute will be set based on content detection. - * When undefined, no dir attribute will be added. - * @default undefined - */ - textDirection?: 'ltr' | 'rtl' | 'auto' - /** - * The editor's props - */ - editorProps: EditorProps - /** - * The editor's content parser options - */ - parseOptions: ParseOptions - /** - * The editor's core extension options - */ - coreExtensionOptions?: { - clipboardTextSerializer?: { - blockSeparator?: string - } - /** - * Options for the `tabindex` core extension. - */ - tabindex?: { - /** - * The value for the `tabindex` attribute on the editor element. - */ - value?: string - } - delete?: { - /** - * Whether the `delete` extension should be called asynchronously to avoid blocking the editor while processing deletions - * @default true deletion events are called asynchronously - */ - async?: boolean - /** - * Allows filtering the transactions that are processed by the `delete` extension. - * If the function returns `true`, the transaction will be ignored. - */ - filterTransaction?: (transaction: Transaction) => boolean - } - } - /** - * Whether to enable input rules behavior - */ - enableInputRules: EnableRules - /** - * Whether to enable paste rules behavior - */ - enablePasteRules: EnableRules - /** - * Determines whether core extensions are enabled. - * - * If set to `false`, all core extensions will be disabled. - * To disable specific core extensions, provide an object where the keys are the extension names and the values are `false`. - * Extensions not listed in the object will remain enabled. - * - * @example - * // Disable all core extensions - * enabledCoreExtensions: false - * - * @example - * // Disable only the keymap core extension - * enabledCoreExtensions: { keymap: false } - * - * @default true - */ - enableCoreExtensions?: - | boolean - | Partial< - Record< - | 'editable' - | 'clipboardTextSerializer' - | 'commands' - | 'focusEvents' - | 'keymap' - | 'tabindex' - | 'drop' - | 'paste' - | 'delete' - | 'textDirection', - false - > - > - /** - * If `true`, the editor will check the content for errors on initialization. - * Emitting the `contentError` event if the content is invalid. - * Which can be used to show a warning or error message to the user. - * @default false - */ - enableContentCheck: boolean - /** - * If `true`, the editor will emit the `contentError` event if invalid content is - * encountered but `enableContentCheck` is `false`. This lets you preserve the - * invalid editor content while still showing a warning or error message to - * the user. - * - * @default false - */ - emitContentError: boolean - /** - * Called before the editor is constructed. - */ - onBeforeCreate: (props: EditorEvents['beforeCreate']) => void - /** - * Called after the editor is constructed. - */ - onCreate: (props: EditorEvents['create']) => void - /** - * Called when the editor is mounted. - */ - onMount: (props: EditorEvents['mount']) => void - /** - * Called when the editor is unmounted. - */ - onUnmount: (props: EditorEvents['unmount']) => void - /** - * Called when the editor encounters an error while parsing the content. - * Only enabled if `enableContentCheck` is `true`. - */ - onContentError: (props: EditorEvents['contentError']) => void - /** - * Called when the editor's content is updated. - */ - onUpdate: (props: EditorEvents['update']) => void - /** - * Called when the editor's selection is updated. - */ - onSelectionUpdate: (props: EditorEvents['selectionUpdate']) => void - /** - * Called after a transaction is applied to the editor. - */ - onTransaction: (props: EditorEvents['transaction']) => void - /** - * Called on focus events. - */ - onFocus: (props: EditorEvents['focus']) => void - /** - * Called on blur events. - */ - onBlur: (props: EditorEvents['blur']) => void - /** - * Called when the editor is destroyed. - */ - onDestroy: (props: EditorEvents['destroy']) => void - /** - * Called when content is pasted into the editor. - */ - onPaste: (e: ClipboardEvent, slice: Slice) => void - /** - * Called when content is dropped into the editor. - */ - onDrop: (e: DragEvent, slice: Slice, moved: boolean) => void - /** - * Called when content is deleted from the editor. - */ - onDelete: (props: EditorEvents['delete']) => void - /** - * Whether to enable extension-level dispatching of transactions. - * If `false`, extensions cannot define their own `dispatchTransaction` hook. - * - * @default true - * @example - * new Editor({ - * enableExtensionDispatchTransaction: false, - * }) - */ - enableExtensionDispatchTransaction?: boolean -} - -/** - * The editor's content as HTML - */ -export type HTMLContent = string - -/** - * A Tiptap JSON node or document. Tiptap JSON is the standard format for - * storing and manipulating Tiptap content. It is equivalent to the JSON - * representation of a Prosemirror node. - * - * Tiptap JSON documents are trees of nodes. The root node is usually of type - * `doc`. Nodes can have other nodes as children. Nodes can also have marks and - * attributes. Text nodes (nodes with type `text`) have a `text` property and no - * children. - * - * @example - * ```ts - * const content: JSONContent = { - * type: 'doc', - * content: [ - * { - * type: 'paragraph', - * content: [ - * { - * type: 'text', - * text: 'Hello ', - * }, - * { - * type: 'text', - * text: 'world', - * marks: [{ type: 'bold' }], - * }, - * ], - * }, - * ], - * } - * ``` - */ -export type JSONContent = { - /** - * The type of the node - */ - type?: string - /** - * The attributes of the node. Attributes can have any JSON-serializable value. - */ - attrs?: Record | undefined - /** - * The children of the node. A node can have other nodes as children. - */ - content?: JSONContent[] - /** - * A list of marks of the node. Inline nodes can have marks. - */ - marks?: { - /** - * The type of the mark - */ - type: string - /** - * The attributes of the mark. Attributes can have any JSON-serializable value. - */ - attrs?: Record - [key: string]: any - }[] - /** - * The text content of the node. This property is only present on text nodes - * (i.e. nodes with `type: 'text'`). - * - * Text nodes cannot have children, but they can have marks. - */ - text?: string - [key: string]: any -} - -/** - * A mark type is either a JSON representation of a mark or a Prosemirror mark instance - */ -export type MarkType< - Type extends string | { name: string } = any, - TAttributes extends undefined | Record = any, -> = { - type: Type - attrs: TAttributes -} - -/** - * A node type is either a JSON representation of a node or a Prosemirror node instance - */ -export type NodeType< - Type extends string | { name: string } = any, - TAttributes extends undefined | Record = any, - NodeMarkType extends MarkType = any, - TContent extends (NodeType | TextType)[] = any, -> = { - type: Type - attrs: TAttributes - content?: TContent - marks?: NodeMarkType[] -} - -/** - * A node type is either a JSON representation of a doc node or a Prosemirror doc node instance - */ -export type DocumentType< - TDocAttributes extends Record | undefined = Record, - TContentType extends NodeType[] = NodeType[], -> = Omit, 'marks' | 'content'> & { - content: TContentType -} - -/** - * A node type is either a JSON representation of a text node or a Prosemirror text node instance - */ -export type TextType = { - type: 'text' - text: string - marks: TMarkType[] -} - -/** - * Describes the output of a `renderHTML` function in prosemirror - * @see https://prosemirror.net/docs/ref/#model.DOMOutputSpec - */ -export type DOMOutputSpecArray = - | [string] - | [string, Record] - | [string, 0] - | [string, Record, 0] - | [string, Record, DOMOutputSpecArray | 0] - | [string, DOMOutputSpecArray] - -export type Content = HTMLContent | JSONContent | JSONContent[] | null - -export type CommandProps = { - editor: Editor - tr: Transaction - commands: SingleCommands - can: () => CanCommands - chain: () => ChainedCommands - state: EditorState - view: EditorView - dispatch: ((args?: any) => any) | undefined -} - -export type Command = (props: CommandProps) => boolean - -export type CommandSpec = (...args: any[]) => Command - -export type KeyboardShortcutCommand = (props: { editor: Editor }) => boolean - -export type Attribute = { - default?: any - validate?: string | ((value: any) => void) - rendered?: boolean - renderHTML?: ((attributes: Record) => Record | null) | null - parseHTML?: ((element: HTMLElement) => any | null) | null - keepOnSplit?: boolean - isRequired?: boolean -} - -export type Attributes = { - [key: string]: Attribute -} - -export type ExtensionAttribute = { - type: string - name: string - attribute: Required> & Pick -} - -export type GlobalAttributes = { - /** - * The node & mark types this attribute should be applied to. - * Can be a specific array of type names, or a shorthand string: - * - `'*'` applies to all nodes (excluding text) and all marks - * - `'nodes'` applies to all nodes (excluding the built-in text node) - * - `'marks'` applies to all marks - * - `string[]` applies to specific node/mark types by name - * @example - * types: '*' // All nodes and marks - * types: 'nodes' // All nodes - * types: 'marks' // All marks - * types: ['heading', 'paragraph'] // Specific types - */ - types: string[] | 'nodes' | 'marks' | '*' - /** - * The attributes to add to the node or mark types. - */ - attributes: Record -}[] - -export type PickValue = T[K] - -export type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ( - k: infer I, -) => void - ? I - : never - -export type Diff = ({ [P in T]: P } & { - [P in U]: never -} & { [x: string]: never })[T] - -export type Overwrite = Pick> & U - -export type ValuesOf = T[keyof T] - -export type KeysWithTypeOf = { [P in keyof T]: T[P] extends Type ? P : never }[keyof T] - -export type DOMNode = InstanceType - -/** - * prosemirror-view does not export the `type` property of `Decoration`. - * So, this defines the `DecorationType` interface to include the `type` property. - */ -export interface DecorationType { - spec: any - map(mapping: Mappable, span: Decoration, offset: number, oldOffset: number): Decoration | null - valid(node: Node, span: Decoration): boolean - eq(other: DecorationType): boolean - destroy(dom: DOMNode): void - readonly attrs: DecorationAttrs -} - -/** - * prosemirror-view does not export the `type` property of `Decoration`. - * This adds the `type` property to the `Decoration` type. - */ -export type DecorationWithType = Decoration & { - type: DecorationType -} - -export interface NodeViewProps extends NodeViewRendererProps { - // TODO this type is not technically correct, but it's the best we can do for now since prosemirror doesn't expose the type of decorations - decorations: readonly DecorationWithType[] - selected: boolean - updateAttributes: (attributes: Record) => void - deleteNode: () => void -} - -export interface NodeViewRendererOptions { - stopEvent: ((props: { event: Event }) => boolean) | null - ignoreMutation: ((props: { mutation: ViewMutationRecord }) => boolean) | null - contentDOMElementTag: string - /** - * When `true`, the `selected` prop also becomes `true` if a `TextSelection` - * is fully inside the node's range (e.g. the cursor is placed within the - * node's content), not only when there is a `NodeSelection` on the node. - * Defaults to `false` to preserve existing behavior. - */ - selectedOnTextSelection?: boolean - /** - * When `true`, the component re-renders on every position shift so calls - * to `getPos()` stay current in render output. - * Without this option, `getPos()` is still always current for imperative - * use (click handlers, commands) — it only becomes stale when directly - * rendered in JSX or used in reactive template expressions. - * @default false - */ - trackNodeViewPosition?: boolean -} - -export interface NodeViewRendererProps { - // pass-through from prosemirror - /** - * The node that is being rendered. - */ - node: Parameters[0] - /** - * The editor's view. - */ - view: Parameters[1] - /** - * A function that can be called to get the node's current position in the document. - */ - getPos: Parameters[2] - /** - * is an array of node or inline decorations that are active around the node. - * They are automatically drawn in the normal way, and you will usually just want to ignore this, but they can also be used as a way to provide context information to the node view without adding it to the document itself. - */ - decorations: Parameters[3] - /** - * holds the decorations for the node's content. You can safely ignore this if your view has no content or a contentDOM property, since the editor will draw the decorations on the content. - * But if you, for example, want to create a nested editor with the content, it may make sense to provide it with the inner decorations. - */ - innerDecorations: Parameters[4] - // tiptap-specific - /** - * The editor instance. - */ - editor: Editor - /** - * The extension that is responsible for the node. - */ - extension: Node - /** - * The HTML attributes that should be added to the node's DOM element. - */ - HTMLAttributes: Record -} - -export type NodeViewRenderer = (props: NodeViewRendererProps) => NodeView - -// oxlint-disable-next-lineno-empty-object-type -export interface MarkViewProps extends MarkViewRendererProps {} - -export interface MarkViewRendererProps { - // pass-through from prosemirror - /** - * The node that is being rendered. - */ - mark: Parameters[0] - /** - * The editor's view. - */ - view: Parameters[1] - /** - * indicates whether the mark's content is inline - */ - inline: Parameters[2] - // tiptap-specific - /** - * The editor instance. - */ - editor: Editor - /** - * The extension that is responsible for the mark. - */ - extension: Mark - /** - * The HTML attributes that should be added to the mark's DOM element. - */ - HTMLAttributes: Record - - updateAttributes: (attrs: Record) => void -} - -export type MarkViewRenderer = (props: Props) => MarkView - -export interface MarkViewRendererOptions { - ignoreMutation: ((props: { mutation: ViewMutationRecord }) => boolean) | null -} - -export type AnyCommands = Record Command> - -export type UnionCommands = UnionToIntersection< - ValuesOf, KeysWithTypeOf, object>>> -> - -export type RawCommands = { - [Item in keyof UnionCommands]: UnionCommands[Item] -} - -export type SingleCommands = { - [Item in keyof UnionCommands]: UnionCommands[Item] -} - -export type ChainedCommands = { - [Item in keyof UnionCommands]: UnionCommands[Item] -} & { - run: () => boolean -} - -export type CanCommands = SingleCommands & { chain: () => ChainedCommands } - -export type FocusPosition = 'start' | 'end' | 'all' | number | boolean | null - -export type Range = { - from: number - to: number -} - -export type NodeRange = { - node: ProseMirrorNode - from: number - to: number -} - -export type MarkRange = { - mark: ProseMirrorMark - from: number - to: number -} - -export type Predicate = (node: ProseMirrorNode) => boolean - -export type NodeWithPos = { - node: ProseMirrorNode - pos: number -} - -export type TextSerializer = (props: { - node: ProseMirrorNode - pos: number - parent: ProseMirrorNode - index: number - range: Range -}) => string - -export type ExtendedRegExpMatchArray = RegExpMatchArray & { - data?: Record -} - -export type Dispatch = ((args?: any) => any) | undefined - -/** Markdown related types */ - -// Shared markdown-related types for the MarkdownManager and extensions. -export type MarkdownToken = { - type?: string - raw?: string - text?: string - tokens?: MarkdownToken[] - depth?: number - items?: MarkdownToken[] - [key: string]: any -} - -export type MarkdownHelpers = { - // When used during parsing these helpers return JSON-like node objects - // (not ProseMirror Node instances). Use `any` to represent that shape. - parseInline: (tokens: MarkdownToken[]) => any[] - /** - * Render children. The second argument may be a legacy separator string - * or a RenderContext (preferred). - */ - renderChildren: (node: Node[] | Node, ctxOrSeparator?: RenderContext | string) => string - text: (token: MarkdownToken) => any -} - -/** - * Helpers specifically for parsing markdown tokens into Tiptap JSON. - * These are provided to extension parse handlers. - */ -export type MarkdownParseHelpers = { - /** Parse an array of inline tokens into text nodes with marks */ - parseInline: (tokens: MarkdownToken[]) => JSONContent[] - /** Tokenize source text as inline markdown when supported by the markdown parser */ - tokenizeInline?: (src: string) => MarkdownToken[] - /** Parse an array of block-level tokens */ - parseChildren: (tokens: MarkdownToken[]) => JSONContent[] - /** Parse block-level tokens while preserving implicit empty paragraphs from blank lines */ - parseBlockChildren?: (tokens: MarkdownToken[]) => JSONContent[] - /** Create a text node with optional marks */ - createTextNode: (text: string, marks?: Array<{ type: string; attrs?: any }>) => JSONContent - /** Create any node type with attributes and content */ - createNode: (type: string, attrs?: any, content?: JSONContent[]) => JSONContent - /** Apply a mark to content (used for inline marks like bold, italic) */ - applyMark: ( - markType: string, - content: JSONContent[], - attrs?: any, - ) => { mark: string; content: JSONContent[]; attrs?: any } -} - -/** - * Full runtime helpers object provided by MarkdownManager to handlers. - * This includes the small author-facing helpers plus internal helpers - * that can be useful for advanced handlers. - */ -export type FullMarkdownHelpers = MarkdownHelpers & { - // parseChildren returns JSON-like nodes when invoked during parsing. - parseChildren: (tokens: MarkdownToken[]) => any[] - getExtension: (name: string) => any - // createNode returns a JSON-like node during parsing; render-time helpers - // may instead work with real ProseMirror Node instances. - createNode: (type: string, attrs?: any, content?: any[]) => any - /** Current render context when calling renderers; undefined during parse. */ - currentContext?: RenderContext - /** Indent a multi-line string according to the provided RenderContext. */ - indent: (text: string, ctx?: RenderContext) => string - /** Return the indent string for a given level (e.g. ' ' or '\t'). */ - getIndentString: (level?: number) => string -} - -export default MarkdownHelpers - -/** - * Return shape for parser-level `parse` handlers. - * - a single JSON-like node - * - an array of JSON-like nodes - * - or a `{ mark: string, content: JSONLike[] }` shape to apply a mark - */ -export type MarkdownParseResult = - | JSONContent - | JSONContent[] - | { mark: string; content: JSONContent[]; attrs?: any } - -export type RenderContext = { - index: number - level: number - meta?: Record - parentType?: string | null - previousNode?: JSONContent | null -} - -/** Extension contract for markdown parsing/serialization. */ -export interface MarkdownExtensionSpec { - /** Token name used for parsing (e.g., 'codespan', 'code', 'strong') */ - tokenName?: string - /** Node/mark name used for rendering (typically the extension name) */ - nodeName?: string - parseMarkdown?: (token: MarkdownToken, helpers: MarkdownParseHelpers) => MarkdownParseResult - renderMarkdown?: (node: any, helpers: MarkdownRendererHelpers, ctx: RenderContext) => string - isIndenting?: boolean - htmlReopen?: { - open: string - close: string - } - /** Custom tokenizer for marked.js to handle non-standard markdown syntax */ - tokenizer?: MarkdownTokenizer -} - -/** - * Configuration object passed to custom marked.js tokenizers - */ -export type MarkdownLexerConfiguration = { - /** - * Can be used to transform source text into inline tokens - useful while tokenizing child tokens. - * @param src - * @returns Array of inline tokens - */ - inlineTokens: (src: string) => MarkdownToken[] - - /** - * Can be used to transform source text into block-level tokens - useful while tokenizing child tokens. - * @param src - * @returns Array of block-level tokens - */ - blockTokens: (src: string) => MarkdownToken[] -} - -/** Custom tokenizer function for marked.js extensions */ -export type MarkdownTokenizer = { - /** Token name this tokenizer creates */ - name: string - /** Priority level for tokenizer ordering (higher = earlier) */ - level?: 'block' | 'inline' - /** A string to look for or a function that returns the start index of the token in the source string */ - start?: string | ((src: string) => number) - /** Function that attempts to parse custom syntax from start of text */ - tokenize: ( - src: string, - tokens: MarkdownToken[], - lexer: MarkdownLexerConfiguration, - ) => MarkdownToken | undefined | void -} - -export type MarkdownRendererHelpers = { - /** - * Render children nodes to a markdown string, optionally separated by a string. - * @param nodes The node or array of nodes to render - * @param separator An optional separator string (legacy) or RenderContext - * @returns The rendered markdown string - */ - renderChildren: (nodes: JSONContent | JSONContent[], separator?: string) => string - - /** Render a single child node with its sibling index preserved */ - renderChild?: (node: JSONContent, index: number) => string - - /** - * Render a text token to a markdown string - * @param prefix The prefix to add before the content - * @param content The content to wrap - * @returns The wrapped content - */ - wrapInBlock: (prefix: string, content: string) => string - - /** - * Indent a markdown string according to the provided RenderContext - * @param content The content to indent - * @returns The indented content - */ - indent: (content: string) => string -} - -export type Utils = { - /** - * Returns the new position after applying a transaction. - * - * @param position The position to update. A MappablePosition instance. - * @param transaction The transaction to apply. - * @returns The new position after applying the transaction. - * - * @example - * const position = editor.utils.createMappablePosition(10) - * const {position, mapResult} = editor.utils.getUpdatedPosition(position, transaction) - */ - getUpdatedPosition: ( - position: MappablePosition, - transaction: Transaction, - ) => GetUpdatedPositionResult - - /** - * Creates a MappablePosition from a position number. A mappable position can be used to track the - * next position after applying a transaction. - * - * @param position The position (as a number) where the MappablePosition will be created. - * @returns A new MappablePosition instance at the given position. - * - * @example - * const position = editor.utils.createMappablePosition(10) - */ - createMappablePosition: (position: number) => MappablePosition -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/attrsEqual.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/attrsEqual.ts deleted file mode 100644 index 7aaa14f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/attrsEqual.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Compare two attribute objects for equality. - * Handles null/undefined and asserts key presence in both objects so that - * `{ foo: undefined }` and `{ bar: undefined }` are not treated as equal. - */ -export function attrsEqual( - a: Record | null | undefined, - b: Record | null | undefined, -): boolean { - if (a === b) { - return true - } - if (!a || !b) { - return false - } - - const keysA = Object.keys(a) - const keysB = Object.keys(b) - - if (keysA.length !== keysB.length) { - return false - } - - return keysA.every( - key => Object.prototype.hasOwnProperty.call(b, key) && Object.is(a[key], b[key]), - ) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/callOrReturn.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/callOrReturn.ts deleted file mode 100644 index 44d59b8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/callOrReturn.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { MaybeReturnType } from '../types.js' -import { isFunction } from './isFunction.js' - -/** - * Optionally calls `value` as a function. - * Otherwise it is returned directly. - * @param value Function or any value. - * @param context Optional context to bind to function. - * @param props Optional props to pass to function. - */ -export function callOrReturn( - value: T, - context: any = undefined, - ...props: any[] -): MaybeReturnType { - if (isFunction(value)) { - if (context) { - return value.bind(context)(...props) - } - - return value(...props) - } - - return value as MaybeReturnType -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/canInsertNode.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/canInsertNode.ts deleted file mode 100644 index 6afcfc1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/canInsertNode.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { NodeType } from '@tiptap/pm/model' -import { type EditorState, NodeSelection } from '@tiptap/pm/state' - -export function canInsertNode(state: EditorState, nodeType: NodeType): boolean { - const { selection } = state - const { $from } = selection - - // Special handling for NodeSelection - if (selection instanceof NodeSelection) { - const index = $from.index() - const parent = $from.parent - - // Can we replace the selected node with the horizontal rule? - return parent.canReplaceWith(index, index + 1, nodeType) - } - - // Default: check if we can insert at the current position - let depth = $from.depth - - while (depth >= 0) { - const index = $from.index(depth) - const parent = $from.node(depth) - const match = parent.contentMatchAt(index) - if (match.matchType(nodeType)) { - return true - } - depth -= 1 - } - return false -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/createStyleTag.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/createStyleTag.ts deleted file mode 100644 index 70fbbc8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/createStyleTag.ts +++ /dev/null @@ -1,21 +0,0 @@ -export function createStyleTag(style: string, nonce?: string, suffix?: string): HTMLStyleElement { - const tiptapStyleTag = ( - document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ''}]`) - ) - - if (tiptapStyleTag !== null) { - return tiptapStyleTag - } - - const styleNode = document.createElement('style') - - if (nonce) { - styleNode.setAttribute('nonce', nonce) - } - - styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ''}`, '') - styleNode.innerHTML = style - document.getElementsByTagName('head')[0].appendChild(styleNode) - - return styleNode -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/deleteProps.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/deleteProps.ts deleted file mode 100644 index 1496a9b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/deleteProps.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Remove a property or an array of properties from an object - * @param obj Object - * @param key Key to remove - */ -export function deleteProps( - obj: Record, - propOrProps: string | string[], -): Record { - const props = typeof propOrProps === 'string' ? [propOrProps] : propOrProps - - return Object.keys(obj).reduce((newObj: Record, prop) => { - if (!props.includes(prop)) { - newObj[prop] = obj[prop] - } - - return newObj - }, {}) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/elementFromString.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/elementFromString.ts deleted file mode 100644 index a6af348..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/elementFromString.ts +++ /dev/null @@ -1,29 +0,0 @@ -const removeWhitespaces = (node: HTMLElement) => { - const children = node.childNodes - - for (let i = children.length - 1; i >= 0; i -= 1) { - const child = children[i] - - if (child.nodeType === 3 && child.nodeValue && /^(\n\s\s|\n)$/.test(child.nodeValue)) { - node.removeChild(child) - } else if (child.nodeType === 1) { - removeWhitespaces(child as HTMLElement) - } - } - - return node -} - -export function elementFromString(value: string): HTMLElement { - if (typeof window === 'undefined') { - throw new Error( - '[tiptap error]: there is no window object available, so this function cannot be used', - ) - } - // add a wrapper to preserve leading and trailing whitespace - const wrappedValue = `${value}` - - const html = new window.DOMParser().parseFromString(wrappedValue, 'text/html').body - - return removeWhitespaces(html) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/escapeForRegEx.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/escapeForRegEx.ts deleted file mode 100644 index e06bd41..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/escapeForRegEx.ts +++ /dev/null @@ -1,4 +0,0 @@ -// source: https://stackoverflow.com/a/6969486 -export function escapeForRegEx(string: string): string { - return string.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&') -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/findDuplicates.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/findDuplicates.ts deleted file mode 100644 index 17c59e7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/findDuplicates.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Find duplicates in an array. - */ -export function findDuplicates(items: T[]): T[] { - const filtered = items.filter((el, index) => items.indexOf(el) !== index) - - return Array.from(new Set(filtered)) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/fromString.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/fromString.ts deleted file mode 100644 index 630a8ac..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/fromString.ts +++ /dev/null @@ -1,19 +0,0 @@ -export function fromString(value: any): any { - if (typeof value !== 'string') { - return value - } - - if (value.match(/^[+-]?(?:\d*\.)?\d+$/)) { - return Number(value) - } - - if (value === 'true') { - return true - } - - if (value === 'false') { - return false - } - - return value -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/getStyleProperty.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/getStyleProperty.ts deleted file mode 100644 index 8c6652c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/getStyleProperty.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Read a CSS property value directly from an element's raw inline `style` - * attribute, bypassing the CSSOM (e.g. `element.style.fontFamily`) which - * canonicalizes values and can change formatting. The original format is - * preserved (quotes, hex vs rgb, etc.). - * - * When a property is declared more than once, the last declaration wins — - * this matches CSS cascade order and is useful when nested spans are merged - * and the child's value should take priority. - * - * Property name comparison is case-insensitive. - * - * @param element - The element whose `style` attribute should be read. - * @param propertyName - The CSS property name (e.g. `font-family`). - * @returns The raw value string, or `null` if the property is not present. - * - * @example - * ```ts - * parseHTML: element => getStyleProperty(element, 'font-family') - * ``` - */ -export function getStyleProperty(element: HTMLElement, propertyName: string): string | null { - const styleAttr = element.getAttribute('style') - - if (!styleAttr) { - return null - } - - const decls = styleAttr - .split(';') - .map(decl => decl.trim()) - .filter(Boolean) - - const target = propertyName.toLowerCase() - - for (let i = decls.length - 1; i >= 0; i -= 1) { - const decl = decls[i] - const colonIndex = decl.indexOf(':') - - if (colonIndex === -1) { - continue - } - - const prop = decl.slice(0, colonIndex).trim().toLowerCase() - - if (prop === target) { - return decl.slice(colonIndex + 1).trim() - } - } - - return null -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/htmlEntities.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/htmlEntities.ts deleted file mode 100644 index ee04bf5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/htmlEntities.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Decode common HTML entities in text content so they display as literal - * characters inside the editor. The decode order matters: `&` must be - * decoded **last** so that doubly-encoded sequences like `&lt;` first - * survive the `<` pass and then correctly become `<` (not `<`). - */ -export function decodeHtmlEntities(text: string): string { - return text - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/"/g, '"') - .replace(/&/g, '&') -} - -/** - * Encode HTML special characters so they roundtrip safely through markdown. - * `&` is encoded **first** to avoid double-encoding the ampersand in other - * entities (e.g. `<` → `<`, not `&lt;`). - * - * Note: `"` is intentionally NOT encoded here because double quotes are - * ordinary characters in markdown and do not need escaping. The decode - * function still handles `"` because the markdown tokenizer may emit it. - */ -export function encodeHtmlEntities(text: string): string { - return text.replace(/&/g, '&').replace(//g, '>') -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/index.ts deleted file mode 100644 index 83960f4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -export * from './attrsEqual.js' -export * from './callOrReturn.js' -export * from './canInsertNode.js' -export * from './createStyleTag.js' -export * from './deleteProps.js' -export * from './elementFromString.js' -export * from './escapeForRegEx.js' -export * from './findDuplicates.js' -export * from './fromString.js' -export * from './getStyleProperty.js' -export * from './htmlEntities.js' -export * from './isAndroid.js' -export * from './isEmptyObject.js' -export * from './isFirefox.js' -export * from './isFunction.js' -export * from './isiOS.js' -export * from './isMacOS.js' -export * from './isNumber.js' -export * from './isPlainObject.js' -export * from './isRegExp.js' -export * from './isSafari.js' -export * from './isString.js' -export * from './markdown/index.js' -export * as markdown from './markdown/index.js' -export * from './marksEqual.js' -export * from './mergeAttributes.js' -export * from './mergeDeep.js' -export * from './minMax.js' -export * from './objectIncludes.js' -export * from './removeDuplicates.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isAndroid.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isAndroid.ts deleted file mode 100644 index 760c4d5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isAndroid.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function isAndroid(): boolean { - return navigator.platform === 'Android' || /android/i.test(navigator.userAgent) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isEmptyObject.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isEmptyObject.ts deleted file mode 100644 index 50ef396..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isEmptyObject.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function isEmptyObject(value = {}): boolean { - return Object.keys(value).length === 0 && value.constructor === Object -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isFirefox.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isFirefox.ts deleted file mode 100644 index 60e121c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isFirefox.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Detects if the current browser is Firefox. - * @returns `true` if the browser is Firefox, `false` otherwise. - * @example - * if (isFirefox()) { - * // Firefox-specific handling - * } - */ -export function isFirefox(): boolean { - return typeof navigator !== 'undefined' ? /Firefox/.test(navigator.userAgent) : false -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isFunction.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isFunction.ts deleted file mode 100644 index 5119836..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isFunction.ts +++ /dev/null @@ -1,4 +0,0 @@ -// oxlint-disable-next-lineno-unsafe-function-type -export function isFunction(value: any): value is Function { - return typeof value === 'function' -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isMacOS.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isMacOS.ts deleted file mode 100644 index ba81cae..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isMacOS.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function isMacOS(): boolean { - return typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isNumber.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isNumber.ts deleted file mode 100644 index d0023e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isNumber.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function isNumber(value: any): value is number { - return typeof value === 'number' -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isPlainObject.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isPlainObject.ts deleted file mode 100644 index f7a2b3e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isPlainObject.ts +++ /dev/null @@ -1,13 +0,0 @@ -// see: https://github.com/mesqueeb/is-what/blob/88d6e4ca92fb2baab6003c54e02eedf4e729e5ab/src/index.ts - -function getType(value: any): string { - return Object.prototype.toString.call(value).slice(8, -1) -} - -export function isPlainObject(value: any): value is Record { - if (getType(value) !== 'Object') { - return false - } - - return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isRegExp.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isRegExp.ts deleted file mode 100644 index f9ec25f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isRegExp.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function isRegExp(value: any): value is RegExp { - return Object.prototype.toString.call(value) === '[object RegExp]' -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isSafari.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isSafari.ts deleted file mode 100644 index 05c8b35..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isSafari.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Detects if the current browser is Safari (but not iOS Safari or Chrome). - * @returns `true` if the browser is Safari, `false` otherwise. - * @example - * if (isSafari()) { - * // Safari-specific handling - * } - */ -export function isSafari(): boolean { - return typeof navigator !== 'undefined' - ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent) - : false -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isString.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isString.ts deleted file mode 100644 index 24e46e4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isString.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function isString(value: any): value is string { - return typeof value === 'string' -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isiOS.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isiOS.ts deleted file mode 100644 index 29aed0d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/isiOS.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function isiOS(): boolean { - return ( - ['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes( - navigator.platform, - ) || - // iPad on iOS 13 detection - (navigator.userAgent.includes('Mac') && 'ontouchend' in document) - ) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/attributeUtils.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/attributeUtils.ts deleted file mode 100644 index d26623d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/attributeUtils.ts +++ /dev/null @@ -1,130 +0,0 @@ -/** - * @fileoverview Utility functions for parsing and serializing markdown attributes. - * - * These utilities handle the common patterns for parsing attribute strings - * in various markdown syntaxes like Pandoc attributes. - */ - -/** - * Parses a Pandoc-style attribute string into an object. - * - * Supports the following patterns: - * - Classes: `.className` → `{ class: 'className' }` - * - IDs: `#myId` → `{ id: 'myId' }` - * - Key-value pairs: `key="value"` → `{ key: 'value' }` - * - Boolean attributes: `disabled` → `{ disabled: true }` - * - * @param attrString - The attribute string to parse - * @returns Parsed attributes object - * - * @example - * ```ts - * parseAttributes('.btn #submit disabled type="button"') - * // → { class: 'btn', id: 'submit', disabled: true, type: 'button' } - * ``` - */ -export function parseAttributes(attrString: string): Record { - if (!attrString?.trim()) { - return {} - } - - const attributes: Record = {} - - // First, extract and remove quoted strings to avoid parsing content inside them - const quotedStrings: string[] = [] - const tempString = attrString.replace(/["']([^"']*)["']/g, match => { - quotedStrings.push(match) - return `__QUOTED_${quotedStrings.length - 1}__` - }) - - // Parse classes (.className) - only outside of quoted strings - const classMatches = tempString.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g) - if (classMatches) { - const classes = classMatches.map(match => match.trim().slice(1)) // Remove the dot - attributes.class = classes.join(' ') - } - - // Parse IDs (#myId) - only outside of quoted strings - const idMatch = tempString.match(/(?:^|\s)#([a-zA-Z][\w-]*)/) - if (idMatch) { - attributes.id = idMatch[1] - } - - // Parse key-value pairs (key="value" or key='value') - restore quoted strings - const kvRegex = /([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g - const kvMatches = Array.from(tempString.matchAll(kvRegex)) - kvMatches.forEach(([, key, quotedRef]) => { - const quotedIndex = parseInt(quotedRef.match(/__QUOTED_(\d+)__/)?.[1] || '0', 10) - const quotedValue = quotedStrings[quotedIndex] - if (quotedValue) { - // Remove the outer quotes - attributes[key] = quotedValue.slice(1, -1) - } - }) - - // Parse boolean attributes (standalone words that aren't classes/IDs) - const cleanString = tempString - .replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g, '') // Remove classes - .replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g, '') // Remove IDs - .replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g, '') // Remove key-value pairs - .trim() - - if (cleanString) { - const booleanAttrs = cleanString.split(/\s+/).filter(Boolean) - booleanAttrs.forEach(attr => { - if (attr.match(/^[a-zA-Z][\w-]*$/)) { - attributes[attr] = true - } - }) - } - - return attributes -} - -/** - * Serializes an attributes object back to a Pandoc-style attribute string. - * - * @param attributes - The attributes object to serialize - * @returns Serialized attribute string - * - * @example - * ```ts - * serializeAttributes({ class: 'btn primary', id: 'submit', disabled: true, type: 'button' }) - * // → '.btn.primary #submit disabled type="button"' - * ``` - */ -export function serializeAttributes(attributes: Record): string { - if (!attributes || Object.keys(attributes).length === 0) { - return '' - } - - const parts: string[] = [] - - // Handle classes - if (attributes.class) { - const classes = String(attributes.class).split(/\s+/).filter(Boolean) - classes.forEach(cls => parts.push(`.${cls}`)) - } - - // Handle ID - if (attributes.id) { - parts.push(`#${attributes.id}`) - } - - // Handle other attributes - Object.entries(attributes).forEach(([key, value]) => { - if (key === 'class' || key === 'id') { - return // Already handled - } - - if (value === true) { - // Boolean attribute - parts.push(key) - } else if (value !== false && value != null) { - // Key-value attribute - parts.push(`${key}="${String(value)}"`) - } - }) - - return parts.join(' ') -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts deleted file mode 100644 index 291b844..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts +++ /dev/null @@ -1,141 +0,0 @@ -import type { - JSONContent, - MarkdownParseHelpers, - MarkdownParseResult, - MarkdownToken, - MarkdownTokenizer, -} from '../../types.js' -import { - parseAttributes as defaultParseAttributes, - serializeAttributes as defaultSerializeAttributes, -} from './attributeUtils.js' - -export interface AtomBlockMarkdownSpecOptions { - /** The Tiptap node name this spec is for */ - nodeName: string - /** The markdown syntax name (defaults to nodeName if not provided) */ - name?: string - /** Function to parse attributes from token attribute string */ - parseAttributes?: (attrString: string) => Record - /** Function to serialize attributes back to string for rendering */ - serializeAttributes?: (attrs: Record) => string - /** Default attributes to apply when parsing */ - defaultAttributes?: Record - /** Required attributes that must be present for successful parsing */ - requiredAttributes?: string[] - /** Attributes that are allowed to be rendered back to markdown (whitelist) */ - allowedAttributes?: string[] -} - -/** - * Creates a complete markdown spec for atomic block nodes using Pandoc syntax. - * - * The generated spec handles: - * - Parsing self-closing blocks with `:::blockName {attributes}` - * - Extracting and parsing attributes - * - Validating required attributes - * - Rendering blocks back to markdown - * - * @param options - Configuration for the atomic block markdown spec - * @returns Complete markdown specification object - * - * @example - * ```ts - * const youtubeSpec = createAtomBlockMarkdownSpec({ - * nodeName: 'youtube', - * requiredAttributes: ['src'], - * defaultAttributes: { start: 0 }, - * allowedAttributes: ['src', 'start', 'width', 'height'] // Only these get rendered to markdown - * }) - * - * // Usage in extension: - * export const Youtube = Node.create({ - * // ... other config - * markdown: youtubeSpec - * }) - * ``` - */ -export function createAtomBlockMarkdownSpec(options: AtomBlockMarkdownSpecOptions): { - parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult - markdownTokenizer: MarkdownTokenizer - renderMarkdown: (node: JSONContent) => string -} { - const { - nodeName, - name: markdownName, - parseAttributes = defaultParseAttributes, - serializeAttributes = defaultSerializeAttributes, - defaultAttributes = {}, - requiredAttributes = [], - allowedAttributes, - } = options - - // Use markdownName for syntax, fallback to nodeName - const blockName = markdownName || nodeName - - // Helper function to filter attributes based on allowlist - const filterAttributes = (attrs: Record) => { - if (!allowedAttributes) { - return attrs - } - - const filtered: Record = {} - allowedAttributes.forEach(key => { - if (key in attrs) { - filtered[key] = attrs[key] - } - }) - return filtered - } - - return { - parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => { - const attrs = { ...defaultAttributes, ...token.attributes } - return h.createNode(nodeName, attrs, []) - }, - - markdownTokenizer: { - name: nodeName, - level: 'block' as const, - start(src: string) { - const regex = new RegExp(`^:::${blockName}(?:\\s|$)`, 'm') - const index = src.match(regex)?.index - return index !== undefined ? index : -1 - }, - tokenize(src, _tokens, _lexer) { - // Use non-global regex to match from the start of the string - // Include optional newline to ensure we consume the entire line - const regex = new RegExp(`^:::${blockName}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`) - const match = src.match(regex) - - if (!match) { - return undefined - } - - // Parse attributes if present - const attrString = match[1] || '' - const attributes = parseAttributes(attrString) - - // Validate required attributes - const missingRequired = requiredAttributes.find(required => !(required in attributes)) - if (missingRequired) { - return undefined - } - - return { - type: nodeName, - raw: match[0], - attributes, - } - }, - }, - - renderMarkdown: node => { - const filteredAttrs = filterAttributes(node.attrs || {}) - const attrs = serializeAttributes(filteredAttrs) - const attrString = attrs ? ` {${attrs}}` : '' - - return `:::${blockName}${attrString} :::` - }, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createBlockMarkdownSpec.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createBlockMarkdownSpec.ts deleted file mode 100644 index 5173822..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createBlockMarkdownSpec.ts +++ /dev/null @@ -1,231 +0,0 @@ -import type { - JSONContent, - MarkdownParseHelpers, - MarkdownParseResult, - MarkdownRendererHelpers, - MarkdownToken, - MarkdownTokenizer, -} from '../../types.js' -import { - parseAttributes as defaultParseAttributes, - serializeAttributes as defaultSerializeAttributes, -} from './attributeUtils.js' - -export interface BlockMarkdownSpecOptions { - /** The Tiptap node name this spec is for */ - nodeName: string - /** The markdown syntax name (defaults to nodeName if not provided) */ - name?: string - /** Function to extract content from the node for serialization */ - getContent?: (token: MarkdownToken) => string - /** Function to parse attributes from the attribute string */ - parseAttributes?: (attrString: string) => Record - /** Function to serialize attributes to string */ - serializeAttributes?: (attrs: Record) => string - /** Default attributes to apply when parsing */ - defaultAttributes?: Record - /** Content type: 'block' allows paragraphs/lists/etc, 'inline' only allows bold/italic/links/etc */ - content?: 'block' | 'inline' - /** Allowlist of attributes to include in markdown (if not provided, all attributes are included) */ - allowedAttributes?: string[] -} - -/** - * Creates a complete markdown spec for block-level nodes using Pandoc syntax. - * - * The generated spec handles: - * - Parsing blocks with `:::blockName {attributes}` syntax - * - Extracting and parsing attributes - * - Rendering blocks back to markdown with proper formatting - * - Nested content support - * - * @param options - Configuration for the block markdown spec - * @returns Complete markdown specification object - * - * @example - * ```ts - * const calloutSpec = createBlockMarkdownSpec({ - * nodeName: 'callout', - * defaultAttributes: { type: 'info' }, - * allowedAttributes: ['type', 'title'] // Only these get rendered to markdown - * }) - * - * // Usage in extension: - * export const Callout = Node.create({ - * // ... other config - * markdown: calloutSpec - * }) - * ``` - */ -export function createBlockMarkdownSpec(options: BlockMarkdownSpecOptions): { - parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult - markdownTokenizer: MarkdownTokenizer - renderMarkdown: (node: JSONContent, h: MarkdownRendererHelpers) => string -} { - const { - nodeName, - name: markdownName, - getContent, - parseAttributes = defaultParseAttributes, - serializeAttributes = defaultSerializeAttributes, - defaultAttributes = {}, - content = 'block', - allowedAttributes, - } = options - - // Use markdownName for syntax, fallback to nodeName - const blockName = markdownName || nodeName - - // Helper function to filter attributes based on allowlist - const filterAttributes = (attrs: Record) => { - if (!allowedAttributes) { - return attrs - } - - const filtered: Record = {} - allowedAttributes.forEach(key => { - if (key in attrs) { - filtered[key] = attrs[key] - } - }) - return filtered - } - - return { - parseMarkdown: (token, h) => { - let nodeContent: JSONContent[] - - if (getContent) { - const contentResult = getContent(token) - // If getContent returns a string, wrap it in a text node - nodeContent = - typeof contentResult === 'string' - ? [{ type: 'text', text: contentResult }] - : contentResult - } else if (content === 'block') { - nodeContent = h.parseChildren(token.tokens || []) - } else { - nodeContent = h.parseInline(token.tokens || []) - } - - const attrs = { ...defaultAttributes, ...token.attributes } - - return h.createNode(nodeName, attrs, nodeContent) - }, - - markdownTokenizer: { - name: nodeName, - level: 'block' as const, - start(src) { - const regex = new RegExp(`^:::${blockName}`, 'm') - const index = src.match(regex)?.index - return index !== undefined ? index : -1 - }, - tokenize(src, _tokens, lexer) { - // Match the opening tag with optional attributes - const openingRegex = new RegExp(`^:::${blockName}(?:\\s+\\{([^}]*)\\})?\\s*\\n`) - const openingMatch = src.match(openingRegex) - - if (!openingMatch) { - return undefined - } - - const [openingTag, attrString = ''] = openingMatch - const attributes = parseAttributes(attrString) - - // Find the matching closing tag by tracking nesting level - let level = 1 - const position = openingTag.length - let matchedContent = '' - - // Pattern to match any block opening (:::word) or closing (:::) - const blockPattern = /^:::([\w-]*)(\s.*)?/gm - const remaining = src.slice(position) - - blockPattern.lastIndex = 0 - - // run until no more matches are found - for (;;) { - const match = blockPattern.exec(remaining) - if (match === null) { - break - } - const matchPos = match.index - const blockType = match[1] // Empty string for closing tag, block name for opening - - if (match[2]?.endsWith(':::')) { - // this is an atom ::: node, we skip it - continue - } - - if (blockType) { - // Opening tag found - increase level - level += 1 - } else { - // Closing tag found - decrease level - level -= 1 - - if (level === 0) { - // Found our matching closing tag - // Don't trim yet - keep newlines for tokenizer regex matching - const rawContent = remaining.slice(0, matchPos) - matchedContent = rawContent.trim() - const fullMatch = src.slice(0, position + matchPos + match[0].length) - - // Tokenize the content - let contentTokens: MarkdownToken[] = [] - if (matchedContent) { - if (content === 'block') { - // Use rawContent for tokenization to preserve line boundaries for regex matching - contentTokens = lexer.blockTokens(rawContent) - - // Parse inline tokens for any token that has text content but no tokens - contentTokens.forEach(token => { - if (token.text && (!token.tokens || token.tokens.length === 0)) { - token.tokens = lexer.inlineTokens(token.text) - } - }) - - // Clean up empty trailing paragraphs - while (contentTokens.length > 0) { - const lastToken = contentTokens[contentTokens.length - 1] - if ( - lastToken.type === 'paragraph' && - (!lastToken.text || lastToken.text.trim() === '') - ) { - contentTokens.pop() - } else { - break - } - } - } else { - contentTokens = lexer.inlineTokens(matchedContent) - } - } - - return { - type: nodeName, - raw: fullMatch, - attributes, - content: matchedContent, - tokens: contentTokens, - } - } - } - } - - // No matching closing tag found - return undefined - }, - }, - - renderMarkdown: (node, h) => { - const filteredAttrs = filterAttributes(node.attrs || {}) - const attrs = serializeAttributes(filteredAttrs) - const attrString = attrs ? ` {${attrs}}` : '' - const renderedContent = h.renderChildren(node.content || [], '\n\n') - - return `:::${blockName}${attrString}\n\n${renderedContent}\n\n:::` - }, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createInlineMarkdownSpec.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createInlineMarkdownSpec.ts deleted file mode 100644 index 88009d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/createInlineMarkdownSpec.ts +++ /dev/null @@ -1,284 +0,0 @@ -import type { - JSONContent, - MarkdownParseHelpers, - MarkdownParseResult, - MarkdownToken, - MarkdownTokenizer, -} from '../../types.js' - -/** - * Parse shortcode attributes like 'id="madonna" handle="john" name="John Doe"' - * Requires all values to be quoted with either single or double quotes - */ -function parseShortcodeAttributes(attrString: string): Record { - if (!attrString.trim()) { - return {} - } - - const attributes: Record = {} - // Match key=value pairs, only accepting quoted values - const regex = /(\w+)=(?:"([^"]*)"|'([^']*)')/g - let match = regex.exec(attrString) - - while (match !== null) { - const [, key, doubleQuoted, singleQuoted] = match - attributes[key] = doubleQuoted || singleQuoted - match = regex.exec(attrString) - } - - return attributes -} - -/** - * Serialize attributes back to shortcode format - * Always quotes all values with double quotes - */ -function serializeShortcodeAttributes(attrs: Record): string { - return Object.entries(attrs) - .filter(([, value]) => value !== undefined && value !== null) - .map(([key, value]) => `${key}="${value}"`) - .join(' ') -} - -/** - * Configuration for an allowed attribute in markdown serialization. - * Can be a simple string (attribute name) or an object with additional options. - */ -export type AllowedAttribute = - | string - | { - /** The attribute name */ - name: string - /** - * If provided, the attribute will be skipped during serialization when its value - * equals this default value. This keeps markdown output clean by omitting - * attributes that have their default values. - */ - skipIfDefault?: any - } - -export interface InlineMarkdownSpecOptions { - /** The Tiptap node name this spec is for */ - nodeName: string - /** The shortcode name (defaults to nodeName if not provided) */ - name?: string - /** Function to extract content from the node for serialization */ - getContent?: (node: any) => string - /** Function to parse attributes from the attribute string */ - parseAttributes?: (attrString: string) => Record - /** Function to serialize attributes to string */ - serializeAttributes?: (attrs: Record) => string - /** Default attributes to apply when parsing */ - defaultAttributes?: Record - /** Whether this is a self-closing shortcode (no content, like [emoji name=party]) */ - selfClosing?: boolean - /** - * Allowlist of attributes to include in markdown serialization. - * If not provided, all attributes are included. - * - * Each item can be either: - * - A string: the attribute name (always included if present) - * - An object: `{ name: string, skipIfDefault?: any }` for conditional inclusion - * - * @example - * // Simple string attributes (backward compatible) - * allowedAttributes: ['id', 'label'] - * - * // Mixed with conditional attributes - * allowedAttributes: [ - * 'id', - * 'label', - * { name: 'mentionSuggestionChar', skipIfDefault: '@' } - * ] - */ - allowedAttributes?: AllowedAttribute[] -} - -/** - * Creates a complete markdown spec for inline nodes using attribute syntax. - * - * The generated spec handles: - * - Parsing shortcode syntax with `[nodeName attributes]content[/nodeName]` format - * - Self-closing shortcodes like `[emoji name=party_popper]` - * - Extracting and parsing attributes from the opening tag - * - Rendering inline elements back to shortcode markdown - * - Supporting both content-based and self-closing inline elements - * - * @param options - Configuration for the inline markdown spec - * @returns Complete markdown specification object - * - * @example - * ```ts - * // Self-closing mention: [mention id="madonna" label="Madonna"] - * const mentionSpec = createInlineMarkdownSpec({ - * nodeName: 'mention', - * selfClosing: true, - * defaultAttributes: { type: 'user' }, - * allowedAttributes: ['id', 'label'] // Only these get rendered to markdown - * }) - * - * // Self-closing emoji: [emoji name="party_popper"] - * const emojiSpec = createInlineMarkdownSpec({ - * nodeName: 'emoji', - * selfClosing: true, - * allowedAttributes: ['name'] - * }) - * - * // With content: [highlight color="yellow"]text[/highlight] - * const highlightSpec = createInlineMarkdownSpec({ - * nodeName: 'highlight', - * selfClosing: false, - * allowedAttributes: ['color', 'style'] - * }) - * - * // Usage in extension: - * export const Mention = Node.create({ - * name: 'mention', // Must match nodeName - * // ... other config - * markdown: mentionSpec - * }) - * ``` - */ -export function createInlineMarkdownSpec(options: InlineMarkdownSpecOptions): { - parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => MarkdownParseResult - markdownTokenizer: MarkdownTokenizer - renderMarkdown: (node: JSONContent) => string -} { - const { - nodeName, - name: shortcodeName, - getContent, - parseAttributes = parseShortcodeAttributes, - serializeAttributes = serializeShortcodeAttributes, - defaultAttributes = {}, - selfClosing = false, - allowedAttributes, - } = options - - // Use shortcodeName for markdown syntax, fallback to nodeName - const shortcode = shortcodeName || nodeName - - // Helper function to filter attributes based on allowlist - const filterAttributes = (attrs: Record) => { - if (!allowedAttributes) { - return attrs - } - - const filtered: Record = {} - allowedAttributes.forEach(attr => { - // Handle both string and object formats for backward compatibility - const attrName = typeof attr === 'string' ? attr : attr.name - const skipIfDefault = typeof attr === 'string' ? undefined : attr.skipIfDefault - - if (attrName in attrs) { - const value = attrs[attrName] - - // Skip if value equals the default (when skipIfDefault is specified) - if (skipIfDefault !== undefined && value === skipIfDefault) { - return - } - - filtered[attrName] = value - } - }) - return filtered - } - - // Escape special regex characters in shortcode name - const escapedShortcode = shortcode.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') - - return { - parseMarkdown: (token: MarkdownToken, h: MarkdownParseHelpers) => { - const attrs = { ...defaultAttributes, ...token.attributes } - - if (selfClosing) { - // Self-closing nodes like mentions are atomic - no content - return h.createNode(nodeName, attrs) - } - - // Nodes with content - const content = getContent ? getContent(token) : token.content || '' - if (content) { - // For inline content, create text nodes using the proper helper - return h.createNode(nodeName, attrs, [h.createTextNode(content)]) - } - return h.createNode(nodeName, attrs, []) - }, - - markdownTokenizer: { - name: nodeName, - level: 'inline' as const, - start(src: string) { - // Create a non-global version for finding the start position - const startPattern = selfClosing - ? new RegExp(`\\[${escapedShortcode}\\s*[^\\]]*\\]`) - : new RegExp(`\\[${escapedShortcode}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${escapedShortcode}\\]`) - - const match = src.match(startPattern) - const index = match?.index - return index !== undefined ? index : -1 - }, - tokenize(src, _tokens, _lexer) { - // Use non-global regex to match from the start of the string - const tokenPattern = selfClosing - ? new RegExp(`^\\[${escapedShortcode}\\s*([^\\]]*)\\]`) - : new RegExp( - `^\\[${escapedShortcode}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${escapedShortcode}\\]`, - ) - - const match = src.match(tokenPattern) - - if (!match) { - return undefined - } - - let content = '' - let attrString = '' - - if (selfClosing) { - // Self-closing: [shortcode attr="value"] - const [, attrs] = match - attrString = attrs - } else { - // With content: [shortcode attr="value"]content[/shortcode] - const [, attrs, contentMatch] = match - attrString = attrs - content = contentMatch || '' - } - - // Parse attributes from the attribute string - const attributes = parseAttributes(attrString.trim()) - - return { - type: nodeName, - raw: match[0], - content: content.trim(), - attributes, - } - }, - }, - - renderMarkdown: (node: JSONContent) => { - let content = '' - if (getContent) { - content = getContent(node) - } else if (node.content && node.content.length > 0) { - // Extract text from content array for inline nodes - content = node.content - .filter((child: any) => child.type === 'text') - .map((child: any) => child.text) - .join('') - } - - const filteredAttrs = filterAttributes(node.attrs || {}) - const attrs = serializeAttributes(filteredAttrs) - const attrString = attrs ? ` ${attrs}` : '' - - if (selfClosing) { - return `[${shortcode}${attrString}]` - } - - return `[${shortcode}${attrString}]${content}[/${shortcode}]` - }, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/index.ts deleted file mode 100644 index f1680fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @fileoverview Markdown utilities for creating standardized markdown specs. - * - * This module provides utilities for creating complete markdown specifications - * for different types of nodes using unified syntax patterns. - */ - -export * from './attributeUtils.js' -export * from './createAtomBlockMarkdownSpec.js' -export * from './createBlockMarkdownSpec.js' -export * from './createInlineMarkdownSpec.js' -export * from './parseIndentedBlocks.js' -export * from './renderNestedMarkdownContent.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/parseIndentedBlocks.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/parseIndentedBlocks.ts deleted file mode 100644 index ae4956b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/parseIndentedBlocks.ts +++ /dev/null @@ -1,194 +0,0 @@ -/** - * @fileoverview Utility for parsing indented markdown blocks with hierarchical nesting. - * - * This utility handles the complex logic of parsing markdown blocks that can contain - * nested content based on indentation levels, maintaining proper hierarchical structure - * for lists, task lists, and other indented block types. - */ - -export interface ParsedBlock { - type: string - raw: string - mainContent: string - indentLevel: number - nestedContent?: string - nestedTokens?: any[] - [key: string]: any -} - -export interface BlockParserConfig { - /** Regex pattern to match block items */ - itemPattern: RegExp - /** Function to extract data from regex match */ - extractItemData: (match: RegExpMatchArray) => { - mainContent: string - indentLevel: number - [key: string]: any - } - /** Function to create the final token */ - createToken: (data: any, nestedTokens?: any[]) => ParsedBlock - /** Base indentation to remove from nested content (default: 2 spaces) */ - baseIndentSize?: number - /** - * Custom parser for nested content. If provided, this will be called instead - * of the default lexer.blockTokens() for parsing nested content. - * This allows recursive parsing of the same block type. - */ - customNestedParser?: (dedentedContent: string) => any[] | undefined -} - -/** - * Parses markdown text into hierarchical indented blocks with proper nesting. - * - * This utility handles: - * - Line-by-line parsing with pattern matching - * - Hierarchical nesting based on indentation levels - * - Nested content collection and parsing - * - Empty line handling - * - Content dedenting for nested blocks - * - * The key difference from flat parsing is that this maintains the hierarchical - * structure where nested items become `nestedTokens` of their parent items, - * rather than being flattened into a single array. - * - * @param src - The markdown source text to parse - * @param config - Configuration object defining how to parse and create tokens - * @param lexer - Markdown lexer for parsing nested content - * @returns Parsed result with hierarchical items, or undefined if no matches - * - * @example - * ```ts - * const result = parseIndentedBlocks(src, { - * itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - * extractItemData: (match) => ({ - * indentLevel: match[1].length, - * mainContent: match[4], - * checked: match[3].toLowerCase() === 'x' - * }), - * createToken: (data, nestedTokens) => ({ - * type: 'taskItem', - * checked: data.checked, - * text: data.mainContent, - * nestedTokens - * }) - * }, lexer) - * ``` - */ -export function parseIndentedBlocks( - src: string, - config: BlockParserConfig, - lexer: { - inlineTokens: (src: string) => any[] - blockTokens: (src: string) => any[] - }, -): - | { - items: ParsedBlock[] - raw: string - } - | undefined { - const lines = src.split('\n') - const items: ParsedBlock[] = [] - let totalRaw = '' - let i = 0 - const baseIndentSize = config.baseIndentSize || 2 - - while (i < lines.length) { - const currentLine = lines[i] - const itemMatch = currentLine.match(config.itemPattern) - - if (!itemMatch) { - // Not a matching item - stop if we have items, otherwise this isn't our block type - if (items.length > 0) { - break - } else if (currentLine.trim() === '') { - i += 1 - totalRaw = `${totalRaw}${currentLine}\n` - continue - } else { - return undefined - } - } - - const itemData = config.extractItemData(itemMatch) - const { indentLevel, mainContent } = itemData - totalRaw = `${totalRaw}${currentLine}\n` - - // Collect content for this item (including nested items) - const itemContent = [mainContent] // Start with the main text - i += 1 - - // Look ahead for nested content (indented more than current item) - while (i < lines.length) { - const nextLine = lines[i] - - if (nextLine.trim() === '') { - // Empty line - might be end of nested content - const nextNonEmptyIndex = lines.slice(i + 1).findIndex(l => l.trim() !== '') - if (nextNonEmptyIndex === -1) { - // No more content - break - } - - const nextNonEmpty = lines[i + 1 + nextNonEmptyIndex] - const nextIndent = nextNonEmpty.match(/^(\s*)/)?.[1]?.length || 0 - - if (nextIndent > indentLevel) { - // Nested content continues after empty line - itemContent.push(nextLine) - totalRaw = `${totalRaw}${nextLine}\n` - i += 1 - continue - } else { - // End of nested content - break - } - } - - const nextIndent = nextLine.match(/^(\s*)/)?.[1]?.length || 0 - - if (nextIndent > indentLevel) { - // This is nested content for the current item - itemContent.push(nextLine) - totalRaw = `${totalRaw}${nextLine}\n` - i += 1 - } else { - // Same or less indentation - this belongs to parent level - break - } - } - - // Parse nested content if present - let nestedTokens: any[] | undefined - const nestedContent = itemContent.slice(1) - - if (nestedContent.length > 0) { - // Remove the base indentation from nested content - const dedentedNested = nestedContent - .map(nestedLine => nestedLine.slice(indentLevel + baseIndentSize)) // Remove base indent + 2 spaces - .join('\n') - - if (dedentedNested.trim()) { - // Use custom nested parser if provided, otherwise fall back to default - if (config.customNestedParser) { - nestedTokens = config.customNestedParser(dedentedNested) - } else { - nestedTokens = lexer.blockTokens(dedentedNested) - } - } - } - - // Create the token using the provided factory function - const token = config.createToken(itemData, nestedTokens) - items.push(token) - } - - if (items.length === 0) { - return undefined - } - - return { - items, - raw: totalRaw, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.ts deleted file mode 100644 index 006fca6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.ts +++ /dev/null @@ -1,97 +0,0 @@ -import type { JSONContent } from '@tiptap/core' - -/** - * @fileoverview Utility functions for rendering nested content in markdown. - * - * This module provides reusable utilities for extensions that need to render - * content with a prefix on the main line and properly indented nested content. - */ - -/** - * Utility function for rendering content with a main line prefix and nested indented content. - * - * This function handles the common pattern of rendering content with: - * 1. A main line with a prefix (like "- " for lists, "> " for blockquotes, etc.) - * 2. Nested content that gets indented properly - * - * @param node - The ProseMirror node representing the content - * @param h - The markdown renderer helper - * @param prefixOrGenerator - Either a string prefix or a function that generates the prefix from context - * @param ctx - Optional context object (used when prefixOrGenerator is a function) - * @returns The rendered markdown string - * - * @example - * ```ts - * // For a bullet list item with static prefix - * return renderNestedMarkdownContent(node, h, '- ') - * - * // For a task item with static prefix - * const prefix = `- [${node.attrs?.checked ? 'x' : ' '}] ` - * return renderNestedMarkdownContent(node, h, prefix) - * - * // For a blockquote with static prefix - * return renderNestedMarkdownContent(node, h, '> ') - * - * // For content with dynamic prefix based on context - * return renderNestedMarkdownContent(node, h, ctx => { - * if (ctx.parentType === 'orderedList') { - * return `${ctx.index + 1}. ` - * } - * return '- ' - * }, ctx) - * - * // Custom extension example - * const CustomContainer = Node.create({ - * name: 'customContainer', - * // ... other config - * markdown: { - * render: (node, h) => { - * const type = node.attrs?.type || 'info' - * return renderNestedMarkdownContent(node, h, `[${type}] `) - * } - * } - * }) - * ``` - */ -export function renderNestedMarkdownContent( - node: JSONContent, - h: { - renderChildren: (nodes: JSONContent[]) => string - renderChild?: (node: JSONContent, index: number) => string - indent: (text: string) => string - }, - prefixOrGenerator: string | ((ctx: any) => string), - ctx?: any, -): string { - if (!node || !Array.isArray(node.content)) { - return '' - } - - // Determine the prefix based on the input - const prefix = - typeof prefixOrGenerator === 'function' ? prefixOrGenerator(ctx) : prefixOrGenerator - - const [content, ...children] = node.content - - // Render the main content (typically a paragraph) - const mainContent = h.renderChildren([content]) - let output = `${prefix}${mainContent}` - - // Handle nested children with proper indentation - if (children && children.length > 0) { - children.forEach((child, index) => { - const childContent = h.renderChild?.(child, index + 1) ?? h.renderChildren([child]) - if (childContent !== undefined && childContent !== null) { - // Split the child content by lines and indent each line - const indentedChild = childContent - .split('\n') - .map(line => (line ? h.indent(line) : h.indent(''))) - .join('\n') - - output += child.type === 'paragraph' ? `\n\n${indentedChild}` : `\n${indentedChild}` - } - }) - } - - return output -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/marksEqual.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/marksEqual.ts deleted file mode 100644 index e729785..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/marksEqual.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { attrsEqual } from './attrsEqual.js' - -/** - * Compare two arrays of mark objects for equality. - * Marks are compared by type and attributes (using attrsEqual), - * so key ordering in attrs does not matter. - */ -export function marksEqual( - a: { type: string; attrs?: Record }[], - b: { type: string; attrs?: Record }[], -): boolean { - if (a.length !== b.length) { - return false - } - - return a.every((mark, i) => { - const other = b[i] - return mark.type === other.type && attrsEqual(mark.attrs, other.attrs) - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/mergeAttributes.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/mergeAttributes.ts deleted file mode 100644 index 5e1a4f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/mergeAttributes.ts +++ /dev/null @@ -1,116 +0,0 @@ -/** Splits a CSS style string into declarations, ignoring semicolons inside quotes/parentheses. */ -function splitStyleDeclarations(styles: string): string[] { - const result: string[] = [] - - let current = '' - let inSingleQuote = false - let inDoubleQuote = false - let parenDepth = 0 - - const length = styles.length - for (let i = 0; i < length; i += 1) { - const char = styles[i] - if (char === "'" && !inDoubleQuote) { - inSingleQuote = !inSingleQuote - current += char - continue - } - if (char === '"' && !inSingleQuote) { - inDoubleQuote = !inDoubleQuote - current += char - continue - } - if (!inSingleQuote && !inDoubleQuote) { - if (char === '(') { - parenDepth += 1 - current += char - continue - } - if (char === ')' && parenDepth > 0) { - parenDepth -= 1 - current += char - continue - } - if (char === ';' && parenDepth === 0) { - result.push(current) - current = '' - continue - } - } - current += char - } - if (current) { - result.push(current) - } - - return result -} - -/** Yields property/value pairs from a style string. */ -function parseStyleEntries(styles: string | undefined): [property: string, value: string][] { - const pairs: [string, string][] = [] - - const declarations = splitStyleDeclarations(styles || '') - const numDeclarations = declarations.length - - for (let i = 0; i < numDeclarations; i += 1) { - const declaration = declarations[i] - - const firstColonIndex = declaration.indexOf(':') - if (firstColonIndex === -1) { - continue - } - - const property = declaration.slice(0, firstColonIndex).trim() - const value = declaration.slice(firstColonIndex + 1).trim() - if (property && value) { - pairs.push([property, value]) - } - } - - return pairs -} - -export function mergeAttributes(...objects: Record[]): Record { - return objects - .filter(item => !!item) - .reduce((items, item) => { - const mergedAttributes = { ...items } - - Object.entries(item).forEach(([key, value]) => { - const exists = mergedAttributes[key] - - if (!exists) { - mergedAttributes[key] = value - - return - } - - if (key === 'class') { - const valueClasses: string[] = value ? String(value).split(' ') : [] - const existingClasses: string[] = mergedAttributes[key] - ? mergedAttributes[key].split(' ') - : [] - - const insertClasses = valueClasses.filter( - valueClass => !existingClasses.includes(valueClass), - ) - - mergedAttributes[key] = [...existingClasses, ...insertClasses].join(' ') - } else if (key === 'style') { - const styleMap = new Map([ - ...parseStyleEntries(mergedAttributes[key]), - ...parseStyleEntries(value), - ]) - - mergedAttributes[key] = Array.from(styleMap.entries()) - .map(([property, val]) => `${property}: ${val}`) - .join('; ') - } else { - mergedAttributes[key] = value - } - }) - - return mergedAttributes - }, {}) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/mergeDeep.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/mergeDeep.ts deleted file mode 100644 index d6d5e91..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/mergeDeep.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { isPlainObject } from './isPlainObject.js' - -export function mergeDeep( - target: Record, - source: Record, -): Record { - const output = { ...target } - - if (isPlainObject(target) && isPlainObject(source)) { - Object.keys(source).forEach(key => { - if (isPlainObject(source[key]) && isPlainObject(target[key])) { - output[key] = mergeDeep(target[key], source[key]) - } else { - output[key] = source[key] - } - }) - } - - return output -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/minMax.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/minMax.ts deleted file mode 100644 index d13ce8b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/minMax.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function minMax(value = 0, min = 0, max = 0): number { - return Math.min(Math.max(value, min), max) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/objectIncludes.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/objectIncludes.ts deleted file mode 100644 index 5d4d315..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/objectIncludes.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { isRegExp } from './isRegExp.js' - -/** - * Check if object1 includes object2 - * @param object1 Object - * @param object2 Object - */ -export function objectIncludes( - object1: Record, - object2: Record, - options: { strict: boolean } = { strict: true }, -): boolean { - const keys = Object.keys(object2) - - if (!keys.length) { - return true - } - - return keys.every(key => { - if (options.strict) { - return object2[key] === object1[key] - } - - if (isRegExp(object2[key])) { - return object2[key].test(object1[key]) - } - - return object2[key] === object1[key] - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/removeDuplicates.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/removeDuplicates.ts deleted file mode 100644 index 7cd79a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core/src/utilities/removeDuplicates.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Removes duplicated values within an array. - * Supports numbers, strings and objects. - */ -export function removeDuplicates(array: T[], by = JSON.stringify): T[] { - const seen: Record = {} - - return array.filter(item => { - const key = by(item) - - return Object.prototype.hasOwnProperty.call(seen, key) ? false : (seen[key] = true) - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/pm b/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/pm deleted file mode 120000 index f877560..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/pm +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+pm@3.26.0/node_modules/@tiptap/pm \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/README.md deleted file mode 100644 index bcf11aa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-blockquote - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-blockquote.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-blockquote) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-blockquote.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-blockquote.svg)](https://www.npmjs.com/package/@tiptap/extension-blockquote) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.cjs deleted file mode 100644 index 444d0cf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.cjs +++ /dev/null @@ -1,3155 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Blockquote: () => Blockquote, - default: () => index_default, - inputRegex: () => inputRegex -}); -module.exports = __toCommonJS(index_exports); - -// src/blockquote.tsx -var import_core = require("@tiptap/core"); - -// ../../node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.js -function findDiffStart(a, b, pos) { - for (let i = 0; ; i++) { - if (i == a.childCount || i == b.childCount) - return a.childCount == b.childCount ? null : pos; - let childA = a.child(i), childB = b.child(i); - if (childA == childB) { - pos += childA.nodeSize; - continue; - } - if (!childA.sameMarkup(childB)) - return pos; - if (childA.isText && childA.text != childB.text) { - for (let j = 0; childA.text[j] == childB.text[j]; j++) - pos++; - return pos; - } - if (childA.content.size || childB.content.size) { - let inner = findDiffStart(childA.content, childB.content, pos + 1); - if (inner != null) - return inner; - } - pos += childA.nodeSize; - } -} -function findDiffEnd(a, b, posA, posB) { - for (let iA = a.childCount, iB = b.childCount; ; ) { - if (iA == 0 || iB == 0) - return iA == iB ? null : { a: posA, b: posB }; - let childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize; - if (childA == childB) { - posA -= size; - posB -= size; - continue; - } - if (!childA.sameMarkup(childB)) - return { a: posA, b: posB }; - if (childA.isText && childA.text != childB.text) { - let same = 0, minSize = Math.min(childA.text.length, childB.text.length); - while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) { - same++; - posA--; - posB--; - } - return { a: posA, b: posB }; - } - if (childA.content.size || childB.content.size) { - let inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1); - if (inner) - return inner; - } - posA -= size; - posB -= size; - } -} -var Fragment = class _Fragment { - /** - @internal - */ - constructor(content, size) { - this.content = content; - this.size = size || 0; - if (size == null) - for (let i = 0; i < content.length; i++) - this.size += content[i].nodeSize; - } - /** - Invoke a callback for all descendant nodes between the given two - positions (relative to start of this fragment). Doesn't descend - into a node when the callback returns `false`. - */ - nodesBetween(from, to, f, nodeStart = 0, parent) { - for (let i = 0, pos = 0; pos < to; i++) { - let child = this.content[i], end = pos + child.nodeSize; - if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) { - let start = pos + 1; - child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start); - } - pos = end; - } - } - /** - Call the given callback for every descendant node. `pos` will be - relative to the start of the fragment. The callback may return - `false` to prevent traversal of a given node's children. - */ - descendants(f) { - this.nodesBetween(0, this.size, f); - } - /** - Extract the text between `from` and `to`. See the same method on - [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween). - */ - textBetween(from, to, blockSeparator, leafText) { - let text = "", first = true; - this.nodesBetween(from, to, (node, pos) => { - let nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos) : !node.isLeaf ? "" : leafText ? typeof leafText === "function" ? leafText(node) : leafText : node.type.spec.leafText ? node.type.spec.leafText(node) : ""; - if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) { - if (first) - first = false; - else - text += blockSeparator; - } - text += nodeText; - }, 0); - return text; - } - /** - Create a new fragment containing the combined content of this - fragment and the other. - */ - append(other) { - if (!other.size) - return this; - if (!this.size) - return other; - let last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0; - if (last.isText && last.sameMarkup(first)) { - content[content.length - 1] = last.withText(last.text + first.text); - i = 1; - } - for (; i < other.content.length; i++) - content.push(other.content[i]); - return new _Fragment(content, this.size + other.size); - } - /** - Cut out the sub-fragment between the two given positions. - */ - cut(from, to = this.size) { - if (from == 0 && to == this.size) - return this; - let result = [], size = 0; - if (to > from) - for (let i = 0, pos = 0; pos < to; i++) { - let child = this.content[i], end = pos + child.nodeSize; - if (end > from) { - if (pos < from || end > to) { - if (child.isText) - child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos)); - else - child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1)); - } - result.push(child); - size += child.nodeSize; - } - pos = end; - } - return new _Fragment(result, size); - } - /** - @internal - */ - cutByIndex(from, to) { - if (from == to) - return _Fragment.empty; - if (from == 0 && to == this.content.length) - return this; - return new _Fragment(this.content.slice(from, to)); - } - /** - Create a new fragment in which the node at the given index is - replaced by the given node. - */ - replaceChild(index, node) { - let current = this.content[index]; - if (current == node) - return this; - let copy = this.content.slice(); - let size = this.size + node.nodeSize - current.nodeSize; - copy[index] = node; - return new _Fragment(copy, size); - } - /** - Create a new fragment by prepending the given node to this - fragment. - */ - addToStart(node) { - return new _Fragment([node].concat(this.content), this.size + node.nodeSize); - } - /** - Create a new fragment by appending the given node to this - fragment. - */ - addToEnd(node) { - return new _Fragment(this.content.concat(node), this.size + node.nodeSize); - } - /** - Compare this fragment to another one. - */ - eq(other) { - if (this.content.length != other.content.length) - return false; - for (let i = 0; i < this.content.length; i++) - if (!this.content[i].eq(other.content[i])) - return false; - return true; - } - /** - The first child of the fragment, or `null` if it is empty. - */ - get firstChild() { - return this.content.length ? this.content[0] : null; - } - /** - The last child of the fragment, or `null` if it is empty. - */ - get lastChild() { - return this.content.length ? this.content[this.content.length - 1] : null; - } - /** - The number of child nodes in this fragment. - */ - get childCount() { - return this.content.length; - } - /** - Get the child node at the given index. Raise an error when the - index is out of range. - */ - child(index) { - let found2 = this.content[index]; - if (!found2) - throw new RangeError("Index " + index + " out of range for " + this); - return found2; - } - /** - Get the child node at the given index, if it exists. - */ - maybeChild(index) { - return this.content[index] || null; - } - /** - Call `f` for every child node, passing the node, its offset - into this parent node, and its index. - */ - forEach(f) { - for (let i = 0, p = 0; i < this.content.length; i++) { - let child = this.content[i]; - f(child, p, i); - p += child.nodeSize; - } - } - /** - Find the first position at which this fragment and another - fragment differ, or `null` if they are the same. - */ - findDiffStart(other, pos = 0) { - return findDiffStart(this, other, pos); - } - /** - Find the first position, searching from the end, at which this - fragment and the given fragment differ, or `null` if they are - the same. Since this position will not be the same in both - nodes, an object with two separate positions is returned. - */ - findDiffEnd(other, pos = this.size, otherPos = other.size) { - return findDiffEnd(this, other, pos, otherPos); - } - /** - Find the index and inner offset corresponding to a given relative - position in this fragment. The result object will be reused - (overwritten) the next time the function is called. @internal - */ - findIndex(pos) { - if (pos == 0) - return retIndex(0, pos); - if (pos == this.size) - return retIndex(this.content.length, pos); - if (pos > this.size || pos < 0) - throw new RangeError(`Position ${pos} outside of fragment (${this})`); - for (let i = 0, curPos = 0; ; i++) { - let cur = this.child(i), end = curPos + cur.nodeSize; - if (end >= pos) { - if (end == pos) - return retIndex(i + 1, end); - return retIndex(i, curPos); - } - curPos = end; - } - } - /** - Return a debugging string that describes this fragment. - */ - toString() { - return "<" + this.toStringInner() + ">"; - } - /** - @internal - */ - toStringInner() { - return this.content.join(", "); - } - /** - Create a JSON-serializeable representation of this fragment. - */ - toJSON() { - return this.content.length ? this.content.map((n) => n.toJSON()) : null; - } - /** - Deserialize a fragment from its JSON representation. - */ - static fromJSON(schema, value) { - if (!value) - return _Fragment.empty; - if (!Array.isArray(value)) - throw new RangeError("Invalid input for Fragment.fromJSON"); - return _Fragment.fromArray(value.map(schema.nodeFromJSON)); - } - /** - Build a fragment from an array of nodes. Ensures that adjacent - text nodes with the same marks are joined together. - */ - static fromArray(array) { - if (!array.length) - return _Fragment.empty; - let joined, size = 0; - for (let i = 0; i < array.length; i++) { - let node = array[i]; - size += node.nodeSize; - if (i && node.isText && array[i - 1].sameMarkup(node)) { - if (!joined) - joined = array.slice(0, i); - joined[joined.length - 1] = node.withText(joined[joined.length - 1].text + node.text); - } else if (joined) { - joined.push(node); - } - } - return new _Fragment(joined || array, size); - } - /** - Create a fragment from something that can be interpreted as a - set of nodes. For `null`, it returns the empty fragment. For a - fragment, the fragment itself. For a node or array of nodes, a - fragment containing those nodes. - */ - static from(nodes) { - if (!nodes) - return _Fragment.empty; - if (nodes instanceof _Fragment) - return nodes; - if (Array.isArray(nodes)) - return this.fromArray(nodes); - if (nodes.attrs) - return new _Fragment([nodes], nodes.nodeSize); - throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : "")); - } -}; -Fragment.empty = new Fragment([], 0); -var found = { index: 0, offset: 0 }; -function retIndex(index, offset) { - found.index = index; - found.offset = offset; - return found; -} -function compareDeep(a, b) { - if (a === b) - return true; - if (!(a && typeof a == "object") || !(b && typeof b == "object")) - return false; - let array = Array.isArray(a); - if (Array.isArray(b) != array) - return false; - if (array) { - if (a.length != b.length) - return false; - for (let i = 0; i < a.length; i++) - if (!compareDeep(a[i], b[i])) - return false; - } else { - for (let p in a) - if (!(p in b) || !compareDeep(a[p], b[p])) - return false; - for (let p in b) - if (!(p in a)) - return false; - } - return true; -} -var Mark = class _Mark { - /** - @internal - */ - constructor(type, attrs) { - this.type = type; - this.attrs = attrs; - } - /** - Given a set of marks, create a new set which contains this one as - well, in the right position. If this mark is already in the set, - the set itself is returned. If any marks that are set to be - [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present, - those are replaced by this one. - */ - addToSet(set) { - let copy, placed = false; - for (let i = 0; i < set.length; i++) { - let other = set[i]; - if (this.eq(other)) - return set; - if (this.type.excludes(other.type)) { - if (!copy) - copy = set.slice(0, i); - } else if (other.type.excludes(this.type)) { - return set; - } else { - if (!placed && other.type.rank > this.type.rank) { - if (!copy) - copy = set.slice(0, i); - copy.push(this); - placed = true; - } - if (copy) - copy.push(other); - } - } - if (!copy) - copy = set.slice(); - if (!placed) - copy.push(this); - return copy; - } - /** - Remove this mark from the given set, returning a new set. If this - mark is not in the set, the set itself is returned. - */ - removeFromSet(set) { - for (let i = 0; i < set.length; i++) - if (this.eq(set[i])) - return set.slice(0, i).concat(set.slice(i + 1)); - return set; - } - /** - Test whether this mark is in the given set of marks. - */ - isInSet(set) { - for (let i = 0; i < set.length; i++) - if (this.eq(set[i])) - return true; - return false; - } - /** - Test whether this mark has the same type and attributes as - another mark. - */ - eq(other) { - return this == other || this.type == other.type && compareDeep(this.attrs, other.attrs); - } - /** - Convert this mark to a JSON-serializeable representation. - */ - toJSON() { - let obj = { type: this.type.name }; - for (let _ in this.attrs) { - obj.attrs = this.attrs; - break; - } - return obj; - } - /** - Deserialize a mark from JSON. - */ - static fromJSON(schema, json) { - if (!json) - throw new RangeError("Invalid input for Mark.fromJSON"); - let type = schema.marks[json.type]; - if (!type) - throw new RangeError(`There is no mark type ${json.type} in this schema`); - let mark = type.create(json.attrs); - type.checkAttrs(mark.attrs); - return mark; - } - /** - Test whether two sets of marks are identical. - */ - static sameSet(a, b) { - if (a == b) - return true; - if (a.length != b.length) - return false; - for (let i = 0; i < a.length; i++) - if (!a[i].eq(b[i])) - return false; - return true; - } - /** - Create a properly sorted mark set from null, a single mark, or an - unsorted array of marks. - */ - static setFrom(marks) { - if (!marks || Array.isArray(marks) && marks.length == 0) - return _Mark.none; - if (marks instanceof _Mark) - return [marks]; - let copy = marks.slice(); - copy.sort((a, b) => a.type.rank - b.type.rank); - return copy; - } -}; -Mark.none = []; -var ReplaceError = class extends Error { -}; -var Slice = class _Slice { - /** - Create a slice. When specifying a non-zero open depth, you must - make sure that there are nodes of at least that depth at the - appropriate side of the fragment—i.e. if the fragment is an - empty paragraph node, `openStart` and `openEnd` can't be greater - than 1. - - It is not necessary for the content of open nodes to conform to - the schema's content constraints, though it should be a valid - start/end/middle for such a node, depending on which sides are - open. - */ - constructor(content, openStart, openEnd) { - this.content = content; - this.openStart = openStart; - this.openEnd = openEnd; - } - /** - The size this slice would add when inserted into a document. - */ - get size() { - return this.content.size - this.openStart - this.openEnd; - } - /** - @internal - */ - insertAt(pos, fragment) { - let content = insertInto(this.content, pos + this.openStart, fragment, this.openStart + 1, this.openEnd + 1); - return content && new _Slice(content, this.openStart, this.openEnd); - } - /** - @internal - */ - removeBetween(from, to) { - return new _Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd); - } - /** - Tests whether this slice is equal to another slice. - */ - eq(other) { - return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd; - } - /** - @internal - */ - toString() { - return this.content + "(" + this.openStart + "," + this.openEnd + ")"; - } - /** - Convert a slice to a JSON-serializable representation. - */ - toJSON() { - if (!this.content.size) - return null; - let json = { content: this.content.toJSON() }; - if (this.openStart > 0) - json.openStart = this.openStart; - if (this.openEnd > 0) - json.openEnd = this.openEnd; - return json; - } - /** - Deserialize a slice from its JSON representation. - */ - static fromJSON(schema, json) { - if (!json) - return _Slice.empty; - let openStart = json.openStart || 0, openEnd = json.openEnd || 0; - if (typeof openStart != "number" || typeof openEnd != "number") - throw new RangeError("Invalid input for Slice.fromJSON"); - return new _Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd); - } - /** - Create a slice from a fragment by taking the maximum possible - open value on both side of the fragment. - */ - static maxOpen(fragment, openIsolating = true) { - let openStart = 0, openEnd = 0; - for (let n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild) - openStart++; - for (let n = fragment.lastChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.lastChild) - openEnd++; - return new _Slice(fragment, openStart, openEnd); - } -}; -Slice.empty = new Slice(Fragment.empty, 0, 0); -function removeRange(content, from, to) { - let { index, offset } = content.findIndex(from), child = content.maybeChild(index); - let { index: indexTo, offset: offsetTo } = content.findIndex(to); - if (offset == from || child.isText) { - if (offsetTo != to && !content.child(indexTo).isText) - throw new RangeError("Removing non-flat range"); - return content.cut(0, from).append(content.cut(to)); - } - if (index != indexTo) - throw new RangeError("Removing non-flat range"); - return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1))); -} -function insertInto(content, dist, insert, openStart, openEnd, parent) { - let { index, offset } = content.findIndex(dist), child = content.maybeChild(index); - if (offset == dist || child.isText) { - if (parent && openStart <= 0 && openEnd <= 0 && !parent.canReplace(index, index, insert)) - return null; - return content.cut(0, dist).append(insert).append(content.cut(dist)); - } - let inner = insertInto(child.content, dist - offset - 1, insert, index == 0 ? openStart - 1 : 0, index == content.childCount - 1 ? openEnd - 1 : 0, child); - return inner && content.replaceChild(index, child.copy(inner)); -} -function replace($from, $to, slice) { - if (slice.openStart > $from.depth) - throw new ReplaceError("Inserted content deeper than insertion position"); - if ($from.depth - slice.openStart != $to.depth - slice.openEnd) - throw new ReplaceError("Inconsistent open depths"); - return replaceOuter($from, $to, slice, 0); -} -function replaceOuter($from, $to, slice, depth) { - let index = $from.index(depth), node = $from.node(depth); - if (index == $to.index(depth) && depth < $from.depth - slice.openStart) { - let inner = replaceOuter($from, $to, slice, depth + 1); - return node.copy(node.content.replaceChild(index, inner)); - } else if (!slice.content.size) { - return close(node, replaceTwoWay($from, $to, depth)); - } else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { - let parent = $from.parent, content = parent.content; - return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset))); - } else { - let { start, end } = prepareSliceForReplace(slice, $from); - return close(node, replaceThreeWay($from, start, end, $to, depth)); - } -} -function checkJoin(main, sub) { - if (!sub.type.compatibleContent(main.type)) - throw new ReplaceError("Cannot join " + sub.type.name + " onto " + main.type.name); -} -function joinable($before, $after, depth) { - let node = $before.node(depth); - checkJoin(node, $after.node(depth)); - return node; -} -function addNode(child, target) { - let last = target.length - 1; - if (last >= 0 && child.isText && child.sameMarkup(target[last])) - target[last] = child.withText(target[last].text + child.text); - else - target.push(child); -} -function addRange($start, $end, depth, target) { - let node = ($end || $start).node(depth); - let startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount; - if ($start) { - startIndex = $start.index(depth); - if ($start.depth > depth) { - startIndex++; - } else if ($start.textOffset) { - addNode($start.nodeAfter, target); - startIndex++; - } - } - for (let i = startIndex; i < endIndex; i++) - addNode(node.child(i), target); - if ($end && $end.depth == depth && $end.textOffset) - addNode($end.nodeBefore, target); -} -function close(node, content) { - node.type.checkContent(content); - return node.copy(content); -} -function replaceThreeWay($from, $start, $end, $to, depth) { - let openStart = $from.depth > depth && joinable($from, $start, depth + 1); - let openEnd = $to.depth > depth && joinable($end, $to, depth + 1); - let content = []; - addRange(null, $from, depth, content); - if (openStart && openEnd && $start.index(depth) == $end.index(depth)) { - checkJoin(openStart, openEnd); - addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content); - } else { - if (openStart) - addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content); - addRange($start, $end, depth, content); - if (openEnd) - addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content); - } - addRange($to, null, depth, content); - return new Fragment(content); -} -function replaceTwoWay($from, $to, depth) { - let content = []; - addRange(null, $from, depth, content); - if ($from.depth > depth) { - let type = joinable($from, $to, depth + 1); - addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content); - } - addRange($to, null, depth, content); - return new Fragment(content); -} -function prepareSliceForReplace(slice, $along) { - let extra = $along.depth - slice.openStart, parent = $along.node(extra); - let node = parent.copy(slice.content); - for (let i = extra - 1; i >= 0; i--) - node = $along.node(i).copy(Fragment.from(node)); - return { - start: node.resolveNoCache(slice.openStart + extra), - end: node.resolveNoCache(node.content.size - slice.openEnd - extra) - }; -} -var ResolvedPos = class _ResolvedPos { - /** - @internal - */ - constructor(pos, path, parentOffset) { - this.pos = pos; - this.path = path; - this.parentOffset = parentOffset; - this.depth = path.length / 3 - 1; - } - /** - @internal - */ - resolveDepth(val) { - if (val == null) - return this.depth; - if (val < 0) - return this.depth + val; - return val; - } - /** - The parent node that the position points into. Note that even if - a position points into a text node, that node is not considered - the parent—text nodes are ‘flat’ in this model, and have no content. - */ - get parent() { - return this.node(this.depth); - } - /** - The root node in which the position was resolved. - */ - get doc() { - return this.node(0); - } - /** - The ancestor node at the given level. `p.node(p.depth)` is the - same as `p.parent`. - */ - node(depth) { - return this.path[this.resolveDepth(depth) * 3]; - } - /** - The index into the ancestor at the given level. If this points - at the 3rd node in the 2nd paragraph on the top level, for - example, `p.index(0)` is 1 and `p.index(1)` is 2. - */ - index(depth) { - return this.path[this.resolveDepth(depth) * 3 + 1]; - } - /** - The index pointing after this position into the ancestor at the - given level. - */ - indexAfter(depth) { - depth = this.resolveDepth(depth); - return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1); - } - /** - The (absolute) position at the start of the node at the given - level. - */ - start(depth) { - depth = this.resolveDepth(depth); - return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; - } - /** - The (absolute) position at the end of the node at the given - level. - */ - end(depth) { - depth = this.resolveDepth(depth); - return this.start(depth) + this.node(depth).content.size; - } - /** - The (absolute) position directly before the wrapping node at the - given level, or, when `depth` is `this.depth + 1`, the original - position. - */ - before(depth) { - depth = this.resolveDepth(depth); - if (!depth) - throw new RangeError("There is no position before the top-level node"); - return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1]; - } - /** - The (absolute) position directly after the wrapping node at the - given level, or the original position when `depth` is `this.depth + 1`. - */ - after(depth) { - depth = this.resolveDepth(depth); - if (!depth) - throw new RangeError("There is no position after the top-level node"); - return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize; - } - /** - When this position points into a text node, this returns the - distance between the position and the start of the text node. - Will be zero for positions that point between nodes. - */ - get textOffset() { - return this.pos - this.path[this.path.length - 1]; - } - /** - Get the node directly after the position, if any. If the position - points into a text node, only the part of that node after the - position is returned. - */ - get nodeAfter() { - let parent = this.parent, index = this.index(this.depth); - if (index == parent.childCount) - return null; - let dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index); - return dOff ? parent.child(index).cut(dOff) : child; - } - /** - Get the node directly before the position, if any. If the - position points into a text node, only the part of that node - before the position is returned. - */ - get nodeBefore() { - let index = this.index(this.depth); - let dOff = this.pos - this.path[this.path.length - 1]; - if (dOff) - return this.parent.child(index).cut(0, dOff); - return index == 0 ? null : this.parent.child(index - 1); - } - /** - Get the position at the given index in the parent node at the - given depth (which defaults to `this.depth`). - */ - posAtIndex(index, depth) { - depth = this.resolveDepth(depth); - let node = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; - for (let i = 0; i < index; i++) - pos += node.child(i).nodeSize; - return pos; - } - /** - Get the marks at this position, factoring in the surrounding - marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the - position is at the start of a non-empty node, the marks of the - node after it (if any) are returned. - */ - marks() { - let parent = this.parent, index = this.index(); - if (parent.content.size == 0) - return Mark.none; - if (this.textOffset) - return parent.child(index).marks; - let main = parent.maybeChild(index - 1), other = parent.maybeChild(index); - if (!main) { - let tmp = main; - main = other; - other = tmp; - } - let marks = main.marks; - for (var i = 0; i < marks.length; i++) - if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks))) - marks = marks[i--].removeFromSet(marks); - return marks; - } - /** - Get the marks after the current position, if any, except those - that are non-inclusive and not present at position `$end`. This - is mostly useful for getting the set of marks to preserve after a - deletion. Will return `null` if this position is at the end of - its parent node or its parent node isn't a textblock (in which - case no marks should be preserved). - */ - marksAcross($end) { - let after = this.parent.maybeChild(this.index()); - if (!after || !after.isInline) - return null; - let marks = after.marks, next = $end.parent.maybeChild($end.index()); - for (var i = 0; i < marks.length; i++) - if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks))) - marks = marks[i--].removeFromSet(marks); - return marks; - } - /** - The depth up to which this position and the given (non-resolved) - position share the same parent nodes. - */ - sharedDepth(pos) { - for (let depth = this.depth; depth > 0; depth--) - if (this.start(depth) <= pos && this.end(depth) >= pos) - return depth; - return 0; - } - /** - Returns a range based on the place where this position and the - given position diverge around block content. If both point into - the same textblock, for example, a range around that textblock - will be returned. If they point into different blocks, the range - around those blocks in their shared ancestor is returned. You can - pass in an optional predicate that will be called with a parent - node to see if a range into that parent is acceptable. - */ - blockRange(other = this, pred) { - if (other.pos < this.pos) - return other.blockRange(this); - for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--) - if (other.pos <= this.end(d) && (!pred || pred(this.node(d)))) - return new NodeRange(this, other, d); - return null; - } - /** - Query whether the given position shares the same parent node. - */ - sameParent(other) { - return this.pos - this.parentOffset == other.pos - other.parentOffset; - } - /** - Return the greater of this and the given position. - */ - max(other) { - return other.pos > this.pos ? other : this; - } - /** - Return the smaller of this and the given position. - */ - min(other) { - return other.pos < this.pos ? other : this; - } - /** - @internal - */ - toString() { - let str = ""; - for (let i = 1; i <= this.depth; i++) - str += (str ? "/" : "") + this.node(i).type.name + "_" + this.index(i - 1); - return str + ":" + this.parentOffset; - } - /** - @internal - */ - static resolve(doc, pos) { - if (!(pos >= 0 && pos <= doc.content.size)) - throw new RangeError("Position " + pos + " out of range"); - let path = []; - let start = 0, parentOffset = pos; - for (let node = doc; ; ) { - let { index, offset } = node.content.findIndex(parentOffset); - let rem = parentOffset - offset; - path.push(node, index, start + offset); - if (!rem) - break; - node = node.child(index); - if (node.isText) - break; - parentOffset = rem - 1; - start += offset + 1; - } - return new _ResolvedPos(pos, path, parentOffset); - } - /** - @internal - */ - static resolveCached(doc, pos) { - let cache = resolveCache.get(doc); - if (cache) { - for (let i = 0; i < cache.elts.length; i++) { - let elt = cache.elts[i]; - if (elt.pos == pos) - return elt; - } - } else { - resolveCache.set(doc, cache = new ResolveCache()); - } - let result = cache.elts[cache.i] = _ResolvedPos.resolve(doc, pos); - cache.i = (cache.i + 1) % resolveCacheSize; - return result; - } -}; -var ResolveCache = class { - constructor() { - this.elts = []; - this.i = 0; - } -}; -var resolveCacheSize = 12; -var resolveCache = /* @__PURE__ */ new WeakMap(); -var NodeRange = class { - /** - Construct a node range. `$from` and `$to` should point into the - same node until at least the given `depth`, since a node range - denotes an adjacent set of nodes in a single parent node. - */ - constructor($from, $to, depth) { - this.$from = $from; - this.$to = $to; - this.depth = depth; - } - /** - The position at the start of the range. - */ - get start() { - return this.$from.before(this.depth + 1); - } - /** - The position at the end of the range. - */ - get end() { - return this.$to.after(this.depth + 1); - } - /** - The parent node that the range points into. - */ - get parent() { - return this.$from.node(this.depth); - } - /** - The start index of the range in the parent node. - */ - get startIndex() { - return this.$from.index(this.depth); - } - /** - The end index of the range in the parent node. - */ - get endIndex() { - return this.$to.indexAfter(this.depth); - } -}; -var emptyAttrs = /* @__PURE__ */ Object.create(null); -var Node = class _Node { - /** - @internal - */ - constructor(type, attrs, content, marks = Mark.none) { - this.type = type; - this.attrs = attrs; - this.marks = marks; - this.content = content || Fragment.empty; - } - /** - The array of this node's child nodes. - */ - get children() { - return this.content.content; - } - /** - The size of this node, as defined by the integer-based [indexing - scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the - amount of characters. For other leaf nodes, it is one. For - non-leaf nodes, it is the size of the content plus two (the - start and end token). - */ - get nodeSize() { - return this.isLeaf ? 1 : 2 + this.content.size; - } - /** - The number of children that the node has. - */ - get childCount() { - return this.content.childCount; - } - /** - Get the child node at the given index. Raises an error when the - index is out of range. - */ - child(index) { - return this.content.child(index); - } - /** - Get the child node at the given index, if it exists. - */ - maybeChild(index) { - return this.content.maybeChild(index); - } - /** - Call `f` for every child node, passing the node, its offset - into this parent node, and its index. - */ - forEach(f) { - this.content.forEach(f); - } - /** - Invoke a callback for all descendant nodes recursively overlapping - the given two positions that are relative to start of this - node's content. This includes all ancestors of the nodes - containing the two positions. The callback is invoked with the - node, its position relative to the original node (method receiver), - its parent node, and its child index. When the callback returns - false for a given node, that node's children will not be - recursed over. The last parameter can be used to specify a - starting position to count from. - */ - nodesBetween(from, to, f, startPos = 0) { - this.content.nodesBetween(from, to, f, startPos, this); - } - /** - Call the given callback for every descendant node. Doesn't - descend into a node when the callback returns `false`. - */ - descendants(f) { - this.nodesBetween(0, this.content.size, f); - } - /** - Concatenates all the text nodes found in this fragment and its - children. - */ - get textContent() { - return this.isLeaf && this.type.spec.leafText ? this.type.spec.leafText(this) : this.textBetween(0, this.content.size, ""); - } - /** - Get all text between positions `from` and `to`. When - `blockSeparator` is given, it will be inserted to separate text - from different block nodes. If `leafText` is given, it'll be - inserted for every non-text leaf node encountered, otherwise - [`leafText`](https://prosemirror.net/docs/ref/#model.NodeSpec.leafText) will be used. - */ - textBetween(from, to, blockSeparator, leafText) { - return this.content.textBetween(from, to, blockSeparator, leafText); - } - /** - Returns this node's first child, or `null` if there are no - children. - */ - get firstChild() { - return this.content.firstChild; - } - /** - Returns this node's last child, or `null` if there are no - children. - */ - get lastChild() { - return this.content.lastChild; - } - /** - Test whether two nodes represent the same piece of document. - */ - eq(other) { - return this == other || this.sameMarkup(other) && this.content.eq(other.content); - } - /** - Compare the markup (type, attributes, and marks) of this node to - those of another. Returns `true` if both have the same markup. - */ - sameMarkup(other) { - return this.hasMarkup(other.type, other.attrs, other.marks); - } - /** - Check whether this node's markup correspond to the given type, - attributes, and marks. - */ - hasMarkup(type, attrs, marks) { - return this.type == type && compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) && Mark.sameSet(this.marks, marks || Mark.none); - } - /** - Create a new node with the same markup as this node, containing - the given content (or empty, if no content is given). - */ - copy(content = null) { - if (content == this.content) - return this; - return new _Node(this.type, this.attrs, content, this.marks); - } - /** - Create a copy of this node, with the given set of marks instead - of the node's own marks. - */ - mark(marks) { - return marks == this.marks ? this : new _Node(this.type, this.attrs, this.content, marks); - } - /** - Create a copy of this node with only the content between the - given positions. If `to` is not given, it defaults to the end of - the node. - */ - cut(from, to = this.content.size) { - if (from == 0 && to == this.content.size) - return this; - return this.copy(this.content.cut(from, to)); - } - /** - Cut out the part of the document between the given positions, and - return it as a `Slice` object. - */ - slice(from, to = this.content.size, includeParents = false) { - if (from == to) - return Slice.empty; - let $from = this.resolve(from), $to = this.resolve(to); - let depth = includeParents ? 0 : $from.sharedDepth(to); - let start = $from.start(depth), node = $from.node(depth); - let content = node.content.cut($from.pos - start, $to.pos - start); - return new Slice(content, $from.depth - depth, $to.depth - depth); - } - /** - Replace the part of the document between the given positions with - the given slice. The slice must 'fit', meaning its open sides - must be able to connect to the surrounding content, and its - content nodes must be valid children for the node they are placed - into. If any of this is violated, an error of type - [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown. - */ - replace(from, to, slice) { - return replace(this.resolve(from), this.resolve(to), slice); - } - /** - Find the node directly after the given position. - */ - nodeAt(pos) { - for (let node = this; ; ) { - let { index, offset } = node.content.findIndex(pos); - node = node.maybeChild(index); - if (!node) - return null; - if (offset == pos || node.isText) - return node; - pos -= offset + 1; - } - } - /** - Find the (direct) child node after the given offset, if any, - and return it along with its index and offset relative to this - node. - */ - childAfter(pos) { - let { index, offset } = this.content.findIndex(pos); - return { node: this.content.maybeChild(index), index, offset }; - } - /** - Find the (direct) child node before the given offset, if any, - and return it along with its index and offset relative to this - node. - */ - childBefore(pos) { - if (pos == 0) - return { node: null, index: 0, offset: 0 }; - let { index, offset } = this.content.findIndex(pos); - if (offset < pos) - return { node: this.content.child(index), index, offset }; - let node = this.content.child(index - 1); - return { node, index: index - 1, offset: offset - node.nodeSize }; - } - /** - Resolve the given position in the document, returning an - [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context. - */ - resolve(pos) { - return ResolvedPos.resolveCached(this, pos); - } - /** - @internal - */ - resolveNoCache(pos) { - return ResolvedPos.resolve(this, pos); - } - /** - Test whether a given mark or mark type occurs in this document - between the two given positions. - */ - rangeHasMark(from, to, type) { - let found2 = false; - if (to > from) - this.nodesBetween(from, to, (node) => { - if (type.isInSet(node.marks)) - found2 = true; - return !found2; - }); - return found2; - } - /** - True when this is a block (non-inline node) - */ - get isBlock() { - return this.type.isBlock; - } - /** - True when this is a textblock node, a block node with inline - content. - */ - get isTextblock() { - return this.type.isTextblock; - } - /** - True when this node allows inline content. - */ - get inlineContent() { - return this.type.inlineContent; - } - /** - True when this is an inline node (a text node or a node that can - appear among text). - */ - get isInline() { - return this.type.isInline; - } - /** - True when this is a text node. - */ - get isText() { - return this.type.isText; - } - /** - True when this is a leaf node. - */ - get isLeaf() { - return this.type.isLeaf; - } - /** - True when this is an atom, i.e. when it does not have directly - editable content. This is usually the same as `isLeaf`, but can - be configured with the [`atom` property](https://prosemirror.net/docs/ref/#model.NodeSpec.atom) - on a node's spec (typically used when the node is displayed as - an uneditable [node view](https://prosemirror.net/docs/ref/#view.NodeView)). - */ - get isAtom() { - return this.type.isAtom; - } - /** - Return a string representation of this node for debugging - purposes. - */ - toString() { - if (this.type.spec.toDebugString) - return this.type.spec.toDebugString(this); - let name = this.type.name; - if (this.content.size) - name += "(" + this.content.toStringInner() + ")"; - return wrapMarks(this.marks, name); - } - /** - Get the content match in this node at the given index. - */ - contentMatchAt(index) { - let match = this.type.contentMatch.matchFragment(this.content, 0, index); - if (!match) - throw new Error("Called contentMatchAt on a node with invalid content"); - return match; - } - /** - Test whether replacing the range between `from` and `to` (by - child index) with the given replacement fragment (which defaults - to the empty fragment) would leave the node's content valid. You - can optionally pass `start` and `end` indices into the - replacement fragment. - */ - canReplace(from, to, replacement = Fragment.empty, start = 0, end = replacement.childCount) { - let one = this.contentMatchAt(from).matchFragment(replacement, start, end); - let two = one && one.matchFragment(this.content, to); - if (!two || !two.validEnd) - return false; - for (let i = start; i < end; i++) - if (!this.type.allowsMarks(replacement.child(i).marks)) - return false; - return true; - } - /** - Test whether replacing the range `from` to `to` (by index) with - a node of the given type would leave the node's content valid. - */ - canReplaceWith(from, to, type, marks) { - if (marks && !this.type.allowsMarks(marks)) - return false; - let start = this.contentMatchAt(from).matchType(type); - let end = start && start.matchFragment(this.content, to); - return end ? end.validEnd : false; - } - /** - Test whether the given node's content could be appended to this - node. If that node is empty, this will only return true if there - is at least one node type that can appear in both nodes (to avoid - merging completely incompatible nodes). - */ - canAppend(other) { - if (other.content.size) - return this.canReplace(this.childCount, this.childCount, other.content); - else - return this.type.compatibleContent(other.type); - } - /** - Check whether this node and its descendants conform to the - schema, and raise an exception when they do not. - */ - check() { - this.type.checkContent(this.content); - this.type.checkAttrs(this.attrs); - let copy = Mark.none; - for (let i = 0; i < this.marks.length; i++) { - let mark = this.marks[i]; - mark.type.checkAttrs(mark.attrs); - copy = mark.addToSet(copy); - } - if (!Mark.sameSet(copy, this.marks)) - throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((m) => m.type.name)}`); - this.content.forEach((node) => node.check()); - } - /** - Return a JSON-serializeable representation of this node. - */ - toJSON() { - let obj = { type: this.type.name }; - for (let _ in this.attrs) { - obj.attrs = this.attrs; - break; - } - if (this.content.size) - obj.content = this.content.toJSON(); - if (this.marks.length) - obj.marks = this.marks.map((n) => n.toJSON()); - return obj; - } - /** - Deserialize a node from its JSON representation. - */ - static fromJSON(schema, json) { - if (!json) - throw new RangeError("Invalid input for Node.fromJSON"); - let marks = void 0; - if (json.marks) { - if (!Array.isArray(json.marks)) - throw new RangeError("Invalid mark data for Node.fromJSON"); - marks = json.marks.map(schema.markFromJSON); - } - if (json.type == "text") { - if (typeof json.text != "string") - throw new RangeError("Invalid text node in JSON"); - return schema.text(json.text, marks); - } - let content = Fragment.fromJSON(schema, json.content); - let node = schema.nodeType(json.type).create(json.attrs, content, marks); - node.type.checkAttrs(node.attrs); - return node; - } -}; -Node.prototype.text = void 0; -function wrapMarks(marks, str) { - for (let i = marks.length - 1; i >= 0; i--) - str = marks[i].type.name + "(" + str + ")"; - return str; -} -var ContentMatch = class _ContentMatch { - /** - @internal - */ - constructor(validEnd) { - this.validEnd = validEnd; - this.next = []; - this.wrapCache = []; - } - /** - @internal - */ - static parse(string, nodeTypes) { - let stream = new TokenStream(string, nodeTypes); - if (stream.next == null) - return _ContentMatch.empty; - let expr = parseExpr(stream); - if (stream.next) - stream.err("Unexpected trailing text"); - let match = dfa(nfa(expr)); - checkForDeadEnds(match, stream); - return match; - } - /** - Match a node type, returning a match after that node if - successful. - */ - matchType(type) { - for (let i = 0; i < this.next.length; i++) - if (this.next[i].type == type) - return this.next[i].next; - return null; - } - /** - Try to match a fragment. Returns the resulting match when - successful. - */ - matchFragment(frag, start = 0, end = frag.childCount) { - let cur = this; - for (let i = start; cur && i < end; i++) - cur = cur.matchType(frag.child(i).type); - return cur; - } - /** - @internal - */ - get inlineContent() { - return this.next.length != 0 && this.next[0].type.isInline; - } - /** - Get the first matching node type at this match position that can - be generated. - */ - get defaultType() { - for (let i = 0; i < this.next.length; i++) { - let { type } = this.next[i]; - if (!(type.isText || type.hasRequiredAttrs())) - return type; - } - return null; - } - /** - @internal - */ - compatible(other) { - for (let i = 0; i < this.next.length; i++) - for (let j = 0; j < other.next.length; j++) - if (this.next[i].type == other.next[j].type) - return true; - return false; - } - /** - Try to match the given fragment, and if that fails, see if it can - be made to match by inserting nodes in front of it. When - successful, return a fragment of inserted nodes (which may be - empty if nothing had to be inserted). When `toEnd` is true, only - return a fragment if the resulting match goes to the end of the - content expression. - */ - fillBefore(after, toEnd = false, startIndex = 0) { - let seen = [this]; - function search(match, types) { - let finished = match.matchFragment(after, startIndex); - if (finished && (!toEnd || finished.validEnd)) - return Fragment.from(types.map((tp) => tp.createAndFill())); - for (let i = 0; i < match.next.length; i++) { - let { type, next } = match.next[i]; - if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) { - seen.push(next); - let found2 = search(next, types.concat(type)); - if (found2) - return found2; - } - } - return null; - } - return search(this, []); - } - /** - Find a set of wrapping node types that would allow a node of the - given type to appear at this position. The result may be empty - (when it fits directly) and will be null when no such wrapping - exists. - */ - findWrapping(target) { - for (let i = 0; i < this.wrapCache.length; i += 2) - if (this.wrapCache[i] == target) - return this.wrapCache[i + 1]; - let computed = this.computeWrapping(target); - this.wrapCache.push(target, computed); - return computed; - } - /** - @internal - */ - computeWrapping(target) { - let seen = /* @__PURE__ */ Object.create(null), active = [{ match: this, type: null, via: null }]; - while (active.length) { - let current = active.shift(), match = current.match; - if (match.matchType(target)) { - let result = []; - for (let obj = current; obj.type; obj = obj.via) - result.push(obj.type); - return result.reverse(); - } - for (let i = 0; i < match.next.length; i++) { - let { type, next } = match.next[i]; - if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) { - active.push({ match: type.contentMatch, type, via: current }); - seen[type.name] = true; - } - } - } - return null; - } - /** - The number of outgoing edges this node has in the finite - automaton that describes the content expression. - */ - get edgeCount() { - return this.next.length; - } - /** - Get the _n_​th outgoing edge from this node in the finite - automaton that describes the content expression. - */ - edge(n) { - if (n >= this.next.length) - throw new RangeError(`There's no ${n}th edge in this content match`); - return this.next[n]; - } - /** - @internal - */ - toString() { - let seen = []; - function scan(m) { - seen.push(m); - for (let i = 0; i < m.next.length; i++) - if (seen.indexOf(m.next[i].next) == -1) - scan(m.next[i].next); - } - scan(this); - return seen.map((m, i) => { - let out = i + (m.validEnd ? "*" : " ") + " "; - for (let i2 = 0; i2 < m.next.length; i2++) - out += (i2 ? ", " : "") + m.next[i2].type.name + "->" + seen.indexOf(m.next[i2].next); - return out; - }).join("\n"); - } -}; -ContentMatch.empty = new ContentMatch(true); -var TokenStream = class { - constructor(string, nodeTypes) { - this.string = string; - this.nodeTypes = nodeTypes; - this.inline = null; - this.pos = 0; - this.tokens = string.split(/\s*(?=\b|\W|$)/); - if (this.tokens[this.tokens.length - 1] == "") - this.tokens.pop(); - if (this.tokens[0] == "") - this.tokens.shift(); - } - get next() { - return this.tokens[this.pos]; - } - eat(tok) { - return this.next == tok && (this.pos++ || true); - } - err(str) { - throw new SyntaxError(str + " (in content expression '" + this.string + "')"); - } -}; -function parseExpr(stream) { - let exprs = []; - do { - exprs.push(parseExprSeq(stream)); - } while (stream.eat("|")); - return exprs.length == 1 ? exprs[0] : { type: "choice", exprs }; -} -function parseExprSeq(stream) { - let exprs = []; - do { - exprs.push(parseExprSubscript(stream)); - } while (stream.next && stream.next != ")" && stream.next != "|"); - return exprs.length == 1 ? exprs[0] : { type: "seq", exprs }; -} -function parseExprSubscript(stream) { - let expr = parseExprAtom(stream); - for (; ; ) { - if (stream.eat("+")) - expr = { type: "plus", expr }; - else if (stream.eat("*")) - expr = { type: "star", expr }; - else if (stream.eat("?")) - expr = { type: "opt", expr }; - else if (stream.eat("{")) - expr = parseExprRange(stream, expr); - else - break; - } - return expr; -} -function parseNum(stream) { - if (/\D/.test(stream.next)) - stream.err("Expected number, got '" + stream.next + "'"); - let result = Number(stream.next); - stream.pos++; - return result; -} -function parseExprRange(stream, expr) { - let min = parseNum(stream), max = min; - if (stream.eat(",")) { - if (stream.next != "}") - max = parseNum(stream); - else - max = -1; - } - if (!stream.eat("}")) - stream.err("Unclosed braced range"); - return { type: "range", min, max, expr }; -} -function resolveName(stream, name) { - let types = stream.nodeTypes, type = types[name]; - if (type) - return [type]; - let result = []; - for (let typeName in types) { - let type2 = types[typeName]; - if (type2.isInGroup(name)) - result.push(type2); - } - if (result.length == 0) - stream.err("No node type or group '" + name + "' found"); - return result; -} -function parseExprAtom(stream) { - if (stream.eat("(")) { - let expr = parseExpr(stream); - if (!stream.eat(")")) - stream.err("Missing closing paren"); - return expr; - } else if (!/\W/.test(stream.next)) { - let exprs = resolveName(stream, stream.next).map((type) => { - if (stream.inline == null) - stream.inline = type.isInline; - else if (stream.inline != type.isInline) - stream.err("Mixing inline and block content"); - return { type: "name", value: type }; - }); - stream.pos++; - return exprs.length == 1 ? exprs[0] : { type: "choice", exprs }; - } else { - stream.err("Unexpected token '" + stream.next + "'"); - } -} -function nfa(expr) { - let nfa2 = [[]]; - connect(compile(expr, 0), node()); - return nfa2; - function node() { - return nfa2.push([]) - 1; - } - function edge(from, to, term) { - let edge2 = { term, to }; - nfa2[from].push(edge2); - return edge2; - } - function connect(edges, to) { - edges.forEach((edge2) => edge2.to = to); - } - function compile(expr2, from) { - if (expr2.type == "choice") { - return expr2.exprs.reduce((out, expr3) => out.concat(compile(expr3, from)), []); - } else if (expr2.type == "seq") { - for (let i = 0; ; i++) { - let next = compile(expr2.exprs[i], from); - if (i == expr2.exprs.length - 1) - return next; - connect(next, from = node()); - } - } else if (expr2.type == "star") { - let loop = node(); - edge(from, loop); - connect(compile(expr2.expr, loop), loop); - return [edge(loop)]; - } else if (expr2.type == "plus") { - let loop = node(); - connect(compile(expr2.expr, from), loop); - connect(compile(expr2.expr, loop), loop); - return [edge(loop)]; - } else if (expr2.type == "opt") { - return [edge(from)].concat(compile(expr2.expr, from)); - } else if (expr2.type == "range") { - let cur = from; - for (let i = 0; i < expr2.min; i++) { - let next = node(); - connect(compile(expr2.expr, cur), next); - cur = next; - } - if (expr2.max == -1) { - connect(compile(expr2.expr, cur), cur); - } else { - for (let i = expr2.min; i < expr2.max; i++) { - let next = node(); - edge(cur, next); - connect(compile(expr2.expr, cur), next); - cur = next; - } - } - return [edge(cur)]; - } else if (expr2.type == "name") { - return [edge(from, void 0, expr2.value)]; - } else { - throw new Error("Unknown expr type"); - } - } -} -function cmp(a, b) { - return b - a; -} -function nullFrom(nfa2, node) { - let result = []; - scan(node); - return result.sort(cmp); - function scan(node2) { - let edges = nfa2[node2]; - if (edges.length == 1 && !edges[0].term) - return scan(edges[0].to); - result.push(node2); - for (let i = 0; i < edges.length; i++) { - let { term, to } = edges[i]; - if (!term && result.indexOf(to) == -1) - scan(to); - } - } -} -function dfa(nfa2) { - let labeled = /* @__PURE__ */ Object.create(null); - return explore(nullFrom(nfa2, 0)); - function explore(states) { - let out = []; - states.forEach((node) => { - nfa2[node].forEach(({ term, to }) => { - if (!term) - return; - let set; - for (let i = 0; i < out.length; i++) - if (out[i][0] == term) - set = out[i][1]; - nullFrom(nfa2, to).forEach((node2) => { - if (!set) - out.push([term, set = []]); - if (set.indexOf(node2) == -1) - set.push(node2); - }); - }); - }); - let state = labeled[states.join(",")] = new ContentMatch(states.indexOf(nfa2.length - 1) > -1); - for (let i = 0; i < out.length; i++) { - let states2 = out[i][1].sort(cmp); - state.next.push({ type: out[i][0], next: labeled[states2.join(",")] || explore(states2) }); - } - return state; - } -} -function checkForDeadEnds(match, stream) { - for (let i = 0, work = [match]; i < work.length; i++) { - let state = work[i], dead = !state.validEnd, nodes = []; - for (let j = 0; j < state.next.length; j++) { - let { type, next } = state.next[j]; - nodes.push(type.name); - if (dead && !(type.isText || type.hasRequiredAttrs())) - dead = false; - if (work.indexOf(next) == -1) - work.push(next); - } - if (dead) - stream.err("Only non-generatable nodes (" + nodes.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)"); - } -} - -// ../../node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/dist/index.js -var lower16 = 65535; -var factor16 = Math.pow(2, 16); -function makeRecover(index, offset) { - return index + offset * factor16; -} -function recoverIndex(value) { - return value & lower16; -} -function recoverOffset(value) { - return (value - (value & lower16)) / factor16; -} -var DEL_BEFORE = 1; -var DEL_AFTER = 2; -var DEL_ACROSS = 4; -var DEL_SIDE = 8; -var MapResult = class { - /** - @internal - */ - constructor(pos, delInfo, recover) { - this.pos = pos; - this.delInfo = delInfo; - this.recover = recover; - } - /** - Tells you whether the position was deleted, that is, whether the - step removed the token on the side queried (via the `assoc`) - argument from the document. - */ - get deleted() { - return (this.delInfo & DEL_SIDE) > 0; - } - /** - Tells you whether the token before the mapped position was deleted. - */ - get deletedBefore() { - return (this.delInfo & (DEL_BEFORE | DEL_ACROSS)) > 0; - } - /** - True when the token after the mapped position was deleted. - */ - get deletedAfter() { - return (this.delInfo & (DEL_AFTER | DEL_ACROSS)) > 0; - } - /** - Tells whether any of the steps mapped through deletes across the - position (including both the token before and after the - position). - */ - get deletedAcross() { - return (this.delInfo & DEL_ACROSS) > 0; - } -}; -var StepMap = class _StepMap { - /** - Create a position map. The modifications to the document are - represented as an array of numbers, in which each group of three - represents a modified chunk as `[start, oldSize, newSize]`. - */ - constructor(ranges, inverted = false) { - this.ranges = ranges; - this.inverted = inverted; - if (!ranges.length && _StepMap.empty) - return _StepMap.empty; - } - /** - @internal - */ - recover(value) { - let diff = 0, index = recoverIndex(value); - if (!this.inverted) - for (let i = 0; i < index; i++) - diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1]; - return this.ranges[index * 3] + diff + recoverOffset(value); - } - mapResult(pos, assoc = 1) { - return this._map(pos, assoc, false); - } - map(pos, assoc = 1) { - return this._map(pos, assoc, true); - } - /** - @internal - */ - _map(pos, assoc, simple) { - let diff = 0, oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2; - for (let i = 0; i < this.ranges.length; i += 3) { - let start = this.ranges[i] - (this.inverted ? diff : 0); - if (start > pos) - break; - let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex], end = start + oldSize; - if (pos <= end) { - let side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc; - let result = start + diff + (side < 0 ? 0 : newSize); - if (simple) - return result; - let recover = pos == (assoc < 0 ? start : end) ? null : makeRecover(i / 3, pos - start); - let del = pos == start ? DEL_AFTER : pos == end ? DEL_BEFORE : DEL_ACROSS; - if (assoc < 0 ? pos != start : pos != end) - del |= DEL_SIDE; - return new MapResult(result, del, recover); - } - diff += newSize - oldSize; - } - return simple ? pos + diff : new MapResult(pos + diff, 0, null); - } - /** - @internal - */ - touches(pos, recover) { - let diff = 0, index = recoverIndex(recover); - let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2; - for (let i = 0; i < this.ranges.length; i += 3) { - let start = this.ranges[i] - (this.inverted ? diff : 0); - if (start > pos) - break; - let oldSize = this.ranges[i + oldIndex], end = start + oldSize; - if (pos <= end && i == index * 3) - return true; - diff += this.ranges[i + newIndex] - oldSize; - } - return false; - } - /** - Calls the given function on each of the changed ranges included in - this map. - */ - forEach(f) { - let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2; - for (let i = 0, diff = 0; i < this.ranges.length; i += 3) { - let start = this.ranges[i], oldStart = start - (this.inverted ? diff : 0), newStart = start + (this.inverted ? 0 : diff); - let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex]; - f(oldStart, oldStart + oldSize, newStart, newStart + newSize); - diff += newSize - oldSize; - } - } - /** - Create an inverted version of this map. The result can be used to - map positions in the post-step document to the pre-step document. - */ - invert() { - return new _StepMap(this.ranges, !this.inverted); - } - /** - @internal - */ - toString() { - return (this.inverted ? "-" : "") + JSON.stringify(this.ranges); - } - /** - Create a map that moves all positions by offset `n` (which may be - negative). This can be useful when applying steps meant for a - sub-document to a larger document, or vice-versa. - */ - static offset(n) { - return n == 0 ? _StepMap.empty : new _StepMap(n < 0 ? [0, -n, 0] : [0, 0, n]); - } -}; -StepMap.empty = new StepMap([]); -var stepsByID = /* @__PURE__ */ Object.create(null); -var Step = class { - /** - Get the step map that represents the changes made by this step, - and which can be used to transform between positions in the old - and the new document. - */ - getMap() { - return StepMap.empty; - } - /** - Try to merge this step with another one, to be applied directly - after it. Returns the merged step when possible, null if the - steps can't be merged. - */ - merge(other) { - return null; - } - /** - Deserialize a step from its JSON representation. Will call - through to the step class' own implementation of this method. - */ - static fromJSON(schema, json) { - if (!json || !json.stepType) - throw new RangeError("Invalid input for Step.fromJSON"); - let type = stepsByID[json.stepType]; - if (!type) - throw new RangeError(`No step type ${json.stepType} defined`); - return type.fromJSON(schema, json); - } - /** - To be able to serialize steps to JSON, each step needs a string - ID to attach to its JSON representation. Use this method to - register an ID for your step classes. Try to pick something - that's unlikely to clash with steps from other modules. - */ - static jsonID(id, stepClass) { - if (id in stepsByID) - throw new RangeError("Duplicate use of step JSON ID " + id); - stepsByID[id] = stepClass; - stepClass.prototype.jsonID = id; - return stepClass; - } -}; -var StepResult = class _StepResult { - /** - @internal - */ - constructor(doc, failed) { - this.doc = doc; - this.failed = failed; - } - /** - Create a successful step result. - */ - static ok(doc) { - return new _StepResult(doc, null); - } - /** - Create a failed step result. - */ - static fail(message) { - return new _StepResult(null, message); - } - /** - Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given - arguments. Create a successful result if it succeeds, and a - failed one if it throws a `ReplaceError`. - */ - static fromReplace(doc, from, to, slice) { - try { - return _StepResult.ok(doc.replace(from, to, slice)); - } catch (e) { - if (e instanceof ReplaceError) - return _StepResult.fail(e.message); - throw e; - } - } -}; -function mapFragment(fragment, f, parent) { - let mapped = []; - for (let i = 0; i < fragment.childCount; i++) { - let child = fragment.child(i); - if (child.content.size) - child = child.copy(mapFragment(child.content, f, child)); - if (child.isInline) - child = f(child, parent, i); - mapped.push(child); - } - return Fragment.fromArray(mapped); -} -var AddMarkStep = class _AddMarkStep extends Step { - /** - Create a mark step. - */ - constructor(from, to, mark) { - super(); - this.from = from; - this.to = to; - this.mark = mark; - } - apply(doc) { - let oldSlice = doc.slice(this.from, this.to), $from = doc.resolve(this.from); - let parent = $from.node($from.sharedDepth(this.to)); - let slice = new Slice(mapFragment(oldSlice.content, (node, parent2) => { - if (!node.isAtom || !parent2.type.allowsMarkType(this.mark.type)) - return node; - return node.mark(this.mark.addToSet(node.marks)); - }, parent), oldSlice.openStart, oldSlice.openEnd); - return StepResult.fromReplace(doc, this.from, this.to, slice); - } - invert() { - return new RemoveMarkStep(this.from, this.to, this.mark); - } - map(mapping) { - let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1); - if (from.deleted && to.deleted || from.pos >= to.pos) - return null; - return new _AddMarkStep(from.pos, to.pos, this.mark); - } - merge(other) { - if (other instanceof _AddMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) - return new _AddMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark); - return null; - } - toJSON() { - return { - stepType: "addMark", - mark: this.mark.toJSON(), - from: this.from, - to: this.to - }; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.from != "number" || typeof json.to != "number") - throw new RangeError("Invalid input for AddMarkStep.fromJSON"); - return new _AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark)); - } -}; -Step.jsonID("addMark", AddMarkStep); -var RemoveMarkStep = class _RemoveMarkStep extends Step { - /** - Create a mark-removing step. - */ - constructor(from, to, mark) { - super(); - this.from = from; - this.to = to; - this.mark = mark; - } - apply(doc) { - let oldSlice = doc.slice(this.from, this.to); - let slice = new Slice(mapFragment(oldSlice.content, (node) => { - return node.mark(this.mark.removeFromSet(node.marks)); - }, doc), oldSlice.openStart, oldSlice.openEnd); - return StepResult.fromReplace(doc, this.from, this.to, slice); - } - invert() { - return new AddMarkStep(this.from, this.to, this.mark); - } - map(mapping) { - let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1); - if (from.deleted && to.deleted || from.pos >= to.pos) - return null; - return new _RemoveMarkStep(from.pos, to.pos, this.mark); - } - merge(other) { - if (other instanceof _RemoveMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) - return new _RemoveMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark); - return null; - } - toJSON() { - return { - stepType: "removeMark", - mark: this.mark.toJSON(), - from: this.from, - to: this.to - }; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.from != "number" || typeof json.to != "number") - throw new RangeError("Invalid input for RemoveMarkStep.fromJSON"); - return new _RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark)); - } -}; -Step.jsonID("removeMark", RemoveMarkStep); -var AddNodeMarkStep = class _AddNodeMarkStep extends Step { - /** - Create a node mark step. - */ - constructor(pos, mark) { - super(); - this.pos = pos; - this.mark = mark; - } - apply(doc) { - let node = doc.nodeAt(this.pos); - if (!node) - return StepResult.fail("No node at mark step's position"); - let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks)); - return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1)); - } - invert(doc) { - let node = doc.nodeAt(this.pos); - if (node) { - let newSet = this.mark.addToSet(node.marks); - if (newSet.length == node.marks.length) { - for (let i = 0; i < node.marks.length; i++) - if (!node.marks[i].isInSet(newSet)) - return new _AddNodeMarkStep(this.pos, node.marks[i]); - return new _AddNodeMarkStep(this.pos, this.mark); - } - } - return new RemoveNodeMarkStep(this.pos, this.mark); - } - map(mapping) { - let pos = mapping.mapResult(this.pos, 1); - return pos.deletedAfter ? null : new _AddNodeMarkStep(pos.pos, this.mark); - } - toJSON() { - return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() }; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.pos != "number") - throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON"); - return new _AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark)); - } -}; -Step.jsonID("addNodeMark", AddNodeMarkStep); -var RemoveNodeMarkStep = class _RemoveNodeMarkStep extends Step { - /** - Create a mark-removing step. - */ - constructor(pos, mark) { - super(); - this.pos = pos; - this.mark = mark; - } - apply(doc) { - let node = doc.nodeAt(this.pos); - if (!node) - return StepResult.fail("No node at mark step's position"); - let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks)); - return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1)); - } - invert(doc) { - let node = doc.nodeAt(this.pos); - if (!node || !this.mark.isInSet(node.marks)) - return this; - return new AddNodeMarkStep(this.pos, this.mark); - } - map(mapping) { - let pos = mapping.mapResult(this.pos, 1); - return pos.deletedAfter ? null : new _RemoveNodeMarkStep(pos.pos, this.mark); - } - toJSON() { - return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() }; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.pos != "number") - throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON"); - return new _RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark)); - } -}; -Step.jsonID("removeNodeMark", RemoveNodeMarkStep); -var ReplaceStep = class _ReplaceStep extends Step { - /** - The given `slice` should fit the 'gap' between `from` and - `to`—the depths must line up, and the surrounding nodes must be - able to be joined with the open sides of the slice. When - `structure` is true, the step will fail if the content between - from and to is not just a sequence of closing and then opening - tokens (this is to guard against rebased replace steps - overwriting something they weren't supposed to). - */ - constructor(from, to, slice, structure = false) { - super(); - this.from = from; - this.to = to; - this.slice = slice; - this.structure = structure; - } - apply(doc) { - if (this.structure && contentBetween(doc, this.from, this.to)) - return StepResult.fail("Structure replace would overwrite content"); - return StepResult.fromReplace(doc, this.from, this.to, this.slice); - } - getMap() { - return new StepMap([this.from, this.to - this.from, this.slice.size]); - } - invert(doc) { - return new _ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to)); - } - map(mapping) { - let to = mapping.mapResult(this.to, -1); - let from = this.from == this.to && _ReplaceStep.MAP_BIAS < 0 ? to : mapping.mapResult(this.from, 1); - if (from.deletedAcross && to.deletedAcross) - return null; - return new _ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice, this.structure); - } - merge(other) { - if (!(other instanceof _ReplaceStep) || other.structure || this.structure) - return null; - if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) { - let slice = this.slice.size + other.slice.size == 0 ? Slice.empty : new Slice(this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd); - return new _ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure); - } else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) { - let slice = this.slice.size + other.slice.size == 0 ? Slice.empty : new Slice(other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd); - return new _ReplaceStep(other.from, this.to, slice, this.structure); - } else { - return null; - } - } - toJSON() { - let json = { stepType: "replace", from: this.from, to: this.to }; - if (this.slice.size) - json.slice = this.slice.toJSON(); - if (this.structure) - json.structure = true; - return json; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.from != "number" || typeof json.to != "number") - throw new RangeError("Invalid input for ReplaceStep.fromJSON"); - return new _ReplaceStep(json.from, json.to, Slice.fromJSON(schema, json.slice), !!json.structure); - } -}; -ReplaceStep.MAP_BIAS = 1; -Step.jsonID("replace", ReplaceStep); -var ReplaceAroundStep = class _ReplaceAroundStep extends Step { - /** - Create a replace-around step with the given range and gap. - `insert` should be the point in the slice into which the content - of the gap should be moved. `structure` has the same meaning as - it has in the [`ReplaceStep`](https://prosemirror.net/docs/ref/#transform.ReplaceStep) class. - */ - constructor(from, to, gapFrom, gapTo, slice, insert, structure = false) { - super(); - this.from = from; - this.to = to; - this.gapFrom = gapFrom; - this.gapTo = gapTo; - this.slice = slice; - this.insert = insert; - this.structure = structure; - } - apply(doc) { - if (this.structure && (contentBetween(doc, this.from, this.gapFrom) || contentBetween(doc, this.gapTo, this.to))) - return StepResult.fail("Structure gap-replace would overwrite content"); - let gap = doc.slice(this.gapFrom, this.gapTo); - if (gap.openStart || gap.openEnd) - return StepResult.fail("Gap is not a flat range"); - let inserted = this.slice.insertAt(this.insert, gap.content); - if (!inserted) - return StepResult.fail("Content does not fit in gap"); - return StepResult.fromReplace(doc, this.from, this.to, inserted); - } - getMap() { - return new StepMap([ - this.from, - this.gapFrom - this.from, - this.insert, - this.gapTo, - this.to - this.gapTo, - this.slice.size - this.insert - ]); - } - invert(doc) { - let gap = this.gapTo - this.gapFrom; - return new _ReplaceAroundStep(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure); - } - map(mapping) { - let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1); - let gapFrom = this.from == this.gapFrom ? from.pos : mapping.map(this.gapFrom, -1); - let gapTo = this.to == this.gapTo ? to.pos : mapping.map(this.gapTo, 1); - if (from.deletedAcross && to.deletedAcross || gapFrom < from.pos || gapTo > to.pos) - return null; - return new _ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure); - } - toJSON() { - let json = { - stepType: "replaceAround", - from: this.from, - to: this.to, - gapFrom: this.gapFrom, - gapTo: this.gapTo, - insert: this.insert - }; - if (this.slice.size) - json.slice = this.slice.toJSON(); - if (this.structure) - json.structure = true; - return json; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.from != "number" || typeof json.to != "number" || typeof json.gapFrom != "number" || typeof json.gapTo != "number" || typeof json.insert != "number") - throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON"); - return new _ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, Slice.fromJSON(schema, json.slice), json.insert, !!json.structure); - } -}; -Step.jsonID("replaceAround", ReplaceAroundStep); -function contentBetween(doc, from, to) { - let $from = doc.resolve(from), dist = to - from, depth = $from.depth; - while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) { - depth--; - dist--; - } - if (dist > 0) { - let next = $from.node(depth).maybeChild($from.indexAfter(depth)); - while (dist > 0) { - if (!next || next.isLeaf) - return true; - next = next.firstChild; - dist--; - } - } - return false; -} -var AttrStep = class _AttrStep extends Step { - /** - Construct an attribute step. - */ - constructor(pos, attr, value) { - super(); - this.pos = pos; - this.attr = attr; - this.value = value; - } - apply(doc) { - let node = doc.nodeAt(this.pos); - if (!node) - return StepResult.fail("No node at attribute step's position"); - let attrs = /* @__PURE__ */ Object.create(null); - for (let name in node.attrs) - attrs[name] = node.attrs[name]; - attrs[this.attr] = this.value; - let updated = node.type.create(attrs, null, node.marks); - return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1)); - } - getMap() { - return StepMap.empty; - } - invert(doc) { - return new _AttrStep(this.pos, this.attr, doc.nodeAt(this.pos).attrs[this.attr]); - } - map(mapping) { - let pos = mapping.mapResult(this.pos, 1); - return pos.deletedAfter ? null : new _AttrStep(pos.pos, this.attr, this.value); - } - toJSON() { - return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value }; - } - static fromJSON(schema, json) { - if (typeof json.pos != "number" || typeof json.attr != "string") - throw new RangeError("Invalid input for AttrStep.fromJSON"); - return new _AttrStep(json.pos, json.attr, json.value); - } -}; -Step.jsonID("attr", AttrStep); -var DocAttrStep = class _DocAttrStep extends Step { - /** - Construct an attribute step. - */ - constructor(attr, value) { - super(); - this.attr = attr; - this.value = value; - } - apply(doc) { - let attrs = /* @__PURE__ */ Object.create(null); - for (let name in doc.attrs) - attrs[name] = doc.attrs[name]; - attrs[this.attr] = this.value; - let updated = doc.type.create(attrs, doc.content, doc.marks); - return StepResult.ok(updated); - } - getMap() { - return StepMap.empty; - } - invert(doc) { - return new _DocAttrStep(this.attr, doc.attrs[this.attr]); - } - map(mapping) { - return this; - } - toJSON() { - return { stepType: "docAttr", attr: this.attr, value: this.value }; - } - static fromJSON(schema, json) { - if (typeof json.attr != "string") - throw new RangeError("Invalid input for DocAttrStep.fromJSON"); - return new _DocAttrStep(json.attr, json.value); - } -}; -Step.jsonID("docAttr", DocAttrStep); -var TransformError = class extends Error { -}; -TransformError = function TransformError2(message) { - let err = Error.call(this, message); - err.__proto__ = TransformError2.prototype; - return err; -}; -TransformError.prototype = Object.create(Error.prototype); -TransformError.prototype.constructor = TransformError; -TransformError.prototype.name = "TransformError"; - -// ../../node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js -var classesById = /* @__PURE__ */ Object.create(null); -var Selection = class { - /** - Initialize a selection with the head and anchor and ranges. If no - ranges are given, constructs a single range across `$anchor` and - `$head`. - */ - constructor($anchor, $head, ranges) { - this.$anchor = $anchor; - this.$head = $head; - this.ranges = ranges || [new SelectionRange($anchor.min($head), $anchor.max($head))]; - } - /** - The selection's anchor, as an unresolved position. - */ - get anchor() { - return this.$anchor.pos; - } - /** - The selection's head. - */ - get head() { - return this.$head.pos; - } - /** - The lower bound of the selection's main range. - */ - get from() { - return this.$from.pos; - } - /** - The upper bound of the selection's main range. - */ - get to() { - return this.$to.pos; - } - /** - The resolved lower bound of the selection's main range. - */ - get $from() { - return this.ranges[0].$from; - } - /** - The resolved upper bound of the selection's main range. - */ - get $to() { - return this.ranges[0].$to; - } - /** - Indicates whether the selection contains any content. - */ - get empty() { - let ranges = this.ranges; - for (let i = 0; i < ranges.length; i++) - if (ranges[i].$from.pos != ranges[i].$to.pos) - return false; - return true; - } - /** - Get the content of this selection as a slice. - */ - content() { - return this.$from.doc.slice(this.from, this.to, true); - } - /** - Replace the selection with a slice or, if no slice is given, - delete the selection. Will append to the given transaction. - */ - replace(tr, content = Slice.empty) { - let lastNode = content.content.lastChild, lastParent = null; - for (let i = 0; i < content.openEnd; i++) { - lastParent = lastNode; - lastNode = lastNode.lastChild; - } - let mapFrom = tr.steps.length, ranges = this.ranges; - for (let i = 0; i < ranges.length; i++) { - let { $from, $to } = ranges[i], mapping = tr.mapping.slice(mapFrom); - tr.replaceRange(mapping.map($from.pos), mapping.map($to.pos), i ? Slice.empty : content); - if (i == 0) - selectionToInsertionEnd(tr, mapFrom, (lastNode ? lastNode.isInline : lastParent && lastParent.isTextblock) ? -1 : 1); - } - } - /** - Replace the selection with the given node, appending the changes - to the given transaction. - */ - replaceWith(tr, node) { - let mapFrom = tr.steps.length, ranges = this.ranges; - for (let i = 0; i < ranges.length; i++) { - let { $from, $to } = ranges[i], mapping = tr.mapping.slice(mapFrom); - let from = mapping.map($from.pos), to = mapping.map($to.pos); - if (i) { - tr.deleteRange(from, to); - } else { - tr.replaceRangeWith(from, to, node); - selectionToInsertionEnd(tr, mapFrom, node.isInline ? -1 : 1); - } - } - } - /** - Find a valid cursor or leaf node selection starting at the given - position and searching back if `dir` is negative, and forward if - positive. When `textOnly` is true, only consider cursor - selections. Will return null when no valid selection position is - found. - */ - static findFrom($pos, dir, textOnly = false) { - let inner = $pos.parent.inlineContent ? new TextSelection($pos) : findSelectionIn($pos.node(0), $pos.parent, $pos.pos, $pos.index(), dir, textOnly); - if (inner) - return inner; - for (let depth = $pos.depth - 1; depth >= 0; depth--) { - let found2 = dir < 0 ? findSelectionIn($pos.node(0), $pos.node(depth), $pos.before(depth + 1), $pos.index(depth), dir, textOnly) : findSelectionIn($pos.node(0), $pos.node(depth), $pos.after(depth + 1), $pos.index(depth) + 1, dir, textOnly); - if (found2) - return found2; - } - return null; - } - /** - Find a valid cursor or leaf node selection near the given - position. Searches forward first by default, but if `bias` is - negative, it will search backwards first. - */ - static near($pos, bias = 1) { - return this.findFrom($pos, bias) || this.findFrom($pos, -bias) || new AllSelection($pos.node(0)); - } - /** - Find the cursor or leaf node selection closest to the start of - the given document. Will return an - [`AllSelection`](https://prosemirror.net/docs/ref/#state.AllSelection) if no valid position - exists. - */ - static atStart(doc) { - return findSelectionIn(doc, doc, 0, 0, 1) || new AllSelection(doc); - } - /** - Find the cursor or leaf node selection closest to the end of the - given document. - */ - static atEnd(doc) { - return findSelectionIn(doc, doc, doc.content.size, doc.childCount, -1) || new AllSelection(doc); - } - /** - Deserialize the JSON representation of a selection. Must be - implemented for custom classes (as a static class method). - */ - static fromJSON(doc, json) { - if (!json || !json.type) - throw new RangeError("Invalid input for Selection.fromJSON"); - let cls = classesById[json.type]; - if (!cls) - throw new RangeError(`No selection type ${json.type} defined`); - return cls.fromJSON(doc, json); - } - /** - To be able to deserialize selections from JSON, custom selection - classes must register themselves with an ID string, so that they - can be disambiguated. Try to pick something that's unlikely to - clash with classes from other modules. - */ - static jsonID(id, selectionClass) { - if (id in classesById) - throw new RangeError("Duplicate use of selection JSON ID " + id); - classesById[id] = selectionClass; - selectionClass.prototype.jsonID = id; - return selectionClass; - } - /** - Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection, - which is a value that can be mapped without having access to a - current document, and later resolved to a real selection for a - given document again. (This is used mostly by the history to - track and restore old selections.) The default implementation of - this method just converts the selection to a text selection and - returns the bookmark for that. - */ - getBookmark() { - return TextSelection.between(this.$anchor, this.$head).getBookmark(); - } -}; -Selection.prototype.visible = true; -var SelectionRange = class { - /** - Create a range. - */ - constructor($from, $to) { - this.$from = $from; - this.$to = $to; - } -}; -var warnedAboutTextSelection = false; -function checkTextSelection($pos) { - if (!warnedAboutTextSelection && !$pos.parent.inlineContent) { - warnedAboutTextSelection = true; - console["warn"]("TextSelection endpoint not pointing into a node with inline content (" + $pos.parent.type.name + ")"); - } -} -var TextSelection = class _TextSelection extends Selection { - /** - Construct a text selection between the given points. - */ - constructor($anchor, $head = $anchor) { - checkTextSelection($anchor); - checkTextSelection($head); - super($anchor, $head); - } - /** - Returns a resolved position if this is a cursor selection (an - empty text selection), and null otherwise. - */ - get $cursor() { - return this.$anchor.pos == this.$head.pos ? this.$head : null; - } - map(doc, mapping) { - let $head = doc.resolve(mapping.map(this.head)); - if (!$head.parent.inlineContent) - return Selection.near($head); - let $anchor = doc.resolve(mapping.map(this.anchor)); - return new _TextSelection($anchor.parent.inlineContent ? $anchor : $head, $head); - } - replace(tr, content = Slice.empty) { - super.replace(tr, content); - if (content == Slice.empty) { - let marks = this.$from.marksAcross(this.$to); - if (marks) - tr.ensureMarks(marks); - } - } - eq(other) { - return other instanceof _TextSelection && other.anchor == this.anchor && other.head == this.head; - } - getBookmark() { - return new TextBookmark(this.anchor, this.head); - } - toJSON() { - return { type: "text", anchor: this.anchor, head: this.head }; - } - /** - @internal - */ - static fromJSON(doc, json) { - if (typeof json.anchor != "number" || typeof json.head != "number") - throw new RangeError("Invalid input for TextSelection.fromJSON"); - return new _TextSelection(doc.resolve(json.anchor), doc.resolve(json.head)); - } - /** - Create a text selection from non-resolved positions. - */ - static create(doc, anchor, head = anchor) { - let $anchor = doc.resolve(anchor); - return new this($anchor, head == anchor ? $anchor : doc.resolve(head)); - } - /** - Return a text selection that spans the given positions or, if - they aren't text positions, find a text selection near them. - `bias` determines whether the method searches forward (default) - or backwards (negative number) first. Will fall back to calling - [`Selection.near`](https://prosemirror.net/docs/ref/#state.Selection^near) when the document - doesn't contain a valid text position. - */ - static between($anchor, $head, bias) { - let dPos = $anchor.pos - $head.pos; - if (!bias || dPos) - bias = dPos >= 0 ? 1 : -1; - if (!$head.parent.inlineContent) { - let found2 = Selection.findFrom($head, bias, true) || Selection.findFrom($head, -bias, true); - if (found2) - $head = found2.$head; - else - return Selection.near($head, bias); - } - if (!$anchor.parent.inlineContent) { - if (dPos == 0) { - $anchor = $head; - } else { - $anchor = (Selection.findFrom($anchor, -bias, true) || Selection.findFrom($anchor, bias, true)).$anchor; - if ($anchor.pos < $head.pos != dPos < 0) - $anchor = $head; - } - } - return new _TextSelection($anchor, $head); - } -}; -Selection.jsonID("text", TextSelection); -var TextBookmark = class _TextBookmark { - constructor(anchor, head) { - this.anchor = anchor; - this.head = head; - } - map(mapping) { - return new _TextBookmark(mapping.map(this.anchor), mapping.map(this.head)); - } - resolve(doc) { - return TextSelection.between(doc.resolve(this.anchor), doc.resolve(this.head)); - } -}; -var NodeSelection = class _NodeSelection extends Selection { - /** - Create a node selection. Does not verify the validity of its - argument. - */ - constructor($pos) { - let node = $pos.nodeAfter; - let $end = $pos.node(0).resolve($pos.pos + node.nodeSize); - super($pos, $end); - this.node = node; - } - map(doc, mapping) { - let { deleted, pos } = mapping.mapResult(this.anchor); - let $pos = doc.resolve(pos); - if (deleted) - return Selection.near($pos); - return new _NodeSelection($pos); - } - content() { - return new Slice(Fragment.from(this.node), 0, 0); - } - eq(other) { - return other instanceof _NodeSelection && other.anchor == this.anchor; - } - toJSON() { - return { type: "node", anchor: this.anchor }; - } - getBookmark() { - return new NodeBookmark(this.anchor); - } - /** - @internal - */ - static fromJSON(doc, json) { - if (typeof json.anchor != "number") - throw new RangeError("Invalid input for NodeSelection.fromJSON"); - return new _NodeSelection(doc.resolve(json.anchor)); - } - /** - Create a node selection from non-resolved positions. - */ - static create(doc, from) { - return new _NodeSelection(doc.resolve(from)); - } - /** - Determines whether the given node may be selected as a node - selection. - */ - static isSelectable(node) { - return !node.isText && node.type.spec.selectable !== false; - } -}; -NodeSelection.prototype.visible = false; -Selection.jsonID("node", NodeSelection); -var NodeBookmark = class _NodeBookmark { - constructor(anchor) { - this.anchor = anchor; - } - map(mapping) { - let { deleted, pos } = mapping.mapResult(this.anchor); - return deleted ? new TextBookmark(pos, pos) : new _NodeBookmark(pos); - } - resolve(doc) { - let $pos = doc.resolve(this.anchor), node = $pos.nodeAfter; - if (node && NodeSelection.isSelectable(node)) - return new NodeSelection($pos); - return Selection.near($pos); - } -}; -var AllSelection = class _AllSelection extends Selection { - /** - Create an all-selection over the given document. - */ - constructor(doc) { - super(doc.resolve(0), doc.resolve(doc.content.size)); - } - replace(tr, content = Slice.empty) { - if (content == Slice.empty) { - tr.delete(0, tr.doc.content.size); - let sel = Selection.atStart(tr.doc); - if (!sel.eq(tr.selection)) - tr.setSelection(sel); - } else { - super.replace(tr, content); - } - } - toJSON() { - return { type: "all" }; - } - /** - @internal - */ - static fromJSON(doc) { - return new _AllSelection(doc); - } - map(doc) { - return new _AllSelection(doc); - } - eq(other) { - return other instanceof _AllSelection; - } - getBookmark() { - return AllBookmark; - } -}; -Selection.jsonID("all", AllSelection); -var AllBookmark = { - map() { - return this; - }, - resolve(doc) { - return new AllSelection(doc); - } -}; -function findSelectionIn(doc, node, pos, index, dir, text = false) { - if (node.inlineContent) - return TextSelection.create(doc, pos); - for (let i = index - (dir > 0 ? 0 : 1); dir > 0 ? i < node.childCount : i >= 0; i += dir) { - let child = node.child(i); - if (!child.isAtom) { - let inner = findSelectionIn(doc, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text); - if (inner) - return inner; - } else if (!text && NodeSelection.isSelectable(child)) { - return NodeSelection.create(doc, pos - (dir < 0 ? child.nodeSize : 0)); - } - pos += child.nodeSize * dir; - } - return null; -} -function selectionToInsertionEnd(tr, startLen, bias) { - let last = tr.steps.length - 1; - if (last < startLen) - return; - let step = tr.steps[last]; - if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) - return; - let map = tr.mapping.maps[last], end; - map.forEach((_from, _to, _newFrom, newTo) => { - if (end == null) - end = newTo; - }); - tr.setSelection(Selection.near(tr.doc.resolve(end), bias)); -} -function bind(f, self) { - return !self || !f ? f : f.bind(self); -} -var FieldDesc = class { - constructor(name, desc, self) { - this.name = name; - this.init = bind(desc.init, self); - this.apply = bind(desc.apply, self); - } -}; -var baseFields = [ - new FieldDesc("doc", { - init(config) { - return config.doc || config.schema.topNodeType.createAndFill(); - }, - apply(tr) { - return tr.doc; - } - }), - new FieldDesc("selection", { - init(config, instance) { - return config.selection || Selection.atStart(instance.doc); - }, - apply(tr) { - return tr.selection; - } - }), - new FieldDesc("storedMarks", { - init(config) { - return config.storedMarks || null; - }, - apply(tr, _marks, _old, state) { - return state.selection.$cursor ? tr.storedMarks : null; - } - }), - new FieldDesc("scrollToSelection", { - init() { - return 0; - }, - apply(tr, prev) { - return tr.scrolledIntoView ? prev + 1 : prev; - } - }) -]; - -// src/handleBackspace.ts -var handleBackspace = (editor, type) => { - var _a; - const { state, view } = editor; - const { selection } = state; - if (!selection.empty) return false; - const { $from } = selection; - if ($from.parentOffset !== 0) return false; - const parentDepth = $from.depth - 1; - const parent = $from.node(parentDepth); - const index = $from.index(parentDepth); - if (index === 0) return false; - if (parent.type === type) { - return editor.commands.lift(type.name); - } - const previous = parent.child(index - 1); - if (previous.type !== type || !((_a = previous.lastChild) == null ? void 0 : _a.isTextblock)) { - return false; - } - const blockStart = $from.before(); - const insideBlockquoteEnd = blockStart - 1; - const targetPos = insideBlockquoteEnd - 1; - const { tr } = state; - tr.delete(blockStart, $from.after()).insert(targetPos, $from.parent.content); - tr.setSelection(TextSelection.create(tr.doc, targetPos)); - view.dispatch(tr.scrollIntoView()); - return true; -}; - -// src/blockquote.tsx -var import_jsx_runtime = require("@tiptap/core/jsx-runtime"); -var inputRegex = /^\s*>\s$/; -var Blockquote = import_core.Node.create({ - name: "blockquote", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - content: "block+", - group: "block", - defining: true, - parseHTML() { - return [{ tag: "blockquote" }]; - }, - renderHTML({ HTMLAttributes }) { - return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("blockquote", { ...(0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("slot", {}) }); - }, - parseMarkdown: (token, helpers) => { - var _a; - const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren; - return helpers.createNode("blockquote", void 0, parseBlockChildren(token.tokens || [])); - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - const prefix = ">"; - const result = []; - node.content.forEach((child, index) => { - var _a, _b; - const childContent = (_b = (_a = h.renderChild) == null ? void 0 : _a.call(h, child, index)) != null ? _b : h.renderChildren([child]); - const lines = childContent.split("\n"); - const linesWithPrefix = lines.map((line) => { - if (line.trim() === "") { - return prefix; - } - return `${prefix} ${line}`; - }); - result.push(linesWithPrefix.join("\n")); - }); - return result.join(` -${prefix} -`); - }, - addCommands() { - return { - setBlockquote: () => ({ commands }) => { - return commands.wrapIn(this.name); - }, - toggleBlockquote: () => ({ commands }) => { - return commands.toggleWrap(this.name); - }, - unsetBlockquote: () => ({ commands }) => { - return commands.lift(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-b": () => this.editor.commands.toggleBlockquote(), - Backspace: () => handleBackspace(this.editor, this.type) - }; - }, - addInputRules() { - return [ - (0, import_core.wrappingInputRule)({ - find: inputRegex, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = Blockquote; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Blockquote, - inputRegex -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.cjs.map deleted file mode 100644 index 6c38a79..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/blockquote.tsx","../../../node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.js","../../../node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/dist/index.js","../../../node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js","../src/handleBackspace.ts"],"sourcesContent":["import { Blockquote } from './blockquote.jsx'\n\nexport * from './blockquote.jsx'\n\nexport default Blockquote\n","/** @jsxImportSource @tiptap/core */\nimport { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nimport { handleBackspace } from './handleBackspace.js'\n\nexport interface BlockquoteOptions {\n /**\n * HTML attributes to add to the blockquote element\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n blockQuote: {\n /**\n * Set a blockquote node\n */\n setBlockquote: () => ReturnType\n /**\n * Toggle a blockquote node\n */\n toggleBlockquote: () => ReturnType\n /**\n * Unset a blockquote node\n */\n unsetBlockquote: () => ReturnType\n }\n }\n}\n\n/**\n * Matches a blockquote to a `>` as input.\n */\nexport const inputRegex = /^\\s*>\\s$/\n\n/**\n * This extension allows you to create blockquotes.\n * @see https://tiptap.dev/api/nodes/blockquote\n */\nexport const Blockquote = Node.create({\n name: 'blockquote',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: 'block+',\n\n group: 'block',\n\n defining: true,\n\n parseHTML() {\n return [{ tag: 'blockquote' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return (\n
\n \n
\n )\n },\n\n parseMarkdown: (token, helpers) => {\n const parseBlockChildren = helpers.parseBlockChildren ?? helpers.parseChildren\n\n return helpers.createNode('blockquote', undefined, parseBlockChildren(token.tokens || []))\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n // Use a single '>' prefix regardless of nesting level\n // Nested blockquotes will add their own '>' prefix recursively\n const prefix = '>'\n const result: string[] = []\n\n node.content.forEach((child, index) => {\n const childContent = h.renderChild?.(child, index) ?? h.renderChildren([child])\n const lines = childContent.split('\\n')\n\n const linesWithPrefix = lines.map(line => {\n // Don't add prefix to empty lines\n if (line.trim() === '') {\n return prefix\n }\n\n // Nested blockquotes will already have their own prefixes\n // We just need to add our own prefix at the start\n return `${prefix} ${line}`\n })\n\n result.push(linesWithPrefix.join('\\n'))\n })\n\n // Add separator lines between children\n return result.join(`\\n${prefix}\\n`)\n },\n\n addCommands() {\n return {\n setBlockquote:\n () =>\n ({ commands }) => {\n return commands.wrapIn(this.name)\n },\n toggleBlockquote:\n () =>\n ({ commands }) => {\n return commands.toggleWrap(this.name)\n },\n unsetBlockquote:\n () =>\n ({ commands }) => {\n return commands.lift(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-b': () => this.editor.commands.toggleBlockquote(),\n Backspace: () => handleBackspace(this.editor, this.type),\n }\n },\n\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ]\n },\n})\n","import OrderedMap from 'orderedmap';\n\nfunction findDiffStart(a, b, pos) {\n for (let i = 0;; i++) {\n if (i == a.childCount || i == b.childCount)\n return a.childCount == b.childCount ? null : pos;\n let childA = a.child(i), childB = b.child(i);\n if (childA == childB) {\n pos += childA.nodeSize;\n continue;\n }\n if (!childA.sameMarkup(childB))\n return pos;\n if (childA.isText && childA.text != childB.text) {\n for (let j = 0; childA.text[j] == childB.text[j]; j++)\n pos++;\n return pos;\n }\n if (childA.content.size || childB.content.size) {\n let inner = findDiffStart(childA.content, childB.content, pos + 1);\n if (inner != null)\n return inner;\n }\n pos += childA.nodeSize;\n }\n}\nfunction findDiffEnd(a, b, posA, posB) {\n for (let iA = a.childCount, iB = b.childCount;;) {\n if (iA == 0 || iB == 0)\n return iA == iB ? null : { a: posA, b: posB };\n let childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize;\n if (childA == childB) {\n posA -= size;\n posB -= size;\n continue;\n }\n if (!childA.sameMarkup(childB))\n return { a: posA, b: posB };\n if (childA.isText && childA.text != childB.text) {\n let same = 0, minSize = Math.min(childA.text.length, childB.text.length);\n while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) {\n same++;\n posA--;\n posB--;\n }\n return { a: posA, b: posB };\n }\n if (childA.content.size || childB.content.size) {\n let inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1);\n if (inner)\n return inner;\n }\n posA -= size;\n posB -= size;\n }\n}\n\n/**\nA fragment represents a node's collection of child nodes.\n\nLike nodes, fragments are persistent data structures, and you\nshould not mutate them or their content. Rather, you create new\ninstances whenever needed. The API tries to make this easy.\n*/\nclass Fragment {\n /**\n @internal\n */\n constructor(\n /**\n The child nodes in this fragment.\n */\n content, size) {\n this.content = content;\n this.size = size || 0;\n if (size == null)\n for (let i = 0; i < content.length; i++)\n this.size += content[i].nodeSize;\n }\n /**\n Invoke a callback for all descendant nodes between the given two\n positions (relative to start of this fragment). Doesn't descend\n into a node when the callback returns `false`.\n */\n nodesBetween(from, to, f, nodeStart = 0, parent) {\n for (let i = 0, pos = 0; pos < to; i++) {\n let child = this.content[i], end = pos + child.nodeSize;\n if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) {\n let start = pos + 1;\n child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start);\n }\n pos = end;\n }\n }\n /**\n Call the given callback for every descendant node. `pos` will be\n relative to the start of the fragment. The callback may return\n `false` to prevent traversal of a given node's children.\n */\n descendants(f) {\n this.nodesBetween(0, this.size, f);\n }\n /**\n Extract the text between `from` and `to`. See the same method on\n [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween).\n */\n textBetween(from, to, blockSeparator, leafText) {\n let text = \"\", first = true;\n this.nodesBetween(from, to, (node, pos) => {\n let nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos)\n : !node.isLeaf ? \"\"\n : leafText ? (typeof leafText === \"function\" ? leafText(node) : leafText)\n : node.type.spec.leafText ? node.type.spec.leafText(node)\n : \"\";\n if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) {\n if (first)\n first = false;\n else\n text += blockSeparator;\n }\n text += nodeText;\n }, 0);\n return text;\n }\n /**\n Create a new fragment containing the combined content of this\n fragment and the other.\n */\n append(other) {\n if (!other.size)\n return this;\n if (!this.size)\n return other;\n let last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0;\n if (last.isText && last.sameMarkup(first)) {\n content[content.length - 1] = last.withText(last.text + first.text);\n i = 1;\n }\n for (; i < other.content.length; i++)\n content.push(other.content[i]);\n return new Fragment(content, this.size + other.size);\n }\n /**\n Cut out the sub-fragment between the two given positions.\n */\n cut(from, to = this.size) {\n if (from == 0 && to == this.size)\n return this;\n let result = [], size = 0;\n if (to > from)\n for (let i = 0, pos = 0; pos < to; i++) {\n let child = this.content[i], end = pos + child.nodeSize;\n if (end > from) {\n if (pos < from || end > to) {\n if (child.isText)\n child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos));\n else\n child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1));\n }\n result.push(child);\n size += child.nodeSize;\n }\n pos = end;\n }\n return new Fragment(result, size);\n }\n /**\n @internal\n */\n cutByIndex(from, to) {\n if (from == to)\n return Fragment.empty;\n if (from == 0 && to == this.content.length)\n return this;\n return new Fragment(this.content.slice(from, to));\n }\n /**\n Create a new fragment in which the node at the given index is\n replaced by the given node.\n */\n replaceChild(index, node) {\n let current = this.content[index];\n if (current == node)\n return this;\n let copy = this.content.slice();\n let size = this.size + node.nodeSize - current.nodeSize;\n copy[index] = node;\n return new Fragment(copy, size);\n }\n /**\n Create a new fragment by prepending the given node to this\n fragment.\n */\n addToStart(node) {\n return new Fragment([node].concat(this.content), this.size + node.nodeSize);\n }\n /**\n Create a new fragment by appending the given node to this\n fragment.\n */\n addToEnd(node) {\n return new Fragment(this.content.concat(node), this.size + node.nodeSize);\n }\n /**\n Compare this fragment to another one.\n */\n eq(other) {\n if (this.content.length != other.content.length)\n return false;\n for (let i = 0; i < this.content.length; i++)\n if (!this.content[i].eq(other.content[i]))\n return false;\n return true;\n }\n /**\n The first child of the fragment, or `null` if it is empty.\n */\n get firstChild() { return this.content.length ? this.content[0] : null; }\n /**\n The last child of the fragment, or `null` if it is empty.\n */\n get lastChild() { return this.content.length ? this.content[this.content.length - 1] : null; }\n /**\n The number of child nodes in this fragment.\n */\n get childCount() { return this.content.length; }\n /**\n Get the child node at the given index. Raise an error when the\n index is out of range.\n */\n child(index) {\n let found = this.content[index];\n if (!found)\n throw new RangeError(\"Index \" + index + \" out of range for \" + this);\n return found;\n }\n /**\n Get the child node at the given index, if it exists.\n */\n maybeChild(index) {\n return this.content[index] || null;\n }\n /**\n Call `f` for every child node, passing the node, its offset\n into this parent node, and its index.\n */\n forEach(f) {\n for (let i = 0, p = 0; i < this.content.length; i++) {\n let child = this.content[i];\n f(child, p, i);\n p += child.nodeSize;\n }\n }\n /**\n Find the first position at which this fragment and another\n fragment differ, or `null` if they are the same.\n */\n findDiffStart(other, pos = 0) {\n return findDiffStart(this, other, pos);\n }\n /**\n Find the first position, searching from the end, at which this\n fragment and the given fragment differ, or `null` if they are\n the same. Since this position will not be the same in both\n nodes, an object with two separate positions is returned.\n */\n findDiffEnd(other, pos = this.size, otherPos = other.size) {\n return findDiffEnd(this, other, pos, otherPos);\n }\n /**\n Find the index and inner offset corresponding to a given relative\n position in this fragment. The result object will be reused\n (overwritten) the next time the function is called. @internal\n */\n findIndex(pos) {\n if (pos == 0)\n return retIndex(0, pos);\n if (pos == this.size)\n return retIndex(this.content.length, pos);\n if (pos > this.size || pos < 0)\n throw new RangeError(`Position ${pos} outside of fragment (${this})`);\n for (let i = 0, curPos = 0;; i++) {\n let cur = this.child(i), end = curPos + cur.nodeSize;\n if (end >= pos) {\n if (end == pos)\n return retIndex(i + 1, end);\n return retIndex(i, curPos);\n }\n curPos = end;\n }\n }\n /**\n Return a debugging string that describes this fragment.\n */\n toString() { return \"<\" + this.toStringInner() + \">\"; }\n /**\n @internal\n */\n toStringInner() { return this.content.join(\", \"); }\n /**\n Create a JSON-serializeable representation of this fragment.\n */\n toJSON() {\n return this.content.length ? this.content.map(n => n.toJSON()) : null;\n }\n /**\n Deserialize a fragment from its JSON representation.\n */\n static fromJSON(schema, value) {\n if (!value)\n return Fragment.empty;\n if (!Array.isArray(value))\n throw new RangeError(\"Invalid input for Fragment.fromJSON\");\n return Fragment.fromArray(value.map(schema.nodeFromJSON));\n }\n /**\n Build a fragment from an array of nodes. Ensures that adjacent\n text nodes with the same marks are joined together.\n */\n static fromArray(array) {\n if (!array.length)\n return Fragment.empty;\n let joined, size = 0;\n for (let i = 0; i < array.length; i++) {\n let node = array[i];\n size += node.nodeSize;\n if (i && node.isText && array[i - 1].sameMarkup(node)) {\n if (!joined)\n joined = array.slice(0, i);\n joined[joined.length - 1] = node\n .withText(joined[joined.length - 1].text + node.text);\n }\n else if (joined) {\n joined.push(node);\n }\n }\n return new Fragment(joined || array, size);\n }\n /**\n Create a fragment from something that can be interpreted as a\n set of nodes. For `null`, it returns the empty fragment. For a\n fragment, the fragment itself. For a node or array of nodes, a\n fragment containing those nodes.\n */\n static from(nodes) {\n if (!nodes)\n return Fragment.empty;\n if (nodes instanceof Fragment)\n return nodes;\n if (Array.isArray(nodes))\n return this.fromArray(nodes);\n if (nodes.attrs)\n return new Fragment([nodes], nodes.nodeSize);\n throw new RangeError(\"Can not convert \" + nodes + \" to a Fragment\" +\n (nodes.nodesBetween ? \" (looks like multiple versions of prosemirror-model were loaded)\" : \"\"));\n }\n}\n/**\nAn empty fragment. Intended to be reused whenever a node doesn't\ncontain anything (rather than allocating a new empty fragment for\neach leaf node).\n*/\nFragment.empty = new Fragment([], 0);\nconst found = { index: 0, offset: 0 };\nfunction retIndex(index, offset) {\n found.index = index;\n found.offset = offset;\n return found;\n}\n\nfunction compareDeep(a, b) {\n if (a === b)\n return true;\n if (!(a && typeof a == \"object\") ||\n !(b && typeof b == \"object\"))\n return false;\n let array = Array.isArray(a);\n if (Array.isArray(b) != array)\n return false;\n if (array) {\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!compareDeep(a[i], b[i]))\n return false;\n }\n else {\n for (let p in a)\n if (!(p in b) || !compareDeep(a[p], b[p]))\n return false;\n for (let p in b)\n if (!(p in a))\n return false;\n }\n return true;\n}\n\n/**\nA mark is a piece of information that can be attached to a node,\nsuch as it being emphasized, in code font, or a link. It has a\ntype and optionally a set of attributes that provide further\ninformation (such as the target of the link). Marks are created\nthrough a `Schema`, which controls which types exist and which\nattributes they have.\n*/\nclass Mark {\n /**\n @internal\n */\n constructor(\n /**\n The type of this mark.\n */\n type, \n /**\n The attributes associated with this mark.\n */\n attrs) {\n this.type = type;\n this.attrs = attrs;\n }\n /**\n Given a set of marks, create a new set which contains this one as\n well, in the right position. If this mark is already in the set,\n the set itself is returned. If any marks that are set to be\n [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present,\n those are replaced by this one.\n */\n addToSet(set) {\n let copy, placed = false;\n for (let i = 0; i < set.length; i++) {\n let other = set[i];\n if (this.eq(other))\n return set;\n if (this.type.excludes(other.type)) {\n if (!copy)\n copy = set.slice(0, i);\n }\n else if (other.type.excludes(this.type)) {\n return set;\n }\n else {\n if (!placed && other.type.rank > this.type.rank) {\n if (!copy)\n copy = set.slice(0, i);\n copy.push(this);\n placed = true;\n }\n if (copy)\n copy.push(other);\n }\n }\n if (!copy)\n copy = set.slice();\n if (!placed)\n copy.push(this);\n return copy;\n }\n /**\n Remove this mark from the given set, returning a new set. If this\n mark is not in the set, the set itself is returned.\n */\n removeFromSet(set) {\n for (let i = 0; i < set.length; i++)\n if (this.eq(set[i]))\n return set.slice(0, i).concat(set.slice(i + 1));\n return set;\n }\n /**\n Test whether this mark is in the given set of marks.\n */\n isInSet(set) {\n for (let i = 0; i < set.length; i++)\n if (this.eq(set[i]))\n return true;\n return false;\n }\n /**\n Test whether this mark has the same type and attributes as\n another mark.\n */\n eq(other) {\n return this == other ||\n (this.type == other.type && compareDeep(this.attrs, other.attrs));\n }\n /**\n Convert this mark to a JSON-serializeable representation.\n */\n toJSON() {\n let obj = { type: this.type.name };\n for (let _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n return obj;\n }\n /**\n Deserialize a mark from JSON.\n */\n static fromJSON(schema, json) {\n if (!json)\n throw new RangeError(\"Invalid input for Mark.fromJSON\");\n let type = schema.marks[json.type];\n if (!type)\n throw new RangeError(`There is no mark type ${json.type} in this schema`);\n let mark = type.create(json.attrs);\n type.checkAttrs(mark.attrs);\n return mark;\n }\n /**\n Test whether two sets of marks are identical.\n */\n static sameSet(a, b) {\n if (a == b)\n return true;\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!a[i].eq(b[i]))\n return false;\n return true;\n }\n /**\n Create a properly sorted mark set from null, a single mark, or an\n unsorted array of marks.\n */\n static setFrom(marks) {\n if (!marks || Array.isArray(marks) && marks.length == 0)\n return Mark.none;\n if (marks instanceof Mark)\n return [marks];\n let copy = marks.slice();\n copy.sort((a, b) => a.type.rank - b.type.rank);\n return copy;\n }\n}\n/**\nThe empty set of marks.\n*/\nMark.none = [];\n\n/**\nError type raised by [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) when\ngiven an invalid replacement.\n*/\nclass ReplaceError extends Error {\n}\n/**\nA slice represents a piece cut out of a larger document. It\nstores not only a fragment, but also the depth up to which nodes on\nboth side are ‘open’ (cut through).\n*/\nclass Slice {\n /**\n Create a slice. When specifying a non-zero open depth, you must\n make sure that there are nodes of at least that depth at the\n appropriate side of the fragment—i.e. if the fragment is an\n empty paragraph node, `openStart` and `openEnd` can't be greater\n than 1.\n \n It is not necessary for the content of open nodes to conform to\n the schema's content constraints, though it should be a valid\n start/end/middle for such a node, depending on which sides are\n open.\n */\n constructor(\n /**\n The slice's content.\n */\n content, \n /**\n The open depth at the start of the fragment.\n */\n openStart, \n /**\n The open depth at the end.\n */\n openEnd) {\n this.content = content;\n this.openStart = openStart;\n this.openEnd = openEnd;\n }\n /**\n The size this slice would add when inserted into a document.\n */\n get size() {\n return this.content.size - this.openStart - this.openEnd;\n }\n /**\n @internal\n */\n insertAt(pos, fragment) {\n let content = insertInto(this.content, pos + this.openStart, fragment, this.openStart + 1, this.openEnd + 1);\n return content && new Slice(content, this.openStart, this.openEnd);\n }\n /**\n @internal\n */\n removeBetween(from, to) {\n return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd);\n }\n /**\n Tests whether this slice is equal to another slice.\n */\n eq(other) {\n return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd;\n }\n /**\n @internal\n */\n toString() {\n return this.content + \"(\" + this.openStart + \",\" + this.openEnd + \")\";\n }\n /**\n Convert a slice to a JSON-serializable representation.\n */\n toJSON() {\n if (!this.content.size)\n return null;\n let json = { content: this.content.toJSON() };\n if (this.openStart > 0)\n json.openStart = this.openStart;\n if (this.openEnd > 0)\n json.openEnd = this.openEnd;\n return json;\n }\n /**\n Deserialize a slice from its JSON representation.\n */\n static fromJSON(schema, json) {\n if (!json)\n return Slice.empty;\n let openStart = json.openStart || 0, openEnd = json.openEnd || 0;\n if (typeof openStart != \"number\" || typeof openEnd != \"number\")\n throw new RangeError(\"Invalid input for Slice.fromJSON\");\n return new Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd);\n }\n /**\n Create a slice from a fragment by taking the maximum possible\n open value on both side of the fragment.\n */\n static maxOpen(fragment, openIsolating = true) {\n let openStart = 0, openEnd = 0;\n for (let n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild)\n openStart++;\n for (let n = fragment.lastChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.lastChild)\n openEnd++;\n return new Slice(fragment, openStart, openEnd);\n }\n}\n/**\nThe empty slice.\n*/\nSlice.empty = new Slice(Fragment.empty, 0, 0);\nfunction removeRange(content, from, to) {\n let { index, offset } = content.findIndex(from), child = content.maybeChild(index);\n let { index: indexTo, offset: offsetTo } = content.findIndex(to);\n if (offset == from || child.isText) {\n if (offsetTo != to && !content.child(indexTo).isText)\n throw new RangeError(\"Removing non-flat range\");\n return content.cut(0, from).append(content.cut(to));\n }\n if (index != indexTo)\n throw new RangeError(\"Removing non-flat range\");\n return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)));\n}\nfunction insertInto(content, dist, insert, openStart, openEnd, parent) {\n let { index, offset } = content.findIndex(dist), child = content.maybeChild(index);\n if (offset == dist || child.isText) {\n if (parent && openStart <= 0 && openEnd <= 0 && !parent.canReplace(index, index, insert))\n return null;\n return content.cut(0, dist).append(insert).append(content.cut(dist));\n }\n let inner = insertInto(child.content, dist - offset - 1, insert, index == 0 ? openStart - 1 : 0, index == content.childCount - 1 ? openEnd - 1 : 0, child);\n return inner && content.replaceChild(index, child.copy(inner));\n}\nfunction replace($from, $to, slice) {\n if (slice.openStart > $from.depth)\n throw new ReplaceError(\"Inserted content deeper than insertion position\");\n if ($from.depth - slice.openStart != $to.depth - slice.openEnd)\n throw new ReplaceError(\"Inconsistent open depths\");\n return replaceOuter($from, $to, slice, 0);\n}\nfunction replaceOuter($from, $to, slice, depth) {\n let index = $from.index(depth), node = $from.node(depth);\n if (index == $to.index(depth) && depth < $from.depth - slice.openStart) {\n let inner = replaceOuter($from, $to, slice, depth + 1);\n return node.copy(node.content.replaceChild(index, inner));\n }\n else if (!slice.content.size) {\n return close(node, replaceTwoWay($from, $to, depth));\n }\n else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { // Simple, flat case\n let parent = $from.parent, content = parent.content;\n return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)));\n }\n else {\n let { start, end } = prepareSliceForReplace(slice, $from);\n return close(node, replaceThreeWay($from, start, end, $to, depth));\n }\n}\nfunction checkJoin(main, sub) {\n if (!sub.type.compatibleContent(main.type))\n throw new ReplaceError(\"Cannot join \" + sub.type.name + \" onto \" + main.type.name);\n}\nfunction joinable($before, $after, depth) {\n let node = $before.node(depth);\n checkJoin(node, $after.node(depth));\n return node;\n}\nfunction addNode(child, target) {\n let last = target.length - 1;\n if (last >= 0 && child.isText && child.sameMarkup(target[last]))\n target[last] = child.withText(target[last].text + child.text);\n else\n target.push(child);\n}\nfunction addRange($start, $end, depth, target) {\n let node = ($end || $start).node(depth);\n let startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount;\n if ($start) {\n startIndex = $start.index(depth);\n if ($start.depth > depth) {\n startIndex++;\n }\n else if ($start.textOffset) {\n addNode($start.nodeAfter, target);\n startIndex++;\n }\n }\n for (let i = startIndex; i < endIndex; i++)\n addNode(node.child(i), target);\n if ($end && $end.depth == depth && $end.textOffset)\n addNode($end.nodeBefore, target);\n}\nfunction close(node, content) {\n node.type.checkContent(content);\n return node.copy(content);\n}\nfunction replaceThreeWay($from, $start, $end, $to, depth) {\n let openStart = $from.depth > depth && joinable($from, $start, depth + 1);\n let openEnd = $to.depth > depth && joinable($end, $to, depth + 1);\n let content = [];\n addRange(null, $from, depth, content);\n if (openStart && openEnd && $start.index(depth) == $end.index(depth)) {\n checkJoin(openStart, openEnd);\n addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content);\n }\n else {\n if (openStart)\n addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content);\n addRange($start, $end, depth, content);\n if (openEnd)\n addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\nfunction replaceTwoWay($from, $to, depth) {\n let content = [];\n addRange(null, $from, depth, content);\n if ($from.depth > depth) {\n let type = joinable($from, $to, depth + 1);\n addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\nfunction prepareSliceForReplace(slice, $along) {\n let extra = $along.depth - slice.openStart, parent = $along.node(extra);\n let node = parent.copy(slice.content);\n for (let i = extra - 1; i >= 0; i--)\n node = $along.node(i).copy(Fragment.from(node));\n return { start: node.resolveNoCache(slice.openStart + extra),\n end: node.resolveNoCache(node.content.size - slice.openEnd - extra) };\n}\n\n/**\nYou can [_resolve_](https://prosemirror.net/docs/ref/#model.Node.resolve) a position to get more\ninformation about it. Objects of this class represent such a\nresolved position, providing various pieces of context\ninformation, and some helper methods.\n\nThroughout this interface, methods that take an optional `depth`\nparameter will interpret undefined as `this.depth` and negative\nnumbers as `this.depth + value`.\n*/\nclass ResolvedPos {\n /**\n @internal\n */\n constructor(\n /**\n The position that was resolved.\n */\n pos, \n /**\n @internal\n */\n path, \n /**\n The offset this position has into its parent node.\n */\n parentOffset) {\n this.pos = pos;\n this.path = path;\n this.parentOffset = parentOffset;\n this.depth = path.length / 3 - 1;\n }\n /**\n @internal\n */\n resolveDepth(val) {\n if (val == null)\n return this.depth;\n if (val < 0)\n return this.depth + val;\n return val;\n }\n /**\n The parent node that the position points into. Note that even if\n a position points into a text node, that node is not considered\n the parent—text nodes are ‘flat’ in this model, and have no content.\n */\n get parent() { return this.node(this.depth); }\n /**\n The root node in which the position was resolved.\n */\n get doc() { return this.node(0); }\n /**\n The ancestor node at the given level. `p.node(p.depth)` is the\n same as `p.parent`.\n */\n node(depth) { return this.path[this.resolveDepth(depth) * 3]; }\n /**\n The index into the ancestor at the given level. If this points\n at the 3rd node in the 2nd paragraph on the top level, for\n example, `p.index(0)` is 1 and `p.index(1)` is 2.\n */\n index(depth) { return this.path[this.resolveDepth(depth) * 3 + 1]; }\n /**\n The index pointing after this position into the ancestor at the\n given level.\n */\n indexAfter(depth) {\n depth = this.resolveDepth(depth);\n return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1);\n }\n /**\n The (absolute) position at the start of the node at the given\n level.\n */\n start(depth) {\n depth = this.resolveDepth(depth);\n return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n }\n /**\n The (absolute) position at the end of the node at the given\n level.\n */\n end(depth) {\n depth = this.resolveDepth(depth);\n return this.start(depth) + this.node(depth).content.size;\n }\n /**\n The (absolute) position directly before the wrapping node at the\n given level, or, when `depth` is `this.depth + 1`, the original\n position.\n */\n before(depth) {\n depth = this.resolveDepth(depth);\n if (!depth)\n throw new RangeError(\"There is no position before the top-level node\");\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1];\n }\n /**\n The (absolute) position directly after the wrapping node at the\n given level, or the original position when `depth` is `this.depth + 1`.\n */\n after(depth) {\n depth = this.resolveDepth(depth);\n if (!depth)\n throw new RangeError(\"There is no position after the top-level node\");\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize;\n }\n /**\n When this position points into a text node, this returns the\n distance between the position and the start of the text node.\n Will be zero for positions that point between nodes.\n */\n get textOffset() { return this.pos - this.path[this.path.length - 1]; }\n /**\n Get the node directly after the position, if any. If the position\n points into a text node, only the part of that node after the\n position is returned.\n */\n get nodeAfter() {\n let parent = this.parent, index = this.index(this.depth);\n if (index == parent.childCount)\n return null;\n let dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index);\n return dOff ? parent.child(index).cut(dOff) : child;\n }\n /**\n Get the node directly before the position, if any. If the\n position points into a text node, only the part of that node\n before the position is returned.\n */\n get nodeBefore() {\n let index = this.index(this.depth);\n let dOff = this.pos - this.path[this.path.length - 1];\n if (dOff)\n return this.parent.child(index).cut(0, dOff);\n return index == 0 ? null : this.parent.child(index - 1);\n }\n /**\n Get the position at the given index in the parent node at the\n given depth (which defaults to `this.depth`).\n */\n posAtIndex(index, depth) {\n depth = this.resolveDepth(depth);\n let node = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n for (let i = 0; i < index; i++)\n pos += node.child(i).nodeSize;\n return pos;\n }\n /**\n Get the marks at this position, factoring in the surrounding\n marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the\n position is at the start of a non-empty node, the marks of the\n node after it (if any) are returned.\n */\n marks() {\n let parent = this.parent, index = this.index();\n // In an empty parent, return the empty array\n if (parent.content.size == 0)\n return Mark.none;\n // When inside a text node, just return the text node's marks\n if (this.textOffset)\n return parent.child(index).marks;\n let main = parent.maybeChild(index - 1), other = parent.maybeChild(index);\n // If the `after` flag is true of there is no node before, make\n // the node after this position the main reference.\n if (!main) {\n let tmp = main;\n main = other;\n other = tmp;\n }\n // Use all marks in the main node, except those that have\n // `inclusive` set to false and are not present in the other node.\n let marks = main.marks;\n for (var i = 0; i < marks.length; i++)\n if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks)))\n marks = marks[i--].removeFromSet(marks);\n return marks;\n }\n /**\n Get the marks after the current position, if any, except those\n that are non-inclusive and not present at position `$end`. This\n is mostly useful for getting the set of marks to preserve after a\n deletion. Will return `null` if this position is at the end of\n its parent node or its parent node isn't a textblock (in which\n case no marks should be preserved).\n */\n marksAcross($end) {\n let after = this.parent.maybeChild(this.index());\n if (!after || !after.isInline)\n return null;\n let marks = after.marks, next = $end.parent.maybeChild($end.index());\n for (var i = 0; i < marks.length; i++)\n if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks)))\n marks = marks[i--].removeFromSet(marks);\n return marks;\n }\n /**\n The depth up to which this position and the given (non-resolved)\n position share the same parent nodes.\n */\n sharedDepth(pos) {\n for (let depth = this.depth; depth > 0; depth--)\n if (this.start(depth) <= pos && this.end(depth) >= pos)\n return depth;\n return 0;\n }\n /**\n Returns a range based on the place where this position and the\n given position diverge around block content. If both point into\n the same textblock, for example, a range around that textblock\n will be returned. If they point into different blocks, the range\n around those blocks in their shared ancestor is returned. You can\n pass in an optional predicate that will be called with a parent\n node to see if a range into that parent is acceptable.\n */\n blockRange(other = this, pred) {\n if (other.pos < this.pos)\n return other.blockRange(this);\n for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--)\n if (other.pos <= this.end(d) && (!pred || pred(this.node(d))))\n return new NodeRange(this, other, d);\n return null;\n }\n /**\n Query whether the given position shares the same parent node.\n */\n sameParent(other) {\n return this.pos - this.parentOffset == other.pos - other.parentOffset;\n }\n /**\n Return the greater of this and the given position.\n */\n max(other) {\n return other.pos > this.pos ? other : this;\n }\n /**\n Return the smaller of this and the given position.\n */\n min(other) {\n return other.pos < this.pos ? other : this;\n }\n /**\n @internal\n */\n toString() {\n let str = \"\";\n for (let i = 1; i <= this.depth; i++)\n str += (str ? \"/\" : \"\") + this.node(i).type.name + \"_\" + this.index(i - 1);\n return str + \":\" + this.parentOffset;\n }\n /**\n @internal\n */\n static resolve(doc, pos) {\n if (!(pos >= 0 && pos <= doc.content.size))\n throw new RangeError(\"Position \" + pos + \" out of range\");\n let path = [];\n let start = 0, parentOffset = pos;\n for (let node = doc;;) {\n let { index, offset } = node.content.findIndex(parentOffset);\n let rem = parentOffset - offset;\n path.push(node, index, start + offset);\n if (!rem)\n break;\n node = node.child(index);\n if (node.isText)\n break;\n parentOffset = rem - 1;\n start += offset + 1;\n }\n return new ResolvedPos(pos, path, parentOffset);\n }\n /**\n @internal\n */\n static resolveCached(doc, pos) {\n let cache = resolveCache.get(doc);\n if (cache) {\n for (let i = 0; i < cache.elts.length; i++) {\n let elt = cache.elts[i];\n if (elt.pos == pos)\n return elt;\n }\n }\n else {\n resolveCache.set(doc, cache = new ResolveCache);\n }\n let result = cache.elts[cache.i] = ResolvedPos.resolve(doc, pos);\n cache.i = (cache.i + 1) % resolveCacheSize;\n return result;\n }\n}\nclass ResolveCache {\n constructor() {\n this.elts = [];\n this.i = 0;\n }\n}\nconst resolveCacheSize = 12, resolveCache = new WeakMap();\n/**\nRepresents a flat range of content, i.e. one that starts and\nends in the same node.\n*/\nclass NodeRange {\n /**\n Construct a node range. `$from` and `$to` should point into the\n same node until at least the given `depth`, since a node range\n denotes an adjacent set of nodes in a single parent node.\n */\n constructor(\n /**\n A resolved position along the start of the content. May have a\n `depth` greater than this object's `depth` property, since\n these are the positions that were used to compute the range,\n not re-resolved positions directly at its boundaries.\n */\n $from, \n /**\n A position along the end of the content. See\n caveat for [`$from`](https://prosemirror.net/docs/ref/#model.NodeRange.$from).\n */\n $to, \n /**\n The depth of the node that this range points into.\n */\n depth) {\n this.$from = $from;\n this.$to = $to;\n this.depth = depth;\n }\n /**\n The position at the start of the range.\n */\n get start() { return this.$from.before(this.depth + 1); }\n /**\n The position at the end of the range.\n */\n get end() { return this.$to.after(this.depth + 1); }\n /**\n The parent node that the range points into.\n */\n get parent() { return this.$from.node(this.depth); }\n /**\n The start index of the range in the parent node.\n */\n get startIndex() { return this.$from.index(this.depth); }\n /**\n The end index of the range in the parent node.\n */\n get endIndex() { return this.$to.indexAfter(this.depth); }\n}\n\nconst emptyAttrs = Object.create(null);\n/**\nThis class represents a node in the tree that makes up a\nProseMirror document. So a document is an instance of `Node`, with\nchildren that are also instances of `Node`.\n\nNodes are persistent data structures. Instead of changing them, you\ncreate new ones with the content you want. Old ones keep pointing\nat the old document shape. This is made cheaper by sharing\nstructure between the old and new data as much as possible, which a\ntree shape like this (without back pointers) makes easy.\n\n**Do not** directly mutate the properties of a `Node` object. See\n[the guide](https://prosemirror.net/docs/guide/#doc) for more information.\n*/\nclass Node {\n /**\n @internal\n */\n constructor(\n /**\n The type of node that this is.\n */\n type, \n /**\n An object mapping attribute names to values. The kind of\n attributes allowed and required are\n [determined](https://prosemirror.net/docs/ref/#model.NodeSpec.attrs) by the node type.\n */\n attrs, \n // A fragment holding the node's children.\n content, \n /**\n The marks (things like whether it is emphasized or part of a\n link) applied to this node.\n */\n marks = Mark.none) {\n this.type = type;\n this.attrs = attrs;\n this.marks = marks;\n this.content = content || Fragment.empty;\n }\n /**\n The array of this node's child nodes.\n */\n get children() { return this.content.content; }\n /**\n The size of this node, as defined by the integer-based [indexing\n scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the\n amount of characters. For other leaf nodes, it is one. For\n non-leaf nodes, it is the size of the content plus two (the\n start and end token).\n */\n get nodeSize() { return this.isLeaf ? 1 : 2 + this.content.size; }\n /**\n The number of children that the node has.\n */\n get childCount() { return this.content.childCount; }\n /**\n Get the child node at the given index. Raises an error when the\n index is out of range.\n */\n child(index) { return this.content.child(index); }\n /**\n Get the child node at the given index, if it exists.\n */\n maybeChild(index) { return this.content.maybeChild(index); }\n /**\n Call `f` for every child node, passing the node, its offset\n into this parent node, and its index.\n */\n forEach(f) { this.content.forEach(f); }\n /**\n Invoke a callback for all descendant nodes recursively overlapping\n the given two positions that are relative to start of this\n node's content. This includes all ancestors of the nodes\n containing the two positions. The callback is invoked with the\n node, its position relative to the original node (method receiver),\n its parent node, and its child index. When the callback returns\n false for a given node, that node's children will not be\n recursed over. The last parameter can be used to specify a\n starting position to count from.\n */\n nodesBetween(from, to, f, startPos = 0) {\n this.content.nodesBetween(from, to, f, startPos, this);\n }\n /**\n Call the given callback for every descendant node. Doesn't\n descend into a node when the callback returns `false`.\n */\n descendants(f) {\n this.nodesBetween(0, this.content.size, f);\n }\n /**\n Concatenates all the text nodes found in this fragment and its\n children.\n */\n get textContent() {\n return (this.isLeaf && this.type.spec.leafText)\n ? this.type.spec.leafText(this)\n : this.textBetween(0, this.content.size, \"\");\n }\n /**\n Get all text between positions `from` and `to`. When\n `blockSeparator` is given, it will be inserted to separate text\n from different block nodes. If `leafText` is given, it'll be\n inserted for every non-text leaf node encountered, otherwise\n [`leafText`](https://prosemirror.net/docs/ref/#model.NodeSpec.leafText) will be used.\n */\n textBetween(from, to, blockSeparator, leafText) {\n return this.content.textBetween(from, to, blockSeparator, leafText);\n }\n /**\n Returns this node's first child, or `null` if there are no\n children.\n */\n get firstChild() { return this.content.firstChild; }\n /**\n Returns this node's last child, or `null` if there are no\n children.\n */\n get lastChild() { return this.content.lastChild; }\n /**\n Test whether two nodes represent the same piece of document.\n */\n eq(other) {\n return this == other || (this.sameMarkup(other) && this.content.eq(other.content));\n }\n /**\n Compare the markup (type, attributes, and marks) of this node to\n those of another. Returns `true` if both have the same markup.\n */\n sameMarkup(other) {\n return this.hasMarkup(other.type, other.attrs, other.marks);\n }\n /**\n Check whether this node's markup correspond to the given type,\n attributes, and marks.\n */\n hasMarkup(type, attrs, marks) {\n return this.type == type &&\n compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) &&\n Mark.sameSet(this.marks, marks || Mark.none);\n }\n /**\n Create a new node with the same markup as this node, containing\n the given content (or empty, if no content is given).\n */\n copy(content = null) {\n if (content == this.content)\n return this;\n return new Node(this.type, this.attrs, content, this.marks);\n }\n /**\n Create a copy of this node, with the given set of marks instead\n of the node's own marks.\n */\n mark(marks) {\n return marks == this.marks ? this : new Node(this.type, this.attrs, this.content, marks);\n }\n /**\n Create a copy of this node with only the content between the\n given positions. If `to` is not given, it defaults to the end of\n the node.\n */\n cut(from, to = this.content.size) {\n if (from == 0 && to == this.content.size)\n return this;\n return this.copy(this.content.cut(from, to));\n }\n /**\n Cut out the part of the document between the given positions, and\n return it as a `Slice` object.\n */\n slice(from, to = this.content.size, includeParents = false) {\n if (from == to)\n return Slice.empty;\n let $from = this.resolve(from), $to = this.resolve(to);\n let depth = includeParents ? 0 : $from.sharedDepth(to);\n let start = $from.start(depth), node = $from.node(depth);\n let content = node.content.cut($from.pos - start, $to.pos - start);\n return new Slice(content, $from.depth - depth, $to.depth - depth);\n }\n /**\n Replace the part of the document between the given positions with\n the given slice. The slice must 'fit', meaning its open sides\n must be able to connect to the surrounding content, and its\n content nodes must be valid children for the node they are placed\n into. If any of this is violated, an error of type\n [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.\n */\n replace(from, to, slice) {\n return replace(this.resolve(from), this.resolve(to), slice);\n }\n /**\n Find the node directly after the given position.\n */\n nodeAt(pos) {\n for (let node = this;;) {\n let { index, offset } = node.content.findIndex(pos);\n node = node.maybeChild(index);\n if (!node)\n return null;\n if (offset == pos || node.isText)\n return node;\n pos -= offset + 1;\n }\n }\n /**\n Find the (direct) child node after the given offset, if any,\n and return it along with its index and offset relative to this\n node.\n */\n childAfter(pos) {\n let { index, offset } = this.content.findIndex(pos);\n return { node: this.content.maybeChild(index), index, offset };\n }\n /**\n Find the (direct) child node before the given offset, if any,\n and return it along with its index and offset relative to this\n node.\n */\n childBefore(pos) {\n if (pos == 0)\n return { node: null, index: 0, offset: 0 };\n let { index, offset } = this.content.findIndex(pos);\n if (offset < pos)\n return { node: this.content.child(index), index, offset };\n let node = this.content.child(index - 1);\n return { node, index: index - 1, offset: offset - node.nodeSize };\n }\n /**\n Resolve the given position in the document, returning an\n [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.\n */\n resolve(pos) { return ResolvedPos.resolveCached(this, pos); }\n /**\n @internal\n */\n resolveNoCache(pos) { return ResolvedPos.resolve(this, pos); }\n /**\n Test whether a given mark or mark type occurs in this document\n between the two given positions.\n */\n rangeHasMark(from, to, type) {\n let found = false;\n if (to > from)\n this.nodesBetween(from, to, node => {\n if (type.isInSet(node.marks))\n found = true;\n return !found;\n });\n return found;\n }\n /**\n True when this is a block (non-inline node)\n */\n get isBlock() { return this.type.isBlock; }\n /**\n True when this is a textblock node, a block node with inline\n content.\n */\n get isTextblock() { return this.type.isTextblock; }\n /**\n True when this node allows inline content.\n */\n get inlineContent() { return this.type.inlineContent; }\n /**\n True when this is an inline node (a text node or a node that can\n appear among text).\n */\n get isInline() { return this.type.isInline; }\n /**\n True when this is a text node.\n */\n get isText() { return this.type.isText; }\n /**\n True when this is a leaf node.\n */\n get isLeaf() { return this.type.isLeaf; }\n /**\n True when this is an atom, i.e. when it does not have directly\n editable content. This is usually the same as `isLeaf`, but can\n be configured with the [`atom` property](https://prosemirror.net/docs/ref/#model.NodeSpec.atom)\n on a node's spec (typically used when the node is displayed as\n an uneditable [node view](https://prosemirror.net/docs/ref/#view.NodeView)).\n */\n get isAtom() { return this.type.isAtom; }\n /**\n Return a string representation of this node for debugging\n purposes.\n */\n toString() {\n if (this.type.spec.toDebugString)\n return this.type.spec.toDebugString(this);\n let name = this.type.name;\n if (this.content.size)\n name += \"(\" + this.content.toStringInner() + \")\";\n return wrapMarks(this.marks, name);\n }\n /**\n Get the content match in this node at the given index.\n */\n contentMatchAt(index) {\n let match = this.type.contentMatch.matchFragment(this.content, 0, index);\n if (!match)\n throw new Error(\"Called contentMatchAt on a node with invalid content\");\n return match;\n }\n /**\n Test whether replacing the range between `from` and `to` (by\n child index) with the given replacement fragment (which defaults\n to the empty fragment) would leave the node's content valid. You\n can optionally pass `start` and `end` indices into the\n replacement fragment.\n */\n canReplace(from, to, replacement = Fragment.empty, start = 0, end = replacement.childCount) {\n let one = this.contentMatchAt(from).matchFragment(replacement, start, end);\n let two = one && one.matchFragment(this.content, to);\n if (!two || !two.validEnd)\n return false;\n for (let i = start; i < end; i++)\n if (!this.type.allowsMarks(replacement.child(i).marks))\n return false;\n return true;\n }\n /**\n Test whether replacing the range `from` to `to` (by index) with\n a node of the given type would leave the node's content valid.\n */\n canReplaceWith(from, to, type, marks) {\n if (marks && !this.type.allowsMarks(marks))\n return false;\n let start = this.contentMatchAt(from).matchType(type);\n let end = start && start.matchFragment(this.content, to);\n return end ? end.validEnd : false;\n }\n /**\n Test whether the given node's content could be appended to this\n node. If that node is empty, this will only return true if there\n is at least one node type that can appear in both nodes (to avoid\n merging completely incompatible nodes).\n */\n canAppend(other) {\n if (other.content.size)\n return this.canReplace(this.childCount, this.childCount, other.content);\n else\n return this.type.compatibleContent(other.type);\n }\n /**\n Check whether this node and its descendants conform to the\n schema, and raise an exception when they do not.\n */\n check() {\n this.type.checkContent(this.content);\n this.type.checkAttrs(this.attrs);\n let copy = Mark.none;\n for (let i = 0; i < this.marks.length; i++) {\n let mark = this.marks[i];\n mark.type.checkAttrs(mark.attrs);\n copy = mark.addToSet(copy);\n }\n if (!Mark.sameSet(copy, this.marks))\n throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(m => m.type.name)}`);\n this.content.forEach(node => node.check());\n }\n /**\n Return a JSON-serializeable representation of this node.\n */\n toJSON() {\n let obj = { type: this.type.name };\n for (let _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n if (this.content.size)\n obj.content = this.content.toJSON();\n if (this.marks.length)\n obj.marks = this.marks.map(n => n.toJSON());\n return obj;\n }\n /**\n Deserialize a node from its JSON representation.\n */\n static fromJSON(schema, json) {\n if (!json)\n throw new RangeError(\"Invalid input for Node.fromJSON\");\n let marks = undefined;\n if (json.marks) {\n if (!Array.isArray(json.marks))\n throw new RangeError(\"Invalid mark data for Node.fromJSON\");\n marks = json.marks.map(schema.markFromJSON);\n }\n if (json.type == \"text\") {\n if (typeof json.text != \"string\")\n throw new RangeError(\"Invalid text node in JSON\");\n return schema.text(json.text, marks);\n }\n let content = Fragment.fromJSON(schema, json.content);\n let node = schema.nodeType(json.type).create(json.attrs, content, marks);\n node.type.checkAttrs(node.attrs);\n return node;\n }\n}\nNode.prototype.text = undefined;\nclass TextNode extends Node {\n /**\n @internal\n */\n constructor(type, attrs, content, marks) {\n super(type, attrs, null, marks);\n if (!content)\n throw new RangeError(\"Empty text nodes are not allowed\");\n this.text = content;\n }\n toString() {\n if (this.type.spec.toDebugString)\n return this.type.spec.toDebugString(this);\n return wrapMarks(this.marks, JSON.stringify(this.text));\n }\n get textContent() { return this.text; }\n textBetween(from, to) { return this.text.slice(from, to); }\n get nodeSize() { return this.text.length; }\n mark(marks) {\n return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks);\n }\n withText(text) {\n if (text == this.text)\n return this;\n return new TextNode(this.type, this.attrs, text, this.marks);\n }\n cut(from = 0, to = this.text.length) {\n if (from == 0 && to == this.text.length)\n return this;\n return this.withText(this.text.slice(from, to));\n }\n eq(other) {\n return this.sameMarkup(other) && this.text == other.text;\n }\n toJSON() {\n let base = super.toJSON();\n base.text = this.text;\n return base;\n }\n}\nfunction wrapMarks(marks, str) {\n for (let i = marks.length - 1; i >= 0; i--)\n str = marks[i].type.name + \"(\" + str + \")\";\n return str;\n}\n\n/**\nInstances of this class represent a match state of a node type's\n[content expression](https://prosemirror.net/docs/ref/#model.NodeSpec.content), and can be used to\nfind out whether further content matches here, and whether a given\nposition is a valid end of the node.\n*/\nclass ContentMatch {\n /**\n @internal\n */\n constructor(\n /**\n True when this match state represents a valid end of the node.\n */\n validEnd) {\n this.validEnd = validEnd;\n /**\n @internal\n */\n this.next = [];\n /**\n @internal\n */\n this.wrapCache = [];\n }\n /**\n @internal\n */\n static parse(string, nodeTypes) {\n let stream = new TokenStream(string, nodeTypes);\n if (stream.next == null)\n return ContentMatch.empty;\n let expr = parseExpr(stream);\n if (stream.next)\n stream.err(\"Unexpected trailing text\");\n let match = dfa(nfa(expr));\n checkForDeadEnds(match, stream);\n return match;\n }\n /**\n Match a node type, returning a match after that node if\n successful.\n */\n matchType(type) {\n for (let i = 0; i < this.next.length; i++)\n if (this.next[i].type == type)\n return this.next[i].next;\n return null;\n }\n /**\n Try to match a fragment. Returns the resulting match when\n successful.\n */\n matchFragment(frag, start = 0, end = frag.childCount) {\n let cur = this;\n for (let i = start; cur && i < end; i++)\n cur = cur.matchType(frag.child(i).type);\n return cur;\n }\n /**\n @internal\n */\n get inlineContent() {\n return this.next.length != 0 && this.next[0].type.isInline;\n }\n /**\n Get the first matching node type at this match position that can\n be generated.\n */\n get defaultType() {\n for (let i = 0; i < this.next.length; i++) {\n let { type } = this.next[i];\n if (!(type.isText || type.hasRequiredAttrs()))\n return type;\n }\n return null;\n }\n /**\n @internal\n */\n compatible(other) {\n for (let i = 0; i < this.next.length; i++)\n for (let j = 0; j < other.next.length; j++)\n if (this.next[i].type == other.next[j].type)\n return true;\n return false;\n }\n /**\n Try to match the given fragment, and if that fails, see if it can\n be made to match by inserting nodes in front of it. When\n successful, return a fragment of inserted nodes (which may be\n empty if nothing had to be inserted). When `toEnd` is true, only\n return a fragment if the resulting match goes to the end of the\n content expression.\n */\n fillBefore(after, toEnd = false, startIndex = 0) {\n let seen = [this];\n function search(match, types) {\n let finished = match.matchFragment(after, startIndex);\n if (finished && (!toEnd || finished.validEnd))\n return Fragment.from(types.map(tp => tp.createAndFill()));\n for (let i = 0; i < match.next.length; i++) {\n let { type, next } = match.next[i];\n if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {\n seen.push(next);\n let found = search(next, types.concat(type));\n if (found)\n return found;\n }\n }\n return null;\n }\n return search(this, []);\n }\n /**\n Find a set of wrapping node types that would allow a node of the\n given type to appear at this position. The result may be empty\n (when it fits directly) and will be null when no such wrapping\n exists.\n */\n findWrapping(target) {\n for (let i = 0; i < this.wrapCache.length; i += 2)\n if (this.wrapCache[i] == target)\n return this.wrapCache[i + 1];\n let computed = this.computeWrapping(target);\n this.wrapCache.push(target, computed);\n return computed;\n }\n /**\n @internal\n */\n computeWrapping(target) {\n let seen = Object.create(null), active = [{ match: this, type: null, via: null }];\n while (active.length) {\n let current = active.shift(), match = current.match;\n if (match.matchType(target)) {\n let result = [];\n for (let obj = current; obj.type; obj = obj.via)\n result.push(obj.type);\n return result.reverse();\n }\n for (let i = 0; i < match.next.length; i++) {\n let { type, next } = match.next[i];\n if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) {\n active.push({ match: type.contentMatch, type, via: current });\n seen[type.name] = true;\n }\n }\n }\n return null;\n }\n /**\n The number of outgoing edges this node has in the finite\n automaton that describes the content expression.\n */\n get edgeCount() {\n return this.next.length;\n }\n /**\n Get the _n_​th outgoing edge from this node in the finite\n automaton that describes the content expression.\n */\n edge(n) {\n if (n >= this.next.length)\n throw new RangeError(`There's no ${n}th edge in this content match`);\n return this.next[n];\n }\n /**\n @internal\n */\n toString() {\n let seen = [];\n function scan(m) {\n seen.push(m);\n for (let i = 0; i < m.next.length; i++)\n if (seen.indexOf(m.next[i].next) == -1)\n scan(m.next[i].next);\n }\n scan(this);\n return seen.map((m, i) => {\n let out = i + (m.validEnd ? \"*\" : \" \") + \" \";\n for (let i = 0; i < m.next.length; i++)\n out += (i ? \", \" : \"\") + m.next[i].type.name + \"->\" + seen.indexOf(m.next[i].next);\n return out;\n }).join(\"\\n\");\n }\n}\n/**\n@internal\n*/\nContentMatch.empty = new ContentMatch(true);\nclass TokenStream {\n constructor(string, nodeTypes) {\n this.string = string;\n this.nodeTypes = nodeTypes;\n this.inline = null;\n this.pos = 0;\n this.tokens = string.split(/\\s*(?=\\b|\\W|$)/);\n if (this.tokens[this.tokens.length - 1] == \"\")\n this.tokens.pop();\n if (this.tokens[0] == \"\")\n this.tokens.shift();\n }\n get next() { return this.tokens[this.pos]; }\n eat(tok) { return this.next == tok && (this.pos++ || true); }\n err(str) { throw new SyntaxError(str + \" (in content expression '\" + this.string + \"')\"); }\n}\nfunction parseExpr(stream) {\n let exprs = [];\n do {\n exprs.push(parseExprSeq(stream));\n } while (stream.eat(\"|\"));\n return exprs.length == 1 ? exprs[0] : { type: \"choice\", exprs };\n}\nfunction parseExprSeq(stream) {\n let exprs = [];\n do {\n exprs.push(parseExprSubscript(stream));\n } while (stream.next && stream.next != \")\" && stream.next != \"|\");\n return exprs.length == 1 ? exprs[0] : { type: \"seq\", exprs };\n}\nfunction parseExprSubscript(stream) {\n let expr = parseExprAtom(stream);\n for (;;) {\n if (stream.eat(\"+\"))\n expr = { type: \"plus\", expr };\n else if (stream.eat(\"*\"))\n expr = { type: \"star\", expr };\n else if (stream.eat(\"?\"))\n expr = { type: \"opt\", expr };\n else if (stream.eat(\"{\"))\n expr = parseExprRange(stream, expr);\n else\n break;\n }\n return expr;\n}\nfunction parseNum(stream) {\n if (/\\D/.test(stream.next))\n stream.err(\"Expected number, got '\" + stream.next + \"'\");\n let result = Number(stream.next);\n stream.pos++;\n return result;\n}\nfunction parseExprRange(stream, expr) {\n let min = parseNum(stream), max = min;\n if (stream.eat(\",\")) {\n if (stream.next != \"}\")\n max = parseNum(stream);\n else\n max = -1;\n }\n if (!stream.eat(\"}\"))\n stream.err(\"Unclosed braced range\");\n return { type: \"range\", min, max, expr };\n}\nfunction resolveName(stream, name) {\n let types = stream.nodeTypes, type = types[name];\n if (type)\n return [type];\n let result = [];\n for (let typeName in types) {\n let type = types[typeName];\n if (type.isInGroup(name))\n result.push(type);\n }\n if (result.length == 0)\n stream.err(\"No node type or group '\" + name + \"' found\");\n return result;\n}\nfunction parseExprAtom(stream) {\n if (stream.eat(\"(\")) {\n let expr = parseExpr(stream);\n if (!stream.eat(\")\"))\n stream.err(\"Missing closing paren\");\n return expr;\n }\n else if (!/\\W/.test(stream.next)) {\n let exprs = resolveName(stream, stream.next).map(type => {\n if (stream.inline == null)\n stream.inline = type.isInline;\n else if (stream.inline != type.isInline)\n stream.err(\"Mixing inline and block content\");\n return { type: \"name\", value: type };\n });\n stream.pos++;\n return exprs.length == 1 ? exprs[0] : { type: \"choice\", exprs };\n }\n else {\n stream.err(\"Unexpected token '\" + stream.next + \"'\");\n }\n}\n// Construct an NFA from an expression as returned by the parser. The\n// NFA is represented as an array of states, which are themselves\n// arrays of edges, which are `{term, to}` objects. The first state is\n// the entry state and the last node is the success state.\n//\n// Note that unlike typical NFAs, the edge ordering in this one is\n// significant, in that it is used to contruct filler content when\n// necessary.\nfunction nfa(expr) {\n let nfa = [[]];\n connect(compile(expr, 0), node());\n return nfa;\n function node() { return nfa.push([]) - 1; }\n function edge(from, to, term) {\n let edge = { term, to };\n nfa[from].push(edge);\n return edge;\n }\n function connect(edges, to) {\n edges.forEach(edge => edge.to = to);\n }\n function compile(expr, from) {\n if (expr.type == \"choice\") {\n return expr.exprs.reduce((out, expr) => out.concat(compile(expr, from)), []);\n }\n else if (expr.type == \"seq\") {\n for (let i = 0;; i++) {\n let next = compile(expr.exprs[i], from);\n if (i == expr.exprs.length - 1)\n return next;\n connect(next, from = node());\n }\n }\n else if (expr.type == \"star\") {\n let loop = node();\n edge(from, loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)];\n }\n else if (expr.type == \"plus\") {\n let loop = node();\n connect(compile(expr.expr, from), loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)];\n }\n else if (expr.type == \"opt\") {\n return [edge(from)].concat(compile(expr.expr, from));\n }\n else if (expr.type == \"range\") {\n let cur = from;\n for (let i = 0; i < expr.min; i++) {\n let next = node();\n connect(compile(expr.expr, cur), next);\n cur = next;\n }\n if (expr.max == -1) {\n connect(compile(expr.expr, cur), cur);\n }\n else {\n for (let i = expr.min; i < expr.max; i++) {\n let next = node();\n edge(cur, next);\n connect(compile(expr.expr, cur), next);\n cur = next;\n }\n }\n return [edge(cur)];\n }\n else if (expr.type == \"name\") {\n return [edge(from, undefined, expr.value)];\n }\n else {\n throw new Error(\"Unknown expr type\");\n }\n }\n}\nfunction cmp(a, b) { return b - a; }\n// Get the set of nodes reachable by null edges from `node`. Omit\n// nodes with only a single null-out-edge, since they may lead to\n// needless duplicated nodes.\nfunction nullFrom(nfa, node) {\n let result = [];\n scan(node);\n return result.sort(cmp);\n function scan(node) {\n let edges = nfa[node];\n if (edges.length == 1 && !edges[0].term)\n return scan(edges[0].to);\n result.push(node);\n for (let i = 0; i < edges.length; i++) {\n let { term, to } = edges[i];\n if (!term && result.indexOf(to) == -1)\n scan(to);\n }\n }\n}\n// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set\n// of state objects (`ContentMatch` instances) with transitions\n// between them.\nfunction dfa(nfa) {\n let labeled = Object.create(null);\n return explore(nullFrom(nfa, 0));\n function explore(states) {\n let out = [];\n states.forEach(node => {\n nfa[node].forEach(({ term, to }) => {\n if (!term)\n return;\n let set;\n for (let i = 0; i < out.length; i++)\n if (out[i][0] == term)\n set = out[i][1];\n nullFrom(nfa, to).forEach(node => {\n if (!set)\n out.push([term, set = []]);\n if (set.indexOf(node) == -1)\n set.push(node);\n });\n });\n });\n let state = labeled[states.join(\",\")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1);\n for (let i = 0; i < out.length; i++) {\n let states = out[i][1].sort(cmp);\n state.next.push({ type: out[i][0], next: labeled[states.join(\",\")] || explore(states) });\n }\n return state;\n }\n}\nfunction checkForDeadEnds(match, stream) {\n for (let i = 0, work = [match]; i < work.length; i++) {\n let state = work[i], dead = !state.validEnd, nodes = [];\n for (let j = 0; j < state.next.length; j++) {\n let { type, next } = state.next[j];\n nodes.push(type.name);\n if (dead && !(type.isText || type.hasRequiredAttrs()))\n dead = false;\n if (work.indexOf(next) == -1)\n work.push(next);\n }\n if (dead)\n stream.err(\"Only non-generatable nodes (\" + nodes.join(\", \") + \") in a required position (see https://prosemirror.net/docs/guide/#generatable)\");\n }\n}\n\n// For node types where all attrs have a default value (or which don't\n// have any attributes), build up a single reusable default attribute\n// object, and use it for all nodes that don't specify specific\n// attributes.\nfunction defaultAttrs(attrs) {\n let defaults = Object.create(null);\n for (let attrName in attrs) {\n let attr = attrs[attrName];\n if (!attr.hasDefault)\n return null;\n defaults[attrName] = attr.default;\n }\n return defaults;\n}\nfunction computeAttrs(attrs, value) {\n let built = Object.create(null);\n for (let name in attrs) {\n let given = value && value[name];\n if (given === undefined) {\n let attr = attrs[name];\n if (attr.hasDefault)\n given = attr.default;\n else\n throw new RangeError(\"No value supplied for attribute \" + name);\n }\n built[name] = given;\n }\n return built;\n}\nfunction checkAttrs(attrs, values, type, name) {\n for (let name in values)\n if (!(name in attrs))\n throw new RangeError(`Unsupported attribute ${name} for ${type} of type ${name}`);\n for (let name in attrs) {\n let attr = attrs[name];\n if (attr.validate)\n attr.validate(values[name]);\n }\n}\nfunction initAttrs(typeName, attrs) {\n let result = Object.create(null);\n if (attrs)\n for (let name in attrs)\n result[name] = new Attribute(typeName, name, attrs[name]);\n return result;\n}\n/**\nNode types are objects allocated once per `Schema` and used to\n[tag](https://prosemirror.net/docs/ref/#model.Node.type) `Node` instances. They contain information\nabout the node type, such as its name and what kind of node it\nrepresents.\n*/\nclass NodeType {\n /**\n @internal\n */\n constructor(\n /**\n The name the node type has in this schema.\n */\n name, \n /**\n A link back to the `Schema` the node type belongs to.\n */\n schema, \n /**\n The spec that this type is based on\n */\n spec) {\n this.name = name;\n this.schema = schema;\n this.spec = spec;\n /**\n The set of marks allowed in this node. `null` means all marks\n are allowed.\n */\n this.markSet = null;\n this.groups = spec.group ? spec.group.split(\" \") : [];\n this.attrs = initAttrs(name, spec.attrs);\n this.defaultAttrs = defaultAttrs(this.attrs);\n this.contentMatch = null;\n this.inlineContent = null;\n this.isBlock = !(spec.inline || name == \"text\");\n this.isText = name == \"text\";\n }\n /**\n True if this is an inline type.\n */\n get isInline() { return !this.isBlock; }\n /**\n True if this is a textblock type, a block that contains inline\n content.\n */\n get isTextblock() { return this.isBlock && this.inlineContent; }\n /**\n True for node types that allow no content.\n */\n get isLeaf() { return this.contentMatch == ContentMatch.empty; }\n /**\n True when this node is an atom, i.e. when it does not have\n directly editable content.\n */\n get isAtom() { return this.isLeaf || !!this.spec.atom; }\n /**\n Return true when this node type is part of the given\n [group](https://prosemirror.net/docs/ref/#model.NodeSpec.group).\n */\n isInGroup(group) {\n return this.groups.indexOf(group) > -1;\n }\n /**\n The node type's [whitespace](https://prosemirror.net/docs/ref/#model.NodeSpec.whitespace) option.\n */\n get whitespace() {\n return this.spec.whitespace || (this.spec.code ? \"pre\" : \"normal\");\n }\n /**\n Tells you whether this node type has any required attributes.\n */\n hasRequiredAttrs() {\n for (let n in this.attrs)\n if (this.attrs[n].isRequired)\n return true;\n return false;\n }\n /**\n Indicates whether this node allows some of the same content as\n the given node type.\n */\n compatibleContent(other) {\n return this == other || this.contentMatch.compatible(other.contentMatch);\n }\n /**\n @internal\n */\n computeAttrs(attrs) {\n if (!attrs && this.defaultAttrs)\n return this.defaultAttrs;\n else\n return computeAttrs(this.attrs, attrs);\n }\n /**\n Create a `Node` of this type. The given attributes are\n checked and defaulted (you can pass `null` to use the type's\n defaults entirely, if no required attributes exist). `content`\n may be a `Fragment`, a node, an array of nodes, or\n `null`. Similarly `marks` may be `null` to default to the empty\n set of marks.\n */\n create(attrs = null, content, marks) {\n if (this.isText)\n throw new Error(\"NodeType.create can't construct text nodes\");\n return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks));\n }\n /**\n Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content\n against the node type's content restrictions, and throw an error\n if it doesn't match.\n */\n createChecked(attrs = null, content, marks) {\n content = Fragment.from(content);\n this.checkContent(content);\n return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));\n }\n /**\n Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is\n necessary to add nodes to the start or end of the given fragment\n to make it fit the node. If no fitting wrapping can be found,\n return null. Note that, due to the fact that required nodes can\n always be created, this will always succeed if you pass null or\n `Fragment.empty` as content.\n */\n createAndFill(attrs = null, content, marks) {\n attrs = this.computeAttrs(attrs);\n content = Fragment.from(content);\n if (content.size) {\n let before = this.contentMatch.fillBefore(content);\n if (!before)\n return null;\n content = before.append(content);\n }\n let matched = this.contentMatch.matchFragment(content);\n let after = matched && matched.fillBefore(Fragment.empty, true);\n if (!after)\n return null;\n return new Node(this, attrs, content.append(after), Mark.setFrom(marks));\n }\n /**\n Returns true if the given fragment is valid content for this node\n type.\n */\n validContent(content) {\n let result = this.contentMatch.matchFragment(content);\n if (!result || !result.validEnd)\n return false;\n for (let i = 0; i < content.childCount; i++)\n if (!this.allowsMarks(content.child(i).marks))\n return false;\n return true;\n }\n /**\n Throws a RangeError if the given fragment is not valid content for this\n node type.\n @internal\n */\n checkContent(content) {\n if (!this.validContent(content))\n throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0, 50)}`);\n }\n /**\n @internal\n */\n checkAttrs(attrs) {\n checkAttrs(this.attrs, attrs, \"node\", this.name);\n }\n /**\n Check whether the given mark type is allowed in this node.\n */\n allowsMarkType(markType) {\n return this.markSet == null || this.markSet.indexOf(markType) > -1;\n }\n /**\n Test whether the given set of marks are allowed in this node.\n */\n allowsMarks(marks) {\n if (this.markSet == null)\n return true;\n for (let i = 0; i < marks.length; i++)\n if (!this.allowsMarkType(marks[i].type))\n return false;\n return true;\n }\n /**\n Removes the marks that are not allowed in this node from the given set.\n */\n allowedMarks(marks) {\n if (this.markSet == null)\n return marks;\n let copy;\n for (let i = 0; i < marks.length; i++) {\n if (!this.allowsMarkType(marks[i].type)) {\n if (!copy)\n copy = marks.slice(0, i);\n }\n else if (copy) {\n copy.push(marks[i]);\n }\n }\n return !copy ? marks : copy.length ? copy : Mark.none;\n }\n /**\n @internal\n */\n static compile(nodes, schema) {\n let result = Object.create(null);\n nodes.forEach((name, spec) => result[name] = new NodeType(name, schema, spec));\n let topType = schema.spec.topNode || \"doc\";\n if (!result[topType])\n throw new RangeError(\"Schema is missing its top node type ('\" + topType + \"')\");\n if (!result.text)\n throw new RangeError(\"Every schema needs a 'text' type\");\n for (let _ in result.text.attrs)\n throw new RangeError(\"The text node type should not have attributes\");\n return result;\n }\n}\nfunction validateType(typeName, attrName, type) {\n let types = type.split(\"|\");\n return (value) => {\n let name = value === null ? \"null\" : typeof value;\n if (types.indexOf(name) < 0)\n throw new RangeError(`Expected value of type ${types} for attribute ${attrName} on type ${typeName}, got ${name}`);\n };\n}\n// Attribute descriptors\nclass Attribute {\n constructor(typeName, attrName, options) {\n this.hasDefault = Object.prototype.hasOwnProperty.call(options, \"default\");\n this.default = options.default;\n this.validate = typeof options.validate == \"string\" ? validateType(typeName, attrName, options.validate) : options.validate;\n }\n get isRequired() {\n return !this.hasDefault;\n }\n}\n// Marks\n/**\nLike nodes, marks (which are associated with nodes to signify\nthings like emphasis or being part of a link) are\n[tagged](https://prosemirror.net/docs/ref/#model.Mark.type) with type objects, which are\ninstantiated once per `Schema`.\n*/\nclass MarkType {\n /**\n @internal\n */\n constructor(\n /**\n The name of the mark type.\n */\n name, \n /**\n @internal\n */\n rank, \n /**\n The schema that this mark type instance is part of.\n */\n schema, \n /**\n The spec on which the type is based.\n */\n spec) {\n this.name = name;\n this.rank = rank;\n this.schema = schema;\n this.spec = spec;\n this.attrs = initAttrs(name, spec.attrs);\n this.excluded = null;\n let defaults = defaultAttrs(this.attrs);\n this.instance = defaults ? new Mark(this, defaults) : null;\n }\n /**\n Create a mark of this type. `attrs` may be `null` or an object\n containing only some of the mark's attributes. The others, if\n they have defaults, will be added.\n */\n create(attrs = null) {\n if (!attrs && this.instance)\n return this.instance;\n return new Mark(this, computeAttrs(this.attrs, attrs));\n }\n /**\n @internal\n */\n static compile(marks, schema) {\n let result = Object.create(null), rank = 0;\n marks.forEach((name, spec) => result[name] = new MarkType(name, rank++, schema, spec));\n return result;\n }\n /**\n When there is a mark of this type in the given set, a new set\n without it is returned. Otherwise, the input set is returned.\n */\n removeFromSet(set) {\n for (var i = 0; i < set.length; i++)\n if (set[i].type == this) {\n set = set.slice(0, i).concat(set.slice(i + 1));\n i--;\n }\n return set;\n }\n /**\n Tests whether there is a mark of this type in the given set.\n */\n isInSet(set) {\n for (let i = 0; i < set.length; i++)\n if (set[i].type == this)\n return set[i];\n }\n /**\n @internal\n */\n checkAttrs(attrs) {\n checkAttrs(this.attrs, attrs, \"mark\", this.name);\n }\n /**\n Queries whether a given mark type is\n [excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one.\n */\n excludes(other) {\n return this.excluded.indexOf(other) > -1;\n }\n}\n/**\nA document schema. Holds [node](https://prosemirror.net/docs/ref/#model.NodeType) and [mark\ntype](https://prosemirror.net/docs/ref/#model.MarkType) objects for the nodes and marks that may\noccur in conforming documents, and provides functionality for\ncreating and deserializing such documents.\n\nWhen given, the type parameters provide the names of the nodes and\nmarks in this schema.\n*/\nclass Schema {\n /**\n Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).\n */\n constructor(spec) {\n /**\n The [linebreak\n replacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement) node defined\n in this schema, if any.\n */\n this.linebreakReplacement = null;\n /**\n An object for storing whatever values modules may want to\n compute and cache per schema. (If you want to store something\n in it, try to use property names unlikely to clash.)\n */\n this.cached = Object.create(null);\n let instanceSpec = this.spec = {};\n for (let prop in spec)\n instanceSpec[prop] = spec[prop];\n instanceSpec.nodes = OrderedMap.from(spec.nodes),\n instanceSpec.marks = OrderedMap.from(spec.marks || {}),\n this.nodes = NodeType.compile(this.spec.nodes, this);\n this.marks = MarkType.compile(this.spec.marks, this);\n let contentExprCache = Object.create(null);\n for (let prop in this.nodes) {\n if (prop in this.marks)\n throw new RangeError(prop + \" can not be both a node and a mark\");\n let type = this.nodes[prop], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] ||\n (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n if (type.spec.linebreakReplacement) {\n if (this.linebreakReplacement)\n throw new RangeError(\"Multiple linebreak nodes defined\");\n if (!type.isInline || !type.isLeaf)\n throw new RangeError(\"Linebreak replacement nodes must be inline leaf nodes\");\n this.linebreakReplacement = type;\n }\n type.markSet = markExpr == \"_\" ? null :\n markExpr ? gatherMarks(this, markExpr.split(\" \")) :\n markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (let prop in this.marks) {\n let type = this.marks[prop], excl = type.spec.excludes;\n type.excluded = excl == null ? [type] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n this.nodeFromJSON = json => Node.fromJSON(this, json);\n this.markFromJSON = json => Mark.fromJSON(this, json);\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n this.cached.wrappings = Object.create(null);\n }\n /**\n Create a node in this schema. The `type` may be a string or a\n `NodeType` instance. Attributes will be extended with defaults,\n `content` may be a `Fragment`, `null`, a `Node`, or an array of\n nodes.\n */\n node(type, attrs = null, content, marks) {\n if (typeof type == \"string\")\n type = this.nodeType(type);\n else if (!(type instanceof NodeType))\n throw new RangeError(\"Invalid node type: \" + type);\n else if (type.schema != this)\n throw new RangeError(\"Node type from different schema used (\" + type.name + \")\");\n return type.createChecked(attrs, content, marks);\n }\n /**\n Create a text node in the schema. Empty text nodes are not\n allowed.\n */\n text(text, marks) {\n let type = this.nodes.text;\n return new TextNode(type, type.defaultAttrs, text, Mark.setFrom(marks));\n }\n /**\n Create a mark with the given type and attributes.\n */\n mark(type, attrs) {\n if (typeof type == \"string\")\n type = this.marks[type];\n return type.create(attrs);\n }\n /**\n @internal\n */\n nodeType(name) {\n let found = this.nodes[name];\n if (!found)\n throw new RangeError(\"Unknown node type: \" + name);\n return found;\n }\n}\nfunction gatherMarks(schema, marks) {\n let found = [];\n for (let i = 0; i < marks.length; i++) {\n let name = marks[i], mark = schema.marks[name], ok = mark;\n if (mark) {\n found.push(mark);\n }\n else {\n for (let prop in schema.marks) {\n let mark = schema.marks[prop];\n if (name == \"_\" || (mark.spec.group && mark.spec.group.split(\" \").indexOf(name) > -1))\n found.push(ok = mark);\n }\n }\n if (!ok)\n throw new SyntaxError(\"Unknown mark type: '\" + marks[i] + \"'\");\n }\n return found;\n}\n\nfunction isTagRule(rule) { return rule.tag != null; }\nfunction isStyleRule(rule) { return rule.style != null; }\n/**\nA DOM parser represents a strategy for parsing DOM content into a\nProseMirror document conforming to a given schema. Its behavior is\ndefined by an array of [rules](https://prosemirror.net/docs/ref/#model.ParseRule).\n*/\nclass DOMParser {\n /**\n Create a parser that targets the given schema, using the given\n parsing rules.\n */\n constructor(\n /**\n The schema into which the parser parses.\n */\n schema, \n /**\n The set of [parse rules](https://prosemirror.net/docs/ref/#model.ParseRule) that the parser\n uses, in order of precedence.\n */\n rules) {\n this.schema = schema;\n this.rules = rules;\n /**\n @internal\n */\n this.tags = [];\n /**\n @internal\n */\n this.styles = [];\n let matchedStyles = this.matchedStyles = [];\n rules.forEach(rule => {\n if (isTagRule(rule)) {\n this.tags.push(rule);\n }\n else if (isStyleRule(rule)) {\n let prop = /[^=]*/.exec(rule.style)[0];\n if (matchedStyles.indexOf(prop) < 0)\n matchedStyles.push(prop);\n this.styles.push(rule);\n }\n });\n // Only normalize list elements when lists in the schema can't directly contain themselves\n this.normalizeLists = !this.tags.some(r => {\n if (!/^(ul|ol)\\b/.test(r.tag) || !r.node)\n return false;\n let node = schema.nodes[r.node];\n return node.contentMatch.matchType(node);\n });\n }\n /**\n Parse a document from the content of a DOM node.\n */\n parse(dom, options = {}) {\n let context = new ParseContext(this, options, false);\n context.addAll(dom, Mark.none, options.from, options.to);\n return context.finish();\n }\n /**\n Parses the content of the given DOM node, like\n [`parse`](https://prosemirror.net/docs/ref/#model.DOMParser.parse), and takes the same set of\n options. But unlike that method, which produces a whole node,\n this one returns a slice that is open at the sides, meaning that\n the schema constraints aren't applied to the start of nodes to\n the left of the input and the end of nodes at the end.\n */\n parseSlice(dom, options = {}) {\n let context = new ParseContext(this, options, true);\n context.addAll(dom, Mark.none, options.from, options.to);\n return Slice.maxOpen(context.finish());\n }\n /**\n @internal\n */\n matchTag(dom, context, after) {\n for (let i = after ? this.tags.indexOf(after) + 1 : 0; i < this.tags.length; i++) {\n let rule = this.tags[i];\n if (matches(dom, rule.tag) &&\n (rule.namespace === undefined || dom.namespaceURI == rule.namespace) &&\n (!rule.context || context.matchesContext(rule.context))) {\n if (rule.getAttrs) {\n let result = rule.getAttrs(dom);\n if (result === false)\n continue;\n rule.attrs = result || undefined;\n }\n return rule;\n }\n }\n }\n /**\n @internal\n */\n matchStyle(prop, value, context, after) {\n for (let i = after ? this.styles.indexOf(after) + 1 : 0; i < this.styles.length; i++) {\n let rule = this.styles[i], style = rule.style;\n if (style.indexOf(prop) != 0 ||\n rule.context && !context.matchesContext(rule.context) ||\n // Test that the style string either precisely matches the prop,\n // or has an '=' sign after the prop, followed by the given\n // value.\n style.length > prop.length &&\n (style.charCodeAt(prop.length) != 61 || style.slice(prop.length + 1) != value))\n continue;\n if (rule.getAttrs) {\n let result = rule.getAttrs(value);\n if (result === false)\n continue;\n rule.attrs = result || undefined;\n }\n return rule;\n }\n }\n /**\n @internal\n */\n static schemaRules(schema) {\n let result = [];\n function insert(rule) {\n let priority = rule.priority == null ? 50 : rule.priority, i = 0;\n for (; i < result.length; i++) {\n let next = result[i], nextPriority = next.priority == null ? 50 : next.priority;\n if (nextPriority < priority)\n break;\n }\n result.splice(i, 0, rule);\n }\n for (let name in schema.marks) {\n let rules = schema.marks[name].spec.parseDOM;\n if (rules)\n rules.forEach(rule => {\n insert(rule = copy(rule));\n if (!(rule.mark || rule.ignore || rule.clearMark))\n rule.mark = name;\n });\n }\n for (let name in schema.nodes) {\n let rules = schema.nodes[name].spec.parseDOM;\n if (rules)\n rules.forEach(rule => {\n insert(rule = copy(rule));\n if (!(rule.node || rule.ignore || rule.mark))\n rule.node = name;\n });\n }\n return result;\n }\n /**\n Construct a DOM parser using the parsing rules listed in a\n schema's [node specs](https://prosemirror.net/docs/ref/#model.NodeSpec.parseDOM), reordered by\n [priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).\n */\n static fromSchema(schema) {\n return schema.cached.domParser ||\n (schema.cached.domParser = new DOMParser(schema, DOMParser.schemaRules(schema)));\n }\n}\nconst blockTags = {\n address: true, article: true, aside: true, blockquote: true, canvas: true,\n dd: true, div: true, dl: true, fieldset: true, figcaption: true, figure: true,\n footer: true, form: true, h1: true, h2: true, h3: true, h4: true, h5: true,\n h6: true, header: true, hgroup: true, hr: true, li: true, noscript: true, ol: true,\n output: true, p: true, pre: true, section: true, table: true, tfoot: true, ul: true\n};\nconst ignoreTags = {\n head: true, noscript: true, object: true, script: true, style: true, title: true\n};\nconst listTags = { ol: true, ul: true };\n// Using a bitfield for node context options\nconst OPT_PRESERVE_WS = 1, OPT_PRESERVE_WS_FULL = 2, OPT_OPEN_LEFT = 4;\nfunction wsOptionsFor(type, preserveWhitespace, base) {\n if (preserveWhitespace != null)\n return (preserveWhitespace ? OPT_PRESERVE_WS : 0) |\n (preserveWhitespace === \"full\" ? OPT_PRESERVE_WS_FULL : 0);\n return type && type.whitespace == \"pre\" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base & ~OPT_OPEN_LEFT;\n}\nclass NodeContext {\n constructor(type, attrs, marks, solid, match, options) {\n this.type = type;\n this.attrs = attrs;\n this.marks = marks;\n this.solid = solid;\n this.options = options;\n this.content = [];\n // Marks applied to the node's children\n this.activeMarks = Mark.none;\n this.match = match || (options & OPT_OPEN_LEFT ? null : type.contentMatch);\n }\n findWrapping(node) {\n if (!this.match) {\n if (!this.type)\n return [];\n let fill = this.type.contentMatch.fillBefore(Fragment.from(node));\n if (fill) {\n this.match = this.type.contentMatch.matchFragment(fill);\n }\n else {\n let start = this.type.contentMatch, wrap;\n if (wrap = start.findWrapping(node.type)) {\n this.match = start;\n return wrap;\n }\n else {\n return null;\n }\n }\n }\n return this.match.findWrapping(node.type);\n }\n finish(openEnd) {\n if (!(this.options & OPT_PRESERVE_WS)) { // Strip trailing whitespace\n let last = this.content[this.content.length - 1], m;\n if (last && last.isText && (m = /[ \\t\\r\\n\\u000c]+$/.exec(last.text))) {\n let text = last;\n if (last.text.length == m[0].length)\n this.content.pop();\n else\n this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m[0].length));\n }\n }\n let content = Fragment.from(this.content);\n if (!openEnd && this.match)\n content = content.append(this.match.fillBefore(Fragment.empty, true));\n return this.type ? this.type.create(this.attrs, content, this.marks) : content;\n }\n inlineContext(node) {\n if (this.type)\n return this.type.inlineContent;\n if (this.content.length)\n return this.content[0].isInline;\n return node.parentNode && !blockTags.hasOwnProperty(node.parentNode.nodeName.toLowerCase());\n }\n}\nclass ParseContext {\n constructor(\n // The parser we are using.\n parser, \n // The options passed to this parse.\n options, isOpen) {\n this.parser = parser;\n this.options = options;\n this.isOpen = isOpen;\n this.open = 0;\n this.localPreserveWS = false;\n let topNode = options.topNode, topContext;\n let topOptions = wsOptionsFor(null, options.preserveWhitespace, 0) | (isOpen ? OPT_OPEN_LEFT : 0);\n if (topNode)\n topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, true, options.topMatch || topNode.type.contentMatch, topOptions);\n else if (isOpen)\n topContext = new NodeContext(null, null, Mark.none, true, null, topOptions);\n else\n topContext = new NodeContext(parser.schema.topNodeType, null, Mark.none, true, null, topOptions);\n this.nodes = [topContext];\n this.find = options.findPositions;\n this.needsBlock = false;\n }\n get top() {\n return this.nodes[this.open];\n }\n // Add a DOM node to the content. Text is inserted as text node,\n // otherwise, the node is passed to `addElement` or, if it has a\n // `style` attribute, `addElementWithStyles`.\n addDOM(dom, marks) {\n if (dom.nodeType == 3)\n this.addTextNode(dom, marks);\n else if (dom.nodeType == 1)\n this.addElement(dom, marks);\n }\n addTextNode(dom, marks) {\n let value = dom.nodeValue;\n let top = this.top, preserveWS = (top.options & OPT_PRESERVE_WS_FULL) ? \"full\"\n : this.localPreserveWS || (top.options & OPT_PRESERVE_WS) > 0;\n let { schema } = this.parser;\n if (preserveWS === \"full\" ||\n top.inlineContext(dom) ||\n /[^ \\t\\r\\n\\u000c]/.test(value)) {\n if (!preserveWS) {\n value = value.replace(/[ \\t\\r\\n\\u000c]+/g, \" \");\n // If this starts with whitespace, and there is no node before it, or\n // a hard break, or a text node that ends with whitespace, strip the\n // leading space.\n if (/^[ \\t\\r\\n\\u000c]/.test(value) && this.open == this.nodes.length - 1) {\n let nodeBefore = top.content[top.content.length - 1];\n let domNodeBefore = dom.previousSibling;\n if (!nodeBefore ||\n (domNodeBefore && domNodeBefore.nodeName == 'BR') ||\n (nodeBefore.isText && /[ \\t\\r\\n\\u000c]$/.test(nodeBefore.text)))\n value = value.slice(1);\n }\n }\n else if (preserveWS === \"full\") {\n value = value.replace(/\\r\\n?/g, \"\\n\");\n }\n else if (schema.linebreakReplacement && /[\\r\\n]/.test(value) && this.top.findWrapping(schema.linebreakReplacement.create())) {\n let lines = value.split(/\\r?\\n|\\r/);\n for (let i = 0; i < lines.length; i++) {\n if (i)\n this.insertNode(schema.linebreakReplacement.create(), marks, true);\n if (lines[i])\n this.insertNode(schema.text(lines[i]), marks, !/\\S/.test(lines[i]));\n }\n value = \"\";\n }\n else {\n value = value.replace(/\\r?\\n|\\r/g, \" \");\n }\n if (value)\n this.insertNode(schema.text(value), marks, !/\\S/.test(value));\n this.findInText(dom);\n }\n else {\n this.findInside(dom);\n }\n }\n // Try to find a handler for the given tag and use that to parse. If\n // none is found, the element's content nodes are added directly.\n addElement(dom, marks, matchAfter) {\n let outerWS = this.localPreserveWS, top = this.top;\n if (dom.tagName == \"PRE\" || /pre/.test(dom.style && dom.style.whiteSpace))\n this.localPreserveWS = true;\n let name = dom.nodeName.toLowerCase(), ruleID;\n if (listTags.hasOwnProperty(name) && this.parser.normalizeLists)\n normalizeList(dom);\n let rule = (this.options.ruleFromNode && this.options.ruleFromNode(dom)) ||\n (ruleID = this.parser.matchTag(dom, this, matchAfter));\n out: if (rule ? rule.ignore : ignoreTags.hasOwnProperty(name)) {\n this.findInside(dom);\n this.ignoreFallback(dom, marks);\n }\n else if (!rule || rule.skip || rule.closeParent) {\n if (rule && rule.closeParent)\n this.open = Math.max(0, this.open - 1);\n else if (rule && rule.skip.nodeType)\n dom = rule.skip;\n let sync, oldNeedsBlock = this.needsBlock;\n if (blockTags.hasOwnProperty(name)) {\n if (top.content.length && top.content[0].isInline && this.open) {\n this.open--;\n top = this.top;\n }\n sync = true;\n if (!top.type)\n this.needsBlock = true;\n }\n else if (!dom.firstChild) {\n this.leafFallback(dom, marks);\n break out;\n }\n let innerMarks = rule && rule.skip ? marks : this.readStyles(dom, marks);\n if (innerMarks)\n this.addAll(dom, innerMarks);\n if (sync)\n this.sync(top);\n this.needsBlock = oldNeedsBlock;\n }\n else {\n let innerMarks = this.readStyles(dom, marks);\n if (innerMarks)\n this.addElementByRule(dom, rule, innerMarks, rule.consuming === false ? ruleID : undefined);\n }\n this.localPreserveWS = outerWS;\n }\n // Called for leaf DOM nodes that would otherwise be ignored\n leafFallback(dom, marks) {\n if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent)\n this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\"), marks);\n }\n // Called for ignored nodes\n ignoreFallback(dom, marks) {\n // Ignored BR nodes should at least create an inline context\n if (dom.nodeName == \"BR\" && (!this.top.type || !this.top.type.inlineContent))\n this.findPlace(this.parser.schema.text(\"-\"), marks, true);\n }\n // Run any style parser associated with the node's styles. Either\n // return an updated array of marks, or null to indicate some of the\n // styles had a rule with `ignore` set.\n readStyles(dom, marks) {\n let styles = dom.style;\n // Because many properties will only show up in 'normalized' form\n // in `style.item` (i.e. text-decoration becomes\n // text-decoration-line, text-decoration-color, etc), we directly\n // query the styles mentioned in our rules instead of iterating\n // over the items.\n if (styles && styles.length)\n for (let i = 0; i < this.parser.matchedStyles.length; i++) {\n let name = this.parser.matchedStyles[i], value = styles.getPropertyValue(name);\n if (value)\n for (let after = undefined;;) {\n let rule = this.parser.matchStyle(name, value, this, after);\n if (!rule)\n break;\n if (rule.ignore)\n return null;\n if (rule.clearMark)\n marks = marks.filter(m => !rule.clearMark(m));\n else\n marks = marks.concat(this.parser.schema.marks[rule.mark].create(rule.attrs));\n if (rule.consuming === false)\n after = rule;\n else\n break;\n }\n }\n return marks;\n }\n // Look up a handler for the given node. If none are found, return\n // false. Otherwise, apply it, use its return value to drive the way\n // the node's content is wrapped, and return true.\n addElementByRule(dom, rule, marks, continueAfter) {\n let sync, nodeType;\n if (rule.node) {\n nodeType = this.parser.schema.nodes[rule.node];\n if (!nodeType.isLeaf) {\n let inner = this.enter(nodeType, rule.attrs || null, marks, rule.preserveWhitespace);\n if (inner) {\n sync = true;\n marks = inner;\n }\n }\n else if (!this.insertNode(nodeType.create(rule.attrs), marks, dom.nodeName == \"BR\")) {\n this.leafFallback(dom, marks);\n }\n }\n else {\n let markType = this.parser.schema.marks[rule.mark];\n marks = marks.concat(markType.create(rule.attrs));\n }\n let startIn = this.top;\n if (nodeType && nodeType.isLeaf) {\n this.findInside(dom);\n }\n else if (continueAfter) {\n this.addElement(dom, marks, continueAfter);\n }\n else if (rule.getContent) {\n this.findInside(dom);\n rule.getContent(dom, this.parser.schema).forEach(node => this.insertNode(node, marks, false));\n }\n else {\n let contentDOM = dom;\n if (typeof rule.contentElement == \"string\")\n contentDOM = dom.querySelector(rule.contentElement);\n else if (typeof rule.contentElement == \"function\")\n contentDOM = rule.contentElement(dom);\n else if (rule.contentElement)\n contentDOM = rule.contentElement;\n this.findAround(dom, contentDOM, true);\n this.addAll(contentDOM, marks);\n this.findAround(dom, contentDOM, false);\n }\n if (sync && this.sync(startIn))\n this.open--;\n }\n // Add all child nodes between `startIndex` and `endIndex` (or the\n // whole node, if not given). If `sync` is passed, use it to\n // synchronize after every block element.\n addAll(parent, marks, startIndex, endIndex) {\n let index = startIndex || 0;\n for (let dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild, end = endIndex == null ? null : parent.childNodes[endIndex]; dom != end; dom = dom.nextSibling, ++index) {\n this.findAtPoint(parent, index);\n this.addDOM(dom, marks);\n }\n this.findAtPoint(parent, index);\n }\n // Try to find a way to fit the given node type into the current\n // context. May add intermediate wrappers and/or leave non-solid\n // nodes that we're in.\n findPlace(node, marks, cautious) {\n let route, sync;\n for (let depth = this.open, penalty = 0; depth >= 0; depth--) {\n let cx = this.nodes[depth];\n let found = cx.findWrapping(node);\n if (found && (!route || route.length > found.length + penalty)) {\n route = found;\n sync = cx;\n if (!found.length)\n break;\n }\n if (cx.solid) {\n if (cautious)\n break;\n penalty += 2;\n }\n }\n if (!route)\n return null;\n this.sync(sync);\n for (let i = 0; i < route.length; i++)\n marks = this.enterInner(route[i], null, marks, false);\n return marks;\n }\n // Try to insert the given node, adjusting the context when needed.\n insertNode(node, marks, cautious) {\n if (node.isInline && this.needsBlock && !this.top.type) {\n let block = this.textblockFromContext();\n if (block)\n marks = this.enterInner(block, null, marks);\n }\n let innerMarks = this.findPlace(node, marks, cautious);\n if (innerMarks) {\n this.closeExtra();\n let top = this.top;\n if (top.match)\n top.match = top.match.matchType(node.type);\n let nodeMarks = Mark.none;\n for (let m of innerMarks.concat(node.marks))\n if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, node.type))\n nodeMarks = m.addToSet(nodeMarks);\n top.content.push(node.mark(nodeMarks));\n return true;\n }\n return false;\n }\n // Try to start a node of the given type, adjusting the context when\n // necessary.\n enter(type, attrs, marks, preserveWS) {\n let innerMarks = this.findPlace(type.create(attrs), marks, false);\n if (innerMarks)\n innerMarks = this.enterInner(type, attrs, marks, true, preserveWS);\n return innerMarks;\n }\n // Open a node of the given type\n enterInner(type, attrs, marks, solid = false, preserveWS) {\n this.closeExtra();\n let top = this.top;\n top.match = top.match && top.match.matchType(type);\n let options = wsOptionsFor(type, preserveWS, top.options);\n if ((top.options & OPT_OPEN_LEFT) && top.content.length == 0)\n options |= OPT_OPEN_LEFT;\n let applyMarks = Mark.none;\n marks = marks.filter(m => {\n if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, type)) {\n applyMarks = m.addToSet(applyMarks);\n return false;\n }\n return true;\n });\n this.nodes.push(new NodeContext(type, attrs, applyMarks, solid, null, options));\n this.open++;\n return marks;\n }\n // Make sure all nodes above this.open are finished and added to\n // their parents\n closeExtra(openEnd = false) {\n let i = this.nodes.length - 1;\n if (i > this.open) {\n for (; i > this.open; i--)\n this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd));\n this.nodes.length = this.open + 1;\n }\n }\n finish() {\n this.open = 0;\n this.closeExtra(this.isOpen);\n return this.nodes[0].finish(!!(this.isOpen || this.options.topOpen));\n }\n sync(to) {\n for (let i = this.open; i >= 0; i--) {\n if (this.nodes[i] == to) {\n this.open = i;\n return true;\n }\n else if (this.localPreserveWS) {\n this.nodes[i].options |= OPT_PRESERVE_WS;\n }\n }\n return false;\n }\n get currentPos() {\n this.closeExtra();\n let pos = 0;\n for (let i = this.open; i >= 0; i--) {\n let content = this.nodes[i].content;\n for (let j = content.length - 1; j >= 0; j--)\n pos += content[j].nodeSize;\n if (i)\n pos++;\n }\n return pos;\n }\n findAtPoint(parent, offset) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].node == parent && this.find[i].offset == offset)\n this.find[i].pos = this.currentPos;\n }\n }\n findInside(parent) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node))\n this.find[i].pos = this.currentPos;\n }\n }\n findAround(parent, content, before) {\n if (parent != content && this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n let pos = content.compareDocumentPosition(this.find[i].node);\n if (pos & (before ? 2 : 4))\n this.find[i].pos = this.currentPos;\n }\n }\n }\n findInText(textNode) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].node == textNode)\n this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset);\n }\n }\n // Determines whether the given context string matches this context.\n matchesContext(context) {\n if (context.indexOf(\"|\") > -1)\n return context.split(/\\s*\\|\\s*/).some(this.matchesContext, this);\n let parts = context.split(\"/\");\n let option = this.options.context;\n let useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type);\n let minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1);\n let match = (i, depth) => {\n for (; i >= 0; i--) {\n let part = parts[i];\n if (part == \"\") {\n if (i == parts.length - 1 || i == 0)\n continue;\n for (; depth >= minDepth; depth--)\n if (match(i - 1, depth))\n return true;\n return false;\n }\n else {\n let next = depth > 0 || (depth == 0 && useRoot) ? this.nodes[depth].type\n : option && depth >= minDepth ? option.node(depth - minDepth).type\n : null;\n if (!next || (next.name != part && !next.isInGroup(part)))\n return false;\n depth--;\n }\n }\n return true;\n };\n return match(parts.length - 1, this.open);\n }\n textblockFromContext() {\n let $context = this.options.context;\n if ($context)\n for (let d = $context.depth; d >= 0; d--) {\n let deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;\n if (deflt && deflt.isTextblock && deflt.defaultAttrs)\n return deflt;\n }\n for (let name in this.parser.schema.nodes) {\n let type = this.parser.schema.nodes[name];\n if (type.isTextblock && type.defaultAttrs)\n return type;\n }\n }\n}\n// Kludge to work around directly nested list nodes produced by some\n// tools and allowed by browsers to mean that the nested list is\n// actually part of the list item above it.\nfunction normalizeList(dom) {\n for (let child = dom.firstChild, prevItem = null; child; child = child.nextSibling) {\n let name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null;\n if (name && listTags.hasOwnProperty(name) && prevItem) {\n prevItem.appendChild(child);\n child = prevItem;\n }\n else if (name == \"li\") {\n prevItem = child;\n }\n else if (name) {\n prevItem = null;\n }\n }\n}\n// Apply a CSS selector.\nfunction matches(dom, selector) {\n return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector);\n}\nfunction copy(obj) {\n let copy = {};\n for (let prop in obj)\n copy[prop] = obj[prop];\n return copy;\n}\n// Used when finding a mark at the top level of a fragment parse.\n// Checks whether it would be reasonable to apply a given mark type to\n// a given node, by looking at the way the mark occurs in the schema.\nfunction markMayApply(markType, nodeType) {\n let nodes = nodeType.schema.nodes;\n for (let name in nodes) {\n let parent = nodes[name];\n if (!parent.allowsMarkType(markType))\n continue;\n let seen = [], scan = (match) => {\n seen.push(match);\n for (let i = 0; i < match.edgeCount; i++) {\n let { type, next } = match.edge(i);\n if (type == nodeType)\n return true;\n if (seen.indexOf(next) < 0 && scan(next))\n return true;\n }\n };\n if (scan(parent.contentMatch))\n return true;\n }\n}\n\n/**\nA DOM serializer knows how to convert ProseMirror nodes and\nmarks of various types to DOM nodes.\n*/\nclass DOMSerializer {\n /**\n Create a serializer. `nodes` should map node names to functions\n that take a node and return a description of the corresponding\n DOM. `marks` does the same for mark names, but also gets an\n argument that tells it whether the mark's content is block or\n inline content (for typical use, it'll always be inline). A mark\n serializer may be `null` to indicate that marks of that type\n should not be serialized.\n */\n constructor(\n /**\n The node serialization functions.\n */\n nodes, \n /**\n The mark serialization functions.\n */\n marks) {\n this.nodes = nodes;\n this.marks = marks;\n }\n /**\n Serialize the content of this fragment to a DOM fragment. When\n not in the browser, the `document` option, containing a DOM\n document, should be passed so that the serializer can create\n nodes.\n */\n serializeFragment(fragment, options = {}, target) {\n if (!target)\n target = doc(options).createDocumentFragment();\n let top = target, active = [];\n fragment.forEach(node => {\n if (active.length || node.marks.length) {\n let keep = 0, rendered = 0;\n while (keep < active.length && rendered < node.marks.length) {\n let next = node.marks[rendered];\n if (!this.marks[next.type.name]) {\n rendered++;\n continue;\n }\n if (!next.eq(active[keep][0]) || next.type.spec.spanning === false)\n break;\n keep++;\n rendered++;\n }\n while (keep < active.length)\n top = active.pop()[1];\n while (rendered < node.marks.length) {\n let add = node.marks[rendered++];\n let markDOM = this.serializeMark(add, node.isInline, options);\n if (markDOM) {\n active.push([add, top]);\n top.appendChild(markDOM.dom);\n top = markDOM.contentDOM || markDOM.dom;\n }\n }\n }\n top.appendChild(this.serializeNodeInner(node, options));\n });\n return target;\n }\n /**\n @internal\n */\n serializeNodeInner(node, options) {\n if (node.isText)\n return doc(options).createTextNode(node.text);\n let { dom, contentDOM } = renderSpec(doc(options), this.nodes[node.type.name](node), null, node.attrs);\n if (contentDOM) {\n if (node.isLeaf)\n throw new RangeError(\"Content hole not allowed in a leaf node spec\");\n this.serializeFragment(node.content, options, contentDOM);\n }\n return dom;\n }\n /**\n Serialize this node to a DOM node. This can be useful when you\n need to serialize a part of a document, as opposed to the whole\n document. To serialize a whole document, use\n [`serializeFragment`](https://prosemirror.net/docs/ref/#model.DOMSerializer.serializeFragment) on\n its [content](https://prosemirror.net/docs/ref/#model.Node.content).\n */\n serializeNode(node, options = {}) {\n let dom = this.serializeNodeInner(node, options);\n for (let i = node.marks.length - 1; i >= 0; i--) {\n let wrap = this.serializeMark(node.marks[i], node.isInline, options);\n if (wrap) {\n (wrap.contentDOM || wrap.dom).appendChild(dom);\n dom = wrap.dom;\n }\n }\n return dom;\n }\n /**\n @internal\n */\n serializeMark(mark, inline, options = {}) {\n let toDOM = this.marks[mark.type.name];\n return toDOM && renderSpec(doc(options), toDOM(mark, inline), null, mark.attrs);\n }\n static renderSpec(doc, structure, xmlNS = null, blockArraysIn) {\n // Kludge for backwards-compatibility with accidental original behavious\n if (typeof structure == \"string\")\n return { dom: doc.createTextNode(structure) };\n return renderSpec(doc, structure, xmlNS, blockArraysIn);\n }\n /**\n Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)\n properties in a schema's node and mark specs.\n */\n static fromSchema(schema) {\n return schema.cached.domSerializer ||\n (schema.cached.domSerializer = new DOMSerializer(this.nodesFromSchema(schema), this.marksFromSchema(schema)));\n }\n /**\n Gather the serializers in a schema's node specs into an object.\n This can be useful as a base to build a custom serializer from.\n */\n static nodesFromSchema(schema) {\n let result = gatherToDOM(schema.nodes);\n if (!result.text)\n result.text = node => node.text;\n return result;\n }\n /**\n Gather the serializers in a schema's mark specs into an object.\n */\n static marksFromSchema(schema) {\n return gatherToDOM(schema.marks);\n }\n}\nfunction gatherToDOM(obj) {\n let result = {};\n for (let name in obj) {\n let toDOM = obj[name].spec.toDOM;\n if (toDOM)\n result[name] = toDOM;\n }\n return result;\n}\nfunction doc(options) {\n return options.document || window.document;\n}\nconst suspiciousAttributeCache = new WeakMap();\nfunction suspiciousAttributes(attrs) {\n let value = suspiciousAttributeCache.get(attrs);\n if (value === undefined)\n suspiciousAttributeCache.set(attrs, value = suspiciousAttributesInner(attrs));\n return value;\n}\nfunction suspiciousAttributesInner(attrs) {\n let result = null;\n function scan(value) {\n if (value && typeof value == \"object\") {\n if (Array.isArray(value)) {\n if (typeof value[0] == \"string\") {\n if (!result)\n result = [];\n result.push(value);\n }\n else {\n for (let i = 0; i < value.length; i++)\n scan(value[i]);\n }\n }\n else {\n for (let prop in value)\n scan(value[prop]);\n }\n }\n }\n scan(attrs);\n return result;\n}\nfunction renderSpec(doc, structure, xmlNS, blockArraysIn) {\n if (structure.nodeType == 1)\n return { dom: structure };\n if (structure.dom && structure.dom.nodeType == 1)\n return structure;\n let tagName = structure[0], suspicious;\n if (typeof tagName != \"string\")\n throw new RangeError(\"Invalid array passed to renderSpec\");\n if (blockArraysIn && (suspicious = suspiciousAttributes(blockArraysIn)) &&\n suspicious.indexOf(structure) > -1)\n throw new RangeError(\"Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.\");\n let space = tagName.indexOf(\" \");\n if (space > 0) {\n xmlNS = tagName.slice(0, space);\n tagName = tagName.slice(space + 1);\n }\n let contentDOM;\n let dom = (xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName));\n let attrs = structure[1], start = 1;\n if (attrs && typeof attrs == \"object\" && attrs.nodeType == null && !Array.isArray(attrs)) {\n start = 2;\n for (let name in attrs)\n if (attrs[name] != null) {\n let space = name.indexOf(\" \");\n if (space > 0)\n dom.setAttributeNS(name.slice(0, space), name.slice(space + 1), attrs[name]);\n else if (name == \"style\" && dom.style)\n dom.style.cssText = attrs[name];\n else\n dom.setAttribute(name, attrs[name]);\n }\n }\n for (let i = start; i < structure.length; i++) {\n let child = structure[i];\n if (child === 0) {\n if (i < structure.length - 1 || i > start)\n throw new RangeError(\"Content hole must be the only child of its parent node\");\n return { dom, contentDOM: dom };\n }\n else if (typeof child == \"string\") {\n dom.appendChild(doc.createTextNode(child));\n }\n else {\n let { dom: inner, contentDOM: innerContent } = renderSpec(doc, child, xmlNS, blockArraysIn);\n dom.appendChild(inner);\n if (innerContent) {\n if (contentDOM)\n throw new RangeError(\"Multiple content holes\");\n contentDOM = innerContent;\n }\n }\n }\n return { dom, contentDOM };\n}\n\nexport { ContentMatch, DOMParser, DOMSerializer, Fragment, Mark, MarkType, Node, NodeRange, NodeType, ReplaceError, ResolvedPos, Schema, Slice };\n","import { ReplaceError, Slice, Fragment, MarkType, Mark } from 'prosemirror-model';\n\n// Recovery values encode a range index and an offset. They are\n// represented as numbers, because tons of them will be created when\n// mapping, for example, a large number of decorations. The number's\n// lower 16 bits provide the index, the remaining bits the offset.\n//\n// Note: We intentionally don't use bit shift operators to en- and\n// decode these, since those clip to 32 bits, which we might in rare\n// cases want to overflow. A 64-bit float can represent 48-bit\n// integers precisely.\nconst lower16 = 0xffff;\nconst factor16 = Math.pow(2, 16);\nfunction makeRecover(index, offset) { return index + offset * factor16; }\nfunction recoverIndex(value) { return value & lower16; }\nfunction recoverOffset(value) { return (value - (value & lower16)) / factor16; }\nconst DEL_BEFORE = 1, DEL_AFTER = 2, DEL_ACROSS = 4, DEL_SIDE = 8;\n/**\nAn object representing a mapped position with extra\ninformation.\n*/\nclass MapResult {\n /**\n @internal\n */\n constructor(\n /**\n The mapped version of the position.\n */\n pos, \n /**\n @internal\n */\n delInfo, \n /**\n @internal\n */\n recover) {\n this.pos = pos;\n this.delInfo = delInfo;\n this.recover = recover;\n }\n /**\n Tells you whether the position was deleted, that is, whether the\n step removed the token on the side queried (via the `assoc`)\n argument from the document.\n */\n get deleted() { return (this.delInfo & DEL_SIDE) > 0; }\n /**\n Tells you whether the token before the mapped position was deleted.\n */\n get deletedBefore() { return (this.delInfo & (DEL_BEFORE | DEL_ACROSS)) > 0; }\n /**\n True when the token after the mapped position was deleted.\n */\n get deletedAfter() { return (this.delInfo & (DEL_AFTER | DEL_ACROSS)) > 0; }\n /**\n Tells whether any of the steps mapped through deletes across the\n position (including both the token before and after the\n position).\n */\n get deletedAcross() { return (this.delInfo & DEL_ACROSS) > 0; }\n}\n/**\nA map describing the deletions and insertions made by a step, which\ncan be used to find the correspondence between positions in the\npre-step version of a document and the same position in the\npost-step version.\n*/\nclass StepMap {\n /**\n Create a position map. The modifications to the document are\n represented as an array of numbers, in which each group of three\n represents a modified chunk as `[start, oldSize, newSize]`.\n */\n constructor(\n /**\n @internal\n */\n ranges, \n /**\n @internal\n */\n inverted = false) {\n this.ranges = ranges;\n this.inverted = inverted;\n if (!ranges.length && StepMap.empty)\n return StepMap.empty;\n }\n /**\n @internal\n */\n recover(value) {\n let diff = 0, index = recoverIndex(value);\n if (!this.inverted)\n for (let i = 0; i < index; i++)\n diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];\n return this.ranges[index * 3] + diff + recoverOffset(value);\n }\n mapResult(pos, assoc = 1) { return this._map(pos, assoc, false); }\n map(pos, assoc = 1) { return this._map(pos, assoc, true); }\n /**\n @internal\n */\n _map(pos, assoc, simple) {\n let diff = 0, oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (let i = 0; i < this.ranges.length; i += 3) {\n let start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos)\n break;\n let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex], end = start + oldSize;\n if (pos <= end) {\n let side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc;\n let result = start + diff + (side < 0 ? 0 : newSize);\n if (simple)\n return result;\n let recover = pos == (assoc < 0 ? start : end) ? null : makeRecover(i / 3, pos - start);\n let del = pos == start ? DEL_AFTER : pos == end ? DEL_BEFORE : DEL_ACROSS;\n if (assoc < 0 ? pos != start : pos != end)\n del |= DEL_SIDE;\n return new MapResult(result, del, recover);\n }\n diff += newSize - oldSize;\n }\n return simple ? pos + diff : new MapResult(pos + diff, 0, null);\n }\n /**\n @internal\n */\n touches(pos, recover) {\n let diff = 0, index = recoverIndex(recover);\n let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (let i = 0; i < this.ranges.length; i += 3) {\n let start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos)\n break;\n let oldSize = this.ranges[i + oldIndex], end = start + oldSize;\n if (pos <= end && i == index * 3)\n return true;\n diff += this.ranges[i + newIndex] - oldSize;\n }\n return false;\n }\n /**\n Calls the given function on each of the changed ranges included in\n this map.\n */\n forEach(f) {\n let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (let i = 0, diff = 0; i < this.ranges.length; i += 3) {\n let start = this.ranges[i], oldStart = start - (this.inverted ? diff : 0), newStart = start + (this.inverted ? 0 : diff);\n let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex];\n f(oldStart, oldStart + oldSize, newStart, newStart + newSize);\n diff += newSize - oldSize;\n }\n }\n /**\n Create an inverted version of this map. The result can be used to\n map positions in the post-step document to the pre-step document.\n */\n invert() {\n return new StepMap(this.ranges, !this.inverted);\n }\n /**\n @internal\n */\n toString() {\n return (this.inverted ? \"-\" : \"\") + JSON.stringify(this.ranges);\n }\n /**\n Create a map that moves all positions by offset `n` (which may be\n negative). This can be useful when applying steps meant for a\n sub-document to a larger document, or vice-versa.\n */\n static offset(n) {\n return n == 0 ? StepMap.empty : new StepMap(n < 0 ? [0, -n, 0] : [0, 0, n]);\n }\n}\n/**\nA StepMap that contains no changed ranges.\n*/\nStepMap.empty = new StepMap([]);\n/**\nA mapping represents a pipeline of zero or more [step\nmaps](https://prosemirror.net/docs/ref/#transform.StepMap). It has special provisions for losslessly\nhandling mapping positions through a series of steps in which some\nsteps are inverted versions of earlier steps. (This comes up when\n‘[rebasing](https://prosemirror.net/docs/guide/#transform.rebasing)’ steps for\ncollaboration or history management.)\n*/\nclass Mapping {\n /**\n Create a new mapping with the given position maps.\n */\n constructor(maps, \n /**\n @internal\n */\n mirror, \n /**\n The starting position in the `maps` array, used when `map` or\n `mapResult` is called.\n */\n from = 0, \n /**\n The end position in the `maps` array.\n */\n to = maps ? maps.length : 0) {\n this.mirror = mirror;\n this.from = from;\n this.to = to;\n this._maps = maps || [];\n this.ownData = !(maps || mirror);\n }\n /**\n The step maps in this mapping.\n */\n get maps() { return this._maps; }\n /**\n Create a mapping that maps only through a part of this one.\n */\n slice(from = 0, to = this.maps.length) {\n return new Mapping(this._maps, this.mirror, from, to);\n }\n /**\n Add a step map to the end of this mapping. If `mirrors` is\n given, it should be the index of the step map that is the mirror\n image of this one.\n */\n appendMap(map, mirrors) {\n if (!this.ownData) {\n this._maps = this._maps.slice();\n this.mirror = this.mirror && this.mirror.slice();\n this.ownData = true;\n }\n this.to = this._maps.push(map);\n if (mirrors != null)\n this.setMirror(this._maps.length - 1, mirrors);\n }\n /**\n Add all the step maps in a given mapping to this one (preserving\n mirroring information).\n */\n appendMapping(mapping) {\n for (let i = 0, startSize = this._maps.length; i < mapping._maps.length; i++) {\n let mirr = mapping.getMirror(i);\n this.appendMap(mapping._maps[i], mirr != null && mirr < i ? startSize + mirr : undefined);\n }\n }\n /**\n Finds the offset of the step map that mirrors the map at the\n given offset, in this mapping (as per the second argument to\n `appendMap`).\n */\n getMirror(n) {\n if (this.mirror)\n for (let i = 0; i < this.mirror.length; i++)\n if (this.mirror[i] == n)\n return this.mirror[i + (i % 2 ? -1 : 1)];\n }\n /**\n @internal\n */\n setMirror(n, m) {\n if (!this.mirror)\n this.mirror = [];\n this.mirror.push(n, m);\n }\n /**\n Append the inverse of the given mapping to this one.\n */\n appendMappingInverted(mapping) {\n for (let i = mapping.maps.length - 1, totalSize = this._maps.length + mapping._maps.length; i >= 0; i--) {\n let mirr = mapping.getMirror(i);\n this.appendMap(mapping._maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : undefined);\n }\n }\n /**\n Create an inverted version of this mapping.\n */\n invert() {\n let inverse = new Mapping;\n inverse.appendMappingInverted(this);\n return inverse;\n }\n /**\n Map a position through this mapping.\n */\n map(pos, assoc = 1) {\n if (this.mirror)\n return this._map(pos, assoc, true);\n for (let i = this.from; i < this.to; i++)\n pos = this._maps[i].map(pos, assoc);\n return pos;\n }\n /**\n Map a position through this mapping, returning a mapping\n result.\n */\n mapResult(pos, assoc = 1) { return this._map(pos, assoc, false); }\n /**\n @internal\n */\n _map(pos, assoc, simple) {\n let delInfo = 0;\n for (let i = this.from; i < this.to; i++) {\n let map = this._maps[i], result = map.mapResult(pos, assoc);\n if (result.recover != null) {\n let corr = this.getMirror(i);\n if (corr != null && corr > i && corr < this.to) {\n i = corr;\n pos = this._maps[corr].recover(result.recover);\n continue;\n }\n }\n delInfo |= result.delInfo;\n pos = result.pos;\n }\n return simple ? pos : new MapResult(pos, delInfo, null);\n }\n}\n\nconst stepsByID = Object.create(null);\n/**\nA step object represents an atomic change. It generally applies\nonly to the document it was created for, since the positions\nstored in it will only make sense for that document.\n\nNew steps are defined by creating classes that extend `Step`,\noverriding the `apply`, `invert`, `map`, `getMap` and `fromJSON`\nmethods, and registering your class with a unique\nJSON-serialization identifier using\n[`Step.jsonID`](https://prosemirror.net/docs/ref/#transform.Step^jsonID).\n*/\nclass Step {\n /**\n Get the step map that represents the changes made by this step,\n and which can be used to transform between positions in the old\n and the new document.\n */\n getMap() { return StepMap.empty; }\n /**\n Try to merge this step with another one, to be applied directly\n after it. Returns the merged step when possible, null if the\n steps can't be merged.\n */\n merge(other) { return null; }\n /**\n Deserialize a step from its JSON representation. Will call\n through to the step class' own implementation of this method.\n */\n static fromJSON(schema, json) {\n if (!json || !json.stepType)\n throw new RangeError(\"Invalid input for Step.fromJSON\");\n let type = stepsByID[json.stepType];\n if (!type)\n throw new RangeError(`No step type ${json.stepType} defined`);\n return type.fromJSON(schema, json);\n }\n /**\n To be able to serialize steps to JSON, each step needs a string\n ID to attach to its JSON representation. Use this method to\n register an ID for your step classes. Try to pick something\n that's unlikely to clash with steps from other modules.\n */\n static jsonID(id, stepClass) {\n if (id in stepsByID)\n throw new RangeError(\"Duplicate use of step JSON ID \" + id);\n stepsByID[id] = stepClass;\n stepClass.prototype.jsonID = id;\n return stepClass;\n }\n}\n/**\nThe result of [applying](https://prosemirror.net/docs/ref/#transform.Step.apply) a step. Contains either a\nnew document or a failure value.\n*/\nclass StepResult {\n /**\n @internal\n */\n constructor(\n /**\n The transformed document, if successful.\n */\n doc, \n /**\n The failure message, if unsuccessful.\n */\n failed) {\n this.doc = doc;\n this.failed = failed;\n }\n /**\n Create a successful step result.\n */\n static ok(doc) { return new StepResult(doc, null); }\n /**\n Create a failed step result.\n */\n static fail(message) { return new StepResult(null, message); }\n /**\n Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given\n arguments. Create a successful result if it succeeds, and a\n failed one if it throws a `ReplaceError`.\n */\n static fromReplace(doc, from, to, slice) {\n try {\n return StepResult.ok(doc.replace(from, to, slice));\n }\n catch (e) {\n if (e instanceof ReplaceError)\n return StepResult.fail(e.message);\n throw e;\n }\n }\n}\n\nfunction mapFragment(fragment, f, parent) {\n let mapped = [];\n for (let i = 0; i < fragment.childCount; i++) {\n let child = fragment.child(i);\n if (child.content.size)\n child = child.copy(mapFragment(child.content, f, child));\n if (child.isInline)\n child = f(child, parent, i);\n mapped.push(child);\n }\n return Fragment.fromArray(mapped);\n}\n/**\nAdd a mark to all inline content between two positions.\n*/\nclass AddMarkStep extends Step {\n /**\n Create a mark step.\n */\n constructor(\n /**\n The start of the marked range.\n */\n from, \n /**\n The end of the marked range.\n */\n to, \n /**\n The mark to add.\n */\n mark) {\n super();\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n apply(doc) {\n let oldSlice = doc.slice(this.from, this.to), $from = doc.resolve(this.from);\n let parent = $from.node($from.sharedDepth(this.to));\n let slice = new Slice(mapFragment(oldSlice.content, (node, parent) => {\n if (!node.isAtom || !parent.type.allowsMarkType(this.mark.type))\n return node;\n return node.mark(this.mark.addToSet(node.marks));\n }, parent), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n }\n invert() {\n return new RemoveMarkStep(this.from, this.to, this.mark);\n }\n map(mapping) {\n let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos)\n return null;\n return new AddMarkStep(from.pos, to.pos, this.mark);\n }\n merge(other) {\n if (other instanceof AddMarkStep &&\n other.mark.eq(this.mark) &&\n this.from <= other.to && this.to >= other.from)\n return new AddMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n return null;\n }\n toJSON() {\n return { stepType: \"addMark\", mark: this.mark.toJSON(),\n from: this.from, to: this.to };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n throw new RangeError(\"Invalid input for AddMarkStep.fromJSON\");\n return new AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"addMark\", AddMarkStep);\n/**\nRemove a mark from all inline content between two positions.\n*/\nclass RemoveMarkStep extends Step {\n /**\n Create a mark-removing step.\n */\n constructor(\n /**\n The start of the unmarked range.\n */\n from, \n /**\n The end of the unmarked range.\n */\n to, \n /**\n The mark to remove.\n */\n mark) {\n super();\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n apply(doc) {\n let oldSlice = doc.slice(this.from, this.to);\n let slice = new Slice(mapFragment(oldSlice.content, node => {\n return node.mark(this.mark.removeFromSet(node.marks));\n }, doc), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n }\n invert() {\n return new AddMarkStep(this.from, this.to, this.mark);\n }\n map(mapping) {\n let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos)\n return null;\n return new RemoveMarkStep(from.pos, to.pos, this.mark);\n }\n merge(other) {\n if (other instanceof RemoveMarkStep &&\n other.mark.eq(this.mark) &&\n this.from <= other.to && this.to >= other.from)\n return new RemoveMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n return null;\n }\n toJSON() {\n return { stepType: \"removeMark\", mark: this.mark.toJSON(),\n from: this.from, to: this.to };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n throw new RangeError(\"Invalid input for RemoveMarkStep.fromJSON\");\n return new RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"removeMark\", RemoveMarkStep);\n/**\nAdd a mark to a specific node.\n*/\nclass AddNodeMarkStep extends Step {\n /**\n Create a node mark step.\n */\n constructor(\n /**\n The position of the target node.\n */\n pos, \n /**\n The mark to add.\n */\n mark) {\n super();\n this.pos = pos;\n this.mark = mark;\n }\n apply(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node)\n return StepResult.fail(\"No node at mark step's position\");\n let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n invert(doc) {\n let node = doc.nodeAt(this.pos);\n if (node) {\n let newSet = this.mark.addToSet(node.marks);\n if (newSet.length == node.marks.length) {\n for (let i = 0; i < node.marks.length; i++)\n if (!node.marks[i].isInSet(newSet))\n return new AddNodeMarkStep(this.pos, node.marks[i]);\n return new AddNodeMarkStep(this.pos, this.mark);\n }\n }\n return new RemoveNodeMarkStep(this.pos, this.mark);\n }\n map(mapping) {\n let pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new AddNodeMarkStep(pos.pos, this.mark);\n }\n toJSON() {\n return { stepType: \"addNodeMark\", pos: this.pos, mark: this.mark.toJSON() };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.pos != \"number\")\n throw new RangeError(\"Invalid input for AddNodeMarkStep.fromJSON\");\n return new AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"addNodeMark\", AddNodeMarkStep);\n/**\nRemove a mark from a specific node.\n*/\nclass RemoveNodeMarkStep extends Step {\n /**\n Create a mark-removing step.\n */\n constructor(\n /**\n The position of the target node.\n */\n pos, \n /**\n The mark to remove.\n */\n mark) {\n super();\n this.pos = pos;\n this.mark = mark;\n }\n apply(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node)\n return StepResult.fail(\"No node at mark step's position\");\n let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n invert(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node || !this.mark.isInSet(node.marks))\n return this;\n return new AddNodeMarkStep(this.pos, this.mark);\n }\n map(mapping) {\n let pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new RemoveNodeMarkStep(pos.pos, this.mark);\n }\n toJSON() {\n return { stepType: \"removeNodeMark\", pos: this.pos, mark: this.mark.toJSON() };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.pos != \"number\")\n throw new RangeError(\"Invalid input for RemoveNodeMarkStep.fromJSON\");\n return new RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"removeNodeMark\", RemoveNodeMarkStep);\n\n/**\nReplace a part of the document with a slice of new content.\n*/\nclass ReplaceStep extends Step {\n /**\n The given `slice` should fit the 'gap' between `from` and\n `to`—the depths must line up, and the surrounding nodes must be\n able to be joined with the open sides of the slice. When\n `structure` is true, the step will fail if the content between\n from and to is not just a sequence of closing and then opening\n tokens (this is to guard against rebased replace steps\n overwriting something they weren't supposed to).\n */\n constructor(\n /**\n The start position of the replaced range.\n */\n from, \n /**\n The end position of the replaced range.\n */\n to, \n /**\n The slice to insert.\n */\n slice, \n /**\n @internal\n */\n structure = false) {\n super();\n this.from = from;\n this.to = to;\n this.slice = slice;\n this.structure = structure;\n }\n apply(doc) {\n if (this.structure && contentBetween(doc, this.from, this.to))\n return StepResult.fail(\"Structure replace would overwrite content\");\n return StepResult.fromReplace(doc, this.from, this.to, this.slice);\n }\n getMap() {\n return new StepMap([this.from, this.to - this.from, this.slice.size]);\n }\n invert(doc) {\n return new ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to));\n }\n map(mapping) {\n let to = mapping.mapResult(this.to, -1);\n let from = this.from == this.to && ReplaceStep.MAP_BIAS < 0 ? to : mapping.mapResult(this.from, 1);\n if (from.deletedAcross && to.deletedAcross)\n return null;\n return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice, this.structure);\n }\n merge(other) {\n if (!(other instanceof ReplaceStep) || other.structure || this.structure)\n return null;\n if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) {\n let slice = this.slice.size + other.slice.size == 0 ? Slice.empty\n : new Slice(this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd);\n return new ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure);\n }\n else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) {\n let slice = this.slice.size + other.slice.size == 0 ? Slice.empty\n : new Slice(other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd);\n return new ReplaceStep(other.from, this.to, slice, this.structure);\n }\n else {\n return null;\n }\n }\n toJSON() {\n let json = { stepType: \"replace\", from: this.from, to: this.to };\n if (this.slice.size)\n json.slice = this.slice.toJSON();\n if (this.structure)\n json.structure = true;\n return json;\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n throw new RangeError(\"Invalid input for ReplaceStep.fromJSON\");\n return new ReplaceStep(json.from, json.to, Slice.fromJSON(schema, json.slice), !!json.structure);\n }\n}\n/**\nBy default, for backwards compatibility, an inserting step\nmapped over an insertion at that same position fill move after\nthe inserted content. In a collaborative editing situation, that\ncan make redone insertions appear in unexpected places. You can\nset this to -1 to make such mapping keep the step before the\ninsertion instead.\n*/\nReplaceStep.MAP_BIAS = 1;\nStep.jsonID(\"replace\", ReplaceStep);\n/**\nReplace a part of the document with a slice of content, but\npreserve a range of the replaced content by moving it into the\nslice.\n*/\nclass ReplaceAroundStep extends Step {\n /**\n Create a replace-around step with the given range and gap.\n `insert` should be the point in the slice into which the content\n of the gap should be moved. `structure` has the same meaning as\n it has in the [`ReplaceStep`](https://prosemirror.net/docs/ref/#transform.ReplaceStep) class.\n */\n constructor(\n /**\n The start position of the replaced range.\n */\n from, \n /**\n The end position of the replaced range.\n */\n to, \n /**\n The start of preserved range.\n */\n gapFrom, \n /**\n The end of preserved range.\n */\n gapTo, \n /**\n The slice to insert.\n */\n slice, \n /**\n The position in the slice where the preserved range should be\n inserted.\n */\n insert, \n /**\n @internal\n */\n structure = false) {\n super();\n this.from = from;\n this.to = to;\n this.gapFrom = gapFrom;\n this.gapTo = gapTo;\n this.slice = slice;\n this.insert = insert;\n this.structure = structure;\n }\n apply(doc) {\n if (this.structure && (contentBetween(doc, this.from, this.gapFrom) ||\n contentBetween(doc, this.gapTo, this.to)))\n return StepResult.fail(\"Structure gap-replace would overwrite content\");\n let gap = doc.slice(this.gapFrom, this.gapTo);\n if (gap.openStart || gap.openEnd)\n return StepResult.fail(\"Gap is not a flat range\");\n let inserted = this.slice.insertAt(this.insert, gap.content);\n if (!inserted)\n return StepResult.fail(\"Content does not fit in gap\");\n return StepResult.fromReplace(doc, this.from, this.to, inserted);\n }\n getMap() {\n return new StepMap([this.from, this.gapFrom - this.from, this.insert,\n this.gapTo, this.to - this.gapTo, this.slice.size - this.insert]);\n }\n invert(doc) {\n let gap = this.gapTo - this.gapFrom;\n return new ReplaceAroundStep(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);\n }\n map(mapping) {\n let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n let gapFrom = this.from == this.gapFrom ? from.pos : mapping.map(this.gapFrom, -1);\n let gapTo = this.to == this.gapTo ? to.pos : mapping.map(this.gapTo, 1);\n if ((from.deletedAcross && to.deletedAcross) || gapFrom < from.pos || gapTo > to.pos)\n return null;\n return new ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);\n }\n toJSON() {\n let json = { stepType: \"replaceAround\", from: this.from, to: this.to,\n gapFrom: this.gapFrom, gapTo: this.gapTo, insert: this.insert };\n if (this.slice.size)\n json.slice = this.slice.toJSON();\n if (this.structure)\n json.structure = true;\n return json;\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\" ||\n typeof json.gapFrom != \"number\" || typeof json.gapTo != \"number\" || typeof json.insert != \"number\")\n throw new RangeError(\"Invalid input for ReplaceAroundStep.fromJSON\");\n return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, Slice.fromJSON(schema, json.slice), json.insert, !!json.structure);\n }\n}\nStep.jsonID(\"replaceAround\", ReplaceAroundStep);\nfunction contentBetween(doc, from, to) {\n let $from = doc.resolve(from), dist = to - from, depth = $from.depth;\n while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {\n depth--;\n dist--;\n }\n if (dist > 0) {\n let next = $from.node(depth).maybeChild($from.indexAfter(depth));\n while (dist > 0) {\n if (!next || next.isLeaf)\n return true;\n next = next.firstChild;\n dist--;\n }\n }\n return false;\n}\n\nfunction addMark(tr, from, to, mark) {\n let removed = [], added = [];\n let removing, adding;\n tr.doc.nodesBetween(from, to, (node, pos, parent) => {\n if (!node.isInline)\n return;\n let marks = node.marks;\n if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {\n let start = Math.max(pos, from), end = Math.min(pos + node.nodeSize, to);\n let newSet = mark.addToSet(marks);\n for (let i = 0; i < marks.length; i++) {\n if (!marks[i].isInSet(newSet)) {\n if (removing && removing.to == start && removing.mark.eq(marks[i]))\n removing.to = end;\n else\n removed.push(removing = new RemoveMarkStep(start, end, marks[i]));\n }\n }\n if (adding && adding.to == start)\n adding.to = end;\n else\n added.push(adding = new AddMarkStep(start, end, mark));\n }\n });\n removed.forEach(s => tr.step(s));\n added.forEach(s => tr.step(s));\n}\nfunction removeMark(tr, from, to, mark) {\n let matched = [], step = 0;\n tr.doc.nodesBetween(from, to, (node, pos) => {\n if (!node.isInline)\n return;\n step++;\n let toRemove = null;\n if (mark instanceof MarkType) {\n let set = node.marks, found;\n while (found = mark.isInSet(set)) {\n (toRemove || (toRemove = [])).push(found);\n set = found.removeFromSet(set);\n }\n }\n else if (mark) {\n if (mark.isInSet(node.marks))\n toRemove = [mark];\n }\n else {\n toRemove = node.marks;\n }\n if (toRemove && toRemove.length) {\n let end = Math.min(pos + node.nodeSize, to);\n for (let i = 0; i < toRemove.length; i++) {\n let style = toRemove[i], found;\n for (let j = 0; j < matched.length; j++) {\n let m = matched[j];\n if (m.step == step - 1 && style.eq(matched[j].style))\n found = m;\n }\n if (found) {\n found.to = end;\n found.step = step;\n }\n else {\n matched.push({ style, from: Math.max(pos, from), to: end, step });\n }\n }\n }\n });\n matched.forEach(m => tr.step(new RemoveMarkStep(m.from, m.to, m.style)));\n}\nfunction clearIncompatible(tr, pos, parentType, match = parentType.contentMatch, clearNewlines = true) {\n let node = tr.doc.nodeAt(pos);\n let replSteps = [], cur = pos + 1;\n for (let i = 0; i < node.childCount; i++) {\n let child = node.child(i), end = cur + child.nodeSize;\n let allowed = match.matchType(child.type);\n if (!allowed) {\n replSteps.push(new ReplaceStep(cur, end, Slice.empty));\n }\n else {\n match = allowed;\n for (let j = 0; j < child.marks.length; j++)\n if (!parentType.allowsMarkType(child.marks[j].type))\n tr.step(new RemoveMarkStep(cur, end, child.marks[j]));\n if (clearNewlines && child.isText && parentType.whitespace != \"pre\") {\n let m, newline = /\\r?\\n|\\r/g, slice;\n while (m = newline.exec(child.text)) {\n if (!slice)\n slice = new Slice(Fragment.from(parentType.schema.text(\" \", parentType.allowedMarks(child.marks))), 0, 0);\n replSteps.push(new ReplaceStep(cur + m.index, cur + m.index + m[0].length, slice));\n }\n }\n }\n cur = end;\n }\n if (!match.validEnd) {\n let fill = match.fillBefore(Fragment.empty, true);\n tr.replace(cur, cur, new Slice(fill, 0, 0));\n }\n for (let i = replSteps.length - 1; i >= 0; i--)\n tr.step(replSteps[i]);\n}\n\nfunction canCut(node, start, end) {\n return (start == 0 || node.canReplace(start, node.childCount)) &&\n (end == node.childCount || node.canReplace(0, end));\n}\n/**\nTry to find a target depth to which the content in the given range\ncan be lifted. Will not go across\n[isolating](https://prosemirror.net/docs/ref/#model.NodeSpec.isolating) parent nodes.\n*/\nfunction liftTarget(range) {\n let parent = range.parent;\n let content = parent.content.cutByIndex(range.startIndex, range.endIndex);\n for (let depth = range.depth, contentBefore = 0, contentAfter = 0;; --depth) {\n let node = range.$from.node(depth);\n let index = range.$from.index(depth) + contentBefore, endIndex = range.$to.indexAfter(depth) - contentAfter;\n if (depth < range.depth && node.canReplace(index, endIndex, content))\n return depth;\n if (depth == 0 || node.type.spec.isolating || !canCut(node, index, endIndex))\n break;\n if (index)\n contentBefore = 1;\n if (endIndex < node.childCount)\n contentAfter = 1;\n }\n return null;\n}\nfunction lift(tr, range, target) {\n let { $from, $to, depth } = range;\n let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);\n let start = gapStart, end = gapEnd;\n let before = Fragment.empty, openStart = 0;\n for (let d = depth, splitting = false; d > target; d--)\n if (splitting || $from.index(d) > 0) {\n splitting = true;\n before = Fragment.from($from.node(d).copy(before));\n openStart++;\n }\n else {\n start--;\n }\n let after = Fragment.empty, openEnd = 0;\n for (let d = depth, splitting = false; d > target; d--)\n if (splitting || $to.after(d + 1) < $to.end(d)) {\n splitting = true;\n after = Fragment.from($to.node(d).copy(after));\n openEnd++;\n }\n else {\n end++;\n }\n tr.step(new ReplaceAroundStep(start, end, gapStart, gapEnd, new Slice(before.append(after), openStart, openEnd), before.size - openStart, true));\n}\n/**\nTry to find a valid way to wrap the content in the given range in a\nnode of the given type. May introduce extra nodes around and inside\nthe wrapper node, if necessary. Returns null if no valid wrapping\ncould be found. When `innerRange` is given, that range's content is\nused as the content to fit into the wrapping, instead of the\ncontent of `range`.\n*/\nfunction findWrapping(range, nodeType, attrs = null, innerRange = range) {\n let around = findWrappingOutside(range, nodeType);\n let inner = around && findWrappingInside(innerRange, nodeType);\n if (!inner)\n return null;\n return around.map(withAttrs)\n .concat({ type: nodeType, attrs }).concat(inner.map(withAttrs));\n}\nfunction withAttrs(type) { return { type, attrs: null }; }\nfunction findWrappingOutside(range, type) {\n let { parent, startIndex, endIndex } = range;\n let around = parent.contentMatchAt(startIndex).findWrapping(type);\n if (!around)\n return null;\n let outer = around.length ? around[0] : type;\n return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null;\n}\nfunction findWrappingInside(range, type) {\n let { parent, startIndex, endIndex } = range;\n let inner = parent.child(startIndex);\n let inside = type.contentMatch.findWrapping(inner.type);\n if (!inside)\n return null;\n let lastType = inside.length ? inside[inside.length - 1] : type;\n let innerMatch = lastType.contentMatch;\n for (let i = startIndex; innerMatch && i < endIndex; i++)\n innerMatch = innerMatch.matchType(parent.child(i).type);\n if (!innerMatch || !innerMatch.validEnd)\n return null;\n return inside;\n}\nfunction wrap(tr, range, wrappers) {\n let content = Fragment.empty;\n for (let i = wrappers.length - 1; i >= 0; i--) {\n if (content.size) {\n let match = wrappers[i].type.contentMatch.matchFragment(content);\n if (!match || !match.validEnd)\n throw new RangeError(\"Wrapper type given to Transform.wrap does not form valid content of its parent wrapper\");\n }\n content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content));\n }\n let start = range.start, end = range.end;\n tr.step(new ReplaceAroundStep(start, end, start, end, new Slice(content, 0, 0), wrappers.length, true));\n}\nfunction setBlockType(tr, from, to, type, attrs) {\n if (!type.isTextblock)\n throw new RangeError(\"Type given to setBlockType should be a textblock\");\n let mapFrom = tr.steps.length;\n tr.doc.nodesBetween(from, to, (node, pos) => {\n let attrsHere = typeof attrs == \"function\" ? attrs(node) : attrs;\n if (node.isTextblock && !node.hasMarkup(type, attrsHere) &&\n canChangeType(tr.doc, tr.mapping.slice(mapFrom).map(pos), type)) {\n let convertNewlines = null;\n if (type.schema.linebreakReplacement) {\n let pre = type.whitespace == \"pre\", supportLinebreak = !!type.contentMatch.matchType(type.schema.linebreakReplacement);\n if (pre && !supportLinebreak)\n convertNewlines = false;\n else if (!pre && supportLinebreak)\n convertNewlines = true;\n }\n // Ensure all markup that isn't allowed in the new node type is cleared\n if (convertNewlines === false)\n replaceLinebreaks(tr, node, pos, mapFrom);\n clearIncompatible(tr, tr.mapping.slice(mapFrom).map(pos, 1), type, undefined, convertNewlines === null);\n let mapping = tr.mapping.slice(mapFrom);\n let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);\n tr.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));\n if (convertNewlines === true)\n replaceNewlines(tr, node, pos, mapFrom);\n return false;\n }\n });\n}\nfunction replaceNewlines(tr, node, pos, mapFrom) {\n node.forEach((child, offset) => {\n if (child.isText) {\n let m, newline = /\\r?\\n|\\r/g;\n while (m = newline.exec(child.text)) {\n let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset + m.index);\n tr.replaceWith(start, start + 1, node.type.schema.linebreakReplacement.create());\n }\n }\n });\n}\nfunction replaceLinebreaks(tr, node, pos, mapFrom) {\n node.forEach((child, offset) => {\n if (child.type == child.type.schema.linebreakReplacement) {\n let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset);\n tr.replaceWith(start, start + 1, node.type.schema.text(\"\\n\"));\n }\n });\n}\nfunction canChangeType(doc, pos, type) {\n let $pos = doc.resolve(pos), index = $pos.index();\n return $pos.parent.canReplaceWith(index, index + 1, type);\n}\n/**\nChange the type, attributes, and/or marks of the node at `pos`.\nWhen `type` isn't given, the existing node type is preserved,\n*/\nfunction setNodeMarkup(tr, pos, type, attrs, marks) {\n let node = tr.doc.nodeAt(pos);\n if (!node)\n throw new RangeError(\"No node at given position\");\n if (!type)\n type = node.type;\n let newNode = type.create(attrs, null, marks || node.marks);\n if (node.isLeaf)\n return tr.replaceWith(pos, pos + node.nodeSize, newNode);\n if (!type.validContent(node.content))\n throw new RangeError(\"Invalid content for node type \" + type.name);\n tr.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice(Fragment.from(newNode), 0, 0), 1, true));\n}\n/**\nCheck whether splitting at the given position is allowed.\n*/\nfunction canSplit(doc, pos, depth = 1, typesAfter) {\n let $pos = doc.resolve(pos), base = $pos.depth - depth;\n let innerType = (typesAfter && typesAfter[typesAfter.length - 1]) || $pos.parent;\n if (base < 0 || $pos.parent.type.spec.isolating ||\n !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) ||\n !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount)))\n return false;\n for (let d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {\n let node = $pos.node(d), index = $pos.index(d);\n if (node.type.spec.isolating)\n return false;\n let rest = node.content.cutByIndex(index, node.childCount);\n let overrideChild = typesAfter && typesAfter[i + 1];\n if (overrideChild)\n rest = rest.replaceChild(0, overrideChild.type.create(overrideChild.attrs));\n let after = (typesAfter && typesAfter[i]) || node;\n if (!node.canReplace(index + 1, node.childCount) || !after.type.validContent(rest))\n return false;\n }\n let index = $pos.indexAfter(base);\n let baseType = typesAfter && typesAfter[0];\n return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type);\n}\nfunction split(tr, pos, depth = 1, typesAfter) {\n let $pos = tr.doc.resolve(pos), before = Fragment.empty, after = Fragment.empty;\n for (let d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {\n before = Fragment.from($pos.node(d).copy(before));\n let typeAfter = typesAfter && typesAfter[i];\n after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));\n }\n tr.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true));\n}\n/**\nTest whether the blocks before and after a given position can be\njoined.\n*/\nfunction canJoin(doc, pos) {\n let $pos = doc.resolve(pos), index = $pos.index();\n return joinable($pos.nodeBefore, $pos.nodeAfter) &&\n $pos.parent.canReplace(index, index + 1);\n}\nfunction canAppendWithSubstitutedLinebreaks(a, b) {\n if (!b.content.size)\n a.type.compatibleContent(b.type);\n let match = a.contentMatchAt(a.childCount);\n let { linebreakReplacement } = a.type.schema;\n for (let i = 0; i < b.childCount; i++) {\n let child = b.child(i);\n let type = child.type == linebreakReplacement ? a.type.schema.nodes.text : child.type;\n match = match.matchType(type);\n if (!match)\n return false;\n if (!a.type.allowsMarks(child.marks))\n return false;\n }\n return match.validEnd;\n}\nfunction joinable(a, b) {\n return !!(a && b && !a.isLeaf && canAppendWithSubstitutedLinebreaks(a, b));\n}\n/**\nFind an ancestor of the given position that can be joined to the\nblock before (or after if `dir` is positive). Returns the joinable\npoint, if any.\n*/\nfunction joinPoint(doc, pos, dir = -1) {\n let $pos = doc.resolve(pos);\n for (let d = $pos.depth;; d--) {\n let before, after, index = $pos.index(d);\n if (d == $pos.depth) {\n before = $pos.nodeBefore;\n after = $pos.nodeAfter;\n }\n else if (dir > 0) {\n before = $pos.node(d + 1);\n index++;\n after = $pos.node(d).maybeChild(index);\n }\n else {\n before = $pos.node(d).maybeChild(index - 1);\n after = $pos.node(d + 1);\n }\n if (before && !before.isTextblock && joinable(before, after) &&\n $pos.node(d).canReplace(index, index + 1))\n return pos;\n if (d == 0)\n break;\n pos = dir < 0 ? $pos.before(d) : $pos.after(d);\n }\n}\nfunction join(tr, pos, depth) {\n let convertNewlines = null;\n let { linebreakReplacement } = tr.doc.type.schema;\n let $before = tr.doc.resolve(pos - depth), beforeType = $before.node().type;\n if (linebreakReplacement && beforeType.inlineContent) {\n let pre = beforeType.whitespace == \"pre\";\n let supportLinebreak = !!beforeType.contentMatch.matchType(linebreakReplacement);\n if (pre && !supportLinebreak)\n convertNewlines = false;\n else if (!pre && supportLinebreak)\n convertNewlines = true;\n }\n let mapFrom = tr.steps.length;\n if (convertNewlines === false) {\n let $after = tr.doc.resolve(pos + depth);\n replaceLinebreaks(tr, $after.node(), $after.before(), mapFrom);\n }\n if (beforeType.inlineContent)\n clearIncompatible(tr, pos + depth - 1, beforeType, $before.node().contentMatchAt($before.index()), convertNewlines == null);\n let mapping = tr.mapping.slice(mapFrom), start = mapping.map(pos - depth);\n tr.step(new ReplaceStep(start, mapping.map(pos + depth, -1), Slice.empty, true));\n if (convertNewlines === true) {\n let $full = tr.doc.resolve(start);\n replaceNewlines(tr, $full.node(), $full.before(), tr.steps.length);\n }\n return tr;\n}\n/**\nTry to find a point where a node of the given type can be inserted\nnear `pos`, by searching up the node hierarchy when `pos` itself\nisn't a valid place but is at the start or end of a node. Return\nnull if no position was found.\n*/\nfunction insertPoint(doc, pos, nodeType) {\n let $pos = doc.resolve(pos);\n if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType))\n return pos;\n if ($pos.parentOffset == 0)\n for (let d = $pos.depth - 1; d >= 0; d--) {\n let index = $pos.index(d);\n if ($pos.node(d).canReplaceWith(index, index, nodeType))\n return $pos.before(d + 1);\n if (index > 0)\n return null;\n }\n if ($pos.parentOffset == $pos.parent.content.size)\n for (let d = $pos.depth - 1; d >= 0; d--) {\n let index = $pos.indexAfter(d);\n if ($pos.node(d).canReplaceWith(index, index, nodeType))\n return $pos.after(d + 1);\n if (index < $pos.node(d).childCount)\n return null;\n }\n return null;\n}\n/**\nFinds a position at or around the given position where the given\nslice can be inserted. Will look at parent nodes' nearest boundary\nand try there, even if the original position wasn't directly at the\nstart or end of that node. Returns null when no position was found.\n*/\nfunction dropPoint(doc, pos, slice) {\n let $pos = doc.resolve(pos);\n if (!slice.content.size)\n return pos;\n let content = slice.content;\n for (let i = 0; i < slice.openStart; i++)\n content = content.firstChild.content;\n for (let pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {\n for (let d = $pos.depth; d >= 0; d--) {\n let bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;\n let insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);\n let parent = $pos.node(d), fits = false;\n if (pass == 1) {\n fits = parent.canReplace(insertPos, insertPos, content);\n }\n else {\n let wrapping = parent.contentMatchAt(insertPos).findWrapping(content.firstChild.type);\n fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);\n }\n if (fits)\n return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);\n }\n }\n return null;\n}\n\n/**\n‘Fit’ a slice into a given position in the document, producing a\n[step](https://prosemirror.net/docs/ref/#transform.Step) that inserts it. Will return null if\nthere's no meaningful way to insert the slice here, or inserting it\nwould be a no-op (an empty slice over an empty range).\n*/\nfunction replaceStep(doc, from, to = from, slice = Slice.empty) {\n if (from == to && !slice.size)\n return null;\n let $from = doc.resolve(from), $to = doc.resolve(to);\n // Optimization -- avoid work if it's obvious that it's not needed.\n if (fitsTrivially($from, $to, slice))\n return new ReplaceStep(from, to, slice);\n return new Fitter($from, $to, slice).fit();\n}\nfunction fitsTrivially($from, $to, slice) {\n return !slice.openStart && !slice.openEnd && $from.start() == $to.start() &&\n $from.parent.canReplace($from.index(), $to.index(), slice.content);\n}\n// Algorithm for 'placing' the elements of a slice into a gap:\n//\n// We consider the content of each node that is open to the left to be\n// independently placeable. I.e. in , when the\n// paragraph on the left is open, \"foo\" can be placed (somewhere on\n// the left side of the replacement gap) independently from p(\"bar\").\n//\n// This class tracks the state of the placement progress in the\n// following properties:\n//\n// - `frontier` holds a stack of `{type, match}` objects that\n// represent the open side of the replacement. It starts at\n// `$from`, then moves forward as content is placed, and is finally\n// reconciled with `$to`.\n//\n// - `unplaced` is a slice that represents the content that hasn't\n// been placed yet.\n//\n// - `placed` is a fragment of placed content. Its open-start value\n// is implicit in `$from`, and its open-end value in `frontier`.\nclass Fitter {\n constructor($from, $to, unplaced) {\n this.$from = $from;\n this.$to = $to;\n this.unplaced = unplaced;\n this.frontier = [];\n this.placed = Fragment.empty;\n for (let i = 0; i <= $from.depth; i++) {\n let node = $from.node(i);\n this.frontier.push({\n type: node.type,\n match: node.contentMatchAt($from.indexAfter(i))\n });\n }\n for (let i = $from.depth; i > 0; i--)\n this.placed = Fragment.from($from.node(i).copy(this.placed));\n }\n get depth() { return this.frontier.length - 1; }\n fit() {\n // As long as there's unplaced content, try to place some of it.\n // If that fails, either increase the open score of the unplaced\n // slice, or drop nodes from it, and then try again.\n while (this.unplaced.size) {\n let fit = this.findFittable();\n if (fit)\n this.placeNodes(fit);\n else\n this.openMore() || this.dropNode();\n }\n // When there's inline content directly after the frontier _and_\n // directly after `this.$to`, we must generate a `ReplaceAround`\n // step that pulls that content into the node after the frontier.\n // That means the fitting must be done to the end of the textblock\n // node after `this.$to`, not `this.$to` itself.\n let moveInline = this.mustMoveInline(), placedSize = this.placed.size - this.depth - this.$from.depth;\n let $from = this.$from, $to = this.close(moveInline < 0 ? this.$to : $from.doc.resolve(moveInline));\n if (!$to)\n return null;\n // If closing to `$to` succeeded, create a step\n let content = this.placed, openStart = $from.depth, openEnd = $to.depth;\n while (openStart && openEnd && content.childCount == 1) { // Normalize by dropping open parent nodes\n content = content.firstChild.content;\n openStart--;\n openEnd--;\n }\n let slice = new Slice(content, openStart, openEnd);\n if (moveInline > -1)\n return new ReplaceAroundStep($from.pos, moveInline, this.$to.pos, this.$to.end(), slice, placedSize);\n if (slice.size || $from.pos != this.$to.pos) // Don't generate no-op steps\n return new ReplaceStep($from.pos, $to.pos, slice);\n return null;\n }\n // Find a position on the start spine of `this.unplaced` that has\n // content that can be moved somewhere on the frontier. Returns two\n // depths, one for the slice and one for the frontier.\n findFittable() {\n let startDepth = this.unplaced.openStart;\n for (let cur = this.unplaced.content, d = 0, openEnd = this.unplaced.openEnd; d < startDepth; d++) {\n let node = cur.firstChild;\n if (cur.childCount > 1)\n openEnd = 0;\n if (node.type.spec.isolating && openEnd <= d) {\n startDepth = d;\n break;\n }\n cur = node.content;\n }\n // Only try wrapping nodes (pass 2) after finding a place without\n // wrapping failed.\n for (let pass = 1; pass <= 2; pass++) {\n for (let sliceDepth = pass == 1 ? startDepth : this.unplaced.openStart; sliceDepth >= 0; sliceDepth--) {\n let fragment, parent = null;\n if (sliceDepth) {\n parent = contentAt(this.unplaced.content, sliceDepth - 1).firstChild;\n fragment = parent.content;\n }\n else {\n fragment = this.unplaced.content;\n }\n let first = fragment.firstChild;\n for (let frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {\n let { type, match } = this.frontier[frontierDepth], wrap, inject = null;\n // In pass 1, if the next node matches, or there is no next\n // node but the parents look compatible, we've found a\n // place.\n if (pass == 1 && (first ? match.matchType(first.type) || (inject = match.fillBefore(Fragment.from(first), false))\n : parent && type.compatibleContent(parent.type)))\n return { sliceDepth, frontierDepth, parent, inject };\n // In pass 2, look for a set of wrapping nodes that make\n // `first` fit here.\n else if (pass == 2 && first && (wrap = match.findWrapping(first.type)))\n return { sliceDepth, frontierDepth, parent, wrap };\n // Don't continue looking further up if the parent node\n // would fit here.\n if (parent && match.matchType(parent.type))\n break;\n }\n }\n }\n }\n openMore() {\n let { content, openStart, openEnd } = this.unplaced;\n let inner = contentAt(content, openStart);\n if (!inner.childCount || inner.firstChild.isLeaf)\n return false;\n this.unplaced = new Slice(content, openStart + 1, Math.max(openEnd, inner.size + openStart >= content.size - openEnd ? openStart + 1 : 0));\n return true;\n }\n dropNode() {\n let { content, openStart, openEnd } = this.unplaced;\n let inner = contentAt(content, openStart);\n if (inner.childCount <= 1 && openStart > 0) {\n let openAtEnd = content.size - openStart <= openStart + inner.size;\n this.unplaced = new Slice(dropFromFragment(content, openStart - 1, 1), openStart - 1, openAtEnd ? openStart - 1 : openEnd);\n }\n else {\n this.unplaced = new Slice(dropFromFragment(content, openStart, 1), openStart, openEnd);\n }\n }\n // Move content from the unplaced slice at `sliceDepth` to the\n // frontier node at `frontierDepth`. Close that frontier node when\n // applicable.\n placeNodes({ sliceDepth, frontierDepth, parent, inject, wrap }) {\n while (this.depth > frontierDepth)\n this.closeFrontierNode();\n if (wrap)\n for (let i = 0; i < wrap.length; i++)\n this.openFrontierNode(wrap[i]);\n let slice = this.unplaced, fragment = parent ? parent.content : slice.content;\n let openStart = slice.openStart - sliceDepth;\n let taken = 0, add = [];\n let { match, type } = this.frontier[frontierDepth];\n if (inject) {\n for (let i = 0; i < inject.childCount; i++)\n add.push(inject.child(i));\n match = match.matchFragment(inject);\n }\n // Computes the amount of (end) open nodes at the end of the\n // fragment. When 0, the parent is open, but no more. When\n // negative, nothing is open.\n let openEndCount = (fragment.size + sliceDepth) - (slice.content.size - slice.openEnd);\n // Scan over the fragment, fitting as many child nodes as\n // possible.\n while (taken < fragment.childCount) {\n let next = fragment.child(taken), matches = match.matchType(next.type);\n if (!matches)\n break;\n taken++;\n if (taken > 1 || openStart == 0 || next.content.size) { // Drop empty open nodes\n match = matches;\n add.push(closeNodeStart(next.mark(type.allowedMarks(next.marks)), taken == 1 ? openStart : 0, taken == fragment.childCount ? openEndCount : -1));\n }\n }\n let toEnd = taken == fragment.childCount;\n if (!toEnd)\n openEndCount = -1;\n this.placed = addToFragment(this.placed, frontierDepth, Fragment.from(add));\n this.frontier[frontierDepth].match = match;\n // If the parent types match, and the entire node was moved, and\n // it's not open, close this frontier node right away.\n if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1)\n this.closeFrontierNode();\n // Add new frontier nodes for any open nodes at the end.\n for (let i = 0, cur = fragment; i < openEndCount; i++) {\n let node = cur.lastChild;\n this.frontier.push({ type: node.type, match: node.contentMatchAt(node.childCount) });\n cur = node.content;\n }\n // Update `this.unplaced`. Drop the entire node from which we\n // placed it we got to its end, otherwise just drop the placed\n // nodes.\n this.unplaced = !toEnd ? new Slice(dropFromFragment(slice.content, sliceDepth, taken), slice.openStart, slice.openEnd)\n : sliceDepth == 0 ? Slice.empty\n : new Slice(dropFromFragment(slice.content, sliceDepth - 1, 1), sliceDepth - 1, openEndCount < 0 ? slice.openEnd : sliceDepth - 1);\n }\n mustMoveInline() {\n if (!this.$to.parent.isTextblock)\n return -1;\n let top = this.frontier[this.depth], level;\n if (!top.type.isTextblock || !contentAfterFits(this.$to, this.$to.depth, top.type, top.match, false) ||\n (this.$to.depth == this.depth && (level = this.findCloseLevel(this.$to)) && level.depth == this.depth))\n return -1;\n let { depth } = this.$to, after = this.$to.after(depth);\n while (depth > 1 && after == this.$to.end(--depth))\n ++after;\n return after;\n }\n findCloseLevel($to) {\n scan: for (let i = Math.min(this.depth, $to.depth); i >= 0; i--) {\n let { match, type } = this.frontier[i];\n let dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));\n let fit = contentAfterFits($to, i, type, match, dropInner);\n if (!fit)\n continue;\n for (let d = i - 1; d >= 0; d--) {\n let { match, type } = this.frontier[d];\n let matches = contentAfterFits($to, d, type, match, true);\n if (!matches || matches.childCount)\n continue scan;\n }\n return { depth: i, fit, move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to };\n }\n }\n close($to) {\n let close = this.findCloseLevel($to);\n if (!close)\n return null;\n while (this.depth > close.depth)\n this.closeFrontierNode();\n if (close.fit.childCount)\n this.placed = addToFragment(this.placed, close.depth, close.fit);\n $to = close.move;\n for (let d = close.depth + 1; d <= $to.depth; d++) {\n let node = $to.node(d), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));\n this.openFrontierNode(node.type, node.attrs, add);\n }\n return $to;\n }\n openFrontierNode(type, attrs = null, content) {\n let top = this.frontier[this.depth];\n top.match = top.match.matchType(type);\n this.placed = addToFragment(this.placed, this.depth, Fragment.from(type.create(attrs, content)));\n this.frontier.push({ type, match: type.contentMatch });\n }\n closeFrontierNode() {\n let open = this.frontier.pop();\n let add = open.match.fillBefore(Fragment.empty, true);\n if (add.childCount)\n this.placed = addToFragment(this.placed, this.frontier.length, add);\n }\n}\nfunction dropFromFragment(fragment, depth, count) {\n if (depth == 0)\n return fragment.cutByIndex(count, fragment.childCount);\n return fragment.replaceChild(0, fragment.firstChild.copy(dropFromFragment(fragment.firstChild.content, depth - 1, count)));\n}\nfunction addToFragment(fragment, depth, content) {\n if (depth == 0)\n return fragment.append(content);\n return fragment.replaceChild(fragment.childCount - 1, fragment.lastChild.copy(addToFragment(fragment.lastChild.content, depth - 1, content)));\n}\nfunction contentAt(fragment, depth) {\n for (let i = 0; i < depth; i++)\n fragment = fragment.firstChild.content;\n return fragment;\n}\nfunction closeNodeStart(node, openStart, openEnd) {\n if (openStart <= 0)\n return node;\n let frag = node.content;\n if (openStart > 1)\n frag = frag.replaceChild(0, closeNodeStart(frag.firstChild, openStart - 1, frag.childCount == 1 ? openEnd - 1 : 0));\n if (openStart > 0) {\n frag = node.type.contentMatch.fillBefore(frag).append(frag);\n if (openEnd <= 0)\n frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment.empty, true));\n }\n return node.copy(frag);\n}\nfunction contentAfterFits($to, depth, type, match, open) {\n let node = $to.node(depth), index = open ? $to.indexAfter(depth) : $to.index(depth);\n if (index == node.childCount && !type.compatibleContent(node.type))\n return null;\n let fit = match.fillBefore(node.content, true, index);\n return fit && !invalidMarks(type, node.content, index) ? fit : null;\n}\nfunction invalidMarks(type, fragment, start) {\n for (let i = start; i < fragment.childCount; i++)\n if (!type.allowsMarks(fragment.child(i).marks))\n return true;\n return false;\n}\nfunction definesContent(type) {\n return type.spec.defining || type.spec.definingForContent;\n}\nfunction replaceRange(tr, from, to, slice) {\n if (!slice.size)\n return tr.deleteRange(from, to);\n let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);\n if (fitsTrivially($from, $to, slice))\n return tr.step(new ReplaceStep(from, to, slice));\n let targetDepths = coveredDepths($from, $to);\n // Can't replace the whole document, so remove 0 if it's present\n if (targetDepths[targetDepths.length - 1] == 0)\n targetDepths.pop();\n // Negative numbers represent not expansion over the whole node at\n // that depth, but replacing from $from.before(-D) to $to.pos.\n let preferredTarget = -($from.depth + 1);\n targetDepths.unshift(preferredTarget);\n // This loop picks a preferred target depth, if one of the covering\n // depths is not outside of a defining node, and adds negative\n // depths for any depth that has $from at its start and does not\n // cross a defining node.\n for (let d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {\n let spec = $from.node(d).type.spec;\n if (spec.defining || spec.definingAsContext || spec.isolating)\n break;\n if (targetDepths.indexOf(d) > -1)\n preferredTarget = d;\n else if ($from.before(d) == pos)\n targetDepths.splice(1, 0, -d);\n }\n // Try to fit each possible depth of the slice into each possible\n // target depth, starting with the preferred depths.\n let preferredTargetIndex = targetDepths.indexOf(preferredTarget);\n let leftNodes = [], preferredDepth = slice.openStart;\n for (let content = slice.content, i = 0;; i++) {\n let node = content.firstChild;\n leftNodes.push(node);\n if (i == slice.openStart)\n break;\n content = node.content;\n }\n // Back up preferredDepth to cover defining textblocks directly\n // above it, possibly skipping a non-defining textblock.\n for (let d = preferredDepth - 1; d >= 0; d--) {\n let leftNode = leftNodes[d], def = definesContent(leftNode.type);\n if (def && !leftNode.sameMarkup($from.node(Math.abs(preferredTarget) - 1)))\n preferredDepth = d;\n else if (def || !leftNode.type.isTextblock)\n break;\n }\n for (let j = slice.openStart; j >= 0; j--) {\n let openDepth = (j + preferredDepth + 1) % (slice.openStart + 1);\n let insert = leftNodes[openDepth];\n if (!insert)\n continue;\n for (let i = 0; i < targetDepths.length; i++) {\n // Loop over possible expansion levels, starting with the\n // preferred one\n let targetDepth = targetDepths[(i + preferredTargetIndex) % targetDepths.length], expand = true;\n if (targetDepth < 0) {\n expand = false;\n targetDepth = -targetDepth;\n }\n let parent = $from.node(targetDepth - 1), index = $from.index(targetDepth - 1);\n if (parent.canReplaceWith(index, index, insert.type, insert.marks))\n return tr.replace($from.before(targetDepth), expand ? $to.after(targetDepth) : to, new Slice(closeFragment(slice.content, 0, slice.openStart, openDepth), openDepth, slice.openEnd));\n }\n }\n let startSteps = tr.steps.length;\n for (let i = targetDepths.length - 1; i >= 0; i--) {\n tr.replace(from, to, slice);\n if (tr.steps.length > startSteps)\n break;\n let depth = targetDepths[i];\n if (depth < 0)\n continue;\n from = $from.before(depth);\n to = $to.after(depth);\n }\n}\nfunction closeFragment(fragment, depth, oldOpen, newOpen, parent) {\n if (depth < oldOpen) {\n let first = fragment.firstChild;\n fragment = fragment.replaceChild(0, first.copy(closeFragment(first.content, depth + 1, oldOpen, newOpen, first)));\n }\n if (depth > newOpen) {\n let match = parent.contentMatchAt(0);\n let start = match.fillBefore(fragment).append(fragment);\n fragment = start.append(match.matchFragment(start).fillBefore(Fragment.empty, true));\n }\n return fragment;\n}\nfunction replaceRangeWith(tr, from, to, node) {\n if (!node.isInline && from == to && tr.doc.resolve(from).parent.content.size) {\n let point = insertPoint(tr.doc, from, node.type);\n if (point != null)\n from = to = point;\n }\n tr.replaceRange(from, to, new Slice(Fragment.from(node), 0, 0));\n}\nfunction deleteRange(tr, from, to) {\n let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);\n // When the deleted range spans from the start of one textblock to\n // the start of another one, move out of the start of both blocks.\n if ($from.parent.isTextblock && $to.parent.isTextblock && $from.start() != $to.start() &&\n $from.parentOffset == 0 && $to.parentOffset == 0) {\n let shared = $from.sharedDepth(to), isolated = false;\n for (let d = $from.depth; d > shared; d--)\n if ($from.node(d).type.spec.isolating)\n isolated = true;\n for (let d = $to.depth; d > shared; d--)\n if ($to.node(d).type.spec.isolating)\n isolated = true;\n if (!isolated) {\n for (let d = $from.depth; d > 0 && from == $from.start(d); d--)\n from = $from.before(d);\n for (let d = $to.depth; d > 0 && to == $to.start(d); d--)\n to = $to.before(d);\n $from = tr.doc.resolve(from);\n $to = tr.doc.resolve(to);\n }\n }\n let covered = coveredDepths($from, $to);\n for (let i = 0; i < covered.length; i++) {\n let depth = covered[i], last = i == covered.length - 1;\n if ((last && depth == 0) || $from.node(depth).type.contentMatch.validEnd)\n return tr.delete($from.start(depth), $to.end(depth));\n if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1))))\n return tr.delete($from.before(depth), $to.after(depth));\n }\n for (let d = 1; d <= $from.depth && d <= $to.depth; d++) {\n if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d &&\n $from.start(d - 1) == $to.start(d - 1) && $from.node(d - 1).canReplace($from.index(d - 1), $to.index(d - 1)))\n return tr.delete($from.before(d), to);\n }\n tr.delete(from, to);\n}\n// Returns an array of all depths for which $from - $to spans the\n// whole content of the nodes at that depth.\nfunction coveredDepths($from, $to) {\n let result = [], minDepth = Math.min($from.depth, $to.depth);\n for (let d = minDepth; d >= 0; d--) {\n let start = $from.start(d);\n if (start < $from.pos - ($from.depth - d) ||\n $to.end(d) > $to.pos + ($to.depth - d) ||\n $from.node(d).type.spec.isolating ||\n $to.node(d).type.spec.isolating)\n break;\n if (start == $to.start(d) ||\n (d == $from.depth && d == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent &&\n d && $to.start(d - 1) == start - 1))\n result.push(d);\n }\n return result;\n}\n\n/**\nUpdate an attribute in a specific node.\n*/\nclass AttrStep extends Step {\n /**\n Construct an attribute step.\n */\n constructor(\n /**\n The position of the target node.\n */\n pos, \n /**\n The attribute to set.\n */\n attr, \n // The attribute's new value.\n value) {\n super();\n this.pos = pos;\n this.attr = attr;\n this.value = value;\n }\n apply(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node)\n return StepResult.fail(\"No node at attribute step's position\");\n let attrs = Object.create(null);\n for (let name in node.attrs)\n attrs[name] = node.attrs[name];\n attrs[this.attr] = this.value;\n let updated = node.type.create(attrs, null, node.marks);\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n getMap() {\n return StepMap.empty;\n }\n invert(doc) {\n return new AttrStep(this.pos, this.attr, doc.nodeAt(this.pos).attrs[this.attr]);\n }\n map(mapping) {\n let pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new AttrStep(pos.pos, this.attr, this.value);\n }\n toJSON() {\n return { stepType: \"attr\", pos: this.pos, attr: this.attr, value: this.value };\n }\n static fromJSON(schema, json) {\n if (typeof json.pos != \"number\" || typeof json.attr != \"string\")\n throw new RangeError(\"Invalid input for AttrStep.fromJSON\");\n return new AttrStep(json.pos, json.attr, json.value);\n }\n}\nStep.jsonID(\"attr\", AttrStep);\n/**\nUpdate an attribute in the doc node.\n*/\nclass DocAttrStep extends Step {\n /**\n Construct an attribute step.\n */\n constructor(\n /**\n The attribute to set.\n */\n attr, \n // The attribute's new value.\n value) {\n super();\n this.attr = attr;\n this.value = value;\n }\n apply(doc) {\n let attrs = Object.create(null);\n for (let name in doc.attrs)\n attrs[name] = doc.attrs[name];\n attrs[this.attr] = this.value;\n let updated = doc.type.create(attrs, doc.content, doc.marks);\n return StepResult.ok(updated);\n }\n getMap() {\n return StepMap.empty;\n }\n invert(doc) {\n return new DocAttrStep(this.attr, doc.attrs[this.attr]);\n }\n map(mapping) {\n return this;\n }\n toJSON() {\n return { stepType: \"docAttr\", attr: this.attr, value: this.value };\n }\n static fromJSON(schema, json) {\n if (typeof json.attr != \"string\")\n throw new RangeError(\"Invalid input for DocAttrStep.fromJSON\");\n return new DocAttrStep(json.attr, json.value);\n }\n}\nStep.jsonID(\"docAttr\", DocAttrStep);\n\n/**\n@internal\n*/\nlet TransformError = class extends Error {\n};\nTransformError = function TransformError(message) {\n let err = Error.call(this, message);\n err.__proto__ = TransformError.prototype;\n return err;\n};\nTransformError.prototype = Object.create(Error.prototype);\nTransformError.prototype.constructor = TransformError;\nTransformError.prototype.name = \"TransformError\";\n/**\nAbstraction to build up and track an array of\n[steps](https://prosemirror.net/docs/ref/#transform.Step) representing a document transformation.\n\nMost transforming methods return the `Transform` object itself, so\nthat they can be chained.\n*/\nclass Transform {\n /**\n Create a transform that starts with the given document.\n */\n constructor(\n /**\n The current document (the result of applying the steps in the\n transform).\n */\n doc) {\n this.doc = doc;\n /**\n The steps in this transform.\n */\n this.steps = [];\n /**\n The documents before each of the steps.\n */\n this.docs = [];\n /**\n A mapping with the maps for each of the steps in this transform.\n */\n this.mapping = new Mapping;\n }\n /**\n The starting document.\n */\n get before() { return this.docs.length ? this.docs[0] : this.doc; }\n /**\n Apply a new step in this transform, saving the result. Throws an\n error when the step fails.\n */\n step(step) {\n let result = this.maybeStep(step);\n if (result.failed)\n throw new TransformError(result.failed);\n return this;\n }\n /**\n Try to apply a step in this transformation, ignoring it if it\n fails. Returns the step result.\n */\n maybeStep(step) {\n let result = step.apply(this.doc);\n if (!result.failed)\n this.addStep(step, result.doc);\n return result;\n }\n /**\n True when the document has been changed (when there are any\n steps).\n */\n get docChanged() {\n return this.steps.length > 0;\n }\n /**\n Return a single range, in post-transform document positions,\n that covers all content changed by this transform. Returns null\n if no replacements are made. Note that this will ignore changes\n that add/remove marks without replacing the underlying content.\n */\n changedRange() {\n let from = 1e9, to = -1e9;\n for (let i = 0; i < this.mapping.maps.length; i++) {\n let map = this.mapping.maps[i];\n if (i) {\n from = map.map(from, 1);\n to = map.map(to, -1);\n }\n map.forEach((_f, _t, fromB, toB) => {\n from = Math.min(from, fromB);\n to = Math.max(to, toB);\n });\n }\n return from == 1e9 ? null : { from, to };\n }\n /**\n @internal\n */\n addStep(step, doc) {\n this.docs.push(this.doc);\n this.steps.push(step);\n this.mapping.appendMap(step.getMap());\n this.doc = doc;\n }\n /**\n Replace the part of the document between `from` and `to` with the\n given `slice`.\n */\n replace(from, to = from, slice = Slice.empty) {\n let step = replaceStep(this.doc, from, to, slice);\n if (step)\n this.step(step);\n return this;\n }\n /**\n Replace the given range with the given content, which may be a\n fragment, node, or array of nodes.\n */\n replaceWith(from, to, content) {\n return this.replace(from, to, new Slice(Fragment.from(content), 0, 0));\n }\n /**\n Delete the content between the given positions.\n */\n delete(from, to) {\n return this.replace(from, to, Slice.empty);\n }\n /**\n Insert the given content at the given position.\n */\n insert(pos, content) {\n return this.replaceWith(pos, pos, content);\n }\n /**\n Replace a range of the document with a given slice, using\n `from`, `to`, and the slice's\n [`openStart`](https://prosemirror.net/docs/ref/#model.Slice.openStart) property as hints, rather\n than fixed start and end points. This method may grow the\n replaced area or close open nodes in the slice in order to get a\n fit that is more in line with WYSIWYG expectations, by dropping\n fully covered parent nodes of the replaced region when they are\n marked [non-defining as\n context](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext), or including an\n open parent node from the slice that _is_ marked as [defining\n its content](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).\n \n This is the method, for example, to handle paste. The similar\n [`replace`](https://prosemirror.net/docs/ref/#transform.Transform.replace) method is a more\n primitive tool which will _not_ move the start and end of its given\n range, and is useful in situations where you need more precise\n control over what happens.\n */\n replaceRange(from, to, slice) {\n replaceRange(this, from, to, slice);\n return this;\n }\n /**\n Replace the given range with a node, but use `from` and `to` as\n hints, rather than precise positions. When from and to are the same\n and are at the start or end of a parent node in which the given\n node doesn't fit, this method may _move_ them out towards a parent\n that does allow the given node to be placed. When the given range\n completely covers a parent node, this method may completely replace\n that parent node.\n */\n replaceRangeWith(from, to, node) {\n replaceRangeWith(this, from, to, node);\n return this;\n }\n /**\n Delete the given range, expanding it to cover fully covered\n parent nodes until a valid replace is found.\n */\n deleteRange(from, to) {\n deleteRange(this, from, to);\n return this;\n }\n /**\n Split the content in the given range off from its parent, if there\n is sibling content before or after it, and move it up the tree to\n the depth specified by `target`. You'll probably want to use\n [`liftTarget`](https://prosemirror.net/docs/ref/#transform.liftTarget) to compute `target`, to make\n sure the lift is valid.\n */\n lift(range, target) {\n lift(this, range, target);\n return this;\n }\n /**\n Join the blocks around the given position. If depth is 2, their\n last and first siblings are also joined, and so on.\n */\n join(pos, depth = 1) {\n join(this, pos, depth);\n return this;\n }\n /**\n Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.\n The wrappers are assumed to be valid in this position, and should\n probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).\n */\n wrap(range, wrappers) {\n wrap(this, range, wrappers);\n return this;\n }\n /**\n Set the type of all textblocks (partly) between `from` and `to` to\n the given node type with the given attributes.\n */\n setBlockType(from, to = from, type, attrs = null) {\n setBlockType(this, from, to, type, attrs);\n return this;\n }\n /**\n Change the type, attributes, and/or marks of the node at `pos`.\n When `type` isn't given, the existing node type is preserved,\n */\n setNodeMarkup(pos, type, attrs = null, marks) {\n setNodeMarkup(this, pos, type, attrs, marks);\n return this;\n }\n /**\n Set a single attribute on a given node to a new value.\n The `pos` addresses the document content. Use `setDocAttribute`\n to set attributes on the document itself.\n */\n setNodeAttribute(pos, attr, value) {\n this.step(new AttrStep(pos, attr, value));\n return this;\n }\n /**\n Set a single attribute on the document to a new value.\n */\n setDocAttribute(attr, value) {\n this.step(new DocAttrStep(attr, value));\n return this;\n }\n /**\n Add a mark to the node at position `pos`.\n */\n addNodeMark(pos, mark) {\n this.step(new AddNodeMarkStep(pos, mark));\n return this;\n }\n /**\n Remove a mark (or all marks of the given type) from the node at\n position `pos`.\n */\n removeNodeMark(pos, mark) {\n let node = this.doc.nodeAt(pos);\n if (!node)\n throw new RangeError(\"No node at position \" + pos);\n if (mark instanceof Mark) {\n if (mark.isInSet(node.marks))\n this.step(new RemoveNodeMarkStep(pos, mark));\n }\n else {\n let set = node.marks, found, steps = [];\n while (found = mark.isInSet(set)) {\n steps.push(new RemoveNodeMarkStep(pos, found));\n set = found.removeFromSet(set);\n }\n for (let i = steps.length - 1; i >= 0; i--)\n this.step(steps[i]);\n }\n return this;\n }\n /**\n Split the node at the given position, and optionally, if `depth` is\n greater than one, any number of nodes above that. By default, the\n parts split off will inherit the node type of the original node.\n This can be changed by passing an array of types and attributes to\n use after the split (with the outermost nodes coming first).\n */\n split(pos, depth = 1, typesAfter) {\n split(this, pos, depth, typesAfter);\n return this;\n }\n /**\n Add the given mark to the inline content between `from` and `to`.\n */\n addMark(from, to, mark) {\n addMark(this, from, to, mark);\n return this;\n }\n /**\n Remove marks from inline nodes between `from` and `to`. When\n `mark` is a single mark, remove precisely that mark. When it is\n a mark type, remove all marks of that type. When it is null,\n remove all marks of any type.\n */\n removeMark(from, to, mark) {\n removeMark(this, from, to, mark);\n return this;\n }\n /**\n Removes all marks and nodes from the content of the node at\n `pos` that don't match the given new parent node type. Accepts\n an optional starting [content match](https://prosemirror.net/docs/ref/#model.ContentMatch) as\n third argument.\n */\n clearIncompatible(pos, parentType, match) {\n clearIncompatible(this, pos, parentType, match);\n return this;\n }\n}\n\nexport { AddMarkStep, AddNodeMarkStep, AttrStep, DocAttrStep, MapResult, Mapping, RemoveMarkStep, RemoveNodeMarkStep, ReplaceAroundStep, ReplaceStep, Step, StepMap, StepResult, Transform, TransformError, canJoin, canSplit, dropPoint, findWrapping, insertPoint, joinPoint, liftTarget, replaceStep };\n","import { Slice, Fragment, Mark, Node } from 'prosemirror-model';\nimport { ReplaceStep, ReplaceAroundStep, Transform } from 'prosemirror-transform';\n\nconst classesById = Object.create(null);\n/**\nSuperclass for editor selections. Every selection type should\nextend this. Should not be instantiated directly.\n*/\nclass Selection {\n /**\n Initialize a selection with the head and anchor and ranges. If no\n ranges are given, constructs a single range across `$anchor` and\n `$head`.\n */\n constructor(\n /**\n The resolved anchor of the selection (the side that stays in\n place when the selection is modified).\n */\n $anchor, \n /**\n The resolved head of the selection (the side that moves when\n the selection is modified).\n */\n $head, ranges) {\n this.$anchor = $anchor;\n this.$head = $head;\n this.ranges = ranges || [new SelectionRange($anchor.min($head), $anchor.max($head))];\n }\n /**\n The selection's anchor, as an unresolved position.\n */\n get anchor() { return this.$anchor.pos; }\n /**\n The selection's head.\n */\n get head() { return this.$head.pos; }\n /**\n The lower bound of the selection's main range.\n */\n get from() { return this.$from.pos; }\n /**\n The upper bound of the selection's main range.\n */\n get to() { return this.$to.pos; }\n /**\n The resolved lower bound of the selection's main range.\n */\n get $from() {\n return this.ranges[0].$from;\n }\n /**\n The resolved upper bound of the selection's main range.\n */\n get $to() {\n return this.ranges[0].$to;\n }\n /**\n Indicates whether the selection contains any content.\n */\n get empty() {\n let ranges = this.ranges;\n for (let i = 0; i < ranges.length; i++)\n if (ranges[i].$from.pos != ranges[i].$to.pos)\n return false;\n return true;\n }\n /**\n Get the content of this selection as a slice.\n */\n content() {\n return this.$from.doc.slice(this.from, this.to, true);\n }\n /**\n Replace the selection with a slice or, if no slice is given,\n delete the selection. Will append to the given transaction.\n */\n replace(tr, content = Slice.empty) {\n // Put the new selection at the position after the inserted\n // content. When that ended in an inline node, search backwards,\n // to get the position after that node. If not, search forward.\n let lastNode = content.content.lastChild, lastParent = null;\n for (let i = 0; i < content.openEnd; i++) {\n lastParent = lastNode;\n lastNode = lastNode.lastChild;\n }\n let mapFrom = tr.steps.length, ranges = this.ranges;\n for (let i = 0; i < ranges.length; i++) {\n let { $from, $to } = ranges[i], mapping = tr.mapping.slice(mapFrom);\n tr.replaceRange(mapping.map($from.pos), mapping.map($to.pos), i ? Slice.empty : content);\n if (i == 0)\n selectionToInsertionEnd(tr, mapFrom, (lastNode ? lastNode.isInline : lastParent && lastParent.isTextblock) ? -1 : 1);\n }\n }\n /**\n Replace the selection with the given node, appending the changes\n to the given transaction.\n */\n replaceWith(tr, node) {\n let mapFrom = tr.steps.length, ranges = this.ranges;\n for (let i = 0; i < ranges.length; i++) {\n let { $from, $to } = ranges[i], mapping = tr.mapping.slice(mapFrom);\n let from = mapping.map($from.pos), to = mapping.map($to.pos);\n if (i) {\n tr.deleteRange(from, to);\n }\n else {\n tr.replaceRangeWith(from, to, node);\n selectionToInsertionEnd(tr, mapFrom, node.isInline ? -1 : 1);\n }\n }\n }\n /**\n Find a valid cursor or leaf node selection starting at the given\n position and searching back if `dir` is negative, and forward if\n positive. When `textOnly` is true, only consider cursor\n selections. Will return null when no valid selection position is\n found.\n */\n static findFrom($pos, dir, textOnly = false) {\n let inner = $pos.parent.inlineContent ? new TextSelection($pos)\n : findSelectionIn($pos.node(0), $pos.parent, $pos.pos, $pos.index(), dir, textOnly);\n if (inner)\n return inner;\n for (let depth = $pos.depth - 1; depth >= 0; depth--) {\n let found = dir < 0\n ? findSelectionIn($pos.node(0), $pos.node(depth), $pos.before(depth + 1), $pos.index(depth), dir, textOnly)\n : findSelectionIn($pos.node(0), $pos.node(depth), $pos.after(depth + 1), $pos.index(depth) + 1, dir, textOnly);\n if (found)\n return found;\n }\n return null;\n }\n /**\n Find a valid cursor or leaf node selection near the given\n position. Searches forward first by default, but if `bias` is\n negative, it will search backwards first.\n */\n static near($pos, bias = 1) {\n return this.findFrom($pos, bias) || this.findFrom($pos, -bias) || new AllSelection($pos.node(0));\n }\n /**\n Find the cursor or leaf node selection closest to the start of\n the given document. Will return an\n [`AllSelection`](https://prosemirror.net/docs/ref/#state.AllSelection) if no valid position\n exists.\n */\n static atStart(doc) {\n return findSelectionIn(doc, doc, 0, 0, 1) || new AllSelection(doc);\n }\n /**\n Find the cursor or leaf node selection closest to the end of the\n given document.\n */\n static atEnd(doc) {\n return findSelectionIn(doc, doc, doc.content.size, doc.childCount, -1) || new AllSelection(doc);\n }\n /**\n Deserialize the JSON representation of a selection. Must be\n implemented for custom classes (as a static class method).\n */\n static fromJSON(doc, json) {\n if (!json || !json.type)\n throw new RangeError(\"Invalid input for Selection.fromJSON\");\n let cls = classesById[json.type];\n if (!cls)\n throw new RangeError(`No selection type ${json.type} defined`);\n return cls.fromJSON(doc, json);\n }\n /**\n To be able to deserialize selections from JSON, custom selection\n classes must register themselves with an ID string, so that they\n can be disambiguated. Try to pick something that's unlikely to\n clash with classes from other modules.\n */\n static jsonID(id, selectionClass) {\n if (id in classesById)\n throw new RangeError(\"Duplicate use of selection JSON ID \" + id);\n classesById[id] = selectionClass;\n selectionClass.prototype.jsonID = id;\n return selectionClass;\n }\n /**\n Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,\n which is a value that can be mapped without having access to a\n current document, and later resolved to a real selection for a\n given document again. (This is used mostly by the history to\n track and restore old selections.) The default implementation of\n this method just converts the selection to a text selection and\n returns the bookmark for that.\n */\n getBookmark() {\n return TextSelection.between(this.$anchor, this.$head).getBookmark();\n }\n}\nSelection.prototype.visible = true;\n/**\nRepresents a selected range in a document.\n*/\nclass SelectionRange {\n /**\n Create a range.\n */\n constructor(\n /**\n The lower bound of the range.\n */\n $from, \n /**\n The upper bound of the range.\n */\n $to) {\n this.$from = $from;\n this.$to = $to;\n }\n}\nlet warnedAboutTextSelection = false;\nfunction checkTextSelection($pos) {\n if (!warnedAboutTextSelection && !$pos.parent.inlineContent) {\n warnedAboutTextSelection = true;\n console[\"warn\"](\"TextSelection endpoint not pointing into a node with inline content (\" + $pos.parent.type.name + \")\");\n }\n}\n/**\nA text selection represents a classical editor selection, with a\nhead (the moving side) and anchor (immobile side), both of which\npoint into textblock nodes. It can be empty (a regular cursor\nposition).\n*/\nclass TextSelection extends Selection {\n /**\n Construct a text selection between the given points.\n */\n constructor($anchor, $head = $anchor) {\n checkTextSelection($anchor);\n checkTextSelection($head);\n super($anchor, $head);\n }\n /**\n Returns a resolved position if this is a cursor selection (an\n empty text selection), and null otherwise.\n */\n get $cursor() { return this.$anchor.pos == this.$head.pos ? this.$head : null; }\n map(doc, mapping) {\n let $head = doc.resolve(mapping.map(this.head));\n if (!$head.parent.inlineContent)\n return Selection.near($head);\n let $anchor = doc.resolve(mapping.map(this.anchor));\n return new TextSelection($anchor.parent.inlineContent ? $anchor : $head, $head);\n }\n replace(tr, content = Slice.empty) {\n super.replace(tr, content);\n if (content == Slice.empty) {\n let marks = this.$from.marksAcross(this.$to);\n if (marks)\n tr.ensureMarks(marks);\n }\n }\n eq(other) {\n return other instanceof TextSelection && other.anchor == this.anchor && other.head == this.head;\n }\n getBookmark() {\n return new TextBookmark(this.anchor, this.head);\n }\n toJSON() {\n return { type: \"text\", anchor: this.anchor, head: this.head };\n }\n /**\n @internal\n */\n static fromJSON(doc, json) {\n if (typeof json.anchor != \"number\" || typeof json.head != \"number\")\n throw new RangeError(\"Invalid input for TextSelection.fromJSON\");\n return new TextSelection(doc.resolve(json.anchor), doc.resolve(json.head));\n }\n /**\n Create a text selection from non-resolved positions.\n */\n static create(doc, anchor, head = anchor) {\n let $anchor = doc.resolve(anchor);\n return new this($anchor, head == anchor ? $anchor : doc.resolve(head));\n }\n /**\n Return a text selection that spans the given positions or, if\n they aren't text positions, find a text selection near them.\n `bias` determines whether the method searches forward (default)\n or backwards (negative number) first. Will fall back to calling\n [`Selection.near`](https://prosemirror.net/docs/ref/#state.Selection^near) when the document\n doesn't contain a valid text position.\n */\n static between($anchor, $head, bias) {\n let dPos = $anchor.pos - $head.pos;\n if (!bias || dPos)\n bias = dPos >= 0 ? 1 : -1;\n if (!$head.parent.inlineContent) {\n let found = Selection.findFrom($head, bias, true) || Selection.findFrom($head, -bias, true);\n if (found)\n $head = found.$head;\n else\n return Selection.near($head, bias);\n }\n if (!$anchor.parent.inlineContent) {\n if (dPos == 0) {\n $anchor = $head;\n }\n else {\n $anchor = (Selection.findFrom($anchor, -bias, true) || Selection.findFrom($anchor, bias, true)).$anchor;\n if (($anchor.pos < $head.pos) != (dPos < 0))\n $anchor = $head;\n }\n }\n return new TextSelection($anchor, $head);\n }\n}\nSelection.jsonID(\"text\", TextSelection);\nclass TextBookmark {\n constructor(anchor, head) {\n this.anchor = anchor;\n this.head = head;\n }\n map(mapping) {\n return new TextBookmark(mapping.map(this.anchor), mapping.map(this.head));\n }\n resolve(doc) {\n return TextSelection.between(doc.resolve(this.anchor), doc.resolve(this.head));\n }\n}\n/**\nA node selection is a selection that points at a single node. All\nnodes marked [selectable](https://prosemirror.net/docs/ref/#model.NodeSpec.selectable) can be the\ntarget of a node selection. In such a selection, `from` and `to`\npoint directly before and after the selected node, `anchor` equals\n`from`, and `head` equals `to`..\n*/\nclass NodeSelection extends Selection {\n /**\n Create a node selection. Does not verify the validity of its\n argument.\n */\n constructor($pos) {\n let node = $pos.nodeAfter;\n let $end = $pos.node(0).resolve($pos.pos + node.nodeSize);\n super($pos, $end);\n this.node = node;\n }\n map(doc, mapping) {\n let { deleted, pos } = mapping.mapResult(this.anchor);\n let $pos = doc.resolve(pos);\n if (deleted)\n return Selection.near($pos);\n return new NodeSelection($pos);\n }\n content() {\n return new Slice(Fragment.from(this.node), 0, 0);\n }\n eq(other) {\n return other instanceof NodeSelection && other.anchor == this.anchor;\n }\n toJSON() {\n return { type: \"node\", anchor: this.anchor };\n }\n getBookmark() { return new NodeBookmark(this.anchor); }\n /**\n @internal\n */\n static fromJSON(doc, json) {\n if (typeof json.anchor != \"number\")\n throw new RangeError(\"Invalid input for NodeSelection.fromJSON\");\n return new NodeSelection(doc.resolve(json.anchor));\n }\n /**\n Create a node selection from non-resolved positions.\n */\n static create(doc, from) {\n return new NodeSelection(doc.resolve(from));\n }\n /**\n Determines whether the given node may be selected as a node\n selection.\n */\n static isSelectable(node) {\n return !node.isText && node.type.spec.selectable !== false;\n }\n}\nNodeSelection.prototype.visible = false;\nSelection.jsonID(\"node\", NodeSelection);\nclass NodeBookmark {\n constructor(anchor) {\n this.anchor = anchor;\n }\n map(mapping) {\n let { deleted, pos } = mapping.mapResult(this.anchor);\n return deleted ? new TextBookmark(pos, pos) : new NodeBookmark(pos);\n }\n resolve(doc) {\n let $pos = doc.resolve(this.anchor), node = $pos.nodeAfter;\n if (node && NodeSelection.isSelectable(node))\n return new NodeSelection($pos);\n return Selection.near($pos);\n }\n}\n/**\nA selection type that represents selecting the whole document\n(which can not necessarily be expressed with a text selection, when\nthere are for example leaf block nodes at the start or end of the\ndocument).\n*/\nclass AllSelection extends Selection {\n /**\n Create an all-selection over the given document.\n */\n constructor(doc) {\n super(doc.resolve(0), doc.resolve(doc.content.size));\n }\n replace(tr, content = Slice.empty) {\n if (content == Slice.empty) {\n tr.delete(0, tr.doc.content.size);\n let sel = Selection.atStart(tr.doc);\n if (!sel.eq(tr.selection))\n tr.setSelection(sel);\n }\n else {\n super.replace(tr, content);\n }\n }\n toJSON() { return { type: \"all\" }; }\n /**\n @internal\n */\n static fromJSON(doc) { return new AllSelection(doc); }\n map(doc) { return new AllSelection(doc); }\n eq(other) { return other instanceof AllSelection; }\n getBookmark() { return AllBookmark; }\n}\nSelection.jsonID(\"all\", AllSelection);\nconst AllBookmark = {\n map() { return this; },\n resolve(doc) { return new AllSelection(doc); }\n};\n// FIXME we'll need some awareness of text direction when scanning for selections\n// Try to find a selection inside the given node. `pos` points at the\n// position where the search starts. When `text` is true, only return\n// text selections.\nfunction findSelectionIn(doc, node, pos, index, dir, text = false) {\n if (node.inlineContent)\n return TextSelection.create(doc, pos);\n for (let i = index - (dir > 0 ? 0 : 1); dir > 0 ? i < node.childCount : i >= 0; i += dir) {\n let child = node.child(i);\n if (!child.isAtom) {\n let inner = findSelectionIn(doc, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text);\n if (inner)\n return inner;\n }\n else if (!text && NodeSelection.isSelectable(child)) {\n return NodeSelection.create(doc, pos - (dir < 0 ? child.nodeSize : 0));\n }\n pos += child.nodeSize * dir;\n }\n return null;\n}\nfunction selectionToInsertionEnd(tr, startLen, bias) {\n let last = tr.steps.length - 1;\n if (last < startLen)\n return;\n let step = tr.steps[last];\n if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep))\n return;\n let map = tr.mapping.maps[last], end;\n map.forEach((_from, _to, _newFrom, newTo) => { if (end == null)\n end = newTo; });\n tr.setSelection(Selection.near(tr.doc.resolve(end), bias));\n}\n\nconst UPDATED_SEL = 1, UPDATED_MARKS = 2, UPDATED_SCROLL = 4;\n/**\nAn editor state transaction, which can be applied to a state to\ncreate an updated state. Use\n[`EditorState.tr`](https://prosemirror.net/docs/ref/#state.EditorState.tr) to create an instance.\n\nTransactions track changes to the document (they are a subclass of\n[`Transform`](https://prosemirror.net/docs/ref/#transform.Transform)), but also other state changes,\nlike selection updates and adjustments of the set of [stored\nmarks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks). In addition, you can store\nmetadata properties in a transaction, which are extra pieces of\ninformation that client code or plugins can use to describe what a\ntransaction represents, so that they can update their [own\nstate](https://prosemirror.net/docs/ref/#state.StateField) accordingly.\n\nThe [editor view](https://prosemirror.net/docs/ref/#view.EditorView) uses a few metadata\nproperties: it will attach a property `\"pointer\"` with the value\n`true` to selection transactions directly caused by mouse or touch\ninput, a `\"composition\"` property holding an ID identifying the\ncomposition that caused it to transactions caused by composed DOM\ninput, and a `\"uiEvent\"` property of that may be `\"paste\"`,\n`\"cut\"`, or `\"drop\"`.\n*/\nclass Transaction extends Transform {\n /**\n @internal\n */\n constructor(state) {\n super(state.doc);\n // The step count for which the current selection is valid.\n this.curSelectionFor = 0;\n // Bitfield to track which aspects of the state were updated by\n // this transaction.\n this.updated = 0;\n // Object used to store metadata properties for the transaction.\n this.meta = Object.create(null);\n this.time = Date.now();\n this.curSelection = state.selection;\n this.storedMarks = state.storedMarks;\n }\n /**\n The transaction's current selection. This defaults to the editor\n selection [mapped](https://prosemirror.net/docs/ref/#state.Selection.map) through the steps in the\n transaction, but can be overwritten with\n [`setSelection`](https://prosemirror.net/docs/ref/#state.Transaction.setSelection).\n */\n get selection() {\n if (this.curSelectionFor < this.steps.length) {\n this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor));\n this.curSelectionFor = this.steps.length;\n }\n return this.curSelection;\n }\n /**\n Update the transaction's current selection. Will determine the\n selection that the editor gets when the transaction is applied.\n */\n setSelection(selection) {\n if (selection.$from.doc != this.doc)\n throw new RangeError(\"Selection passed to setSelection must point at the current document\");\n this.curSelection = selection;\n this.curSelectionFor = this.steps.length;\n this.updated = (this.updated | UPDATED_SEL) & ~UPDATED_MARKS;\n this.storedMarks = null;\n return this;\n }\n /**\n Whether the selection was explicitly updated by this transaction.\n */\n get selectionSet() {\n return (this.updated & UPDATED_SEL) > 0;\n }\n /**\n Set the current stored marks.\n */\n setStoredMarks(marks) {\n this.storedMarks = marks;\n this.updated |= UPDATED_MARKS;\n return this;\n }\n /**\n Make sure the current stored marks or, if that is null, the marks\n at the selection, match the given set of marks. Does nothing if\n this is already the case.\n */\n ensureMarks(marks) {\n if (!Mark.sameSet(this.storedMarks || this.selection.$from.marks(), marks))\n this.setStoredMarks(marks);\n return this;\n }\n /**\n Add a mark to the set of stored marks.\n */\n addStoredMark(mark) {\n return this.ensureMarks(mark.addToSet(this.storedMarks || this.selection.$head.marks()));\n }\n /**\n Remove a mark or mark type from the set of stored marks.\n */\n removeStoredMark(mark) {\n return this.ensureMarks(mark.removeFromSet(this.storedMarks || this.selection.$head.marks()));\n }\n /**\n Whether the stored marks were explicitly set for this transaction.\n */\n get storedMarksSet() {\n return (this.updated & UPDATED_MARKS) > 0;\n }\n /**\n @internal\n */\n addStep(step, doc) {\n super.addStep(step, doc);\n this.updated = this.updated & ~UPDATED_MARKS;\n this.storedMarks = null;\n }\n /**\n Update the timestamp for the transaction.\n */\n setTime(time) {\n this.time = time;\n return this;\n }\n /**\n Replace the current selection with the given slice.\n */\n replaceSelection(slice) {\n this.selection.replace(this, slice);\n return this;\n }\n /**\n Replace the selection with the given node. When `inheritMarks` is\n true and the content is inline, it inherits the marks from the\n place where it is inserted.\n */\n replaceSelectionWith(node, inheritMarks = true) {\n let selection = this.selection;\n if (inheritMarks)\n node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : (selection.$from.marksAcross(selection.$to) || Mark.none)));\n selection.replaceWith(this, node);\n return this;\n }\n /**\n Delete the selection.\n */\n deleteSelection() {\n this.selection.replace(this);\n return this;\n }\n /**\n Replace the given range, or the selection if no range is given,\n with a text node containing the given string.\n */\n insertText(text, from, to) {\n let schema = this.doc.type.schema;\n if (from == null) {\n if (!text)\n return this.deleteSelection();\n return this.replaceSelectionWith(schema.text(text), true);\n }\n else {\n if (to == null)\n to = from;\n if (!text)\n return this.deleteRange(from, to);\n let marks = this.storedMarks;\n if (!marks) {\n let $from = this.doc.resolve(from);\n marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to));\n }\n this.replaceRangeWith(from, to, schema.text(text, marks));\n if (!this.selection.empty && this.selection.to == from + text.length)\n this.setSelection(Selection.near(this.selection.$to));\n return this;\n }\n }\n /**\n Store a metadata property in this transaction, keyed either by\n name or by plugin.\n */\n setMeta(key, value) {\n this.meta[typeof key == \"string\" ? key : key.key] = value;\n return this;\n }\n /**\n Retrieve a metadata property for a given name or plugin.\n */\n getMeta(key) {\n return this.meta[typeof key == \"string\" ? key : key.key];\n }\n /**\n Returns true if this transaction doesn't contain any metadata,\n and can thus safely be extended.\n */\n get isGeneric() {\n for (let _ in this.meta)\n return false;\n return true;\n }\n /**\n Indicate that the editor should scroll the selection into view\n when updated to the state produced by this transaction.\n */\n scrollIntoView() {\n this.updated |= UPDATED_SCROLL;\n return this;\n }\n /**\n True when this transaction has had `scrollIntoView` called on it.\n */\n get scrolledIntoView() {\n return (this.updated & UPDATED_SCROLL) > 0;\n }\n}\n\nfunction bind(f, self) {\n return !self || !f ? f : f.bind(self);\n}\nclass FieldDesc {\n constructor(name, desc, self) {\n this.name = name;\n this.init = bind(desc.init, self);\n this.apply = bind(desc.apply, self);\n }\n}\nconst baseFields = [\n new FieldDesc(\"doc\", {\n init(config) { return config.doc || config.schema.topNodeType.createAndFill(); },\n apply(tr) { return tr.doc; }\n }),\n new FieldDesc(\"selection\", {\n init(config, instance) { return config.selection || Selection.atStart(instance.doc); },\n apply(tr) { return tr.selection; }\n }),\n new FieldDesc(\"storedMarks\", {\n init(config) { return config.storedMarks || null; },\n apply(tr, _marks, _old, state) { return state.selection.$cursor ? tr.storedMarks : null; }\n }),\n new FieldDesc(\"scrollToSelection\", {\n init() { return 0; },\n apply(tr, prev) { return tr.scrolledIntoView ? prev + 1 : prev; }\n })\n];\n// Object wrapping the part of a state object that stays the same\n// across transactions. Stored in the state's `config` property.\nclass Configuration {\n constructor(schema, plugins) {\n this.schema = schema;\n this.plugins = [];\n this.pluginsByKey = Object.create(null);\n this.fields = baseFields.slice();\n if (plugins)\n plugins.forEach(plugin => {\n if (this.pluginsByKey[plugin.key])\n throw new RangeError(\"Adding different instances of a keyed plugin (\" + plugin.key + \")\");\n this.plugins.push(plugin);\n this.pluginsByKey[plugin.key] = plugin;\n if (plugin.spec.state)\n this.fields.push(new FieldDesc(plugin.key, plugin.spec.state, plugin));\n });\n }\n}\n/**\nThe state of a ProseMirror editor is represented by an object of\nthis type. A state is a persistent data structure—it isn't\nupdated, but rather a new state value is computed from an old one\nusing the [`apply`](https://prosemirror.net/docs/ref/#state.EditorState.apply) method.\n\nA state holds a number of built-in fields, and plugins can\n[define](https://prosemirror.net/docs/ref/#state.PluginSpec.state) additional fields.\n*/\nclass EditorState {\n /**\n @internal\n */\n constructor(\n /**\n @internal\n */\n config) {\n this.config = config;\n }\n /**\n The schema of the state's document.\n */\n get schema() {\n return this.config.schema;\n }\n /**\n The plugins that are active in this state.\n */\n get plugins() {\n return this.config.plugins;\n }\n /**\n Apply the given transaction to produce a new state.\n */\n apply(tr) {\n return this.applyTransaction(tr).state;\n }\n /**\n @internal\n */\n filterTransaction(tr, ignore = -1) {\n for (let i = 0; i < this.config.plugins.length; i++)\n if (i != ignore) {\n let plugin = this.config.plugins[i];\n if (plugin.spec.filterTransaction && !plugin.spec.filterTransaction.call(plugin, tr, this))\n return false;\n }\n return true;\n }\n /**\n Verbose variant of [`apply`](https://prosemirror.net/docs/ref/#state.EditorState.apply) that\n returns the precise transactions that were applied (which might\n be influenced by the [transaction\n hooks](https://prosemirror.net/docs/ref/#state.PluginSpec.filterTransaction) of\n plugins) along with the new state.\n */\n applyTransaction(rootTr) {\n if (!this.filterTransaction(rootTr))\n return { state: this, transactions: [] };\n let trs = [rootTr], newState = this.applyInner(rootTr), seen = null;\n // This loop repeatedly gives plugins a chance to respond to\n // transactions as new transactions are added, making sure to only\n // pass the transactions the plugin did not see before.\n for (;;) {\n let haveNew = false;\n for (let i = 0; i < this.config.plugins.length; i++) {\n let plugin = this.config.plugins[i];\n if (plugin.spec.appendTransaction) {\n let n = seen ? seen[i].n : 0, oldState = seen ? seen[i].state : this;\n let tr = n < trs.length &&\n plugin.spec.appendTransaction.call(plugin, n ? trs.slice(n) : trs, oldState, newState);\n if (tr && newState.filterTransaction(tr, i)) {\n tr.setMeta(\"appendedTransaction\", rootTr);\n if (!seen) {\n seen = [];\n for (let j = 0; j < this.config.plugins.length; j++)\n seen.push(j < i ? { state: newState, n: trs.length } : { state: this, n: 0 });\n }\n trs.push(tr);\n newState = newState.applyInner(tr);\n haveNew = true;\n }\n if (seen)\n seen[i] = { state: newState, n: trs.length };\n }\n }\n if (!haveNew)\n return { state: newState, transactions: trs };\n }\n }\n /**\n @internal\n */\n applyInner(tr) {\n if (!tr.before.eq(this.doc))\n throw new RangeError(\"Applying a mismatched transaction\");\n let newInstance = new EditorState(this.config), fields = this.config.fields;\n for (let i = 0; i < fields.length; i++) {\n let field = fields[i];\n newInstance[field.name] = field.apply(tr, this[field.name], this, newInstance);\n }\n return newInstance;\n }\n /**\n Accessor that constructs and returns a new [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.\n */\n get tr() { return new Transaction(this); }\n /**\n Create a new state.\n */\n static create(config) {\n let $config = new Configuration(config.doc ? config.doc.type.schema : config.schema, config.plugins);\n let instance = new EditorState($config);\n for (let i = 0; i < $config.fields.length; i++)\n instance[$config.fields[i].name] = $config.fields[i].init(config, instance);\n return instance;\n }\n /**\n Create a new state based on this one, but with an adjusted set\n of active plugins. State fields that exist in both sets of\n plugins are kept unchanged. Those that no longer exist are\n dropped, and those that are new are initialized using their\n [`init`](https://prosemirror.net/docs/ref/#state.StateField.init) method, passing in the new\n configuration object..\n */\n reconfigure(config) {\n let $config = new Configuration(this.schema, config.plugins);\n let fields = $config.fields, instance = new EditorState($config);\n for (let i = 0; i < fields.length; i++) {\n let name = fields[i].name;\n instance[name] = this.hasOwnProperty(name) ? this[name] : fields[i].init(config, instance);\n }\n return instance;\n }\n /**\n Serialize this state to JSON. If you want to serialize the state\n of plugins, pass an object mapping property names to use in the\n resulting JSON object to plugin objects. The argument may also be\n a string or number, in which case it is ignored, to support the\n way `JSON.stringify` calls `toString` methods.\n */\n toJSON(pluginFields) {\n let result = { doc: this.doc.toJSON(), selection: this.selection.toJSON() };\n if (this.storedMarks)\n result.storedMarks = this.storedMarks.map(m => m.toJSON());\n if (pluginFields && typeof pluginFields == 'object')\n for (let prop in pluginFields) {\n if (prop == \"doc\" || prop == \"selection\")\n throw new RangeError(\"The JSON fields `doc` and `selection` are reserved\");\n let plugin = pluginFields[prop], state = plugin.spec.state;\n if (state && state.toJSON)\n result[prop] = state.toJSON.call(plugin, this[plugin.key]);\n }\n return result;\n }\n /**\n Deserialize a JSON representation of a state. `config` should\n have at least a `schema` field, and should contain array of\n plugins to initialize the state with. `pluginFields` can be used\n to deserialize the state of plugins, by associating plugin\n instances with the property names they use in the JSON object.\n */\n static fromJSON(config, json, pluginFields) {\n if (!json)\n throw new RangeError(\"Invalid input for EditorState.fromJSON\");\n if (!config.schema)\n throw new RangeError(\"Required config field 'schema' missing\");\n let $config = new Configuration(config.schema, config.plugins);\n let instance = new EditorState($config);\n $config.fields.forEach(field => {\n if (field.name == \"doc\") {\n instance.doc = Node.fromJSON(config.schema, json.doc);\n }\n else if (field.name == \"selection\") {\n instance.selection = Selection.fromJSON(instance.doc, json.selection);\n }\n else if (field.name == \"storedMarks\") {\n if (json.storedMarks)\n instance.storedMarks = json.storedMarks.map(config.schema.markFromJSON);\n }\n else {\n if (pluginFields)\n for (let prop in pluginFields) {\n let plugin = pluginFields[prop], state = plugin.spec.state;\n if (plugin.key == field.name && state && state.fromJSON &&\n Object.prototype.hasOwnProperty.call(json, prop)) {\n instance[field.name] = state.fromJSON.call(plugin, config, json[prop], instance);\n return;\n }\n }\n instance[field.name] = field.init(config, instance);\n }\n });\n return instance;\n }\n}\n\nfunction bindProps(obj, self, target) {\n for (let prop in obj) {\n let val = obj[prop];\n if (val instanceof Function)\n val = val.bind(self);\n else if (prop == \"handleDOMEvents\")\n val = bindProps(val, self, {});\n target[prop] = val;\n }\n return target;\n}\n/**\nPlugins bundle functionality that can be added to an editor.\nThey are part of the [editor state](https://prosemirror.net/docs/ref/#state.EditorState) and\nmay influence that state and the view that contains it.\n*/\nclass Plugin {\n /**\n Create a plugin.\n */\n constructor(\n /**\n The plugin's [spec object](https://prosemirror.net/docs/ref/#state.PluginSpec).\n */\n spec) {\n this.spec = spec;\n /**\n The [props](https://prosemirror.net/docs/ref/#view.EditorProps) exported by this plugin.\n */\n this.props = {};\n if (spec.props)\n bindProps(spec.props, this, this.props);\n this.key = spec.key ? spec.key.key : createKey(\"plugin\");\n }\n /**\n Extract the plugin's state field from an editor state.\n */\n getState(state) { return state[this.key]; }\n}\nconst keys = Object.create(null);\nfunction createKey(name) {\n if (name in keys)\n return name + \"$\" + ++keys[name];\n keys[name] = 0;\n return name + \"$\";\n}\n/**\nA key is used to [tag](https://prosemirror.net/docs/ref/#state.PluginSpec.key) plugins in a way\nthat makes it possible to find them, given an editor state.\nAssigning a key does mean only one plugin of that type can be\nactive in a state.\n*/\nclass PluginKey {\n /**\n Create a plugin key.\n */\n constructor(name = \"key\") { this.key = createKey(name); }\n /**\n Get the active plugin with this key, if any, from an editor\n state.\n */\n get(state) { return state.config.pluginsByKey[this.key]; }\n /**\n Get the plugin's state from an editor state.\n */\n getState(state) { return state[this.key]; }\n}\n\nexport { AllSelection, EditorState, NodeSelection, Plugin, PluginKey, Selection, SelectionRange, TextSelection, Transaction };\n","import type { Editor } from '@tiptap/core'\nimport type { NodeType } from '@tiptap/pm/model'\nimport { TextSelection } from '@tiptap/pm/state'\n\n/**\n * Restructure the blockquote boundary at the caret.\n *\n * Two cases are handled in a single backspace:\n *\n * 1. Caret at the start of a non-first child of a blockquote — lift the\n * current child out, splitting the blockquote around it.\n * 2. Caret at the start of a top-level textblock whose previous sibling is\n * a blockquote with a textblock last child — merge the current\n * textblock's inline content into the blockquote's last textblock\n * instead of letting joinBackward pull the paragraph back inside.\n *\n * Returns true when the backspace was consumed.\n */\nexport const handleBackspace = (editor: Editor, type: NodeType): boolean => {\n const { state, view } = editor\n const { selection } = state\n if (!selection.empty) return false\n\n const { $from } = selection\n if ($from.parentOffset !== 0) return false\n\n const parentDepth = $from.depth - 1\n const parent = $from.node(parentDepth)\n const index = $from.index(parentDepth)\n if (index === 0) return false\n\n // Non-first child of a blockquote: lift to split the blockquote around it.\n if (parent.type === type) {\n return editor.commands.lift(type.name)\n }\n\n // Previous sibling is a blockquote whose last child is a textblock:\n // merge the inline content in instead of letting joinBackward pull the\n // paragraph back inside the blockquote.\n const previous = parent.child(index - 1)\n if (previous.type !== type || !previous.lastChild?.isTextblock) {\n return false\n }\n\n const blockStart = $from.before()\n // `blockStart` sits in the shared parent at the position right after\n // the previous blockquote. In ProseMirror coordinates, each closing\n // token costs one position: step one back to land inside the blockquote\n // right after its last child, then one more to land inside that last\n // child at the end of its inline content.\n const insideBlockquoteEnd = blockStart - 1\n const targetPos = insideBlockquoteEnd - 1\n const { tr } = state\n tr.delete(blockStart, $from.after()).insert(targetPos, $from.parent.content)\n tr.setSelection(TextSelection.create(tr.doc, targetPos))\n view.dispatch(tr.scrollIntoView())\n return true\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,kBAAyD;;;ACCzD,SAAS,cAAc,GAAG,GAAG,KAAK;AAC9B,WAAS,IAAI,KAAI,KAAK;AAClB,QAAI,KAAK,EAAE,cAAc,KAAK,EAAE;AAC5B,aAAO,EAAE,cAAc,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AO;AAAA,MACL,eACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,OAAO,KAAK,IAAI;AAAA,MAClC;AAAA,MACF,kBACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,WAAW,KAAK,IAAI;AAAA,MACtC;AAAA,MACF,iBACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,KAAK,KAAK,IAAI;AAAA,MAChC;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,eAAe,MAAM,KAAK,OAAO,SAAS,iBAAiB;AAAA,MAC3D,WAAW,MAAM,gBAAgB,KAAK,QAAQ,KAAK,IAAI;AAAA,IACzD;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,UACL,+BAAkB;AAAA,QAChB,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;AD1ID,IAAO,gBAAQ;","names":["found","found","i","type","nfa","edge","expr","node","states","parent","TransformError","found"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.d.cts deleted file mode 100644 index 56cc07b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.d.cts +++ /dev/null @@ -1,41 +0,0 @@ -import { Node } from '@tiptap/core'; - -/** @jsxImportSource @tiptap/core */ - -interface BlockquoteOptions { - /** - * HTML attributes to add to the blockquote element - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - blockQuote: { - /** - * Set a blockquote node - */ - setBlockquote: () => ReturnType; - /** - * Toggle a blockquote node - */ - toggleBlockquote: () => ReturnType; - /** - * Unset a blockquote node - */ - unsetBlockquote: () => ReturnType; - }; - } -} -/** - * Matches a blockquote to a `>` as input. - */ -declare const inputRegex: RegExp; -/** - * This extension allows you to create blockquotes. - * @see https://tiptap.dev/api/nodes/blockquote - */ -declare const Blockquote: Node; - -export { Blockquote, type BlockquoteOptions, Blockquote as default, inputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.d.ts deleted file mode 100644 index 56cc07b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Node } from '@tiptap/core'; - -/** @jsxImportSource @tiptap/core */ - -interface BlockquoteOptions { - /** - * HTML attributes to add to the blockquote element - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - blockQuote: { - /** - * Set a blockquote node - */ - setBlockquote: () => ReturnType; - /** - * Toggle a blockquote node - */ - toggleBlockquote: () => ReturnType; - /** - * Unset a blockquote node - */ - unsetBlockquote: () => ReturnType; - }; - } -} -/** - * Matches a blockquote to a `>` as input. - */ -declare const inputRegex: RegExp; -/** - * This extension allows you to create blockquotes. - * @see https://tiptap.dev/api/nodes/blockquote - */ -declare const Blockquote: Node; - -export { Blockquote, type BlockquoteOptions, Blockquote as default, inputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.js deleted file mode 100644 index 1409bc7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.js +++ /dev/null @@ -1,3127 +0,0 @@ -// src/blockquote.tsx -import { mergeAttributes, Node as Node2, wrappingInputRule } from "@tiptap/core"; - -// ../../node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.js -function findDiffStart(a, b, pos) { - for (let i = 0; ; i++) { - if (i == a.childCount || i == b.childCount) - return a.childCount == b.childCount ? null : pos; - let childA = a.child(i), childB = b.child(i); - if (childA == childB) { - pos += childA.nodeSize; - continue; - } - if (!childA.sameMarkup(childB)) - return pos; - if (childA.isText && childA.text != childB.text) { - for (let j = 0; childA.text[j] == childB.text[j]; j++) - pos++; - return pos; - } - if (childA.content.size || childB.content.size) { - let inner = findDiffStart(childA.content, childB.content, pos + 1); - if (inner != null) - return inner; - } - pos += childA.nodeSize; - } -} -function findDiffEnd(a, b, posA, posB) { - for (let iA = a.childCount, iB = b.childCount; ; ) { - if (iA == 0 || iB == 0) - return iA == iB ? null : { a: posA, b: posB }; - let childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize; - if (childA == childB) { - posA -= size; - posB -= size; - continue; - } - if (!childA.sameMarkup(childB)) - return { a: posA, b: posB }; - if (childA.isText && childA.text != childB.text) { - let same = 0, minSize = Math.min(childA.text.length, childB.text.length); - while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) { - same++; - posA--; - posB--; - } - return { a: posA, b: posB }; - } - if (childA.content.size || childB.content.size) { - let inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1); - if (inner) - return inner; - } - posA -= size; - posB -= size; - } -} -var Fragment = class _Fragment { - /** - @internal - */ - constructor(content, size) { - this.content = content; - this.size = size || 0; - if (size == null) - for (let i = 0; i < content.length; i++) - this.size += content[i].nodeSize; - } - /** - Invoke a callback for all descendant nodes between the given two - positions (relative to start of this fragment). Doesn't descend - into a node when the callback returns `false`. - */ - nodesBetween(from, to, f, nodeStart = 0, parent) { - for (let i = 0, pos = 0; pos < to; i++) { - let child = this.content[i], end = pos + child.nodeSize; - if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) { - let start = pos + 1; - child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start); - } - pos = end; - } - } - /** - Call the given callback for every descendant node. `pos` will be - relative to the start of the fragment. The callback may return - `false` to prevent traversal of a given node's children. - */ - descendants(f) { - this.nodesBetween(0, this.size, f); - } - /** - Extract the text between `from` and `to`. See the same method on - [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween). - */ - textBetween(from, to, blockSeparator, leafText) { - let text = "", first = true; - this.nodesBetween(from, to, (node, pos) => { - let nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos) : !node.isLeaf ? "" : leafText ? typeof leafText === "function" ? leafText(node) : leafText : node.type.spec.leafText ? node.type.spec.leafText(node) : ""; - if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) { - if (first) - first = false; - else - text += blockSeparator; - } - text += nodeText; - }, 0); - return text; - } - /** - Create a new fragment containing the combined content of this - fragment and the other. - */ - append(other) { - if (!other.size) - return this; - if (!this.size) - return other; - let last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0; - if (last.isText && last.sameMarkup(first)) { - content[content.length - 1] = last.withText(last.text + first.text); - i = 1; - } - for (; i < other.content.length; i++) - content.push(other.content[i]); - return new _Fragment(content, this.size + other.size); - } - /** - Cut out the sub-fragment between the two given positions. - */ - cut(from, to = this.size) { - if (from == 0 && to == this.size) - return this; - let result = [], size = 0; - if (to > from) - for (let i = 0, pos = 0; pos < to; i++) { - let child = this.content[i], end = pos + child.nodeSize; - if (end > from) { - if (pos < from || end > to) { - if (child.isText) - child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos)); - else - child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1)); - } - result.push(child); - size += child.nodeSize; - } - pos = end; - } - return new _Fragment(result, size); - } - /** - @internal - */ - cutByIndex(from, to) { - if (from == to) - return _Fragment.empty; - if (from == 0 && to == this.content.length) - return this; - return new _Fragment(this.content.slice(from, to)); - } - /** - Create a new fragment in which the node at the given index is - replaced by the given node. - */ - replaceChild(index, node) { - let current = this.content[index]; - if (current == node) - return this; - let copy = this.content.slice(); - let size = this.size + node.nodeSize - current.nodeSize; - copy[index] = node; - return new _Fragment(copy, size); - } - /** - Create a new fragment by prepending the given node to this - fragment. - */ - addToStart(node) { - return new _Fragment([node].concat(this.content), this.size + node.nodeSize); - } - /** - Create a new fragment by appending the given node to this - fragment. - */ - addToEnd(node) { - return new _Fragment(this.content.concat(node), this.size + node.nodeSize); - } - /** - Compare this fragment to another one. - */ - eq(other) { - if (this.content.length != other.content.length) - return false; - for (let i = 0; i < this.content.length; i++) - if (!this.content[i].eq(other.content[i])) - return false; - return true; - } - /** - The first child of the fragment, or `null` if it is empty. - */ - get firstChild() { - return this.content.length ? this.content[0] : null; - } - /** - The last child of the fragment, or `null` if it is empty. - */ - get lastChild() { - return this.content.length ? this.content[this.content.length - 1] : null; - } - /** - The number of child nodes in this fragment. - */ - get childCount() { - return this.content.length; - } - /** - Get the child node at the given index. Raise an error when the - index is out of range. - */ - child(index) { - let found2 = this.content[index]; - if (!found2) - throw new RangeError("Index " + index + " out of range for " + this); - return found2; - } - /** - Get the child node at the given index, if it exists. - */ - maybeChild(index) { - return this.content[index] || null; - } - /** - Call `f` for every child node, passing the node, its offset - into this parent node, and its index. - */ - forEach(f) { - for (let i = 0, p = 0; i < this.content.length; i++) { - let child = this.content[i]; - f(child, p, i); - p += child.nodeSize; - } - } - /** - Find the first position at which this fragment and another - fragment differ, or `null` if they are the same. - */ - findDiffStart(other, pos = 0) { - return findDiffStart(this, other, pos); - } - /** - Find the first position, searching from the end, at which this - fragment and the given fragment differ, or `null` if they are - the same. Since this position will not be the same in both - nodes, an object with two separate positions is returned. - */ - findDiffEnd(other, pos = this.size, otherPos = other.size) { - return findDiffEnd(this, other, pos, otherPos); - } - /** - Find the index and inner offset corresponding to a given relative - position in this fragment. The result object will be reused - (overwritten) the next time the function is called. @internal - */ - findIndex(pos) { - if (pos == 0) - return retIndex(0, pos); - if (pos == this.size) - return retIndex(this.content.length, pos); - if (pos > this.size || pos < 0) - throw new RangeError(`Position ${pos} outside of fragment (${this})`); - for (let i = 0, curPos = 0; ; i++) { - let cur = this.child(i), end = curPos + cur.nodeSize; - if (end >= pos) { - if (end == pos) - return retIndex(i + 1, end); - return retIndex(i, curPos); - } - curPos = end; - } - } - /** - Return a debugging string that describes this fragment. - */ - toString() { - return "<" + this.toStringInner() + ">"; - } - /** - @internal - */ - toStringInner() { - return this.content.join(", "); - } - /** - Create a JSON-serializeable representation of this fragment. - */ - toJSON() { - return this.content.length ? this.content.map((n) => n.toJSON()) : null; - } - /** - Deserialize a fragment from its JSON representation. - */ - static fromJSON(schema, value) { - if (!value) - return _Fragment.empty; - if (!Array.isArray(value)) - throw new RangeError("Invalid input for Fragment.fromJSON"); - return _Fragment.fromArray(value.map(schema.nodeFromJSON)); - } - /** - Build a fragment from an array of nodes. Ensures that adjacent - text nodes with the same marks are joined together. - */ - static fromArray(array) { - if (!array.length) - return _Fragment.empty; - let joined, size = 0; - for (let i = 0; i < array.length; i++) { - let node = array[i]; - size += node.nodeSize; - if (i && node.isText && array[i - 1].sameMarkup(node)) { - if (!joined) - joined = array.slice(0, i); - joined[joined.length - 1] = node.withText(joined[joined.length - 1].text + node.text); - } else if (joined) { - joined.push(node); - } - } - return new _Fragment(joined || array, size); - } - /** - Create a fragment from something that can be interpreted as a - set of nodes. For `null`, it returns the empty fragment. For a - fragment, the fragment itself. For a node or array of nodes, a - fragment containing those nodes. - */ - static from(nodes) { - if (!nodes) - return _Fragment.empty; - if (nodes instanceof _Fragment) - return nodes; - if (Array.isArray(nodes)) - return this.fromArray(nodes); - if (nodes.attrs) - return new _Fragment([nodes], nodes.nodeSize); - throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : "")); - } -}; -Fragment.empty = new Fragment([], 0); -var found = { index: 0, offset: 0 }; -function retIndex(index, offset) { - found.index = index; - found.offset = offset; - return found; -} -function compareDeep(a, b) { - if (a === b) - return true; - if (!(a && typeof a == "object") || !(b && typeof b == "object")) - return false; - let array = Array.isArray(a); - if (Array.isArray(b) != array) - return false; - if (array) { - if (a.length != b.length) - return false; - for (let i = 0; i < a.length; i++) - if (!compareDeep(a[i], b[i])) - return false; - } else { - for (let p in a) - if (!(p in b) || !compareDeep(a[p], b[p])) - return false; - for (let p in b) - if (!(p in a)) - return false; - } - return true; -} -var Mark = class _Mark { - /** - @internal - */ - constructor(type, attrs) { - this.type = type; - this.attrs = attrs; - } - /** - Given a set of marks, create a new set which contains this one as - well, in the right position. If this mark is already in the set, - the set itself is returned. If any marks that are set to be - [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present, - those are replaced by this one. - */ - addToSet(set) { - let copy, placed = false; - for (let i = 0; i < set.length; i++) { - let other = set[i]; - if (this.eq(other)) - return set; - if (this.type.excludes(other.type)) { - if (!copy) - copy = set.slice(0, i); - } else if (other.type.excludes(this.type)) { - return set; - } else { - if (!placed && other.type.rank > this.type.rank) { - if (!copy) - copy = set.slice(0, i); - copy.push(this); - placed = true; - } - if (copy) - copy.push(other); - } - } - if (!copy) - copy = set.slice(); - if (!placed) - copy.push(this); - return copy; - } - /** - Remove this mark from the given set, returning a new set. If this - mark is not in the set, the set itself is returned. - */ - removeFromSet(set) { - for (let i = 0; i < set.length; i++) - if (this.eq(set[i])) - return set.slice(0, i).concat(set.slice(i + 1)); - return set; - } - /** - Test whether this mark is in the given set of marks. - */ - isInSet(set) { - for (let i = 0; i < set.length; i++) - if (this.eq(set[i])) - return true; - return false; - } - /** - Test whether this mark has the same type and attributes as - another mark. - */ - eq(other) { - return this == other || this.type == other.type && compareDeep(this.attrs, other.attrs); - } - /** - Convert this mark to a JSON-serializeable representation. - */ - toJSON() { - let obj = { type: this.type.name }; - for (let _ in this.attrs) { - obj.attrs = this.attrs; - break; - } - return obj; - } - /** - Deserialize a mark from JSON. - */ - static fromJSON(schema, json) { - if (!json) - throw new RangeError("Invalid input for Mark.fromJSON"); - let type = schema.marks[json.type]; - if (!type) - throw new RangeError(`There is no mark type ${json.type} in this schema`); - let mark = type.create(json.attrs); - type.checkAttrs(mark.attrs); - return mark; - } - /** - Test whether two sets of marks are identical. - */ - static sameSet(a, b) { - if (a == b) - return true; - if (a.length != b.length) - return false; - for (let i = 0; i < a.length; i++) - if (!a[i].eq(b[i])) - return false; - return true; - } - /** - Create a properly sorted mark set from null, a single mark, or an - unsorted array of marks. - */ - static setFrom(marks) { - if (!marks || Array.isArray(marks) && marks.length == 0) - return _Mark.none; - if (marks instanceof _Mark) - return [marks]; - let copy = marks.slice(); - copy.sort((a, b) => a.type.rank - b.type.rank); - return copy; - } -}; -Mark.none = []; -var ReplaceError = class extends Error { -}; -var Slice = class _Slice { - /** - Create a slice. When specifying a non-zero open depth, you must - make sure that there are nodes of at least that depth at the - appropriate side of the fragment—i.e. if the fragment is an - empty paragraph node, `openStart` and `openEnd` can't be greater - than 1. - - It is not necessary for the content of open nodes to conform to - the schema's content constraints, though it should be a valid - start/end/middle for such a node, depending on which sides are - open. - */ - constructor(content, openStart, openEnd) { - this.content = content; - this.openStart = openStart; - this.openEnd = openEnd; - } - /** - The size this slice would add when inserted into a document. - */ - get size() { - return this.content.size - this.openStart - this.openEnd; - } - /** - @internal - */ - insertAt(pos, fragment) { - let content = insertInto(this.content, pos + this.openStart, fragment, this.openStart + 1, this.openEnd + 1); - return content && new _Slice(content, this.openStart, this.openEnd); - } - /** - @internal - */ - removeBetween(from, to) { - return new _Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd); - } - /** - Tests whether this slice is equal to another slice. - */ - eq(other) { - return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd; - } - /** - @internal - */ - toString() { - return this.content + "(" + this.openStart + "," + this.openEnd + ")"; - } - /** - Convert a slice to a JSON-serializable representation. - */ - toJSON() { - if (!this.content.size) - return null; - let json = { content: this.content.toJSON() }; - if (this.openStart > 0) - json.openStart = this.openStart; - if (this.openEnd > 0) - json.openEnd = this.openEnd; - return json; - } - /** - Deserialize a slice from its JSON representation. - */ - static fromJSON(schema, json) { - if (!json) - return _Slice.empty; - let openStart = json.openStart || 0, openEnd = json.openEnd || 0; - if (typeof openStart != "number" || typeof openEnd != "number") - throw new RangeError("Invalid input for Slice.fromJSON"); - return new _Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd); - } - /** - Create a slice from a fragment by taking the maximum possible - open value on both side of the fragment. - */ - static maxOpen(fragment, openIsolating = true) { - let openStart = 0, openEnd = 0; - for (let n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild) - openStart++; - for (let n = fragment.lastChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.lastChild) - openEnd++; - return new _Slice(fragment, openStart, openEnd); - } -}; -Slice.empty = new Slice(Fragment.empty, 0, 0); -function removeRange(content, from, to) { - let { index, offset } = content.findIndex(from), child = content.maybeChild(index); - let { index: indexTo, offset: offsetTo } = content.findIndex(to); - if (offset == from || child.isText) { - if (offsetTo != to && !content.child(indexTo).isText) - throw new RangeError("Removing non-flat range"); - return content.cut(0, from).append(content.cut(to)); - } - if (index != indexTo) - throw new RangeError("Removing non-flat range"); - return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1))); -} -function insertInto(content, dist, insert, openStart, openEnd, parent) { - let { index, offset } = content.findIndex(dist), child = content.maybeChild(index); - if (offset == dist || child.isText) { - if (parent && openStart <= 0 && openEnd <= 0 && !parent.canReplace(index, index, insert)) - return null; - return content.cut(0, dist).append(insert).append(content.cut(dist)); - } - let inner = insertInto(child.content, dist - offset - 1, insert, index == 0 ? openStart - 1 : 0, index == content.childCount - 1 ? openEnd - 1 : 0, child); - return inner && content.replaceChild(index, child.copy(inner)); -} -function replace($from, $to, slice) { - if (slice.openStart > $from.depth) - throw new ReplaceError("Inserted content deeper than insertion position"); - if ($from.depth - slice.openStart != $to.depth - slice.openEnd) - throw new ReplaceError("Inconsistent open depths"); - return replaceOuter($from, $to, slice, 0); -} -function replaceOuter($from, $to, slice, depth) { - let index = $from.index(depth), node = $from.node(depth); - if (index == $to.index(depth) && depth < $from.depth - slice.openStart) { - let inner = replaceOuter($from, $to, slice, depth + 1); - return node.copy(node.content.replaceChild(index, inner)); - } else if (!slice.content.size) { - return close(node, replaceTwoWay($from, $to, depth)); - } else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { - let parent = $from.parent, content = parent.content; - return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset))); - } else { - let { start, end } = prepareSliceForReplace(slice, $from); - return close(node, replaceThreeWay($from, start, end, $to, depth)); - } -} -function checkJoin(main, sub) { - if (!sub.type.compatibleContent(main.type)) - throw new ReplaceError("Cannot join " + sub.type.name + " onto " + main.type.name); -} -function joinable($before, $after, depth) { - let node = $before.node(depth); - checkJoin(node, $after.node(depth)); - return node; -} -function addNode(child, target) { - let last = target.length - 1; - if (last >= 0 && child.isText && child.sameMarkup(target[last])) - target[last] = child.withText(target[last].text + child.text); - else - target.push(child); -} -function addRange($start, $end, depth, target) { - let node = ($end || $start).node(depth); - let startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount; - if ($start) { - startIndex = $start.index(depth); - if ($start.depth > depth) { - startIndex++; - } else if ($start.textOffset) { - addNode($start.nodeAfter, target); - startIndex++; - } - } - for (let i = startIndex; i < endIndex; i++) - addNode(node.child(i), target); - if ($end && $end.depth == depth && $end.textOffset) - addNode($end.nodeBefore, target); -} -function close(node, content) { - node.type.checkContent(content); - return node.copy(content); -} -function replaceThreeWay($from, $start, $end, $to, depth) { - let openStart = $from.depth > depth && joinable($from, $start, depth + 1); - let openEnd = $to.depth > depth && joinable($end, $to, depth + 1); - let content = []; - addRange(null, $from, depth, content); - if (openStart && openEnd && $start.index(depth) == $end.index(depth)) { - checkJoin(openStart, openEnd); - addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content); - } else { - if (openStart) - addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content); - addRange($start, $end, depth, content); - if (openEnd) - addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content); - } - addRange($to, null, depth, content); - return new Fragment(content); -} -function replaceTwoWay($from, $to, depth) { - let content = []; - addRange(null, $from, depth, content); - if ($from.depth > depth) { - let type = joinable($from, $to, depth + 1); - addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content); - } - addRange($to, null, depth, content); - return new Fragment(content); -} -function prepareSliceForReplace(slice, $along) { - let extra = $along.depth - slice.openStart, parent = $along.node(extra); - let node = parent.copy(slice.content); - for (let i = extra - 1; i >= 0; i--) - node = $along.node(i).copy(Fragment.from(node)); - return { - start: node.resolveNoCache(slice.openStart + extra), - end: node.resolveNoCache(node.content.size - slice.openEnd - extra) - }; -} -var ResolvedPos = class _ResolvedPos { - /** - @internal - */ - constructor(pos, path, parentOffset) { - this.pos = pos; - this.path = path; - this.parentOffset = parentOffset; - this.depth = path.length / 3 - 1; - } - /** - @internal - */ - resolveDepth(val) { - if (val == null) - return this.depth; - if (val < 0) - return this.depth + val; - return val; - } - /** - The parent node that the position points into. Note that even if - a position points into a text node, that node is not considered - the parent—text nodes are ‘flat’ in this model, and have no content. - */ - get parent() { - return this.node(this.depth); - } - /** - The root node in which the position was resolved. - */ - get doc() { - return this.node(0); - } - /** - The ancestor node at the given level. `p.node(p.depth)` is the - same as `p.parent`. - */ - node(depth) { - return this.path[this.resolveDepth(depth) * 3]; - } - /** - The index into the ancestor at the given level. If this points - at the 3rd node in the 2nd paragraph on the top level, for - example, `p.index(0)` is 1 and `p.index(1)` is 2. - */ - index(depth) { - return this.path[this.resolveDepth(depth) * 3 + 1]; - } - /** - The index pointing after this position into the ancestor at the - given level. - */ - indexAfter(depth) { - depth = this.resolveDepth(depth); - return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1); - } - /** - The (absolute) position at the start of the node at the given - level. - */ - start(depth) { - depth = this.resolveDepth(depth); - return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; - } - /** - The (absolute) position at the end of the node at the given - level. - */ - end(depth) { - depth = this.resolveDepth(depth); - return this.start(depth) + this.node(depth).content.size; - } - /** - The (absolute) position directly before the wrapping node at the - given level, or, when `depth` is `this.depth + 1`, the original - position. - */ - before(depth) { - depth = this.resolveDepth(depth); - if (!depth) - throw new RangeError("There is no position before the top-level node"); - return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1]; - } - /** - The (absolute) position directly after the wrapping node at the - given level, or the original position when `depth` is `this.depth + 1`. - */ - after(depth) { - depth = this.resolveDepth(depth); - if (!depth) - throw new RangeError("There is no position after the top-level node"); - return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize; - } - /** - When this position points into a text node, this returns the - distance between the position and the start of the text node. - Will be zero for positions that point between nodes. - */ - get textOffset() { - return this.pos - this.path[this.path.length - 1]; - } - /** - Get the node directly after the position, if any. If the position - points into a text node, only the part of that node after the - position is returned. - */ - get nodeAfter() { - let parent = this.parent, index = this.index(this.depth); - if (index == parent.childCount) - return null; - let dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index); - return dOff ? parent.child(index).cut(dOff) : child; - } - /** - Get the node directly before the position, if any. If the - position points into a text node, only the part of that node - before the position is returned. - */ - get nodeBefore() { - let index = this.index(this.depth); - let dOff = this.pos - this.path[this.path.length - 1]; - if (dOff) - return this.parent.child(index).cut(0, dOff); - return index == 0 ? null : this.parent.child(index - 1); - } - /** - Get the position at the given index in the parent node at the - given depth (which defaults to `this.depth`). - */ - posAtIndex(index, depth) { - depth = this.resolveDepth(depth); - let node = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; - for (let i = 0; i < index; i++) - pos += node.child(i).nodeSize; - return pos; - } - /** - Get the marks at this position, factoring in the surrounding - marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the - position is at the start of a non-empty node, the marks of the - node after it (if any) are returned. - */ - marks() { - let parent = this.parent, index = this.index(); - if (parent.content.size == 0) - return Mark.none; - if (this.textOffset) - return parent.child(index).marks; - let main = parent.maybeChild(index - 1), other = parent.maybeChild(index); - if (!main) { - let tmp = main; - main = other; - other = tmp; - } - let marks = main.marks; - for (var i = 0; i < marks.length; i++) - if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks))) - marks = marks[i--].removeFromSet(marks); - return marks; - } - /** - Get the marks after the current position, if any, except those - that are non-inclusive and not present at position `$end`. This - is mostly useful for getting the set of marks to preserve after a - deletion. Will return `null` if this position is at the end of - its parent node or its parent node isn't a textblock (in which - case no marks should be preserved). - */ - marksAcross($end) { - let after = this.parent.maybeChild(this.index()); - if (!after || !after.isInline) - return null; - let marks = after.marks, next = $end.parent.maybeChild($end.index()); - for (var i = 0; i < marks.length; i++) - if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks))) - marks = marks[i--].removeFromSet(marks); - return marks; - } - /** - The depth up to which this position and the given (non-resolved) - position share the same parent nodes. - */ - sharedDepth(pos) { - for (let depth = this.depth; depth > 0; depth--) - if (this.start(depth) <= pos && this.end(depth) >= pos) - return depth; - return 0; - } - /** - Returns a range based on the place where this position and the - given position diverge around block content. If both point into - the same textblock, for example, a range around that textblock - will be returned. If they point into different blocks, the range - around those blocks in their shared ancestor is returned. You can - pass in an optional predicate that will be called with a parent - node to see if a range into that parent is acceptable. - */ - blockRange(other = this, pred) { - if (other.pos < this.pos) - return other.blockRange(this); - for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--) - if (other.pos <= this.end(d) && (!pred || pred(this.node(d)))) - return new NodeRange(this, other, d); - return null; - } - /** - Query whether the given position shares the same parent node. - */ - sameParent(other) { - return this.pos - this.parentOffset == other.pos - other.parentOffset; - } - /** - Return the greater of this and the given position. - */ - max(other) { - return other.pos > this.pos ? other : this; - } - /** - Return the smaller of this and the given position. - */ - min(other) { - return other.pos < this.pos ? other : this; - } - /** - @internal - */ - toString() { - let str = ""; - for (let i = 1; i <= this.depth; i++) - str += (str ? "/" : "") + this.node(i).type.name + "_" + this.index(i - 1); - return str + ":" + this.parentOffset; - } - /** - @internal - */ - static resolve(doc, pos) { - if (!(pos >= 0 && pos <= doc.content.size)) - throw new RangeError("Position " + pos + " out of range"); - let path = []; - let start = 0, parentOffset = pos; - for (let node = doc; ; ) { - let { index, offset } = node.content.findIndex(parentOffset); - let rem = parentOffset - offset; - path.push(node, index, start + offset); - if (!rem) - break; - node = node.child(index); - if (node.isText) - break; - parentOffset = rem - 1; - start += offset + 1; - } - return new _ResolvedPos(pos, path, parentOffset); - } - /** - @internal - */ - static resolveCached(doc, pos) { - let cache = resolveCache.get(doc); - if (cache) { - for (let i = 0; i < cache.elts.length; i++) { - let elt = cache.elts[i]; - if (elt.pos == pos) - return elt; - } - } else { - resolveCache.set(doc, cache = new ResolveCache()); - } - let result = cache.elts[cache.i] = _ResolvedPos.resolve(doc, pos); - cache.i = (cache.i + 1) % resolveCacheSize; - return result; - } -}; -var ResolveCache = class { - constructor() { - this.elts = []; - this.i = 0; - } -}; -var resolveCacheSize = 12; -var resolveCache = /* @__PURE__ */ new WeakMap(); -var NodeRange = class { - /** - Construct a node range. `$from` and `$to` should point into the - same node until at least the given `depth`, since a node range - denotes an adjacent set of nodes in a single parent node. - */ - constructor($from, $to, depth) { - this.$from = $from; - this.$to = $to; - this.depth = depth; - } - /** - The position at the start of the range. - */ - get start() { - return this.$from.before(this.depth + 1); - } - /** - The position at the end of the range. - */ - get end() { - return this.$to.after(this.depth + 1); - } - /** - The parent node that the range points into. - */ - get parent() { - return this.$from.node(this.depth); - } - /** - The start index of the range in the parent node. - */ - get startIndex() { - return this.$from.index(this.depth); - } - /** - The end index of the range in the parent node. - */ - get endIndex() { - return this.$to.indexAfter(this.depth); - } -}; -var emptyAttrs = /* @__PURE__ */ Object.create(null); -var Node = class _Node { - /** - @internal - */ - constructor(type, attrs, content, marks = Mark.none) { - this.type = type; - this.attrs = attrs; - this.marks = marks; - this.content = content || Fragment.empty; - } - /** - The array of this node's child nodes. - */ - get children() { - return this.content.content; - } - /** - The size of this node, as defined by the integer-based [indexing - scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the - amount of characters. For other leaf nodes, it is one. For - non-leaf nodes, it is the size of the content plus two (the - start and end token). - */ - get nodeSize() { - return this.isLeaf ? 1 : 2 + this.content.size; - } - /** - The number of children that the node has. - */ - get childCount() { - return this.content.childCount; - } - /** - Get the child node at the given index. Raises an error when the - index is out of range. - */ - child(index) { - return this.content.child(index); - } - /** - Get the child node at the given index, if it exists. - */ - maybeChild(index) { - return this.content.maybeChild(index); - } - /** - Call `f` for every child node, passing the node, its offset - into this parent node, and its index. - */ - forEach(f) { - this.content.forEach(f); - } - /** - Invoke a callback for all descendant nodes recursively overlapping - the given two positions that are relative to start of this - node's content. This includes all ancestors of the nodes - containing the two positions. The callback is invoked with the - node, its position relative to the original node (method receiver), - its parent node, and its child index. When the callback returns - false for a given node, that node's children will not be - recursed over. The last parameter can be used to specify a - starting position to count from. - */ - nodesBetween(from, to, f, startPos = 0) { - this.content.nodesBetween(from, to, f, startPos, this); - } - /** - Call the given callback for every descendant node. Doesn't - descend into a node when the callback returns `false`. - */ - descendants(f) { - this.nodesBetween(0, this.content.size, f); - } - /** - Concatenates all the text nodes found in this fragment and its - children. - */ - get textContent() { - return this.isLeaf && this.type.spec.leafText ? this.type.spec.leafText(this) : this.textBetween(0, this.content.size, ""); - } - /** - Get all text between positions `from` and `to`. When - `blockSeparator` is given, it will be inserted to separate text - from different block nodes. If `leafText` is given, it'll be - inserted for every non-text leaf node encountered, otherwise - [`leafText`](https://prosemirror.net/docs/ref/#model.NodeSpec.leafText) will be used. - */ - textBetween(from, to, blockSeparator, leafText) { - return this.content.textBetween(from, to, blockSeparator, leafText); - } - /** - Returns this node's first child, or `null` if there are no - children. - */ - get firstChild() { - return this.content.firstChild; - } - /** - Returns this node's last child, or `null` if there are no - children. - */ - get lastChild() { - return this.content.lastChild; - } - /** - Test whether two nodes represent the same piece of document. - */ - eq(other) { - return this == other || this.sameMarkup(other) && this.content.eq(other.content); - } - /** - Compare the markup (type, attributes, and marks) of this node to - those of another. Returns `true` if both have the same markup. - */ - sameMarkup(other) { - return this.hasMarkup(other.type, other.attrs, other.marks); - } - /** - Check whether this node's markup correspond to the given type, - attributes, and marks. - */ - hasMarkup(type, attrs, marks) { - return this.type == type && compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) && Mark.sameSet(this.marks, marks || Mark.none); - } - /** - Create a new node with the same markup as this node, containing - the given content (or empty, if no content is given). - */ - copy(content = null) { - if (content == this.content) - return this; - return new _Node(this.type, this.attrs, content, this.marks); - } - /** - Create a copy of this node, with the given set of marks instead - of the node's own marks. - */ - mark(marks) { - return marks == this.marks ? this : new _Node(this.type, this.attrs, this.content, marks); - } - /** - Create a copy of this node with only the content between the - given positions. If `to` is not given, it defaults to the end of - the node. - */ - cut(from, to = this.content.size) { - if (from == 0 && to == this.content.size) - return this; - return this.copy(this.content.cut(from, to)); - } - /** - Cut out the part of the document between the given positions, and - return it as a `Slice` object. - */ - slice(from, to = this.content.size, includeParents = false) { - if (from == to) - return Slice.empty; - let $from = this.resolve(from), $to = this.resolve(to); - let depth = includeParents ? 0 : $from.sharedDepth(to); - let start = $from.start(depth), node = $from.node(depth); - let content = node.content.cut($from.pos - start, $to.pos - start); - return new Slice(content, $from.depth - depth, $to.depth - depth); - } - /** - Replace the part of the document between the given positions with - the given slice. The slice must 'fit', meaning its open sides - must be able to connect to the surrounding content, and its - content nodes must be valid children for the node they are placed - into. If any of this is violated, an error of type - [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown. - */ - replace(from, to, slice) { - return replace(this.resolve(from), this.resolve(to), slice); - } - /** - Find the node directly after the given position. - */ - nodeAt(pos) { - for (let node = this; ; ) { - let { index, offset } = node.content.findIndex(pos); - node = node.maybeChild(index); - if (!node) - return null; - if (offset == pos || node.isText) - return node; - pos -= offset + 1; - } - } - /** - Find the (direct) child node after the given offset, if any, - and return it along with its index and offset relative to this - node. - */ - childAfter(pos) { - let { index, offset } = this.content.findIndex(pos); - return { node: this.content.maybeChild(index), index, offset }; - } - /** - Find the (direct) child node before the given offset, if any, - and return it along with its index and offset relative to this - node. - */ - childBefore(pos) { - if (pos == 0) - return { node: null, index: 0, offset: 0 }; - let { index, offset } = this.content.findIndex(pos); - if (offset < pos) - return { node: this.content.child(index), index, offset }; - let node = this.content.child(index - 1); - return { node, index: index - 1, offset: offset - node.nodeSize }; - } - /** - Resolve the given position in the document, returning an - [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context. - */ - resolve(pos) { - return ResolvedPos.resolveCached(this, pos); - } - /** - @internal - */ - resolveNoCache(pos) { - return ResolvedPos.resolve(this, pos); - } - /** - Test whether a given mark or mark type occurs in this document - between the two given positions. - */ - rangeHasMark(from, to, type) { - let found2 = false; - if (to > from) - this.nodesBetween(from, to, (node) => { - if (type.isInSet(node.marks)) - found2 = true; - return !found2; - }); - return found2; - } - /** - True when this is a block (non-inline node) - */ - get isBlock() { - return this.type.isBlock; - } - /** - True when this is a textblock node, a block node with inline - content. - */ - get isTextblock() { - return this.type.isTextblock; - } - /** - True when this node allows inline content. - */ - get inlineContent() { - return this.type.inlineContent; - } - /** - True when this is an inline node (a text node or a node that can - appear among text). - */ - get isInline() { - return this.type.isInline; - } - /** - True when this is a text node. - */ - get isText() { - return this.type.isText; - } - /** - True when this is a leaf node. - */ - get isLeaf() { - return this.type.isLeaf; - } - /** - True when this is an atom, i.e. when it does not have directly - editable content. This is usually the same as `isLeaf`, but can - be configured with the [`atom` property](https://prosemirror.net/docs/ref/#model.NodeSpec.atom) - on a node's spec (typically used when the node is displayed as - an uneditable [node view](https://prosemirror.net/docs/ref/#view.NodeView)). - */ - get isAtom() { - return this.type.isAtom; - } - /** - Return a string representation of this node for debugging - purposes. - */ - toString() { - if (this.type.spec.toDebugString) - return this.type.spec.toDebugString(this); - let name = this.type.name; - if (this.content.size) - name += "(" + this.content.toStringInner() + ")"; - return wrapMarks(this.marks, name); - } - /** - Get the content match in this node at the given index. - */ - contentMatchAt(index) { - let match = this.type.contentMatch.matchFragment(this.content, 0, index); - if (!match) - throw new Error("Called contentMatchAt on a node with invalid content"); - return match; - } - /** - Test whether replacing the range between `from` and `to` (by - child index) with the given replacement fragment (which defaults - to the empty fragment) would leave the node's content valid. You - can optionally pass `start` and `end` indices into the - replacement fragment. - */ - canReplace(from, to, replacement = Fragment.empty, start = 0, end = replacement.childCount) { - let one = this.contentMatchAt(from).matchFragment(replacement, start, end); - let two = one && one.matchFragment(this.content, to); - if (!two || !two.validEnd) - return false; - for (let i = start; i < end; i++) - if (!this.type.allowsMarks(replacement.child(i).marks)) - return false; - return true; - } - /** - Test whether replacing the range `from` to `to` (by index) with - a node of the given type would leave the node's content valid. - */ - canReplaceWith(from, to, type, marks) { - if (marks && !this.type.allowsMarks(marks)) - return false; - let start = this.contentMatchAt(from).matchType(type); - let end = start && start.matchFragment(this.content, to); - return end ? end.validEnd : false; - } - /** - Test whether the given node's content could be appended to this - node. If that node is empty, this will only return true if there - is at least one node type that can appear in both nodes (to avoid - merging completely incompatible nodes). - */ - canAppend(other) { - if (other.content.size) - return this.canReplace(this.childCount, this.childCount, other.content); - else - return this.type.compatibleContent(other.type); - } - /** - Check whether this node and its descendants conform to the - schema, and raise an exception when they do not. - */ - check() { - this.type.checkContent(this.content); - this.type.checkAttrs(this.attrs); - let copy = Mark.none; - for (let i = 0; i < this.marks.length; i++) { - let mark = this.marks[i]; - mark.type.checkAttrs(mark.attrs); - copy = mark.addToSet(copy); - } - if (!Mark.sameSet(copy, this.marks)) - throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((m) => m.type.name)}`); - this.content.forEach((node) => node.check()); - } - /** - Return a JSON-serializeable representation of this node. - */ - toJSON() { - let obj = { type: this.type.name }; - for (let _ in this.attrs) { - obj.attrs = this.attrs; - break; - } - if (this.content.size) - obj.content = this.content.toJSON(); - if (this.marks.length) - obj.marks = this.marks.map((n) => n.toJSON()); - return obj; - } - /** - Deserialize a node from its JSON representation. - */ - static fromJSON(schema, json) { - if (!json) - throw new RangeError("Invalid input for Node.fromJSON"); - let marks = void 0; - if (json.marks) { - if (!Array.isArray(json.marks)) - throw new RangeError("Invalid mark data for Node.fromJSON"); - marks = json.marks.map(schema.markFromJSON); - } - if (json.type == "text") { - if (typeof json.text != "string") - throw new RangeError("Invalid text node in JSON"); - return schema.text(json.text, marks); - } - let content = Fragment.fromJSON(schema, json.content); - let node = schema.nodeType(json.type).create(json.attrs, content, marks); - node.type.checkAttrs(node.attrs); - return node; - } -}; -Node.prototype.text = void 0; -function wrapMarks(marks, str) { - for (let i = marks.length - 1; i >= 0; i--) - str = marks[i].type.name + "(" + str + ")"; - return str; -} -var ContentMatch = class _ContentMatch { - /** - @internal - */ - constructor(validEnd) { - this.validEnd = validEnd; - this.next = []; - this.wrapCache = []; - } - /** - @internal - */ - static parse(string, nodeTypes) { - let stream = new TokenStream(string, nodeTypes); - if (stream.next == null) - return _ContentMatch.empty; - let expr = parseExpr(stream); - if (stream.next) - stream.err("Unexpected trailing text"); - let match = dfa(nfa(expr)); - checkForDeadEnds(match, stream); - return match; - } - /** - Match a node type, returning a match after that node if - successful. - */ - matchType(type) { - for (let i = 0; i < this.next.length; i++) - if (this.next[i].type == type) - return this.next[i].next; - return null; - } - /** - Try to match a fragment. Returns the resulting match when - successful. - */ - matchFragment(frag, start = 0, end = frag.childCount) { - let cur = this; - for (let i = start; cur && i < end; i++) - cur = cur.matchType(frag.child(i).type); - return cur; - } - /** - @internal - */ - get inlineContent() { - return this.next.length != 0 && this.next[0].type.isInline; - } - /** - Get the first matching node type at this match position that can - be generated. - */ - get defaultType() { - for (let i = 0; i < this.next.length; i++) { - let { type } = this.next[i]; - if (!(type.isText || type.hasRequiredAttrs())) - return type; - } - return null; - } - /** - @internal - */ - compatible(other) { - for (let i = 0; i < this.next.length; i++) - for (let j = 0; j < other.next.length; j++) - if (this.next[i].type == other.next[j].type) - return true; - return false; - } - /** - Try to match the given fragment, and if that fails, see if it can - be made to match by inserting nodes in front of it. When - successful, return a fragment of inserted nodes (which may be - empty if nothing had to be inserted). When `toEnd` is true, only - return a fragment if the resulting match goes to the end of the - content expression. - */ - fillBefore(after, toEnd = false, startIndex = 0) { - let seen = [this]; - function search(match, types) { - let finished = match.matchFragment(after, startIndex); - if (finished && (!toEnd || finished.validEnd)) - return Fragment.from(types.map((tp) => tp.createAndFill())); - for (let i = 0; i < match.next.length; i++) { - let { type, next } = match.next[i]; - if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) { - seen.push(next); - let found2 = search(next, types.concat(type)); - if (found2) - return found2; - } - } - return null; - } - return search(this, []); - } - /** - Find a set of wrapping node types that would allow a node of the - given type to appear at this position. The result may be empty - (when it fits directly) and will be null when no such wrapping - exists. - */ - findWrapping(target) { - for (let i = 0; i < this.wrapCache.length; i += 2) - if (this.wrapCache[i] == target) - return this.wrapCache[i + 1]; - let computed = this.computeWrapping(target); - this.wrapCache.push(target, computed); - return computed; - } - /** - @internal - */ - computeWrapping(target) { - let seen = /* @__PURE__ */ Object.create(null), active = [{ match: this, type: null, via: null }]; - while (active.length) { - let current = active.shift(), match = current.match; - if (match.matchType(target)) { - let result = []; - for (let obj = current; obj.type; obj = obj.via) - result.push(obj.type); - return result.reverse(); - } - for (let i = 0; i < match.next.length; i++) { - let { type, next } = match.next[i]; - if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) { - active.push({ match: type.contentMatch, type, via: current }); - seen[type.name] = true; - } - } - } - return null; - } - /** - The number of outgoing edges this node has in the finite - automaton that describes the content expression. - */ - get edgeCount() { - return this.next.length; - } - /** - Get the _n_​th outgoing edge from this node in the finite - automaton that describes the content expression. - */ - edge(n) { - if (n >= this.next.length) - throw new RangeError(`There's no ${n}th edge in this content match`); - return this.next[n]; - } - /** - @internal - */ - toString() { - let seen = []; - function scan(m) { - seen.push(m); - for (let i = 0; i < m.next.length; i++) - if (seen.indexOf(m.next[i].next) == -1) - scan(m.next[i].next); - } - scan(this); - return seen.map((m, i) => { - let out = i + (m.validEnd ? "*" : " ") + " "; - for (let i2 = 0; i2 < m.next.length; i2++) - out += (i2 ? ", " : "") + m.next[i2].type.name + "->" + seen.indexOf(m.next[i2].next); - return out; - }).join("\n"); - } -}; -ContentMatch.empty = new ContentMatch(true); -var TokenStream = class { - constructor(string, nodeTypes) { - this.string = string; - this.nodeTypes = nodeTypes; - this.inline = null; - this.pos = 0; - this.tokens = string.split(/\s*(?=\b|\W|$)/); - if (this.tokens[this.tokens.length - 1] == "") - this.tokens.pop(); - if (this.tokens[0] == "") - this.tokens.shift(); - } - get next() { - return this.tokens[this.pos]; - } - eat(tok) { - return this.next == tok && (this.pos++ || true); - } - err(str) { - throw new SyntaxError(str + " (in content expression '" + this.string + "')"); - } -}; -function parseExpr(stream) { - let exprs = []; - do { - exprs.push(parseExprSeq(stream)); - } while (stream.eat("|")); - return exprs.length == 1 ? exprs[0] : { type: "choice", exprs }; -} -function parseExprSeq(stream) { - let exprs = []; - do { - exprs.push(parseExprSubscript(stream)); - } while (stream.next && stream.next != ")" && stream.next != "|"); - return exprs.length == 1 ? exprs[0] : { type: "seq", exprs }; -} -function parseExprSubscript(stream) { - let expr = parseExprAtom(stream); - for (; ; ) { - if (stream.eat("+")) - expr = { type: "plus", expr }; - else if (stream.eat("*")) - expr = { type: "star", expr }; - else if (stream.eat("?")) - expr = { type: "opt", expr }; - else if (stream.eat("{")) - expr = parseExprRange(stream, expr); - else - break; - } - return expr; -} -function parseNum(stream) { - if (/\D/.test(stream.next)) - stream.err("Expected number, got '" + stream.next + "'"); - let result = Number(stream.next); - stream.pos++; - return result; -} -function parseExprRange(stream, expr) { - let min = parseNum(stream), max = min; - if (stream.eat(",")) { - if (stream.next != "}") - max = parseNum(stream); - else - max = -1; - } - if (!stream.eat("}")) - stream.err("Unclosed braced range"); - return { type: "range", min, max, expr }; -} -function resolveName(stream, name) { - let types = stream.nodeTypes, type = types[name]; - if (type) - return [type]; - let result = []; - for (let typeName in types) { - let type2 = types[typeName]; - if (type2.isInGroup(name)) - result.push(type2); - } - if (result.length == 0) - stream.err("No node type or group '" + name + "' found"); - return result; -} -function parseExprAtom(stream) { - if (stream.eat("(")) { - let expr = parseExpr(stream); - if (!stream.eat(")")) - stream.err("Missing closing paren"); - return expr; - } else if (!/\W/.test(stream.next)) { - let exprs = resolveName(stream, stream.next).map((type) => { - if (stream.inline == null) - stream.inline = type.isInline; - else if (stream.inline != type.isInline) - stream.err("Mixing inline and block content"); - return { type: "name", value: type }; - }); - stream.pos++; - return exprs.length == 1 ? exprs[0] : { type: "choice", exprs }; - } else { - stream.err("Unexpected token '" + stream.next + "'"); - } -} -function nfa(expr) { - let nfa2 = [[]]; - connect(compile(expr, 0), node()); - return nfa2; - function node() { - return nfa2.push([]) - 1; - } - function edge(from, to, term) { - let edge2 = { term, to }; - nfa2[from].push(edge2); - return edge2; - } - function connect(edges, to) { - edges.forEach((edge2) => edge2.to = to); - } - function compile(expr2, from) { - if (expr2.type == "choice") { - return expr2.exprs.reduce((out, expr3) => out.concat(compile(expr3, from)), []); - } else if (expr2.type == "seq") { - for (let i = 0; ; i++) { - let next = compile(expr2.exprs[i], from); - if (i == expr2.exprs.length - 1) - return next; - connect(next, from = node()); - } - } else if (expr2.type == "star") { - let loop = node(); - edge(from, loop); - connect(compile(expr2.expr, loop), loop); - return [edge(loop)]; - } else if (expr2.type == "plus") { - let loop = node(); - connect(compile(expr2.expr, from), loop); - connect(compile(expr2.expr, loop), loop); - return [edge(loop)]; - } else if (expr2.type == "opt") { - return [edge(from)].concat(compile(expr2.expr, from)); - } else if (expr2.type == "range") { - let cur = from; - for (let i = 0; i < expr2.min; i++) { - let next = node(); - connect(compile(expr2.expr, cur), next); - cur = next; - } - if (expr2.max == -1) { - connect(compile(expr2.expr, cur), cur); - } else { - for (let i = expr2.min; i < expr2.max; i++) { - let next = node(); - edge(cur, next); - connect(compile(expr2.expr, cur), next); - cur = next; - } - } - return [edge(cur)]; - } else if (expr2.type == "name") { - return [edge(from, void 0, expr2.value)]; - } else { - throw new Error("Unknown expr type"); - } - } -} -function cmp(a, b) { - return b - a; -} -function nullFrom(nfa2, node) { - let result = []; - scan(node); - return result.sort(cmp); - function scan(node2) { - let edges = nfa2[node2]; - if (edges.length == 1 && !edges[0].term) - return scan(edges[0].to); - result.push(node2); - for (let i = 0; i < edges.length; i++) { - let { term, to } = edges[i]; - if (!term && result.indexOf(to) == -1) - scan(to); - } - } -} -function dfa(nfa2) { - let labeled = /* @__PURE__ */ Object.create(null); - return explore(nullFrom(nfa2, 0)); - function explore(states) { - let out = []; - states.forEach((node) => { - nfa2[node].forEach(({ term, to }) => { - if (!term) - return; - let set; - for (let i = 0; i < out.length; i++) - if (out[i][0] == term) - set = out[i][1]; - nullFrom(nfa2, to).forEach((node2) => { - if (!set) - out.push([term, set = []]); - if (set.indexOf(node2) == -1) - set.push(node2); - }); - }); - }); - let state = labeled[states.join(",")] = new ContentMatch(states.indexOf(nfa2.length - 1) > -1); - for (let i = 0; i < out.length; i++) { - let states2 = out[i][1].sort(cmp); - state.next.push({ type: out[i][0], next: labeled[states2.join(",")] || explore(states2) }); - } - return state; - } -} -function checkForDeadEnds(match, stream) { - for (let i = 0, work = [match]; i < work.length; i++) { - let state = work[i], dead = !state.validEnd, nodes = []; - for (let j = 0; j < state.next.length; j++) { - let { type, next } = state.next[j]; - nodes.push(type.name); - if (dead && !(type.isText || type.hasRequiredAttrs())) - dead = false; - if (work.indexOf(next) == -1) - work.push(next); - } - if (dead) - stream.err("Only non-generatable nodes (" + nodes.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)"); - } -} - -// ../../node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/dist/index.js -var lower16 = 65535; -var factor16 = Math.pow(2, 16); -function makeRecover(index, offset) { - return index + offset * factor16; -} -function recoverIndex(value) { - return value & lower16; -} -function recoverOffset(value) { - return (value - (value & lower16)) / factor16; -} -var DEL_BEFORE = 1; -var DEL_AFTER = 2; -var DEL_ACROSS = 4; -var DEL_SIDE = 8; -var MapResult = class { - /** - @internal - */ - constructor(pos, delInfo, recover) { - this.pos = pos; - this.delInfo = delInfo; - this.recover = recover; - } - /** - Tells you whether the position was deleted, that is, whether the - step removed the token on the side queried (via the `assoc`) - argument from the document. - */ - get deleted() { - return (this.delInfo & DEL_SIDE) > 0; - } - /** - Tells you whether the token before the mapped position was deleted. - */ - get deletedBefore() { - return (this.delInfo & (DEL_BEFORE | DEL_ACROSS)) > 0; - } - /** - True when the token after the mapped position was deleted. - */ - get deletedAfter() { - return (this.delInfo & (DEL_AFTER | DEL_ACROSS)) > 0; - } - /** - Tells whether any of the steps mapped through deletes across the - position (including both the token before and after the - position). - */ - get deletedAcross() { - return (this.delInfo & DEL_ACROSS) > 0; - } -}; -var StepMap = class _StepMap { - /** - Create a position map. The modifications to the document are - represented as an array of numbers, in which each group of three - represents a modified chunk as `[start, oldSize, newSize]`. - */ - constructor(ranges, inverted = false) { - this.ranges = ranges; - this.inverted = inverted; - if (!ranges.length && _StepMap.empty) - return _StepMap.empty; - } - /** - @internal - */ - recover(value) { - let diff = 0, index = recoverIndex(value); - if (!this.inverted) - for (let i = 0; i < index; i++) - diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1]; - return this.ranges[index * 3] + diff + recoverOffset(value); - } - mapResult(pos, assoc = 1) { - return this._map(pos, assoc, false); - } - map(pos, assoc = 1) { - return this._map(pos, assoc, true); - } - /** - @internal - */ - _map(pos, assoc, simple) { - let diff = 0, oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2; - for (let i = 0; i < this.ranges.length; i += 3) { - let start = this.ranges[i] - (this.inverted ? diff : 0); - if (start > pos) - break; - let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex], end = start + oldSize; - if (pos <= end) { - let side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc; - let result = start + diff + (side < 0 ? 0 : newSize); - if (simple) - return result; - let recover = pos == (assoc < 0 ? start : end) ? null : makeRecover(i / 3, pos - start); - let del = pos == start ? DEL_AFTER : pos == end ? DEL_BEFORE : DEL_ACROSS; - if (assoc < 0 ? pos != start : pos != end) - del |= DEL_SIDE; - return new MapResult(result, del, recover); - } - diff += newSize - oldSize; - } - return simple ? pos + diff : new MapResult(pos + diff, 0, null); - } - /** - @internal - */ - touches(pos, recover) { - let diff = 0, index = recoverIndex(recover); - let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2; - for (let i = 0; i < this.ranges.length; i += 3) { - let start = this.ranges[i] - (this.inverted ? diff : 0); - if (start > pos) - break; - let oldSize = this.ranges[i + oldIndex], end = start + oldSize; - if (pos <= end && i == index * 3) - return true; - diff += this.ranges[i + newIndex] - oldSize; - } - return false; - } - /** - Calls the given function on each of the changed ranges included in - this map. - */ - forEach(f) { - let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2; - for (let i = 0, diff = 0; i < this.ranges.length; i += 3) { - let start = this.ranges[i], oldStart = start - (this.inverted ? diff : 0), newStart = start + (this.inverted ? 0 : diff); - let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex]; - f(oldStart, oldStart + oldSize, newStart, newStart + newSize); - diff += newSize - oldSize; - } - } - /** - Create an inverted version of this map. The result can be used to - map positions in the post-step document to the pre-step document. - */ - invert() { - return new _StepMap(this.ranges, !this.inverted); - } - /** - @internal - */ - toString() { - return (this.inverted ? "-" : "") + JSON.stringify(this.ranges); - } - /** - Create a map that moves all positions by offset `n` (which may be - negative). This can be useful when applying steps meant for a - sub-document to a larger document, or vice-versa. - */ - static offset(n) { - return n == 0 ? _StepMap.empty : new _StepMap(n < 0 ? [0, -n, 0] : [0, 0, n]); - } -}; -StepMap.empty = new StepMap([]); -var stepsByID = /* @__PURE__ */ Object.create(null); -var Step = class { - /** - Get the step map that represents the changes made by this step, - and which can be used to transform between positions in the old - and the new document. - */ - getMap() { - return StepMap.empty; - } - /** - Try to merge this step with another one, to be applied directly - after it. Returns the merged step when possible, null if the - steps can't be merged. - */ - merge(other) { - return null; - } - /** - Deserialize a step from its JSON representation. Will call - through to the step class' own implementation of this method. - */ - static fromJSON(schema, json) { - if (!json || !json.stepType) - throw new RangeError("Invalid input for Step.fromJSON"); - let type = stepsByID[json.stepType]; - if (!type) - throw new RangeError(`No step type ${json.stepType} defined`); - return type.fromJSON(schema, json); - } - /** - To be able to serialize steps to JSON, each step needs a string - ID to attach to its JSON representation. Use this method to - register an ID for your step classes. Try to pick something - that's unlikely to clash with steps from other modules. - */ - static jsonID(id, stepClass) { - if (id in stepsByID) - throw new RangeError("Duplicate use of step JSON ID " + id); - stepsByID[id] = stepClass; - stepClass.prototype.jsonID = id; - return stepClass; - } -}; -var StepResult = class _StepResult { - /** - @internal - */ - constructor(doc, failed) { - this.doc = doc; - this.failed = failed; - } - /** - Create a successful step result. - */ - static ok(doc) { - return new _StepResult(doc, null); - } - /** - Create a failed step result. - */ - static fail(message) { - return new _StepResult(null, message); - } - /** - Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given - arguments. Create a successful result if it succeeds, and a - failed one if it throws a `ReplaceError`. - */ - static fromReplace(doc, from, to, slice) { - try { - return _StepResult.ok(doc.replace(from, to, slice)); - } catch (e) { - if (e instanceof ReplaceError) - return _StepResult.fail(e.message); - throw e; - } - } -}; -function mapFragment(fragment, f, parent) { - let mapped = []; - for (let i = 0; i < fragment.childCount; i++) { - let child = fragment.child(i); - if (child.content.size) - child = child.copy(mapFragment(child.content, f, child)); - if (child.isInline) - child = f(child, parent, i); - mapped.push(child); - } - return Fragment.fromArray(mapped); -} -var AddMarkStep = class _AddMarkStep extends Step { - /** - Create a mark step. - */ - constructor(from, to, mark) { - super(); - this.from = from; - this.to = to; - this.mark = mark; - } - apply(doc) { - let oldSlice = doc.slice(this.from, this.to), $from = doc.resolve(this.from); - let parent = $from.node($from.sharedDepth(this.to)); - let slice = new Slice(mapFragment(oldSlice.content, (node, parent2) => { - if (!node.isAtom || !parent2.type.allowsMarkType(this.mark.type)) - return node; - return node.mark(this.mark.addToSet(node.marks)); - }, parent), oldSlice.openStart, oldSlice.openEnd); - return StepResult.fromReplace(doc, this.from, this.to, slice); - } - invert() { - return new RemoveMarkStep(this.from, this.to, this.mark); - } - map(mapping) { - let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1); - if (from.deleted && to.deleted || from.pos >= to.pos) - return null; - return new _AddMarkStep(from.pos, to.pos, this.mark); - } - merge(other) { - if (other instanceof _AddMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) - return new _AddMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark); - return null; - } - toJSON() { - return { - stepType: "addMark", - mark: this.mark.toJSON(), - from: this.from, - to: this.to - }; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.from != "number" || typeof json.to != "number") - throw new RangeError("Invalid input for AddMarkStep.fromJSON"); - return new _AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark)); - } -}; -Step.jsonID("addMark", AddMarkStep); -var RemoveMarkStep = class _RemoveMarkStep extends Step { - /** - Create a mark-removing step. - */ - constructor(from, to, mark) { - super(); - this.from = from; - this.to = to; - this.mark = mark; - } - apply(doc) { - let oldSlice = doc.slice(this.from, this.to); - let slice = new Slice(mapFragment(oldSlice.content, (node) => { - return node.mark(this.mark.removeFromSet(node.marks)); - }, doc), oldSlice.openStart, oldSlice.openEnd); - return StepResult.fromReplace(doc, this.from, this.to, slice); - } - invert() { - return new AddMarkStep(this.from, this.to, this.mark); - } - map(mapping) { - let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1); - if (from.deleted && to.deleted || from.pos >= to.pos) - return null; - return new _RemoveMarkStep(from.pos, to.pos, this.mark); - } - merge(other) { - if (other instanceof _RemoveMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) - return new _RemoveMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark); - return null; - } - toJSON() { - return { - stepType: "removeMark", - mark: this.mark.toJSON(), - from: this.from, - to: this.to - }; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.from != "number" || typeof json.to != "number") - throw new RangeError("Invalid input for RemoveMarkStep.fromJSON"); - return new _RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark)); - } -}; -Step.jsonID("removeMark", RemoveMarkStep); -var AddNodeMarkStep = class _AddNodeMarkStep extends Step { - /** - Create a node mark step. - */ - constructor(pos, mark) { - super(); - this.pos = pos; - this.mark = mark; - } - apply(doc) { - let node = doc.nodeAt(this.pos); - if (!node) - return StepResult.fail("No node at mark step's position"); - let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks)); - return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1)); - } - invert(doc) { - let node = doc.nodeAt(this.pos); - if (node) { - let newSet = this.mark.addToSet(node.marks); - if (newSet.length == node.marks.length) { - for (let i = 0; i < node.marks.length; i++) - if (!node.marks[i].isInSet(newSet)) - return new _AddNodeMarkStep(this.pos, node.marks[i]); - return new _AddNodeMarkStep(this.pos, this.mark); - } - } - return new RemoveNodeMarkStep(this.pos, this.mark); - } - map(mapping) { - let pos = mapping.mapResult(this.pos, 1); - return pos.deletedAfter ? null : new _AddNodeMarkStep(pos.pos, this.mark); - } - toJSON() { - return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() }; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.pos != "number") - throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON"); - return new _AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark)); - } -}; -Step.jsonID("addNodeMark", AddNodeMarkStep); -var RemoveNodeMarkStep = class _RemoveNodeMarkStep extends Step { - /** - Create a mark-removing step. - */ - constructor(pos, mark) { - super(); - this.pos = pos; - this.mark = mark; - } - apply(doc) { - let node = doc.nodeAt(this.pos); - if (!node) - return StepResult.fail("No node at mark step's position"); - let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks)); - return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1)); - } - invert(doc) { - let node = doc.nodeAt(this.pos); - if (!node || !this.mark.isInSet(node.marks)) - return this; - return new AddNodeMarkStep(this.pos, this.mark); - } - map(mapping) { - let pos = mapping.mapResult(this.pos, 1); - return pos.deletedAfter ? null : new _RemoveNodeMarkStep(pos.pos, this.mark); - } - toJSON() { - return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() }; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.pos != "number") - throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON"); - return new _RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark)); - } -}; -Step.jsonID("removeNodeMark", RemoveNodeMarkStep); -var ReplaceStep = class _ReplaceStep extends Step { - /** - The given `slice` should fit the 'gap' between `from` and - `to`—the depths must line up, and the surrounding nodes must be - able to be joined with the open sides of the slice. When - `structure` is true, the step will fail if the content between - from and to is not just a sequence of closing and then opening - tokens (this is to guard against rebased replace steps - overwriting something they weren't supposed to). - */ - constructor(from, to, slice, structure = false) { - super(); - this.from = from; - this.to = to; - this.slice = slice; - this.structure = structure; - } - apply(doc) { - if (this.structure && contentBetween(doc, this.from, this.to)) - return StepResult.fail("Structure replace would overwrite content"); - return StepResult.fromReplace(doc, this.from, this.to, this.slice); - } - getMap() { - return new StepMap([this.from, this.to - this.from, this.slice.size]); - } - invert(doc) { - return new _ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to)); - } - map(mapping) { - let to = mapping.mapResult(this.to, -1); - let from = this.from == this.to && _ReplaceStep.MAP_BIAS < 0 ? to : mapping.mapResult(this.from, 1); - if (from.deletedAcross && to.deletedAcross) - return null; - return new _ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice, this.structure); - } - merge(other) { - if (!(other instanceof _ReplaceStep) || other.structure || this.structure) - return null; - if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) { - let slice = this.slice.size + other.slice.size == 0 ? Slice.empty : new Slice(this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd); - return new _ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure); - } else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) { - let slice = this.slice.size + other.slice.size == 0 ? Slice.empty : new Slice(other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd); - return new _ReplaceStep(other.from, this.to, slice, this.structure); - } else { - return null; - } - } - toJSON() { - let json = { stepType: "replace", from: this.from, to: this.to }; - if (this.slice.size) - json.slice = this.slice.toJSON(); - if (this.structure) - json.structure = true; - return json; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.from != "number" || typeof json.to != "number") - throw new RangeError("Invalid input for ReplaceStep.fromJSON"); - return new _ReplaceStep(json.from, json.to, Slice.fromJSON(schema, json.slice), !!json.structure); - } -}; -ReplaceStep.MAP_BIAS = 1; -Step.jsonID("replace", ReplaceStep); -var ReplaceAroundStep = class _ReplaceAroundStep extends Step { - /** - Create a replace-around step with the given range and gap. - `insert` should be the point in the slice into which the content - of the gap should be moved. `structure` has the same meaning as - it has in the [`ReplaceStep`](https://prosemirror.net/docs/ref/#transform.ReplaceStep) class. - */ - constructor(from, to, gapFrom, gapTo, slice, insert, structure = false) { - super(); - this.from = from; - this.to = to; - this.gapFrom = gapFrom; - this.gapTo = gapTo; - this.slice = slice; - this.insert = insert; - this.structure = structure; - } - apply(doc) { - if (this.structure && (contentBetween(doc, this.from, this.gapFrom) || contentBetween(doc, this.gapTo, this.to))) - return StepResult.fail("Structure gap-replace would overwrite content"); - let gap = doc.slice(this.gapFrom, this.gapTo); - if (gap.openStart || gap.openEnd) - return StepResult.fail("Gap is not a flat range"); - let inserted = this.slice.insertAt(this.insert, gap.content); - if (!inserted) - return StepResult.fail("Content does not fit in gap"); - return StepResult.fromReplace(doc, this.from, this.to, inserted); - } - getMap() { - return new StepMap([ - this.from, - this.gapFrom - this.from, - this.insert, - this.gapTo, - this.to - this.gapTo, - this.slice.size - this.insert - ]); - } - invert(doc) { - let gap = this.gapTo - this.gapFrom; - return new _ReplaceAroundStep(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure); - } - map(mapping) { - let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1); - let gapFrom = this.from == this.gapFrom ? from.pos : mapping.map(this.gapFrom, -1); - let gapTo = this.to == this.gapTo ? to.pos : mapping.map(this.gapTo, 1); - if (from.deletedAcross && to.deletedAcross || gapFrom < from.pos || gapTo > to.pos) - return null; - return new _ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure); - } - toJSON() { - let json = { - stepType: "replaceAround", - from: this.from, - to: this.to, - gapFrom: this.gapFrom, - gapTo: this.gapTo, - insert: this.insert - }; - if (this.slice.size) - json.slice = this.slice.toJSON(); - if (this.structure) - json.structure = true; - return json; - } - /** - @internal - */ - static fromJSON(schema, json) { - if (typeof json.from != "number" || typeof json.to != "number" || typeof json.gapFrom != "number" || typeof json.gapTo != "number" || typeof json.insert != "number") - throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON"); - return new _ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, Slice.fromJSON(schema, json.slice), json.insert, !!json.structure); - } -}; -Step.jsonID("replaceAround", ReplaceAroundStep); -function contentBetween(doc, from, to) { - let $from = doc.resolve(from), dist = to - from, depth = $from.depth; - while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) { - depth--; - dist--; - } - if (dist > 0) { - let next = $from.node(depth).maybeChild($from.indexAfter(depth)); - while (dist > 0) { - if (!next || next.isLeaf) - return true; - next = next.firstChild; - dist--; - } - } - return false; -} -var AttrStep = class _AttrStep extends Step { - /** - Construct an attribute step. - */ - constructor(pos, attr, value) { - super(); - this.pos = pos; - this.attr = attr; - this.value = value; - } - apply(doc) { - let node = doc.nodeAt(this.pos); - if (!node) - return StepResult.fail("No node at attribute step's position"); - let attrs = /* @__PURE__ */ Object.create(null); - for (let name in node.attrs) - attrs[name] = node.attrs[name]; - attrs[this.attr] = this.value; - let updated = node.type.create(attrs, null, node.marks); - return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1)); - } - getMap() { - return StepMap.empty; - } - invert(doc) { - return new _AttrStep(this.pos, this.attr, doc.nodeAt(this.pos).attrs[this.attr]); - } - map(mapping) { - let pos = mapping.mapResult(this.pos, 1); - return pos.deletedAfter ? null : new _AttrStep(pos.pos, this.attr, this.value); - } - toJSON() { - return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value }; - } - static fromJSON(schema, json) { - if (typeof json.pos != "number" || typeof json.attr != "string") - throw new RangeError("Invalid input for AttrStep.fromJSON"); - return new _AttrStep(json.pos, json.attr, json.value); - } -}; -Step.jsonID("attr", AttrStep); -var DocAttrStep = class _DocAttrStep extends Step { - /** - Construct an attribute step. - */ - constructor(attr, value) { - super(); - this.attr = attr; - this.value = value; - } - apply(doc) { - let attrs = /* @__PURE__ */ Object.create(null); - for (let name in doc.attrs) - attrs[name] = doc.attrs[name]; - attrs[this.attr] = this.value; - let updated = doc.type.create(attrs, doc.content, doc.marks); - return StepResult.ok(updated); - } - getMap() { - return StepMap.empty; - } - invert(doc) { - return new _DocAttrStep(this.attr, doc.attrs[this.attr]); - } - map(mapping) { - return this; - } - toJSON() { - return { stepType: "docAttr", attr: this.attr, value: this.value }; - } - static fromJSON(schema, json) { - if (typeof json.attr != "string") - throw new RangeError("Invalid input for DocAttrStep.fromJSON"); - return new _DocAttrStep(json.attr, json.value); - } -}; -Step.jsonID("docAttr", DocAttrStep); -var TransformError = class extends Error { -}; -TransformError = function TransformError2(message) { - let err = Error.call(this, message); - err.__proto__ = TransformError2.prototype; - return err; -}; -TransformError.prototype = Object.create(Error.prototype); -TransformError.prototype.constructor = TransformError; -TransformError.prototype.name = "TransformError"; - -// ../../node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js -var classesById = /* @__PURE__ */ Object.create(null); -var Selection = class { - /** - Initialize a selection with the head and anchor and ranges. If no - ranges are given, constructs a single range across `$anchor` and - `$head`. - */ - constructor($anchor, $head, ranges) { - this.$anchor = $anchor; - this.$head = $head; - this.ranges = ranges || [new SelectionRange($anchor.min($head), $anchor.max($head))]; - } - /** - The selection's anchor, as an unresolved position. - */ - get anchor() { - return this.$anchor.pos; - } - /** - The selection's head. - */ - get head() { - return this.$head.pos; - } - /** - The lower bound of the selection's main range. - */ - get from() { - return this.$from.pos; - } - /** - The upper bound of the selection's main range. - */ - get to() { - return this.$to.pos; - } - /** - The resolved lower bound of the selection's main range. - */ - get $from() { - return this.ranges[0].$from; - } - /** - The resolved upper bound of the selection's main range. - */ - get $to() { - return this.ranges[0].$to; - } - /** - Indicates whether the selection contains any content. - */ - get empty() { - let ranges = this.ranges; - for (let i = 0; i < ranges.length; i++) - if (ranges[i].$from.pos != ranges[i].$to.pos) - return false; - return true; - } - /** - Get the content of this selection as a slice. - */ - content() { - return this.$from.doc.slice(this.from, this.to, true); - } - /** - Replace the selection with a slice or, if no slice is given, - delete the selection. Will append to the given transaction. - */ - replace(tr, content = Slice.empty) { - let lastNode = content.content.lastChild, lastParent = null; - for (let i = 0; i < content.openEnd; i++) { - lastParent = lastNode; - lastNode = lastNode.lastChild; - } - let mapFrom = tr.steps.length, ranges = this.ranges; - for (let i = 0; i < ranges.length; i++) { - let { $from, $to } = ranges[i], mapping = tr.mapping.slice(mapFrom); - tr.replaceRange(mapping.map($from.pos), mapping.map($to.pos), i ? Slice.empty : content); - if (i == 0) - selectionToInsertionEnd(tr, mapFrom, (lastNode ? lastNode.isInline : lastParent && lastParent.isTextblock) ? -1 : 1); - } - } - /** - Replace the selection with the given node, appending the changes - to the given transaction. - */ - replaceWith(tr, node) { - let mapFrom = tr.steps.length, ranges = this.ranges; - for (let i = 0; i < ranges.length; i++) { - let { $from, $to } = ranges[i], mapping = tr.mapping.slice(mapFrom); - let from = mapping.map($from.pos), to = mapping.map($to.pos); - if (i) { - tr.deleteRange(from, to); - } else { - tr.replaceRangeWith(from, to, node); - selectionToInsertionEnd(tr, mapFrom, node.isInline ? -1 : 1); - } - } - } - /** - Find a valid cursor or leaf node selection starting at the given - position and searching back if `dir` is negative, and forward if - positive. When `textOnly` is true, only consider cursor - selections. Will return null when no valid selection position is - found. - */ - static findFrom($pos, dir, textOnly = false) { - let inner = $pos.parent.inlineContent ? new TextSelection($pos) : findSelectionIn($pos.node(0), $pos.parent, $pos.pos, $pos.index(), dir, textOnly); - if (inner) - return inner; - for (let depth = $pos.depth - 1; depth >= 0; depth--) { - let found2 = dir < 0 ? findSelectionIn($pos.node(0), $pos.node(depth), $pos.before(depth + 1), $pos.index(depth), dir, textOnly) : findSelectionIn($pos.node(0), $pos.node(depth), $pos.after(depth + 1), $pos.index(depth) + 1, dir, textOnly); - if (found2) - return found2; - } - return null; - } - /** - Find a valid cursor or leaf node selection near the given - position. Searches forward first by default, but if `bias` is - negative, it will search backwards first. - */ - static near($pos, bias = 1) { - return this.findFrom($pos, bias) || this.findFrom($pos, -bias) || new AllSelection($pos.node(0)); - } - /** - Find the cursor or leaf node selection closest to the start of - the given document. Will return an - [`AllSelection`](https://prosemirror.net/docs/ref/#state.AllSelection) if no valid position - exists. - */ - static atStart(doc) { - return findSelectionIn(doc, doc, 0, 0, 1) || new AllSelection(doc); - } - /** - Find the cursor or leaf node selection closest to the end of the - given document. - */ - static atEnd(doc) { - return findSelectionIn(doc, doc, doc.content.size, doc.childCount, -1) || new AllSelection(doc); - } - /** - Deserialize the JSON representation of a selection. Must be - implemented for custom classes (as a static class method). - */ - static fromJSON(doc, json) { - if (!json || !json.type) - throw new RangeError("Invalid input for Selection.fromJSON"); - let cls = classesById[json.type]; - if (!cls) - throw new RangeError(`No selection type ${json.type} defined`); - return cls.fromJSON(doc, json); - } - /** - To be able to deserialize selections from JSON, custom selection - classes must register themselves with an ID string, so that they - can be disambiguated. Try to pick something that's unlikely to - clash with classes from other modules. - */ - static jsonID(id, selectionClass) { - if (id in classesById) - throw new RangeError("Duplicate use of selection JSON ID " + id); - classesById[id] = selectionClass; - selectionClass.prototype.jsonID = id; - return selectionClass; - } - /** - Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection, - which is a value that can be mapped without having access to a - current document, and later resolved to a real selection for a - given document again. (This is used mostly by the history to - track and restore old selections.) The default implementation of - this method just converts the selection to a text selection and - returns the bookmark for that. - */ - getBookmark() { - return TextSelection.between(this.$anchor, this.$head).getBookmark(); - } -}; -Selection.prototype.visible = true; -var SelectionRange = class { - /** - Create a range. - */ - constructor($from, $to) { - this.$from = $from; - this.$to = $to; - } -}; -var warnedAboutTextSelection = false; -function checkTextSelection($pos) { - if (!warnedAboutTextSelection && !$pos.parent.inlineContent) { - warnedAboutTextSelection = true; - console["warn"]("TextSelection endpoint not pointing into a node with inline content (" + $pos.parent.type.name + ")"); - } -} -var TextSelection = class _TextSelection extends Selection { - /** - Construct a text selection between the given points. - */ - constructor($anchor, $head = $anchor) { - checkTextSelection($anchor); - checkTextSelection($head); - super($anchor, $head); - } - /** - Returns a resolved position if this is a cursor selection (an - empty text selection), and null otherwise. - */ - get $cursor() { - return this.$anchor.pos == this.$head.pos ? this.$head : null; - } - map(doc, mapping) { - let $head = doc.resolve(mapping.map(this.head)); - if (!$head.parent.inlineContent) - return Selection.near($head); - let $anchor = doc.resolve(mapping.map(this.anchor)); - return new _TextSelection($anchor.parent.inlineContent ? $anchor : $head, $head); - } - replace(tr, content = Slice.empty) { - super.replace(tr, content); - if (content == Slice.empty) { - let marks = this.$from.marksAcross(this.$to); - if (marks) - tr.ensureMarks(marks); - } - } - eq(other) { - return other instanceof _TextSelection && other.anchor == this.anchor && other.head == this.head; - } - getBookmark() { - return new TextBookmark(this.anchor, this.head); - } - toJSON() { - return { type: "text", anchor: this.anchor, head: this.head }; - } - /** - @internal - */ - static fromJSON(doc, json) { - if (typeof json.anchor != "number" || typeof json.head != "number") - throw new RangeError("Invalid input for TextSelection.fromJSON"); - return new _TextSelection(doc.resolve(json.anchor), doc.resolve(json.head)); - } - /** - Create a text selection from non-resolved positions. - */ - static create(doc, anchor, head = anchor) { - let $anchor = doc.resolve(anchor); - return new this($anchor, head == anchor ? $anchor : doc.resolve(head)); - } - /** - Return a text selection that spans the given positions or, if - they aren't text positions, find a text selection near them. - `bias` determines whether the method searches forward (default) - or backwards (negative number) first. Will fall back to calling - [`Selection.near`](https://prosemirror.net/docs/ref/#state.Selection^near) when the document - doesn't contain a valid text position. - */ - static between($anchor, $head, bias) { - let dPos = $anchor.pos - $head.pos; - if (!bias || dPos) - bias = dPos >= 0 ? 1 : -1; - if (!$head.parent.inlineContent) { - let found2 = Selection.findFrom($head, bias, true) || Selection.findFrom($head, -bias, true); - if (found2) - $head = found2.$head; - else - return Selection.near($head, bias); - } - if (!$anchor.parent.inlineContent) { - if (dPos == 0) { - $anchor = $head; - } else { - $anchor = (Selection.findFrom($anchor, -bias, true) || Selection.findFrom($anchor, bias, true)).$anchor; - if ($anchor.pos < $head.pos != dPos < 0) - $anchor = $head; - } - } - return new _TextSelection($anchor, $head); - } -}; -Selection.jsonID("text", TextSelection); -var TextBookmark = class _TextBookmark { - constructor(anchor, head) { - this.anchor = anchor; - this.head = head; - } - map(mapping) { - return new _TextBookmark(mapping.map(this.anchor), mapping.map(this.head)); - } - resolve(doc) { - return TextSelection.between(doc.resolve(this.anchor), doc.resolve(this.head)); - } -}; -var NodeSelection = class _NodeSelection extends Selection { - /** - Create a node selection. Does not verify the validity of its - argument. - */ - constructor($pos) { - let node = $pos.nodeAfter; - let $end = $pos.node(0).resolve($pos.pos + node.nodeSize); - super($pos, $end); - this.node = node; - } - map(doc, mapping) { - let { deleted, pos } = mapping.mapResult(this.anchor); - let $pos = doc.resolve(pos); - if (deleted) - return Selection.near($pos); - return new _NodeSelection($pos); - } - content() { - return new Slice(Fragment.from(this.node), 0, 0); - } - eq(other) { - return other instanceof _NodeSelection && other.anchor == this.anchor; - } - toJSON() { - return { type: "node", anchor: this.anchor }; - } - getBookmark() { - return new NodeBookmark(this.anchor); - } - /** - @internal - */ - static fromJSON(doc, json) { - if (typeof json.anchor != "number") - throw new RangeError("Invalid input for NodeSelection.fromJSON"); - return new _NodeSelection(doc.resolve(json.anchor)); - } - /** - Create a node selection from non-resolved positions. - */ - static create(doc, from) { - return new _NodeSelection(doc.resolve(from)); - } - /** - Determines whether the given node may be selected as a node - selection. - */ - static isSelectable(node) { - return !node.isText && node.type.spec.selectable !== false; - } -}; -NodeSelection.prototype.visible = false; -Selection.jsonID("node", NodeSelection); -var NodeBookmark = class _NodeBookmark { - constructor(anchor) { - this.anchor = anchor; - } - map(mapping) { - let { deleted, pos } = mapping.mapResult(this.anchor); - return deleted ? new TextBookmark(pos, pos) : new _NodeBookmark(pos); - } - resolve(doc) { - let $pos = doc.resolve(this.anchor), node = $pos.nodeAfter; - if (node && NodeSelection.isSelectable(node)) - return new NodeSelection($pos); - return Selection.near($pos); - } -}; -var AllSelection = class _AllSelection extends Selection { - /** - Create an all-selection over the given document. - */ - constructor(doc) { - super(doc.resolve(0), doc.resolve(doc.content.size)); - } - replace(tr, content = Slice.empty) { - if (content == Slice.empty) { - tr.delete(0, tr.doc.content.size); - let sel = Selection.atStart(tr.doc); - if (!sel.eq(tr.selection)) - tr.setSelection(sel); - } else { - super.replace(tr, content); - } - } - toJSON() { - return { type: "all" }; - } - /** - @internal - */ - static fromJSON(doc) { - return new _AllSelection(doc); - } - map(doc) { - return new _AllSelection(doc); - } - eq(other) { - return other instanceof _AllSelection; - } - getBookmark() { - return AllBookmark; - } -}; -Selection.jsonID("all", AllSelection); -var AllBookmark = { - map() { - return this; - }, - resolve(doc) { - return new AllSelection(doc); - } -}; -function findSelectionIn(doc, node, pos, index, dir, text = false) { - if (node.inlineContent) - return TextSelection.create(doc, pos); - for (let i = index - (dir > 0 ? 0 : 1); dir > 0 ? i < node.childCount : i >= 0; i += dir) { - let child = node.child(i); - if (!child.isAtom) { - let inner = findSelectionIn(doc, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text); - if (inner) - return inner; - } else if (!text && NodeSelection.isSelectable(child)) { - return NodeSelection.create(doc, pos - (dir < 0 ? child.nodeSize : 0)); - } - pos += child.nodeSize * dir; - } - return null; -} -function selectionToInsertionEnd(tr, startLen, bias) { - let last = tr.steps.length - 1; - if (last < startLen) - return; - let step = tr.steps[last]; - if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) - return; - let map = tr.mapping.maps[last], end; - map.forEach((_from, _to, _newFrom, newTo) => { - if (end == null) - end = newTo; - }); - tr.setSelection(Selection.near(tr.doc.resolve(end), bias)); -} -function bind(f, self) { - return !self || !f ? f : f.bind(self); -} -var FieldDesc = class { - constructor(name, desc, self) { - this.name = name; - this.init = bind(desc.init, self); - this.apply = bind(desc.apply, self); - } -}; -var baseFields = [ - new FieldDesc("doc", { - init(config) { - return config.doc || config.schema.topNodeType.createAndFill(); - }, - apply(tr) { - return tr.doc; - } - }), - new FieldDesc("selection", { - init(config, instance) { - return config.selection || Selection.atStart(instance.doc); - }, - apply(tr) { - return tr.selection; - } - }), - new FieldDesc("storedMarks", { - init(config) { - return config.storedMarks || null; - }, - apply(tr, _marks, _old, state) { - return state.selection.$cursor ? tr.storedMarks : null; - } - }), - new FieldDesc("scrollToSelection", { - init() { - return 0; - }, - apply(tr, prev) { - return tr.scrolledIntoView ? prev + 1 : prev; - } - }) -]; - -// src/handleBackspace.ts -var handleBackspace = (editor, type) => { - var _a; - const { state, view } = editor; - const { selection } = state; - if (!selection.empty) return false; - const { $from } = selection; - if ($from.parentOffset !== 0) return false; - const parentDepth = $from.depth - 1; - const parent = $from.node(parentDepth); - const index = $from.index(parentDepth); - if (index === 0) return false; - if (parent.type === type) { - return editor.commands.lift(type.name); - } - const previous = parent.child(index - 1); - if (previous.type !== type || !((_a = previous.lastChild) == null ? void 0 : _a.isTextblock)) { - return false; - } - const blockStart = $from.before(); - const insideBlockquoteEnd = blockStart - 1; - const targetPos = insideBlockquoteEnd - 1; - const { tr } = state; - tr.delete(blockStart, $from.after()).insert(targetPos, $from.parent.content); - tr.setSelection(TextSelection.create(tr.doc, targetPos)); - view.dispatch(tr.scrollIntoView()); - return true; -}; - -// src/blockquote.tsx -import { jsx } from "@tiptap/core/jsx-runtime"; -var inputRegex = /^\s*>\s$/; -var Blockquote = Node2.create({ - name: "blockquote", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - content: "block+", - group: "block", - defining: true, - parseHTML() { - return [{ tag: "blockquote" }]; - }, - renderHTML({ HTMLAttributes }) { - return /* @__PURE__ */ jsx("blockquote", { ...mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ jsx("slot", {}) }); - }, - parseMarkdown: (token, helpers) => { - var _a; - const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren; - return helpers.createNode("blockquote", void 0, parseBlockChildren(token.tokens || [])); - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - const prefix = ">"; - const result = []; - node.content.forEach((child, index) => { - var _a, _b; - const childContent = (_b = (_a = h.renderChild) == null ? void 0 : _a.call(h, child, index)) != null ? _b : h.renderChildren([child]); - const lines = childContent.split("\n"); - const linesWithPrefix = lines.map((line) => { - if (line.trim() === "") { - return prefix; - } - return `${prefix} ${line}`; - }); - result.push(linesWithPrefix.join("\n")); - }); - return result.join(` -${prefix} -`); - }, - addCommands() { - return { - setBlockquote: () => ({ commands }) => { - return commands.wrapIn(this.name); - }, - toggleBlockquote: () => ({ commands }) => { - return commands.toggleWrap(this.name); - }, - unsetBlockquote: () => ({ commands }) => { - return commands.lift(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-b": () => this.editor.commands.toggleBlockquote(), - Backspace: () => handleBackspace(this.editor, this.type) - }; - }, - addInputRules() { - return [ - wrappingInputRule({ - find: inputRegex, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = Blockquote; -export { - Blockquote, - index_default as default, - inputRegex -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.js.map deleted file mode 100644 index 06e9ed9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/blockquote.tsx","../../../node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.js","../../../node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/dist/index.js","../../../node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js","../src/handleBackspace.ts","../src/index.ts"],"sourcesContent":["/** @jsxImportSource @tiptap/core */\nimport { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nimport { handleBackspace } from './handleBackspace.js'\n\nexport interface BlockquoteOptions {\n /**\n * HTML attributes to add to the blockquote element\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n blockQuote: {\n /**\n * Set a blockquote node\n */\n setBlockquote: () => ReturnType\n /**\n * Toggle a blockquote node\n */\n toggleBlockquote: () => ReturnType\n /**\n * Unset a blockquote node\n */\n unsetBlockquote: () => ReturnType\n }\n }\n}\n\n/**\n * Matches a blockquote to a `>` as input.\n */\nexport const inputRegex = /^\\s*>\\s$/\n\n/**\n * This extension allows you to create blockquotes.\n * @see https://tiptap.dev/api/nodes/blockquote\n */\nexport const Blockquote = Node.create({\n name: 'blockquote',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: 'block+',\n\n group: 'block',\n\n defining: true,\n\n parseHTML() {\n return [{ tag: 'blockquote' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return (\n
\n \n
\n )\n },\n\n parseMarkdown: (token, helpers) => {\n const parseBlockChildren = helpers.parseBlockChildren ?? helpers.parseChildren\n\n return helpers.createNode('blockquote', undefined, parseBlockChildren(token.tokens || []))\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n // Use a single '>' prefix regardless of nesting level\n // Nested blockquotes will add their own '>' prefix recursively\n const prefix = '>'\n const result: string[] = []\n\n node.content.forEach((child, index) => {\n const childContent = h.renderChild?.(child, index) ?? h.renderChildren([child])\n const lines = childContent.split('\\n')\n\n const linesWithPrefix = lines.map(line => {\n // Don't add prefix to empty lines\n if (line.trim() === '') {\n return prefix\n }\n\n // Nested blockquotes will already have their own prefixes\n // We just need to add our own prefix at the start\n return `${prefix} ${line}`\n })\n\n result.push(linesWithPrefix.join('\\n'))\n })\n\n // Add separator lines between children\n return result.join(`\\n${prefix}\\n`)\n },\n\n addCommands() {\n return {\n setBlockquote:\n () =>\n ({ commands }) => {\n return commands.wrapIn(this.name)\n },\n toggleBlockquote:\n () =>\n ({ commands }) => {\n return commands.toggleWrap(this.name)\n },\n unsetBlockquote:\n () =>\n ({ commands }) => {\n return commands.lift(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-b': () => this.editor.commands.toggleBlockquote(),\n Backspace: () => handleBackspace(this.editor, this.type),\n }\n },\n\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ]\n },\n})\n","import OrderedMap from 'orderedmap';\n\nfunction findDiffStart(a, b, pos) {\n for (let i = 0;; i++) {\n if (i == a.childCount || i == b.childCount)\n return a.childCount == b.childCount ? null : pos;\n let childA = a.child(i), childB = b.child(i);\n if (childA == childB) {\n pos += childA.nodeSize;\n continue;\n }\n if (!childA.sameMarkup(childB))\n return pos;\n if (childA.isText && childA.text != childB.text) {\n for (let j = 0; childA.text[j] == childB.text[j]; j++)\n pos++;\n return pos;\n }\n if (childA.content.size || childB.content.size) {\n let inner = findDiffStart(childA.content, childB.content, pos + 1);\n if (inner != null)\n return inner;\n }\n pos += childA.nodeSize;\n }\n}\nfunction findDiffEnd(a, b, posA, posB) {\n for (let iA = a.childCount, iB = b.childCount;;) {\n if (iA == 0 || iB == 0)\n return iA == iB ? null : { a: posA, b: posB };\n let childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize;\n if (childA == childB) {\n posA -= size;\n posB -= size;\n continue;\n }\n if (!childA.sameMarkup(childB))\n return { a: posA, b: posB };\n if (childA.isText && childA.text != childB.text) {\n let same = 0, minSize = Math.min(childA.text.length, childB.text.length);\n while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) {\n same++;\n posA--;\n posB--;\n }\n return { a: posA, b: posB };\n }\n if (childA.content.size || childB.content.size) {\n let inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1);\n if (inner)\n return inner;\n }\n posA -= size;\n posB -= size;\n }\n}\n\n/**\nA fragment represents a node's collection of child nodes.\n\nLike nodes, fragments are persistent data structures, and you\nshould not mutate them or their content. Rather, you create new\ninstances whenever needed. The API tries to make this easy.\n*/\nclass Fragment {\n /**\n @internal\n */\n constructor(\n /**\n The child nodes in this fragment.\n */\n content, size) {\n this.content = content;\n this.size = size || 0;\n if (size == null)\n for (let i = 0; i < content.length; i++)\n this.size += content[i].nodeSize;\n }\n /**\n Invoke a callback for all descendant nodes between the given two\n positions (relative to start of this fragment). Doesn't descend\n into a node when the callback returns `false`.\n */\n nodesBetween(from, to, f, nodeStart = 0, parent) {\n for (let i = 0, pos = 0; pos < to; i++) {\n let child = this.content[i], end = pos + child.nodeSize;\n if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) {\n let start = pos + 1;\n child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start);\n }\n pos = end;\n }\n }\n /**\n Call the given callback for every descendant node. `pos` will be\n relative to the start of the fragment. The callback may return\n `false` to prevent traversal of a given node's children.\n */\n descendants(f) {\n this.nodesBetween(0, this.size, f);\n }\n /**\n Extract the text between `from` and `to`. See the same method on\n [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween).\n */\n textBetween(from, to, blockSeparator, leafText) {\n let text = \"\", first = true;\n this.nodesBetween(from, to, (node, pos) => {\n let nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos)\n : !node.isLeaf ? \"\"\n : leafText ? (typeof leafText === \"function\" ? leafText(node) : leafText)\n : node.type.spec.leafText ? node.type.spec.leafText(node)\n : \"\";\n if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) {\n if (first)\n first = false;\n else\n text += blockSeparator;\n }\n text += nodeText;\n }, 0);\n return text;\n }\n /**\n Create a new fragment containing the combined content of this\n fragment and the other.\n */\n append(other) {\n if (!other.size)\n return this;\n if (!this.size)\n return other;\n let last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0;\n if (last.isText && last.sameMarkup(first)) {\n content[content.length - 1] = last.withText(last.text + first.text);\n i = 1;\n }\n for (; i < other.content.length; i++)\n content.push(other.content[i]);\n return new Fragment(content, this.size + other.size);\n }\n /**\n Cut out the sub-fragment between the two given positions.\n */\n cut(from, to = this.size) {\n if (from == 0 && to == this.size)\n return this;\n let result = [], size = 0;\n if (to > from)\n for (let i = 0, pos = 0; pos < to; i++) {\n let child = this.content[i], end = pos + child.nodeSize;\n if (end > from) {\n if (pos < from || end > to) {\n if (child.isText)\n child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos));\n else\n child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1));\n }\n result.push(child);\n size += child.nodeSize;\n }\n pos = end;\n }\n return new Fragment(result, size);\n }\n /**\n @internal\n */\n cutByIndex(from, to) {\n if (from == to)\n return Fragment.empty;\n if (from == 0 && to == this.content.length)\n return this;\n return new Fragment(this.content.slice(from, to));\n }\n /**\n Create a new fragment in which the node at the given index is\n replaced by the given node.\n */\n replaceChild(index, node) {\n let current = this.content[index];\n if (current == node)\n return this;\n let copy = this.content.slice();\n let size = this.size + node.nodeSize - current.nodeSize;\n copy[index] = node;\n return new Fragment(copy, size);\n }\n /**\n Create a new fragment by prepending the given node to this\n fragment.\n */\n addToStart(node) {\n return new Fragment([node].concat(this.content), this.size + node.nodeSize);\n }\n /**\n Create a new fragment by appending the given node to this\n fragment.\n */\n addToEnd(node) {\n return new Fragment(this.content.concat(node), this.size + node.nodeSize);\n }\n /**\n Compare this fragment to another one.\n */\n eq(other) {\n if (this.content.length != other.content.length)\n return false;\n for (let i = 0; i < this.content.length; i++)\n if (!this.content[i].eq(other.content[i]))\n return false;\n return true;\n }\n /**\n The first child of the fragment, or `null` if it is empty.\n */\n get firstChild() { return this.content.length ? this.content[0] : null; }\n /**\n The last child of the fragment, or `null` if it is empty.\n */\n get lastChild() { return this.content.length ? this.content[this.content.length - 1] : null; }\n /**\n The number of child nodes in this fragment.\n */\n get childCount() { return this.content.length; }\n /**\n Get the child node at the given index. Raise an error when the\n index is out of range.\n */\n child(index) {\n let found = this.content[index];\n if (!found)\n throw new RangeError(\"Index \" + index + \" out of range for \" + this);\n return found;\n }\n /**\n Get the child node at the given index, if it exists.\n */\n maybeChild(index) {\n return this.content[index] || null;\n }\n /**\n Call `f` for every child node, passing the node, its offset\n into this parent node, and its index.\n */\n forEach(f) {\n for (let i = 0, p = 0; i < this.content.length; i++) {\n let child = this.content[i];\n f(child, p, i);\n p += child.nodeSize;\n }\n }\n /**\n Find the first position at which this fragment and another\n fragment differ, or `null` if they are the same.\n */\n findDiffStart(other, pos = 0) {\n return findDiffStart(this, other, pos);\n }\n /**\n Find the first position, searching from the end, at which this\n fragment and the given fragment differ, or `null` if they are\n the same. Since this position will not be the same in both\n nodes, an object with two separate positions is returned.\n */\n findDiffEnd(other, pos = this.size, otherPos = other.size) {\n return findDiffEnd(this, other, pos, otherPos);\n }\n /**\n Find the index and inner offset corresponding to a given relative\n position in this fragment. The result object will be reused\n (overwritten) the next time the function is called. @internal\n */\n findIndex(pos) {\n if (pos == 0)\n return retIndex(0, pos);\n if (pos == this.size)\n return retIndex(this.content.length, pos);\n if (pos > this.size || pos < 0)\n throw new RangeError(`Position ${pos} outside of fragment (${this})`);\n for (let i = 0, curPos = 0;; i++) {\n let cur = this.child(i), end = curPos + cur.nodeSize;\n if (end >= pos) {\n if (end == pos)\n return retIndex(i + 1, end);\n return retIndex(i, curPos);\n }\n curPos = end;\n }\n }\n /**\n Return a debugging string that describes this fragment.\n */\n toString() { return \"<\" + this.toStringInner() + \">\"; }\n /**\n @internal\n */\n toStringInner() { return this.content.join(\", \"); }\n /**\n Create a JSON-serializeable representation of this fragment.\n */\n toJSON() {\n return this.content.length ? this.content.map(n => n.toJSON()) : null;\n }\n /**\n Deserialize a fragment from its JSON representation.\n */\n static fromJSON(schema, value) {\n if (!value)\n return Fragment.empty;\n if (!Array.isArray(value))\n throw new RangeError(\"Invalid input for Fragment.fromJSON\");\n return Fragment.fromArray(value.map(schema.nodeFromJSON));\n }\n /**\n Build a fragment from an array of nodes. Ensures that adjacent\n text nodes with the same marks are joined together.\n */\n static fromArray(array) {\n if (!array.length)\n return Fragment.empty;\n let joined, size = 0;\n for (let i = 0; i < array.length; i++) {\n let node = array[i];\n size += node.nodeSize;\n if (i && node.isText && array[i - 1].sameMarkup(node)) {\n if (!joined)\n joined = array.slice(0, i);\n joined[joined.length - 1] = node\n .withText(joined[joined.length - 1].text + node.text);\n }\n else if (joined) {\n joined.push(node);\n }\n }\n return new Fragment(joined || array, size);\n }\n /**\n Create a fragment from something that can be interpreted as a\n set of nodes. For `null`, it returns the empty fragment. For a\n fragment, the fragment itself. For a node or array of nodes, a\n fragment containing those nodes.\n */\n static from(nodes) {\n if (!nodes)\n return Fragment.empty;\n if (nodes instanceof Fragment)\n return nodes;\n if (Array.isArray(nodes))\n return this.fromArray(nodes);\n if (nodes.attrs)\n return new Fragment([nodes], nodes.nodeSize);\n throw new RangeError(\"Can not convert \" + nodes + \" to a Fragment\" +\n (nodes.nodesBetween ? \" (looks like multiple versions of prosemirror-model were loaded)\" : \"\"));\n }\n}\n/**\nAn empty fragment. Intended to be reused whenever a node doesn't\ncontain anything (rather than allocating a new empty fragment for\neach leaf node).\n*/\nFragment.empty = new Fragment([], 0);\nconst found = { index: 0, offset: 0 };\nfunction retIndex(index, offset) {\n found.index = index;\n found.offset = offset;\n return found;\n}\n\nfunction compareDeep(a, b) {\n if (a === b)\n return true;\n if (!(a && typeof a == \"object\") ||\n !(b && typeof b == \"object\"))\n return false;\n let array = Array.isArray(a);\n if (Array.isArray(b) != array)\n return false;\n if (array) {\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!compareDeep(a[i], b[i]))\n return false;\n }\n else {\n for (let p in a)\n if (!(p in b) || !compareDeep(a[p], b[p]))\n return false;\n for (let p in b)\n if (!(p in a))\n return false;\n }\n return true;\n}\n\n/**\nA mark is a piece of information that can be attached to a node,\nsuch as it being emphasized, in code font, or a link. It has a\ntype and optionally a set of attributes that provide further\ninformation (such as the target of the link). Marks are created\nthrough a `Schema`, which controls which types exist and which\nattributes they have.\n*/\nclass Mark {\n /**\n @internal\n */\n constructor(\n /**\n The type of this mark.\n */\n type, \n /**\n The attributes associated with this mark.\n */\n attrs) {\n this.type = type;\n this.attrs = attrs;\n }\n /**\n Given a set of marks, create a new set which contains this one as\n well, in the right position. If this mark is already in the set,\n the set itself is returned. If any marks that are set to be\n [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present,\n those are replaced by this one.\n */\n addToSet(set) {\n let copy, placed = false;\n for (let i = 0; i < set.length; i++) {\n let other = set[i];\n if (this.eq(other))\n return set;\n if (this.type.excludes(other.type)) {\n if (!copy)\n copy = set.slice(0, i);\n }\n else if (other.type.excludes(this.type)) {\n return set;\n }\n else {\n if (!placed && other.type.rank > this.type.rank) {\n if (!copy)\n copy = set.slice(0, i);\n copy.push(this);\n placed = true;\n }\n if (copy)\n copy.push(other);\n }\n }\n if (!copy)\n copy = set.slice();\n if (!placed)\n copy.push(this);\n return copy;\n }\n /**\n Remove this mark from the given set, returning a new set. If this\n mark is not in the set, the set itself is returned.\n */\n removeFromSet(set) {\n for (let i = 0; i < set.length; i++)\n if (this.eq(set[i]))\n return set.slice(0, i).concat(set.slice(i + 1));\n return set;\n }\n /**\n Test whether this mark is in the given set of marks.\n */\n isInSet(set) {\n for (let i = 0; i < set.length; i++)\n if (this.eq(set[i]))\n return true;\n return false;\n }\n /**\n Test whether this mark has the same type and attributes as\n another mark.\n */\n eq(other) {\n return this == other ||\n (this.type == other.type && compareDeep(this.attrs, other.attrs));\n }\n /**\n Convert this mark to a JSON-serializeable representation.\n */\n toJSON() {\n let obj = { type: this.type.name };\n for (let _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n return obj;\n }\n /**\n Deserialize a mark from JSON.\n */\n static fromJSON(schema, json) {\n if (!json)\n throw new RangeError(\"Invalid input for Mark.fromJSON\");\n let type = schema.marks[json.type];\n if (!type)\n throw new RangeError(`There is no mark type ${json.type} in this schema`);\n let mark = type.create(json.attrs);\n type.checkAttrs(mark.attrs);\n return mark;\n }\n /**\n Test whether two sets of marks are identical.\n */\n static sameSet(a, b) {\n if (a == b)\n return true;\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!a[i].eq(b[i]))\n return false;\n return true;\n }\n /**\n Create a properly sorted mark set from null, a single mark, or an\n unsorted array of marks.\n */\n static setFrom(marks) {\n if (!marks || Array.isArray(marks) && marks.length == 0)\n return Mark.none;\n if (marks instanceof Mark)\n return [marks];\n let copy = marks.slice();\n copy.sort((a, b) => a.type.rank - b.type.rank);\n return copy;\n }\n}\n/**\nThe empty set of marks.\n*/\nMark.none = [];\n\n/**\nError type raised by [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) when\ngiven an invalid replacement.\n*/\nclass ReplaceError extends Error {\n}\n/**\nA slice represents a piece cut out of a larger document. It\nstores not only a fragment, but also the depth up to which nodes on\nboth side are ‘open’ (cut through).\n*/\nclass Slice {\n /**\n Create a slice. When specifying a non-zero open depth, you must\n make sure that there are nodes of at least that depth at the\n appropriate side of the fragment—i.e. if the fragment is an\n empty paragraph node, `openStart` and `openEnd` can't be greater\n than 1.\n \n It is not necessary for the content of open nodes to conform to\n the schema's content constraints, though it should be a valid\n start/end/middle for such a node, depending on which sides are\n open.\n */\n constructor(\n /**\n The slice's content.\n */\n content, \n /**\n The open depth at the start of the fragment.\n */\n openStart, \n /**\n The open depth at the end.\n */\n openEnd) {\n this.content = content;\n this.openStart = openStart;\n this.openEnd = openEnd;\n }\n /**\n The size this slice would add when inserted into a document.\n */\n get size() {\n return this.content.size - this.openStart - this.openEnd;\n }\n /**\n @internal\n */\n insertAt(pos, fragment) {\n let content = insertInto(this.content, pos + this.openStart, fragment, this.openStart + 1, this.openEnd + 1);\n return content && new Slice(content, this.openStart, this.openEnd);\n }\n /**\n @internal\n */\n removeBetween(from, to) {\n return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd);\n }\n /**\n Tests whether this slice is equal to another slice.\n */\n eq(other) {\n return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd;\n }\n /**\n @internal\n */\n toString() {\n return this.content + \"(\" + this.openStart + \",\" + this.openEnd + \")\";\n }\n /**\n Convert a slice to a JSON-serializable representation.\n */\n toJSON() {\n if (!this.content.size)\n return null;\n let json = { content: this.content.toJSON() };\n if (this.openStart > 0)\n json.openStart = this.openStart;\n if (this.openEnd > 0)\n json.openEnd = this.openEnd;\n return json;\n }\n /**\n Deserialize a slice from its JSON representation.\n */\n static fromJSON(schema, json) {\n if (!json)\n return Slice.empty;\n let openStart = json.openStart || 0, openEnd = json.openEnd || 0;\n if (typeof openStart != \"number\" || typeof openEnd != \"number\")\n throw new RangeError(\"Invalid input for Slice.fromJSON\");\n return new Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd);\n }\n /**\n Create a slice from a fragment by taking the maximum possible\n open value on both side of the fragment.\n */\n static maxOpen(fragment, openIsolating = true) {\n let openStart = 0, openEnd = 0;\n for (let n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild)\n openStart++;\n for (let n = fragment.lastChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.lastChild)\n openEnd++;\n return new Slice(fragment, openStart, openEnd);\n }\n}\n/**\nThe empty slice.\n*/\nSlice.empty = new Slice(Fragment.empty, 0, 0);\nfunction removeRange(content, from, to) {\n let { index, offset } = content.findIndex(from), child = content.maybeChild(index);\n let { index: indexTo, offset: offsetTo } = content.findIndex(to);\n if (offset == from || child.isText) {\n if (offsetTo != to && !content.child(indexTo).isText)\n throw new RangeError(\"Removing non-flat range\");\n return content.cut(0, from).append(content.cut(to));\n }\n if (index != indexTo)\n throw new RangeError(\"Removing non-flat range\");\n return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)));\n}\nfunction insertInto(content, dist, insert, openStart, openEnd, parent) {\n let { index, offset } = content.findIndex(dist), child = content.maybeChild(index);\n if (offset == dist || child.isText) {\n if (parent && openStart <= 0 && openEnd <= 0 && !parent.canReplace(index, index, insert))\n return null;\n return content.cut(0, dist).append(insert).append(content.cut(dist));\n }\n let inner = insertInto(child.content, dist - offset - 1, insert, index == 0 ? openStart - 1 : 0, index == content.childCount - 1 ? openEnd - 1 : 0, child);\n return inner && content.replaceChild(index, child.copy(inner));\n}\nfunction replace($from, $to, slice) {\n if (slice.openStart > $from.depth)\n throw new ReplaceError(\"Inserted content deeper than insertion position\");\n if ($from.depth - slice.openStart != $to.depth - slice.openEnd)\n throw new ReplaceError(\"Inconsistent open depths\");\n return replaceOuter($from, $to, slice, 0);\n}\nfunction replaceOuter($from, $to, slice, depth) {\n let index = $from.index(depth), node = $from.node(depth);\n if (index == $to.index(depth) && depth < $from.depth - slice.openStart) {\n let inner = replaceOuter($from, $to, slice, depth + 1);\n return node.copy(node.content.replaceChild(index, inner));\n }\n else if (!slice.content.size) {\n return close(node, replaceTwoWay($from, $to, depth));\n }\n else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { // Simple, flat case\n let parent = $from.parent, content = parent.content;\n return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)));\n }\n else {\n let { start, end } = prepareSliceForReplace(slice, $from);\n return close(node, replaceThreeWay($from, start, end, $to, depth));\n }\n}\nfunction checkJoin(main, sub) {\n if (!sub.type.compatibleContent(main.type))\n throw new ReplaceError(\"Cannot join \" + sub.type.name + \" onto \" + main.type.name);\n}\nfunction joinable($before, $after, depth) {\n let node = $before.node(depth);\n checkJoin(node, $after.node(depth));\n return node;\n}\nfunction addNode(child, target) {\n let last = target.length - 1;\n if (last >= 0 && child.isText && child.sameMarkup(target[last]))\n target[last] = child.withText(target[last].text + child.text);\n else\n target.push(child);\n}\nfunction addRange($start, $end, depth, target) {\n let node = ($end || $start).node(depth);\n let startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount;\n if ($start) {\n startIndex = $start.index(depth);\n if ($start.depth > depth) {\n startIndex++;\n }\n else if ($start.textOffset) {\n addNode($start.nodeAfter, target);\n startIndex++;\n }\n }\n for (let i = startIndex; i < endIndex; i++)\n addNode(node.child(i), target);\n if ($end && $end.depth == depth && $end.textOffset)\n addNode($end.nodeBefore, target);\n}\nfunction close(node, content) {\n node.type.checkContent(content);\n return node.copy(content);\n}\nfunction replaceThreeWay($from, $start, $end, $to, depth) {\n let openStart = $from.depth > depth && joinable($from, $start, depth + 1);\n let openEnd = $to.depth > depth && joinable($end, $to, depth + 1);\n let content = [];\n addRange(null, $from, depth, content);\n if (openStart && openEnd && $start.index(depth) == $end.index(depth)) {\n checkJoin(openStart, openEnd);\n addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content);\n }\n else {\n if (openStart)\n addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content);\n addRange($start, $end, depth, content);\n if (openEnd)\n addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\nfunction replaceTwoWay($from, $to, depth) {\n let content = [];\n addRange(null, $from, depth, content);\n if ($from.depth > depth) {\n let type = joinable($from, $to, depth + 1);\n addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\nfunction prepareSliceForReplace(slice, $along) {\n let extra = $along.depth - slice.openStart, parent = $along.node(extra);\n let node = parent.copy(slice.content);\n for (let i = extra - 1; i >= 0; i--)\n node = $along.node(i).copy(Fragment.from(node));\n return { start: node.resolveNoCache(slice.openStart + extra),\n end: node.resolveNoCache(node.content.size - slice.openEnd - extra) };\n}\n\n/**\nYou can [_resolve_](https://prosemirror.net/docs/ref/#model.Node.resolve) a position to get more\ninformation about it. Objects of this class represent such a\nresolved position, providing various pieces of context\ninformation, and some helper methods.\n\nThroughout this interface, methods that take an optional `depth`\nparameter will interpret undefined as `this.depth` and negative\nnumbers as `this.depth + value`.\n*/\nclass ResolvedPos {\n /**\n @internal\n */\n constructor(\n /**\n The position that was resolved.\n */\n pos, \n /**\n @internal\n */\n path, \n /**\n The offset this position has into its parent node.\n */\n parentOffset) {\n this.pos = pos;\n this.path = path;\n this.parentOffset = parentOffset;\n this.depth = path.length / 3 - 1;\n }\n /**\n @internal\n */\n resolveDepth(val) {\n if (val == null)\n return this.depth;\n if (val < 0)\n return this.depth + val;\n return val;\n }\n /**\n The parent node that the position points into. Note that even if\n a position points into a text node, that node is not considered\n the parent—text nodes are ‘flat’ in this model, and have no content.\n */\n get parent() { return this.node(this.depth); }\n /**\n The root node in which the position was resolved.\n */\n get doc() { return this.node(0); }\n /**\n The ancestor node at the given level. `p.node(p.depth)` is the\n same as `p.parent`.\n */\n node(depth) { return this.path[this.resolveDepth(depth) * 3]; }\n /**\n The index into the ancestor at the given level. If this points\n at the 3rd node in the 2nd paragraph on the top level, for\n example, `p.index(0)` is 1 and `p.index(1)` is 2.\n */\n index(depth) { return this.path[this.resolveDepth(depth) * 3 + 1]; }\n /**\n The index pointing after this position into the ancestor at the\n given level.\n */\n indexAfter(depth) {\n depth = this.resolveDepth(depth);\n return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1);\n }\n /**\n The (absolute) position at the start of the node at the given\n level.\n */\n start(depth) {\n depth = this.resolveDepth(depth);\n return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n }\n /**\n The (absolute) position at the end of the node at the given\n level.\n */\n end(depth) {\n depth = this.resolveDepth(depth);\n return this.start(depth) + this.node(depth).content.size;\n }\n /**\n The (absolute) position directly before the wrapping node at the\n given level, or, when `depth` is `this.depth + 1`, the original\n position.\n */\n before(depth) {\n depth = this.resolveDepth(depth);\n if (!depth)\n throw new RangeError(\"There is no position before the top-level node\");\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1];\n }\n /**\n The (absolute) position directly after the wrapping node at the\n given level, or the original position when `depth` is `this.depth + 1`.\n */\n after(depth) {\n depth = this.resolveDepth(depth);\n if (!depth)\n throw new RangeError(\"There is no position after the top-level node\");\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize;\n }\n /**\n When this position points into a text node, this returns the\n distance between the position and the start of the text node.\n Will be zero for positions that point between nodes.\n */\n get textOffset() { return this.pos - this.path[this.path.length - 1]; }\n /**\n Get the node directly after the position, if any. If the position\n points into a text node, only the part of that node after the\n position is returned.\n */\n get nodeAfter() {\n let parent = this.parent, index = this.index(this.depth);\n if (index == parent.childCount)\n return null;\n let dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index);\n return dOff ? parent.child(index).cut(dOff) : child;\n }\n /**\n Get the node directly before the position, if any. If the\n position points into a text node, only the part of that node\n before the position is returned.\n */\n get nodeBefore() {\n let index = this.index(this.depth);\n let dOff = this.pos - this.path[this.path.length - 1];\n if (dOff)\n return this.parent.child(index).cut(0, dOff);\n return index == 0 ? null : this.parent.child(index - 1);\n }\n /**\n Get the position at the given index in the parent node at the\n given depth (which defaults to `this.depth`).\n */\n posAtIndex(index, depth) {\n depth = this.resolveDepth(depth);\n let node = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n for (let i = 0; i < index; i++)\n pos += node.child(i).nodeSize;\n return pos;\n }\n /**\n Get the marks at this position, factoring in the surrounding\n marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the\n position is at the start of a non-empty node, the marks of the\n node after it (if any) are returned.\n */\n marks() {\n let parent = this.parent, index = this.index();\n // In an empty parent, return the empty array\n if (parent.content.size == 0)\n return Mark.none;\n // When inside a text node, just return the text node's marks\n if (this.textOffset)\n return parent.child(index).marks;\n let main = parent.maybeChild(index - 1), other = parent.maybeChild(index);\n // If the `after` flag is true of there is no node before, make\n // the node after this position the main reference.\n if (!main) {\n let tmp = main;\n main = other;\n other = tmp;\n }\n // Use all marks in the main node, except those that have\n // `inclusive` set to false and are not present in the other node.\n let marks = main.marks;\n for (var i = 0; i < marks.length; i++)\n if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks)))\n marks = marks[i--].removeFromSet(marks);\n return marks;\n }\n /**\n Get the marks after the current position, if any, except those\n that are non-inclusive and not present at position `$end`. This\n is mostly useful for getting the set of marks to preserve after a\n deletion. Will return `null` if this position is at the end of\n its parent node or its parent node isn't a textblock (in which\n case no marks should be preserved).\n */\n marksAcross($end) {\n let after = this.parent.maybeChild(this.index());\n if (!after || !after.isInline)\n return null;\n let marks = after.marks, next = $end.parent.maybeChild($end.index());\n for (var i = 0; i < marks.length; i++)\n if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks)))\n marks = marks[i--].removeFromSet(marks);\n return marks;\n }\n /**\n The depth up to which this position and the given (non-resolved)\n position share the same parent nodes.\n */\n sharedDepth(pos) {\n for (let depth = this.depth; depth > 0; depth--)\n if (this.start(depth) <= pos && this.end(depth) >= pos)\n return depth;\n return 0;\n }\n /**\n Returns a range based on the place where this position and the\n given position diverge around block content. If both point into\n the same textblock, for example, a range around that textblock\n will be returned. If they point into different blocks, the range\n around those blocks in their shared ancestor is returned. You can\n pass in an optional predicate that will be called with a parent\n node to see if a range into that parent is acceptable.\n */\n blockRange(other = this, pred) {\n if (other.pos < this.pos)\n return other.blockRange(this);\n for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--)\n if (other.pos <= this.end(d) && (!pred || pred(this.node(d))))\n return new NodeRange(this, other, d);\n return null;\n }\n /**\n Query whether the given position shares the same parent node.\n */\n sameParent(other) {\n return this.pos - this.parentOffset == other.pos - other.parentOffset;\n }\n /**\n Return the greater of this and the given position.\n */\n max(other) {\n return other.pos > this.pos ? other : this;\n }\n /**\n Return the smaller of this and the given position.\n */\n min(other) {\n return other.pos < this.pos ? other : this;\n }\n /**\n @internal\n */\n toString() {\n let str = \"\";\n for (let i = 1; i <= this.depth; i++)\n str += (str ? \"/\" : \"\") + this.node(i).type.name + \"_\" + this.index(i - 1);\n return str + \":\" + this.parentOffset;\n }\n /**\n @internal\n */\n static resolve(doc, pos) {\n if (!(pos >= 0 && pos <= doc.content.size))\n throw new RangeError(\"Position \" + pos + \" out of range\");\n let path = [];\n let start = 0, parentOffset = pos;\n for (let node = doc;;) {\n let { index, offset } = node.content.findIndex(parentOffset);\n let rem = parentOffset - offset;\n path.push(node, index, start + offset);\n if (!rem)\n break;\n node = node.child(index);\n if (node.isText)\n break;\n parentOffset = rem - 1;\n start += offset + 1;\n }\n return new ResolvedPos(pos, path, parentOffset);\n }\n /**\n @internal\n */\n static resolveCached(doc, pos) {\n let cache = resolveCache.get(doc);\n if (cache) {\n for (let i = 0; i < cache.elts.length; i++) {\n let elt = cache.elts[i];\n if (elt.pos == pos)\n return elt;\n }\n }\n else {\n resolveCache.set(doc, cache = new ResolveCache);\n }\n let result = cache.elts[cache.i] = ResolvedPos.resolve(doc, pos);\n cache.i = (cache.i + 1) % resolveCacheSize;\n return result;\n }\n}\nclass ResolveCache {\n constructor() {\n this.elts = [];\n this.i = 0;\n }\n}\nconst resolveCacheSize = 12, resolveCache = new WeakMap();\n/**\nRepresents a flat range of content, i.e. one that starts and\nends in the same node.\n*/\nclass NodeRange {\n /**\n Construct a node range. `$from` and `$to` should point into the\n same node until at least the given `depth`, since a node range\n denotes an adjacent set of nodes in a single parent node.\n */\n constructor(\n /**\n A resolved position along the start of the content. May have a\n `depth` greater than this object's `depth` property, since\n these are the positions that were used to compute the range,\n not re-resolved positions directly at its boundaries.\n */\n $from, \n /**\n A position along the end of the content. See\n caveat for [`$from`](https://prosemirror.net/docs/ref/#model.NodeRange.$from).\n */\n $to, \n /**\n The depth of the node that this range points into.\n */\n depth) {\n this.$from = $from;\n this.$to = $to;\n this.depth = depth;\n }\n /**\n The position at the start of the range.\n */\n get start() { return this.$from.before(this.depth + 1); }\n /**\n The position at the end of the range.\n */\n get end() { return this.$to.after(this.depth + 1); }\n /**\n The parent node that the range points into.\n */\n get parent() { return this.$from.node(this.depth); }\n /**\n The start index of the range in the parent node.\n */\n get startIndex() { return this.$from.index(this.depth); }\n /**\n The end index of the range in the parent node.\n */\n get endIndex() { return this.$to.indexAfter(this.depth); }\n}\n\nconst emptyAttrs = Object.create(null);\n/**\nThis class represents a node in the tree that makes up a\nProseMirror document. So a document is an instance of `Node`, with\nchildren that are also instances of `Node`.\n\nNodes are persistent data structures. Instead of changing them, you\ncreate new ones with the content you want. Old ones keep pointing\nat the old document shape. This is made cheaper by sharing\nstructure between the old and new data as much as possible, which a\ntree shape like this (without back pointers) makes easy.\n\n**Do not** directly mutate the properties of a `Node` object. See\n[the guide](https://prosemirror.net/docs/guide/#doc) for more information.\n*/\nclass Node {\n /**\n @internal\n */\n constructor(\n /**\n The type of node that this is.\n */\n type, \n /**\n An object mapping attribute names to values. The kind of\n attributes allowed and required are\n [determined](https://prosemirror.net/docs/ref/#model.NodeSpec.attrs) by the node type.\n */\n attrs, \n // A fragment holding the node's children.\n content, \n /**\n The marks (things like whether it is emphasized or part of a\n link) applied to this node.\n */\n marks = Mark.none) {\n this.type = type;\n this.attrs = attrs;\n this.marks = marks;\n this.content = content || Fragment.empty;\n }\n /**\n The array of this node's child nodes.\n */\n get children() { return this.content.content; }\n /**\n The size of this node, as defined by the integer-based [indexing\n scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the\n amount of characters. For other leaf nodes, it is one. For\n non-leaf nodes, it is the size of the content plus two (the\n start and end token).\n */\n get nodeSize() { return this.isLeaf ? 1 : 2 + this.content.size; }\n /**\n The number of children that the node has.\n */\n get childCount() { return this.content.childCount; }\n /**\n Get the child node at the given index. Raises an error when the\n index is out of range.\n */\n child(index) { return this.content.child(index); }\n /**\n Get the child node at the given index, if it exists.\n */\n maybeChild(index) { return this.content.maybeChild(index); }\n /**\n Call `f` for every child node, passing the node, its offset\n into this parent node, and its index.\n */\n forEach(f) { this.content.forEach(f); }\n /**\n Invoke a callback for all descendant nodes recursively overlapping\n the given two positions that are relative to start of this\n node's content. This includes all ancestors of the nodes\n containing the two positions. The callback is invoked with the\n node, its position relative to the original node (method receiver),\n its parent node, and its child index. When the callback returns\n false for a given node, that node's children will not be\n recursed over. The last parameter can be used to specify a\n starting position to count from.\n */\n nodesBetween(from, to, f, startPos = 0) {\n this.content.nodesBetween(from, to, f, startPos, this);\n }\n /**\n Call the given callback for every descendant node. Doesn't\n descend into a node when the callback returns `false`.\n */\n descendants(f) {\n this.nodesBetween(0, this.content.size, f);\n }\n /**\n Concatenates all the text nodes found in this fragment and its\n children.\n */\n get textContent() {\n return (this.isLeaf && this.type.spec.leafText)\n ? this.type.spec.leafText(this)\n : this.textBetween(0, this.content.size, \"\");\n }\n /**\n Get all text between positions `from` and `to`. When\n `blockSeparator` is given, it will be inserted to separate text\n from different block nodes. If `leafText` is given, it'll be\n inserted for every non-text leaf node encountered, otherwise\n [`leafText`](https://prosemirror.net/docs/ref/#model.NodeSpec.leafText) will be used.\n */\n textBetween(from, to, blockSeparator, leafText) {\n return this.content.textBetween(from, to, blockSeparator, leafText);\n }\n /**\n Returns this node's first child, or `null` if there are no\n children.\n */\n get firstChild() { return this.content.firstChild; }\n /**\n Returns this node's last child, or `null` if there are no\n children.\n */\n get lastChild() { return this.content.lastChild; }\n /**\n Test whether two nodes represent the same piece of document.\n */\n eq(other) {\n return this == other || (this.sameMarkup(other) && this.content.eq(other.content));\n }\n /**\n Compare the markup (type, attributes, and marks) of this node to\n those of another. Returns `true` if both have the same markup.\n */\n sameMarkup(other) {\n return this.hasMarkup(other.type, other.attrs, other.marks);\n }\n /**\n Check whether this node's markup correspond to the given type,\n attributes, and marks.\n */\n hasMarkup(type, attrs, marks) {\n return this.type == type &&\n compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) &&\n Mark.sameSet(this.marks, marks || Mark.none);\n }\n /**\n Create a new node with the same markup as this node, containing\n the given content (or empty, if no content is given).\n */\n copy(content = null) {\n if (content == this.content)\n return this;\n return new Node(this.type, this.attrs, content, this.marks);\n }\n /**\n Create a copy of this node, with the given set of marks instead\n of the node's own marks.\n */\n mark(marks) {\n return marks == this.marks ? this : new Node(this.type, this.attrs, this.content, marks);\n }\n /**\n Create a copy of this node with only the content between the\n given positions. If `to` is not given, it defaults to the end of\n the node.\n */\n cut(from, to = this.content.size) {\n if (from == 0 && to == this.content.size)\n return this;\n return this.copy(this.content.cut(from, to));\n }\n /**\n Cut out the part of the document between the given positions, and\n return it as a `Slice` object.\n */\n slice(from, to = this.content.size, includeParents = false) {\n if (from == to)\n return Slice.empty;\n let $from = this.resolve(from), $to = this.resolve(to);\n let depth = includeParents ? 0 : $from.sharedDepth(to);\n let start = $from.start(depth), node = $from.node(depth);\n let content = node.content.cut($from.pos - start, $to.pos - start);\n return new Slice(content, $from.depth - depth, $to.depth - depth);\n }\n /**\n Replace the part of the document between the given positions with\n the given slice. The slice must 'fit', meaning its open sides\n must be able to connect to the surrounding content, and its\n content nodes must be valid children for the node they are placed\n into. If any of this is violated, an error of type\n [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.\n */\n replace(from, to, slice) {\n return replace(this.resolve(from), this.resolve(to), slice);\n }\n /**\n Find the node directly after the given position.\n */\n nodeAt(pos) {\n for (let node = this;;) {\n let { index, offset } = node.content.findIndex(pos);\n node = node.maybeChild(index);\n if (!node)\n return null;\n if (offset == pos || node.isText)\n return node;\n pos -= offset + 1;\n }\n }\n /**\n Find the (direct) child node after the given offset, if any,\n and return it along with its index and offset relative to this\n node.\n */\n childAfter(pos) {\n let { index, offset } = this.content.findIndex(pos);\n return { node: this.content.maybeChild(index), index, offset };\n }\n /**\n Find the (direct) child node before the given offset, if any,\n and return it along with its index and offset relative to this\n node.\n */\n childBefore(pos) {\n if (pos == 0)\n return { node: null, index: 0, offset: 0 };\n let { index, offset } = this.content.findIndex(pos);\n if (offset < pos)\n return { node: this.content.child(index), index, offset };\n let node = this.content.child(index - 1);\n return { node, index: index - 1, offset: offset - node.nodeSize };\n }\n /**\n Resolve the given position in the document, returning an\n [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.\n */\n resolve(pos) { return ResolvedPos.resolveCached(this, pos); }\n /**\n @internal\n */\n resolveNoCache(pos) { return ResolvedPos.resolve(this, pos); }\n /**\n Test whether a given mark or mark type occurs in this document\n between the two given positions.\n */\n rangeHasMark(from, to, type) {\n let found = false;\n if (to > from)\n this.nodesBetween(from, to, node => {\n if (type.isInSet(node.marks))\n found = true;\n return !found;\n });\n return found;\n }\n /**\n True when this is a block (non-inline node)\n */\n get isBlock() { return this.type.isBlock; }\n /**\n True when this is a textblock node, a block node with inline\n content.\n */\n get isTextblock() { return this.type.isTextblock; }\n /**\n True when this node allows inline content.\n */\n get inlineContent() { return this.type.inlineContent; }\n /**\n True when this is an inline node (a text node or a node that can\n appear among text).\n */\n get isInline() { return this.type.isInline; }\n /**\n True when this is a text node.\n */\n get isText() { return this.type.isText; }\n /**\n True when this is a leaf node.\n */\n get isLeaf() { return this.type.isLeaf; }\n /**\n True when this is an atom, i.e. when it does not have directly\n editable content. This is usually the same as `isLeaf`, but can\n be configured with the [`atom` property](https://prosemirror.net/docs/ref/#model.NodeSpec.atom)\n on a node's spec (typically used when the node is displayed as\n an uneditable [node view](https://prosemirror.net/docs/ref/#view.NodeView)).\n */\n get isAtom() { return this.type.isAtom; }\n /**\n Return a string representation of this node for debugging\n purposes.\n */\n toString() {\n if (this.type.spec.toDebugString)\n return this.type.spec.toDebugString(this);\n let name = this.type.name;\n if (this.content.size)\n name += \"(\" + this.content.toStringInner() + \")\";\n return wrapMarks(this.marks, name);\n }\n /**\n Get the content match in this node at the given index.\n */\n contentMatchAt(index) {\n let match = this.type.contentMatch.matchFragment(this.content, 0, index);\n if (!match)\n throw new Error(\"Called contentMatchAt on a node with invalid content\");\n return match;\n }\n /**\n Test whether replacing the range between `from` and `to` (by\n child index) with the given replacement fragment (which defaults\n to the empty fragment) would leave the node's content valid. You\n can optionally pass `start` and `end` indices into the\n replacement fragment.\n */\n canReplace(from, to, replacement = Fragment.empty, start = 0, end = replacement.childCount) {\n let one = this.contentMatchAt(from).matchFragment(replacement, start, end);\n let two = one && one.matchFragment(this.content, to);\n if (!two || !two.validEnd)\n return false;\n for (let i = start; i < end; i++)\n if (!this.type.allowsMarks(replacement.child(i).marks))\n return false;\n return true;\n }\n /**\n Test whether replacing the range `from` to `to` (by index) with\n a node of the given type would leave the node's content valid.\n */\n canReplaceWith(from, to, type, marks) {\n if (marks && !this.type.allowsMarks(marks))\n return false;\n let start = this.contentMatchAt(from).matchType(type);\n let end = start && start.matchFragment(this.content, to);\n return end ? end.validEnd : false;\n }\n /**\n Test whether the given node's content could be appended to this\n node. If that node is empty, this will only return true if there\n is at least one node type that can appear in both nodes (to avoid\n merging completely incompatible nodes).\n */\n canAppend(other) {\n if (other.content.size)\n return this.canReplace(this.childCount, this.childCount, other.content);\n else\n return this.type.compatibleContent(other.type);\n }\n /**\n Check whether this node and its descendants conform to the\n schema, and raise an exception when they do not.\n */\n check() {\n this.type.checkContent(this.content);\n this.type.checkAttrs(this.attrs);\n let copy = Mark.none;\n for (let i = 0; i < this.marks.length; i++) {\n let mark = this.marks[i];\n mark.type.checkAttrs(mark.attrs);\n copy = mark.addToSet(copy);\n }\n if (!Mark.sameSet(copy, this.marks))\n throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(m => m.type.name)}`);\n this.content.forEach(node => node.check());\n }\n /**\n Return a JSON-serializeable representation of this node.\n */\n toJSON() {\n let obj = { type: this.type.name };\n for (let _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n if (this.content.size)\n obj.content = this.content.toJSON();\n if (this.marks.length)\n obj.marks = this.marks.map(n => n.toJSON());\n return obj;\n }\n /**\n Deserialize a node from its JSON representation.\n */\n static fromJSON(schema, json) {\n if (!json)\n throw new RangeError(\"Invalid input for Node.fromJSON\");\n let marks = undefined;\n if (json.marks) {\n if (!Array.isArray(json.marks))\n throw new RangeError(\"Invalid mark data for Node.fromJSON\");\n marks = json.marks.map(schema.markFromJSON);\n }\n if (json.type == \"text\") {\n if (typeof json.text != \"string\")\n throw new RangeError(\"Invalid text node in JSON\");\n return schema.text(json.text, marks);\n }\n let content = Fragment.fromJSON(schema, json.content);\n let node = schema.nodeType(json.type).create(json.attrs, content, marks);\n node.type.checkAttrs(node.attrs);\n return node;\n }\n}\nNode.prototype.text = undefined;\nclass TextNode extends Node {\n /**\n @internal\n */\n constructor(type, attrs, content, marks) {\n super(type, attrs, null, marks);\n if (!content)\n throw new RangeError(\"Empty text nodes are not allowed\");\n this.text = content;\n }\n toString() {\n if (this.type.spec.toDebugString)\n return this.type.spec.toDebugString(this);\n return wrapMarks(this.marks, JSON.stringify(this.text));\n }\n get textContent() { return this.text; }\n textBetween(from, to) { return this.text.slice(from, to); }\n get nodeSize() { return this.text.length; }\n mark(marks) {\n return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks);\n }\n withText(text) {\n if (text == this.text)\n return this;\n return new TextNode(this.type, this.attrs, text, this.marks);\n }\n cut(from = 0, to = this.text.length) {\n if (from == 0 && to == this.text.length)\n return this;\n return this.withText(this.text.slice(from, to));\n }\n eq(other) {\n return this.sameMarkup(other) && this.text == other.text;\n }\n toJSON() {\n let base = super.toJSON();\n base.text = this.text;\n return base;\n }\n}\nfunction wrapMarks(marks, str) {\n for (let i = marks.length - 1; i >= 0; i--)\n str = marks[i].type.name + \"(\" + str + \")\";\n return str;\n}\n\n/**\nInstances of this class represent a match state of a node type's\n[content expression](https://prosemirror.net/docs/ref/#model.NodeSpec.content), and can be used to\nfind out whether further content matches here, and whether a given\nposition is a valid end of the node.\n*/\nclass ContentMatch {\n /**\n @internal\n */\n constructor(\n /**\n True when this match state represents a valid end of the node.\n */\n validEnd) {\n this.validEnd = validEnd;\n /**\n @internal\n */\n this.next = [];\n /**\n @internal\n */\n this.wrapCache = [];\n }\n /**\n @internal\n */\n static parse(string, nodeTypes) {\n let stream = new TokenStream(string, nodeTypes);\n if (stream.next == null)\n return ContentMatch.empty;\n let expr = parseExpr(stream);\n if (stream.next)\n stream.err(\"Unexpected trailing text\");\n let match = dfa(nfa(expr));\n checkForDeadEnds(match, stream);\n return match;\n }\n /**\n Match a node type, returning a match after that node if\n successful.\n */\n matchType(type) {\n for (let i = 0; i < this.next.length; i++)\n if (this.next[i].type == type)\n return this.next[i].next;\n return null;\n }\n /**\n Try to match a fragment. Returns the resulting match when\n successful.\n */\n matchFragment(frag, start = 0, end = frag.childCount) {\n let cur = this;\n for (let i = start; cur && i < end; i++)\n cur = cur.matchType(frag.child(i).type);\n return cur;\n }\n /**\n @internal\n */\n get inlineContent() {\n return this.next.length != 0 && this.next[0].type.isInline;\n }\n /**\n Get the first matching node type at this match position that can\n be generated.\n */\n get defaultType() {\n for (let i = 0; i < this.next.length; i++) {\n let { type } = this.next[i];\n if (!(type.isText || type.hasRequiredAttrs()))\n return type;\n }\n return null;\n }\n /**\n @internal\n */\n compatible(other) {\n for (let i = 0; i < this.next.length; i++)\n for (let j = 0; j < other.next.length; j++)\n if (this.next[i].type == other.next[j].type)\n return true;\n return false;\n }\n /**\n Try to match the given fragment, and if that fails, see if it can\n be made to match by inserting nodes in front of it. When\n successful, return a fragment of inserted nodes (which may be\n empty if nothing had to be inserted). When `toEnd` is true, only\n return a fragment if the resulting match goes to the end of the\n content expression.\n */\n fillBefore(after, toEnd = false, startIndex = 0) {\n let seen = [this];\n function search(match, types) {\n let finished = match.matchFragment(after, startIndex);\n if (finished && (!toEnd || finished.validEnd))\n return Fragment.from(types.map(tp => tp.createAndFill()));\n for (let i = 0; i < match.next.length; i++) {\n let { type, next } = match.next[i];\n if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {\n seen.push(next);\n let found = search(next, types.concat(type));\n if (found)\n return found;\n }\n }\n return null;\n }\n return search(this, []);\n }\n /**\n Find a set of wrapping node types that would allow a node of the\n given type to appear at this position. The result may be empty\n (when it fits directly) and will be null when no such wrapping\n exists.\n */\n findWrapping(target) {\n for (let i = 0; i < this.wrapCache.length; i += 2)\n if (this.wrapCache[i] == target)\n return this.wrapCache[i + 1];\n let computed = this.computeWrapping(target);\n this.wrapCache.push(target, computed);\n return computed;\n }\n /**\n @internal\n */\n computeWrapping(target) {\n let seen = Object.create(null), active = [{ match: this, type: null, via: null }];\n while (active.length) {\n let current = active.shift(), match = current.match;\n if (match.matchType(target)) {\n let result = [];\n for (let obj = current; obj.type; obj = obj.via)\n result.push(obj.type);\n return result.reverse();\n }\n for (let i = 0; i < match.next.length; i++) {\n let { type, next } = match.next[i];\n if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) {\n active.push({ match: type.contentMatch, type, via: current });\n seen[type.name] = true;\n }\n }\n }\n return null;\n }\n /**\n The number of outgoing edges this node has in the finite\n automaton that describes the content expression.\n */\n get edgeCount() {\n return this.next.length;\n }\n /**\n Get the _n_​th outgoing edge from this node in the finite\n automaton that describes the content expression.\n */\n edge(n) {\n if (n >= this.next.length)\n throw new RangeError(`There's no ${n}th edge in this content match`);\n return this.next[n];\n }\n /**\n @internal\n */\n toString() {\n let seen = [];\n function scan(m) {\n seen.push(m);\n for (let i = 0; i < m.next.length; i++)\n if (seen.indexOf(m.next[i].next) == -1)\n scan(m.next[i].next);\n }\n scan(this);\n return seen.map((m, i) => {\n let out = i + (m.validEnd ? \"*\" : \" \") + \" \";\n for (let i = 0; i < m.next.length; i++)\n out += (i ? \", \" : \"\") + m.next[i].type.name + \"->\" + seen.indexOf(m.next[i].next);\n return out;\n }).join(\"\\n\");\n }\n}\n/**\n@internal\n*/\nContentMatch.empty = new ContentMatch(true);\nclass TokenStream {\n constructor(string, nodeTypes) {\n this.string = string;\n this.nodeTypes = nodeTypes;\n this.inline = null;\n this.pos = 0;\n this.tokens = string.split(/\\s*(?=\\b|\\W|$)/);\n if (this.tokens[this.tokens.length - 1] == \"\")\n this.tokens.pop();\n if (this.tokens[0] == \"\")\n this.tokens.shift();\n }\n get next() { return this.tokens[this.pos]; }\n eat(tok) { return this.next == tok && (this.pos++ || true); }\n err(str) { throw new SyntaxError(str + \" (in content expression '\" + this.string + \"')\"); }\n}\nfunction parseExpr(stream) {\n let exprs = [];\n do {\n exprs.push(parseExprSeq(stream));\n } while (stream.eat(\"|\"));\n return exprs.length == 1 ? exprs[0] : { type: \"choice\", exprs };\n}\nfunction parseExprSeq(stream) {\n let exprs = [];\n do {\n exprs.push(parseExprSubscript(stream));\n } while (stream.next && stream.next != \")\" && stream.next != \"|\");\n return exprs.length == 1 ? exprs[0] : { type: \"seq\", exprs };\n}\nfunction parseExprSubscript(stream) {\n let expr = parseExprAtom(stream);\n for (;;) {\n if (stream.eat(\"+\"))\n expr = { type: \"plus\", expr };\n else if (stream.eat(\"*\"))\n expr = { type: \"star\", expr };\n else if (stream.eat(\"?\"))\n expr = { type: \"opt\", expr };\n else if (stream.eat(\"{\"))\n expr = parseExprRange(stream, expr);\n else\n break;\n }\n return expr;\n}\nfunction parseNum(stream) {\n if (/\\D/.test(stream.next))\n stream.err(\"Expected number, got '\" + stream.next + \"'\");\n let result = Number(stream.next);\n stream.pos++;\n return result;\n}\nfunction parseExprRange(stream, expr) {\n let min = parseNum(stream), max = min;\n if (stream.eat(\",\")) {\n if (stream.next != \"}\")\n max = parseNum(stream);\n else\n max = -1;\n }\n if (!stream.eat(\"}\"))\n stream.err(\"Unclosed braced range\");\n return { type: \"range\", min, max, expr };\n}\nfunction resolveName(stream, name) {\n let types = stream.nodeTypes, type = types[name];\n if (type)\n return [type];\n let result = [];\n for (let typeName in types) {\n let type = types[typeName];\n if (type.isInGroup(name))\n result.push(type);\n }\n if (result.length == 0)\n stream.err(\"No node type or group '\" + name + \"' found\");\n return result;\n}\nfunction parseExprAtom(stream) {\n if (stream.eat(\"(\")) {\n let expr = parseExpr(stream);\n if (!stream.eat(\")\"))\n stream.err(\"Missing closing paren\");\n return expr;\n }\n else if (!/\\W/.test(stream.next)) {\n let exprs = resolveName(stream, stream.next).map(type => {\n if (stream.inline == null)\n stream.inline = type.isInline;\n else if (stream.inline != type.isInline)\n stream.err(\"Mixing inline and block content\");\n return { type: \"name\", value: type };\n });\n stream.pos++;\n return exprs.length == 1 ? exprs[0] : { type: \"choice\", exprs };\n }\n else {\n stream.err(\"Unexpected token '\" + stream.next + \"'\");\n }\n}\n// Construct an NFA from an expression as returned by the parser. The\n// NFA is represented as an array of states, which are themselves\n// arrays of edges, which are `{term, to}` objects. The first state is\n// the entry state and the last node is the success state.\n//\n// Note that unlike typical NFAs, the edge ordering in this one is\n// significant, in that it is used to contruct filler content when\n// necessary.\nfunction nfa(expr) {\n let nfa = [[]];\n connect(compile(expr, 0), node());\n return nfa;\n function node() { return nfa.push([]) - 1; }\n function edge(from, to, term) {\n let edge = { term, to };\n nfa[from].push(edge);\n return edge;\n }\n function connect(edges, to) {\n edges.forEach(edge => edge.to = to);\n }\n function compile(expr, from) {\n if (expr.type == \"choice\") {\n return expr.exprs.reduce((out, expr) => out.concat(compile(expr, from)), []);\n }\n else if (expr.type == \"seq\") {\n for (let i = 0;; i++) {\n let next = compile(expr.exprs[i], from);\n if (i == expr.exprs.length - 1)\n return next;\n connect(next, from = node());\n }\n }\n else if (expr.type == \"star\") {\n let loop = node();\n edge(from, loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)];\n }\n else if (expr.type == \"plus\") {\n let loop = node();\n connect(compile(expr.expr, from), loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)];\n }\n else if (expr.type == \"opt\") {\n return [edge(from)].concat(compile(expr.expr, from));\n }\n else if (expr.type == \"range\") {\n let cur = from;\n for (let i = 0; i < expr.min; i++) {\n let next = node();\n connect(compile(expr.expr, cur), next);\n cur = next;\n }\n if (expr.max == -1) {\n connect(compile(expr.expr, cur), cur);\n }\n else {\n for (let i = expr.min; i < expr.max; i++) {\n let next = node();\n edge(cur, next);\n connect(compile(expr.expr, cur), next);\n cur = next;\n }\n }\n return [edge(cur)];\n }\n else if (expr.type == \"name\") {\n return [edge(from, undefined, expr.value)];\n }\n else {\n throw new Error(\"Unknown expr type\");\n }\n }\n}\nfunction cmp(a, b) { return b - a; }\n// Get the set of nodes reachable by null edges from `node`. Omit\n// nodes with only a single null-out-edge, since they may lead to\n// needless duplicated nodes.\nfunction nullFrom(nfa, node) {\n let result = [];\n scan(node);\n return result.sort(cmp);\n function scan(node) {\n let edges = nfa[node];\n if (edges.length == 1 && !edges[0].term)\n return scan(edges[0].to);\n result.push(node);\n for (let i = 0; i < edges.length; i++) {\n let { term, to } = edges[i];\n if (!term && result.indexOf(to) == -1)\n scan(to);\n }\n }\n}\n// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set\n// of state objects (`ContentMatch` instances) with transitions\n// between them.\nfunction dfa(nfa) {\n let labeled = Object.create(null);\n return explore(nullFrom(nfa, 0));\n function explore(states) {\n let out = [];\n states.forEach(node => {\n nfa[node].forEach(({ term, to }) => {\n if (!term)\n return;\n let set;\n for (let i = 0; i < out.length; i++)\n if (out[i][0] == term)\n set = out[i][1];\n nullFrom(nfa, to).forEach(node => {\n if (!set)\n out.push([term, set = []]);\n if (set.indexOf(node) == -1)\n set.push(node);\n });\n });\n });\n let state = labeled[states.join(\",\")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1);\n for (let i = 0; i < out.length; i++) {\n let states = out[i][1].sort(cmp);\n state.next.push({ type: out[i][0], next: labeled[states.join(\",\")] || explore(states) });\n }\n return state;\n }\n}\nfunction checkForDeadEnds(match, stream) {\n for (let i = 0, work = [match]; i < work.length; i++) {\n let state = work[i], dead = !state.validEnd, nodes = [];\n for (let j = 0; j < state.next.length; j++) {\n let { type, next } = state.next[j];\n nodes.push(type.name);\n if (dead && !(type.isText || type.hasRequiredAttrs()))\n dead = false;\n if (work.indexOf(next) == -1)\n work.push(next);\n }\n if (dead)\n stream.err(\"Only non-generatable nodes (\" + nodes.join(\", \") + \") in a required position (see https://prosemirror.net/docs/guide/#generatable)\");\n }\n}\n\n// For node types where all attrs have a default value (or which don't\n// have any attributes), build up a single reusable default attribute\n// object, and use it for all nodes that don't specify specific\n// attributes.\nfunction defaultAttrs(attrs) {\n let defaults = Object.create(null);\n for (let attrName in attrs) {\n let attr = attrs[attrName];\n if (!attr.hasDefault)\n return null;\n defaults[attrName] = attr.default;\n }\n return defaults;\n}\nfunction computeAttrs(attrs, value) {\n let built = Object.create(null);\n for (let name in attrs) {\n let given = value && value[name];\n if (given === undefined) {\n let attr = attrs[name];\n if (attr.hasDefault)\n given = attr.default;\n else\n throw new RangeError(\"No value supplied for attribute \" + name);\n }\n built[name] = given;\n }\n return built;\n}\nfunction checkAttrs(attrs, values, type, name) {\n for (let name in values)\n if (!(name in attrs))\n throw new RangeError(`Unsupported attribute ${name} for ${type} of type ${name}`);\n for (let name in attrs) {\n let attr = attrs[name];\n if (attr.validate)\n attr.validate(values[name]);\n }\n}\nfunction initAttrs(typeName, attrs) {\n let result = Object.create(null);\n if (attrs)\n for (let name in attrs)\n result[name] = new Attribute(typeName, name, attrs[name]);\n return result;\n}\n/**\nNode types are objects allocated once per `Schema` and used to\n[tag](https://prosemirror.net/docs/ref/#model.Node.type) `Node` instances. They contain information\nabout the node type, such as its name and what kind of node it\nrepresents.\n*/\nclass NodeType {\n /**\n @internal\n */\n constructor(\n /**\n The name the node type has in this schema.\n */\n name, \n /**\n A link back to the `Schema` the node type belongs to.\n */\n schema, \n /**\n The spec that this type is based on\n */\n spec) {\n this.name = name;\n this.schema = schema;\n this.spec = spec;\n /**\n The set of marks allowed in this node. `null` means all marks\n are allowed.\n */\n this.markSet = null;\n this.groups = spec.group ? spec.group.split(\" \") : [];\n this.attrs = initAttrs(name, spec.attrs);\n this.defaultAttrs = defaultAttrs(this.attrs);\n this.contentMatch = null;\n this.inlineContent = null;\n this.isBlock = !(spec.inline || name == \"text\");\n this.isText = name == \"text\";\n }\n /**\n True if this is an inline type.\n */\n get isInline() { return !this.isBlock; }\n /**\n True if this is a textblock type, a block that contains inline\n content.\n */\n get isTextblock() { return this.isBlock && this.inlineContent; }\n /**\n True for node types that allow no content.\n */\n get isLeaf() { return this.contentMatch == ContentMatch.empty; }\n /**\n True when this node is an atom, i.e. when it does not have\n directly editable content.\n */\n get isAtom() { return this.isLeaf || !!this.spec.atom; }\n /**\n Return true when this node type is part of the given\n [group](https://prosemirror.net/docs/ref/#model.NodeSpec.group).\n */\n isInGroup(group) {\n return this.groups.indexOf(group) > -1;\n }\n /**\n The node type's [whitespace](https://prosemirror.net/docs/ref/#model.NodeSpec.whitespace) option.\n */\n get whitespace() {\n return this.spec.whitespace || (this.spec.code ? \"pre\" : \"normal\");\n }\n /**\n Tells you whether this node type has any required attributes.\n */\n hasRequiredAttrs() {\n for (let n in this.attrs)\n if (this.attrs[n].isRequired)\n return true;\n return false;\n }\n /**\n Indicates whether this node allows some of the same content as\n the given node type.\n */\n compatibleContent(other) {\n return this == other || this.contentMatch.compatible(other.contentMatch);\n }\n /**\n @internal\n */\n computeAttrs(attrs) {\n if (!attrs && this.defaultAttrs)\n return this.defaultAttrs;\n else\n return computeAttrs(this.attrs, attrs);\n }\n /**\n Create a `Node` of this type. The given attributes are\n checked and defaulted (you can pass `null` to use the type's\n defaults entirely, if no required attributes exist). `content`\n may be a `Fragment`, a node, an array of nodes, or\n `null`. Similarly `marks` may be `null` to default to the empty\n set of marks.\n */\n create(attrs = null, content, marks) {\n if (this.isText)\n throw new Error(\"NodeType.create can't construct text nodes\");\n return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks));\n }\n /**\n Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content\n against the node type's content restrictions, and throw an error\n if it doesn't match.\n */\n createChecked(attrs = null, content, marks) {\n content = Fragment.from(content);\n this.checkContent(content);\n return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));\n }\n /**\n Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is\n necessary to add nodes to the start or end of the given fragment\n to make it fit the node. If no fitting wrapping can be found,\n return null. Note that, due to the fact that required nodes can\n always be created, this will always succeed if you pass null or\n `Fragment.empty` as content.\n */\n createAndFill(attrs = null, content, marks) {\n attrs = this.computeAttrs(attrs);\n content = Fragment.from(content);\n if (content.size) {\n let before = this.contentMatch.fillBefore(content);\n if (!before)\n return null;\n content = before.append(content);\n }\n let matched = this.contentMatch.matchFragment(content);\n let after = matched && matched.fillBefore(Fragment.empty, true);\n if (!after)\n return null;\n return new Node(this, attrs, content.append(after), Mark.setFrom(marks));\n }\n /**\n Returns true if the given fragment is valid content for this node\n type.\n */\n validContent(content) {\n let result = this.contentMatch.matchFragment(content);\n if (!result || !result.validEnd)\n return false;\n for (let i = 0; i < content.childCount; i++)\n if (!this.allowsMarks(content.child(i).marks))\n return false;\n return true;\n }\n /**\n Throws a RangeError if the given fragment is not valid content for this\n node type.\n @internal\n */\n checkContent(content) {\n if (!this.validContent(content))\n throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0, 50)}`);\n }\n /**\n @internal\n */\n checkAttrs(attrs) {\n checkAttrs(this.attrs, attrs, \"node\", this.name);\n }\n /**\n Check whether the given mark type is allowed in this node.\n */\n allowsMarkType(markType) {\n return this.markSet == null || this.markSet.indexOf(markType) > -1;\n }\n /**\n Test whether the given set of marks are allowed in this node.\n */\n allowsMarks(marks) {\n if (this.markSet == null)\n return true;\n for (let i = 0; i < marks.length; i++)\n if (!this.allowsMarkType(marks[i].type))\n return false;\n return true;\n }\n /**\n Removes the marks that are not allowed in this node from the given set.\n */\n allowedMarks(marks) {\n if (this.markSet == null)\n return marks;\n let copy;\n for (let i = 0; i < marks.length; i++) {\n if (!this.allowsMarkType(marks[i].type)) {\n if (!copy)\n copy = marks.slice(0, i);\n }\n else if (copy) {\n copy.push(marks[i]);\n }\n }\n return !copy ? marks : copy.length ? copy : Mark.none;\n }\n /**\n @internal\n */\n static compile(nodes, schema) {\n let result = Object.create(null);\n nodes.forEach((name, spec) => result[name] = new NodeType(name, schema, spec));\n let topType = schema.spec.topNode || \"doc\";\n if (!result[topType])\n throw new RangeError(\"Schema is missing its top node type ('\" + topType + \"')\");\n if (!result.text)\n throw new RangeError(\"Every schema needs a 'text' type\");\n for (let _ in result.text.attrs)\n throw new RangeError(\"The text node type should not have attributes\");\n return result;\n }\n}\nfunction validateType(typeName, attrName, type) {\n let types = type.split(\"|\");\n return (value) => {\n let name = value === null ? \"null\" : typeof value;\n if (types.indexOf(name) < 0)\n throw new RangeError(`Expected value of type ${types} for attribute ${attrName} on type ${typeName}, got ${name}`);\n };\n}\n// Attribute descriptors\nclass Attribute {\n constructor(typeName, attrName, options) {\n this.hasDefault = Object.prototype.hasOwnProperty.call(options, \"default\");\n this.default = options.default;\n this.validate = typeof options.validate == \"string\" ? validateType(typeName, attrName, options.validate) : options.validate;\n }\n get isRequired() {\n return !this.hasDefault;\n }\n}\n// Marks\n/**\nLike nodes, marks (which are associated with nodes to signify\nthings like emphasis or being part of a link) are\n[tagged](https://prosemirror.net/docs/ref/#model.Mark.type) with type objects, which are\ninstantiated once per `Schema`.\n*/\nclass MarkType {\n /**\n @internal\n */\n constructor(\n /**\n The name of the mark type.\n */\n name, \n /**\n @internal\n */\n rank, \n /**\n The schema that this mark type instance is part of.\n */\n schema, \n /**\n The spec on which the type is based.\n */\n spec) {\n this.name = name;\n this.rank = rank;\n this.schema = schema;\n this.spec = spec;\n this.attrs = initAttrs(name, spec.attrs);\n this.excluded = null;\n let defaults = defaultAttrs(this.attrs);\n this.instance = defaults ? new Mark(this, defaults) : null;\n }\n /**\n Create a mark of this type. `attrs` may be `null` or an object\n containing only some of the mark's attributes. The others, if\n they have defaults, will be added.\n */\n create(attrs = null) {\n if (!attrs && this.instance)\n return this.instance;\n return new Mark(this, computeAttrs(this.attrs, attrs));\n }\n /**\n @internal\n */\n static compile(marks, schema) {\n let result = Object.create(null), rank = 0;\n marks.forEach((name, spec) => result[name] = new MarkType(name, rank++, schema, spec));\n return result;\n }\n /**\n When there is a mark of this type in the given set, a new set\n without it is returned. Otherwise, the input set is returned.\n */\n removeFromSet(set) {\n for (var i = 0; i < set.length; i++)\n if (set[i].type == this) {\n set = set.slice(0, i).concat(set.slice(i + 1));\n i--;\n }\n return set;\n }\n /**\n Tests whether there is a mark of this type in the given set.\n */\n isInSet(set) {\n for (let i = 0; i < set.length; i++)\n if (set[i].type == this)\n return set[i];\n }\n /**\n @internal\n */\n checkAttrs(attrs) {\n checkAttrs(this.attrs, attrs, \"mark\", this.name);\n }\n /**\n Queries whether a given mark type is\n [excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one.\n */\n excludes(other) {\n return this.excluded.indexOf(other) > -1;\n }\n}\n/**\nA document schema. Holds [node](https://prosemirror.net/docs/ref/#model.NodeType) and [mark\ntype](https://prosemirror.net/docs/ref/#model.MarkType) objects for the nodes and marks that may\noccur in conforming documents, and provides functionality for\ncreating and deserializing such documents.\n\nWhen given, the type parameters provide the names of the nodes and\nmarks in this schema.\n*/\nclass Schema {\n /**\n Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).\n */\n constructor(spec) {\n /**\n The [linebreak\n replacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement) node defined\n in this schema, if any.\n */\n this.linebreakReplacement = null;\n /**\n An object for storing whatever values modules may want to\n compute and cache per schema. (If you want to store something\n in it, try to use property names unlikely to clash.)\n */\n this.cached = Object.create(null);\n let instanceSpec = this.spec = {};\n for (let prop in spec)\n instanceSpec[prop] = spec[prop];\n instanceSpec.nodes = OrderedMap.from(spec.nodes),\n instanceSpec.marks = OrderedMap.from(spec.marks || {}),\n this.nodes = NodeType.compile(this.spec.nodes, this);\n this.marks = MarkType.compile(this.spec.marks, this);\n let contentExprCache = Object.create(null);\n for (let prop in this.nodes) {\n if (prop in this.marks)\n throw new RangeError(prop + \" can not be both a node and a mark\");\n let type = this.nodes[prop], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] ||\n (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n if (type.spec.linebreakReplacement) {\n if (this.linebreakReplacement)\n throw new RangeError(\"Multiple linebreak nodes defined\");\n if (!type.isInline || !type.isLeaf)\n throw new RangeError(\"Linebreak replacement nodes must be inline leaf nodes\");\n this.linebreakReplacement = type;\n }\n type.markSet = markExpr == \"_\" ? null :\n markExpr ? gatherMarks(this, markExpr.split(\" \")) :\n markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (let prop in this.marks) {\n let type = this.marks[prop], excl = type.spec.excludes;\n type.excluded = excl == null ? [type] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n this.nodeFromJSON = json => Node.fromJSON(this, json);\n this.markFromJSON = json => Mark.fromJSON(this, json);\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n this.cached.wrappings = Object.create(null);\n }\n /**\n Create a node in this schema. The `type` may be a string or a\n `NodeType` instance. Attributes will be extended with defaults,\n `content` may be a `Fragment`, `null`, a `Node`, or an array of\n nodes.\n */\n node(type, attrs = null, content, marks) {\n if (typeof type == \"string\")\n type = this.nodeType(type);\n else if (!(type instanceof NodeType))\n throw new RangeError(\"Invalid node type: \" + type);\n else if (type.schema != this)\n throw new RangeError(\"Node type from different schema used (\" + type.name + \")\");\n return type.createChecked(attrs, content, marks);\n }\n /**\n Create a text node in the schema. Empty text nodes are not\n allowed.\n */\n text(text, marks) {\n let type = this.nodes.text;\n return new TextNode(type, type.defaultAttrs, text, Mark.setFrom(marks));\n }\n /**\n Create a mark with the given type and attributes.\n */\n mark(type, attrs) {\n if (typeof type == \"string\")\n type = this.marks[type];\n return type.create(attrs);\n }\n /**\n @internal\n */\n nodeType(name) {\n let found = this.nodes[name];\n if (!found)\n throw new RangeError(\"Unknown node type: \" + name);\n return found;\n }\n}\nfunction gatherMarks(schema, marks) {\n let found = [];\n for (let i = 0; i < marks.length; i++) {\n let name = marks[i], mark = schema.marks[name], ok = mark;\n if (mark) {\n found.push(mark);\n }\n else {\n for (let prop in schema.marks) {\n let mark = schema.marks[prop];\n if (name == \"_\" || (mark.spec.group && mark.spec.group.split(\" \").indexOf(name) > -1))\n found.push(ok = mark);\n }\n }\n if (!ok)\n throw new SyntaxError(\"Unknown mark type: '\" + marks[i] + \"'\");\n }\n return found;\n}\n\nfunction isTagRule(rule) { return rule.tag != null; }\nfunction isStyleRule(rule) { return rule.style != null; }\n/**\nA DOM parser represents a strategy for parsing DOM content into a\nProseMirror document conforming to a given schema. Its behavior is\ndefined by an array of [rules](https://prosemirror.net/docs/ref/#model.ParseRule).\n*/\nclass DOMParser {\n /**\n Create a parser that targets the given schema, using the given\n parsing rules.\n */\n constructor(\n /**\n The schema into which the parser parses.\n */\n schema, \n /**\n The set of [parse rules](https://prosemirror.net/docs/ref/#model.ParseRule) that the parser\n uses, in order of precedence.\n */\n rules) {\n this.schema = schema;\n this.rules = rules;\n /**\n @internal\n */\n this.tags = [];\n /**\n @internal\n */\n this.styles = [];\n let matchedStyles = this.matchedStyles = [];\n rules.forEach(rule => {\n if (isTagRule(rule)) {\n this.tags.push(rule);\n }\n else if (isStyleRule(rule)) {\n let prop = /[^=]*/.exec(rule.style)[0];\n if (matchedStyles.indexOf(prop) < 0)\n matchedStyles.push(prop);\n this.styles.push(rule);\n }\n });\n // Only normalize list elements when lists in the schema can't directly contain themselves\n this.normalizeLists = !this.tags.some(r => {\n if (!/^(ul|ol)\\b/.test(r.tag) || !r.node)\n return false;\n let node = schema.nodes[r.node];\n return node.contentMatch.matchType(node);\n });\n }\n /**\n Parse a document from the content of a DOM node.\n */\n parse(dom, options = {}) {\n let context = new ParseContext(this, options, false);\n context.addAll(dom, Mark.none, options.from, options.to);\n return context.finish();\n }\n /**\n Parses the content of the given DOM node, like\n [`parse`](https://prosemirror.net/docs/ref/#model.DOMParser.parse), and takes the same set of\n options. But unlike that method, which produces a whole node,\n this one returns a slice that is open at the sides, meaning that\n the schema constraints aren't applied to the start of nodes to\n the left of the input and the end of nodes at the end.\n */\n parseSlice(dom, options = {}) {\n let context = new ParseContext(this, options, true);\n context.addAll(dom, Mark.none, options.from, options.to);\n return Slice.maxOpen(context.finish());\n }\n /**\n @internal\n */\n matchTag(dom, context, after) {\n for (let i = after ? this.tags.indexOf(after) + 1 : 0; i < this.tags.length; i++) {\n let rule = this.tags[i];\n if (matches(dom, rule.tag) &&\n (rule.namespace === undefined || dom.namespaceURI == rule.namespace) &&\n (!rule.context || context.matchesContext(rule.context))) {\n if (rule.getAttrs) {\n let result = rule.getAttrs(dom);\n if (result === false)\n continue;\n rule.attrs = result || undefined;\n }\n return rule;\n }\n }\n }\n /**\n @internal\n */\n matchStyle(prop, value, context, after) {\n for (let i = after ? this.styles.indexOf(after) + 1 : 0; i < this.styles.length; i++) {\n let rule = this.styles[i], style = rule.style;\n if (style.indexOf(prop) != 0 ||\n rule.context && !context.matchesContext(rule.context) ||\n // Test that the style string either precisely matches the prop,\n // or has an '=' sign after the prop, followed by the given\n // value.\n style.length > prop.length &&\n (style.charCodeAt(prop.length) != 61 || style.slice(prop.length + 1) != value))\n continue;\n if (rule.getAttrs) {\n let result = rule.getAttrs(value);\n if (result === false)\n continue;\n rule.attrs = result || undefined;\n }\n return rule;\n }\n }\n /**\n @internal\n */\n static schemaRules(schema) {\n let result = [];\n function insert(rule) {\n let priority = rule.priority == null ? 50 : rule.priority, i = 0;\n for (; i < result.length; i++) {\n let next = result[i], nextPriority = next.priority == null ? 50 : next.priority;\n if (nextPriority < priority)\n break;\n }\n result.splice(i, 0, rule);\n }\n for (let name in schema.marks) {\n let rules = schema.marks[name].spec.parseDOM;\n if (rules)\n rules.forEach(rule => {\n insert(rule = copy(rule));\n if (!(rule.mark || rule.ignore || rule.clearMark))\n rule.mark = name;\n });\n }\n for (let name in schema.nodes) {\n let rules = schema.nodes[name].spec.parseDOM;\n if (rules)\n rules.forEach(rule => {\n insert(rule = copy(rule));\n if (!(rule.node || rule.ignore || rule.mark))\n rule.node = name;\n });\n }\n return result;\n }\n /**\n Construct a DOM parser using the parsing rules listed in a\n schema's [node specs](https://prosemirror.net/docs/ref/#model.NodeSpec.parseDOM), reordered by\n [priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).\n */\n static fromSchema(schema) {\n return schema.cached.domParser ||\n (schema.cached.domParser = new DOMParser(schema, DOMParser.schemaRules(schema)));\n }\n}\nconst blockTags = {\n address: true, article: true, aside: true, blockquote: true, canvas: true,\n dd: true, div: true, dl: true, fieldset: true, figcaption: true, figure: true,\n footer: true, form: true, h1: true, h2: true, h3: true, h4: true, h5: true,\n h6: true, header: true, hgroup: true, hr: true, li: true, noscript: true, ol: true,\n output: true, p: true, pre: true, section: true, table: true, tfoot: true, ul: true\n};\nconst ignoreTags = {\n head: true, noscript: true, object: true, script: true, style: true, title: true\n};\nconst listTags = { ol: true, ul: true };\n// Using a bitfield for node context options\nconst OPT_PRESERVE_WS = 1, OPT_PRESERVE_WS_FULL = 2, OPT_OPEN_LEFT = 4;\nfunction wsOptionsFor(type, preserveWhitespace, base) {\n if (preserveWhitespace != null)\n return (preserveWhitespace ? OPT_PRESERVE_WS : 0) |\n (preserveWhitespace === \"full\" ? OPT_PRESERVE_WS_FULL : 0);\n return type && type.whitespace == \"pre\" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base & ~OPT_OPEN_LEFT;\n}\nclass NodeContext {\n constructor(type, attrs, marks, solid, match, options) {\n this.type = type;\n this.attrs = attrs;\n this.marks = marks;\n this.solid = solid;\n this.options = options;\n this.content = [];\n // Marks applied to the node's children\n this.activeMarks = Mark.none;\n this.match = match || (options & OPT_OPEN_LEFT ? null : type.contentMatch);\n }\n findWrapping(node) {\n if (!this.match) {\n if (!this.type)\n return [];\n let fill = this.type.contentMatch.fillBefore(Fragment.from(node));\n if (fill) {\n this.match = this.type.contentMatch.matchFragment(fill);\n }\n else {\n let start = this.type.contentMatch, wrap;\n if (wrap = start.findWrapping(node.type)) {\n this.match = start;\n return wrap;\n }\n else {\n return null;\n }\n }\n }\n return this.match.findWrapping(node.type);\n }\n finish(openEnd) {\n if (!(this.options & OPT_PRESERVE_WS)) { // Strip trailing whitespace\n let last = this.content[this.content.length - 1], m;\n if (last && last.isText && (m = /[ \\t\\r\\n\\u000c]+$/.exec(last.text))) {\n let text = last;\n if (last.text.length == m[0].length)\n this.content.pop();\n else\n this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m[0].length));\n }\n }\n let content = Fragment.from(this.content);\n if (!openEnd && this.match)\n content = content.append(this.match.fillBefore(Fragment.empty, true));\n return this.type ? this.type.create(this.attrs, content, this.marks) : content;\n }\n inlineContext(node) {\n if (this.type)\n return this.type.inlineContent;\n if (this.content.length)\n return this.content[0].isInline;\n return node.parentNode && !blockTags.hasOwnProperty(node.parentNode.nodeName.toLowerCase());\n }\n}\nclass ParseContext {\n constructor(\n // The parser we are using.\n parser, \n // The options passed to this parse.\n options, isOpen) {\n this.parser = parser;\n this.options = options;\n this.isOpen = isOpen;\n this.open = 0;\n this.localPreserveWS = false;\n let topNode = options.topNode, topContext;\n let topOptions = wsOptionsFor(null, options.preserveWhitespace, 0) | (isOpen ? OPT_OPEN_LEFT : 0);\n if (topNode)\n topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, true, options.topMatch || topNode.type.contentMatch, topOptions);\n else if (isOpen)\n topContext = new NodeContext(null, null, Mark.none, true, null, topOptions);\n else\n topContext = new NodeContext(parser.schema.topNodeType, null, Mark.none, true, null, topOptions);\n this.nodes = [topContext];\n this.find = options.findPositions;\n this.needsBlock = false;\n }\n get top() {\n return this.nodes[this.open];\n }\n // Add a DOM node to the content. Text is inserted as text node,\n // otherwise, the node is passed to `addElement` or, if it has a\n // `style` attribute, `addElementWithStyles`.\n addDOM(dom, marks) {\n if (dom.nodeType == 3)\n this.addTextNode(dom, marks);\n else if (dom.nodeType == 1)\n this.addElement(dom, marks);\n }\n addTextNode(dom, marks) {\n let value = dom.nodeValue;\n let top = this.top, preserveWS = (top.options & OPT_PRESERVE_WS_FULL) ? \"full\"\n : this.localPreserveWS || (top.options & OPT_PRESERVE_WS) > 0;\n let { schema } = this.parser;\n if (preserveWS === \"full\" ||\n top.inlineContext(dom) ||\n /[^ \\t\\r\\n\\u000c]/.test(value)) {\n if (!preserveWS) {\n value = value.replace(/[ \\t\\r\\n\\u000c]+/g, \" \");\n // If this starts with whitespace, and there is no node before it, or\n // a hard break, or a text node that ends with whitespace, strip the\n // leading space.\n if (/^[ \\t\\r\\n\\u000c]/.test(value) && this.open == this.nodes.length - 1) {\n let nodeBefore = top.content[top.content.length - 1];\n let domNodeBefore = dom.previousSibling;\n if (!nodeBefore ||\n (domNodeBefore && domNodeBefore.nodeName == 'BR') ||\n (nodeBefore.isText && /[ \\t\\r\\n\\u000c]$/.test(nodeBefore.text)))\n value = value.slice(1);\n }\n }\n else if (preserveWS === \"full\") {\n value = value.replace(/\\r\\n?/g, \"\\n\");\n }\n else if (schema.linebreakReplacement && /[\\r\\n]/.test(value) && this.top.findWrapping(schema.linebreakReplacement.create())) {\n let lines = value.split(/\\r?\\n|\\r/);\n for (let i = 0; i < lines.length; i++) {\n if (i)\n this.insertNode(schema.linebreakReplacement.create(), marks, true);\n if (lines[i])\n this.insertNode(schema.text(lines[i]), marks, !/\\S/.test(lines[i]));\n }\n value = \"\";\n }\n else {\n value = value.replace(/\\r?\\n|\\r/g, \" \");\n }\n if (value)\n this.insertNode(schema.text(value), marks, !/\\S/.test(value));\n this.findInText(dom);\n }\n else {\n this.findInside(dom);\n }\n }\n // Try to find a handler for the given tag and use that to parse. If\n // none is found, the element's content nodes are added directly.\n addElement(dom, marks, matchAfter) {\n let outerWS = this.localPreserveWS, top = this.top;\n if (dom.tagName == \"PRE\" || /pre/.test(dom.style && dom.style.whiteSpace))\n this.localPreserveWS = true;\n let name = dom.nodeName.toLowerCase(), ruleID;\n if (listTags.hasOwnProperty(name) && this.parser.normalizeLists)\n normalizeList(dom);\n let rule = (this.options.ruleFromNode && this.options.ruleFromNode(dom)) ||\n (ruleID = this.parser.matchTag(dom, this, matchAfter));\n out: if (rule ? rule.ignore : ignoreTags.hasOwnProperty(name)) {\n this.findInside(dom);\n this.ignoreFallback(dom, marks);\n }\n else if (!rule || rule.skip || rule.closeParent) {\n if (rule && rule.closeParent)\n this.open = Math.max(0, this.open - 1);\n else if (rule && rule.skip.nodeType)\n dom = rule.skip;\n let sync, oldNeedsBlock = this.needsBlock;\n if (blockTags.hasOwnProperty(name)) {\n if (top.content.length && top.content[0].isInline && this.open) {\n this.open--;\n top = this.top;\n }\n sync = true;\n if (!top.type)\n this.needsBlock = true;\n }\n else if (!dom.firstChild) {\n this.leafFallback(dom, marks);\n break out;\n }\n let innerMarks = rule && rule.skip ? marks : this.readStyles(dom, marks);\n if (innerMarks)\n this.addAll(dom, innerMarks);\n if (sync)\n this.sync(top);\n this.needsBlock = oldNeedsBlock;\n }\n else {\n let innerMarks = this.readStyles(dom, marks);\n if (innerMarks)\n this.addElementByRule(dom, rule, innerMarks, rule.consuming === false ? ruleID : undefined);\n }\n this.localPreserveWS = outerWS;\n }\n // Called for leaf DOM nodes that would otherwise be ignored\n leafFallback(dom, marks) {\n if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent)\n this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\"), marks);\n }\n // Called for ignored nodes\n ignoreFallback(dom, marks) {\n // Ignored BR nodes should at least create an inline context\n if (dom.nodeName == \"BR\" && (!this.top.type || !this.top.type.inlineContent))\n this.findPlace(this.parser.schema.text(\"-\"), marks, true);\n }\n // Run any style parser associated with the node's styles. Either\n // return an updated array of marks, or null to indicate some of the\n // styles had a rule with `ignore` set.\n readStyles(dom, marks) {\n let styles = dom.style;\n // Because many properties will only show up in 'normalized' form\n // in `style.item` (i.e. text-decoration becomes\n // text-decoration-line, text-decoration-color, etc), we directly\n // query the styles mentioned in our rules instead of iterating\n // over the items.\n if (styles && styles.length)\n for (let i = 0; i < this.parser.matchedStyles.length; i++) {\n let name = this.parser.matchedStyles[i], value = styles.getPropertyValue(name);\n if (value)\n for (let after = undefined;;) {\n let rule = this.parser.matchStyle(name, value, this, after);\n if (!rule)\n break;\n if (rule.ignore)\n return null;\n if (rule.clearMark)\n marks = marks.filter(m => !rule.clearMark(m));\n else\n marks = marks.concat(this.parser.schema.marks[rule.mark].create(rule.attrs));\n if (rule.consuming === false)\n after = rule;\n else\n break;\n }\n }\n return marks;\n }\n // Look up a handler for the given node. If none are found, return\n // false. Otherwise, apply it, use its return value to drive the way\n // the node's content is wrapped, and return true.\n addElementByRule(dom, rule, marks, continueAfter) {\n let sync, nodeType;\n if (rule.node) {\n nodeType = this.parser.schema.nodes[rule.node];\n if (!nodeType.isLeaf) {\n let inner = this.enter(nodeType, rule.attrs || null, marks, rule.preserveWhitespace);\n if (inner) {\n sync = true;\n marks = inner;\n }\n }\n else if (!this.insertNode(nodeType.create(rule.attrs), marks, dom.nodeName == \"BR\")) {\n this.leafFallback(dom, marks);\n }\n }\n else {\n let markType = this.parser.schema.marks[rule.mark];\n marks = marks.concat(markType.create(rule.attrs));\n }\n let startIn = this.top;\n if (nodeType && nodeType.isLeaf) {\n this.findInside(dom);\n }\n else if (continueAfter) {\n this.addElement(dom, marks, continueAfter);\n }\n else if (rule.getContent) {\n this.findInside(dom);\n rule.getContent(dom, this.parser.schema).forEach(node => this.insertNode(node, marks, false));\n }\n else {\n let contentDOM = dom;\n if (typeof rule.contentElement == \"string\")\n contentDOM = dom.querySelector(rule.contentElement);\n else if (typeof rule.contentElement == \"function\")\n contentDOM = rule.contentElement(dom);\n else if (rule.contentElement)\n contentDOM = rule.contentElement;\n this.findAround(dom, contentDOM, true);\n this.addAll(contentDOM, marks);\n this.findAround(dom, contentDOM, false);\n }\n if (sync && this.sync(startIn))\n this.open--;\n }\n // Add all child nodes between `startIndex` and `endIndex` (or the\n // whole node, if not given). If `sync` is passed, use it to\n // synchronize after every block element.\n addAll(parent, marks, startIndex, endIndex) {\n let index = startIndex || 0;\n for (let dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild, end = endIndex == null ? null : parent.childNodes[endIndex]; dom != end; dom = dom.nextSibling, ++index) {\n this.findAtPoint(parent, index);\n this.addDOM(dom, marks);\n }\n this.findAtPoint(parent, index);\n }\n // Try to find a way to fit the given node type into the current\n // context. May add intermediate wrappers and/or leave non-solid\n // nodes that we're in.\n findPlace(node, marks, cautious) {\n let route, sync;\n for (let depth = this.open, penalty = 0; depth >= 0; depth--) {\n let cx = this.nodes[depth];\n let found = cx.findWrapping(node);\n if (found && (!route || route.length > found.length + penalty)) {\n route = found;\n sync = cx;\n if (!found.length)\n break;\n }\n if (cx.solid) {\n if (cautious)\n break;\n penalty += 2;\n }\n }\n if (!route)\n return null;\n this.sync(sync);\n for (let i = 0; i < route.length; i++)\n marks = this.enterInner(route[i], null, marks, false);\n return marks;\n }\n // Try to insert the given node, adjusting the context when needed.\n insertNode(node, marks, cautious) {\n if (node.isInline && this.needsBlock && !this.top.type) {\n let block = this.textblockFromContext();\n if (block)\n marks = this.enterInner(block, null, marks);\n }\n let innerMarks = this.findPlace(node, marks, cautious);\n if (innerMarks) {\n this.closeExtra();\n let top = this.top;\n if (top.match)\n top.match = top.match.matchType(node.type);\n let nodeMarks = Mark.none;\n for (let m of innerMarks.concat(node.marks))\n if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, node.type))\n nodeMarks = m.addToSet(nodeMarks);\n top.content.push(node.mark(nodeMarks));\n return true;\n }\n return false;\n }\n // Try to start a node of the given type, adjusting the context when\n // necessary.\n enter(type, attrs, marks, preserveWS) {\n let innerMarks = this.findPlace(type.create(attrs), marks, false);\n if (innerMarks)\n innerMarks = this.enterInner(type, attrs, marks, true, preserveWS);\n return innerMarks;\n }\n // Open a node of the given type\n enterInner(type, attrs, marks, solid = false, preserveWS) {\n this.closeExtra();\n let top = this.top;\n top.match = top.match && top.match.matchType(type);\n let options = wsOptionsFor(type, preserveWS, top.options);\n if ((top.options & OPT_OPEN_LEFT) && top.content.length == 0)\n options |= OPT_OPEN_LEFT;\n let applyMarks = Mark.none;\n marks = marks.filter(m => {\n if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, type)) {\n applyMarks = m.addToSet(applyMarks);\n return false;\n }\n return true;\n });\n this.nodes.push(new NodeContext(type, attrs, applyMarks, solid, null, options));\n this.open++;\n return marks;\n }\n // Make sure all nodes above this.open are finished and added to\n // their parents\n closeExtra(openEnd = false) {\n let i = this.nodes.length - 1;\n if (i > this.open) {\n for (; i > this.open; i--)\n this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd));\n this.nodes.length = this.open + 1;\n }\n }\n finish() {\n this.open = 0;\n this.closeExtra(this.isOpen);\n return this.nodes[0].finish(!!(this.isOpen || this.options.topOpen));\n }\n sync(to) {\n for (let i = this.open; i >= 0; i--) {\n if (this.nodes[i] == to) {\n this.open = i;\n return true;\n }\n else if (this.localPreserveWS) {\n this.nodes[i].options |= OPT_PRESERVE_WS;\n }\n }\n return false;\n }\n get currentPos() {\n this.closeExtra();\n let pos = 0;\n for (let i = this.open; i >= 0; i--) {\n let content = this.nodes[i].content;\n for (let j = content.length - 1; j >= 0; j--)\n pos += content[j].nodeSize;\n if (i)\n pos++;\n }\n return pos;\n }\n findAtPoint(parent, offset) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].node == parent && this.find[i].offset == offset)\n this.find[i].pos = this.currentPos;\n }\n }\n findInside(parent) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node))\n this.find[i].pos = this.currentPos;\n }\n }\n findAround(parent, content, before) {\n if (parent != content && this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n let pos = content.compareDocumentPosition(this.find[i].node);\n if (pos & (before ? 2 : 4))\n this.find[i].pos = this.currentPos;\n }\n }\n }\n findInText(textNode) {\n if (this.find)\n for (let i = 0; i < this.find.length; i++) {\n if (this.find[i].node == textNode)\n this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset);\n }\n }\n // Determines whether the given context string matches this context.\n matchesContext(context) {\n if (context.indexOf(\"|\") > -1)\n return context.split(/\\s*\\|\\s*/).some(this.matchesContext, this);\n let parts = context.split(\"/\");\n let option = this.options.context;\n let useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type);\n let minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1);\n let match = (i, depth) => {\n for (; i >= 0; i--) {\n let part = parts[i];\n if (part == \"\") {\n if (i == parts.length - 1 || i == 0)\n continue;\n for (; depth >= minDepth; depth--)\n if (match(i - 1, depth))\n return true;\n return false;\n }\n else {\n let next = depth > 0 || (depth == 0 && useRoot) ? this.nodes[depth].type\n : option && depth >= minDepth ? option.node(depth - minDepth).type\n : null;\n if (!next || (next.name != part && !next.isInGroup(part)))\n return false;\n depth--;\n }\n }\n return true;\n };\n return match(parts.length - 1, this.open);\n }\n textblockFromContext() {\n let $context = this.options.context;\n if ($context)\n for (let d = $context.depth; d >= 0; d--) {\n let deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;\n if (deflt && deflt.isTextblock && deflt.defaultAttrs)\n return deflt;\n }\n for (let name in this.parser.schema.nodes) {\n let type = this.parser.schema.nodes[name];\n if (type.isTextblock && type.defaultAttrs)\n return type;\n }\n }\n}\n// Kludge to work around directly nested list nodes produced by some\n// tools and allowed by browsers to mean that the nested list is\n// actually part of the list item above it.\nfunction normalizeList(dom) {\n for (let child = dom.firstChild, prevItem = null; child; child = child.nextSibling) {\n let name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null;\n if (name && listTags.hasOwnProperty(name) && prevItem) {\n prevItem.appendChild(child);\n child = prevItem;\n }\n else if (name == \"li\") {\n prevItem = child;\n }\n else if (name) {\n prevItem = null;\n }\n }\n}\n// Apply a CSS selector.\nfunction matches(dom, selector) {\n return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector);\n}\nfunction copy(obj) {\n let copy = {};\n for (let prop in obj)\n copy[prop] = obj[prop];\n return copy;\n}\n// Used when finding a mark at the top level of a fragment parse.\n// Checks whether it would be reasonable to apply a given mark type to\n// a given node, by looking at the way the mark occurs in the schema.\nfunction markMayApply(markType, nodeType) {\n let nodes = nodeType.schema.nodes;\n for (let name in nodes) {\n let parent = nodes[name];\n if (!parent.allowsMarkType(markType))\n continue;\n let seen = [], scan = (match) => {\n seen.push(match);\n for (let i = 0; i < match.edgeCount; i++) {\n let { type, next } = match.edge(i);\n if (type == nodeType)\n return true;\n if (seen.indexOf(next) < 0 && scan(next))\n return true;\n }\n };\n if (scan(parent.contentMatch))\n return true;\n }\n}\n\n/**\nA DOM serializer knows how to convert ProseMirror nodes and\nmarks of various types to DOM nodes.\n*/\nclass DOMSerializer {\n /**\n Create a serializer. `nodes` should map node names to functions\n that take a node and return a description of the corresponding\n DOM. `marks` does the same for mark names, but also gets an\n argument that tells it whether the mark's content is block or\n inline content (for typical use, it'll always be inline). A mark\n serializer may be `null` to indicate that marks of that type\n should not be serialized.\n */\n constructor(\n /**\n The node serialization functions.\n */\n nodes, \n /**\n The mark serialization functions.\n */\n marks) {\n this.nodes = nodes;\n this.marks = marks;\n }\n /**\n Serialize the content of this fragment to a DOM fragment. When\n not in the browser, the `document` option, containing a DOM\n document, should be passed so that the serializer can create\n nodes.\n */\n serializeFragment(fragment, options = {}, target) {\n if (!target)\n target = doc(options).createDocumentFragment();\n let top = target, active = [];\n fragment.forEach(node => {\n if (active.length || node.marks.length) {\n let keep = 0, rendered = 0;\n while (keep < active.length && rendered < node.marks.length) {\n let next = node.marks[rendered];\n if (!this.marks[next.type.name]) {\n rendered++;\n continue;\n }\n if (!next.eq(active[keep][0]) || next.type.spec.spanning === false)\n break;\n keep++;\n rendered++;\n }\n while (keep < active.length)\n top = active.pop()[1];\n while (rendered < node.marks.length) {\n let add = node.marks[rendered++];\n let markDOM = this.serializeMark(add, node.isInline, options);\n if (markDOM) {\n active.push([add, top]);\n top.appendChild(markDOM.dom);\n top = markDOM.contentDOM || markDOM.dom;\n }\n }\n }\n top.appendChild(this.serializeNodeInner(node, options));\n });\n return target;\n }\n /**\n @internal\n */\n serializeNodeInner(node, options) {\n if (node.isText)\n return doc(options).createTextNode(node.text);\n let { dom, contentDOM } = renderSpec(doc(options), this.nodes[node.type.name](node), null, node.attrs);\n if (contentDOM) {\n if (node.isLeaf)\n throw new RangeError(\"Content hole not allowed in a leaf node spec\");\n this.serializeFragment(node.content, options, contentDOM);\n }\n return dom;\n }\n /**\n Serialize this node to a DOM node. This can be useful when you\n need to serialize a part of a document, as opposed to the whole\n document. To serialize a whole document, use\n [`serializeFragment`](https://prosemirror.net/docs/ref/#model.DOMSerializer.serializeFragment) on\n its [content](https://prosemirror.net/docs/ref/#model.Node.content).\n */\n serializeNode(node, options = {}) {\n let dom = this.serializeNodeInner(node, options);\n for (let i = node.marks.length - 1; i >= 0; i--) {\n let wrap = this.serializeMark(node.marks[i], node.isInline, options);\n if (wrap) {\n (wrap.contentDOM || wrap.dom).appendChild(dom);\n dom = wrap.dom;\n }\n }\n return dom;\n }\n /**\n @internal\n */\n serializeMark(mark, inline, options = {}) {\n let toDOM = this.marks[mark.type.name];\n return toDOM && renderSpec(doc(options), toDOM(mark, inline), null, mark.attrs);\n }\n static renderSpec(doc, structure, xmlNS = null, blockArraysIn) {\n // Kludge for backwards-compatibility with accidental original behavious\n if (typeof structure == \"string\")\n return { dom: doc.createTextNode(structure) };\n return renderSpec(doc, structure, xmlNS, blockArraysIn);\n }\n /**\n Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)\n properties in a schema's node and mark specs.\n */\n static fromSchema(schema) {\n return schema.cached.domSerializer ||\n (schema.cached.domSerializer = new DOMSerializer(this.nodesFromSchema(schema), this.marksFromSchema(schema)));\n }\n /**\n Gather the serializers in a schema's node specs into an object.\n This can be useful as a base to build a custom serializer from.\n */\n static nodesFromSchema(schema) {\n let result = gatherToDOM(schema.nodes);\n if (!result.text)\n result.text = node => node.text;\n return result;\n }\n /**\n Gather the serializers in a schema's mark specs into an object.\n */\n static marksFromSchema(schema) {\n return gatherToDOM(schema.marks);\n }\n}\nfunction gatherToDOM(obj) {\n let result = {};\n for (let name in obj) {\n let toDOM = obj[name].spec.toDOM;\n if (toDOM)\n result[name] = toDOM;\n }\n return result;\n}\nfunction doc(options) {\n return options.document || window.document;\n}\nconst suspiciousAttributeCache = new WeakMap();\nfunction suspiciousAttributes(attrs) {\n let value = suspiciousAttributeCache.get(attrs);\n if (value === undefined)\n suspiciousAttributeCache.set(attrs, value = suspiciousAttributesInner(attrs));\n return value;\n}\nfunction suspiciousAttributesInner(attrs) {\n let result = null;\n function scan(value) {\n if (value && typeof value == \"object\") {\n if (Array.isArray(value)) {\n if (typeof value[0] == \"string\") {\n if (!result)\n result = [];\n result.push(value);\n }\n else {\n for (let i = 0; i < value.length; i++)\n scan(value[i]);\n }\n }\n else {\n for (let prop in value)\n scan(value[prop]);\n }\n }\n }\n scan(attrs);\n return result;\n}\nfunction renderSpec(doc, structure, xmlNS, blockArraysIn) {\n if (structure.nodeType == 1)\n return { dom: structure };\n if (structure.dom && structure.dom.nodeType == 1)\n return structure;\n let tagName = structure[0], suspicious;\n if (typeof tagName != \"string\")\n throw new RangeError(\"Invalid array passed to renderSpec\");\n if (blockArraysIn && (suspicious = suspiciousAttributes(blockArraysIn)) &&\n suspicious.indexOf(structure) > -1)\n throw new RangeError(\"Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.\");\n let space = tagName.indexOf(\" \");\n if (space > 0) {\n xmlNS = tagName.slice(0, space);\n tagName = tagName.slice(space + 1);\n }\n let contentDOM;\n let dom = (xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName));\n let attrs = structure[1], start = 1;\n if (attrs && typeof attrs == \"object\" && attrs.nodeType == null && !Array.isArray(attrs)) {\n start = 2;\n for (let name in attrs)\n if (attrs[name] != null) {\n let space = name.indexOf(\" \");\n if (space > 0)\n dom.setAttributeNS(name.slice(0, space), name.slice(space + 1), attrs[name]);\n else if (name == \"style\" && dom.style)\n dom.style.cssText = attrs[name];\n else\n dom.setAttribute(name, attrs[name]);\n }\n }\n for (let i = start; i < structure.length; i++) {\n let child = structure[i];\n if (child === 0) {\n if (i < structure.length - 1 || i > start)\n throw new RangeError(\"Content hole must be the only child of its parent node\");\n return { dom, contentDOM: dom };\n }\n else if (typeof child == \"string\") {\n dom.appendChild(doc.createTextNode(child));\n }\n else {\n let { dom: inner, contentDOM: innerContent } = renderSpec(doc, child, xmlNS, blockArraysIn);\n dom.appendChild(inner);\n if (innerContent) {\n if (contentDOM)\n throw new RangeError(\"Multiple content holes\");\n contentDOM = innerContent;\n }\n }\n }\n return { dom, contentDOM };\n}\n\nexport { ContentMatch, DOMParser, DOMSerializer, Fragment, Mark, MarkType, Node, NodeRange, NodeType, ReplaceError, ResolvedPos, Schema, Slice };\n","import { ReplaceError, Slice, Fragment, MarkType, Mark } from 'prosemirror-model';\n\n// Recovery values encode a range index and an offset. They are\n// represented as numbers, because tons of them will be created when\n// mapping, for example, a large number of decorations. The number's\n// lower 16 bits provide the index, the remaining bits the offset.\n//\n// Note: We intentionally don't use bit shift operators to en- and\n// decode these, since those clip to 32 bits, which we might in rare\n// cases want to overflow. A 64-bit float can represent 48-bit\n// integers precisely.\nconst lower16 = 0xffff;\nconst factor16 = Math.pow(2, 16);\nfunction makeRecover(index, offset) { return index + offset * factor16; }\nfunction recoverIndex(value) { return value & lower16; }\nfunction recoverOffset(value) { return (value - (value & lower16)) / factor16; }\nconst DEL_BEFORE = 1, DEL_AFTER = 2, DEL_ACROSS = 4, DEL_SIDE = 8;\n/**\nAn object representing a mapped position with extra\ninformation.\n*/\nclass MapResult {\n /**\n @internal\n */\n constructor(\n /**\n The mapped version of the position.\n */\n pos, \n /**\n @internal\n */\n delInfo, \n /**\n @internal\n */\n recover) {\n this.pos = pos;\n this.delInfo = delInfo;\n this.recover = recover;\n }\n /**\n Tells you whether the position was deleted, that is, whether the\n step removed the token on the side queried (via the `assoc`)\n argument from the document.\n */\n get deleted() { return (this.delInfo & DEL_SIDE) > 0; }\n /**\n Tells you whether the token before the mapped position was deleted.\n */\n get deletedBefore() { return (this.delInfo & (DEL_BEFORE | DEL_ACROSS)) > 0; }\n /**\n True when the token after the mapped position was deleted.\n */\n get deletedAfter() { return (this.delInfo & (DEL_AFTER | DEL_ACROSS)) > 0; }\n /**\n Tells whether any of the steps mapped through deletes across the\n position (including both the token before and after the\n position).\n */\n get deletedAcross() { return (this.delInfo & DEL_ACROSS) > 0; }\n}\n/**\nA map describing the deletions and insertions made by a step, which\ncan be used to find the correspondence between positions in the\npre-step version of a document and the same position in the\npost-step version.\n*/\nclass StepMap {\n /**\n Create a position map. The modifications to the document are\n represented as an array of numbers, in which each group of three\n represents a modified chunk as `[start, oldSize, newSize]`.\n */\n constructor(\n /**\n @internal\n */\n ranges, \n /**\n @internal\n */\n inverted = false) {\n this.ranges = ranges;\n this.inverted = inverted;\n if (!ranges.length && StepMap.empty)\n return StepMap.empty;\n }\n /**\n @internal\n */\n recover(value) {\n let diff = 0, index = recoverIndex(value);\n if (!this.inverted)\n for (let i = 0; i < index; i++)\n diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];\n return this.ranges[index * 3] + diff + recoverOffset(value);\n }\n mapResult(pos, assoc = 1) { return this._map(pos, assoc, false); }\n map(pos, assoc = 1) { return this._map(pos, assoc, true); }\n /**\n @internal\n */\n _map(pos, assoc, simple) {\n let diff = 0, oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (let i = 0; i < this.ranges.length; i += 3) {\n let start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos)\n break;\n let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex], end = start + oldSize;\n if (pos <= end) {\n let side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc;\n let result = start + diff + (side < 0 ? 0 : newSize);\n if (simple)\n return result;\n let recover = pos == (assoc < 0 ? start : end) ? null : makeRecover(i / 3, pos - start);\n let del = pos == start ? DEL_AFTER : pos == end ? DEL_BEFORE : DEL_ACROSS;\n if (assoc < 0 ? pos != start : pos != end)\n del |= DEL_SIDE;\n return new MapResult(result, del, recover);\n }\n diff += newSize - oldSize;\n }\n return simple ? pos + diff : new MapResult(pos + diff, 0, null);\n }\n /**\n @internal\n */\n touches(pos, recover) {\n let diff = 0, index = recoverIndex(recover);\n let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (let i = 0; i < this.ranges.length; i += 3) {\n let start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos)\n break;\n let oldSize = this.ranges[i + oldIndex], end = start + oldSize;\n if (pos <= end && i == index * 3)\n return true;\n diff += this.ranges[i + newIndex] - oldSize;\n }\n return false;\n }\n /**\n Calls the given function on each of the changed ranges included in\n this map.\n */\n forEach(f) {\n let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (let i = 0, diff = 0; i < this.ranges.length; i += 3) {\n let start = this.ranges[i], oldStart = start - (this.inverted ? diff : 0), newStart = start + (this.inverted ? 0 : diff);\n let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex];\n f(oldStart, oldStart + oldSize, newStart, newStart + newSize);\n diff += newSize - oldSize;\n }\n }\n /**\n Create an inverted version of this map. The result can be used to\n map positions in the post-step document to the pre-step document.\n */\n invert() {\n return new StepMap(this.ranges, !this.inverted);\n }\n /**\n @internal\n */\n toString() {\n return (this.inverted ? \"-\" : \"\") + JSON.stringify(this.ranges);\n }\n /**\n Create a map that moves all positions by offset `n` (which may be\n negative). This can be useful when applying steps meant for a\n sub-document to a larger document, or vice-versa.\n */\n static offset(n) {\n return n == 0 ? StepMap.empty : new StepMap(n < 0 ? [0, -n, 0] : [0, 0, n]);\n }\n}\n/**\nA StepMap that contains no changed ranges.\n*/\nStepMap.empty = new StepMap([]);\n/**\nA mapping represents a pipeline of zero or more [step\nmaps](https://prosemirror.net/docs/ref/#transform.StepMap). It has special provisions for losslessly\nhandling mapping positions through a series of steps in which some\nsteps are inverted versions of earlier steps. (This comes up when\n‘[rebasing](https://prosemirror.net/docs/guide/#transform.rebasing)’ steps for\ncollaboration or history management.)\n*/\nclass Mapping {\n /**\n Create a new mapping with the given position maps.\n */\n constructor(maps, \n /**\n @internal\n */\n mirror, \n /**\n The starting position in the `maps` array, used when `map` or\n `mapResult` is called.\n */\n from = 0, \n /**\n The end position in the `maps` array.\n */\n to = maps ? maps.length : 0) {\n this.mirror = mirror;\n this.from = from;\n this.to = to;\n this._maps = maps || [];\n this.ownData = !(maps || mirror);\n }\n /**\n The step maps in this mapping.\n */\n get maps() { return this._maps; }\n /**\n Create a mapping that maps only through a part of this one.\n */\n slice(from = 0, to = this.maps.length) {\n return new Mapping(this._maps, this.mirror, from, to);\n }\n /**\n Add a step map to the end of this mapping. If `mirrors` is\n given, it should be the index of the step map that is the mirror\n image of this one.\n */\n appendMap(map, mirrors) {\n if (!this.ownData) {\n this._maps = this._maps.slice();\n this.mirror = this.mirror && this.mirror.slice();\n this.ownData = true;\n }\n this.to = this._maps.push(map);\n if (mirrors != null)\n this.setMirror(this._maps.length - 1, mirrors);\n }\n /**\n Add all the step maps in a given mapping to this one (preserving\n mirroring information).\n */\n appendMapping(mapping) {\n for (let i = 0, startSize = this._maps.length; i < mapping._maps.length; i++) {\n let mirr = mapping.getMirror(i);\n this.appendMap(mapping._maps[i], mirr != null && mirr < i ? startSize + mirr : undefined);\n }\n }\n /**\n Finds the offset of the step map that mirrors the map at the\n given offset, in this mapping (as per the second argument to\n `appendMap`).\n */\n getMirror(n) {\n if (this.mirror)\n for (let i = 0; i < this.mirror.length; i++)\n if (this.mirror[i] == n)\n return this.mirror[i + (i % 2 ? -1 : 1)];\n }\n /**\n @internal\n */\n setMirror(n, m) {\n if (!this.mirror)\n this.mirror = [];\n this.mirror.push(n, m);\n }\n /**\n Append the inverse of the given mapping to this one.\n */\n appendMappingInverted(mapping) {\n for (let i = mapping.maps.length - 1, totalSize = this._maps.length + mapping._maps.length; i >= 0; i--) {\n let mirr = mapping.getMirror(i);\n this.appendMap(mapping._maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : undefined);\n }\n }\n /**\n Create an inverted version of this mapping.\n */\n invert() {\n let inverse = new Mapping;\n inverse.appendMappingInverted(this);\n return inverse;\n }\n /**\n Map a position through this mapping.\n */\n map(pos, assoc = 1) {\n if (this.mirror)\n return this._map(pos, assoc, true);\n for (let i = this.from; i < this.to; i++)\n pos = this._maps[i].map(pos, assoc);\n return pos;\n }\n /**\n Map a position through this mapping, returning a mapping\n result.\n */\n mapResult(pos, assoc = 1) { return this._map(pos, assoc, false); }\n /**\n @internal\n */\n _map(pos, assoc, simple) {\n let delInfo = 0;\n for (let i = this.from; i < this.to; i++) {\n let map = this._maps[i], result = map.mapResult(pos, assoc);\n if (result.recover != null) {\n let corr = this.getMirror(i);\n if (corr != null && corr > i && corr < this.to) {\n i = corr;\n pos = this._maps[corr].recover(result.recover);\n continue;\n }\n }\n delInfo |= result.delInfo;\n pos = result.pos;\n }\n return simple ? pos : new MapResult(pos, delInfo, null);\n }\n}\n\nconst stepsByID = Object.create(null);\n/**\nA step object represents an atomic change. It generally applies\nonly to the document it was created for, since the positions\nstored in it will only make sense for that document.\n\nNew steps are defined by creating classes that extend `Step`,\noverriding the `apply`, `invert`, `map`, `getMap` and `fromJSON`\nmethods, and registering your class with a unique\nJSON-serialization identifier using\n[`Step.jsonID`](https://prosemirror.net/docs/ref/#transform.Step^jsonID).\n*/\nclass Step {\n /**\n Get the step map that represents the changes made by this step,\n and which can be used to transform between positions in the old\n and the new document.\n */\n getMap() { return StepMap.empty; }\n /**\n Try to merge this step with another one, to be applied directly\n after it. Returns the merged step when possible, null if the\n steps can't be merged.\n */\n merge(other) { return null; }\n /**\n Deserialize a step from its JSON representation. Will call\n through to the step class' own implementation of this method.\n */\n static fromJSON(schema, json) {\n if (!json || !json.stepType)\n throw new RangeError(\"Invalid input for Step.fromJSON\");\n let type = stepsByID[json.stepType];\n if (!type)\n throw new RangeError(`No step type ${json.stepType} defined`);\n return type.fromJSON(schema, json);\n }\n /**\n To be able to serialize steps to JSON, each step needs a string\n ID to attach to its JSON representation. Use this method to\n register an ID for your step classes. Try to pick something\n that's unlikely to clash with steps from other modules.\n */\n static jsonID(id, stepClass) {\n if (id in stepsByID)\n throw new RangeError(\"Duplicate use of step JSON ID \" + id);\n stepsByID[id] = stepClass;\n stepClass.prototype.jsonID = id;\n return stepClass;\n }\n}\n/**\nThe result of [applying](https://prosemirror.net/docs/ref/#transform.Step.apply) a step. Contains either a\nnew document or a failure value.\n*/\nclass StepResult {\n /**\n @internal\n */\n constructor(\n /**\n The transformed document, if successful.\n */\n doc, \n /**\n The failure message, if unsuccessful.\n */\n failed) {\n this.doc = doc;\n this.failed = failed;\n }\n /**\n Create a successful step result.\n */\n static ok(doc) { return new StepResult(doc, null); }\n /**\n Create a failed step result.\n */\n static fail(message) { return new StepResult(null, message); }\n /**\n Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given\n arguments. Create a successful result if it succeeds, and a\n failed one if it throws a `ReplaceError`.\n */\n static fromReplace(doc, from, to, slice) {\n try {\n return StepResult.ok(doc.replace(from, to, slice));\n }\n catch (e) {\n if (e instanceof ReplaceError)\n return StepResult.fail(e.message);\n throw e;\n }\n }\n}\n\nfunction mapFragment(fragment, f, parent) {\n let mapped = [];\n for (let i = 0; i < fragment.childCount; i++) {\n let child = fragment.child(i);\n if (child.content.size)\n child = child.copy(mapFragment(child.content, f, child));\n if (child.isInline)\n child = f(child, parent, i);\n mapped.push(child);\n }\n return Fragment.fromArray(mapped);\n}\n/**\nAdd a mark to all inline content between two positions.\n*/\nclass AddMarkStep extends Step {\n /**\n Create a mark step.\n */\n constructor(\n /**\n The start of the marked range.\n */\n from, \n /**\n The end of the marked range.\n */\n to, \n /**\n The mark to add.\n */\n mark) {\n super();\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n apply(doc) {\n let oldSlice = doc.slice(this.from, this.to), $from = doc.resolve(this.from);\n let parent = $from.node($from.sharedDepth(this.to));\n let slice = new Slice(mapFragment(oldSlice.content, (node, parent) => {\n if (!node.isAtom || !parent.type.allowsMarkType(this.mark.type))\n return node;\n return node.mark(this.mark.addToSet(node.marks));\n }, parent), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n }\n invert() {\n return new RemoveMarkStep(this.from, this.to, this.mark);\n }\n map(mapping) {\n let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos)\n return null;\n return new AddMarkStep(from.pos, to.pos, this.mark);\n }\n merge(other) {\n if (other instanceof AddMarkStep &&\n other.mark.eq(this.mark) &&\n this.from <= other.to && this.to >= other.from)\n return new AddMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n return null;\n }\n toJSON() {\n return { stepType: \"addMark\", mark: this.mark.toJSON(),\n from: this.from, to: this.to };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n throw new RangeError(\"Invalid input for AddMarkStep.fromJSON\");\n return new AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"addMark\", AddMarkStep);\n/**\nRemove a mark from all inline content between two positions.\n*/\nclass RemoveMarkStep extends Step {\n /**\n Create a mark-removing step.\n */\n constructor(\n /**\n The start of the unmarked range.\n */\n from, \n /**\n The end of the unmarked range.\n */\n to, \n /**\n The mark to remove.\n */\n mark) {\n super();\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n apply(doc) {\n let oldSlice = doc.slice(this.from, this.to);\n let slice = new Slice(mapFragment(oldSlice.content, node => {\n return node.mark(this.mark.removeFromSet(node.marks));\n }, doc), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n }\n invert() {\n return new AddMarkStep(this.from, this.to, this.mark);\n }\n map(mapping) {\n let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos)\n return null;\n return new RemoveMarkStep(from.pos, to.pos, this.mark);\n }\n merge(other) {\n if (other instanceof RemoveMarkStep &&\n other.mark.eq(this.mark) &&\n this.from <= other.to && this.to >= other.from)\n return new RemoveMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n return null;\n }\n toJSON() {\n return { stepType: \"removeMark\", mark: this.mark.toJSON(),\n from: this.from, to: this.to };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n throw new RangeError(\"Invalid input for RemoveMarkStep.fromJSON\");\n return new RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"removeMark\", RemoveMarkStep);\n/**\nAdd a mark to a specific node.\n*/\nclass AddNodeMarkStep extends Step {\n /**\n Create a node mark step.\n */\n constructor(\n /**\n The position of the target node.\n */\n pos, \n /**\n The mark to add.\n */\n mark) {\n super();\n this.pos = pos;\n this.mark = mark;\n }\n apply(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node)\n return StepResult.fail(\"No node at mark step's position\");\n let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n invert(doc) {\n let node = doc.nodeAt(this.pos);\n if (node) {\n let newSet = this.mark.addToSet(node.marks);\n if (newSet.length == node.marks.length) {\n for (let i = 0; i < node.marks.length; i++)\n if (!node.marks[i].isInSet(newSet))\n return new AddNodeMarkStep(this.pos, node.marks[i]);\n return new AddNodeMarkStep(this.pos, this.mark);\n }\n }\n return new RemoveNodeMarkStep(this.pos, this.mark);\n }\n map(mapping) {\n let pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new AddNodeMarkStep(pos.pos, this.mark);\n }\n toJSON() {\n return { stepType: \"addNodeMark\", pos: this.pos, mark: this.mark.toJSON() };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.pos != \"number\")\n throw new RangeError(\"Invalid input for AddNodeMarkStep.fromJSON\");\n return new AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"addNodeMark\", AddNodeMarkStep);\n/**\nRemove a mark from a specific node.\n*/\nclass RemoveNodeMarkStep extends Step {\n /**\n Create a mark-removing step.\n */\n constructor(\n /**\n The position of the target node.\n */\n pos, \n /**\n The mark to remove.\n */\n mark) {\n super();\n this.pos = pos;\n this.mark = mark;\n }\n apply(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node)\n return StepResult.fail(\"No node at mark step's position\");\n let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n invert(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node || !this.mark.isInSet(node.marks))\n return this;\n return new AddNodeMarkStep(this.pos, this.mark);\n }\n map(mapping) {\n let pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new RemoveNodeMarkStep(pos.pos, this.mark);\n }\n toJSON() {\n return { stepType: \"removeNodeMark\", pos: this.pos, mark: this.mark.toJSON() };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.pos != \"number\")\n throw new RangeError(\"Invalid input for RemoveNodeMarkStep.fromJSON\");\n return new RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"removeNodeMark\", RemoveNodeMarkStep);\n\n/**\nReplace a part of the document with a slice of new content.\n*/\nclass ReplaceStep extends Step {\n /**\n The given `slice` should fit the 'gap' between `from` and\n `to`—the depths must line up, and the surrounding nodes must be\n able to be joined with the open sides of the slice. When\n `structure` is true, the step will fail if the content between\n from and to is not just a sequence of closing and then opening\n tokens (this is to guard against rebased replace steps\n overwriting something they weren't supposed to).\n */\n constructor(\n /**\n The start position of the replaced range.\n */\n from, \n /**\n The end position of the replaced range.\n */\n to, \n /**\n The slice to insert.\n */\n slice, \n /**\n @internal\n */\n structure = false) {\n super();\n this.from = from;\n this.to = to;\n this.slice = slice;\n this.structure = structure;\n }\n apply(doc) {\n if (this.structure && contentBetween(doc, this.from, this.to))\n return StepResult.fail(\"Structure replace would overwrite content\");\n return StepResult.fromReplace(doc, this.from, this.to, this.slice);\n }\n getMap() {\n return new StepMap([this.from, this.to - this.from, this.slice.size]);\n }\n invert(doc) {\n return new ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to));\n }\n map(mapping) {\n let to = mapping.mapResult(this.to, -1);\n let from = this.from == this.to && ReplaceStep.MAP_BIAS < 0 ? to : mapping.mapResult(this.from, 1);\n if (from.deletedAcross && to.deletedAcross)\n return null;\n return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice, this.structure);\n }\n merge(other) {\n if (!(other instanceof ReplaceStep) || other.structure || this.structure)\n return null;\n if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) {\n let slice = this.slice.size + other.slice.size == 0 ? Slice.empty\n : new Slice(this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd);\n return new ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure);\n }\n else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) {\n let slice = this.slice.size + other.slice.size == 0 ? Slice.empty\n : new Slice(other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd);\n return new ReplaceStep(other.from, this.to, slice, this.structure);\n }\n else {\n return null;\n }\n }\n toJSON() {\n let json = { stepType: \"replace\", from: this.from, to: this.to };\n if (this.slice.size)\n json.slice = this.slice.toJSON();\n if (this.structure)\n json.structure = true;\n return json;\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n throw new RangeError(\"Invalid input for ReplaceStep.fromJSON\");\n return new ReplaceStep(json.from, json.to, Slice.fromJSON(schema, json.slice), !!json.structure);\n }\n}\n/**\nBy default, for backwards compatibility, an inserting step\nmapped over an insertion at that same position fill move after\nthe inserted content. In a collaborative editing situation, that\ncan make redone insertions appear in unexpected places. You can\nset this to -1 to make such mapping keep the step before the\ninsertion instead.\n*/\nReplaceStep.MAP_BIAS = 1;\nStep.jsonID(\"replace\", ReplaceStep);\n/**\nReplace a part of the document with a slice of content, but\npreserve a range of the replaced content by moving it into the\nslice.\n*/\nclass ReplaceAroundStep extends Step {\n /**\n Create a replace-around step with the given range and gap.\n `insert` should be the point in the slice into which the content\n of the gap should be moved. `structure` has the same meaning as\n it has in the [`ReplaceStep`](https://prosemirror.net/docs/ref/#transform.ReplaceStep) class.\n */\n constructor(\n /**\n The start position of the replaced range.\n */\n from, \n /**\n The end position of the replaced range.\n */\n to, \n /**\n The start of preserved range.\n */\n gapFrom, \n /**\n The end of preserved range.\n */\n gapTo, \n /**\n The slice to insert.\n */\n slice, \n /**\n The position in the slice where the preserved range should be\n inserted.\n */\n insert, \n /**\n @internal\n */\n structure = false) {\n super();\n this.from = from;\n this.to = to;\n this.gapFrom = gapFrom;\n this.gapTo = gapTo;\n this.slice = slice;\n this.insert = insert;\n this.structure = structure;\n }\n apply(doc) {\n if (this.structure && (contentBetween(doc, this.from, this.gapFrom) ||\n contentBetween(doc, this.gapTo, this.to)))\n return StepResult.fail(\"Structure gap-replace would overwrite content\");\n let gap = doc.slice(this.gapFrom, this.gapTo);\n if (gap.openStart || gap.openEnd)\n return StepResult.fail(\"Gap is not a flat range\");\n let inserted = this.slice.insertAt(this.insert, gap.content);\n if (!inserted)\n return StepResult.fail(\"Content does not fit in gap\");\n return StepResult.fromReplace(doc, this.from, this.to, inserted);\n }\n getMap() {\n return new StepMap([this.from, this.gapFrom - this.from, this.insert,\n this.gapTo, this.to - this.gapTo, this.slice.size - this.insert]);\n }\n invert(doc) {\n let gap = this.gapTo - this.gapFrom;\n return new ReplaceAroundStep(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);\n }\n map(mapping) {\n let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n let gapFrom = this.from == this.gapFrom ? from.pos : mapping.map(this.gapFrom, -1);\n let gapTo = this.to == this.gapTo ? to.pos : mapping.map(this.gapTo, 1);\n if ((from.deletedAcross && to.deletedAcross) || gapFrom < from.pos || gapTo > to.pos)\n return null;\n return new ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);\n }\n toJSON() {\n let json = { stepType: \"replaceAround\", from: this.from, to: this.to,\n gapFrom: this.gapFrom, gapTo: this.gapTo, insert: this.insert };\n if (this.slice.size)\n json.slice = this.slice.toJSON();\n if (this.structure)\n json.structure = true;\n return json;\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\" ||\n typeof json.gapFrom != \"number\" || typeof json.gapTo != \"number\" || typeof json.insert != \"number\")\n throw new RangeError(\"Invalid input for ReplaceAroundStep.fromJSON\");\n return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, Slice.fromJSON(schema, json.slice), json.insert, !!json.structure);\n }\n}\nStep.jsonID(\"replaceAround\", ReplaceAroundStep);\nfunction contentBetween(doc, from, to) {\n let $from = doc.resolve(from), dist = to - from, depth = $from.depth;\n while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {\n depth--;\n dist--;\n }\n if (dist > 0) {\n let next = $from.node(depth).maybeChild($from.indexAfter(depth));\n while (dist > 0) {\n if (!next || next.isLeaf)\n return true;\n next = next.firstChild;\n dist--;\n }\n }\n return false;\n}\n\nfunction addMark(tr, from, to, mark) {\n let removed = [], added = [];\n let removing, adding;\n tr.doc.nodesBetween(from, to, (node, pos, parent) => {\n if (!node.isInline)\n return;\n let marks = node.marks;\n if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {\n let start = Math.max(pos, from), end = Math.min(pos + node.nodeSize, to);\n let newSet = mark.addToSet(marks);\n for (let i = 0; i < marks.length; i++) {\n if (!marks[i].isInSet(newSet)) {\n if (removing && removing.to == start && removing.mark.eq(marks[i]))\n removing.to = end;\n else\n removed.push(removing = new RemoveMarkStep(start, end, marks[i]));\n }\n }\n if (adding && adding.to == start)\n adding.to = end;\n else\n added.push(adding = new AddMarkStep(start, end, mark));\n }\n });\n removed.forEach(s => tr.step(s));\n added.forEach(s => tr.step(s));\n}\nfunction removeMark(tr, from, to, mark) {\n let matched = [], step = 0;\n tr.doc.nodesBetween(from, to, (node, pos) => {\n if (!node.isInline)\n return;\n step++;\n let toRemove = null;\n if (mark instanceof MarkType) {\n let set = node.marks, found;\n while (found = mark.isInSet(set)) {\n (toRemove || (toRemove = [])).push(found);\n set = found.removeFromSet(set);\n }\n }\n else if (mark) {\n if (mark.isInSet(node.marks))\n toRemove = [mark];\n }\n else {\n toRemove = node.marks;\n }\n if (toRemove && toRemove.length) {\n let end = Math.min(pos + node.nodeSize, to);\n for (let i = 0; i < toRemove.length; i++) {\n let style = toRemove[i], found;\n for (let j = 0; j < matched.length; j++) {\n let m = matched[j];\n if (m.step == step - 1 && style.eq(matched[j].style))\n found = m;\n }\n if (found) {\n found.to = end;\n found.step = step;\n }\n else {\n matched.push({ style, from: Math.max(pos, from), to: end, step });\n }\n }\n }\n });\n matched.forEach(m => tr.step(new RemoveMarkStep(m.from, m.to, m.style)));\n}\nfunction clearIncompatible(tr, pos, parentType, match = parentType.contentMatch, clearNewlines = true) {\n let node = tr.doc.nodeAt(pos);\n let replSteps = [], cur = pos + 1;\n for (let i = 0; i < node.childCount; i++) {\n let child = node.child(i), end = cur + child.nodeSize;\n let allowed = match.matchType(child.type);\n if (!allowed) {\n replSteps.push(new ReplaceStep(cur, end, Slice.empty));\n }\n else {\n match = allowed;\n for (let j = 0; j < child.marks.length; j++)\n if (!parentType.allowsMarkType(child.marks[j].type))\n tr.step(new RemoveMarkStep(cur, end, child.marks[j]));\n if (clearNewlines && child.isText && parentType.whitespace != \"pre\") {\n let m, newline = /\\r?\\n|\\r/g, slice;\n while (m = newline.exec(child.text)) {\n if (!slice)\n slice = new Slice(Fragment.from(parentType.schema.text(\" \", parentType.allowedMarks(child.marks))), 0, 0);\n replSteps.push(new ReplaceStep(cur + m.index, cur + m.index + m[0].length, slice));\n }\n }\n }\n cur = end;\n }\n if (!match.validEnd) {\n let fill = match.fillBefore(Fragment.empty, true);\n tr.replace(cur, cur, new Slice(fill, 0, 0));\n }\n for (let i = replSteps.length - 1; i >= 0; i--)\n tr.step(replSteps[i]);\n}\n\nfunction canCut(node, start, end) {\n return (start == 0 || node.canReplace(start, node.childCount)) &&\n (end == node.childCount || node.canReplace(0, end));\n}\n/**\nTry to find a target depth to which the content in the given range\ncan be lifted. Will not go across\n[isolating](https://prosemirror.net/docs/ref/#model.NodeSpec.isolating) parent nodes.\n*/\nfunction liftTarget(range) {\n let parent = range.parent;\n let content = parent.content.cutByIndex(range.startIndex, range.endIndex);\n for (let depth = range.depth, contentBefore = 0, contentAfter = 0;; --depth) {\n let node = range.$from.node(depth);\n let index = range.$from.index(depth) + contentBefore, endIndex = range.$to.indexAfter(depth) - contentAfter;\n if (depth < range.depth && node.canReplace(index, endIndex, content))\n return depth;\n if (depth == 0 || node.type.spec.isolating || !canCut(node, index, endIndex))\n break;\n if (index)\n contentBefore = 1;\n if (endIndex < node.childCount)\n contentAfter = 1;\n }\n return null;\n}\nfunction lift(tr, range, target) {\n let { $from, $to, depth } = range;\n let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);\n let start = gapStart, end = gapEnd;\n let before = Fragment.empty, openStart = 0;\n for (let d = depth, splitting = false; d > target; d--)\n if (splitting || $from.index(d) > 0) {\n splitting = true;\n before = Fragment.from($from.node(d).copy(before));\n openStart++;\n }\n else {\n start--;\n }\n let after = Fragment.empty, openEnd = 0;\n for (let d = depth, splitting = false; d > target; d--)\n if (splitting || $to.after(d + 1) < $to.end(d)) {\n splitting = true;\n after = Fragment.from($to.node(d).copy(after));\n openEnd++;\n }\n else {\n end++;\n }\n tr.step(new ReplaceAroundStep(start, end, gapStart, gapEnd, new Slice(before.append(after), openStart, openEnd), before.size - openStart, true));\n}\n/**\nTry to find a valid way to wrap the content in the given range in a\nnode of the given type. May introduce extra nodes around and inside\nthe wrapper node, if necessary. Returns null if no valid wrapping\ncould be found. When `innerRange` is given, that range's content is\nused as the content to fit into the wrapping, instead of the\ncontent of `range`.\n*/\nfunction findWrapping(range, nodeType, attrs = null, innerRange = range) {\n let around = findWrappingOutside(range, nodeType);\n let inner = around && findWrappingInside(innerRange, nodeType);\n if (!inner)\n return null;\n return around.map(withAttrs)\n .concat({ type: nodeType, attrs }).concat(inner.map(withAttrs));\n}\nfunction withAttrs(type) { return { type, attrs: null }; }\nfunction findWrappingOutside(range, type) {\n let { parent, startIndex, endIndex } = range;\n let around = parent.contentMatchAt(startIndex).findWrapping(type);\n if (!around)\n return null;\n let outer = around.length ? around[0] : type;\n return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null;\n}\nfunction findWrappingInside(range, type) {\n let { parent, startIndex, endIndex } = range;\n let inner = parent.child(startIndex);\n let inside = type.contentMatch.findWrapping(inner.type);\n if (!inside)\n return null;\n let lastType = inside.length ? inside[inside.length - 1] : type;\n let innerMatch = lastType.contentMatch;\n for (let i = startIndex; innerMatch && i < endIndex; i++)\n innerMatch = innerMatch.matchType(parent.child(i).type);\n if (!innerMatch || !innerMatch.validEnd)\n return null;\n return inside;\n}\nfunction wrap(tr, range, wrappers) {\n let content = Fragment.empty;\n for (let i = wrappers.length - 1; i >= 0; i--) {\n if (content.size) {\n let match = wrappers[i].type.contentMatch.matchFragment(content);\n if (!match || !match.validEnd)\n throw new RangeError(\"Wrapper type given to Transform.wrap does not form valid content of its parent wrapper\");\n }\n content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content));\n }\n let start = range.start, end = range.end;\n tr.step(new ReplaceAroundStep(start, end, start, end, new Slice(content, 0, 0), wrappers.length, true));\n}\nfunction setBlockType(tr, from, to, type, attrs) {\n if (!type.isTextblock)\n throw new RangeError(\"Type given to setBlockType should be a textblock\");\n let mapFrom = tr.steps.length;\n tr.doc.nodesBetween(from, to, (node, pos) => {\n let attrsHere = typeof attrs == \"function\" ? attrs(node) : attrs;\n if (node.isTextblock && !node.hasMarkup(type, attrsHere) &&\n canChangeType(tr.doc, tr.mapping.slice(mapFrom).map(pos), type)) {\n let convertNewlines = null;\n if (type.schema.linebreakReplacement) {\n let pre = type.whitespace == \"pre\", supportLinebreak = !!type.contentMatch.matchType(type.schema.linebreakReplacement);\n if (pre && !supportLinebreak)\n convertNewlines = false;\n else if (!pre && supportLinebreak)\n convertNewlines = true;\n }\n // Ensure all markup that isn't allowed in the new node type is cleared\n if (convertNewlines === false)\n replaceLinebreaks(tr, node, pos, mapFrom);\n clearIncompatible(tr, tr.mapping.slice(mapFrom).map(pos, 1), type, undefined, convertNewlines === null);\n let mapping = tr.mapping.slice(mapFrom);\n let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);\n tr.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));\n if (convertNewlines === true)\n replaceNewlines(tr, node, pos, mapFrom);\n return false;\n }\n });\n}\nfunction replaceNewlines(tr, node, pos, mapFrom) {\n node.forEach((child, offset) => {\n if (child.isText) {\n let m, newline = /\\r?\\n|\\r/g;\n while (m = newline.exec(child.text)) {\n let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset + m.index);\n tr.replaceWith(start, start + 1, node.type.schema.linebreakReplacement.create());\n }\n }\n });\n}\nfunction replaceLinebreaks(tr, node, pos, mapFrom) {\n node.forEach((child, offset) => {\n if (child.type == child.type.schema.linebreakReplacement) {\n let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset);\n tr.replaceWith(start, start + 1, node.type.schema.text(\"\\n\"));\n }\n });\n}\nfunction canChangeType(doc, pos, type) {\n let $pos = doc.resolve(pos), index = $pos.index();\n return $pos.parent.canReplaceWith(index, index + 1, type);\n}\n/**\nChange the type, attributes, and/or marks of the node at `pos`.\nWhen `type` isn't given, the existing node type is preserved,\n*/\nfunction setNodeMarkup(tr, pos, type, attrs, marks) {\n let node = tr.doc.nodeAt(pos);\n if (!node)\n throw new RangeError(\"No node at given position\");\n if (!type)\n type = node.type;\n let newNode = type.create(attrs, null, marks || node.marks);\n if (node.isLeaf)\n return tr.replaceWith(pos, pos + node.nodeSize, newNode);\n if (!type.validContent(node.content))\n throw new RangeError(\"Invalid content for node type \" + type.name);\n tr.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice(Fragment.from(newNode), 0, 0), 1, true));\n}\n/**\nCheck whether splitting at the given position is allowed.\n*/\nfunction canSplit(doc, pos, depth = 1, typesAfter) {\n let $pos = doc.resolve(pos), base = $pos.depth - depth;\n let innerType = (typesAfter && typesAfter[typesAfter.length - 1]) || $pos.parent;\n if (base < 0 || $pos.parent.type.spec.isolating ||\n !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) ||\n !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount)))\n return false;\n for (let d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {\n let node = $pos.node(d), index = $pos.index(d);\n if (node.type.spec.isolating)\n return false;\n let rest = node.content.cutByIndex(index, node.childCount);\n let overrideChild = typesAfter && typesAfter[i + 1];\n if (overrideChild)\n rest = rest.replaceChild(0, overrideChild.type.create(overrideChild.attrs));\n let after = (typesAfter && typesAfter[i]) || node;\n if (!node.canReplace(index + 1, node.childCount) || !after.type.validContent(rest))\n return false;\n }\n let index = $pos.indexAfter(base);\n let baseType = typesAfter && typesAfter[0];\n return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type);\n}\nfunction split(tr, pos, depth = 1, typesAfter) {\n let $pos = tr.doc.resolve(pos), before = Fragment.empty, after = Fragment.empty;\n for (let d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {\n before = Fragment.from($pos.node(d).copy(before));\n let typeAfter = typesAfter && typesAfter[i];\n after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));\n }\n tr.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true));\n}\n/**\nTest whether the blocks before and after a given position can be\njoined.\n*/\nfunction canJoin(doc, pos) {\n let $pos = doc.resolve(pos), index = $pos.index();\n return joinable($pos.nodeBefore, $pos.nodeAfter) &&\n $pos.parent.canReplace(index, index + 1);\n}\nfunction canAppendWithSubstitutedLinebreaks(a, b) {\n if (!b.content.size)\n a.type.compatibleContent(b.type);\n let match = a.contentMatchAt(a.childCount);\n let { linebreakReplacement } = a.type.schema;\n for (let i = 0; i < b.childCount; i++) {\n let child = b.child(i);\n let type = child.type == linebreakReplacement ? a.type.schema.nodes.text : child.type;\n match = match.matchType(type);\n if (!match)\n return false;\n if (!a.type.allowsMarks(child.marks))\n return false;\n }\n return match.validEnd;\n}\nfunction joinable(a, b) {\n return !!(a && b && !a.isLeaf && canAppendWithSubstitutedLinebreaks(a, b));\n}\n/**\nFind an ancestor of the given position that can be joined to the\nblock before (or after if `dir` is positive). Returns the joinable\npoint, if any.\n*/\nfunction joinPoint(doc, pos, dir = -1) {\n let $pos = doc.resolve(pos);\n for (let d = $pos.depth;; d--) {\n let before, after, index = $pos.index(d);\n if (d == $pos.depth) {\n before = $pos.nodeBefore;\n after = $pos.nodeAfter;\n }\n else if (dir > 0) {\n before = $pos.node(d + 1);\n index++;\n after = $pos.node(d).maybeChild(index);\n }\n else {\n before = $pos.node(d).maybeChild(index - 1);\n after = $pos.node(d + 1);\n }\n if (before && !before.isTextblock && joinable(before, after) &&\n $pos.node(d).canReplace(index, index + 1))\n return pos;\n if (d == 0)\n break;\n pos = dir < 0 ? $pos.before(d) : $pos.after(d);\n }\n}\nfunction join(tr, pos, depth) {\n let convertNewlines = null;\n let { linebreakReplacement } = tr.doc.type.schema;\n let $before = tr.doc.resolve(pos - depth), beforeType = $before.node().type;\n if (linebreakReplacement && beforeType.inlineContent) {\n let pre = beforeType.whitespace == \"pre\";\n let supportLinebreak = !!beforeType.contentMatch.matchType(linebreakReplacement);\n if (pre && !supportLinebreak)\n convertNewlines = false;\n else if (!pre && supportLinebreak)\n convertNewlines = true;\n }\n let mapFrom = tr.steps.length;\n if (convertNewlines === false) {\n let $after = tr.doc.resolve(pos + depth);\n replaceLinebreaks(tr, $after.node(), $after.before(), mapFrom);\n }\n if (beforeType.inlineContent)\n clearIncompatible(tr, pos + depth - 1, beforeType, $before.node().contentMatchAt($before.index()), convertNewlines == null);\n let mapping = tr.mapping.slice(mapFrom), start = mapping.map(pos - depth);\n tr.step(new ReplaceStep(start, mapping.map(pos + depth, -1), Slice.empty, true));\n if (convertNewlines === true) {\n let $full = tr.doc.resolve(start);\n replaceNewlines(tr, $full.node(), $full.before(), tr.steps.length);\n }\n return tr;\n}\n/**\nTry to find a point where a node of the given type can be inserted\nnear `pos`, by searching up the node hierarchy when `pos` itself\nisn't a valid place but is at the start or end of a node. Return\nnull if no position was found.\n*/\nfunction insertPoint(doc, pos, nodeType) {\n let $pos = doc.resolve(pos);\n if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType))\n return pos;\n if ($pos.parentOffset == 0)\n for (let d = $pos.depth - 1; d >= 0; d--) {\n let index = $pos.index(d);\n if ($pos.node(d).canReplaceWith(index, index, nodeType))\n return $pos.before(d + 1);\n if (index > 0)\n return null;\n }\n if ($pos.parentOffset == $pos.parent.content.size)\n for (let d = $pos.depth - 1; d >= 0; d--) {\n let index = $pos.indexAfter(d);\n if ($pos.node(d).canReplaceWith(index, index, nodeType))\n return $pos.after(d + 1);\n if (index < $pos.node(d).childCount)\n return null;\n }\n return null;\n}\n/**\nFinds a position at or around the given position where the given\nslice can be inserted. Will look at parent nodes' nearest boundary\nand try there, even if the original position wasn't directly at the\nstart or end of that node. Returns null when no position was found.\n*/\nfunction dropPoint(doc, pos, slice) {\n let $pos = doc.resolve(pos);\n if (!slice.content.size)\n return pos;\n let content = slice.content;\n for (let i = 0; i < slice.openStart; i++)\n content = content.firstChild.content;\n for (let pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {\n for (let d = $pos.depth; d >= 0; d--) {\n let bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;\n let insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);\n let parent = $pos.node(d), fits = false;\n if (pass == 1) {\n fits = parent.canReplace(insertPos, insertPos, content);\n }\n else {\n let wrapping = parent.contentMatchAt(insertPos).findWrapping(content.firstChild.type);\n fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);\n }\n if (fits)\n return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);\n }\n }\n return null;\n}\n\n/**\n‘Fit’ a slice into a given position in the document, producing a\n[step](https://prosemirror.net/docs/ref/#transform.Step) that inserts it. Will return null if\nthere's no meaningful way to insert the slice here, or inserting it\nwould be a no-op (an empty slice over an empty range).\n*/\nfunction replaceStep(doc, from, to = from, slice = Slice.empty) {\n if (from == to && !slice.size)\n return null;\n let $from = doc.resolve(from), $to = doc.resolve(to);\n // Optimization -- avoid work if it's obvious that it's not needed.\n if (fitsTrivially($from, $to, slice))\n return new ReplaceStep(from, to, slice);\n return new Fitter($from, $to, slice).fit();\n}\nfunction fitsTrivially($from, $to, slice) {\n return !slice.openStart && !slice.openEnd && $from.start() == $to.start() &&\n $from.parent.canReplace($from.index(), $to.index(), slice.content);\n}\n// Algorithm for 'placing' the elements of a slice into a gap:\n//\n// We consider the content of each node that is open to the left to be\n// independently placeable. I.e. in , when the\n// paragraph on the left is open, \"foo\" can be placed (somewhere on\n// the left side of the replacement gap) independently from p(\"bar\").\n//\n// This class tracks the state of the placement progress in the\n// following properties:\n//\n// - `frontier` holds a stack of `{type, match}` objects that\n// represent the open side of the replacement. It starts at\n// `$from`, then moves forward as content is placed, and is finally\n// reconciled with `$to`.\n//\n// - `unplaced` is a slice that represents the content that hasn't\n// been placed yet.\n//\n// - `placed` is a fragment of placed content. Its open-start value\n// is implicit in `$from`, and its open-end value in `frontier`.\nclass Fitter {\n constructor($from, $to, unplaced) {\n this.$from = $from;\n this.$to = $to;\n this.unplaced = unplaced;\n this.frontier = [];\n this.placed = Fragment.empty;\n for (let i = 0; i <= $from.depth; i++) {\n let node = $from.node(i);\n this.frontier.push({\n type: node.type,\n match: node.contentMatchAt($from.indexAfter(i))\n });\n }\n for (let i = $from.depth; i > 0; i--)\n this.placed = Fragment.from($from.node(i).copy(this.placed));\n }\n get depth() { return this.frontier.length - 1; }\n fit() {\n // As long as there's unplaced content, try to place some of it.\n // If that fails, either increase the open score of the unplaced\n // slice, or drop nodes from it, and then try again.\n while (this.unplaced.size) {\n let fit = this.findFittable();\n if (fit)\n this.placeNodes(fit);\n else\n this.openMore() || this.dropNode();\n }\n // When there's inline content directly after the frontier _and_\n // directly after `this.$to`, we must generate a `ReplaceAround`\n // step that pulls that content into the node after the frontier.\n // That means the fitting must be done to the end of the textblock\n // node after `this.$to`, not `this.$to` itself.\n let moveInline = this.mustMoveInline(), placedSize = this.placed.size - this.depth - this.$from.depth;\n let $from = this.$from, $to = this.close(moveInline < 0 ? this.$to : $from.doc.resolve(moveInline));\n if (!$to)\n return null;\n // If closing to `$to` succeeded, create a step\n let content = this.placed, openStart = $from.depth, openEnd = $to.depth;\n while (openStart && openEnd && content.childCount == 1) { // Normalize by dropping open parent nodes\n content = content.firstChild.content;\n openStart--;\n openEnd--;\n }\n let slice = new Slice(content, openStart, openEnd);\n if (moveInline > -1)\n return new ReplaceAroundStep($from.pos, moveInline, this.$to.pos, this.$to.end(), slice, placedSize);\n if (slice.size || $from.pos != this.$to.pos) // Don't generate no-op steps\n return new ReplaceStep($from.pos, $to.pos, slice);\n return null;\n }\n // Find a position on the start spine of `this.unplaced` that has\n // content that can be moved somewhere on the frontier. Returns two\n // depths, one for the slice and one for the frontier.\n findFittable() {\n let startDepth = this.unplaced.openStart;\n for (let cur = this.unplaced.content, d = 0, openEnd = this.unplaced.openEnd; d < startDepth; d++) {\n let node = cur.firstChild;\n if (cur.childCount > 1)\n openEnd = 0;\n if (node.type.spec.isolating && openEnd <= d) {\n startDepth = d;\n break;\n }\n cur = node.content;\n }\n // Only try wrapping nodes (pass 2) after finding a place without\n // wrapping failed.\n for (let pass = 1; pass <= 2; pass++) {\n for (let sliceDepth = pass == 1 ? startDepth : this.unplaced.openStart; sliceDepth >= 0; sliceDepth--) {\n let fragment, parent = null;\n if (sliceDepth) {\n parent = contentAt(this.unplaced.content, sliceDepth - 1).firstChild;\n fragment = parent.content;\n }\n else {\n fragment = this.unplaced.content;\n }\n let first = fragment.firstChild;\n for (let frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {\n let { type, match } = this.frontier[frontierDepth], wrap, inject = null;\n // In pass 1, if the next node matches, or there is no next\n // node but the parents look compatible, we've found a\n // place.\n if (pass == 1 && (first ? match.matchType(first.type) || (inject = match.fillBefore(Fragment.from(first), false))\n : parent && type.compatibleContent(parent.type)))\n return { sliceDepth, frontierDepth, parent, inject };\n // In pass 2, look for a set of wrapping nodes that make\n // `first` fit here.\n else if (pass == 2 && first && (wrap = match.findWrapping(first.type)))\n return { sliceDepth, frontierDepth, parent, wrap };\n // Don't continue looking further up if the parent node\n // would fit here.\n if (parent && match.matchType(parent.type))\n break;\n }\n }\n }\n }\n openMore() {\n let { content, openStart, openEnd } = this.unplaced;\n let inner = contentAt(content, openStart);\n if (!inner.childCount || inner.firstChild.isLeaf)\n return false;\n this.unplaced = new Slice(content, openStart + 1, Math.max(openEnd, inner.size + openStart >= content.size - openEnd ? openStart + 1 : 0));\n return true;\n }\n dropNode() {\n let { content, openStart, openEnd } = this.unplaced;\n let inner = contentAt(content, openStart);\n if (inner.childCount <= 1 && openStart > 0) {\n let openAtEnd = content.size - openStart <= openStart + inner.size;\n this.unplaced = new Slice(dropFromFragment(content, openStart - 1, 1), openStart - 1, openAtEnd ? openStart - 1 : openEnd);\n }\n else {\n this.unplaced = new Slice(dropFromFragment(content, openStart, 1), openStart, openEnd);\n }\n }\n // Move content from the unplaced slice at `sliceDepth` to the\n // frontier node at `frontierDepth`. Close that frontier node when\n // applicable.\n placeNodes({ sliceDepth, frontierDepth, parent, inject, wrap }) {\n while (this.depth > frontierDepth)\n this.closeFrontierNode();\n if (wrap)\n for (let i = 0; i < wrap.length; i++)\n this.openFrontierNode(wrap[i]);\n let slice = this.unplaced, fragment = parent ? parent.content : slice.content;\n let openStart = slice.openStart - sliceDepth;\n let taken = 0, add = [];\n let { match, type } = this.frontier[frontierDepth];\n if (inject) {\n for (let i = 0; i < inject.childCount; i++)\n add.push(inject.child(i));\n match = match.matchFragment(inject);\n }\n // Computes the amount of (end) open nodes at the end of the\n // fragment. When 0, the parent is open, but no more. When\n // negative, nothing is open.\n let openEndCount = (fragment.size + sliceDepth) - (slice.content.size - slice.openEnd);\n // Scan over the fragment, fitting as many child nodes as\n // possible.\n while (taken < fragment.childCount) {\n let next = fragment.child(taken), matches = match.matchType(next.type);\n if (!matches)\n break;\n taken++;\n if (taken > 1 || openStart == 0 || next.content.size) { // Drop empty open nodes\n match = matches;\n add.push(closeNodeStart(next.mark(type.allowedMarks(next.marks)), taken == 1 ? openStart : 0, taken == fragment.childCount ? openEndCount : -1));\n }\n }\n let toEnd = taken == fragment.childCount;\n if (!toEnd)\n openEndCount = -1;\n this.placed = addToFragment(this.placed, frontierDepth, Fragment.from(add));\n this.frontier[frontierDepth].match = match;\n // If the parent types match, and the entire node was moved, and\n // it's not open, close this frontier node right away.\n if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1)\n this.closeFrontierNode();\n // Add new frontier nodes for any open nodes at the end.\n for (let i = 0, cur = fragment; i < openEndCount; i++) {\n let node = cur.lastChild;\n this.frontier.push({ type: node.type, match: node.contentMatchAt(node.childCount) });\n cur = node.content;\n }\n // Update `this.unplaced`. Drop the entire node from which we\n // placed it we got to its end, otherwise just drop the placed\n // nodes.\n this.unplaced = !toEnd ? new Slice(dropFromFragment(slice.content, sliceDepth, taken), slice.openStart, slice.openEnd)\n : sliceDepth == 0 ? Slice.empty\n : new Slice(dropFromFragment(slice.content, sliceDepth - 1, 1), sliceDepth - 1, openEndCount < 0 ? slice.openEnd : sliceDepth - 1);\n }\n mustMoveInline() {\n if (!this.$to.parent.isTextblock)\n return -1;\n let top = this.frontier[this.depth], level;\n if (!top.type.isTextblock || !contentAfterFits(this.$to, this.$to.depth, top.type, top.match, false) ||\n (this.$to.depth == this.depth && (level = this.findCloseLevel(this.$to)) && level.depth == this.depth))\n return -1;\n let { depth } = this.$to, after = this.$to.after(depth);\n while (depth > 1 && after == this.$to.end(--depth))\n ++after;\n return after;\n }\n findCloseLevel($to) {\n scan: for (let i = Math.min(this.depth, $to.depth); i >= 0; i--) {\n let { match, type } = this.frontier[i];\n let dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));\n let fit = contentAfterFits($to, i, type, match, dropInner);\n if (!fit)\n continue;\n for (let d = i - 1; d >= 0; d--) {\n let { match, type } = this.frontier[d];\n let matches = contentAfterFits($to, d, type, match, true);\n if (!matches || matches.childCount)\n continue scan;\n }\n return { depth: i, fit, move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to };\n }\n }\n close($to) {\n let close = this.findCloseLevel($to);\n if (!close)\n return null;\n while (this.depth > close.depth)\n this.closeFrontierNode();\n if (close.fit.childCount)\n this.placed = addToFragment(this.placed, close.depth, close.fit);\n $to = close.move;\n for (let d = close.depth + 1; d <= $to.depth; d++) {\n let node = $to.node(d), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));\n this.openFrontierNode(node.type, node.attrs, add);\n }\n return $to;\n }\n openFrontierNode(type, attrs = null, content) {\n let top = this.frontier[this.depth];\n top.match = top.match.matchType(type);\n this.placed = addToFragment(this.placed, this.depth, Fragment.from(type.create(attrs, content)));\n this.frontier.push({ type, match: type.contentMatch });\n }\n closeFrontierNode() {\n let open = this.frontier.pop();\n let add = open.match.fillBefore(Fragment.empty, true);\n if (add.childCount)\n this.placed = addToFragment(this.placed, this.frontier.length, add);\n }\n}\nfunction dropFromFragment(fragment, depth, count) {\n if (depth == 0)\n return fragment.cutByIndex(count, fragment.childCount);\n return fragment.replaceChild(0, fragment.firstChild.copy(dropFromFragment(fragment.firstChild.content, depth - 1, count)));\n}\nfunction addToFragment(fragment, depth, content) {\n if (depth == 0)\n return fragment.append(content);\n return fragment.replaceChild(fragment.childCount - 1, fragment.lastChild.copy(addToFragment(fragment.lastChild.content, depth - 1, content)));\n}\nfunction contentAt(fragment, depth) {\n for (let i = 0; i < depth; i++)\n fragment = fragment.firstChild.content;\n return fragment;\n}\nfunction closeNodeStart(node, openStart, openEnd) {\n if (openStart <= 0)\n return node;\n let frag = node.content;\n if (openStart > 1)\n frag = frag.replaceChild(0, closeNodeStart(frag.firstChild, openStart - 1, frag.childCount == 1 ? openEnd - 1 : 0));\n if (openStart > 0) {\n frag = node.type.contentMatch.fillBefore(frag).append(frag);\n if (openEnd <= 0)\n frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment.empty, true));\n }\n return node.copy(frag);\n}\nfunction contentAfterFits($to, depth, type, match, open) {\n let node = $to.node(depth), index = open ? $to.indexAfter(depth) : $to.index(depth);\n if (index == node.childCount && !type.compatibleContent(node.type))\n return null;\n let fit = match.fillBefore(node.content, true, index);\n return fit && !invalidMarks(type, node.content, index) ? fit : null;\n}\nfunction invalidMarks(type, fragment, start) {\n for (let i = start; i < fragment.childCount; i++)\n if (!type.allowsMarks(fragment.child(i).marks))\n return true;\n return false;\n}\nfunction definesContent(type) {\n return type.spec.defining || type.spec.definingForContent;\n}\nfunction replaceRange(tr, from, to, slice) {\n if (!slice.size)\n return tr.deleteRange(from, to);\n let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);\n if (fitsTrivially($from, $to, slice))\n return tr.step(new ReplaceStep(from, to, slice));\n let targetDepths = coveredDepths($from, $to);\n // Can't replace the whole document, so remove 0 if it's present\n if (targetDepths[targetDepths.length - 1] == 0)\n targetDepths.pop();\n // Negative numbers represent not expansion over the whole node at\n // that depth, but replacing from $from.before(-D) to $to.pos.\n let preferredTarget = -($from.depth + 1);\n targetDepths.unshift(preferredTarget);\n // This loop picks a preferred target depth, if one of the covering\n // depths is not outside of a defining node, and adds negative\n // depths for any depth that has $from at its start and does not\n // cross a defining node.\n for (let d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {\n let spec = $from.node(d).type.spec;\n if (spec.defining || spec.definingAsContext || spec.isolating)\n break;\n if (targetDepths.indexOf(d) > -1)\n preferredTarget = d;\n else if ($from.before(d) == pos)\n targetDepths.splice(1, 0, -d);\n }\n // Try to fit each possible depth of the slice into each possible\n // target depth, starting with the preferred depths.\n let preferredTargetIndex = targetDepths.indexOf(preferredTarget);\n let leftNodes = [], preferredDepth = slice.openStart;\n for (let content = slice.content, i = 0;; i++) {\n let node = content.firstChild;\n leftNodes.push(node);\n if (i == slice.openStart)\n break;\n content = node.content;\n }\n // Back up preferredDepth to cover defining textblocks directly\n // above it, possibly skipping a non-defining textblock.\n for (let d = preferredDepth - 1; d >= 0; d--) {\n let leftNode = leftNodes[d], def = definesContent(leftNode.type);\n if (def && !leftNode.sameMarkup($from.node(Math.abs(preferredTarget) - 1)))\n preferredDepth = d;\n else if (def || !leftNode.type.isTextblock)\n break;\n }\n for (let j = slice.openStart; j >= 0; j--) {\n let openDepth = (j + preferredDepth + 1) % (slice.openStart + 1);\n let insert = leftNodes[openDepth];\n if (!insert)\n continue;\n for (let i = 0; i < targetDepths.length; i++) {\n // Loop over possible expansion levels, starting with the\n // preferred one\n let targetDepth = targetDepths[(i + preferredTargetIndex) % targetDepths.length], expand = true;\n if (targetDepth < 0) {\n expand = false;\n targetDepth = -targetDepth;\n }\n let parent = $from.node(targetDepth - 1), index = $from.index(targetDepth - 1);\n if (parent.canReplaceWith(index, index, insert.type, insert.marks))\n return tr.replace($from.before(targetDepth), expand ? $to.after(targetDepth) : to, new Slice(closeFragment(slice.content, 0, slice.openStart, openDepth), openDepth, slice.openEnd));\n }\n }\n let startSteps = tr.steps.length;\n for (let i = targetDepths.length - 1; i >= 0; i--) {\n tr.replace(from, to, slice);\n if (tr.steps.length > startSteps)\n break;\n let depth = targetDepths[i];\n if (depth < 0)\n continue;\n from = $from.before(depth);\n to = $to.after(depth);\n }\n}\nfunction closeFragment(fragment, depth, oldOpen, newOpen, parent) {\n if (depth < oldOpen) {\n let first = fragment.firstChild;\n fragment = fragment.replaceChild(0, first.copy(closeFragment(first.content, depth + 1, oldOpen, newOpen, first)));\n }\n if (depth > newOpen) {\n let match = parent.contentMatchAt(0);\n let start = match.fillBefore(fragment).append(fragment);\n fragment = start.append(match.matchFragment(start).fillBefore(Fragment.empty, true));\n }\n return fragment;\n}\nfunction replaceRangeWith(tr, from, to, node) {\n if (!node.isInline && from == to && tr.doc.resolve(from).parent.content.size) {\n let point = insertPoint(tr.doc, from, node.type);\n if (point != null)\n from = to = point;\n }\n tr.replaceRange(from, to, new Slice(Fragment.from(node), 0, 0));\n}\nfunction deleteRange(tr, from, to) {\n let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);\n // When the deleted range spans from the start of one textblock to\n // the start of another one, move out of the start of both blocks.\n if ($from.parent.isTextblock && $to.parent.isTextblock && $from.start() != $to.start() &&\n $from.parentOffset == 0 && $to.parentOffset == 0) {\n let shared = $from.sharedDepth(to), isolated = false;\n for (let d = $from.depth; d > shared; d--)\n if ($from.node(d).type.spec.isolating)\n isolated = true;\n for (let d = $to.depth; d > shared; d--)\n if ($to.node(d).type.spec.isolating)\n isolated = true;\n if (!isolated) {\n for (let d = $from.depth; d > 0 && from == $from.start(d); d--)\n from = $from.before(d);\n for (let d = $to.depth; d > 0 && to == $to.start(d); d--)\n to = $to.before(d);\n $from = tr.doc.resolve(from);\n $to = tr.doc.resolve(to);\n }\n }\n let covered = coveredDepths($from, $to);\n for (let i = 0; i < covered.length; i++) {\n let depth = covered[i], last = i == covered.length - 1;\n if ((last && depth == 0) || $from.node(depth).type.contentMatch.validEnd)\n return tr.delete($from.start(depth), $to.end(depth));\n if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1))))\n return tr.delete($from.before(depth), $to.after(depth));\n }\n for (let d = 1; d <= $from.depth && d <= $to.depth; d++) {\n if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d &&\n $from.start(d - 1) == $to.start(d - 1) && $from.node(d - 1).canReplace($from.index(d - 1), $to.index(d - 1)))\n return tr.delete($from.before(d), to);\n }\n tr.delete(from, to);\n}\n// Returns an array of all depths for which $from - $to spans the\n// whole content of the nodes at that depth.\nfunction coveredDepths($from, $to) {\n let result = [], minDepth = Math.min($from.depth, $to.depth);\n for (let d = minDepth; d >= 0; d--) {\n let start = $from.start(d);\n if (start < $from.pos - ($from.depth - d) ||\n $to.end(d) > $to.pos + ($to.depth - d) ||\n $from.node(d).type.spec.isolating ||\n $to.node(d).type.spec.isolating)\n break;\n if (start == $to.start(d) ||\n (d == $from.depth && d == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent &&\n d && $to.start(d - 1) == start - 1))\n result.push(d);\n }\n return result;\n}\n\n/**\nUpdate an attribute in a specific node.\n*/\nclass AttrStep extends Step {\n /**\n Construct an attribute step.\n */\n constructor(\n /**\n The position of the target node.\n */\n pos, \n /**\n The attribute to set.\n */\n attr, \n // The attribute's new value.\n value) {\n super();\n this.pos = pos;\n this.attr = attr;\n this.value = value;\n }\n apply(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node)\n return StepResult.fail(\"No node at attribute step's position\");\n let attrs = Object.create(null);\n for (let name in node.attrs)\n attrs[name] = node.attrs[name];\n attrs[this.attr] = this.value;\n let updated = node.type.create(attrs, null, node.marks);\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n getMap() {\n return StepMap.empty;\n }\n invert(doc) {\n return new AttrStep(this.pos, this.attr, doc.nodeAt(this.pos).attrs[this.attr]);\n }\n map(mapping) {\n let pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new AttrStep(pos.pos, this.attr, this.value);\n }\n toJSON() {\n return { stepType: \"attr\", pos: this.pos, attr: this.attr, value: this.value };\n }\n static fromJSON(schema, json) {\n if (typeof json.pos != \"number\" || typeof json.attr != \"string\")\n throw new RangeError(\"Invalid input for AttrStep.fromJSON\");\n return new AttrStep(json.pos, json.attr, json.value);\n }\n}\nStep.jsonID(\"attr\", AttrStep);\n/**\nUpdate an attribute in the doc node.\n*/\nclass DocAttrStep extends Step {\n /**\n Construct an attribute step.\n */\n constructor(\n /**\n The attribute to set.\n */\n attr, \n // The attribute's new value.\n value) {\n super();\n this.attr = attr;\n this.value = value;\n }\n apply(doc) {\n let attrs = Object.create(null);\n for (let name in doc.attrs)\n attrs[name] = doc.attrs[name];\n attrs[this.attr] = this.value;\n let updated = doc.type.create(attrs, doc.content, doc.marks);\n return StepResult.ok(updated);\n }\n getMap() {\n return StepMap.empty;\n }\n invert(doc) {\n return new DocAttrStep(this.attr, doc.attrs[this.attr]);\n }\n map(mapping) {\n return this;\n }\n toJSON() {\n return { stepType: \"docAttr\", attr: this.attr, value: this.value };\n }\n static fromJSON(schema, json) {\n if (typeof json.attr != \"string\")\n throw new RangeError(\"Invalid input for DocAttrStep.fromJSON\");\n return new DocAttrStep(json.attr, json.value);\n }\n}\nStep.jsonID(\"docAttr\", DocAttrStep);\n\n/**\n@internal\n*/\nlet TransformError = class extends Error {\n};\nTransformError = function TransformError(message) {\n let err = Error.call(this, message);\n err.__proto__ = TransformError.prototype;\n return err;\n};\nTransformError.prototype = Object.create(Error.prototype);\nTransformError.prototype.constructor = TransformError;\nTransformError.prototype.name = \"TransformError\";\n/**\nAbstraction to build up and track an array of\n[steps](https://prosemirror.net/docs/ref/#transform.Step) representing a document transformation.\n\nMost transforming methods return the `Transform` object itself, so\nthat they can be chained.\n*/\nclass Transform {\n /**\n Create a transform that starts with the given document.\n */\n constructor(\n /**\n The current document (the result of applying the steps in the\n transform).\n */\n doc) {\n this.doc = doc;\n /**\n The steps in this transform.\n */\n this.steps = [];\n /**\n The documents before each of the steps.\n */\n this.docs = [];\n /**\n A mapping with the maps for each of the steps in this transform.\n */\n this.mapping = new Mapping;\n }\n /**\n The starting document.\n */\n get before() { return this.docs.length ? this.docs[0] : this.doc; }\n /**\n Apply a new step in this transform, saving the result. Throws an\n error when the step fails.\n */\n step(step) {\n let result = this.maybeStep(step);\n if (result.failed)\n throw new TransformError(result.failed);\n return this;\n }\n /**\n Try to apply a step in this transformation, ignoring it if it\n fails. Returns the step result.\n */\n maybeStep(step) {\n let result = step.apply(this.doc);\n if (!result.failed)\n this.addStep(step, result.doc);\n return result;\n }\n /**\n True when the document has been changed (when there are any\n steps).\n */\n get docChanged() {\n return this.steps.length > 0;\n }\n /**\n Return a single range, in post-transform document positions,\n that covers all content changed by this transform. Returns null\n if no replacements are made. Note that this will ignore changes\n that add/remove marks without replacing the underlying content.\n */\n changedRange() {\n let from = 1e9, to = -1e9;\n for (let i = 0; i < this.mapping.maps.length; i++) {\n let map = this.mapping.maps[i];\n if (i) {\n from = map.map(from, 1);\n to = map.map(to, -1);\n }\n map.forEach((_f, _t, fromB, toB) => {\n from = Math.min(from, fromB);\n to = Math.max(to, toB);\n });\n }\n return from == 1e9 ? null : { from, to };\n }\n /**\n @internal\n */\n addStep(step, doc) {\n this.docs.push(this.doc);\n this.steps.push(step);\n this.mapping.appendMap(step.getMap());\n this.doc = doc;\n }\n /**\n Replace the part of the document between `from` and `to` with the\n given `slice`.\n */\n replace(from, to = from, slice = Slice.empty) {\n let step = replaceStep(this.doc, from, to, slice);\n if (step)\n this.step(step);\n return this;\n }\n /**\n Replace the given range with the given content, which may be a\n fragment, node, or array of nodes.\n */\n replaceWith(from, to, content) {\n return this.replace(from, to, new Slice(Fragment.from(content), 0, 0));\n }\n /**\n Delete the content between the given positions.\n */\n delete(from, to) {\n return this.replace(from, to, Slice.empty);\n }\n /**\n Insert the given content at the given position.\n */\n insert(pos, content) {\n return this.replaceWith(pos, pos, content);\n }\n /**\n Replace a range of the document with a given slice, using\n `from`, `to`, and the slice's\n [`openStart`](https://prosemirror.net/docs/ref/#model.Slice.openStart) property as hints, rather\n than fixed start and end points. This method may grow the\n replaced area or close open nodes in the slice in order to get a\n fit that is more in line with WYSIWYG expectations, by dropping\n fully covered parent nodes of the replaced region when they are\n marked [non-defining as\n context](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext), or including an\n open parent node from the slice that _is_ marked as [defining\n its content](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).\n \n This is the method, for example, to handle paste. The similar\n [`replace`](https://prosemirror.net/docs/ref/#transform.Transform.replace) method is a more\n primitive tool which will _not_ move the start and end of its given\n range, and is useful in situations where you need more precise\n control over what happens.\n */\n replaceRange(from, to, slice) {\n replaceRange(this, from, to, slice);\n return this;\n }\n /**\n Replace the given range with a node, but use `from` and `to` as\n hints, rather than precise positions. When from and to are the same\n and are at the start or end of a parent node in which the given\n node doesn't fit, this method may _move_ them out towards a parent\n that does allow the given node to be placed. When the given range\n completely covers a parent node, this method may completely replace\n that parent node.\n */\n replaceRangeWith(from, to, node) {\n replaceRangeWith(this, from, to, node);\n return this;\n }\n /**\n Delete the given range, expanding it to cover fully covered\n parent nodes until a valid replace is found.\n */\n deleteRange(from, to) {\n deleteRange(this, from, to);\n return this;\n }\n /**\n Split the content in the given range off from its parent, if there\n is sibling content before or after it, and move it up the tree to\n the depth specified by `target`. You'll probably want to use\n [`liftTarget`](https://prosemirror.net/docs/ref/#transform.liftTarget) to compute `target`, to make\n sure the lift is valid.\n */\n lift(range, target) {\n lift(this, range, target);\n return this;\n }\n /**\n Join the blocks around the given position. If depth is 2, their\n last and first siblings are also joined, and so on.\n */\n join(pos, depth = 1) {\n join(this, pos, depth);\n return this;\n }\n /**\n Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.\n The wrappers are assumed to be valid in this position, and should\n probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).\n */\n wrap(range, wrappers) {\n wrap(this, range, wrappers);\n return this;\n }\n /**\n Set the type of all textblocks (partly) between `from` and `to` to\n the given node type with the given attributes.\n */\n setBlockType(from, to = from, type, attrs = null) {\n setBlockType(this, from, to, type, attrs);\n return this;\n }\n /**\n Change the type, attributes, and/or marks of the node at `pos`.\n When `type` isn't given, the existing node type is preserved,\n */\n setNodeMarkup(pos, type, attrs = null, marks) {\n setNodeMarkup(this, pos, type, attrs, marks);\n return this;\n }\n /**\n Set a single attribute on a given node to a new value.\n The `pos` addresses the document content. Use `setDocAttribute`\n to set attributes on the document itself.\n */\n setNodeAttribute(pos, attr, value) {\n this.step(new AttrStep(pos, attr, value));\n return this;\n }\n /**\n Set a single attribute on the document to a new value.\n */\n setDocAttribute(attr, value) {\n this.step(new DocAttrStep(attr, value));\n return this;\n }\n /**\n Add a mark to the node at position `pos`.\n */\n addNodeMark(pos, mark) {\n this.step(new AddNodeMarkStep(pos, mark));\n return this;\n }\n /**\n Remove a mark (or all marks of the given type) from the node at\n position `pos`.\n */\n removeNodeMark(pos, mark) {\n let node = this.doc.nodeAt(pos);\n if (!node)\n throw new RangeError(\"No node at position \" + pos);\n if (mark instanceof Mark) {\n if (mark.isInSet(node.marks))\n this.step(new RemoveNodeMarkStep(pos, mark));\n }\n else {\n let set = node.marks, found, steps = [];\n while (found = mark.isInSet(set)) {\n steps.push(new RemoveNodeMarkStep(pos, found));\n set = found.removeFromSet(set);\n }\n for (let i = steps.length - 1; i >= 0; i--)\n this.step(steps[i]);\n }\n return this;\n }\n /**\n Split the node at the given position, and optionally, if `depth` is\n greater than one, any number of nodes above that. By default, the\n parts split off will inherit the node type of the original node.\n This can be changed by passing an array of types and attributes to\n use after the split (with the outermost nodes coming first).\n */\n split(pos, depth = 1, typesAfter) {\n split(this, pos, depth, typesAfter);\n return this;\n }\n /**\n Add the given mark to the inline content between `from` and `to`.\n */\n addMark(from, to, mark) {\n addMark(this, from, to, mark);\n return this;\n }\n /**\n Remove marks from inline nodes between `from` and `to`. When\n `mark` is a single mark, remove precisely that mark. When it is\n a mark type, remove all marks of that type. When it is null,\n remove all marks of any type.\n */\n removeMark(from, to, mark) {\n removeMark(this, from, to, mark);\n return this;\n }\n /**\n Removes all marks and nodes from the content of the node at\n `pos` that don't match the given new parent node type. Accepts\n an optional starting [content match](https://prosemirror.net/docs/ref/#model.ContentMatch) as\n third argument.\n */\n clearIncompatible(pos, parentType, match) {\n clearIncompatible(this, pos, parentType, match);\n return this;\n }\n}\n\nexport { AddMarkStep, AddNodeMarkStep, AttrStep, DocAttrStep, MapResult, Mapping, RemoveMarkStep, RemoveNodeMarkStep, ReplaceAroundStep, ReplaceStep, Step, StepMap, StepResult, Transform, TransformError, canJoin, canSplit, dropPoint, findWrapping, insertPoint, joinPoint, liftTarget, replaceStep };\n","import { Slice, Fragment, Mark, Node } from 'prosemirror-model';\nimport { ReplaceStep, ReplaceAroundStep, Transform } from 'prosemirror-transform';\n\nconst classesById = Object.create(null);\n/**\nSuperclass for editor selections. Every selection type should\nextend this. Should not be instantiated directly.\n*/\nclass Selection {\n /**\n Initialize a selection with the head and anchor and ranges. If no\n ranges are given, constructs a single range across `$anchor` and\n `$head`.\n */\n constructor(\n /**\n The resolved anchor of the selection (the side that stays in\n place when the selection is modified).\n */\n $anchor, \n /**\n The resolved head of the selection (the side that moves when\n the selection is modified).\n */\n $head, ranges) {\n this.$anchor = $anchor;\n this.$head = $head;\n this.ranges = ranges || [new SelectionRange($anchor.min($head), $anchor.max($head))];\n }\n /**\n The selection's anchor, as an unresolved position.\n */\n get anchor() { return this.$anchor.pos; }\n /**\n The selection's head.\n */\n get head() { return this.$head.pos; }\n /**\n The lower bound of the selection's main range.\n */\n get from() { return this.$from.pos; }\n /**\n The upper bound of the selection's main range.\n */\n get to() { return this.$to.pos; }\n /**\n The resolved lower bound of the selection's main range.\n */\n get $from() {\n return this.ranges[0].$from;\n }\n /**\n The resolved upper bound of the selection's main range.\n */\n get $to() {\n return this.ranges[0].$to;\n }\n /**\n Indicates whether the selection contains any content.\n */\n get empty() {\n let ranges = this.ranges;\n for (let i = 0; i < ranges.length; i++)\n if (ranges[i].$from.pos != ranges[i].$to.pos)\n return false;\n return true;\n }\n /**\n Get the content of this selection as a slice.\n */\n content() {\n return this.$from.doc.slice(this.from, this.to, true);\n }\n /**\n Replace the selection with a slice or, if no slice is given,\n delete the selection. Will append to the given transaction.\n */\n replace(tr, content = Slice.empty) {\n // Put the new selection at the position after the inserted\n // content. When that ended in an inline node, search backwards,\n // to get the position after that node. If not, search forward.\n let lastNode = content.content.lastChild, lastParent = null;\n for (let i = 0; i < content.openEnd; i++) {\n lastParent = lastNode;\n lastNode = lastNode.lastChild;\n }\n let mapFrom = tr.steps.length, ranges = this.ranges;\n for (let i = 0; i < ranges.length; i++) {\n let { $from, $to } = ranges[i], mapping = tr.mapping.slice(mapFrom);\n tr.replaceRange(mapping.map($from.pos), mapping.map($to.pos), i ? Slice.empty : content);\n if (i == 0)\n selectionToInsertionEnd(tr, mapFrom, (lastNode ? lastNode.isInline : lastParent && lastParent.isTextblock) ? -1 : 1);\n }\n }\n /**\n Replace the selection with the given node, appending the changes\n to the given transaction.\n */\n replaceWith(tr, node) {\n let mapFrom = tr.steps.length, ranges = this.ranges;\n for (let i = 0; i < ranges.length; i++) {\n let { $from, $to } = ranges[i], mapping = tr.mapping.slice(mapFrom);\n let from = mapping.map($from.pos), to = mapping.map($to.pos);\n if (i) {\n tr.deleteRange(from, to);\n }\n else {\n tr.replaceRangeWith(from, to, node);\n selectionToInsertionEnd(tr, mapFrom, node.isInline ? -1 : 1);\n }\n }\n }\n /**\n Find a valid cursor or leaf node selection starting at the given\n position and searching back if `dir` is negative, and forward if\n positive. When `textOnly` is true, only consider cursor\n selections. Will return null when no valid selection position is\n found.\n */\n static findFrom($pos, dir, textOnly = false) {\n let inner = $pos.parent.inlineContent ? new TextSelection($pos)\n : findSelectionIn($pos.node(0), $pos.parent, $pos.pos, $pos.index(), dir, textOnly);\n if (inner)\n return inner;\n for (let depth = $pos.depth - 1; depth >= 0; depth--) {\n let found = dir < 0\n ? findSelectionIn($pos.node(0), $pos.node(depth), $pos.before(depth + 1), $pos.index(depth), dir, textOnly)\n : findSelectionIn($pos.node(0), $pos.node(depth), $pos.after(depth + 1), $pos.index(depth) + 1, dir, textOnly);\n if (found)\n return found;\n }\n return null;\n }\n /**\n Find a valid cursor or leaf node selection near the given\n position. Searches forward first by default, but if `bias` is\n negative, it will search backwards first.\n */\n static near($pos, bias = 1) {\n return this.findFrom($pos, bias) || this.findFrom($pos, -bias) || new AllSelection($pos.node(0));\n }\n /**\n Find the cursor or leaf node selection closest to the start of\n the given document. Will return an\n [`AllSelection`](https://prosemirror.net/docs/ref/#state.AllSelection) if no valid position\n exists.\n */\n static atStart(doc) {\n return findSelectionIn(doc, doc, 0, 0, 1) || new AllSelection(doc);\n }\n /**\n Find the cursor or leaf node selection closest to the end of the\n given document.\n */\n static atEnd(doc) {\n return findSelectionIn(doc, doc, doc.content.size, doc.childCount, -1) || new AllSelection(doc);\n }\n /**\n Deserialize the JSON representation of a selection. Must be\n implemented for custom classes (as a static class method).\n */\n static fromJSON(doc, json) {\n if (!json || !json.type)\n throw new RangeError(\"Invalid input for Selection.fromJSON\");\n let cls = classesById[json.type];\n if (!cls)\n throw new RangeError(`No selection type ${json.type} defined`);\n return cls.fromJSON(doc, json);\n }\n /**\n To be able to deserialize selections from JSON, custom selection\n classes must register themselves with an ID string, so that they\n can be disambiguated. Try to pick something that's unlikely to\n clash with classes from other modules.\n */\n static jsonID(id, selectionClass) {\n if (id in classesById)\n throw new RangeError(\"Duplicate use of selection JSON ID \" + id);\n classesById[id] = selectionClass;\n selectionClass.prototype.jsonID = id;\n return selectionClass;\n }\n /**\n Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,\n which is a value that can be mapped without having access to a\n current document, and later resolved to a real selection for a\n given document again. (This is used mostly by the history to\n track and restore old selections.) The default implementation of\n this method just converts the selection to a text selection and\n returns the bookmark for that.\n */\n getBookmark() {\n return TextSelection.between(this.$anchor, this.$head).getBookmark();\n }\n}\nSelection.prototype.visible = true;\n/**\nRepresents a selected range in a document.\n*/\nclass SelectionRange {\n /**\n Create a range.\n */\n constructor(\n /**\n The lower bound of the range.\n */\n $from, \n /**\n The upper bound of the range.\n */\n $to) {\n this.$from = $from;\n this.$to = $to;\n }\n}\nlet warnedAboutTextSelection = false;\nfunction checkTextSelection($pos) {\n if (!warnedAboutTextSelection && !$pos.parent.inlineContent) {\n warnedAboutTextSelection = true;\n console[\"warn\"](\"TextSelection endpoint not pointing into a node with inline content (\" + $pos.parent.type.name + \")\");\n }\n}\n/**\nA text selection represents a classical editor selection, with a\nhead (the moving side) and anchor (immobile side), both of which\npoint into textblock nodes. It can be empty (a regular cursor\nposition).\n*/\nclass TextSelection extends Selection {\n /**\n Construct a text selection between the given points.\n */\n constructor($anchor, $head = $anchor) {\n checkTextSelection($anchor);\n checkTextSelection($head);\n super($anchor, $head);\n }\n /**\n Returns a resolved position if this is a cursor selection (an\n empty text selection), and null otherwise.\n */\n get $cursor() { return this.$anchor.pos == this.$head.pos ? this.$head : null; }\n map(doc, mapping) {\n let $head = doc.resolve(mapping.map(this.head));\n if (!$head.parent.inlineContent)\n return Selection.near($head);\n let $anchor = doc.resolve(mapping.map(this.anchor));\n return new TextSelection($anchor.parent.inlineContent ? $anchor : $head, $head);\n }\n replace(tr, content = Slice.empty) {\n super.replace(tr, content);\n if (content == Slice.empty) {\n let marks = this.$from.marksAcross(this.$to);\n if (marks)\n tr.ensureMarks(marks);\n }\n }\n eq(other) {\n return other instanceof TextSelection && other.anchor == this.anchor && other.head == this.head;\n }\n getBookmark() {\n return new TextBookmark(this.anchor, this.head);\n }\n toJSON() {\n return { type: \"text\", anchor: this.anchor, head: this.head };\n }\n /**\n @internal\n */\n static fromJSON(doc, json) {\n if (typeof json.anchor != \"number\" || typeof json.head != \"number\")\n throw new RangeError(\"Invalid input for TextSelection.fromJSON\");\n return new TextSelection(doc.resolve(json.anchor), doc.resolve(json.head));\n }\n /**\n Create a text selection from non-resolved positions.\n */\n static create(doc, anchor, head = anchor) {\n let $anchor = doc.resolve(anchor);\n return new this($anchor, head == anchor ? $anchor : doc.resolve(head));\n }\n /**\n Return a text selection that spans the given positions or, if\n they aren't text positions, find a text selection near them.\n `bias` determines whether the method searches forward (default)\n or backwards (negative number) first. Will fall back to calling\n [`Selection.near`](https://prosemirror.net/docs/ref/#state.Selection^near) when the document\n doesn't contain a valid text position.\n */\n static between($anchor, $head, bias) {\n let dPos = $anchor.pos - $head.pos;\n if (!bias || dPos)\n bias = dPos >= 0 ? 1 : -1;\n if (!$head.parent.inlineContent) {\n let found = Selection.findFrom($head, bias, true) || Selection.findFrom($head, -bias, true);\n if (found)\n $head = found.$head;\n else\n return Selection.near($head, bias);\n }\n if (!$anchor.parent.inlineContent) {\n if (dPos == 0) {\n $anchor = $head;\n }\n else {\n $anchor = (Selection.findFrom($anchor, -bias, true) || Selection.findFrom($anchor, bias, true)).$anchor;\n if (($anchor.pos < $head.pos) != (dPos < 0))\n $anchor = $head;\n }\n }\n return new TextSelection($anchor, $head);\n }\n}\nSelection.jsonID(\"text\", TextSelection);\nclass TextBookmark {\n constructor(anchor, head) {\n this.anchor = anchor;\n this.head = head;\n }\n map(mapping) {\n return new TextBookmark(mapping.map(this.anchor), mapping.map(this.head));\n }\n resolve(doc) {\n return TextSelection.between(doc.resolve(this.anchor), doc.resolve(this.head));\n }\n}\n/**\nA node selection is a selection that points at a single node. All\nnodes marked [selectable](https://prosemirror.net/docs/ref/#model.NodeSpec.selectable) can be the\ntarget of a node selection. In such a selection, `from` and `to`\npoint directly before and after the selected node, `anchor` equals\n`from`, and `head` equals `to`..\n*/\nclass NodeSelection extends Selection {\n /**\n Create a node selection. Does not verify the validity of its\n argument.\n */\n constructor($pos) {\n let node = $pos.nodeAfter;\n let $end = $pos.node(0).resolve($pos.pos + node.nodeSize);\n super($pos, $end);\n this.node = node;\n }\n map(doc, mapping) {\n let { deleted, pos } = mapping.mapResult(this.anchor);\n let $pos = doc.resolve(pos);\n if (deleted)\n return Selection.near($pos);\n return new NodeSelection($pos);\n }\n content() {\n return new Slice(Fragment.from(this.node), 0, 0);\n }\n eq(other) {\n return other instanceof NodeSelection && other.anchor == this.anchor;\n }\n toJSON() {\n return { type: \"node\", anchor: this.anchor };\n }\n getBookmark() { return new NodeBookmark(this.anchor); }\n /**\n @internal\n */\n static fromJSON(doc, json) {\n if (typeof json.anchor != \"number\")\n throw new RangeError(\"Invalid input for NodeSelection.fromJSON\");\n return new NodeSelection(doc.resolve(json.anchor));\n }\n /**\n Create a node selection from non-resolved positions.\n */\n static create(doc, from) {\n return new NodeSelection(doc.resolve(from));\n }\n /**\n Determines whether the given node may be selected as a node\n selection.\n */\n static isSelectable(node) {\n return !node.isText && node.type.spec.selectable !== false;\n }\n}\nNodeSelection.prototype.visible = false;\nSelection.jsonID(\"node\", NodeSelection);\nclass NodeBookmark {\n constructor(anchor) {\n this.anchor = anchor;\n }\n map(mapping) {\n let { deleted, pos } = mapping.mapResult(this.anchor);\n return deleted ? new TextBookmark(pos, pos) : new NodeBookmark(pos);\n }\n resolve(doc) {\n let $pos = doc.resolve(this.anchor), node = $pos.nodeAfter;\n if (node && NodeSelection.isSelectable(node))\n return new NodeSelection($pos);\n return Selection.near($pos);\n }\n}\n/**\nA selection type that represents selecting the whole document\n(which can not necessarily be expressed with a text selection, when\nthere are for example leaf block nodes at the start or end of the\ndocument).\n*/\nclass AllSelection extends Selection {\n /**\n Create an all-selection over the given document.\n */\n constructor(doc) {\n super(doc.resolve(0), doc.resolve(doc.content.size));\n }\n replace(tr, content = Slice.empty) {\n if (content == Slice.empty) {\n tr.delete(0, tr.doc.content.size);\n let sel = Selection.atStart(tr.doc);\n if (!sel.eq(tr.selection))\n tr.setSelection(sel);\n }\n else {\n super.replace(tr, content);\n }\n }\n toJSON() { return { type: \"all\" }; }\n /**\n @internal\n */\n static fromJSON(doc) { return new AllSelection(doc); }\n map(doc) { return new AllSelection(doc); }\n eq(other) { return other instanceof AllSelection; }\n getBookmark() { return AllBookmark; }\n}\nSelection.jsonID(\"all\", AllSelection);\nconst AllBookmark = {\n map() { return this; },\n resolve(doc) { return new AllSelection(doc); }\n};\n// FIXME we'll need some awareness of text direction when scanning for selections\n// Try to find a selection inside the given node. `pos` points at the\n// position where the search starts. When `text` is true, only return\n// text selections.\nfunction findSelectionIn(doc, node, pos, index, dir, text = false) {\n if (node.inlineContent)\n return TextSelection.create(doc, pos);\n for (let i = index - (dir > 0 ? 0 : 1); dir > 0 ? i < node.childCount : i >= 0; i += dir) {\n let child = node.child(i);\n if (!child.isAtom) {\n let inner = findSelectionIn(doc, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text);\n if (inner)\n return inner;\n }\n else if (!text && NodeSelection.isSelectable(child)) {\n return NodeSelection.create(doc, pos - (dir < 0 ? child.nodeSize : 0));\n }\n pos += child.nodeSize * dir;\n }\n return null;\n}\nfunction selectionToInsertionEnd(tr, startLen, bias) {\n let last = tr.steps.length - 1;\n if (last < startLen)\n return;\n let step = tr.steps[last];\n if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep))\n return;\n let map = tr.mapping.maps[last], end;\n map.forEach((_from, _to, _newFrom, newTo) => { if (end == null)\n end = newTo; });\n tr.setSelection(Selection.near(tr.doc.resolve(end), bias));\n}\n\nconst UPDATED_SEL = 1, UPDATED_MARKS = 2, UPDATED_SCROLL = 4;\n/**\nAn editor state transaction, which can be applied to a state to\ncreate an updated state. Use\n[`EditorState.tr`](https://prosemirror.net/docs/ref/#state.EditorState.tr) to create an instance.\n\nTransactions track changes to the document (they are a subclass of\n[`Transform`](https://prosemirror.net/docs/ref/#transform.Transform)), but also other state changes,\nlike selection updates and adjustments of the set of [stored\nmarks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks). In addition, you can store\nmetadata properties in a transaction, which are extra pieces of\ninformation that client code or plugins can use to describe what a\ntransaction represents, so that they can update their [own\nstate](https://prosemirror.net/docs/ref/#state.StateField) accordingly.\n\nThe [editor view](https://prosemirror.net/docs/ref/#view.EditorView) uses a few metadata\nproperties: it will attach a property `\"pointer\"` with the value\n`true` to selection transactions directly caused by mouse or touch\ninput, a `\"composition\"` property holding an ID identifying the\ncomposition that caused it to transactions caused by composed DOM\ninput, and a `\"uiEvent\"` property of that may be `\"paste\"`,\n`\"cut\"`, or `\"drop\"`.\n*/\nclass Transaction extends Transform {\n /**\n @internal\n */\n constructor(state) {\n super(state.doc);\n // The step count for which the current selection is valid.\n this.curSelectionFor = 0;\n // Bitfield to track which aspects of the state were updated by\n // this transaction.\n this.updated = 0;\n // Object used to store metadata properties for the transaction.\n this.meta = Object.create(null);\n this.time = Date.now();\n this.curSelection = state.selection;\n this.storedMarks = state.storedMarks;\n }\n /**\n The transaction's current selection. This defaults to the editor\n selection [mapped](https://prosemirror.net/docs/ref/#state.Selection.map) through the steps in the\n transaction, but can be overwritten with\n [`setSelection`](https://prosemirror.net/docs/ref/#state.Transaction.setSelection).\n */\n get selection() {\n if (this.curSelectionFor < this.steps.length) {\n this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor));\n this.curSelectionFor = this.steps.length;\n }\n return this.curSelection;\n }\n /**\n Update the transaction's current selection. Will determine the\n selection that the editor gets when the transaction is applied.\n */\n setSelection(selection) {\n if (selection.$from.doc != this.doc)\n throw new RangeError(\"Selection passed to setSelection must point at the current document\");\n this.curSelection = selection;\n this.curSelectionFor = this.steps.length;\n this.updated = (this.updated | UPDATED_SEL) & ~UPDATED_MARKS;\n this.storedMarks = null;\n return this;\n }\n /**\n Whether the selection was explicitly updated by this transaction.\n */\n get selectionSet() {\n return (this.updated & UPDATED_SEL) > 0;\n }\n /**\n Set the current stored marks.\n */\n setStoredMarks(marks) {\n this.storedMarks = marks;\n this.updated |= UPDATED_MARKS;\n return this;\n }\n /**\n Make sure the current stored marks or, if that is null, the marks\n at the selection, match the given set of marks. Does nothing if\n this is already the case.\n */\n ensureMarks(marks) {\n if (!Mark.sameSet(this.storedMarks || this.selection.$from.marks(), marks))\n this.setStoredMarks(marks);\n return this;\n }\n /**\n Add a mark to the set of stored marks.\n */\n addStoredMark(mark) {\n return this.ensureMarks(mark.addToSet(this.storedMarks || this.selection.$head.marks()));\n }\n /**\n Remove a mark or mark type from the set of stored marks.\n */\n removeStoredMark(mark) {\n return this.ensureMarks(mark.removeFromSet(this.storedMarks || this.selection.$head.marks()));\n }\n /**\n Whether the stored marks were explicitly set for this transaction.\n */\n get storedMarksSet() {\n return (this.updated & UPDATED_MARKS) > 0;\n }\n /**\n @internal\n */\n addStep(step, doc) {\n super.addStep(step, doc);\n this.updated = this.updated & ~UPDATED_MARKS;\n this.storedMarks = null;\n }\n /**\n Update the timestamp for the transaction.\n */\n setTime(time) {\n this.time = time;\n return this;\n }\n /**\n Replace the current selection with the given slice.\n */\n replaceSelection(slice) {\n this.selection.replace(this, slice);\n return this;\n }\n /**\n Replace the selection with the given node. When `inheritMarks` is\n true and the content is inline, it inherits the marks from the\n place where it is inserted.\n */\n replaceSelectionWith(node, inheritMarks = true) {\n let selection = this.selection;\n if (inheritMarks)\n node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : (selection.$from.marksAcross(selection.$to) || Mark.none)));\n selection.replaceWith(this, node);\n return this;\n }\n /**\n Delete the selection.\n */\n deleteSelection() {\n this.selection.replace(this);\n return this;\n }\n /**\n Replace the given range, or the selection if no range is given,\n with a text node containing the given string.\n */\n insertText(text, from, to) {\n let schema = this.doc.type.schema;\n if (from == null) {\n if (!text)\n return this.deleteSelection();\n return this.replaceSelectionWith(schema.text(text), true);\n }\n else {\n if (to == null)\n to = from;\n if (!text)\n return this.deleteRange(from, to);\n let marks = this.storedMarks;\n if (!marks) {\n let $from = this.doc.resolve(from);\n marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to));\n }\n this.replaceRangeWith(from, to, schema.text(text, marks));\n if (!this.selection.empty && this.selection.to == from + text.length)\n this.setSelection(Selection.near(this.selection.$to));\n return this;\n }\n }\n /**\n Store a metadata property in this transaction, keyed either by\n name or by plugin.\n */\n setMeta(key, value) {\n this.meta[typeof key == \"string\" ? key : key.key] = value;\n return this;\n }\n /**\n Retrieve a metadata property for a given name or plugin.\n */\n getMeta(key) {\n return this.meta[typeof key == \"string\" ? key : key.key];\n }\n /**\n Returns true if this transaction doesn't contain any metadata,\n and can thus safely be extended.\n */\n get isGeneric() {\n for (let _ in this.meta)\n return false;\n return true;\n }\n /**\n Indicate that the editor should scroll the selection into view\n when updated to the state produced by this transaction.\n */\n scrollIntoView() {\n this.updated |= UPDATED_SCROLL;\n return this;\n }\n /**\n True when this transaction has had `scrollIntoView` called on it.\n */\n get scrolledIntoView() {\n return (this.updated & UPDATED_SCROLL) > 0;\n }\n}\n\nfunction bind(f, self) {\n return !self || !f ? f : f.bind(self);\n}\nclass FieldDesc {\n constructor(name, desc, self) {\n this.name = name;\n this.init = bind(desc.init, self);\n this.apply = bind(desc.apply, self);\n }\n}\nconst baseFields = [\n new FieldDesc(\"doc\", {\n init(config) { return config.doc || config.schema.topNodeType.createAndFill(); },\n apply(tr) { return tr.doc; }\n }),\n new FieldDesc(\"selection\", {\n init(config, instance) { return config.selection || Selection.atStart(instance.doc); },\n apply(tr) { return tr.selection; }\n }),\n new FieldDesc(\"storedMarks\", {\n init(config) { return config.storedMarks || null; },\n apply(tr, _marks, _old, state) { return state.selection.$cursor ? tr.storedMarks : null; }\n }),\n new FieldDesc(\"scrollToSelection\", {\n init() { return 0; },\n apply(tr, prev) { return tr.scrolledIntoView ? prev + 1 : prev; }\n })\n];\n// Object wrapping the part of a state object that stays the same\n// across transactions. Stored in the state's `config` property.\nclass Configuration {\n constructor(schema, plugins) {\n this.schema = schema;\n this.plugins = [];\n this.pluginsByKey = Object.create(null);\n this.fields = baseFields.slice();\n if (plugins)\n plugins.forEach(plugin => {\n if (this.pluginsByKey[plugin.key])\n throw new RangeError(\"Adding different instances of a keyed plugin (\" + plugin.key + \")\");\n this.plugins.push(plugin);\n this.pluginsByKey[plugin.key] = plugin;\n if (plugin.spec.state)\n this.fields.push(new FieldDesc(plugin.key, plugin.spec.state, plugin));\n });\n }\n}\n/**\nThe state of a ProseMirror editor is represented by an object of\nthis type. A state is a persistent data structure—it isn't\nupdated, but rather a new state value is computed from an old one\nusing the [`apply`](https://prosemirror.net/docs/ref/#state.EditorState.apply) method.\n\nA state holds a number of built-in fields, and plugins can\n[define](https://prosemirror.net/docs/ref/#state.PluginSpec.state) additional fields.\n*/\nclass EditorState {\n /**\n @internal\n */\n constructor(\n /**\n @internal\n */\n config) {\n this.config = config;\n }\n /**\n The schema of the state's document.\n */\n get schema() {\n return this.config.schema;\n }\n /**\n The plugins that are active in this state.\n */\n get plugins() {\n return this.config.plugins;\n }\n /**\n Apply the given transaction to produce a new state.\n */\n apply(tr) {\n return this.applyTransaction(tr).state;\n }\n /**\n @internal\n */\n filterTransaction(tr, ignore = -1) {\n for (let i = 0; i < this.config.plugins.length; i++)\n if (i != ignore) {\n let plugin = this.config.plugins[i];\n if (plugin.spec.filterTransaction && !plugin.spec.filterTransaction.call(plugin, tr, this))\n return false;\n }\n return true;\n }\n /**\n Verbose variant of [`apply`](https://prosemirror.net/docs/ref/#state.EditorState.apply) that\n returns the precise transactions that were applied (which might\n be influenced by the [transaction\n hooks](https://prosemirror.net/docs/ref/#state.PluginSpec.filterTransaction) of\n plugins) along with the new state.\n */\n applyTransaction(rootTr) {\n if (!this.filterTransaction(rootTr))\n return { state: this, transactions: [] };\n let trs = [rootTr], newState = this.applyInner(rootTr), seen = null;\n // This loop repeatedly gives plugins a chance to respond to\n // transactions as new transactions are added, making sure to only\n // pass the transactions the plugin did not see before.\n for (;;) {\n let haveNew = false;\n for (let i = 0; i < this.config.plugins.length; i++) {\n let plugin = this.config.plugins[i];\n if (plugin.spec.appendTransaction) {\n let n = seen ? seen[i].n : 0, oldState = seen ? seen[i].state : this;\n let tr = n < trs.length &&\n plugin.spec.appendTransaction.call(plugin, n ? trs.slice(n) : trs, oldState, newState);\n if (tr && newState.filterTransaction(tr, i)) {\n tr.setMeta(\"appendedTransaction\", rootTr);\n if (!seen) {\n seen = [];\n for (let j = 0; j < this.config.plugins.length; j++)\n seen.push(j < i ? { state: newState, n: trs.length } : { state: this, n: 0 });\n }\n trs.push(tr);\n newState = newState.applyInner(tr);\n haveNew = true;\n }\n if (seen)\n seen[i] = { state: newState, n: trs.length };\n }\n }\n if (!haveNew)\n return { state: newState, transactions: trs };\n }\n }\n /**\n @internal\n */\n applyInner(tr) {\n if (!tr.before.eq(this.doc))\n throw new RangeError(\"Applying a mismatched transaction\");\n let newInstance = new EditorState(this.config), fields = this.config.fields;\n for (let i = 0; i < fields.length; i++) {\n let field = fields[i];\n newInstance[field.name] = field.apply(tr, this[field.name], this, newInstance);\n }\n return newInstance;\n }\n /**\n Accessor that constructs and returns a new [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.\n */\n get tr() { return new Transaction(this); }\n /**\n Create a new state.\n */\n static create(config) {\n let $config = new Configuration(config.doc ? config.doc.type.schema : config.schema, config.plugins);\n let instance = new EditorState($config);\n for (let i = 0; i < $config.fields.length; i++)\n instance[$config.fields[i].name] = $config.fields[i].init(config, instance);\n return instance;\n }\n /**\n Create a new state based on this one, but with an adjusted set\n of active plugins. State fields that exist in both sets of\n plugins are kept unchanged. Those that no longer exist are\n dropped, and those that are new are initialized using their\n [`init`](https://prosemirror.net/docs/ref/#state.StateField.init) method, passing in the new\n configuration object..\n */\n reconfigure(config) {\n let $config = new Configuration(this.schema, config.plugins);\n let fields = $config.fields, instance = new EditorState($config);\n for (let i = 0; i < fields.length; i++) {\n let name = fields[i].name;\n instance[name] = this.hasOwnProperty(name) ? this[name] : fields[i].init(config, instance);\n }\n return instance;\n }\n /**\n Serialize this state to JSON. If you want to serialize the state\n of plugins, pass an object mapping property names to use in the\n resulting JSON object to plugin objects. The argument may also be\n a string or number, in which case it is ignored, to support the\n way `JSON.stringify` calls `toString` methods.\n */\n toJSON(pluginFields) {\n let result = { doc: this.doc.toJSON(), selection: this.selection.toJSON() };\n if (this.storedMarks)\n result.storedMarks = this.storedMarks.map(m => m.toJSON());\n if (pluginFields && typeof pluginFields == 'object')\n for (let prop in pluginFields) {\n if (prop == \"doc\" || prop == \"selection\")\n throw new RangeError(\"The JSON fields `doc` and `selection` are reserved\");\n let plugin = pluginFields[prop], state = plugin.spec.state;\n if (state && state.toJSON)\n result[prop] = state.toJSON.call(plugin, this[plugin.key]);\n }\n return result;\n }\n /**\n Deserialize a JSON representation of a state. `config` should\n have at least a `schema` field, and should contain array of\n plugins to initialize the state with. `pluginFields` can be used\n to deserialize the state of plugins, by associating plugin\n instances with the property names they use in the JSON object.\n */\n static fromJSON(config, json, pluginFields) {\n if (!json)\n throw new RangeError(\"Invalid input for EditorState.fromJSON\");\n if (!config.schema)\n throw new RangeError(\"Required config field 'schema' missing\");\n let $config = new Configuration(config.schema, config.plugins);\n let instance = new EditorState($config);\n $config.fields.forEach(field => {\n if (field.name == \"doc\") {\n instance.doc = Node.fromJSON(config.schema, json.doc);\n }\n else if (field.name == \"selection\") {\n instance.selection = Selection.fromJSON(instance.doc, json.selection);\n }\n else if (field.name == \"storedMarks\") {\n if (json.storedMarks)\n instance.storedMarks = json.storedMarks.map(config.schema.markFromJSON);\n }\n else {\n if (pluginFields)\n for (let prop in pluginFields) {\n let plugin = pluginFields[prop], state = plugin.spec.state;\n if (plugin.key == field.name && state && state.fromJSON &&\n Object.prototype.hasOwnProperty.call(json, prop)) {\n instance[field.name] = state.fromJSON.call(plugin, config, json[prop], instance);\n return;\n }\n }\n instance[field.name] = field.init(config, instance);\n }\n });\n return instance;\n }\n}\n\nfunction bindProps(obj, self, target) {\n for (let prop in obj) {\n let val = obj[prop];\n if (val instanceof Function)\n val = val.bind(self);\n else if (prop == \"handleDOMEvents\")\n val = bindProps(val, self, {});\n target[prop] = val;\n }\n return target;\n}\n/**\nPlugins bundle functionality that can be added to an editor.\nThey are part of the [editor state](https://prosemirror.net/docs/ref/#state.EditorState) and\nmay influence that state and the view that contains it.\n*/\nclass Plugin {\n /**\n Create a plugin.\n */\n constructor(\n /**\n The plugin's [spec object](https://prosemirror.net/docs/ref/#state.PluginSpec).\n */\n spec) {\n this.spec = spec;\n /**\n The [props](https://prosemirror.net/docs/ref/#view.EditorProps) exported by this plugin.\n */\n this.props = {};\n if (spec.props)\n bindProps(spec.props, this, this.props);\n this.key = spec.key ? spec.key.key : createKey(\"plugin\");\n }\n /**\n Extract the plugin's state field from an editor state.\n */\n getState(state) { return state[this.key]; }\n}\nconst keys = Object.create(null);\nfunction createKey(name) {\n if (name in keys)\n return name + \"$\" + ++keys[name];\n keys[name] = 0;\n return name + \"$\";\n}\n/**\nA key is used to [tag](https://prosemirror.net/docs/ref/#state.PluginSpec.key) plugins in a way\nthat makes it possible to find them, given an editor state.\nAssigning a key does mean only one plugin of that type can be\nactive in a state.\n*/\nclass PluginKey {\n /**\n Create a plugin key.\n */\n constructor(name = \"key\") { this.key = createKey(name); }\n /**\n Get the active plugin with this key, if any, from an editor\n state.\n */\n get(state) { return state.config.pluginsByKey[this.key]; }\n /**\n Get the plugin's state from an editor state.\n */\n getState(state) { return state[this.key]; }\n}\n\nexport { AllSelection, EditorState, NodeSelection, Plugin, PluginKey, Selection, SelectionRange, TextSelection, Transaction };\n","import type { Editor } from '@tiptap/core'\nimport type { NodeType } from '@tiptap/pm/model'\nimport { TextSelection } from '@tiptap/pm/state'\n\n/**\n * Restructure the blockquote boundary at the caret.\n *\n * Two cases are handled in a single backspace:\n *\n * 1. Caret at the start of a non-first child of a blockquote — lift the\n * current child out, splitting the blockquote around it.\n * 2. Caret at the start of a top-level textblock whose previous sibling is\n * a blockquote with a textblock last child — merge the current\n * textblock's inline content into the blockquote's last textblock\n * instead of letting joinBackward pull the paragraph back inside.\n *\n * Returns true when the backspace was consumed.\n */\nexport const handleBackspace = (editor: Editor, type: NodeType): boolean => {\n const { state, view } = editor\n const { selection } = state\n if (!selection.empty) return false\n\n const { $from } = selection\n if ($from.parentOffset !== 0) return false\n\n const parentDepth = $from.depth - 1\n const parent = $from.node(parentDepth)\n const index = $from.index(parentDepth)\n if (index === 0) return false\n\n // Non-first child of a blockquote: lift to split the blockquote around it.\n if (parent.type === type) {\n return editor.commands.lift(type.name)\n }\n\n // Previous sibling is a blockquote whose last child is a textblock:\n // merge the inline content in instead of letting joinBackward pull the\n // paragraph back inside the blockquote.\n const previous = parent.child(index - 1)\n if (previous.type !== type || !previous.lastChild?.isTextblock) {\n return false\n }\n\n const blockStart = $from.before()\n // `blockStart` sits in the shared parent at the position right after\n // the previous blockquote. In ProseMirror coordinates, each closing\n // token costs one position: step one back to land inside the blockquote\n // right after its last child, then one more to land inside that last\n // child at the end of its inline content.\n const insideBlockquoteEnd = blockStart - 1\n const targetPos = insideBlockquoteEnd - 1\n const { tr } = state\n tr.delete(blockStart, $from.after()).insert(targetPos, $from.parent.content)\n tr.setSelection(TextSelection.create(tr.doc, targetPos))\n view.dispatch(tr.scrollIntoView())\n return true\n}\n","import { Blockquote } from './blockquote.jsx'\n\nexport * from './blockquote.jsx'\n\nexport default Blockquote\n"],"mappings":";AACA,SAAS,iBAAiB,QAAAA,OAAM,yBAAyB;;;ACCzD,SAAS,cAAc,GAAG,GAAG,KAAK;AAC9B,WAAS,IAAI,KAAI,KAAK;AAClB,QAAI,KAAK,EAAE,cAAc,KAAK,EAAE;AAC5B,aAAO,EAAE,cAAc,EAAE,aAAa,OAAO;AACjD,QAAI,SAAS,EAAE,MAAM,CAAC,GAAG,SAAS,EAAE,MAAM,CAAC;AAC3C,QAAI,UAAU,QAAQ;AAClB,aAAO,OAAO;AACd;AAAA,IACJ;AACA,QAAI,CAAC,OAAO,WAAW,MAAM;AACzB,aAAO;AACX,QAAI,OAAO,UAAU,OAAO,QAAQ,OAAO,MAAM;AAC7C,eAAS,IAAI,GAAG,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC,GAAG;AAC9C;AACJ,aAAO;AAAA,IACX;AACA,QAAI,OAAO,QAAQ,QAAQ,OAAO,QAAQ,MAAM;AAC5C,UAAI,QAAQ,cAAc,OAAO,SAAS,OAAO,SAAS,MAAM,CAAC;AACjE,UAAI,SAAS;AACT,eAAO;AAAA,IACf;AACA,WAAO,OAAO;AAAA,EAClB;AACJ;AACA,SAAS,YAAY,GAAG,GAAG,MAAM,MAAM;AACnC,WAAS,KAAK,EAAE,YAAY,KAAK,EAAE,gBAAc;AAC7C,QAAI,MAAM,KAAK,MAAM;AACjB,aAAO,MAAM,KAAK,OAAO,EAAE,GAAG,MAAM,GAAG,KAAK;AAChD,QAAI,SAAS,EAAE,MAAM,EAAE,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,OAA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AAe,aAAE,gBAAF,2BAAgB,OAAO,WAAvB,YAAiC,EAAE,eAAe,CAAC,KAAK,CAAC;AAC9E,YAAM,QAAQ,aAAa,MAAM,IAAI;AAErC,YAAM,kBAAkB,MAAM,IAAI,UAAQ;AAExC,YAAI,KAAK,KAAK,MAAM,IAAI;AACtB,iBAAO;AAAA,QACT;AAIA,eAAO,GAAG,MAAM,IAAI,IAAI;AAAA,MAC1B,CAAC;AAED,aAAO,KAAK,gBAAgB,KAAK,IAAI,CAAC;AAAA,IACxC,CAAC;AAGD,WAAO,OAAO,KAAK;AAAA,EAAK,MAAM;AAAA,CAAI;AAAA,EACpC;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,eACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,OAAO,KAAK,IAAI;AAAA,MAClC;AAAA,MACF,kBACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,WAAW,KAAK,IAAI;AAAA,MACtC;AAAA,MACF,iBACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,KAAK,KAAK,IAAI;AAAA,MAChC;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,eAAe,MAAM,KAAK,OAAO,SAAS,iBAAiB;AAAA,MAC3D,WAAW,MAAM,gBAAgB,KAAK,QAAQ,KAAK,IAAI;AAAA,IACzD;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,MACL,kBAAkB;AAAA,QAChB,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;AK1ID,IAAO,gBAAQ;","names":["Node","found","found","i","type","nfa","edge","expr","node","states","parent","TransformError","found","Node"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/package.json deleted file mode 100644 index 9e4db7b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-blockquote", - "version": "3.26.0", - "description": "blockquote extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-blockquote" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/blockquote.tsx b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/blockquote.tsx deleted file mode 100644 index 272cc9d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/blockquote.tsx +++ /dev/null @@ -1,143 +0,0 @@ -/** @jsxImportSource @tiptap/core */ -import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core' - -import { handleBackspace } from './handleBackspace.js' - -export interface BlockquoteOptions { - /** - * HTML attributes to add to the blockquote element - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record -} - -declare module '@tiptap/core' { - interface Commands { - blockQuote: { - /** - * Set a blockquote node - */ - setBlockquote: () => ReturnType - /** - * Toggle a blockquote node - */ - toggleBlockquote: () => ReturnType - /** - * Unset a blockquote node - */ - unsetBlockquote: () => ReturnType - } - } -} - -/** - * Matches a blockquote to a `>` as input. - */ -export const inputRegex = /^\s*>\s$/ - -/** - * This extension allows you to create blockquotes. - * @see https://tiptap.dev/api/nodes/blockquote - */ -export const Blockquote = Node.create({ - name: 'blockquote', - - addOptions() { - return { - HTMLAttributes: {}, - } - }, - - content: 'block+', - - group: 'block', - - defining: true, - - parseHTML() { - return [{ tag: 'blockquote' }] - }, - - renderHTML({ HTMLAttributes }) { - return ( -
- -
- ) - }, - - parseMarkdown: (token, helpers) => { - const parseBlockChildren = helpers.parseBlockChildren ?? helpers.parseChildren - - return helpers.createNode('blockquote', undefined, parseBlockChildren(token.tokens || [])) - }, - - renderMarkdown: (node, h) => { - if (!node.content) { - return '' - } - - // Use a single '>' prefix regardless of nesting level - // Nested blockquotes will add their own '>' prefix recursively - const prefix = '>' - const result: string[] = [] - - node.content.forEach((child, index) => { - const childContent = h.renderChild?.(child, index) ?? h.renderChildren([child]) - const lines = childContent.split('\n') - - const linesWithPrefix = lines.map(line => { - // Don't add prefix to empty lines - if (line.trim() === '') { - return prefix - } - - // Nested blockquotes will already have their own prefixes - // We just need to add our own prefix at the start - return `${prefix} ${line}` - }) - - result.push(linesWithPrefix.join('\n')) - }) - - // Add separator lines between children - return result.join(`\n${prefix}\n`) - }, - - addCommands() { - return { - setBlockquote: - () => - ({ commands }) => { - return commands.wrapIn(this.name) - }, - toggleBlockquote: - () => - ({ commands }) => { - return commands.toggleWrap(this.name) - }, - unsetBlockquote: - () => - ({ commands }) => { - return commands.lift(this.name) - }, - } - }, - - addKeyboardShortcuts() { - return { - 'Mod-Shift-b': () => this.editor.commands.toggleBlockquote(), - Backspace: () => handleBackspace(this.editor, this.type), - } - }, - - addInputRules() { - return [ - wrappingInputRule({ - find: inputRegex, - type: this.type, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/handleBackspace.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/handleBackspace.ts deleted file mode 100644 index 2c25ed0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/handleBackspace.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { Editor } from '@tiptap/core' -import type { NodeType } from '@tiptap/pm/model' -import { TextSelection } from '@tiptap/pm/state' - -/** - * Restructure the blockquote boundary at the caret. - * - * Two cases are handled in a single backspace: - * - * 1. Caret at the start of a non-first child of a blockquote — lift the - * current child out, splitting the blockquote around it. - * 2. Caret at the start of a top-level textblock whose previous sibling is - * a blockquote with a textblock last child — merge the current - * textblock's inline content into the blockquote's last textblock - * instead of letting joinBackward pull the paragraph back inside. - * - * Returns true when the backspace was consumed. - */ -export const handleBackspace = (editor: Editor, type: NodeType): boolean => { - const { state, view } = editor - const { selection } = state - if (!selection.empty) return false - - const { $from } = selection - if ($from.parentOffset !== 0) return false - - const parentDepth = $from.depth - 1 - const parent = $from.node(parentDepth) - const index = $from.index(parentDepth) - if (index === 0) return false - - // Non-first child of a blockquote: lift to split the blockquote around it. - if (parent.type === type) { - return editor.commands.lift(type.name) - } - - // Previous sibling is a blockquote whose last child is a textblock: - // merge the inline content in instead of letting joinBackward pull the - // paragraph back inside the blockquote. - const previous = parent.child(index - 1) - if (previous.type !== type || !previous.lastChild?.isTextblock) { - return false - } - - const blockStart = $from.before() - // `blockStart` sits in the shared parent at the position right after - // the previous blockquote. In ProseMirror coordinates, each closing - // token costs one position: step one back to land inside the blockquote - // right after its last child, then one more to land inside that last - // child at the end of its inline content. - const insideBlockquoteEnd = blockStart - 1 - const targetPos = insideBlockquoteEnd - 1 - const { tr } = state - tr.delete(blockStart, $from.after()).insert(targetPos, $from.parent.content) - tr.setSelection(TextSelection.create(tr.doc, targetPos)) - view.dispatch(tr.scrollIntoView()) - return true -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/index.ts deleted file mode 100644 index e47cb14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Blockquote } from './blockquote.jsx' - -export * from './blockquote.jsx' - -export default Blockquote diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/README.md deleted file mode 100644 index 3d1729c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-bold - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-bold.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-bold) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-bold.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-bold.svg)](https://www.npmjs.com/package/@tiptap/extension-bold) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.cjs deleted file mode 100644 index 620c974..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.cjs +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Bold: () => Bold, - default: () => index_default, - starInputRegex: () => starInputRegex, - starPasteRegex: () => starPasteRegex, - underscoreInputRegex: () => underscoreInputRegex, - underscorePasteRegex: () => underscorePasteRegex -}); -module.exports = __toCommonJS(index_exports); - -// src/bold.tsx -var import_core = require("@tiptap/core"); -var import_jsx_runtime = require("@tiptap/core/jsx-runtime"); -var starInputRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/; -var starPasteRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g; -var underscoreInputRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/; -var underscorePasteRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g; -var Bold = import_core.Mark.create({ - name: "bold", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - parseHTML() { - return [ - { - tag: "strong" - }, - { - tag: "b", - getAttrs: (node) => node.style.fontWeight !== "normal" && null - }, - { - style: "font-weight=400", - clearMark: (mark) => mark.type.name === this.name - }, - { - style: "font-weight", - getAttrs: (value) => /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { ...(0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("slot", {}) }); - }, - markdownTokenName: "strong", - parseMarkdown: (token, helpers) => { - return helpers.applyMark("bold", helpers.parseInline(token.tokens || [])); - }, - markdownOptions: { - htmlReopen: { - open: "", - close: "" - } - }, - renderMarkdown: (node, h) => { - return `**${h.renderChildren(node)}**`; - }, - addCommands() { - return { - setBold: () => ({ commands }) => { - return commands.setMark(this.name); - }, - toggleBold: () => ({ commands }) => { - return commands.toggleMark(this.name); - }, - unsetBold: () => ({ commands }) => { - return commands.unsetMark(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-b": () => this.editor.commands.toggleBold(), - "Mod-B": () => this.editor.commands.toggleBold() - }; - }, - addInputRules() { - return [ - (0, import_core.markInputRule)({ - find: starInputRegex, - type: this.type - }), - (0, import_core.markInputRule)({ - find: underscoreInputRegex, - type: this.type - }) - ]; - }, - addPasteRules() { - return [ - (0, import_core.markPasteRule)({ - find: starPasteRegex, - type: this.type - }), - (0, import_core.markPasteRule)({ - find: underscorePasteRegex, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = Bold; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Bold, - starInputRegex, - starPasteRegex, - underscoreInputRegex, - underscorePasteRegex -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.cjs.map deleted file mode 100644 index 39eb2f6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/bold.tsx"],"sourcesContent":["import { Bold } from './bold.jsx'\n\nexport * from './bold.jsx'\n\nexport default Bold\n","/** @jsxImportSource @tiptap/core */\nimport { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core'\n\nexport interface BoldOptions {\n /**\n * HTML attributes to add to the bold element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bold: {\n /**\n * Set a bold mark\n */\n setBold: () => ReturnType\n /**\n * Toggle a bold mark\n */\n toggleBold: () => ReturnType\n /**\n * Unset a bold mark\n */\n unsetBold: () => ReturnType\n }\n }\n}\n\n/**\n * Matches bold text via `**` as input.\n */\nexport const starInputRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))$/\n\n/**\n * Matches bold text via `**` while pasting.\n */\nexport const starPasteRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))/g\n\n/**\n * Matches bold text via `__` as input.\n */\nexport const underscoreInputRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))$/\n\n/**\n * Matches bold text via `__` while pasting.\n */\nexport const underscorePasteRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))/g\n\n/**\n * This extension allows you to mark text as bold.\n * @see https://tiptap.dev/api/marks/bold\n */\nexport const Bold = Mark.create({\n name: 'bold',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'strong',\n },\n {\n tag: 'b',\n getAttrs: node => (node as HTMLElement).style.fontWeight !== 'normal' && null,\n },\n {\n style: 'font-weight=400',\n clearMark: mark => mark.type.name === this.name,\n },\n {\n style: 'font-weight',\n getAttrs: value => /^(bold(er)?|[5-9]\\d{2,})$/.test(value as string) && null,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return (\n \n \n \n )\n },\n\n markdownTokenName: 'strong',\n\n parseMarkdown: (token, helpers) => {\n // Convert 'strong' token to bold mark\n return helpers.applyMark('bold', helpers.parseInline(token.tokens || []))\n },\n\n markdownOptions: {\n htmlReopen: {\n open: '',\n close: '',\n },\n },\n\n renderMarkdown: (node, h) => {\n return `**${h.renderChildren(node)}**`\n },\n\n addCommands() {\n return {\n setBold:\n () =>\n ({ commands }) => {\n return commands.setMark(this.name)\n },\n toggleBold:\n () =>\n ({ commands }) => {\n return commands.toggleMark(this.name)\n },\n unsetBold:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-b': () => this.editor.commands.toggleBold(),\n 'Mod-B': () => this.editor.commands.toggleBold(),\n }\n },\n\n addInputRules() {\n return [\n markInputRule({\n find: starInputRegex,\n type: this.type,\n }),\n markInputRule({\n find: underscoreInputRegex,\n type: this.type,\n }),\n ]\n },\n\n addPasteRules() {\n return [\n markPasteRule({\n find: starPasteRegex,\n type: this.type,\n }),\n markPasteRule({\n find: underscorePasteRegex,\n type: this.type,\n }),\n ]\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,kBAAoE;AAsF5D;AArDD,IAAM,iBAAiB;AAKvB,IAAM,iBAAiB;AAKvB,IAAM,uBAAuB;AAK7B,IAAM,uBAAuB;AAM7B,IAAM,OAAO,iBAAK,OAAoB;AAAA,EAC3C,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,YAAY;AACV,WAAO;AAAA,MACL;AAAA,QACE,KAAK;AAAA,MACP;AAAA,MACA;AAAA,QACE,KAAK;AAA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BAAgB;AACd,WAAO;AAAA,UACL,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,UACD,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,UACL,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,UACD,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;AD9JD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.d.cts deleted file mode 100644 index f347494..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.d.cts +++ /dev/null @@ -1,53 +0,0 @@ -import { Mark } from '@tiptap/core'; - -/** @jsxImportSource @tiptap/core */ - -interface BoldOptions { - /** - * HTML attributes to add to the bold element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - bold: { - /** - * Set a bold mark - */ - setBold: () => ReturnType; - /** - * Toggle a bold mark - */ - toggleBold: () => ReturnType; - /** - * Unset a bold mark - */ - unsetBold: () => ReturnType; - }; - } -} -/** - * Matches bold text via `**` as input. - */ -declare const starInputRegex: RegExp; -/** - * Matches bold text via `**` while pasting. - */ -declare const starPasteRegex: RegExp; -/** - * Matches bold text via `__` as input. - */ -declare const underscoreInputRegex: RegExp; -/** - * Matches bold text via `__` while pasting. - */ -declare const underscorePasteRegex: RegExp; -/** - * This extension allows you to mark text as bold. - * @see https://tiptap.dev/api/marks/bold - */ -declare const Bold: Mark; - -export { Bold, type BoldOptions, Bold as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.d.ts deleted file mode 100644 index f347494..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Mark } from '@tiptap/core'; - -/** @jsxImportSource @tiptap/core */ - -interface BoldOptions { - /** - * HTML attributes to add to the bold element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - bold: { - /** - * Set a bold mark - */ - setBold: () => ReturnType; - /** - * Toggle a bold mark - */ - toggleBold: () => ReturnType; - /** - * Unset a bold mark - */ - unsetBold: () => ReturnType; - }; - } -} -/** - * Matches bold text via `**` as input. - */ -declare const starInputRegex: RegExp; -/** - * Matches bold text via `**` while pasting. - */ -declare const starPasteRegex: RegExp; -/** - * Matches bold text via `__` as input. - */ -declare const underscoreInputRegex: RegExp; -/** - * Matches bold text via `__` while pasting. - */ -declare const underscorePasteRegex: RegExp; -/** - * This extension allows you to mark text as bold. - * @see https://tiptap.dev/api/marks/bold - */ -declare const Bold: Mark; - -export { Bold, type BoldOptions, Bold as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.js deleted file mode 100644 index 52a1e2c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.js +++ /dev/null @@ -1,105 +0,0 @@ -// src/bold.tsx -import { Mark, markInputRule, markPasteRule, mergeAttributes } from "@tiptap/core"; -import { jsx } from "@tiptap/core/jsx-runtime"; -var starInputRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/; -var starPasteRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g; -var underscoreInputRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/; -var underscorePasteRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g; -var Bold = Mark.create({ - name: "bold", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - parseHTML() { - return [ - { - tag: "strong" - }, - { - tag: "b", - getAttrs: (node) => node.style.fontWeight !== "normal" && null - }, - { - style: "font-weight=400", - clearMark: (mark) => mark.type.name === this.name - }, - { - style: "font-weight", - getAttrs: (value) => /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return /* @__PURE__ */ jsx("strong", { ...mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ jsx("slot", {}) }); - }, - markdownTokenName: "strong", - parseMarkdown: (token, helpers) => { - return helpers.applyMark("bold", helpers.parseInline(token.tokens || [])); - }, - markdownOptions: { - htmlReopen: { - open: "", - close: "" - } - }, - renderMarkdown: (node, h) => { - return `**${h.renderChildren(node)}**`; - }, - addCommands() { - return { - setBold: () => ({ commands }) => { - return commands.setMark(this.name); - }, - toggleBold: () => ({ commands }) => { - return commands.toggleMark(this.name); - }, - unsetBold: () => ({ commands }) => { - return commands.unsetMark(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-b": () => this.editor.commands.toggleBold(), - "Mod-B": () => this.editor.commands.toggleBold() - }; - }, - addInputRules() { - return [ - markInputRule({ - find: starInputRegex, - type: this.type - }), - markInputRule({ - find: underscoreInputRegex, - type: this.type - }) - ]; - }, - addPasteRules() { - return [ - markPasteRule({ - find: starPasteRegex, - type: this.type - }), - markPasteRule({ - find: underscorePasteRegex, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = Bold; -export { - Bold, - index_default as default, - starInputRegex, - starPasteRegex, - underscoreInputRegex, - underscorePasteRegex -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.js.map deleted file mode 100644 index e8b3aad..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/bold.tsx","../src/index.ts"],"sourcesContent":["/** @jsxImportSource @tiptap/core */\nimport { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core'\n\nexport interface BoldOptions {\n /**\n * HTML attributes to add to the bold element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bold: {\n /**\n * Set a bold mark\n */\n setBold: () => ReturnType\n /**\n * Toggle a bold mark\n */\n toggleBold: () => ReturnType\n /**\n * Unset a bold mark\n */\n unsetBold: () => ReturnType\n }\n }\n}\n\n/**\n * Matches bold text via `**` as input.\n */\nexport const starInputRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))$/\n\n/**\n * Matches bold text via `**` while pasting.\n */\nexport const starPasteRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))/g\n\n/**\n * Matches bold text via `__` as input.\n */\nexport const underscoreInputRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))$/\n\n/**\n * Matches bold text via `__` while pasting.\n */\nexport const underscorePasteRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))/g\n\n/**\n * This extension allows you to mark text as bold.\n * @see https://tiptap.dev/api/marks/bold\n */\nexport const Bold = Mark.create({\n name: 'bold',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'strong',\n },\n {\n tag: 'b',\n getAttrs: node => (node as HTMLElement).style.fontWeight !== 'normal' && null,\n },\n {\n style: 'font-weight=400',\n clearMark: mark => mark.type.name === this.name,\n },\n {\n style: 'font-weight',\n getAttrs: value => /^(bold(er)?|[5-9]\\d{2,})$/.test(value as string) && null,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return (\n \n \n \n )\n },\n\n markdownTokenName: 'strong',\n\n parseMarkdown: (token, helpers) => {\n // Convert 'strong' token to bold mark\n return helpers.applyMark('bold', helpers.parseInline(token.tokens || []))\n },\n\n markdownOptions: {\n htmlReopen: {\n open: '',\n close: '',\n },\n },\n\n renderMarkdown: (node, h) => {\n return `**${h.renderChildren(node)}**`\n },\n\n addCommands() {\n return {\n setBold:\n () =>\n ({ commands }) => {\n return commands.setMark(this.name)\n },\n toggleBold:\n () =>\n ({ commands }) => {\n return commands.toggleMark(this.name)\n },\n unsetBold:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-b': () => this.editor.commands.toggleBold(),\n 'Mod-B': () => this.editor.commands.toggleBold(),\n }\n },\n\n addInputRules() {\n return [\n markInputRule({\n find: starInputRegex,\n type: this.type,\n }),\n markInputRule({\n find: underscoreInputRegex,\n type: this.type,\n }),\n ]\n },\n\n addPasteRules() {\n return [\n markPasteRule({\n find: starPasteRegex,\n type: this.type,\n }),\n markPasteRule({\n find: underscorePasteRegex,\n type: this.type,\n }),\n ]\n },\n})\n","import { Bold } from './bold.jsx'\n\nexport * from './bold.jsx'\n\nexport default Bold\n"],"mappings":";AACA,SAAS,MAAM,eAAe,eAAe,uBAAuB;AAsF5D;AArDD,IAAM,iBAAiB;AAKvB,IAAM,iBAAiB;AAKvB,IAAM,uBAAuB;AAK7B,IAAM,uBAAuB;AAM7B,IAAM,OAAO,KAAK,OAAoB;AAAA,EAC3C,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,YAAY;AACV,WAAO;AAAA,MACL;AAAA,QACE,KAAK;AAAA,MACP;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,UAAU,UAAS,KAAqB,MAAM,eAAe,YAAY;AAAA,MAC3E;AAAA,MACA;AAAA,QACE,OAAO;AAAA,QACP,WAAW,UAAQ,KAAK,KAAK,SAAS,KAAK;AAAA,MAC7C;AAAA,MACA;AAAA,QACE,OAAO;AAAA,QACP,UAAU,WAAS,4BAA4B,KAAK,KAAe,KAAK;AAAA,MAC1E;AAAA,IACF;AAAA,EACF;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WACE,oBAAC,YAAQ,GAAG,gBAAgB,KAA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,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;AC9JD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/package.json deleted file mode 100644 index 7207d95..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-bold", - "version": "3.26.0", - "description": "bold extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-bold" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/src/bold.tsx b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/src/bold.tsx deleted file mode 100644 index efcab46..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/src/bold.tsx +++ /dev/null @@ -1,163 +0,0 @@ -/** @jsxImportSource @tiptap/core */ -import { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core' - -export interface BoldOptions { - /** - * HTML attributes to add to the bold element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record -} - -declare module '@tiptap/core' { - interface Commands { - bold: { - /** - * Set a bold mark - */ - setBold: () => ReturnType - /** - * Toggle a bold mark - */ - toggleBold: () => ReturnType - /** - * Unset a bold mark - */ - unsetBold: () => ReturnType - } - } -} - -/** - * Matches bold text via `**` as input. - */ -export const starInputRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/ - -/** - * Matches bold text via `**` while pasting. - */ -export const starPasteRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g - -/** - * Matches bold text via `__` as input. - */ -export const underscoreInputRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/ - -/** - * Matches bold text via `__` while pasting. - */ -export const underscorePasteRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g - -/** - * This extension allows you to mark text as bold. - * @see https://tiptap.dev/api/marks/bold - */ -export const Bold = Mark.create({ - name: 'bold', - - addOptions() { - return { - HTMLAttributes: {}, - } - }, - - parseHTML() { - return [ - { - tag: 'strong', - }, - { - tag: 'b', - getAttrs: node => (node as HTMLElement).style.fontWeight !== 'normal' && null, - }, - { - style: 'font-weight=400', - clearMark: mark => mark.type.name === this.name, - }, - { - style: 'font-weight', - getAttrs: value => /^(bold(er)?|[5-9]\d{2,})$/.test(value as string) && null, - }, - ] - }, - - renderHTML({ HTMLAttributes }) { - return ( - - - - ) - }, - - markdownTokenName: 'strong', - - parseMarkdown: (token, helpers) => { - // Convert 'strong' token to bold mark - return helpers.applyMark('bold', helpers.parseInline(token.tokens || [])) - }, - - markdownOptions: { - htmlReopen: { - open: '', - close: '', - }, - }, - - renderMarkdown: (node, h) => { - return `**${h.renderChildren(node)}**` - }, - - addCommands() { - return { - setBold: - () => - ({ commands }) => { - return commands.setMark(this.name) - }, - toggleBold: - () => - ({ commands }) => { - return commands.toggleMark(this.name) - }, - unsetBold: - () => - ({ commands }) => { - return commands.unsetMark(this.name) - }, - } - }, - - addKeyboardShortcuts() { - return { - 'Mod-b': () => this.editor.commands.toggleBold(), - 'Mod-B': () => this.editor.commands.toggleBold(), - } - }, - - addInputRules() { - return [ - markInputRule({ - find: starInputRegex, - type: this.type, - }), - markInputRule({ - find: underscoreInputRegex, - type: this.type, - }), - ] - }, - - addPasteRules() { - return [ - markPasteRule({ - find: starPasteRegex, - type: this.type, - }), - markPasteRule({ - find: underscorePasteRegex, - type: this.type, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/src/index.ts deleted file mode 100644 index 3a2d6c8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Bold } from './bold.jsx' - -export * from './bold.jsx' - -export default Bold diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/README.md deleted file mode 100644 index a5e845f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-bullet-list - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-bullet-list.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-bullet-list) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-bullet-list.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-bullet-list.svg)](https://www.npmjs.com/package/@tiptap/extension-bullet-list) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.cjs deleted file mode 100644 index bcdc605..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.cjs +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - BulletList: () => import_extension_list2.BulletList, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); -var import_extension_list = require("@tiptap/extension-list"); -var import_extension_list2 = require("@tiptap/extension-list"); -var index_default = import_extension_list.BulletList; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - BulletList -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.cjs.map deleted file mode 100644 index 3dc7922..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { BulletList } from '@tiptap/extension-list'\n\nexport type { BulletListOptions } from '@tiptap/extension-list'\nexport { BulletList } from '@tiptap/extension-list'\n\nexport default BulletList\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA2B;AAG3B,IAAAA,yBAA2B;AAE3B,IAAO,gBAAQ;","names":["import_extension_list"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.d.cts deleted file mode 100644 index d1ed126..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.d.cts +++ /dev/null @@ -1,2 +0,0 @@ -import { BulletList } from '@tiptap/extension-list'; -export { BulletList, BulletListOptions, BulletList as default } from '@tiptap/extension-list'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.d.ts deleted file mode 100644 index d1ed126..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { BulletList } from '@tiptap/extension-list'; -export { BulletList, BulletListOptions, BulletList as default } from '@tiptap/extension-list'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.js deleted file mode 100644 index 4d94691..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// src/index.ts -import { BulletList } from "@tiptap/extension-list"; -import { BulletList as BulletList2 } from "@tiptap/extension-list"; -var index_default = BulletList; -export { - BulletList2 as BulletList, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.js.map deleted file mode 100644 index 1782190..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { BulletList } from '@tiptap/extension-list'\n\nexport type { BulletListOptions } from '@tiptap/extension-list'\nexport { BulletList } from '@tiptap/extension-list'\n\nexport default BulletList\n"],"mappings":";AAAA,SAAS,kBAAkB;AAG3B,SAAS,cAAAA,mBAAkB;AAE3B,IAAO,gBAAQ;","names":["BulletList"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/package.json deleted file mode 100644 index ddba7cc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-bullet-list", - "version": "3.26.0", - "description": "bullet list extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-bullet-list" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/extension-list": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/extension-list": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/src/index.ts deleted file mode 100644 index 78a1aa3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { BulletList } from '@tiptap/extension-list' - -export type { BulletListOptions } from '@tiptap/extension-list' -export { BulletList } from '@tiptap/extension-list' - -export default BulletList diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-list b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-list deleted file mode 120000 index e342d8d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-list +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/README.md deleted file mode 100644 index 0490d4d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-code-block - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-code-block.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-code-block) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-code-block.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-code-block.svg)](https://www.npmjs.com/package/@tiptap/extension-code-block) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.cjs deleted file mode 100644 index 19f4548..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.cjs +++ /dev/null @@ -1,353 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - CodeBlock: () => CodeBlock, - backtickInputRegex: () => backtickInputRegex, - default: () => index_default, - tildeInputRegex: () => tildeInputRegex -}); -module.exports = __toCommonJS(index_exports); - -// src/code-block.ts -var import_core = require("@tiptap/core"); -var import_state = require("@tiptap/pm/state"); -var DEFAULT_TAB_SIZE = 4; -var backtickInputRegex = /^```([a-z]+)?[\s\n]$/; -var tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/; -var CodeBlock = import_core.Node.create({ - name: "codeBlock", - addOptions() { - return { - languageClassPrefix: "language-", - exitOnTripleEnter: true, - exitOnArrowDown: true, - defaultLanguage: null, - enableTabIndentation: false, - tabSize: DEFAULT_TAB_SIZE, - HTMLAttributes: {} - }; - }, - content: "text*", - marks: "", - group: "block", - code: true, - defining: true, - addAttributes() { - return { - language: { - default: this.options.defaultLanguage, - parseHTML: (element) => { - var _a; - const { languageClassPrefix } = this.options; - if (!languageClassPrefix) { - return null; - } - const classNames = [...((_a = element.firstElementChild) == null ? void 0 : _a.classList) || []]; - const languages = classNames.filter((className) => className.startsWith(languageClassPrefix)).map((className) => className.replace(languageClassPrefix, "")); - const language = languages[0]; - if (!language) { - return null; - } - return language; - }, - rendered: false - } - }; - }, - parseHTML() { - return [ - { - tag: "pre", - preserveWhitespace: "full" - } - ]; - }, - renderHTML({ node, HTMLAttributes }) { - return [ - "pre", - (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), - [ - "code", - { - class: node.attrs.language ? this.options.languageClassPrefix + node.attrs.language : null - }, - 0 - ] - ]; - }, - markdownTokenName: "code", - parseMarkdown: (token, helpers) => { - var _a, _b; - if (((_a = token.raw) == null ? void 0 : _a.startsWith("```")) === false && ((_b = token.raw) == null ? void 0 : _b.startsWith("~~~")) === false && token.codeBlockStyle !== "indented") { - return []; - } - return helpers.createNode( - "codeBlock", - { language: token.lang || null }, - token.text ? [helpers.createTextNode(token.text)] : [] - ); - }, - renderMarkdown: (node, h) => { - var _a; - let output = ""; - const language = ((_a = node.attrs) == null ? void 0 : _a.language) || ""; - if (!node.content) { - output = `\`\`\`${language} - -\`\`\``; - } else { - const lines = [`\`\`\`${language}`, h.renderChildren(node.content), "```"]; - output = lines.join("\n"); - } - return output; - }, - addCommands() { - return { - setCodeBlock: (attributes) => ({ commands }) => { - return commands.setNode(this.name, attributes); - }, - toggleCodeBlock: (attributes) => ({ commands }) => { - return commands.toggleNode(this.name, "paragraph", attributes); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Alt-c": () => this.editor.commands.toggleCodeBlock(), - // remove code block when at start of document or code block is empty - Backspace: () => { - const { empty, $anchor } = this.editor.state.selection; - const isAtStart = $anchor.pos === 1; - if (!empty || $anchor.parent.type.name !== this.name) { - return false; - } - if (isAtStart || !$anchor.parent.textContent.length) { - return this.editor.commands.clearNodes(); - } - return false; - }, - // handle tab indentation - Tab: ({ editor }) => { - var _a; - if (!this.options.enableTabIndentation) { - return false; - } - const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE; - const { state } = editor; - const { selection } = state; - const { $from, empty } = selection; - if ($from.parent.type !== this.type) { - return false; - } - const indent = " ".repeat(tabSize); - if (empty) { - return editor.commands.insertContent(indent); - } - return editor.commands.command(({ tr }) => { - const { from, to } = selection; - const text = state.doc.textBetween(from, to, "\n", "\n"); - const lines = text.split("\n"); - const indentedText = lines.map((line) => indent + line).join("\n"); - tr.replaceWith(from, to, state.schema.text(indentedText)); - return true; - }); - }, - // handle shift+tab reverse indentation - "Shift-Tab": ({ editor }) => { - var _a; - if (!this.options.enableTabIndentation) { - return false; - } - const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE; - const { state } = editor; - const { selection } = state; - const { $from, empty } = selection; - if ($from.parent.type !== this.type) { - return false; - } - if (empty) { - return editor.commands.command(({ tr }) => { - var _a2; - const { pos } = $from; - const codeBlockStart = $from.start(); - const codeBlockEnd = $from.end(); - const allText = state.doc.textBetween(codeBlockStart, codeBlockEnd, "\n", "\n"); - const lines = allText.split("\n"); - let currentLineIndex = 0; - let charCount = 0; - const relativeCursorPos = pos - codeBlockStart; - for (let i = 0; i < lines.length; i += 1) { - if (charCount + lines[i].length >= relativeCursorPos) { - currentLineIndex = i; - break; - } - charCount += lines[i].length + 1; - } - const currentLine = lines[currentLineIndex]; - const leadingSpaces = ((_a2 = currentLine.match(/^ */)) == null ? void 0 : _a2[0]) || ""; - const spacesToRemove = Math.min(leadingSpaces.length, tabSize); - if (spacesToRemove === 0) { - return true; - } - let lineStartPos = codeBlockStart; - for (let i = 0; i < currentLineIndex; i += 1) { - lineStartPos += lines[i].length + 1; - } - tr.delete(lineStartPos, lineStartPos + spacesToRemove); - const cursorPosInLine = pos - lineStartPos; - if (cursorPosInLine <= spacesToRemove) { - tr.setSelection(import_state.TextSelection.create(tr.doc, lineStartPos)); - } - return true; - }); - } - return editor.commands.command(({ tr }) => { - const { from, to } = selection; - const text = state.doc.textBetween(from, to, "\n", "\n"); - const lines = text.split("\n"); - const reverseIndentText = lines.map((line) => { - var _a2; - const leadingSpaces = ((_a2 = line.match(/^ */)) == null ? void 0 : _a2[0]) || ""; - const spacesToRemove = Math.min(leadingSpaces.length, tabSize); - return line.slice(spacesToRemove); - }).join("\n"); - tr.replaceWith(from, to, state.schema.text(reverseIndentText)); - return true; - }); - }, - // exit node on triple enter - Enter: ({ editor }) => { - if (!this.options.exitOnTripleEnter) { - return false; - } - const { state } = editor; - const { selection } = state; - const { $from, empty } = selection; - if (!empty || $from.parent.type !== this.type) { - return false; - } - const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2; - const endsWithDoubleNewline = $from.parent.textContent.endsWith("\n\n"); - if (!isAtEnd || !endsWithDoubleNewline) { - return false; - } - return editor.chain().command(({ tr }) => { - tr.delete($from.pos - 2, $from.pos); - return true; - }).exitCode().run(); - }, - // exit node on arrow down - ArrowDown: ({ editor }) => { - if (!this.options.exitOnArrowDown) { - return false; - } - const { state } = editor; - const { selection, doc } = state; - const { $from, empty } = selection; - if (!empty || $from.parent.type !== this.type) { - return false; - } - const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2; - if (!isAtEnd) { - return false; - } - const after = $from.after(); - if (after === void 0) { - return false; - } - const nodeAfter = doc.nodeAt(after); - if (nodeAfter) { - return editor.commands.command(({ tr }) => { - tr.setSelection(import_state.Selection.near(doc.resolve(after))); - return true; - }); - } - return editor.commands.exitCode(); - } - }; - }, - addInputRules() { - return [ - (0, import_core.textblockTypeInputRule)({ - find: backtickInputRegex, - type: this.type, - getAttributes: (match) => ({ - language: match[1] - }) - }), - (0, import_core.textblockTypeInputRule)({ - find: tildeInputRegex, - type: this.type, - getAttributes: (match) => ({ - language: match[1] - }) - }) - ]; - }, - addProseMirrorPlugins() { - return [ - // this plugin creates a code block for pasted content from VS Code - // we can also detect the copied code language - new import_state.Plugin({ - key: new import_state.PluginKey("codeBlockVSCodeHandler"), - props: { - handlePaste: (view, event) => { - if (!event.clipboardData) { - return false; - } - if (this.editor.isActive(this.type.name)) { - return false; - } - const text = event.clipboardData.getData("text/plain"); - const vscode = event.clipboardData.getData("vscode-editor-data"); - const vscodeData = vscode ? JSON.parse(vscode) : void 0; - const language = vscodeData == null ? void 0 : vscodeData.mode; - if (!text || !language) { - return false; - } - const { tr, schema } = view.state; - const textNode = schema.text(text.replace(/\r\n?/g, "\n")); - tr.replaceSelectionWith(this.type.create({ language }, textNode)); - if (tr.selection.$from.parent.type !== this.type) { - tr.setSelection( - import_state.TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))) - ); - } - tr.setMeta("paste", true); - view.dispatch(tr); - return true; - } - } - }) - ]; - } -}); - -// src/index.ts -var index_default = CodeBlock; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - CodeBlock, - backtickInputRegex, - tildeInputRegex -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.cjs.map deleted file mode 100644 index ae67956..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/code-block.ts"],"sourcesContent":["import { CodeBlock } from './code-block.js'\n\nexport * from './code-block.js'\n\nexport default CodeBlock\n","import { mergeAttributes, Node, textblockTypeInputRule } from '@tiptap/core'\nimport { Plugin, PluginKey, Selection, TextSelection } from '@tiptap/pm/state'\n\nconst DEFAULT_TAB_SIZE = 4\n\nexport interface CodeBlockOptions {\n /**\n * Adds a prefix to language classes that are applied to code tags.\n * @default 'language-'\n */\n languageClassPrefix: string | null | undefined\n /**\n * Define whether the node should be exited on triple enter.\n * @default true\n */\n exitOnTripleEnter: boolean | null | undefined\n /**\n * Define whether the node should be exited on arrow down if there is no node after it.\n * @default true\n */\n exitOnArrowDown: boolean | null | undefined\n /**\n * The default language.\n * @default null\n * @example 'js'\n */\n defaultLanguage: string | null | undefined\n /**\n * Enable tab key for indentation in code blocks.\n * @default false\n */\n enableTabIndentation: boolean | null | undefined\n /**\n * The number of spaces to use for tab indentation.\n * @default 4\n */\n tabSize: number | null | undefined\n /**\n * Custom HTML attributes that should be added to the rendered HTML tag.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n codeBlock: {\n /**\n * Set a code block\n * @param attributes Code block attributes\n * @example editor.commands.setCodeBlock({ language: 'javascript' })\n */\n setCodeBlock: (attributes?: { language: string }) => ReturnType\n /**\n * Toggle a code block\n * @param attributes Code block attributes\n * @example editor.commands.toggleCodeBlock({ language: 'javascript' })\n */\n toggleCodeBlock: (attributes?: { language: string }) => ReturnType\n }\n }\n}\n\n/**\n * Matches a code block with backticks.\n */\nexport const backtickInputRegex = /^```([a-z]+)?[\\s\\n]$/\n\n/**\n * Matches a code block with tildes.\n */\nexport const tildeInputRegex = /^~~~([a-z]+)?[\\s\\n]$/\n\n/**\n * This extension allows you to create code blocks.\n * @see https://tiptap.dev/api/nodes/code-block\n */\nexport const CodeBlock = Node.create({\n name: 'codeBlock',\n\n addOptions() {\n return {\n languageClassPrefix: 'language-',\n exitOnTripleEnter: true,\n exitOnArrowDown: true,\n defaultLanguage: null,\n enableTabIndentation: false,\n tabSize: DEFAULT_TAB_SIZE,\n HTMLAttributes: {},\n }\n },\n\n content: 'text*',\n\n marks: '',\n\n group: 'block',\n\n code: true,\n\n defining: true,\n\n addAttributes() {\n return {\n language: {\n default: this.options.defaultLanguage,\n parseHTML: element => {\n const { languageClassPrefix } = this.options\n\n if (!languageClassPrefix) {\n return null\n }\n\n const classNames = [...(element.firstElementChild?.classList || [])]\n const languages = classNames\n .filter(className => className.startsWith(languageClassPrefix))\n .map(className => className.replace(languageClassPrefix, ''))\n const language = languages[0]\n\n if (!language) {\n return null\n }\n\n return language\n },\n rendered: false,\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'pre',\n preserveWhitespace: 'full',\n },\n ]\n },\n\n renderHTML({ node, HTMLAttributes }) {\n return [\n 'pre',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n [\n 'code',\n {\n class: node.attrs.language\n ? this.options.languageClassPrefix + node.attrs.language\n : null,\n },\n 0,\n ],\n ]\n },\n\n markdownTokenName: 'code',\n\n parseMarkdown: (token, helpers) => {\n if (\n token.raw?.startsWith('```') === false &&\n token.raw?.startsWith('~~~') === false &&\n token.codeBlockStyle !== 'indented'\n ) {\n return []\n }\n\n return helpers.createNode(\n 'codeBlock',\n { language: token.lang || null },\n token.text ? [helpers.createTextNode(token.text)] : [],\n )\n },\n\n renderMarkdown: (node, h) => {\n let output = ''\n const language = node.attrs?.language || ''\n\n if (!node.content) {\n output = `\\`\\`\\`${language}\\n\\n\\`\\`\\``\n } else {\n const lines = [`\\`\\`\\`${language}`, h.renderChildren(node.content), '```']\n output = lines.join('\\n')\n }\n\n return output\n },\n\n addCommands() {\n return {\n setCodeBlock:\n attributes =>\n ({ commands }) => {\n return commands.setNode(this.name, attributes)\n },\n toggleCodeBlock:\n attributes =>\n ({ commands }) => {\n return commands.toggleNode(this.name, 'paragraph', attributes)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Alt-c': () => this.editor.commands.toggleCodeBlock(),\n\n // remove code block when at start of document or code block is empty\n Backspace: () => {\n const { empty, $anchor } = this.editor.state.selection\n const isAtStart = $anchor.pos === 1\n\n if (!empty || $anchor.parent.type.name !== this.name) {\n return false\n }\n\n if (isAtStart || !$anchor.parent.textContent.length) {\n return this.editor.commands.clearNodes()\n }\n\n return false\n },\n\n // handle tab indentation\n Tab: ({ editor }) => {\n if (!this.options.enableTabIndentation) {\n return false\n }\n\n const tabSize = this.options.tabSize ?? DEFAULT_TAB_SIZE\n const { state } = editor\n const { selection } = state\n const { $from, empty } = selection\n\n if ($from.parent.type !== this.type) {\n return false\n }\n\n const indent = ' '.repeat(tabSize)\n\n if (empty) {\n return editor.commands.insertContent(indent)\n }\n\n return editor.commands.command(({ tr }) => {\n const { from, to } = selection\n const text = state.doc.textBetween(from, to, '\\n', '\\n')\n const lines = text.split('\\n')\n const indentedText = lines.map(line => indent + line).join('\\n')\n\n tr.replaceWith(from, to, state.schema.text(indentedText))\n return true\n })\n },\n\n // handle shift+tab reverse indentation\n 'Shift-Tab': ({ editor }) => {\n if (!this.options.enableTabIndentation) {\n return false\n }\n\n const tabSize = this.options.tabSize ?? DEFAULT_TAB_SIZE\n const { state } = editor\n const { selection } = state\n const { $from, empty } = selection\n\n if ($from.parent.type !== this.type) {\n return false\n }\n\n if (empty) {\n return editor.commands.command(({ tr }) => {\n const { pos } = $from\n const codeBlockStart = $from.start()\n const codeBlockEnd = $from.end()\n\n const allText = state.doc.textBetween(codeBlockStart, codeBlockEnd, '\\n', '\\n')\n const lines = allText.split('\\n')\n\n let currentLineIndex = 0\n let charCount = 0\n const relativeCursorPos = pos - codeBlockStart\n\n for (let i = 0; i < lines.length; i += 1) {\n if (charCount + lines[i].length >= relativeCursorPos) {\n currentLineIndex = i\n break\n }\n charCount += lines[i].length + 1\n }\n\n const currentLine = lines[currentLineIndex]\n const leadingSpaces = currentLine.match(/^ */)?.[0] || ''\n const spacesToRemove = Math.min(leadingSpaces.length, tabSize)\n\n if (spacesToRemove === 0) {\n return true\n }\n\n let lineStartPos = codeBlockStart\n for (let i = 0; i < currentLineIndex; i += 1) {\n lineStartPos += lines[i].length + 1\n }\n\n tr.delete(lineStartPos, lineStartPos + spacesToRemove)\n\n const cursorPosInLine = pos - lineStartPos\n if (cursorPosInLine <= spacesToRemove) {\n tr.setSelection(TextSelection.create(tr.doc, lineStartPos))\n }\n\n return true\n })\n }\n\n return editor.commands.command(({ tr }) => {\n const { from, to } = selection\n const text = state.doc.textBetween(from, to, '\\n', '\\n')\n const lines = text.split('\\n')\n const reverseIndentText = lines\n .map(line => {\n const leadingSpaces = line.match(/^ */)?.[0] || ''\n const spacesToRemove = Math.min(leadingSpaces.length, tabSize)\n return line.slice(spacesToRemove)\n })\n .join('\\n')\n\n tr.replaceWith(from, to, state.schema.text(reverseIndentText))\n return true\n })\n },\n\n // exit node on triple enter\n Enter: ({ editor }) => {\n if (!this.options.exitOnTripleEnter) {\n return false\n }\n\n const { state } = editor\n const { selection } = state\n const { $from, empty } = selection\n\n if (!empty || $from.parent.type !== this.type) {\n return false\n }\n\n const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2\n const endsWithDoubleNewline = $from.parent.textContent.endsWith('\\n\\n')\n\n if (!isAtEnd || !endsWithDoubleNewline) {\n return false\n }\n\n return editor\n .chain()\n .command(({ tr }) => {\n tr.delete($from.pos - 2, $from.pos)\n\n return true\n })\n .exitCode()\n .run()\n },\n\n // exit node on arrow down\n ArrowDown: ({ editor }) => {\n if (!this.options.exitOnArrowDown) {\n return false\n }\n\n const { state } = editor\n const { selection, doc } = state\n const { $from, empty } = selection\n\n if (!empty || $from.parent.type !== this.type) {\n return false\n }\n\n const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2\n\n if (!isAtEnd) {\n return false\n }\n\n const after = $from.after()\n\n if (after === undefined) {\n return false\n }\n\n const nodeAfter = doc.nodeAt(after)\n\n if (nodeAfter) {\n return editor.commands.command(({ tr }) => {\n tr.setSelection(Selection.near(doc.resolve(after)))\n return true\n })\n }\n\n return editor.commands.exitCode()\n },\n }\n },\n\n addInputRules() {\n return [\n textblockTypeInputRule({\n find: backtickInputRegex,\n type: this.type,\n getAttributes: match => ({\n language: match[1],\n }),\n }),\n textblockTypeInputRule({\n find: tildeInputRegex,\n type: this.type,\n getAttributes: match => ({\n language: match[1],\n }),\n }),\n ]\n },\n\n addProseMirrorPlugins() {\n return [\n // this plugin creates a code block for pasted content from VS Code\n // we can also detect the copied code language\n new Plugin({\n key: new PluginKey('codeBlockVSCodeHandler'),\n props: {\n handlePaste: (view, event) => {\n if (!event.clipboardData) {\n return false\n }\n\n // don’t create a new code block within code blocks\n if (this.editor.isActive(this.type.name)) {\n return false\n }\n\n const text = event.clipboardData.getData('text/plain')\n const vscode = event.clipboardData.getData('vscode-editor-data')\n const vscodeData = vscode ? JSON.parse(vscode) : undefined\n const language = vscodeData?.mode\n\n if (!text || !language) {\n return false\n }\n\n const { tr, schema } = view.state\n\n // prepare a text node\n // strip carriage return chars from text pasted as code\n // see: https://github.com/ProseMirror/prosemirror-view/commit/a50a6bcceb4ce52ac8fcc6162488d8875613aacd\n const textNode = schema.text(text.replace(/\\r\\n?/g, '\\n'))\n\n // create a code block with the text node\n // replace selection with the code block\n tr.replaceSelectionWith(this.type.create({ language }, textNode))\n\n if (tr.selection.$from.parent.type !== this.type) {\n // put cursor inside the newly created code block\n tr.setSelection(\n TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))),\n )\n }\n\n // store meta information\n // this is useful for other plugins that depends on the paste event\n // like the paste rule plugin\n tr.setMeta('paste', true)\n\n view.dispatch(tr)\n\n return true\n },\n },\n }),\n ]\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA8D;AAC9D,mBAA4D;AAE5D,IAAM,mBAAmB;AAgElB,IAAM,qBAAqB;AAK3B,IAAM,kBAAkB;AAMxB,IAAM,YAAY,iBAAK,OAAyB;AAAA,EACrD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,qBAAqB;AAAA,MACrB,mBAAmB;AAAA,MACnB,iBAAiB;AAAA,MACjB,iBAAiB;AAAA,MACjB,sBAAsB;AAAA,MACtB,SAAS;AAAA,MACT,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,SAAS;AAAA,EAET,OAAO;AAAA,EAEP,OAAO;AAAA,EAEP,MAAM;AAAA,EAEN,UAAU;AAAA,EAEV,gBAAgB;AACd,WAAO;AAAA,MACL,UAAU;AAAA,QACR,SAAS,KAAK,QAAQ;AAAA,QACtB,WAAW,aAAW;AA3G9B;AA4GU,gBAAM,EAAE,oBAAoB,IAAI,KAAK;AAErC,cAAI,CAAC,qBAAqB;AACxB,mBAAO;AAAA,UACT;AAEA,gBAAM,aAAa,CAAC,KAAI,aAAQ,sBAAR,mBAA2B,cAAa,CAAC,CAAE;AACnE,gBAAM,YAAY,WACf,OAAO,eAAa,UAAU,WAAW,mBAAmB,CAAC,EAC7D,IAAI,eAAa,UAAU,QAAQ,qBAAqB,EAAE,CAAC;AAC9D,gBAAM,WAAW,UAAU,CAAC;AAE5B,cAAI,CAAC,UAAU;AACb,mBAAO;AAAA,UACT;AAEA,iBAAO;AAAA,QACT;AAAA,QACA,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAAA,EAEA,YAAY;AACV,WAAO;AAAA,MACL;AAAA,QACE,KAAK;AA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ap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.d.cts deleted file mode 100644 index e77f934..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.d.cts +++ /dev/null @@ -1,78 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface CodeBlockOptions { - /** - * Adds a prefix to language classes that are applied to code tags. - * @default 'language-' - */ - languageClassPrefix: string | null | undefined; - /** - * Define whether the node should be exited on triple enter. - * @default true - */ - exitOnTripleEnter: boolean | null | undefined; - /** - * Define whether the node should be exited on arrow down if there is no node after it. - * @default true - */ - exitOnArrowDown: boolean | null | undefined; - /** - * The default language. - * @default null - * @example 'js' - */ - defaultLanguage: string | null | undefined; - /** - * Enable tab key for indentation in code blocks. - * @default false - */ - enableTabIndentation: boolean | null | undefined; - /** - * The number of spaces to use for tab indentation. - * @default 4 - */ - tabSize: number | null | undefined; - /** - * Custom HTML attributes that should be added to the rendered HTML tag. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - codeBlock: { - /** - * Set a code block - * @param attributes Code block attributes - * @example editor.commands.setCodeBlock({ language: 'javascript' }) - */ - setCodeBlock: (attributes?: { - language: string; - }) => ReturnType; - /** - * Toggle a code block - * @param attributes Code block attributes - * @example editor.commands.toggleCodeBlock({ language: 'javascript' }) - */ - toggleCodeBlock: (attributes?: { - language: string; - }) => ReturnType; - }; - } -} -/** - * Matches a code block with backticks. - */ -declare const backtickInputRegex: RegExp; -/** - * Matches a code block with tildes. - */ -declare const tildeInputRegex: RegExp; -/** - * This extension allows you to create code blocks. - * @see https://tiptap.dev/api/nodes/code-block - */ -declare const CodeBlock: Node; - -export { CodeBlock, type CodeBlockOptions, backtickInputRegex, CodeBlock as default, tildeInputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.d.ts deleted file mode 100644 index e77f934..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface CodeBlockOptions { - /** - * Adds a prefix to language classes that are applied to code tags. - * @default 'language-' - */ - languageClassPrefix: string | null | undefined; - /** - * Define whether the node should be exited on triple enter. - * @default true - */ - exitOnTripleEnter: boolean | null | undefined; - /** - * Define whether the node should be exited on arrow down if there is no node after it. - * @default true - */ - exitOnArrowDown: boolean | null | undefined; - /** - * The default language. - * @default null - * @example 'js' - */ - defaultLanguage: string | null | undefined; - /** - * Enable tab key for indentation in code blocks. - * @default false - */ - enableTabIndentation: boolean | null | undefined; - /** - * The number of spaces to use for tab indentation. - * @default 4 - */ - tabSize: number | null | undefined; - /** - * Custom HTML attributes that should be added to the rendered HTML tag. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - codeBlock: { - /** - * Set a code block - * @param attributes Code block attributes - * @example editor.commands.setCodeBlock({ language: 'javascript' }) - */ - setCodeBlock: (attributes?: { - language: string; - }) => ReturnType; - /** - * Toggle a code block - * @param attributes Code block attributes - * @example editor.commands.toggleCodeBlock({ language: 'javascript' }) - */ - toggleCodeBlock: (attributes?: { - language: string; - }) => ReturnType; - }; - } -} -/** - * Matches a code block with backticks. - */ -declare const backtickInputRegex: RegExp; -/** - * Matches a code block with tildes. - */ -declare const tildeInputRegex: RegExp; -/** - * This extension allows you to create code blocks. - * @see https://tiptap.dev/api/nodes/code-block - */ -declare const CodeBlock: Node; - -export { CodeBlock, type CodeBlockOptions, backtickInputRegex, CodeBlock as default, tildeInputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.js deleted file mode 100644 index 9d5eccc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.js +++ /dev/null @@ -1,324 +0,0 @@ -// src/code-block.ts -import { mergeAttributes, Node, textblockTypeInputRule } from "@tiptap/core"; -import { Plugin, PluginKey, Selection, TextSelection } from "@tiptap/pm/state"; -var DEFAULT_TAB_SIZE = 4; -var backtickInputRegex = /^```([a-z]+)?[\s\n]$/; -var tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/; -var CodeBlock = Node.create({ - name: "codeBlock", - addOptions() { - return { - languageClassPrefix: "language-", - exitOnTripleEnter: true, - exitOnArrowDown: true, - defaultLanguage: null, - enableTabIndentation: false, - tabSize: DEFAULT_TAB_SIZE, - HTMLAttributes: {} - }; - }, - content: "text*", - marks: "", - group: "block", - code: true, - defining: true, - addAttributes() { - return { - language: { - default: this.options.defaultLanguage, - parseHTML: (element) => { - var _a; - const { languageClassPrefix } = this.options; - if (!languageClassPrefix) { - return null; - } - const classNames = [...((_a = element.firstElementChild) == null ? void 0 : _a.classList) || []]; - const languages = classNames.filter((className) => className.startsWith(languageClassPrefix)).map((className) => className.replace(languageClassPrefix, "")); - const language = languages[0]; - if (!language) { - return null; - } - return language; - }, - rendered: false - } - }; - }, - parseHTML() { - return [ - { - tag: "pre", - preserveWhitespace: "full" - } - ]; - }, - renderHTML({ node, HTMLAttributes }) { - return [ - "pre", - mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), - [ - "code", - { - class: node.attrs.language ? this.options.languageClassPrefix + node.attrs.language : null - }, - 0 - ] - ]; - }, - markdownTokenName: "code", - parseMarkdown: (token, helpers) => { - var _a, _b; - if (((_a = token.raw) == null ? void 0 : _a.startsWith("```")) === false && ((_b = token.raw) == null ? void 0 : _b.startsWith("~~~")) === false && token.codeBlockStyle !== "indented") { - return []; - } - return helpers.createNode( - "codeBlock", - { language: token.lang || null }, - token.text ? [helpers.createTextNode(token.text)] : [] - ); - }, - renderMarkdown: (node, h) => { - var _a; - let output = ""; - const language = ((_a = node.attrs) == null ? void 0 : _a.language) || ""; - if (!node.content) { - output = `\`\`\`${language} - -\`\`\``; - } else { - const lines = [`\`\`\`${language}`, h.renderChildren(node.content), "```"]; - output = lines.join("\n"); - } - return output; - }, - addCommands() { - return { - setCodeBlock: (attributes) => ({ commands }) => { - return commands.setNode(this.name, attributes); - }, - toggleCodeBlock: (attributes) => ({ commands }) => { - return commands.toggleNode(this.name, "paragraph", attributes); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Alt-c": () => this.editor.commands.toggleCodeBlock(), - // remove code block when at start of document or code block is empty - Backspace: () => { - const { empty, $anchor } = this.editor.state.selection; - const isAtStart = $anchor.pos === 1; - if (!empty || $anchor.parent.type.name !== this.name) { - return false; - } - if (isAtStart || !$anchor.parent.textContent.length) { - return this.editor.commands.clearNodes(); - } - return false; - }, - // handle tab indentation - Tab: ({ editor }) => { - var _a; - if (!this.options.enableTabIndentation) { - return false; - } - const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE; - const { state } = editor; - const { selection } = state; - const { $from, empty } = selection; - if ($from.parent.type !== this.type) { - return false; - } - const indent = " ".repeat(tabSize); - if (empty) { - return editor.commands.insertContent(indent); - } - return editor.commands.command(({ tr }) => { - const { from, to } = selection; - const text = state.doc.textBetween(from, to, "\n", "\n"); - const lines = text.split("\n"); - const indentedText = lines.map((line) => indent + line).join("\n"); - tr.replaceWith(from, to, state.schema.text(indentedText)); - return true; - }); - }, - // handle shift+tab reverse indentation - "Shift-Tab": ({ editor }) => { - var _a; - if (!this.options.enableTabIndentation) { - return false; - } - const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE; - const { state } = editor; - const { selection } = state; - const { $from, empty } = selection; - if ($from.parent.type !== this.type) { - return false; - } - if (empty) { - return editor.commands.command(({ tr }) => { - var _a2; - const { pos } = $from; - const codeBlockStart = $from.start(); - const codeBlockEnd = $from.end(); - const allText = state.doc.textBetween(codeBlockStart, codeBlockEnd, "\n", "\n"); - const lines = allText.split("\n"); - let currentLineIndex = 0; - let charCount = 0; - const relativeCursorPos = pos - codeBlockStart; - for (let i = 0; i < lines.length; i += 1) { - if (charCount + lines[i].length >= relativeCursorPos) { - currentLineIndex = i; - break; - } - charCount += lines[i].length + 1; - } - const currentLine = lines[currentLineIndex]; - const leadingSpaces = ((_a2 = currentLine.match(/^ */)) == null ? void 0 : _a2[0]) || ""; - const spacesToRemove = Math.min(leadingSpaces.length, tabSize); - if (spacesToRemove === 0) { - return true; - } - let lineStartPos = codeBlockStart; - for (let i = 0; i < currentLineIndex; i += 1) { - lineStartPos += lines[i].length + 1; - } - tr.delete(lineStartPos, lineStartPos + spacesToRemove); - const cursorPosInLine = pos - lineStartPos; - if (cursorPosInLine <= spacesToRemove) { - tr.setSelection(TextSelection.create(tr.doc, lineStartPos)); - } - return true; - }); - } - return editor.commands.command(({ tr }) => { - const { from, to } = selection; - const text = state.doc.textBetween(from, to, "\n", "\n"); - const lines = text.split("\n"); - const reverseIndentText = lines.map((line) => { - var _a2; - const leadingSpaces = ((_a2 = line.match(/^ */)) == null ? void 0 : _a2[0]) || ""; - const spacesToRemove = Math.min(leadingSpaces.length, tabSize); - return line.slice(spacesToRemove); - }).join("\n"); - tr.replaceWith(from, to, state.schema.text(reverseIndentText)); - return true; - }); - }, - // exit node on triple enter - Enter: ({ editor }) => { - if (!this.options.exitOnTripleEnter) { - return false; - } - const { state } = editor; - const { selection } = state; - const { $from, empty } = selection; - if (!empty || $from.parent.type !== this.type) { - return false; - } - const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2; - const endsWithDoubleNewline = $from.parent.textContent.endsWith("\n\n"); - if (!isAtEnd || !endsWithDoubleNewline) { - return false; - } - return editor.chain().command(({ tr }) => { - tr.delete($from.pos - 2, $from.pos); - return true; - }).exitCode().run(); - }, - // exit node on arrow down - ArrowDown: ({ editor }) => { - if (!this.options.exitOnArrowDown) { - return false; - } - const { state } = editor; - const { selection, doc } = state; - const { $from, empty } = selection; - if (!empty || $from.parent.type !== this.type) { - return false; - } - const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2; - if (!isAtEnd) { - return false; - } - const after = $from.after(); - if (after === void 0) { - return false; - } - const nodeAfter = doc.nodeAt(after); - if (nodeAfter) { - return editor.commands.command(({ tr }) => { - tr.setSelection(Selection.near(doc.resolve(after))); - return true; - }); - } - return editor.commands.exitCode(); - } - }; - }, - addInputRules() { - return [ - textblockTypeInputRule({ - find: backtickInputRegex, - type: this.type, - getAttributes: (match) => ({ - language: match[1] - }) - }), - textblockTypeInputRule({ - find: tildeInputRegex, - type: this.type, - getAttributes: (match) => ({ - language: match[1] - }) - }) - ]; - }, - addProseMirrorPlugins() { - return [ - // this plugin creates a code block for pasted content from VS Code - // we can also detect the copied code language - new Plugin({ - key: new PluginKey("codeBlockVSCodeHandler"), - props: { - handlePaste: (view, event) => { - if (!event.clipboardData) { - return false; - } - if (this.editor.isActive(this.type.name)) { - return false; - } - const text = event.clipboardData.getData("text/plain"); - const vscode = event.clipboardData.getData("vscode-editor-data"); - const vscodeData = vscode ? JSON.parse(vscode) : void 0; - const language = vscodeData == null ? void 0 : vscodeData.mode; - if (!text || !language) { - return false; - } - const { tr, schema } = view.state; - const textNode = schema.text(text.replace(/\r\n?/g, "\n")); - tr.replaceSelectionWith(this.type.create({ language }, textNode)); - if (tr.selection.$from.parent.type !== this.type) { - tr.setSelection( - TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))) - ); - } - tr.setMeta("paste", true); - view.dispatch(tr); - return true; - } - } - }) - ]; - } -}); - -// src/index.ts -var index_default = CodeBlock; -export { - CodeBlock, - backtickInputRegex, - index_default as default, - tildeInputRegex -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.js.map deleted file mode 100644 index 3146674..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/code-block.ts","../src/index.ts"],"sourcesContent":["import { mergeAttributes, Node, textblockTypeInputRule } from '@tiptap/core'\nimport { Plugin, PluginKey, Selection, TextSelection } from '@tiptap/pm/state'\n\nconst DEFAULT_TAB_SIZE = 4\n\nexport interface CodeBlockOptions {\n /**\n * Adds a prefix to language classes that are applied to code tags.\n * @default 'language-'\n */\n languageClassPrefix: string | null | undefined\n /**\n * Define whether the node should be exited on triple enter.\n * @default true\n */\n exitOnTripleEnter: boolean | null | undefined\n /**\n * Define whether the node should be exited on arrow down if there is no node after it.\n * @default true\n */\n exitOnArrowDown: boolean | null | undefined\n /**\n * The default language.\n * @default null\n * @example 'js'\n */\n defaultLanguage: string | null | undefined\n /**\n * Enable tab key for indentation in code blocks.\n * @default false\n */\n enableTabIndentation: boolean | null | undefined\n /**\n * The number of spaces to use for tab indentation.\n * @default 4\n */\n tabSize: number | null | undefined\n /**\n * Custom HTML attributes that should be added to the rendered HTML tag.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n codeBlock: {\n /**\n * Set a code block\n * @param attributes Code block attributes\n * @example editor.commands.setCodeBlock({ language: 'javascript' })\n */\n setCodeBlock: (attributes?: { language: string }) => ReturnType\n /**\n * Toggle a code block\n * @param attributes Code block attributes\n * @example editor.commands.toggleCodeBlock({ language: 'javascript' })\n */\n toggleCodeBlock: (attributes?: { language: string }) => ReturnType\n }\n }\n}\n\n/**\n * Matches a code block with backticks.\n */\nexport const backtickInputRegex = /^```([a-z]+)?[\\s\\n]$/\n\n/**\n * Matches a code block with tildes.\n */\nexport const tildeInputRegex = /^~~~([a-z]+)?[\\s\\n]$/\n\n/**\n * This extension allows you to create code blocks.\n * @see https://tiptap.dev/api/nodes/code-block\n */\nexport const CodeBlock = Node.create({\n name: 'codeBlock',\n\n addOptions() {\n return {\n languageClassPrefix: 'language-',\n exitOnTripleEnter: true,\n exitOnArrowDown: true,\n defaultLanguage: null,\n enableTabIndentation: false,\n tabSize: DEFAULT_TAB_SIZE,\n HTMLAttributes: {},\n }\n },\n\n content: 'text*',\n\n marks: '',\n\n group: 'block',\n\n code: true,\n\n defining: true,\n\n addAttributes() {\n return {\n language: {\n default: this.options.defaultLanguage,\n parseHTML: element => {\n const { languageClassPrefix } = this.options\n\n if (!languageClassPrefix) {\n return null\n }\n\n const classNames = [...(element.firstElementChild?.classList || [])]\n const languages = classNames\n .filter(className => className.startsWith(languageClassPrefix))\n .map(className => className.replace(languageClassPrefix, ''))\n const language = languages[0]\n\n if (!language) {\n return null\n }\n\n return language\n },\n rendered: false,\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'pre',\n preserveWhitespace: 'full',\n },\n ]\n },\n\n renderHTML({ node, HTMLAttributes }) {\n return [\n 'pre',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n [\n 'code',\n {\n class: node.attrs.language\n ? this.options.languageClassPrefix + node.attrs.language\n : null,\n },\n 0,\n ],\n ]\n },\n\n markdownTokenName: 'code',\n\n parseMarkdown: (token, helpers) => {\n if (\n token.raw?.startsWith('```') === false &&\n token.raw?.startsWith('~~~') === false &&\n token.codeBlockStyle !== 'indented'\n ) {\n return []\n }\n\n return helpers.createNode(\n 'codeBlock',\n { language: token.lang || null },\n token.text ? [helpers.createTextNode(token.text)] : [],\n )\n },\n\n renderMarkdown: (node, h) => {\n let output = ''\n const language = node.attrs?.language || ''\n\n if (!node.content) {\n output = `\\`\\`\\`${language}\\n\\n\\`\\`\\``\n } else {\n const lines = [`\\`\\`\\`${language}`, h.renderChildren(node.content), '```']\n output = lines.join('\\n')\n }\n\n return output\n },\n\n addCommands() {\n return {\n setCodeBlock:\n attributes =>\n ({ commands }) => {\n return commands.setNode(this.name, attributes)\n },\n toggleCodeBlock:\n attributes =>\n ({ commands }) => {\n return commands.toggleNode(this.name, 'paragraph', attributes)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Alt-c': () => this.editor.commands.toggleCodeBlock(),\n\n // remove code block when at start of document or code block is empty\n Backspace: () => {\n const { empty, $anchor } = this.editor.state.selection\n const isAtStart = $anchor.pos === 1\n\n if (!empty || $anchor.parent.type.name !== this.name) {\n return false\n }\n\n if (isAtStart || !$anchor.parent.textContent.length) {\n return this.editor.commands.clearNodes()\n }\n\n return false\n },\n\n // handle tab indentation\n Tab: ({ editor }) => {\n if (!this.options.enableTabIndentation) {\n return false\n }\n\n const tabSize = this.options.tabSize ?? DEFAULT_TAB_SIZE\n const { state } = editor\n const { selection } = state\n const { $from, empty } = selection\n\n if ($from.parent.type !== this.type) {\n return false\n }\n\n const indent = ' '.repeat(tabSize)\n\n if (empty) {\n return editor.commands.insertContent(indent)\n }\n\n return editor.commands.command(({ tr }) => {\n const { from, to } = selection\n const text = state.doc.textBetween(from, to, '\\n', '\\n')\n const lines = text.split('\\n')\n const indentedText = lines.map(line => indent + line).join('\\n')\n\n tr.replaceWith(from, to, state.schema.text(indentedText))\n return true\n })\n },\n\n // handle shift+tab reverse indentation\n 'Shift-Tab': ({ editor }) => {\n if (!this.options.enableTabIndentation) {\n return false\n }\n\n const tabSize = this.options.tabSize ?? DEFAULT_TAB_SIZE\n const { state } = editor\n const { selection } = state\n const { $from, empty } = selection\n\n if ($from.parent.type !== this.type) {\n return false\n }\n\n if (empty) {\n return editor.commands.command(({ tr }) => {\n const { pos } = $from\n const codeBlockStart = $from.start()\n const codeBlockEnd = $from.end()\n\n const allText = state.doc.textBetween(codeBlockStart, codeBlockEnd, '\\n', '\\n')\n const lines = allText.split('\\n')\n\n let currentLineIndex = 0\n let charCount = 0\n const relativeCursorPos = pos - codeBlockStart\n\n for (let i = 0; i < lines.length; i += 1) {\n if (charCount + lines[i].length >= relativeCursorPos) {\n currentLineIndex = i\n break\n }\n charCount += lines[i].length + 1\n }\n\n const currentLine = lines[currentLineIndex]\n const leadingSpaces = currentLine.match(/^ */)?.[0] || ''\n const spacesToRemove = Math.min(leadingSpaces.length, tabSize)\n\n if (spacesToRemove === 0) {\n return true\n }\n\n let lineStartPos = codeBlockStart\n for (let i = 0; i < currentLineIndex; i += 1) {\n lineStartPos += lines[i].length + 1\n }\n\n tr.delete(lineStartPos, lineStartPos + spacesToRemove)\n\n const cursorPosInLine = pos - lineStartPos\n if (cursorPosInLine <= spacesToRemove) {\n tr.setSelection(TextSelection.create(tr.doc, lineStartPos))\n }\n\n return true\n })\n }\n\n return editor.commands.command(({ tr }) => {\n const { from, to } = selection\n const text = state.doc.textBetween(from, to, '\\n', '\\n')\n const lines = text.split('\\n')\n const reverseIndentText = lines\n .map(line => {\n const leadingSpaces = line.match(/^ */)?.[0] || ''\n const spacesToRemove = Math.min(leadingSpaces.length, tabSize)\n return line.slice(spacesToRemove)\n })\n .join('\\n')\n\n tr.replaceWith(from, to, state.schema.text(reverseIndentText))\n return true\n })\n },\n\n // exit node on triple enter\n Enter: ({ editor }) => {\n if (!this.options.exitOnTripleEnter) {\n return false\n }\n\n const { state } = editor\n const { selection } = state\n const { $from, empty } = selection\n\n if (!empty || $from.parent.type !== this.type) {\n return false\n }\n\n const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2\n const endsWithDoubleNewline = $from.parent.textContent.endsWith('\\n\\n')\n\n if (!isAtEnd || !endsWithDoubleNewline) {\n return false\n }\n\n return editor\n .chain()\n .command(({ tr }) => {\n tr.delete($from.pos - 2, $from.pos)\n\n return true\n })\n .exitCode()\n .run()\n },\n\n // exit node on arrow down\n ArrowDown: ({ editor }) => {\n if (!this.options.exitOnArrowDown) {\n return false\n }\n\n const { state } = editor\n const { selection, doc } = state\n const { $from, empty } = selection\n\n if (!empty || $from.parent.type !== this.type) {\n return false\n }\n\n const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2\n\n if (!isAtEnd) {\n return false\n }\n\n const after = $from.after()\n\n if (after === undefined) {\n return false\n }\n\n const nodeAfter = doc.nodeAt(after)\n\n if (nodeAfter) {\n return editor.commands.command(({ tr }) => {\n tr.setSelection(Selection.near(doc.resolve(after)))\n return true\n })\n }\n\n return editor.commands.exitCode()\n },\n }\n },\n\n addInputRules() {\n return [\n textblockTypeInputRule({\n find: backtickInputRegex,\n type: this.type,\n getAttributes: match => ({\n language: match[1],\n }),\n }),\n textblockTypeInputRule({\n find: tildeInputRegex,\n type: this.type,\n getAttributes: match => ({\n language: match[1],\n }),\n }),\n ]\n },\n\n addProseMirrorPlugins() {\n return [\n // this plugin creates a code block for pasted content from VS Code\n // we can also detect the copied code language\n new Plugin({\n key: new PluginKey('codeBlockVSCodeHandler'),\n props: {\n handlePaste: (view, event) => {\n if (!event.clipboardData) {\n return false\n }\n\n // don’t create a new code block within code blocks\n if (this.editor.isActive(this.type.name)) {\n return false\n }\n\n const text = event.clipboardData.getData('text/plain')\n const vscode = event.clipboardData.getData('vscode-editor-data')\n const vscodeData = vscode ? JSON.parse(vscode) : undefined\n const language = vscodeData?.mode\n\n if (!text || !language) {\n return false\n }\n\n const { tr, schema } = view.state\n\n // prepare a text node\n // strip carriage return chars from text pasted as code\n // see: https://github.com/ProseMirror/prosemirror-view/commit/a50a6bcceb4ce52ac8fcc6162488d8875613aacd\n const textNode = schema.text(text.replace(/\\r\\n?/g, '\\n'))\n\n // create a code block with the text node\n // replace selection with the code block\n tr.replaceSelectionWith(this.type.create({ language }, textNode))\n\n if (tr.selection.$from.parent.type !== this.type) {\n // put cursor inside the newly created code block\n tr.setSelection(\n TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))),\n )\n }\n\n // store meta information\n // this is useful for other plugins that depends on the paste event\n // like the paste rule plugin\n tr.setMeta('paste', true)\n\n view.dispatch(tr)\n\n return true\n },\n },\n }),\n ]\n },\n})\n","import { CodeBlock } from './code-block.js'\n\nexport * from './code-block.js'\n\nexport default CodeBlock\n"],"mappings":";AAAA,SAAS,iBAAiB,MAAM,8BAA8B;AAC9D,SAAS,QAAQ,WAAW,WAAW,qBAAqB;AAE5D,IAAM,mBAAmB;AAgElB,IAAM,qBAAqB;AAK3B,IAAM,kBAAkB;AAMxB,IAAM,YAAY,KAAK,OAAyB;AAAA,EACrD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,qBAAqB;AAAA,MACrB,mBAAmB;AAAA,MACnB,iBAAiB;AAAA,MACjB,iBAAiB;AAAA,MACjB,sBAAsB;AAAA,MACtB,SAAS;AAAA,MACT,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,SAAS;A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BAAO;AAAA,YACT;AAEA,kBAAM,EAAE,IAAI,OAAO,IAAI,KAAK;AAK5B,kBAAM,WAAW,OAAO,KAAK,KAAK,QAAQ,UAAU,IAAI,CAAC;AAIzD,eAAG,qBAAqB,KAAK,KAAK,OAAO,EAAE,SAAS,GAAG,QAAQ,CAAC;AAEhE,gBAAI,GAAG,UAAU,MAAM,OAAO,SAAS,KAAK,MAAM;AAEhD,iBAAG;AAAA,gBACD,cAAc,KAAK,GAAG,IAAI,QAAQ,KAAK,IAAI,GAAG,GAAG,UAAU,OAAO,CAAC,CAAC,CAAC;AAAA,cACvE;AAAA,YACF;AAKA,eAAG,QAAQ,SAAS,IAAI;AAExB,iBAAK,SAAS,EAAE;AAEhB,mBAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;AC5dD,IAAO,gBAAQ;","names":["_a"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/package.json deleted file mode 100644 index f282275..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "@tiptap/extension-code-block", - "version": "3.26.0", - "description": "code block extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-code-block" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0", - "@tiptap/pm": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0", - "@tiptap/pm": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/src/code-block.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/src/code-block.ts deleted file mode 100644 index 63ebaa2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/src/code-block.ts +++ /dev/null @@ -1,481 +0,0 @@ -import { mergeAttributes, Node, textblockTypeInputRule } from '@tiptap/core' -import { Plugin, PluginKey, Selection, TextSelection } from '@tiptap/pm/state' - -const DEFAULT_TAB_SIZE = 4 - -export interface CodeBlockOptions { - /** - * Adds a prefix to language classes that are applied to code tags. - * @default 'language-' - */ - languageClassPrefix: string | null | undefined - /** - * Define whether the node should be exited on triple enter. - * @default true - */ - exitOnTripleEnter: boolean | null | undefined - /** - * Define whether the node should be exited on arrow down if there is no node after it. - * @default true - */ - exitOnArrowDown: boolean | null | undefined - /** - * The default language. - * @default null - * @example 'js' - */ - defaultLanguage: string | null | undefined - /** - * Enable tab key for indentation in code blocks. - * @default false - */ - enableTabIndentation: boolean | null | undefined - /** - * The number of spaces to use for tab indentation. - * @default 4 - */ - tabSize: number | null | undefined - /** - * Custom HTML attributes that should be added to the rendered HTML tag. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record -} - -declare module '@tiptap/core' { - interface Commands { - codeBlock: { - /** - * Set a code block - * @param attributes Code block attributes - * @example editor.commands.setCodeBlock({ language: 'javascript' }) - */ - setCodeBlock: (attributes?: { language: string }) => ReturnType - /** - * Toggle a code block - * @param attributes Code block attributes - * @example editor.commands.toggleCodeBlock({ language: 'javascript' }) - */ - toggleCodeBlock: (attributes?: { language: string }) => ReturnType - } - } -} - -/** - * Matches a code block with backticks. - */ -export const backtickInputRegex = /^```([a-z]+)?[\s\n]$/ - -/** - * Matches a code block with tildes. - */ -export const tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/ - -/** - * This extension allows you to create code blocks. - * @see https://tiptap.dev/api/nodes/code-block - */ -export const CodeBlock = Node.create({ - name: 'codeBlock', - - addOptions() { - return { - languageClassPrefix: 'language-', - exitOnTripleEnter: true, - exitOnArrowDown: true, - defaultLanguage: null, - enableTabIndentation: false, - tabSize: DEFAULT_TAB_SIZE, - HTMLAttributes: {}, - } - }, - - content: 'text*', - - marks: '', - - group: 'block', - - code: true, - - defining: true, - - addAttributes() { - return { - language: { - default: this.options.defaultLanguage, - parseHTML: element => { - const { languageClassPrefix } = this.options - - if (!languageClassPrefix) { - return null - } - - const classNames = [...(element.firstElementChild?.classList || [])] - const languages = classNames - .filter(className => className.startsWith(languageClassPrefix)) - .map(className => className.replace(languageClassPrefix, '')) - const language = languages[0] - - if (!language) { - return null - } - - return language - }, - rendered: false, - }, - } - }, - - parseHTML() { - return [ - { - tag: 'pre', - preserveWhitespace: 'full', - }, - ] - }, - - renderHTML({ node, HTMLAttributes }) { - return [ - 'pre', - mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), - [ - 'code', - { - class: node.attrs.language - ? this.options.languageClassPrefix + node.attrs.language - : null, - }, - 0, - ], - ] - }, - - markdownTokenName: 'code', - - parseMarkdown: (token, helpers) => { - if ( - token.raw?.startsWith('```') === false && - token.raw?.startsWith('~~~') === false && - token.codeBlockStyle !== 'indented' - ) { - return [] - } - - return helpers.createNode( - 'codeBlock', - { language: token.lang || null }, - token.text ? [helpers.createTextNode(token.text)] : [], - ) - }, - - renderMarkdown: (node, h) => { - let output = '' - const language = node.attrs?.language || '' - - if (!node.content) { - output = `\`\`\`${language}\n\n\`\`\`` - } else { - const lines = [`\`\`\`${language}`, h.renderChildren(node.content), '```'] - output = lines.join('\n') - } - - return output - }, - - addCommands() { - return { - setCodeBlock: - attributes => - ({ commands }) => { - return commands.setNode(this.name, attributes) - }, - toggleCodeBlock: - attributes => - ({ commands }) => { - return commands.toggleNode(this.name, 'paragraph', attributes) - }, - } - }, - - addKeyboardShortcuts() { - return { - 'Mod-Alt-c': () => this.editor.commands.toggleCodeBlock(), - - // remove code block when at start of document or code block is empty - Backspace: () => { - const { empty, $anchor } = this.editor.state.selection - const isAtStart = $anchor.pos === 1 - - if (!empty || $anchor.parent.type.name !== this.name) { - return false - } - - if (isAtStart || !$anchor.parent.textContent.length) { - return this.editor.commands.clearNodes() - } - - return false - }, - - // handle tab indentation - Tab: ({ editor }) => { - if (!this.options.enableTabIndentation) { - return false - } - - const tabSize = this.options.tabSize ?? DEFAULT_TAB_SIZE - const { state } = editor - const { selection } = state - const { $from, empty } = selection - - if ($from.parent.type !== this.type) { - return false - } - - const indent = ' '.repeat(tabSize) - - if (empty) { - return editor.commands.insertContent(indent) - } - - return editor.commands.command(({ tr }) => { - const { from, to } = selection - const text = state.doc.textBetween(from, to, '\n', '\n') - const lines = text.split('\n') - const indentedText = lines.map(line => indent + line).join('\n') - - tr.replaceWith(from, to, state.schema.text(indentedText)) - return true - }) - }, - - // handle shift+tab reverse indentation - 'Shift-Tab': ({ editor }) => { - if (!this.options.enableTabIndentation) { - return false - } - - const tabSize = this.options.tabSize ?? DEFAULT_TAB_SIZE - const { state } = editor - const { selection } = state - const { $from, empty } = selection - - if ($from.parent.type !== this.type) { - return false - } - - if (empty) { - return editor.commands.command(({ tr }) => { - const { pos } = $from - const codeBlockStart = $from.start() - const codeBlockEnd = $from.end() - - const allText = state.doc.textBetween(codeBlockStart, codeBlockEnd, '\n', '\n') - const lines = allText.split('\n') - - let currentLineIndex = 0 - let charCount = 0 - const relativeCursorPos = pos - codeBlockStart - - for (let i = 0; i < lines.length; i += 1) { - if (charCount + lines[i].length >= relativeCursorPos) { - currentLineIndex = i - break - } - charCount += lines[i].length + 1 - } - - const currentLine = lines[currentLineIndex] - const leadingSpaces = currentLine.match(/^ */)?.[0] || '' - const spacesToRemove = Math.min(leadingSpaces.length, tabSize) - - if (spacesToRemove === 0) { - return true - } - - let lineStartPos = codeBlockStart - for (let i = 0; i < currentLineIndex; i += 1) { - lineStartPos += lines[i].length + 1 - } - - tr.delete(lineStartPos, lineStartPos + spacesToRemove) - - const cursorPosInLine = pos - lineStartPos - if (cursorPosInLine <= spacesToRemove) { - tr.setSelection(TextSelection.create(tr.doc, lineStartPos)) - } - - return true - }) - } - - return editor.commands.command(({ tr }) => { - const { from, to } = selection - const text = state.doc.textBetween(from, to, '\n', '\n') - const lines = text.split('\n') - const reverseIndentText = lines - .map(line => { - const leadingSpaces = line.match(/^ */)?.[0] || '' - const spacesToRemove = Math.min(leadingSpaces.length, tabSize) - return line.slice(spacesToRemove) - }) - .join('\n') - - tr.replaceWith(from, to, state.schema.text(reverseIndentText)) - return true - }) - }, - - // exit node on triple enter - Enter: ({ editor }) => { - if (!this.options.exitOnTripleEnter) { - return false - } - - const { state } = editor - const { selection } = state - const { $from, empty } = selection - - if (!empty || $from.parent.type !== this.type) { - return false - } - - const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2 - const endsWithDoubleNewline = $from.parent.textContent.endsWith('\n\n') - - if (!isAtEnd || !endsWithDoubleNewline) { - return false - } - - return editor - .chain() - .command(({ tr }) => { - tr.delete($from.pos - 2, $from.pos) - - return true - }) - .exitCode() - .run() - }, - - // exit node on arrow down - ArrowDown: ({ editor }) => { - if (!this.options.exitOnArrowDown) { - return false - } - - const { state } = editor - const { selection, doc } = state - const { $from, empty } = selection - - if (!empty || $from.parent.type !== this.type) { - return false - } - - const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2 - - if (!isAtEnd) { - return false - } - - const after = $from.after() - - if (after === undefined) { - return false - } - - const nodeAfter = doc.nodeAt(after) - - if (nodeAfter) { - return editor.commands.command(({ tr }) => { - tr.setSelection(Selection.near(doc.resolve(after))) - return true - }) - } - - return editor.commands.exitCode() - }, - } - }, - - addInputRules() { - return [ - textblockTypeInputRule({ - find: backtickInputRegex, - type: this.type, - getAttributes: match => ({ - language: match[1], - }), - }), - textblockTypeInputRule({ - find: tildeInputRegex, - type: this.type, - getAttributes: match => ({ - language: match[1], - }), - }), - ] - }, - - addProseMirrorPlugins() { - return [ - // this plugin creates a code block for pasted content from VS Code - // we can also detect the copied code language - new Plugin({ - key: new PluginKey('codeBlockVSCodeHandler'), - props: { - handlePaste: (view, event) => { - if (!event.clipboardData) { - return false - } - - // don’t create a new code block within code blocks - if (this.editor.isActive(this.type.name)) { - return false - } - - const text = event.clipboardData.getData('text/plain') - const vscode = event.clipboardData.getData('vscode-editor-data') - const vscodeData = vscode ? JSON.parse(vscode) : undefined - const language = vscodeData?.mode - - if (!text || !language) { - return false - } - - const { tr, schema } = view.state - - // prepare a text node - // strip carriage return chars from text pasted as code - // see: https://github.com/ProseMirror/prosemirror-view/commit/a50a6bcceb4ce52ac8fcc6162488d8875613aacd - const textNode = schema.text(text.replace(/\r\n?/g, '\n')) - - // create a code block with the text node - // replace selection with the code block - tr.replaceSelectionWith(this.type.create({ language }, textNode)) - - if (tr.selection.$from.parent.type !== this.type) { - // put cursor inside the newly created code block - tr.setSelection( - TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))), - ) - } - - // store meta information - // this is useful for other plugins that depends on the paste event - // like the paste rule plugin - tr.setMeta('paste', true) - - view.dispatch(tr) - - return true - }, - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/src/index.ts deleted file mode 100644 index 13af760..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { CodeBlock } from './code-block.js' - -export * from './code-block.js' - -export default CodeBlock diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm deleted file mode 120000 index f877560..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+pm@3.26.0/node_modules/@tiptap/pm \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/README.md deleted file mode 100644 index 9c87ec4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-code - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-code.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-code) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-code.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-code.svg)](https://www.npmjs.com/package/@tiptap/extension-code) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.cjs deleted file mode 100644 index e0a8f90..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.cjs +++ /dev/null @@ -1,138 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Code: () => Code, - default: () => index_default, - inputRegex: () => inputRegex, - inputRegexMatch: () => inputRegexMatch, - pasteRegex: () => pasteRegex, - pasteRegexMatch: () => pasteRegexMatch -}); -module.exports = __toCommonJS(index_exports); - -// src/code.ts -var import_core = require("@tiptap/core"); -var inputRegex = /(^|[^`])`([^`]+)`(?!`)$/; -var pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g; -var inputRegexMatch = (text) => { - const match = /`([^`]+)`(?!`)$/.exec(text); - if (!match) { - return null; - } - if (match.index > 0 && text[match.index - 1] === "`") { - return null; - } - return { - index: match.index, - text: match[0], - replaceWith: match[1] - }; -}; -var pasteRegexMatch = (text) => { - const regex = /`([^`]+)`(?!`)/g; - const matches = []; - let match; - while ((match = regex.exec(text)) !== null) { - if (match.index > 0 && text[match.index - 1] === "`") { - continue; - } - matches.push({ - index: match.index, - text: match[0], - replaceWith: match[1] - }); - } - return matches; -}; -var Code = import_core.Mark.create({ - name: "code", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - excludes: "_", - code: true, - exitable: true, - parseHTML() { - return [{ tag: "code" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["code", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "codespan", - parseMarkdown: (token, helpers) => { - return helpers.applyMark("code", [{ type: "text", text: token.text || "" }]); - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return `\`${h.renderChildren(node.content)}\``; - }, - addCommands() { - return { - setCode: () => ({ commands }) => { - return commands.setMark(this.name); - }, - toggleCode: () => ({ commands }) => { - return commands.toggleMark(this.name); - }, - unsetCode: () => ({ commands }) => { - return commands.unsetMark(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-e": () => this.editor.commands.toggleCode() - }; - }, - addInputRules() { - return [ - (0, import_core.markInputRule)({ - find: inputRegexMatch, - type: this.type - }) - ]; - }, - addPasteRules() { - return [ - (0, import_core.markPasteRule)({ - find: pasteRegexMatch, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = Code; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Code, - inputRegex, - inputRegexMatch, - pasteRegex, - pasteRegexMatch -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.cjs.map deleted file mode 100644 index 1e11e23..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/code.ts"],"sourcesContent":["import { Code } from './code.js'\n\nexport * from './code.js'\n\nexport default Code\n","import type { InputRuleMatch, PasteRuleMatch } from '@tiptap/core'\nimport { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core'\n\nexport interface CodeOptions {\n /**\n * The HTML attributes applied to the code element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n code: {\n /**\n * Set a code mark\n */\n setCode: () => ReturnType\n /**\n * Toggle inline code\n */\n toggleCode: () => ReturnType\n /**\n * Unset a code mark\n */\n unsetCode: () => ReturnType\n }\n }\n}\n\n/**\n * The regular expression used for the inline code input rule.\n * @deprecated The extension now uses a function-based finder internally.\n * This regex is kept for backward compatibility.\n */\nexport const inputRegex = /(^|[^`])`([^`]+)`(?!`)$/\n\n/**\n * The regular expression used for the inline code paste rule.\n * @deprecated The extension now uses a function-based finder internally.\n * This regex is kept for backward compatibility.\n */\nexport const pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g\n\n/**\n * A function-based finder for the inline code input rule.\n * Used internally by the extension to ensure the preceding character\n * is not consumed as part of the match, preventing it from being deleted.\n */\nexport const inputRegexMatch = (text: string): InputRuleMatch | null => {\n const match = /`([^`]+)`(?!`)$/.exec(text)\n\n if (!match) {\n return null\n }\n\n // Ensure the opening backtick isn't preceded by another backtick\n if (match.index > 0 && text[match.index - 1] === '`') {\n return null\n }\n\n return {\n index: match.index,\n text: match[0],\n replaceWith: match[1],\n }\n}\n\n/**\n * A function-based finder for the inline code paste rule.\n * Used internally by the extension to avoid consuming the preceding\n * character as part of the match.\n */\nexport const pasteRegexMatch = (text: string): PasteRuleMatch[] => {\n const regex = /`([^`]+)`(?!`)/g\n const matches: PasteRuleMatch[] = []\n let match: RegExpExecArray | null\n\n while ((match = regex.exec(text)) !== null) {\n // Ensure the opening backtick isn't preceded by another backtick\n if (match.index > 0 && text[match.index - 1] === '`') {\n continue\n }\n\n matches.push({\n index: match.index,\n text: match[0],\n replaceWith: match[1],\n })\n }\n\n return matches\n}\n\n/**\n * This extension allows you to mark text as inline code.\n * @see https://tiptap.dev/api/marks/code\n */\nexport const Code = Mark.create({\n name: 'code',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n excludes: '_',\n\n code: true,\n\n exitable: true,\n\n parseHTML() {\n return [{ tag: 'code' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['code', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'codespan',\n\n parseMarkdown: (token, helpers) => {\n // Convert 'codespan' token to code mark\n // For codespan tokens, we use the raw text content, not tokens\n return helpers.applyMark('code', [{ type: 'text', text: token.text || '' }])\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return `\\`${h.renderChildren(node.content)}\\``\n },\n\n addCommands() {\n return {\n setCode:\n () =>\n ({ commands }) => {\n return commands.setMark(this.name)\n },\n toggleCode:\n () =>\n ({ commands }) => {\n return commands.toggleMark(this.name)\n },\n unsetCode:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-e': () => this.editor.commands.toggleCode(),\n }\n },\n\n addInputRules() {\n return [\n markInputRule({\n find: inputRegexMatch,\n type: this.type,\n }),\n ]\n },\n\n addPasteRules() {\n return [\n markPasteRule({\n find: pasteRegexMatch,\n type: this.type,\n }),\n ]\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,kBAAoE;AAmC7D,IAAM,aAAa;AAOnB,IAAM,aAAa;AAOnB,IAAM,kBAAkB,CAAC,SAAwC;AACtE,QAAM,QAAQ,kBAAkB,KAAK,IAAI;AAEzC,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AAGA,MAAI,MAAM,QAAQ,KAAK,KAAK,MAAM,QAAQ,CAAC,MAAM,KAAK;AACpD,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL,OAAO,MAAM;AAAA,IACb,MAAM,MAA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AAI;AAAA,MACnC;AAAA,MACF,YACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,WAAW,KAAK,IAAI;AAAA,MACtC;AAAA,MACF,WACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,UAAU,KAAK,IAAI;AAAA,MACrC;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,SAAS,MAAM,KAAK,OAAO,SAAS,WAAW;AAAA,IACjD;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,UACL,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,UACL,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;ADjLD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.d.cts deleted file mode 100644 index 1dbe5c8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.d.cts +++ /dev/null @@ -1,59 +0,0 @@ -import { Mark, InputRuleMatch, PasteRuleMatch } from '@tiptap/core'; - -interface CodeOptions { - /** - * The HTML attributes applied to the code element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - code: { - /** - * Set a code mark - */ - setCode: () => ReturnType; - /** - * Toggle inline code - */ - toggleCode: () => ReturnType; - /** - * Unset a code mark - */ - unsetCode: () => ReturnType; - }; - } -} -/** - * The regular expression used for the inline code input rule. - * @deprecated The extension now uses a function-based finder internally. - * This regex is kept for backward compatibility. - */ -declare const inputRegex: RegExp; -/** - * The regular expression used for the inline code paste rule. - * @deprecated The extension now uses a function-based finder internally. - * This regex is kept for backward compatibility. - */ -declare const pasteRegex: RegExp; -/** - * A function-based finder for the inline code input rule. - * Used internally by the extension to ensure the preceding character - * is not consumed as part of the match, preventing it from being deleted. - */ -declare const inputRegexMatch: (text: string) => InputRuleMatch | null; -/** - * A function-based finder for the inline code paste rule. - * Used internally by the extension to avoid consuming the preceding - * character as part of the match. - */ -declare const pasteRegexMatch: (text: string) => PasteRuleMatch[]; -/** - * This extension allows you to mark text as inline code. - * @see https://tiptap.dev/api/marks/code - */ -declare const Code: Mark; - -export { Code, type CodeOptions, Code as default, inputRegex, inputRegexMatch, pasteRegex, pasteRegexMatch }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.d.ts deleted file mode 100644 index 1dbe5c8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Mark, InputRuleMatch, PasteRuleMatch } from '@tiptap/core'; - -interface CodeOptions { - /** - * The HTML attributes applied to the code element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - code: { - /** - * Set a code mark - */ - setCode: () => ReturnType; - /** - * Toggle inline code - */ - toggleCode: () => ReturnType; - /** - * Unset a code mark - */ - unsetCode: () => ReturnType; - }; - } -} -/** - * The regular expression used for the inline code input rule. - * @deprecated The extension now uses a function-based finder internally. - * This regex is kept for backward compatibility. - */ -declare const inputRegex: RegExp; -/** - * The regular expression used for the inline code paste rule. - * @deprecated The extension now uses a function-based finder internally. - * This regex is kept for backward compatibility. - */ -declare const pasteRegex: RegExp; -/** - * A function-based finder for the inline code input rule. - * Used internally by the extension to ensure the preceding character - * is not consumed as part of the match, preventing it from being deleted. - */ -declare const inputRegexMatch: (text: string) => InputRuleMatch | null; -/** - * A function-based finder for the inline code paste rule. - * Used internally by the extension to avoid consuming the preceding - * character as part of the match. - */ -declare const pasteRegexMatch: (text: string) => PasteRuleMatch[]; -/** - * This extension allows you to mark text as inline code. - * @see https://tiptap.dev/api/marks/code - */ -declare const Code: Mark; - -export { Code, type CodeOptions, Code as default, inputRegex, inputRegexMatch, pasteRegex, pasteRegexMatch }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.js deleted file mode 100644 index d6b08cd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.js +++ /dev/null @@ -1,107 +0,0 @@ -// src/code.ts -import { Mark, markInputRule, markPasteRule, mergeAttributes } from "@tiptap/core"; -var inputRegex = /(^|[^`])`([^`]+)`(?!`)$/; -var pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g; -var inputRegexMatch = (text) => { - const match = /`([^`]+)`(?!`)$/.exec(text); - if (!match) { - return null; - } - if (match.index > 0 && text[match.index - 1] === "`") { - return null; - } - return { - index: match.index, - text: match[0], - replaceWith: match[1] - }; -}; -var pasteRegexMatch = (text) => { - const regex = /`([^`]+)`(?!`)/g; - const matches = []; - let match; - while ((match = regex.exec(text)) !== null) { - if (match.index > 0 && text[match.index - 1] === "`") { - continue; - } - matches.push({ - index: match.index, - text: match[0], - replaceWith: match[1] - }); - } - return matches; -}; -var Code = Mark.create({ - name: "code", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - excludes: "_", - code: true, - exitable: true, - parseHTML() { - return [{ tag: "code" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["code", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "codespan", - parseMarkdown: (token, helpers) => { - return helpers.applyMark("code", [{ type: "text", text: token.text || "" }]); - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return `\`${h.renderChildren(node.content)}\``; - }, - addCommands() { - return { - setCode: () => ({ commands }) => { - return commands.setMark(this.name); - }, - toggleCode: () => ({ commands }) => { - return commands.toggleMark(this.name); - }, - unsetCode: () => ({ commands }) => { - return commands.unsetMark(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-e": () => this.editor.commands.toggleCode() - }; - }, - addInputRules() { - return [ - markInputRule({ - find: inputRegexMatch, - type: this.type - }) - ]; - }, - addPasteRules() { - return [ - markPasteRule({ - find: pasteRegexMatch, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = Code; -export { - Code, - index_default as default, - inputRegex, - inputRegexMatch, - pasteRegex, - pasteRegexMatch -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.js.map deleted file mode 100644 index 987d953..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/code.ts","../src/index.ts"],"sourcesContent":["import type { InputRuleMatch, PasteRuleMatch } from '@tiptap/core'\nimport { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core'\n\nexport interface CodeOptions {\n /**\n * The HTML attributes applied to the code element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n code: {\n /**\n * Set a code mark\n */\n setCode: () => ReturnType\n /**\n * Toggle inline code\n */\n toggleCode: () => ReturnType\n /**\n * Unset a code mark\n */\n unsetCode: () => ReturnType\n }\n }\n}\n\n/**\n * The regular expression used for the inline code input rule.\n * @deprecated The extension now uses a function-based finder internally.\n * This regex is kept for backward compatibility.\n */\nexport const inputRegex = /(^|[^`])`([^`]+)`(?!`)$/\n\n/**\n * The regular expression used for the inline code paste rule.\n * @deprecated The extension now uses a function-based finder internally.\n * This regex is kept for backward compatibility.\n */\nexport const pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g\n\n/**\n * A function-based finder for the inline code input rule.\n * Used internally by the extension to ensure the preceding character\n * is not consumed as part of the match, preventing it from being deleted.\n */\nexport const inputRegexMatch = (text: string): InputRuleMatch | null => {\n const match = /`([^`]+)`(?!`)$/.exec(text)\n\n if (!match) {\n return null\n }\n\n // Ensure the opening backtick isn't preceded by another backtick\n if (match.index > 0 && text[match.index - 1] === '`') {\n return null\n }\n\n return {\n index: match.index,\n text: match[0],\n replaceWith: match[1],\n }\n}\n\n/**\n * A function-based finder for the inline code paste rule.\n * Used internally by the extension to avoid consuming the preceding\n * character as part of the match.\n */\nexport const pasteRegexMatch = (text: string): PasteRuleMatch[] => {\n const regex = /`([^`]+)`(?!`)/g\n const matches: PasteRuleMatch[] = []\n let match: RegExpExecArray | null\n\n while ((match = regex.exec(text)) !== null) {\n // Ensure the opening backtick isn't preceded by another backtick\n if (match.index > 0 && text[match.index - 1] === '`') {\n continue\n }\n\n matches.push({\n index: match.index,\n text: match[0],\n replaceWith: match[1],\n })\n }\n\n return matches\n}\n\n/**\n * This extension allows you to mark text as inline code.\n * @see https://tiptap.dev/api/marks/code\n */\nexport const Code = Mark.create({\n name: 'code',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n excludes: '_',\n\n code: true,\n\n exitable: true,\n\n parseHTML() {\n return [{ tag: 'code' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['code', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'codespan',\n\n parseMarkdown: (token, helpers) => {\n // Convert 'codespan' token to code mark\n // For codespan tokens, we use the raw text content, not tokens\n return helpers.applyMark('code', [{ type: 'text', text: token.text || '' }])\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return `\\`${h.renderChildren(node.content)}\\``\n },\n\n addCommands() {\n return {\n setCode:\n () =>\n ({ commands }) => {\n return commands.setMark(this.name)\n },\n toggleCode:\n () =>\n ({ commands }) => {\n return commands.toggleMark(this.name)\n },\n unsetCode:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-e': () => this.editor.commands.toggleCode(),\n }\n },\n\n addInputRules() {\n return [\n markInputRule({\n find: inputRegexMatch,\n type: this.type,\n }),\n ]\n },\n\n addPasteRules() {\n return [\n markPasteRule({\n find: pasteRegexMatch,\n type: this.type,\n }),\n ]\n },\n})\n","import { Code } from './code.js'\n\nexport * from './code.js'\n\nexport default Code\n"],"mappings":";AACA,SAAS,MAAM,eAAe,eAAe,uBAAuB;AAmC7D,IAAM,aAAa;AAOnB,IAAM,aAAa;AAOnB,IAAM,kBAAkB,CAAC,SAAwC;AACtE,QAAM,QAAQ,kBAAkB,KAAK,IA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AAS;AACjB,aAAO;AAAA,IACT;AAEA,WAAO,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC;AAAA,EAC5C;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,SACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,QAAQ,KAAK,IAAI;AAAA,MACnC;AAAA,MACF,YACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,WAAW,KAAK,IAAI;AAAA,MACtC;AAAA,MACF,WACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,UAAU,KAAK,IAAI;AAAA,MACrC;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,SAAS,MAAM,KAAK,OAAO,SAAS,WAAW;AAAA,IACjD;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,MACL,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,MACL,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;ACjLD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/package.json deleted file mode 100644 index 2bc034a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-code", - "version": "3.26.0", - "description": "code extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-code" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/src/code.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/src/code.ts deleted file mode 100644 index 1f317bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/src/code.ts +++ /dev/null @@ -1,182 +0,0 @@ -import type { InputRuleMatch, PasteRuleMatch } from '@tiptap/core' -import { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core' - -export interface CodeOptions { - /** - * The HTML attributes applied to the code element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record -} - -declare module '@tiptap/core' { - interface Commands { - code: { - /** - * Set a code mark - */ - setCode: () => ReturnType - /** - * Toggle inline code - */ - toggleCode: () => ReturnType - /** - * Unset a code mark - */ - unsetCode: () => ReturnType - } - } -} - -/** - * The regular expression used for the inline code input rule. - * @deprecated The extension now uses a function-based finder internally. - * This regex is kept for backward compatibility. - */ -export const inputRegex = /(^|[^`])`([^`]+)`(?!`)$/ - -/** - * The regular expression used for the inline code paste rule. - * @deprecated The extension now uses a function-based finder internally. - * This regex is kept for backward compatibility. - */ -export const pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g - -/** - * A function-based finder for the inline code input rule. - * Used internally by the extension to ensure the preceding character - * is not consumed as part of the match, preventing it from being deleted. - */ -export const inputRegexMatch = (text: string): InputRuleMatch | null => { - const match = /`([^`]+)`(?!`)$/.exec(text) - - if (!match) { - return null - } - - // Ensure the opening backtick isn't preceded by another backtick - if (match.index > 0 && text[match.index - 1] === '`') { - return null - } - - return { - index: match.index, - text: match[0], - replaceWith: match[1], - } -} - -/** - * A function-based finder for the inline code paste rule. - * Used internally by the extension to avoid consuming the preceding - * character as part of the match. - */ -export const pasteRegexMatch = (text: string): PasteRuleMatch[] => { - const regex = /`([^`]+)`(?!`)/g - const matches: PasteRuleMatch[] = [] - let match: RegExpExecArray | null - - while ((match = regex.exec(text)) !== null) { - // Ensure the opening backtick isn't preceded by another backtick - if (match.index > 0 && text[match.index - 1] === '`') { - continue - } - - matches.push({ - index: match.index, - text: match[0], - replaceWith: match[1], - }) - } - - return matches -} - -/** - * This extension allows you to mark text as inline code. - * @see https://tiptap.dev/api/marks/code - */ -export const Code = Mark.create({ - name: 'code', - - addOptions() { - return { - HTMLAttributes: {}, - } - }, - - excludes: '_', - - code: true, - - exitable: true, - - parseHTML() { - return [{ tag: 'code' }] - }, - - renderHTML({ HTMLAttributes }) { - return ['code', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] - }, - - markdownTokenName: 'codespan', - - parseMarkdown: (token, helpers) => { - // Convert 'codespan' token to code mark - // For codespan tokens, we use the raw text content, not tokens - return helpers.applyMark('code', [{ type: 'text', text: token.text || '' }]) - }, - - renderMarkdown: (node, h) => { - if (!node.content) { - return '' - } - - return `\`${h.renderChildren(node.content)}\`` - }, - - addCommands() { - return { - setCode: - () => - ({ commands }) => { - return commands.setMark(this.name) - }, - toggleCode: - () => - ({ commands }) => { - return commands.toggleMark(this.name) - }, - unsetCode: - () => - ({ commands }) => { - return commands.unsetMark(this.name) - }, - } - }, - - addKeyboardShortcuts() { - return { - 'Mod-e': () => this.editor.commands.toggleCode(), - } - }, - - addInputRules() { - return [ - markInputRule({ - find: inputRegexMatch, - type: this.type, - }), - ] - }, - - addPasteRules() { - return [ - markPasteRule({ - find: pasteRegexMatch, - type: this.type, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/src/index.ts deleted file mode 100644 index fb77ea3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Code } from './code.js' - -export * from './code.js' - -export default Code diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/README.md deleted file mode 100644 index 9820349..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-document - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-document.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-document) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-document.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-document.svg)](https://www.npmjs.com/package/@tiptap/extension-document) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.cjs deleted file mode 100644 index ebfd8cd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.cjs +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Document: () => Document, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); - -// src/document.ts -var import_core = require("@tiptap/core"); -var Document = import_core.Node.create({ - name: "doc", - topNode: true, - content: "block+", - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n\n"); - } -}); - -// src/index.ts -var index_default = Document; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Document -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.cjs.map deleted file mode 100644 index 9f88a83..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/document.ts"],"sourcesContent":["import { Document } from './document.js'\n\nexport * from './document.js'\n\nexport default Document\n","import { Node } from '@tiptap/core'\n\n/**\n * The default document node which represents the top level node of the editor.\n * @see https://tiptap.dev/api/nodes/document\n */\nexport const Document = Node.create({\n name: 'doc',\n topNode: true,\n content: 'block+',\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n\\n')\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAqB;AAMd,IAAM,WAAW,iBAAK,OAAO;AAAA,EAClC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EAET,gBAAgB,CAAC,MAAM,MAAM;AAC3B,QAAI,CAAC,KAAK,SAAS;AACjB,aAAO;AAAA,IACT;AAEA,WAAO,EAAE,eAAe,KAAK,SAAS,MAAM;AAAA,EAC9C;AACF,CAAC;;;ADdD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.d.cts deleted file mode 100644 index b442ad6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.d.cts +++ /dev/null @@ -1,9 +0,0 @@ -import { Node } from '@tiptap/core'; - -/** - * The default document node which represents the top level node of the editor. - * @see https://tiptap.dev/api/nodes/document - */ -declare const Document: Node; - -export { Document, Document as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.d.ts deleted file mode 100644 index b442ad6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Node } from '@tiptap/core'; - -/** - * The default document node which represents the top level node of the editor. - * @see https://tiptap.dev/api/nodes/document - */ -declare const Document: Node; - -export { Document, Document as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.js deleted file mode 100644 index a3f1f95..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.js +++ /dev/null @@ -1,21 +0,0 @@ -// src/document.ts -import { Node } from "@tiptap/core"; -var Document = Node.create({ - name: "doc", - topNode: true, - content: "block+", - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n\n"); - } -}); - -// src/index.ts -var index_default = Document; -export { - Document, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.js.map deleted file mode 100644 index 921eae8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/document.ts","../src/index.ts"],"sourcesContent":["import { Node } from '@tiptap/core'\n\n/**\n * The default document node which represents the top level node of the editor.\n * @see https://tiptap.dev/api/nodes/document\n */\nexport const Document = Node.create({\n name: 'doc',\n topNode: true,\n content: 'block+',\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n\\n')\n },\n})\n","import { Document } from './document.js'\n\nexport * from './document.js'\n\nexport default Document\n"],"mappings":";AAAA,SAAS,YAAY;AAMd,IAAM,WAAW,KAAK,OAAO;AAAA,EAClC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EAET,gBAAgB,CAAC,MAAM,MAAM;AAC3B,QAAI,CAAC,KAAK,SAAS;AACjB,aAAO;AAAA,IACT;AAEA,WAAO,EAAE,eAAe,KAAK,SAAS,MAAM;AAAA,EAC9C;AACF,CAAC;;;ACdD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/package.json deleted file mode 100644 index 1bfabb3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-document", - "version": "3.26.0", - "description": "document extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-document" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/src/document.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/src/document.ts deleted file mode 100644 index 945994a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/src/document.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Node } from '@tiptap/core' - -/** - * The default document node which represents the top level node of the editor. - * @see https://tiptap.dev/api/nodes/document - */ -export const Document = Node.create({ - name: 'doc', - topNode: true, - content: 'block+', - - renderMarkdown: (node, h) => { - if (!node.content) { - return '' - } - - return h.renderChildren(node.content, '\n\n') - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/src/index.ts deleted file mode 100644 index 3a62be7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Document } from './document.js' - -export * from './document.js' - -export default Document diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/README.md deleted file mode 100644 index 33b7217..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-dropcursor - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-dropcursor.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-dropcursor) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-dropcursor.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-dropcursor.svg)](https://www.npmjs.com/package/@tiptap/extension-dropcursor) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.cjs deleted file mode 100644 index a29a1ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.cjs +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Dropcursor: () => import_extensions2.Dropcursor, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); -var import_extensions = require("@tiptap/extensions"); -var import_extensions2 = require("@tiptap/extensions"); -var index_default = import_extensions.Dropcursor; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Dropcursor -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.cjs.map deleted file mode 100644 index 91d7ffd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { Dropcursor } from '@tiptap/extensions'\n\nexport type { DropcursorOptions } from '@tiptap/extensions'\nexport { Dropcursor } from '@tiptap/extensions'\n\nexport default Dropcursor\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA2B;AAG3B,IAAAA,qBAA2B;AAE3B,IAAO,gBAAQ;","names":["import_extensions"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.d.cts deleted file mode 100644 index 1fd8ca7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.d.cts +++ /dev/null @@ -1,2 +0,0 @@ -import { Dropcursor } from '@tiptap/extensions'; -export { Dropcursor, DropcursorOptions, Dropcursor as default } from '@tiptap/extensions'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.d.ts deleted file mode 100644 index 1fd8ca7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Dropcursor } from '@tiptap/extensions'; -export { Dropcursor, DropcursorOptions, Dropcursor as default } from '@tiptap/extensions'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.js deleted file mode 100644 index edca919..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// src/index.ts -import { Dropcursor } from "@tiptap/extensions"; -import { Dropcursor as Dropcursor2 } from "@tiptap/extensions"; -var index_default = Dropcursor; -export { - Dropcursor2 as Dropcursor, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.js.map deleted file mode 100644 index 33aaee2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { Dropcursor } from '@tiptap/extensions'\n\nexport type { DropcursorOptions } from '@tiptap/extensions'\nexport { Dropcursor } from '@tiptap/extensions'\n\nexport default Dropcursor\n"],"mappings":";AAAA,SAAS,kBAAkB;AAG3B,SAAS,cAAAA,mBAAkB;AAE3B,IAAO,gBAAQ;","names":["Dropcursor"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/package.json deleted file mode 100644 index 622d704..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-dropcursor", - "version": "3.26.0", - "description": "dropcursor extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages-deprecated/extension-dropcursor" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/extensions": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/extensions": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/src/index.ts deleted file mode 100644 index 79c6deb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Dropcursor } from '@tiptap/extensions' - -export type { DropcursorOptions } from '@tiptap/extensions' -export { Dropcursor } from '@tiptap/extensions' - -export default Dropcursor diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extensions b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extensions deleted file mode 120000 index fc01066..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extensions +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/README.md deleted file mode 100644 index e2ac1da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-gapcursor - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-gapcursor.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-gapcursor) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-gapcursor.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-gapcursor.svg)](https://www.npmjs.com/package/@tiptap/extension-gapcursor) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.cjs deleted file mode 100644 index cdfae80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.cjs +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Gapcursor: () => import_extensions2.Gapcursor, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); -var import_extensions = require("@tiptap/extensions"); -var import_extensions2 = require("@tiptap/extensions"); -var index_default = import_extensions.Gapcursor; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Gapcursor -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.cjs.map deleted file mode 100644 index 3243820..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { Gapcursor } from '@tiptap/extensions'\n\nexport { Gapcursor } from '@tiptap/extensions'\n\nexport default Gapcursor\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA0B;AAE1B,IAAAA,qBAA0B;AAE1B,IAAO,gBAAQ;","names":["import_extensions"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.d.cts deleted file mode 100644 index bada410..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.d.cts +++ /dev/null @@ -1,2 +0,0 @@ -import { Gapcursor } from '@tiptap/extensions'; -export { Gapcursor, Gapcursor as default } from '@tiptap/extensions'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.d.ts deleted file mode 100644 index bada410..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Gapcursor } from '@tiptap/extensions'; -export { Gapcursor, Gapcursor as default } from '@tiptap/extensions'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.js deleted file mode 100644 index 5f62ed8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// src/index.ts -import { Gapcursor } from "@tiptap/extensions"; -import { Gapcursor as Gapcursor2 } from "@tiptap/extensions"; -var index_default = Gapcursor; -export { - Gapcursor2 as Gapcursor, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.js.map deleted file mode 100644 index 2ec2876..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { Gapcursor } from '@tiptap/extensions'\n\nexport { Gapcursor } from '@tiptap/extensions'\n\nexport default Gapcursor\n"],"mappings":";AAAA,SAAS,iBAAiB;AAE1B,SAAS,aAAAA,kBAAiB;AAE1B,IAAO,gBAAQ;","names":["Gapcursor"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/package.json deleted file mode 100644 index 285f830..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-gapcursor", - "version": "3.26.0", - "description": "gapcursor extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages-deprecated/extension-gapcursor" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/extensions": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/extensions": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/src/index.ts deleted file mode 100644 index 18b5987..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Gapcursor } from '@tiptap/extensions' - -export { Gapcursor } from '@tiptap/extensions' - -export default Gapcursor diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extensions b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extensions deleted file mode 120000 index fc01066..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extensions +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/README.md deleted file mode 100644 index d7cc737..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-hard-break - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-hard-break.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-hard-break) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-hard-break.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-hard-break.svg)](https://www.npmjs.com/package/@tiptap/extension-hard-break) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.cjs deleted file mode 100644 index 2404eb2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.cjs +++ /dev/null @@ -1,100 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - HardBreak: () => HardBreak, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); - -// src/hard-break.ts -var import_core = require("@tiptap/core"); -var HardBreak = import_core.Node.create({ - name: "hardBreak", - markdownTokenName: "br", - addOptions() { - return { - keepMarks: true, - HTMLAttributes: {} - }; - }, - inline: true, - group: "inline", - selectable: false, - linebreakReplacement: true, - parseHTML() { - return [{ tag: "br" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["br", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes)]; - }, - renderText() { - return "\n"; - }, - renderMarkdown: () => ` -`, - parseMarkdown: () => { - return { - type: "hardBreak" - }; - }, - addCommands() { - return { - setHardBreak: () => ({ commands, chain, state, editor }) => { - return commands.first([ - () => commands.exitCode(), - () => commands.command(() => { - const { selection, storedMarks } = state; - if (selection.$from.parent.type.spec.isolating) { - return false; - } - const { keepMarks } = this.options; - const { splittableMarks } = editor.extensionManager; - const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks(); - return chain().insertContent({ type: this.name }).command(({ tr, dispatch }) => { - if (dispatch && marks && keepMarks) { - const filteredMarks = marks.filter( - (mark) => splittableMarks.includes(mark.type.name) - ); - tr.ensureMarks(filteredMarks); - } - return true; - }).run(); - }) - ]); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Enter": () => this.editor.commands.setHardBreak(), - "Shift-Enter": () => this.editor.commands.setHardBreak() - }; - } -}); - -// src/index.ts -var index_default = HardBreak; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - HardBreak -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.cjs.map deleted file mode 100644 index da737d8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/hard-break.ts"],"sourcesContent":["import { HardBreak } from './hard-break.js'\n\nexport * from './hard-break.js'\n\nexport default HardBreak\n","import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface HardBreakOptions {\n /**\n * Controls if marks should be kept after being split by a hard break.\n * @default true\n * @example false\n */\n keepMarks: boolean\n\n /**\n * HTML attributes to add to the hard break element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n hardBreak: {\n /**\n * Add a hard break\n * @example editor.commands.setHardBreak()\n */\n setHardBreak: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to insert hard breaks.\n * @see https://www.tiptap.dev/api/nodes/hard-break\n */\nexport const HardBreak = Node.create({\n name: 'hardBreak',\n\n markdownTokenName: 'br',\n\n addOptions() {\n return {\n keepMarks: true,\n HTMLAttributes: {},\n }\n },\n\n inline: true,\n\n group: 'inline',\n\n selectable: false,\n\n linebreakReplacement: true,\n\n parseHTML() {\n return [{ tag: 'br' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['br', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)]\n },\n\n renderText() {\n return '\\n'\n },\n\n renderMarkdown: () => ` \\n`,\n\n parseMarkdown: () => {\n return {\n type: 'hardBreak',\n }\n },\n\n addCommands() {\n return {\n setHardBreak:\n () =>\n ({ commands, chain, state, editor }) => {\n return commands.first([\n () => commands.exitCode(),\n () =>\n commands.command(() => {\n const { selection, storedMarks } = state\n\n if (selection.$from.parent.type.spec.isolating) {\n return false\n }\n\n const { keepMarks } = this.options\n const { splittableMarks } = editor.extensionManager\n const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks())\n\n return chain()\n .insertContent({ type: this.name })\n .command(({ tr, dispatch }) => {\n if (dispatch && marks && keepMarks) {\n const filteredMarks = marks.filter(mark =>\n splittableMarks.includes(mark.type.name),\n )\n\n tr.ensureMarks(filteredMarks)\n }\n\n return true\n })\n .run()\n }),\n ])\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Enter': () => this.editor.commands.setHardBreak(),\n 'Shift-Enter': () => this.editor.commands.setHardBreak(),\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA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,SAAS,KAAK,KAAK,IAAI;AAAA,gBACzC;AAEA,mBAAG,YAAY,aAAa;AAAA,cAC9B;AAEA,qBAAO;AAAA,YACT,CAAC,EACA,IAAI;AAAA,UACT,CAAC;AAAA,QACL,CAAC;AAAA,MACH;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,aAAa,MAAM,KAAK,OAAO,SAAS,aAAa;AAAA,MACrD,eAAe,MAAM,KAAK,OAAO,SAAS,aAAa;AAAA,IACzD;AAAA,EACF;AACF,CAAC;;;ADnHD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.d.cts deleted file mode 100644 index 2969582..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.d.cts +++ /dev/null @@ -1,34 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface HardBreakOptions { - /** - * Controls if marks should be kept after being split by a hard break. - * @default true - * @example false - */ - keepMarks: boolean; - /** - * HTML attributes to add to the hard break element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - hardBreak: { - /** - * Add a hard break - * @example editor.commands.setHardBreak() - */ - setHardBreak: () => ReturnType; - }; - } -} -/** - * This extension allows you to insert hard breaks. - * @see https://www.tiptap.dev/api/nodes/hard-break - */ -declare const HardBreak: Node; - -export { HardBreak, type HardBreakOptions, HardBreak as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.d.ts deleted file mode 100644 index 2969582..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface HardBreakOptions { - /** - * Controls if marks should be kept after being split by a hard break. - * @default true - * @example false - */ - keepMarks: boolean; - /** - * HTML attributes to add to the hard break element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - hardBreak: { - /** - * Add a hard break - * @example editor.commands.setHardBreak() - */ - setHardBreak: () => ReturnType; - }; - } -} -/** - * This extension allows you to insert hard breaks. - * @see https://www.tiptap.dev/api/nodes/hard-break - */ -declare const HardBreak: Node; - -export { HardBreak, type HardBreakOptions, HardBreak as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.js deleted file mode 100644 index d0168d7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.js +++ /dev/null @@ -1,73 +0,0 @@ -// src/hard-break.ts -import { mergeAttributes, Node } from "@tiptap/core"; -var HardBreak = Node.create({ - name: "hardBreak", - markdownTokenName: "br", - addOptions() { - return { - keepMarks: true, - HTMLAttributes: {} - }; - }, - inline: true, - group: "inline", - selectable: false, - linebreakReplacement: true, - parseHTML() { - return [{ tag: "br" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["br", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)]; - }, - renderText() { - return "\n"; - }, - renderMarkdown: () => ` -`, - parseMarkdown: () => { - return { - type: "hardBreak" - }; - }, - addCommands() { - return { - setHardBreak: () => ({ commands, chain, state, editor }) => { - return commands.first([ - () => commands.exitCode(), - () => commands.command(() => { - const { selection, storedMarks } = state; - if (selection.$from.parent.type.spec.isolating) { - return false; - } - const { keepMarks } = this.options; - const { splittableMarks } = editor.extensionManager; - const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks(); - return chain().insertContent({ type: this.name }).command(({ tr, dispatch }) => { - if (dispatch && marks && keepMarks) { - const filteredMarks = marks.filter( - (mark) => splittableMarks.includes(mark.type.name) - ); - tr.ensureMarks(filteredMarks); - } - return true; - }).run(); - }) - ]); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Enter": () => this.editor.commands.setHardBreak(), - "Shift-Enter": () => this.editor.commands.setHardBreak() - }; - } -}); - -// src/index.ts -var index_default = HardBreak; -export { - HardBreak, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.js.map deleted file mode 100644 index bf9cc7d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/hard-break.ts","../src/index.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface HardBreakOptions {\n /**\n * Controls if marks should be kept after being split by a hard break.\n * @default true\n * @example false\n */\n keepMarks: boolean\n\n /**\n * HTML attributes to add to the hard break element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n hardBreak: {\n /**\n * Add a hard break\n * @example editor.commands.setHardBreak()\n */\n setHardBreak: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to insert hard breaks.\n * @see https://www.tiptap.dev/api/nodes/hard-break\n */\nexport const HardBreak = Node.create({\n name: 'hardBreak',\n\n markdownTokenName: 'br',\n\n addOptions() {\n return {\n keepMarks: true,\n HTMLAttributes: {},\n }\n },\n\n inline: true,\n\n group: 'inline',\n\n selectable: false,\n\n linebreakReplacement: true,\n\n parseHTML() {\n return [{ tag: 'br' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['br', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)]\n },\n\n renderText() {\n return '\\n'\n },\n\n renderMarkdown: () => ` \\n`,\n\n parseMarkdown: () => {\n return {\n type: 'hardBreak',\n }\n },\n\n addCommands() {\n return {\n setHardBreak:\n () =>\n ({ commands, chain, state, editor }) => {\n return commands.first([\n () => commands.exitCode(),\n () =>\n commands.command(() => {\n const { selection, storedMarks } = state\n\n if (selection.$from.parent.type.spec.isolating) {\n return false\n }\n\n const { keepMarks } = this.options\n const { splittableMarks } = editor.extensionManager\n const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks())\n\n return chain()\n .insertContent({ type: this.name })\n .command(({ tr, dispatch }) => {\n if (dispatch && marks && keepMarks) {\n const filteredMarks = marks.filter(mark =>\n splittableMarks.includes(mark.type.name),\n )\n\n tr.ensureMarks(filteredMarks)\n }\n\n return true\n })\n .run()\n }),\n ])\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Enter': () => this.editor.commands.setHardBreak(),\n 'Shift-Enter': () => this.editor.commands.setHardBreak(),\n }\n },\n})\n","import { HardBreak } from './hard-break.js'\n\nexport * from './hard-break.js'\n\nexport default HardBreak\n"],"mappings":";AAAA,SAAS,iBAAiB,YAAY;AAkC/B,IAAM,YAAY,KAAK,OAAyB;AAAA,EACrD,MAAM;AAAA,EAEN,mBAAmB;AAAA,EAEnB,aAAa;AACX,WAAO;AAAA,MACL,WAAW;AAAA,MACX,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,QAAQ;AAAA,EAER,OAAO;AAAA,EAEP,YAAY;AAAA,EAEZ,sBAAsB;AAAA,EAEtB,YAAY;AACV,WAAO,CAAC,EAAE,KAAK,KAAK,CAAC;AAAA,EACvB;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO,CAAC,MAAM,gBAAgB,KAAK,QAAQ,gBAAgB,cAAc,CAAC;AAAA,EAC5E;AAAA,EAEA,aAAa;AACX,WAAO;AAAA,EACT;AAAA,EAEA,gBAAgB,MAAM;AAAA;AAAA,EAEtB,eAAe,MAAM;AACnB,WAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,cACE,MACA,CAAC,EAAE,UAAU,OAAO,OAAO,OAAO,MAAM;AACtC,eAAO,SAAS,MAAM;AAAA,UACpB,MAAM,SAAS,SAAS;AAAA,UACxB,MACE,SAAS,QAAQ,MAAM;AACrB,kBAAM,EAAE,WAAW,YAAY,IAAI;AAEnC,gBAAI,UAAU,MAAM,OAAO,KAAK,KAAK,WAAW;AAC9C,qBAAO;AAAA,YACT;AAEA,kBAAM,EAAE,UAAU,IAAI,KAAK;AAC3B,kBAAM,EAAE,gBAAgB,IAAI,OAAO;AACnC,kBAAM,QAAQ,eAAgB,UAAU,IAAI,gBAAgB,UAAU,MAAM,MAAM;AAElF,mBAAO,MAAM,EACV,cAAc,EAAE,MAAM,KAAK,KAAK,CAAC,EACjC,QAAQ,CAAC,EAAE,IAAI,SAAS,MAAM;AAC7B,kBAAI,YAAY,SAAS,WAAW;AAClC,sBAAM,gBAAgB,MAAM;AAAA,kBAAO,UACjC,gBAAgB,SAAS,KAAK,KAAK,IAAI;AAAA,gBACzC;AAEA,mBAAG,YAAY,aAAa;AAAA,cAC9B;AAEA,qBAAO;AAAA,YACT,CAAC,EACA,IAAI;AAAA,UACT,CAAC;AAAA,QACL,CAAC;AAAA,MACH;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,aAAa,MAAM,KAAK,OAAO,SAAS,aAAa;AAAA,MACrD,eAAe,MAAM,KAAK,OAAO,SAAS,aAAa;AAAA,IACzD;AAAA,EACF;AACF,CAAC;;;ACnHD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/package.json deleted file mode 100644 index 31847a2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-hard-break", - "version": "3.26.0", - "description": "hard break extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-hard-break" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/src/hard-break.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/src/hard-break.ts deleted file mode 100644 index 5b970cd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/src/hard-break.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { mergeAttributes, Node } from '@tiptap/core' - -export interface HardBreakOptions { - /** - * Controls if marks should be kept after being split by a hard break. - * @default true - * @example false - */ - keepMarks: boolean - - /** - * HTML attributes to add to the hard break element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record -} - -declare module '@tiptap/core' { - interface Commands { - hardBreak: { - /** - * Add a hard break - * @example editor.commands.setHardBreak() - */ - setHardBreak: () => ReturnType - } - } -} - -/** - * This extension allows you to insert hard breaks. - * @see https://www.tiptap.dev/api/nodes/hard-break - */ -export const HardBreak = Node.create({ - name: 'hardBreak', - - markdownTokenName: 'br', - - addOptions() { - return { - keepMarks: true, - HTMLAttributes: {}, - } - }, - - inline: true, - - group: 'inline', - - selectable: false, - - linebreakReplacement: true, - - parseHTML() { - return [{ tag: 'br' }] - }, - - renderHTML({ HTMLAttributes }) { - return ['br', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)] - }, - - renderText() { - return '\n' - }, - - renderMarkdown: () => ` \n`, - - parseMarkdown: () => { - return { - type: 'hardBreak', - } - }, - - addCommands() { - return { - setHardBreak: - () => - ({ commands, chain, state, editor }) => { - return commands.first([ - () => commands.exitCode(), - () => - commands.command(() => { - const { selection, storedMarks } = state - - if (selection.$from.parent.type.spec.isolating) { - return false - } - - const { keepMarks } = this.options - const { splittableMarks } = editor.extensionManager - const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks()) - - return chain() - .insertContent({ type: this.name }) - .command(({ tr, dispatch }) => { - if (dispatch && marks && keepMarks) { - const filteredMarks = marks.filter(mark => - splittableMarks.includes(mark.type.name), - ) - - tr.ensureMarks(filteredMarks) - } - - return true - }) - .run() - }), - ]) - }, - } - }, - - addKeyboardShortcuts() { - return { - 'Mod-Enter': () => this.editor.commands.setHardBreak(), - 'Shift-Enter': () => this.editor.commands.setHardBreak(), - } - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/src/index.ts deleted file mode 100644 index 75d1155..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { HardBreak } from './hard-break.js' - -export * from './hard-break.js' - -export default HardBreak diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/README.md deleted file mode 100644 index 1b9c7fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-heading - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-heading.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-heading) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-heading.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-heading.svg)](https://www.npmjs.com/package/@tiptap/extension-heading) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.cjs deleted file mode 100644 index 7ecfd25..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.cjs +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Heading: () => Heading, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); - -// src/heading.ts -var import_core = require("@tiptap/core"); -var Heading = import_core.Node.create({ - name: "heading", - addOptions() { - return { - levels: [1, 2, 3, 4, 5, 6], - HTMLAttributes: {} - }; - }, - content: "inline*", - group: "block", - defining: true, - addAttributes() { - return { - level: { - default: 1, - rendered: false - } - }; - }, - parseHTML() { - return this.options.levels.map((level) => ({ - tag: `h${level}`, - attrs: { level } - })); - }, - renderHTML({ node, HTMLAttributes }) { - const hasLevel = this.options.levels.includes(node.attrs.level); - const level = hasLevel ? node.attrs.level : this.options.levels[0]; - return [`h${level}`, (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - parseMarkdown: (token, helpers) => { - return helpers.createNode( - "heading", - { level: token.depth || 1 }, - helpers.parseInline(token.tokens || []) - ); - }, - renderMarkdown: (node, h) => { - var _a; - const level = ((_a = node.attrs) == null ? void 0 : _a.level) ? parseInt(node.attrs.level, 10) : 1; - const headingChars = "#".repeat(level); - if (!node.content) { - return ""; - } - return `${headingChars} ${h.renderChildren(node.content)}`; - }, - addCommands() { - return { - setHeading: (attributes) => ({ commands }) => { - if (!this.options.levels.includes(attributes.level)) { - return false; - } - return commands.setNode(this.name, attributes); - }, - toggleHeading: (attributes) => ({ commands }) => { - if (!this.options.levels.includes(attributes.level)) { - return false; - } - return commands.toggleNode(this.name, "paragraph", attributes); - } - }; - }, - addKeyboardShortcuts() { - return this.options.levels.reduce( - (items, level) => ({ - ...items, - [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level }) - }), - {} - ); - }, - addInputRules() { - return this.options.levels.map((level) => { - return (0, import_core.textblockTypeInputRule)({ - find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\s$`), - type: this.type, - getAttributes: { - level - } - }); - }); - } -}); - -// src/index.ts -var index_default = Heading; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Heading -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.cjs.map deleted file mode 100644 index 81d978c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/heading.ts"],"sourcesContent":["import { Heading } from './heading.js'\n\nexport * from './heading.js'\n\nexport default Heading\n","import { mergeAttributes, Node, textblockTypeInputRule } from '@tiptap/core'\n\n/**\n * The heading level options.\n */\nexport type Level = 1 | 2 | 3 | 4 | 5 | 6\n\nexport interface HeadingOptions {\n /**\n * The available heading levels.\n * @default [1, 2, 3, 4, 5, 6]\n * @example [1, 2, 3]\n */\n levels: Level[]\n\n /**\n * The HTML attributes for a heading node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n heading: {\n /**\n * Set a heading node\n * @param attributes The heading attributes\n * @example editor.commands.setHeading({ level: 1 })\n */\n setHeading: (attributes: { level: Level }) => ReturnType\n /**\n * Toggle a heading node\n * @param attributes The heading attributes\n * @example editor.commands.toggleHeading({ level: 1 })\n */\n toggleHeading: (attributes: { level: Level }) => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to create headings.\n * @see https://www.tiptap.dev/api/nodes/heading\n */\nexport const Heading = Node.create({\n name: 'heading',\n\n addOptions() {\n return {\n levels: [1, 2, 3, 4, 5, 6],\n HTMLAttributes: {},\n }\n },\n\n content: 'inline*',\n\n group: 'block',\n\n defining: true,\n\n addAttributes() {\n return {\n level: {\n default: 1,\n rendered: false,\n },\n }\n },\n\n parseHTML() {\n return this.options.levels.map((level: Level) => ({\n tag: `h${level}`,\n attrs: { level },\n }))\n },\n\n renderHTML({ node, HTMLAttributes }) {\n const hasLevel = this.options.levels.includes(node.attrs.level)\n const level = hasLevel ? node.attrs.level : this.options.levels[0]\n\n return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n parseMarkdown: (token, helpers) => {\n // Convert 'heading' token to heading node\n // marked provides 'depth' property (1-6) for heading level\n return helpers.createNode(\n 'heading',\n { level: token.depth || 1 },\n helpers.parseInline(token.tokens || []),\n )\n },\n\n renderMarkdown: (node, h) => {\n const level = node.attrs?.level ? parseInt(node.attrs.level as string, 10) : 1\n const headingChars = '#'.repeat(level)\n\n if (!node.content) {\n return ''\n }\n\n // Use current context for proper joining/spacing\n return `${headingChars} ${h.renderChildren(node.content)}`\n },\n\n addCommands() {\n return {\n setHeading:\n attributes =>\n ({ commands }) => {\n if (!this.options.levels.includes(attributes.level)) {\n return false\n }\n\n return commands.setNode(this.name, attributes)\n },\n toggleHeading:\n attributes =>\n ({ commands }) => {\n if (!this.options.levels.includes(attributes.level)) {\n return false\n }\n\n return commands.toggleNode(this.name, 'paragraph', attributes)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return this.options.levels.reduce(\n (items, level) => ({\n ...items,\n [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level }),\n }),\n {},\n )\n },\n\n addInputRules() {\n return this.options.levels.map(level => {\n return textblockTypeInputRule({\n find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\\\s$`),\n type: this.type,\n getAttributes: {\n level,\n },\n })\n })\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA8D;AA8CvD,IAAM,UAAU,iBAAK,OAAuB;AAAA,EACjD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,QAAQ,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAAA,MACzB,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,SAAS;AAAA,EAET,OAAO;AAAA,EAEP,UAAU;AAAA,EAEV,gBAAgB;AACd,WAAO;AAAA,MACL,OAAO;AAAA,QACL,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAAA,EAEA,YAAY;AACV,WAAO,KAAK,QAAQ,OAAO,IAAI,CAAC,WAAkB;AAAA,MAChD,KAAK,IAAI,KAAK;AAAA,MACd,OAAO,EAAE,MAAM;AAAA,IACjB,EAAE;AAAA,EACJ;AAAA,EAEA,WAAW,EAAE,MAAM,eAAe,GAAG;AACnC,UAAM,WAAW,KAAK,QAAQ,OAAO,SAAS,KAAK,MAAM,KAAK;AAC9D,UAAM,QAAQ,WAAW,KAAK,MAAM,QAAQ,KAAK,QAAQ,OAAO,CAAC;AAEjE,WAAO,CAA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AAA,EAEA,gBAAgB;AACd,WAAO,KAAK,QAAQ,OAAO,IAAI,WAAS;AACtC,iBAAO,oCAAuB;AAAA,QAC5B,MAAM,IAAI,OAAO,OAAO,KAAK,IAAI,GAAG,KAAK,QAAQ,MAAM,CAAC,IAAI,KAAK,QAAQ;AAAA,QACzE,MAAM,KAAK;AAAA,QACX,eAAe;AAAA,UACb;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF,CAAC;;;ADnJD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.d.cts deleted file mode 100644 index 3eadaa9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.d.cts +++ /dev/null @@ -1,49 +0,0 @@ -import { Node } from '@tiptap/core'; - -/** - * The heading level options. - */ -type Level = 1 | 2 | 3 | 4 | 5 | 6; -interface HeadingOptions { - /** - * The available heading levels. - * @default [1, 2, 3, 4, 5, 6] - * @example [1, 2, 3] - */ - levels: Level[]; - /** - * The HTML attributes for a heading node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - heading: { - /** - * Set a heading node - * @param attributes The heading attributes - * @example editor.commands.setHeading({ level: 1 }) - */ - setHeading: (attributes: { - level: Level; - }) => ReturnType; - /** - * Toggle a heading node - * @param attributes The heading attributes - * @example editor.commands.toggleHeading({ level: 1 }) - */ - toggleHeading: (attributes: { - level: Level; - }) => ReturnType; - }; - } -} -/** - * This extension allows you to create headings. - * @see https://www.tiptap.dev/api/nodes/heading - */ -declare const Heading: Node; - -export { Heading, type HeadingOptions, type Level, Heading as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.d.ts deleted file mode 100644 index 3eadaa9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Node } from '@tiptap/core'; - -/** - * The heading level options. - */ -type Level = 1 | 2 | 3 | 4 | 5 | 6; -interface HeadingOptions { - /** - * The available heading levels. - * @default [1, 2, 3, 4, 5, 6] - * @example [1, 2, 3] - */ - levels: Level[]; - /** - * The HTML attributes for a heading node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - heading: { - /** - * Set a heading node - * @param attributes The heading attributes - * @example editor.commands.setHeading({ level: 1 }) - */ - setHeading: (attributes: { - level: Level; - }) => ReturnType; - /** - * Toggle a heading node - * @param attributes The heading attributes - * @example editor.commands.toggleHeading({ level: 1 }) - */ - toggleHeading: (attributes: { - level: Level; - }) => ReturnType; - }; - } -} -/** - * This extension allows you to create headings. - * @see https://www.tiptap.dev/api/nodes/heading - */ -declare const Heading: Node; - -export { Heading, type HeadingOptions, type Level, Heading as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.js deleted file mode 100644 index 4096ed0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.js +++ /dev/null @@ -1,93 +0,0 @@ -// src/heading.ts -import { mergeAttributes, Node, textblockTypeInputRule } from "@tiptap/core"; -var Heading = Node.create({ - name: "heading", - addOptions() { - return { - levels: [1, 2, 3, 4, 5, 6], - HTMLAttributes: {} - }; - }, - content: "inline*", - group: "block", - defining: true, - addAttributes() { - return { - level: { - default: 1, - rendered: false - } - }; - }, - parseHTML() { - return this.options.levels.map((level) => ({ - tag: `h${level}`, - attrs: { level } - })); - }, - renderHTML({ node, HTMLAttributes }) { - const hasLevel = this.options.levels.includes(node.attrs.level); - const level = hasLevel ? node.attrs.level : this.options.levels[0]; - return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - parseMarkdown: (token, helpers) => { - return helpers.createNode( - "heading", - { level: token.depth || 1 }, - helpers.parseInline(token.tokens || []) - ); - }, - renderMarkdown: (node, h) => { - var _a; - const level = ((_a = node.attrs) == null ? void 0 : _a.level) ? parseInt(node.attrs.level, 10) : 1; - const headingChars = "#".repeat(level); - if (!node.content) { - return ""; - } - return `${headingChars} ${h.renderChildren(node.content)}`; - }, - addCommands() { - return { - setHeading: (attributes) => ({ commands }) => { - if (!this.options.levels.includes(attributes.level)) { - return false; - } - return commands.setNode(this.name, attributes); - }, - toggleHeading: (attributes) => ({ commands }) => { - if (!this.options.levels.includes(attributes.level)) { - return false; - } - return commands.toggleNode(this.name, "paragraph", attributes); - } - }; - }, - addKeyboardShortcuts() { - return this.options.levels.reduce( - (items, level) => ({ - ...items, - [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level }) - }), - {} - ); - }, - addInputRules() { - return this.options.levels.map((level) => { - return textblockTypeInputRule({ - find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\s$`), - type: this.type, - getAttributes: { - level - } - }); - }); - } -}); - -// src/index.ts -var index_default = Heading; -export { - Heading, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.js.map deleted file mode 100644 index 7edec10..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/heading.ts","../src/index.ts"],"sourcesContent":["import { mergeAttributes, Node, textblockTypeInputRule } from '@tiptap/core'\n\n/**\n * The heading level options.\n */\nexport type Level = 1 | 2 | 3 | 4 | 5 | 6\n\nexport interface HeadingOptions {\n /**\n * The available heading levels.\n * @default [1, 2, 3, 4, 5, 6]\n * @example [1, 2, 3]\n */\n levels: Level[]\n\n /**\n * The HTML attributes for a heading node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n heading: {\n /**\n * Set a heading node\n * @param attributes The heading attributes\n * @example editor.commands.setHeading({ level: 1 })\n */\n setHeading: (attributes: { level: Level }) => ReturnType\n /**\n * Toggle a heading node\n * @param attributes The heading attributes\n * @example editor.commands.toggleHeading({ level: 1 })\n */\n toggleHeading: (attributes: { level: Level }) => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to create headings.\n * @see https://www.tiptap.dev/api/nodes/heading\n */\nexport const Heading = Node.create({\n name: 'heading',\n\n addOptions() {\n return {\n levels: [1, 2, 3, 4, 5, 6],\n HTMLAttributes: {},\n }\n },\n\n content: 'inline*',\n\n group: 'block',\n\n defining: true,\n\n addAttributes() {\n return {\n level: {\n default: 1,\n rendered: false,\n },\n }\n },\n\n parseHTML() {\n return this.options.levels.map((level: Level) => ({\n tag: `h${level}`,\n attrs: { level },\n }))\n },\n\n renderHTML({ node, HTMLAttributes }) {\n const hasLevel = this.options.levels.includes(node.attrs.level)\n const level = hasLevel ? node.attrs.level : this.options.levels[0]\n\n return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n parseMarkdown: (token, helpers) => {\n // Convert 'heading' token to heading node\n // marked provides 'depth' property (1-6) for heading level\n return helpers.createNode(\n 'heading',\n { level: token.depth || 1 },\n helpers.parseInline(token.tokens || []),\n )\n },\n\n renderMarkdown: (node, h) => {\n const level = node.attrs?.level ? parseInt(node.attrs.level as string, 10) : 1\n const headingChars = '#'.repeat(level)\n\n if (!node.content) {\n return ''\n }\n\n // Use current context for proper joining/spacing\n return `${headingChars} ${h.renderChildren(node.content)}`\n },\n\n addCommands() {\n return {\n setHeading:\n attributes =>\n ({ commands }) => {\n if (!this.options.levels.includes(attributes.level)) {\n return false\n }\n\n return commands.setNode(this.name, attributes)\n },\n toggleHeading:\n attributes =>\n ({ commands }) => {\n if (!this.options.levels.includes(attributes.level)) {\n return false\n }\n\n return commands.toggleNode(this.name, 'paragraph', attributes)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return this.options.levels.reduce(\n (items, level) => ({\n ...items,\n [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level }),\n }),\n {},\n )\n },\n\n addInputRules() {\n return this.options.levels.map(level => {\n return textblockTypeInputRule({\n find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\\\s$`),\n type: this.type,\n getAttributes: {\n level,\n },\n })\n })\n },\n})\n","import { Heading } from './heading.js'\n\nexport * from './heading.js'\n\nexport default Heading\n"],"mappings":";AAAA,SAAS,iBAAiB,MAAM,8BAA8B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,KAAK,OAAO,CAAC;AAAA,EAC1D;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,YACE,gBACA,CAAC,EAAE,SAAS,MAAM;AAChB,YAAI,CAAC,KAAK,QAAQ,OAAO,SAAS,WAAW,KAAK,GAAG;AACnD,iBAAO;AAAA,QACT;AAEA,eAAO,SAAS,QAAQ,KAAK,MAAM,UAAU;AAAA,MAC/C;AAAA,MACF,eACE,gBACA,CAAC,EAAE,SAAS,MAAM;AAChB,YAAI,CAAC,KAAK,QAAQ,OAAO,SAAS,WAAW,KAAK,GAAG;AACnD,iBAAO;AAAA,QACT;AAEA,eAAO,SAAS,WAAW,KAAK,MAAM,aAAa,UAAU;AAAA,MAC/D;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO,KAAK,QAAQ,OAAO;AAAA,MACzB,CAAC,OAAO,WAAW;AAAA,QACjB,GAAG;AAAA,QACH,CAAC,WAAW,KAAK,EAAE,GAAG,MAAM,KAAK,OAAO,SAAS,cAAc,EAAE,MAAM,CAAC;AAAA,MAC1E;AAAA,MACA,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO,KAAK,QAAQ,OAAO,IAAI,WAAS;AACtC,aAAO,uBAAuB;AAAA,QAC5B,MAAM,IAAI,OAAO,OAAO,KAAK,IAAI,GAAG,KAAK,QAAQ,MAAM,CAAC,IAAI,KAAK,QAAQ;AAAA,QACzE,MAAM,KAAK;AAAA,QACX,eAAe;AAAA,UACb;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF,CAAC;;;ACnJD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/package.json deleted file mode 100644 index e62eb41..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-heading", - "version": "3.26.0", - "description": "heading extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-heading" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/src/heading.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/src/heading.ts deleted file mode 100644 index 49ccc03..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/src/heading.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { mergeAttributes, Node, textblockTypeInputRule } from '@tiptap/core' - -/** - * The heading level options. - */ -export type Level = 1 | 2 | 3 | 4 | 5 | 6 - -export interface HeadingOptions { - /** - * The available heading levels. - * @default [1, 2, 3, 4, 5, 6] - * @example [1, 2, 3] - */ - levels: Level[] - - /** - * The HTML attributes for a heading node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record -} - -declare module '@tiptap/core' { - interface Commands { - heading: { - /** - * Set a heading node - * @param attributes The heading attributes - * @example editor.commands.setHeading({ level: 1 }) - */ - setHeading: (attributes: { level: Level }) => ReturnType - /** - * Toggle a heading node - * @param attributes The heading attributes - * @example editor.commands.toggleHeading({ level: 1 }) - */ - toggleHeading: (attributes: { level: Level }) => ReturnType - } - } -} - -/** - * This extension allows you to create headings. - * @see https://www.tiptap.dev/api/nodes/heading - */ -export const Heading = Node.create({ - name: 'heading', - - addOptions() { - return { - levels: [1, 2, 3, 4, 5, 6], - HTMLAttributes: {}, - } - }, - - content: 'inline*', - - group: 'block', - - defining: true, - - addAttributes() { - return { - level: { - default: 1, - rendered: false, - }, - } - }, - - parseHTML() { - return this.options.levels.map((level: Level) => ({ - tag: `h${level}`, - attrs: { level }, - })) - }, - - renderHTML({ node, HTMLAttributes }) { - const hasLevel = this.options.levels.includes(node.attrs.level) - const level = hasLevel ? node.attrs.level : this.options.levels[0] - - return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] - }, - - parseMarkdown: (token, helpers) => { - // Convert 'heading' token to heading node - // marked provides 'depth' property (1-6) for heading level - return helpers.createNode( - 'heading', - { level: token.depth || 1 }, - helpers.parseInline(token.tokens || []), - ) - }, - - renderMarkdown: (node, h) => { - const level = node.attrs?.level ? parseInt(node.attrs.level as string, 10) : 1 - const headingChars = '#'.repeat(level) - - if (!node.content) { - return '' - } - - // Use current context for proper joining/spacing - return `${headingChars} ${h.renderChildren(node.content)}` - }, - - addCommands() { - return { - setHeading: - attributes => - ({ commands }) => { - if (!this.options.levels.includes(attributes.level)) { - return false - } - - return commands.setNode(this.name, attributes) - }, - toggleHeading: - attributes => - ({ commands }) => { - if (!this.options.levels.includes(attributes.level)) { - return false - } - - return commands.toggleNode(this.name, 'paragraph', attributes) - }, - } - }, - - addKeyboardShortcuts() { - return this.options.levels.reduce( - (items, level) => ({ - ...items, - [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level }), - }), - {}, - ) - }, - - addInputRules() { - return this.options.levels.map(level => { - return textblockTypeInputRule({ - find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\s$`), - type: this.type, - getAttributes: { - level, - }, - }) - }) - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/src/index.ts deleted file mode 100644 index 7c36f05..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Heading } from './heading.js' - -export * from './heading.js' - -export default Heading diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/README.md deleted file mode 100644 index 6289126..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-horizontal-rule - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-horizontal-rule.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-horizontal-rule) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-horizontal-rule.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-horizontal-rule.svg)](https://www.npmjs.com/package/@tiptap/extension-horizontal-rule) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs deleted file mode 100644 index 0577ed8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - HorizontalRule: () => HorizontalRule, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); - -// src/horizontal-rule.ts -var import_core = require("@tiptap/core"); -var import_state = require("@tiptap/pm/state"); -var HorizontalRule = import_core.Node.create({ - name: "horizontalRule", - addOptions() { - return { - HTMLAttributes: {}, - nextNodeType: "paragraph" - }; - }, - group: "block", - parseHTML() { - return [{ tag: "hr" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["hr", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes)]; - }, - markdownTokenName: "hr", - parseMarkdown: (token, helpers) => { - return helpers.createNode("horizontalRule"); - }, - renderMarkdown: () => { - return "---"; - }, - addCommands() { - return { - setHorizontalRule: () => ({ chain, state }) => { - if (!(0, import_core.canInsertNode)(state, state.schema.nodes[this.name])) { - return false; - } - const { selection } = state; - const { $to: $originTo } = selection; - const currentChain = chain(); - if ((0, import_core.isNodeSelection)(selection)) { - currentChain.insertContentAt($originTo.pos, { - type: this.name - }); - } else { - currentChain.insertContent({ type: this.name }); - } - return currentChain.command(({ state: chainState, tr, dispatch }) => { - if (dispatch) { - const { $to } = tr.selection; - const posAfter = $to.end(); - if ($to.nodeAfter) { - if ($to.nodeAfter.isTextblock) { - tr.setSelection(import_state.TextSelection.create(tr.doc, $to.pos + 1)); - } else if ($to.nodeAfter.isBlock) { - tr.setSelection(import_state.NodeSelection.create(tr.doc, $to.pos)); - } else { - tr.setSelection(import_state.TextSelection.create(tr.doc, $to.pos)); - } - } else { - const nodeType = chainState.schema.nodes[this.options.nextNodeType] || $to.parent.type.contentMatch.defaultType; - const node = nodeType == null ? void 0 : nodeType.create(); - if (node) { - tr.insert(posAfter, node); - tr.setSelection(import_state.TextSelection.create(tr.doc, posAfter + 1)); - } - } - tr.scrollIntoView(); - } - return true; - }).run(); - } - }; - }, - addInputRules() { - return [ - (0, import_core.nodeInputRule)({ - find: /^(?:---|—-|___\s|\*\*\*\s)$/, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = HorizontalRule; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - HorizontalRule -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs.map deleted file mode 100644 index 47faa49..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/horizontal-rule.ts"],"sourcesContent":["import { HorizontalRule } from './horizontal-rule.js'\n\nexport * from './horizontal-rule.js'\n\nexport default HorizontalRule\n","import { canInsertNode, isNodeSelection, mergeAttributes, Node, nodeInputRule } from '@tiptap/core'\nimport { NodeSelection, TextSelection } from '@tiptap/pm/state'\n\nexport interface HorizontalRuleOptions {\n /**\n * The HTML attributes for a horizontal rule node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n /**\n * The default type to insert after the horizontal rule.\n * @default \"paragraph\"\n * @example \"heading\"\n */\n nextNodeType: string\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n horizontalRule: {\n /**\n * Add a horizontal rule\n * @example editor.commands.setHorizontalRule()\n */\n setHorizontalRule: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to insert horizontal rules.\n * @see https://www.tiptap.dev/api/nodes/horizontal-rule\n */\nexport const HorizontalRule = Node.create({\n name: 'horizontalRule',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n nextNodeType: 'paragraph',\n }\n },\n\n group: 'block',\n\n parseHTML() {\n return [{ tag: 'hr' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['hr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)]\n },\n\n markdownTokenName: 'hr',\n\n parseMarkdown: (token, helpers) => {\n return helpers.createNode('horizontalRule')\n },\n\n renderMarkdown: () => {\n return '---'\n },\n\n addCommands() {\n return {\n setHorizontalRule:\n () =>\n ({ chain, state }) => {\n // Check if we can insert the node at the current selection\n if (!canInsertNode(state, state.schema.nodes[this.name])) {\n return false\n }\n\n const { selection } = state\n const { $to: $originTo } = selection\n\n const currentChain = chain()\n\n if (isNodeSelection(selection)) {\n currentChain.insertContentAt($originTo.pos, {\n type: this.name,\n })\n } else {\n currentChain.insertContent({ type: this.name })\n }\n\n return (\n currentChain\n // set cursor after horizontal rule\n .command(({ state: chainState, tr, dispatch }) => {\n if (dispatch) {\n const { $to } = tr.selection\n const posAfter = $to.end()\n\n if ($to.nodeAfter) {\n if ($to.nodeAfter.isTextblock) {\n tr.setSelection(TextSelection.create(tr.doc, $to.pos + 1))\n } else if ($to.nodeAfter.isBlock) {\n tr.setSelection(NodeSelection.create(tr.doc, $to.pos))\n } else {\n tr.setSelection(TextSelection.create(tr.doc, $to.pos))\n }\n } else {\n // add node after horizontal rule if it’s the end of the document\n const nodeType =\n chainState.schema.nodes[this.options.nextNodeType] ||\n $to.parent.type.contentMatch.defaultType\n const node = nodeType?.create()\n\n if (node) {\n tr.insert(posAfter, node)\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1))\n }\n }\n\n tr.scrollIntoView()\n }\n\n return true\n })\n .run()\n )\n },\n }\n },\n\n addInputRules() {\n return [\n nodeInputRule({\n find: /^(?:---|—-|___\\s|\\*\\*\\*\\s)$/,\n type: this.type,\n }),\n ]\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAqF;AACrF,mBAA6C;AAiCtC,IAAM,iBAAiB,iBAAK,OAA8B;AAAA,EAC/D,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,gBAAgB,CAAC;AAAA,MACjB,cAAc;AAAA,IAChB;AAAA,EACF;AAAA,EAEA,OAAO;AAAA,EAEP,YAAY;AACV,WAAO,CAAC,EAAE,KAAK,KAAK,CAAC;AAAA,EACvB;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO,CAAC,UAAM,6BAAgB,KAAK,QAAQ,gBAAgB,cAAc,CAAC;AAAA,EAC5E;AAAA,EAEA,mBAAmB;AAAA,EAEnB,eAAe,CAAC,OAAO,YAAY;AACjC,WAAO,QAAQ,WAAW,gBAAgB;AAAA,EAC5C;AAAA,EAEA,gBAAgB,MAAM;AACpB,WAAO;AAAA,EACT;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,m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AA,MAEX;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,UACL,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;ADnID,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.cts deleted file mode 100644 index a5cca3a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.cts +++ /dev/null @@ -1,34 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface HorizontalRuleOptions { - /** - * The HTML attributes for a horizontal rule node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The default type to insert after the horizontal rule. - * @default "paragraph" - * @example "heading" - */ - nextNodeType: string; -} -declare module '@tiptap/core' { - interface Commands { - horizontalRule: { - /** - * Add a horizontal rule - * @example editor.commands.setHorizontalRule() - */ - setHorizontalRule: () => ReturnType; - }; - } -} -/** - * This extension allows you to insert horizontal rules. - * @see https://www.tiptap.dev/api/nodes/horizontal-rule - */ -declare const HorizontalRule: Node; - -export { HorizontalRule, type HorizontalRuleOptions, HorizontalRule as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.ts deleted file mode 100644 index a5cca3a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface HorizontalRuleOptions { - /** - * The HTML attributes for a horizontal rule node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The default type to insert after the horizontal rule. - * @default "paragraph" - * @example "heading" - */ - nextNodeType: string; -} -declare module '@tiptap/core' { - interface Commands { - horizontalRule: { - /** - * Add a horizontal rule - * @example editor.commands.setHorizontalRule() - */ - setHorizontalRule: () => ReturnType; - }; - } -} -/** - * This extension allows you to insert horizontal rules. - * @see https://www.tiptap.dev/api/nodes/horizontal-rule - */ -declare const HorizontalRule: Node; - -export { HorizontalRule, type HorizontalRuleOptions, HorizontalRule as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.js deleted file mode 100644 index 3da40ec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +++ /dev/null @@ -1,85 +0,0 @@ -// src/horizontal-rule.ts -import { canInsertNode, isNodeSelection, mergeAttributes, Node, nodeInputRule } from "@tiptap/core"; -import { NodeSelection, TextSelection } from "@tiptap/pm/state"; -var HorizontalRule = Node.create({ - name: "horizontalRule", - addOptions() { - return { - HTMLAttributes: {}, - nextNodeType: "paragraph" - }; - }, - group: "block", - parseHTML() { - return [{ tag: "hr" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["hr", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)]; - }, - markdownTokenName: "hr", - parseMarkdown: (token, helpers) => { - return helpers.createNode("horizontalRule"); - }, - renderMarkdown: () => { - return "---"; - }, - addCommands() { - return { - setHorizontalRule: () => ({ chain, state }) => { - if (!canInsertNode(state, state.schema.nodes[this.name])) { - return false; - } - const { selection } = state; - const { $to: $originTo } = selection; - const currentChain = chain(); - if (isNodeSelection(selection)) { - currentChain.insertContentAt($originTo.pos, { - type: this.name - }); - } else { - currentChain.insertContent({ type: this.name }); - } - return currentChain.command(({ state: chainState, tr, dispatch }) => { - if (dispatch) { - const { $to } = tr.selection; - const posAfter = $to.end(); - if ($to.nodeAfter) { - if ($to.nodeAfter.isTextblock) { - tr.setSelection(TextSelection.create(tr.doc, $to.pos + 1)); - } else if ($to.nodeAfter.isBlock) { - tr.setSelection(NodeSelection.create(tr.doc, $to.pos)); - } else { - tr.setSelection(TextSelection.create(tr.doc, $to.pos)); - } - } else { - const nodeType = chainState.schema.nodes[this.options.nextNodeType] || $to.parent.type.contentMatch.defaultType; - const node = nodeType == null ? void 0 : nodeType.create(); - if (node) { - tr.insert(posAfter, node); - tr.setSelection(TextSelection.create(tr.doc, posAfter + 1)); - } - } - tr.scrollIntoView(); - } - return true; - }).run(); - } - }; - }, - addInputRules() { - return [ - nodeInputRule({ - find: /^(?:---|—-|___\s|\*\*\*\s)$/, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = HorizontalRule; -export { - HorizontalRule, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map deleted file mode 100644 index 74bbd60..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/horizontal-rule.ts","../src/index.ts"],"sourcesContent":["import { canInsertNode, isNodeSelection, mergeAttributes, Node, nodeInputRule } from '@tiptap/core'\nimport { NodeSelection, TextSelection } from '@tiptap/pm/state'\n\nexport interface HorizontalRuleOptions {\n /**\n * The HTML attributes for a horizontal rule node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n /**\n * The default type to insert after the horizontal rule.\n * @default \"paragraph\"\n * @example \"heading\"\n */\n nextNodeType: string\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n horizontalRule: {\n /**\n * Add a horizontal rule\n * @example editor.commands.setHorizontalRule()\n */\n setHorizontalRule: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to insert horizontal rules.\n * @see https://www.tiptap.dev/api/nodes/horizontal-rule\n */\nexport const HorizontalRule = Node.create({\n name: 'horizontalRule',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n nextNodeType: 'paragraph',\n }\n },\n\n group: 'block',\n\n parseHTML() {\n return [{ tag: 'hr' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['hr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)]\n },\n\n markdownTokenName: 'hr',\n\n parseMarkdown: (token, helpers) => {\n return helpers.createNode('horizontalRule')\n },\n\n renderMarkdown: () => {\n return '---'\n },\n\n addCommands() {\n return {\n setHorizontalRule:\n () =>\n ({ chain, state }) => {\n // Check if we can insert the node at the current selection\n if (!canInsertNode(state, state.schema.nodes[this.name])) {\n return false\n }\n\n const { selection } = state\n const { $to: $originTo } = selection\n\n const currentChain = chain()\n\n if (isNodeSelection(selection)) {\n currentChain.insertContentAt($originTo.pos, {\n type: this.name,\n })\n } else {\n currentChain.insertContent({ type: this.name })\n }\n\n return (\n currentChain\n // set cursor after horizontal rule\n .command(({ state: chainState, tr, dispatch }) => {\n if (dispatch) {\n const { $to } = tr.selection\n const posAfter = $to.end()\n\n if ($to.nodeAfter) {\n if ($to.nodeAfter.isTextblock) {\n tr.setSelection(TextSelection.create(tr.doc, $to.pos + 1))\n } else if ($to.nodeAfter.isBlock) {\n tr.setSelection(NodeSelection.create(tr.doc, $to.pos))\n } else {\n tr.setSelection(TextSelection.create(tr.doc, $to.pos))\n }\n } else {\n // add node after horizontal rule if it’s the end of the document\n const nodeType =\n chainState.schema.nodes[this.options.nextNodeType] ||\n $to.parent.type.contentMatch.defaultType\n const node = nodeType?.create()\n\n if (node) {\n tr.insert(posAfter, node)\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1))\n }\n }\n\n tr.scrollIntoView()\n }\n\n return true\n })\n .run()\n )\n },\n }\n },\n\n addInputRules() {\n return [\n nodeInputRule({\n find: /^(?:---|—-|___\\s|\\*\\*\\*\\s)$/,\n type: this.type,\n }),\n ]\n },\n})\n","import { HorizontalRule } from './horizontal-rule.js'\n\nexport * from './horizontal-rule.js'\n\nexport default HorizontalRule\n"],"mappings":";AAAA,SAAS,eAAe,iBAAiB,iBAAiB,MAAM,qBAAqB;AACrF,SAAS,eAAe,qBAAqB;AAiCtC,IAAM,iBAAiB,KAAK,OAA8B;AAAA,EAC/D,M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S;AAChC,mBAAG,aAAa,cAAc,OAAO,GAAG,KAAK,IAAI,GAAG,CAAC;AAAA,cACvD,OAAO;AACL,mBAAG,aAAa,cAAc,OAAO,GAAG,KAAK,IAAI,GAAG,CAAC;AAAA,cACvD;AAAA,YACF,OAAO;AAEL,oBAAM,WACJ,WAAW,OAAO,MAAM,KAAK,QAAQ,YAAY,KACjD,IAAI,OAAO,KAAK,aAAa;AAC/B,oBAAM,OAAO,qCAAU;AAEvB,kBAAI,MAAM;AACR,mBAAG,OAAO,UAAU,IAAI;AACxB,mBAAG,aAAa,cAAc,OAAO,GAAG,KAAK,WAAW,CAAC,CAAC;AAAA,cAC5D;AAAA,YACF;AAEA,eAAG,eAAe;AAAA,UACpB;AAEA,iBAAO;AAAA,QACT,CAAC,EACA,IAAI;AAAA,MAEX;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,MACL,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;ACnID,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/package.json deleted file mode 100644 index 08b0981..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "@tiptap/extension-horizontal-rule", - "version": "3.26.0", - "description": "horizontal rule extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-horizontal-rule" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0", - "@tiptap/pm": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0", - "@tiptap/pm": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/src/horizontal-rule.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/src/horizontal-rule.ts deleted file mode 100644 index 7dc1bd7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/src/horizontal-rule.ts +++ /dev/null @@ -1,136 +0,0 @@ -import { canInsertNode, isNodeSelection, mergeAttributes, Node, nodeInputRule } from '@tiptap/core' -import { NodeSelection, TextSelection } from '@tiptap/pm/state' - -export interface HorizontalRuleOptions { - /** - * The HTML attributes for a horizontal rule node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record - /** - * The default type to insert after the horizontal rule. - * @default "paragraph" - * @example "heading" - */ - nextNodeType: string -} - -declare module '@tiptap/core' { - interface Commands { - horizontalRule: { - /** - * Add a horizontal rule - * @example editor.commands.setHorizontalRule() - */ - setHorizontalRule: () => ReturnType - } - } -} - -/** - * This extension allows you to insert horizontal rules. - * @see https://www.tiptap.dev/api/nodes/horizontal-rule - */ -export const HorizontalRule = Node.create({ - name: 'horizontalRule', - - addOptions() { - return { - HTMLAttributes: {}, - nextNodeType: 'paragraph', - } - }, - - group: 'block', - - parseHTML() { - return [{ tag: 'hr' }] - }, - - renderHTML({ HTMLAttributes }) { - return ['hr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)] - }, - - markdownTokenName: 'hr', - - parseMarkdown: (token, helpers) => { - return helpers.createNode('horizontalRule') - }, - - renderMarkdown: () => { - return '---' - }, - - addCommands() { - return { - setHorizontalRule: - () => - ({ chain, state }) => { - // Check if we can insert the node at the current selection - if (!canInsertNode(state, state.schema.nodes[this.name])) { - return false - } - - const { selection } = state - const { $to: $originTo } = selection - - const currentChain = chain() - - if (isNodeSelection(selection)) { - currentChain.insertContentAt($originTo.pos, { - type: this.name, - }) - } else { - currentChain.insertContent({ type: this.name }) - } - - return ( - currentChain - // set cursor after horizontal rule - .command(({ state: chainState, tr, dispatch }) => { - if (dispatch) { - const { $to } = tr.selection - const posAfter = $to.end() - - if ($to.nodeAfter) { - if ($to.nodeAfter.isTextblock) { - tr.setSelection(TextSelection.create(tr.doc, $to.pos + 1)) - } else if ($to.nodeAfter.isBlock) { - tr.setSelection(NodeSelection.create(tr.doc, $to.pos)) - } else { - tr.setSelection(TextSelection.create(tr.doc, $to.pos)) - } - } else { - // add node after horizontal rule if it’s the end of the document - const nodeType = - chainState.schema.nodes[this.options.nextNodeType] || - $to.parent.type.contentMatch.defaultType - const node = nodeType?.create() - - if (node) { - tr.insert(posAfter, node) - tr.setSelection(TextSelection.create(tr.doc, posAfter + 1)) - } - } - - tr.scrollIntoView() - } - - return true - }) - .run() - ) - }, - } - }, - - addInputRules() { - return [ - nodeInputRule({ - find: /^(?:---|—-|___\s|\*\*\*\s)$/, - type: this.type, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/src/index.ts deleted file mode 100644 index 4d90163..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { HorizontalRule } from './horizontal-rule.js' - -export * from './horizontal-rule.js' - -export default HorizontalRule diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm deleted file mode 120000 index f877560..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+pm@3.26.0/node_modules/@tiptap/pm \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/README.md deleted file mode 100644 index 0445967..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-italic - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-italic.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-italic) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-italic.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-italic.svg)](https://www.npmjs.com/package/@tiptap/extension-italic) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.cjs deleted file mode 100644 index 18005d0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.cjs +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Italic: () => Italic, - default: () => index_default, - starInputRegex: () => starInputRegex, - starPasteRegex: () => starPasteRegex, - underscoreInputRegex: () => underscoreInputRegex, - underscorePasteRegex: () => underscorePasteRegex -}); -module.exports = __toCommonJS(index_exports); - -// src/italic.ts -var import_core = require("@tiptap/core"); -var starInputRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/; -var starPasteRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g; -var underscoreInputRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/; -var underscorePasteRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g; -var Italic = import_core.Mark.create({ - name: "italic", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - parseHTML() { - return [ - { - tag: "em" - }, - { - tag: "i", - getAttrs: (node) => node.style.fontStyle !== "normal" && null - }, - { - style: "font-style=normal", - clearMark: (mark) => mark.type.name === this.name - }, - { - style: "font-style=italic" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["em", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - addCommands() { - return { - setItalic: () => ({ commands }) => { - return commands.setMark(this.name); - }, - toggleItalic: () => ({ commands }) => { - return commands.toggleMark(this.name); - }, - unsetItalic: () => ({ commands }) => { - return commands.unsetMark(this.name); - } - }; - }, - markdownTokenName: "em", - parseMarkdown: (token, helpers) => { - return helpers.applyMark("italic", helpers.parseInline(token.tokens || [])); - }, - markdownOptions: { - htmlReopen: { - open: "", - close: "" - } - }, - renderMarkdown: (node, h) => { - return `*${h.renderChildren(node)}*`; - }, - addKeyboardShortcuts() { - return { - "Mod-i": () => this.editor.commands.toggleItalic(), - "Mod-I": () => this.editor.commands.toggleItalic() - }; - }, - addInputRules() { - return [ - (0, import_core.markInputRule)({ - find: starInputRegex, - type: this.type - }), - (0, import_core.markInputRule)({ - find: underscoreInputRegex, - type: this.type - }) - ]; - }, - addPasteRules() { - return [ - (0, import_core.markPasteRule)({ - find: starPasteRegex, - type: this.type - }), - (0, import_core.markPasteRule)({ - find: underscorePasteRegex, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = Italic; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Italic, - starInputRegex, - starPasteRegex, - underscoreInputRegex, - underscorePasteRegex -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.cjs.map deleted file mode 100644 index e1b0089..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/italic.ts"],"sourcesContent":["import { Italic } from './italic.js'\n\nexport * from './italic.js'\n\nexport default Italic\n","import { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core'\n\nexport interface ItalicOptions {\n /**\n * HTML attributes to add to the italic element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n italic: {\n /**\n * Set an italic mark\n * @example editor.commands.setItalic()\n */\n setItalic: () => ReturnType\n /**\n * Toggle an italic mark\n * @example editor.commands.toggleItalic()\n */\n toggleItalic: () => ReturnType\n /**\n * Unset an italic mark\n * @example editor.commands.unsetItalic()\n */\n unsetItalic: () => ReturnType\n }\n }\n}\n\n/**\n * Matches an italic to a *italic* on input.\n */\nexport const starInputRegex = /(?:^|\\s)(\\*(?!\\s+\\*)((?:[^*]+))\\*(?!\\s+\\*))$/\n\n/**\n * Matches an italic to a *italic* on paste.\n */\nexport const starPasteRegex = /(?:^|\\s)(\\*(?!\\s+\\*)((?:[^*]+))\\*(?!\\s+\\*))/g\n\n/**\n * Matches an italic to a _italic_ on input.\n */\nexport const underscoreInputRegex = /(?:^|\\s)(_(?!\\s+_)((?:[^_]+))_(?!\\s+_))$/\n\n/**\n * Matches an italic to a _italic_ on paste.\n */\nexport const underscorePasteRegex = /(?:^|\\s)(_(?!\\s+_)((?:[^_]+))_(?!\\s+_))/g\n\n/**\n * This extension allows you to create italic text.\n * @see https://www.tiptap.dev/api/marks/italic\n */\nexport const Italic = Mark.create({\n name: 'italic',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'em',\n },\n {\n tag: 'i',\n getAttrs: node => (node as HTMLElement).style.fontStyle !== 'normal' && null,\n },\n {\n style: 'font-style=normal',\n clearMark: mark => mark.type.name === this.name,\n },\n {\n style: 'font-style=italic',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['em', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addCommands() {\n return {\n setItalic:\n () =>\n ({ commands }) => {\n return commands.setMark(this.name)\n },\n toggleItalic:\n () =>\n ({ commands }) => {\n return commands.toggleMark(this.name)\n },\n unsetItalic:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name)\n },\n }\n },\n\n markdownTokenName: 'em',\n\n parseMarkdown: (token, helpers) => {\n // Convert 'em' token to italic mark\n return helpers.applyMark('italic', helpers.parseInline(token.tokens || []))\n },\n\n markdownOptions: {\n htmlReopen: {\n open: '',\n close: '',\n },\n },\n\n renderMarkdown: (node, h) => {\n return `*${h.renderChildren(node)}*`\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-i': () => this.editor.commands.toggleItalic(),\n 'Mod-I': () => this.editor.commands.toggleItalic(),\n }\n },\n\n addInputRules() {\n return [\n markInputRule({\n find: starInputRegex,\n type: this.type,\n }),\n markInputRule({\n find: underscoreInputRegex,\n type: this.type,\n }),\n ]\n },\n\n addPasteRules() {\n return [\n markPasteRule({\n find: starPasteRegex,\n type: this.type,\n }),\n markPasteRule({\n find: underscorePasteRegex,\n type: this.type,\n }),\n ]\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAoE;AAoC7D,IAAM,iBAAiB;AAKvB,IAAM,iBAAiB;AAKvB,IAAM,uBAAuB;AAK7B,IAAM,uBAAuB;AAM7B,IAAM,SAAS,iBAAK,OAAsB;AAAA,EAC/C,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,YAAY;AACV,WAAO;AAAA,MACL;AAAA,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AA,UACL,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,UACD,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,UACL,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,UACD,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;AD3JD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.d.cts deleted file mode 100644 index adf14a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.d.cts +++ /dev/null @@ -1,54 +0,0 @@ -import { Mark } from '@tiptap/core'; - -interface ItalicOptions { - /** - * HTML attributes to add to the italic element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - italic: { - /** - * Set an italic mark - * @example editor.commands.setItalic() - */ - setItalic: () => ReturnType; - /** - * Toggle an italic mark - * @example editor.commands.toggleItalic() - */ - toggleItalic: () => ReturnType; - /** - * Unset an italic mark - * @example editor.commands.unsetItalic() - */ - unsetItalic: () => ReturnType; - }; - } -} -/** - * Matches an italic to a *italic* on input. - */ -declare const starInputRegex: RegExp; -/** - * Matches an italic to a *italic* on paste. - */ -declare const starPasteRegex: RegExp; -/** - * Matches an italic to a _italic_ on input. - */ -declare const underscoreInputRegex: RegExp; -/** - * Matches an italic to a _italic_ on paste. - */ -declare const underscorePasteRegex: RegExp; -/** - * This extension allows you to create italic text. - * @see https://www.tiptap.dev/api/marks/italic - */ -declare const Italic: Mark; - -export { Italic, type ItalicOptions, Italic as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.d.ts deleted file mode 100644 index adf14a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Mark } from '@tiptap/core'; - -interface ItalicOptions { - /** - * HTML attributes to add to the italic element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - italic: { - /** - * Set an italic mark - * @example editor.commands.setItalic() - */ - setItalic: () => ReturnType; - /** - * Toggle an italic mark - * @example editor.commands.toggleItalic() - */ - toggleItalic: () => ReturnType; - /** - * Unset an italic mark - * @example editor.commands.unsetItalic() - */ - unsetItalic: () => ReturnType; - }; - } -} -/** - * Matches an italic to a *italic* on input. - */ -declare const starInputRegex: RegExp; -/** - * Matches an italic to a *italic* on paste. - */ -declare const starPasteRegex: RegExp; -/** - * Matches an italic to a _italic_ on input. - */ -declare const underscoreInputRegex: RegExp; -/** - * Matches an italic to a _italic_ on paste. - */ -declare const underscorePasteRegex: RegExp; -/** - * This extension allows you to create italic text. - * @see https://www.tiptap.dev/api/marks/italic - */ -declare const Italic: Mark; - -export { Italic, type ItalicOptions, Italic as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.js deleted file mode 100644 index 097db8c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.js +++ /dev/null @@ -1,103 +0,0 @@ -// src/italic.ts -import { Mark, markInputRule, markPasteRule, mergeAttributes } from "@tiptap/core"; -var starInputRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/; -var starPasteRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g; -var underscoreInputRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/; -var underscorePasteRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g; -var Italic = Mark.create({ - name: "italic", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - parseHTML() { - return [ - { - tag: "em" - }, - { - tag: "i", - getAttrs: (node) => node.style.fontStyle !== "normal" && null - }, - { - style: "font-style=normal", - clearMark: (mark) => mark.type.name === this.name - }, - { - style: "font-style=italic" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["em", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - addCommands() { - return { - setItalic: () => ({ commands }) => { - return commands.setMark(this.name); - }, - toggleItalic: () => ({ commands }) => { - return commands.toggleMark(this.name); - }, - unsetItalic: () => ({ commands }) => { - return commands.unsetMark(this.name); - } - }; - }, - markdownTokenName: "em", - parseMarkdown: (token, helpers) => { - return helpers.applyMark("italic", helpers.parseInline(token.tokens || [])); - }, - markdownOptions: { - htmlReopen: { - open: "", - close: "" - } - }, - renderMarkdown: (node, h) => { - return `*${h.renderChildren(node)}*`; - }, - addKeyboardShortcuts() { - return { - "Mod-i": () => this.editor.commands.toggleItalic(), - "Mod-I": () => this.editor.commands.toggleItalic() - }; - }, - addInputRules() { - return [ - markInputRule({ - find: starInputRegex, - type: this.type - }), - markInputRule({ - find: underscoreInputRegex, - type: this.type - }) - ]; - }, - addPasteRules() { - return [ - markPasteRule({ - find: starPasteRegex, - type: this.type - }), - markPasteRule({ - find: underscorePasteRegex, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = Italic; -export { - Italic, - index_default as default, - starInputRegex, - starPasteRegex, - underscoreInputRegex, - underscorePasteRegex -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.js.map deleted file mode 100644 index 7cfa8af..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/italic.ts","../src/index.ts"],"sourcesContent":["import { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core'\n\nexport interface ItalicOptions {\n /**\n * HTML attributes to add to the italic element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n italic: {\n /**\n * Set an italic mark\n * @example editor.commands.setItalic()\n */\n setItalic: () => ReturnType\n /**\n * Toggle an italic mark\n * @example editor.commands.toggleItalic()\n */\n toggleItalic: () => ReturnType\n /**\n * Unset an italic mark\n * @example editor.commands.unsetItalic()\n */\n unsetItalic: () => ReturnType\n }\n }\n}\n\n/**\n * Matches an italic to a *italic* on input.\n */\nexport const starInputRegex = /(?:^|\\s)(\\*(?!\\s+\\*)((?:[^*]+))\\*(?!\\s+\\*))$/\n\n/**\n * Matches an italic to a *italic* on paste.\n */\nexport const starPasteRegex = /(?:^|\\s)(\\*(?!\\s+\\*)((?:[^*]+))\\*(?!\\s+\\*))/g\n\n/**\n * Matches an italic to a _italic_ on input.\n */\nexport const underscoreInputRegex = /(?:^|\\s)(_(?!\\s+_)((?:[^_]+))_(?!\\s+_))$/\n\n/**\n * Matches an italic to a _italic_ on paste.\n */\nexport const underscorePasteRegex = /(?:^|\\s)(_(?!\\s+_)((?:[^_]+))_(?!\\s+_))/g\n\n/**\n * This extension allows you to create italic text.\n * @see https://www.tiptap.dev/api/marks/italic\n */\nexport const Italic = Mark.create({\n name: 'italic',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'em',\n },\n {\n tag: 'i',\n getAttrs: node => (node as HTMLElement).style.fontStyle !== 'normal' && null,\n },\n {\n style: 'font-style=normal',\n clearMark: mark => mark.type.name === this.name,\n },\n {\n style: 'font-style=italic',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['em', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addCommands() {\n return {\n setItalic:\n () =>\n ({ commands }) => {\n return commands.setMark(this.name)\n },\n toggleItalic:\n () =>\n ({ commands }) => {\n return commands.toggleMark(this.name)\n },\n unsetItalic:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name)\n },\n }\n },\n\n markdownTokenName: 'em',\n\n parseMarkdown: (token, helpers) => {\n // Convert 'em' token to italic mark\n return helpers.applyMark('italic', helpers.parseInline(token.tokens || []))\n },\n\n markdownOptions: {\n htmlReopen: {\n open: '',\n close: '',\n },\n },\n\n renderMarkdown: (node, h) => {\n return `*${h.renderChildren(node)}*`\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-i': () => this.editor.commands.toggleItalic(),\n 'Mod-I': () => this.editor.commands.toggleItalic(),\n }\n },\n\n addInputRules() {\n return [\n markInputRule({\n find: starInputRegex,\n type: this.type,\n }),\n markInputRule({\n find: underscoreInputRegex,\n type: this.type,\n }),\n ]\n },\n\n addPasteRules() {\n return [\n markPasteRule({\n find: starPasteRegex,\n type: this.type,\n }),\n markPasteRule({\n find: underscorePasteRegex,\n type: this.type,\n }),\n ]\n },\n})\n","import { Italic } from './italic.js'\n\nexport * from './italic.js'\n\nexport default Italic\n"],"mappings":";AAAA,SAAS,MAAM,eAAe,eAAe,uBAAuB;AAoC7D,IAAM,iBAAiB;AAKvB,IAAM,iBAAiB;AAKvB,IAAM,uBAAuB;AAK7B,IAAM,uBAAuB;AAM7B,IAAM,SAAS,KAAK,OAAsB;AAAA,EAC/C,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,YAAY;AACV,WAAO;AAAA,MACL;AAAA,QACE,KAAK;AAAA,MACP;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,UAAU,UAAS,KAAqB,MAAM,cAAc,YAAY;AAAA,MAC1E;AAAA,MACA;AAAA,QACE,OAAO;AAAA,QACP,WAAW,UAAQ,KAAK,KAAK,SAAS,KAAK;AAAA,MAC7C;AAAA,MACA;AAAA,QACE,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO,CAAC,MAAM,gBAAgB,KAAK,QAAQ,gBAAgB,cAAc,GAAG,CAAC;AAAA,EAC/E;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,WACE,MACA,CAAC,EAAE,SAAS,MAA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@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/package.json deleted file mode 100644 index 126b5de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-italic", - "version": "3.26.0", - "description": "italic extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-italic" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/src/index.ts deleted file mode 100644 index c76a706..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Italic } from './italic.js' - -export * from './italic.js' - -export default Italic diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/src/italic.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/src/italic.ts deleted file mode 100644 index 58bfc48..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic/src/italic.ts +++ /dev/null @@ -1,160 +0,0 @@ -import { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core' - -export interface ItalicOptions { - /** - * HTML attributes to add to the italic element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record -} - -declare module '@tiptap/core' { - interface Commands { - italic: { - /** - * Set an italic mark - * @example editor.commands.setItalic() - */ - setItalic: () => ReturnType - /** - * Toggle an italic mark - * @example editor.commands.toggleItalic() - */ - toggleItalic: () => ReturnType - /** - * Unset an italic mark - * @example editor.commands.unsetItalic() - */ - unsetItalic: () => ReturnType - } - } -} - -/** - * Matches an italic to a *italic* on input. - */ -export const starInputRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/ - -/** - * Matches an italic to a *italic* on paste. - */ -export const starPasteRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g - -/** - * Matches an italic to a _italic_ on input. - */ -export const underscoreInputRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/ - -/** - * Matches an italic to a _italic_ on paste. - */ -export const underscorePasteRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g - -/** - * This extension allows you to create italic text. - * @see https://www.tiptap.dev/api/marks/italic - */ -export const Italic = Mark.create({ - name: 'italic', - - addOptions() { - return { - HTMLAttributes: {}, - } - }, - - parseHTML() { - return [ - { - tag: 'em', - }, - { - tag: 'i', - getAttrs: node => (node as HTMLElement).style.fontStyle !== 'normal' && null, - }, - { - style: 'font-style=normal', - clearMark: mark => mark.type.name === this.name, - }, - { - style: 'font-style=italic', - }, - ] - }, - - renderHTML({ HTMLAttributes }) { - return ['em', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] - }, - - addCommands() { - return { - setItalic: - () => - ({ commands }) => { - return commands.setMark(this.name) - }, - toggleItalic: - () => - ({ commands }) => { - return commands.toggleMark(this.name) - }, - unsetItalic: - () => - ({ commands }) => { - return commands.unsetMark(this.name) - }, - } - }, - - markdownTokenName: 'em', - - parseMarkdown: (token, helpers) => { - // Convert 'em' token to italic mark - return helpers.applyMark('italic', helpers.parseInline(token.tokens || [])) - }, - - markdownOptions: { - htmlReopen: { - open: '', - close: '', - }, - }, - - renderMarkdown: (node, h) => { - return `*${h.renderChildren(node)}*` - }, - - addKeyboardShortcuts() { - return { - 'Mod-i': () => this.editor.commands.toggleItalic(), - 'Mod-I': () => this.editor.commands.toggleItalic(), - } - }, - - addInputRules() { - return [ - markInputRule({ - find: starInputRegex, - type: this.type, - }), - markInputRule({ - find: underscoreInputRegex, - type: this.type, - }), - ] - }, - - addPasteRules() { - return [ - markPasteRule({ - find: starPasteRegex, - type: this.type, - }), - markPasteRule({ - find: underscorePasteRegex, - type: this.type, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/README.md deleted file mode 100644 index dbbaba3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-link - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-link.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-link) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-link.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-link.svg)](https://www.npmjs.com/package/@tiptap/extension-link) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.cjs deleted file mode 100644 index cbfb904..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.cjs +++ /dev/null @@ -1,503 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Link: () => Link, - default: () => index_default, - isAllowedUri: () => isAllowedUri, - pasteRegex: () => pasteRegex -}); -module.exports = __toCommonJS(index_exports); - -// src/link.ts -var import_core3 = require("@tiptap/core"); -var import_linkifyjs3 = require("linkifyjs"); - -// src/helpers/autolink.ts -var import_core = require("@tiptap/core"); -var import_state = require("@tiptap/pm/state"); -var import_linkifyjs = require("linkifyjs"); - -// src/helpers/whitespace.ts -var UNICODE_WHITESPACE_PATTERN = "[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]"; -var UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN); -var UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`); -var UNICODE_WHITESPACE_REGEX_GLOBAL = new RegExp(UNICODE_WHITESPACE_PATTERN, "g"); - -// src/helpers/autolink.ts -function isValidLinkStructure(tokens) { - if (tokens.length === 1) { - return tokens[0].isLink; - } - if (tokens.length === 3 && tokens[1].isLink) { - return ["()", "[]"].includes(tokens[0].value + tokens[2].value); - } - return false; -} -function autolink(options) { - return new import_state.Plugin({ - key: new import_state.PluginKey("autolink"), - appendTransaction: (transactions, oldState, newState) => { - const docChanges = transactions.some((transaction) => transaction.docChanged) && !oldState.doc.eq(newState.doc); - const preventAutolink = transactions.some( - (transaction) => transaction.getMeta("preventAutolink") - ); - if (!docChanges || preventAutolink) { - return; - } - const { tr } = newState; - const transform = (0, import_core.combineTransactionSteps)(oldState.doc, [...transactions]); - const changes = (0, import_core.getChangedRanges)(transform); - changes.forEach(({ newRange }) => { - const nodesInChangedRanges = (0, import_core.findChildrenInRange)( - newState.doc, - newRange, - (node) => node.isTextblock - ); - let textBlock; - let textBeforeWhitespace; - if (nodesInChangedRanges.length > 1) { - textBlock = nodesInChangedRanges[0]; - textBeforeWhitespace = newState.doc.textBetween( - textBlock.pos, - textBlock.pos + textBlock.node.nodeSize, - void 0, - " " - ); - } else if (nodesInChangedRanges.length) { - const endText = newState.doc.textBetween(newRange.from, newRange.to, " ", " "); - if (!UNICODE_WHITESPACE_REGEX_END.test(endText)) { - return; - } - textBlock = nodesInChangedRanges[0]; - textBeforeWhitespace = newState.doc.textBetween( - textBlock.pos, - newRange.to, - void 0, - " " - ); - } - if (textBlock && textBeforeWhitespace) { - const wordsBeforeWhitespace = textBeforeWhitespace.split(UNICODE_WHITESPACE_REGEX).filter(Boolean); - if (wordsBeforeWhitespace.length <= 0) { - return false; - } - const lastWordBeforeSpace = wordsBeforeWhitespace[wordsBeforeWhitespace.length - 1]; - const lastWordAndBlockOffset = textBlock.pos + textBeforeWhitespace.lastIndexOf(lastWordBeforeSpace); - if (!lastWordBeforeSpace) { - return false; - } - const linksBeforeSpace = (0, import_linkifyjs.tokenize)(lastWordBeforeSpace).map( - (t) => t.toObject(options.defaultProtocol) - ); - if (!isValidLinkStructure(linksBeforeSpace)) { - return false; - } - linksBeforeSpace.filter((link) => link.isLink).map((link) => ({ - ...link, - from: lastWordAndBlockOffset + link.start + 1, - to: lastWordAndBlockOffset + link.end + 1 - })).filter((link) => { - if (!newState.schema.marks.code) { - return true; - } - return !newState.doc.rangeHasMark(link.from, link.to, newState.schema.marks.code); - }).filter((link) => options.validate(link.value)).filter((link) => options.shouldAutoLink(link.value)).forEach((link) => { - if ((0, import_core.getMarksBetween)(link.from, link.to, newState.doc).some( - (item) => item.mark.type === options.type - )) { - return; - } - tr.addMark( - link.from, - link.to, - options.type.create({ - href: link.href - }) - ); - }); - } - }); - if (!tr.steps.length) { - return; - } - return tr; - } - }); -} - -// src/helpers/clickHandler.ts -var import_core2 = require("@tiptap/core"); -var import_state2 = require("@tiptap/pm/state"); -function clickHandler(options) { - return new import_state2.Plugin({ - key: new import_state2.PluginKey("handleClickLink"), - props: { - handleClick: (view, pos, event) => { - var _a, _b; - if (event.button !== 0) { - return false; - } - if (!view.editable) { - return false; - } - let link = null; - if (event.target instanceof HTMLAnchorElement) { - link = event.target; - } else { - const target = event.target; - if (!target) { - return false; - } - const root = options.editor.view.dom; - link = target.closest("a"); - if (link && !root.contains(link)) { - link = null; - } - } - if (!link) { - return false; - } - let handled = false; - if (options.enableClickSelection) { - const commandResult = options.editor.commands.extendMarkRange(options.type.name); - handled = commandResult; - } - if (options.openOnClick) { - const attrs = (0, import_core2.getAttributes)(view.state, options.type.name); - const href = (_a = link.href) != null ? _a : attrs.href; - const target = (_b = link.target) != null ? _b : attrs.target; - if (href) { - window.open(href, target); - handled = true; - } - } - return handled; - } - } - }); -} - -// src/helpers/pasteHandler.ts -var import_state3 = require("@tiptap/pm/state"); -var import_linkifyjs2 = require("linkifyjs"); -function pasteHandler(options) { - return new import_state3.Plugin({ - key: new import_state3.PluginKey("handlePasteLink"), - props: { - handlePaste: (view, _event, slice) => { - const { shouldAutoLink } = options; - const { state } = view; - const { selection } = state; - const { empty } = selection; - if (empty) { - return false; - } - let textContent = ""; - slice.content.forEach((node) => { - textContent += node.textContent; - }); - const link = (0, import_linkifyjs2.find)(textContent, { defaultProtocol: options.defaultProtocol }).find( - (item) => item.isLink && item.value === textContent - ); - if (!textContent || !link || shouldAutoLink !== void 0 && !shouldAutoLink(link.value)) { - return false; - } - return options.editor.commands.setMark(options.type, { - href: link.href - }); - } - } - }); -} - -// src/link.ts -var pasteRegex = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi; -function isAllowedUri(uri, protocols) { - const allowedProtocols = [ - "http", - "https", - "ftp", - "ftps", - "mailto", - "tel", - "callto", - "sms", - "cid", - "xmpp" - ]; - if (protocols) { - protocols.forEach((protocol) => { - const nextProtocol = typeof protocol === "string" ? protocol : protocol.scheme; - if (nextProtocol) { - allowedProtocols.push(nextProtocol); - } - }); - } - return !uri || uri.replace(UNICODE_WHITESPACE_REGEX_GLOBAL, "").match( - new RegExp( - // oxlint-disable-next-line no-useless-escape - `^(?:(?:${allowedProtocols.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`, - "i" - ) - ); -} -var Link = import_core3.Mark.create({ - name: "link", - priority: 1e3, - keepOnSplit: false, - exitable: true, - onCreate() { - if (this.options.validate && !this.options.shouldAutoLink) { - this.options.shouldAutoLink = this.options.validate; - console.warn( - "The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead." - ); - } - this.options.protocols.forEach((protocol) => { - if (typeof protocol === "string") { - (0, import_linkifyjs3.registerCustomProtocol)(protocol); - return; - } - (0, import_linkifyjs3.registerCustomProtocol)(protocol.scheme, protocol.optionalSlashes); - }); - }, - onDestroy() { - (0, import_linkifyjs3.reset)(); - }, - inclusive() { - return this.options.autolink; - }, - addOptions() { - return { - openOnClick: true, - enableClickSelection: false, - linkOnPaste: true, - autolink: true, - protocols: [], - defaultProtocol: "http", - HTMLAttributes: { - target: "_blank", - rel: "noopener noreferrer nofollow", - class: null - }, - isAllowedUri: (url, ctx) => !!isAllowedUri(url, ctx.protocols), - validate: (url) => !!url, - shouldAutoLink: (url) => { - const hasProtocol = /^[a-z][a-z0-9+.-]*:\/\//i.test(url); - const hasMaybeProtocol = /^[a-z][a-z0-9+.-]*:/i.test(url); - if (hasProtocol || hasMaybeProtocol && !url.includes("@")) { - return true; - } - const urlWithoutUserinfo = url.includes("@") ? url.split("@").pop() : url; - const hostname = urlWithoutUserinfo.split(/[/?#:]/)[0]; - if (/^\d{1,3}(\.\d{1,3}){3}$/.test(hostname)) { - return false; - } - if (!/\./.test(hostname)) { - return false; - } - return true; - } - }; - }, - addAttributes() { - return { - href: { - default: null, - parseHTML(element) { - return element.getAttribute("href"); - } - }, - target: { - default: this.options.HTMLAttributes.target - }, - rel: { - default: this.options.HTMLAttributes.rel - }, - class: { - default: this.options.HTMLAttributes.class - }, - title: { - default: null - } - }; - }, - parseHTML() { - return [ - { - tag: "a[href]", - getAttrs: (dom) => { - const href = dom.getAttribute("href"); - if (!href || !this.options.isAllowedUri(href, { - defaultValidate: (url) => !!isAllowedUri(url, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol - })) { - return false; - } - return null; - } - } - ]; - }, - renderHTML({ HTMLAttributes }) { - if (!this.options.isAllowedUri(HTMLAttributes.href, { - defaultValidate: (href) => !!isAllowedUri(href, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol - })) { - return ["a", (0, import_core3.mergeAttributes)(this.options.HTMLAttributes, { ...HTMLAttributes, href: "" }), 0]; - } - return ["a", (0, import_core3.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "link", - parseMarkdown: (token, helpers) => { - return helpers.applyMark("link", helpers.parseInline(token.tokens || []), { - href: token.href, - title: token.title || null - }); - }, - renderMarkdown: (node, h) => { - var _a, _b, _c, _d; - const href = (_b = (_a = node.attrs) == null ? void 0 : _a.href) != null ? _b : ""; - const title = (_d = (_c = node.attrs) == null ? void 0 : _c.title) != null ? _d : ""; - const text = h.renderChildren(node); - return title ? `[${text}](${href} "${title}")` : `[${text}](${href})`; - }, - addCommands() { - return { - setLink: (attributes) => ({ chain }) => { - const { href } = attributes; - if (!this.options.isAllowedUri(href, { - defaultValidate: (url) => !!isAllowedUri(url, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol - })) { - return false; - } - return chain().setMark(this.name, attributes).setMeta("preventAutolink", true).run(); - }, - toggleLink: (attributes) => ({ chain }) => { - const { href } = attributes || {}; - if (href && !this.options.isAllowedUri(href, { - defaultValidate: (url) => !!isAllowedUri(url, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol - })) { - return false; - } - return chain().toggleMark(this.name, attributes, { extendEmptyMarkRange: true }).setMeta("preventAutolink", true).run(); - }, - unsetLink: () => ({ chain }) => { - return chain().unsetMark(this.name, { extendEmptyMarkRange: true }).setMeta("preventAutolink", true).run(); - } - }; - }, - addPasteRules() { - return [ - (0, import_core3.markPasteRule)({ - find: (text) => { - const foundLinks = []; - if (text) { - const { protocols, defaultProtocol } = this.options; - const links = (0, import_linkifyjs3.find)(text).filter( - (item) => item.isLink && this.options.isAllowedUri(item.value, { - defaultValidate: (href) => !!isAllowedUri(href, protocols), - protocols, - defaultProtocol - }) - ); - if (links.length) { - links.forEach((link) => { - if (!this.options.shouldAutoLink(link.value)) { - return; - } - foundLinks.push({ - text: link.value, - data: { - href: link.href - }, - index: link.start - }); - }); - } - } - return foundLinks; - }, - type: this.type, - getAttributes: (match) => { - var _a; - return { - href: (_a = match.data) == null ? void 0 : _a.href - }; - } - }) - ]; - }, - addProseMirrorPlugins() { - const plugins = []; - const { protocols, defaultProtocol } = this.options; - if (this.options.autolink) { - plugins.push( - autolink({ - type: this.type, - defaultProtocol: this.options.defaultProtocol, - validate: (url) => this.options.isAllowedUri(url, { - defaultValidate: (href) => !!isAllowedUri(href, protocols), - protocols, - defaultProtocol - }), - shouldAutoLink: this.options.shouldAutoLink - }) - ); - } - plugins.push( - clickHandler({ - type: this.type, - editor: this.editor, - openOnClick: this.options.openOnClick === "whenNotEditable" ? true : this.options.openOnClick, - enableClickSelection: this.options.enableClickSelection - }) - ); - if (this.options.linkOnPaste) { - plugins.push( - pasteHandler({ - editor: this.editor, - defaultProtocol: this.options.defaultProtocol, - type: this.type, - shouldAutoLink: this.options.shouldAutoLink - }) - ); - } - return plugins; - } -}); - -// src/index.ts -var index_default = Link; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Link, - isAllowedUri, - pasteRegex -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.cjs.map deleted file mode 100644 index 2b6ef31..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/link.ts","../src/helpers/autolink.ts","../src/helpers/whitespace.ts","../src/helpers/clickHandler.ts","../src/helpers/pasteHandler.ts"],"sourcesContent":["import { Link } from './link.js'\n\nexport * from './link.js'\n\nexport default Link\n","import type { PasteRuleMatch } from '@tiptap/core'\nimport { Mark, markPasteRule, mergeAttributes } from '@tiptap/core'\nimport type { Plugin } from '@tiptap/pm/state'\nimport { find, registerCustomProtocol, reset } from 'linkifyjs'\n\nimport { autolink } from './helpers/autolink.js'\nimport { clickHandler } from './helpers/clickHandler.js'\nimport { pasteHandler } from './helpers/pasteHandler.js'\nimport { UNICODE_WHITESPACE_REGEX_GLOBAL } from './helpers/whitespace.js'\n\nexport interface LinkProtocolOptions {\n /**\n * The protocol scheme to be registered.\n * @default '''\n * @example 'ftp'\n * @example 'git'\n */\n scheme: string\n\n /**\n * If enabled, it allows optional slashes after the protocol.\n * @default false\n * @example true\n */\n optionalSlashes?: boolean\n}\n\nexport const pasteRegex =\n /https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z]{2,}\\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi\n\n/**\n * @deprecated The default behavior is now to open links when the editor is not editable.\n */\ntype DeprecatedOpenWhenNotEditable = 'whenNotEditable'\n\nexport interface LinkOptions {\n /**\n * If enabled, the extension will automatically add links as you type.\n * @default true\n * @example false\n */\n autolink: boolean\n\n /**\n * An array of custom protocols to be registered with linkifyjs.\n * @default []\n * @example ['ftp', 'git']\n */\n protocols: Array\n\n /**\n * Default protocol to use when no protocol is specified.\n * @default 'http'\n */\n defaultProtocol: string\n /**\n * If enabled, links will be opened on click.\n * @default true\n * @example false\n */\n openOnClick: boolean | DeprecatedOpenWhenNotEditable\n /**\n * If enabled, the link will be selected when clicked.\n * @default false\n * @example true\n */\n enableClickSelection: boolean\n /**\n * Adds a link to the current selection if the pasted content only contains an url.\n * @default true\n * @example false\n */\n linkOnPaste: boolean\n\n /**\n * HTML attributes to add to the link element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * @deprecated Use the `shouldAutoLink` option instead.\n * A validation function that modifies link verification for the auto linker.\n * @param url - The url to be validated.\n * @returns - True if the url is valid, false otherwise.\n */\n validate: (url: string) => boolean\n\n /**\n * A validation function which is used for configuring link verification for preventing XSS attacks.\n * Only modify this if you know what you're doing.\n *\n * @returns {boolean} `true` if the URL is valid, `false` otherwise.\n *\n * @example\n * isAllowedUri: (url, { defaultValidate, protocols, defaultProtocol }) => {\n * return url.startsWith('./') || defaultValidate(url)\n * }\n */\n isAllowedUri: (\n /**\n * The URL to be validated.\n */\n url: string,\n ctx: {\n /**\n * The default validation function.\n */\n defaultValidate: (url: string) => boolean\n /**\n * An array of allowed protocols for the URL (e.g., \"http\", \"https\"). As defined in the `protocols` option.\n */\n protocols: Array\n /**\n * A string that represents the default protocol (e.g., 'http'). As defined in the `defaultProtocol` option.\n */\n defaultProtocol: string\n },\n ) => boolean\n\n /**\n * Determines whether a valid link should be automatically linked in the content.\n *\n * @param {string} url - The URL that has already been validated.\n * @returns {boolean} - True if the link should be auto-linked; false if it should not be auto-linked.\n */\n shouldAutoLink: (url: string) => boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n link: {\n /**\n * Set a link mark\n * @param attributes The link attributes\n * @example editor.commands.setLink({ href: 'https://tiptap.dev' })\n */\n setLink: (attributes: {\n href: string\n target?: string | null\n rel?: string | null\n class?: string | null\n title?: string | null\n }) => ReturnType\n /**\n * Toggle a link mark\n * @param attributes The link attributes\n * @example editor.commands.toggleLink({ href: 'https://tiptap.dev' })\n */\n toggleLink: (attributes?: {\n href: string\n target?: string | null\n rel?: string | null\n class?: string | null\n title?: string | null\n }) => ReturnType\n /**\n * Unset a link mark\n * @example editor.commands.unsetLink()\n */\n unsetLink: () => ReturnType\n }\n }\n}\n\nexport function isAllowedUri(uri: string | undefined, protocols?: LinkOptions['protocols']) {\n const allowedProtocols: string[] = [\n 'http',\n 'https',\n 'ftp',\n 'ftps',\n 'mailto',\n 'tel',\n 'callto',\n 'sms',\n 'cid',\n 'xmpp',\n ]\n\n if (protocols) {\n protocols.forEach(protocol => {\n const nextProtocol = typeof protocol === 'string' ? protocol : protocol.scheme\n\n if (nextProtocol) {\n allowedProtocols.push(nextProtocol)\n }\n })\n }\n\n return (\n !uri ||\n uri.replace(UNICODE_WHITESPACE_REGEX_GLOBAL, '').match(\n new RegExp(\n // oxlint-disable-next-line no-useless-escape\n `^(?:(?:${allowedProtocols.join('|')}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,\n 'i',\n ),\n )\n )\n}\n\n/**\n * This extension allows you to create links.\n * @see https://www.tiptap.dev/api/marks/link\n */\nexport const Link = Mark.create({\n name: 'link',\n\n priority: 1000,\n\n keepOnSplit: false,\n\n exitable: true,\n\n onCreate() {\n // TODO: v4 - remove validate option\n if (this.options.validate && !this.options.shouldAutoLink) {\n // Copy the validate function to the shouldAutoLink option\n this.options.shouldAutoLink = this.options.validate\n console.warn(\n 'The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.',\n )\n }\n this.options.protocols.forEach(protocol => {\n if (typeof protocol === 'string') {\n registerCustomProtocol(protocol)\n return\n }\n registerCustomProtocol(protocol.scheme, protocol.optionalSlashes)\n })\n },\n\n onDestroy() {\n reset()\n },\n\n inclusive() {\n return this.options.autolink\n },\n\n addOptions() {\n return {\n openOnClick: true,\n enableClickSelection: false,\n linkOnPaste: true,\n autolink: true,\n protocols: [],\n defaultProtocol: 'http',\n HTMLAttributes: {\n target: '_blank',\n rel: 'noopener noreferrer nofollow',\n class: null,\n },\n isAllowedUri: (url, ctx) => !!isAllowedUri(url, ctx.protocols),\n validate: url => !!url,\n shouldAutoLink: url => {\n // URLs with explicit protocols (e.g., https://) should be auto-linked\n // But not if @ appears before :// (that would be userinfo like user:pass@host)\n const hasProtocol = /^[a-z][a-z0-9+.-]*:\\/\\//i.test(url)\n const hasMaybeProtocol = /^[a-z][a-z0-9+.-]*:/i.test(url)\n\n if (hasProtocol || (hasMaybeProtocol && !url.includes('@'))) {\n return true\n }\n // Strip userinfo (user:pass@) if present, then extract hostname\n const urlWithoutUserinfo = url.includes('@') ? url.split('@').pop()! : url\n const hostname = urlWithoutUserinfo.split(/[/?#:]/)[0]\n\n // Don't auto-link IP addresses without protocol\n if (/^\\d{1,3}(\\.\\d{1,3}){3}$/.test(hostname)) {\n return false\n }\n // Don't auto-link single-word hostnames without TLD (e.g., \"localhost\")\n if (!/\\./.test(hostname)) {\n return false\n }\n return true\n },\n }\n },\n\n addAttributes() {\n return {\n href: {\n default: null,\n parseHTML(element) {\n return element.getAttribute('href')\n },\n },\n target: {\n default: this.options.HTMLAttributes.target,\n },\n rel: {\n default: this.options.HTMLAttributes.rel,\n },\n class: {\n default: this.options.HTMLAttributes.class,\n },\n title: {\n default: null,\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'a[href]',\n getAttrs: dom => {\n const href = (dom as HTMLElement).getAttribute('href')\n\n // prevent XSS attacks\n if (\n !href ||\n !this.options.isAllowedUri(href, {\n defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n protocols: this.options.protocols,\n defaultProtocol: this.options.defaultProtocol,\n })\n ) {\n return false\n }\n return null\n },\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n // prevent XSS attacks\n if (\n !this.options.isAllowedUri(HTMLAttributes.href, {\n defaultValidate: href => !!isAllowedUri(href, this.options.protocols),\n protocols: this.options.protocols,\n defaultProtocol: this.options.defaultProtocol,\n })\n ) {\n // strip out the href\n return ['a', mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: '' }), 0]\n }\n\n return ['a', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'link',\n\n parseMarkdown: (token, helpers) => {\n return helpers.applyMark('link', helpers.parseInline(token.tokens || []), {\n href: token.href,\n title: token.title || null,\n })\n },\n\n renderMarkdown: (node, h) => {\n const href = node.attrs?.href ?? ''\n const title = node.attrs?.title ?? ''\n const text = h.renderChildren(node)\n\n return title ? `[${text}](${href} \"${title}\")` : `[${text}](${href})`\n },\n\n addCommands() {\n return {\n setLink:\n attributes =>\n ({ chain }) => {\n const { href } = attributes\n\n if (\n !this.options.isAllowedUri(href, {\n defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n protocols: this.options.protocols,\n defaultProtocol: this.options.defaultProtocol,\n })\n ) {\n return false\n }\n\n return chain().setMark(this.name, attributes).setMeta('preventAutolink', true).run()\n },\n\n toggleLink:\n attributes =>\n ({ chain }) => {\n const { href } = attributes || {}\n\n if (\n href &&\n !this.options.isAllowedUri(href, {\n defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n protocols: this.options.protocols,\n defaultProtocol: this.options.defaultProtocol,\n })\n ) {\n return false\n }\n\n return chain()\n .toggleMark(this.name, attributes, { extendEmptyMarkRange: true })\n .setMeta('preventAutolink', true)\n .run()\n },\n\n unsetLink:\n () =>\n ({ chain }) => {\n return chain()\n .unsetMark(this.name, { extendEmptyMarkRange: true })\n .setMeta('preventAutolink', true)\n .run()\n },\n }\n },\n\n addPasteRules() {\n return [\n markPasteRule({\n find: text => {\n const foundLinks: PasteRuleMatch[] = []\n\n if (text) {\n const { protocols, defaultProtocol } = this.options\n const links = find(text).filter(\n item =>\n item.isLink &&\n this.options.isAllowedUri(item.value, {\n defaultValidate: href => !!isAllowedUri(href, protocols),\n protocols,\n defaultProtocol,\n }),\n )\n\n if (links.length) {\n links.forEach(link => {\n if (!this.options.shouldAutoLink(link.value)) {\n return\n }\n\n foundLinks.push({\n text: link.value,\n data: {\n href: link.href,\n },\n index: link.start,\n })\n })\n }\n }\n\n return foundLinks\n },\n type: this.type,\n getAttributes: match => {\n return {\n href: match.data?.href,\n }\n },\n }),\n ]\n },\n\n addProseMirrorPlugins() {\n const plugins: Plugin[] = []\n const { protocols, defaultProtocol } = this.options\n\n if (this.options.autolink) {\n plugins.push(\n autolink({\n type: this.type,\n defaultProtocol: this.options.defaultProtocol,\n validate: url =>\n this.options.isAllowedUri(url, {\n defaultValidate: href => !!isAllowedUri(href, protocols),\n protocols,\n defaultProtocol,\n }),\n shouldAutoLink: this.options.shouldAutoLink,\n }),\n )\n }\n\n plugins.push(\n clickHandler({\n type: this.type,\n editor: this.editor,\n openOnClick:\n this.options.openOnClick === 'whenNotEditable' ? true : this.options.openOnClick,\n enableClickSelection: this.options.enableClickSelection,\n }),\n )\n\n if (this.options.linkOnPaste) {\n plugins.push(\n pasteHandler({\n editor: this.editor,\n defaultProtocol: this.options.defaultProtocol,\n type: this.type,\n shouldAutoLink: this.options.shouldAutoLink,\n }),\n )\n }\n\n return plugins\n },\n})\n","import type { NodeWithPos } from '@tiptap/core'\nimport {\n combineTransactionSteps,\n findChildrenInRange,\n getChangedRanges,\n getMarksBetween,\n} from '@tiptap/core'\nimport type { MarkType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport type { MultiToken } from 'linkifyjs'\nimport { tokenize } from 'linkifyjs'\n\nimport { UNICODE_WHITESPACE_REGEX, UNICODE_WHITESPACE_REGEX_END } from './whitespace.js'\n\n/**\n * Check if the provided tokens form a valid link structure, which can either be a single link token\n * or a link token surrounded by parentheses or square brackets.\n *\n * This ensures that only complete and valid text is hyperlinked, preventing cases where a valid\n * top-level domain (TLD) is immediately followed by an invalid character, like a number. For\n * example, with the `find` method from Linkify, entering `example.com1` would result in\n * `example.com` being linked and the trailing `1` left as plain text. By using the `tokenize`\n * method, we can perform more comprehensive validation on the input text.\n */\nfunction isValidLinkStructure(tokens: Array>) {\n if (tokens.length === 1) {\n return tokens[0].isLink\n }\n\n if (tokens.length === 3 && tokens[1].isLink) {\n return ['()', '[]'].includes(tokens[0].value + tokens[2].value)\n }\n\n return false\n}\n\ntype AutolinkOptions = {\n type: MarkType\n defaultProtocol: string\n validate: (url: string) => boolean\n shouldAutoLink: (url: string) => boolean\n}\n\n/**\n * This plugin allows you to automatically add links to your editor.\n * @param options The plugin options\n * @returns The plugin instance\n */\nexport function autolink(options: AutolinkOptions): Plugin {\n return new Plugin({\n key: new PluginKey('autolink'),\n appendTransaction: (transactions, oldState, newState) => {\n /**\n * Does the transaction change the document?\n */\n const docChanges =\n transactions.some(transaction => transaction.docChanged) && !oldState.doc.eq(newState.doc)\n\n /**\n * Prevent autolink if the transaction is not a document change or if the transaction has the meta `preventAutolink`.\n */\n const preventAutolink = transactions.some(transaction =>\n transaction.getMeta('preventAutolink'),\n )\n\n /**\n * Prevent autolink if the transaction is not a document change\n * or if the transaction has the meta `preventAutolink`.\n */\n if (!docChanges || preventAutolink) {\n return\n }\n\n const { tr } = newState\n const transform = combineTransactionSteps(oldState.doc, [...transactions])\n const changes = getChangedRanges(transform)\n\n changes.forEach(({ newRange }) => {\n // Now let’s see if we can add new links.\n const nodesInChangedRanges = findChildrenInRange(\n newState.doc,\n newRange,\n node => node.isTextblock,\n )\n\n let textBlock: NodeWithPos | undefined\n let textBeforeWhitespace: string | undefined\n\n if (nodesInChangedRanges.length > 1) {\n // Grab the first node within the changed ranges (ex. the first of two paragraphs when hitting enter).\n textBlock = nodesInChangedRanges[0]\n textBeforeWhitespace = newState.doc.textBetween(\n textBlock.pos,\n textBlock.pos + textBlock.node.nodeSize,\n undefined,\n ' ',\n )\n } else if (nodesInChangedRanges.length) {\n const endText = newState.doc.textBetween(newRange.from, newRange.to, ' ', ' ')\n if (!UNICODE_WHITESPACE_REGEX_END.test(endText)) {\n return\n }\n textBlock = nodesInChangedRanges[0]\n textBeforeWhitespace = newState.doc.textBetween(\n textBlock.pos,\n newRange.to,\n undefined,\n ' ',\n )\n }\n\n if (textBlock && textBeforeWhitespace) {\n const wordsBeforeWhitespace = textBeforeWhitespace\n .split(UNICODE_WHITESPACE_REGEX)\n .filter(Boolean)\n\n if (wordsBeforeWhitespace.length <= 0) {\n return false\n }\n\n const lastWordBeforeSpace = wordsBeforeWhitespace[wordsBeforeWhitespace.length - 1]\n const lastWordAndBlockOffset =\n textBlock.pos + textBeforeWhitespace.lastIndexOf(lastWordBeforeSpace)\n\n if (!lastWordBeforeSpace) {\n return false\n }\n\n const linksBeforeSpace = tokenize(lastWordBeforeSpace).map(t =>\n t.toObject(options.defaultProtocol),\n )\n\n if (!isValidLinkStructure(linksBeforeSpace)) {\n return false\n }\n\n linksBeforeSpace\n .filter(link => link.isLink)\n // Calculate link position.\n .map(link => ({\n ...link,\n from: lastWordAndBlockOffset + link.start + 1,\n to: lastWordAndBlockOffset + link.end + 1,\n }))\n // ignore link inside code mark\n .filter(link => {\n if (!newState.schema.marks.code) {\n return true\n }\n\n return !newState.doc.rangeHasMark(link.from, link.to, newState.schema.marks.code)\n })\n // validate link\n .filter(link => options.validate(link.value))\n // check whether should autolink\n .filter(link => options.shouldAutoLink(link.value))\n // Add link mark.\n .forEach(link => {\n if (\n getMarksBetween(link.from, link.to, newState.doc).some(\n item => item.mark.type === options.type,\n )\n ) {\n return\n }\n\n tr.addMark(\n link.from,\n link.to,\n options.type.create({\n href: link.href,\n }),\n )\n })\n }\n })\n\n if (!tr.steps.length) {\n return\n }\n\n return tr\n },\n })\n}\n","// From DOMPurify\n// https://github.com/cure53/DOMPurify/blob/main/src/regexp.ts\nexport const UNICODE_WHITESPACE_PATTERN =\n '[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]'\n\nexport const UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN)\nexport const UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`)\nexport const UNICODE_WHITESPACE_REGEX_GLOBAL = new RegExp(UNICODE_WHITESPACE_PATTERN, 'g')\n","import type { Editor } from '@tiptap/core'\nimport { getAttributes } from '@tiptap/core'\nimport type { MarkType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\ntype ClickHandlerOptions = {\n type: MarkType\n editor: Editor\n openOnClick?: boolean\n enableClickSelection?: boolean\n}\n\nexport function clickHandler(options: ClickHandlerOptions): Plugin {\n return new Plugin({\n key: new PluginKey('handleClickLink'),\n props: {\n handleClick: (view, pos, event) => {\n if (event.button !== 0) {\n return false\n }\n\n if (!view.editable) {\n return false\n }\n\n let link: HTMLAnchorElement | null = null\n\n if (event.target instanceof HTMLAnchorElement) {\n link = event.target\n } else {\n const target = event.target as HTMLElement | null\n if (!target) {\n return false\n }\n\n const root = options.editor.view.dom\n\n // Tntentionally limit the lookup to the editor root.\n // Using tag names like DIV as boundaries breaks with custom NodeViews,\n link = target.closest('a')\n\n if (link && !root.contains(link)) {\n link = null\n }\n }\n\n if (!link) {\n return false\n }\n\n let handled = false\n\n if (options.enableClickSelection) {\n const commandResult = options.editor.commands.extendMarkRange(options.type.name)\n handled = commandResult\n }\n\n if (options.openOnClick) {\n const attrs = getAttributes(view.state, options.type.name)\n const href = link.href ?? attrs.href\n const target = link.target ?? attrs.target\n\n if (href) {\n window.open(href, target)\n handled = true\n }\n }\n\n return handled\n },\n },\n })\n}\n","import type { Editor } from '@tiptap/core'\nimport type { MarkType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { find } from 'linkifyjs'\n\nimport type { LinkOptions } from '../link.js'\n\ntype PasteHandlerOptions = {\n editor: Editor\n defaultProtocol: string\n type: MarkType\n shouldAutoLink?: LinkOptions['shouldAutoLink']\n}\n\nexport function pasteHandler(options: PasteHandlerOptions): Plugin {\n return new Plugin({\n key: new PluginKey('handlePasteLink'),\n props: {\n handlePaste: (view, _event, slice) => {\n const { shouldAutoLink } = options\n const { state } = view\n const { selection } = state\n const { empty } = selection\n\n if (empty) {\n return false\n }\n\n let textContent = ''\n\n slice.content.forEach(node => {\n textContent += node.textContent\n })\n\n const link = find(textContent, { defaultProtocol: options.defaultProtocol }).find(\n item => item.isLink && item.value === textContent,\n )\n\n if (\n !textContent ||\n !link ||\n (shouldAutoLink !== undefined && !shouldAutoLink(link.value))\n ) {\n return false\n }\n\n return options.editor.commands.setMark(options.type, {\n href: link.href,\n })\n },\n },\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,IAAAA,eAAqD;AAErD,IAAAC,oBAAoD;;;ACFpD,kBAKO;AAEP,mBAAkC;AAElC,uBAAyB;;;ACRlB,IAAM,6BACX;AAEK,IAAM,2BAA2B,IAAI,OAAO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AAK,QAAQ,aAAa;AAC5B,cAAQ;AAAA,QACN,aAAa;AAAA,UACX,QAAQ,KAAK;AAAA,UACb,iBAAiB,KAAK,QAAQ;AAAA,UAC9B,MAAM,KAAK;AAAA,UACX,gBAAgB,KAAK,QAAQ;AAAA,QAC/B,CAAC;AAAA,MACH;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AACF,CAAC;;;ADrfD,IAAO,gBAAQ;","names":["import_core","import_linkifyjs","import_core","import_state","import_state","import_linkifyjs"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.d.cts deleted file mode 100644 index 212de4f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.d.cts +++ /dev/null @@ -1,151 +0,0 @@ -import { Mark } from '@tiptap/core'; - -interface LinkProtocolOptions { - /** - * The protocol scheme to be registered. - * @default ''' - * @example 'ftp' - * @example 'git' - */ - scheme: string; - /** - * If enabled, it allows optional slashes after the protocol. - * @default false - * @example true - */ - optionalSlashes?: boolean; -} -declare const pasteRegex: RegExp; -/** - * @deprecated The default behavior is now to open links when the editor is not editable. - */ -type DeprecatedOpenWhenNotEditable = 'whenNotEditable'; -interface LinkOptions { - /** - * If enabled, the extension will automatically add links as you type. - * @default true - * @example false - */ - autolink: boolean; - /** - * An array of custom protocols to be registered with linkifyjs. - * @default [] - * @example ['ftp', 'git'] - */ - protocols: Array; - /** - * Default protocol to use when no protocol is specified. - * @default 'http' - */ - defaultProtocol: string; - /** - * If enabled, links will be opened on click. - * @default true - * @example false - */ - openOnClick: boolean | DeprecatedOpenWhenNotEditable; - /** - * If enabled, the link will be selected when clicked. - * @default false - * @example true - */ - enableClickSelection: boolean; - /** - * Adds a link to the current selection if the pasted content only contains an url. - * @default true - * @example false - */ - linkOnPaste: boolean; - /** - * HTML attributes to add to the link element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * @deprecated Use the `shouldAutoLink` option instead. - * A validation function that modifies link verification for the auto linker. - * @param url - The url to be validated. - * @returns - True if the url is valid, false otherwise. - */ - validate: (url: string) => boolean; - /** - * A validation function which is used for configuring link verification for preventing XSS attacks. - * Only modify this if you know what you're doing. - * - * @returns {boolean} `true` if the URL is valid, `false` otherwise. - * - * @example - * isAllowedUri: (url, { defaultValidate, protocols, defaultProtocol }) => { - * return url.startsWith('./') || defaultValidate(url) - * } - */ - isAllowedUri: ( - /** - * The URL to be validated. - */ - url: string, ctx: { - /** - * The default validation function. - */ - defaultValidate: (url: string) => boolean; - /** - * An array of allowed protocols for the URL (e.g., "http", "https"). As defined in the `protocols` option. - */ - protocols: Array; - /** - * A string that represents the default protocol (e.g., 'http'). As defined in the `defaultProtocol` option. - */ - defaultProtocol: string; - }) => boolean; - /** - * Determines whether a valid link should be automatically linked in the content. - * - * @param {string} url - The URL that has already been validated. - * @returns {boolean} - True if the link should be auto-linked; false if it should not be auto-linked. - */ - shouldAutoLink: (url: string) => boolean; -} -declare module '@tiptap/core' { - interface Commands { - link: { - /** - * Set a link mark - * @param attributes The link attributes - * @example editor.commands.setLink({ href: 'https://tiptap.dev' }) - */ - setLink: (attributes: { - href: string; - target?: string | null; - rel?: string | null; - class?: string | null; - title?: string | null; - }) => ReturnType; - /** - * Toggle a link mark - * @param attributes The link attributes - * @example editor.commands.toggleLink({ href: 'https://tiptap.dev' }) - */ - toggleLink: (attributes?: { - href: string; - target?: string | null; - rel?: string | null; - class?: string | null; - title?: string | null; - }) => ReturnType; - /** - * Unset a link mark - * @example editor.commands.unsetLink() - */ - unsetLink: () => ReturnType; - }; - } -} -declare function isAllowedUri(uri: string | undefined, protocols?: LinkOptions['protocols']): true | RegExpMatchArray | null; -/** - * This extension allows you to create links. - * @see https://www.tiptap.dev/api/marks/link - */ -declare const Link: Mark; - -export { Link, type LinkOptions, type LinkProtocolOptions, Link as default, isAllowedUri, pasteRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.d.ts deleted file mode 100644 index 212de4f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { Mark } from '@tiptap/core'; - -interface LinkProtocolOptions { - /** - * The protocol scheme to be registered. - * @default ''' - * @example 'ftp' - * @example 'git' - */ - scheme: string; - /** - * If enabled, it allows optional slashes after the protocol. - * @default false - * @example true - */ - optionalSlashes?: boolean; -} -declare const pasteRegex: RegExp; -/** - * @deprecated The default behavior is now to open links when the editor is not editable. - */ -type DeprecatedOpenWhenNotEditable = 'whenNotEditable'; -interface LinkOptions { - /** - * If enabled, the extension will automatically add links as you type. - * @default true - * @example false - */ - autolink: boolean; - /** - * An array of custom protocols to be registered with linkifyjs. - * @default [] - * @example ['ftp', 'git'] - */ - protocols: Array; - /** - * Default protocol to use when no protocol is specified. - * @default 'http' - */ - defaultProtocol: string; - /** - * If enabled, links will be opened on click. - * @default true - * @example false - */ - openOnClick: boolean | DeprecatedOpenWhenNotEditable; - /** - * If enabled, the link will be selected when clicked. - * @default false - * @example true - */ - enableClickSelection: boolean; - /** - * Adds a link to the current selection if the pasted content only contains an url. - * @default true - * @example false - */ - linkOnPaste: boolean; - /** - * HTML attributes to add to the link element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * @deprecated Use the `shouldAutoLink` option instead. - * A validation function that modifies link verification for the auto linker. - * @param url - The url to be validated. - * @returns - True if the url is valid, false otherwise. - */ - validate: (url: string) => boolean; - /** - * A validation function which is used for configuring link verification for preventing XSS attacks. - * Only modify this if you know what you're doing. - * - * @returns {boolean} `true` if the URL is valid, `false` otherwise. - * - * @example - * isAllowedUri: (url, { defaultValidate, protocols, defaultProtocol }) => { - * return url.startsWith('./') || defaultValidate(url) - * } - */ - isAllowedUri: ( - /** - * The URL to be validated. - */ - url: string, ctx: { - /** - * The default validation function. - */ - defaultValidate: (url: string) => boolean; - /** - * An array of allowed protocols for the URL (e.g., "http", "https"). As defined in the `protocols` option. - */ - protocols: Array; - /** - * A string that represents the default protocol (e.g., 'http'). As defined in the `defaultProtocol` option. - */ - defaultProtocol: string; - }) => boolean; - /** - * Determines whether a valid link should be automatically linked in the content. - * - * @param {string} url - The URL that has already been validated. - * @returns {boolean} - True if the link should be auto-linked; false if it should not be auto-linked. - */ - shouldAutoLink: (url: string) => boolean; -} -declare module '@tiptap/core' { - interface Commands { - link: { - /** - * Set a link mark - * @param attributes The link attributes - * @example editor.commands.setLink({ href: 'https://tiptap.dev' }) - */ - setLink: (attributes: { - href: string; - target?: string | null; - rel?: string | null; - class?: string | null; - title?: string | null; - }) => ReturnType; - /** - * Toggle a link mark - * @param attributes The link attributes - * @example editor.commands.toggleLink({ href: 'https://tiptap.dev' }) - */ - toggleLink: (attributes?: { - href: string; - target?: string | null; - rel?: string | null; - class?: string | null; - title?: string | null; - }) => ReturnType; - /** - * Unset a link mark - * @example editor.commands.unsetLink() - */ - unsetLink: () => ReturnType; - }; - } -} -declare function isAllowedUri(uri: string | undefined, protocols?: LinkOptions['protocols']): true | RegExpMatchArray | null; -/** - * This extension allows you to create links. - * @see https://www.tiptap.dev/api/marks/link - */ -declare const Link: Mark; - -export { Link, type LinkOptions, type LinkProtocolOptions, Link as default, isAllowedUri, pasteRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.js deleted file mode 100644 index d313d33..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.js +++ /dev/null @@ -1,479 +0,0 @@ -// src/link.ts -import { Mark, markPasteRule, mergeAttributes } from "@tiptap/core"; -import { find as find2, registerCustomProtocol, reset } from "linkifyjs"; - -// src/helpers/autolink.ts -import { - combineTransactionSteps, - findChildrenInRange, - getChangedRanges, - getMarksBetween -} from "@tiptap/core"; -import { Plugin, PluginKey } from "@tiptap/pm/state"; -import { tokenize } from "linkifyjs"; - -// src/helpers/whitespace.ts -var UNICODE_WHITESPACE_PATTERN = "[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]"; -var UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN); -var UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`); -var UNICODE_WHITESPACE_REGEX_GLOBAL = new RegExp(UNICODE_WHITESPACE_PATTERN, "g"); - -// src/helpers/autolink.ts -function isValidLinkStructure(tokens) { - if (tokens.length === 1) { - return tokens[0].isLink; - } - if (tokens.length === 3 && tokens[1].isLink) { - return ["()", "[]"].includes(tokens[0].value + tokens[2].value); - } - return false; -} -function autolink(options) { - return new Plugin({ - key: new PluginKey("autolink"), - appendTransaction: (transactions, oldState, newState) => { - const docChanges = transactions.some((transaction) => transaction.docChanged) && !oldState.doc.eq(newState.doc); - const preventAutolink = transactions.some( - (transaction) => transaction.getMeta("preventAutolink") - ); - if (!docChanges || preventAutolink) { - return; - } - const { tr } = newState; - const transform = combineTransactionSteps(oldState.doc, [...transactions]); - const changes = getChangedRanges(transform); - changes.forEach(({ newRange }) => { - const nodesInChangedRanges = findChildrenInRange( - newState.doc, - newRange, - (node) => node.isTextblock - ); - let textBlock; - let textBeforeWhitespace; - if (nodesInChangedRanges.length > 1) { - textBlock = nodesInChangedRanges[0]; - textBeforeWhitespace = newState.doc.textBetween( - textBlock.pos, - textBlock.pos + textBlock.node.nodeSize, - void 0, - " " - ); - } else if (nodesInChangedRanges.length) { - const endText = newState.doc.textBetween(newRange.from, newRange.to, " ", " "); - if (!UNICODE_WHITESPACE_REGEX_END.test(endText)) { - return; - } - textBlock = nodesInChangedRanges[0]; - textBeforeWhitespace = newState.doc.textBetween( - textBlock.pos, - newRange.to, - void 0, - " " - ); - } - if (textBlock && textBeforeWhitespace) { - const wordsBeforeWhitespace = textBeforeWhitespace.split(UNICODE_WHITESPACE_REGEX).filter(Boolean); - if (wordsBeforeWhitespace.length <= 0) { - return false; - } - const lastWordBeforeSpace = wordsBeforeWhitespace[wordsBeforeWhitespace.length - 1]; - const lastWordAndBlockOffset = textBlock.pos + textBeforeWhitespace.lastIndexOf(lastWordBeforeSpace); - if (!lastWordBeforeSpace) { - return false; - } - const linksBeforeSpace = tokenize(lastWordBeforeSpace).map( - (t) => t.toObject(options.defaultProtocol) - ); - if (!isValidLinkStructure(linksBeforeSpace)) { - return false; - } - linksBeforeSpace.filter((link) => link.isLink).map((link) => ({ - ...link, - from: lastWordAndBlockOffset + link.start + 1, - to: lastWordAndBlockOffset + link.end + 1 - })).filter((link) => { - if (!newState.schema.marks.code) { - return true; - } - return !newState.doc.rangeHasMark(link.from, link.to, newState.schema.marks.code); - }).filter((link) => options.validate(link.value)).filter((link) => options.shouldAutoLink(link.value)).forEach((link) => { - if (getMarksBetween(link.from, link.to, newState.doc).some( - (item) => item.mark.type === options.type - )) { - return; - } - tr.addMark( - link.from, - link.to, - options.type.create({ - href: link.href - }) - ); - }); - } - }); - if (!tr.steps.length) { - return; - } - return tr; - } - }); -} - -// src/helpers/clickHandler.ts -import { getAttributes } from "@tiptap/core"; -import { Plugin as Plugin2, PluginKey as PluginKey2 } from "@tiptap/pm/state"; -function clickHandler(options) { - return new Plugin2({ - key: new PluginKey2("handleClickLink"), - props: { - handleClick: (view, pos, event) => { - var _a, _b; - if (event.button !== 0) { - return false; - } - if (!view.editable) { - return false; - } - let link = null; - if (event.target instanceof HTMLAnchorElement) { - link = event.target; - } else { - const target = event.target; - if (!target) { - return false; - } - const root = options.editor.view.dom; - link = target.closest("a"); - if (link && !root.contains(link)) { - link = null; - } - } - if (!link) { - return false; - } - let handled = false; - if (options.enableClickSelection) { - const commandResult = options.editor.commands.extendMarkRange(options.type.name); - handled = commandResult; - } - if (options.openOnClick) { - const attrs = getAttributes(view.state, options.type.name); - const href = (_a = link.href) != null ? _a : attrs.href; - const target = (_b = link.target) != null ? _b : attrs.target; - if (href) { - window.open(href, target); - handled = true; - } - } - return handled; - } - } - }); -} - -// src/helpers/pasteHandler.ts -import { Plugin as Plugin3, PluginKey as PluginKey3 } from "@tiptap/pm/state"; -import { find } from "linkifyjs"; -function pasteHandler(options) { - return new Plugin3({ - key: new PluginKey3("handlePasteLink"), - props: { - handlePaste: (view, _event, slice) => { - const { shouldAutoLink } = options; - const { state } = view; - const { selection } = state; - const { empty } = selection; - if (empty) { - return false; - } - let textContent = ""; - slice.content.forEach((node) => { - textContent += node.textContent; - }); - const link = find(textContent, { defaultProtocol: options.defaultProtocol }).find( - (item) => item.isLink && item.value === textContent - ); - if (!textContent || !link || shouldAutoLink !== void 0 && !shouldAutoLink(link.value)) { - return false; - } - return options.editor.commands.setMark(options.type, { - href: link.href - }); - } - } - }); -} - -// src/link.ts -var pasteRegex = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi; -function isAllowedUri(uri, protocols) { - const allowedProtocols = [ - "http", - "https", - "ftp", - "ftps", - "mailto", - "tel", - "callto", - "sms", - "cid", - "xmpp" - ]; - if (protocols) { - protocols.forEach((protocol) => { - const nextProtocol = typeof protocol === "string" ? protocol : protocol.scheme; - if (nextProtocol) { - allowedProtocols.push(nextProtocol); - } - }); - } - return !uri || uri.replace(UNICODE_WHITESPACE_REGEX_GLOBAL, "").match( - new RegExp( - // oxlint-disable-next-line no-useless-escape - `^(?:(?:${allowedProtocols.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`, - "i" - ) - ); -} -var Link = Mark.create({ - name: "link", - priority: 1e3, - keepOnSplit: false, - exitable: true, - onCreate() { - if (this.options.validate && !this.options.shouldAutoLink) { - this.options.shouldAutoLink = this.options.validate; - console.warn( - "The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead." - ); - } - this.options.protocols.forEach((protocol) => { - if (typeof protocol === "string") { - registerCustomProtocol(protocol); - return; - } - registerCustomProtocol(protocol.scheme, protocol.optionalSlashes); - }); - }, - onDestroy() { - reset(); - }, - inclusive() { - return this.options.autolink; - }, - addOptions() { - return { - openOnClick: true, - enableClickSelection: false, - linkOnPaste: true, - autolink: true, - protocols: [], - defaultProtocol: "http", - HTMLAttributes: { - target: "_blank", - rel: "noopener noreferrer nofollow", - class: null - }, - isAllowedUri: (url, ctx) => !!isAllowedUri(url, ctx.protocols), - validate: (url) => !!url, - shouldAutoLink: (url) => { - const hasProtocol = /^[a-z][a-z0-9+.-]*:\/\//i.test(url); - const hasMaybeProtocol = /^[a-z][a-z0-9+.-]*:/i.test(url); - if (hasProtocol || hasMaybeProtocol && !url.includes("@")) { - return true; - } - const urlWithoutUserinfo = url.includes("@") ? url.split("@").pop() : url; - const hostname = urlWithoutUserinfo.split(/[/?#:]/)[0]; - if (/^\d{1,3}(\.\d{1,3}){3}$/.test(hostname)) { - return false; - } - if (!/\./.test(hostname)) { - return false; - } - return true; - } - }; - }, - addAttributes() { - return { - href: { - default: null, - parseHTML(element) { - return element.getAttribute("href"); - } - }, - target: { - default: this.options.HTMLAttributes.target - }, - rel: { - default: this.options.HTMLAttributes.rel - }, - class: { - default: this.options.HTMLAttributes.class - }, - title: { - default: null - } - }; - }, - parseHTML() { - return [ - { - tag: "a[href]", - getAttrs: (dom) => { - const href = dom.getAttribute("href"); - if (!href || !this.options.isAllowedUri(href, { - defaultValidate: (url) => !!isAllowedUri(url, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol - })) { - return false; - } - return null; - } - } - ]; - }, - renderHTML({ HTMLAttributes }) { - if (!this.options.isAllowedUri(HTMLAttributes.href, { - defaultValidate: (href) => !!isAllowedUri(href, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol - })) { - return ["a", mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: "" }), 0]; - } - return ["a", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "link", - parseMarkdown: (token, helpers) => { - return helpers.applyMark("link", helpers.parseInline(token.tokens || []), { - href: token.href, - title: token.title || null - }); - }, - renderMarkdown: (node, h) => { - var _a, _b, _c, _d; - const href = (_b = (_a = node.attrs) == null ? void 0 : _a.href) != null ? _b : ""; - const title = (_d = (_c = node.attrs) == null ? void 0 : _c.title) != null ? _d : ""; - const text = h.renderChildren(node); - return title ? `[${text}](${href} "${title}")` : `[${text}](${href})`; - }, - addCommands() { - return { - setLink: (attributes) => ({ chain }) => { - const { href } = attributes; - if (!this.options.isAllowedUri(href, { - defaultValidate: (url) => !!isAllowedUri(url, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol - })) { - return false; - } - return chain().setMark(this.name, attributes).setMeta("preventAutolink", true).run(); - }, - toggleLink: (attributes) => ({ chain }) => { - const { href } = attributes || {}; - if (href && !this.options.isAllowedUri(href, { - defaultValidate: (url) => !!isAllowedUri(url, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol - })) { - return false; - } - return chain().toggleMark(this.name, attributes, { extendEmptyMarkRange: true }).setMeta("preventAutolink", true).run(); - }, - unsetLink: () => ({ chain }) => { - return chain().unsetMark(this.name, { extendEmptyMarkRange: true }).setMeta("preventAutolink", true).run(); - } - }; - }, - addPasteRules() { - return [ - markPasteRule({ - find: (text) => { - const foundLinks = []; - if (text) { - const { protocols, defaultProtocol } = this.options; - const links = find2(text).filter( - (item) => item.isLink && this.options.isAllowedUri(item.value, { - defaultValidate: (href) => !!isAllowedUri(href, protocols), - protocols, - defaultProtocol - }) - ); - if (links.length) { - links.forEach((link) => { - if (!this.options.shouldAutoLink(link.value)) { - return; - } - foundLinks.push({ - text: link.value, - data: { - href: link.href - }, - index: link.start - }); - }); - } - } - return foundLinks; - }, - type: this.type, - getAttributes: (match) => { - var _a; - return { - href: (_a = match.data) == null ? void 0 : _a.href - }; - } - }) - ]; - }, - addProseMirrorPlugins() { - const plugins = []; - const { protocols, defaultProtocol } = this.options; - if (this.options.autolink) { - plugins.push( - autolink({ - type: this.type, - defaultProtocol: this.options.defaultProtocol, - validate: (url) => this.options.isAllowedUri(url, { - defaultValidate: (href) => !!isAllowedUri(href, protocols), - protocols, - defaultProtocol - }), - shouldAutoLink: this.options.shouldAutoLink - }) - ); - } - plugins.push( - clickHandler({ - type: this.type, - editor: this.editor, - openOnClick: this.options.openOnClick === "whenNotEditable" ? true : this.options.openOnClick, - enableClickSelection: this.options.enableClickSelection - }) - ); - if (this.options.linkOnPaste) { - plugins.push( - pasteHandler({ - editor: this.editor, - defaultProtocol: this.options.defaultProtocol, - type: this.type, - shouldAutoLink: this.options.shouldAutoLink - }) - ); - } - return plugins; - } -}); - -// src/index.ts -var index_default = Link; -export { - Link, - index_default as default, - isAllowedUri, - pasteRegex -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.js.map deleted file mode 100644 index c3f6505..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/link.ts","../src/helpers/autolink.ts","../src/helpers/whitespace.ts","../src/helpers/clickHandler.ts","../src/helpers/pasteHandler.ts","../src/index.ts"],"sourcesContent":["import type { PasteRuleMatch } from '@tiptap/core'\nimport { Mark, markPasteRule, mergeAttributes } from '@tiptap/core'\nimport type { Plugin } from '@tiptap/pm/state'\nimport { find, registerCustomProtocol, reset } from 'linkifyjs'\n\nimport { autolink } from './helpers/autolink.js'\nimport { clickHandler } from './helpers/clickHandler.js'\nimport { pasteHandler } from './helpers/pasteHandler.js'\nimport { UNICODE_WHITESPACE_REGEX_GLOBAL } from './helpers/whitespace.js'\n\nexport interface LinkProtocolOptions {\n /**\n * The protocol scheme to be registered.\n * @default '''\n * @example 'ftp'\n * @example 'git'\n */\n scheme: string\n\n /**\n * If enabled, it allows optional slashes after the protocol.\n * @default false\n * @example true\n */\n optionalSlashes?: boolean\n}\n\nexport const pasteRegex =\n /https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z]{2,}\\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi\n\n/**\n * @deprecated The default behavior is now to open links when the editor is not editable.\n */\ntype DeprecatedOpenWhenNotEditable = 'whenNotEditable'\n\nexport interface LinkOptions {\n /**\n * If enabled, the extension will automatically add links as you type.\n * @default true\n * @example false\n */\n autolink: boolean\n\n /**\n * An array of custom protocols to be registered with linkifyjs.\n * @default []\n * @example ['ftp', 'git']\n */\n protocols: Array\n\n /**\n * Default protocol to use when no protocol is specified.\n * @default 'http'\n */\n defaultProtocol: string\n /**\n * If enabled, links will be opened on click.\n * @default true\n * @example false\n */\n openOnClick: boolean | DeprecatedOpenWhenNotEditable\n /**\n * If enabled, the link will be selected when clicked.\n * @default false\n * @example true\n */\n enableClickSelection: boolean\n /**\n * Adds a link to the current selection if the pasted content only contains an url.\n * @default true\n * @example false\n */\n linkOnPaste: boolean\n\n /**\n * HTML attributes to add to the link element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * @deprecated Use the `shouldAutoLink` option instead.\n * A validation function that modifies link verification for the auto linker.\n * @param url - The url to be validated.\n * @returns - True if the url is valid, false otherwise.\n */\n validate: (url: string) => boolean\n\n /**\n * A validation function which is used for configuring link verification for preventing XSS attacks.\n * Only modify this if you know what you're doing.\n *\n * @returns {boolean} `true` if the URL is valid, `false` otherwise.\n *\n * @example\n * isAllowedUri: (url, { defaultValidate, protocols, defaultProtocol }) => {\n * return url.startsWith('./') || defaultValidate(url)\n * }\n */\n isAllowedUri: (\n /**\n * The URL to be validated.\n */\n url: string,\n ctx: {\n /**\n * The default validation function.\n */\n defaultValidate: (url: string) => boolean\n /**\n * An array of allowed protocols for the URL (e.g., \"http\", \"https\"). As defined in the `protocols` option.\n */\n protocols: Array\n /**\n * A string that represents the default protocol (e.g., 'http'). As defined in the `defaultProtocol` option.\n */\n defaultProtocol: string\n },\n ) => boolean\n\n /**\n * Determines whether a valid link should be automatically linked in the content.\n *\n * @param {string} url - The URL that has already been validated.\n * @returns {boolean} - True if the link should be auto-linked; false if it should not be auto-linked.\n */\n shouldAutoLink: (url: string) => boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n link: {\n /**\n * Set a link mark\n * @param attributes The link attributes\n * @example editor.commands.setLink({ href: 'https://tiptap.dev' })\n */\n setLink: (attributes: {\n href: string\n target?: string | null\n rel?: string | null\n class?: string | null\n title?: string | null\n }) => ReturnType\n /**\n * Toggle a link mark\n * @param attributes The link attributes\n * @example editor.commands.toggleLink({ href: 'https://tiptap.dev' })\n */\n toggleLink: (attributes?: {\n href: string\n target?: string | null\n rel?: string | null\n class?: string | null\n title?: string | null\n }) => ReturnType\n /**\n * Unset a link mark\n * @example editor.commands.unsetLink()\n */\n unsetLink: () => ReturnType\n }\n }\n}\n\nexport function isAllowedUri(uri: string | undefined, protocols?: LinkOptions['protocols']) {\n const allowedProtocols: string[] = [\n 'http',\n 'https',\n 'ftp',\n 'ftps',\n 'mailto',\n 'tel',\n 'callto',\n 'sms',\n 'cid',\n 'xmpp',\n ]\n\n if (protocols) {\n protocols.forEach(protocol => {\n const nextProtocol = typeof protocol === 'string' ? protocol : protocol.scheme\n\n if (nextProtocol) {\n allowedProtocols.push(nextProtocol)\n }\n })\n }\n\n return (\n !uri ||\n uri.replace(UNICODE_WHITESPACE_REGEX_GLOBAL, '').match(\n new RegExp(\n // oxlint-disable-next-line no-useless-escape\n `^(?:(?:${allowedProtocols.join('|')}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,\n 'i',\n ),\n )\n )\n}\n\n/**\n * This extension allows you to create links.\n * @see https://www.tiptap.dev/api/marks/link\n */\nexport const Link = Mark.create({\n name: 'link',\n\n priority: 1000,\n\n keepOnSplit: false,\n\n exitable: true,\n\n onCreate() {\n // TODO: v4 - remove validate option\n if (this.options.validate && !this.options.shouldAutoLink) {\n // Copy the validate function to the shouldAutoLink option\n this.options.shouldAutoLink = this.options.validate\n console.warn(\n 'The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.',\n )\n }\n this.options.protocols.forEach(protocol => {\n if (typeof protocol === 'string') {\n registerCustomProtocol(protocol)\n return\n }\n registerCustomProtocol(protocol.scheme, protocol.optionalSlashes)\n })\n },\n\n onDestroy() {\n reset()\n },\n\n inclusive() {\n return this.options.autolink\n },\n\n addOptions() {\n return {\n openOnClick: true,\n enableClickSelection: false,\n linkOnPaste: true,\n autolink: true,\n protocols: [],\n defaultProtocol: 'http',\n HTMLAttributes: {\n target: '_blank',\n rel: 'noopener noreferrer nofollow',\n class: null,\n },\n isAllowedUri: (url, ctx) => !!isAllowedUri(url, ctx.protocols),\n validate: url => !!url,\n shouldAutoLink: url => {\n // URLs with explicit protocols (e.g., https://) should be auto-linked\n // But not if @ appears before :// (that would be userinfo like user:pass@host)\n const hasProtocol = /^[a-z][a-z0-9+.-]*:\\/\\//i.test(url)\n const hasMaybeProtocol = /^[a-z][a-z0-9+.-]*:/i.test(url)\n\n if (hasProtocol || (hasMaybeProtocol && !url.includes('@'))) {\n return true\n }\n // Strip userinfo (user:pass@) if present, then extract hostname\n const urlWithoutUserinfo = url.includes('@') ? url.split('@').pop()! : url\n const hostname = urlWithoutUserinfo.split(/[/?#:]/)[0]\n\n // Don't auto-link IP addresses without protocol\n if (/^\\d{1,3}(\\.\\d{1,3}){3}$/.test(hostname)) {\n return false\n }\n // Don't auto-link single-word hostnames without TLD (e.g., \"localhost\")\n if (!/\\./.test(hostname)) {\n return false\n }\n return true\n },\n }\n },\n\n addAttributes() {\n return {\n href: {\n default: null,\n parseHTML(element) {\n return element.getAttribute('href')\n },\n },\n target: {\n default: this.options.HTMLAttributes.target,\n },\n rel: {\n default: this.options.HTMLAttributes.rel,\n },\n class: {\n default: this.options.HTMLAttributes.class,\n },\n title: {\n default: null,\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'a[href]',\n getAttrs: dom => {\n const href = (dom as HTMLElement).getAttribute('href')\n\n // prevent XSS attacks\n if (\n !href ||\n !this.options.isAllowedUri(href, {\n defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n protocols: this.options.protocols,\n defaultProtocol: this.options.defaultProtocol,\n })\n ) {\n return false\n }\n return null\n },\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n // prevent XSS attacks\n if (\n !this.options.isAllowedUri(HTMLAttributes.href, {\n defaultValidate: href => !!isAllowedUri(href, this.options.protocols),\n protocols: this.options.protocols,\n defaultProtocol: this.options.defaultProtocol,\n })\n ) {\n // strip out the href\n return ['a', mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: '' }), 0]\n }\n\n return ['a', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'link',\n\n parseMarkdown: (token, helpers) => {\n return helpers.applyMark('link', helpers.parseInline(token.tokens || []), {\n href: token.href,\n title: token.title || null,\n })\n },\n\n renderMarkdown: (node, h) => {\n const href = node.attrs?.href ?? ''\n const title = node.attrs?.title ?? ''\n const text = h.renderChildren(node)\n\n return title ? `[${text}](${href} \"${title}\")` : `[${text}](${href})`\n },\n\n addCommands() {\n return {\n setLink:\n attributes =>\n ({ chain }) => {\n const { href } = attributes\n\n if (\n !this.options.isAllowedUri(href, {\n defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n protocols: this.options.protocols,\n defaultProtocol: this.options.defaultProtocol,\n })\n ) {\n return false\n }\n\n return chain().setMark(this.name, attributes).setMeta('preventAutolink', true).run()\n },\n\n toggleLink:\n attributes =>\n ({ chain }) => {\n const { href } = attributes || {}\n\n if (\n href &&\n !this.options.isAllowedUri(href, {\n defaultValidate: url => !!isAllowedUri(url, this.options.protocols),\n protocols: this.options.protocols,\n defaultProtocol: this.options.defaultProtocol,\n })\n ) {\n return false\n }\n\n return chain()\n .toggleMark(this.name, attributes, { extendEmptyMarkRange: true })\n .setMeta('preventAutolink', true)\n .run()\n },\n\n unsetLink:\n () =>\n ({ chain }) => {\n return chain()\n .unsetMark(this.name, { extendEmptyMarkRange: true })\n .setMeta('preventAutolink', true)\n .run()\n },\n }\n },\n\n addPasteRules() {\n return [\n markPasteRule({\n find: text => {\n const foundLinks: PasteRuleMatch[] = []\n\n if (text) {\n const { protocols, defaultProtocol } = this.options\n const links = find(text).filter(\n item =>\n item.isLink &&\n this.options.isAllowedUri(item.value, {\n defaultValidate: href => !!isAllowedUri(href, protocols),\n protocols,\n defaultProtocol,\n }),\n )\n\n if (links.length) {\n links.forEach(link => {\n if (!this.options.shouldAutoLink(link.value)) {\n return\n }\n\n foundLinks.push({\n text: link.value,\n data: {\n href: link.href,\n },\n index: link.start,\n })\n })\n }\n }\n\n return foundLinks\n },\n type: this.type,\n getAttributes: match => {\n return {\n href: match.data?.href,\n }\n },\n }),\n ]\n },\n\n addProseMirrorPlugins() {\n const plugins: Plugin[] = []\n const { protocols, defaultProtocol } = this.options\n\n if (this.options.autolink) {\n plugins.push(\n autolink({\n type: this.type,\n defaultProtocol: this.options.defaultProtocol,\n validate: url =>\n this.options.isAllowedUri(url, {\n defaultValidate: href => !!isAllowedUri(href, protocols),\n protocols,\n defaultProtocol,\n }),\n shouldAutoLink: this.options.shouldAutoLink,\n }),\n )\n }\n\n plugins.push(\n clickHandler({\n type: this.type,\n editor: this.editor,\n openOnClick:\n this.options.openOnClick === 'whenNotEditable' ? true : this.options.openOnClick,\n enableClickSelection: this.options.enableClickSelection,\n }),\n )\n\n if (this.options.linkOnPaste) {\n plugins.push(\n pasteHandler({\n editor: this.editor,\n defaultProtocol: this.options.defaultProtocol,\n type: this.type,\n shouldAutoLink: this.options.shouldAutoLink,\n }),\n )\n }\n\n return plugins\n },\n})\n","import type { NodeWithPos } from '@tiptap/core'\nimport {\n combineTransactionSteps,\n findChildrenInRange,\n getChangedRanges,\n getMarksBetween,\n} from '@tiptap/core'\nimport type { MarkType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport type { MultiToken } from 'linkifyjs'\nimport { tokenize } from 'linkifyjs'\n\nimport { UNICODE_WHITESPACE_REGEX, UNICODE_WHITESPACE_REGEX_END } from './whitespace.js'\n\n/**\n * Check if the provided tokens form a valid link structure, which can either be a single link token\n * or a link token surrounded by parentheses or square brackets.\n *\n * This ensures that only complete and valid text is hyperlinked, preventing cases where a valid\n * top-level domain (TLD) is immediately followed by an invalid character, like a number. For\n * example, with the `find` method from Linkify, entering `example.com1` would result in\n * `example.com` being linked and the trailing `1` left as plain text. By using the `tokenize`\n * method, we can perform more comprehensive validation on the input text.\n */\nfunction isValidLinkStructure(tokens: Array>) {\n if (tokens.length === 1) {\n return tokens[0].isLink\n }\n\n if (tokens.length === 3 && tokens[1].isLink) {\n return ['()', '[]'].includes(tokens[0].value + tokens[2].value)\n }\n\n return false\n}\n\ntype AutolinkOptions = {\n type: MarkType\n defaultProtocol: string\n validate: (url: string) => boolean\n shouldAutoLink: (url: string) => boolean\n}\n\n/**\n * This plugin allows you to automatically add links to your editor.\n * @param options The plugin options\n * @returns The plugin instance\n */\nexport function autolink(options: AutolinkOptions): Plugin {\n return new Plugin({\n key: new PluginKey('autolink'),\n appendTransaction: (transactions, oldState, newState) => {\n /**\n * Does the transaction change the document?\n */\n const docChanges =\n transactions.some(transaction => transaction.docChanged) && !oldState.doc.eq(newState.doc)\n\n /**\n * Prevent autolink if the transaction is not a document change or if the transaction has the meta `preventAutolink`.\n */\n const preventAutolink = transactions.some(transaction =>\n transaction.getMeta('preventAutolink'),\n )\n\n /**\n * Prevent autolink if the transaction is not a document change\n * or if the transaction has the meta `preventAutolink`.\n */\n if (!docChanges || preventAutolink) {\n return\n }\n\n const { tr } = newState\n const transform = combineTransactionSteps(oldState.doc, [...transactions])\n const changes = getChangedRanges(transform)\n\n changes.forEach(({ newRange }) => {\n // Now let’s see if we can add new links.\n const nodesInChangedRanges = findChildrenInRange(\n newState.doc,\n newRange,\n node => node.isTextblock,\n )\n\n let textBlock: NodeWithPos | undefined\n let textBeforeWhitespace: string | undefined\n\n if (nodesInChangedRanges.length > 1) {\n // Grab the first node within the changed ranges (ex. the first of two paragraphs when hitting enter).\n textBlock = nodesInChangedRanges[0]\n textBeforeWhitespace = newState.doc.textBetween(\n textBlock.pos,\n textBlock.pos + textBlock.node.nodeSize,\n undefined,\n ' ',\n )\n } else if (nodesInChangedRanges.length) {\n const endText = newState.doc.textBetween(newRange.from, newRange.to, ' ', ' ')\n if (!UNICODE_WHITESPACE_REGEX_END.test(endText)) {\n return\n }\n textBlock = nodesInChangedRanges[0]\n textBeforeWhitespace = newState.doc.textBetween(\n textBlock.pos,\n newRange.to,\n undefined,\n ' ',\n )\n }\n\n if (textBlock && textBeforeWhitespace) {\n const wordsBeforeWhitespace = textBeforeWhitespace\n .split(UNICODE_WHITESPACE_REGEX)\n .filter(Boolean)\n\n if (wordsBeforeWhitespace.length <= 0) {\n return false\n }\n\n const lastWordBeforeSpace = wordsBeforeWhitespace[wordsBeforeWhitespace.length - 1]\n const lastWordAndBlockOffset =\n textBlock.pos + textBeforeWhitespace.lastIndexOf(lastWordBeforeSpace)\n\n if (!lastWordBeforeSpace) {\n return false\n }\n\n const linksBeforeSpace = tokenize(lastWordBeforeSpace).map(t =>\n t.toObject(options.defaultProtocol),\n )\n\n if (!isValidLinkStructure(linksBeforeSpace)) {\n return false\n }\n\n linksBeforeSpace\n .filter(link => link.isLink)\n // Calculate link position.\n .map(link => ({\n ...link,\n from: lastWordAndBlockOffset + link.start + 1,\n to: lastWordAndBlockOffset + link.end + 1,\n }))\n // ignore link inside code mark\n .filter(link => {\n if (!newState.schema.marks.code) {\n return true\n }\n\n return !newState.doc.rangeHasMark(link.from, link.to, newState.schema.marks.code)\n })\n // validate link\n .filter(link => options.validate(link.value))\n // check whether should autolink\n .filter(link => options.shouldAutoLink(link.value))\n // Add link mark.\n .forEach(link => {\n if (\n getMarksBetween(link.from, link.to, newState.doc).some(\n item => item.mark.type === options.type,\n )\n ) {\n return\n }\n\n tr.addMark(\n link.from,\n link.to,\n options.type.create({\n href: link.href,\n }),\n )\n })\n }\n })\n\n if (!tr.steps.length) {\n return\n }\n\n return tr\n },\n })\n}\n","// From DOMPurify\n// https://github.com/cure53/DOMPurify/blob/main/src/regexp.ts\nexport const UNICODE_WHITESPACE_PATTERN =\n '[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]'\n\nexport const UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN)\nexport const UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`)\nexport const UNICODE_WHITESPACE_REGEX_GLOBAL = new RegExp(UNICODE_WHITESPACE_PATTERN, 'g')\n","import type { Editor } from '@tiptap/core'\nimport { getAttributes } from '@tiptap/core'\nimport type { MarkType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\ntype ClickHandlerOptions = {\n type: MarkType\n editor: Editor\n openOnClick?: boolean\n enableClickSelection?: boolean\n}\n\nexport function clickHandler(options: ClickHandlerOptions): Plugin {\n return new Plugin({\n key: new PluginKey('handleClickLink'),\n props: {\n handleClick: (view, pos, event) => {\n if (event.button !== 0) {\n return false\n }\n\n if (!view.editable) {\n return false\n }\n\n let link: HTMLAnchorElement | null = null\n\n if (event.target instanceof HTMLAnchorElement) {\n link = event.target\n } else {\n const target = event.target as HTMLElement | null\n if (!target) {\n return false\n }\n\n const root = options.editor.view.dom\n\n // Tntentionally limit the lookup to the editor root.\n // Using tag names like DIV as boundaries breaks with custom NodeViews,\n link = target.closest('a')\n\n if (link && !root.contains(link)) {\n link = null\n }\n }\n\n if (!link) {\n return false\n }\n\n let handled = false\n\n if (options.enableClickSelection) {\n const commandResult = options.editor.commands.extendMarkRange(options.type.name)\n handled = commandResult\n }\n\n if (options.openOnClick) {\n const attrs = getAttributes(view.state, options.type.name)\n const href = link.href ?? attrs.href\n const target = link.target ?? attrs.target\n\n if (href) {\n window.open(href, target)\n handled = true\n }\n }\n\n return handled\n },\n },\n })\n}\n","import type { Editor } from '@tiptap/core'\nimport type { MarkType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { find } from 'linkifyjs'\n\nimport type { LinkOptions } from '../link.js'\n\ntype PasteHandlerOptions = {\n editor: Editor\n defaultProtocol: string\n type: MarkType\n shouldAutoLink?: LinkOptions['shouldAutoLink']\n}\n\nexport function pasteHandler(options: PasteHandlerOptions): Plugin {\n return new Plugin({\n key: new PluginKey('handlePasteLink'),\n props: {\n handlePaste: (view, _event, slice) => {\n const { shouldAutoLink } = options\n const { state } = view\n const { selection } = state\n const { empty } = selection\n\n if (empty) {\n return false\n }\n\n let textContent = ''\n\n slice.content.forEach(node => {\n textContent += node.textContent\n })\n\n const link = find(textContent, { defaultProtocol: options.defaultProtocol }).find(\n item => item.isLink && item.value === textContent,\n )\n\n if (\n !textContent ||\n !link ||\n (shouldAutoLink !== undefined && !shouldAutoLink(link.value))\n ) {\n return false\n }\n\n return options.editor.commands.setMark(options.type, {\n href: link.href,\n })\n },\n },\n })\n}\n","import { Link } from './link.js'\n\nexport * from './link.js'\n\nexport default Link\n"],"mappings":";AACA,SAAS,MAAM,eAAe,uBAAuB;AAErD,SAAS,QAAAA,OAAM,wBAAwB,aAAa;;;ACFpD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,QAAQ,iBAAiB;AAElC,SAAS,gBAAgB;;;ACRlB,IAAM,6BACX;AAEK,IAAM,2BAA2B,IAAI,OAAO,0BAA0B;AACtE,IAAM,+BAA+B,IAAI,OAAO,GAAG,0BAA0B,GAAG;AAChF,IAAM,kCAAkC,IAAI,OAAO,4BAA4B,GAAG;;;ADiBzF,SAAS,qBAAqB,QAAmD;AAC/E,MAAI,OAAO,WAAW,GAAG;AACvB,WAAO,OAAO,CAAC,EAAE;AAAA,EACnB;AAEA,MAAI,OAAO,WAAW,KAAK,OAAO,CAAC,EAAE,QAAQ;AAC3C,WAAO,CAAC,MAAM,IAAI,EAAE,SAAS,OA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ey","find"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/package.json deleted file mode 100644 index b4f13da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "@tiptap/extension-link", - "version": "3.26.0", - "description": "link extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-link" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "dependencies": { - "linkifyjs": "^4.3.3" - }, - "devDependencies": { - "@tiptap/core": "^3.26.0", - "@tiptap/pm": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0", - "@tiptap/pm": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/autolink.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/autolink.ts deleted file mode 100644 index 79264ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/autolink.ts +++ /dev/null @@ -1,185 +0,0 @@ -import type { NodeWithPos } from '@tiptap/core' -import { - combineTransactionSteps, - findChildrenInRange, - getChangedRanges, - getMarksBetween, -} from '@tiptap/core' -import type { MarkType } from '@tiptap/pm/model' -import { Plugin, PluginKey } from '@tiptap/pm/state' -import type { MultiToken } from 'linkifyjs' -import { tokenize } from 'linkifyjs' - -import { UNICODE_WHITESPACE_REGEX, UNICODE_WHITESPACE_REGEX_END } from './whitespace.js' - -/** - * Check if the provided tokens form a valid link structure, which can either be a single link token - * or a link token surrounded by parentheses or square brackets. - * - * This ensures that only complete and valid text is hyperlinked, preventing cases where a valid - * top-level domain (TLD) is immediately followed by an invalid character, like a number. For - * example, with the `find` method from Linkify, entering `example.com1` would result in - * `example.com` being linked and the trailing `1` left as plain text. By using the `tokenize` - * method, we can perform more comprehensive validation on the input text. - */ -function isValidLinkStructure(tokens: Array>) { - if (tokens.length === 1) { - return tokens[0].isLink - } - - if (tokens.length === 3 && tokens[1].isLink) { - return ['()', '[]'].includes(tokens[0].value + tokens[2].value) - } - - return false -} - -type AutolinkOptions = { - type: MarkType - defaultProtocol: string - validate: (url: string) => boolean - shouldAutoLink: (url: string) => boolean -} - -/** - * This plugin allows you to automatically add links to your editor. - * @param options The plugin options - * @returns The plugin instance - */ -export function autolink(options: AutolinkOptions): Plugin { - return new Plugin({ - key: new PluginKey('autolink'), - appendTransaction: (transactions, oldState, newState) => { - /** - * Does the transaction change the document? - */ - const docChanges = - transactions.some(transaction => transaction.docChanged) && !oldState.doc.eq(newState.doc) - - /** - * Prevent autolink if the transaction is not a document change or if the transaction has the meta `preventAutolink`. - */ - const preventAutolink = transactions.some(transaction => - transaction.getMeta('preventAutolink'), - ) - - /** - * Prevent autolink if the transaction is not a document change - * or if the transaction has the meta `preventAutolink`. - */ - if (!docChanges || preventAutolink) { - return - } - - const { tr } = newState - const transform = combineTransactionSteps(oldState.doc, [...transactions]) - const changes = getChangedRanges(transform) - - changes.forEach(({ newRange }) => { - // Now let’s see if we can add new links. - const nodesInChangedRanges = findChildrenInRange( - newState.doc, - newRange, - node => node.isTextblock, - ) - - let textBlock: NodeWithPos | undefined - let textBeforeWhitespace: string | undefined - - if (nodesInChangedRanges.length > 1) { - // Grab the first node within the changed ranges (ex. the first of two paragraphs when hitting enter). - textBlock = nodesInChangedRanges[0] - textBeforeWhitespace = newState.doc.textBetween( - textBlock.pos, - textBlock.pos + textBlock.node.nodeSize, - undefined, - ' ', - ) - } else if (nodesInChangedRanges.length) { - const endText = newState.doc.textBetween(newRange.from, newRange.to, ' ', ' ') - if (!UNICODE_WHITESPACE_REGEX_END.test(endText)) { - return - } - textBlock = nodesInChangedRanges[0] - textBeforeWhitespace = newState.doc.textBetween( - textBlock.pos, - newRange.to, - undefined, - ' ', - ) - } - - if (textBlock && textBeforeWhitespace) { - const wordsBeforeWhitespace = textBeforeWhitespace - .split(UNICODE_WHITESPACE_REGEX) - .filter(Boolean) - - if (wordsBeforeWhitespace.length <= 0) { - return false - } - - const lastWordBeforeSpace = wordsBeforeWhitespace[wordsBeforeWhitespace.length - 1] - const lastWordAndBlockOffset = - textBlock.pos + textBeforeWhitespace.lastIndexOf(lastWordBeforeSpace) - - if (!lastWordBeforeSpace) { - return false - } - - const linksBeforeSpace = tokenize(lastWordBeforeSpace).map(t => - t.toObject(options.defaultProtocol), - ) - - if (!isValidLinkStructure(linksBeforeSpace)) { - return false - } - - linksBeforeSpace - .filter(link => link.isLink) - // Calculate link position. - .map(link => ({ - ...link, - from: lastWordAndBlockOffset + link.start + 1, - to: lastWordAndBlockOffset + link.end + 1, - })) - // ignore link inside code mark - .filter(link => { - if (!newState.schema.marks.code) { - return true - } - - return !newState.doc.rangeHasMark(link.from, link.to, newState.schema.marks.code) - }) - // validate link - .filter(link => options.validate(link.value)) - // check whether should autolink - .filter(link => options.shouldAutoLink(link.value)) - // Add link mark. - .forEach(link => { - if ( - getMarksBetween(link.from, link.to, newState.doc).some( - item => item.mark.type === options.type, - ) - ) { - return - } - - tr.addMark( - link.from, - link.to, - options.type.create({ - href: link.href, - }), - ) - }) - } - }) - - if (!tr.steps.length) { - return - } - - return tr - }, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/clickHandler.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/clickHandler.ts deleted file mode 100644 index 3d071d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/clickHandler.ts +++ /dev/null @@ -1,73 +0,0 @@ -import type { Editor } from '@tiptap/core' -import { getAttributes } from '@tiptap/core' -import type { MarkType } from '@tiptap/pm/model' -import { Plugin, PluginKey } from '@tiptap/pm/state' - -type ClickHandlerOptions = { - type: MarkType - editor: Editor - openOnClick?: boolean - enableClickSelection?: boolean -} - -export function clickHandler(options: ClickHandlerOptions): Plugin { - return new Plugin({ - key: new PluginKey('handleClickLink'), - props: { - handleClick: (view, pos, event) => { - if (event.button !== 0) { - return false - } - - if (!view.editable) { - return false - } - - let link: HTMLAnchorElement | null = null - - if (event.target instanceof HTMLAnchorElement) { - link = event.target - } else { - const target = event.target as HTMLElement | null - if (!target) { - return false - } - - const root = options.editor.view.dom - - // Tntentionally limit the lookup to the editor root. - // Using tag names like DIV as boundaries breaks with custom NodeViews, - link = target.closest('a') - - if (link && !root.contains(link)) { - link = null - } - } - - if (!link) { - return false - } - - let handled = false - - if (options.enableClickSelection) { - const commandResult = options.editor.commands.extendMarkRange(options.type.name) - handled = commandResult - } - - if (options.openOnClick) { - const attrs = getAttributes(view.state, options.type.name) - const href = link.href ?? attrs.href - const target = link.target ?? attrs.target - - if (href) { - window.open(href, target) - handled = true - } - } - - return handled - }, - }, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/pasteHandler.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/pasteHandler.ts deleted file mode 100644 index 7ef80b6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/pasteHandler.ts +++ /dev/null @@ -1,53 +0,0 @@ -import type { Editor } from '@tiptap/core' -import type { MarkType } from '@tiptap/pm/model' -import { Plugin, PluginKey } from '@tiptap/pm/state' -import { find } from 'linkifyjs' - -import type { LinkOptions } from '../link.js' - -type PasteHandlerOptions = { - editor: Editor - defaultProtocol: string - type: MarkType - shouldAutoLink?: LinkOptions['shouldAutoLink'] -} - -export function pasteHandler(options: PasteHandlerOptions): Plugin { - return new Plugin({ - key: new PluginKey('handlePasteLink'), - props: { - handlePaste: (view, _event, slice) => { - const { shouldAutoLink } = options - const { state } = view - const { selection } = state - const { empty } = selection - - if (empty) { - return false - } - - let textContent = '' - - slice.content.forEach(node => { - textContent += node.textContent - }) - - const link = find(textContent, { defaultProtocol: options.defaultProtocol }).find( - item => item.isLink && item.value === textContent, - ) - - if ( - !textContent || - !link || - (shouldAutoLink !== undefined && !shouldAutoLink(link.value)) - ) { - return false - } - - return options.editor.commands.setMark(options.type, { - href: link.href, - }) - }, - }, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/whitespace.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/whitespace.ts deleted file mode 100644 index f5a4807..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/helpers/whitespace.ts +++ /dev/null @@ -1,8 +0,0 @@ -// From DOMPurify -// https://github.com/cure53/DOMPurify/blob/main/src/regexp.ts -export const UNICODE_WHITESPACE_PATTERN = - '[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]' - -export const UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN) -export const UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`) -export const UNICODE_WHITESPACE_REGEX_GLOBAL = new RegExp(UNICODE_WHITESPACE_PATTERN, 'g') diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/index.ts deleted file mode 100644 index e3655ab..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Link } from './link.js' - -export * from './link.js' - -export default Link diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/link.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/link.ts deleted file mode 100644 index ed57863..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link/src/link.ts +++ /dev/null @@ -1,506 +0,0 @@ -import type { PasteRuleMatch } from '@tiptap/core' -import { Mark, markPasteRule, mergeAttributes } from '@tiptap/core' -import type { Plugin } from '@tiptap/pm/state' -import { find, registerCustomProtocol, reset } from 'linkifyjs' - -import { autolink } from './helpers/autolink.js' -import { clickHandler } from './helpers/clickHandler.js' -import { pasteHandler } from './helpers/pasteHandler.js' -import { UNICODE_WHITESPACE_REGEX_GLOBAL } from './helpers/whitespace.js' - -export interface LinkProtocolOptions { - /** - * The protocol scheme to be registered. - * @default ''' - * @example 'ftp' - * @example 'git' - */ - scheme: string - - /** - * If enabled, it allows optional slashes after the protocol. - * @default false - * @example true - */ - optionalSlashes?: boolean -} - -export const pasteRegex = - /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi - -/** - * @deprecated The default behavior is now to open links when the editor is not editable. - */ -type DeprecatedOpenWhenNotEditable = 'whenNotEditable' - -export interface LinkOptions { - /** - * If enabled, the extension will automatically add links as you type. - * @default true - * @example false - */ - autolink: boolean - - /** - * An array of custom protocols to be registered with linkifyjs. - * @default [] - * @example ['ftp', 'git'] - */ - protocols: Array - - /** - * Default protocol to use when no protocol is specified. - * @default 'http' - */ - defaultProtocol: string - /** - * If enabled, links will be opened on click. - * @default true - * @example false - */ - openOnClick: boolean | DeprecatedOpenWhenNotEditable - /** - * If enabled, the link will be selected when clicked. - * @default false - * @example true - */ - enableClickSelection: boolean - /** - * Adds a link to the current selection if the pasted content only contains an url. - * @default true - * @example false - */ - linkOnPaste: boolean - - /** - * HTML attributes to add to the link element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record - - /** - * @deprecated Use the `shouldAutoLink` option instead. - * A validation function that modifies link verification for the auto linker. - * @param url - The url to be validated. - * @returns - True if the url is valid, false otherwise. - */ - validate: (url: string) => boolean - - /** - * A validation function which is used for configuring link verification for preventing XSS attacks. - * Only modify this if you know what you're doing. - * - * @returns {boolean} `true` if the URL is valid, `false` otherwise. - * - * @example - * isAllowedUri: (url, { defaultValidate, protocols, defaultProtocol }) => { - * return url.startsWith('./') || defaultValidate(url) - * } - */ - isAllowedUri: ( - /** - * The URL to be validated. - */ - url: string, - ctx: { - /** - * The default validation function. - */ - defaultValidate: (url: string) => boolean - /** - * An array of allowed protocols for the URL (e.g., "http", "https"). As defined in the `protocols` option. - */ - protocols: Array - /** - * A string that represents the default protocol (e.g., 'http'). As defined in the `defaultProtocol` option. - */ - defaultProtocol: string - }, - ) => boolean - - /** - * Determines whether a valid link should be automatically linked in the content. - * - * @param {string} url - The URL that has already been validated. - * @returns {boolean} - True if the link should be auto-linked; false if it should not be auto-linked. - */ - shouldAutoLink: (url: string) => boolean -} - -declare module '@tiptap/core' { - interface Commands { - link: { - /** - * Set a link mark - * @param attributes The link attributes - * @example editor.commands.setLink({ href: 'https://tiptap.dev' }) - */ - setLink: (attributes: { - href: string - target?: string | null - rel?: string | null - class?: string | null - title?: string | null - }) => ReturnType - /** - * Toggle a link mark - * @param attributes The link attributes - * @example editor.commands.toggleLink({ href: 'https://tiptap.dev' }) - */ - toggleLink: (attributes?: { - href: string - target?: string | null - rel?: string | null - class?: string | null - title?: string | null - }) => ReturnType - /** - * Unset a link mark - * @example editor.commands.unsetLink() - */ - unsetLink: () => ReturnType - } - } -} - -export function isAllowedUri(uri: string | undefined, protocols?: LinkOptions['protocols']) { - const allowedProtocols: string[] = [ - 'http', - 'https', - 'ftp', - 'ftps', - 'mailto', - 'tel', - 'callto', - 'sms', - 'cid', - 'xmpp', - ] - - if (protocols) { - protocols.forEach(protocol => { - const nextProtocol = typeof protocol === 'string' ? protocol : protocol.scheme - - if (nextProtocol) { - allowedProtocols.push(nextProtocol) - } - }) - } - - return ( - !uri || - uri.replace(UNICODE_WHITESPACE_REGEX_GLOBAL, '').match( - new RegExp( - // oxlint-disable-next-line no-useless-escape - `^(?:(?:${allowedProtocols.join('|')}):|[^a-z]|[a-z0-9+.\-]+(?:[^a-z+.\-:]|$))`, - 'i', - ), - ) - ) -} - -/** - * This extension allows you to create links. - * @see https://www.tiptap.dev/api/marks/link - */ -export const Link = Mark.create({ - name: 'link', - - priority: 1000, - - keepOnSplit: false, - - exitable: true, - - onCreate() { - // TODO: v4 - remove validate option - if (this.options.validate && !this.options.shouldAutoLink) { - // Copy the validate function to the shouldAutoLink option - this.options.shouldAutoLink = this.options.validate - console.warn( - 'The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.', - ) - } - this.options.protocols.forEach(protocol => { - if (typeof protocol === 'string') { - registerCustomProtocol(protocol) - return - } - registerCustomProtocol(protocol.scheme, protocol.optionalSlashes) - }) - }, - - onDestroy() { - reset() - }, - - inclusive() { - return this.options.autolink - }, - - addOptions() { - return { - openOnClick: true, - enableClickSelection: false, - linkOnPaste: true, - autolink: true, - protocols: [], - defaultProtocol: 'http', - HTMLAttributes: { - target: '_blank', - rel: 'noopener noreferrer nofollow', - class: null, - }, - isAllowedUri: (url, ctx) => !!isAllowedUri(url, ctx.protocols), - validate: url => !!url, - shouldAutoLink: url => { - // URLs with explicit protocols (e.g., https://) should be auto-linked - // But not if @ appears before :// (that would be userinfo like user:pass@host) - const hasProtocol = /^[a-z][a-z0-9+.-]*:\/\//i.test(url) - const hasMaybeProtocol = /^[a-z][a-z0-9+.-]*:/i.test(url) - - if (hasProtocol || (hasMaybeProtocol && !url.includes('@'))) { - return true - } - // Strip userinfo (user:pass@) if present, then extract hostname - const urlWithoutUserinfo = url.includes('@') ? url.split('@').pop()! : url - const hostname = urlWithoutUserinfo.split(/[/?#:]/)[0] - - // Don't auto-link IP addresses without protocol - if (/^\d{1,3}(\.\d{1,3}){3}$/.test(hostname)) { - return false - } - // Don't auto-link single-word hostnames without TLD (e.g., "localhost") - if (!/\./.test(hostname)) { - return false - } - return true - }, - } - }, - - addAttributes() { - return { - href: { - default: null, - parseHTML(element) { - return element.getAttribute('href') - }, - }, - target: { - default: this.options.HTMLAttributes.target, - }, - rel: { - default: this.options.HTMLAttributes.rel, - }, - class: { - default: this.options.HTMLAttributes.class, - }, - title: { - default: null, - }, - } - }, - - parseHTML() { - return [ - { - tag: 'a[href]', - getAttrs: dom => { - const href = (dom as HTMLElement).getAttribute('href') - - // prevent XSS attacks - if ( - !href || - !this.options.isAllowedUri(href, { - defaultValidate: url => !!isAllowedUri(url, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol, - }) - ) { - return false - } - return null - }, - }, - ] - }, - - renderHTML({ HTMLAttributes }) { - // prevent XSS attacks - if ( - !this.options.isAllowedUri(HTMLAttributes.href, { - defaultValidate: href => !!isAllowedUri(href, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol, - }) - ) { - // strip out the href - return ['a', mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: '' }), 0] - } - - return ['a', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] - }, - - markdownTokenName: 'link', - - parseMarkdown: (token, helpers) => { - return helpers.applyMark('link', helpers.parseInline(token.tokens || []), { - href: token.href, - title: token.title || null, - }) - }, - - renderMarkdown: (node, h) => { - const href = node.attrs?.href ?? '' - const title = node.attrs?.title ?? '' - const text = h.renderChildren(node) - - return title ? `[${text}](${href} "${title}")` : `[${text}](${href})` - }, - - addCommands() { - return { - setLink: - attributes => - ({ chain }) => { - const { href } = attributes - - if ( - !this.options.isAllowedUri(href, { - defaultValidate: url => !!isAllowedUri(url, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol, - }) - ) { - return false - } - - return chain().setMark(this.name, attributes).setMeta('preventAutolink', true).run() - }, - - toggleLink: - attributes => - ({ chain }) => { - const { href } = attributes || {} - - if ( - href && - !this.options.isAllowedUri(href, { - defaultValidate: url => !!isAllowedUri(url, this.options.protocols), - protocols: this.options.protocols, - defaultProtocol: this.options.defaultProtocol, - }) - ) { - return false - } - - return chain() - .toggleMark(this.name, attributes, { extendEmptyMarkRange: true }) - .setMeta('preventAutolink', true) - .run() - }, - - unsetLink: - () => - ({ chain }) => { - return chain() - .unsetMark(this.name, { extendEmptyMarkRange: true }) - .setMeta('preventAutolink', true) - .run() - }, - } - }, - - addPasteRules() { - return [ - markPasteRule({ - find: text => { - const foundLinks: PasteRuleMatch[] = [] - - if (text) { - const { protocols, defaultProtocol } = this.options - const links = find(text).filter( - item => - item.isLink && - this.options.isAllowedUri(item.value, { - defaultValidate: href => !!isAllowedUri(href, protocols), - protocols, - defaultProtocol, - }), - ) - - if (links.length) { - links.forEach(link => { - if (!this.options.shouldAutoLink(link.value)) { - return - } - - foundLinks.push({ - text: link.value, - data: { - href: link.href, - }, - index: link.start, - }) - }) - } - } - - return foundLinks - }, - type: this.type, - getAttributes: match => { - return { - href: match.data?.href, - } - }, - }), - ] - }, - - addProseMirrorPlugins() { - const plugins: Plugin[] = [] - const { protocols, defaultProtocol } = this.options - - if (this.options.autolink) { - plugins.push( - autolink({ - type: this.type, - defaultProtocol: this.options.defaultProtocol, - validate: url => - this.options.isAllowedUri(url, { - defaultValidate: href => !!isAllowedUri(href, protocols), - protocols, - defaultProtocol, - }), - shouldAutoLink: this.options.shouldAutoLink, - }), - ) - } - - plugins.push( - clickHandler({ - type: this.type, - editor: this.editor, - openOnClick: - this.options.openOnClick === 'whenNotEditable' ? true : this.options.openOnClick, - enableClickSelection: this.options.enableClickSelection, - }), - ) - - if (this.options.linkOnPaste) { - plugins.push( - pasteHandler({ - editor: this.editor, - defaultProtocol: this.options.defaultProtocol, - type: this.type, - shouldAutoLink: this.options.shouldAutoLink, - }), - ) - } - - return plugins - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm deleted file mode 120000 index f877560..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+pm@3.26.0/node_modules/@tiptap/pm \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/linkifyjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/linkifyjs deleted file mode 120000 index 648148b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/linkifyjs +++ /dev/null @@ -1 +0,0 @@ -../../linkifyjs@4.3.3/node_modules/linkifyjs \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list deleted file mode 120000 index e342d8d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/README.md deleted file mode 100644 index 588566e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-list-item - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-list-item.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-list-item) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-list-item.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-list-item.svg)](https://www.npmjs.com/package/@tiptap/extension-list-item) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.cjs deleted file mode 100644 index ee3b024..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.cjs +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ListItem: () => import_extension_list2.ListItem, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); -var import_extension_list = require("@tiptap/extension-list"); -var import_extension_list2 = require("@tiptap/extension-list"); -var index_default = import_extension_list.ListItem; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ListItem -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.cjs.map deleted file mode 100644 index e00bed4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { ListItem } from '@tiptap/extension-list'\n\nexport type { ListItemOptions } from '@tiptap/extension-list'\nexport { ListItem } from '@tiptap/extension-list'\n\nexport default ListItem\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAyB;AAGzB,IAAAA,yBAAyB;AAEzB,IAAO,gBAAQ;","names":["import_extension_list"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.d.cts deleted file mode 100644 index f7899a8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.d.cts +++ /dev/null @@ -1,2 +0,0 @@ -import { ListItem } from '@tiptap/extension-list'; -export { ListItem, ListItemOptions, ListItem as default } from '@tiptap/extension-list'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.d.ts deleted file mode 100644 index f7899a8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ListItem } from '@tiptap/extension-list'; -export { ListItem, ListItemOptions, ListItem as default } from '@tiptap/extension-list'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.js deleted file mode 100644 index 48d4fdb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// src/index.ts -import { ListItem } from "@tiptap/extension-list"; -import { ListItem as ListItem2 } from "@tiptap/extension-list"; -var index_default = ListItem; -export { - ListItem2 as ListItem, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.js.map deleted file mode 100644 index 4e5f874..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { ListItem } from '@tiptap/extension-list'\n\nexport type { ListItemOptions } from '@tiptap/extension-list'\nexport { ListItem } from '@tiptap/extension-list'\n\nexport default ListItem\n"],"mappings":";AAAA,SAAS,gBAAgB;AAGzB,SAAS,YAAAA,iBAAgB;AAEzB,IAAO,gBAAQ;","names":["ListItem"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/package.json deleted file mode 100644 index 048b041..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-list-item", - "version": "3.26.0", - "description": "list item extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-list-item" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/extension-list": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/extension-list": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/src/index.ts deleted file mode 100644 index c6db50c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ListItem } from '@tiptap/extension-list' - -export type { ListItemOptions } from '@tiptap/extension-list' -export { ListItem } from '@tiptap/extension-list' - -export default ListItem diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list deleted file mode 120000 index e342d8d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/README.md deleted file mode 100644 index 68cf576..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-list-keymap - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-list-keymap.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-list-keymap) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-list-keymap.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-list-keymap.svg)](https://www.npmjs.com/package/@tiptap/extension-list-keymap) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.cjs deleted file mode 100644 index 53a8a77..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.cjs +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ListKeymap: () => import_extension_list2.ListKeymap, - default: () => index_default, - listHelpers: () => import_extension_list2.listHelpers -}); -module.exports = __toCommonJS(index_exports); -var import_extension_list = require("@tiptap/extension-list"); -var import_extension_list2 = require("@tiptap/extension-list"); -var index_default = import_extension_list.ListKeymap; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ListKeymap, - listHelpers -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.cjs.map deleted file mode 100644 index 2c80845..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { ListKeymap } from '@tiptap/extension-list'\n\nexport type { ListKeymapOptions } from '@tiptap/extension-list'\nexport { listHelpers, ListKeymap } from '@tiptap/extension-list'\n\nexport default ListKeymap\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA2B;AAG3B,IAAAA,yBAAwC;AAExC,IAAO,gBAAQ;","names":["import_extension_list"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.d.cts deleted file mode 100644 index 911b87b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.d.cts +++ /dev/null @@ -1,2 +0,0 @@ -import { ListKeymap } from '@tiptap/extension-list'; -export { ListKeymap, ListKeymapOptions, ListKeymap as default, listHelpers } from '@tiptap/extension-list'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.d.ts deleted file mode 100644 index 911b87b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ListKeymap } from '@tiptap/extension-list'; -export { ListKeymap, ListKeymapOptions, ListKeymap as default, listHelpers } from '@tiptap/extension-list'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.js deleted file mode 100644 index 7c33948..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.js +++ /dev/null @@ -1,10 +0,0 @@ -// src/index.ts -import { ListKeymap } from "@tiptap/extension-list"; -import { listHelpers, ListKeymap as ListKeymap2 } from "@tiptap/extension-list"; -var index_default = ListKeymap; -export { - ListKeymap2 as ListKeymap, - index_default as default, - listHelpers -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.js.map deleted file mode 100644 index db9fcba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { ListKeymap } from '@tiptap/extension-list'\n\nexport type { ListKeymapOptions } from '@tiptap/extension-list'\nexport { listHelpers, ListKeymap } from '@tiptap/extension-list'\n\nexport default ListKeymap\n"],"mappings":";AAAA,SAAS,kBAAkB;AAG3B,SAAS,aAAa,cAAAA,mBAAkB;AAExC,IAAO,gBAAQ;","names":["ListKeymap"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/package.json deleted file mode 100644 index d2611e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-list-keymap", - "version": "3.26.0", - "description": "list keymap extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-list-keymap" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/extension-list": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/extension-list": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/src/index.ts deleted file mode 100644 index 870a348..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ListKeymap } from '@tiptap/extension-list' - -export type { ListKeymapOptions } from '@tiptap/extension-list' -export { listHelpers, ListKeymap } from '@tiptap/extension-list' - -export default ListKeymap diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/README.md deleted file mode 100644 index 12fc6fa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-list - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-list.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-list) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-list.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-list.svg)](https://www.npmjs.com/package/@tiptap/extension-list) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs deleted file mode 100644 index 39538f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/bullet-list/index.ts -var index_exports = {}; -__export(index_exports, { - BulletList: () => BulletList, - bulletListInputRegex: () => bulletListInputRegex -}); -module.exports = __toCommonJS(index_exports); - -// src/bullet-list/bullet-list.ts -var import_core = require("@tiptap/core"); -var ListItemName = "listItem"; -var TextStyleName = "textStyle"; -var bulletListInputRegex = /^\s*([-+*])\s$/; -var BulletList = import_core.Node.create({ - name: "bulletList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [{ tag: "ul" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["ul", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || token.ordered) { - return []; - } - return { - type: "bulletList", - content: token.items ? helpers.parseChildren(token.items) : [] - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleBulletList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-8": () => this.editor.commands.toggleBulletList() - }; - }, - addInputRules() { - let inputRule = (0, import_core.wrappingInputRule)({ - find: bulletListInputRegex, - type: this.type - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = (0, import_core.wrappingInputRule)({ - find: bulletListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: () => { - return this.editor.getAttributes(TextStyleName); - }, - editor: this.editor - }); - } - return [inputRule]; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - BulletList, - bulletListInputRegex -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs.map deleted file mode 100644 index f5d2a1d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/bullet-list/index.ts","../../src/bullet-list/bullet-list.ts"],"sourcesContent":["export * from './bullet-list.js'\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface BulletListOptions {\n /**\n * The node name for the list items\n * @default 'listItem'\n * @example 'paragraph'\n */\n itemTypeName: string\n\n /**\n * HTML attributes to add to the bullet list element\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting the list\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting the list\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bulletList: {\n /**\n * Toggle a bullet list\n */\n toggleBulletList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches a bullet list to a dash or asterisk.\n */\nexport const bulletListInputRegex = /^\\s*([-+*])\\s$/\n\n/**\n * This extension allows you to create bullet lists.\n * This requires the ListItem extension\n * @see https://tiptap.dev/api/nodes/bullet-list\n * @see https://tiptap.dev/api/nodes/list-item.\n */\nexport const BulletList = Node.create({\n name: 'bulletList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [{ tag: 'ul' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || (token as any).ordered) {\n return []\n }\n\n return {\n type: 'bulletList',\n content: token.items ? helpers.parseChildren(token.items) : [],\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleBulletList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: () => {\n return this.editor.getAttributes(TextStyleName)\n },\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAyD;AAEzD,IAAM,eAAe;AACrB,IAAM,gBAAgB;AA8Cf,IAAM,uBAAuB;AAQ7B,IAAM,aAAa,iBAAK,OAA0B;AAAA,EACvD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,cAAc;AAAA,MACd,gBAAgB,CAAC;AAAA,MACjB,WAAW;AAAA,MACX,gBAAgB;AAAA,IAClB;AAAA,EACF;AAAA,EAEA,OAAO;AAAA,EAEP,UAAU;AACR,WAAO,GAAG,KAAK,QAAQ,YAAY;AAAA,EACrC;AAAA,EAEA,YAAY;AACV,WAAO,CAAC,EAAE,KAAK,KAAK,CAAC;AAAA,EACvB;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO,CAAC,UAAM,6BAAgB,KAAK,QAAQ,gBAAgB,cAAc,GAAG,CAAC;AAAA,EAC/E;AAAA,EAEA,mBAAmB;AAAA,EAEnB,eAAe,CAAC,OAAO,YAAY;AACjC,QAAI,MAAM,SAAS,UAAW,MAAc,SAAS;AACnD,aAAO,CAAC;AAAA,IACV;AAEA,WAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS,MAAM,QAAQ,QAAQ,cAAc,MAAM,KAAK,IAAI,CAAC;AAAA,IAC/D;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,MAAM,MAAM;AAC3B,QAAI,CAAC,KAAK,SAAS;AACjB,aAAO;AAAA,IACT;AAEA,WAAO,EAAE,eAAe,KAAK,SAAS,IAAI;AAAA,EAC5C;AAAA,EAEA,iBAAiB;AAAA,IACf,gBAAgB;AAAA,EAClB;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,kBACE,MACA,CAAC,EAAE,UAAU,MAAM,MAAM;AACvB,YAAI,KAAK,QAAQ,gBAAgB;AAC/B,iBAAO,MAAM,EACV,WAAW,KAAK,MAAM,KAAK,QAAQ,cAAc,KAAK,QAAQ,SAAS,EACvE,iBAAiB,cAAc,KAAK,OAAO,cAAc,aAAa,CAAC,EACvE,IAAI;AAAA,QACT;AACA,eAAO,SAAS,WAAW,KAAK,MAAM,KAAK,QAAQ,cAAc,KAAK,QAAQ,SAAS;AAAA,MACzF;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,eAAe,MAAM,KAAK,OAAO,SAAS,iBAAiB;AAAA,IAC7D;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,QAAI,gBAAY,+BAAkB;AAAA,MAChC,MAAM;AAAA,MACN,MAAM,KAAK;AAAA,IACb,CAAC;AAED,QAAI,KAAK,QAAQ,aAAa,KAAK,QAAQ,gBAAgB;AACzD,sBAAY,+BAAkB;AAAA,QAC5B,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,QACX,WAAW,KAAK,QAAQ;AAAA,QACxB,gBAAgB,KAAK,QAAQ;AAAA,QAC7B,eAAe,MAAM;AACnB,iBAAO,KAAK,OAAO,cAAc,aAAa;AAAA,QAChD;AAAA,QACA,QAAQ,KAAK;AAAA,MACf,CAAC;AAAA,IACH;AACA,WAAO,CAAC,SAAS;AAAA,EACnB;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.cts deleted file mode 100644 index eaab01f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.cts +++ /dev/null @@ -1,51 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface BulletListOptions { - /** - * The node name for the list items - * @default 'listItem' - * @example 'paragraph' - */ - itemTypeName: string; - /** - * HTML attributes to add to the bullet list element - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting the list - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting the list - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - bulletList: { - /** - * Toggle a bullet list - */ - toggleBulletList: () => ReturnType; - }; - } -} -/** - * Matches a bullet list to a dash or asterisk. - */ -declare const bulletListInputRegex: RegExp; -/** - * This extension allows you to create bullet lists. - * This requires the ListItem extension - * @see https://tiptap.dev/api/nodes/bullet-list - * @see https://tiptap.dev/api/nodes/list-item. - */ -declare const BulletList: Node; - -export { BulletList, type BulletListOptions, bulletListInputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.ts deleted file mode 100644 index eaab01f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface BulletListOptions { - /** - * The node name for the list items - * @default 'listItem' - * @example 'paragraph' - */ - itemTypeName: string; - /** - * HTML attributes to add to the bullet list element - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting the list - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting the list - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - bulletList: { - /** - * Toggle a bullet list - */ - toggleBulletList: () => ReturnType; - }; - } -} -/** - * Matches a bullet list to a dash or asterisk. - */ -declare const bulletListInputRegex: RegExp; -/** - * This extension allows you to create bullet lists. - * This requires the ListItem extension - * @see https://tiptap.dev/api/nodes/bullet-list - * @see https://tiptap.dev/api/nodes/list-item. - */ -declare const BulletList: Node; - -export { BulletList, type BulletListOptions, bulletListInputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.js deleted file mode 100644 index b85f1a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.js +++ /dev/null @@ -1,84 +0,0 @@ -// src/bullet-list/bullet-list.ts -import { mergeAttributes, Node, wrappingInputRule } from "@tiptap/core"; -var ListItemName = "listItem"; -var TextStyleName = "textStyle"; -var bulletListInputRegex = /^\s*([-+*])\s$/; -var BulletList = Node.create({ - name: "bulletList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [{ tag: "ul" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["ul", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || token.ordered) { - return []; - } - return { - type: "bulletList", - content: token.items ? helpers.parseChildren(token.items) : [] - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleBulletList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-8": () => this.editor.commands.toggleBulletList() - }; - }, - addInputRules() { - let inputRule = wrappingInputRule({ - find: bulletListInputRegex, - type: this.type - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = wrappingInputRule({ - find: bulletListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: () => { - return this.editor.getAttributes(TextStyleName); - }, - editor: this.editor - }); - } - return [inputRule]; - } -}); -export { - BulletList, - bulletListInputRegex -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.js.map deleted file mode 100644 index 724fc1c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/bullet-list/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/bullet-list/bullet-list.ts"],"sourcesContent":["import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface BulletListOptions {\n /**\n * The node name for the list items\n * @default 'listItem'\n * @example 'paragraph'\n */\n itemTypeName: string\n\n /**\n * HTML attributes to add to the bullet list element\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting the list\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting the list\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bulletList: {\n /**\n * Toggle a bullet list\n */\n toggleBulletList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches a bullet list to a dash or asterisk.\n */\nexport const bulletListInputRegex = /^\\s*([-+*])\\s$/\n\n/**\n * This extension allows you to create bullet lists.\n * This requires the ListItem extension\n * @see https://tiptap.dev/api/nodes/bullet-list\n * @see https://tiptap.dev/api/nodes/list-item.\n */\nexport const BulletList = Node.create({\n name: 'bulletList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [{ tag: 'ul' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || (token as any).ordered) {\n return []\n }\n\n return {\n type: 'bulletList',\n content: token.items ? helpers.parseChildren(token.items) : [],\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleBulletList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: () => {\n return this.editor.getAttributes(TextStyleName)\n },\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n"],"mappings":";AAAA,SAAS,iBAAiB,MAAM,yBAAyB;AAEzD,IAAM,eAAe;AACrB,IAAM,gBAAgB;AA8Cf,IAAM,uBAAuB;AAQ7B,IAAM,aAAa,KAAK,OAA0B;AAAA,EACvD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,cAAc;AAAA,MACd,gBAAgB,CAAC;AAAA,MACjB,WAAW;AAAA,MACX,gBAAgB;AAAA,IAClB;AAAA,EACF;AAAA,EAEA,OAAO;AAAA,EAEP,UAAU;AACR,WAAO,GAAG,KAAK,QAAQ,YAAY;AAAA,EACrC;AAAA,EAEA,YAAY;AACV,WAAO,CAAC,EAAE,KAAK,KAAK,CAAC;AAAA,EACvB;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO,CAAC,MAAM,gBAAgB,KAAK,QAAQ,gBAAgB,cAAc,GAAG,CAAC;AAAA,EAC/E;AAAA,EAEA,mBAAmB;AAAA,EAEnB,eAAe,CAAC,OAAO,YAAY;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;AAAA,QACA,QAAQ,KAAK;AAAA,MACf,CAAC;AAAA,IACH;AACA,WAAO,CAAC,SAAS;AAAA,EACnB;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.cjs deleted file mode 100644 index 99f34e6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.cjs +++ /dev/null @@ -1,1320 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - BulletList: () => BulletList, - ListItem: () => ListItem, - ListKeymap: () => ListKeymap, - ListKit: () => ListKit, - OrderedList: () => OrderedList, - TaskItem: () => TaskItem, - TaskList: () => TaskList, - bulletListInputRegex: () => bulletListInputRegex, - inputRegex: () => inputRegex, - listHelpers: () => listHelpers_exports, - orderedListInputRegex: () => orderedListInputRegex -}); -module.exports = __toCommonJS(index_exports); - -// src/bullet-list/bullet-list.ts -var import_core = require("@tiptap/core"); -var ListItemName = "listItem"; -var TextStyleName = "textStyle"; -var bulletListInputRegex = /^\s*([-+*])\s$/; -var BulletList = import_core.Node.create({ - name: "bulletList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [{ tag: "ul" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["ul", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || token.ordered) { - return []; - } - return { - type: "bulletList", - content: token.items ? helpers.parseChildren(token.items) : [] - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleBulletList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-8": () => this.editor.commands.toggleBulletList() - }; - }, - addInputRules() { - let inputRule = (0, import_core.wrappingInputRule)({ - find: bulletListInputRegex, - type: this.type - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = (0, import_core.wrappingInputRule)({ - find: bulletListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: () => { - return this.editor.getAttributes(TextStyleName); - }, - editor: this.editor - }); - } - return [inputRule]; - } -}); - -// src/item/list-item.ts -var import_core3 = require("@tiptap/core"); - -// src/helpers/createBranchingListDeleteKeymap.ts -var import_core2 = require("@tiptap/core"); - -// src/helpers/hoistBranchingNestedList.ts -var import_model = require("@tiptap/pm/model"); - -// src/helpers/getBranchingNestedListAtCursor.ts -var getBranchingNestedListAtCursor = (state, itemName, wrapperNames) => { - const { selection } = state; - if (!selection.empty) { - return null; - } - const { $from } = selection; - if (!$from.parent.isTextblock) { - return null; - } - if ($from.parentOffset !== $from.parent.content.size) { - return null; - } - let listItemDepth = -1; - for (let depth = $from.depth; depth > 0; depth -= 1) { - if ($from.node(depth).type.name === itemName) { - listItemDepth = depth; - break; - } - } - if (listItemDepth < 0) { - return null; - } - const listItem = $from.node(listItemDepth); - const indexInListItem = $from.index(listItemDepth); - if (indexInListItem + 1 >= listItem.childCount) { - return null; - } - const nextChild = listItem.child(indexInListItem + 1); - if (!wrapperNames.includes(nextChild.type.name)) { - return null; - } - const itemType = state.schema.nodes[itemName]; - let hasBranching = false; - nextChild.forEach((child) => { - if (child.type === itemType && child.childCount > 1) { - hasBranching = true; - } - }); - if (!hasBranching) { - return null; - } - const nodeAfter = state.doc.resolve($from.after()).nodeAfter; - if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) { - return null; - } - const items = []; - nodeAfter.forEach((child) => { - items.push(child); - }); - if (items.length === 0) { - return null; - } - return { - listItemDepth, - nestedList: nodeAfter, - nestedListPos: $from.after(), - insertPos: $from.after(listItemDepth), - items - }; -}; - -// src/helpers/hoistBranchingNestedList.ts -var hoistBranchingNestedList = (state, dispatch, itemName, wrapperNames) => { - const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames); - if (!context) { - return false; - } - const { selection } = state; - const { nestedList, nestedListPos, insertPos, items } = context; - const tr = state.tr; - tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize); - const mappedInsertPos = tr.mapping.map(insertPos); - tr.insert(mappedInsertPos, import_model.Fragment.from(items)); - tr.setSelection(selection.map(tr.doc, tr.mapping)); - if (dispatch) { - dispatch(tr); - } - return true; -}; - -// src/helpers/handleDeleteBranchingNestedList.ts -var handleDeleteBranchingNestedList = (editor, itemName, wrapperNames) => { - return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames); -}; - -// src/helpers/createBranchingListDeleteKeymap.ts -var createBranchingListDeleteKeymap = (itemName, wrapperNames) => { - return import_core2.Extension.create({ - name: `${itemName}BranchingDeleteKeymap`, - priority: 101, - addKeyboardShortcuts() { - const handleDelete2 = () => handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames); - return { - Delete: handleDelete2, - "Mod-Delete": handleDelete2 - }; - } - }); -}; - -// src/item/list-item.ts -function isSameLineOrderedListToken(token) { - var _a, _b; - const nestedToken = (_a = token.tokens) == null ? void 0 : _a[0]; - return Boolean( - token.text && ((_b = token.tokens) == null ? void 0 : _b.length) === 1 && (nestedToken == null ? void 0 : nestedToken.type) === "list" && nestedToken.ordered && nestedToken.raw === token.text - ); -} -function parseSameLineOrderedListText(text, helpers) { - if (helpers.tokenizeInline) { - return helpers.parseInline(helpers.tokenizeInline(text)); - } - return helpers.parseInline([ - { - type: "text", - raw: text, - text - } - ]); -} -var ListItem = import_core3.Node.create({ - name: "listItem", - addOptions() { - return { - HTMLAttributes: {}, - bulletListTypeName: "bulletList", - orderedListTypeName: "orderedList" - }; - }, - content: "paragraph block*", - defining: true, - parseHTML() { - return [ - { - tag: "li" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["li", (0, import_core3.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list_item", - parseMarkdown: (token, helpers) => { - var _a; - if (token.type !== "list_item") { - return []; - } - const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren; - let content = []; - if (token.tokens && token.tokens.length > 0) { - if (isSameLineOrderedListToken(token)) { - return { - type: "listItem", - content: [ - { - type: "paragraph", - content: parseSameLineOrderedListText(token.text || "", helpers) - } - ] - }; - } - const hasParagraphTokens = token.tokens.some((t) => t.type === "paragraph"); - if (hasParagraphTokens) { - content = parseBlockChildren(token.tokens); - } else { - const firstToken = token.tokens[0]; - if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) { - const inlineContent = helpers.parseInline(firstToken.tokens); - content = [ - { - type: "paragraph", - content: inlineContent - } - ]; - if (token.tokens.length > 1) { - const remainingTokens = token.tokens.slice(1); - const additionalContent = parseBlockChildren(remainingTokens); - content.push(...additionalContent); - } - } else { - content = parseBlockChildren(token.tokens); - } - } - } - if (content.length === 0) { - content = [ - { - type: "paragraph", - content: [] - } - ]; - } - return { - type: "listItem", - content - }; - }, - renderMarkdown: (node, h, ctx) => { - return (0, import_core3.renderNestedMarkdownContent)( - node, - h, - (context) => { - var _a, _b; - if (context.parentType === "bulletList") { - return "- "; - } - if (context.parentType === "orderedList") { - const start = ((_b = (_a = context.meta) == null ? void 0 : _a.parentAttrs) == null ? void 0 : _b.start) || 1; - return `${start + context.index}. `; - } - return "- "; - }, - ctx - ); - }, - addExtensions() { - return [ - createBranchingListDeleteKeymap(this.name, [ - this.options.bulletListTypeName, - this.options.orderedListTypeName - ]) - ]; - }, - addKeyboardShortcuts() { - return { - Enter: () => this.editor.commands.splitListItem(this.name), - Tab: () => this.editor.commands.sinkListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - } -}); - -// src/keymap/list-keymap.ts -var import_core9 = require("@tiptap/core"); - -// src/keymap/listHelpers/index.ts -var listHelpers_exports = {}; -__export(listHelpers_exports, { - findListItemPos: () => findListItemPos, - getNextListDepth: () => getNextListDepth, - handleBackspace: () => handleBackspace, - handleDelete: () => handleDelete, - hasListBefore: () => hasListBefore, - hasListItemAfter: () => hasListItemAfter, - hasListItemBefore: () => hasListItemBefore, - listItemHasSubList: () => listItemHasSubList, - nextListIsDeeper: () => nextListIsDeeper, - nextListIsHigher: () => nextListIsHigher -}); - -// src/keymap/listHelpers/findListItemPos.ts -var import_core4 = require("@tiptap/core"); -var findListItemPos = (typeOrName, state) => { - const { $from } = state.selection; - const nodeType = (0, import_core4.getNodeType)(typeOrName, state.schema); - let currentNode = null; - let currentDepth = $from.depth; - let currentPos = $from.pos; - let targetDepth = null; - while (currentDepth > 0 && targetDepth === null) { - currentNode = $from.node(currentDepth); - if (currentNode.type === nodeType) { - targetDepth = currentDepth; - } else { - currentDepth -= 1; - currentPos -= 1; - } - } - if (targetDepth === null) { - return null; - } - return { $pos: state.doc.resolve(currentPos), depth: targetDepth }; -}; - -// src/keymap/listHelpers/getNextListDepth.ts -var import_core5 = require("@tiptap/core"); -var getNextListDepth = (typeOrName, state) => { - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos) { - return false; - } - const [, depth] = (0, import_core5.getNodeAtPosition)(state, typeOrName, listItemPos.$pos.pos + 4); - return depth; -}; - -// src/keymap/listHelpers/handleBackspace.ts -var import_core6 = require("@tiptap/core"); - -// src/keymap/listHelpers/hasListBefore.ts -var hasListBefore = (editorState, name, parentListTypes) => { - const { $anchor } = editorState.selection; - const previousNodePos = Math.max(0, $anchor.pos - 2); - const previousNode = editorState.doc.resolve(previousNodePos).node(); - if (!previousNode || !parentListTypes.includes(previousNode.type.name)) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/handleBackspace.ts -var handleBackspace = (editor, name, parentListTypes) => { - if (editor.commands.undoInputRule()) { - return true; - } - if (editor.state.selection.from !== editor.state.selection.to) { - return false; - } - if (!(0, import_core6.isNodeActive)(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) { - const { $anchor } = editor.state.selection; - const $listPos = editor.state.doc.resolve($anchor.before() - 1); - const listDescendants = []; - $listPos.node().descendants((node, pos) => { - if (node.type.name === name) { - listDescendants.push({ node, pos }); - } - }); - const lastItem = listDescendants.at(-1); - if (!lastItem) { - return false; - } - const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1); - return editor.chain().cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end()).joinForward().run(); - } - if (!(0, import_core6.isNodeActive)(editor.state, name)) { - return false; - } - if (!(0, import_core6.isAtStartOfNode)(editor.state)) { - return false; - } - return editor.chain().liftListItem(name).run(); -}; - -// src/keymap/listHelpers/handleDelete.ts -var import_core7 = require("@tiptap/core"); - -// src/keymap/listHelpers/nextListIsDeeper.ts -var nextListIsDeeper = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth > listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/nextListIsHigher.ts -var nextListIsHigher = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth < listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/handleDelete.ts -var handleDelete = (editor, name) => { - if (!(0, import_core7.isNodeActive)(editor.state, name)) { - return false; - } - if (!(0, import_core7.isAtEndOfNode)(editor.state, name)) { - return false; - } - const { selection } = editor.state; - const { $from, $to } = selection; - if (!selection.empty && $from.sameParent($to)) { - return false; - } - if (nextListIsDeeper(name, editor.state)) { - return editor.chain().focus(editor.state.selection.from + 4).lift(name).joinBackward().run(); - } - if (nextListIsHigher(name, editor.state)) { - return editor.chain().joinForward().joinBackward().run(); - } - return editor.commands.joinItemForward(); -}; - -// src/keymap/listHelpers/hasListItemAfter.ts -var hasListItemAfter = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2); - if ($targetPos.index() === $targetPos.parent.childCount - 1) { - return false; - } - if (((_a = $targetPos.nodeAfter) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/hasListItemBefore.ts -var hasListItemBefore = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - 2); - if ($targetPos.index() === 0) { - return false; - } - if (((_a = $targetPos.nodeBefore) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/listItemHasSubList.ts -var import_core8 = require("@tiptap/core"); -var listItemHasSubList = (typeOrName, state, node) => { - if (!node) { - return false; - } - const nodeType = (0, import_core8.getNodeType)(typeOrName, state.schema); - let hasSubList = false; - node.descendants((child) => { - if (child.type === nodeType) { - hasSubList = true; - } - }); - return hasSubList; -}; - -// src/keymap/list-keymap.ts -var ListKeymap = import_core9.Extension.create({ - name: "listKeymap", - addOptions() { - return { - listTypes: [ - { - itemName: "listItem", - wrapperNames: ["bulletList", "orderedList"] - }, - { - itemName: "taskItem", - wrapperNames: ["taskList"] - } - ] - }; - }, - addKeyboardShortcuts() { - return { - Delete: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - "Mod-Delete": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - Backspace: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - }, - "Mod-Backspace": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - } - }; - } -}); - -// src/kit/index.ts -var import_core13 = require("@tiptap/core"); - -// src/ordered-list/ordered-list.ts -var import_core10 = require("@tiptap/core"); - -// src/ordered-list/utils.ts -var ORDERED_LIST_ITEM_REGEX = /^(\s*)(\d+)\.\s+(.*)$/; -var INDENTED_LINE_REGEX = /^\s/; -function isBlockContentLine(line) { - const trimmedLine = line.trimStart(); - return ( - // oxlint-disable-next-line prefer-string-starts-ends-with - /^[-+*]\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^\d+\.\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^>\s?/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^```/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^~~~/.test(trimmedLine) - ); -} -function splitItemContent(contentLines) { - const paragraphLines = []; - const blockLines = []; - let reachedBlockBoundary = false; - contentLines.forEach((line) => { - if (reachedBlockBoundary) { - blockLines.push(line); - return; - } - if (line.trim() === "") { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - if (paragraphLines.length > 0 && isBlockContentLine(line)) { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - paragraphLines.push(line); - }); - return { - paragraphLines, - blockLines - }; -} -function collectOrderedListItems(lines) { - const listItems = []; - let currentLineIndex = 0; - let consumed = 0; - while (currentLineIndex < lines.length) { - const line = lines[currentLineIndex]; - const match = line.match(ORDERED_LIST_ITEM_REGEX); - if (!match) { - break; - } - const [, indent, number, content] = match; - const indentLevel = indent.length; - const itemContentLines = [content]; - let nextLineIndex = currentLineIndex + 1; - const itemLines = [line]; - let sawBlankLine = false; - while (nextLineIndex < lines.length) { - const nextLine = lines[nextLineIndex]; - const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX); - if (nextMatch) { - break; - } - if (nextLine.trim() === "") { - itemLines.push(nextLine); - itemContentLines.push(""); - sawBlankLine = true; - nextLineIndex += 1; - } else if (nextLine.match(INDENTED_LINE_REGEX)) { - itemLines.push(nextLine); - itemContentLines.push(nextLine.slice(indentLevel + 2)); - nextLineIndex += 1; - } else { - if (sawBlankLine) { - break; - } - itemLines.push(nextLine); - itemContentLines.push(nextLine); - nextLineIndex += 1; - } - } - listItems.push({ - indent: indentLevel, - number: parseInt(number, 10), - content: itemContentLines.join("\n").trim(), - contentLines: itemContentLines, - raw: itemLines.join("\n") - }); - consumed = nextLineIndex; - currentLineIndex = nextLineIndex; - } - return [listItems, consumed]; -} -function buildNestedStructure(items, baseIndent, lexer) { - const result = []; - let currentIndex = 0; - while (currentIndex < items.length) { - const item = items[currentIndex]; - if (item.indent === baseIndent) { - const { paragraphLines, blockLines } = splitItemContent(item.contentLines); - const mainText = paragraphLines.join("\n").trim(); - const tokens = []; - if (mainText) { - tokens.push({ - type: "paragraph", - raw: mainText, - tokens: lexer.inlineTokens(mainText) - }); - } - const additionalContent = blockLines.join("\n").trim(); - if (additionalContent) { - const blockTokens = lexer.blockTokens(additionalContent); - tokens.push(...blockTokens); - } - let lookAheadIndex = currentIndex + 1; - const nestedItems = []; - while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) { - nestedItems.push(items[lookAheadIndex]); - lookAheadIndex += 1; - } - if (nestedItems.length > 0) { - const nextIndent = Math.min(...nestedItems.map((nestedItem) => nestedItem.indent)); - const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer); - tokens.push({ - type: "list", - ordered: true, - start: nestedItems[0].number, - items: nestedListItems, - raw: nestedItems.map((nestedItem) => nestedItem.raw).join("\n") - }); - } - result.push({ - type: "list_item", - raw: item.raw, - tokens - }); - currentIndex = lookAheadIndex; - } else { - currentIndex += 1; - } - } - return result; -} -function parseListItems(items, helpers) { - return items.map((item) => { - if (item.type !== "list_item") { - return helpers.parseChildren([item])[0]; - } - const content = []; - if (item.tokens && item.tokens.length > 0) { - item.tokens.forEach((itemToken) => { - if (itemToken.type === "paragraph" || itemToken.type === "list" || itemToken.type === "blockquote" || itemToken.type === "code") { - content.push(...helpers.parseChildren([itemToken])); - } else if (itemToken.type === "text" && itemToken.tokens) { - const inlineContent = helpers.parseChildren([itemToken]); - content.push({ - type: "paragraph", - content: inlineContent - }); - } else { - const parsed = helpers.parseChildren([itemToken]); - if (parsed.length > 0) { - content.push(...parsed); - } - } - }); - } - return { - type: "listItem", - content - }; - }); -} - -// src/ordered-list/ordered-list.ts -var ListItemName2 = "listItem"; -var TextStyleName2 = "textStyle"; -var orderedListInputRegex = /^(\d+)\.\s$/; -var OrderedList = import_core10.Node.create({ - name: "orderedList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - addAttributes() { - return { - start: { - default: 1, - parseHTML: (element) => { - return element.hasAttribute("start") ? parseInt(element.getAttribute("start") || "", 10) : 1; - } - }, - type: { - default: null, - parseHTML: (element) => element.getAttribute("type") - } - }; - }, - parseHTML() { - return [ - { - tag: "ol" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - const { start, ...attributesWithoutStart } = HTMLAttributes; - return start === 1 ? ["ol", (0, import_core10.mergeAttributes)(this.options.HTMLAttributes, attributesWithoutStart), 0] : ["ol", (0, import_core10.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || !token.ordered) { - return []; - } - const startValue = token.start || 1; - const content = token.items ? parseListItems(token.items, helpers) : []; - if (startValue !== 1) { - return { - type: "orderedList", - attrs: { start: startValue }, - content - }; - } - return { - type: "orderedList", - content - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "orderedList", - level: "block", - start: (src) => { - const match = src.match(/^(\s*)(\d+)\.\s+/); - const index = match == null ? void 0 : match.index; - return index !== void 0 ? index : -1; - }, - tokenize: (src, _tokens, lexer) => { - var _a; - const lines = src.split("\n"); - const [listItems, consumed] = collectOrderedListItems(lines); - if (listItems.length === 0) { - return void 0; - } - const items = buildNestedStructure(listItems, 0, lexer); - if (items.length === 0) { - return void 0; - } - const startValue = ((_a = listItems[0]) == null ? void 0 : _a.number) || 1; - return { - type: "list", - ordered: true, - start: startValue, - items, - raw: lines.slice(0, consumed).join("\n") - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleOrderedList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName2, this.editor.getAttributes(TextStyleName2)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() - }; - }, - addInputRules() { - let inputRule = (0, import_core10.wrappingInputRule)({ - find: orderedListInputRegex, - type: this.type, - getAttributes: (match) => ({ start: +match[1] }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1] - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = (0, import_core10.wrappingInputRule)({ - find: orderedListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: (match) => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName2) }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1], - editor: this.editor - }); - } - return [inputRule]; - } -}); - -// src/task-item/task-item.ts -var import_core11 = require("@tiptap/core"); -var inputRegex = /^\s*(\[([( |x])?\])\s$/; -var TaskItem = import_core11.Node.create({ - name: "taskItem", - addOptions() { - return { - nested: false, - HTMLAttributes: {}, - taskListTypeName: "taskList", - a11y: void 0 - }; - }, - content() { - return this.options.nested ? "paragraph block*" : "paragraph+"; - }, - defining: true, - addAttributes() { - return { - checked: { - default: false, - keepOnSplit: false, - parseHTML: (element) => { - const dataChecked = element.getAttribute("data-checked"); - return dataChecked === "" || dataChecked === "true"; - }, - renderHTML: (attributes) => ({ - "data-checked": attributes.checked - }) - } - }; - }, - parseHTML() { - return [ - { - tag: `li[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ node, HTMLAttributes }) { - return [ - "li", - (0, import_core11.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes, { - "data-type": this.name - }), - [ - "label", - [ - "input", - { - type: "checkbox", - checked: node.attrs.checked ? "checked" : null - } - ], - ["span"] - ], - ["div", 0] - ]; - }, - parseMarkdown: (token, h) => { - const content = []; - if (token.tokens && token.tokens.length > 0) { - content.push(h.createNode("paragraph", {}, h.parseInline(token.tokens))); - } else if (token.text) { - content.push(h.createNode("paragraph", {}, [h.createNode("text", { text: token.text })])); - } else { - content.push(h.createNode("paragraph", {}, [])); - } - if (token.nestedTokens && token.nestedTokens.length > 0) { - const nestedContent = h.parseChildren(token.nestedTokens); - content.push(...nestedContent); - } - return h.createNode("taskItem", { checked: token.checked || false }, content); - }, - renderMarkdown: (node, h) => { - var _a; - const checkedChar = ((_a = node.attrs) == null ? void 0 : _a.checked) ? "x" : " "; - const prefix = `- [${checkedChar}] `; - return (0, import_core11.renderNestedMarkdownContent)(node, h, prefix); - }, - addExtensions() { - if (!this.options.nested) { - return []; - } - return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]; - }, - addKeyboardShortcuts() { - const shortcuts = { - Enter: () => this.editor.commands.splitListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - if (!this.options.nested) { - return shortcuts; - } - return { - ...shortcuts, - Tab: () => this.editor.commands.sinkListItem(this.name) - }; - }, - addNodeView() { - return ({ node, HTMLAttributes, getPos, editor }) => { - const listItem = document.createElement("li"); - const checkboxWrapper = document.createElement("label"); - const checkboxStyler = document.createElement("span"); - const checkbox = document.createElement("input"); - const content = document.createElement("div"); - const updateA11Y = (currentNode) => { - var _a, _b; - checkbox.ariaLabel = ((_b = (_a = this.options.a11y) == null ? void 0 : _a.checkboxLabel) == null ? void 0 : _b.call(_a, currentNode, checkbox.checked)) || `Task item checkbox for ${currentNode.textContent || "empty task item"}`; - }; - updateA11Y(node); - checkboxWrapper.contentEditable = "false"; - checkbox.type = "checkbox"; - checkbox.addEventListener("mousedown", (event) => event.preventDefault()); - checkbox.addEventListener("change", (event) => { - if (!editor.isEditable && !this.options.onReadOnlyChecked) { - checkbox.checked = !checkbox.checked; - return; - } - const { checked } = event.target; - if (editor.isEditable && typeof getPos === "function") { - editor.chain().focus(void 0, { scrollIntoView: false }).command(({ tr }) => { - const position = getPos(); - if (typeof position !== "number") { - return false; - } - const currentNode = tr.doc.nodeAt(position); - tr.setNodeMarkup(position, void 0, { - ...currentNode == null ? void 0 : currentNode.attrs, - checked - }); - return true; - }).run(); - } - if (!editor.isEditable && this.options.onReadOnlyChecked) { - if (!this.options.onReadOnlyChecked(node, checked)) { - checkbox.checked = !checkbox.checked; - } - } - }); - Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - listItem.dataset.checked = node.attrs.checked; - checkbox.checked = node.attrs.checked; - checkboxWrapper.append(checkbox, checkboxStyler); - listItem.append(checkboxWrapper, content); - Object.entries(HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes)); - return { - dom: listItem, - contentDOM: content, - update: (updatedNode) => { - if (updatedNode.type !== this.type) { - return false; - } - listItem.dataset.checked = updatedNode.attrs.checked; - checkbox.checked = updatedNode.attrs.checked; - updateA11Y(updatedNode); - const extensionAttributes = editor.extensionManager.attributes; - const newHTMLAttributes = (0, import_core11.getRenderedAttributes)(updatedNode, extensionAttributes); - const newKeys = new Set(Object.keys(newHTMLAttributes)); - const staticAttrs = this.options.HTMLAttributes; - prevRenderedAttributeKeys.forEach((key) => { - if (!newKeys.has(key)) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } - }); - Object.entries(newHTMLAttributes).forEach(([key, value]) => { - if (value === null || value === void 0) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } else { - listItem.setAttribute(key, value); - } - }); - prevRenderedAttributeKeys = newKeys; - return true; - } - }; - }; - }, - addInputRules() { - return [ - (0, import_core11.wrappingInputRule)({ - find: inputRegex, - type: this.type, - getAttributes: (match) => ({ - checked: match[match.length - 1] === "x" - }) - }) - ]; - } -}); - -// src/task-list/task-list.ts -var import_core12 = require("@tiptap/core"); -var TaskList = import_core12.Node.create({ - name: "taskList", - addOptions() { - return { - itemTypeName: "taskItem", - HTMLAttributes: {} - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [ - { - tag: `ul[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return [ - "ul", - (0, import_core12.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes, { "data-type": this.name }), - 0 - ]; - }, - parseMarkdown: (token, h) => { - return h.createNode("taskList", {}, h.parseChildren(token.items || [])); - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "taskList", - level: "block", - start(src) { - var _a; - const index = (_a = src.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)) == null ? void 0 : _a.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, tokens, lexer) { - const parseTaskListContent = (content) => { - const nestedResult = (0, import_core12.parseIndentedBlocks)( - content, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Allow recursive nesting - customNestedParser: parseTaskListContent - }, - lexer - ); - if (nestedResult) { - return [ - { - type: "taskList", - raw: nestedResult.raw, - items: nestedResult.items - } - ]; - } - return lexer.blockTokens(content); - }; - const result = (0, import_core12.parseIndentedBlocks)( - src, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Use the recursive parser for nested content - customNestedParser: parseTaskListContent - }, - lexer - ); - if (!result) { - return void 0; - } - return { - type: "taskList", - raw: result.raw, - items: result.items - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleTaskList: () => ({ commands }) => { - return commands.toggleList(this.name, this.options.itemTypeName); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-9": () => this.editor.commands.toggleTaskList() - }; - } -}); - -// src/kit/index.ts -var ListKit = import_core13.Extension.create({ - name: "listKit", - addExtensions() { - const extensions = []; - if (this.options.bulletList !== false) { - extensions.push(BulletList.configure(this.options.bulletList)); - } - if (this.options.listItem !== false) { - extensions.push(ListItem.configure(this.options.listItem)); - } - if (this.options.listKeymap !== false) { - extensions.push(ListKeymap.configure(this.options.listKeymap)); - } - if (this.options.orderedList !== false) { - extensions.push(OrderedList.configure(this.options.orderedList)); - } - if (this.options.taskItem !== false) { - extensions.push(TaskItem.configure(this.options.taskItem)); - } - if (this.options.taskList !== false) { - extensions.push(TaskList.configure(this.options.taskList)); - } - return extensions; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - BulletList, - ListItem, - ListKeymap, - ListKit, - OrderedList, - TaskItem, - TaskList, - bulletListInputRegex, - inputRegex, - listHelpers, - orderedListInputRegex -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.cjs.map deleted file mode 100644 index ee71651..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/bullet-list/bullet-list.ts","../src/item/list-item.ts","../src/helpers/createBranchingListDeleteKeymap.ts","../src/helpers/hoistBranchingNestedList.ts","../src/helpers/getBranchingNestedListAtCursor.ts","../src/helpers/handleDeleteBranchingNestedList.ts","../src/keymap/list-keymap.ts","../src/keymap/listHelpers/index.ts","../src/keymap/listHelpers/findListItemPos.ts","../src/keymap/listHelpers/getNextListDepth.ts","../src/keymap/listHelpers/handleBackspace.ts","../src/keymap/listHelpers/hasListBefore.ts","../src/keymap/listHelpers/handleDelete.ts","../src/keymap/listHelpers/nextListIsDeeper.ts","../src/keymap/listHelpers/nextListIsHigher.ts","../src/keymap/listHelpers/hasListItemAfter.ts","../src/keymap/listHelpers/hasListItemBefore.ts","../src/keymap/listHelpers/listItemHasSubList.ts","../src/kit/index.ts","../src/ordered-list/ordered-list.ts","../src/ordered-list/utils.ts","../src/task-item/task-item.ts","../src/task-list/task-list.ts"],"sourcesContent":["export * from './bullet-list/index.js'\nexport * from './item/index.js'\nexport * from './keymap/index.js'\nexport * from './kit/index.js'\nexport * from './ordered-list/index.js'\nexport * from './task-item/index.js'\nexport * from './task-list/index.js'\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface BulletListOptions {\n /**\n * The node name for the list items\n * @default 'listItem'\n * @example 'paragraph'\n */\n itemTypeName: string\n\n /**\n * HTML attributes to add to the bullet list element\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting the list\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting the list\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bulletList: {\n /**\n * Toggle a bullet list\n */\n toggleBulletList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches a bullet list to a dash or asterisk.\n */\nexport const bulletListInputRegex = /^\\s*([-+*])\\s$/\n\n/**\n * This extension allows you to create bullet lists.\n * This requires the ListItem extension\n * @see https://tiptap.dev/api/nodes/bullet-list\n * @see https://tiptap.dev/api/nodes/list-item.\n */\nexport const BulletList = Node.create({\n name: 'bulletList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [{ tag: 'ul' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || (token as any).ordered) {\n return []\n }\n\n return {\n type: 'bulletList',\n content: token.items ? helpers.parseChildren(token.items) : [],\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleBulletList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: () => {\n return this.editor.getAttributes(TextStyleName)\n },\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n","import type { JSONContent, MarkdownParseHelpers, MarkdownToken } from '@tiptap/core'\nimport { mergeAttributes, Node, renderNestedMarkdownContent } from '@tiptap/core'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface ListItemOptions {\n /**\n * The HTML attributes for a list item node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for bulletList nodes\n * @default 'bulletList'\n * @example 'myCustomBulletList'\n */\n bulletListTypeName: string\n\n /**\n * The node type for orderedList nodes\n * @default 'orderedList'\n * @example 'myCustomOrderedList'\n */\n orderedListTypeName: string\n}\n\nfunction isSameLineOrderedListToken(token: MarkdownToken): boolean {\n const nestedToken = token.tokens?.[0]\n\n return Boolean(\n token.text &&\n token.tokens?.length === 1 &&\n nestedToken?.type === 'list' &&\n nestedToken.ordered &&\n nestedToken.raw === token.text,\n )\n}\n\nfunction parseSameLineOrderedListText(text: string, helpers: MarkdownParseHelpers): JSONContent[] {\n if (helpers.tokenizeInline) {\n return helpers.parseInline(helpers.tokenizeInline(text))\n }\n\n return helpers.parseInline([\n {\n type: 'text',\n raw: text,\n text,\n },\n ])\n}\n\n/**\n * This extension allows you to create list items.\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const ListItem = Node.create({\n name: 'listItem',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n bulletListTypeName: 'bulletList',\n orderedListTypeName: 'orderedList',\n }\n },\n\n content: 'paragraph block*',\n\n defining: true,\n\n parseHTML() {\n return [\n {\n tag: 'li',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list_item',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list_item') {\n return []\n }\n\n const parseBlockChildren = helpers.parseBlockChildren ?? helpers.parseChildren\n let content: any[] = []\n\n if (token.tokens && token.tokens.length > 0) {\n if (isSameLineOrderedListToken(token)) {\n return {\n type: 'listItem',\n content: [\n {\n type: 'paragraph',\n content: parseSameLineOrderedListText(token.text || '', helpers),\n },\n ],\n }\n }\n\n // Check if we have paragraph tokens (complex list items)\n const hasParagraphTokens = token.tokens.some(t => t.type === 'paragraph')\n\n if (hasParagraphTokens) {\n // If we have paragraph tokens, parse them as block elements\n content = parseBlockChildren(token.tokens)\n } else {\n // Check if the first token is a text token with nested inline tokens\n const firstToken = token.tokens[0]\n\n if (\n firstToken &&\n firstToken.type === 'text' &&\n firstToken.tokens &&\n firstToken.tokens.length > 0\n ) {\n // Parse the inline content from the text token\n const inlineContent = helpers.parseInline(firstToken.tokens)\n\n // Start with the paragraph containing the inline content\n content = [\n {\n type: 'paragraph',\n content: inlineContent,\n },\n ]\n\n // If there are additional tokens after the first text token (like nested lists),\n // parse them as block elements and add them\n if (token.tokens.length > 1) {\n const remainingTokens = token.tokens.slice(1)\n const additionalContent = parseBlockChildren(remainingTokens)\n content.push(...additionalContent)\n }\n } else {\n // Fallback: parse all tokens as block elements\n content = parseBlockChildren(token.tokens)\n }\n }\n }\n\n // Ensure we always have at least an empty paragraph\n if (content.length === 0) {\n content = [\n {\n type: 'paragraph',\n content: [],\n },\n ]\n }\n\n return {\n type: 'listItem',\n content,\n }\n },\n\n renderMarkdown: (node, h, ctx) => {\n return renderNestedMarkdownContent(\n node,\n h,\n (context: any) => {\n if (context.parentType === 'bulletList') {\n return '- '\n }\n if (context.parentType === 'orderedList') {\n const start = context.meta?.parentAttrs?.start || 1\n return `${start + context.index}. `\n }\n // Fallback to bullet list for unknown parent types\n return '- '\n },\n ctx,\n )\n },\n\n addExtensions() {\n return [\n createBranchingListDeleteKeymap(this.name, [\n this.options.bulletListTypeName,\n this.options.orderedListTypeName,\n ]),\n ]\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => this.editor.commands.splitListItem(this.name),\n Tab: () => this.editor.commands.sinkListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n },\n})\n","import { Extension } from '@tiptap/core'\n\nimport { handleDeleteBranchingNestedList } from './handleDeleteBranchingNestedList.js'\n\n/**\n * Creates a high-priority keymap extension that handles Delete for branching nested lists.\n * Kept separate from the list item node so Enter/Tab shortcuts keep their default priority.\n */\nexport const createBranchingListDeleteKeymap = (itemName: string, wrapperNames: string[]) => {\n return Extension.create({\n name: `${itemName}BranchingDeleteKeymap`,\n priority: 101,\n\n addKeyboardShortcuts() {\n const handleDelete = () =>\n handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames)\n\n return {\n Delete: handleDelete,\n 'Mod-Delete': handleDelete,\n }\n },\n })\n}\n","import { Fragment } from '@tiptap/pm/model'\nimport type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { getBranchingNestedListAtCursor } from './getBranchingNestedListAtCursor.js'\n\n/**\n * Hoists all list items from a branching nested list after the cursor into the parent list.\n *\n * Use this when `joinForward` cannot restructure a nested list that contains list items\n * with sublists (see issue #6906).\n *\n * @param state - The editor state to transform.\n * @param dispatch - Optional dispatch function for the transaction.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * // Cursor at the end of \"Item 1\" before a nested list with branching items.\n * hoistBranchingNestedList(editor.state, editor.view.dispatch, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n * ```\n */\nexport const hoistBranchingNestedList = (\n state: EditorState,\n dispatch: ((tr: Transaction) => void) | undefined,\n itemName: string,\n wrapperNames: string[],\n) => {\n const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames)\n\n if (!context) {\n return false\n }\n\n const { selection } = state\n const { nestedList, nestedListPos, insertPos, items } = context\n const tr = state.tr\n\n tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize)\n\n const mappedInsertPos = tr.mapping.map(insertPos)\n\n tr.insert(mappedInsertPos, Fragment.from(items))\n\n tr.setSelection(selection.map(tr.doc, tr.mapping))\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport type BranchingNestedListAtCursor = {\n listItemDepth: number\n nestedList: Node\n nestedListPos: number\n insertPos: number\n items: Node[]\n}\n\n/**\n * Resolves a branching nested list immediately after the cursor when the selection is\n * collapsed at the end of a textblock inside a list item.\n *\n * @param state - The editor state to inspect.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns Resolved positions and nodes for hoisting, or `null` when not applicable.\n *\n * @example\n * ```ts\n * const context = getBranchingNestedListAtCursor(editor.state, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n *\n * if (context) {\n * // cursor is at the end of Item 1 before a branching nested sublist\n * }\n * ```\n */\nexport const getBranchingNestedListAtCursor = (\n state: EditorState,\n itemName: string,\n wrapperNames: string[],\n): BranchingNestedListAtCursor | null => {\n const { selection } = state\n\n if (!selection.empty) {\n return null\n }\n\n const { $from } = selection\n\n if (!$from.parent.isTextblock) {\n return null\n }\n\n if ($from.parentOffset !== $from.parent.content.size) {\n return null\n }\n\n let listItemDepth = -1\n\n for (let depth = $from.depth; depth > 0; depth -= 1) {\n if ($from.node(depth).type.name === itemName) {\n listItemDepth = depth\n break\n }\n }\n\n if (listItemDepth < 0) {\n return null\n }\n\n const listItem = $from.node(listItemDepth)\n const indexInListItem = $from.index(listItemDepth)\n\n if (indexInListItem + 1 >= listItem.childCount) {\n return null\n }\n\n const nextChild = listItem.child(indexInListItem + 1)\n\n if (!wrapperNames.includes(nextChild.type.name)) {\n return null\n }\n\n const itemType = state.schema.nodes[itemName]\n let hasBranching = false\n\n nextChild.forEach(child => {\n if (child.type === itemType && child.childCount > 1) {\n hasBranching = true\n }\n })\n\n if (!hasBranching) {\n return null\n }\n\n const nodeAfter = state.doc.resolve($from.after()).nodeAfter\n\n if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) {\n return null\n }\n\n const items: Node[] = []\n\n nodeAfter.forEach(child => {\n items.push(child)\n })\n\n if (items.length === 0) {\n return null\n }\n\n return {\n listItemDepth,\n nestedList: nodeAfter,\n nestedListPos: $from.after(),\n insertPos: $from.after(listItemDepth),\n items,\n }\n}\n","import type { Editor } from '@tiptap/core'\n\nimport { hoistBranchingNestedList } from './hoistBranchingNestedList.js'\n\n/**\n * Handles Delete for a list item when a branching nested sublist follows the cursor.\n *\n * @param editor - The editor instance whose state should be updated.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * Delete: () =>\n * handleDeleteBranchingNestedList(editor, 'listItem', ['bulletList', 'orderedList']),\n * ```\n */\nexport const handleDeleteBranchingNestedList = (\n editor: Editor,\n itemName: string,\n wrapperNames: string[],\n) => {\n return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames)\n}\n","import { Extension } from '@tiptap/core'\n\nimport { handleBackspace, handleDelete } from './listHelpers/index.js'\n\nexport type ListKeymapOptions = {\n /**\n * An array of list types. This is used for item and wrapper list matching.\n * @default []\n * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }]\n */\n listTypes: Array<{\n itemName: string\n wrapperNames: string[]\n }>\n}\n\n/**\n * This extension registers custom keymaps to change the behaviour of the backspace and delete keys.\n * By default Prosemirror keyhandling will always lift or sink items so paragraphs are joined into\n * the adjacent or previous list item. This extension will prevent this behaviour and instead will\n * try to join paragraphs from two list items into a single list item.\n * @see https://www.tiptap.dev/api/extensions/list-keymap\n */\nexport const ListKeymap = Extension.create({\n name: 'listKeymap',\n\n addOptions() {\n return {\n listTypes: [\n {\n itemName: 'listItem',\n wrapperNames: ['bulletList', 'orderedList'],\n },\n {\n itemName: 'taskItem',\n wrapperNames: ['taskList'],\n },\n ],\n }\n },\n\n addKeyboardShortcuts() {\n return {\n Delete: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Delete': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n Backspace: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Backspace': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n }\n },\n})\n","export * from './findListItemPos.js'\nexport * from './getNextListDepth.js'\nexport * from './handleBackspace.js'\nexport * from './handleDelete.js'\nexport * from './hasListBefore.js'\nexport * from './hasListItemAfter.js'\nexport * from './hasListItemBefore.js'\nexport * from './listItemHasSubList.js'\nexport * from './nextListIsDeeper.js'\nexport * from './nextListIsHigher.js'\n","import { getNodeType } from '@tiptap/core'\nimport type { NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const findListItemPos = (typeOrName: string | NodeType, state: EditorState) => {\n const { $from } = state.selection\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let currentNode = null\n let currentDepth = $from.depth\n let currentPos = $from.pos\n let targetDepth: number | null = null\n\n while (currentDepth > 0 && targetDepth === null) {\n currentNode = $from.node(currentDepth)\n\n if (currentNode.type === nodeType) {\n targetDepth = currentDepth\n } else {\n currentDepth -= 1\n currentPos -= 1\n }\n }\n\n if (targetDepth === null) {\n return null\n }\n\n return { $pos: state.doc.resolve(currentPos), depth: targetDepth }\n}\n","import { getNodeAtPosition } from '@tiptap/core'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\n\nexport const getNextListDepth = (typeOrName: string, state: EditorState) => {\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos) {\n return false\n }\n\n const [, depth] = getNodeAtPosition(state, typeOrName, listItemPos.$pos.pos + 4)\n\n return depth\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtStartOfNode, isNodeActive } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\n\nimport { hasListBefore } from './hasListBefore.js'\n\nexport const handleBackspace = (editor: Editor, name: string, parentListTypes: string[]) => {\n // this is required to still handle the undo handling\n if (editor.commands.undoInputRule()) {\n return true\n }\n\n // if the selection is not collapsed\n // we can rely on the default backspace behavior\n if (editor.state.selection.from !== editor.state.selection.to) {\n return false\n }\n\n // if the current item is NOT inside a list item &\n // the previous item is a list (orderedList or bulletList)\n // move the cursor into the list and delete the current item\n if (!isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) {\n const { $anchor } = editor.state.selection\n\n const $listPos = editor.state.doc.resolve($anchor.before() - 1)\n\n const listDescendants: Array<{ node: Node; pos: number }> = []\n\n $listPos.node().descendants((node, pos) => {\n if (node.type.name === name) {\n listDescendants.push({ node, pos })\n }\n })\n\n const lastItem = listDescendants.at(-1)\n\n if (!lastItem) {\n return false\n }\n\n const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1)\n\n return editor\n .chain()\n .cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end())\n .joinForward()\n .run()\n }\n\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the start of a node\n // do nothing and proceed\n if (!isAtStartOfNode(editor.state)) {\n return false\n }\n\n // At the start of a list item, lift it out. Top-level items split the\n // wrapping list around them; nested items get promoted into the outer\n // list. A second backspace then falls through to the merge branch above.\n return editor.chain().liftListItem(name).run()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListBefore = (\n editorState: EditorState,\n name: string,\n parentListTypes: string[],\n) => {\n const { $anchor } = editorState.selection\n\n const previousNodePos = Math.max(0, $anchor.pos - 2)\n\n const previousNode = editorState.doc.resolve(previousNodePos).node()\n\n if (!previousNode || !parentListTypes.includes(previousNode.type.name)) {\n return false\n }\n\n return true\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtEndOfNode, isNodeActive } from '@tiptap/core'\n\nimport { nextListIsDeeper } from './nextListIsDeeper.js'\nimport { nextListIsHigher } from './nextListIsHigher.js'\n\nexport const handleDelete = (editor: Editor, name: string) => {\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the end of a node\n // do nothing and proceed\n if (!isAtEndOfNode(editor.state, name)) {\n return false\n }\n\n // if the selection is not collapsed, or not within a single node\n // do nothing and proceed\n const { selection } = editor.state\n const { $from, $to } = selection\n\n if (!selection.empty && $from.sameParent($to)) {\n return false\n }\n\n // check if the next node is a list with a deeper depth\n if (nextListIsDeeper(name, editor.state)) {\n return editor\n .chain()\n .focus(editor.state.selection.from + 4)\n .lift(name)\n .joinBackward()\n .run()\n }\n\n if (nextListIsHigher(name, editor.state)) {\n return editor.chain().joinForward().joinBackward().run()\n }\n\n return editor.commands.joinItemForward()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsDeeper = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth > listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsHigher = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth < listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemAfter = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2)\n\n if ($targetPos.index() === $targetPos.parent.childCount - 1) {\n return false\n }\n\n if ($targetPos.nodeAfter?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemBefore = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - 2)\n\n if ($targetPos.index() === 0) {\n return false\n }\n\n if ($targetPos.nodeBefore?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import { getNodeType } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const listItemHasSubList = (typeOrName: string, state: EditorState, node?: Node) => {\n if (!node) {\n return false\n }\n\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let hasSubList = false\n\n node.descendants(child => {\n if (child.type === nodeType) {\n hasSubList = true\n }\n })\n\n return hasSubList\n}\n","import { Extension } from '@tiptap/core'\n\nimport type { BulletListOptions } from '../bullet-list/index.js'\nimport { BulletList } from '../bullet-list/index.js'\nimport type { ListItemOptions } from '../item/index.js'\nimport { ListItem } from '../item/index.js'\nimport type { ListKeymapOptions } from '../keymap/index.js'\nimport { ListKeymap } from '../keymap/index.js'\nimport type { OrderedListOptions } from '../ordered-list/index.js'\nimport { OrderedList } from '../ordered-list/index.js'\nimport type { TaskItemOptions } from '../task-item/index.js'\nimport { TaskItem } from '../task-item/index.js'\nimport type { TaskListOptions } from '../task-list/index.js'\nimport { TaskList } from '../task-list/index.js'\n\nexport interface ListKitOptions {\n /**\n * If set to false, the bulletList extension will not be registered\n * @example table: false\n */\n bulletList: Partial | false\n /**\n * If set to false, the listItem extension will not be registered\n */\n listItem: Partial | false\n /**\n * If set to false, the listKeymap extension will not be registered\n */\n listKeymap: Partial | false\n /**\n * If set to false, the orderedList extension will not be registered\n */\n orderedList: Partial | false\n /**\n * If set to false, the taskItem extension will not be registered\n */\n taskItem: Partial | false\n /**\n * If set to false, the taskList extension will not be registered\n */\n taskList: Partial | false\n}\n\n/**\n * The table kit is a collection of table editor extensions.\n *\n * It’s a good starting point for building your own table in Tiptap.\n */\nexport const ListKit = Extension.create({\n name: 'listKit',\n\n addExtensions() {\n const extensions = []\n\n if (this.options.bulletList !== false) {\n extensions.push(BulletList.configure(this.options.bulletList))\n }\n\n if (this.options.listItem !== false) {\n extensions.push(ListItem.configure(this.options.listItem))\n }\n\n if (this.options.listKeymap !== false) {\n extensions.push(ListKeymap.configure(this.options.listKeymap))\n }\n\n if (this.options.orderedList !== false) {\n extensions.push(OrderedList.configure(this.options.orderedList))\n }\n\n if (this.options.taskItem !== false) {\n extensions.push(TaskItem.configure(this.options.taskItem))\n }\n\n if (this.options.taskList !== false) {\n extensions.push(TaskList.configure(this.options.taskList))\n }\n\n return extensions\n },\n})\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nimport { buildNestedStructure, collectOrderedListItems, parseListItems } from './utils.js'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface OrderedListOptions {\n /**\n * The node type name for list items.\n * @default 'listItem'\n * @example 'myListItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for an ordered list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting a list item.\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting a list item.\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n orderedList: {\n /**\n * Toggle an ordered list\n * @example editor.commands.toggleOrderedList()\n */\n toggleOrderedList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches an ordered list to a 1. on input (or any number followed by a dot).\n */\nexport const orderedListInputRegex = /^(\\d+)\\.\\s$/\n\n/**\n * This extension allows you to create ordered lists.\n * This requires the ListItem extension\n * @see https://www.tiptap.dev/api/nodes/ordered-list\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const OrderedList = Node.create({\n name: 'orderedList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n addAttributes() {\n return {\n start: {\n default: 1,\n parseHTML: element => {\n return element.hasAttribute('start')\n ? parseInt(element.getAttribute('start') || '', 10)\n : 1\n },\n },\n type: {\n default: null,\n parseHTML: element => element.getAttribute('type'),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'ol',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n const { start, ...attributesWithoutStart } = HTMLAttributes\n\n return start === 1\n ? ['ol', mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0]\n : ['ol', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || !token.ordered) {\n return []\n }\n\n const startValue = token.start || 1\n const content = token.items ? parseListItems(token.items, helpers) : []\n\n if (startValue !== 1) {\n return {\n type: 'orderedList',\n attrs: { start: startValue },\n content,\n }\n }\n\n return {\n type: 'orderedList',\n content,\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'orderedList',\n level: 'block',\n start: (src: string) => {\n const match = src.match(/^(\\s*)(\\d+)\\.\\s+/)\n const index = match?.index\n return index !== undefined ? index : -1\n },\n tokenize: (src: string, _tokens, lexer) => {\n const lines = src.split('\\n')\n const [listItems, consumed] = collectOrderedListItems(lines)\n\n if (listItems.length === 0) {\n return undefined\n }\n\n const items = buildNestedStructure(listItems, 0, lexer)\n\n if (items.length === 0) {\n return undefined\n }\n\n const startValue = listItems[0]?.number || 1\n\n return {\n type: 'list',\n ordered: true,\n start: startValue,\n items,\n raw: lines.slice(0, consumed).join('\\n'),\n } as unknown as object\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleOrderedList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-7': () => this.editor.commands.toggleOrderedList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n getAttributes: match => ({ start: +match[1] }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n","import type {\n JSONContent,\n MarkdownLexerConfiguration,\n MarkdownParseHelpers,\n MarkdownToken,\n} from '@tiptap/core'\n\n/**\n * Matches an ordered list item line with optional leading whitespace.\n * Captures: (1) indentation spaces, (2) item number, (3) content after marker\n * Example matches: \"1. Item\", \" 2. Nested item\", \" 3. Deeply nested\"\n */\nconst ORDERED_LIST_ITEM_REGEX = /^(\\s*)(\\d+)\\.\\s+(.*)$/\n\n/**\n * Matches any line that starts with whitespace (indented content).\n * Used to identify continuation content that belongs to a list item.\n */\nconst INDENTED_LINE_REGEX = /^\\s/\n\n/**\n * Represents a parsed ordered list item with indentation information\n */\nexport interface OrderedListItem {\n indent: number\n number: number\n content: string\n contentLines: string[]\n raw: string\n}\n\nfunction isBlockContentLine(line: string): boolean {\n const trimmedLine = line.trimStart()\n\n return (\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^[-+*]\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^\\d+\\.\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^>\\s?/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^```/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^~~~/.test(trimmedLine)\n )\n}\n\nfunction splitItemContent(contentLines: string[]): {\n paragraphLines: string[]\n blockLines: string[]\n} {\n const paragraphLines: string[] = []\n const blockLines: string[] = []\n let reachedBlockBoundary = false\n\n contentLines.forEach(line => {\n if (reachedBlockBoundary) {\n blockLines.push(line)\n return\n }\n\n if (line.trim() === '') {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n if (paragraphLines.length > 0 && isBlockContentLine(line)) {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n paragraphLines.push(line)\n })\n\n return {\n paragraphLines,\n blockLines,\n }\n}\n\n/**\n * Collects all ordered list items from lines, parsing them into a flat array\n * with indentation information. Stops collecting continuation content when\n * encountering nested list items, allowing them to be processed separately.\n *\n * @param lines - Array of source lines to parse\n * @returns Tuple of [listItems array, number of lines consumed]\n */\nexport function collectOrderedListItems(lines: string[]): [OrderedListItem[], number] {\n const listItems: OrderedListItem[] = []\n let currentLineIndex = 0\n let consumed = 0\n\n while (currentLineIndex < lines.length) {\n const line = lines[currentLineIndex]\n const match = line.match(ORDERED_LIST_ITEM_REGEX)\n\n if (!match) {\n break\n }\n\n const [, indent, number, content] = match\n const indentLevel = indent.length\n const itemContentLines = [content]\n let nextLineIndex = currentLineIndex + 1\n const itemLines = [line]\n let sawBlankLine = false\n\n // Collect continuation lines for this item (but NOT nested list items)\n while (nextLineIndex < lines.length) {\n const nextLine = lines[nextLineIndex]\n const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX)\n\n // If it's another list item (nested or not), stop collecting\n if (nextMatch) {\n break\n }\n\n // Check for continuation content (non-list content)\n if (nextLine.trim() === '') {\n // Empty line\n itemLines.push(nextLine)\n itemContentLines.push('')\n sawBlankLine = true\n nextLineIndex += 1\n } else if (nextLine.match(INDENTED_LINE_REGEX)) {\n // Indented content - part of this item (but not a list item)\n itemLines.push(nextLine)\n itemContentLines.push(nextLine.slice(indentLevel + 2))\n nextLineIndex += 1\n } else {\n if (sawBlankLine) {\n break\n }\n\n itemLines.push(nextLine)\n itemContentLines.push(nextLine)\n nextLineIndex += 1\n }\n }\n\n listItems.push({\n indent: indentLevel,\n number: parseInt(number, 10),\n content: itemContentLines.join('\\n').trim(),\n contentLines: itemContentLines,\n raw: itemLines.join('\\n'),\n })\n\n consumed = nextLineIndex\n currentLineIndex = nextLineIndex\n }\n\n return [listItems, consumed]\n}\n\n/**\n * Recursively builds a nested structure from a flat array of list items\n * based on their indentation levels. Creates proper markdown tokens with\n * nested lists where appropriate.\n *\n * @param items - Flat array of list items with indentation info\n * @param baseIndent - The indentation level to process at this recursion level\n * @param lexer - Markdown lexer for parsing inline and block content\n * @returns Array of list_item tokens with proper nesting\n */\nexport function buildNestedStructure(\n items: OrderedListItem[],\n baseIndent: number,\n lexer: MarkdownLexerConfiguration,\n): unknown[] {\n const result: unknown[] = []\n let currentIndex = 0\n\n while (currentIndex < items.length) {\n const item = items[currentIndex]\n\n if (item.indent === baseIndent) {\n // This item belongs at the current level\n const { paragraphLines, blockLines } = splitItemContent(item.contentLines)\n const mainText = paragraphLines.join('\\n').trim()\n\n const tokens = []\n\n // Always wrap the main text in a paragraph token\n if (mainText) {\n tokens.push({\n type: 'paragraph',\n raw: mainText,\n tokens: lexer.inlineTokens(mainText),\n })\n }\n\n const additionalContent = blockLines.join('\\n').trim()\n if (additionalContent) {\n const blockTokens = lexer.blockTokens(additionalContent)\n tokens.push(...blockTokens)\n }\n\n // Look ahead to find nested items at deeper indent levels\n let lookAheadIndex = currentIndex + 1\n const nestedItems = []\n\n while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) {\n nestedItems.push(items[lookAheadIndex])\n lookAheadIndex += 1\n }\n\n // If we have nested items, recursively build their structure\n if (nestedItems.length > 0) {\n // Find the next indent level (immediate children)\n const nextIndent = Math.min(...nestedItems.map(nestedItem => nestedItem.indent))\n\n // Build the nested list recursively with all nested items\n // The recursive call will handle further nesting\n const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer)\n\n // Create a nested list token\n tokens.push({\n type: 'list',\n ordered: true,\n start: nestedItems[0].number,\n items: nestedListItems,\n raw: nestedItems.map(nestedItem => nestedItem.raw).join('\\n'),\n })\n }\n\n result.push({\n type: 'list_item',\n raw: item.raw,\n tokens,\n })\n\n // Skip the nested items we just processed\n currentIndex = lookAheadIndex\n } else {\n // This item has deeper indent than we're currently processing\n // It should be handled by a recursive call\n currentIndex += 1\n }\n }\n\n return result\n}\n\n/**\n * Parses markdown list item tokens into Tiptap JSONContent structure,\n * ensuring text content is properly wrapped in paragraph nodes.\n *\n * @param items - Array of markdown tokens representing list items\n * @param helpers - Markdown parse helpers for recursive parsing\n * @returns Array of listItem JSONContent nodes\n */\nexport function parseListItems(\n items: MarkdownToken[],\n helpers: MarkdownParseHelpers,\n): JSONContent[] {\n return items.map(item => {\n if (item.type !== 'list_item') {\n return helpers.parseChildren([item])[0]\n }\n\n // Parse the tokens within the list item\n const content: JSONContent[] = []\n\n if (item.tokens && item.tokens.length > 0) {\n item.tokens.forEach(itemToken => {\n // If it's already a proper block node (paragraph, list, etc.), parse it directly\n if (\n itemToken.type === 'paragraph' ||\n itemToken.type === 'list' ||\n itemToken.type === 'blockquote' ||\n itemToken.type === 'code'\n ) {\n content.push(...helpers.parseChildren([itemToken]))\n } else if (itemToken.type === 'text' && itemToken.tokens) {\n // If it's inline text tokens, wrap them in a paragraph\n const inlineContent = helpers.parseChildren([itemToken])\n content.push({\n type: 'paragraph',\n content: inlineContent,\n })\n } else {\n // For any other content, try to parse it\n const parsed = helpers.parseChildren([itemToken])\n if (parsed.length > 0) {\n content.push(...parsed)\n }\n }\n })\n }\n\n return {\n type: 'listItem',\n content,\n }\n })\n}\n","import type { KeyboardShortcutCommand } from '@tiptap/core'\nimport {\n getRenderedAttributes,\n mergeAttributes,\n Node,\n renderNestedMarkdownContent,\n wrappingInputRule,\n} from '@tiptap/core'\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface TaskItemOptions {\n /**\n * A callback function that is called when the checkbox is clicked while the editor is in readonly mode.\n * @param node The prosemirror node of the task item\n * @param checked The new checked state\n * @returns boolean\n */\n onReadOnlyChecked?: (node: ProseMirrorNode, checked: boolean) => boolean\n\n /**\n * Controls whether the task items can be nested or not.\n * @default false\n * @example true\n */\n nested: boolean\n\n /**\n * HTML attributes to add to the task item element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for taskList nodes\n * @default 'taskList'\n * @example 'myCustomTaskList'\n */\n taskListTypeName: string\n\n /**\n * Accessibility options for the task item.\n * @default {}\n * @example\n * ```js\n * {\n * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}`\n * }\n */\n a11y?: {\n checkboxLabel?: (node: ProseMirrorNode, checked: boolean) => string\n }\n}\n\n/**\n * Matches a task item to a - [ ] on input.\n */\nexport const inputRegex = /^\\s*(\\[([( |x])?\\])\\s$/\n\n/**\n * This extension allows you to create task items.\n * @see https://www.tiptap.dev/api/nodes/task-item\n */\nexport const TaskItem = Node.create({\n name: 'taskItem',\n\n addOptions() {\n return {\n nested: false,\n HTMLAttributes: {},\n taskListTypeName: 'taskList',\n a11y: undefined,\n }\n },\n\n content() {\n return this.options.nested ? 'paragraph block*' : 'paragraph+'\n },\n\n defining: true,\n\n addAttributes() {\n return {\n checked: {\n default: false,\n keepOnSplit: false,\n parseHTML: element => {\n const dataChecked = element.getAttribute('data-checked')\n\n return dataChecked === '' || dataChecked === 'true'\n },\n renderHTML: attributes => ({\n 'data-checked': attributes.checked,\n }),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: `li[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ node, HTMLAttributes }) {\n return [\n 'li',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {\n 'data-type': this.name,\n }),\n [\n 'label',\n [\n 'input',\n {\n type: 'checkbox',\n checked: node.attrs.checked ? 'checked' : null,\n },\n ],\n ['span'],\n ],\n ['div', 0],\n ]\n },\n\n parseMarkdown: (token, h) => {\n // Parse the task item's text content into paragraph content\n const content = []\n\n // First, add the main paragraph content\n if (token.tokens && token.tokens.length > 0) {\n // If we have tokens, create a paragraph with the inline content\n content.push(h.createNode('paragraph', {}, h.parseInline(token.tokens)))\n } else if (token.text) {\n // If we have raw text, create a paragraph with text node\n content.push(h.createNode('paragraph', {}, [h.createNode('text', { text: token.text })]))\n } else {\n // Fallback: empty paragraph\n content.push(h.createNode('paragraph', {}, []))\n }\n\n // Then, add any nested content (like nested task lists)\n if (token.nestedTokens && token.nestedTokens.length > 0) {\n const nestedContent = h.parseChildren(token.nestedTokens)\n content.push(...nestedContent)\n }\n\n return h.createNode('taskItem', { checked: token.checked || false }, content)\n },\n\n renderMarkdown: (node, h) => {\n const checkedChar = node.attrs?.checked ? 'x' : ' '\n const prefix = `- [${checkedChar}] `\n\n return renderNestedMarkdownContent(node, h, prefix)\n },\n\n addExtensions() {\n if (!this.options.nested) {\n return []\n }\n\n return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]\n },\n\n addKeyboardShortcuts() {\n const shortcuts: {\n [key: string]: KeyboardShortcutCommand\n } = {\n Enter: () => this.editor.commands.splitListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n\n if (!this.options.nested) {\n return shortcuts\n }\n\n return {\n ...shortcuts,\n Tab: () => this.editor.commands.sinkListItem(this.name),\n }\n },\n\n addNodeView() {\n return ({ node, HTMLAttributes, getPos, editor }) => {\n const listItem = document.createElement('li')\n const checkboxWrapper = document.createElement('label')\n const checkboxStyler = document.createElement('span')\n const checkbox = document.createElement('input')\n const content = document.createElement('div')\n\n const updateA11Y = (currentNode: ProseMirrorNode) => {\n checkbox.ariaLabel =\n this.options.a11y?.checkboxLabel?.(currentNode, checkbox.checked) ||\n `Task item checkbox for ${currentNode.textContent || 'empty task item'}`\n }\n\n updateA11Y(node)\n\n checkboxWrapper.contentEditable = 'false'\n checkbox.type = 'checkbox'\n checkbox.addEventListener('mousedown', event => event.preventDefault())\n checkbox.addEventListener('change', event => {\n // if the editor isn’t editable and we don't have a handler for\n // readonly checks we have to undo the latest change\n if (!editor.isEditable && !this.options.onReadOnlyChecked) {\n checkbox.checked = !checkbox.checked\n\n return\n }\n\n const { checked } = event.target as any\n\n if (editor.isEditable && typeof getPos === 'function') {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .command(({ tr }) => {\n const position = getPos()\n\n if (typeof position !== 'number') {\n return false\n }\n const currentNode = tr.doc.nodeAt(position)\n\n tr.setNodeMarkup(position, undefined, {\n ...currentNode?.attrs,\n checked,\n })\n\n return true\n })\n .run()\n }\n if (!editor.isEditable && this.options.onReadOnlyChecked) {\n // Reset state if onReadOnlyChecked returns false\n if (!this.options.onReadOnlyChecked(node, checked)) {\n checkbox.checked = !checkbox.checked\n }\n }\n })\n\n Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n listItem.dataset.checked = node.attrs.checked\n checkbox.checked = node.attrs.checked\n\n checkboxWrapper.append(checkbox, checkboxStyler)\n listItem.append(checkboxWrapper, content)\n\n Object.entries(HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n // Track the keys of previously rendered HTML attributes for proper removal\n let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes))\n\n return {\n dom: listItem,\n contentDOM: content,\n update: updatedNode => {\n if (updatedNode.type !== this.type) {\n return false\n }\n\n listItem.dataset.checked = updatedNode.attrs.checked\n checkbox.checked = updatedNode.attrs.checked\n updateA11Y(updatedNode)\n\n // Sync all HTML attributes from the updated node\n const extensionAttributes = editor.extensionManager.attributes\n const newHTMLAttributes = getRenderedAttributes(updatedNode, extensionAttributes)\n const newKeys = new Set(Object.keys(newHTMLAttributes))\n\n // Remove attributes that were previously rendered but are no longer present\n // If the attribute exists in static options, restore it instead of removing\n const staticAttrs = this.options.HTMLAttributes\n\n prevRenderedAttributeKeys.forEach(key => {\n if (!newKeys.has(key)) {\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n }\n })\n\n // Update or add new attributes\n Object.entries(newHTMLAttributes).forEach(([key, value]) => {\n if (value === null || value === undefined) {\n // If the attribute exists in static options, restore it instead of removing\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n } else {\n listItem.setAttribute(key, value)\n }\n })\n\n // Update the tracked keys for next update\n prevRenderedAttributeKeys = newKeys\n\n return true\n },\n }\n }\n },\n\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n getAttributes: match => ({\n checked: match[match.length - 1] === 'x',\n }),\n }),\n ]\n },\n})\n","import { mergeAttributes, Node, parseIndentedBlocks } from '@tiptap/core'\n\nexport interface TaskListOptions {\n /**\n * The node type name for a task item.\n * @default 'taskItem'\n * @example 'myCustomTaskItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for a task list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n taskList: {\n /**\n * Toggle a task list\n * @example editor.commands.toggleTaskList()\n */\n toggleTaskList: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to create task lists.\n * @see https://www.tiptap.dev/api/nodes/task-list\n */\nexport const TaskList = Node.create({\n name: 'taskList',\n\n addOptions() {\n return {\n itemTypeName: 'taskItem',\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [\n {\n tag: `ul[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'ul',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }),\n 0,\n ]\n },\n\n parseMarkdown: (token, h) => {\n return h.createNode('taskList', {}, h.parseChildren(token.items || []))\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'taskList',\n level: 'block',\n start(src) {\n // Look for the start of a task list item\n const index = src.match(/^\\s*[-+*]\\s+\\[([ xX])\\]\\s+/)?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, tokens, lexer) {\n // Helper function to recursively parse task lists\n const parseTaskListContent = (content: string): any[] | undefined => {\n const nestedResult = parseIndentedBlocks(\n content,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Allow recursive nesting\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (nestedResult) {\n // Return as task list token\n return [\n {\n type: 'taskList',\n raw: nestedResult.raw,\n items: nestedResult.items,\n },\n ]\n }\n\n // Fall back to regular markdown parsing if not a task list\n return lexer.blockTokens(content)\n }\n\n const result = parseIndentedBlocks(\n src,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Use the recursive parser for nested content\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (!result) {\n return undefined\n }\n\n return {\n type: 'taskList',\n raw: result.raw,\n items: result.items,\n }\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleTaskList:\n () =>\n ({ commands }) => {\n return commands.toggleList(this.name, this.options.itemTypeName)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AA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AC3D;AAEA,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,WAAW,UAAU,KAAK,QAAQ,UAAU,CAAC;AAAA,IAC/D;AAEA,QAAI,KAAK,QAAQ,gBAAgB,OAAO;AACtC,iBAAW,KAAK,YAAY,UAAU,KAAK,QAAQ,WAAW,CAAC;AAAA,IACjE;AAEA,QAAI,KAAK,QAAQ,aAAa,OAAO;AACnC,iBAAW,KAAK,SAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC3D;AAEA,QAAI,KAAK,QAAQ,aAAa,OAAO;AACnC,iBAAW,KAAK,SAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC3D;AAEA,WAAO;AAAA,EACT;AACF,CAAC;","names":["import_core","import_core","handleDelete","import_core","import_core","import_core","import_core","import_core","import_core","import_core","import_core","ListItemName","TextStyleName","import_core","import_core"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.d.cts deleted file mode 100644 index 383501f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.d.cts +++ /dev/null @@ -1,300 +0,0 @@ -import { Node, Extension, Editor } from '@tiptap/core'; -import * as prosemirror_model from 'prosemirror-model'; -import { NodeType, Node as Node$1 } from '@tiptap/pm/model'; -import { EditorState } from '@tiptap/pm/state'; - -interface BulletListOptions { - /** - * The node name for the list items - * @default 'listItem' - * @example 'paragraph' - */ - itemTypeName: string; - /** - * HTML attributes to add to the bullet list element - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting the list - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting the list - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - bulletList: { - /** - * Toggle a bullet list - */ - toggleBulletList: () => ReturnType; - }; - } -} -/** - * Matches a bullet list to a dash or asterisk. - */ -declare const bulletListInputRegex: RegExp; -/** - * This extension allows you to create bullet lists. - * This requires the ListItem extension - * @see https://tiptap.dev/api/nodes/bullet-list - * @see https://tiptap.dev/api/nodes/list-item. - */ -declare const BulletList: Node; - -interface ListItemOptions { - /** - * The HTML attributes for a list item node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for bulletList nodes - * @default 'bulletList' - * @example 'myCustomBulletList' - */ - bulletListTypeName: string; - /** - * The node type for orderedList nodes - * @default 'orderedList' - * @example 'myCustomOrderedList' - */ - orderedListTypeName: string; -} -/** - * This extension allows you to create list items. - * @see https://www.tiptap.dev/api/nodes/list-item - */ -declare const ListItem: Node; - -type ListKeymapOptions = { - /** - * An array of list types. This is used for item and wrapper list matching. - * @default [] - * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }] - */ - listTypes: Array<{ - itemName: string; - wrapperNames: string[]; - }>; -}; -/** - * This extension registers custom keymaps to change the behaviour of the backspace and delete keys. - * By default Prosemirror keyhandling will always lift or sink items so paragraphs are joined into - * the adjacent or previous list item. This extension will prevent this behaviour and instead will - * try to join paragraphs from two list items into a single list item. - * @see https://www.tiptap.dev/api/extensions/list-keymap - */ -declare const ListKeymap: Extension; - -declare const findListItemPos: (typeOrName: string | NodeType, state: EditorState) => { - $pos: prosemirror_model.ResolvedPos; - depth: number; -} | null; - -declare const getNextListDepth: (typeOrName: string, state: EditorState) => number | false; - -declare const handleBackspace: (editor: Editor, name: string, parentListTypes: string[]) => boolean; - -declare const handleDelete: (editor: Editor, name: string) => boolean; - -declare const hasListBefore: (editorState: EditorState, name: string, parentListTypes: string[]) => boolean; - -declare const hasListItemAfter: (typeOrName: string, state: EditorState) => boolean; - -declare const hasListItemBefore: (typeOrName: string, state: EditorState) => boolean; - -declare const listItemHasSubList: (typeOrName: string, state: EditorState, node?: Node$1) => boolean; - -declare const nextListIsDeeper: (typeOrName: string, state: EditorState) => boolean; - -declare const nextListIsHigher: (typeOrName: string, state: EditorState) => boolean; - -declare const index_findListItemPos: typeof findListItemPos; -declare const index_getNextListDepth: typeof getNextListDepth; -declare const index_handleBackspace: typeof handleBackspace; -declare const index_handleDelete: typeof handleDelete; -declare const index_hasListBefore: typeof hasListBefore; -declare const index_hasListItemAfter: typeof hasListItemAfter; -declare const index_hasListItemBefore: typeof hasListItemBefore; -declare const index_listItemHasSubList: typeof listItemHasSubList; -declare const index_nextListIsDeeper: typeof nextListIsDeeper; -declare const index_nextListIsHigher: typeof nextListIsHigher; -declare namespace index { - export { index_findListItemPos as findListItemPos, index_getNextListDepth as getNextListDepth, index_handleBackspace as handleBackspace, index_handleDelete as handleDelete, index_hasListBefore as hasListBefore, index_hasListItemAfter as hasListItemAfter, index_hasListItemBefore as hasListItemBefore, index_listItemHasSubList as listItemHasSubList, index_nextListIsDeeper as nextListIsDeeper, index_nextListIsHigher as nextListIsHigher }; -} - -interface OrderedListOptions { - /** - * The node type name for list items. - * @default 'listItem' - * @example 'myListItem' - */ - itemTypeName: string; - /** - * The HTML attributes for an ordered list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting a list item. - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting a list item. - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - orderedList: { - /** - * Toggle an ordered list - * @example editor.commands.toggleOrderedList() - */ - toggleOrderedList: () => ReturnType; - }; - } -} -/** - * Matches an ordered list to a 1. on input (or any number followed by a dot). - */ -declare const orderedListInputRegex: RegExp; -/** - * This extension allows you to create ordered lists. - * This requires the ListItem extension - * @see https://www.tiptap.dev/api/nodes/ordered-list - * @see https://www.tiptap.dev/api/nodes/list-item - */ -declare const OrderedList: Node; - -interface TaskItemOptions { - /** - * A callback function that is called when the checkbox is clicked while the editor is in readonly mode. - * @param node The prosemirror node of the task item - * @param checked The new checked state - * @returns boolean - */ - onReadOnlyChecked?: (node: Node$1, checked: boolean) => boolean; - /** - * Controls whether the task items can be nested or not. - * @default false - * @example true - */ - nested: boolean; - /** - * HTML attributes to add to the task item element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for taskList nodes - * @default 'taskList' - * @example 'myCustomTaskList' - */ - taskListTypeName: string; - /** - * Accessibility options for the task item. - * @default {} - * @example - * ```js - * { - * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}` - * } - */ - a11y?: { - checkboxLabel?: (node: Node$1, checked: boolean) => string; - }; -} -/** - * Matches a task item to a - [ ] on input. - */ -declare const inputRegex: RegExp; -/** - * This extension allows you to create task items. - * @see https://www.tiptap.dev/api/nodes/task-item - */ -declare const TaskItem: Node; - -interface TaskListOptions { - /** - * The node type name for a task item. - * @default 'taskItem' - * @example 'myCustomTaskItem' - */ - itemTypeName: string; - /** - * The HTML attributes for a task list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - taskList: { - /** - * Toggle a task list - * @example editor.commands.toggleTaskList() - */ - toggleTaskList: () => ReturnType; - }; - } -} -/** - * This extension allows you to create task lists. - * @see https://www.tiptap.dev/api/nodes/task-list - */ -declare const TaskList: Node; - -interface ListKitOptions { - /** - * If set to false, the bulletList extension will not be registered - * @example table: false - */ - bulletList: Partial | false; - /** - * If set to false, the listItem extension will not be registered - */ - listItem: Partial | false; - /** - * If set to false, the listKeymap extension will not be registered - */ - listKeymap: Partial | false; - /** - * If set to false, the orderedList extension will not be registered - */ - orderedList: Partial | false; - /** - * If set to false, the taskItem extension will not be registered - */ - taskItem: Partial | false; - /** - * If set to false, the taskList extension will not be registered - */ - taskList: Partial | false; -} -/** - * The table kit is a collection of table editor extensions. - * - * It’s a good starting point for building your own table in Tiptap. - */ -declare const ListKit: Extension; - -export { BulletList, type BulletListOptions, ListItem, type ListItemOptions, ListKeymap, type ListKeymapOptions, ListKit, type ListKitOptions, OrderedList, type OrderedListOptions, TaskItem, type TaskItemOptions, TaskList, type TaskListOptions, bulletListInputRegex, inputRegex, index as listHelpers, orderedListInputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.d.ts deleted file mode 100644 index 383501f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.d.ts +++ /dev/null @@ -1,300 +0,0 @@ -import { Node, Extension, Editor } from '@tiptap/core'; -import * as prosemirror_model from 'prosemirror-model'; -import { NodeType, Node as Node$1 } from '@tiptap/pm/model'; -import { EditorState } from '@tiptap/pm/state'; - -interface BulletListOptions { - /** - * The node name for the list items - * @default 'listItem' - * @example 'paragraph' - */ - itemTypeName: string; - /** - * HTML attributes to add to the bullet list element - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting the list - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting the list - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - bulletList: { - /** - * Toggle a bullet list - */ - toggleBulletList: () => ReturnType; - }; - } -} -/** - * Matches a bullet list to a dash or asterisk. - */ -declare const bulletListInputRegex: RegExp; -/** - * This extension allows you to create bullet lists. - * This requires the ListItem extension - * @see https://tiptap.dev/api/nodes/bullet-list - * @see https://tiptap.dev/api/nodes/list-item. - */ -declare const BulletList: Node; - -interface ListItemOptions { - /** - * The HTML attributes for a list item node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for bulletList nodes - * @default 'bulletList' - * @example 'myCustomBulletList' - */ - bulletListTypeName: string; - /** - * The node type for orderedList nodes - * @default 'orderedList' - * @example 'myCustomOrderedList' - */ - orderedListTypeName: string; -} -/** - * This extension allows you to create list items. - * @see https://www.tiptap.dev/api/nodes/list-item - */ -declare const ListItem: Node; - -type ListKeymapOptions = { - /** - * An array of list types. This is used for item and wrapper list matching. - * @default [] - * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }] - */ - listTypes: Array<{ - itemName: string; - wrapperNames: string[]; - }>; -}; -/** - * This extension registers custom keymaps to change the behaviour of the backspace and delete keys. - * By default Prosemirror keyhandling will always lift or sink items so paragraphs are joined into - * the adjacent or previous list item. This extension will prevent this behaviour and instead will - * try to join paragraphs from two list items into a single list item. - * @see https://www.tiptap.dev/api/extensions/list-keymap - */ -declare const ListKeymap: Extension; - -declare const findListItemPos: (typeOrName: string | NodeType, state: EditorState) => { - $pos: prosemirror_model.ResolvedPos; - depth: number; -} | null; - -declare const getNextListDepth: (typeOrName: string, state: EditorState) => number | false; - -declare const handleBackspace: (editor: Editor, name: string, parentListTypes: string[]) => boolean; - -declare const handleDelete: (editor: Editor, name: string) => boolean; - -declare const hasListBefore: (editorState: EditorState, name: string, parentListTypes: string[]) => boolean; - -declare const hasListItemAfter: (typeOrName: string, state: EditorState) => boolean; - -declare const hasListItemBefore: (typeOrName: string, state: EditorState) => boolean; - -declare const listItemHasSubList: (typeOrName: string, state: EditorState, node?: Node$1) => boolean; - -declare const nextListIsDeeper: (typeOrName: string, state: EditorState) => boolean; - -declare const nextListIsHigher: (typeOrName: string, state: EditorState) => boolean; - -declare const index_findListItemPos: typeof findListItemPos; -declare const index_getNextListDepth: typeof getNextListDepth; -declare const index_handleBackspace: typeof handleBackspace; -declare const index_handleDelete: typeof handleDelete; -declare const index_hasListBefore: typeof hasListBefore; -declare const index_hasListItemAfter: typeof hasListItemAfter; -declare const index_hasListItemBefore: typeof hasListItemBefore; -declare const index_listItemHasSubList: typeof listItemHasSubList; -declare const index_nextListIsDeeper: typeof nextListIsDeeper; -declare const index_nextListIsHigher: typeof nextListIsHigher; -declare namespace index { - export { index_findListItemPos as findListItemPos, index_getNextListDepth as getNextListDepth, index_handleBackspace as handleBackspace, index_handleDelete as handleDelete, index_hasListBefore as hasListBefore, index_hasListItemAfter as hasListItemAfter, index_hasListItemBefore as hasListItemBefore, index_listItemHasSubList as listItemHasSubList, index_nextListIsDeeper as nextListIsDeeper, index_nextListIsHigher as nextListIsHigher }; -} - -interface OrderedListOptions { - /** - * The node type name for list items. - * @default 'listItem' - * @example 'myListItem' - */ - itemTypeName: string; - /** - * The HTML attributes for an ordered list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting a list item. - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting a list item. - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - orderedList: { - /** - * Toggle an ordered list - * @example editor.commands.toggleOrderedList() - */ - toggleOrderedList: () => ReturnType; - }; - } -} -/** - * Matches an ordered list to a 1. on input (or any number followed by a dot). - */ -declare const orderedListInputRegex: RegExp; -/** - * This extension allows you to create ordered lists. - * This requires the ListItem extension - * @see https://www.tiptap.dev/api/nodes/ordered-list - * @see https://www.tiptap.dev/api/nodes/list-item - */ -declare const OrderedList: Node; - -interface TaskItemOptions { - /** - * A callback function that is called when the checkbox is clicked while the editor is in readonly mode. - * @param node The prosemirror node of the task item - * @param checked The new checked state - * @returns boolean - */ - onReadOnlyChecked?: (node: Node$1, checked: boolean) => boolean; - /** - * Controls whether the task items can be nested or not. - * @default false - * @example true - */ - nested: boolean; - /** - * HTML attributes to add to the task item element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for taskList nodes - * @default 'taskList' - * @example 'myCustomTaskList' - */ - taskListTypeName: string; - /** - * Accessibility options for the task item. - * @default {} - * @example - * ```js - * { - * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}` - * } - */ - a11y?: { - checkboxLabel?: (node: Node$1, checked: boolean) => string; - }; -} -/** - * Matches a task item to a - [ ] on input. - */ -declare const inputRegex: RegExp; -/** - * This extension allows you to create task items. - * @see https://www.tiptap.dev/api/nodes/task-item - */ -declare const TaskItem: Node; - -interface TaskListOptions { - /** - * The node type name for a task item. - * @default 'taskItem' - * @example 'myCustomTaskItem' - */ - itemTypeName: string; - /** - * The HTML attributes for a task list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - taskList: { - /** - * Toggle a task list - * @example editor.commands.toggleTaskList() - */ - toggleTaskList: () => ReturnType; - }; - } -} -/** - * This extension allows you to create task lists. - * @see https://www.tiptap.dev/api/nodes/task-list - */ -declare const TaskList: Node; - -interface ListKitOptions { - /** - * If set to false, the bulletList extension will not be registered - * @example table: false - */ - bulletList: Partial | false; - /** - * If set to false, the listItem extension will not be registered - */ - listItem: Partial | false; - /** - * If set to false, the listKeymap extension will not be registered - */ - listKeymap: Partial | false; - /** - * If set to false, the orderedList extension will not be registered - */ - orderedList: Partial | false; - /** - * If set to false, the taskItem extension will not be registered - */ - taskItem: Partial | false; - /** - * If set to false, the taskList extension will not be registered - */ - taskList: Partial | false; -} -/** - * The table kit is a collection of table editor extensions. - * - * It’s a good starting point for building your own table in Tiptap. - */ -declare const ListKit: Extension; - -export { BulletList, type BulletListOptions, ListItem, type ListItemOptions, ListKeymap, type ListKeymapOptions, ListKit, type ListKitOptions, OrderedList, type OrderedListOptions, TaskItem, type TaskItemOptions, TaskList, type TaskListOptions, bulletListInputRegex, inputRegex, index as listHelpers, orderedListInputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.js deleted file mode 100644 index 6fc33ff..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.js +++ /dev/null @@ -1,1295 +0,0 @@ -var __defProp = Object.defineProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; - -// src/bullet-list/bullet-list.ts -import { mergeAttributes, Node, wrappingInputRule } from "@tiptap/core"; -var ListItemName = "listItem"; -var TextStyleName = "textStyle"; -var bulletListInputRegex = /^\s*([-+*])\s$/; -var BulletList = Node.create({ - name: "bulletList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [{ tag: "ul" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["ul", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || token.ordered) { - return []; - } - return { - type: "bulletList", - content: token.items ? helpers.parseChildren(token.items) : [] - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleBulletList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-8": () => this.editor.commands.toggleBulletList() - }; - }, - addInputRules() { - let inputRule = wrappingInputRule({ - find: bulletListInputRegex, - type: this.type - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = wrappingInputRule({ - find: bulletListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: () => { - return this.editor.getAttributes(TextStyleName); - }, - editor: this.editor - }); - } - return [inputRule]; - } -}); - -// src/item/list-item.ts -import { mergeAttributes as mergeAttributes2, Node as Node2, renderNestedMarkdownContent } from "@tiptap/core"; - -// src/helpers/createBranchingListDeleteKeymap.ts -import { Extension } from "@tiptap/core"; - -// src/helpers/hoistBranchingNestedList.ts -import { Fragment } from "@tiptap/pm/model"; - -// src/helpers/getBranchingNestedListAtCursor.ts -var getBranchingNestedListAtCursor = (state, itemName, wrapperNames) => { - const { selection } = state; - if (!selection.empty) { - return null; - } - const { $from } = selection; - if (!$from.parent.isTextblock) { - return null; - } - if ($from.parentOffset !== $from.parent.content.size) { - return null; - } - let listItemDepth = -1; - for (let depth = $from.depth; depth > 0; depth -= 1) { - if ($from.node(depth).type.name === itemName) { - listItemDepth = depth; - break; - } - } - if (listItemDepth < 0) { - return null; - } - const listItem = $from.node(listItemDepth); - const indexInListItem = $from.index(listItemDepth); - if (indexInListItem + 1 >= listItem.childCount) { - return null; - } - const nextChild = listItem.child(indexInListItem + 1); - if (!wrapperNames.includes(nextChild.type.name)) { - return null; - } - const itemType = state.schema.nodes[itemName]; - let hasBranching = false; - nextChild.forEach((child) => { - if (child.type === itemType && child.childCount > 1) { - hasBranching = true; - } - }); - if (!hasBranching) { - return null; - } - const nodeAfter = state.doc.resolve($from.after()).nodeAfter; - if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) { - return null; - } - const items = []; - nodeAfter.forEach((child) => { - items.push(child); - }); - if (items.length === 0) { - return null; - } - return { - listItemDepth, - nestedList: nodeAfter, - nestedListPos: $from.after(), - insertPos: $from.after(listItemDepth), - items - }; -}; - -// src/helpers/hoistBranchingNestedList.ts -var hoistBranchingNestedList = (state, dispatch, itemName, wrapperNames) => { - const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames); - if (!context) { - return false; - } - const { selection } = state; - const { nestedList, nestedListPos, insertPos, items } = context; - const tr = state.tr; - tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize); - const mappedInsertPos = tr.mapping.map(insertPos); - tr.insert(mappedInsertPos, Fragment.from(items)); - tr.setSelection(selection.map(tr.doc, tr.mapping)); - if (dispatch) { - dispatch(tr); - } - return true; -}; - -// src/helpers/handleDeleteBranchingNestedList.ts -var handleDeleteBranchingNestedList = (editor, itemName, wrapperNames) => { - return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames); -}; - -// src/helpers/createBranchingListDeleteKeymap.ts -var createBranchingListDeleteKeymap = (itemName, wrapperNames) => { - return Extension.create({ - name: `${itemName}BranchingDeleteKeymap`, - priority: 101, - addKeyboardShortcuts() { - const handleDelete2 = () => handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames); - return { - Delete: handleDelete2, - "Mod-Delete": handleDelete2 - }; - } - }); -}; - -// src/item/list-item.ts -function isSameLineOrderedListToken(token) { - var _a, _b; - const nestedToken = (_a = token.tokens) == null ? void 0 : _a[0]; - return Boolean( - token.text && ((_b = token.tokens) == null ? void 0 : _b.length) === 1 && (nestedToken == null ? void 0 : nestedToken.type) === "list" && nestedToken.ordered && nestedToken.raw === token.text - ); -} -function parseSameLineOrderedListText(text, helpers) { - if (helpers.tokenizeInline) { - return helpers.parseInline(helpers.tokenizeInline(text)); - } - return helpers.parseInline([ - { - type: "text", - raw: text, - text - } - ]); -} -var ListItem = Node2.create({ - name: "listItem", - addOptions() { - return { - HTMLAttributes: {}, - bulletListTypeName: "bulletList", - orderedListTypeName: "orderedList" - }; - }, - content: "paragraph block*", - defining: true, - parseHTML() { - return [ - { - tag: "li" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["li", mergeAttributes2(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list_item", - parseMarkdown: (token, helpers) => { - var _a; - if (token.type !== "list_item") { - return []; - } - const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren; - let content = []; - if (token.tokens && token.tokens.length > 0) { - if (isSameLineOrderedListToken(token)) { - return { - type: "listItem", - content: [ - { - type: "paragraph", - content: parseSameLineOrderedListText(token.text || "", helpers) - } - ] - }; - } - const hasParagraphTokens = token.tokens.some((t) => t.type === "paragraph"); - if (hasParagraphTokens) { - content = parseBlockChildren(token.tokens); - } else { - const firstToken = token.tokens[0]; - if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) { - const inlineContent = helpers.parseInline(firstToken.tokens); - content = [ - { - type: "paragraph", - content: inlineContent - } - ]; - if (token.tokens.length > 1) { - const remainingTokens = token.tokens.slice(1); - const additionalContent = parseBlockChildren(remainingTokens); - content.push(...additionalContent); - } - } else { - content = parseBlockChildren(token.tokens); - } - } - } - if (content.length === 0) { - content = [ - { - type: "paragraph", - content: [] - } - ]; - } - return { - type: "listItem", - content - }; - }, - renderMarkdown: (node, h, ctx) => { - return renderNestedMarkdownContent( - node, - h, - (context) => { - var _a, _b; - if (context.parentType === "bulletList") { - return "- "; - } - if (context.parentType === "orderedList") { - const start = ((_b = (_a = context.meta) == null ? void 0 : _a.parentAttrs) == null ? void 0 : _b.start) || 1; - return `${start + context.index}. `; - } - return "- "; - }, - ctx - ); - }, - addExtensions() { - return [ - createBranchingListDeleteKeymap(this.name, [ - this.options.bulletListTypeName, - this.options.orderedListTypeName - ]) - ]; - }, - addKeyboardShortcuts() { - return { - Enter: () => this.editor.commands.splitListItem(this.name), - Tab: () => this.editor.commands.sinkListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - } -}); - -// src/keymap/list-keymap.ts -import { Extension as Extension2 } from "@tiptap/core"; - -// src/keymap/listHelpers/index.ts -var listHelpers_exports = {}; -__export(listHelpers_exports, { - findListItemPos: () => findListItemPos, - getNextListDepth: () => getNextListDepth, - handleBackspace: () => handleBackspace, - handleDelete: () => handleDelete, - hasListBefore: () => hasListBefore, - hasListItemAfter: () => hasListItemAfter, - hasListItemBefore: () => hasListItemBefore, - listItemHasSubList: () => listItemHasSubList, - nextListIsDeeper: () => nextListIsDeeper, - nextListIsHigher: () => nextListIsHigher -}); - -// src/keymap/listHelpers/findListItemPos.ts -import { getNodeType } from "@tiptap/core"; -var findListItemPos = (typeOrName, state) => { - const { $from } = state.selection; - const nodeType = getNodeType(typeOrName, state.schema); - let currentNode = null; - let currentDepth = $from.depth; - let currentPos = $from.pos; - let targetDepth = null; - while (currentDepth > 0 && targetDepth === null) { - currentNode = $from.node(currentDepth); - if (currentNode.type === nodeType) { - targetDepth = currentDepth; - } else { - currentDepth -= 1; - currentPos -= 1; - } - } - if (targetDepth === null) { - return null; - } - return { $pos: state.doc.resolve(currentPos), depth: targetDepth }; -}; - -// src/keymap/listHelpers/getNextListDepth.ts -import { getNodeAtPosition } from "@tiptap/core"; -var getNextListDepth = (typeOrName, state) => { - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos) { - return false; - } - const [, depth] = getNodeAtPosition(state, typeOrName, listItemPos.$pos.pos + 4); - return depth; -}; - -// src/keymap/listHelpers/handleBackspace.ts -import { isAtStartOfNode, isNodeActive } from "@tiptap/core"; - -// src/keymap/listHelpers/hasListBefore.ts -var hasListBefore = (editorState, name, parentListTypes) => { - const { $anchor } = editorState.selection; - const previousNodePos = Math.max(0, $anchor.pos - 2); - const previousNode = editorState.doc.resolve(previousNodePos).node(); - if (!previousNode || !parentListTypes.includes(previousNode.type.name)) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/handleBackspace.ts -var handleBackspace = (editor, name, parentListTypes) => { - if (editor.commands.undoInputRule()) { - return true; - } - if (editor.state.selection.from !== editor.state.selection.to) { - return false; - } - if (!isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) { - const { $anchor } = editor.state.selection; - const $listPos = editor.state.doc.resolve($anchor.before() - 1); - const listDescendants = []; - $listPos.node().descendants((node, pos) => { - if (node.type.name === name) { - listDescendants.push({ node, pos }); - } - }); - const lastItem = listDescendants.at(-1); - if (!lastItem) { - return false; - } - const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1); - return editor.chain().cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end()).joinForward().run(); - } - if (!isNodeActive(editor.state, name)) { - return false; - } - if (!isAtStartOfNode(editor.state)) { - return false; - } - return editor.chain().liftListItem(name).run(); -}; - -// src/keymap/listHelpers/handleDelete.ts -import { isAtEndOfNode, isNodeActive as isNodeActive2 } from "@tiptap/core"; - -// src/keymap/listHelpers/nextListIsDeeper.ts -var nextListIsDeeper = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth > listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/nextListIsHigher.ts -var nextListIsHigher = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth < listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/handleDelete.ts -var handleDelete = (editor, name) => { - if (!isNodeActive2(editor.state, name)) { - return false; - } - if (!isAtEndOfNode(editor.state, name)) { - return false; - } - const { selection } = editor.state; - const { $from, $to } = selection; - if (!selection.empty && $from.sameParent($to)) { - return false; - } - if (nextListIsDeeper(name, editor.state)) { - return editor.chain().focus(editor.state.selection.from + 4).lift(name).joinBackward().run(); - } - if (nextListIsHigher(name, editor.state)) { - return editor.chain().joinForward().joinBackward().run(); - } - return editor.commands.joinItemForward(); -}; - -// src/keymap/listHelpers/hasListItemAfter.ts -var hasListItemAfter = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2); - if ($targetPos.index() === $targetPos.parent.childCount - 1) { - return false; - } - if (((_a = $targetPos.nodeAfter) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/hasListItemBefore.ts -var hasListItemBefore = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - 2); - if ($targetPos.index() === 0) { - return false; - } - if (((_a = $targetPos.nodeBefore) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/listItemHasSubList.ts -import { getNodeType as getNodeType2 } from "@tiptap/core"; -var listItemHasSubList = (typeOrName, state, node) => { - if (!node) { - return false; - } - const nodeType = getNodeType2(typeOrName, state.schema); - let hasSubList = false; - node.descendants((child) => { - if (child.type === nodeType) { - hasSubList = true; - } - }); - return hasSubList; -}; - -// src/keymap/list-keymap.ts -var ListKeymap = Extension2.create({ - name: "listKeymap", - addOptions() { - return { - listTypes: [ - { - itemName: "listItem", - wrapperNames: ["bulletList", "orderedList"] - }, - { - itemName: "taskItem", - wrapperNames: ["taskList"] - } - ] - }; - }, - addKeyboardShortcuts() { - return { - Delete: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - "Mod-Delete": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - Backspace: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - }, - "Mod-Backspace": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - } - }; - } -}); - -// src/kit/index.ts -import { Extension as Extension3 } from "@tiptap/core"; - -// src/ordered-list/ordered-list.ts -import { mergeAttributes as mergeAttributes3, Node as Node3, wrappingInputRule as wrappingInputRule2 } from "@tiptap/core"; - -// src/ordered-list/utils.ts -var ORDERED_LIST_ITEM_REGEX = /^(\s*)(\d+)\.\s+(.*)$/; -var INDENTED_LINE_REGEX = /^\s/; -function isBlockContentLine(line) { - const trimmedLine = line.trimStart(); - return ( - // oxlint-disable-next-line prefer-string-starts-ends-with - /^[-+*]\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^\d+\.\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^>\s?/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^```/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^~~~/.test(trimmedLine) - ); -} -function splitItemContent(contentLines) { - const paragraphLines = []; - const blockLines = []; - let reachedBlockBoundary = false; - contentLines.forEach((line) => { - if (reachedBlockBoundary) { - blockLines.push(line); - return; - } - if (line.trim() === "") { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - if (paragraphLines.length > 0 && isBlockContentLine(line)) { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - paragraphLines.push(line); - }); - return { - paragraphLines, - blockLines - }; -} -function collectOrderedListItems(lines) { - const listItems = []; - let currentLineIndex = 0; - let consumed = 0; - while (currentLineIndex < lines.length) { - const line = lines[currentLineIndex]; - const match = line.match(ORDERED_LIST_ITEM_REGEX); - if (!match) { - break; - } - const [, indent, number, content] = match; - const indentLevel = indent.length; - const itemContentLines = [content]; - let nextLineIndex = currentLineIndex + 1; - const itemLines = [line]; - let sawBlankLine = false; - while (nextLineIndex < lines.length) { - const nextLine = lines[nextLineIndex]; - const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX); - if (nextMatch) { - break; - } - if (nextLine.trim() === "") { - itemLines.push(nextLine); - itemContentLines.push(""); - sawBlankLine = true; - nextLineIndex += 1; - } else if (nextLine.match(INDENTED_LINE_REGEX)) { - itemLines.push(nextLine); - itemContentLines.push(nextLine.slice(indentLevel + 2)); - nextLineIndex += 1; - } else { - if (sawBlankLine) { - break; - } - itemLines.push(nextLine); - itemContentLines.push(nextLine); - nextLineIndex += 1; - } - } - listItems.push({ - indent: indentLevel, - number: parseInt(number, 10), - content: itemContentLines.join("\n").trim(), - contentLines: itemContentLines, - raw: itemLines.join("\n") - }); - consumed = nextLineIndex; - currentLineIndex = nextLineIndex; - } - return [listItems, consumed]; -} -function buildNestedStructure(items, baseIndent, lexer) { - const result = []; - let currentIndex = 0; - while (currentIndex < items.length) { - const item = items[currentIndex]; - if (item.indent === baseIndent) { - const { paragraphLines, blockLines } = splitItemContent(item.contentLines); - const mainText = paragraphLines.join("\n").trim(); - const tokens = []; - if (mainText) { - tokens.push({ - type: "paragraph", - raw: mainText, - tokens: lexer.inlineTokens(mainText) - }); - } - const additionalContent = blockLines.join("\n").trim(); - if (additionalContent) { - const blockTokens = lexer.blockTokens(additionalContent); - tokens.push(...blockTokens); - } - let lookAheadIndex = currentIndex + 1; - const nestedItems = []; - while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) { - nestedItems.push(items[lookAheadIndex]); - lookAheadIndex += 1; - } - if (nestedItems.length > 0) { - const nextIndent = Math.min(...nestedItems.map((nestedItem) => nestedItem.indent)); - const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer); - tokens.push({ - type: "list", - ordered: true, - start: nestedItems[0].number, - items: nestedListItems, - raw: nestedItems.map((nestedItem) => nestedItem.raw).join("\n") - }); - } - result.push({ - type: "list_item", - raw: item.raw, - tokens - }); - currentIndex = lookAheadIndex; - } else { - currentIndex += 1; - } - } - return result; -} -function parseListItems(items, helpers) { - return items.map((item) => { - if (item.type !== "list_item") { - return helpers.parseChildren([item])[0]; - } - const content = []; - if (item.tokens && item.tokens.length > 0) { - item.tokens.forEach((itemToken) => { - if (itemToken.type === "paragraph" || itemToken.type === "list" || itemToken.type === "blockquote" || itemToken.type === "code") { - content.push(...helpers.parseChildren([itemToken])); - } else if (itemToken.type === "text" && itemToken.tokens) { - const inlineContent = helpers.parseChildren([itemToken]); - content.push({ - type: "paragraph", - content: inlineContent - }); - } else { - const parsed = helpers.parseChildren([itemToken]); - if (parsed.length > 0) { - content.push(...parsed); - } - } - }); - } - return { - type: "listItem", - content - }; - }); -} - -// src/ordered-list/ordered-list.ts -var ListItemName2 = "listItem"; -var TextStyleName2 = "textStyle"; -var orderedListInputRegex = /^(\d+)\.\s$/; -var OrderedList = Node3.create({ - name: "orderedList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - addAttributes() { - return { - start: { - default: 1, - parseHTML: (element) => { - return element.hasAttribute("start") ? parseInt(element.getAttribute("start") || "", 10) : 1; - } - }, - type: { - default: null, - parseHTML: (element) => element.getAttribute("type") - } - }; - }, - parseHTML() { - return [ - { - tag: "ol" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - const { start, ...attributesWithoutStart } = HTMLAttributes; - return start === 1 ? ["ol", mergeAttributes3(this.options.HTMLAttributes, attributesWithoutStart), 0] : ["ol", mergeAttributes3(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || !token.ordered) { - return []; - } - const startValue = token.start || 1; - const content = token.items ? parseListItems(token.items, helpers) : []; - if (startValue !== 1) { - return { - type: "orderedList", - attrs: { start: startValue }, - content - }; - } - return { - type: "orderedList", - content - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "orderedList", - level: "block", - start: (src) => { - const match = src.match(/^(\s*)(\d+)\.\s+/); - const index = match == null ? void 0 : match.index; - return index !== void 0 ? index : -1; - }, - tokenize: (src, _tokens, lexer) => { - var _a; - const lines = src.split("\n"); - const [listItems, consumed] = collectOrderedListItems(lines); - if (listItems.length === 0) { - return void 0; - } - const items = buildNestedStructure(listItems, 0, lexer); - if (items.length === 0) { - return void 0; - } - const startValue = ((_a = listItems[0]) == null ? void 0 : _a.number) || 1; - return { - type: "list", - ordered: true, - start: startValue, - items, - raw: lines.slice(0, consumed).join("\n") - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleOrderedList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName2, this.editor.getAttributes(TextStyleName2)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() - }; - }, - addInputRules() { - let inputRule = wrappingInputRule2({ - find: orderedListInputRegex, - type: this.type, - getAttributes: (match) => ({ start: +match[1] }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1] - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = wrappingInputRule2({ - find: orderedListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: (match) => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName2) }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1], - editor: this.editor - }); - } - return [inputRule]; - } -}); - -// src/task-item/task-item.ts -import { - getRenderedAttributes, - mergeAttributes as mergeAttributes4, - Node as Node4, - renderNestedMarkdownContent as renderNestedMarkdownContent2, - wrappingInputRule as wrappingInputRule3 -} from "@tiptap/core"; -var inputRegex = /^\s*(\[([( |x])?\])\s$/; -var TaskItem = Node4.create({ - name: "taskItem", - addOptions() { - return { - nested: false, - HTMLAttributes: {}, - taskListTypeName: "taskList", - a11y: void 0 - }; - }, - content() { - return this.options.nested ? "paragraph block*" : "paragraph+"; - }, - defining: true, - addAttributes() { - return { - checked: { - default: false, - keepOnSplit: false, - parseHTML: (element) => { - const dataChecked = element.getAttribute("data-checked"); - return dataChecked === "" || dataChecked === "true"; - }, - renderHTML: (attributes) => ({ - "data-checked": attributes.checked - }) - } - }; - }, - parseHTML() { - return [ - { - tag: `li[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ node, HTMLAttributes }) { - return [ - "li", - mergeAttributes4(this.options.HTMLAttributes, HTMLAttributes, { - "data-type": this.name - }), - [ - "label", - [ - "input", - { - type: "checkbox", - checked: node.attrs.checked ? "checked" : null - } - ], - ["span"] - ], - ["div", 0] - ]; - }, - parseMarkdown: (token, h) => { - const content = []; - if (token.tokens && token.tokens.length > 0) { - content.push(h.createNode("paragraph", {}, h.parseInline(token.tokens))); - } else if (token.text) { - content.push(h.createNode("paragraph", {}, [h.createNode("text", { text: token.text })])); - } else { - content.push(h.createNode("paragraph", {}, [])); - } - if (token.nestedTokens && token.nestedTokens.length > 0) { - const nestedContent = h.parseChildren(token.nestedTokens); - content.push(...nestedContent); - } - return h.createNode("taskItem", { checked: token.checked || false }, content); - }, - renderMarkdown: (node, h) => { - var _a; - const checkedChar = ((_a = node.attrs) == null ? void 0 : _a.checked) ? "x" : " "; - const prefix = `- [${checkedChar}] `; - return renderNestedMarkdownContent2(node, h, prefix); - }, - addExtensions() { - if (!this.options.nested) { - return []; - } - return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]; - }, - addKeyboardShortcuts() { - const shortcuts = { - Enter: () => this.editor.commands.splitListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - if (!this.options.nested) { - return shortcuts; - } - return { - ...shortcuts, - Tab: () => this.editor.commands.sinkListItem(this.name) - }; - }, - addNodeView() { - return ({ node, HTMLAttributes, getPos, editor }) => { - const listItem = document.createElement("li"); - const checkboxWrapper = document.createElement("label"); - const checkboxStyler = document.createElement("span"); - const checkbox = document.createElement("input"); - const content = document.createElement("div"); - const updateA11Y = (currentNode) => { - var _a, _b; - checkbox.ariaLabel = ((_b = (_a = this.options.a11y) == null ? void 0 : _a.checkboxLabel) == null ? void 0 : _b.call(_a, currentNode, checkbox.checked)) || `Task item checkbox for ${currentNode.textContent || "empty task item"}`; - }; - updateA11Y(node); - checkboxWrapper.contentEditable = "false"; - checkbox.type = "checkbox"; - checkbox.addEventListener("mousedown", (event) => event.preventDefault()); - checkbox.addEventListener("change", (event) => { - if (!editor.isEditable && !this.options.onReadOnlyChecked) { - checkbox.checked = !checkbox.checked; - return; - } - const { checked } = event.target; - if (editor.isEditable && typeof getPos === "function") { - editor.chain().focus(void 0, { scrollIntoView: false }).command(({ tr }) => { - const position = getPos(); - if (typeof position !== "number") { - return false; - } - const currentNode = tr.doc.nodeAt(position); - tr.setNodeMarkup(position, void 0, { - ...currentNode == null ? void 0 : currentNode.attrs, - checked - }); - return true; - }).run(); - } - if (!editor.isEditable && this.options.onReadOnlyChecked) { - if (!this.options.onReadOnlyChecked(node, checked)) { - checkbox.checked = !checkbox.checked; - } - } - }); - Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - listItem.dataset.checked = node.attrs.checked; - checkbox.checked = node.attrs.checked; - checkboxWrapper.append(checkbox, checkboxStyler); - listItem.append(checkboxWrapper, content); - Object.entries(HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes)); - return { - dom: listItem, - contentDOM: content, - update: (updatedNode) => { - if (updatedNode.type !== this.type) { - return false; - } - listItem.dataset.checked = updatedNode.attrs.checked; - checkbox.checked = updatedNode.attrs.checked; - updateA11Y(updatedNode); - const extensionAttributes = editor.extensionManager.attributes; - const newHTMLAttributes = getRenderedAttributes(updatedNode, extensionAttributes); - const newKeys = new Set(Object.keys(newHTMLAttributes)); - const staticAttrs = this.options.HTMLAttributes; - prevRenderedAttributeKeys.forEach((key) => { - if (!newKeys.has(key)) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } - }); - Object.entries(newHTMLAttributes).forEach(([key, value]) => { - if (value === null || value === void 0) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } else { - listItem.setAttribute(key, value); - } - }); - prevRenderedAttributeKeys = newKeys; - return true; - } - }; - }; - }, - addInputRules() { - return [ - wrappingInputRule3({ - find: inputRegex, - type: this.type, - getAttributes: (match) => ({ - checked: match[match.length - 1] === "x" - }) - }) - ]; - } -}); - -// src/task-list/task-list.ts -import { mergeAttributes as mergeAttributes5, Node as Node5, parseIndentedBlocks } from "@tiptap/core"; -var TaskList = Node5.create({ - name: "taskList", - addOptions() { - return { - itemTypeName: "taskItem", - HTMLAttributes: {} - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [ - { - tag: `ul[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return [ - "ul", - mergeAttributes5(this.options.HTMLAttributes, HTMLAttributes, { "data-type": this.name }), - 0 - ]; - }, - parseMarkdown: (token, h) => { - return h.createNode("taskList", {}, h.parseChildren(token.items || [])); - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "taskList", - level: "block", - start(src) { - var _a; - const index = (_a = src.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)) == null ? void 0 : _a.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, tokens, lexer) { - const parseTaskListContent = (content) => { - const nestedResult = parseIndentedBlocks( - content, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Allow recursive nesting - customNestedParser: parseTaskListContent - }, - lexer - ); - if (nestedResult) { - return [ - { - type: "taskList", - raw: nestedResult.raw, - items: nestedResult.items - } - ]; - } - return lexer.blockTokens(content); - }; - const result = parseIndentedBlocks( - src, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Use the recursive parser for nested content - customNestedParser: parseTaskListContent - }, - lexer - ); - if (!result) { - return void 0; - } - return { - type: "taskList", - raw: result.raw, - items: result.items - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleTaskList: () => ({ commands }) => { - return commands.toggleList(this.name, this.options.itemTypeName); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-9": () => this.editor.commands.toggleTaskList() - }; - } -}); - -// src/kit/index.ts -var ListKit = Extension3.create({ - name: "listKit", - addExtensions() { - const extensions = []; - if (this.options.bulletList !== false) { - extensions.push(BulletList.configure(this.options.bulletList)); - } - if (this.options.listItem !== false) { - extensions.push(ListItem.configure(this.options.listItem)); - } - if (this.options.listKeymap !== false) { - extensions.push(ListKeymap.configure(this.options.listKeymap)); - } - if (this.options.orderedList !== false) { - extensions.push(OrderedList.configure(this.options.orderedList)); - } - if (this.options.taskItem !== false) { - extensions.push(TaskItem.configure(this.options.taskItem)); - } - if (this.options.taskList !== false) { - extensions.push(TaskList.configure(this.options.taskList)); - } - return extensions; - } -}); -export { - BulletList, - ListItem, - ListKeymap, - ListKit, - OrderedList, - TaskItem, - TaskList, - bulletListInputRegex, - inputRegex, - listHelpers_exports as listHelpers, - orderedListInputRegex -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.js.map deleted file mode 100644 index 4d8d815..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/bullet-list/bullet-list.ts","../src/item/list-item.ts","../src/helpers/createBranchingListDeleteKeymap.ts","../src/helpers/hoistBranchingNestedList.ts","../src/helpers/getBranchingNestedListAtCursor.ts","../src/helpers/handleDeleteBranchingNestedList.ts","../src/keymap/list-keymap.ts","../src/keymap/listHelpers/index.ts","../src/keymap/listHelpers/findListItemPos.ts","../src/keymap/listHelpers/getNextListDepth.ts","../src/keymap/listHelpers/handleBackspace.ts","../src/keymap/listHelpers/hasListBefore.ts","../src/keymap/listHelpers/handleDelete.ts","../src/keymap/listHelpers/nextListIsDeeper.ts","../src/keymap/listHelpers/nextListIsHigher.ts","../src/keymap/listHelpers/hasListItemAfter.ts","../src/keymap/listHelpers/hasListItemBefore.ts","../src/keymap/listHelpers/listItemHasSubList.ts","../src/kit/index.ts","../src/ordered-list/ordered-list.ts","../src/ordered-list/utils.ts","../src/task-item/task-item.ts","../src/task-list/task-list.ts"],"sourcesContent":["import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface BulletListOptions {\n /**\n * The node name for the list items\n * @default 'listItem'\n * @example 'paragraph'\n */\n itemTypeName: string\n\n /**\n * HTML attributes to add to the bullet list element\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting the list\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting the list\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bulletList: {\n /**\n * Toggle a bullet list\n */\n toggleBulletList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches a bullet list to a dash or asterisk.\n */\nexport const bulletListInputRegex = /^\\s*([-+*])\\s$/\n\n/**\n * This extension allows you to create bullet lists.\n * This requires the ListItem extension\n * @see https://tiptap.dev/api/nodes/bullet-list\n * @see https://tiptap.dev/api/nodes/list-item.\n */\nexport const BulletList = Node.create({\n name: 'bulletList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [{ tag: 'ul' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || (token as any).ordered) {\n return []\n }\n\n return {\n type: 'bulletList',\n content: token.items ? helpers.parseChildren(token.items) : [],\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleBulletList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: () => {\n return this.editor.getAttributes(TextStyleName)\n },\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n","import type { JSONContent, MarkdownParseHelpers, MarkdownToken } from '@tiptap/core'\nimport { mergeAttributes, Node, renderNestedMarkdownContent } from '@tiptap/core'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface ListItemOptions {\n /**\n * The HTML attributes for a list item node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for bulletList nodes\n * @default 'bulletList'\n * @example 'myCustomBulletList'\n */\n bulletListTypeName: string\n\n /**\n * The node type for orderedList nodes\n * @default 'orderedList'\n * @example 'myCustomOrderedList'\n */\n orderedListTypeName: string\n}\n\nfunction isSameLineOrderedListToken(token: MarkdownToken): boolean {\n const nestedToken = token.tokens?.[0]\n\n return Boolean(\n token.text &&\n token.tokens?.length === 1 &&\n nestedToken?.type === 'list' &&\n nestedToken.ordered &&\n nestedToken.raw === token.text,\n )\n}\n\nfunction parseSameLineOrderedListText(text: string, helpers: MarkdownParseHelpers): JSONContent[] {\n if (helpers.tokenizeInline) {\n return helpers.parseInline(helpers.tokenizeInline(text))\n }\n\n return helpers.parseInline([\n {\n type: 'text',\n raw: text,\n text,\n },\n ])\n}\n\n/**\n * This extension allows you to create list items.\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const ListItem = Node.create({\n name: 'listItem',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n bulletListTypeName: 'bulletList',\n orderedListTypeName: 'orderedList',\n }\n },\n\n content: 'paragraph block*',\n\n defining: true,\n\n parseHTML() {\n return [\n {\n tag: 'li',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list_item',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list_item') {\n return []\n }\n\n const parseBlockChildren = helpers.parseBlockChildren ?? helpers.parseChildren\n let content: any[] = []\n\n if (token.tokens && token.tokens.length > 0) {\n if (isSameLineOrderedListToken(token)) {\n return {\n type: 'listItem',\n content: [\n {\n type: 'paragraph',\n content: parseSameLineOrderedListText(token.text || '', helpers),\n },\n ],\n }\n }\n\n // Check if we have paragraph tokens (complex list items)\n const hasParagraphTokens = token.tokens.some(t => t.type === 'paragraph')\n\n if (hasParagraphTokens) {\n // If we have paragraph tokens, parse them as block elements\n content = parseBlockChildren(token.tokens)\n } else {\n // Check if the first token is a text token with nested inline tokens\n const firstToken = token.tokens[0]\n\n if (\n firstToken &&\n firstToken.type === 'text' &&\n firstToken.tokens &&\n firstToken.tokens.length > 0\n ) {\n // Parse the inline content from the text token\n const inlineContent = helpers.parseInline(firstToken.tokens)\n\n // Start with the paragraph containing the inline content\n content = [\n {\n type: 'paragraph',\n content: inlineContent,\n },\n ]\n\n // If there are additional tokens after the first text token (like nested lists),\n // parse them as block elements and add them\n if (token.tokens.length > 1) {\n const remainingTokens = token.tokens.slice(1)\n const additionalContent = parseBlockChildren(remainingTokens)\n content.push(...additionalContent)\n }\n } else {\n // Fallback: parse all tokens as block elements\n content = parseBlockChildren(token.tokens)\n }\n }\n }\n\n // Ensure we always have at least an empty paragraph\n if (content.length === 0) {\n content = [\n {\n type: 'paragraph',\n content: [],\n },\n ]\n }\n\n return {\n type: 'listItem',\n content,\n }\n },\n\n renderMarkdown: (node, h, ctx) => {\n return renderNestedMarkdownContent(\n node,\n h,\n (context: any) => {\n if (context.parentType === 'bulletList') {\n return '- '\n }\n if (context.parentType === 'orderedList') {\n const start = context.meta?.parentAttrs?.start || 1\n return `${start + context.index}. `\n }\n // Fallback to bullet list for unknown parent types\n return '- '\n },\n ctx,\n )\n },\n\n addExtensions() {\n return [\n createBranchingListDeleteKeymap(this.name, [\n this.options.bulletListTypeName,\n this.options.orderedListTypeName,\n ]),\n ]\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => this.editor.commands.splitListItem(this.name),\n Tab: () => this.editor.commands.sinkListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n },\n})\n","import { Extension } from '@tiptap/core'\n\nimport { handleDeleteBranchingNestedList } from './handleDeleteBranchingNestedList.js'\n\n/**\n * Creates a high-priority keymap extension that handles Delete for branching nested lists.\n * Kept separate from the list item node so Enter/Tab shortcuts keep their default priority.\n */\nexport const createBranchingListDeleteKeymap = (itemName: string, wrapperNames: string[]) => {\n return Extension.create({\n name: `${itemName}BranchingDeleteKeymap`,\n priority: 101,\n\n addKeyboardShortcuts() {\n const handleDelete = () =>\n handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames)\n\n return {\n Delete: handleDelete,\n 'Mod-Delete': handleDelete,\n }\n },\n })\n}\n","import { Fragment } from '@tiptap/pm/model'\nimport type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { getBranchingNestedListAtCursor } from './getBranchingNestedListAtCursor.js'\n\n/**\n * Hoists all list items from a branching nested list after the cursor into the parent list.\n *\n * Use this when `joinForward` cannot restructure a nested list that contains list items\n * with sublists (see issue #6906).\n *\n * @param state - The editor state to transform.\n * @param dispatch - Optional dispatch function for the transaction.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * // Cursor at the end of \"Item 1\" before a nested list with branching items.\n * hoistBranchingNestedList(editor.state, editor.view.dispatch, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n * ```\n */\nexport const hoistBranchingNestedList = (\n state: EditorState,\n dispatch: ((tr: Transaction) => void) | undefined,\n itemName: string,\n wrapperNames: string[],\n) => {\n const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames)\n\n if (!context) {\n return false\n }\n\n const { selection } = state\n const { nestedList, nestedListPos, insertPos, items } = context\n const tr = state.tr\n\n tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize)\n\n const mappedInsertPos = tr.mapping.map(insertPos)\n\n tr.insert(mappedInsertPos, Fragment.from(items))\n\n tr.setSelection(selection.map(tr.doc, tr.mapping))\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport type BranchingNestedListAtCursor = {\n listItemDepth: number\n nestedList: Node\n nestedListPos: number\n insertPos: number\n items: Node[]\n}\n\n/**\n * Resolves a branching nested list immediately after the cursor when the selection is\n * collapsed at the end of a textblock inside a list item.\n *\n * @param state - The editor state to inspect.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns Resolved positions and nodes for hoisting, or `null` when not applicable.\n *\n * @example\n * ```ts\n * const context = getBranchingNestedListAtCursor(editor.state, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n *\n * if (context) {\n * // cursor is at the end of Item 1 before a branching nested sublist\n * }\n * ```\n */\nexport const getBranchingNestedListAtCursor = (\n state: EditorState,\n itemName: string,\n wrapperNames: string[],\n): BranchingNestedListAtCursor | null => {\n const { selection } = state\n\n if (!selection.empty) {\n return null\n }\n\n const { $from } = selection\n\n if (!$from.parent.isTextblock) {\n return null\n }\n\n if ($from.parentOffset !== $from.parent.content.size) {\n return null\n }\n\n let listItemDepth = -1\n\n for (let depth = $from.depth; depth > 0; depth -= 1) {\n if ($from.node(depth).type.name === itemName) {\n listItemDepth = depth\n break\n }\n }\n\n if (listItemDepth < 0) {\n return null\n }\n\n const listItem = $from.node(listItemDepth)\n const indexInListItem = $from.index(listItemDepth)\n\n if (indexInListItem + 1 >= listItem.childCount) {\n return null\n }\n\n const nextChild = listItem.child(indexInListItem + 1)\n\n if (!wrapperNames.includes(nextChild.type.name)) {\n return null\n }\n\n const itemType = state.schema.nodes[itemName]\n let hasBranching = false\n\n nextChild.forEach(child => {\n if (child.type === itemType && child.childCount > 1) {\n hasBranching = true\n }\n })\n\n if (!hasBranching) {\n return null\n }\n\n const nodeAfter = state.doc.resolve($from.after()).nodeAfter\n\n if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) {\n return null\n }\n\n const items: Node[] = []\n\n nodeAfter.forEach(child => {\n items.push(child)\n })\n\n if (items.length === 0) {\n return null\n }\n\n return {\n listItemDepth,\n nestedList: nodeAfter,\n nestedListPos: $from.after(),\n insertPos: $from.after(listItemDepth),\n items,\n }\n}\n","import type { Editor } from '@tiptap/core'\n\nimport { hoistBranchingNestedList } from './hoistBranchingNestedList.js'\n\n/**\n * Handles Delete for a list item when a branching nested sublist follows the cursor.\n *\n * @param editor - The editor instance whose state should be updated.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * Delete: () =>\n * handleDeleteBranchingNestedList(editor, 'listItem', ['bulletList', 'orderedList']),\n * ```\n */\nexport const handleDeleteBranchingNestedList = (\n editor: Editor,\n itemName: string,\n wrapperNames: string[],\n) => {\n return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames)\n}\n","import { Extension } from '@tiptap/core'\n\nimport { handleBackspace, handleDelete } from './listHelpers/index.js'\n\nexport type ListKeymapOptions = {\n /**\n * An array of list types. This is used for item and wrapper list matching.\n * @default []\n * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }]\n */\n listTypes: Array<{\n itemName: string\n wrapperNames: string[]\n }>\n}\n\n/**\n * This extension registers custom keymaps to change the behaviour of the backspace and delete keys.\n * By default Prosemirror keyhandling will always lift or sink items so paragraphs are joined into\n * the adjacent or previous list item. This extension will prevent this behaviour and instead will\n * try to join paragraphs from two list items into a single list item.\n * @see https://www.tiptap.dev/api/extensions/list-keymap\n */\nexport const ListKeymap = Extension.create({\n name: 'listKeymap',\n\n addOptions() {\n return {\n listTypes: [\n {\n itemName: 'listItem',\n wrapperNames: ['bulletList', 'orderedList'],\n },\n {\n itemName: 'taskItem',\n wrapperNames: ['taskList'],\n },\n ],\n }\n },\n\n addKeyboardShortcuts() {\n return {\n Delete: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Delete': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n Backspace: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Backspace': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n }\n },\n})\n","export * from './findListItemPos.js'\nexport * from './getNextListDepth.js'\nexport * from './handleBackspace.js'\nexport * from './handleDelete.js'\nexport * from './hasListBefore.js'\nexport * from './hasListItemAfter.js'\nexport * from './hasListItemBefore.js'\nexport * from './listItemHasSubList.js'\nexport * from './nextListIsDeeper.js'\nexport * from './nextListIsHigher.js'\n","import { getNodeType } from '@tiptap/core'\nimport type { NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const findListItemPos = (typeOrName: string | NodeType, state: EditorState) => {\n const { $from } = state.selection\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let currentNode = null\n let currentDepth = $from.depth\n let currentPos = $from.pos\n let targetDepth: number | null = null\n\n while (currentDepth > 0 && targetDepth === null) {\n currentNode = $from.node(currentDepth)\n\n if (currentNode.type === nodeType) {\n targetDepth = currentDepth\n } else {\n currentDepth -= 1\n currentPos -= 1\n }\n }\n\n if (targetDepth === null) {\n return null\n }\n\n return { $pos: state.doc.resolve(currentPos), depth: targetDepth }\n}\n","import { getNodeAtPosition } from '@tiptap/core'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\n\nexport const getNextListDepth = (typeOrName: string, state: EditorState) => {\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos) {\n return false\n }\n\n const [, depth] = getNodeAtPosition(state, typeOrName, listItemPos.$pos.pos + 4)\n\n return depth\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtStartOfNode, isNodeActive } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\n\nimport { hasListBefore } from './hasListBefore.js'\n\nexport const handleBackspace = (editor: Editor, name: string, parentListTypes: string[]) => {\n // this is required to still handle the undo handling\n if (editor.commands.undoInputRule()) {\n return true\n }\n\n // if the selection is not collapsed\n // we can rely on the default backspace behavior\n if (editor.state.selection.from !== editor.state.selection.to) {\n return false\n }\n\n // if the current item is NOT inside a list item &\n // the previous item is a list (orderedList or bulletList)\n // move the cursor into the list and delete the current item\n if (!isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) {\n const { $anchor } = editor.state.selection\n\n const $listPos = editor.state.doc.resolve($anchor.before() - 1)\n\n const listDescendants: Array<{ node: Node; pos: number }> = []\n\n $listPos.node().descendants((node, pos) => {\n if (node.type.name === name) {\n listDescendants.push({ node, pos })\n }\n })\n\n const lastItem = listDescendants.at(-1)\n\n if (!lastItem) {\n return false\n }\n\n const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1)\n\n return editor\n .chain()\n .cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end())\n .joinForward()\n .run()\n }\n\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the start of a node\n // do nothing and proceed\n if (!isAtStartOfNode(editor.state)) {\n return false\n }\n\n // At the start of a list item, lift it out. Top-level items split the\n // wrapping list around them; nested items get promoted into the outer\n // list. A second backspace then falls through to the merge branch above.\n return editor.chain().liftListItem(name).run()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListBefore = (\n editorState: EditorState,\n name: string,\n parentListTypes: string[],\n) => {\n const { $anchor } = editorState.selection\n\n const previousNodePos = Math.max(0, $anchor.pos - 2)\n\n const previousNode = editorState.doc.resolve(previousNodePos).node()\n\n if (!previousNode || !parentListTypes.includes(previousNode.type.name)) {\n return false\n }\n\n return true\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtEndOfNode, isNodeActive } from '@tiptap/core'\n\nimport { nextListIsDeeper } from './nextListIsDeeper.js'\nimport { nextListIsHigher } from './nextListIsHigher.js'\n\nexport const handleDelete = (editor: Editor, name: string) => {\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the end of a node\n // do nothing and proceed\n if (!isAtEndOfNode(editor.state, name)) {\n return false\n }\n\n // if the selection is not collapsed, or not within a single node\n // do nothing and proceed\n const { selection } = editor.state\n const { $from, $to } = selection\n\n if (!selection.empty && $from.sameParent($to)) {\n return false\n }\n\n // check if the next node is a list with a deeper depth\n if (nextListIsDeeper(name, editor.state)) {\n return editor\n .chain()\n .focus(editor.state.selection.from + 4)\n .lift(name)\n .joinBackward()\n .run()\n }\n\n if (nextListIsHigher(name, editor.state)) {\n return editor.chain().joinForward().joinBackward().run()\n }\n\n return editor.commands.joinItemForward()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsDeeper = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth > listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsHigher = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth < listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemAfter = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2)\n\n if ($targetPos.index() === $targetPos.parent.childCount - 1) {\n return false\n }\n\n if ($targetPos.nodeAfter?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemBefore = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - 2)\n\n if ($targetPos.index() === 0) {\n return false\n }\n\n if ($targetPos.nodeBefore?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import { getNodeType } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const listItemHasSubList = (typeOrName: string, state: EditorState, node?: Node) => {\n if (!node) {\n return false\n }\n\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let hasSubList = false\n\n node.descendants(child => {\n if (child.type === nodeType) {\n hasSubList = true\n }\n })\n\n return hasSubList\n}\n","import { Extension } from '@tiptap/core'\n\nimport type { BulletListOptions } from '../bullet-list/index.js'\nimport { BulletList } from '../bullet-list/index.js'\nimport type { ListItemOptions } from '../item/index.js'\nimport { ListItem } from '../item/index.js'\nimport type { ListKeymapOptions } from '../keymap/index.js'\nimport { ListKeymap } from '../keymap/index.js'\nimport type { OrderedListOptions } from '../ordered-list/index.js'\nimport { OrderedList } from '../ordered-list/index.js'\nimport type { TaskItemOptions } from '../task-item/index.js'\nimport { TaskItem } from '../task-item/index.js'\nimport type { TaskListOptions } from '../task-list/index.js'\nimport { TaskList } from '../task-list/index.js'\n\nexport interface ListKitOptions {\n /**\n * If set to false, the bulletList extension will not be registered\n * @example table: false\n */\n bulletList: Partial | false\n /**\n * If set to false, the listItem extension will not be registered\n */\n listItem: Partial | false\n /**\n * If set to false, the listKeymap extension will not be registered\n */\n listKeymap: Partial | false\n /**\n * If set to false, the orderedList extension will not be registered\n */\n orderedList: Partial | false\n /**\n * If set to false, the taskItem extension will not be registered\n */\n taskItem: Partial | false\n /**\n * If set to false, the taskList extension will not be registered\n */\n taskList: Partial | false\n}\n\n/**\n * The table kit is a collection of table editor extensions.\n *\n * It’s a good starting point for building your own table in Tiptap.\n */\nexport const ListKit = Extension.create({\n name: 'listKit',\n\n addExtensions() {\n const extensions = []\n\n if (this.options.bulletList !== false) {\n extensions.push(BulletList.configure(this.options.bulletList))\n }\n\n if (this.options.listItem !== false) {\n extensions.push(ListItem.configure(this.options.listItem))\n }\n\n if (this.options.listKeymap !== false) {\n extensions.push(ListKeymap.configure(this.options.listKeymap))\n }\n\n if (this.options.orderedList !== false) {\n extensions.push(OrderedList.configure(this.options.orderedList))\n }\n\n if (this.options.taskItem !== false) {\n extensions.push(TaskItem.configure(this.options.taskItem))\n }\n\n if (this.options.taskList !== false) {\n extensions.push(TaskList.configure(this.options.taskList))\n }\n\n return extensions\n },\n})\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nimport { buildNestedStructure, collectOrderedListItems, parseListItems } from './utils.js'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface OrderedListOptions {\n /**\n * The node type name for list items.\n * @default 'listItem'\n * @example 'myListItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for an ordered list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting a list item.\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting a list item.\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n orderedList: {\n /**\n * Toggle an ordered list\n * @example editor.commands.toggleOrderedList()\n */\n toggleOrderedList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches an ordered list to a 1. on input (or any number followed by a dot).\n */\nexport const orderedListInputRegex = /^(\\d+)\\.\\s$/\n\n/**\n * This extension allows you to create ordered lists.\n * This requires the ListItem extension\n * @see https://www.tiptap.dev/api/nodes/ordered-list\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const OrderedList = Node.create({\n name: 'orderedList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n addAttributes() {\n return {\n start: {\n default: 1,\n parseHTML: element => {\n return element.hasAttribute('start')\n ? parseInt(element.getAttribute('start') || '', 10)\n : 1\n },\n },\n type: {\n default: null,\n parseHTML: element => element.getAttribute('type'),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'ol',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n const { start, ...attributesWithoutStart } = HTMLAttributes\n\n return start === 1\n ? ['ol', mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0]\n : ['ol', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || !token.ordered) {\n return []\n }\n\n const startValue = token.start || 1\n const content = token.items ? parseListItems(token.items, helpers) : []\n\n if (startValue !== 1) {\n return {\n type: 'orderedList',\n attrs: { start: startValue },\n content,\n }\n }\n\n return {\n type: 'orderedList',\n content,\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'orderedList',\n level: 'block',\n start: (src: string) => {\n const match = src.match(/^(\\s*)(\\d+)\\.\\s+/)\n const index = match?.index\n return index !== undefined ? index : -1\n },\n tokenize: (src: string, _tokens, lexer) => {\n const lines = src.split('\\n')\n const [listItems, consumed] = collectOrderedListItems(lines)\n\n if (listItems.length === 0) {\n return undefined\n }\n\n const items = buildNestedStructure(listItems, 0, lexer)\n\n if (items.length === 0) {\n return undefined\n }\n\n const startValue = listItems[0]?.number || 1\n\n return {\n type: 'list',\n ordered: true,\n start: startValue,\n items,\n raw: lines.slice(0, consumed).join('\\n'),\n } as unknown as object\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleOrderedList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-7': () => this.editor.commands.toggleOrderedList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n getAttributes: match => ({ start: +match[1] }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n","import type {\n JSONContent,\n MarkdownLexerConfiguration,\n MarkdownParseHelpers,\n MarkdownToken,\n} from '@tiptap/core'\n\n/**\n * Matches an ordered list item line with optional leading whitespace.\n * Captures: (1) indentation spaces, (2) item number, (3) content after marker\n * Example matches: \"1. Item\", \" 2. Nested item\", \" 3. Deeply nested\"\n */\nconst ORDERED_LIST_ITEM_REGEX = /^(\\s*)(\\d+)\\.\\s+(.*)$/\n\n/**\n * Matches any line that starts with whitespace (indented content).\n * Used to identify continuation content that belongs to a list item.\n */\nconst INDENTED_LINE_REGEX = /^\\s/\n\n/**\n * Represents a parsed ordered list item with indentation information\n */\nexport interface OrderedListItem {\n indent: number\n number: number\n content: string\n contentLines: string[]\n raw: string\n}\n\nfunction isBlockContentLine(line: string): boolean {\n const trimmedLine = line.trimStart()\n\n return (\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^[-+*]\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^\\d+\\.\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^>\\s?/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^```/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^~~~/.test(trimmedLine)\n )\n}\n\nfunction splitItemContent(contentLines: string[]): {\n paragraphLines: string[]\n blockLines: string[]\n} {\n const paragraphLines: string[] = []\n const blockLines: string[] = []\n let reachedBlockBoundary = false\n\n contentLines.forEach(line => {\n if (reachedBlockBoundary) {\n blockLines.push(line)\n return\n }\n\n if (line.trim() === '') {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n if (paragraphLines.length > 0 && isBlockContentLine(line)) {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n paragraphLines.push(line)\n })\n\n return {\n paragraphLines,\n blockLines,\n }\n}\n\n/**\n * Collects all ordered list items from lines, parsing them into a flat array\n * with indentation information. Stops collecting continuation content when\n * encountering nested list items, allowing them to be processed separately.\n *\n * @param lines - Array of source lines to parse\n * @returns Tuple of [listItems array, number of lines consumed]\n */\nexport function collectOrderedListItems(lines: string[]): [OrderedListItem[], number] {\n const listItems: OrderedListItem[] = []\n let currentLineIndex = 0\n let consumed = 0\n\n while (currentLineIndex < lines.length) {\n const line = lines[currentLineIndex]\n const match = line.match(ORDERED_LIST_ITEM_REGEX)\n\n if (!match) {\n break\n }\n\n const [, indent, number, content] = match\n const indentLevel = indent.length\n const itemContentLines = [content]\n let nextLineIndex = currentLineIndex + 1\n const itemLines = [line]\n let sawBlankLine = false\n\n // Collect continuation lines for this item (but NOT nested list items)\n while (nextLineIndex < lines.length) {\n const nextLine = lines[nextLineIndex]\n const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX)\n\n // If it's another list item (nested or not), stop collecting\n if (nextMatch) {\n break\n }\n\n // Check for continuation content (non-list content)\n if (nextLine.trim() === '') {\n // Empty line\n itemLines.push(nextLine)\n itemContentLines.push('')\n sawBlankLine = true\n nextLineIndex += 1\n } else if (nextLine.match(INDENTED_LINE_REGEX)) {\n // Indented content - part of this item (but not a list item)\n itemLines.push(nextLine)\n itemContentLines.push(nextLine.slice(indentLevel + 2))\n nextLineIndex += 1\n } else {\n if (sawBlankLine) {\n break\n }\n\n itemLines.push(nextLine)\n itemContentLines.push(nextLine)\n nextLineIndex += 1\n }\n }\n\n listItems.push({\n indent: indentLevel,\n number: parseInt(number, 10),\n content: itemContentLines.join('\\n').trim(),\n contentLines: itemContentLines,\n raw: itemLines.join('\\n'),\n })\n\n consumed = nextLineIndex\n currentLineIndex = nextLineIndex\n }\n\n return [listItems, consumed]\n}\n\n/**\n * Recursively builds a nested structure from a flat array of list items\n * based on their indentation levels. Creates proper markdown tokens with\n * nested lists where appropriate.\n *\n * @param items - Flat array of list items with indentation info\n * @param baseIndent - The indentation level to process at this recursion level\n * @param lexer - Markdown lexer for parsing inline and block content\n * @returns Array of list_item tokens with proper nesting\n */\nexport function buildNestedStructure(\n items: OrderedListItem[],\n baseIndent: number,\n lexer: MarkdownLexerConfiguration,\n): unknown[] {\n const result: unknown[] = []\n let currentIndex = 0\n\n while (currentIndex < items.length) {\n const item = items[currentIndex]\n\n if (item.indent === baseIndent) {\n // This item belongs at the current level\n const { paragraphLines, blockLines } = splitItemContent(item.contentLines)\n const mainText = paragraphLines.join('\\n').trim()\n\n const tokens = []\n\n // Always wrap the main text in a paragraph token\n if (mainText) {\n tokens.push({\n type: 'paragraph',\n raw: mainText,\n tokens: lexer.inlineTokens(mainText),\n })\n }\n\n const additionalContent = blockLines.join('\\n').trim()\n if (additionalContent) {\n const blockTokens = lexer.blockTokens(additionalContent)\n tokens.push(...blockTokens)\n }\n\n // Look ahead to find nested items at deeper indent levels\n let lookAheadIndex = currentIndex + 1\n const nestedItems = []\n\n while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) {\n nestedItems.push(items[lookAheadIndex])\n lookAheadIndex += 1\n }\n\n // If we have nested items, recursively build their structure\n if (nestedItems.length > 0) {\n // Find the next indent level (immediate children)\n const nextIndent = Math.min(...nestedItems.map(nestedItem => nestedItem.indent))\n\n // Build the nested list recursively with all nested items\n // The recursive call will handle further nesting\n const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer)\n\n // Create a nested list token\n tokens.push({\n type: 'list',\n ordered: true,\n start: nestedItems[0].number,\n items: nestedListItems,\n raw: nestedItems.map(nestedItem => nestedItem.raw).join('\\n'),\n })\n }\n\n result.push({\n type: 'list_item',\n raw: item.raw,\n tokens,\n })\n\n // Skip the nested items we just processed\n currentIndex = lookAheadIndex\n } else {\n // This item has deeper indent than we're currently processing\n // It should be handled by a recursive call\n currentIndex += 1\n }\n }\n\n return result\n}\n\n/**\n * Parses markdown list item tokens into Tiptap JSONContent structure,\n * ensuring text content is properly wrapped in paragraph nodes.\n *\n * @param items - Array of markdown tokens representing list items\n * @param helpers - Markdown parse helpers for recursive parsing\n * @returns Array of listItem JSONContent nodes\n */\nexport function parseListItems(\n items: MarkdownToken[],\n helpers: MarkdownParseHelpers,\n): JSONContent[] {\n return items.map(item => {\n if (item.type !== 'list_item') {\n return helpers.parseChildren([item])[0]\n }\n\n // Parse the tokens within the list item\n const content: JSONContent[] = []\n\n if (item.tokens && item.tokens.length > 0) {\n item.tokens.forEach(itemToken => {\n // If it's already a proper block node (paragraph, list, etc.), parse it directly\n if (\n itemToken.type === 'paragraph' ||\n itemToken.type === 'list' ||\n itemToken.type === 'blockquote' ||\n itemToken.type === 'code'\n ) {\n content.push(...helpers.parseChildren([itemToken]))\n } else if (itemToken.type === 'text' && itemToken.tokens) {\n // If it's inline text tokens, wrap them in a paragraph\n const inlineContent = helpers.parseChildren([itemToken])\n content.push({\n type: 'paragraph',\n content: inlineContent,\n })\n } else {\n // For any other content, try to parse it\n const parsed = helpers.parseChildren([itemToken])\n if (parsed.length > 0) {\n content.push(...parsed)\n }\n }\n })\n }\n\n return {\n type: 'listItem',\n content,\n }\n })\n}\n","import type { KeyboardShortcutCommand } from '@tiptap/core'\nimport {\n getRenderedAttributes,\n mergeAttributes,\n Node,\n renderNestedMarkdownContent,\n wrappingInputRule,\n} from '@tiptap/core'\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface TaskItemOptions {\n /**\n * A callback function that is called when the checkbox is clicked while the editor is in readonly mode.\n * @param node The prosemirror node of the task item\n * @param checked The new checked state\n * @returns boolean\n */\n onReadOnlyChecked?: (node: ProseMirrorNode, checked: boolean) => boolean\n\n /**\n * Controls whether the task items can be nested or not.\n * @default false\n * @example true\n */\n nested: boolean\n\n /**\n * HTML attributes to add to the task item element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for taskList nodes\n * @default 'taskList'\n * @example 'myCustomTaskList'\n */\n taskListTypeName: string\n\n /**\n * Accessibility options for the task item.\n * @default {}\n * @example\n * ```js\n * {\n * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}`\n * }\n */\n a11y?: {\n checkboxLabel?: (node: ProseMirrorNode, checked: boolean) => string\n }\n}\n\n/**\n * Matches a task item to a - [ ] on input.\n */\nexport const inputRegex = /^\\s*(\\[([( |x])?\\])\\s$/\n\n/**\n * This extension allows you to create task items.\n * @see https://www.tiptap.dev/api/nodes/task-item\n */\nexport const TaskItem = Node.create({\n name: 'taskItem',\n\n addOptions() {\n return {\n nested: false,\n HTMLAttributes: {},\n taskListTypeName: 'taskList',\n a11y: undefined,\n }\n },\n\n content() {\n return this.options.nested ? 'paragraph block*' : 'paragraph+'\n },\n\n defining: true,\n\n addAttributes() {\n return {\n checked: {\n default: false,\n keepOnSplit: false,\n parseHTML: element => {\n const dataChecked = element.getAttribute('data-checked')\n\n return dataChecked === '' || dataChecked === 'true'\n },\n renderHTML: attributes => ({\n 'data-checked': attributes.checked,\n }),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: `li[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ node, HTMLAttributes }) {\n return [\n 'li',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {\n 'data-type': this.name,\n }),\n [\n 'label',\n [\n 'input',\n {\n type: 'checkbox',\n checked: node.attrs.checked ? 'checked' : null,\n },\n ],\n ['span'],\n ],\n ['div', 0],\n ]\n },\n\n parseMarkdown: (token, h) => {\n // Parse the task item's text content into paragraph content\n const content = []\n\n // First, add the main paragraph content\n if (token.tokens && token.tokens.length > 0) {\n // If we have tokens, create a paragraph with the inline content\n content.push(h.createNode('paragraph', {}, h.parseInline(token.tokens)))\n } else if (token.text) {\n // If we have raw text, create a paragraph with text node\n content.push(h.createNode('paragraph', {}, [h.createNode('text', { text: token.text })]))\n } else {\n // Fallback: empty paragraph\n content.push(h.createNode('paragraph', {}, []))\n }\n\n // Then, add any nested content (like nested task lists)\n if (token.nestedTokens && token.nestedTokens.length > 0) {\n const nestedContent = h.parseChildren(token.nestedTokens)\n content.push(...nestedContent)\n }\n\n return h.createNode('taskItem', { checked: token.checked || false }, content)\n },\n\n renderMarkdown: (node, h) => {\n const checkedChar = node.attrs?.checked ? 'x' : ' '\n const prefix = `- [${checkedChar}] `\n\n return renderNestedMarkdownContent(node, h, prefix)\n },\n\n addExtensions() {\n if (!this.options.nested) {\n return []\n }\n\n return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]\n },\n\n addKeyboardShortcuts() {\n const shortcuts: {\n [key: string]: KeyboardShortcutCommand\n } = {\n Enter: () => this.editor.commands.splitListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n\n if (!this.options.nested) {\n return shortcuts\n }\n\n return {\n ...shortcuts,\n Tab: () => this.editor.commands.sinkListItem(this.name),\n }\n },\n\n addNodeView() {\n return ({ node, HTMLAttributes, getPos, editor }) => {\n const listItem = document.createElement('li')\n const checkboxWrapper = document.createElement('label')\n const checkboxStyler = document.createElement('span')\n const checkbox = document.createElement('input')\n const content = document.createElement('div')\n\n const updateA11Y = (currentNode: ProseMirrorNode) => {\n checkbox.ariaLabel =\n this.options.a11y?.checkboxLabel?.(currentNode, checkbox.checked) ||\n `Task item checkbox for ${currentNode.textContent || 'empty task item'}`\n }\n\n updateA11Y(node)\n\n checkboxWrapper.contentEditable = 'false'\n checkbox.type = 'checkbox'\n checkbox.addEventListener('mousedown', event => event.preventDefault())\n checkbox.addEventListener('change', event => {\n // if the editor isn’t editable and we don't have a handler for\n // readonly checks we have to undo the latest change\n if (!editor.isEditable && !this.options.onReadOnlyChecked) {\n checkbox.checked = !checkbox.checked\n\n return\n }\n\n const { checked } = event.target as any\n\n if (editor.isEditable && typeof getPos === 'function') {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .command(({ tr }) => {\n const position = getPos()\n\n if (typeof position !== 'number') {\n return false\n }\n const currentNode = tr.doc.nodeAt(position)\n\n tr.setNodeMarkup(position, undefined, {\n ...currentNode?.attrs,\n checked,\n })\n\n return true\n })\n .run()\n }\n if (!editor.isEditable && this.options.onReadOnlyChecked) {\n // Reset state if onReadOnlyChecked returns false\n if (!this.options.onReadOnlyChecked(node, checked)) {\n checkbox.checked = !checkbox.checked\n }\n }\n })\n\n Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n listItem.dataset.checked = node.attrs.checked\n checkbox.checked = node.attrs.checked\n\n checkboxWrapper.append(checkbox, checkboxStyler)\n listItem.append(checkboxWrapper, content)\n\n Object.entries(HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n // Track the keys of previously rendered HTML attributes for proper removal\n let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes))\n\n return {\n dom: listItem,\n contentDOM: content,\n update: updatedNode => {\n if (updatedNode.type !== this.type) {\n return false\n }\n\n listItem.dataset.checked = updatedNode.attrs.checked\n checkbox.checked = updatedNode.attrs.checked\n updateA11Y(updatedNode)\n\n // Sync all HTML attributes from the updated node\n const extensionAttributes = editor.extensionManager.attributes\n const newHTMLAttributes = getRenderedAttributes(updatedNode, extensionAttributes)\n const newKeys = new Set(Object.keys(newHTMLAttributes))\n\n // Remove attributes that were previously rendered but are no longer present\n // If the attribute exists in static options, restore it instead of removing\n const staticAttrs = this.options.HTMLAttributes\n\n prevRenderedAttributeKeys.forEach(key => {\n if (!newKeys.has(key)) {\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n }\n })\n\n // Update or add new attributes\n Object.entries(newHTMLAttributes).forEach(([key, value]) => {\n if (value === null || value === undefined) {\n // If the attribute exists in static options, restore it instead of removing\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n } else {\n listItem.setAttribute(key, value)\n }\n })\n\n // Update the tracked keys for next update\n prevRenderedAttributeKeys = newKeys\n\n return true\n },\n }\n }\n },\n\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n getAttributes: match => ({\n checked: match[match.length - 1] === 'x',\n }),\n }),\n ]\n },\n})\n","import { mergeAttributes, Node, parseIndentedBlocks } from '@tiptap/core'\n\nexport interface TaskListOptions {\n /**\n * The node type name for a task item.\n * @default 'taskItem'\n * @example 'myCustomTaskItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for a task list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n taskList: {\n /**\n * Toggle a task list\n * @example editor.commands.toggleTaskList()\n */\n toggleTaskList: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to create task lists.\n * @see https://www.tiptap.dev/api/nodes/task-list\n */\nexport const TaskList = Node.create({\n name: 'taskList',\n\n addOptions() {\n return {\n itemTypeName: 'taskItem',\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [\n {\n tag: `ul[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'ul',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }),\n 0,\n ]\n },\n\n parseMarkdown: (token, h) => {\n return h.createNode('taskList', {}, h.parseChildren(token.items || []))\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'taskList',\n level: 'block',\n start(src) {\n // Look for the start of a task list item\n const index = src.match(/^\\s*[-+*]\\s+\\[([ xX])\\]\\s+/)?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, tokens, lexer) {\n // Helper function to recursively parse task lists\n const parseTaskListContent = (content: string): any[] | undefined => {\n const nestedResult = parseIndentedBlocks(\n content,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Allow recursive nesting\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (nestedResult) {\n // Return as task list token\n return [\n {\n type: 'taskList',\n raw: nestedResult.raw,\n items: nestedResult.items,\n },\n ]\n }\n\n // Fall back to regular markdown parsing if not a task list\n return lexer.blockTokens(content)\n }\n\n const result = parseIndentedBlocks(\n src,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Use the recursive parser for nested content\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (!result) {\n return undefined\n }\n\n return {\n type: 'taskList',\n raw: result.raw,\n items: result.items,\n }\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleTaskList:\n () =>\n ({ commands }) => {\n return commands.toggleList(this.name, this.options.itemTypeName)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),\n }\n },\n})\n"],"mappings":";;;;;;;AAAA,SAAS,iBAAiB,MAAM,yBAAyB;AAEzD,IAAM,eAAe;AACrB,IAAM,gBAAgB;AA8Cf,IAAM,uBAAuB;AAQ7B,IAAM,aAAa,KAAK,OAA0B;AAAA,EACvD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,cAAc;AAAA,MACd,gBAAgB,CAAC;AAAA,MACjB,WAAW;AAAA,MACX,gBAAgB;AAAA,IAClB;AAAA,EACF;AAAA,EAEA,OAAO;AAAA,EAEP,UAAU;AACR,WAAO,GAAG,KAAK,QAAQ,YAAY;AAAA,EACrC;AAAA,EAEA,YAAY;AACV,WAAO,CAAC,EAAE,KAAK,KAAK,CAAC;AAAA,EACvB;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO,CAAC,MAAM,gBAAgB,KAAK,QAAQ,gBAAgB,cAAc,GAAG,CAAC;AAAA,EAC/E;AAAA,EAEA,mBAAmB;AAAA,EAEnB,eAAe,CAAC,OAAO,YAAY;AACjC,QAAI,MAAM,SAAS,UAAW,MAAc,SAAS;AACnD,aAAO,CAAC;AAAA,IACV;AAEA,WAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS,MAAM,QAAQ,QAAQ,cAAc,MAAM,KAAK,IAAI,CAAC;AAAA,IAC/D;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,MAAM,MAAM;AAC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L,gBACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,WAAW,KAAK,MAAM,KAAK,QAAQ,YAAY;AAAA,MACjE;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,eAAe,MAAM,KAAK,OAAO,SAAS,eAAe;AAAA,IAC3D;AAAA,EACF;AACF,CAAC;;;AJ1IM,IAAM,UAAUE,WAAU,OAAuB;AAAA,EACtD,MAAM;AAAA,EAEN,gBAAgB;AACd,UAAM,aAAa,CAAC;AAEpB,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,WAAW,UAAU,KAAK,QAAQ,UAAU,CAAC;AAAA,IAC/D;AAEA,QAAI,KAAK,QAAQ,aAAa,OAAO;AACnC,iBAAW,KAAK,SAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC3D;AAEA,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,WAAW,UAAU,KAAK,QAAQ,UAAU,CAAC;AAAA,IAC/D;AAEA,QAAI,KAAK,QAAQ,gBAAgB,OAAO;AACtC,iBAAW,KAAK,YAAY,UAAU,KAAK,QAAQ,WAAW,CAAC;AAAA,IACjE;AAEA,QAAI,KAAK,QAAQ,aAAa,OAAO;AACnC,iBAAW,KAAK,SAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC3D;AAEA,QAAI,KAAK,QAAQ,aAAa,OAAO;AACnC,iBAAW,KAAK,SAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC3D;AAEA,WAAO;AAAA,EACT;AACF,CAAC;","names":["mergeAttributes","Node","handleDelete","Node","mergeAttributes","Extension","isNodeActive","isNodeActive","getNodeType","Extension","Extension","mergeAttributes","Node","wrappingInputRule","ListItemName","TextStyleName","Node","mergeAttributes","wrappingInputRule","mergeAttributes","Node","renderNestedMarkdownContent","wrappingInputRule","Node","mergeAttributes","renderNestedMarkdownContent","wrappingInputRule","mergeAttributes","Node","Extension"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.cjs deleted file mode 100644 index 45bf677..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.cjs +++ /dev/null @@ -1,272 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/item/index.ts -var index_exports = {}; -__export(index_exports, { - ListItem: () => ListItem -}); -module.exports = __toCommonJS(index_exports); - -// src/item/list-item.ts -var import_core2 = require("@tiptap/core"); - -// src/helpers/createBranchingListDeleteKeymap.ts -var import_core = require("@tiptap/core"); - -// src/helpers/hoistBranchingNestedList.ts -var import_model = require("@tiptap/pm/model"); - -// src/helpers/getBranchingNestedListAtCursor.ts -var getBranchingNestedListAtCursor = (state, itemName, wrapperNames) => { - const { selection } = state; - if (!selection.empty) { - return null; - } - const { $from } = selection; - if (!$from.parent.isTextblock) { - return null; - } - if ($from.parentOffset !== $from.parent.content.size) { - return null; - } - let listItemDepth = -1; - for (let depth = $from.depth; depth > 0; depth -= 1) { - if ($from.node(depth).type.name === itemName) { - listItemDepth = depth; - break; - } - } - if (listItemDepth < 0) { - return null; - } - const listItem = $from.node(listItemDepth); - const indexInListItem = $from.index(listItemDepth); - if (indexInListItem + 1 >= listItem.childCount) { - return null; - } - const nextChild = listItem.child(indexInListItem + 1); - if (!wrapperNames.includes(nextChild.type.name)) { - return null; - } - const itemType = state.schema.nodes[itemName]; - let hasBranching = false; - nextChild.forEach((child) => { - if (child.type === itemType && child.childCount > 1) { - hasBranching = true; - } - }); - if (!hasBranching) { - return null; - } - const nodeAfter = state.doc.resolve($from.after()).nodeAfter; - if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) { - return null; - } - const items = []; - nodeAfter.forEach((child) => { - items.push(child); - }); - if (items.length === 0) { - return null; - } - return { - listItemDepth, - nestedList: nodeAfter, - nestedListPos: $from.after(), - insertPos: $from.after(listItemDepth), - items - }; -}; - -// src/helpers/hoistBranchingNestedList.ts -var hoistBranchingNestedList = (state, dispatch, itemName, wrapperNames) => { - const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames); - if (!context) { - return false; - } - const { selection } = state; - const { nestedList, nestedListPos, insertPos, items } = context; - const tr = state.tr; - tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize); - const mappedInsertPos = tr.mapping.map(insertPos); - tr.insert(mappedInsertPos, import_model.Fragment.from(items)); - tr.setSelection(selection.map(tr.doc, tr.mapping)); - if (dispatch) { - dispatch(tr); - } - return true; -}; - -// src/helpers/handleDeleteBranchingNestedList.ts -var handleDeleteBranchingNestedList = (editor, itemName, wrapperNames) => { - return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames); -}; - -// src/helpers/createBranchingListDeleteKeymap.ts -var createBranchingListDeleteKeymap = (itemName, wrapperNames) => { - return import_core.Extension.create({ - name: `${itemName}BranchingDeleteKeymap`, - priority: 101, - addKeyboardShortcuts() { - const handleDelete = () => handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames); - return { - Delete: handleDelete, - "Mod-Delete": handleDelete - }; - } - }); -}; - -// src/item/list-item.ts -function isSameLineOrderedListToken(token) { - var _a, _b; - const nestedToken = (_a = token.tokens) == null ? void 0 : _a[0]; - return Boolean( - token.text && ((_b = token.tokens) == null ? void 0 : _b.length) === 1 && (nestedToken == null ? void 0 : nestedToken.type) === "list" && nestedToken.ordered && nestedToken.raw === token.text - ); -} -function parseSameLineOrderedListText(text, helpers) { - if (helpers.tokenizeInline) { - return helpers.parseInline(helpers.tokenizeInline(text)); - } - return helpers.parseInline([ - { - type: "text", - raw: text, - text - } - ]); -} -var ListItem = import_core2.Node.create({ - name: "listItem", - addOptions() { - return { - HTMLAttributes: {}, - bulletListTypeName: "bulletList", - orderedListTypeName: "orderedList" - }; - }, - content: "paragraph block*", - defining: true, - parseHTML() { - return [ - { - tag: "li" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["li", (0, import_core2.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list_item", - parseMarkdown: (token, helpers) => { - var _a; - if (token.type !== "list_item") { - return []; - } - const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren; - let content = []; - if (token.tokens && token.tokens.length > 0) { - if (isSameLineOrderedListToken(token)) { - return { - type: "listItem", - content: [ - { - type: "paragraph", - content: parseSameLineOrderedListText(token.text || "", helpers) - } - ] - }; - } - const hasParagraphTokens = token.tokens.some((t) => t.type === "paragraph"); - if (hasParagraphTokens) { - content = parseBlockChildren(token.tokens); - } else { - const firstToken = token.tokens[0]; - if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) { - const inlineContent = helpers.parseInline(firstToken.tokens); - content = [ - { - type: "paragraph", - content: inlineContent - } - ]; - if (token.tokens.length > 1) { - const remainingTokens = token.tokens.slice(1); - const additionalContent = parseBlockChildren(remainingTokens); - content.push(...additionalContent); - } - } else { - content = parseBlockChildren(token.tokens); - } - } - } - if (content.length === 0) { - content = [ - { - type: "paragraph", - content: [] - } - ]; - } - return { - type: "listItem", - content - }; - }, - renderMarkdown: (node, h, ctx) => { - return (0, import_core2.renderNestedMarkdownContent)( - node, - h, - (context) => { - var _a, _b; - if (context.parentType === "bulletList") { - return "- "; - } - if (context.parentType === "orderedList") { - const start = ((_b = (_a = context.meta) == null ? void 0 : _a.parentAttrs) == null ? void 0 : _b.start) || 1; - return `${start + context.index}. `; - } - return "- "; - }, - ctx - ); - }, - addExtensions() { - return [ - createBranchingListDeleteKeymap(this.name, [ - this.options.bulletListTypeName, - this.options.orderedListTypeName - ]) - ]; - }, - addKeyboardShortcuts() { - return { - Enter: () => this.editor.commands.splitListItem(this.name), - Tab: () => this.editor.commands.sinkListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ListItem -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.cjs.map deleted file mode 100644 index 8be2872..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/item/index.ts","../../src/item/list-item.ts","../../src/helpers/createBranchingListDeleteKeymap.ts","../../src/helpers/hoistBranchingNestedList.ts","../../src/helpers/getBranchingNestedListAtCursor.ts","../../src/helpers/handleDeleteBranchingNestedList.ts"],"sourcesContent":["export * from './list-item.js'\n","import type { JSONContent, MarkdownParseHelpers, MarkdownToken } from '@tiptap/core'\nimport { mergeAttributes, Node, renderNestedMarkdownContent } from '@tiptap/core'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface ListItemOptions {\n /**\n * The HTML attributes for a list item node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for bulletList nodes\n * @default 'bulletList'\n * @example 'myCustomBulletList'\n */\n bulletListTypeName: string\n\n /**\n * The node type for orderedList nodes\n * @default 'orderedList'\n * @example 'myCustomOrderedList'\n */\n orderedListTypeName: string\n}\n\nfunction isSameLineOrderedListToken(token: MarkdownToken): boolean {\n const nestedToken = token.tokens?.[0]\n\n return Boolean(\n token.text &&\n token.tokens?.length === 1 &&\n nestedToken?.type === 'list' &&\n nestedToken.ordered &&\n nestedToken.raw === token.text,\n )\n}\n\nfunction parseSameLineOrderedListText(text: string, helpers: MarkdownParseHelpers): JSONContent[] {\n if (helpers.tokenizeInline) {\n return helpers.parseInline(helpers.tokenizeInline(text))\n }\n\n return helpers.parseInline([\n {\n type: 'text',\n raw: text,\n text,\n },\n ])\n}\n\n/**\n * This extension allows you to create list items.\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const ListItem = Node.create({\n name: 'listItem',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n bulletListTypeName: 'bulletList',\n orderedListTypeName: 'orderedList',\n }\n },\n\n content: 'paragraph block*',\n\n defining: true,\n\n parseHTML() {\n return [\n {\n tag: 'li',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list_item',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list_item') {\n return []\n }\n\n const parseBlockChildren = helpers.parseBlockChildren ?? helpers.parseChildren\n let content: any[] = []\n\n if (token.tokens && token.tokens.length > 0) {\n if (isSameLineOrderedListToken(token)) {\n return {\n type: 'listItem',\n content: [\n {\n type: 'paragraph',\n content: parseSameLineOrderedListText(token.text || '', helpers),\n },\n ],\n }\n }\n\n // Check if we have paragraph tokens (complex list items)\n const hasParagraphTokens = token.tokens.some(t => t.type === 'paragraph')\n\n if (hasParagraphTokens) {\n // If we have paragraph tokens, parse them as block elements\n content = parseBlockChildren(token.tokens)\n } else {\n // Check if the first token is a text token with nested inline tokens\n const firstToken = token.tokens[0]\n\n if (\n firstToken &&\n firstToken.type === 'text' &&\n firstToken.tokens &&\n firstToken.tokens.length > 0\n ) {\n // Parse the inline content from the text token\n const inlineContent = helpers.parseInline(firstToken.tokens)\n\n // Start with the paragraph containing the inline content\n content = [\n {\n type: 'paragraph',\n content: inlineContent,\n },\n ]\n\n // If there are additional tokens after the first text token (like nested lists),\n // parse them as block elements and add them\n if (token.tokens.length > 1) {\n const remainingTokens = token.tokens.slice(1)\n const additionalContent = parseBlockChildren(remainingTokens)\n content.push(...additionalContent)\n }\n } else {\n // Fallback: parse all tokens as block elements\n content = parseBlockChildren(token.tokens)\n }\n }\n }\n\n // Ensure we always have at least an empty paragraph\n if (content.length === 0) {\n content = [\n {\n type: 'paragraph',\n content: [],\n },\n ]\n }\n\n return {\n type: 'listItem',\n content,\n }\n },\n\n renderMarkdown: (node, h, ctx) => {\n return renderNestedMarkdownContent(\n node,\n h,\n (context: any) => {\n if (context.parentType === 'bulletList') {\n return '- '\n }\n if (context.parentType === 'orderedList') {\n const start = context.meta?.parentAttrs?.start || 1\n return `${start + context.index}. `\n }\n // Fallback to bullet list for unknown parent types\n return '- '\n },\n ctx,\n )\n },\n\n addExtensions() {\n return [\n createBranchingListDeleteKeymap(this.name, [\n this.options.bulletListTypeName,\n this.options.orderedListTypeName,\n ]),\n ]\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => this.editor.commands.splitListItem(this.name),\n Tab: () => this.editor.commands.sinkListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n },\n})\n","import { Extension } from '@tiptap/core'\n\nimport { handleDeleteBranchingNestedList } from './handleDeleteBranchingNestedList.js'\n\n/**\n * Creates a high-priority keymap extension that handles Delete for branching nested lists.\n * Kept separate from the list item node so Enter/Tab shortcuts keep their default priority.\n */\nexport const createBranchingListDeleteKeymap = (itemName: string, wrapperNames: string[]) => {\n return Extension.create({\n name: `${itemName}BranchingDeleteKeymap`,\n priority: 101,\n\n addKeyboardShortcuts() {\n const handleDelete = () =>\n handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames)\n\n return {\n Delete: handleDelete,\n 'Mod-Delete': handleDelete,\n }\n },\n })\n}\n","import { Fragment } from '@tiptap/pm/model'\nimport type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { getBranchingNestedListAtCursor } from './getBranchingNestedListAtCursor.js'\n\n/**\n * Hoists all list items from a branching nested list after the cursor into the parent list.\n *\n * Use this when `joinForward` cannot restructure a nested list that contains list items\n * with sublists (see issue #6906).\n *\n * @param state - The editor state to transform.\n * @param dispatch - Optional dispatch function for the transaction.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * // Cursor at the end of \"Item 1\" before a nested list with branching items.\n * hoistBranchingNestedList(editor.state, editor.view.dispatch, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n * ```\n */\nexport const hoistBranchingNestedList = (\n state: EditorState,\n dispatch: ((tr: Transaction) => void) | undefined,\n itemName: string,\n wrapperNames: string[],\n) => {\n const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames)\n\n if (!context) {\n return false\n }\n\n const { selection } = state\n const { nestedList, nestedListPos, insertPos, items } = context\n const tr = state.tr\n\n tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize)\n\n const mappedInsertPos = tr.mapping.map(insertPos)\n\n tr.insert(mappedInsertPos, Fragment.from(items))\n\n tr.setSelection(selection.map(tr.doc, tr.mapping))\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport type BranchingNestedListAtCursor = {\n listItemDepth: number\n nestedList: Node\n nestedListPos: number\n insertPos: number\n items: Node[]\n}\n\n/**\n * Resolves a branching nested list immediately after the cursor when the selection is\n * collapsed at the end of a textblock inside a list item.\n *\n * @param state - The editor state to inspect.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns Resolved positions and nodes for hoisting, or `null` when not applicable.\n *\n * @example\n * ```ts\n * const context = getBranchingNestedListAtCursor(editor.state, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n *\n * if (context) {\n * // cursor is at the end of Item 1 before a branching nested sublist\n * }\n * ```\n */\nexport const getBranchingNestedListAtCursor = (\n state: EditorState,\n itemName: string,\n wrapperNames: string[],\n): BranchingNestedListAtCursor | null => {\n const { selection } = state\n\n if (!selection.empty) {\n return null\n }\n\n const { $from } = selection\n\n if (!$from.parent.isTextblock) {\n return null\n }\n\n if ($from.parentOffset !== $from.parent.content.size) {\n return null\n }\n\n let listItemDepth = -1\n\n for (let depth = $from.depth; depth > 0; depth -= 1) {\n if ($from.node(depth).type.name === itemName) {\n listItemDepth = depth\n break\n }\n }\n\n if (listItemDepth < 0) {\n return null\n }\n\n const listItem = $from.node(listItemDepth)\n const indexInListItem = $from.index(listItemDepth)\n\n if (indexInListItem + 1 >= listItem.childCount) {\n return null\n }\n\n const nextChild = listItem.child(indexInListItem + 1)\n\n if (!wrapperNames.includes(nextChild.type.name)) {\n return null\n }\n\n const itemType = state.schema.nodes[itemName]\n let hasBranching = false\n\n nextChild.forEach(child => {\n if (child.type === itemType && child.childCount > 1) {\n hasBranching = true\n }\n })\n\n if (!hasBranching) {\n return null\n }\n\n const nodeAfter = state.doc.resolve($from.after()).nodeAfter\n\n if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) {\n return null\n }\n\n const items: Node[] = []\n\n nodeAfter.forEach(child => {\n items.push(child)\n })\n\n if (items.length === 0) {\n return null\n }\n\n return {\n listItemDepth,\n nestedList: nodeAfter,\n nestedListPos: $from.after(),\n insertPos: $from.after(listItemDepth),\n items,\n }\n}\n","import type { Editor } from '@tiptap/core'\n\nimport { hoistBranchingNestedList } from './hoistBranchingNestedList.js'\n\n/**\n * Handles Delete for a list item when a branching nested sublist follows the cursor.\n *\n * @param editor - The editor instance whose state should be updated.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * Delete: () =>\n * handleDeleteBranchingNestedList(editor, 'listItem', ['bulletList', 'orderedList']),\n * ```\n */\nexport const handleDeleteBranchingNestedList = (\n editor: Editor,\n itemName: string,\n wrapperNames: string[],\n) => {\n return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,IAAAA,eAAmE;;;ACDnE,kBAA0B;;;ACA1B,mBAAyB;;;ACgClB,IAAM,iCAAiC,CAC5C,OACA,UACA,iBACuC;AACvC,QAAM,EAAE,UAAU,IAAI;AAEtB,MAAI,CAAC,UAAU,OAAO;AACpB,WAAO;AAAA,EACT;AAEA,QAAM,EAAE,MAAM,IAAI;AAElB,MAAI,CAAC,MAAM,OAAO,aAAa;AAC7B,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,iBAAiB,MAAM,OAAO,QAAQ,MAAM;AACpD,WAAO;AAAA,EACT;AAEA,MAAI,gBAAgB;AA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AA,EACF;AACF,CAAC;","names":["import_core"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.d.cts deleted file mode 100644 index c066faa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.d.cts +++ /dev/null @@ -1,29 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface ListItemOptions { - /** - * The HTML attributes for a list item node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for bulletList nodes - * @default 'bulletList' - * @example 'myCustomBulletList' - */ - bulletListTypeName: string; - /** - * The node type for orderedList nodes - * @default 'orderedList' - * @example 'myCustomOrderedList' - */ - orderedListTypeName: string; -} -/** - * This extension allows you to create list items. - * @see https://www.tiptap.dev/api/nodes/list-item - */ -declare const ListItem: Node; - -export { ListItem, type ListItemOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.d.ts deleted file mode 100644 index c066faa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface ListItemOptions { - /** - * The HTML attributes for a list item node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for bulletList nodes - * @default 'bulletList' - * @example 'myCustomBulletList' - */ - bulletListTypeName: string; - /** - * The node type for orderedList nodes - * @default 'orderedList' - * @example 'myCustomOrderedList' - */ - orderedListTypeName: string; -} -/** - * This extension allows you to create list items. - * @see https://www.tiptap.dev/api/nodes/list-item - */ -declare const ListItem: Node; - -export { ListItem, type ListItemOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.js deleted file mode 100644 index 7173727..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.js +++ /dev/null @@ -1,245 +0,0 @@ -// src/item/list-item.ts -import { mergeAttributes, Node, renderNestedMarkdownContent } from "@tiptap/core"; - -// src/helpers/createBranchingListDeleteKeymap.ts -import { Extension } from "@tiptap/core"; - -// src/helpers/hoistBranchingNestedList.ts -import { Fragment } from "@tiptap/pm/model"; - -// src/helpers/getBranchingNestedListAtCursor.ts -var getBranchingNestedListAtCursor = (state, itemName, wrapperNames) => { - const { selection } = state; - if (!selection.empty) { - return null; - } - const { $from } = selection; - if (!$from.parent.isTextblock) { - return null; - } - if ($from.parentOffset !== $from.parent.content.size) { - return null; - } - let listItemDepth = -1; - for (let depth = $from.depth; depth > 0; depth -= 1) { - if ($from.node(depth).type.name === itemName) { - listItemDepth = depth; - break; - } - } - if (listItemDepth < 0) { - return null; - } - const listItem = $from.node(listItemDepth); - const indexInListItem = $from.index(listItemDepth); - if (indexInListItem + 1 >= listItem.childCount) { - return null; - } - const nextChild = listItem.child(indexInListItem + 1); - if (!wrapperNames.includes(nextChild.type.name)) { - return null; - } - const itemType = state.schema.nodes[itemName]; - let hasBranching = false; - nextChild.forEach((child) => { - if (child.type === itemType && child.childCount > 1) { - hasBranching = true; - } - }); - if (!hasBranching) { - return null; - } - const nodeAfter = state.doc.resolve($from.after()).nodeAfter; - if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) { - return null; - } - const items = []; - nodeAfter.forEach((child) => { - items.push(child); - }); - if (items.length === 0) { - return null; - } - return { - listItemDepth, - nestedList: nodeAfter, - nestedListPos: $from.after(), - insertPos: $from.after(listItemDepth), - items - }; -}; - -// src/helpers/hoistBranchingNestedList.ts -var hoistBranchingNestedList = (state, dispatch, itemName, wrapperNames) => { - const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames); - if (!context) { - return false; - } - const { selection } = state; - const { nestedList, nestedListPos, insertPos, items } = context; - const tr = state.tr; - tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize); - const mappedInsertPos = tr.mapping.map(insertPos); - tr.insert(mappedInsertPos, Fragment.from(items)); - tr.setSelection(selection.map(tr.doc, tr.mapping)); - if (dispatch) { - dispatch(tr); - } - return true; -}; - -// src/helpers/handleDeleteBranchingNestedList.ts -var handleDeleteBranchingNestedList = (editor, itemName, wrapperNames) => { - return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames); -}; - -// src/helpers/createBranchingListDeleteKeymap.ts -var createBranchingListDeleteKeymap = (itemName, wrapperNames) => { - return Extension.create({ - name: `${itemName}BranchingDeleteKeymap`, - priority: 101, - addKeyboardShortcuts() { - const handleDelete = () => handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames); - return { - Delete: handleDelete, - "Mod-Delete": handleDelete - }; - } - }); -}; - -// src/item/list-item.ts -function isSameLineOrderedListToken(token) { - var _a, _b; - const nestedToken = (_a = token.tokens) == null ? void 0 : _a[0]; - return Boolean( - token.text && ((_b = token.tokens) == null ? void 0 : _b.length) === 1 && (nestedToken == null ? void 0 : nestedToken.type) === "list" && nestedToken.ordered && nestedToken.raw === token.text - ); -} -function parseSameLineOrderedListText(text, helpers) { - if (helpers.tokenizeInline) { - return helpers.parseInline(helpers.tokenizeInline(text)); - } - return helpers.parseInline([ - { - type: "text", - raw: text, - text - } - ]); -} -var ListItem = Node.create({ - name: "listItem", - addOptions() { - return { - HTMLAttributes: {}, - bulletListTypeName: "bulletList", - orderedListTypeName: "orderedList" - }; - }, - content: "paragraph block*", - defining: true, - parseHTML() { - return [ - { - tag: "li" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["li", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list_item", - parseMarkdown: (token, helpers) => { - var _a; - if (token.type !== "list_item") { - return []; - } - const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren; - let content = []; - if (token.tokens && token.tokens.length > 0) { - if (isSameLineOrderedListToken(token)) { - return { - type: "listItem", - content: [ - { - type: "paragraph", - content: parseSameLineOrderedListText(token.text || "", helpers) - } - ] - }; - } - const hasParagraphTokens = token.tokens.some((t) => t.type === "paragraph"); - if (hasParagraphTokens) { - content = parseBlockChildren(token.tokens); - } else { - const firstToken = token.tokens[0]; - if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) { - const inlineContent = helpers.parseInline(firstToken.tokens); - content = [ - { - type: "paragraph", - content: inlineContent - } - ]; - if (token.tokens.length > 1) { - const remainingTokens = token.tokens.slice(1); - const additionalContent = parseBlockChildren(remainingTokens); - content.push(...additionalContent); - } - } else { - content = parseBlockChildren(token.tokens); - } - } - } - if (content.length === 0) { - content = [ - { - type: "paragraph", - content: [] - } - ]; - } - return { - type: "listItem", - content - }; - }, - renderMarkdown: (node, h, ctx) => { - return renderNestedMarkdownContent( - node, - h, - (context) => { - var _a, _b; - if (context.parentType === "bulletList") { - return "- "; - } - if (context.parentType === "orderedList") { - const start = ((_b = (_a = context.meta) == null ? void 0 : _a.parentAttrs) == null ? void 0 : _b.start) || 1; - return `${start + context.index}. `; - } - return "- "; - }, - ctx - ); - }, - addExtensions() { - return [ - createBranchingListDeleteKeymap(this.name, [ - this.options.bulletListTypeName, - this.options.orderedListTypeName - ]) - ]; - }, - addKeyboardShortcuts() { - return { - Enter: () => this.editor.commands.splitListItem(this.name), - Tab: () => this.editor.commands.sinkListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - } -}); -export { - ListItem -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.js.map deleted file mode 100644 index 8e7fba0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/item/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/item/list-item.ts","../../src/helpers/createBranchingListDeleteKeymap.ts","../../src/helpers/hoistBranchingNestedList.ts","../../src/helpers/getBranchingNestedListAtCursor.ts","../../src/helpers/handleDeleteBranchingNestedList.ts"],"sourcesContent":["import type { JSONContent, MarkdownParseHelpers, MarkdownToken } from '@tiptap/core'\nimport { mergeAttributes, Node, renderNestedMarkdownContent } from '@tiptap/core'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface ListItemOptions {\n /**\n * The HTML attributes for a list item node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for bulletList nodes\n * @default 'bulletList'\n * @example 'myCustomBulletList'\n */\n bulletListTypeName: string\n\n /**\n * The node type for orderedList nodes\n * @default 'orderedList'\n * @example 'myCustomOrderedList'\n */\n orderedListTypeName: string\n}\n\nfunction isSameLineOrderedListToken(token: MarkdownToken): boolean {\n const nestedToken = token.tokens?.[0]\n\n return Boolean(\n token.text &&\n token.tokens?.length === 1 &&\n nestedToken?.type === 'list' &&\n nestedToken.ordered &&\n nestedToken.raw === token.text,\n )\n}\n\nfunction parseSameLineOrderedListText(text: string, helpers: MarkdownParseHelpers): JSONContent[] {\n if (helpers.tokenizeInline) {\n return helpers.parseInline(helpers.tokenizeInline(text))\n }\n\n return helpers.parseInline([\n {\n type: 'text',\n raw: text,\n text,\n },\n ])\n}\n\n/**\n * This extension allows you to create list items.\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const ListItem = Node.create({\n name: 'listItem',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n bulletListTypeName: 'bulletList',\n orderedListTypeName: 'orderedList',\n }\n },\n\n content: 'paragraph block*',\n\n defining: true,\n\n parseHTML() {\n return [\n {\n tag: 'li',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list_item',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list_item') {\n return []\n }\n\n const parseBlockChildren = helpers.parseBlockChildren ?? helpers.parseChildren\n let content: any[] = []\n\n if (token.tokens && token.tokens.length > 0) {\n if (isSameLineOrderedListToken(token)) {\n return {\n type: 'listItem',\n content: [\n {\n type: 'paragraph',\n content: parseSameLineOrderedListText(token.text || '', helpers),\n },\n ],\n }\n }\n\n // Check if we have paragraph tokens (complex list items)\n const hasParagraphTokens = token.tokens.some(t => t.type === 'paragraph')\n\n if (hasParagraphTokens) {\n // If we have paragraph tokens, parse them as block elements\n content = parseBlockChildren(token.tokens)\n } else {\n // Check if the first token is a text token with nested inline tokens\n const firstToken = token.tokens[0]\n\n if (\n firstToken &&\n firstToken.type === 'text' &&\n firstToken.tokens &&\n firstToken.tokens.length > 0\n ) {\n // Parse the inline content from the text token\n const inlineContent = helpers.parseInline(firstToken.tokens)\n\n // Start with the paragraph containing the inline content\n content = [\n {\n type: 'paragraph',\n content: inlineContent,\n },\n ]\n\n // If there are additional tokens after the first text token (like nested lists),\n // parse them as block elements and add them\n if (token.tokens.length > 1) {\n const remainingTokens = token.tokens.slice(1)\n const additionalContent = parseBlockChildren(remainingTokens)\n content.push(...additionalContent)\n }\n } else {\n // Fallback: parse all tokens as block elements\n content = parseBlockChildren(token.tokens)\n }\n }\n }\n\n // Ensure we always have at least an empty paragraph\n if (content.length === 0) {\n content = [\n {\n type: 'paragraph',\n content: [],\n },\n ]\n }\n\n return {\n type: 'listItem',\n content,\n }\n },\n\n renderMarkdown: (node, h, ctx) => {\n return renderNestedMarkdownContent(\n node,\n h,\n (context: any) => {\n if (context.parentType === 'bulletList') {\n return '- '\n }\n if (context.parentType === 'orderedList') {\n const start = context.meta?.parentAttrs?.start || 1\n return `${start + context.index}. `\n }\n // Fallback to bullet list for unknown parent types\n return '- '\n },\n ctx,\n )\n },\n\n addExtensions() {\n return [\n createBranchingListDeleteKeymap(this.name, [\n this.options.bulletListTypeName,\n this.options.orderedListTypeName,\n ]),\n ]\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => this.editor.commands.splitListItem(this.name),\n Tab: () => this.editor.commands.sinkListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n },\n})\n","import { Extension } from '@tiptap/core'\n\nimport { handleDeleteBranchingNestedList } from './handleDeleteBranchingNestedList.js'\n\n/**\n * Creates a high-priority keymap extension that handles Delete for branching nested lists.\n * Kept separate from the list item node so Enter/Tab shortcuts keep their default priority.\n */\nexport const createBranchingListDeleteKeymap = (itemName: string, wrapperNames: string[]) => {\n return Extension.create({\n name: `${itemName}BranchingDeleteKeymap`,\n priority: 101,\n\n addKeyboardShortcuts() {\n const handleDelete = () =>\n handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames)\n\n return {\n Delete: handleDelete,\n 'Mod-Delete': handleDelete,\n }\n },\n })\n}\n","import { Fragment } from '@tiptap/pm/model'\nimport type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { getBranchingNestedListAtCursor } from './getBranchingNestedListAtCursor.js'\n\n/**\n * Hoists all list items from a branching nested list after the cursor into the parent list.\n *\n * Use this when `joinForward` cannot restructure a nested list that contains list items\n * with sublists (see issue #6906).\n *\n * @param state - The editor state to transform.\n * @param dispatch - Optional dispatch function for the transaction.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * // Cursor at the end of \"Item 1\" before a nested list with branching items.\n * hoistBranchingNestedList(editor.state, editor.view.dispatch, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n * ```\n */\nexport const hoistBranchingNestedList = (\n state: EditorState,\n dispatch: ((tr: Transaction) => void) | undefined,\n itemName: string,\n wrapperNames: string[],\n) => {\n const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames)\n\n if (!context) {\n return false\n }\n\n const { selection } = state\n const { nestedList, nestedListPos, insertPos, items } = context\n const tr = state.tr\n\n tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize)\n\n const mappedInsertPos = tr.mapping.map(insertPos)\n\n tr.insert(mappedInsertPos, Fragment.from(items))\n\n tr.setSelection(selection.map(tr.doc, tr.mapping))\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport type BranchingNestedListAtCursor = {\n listItemDepth: number\n nestedList: Node\n nestedListPos: number\n insertPos: number\n items: Node[]\n}\n\n/**\n * Resolves a branching nested list immediately after the cursor when the selection is\n * collapsed at the end of a textblock inside a list item.\n *\n * @param state - The editor state to inspect.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns Resolved positions and nodes for hoisting, or `null` when not applicable.\n *\n * @example\n * ```ts\n * const context = getBranchingNestedListAtCursor(editor.state, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n *\n * if (context) {\n * // cursor is at the end of Item 1 before a branching nested sublist\n * }\n * ```\n */\nexport const getBranchingNestedListAtCursor = (\n state: EditorState,\n itemName: string,\n wrapperNames: string[],\n): BranchingNestedListAtCursor | null => {\n const { selection } = state\n\n if (!selection.empty) {\n return null\n }\n\n const { $from } = selection\n\n if (!$from.parent.isTextblock) {\n return null\n }\n\n if ($from.parentOffset !== $from.parent.content.size) {\n return null\n }\n\n let listItemDepth = -1\n\n for (let depth = $from.depth; depth > 0; depth -= 1) {\n if ($from.node(depth).type.name === itemName) {\n listItemDepth = depth\n break\n }\n }\n\n if (listItemDepth < 0) {\n return null\n }\n\n const listItem = $from.node(listItemDepth)\n const indexInListItem = $from.index(listItemDepth)\n\n if (indexInListItem + 1 >= listItem.childCount) {\n return null\n }\n\n const nextChild = listItem.child(indexInListItem + 1)\n\n if (!wrapperNames.includes(nextChild.type.name)) {\n return null\n }\n\n const itemType = state.schema.nodes[itemName]\n let hasBranching = false\n\n nextChild.forEach(child => {\n if (child.type === itemType && child.childCount > 1) {\n hasBranching = true\n }\n })\n\n if (!hasBranching) {\n return null\n }\n\n const nodeAfter = state.doc.resolve($from.after()).nodeAfter\n\n if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) {\n return null\n }\n\n const items: Node[] = []\n\n nodeAfter.forEach(child => {\n items.push(child)\n })\n\n if (items.length === 0) {\n return null\n }\n\n return {\n listItemDepth,\n nestedList: nodeAfter,\n nestedListPos: $from.after(),\n insertPos: $from.after(listItemDepth),\n items,\n }\n}\n","import type { Editor } from '@tiptap/core'\n\nimport { hoistBranchingNestedList } from './hoistBranchingNestedList.js'\n\n/**\n * Handles Delete for a list item when a branching nested sublist follows the cursor.\n *\n * @param editor - The editor instance whose state should be updated.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * Delete: () =>\n * handleDeleteBranchingNestedList(editor, 'listItem', ['bulletList', 'orderedList']),\n * ```\n */\nexport const handleDeleteBranchingNestedList = (\n editor: Editor,\n itemName: string,\n wrapperNames: string[],\n) => {\n return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames)\n}\n"],"mappings":";AACA,SAAS,iBAAiB,MAAM,mCAAmC;;;ACDnE,SAAS,iBAAiB;;;ACA1B,SAAS,gBAAgB;;;ACgClB,IAAM,iCAAiC,CAC5C,OACA,UACA,iBACuC;AACvC,QAAM,EAAE,UAAU,IAAI;AAEtB,MAAI,CAAC,UAAU,OAAO;AACpB,WAAO;AAAA,EACT;AAEA,QAAM,EAAE,MAAM,IAAI;AAElB,MAAI,CAAC,MAAM,OAAO,aAAa;AAC7B,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,iBAAiB,MAAM,OAAO,QAAQ,MAAM;AACpD,WAAO;AAAA,EACT;AAEA,MAAI,gBAAgB;AAEpB,WAAS,QAAQ,MAAM,OAAO,QAAQ,GAAG,SAAS,GAAG;AACnD,QAAI,MAAM,KAAK,KAAK,EAAE,KAAK,SAAS,UAAU;AAC5C,sBAAgB;AAChB;AAAA,IACF;AAAA,EACF;AAEA,MAAI,gBAAgB,GAAG;AACrB,WAAO;AAAA,EACT;AAEA,QAAM,WAAW,MAAM,KAAK,aAAa;AACzC,QAAM,kBAAkB,MAAM,MAAM,aAAa;A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F;AAAA,IACF;AAGA,QAAI,QAAQ,WAAW,GAAG;AACxB,gBAAU;AAAA,QACR;AAAA,UACE,MAAM;AAAA,UACN,SAAS,CAAC;AAAA,QACZ;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,MACL,MAAM;AAAA,MACN;AAAA,IACF;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,MAAM,GAAG,QAAQ;AAChC,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,CAAC,YAAiB;AAzKxB;AA0KQ,YAAI,QAAQ,eAAe,cAAc;AACvC,iBAAO;AAAA,QACT;AACA,YAAI,QAAQ,eAAe,eAAe;AACxC,gBAAM,UAAQ,mBAAQ,SAAR,mBAAc,gBAAd,mBAA2B,UAAS;AAClD,iBAAO,GAAG,QAAQ,QAAQ,KAAK;AAAA,QACjC;AAEA,eAAO;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,MACL,gCAAgC,KAAK,MAAM;AAAA,QACzC,KAAK,QAAQ;AAAA,QACb,KAAK,QAAQ;AAAA,MACf,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,OAAO,MAAM,KAAK,OAAO,SAAS,cAAc,KAAK,IAAI;AAAA,MACzD,KAAK,MAAM,KAAK,OAAO,SAAS,aAAa,KAAK,IAAI;AAAA,MACtD,aAAa,MAAM,KAAK,OAAO,SAAS,aAAa,KAAK,IAAI;AAAA,IAChE;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.cjs deleted file mode 100644 index 8b325ce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.cjs +++ /dev/null @@ -1,298 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/keymap/index.ts -var index_exports = {}; -__export(index_exports, { - ListKeymap: () => ListKeymap, - listHelpers: () => listHelpers_exports -}); -module.exports = __toCommonJS(index_exports); - -// src/keymap/list-keymap.ts -var import_core6 = require("@tiptap/core"); - -// src/keymap/listHelpers/index.ts -var listHelpers_exports = {}; -__export(listHelpers_exports, { - findListItemPos: () => findListItemPos, - getNextListDepth: () => getNextListDepth, - handleBackspace: () => handleBackspace, - handleDelete: () => handleDelete, - hasListBefore: () => hasListBefore, - hasListItemAfter: () => hasListItemAfter, - hasListItemBefore: () => hasListItemBefore, - listItemHasSubList: () => listItemHasSubList, - nextListIsDeeper: () => nextListIsDeeper, - nextListIsHigher: () => nextListIsHigher -}); - -// src/keymap/listHelpers/findListItemPos.ts -var import_core = require("@tiptap/core"); -var findListItemPos = (typeOrName, state) => { - const { $from } = state.selection; - const nodeType = (0, import_core.getNodeType)(typeOrName, state.schema); - let currentNode = null; - let currentDepth = $from.depth; - let currentPos = $from.pos; - let targetDepth = null; - while (currentDepth > 0 && targetDepth === null) { - currentNode = $from.node(currentDepth); - if (currentNode.type === nodeType) { - targetDepth = currentDepth; - } else { - currentDepth -= 1; - currentPos -= 1; - } - } - if (targetDepth === null) { - return null; - } - return { $pos: state.doc.resolve(currentPos), depth: targetDepth }; -}; - -// src/keymap/listHelpers/getNextListDepth.ts -var import_core2 = require("@tiptap/core"); -var getNextListDepth = (typeOrName, state) => { - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos) { - return false; - } - const [, depth] = (0, import_core2.getNodeAtPosition)(state, typeOrName, listItemPos.$pos.pos + 4); - return depth; -}; - -// src/keymap/listHelpers/handleBackspace.ts -var import_core3 = require("@tiptap/core"); - -// src/keymap/listHelpers/hasListBefore.ts -var hasListBefore = (editorState, name, parentListTypes) => { - const { $anchor } = editorState.selection; - const previousNodePos = Math.max(0, $anchor.pos - 2); - const previousNode = editorState.doc.resolve(previousNodePos).node(); - if (!previousNode || !parentListTypes.includes(previousNode.type.name)) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/handleBackspace.ts -var handleBackspace = (editor, name, parentListTypes) => { - if (editor.commands.undoInputRule()) { - return true; - } - if (editor.state.selection.from !== editor.state.selection.to) { - return false; - } - if (!(0, import_core3.isNodeActive)(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) { - const { $anchor } = editor.state.selection; - const $listPos = editor.state.doc.resolve($anchor.before() - 1); - const listDescendants = []; - $listPos.node().descendants((node, pos) => { - if (node.type.name === name) { - listDescendants.push({ node, pos }); - } - }); - const lastItem = listDescendants.at(-1); - if (!lastItem) { - return false; - } - const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1); - return editor.chain().cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end()).joinForward().run(); - } - if (!(0, import_core3.isNodeActive)(editor.state, name)) { - return false; - } - if (!(0, import_core3.isAtStartOfNode)(editor.state)) { - return false; - } - return editor.chain().liftListItem(name).run(); -}; - -// src/keymap/listHelpers/handleDelete.ts -var import_core4 = require("@tiptap/core"); - -// src/keymap/listHelpers/nextListIsDeeper.ts -var nextListIsDeeper = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth > listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/nextListIsHigher.ts -var nextListIsHigher = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth < listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/handleDelete.ts -var handleDelete = (editor, name) => { - if (!(0, import_core4.isNodeActive)(editor.state, name)) { - return false; - } - if (!(0, import_core4.isAtEndOfNode)(editor.state, name)) { - return false; - } - const { selection } = editor.state; - const { $from, $to } = selection; - if (!selection.empty && $from.sameParent($to)) { - return false; - } - if (nextListIsDeeper(name, editor.state)) { - return editor.chain().focus(editor.state.selection.from + 4).lift(name).joinBackward().run(); - } - if (nextListIsHigher(name, editor.state)) { - return editor.chain().joinForward().joinBackward().run(); - } - return editor.commands.joinItemForward(); -}; - -// src/keymap/listHelpers/hasListItemAfter.ts -var hasListItemAfter = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2); - if ($targetPos.index() === $targetPos.parent.childCount - 1) { - return false; - } - if (((_a = $targetPos.nodeAfter) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/hasListItemBefore.ts -var hasListItemBefore = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - 2); - if ($targetPos.index() === 0) { - return false; - } - if (((_a = $targetPos.nodeBefore) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/listItemHasSubList.ts -var import_core5 = require("@tiptap/core"); -var listItemHasSubList = (typeOrName, state, node) => { - if (!node) { - return false; - } - const nodeType = (0, import_core5.getNodeType)(typeOrName, state.schema); - let hasSubList = false; - node.descendants((child) => { - if (child.type === nodeType) { - hasSubList = true; - } - }); - return hasSubList; -}; - -// src/keymap/list-keymap.ts -var ListKeymap = import_core6.Extension.create({ - name: "listKeymap", - addOptions() { - return { - listTypes: [ - { - itemName: "listItem", - wrapperNames: ["bulletList", "orderedList"] - }, - { - itemName: "taskItem", - wrapperNames: ["taskList"] - } - ] - }; - }, - addKeyboardShortcuts() { - return { - Delete: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - "Mod-Delete": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - Backspace: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - }, - "Mod-Backspace": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - } - }; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ListKeymap, - listHelpers -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.cjs.map deleted file mode 100644 index d267abc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/keymap/index.ts","../../src/keymap/list-keymap.ts","../../src/keymap/listHelpers/index.ts","../../src/keymap/listHelpers/findListItemPos.ts","../../src/keymap/listHelpers/getNextListDepth.ts","../../src/keymap/listHelpers/handleBackspace.ts","../../src/keymap/listHelpers/hasListBefore.ts","../../src/keymap/listHelpers/handleDelete.ts","../../src/keymap/listHelpers/nextListIsDeeper.ts","../../src/keymap/listHelpers/nextListIsHigher.ts","../../src/keymap/listHelpers/hasListItemAfter.ts","../../src/keymap/listHelpers/hasListItemBefore.ts","../../src/keymap/listHelpers/listItemHasSubList.ts"],"sourcesContent":["export * from './list-keymap.js'\nexport * as listHelpers from './listHelpers/index.js'\n","import { Extension } from '@tiptap/core'\n\nimport { handleBackspace, handleDelete } from './listHelpers/index.js'\n\nexport type ListKeymapOptions = {\n /**\n * An array of list types. This is used for item and wrapper list matching.\n * @default []\n * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }]\n */\n listTypes: Array<{\n itemName: string\n wrapperNames: string[]\n }>\n}\n\n/**\n * This extension registers custom keymaps to change the behaviour of the backspace and delete keys.\n * By default Prosemirror keyhandling will always lift or sink items so paragraphs are joined into\n * the adjacent or previous list item. This extension will prevent this behaviour and instead will\n * try to join paragraphs from two list items into a single list item.\n * @see https://www.tiptap.dev/api/extensions/list-keymap\n */\nexport const ListKeymap = Extension.create({\n name: 'listKeymap',\n\n addOptions() {\n return {\n listTypes: [\n {\n itemName: 'listItem',\n wrapperNames: ['bulletList', 'orderedList'],\n },\n {\n itemName: 'taskItem',\n wrapperNames: ['taskList'],\n },\n ],\n }\n },\n\n addKeyboardShortcuts() {\n return {\n Delete: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Delete': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n Backspace: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Backspace': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n }\n },\n})\n","export * from './findListItemPos.js'\nexport * from './getNextListDepth.js'\nexport * from './handleBackspace.js'\nexport * from './handleDelete.js'\nexport * from './hasListBefore.js'\nexport * from './hasListItemAfter.js'\nexport * from './hasListItemBefore.js'\nexport * from './listItemHasSubList.js'\nexport * from './nextListIsDeeper.js'\nexport * from './nextListIsHigher.js'\n","import { getNodeType } from '@tiptap/core'\nimport type { NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const findListItemPos = (typeOrName: string | NodeType, state: EditorState) => {\n const { $from } = state.selection\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let currentNode = null\n let currentDepth = $from.depth\n let currentPos = $from.pos\n let targetDepth: number | null = null\n\n while (currentDepth > 0 && targetDepth === null) {\n currentNode = $from.node(currentDepth)\n\n if (currentNode.type === nodeType) {\n targetDepth = currentDepth\n } else {\n currentDepth -= 1\n currentPos -= 1\n }\n }\n\n if (targetDepth === null) {\n return null\n }\n\n return { $pos: state.doc.resolve(currentPos), depth: targetDepth }\n}\n","import { getNodeAtPosition } from '@tiptap/core'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\n\nexport const getNextListDepth = (typeOrName: string, state: EditorState) => {\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos) {\n return false\n }\n\n const [, depth] = getNodeAtPosition(state, typeOrName, listItemPos.$pos.pos + 4)\n\n return depth\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtStartOfNode, isNodeActive } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\n\nimport { hasListBefore } from './hasListBefore.js'\n\nexport const handleBackspace = (editor: Editor, name: string, parentListTypes: string[]) => {\n // this is required to still handle the undo handling\n if (editor.commands.undoInputRule()) {\n return true\n }\n\n // if the selection is not collapsed\n // we can rely on the default backspace behavior\n if (editor.state.selection.from !== editor.state.selection.to) {\n return false\n }\n\n // if the current item is NOT inside a list item &\n // the previous item is a list (orderedList or bulletList)\n // move the cursor into the list and delete the current item\n if (!isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) {\n const { $anchor } = editor.state.selection\n\n const $listPos = editor.state.doc.resolve($anchor.before() - 1)\n\n const listDescendants: Array<{ node: Node; pos: number }> = []\n\n $listPos.node().descendants((node, pos) => {\n if (node.type.name === name) {\n listDescendants.push({ node, pos })\n }\n })\n\n const lastItem = listDescendants.at(-1)\n\n if (!lastItem) {\n return false\n }\n\n const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1)\n\n return editor\n .chain()\n .cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end())\n .joinForward()\n .run()\n }\n\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the start of a node\n // do nothing and proceed\n if (!isAtStartOfNode(editor.state)) {\n return false\n }\n\n // At the start of a list item, lift it out. Top-level items split the\n // wrapping list around them; nested items get promoted into the outer\n // list. A second backspace then falls through to the merge branch above.\n return editor.chain().liftListItem(name).run()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListBefore = (\n editorState: EditorState,\n name: string,\n parentListTypes: string[],\n) => {\n const { $anchor } = editorState.selection\n\n const previousNodePos = Math.max(0, $anchor.pos - 2)\n\n const previousNode = editorState.doc.resolve(previousNodePos).node()\n\n if (!previousNode || !parentListTypes.includes(previousNode.type.name)) {\n return false\n }\n\n return true\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtEndOfNode, isNodeActive } from '@tiptap/core'\n\nimport { nextListIsDeeper } from './nextListIsDeeper.js'\nimport { nextListIsHigher } from './nextListIsHigher.js'\n\nexport const handleDelete = (editor: Editor, name: string) => {\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the end of a node\n // do nothing and proceed\n if (!isAtEndOfNode(editor.state, name)) {\n return false\n }\n\n // if the selection is not collapsed, or not within a single node\n // do nothing and proceed\n const { selection } = editor.state\n const { $from, $to } = selection\n\n if (!selection.empty && $from.sameParent($to)) {\n return false\n }\n\n // check if the next node is a list with a deeper depth\n if (nextListIsDeeper(name, editor.state)) {\n return editor\n .chain()\n .focus(editor.state.selection.from + 4)\n .lift(name)\n .joinBackward()\n .run()\n }\n\n if (nextListIsHigher(name, editor.state)) {\n return editor.chain().joinForward().joinBackward().run()\n }\n\n return editor.commands.joinItemForward()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsDeeper = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth > listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsHigher = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth < listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemAfter = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2)\n\n if ($targetPos.index() === $targetPos.parent.childCount - 1) {\n return false\n }\n\n if ($targetPos.nodeAfter?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemBefore = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - 2)\n\n if ($targetPos.index() === 0) {\n return false\n }\n\n if ($targetPos.nodeBefore?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import { getNodeType } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const listItemHasSubList = (typeOrName: string, state: EditorState, node?: Node) => {\n if (!node) {\n return false\n }\n\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let hasSubList = false\n\n node.descendants(child => {\n if (child.type === nodeType) {\n hasSubList = true\n }\n })\n\n return hasSubList\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,eAA0B;;;ACA1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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eAAO;AAAA,MACT;AAAA,MACA,cAAc,CAAC,EAAE,OAAO,MAAM;AAC5B,YAAI,UAAU;AAEd,aAAK,QAAQ,UAAU,QAAQ,CAAC,EAAE,SAAS,MAAM;AAC/C,cAAI,OAAO,MAAM,OAAO,MAAM,QAAQ,MAAM,QAAW;AACrD;AAAA,UACF;AAEA,cAAI,aAAa,QAAQ,QAAQ,GAAG;AAClC,sBAAU;AAAA,UACZ;AAAA,QACF,CAAC;AAED,eAAO;AAAA,MACT;AAAA,MACA,WAAW,CAAC,EAAE,OAAO,MAAM;AACzB,YAAI,UAAU;AAEd,aAAK,QAAQ,UAAU,QAAQ,CAAC,EAAE,UAAU,aAAa,MAAM;AAC7D,cAAI,OAAO,MAAM,OAAO,MAAM,QAAQ,MAAM,QAAW;AACrD;AAAA,UACF;AAEA,cAAI,gBAAgB,QAAQ,UAAU,YAAY,GAAG;AACnD,sBAAU;AAAA,UACZ;AAAA,QACF,CAAC;AAED,eAAO;AAAA,MACT;AAAA,MACA,iBAAiB,CAAC,EAAE,OAAO,MAAM;AAC/B,YAAI,UAAU;AAEd,aAAK,QAAQ,UAAU,QAAQ,CAAC,EAAE,UAAU,aAAa,MAAM;AAC7D,cAAI,OAAO,MAAM,OAAO,MAAM,QAAQ,MAAM,QAAW;AACrD;AAAA,UACF;AAEA,cAAI,gBAAgB,QAAQ,UAAU,YAAY,GAAG;AACnD,sBAAU;AAAA,UACZ;AAAA,QACF,CAAC;AAED,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF,CAAC;","names":["import_core","import_core","import_core","import_core","import_core"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.d.cts deleted file mode 100644 index 3407592..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.d.cts +++ /dev/null @@ -1,63 +0,0 @@ -import { Extension, Editor } from '@tiptap/core'; -import * as prosemirror_model from 'prosemirror-model'; -import { NodeType, Node } from '@tiptap/pm/model'; -import { EditorState } from '@tiptap/pm/state'; - -type ListKeymapOptions = { - /** - * An array of list types. This is used for item and wrapper list matching. - * @default [] - * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }] - */ - listTypes: Array<{ - itemName: string; - wrapperNames: string[]; - }>; -}; -/** - * This extension registers custom keymaps to change the behaviour of the backspace and delete keys. - * By default Prosemirror keyhandling will always lift or sink items so paragraphs are joined into - * the adjacent or previous list item. This extension will prevent this behaviour and instead will - * try to join paragraphs from two list items into a single list item. - * @see https://www.tiptap.dev/api/extensions/list-keymap - */ -declare const ListKeymap: Extension; - -declare const findListItemPos: (typeOrName: string | NodeType, state: EditorState) => { - $pos: prosemirror_model.ResolvedPos; - depth: number; -} | null; - -declare const getNextListDepth: (typeOrName: string, state: EditorState) => number | false; - -declare const handleBackspace: (editor: Editor, name: string, parentListTypes: string[]) => boolean; - -declare const handleDelete: (editor: Editor, name: string) => boolean; - -declare const hasListBefore: (editorState: EditorState, name: string, parentListTypes: string[]) => boolean; - -declare const hasListItemAfter: (typeOrName: string, state: EditorState) => boolean; - -declare const hasListItemBefore: (typeOrName: string, state: EditorState) => boolean; - -declare const listItemHasSubList: (typeOrName: string, state: EditorState, node?: Node) => boolean; - -declare const nextListIsDeeper: (typeOrName: string, state: EditorState) => boolean; - -declare const nextListIsHigher: (typeOrName: string, state: EditorState) => boolean; - -declare const index_findListItemPos: typeof findListItemPos; -declare const index_getNextListDepth: typeof getNextListDepth; -declare const index_handleBackspace: typeof handleBackspace; -declare const index_handleDelete: typeof handleDelete; -declare const index_hasListBefore: typeof hasListBefore; -declare const index_hasListItemAfter: typeof hasListItemAfter; -declare const index_hasListItemBefore: typeof hasListItemBefore; -declare const index_listItemHasSubList: typeof listItemHasSubList; -declare const index_nextListIsDeeper: typeof nextListIsDeeper; -declare const index_nextListIsHigher: typeof nextListIsHigher; -declare namespace index { - export { index_findListItemPos as findListItemPos, index_getNextListDepth as getNextListDepth, index_handleBackspace as handleBackspace, index_handleDelete as handleDelete, index_hasListBefore as hasListBefore, index_hasListItemAfter as hasListItemAfter, index_hasListItemBefore as hasListItemBefore, index_listItemHasSubList as listItemHasSubList, index_nextListIsDeeper as nextListIsDeeper, index_nextListIsHigher as nextListIsHigher }; -} - -export { ListKeymap, type ListKeymapOptions, index as listHelpers }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.d.ts deleted file mode 100644 index 3407592..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Extension, Editor } from '@tiptap/core'; -import * as prosemirror_model from 'prosemirror-model'; -import { NodeType, Node } from '@tiptap/pm/model'; -import { EditorState } from '@tiptap/pm/state'; - -type ListKeymapOptions = { - /** - * An array of list types. This is used for item and wrapper list matching. - * @default [] - * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }] - */ - listTypes: Array<{ - itemName: string; - wrapperNames: string[]; - }>; -}; -/** - * This extension registers custom keymaps to change the behaviour of the backspace and delete keys. - * By default Prosemirror keyhandling will always lift or sink items so paragraphs are joined into - * the adjacent or previous list item. This extension will prevent this behaviour and instead will - * try to join paragraphs from two list items into a single list item. - * @see https://www.tiptap.dev/api/extensions/list-keymap - */ -declare const ListKeymap: Extension; - -declare const findListItemPos: (typeOrName: string | NodeType, state: EditorState) => { - $pos: prosemirror_model.ResolvedPos; - depth: number; -} | null; - -declare const getNextListDepth: (typeOrName: string, state: EditorState) => number | false; - -declare const handleBackspace: (editor: Editor, name: string, parentListTypes: string[]) => boolean; - -declare const handleDelete: (editor: Editor, name: string) => boolean; - -declare const hasListBefore: (editorState: EditorState, name: string, parentListTypes: string[]) => boolean; - -declare const hasListItemAfter: (typeOrName: string, state: EditorState) => boolean; - -declare const hasListItemBefore: (typeOrName: string, state: EditorState) => boolean; - -declare const listItemHasSubList: (typeOrName: string, state: EditorState, node?: Node) => boolean; - -declare const nextListIsDeeper: (typeOrName: string, state: EditorState) => boolean; - -declare const nextListIsHigher: (typeOrName: string, state: EditorState) => boolean; - -declare const index_findListItemPos: typeof findListItemPos; -declare const index_getNextListDepth: typeof getNextListDepth; -declare const index_handleBackspace: typeof handleBackspace; -declare const index_handleDelete: typeof handleDelete; -declare const index_hasListBefore: typeof hasListBefore; -declare const index_hasListItemAfter: typeof hasListItemAfter; -declare const index_hasListItemBefore: typeof hasListItemBefore; -declare const index_listItemHasSubList: typeof listItemHasSubList; -declare const index_nextListIsDeeper: typeof nextListIsDeeper; -declare const index_nextListIsHigher: typeof nextListIsHigher; -declare namespace index { - export { index_findListItemPos as findListItemPos, index_getNextListDepth as getNextListDepth, index_handleBackspace as handleBackspace, index_handleDelete as handleDelete, index_hasListBefore as hasListBefore, index_hasListItemAfter as hasListItemAfter, index_hasListItemBefore as hasListItemBefore, index_listItemHasSubList as listItemHasSubList, index_nextListIsDeeper as nextListIsDeeper, index_nextListIsHigher as nextListIsHigher }; -} - -export { ListKeymap, type ListKeymapOptions, index as listHelpers }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.js deleted file mode 100644 index 3b9cf9e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.js +++ /dev/null @@ -1,276 +0,0 @@ -var __defProp = Object.defineProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; - -// src/keymap/list-keymap.ts -import { Extension } from "@tiptap/core"; - -// src/keymap/listHelpers/index.ts -var listHelpers_exports = {}; -__export(listHelpers_exports, { - findListItemPos: () => findListItemPos, - getNextListDepth: () => getNextListDepth, - handleBackspace: () => handleBackspace, - handleDelete: () => handleDelete, - hasListBefore: () => hasListBefore, - hasListItemAfter: () => hasListItemAfter, - hasListItemBefore: () => hasListItemBefore, - listItemHasSubList: () => listItemHasSubList, - nextListIsDeeper: () => nextListIsDeeper, - nextListIsHigher: () => nextListIsHigher -}); - -// src/keymap/listHelpers/findListItemPos.ts -import { getNodeType } from "@tiptap/core"; -var findListItemPos = (typeOrName, state) => { - const { $from } = state.selection; - const nodeType = getNodeType(typeOrName, state.schema); - let currentNode = null; - let currentDepth = $from.depth; - let currentPos = $from.pos; - let targetDepth = null; - while (currentDepth > 0 && targetDepth === null) { - currentNode = $from.node(currentDepth); - if (currentNode.type === nodeType) { - targetDepth = currentDepth; - } else { - currentDepth -= 1; - currentPos -= 1; - } - } - if (targetDepth === null) { - return null; - } - return { $pos: state.doc.resolve(currentPos), depth: targetDepth }; -}; - -// src/keymap/listHelpers/getNextListDepth.ts -import { getNodeAtPosition } from "@tiptap/core"; -var getNextListDepth = (typeOrName, state) => { - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos) { - return false; - } - const [, depth] = getNodeAtPosition(state, typeOrName, listItemPos.$pos.pos + 4); - return depth; -}; - -// src/keymap/listHelpers/handleBackspace.ts -import { isAtStartOfNode, isNodeActive } from "@tiptap/core"; - -// src/keymap/listHelpers/hasListBefore.ts -var hasListBefore = (editorState, name, parentListTypes) => { - const { $anchor } = editorState.selection; - const previousNodePos = Math.max(0, $anchor.pos - 2); - const previousNode = editorState.doc.resolve(previousNodePos).node(); - if (!previousNode || !parentListTypes.includes(previousNode.type.name)) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/handleBackspace.ts -var handleBackspace = (editor, name, parentListTypes) => { - if (editor.commands.undoInputRule()) { - return true; - } - if (editor.state.selection.from !== editor.state.selection.to) { - return false; - } - if (!isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) { - const { $anchor } = editor.state.selection; - const $listPos = editor.state.doc.resolve($anchor.before() - 1); - const listDescendants = []; - $listPos.node().descendants((node, pos) => { - if (node.type.name === name) { - listDescendants.push({ node, pos }); - } - }); - const lastItem = listDescendants.at(-1); - if (!lastItem) { - return false; - } - const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1); - return editor.chain().cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end()).joinForward().run(); - } - if (!isNodeActive(editor.state, name)) { - return false; - } - if (!isAtStartOfNode(editor.state)) { - return false; - } - return editor.chain().liftListItem(name).run(); -}; - -// src/keymap/listHelpers/handleDelete.ts -import { isAtEndOfNode, isNodeActive as isNodeActive2 } from "@tiptap/core"; - -// src/keymap/listHelpers/nextListIsDeeper.ts -var nextListIsDeeper = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth > listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/nextListIsHigher.ts -var nextListIsHigher = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth < listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/handleDelete.ts -var handleDelete = (editor, name) => { - if (!isNodeActive2(editor.state, name)) { - return false; - } - if (!isAtEndOfNode(editor.state, name)) { - return false; - } - const { selection } = editor.state; - const { $from, $to } = selection; - if (!selection.empty && $from.sameParent($to)) { - return false; - } - if (nextListIsDeeper(name, editor.state)) { - return editor.chain().focus(editor.state.selection.from + 4).lift(name).joinBackward().run(); - } - if (nextListIsHigher(name, editor.state)) { - return editor.chain().joinForward().joinBackward().run(); - } - return editor.commands.joinItemForward(); -}; - -// src/keymap/listHelpers/hasListItemAfter.ts -var hasListItemAfter = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2); - if ($targetPos.index() === $targetPos.parent.childCount - 1) { - return false; - } - if (((_a = $targetPos.nodeAfter) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/hasListItemBefore.ts -var hasListItemBefore = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - 2); - if ($targetPos.index() === 0) { - return false; - } - if (((_a = $targetPos.nodeBefore) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/listItemHasSubList.ts -import { getNodeType as getNodeType2 } from "@tiptap/core"; -var listItemHasSubList = (typeOrName, state, node) => { - if (!node) { - return false; - } - const nodeType = getNodeType2(typeOrName, state.schema); - let hasSubList = false; - node.descendants((child) => { - if (child.type === nodeType) { - hasSubList = true; - } - }); - return hasSubList; -}; - -// src/keymap/list-keymap.ts -var ListKeymap = Extension.create({ - name: "listKeymap", - addOptions() { - return { - listTypes: [ - { - itemName: "listItem", - wrapperNames: ["bulletList", "orderedList"] - }, - { - itemName: "taskItem", - wrapperNames: ["taskList"] - } - ] - }; - }, - addKeyboardShortcuts() { - return { - Delete: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - "Mod-Delete": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - Backspace: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - }, - "Mod-Backspace": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - } - }; - } -}); -export { - ListKeymap, - listHelpers_exports as listHelpers -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.js.map deleted file mode 100644 index 6db623f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/keymap/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/keymap/list-keymap.ts","../../src/keymap/listHelpers/index.ts","../../src/keymap/listHelpers/findListItemPos.ts","../../src/keymap/listHelpers/getNextListDepth.ts","../../src/keymap/listHelpers/handleBackspace.ts","../../src/keymap/listHelpers/hasListBefore.ts","../../src/keymap/listHelpers/handleDelete.ts","../../src/keymap/listHelpers/nextListIsDeeper.ts","../../src/keymap/listHelpers/nextListIsHigher.ts","../../src/keymap/listHelpers/hasListItemAfter.ts","../../src/keymap/listHelpers/hasListItemBefore.ts","../../src/keymap/listHelpers/listItemHasSubList.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\n\nimport { handleBackspace, handleDelete } from './listHelpers/index.js'\n\nexport type ListKeymapOptions = {\n /**\n * An array of list types. This is used for item and wrapper list matching.\n * @default []\n * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }]\n */\n listTypes: Array<{\n itemName: string\n wrapperNames: string[]\n }>\n}\n\n/**\n * This extension registers custom keymaps to change the behaviour of the backspace and delete keys.\n * By default Prosemirror keyhandling will always lift or sink items so paragraphs are joined into\n * the adjacent or previous list item. This extension will prevent this behaviour and instead will\n * try to join paragraphs from two list items into a single list item.\n * @see https://www.tiptap.dev/api/extensions/list-keymap\n */\nexport const ListKeymap = Extension.create({\n name: 'listKeymap',\n\n addOptions() {\n return {\n listTypes: [\n {\n itemName: 'listItem',\n wrapperNames: ['bulletList', 'orderedList'],\n },\n {\n itemName: 'taskItem',\n wrapperNames: ['taskList'],\n },\n ],\n }\n },\n\n addKeyboardShortcuts() {\n return {\n Delete: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Delete': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n Backspace: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Backspace': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n }\n },\n})\n","export * from './findListItemPos.js'\nexport * from './getNextListDepth.js'\nexport * from './handleBackspace.js'\nexport * from './handleDelete.js'\nexport * from './hasListBefore.js'\nexport * from './hasListItemAfter.js'\nexport * from './hasListItemBefore.js'\nexport * from './listItemHasSubList.js'\nexport * from './nextListIsDeeper.js'\nexport * from './nextListIsHigher.js'\n","import { getNodeType } from '@tiptap/core'\nimport type { NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const findListItemPos = (typeOrName: string | NodeType, state: EditorState) => {\n const { $from } = state.selection\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let currentNode = null\n let currentDepth = $from.depth\n let currentPos = $from.pos\n let targetDepth: number | null = null\n\n while (currentDepth > 0 && targetDepth === null) {\n currentNode = $from.node(currentDepth)\n\n if (currentNode.type === nodeType) {\n targetDepth = currentDepth\n } else {\n currentDepth -= 1\n currentPos -= 1\n }\n }\n\n if (targetDepth === null) {\n return null\n }\n\n return { $pos: state.doc.resolve(currentPos), depth: targetDepth }\n}\n","import { getNodeAtPosition } from '@tiptap/core'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\n\nexport const getNextListDepth = (typeOrName: string, state: EditorState) => {\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos) {\n return false\n }\n\n const [, depth] = getNodeAtPosition(state, typeOrName, listItemPos.$pos.pos + 4)\n\n return depth\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtStartOfNode, isNodeActive } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\n\nimport { hasListBefore } from './hasListBefore.js'\n\nexport const handleBackspace = (editor: Editor, name: string, parentListTypes: string[]) => {\n // this is required to still handle the undo handling\n if (editor.commands.undoInputRule()) {\n return true\n }\n\n // if the selection is not collapsed\n // we can rely on the default backspace behavior\n if (editor.state.selection.from !== editor.state.selection.to) {\n return false\n }\n\n // if the current item is NOT inside a list item &\n // the previous item is a list (orderedList or bulletList)\n // move the cursor into the list and delete the current item\n if (!isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) {\n const { $anchor } = editor.state.selection\n\n const $listPos = editor.state.doc.resolve($anchor.before() - 1)\n\n const listDescendants: Array<{ node: Node; pos: number }> = []\n\n $listPos.node().descendants((node, pos) => {\n if (node.type.name === name) {\n listDescendants.push({ node, pos })\n }\n })\n\n const lastItem = listDescendants.at(-1)\n\n if (!lastItem) {\n return false\n }\n\n const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1)\n\n return editor\n .chain()\n .cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end())\n .joinForward()\n .run()\n }\n\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the start of a node\n // do nothing and proceed\n if (!isAtStartOfNode(editor.state)) {\n return false\n }\n\n // At the start of a list item, lift it out. Top-level items split the\n // wrapping list around them; nested items get promoted into the outer\n // list. A second backspace then falls through to the merge branch above.\n return editor.chain().liftListItem(name).run()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListBefore = (\n editorState: EditorState,\n name: string,\n parentListTypes: string[],\n) => {\n const { $anchor } = editorState.selection\n\n const previousNodePos = Math.max(0, $anchor.pos - 2)\n\n const previousNode = editorState.doc.resolve(previousNodePos).node()\n\n if (!previousNode || !parentListTypes.includes(previousNode.type.name)) {\n return false\n }\n\n return true\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtEndOfNode, isNodeActive } from '@tiptap/core'\n\nimport { nextListIsDeeper } from './nextListIsDeeper.js'\nimport { nextListIsHigher } from './nextListIsHigher.js'\n\nexport const handleDelete = (editor: Editor, name: string) => {\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the end of a node\n // do nothing and proceed\n if (!isAtEndOfNode(editor.state, name)) {\n return false\n }\n\n // if the selection is not collapsed, or not within a single node\n // do nothing and proceed\n const { selection } = editor.state\n const { $from, $to } = selection\n\n if (!selection.empty && $from.sameParent($to)) {\n return false\n }\n\n // check if the next node is a list with a deeper depth\n if (nextListIsDeeper(name, editor.state)) {\n return editor\n .chain()\n .focus(editor.state.selection.from + 4)\n .lift(name)\n .joinBackward()\n .run()\n }\n\n if (nextListIsHigher(name, editor.state)) {\n return editor.chain().joinForward().joinBackward().run()\n }\n\n return editor.commands.joinItemForward()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsDeeper = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth > listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsHigher = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth < listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemAfter = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2)\n\n if ($targetPos.index() === $targetPos.parent.childCount - 1) {\n return false\n }\n\n if ($targetPos.nodeAfter?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemBefore = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - 2)\n\n if ($targetPos.index() === 0) {\n return false\n }\n\n if ($targetPos.nodeBefore?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import { getNodeType } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const listItemHasSubList = (typeOrName: string, state: EditorState, node?: Node) => {\n if (!node) {\n return false\n }\n\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let hasSubList = false\n\n node.descendants(child => {\n if (child.type === nodeType) {\n hasSubList = true\n }\n })\n\n return hasSubList\n}\n"],"mappings":";;;;;;;AAAA,SAAS,iBAAiB;;;ACA1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,SAAS,mBAAmB;AAIrB,IAAM,kBAAkB,CAAC,YAA+B,UAAuB;AACpF,QAAM,EAAE,MAAM,IAAI,MAAM;AACxB,QAAM,WAAW,YAAY,YAAY,MAAM,MAAM;AAErD,MAAI,cAAc;AAClB,MAAI,eAAe,MAAM;AACzB,MAAI,aAAa,MAAM;AACvB,MAAI,cAA6B;AAEjC,SAAO,eAAe,KAAK,gBAAgB,MAAM;AAC/C,kBAAc,MAAM,KAAK,YAAY;AAErC,QAAI,YAAY,SAAS,UAAU;AACjC,oBAAc;AAAA,IAChB,OAAO;AACL,s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AACzB,YAAI,UAAU;AAEd,aAAK,QAAQ,UAAU,QAAQ,CAAC,EAAE,UAAU,aAAa,MAAM;AAC7D,cAAI,OAAO,MAAM,OAAO,MAAM,QAAQ,MAAM,QAAW;AACrD;AAAA,UACF;AAEA,cAAI,gBAAgB,QAAQ,UAAU,YAAY,GAAG;AACnD,sBAAU;AAAA,UACZ;AAAA,QACF,CAAC;AAED,eAAO;AAAA,MACT;AAAA,MACA,iBAAiB,CAAC,EAAE,OAAO,MAAM;AAC/B,YAAI,UAAU;AAEd,aAAK,QAAQ,UAAU,QAAQ,CAAC,EAAE,UAAU,aAAa,MAAM;AAC7D,cAAI,OAAO,MAAM,OAAO,MAAM,QAAQ,MAAM,QAAW;AACrD;AAAA,UACF;AAEA,cAAI,gBAAgB,QAAQ,UAAU,YAAY,GAAG;AACnD,sBAAU;AAAA,UACZ;AAAA,QACF,CAAC;AAED,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF,CAAC;","names":["isNodeActive","isNodeActive","getNodeType"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.cjs deleted file mode 100644 index 9b28cdd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.cjs +++ /dev/null @@ -1,1298 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/kit/index.ts -var index_exports = {}; -__export(index_exports, { - ListKit: () => ListKit -}); -module.exports = __toCommonJS(index_exports); -var import_core13 = require("@tiptap/core"); - -// src/bullet-list/bullet-list.ts -var import_core = require("@tiptap/core"); -var ListItemName = "listItem"; -var TextStyleName = "textStyle"; -var bulletListInputRegex = /^\s*([-+*])\s$/; -var BulletList = import_core.Node.create({ - name: "bulletList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [{ tag: "ul" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["ul", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || token.ordered) { - return []; - } - return { - type: "bulletList", - content: token.items ? helpers.parseChildren(token.items) : [] - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleBulletList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-8": () => this.editor.commands.toggleBulletList() - }; - }, - addInputRules() { - let inputRule = (0, import_core.wrappingInputRule)({ - find: bulletListInputRegex, - type: this.type - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = (0, import_core.wrappingInputRule)({ - find: bulletListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: () => { - return this.editor.getAttributes(TextStyleName); - }, - editor: this.editor - }); - } - return [inputRule]; - } -}); - -// src/item/list-item.ts -var import_core3 = require("@tiptap/core"); - -// src/helpers/createBranchingListDeleteKeymap.ts -var import_core2 = require("@tiptap/core"); - -// src/helpers/hoistBranchingNestedList.ts -var import_model = require("@tiptap/pm/model"); - -// src/helpers/getBranchingNestedListAtCursor.ts -var getBranchingNestedListAtCursor = (state, itemName, wrapperNames) => { - const { selection } = state; - if (!selection.empty) { - return null; - } - const { $from } = selection; - if (!$from.parent.isTextblock) { - return null; - } - if ($from.parentOffset !== $from.parent.content.size) { - return null; - } - let listItemDepth = -1; - for (let depth = $from.depth; depth > 0; depth -= 1) { - if ($from.node(depth).type.name === itemName) { - listItemDepth = depth; - break; - } - } - if (listItemDepth < 0) { - return null; - } - const listItem = $from.node(listItemDepth); - const indexInListItem = $from.index(listItemDepth); - if (indexInListItem + 1 >= listItem.childCount) { - return null; - } - const nextChild = listItem.child(indexInListItem + 1); - if (!wrapperNames.includes(nextChild.type.name)) { - return null; - } - const itemType = state.schema.nodes[itemName]; - let hasBranching = false; - nextChild.forEach((child) => { - if (child.type === itemType && child.childCount > 1) { - hasBranching = true; - } - }); - if (!hasBranching) { - return null; - } - const nodeAfter = state.doc.resolve($from.after()).nodeAfter; - if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) { - return null; - } - const items = []; - nodeAfter.forEach((child) => { - items.push(child); - }); - if (items.length === 0) { - return null; - } - return { - listItemDepth, - nestedList: nodeAfter, - nestedListPos: $from.after(), - insertPos: $from.after(listItemDepth), - items - }; -}; - -// src/helpers/hoistBranchingNestedList.ts -var hoistBranchingNestedList = (state, dispatch, itemName, wrapperNames) => { - const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames); - if (!context) { - return false; - } - const { selection } = state; - const { nestedList, nestedListPos, insertPos, items } = context; - const tr = state.tr; - tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize); - const mappedInsertPos = tr.mapping.map(insertPos); - tr.insert(mappedInsertPos, import_model.Fragment.from(items)); - tr.setSelection(selection.map(tr.doc, tr.mapping)); - if (dispatch) { - dispatch(tr); - } - return true; -}; - -// src/helpers/handleDeleteBranchingNestedList.ts -var handleDeleteBranchingNestedList = (editor, itemName, wrapperNames) => { - return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames); -}; - -// src/helpers/createBranchingListDeleteKeymap.ts -var createBranchingListDeleteKeymap = (itemName, wrapperNames) => { - return import_core2.Extension.create({ - name: `${itemName}BranchingDeleteKeymap`, - priority: 101, - addKeyboardShortcuts() { - const handleDelete2 = () => handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames); - return { - Delete: handleDelete2, - "Mod-Delete": handleDelete2 - }; - } - }); -}; - -// src/item/list-item.ts -function isSameLineOrderedListToken(token) { - var _a, _b; - const nestedToken = (_a = token.tokens) == null ? void 0 : _a[0]; - return Boolean( - token.text && ((_b = token.tokens) == null ? void 0 : _b.length) === 1 && (nestedToken == null ? void 0 : nestedToken.type) === "list" && nestedToken.ordered && nestedToken.raw === token.text - ); -} -function parseSameLineOrderedListText(text, helpers) { - if (helpers.tokenizeInline) { - return helpers.parseInline(helpers.tokenizeInline(text)); - } - return helpers.parseInline([ - { - type: "text", - raw: text, - text - } - ]); -} -var ListItem = import_core3.Node.create({ - name: "listItem", - addOptions() { - return { - HTMLAttributes: {}, - bulletListTypeName: "bulletList", - orderedListTypeName: "orderedList" - }; - }, - content: "paragraph block*", - defining: true, - parseHTML() { - return [ - { - tag: "li" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["li", (0, import_core3.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list_item", - parseMarkdown: (token, helpers) => { - var _a; - if (token.type !== "list_item") { - return []; - } - const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren; - let content = []; - if (token.tokens && token.tokens.length > 0) { - if (isSameLineOrderedListToken(token)) { - return { - type: "listItem", - content: [ - { - type: "paragraph", - content: parseSameLineOrderedListText(token.text || "", helpers) - } - ] - }; - } - const hasParagraphTokens = token.tokens.some((t) => t.type === "paragraph"); - if (hasParagraphTokens) { - content = parseBlockChildren(token.tokens); - } else { - const firstToken = token.tokens[0]; - if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) { - const inlineContent = helpers.parseInline(firstToken.tokens); - content = [ - { - type: "paragraph", - content: inlineContent - } - ]; - if (token.tokens.length > 1) { - const remainingTokens = token.tokens.slice(1); - const additionalContent = parseBlockChildren(remainingTokens); - content.push(...additionalContent); - } - } else { - content = parseBlockChildren(token.tokens); - } - } - } - if (content.length === 0) { - content = [ - { - type: "paragraph", - content: [] - } - ]; - } - return { - type: "listItem", - content - }; - }, - renderMarkdown: (node, h, ctx) => { - return (0, import_core3.renderNestedMarkdownContent)( - node, - h, - (context) => { - var _a, _b; - if (context.parentType === "bulletList") { - return "- "; - } - if (context.parentType === "orderedList") { - const start = ((_b = (_a = context.meta) == null ? void 0 : _a.parentAttrs) == null ? void 0 : _b.start) || 1; - return `${start + context.index}. `; - } - return "- "; - }, - ctx - ); - }, - addExtensions() { - return [ - createBranchingListDeleteKeymap(this.name, [ - this.options.bulletListTypeName, - this.options.orderedListTypeName - ]) - ]; - }, - addKeyboardShortcuts() { - return { - Enter: () => this.editor.commands.splitListItem(this.name), - Tab: () => this.editor.commands.sinkListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - } -}); - -// src/keymap/list-keymap.ts -var import_core9 = require("@tiptap/core"); - -// src/keymap/listHelpers/index.ts -var listHelpers_exports = {}; -__export(listHelpers_exports, { - findListItemPos: () => findListItemPos, - getNextListDepth: () => getNextListDepth, - handleBackspace: () => handleBackspace, - handleDelete: () => handleDelete, - hasListBefore: () => hasListBefore, - hasListItemAfter: () => hasListItemAfter, - hasListItemBefore: () => hasListItemBefore, - listItemHasSubList: () => listItemHasSubList, - nextListIsDeeper: () => nextListIsDeeper, - nextListIsHigher: () => nextListIsHigher -}); - -// src/keymap/listHelpers/findListItemPos.ts -var import_core4 = require("@tiptap/core"); -var findListItemPos = (typeOrName, state) => { - const { $from } = state.selection; - const nodeType = (0, import_core4.getNodeType)(typeOrName, state.schema); - let currentNode = null; - let currentDepth = $from.depth; - let currentPos = $from.pos; - let targetDepth = null; - while (currentDepth > 0 && targetDepth === null) { - currentNode = $from.node(currentDepth); - if (currentNode.type === nodeType) { - targetDepth = currentDepth; - } else { - currentDepth -= 1; - currentPos -= 1; - } - } - if (targetDepth === null) { - return null; - } - return { $pos: state.doc.resolve(currentPos), depth: targetDepth }; -}; - -// src/keymap/listHelpers/getNextListDepth.ts -var import_core5 = require("@tiptap/core"); -var getNextListDepth = (typeOrName, state) => { - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos) { - return false; - } - const [, depth] = (0, import_core5.getNodeAtPosition)(state, typeOrName, listItemPos.$pos.pos + 4); - return depth; -}; - -// src/keymap/listHelpers/handleBackspace.ts -var import_core6 = require("@tiptap/core"); - -// src/keymap/listHelpers/hasListBefore.ts -var hasListBefore = (editorState, name, parentListTypes) => { - const { $anchor } = editorState.selection; - const previousNodePos = Math.max(0, $anchor.pos - 2); - const previousNode = editorState.doc.resolve(previousNodePos).node(); - if (!previousNode || !parentListTypes.includes(previousNode.type.name)) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/handleBackspace.ts -var handleBackspace = (editor, name, parentListTypes) => { - if (editor.commands.undoInputRule()) { - return true; - } - if (editor.state.selection.from !== editor.state.selection.to) { - return false; - } - if (!(0, import_core6.isNodeActive)(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) { - const { $anchor } = editor.state.selection; - const $listPos = editor.state.doc.resolve($anchor.before() - 1); - const listDescendants = []; - $listPos.node().descendants((node, pos) => { - if (node.type.name === name) { - listDescendants.push({ node, pos }); - } - }); - const lastItem = listDescendants.at(-1); - if (!lastItem) { - return false; - } - const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1); - return editor.chain().cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end()).joinForward().run(); - } - if (!(0, import_core6.isNodeActive)(editor.state, name)) { - return false; - } - if (!(0, import_core6.isAtStartOfNode)(editor.state)) { - return false; - } - return editor.chain().liftListItem(name).run(); -}; - -// src/keymap/listHelpers/handleDelete.ts -var import_core7 = require("@tiptap/core"); - -// src/keymap/listHelpers/nextListIsDeeper.ts -var nextListIsDeeper = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth > listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/nextListIsHigher.ts -var nextListIsHigher = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth < listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/handleDelete.ts -var handleDelete = (editor, name) => { - if (!(0, import_core7.isNodeActive)(editor.state, name)) { - return false; - } - if (!(0, import_core7.isAtEndOfNode)(editor.state, name)) { - return false; - } - const { selection } = editor.state; - const { $from, $to } = selection; - if (!selection.empty && $from.sameParent($to)) { - return false; - } - if (nextListIsDeeper(name, editor.state)) { - return editor.chain().focus(editor.state.selection.from + 4).lift(name).joinBackward().run(); - } - if (nextListIsHigher(name, editor.state)) { - return editor.chain().joinForward().joinBackward().run(); - } - return editor.commands.joinItemForward(); -}; - -// src/keymap/listHelpers/hasListItemAfter.ts -var hasListItemAfter = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2); - if ($targetPos.index() === $targetPos.parent.childCount - 1) { - return false; - } - if (((_a = $targetPos.nodeAfter) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/hasListItemBefore.ts -var hasListItemBefore = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - 2); - if ($targetPos.index() === 0) { - return false; - } - if (((_a = $targetPos.nodeBefore) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/listItemHasSubList.ts -var import_core8 = require("@tiptap/core"); -var listItemHasSubList = (typeOrName, state, node) => { - if (!node) { - return false; - } - const nodeType = (0, import_core8.getNodeType)(typeOrName, state.schema); - let hasSubList = false; - node.descendants((child) => { - if (child.type === nodeType) { - hasSubList = true; - } - }); - return hasSubList; -}; - -// src/keymap/list-keymap.ts -var ListKeymap = import_core9.Extension.create({ - name: "listKeymap", - addOptions() { - return { - listTypes: [ - { - itemName: "listItem", - wrapperNames: ["bulletList", "orderedList"] - }, - { - itemName: "taskItem", - wrapperNames: ["taskList"] - } - ] - }; - }, - addKeyboardShortcuts() { - return { - Delete: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - "Mod-Delete": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - Backspace: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - }, - "Mod-Backspace": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - } - }; - } -}); - -// src/ordered-list/ordered-list.ts -var import_core10 = require("@tiptap/core"); - -// src/ordered-list/utils.ts -var ORDERED_LIST_ITEM_REGEX = /^(\s*)(\d+)\.\s+(.*)$/; -var INDENTED_LINE_REGEX = /^\s/; -function isBlockContentLine(line) { - const trimmedLine = line.trimStart(); - return ( - // oxlint-disable-next-line prefer-string-starts-ends-with - /^[-+*]\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^\d+\.\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^>\s?/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^```/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^~~~/.test(trimmedLine) - ); -} -function splitItemContent(contentLines) { - const paragraphLines = []; - const blockLines = []; - let reachedBlockBoundary = false; - contentLines.forEach((line) => { - if (reachedBlockBoundary) { - blockLines.push(line); - return; - } - if (line.trim() === "") { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - if (paragraphLines.length > 0 && isBlockContentLine(line)) { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - paragraphLines.push(line); - }); - return { - paragraphLines, - blockLines - }; -} -function collectOrderedListItems(lines) { - const listItems = []; - let currentLineIndex = 0; - let consumed = 0; - while (currentLineIndex < lines.length) { - const line = lines[currentLineIndex]; - const match = line.match(ORDERED_LIST_ITEM_REGEX); - if (!match) { - break; - } - const [, indent, number, content] = match; - const indentLevel = indent.length; - const itemContentLines = [content]; - let nextLineIndex = currentLineIndex + 1; - const itemLines = [line]; - let sawBlankLine = false; - while (nextLineIndex < lines.length) { - const nextLine = lines[nextLineIndex]; - const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX); - if (nextMatch) { - break; - } - if (nextLine.trim() === "") { - itemLines.push(nextLine); - itemContentLines.push(""); - sawBlankLine = true; - nextLineIndex += 1; - } else if (nextLine.match(INDENTED_LINE_REGEX)) { - itemLines.push(nextLine); - itemContentLines.push(nextLine.slice(indentLevel + 2)); - nextLineIndex += 1; - } else { - if (sawBlankLine) { - break; - } - itemLines.push(nextLine); - itemContentLines.push(nextLine); - nextLineIndex += 1; - } - } - listItems.push({ - indent: indentLevel, - number: parseInt(number, 10), - content: itemContentLines.join("\n").trim(), - contentLines: itemContentLines, - raw: itemLines.join("\n") - }); - consumed = nextLineIndex; - currentLineIndex = nextLineIndex; - } - return [listItems, consumed]; -} -function buildNestedStructure(items, baseIndent, lexer) { - const result = []; - let currentIndex = 0; - while (currentIndex < items.length) { - const item = items[currentIndex]; - if (item.indent === baseIndent) { - const { paragraphLines, blockLines } = splitItemContent(item.contentLines); - const mainText = paragraphLines.join("\n").trim(); - const tokens = []; - if (mainText) { - tokens.push({ - type: "paragraph", - raw: mainText, - tokens: lexer.inlineTokens(mainText) - }); - } - const additionalContent = blockLines.join("\n").trim(); - if (additionalContent) { - const blockTokens = lexer.blockTokens(additionalContent); - tokens.push(...blockTokens); - } - let lookAheadIndex = currentIndex + 1; - const nestedItems = []; - while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) { - nestedItems.push(items[lookAheadIndex]); - lookAheadIndex += 1; - } - if (nestedItems.length > 0) { - const nextIndent = Math.min(...nestedItems.map((nestedItem) => nestedItem.indent)); - const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer); - tokens.push({ - type: "list", - ordered: true, - start: nestedItems[0].number, - items: nestedListItems, - raw: nestedItems.map((nestedItem) => nestedItem.raw).join("\n") - }); - } - result.push({ - type: "list_item", - raw: item.raw, - tokens - }); - currentIndex = lookAheadIndex; - } else { - currentIndex += 1; - } - } - return result; -} -function parseListItems(items, helpers) { - return items.map((item) => { - if (item.type !== "list_item") { - return helpers.parseChildren([item])[0]; - } - const content = []; - if (item.tokens && item.tokens.length > 0) { - item.tokens.forEach((itemToken) => { - if (itemToken.type === "paragraph" || itemToken.type === "list" || itemToken.type === "blockquote" || itemToken.type === "code") { - content.push(...helpers.parseChildren([itemToken])); - } else if (itemToken.type === "text" && itemToken.tokens) { - const inlineContent = helpers.parseChildren([itemToken]); - content.push({ - type: "paragraph", - content: inlineContent - }); - } else { - const parsed = helpers.parseChildren([itemToken]); - if (parsed.length > 0) { - content.push(...parsed); - } - } - }); - } - return { - type: "listItem", - content - }; - }); -} - -// src/ordered-list/ordered-list.ts -var ListItemName2 = "listItem"; -var TextStyleName2 = "textStyle"; -var orderedListInputRegex = /^(\d+)\.\s$/; -var OrderedList = import_core10.Node.create({ - name: "orderedList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - addAttributes() { - return { - start: { - default: 1, - parseHTML: (element) => { - return element.hasAttribute("start") ? parseInt(element.getAttribute("start") || "", 10) : 1; - } - }, - type: { - default: null, - parseHTML: (element) => element.getAttribute("type") - } - }; - }, - parseHTML() { - return [ - { - tag: "ol" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - const { start, ...attributesWithoutStart } = HTMLAttributes; - return start === 1 ? ["ol", (0, import_core10.mergeAttributes)(this.options.HTMLAttributes, attributesWithoutStart), 0] : ["ol", (0, import_core10.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || !token.ordered) { - return []; - } - const startValue = token.start || 1; - const content = token.items ? parseListItems(token.items, helpers) : []; - if (startValue !== 1) { - return { - type: "orderedList", - attrs: { start: startValue }, - content - }; - } - return { - type: "orderedList", - content - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "orderedList", - level: "block", - start: (src) => { - const match = src.match(/^(\s*)(\d+)\.\s+/); - const index = match == null ? void 0 : match.index; - return index !== void 0 ? index : -1; - }, - tokenize: (src, _tokens, lexer) => { - var _a; - const lines = src.split("\n"); - const [listItems, consumed] = collectOrderedListItems(lines); - if (listItems.length === 0) { - return void 0; - } - const items = buildNestedStructure(listItems, 0, lexer); - if (items.length === 0) { - return void 0; - } - const startValue = ((_a = listItems[0]) == null ? void 0 : _a.number) || 1; - return { - type: "list", - ordered: true, - start: startValue, - items, - raw: lines.slice(0, consumed).join("\n") - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleOrderedList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName2, this.editor.getAttributes(TextStyleName2)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() - }; - }, - addInputRules() { - let inputRule = (0, import_core10.wrappingInputRule)({ - find: orderedListInputRegex, - type: this.type, - getAttributes: (match) => ({ start: +match[1] }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1] - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = (0, import_core10.wrappingInputRule)({ - find: orderedListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: (match) => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName2) }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1], - editor: this.editor - }); - } - return [inputRule]; - } -}); - -// src/task-item/task-item.ts -var import_core11 = require("@tiptap/core"); -var inputRegex = /^\s*(\[([( |x])?\])\s$/; -var TaskItem = import_core11.Node.create({ - name: "taskItem", - addOptions() { - return { - nested: false, - HTMLAttributes: {}, - taskListTypeName: "taskList", - a11y: void 0 - }; - }, - content() { - return this.options.nested ? "paragraph block*" : "paragraph+"; - }, - defining: true, - addAttributes() { - return { - checked: { - default: false, - keepOnSplit: false, - parseHTML: (element) => { - const dataChecked = element.getAttribute("data-checked"); - return dataChecked === "" || dataChecked === "true"; - }, - renderHTML: (attributes) => ({ - "data-checked": attributes.checked - }) - } - }; - }, - parseHTML() { - return [ - { - tag: `li[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ node, HTMLAttributes }) { - return [ - "li", - (0, import_core11.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes, { - "data-type": this.name - }), - [ - "label", - [ - "input", - { - type: "checkbox", - checked: node.attrs.checked ? "checked" : null - } - ], - ["span"] - ], - ["div", 0] - ]; - }, - parseMarkdown: (token, h) => { - const content = []; - if (token.tokens && token.tokens.length > 0) { - content.push(h.createNode("paragraph", {}, h.parseInline(token.tokens))); - } else if (token.text) { - content.push(h.createNode("paragraph", {}, [h.createNode("text", { text: token.text })])); - } else { - content.push(h.createNode("paragraph", {}, [])); - } - if (token.nestedTokens && token.nestedTokens.length > 0) { - const nestedContent = h.parseChildren(token.nestedTokens); - content.push(...nestedContent); - } - return h.createNode("taskItem", { checked: token.checked || false }, content); - }, - renderMarkdown: (node, h) => { - var _a; - const checkedChar = ((_a = node.attrs) == null ? void 0 : _a.checked) ? "x" : " "; - const prefix = `- [${checkedChar}] `; - return (0, import_core11.renderNestedMarkdownContent)(node, h, prefix); - }, - addExtensions() { - if (!this.options.nested) { - return []; - } - return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]; - }, - addKeyboardShortcuts() { - const shortcuts = { - Enter: () => this.editor.commands.splitListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - if (!this.options.nested) { - return shortcuts; - } - return { - ...shortcuts, - Tab: () => this.editor.commands.sinkListItem(this.name) - }; - }, - addNodeView() { - return ({ node, HTMLAttributes, getPos, editor }) => { - const listItem = document.createElement("li"); - const checkboxWrapper = document.createElement("label"); - const checkboxStyler = document.createElement("span"); - const checkbox = document.createElement("input"); - const content = document.createElement("div"); - const updateA11Y = (currentNode) => { - var _a, _b; - checkbox.ariaLabel = ((_b = (_a = this.options.a11y) == null ? void 0 : _a.checkboxLabel) == null ? void 0 : _b.call(_a, currentNode, checkbox.checked)) || `Task item checkbox for ${currentNode.textContent || "empty task item"}`; - }; - updateA11Y(node); - checkboxWrapper.contentEditable = "false"; - checkbox.type = "checkbox"; - checkbox.addEventListener("mousedown", (event) => event.preventDefault()); - checkbox.addEventListener("change", (event) => { - if (!editor.isEditable && !this.options.onReadOnlyChecked) { - checkbox.checked = !checkbox.checked; - return; - } - const { checked } = event.target; - if (editor.isEditable && typeof getPos === "function") { - editor.chain().focus(void 0, { scrollIntoView: false }).command(({ tr }) => { - const position = getPos(); - if (typeof position !== "number") { - return false; - } - const currentNode = tr.doc.nodeAt(position); - tr.setNodeMarkup(position, void 0, { - ...currentNode == null ? void 0 : currentNode.attrs, - checked - }); - return true; - }).run(); - } - if (!editor.isEditable && this.options.onReadOnlyChecked) { - if (!this.options.onReadOnlyChecked(node, checked)) { - checkbox.checked = !checkbox.checked; - } - } - }); - Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - listItem.dataset.checked = node.attrs.checked; - checkbox.checked = node.attrs.checked; - checkboxWrapper.append(checkbox, checkboxStyler); - listItem.append(checkboxWrapper, content); - Object.entries(HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes)); - return { - dom: listItem, - contentDOM: content, - update: (updatedNode) => { - if (updatedNode.type !== this.type) { - return false; - } - listItem.dataset.checked = updatedNode.attrs.checked; - checkbox.checked = updatedNode.attrs.checked; - updateA11Y(updatedNode); - const extensionAttributes = editor.extensionManager.attributes; - const newHTMLAttributes = (0, import_core11.getRenderedAttributes)(updatedNode, extensionAttributes); - const newKeys = new Set(Object.keys(newHTMLAttributes)); - const staticAttrs = this.options.HTMLAttributes; - prevRenderedAttributeKeys.forEach((key) => { - if (!newKeys.has(key)) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } - }); - Object.entries(newHTMLAttributes).forEach(([key, value]) => { - if (value === null || value === void 0) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } else { - listItem.setAttribute(key, value); - } - }); - prevRenderedAttributeKeys = newKeys; - return true; - } - }; - }; - }, - addInputRules() { - return [ - (0, import_core11.wrappingInputRule)({ - find: inputRegex, - type: this.type, - getAttributes: (match) => ({ - checked: match[match.length - 1] === "x" - }) - }) - ]; - } -}); - -// src/task-list/task-list.ts -var import_core12 = require("@tiptap/core"); -var TaskList = import_core12.Node.create({ - name: "taskList", - addOptions() { - return { - itemTypeName: "taskItem", - HTMLAttributes: {} - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [ - { - tag: `ul[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return [ - "ul", - (0, import_core12.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes, { "data-type": this.name }), - 0 - ]; - }, - parseMarkdown: (token, h) => { - return h.createNode("taskList", {}, h.parseChildren(token.items || [])); - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "taskList", - level: "block", - start(src) { - var _a; - const index = (_a = src.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)) == null ? void 0 : _a.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, tokens, lexer) { - const parseTaskListContent = (content) => { - const nestedResult = (0, import_core12.parseIndentedBlocks)( - content, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Allow recursive nesting - customNestedParser: parseTaskListContent - }, - lexer - ); - if (nestedResult) { - return [ - { - type: "taskList", - raw: nestedResult.raw, - items: nestedResult.items - } - ]; - } - return lexer.blockTokens(content); - }; - const result = (0, import_core12.parseIndentedBlocks)( - src, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Use the recursive parser for nested content - customNestedParser: parseTaskListContent - }, - lexer - ); - if (!result) { - return void 0; - } - return { - type: "taskList", - raw: result.raw, - items: result.items - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleTaskList: () => ({ commands }) => { - return commands.toggleList(this.name, this.options.itemTypeName); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-9": () => this.editor.commands.toggleTaskList() - }; - } -}); - -// src/kit/index.ts -var ListKit = import_core13.Extension.create({ - name: "listKit", - addExtensions() { - const extensions = []; - if (this.options.bulletList !== false) { - extensions.push(BulletList.configure(this.options.bulletList)); - } - if (this.options.listItem !== false) { - extensions.push(ListItem.configure(this.options.listItem)); - } - if (this.options.listKeymap !== false) { - extensions.push(ListKeymap.configure(this.options.listKeymap)); - } - if (this.options.orderedList !== false) { - extensions.push(OrderedList.configure(this.options.orderedList)); - } - if (this.options.taskItem !== false) { - extensions.push(TaskItem.configure(this.options.taskItem)); - } - if (this.options.taskList !== false) { - extensions.push(TaskList.configure(this.options.taskList)); - } - return extensions; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ListKit -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.cjs.map deleted file mode 100644 index 336b80a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/kit/index.ts","../../src/bullet-list/bullet-list.ts","../../src/item/list-item.ts","../../src/helpers/createBranchingListDeleteKeymap.ts","../../src/helpers/hoistBranchingNestedList.ts","../../src/helpers/getBranchingNestedListAtCursor.ts","../../src/helpers/handleDeleteBranchingNestedList.ts","../../src/keymap/list-keymap.ts","../../src/keymap/listHelpers/index.ts","../../src/keymap/listHelpers/findListItemPos.ts","../../src/keymap/listHelpers/getNextListDepth.ts","../../src/keymap/listHelpers/handleBackspace.ts","../../src/keymap/listHelpers/hasListBefore.ts","../../src/keymap/listHelpers/handleDelete.ts","../../src/keymap/listHelpers/nextListIsDeeper.ts","../../src/keymap/listHelpers/nextListIsHigher.ts","../../src/keymap/listHelpers/hasListItemAfter.ts","../../src/keymap/listHelpers/hasListItemBefore.ts","../../src/keymap/listHelpers/listItemHasSubList.ts","../../src/ordered-list/ordered-list.ts","../../src/ordered-list/utils.ts","../../src/task-item/task-item.ts","../../src/task-list/task-list.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\n\nimport type { BulletListOptions } from '../bullet-list/index.js'\nimport { BulletList } from '../bullet-list/index.js'\nimport type { ListItemOptions } from '../item/index.js'\nimport { ListItem } from '../item/index.js'\nimport type { ListKeymapOptions } from '../keymap/index.js'\nimport { ListKeymap } from '../keymap/index.js'\nimport type { OrderedListOptions } from '../ordered-list/index.js'\nimport { OrderedList } from '../ordered-list/index.js'\nimport type { TaskItemOptions } from '../task-item/index.js'\nimport { TaskItem } from '../task-item/index.js'\nimport type { TaskListOptions } from '../task-list/index.js'\nimport { TaskList } from '../task-list/index.js'\n\nexport interface ListKitOptions {\n /**\n * If set to false, the bulletList extension will not be registered\n * @example table: false\n */\n bulletList: Partial | false\n /**\n * If set to false, the listItem extension will not be registered\n */\n listItem: Partial | false\n /**\n * If set to false, the listKeymap extension will not be registered\n */\n listKeymap: Partial | false\n /**\n * If set to false, the orderedList extension will not be registered\n */\n orderedList: Partial | false\n /**\n * If set to false, the taskItem extension will not be registered\n */\n taskItem: Partial | false\n /**\n * If set to false, the taskList extension will not be registered\n */\n taskList: Partial | false\n}\n\n/**\n * The table kit is a collection of table editor extensions.\n *\n * It’s a good starting point for building your own table in Tiptap.\n */\nexport const ListKit = Extension.create({\n name: 'listKit',\n\n addExtensions() {\n const extensions = []\n\n if (this.options.bulletList !== false) {\n extensions.push(BulletList.configure(this.options.bulletList))\n }\n\n if (this.options.listItem !== false) {\n extensions.push(ListItem.configure(this.options.listItem))\n }\n\n if (this.options.listKeymap !== false) {\n extensions.push(ListKeymap.configure(this.options.listKeymap))\n }\n\n if (this.options.orderedList !== false) {\n extensions.push(OrderedList.configure(this.options.orderedList))\n }\n\n if (this.options.taskItem !== false) {\n extensions.push(TaskItem.configure(this.options.taskItem))\n }\n\n if (this.options.taskList !== false) {\n extensions.push(TaskList.configure(this.options.taskList))\n }\n\n return extensions\n },\n})\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface BulletListOptions {\n /**\n * The node name for the list items\n * @default 'listItem'\n * @example 'paragraph'\n */\n itemTypeName: string\n\n /**\n * HTML attributes to add to the bullet list element\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting the list\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting the list\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bulletList: {\n /**\n * Toggle a bullet list\n */\n toggleBulletList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches a bullet list to a dash or asterisk.\n */\nexport const bulletListInputRegex = /^\\s*([-+*])\\s$/\n\n/**\n * This extension allows you to create bullet lists.\n * This requires the ListItem extension\n * @see https://tiptap.dev/api/nodes/bullet-list\n * @see https://tiptap.dev/api/nodes/list-item.\n */\nexport const BulletList = Node.create({\n name: 'bulletList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [{ tag: 'ul' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || (token as any).ordered) {\n return []\n }\n\n return {\n type: 'bulletList',\n content: token.items ? helpers.parseChildren(token.items) : [],\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleBulletList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: () => {\n return this.editor.getAttributes(TextStyleName)\n },\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n","import type { JSONContent, MarkdownParseHelpers, MarkdownToken } from '@tiptap/core'\nimport { mergeAttributes, Node, renderNestedMarkdownContent } from '@tiptap/core'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface ListItemOptions {\n /**\n * The HTML attributes for a list item node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for bulletList nodes\n * @default 'bulletList'\n * @example 'myCustomBulletList'\n */\n bulletListTypeName: string\n\n /**\n * The node type for orderedList nodes\n * @default 'orderedList'\n * @example 'myCustomOrderedList'\n */\n orderedListTypeName: string\n}\n\nfunction isSameLineOrderedListToken(token: MarkdownToken): boolean {\n const nestedToken = token.tokens?.[0]\n\n return Boolean(\n token.text &&\n token.tokens?.length === 1 &&\n nestedToken?.type === 'list' &&\n nestedToken.ordered &&\n nestedToken.raw === token.text,\n )\n}\n\nfunction parseSameLineOrderedListText(text: string, helpers: MarkdownParseHelpers): JSONContent[] {\n if (helpers.tokenizeInline) {\n return helpers.parseInline(helpers.tokenizeInline(text))\n }\n\n return helpers.parseInline([\n {\n type: 'text',\n raw: text,\n text,\n },\n ])\n}\n\n/**\n * This extension allows you to create list items.\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const ListItem = Node.create({\n name: 'listItem',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n bulletListTypeName: 'bulletList',\n orderedListTypeName: 'orderedList',\n }\n },\n\n content: 'paragraph block*',\n\n defining: true,\n\n parseHTML() {\n return [\n {\n tag: 'li',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list_item',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list_item') {\n return []\n }\n\n const parseBlockChildren = helpers.parseBlockChildren ?? helpers.parseChildren\n let content: any[] = []\n\n if (token.tokens && token.tokens.length > 0) {\n if (isSameLineOrderedListToken(token)) {\n return {\n type: 'listItem',\n content: [\n {\n type: 'paragraph',\n content: parseSameLineOrderedListText(token.text || '', helpers),\n },\n ],\n }\n }\n\n // Check if we have paragraph tokens (complex list items)\n const hasParagraphTokens = token.tokens.some(t => t.type === 'paragraph')\n\n if (hasParagraphTokens) {\n // If we have paragraph tokens, parse them as block elements\n content = parseBlockChildren(token.tokens)\n } else {\n // Check if the first token is a text token with nested inline tokens\n const firstToken = token.tokens[0]\n\n if (\n firstToken &&\n firstToken.type === 'text' &&\n firstToken.tokens &&\n firstToken.tokens.length > 0\n ) {\n // Parse the inline content from the text token\n const inlineContent = helpers.parseInline(firstToken.tokens)\n\n // Start with the paragraph containing the inline content\n content = [\n {\n type: 'paragraph',\n content: inlineContent,\n },\n ]\n\n // If there are additional tokens after the first text token (like nested lists),\n // parse them as block elements and add them\n if (token.tokens.length > 1) {\n const remainingTokens = token.tokens.slice(1)\n const additionalContent = parseBlockChildren(remainingTokens)\n content.push(...additionalContent)\n }\n } else {\n // Fallback: parse all tokens as block elements\n content = parseBlockChildren(token.tokens)\n }\n }\n }\n\n // Ensure we always have at least an empty paragraph\n if (content.length === 0) {\n content = [\n {\n type: 'paragraph',\n content: [],\n },\n ]\n }\n\n return {\n type: 'listItem',\n content,\n }\n },\n\n renderMarkdown: (node, h, ctx) => {\n return renderNestedMarkdownContent(\n node,\n h,\n (context: any) => {\n if (context.parentType === 'bulletList') {\n return '- '\n }\n if (context.parentType === 'orderedList') {\n const start = context.meta?.parentAttrs?.start || 1\n return `${start + context.index}. `\n }\n // Fallback to bullet list for unknown parent types\n return '- '\n },\n ctx,\n )\n },\n\n addExtensions() {\n return [\n createBranchingListDeleteKeymap(this.name, [\n this.options.bulletListTypeName,\n this.options.orderedListTypeName,\n ]),\n ]\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => this.editor.commands.splitListItem(this.name),\n Tab: () => this.editor.commands.sinkListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n },\n})\n","import { Extension } from '@tiptap/core'\n\nimport { handleDeleteBranchingNestedList } from './handleDeleteBranchingNestedList.js'\n\n/**\n * Creates a high-priority keymap extension that handles Delete for branching nested lists.\n * Kept separate from the list item node so Enter/Tab shortcuts keep their default priority.\n */\nexport const createBranchingListDeleteKeymap = (itemName: string, wrapperNames: string[]) => {\n return Extension.create({\n name: `${itemName}BranchingDeleteKeymap`,\n priority: 101,\n\n addKeyboardShortcuts() {\n const handleDelete = () =>\n handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames)\n\n return {\n Delete: handleDelete,\n 'Mod-Delete': handleDelete,\n }\n },\n })\n}\n","import { Fragment } from '@tiptap/pm/model'\nimport type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { getBranchingNestedListAtCursor } from './getBranchingNestedListAtCursor.js'\n\n/**\n * Hoists all list items from a branching nested list after the cursor into the parent list.\n *\n * Use this when `joinForward` cannot restructure a nested list that contains list items\n * with sublists (see issue #6906).\n *\n * @param state - The editor state to transform.\n * @param dispatch - Optional dispatch function for the transaction.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * // Cursor at the end of \"Item 1\" before a nested list with branching items.\n * hoistBranchingNestedList(editor.state, editor.view.dispatch, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n * ```\n */\nexport const hoistBranchingNestedList = (\n state: EditorState,\n dispatch: ((tr: Transaction) => void) | undefined,\n itemName: string,\n wrapperNames: string[],\n) => {\n const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames)\n\n if (!context) {\n return false\n }\n\n const { selection } = state\n const { nestedList, nestedListPos, insertPos, items } = context\n const tr = state.tr\n\n tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize)\n\n const mappedInsertPos = tr.mapping.map(insertPos)\n\n tr.insert(mappedInsertPos, Fragment.from(items))\n\n tr.setSelection(selection.map(tr.doc, tr.mapping))\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport type BranchingNestedListAtCursor = {\n listItemDepth: number\n nestedList: Node\n nestedListPos: number\n insertPos: number\n items: Node[]\n}\n\n/**\n * Resolves a branching nested list immediately after the cursor when the selection is\n * collapsed at the end of a textblock inside a list item.\n *\n * @param state - The editor state to inspect.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns Resolved positions and nodes for hoisting, or `null` when not applicable.\n *\n * @example\n * ```ts\n * const context = getBranchingNestedListAtCursor(editor.state, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n *\n * if (context) {\n * // cursor is at the end of Item 1 before a branching nested sublist\n * }\n * ```\n */\nexport const getBranchingNestedListAtCursor = (\n state: EditorState,\n itemName: string,\n wrapperNames: string[],\n): BranchingNestedListAtCursor | null => {\n const { selection } = state\n\n if (!selection.empty) {\n return null\n }\n\n const { $from } = selection\n\n if (!$from.parent.isTextblock) {\n return null\n }\n\n if ($from.parentOffset !== $from.parent.content.size) {\n return null\n }\n\n let listItemDepth = -1\n\n for (let depth = $from.depth; depth > 0; depth -= 1) {\n if ($from.node(depth).type.name === itemName) {\n listItemDepth = depth\n break\n }\n }\n\n if (listItemDepth < 0) {\n return null\n }\n\n const listItem = $from.node(listItemDepth)\n const indexInListItem = $from.index(listItemDepth)\n\n if (indexInListItem + 1 >= listItem.childCount) {\n return null\n }\n\n const nextChild = listItem.child(indexInListItem + 1)\n\n if (!wrapperNames.includes(nextChild.type.name)) {\n return null\n }\n\n const itemType = state.schema.nodes[itemName]\n let hasBranching = false\n\n nextChild.forEach(child => {\n if (child.type === itemType && child.childCount > 1) {\n hasBranching = true\n }\n })\n\n if (!hasBranching) {\n return null\n }\n\n const nodeAfter = state.doc.resolve($from.after()).nodeAfter\n\n if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) {\n return null\n }\n\n const items: Node[] = []\n\n nodeAfter.forEach(child => {\n items.push(child)\n })\n\n if (items.length === 0) {\n return null\n }\n\n return {\n listItemDepth,\n nestedList: nodeAfter,\n nestedListPos: $from.after(),\n insertPos: $from.after(listItemDepth),\n items,\n }\n}\n","import type { Editor } from '@tiptap/core'\n\nimport { hoistBranchingNestedList } from './hoistBranchingNestedList.js'\n\n/**\n * Handles Delete for a list item when a branching nested sublist follows the cursor.\n *\n * @param editor - The editor instance whose state should be updated.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * Delete: () =>\n * handleDeleteBranchingNestedList(editor, 'listItem', ['bulletList', 'orderedList']),\n * ```\n */\nexport const handleDeleteBranchingNestedList = (\n editor: Editor,\n itemName: string,\n wrapperNames: string[],\n) => {\n return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames)\n}\n","import { Extension } from '@tiptap/core'\n\nimport { handleBackspace, handleDelete } from './listHelpers/index.js'\n\nexport type ListKeymapOptions = {\n /**\n * An array of list types. This is used for item and wrapper list matching.\n * @default []\n * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }]\n */\n listTypes: Array<{\n itemName: string\n wrapperNames: string[]\n }>\n}\n\n/**\n * This extension registers custom keymaps to change the behaviour of the backspace and delete keys.\n * By default Prosemirror keyhandling will always lift or sink items so paragraphs are joined into\n * the adjacent or previous list item. This extension will prevent this behaviour and instead will\n * try to join paragraphs from two list items into a single list item.\n * @see https://www.tiptap.dev/api/extensions/list-keymap\n */\nexport const ListKeymap = Extension.create({\n name: 'listKeymap',\n\n addOptions() {\n return {\n listTypes: [\n {\n itemName: 'listItem',\n wrapperNames: ['bulletList', 'orderedList'],\n },\n {\n itemName: 'taskItem',\n wrapperNames: ['taskList'],\n },\n ],\n }\n },\n\n addKeyboardShortcuts() {\n return {\n Delete: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Delete': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n Backspace: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Backspace': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n }\n },\n})\n","export * from './findListItemPos.js'\nexport * from './getNextListDepth.js'\nexport * from './handleBackspace.js'\nexport * from './handleDelete.js'\nexport * from './hasListBefore.js'\nexport * from './hasListItemAfter.js'\nexport * from './hasListItemBefore.js'\nexport * from './listItemHasSubList.js'\nexport * from './nextListIsDeeper.js'\nexport * from './nextListIsHigher.js'\n","import { getNodeType } from '@tiptap/core'\nimport type { NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const findListItemPos = (typeOrName: string | NodeType, state: EditorState) => {\n const { $from } = state.selection\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let currentNode = null\n let currentDepth = $from.depth\n let currentPos = $from.pos\n let targetDepth: number | null = null\n\n while (currentDepth > 0 && targetDepth === null) {\n currentNode = $from.node(currentDepth)\n\n if (currentNode.type === nodeType) {\n targetDepth = currentDepth\n } else {\n currentDepth -= 1\n currentPos -= 1\n }\n }\n\n if (targetDepth === null) {\n return null\n }\n\n return { $pos: state.doc.resolve(currentPos), depth: targetDepth }\n}\n","import { getNodeAtPosition } from '@tiptap/core'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\n\nexport const getNextListDepth = (typeOrName: string, state: EditorState) => {\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos) {\n return false\n }\n\n const [, depth] = getNodeAtPosition(state, typeOrName, listItemPos.$pos.pos + 4)\n\n return depth\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtStartOfNode, isNodeActive } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\n\nimport { hasListBefore } from './hasListBefore.js'\n\nexport const handleBackspace = (editor: Editor, name: string, parentListTypes: string[]) => {\n // this is required to still handle the undo handling\n if (editor.commands.undoInputRule()) {\n return true\n }\n\n // if the selection is not collapsed\n // we can rely on the default backspace behavior\n if (editor.state.selection.from !== editor.state.selection.to) {\n return false\n }\n\n // if the current item is NOT inside a list item &\n // the previous item is a list (orderedList or bulletList)\n // move the cursor into the list and delete the current item\n if (!isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) {\n const { $anchor } = editor.state.selection\n\n const $listPos = editor.state.doc.resolve($anchor.before() - 1)\n\n const listDescendants: Array<{ node: Node; pos: number }> = []\n\n $listPos.node().descendants((node, pos) => {\n if (node.type.name === name) {\n listDescendants.push({ node, pos })\n }\n })\n\n const lastItem = listDescendants.at(-1)\n\n if (!lastItem) {\n return false\n }\n\n const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1)\n\n return editor\n .chain()\n .cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end())\n .joinForward()\n .run()\n }\n\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the start of a node\n // do nothing and proceed\n if (!isAtStartOfNode(editor.state)) {\n return false\n }\n\n // At the start of a list item, lift it out. Top-level items split the\n // wrapping list around them; nested items get promoted into the outer\n // list. A second backspace then falls through to the merge branch above.\n return editor.chain().liftListItem(name).run()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListBefore = (\n editorState: EditorState,\n name: string,\n parentListTypes: string[],\n) => {\n const { $anchor } = editorState.selection\n\n const previousNodePos = Math.max(0, $anchor.pos - 2)\n\n const previousNode = editorState.doc.resolve(previousNodePos).node()\n\n if (!previousNode || !parentListTypes.includes(previousNode.type.name)) {\n return false\n }\n\n return true\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtEndOfNode, isNodeActive } from '@tiptap/core'\n\nimport { nextListIsDeeper } from './nextListIsDeeper.js'\nimport { nextListIsHigher } from './nextListIsHigher.js'\n\nexport const handleDelete = (editor: Editor, name: string) => {\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the end of a node\n // do nothing and proceed\n if (!isAtEndOfNode(editor.state, name)) {\n return false\n }\n\n // if the selection is not collapsed, or not within a single node\n // do nothing and proceed\n const { selection } = editor.state\n const { $from, $to } = selection\n\n if (!selection.empty && $from.sameParent($to)) {\n return false\n }\n\n // check if the next node is a list with a deeper depth\n if (nextListIsDeeper(name, editor.state)) {\n return editor\n .chain()\n .focus(editor.state.selection.from + 4)\n .lift(name)\n .joinBackward()\n .run()\n }\n\n if (nextListIsHigher(name, editor.state)) {\n return editor.chain().joinForward().joinBackward().run()\n }\n\n return editor.commands.joinItemForward()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsDeeper = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth > listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsHigher = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth < listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemAfter = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2)\n\n if ($targetPos.index() === $targetPos.parent.childCount - 1) {\n return false\n }\n\n if ($targetPos.nodeAfter?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemBefore = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - 2)\n\n if ($targetPos.index() === 0) {\n return false\n }\n\n if ($targetPos.nodeBefore?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import { getNodeType } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const listItemHasSubList = (typeOrName: string, state: EditorState, node?: Node) => {\n if (!node) {\n return false\n }\n\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let hasSubList = false\n\n node.descendants(child => {\n if (child.type === nodeType) {\n hasSubList = true\n }\n })\n\n return hasSubList\n}\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nimport { buildNestedStructure, collectOrderedListItems, parseListItems } from './utils.js'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface OrderedListOptions {\n /**\n * The node type name for list items.\n * @default 'listItem'\n * @example 'myListItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for an ordered list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting a list item.\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting a list item.\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n orderedList: {\n /**\n * Toggle an ordered list\n * @example editor.commands.toggleOrderedList()\n */\n toggleOrderedList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches an ordered list to a 1. on input (or any number followed by a dot).\n */\nexport const orderedListInputRegex = /^(\\d+)\\.\\s$/\n\n/**\n * This extension allows you to create ordered lists.\n * This requires the ListItem extension\n * @see https://www.tiptap.dev/api/nodes/ordered-list\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const OrderedList = Node.create({\n name: 'orderedList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n addAttributes() {\n return {\n start: {\n default: 1,\n parseHTML: element => {\n return element.hasAttribute('start')\n ? parseInt(element.getAttribute('start') || '', 10)\n : 1\n },\n },\n type: {\n default: null,\n parseHTML: element => element.getAttribute('type'),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'ol',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n const { start, ...attributesWithoutStart } = HTMLAttributes\n\n return start === 1\n ? ['ol', mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0]\n : ['ol', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || !token.ordered) {\n return []\n }\n\n const startValue = token.start || 1\n const content = token.items ? parseListItems(token.items, helpers) : []\n\n if (startValue !== 1) {\n return {\n type: 'orderedList',\n attrs: { start: startValue },\n content,\n }\n }\n\n return {\n type: 'orderedList',\n content,\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'orderedList',\n level: 'block',\n start: (src: string) => {\n const match = src.match(/^(\\s*)(\\d+)\\.\\s+/)\n const index = match?.index\n return index !== undefined ? index : -1\n },\n tokenize: (src: string, _tokens, lexer) => {\n const lines = src.split('\\n')\n const [listItems, consumed] = collectOrderedListItems(lines)\n\n if (listItems.length === 0) {\n return undefined\n }\n\n const items = buildNestedStructure(listItems, 0, lexer)\n\n if (items.length === 0) {\n return undefined\n }\n\n const startValue = listItems[0]?.number || 1\n\n return {\n type: 'list',\n ordered: true,\n start: startValue,\n items,\n raw: lines.slice(0, consumed).join('\\n'),\n } as unknown as object\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleOrderedList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-7': () => this.editor.commands.toggleOrderedList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n getAttributes: match => ({ start: +match[1] }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n","import type {\n JSONContent,\n MarkdownLexerConfiguration,\n MarkdownParseHelpers,\n MarkdownToken,\n} from '@tiptap/core'\n\n/**\n * Matches an ordered list item line with optional leading whitespace.\n * Captures: (1) indentation spaces, (2) item number, (3) content after marker\n * Example matches: \"1. Item\", \" 2. Nested item\", \" 3. Deeply nested\"\n */\nconst ORDERED_LIST_ITEM_REGEX = /^(\\s*)(\\d+)\\.\\s+(.*)$/\n\n/**\n * Matches any line that starts with whitespace (indented content).\n * Used to identify continuation content that belongs to a list item.\n */\nconst INDENTED_LINE_REGEX = /^\\s/\n\n/**\n * Represents a parsed ordered list item with indentation information\n */\nexport interface OrderedListItem {\n indent: number\n number: number\n content: string\n contentLines: string[]\n raw: string\n}\n\nfunction isBlockContentLine(line: string): boolean {\n const trimmedLine = line.trimStart()\n\n return (\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^[-+*]\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^\\d+\\.\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^>\\s?/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^```/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^~~~/.test(trimmedLine)\n )\n}\n\nfunction splitItemContent(contentLines: string[]): {\n paragraphLines: string[]\n blockLines: string[]\n} {\n const paragraphLines: string[] = []\n const blockLines: string[] = []\n let reachedBlockBoundary = false\n\n contentLines.forEach(line => {\n if (reachedBlockBoundary) {\n blockLines.push(line)\n return\n }\n\n if (line.trim() === '') {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n if (paragraphLines.length > 0 && isBlockContentLine(line)) {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n paragraphLines.push(line)\n })\n\n return {\n paragraphLines,\n blockLines,\n }\n}\n\n/**\n * Collects all ordered list items from lines, parsing them into a flat array\n * with indentation information. Stops collecting continuation content when\n * encountering nested list items, allowing them to be processed separately.\n *\n * @param lines - Array of source lines to parse\n * @returns Tuple of [listItems array, number of lines consumed]\n */\nexport function collectOrderedListItems(lines: string[]): [OrderedListItem[], number] {\n const listItems: OrderedListItem[] = []\n let currentLineIndex = 0\n let consumed = 0\n\n while (currentLineIndex < lines.length) {\n const line = lines[currentLineIndex]\n const match = line.match(ORDERED_LIST_ITEM_REGEX)\n\n if (!match) {\n break\n }\n\n const [, indent, number, content] = match\n const indentLevel = indent.length\n const itemContentLines = [content]\n let nextLineIndex = currentLineIndex + 1\n const itemLines = [line]\n let sawBlankLine = false\n\n // Collect continuation lines for this item (but NOT nested list items)\n while (nextLineIndex < lines.length) {\n const nextLine = lines[nextLineIndex]\n const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX)\n\n // If it's another list item (nested or not), stop collecting\n if (nextMatch) {\n break\n }\n\n // Check for continuation content (non-list content)\n if (nextLine.trim() === '') {\n // Empty line\n itemLines.push(nextLine)\n itemContentLines.push('')\n sawBlankLine = true\n nextLineIndex += 1\n } else if (nextLine.match(INDENTED_LINE_REGEX)) {\n // Indented content - part of this item (but not a list item)\n itemLines.push(nextLine)\n itemContentLines.push(nextLine.slice(indentLevel + 2))\n nextLineIndex += 1\n } else {\n if (sawBlankLine) {\n break\n }\n\n itemLines.push(nextLine)\n itemContentLines.push(nextLine)\n nextLineIndex += 1\n }\n }\n\n listItems.push({\n indent: indentLevel,\n number: parseInt(number, 10),\n content: itemContentLines.join('\\n').trim(),\n contentLines: itemContentLines,\n raw: itemLines.join('\\n'),\n })\n\n consumed = nextLineIndex\n currentLineIndex = nextLineIndex\n }\n\n return [listItems, consumed]\n}\n\n/**\n * Recursively builds a nested structure from a flat array of list items\n * based on their indentation levels. Creates proper markdown tokens with\n * nested lists where appropriate.\n *\n * @param items - Flat array of list items with indentation info\n * @param baseIndent - The indentation level to process at this recursion level\n * @param lexer - Markdown lexer for parsing inline and block content\n * @returns Array of list_item tokens with proper nesting\n */\nexport function buildNestedStructure(\n items: OrderedListItem[],\n baseIndent: number,\n lexer: MarkdownLexerConfiguration,\n): unknown[] {\n const result: unknown[] = []\n let currentIndex = 0\n\n while (currentIndex < items.length) {\n const item = items[currentIndex]\n\n if (item.indent === baseIndent) {\n // This item belongs at the current level\n const { paragraphLines, blockLines } = splitItemContent(item.contentLines)\n const mainText = paragraphLines.join('\\n').trim()\n\n const tokens = []\n\n // Always wrap the main text in a paragraph token\n if (mainText) {\n tokens.push({\n type: 'paragraph',\n raw: mainText,\n tokens: lexer.inlineTokens(mainText),\n })\n }\n\n const additionalContent = blockLines.join('\\n').trim()\n if (additionalContent) {\n const blockTokens = lexer.blockTokens(additionalContent)\n tokens.push(...blockTokens)\n }\n\n // Look ahead to find nested items at deeper indent levels\n let lookAheadIndex = currentIndex + 1\n const nestedItems = []\n\n while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) {\n nestedItems.push(items[lookAheadIndex])\n lookAheadIndex += 1\n }\n\n // If we have nested items, recursively build their structure\n if (nestedItems.length > 0) {\n // Find the next indent level (immediate children)\n const nextIndent = Math.min(...nestedItems.map(nestedItem => nestedItem.indent))\n\n // Build the nested list recursively with all nested items\n // The recursive call will handle further nesting\n const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer)\n\n // Create a nested list token\n tokens.push({\n type: 'list',\n ordered: true,\n start: nestedItems[0].number,\n items: nestedListItems,\n raw: nestedItems.map(nestedItem => nestedItem.raw).join('\\n'),\n })\n }\n\n result.push({\n type: 'list_item',\n raw: item.raw,\n tokens,\n })\n\n // Skip the nested items we just processed\n currentIndex = lookAheadIndex\n } else {\n // This item has deeper indent than we're currently processing\n // It should be handled by a recursive call\n currentIndex += 1\n }\n }\n\n return result\n}\n\n/**\n * Parses markdown list item tokens into Tiptap JSONContent structure,\n * ensuring text content is properly wrapped in paragraph nodes.\n *\n * @param items - Array of markdown tokens representing list items\n * @param helpers - Markdown parse helpers for recursive parsing\n * @returns Array of listItem JSONContent nodes\n */\nexport function parseListItems(\n items: MarkdownToken[],\n helpers: MarkdownParseHelpers,\n): JSONContent[] {\n return items.map(item => {\n if (item.type !== 'list_item') {\n return helpers.parseChildren([item])[0]\n }\n\n // Parse the tokens within the list item\n const content: JSONContent[] = []\n\n if (item.tokens && item.tokens.length > 0) {\n item.tokens.forEach(itemToken => {\n // If it's already a proper block node (paragraph, list, etc.), parse it directly\n if (\n itemToken.type === 'paragraph' ||\n itemToken.type === 'list' ||\n itemToken.type === 'blockquote' ||\n itemToken.type === 'code'\n ) {\n content.push(...helpers.parseChildren([itemToken]))\n } else if (itemToken.type === 'text' && itemToken.tokens) {\n // If it's inline text tokens, wrap them in a paragraph\n const inlineContent = helpers.parseChildren([itemToken])\n content.push({\n type: 'paragraph',\n content: inlineContent,\n })\n } else {\n // For any other content, try to parse it\n const parsed = helpers.parseChildren([itemToken])\n if (parsed.length > 0) {\n content.push(...parsed)\n }\n }\n })\n }\n\n return {\n type: 'listItem',\n content,\n }\n })\n}\n","import type { KeyboardShortcutCommand } from '@tiptap/core'\nimport {\n getRenderedAttributes,\n mergeAttributes,\n Node,\n renderNestedMarkdownContent,\n wrappingInputRule,\n} from '@tiptap/core'\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface TaskItemOptions {\n /**\n * A callback function that is called when the checkbox is clicked while the editor is in readonly mode.\n * @param node The prosemirror node of the task item\n * @param checked The new checked state\n * @returns boolean\n */\n onReadOnlyChecked?: (node: ProseMirrorNode, checked: boolean) => boolean\n\n /**\n * Controls whether the task items can be nested or not.\n * @default false\n * @example true\n */\n nested: boolean\n\n /**\n * HTML attributes to add to the task item element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for taskList nodes\n * @default 'taskList'\n * @example 'myCustomTaskList'\n */\n taskListTypeName: string\n\n /**\n * Accessibility options for the task item.\n * @default {}\n * @example\n * ```js\n * {\n * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}`\n * }\n */\n a11y?: {\n checkboxLabel?: (node: ProseMirrorNode, checked: boolean) => string\n }\n}\n\n/**\n * Matches a task item to a - [ ] on input.\n */\nexport const inputRegex = /^\\s*(\\[([( |x])?\\])\\s$/\n\n/**\n * This extension allows you to create task items.\n * @see https://www.tiptap.dev/api/nodes/task-item\n */\nexport const TaskItem = Node.create({\n name: 'taskItem',\n\n addOptions() {\n return {\n nested: false,\n HTMLAttributes: {},\n taskListTypeName: 'taskList',\n a11y: undefined,\n }\n },\n\n content() {\n return this.options.nested ? 'paragraph block*' : 'paragraph+'\n },\n\n defining: true,\n\n addAttributes() {\n return {\n checked: {\n default: false,\n keepOnSplit: false,\n parseHTML: element => {\n const dataChecked = element.getAttribute('data-checked')\n\n return dataChecked === '' || dataChecked === 'true'\n },\n renderHTML: attributes => ({\n 'data-checked': attributes.checked,\n }),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: `li[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ node, HTMLAttributes }) {\n return [\n 'li',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {\n 'data-type': this.name,\n }),\n [\n 'label',\n [\n 'input',\n {\n type: 'checkbox',\n checked: node.attrs.checked ? 'checked' : null,\n },\n ],\n ['span'],\n ],\n ['div', 0],\n ]\n },\n\n parseMarkdown: (token, h) => {\n // Parse the task item's text content into paragraph content\n const content = []\n\n // First, add the main paragraph content\n if (token.tokens && token.tokens.length > 0) {\n // If we have tokens, create a paragraph with the inline content\n content.push(h.createNode('paragraph', {}, h.parseInline(token.tokens)))\n } else if (token.text) {\n // If we have raw text, create a paragraph with text node\n content.push(h.createNode('paragraph', {}, [h.createNode('text', { text: token.text })]))\n } else {\n // Fallback: empty paragraph\n content.push(h.createNode('paragraph', {}, []))\n }\n\n // Then, add any nested content (like nested task lists)\n if (token.nestedTokens && token.nestedTokens.length > 0) {\n const nestedContent = h.parseChildren(token.nestedTokens)\n content.push(...nestedContent)\n }\n\n return h.createNode('taskItem', { checked: token.checked || false }, content)\n },\n\n renderMarkdown: (node, h) => {\n const checkedChar = node.attrs?.checked ? 'x' : ' '\n const prefix = `- [${checkedChar}] `\n\n return renderNestedMarkdownContent(node, h, prefix)\n },\n\n addExtensions() {\n if (!this.options.nested) {\n return []\n }\n\n return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]\n },\n\n addKeyboardShortcuts() {\n const shortcuts: {\n [key: string]: KeyboardShortcutCommand\n } = {\n Enter: () => this.editor.commands.splitListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n\n if (!this.options.nested) {\n return shortcuts\n }\n\n return {\n ...shortcuts,\n Tab: () => this.editor.commands.sinkListItem(this.name),\n }\n },\n\n addNodeView() {\n return ({ node, HTMLAttributes, getPos, editor }) => {\n const listItem = document.createElement('li')\n const checkboxWrapper = document.createElement('label')\n const checkboxStyler = document.createElement('span')\n const checkbox = document.createElement('input')\n const content = document.createElement('div')\n\n const updateA11Y = (currentNode: ProseMirrorNode) => {\n checkbox.ariaLabel =\n this.options.a11y?.checkboxLabel?.(currentNode, checkbox.checked) ||\n `Task item checkbox for ${currentNode.textContent || 'empty task item'}`\n }\n\n updateA11Y(node)\n\n checkboxWrapper.contentEditable = 'false'\n checkbox.type = 'checkbox'\n checkbox.addEventListener('mousedown', event => event.preventDefault())\n checkbox.addEventListener('change', event => {\n // if the editor isn’t editable and we don't have a handler for\n // readonly checks we have to undo the latest change\n if (!editor.isEditable && !this.options.onReadOnlyChecked) {\n checkbox.checked = !checkbox.checked\n\n return\n }\n\n const { checked } = event.target as any\n\n if (editor.isEditable && typeof getPos === 'function') {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .command(({ tr }) => {\n const position = getPos()\n\n if (typeof position !== 'number') {\n return false\n }\n const currentNode = tr.doc.nodeAt(position)\n\n tr.setNodeMarkup(position, undefined, {\n ...currentNode?.attrs,\n checked,\n })\n\n return true\n })\n .run()\n }\n if (!editor.isEditable && this.options.onReadOnlyChecked) {\n // Reset state if onReadOnlyChecked returns false\n if (!this.options.onReadOnlyChecked(node, checked)) {\n checkbox.checked = !checkbox.checked\n }\n }\n })\n\n Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n listItem.dataset.checked = node.attrs.checked\n checkbox.checked = node.attrs.checked\n\n checkboxWrapper.append(checkbox, checkboxStyler)\n listItem.append(checkboxWrapper, content)\n\n Object.entries(HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n // Track the keys of previously rendered HTML attributes for proper removal\n let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes))\n\n return {\n dom: listItem,\n contentDOM: content,\n update: updatedNode => {\n if (updatedNode.type !== this.type) {\n return false\n }\n\n listItem.dataset.checked = updatedNode.attrs.checked\n checkbox.checked = updatedNode.attrs.checked\n updateA11Y(updatedNode)\n\n // Sync all HTML attributes from the updated node\n const extensionAttributes = editor.extensionManager.attributes\n const newHTMLAttributes = getRenderedAttributes(updatedNode, extensionAttributes)\n const newKeys = new Set(Object.keys(newHTMLAttributes))\n\n // Remove attributes that were previously rendered but are no longer present\n // If the attribute exists in static options, restore it instead of removing\n const staticAttrs = this.options.HTMLAttributes\n\n prevRenderedAttributeKeys.forEach(key => {\n if (!newKeys.has(key)) {\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n }\n })\n\n // Update or add new attributes\n Object.entries(newHTMLAttributes).forEach(([key, value]) => {\n if (value === null || value === undefined) {\n // If the attribute exists in static options, restore it instead of removing\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n } else {\n listItem.setAttribute(key, value)\n }\n })\n\n // Update the tracked keys for next update\n prevRenderedAttributeKeys = newKeys\n\n return true\n },\n }\n }\n },\n\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n getAttributes: match => ({\n checked: match[match.length - 1] === 'x',\n }),\n }),\n ]\n },\n})\n","import { mergeAttributes, Node, parseIndentedBlocks } from '@tiptap/core'\n\nexport interface TaskListOptions {\n /**\n * The node type name for a task item.\n * @default 'taskItem'\n * @example 'myCustomTaskItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for a task list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n taskList: {\n /**\n * Toggle a task list\n * @example editor.commands.toggleTaskList()\n */\n toggleTaskList: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to create task lists.\n * @see https://www.tiptap.dev/api/nodes/task-list\n */\nexport const TaskList = Node.create({\n name: 'taskList',\n\n addOptions() {\n return {\n itemTypeName: 'taskItem',\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [\n {\n tag: `ul[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'ul',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }),\n 0,\n ]\n },\n\n parseMarkdown: (token, h) => {\n return h.createNode('taskList', {}, h.parseChildren(token.items || []))\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'taskList',\n level: 'block',\n start(src) {\n // Look for the start of a task list item\n const index = src.match(/^\\s*[-+*]\\s+\\[([ xX])\\]\\s+/)?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, tokens, lexer) {\n // Helper function to recursively parse task lists\n const parseTaskListContent = (content: string): any[] | undefined => {\n const nestedResult = parseIndentedBlocks(\n content,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Allow recursive nesting\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (nestedResult) {\n // Return as task list token\n return [\n {\n type: 'taskList',\n raw: nestedResult.raw,\n items: nestedResult.items,\n },\n ]\n }\n\n // Fall back to regular markdown parsing if not a task list\n return lexer.blockTokens(content)\n }\n\n const result = parseIndentedBlocks(\n src,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Use the recursive parser for nested content\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (!result) {\n return undefined\n }\n\n return {\n type: 'taskList',\n raw: result.raw,\n items: result.items,\n }\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleTaskList:\n () =>\n ({ commands }) => {\n return commands.toggleList(this.name, this.options.it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Q,aAAa,OAAO;AACnC,iBAAW,KAAK,SAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC3D;AAEA,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,WAAW,UAAU,KAAK,QAAQ,UAAU,CAAC;AAAA,IAC/D;AAEA,QAAI,KAAK,QAAQ,gBAAgB,OAAO;AACtC,iBAAW,KAAK,YAAY,UAAU,KAAK,QAAQ,WAAW,CAAC;AAAA,IACjE;AAEA,QAAI,KAAK,QAAQ,aAAa,OAAO;AACnC,iBAAW,KAAK,SAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC3D;AAEA,QAAI,KAAK,QAAQ,aAAa,OAAO;AACnC,iBAAW,KAAK,SAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC3D;AAEA,WAAO;AAAA,EACT;AACF,CAAC;","names":["import_core","import_core","import_core","handleDelete","import_core","import_core","import_core","import_core","import_core","import_core","import_core","ListItemName","TextStyleName","import_core","import_core"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.d.cts deleted file mode 100644 index 0af5e57..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.d.cts +++ /dev/null @@ -1,212 +0,0 @@ -import { Extension } from '@tiptap/core'; -import { Node } from '@tiptap/pm/model'; - -interface BulletListOptions { - /** - * The node name for the list items - * @default 'listItem' - * @example 'paragraph' - */ - itemTypeName: string; - /** - * HTML attributes to add to the bullet list element - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting the list - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting the list - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - bulletList: { - /** - * Toggle a bullet list - */ - toggleBulletList: () => ReturnType; - }; - } -} - -interface ListItemOptions { - /** - * The HTML attributes for a list item node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for bulletList nodes - * @default 'bulletList' - * @example 'myCustomBulletList' - */ - bulletListTypeName: string; - /** - * The node type for orderedList nodes - * @default 'orderedList' - * @example 'myCustomOrderedList' - */ - orderedListTypeName: string; -} - -type ListKeymapOptions = { - /** - * An array of list types. This is used for item and wrapper list matching. - * @default [] - * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }] - */ - listTypes: Array<{ - itemName: string; - wrapperNames: string[]; - }>; -}; - -interface OrderedListOptions { - /** - * The node type name for list items. - * @default 'listItem' - * @example 'myListItem' - */ - itemTypeName: string; - /** - * The HTML attributes for an ordered list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting a list item. - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting a list item. - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - orderedList: { - /** - * Toggle an ordered list - * @example editor.commands.toggleOrderedList() - */ - toggleOrderedList: () => ReturnType; - }; - } -} - -interface TaskItemOptions { - /** - * A callback function that is called when the checkbox is clicked while the editor is in readonly mode. - * @param node The prosemirror node of the task item - * @param checked The new checked state - * @returns boolean - */ - onReadOnlyChecked?: (node: Node, checked: boolean) => boolean; - /** - * Controls whether the task items can be nested or not. - * @default false - * @example true - */ - nested: boolean; - /** - * HTML attributes to add to the task item element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for taskList nodes - * @default 'taskList' - * @example 'myCustomTaskList' - */ - taskListTypeName: string; - /** - * Accessibility options for the task item. - * @default {} - * @example - * ```js - * { - * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}` - * } - */ - a11y?: { - checkboxLabel?: (node: Node, checked: boolean) => string; - }; -} - -interface TaskListOptions { - /** - * The node type name for a task item. - * @default 'taskItem' - * @example 'myCustomTaskItem' - */ - itemTypeName: string; - /** - * The HTML attributes for a task list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - taskList: { - /** - * Toggle a task list - * @example editor.commands.toggleTaskList() - */ - toggleTaskList: () => ReturnType; - }; - } -} - -interface ListKitOptions { - /** - * If set to false, the bulletList extension will not be registered - * @example table: false - */ - bulletList: Partial | false; - /** - * If set to false, the listItem extension will not be registered - */ - listItem: Partial | false; - /** - * If set to false, the listKeymap extension will not be registered - */ - listKeymap: Partial | false; - /** - * If set to false, the orderedList extension will not be registered - */ - orderedList: Partial | false; - /** - * If set to false, the taskItem extension will not be registered - */ - taskItem: Partial | false; - /** - * If set to false, the taskList extension will not be registered - */ - taskList: Partial | false; -} -/** - * The table kit is a collection of table editor extensions. - * - * It’s a good starting point for building your own table in Tiptap. - */ -declare const ListKit: Extension; - -export { ListKit, type ListKitOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.d.ts deleted file mode 100644 index 0af5e57..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.d.ts +++ /dev/null @@ -1,212 +0,0 @@ -import { Extension } from '@tiptap/core'; -import { Node } from '@tiptap/pm/model'; - -interface BulletListOptions { - /** - * The node name for the list items - * @default 'listItem' - * @example 'paragraph' - */ - itemTypeName: string; - /** - * HTML attributes to add to the bullet list element - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting the list - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting the list - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - bulletList: { - /** - * Toggle a bullet list - */ - toggleBulletList: () => ReturnType; - }; - } -} - -interface ListItemOptions { - /** - * The HTML attributes for a list item node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for bulletList nodes - * @default 'bulletList' - * @example 'myCustomBulletList' - */ - bulletListTypeName: string; - /** - * The node type for orderedList nodes - * @default 'orderedList' - * @example 'myCustomOrderedList' - */ - orderedListTypeName: string; -} - -type ListKeymapOptions = { - /** - * An array of list types. This is used for item and wrapper list matching. - * @default [] - * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }] - */ - listTypes: Array<{ - itemName: string; - wrapperNames: string[]; - }>; -}; - -interface OrderedListOptions { - /** - * The node type name for list items. - * @default 'listItem' - * @example 'myListItem' - */ - itemTypeName: string; - /** - * The HTML attributes for an ordered list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting a list item. - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting a list item. - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - orderedList: { - /** - * Toggle an ordered list - * @example editor.commands.toggleOrderedList() - */ - toggleOrderedList: () => ReturnType; - }; - } -} - -interface TaskItemOptions { - /** - * A callback function that is called when the checkbox is clicked while the editor is in readonly mode. - * @param node The prosemirror node of the task item - * @param checked The new checked state - * @returns boolean - */ - onReadOnlyChecked?: (node: Node, checked: boolean) => boolean; - /** - * Controls whether the task items can be nested or not. - * @default false - * @example true - */ - nested: boolean; - /** - * HTML attributes to add to the task item element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for taskList nodes - * @default 'taskList' - * @example 'myCustomTaskList' - */ - taskListTypeName: string; - /** - * Accessibility options for the task item. - * @default {} - * @example - * ```js - * { - * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}` - * } - */ - a11y?: { - checkboxLabel?: (node: Node, checked: boolean) => string; - }; -} - -interface TaskListOptions { - /** - * The node type name for a task item. - * @default 'taskItem' - * @example 'myCustomTaskItem' - */ - itemTypeName: string; - /** - * The HTML attributes for a task list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - taskList: { - /** - * Toggle a task list - * @example editor.commands.toggleTaskList() - */ - toggleTaskList: () => ReturnType; - }; - } -} - -interface ListKitOptions { - /** - * If set to false, the bulletList extension will not be registered - * @example table: false - */ - bulletList: Partial | false; - /** - * If set to false, the listItem extension will not be registered - */ - listItem: Partial | false; - /** - * If set to false, the listKeymap extension will not be registered - */ - listKeymap: Partial | false; - /** - * If set to false, the orderedList extension will not be registered - */ - orderedList: Partial | false; - /** - * If set to false, the taskItem extension will not be registered - */ - taskItem: Partial | false; - /** - * If set to false, the taskList extension will not be registered - */ - taskList: Partial | false; -} -/** - * The table kit is a collection of table editor extensions. - * - * It’s a good starting point for building your own table in Tiptap. - */ -declare const ListKit: Extension; - -export { ListKit, type ListKitOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.js deleted file mode 100644 index 9b6e509..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.js +++ /dev/null @@ -1,1285 +0,0 @@ -var __defProp = Object.defineProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; - -// src/kit/index.ts -import { Extension as Extension3 } from "@tiptap/core"; - -// src/bullet-list/bullet-list.ts -import { mergeAttributes, Node, wrappingInputRule } from "@tiptap/core"; -var ListItemName = "listItem"; -var TextStyleName = "textStyle"; -var bulletListInputRegex = /^\s*([-+*])\s$/; -var BulletList = Node.create({ - name: "bulletList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [{ tag: "ul" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["ul", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || token.ordered) { - return []; - } - return { - type: "bulletList", - content: token.items ? helpers.parseChildren(token.items) : [] - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleBulletList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-8": () => this.editor.commands.toggleBulletList() - }; - }, - addInputRules() { - let inputRule = wrappingInputRule({ - find: bulletListInputRegex, - type: this.type - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = wrappingInputRule({ - find: bulletListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: () => { - return this.editor.getAttributes(TextStyleName); - }, - editor: this.editor - }); - } - return [inputRule]; - } -}); - -// src/item/list-item.ts -import { mergeAttributes as mergeAttributes2, Node as Node2, renderNestedMarkdownContent } from "@tiptap/core"; - -// src/helpers/createBranchingListDeleteKeymap.ts -import { Extension } from "@tiptap/core"; - -// src/helpers/hoistBranchingNestedList.ts -import { Fragment } from "@tiptap/pm/model"; - -// src/helpers/getBranchingNestedListAtCursor.ts -var getBranchingNestedListAtCursor = (state, itemName, wrapperNames) => { - const { selection } = state; - if (!selection.empty) { - return null; - } - const { $from } = selection; - if (!$from.parent.isTextblock) { - return null; - } - if ($from.parentOffset !== $from.parent.content.size) { - return null; - } - let listItemDepth = -1; - for (let depth = $from.depth; depth > 0; depth -= 1) { - if ($from.node(depth).type.name === itemName) { - listItemDepth = depth; - break; - } - } - if (listItemDepth < 0) { - return null; - } - const listItem = $from.node(listItemDepth); - const indexInListItem = $from.index(listItemDepth); - if (indexInListItem + 1 >= listItem.childCount) { - return null; - } - const nextChild = listItem.child(indexInListItem + 1); - if (!wrapperNames.includes(nextChild.type.name)) { - return null; - } - const itemType = state.schema.nodes[itemName]; - let hasBranching = false; - nextChild.forEach((child) => { - if (child.type === itemType && child.childCount > 1) { - hasBranching = true; - } - }); - if (!hasBranching) { - return null; - } - const nodeAfter = state.doc.resolve($from.after()).nodeAfter; - if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) { - return null; - } - const items = []; - nodeAfter.forEach((child) => { - items.push(child); - }); - if (items.length === 0) { - return null; - } - return { - listItemDepth, - nestedList: nodeAfter, - nestedListPos: $from.after(), - insertPos: $from.after(listItemDepth), - items - }; -}; - -// src/helpers/hoistBranchingNestedList.ts -var hoistBranchingNestedList = (state, dispatch, itemName, wrapperNames) => { - const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames); - if (!context) { - return false; - } - const { selection } = state; - const { nestedList, nestedListPos, insertPos, items } = context; - const tr = state.tr; - tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize); - const mappedInsertPos = tr.mapping.map(insertPos); - tr.insert(mappedInsertPos, Fragment.from(items)); - tr.setSelection(selection.map(tr.doc, tr.mapping)); - if (dispatch) { - dispatch(tr); - } - return true; -}; - -// src/helpers/handleDeleteBranchingNestedList.ts -var handleDeleteBranchingNestedList = (editor, itemName, wrapperNames) => { - return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames); -}; - -// src/helpers/createBranchingListDeleteKeymap.ts -var createBranchingListDeleteKeymap = (itemName, wrapperNames) => { - return Extension.create({ - name: `${itemName}BranchingDeleteKeymap`, - priority: 101, - addKeyboardShortcuts() { - const handleDelete2 = () => handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames); - return { - Delete: handleDelete2, - "Mod-Delete": handleDelete2 - }; - } - }); -}; - -// src/item/list-item.ts -function isSameLineOrderedListToken(token) { - var _a, _b; - const nestedToken = (_a = token.tokens) == null ? void 0 : _a[0]; - return Boolean( - token.text && ((_b = token.tokens) == null ? void 0 : _b.length) === 1 && (nestedToken == null ? void 0 : nestedToken.type) === "list" && nestedToken.ordered && nestedToken.raw === token.text - ); -} -function parseSameLineOrderedListText(text, helpers) { - if (helpers.tokenizeInline) { - return helpers.parseInline(helpers.tokenizeInline(text)); - } - return helpers.parseInline([ - { - type: "text", - raw: text, - text - } - ]); -} -var ListItem = Node2.create({ - name: "listItem", - addOptions() { - return { - HTMLAttributes: {}, - bulletListTypeName: "bulletList", - orderedListTypeName: "orderedList" - }; - }, - content: "paragraph block*", - defining: true, - parseHTML() { - return [ - { - tag: "li" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["li", mergeAttributes2(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list_item", - parseMarkdown: (token, helpers) => { - var _a; - if (token.type !== "list_item") { - return []; - } - const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren; - let content = []; - if (token.tokens && token.tokens.length > 0) { - if (isSameLineOrderedListToken(token)) { - return { - type: "listItem", - content: [ - { - type: "paragraph", - content: parseSameLineOrderedListText(token.text || "", helpers) - } - ] - }; - } - const hasParagraphTokens = token.tokens.some((t) => t.type === "paragraph"); - if (hasParagraphTokens) { - content = parseBlockChildren(token.tokens); - } else { - const firstToken = token.tokens[0]; - if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) { - const inlineContent = helpers.parseInline(firstToken.tokens); - content = [ - { - type: "paragraph", - content: inlineContent - } - ]; - if (token.tokens.length > 1) { - const remainingTokens = token.tokens.slice(1); - const additionalContent = parseBlockChildren(remainingTokens); - content.push(...additionalContent); - } - } else { - content = parseBlockChildren(token.tokens); - } - } - } - if (content.length === 0) { - content = [ - { - type: "paragraph", - content: [] - } - ]; - } - return { - type: "listItem", - content - }; - }, - renderMarkdown: (node, h, ctx) => { - return renderNestedMarkdownContent( - node, - h, - (context) => { - var _a, _b; - if (context.parentType === "bulletList") { - return "- "; - } - if (context.parentType === "orderedList") { - const start = ((_b = (_a = context.meta) == null ? void 0 : _a.parentAttrs) == null ? void 0 : _b.start) || 1; - return `${start + context.index}. `; - } - return "- "; - }, - ctx - ); - }, - addExtensions() { - return [ - createBranchingListDeleteKeymap(this.name, [ - this.options.bulletListTypeName, - this.options.orderedListTypeName - ]) - ]; - }, - addKeyboardShortcuts() { - return { - Enter: () => this.editor.commands.splitListItem(this.name), - Tab: () => this.editor.commands.sinkListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - } -}); - -// src/keymap/list-keymap.ts -import { Extension as Extension2 } from "@tiptap/core"; - -// src/keymap/listHelpers/index.ts -var listHelpers_exports = {}; -__export(listHelpers_exports, { - findListItemPos: () => findListItemPos, - getNextListDepth: () => getNextListDepth, - handleBackspace: () => handleBackspace, - handleDelete: () => handleDelete, - hasListBefore: () => hasListBefore, - hasListItemAfter: () => hasListItemAfter, - hasListItemBefore: () => hasListItemBefore, - listItemHasSubList: () => listItemHasSubList, - nextListIsDeeper: () => nextListIsDeeper, - nextListIsHigher: () => nextListIsHigher -}); - -// src/keymap/listHelpers/findListItemPos.ts -import { getNodeType } from "@tiptap/core"; -var findListItemPos = (typeOrName, state) => { - const { $from } = state.selection; - const nodeType = getNodeType(typeOrName, state.schema); - let currentNode = null; - let currentDepth = $from.depth; - let currentPos = $from.pos; - let targetDepth = null; - while (currentDepth > 0 && targetDepth === null) { - currentNode = $from.node(currentDepth); - if (currentNode.type === nodeType) { - targetDepth = currentDepth; - } else { - currentDepth -= 1; - currentPos -= 1; - } - } - if (targetDepth === null) { - return null; - } - return { $pos: state.doc.resolve(currentPos), depth: targetDepth }; -}; - -// src/keymap/listHelpers/getNextListDepth.ts -import { getNodeAtPosition } from "@tiptap/core"; -var getNextListDepth = (typeOrName, state) => { - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos) { - return false; - } - const [, depth] = getNodeAtPosition(state, typeOrName, listItemPos.$pos.pos + 4); - return depth; -}; - -// src/keymap/listHelpers/handleBackspace.ts -import { isAtStartOfNode, isNodeActive } from "@tiptap/core"; - -// src/keymap/listHelpers/hasListBefore.ts -var hasListBefore = (editorState, name, parentListTypes) => { - const { $anchor } = editorState.selection; - const previousNodePos = Math.max(0, $anchor.pos - 2); - const previousNode = editorState.doc.resolve(previousNodePos).node(); - if (!previousNode || !parentListTypes.includes(previousNode.type.name)) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/handleBackspace.ts -var handleBackspace = (editor, name, parentListTypes) => { - if (editor.commands.undoInputRule()) { - return true; - } - if (editor.state.selection.from !== editor.state.selection.to) { - return false; - } - if (!isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) { - const { $anchor } = editor.state.selection; - const $listPos = editor.state.doc.resolve($anchor.before() - 1); - const listDescendants = []; - $listPos.node().descendants((node, pos) => { - if (node.type.name === name) { - listDescendants.push({ node, pos }); - } - }); - const lastItem = listDescendants.at(-1); - if (!lastItem) { - return false; - } - const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1); - return editor.chain().cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end()).joinForward().run(); - } - if (!isNodeActive(editor.state, name)) { - return false; - } - if (!isAtStartOfNode(editor.state)) { - return false; - } - return editor.chain().liftListItem(name).run(); -}; - -// src/keymap/listHelpers/handleDelete.ts -import { isAtEndOfNode, isNodeActive as isNodeActive2 } from "@tiptap/core"; - -// src/keymap/listHelpers/nextListIsDeeper.ts -var nextListIsDeeper = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth > listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/nextListIsHigher.ts -var nextListIsHigher = (typeOrName, state) => { - const listDepth = getNextListDepth(typeOrName, state); - const listItemPos = findListItemPos(typeOrName, state); - if (!listItemPos || !listDepth) { - return false; - } - if (listDepth < listItemPos.depth) { - return true; - } - return false; -}; - -// src/keymap/listHelpers/handleDelete.ts -var handleDelete = (editor, name) => { - if (!isNodeActive2(editor.state, name)) { - return false; - } - if (!isAtEndOfNode(editor.state, name)) { - return false; - } - const { selection } = editor.state; - const { $from, $to } = selection; - if (!selection.empty && $from.sameParent($to)) { - return false; - } - if (nextListIsDeeper(name, editor.state)) { - return editor.chain().focus(editor.state.selection.from + 4).lift(name).joinBackward().run(); - } - if (nextListIsHigher(name, editor.state)) { - return editor.chain().joinForward().joinBackward().run(); - } - return editor.commands.joinItemForward(); -}; - -// src/keymap/listHelpers/hasListItemAfter.ts -var hasListItemAfter = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2); - if ($targetPos.index() === $targetPos.parent.childCount - 1) { - return false; - } - if (((_a = $targetPos.nodeAfter) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/hasListItemBefore.ts -var hasListItemBefore = (typeOrName, state) => { - var _a; - const { $anchor } = state.selection; - const $targetPos = state.doc.resolve($anchor.pos - 2); - if ($targetPos.index() === 0) { - return false; - } - if (((_a = $targetPos.nodeBefore) == null ? void 0 : _a.type.name) !== typeOrName) { - return false; - } - return true; -}; - -// src/keymap/listHelpers/listItemHasSubList.ts -import { getNodeType as getNodeType2 } from "@tiptap/core"; -var listItemHasSubList = (typeOrName, state, node) => { - if (!node) { - return false; - } - const nodeType = getNodeType2(typeOrName, state.schema); - let hasSubList = false; - node.descendants((child) => { - if (child.type === nodeType) { - hasSubList = true; - } - }); - return hasSubList; -}; - -// src/keymap/list-keymap.ts -var ListKeymap = Extension2.create({ - name: "listKeymap", - addOptions() { - return { - listTypes: [ - { - itemName: "listItem", - wrapperNames: ["bulletList", "orderedList"] - }, - { - itemName: "taskItem", - wrapperNames: ["taskList"] - } - ] - }; - }, - addKeyboardShortcuts() { - return { - Delete: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - "Mod-Delete": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleDelete(editor, itemName)) { - handled = true; - } - }); - return handled; - }, - Backspace: ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - }, - "Mod-Backspace": ({ editor }) => { - let handled = false; - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === void 0) { - return; - } - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true; - } - }); - return handled; - } - }; - } -}); - -// src/ordered-list/ordered-list.ts -import { mergeAttributes as mergeAttributes3, Node as Node3, wrappingInputRule as wrappingInputRule2 } from "@tiptap/core"; - -// src/ordered-list/utils.ts -var ORDERED_LIST_ITEM_REGEX = /^(\s*)(\d+)\.\s+(.*)$/; -var INDENTED_LINE_REGEX = /^\s/; -function isBlockContentLine(line) { - const trimmedLine = line.trimStart(); - return ( - // oxlint-disable-next-line prefer-string-starts-ends-with - /^[-+*]\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^\d+\.\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^>\s?/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^```/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^~~~/.test(trimmedLine) - ); -} -function splitItemContent(contentLines) { - const paragraphLines = []; - const blockLines = []; - let reachedBlockBoundary = false; - contentLines.forEach((line) => { - if (reachedBlockBoundary) { - blockLines.push(line); - return; - } - if (line.trim() === "") { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - if (paragraphLines.length > 0 && isBlockContentLine(line)) { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - paragraphLines.push(line); - }); - return { - paragraphLines, - blockLines - }; -} -function collectOrderedListItems(lines) { - const listItems = []; - let currentLineIndex = 0; - let consumed = 0; - while (currentLineIndex < lines.length) { - const line = lines[currentLineIndex]; - const match = line.match(ORDERED_LIST_ITEM_REGEX); - if (!match) { - break; - } - const [, indent, number, content] = match; - const indentLevel = indent.length; - const itemContentLines = [content]; - let nextLineIndex = currentLineIndex + 1; - const itemLines = [line]; - let sawBlankLine = false; - while (nextLineIndex < lines.length) { - const nextLine = lines[nextLineIndex]; - const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX); - if (nextMatch) { - break; - } - if (nextLine.trim() === "") { - itemLines.push(nextLine); - itemContentLines.push(""); - sawBlankLine = true; - nextLineIndex += 1; - } else if (nextLine.match(INDENTED_LINE_REGEX)) { - itemLines.push(nextLine); - itemContentLines.push(nextLine.slice(indentLevel + 2)); - nextLineIndex += 1; - } else { - if (sawBlankLine) { - break; - } - itemLines.push(nextLine); - itemContentLines.push(nextLine); - nextLineIndex += 1; - } - } - listItems.push({ - indent: indentLevel, - number: parseInt(number, 10), - content: itemContentLines.join("\n").trim(), - contentLines: itemContentLines, - raw: itemLines.join("\n") - }); - consumed = nextLineIndex; - currentLineIndex = nextLineIndex; - } - return [listItems, consumed]; -} -function buildNestedStructure(items, baseIndent, lexer) { - const result = []; - let currentIndex = 0; - while (currentIndex < items.length) { - const item = items[currentIndex]; - if (item.indent === baseIndent) { - const { paragraphLines, blockLines } = splitItemContent(item.contentLines); - const mainText = paragraphLines.join("\n").trim(); - const tokens = []; - if (mainText) { - tokens.push({ - type: "paragraph", - raw: mainText, - tokens: lexer.inlineTokens(mainText) - }); - } - const additionalContent = blockLines.join("\n").trim(); - if (additionalContent) { - const blockTokens = lexer.blockTokens(additionalContent); - tokens.push(...blockTokens); - } - let lookAheadIndex = currentIndex + 1; - const nestedItems = []; - while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) { - nestedItems.push(items[lookAheadIndex]); - lookAheadIndex += 1; - } - if (nestedItems.length > 0) { - const nextIndent = Math.min(...nestedItems.map((nestedItem) => nestedItem.indent)); - const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer); - tokens.push({ - type: "list", - ordered: true, - start: nestedItems[0].number, - items: nestedListItems, - raw: nestedItems.map((nestedItem) => nestedItem.raw).join("\n") - }); - } - result.push({ - type: "list_item", - raw: item.raw, - tokens - }); - currentIndex = lookAheadIndex; - } else { - currentIndex += 1; - } - } - return result; -} -function parseListItems(items, helpers) { - return items.map((item) => { - if (item.type !== "list_item") { - return helpers.parseChildren([item])[0]; - } - const content = []; - if (item.tokens && item.tokens.length > 0) { - item.tokens.forEach((itemToken) => { - if (itemToken.type === "paragraph" || itemToken.type === "list" || itemToken.type === "blockquote" || itemToken.type === "code") { - content.push(...helpers.parseChildren([itemToken])); - } else if (itemToken.type === "text" && itemToken.tokens) { - const inlineContent = helpers.parseChildren([itemToken]); - content.push({ - type: "paragraph", - content: inlineContent - }); - } else { - const parsed = helpers.parseChildren([itemToken]); - if (parsed.length > 0) { - content.push(...parsed); - } - } - }); - } - return { - type: "listItem", - content - }; - }); -} - -// src/ordered-list/ordered-list.ts -var ListItemName2 = "listItem"; -var TextStyleName2 = "textStyle"; -var orderedListInputRegex = /^(\d+)\.\s$/; -var OrderedList = Node3.create({ - name: "orderedList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - addAttributes() { - return { - start: { - default: 1, - parseHTML: (element) => { - return element.hasAttribute("start") ? parseInt(element.getAttribute("start") || "", 10) : 1; - } - }, - type: { - default: null, - parseHTML: (element) => element.getAttribute("type") - } - }; - }, - parseHTML() { - return [ - { - tag: "ol" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - const { start, ...attributesWithoutStart } = HTMLAttributes; - return start === 1 ? ["ol", mergeAttributes3(this.options.HTMLAttributes, attributesWithoutStart), 0] : ["ol", mergeAttributes3(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || !token.ordered) { - return []; - } - const startValue = token.start || 1; - const content = token.items ? parseListItems(token.items, helpers) : []; - if (startValue !== 1) { - return { - type: "orderedList", - attrs: { start: startValue }, - content - }; - } - return { - type: "orderedList", - content - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "orderedList", - level: "block", - start: (src) => { - const match = src.match(/^(\s*)(\d+)\.\s+/); - const index = match == null ? void 0 : match.index; - return index !== void 0 ? index : -1; - }, - tokenize: (src, _tokens, lexer) => { - var _a; - const lines = src.split("\n"); - const [listItems, consumed] = collectOrderedListItems(lines); - if (listItems.length === 0) { - return void 0; - } - const items = buildNestedStructure(listItems, 0, lexer); - if (items.length === 0) { - return void 0; - } - const startValue = ((_a = listItems[0]) == null ? void 0 : _a.number) || 1; - return { - type: "list", - ordered: true, - start: startValue, - items, - raw: lines.slice(0, consumed).join("\n") - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleOrderedList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName2, this.editor.getAttributes(TextStyleName2)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() - }; - }, - addInputRules() { - let inputRule = wrappingInputRule2({ - find: orderedListInputRegex, - type: this.type, - getAttributes: (match) => ({ start: +match[1] }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1] - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = wrappingInputRule2({ - find: orderedListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: (match) => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName2) }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1], - editor: this.editor - }); - } - return [inputRule]; - } -}); - -// src/task-item/task-item.ts -import { - getRenderedAttributes, - mergeAttributes as mergeAttributes4, - Node as Node4, - renderNestedMarkdownContent as renderNestedMarkdownContent2, - wrappingInputRule as wrappingInputRule3 -} from "@tiptap/core"; -var inputRegex = /^\s*(\[([( |x])?\])\s$/; -var TaskItem = Node4.create({ - name: "taskItem", - addOptions() { - return { - nested: false, - HTMLAttributes: {}, - taskListTypeName: "taskList", - a11y: void 0 - }; - }, - content() { - return this.options.nested ? "paragraph block*" : "paragraph+"; - }, - defining: true, - addAttributes() { - return { - checked: { - default: false, - keepOnSplit: false, - parseHTML: (element) => { - const dataChecked = element.getAttribute("data-checked"); - return dataChecked === "" || dataChecked === "true"; - }, - renderHTML: (attributes) => ({ - "data-checked": attributes.checked - }) - } - }; - }, - parseHTML() { - return [ - { - tag: `li[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ node, HTMLAttributes }) { - return [ - "li", - mergeAttributes4(this.options.HTMLAttributes, HTMLAttributes, { - "data-type": this.name - }), - [ - "label", - [ - "input", - { - type: "checkbox", - checked: node.attrs.checked ? "checked" : null - } - ], - ["span"] - ], - ["div", 0] - ]; - }, - parseMarkdown: (token, h) => { - const content = []; - if (token.tokens && token.tokens.length > 0) { - content.push(h.createNode("paragraph", {}, h.parseInline(token.tokens))); - } else if (token.text) { - content.push(h.createNode("paragraph", {}, [h.createNode("text", { text: token.text })])); - } else { - content.push(h.createNode("paragraph", {}, [])); - } - if (token.nestedTokens && token.nestedTokens.length > 0) { - const nestedContent = h.parseChildren(token.nestedTokens); - content.push(...nestedContent); - } - return h.createNode("taskItem", { checked: token.checked || false }, content); - }, - renderMarkdown: (node, h) => { - var _a; - const checkedChar = ((_a = node.attrs) == null ? void 0 : _a.checked) ? "x" : " "; - const prefix = `- [${checkedChar}] `; - return renderNestedMarkdownContent2(node, h, prefix); - }, - addExtensions() { - if (!this.options.nested) { - return []; - } - return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]; - }, - addKeyboardShortcuts() { - const shortcuts = { - Enter: () => this.editor.commands.splitListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - if (!this.options.nested) { - return shortcuts; - } - return { - ...shortcuts, - Tab: () => this.editor.commands.sinkListItem(this.name) - }; - }, - addNodeView() { - return ({ node, HTMLAttributes, getPos, editor }) => { - const listItem = document.createElement("li"); - const checkboxWrapper = document.createElement("label"); - const checkboxStyler = document.createElement("span"); - const checkbox = document.createElement("input"); - const content = document.createElement("div"); - const updateA11Y = (currentNode) => { - var _a, _b; - checkbox.ariaLabel = ((_b = (_a = this.options.a11y) == null ? void 0 : _a.checkboxLabel) == null ? void 0 : _b.call(_a, currentNode, checkbox.checked)) || `Task item checkbox for ${currentNode.textContent || "empty task item"}`; - }; - updateA11Y(node); - checkboxWrapper.contentEditable = "false"; - checkbox.type = "checkbox"; - checkbox.addEventListener("mousedown", (event) => event.preventDefault()); - checkbox.addEventListener("change", (event) => { - if (!editor.isEditable && !this.options.onReadOnlyChecked) { - checkbox.checked = !checkbox.checked; - return; - } - const { checked } = event.target; - if (editor.isEditable && typeof getPos === "function") { - editor.chain().focus(void 0, { scrollIntoView: false }).command(({ tr }) => { - const position = getPos(); - if (typeof position !== "number") { - return false; - } - const currentNode = tr.doc.nodeAt(position); - tr.setNodeMarkup(position, void 0, { - ...currentNode == null ? void 0 : currentNode.attrs, - checked - }); - return true; - }).run(); - } - if (!editor.isEditable && this.options.onReadOnlyChecked) { - if (!this.options.onReadOnlyChecked(node, checked)) { - checkbox.checked = !checkbox.checked; - } - } - }); - Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - listItem.dataset.checked = node.attrs.checked; - checkbox.checked = node.attrs.checked; - checkboxWrapper.append(checkbox, checkboxStyler); - listItem.append(checkboxWrapper, content); - Object.entries(HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes)); - return { - dom: listItem, - contentDOM: content, - update: (updatedNode) => { - if (updatedNode.type !== this.type) { - return false; - } - listItem.dataset.checked = updatedNode.attrs.checked; - checkbox.checked = updatedNode.attrs.checked; - updateA11Y(updatedNode); - const extensionAttributes = editor.extensionManager.attributes; - const newHTMLAttributes = getRenderedAttributes(updatedNode, extensionAttributes); - const newKeys = new Set(Object.keys(newHTMLAttributes)); - const staticAttrs = this.options.HTMLAttributes; - prevRenderedAttributeKeys.forEach((key) => { - if (!newKeys.has(key)) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } - }); - Object.entries(newHTMLAttributes).forEach(([key, value]) => { - if (value === null || value === void 0) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } else { - listItem.setAttribute(key, value); - } - }); - prevRenderedAttributeKeys = newKeys; - return true; - } - }; - }; - }, - addInputRules() { - return [ - wrappingInputRule3({ - find: inputRegex, - type: this.type, - getAttributes: (match) => ({ - checked: match[match.length - 1] === "x" - }) - }) - ]; - } -}); - -// src/task-list/task-list.ts -import { mergeAttributes as mergeAttributes5, Node as Node5, parseIndentedBlocks } from "@tiptap/core"; -var TaskList = Node5.create({ - name: "taskList", - addOptions() { - return { - itemTypeName: "taskItem", - HTMLAttributes: {} - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [ - { - tag: `ul[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return [ - "ul", - mergeAttributes5(this.options.HTMLAttributes, HTMLAttributes, { "data-type": this.name }), - 0 - ]; - }, - parseMarkdown: (token, h) => { - return h.createNode("taskList", {}, h.parseChildren(token.items || [])); - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "taskList", - level: "block", - start(src) { - var _a; - const index = (_a = src.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)) == null ? void 0 : _a.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, tokens, lexer) { - const parseTaskListContent = (content) => { - const nestedResult = parseIndentedBlocks( - content, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Allow recursive nesting - customNestedParser: parseTaskListContent - }, - lexer - ); - if (nestedResult) { - return [ - { - type: "taskList", - raw: nestedResult.raw, - items: nestedResult.items - } - ]; - } - return lexer.blockTokens(content); - }; - const result = parseIndentedBlocks( - src, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Use the recursive parser for nested content - customNestedParser: parseTaskListContent - }, - lexer - ); - if (!result) { - return void 0; - } - return { - type: "taskList", - raw: result.raw, - items: result.items - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleTaskList: () => ({ commands }) => { - return commands.toggleList(this.name, this.options.itemTypeName); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-9": () => this.editor.commands.toggleTaskList() - }; - } -}); - -// src/kit/index.ts -var ListKit = Extension3.create({ - name: "listKit", - addExtensions() { - const extensions = []; - if (this.options.bulletList !== false) { - extensions.push(BulletList.configure(this.options.bulletList)); - } - if (this.options.listItem !== false) { - extensions.push(ListItem.configure(this.options.listItem)); - } - if (this.options.listKeymap !== false) { - extensions.push(ListKeymap.configure(this.options.listKeymap)); - } - if (this.options.orderedList !== false) { - extensions.push(OrderedList.configure(this.options.orderedList)); - } - if (this.options.taskItem !== false) { - extensions.push(TaskItem.configure(this.options.taskItem)); - } - if (this.options.taskList !== false) { - extensions.push(TaskList.configure(this.options.taskList)); - } - return extensions; - } -}); -export { - ListKit -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.js.map deleted file mode 100644 index bcc8169..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/kit/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/kit/index.ts","../../src/bullet-list/bullet-list.ts","../../src/item/list-item.ts","../../src/helpers/createBranchingListDeleteKeymap.ts","../../src/helpers/hoistBranchingNestedList.ts","../../src/helpers/getBranchingNestedListAtCursor.ts","../../src/helpers/handleDeleteBranchingNestedList.ts","../../src/keymap/list-keymap.ts","../../src/keymap/listHelpers/index.ts","../../src/keymap/listHelpers/findListItemPos.ts","../../src/keymap/listHelpers/getNextListDepth.ts","../../src/keymap/listHelpers/handleBackspace.ts","../../src/keymap/listHelpers/hasListBefore.ts","../../src/keymap/listHelpers/handleDelete.ts","../../src/keymap/listHelpers/nextListIsDeeper.ts","../../src/keymap/listHelpers/nextListIsHigher.ts","../../src/keymap/listHelpers/hasListItemAfter.ts","../../src/keymap/listHelpers/hasListItemBefore.ts","../../src/keymap/listHelpers/listItemHasSubList.ts","../../src/ordered-list/ordered-list.ts","../../src/ordered-list/utils.ts","../../src/task-item/task-item.ts","../../src/task-list/task-list.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\n\nimport type { BulletListOptions } from '../bullet-list/index.js'\nimport { BulletList } from '../bullet-list/index.js'\nimport type { ListItemOptions } from '../item/index.js'\nimport { ListItem } from '../item/index.js'\nimport type { ListKeymapOptions } from '../keymap/index.js'\nimport { ListKeymap } from '../keymap/index.js'\nimport type { OrderedListOptions } from '../ordered-list/index.js'\nimport { OrderedList } from '../ordered-list/index.js'\nimport type { TaskItemOptions } from '../task-item/index.js'\nimport { TaskItem } from '../task-item/index.js'\nimport type { TaskListOptions } from '../task-list/index.js'\nimport { TaskList } from '../task-list/index.js'\n\nexport interface ListKitOptions {\n /**\n * If set to false, the bulletList extension will not be registered\n * @example table: false\n */\n bulletList: Partial | false\n /**\n * If set to false, the listItem extension will not be registered\n */\n listItem: Partial | false\n /**\n * If set to false, the listKeymap extension will not be registered\n */\n listKeymap: Partial | false\n /**\n * If set to false, the orderedList extension will not be registered\n */\n orderedList: Partial | false\n /**\n * If set to false, the taskItem extension will not be registered\n */\n taskItem: Partial | false\n /**\n * If set to false, the taskList extension will not be registered\n */\n taskList: Partial | false\n}\n\n/**\n * The table kit is a collection of table editor extensions.\n *\n * It’s a good starting point for building your own table in Tiptap.\n */\nexport const ListKit = Extension.create({\n name: 'listKit',\n\n addExtensions() {\n const extensions = []\n\n if (this.options.bulletList !== false) {\n extensions.push(BulletList.configure(this.options.bulletList))\n }\n\n if (this.options.listItem !== false) {\n extensions.push(ListItem.configure(this.options.listItem))\n }\n\n if (this.options.listKeymap !== false) {\n extensions.push(ListKeymap.configure(this.options.listKeymap))\n }\n\n if (this.options.orderedList !== false) {\n extensions.push(OrderedList.configure(this.options.orderedList))\n }\n\n if (this.options.taskItem !== false) {\n extensions.push(TaskItem.configure(this.options.taskItem))\n }\n\n if (this.options.taskList !== false) {\n extensions.push(TaskList.configure(this.options.taskList))\n }\n\n return extensions\n },\n})\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface BulletListOptions {\n /**\n * The node name for the list items\n * @default 'listItem'\n * @example 'paragraph'\n */\n itemTypeName: string\n\n /**\n * HTML attributes to add to the bullet list element\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting the list\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting the list\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bulletList: {\n /**\n * Toggle a bullet list\n */\n toggleBulletList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches a bullet list to a dash or asterisk.\n */\nexport const bulletListInputRegex = /^\\s*([-+*])\\s$/\n\n/**\n * This extension allows you to create bullet lists.\n * This requires the ListItem extension\n * @see https://tiptap.dev/api/nodes/bullet-list\n * @see https://tiptap.dev/api/nodes/list-item.\n */\nexport const BulletList = Node.create({\n name: 'bulletList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [{ tag: 'ul' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || (token as any).ordered) {\n return []\n }\n\n return {\n type: 'bulletList',\n content: token.items ? helpers.parseChildren(token.items) : [],\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleBulletList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: bulletListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: () => {\n return this.editor.getAttributes(TextStyleName)\n },\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n","import type { JSONContent, MarkdownParseHelpers, MarkdownToken } from '@tiptap/core'\nimport { mergeAttributes, Node, renderNestedMarkdownContent } from '@tiptap/core'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface ListItemOptions {\n /**\n * The HTML attributes for a list item node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for bulletList nodes\n * @default 'bulletList'\n * @example 'myCustomBulletList'\n */\n bulletListTypeName: string\n\n /**\n * The node type for orderedList nodes\n * @default 'orderedList'\n * @example 'myCustomOrderedList'\n */\n orderedListTypeName: string\n}\n\nfunction isSameLineOrderedListToken(token: MarkdownToken): boolean {\n const nestedToken = token.tokens?.[0]\n\n return Boolean(\n token.text &&\n token.tokens?.length === 1 &&\n nestedToken?.type === 'list' &&\n nestedToken.ordered &&\n nestedToken.raw === token.text,\n )\n}\n\nfunction parseSameLineOrderedListText(text: string, helpers: MarkdownParseHelpers): JSONContent[] {\n if (helpers.tokenizeInline) {\n return helpers.parseInline(helpers.tokenizeInline(text))\n }\n\n return helpers.parseInline([\n {\n type: 'text',\n raw: text,\n text,\n },\n ])\n}\n\n/**\n * This extension allows you to create list items.\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const ListItem = Node.create({\n name: 'listItem',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n bulletListTypeName: 'bulletList',\n orderedListTypeName: 'orderedList',\n }\n },\n\n content: 'paragraph block*',\n\n defining: true,\n\n parseHTML() {\n return [\n {\n tag: 'li',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list_item',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list_item') {\n return []\n }\n\n const parseBlockChildren = helpers.parseBlockChildren ?? helpers.parseChildren\n let content: any[] = []\n\n if (token.tokens && token.tokens.length > 0) {\n if (isSameLineOrderedListToken(token)) {\n return {\n type: 'listItem',\n content: [\n {\n type: 'paragraph',\n content: parseSameLineOrderedListText(token.text || '', helpers),\n },\n ],\n }\n }\n\n // Check if we have paragraph tokens (complex list items)\n const hasParagraphTokens = token.tokens.some(t => t.type === 'paragraph')\n\n if (hasParagraphTokens) {\n // If we have paragraph tokens, parse them as block elements\n content = parseBlockChildren(token.tokens)\n } else {\n // Check if the first token is a text token with nested inline tokens\n const firstToken = token.tokens[0]\n\n if (\n firstToken &&\n firstToken.type === 'text' &&\n firstToken.tokens &&\n firstToken.tokens.length > 0\n ) {\n // Parse the inline content from the text token\n const inlineContent = helpers.parseInline(firstToken.tokens)\n\n // Start with the paragraph containing the inline content\n content = [\n {\n type: 'paragraph',\n content: inlineContent,\n },\n ]\n\n // If there are additional tokens after the first text token (like nested lists),\n // parse them as block elements and add them\n if (token.tokens.length > 1) {\n const remainingTokens = token.tokens.slice(1)\n const additionalContent = parseBlockChildren(remainingTokens)\n content.push(...additionalContent)\n }\n } else {\n // Fallback: parse all tokens as block elements\n content = parseBlockChildren(token.tokens)\n }\n }\n }\n\n // Ensure we always have at least an empty paragraph\n if (content.length === 0) {\n content = [\n {\n type: 'paragraph',\n content: [],\n },\n ]\n }\n\n return {\n type: 'listItem',\n content,\n }\n },\n\n renderMarkdown: (node, h, ctx) => {\n return renderNestedMarkdownContent(\n node,\n h,\n (context: any) => {\n if (context.parentType === 'bulletList') {\n return '- '\n }\n if (context.parentType === 'orderedList') {\n const start = context.meta?.parentAttrs?.start || 1\n return `${start + context.index}. `\n }\n // Fallback to bullet list for unknown parent types\n return '- '\n },\n ctx,\n )\n },\n\n addExtensions() {\n return [\n createBranchingListDeleteKeymap(this.name, [\n this.options.bulletListTypeName,\n this.options.orderedListTypeName,\n ]),\n ]\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => this.editor.commands.splitListItem(this.name),\n Tab: () => this.editor.commands.sinkListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n },\n})\n","import { Extension } from '@tiptap/core'\n\nimport { handleDeleteBranchingNestedList } from './handleDeleteBranchingNestedList.js'\n\n/**\n * Creates a high-priority keymap extension that handles Delete for branching nested lists.\n * Kept separate from the list item node so Enter/Tab shortcuts keep their default priority.\n */\nexport const createBranchingListDeleteKeymap = (itemName: string, wrapperNames: string[]) => {\n return Extension.create({\n name: `${itemName}BranchingDeleteKeymap`,\n priority: 101,\n\n addKeyboardShortcuts() {\n const handleDelete = () =>\n handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames)\n\n return {\n Delete: handleDelete,\n 'Mod-Delete': handleDelete,\n }\n },\n })\n}\n","import { Fragment } from '@tiptap/pm/model'\nimport type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { getBranchingNestedListAtCursor } from './getBranchingNestedListAtCursor.js'\n\n/**\n * Hoists all list items from a branching nested list after the cursor into the parent list.\n *\n * Use this when `joinForward` cannot restructure a nested list that contains list items\n * with sublists (see issue #6906).\n *\n * @param state - The editor state to transform.\n * @param dispatch - Optional dispatch function for the transaction.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * // Cursor at the end of \"Item 1\" before a nested list with branching items.\n * hoistBranchingNestedList(editor.state, editor.view.dispatch, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n * ```\n */\nexport const hoistBranchingNestedList = (\n state: EditorState,\n dispatch: ((tr: Transaction) => void) | undefined,\n itemName: string,\n wrapperNames: string[],\n) => {\n const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames)\n\n if (!context) {\n return false\n }\n\n const { selection } = state\n const { nestedList, nestedListPos, insertPos, items } = context\n const tr = state.tr\n\n tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize)\n\n const mappedInsertPos = tr.mapping.map(insertPos)\n\n tr.insert(mappedInsertPos, Fragment.from(items))\n\n tr.setSelection(selection.map(tr.doc, tr.mapping))\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport type BranchingNestedListAtCursor = {\n listItemDepth: number\n nestedList: Node\n nestedListPos: number\n insertPos: number\n items: Node[]\n}\n\n/**\n * Resolves a branching nested list immediately after the cursor when the selection is\n * collapsed at the end of a textblock inside a list item.\n *\n * @param state - The editor state to inspect.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns Resolved positions and nodes for hoisting, or `null` when not applicable.\n *\n * @example\n * ```ts\n * const context = getBranchingNestedListAtCursor(editor.state, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n *\n * if (context) {\n * // cursor is at the end of Item 1 before a branching nested sublist\n * }\n * ```\n */\nexport const getBranchingNestedListAtCursor = (\n state: EditorState,\n itemName: string,\n wrapperNames: string[],\n): BranchingNestedListAtCursor | null => {\n const { selection } = state\n\n if (!selection.empty) {\n return null\n }\n\n const { $from } = selection\n\n if (!$from.parent.isTextblock) {\n return null\n }\n\n if ($from.parentOffset !== $from.parent.content.size) {\n return null\n }\n\n let listItemDepth = -1\n\n for (let depth = $from.depth; depth > 0; depth -= 1) {\n if ($from.node(depth).type.name === itemName) {\n listItemDepth = depth\n break\n }\n }\n\n if (listItemDepth < 0) {\n return null\n }\n\n const listItem = $from.node(listItemDepth)\n const indexInListItem = $from.index(listItemDepth)\n\n if (indexInListItem + 1 >= listItem.childCount) {\n return null\n }\n\n const nextChild = listItem.child(indexInListItem + 1)\n\n if (!wrapperNames.includes(nextChild.type.name)) {\n return null\n }\n\n const itemType = state.schema.nodes[itemName]\n let hasBranching = false\n\n nextChild.forEach(child => {\n if (child.type === itemType && child.childCount > 1) {\n hasBranching = true\n }\n })\n\n if (!hasBranching) {\n return null\n }\n\n const nodeAfter = state.doc.resolve($from.after()).nodeAfter\n\n if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) {\n return null\n }\n\n const items: Node[] = []\n\n nodeAfter.forEach(child => {\n items.push(child)\n })\n\n if (items.length === 0) {\n return null\n }\n\n return {\n listItemDepth,\n nestedList: nodeAfter,\n nestedListPos: $from.after(),\n insertPos: $from.after(listItemDepth),\n items,\n }\n}\n","import type { Editor } from '@tiptap/core'\n\nimport { hoistBranchingNestedList } from './hoistBranchingNestedList.js'\n\n/**\n * Handles Delete for a list item when a branching nested sublist follows the cursor.\n *\n * @param editor - The editor instance whose state should be updated.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * Delete: () =>\n * handleDeleteBranchingNestedList(editor, 'listItem', ['bulletList', 'orderedList']),\n * ```\n */\nexport const handleDeleteBranchingNestedList = (\n editor: Editor,\n itemName: string,\n wrapperNames: string[],\n) => {\n return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames)\n}\n","import { Extension } from '@tiptap/core'\n\nimport { handleBackspace, handleDelete } from './listHelpers/index.js'\n\nexport type ListKeymapOptions = {\n /**\n * An array of list types. This is used for item and wrapper list matching.\n * @default []\n * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }]\n */\n listTypes: Array<{\n itemName: string\n wrapperNames: string[]\n }>\n}\n\n/**\n * This extension registers custom keymaps to change the behaviour of the backspace and delete keys.\n * By default Prosemirror keyhandling will always lift or sink items so paragraphs are joined into\n * the adjacent or previous list item. This extension will prevent this behaviour and instead will\n * try to join paragraphs from two list items into a single list item.\n * @see https://www.tiptap.dev/api/extensions/list-keymap\n */\nexport const ListKeymap = Extension.create({\n name: 'listKeymap',\n\n addOptions() {\n return {\n listTypes: [\n {\n itemName: 'listItem',\n wrapperNames: ['bulletList', 'orderedList'],\n },\n {\n itemName: 'taskItem',\n wrapperNames: ['taskList'],\n },\n ],\n }\n },\n\n addKeyboardShortcuts() {\n return {\n Delete: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Delete': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleDelete(editor, itemName)) {\n handled = true\n }\n })\n\n return handled\n },\n Backspace: ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n 'Mod-Backspace': ({ editor }) => {\n let handled = false\n\n this.options.listTypes.forEach(({ itemName, wrapperNames }) => {\n if (editor.state.schema.nodes[itemName] === undefined) {\n return\n }\n\n if (handleBackspace(editor, itemName, wrapperNames)) {\n handled = true\n }\n })\n\n return handled\n },\n }\n },\n})\n","export * from './findListItemPos.js'\nexport * from './getNextListDepth.js'\nexport * from './handleBackspace.js'\nexport * from './handleDelete.js'\nexport * from './hasListBefore.js'\nexport * from './hasListItemAfter.js'\nexport * from './hasListItemBefore.js'\nexport * from './listItemHasSubList.js'\nexport * from './nextListIsDeeper.js'\nexport * from './nextListIsHigher.js'\n","import { getNodeType } from '@tiptap/core'\nimport type { NodeType } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const findListItemPos = (typeOrName: string | NodeType, state: EditorState) => {\n const { $from } = state.selection\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let currentNode = null\n let currentDepth = $from.depth\n let currentPos = $from.pos\n let targetDepth: number | null = null\n\n while (currentDepth > 0 && targetDepth === null) {\n currentNode = $from.node(currentDepth)\n\n if (currentNode.type === nodeType) {\n targetDepth = currentDepth\n } else {\n currentDepth -= 1\n currentPos -= 1\n }\n }\n\n if (targetDepth === null) {\n return null\n }\n\n return { $pos: state.doc.resolve(currentPos), depth: targetDepth }\n}\n","import { getNodeAtPosition } from '@tiptap/core'\nimport type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\n\nexport const getNextListDepth = (typeOrName: string, state: EditorState) => {\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos) {\n return false\n }\n\n const [, depth] = getNodeAtPosition(state, typeOrName, listItemPos.$pos.pos + 4)\n\n return depth\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtStartOfNode, isNodeActive } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\n\nimport { hasListBefore } from './hasListBefore.js'\n\nexport const handleBackspace = (editor: Editor, name: string, parentListTypes: string[]) => {\n // this is required to still handle the undo handling\n if (editor.commands.undoInputRule()) {\n return true\n }\n\n // if the selection is not collapsed\n // we can rely on the default backspace behavior\n if (editor.state.selection.from !== editor.state.selection.to) {\n return false\n }\n\n // if the current item is NOT inside a list item &\n // the previous item is a list (orderedList or bulletList)\n // move the cursor into the list and delete the current item\n if (!isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) {\n const { $anchor } = editor.state.selection\n\n const $listPos = editor.state.doc.resolve($anchor.before() - 1)\n\n const listDescendants: Array<{ node: Node; pos: number }> = []\n\n $listPos.node().descendants((node, pos) => {\n if (node.type.name === name) {\n listDescendants.push({ node, pos })\n }\n })\n\n const lastItem = listDescendants.at(-1)\n\n if (!lastItem) {\n return false\n }\n\n const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1)\n\n return editor\n .chain()\n .cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end())\n .joinForward()\n .run()\n }\n\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the start of a node\n // do nothing and proceed\n if (!isAtStartOfNode(editor.state)) {\n return false\n }\n\n // At the start of a list item, lift it out. Top-level items split the\n // wrapping list around them; nested items get promoted into the outer\n // list. A second backspace then falls through to the merge branch above.\n return editor.chain().liftListItem(name).run()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListBefore = (\n editorState: EditorState,\n name: string,\n parentListTypes: string[],\n) => {\n const { $anchor } = editorState.selection\n\n const previousNodePos = Math.max(0, $anchor.pos - 2)\n\n const previousNode = editorState.doc.resolve(previousNodePos).node()\n\n if (!previousNode || !parentListTypes.includes(previousNode.type.name)) {\n return false\n }\n\n return true\n}\n","import type { Editor } from '@tiptap/core'\nimport { isAtEndOfNode, isNodeActive } from '@tiptap/core'\n\nimport { nextListIsDeeper } from './nextListIsDeeper.js'\nimport { nextListIsHigher } from './nextListIsHigher.js'\n\nexport const handleDelete = (editor: Editor, name: string) => {\n // if the cursor is not inside the current node type\n // do nothing and proceed\n if (!isNodeActive(editor.state, name)) {\n return false\n }\n\n // if the cursor is not at the end of a node\n // do nothing and proceed\n if (!isAtEndOfNode(editor.state, name)) {\n return false\n }\n\n // if the selection is not collapsed, or not within a single node\n // do nothing and proceed\n const { selection } = editor.state\n const { $from, $to } = selection\n\n if (!selection.empty && $from.sameParent($to)) {\n return false\n }\n\n // check if the next node is a list with a deeper depth\n if (nextListIsDeeper(name, editor.state)) {\n return editor\n .chain()\n .focus(editor.state.selection.from + 4)\n .lift(name)\n .joinBackward()\n .run()\n }\n\n if (nextListIsHigher(name, editor.state)) {\n return editor.chain().joinForward().joinBackward().run()\n }\n\n return editor.commands.joinItemForward()\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsDeeper = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth > listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nimport { findListItemPos } from './findListItemPos.js'\nimport { getNextListDepth } from './getNextListDepth.js'\n\nexport const nextListIsHigher = (typeOrName: string, state: EditorState) => {\n const listDepth = getNextListDepth(typeOrName, state)\n const listItemPos = findListItemPos(typeOrName, state)\n\n if (!listItemPos || !listDepth) {\n return false\n }\n\n if (listDepth < listItemPos.depth) {\n return true\n }\n\n return false\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemAfter = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2)\n\n if ($targetPos.index() === $targetPos.parent.childCount - 1) {\n return false\n }\n\n if ($targetPos.nodeAfter?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import type { EditorState } from '@tiptap/pm/state'\n\nexport const hasListItemBefore = (typeOrName: string, state: EditorState): boolean => {\n const { $anchor } = state.selection\n\n const $targetPos = state.doc.resolve($anchor.pos - 2)\n\n if ($targetPos.index() === 0) {\n return false\n }\n\n if ($targetPos.nodeBefore?.type.name !== typeOrName) {\n return false\n }\n\n return true\n}\n","import { getNodeType } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport const listItemHasSubList = (typeOrName: string, state: EditorState, node?: Node) => {\n if (!node) {\n return false\n }\n\n const nodeType = getNodeType(typeOrName, state.schema)\n\n let hasSubList = false\n\n node.descendants(child => {\n if (child.type === nodeType) {\n hasSubList = true\n }\n })\n\n return hasSubList\n}\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nimport { buildNestedStructure, collectOrderedListItems, parseListItems } from './utils.js'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface OrderedListOptions {\n /**\n * The node type name for list items.\n * @default 'listItem'\n * @example 'myListItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for an ordered list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting a list item.\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting a list item.\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n orderedList: {\n /**\n * Toggle an ordered list\n * @example editor.commands.toggleOrderedList()\n */\n toggleOrderedList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches an ordered list to a 1. on input (or any number followed by a dot).\n */\nexport const orderedListInputRegex = /^(\\d+)\\.\\s$/\n\n/**\n * This extension allows you to create ordered lists.\n * This requires the ListItem extension\n * @see https://www.tiptap.dev/api/nodes/ordered-list\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const OrderedList = Node.create({\n name: 'orderedList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n addAttributes() {\n return {\n start: {\n default: 1,\n parseHTML: element => {\n return element.hasAttribute('start')\n ? parseInt(element.getAttribute('start') || '', 10)\n : 1\n },\n },\n type: {\n default: null,\n parseHTML: element => element.getAttribute('type'),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'ol',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n const { start, ...attributesWithoutStart } = HTMLAttributes\n\n return start === 1\n ? ['ol', mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0]\n : ['ol', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || !token.ordered) {\n return []\n }\n\n const startValue = token.start || 1\n const content = token.items ? parseListItems(token.items, helpers) : []\n\n if (startValue !== 1) {\n return {\n type: 'orderedList',\n attrs: { start: startValue },\n content,\n }\n }\n\n return {\n type: 'orderedList',\n content,\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'orderedList',\n level: 'block',\n start: (src: string) => {\n const match = src.match(/^(\\s*)(\\d+)\\.\\s+/)\n const index = match?.index\n return index !== undefined ? index : -1\n },\n tokenize: (src: string, _tokens, lexer) => {\n const lines = src.split('\\n')\n const [listItems, consumed] = collectOrderedListItems(lines)\n\n if (listItems.length === 0) {\n return undefined\n }\n\n const items = buildNestedStructure(listItems, 0, lexer)\n\n if (items.length === 0) {\n return undefined\n }\n\n const startValue = listItems[0]?.number || 1\n\n return {\n type: 'list',\n ordered: true,\n start: startValue,\n items,\n raw: lines.slice(0, consumed).join('\\n'),\n } as unknown as object\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleOrderedList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-7': () => this.editor.commands.toggleOrderedList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n getAttributes: match => ({ start: +match[1] }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n","import type {\n JSONContent,\n MarkdownLexerConfiguration,\n MarkdownParseHelpers,\n MarkdownToken,\n} from '@tiptap/core'\n\n/**\n * Matches an ordered list item line with optional leading whitespace.\n * Captures: (1) indentation spaces, (2) item number, (3) content after marker\n * Example matches: \"1. Item\", \" 2. Nested item\", \" 3. Deeply nested\"\n */\nconst ORDERED_LIST_ITEM_REGEX = /^(\\s*)(\\d+)\\.\\s+(.*)$/\n\n/**\n * Matches any line that starts with whitespace (indented content).\n * Used to identify continuation content that belongs to a list item.\n */\nconst INDENTED_LINE_REGEX = /^\\s/\n\n/**\n * Represents a parsed ordered list item with indentation information\n */\nexport interface OrderedListItem {\n indent: number\n number: number\n content: string\n contentLines: string[]\n raw: string\n}\n\nfunction isBlockContentLine(line: string): boolean {\n const trimmedLine = line.trimStart()\n\n return (\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^[-+*]\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^\\d+\\.\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^>\\s?/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^```/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^~~~/.test(trimmedLine)\n )\n}\n\nfunction splitItemContent(contentLines: string[]): {\n paragraphLines: string[]\n blockLines: string[]\n} {\n const paragraphLines: string[] = []\n const blockLines: string[] = []\n let reachedBlockBoundary = false\n\n contentLines.forEach(line => {\n if (reachedBlockBoundary) {\n blockLines.push(line)\n return\n }\n\n if (line.trim() === '') {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n if (paragraphLines.length > 0 && isBlockContentLine(line)) {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n paragraphLines.push(line)\n })\n\n return {\n paragraphLines,\n blockLines,\n }\n}\n\n/**\n * Collects all ordered list items from lines, parsing them into a flat array\n * with indentation information. Stops collecting continuation content when\n * encountering nested list items, allowing them to be processed separately.\n *\n * @param lines - Array of source lines to parse\n * @returns Tuple of [listItems array, number of lines consumed]\n */\nexport function collectOrderedListItems(lines: string[]): [OrderedListItem[], number] {\n const listItems: OrderedListItem[] = []\n let currentLineIndex = 0\n let consumed = 0\n\n while (currentLineIndex < lines.length) {\n const line = lines[currentLineIndex]\n const match = line.match(ORDERED_LIST_ITEM_REGEX)\n\n if (!match) {\n break\n }\n\n const [, indent, number, content] = match\n const indentLevel = indent.length\n const itemContentLines = [content]\n let nextLineIndex = currentLineIndex + 1\n const itemLines = [line]\n let sawBlankLine = false\n\n // Collect continuation lines for this item (but NOT nested list items)\n while (nextLineIndex < lines.length) {\n const nextLine = lines[nextLineIndex]\n const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX)\n\n // If it's another list item (nested or not), stop collecting\n if (nextMatch) {\n break\n }\n\n // Check for continuation content (non-list content)\n if (nextLine.trim() === '') {\n // Empty line\n itemLines.push(nextLine)\n itemContentLines.push('')\n sawBlankLine = true\n nextLineIndex += 1\n } else if (nextLine.match(INDENTED_LINE_REGEX)) {\n // Indented content - part of this item (but not a list item)\n itemLines.push(nextLine)\n itemContentLines.push(nextLine.slice(indentLevel + 2))\n nextLineIndex += 1\n } else {\n if (sawBlankLine) {\n break\n }\n\n itemLines.push(nextLine)\n itemContentLines.push(nextLine)\n nextLineIndex += 1\n }\n }\n\n listItems.push({\n indent: indentLevel,\n number: parseInt(number, 10),\n content: itemContentLines.join('\\n').trim(),\n contentLines: itemContentLines,\n raw: itemLines.join('\\n'),\n })\n\n consumed = nextLineIndex\n currentLineIndex = nextLineIndex\n }\n\n return [listItems, consumed]\n}\n\n/**\n * Recursively builds a nested structure from a flat array of list items\n * based on their indentation levels. Creates proper markdown tokens with\n * nested lists where appropriate.\n *\n * @param items - Flat array of list items with indentation info\n * @param baseIndent - The indentation level to process at this recursion level\n * @param lexer - Markdown lexer for parsing inline and block content\n * @returns Array of list_item tokens with proper nesting\n */\nexport function buildNestedStructure(\n items: OrderedListItem[],\n baseIndent: number,\n lexer: MarkdownLexerConfiguration,\n): unknown[] {\n const result: unknown[] = []\n let currentIndex = 0\n\n while (currentIndex < items.length) {\n const item = items[currentIndex]\n\n if (item.indent === baseIndent) {\n // This item belongs at the current level\n const { paragraphLines, blockLines } = splitItemContent(item.contentLines)\n const mainText = paragraphLines.join('\\n').trim()\n\n const tokens = []\n\n // Always wrap the main text in a paragraph token\n if (mainText) {\n tokens.push({\n type: 'paragraph',\n raw: mainText,\n tokens: lexer.inlineTokens(mainText),\n })\n }\n\n const additionalContent = blockLines.join('\\n').trim()\n if (additionalContent) {\n const blockTokens = lexer.blockTokens(additionalContent)\n tokens.push(...blockTokens)\n }\n\n // Look ahead to find nested items at deeper indent levels\n let lookAheadIndex = currentIndex + 1\n const nestedItems = []\n\n while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) {\n nestedItems.push(items[lookAheadIndex])\n lookAheadIndex += 1\n }\n\n // If we have nested items, recursively build their structure\n if (nestedItems.length > 0) {\n // Find the next indent level (immediate children)\n const nextIndent = Math.min(...nestedItems.map(nestedItem => nestedItem.indent))\n\n // Build the nested list recursively with all nested items\n // The recursive call will handle further nesting\n const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer)\n\n // Create a nested list token\n tokens.push({\n type: 'list',\n ordered: true,\n start: nestedItems[0].number,\n items: nestedListItems,\n raw: nestedItems.map(nestedItem => nestedItem.raw).join('\\n'),\n })\n }\n\n result.push({\n type: 'list_item',\n raw: item.raw,\n tokens,\n })\n\n // Skip the nested items we just processed\n currentIndex = lookAheadIndex\n } else {\n // This item has deeper indent than we're currently processing\n // It should be handled by a recursive call\n currentIndex += 1\n }\n }\n\n return result\n}\n\n/**\n * Parses markdown list item tokens into Tiptap JSONContent structure,\n * ensuring text content is properly wrapped in paragraph nodes.\n *\n * @param items - Array of markdown tokens representing list items\n * @param helpers - Markdown parse helpers for recursive parsing\n * @returns Array of listItem JSONContent nodes\n */\nexport function parseListItems(\n items: MarkdownToken[],\n helpers: MarkdownParseHelpers,\n): JSONContent[] {\n return items.map(item => {\n if (item.type !== 'list_item') {\n return helpers.parseChildren([item])[0]\n }\n\n // Parse the tokens within the list item\n const content: JSONContent[] = []\n\n if (item.tokens && item.tokens.length > 0) {\n item.tokens.forEach(itemToken => {\n // If it's already a proper block node (paragraph, list, etc.), parse it directly\n if (\n itemToken.type === 'paragraph' ||\n itemToken.type === 'list' ||\n itemToken.type === 'blockquote' ||\n itemToken.type === 'code'\n ) {\n content.push(...helpers.parseChildren([itemToken]))\n } else if (itemToken.type === 'text' && itemToken.tokens) {\n // If it's inline text tokens, wrap them in a paragraph\n const inlineContent = helpers.parseChildren([itemToken])\n content.push({\n type: 'paragraph',\n content: inlineContent,\n })\n } else {\n // For any other content, try to parse it\n const parsed = helpers.parseChildren([itemToken])\n if (parsed.length > 0) {\n content.push(...parsed)\n }\n }\n })\n }\n\n return {\n type: 'listItem',\n content,\n }\n })\n}\n","import type { KeyboardShortcutCommand } from '@tiptap/core'\nimport {\n getRenderedAttributes,\n mergeAttributes,\n Node,\n renderNestedMarkdownContent,\n wrappingInputRule,\n} from '@tiptap/core'\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface TaskItemOptions {\n /**\n * A callback function that is called when the checkbox is clicked while the editor is in readonly mode.\n * @param node The prosemirror node of the task item\n * @param checked The new checked state\n * @returns boolean\n */\n onReadOnlyChecked?: (node: ProseMirrorNode, checked: boolean) => boolean\n\n /**\n * Controls whether the task items can be nested or not.\n * @default false\n * @example true\n */\n nested: boolean\n\n /**\n * HTML attributes to add to the task item element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for taskList nodes\n * @default 'taskList'\n * @example 'myCustomTaskList'\n */\n taskListTypeName: string\n\n /**\n * Accessibility options for the task item.\n * @default {}\n * @example\n * ```js\n * {\n * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}`\n * }\n */\n a11y?: {\n checkboxLabel?: (node: ProseMirrorNode, checked: boolean) => string\n }\n}\n\n/**\n * Matches a task item to a - [ ] on input.\n */\nexport const inputRegex = /^\\s*(\\[([( |x])?\\])\\s$/\n\n/**\n * This extension allows you to create task items.\n * @see https://www.tiptap.dev/api/nodes/task-item\n */\nexport const TaskItem = Node.create({\n name: 'taskItem',\n\n addOptions() {\n return {\n nested: false,\n HTMLAttributes: {},\n taskListTypeName: 'taskList',\n a11y: undefined,\n }\n },\n\n content() {\n return this.options.nested ? 'paragraph block*' : 'paragraph+'\n },\n\n defining: true,\n\n addAttributes() {\n return {\n checked: {\n default: false,\n keepOnSplit: false,\n parseHTML: element => {\n const dataChecked = element.getAttribute('data-checked')\n\n return dataChecked === '' || dataChecked === 'true'\n },\n renderHTML: attributes => ({\n 'data-checked': attributes.checked,\n }),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: `li[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ node, HTMLAttributes }) {\n return [\n 'li',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {\n 'data-type': this.name,\n }),\n [\n 'label',\n [\n 'input',\n {\n type: 'checkbox',\n checked: node.attrs.checked ? 'checked' : null,\n },\n ],\n ['span'],\n ],\n ['div', 0],\n ]\n },\n\n parseMarkdown: (token, h) => {\n // Parse the task item's text content into paragraph content\n const content = []\n\n // First, add the main paragraph content\n if (token.tokens && token.tokens.length > 0) {\n // If we have tokens, create a paragraph with the inline content\n content.push(h.createNode('paragraph', {}, h.parseInline(token.tokens)))\n } else if (token.text) {\n // If we have raw text, create a paragraph with text node\n content.push(h.createNode('paragraph', {}, [h.createNode('text', { text: token.text })]))\n } else {\n // Fallback: empty paragraph\n content.push(h.createNode('paragraph', {}, []))\n }\n\n // Then, add any nested content (like nested task lists)\n if (token.nestedTokens && token.nestedTokens.length > 0) {\n const nestedContent = h.parseChildren(token.nestedTokens)\n content.push(...nestedContent)\n }\n\n return h.createNode('taskItem', { checked: token.checked || false }, content)\n },\n\n renderMarkdown: (node, h) => {\n const checkedChar = node.attrs?.checked ? 'x' : ' '\n const prefix = `- [${checkedChar}] `\n\n return renderNestedMarkdownContent(node, h, prefix)\n },\n\n addExtensions() {\n if (!this.options.nested) {\n return []\n }\n\n return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]\n },\n\n addKeyboardShortcuts() {\n const shortcuts: {\n [key: string]: KeyboardShortcutCommand\n } = {\n Enter: () => this.editor.commands.splitListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n\n if (!this.options.nested) {\n return shortcuts\n }\n\n return {\n ...shortcuts,\n Tab: () => this.editor.commands.sinkListItem(this.name),\n }\n },\n\n addNodeView() {\n return ({ node, HTMLAttributes, getPos, editor }) => {\n const listItem = document.createElement('li')\n const checkboxWrapper = document.createElement('label')\n const checkboxStyler = document.createElement('span')\n const checkbox = document.createElement('input')\n const content = document.createElement('div')\n\n const updateA11Y = (currentNode: ProseMirrorNode) => {\n checkbox.ariaLabel =\n this.options.a11y?.checkboxLabel?.(currentNode, checkbox.checked) ||\n `Task item checkbox for ${currentNode.textContent || 'empty task item'}`\n }\n\n updateA11Y(node)\n\n checkboxWrapper.contentEditable = 'false'\n checkbox.type = 'checkbox'\n checkbox.addEventListener('mousedown', event => event.preventDefault())\n checkbox.addEventListener('change', event => {\n // if the editor isn’t editable and we don't have a handler for\n // readonly checks we have to undo the latest change\n if (!editor.isEditable && !this.options.onReadOnlyChecked) {\n checkbox.checked = !checkbox.checked\n\n return\n }\n\n const { checked } = event.target as any\n\n if (editor.isEditable && typeof getPos === 'function') {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .command(({ tr }) => {\n const position = getPos()\n\n if (typeof position !== 'number') {\n return false\n }\n const currentNode = tr.doc.nodeAt(position)\n\n tr.setNodeMarkup(position, undefined, {\n ...currentNode?.attrs,\n checked,\n })\n\n return true\n })\n .run()\n }\n if (!editor.isEditable && this.options.onReadOnlyChecked) {\n // Reset state if onReadOnlyChecked returns false\n if (!this.options.onReadOnlyChecked(node, checked)) {\n checkbox.checked = !checkbox.checked\n }\n }\n })\n\n Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n listItem.dataset.checked = node.attrs.checked\n checkbox.checked = node.attrs.checked\n\n checkboxWrapper.append(checkbox, checkboxStyler)\n listItem.append(checkboxWrapper, content)\n\n Object.entries(HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n // Track the keys of previously rendered HTML attributes for proper removal\n let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes))\n\n return {\n dom: listItem,\n contentDOM: content,\n update: updatedNode => {\n if (updatedNode.type !== this.type) {\n return false\n }\n\n listItem.dataset.checked = updatedNode.attrs.checked\n checkbox.checked = updatedNode.attrs.checked\n updateA11Y(updatedNode)\n\n // Sync all HTML attributes from the updated node\n const extensionAttributes = editor.extensionManager.attributes\n const newHTMLAttributes = getRenderedAttributes(updatedNode, extensionAttributes)\n const newKeys = new Set(Object.keys(newHTMLAttributes))\n\n // Remove attributes that were previously rendered but are no longer present\n // If the attribute exists in static options, restore it instead of removing\n const staticAttrs = this.options.HTMLAttributes\n\n prevRenderedAttributeKeys.forEach(key => {\n if (!newKeys.has(key)) {\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n }\n })\n\n // Update or add new attributes\n Object.entries(newHTMLAttributes).forEach(([key, value]) => {\n if (value === null || value === undefined) {\n // If the attribute exists in static options, restore it instead of removing\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n } else {\n listItem.setAttribute(key, value)\n }\n })\n\n // Update the tracked keys for next update\n prevRenderedAttributeKeys = newKeys\n\n return true\n },\n }\n }\n },\n\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n getAttributes: match => ({\n checked: match[match.length - 1] === 'x',\n }),\n }),\n ]\n },\n})\n","import { mergeAttributes, Node, parseIndentedBlocks } from '@tiptap/core'\n\nexport interface TaskListOptions {\n /**\n * The node type name for a task item.\n * @default 'taskItem'\n * @example 'myCustomTaskItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for a task list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n taskList: {\n /**\n * Toggle a task list\n * @example editor.commands.toggleTaskList()\n */\n toggleTaskList: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to create task lists.\n * @see https://www.tiptap.dev/api/nodes/task-list\n */\nexport const TaskList = Node.create({\n name: 'taskList',\n\n addOptions() {\n return {\n itemTypeName: 'taskItem',\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [\n {\n tag: `ul[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'ul',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }),\n 0,\n ]\n },\n\n parseMarkdown: (token, h) => {\n return h.createNode('taskList', {}, h.parseChildren(token.items || []))\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'taskList',\n level: 'block',\n start(src) {\n // Look for the start of a task list item\n const index = src.match(/^\\s*[-+*]\\s+\\[([ xX])\\]\\s+/)?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, tokens, lexer) {\n // Helper function to recursively parse task lists\n const parseTaskListContent = (content: string): any[] | undefined => {\n const nestedResult = parseIndentedBlocks(\n content,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Allow recursive nesting\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (nestedResult) {\n // Return as task list token\n return [\n {\n type: 'taskList',\n raw: nestedResult.raw,\n items: nestedResult.items,\n },\n ]\n }\n\n // Fall back to regular markdown parsing if not a task list\n return lexer.blockTokens(content)\n }\n\n const result = parseIndentedBlocks(\n src,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Use the recursive parser for nested content\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (!result) {\n return undefined\n }\n\n return {\n type: 'taskList',\n raw: result.raw,\n items: result.items,\n }\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleTaskList:\n () =>\n ({ commands }) => {\n return commands.toggleList(this.name, this.options.itemTypeName)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-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AAM,aAAa,CAAC;AAEpB,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,WAAW,UAAU,KAAK,QAAQ,UAAU,CAAC;AAAA,IAC/D;AAEA,QAAI,KAAK,QAAQ,aAAa,OAAO;AACnC,iBAAW,KAAK,SAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC3D;AAEA,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,WAAW,UAAU,KAAK,QAAQ,UAAU,CAAC;AAAA,IAC/D;AAEA,QAAI,KAAK,QAAQ,gBAAgB,OAAO;AACtC,iBAAW,KAAK,YAAY,UAAU,KAAK,QAAQ,WAAW,CAAC;AAAA,IACjE;AAEA,QAAI,KAAK,QAAQ,aAAa,OAAO;AACnC,iBAAW,KAAK,SAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC3D;AAEA,QAAI,KAAK,QAAQ,aAAa,OAAO;AACnC,iBAAW,KAAK,SAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC3D;AAEA,WAAO;AAAA,EACT;AACF,CAAC;","names":["Extension","mergeAttributes","Node","handleDelete","Node","mergeAttributes","Extension","isNodeActive","isNodeActive","getNodeType","Extension","mergeAttributes","Node","wrappingInputRule","ListItemName","TextStyleName","Node","mergeAttributes","wrappingInputRule","mergeAttributes","Node","renderNestedMarkdownContent","wrappingInputRule","Node","mergeAttributes","renderNestedMarkdownContent","wrappingInputRule","mergeAttributes","Node","Extension"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs deleted file mode 100644 index 28919fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs +++ /dev/null @@ -1,345 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/ordered-list/index.ts -var index_exports = {}; -__export(index_exports, { - OrderedList: () => OrderedList, - orderedListInputRegex: () => orderedListInputRegex -}); -module.exports = __toCommonJS(index_exports); - -// src/ordered-list/ordered-list.ts -var import_core = require("@tiptap/core"); - -// src/ordered-list/utils.ts -var ORDERED_LIST_ITEM_REGEX = /^(\s*)(\d+)\.\s+(.*)$/; -var INDENTED_LINE_REGEX = /^\s/; -function isBlockContentLine(line) { - const trimmedLine = line.trimStart(); - return ( - // oxlint-disable-next-line prefer-string-starts-ends-with - /^[-+*]\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^\d+\.\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^>\s?/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^```/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^~~~/.test(trimmedLine) - ); -} -function splitItemContent(contentLines) { - const paragraphLines = []; - const blockLines = []; - let reachedBlockBoundary = false; - contentLines.forEach((line) => { - if (reachedBlockBoundary) { - blockLines.push(line); - return; - } - if (line.trim() === "") { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - if (paragraphLines.length > 0 && isBlockContentLine(line)) { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - paragraphLines.push(line); - }); - return { - paragraphLines, - blockLines - }; -} -function collectOrderedListItems(lines) { - const listItems = []; - let currentLineIndex = 0; - let consumed = 0; - while (currentLineIndex < lines.length) { - const line = lines[currentLineIndex]; - const match = line.match(ORDERED_LIST_ITEM_REGEX); - if (!match) { - break; - } - const [, indent, number, content] = match; - const indentLevel = indent.length; - const itemContentLines = [content]; - let nextLineIndex = currentLineIndex + 1; - const itemLines = [line]; - let sawBlankLine = false; - while (nextLineIndex < lines.length) { - const nextLine = lines[nextLineIndex]; - const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX); - if (nextMatch) { - break; - } - if (nextLine.trim() === "") { - itemLines.push(nextLine); - itemContentLines.push(""); - sawBlankLine = true; - nextLineIndex += 1; - } else if (nextLine.match(INDENTED_LINE_REGEX)) { - itemLines.push(nextLine); - itemContentLines.push(nextLine.slice(indentLevel + 2)); - nextLineIndex += 1; - } else { - if (sawBlankLine) { - break; - } - itemLines.push(nextLine); - itemContentLines.push(nextLine); - nextLineIndex += 1; - } - } - listItems.push({ - indent: indentLevel, - number: parseInt(number, 10), - content: itemContentLines.join("\n").trim(), - contentLines: itemContentLines, - raw: itemLines.join("\n") - }); - consumed = nextLineIndex; - currentLineIndex = nextLineIndex; - } - return [listItems, consumed]; -} -function buildNestedStructure(items, baseIndent, lexer) { - const result = []; - let currentIndex = 0; - while (currentIndex < items.length) { - const item = items[currentIndex]; - if (item.indent === baseIndent) { - const { paragraphLines, blockLines } = splitItemContent(item.contentLines); - const mainText = paragraphLines.join("\n").trim(); - const tokens = []; - if (mainText) { - tokens.push({ - type: "paragraph", - raw: mainText, - tokens: lexer.inlineTokens(mainText) - }); - } - const additionalContent = blockLines.join("\n").trim(); - if (additionalContent) { - const blockTokens = lexer.blockTokens(additionalContent); - tokens.push(...blockTokens); - } - let lookAheadIndex = currentIndex + 1; - const nestedItems = []; - while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) { - nestedItems.push(items[lookAheadIndex]); - lookAheadIndex += 1; - } - if (nestedItems.length > 0) { - const nextIndent = Math.min(...nestedItems.map((nestedItem) => nestedItem.indent)); - const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer); - tokens.push({ - type: "list", - ordered: true, - start: nestedItems[0].number, - items: nestedListItems, - raw: nestedItems.map((nestedItem) => nestedItem.raw).join("\n") - }); - } - result.push({ - type: "list_item", - raw: item.raw, - tokens - }); - currentIndex = lookAheadIndex; - } else { - currentIndex += 1; - } - } - return result; -} -function parseListItems(items, helpers) { - return items.map((item) => { - if (item.type !== "list_item") { - return helpers.parseChildren([item])[0]; - } - const content = []; - if (item.tokens && item.tokens.length > 0) { - item.tokens.forEach((itemToken) => { - if (itemToken.type === "paragraph" || itemToken.type === "list" || itemToken.type === "blockquote" || itemToken.type === "code") { - content.push(...helpers.parseChildren([itemToken])); - } else if (itemToken.type === "text" && itemToken.tokens) { - const inlineContent = helpers.parseChildren([itemToken]); - content.push({ - type: "paragraph", - content: inlineContent - }); - } else { - const parsed = helpers.parseChildren([itemToken]); - if (parsed.length > 0) { - content.push(...parsed); - } - } - }); - } - return { - type: "listItem", - content - }; - }); -} - -// src/ordered-list/ordered-list.ts -var ListItemName = "listItem"; -var TextStyleName = "textStyle"; -var orderedListInputRegex = /^(\d+)\.\s$/; -var OrderedList = import_core.Node.create({ - name: "orderedList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - addAttributes() { - return { - start: { - default: 1, - parseHTML: (element) => { - return element.hasAttribute("start") ? parseInt(element.getAttribute("start") || "", 10) : 1; - } - }, - type: { - default: null, - parseHTML: (element) => element.getAttribute("type") - } - }; - }, - parseHTML() { - return [ - { - tag: "ol" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - const { start, ...attributesWithoutStart } = HTMLAttributes; - return start === 1 ? ["ol", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, attributesWithoutStart), 0] : ["ol", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || !token.ordered) { - return []; - } - const startValue = token.start || 1; - const content = token.items ? parseListItems(token.items, helpers) : []; - if (startValue !== 1) { - return { - type: "orderedList", - attrs: { start: startValue }, - content - }; - } - return { - type: "orderedList", - content - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "orderedList", - level: "block", - start: (src) => { - const match = src.match(/^(\s*)(\d+)\.\s+/); - const index = match == null ? void 0 : match.index; - return index !== void 0 ? index : -1; - }, - tokenize: (src, _tokens, lexer) => { - var _a; - const lines = src.split("\n"); - const [listItems, consumed] = collectOrderedListItems(lines); - if (listItems.length === 0) { - return void 0; - } - const items = buildNestedStructure(listItems, 0, lexer); - if (items.length === 0) { - return void 0; - } - const startValue = ((_a = listItems[0]) == null ? void 0 : _a.number) || 1; - return { - type: "list", - ordered: true, - start: startValue, - items, - raw: lines.slice(0, consumed).join("\n") - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleOrderedList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() - }; - }, - addInputRules() { - let inputRule = (0, import_core.wrappingInputRule)({ - find: orderedListInputRegex, - type: this.type, - getAttributes: (match) => ({ start: +match[1] }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1] - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = (0, import_core.wrappingInputRule)({ - find: orderedListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: (match) => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1], - editor: this.editor - }); - } - return [inputRule]; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - OrderedList, - orderedListInputRegex -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs.map deleted file mode 100644 index 25c4997..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/ordered-list/index.ts","../../src/ordered-list/ordered-list.ts","../../src/ordered-list/utils.ts"],"sourcesContent":["export * from './ordered-list.js'\n","import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nimport { buildNestedStructure, collectOrderedListItems, parseListItems } from './utils.js'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface OrderedListOptions {\n /**\n * The node type name for list items.\n * @default 'listItem'\n * @example 'myListItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for an ordered list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting a list item.\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting a list item.\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n orderedList: {\n /**\n * Toggle an ordered list\n * @example editor.commands.toggleOrderedList()\n */\n toggleOrderedList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches an ordered list to a 1. on input (or any number followed by a dot).\n */\nexport const orderedListInputRegex = /^(\\d+)\\.\\s$/\n\n/**\n * This extension allows you to create ordered lists.\n * This requires the ListItem extension\n * @see https://www.tiptap.dev/api/nodes/ordered-list\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const OrderedList = Node.create({\n name: 'orderedList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n addAttributes() {\n return {\n start: {\n default: 1,\n parseHTML: element => {\n return element.hasAttribute('start')\n ? parseInt(element.getAttribute('start') || '', 10)\n : 1\n },\n },\n type: {\n default: null,\n parseHTML: element => element.getAttribute('type'),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'ol',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n const { start, ...attributesWithoutStart } = HTMLAttributes\n\n return start === 1\n ? ['ol', mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0]\n : ['ol', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || !token.ordered) {\n return []\n }\n\n const startValue = token.start || 1\n const content = token.items ? parseListItems(token.items, helpers) : []\n\n if (startValue !== 1) {\n return {\n type: 'orderedList',\n attrs: { start: startValue },\n content,\n }\n }\n\n return {\n type: 'orderedList',\n content,\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'orderedList',\n level: 'block',\n start: (src: string) => {\n const match = src.match(/^(\\s*)(\\d+)\\.\\s+/)\n const index = match?.index\n return index !== undefined ? index : -1\n },\n tokenize: (src: string, _tokens, lexer) => {\n const lines = src.split('\\n')\n const [listItems, consumed] = collectOrderedListItems(lines)\n\n if (listItems.length === 0) {\n return undefined\n }\n\n const items = buildNestedStructure(listItems, 0, lexer)\n\n if (items.length === 0) {\n return undefined\n }\n\n const startValue = listItems[0]?.number || 1\n\n return {\n type: 'list',\n ordered: true,\n start: startValue,\n items,\n raw: lines.slice(0, consumed).join('\\n'),\n } as unknown as object\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleOrderedList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-7': () => this.editor.commands.toggleOrderedList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n getAttributes: match => ({ start: +match[1] }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n","import type {\n JSONContent,\n MarkdownLexerConfiguration,\n MarkdownParseHelpers,\n MarkdownToken,\n} from '@tiptap/core'\n\n/**\n * Matches an ordered list item line with optional leading whitespace.\n * Captures: (1) indentation spaces, (2) item number, (3) content after marker\n * Example matches: \"1. Item\", \" 2. Nested item\", \" 3. Deeply nested\"\n */\nconst ORDERED_LIST_ITEM_REGEX = /^(\\s*)(\\d+)\\.\\s+(.*)$/\n\n/**\n * Matches any line that starts with whitespace (indented content).\n * Used to identify continuation content that belongs to a list item.\n */\nconst INDENTED_LINE_REGEX = /^\\s/\n\n/**\n * Represents a parsed ordered list item with indentation information\n */\nexport interface OrderedListItem {\n indent: number\n number: number\n content: string\n contentLines: string[]\n raw: string\n}\n\nfunction isBlockContentLine(line: string): boolean {\n const trimmedLine = line.trimStart()\n\n return (\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^[-+*]\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^\\d+\\.\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^>\\s?/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^```/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^~~~/.test(trimmedLine)\n )\n}\n\nfunction splitItemContent(contentLines: string[]): {\n paragraphLines: string[]\n blockLines: string[]\n} {\n const paragraphLines: string[] = []\n const blockLines: string[] = []\n let reachedBlockBoundary = false\n\n contentLines.forEach(line => {\n if (reachedBlockBoundary) {\n blockLines.push(line)\n return\n }\n\n if (line.trim() === '') {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n if (paragraphLines.length > 0 && isBlockContentLine(line)) {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n paragraphLines.push(line)\n })\n\n return {\n paragraphLines,\n blockLines,\n }\n}\n\n/**\n * Collects all ordered list items from lines, parsing them into a flat array\n * with indentation information. Stops collecting continuation content when\n * encountering nested list items, allowing them to be processed separately.\n *\n * @param lines - Array of source lines to parse\n * @returns Tuple of [listItems array, number of lines consumed]\n */\nexport function collectOrderedListItems(lines: string[]): [OrderedListItem[], number] {\n const listItems: OrderedListItem[] = []\n let currentLineIndex = 0\n let consumed = 0\n\n while (currentLineIndex < lines.length) {\n const line = lines[currentLineIndex]\n const match = line.match(ORDERED_LIST_ITEM_REGEX)\n\n if (!match) {\n break\n }\n\n const [, indent, number, content] = match\n const indentLevel = indent.length\n const itemContentLines = [content]\n let nextLineIndex = currentLineIndex + 1\n const itemLines = [line]\n let sawBlankLine = false\n\n // Collect continuation lines for this item (but NOT nested list items)\n while (nextLineIndex < lines.length) {\n const nextLine = lines[nextLineIndex]\n const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX)\n\n // If it's another list item (nested or not), stop collecting\n if (nextMatch) {\n break\n }\n\n // Check for continuation content (non-list content)\n if (nextLine.trim() === '') {\n // Empty line\n itemLines.push(nextLine)\n itemContentLines.push('')\n sawBlankLine = true\n nextLineIndex += 1\n } else if (nextLine.match(INDENTED_LINE_REGEX)) {\n // Indented content - part of this item (but not a list item)\n itemLines.push(nextLine)\n itemContentLines.push(nextLine.slice(indentLevel + 2))\n nextLineIndex += 1\n } else {\n if (sawBlankLine) {\n break\n }\n\n itemLines.push(nextLine)\n itemContentLines.push(nextLine)\n nextLineIndex += 1\n }\n }\n\n listItems.push({\n indent: indentLevel,\n number: parseInt(number, 10),\n content: itemContentLines.join('\\n').trim(),\n contentLines: itemContentLines,\n raw: itemLines.join('\\n'),\n })\n\n consumed = nextLineIndex\n currentLineIndex = nextLineIndex\n }\n\n return [listItems, consumed]\n}\n\n/**\n * Recursively builds a nested structure from a flat array of list items\n * based on their indentation levels. Creates proper markdown tokens with\n * nested lists where appropriate.\n *\n * @param items - Flat array of list items with indentation info\n * @param baseIndent - The indentation level to process at this recursion level\n * @param lexer - Markdown lexer for parsing inline and block content\n * @returns Array of list_item tokens with proper nesting\n */\nexport function buildNestedStructure(\n items: OrderedListItem[],\n baseIndent: number,\n lexer: MarkdownLexerConfiguration,\n): unknown[] {\n const result: unknown[] = []\n let currentIndex = 0\n\n while (currentIndex < items.length) {\n const item = items[currentIndex]\n\n if (item.indent === baseIndent) {\n // This item belongs at the current level\n const { paragraphLines, blockLines } = splitItemContent(item.contentLines)\n const mainText = paragraphLines.join('\\n').trim()\n\n const tokens = []\n\n // Always wrap the main text in a paragraph token\n if (mainText) {\n tokens.push({\n type: 'paragraph',\n raw: mainText,\n tokens: lexer.inlineTokens(mainText),\n })\n }\n\n const additionalContent = blockLines.join('\\n').trim()\n if (additionalContent) {\n const blockTokens = lexer.blockTokens(additionalContent)\n tokens.push(...blockTokens)\n }\n\n // Look ahead to find nested items at deeper indent levels\n let lookAheadIndex = currentIndex + 1\n const nestedItems = []\n\n while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) {\n nestedItems.push(items[lookAheadIndex])\n lookAheadIndex += 1\n }\n\n // If we have nested items, recursively build their structure\n if (nestedItems.length > 0) {\n // Find the next indent level (immediate children)\n const nextIndent = Math.min(...nestedItems.map(nestedItem => nestedItem.indent))\n\n // Build the nested list recursively with all nested items\n // The recursive call will handle further nesting\n const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer)\n\n // Create a nested list token\n tokens.push({\n type: 'list',\n ordered: true,\n start: nestedItems[0].number,\n items: nestedListItems,\n raw: nestedItems.map(nestedItem => nestedItem.raw).join('\\n'),\n })\n }\n\n result.push({\n type: 'list_item',\n raw: item.raw,\n tokens,\n })\n\n // Skip the nested items we just processed\n currentIndex = lookAheadIndex\n } else {\n // This item has deeper indent than we're currently processing\n // It should be handled by a recursive call\n currentIndex += 1\n }\n }\n\n return result\n}\n\n/**\n * Parses markdown list item tokens into Tiptap JSONContent structure,\n * ensuring text content is properly wrapped in paragraph nodes.\n *\n * @param items - Array of markdown tokens representing list items\n * @param helpers - Markdown parse helpers for recursive parsing\n * @returns Array of listItem JSONContent nodes\n */\nexport function parseListItems(\n items: MarkdownToken[],\n helpers: MarkdownParseHelpers,\n): JSONContent[] {\n return items.map(item => {\n if (item.type !== 'list_item') {\n return helpers.parseChildren([item])[0]\n }\n\n // Parse the tokens within the list item\n const content: JSONContent[] = []\n\n if (item.tokens && item.tokens.length > 0) {\n item.tokens.forEach(itemToken => {\n // If it's already a proper block node (paragraph, list, etc.), parse it directly\n if (\n itemToken.type === 'paragraph' ||\n itemToken.type === 'list' ||\n itemToken.type === 'blockquote' ||\n itemToken.type === 'code'\n ) {\n content.push(...helpers.parseChildren([itemToken]))\n } else if (itemToken.type === 'text' && itemToken.tokens) {\n // If it's inline text tokens, wrap them in a paragraph\n const inlineContent = helpers.parseChildren([itemToken])\n content.push({\n type: 'paragraph',\n content: inlineContent,\n })\n } else {\n // For any other content, try to parse it\n const parsed = helpers.parseChildren([itemToken])\n if (parsed.length > 0) {\n content.push(...parsed)\n }\n }\n })\n }\n\n return {\n type: 'listItem',\n content,\n }\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAyD;;;ACYzD,IAAM,0BAA0B;AAMhC,IAAM,sBAAsB;AAa5B,SAAS,mBAAmB,MAAuB;AACjD,QAAM,cAAc,KAAK,UAAU;AAEnC;AAAA;AAAA,IAEE,YAAY,KAAK,WAAW;AAAA,IAE5B,YAAY,KAAK,WAAW;AAAA,IAE5B,QAAQ,KAAK,WAAW;AAAA,IAExB,OAAO,KAAK,WAAW;AAAA,IAEvB,OAAO,KAAK,WAAW;AAAA;AAE3B;AAEA,SAAS,iBAAiB,cAGxB;AACA,QAAM,iBAA2B,CAAC;AAClC,QAAM,aAAuB,CAAC;AAC9B,MAAI,uBAAuB;AAE3B,eAAa,QAAQ,UAAQ;AAC3B,QAAI,sBAAsB;AACxB,iBAAW,KAAK,IAAI;AACpB;AAAA,IACF;AAEA,QAAI,KAAK,KAAK,MAAM,IAAI;AACtB,6BAAuB;AACvB,iBAAW,KAAK,IAAI;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;AACA,eAAO,SAAS,WAAW,KAAK,MAAM,KAAK,QAAQ,cAAc,KAAK,QAAQ,SAAS;AAAA,MACzF;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,eAAe,MAAM,KAAK,OAAO,SAAS,kBAAkB;AAAA,IAC9D;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,QAAI,gBAAY,+BAAkB;AAAA,MAChC,MAAM;AAAA,MACN,MAAM,KAAK;AAAA,MACX,eAAe,YAAU,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE;AAAA,MAC5C,eAAe,CAAC,OAAO,SAAS,KAAK,aAAa,KAAK,MAAM,UAAU,CAAC,MAAM,CAAC;AAAA,IACjF,CAAC;AAED,QAAI,KAAK,QAAQ,aAAa,KAAK,QAAQ,gBAAgB;AACzD,sBAAY,+BAAkB;AAAA,QAC5B,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,QACX,WAAW,KAAK,QAAQ;AAAA,QACxB,gBAAgB,KAAK,QAAQ;AAAA,QAC7B,eAAe,YAAU,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,GAAG,KAAK,OAAO,cAAc,aAAa,EAAE;AAAA,QACzF,eAAe,CAAC,OAAO,SAAS,KAAK,aAAa,KAAK,MAAM,UAAU,CAAC,MAAM,CAAC;AAAA,QAC/E,QAAQ,KAAK;AAAA,MACf,CAAC;AAAA,IACH;AACA,WAAO,CAAC,SAAS;AAAA,EACnB;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.cts deleted file mode 100644 index 4472991..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.cts +++ /dev/null @@ -1,52 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface OrderedListOptions { - /** - * The node type name for list items. - * @default 'listItem' - * @example 'myListItem' - */ - itemTypeName: string; - /** - * The HTML attributes for an ordered list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting a list item. - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting a list item. - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - orderedList: { - /** - * Toggle an ordered list - * @example editor.commands.toggleOrderedList() - */ - toggleOrderedList: () => ReturnType; - }; - } -} -/** - * Matches an ordered list to a 1. on input (or any number followed by a dot). - */ -declare const orderedListInputRegex: RegExp; -/** - * This extension allows you to create ordered lists. - * This requires the ListItem extension - * @see https://www.tiptap.dev/api/nodes/ordered-list - * @see https://www.tiptap.dev/api/nodes/list-item - */ -declare const OrderedList: Node; - -export { OrderedList, type OrderedListOptions, orderedListInputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.ts deleted file mode 100644 index 4472991..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface OrderedListOptions { - /** - * The node type name for list items. - * @default 'listItem' - * @example 'myListItem' - */ - itemTypeName: string; - /** - * The HTML attributes for an ordered list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * Keep the marks when splitting a list item. - * @default false - * @example true - */ - keepMarks: boolean; - /** - * Keep the attributes when splitting a list item. - * @default false - * @example true - */ - keepAttributes: boolean; -} -declare module '@tiptap/core' { - interface Commands { - orderedList: { - /** - * Toggle an ordered list - * @example editor.commands.toggleOrderedList() - */ - toggleOrderedList: () => ReturnType; - }; - } -} -/** - * Matches an ordered list to a 1. on input (or any number followed by a dot). - */ -declare const orderedListInputRegex: RegExp; -/** - * This extension allows you to create ordered lists. - * This requires the ListItem extension - * @see https://www.tiptap.dev/api/nodes/ordered-list - * @see https://www.tiptap.dev/api/nodes/list-item - */ -declare const OrderedList: Node; - -export { OrderedList, type OrderedListOptions, orderedListInputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.js deleted file mode 100644 index 460941e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.js +++ /dev/null @@ -1,317 +0,0 @@ -// src/ordered-list/ordered-list.ts -import { mergeAttributes, Node, wrappingInputRule } from "@tiptap/core"; - -// src/ordered-list/utils.ts -var ORDERED_LIST_ITEM_REGEX = /^(\s*)(\d+)\.\s+(.*)$/; -var INDENTED_LINE_REGEX = /^\s/; -function isBlockContentLine(line) { - const trimmedLine = line.trimStart(); - return ( - // oxlint-disable-next-line prefer-string-starts-ends-with - /^[-+*]\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^\d+\.\s+/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^>\s?/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^```/.test(trimmedLine) || // oxlint-disable-next-line prefer-string-starts-ends-with - /^~~~/.test(trimmedLine) - ); -} -function splitItemContent(contentLines) { - const paragraphLines = []; - const blockLines = []; - let reachedBlockBoundary = false; - contentLines.forEach((line) => { - if (reachedBlockBoundary) { - blockLines.push(line); - return; - } - if (line.trim() === "") { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - if (paragraphLines.length > 0 && isBlockContentLine(line)) { - reachedBlockBoundary = true; - blockLines.push(line); - return; - } - paragraphLines.push(line); - }); - return { - paragraphLines, - blockLines - }; -} -function collectOrderedListItems(lines) { - const listItems = []; - let currentLineIndex = 0; - let consumed = 0; - while (currentLineIndex < lines.length) { - const line = lines[currentLineIndex]; - const match = line.match(ORDERED_LIST_ITEM_REGEX); - if (!match) { - break; - } - const [, indent, number, content] = match; - const indentLevel = indent.length; - const itemContentLines = [content]; - let nextLineIndex = currentLineIndex + 1; - const itemLines = [line]; - let sawBlankLine = false; - while (nextLineIndex < lines.length) { - const nextLine = lines[nextLineIndex]; - const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX); - if (nextMatch) { - break; - } - if (nextLine.trim() === "") { - itemLines.push(nextLine); - itemContentLines.push(""); - sawBlankLine = true; - nextLineIndex += 1; - } else if (nextLine.match(INDENTED_LINE_REGEX)) { - itemLines.push(nextLine); - itemContentLines.push(nextLine.slice(indentLevel + 2)); - nextLineIndex += 1; - } else { - if (sawBlankLine) { - break; - } - itemLines.push(nextLine); - itemContentLines.push(nextLine); - nextLineIndex += 1; - } - } - listItems.push({ - indent: indentLevel, - number: parseInt(number, 10), - content: itemContentLines.join("\n").trim(), - contentLines: itemContentLines, - raw: itemLines.join("\n") - }); - consumed = nextLineIndex; - currentLineIndex = nextLineIndex; - } - return [listItems, consumed]; -} -function buildNestedStructure(items, baseIndent, lexer) { - const result = []; - let currentIndex = 0; - while (currentIndex < items.length) { - const item = items[currentIndex]; - if (item.indent === baseIndent) { - const { paragraphLines, blockLines } = splitItemContent(item.contentLines); - const mainText = paragraphLines.join("\n").trim(); - const tokens = []; - if (mainText) { - tokens.push({ - type: "paragraph", - raw: mainText, - tokens: lexer.inlineTokens(mainText) - }); - } - const additionalContent = blockLines.join("\n").trim(); - if (additionalContent) { - const blockTokens = lexer.blockTokens(additionalContent); - tokens.push(...blockTokens); - } - let lookAheadIndex = currentIndex + 1; - const nestedItems = []; - while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) { - nestedItems.push(items[lookAheadIndex]); - lookAheadIndex += 1; - } - if (nestedItems.length > 0) { - const nextIndent = Math.min(...nestedItems.map((nestedItem) => nestedItem.indent)); - const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer); - tokens.push({ - type: "list", - ordered: true, - start: nestedItems[0].number, - items: nestedListItems, - raw: nestedItems.map((nestedItem) => nestedItem.raw).join("\n") - }); - } - result.push({ - type: "list_item", - raw: item.raw, - tokens - }); - currentIndex = lookAheadIndex; - } else { - currentIndex += 1; - } - } - return result; -} -function parseListItems(items, helpers) { - return items.map((item) => { - if (item.type !== "list_item") { - return helpers.parseChildren([item])[0]; - } - const content = []; - if (item.tokens && item.tokens.length > 0) { - item.tokens.forEach((itemToken) => { - if (itemToken.type === "paragraph" || itemToken.type === "list" || itemToken.type === "blockquote" || itemToken.type === "code") { - content.push(...helpers.parseChildren([itemToken])); - } else if (itemToken.type === "text" && itemToken.tokens) { - const inlineContent = helpers.parseChildren([itemToken]); - content.push({ - type: "paragraph", - content: inlineContent - }); - } else { - const parsed = helpers.parseChildren([itemToken]); - if (parsed.length > 0) { - content.push(...parsed); - } - } - }); - } - return { - type: "listItem", - content - }; - }); -} - -// src/ordered-list/ordered-list.ts -var ListItemName = "listItem"; -var TextStyleName = "textStyle"; -var orderedListInputRegex = /^(\d+)\.\s$/; -var OrderedList = Node.create({ - name: "orderedList", - addOptions() { - return { - itemTypeName: "listItem", - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - addAttributes() { - return { - start: { - default: 1, - parseHTML: (element) => { - return element.hasAttribute("start") ? parseInt(element.getAttribute("start") || "", 10) : 1; - } - }, - type: { - default: null, - parseHTML: (element) => element.getAttribute("type") - } - }; - }, - parseHTML() { - return [ - { - tag: "ol" - } - ]; - }, - renderHTML({ HTMLAttributes }) { - const { start, ...attributesWithoutStart } = HTMLAttributes; - return start === 1 ? ["ol", mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0] : ["ol", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "list", - parseMarkdown: (token, helpers) => { - if (token.type !== "list" || !token.ordered) { - return []; - } - const startValue = token.start || 1; - const content = token.items ? parseListItems(token.items, helpers) : []; - if (startValue !== 1) { - return { - type: "orderedList", - attrs: { start: startValue }, - content - }; - } - return { - type: "orderedList", - content - }; - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "orderedList", - level: "block", - start: (src) => { - const match = src.match(/^(\s*)(\d+)\.\s+/); - const index = match == null ? void 0 : match.index; - return index !== void 0 ? index : -1; - }, - tokenize: (src, _tokens, lexer) => { - var _a; - const lines = src.split("\n"); - const [listItems, consumed] = collectOrderedListItems(lines); - if (listItems.length === 0) { - return void 0; - } - const items = buildNestedStructure(listItems, 0, lexer); - if (items.length === 0) { - return void 0; - } - const startValue = ((_a = listItems[0]) == null ? void 0 : _a.number) || 1; - return { - type: "list", - ordered: true, - start: startValue, - items, - raw: lines.slice(0, consumed).join("\n") - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleOrderedList: () => ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run(); - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() - }; - }, - addInputRules() { - let inputRule = wrappingInputRule({ - find: orderedListInputRegex, - type: this.type, - getAttributes: (match) => ({ start: +match[1] }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1] - }); - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = wrappingInputRule({ - find: orderedListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: (match) => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1], - editor: this.editor - }); - } - return [inputRule]; - } -}); -export { - OrderedList, - orderedListInputRegex -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.js.map deleted file mode 100644 index b4378da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/ordered-list/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/ordered-list/ordered-list.ts","../../src/ordered-list/utils.ts"],"sourcesContent":["import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'\n\nimport { buildNestedStructure, collectOrderedListItems, parseListItems } from './utils.js'\n\nconst ListItemName = 'listItem'\nconst TextStyleName = 'textStyle'\n\nexport interface OrderedListOptions {\n /**\n * The node type name for list items.\n * @default 'listItem'\n * @example 'myListItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for an ordered list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * Keep the marks when splitting a list item.\n * @default false\n * @example true\n */\n keepMarks: boolean\n\n /**\n * Keep the attributes when splitting a list item.\n * @default false\n * @example true\n */\n keepAttributes: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n orderedList: {\n /**\n * Toggle an ordered list\n * @example editor.commands.toggleOrderedList()\n */\n toggleOrderedList: () => ReturnType\n }\n }\n}\n\n/**\n * Matches an ordered list to a 1. on input (or any number followed by a dot).\n */\nexport const orderedListInputRegex = /^(\\d+)\\.\\s$/\n\n/**\n * This extension allows you to create ordered lists.\n * This requires the ListItem extension\n * @see https://www.tiptap.dev/api/nodes/ordered-list\n * @see https://www.tiptap.dev/api/nodes/list-item\n */\nexport const OrderedList = Node.create({\n name: 'orderedList',\n\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n addAttributes() {\n return {\n start: {\n default: 1,\n parseHTML: element => {\n return element.hasAttribute('start')\n ? parseInt(element.getAttribute('start') || '', 10)\n : 1\n },\n },\n type: {\n default: null,\n parseHTML: element => element.getAttribute('type'),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'ol',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n const { start, ...attributesWithoutStart } = HTMLAttributes\n\n return start === 1\n ? ['ol', mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0]\n : ['ol', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'list',\n\n parseMarkdown: (token, helpers) => {\n if (token.type !== 'list' || !token.ordered) {\n return []\n }\n\n const startValue = token.start || 1\n const content = token.items ? parseListItems(token.items, helpers) : []\n\n if (startValue !== 1) {\n return {\n type: 'orderedList',\n attrs: { start: startValue },\n content,\n }\n }\n\n return {\n type: 'orderedList',\n content,\n }\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'orderedList',\n level: 'block',\n start: (src: string) => {\n const match = src.match(/^(\\s*)(\\d+)\\.\\s+/)\n const index = match?.index\n return index !== undefined ? index : -1\n },\n tokenize: (src: string, _tokens, lexer) => {\n const lines = src.split('\\n')\n const [listItems, consumed] = collectOrderedListItems(lines)\n\n if (listItems.length === 0) {\n return undefined\n }\n\n const items = buildNestedStructure(listItems, 0, lexer)\n\n if (items.length === 0) {\n return undefined\n }\n\n const startValue = listItems[0]?.number || 1\n\n return {\n type: 'list',\n ordered: true,\n start: startValue,\n items,\n raw: lines.slice(0, consumed).join('\\n'),\n } as unknown as object\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleOrderedList:\n () =>\n ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain()\n .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName))\n .run()\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-7': () => this.editor.commands.toggleOrderedList(),\n }\n },\n\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n getAttributes: match => ({ start: +match[1] }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n })\n\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: orderedListInputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }),\n joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],\n editor: this.editor,\n })\n }\n return [inputRule]\n },\n})\n","import type {\n JSONContent,\n MarkdownLexerConfiguration,\n MarkdownParseHelpers,\n MarkdownToken,\n} from '@tiptap/core'\n\n/**\n * Matches an ordered list item line with optional leading whitespace.\n * Captures: (1) indentation spaces, (2) item number, (3) content after marker\n * Example matches: \"1. Item\", \" 2. Nested item\", \" 3. Deeply nested\"\n */\nconst ORDERED_LIST_ITEM_REGEX = /^(\\s*)(\\d+)\\.\\s+(.*)$/\n\n/**\n * Matches any line that starts with whitespace (indented content).\n * Used to identify continuation content that belongs to a list item.\n */\nconst INDENTED_LINE_REGEX = /^\\s/\n\n/**\n * Represents a parsed ordered list item with indentation information\n */\nexport interface OrderedListItem {\n indent: number\n number: number\n content: string\n contentLines: string[]\n raw: string\n}\n\nfunction isBlockContentLine(line: string): boolean {\n const trimmedLine = line.trimStart()\n\n return (\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^[-+*]\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^\\d+\\.\\s+/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^>\\s?/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^```/.test(trimmedLine) ||\n // oxlint-disable-next-line prefer-string-starts-ends-with\n /^~~~/.test(trimmedLine)\n )\n}\n\nfunction splitItemContent(contentLines: string[]): {\n paragraphLines: string[]\n blockLines: string[]\n} {\n const paragraphLines: string[] = []\n const blockLines: string[] = []\n let reachedBlockBoundary = false\n\n contentLines.forEach(line => {\n if (reachedBlockBoundary) {\n blockLines.push(line)\n return\n }\n\n if (line.trim() === '') {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n if (paragraphLines.length > 0 && isBlockContentLine(line)) {\n reachedBlockBoundary = true\n blockLines.push(line)\n return\n }\n\n paragraphLines.push(line)\n })\n\n return {\n paragraphLines,\n blockLines,\n }\n}\n\n/**\n * Collects all ordered list items from lines, parsing them into a flat array\n * with indentation information. Stops collecting continuation content when\n * encountering nested list items, allowing them to be processed separately.\n *\n * @param lines - Array of source lines to parse\n * @returns Tuple of [listItems array, number of lines consumed]\n */\nexport function collectOrderedListItems(lines: string[]): [OrderedListItem[], number] {\n const listItems: OrderedListItem[] = []\n let currentLineIndex = 0\n let consumed = 0\n\n while (currentLineIndex < lines.length) {\n const line = lines[currentLineIndex]\n const match = line.match(ORDERED_LIST_ITEM_REGEX)\n\n if (!match) {\n break\n }\n\n const [, indent, number, content] = match\n const indentLevel = indent.length\n const itemContentLines = [content]\n let nextLineIndex = currentLineIndex + 1\n const itemLines = [line]\n let sawBlankLine = false\n\n // Collect continuation lines for this item (but NOT nested list items)\n while (nextLineIndex < lines.length) {\n const nextLine = lines[nextLineIndex]\n const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX)\n\n // If it's another list item (nested or not), stop collecting\n if (nextMatch) {\n break\n }\n\n // Check for continuation content (non-list content)\n if (nextLine.trim() === '') {\n // Empty line\n itemLines.push(nextLine)\n itemContentLines.push('')\n sawBlankLine = true\n nextLineIndex += 1\n } else if (nextLine.match(INDENTED_LINE_REGEX)) {\n // Indented content - part of this item (but not a list item)\n itemLines.push(nextLine)\n itemContentLines.push(nextLine.slice(indentLevel + 2))\n nextLineIndex += 1\n } else {\n if (sawBlankLine) {\n break\n }\n\n itemLines.push(nextLine)\n itemContentLines.push(nextLine)\n nextLineIndex += 1\n }\n }\n\n listItems.push({\n indent: indentLevel,\n number: parseInt(number, 10),\n content: itemContentLines.join('\\n').trim(),\n contentLines: itemContentLines,\n raw: itemLines.join('\\n'),\n })\n\n consumed = nextLineIndex\n currentLineIndex = nextLineIndex\n }\n\n return [listItems, consumed]\n}\n\n/**\n * Recursively builds a nested structure from a flat array of list items\n * based on their indentation levels. Creates proper markdown tokens with\n * nested lists where appropriate.\n *\n * @param items - Flat array of list items with indentation info\n * @param baseIndent - The indentation level to process at this recursion level\n * @param lexer - Markdown lexer for parsing inline and block content\n * @returns Array of list_item tokens with proper nesting\n */\nexport function buildNestedStructure(\n items: OrderedListItem[],\n baseIndent: number,\n lexer: MarkdownLexerConfiguration,\n): unknown[] {\n const result: unknown[] = []\n let currentIndex = 0\n\n while (currentIndex < items.length) {\n const item = items[currentIndex]\n\n if (item.indent === baseIndent) {\n // This item belongs at the current level\n const { paragraphLines, blockLines } = splitItemContent(item.contentLines)\n const mainText = paragraphLines.join('\\n').trim()\n\n const tokens = []\n\n // Always wrap the main text in a paragraph token\n if (mainText) {\n tokens.push({\n type: 'paragraph',\n raw: mainText,\n tokens: lexer.inlineTokens(mainText),\n })\n }\n\n const additionalContent = blockLines.join('\\n').trim()\n if (additionalContent) {\n const blockTokens = lexer.blockTokens(additionalContent)\n tokens.push(...blockTokens)\n }\n\n // Look ahead to find nested items at deeper indent levels\n let lookAheadIndex = currentIndex + 1\n const nestedItems = []\n\n while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) {\n nestedItems.push(items[lookAheadIndex])\n lookAheadIndex += 1\n }\n\n // If we have nested items, recursively build their structure\n if (nestedItems.length > 0) {\n // Find the next indent level (immediate children)\n const nextIndent = Math.min(...nestedItems.map(nestedItem => nestedItem.indent))\n\n // Build the nested list recursively with all nested items\n // The recursive call will handle further nesting\n const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer)\n\n // Create a nested list token\n tokens.push({\n type: 'list',\n ordered: true,\n start: nestedItems[0].number,\n items: nestedListItems,\n raw: nestedItems.map(nestedItem => nestedItem.raw).join('\\n'),\n })\n }\n\n result.push({\n type: 'list_item',\n raw: item.raw,\n tokens,\n })\n\n // Skip the nested items we just processed\n currentIndex = lookAheadIndex\n } else {\n // This item has deeper indent than we're currently processing\n // It should be handled by a recursive call\n currentIndex += 1\n }\n }\n\n return result\n}\n\n/**\n * Parses markdown list item tokens into Tiptap JSONContent structure,\n * ensuring text content is properly wrapped in paragraph nodes.\n *\n * @param items - Array of markdown tokens representing list items\n * @param helpers - Markdown parse helpers for recursive parsing\n * @returns Array of listItem JSONContent nodes\n */\nexport function parseListItems(\n items: MarkdownToken[],\n helpers: MarkdownParseHelpers,\n): JSONContent[] {\n return items.map(item => {\n if (item.type !== 'list_item') {\n return helpers.parseChildren([item])[0]\n }\n\n // Parse the tokens within the list item\n const content: JSONContent[] = []\n\n if (item.tokens && item.tokens.length > 0) {\n item.tokens.forEach(itemToken => {\n // If it's already a proper block node (paragraph, list, etc.), parse it directly\n if (\n itemToken.type === 'paragraph' ||\n itemToken.type === 'list' ||\n itemToken.type === 'blockquote' ||\n itemToken.type === 'code'\n ) {\n content.push(...helpers.parseChildren([itemToken]))\n } else if (itemToken.type === 'text' && itemToken.tokens) {\n // If it's inline text tokens, wrap them in a paragraph\n const inlineContent = helpers.parseChildren([itemToken])\n content.push({\n type: 'paragraph',\n content: inlineContent,\n })\n } else {\n // For any other content, try to parse it\n const parsed = helpers.parseChildren([itemToken])\n if (parsed.length > 0) {\n content.push(...parsed)\n }\n }\n })\n }\n\n return {\n type: 'listItem',\n content,\n }\n })\n}\n"],"mappings":";AAAA,SAAS,iBAAiB,MAAM,yBAAyB;;;ACYzD,IAAM,0BAA0B;AAMhC,IAAM,sBAAsB;AAa5B,SAAS,mBAAmB,MAAuB;AACjD,QAAM,cAAc,KAAK,UAAU;AAEnC;AAAA;AAAA,IAEE,YAAY,KAAK,WAAW;AAAA,IAE5B,YAAY,KAAK,WAAW;AAAA,IAE5B,QAAQ,KAAK,WAAW;AAAA,IAExB,OAAO,KAAK,WAAW;AAAA,IAEvB,OAAO,KAAK,WAAW;AAAA;AAE3B;AAEA,SAAS,iBAAiB,cAGxB;AACA,QAAM,iBAA2B,CAAC;AAClC,QA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0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.cjs deleted file mode 100644 index 909fc81..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.cjs +++ /dev/null @@ -1,346 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/task-item/index.ts -var index_exports = {}; -__export(index_exports, { - TaskItem: () => TaskItem, - inputRegex: () => inputRegex -}); -module.exports = __toCommonJS(index_exports); - -// src/task-item/task-item.ts -var import_core2 = require("@tiptap/core"); - -// src/helpers/createBranchingListDeleteKeymap.ts -var import_core = require("@tiptap/core"); - -// src/helpers/hoistBranchingNestedList.ts -var import_model = require("@tiptap/pm/model"); - -// src/helpers/getBranchingNestedListAtCursor.ts -var getBranchingNestedListAtCursor = (state, itemName, wrapperNames) => { - const { selection } = state; - if (!selection.empty) { - return null; - } - const { $from } = selection; - if (!$from.parent.isTextblock) { - return null; - } - if ($from.parentOffset !== $from.parent.content.size) { - return null; - } - let listItemDepth = -1; - for (let depth = $from.depth; depth > 0; depth -= 1) { - if ($from.node(depth).type.name === itemName) { - listItemDepth = depth; - break; - } - } - if (listItemDepth < 0) { - return null; - } - const listItem = $from.node(listItemDepth); - const indexInListItem = $from.index(listItemDepth); - if (indexInListItem + 1 >= listItem.childCount) { - return null; - } - const nextChild = listItem.child(indexInListItem + 1); - if (!wrapperNames.includes(nextChild.type.name)) { - return null; - } - const itemType = state.schema.nodes[itemName]; - let hasBranching = false; - nextChild.forEach((child) => { - if (child.type === itemType && child.childCount > 1) { - hasBranching = true; - } - }); - if (!hasBranching) { - return null; - } - const nodeAfter = state.doc.resolve($from.after()).nodeAfter; - if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) { - return null; - } - const items = []; - nodeAfter.forEach((child) => { - items.push(child); - }); - if (items.length === 0) { - return null; - } - return { - listItemDepth, - nestedList: nodeAfter, - nestedListPos: $from.after(), - insertPos: $from.after(listItemDepth), - items - }; -}; - -// src/helpers/hoistBranchingNestedList.ts -var hoistBranchingNestedList = (state, dispatch, itemName, wrapperNames) => { - const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames); - if (!context) { - return false; - } - const { selection } = state; - const { nestedList, nestedListPos, insertPos, items } = context; - const tr = state.tr; - tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize); - const mappedInsertPos = tr.mapping.map(insertPos); - tr.insert(mappedInsertPos, import_model.Fragment.from(items)); - tr.setSelection(selection.map(tr.doc, tr.mapping)); - if (dispatch) { - dispatch(tr); - } - return true; -}; - -// src/helpers/handleDeleteBranchingNestedList.ts -var handleDeleteBranchingNestedList = (editor, itemName, wrapperNames) => { - return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames); -}; - -// src/helpers/createBranchingListDeleteKeymap.ts -var createBranchingListDeleteKeymap = (itemName, wrapperNames) => { - return import_core.Extension.create({ - name: `${itemName}BranchingDeleteKeymap`, - priority: 101, - addKeyboardShortcuts() { - const handleDelete = () => handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames); - return { - Delete: handleDelete, - "Mod-Delete": handleDelete - }; - } - }); -}; - -// src/task-item/task-item.ts -var inputRegex = /^\s*(\[([( |x])?\])\s$/; -var TaskItem = import_core2.Node.create({ - name: "taskItem", - addOptions() { - return { - nested: false, - HTMLAttributes: {}, - taskListTypeName: "taskList", - a11y: void 0 - }; - }, - content() { - return this.options.nested ? "paragraph block*" : "paragraph+"; - }, - defining: true, - addAttributes() { - return { - checked: { - default: false, - keepOnSplit: false, - parseHTML: (element) => { - const dataChecked = element.getAttribute("data-checked"); - return dataChecked === "" || dataChecked === "true"; - }, - renderHTML: (attributes) => ({ - "data-checked": attributes.checked - }) - } - }; - }, - parseHTML() { - return [ - { - tag: `li[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ node, HTMLAttributes }) { - return [ - "li", - (0, import_core2.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes, { - "data-type": this.name - }), - [ - "label", - [ - "input", - { - type: "checkbox", - checked: node.attrs.checked ? "checked" : null - } - ], - ["span"] - ], - ["div", 0] - ]; - }, - parseMarkdown: (token, h) => { - const content = []; - if (token.tokens && token.tokens.length > 0) { - content.push(h.createNode("paragraph", {}, h.parseInline(token.tokens))); - } else if (token.text) { - content.push(h.createNode("paragraph", {}, [h.createNode("text", { text: token.text })])); - } else { - content.push(h.createNode("paragraph", {}, [])); - } - if (token.nestedTokens && token.nestedTokens.length > 0) { - const nestedContent = h.parseChildren(token.nestedTokens); - content.push(...nestedContent); - } - return h.createNode("taskItem", { checked: token.checked || false }, content); - }, - renderMarkdown: (node, h) => { - var _a; - const checkedChar = ((_a = node.attrs) == null ? void 0 : _a.checked) ? "x" : " "; - const prefix = `- [${checkedChar}] `; - return (0, import_core2.renderNestedMarkdownContent)(node, h, prefix); - }, - addExtensions() { - if (!this.options.nested) { - return []; - } - return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]; - }, - addKeyboardShortcuts() { - const shortcuts = { - Enter: () => this.editor.commands.splitListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - if (!this.options.nested) { - return shortcuts; - } - return { - ...shortcuts, - Tab: () => this.editor.commands.sinkListItem(this.name) - }; - }, - addNodeView() { - return ({ node, HTMLAttributes, getPos, editor }) => { - const listItem = document.createElement("li"); - const checkboxWrapper = document.createElement("label"); - const checkboxStyler = document.createElement("span"); - const checkbox = document.createElement("input"); - const content = document.createElement("div"); - const updateA11Y = (currentNode) => { - var _a, _b; - checkbox.ariaLabel = ((_b = (_a = this.options.a11y) == null ? void 0 : _a.checkboxLabel) == null ? void 0 : _b.call(_a, currentNode, checkbox.checked)) || `Task item checkbox for ${currentNode.textContent || "empty task item"}`; - }; - updateA11Y(node); - checkboxWrapper.contentEditable = "false"; - checkbox.type = "checkbox"; - checkbox.addEventListener("mousedown", (event) => event.preventDefault()); - checkbox.addEventListener("change", (event) => { - if (!editor.isEditable && !this.options.onReadOnlyChecked) { - checkbox.checked = !checkbox.checked; - return; - } - const { checked } = event.target; - if (editor.isEditable && typeof getPos === "function") { - editor.chain().focus(void 0, { scrollIntoView: false }).command(({ tr }) => { - const position = getPos(); - if (typeof position !== "number") { - return false; - } - const currentNode = tr.doc.nodeAt(position); - tr.setNodeMarkup(position, void 0, { - ...currentNode == null ? void 0 : currentNode.attrs, - checked - }); - return true; - }).run(); - } - if (!editor.isEditable && this.options.onReadOnlyChecked) { - if (!this.options.onReadOnlyChecked(node, checked)) { - checkbox.checked = !checkbox.checked; - } - } - }); - Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - listItem.dataset.checked = node.attrs.checked; - checkbox.checked = node.attrs.checked; - checkboxWrapper.append(checkbox, checkboxStyler); - listItem.append(checkboxWrapper, content); - Object.entries(HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes)); - return { - dom: listItem, - contentDOM: content, - update: (updatedNode) => { - if (updatedNode.type !== this.type) { - return false; - } - listItem.dataset.checked = updatedNode.attrs.checked; - checkbox.checked = updatedNode.attrs.checked; - updateA11Y(updatedNode); - const extensionAttributes = editor.extensionManager.attributes; - const newHTMLAttributes = (0, import_core2.getRenderedAttributes)(updatedNode, extensionAttributes); - const newKeys = new Set(Object.keys(newHTMLAttributes)); - const staticAttrs = this.options.HTMLAttributes; - prevRenderedAttributeKeys.forEach((key) => { - if (!newKeys.has(key)) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } - }); - Object.entries(newHTMLAttributes).forEach(([key, value]) => { - if (value === null || value === void 0) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } else { - listItem.setAttribute(key, value); - } - }); - prevRenderedAttributeKeys = newKeys; - return true; - } - }; - }; - }, - addInputRules() { - return [ - (0, import_core2.wrappingInputRule)({ - find: inputRegex, - type: this.type, - getAttributes: (match) => ({ - checked: match[match.length - 1] === "x" - }) - }) - ]; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - TaskItem, - inputRegex -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.cjs.map deleted file mode 100644 index 7ebdb45..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/task-item/index.ts","../../src/task-item/task-item.ts","../../src/helpers/createBranchingListDeleteKeymap.ts","../../src/helpers/hoistBranchingNestedList.ts","../../src/helpers/getBranchingNestedListAtCursor.ts","../../src/helpers/handleDeleteBranchingNestedList.ts"],"sourcesContent":["export * from './task-item.js'\n","import type { KeyboardShortcutCommand } from '@tiptap/core'\nimport {\n getRenderedAttributes,\n mergeAttributes,\n Node,\n renderNestedMarkdownContent,\n wrappingInputRule,\n} from '@tiptap/core'\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface TaskItemOptions {\n /**\n * A callback function that is called when the checkbox is clicked while the editor is in readonly mode.\n * @param node The prosemirror node of the task item\n * @param checked The new checked state\n * @returns boolean\n */\n onReadOnlyChecked?: (node: ProseMirrorNode, checked: boolean) => boolean\n\n /**\n * Controls whether the task items can be nested or not.\n * @default false\n * @example true\n */\n nested: boolean\n\n /**\n * HTML attributes to add to the task item element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for taskList nodes\n * @default 'taskList'\n * @example 'myCustomTaskList'\n */\n taskListTypeName: string\n\n /**\n * Accessibility options for the task item.\n * @default {}\n * @example\n * ```js\n * {\n * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}`\n * }\n */\n a11y?: {\n checkboxLabel?: (node: ProseMirrorNode, checked: boolean) => string\n }\n}\n\n/**\n * Matches a task item to a - [ ] on input.\n */\nexport const inputRegex = /^\\s*(\\[([( |x])?\\])\\s$/\n\n/**\n * This extension allows you to create task items.\n * @see https://www.tiptap.dev/api/nodes/task-item\n */\nexport const TaskItem = Node.create({\n name: 'taskItem',\n\n addOptions() {\n return {\n nested: false,\n HTMLAttributes: {},\n taskListTypeName: 'taskList',\n a11y: undefined,\n }\n },\n\n content() {\n return this.options.nested ? 'paragraph block*' : 'paragraph+'\n },\n\n defining: true,\n\n addAttributes() {\n return {\n checked: {\n default: false,\n keepOnSplit: false,\n parseHTML: element => {\n const dataChecked = element.getAttribute('data-checked')\n\n return dataChecked === '' || dataChecked === 'true'\n },\n renderHTML: attributes => ({\n 'data-checked': attributes.checked,\n }),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: `li[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ node, HTMLAttributes }) {\n return [\n 'li',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {\n 'data-type': this.name,\n }),\n [\n 'label',\n [\n 'input',\n {\n type: 'checkbox',\n checked: node.attrs.checked ? 'checked' : null,\n },\n ],\n ['span'],\n ],\n ['div', 0],\n ]\n },\n\n parseMarkdown: (token, h) => {\n // Parse the task item's text content into paragraph content\n const content = []\n\n // First, add the main paragraph content\n if (token.tokens && token.tokens.length > 0) {\n // If we have tokens, create a paragraph with the inline content\n content.push(h.createNode('paragraph', {}, h.parseInline(token.tokens)))\n } else if (token.text) {\n // If we have raw text, create a paragraph with text node\n content.push(h.createNode('paragraph', {}, [h.createNode('text', { text: token.text })]))\n } else {\n // Fallback: empty paragraph\n content.push(h.createNode('paragraph', {}, []))\n }\n\n // Then, add any nested content (like nested task lists)\n if (token.nestedTokens && token.nestedTokens.length > 0) {\n const nestedContent = h.parseChildren(token.nestedTokens)\n content.push(...nestedContent)\n }\n\n return h.createNode('taskItem', { checked: token.checked || false }, content)\n },\n\n renderMarkdown: (node, h) => {\n const checkedChar = node.attrs?.checked ? 'x' : ' '\n const prefix = `- [${checkedChar}] `\n\n return renderNestedMarkdownContent(node, h, prefix)\n },\n\n addExtensions() {\n if (!this.options.nested) {\n return []\n }\n\n return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]\n },\n\n addKeyboardShortcuts() {\n const shortcuts: {\n [key: string]: KeyboardShortcutCommand\n } = {\n Enter: () => this.editor.commands.splitListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n\n if (!this.options.nested) {\n return shortcuts\n }\n\n return {\n ...shortcuts,\n Tab: () => this.editor.commands.sinkListItem(this.name),\n }\n },\n\n addNodeView() {\n return ({ node, HTMLAttributes, getPos, editor }) => {\n const listItem = document.createElement('li')\n const checkboxWrapper = document.createElement('label')\n const checkboxStyler = document.createElement('span')\n const checkbox = document.createElement('input')\n const content = document.createElement('div')\n\n const updateA11Y = (currentNode: ProseMirrorNode) => {\n checkbox.ariaLabel =\n this.options.a11y?.checkboxLabel?.(currentNode, checkbox.checked) ||\n `Task item checkbox for ${currentNode.textContent || 'empty task item'}`\n }\n\n updateA11Y(node)\n\n checkboxWrapper.contentEditable = 'false'\n checkbox.type = 'checkbox'\n checkbox.addEventListener('mousedown', event => event.preventDefault())\n checkbox.addEventListener('change', event => {\n // if the editor isn’t editable and we don't have a handler for\n // readonly checks we have to undo the latest change\n if (!editor.isEditable && !this.options.onReadOnlyChecked) {\n checkbox.checked = !checkbox.checked\n\n return\n }\n\n const { checked } = event.target as any\n\n if (editor.isEditable && typeof getPos === 'function') {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .command(({ tr }) => {\n const position = getPos()\n\n if (typeof position !== 'number') {\n return false\n }\n const currentNode = tr.doc.nodeAt(position)\n\n tr.setNodeMarkup(position, undefined, {\n ...currentNode?.attrs,\n checked,\n })\n\n return true\n })\n .run()\n }\n if (!editor.isEditable && this.options.onReadOnlyChecked) {\n // Reset state if onReadOnlyChecked returns false\n if (!this.options.onReadOnlyChecked(node, checked)) {\n checkbox.checked = !checkbox.checked\n }\n }\n })\n\n Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n listItem.dataset.checked = node.attrs.checked\n checkbox.checked = node.attrs.checked\n\n checkboxWrapper.append(checkbox, checkboxStyler)\n listItem.append(checkboxWrapper, content)\n\n Object.entries(HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n // Track the keys of previously rendered HTML attributes for proper removal\n let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes))\n\n return {\n dom: listItem,\n contentDOM: content,\n update: updatedNode => {\n if (updatedNode.type !== this.type) {\n return false\n }\n\n listItem.dataset.checked = updatedNode.attrs.checked\n checkbox.checked = updatedNode.attrs.checked\n updateA11Y(updatedNode)\n\n // Sync all HTML attributes from the updated node\n const extensionAttributes = editor.extensionManager.attributes\n const newHTMLAttributes = getRenderedAttributes(updatedNode, extensionAttributes)\n const newKeys = new Set(Object.keys(newHTMLAttributes))\n\n // Remove attributes that were previously rendered but are no longer present\n // If the attribute exists in static options, restore it instead of removing\n const staticAttrs = this.options.HTMLAttributes\n\n prevRenderedAttributeKeys.forEach(key => {\n if (!newKeys.has(key)) {\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n }\n })\n\n // Update or add new attributes\n Object.entries(newHTMLAttributes).forEach(([key, value]) => {\n if (value === null || value === undefined) {\n // If the attribute exists in static options, restore it instead of removing\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n } else {\n listItem.setAttribute(key, value)\n }\n })\n\n // Update the tracked keys for next update\n prevRenderedAttributeKeys = newKeys\n\n return true\n },\n }\n }\n },\n\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n getAttributes: match => ({\n checked: match[match.length - 1] === 'x',\n }),\n }),\n ]\n },\n})\n","import { Extension } from '@tiptap/core'\n\nimport { handleDeleteBranchingNestedList } from './handleDeleteBranchingNestedList.js'\n\n/**\n * Creates a high-priority keymap extension that handles Delete for branching nested lists.\n * Kept separate from the list item node so Enter/Tab shortcuts keep their default priority.\n */\nexport const createBranchingListDeleteKeymap = (itemName: string, wrapperNames: string[]) => {\n return Extension.create({\n name: `${itemName}BranchingDeleteKeymap`,\n priority: 101,\n\n addKeyboardShortcuts() {\n const handleDelete = () =>\n handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames)\n\n return {\n Delete: handleDelete,\n 'Mod-Delete': handleDelete,\n }\n },\n })\n}\n","import { Fragment } from '@tiptap/pm/model'\nimport type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { getBranchingNestedListAtCursor } from './getBranchingNestedListAtCursor.js'\n\n/**\n * Hoists all list items from a branching nested list after the cursor into the parent list.\n *\n * Use this when `joinForward` cannot restructure a nested list that contains list items\n * with sublists (see issue #6906).\n *\n * @param state - The editor state to transform.\n * @param dispatch - Optional dispatch function for the transaction.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * // Cursor at the end of \"Item 1\" before a nested list with branching items.\n * hoistBranchingNestedList(editor.state, editor.view.dispatch, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n * ```\n */\nexport const hoistBranchingNestedList = (\n state: EditorState,\n dispatch: ((tr: Transaction) => void) | undefined,\n itemName: string,\n wrapperNames: string[],\n) => {\n const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames)\n\n if (!context) {\n return false\n }\n\n const { selection } = state\n const { nestedList, nestedListPos, insertPos, items } = context\n const tr = state.tr\n\n tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize)\n\n const mappedInsertPos = tr.mapping.map(insertPos)\n\n tr.insert(mappedInsertPos, Fragment.from(items))\n\n tr.setSelection(selection.map(tr.doc, tr.mapping))\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport type BranchingNestedListAtCursor = {\n listItemDepth: number\n nestedList: Node\n nestedListPos: number\n insertPos: number\n items: Node[]\n}\n\n/**\n * Resolves a branching nested list immediately after the cursor when the selection is\n * collapsed at the end of a textblock inside a list item.\n *\n * @param state - The editor state to inspect.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns Resolved positions and nodes for hoisting, or `null` when not applicable.\n *\n * @example\n * ```ts\n * const context = getBranchingNestedListAtCursor(editor.state, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n *\n * if (context) {\n * // cursor is at the end of Item 1 before a branching nested sublist\n * }\n * ```\n */\nexport const getBranchingNestedListAtCursor = (\n state: EditorState,\n itemName: string,\n wrapperNames: string[],\n): BranchingNestedListAtCursor | null => {\n const { selection } = state\n\n if (!selection.empty) {\n return null\n }\n\n const { $from } = selection\n\n if (!$from.parent.isTextblock) {\n return null\n }\n\n if ($from.parentOffset !== $from.parent.content.size) {\n return null\n }\n\n let listItemDepth = -1\n\n for (let depth = $from.depth; depth > 0; depth -= 1) {\n if ($from.node(depth).type.name === itemName) {\n listItemDepth = depth\n break\n }\n }\n\n if (listItemDepth < 0) {\n return null\n }\n\n const listItem = $from.node(listItemDepth)\n const indexInListItem = $from.index(listItemDepth)\n\n if (indexInListItem + 1 >= listItem.childCount) {\n return null\n }\n\n const nextChild = listItem.child(indexInListItem + 1)\n\n if (!wrapperNames.includes(nextChild.type.name)) {\n return null\n }\n\n const itemType = state.schema.nodes[itemName]\n let hasBranching = false\n\n nextChild.forEach(child => {\n if (child.type === itemType && child.childCount > 1) {\n hasBranching = true\n }\n })\n\n if (!hasBranching) {\n return null\n }\n\n const nodeAfter = state.doc.resolve($from.after()).nodeAfter\n\n if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) {\n return null\n }\n\n const items: Node[] = []\n\n nodeAfter.forEach(child => {\n items.push(child)\n })\n\n if (items.length === 0) {\n return null\n }\n\n return {\n listItemDepth,\n nestedList: nodeAfter,\n nestedListPos: $from.after(),\n insertPos: $from.after(listItemDepth),\n items,\n }\n}\n","import type { Editor } from '@tiptap/core'\n\nimport { hoistBranchingNestedList } from './hoistBranchingNestedList.js'\n\n/**\n * Handles Delete for a list item when a branching nested sublist follows the cursor.\n *\n * @param editor - The editor instance whose state should be updated.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * Delete: () =>\n * handleDeleteBranchingNestedList(editor, 'listItem', ['bulletList', 'orderedList']),\n * ```\n */\nexport const handleDeleteBranchingNestedList = (\n editor: Editor,\n itemName: string,\n wrapperNames: string[],\n) => {\n return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,IAAAA,eAMO;;;ACPP,kBAA0B;;;ACA1B,mBAAyB;;;ACgClB,IAAM,iCAAiC,CAC5C,OACA,UACA,iBACuC;AACvC,QAAM,EAAE,UAAU,IAAI;AAEtB,MAAI,CAAC,UAAU,OAAO;AACpB,WAAO;AAAA,EACT;AAEA,QAAM,EAAE,MAAM,IAAI;AAElB,MAAI,CAAC,MAAM,OAAO,aAAa;AAC7B,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,iBAAiB,MAAM,OAAO,QAAQ,MAAM;AACpD,WAAO;AAAA,EACT;AAEA,MAAI,gBAAgB;AAEpB,WAAS,QAAQ,MAAM,OAAO,QAAQ,GAAG,SAAS,GAAG;AACnD,QAAI,MAAM,KAAK,KAAK,EAAE,KAAK,SAAS,UAAU;AAC5C,sBAAgB;AAChB;AAAA,IACF;AAAA,EACF;AAEA,MAAI,gBAAgB,GAAG;AACrB,WAAO;AAAA,EACT;AAEA,QAAM,WAAW,MAAM,KAAK,aAAa;AACzC,QAAM,kBAAkB,MAAM,MAAM,aAAa;AAEjD,MAAI,kBAAkB,KAAK,SAAS,YAAY;AAC9C,WAAO;AAAA,EACT;AAEA,QAAM,YAAY,SAAS,MAAM,kBAAkB,CAAC;AAEpD,MAAI,CAAC,aAAa,SAAS,UAAU,KAAK,IAAI,GA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,iBAAiB,CAAC;AAItD,gBAAM,cAAc,KAAK,QAAQ;AAEjC,oCAA0B,QAAQ,SAAO;AACvC,gBAAI,CAAC,QAAQ,IAAI,GAAG,GAAG;AACrB,kBAAI,OAAO,aAAa;AACtB,yBAAS,aAAa,KAAK,YAAY,GAAG,CAAC;AAAA,cAC7C,OAAO;AACL,yBAAS,gBAAgB,GAAG;AAAA,cAC9B;AAAA,YACF;AAAA,UACF,CAAC;AAGD,iBAAO,QAAQ,iBAAiB,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC1D,gBAAI,UAAU,QAAQ,UAAU,QAAW;AAEzC,kBAAI,OAAO,aAAa;AACtB,yBAAS,aAAa,KAAK,YAAY,GAAG,CAAC;AAAA,cAC7C,OAAO;AACL,yBAAS,gBAAgB,GAAG;AAAA,cAC9B;AAAA,YACF,OAAO;AACL,uBAAS,aAAa,KAAK,KAAK;AAAA,YAClC;AAAA,UACF,CAAC;AAGD,sCAA4B;AAE5B,iBAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,UACL,gCAAkB;AAAA,QAChB,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,QACX,eAAe,YAAU;AAAA,UACvB,SAAS,MAAM,MAAM,SAAS,CAAC,MAAM;AAAA,QACvC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;","names":["import_core"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.d.cts deleted file mode 100644 index 494b4bc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.d.cts +++ /dev/null @@ -1,53 +0,0 @@ -import { Node } from '@tiptap/core'; -import { Node as Node$1 } from '@tiptap/pm/model'; - -interface TaskItemOptions { - /** - * A callback function that is called when the checkbox is clicked while the editor is in readonly mode. - * @param node The prosemirror node of the task item - * @param checked The new checked state - * @returns boolean - */ - onReadOnlyChecked?: (node: Node$1, checked: boolean) => boolean; - /** - * Controls whether the task items can be nested or not. - * @default false - * @example true - */ - nested: boolean; - /** - * HTML attributes to add to the task item element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for taskList nodes - * @default 'taskList' - * @example 'myCustomTaskList' - */ - taskListTypeName: string; - /** - * Accessibility options for the task item. - * @default {} - * @example - * ```js - * { - * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}` - * } - */ - a11y?: { - checkboxLabel?: (node: Node$1, checked: boolean) => string; - }; -} -/** - * Matches a task item to a - [ ] on input. - */ -declare const inputRegex: RegExp; -/** - * This extension allows you to create task items. - * @see https://www.tiptap.dev/api/nodes/task-item - */ -declare const TaskItem: Node; - -export { TaskItem, type TaskItemOptions, inputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.d.ts deleted file mode 100644 index 494b4bc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Node } from '@tiptap/core'; -import { Node as Node$1 } from '@tiptap/pm/model'; - -interface TaskItemOptions { - /** - * A callback function that is called when the checkbox is clicked while the editor is in readonly mode. - * @param node The prosemirror node of the task item - * @param checked The new checked state - * @returns boolean - */ - onReadOnlyChecked?: (node: Node$1, checked: boolean) => boolean; - /** - * Controls whether the task items can be nested or not. - * @default false - * @example true - */ - nested: boolean; - /** - * HTML attributes to add to the task item element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; - /** - * The node type for taskList nodes - * @default 'taskList' - * @example 'myCustomTaskList' - */ - taskListTypeName: string; - /** - * Accessibility options for the task item. - * @default {} - * @example - * ```js - * { - * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}` - * } - */ - a11y?: { - checkboxLabel?: (node: Node$1, checked: boolean) => string; - }; -} -/** - * Matches a task item to a - [ ] on input. - */ -declare const inputRegex: RegExp; -/** - * This extension allows you to create task items. - * @see https://www.tiptap.dev/api/nodes/task-item - */ -declare const TaskItem: Node; - -export { TaskItem, type TaskItemOptions, inputRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.js deleted file mode 100644 index fbdd0b3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.js +++ /dev/null @@ -1,324 +0,0 @@ -// src/task-item/task-item.ts -import { - getRenderedAttributes, - mergeAttributes, - Node, - renderNestedMarkdownContent, - wrappingInputRule -} from "@tiptap/core"; - -// src/helpers/createBranchingListDeleteKeymap.ts -import { Extension } from "@tiptap/core"; - -// src/helpers/hoistBranchingNestedList.ts -import { Fragment } from "@tiptap/pm/model"; - -// src/helpers/getBranchingNestedListAtCursor.ts -var getBranchingNestedListAtCursor = (state, itemName, wrapperNames) => { - const { selection } = state; - if (!selection.empty) { - return null; - } - const { $from } = selection; - if (!$from.parent.isTextblock) { - return null; - } - if ($from.parentOffset !== $from.parent.content.size) { - return null; - } - let listItemDepth = -1; - for (let depth = $from.depth; depth > 0; depth -= 1) { - if ($from.node(depth).type.name === itemName) { - listItemDepth = depth; - break; - } - } - if (listItemDepth < 0) { - return null; - } - const listItem = $from.node(listItemDepth); - const indexInListItem = $from.index(listItemDepth); - if (indexInListItem + 1 >= listItem.childCount) { - return null; - } - const nextChild = listItem.child(indexInListItem + 1); - if (!wrapperNames.includes(nextChild.type.name)) { - return null; - } - const itemType = state.schema.nodes[itemName]; - let hasBranching = false; - nextChild.forEach((child) => { - if (child.type === itemType && child.childCount > 1) { - hasBranching = true; - } - }); - if (!hasBranching) { - return null; - } - const nodeAfter = state.doc.resolve($from.after()).nodeAfter; - if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) { - return null; - } - const items = []; - nodeAfter.forEach((child) => { - items.push(child); - }); - if (items.length === 0) { - return null; - } - return { - listItemDepth, - nestedList: nodeAfter, - nestedListPos: $from.after(), - insertPos: $from.after(listItemDepth), - items - }; -}; - -// src/helpers/hoistBranchingNestedList.ts -var hoistBranchingNestedList = (state, dispatch, itemName, wrapperNames) => { - const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames); - if (!context) { - return false; - } - const { selection } = state; - const { nestedList, nestedListPos, insertPos, items } = context; - const tr = state.tr; - tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize); - const mappedInsertPos = tr.mapping.map(insertPos); - tr.insert(mappedInsertPos, Fragment.from(items)); - tr.setSelection(selection.map(tr.doc, tr.mapping)); - if (dispatch) { - dispatch(tr); - } - return true; -}; - -// src/helpers/handleDeleteBranchingNestedList.ts -var handleDeleteBranchingNestedList = (editor, itemName, wrapperNames) => { - return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames); -}; - -// src/helpers/createBranchingListDeleteKeymap.ts -var createBranchingListDeleteKeymap = (itemName, wrapperNames) => { - return Extension.create({ - name: `${itemName}BranchingDeleteKeymap`, - priority: 101, - addKeyboardShortcuts() { - const handleDelete = () => handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames); - return { - Delete: handleDelete, - "Mod-Delete": handleDelete - }; - } - }); -}; - -// src/task-item/task-item.ts -var inputRegex = /^\s*(\[([( |x])?\])\s$/; -var TaskItem = Node.create({ - name: "taskItem", - addOptions() { - return { - nested: false, - HTMLAttributes: {}, - taskListTypeName: "taskList", - a11y: void 0 - }; - }, - content() { - return this.options.nested ? "paragraph block*" : "paragraph+"; - }, - defining: true, - addAttributes() { - return { - checked: { - default: false, - keepOnSplit: false, - parseHTML: (element) => { - const dataChecked = element.getAttribute("data-checked"); - return dataChecked === "" || dataChecked === "true"; - }, - renderHTML: (attributes) => ({ - "data-checked": attributes.checked - }) - } - }; - }, - parseHTML() { - return [ - { - tag: `li[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ node, HTMLAttributes }) { - return [ - "li", - mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { - "data-type": this.name - }), - [ - "label", - [ - "input", - { - type: "checkbox", - checked: node.attrs.checked ? "checked" : null - } - ], - ["span"] - ], - ["div", 0] - ]; - }, - parseMarkdown: (token, h) => { - const content = []; - if (token.tokens && token.tokens.length > 0) { - content.push(h.createNode("paragraph", {}, h.parseInline(token.tokens))); - } else if (token.text) { - content.push(h.createNode("paragraph", {}, [h.createNode("text", { text: token.text })])); - } else { - content.push(h.createNode("paragraph", {}, [])); - } - if (token.nestedTokens && token.nestedTokens.length > 0) { - const nestedContent = h.parseChildren(token.nestedTokens); - content.push(...nestedContent); - } - return h.createNode("taskItem", { checked: token.checked || false }, content); - }, - renderMarkdown: (node, h) => { - var _a; - const checkedChar = ((_a = node.attrs) == null ? void 0 : _a.checked) ? "x" : " "; - const prefix = `- [${checkedChar}] `; - return renderNestedMarkdownContent(node, h, prefix); - }, - addExtensions() { - if (!this.options.nested) { - return []; - } - return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]; - }, - addKeyboardShortcuts() { - const shortcuts = { - Enter: () => this.editor.commands.splitListItem(this.name), - "Shift-Tab": () => this.editor.commands.liftListItem(this.name) - }; - if (!this.options.nested) { - return shortcuts; - } - return { - ...shortcuts, - Tab: () => this.editor.commands.sinkListItem(this.name) - }; - }, - addNodeView() { - return ({ node, HTMLAttributes, getPos, editor }) => { - const listItem = document.createElement("li"); - const checkboxWrapper = document.createElement("label"); - const checkboxStyler = document.createElement("span"); - const checkbox = document.createElement("input"); - const content = document.createElement("div"); - const updateA11Y = (currentNode) => { - var _a, _b; - checkbox.ariaLabel = ((_b = (_a = this.options.a11y) == null ? void 0 : _a.checkboxLabel) == null ? void 0 : _b.call(_a, currentNode, checkbox.checked)) || `Task item checkbox for ${currentNode.textContent || "empty task item"}`; - }; - updateA11Y(node); - checkboxWrapper.contentEditable = "false"; - checkbox.type = "checkbox"; - checkbox.addEventListener("mousedown", (event) => event.preventDefault()); - checkbox.addEventListener("change", (event) => { - if (!editor.isEditable && !this.options.onReadOnlyChecked) { - checkbox.checked = !checkbox.checked; - return; - } - const { checked } = event.target; - if (editor.isEditable && typeof getPos === "function") { - editor.chain().focus(void 0, { scrollIntoView: false }).command(({ tr }) => { - const position = getPos(); - if (typeof position !== "number") { - return false; - } - const currentNode = tr.doc.nodeAt(position); - tr.setNodeMarkup(position, void 0, { - ...currentNode == null ? void 0 : currentNode.attrs, - checked - }); - return true; - }).run(); - } - if (!editor.isEditable && this.options.onReadOnlyChecked) { - if (!this.options.onReadOnlyChecked(node, checked)) { - checkbox.checked = !checkbox.checked; - } - } - }); - Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - listItem.dataset.checked = node.attrs.checked; - checkbox.checked = node.attrs.checked; - checkboxWrapper.append(checkbox, checkboxStyler); - listItem.append(checkboxWrapper, content); - Object.entries(HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value); - }); - let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes)); - return { - dom: listItem, - contentDOM: content, - update: (updatedNode) => { - if (updatedNode.type !== this.type) { - return false; - } - listItem.dataset.checked = updatedNode.attrs.checked; - checkbox.checked = updatedNode.attrs.checked; - updateA11Y(updatedNode); - const extensionAttributes = editor.extensionManager.attributes; - const newHTMLAttributes = getRenderedAttributes(updatedNode, extensionAttributes); - const newKeys = new Set(Object.keys(newHTMLAttributes)); - const staticAttrs = this.options.HTMLAttributes; - prevRenderedAttributeKeys.forEach((key) => { - if (!newKeys.has(key)) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } - }); - Object.entries(newHTMLAttributes).forEach(([key, value]) => { - if (value === null || value === void 0) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]); - } else { - listItem.removeAttribute(key); - } - } else { - listItem.setAttribute(key, value); - } - }); - prevRenderedAttributeKeys = newKeys; - return true; - } - }; - }; - }, - addInputRules() { - return [ - wrappingInputRule({ - find: inputRegex, - type: this.type, - getAttributes: (match) => ({ - checked: match[match.length - 1] === "x" - }) - }) - ]; - } -}); -export { - TaskItem, - inputRegex -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.js.map deleted file mode 100644 index 44a8316..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-item/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/task-item/task-item.ts","../../src/helpers/createBranchingListDeleteKeymap.ts","../../src/helpers/hoistBranchingNestedList.ts","../../src/helpers/getBranchingNestedListAtCursor.ts","../../src/helpers/handleDeleteBranchingNestedList.ts"],"sourcesContent":["import type { KeyboardShortcutCommand } from '@tiptap/core'\nimport {\n getRenderedAttributes,\n mergeAttributes,\n Node,\n renderNestedMarkdownContent,\n wrappingInputRule,\n} from '@tiptap/core'\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model'\n\nimport { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'\n\nexport interface TaskItemOptions {\n /**\n * A callback function that is called when the checkbox is clicked while the editor is in readonly mode.\n * @param node The prosemirror node of the task item\n * @param checked The new checked state\n * @returns boolean\n */\n onReadOnlyChecked?: (node: ProseMirrorNode, checked: boolean) => boolean\n\n /**\n * Controls whether the task items can be nested or not.\n * @default false\n * @example true\n */\n nested: boolean\n\n /**\n * HTML attributes to add to the task item element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n\n /**\n * The node type for taskList nodes\n * @default 'taskList'\n * @example 'myCustomTaskList'\n */\n taskListTypeName: string\n\n /**\n * Accessibility options for the task item.\n * @default {}\n * @example\n * ```js\n * {\n * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}`\n * }\n */\n a11y?: {\n checkboxLabel?: (node: ProseMirrorNode, checked: boolean) => string\n }\n}\n\n/**\n * Matches a task item to a - [ ] on input.\n */\nexport const inputRegex = /^\\s*(\\[([( |x])?\\])\\s$/\n\n/**\n * This extension allows you to create task items.\n * @see https://www.tiptap.dev/api/nodes/task-item\n */\nexport const TaskItem = Node.create({\n name: 'taskItem',\n\n addOptions() {\n return {\n nested: false,\n HTMLAttributes: {},\n taskListTypeName: 'taskList',\n a11y: undefined,\n }\n },\n\n content() {\n return this.options.nested ? 'paragraph block*' : 'paragraph+'\n },\n\n defining: true,\n\n addAttributes() {\n return {\n checked: {\n default: false,\n keepOnSplit: false,\n parseHTML: element => {\n const dataChecked = element.getAttribute('data-checked')\n\n return dataChecked === '' || dataChecked === 'true'\n },\n renderHTML: attributes => ({\n 'data-checked': attributes.checked,\n }),\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: `li[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ node, HTMLAttributes }) {\n return [\n 'li',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {\n 'data-type': this.name,\n }),\n [\n 'label',\n [\n 'input',\n {\n type: 'checkbox',\n checked: node.attrs.checked ? 'checked' : null,\n },\n ],\n ['span'],\n ],\n ['div', 0],\n ]\n },\n\n parseMarkdown: (token, h) => {\n // Parse the task item's text content into paragraph content\n const content = []\n\n // First, add the main paragraph content\n if (token.tokens && token.tokens.length > 0) {\n // If we have tokens, create a paragraph with the inline content\n content.push(h.createNode('paragraph', {}, h.parseInline(token.tokens)))\n } else if (token.text) {\n // If we have raw text, create a paragraph with text node\n content.push(h.createNode('paragraph', {}, [h.createNode('text', { text: token.text })]))\n } else {\n // Fallback: empty paragraph\n content.push(h.createNode('paragraph', {}, []))\n }\n\n // Then, add any nested content (like nested task lists)\n if (token.nestedTokens && token.nestedTokens.length > 0) {\n const nestedContent = h.parseChildren(token.nestedTokens)\n content.push(...nestedContent)\n }\n\n return h.createNode('taskItem', { checked: token.checked || false }, content)\n },\n\n renderMarkdown: (node, h) => {\n const checkedChar = node.attrs?.checked ? 'x' : ' '\n const prefix = `- [${checkedChar}] `\n\n return renderNestedMarkdownContent(node, h, prefix)\n },\n\n addExtensions() {\n if (!this.options.nested) {\n return []\n }\n\n return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]\n },\n\n addKeyboardShortcuts() {\n const shortcuts: {\n [key: string]: KeyboardShortcutCommand\n } = {\n Enter: () => this.editor.commands.splitListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n\n if (!this.options.nested) {\n return shortcuts\n }\n\n return {\n ...shortcuts,\n Tab: () => this.editor.commands.sinkListItem(this.name),\n }\n },\n\n addNodeView() {\n return ({ node, HTMLAttributes, getPos, editor }) => {\n const listItem = document.createElement('li')\n const checkboxWrapper = document.createElement('label')\n const checkboxStyler = document.createElement('span')\n const checkbox = document.createElement('input')\n const content = document.createElement('div')\n\n const updateA11Y = (currentNode: ProseMirrorNode) => {\n checkbox.ariaLabel =\n this.options.a11y?.checkboxLabel?.(currentNode, checkbox.checked) ||\n `Task item checkbox for ${currentNode.textContent || 'empty task item'}`\n }\n\n updateA11Y(node)\n\n checkboxWrapper.contentEditable = 'false'\n checkbox.type = 'checkbox'\n checkbox.addEventListener('mousedown', event => event.preventDefault())\n checkbox.addEventListener('change', event => {\n // if the editor isn’t editable and we don't have a handler for\n // readonly checks we have to undo the latest change\n if (!editor.isEditable && !this.options.onReadOnlyChecked) {\n checkbox.checked = !checkbox.checked\n\n return\n }\n\n const { checked } = event.target as any\n\n if (editor.isEditable && typeof getPos === 'function') {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .command(({ tr }) => {\n const position = getPos()\n\n if (typeof position !== 'number') {\n return false\n }\n const currentNode = tr.doc.nodeAt(position)\n\n tr.setNodeMarkup(position, undefined, {\n ...currentNode?.attrs,\n checked,\n })\n\n return true\n })\n .run()\n }\n if (!editor.isEditable && this.options.onReadOnlyChecked) {\n // Reset state if onReadOnlyChecked returns false\n if (!this.options.onReadOnlyChecked(node, checked)) {\n checkbox.checked = !checkbox.checked\n }\n }\n })\n\n Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n listItem.dataset.checked = node.attrs.checked\n checkbox.checked = node.attrs.checked\n\n checkboxWrapper.append(checkbox, checkboxStyler)\n listItem.append(checkboxWrapper, content)\n\n Object.entries(HTMLAttributes).forEach(([key, value]) => {\n listItem.setAttribute(key, value)\n })\n\n // Track the keys of previously rendered HTML attributes for proper removal\n let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes))\n\n return {\n dom: listItem,\n contentDOM: content,\n update: updatedNode => {\n if (updatedNode.type !== this.type) {\n return false\n }\n\n listItem.dataset.checked = updatedNode.attrs.checked\n checkbox.checked = updatedNode.attrs.checked\n updateA11Y(updatedNode)\n\n // Sync all HTML attributes from the updated node\n const extensionAttributes = editor.extensionManager.attributes\n const newHTMLAttributes = getRenderedAttributes(updatedNode, extensionAttributes)\n const newKeys = new Set(Object.keys(newHTMLAttributes))\n\n // Remove attributes that were previously rendered but are no longer present\n // If the attribute exists in static options, restore it instead of removing\n const staticAttrs = this.options.HTMLAttributes\n\n prevRenderedAttributeKeys.forEach(key => {\n if (!newKeys.has(key)) {\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n }\n })\n\n // Update or add new attributes\n Object.entries(newHTMLAttributes).forEach(([key, value]) => {\n if (value === null || value === undefined) {\n // If the attribute exists in static options, restore it instead of removing\n if (key in staticAttrs) {\n listItem.setAttribute(key, staticAttrs[key])\n } else {\n listItem.removeAttribute(key)\n }\n } else {\n listItem.setAttribute(key, value)\n }\n })\n\n // Update the tracked keys for next update\n prevRenderedAttributeKeys = newKeys\n\n return true\n },\n }\n }\n },\n\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n getAttributes: match => ({\n checked: match[match.length - 1] === 'x',\n }),\n }),\n ]\n },\n})\n","import { Extension } from '@tiptap/core'\n\nimport { handleDeleteBranchingNestedList } from './handleDeleteBranchingNestedList.js'\n\n/**\n * Creates a high-priority keymap extension that handles Delete for branching nested lists.\n * Kept separate from the list item node so Enter/Tab shortcuts keep their default priority.\n */\nexport const createBranchingListDeleteKeymap = (itemName: string, wrapperNames: string[]) => {\n return Extension.create({\n name: `${itemName}BranchingDeleteKeymap`,\n priority: 101,\n\n addKeyboardShortcuts() {\n const handleDelete = () =>\n handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames)\n\n return {\n Delete: handleDelete,\n 'Mod-Delete': handleDelete,\n }\n },\n })\n}\n","import { Fragment } from '@tiptap/pm/model'\nimport type { EditorState, Transaction } from '@tiptap/pm/state'\n\nimport { getBranchingNestedListAtCursor } from './getBranchingNestedListAtCursor.js'\n\n/**\n * Hoists all list items from a branching nested list after the cursor into the parent list.\n *\n * Use this when `joinForward` cannot restructure a nested list that contains list items\n * with sublists (see issue #6906).\n *\n * @param state - The editor state to transform.\n * @param dispatch - Optional dispatch function for the transaction.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * // Cursor at the end of \"Item 1\" before a nested list with branching items.\n * hoistBranchingNestedList(editor.state, editor.view.dispatch, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n * ```\n */\nexport const hoistBranchingNestedList = (\n state: EditorState,\n dispatch: ((tr: Transaction) => void) | undefined,\n itemName: string,\n wrapperNames: string[],\n) => {\n const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames)\n\n if (!context) {\n return false\n }\n\n const { selection } = state\n const { nestedList, nestedListPos, insertPos, items } = context\n const tr = state.tr\n\n tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize)\n\n const mappedInsertPos = tr.mapping.map(insertPos)\n\n tr.insert(mappedInsertPos, Fragment.from(items))\n\n tr.setSelection(selection.map(tr.doc, tr.mapping))\n\n if (dispatch) {\n dispatch(tr)\n }\n\n return true\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorState } from '@tiptap/pm/state'\n\nexport type BranchingNestedListAtCursor = {\n listItemDepth: number\n nestedList: Node\n nestedListPos: number\n insertPos: number\n items: Node[]\n}\n\n/**\n * Resolves a branching nested list immediately after the cursor when the selection is\n * collapsed at the end of a textblock inside a list item.\n *\n * @param state - The editor state to inspect.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns Resolved positions and nodes for hoisting, or `null` when not applicable.\n *\n * @example\n * ```ts\n * const context = getBranchingNestedListAtCursor(editor.state, 'listItem', [\n * 'bulletList',\n * 'orderedList',\n * ])\n *\n * if (context) {\n * // cursor is at the end of Item 1 before a branching nested sublist\n * }\n * ```\n */\nexport const getBranchingNestedListAtCursor = (\n state: EditorState,\n itemName: string,\n wrapperNames: string[],\n): BranchingNestedListAtCursor | null => {\n const { selection } = state\n\n if (!selection.empty) {\n return null\n }\n\n const { $from } = selection\n\n if (!$from.parent.isTextblock) {\n return null\n }\n\n if ($from.parentOffset !== $from.parent.content.size) {\n return null\n }\n\n let listItemDepth = -1\n\n for (let depth = $from.depth; depth > 0; depth -= 1) {\n if ($from.node(depth).type.name === itemName) {\n listItemDepth = depth\n break\n }\n }\n\n if (listItemDepth < 0) {\n return null\n }\n\n const listItem = $from.node(listItemDepth)\n const indexInListItem = $from.index(listItemDepth)\n\n if (indexInListItem + 1 >= listItem.childCount) {\n return null\n }\n\n const nextChild = listItem.child(indexInListItem + 1)\n\n if (!wrapperNames.includes(nextChild.type.name)) {\n return null\n }\n\n const itemType = state.schema.nodes[itemName]\n let hasBranching = false\n\n nextChild.forEach(child => {\n if (child.type === itemType && child.childCount > 1) {\n hasBranching = true\n }\n })\n\n if (!hasBranching) {\n return null\n }\n\n const nodeAfter = state.doc.resolve($from.after()).nodeAfter\n\n if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) {\n return null\n }\n\n const items: Node[] = []\n\n nodeAfter.forEach(child => {\n items.push(child)\n })\n\n if (items.length === 0) {\n return null\n }\n\n return {\n listItemDepth,\n nestedList: nodeAfter,\n nestedListPos: $from.after(),\n insertPos: $from.after(listItemDepth),\n items,\n }\n}\n","import type { Editor } from '@tiptap/core'\n\nimport { hoistBranchingNestedList } from './hoistBranchingNestedList.js'\n\n/**\n * Handles Delete for a list item when a branching nested sublist follows the cursor.\n *\n * @param editor - The editor instance whose state should be updated.\n * @param itemName - The list item node name (for example `listItem` or `taskItem`).\n * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`).\n * @returns `true` when the nested list was hoisted, otherwise `false`.\n *\n * @example\n * ```ts\n * Delete: () =>\n * handleDeleteBranchingNestedList(editor, 'listItem', ['bulletList', 'orderedList']),\n * ```\n */\nexport const handleDeleteBranchingNestedList = (\n editor: Editor,\n itemName: string,\n wrapperNames: string[],\n) => {\n return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames)\n}\n"],"mappings":";AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACPP,SAAS,iBAAiB;;;ACA1B,SAAS,gBAAgB;;;ACgClB,IAAM,iCAAiC,CAC5C,OACA,UACA,iBACuC;AACvC,QAAM,EAAE,UAAU,IAAI;AAEtB,MAAI,CAAC,UAAU,OAAO;AACpB,WAAO;AAAA,EACT;AAEA,QAAM,EAAE,MAAM,IAAI;AAElB,MAAI,CAAC,MAAM,OAAO,aAAa;AAC7B,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,iBAAiB,MAAM,OAAO,QAAQ,MAAM;AACpD,WAAO;AAAA,EACT;AAEA,MAAI,gBAAgB;AAEpB,WAAS,QAAQ,MAAM,OAAO,QAAQ,GAAG,SAAS,GAAG;AACnD,QAAI,MAAM,KAAK,KAAK,EAAE,KAAK,SAAS,UAAU;AAC5C,sBAAgB;AAChB;AAAA,IACF;AAAA,EACF;AAEA,MAAI,gBAAgB,GAAG;AACrB,WAAO;AAAA,EACT;AAEA,QAAM,WAAW,MAAM,KAAK,aAAa;AACzC,QAAM,kBAAk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;AAC7C,mBAAS,UAAU,YAAY,MAAM;AACrC,qBAAW,WAAW;AAGtB,gBAAM,sBAAsB,OAAO,iBAAiB;AACpD,gBAAM,oBAAoB,sBAAsB,aAAa,mBAAmB;AAChF,gBAAM,UAAU,IAAI,IAAI,OAAO,KAAK,iBAAiB,CAAC;AAItD,gBAAM,cAAc,KAAK,QAAQ;AAEjC,oCAA0B,QAAQ,SAAO;AACvC,gBAAI,CAAC,QAAQ,IAAI,GAAG,GAAG;AACrB,kBAAI,OAAO,aAAa;AACtB,yBAAS,aAAa,KAAK,YAAY,GAAG,CAAC;AAAA,cAC7C,OAAO;AACL,yBAAS,gBAAgB,GAAG;AAAA,cAC9B;AAAA,YACF;AAAA,UACF,CAAC;AAGD,iBAAO,QAAQ,iBAAiB,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC1D,gBAAI,UAAU,QAAQ,UAAU,QAAW;AAEzC,kBAAI,OAAO,aAAa;AACtB,yBAAS,aAAa,KAAK,YAAY,GAAG,CAAC;AAAA,cAC7C,OAAO;AACL,yBAAS,gBAAgB,GAAG;AAAA,cAC9B;AAAA,YACF,OAAO;AACL,uBAAS,aAAa,KAAK,KAAK;AAAA,YAClC;AAAA,UACF,CAAC;AAGD,sCAA4B;AAE5B,iBAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,MACL,kBAAkB;AAAA,QAChB,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,QACX,eAAe,YAAU;AAAA,UACvB,SAAS,MAAM,MAAM,SAAS,CAAC,MAAM;AAAA,QACvC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.cjs deleted file mode 100644 index 2c46d8c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.cjs +++ /dev/null @@ -1,164 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/task-list/index.ts -var index_exports = {}; -__export(index_exports, { - TaskList: () => TaskList -}); -module.exports = __toCommonJS(index_exports); - -// src/task-list/task-list.ts -var import_core = require("@tiptap/core"); -var TaskList = import_core.Node.create({ - name: "taskList", - addOptions() { - return { - itemTypeName: "taskItem", - HTMLAttributes: {} - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [ - { - tag: `ul[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return [ - "ul", - (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes, { "data-type": this.name }), - 0 - ]; - }, - parseMarkdown: (token, h) => { - return h.createNode("taskList", {}, h.parseChildren(token.items || [])); - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "taskList", - level: "block", - start(src) { - var _a; - const index = (_a = src.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)) == null ? void 0 : _a.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, tokens, lexer) { - const parseTaskListContent = (content) => { - const nestedResult = (0, import_core.parseIndentedBlocks)( - content, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Allow recursive nesting - customNestedParser: parseTaskListContent - }, - lexer - ); - if (nestedResult) { - return [ - { - type: "taskList", - raw: nestedResult.raw, - items: nestedResult.items - } - ]; - } - return lexer.blockTokens(content); - }; - const result = (0, import_core.parseIndentedBlocks)( - src, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Use the recursive parser for nested content - customNestedParser: parseTaskListContent - }, - lexer - ); - if (!result) { - return void 0; - } - return { - type: "taskList", - raw: result.raw, - items: result.items - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleTaskList: () => ({ commands }) => { - return commands.toggleList(this.name, this.options.itemTypeName); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-9": () => this.editor.commands.toggleTaskList() - }; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - TaskList -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.cjs.map deleted file mode 100644 index e7f6c9f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/task-list/index.ts","../../src/task-list/task-list.ts"],"sourcesContent":["export * from './task-list.js'\n","import { mergeAttributes, Node, parseIndentedBlocks } from '@tiptap/core'\n\nexport interface TaskListOptions {\n /**\n * The node type name for a task item.\n * @default 'taskItem'\n * @example 'myCustomTaskItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for a task list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n taskList: {\n /**\n * Toggle a task list\n * @example editor.commands.toggleTaskList()\n */\n toggleTaskList: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to create task lists.\n * @see https://www.tiptap.dev/api/nodes/task-list\n */\nexport const TaskList = Node.create({\n name: 'taskList',\n\n addOptions() {\n return {\n itemTypeName: 'taskItem',\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [\n {\n tag: `ul[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'ul',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }),\n 0,\n ]\n },\n\n parseMarkdown: (token, h) => {\n return h.createNode('taskList', {}, h.parseChildren(token.items || []))\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'taskList',\n level: 'block',\n start(src) {\n // Look for the start of a task list item\n const index = src.match(/^\\s*[-+*]\\s+\\[([ xX])\\]\\s+/)?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, tokens, lexer) {\n // Helper function to recursively parse task lists\n const parseTaskListContent = (content: string): any[] | undefined => {\n const nestedResult = parseIndentedBlocks(\n content,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Allow recursive nesting\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (nestedResult) {\n // Return as task list token\n return [\n {\n type: 'taskList',\n raw: nestedResult.raw,\n items: nestedResult.items,\n },\n ]\n }\n\n // Fall back to regular markdown parsing if not a task list\n return lexer.blockTokens(content)\n }\n\n const result = parseIndentedBlocks(\n src,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Use the recursive parser for nested content\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (!result) {\n return undefined\n }\n\n return {\n type: 'taskList',\n raw: result.raw,\n items: result.items,\n }\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleTaskList:\n () =>\n ({ commands }) => {\n return commands.toggleList(this.name, this.options.itemTypeName)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA2D;AAkCpD,IAAM,WAAW,iBAAK,OAAwB;AAAA,EACnD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,cAAc;AAAA,MACd,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,OAAO;AAAA,EAEP,UAAU;AACR,WAAO,GAAG,KAAK,QAAQ,YAAY;AAAA,EACrC;AAAA,EAEA,YAAY;AACV,WAAO;AAAA,MACL;AAAA,QACE,KAAK,iBAAiB,KAAK,IAAI;AAAA,QAC/B,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO;AAAA,MACL;AAAA,UACA,6BAAgB,KAAK,QAAQ,gBAAgB,gBAAgB,EAAE,aAAa,KAAK,KAAK,CAAC;AAAA,MACvF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,eAAe,CAAC,OAAO,MAAM;AAC3B,WAAO,EAAE,WAAW,YAAY,CAAC,GAAG,EAAE,cAAc,MAAM,SAAS,CAAC,CAAC,CAAC;AAAA,EACxE;AAAA,EAEA,gBAAgB,CAAC,MAAM,MAAM;AAC3B,QAAI,CAAC,KAAK,SAAS;AACjB,aAAO;AAAA,IACT;AAEA,WAAO,EAAE,eAAe,KAAK,SAAS,IAAI;AAAA,EAC5C;AAAA,EAEA,mBAAmB;AA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B,aAAa,KAAK;AAAA,YAClB,SAAS,KAAK;AAAA,YACd,MAAM,KAAK;AAAA,YACX,QAAQ,MAAM,aAAa,KAAK,WAAW;AAAA,YAC3C;AAAA,UACF;AAAA;AAAA,UAEA,oBAAoB;AAAA,QACtB;AAAA,QACA;AAAA,MACF;AAEA,UAAI,CAAC,QAAQ;AACX,eAAO;AAAA,MACT;AAEA,aAAO;AAAA,QACL,MAAM;AAAA,QACN,KAAK,OAAO;AAAA,QACZ,OAAO,OAAO;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,gBAAgB;AAAA,EAClB;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,gBACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,WAAW,KAAK,MAAM,KAAK,QAAQ,YAAY;AAAA,MACjE;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,eAAe,MAAM,KAAK,OAAO,SAAS,eAAe;AAAA,IAC3D;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.d.cts deleted file mode 100644 index faeb8ee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.d.cts +++ /dev/null @@ -1,34 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface TaskListOptions { - /** - * The node type name for a task item. - * @default 'taskItem' - * @example 'myCustomTaskItem' - */ - itemTypeName: string; - /** - * The HTML attributes for a task list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - taskList: { - /** - * Toggle a task list - * @example editor.commands.toggleTaskList() - */ - toggleTaskList: () => ReturnType; - }; - } -} -/** - * This extension allows you to create task lists. - * @see https://www.tiptap.dev/api/nodes/task-list - */ -declare const TaskList: Node; - -export { TaskList, type TaskListOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.d.ts deleted file mode 100644 index faeb8ee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface TaskListOptions { - /** - * The node type name for a task item. - * @default 'taskItem' - * @example 'myCustomTaskItem' - */ - itemTypeName: string; - /** - * The HTML attributes for a task list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - taskList: { - /** - * Toggle a task list - * @example editor.commands.toggleTaskList() - */ - toggleTaskList: () => ReturnType; - }; - } -} -/** - * This extension allows you to create task lists. - * @see https://www.tiptap.dev/api/nodes/task-list - */ -declare const TaskList: Node; - -export { TaskList, type TaskListOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.js deleted file mode 100644 index 1482dc4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.js +++ /dev/null @@ -1,137 +0,0 @@ -// src/task-list/task-list.ts -import { mergeAttributes, Node, parseIndentedBlocks } from "@tiptap/core"; -var TaskList = Node.create({ - name: "taskList", - addOptions() { - return { - itemTypeName: "taskItem", - HTMLAttributes: {} - }; - }, - group: "block list", - content() { - return `${this.options.itemTypeName}+`; - }, - parseHTML() { - return [ - { - tag: `ul[data-type="${this.name}"]`, - priority: 51 - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return [ - "ul", - mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { "data-type": this.name }), - 0 - ]; - }, - parseMarkdown: (token, h) => { - return h.createNode("taskList", {}, h.parseChildren(token.items || [])); - }, - renderMarkdown: (node, h) => { - if (!node.content) { - return ""; - } - return h.renderChildren(node.content, "\n"); - }, - markdownTokenizer: { - name: "taskList", - level: "block", - start(src) { - var _a; - const index = (_a = src.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)) == null ? void 0 : _a.index; - return index !== void 0 ? index : -1; - }, - tokenize(src, tokens, lexer) { - const parseTaskListContent = (content) => { - const nestedResult = parseIndentedBlocks( - content, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Allow recursive nesting - customNestedParser: parseTaskListContent - }, - lexer - ); - if (nestedResult) { - return [ - { - type: "taskList", - raw: nestedResult.raw, - items: nestedResult.items - } - ]; - } - return lexer.blockTokens(content); - }; - const result = parseIndentedBlocks( - src, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: (match) => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === "x" - }), - createToken: (data, nestedTokens) => ({ - type: "taskItem", - raw: "", - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens - }), - // Use the recursive parser for nested content - customNestedParser: parseTaskListContent - }, - lexer - ); - if (!result) { - return void 0; - } - return { - type: "taskList", - raw: result.raw, - items: result.items - }; - } - }, - markdownOptions: { - indentsContent: true - }, - addCommands() { - return { - toggleTaskList: () => ({ commands }) => { - return commands.toggleList(this.name, this.options.itemTypeName); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-9": () => this.editor.commands.toggleTaskList() - }; - } -}); -export { - TaskList -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.js.map deleted file mode 100644 index 1ea9244..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/dist/task-list/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/task-list/task-list.ts"],"sourcesContent":["import { mergeAttributes, Node, parseIndentedBlocks } from '@tiptap/core'\n\nexport interface TaskListOptions {\n /**\n * The node type name for a task item.\n * @default 'taskItem'\n * @example 'myCustomTaskItem'\n */\n itemTypeName: string\n\n /**\n * The HTML attributes for a task list node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n taskList: {\n /**\n * Toggle a task list\n * @example editor.commands.toggleTaskList()\n */\n toggleTaskList: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to create task lists.\n * @see https://www.tiptap.dev/api/nodes/task-list\n */\nexport const TaskList = Node.create({\n name: 'taskList',\n\n addOptions() {\n return {\n itemTypeName: 'taskItem',\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [\n {\n tag: `ul[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'ul',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }),\n 0,\n ]\n },\n\n parseMarkdown: (token, h) => {\n return h.createNode('taskList', {}, h.parseChildren(token.items || []))\n },\n\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return ''\n }\n\n return h.renderChildren(node.content, '\\n')\n },\n\n markdownTokenizer: {\n name: 'taskList',\n level: 'block',\n start(src) {\n // Look for the start of a task list item\n const index = src.match(/^\\s*[-+*]\\s+\\[([ xX])\\]\\s+/)?.index\n return index !== undefined ? index : -1\n },\n tokenize(src, tokens, lexer) {\n // Helper function to recursively parse task lists\n const parseTaskListContent = (content: string): any[] | undefined => {\n const nestedResult = parseIndentedBlocks(\n content,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Allow recursive nesting\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (nestedResult) {\n // Return as task list token\n return [\n {\n type: 'taskList',\n raw: nestedResult.raw,\n items: nestedResult.items,\n },\n ]\n }\n\n // Fall back to regular markdown parsing if not a task list\n return lexer.blockTokens(content)\n }\n\n const result = parseIndentedBlocks(\n src,\n {\n itemPattern: /^(\\s*)([-+*])\\s+\\[([ xX])\\]\\s+(.*)$/,\n extractItemData: match => ({\n indentLevel: match[1].length,\n mainContent: match[4],\n checked: match[3].toLowerCase() === 'x',\n }),\n createToken: (data, nestedTokens) => ({\n type: 'taskItem',\n raw: '',\n mainContent: data.mainContent,\n indentLevel: data.indentLevel,\n checked: data.checked,\n text: data.mainContent,\n tokens: lexer.inlineTokens(data.mainContent),\n nestedTokens,\n }),\n // Use the recursive parser for nested content\n customNestedParser: parseTaskListContent,\n },\n lexer,\n )\n\n if (!result) {\n return undefined\n }\n\n return {\n type: 'taskList',\n raw: result.raw,\n items: result.items,\n }\n },\n },\n\n markdownOptions: {\n indentsContent: true,\n },\n\n addCommands() {\n return {\n toggleTaskList:\n () =>\n ({ commands }) => {\n return commands.toggleList(this.name, this.options.itemTypeName)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),\n }\n },\n})\n"],"mappings":";AAAA,SAAS,iBAAiB,MAAM,2BAA2B;AAkCpD,IAAM,WAAW,KAAK,OAAwB;AAAA,EACnD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,cAAc;AAAA,MACd,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,OAAO;AAAA,EAEP,UAAU;AACR,WAAO,GAAG,KAAK,QAAQ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AAe,MAAM,KAAK,OAAO,SAAS,eAAe;AAAA,IAC3D;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/package.json deleted file mode 100644 index 0ed21f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "name": "@tiptap/extension-list", - "version": "3.26.0", - "description": "List extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-list" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "./bullet-list": { - "types": { - "import": "./dist/bullet-list/index.d.ts", - "require": "./dist/bullet-list/index.d.cts" - }, - "import": "./dist/bullet-list/index.js", - "require": "./dist/bullet-list/index.cjs" - }, - "./item": { - "types": { - "import": "./dist/item/index.d.ts", - "require": "./dist/item/index.d.cts" - }, - "import": "./dist/item/index.js", - "require": "./dist/item/index.cjs" - }, - "./keymap": { - "types": { - "import": "./dist/keymap/index.d.ts", - "require": "./dist/keymap/index.d.cts" - }, - "import": "./dist/keymap/index.js", - "require": "./dist/keymap/index.cjs" - }, - "./kit": { - "types": { - "import": "./dist/kit/index.d.ts", - "require": "./dist/kit/index.d.cts" - }, - "import": "./dist/kit/index.js", - "require": "./dist/kit/index.cjs" - }, - "./ordered-list": { - "types": { - "import": "./dist/ordered-list/index.d.ts", - "require": "./dist/ordered-list/index.d.cts" - }, - "import": "./dist/ordered-list/index.js", - "require": "./dist/ordered-list/index.cjs" - }, - "./task-item": { - "types": { - "import": "./dist/task-item/index.d.ts", - "require": "./dist/task-item/index.d.cts" - }, - "import": "./dist/task-item/index.js", - "require": "./dist/task-item/index.cjs" - }, - "./task-list": { - "types": { - "import": "./dist/task-list/index.d.ts", - "require": "./dist/task-list/index.d.cts" - }, - "import": "./dist/task-list/index.js", - "require": "./dist/task-list/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0", - "@tiptap/pm": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0", - "@tiptap/pm": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/bullet-list/bullet-list.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/bullet-list/bullet-list.ts deleted file mode 100644 index 124cf88..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/bullet-list/bullet-list.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core' - -const ListItemName = 'listItem' -const TextStyleName = 'textStyle' - -export interface BulletListOptions { - /** - * The node name for the list items - * @default 'listItem' - * @example 'paragraph' - */ - itemTypeName: string - - /** - * HTML attributes to add to the bullet list element - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record - - /** - * Keep the marks when splitting the list - * @default false - * @example true - */ - keepMarks: boolean - - /** - * Keep the attributes when splitting the list - * @default false - * @example true - */ - keepAttributes: boolean -} - -declare module '@tiptap/core' { - interface Commands { - bulletList: { - /** - * Toggle a bullet list - */ - toggleBulletList: () => ReturnType - } - } -} - -/** - * Matches a bullet list to a dash or asterisk. - */ -export const bulletListInputRegex = /^\s*([-+*])\s$/ - -/** - * This extension allows you to create bullet lists. - * This requires the ListItem extension - * @see https://tiptap.dev/api/nodes/bullet-list - * @see https://tiptap.dev/api/nodes/list-item. - */ -export const BulletList = Node.create({ - name: 'bulletList', - - addOptions() { - return { - itemTypeName: 'listItem', - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false, - } - }, - - group: 'block list', - - content() { - return `${this.options.itemTypeName}+` - }, - - parseHTML() { - return [{ tag: 'ul' }] - }, - - renderHTML({ HTMLAttributes }) { - return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] - }, - - markdownTokenName: 'list', - - parseMarkdown: (token, helpers) => { - if (token.type !== 'list' || (token as any).ordered) { - return [] - } - - return { - type: 'bulletList', - content: token.items ? helpers.parseChildren(token.items) : [], - } - }, - - renderMarkdown: (node, h) => { - if (!node.content) { - return '' - } - - return h.renderChildren(node.content, '\n') - }, - - markdownOptions: { - indentsContent: true, - }, - - addCommands() { - return { - toggleBulletList: - () => - ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain() - .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) - .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)) - .run() - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) - }, - } - }, - - addKeyboardShortcuts() { - return { - 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(), - } - }, - - addInputRules() { - let inputRule = wrappingInputRule({ - find: bulletListInputRegex, - type: this.type, - }) - - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = wrappingInputRule({ - find: bulletListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: () => { - return this.editor.getAttributes(TextStyleName) - }, - editor: this.editor, - }) - } - return [inputRule] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/bullet-list/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/bullet-list/index.ts deleted file mode 100644 index 2feaffd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/bullet-list/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './bullet-list.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/createBranchingListDeleteKeymap.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/createBranchingListDeleteKeymap.ts deleted file mode 100644 index 8f54787..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/createBranchingListDeleteKeymap.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Extension } from '@tiptap/core' - -import { handleDeleteBranchingNestedList } from './handleDeleteBranchingNestedList.js' - -/** - * Creates a high-priority keymap extension that handles Delete for branching nested lists. - * Kept separate from the list item node so Enter/Tab shortcuts keep their default priority. - */ -export const createBranchingListDeleteKeymap = (itemName: string, wrapperNames: string[]) => { - return Extension.create({ - name: `${itemName}BranchingDeleteKeymap`, - priority: 101, - - addKeyboardShortcuts() { - const handleDelete = () => - handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames) - - return { - Delete: handleDelete, - 'Mod-Delete': handleDelete, - } - }, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/getBranchingNestedListAtCursor.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/getBranchingNestedListAtCursor.ts deleted file mode 100644 index 7b29138..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/getBranchingNestedListAtCursor.ts +++ /dev/null @@ -1,116 +0,0 @@ -import type { Node } from '@tiptap/pm/model' -import type { EditorState } from '@tiptap/pm/state' - -export type BranchingNestedListAtCursor = { - listItemDepth: number - nestedList: Node - nestedListPos: number - insertPos: number - items: Node[] -} - -/** - * Resolves a branching nested list immediately after the cursor when the selection is - * collapsed at the end of a textblock inside a list item. - * - * @param state - The editor state to inspect. - * @param itemName - The list item node name (for example `listItem` or `taskItem`). - * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`). - * @returns Resolved positions and nodes for hoisting, or `null` when not applicable. - * - * @example - * ```ts - * const context = getBranchingNestedListAtCursor(editor.state, 'listItem', [ - * 'bulletList', - * 'orderedList', - * ]) - * - * if (context) { - * // cursor is at the end of Item 1 before a branching nested sublist - * } - * ``` - */ -export const getBranchingNestedListAtCursor = ( - state: EditorState, - itemName: string, - wrapperNames: string[], -): BranchingNestedListAtCursor | null => { - const { selection } = state - - if (!selection.empty) { - return null - } - - const { $from } = selection - - if (!$from.parent.isTextblock) { - return null - } - - if ($from.parentOffset !== $from.parent.content.size) { - return null - } - - let listItemDepth = -1 - - for (let depth = $from.depth; depth > 0; depth -= 1) { - if ($from.node(depth).type.name === itemName) { - listItemDepth = depth - break - } - } - - if (listItemDepth < 0) { - return null - } - - const listItem = $from.node(listItemDepth) - const indexInListItem = $from.index(listItemDepth) - - if (indexInListItem + 1 >= listItem.childCount) { - return null - } - - const nextChild = listItem.child(indexInListItem + 1) - - if (!wrapperNames.includes(nextChild.type.name)) { - return null - } - - const itemType = state.schema.nodes[itemName] - let hasBranching = false - - nextChild.forEach(child => { - if (child.type === itemType && child.childCount > 1) { - hasBranching = true - } - }) - - if (!hasBranching) { - return null - } - - const nodeAfter = state.doc.resolve($from.after()).nodeAfter - - if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) { - return null - } - - const items: Node[] = [] - - nodeAfter.forEach(child => { - items.push(child) - }) - - if (items.length === 0) { - return null - } - - return { - listItemDepth, - nestedList: nodeAfter, - nestedListPos: $from.after(), - insertPos: $from.after(listItemDepth), - items, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/handleDeleteBranchingNestedList.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/handleDeleteBranchingNestedList.ts deleted file mode 100644 index 70d39c3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/handleDeleteBranchingNestedList.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Editor } from '@tiptap/core' - -import { hoistBranchingNestedList } from './hoistBranchingNestedList.js' - -/** - * Handles Delete for a list item when a branching nested sublist follows the cursor. - * - * @param editor - The editor instance whose state should be updated. - * @param itemName - The list item node name (for example `listItem` or `taskItem`). - * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`). - * @returns `true` when the nested list was hoisted, otherwise `false`. - * - * @example - * ```ts - * Delete: () => - * handleDeleteBranchingNestedList(editor, 'listItem', ['bulletList', 'orderedList']), - * ``` - */ -export const handleDeleteBranchingNestedList = ( - editor: Editor, - itemName: string, - wrapperNames: string[], -) => { - return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/hasBranchingNestedListAfterCursor.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/hasBranchingNestedListAfterCursor.ts deleted file mode 100644 index bf88efd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/hasBranchingNestedListAfterCursor.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { EditorState } from '@tiptap/pm/state' - -import { getBranchingNestedListAtCursor } from './getBranchingNestedListAtCursor.js' - -/** - * Returns whether the cursor is at the end of a list item textblock and the next - * sibling is a nested list that contains at least one branching list item. - * - * @param state - The editor state to inspect. - * @param itemName - The list item node name (for example `listItem` or `taskItem`). - * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`). - * @returns `true` when {@link hoistBranchingNestedList} should handle Delete. - * - * @example - * ```ts - * if (hasBranchingNestedListAfterCursor(editor.state, 'listItem', ['bulletList', 'orderedList'])) { - * hoistBranchingNestedList(editor.state, editor.view.dispatch, 'listItem', [ - * 'bulletList', - * 'orderedList', - * ]) - * } - * ``` - */ -export const hasBranchingNestedListAfterCursor = ( - state: EditorState, - itemName: string, - wrapperNames: string[], -): boolean => { - return getBranchingNestedListAtCursor(state, itemName, wrapperNames) !== null -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/hoistBranchingNestedList.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/hoistBranchingNestedList.ts deleted file mode 100644 index 792f6bd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/helpers/hoistBranchingNestedList.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Fragment } from '@tiptap/pm/model' -import type { EditorState, Transaction } from '@tiptap/pm/state' - -import { getBranchingNestedListAtCursor } from './getBranchingNestedListAtCursor.js' - -/** - * Hoists all list items from a branching nested list after the cursor into the parent list. - * - * Use this when `joinForward` cannot restructure a nested list that contains list items - * with sublists (see issue #6906). - * - * @param state - The editor state to transform. - * @param dispatch - Optional dispatch function for the transaction. - * @param itemName - The list item node name (for example `listItem` or `taskItem`). - * @param wrapperNames - List wrapper node names (for example `bulletList` and `orderedList`). - * @returns `true` when the nested list was hoisted, otherwise `false`. - * - * @example - * ```ts - * // Cursor at the end of "Item 1" before a nested list with branching items. - * hoistBranchingNestedList(editor.state, editor.view.dispatch, 'listItem', [ - * 'bulletList', - * 'orderedList', - * ]) - * ``` - */ -export const hoistBranchingNestedList = ( - state: EditorState, - dispatch: ((tr: Transaction) => void) | undefined, - itemName: string, - wrapperNames: string[], -) => { - const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames) - - if (!context) { - return false - } - - const { selection } = state - const { nestedList, nestedListPos, insertPos, items } = context - const tr = state.tr - - tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize) - - const mappedInsertPos = tr.mapping.map(insertPos) - - tr.insert(mappedInsertPos, Fragment.from(items)) - - tr.setSelection(selection.map(tr.doc, tr.mapping)) - - if (dispatch) { - dispatch(tr) - } - - return true -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/index.ts deleted file mode 100644 index 8ea73b8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './bullet-list/index.js' -export * from './item/index.js' -export * from './keymap/index.js' -export * from './kit/index.js' -export * from './ordered-list/index.js' -export * from './task-item/index.js' -export * from './task-list/index.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/item/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/item/index.ts deleted file mode 100644 index 854e39b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './list-item.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/item/list-item.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/item/list-item.ts deleted file mode 100644 index 2b7a10d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/item/list-item.ts +++ /dev/null @@ -1,201 +0,0 @@ -import type { JSONContent, MarkdownParseHelpers, MarkdownToken } from '@tiptap/core' -import { mergeAttributes, Node, renderNestedMarkdownContent } from '@tiptap/core' - -import { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js' - -export interface ListItemOptions { - /** - * The HTML attributes for a list item node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record - - /** - * The node type for bulletList nodes - * @default 'bulletList' - * @example 'myCustomBulletList' - */ - bulletListTypeName: string - - /** - * The node type for orderedList nodes - * @default 'orderedList' - * @example 'myCustomOrderedList' - */ - orderedListTypeName: string -} - -function isSameLineOrderedListToken(token: MarkdownToken): boolean { - const nestedToken = token.tokens?.[0] - - return Boolean( - token.text && - token.tokens?.length === 1 && - nestedToken?.type === 'list' && - nestedToken.ordered && - nestedToken.raw === token.text, - ) -} - -function parseSameLineOrderedListText(text: string, helpers: MarkdownParseHelpers): JSONContent[] { - if (helpers.tokenizeInline) { - return helpers.parseInline(helpers.tokenizeInline(text)) - } - - return helpers.parseInline([ - { - type: 'text', - raw: text, - text, - }, - ]) -} - -/** - * This extension allows you to create list items. - * @see https://www.tiptap.dev/api/nodes/list-item - */ -export const ListItem = Node.create({ - name: 'listItem', - - addOptions() { - return { - HTMLAttributes: {}, - bulletListTypeName: 'bulletList', - orderedListTypeName: 'orderedList', - } - }, - - content: 'paragraph block*', - - defining: true, - - parseHTML() { - return [ - { - tag: 'li', - }, - ] - }, - - renderHTML({ HTMLAttributes }) { - return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] - }, - - markdownTokenName: 'list_item', - - parseMarkdown: (token, helpers) => { - if (token.type !== 'list_item') { - return [] - } - - const parseBlockChildren = helpers.parseBlockChildren ?? helpers.parseChildren - let content: any[] = [] - - if (token.tokens && token.tokens.length > 0) { - if (isSameLineOrderedListToken(token)) { - return { - type: 'listItem', - content: [ - { - type: 'paragraph', - content: parseSameLineOrderedListText(token.text || '', helpers), - }, - ], - } - } - - // Check if we have paragraph tokens (complex list items) - const hasParagraphTokens = token.tokens.some(t => t.type === 'paragraph') - - if (hasParagraphTokens) { - // If we have paragraph tokens, parse them as block elements - content = parseBlockChildren(token.tokens) - } else { - // Check if the first token is a text token with nested inline tokens - const firstToken = token.tokens[0] - - if ( - firstToken && - firstToken.type === 'text' && - firstToken.tokens && - firstToken.tokens.length > 0 - ) { - // Parse the inline content from the text token - const inlineContent = helpers.parseInline(firstToken.tokens) - - // Start with the paragraph containing the inline content - content = [ - { - type: 'paragraph', - content: inlineContent, - }, - ] - - // If there are additional tokens after the first text token (like nested lists), - // parse them as block elements and add them - if (token.tokens.length > 1) { - const remainingTokens = token.tokens.slice(1) - const additionalContent = parseBlockChildren(remainingTokens) - content.push(...additionalContent) - } - } else { - // Fallback: parse all tokens as block elements - content = parseBlockChildren(token.tokens) - } - } - } - - // Ensure we always have at least an empty paragraph - if (content.length === 0) { - content = [ - { - type: 'paragraph', - content: [], - }, - ] - } - - return { - type: 'listItem', - content, - } - }, - - renderMarkdown: (node, h, ctx) => { - return renderNestedMarkdownContent( - node, - h, - (context: any) => { - if (context.parentType === 'bulletList') { - return '- ' - } - if (context.parentType === 'orderedList') { - const start = context.meta?.parentAttrs?.start || 1 - return `${start + context.index}. ` - } - // Fallback to bullet list for unknown parent types - return '- ' - }, - ctx, - ) - }, - - addExtensions() { - return [ - createBranchingListDeleteKeymap(this.name, [ - this.options.bulletListTypeName, - this.options.orderedListTypeName, - ]), - ] - }, - - addKeyboardShortcuts() { - return { - Enter: () => this.editor.commands.splitListItem(this.name), - Tab: () => this.editor.commands.sinkListItem(this.name), - 'Shift-Tab': () => this.editor.commands.liftListItem(this.name), - } - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/index.ts deleted file mode 100644 index 57839e4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './list-keymap.js' -export * as listHelpers from './listHelpers/index.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/list-keymap.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/list-keymap.ts deleted file mode 100644 index aa8d352..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/list-keymap.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { Extension } from '@tiptap/core' - -import { handleBackspace, handleDelete } from './listHelpers/index.js' - -export type ListKeymapOptions = { - /** - * An array of list types. This is used for item and wrapper list matching. - * @default [] - * @example [{ itemName: 'listItem', wrapperNames: ['bulletList', 'orderedList'] }] - */ - listTypes: Array<{ - itemName: string - wrapperNames: string[] - }> -} - -/** - * This extension registers custom keymaps to change the behaviour of the backspace and delete keys. - * By default Prosemirror keyhandling will always lift or sink items so paragraphs are joined into - * the adjacent or previous list item. This extension will prevent this behaviour and instead will - * try to join paragraphs from two list items into a single list item. - * @see https://www.tiptap.dev/api/extensions/list-keymap - */ -export const ListKeymap = Extension.create({ - name: 'listKeymap', - - addOptions() { - return { - listTypes: [ - { - itemName: 'listItem', - wrapperNames: ['bulletList', 'orderedList'], - }, - { - itemName: 'taskItem', - wrapperNames: ['taskList'], - }, - ], - } - }, - - addKeyboardShortcuts() { - return { - Delete: ({ editor }) => { - let handled = false - - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === undefined) { - return - } - - if (handleDelete(editor, itemName)) { - handled = true - } - }) - - return handled - }, - 'Mod-Delete': ({ editor }) => { - let handled = false - - this.options.listTypes.forEach(({ itemName }) => { - if (editor.state.schema.nodes[itemName] === undefined) { - return - } - - if (handleDelete(editor, itemName)) { - handled = true - } - }) - - return handled - }, - Backspace: ({ editor }) => { - let handled = false - - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === undefined) { - return - } - - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true - } - }) - - return handled - }, - 'Mod-Backspace': ({ editor }) => { - let handled = false - - this.options.listTypes.forEach(({ itemName, wrapperNames }) => { - if (editor.state.schema.nodes[itemName] === undefined) { - return - } - - if (handleBackspace(editor, itemName, wrapperNames)) { - handled = true - } - }) - - return handled - }, - } - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/findListItemPos.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/findListItemPos.ts deleted file mode 100644 index 9ec83a1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/findListItemPos.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { getNodeType } from '@tiptap/core' -import type { NodeType } from '@tiptap/pm/model' -import type { EditorState } from '@tiptap/pm/state' - -export const findListItemPos = (typeOrName: string | NodeType, state: EditorState) => { - const { $from } = state.selection - const nodeType = getNodeType(typeOrName, state.schema) - - let currentNode = null - let currentDepth = $from.depth - let currentPos = $from.pos - let targetDepth: number | null = null - - while (currentDepth > 0 && targetDepth === null) { - currentNode = $from.node(currentDepth) - - if (currentNode.type === nodeType) { - targetDepth = currentDepth - } else { - currentDepth -= 1 - currentPos -= 1 - } - } - - if (targetDepth === null) { - return null - } - - return { $pos: state.doc.resolve(currentPos), depth: targetDepth } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/getNextListDepth.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/getNextListDepth.ts deleted file mode 100644 index d0d7dd3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/getNextListDepth.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { getNodeAtPosition } from '@tiptap/core' -import type { EditorState } from '@tiptap/pm/state' - -import { findListItemPos } from './findListItemPos.js' - -export const getNextListDepth = (typeOrName: string, state: EditorState) => { - const listItemPos = findListItemPos(typeOrName, state) - - if (!listItemPos) { - return false - } - - const [, depth] = getNodeAtPosition(state, typeOrName, listItemPos.$pos.pos + 4) - - return depth -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleBackspace.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleBackspace.ts deleted file mode 100644 index 6e4dfa5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleBackspace.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { Editor } from '@tiptap/core' -import { isAtStartOfNode, isNodeActive } from '@tiptap/core' -import type { Node } from '@tiptap/pm/model' - -import { hasListBefore } from './hasListBefore.js' - -export const handleBackspace = (editor: Editor, name: string, parentListTypes: string[]) => { - // this is required to still handle the undo handling - if (editor.commands.undoInputRule()) { - return true - } - - // if the selection is not collapsed - // we can rely on the default backspace behavior - if (editor.state.selection.from !== editor.state.selection.to) { - return false - } - - // if the current item is NOT inside a list item & - // the previous item is a list (orderedList or bulletList) - // move the cursor into the list and delete the current item - if (!isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) { - const { $anchor } = editor.state.selection - - const $listPos = editor.state.doc.resolve($anchor.before() - 1) - - const listDescendants: Array<{ node: Node; pos: number }> = [] - - $listPos.node().descendants((node, pos) => { - if (node.type.name === name) { - listDescendants.push({ node, pos }) - } - }) - - const lastItem = listDescendants.at(-1) - - if (!lastItem) { - return false - } - - const $lastItemPos = editor.state.doc.resolve($listPos.start() + lastItem.pos + 1) - - return editor - .chain() - .cut({ from: $anchor.start() - 1, to: $anchor.end() + 1 }, $lastItemPos.end()) - .joinForward() - .run() - } - - // if the cursor is not inside the current node type - // do nothing and proceed - if (!isNodeActive(editor.state, name)) { - return false - } - - // if the cursor is not at the start of a node - // do nothing and proceed - if (!isAtStartOfNode(editor.state)) { - return false - } - - // At the start of a list item, lift it out. Top-level items split the - // wrapping list around them; nested items get promoted into the outer - // list. A second backspace then falls through to the merge branch above. - return editor.chain().liftListItem(name).run() -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleDelete.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleDelete.ts deleted file mode 100644 index 659bf02..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleDelete.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { Editor } from '@tiptap/core' -import { isAtEndOfNode, isNodeActive } from '@tiptap/core' - -import { nextListIsDeeper } from './nextListIsDeeper.js' -import { nextListIsHigher } from './nextListIsHigher.js' - -export const handleDelete = (editor: Editor, name: string) => { - // if the cursor is not inside the current node type - // do nothing and proceed - if (!isNodeActive(editor.state, name)) { - return false - } - - // if the cursor is not at the end of a node - // do nothing and proceed - if (!isAtEndOfNode(editor.state, name)) { - return false - } - - // if the selection is not collapsed, or not within a single node - // do nothing and proceed - const { selection } = editor.state - const { $from, $to } = selection - - if (!selection.empty && $from.sameParent($to)) { - return false - } - - // check if the next node is a list with a deeper depth - if (nextListIsDeeper(name, editor.state)) { - return editor - .chain() - .focus(editor.state.selection.from + 4) - .lift(name) - .joinBackward() - .run() - } - - if (nextListIsHigher(name, editor.state)) { - return editor.chain().joinForward().joinBackward().run() - } - - return editor.commands.joinItemForward() -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListBefore.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListBefore.ts deleted file mode 100644 index 262d2ae..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListBefore.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { EditorState } from '@tiptap/pm/state' - -export const hasListBefore = ( - editorState: EditorState, - name: string, - parentListTypes: string[], -) => { - const { $anchor } = editorState.selection - - const previousNodePos = Math.max(0, $anchor.pos - 2) - - const previousNode = editorState.doc.resolve(previousNodePos).node() - - if (!previousNode || !parentListTypes.includes(previousNode.type.name)) { - return false - } - - return true -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemAfter.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemAfter.ts deleted file mode 100644 index 44796d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemAfter.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { EditorState } from '@tiptap/pm/state' - -export const hasListItemAfter = (typeOrName: string, state: EditorState): boolean => { - const { $anchor } = state.selection - - const $targetPos = state.doc.resolve($anchor.pos - $anchor.parentOffset - 2) - - if ($targetPos.index() === $targetPos.parent.childCount - 1) { - return false - } - - if ($targetPos.nodeAfter?.type.name !== typeOrName) { - return false - } - - return true -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemBefore.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemBefore.ts deleted file mode 100644 index cc9c7e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemBefore.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { EditorState } from '@tiptap/pm/state' - -export const hasListItemBefore = (typeOrName: string, state: EditorState): boolean => { - const { $anchor } = state.selection - - const $targetPos = state.doc.resolve($anchor.pos - 2) - - if ($targetPos.index() === 0) { - return false - } - - if ($targetPos.nodeBefore?.type.name !== typeOrName) { - return false - } - - return true -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/index.ts deleted file mode 100644 index 0b95e72..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './findListItemPos.js' -export * from './getNextListDepth.js' -export * from './handleBackspace.js' -export * from './handleDelete.js' -export * from './hasListBefore.js' -export * from './hasListItemAfter.js' -export * from './hasListItemBefore.js' -export * from './listItemHasSubList.js' -export * from './nextListIsDeeper.js' -export * from './nextListIsHigher.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/listItemHasSubList.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/listItemHasSubList.ts deleted file mode 100644 index af21d21..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/listItemHasSubList.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { getNodeType } from '@tiptap/core' -import type { Node } from '@tiptap/pm/model' -import type { EditorState } from '@tiptap/pm/state' - -export const listItemHasSubList = (typeOrName: string, state: EditorState, node?: Node) => { - if (!node) { - return false - } - - const nodeType = getNodeType(typeOrName, state.schema) - - let hasSubList = false - - node.descendants(child => { - if (child.type === nodeType) { - hasSubList = true - } - }) - - return hasSubList -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsDeeper.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsDeeper.ts deleted file mode 100644 index 42582b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsDeeper.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { EditorState } from '@tiptap/pm/state' - -import { findListItemPos } from './findListItemPos.js' -import { getNextListDepth } from './getNextListDepth.js' - -export const nextListIsDeeper = (typeOrName: string, state: EditorState) => { - const listDepth = getNextListDepth(typeOrName, state) - const listItemPos = findListItemPos(typeOrName, state) - - if (!listItemPos || !listDepth) { - return false - } - - if (listDepth > listItemPos.depth) { - return true - } - - return false -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsHigher.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsHigher.ts deleted file mode 100644 index 659fb72..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsHigher.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { EditorState } from '@tiptap/pm/state' - -import { findListItemPos } from './findListItemPos.js' -import { getNextListDepth } from './getNextListDepth.js' - -export const nextListIsHigher = (typeOrName: string, state: EditorState) => { - const listDepth = getNextListDepth(typeOrName, state) - const listItemPos = findListItemPos(typeOrName, state) - - if (!listItemPos || !listDepth) { - return false - } - - if (listDepth < listItemPos.depth) { - return true - } - - return false -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/kit/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/kit/index.ts deleted file mode 100644 index 1fcda0a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/kit/index.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Extension } from '@tiptap/core' - -import type { BulletListOptions } from '../bullet-list/index.js' -import { BulletList } from '../bullet-list/index.js' -import type { ListItemOptions } from '../item/index.js' -import { ListItem } from '../item/index.js' -import type { ListKeymapOptions } from '../keymap/index.js' -import { ListKeymap } from '../keymap/index.js' -import type { OrderedListOptions } from '../ordered-list/index.js' -import { OrderedList } from '../ordered-list/index.js' -import type { TaskItemOptions } from '../task-item/index.js' -import { TaskItem } from '../task-item/index.js' -import type { TaskListOptions } from '../task-list/index.js' -import { TaskList } from '../task-list/index.js' - -export interface ListKitOptions { - /** - * If set to false, the bulletList extension will not be registered - * @example table: false - */ - bulletList: Partial | false - /** - * If set to false, the listItem extension will not be registered - */ - listItem: Partial | false - /** - * If set to false, the listKeymap extension will not be registered - */ - listKeymap: Partial | false - /** - * If set to false, the orderedList extension will not be registered - */ - orderedList: Partial | false - /** - * If set to false, the taskItem extension will not be registered - */ - taskItem: Partial | false - /** - * If set to false, the taskList extension will not be registered - */ - taskList: Partial | false -} - -/** - * The table kit is a collection of table editor extensions. - * - * It’s a good starting point for building your own table in Tiptap. - */ -export const ListKit = Extension.create({ - name: 'listKit', - - addExtensions() { - const extensions = [] - - if (this.options.bulletList !== false) { - extensions.push(BulletList.configure(this.options.bulletList)) - } - - if (this.options.listItem !== false) { - extensions.push(ListItem.configure(this.options.listItem)) - } - - if (this.options.listKeymap !== false) { - extensions.push(ListKeymap.configure(this.options.listKeymap)) - } - - if (this.options.orderedList !== false) { - extensions.push(OrderedList.configure(this.options.orderedList)) - } - - if (this.options.taskItem !== false) { - extensions.push(TaskItem.configure(this.options.taskItem)) - } - - if (this.options.taskList !== false) { - extensions.push(TaskList.configure(this.options.taskList)) - } - - return extensions - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/index.ts deleted file mode 100644 index 5160726..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ordered-list.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/ordered-list.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/ordered-list.ts deleted file mode 100644 index 239b648..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/ordered-list.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core' - -import { buildNestedStructure, collectOrderedListItems, parseListItems } from './utils.js' - -const ListItemName = 'listItem' -const TextStyleName = 'textStyle' - -export interface OrderedListOptions { - /** - * The node type name for list items. - * @default 'listItem' - * @example 'myListItem' - */ - itemTypeName: string - - /** - * The HTML attributes for an ordered list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record - - /** - * Keep the marks when splitting a list item. - * @default false - * @example true - */ - keepMarks: boolean - - /** - * Keep the attributes when splitting a list item. - * @default false - * @example true - */ - keepAttributes: boolean -} - -declare module '@tiptap/core' { - interface Commands { - orderedList: { - /** - * Toggle an ordered list - * @example editor.commands.toggleOrderedList() - */ - toggleOrderedList: () => ReturnType - } - } -} - -/** - * Matches an ordered list to a 1. on input (or any number followed by a dot). - */ -export const orderedListInputRegex = /^(\d+)\.\s$/ - -/** - * This extension allows you to create ordered lists. - * This requires the ListItem extension - * @see https://www.tiptap.dev/api/nodes/ordered-list - * @see https://www.tiptap.dev/api/nodes/list-item - */ -export const OrderedList = Node.create({ - name: 'orderedList', - - addOptions() { - return { - itemTypeName: 'listItem', - HTMLAttributes: {}, - keepMarks: false, - keepAttributes: false, - } - }, - - group: 'block list', - - content() { - return `${this.options.itemTypeName}+` - }, - - addAttributes() { - return { - start: { - default: 1, - parseHTML: element => { - return element.hasAttribute('start') - ? parseInt(element.getAttribute('start') || '', 10) - : 1 - }, - }, - type: { - default: null, - parseHTML: element => element.getAttribute('type'), - }, - } - }, - - parseHTML() { - return [ - { - tag: 'ol', - }, - ] - }, - - renderHTML({ HTMLAttributes }) { - const { start, ...attributesWithoutStart } = HTMLAttributes - - return start === 1 - ? ['ol', mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0] - : ['ol', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] - }, - - markdownTokenName: 'list', - - parseMarkdown: (token, helpers) => { - if (token.type !== 'list' || !token.ordered) { - return [] - } - - const startValue = token.start || 1 - const content = token.items ? parseListItems(token.items, helpers) : [] - - if (startValue !== 1) { - return { - type: 'orderedList', - attrs: { start: startValue }, - content, - } - } - - return { - type: 'orderedList', - content, - } - }, - - renderMarkdown: (node, h) => { - if (!node.content) { - return '' - } - - return h.renderChildren(node.content, '\n') - }, - - markdownTokenizer: { - name: 'orderedList', - level: 'block', - start: (src: string) => { - const match = src.match(/^(\s*)(\d+)\.\s+/) - const index = match?.index - return index !== undefined ? index : -1 - }, - tokenize: (src: string, _tokens, lexer) => { - const lines = src.split('\n') - const [listItems, consumed] = collectOrderedListItems(lines) - - if (listItems.length === 0) { - return undefined - } - - const items = buildNestedStructure(listItems, 0, lexer) - - if (items.length === 0) { - return undefined - } - - const startValue = listItems[0]?.number || 1 - - return { - type: 'list', - ordered: true, - start: startValue, - items, - raw: lines.slice(0, consumed).join('\n'), - } as unknown as object - }, - }, - - markdownOptions: { - indentsContent: true, - }, - - addCommands() { - return { - toggleOrderedList: - () => - ({ commands, chain }) => { - if (this.options.keepAttributes) { - return chain() - .toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) - .updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)) - .run() - } - return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) - }, - } - }, - - addKeyboardShortcuts() { - return { - 'Mod-Shift-7': () => this.editor.commands.toggleOrderedList(), - } - }, - - addInputRules() { - let inputRule = wrappingInputRule({ - find: orderedListInputRegex, - type: this.type, - getAttributes: match => ({ start: +match[1] }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1], - }) - - if (this.options.keepMarks || this.options.keepAttributes) { - inputRule = wrappingInputRule({ - find: orderedListInputRegex, - type: this.type, - keepMarks: this.options.keepMarks, - keepAttributes: this.options.keepAttributes, - getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyleName) }), - joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1], - editor: this.editor, - }) - } - return [inputRule] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/utils.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/utils.ts deleted file mode 100644 index e50cddd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/ordered-list/utils.ts +++ /dev/null @@ -1,301 +0,0 @@ -import type { - JSONContent, - MarkdownLexerConfiguration, - MarkdownParseHelpers, - MarkdownToken, -} from '@tiptap/core' - -/** - * Matches an ordered list item line with optional leading whitespace. - * Captures: (1) indentation spaces, (2) item number, (3) content after marker - * Example matches: "1. Item", " 2. Nested item", " 3. Deeply nested" - */ -const ORDERED_LIST_ITEM_REGEX = /^(\s*)(\d+)\.\s+(.*)$/ - -/** - * Matches any line that starts with whitespace (indented content). - * Used to identify continuation content that belongs to a list item. - */ -const INDENTED_LINE_REGEX = /^\s/ - -/** - * Represents a parsed ordered list item with indentation information - */ -export interface OrderedListItem { - indent: number - number: number - content: string - contentLines: string[] - raw: string -} - -function isBlockContentLine(line: string): boolean { - const trimmedLine = line.trimStart() - - return ( - // oxlint-disable-next-line prefer-string-starts-ends-with - /^[-+*]\s+/.test(trimmedLine) || - // oxlint-disable-next-line prefer-string-starts-ends-with - /^\d+\.\s+/.test(trimmedLine) || - // oxlint-disable-next-line prefer-string-starts-ends-with - /^>\s?/.test(trimmedLine) || - // oxlint-disable-next-line prefer-string-starts-ends-with - /^```/.test(trimmedLine) || - // oxlint-disable-next-line prefer-string-starts-ends-with - /^~~~/.test(trimmedLine) - ) -} - -function splitItemContent(contentLines: string[]): { - paragraphLines: string[] - blockLines: string[] -} { - const paragraphLines: string[] = [] - const blockLines: string[] = [] - let reachedBlockBoundary = false - - contentLines.forEach(line => { - if (reachedBlockBoundary) { - blockLines.push(line) - return - } - - if (line.trim() === '') { - reachedBlockBoundary = true - blockLines.push(line) - return - } - - if (paragraphLines.length > 0 && isBlockContentLine(line)) { - reachedBlockBoundary = true - blockLines.push(line) - return - } - - paragraphLines.push(line) - }) - - return { - paragraphLines, - blockLines, - } -} - -/** - * Collects all ordered list items from lines, parsing them into a flat array - * with indentation information. Stops collecting continuation content when - * encountering nested list items, allowing them to be processed separately. - * - * @param lines - Array of source lines to parse - * @returns Tuple of [listItems array, number of lines consumed] - */ -export function collectOrderedListItems(lines: string[]): [OrderedListItem[], number] { - const listItems: OrderedListItem[] = [] - let currentLineIndex = 0 - let consumed = 0 - - while (currentLineIndex < lines.length) { - const line = lines[currentLineIndex] - const match = line.match(ORDERED_LIST_ITEM_REGEX) - - if (!match) { - break - } - - const [, indent, number, content] = match - const indentLevel = indent.length - const itemContentLines = [content] - let nextLineIndex = currentLineIndex + 1 - const itemLines = [line] - let sawBlankLine = false - - // Collect continuation lines for this item (but NOT nested list items) - while (nextLineIndex < lines.length) { - const nextLine = lines[nextLineIndex] - const nextMatch = nextLine.match(ORDERED_LIST_ITEM_REGEX) - - // If it's another list item (nested or not), stop collecting - if (nextMatch) { - break - } - - // Check for continuation content (non-list content) - if (nextLine.trim() === '') { - // Empty line - itemLines.push(nextLine) - itemContentLines.push('') - sawBlankLine = true - nextLineIndex += 1 - } else if (nextLine.match(INDENTED_LINE_REGEX)) { - // Indented content - part of this item (but not a list item) - itemLines.push(nextLine) - itemContentLines.push(nextLine.slice(indentLevel + 2)) - nextLineIndex += 1 - } else { - if (sawBlankLine) { - break - } - - itemLines.push(nextLine) - itemContentLines.push(nextLine) - nextLineIndex += 1 - } - } - - listItems.push({ - indent: indentLevel, - number: parseInt(number, 10), - content: itemContentLines.join('\n').trim(), - contentLines: itemContentLines, - raw: itemLines.join('\n'), - }) - - consumed = nextLineIndex - currentLineIndex = nextLineIndex - } - - return [listItems, consumed] -} - -/** - * Recursively builds a nested structure from a flat array of list items - * based on their indentation levels. Creates proper markdown tokens with - * nested lists where appropriate. - * - * @param items - Flat array of list items with indentation info - * @param baseIndent - The indentation level to process at this recursion level - * @param lexer - Markdown lexer for parsing inline and block content - * @returns Array of list_item tokens with proper nesting - */ -export function buildNestedStructure( - items: OrderedListItem[], - baseIndent: number, - lexer: MarkdownLexerConfiguration, -): unknown[] { - const result: unknown[] = [] - let currentIndex = 0 - - while (currentIndex < items.length) { - const item = items[currentIndex] - - if (item.indent === baseIndent) { - // This item belongs at the current level - const { paragraphLines, blockLines } = splitItemContent(item.contentLines) - const mainText = paragraphLines.join('\n').trim() - - const tokens = [] - - // Always wrap the main text in a paragraph token - if (mainText) { - tokens.push({ - type: 'paragraph', - raw: mainText, - tokens: lexer.inlineTokens(mainText), - }) - } - - const additionalContent = blockLines.join('\n').trim() - if (additionalContent) { - const blockTokens = lexer.blockTokens(additionalContent) - tokens.push(...blockTokens) - } - - // Look ahead to find nested items at deeper indent levels - let lookAheadIndex = currentIndex + 1 - const nestedItems = [] - - while (lookAheadIndex < items.length && items[lookAheadIndex].indent > baseIndent) { - nestedItems.push(items[lookAheadIndex]) - lookAheadIndex += 1 - } - - // If we have nested items, recursively build their structure - if (nestedItems.length > 0) { - // Find the next indent level (immediate children) - const nextIndent = Math.min(...nestedItems.map(nestedItem => nestedItem.indent)) - - // Build the nested list recursively with all nested items - // The recursive call will handle further nesting - const nestedListItems = buildNestedStructure(nestedItems, nextIndent, lexer) - - // Create a nested list token - tokens.push({ - type: 'list', - ordered: true, - start: nestedItems[0].number, - items: nestedListItems, - raw: nestedItems.map(nestedItem => nestedItem.raw).join('\n'), - }) - } - - result.push({ - type: 'list_item', - raw: item.raw, - tokens, - }) - - // Skip the nested items we just processed - currentIndex = lookAheadIndex - } else { - // This item has deeper indent than we're currently processing - // It should be handled by a recursive call - currentIndex += 1 - } - } - - return result -} - -/** - * Parses markdown list item tokens into Tiptap JSONContent structure, - * ensuring text content is properly wrapped in paragraph nodes. - * - * @param items - Array of markdown tokens representing list items - * @param helpers - Markdown parse helpers for recursive parsing - * @returns Array of listItem JSONContent nodes - */ -export function parseListItems( - items: MarkdownToken[], - helpers: MarkdownParseHelpers, -): JSONContent[] { - return items.map(item => { - if (item.type !== 'list_item') { - return helpers.parseChildren([item])[0] - } - - // Parse the tokens within the list item - const content: JSONContent[] = [] - - if (item.tokens && item.tokens.length > 0) { - item.tokens.forEach(itemToken => { - // If it's already a proper block node (paragraph, list, etc.), parse it directly - if ( - itemToken.type === 'paragraph' || - itemToken.type === 'list' || - itemToken.type === 'blockquote' || - itemToken.type === 'code' - ) { - content.push(...helpers.parseChildren([itemToken])) - } else if (itemToken.type === 'text' && itemToken.tokens) { - // If it's inline text tokens, wrap them in a paragraph - const inlineContent = helpers.parseChildren([itemToken]) - content.push({ - type: 'paragraph', - content: inlineContent, - }) - } else { - // For any other content, try to parse it - const parsed = helpers.parseChildren([itemToken]) - if (parsed.length > 0) { - content.push(...parsed) - } - } - }) - } - - return { - type: 'listItem', - content, - } - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-item/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-item/index.ts deleted file mode 100644 index cc7cd53..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './task-item.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-item/task-item.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-item/task-item.ts deleted file mode 100644 index d500e02..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-item/task-item.ts +++ /dev/null @@ -1,330 +0,0 @@ -import type { KeyboardShortcutCommand } from '@tiptap/core' -import { - getRenderedAttributes, - mergeAttributes, - Node, - renderNestedMarkdownContent, - wrappingInputRule, -} from '@tiptap/core' -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' - -import { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js' - -export interface TaskItemOptions { - /** - * A callback function that is called when the checkbox is clicked while the editor is in readonly mode. - * @param node The prosemirror node of the task item - * @param checked The new checked state - * @returns boolean - */ - onReadOnlyChecked?: (node: ProseMirrorNode, checked: boolean) => boolean - - /** - * Controls whether the task items can be nested or not. - * @default false - * @example true - */ - nested: boolean - - /** - * HTML attributes to add to the task item element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record - - /** - * The node type for taskList nodes - * @default 'taskList' - * @example 'myCustomTaskList' - */ - taskListTypeName: string - - /** - * Accessibility options for the task item. - * @default {} - * @example - * ```js - * { - * checkboxLabel: (node) => `Task item: ${node.textContent || 'empty task item'}` - * } - */ - a11y?: { - checkboxLabel?: (node: ProseMirrorNode, checked: boolean) => string - } -} - -/** - * Matches a task item to a - [ ] on input. - */ -export const inputRegex = /^\s*(\[([( |x])?\])\s$/ - -/** - * This extension allows you to create task items. - * @see https://www.tiptap.dev/api/nodes/task-item - */ -export const TaskItem = Node.create({ - name: 'taskItem', - - addOptions() { - return { - nested: false, - HTMLAttributes: {}, - taskListTypeName: 'taskList', - a11y: undefined, - } - }, - - content() { - return this.options.nested ? 'paragraph block*' : 'paragraph+' - }, - - defining: true, - - addAttributes() { - return { - checked: { - default: false, - keepOnSplit: false, - parseHTML: element => { - const dataChecked = element.getAttribute('data-checked') - - return dataChecked === '' || dataChecked === 'true' - }, - renderHTML: attributes => ({ - 'data-checked': attributes.checked, - }), - }, - } - }, - - parseHTML() { - return [ - { - tag: `li[data-type="${this.name}"]`, - priority: 51, - }, - ] - }, - - renderHTML({ node, HTMLAttributes }) { - return [ - 'li', - mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { - 'data-type': this.name, - }), - [ - 'label', - [ - 'input', - { - type: 'checkbox', - checked: node.attrs.checked ? 'checked' : null, - }, - ], - ['span'], - ], - ['div', 0], - ] - }, - - parseMarkdown: (token, h) => { - // Parse the task item's text content into paragraph content - const content = [] - - // First, add the main paragraph content - if (token.tokens && token.tokens.length > 0) { - // If we have tokens, create a paragraph with the inline content - content.push(h.createNode('paragraph', {}, h.parseInline(token.tokens))) - } else if (token.text) { - // If we have raw text, create a paragraph with text node - content.push(h.createNode('paragraph', {}, [h.createNode('text', { text: token.text })])) - } else { - // Fallback: empty paragraph - content.push(h.createNode('paragraph', {}, [])) - } - - // Then, add any nested content (like nested task lists) - if (token.nestedTokens && token.nestedTokens.length > 0) { - const nestedContent = h.parseChildren(token.nestedTokens) - content.push(...nestedContent) - } - - return h.createNode('taskItem', { checked: token.checked || false }, content) - }, - - renderMarkdown: (node, h) => { - const checkedChar = node.attrs?.checked ? 'x' : ' ' - const prefix = `- [${checkedChar}] ` - - return renderNestedMarkdownContent(node, h, prefix) - }, - - addExtensions() { - if (!this.options.nested) { - return [] - } - - return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])] - }, - - addKeyboardShortcuts() { - const shortcuts: { - [key: string]: KeyboardShortcutCommand - } = { - Enter: () => this.editor.commands.splitListItem(this.name), - 'Shift-Tab': () => this.editor.commands.liftListItem(this.name), - } - - if (!this.options.nested) { - return shortcuts - } - - return { - ...shortcuts, - Tab: () => this.editor.commands.sinkListItem(this.name), - } - }, - - addNodeView() { - return ({ node, HTMLAttributes, getPos, editor }) => { - const listItem = document.createElement('li') - const checkboxWrapper = document.createElement('label') - const checkboxStyler = document.createElement('span') - const checkbox = document.createElement('input') - const content = document.createElement('div') - - const updateA11Y = (currentNode: ProseMirrorNode) => { - checkbox.ariaLabel = - this.options.a11y?.checkboxLabel?.(currentNode, checkbox.checked) || - `Task item checkbox for ${currentNode.textContent || 'empty task item'}` - } - - updateA11Y(node) - - checkboxWrapper.contentEditable = 'false' - checkbox.type = 'checkbox' - checkbox.addEventListener('mousedown', event => event.preventDefault()) - checkbox.addEventListener('change', event => { - // if the editor isn’t editable and we don't have a handler for - // readonly checks we have to undo the latest change - if (!editor.isEditable && !this.options.onReadOnlyChecked) { - checkbox.checked = !checkbox.checked - - return - } - - const { checked } = event.target as any - - if (editor.isEditable && typeof getPos === 'function') { - editor - .chain() - .focus(undefined, { scrollIntoView: false }) - .command(({ tr }) => { - const position = getPos() - - if (typeof position !== 'number') { - return false - } - const currentNode = tr.doc.nodeAt(position) - - tr.setNodeMarkup(position, undefined, { - ...currentNode?.attrs, - checked, - }) - - return true - }) - .run() - } - if (!editor.isEditable && this.options.onReadOnlyChecked) { - // Reset state if onReadOnlyChecked returns false - if (!this.options.onReadOnlyChecked(node, checked)) { - checkbox.checked = !checkbox.checked - } - } - }) - - Object.entries(this.options.HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value) - }) - - listItem.dataset.checked = node.attrs.checked - checkbox.checked = node.attrs.checked - - checkboxWrapper.append(checkbox, checkboxStyler) - listItem.append(checkboxWrapper, content) - - Object.entries(HTMLAttributes).forEach(([key, value]) => { - listItem.setAttribute(key, value) - }) - - // Track the keys of previously rendered HTML attributes for proper removal - let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes)) - - return { - dom: listItem, - contentDOM: content, - update: updatedNode => { - if (updatedNode.type !== this.type) { - return false - } - - listItem.dataset.checked = updatedNode.attrs.checked - checkbox.checked = updatedNode.attrs.checked - updateA11Y(updatedNode) - - // Sync all HTML attributes from the updated node - const extensionAttributes = editor.extensionManager.attributes - const newHTMLAttributes = getRenderedAttributes(updatedNode, extensionAttributes) - const newKeys = new Set(Object.keys(newHTMLAttributes)) - - // Remove attributes that were previously rendered but are no longer present - // If the attribute exists in static options, restore it instead of removing - const staticAttrs = this.options.HTMLAttributes - - prevRenderedAttributeKeys.forEach(key => { - if (!newKeys.has(key)) { - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]) - } else { - listItem.removeAttribute(key) - } - } - }) - - // Update or add new attributes - Object.entries(newHTMLAttributes).forEach(([key, value]) => { - if (value === null || value === undefined) { - // If the attribute exists in static options, restore it instead of removing - if (key in staticAttrs) { - listItem.setAttribute(key, staticAttrs[key]) - } else { - listItem.removeAttribute(key) - } - } else { - listItem.setAttribute(key, value) - } - }) - - // Update the tracked keys for next update - prevRenderedAttributeKeys = newKeys - - return true - }, - } - } - }, - - addInputRules() { - return [ - wrappingInputRule({ - find: inputRegex, - type: this.type, - getAttributes: match => ({ - checked: match[match.length - 1] === 'x', - }), - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-list/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-list/index.ts deleted file mode 100644 index b40527e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-list/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './task-list.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-list/task-list.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-list/task-list.ts deleted file mode 100644 index b65bce7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list/src/task-list/task-list.ts +++ /dev/null @@ -1,187 +0,0 @@ -import { mergeAttributes, Node, parseIndentedBlocks } from '@tiptap/core' - -export interface TaskListOptions { - /** - * The node type name for a task item. - * @default 'taskItem' - * @example 'myCustomTaskItem' - */ - itemTypeName: string - - /** - * The HTML attributes for a task list node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record -} - -declare module '@tiptap/core' { - interface Commands { - taskList: { - /** - * Toggle a task list - * @example editor.commands.toggleTaskList() - */ - toggleTaskList: () => ReturnType - } - } -} - -/** - * This extension allows you to create task lists. - * @see https://www.tiptap.dev/api/nodes/task-list - */ -export const TaskList = Node.create({ - name: 'taskList', - - addOptions() { - return { - itemTypeName: 'taskItem', - HTMLAttributes: {}, - } - }, - - group: 'block list', - - content() { - return `${this.options.itemTypeName}+` - }, - - parseHTML() { - return [ - { - tag: `ul[data-type="${this.name}"]`, - priority: 51, - }, - ] - }, - - renderHTML({ HTMLAttributes }) { - return [ - 'ul', - mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }), - 0, - ] - }, - - parseMarkdown: (token, h) => { - return h.createNode('taskList', {}, h.parseChildren(token.items || [])) - }, - - renderMarkdown: (node, h) => { - if (!node.content) { - return '' - } - - return h.renderChildren(node.content, '\n') - }, - - markdownTokenizer: { - name: 'taskList', - level: 'block', - start(src) { - // Look for the start of a task list item - const index = src.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index - return index !== undefined ? index : -1 - }, - tokenize(src, tokens, lexer) { - // Helper function to recursively parse task lists - const parseTaskListContent = (content: string): any[] | undefined => { - const nestedResult = parseIndentedBlocks( - content, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: match => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === 'x', - }), - createToken: (data, nestedTokens) => ({ - type: 'taskItem', - raw: '', - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens, - }), - // Allow recursive nesting - customNestedParser: parseTaskListContent, - }, - lexer, - ) - - if (nestedResult) { - // Return as task list token - return [ - { - type: 'taskList', - raw: nestedResult.raw, - items: nestedResult.items, - }, - ] - } - - // Fall back to regular markdown parsing if not a task list - return lexer.blockTokens(content) - } - - const result = parseIndentedBlocks( - src, - { - itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/, - extractItemData: match => ({ - indentLevel: match[1].length, - mainContent: match[4], - checked: match[3].toLowerCase() === 'x', - }), - createToken: (data, nestedTokens) => ({ - type: 'taskItem', - raw: '', - mainContent: data.mainContent, - indentLevel: data.indentLevel, - checked: data.checked, - text: data.mainContent, - tokens: lexer.inlineTokens(data.mainContent), - nestedTokens, - }), - // Use the recursive parser for nested content - customNestedParser: parseTaskListContent, - }, - lexer, - ) - - if (!result) { - return undefined - } - - return { - type: 'taskList', - raw: result.raw, - items: result.items, - } - }, - }, - - markdownOptions: { - indentsContent: true, - }, - - addCommands() { - return { - toggleTaskList: - () => - ({ commands }) => { - return commands.toggleList(this.name, this.options.itemTypeName) - }, - } - }, - - addKeyboardShortcuts() { - return { - 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(), - } - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm deleted file mode 120000 index f877560..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+pm@3.26.0/node_modules/@tiptap/pm \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-list b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-list deleted file mode 120000 index e342d8d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-list +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/README.md deleted file mode 100644 index 521517a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-ordered-list - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-ordered-list.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-ordered-list) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-ordered-list.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-ordered-list.svg)](https://www.npmjs.com/package/@tiptap/extension-ordered-list) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.cjs deleted file mode 100644 index 289300f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.cjs +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - OrderedList: () => import_extension_list2.OrderedList, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); -var import_extension_list = require("@tiptap/extension-list"); -var import_extension_list2 = require("@tiptap/extension-list"); -var index_default = import_extension_list.OrderedList; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - OrderedList -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.cjs.map deleted file mode 100644 index 750c6f1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { OrderedList } from '@tiptap/extension-list'\n\nexport type { OrderedListOptions } from '@tiptap/extension-list'\nexport { OrderedList } from '@tiptap/extension-list'\n\nexport default OrderedList\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA4B;AAG5B,IAAAA,yBAA4B;AAE5B,IAAO,gBAAQ;","names":["import_extension_list"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.d.cts deleted file mode 100644 index a09031f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.d.cts +++ /dev/null @@ -1,2 +0,0 @@ -import { OrderedList } from '@tiptap/extension-list'; -export { OrderedList, OrderedListOptions, OrderedList as default } from '@tiptap/extension-list'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.d.ts deleted file mode 100644 index a09031f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { OrderedList } from '@tiptap/extension-list'; -export { OrderedList, OrderedListOptions, OrderedList as default } from '@tiptap/extension-list'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.js deleted file mode 100644 index 18a73d3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// src/index.ts -import { OrderedList } from "@tiptap/extension-list"; -import { OrderedList as OrderedList2 } from "@tiptap/extension-list"; -var index_default = OrderedList; -export { - OrderedList2 as OrderedList, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.js.map deleted file mode 100644 index 9406c7e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { OrderedList } from '@tiptap/extension-list'\n\nexport type { OrderedListOptions } from '@tiptap/extension-list'\nexport { OrderedList } from '@tiptap/extension-list'\n\nexport default OrderedList\n"],"mappings":";AAAA,SAAS,mBAAmB;AAG5B,SAAS,eAAAA,oBAAmB;AAE5B,IAAO,gBAAQ;","names":["OrderedList"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/package.json deleted file mode 100644 index 8b09670..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-ordered-list", - "version": "3.26.0", - "description": "ordered list extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-ordered-list" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/extension-list": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/extension-list": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/src/index.ts deleted file mode 100644 index a19b6dd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { OrderedList } from '@tiptap/extension-list' - -export type { OrderedListOptions } from '@tiptap/extension-list' -export { OrderedList } from '@tiptap/extension-list' - -export default OrderedList diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/README.md deleted file mode 100644 index 2cd7a99..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-paragraph - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-paragraph.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-paragraph) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-paragraph.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-paragraph.svg)](https://www.npmjs.com/package/@tiptap/extension-paragraph) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.cjs deleted file mode 100644 index c1838be..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.cjs +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Paragraph: () => Paragraph, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); - -// src/paragraph.ts -var import_core = require("@tiptap/core"); -var EMPTY_PARAGRAPH_MARKDOWN = " "; -var NBSP_CHAR = "\xA0"; -var Paragraph = import_core.Node.create({ - name: "paragraph", - priority: 1e3, - addOptions() { - return { - HTMLAttributes: {} - }; - }, - group: "block", - content: "inline*", - parseHTML() { - return [{ tag: "p" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["p", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - parseMarkdown: (token, helpers) => { - const tokens = token.tokens || []; - if (tokens.length === 1 && tokens[0].type === "image") { - return helpers.parseChildren([tokens[0]]); - } - const content = helpers.parseInline(tokens); - const hasExplicitEmptyParagraphMarker = tokens.length === 1 && tokens[0].type === "text" && (tokens[0].raw === EMPTY_PARAGRAPH_MARKDOWN || tokens[0].text === EMPTY_PARAGRAPH_MARKDOWN || tokens[0].raw === NBSP_CHAR || tokens[0].text === NBSP_CHAR); - if (hasExplicitEmptyParagraphMarker && content.length === 1 && content[0].type === "text" && (content[0].text === EMPTY_PARAGRAPH_MARKDOWN || content[0].text === NBSP_CHAR)) { - return helpers.createNode("paragraph", void 0, []); - } - return helpers.createNode("paragraph", void 0, content); - }, - renderMarkdown: (node, h, ctx) => { - var _a, _b; - if (!node) { - return ""; - } - const content = Array.isArray(node.content) ? node.content : []; - if (content.length === 0) { - const previousContent = Array.isArray((_a = ctx == null ? void 0 : ctx.previousNode) == null ? void 0 : _a.content) ? ctx.previousNode.content : []; - const previousNodeIsEmptyParagraph = ((_b = ctx == null ? void 0 : ctx.previousNode) == null ? void 0 : _b.type) === "paragraph" && previousContent.length === 0; - return previousNodeIsEmptyParagraph ? EMPTY_PARAGRAPH_MARKDOWN : ""; - } - return h.renderChildren(content); - }, - addCommands() { - return { - setParagraph: () => ({ commands }) => { - return commands.setNode(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Alt-0": () => this.editor.commands.setParagraph() - }; - } -}); - -// src/index.ts -var index_default = Paragraph; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Paragraph -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.cjs.map deleted file mode 100644 index 2ebc755..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/paragraph.ts"],"sourcesContent":["import { Paragraph } from './paragraph.js'\n\nexport * from './paragraph.js'\n\nexport default Paragraph\n","import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface ParagraphOptions {\n /**\n * The HTML attributes for a paragraph node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n paragraph: {\n /**\n * Toggle a paragraph\n * @example editor.commands.toggleParagraph()\n */\n setParagraph: () => ReturnType\n }\n }\n}\n\n/**\n * Markdown marker for empty paragraphs to preserve blank lines.\n * Using   (non-breaking space HTML entity) ensures the paragraph\n * is not collapsed by markdown parsers while remaining human-readable.\n */\nconst EMPTY_PARAGRAPH_MARKDOWN = ' '\n\n/**\n * Unicode character for non-breaking space (U+00A0).\n * Some markdown parsers may convert   entities to this literal character.\n */\nconst NBSP_CHAR = '\\u00A0'\n\n/**\n * This extension allows you to create paragraphs.\n * @see https://www.tiptap.dev/api/nodes/paragraph\n */\nexport const Paragraph = Node.create({\n name: 'paragraph',\n\n priority: 1000,\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n group: 'block',\n\n content: 'inline*',\n\n parseHTML() {\n return [{ tag: 'p' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n parseMarkdown: (token, helpers) => {\n const tokens = token.tokens || []\n\n // Special case: if paragraph contains only a single image token,\n // unwrap it to avoid nesting block elements incorrectly\n if (tokens.length === 1 && tokens[0].type === 'image') {\n // Parse the image token directly as a block element\n return helpers.parseChildren([tokens[0]])\n }\n\n // Parse the inline tokens\n const content = helpers.parseInline(tokens)\n\n // Special case: if paragraph contains only   (non-breaking space),\n // treat it as an empty paragraph to preserve blank lines\n const hasExplicitEmptyParagraphMarker =\n tokens.length === 1 &&\n tokens[0].type === 'text' &&\n (tokens[0].raw === EMPTY_PARAGRAPH_MARKDOWN ||\n tokens[0].text === EMPTY_PARAGRAPH_MARKDOWN ||\n tokens[0].raw === NBSP_CHAR ||\n tokens[0].text === NBSP_CHAR)\n\n if (\n hasExplicitEmptyParagraphMarker &&\n content.length === 1 &&\n content[0].type === 'text' &&\n (content[0].text === EMPTY_PARAGRAPH_MARKDOWN || content[0].text === NBSP_CHAR)\n ) {\n return helpers.createNode('paragraph', undefined, [])\n }\n\n // Convert 'paragraph' token to paragraph node\n return helpers.createNode('paragraph', undefined, content)\n },\n\n renderMarkdown: (node, h, ctx) => {\n if (!node) {\n return ''\n }\n\n // Normalize content: treat undefined/null as empty array\n const content = Array.isArray(node.content) ? node.content : []\n\n if (content.length === 0) {\n // Emit   for the second and later empty paragraphs in a consecutive\n // run at the current nesting level. The first empty paragraph stays empty\n // so markdown spacing is preserved naturally.\n const previousContent = Array.isArray(ctx?.previousNode?.content)\n ? ctx.previousNode.content\n : []\n const previousNodeIsEmptyParagraph =\n ctx?.previousNode?.type === 'paragraph' && previousContent.length === 0\n\n return previousNodeIsEmptyParagraph ? EMPTY_PARAGRAPH_MARKDOWN : ''\n }\n\n return h.renderChildren(content)\n },\n\n addCommands() {\n return {\n setParagraph:\n () =>\n ({ commands }) => {\n return commands.setNode(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n '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AEA,gBAAgB,CAAC,MAAM,GAAG,QAAQ;AAnGpC;AAoGI,QAAI,CAAC,MAAM;AACT,aAAO;AAAA,IACT;AAGA,UAAM,UAAU,MAAM,QAAQ,KAAK,OAAO,IAAI,KAAK,UAAU,CAAC;AAE9D,QAAI,QAAQ,WAAW,GAAG;AAIxB,YAAM,kBAAkB,MAAM,SAAQ,gCAAK,iBAAL,mBAAmB,OAAO,IAC5D,IAAI,aAAa,UACjB,CAAC;AACL,YAAM,iCACJ,gCAAK,iBAAL,mBAAmB,UAAS,eAAe,gBAAgB,WAAW;AAExE,aAAO,+BAA+B,2BAA2B;AAAA,IACnE;AAEA,WAAO,EAAE,eAAe,OAAO;AAAA,EACjC;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,cACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,QAAQ,KAAK,IAAI;AAAA,MACnC;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,aAAa,MAAM,KAAK,OAAO,SAAS,aAAa;AAAA,IACvD;AAAA,EACF;AACF,CAAC;;;ADtID,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.d.cts deleted file mode 100644 index c7c67ad..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.d.cts +++ /dev/null @@ -1,28 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface ParagraphOptions { - /** - * The HTML attributes for a paragraph node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - paragraph: { - /** - * Toggle a paragraph - * @example editor.commands.toggleParagraph() - */ - setParagraph: () => ReturnType; - }; - } -} -/** - * This extension allows you to create paragraphs. - * @see https://www.tiptap.dev/api/nodes/paragraph - */ -declare const Paragraph: Node; - -export { Paragraph, type ParagraphOptions, Paragraph as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.d.ts deleted file mode 100644 index c7c67ad..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Node } from '@tiptap/core'; - -interface ParagraphOptions { - /** - * The HTML attributes for a paragraph node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - paragraph: { - /** - * Toggle a paragraph - * @example editor.commands.toggleParagraph() - */ - setParagraph: () => ReturnType; - }; - } -} -/** - * This extension allows you to create paragraphs. - * @see https://www.tiptap.dev/api/nodes/paragraph - */ -declare const Paragraph: Node; - -export { Paragraph, type ParagraphOptions, Paragraph as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.js deleted file mode 100644 index ead85c3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.js +++ /dev/null @@ -1,66 +0,0 @@ -// src/paragraph.ts -import { mergeAttributes, Node } from "@tiptap/core"; -var EMPTY_PARAGRAPH_MARKDOWN = " "; -var NBSP_CHAR = "\xA0"; -var Paragraph = Node.create({ - name: "paragraph", - priority: 1e3, - addOptions() { - return { - HTMLAttributes: {} - }; - }, - group: "block", - content: "inline*", - parseHTML() { - return [{ tag: "p" }]; - }, - renderHTML({ HTMLAttributes }) { - return ["p", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - parseMarkdown: (token, helpers) => { - const tokens = token.tokens || []; - if (tokens.length === 1 && tokens[0].type === "image") { - return helpers.parseChildren([tokens[0]]); - } - const content = helpers.parseInline(tokens); - const hasExplicitEmptyParagraphMarker = tokens.length === 1 && tokens[0].type === "text" && (tokens[0].raw === EMPTY_PARAGRAPH_MARKDOWN || tokens[0].text === EMPTY_PARAGRAPH_MARKDOWN || tokens[0].raw === NBSP_CHAR || tokens[0].text === NBSP_CHAR); - if (hasExplicitEmptyParagraphMarker && content.length === 1 && content[0].type === "text" && (content[0].text === EMPTY_PARAGRAPH_MARKDOWN || content[0].text === NBSP_CHAR)) { - return helpers.createNode("paragraph", void 0, []); - } - return helpers.createNode("paragraph", void 0, content); - }, - renderMarkdown: (node, h, ctx) => { - var _a, _b; - if (!node) { - return ""; - } - const content = Array.isArray(node.content) ? node.content : []; - if (content.length === 0) { - const previousContent = Array.isArray((_a = ctx == null ? void 0 : ctx.previousNode) == null ? void 0 : _a.content) ? ctx.previousNode.content : []; - const previousNodeIsEmptyParagraph = ((_b = ctx == null ? void 0 : ctx.previousNode) == null ? void 0 : _b.type) === "paragraph" && previousContent.length === 0; - return previousNodeIsEmptyParagraph ? EMPTY_PARAGRAPH_MARKDOWN : ""; - } - return h.renderChildren(content); - }, - addCommands() { - return { - setParagraph: () => ({ commands }) => { - return commands.setNode(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Alt-0": () => this.editor.commands.setParagraph() - }; - } -}); - -// src/index.ts -var index_default = Paragraph; -export { - Paragraph, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.js.map deleted file mode 100644 index 941c82d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/paragraph.ts","../src/index.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface ParagraphOptions {\n /**\n * The HTML attributes for a paragraph node.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n paragraph: {\n /**\n * Toggle a paragraph\n * @example editor.commands.toggleParagraph()\n */\n setParagraph: () => ReturnType\n }\n }\n}\n\n/**\n * Markdown marker for empty paragraphs to preserve blank lines.\n * Using   (non-breaking space HTML entity) ensures the paragraph\n * is not collapsed by markdown parsers while remaining human-readable.\n */\nconst EMPTY_PARAGRAPH_MARKDOWN = ' '\n\n/**\n * Unicode character for non-breaking space (U+00A0).\n * Some markdown parsers may convert   entities to this literal character.\n */\nconst NBSP_CHAR = '\\u00A0'\n\n/**\n * This extension allows you to create paragraphs.\n * @see https://www.tiptap.dev/api/nodes/paragraph\n */\nexport const Paragraph = Node.create({\n name: 'paragraph',\n\n priority: 1000,\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n group: 'block',\n\n content: 'inline*',\n\n parseHTML() {\n return [{ tag: 'p' }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n parseMarkdown: (token, helpers) => {\n const tokens = token.tokens || []\n\n // Special case: if paragraph contains only a single image token,\n // unwrap it to avoid nesting block elements incorrectly\n if (tokens.length === 1 && tokens[0].type === 'image') {\n // Parse the image token directly as a block element\n return helpers.parseChildren([tokens[0]])\n }\n\n // Parse the inline tokens\n const content = helpers.parseInline(tokens)\n\n // Special case: if paragraph contains only   (non-breaking space),\n // treat it as an empty paragraph to preserve blank lines\n const hasExplicitEmptyParagraphMarker =\n tokens.length === 1 &&\n tokens[0].type === 'text' &&\n (tokens[0].raw === EMPTY_PARAGRAPH_MARKDOWN ||\n tokens[0].text === EMPTY_PARAGRAPH_MARKDOWN ||\n tokens[0].raw === NBSP_CHAR ||\n tokens[0].text === NBSP_CHAR)\n\n if (\n hasExplicitEmptyParagraphMarker &&\n content.length === 1 &&\n content[0].type === 'text' &&\n (content[0].text === EMPTY_PARAGRAPH_MARKDOWN || content[0].text === NBSP_CHAR)\n ) {\n return helpers.createNode('paragraph', undefined, [])\n }\n\n // Convert 'paragraph' token to paragraph node\n return helpers.createNode('paragraph', undefined, content)\n },\n\n renderMarkdown: (node, h, ctx) => {\n if (!node) {\n return ''\n }\n\n // Normalize content: treat undefined/null as empty array\n const content = Array.isArray(node.content) ? node.content : []\n\n if (content.length === 0) {\n // Emit   for the second and later empty paragraphs in a consecutive\n // run at the current nesting level. The first empty paragraph stays empty\n // so markdown spacing is preserved naturally.\n const previousContent = Array.isArray(ctx?.previousNode?.content)\n ? ctx.previousNode.content\n : []\n const previousNodeIsEmptyParagraph =\n ctx?.previousNode?.type === 'paragraph' && previousContent.length === 0\n\n return previousNodeIsEmptyParagraph ? EMPTY_PARAGRAPH_MARKDOWN : ''\n }\n\n return h.renderChildren(content)\n },\n\n addCommands() {\n return {\n setParagraph:\n () =>\n ({ commands }) => {\n return commands.setNode(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Alt-0': () => this.editor.commands.setParagraph(),\n }\n },\n})\n","import { Paragraph } from './paragraph.js'\n\nexport * from './paragraph.js'\n\nexport default Paragraph\n"],"mappings":";AAAA,SAAS,iBAAiB,YAAY;AA4BtC,IAAM,2BAA2B;AAMjC,IAAM,YAAY;AAMX,IAAM,YAAY,KAAK,OAAyB;AAAA,EACrD,MAAM;AAAA,EAEN,UAAU;AAAA,EAEV,aAAa;AACX,WAAO;AAAA,MACL,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,OAAO;AAAA,EAEP,SAAS;AAAA,EAET,YAAY;AACV,WAAO,CAAC,EAAE,KAAK,IAAI,CAAC;AAAA,EACtB;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO,CAAC,KAAK,gBAAgB,KAAK,QAAQ,gBAAgB,cAAc,GAAG,CAAC;AAAA,EAC9E;AAAA,EAEA,eAAe,CAAC,OAAO,YAAY;AACjC,UAAM,SAAS,MAAM,UAAU,CAAC;AAIhC,QAAI,OAAO,WAAW,KAAK,OAAO,CAAC,EAAE,SAAS,SAAS;AAErD,aAAO,QAAQ,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;AAAA,IAC1C;AAGA,UAAM,UAAU,QAAQ,YAAY,MAAM;AAI1C,UAAM,kCACJ,OAAO,WAAW,KAClB,OAAO,CAAC,EAAE,SAAS,WAClB,OAAO,CAAC,EAAE,QAAQ,4BACjB,OAAO,CAAC,EAAE,SAAS,4BACnB,OAAO,CAAC,EAAE,QAAQ,aAClB,OAAO,CAAC,EAAE,SAAS;AAEvB,QACE,mCACA,QAAQ,WAAW,KACnB,QAAQ,CAAC,EAAE,SAAS,WACnB,QAAQ,CAAC,EAAE,SAAS,4BAA4B,QAAQ,CAAC,EAAE,SAAS,YACrE;AACA,aAAO,QAAQ,WAAW,aAAa,QAAW,CAAC,CAAC;AAAA,IACtD;AAGA,WAAO,QAAQ,WAAW,aAAa,QAAW,OAAO;AAAA,EAC3D;AAAA,EAEA,gBAAgB,CAAC,MAAM,GAAG,QAAQ;AAnGpC;AAoGI,QAAI,CAAC,MAAM;AACT,aAAO;AAAA,IACT;AAGA,UAAM,UAAU,MAAM,QAAQ,KAAK,OAAO,IAAI,KAAK,UAAU,CAAC;AAE9D,QAAI,QAAQ,WAAW,GAAG;AAIxB,YAAM,kBAAkB,MAAM,SAAQ,gCAAK,iBAAL,mBAAmB,OAAO,IAC5D,IAAI,aAAa,UACjB,CAAC;AACL,YAAM,iCACJ,gCAAK,iBAAL,mBAAmB,UAAS,eAAe,gBAAgB,WAAW;AAExE,aAAO,+BAA+B,2BAA2B;AAAA,IACnE;AAEA,WAAO,EAAE,eAAe,OAAO;AAAA,EACjC;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,cACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,QAAQ,KAAK,IAAI;AAAA,MACnC;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,aAAa,MAAM,KAAK,OAAO,SAAS,aAAa;AAAA,IACvD;AAAA,EACF;AACF,CAAC;;;ACtID,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/package.json deleted file mode 100644 index 1bebbd9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-paragraph", - "version": "3.26.0", - "description": "paragraph extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-paragraph" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/src/index.ts deleted file mode 100644 index 2dd2af3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Paragraph } from './paragraph.js' - -export * from './paragraph.js' - -export default Paragraph diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/src/paragraph.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/src/paragraph.ts deleted file mode 100644 index 9391c2e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph/src/paragraph.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { mergeAttributes, Node } from '@tiptap/core' - -export interface ParagraphOptions { - /** - * The HTML attributes for a paragraph node. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record -} - -declare module '@tiptap/core' { - interface Commands { - paragraph: { - /** - * Toggle a paragraph - * @example editor.commands.toggleParagraph() - */ - setParagraph: () => ReturnType - } - } -} - -/** - * Markdown marker for empty paragraphs to preserve blank lines. - * Using   (non-breaking space HTML entity) ensures the paragraph - * is not collapsed by markdown parsers while remaining human-readable. - */ -const EMPTY_PARAGRAPH_MARKDOWN = ' ' - -/** - * Unicode character for non-breaking space (U+00A0). - * Some markdown parsers may convert   entities to this literal character. - */ -const NBSP_CHAR = '\u00A0' - -/** - * This extension allows you to create paragraphs. - * @see https://www.tiptap.dev/api/nodes/paragraph - */ -export const Paragraph = Node.create({ - name: 'paragraph', - - priority: 1000, - - addOptions() { - return { - HTMLAttributes: {}, - } - }, - - group: 'block', - - content: 'inline*', - - parseHTML() { - return [{ tag: 'p' }] - }, - - renderHTML({ HTMLAttributes }) { - return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] - }, - - parseMarkdown: (token, helpers) => { - const tokens = token.tokens || [] - - // Special case: if paragraph contains only a single image token, - // unwrap it to avoid nesting block elements incorrectly - if (tokens.length === 1 && tokens[0].type === 'image') { - // Parse the image token directly as a block element - return helpers.parseChildren([tokens[0]]) - } - - // Parse the inline tokens - const content = helpers.parseInline(tokens) - - // Special case: if paragraph contains only   (non-breaking space), - // treat it as an empty paragraph to preserve blank lines - const hasExplicitEmptyParagraphMarker = - tokens.length === 1 && - tokens[0].type === 'text' && - (tokens[0].raw === EMPTY_PARAGRAPH_MARKDOWN || - tokens[0].text === EMPTY_PARAGRAPH_MARKDOWN || - tokens[0].raw === NBSP_CHAR || - tokens[0].text === NBSP_CHAR) - - if ( - hasExplicitEmptyParagraphMarker && - content.length === 1 && - content[0].type === 'text' && - (content[0].text === EMPTY_PARAGRAPH_MARKDOWN || content[0].text === NBSP_CHAR) - ) { - return helpers.createNode('paragraph', undefined, []) - } - - // Convert 'paragraph' token to paragraph node - return helpers.createNode('paragraph', undefined, content) - }, - - renderMarkdown: (node, h, ctx) => { - if (!node) { - return '' - } - - // Normalize content: treat undefined/null as empty array - const content = Array.isArray(node.content) ? node.content : [] - - if (content.length === 0) { - // Emit   for the second and later empty paragraphs in a consecutive - // run at the current nesting level. The first empty paragraph stays empty - // so markdown spacing is preserved naturally. - const previousContent = Array.isArray(ctx?.previousNode?.content) - ? ctx.previousNode.content - : [] - const previousNodeIsEmptyParagraph = - ctx?.previousNode?.type === 'paragraph' && previousContent.length === 0 - - return previousNodeIsEmptyParagraph ? EMPTY_PARAGRAPH_MARKDOWN : '' - } - - return h.renderChildren(content) - }, - - addCommands() { - return { - setParagraph: - () => - ({ commands }) => { - return commands.setNode(this.name) - }, - } - }, - - addKeyboardShortcuts() { - return { - 'Mod-Alt-0': () => this.editor.commands.setParagraph(), - } - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/README.md deleted file mode 100644 index 169433e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-strike - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-strike.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-strike) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-strike.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-strike.svg)](https://www.npmjs.com/package/@tiptap/extension-strike) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.cjs deleted file mode 100644 index 94004b8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.cjs +++ /dev/null @@ -1,113 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Strike: () => Strike, - default: () => index_default, - inputRegex: () => inputRegex, - pasteRegex: () => pasteRegex -}); -module.exports = __toCommonJS(index_exports); - -// src/strike.ts -var import_core = require("@tiptap/core"); -var inputRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/; -var pasteRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g; -var Strike = import_core.Mark.create({ - name: "strike", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - parseHTML() { - return [ - { - tag: "s" - }, - { - tag: "del" - }, - { - tag: "strike" - }, - { - style: "text-decoration", - consuming: false, - getAttrs: (style) => style.includes("line-through") ? {} : false - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["s", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "del", - parseMarkdown: (token, helpers) => { - return helpers.applyMark("strike", helpers.parseInline(token.tokens || [])); - }, - renderMarkdown: (node, h) => { - return `~~${h.renderChildren(node)}~~`; - }, - addCommands() { - return { - setStrike: () => ({ commands }) => { - return commands.setMark(this.name); - }, - toggleStrike: () => ({ commands }) => { - return commands.toggleMark(this.name); - }, - unsetStrike: () => ({ commands }) => { - return commands.unsetMark(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-s": () => this.editor.commands.toggleStrike() - }; - }, - addInputRules() { - return [ - (0, import_core.markInputRule)({ - find: inputRegex, - type: this.type - }) - ]; - }, - addPasteRules() { - return [ - (0, import_core.markPasteRule)({ - find: pasteRegex, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = Strike; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Strike, - inputRegex, - pasteRegex -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.cjs.map deleted file mode 100644 index 2154e54..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/strike.ts"],"sourcesContent":["import { Strike } from './strike.js'\n\nexport * from './strike.js'\n\nexport default Strike\n","import { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core'\n\nexport interface StrikeOptions {\n /**\n * HTML attributes to add to the strike element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n strike: {\n /**\n * Set a strike mark\n * @example editor.commands.setStrike()\n */\n setStrike: () => ReturnType\n /**\n * Toggle a strike mark\n * @example editor.commands.toggleStrike()\n */\n toggleStrike: () => ReturnType\n /**\n * Unset a strike mark\n * @example editor.commands.unsetStrike()\n */\n unsetStrike: () => ReturnType\n }\n }\n}\n\n/**\n * Matches a strike to a ~~strike~~ on input.\n */\nexport const inputRegex = /(?:^|\\s)(~~(?!\\s+~~)((?:[^~]+))~~(?!\\s+~~))$/\n\n/**\n * Matches a strike to a ~~strike~~ on paste.\n */\nexport const pasteRegex = /(?:^|\\s)(~~(?!\\s+~~)((?:[^~]+))~~(?!\\s+~~))/g\n\n/**\n * This extension allows you to create strike text.\n * @see https://www.tiptap.dev/api/marks/strike\n */\nexport const Strike = Mark.create({\n name: 'strike',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 's',\n },\n {\n tag: 'del',\n },\n {\n tag: 'strike',\n },\n {\n style: 'text-decoration',\n consuming: false,\n getAttrs: style => ((style as string).includes('line-through') ? {} : false),\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['s', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'del',\n\n parseMarkdown: (token, helpers) => {\n // Convert 'del' token to strike mark\n return helpers.applyMark('strike', helpers.parseInline(token.tokens || []))\n },\n\n renderMarkdown: (node, h) => {\n return `~~${h.renderChildren(node)}~~`\n },\n\n addCommands() {\n return {\n setStrike:\n () =>\n ({ commands }) => {\n return commands.setMark(this.name)\n },\n toggleStrike:\n () =>\n ({ commands }) => {\n return commands.toggleMark(this.name)\n },\n unsetStrike:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-s': () => this.editor.commands.toggleStrike(),\n }\n },\n\n addInputRules() {\n return [\n markInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ]\n },\n\n addPasteRules() {\n return [\n markPasteRule({\n find: pasteRegex,\n type: this.type,\n }),\n ]\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAoE;AAoC7D,IAAM,aAAa;AAKnB,IAAM,aAAa;AAMnB,IAAM,SAAS,iBAAK,OAAsB;AAAA,EAC/C,MAAM;AAAA,EAEN,aA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;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,UACL,2BAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;ADjID,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.d.cts deleted file mode 100644 index b0f01bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.d.cts +++ /dev/null @@ -1,46 +0,0 @@ -import { Mark } from '@tiptap/core'; - -interface StrikeOptions { - /** - * HTML attributes to add to the strike element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - strike: { - /** - * Set a strike mark - * @example editor.commands.setStrike() - */ - setStrike: () => ReturnType; - /** - * Toggle a strike mark - * @example editor.commands.toggleStrike() - */ - toggleStrike: () => ReturnType; - /** - * Unset a strike mark - * @example editor.commands.unsetStrike() - */ - unsetStrike: () => ReturnType; - }; - } -} -/** - * Matches a strike to a ~~strike~~ on input. - */ -declare const inputRegex: RegExp; -/** - * Matches a strike to a ~~strike~~ on paste. - */ -declare const pasteRegex: RegExp; -/** - * This extension allows you to create strike text. - * @see https://www.tiptap.dev/api/marks/strike - */ -declare const Strike: Mark; - -export { Strike, type StrikeOptions, Strike as default, inputRegex, pasteRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.d.ts deleted file mode 100644 index b0f01bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Mark } from '@tiptap/core'; - -interface StrikeOptions { - /** - * HTML attributes to add to the strike element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - strike: { - /** - * Set a strike mark - * @example editor.commands.setStrike() - */ - setStrike: () => ReturnType; - /** - * Toggle a strike mark - * @example editor.commands.toggleStrike() - */ - toggleStrike: () => ReturnType; - /** - * Unset a strike mark - * @example editor.commands.unsetStrike() - */ - unsetStrike: () => ReturnType; - }; - } -} -/** - * Matches a strike to a ~~strike~~ on input. - */ -declare const inputRegex: RegExp; -/** - * Matches a strike to a ~~strike~~ on paste. - */ -declare const pasteRegex: RegExp; -/** - * This extension allows you to create strike text. - * @see https://www.tiptap.dev/api/marks/strike - */ -declare const Strike: Mark; - -export { Strike, type StrikeOptions, Strike as default, inputRegex, pasteRegex }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.js deleted file mode 100644 index b326622..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.js +++ /dev/null @@ -1,84 +0,0 @@ -// src/strike.ts -import { Mark, markInputRule, markPasteRule, mergeAttributes } from "@tiptap/core"; -var inputRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/; -var pasteRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g; -var Strike = Mark.create({ - name: "strike", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - parseHTML() { - return [ - { - tag: "s" - }, - { - tag: "del" - }, - { - tag: "strike" - }, - { - style: "text-decoration", - consuming: false, - getAttrs: (style) => style.includes("line-through") ? {} : false - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["s", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - markdownTokenName: "del", - parseMarkdown: (token, helpers) => { - return helpers.applyMark("strike", helpers.parseInline(token.tokens || [])); - }, - renderMarkdown: (node, h) => { - return `~~${h.renderChildren(node)}~~`; - }, - addCommands() { - return { - setStrike: () => ({ commands }) => { - return commands.setMark(this.name); - }, - toggleStrike: () => ({ commands }) => { - return commands.toggleMark(this.name); - }, - unsetStrike: () => ({ commands }) => { - return commands.unsetMark(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-Shift-s": () => this.editor.commands.toggleStrike() - }; - }, - addInputRules() { - return [ - markInputRule({ - find: inputRegex, - type: this.type - }) - ]; - }, - addPasteRules() { - return [ - markPasteRule({ - find: pasteRegex, - type: this.type - }) - ]; - } -}); - -// src/index.ts -var index_default = Strike; -export { - Strike, - index_default as default, - inputRegex, - pasteRegex -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.js.map deleted file mode 100644 index f137bac..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/strike.ts","../src/index.ts"],"sourcesContent":["import { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core'\n\nexport interface StrikeOptions {\n /**\n * HTML attributes to add to the strike element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n strike: {\n /**\n * Set a strike mark\n * @example editor.commands.setStrike()\n */\n setStrike: () => ReturnType\n /**\n * Toggle a strike mark\n * @example editor.commands.toggleStrike()\n */\n toggleStrike: () => ReturnType\n /**\n * Unset a strike mark\n * @example editor.commands.unsetStrike()\n */\n unsetStrike: () => ReturnType\n }\n }\n}\n\n/**\n * Matches a strike to a ~~strike~~ on input.\n */\nexport const inputRegex = /(?:^|\\s)(~~(?!\\s+~~)((?:[^~]+))~~(?!\\s+~~))$/\n\n/**\n * Matches a strike to a ~~strike~~ on paste.\n */\nexport const pasteRegex = /(?:^|\\s)(~~(?!\\s+~~)((?:[^~]+))~~(?!\\s+~~))/g\n\n/**\n * This extension allows you to create strike text.\n * @see https://www.tiptap.dev/api/marks/strike\n */\nexport const Strike = Mark.create({\n name: 'strike',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 's',\n },\n {\n tag: 'del',\n },\n {\n tag: 'strike',\n },\n {\n style: 'text-decoration',\n consuming: false,\n getAttrs: style => ((style as string).includes('line-through') ? {} : false),\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['s', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n markdownTokenName: 'del',\n\n parseMarkdown: (token, helpers) => {\n // Convert 'del' token to strike mark\n return helpers.applyMark('strike', helpers.parseInline(token.tokens || []))\n },\n\n renderMarkdown: (node, h) => {\n return `~~${h.renderChildren(node)}~~`\n },\n\n addCommands() {\n return {\n setStrike:\n () =>\n ({ commands }) => {\n return commands.setMark(this.name)\n },\n toggleStrike:\n () =>\n ({ commands }) => {\n return commands.toggleMark(this.name)\n },\n unsetStrike:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-s': () => this.editor.commands.toggleStrike(),\n }\n },\n\n addInputRules() {\n return [\n markInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ]\n },\n\n addPasteRules() {\n return [\n markPasteRule({\n find: pasteRegex,\n type: this.type,\n }),\n ]\n },\n})\n","import { Strike } from './strike.js'\n\nexport * from './strike.js'\n\nexport default Strike\n"],"mappings":";AAAA,SAAS,MAAM,eAAe,eAAe,uBAAuB;AAoC7D,IAAM,aAAa;AAKnB,IAAM,aAAa;AAMnB,IAAM,SAAS,KAAK,OAAsB;AAAA,EAC/C,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,YAAY;AACV,WAAO;AAAA,MACL;AAAA,QACE,KAAK;AAAA,MACP;AAAA,MACA;AAAA,QACE,KAAK;AAAA,MACP;AAAA,MACA;AAAA,QACE,KAAK;AAAA,MACP;AAAA,MACA;AAAA,QACE,OAAO;AAAA,QACP,WAAW;AAAA,QACX,UAAU,WAAW,MAAiB,SAAS,cAAc,IAAI,CAAC,IAAI;AAAA,MACxE;AAAA,IACF;AAAA,EACF;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO,CAAC,KAAK,gBAAgB,KAAK,QAAQ,gBAAgB,cAAc,GAAG,CAAC;AAAA,EAC9E;AAAA,EAEA,mBAAmB;AAAA,EAEnB,eAAe,CAAC,OAAO,YAAY;AAEjC,WAAO,QAAQ,UAAU,UAAU,QAAQ,YAAY,MAAM,UAAU,CAAC,CAAC,CAAC;AAAA,EAC5E;AAAA,EAEA,gBAAgB,CAAC,MAAM,MAAM;AAC3B,WAAO,KAAK,EAAE,eAAe,IAAI,CAAC;AAAA,EACpC;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,WACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,QAAQ,KAAK,IAAI;AAAA,MACnC;AAAA,MACF,cACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,WAAW,KAAK,IAAI;AAAA,MACtC;AAAA,MACF,aACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,UAAU,KAAK,IAAI;AAAA,MACrC;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,eAAe,MAAM,KAAK,OAAO,SAAS,aAAa;AAAA,IACzD;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,MACL,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,gBAAgB;AACd,WAAO;AAAA,MACL,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;ACjID,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/package.json deleted file mode 100644 index 7da9681..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-strike", - "version": "3.26.0", - "description": "strike extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-strike" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/src/index.ts deleted file mode 100644 index 377a83a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Strike } from './strike.js' - -export * from './strike.js' - -export default Strike diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/src/strike.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/src/strike.ts deleted file mode 100644 index 846e45d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike/src/strike.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core' - -export interface StrikeOptions { - /** - * HTML attributes to add to the strike element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record -} - -declare module '@tiptap/core' { - interface Commands { - strike: { - /** - * Set a strike mark - * @example editor.commands.setStrike() - */ - setStrike: () => ReturnType - /** - * Toggle a strike mark - * @example editor.commands.toggleStrike() - */ - toggleStrike: () => ReturnType - /** - * Unset a strike mark - * @example editor.commands.unsetStrike() - */ - unsetStrike: () => ReturnType - } - } -} - -/** - * Matches a strike to a ~~strike~~ on input. - */ -export const inputRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/ - -/** - * Matches a strike to a ~~strike~~ on paste. - */ -export const pasteRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g - -/** - * This extension allows you to create strike text. - * @see https://www.tiptap.dev/api/marks/strike - */ -export const Strike = Mark.create({ - name: 'strike', - - addOptions() { - return { - HTMLAttributes: {}, - } - }, - - parseHTML() { - return [ - { - tag: 's', - }, - { - tag: 'del', - }, - { - tag: 'strike', - }, - { - style: 'text-decoration', - consuming: false, - getAttrs: style => ((style as string).includes('line-through') ? {} : false), - }, - ] - }, - - renderHTML({ HTMLAttributes }) { - return ['s', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] - }, - - markdownTokenName: 'del', - - parseMarkdown: (token, helpers) => { - // Convert 'del' token to strike mark - return helpers.applyMark('strike', helpers.parseInline(token.tokens || [])) - }, - - renderMarkdown: (node, h) => { - return `~~${h.renderChildren(node)}~~` - }, - - addCommands() { - return { - setStrike: - () => - ({ commands }) => { - return commands.setMark(this.name) - }, - toggleStrike: - () => - ({ commands }) => { - return commands.toggleMark(this.name) - }, - unsetStrike: - () => - ({ commands }) => { - return commands.unsetMark(this.name) - }, - } - }, - - addKeyboardShortcuts() { - return { - 'Mod-Shift-s': () => this.editor.commands.toggleStrike(), - } - }, - - addInputRules() { - return [ - markInputRule({ - find: inputRegex, - type: this.type, - }), - ] - }, - - addPasteRules() { - return [ - markPasteRule({ - find: pasteRegex, - type: this.type, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/README.md deleted file mode 100644 index 5e716aa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-text - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-text.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-text) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-text.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-text.svg)](https://www.npmjs.com/package/@tiptap/extension-text) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.cjs deleted file mode 100644 index f41a989..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.cjs +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Text: () => Text, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); - -// src/text.ts -var import_core = require("@tiptap/core"); -var Text = import_core.Node.create({ - name: "text", - group: "inline", - parseMarkdown: (token) => { - return { - type: "text", - text: token.text || "" - }; - }, - renderMarkdown: (node) => node.text || "" -}); - -// src/index.ts -var index_default = Text; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Text -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.cjs.map deleted file mode 100644 index fe393d6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/text.ts"],"sourcesContent":["import { Text } from './text.js'\n\nexport * from './text.js'\n\nexport default Text\n","import { Node } from '@tiptap/core'\n\n/**\n * This extension allows you to create text nodes.\n * @see https://www.tiptap.dev/api/nodes/text\n */\nexport const Text = Node.create({\n name: 'text',\n group: 'inline',\n\n parseMarkdown: token => {\n // Convert 'text' token to text node - text nodes are special as they store text directly\n return {\n type: 'text',\n text: token.text || '',\n }\n },\n\n renderMarkdown: node => node.text || '',\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAqB;AAMd,IAAM,OAAO,iBAAK,OAAO;AAAA,EAC9B,MAAM;AAAA,EACN,OAAO;AAAA,EAEP,eAAe,WAAS;AAEtB,WAAO;AAAA,MACL,MAAM;AAAA,MACN,MAAM,MAAM,QAAQ;AAAA,IACtB;AAAA,EACF;AAAA,EAEA,gBAAgB,UAAQ,KAAK,QAAQ;AACvC,CAAC;;;ADfD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.d.cts deleted file mode 100644 index 07f1a2d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.d.cts +++ /dev/null @@ -1,9 +0,0 @@ -import { Node } from '@tiptap/core'; - -/** - * This extension allows you to create text nodes. - * @see https://www.tiptap.dev/api/nodes/text - */ -declare const Text: Node; - -export { Text, Text as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.d.ts deleted file mode 100644 index 07f1a2d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Node } from '@tiptap/core'; - -/** - * This extension allows you to create text nodes. - * @see https://www.tiptap.dev/api/nodes/text - */ -declare const Text: Node; - -export { Text, Text as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.js deleted file mode 100644 index 0b7e59a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.js +++ /dev/null @@ -1,21 +0,0 @@ -// src/text.ts -import { Node } from "@tiptap/core"; -var Text = Node.create({ - name: "text", - group: "inline", - parseMarkdown: (token) => { - return { - type: "text", - text: token.text || "" - }; - }, - renderMarkdown: (node) => node.text || "" -}); - -// src/index.ts -var index_default = Text; -export { - Text, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.js.map deleted file mode 100644 index fa3adf3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/text.ts","../src/index.ts"],"sourcesContent":["import { Node } from '@tiptap/core'\n\n/**\n * This extension allows you to create text nodes.\n * @see https://www.tiptap.dev/api/nodes/text\n */\nexport const Text = Node.create({\n name: 'text',\n group: 'inline',\n\n parseMarkdown: token => {\n // Convert 'text' token to text node - text nodes are special as they store text directly\n return {\n type: 'text',\n text: token.text || '',\n }\n },\n\n renderMarkdown: node => node.text || '',\n})\n","import { Text } from './text.js'\n\nexport * from './text.js'\n\nexport default Text\n"],"mappings":";AAAA,SAAS,YAAY;AAMd,IAAM,OAAO,KAAK,OAAO;AAAA,EAC9B,MAAM;AAAA,EACN,OAAO;AAAA,EAEP,eAAe,WAAS;AAEtB,WAAO;AAAA,MACL,MAAM;AAAA,MACN,MAAM,MAAM,QAAQ;AAAA,IACtB;AAAA,EACF;AAAA,EAEA,gBAAgB,UAAQ,KAAK,QAAQ;AACvC,CAAC;;;ACfD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/package.json deleted file mode 100644 index 3c543b5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-text", - "version": "3.26.0", - "description": "text extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-text" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/src/index.ts deleted file mode 100644 index c1a4680..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Text } from './text.js' - -export * from './text.js' - -export default Text diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/src/text.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/src/text.ts deleted file mode 100644 index e67f73f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text/src/text.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Node } from '@tiptap/core' - -/** - * This extension allows you to create text nodes. - * @see https://www.tiptap.dev/api/nodes/text - */ -export const Text = Node.create({ - name: 'text', - group: 'inline', - - parseMarkdown: token => { - // Convert 'text' token to text node - text nodes are special as they store text directly - return { - type: 'text', - text: token.text || '', - } - }, - - renderMarkdown: node => node.text || '', -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/README.md deleted file mode 100644 index cb79675..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extension-underline - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-underline.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-underline) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-underline.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-underline.svg)](https://www.npmjs.com/package/@tiptap/extension-underline) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.cjs deleted file mode 100644 index 6648365..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.cjs +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Underline: () => Underline, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); - -// src/underline.ts -var import_core = require("@tiptap/core"); -var Underline = import_core.Mark.create({ - name: "underline", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - parseHTML() { - return [ - { - tag: "u" - }, - { - style: "text-decoration", - consuming: false, - getAttrs: (style) => style.includes("underline") ? {} : false - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["u", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - parseMarkdown(token, helpers) { - return helpers.applyMark(this.name || "underline", helpers.parseInline(token.tokens || [])); - }, - renderMarkdown(node, helpers) { - return `++${helpers.renderChildren(node)}++`; - }, - markdownTokenizer: { - name: "underline", - level: "inline", - start(src) { - return src.indexOf("++"); - }, - tokenize(src, _tokens, lexer) { - const rule = /^(\+\+)([\s\S]+?)(\+\+)/; - const match = rule.exec(src); - if (!match) { - return void 0; - } - const innerContent = match[2].trim(); - return { - type: "underline", - raw: match[0], - text: innerContent, - tokens: lexer.inlineTokens(innerContent) - }; - } - }, - addCommands() { - return { - setUnderline: () => ({ commands }) => { - return commands.setMark(this.name); - }, - toggleUnderline: () => ({ commands }) => { - return commands.toggleMark(this.name); - }, - unsetUnderline: () => ({ commands }) => { - return commands.unsetMark(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-u": () => this.editor.commands.toggleUnderline(), - "Mod-U": () => this.editor.commands.toggleUnderline() - }; - } -}); - -// src/index.ts -var index_default = Underline; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Underline -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.cjs.map deleted file mode 100644 index 30bed3c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/underline.ts"],"sourcesContent":["import { Underline } from './underline.js'\n\nexport * from './underline.js'\n\nexport default Underline\n","import { Mark, mergeAttributes } from '@tiptap/core'\n\nexport interface UnderlineOptions {\n /**\n * HTML attributes to add to the underline element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n underline: {\n /**\n * Set an underline mark\n * @example editor.commands.setUnderline()\n */\n setUnderline: () => ReturnType\n /**\n * Toggle an underline mark\n * @example editor.commands.toggleUnderline()\n */\n toggleUnderline: () => ReturnType\n /**\n * Unset an underline mark\n * @example editor.commands.unsetUnderline()\n */\n unsetUnderline: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to create underline text.\n * @see https://www.tiptap.dev/api/marks/underline\n */\nexport const Underline = Mark.create({\n name: 'underline',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'u',\n },\n {\n style: 'text-decoration',\n consuming: false,\n getAttrs: style => ((style as string).includes('underline') ? {} : false),\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['u', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n parseMarkdown(token, helpers) {\n return helpers.applyMark(this.name || 'underline', helpers.parseInline(token.tokens || []))\n },\n\n renderMarkdown(node, helpers) {\n return `++${helpers.renderChildren(node)}++`\n },\n\n markdownTokenizer: {\n name: 'underline',\n level: 'inline',\n start(src) {\n return src.indexOf('++')\n },\n tokenize(src, _tokens, lexer) {\n const rule = /^(\\+\\+)([\\s\\S]+?)(\\+\\+)/\n const match = rule.exec(src)\n\n if (!match) {\n return undefined\n }\n\n const innerContent = match[2].trim()\n\n return {\n type: 'underline',\n raw: match[0],\n text: innerContent,\n tokens: lexer.inlineTokens(innerContent),\n }\n },\n },\n\n addCommands() {\n return {\n setUnderline:\n () =>\n ({ commands }) => {\n return commands.setMark(this.name)\n },\n toggleUnderline:\n () =>\n ({ commands }) => {\n return commands.toggleMark(this.name)\n },\n unsetUnderline:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-u': () => this.editor.commands.toggleUnderline(),\n 'Mod-U': () => this.editor.commands.toggleUnderline(),\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAsC;AAqC/B,IAAM,YAAY,iBAAK,OAAyB;AAAA,EACrD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,gBAAgB,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,YAAY;AACV,WAAO;AAAA,MACL;AAAA,QACE,KAAK;AAAA,MACP;AAAA,MACA;AAAA,QACE,OAAO;AAAA,QACP,WAAW;AAAA,QACX,UAAU,WAAW,MAAiB,SAAS,WAAW,IAAI,CAAC,IAAI;AAAA,MACrE;AAAA,IACF;AAAA,EACF;AAAA,EAEA,WAAW,EAAE,eAAe,GAAG;AAC7B,WAAO,CAAC,SAAK,6BAAgB,KAAK,QAAQ,gBAAg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\ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.d.cts deleted file mode 100644 index 0af9159..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.d.cts +++ /dev/null @@ -1,38 +0,0 @@ -import { Mark } from '@tiptap/core'; - -interface UnderlineOptions { - /** - * HTML attributes to add to the underline element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - underline: { - /** - * Set an underline mark - * @example editor.commands.setUnderline() - */ - setUnderline: () => ReturnType; - /** - * Toggle an underline mark - * @example editor.commands.toggleUnderline() - */ - toggleUnderline: () => ReturnType; - /** - * Unset an underline mark - * @example editor.commands.unsetUnderline() - */ - unsetUnderline: () => ReturnType; - }; - } -} -/** - * This extension allows you to create underline text. - * @see https://www.tiptap.dev/api/marks/underline - */ -declare const Underline: Mark; - -export { Underline, type UnderlineOptions, Underline as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.d.ts deleted file mode 100644 index 0af9159..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Mark } from '@tiptap/core'; - -interface UnderlineOptions { - /** - * HTML attributes to add to the underline element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record; -} -declare module '@tiptap/core' { - interface Commands { - underline: { - /** - * Set an underline mark - * @example editor.commands.setUnderline() - */ - setUnderline: () => ReturnType; - /** - * Toggle an underline mark - * @example editor.commands.toggleUnderline() - */ - toggleUnderline: () => ReturnType; - /** - * Unset an underline mark - * @example editor.commands.unsetUnderline() - */ - unsetUnderline: () => ReturnType; - }; - } -} -/** - * This extension allows you to create underline text. - * @see https://www.tiptap.dev/api/marks/underline - */ -declare const Underline: Mark; - -export { Underline, type UnderlineOptions, Underline as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.js deleted file mode 100644 index 4a0aaf0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.js +++ /dev/null @@ -1,79 +0,0 @@ -// src/underline.ts -import { Mark, mergeAttributes } from "@tiptap/core"; -var Underline = Mark.create({ - name: "underline", - addOptions() { - return { - HTMLAttributes: {} - }; - }, - parseHTML() { - return [ - { - tag: "u" - }, - { - style: "text-decoration", - consuming: false, - getAttrs: (style) => style.includes("underline") ? {} : false - } - ]; - }, - renderHTML({ HTMLAttributes }) { - return ["u", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; - }, - parseMarkdown(token, helpers) { - return helpers.applyMark(this.name || "underline", helpers.parseInline(token.tokens || [])); - }, - renderMarkdown(node, helpers) { - return `++${helpers.renderChildren(node)}++`; - }, - markdownTokenizer: { - name: "underline", - level: "inline", - start(src) { - return src.indexOf("++"); - }, - tokenize(src, _tokens, lexer) { - const rule = /^(\+\+)([\s\S]+?)(\+\+)/; - const match = rule.exec(src); - if (!match) { - return void 0; - } - const innerContent = match[2].trim(); - return { - type: "underline", - raw: match[0], - text: innerContent, - tokens: lexer.inlineTokens(innerContent) - }; - } - }, - addCommands() { - return { - setUnderline: () => ({ commands }) => { - return commands.setMark(this.name); - }, - toggleUnderline: () => ({ commands }) => { - return commands.toggleMark(this.name); - }, - unsetUnderline: () => ({ commands }) => { - return commands.unsetMark(this.name); - } - }; - }, - addKeyboardShortcuts() { - return { - "Mod-u": () => this.editor.commands.toggleUnderline(), - "Mod-U": () => this.editor.commands.toggleUnderline() - }; - } -}); - -// src/index.ts -var index_default = Underline; -export { - Underline, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.js.map deleted file mode 100644 index 2b622ff..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/underline.ts","../src/index.ts"],"sourcesContent":["import { Mark, mergeAttributes } from '@tiptap/core'\n\nexport interface UnderlineOptions {\n /**\n * HTML attributes to add to the underline element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n underline: {\n /**\n * Set an underline mark\n * @example editor.commands.setUnderline()\n */\n setUnderline: () => ReturnType\n /**\n * Toggle an underline mark\n * @example editor.commands.toggleUnderline()\n */\n toggleUnderline: () => ReturnType\n /**\n * Unset an underline mark\n * @example editor.commands.unsetUnderline()\n */\n unsetUnderline: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to create underline text.\n * @see https://www.tiptap.dev/api/marks/underline\n */\nexport const Underline = Mark.create({\n name: 'underline',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'u',\n },\n {\n style: 'text-decoration',\n consuming: false,\n getAttrs: style => ((style as string).includes('underline') ? {} : false),\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['u', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n parseMarkdown(token, helpers) {\n return helpers.applyMark(this.name || 'underline', helpers.parseInline(token.tokens || []))\n },\n\n renderMarkdown(node, helpers) {\n return `++${helpers.renderChildren(node)}++`\n },\n\n markdownTokenizer: {\n name: 'underline',\n level: 'inline',\n start(src) {\n return src.indexOf('++')\n },\n tokenize(src, _tokens, lexer) {\n const rule = /^(\\+\\+)([\\s\\S]+?)(\\+\\+)/\n const match = rule.exec(src)\n\n if (!match) {\n return undefined\n }\n\n const innerContent = match[2].trim()\n\n return {\n type: 'underline',\n raw: match[0],\n text: innerContent,\n tokens: lexer.inlineTokens(innerContent),\n }\n },\n },\n\n addCommands() {\n return {\n setUnderline:\n () =>\n ({ commands }) => {\n return commands.setMark(this.name)\n },\n toggleUnderline:\n () =>\n ({ commands }) => {\n return commands.toggleMark(this.name)\n },\n unsetUnderline:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-u': () => this.editor.commands.toggleUnderline(),\n 'Mod-U': () => this.editor.commands.toggleUnderline(),\n }\n },\n})\n","import { Underline } from './underline.js'\n\nexport * from './underline.js'\n\nexport default Underline\n"],"mappings":";AAAA,SAAS,MAAM,uBAAuB;AAqC/B,IAAM,YAAY,KAAK,OAAyB;AA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,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,WAAW,KAAK,IAAI;AAAA,MACtC;AAAA,MACF,gBACE,MACA,CAAC,EAAE,SAAS,MAAM;AAChB,eAAO,SAAS,UAAU,KAAK,IAAI;AAAA,MACrC;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,SAAS,MAAM,KAAK,OAAO,SAAS,gBAAgB;AAAA,MACpD,SAAS,MAAM,KAAK,OAAO,SAAS,gBAAgB;AAAA,IACtD;AAAA,EACF;AACF,CAAC;;;ACtHD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/package.json deleted file mode 100644 index 38a796a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@tiptap/extension-underline", - "version": "3.26.0", - "description": "underline extension for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-underline" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "devDependencies": { - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/src/index.ts deleted file mode 100644 index af593a0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Underline } from './underline.js' - -export * from './underline.js' - -export default Underline diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/src/underline.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/src/underline.ts deleted file mode 100644 index d9b5513..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline/src/underline.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { Mark, mergeAttributes } from '@tiptap/core' - -export interface UnderlineOptions { - /** - * HTML attributes to add to the underline element. - * @default {} - * @example { class: 'foo' } - */ - HTMLAttributes: Record -} - -declare module '@tiptap/core' { - interface Commands { - underline: { - /** - * Set an underline mark - * @example editor.commands.setUnderline() - */ - setUnderline: () => ReturnType - /** - * Toggle an underline mark - * @example editor.commands.toggleUnderline() - */ - toggleUnderline: () => ReturnType - /** - * Unset an underline mark - * @example editor.commands.unsetUnderline() - */ - unsetUnderline: () => ReturnType - } - } -} - -/** - * This extension allows you to create underline text. - * @see https://www.tiptap.dev/api/marks/underline - */ -export const Underline = Mark.create({ - name: 'underline', - - addOptions() { - return { - HTMLAttributes: {}, - } - }, - - parseHTML() { - return [ - { - tag: 'u', - }, - { - style: 'text-decoration', - consuming: false, - getAttrs: style => ((style as string).includes('underline') ? {} : false), - }, - ] - }, - - renderHTML({ HTMLAttributes }) { - return ['u', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] - }, - - parseMarkdown(token, helpers) { - return helpers.applyMark(this.name || 'underline', helpers.parseInline(token.tokens || [])) - }, - - renderMarkdown(node, helpers) { - return `++${helpers.renderChildren(node)}++` - }, - - markdownTokenizer: { - name: 'underline', - level: 'inline', - start(src) { - return src.indexOf('++') - }, - tokenize(src, _tokens, lexer) { - const rule = /^(\+\+)([\s\S]+?)(\+\+)/ - const match = rule.exec(src) - - if (!match) { - return undefined - } - - const innerContent = match[2].trim() - - return { - type: 'underline', - raw: match[0], - text: innerContent, - tokens: lexer.inlineTokens(innerContent), - } - }, - }, - - addCommands() { - return { - setUnderline: - () => - ({ commands }) => { - return commands.setMark(this.name) - }, - toggleUnderline: - () => - ({ commands }) => { - return commands.toggleMark(this.name) - }, - unsetUnderline: - () => - ({ commands }) => { - return commands.unsetMark(this.name) - }, - } - }, - - addKeyboardShortcuts() { - return { - 'Mod-u': () => this.editor.commands.toggleUnderline(), - 'Mod-U': () => this.editor.commands.toggleUnderline(), - } - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/README.md deleted file mode 100644 index 4d9ec27..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/extensions - -[![Version](https://img.shields.io/npm/v/@tiptap/extension-focus.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-focus) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-focus.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/extension-focus.svg)](https://www.npmjs.com/package/@tiptap/extension-focus) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.cjs deleted file mode 100644 index 5596c43..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.cjs +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/character-count/index.ts -var index_exports = {}; -__export(index_exports, { - CharacterCount: () => CharacterCount -}); -module.exports = __toCommonJS(index_exports); - -// src/character-count/character-count.ts -var import_core = require("@tiptap/core"); -var import_state = require("@tiptap/pm/state"); -var CharacterCount = import_core.Extension.create({ - name: "characterCount", - addOptions() { - return { - limit: null, - autoTrim: true, - mode: "textSize", - textCounter: (text) => text.length, - wordCounter: (text) => text.split(" ").filter((word) => word !== "").length - }; - }, - addStorage() { - return { - characters: () => 0, - words: () => 0 - }; - }, - onBeforeCreate() { - this.storage.characters = (options) => { - const node = (options == null ? void 0 : options.node) || this.editor.state.doc; - const mode = (options == null ? void 0 : options.mode) || this.options.mode; - if (mode === "textSize") { - const text = node.textBetween(0, node.content.size, void 0, " "); - return this.options.textCounter(text); - } - return node.nodeSize; - }; - this.storage.words = (options) => { - const node = (options == null ? void 0 : options.node) || this.editor.state.doc; - const text = node.textBetween(0, node.content.size, " ", " "); - return this.options.wordCounter(text); - }; - }, - addProseMirrorPlugins() { - let initialEvaluationDone = false; - return [ - new import_state.Plugin({ - key: new import_state.PluginKey("characterCount"), - appendTransaction: (transactions, oldState, newState) => { - if (initialEvaluationDone) { - return; - } - const limit = this.options.limit; - const autoTrim = this.options.autoTrim; - if (limit === null || limit === void 0 || limit === 0 || autoTrim === false) { - initialEvaluationDone = true; - return; - } - const initialContentSize = this.storage.characters({ node: newState.doc }); - if (initialContentSize > limit) { - const over = initialContentSize - limit; - const from = 0; - const to = over; - console.warn( - `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.` - ); - const tr = newState.tr.deleteRange(from, to); - initialEvaluationDone = true; - return tr; - } - initialEvaluationDone = true; - }, - filterTransaction: (transaction, state) => { - const limit = this.options.limit; - if (!transaction.docChanged || limit === 0 || limit === null || limit === void 0) { - return true; - } - const oldSize = this.storage.characters({ node: state.doc }); - const newSize = this.storage.characters({ node: transaction.doc }); - if (newSize <= limit) { - return true; - } - if (oldSize > limit && newSize > limit && newSize <= oldSize) { - return true; - } - if (oldSize > limit && newSize > limit && newSize > oldSize) { - return false; - } - const isPaste = transaction.getMeta("paste"); - if (!isPaste) { - return false; - } - const pos = transaction.selection.$head.pos; - const over = newSize - limit; - const from = pos - over; - const to = pos; - transaction.deleteRange(from, to); - const updatedSize = this.storage.characters({ node: transaction.doc }); - if (updatedSize > limit) { - return false; - } - return true; - } - }) - ]; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - CharacterCount -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.cjs.map deleted file mode 100644 index bf3ef35..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/character-count/index.ts","../../src/character-count/character-count.ts"],"sourcesContent":["export * from './character-count.js'\n","import { Extension } from '@tiptap/core'\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\nexport interface CharacterCountOptions {\n /**\n * The maximum number of characters that should be allowed. Defaults to `0`.\n * @default null\n * @example 180\n */\n limit: number | null | undefined\n /**\n * The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used.\n * If set to `nodeSize`, the nodeSize of the document is used.\n * @default 'textSize'\n * @example 'textSize'\n */\n mode: 'textSize' | 'nodeSize'\n /**\n * Sets whether the content will be automatically trimmed when programatically setting content over the limit.\n * If set to false, the user will be able to trim the text manually.\n * @default true\n * @example false\n */\n autoTrim?: boolean\n /**\n * The text counter function to use. Defaults to a simple character count.\n * @default (text) => text.length\n * @example (text) => [...new Intl.Segmenter().segment(text)].length\n */\n textCounter: (text: string) => number\n /**\n * The word counter function to use. Defaults to a simple word count.\n * @default (text) => text.split(' ').filter(word => word !== '').length\n * @example (text) => text.split(/\\s+/).filter(word => word !== '').length\n */\n wordCounter: (text: string) => number\n}\n\nexport interface CharacterCountStorage {\n /**\n * Get the number of characters for the current document.\n * @param options The options for the character count. (optional)\n * @param options.node The node to get the characters from. Defaults to the current document.\n * @param options.mode The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used.\n */\n characters: (options?: { node?: ProseMirrorNode; mode?: 'textSize' | 'nodeSize' }) => number\n\n /**\n * Get the number of words for the current document.\n * @param options The options for the character count. (optional)\n * @param options.node The node to get the words from. Defaults to the current document.\n */\n words: (options?: { node?: ProseMirrorNode }) => number\n}\n\ndeclare module '@tiptap/core' {\n interface Storage {\n characterCount: CharacterCountStorage\n }\n}\n\n/**\n * This extension allows you to count the characters and words of your document.\n * @see https://tiptap.dev/api/extensions/character-count\n */\nexport const CharacterCount = Extension.create({\n name: 'characterCount',\n\n addOptions() {\n return {\n limit: null,\n autoTrim: true,\n mode: 'textSize',\n textCounter: text => text.length,\n wordCounter: text => text.split(' ').filter(word => word !== '').length,\n }\n },\n\n addStorage() {\n return {\n characters: () => 0,\n words: () => 0,\n }\n },\n\n onBeforeCreate() {\n this.storage.characters = options => {\n const node = options?.node || this.editor.state.doc\n const mode = options?.mode || this.options.mode\n\n if (mode === 'textSize') {\n const text = node.textBetween(0, node.content.size, undefined, ' ')\n\n return this.options.textCounter(text)\n }\n\n return node.nodeSize\n }\n\n this.storage.words = options => {\n const node = options?.node || this.editor.state.doc\n const text = node.textBetween(0, node.content.size, ' ', ' ')\n\n return this.options.wordCounter(text)\n }\n },\n\n addProseMirrorPlugins() {\n let initialEvaluationDone = false\n\n return [\n new Plugin({\n key: new PluginKey('characterCount'),\n appendTransaction: (transactions, oldState, newState) => {\n if (initialEvaluationDone) {\n return\n }\n\n const limit = this.options.limit\n const autoTrim = this.options.autoTrim\n\n if (limit === null || limit === undefined || limit === 0 || autoTrim === false) {\n initialEvaluationDone = true\n return\n }\n\n const initialContentSize = this.storage.characters({ node: newState.doc })\n\n if (initialContentSize > limit) {\n const over = initialContentSize - limit\n const from = 0\n const to = over\n\n console.warn(\n `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`,\n )\n const tr = newState.tr.deleteRange(from, to)\n initialEvaluationDone = true\n return tr\n }\n\n initialEvaluationDone = true\n },\n filterTransaction: (transaction, state) => {\n const limit = this.options.limit\n\n // Nothing has changed or no limit is defined. Ignore it.\n if (!transaction.docChanged || limit === 0 || limit === null || limit === undefined) {\n return true\n }\n\n const oldSize = this.storage.characters({ node: state.doc })\n const newSize = this.storage.characters({ node: transaction.doc })\n\n // Everything is in the limit. Good.\n if (newSize <= limit) {\n return true\n }\n\n // The limit has already been exceeded but will be reduced.\n if (oldSize > limit && newSize > limit && newSize <= oldSize) {\n return true\n }\n\n // The limit has already been exceeded and will be increased further.\n if (oldSize > limit && newSize > limit && newSize > oldSize) {\n return false\n }\n\n const isPaste = transaction.getMeta('paste')\n\n // Block all exceeding transactions that were not pasted.\n if (!isPaste) {\n return false\n }\n\n // For pasted content, we try to remove the exceeding content.\n const pos = transaction.selection.$head.pos\n const over = newSize - limit\n const from = pos - over\n const to = pos\n\n // It’s probably a bad idea to mutate transactions within `filterTransaction`\n // but for now this is working fine.\n transaction.deleteRange(from, to)\n\n // In some situations, the limit will continue to be exceeded after trimming.\n // This happens e.g. when truncating within a complex node (e.g. table)\n // and ProseMirror has to close this node again.\n // If this is the case, we prevent the transaction completely.\n const updatedSize = this.storage.characters({ node: transaction.doc })\n\n if (updatedSize > limit) {\n return false\n }\n\n return true\n },\n }),\n ]\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA0B;AAE1B,mBAAkC;AAgE3B,IAAM,iBAAiB,sBAAU,OAAqD;AAAA,EAC3F,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,MAAM;AAAA,MACN,aAAa,UAAQ,KAAK;AAAA,MAC1B,aAAa,UAAQ,KAAK,MAAM,GAAG,EAAE,OAAO,UAAQ,SAAS,EAAE,EAAE;AAAA,IACnE;AAAA,EACF;AAAA,EAEA,aAAa;AACX,WAAO;AAAA,MACL,YAAY,MAAM;AAAA,MAClB,OAAO,MAAM;AAAA,IACf;AAAA,EACF;AAAA,EAEA,iBAAiB;AACf,SAAK,QAAQ,aAAa,aAAW;AACnC,YAAM,QAAO,mCAAS,SAAQ,KAAK,OAAO,MAAM;AAChD,YAAM,QAAO,mCAAS,SAAQ,KAAK,QAAQ;AAE3C,UAAI,SAAS,YAAY;AACvB,cAAM,OAAO,KAAK,YAAY,GAAG,KAAK,QAAQ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CAAC;AAC3D,gBAAM,UAAU,KAAK,QAAQ,WAAW,EAAE,MAAM,YAAY,IAAI,CAAC;AAGjE,cAAI,WAAW,OAAO;AACpB,mBAAO;AAAA,UACT;AAGA,cAAI,UAAU,SAAS,UAAU,SAAS,WAAW,SAAS;AAC5D,mBAAO;AAAA,UACT;AAGA,cAAI,UAAU,SAAS,UAAU,SAAS,UAAU,SAAS;AAC3D,mBAAO;AAAA,UACT;AAEA,gBAAM,UAAU,YAAY,QAAQ,OAAO;AAG3C,cAAI,CAAC,SAAS;AACZ,mBAAO;AAAA,UACT;AAGA,gBAAM,MAAM,YAAY,UAAU,MAAM;AACxC,gBAAM,OAAO,UAAU;AACvB,gBAAM,OAAO,MAAM;AACnB,gBAAM,KAAK;AAIX,sBAAY,YAAY,MAAM,EAAE;AAMhC,gBAAM,cAAc,KAAK,QAAQ,WAAW,EAAE,MAAM,YAAY,IAAI,CAAC;AAErE,cAAI,cAAc,OAAO;AACvB,mBAAO;AAAA,UACT;AAEA,iBAAO;AAAA,QACT;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.d.cts deleted file mode 100644 index 7360567..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.d.cts +++ /dev/null @@ -1,69 +0,0 @@ -import { Extension } from '@tiptap/core'; -import { Node } from '@tiptap/pm/model'; - -interface CharacterCountOptions { - /** - * The maximum number of characters that should be allowed. Defaults to `0`. - * @default null - * @example 180 - */ - limit: number | null | undefined; - /** - * The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used. - * If set to `nodeSize`, the nodeSize of the document is used. - * @default 'textSize' - * @example 'textSize' - */ - mode: 'textSize' | 'nodeSize'; - /** - * Sets whether the content will be automatically trimmed when programatically setting content over the limit. - * If set to false, the user will be able to trim the text manually. - * @default true - * @example false - */ - autoTrim?: boolean; - /** - * The text counter function to use. Defaults to a simple character count. - * @default (text) => text.length - * @example (text) => [...new Intl.Segmenter().segment(text)].length - */ - textCounter: (text: string) => number; - /** - * The word counter function to use. Defaults to a simple word count. - * @default (text) => text.split(' ').filter(word => word !== '').length - * @example (text) => text.split(/\s+/).filter(word => word !== '').length - */ - wordCounter: (text: string) => number; -} -interface CharacterCountStorage { - /** - * Get the number of characters for the current document. - * @param options The options for the character count. (optional) - * @param options.node The node to get the characters from. Defaults to the current document. - * @param options.mode The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used. - */ - characters: (options?: { - node?: Node; - mode?: 'textSize' | 'nodeSize'; - }) => number; - /** - * Get the number of words for the current document. - * @param options The options for the character count. (optional) - * @param options.node The node to get the words from. Defaults to the current document. - */ - words: (options?: { - node?: Node; - }) => number; -} -declare module '@tiptap/core' { - interface Storage { - characterCount: CharacterCountStorage; - } -} -/** - * This extension allows you to count the characters and words of your document. - * @see https://tiptap.dev/api/extensions/character-count - */ -declare const CharacterCount: Extension; - -export { CharacterCount, type CharacterCountOptions, type CharacterCountStorage }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.d.ts deleted file mode 100644 index 7360567..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { Extension } from '@tiptap/core'; -import { Node } from '@tiptap/pm/model'; - -interface CharacterCountOptions { - /** - * The maximum number of characters that should be allowed. Defaults to `0`. - * @default null - * @example 180 - */ - limit: number | null | undefined; - /** - * The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used. - * If set to `nodeSize`, the nodeSize of the document is used. - * @default 'textSize' - * @example 'textSize' - */ - mode: 'textSize' | 'nodeSize'; - /** - * Sets whether the content will be automatically trimmed when programatically setting content over the limit. - * If set to false, the user will be able to trim the text manually. - * @default true - * @example false - */ - autoTrim?: boolean; - /** - * The text counter function to use. Defaults to a simple character count. - * @default (text) => text.length - * @example (text) => [...new Intl.Segmenter().segment(text)].length - */ - textCounter: (text: string) => number; - /** - * The word counter function to use. Defaults to a simple word count. - * @default (text) => text.split(' ').filter(word => word !== '').length - * @example (text) => text.split(/\s+/).filter(word => word !== '').length - */ - wordCounter: (text: string) => number; -} -interface CharacterCountStorage { - /** - * Get the number of characters for the current document. - * @param options The options for the character count. (optional) - * @param options.node The node to get the characters from. Defaults to the current document. - * @param options.mode The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used. - */ - characters: (options?: { - node?: Node; - mode?: 'textSize' | 'nodeSize'; - }) => number; - /** - * Get the number of words for the current document. - * @param options The options for the character count. (optional) - * @param options.node The node to get the words from. Defaults to the current document. - */ - words: (options?: { - node?: Node; - }) => number; -} -declare module '@tiptap/core' { - interface Storage { - characterCount: CharacterCountStorage; - } -} -/** - * This extension allows you to count the characters and words of your document. - * @see https://tiptap.dev/api/extensions/character-count - */ -declare const CharacterCount: Extension; - -export { CharacterCount, type CharacterCountOptions, type CharacterCountStorage }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.js deleted file mode 100644 index 53bc98a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.js +++ /dev/null @@ -1,104 +0,0 @@ -// src/character-count/character-count.ts -import { Extension } from "@tiptap/core"; -import { Plugin, PluginKey } from "@tiptap/pm/state"; -var CharacterCount = Extension.create({ - name: "characterCount", - addOptions() { - return { - limit: null, - autoTrim: true, - mode: "textSize", - textCounter: (text) => text.length, - wordCounter: (text) => text.split(" ").filter((word) => word !== "").length - }; - }, - addStorage() { - return { - characters: () => 0, - words: () => 0 - }; - }, - onBeforeCreate() { - this.storage.characters = (options) => { - const node = (options == null ? void 0 : options.node) || this.editor.state.doc; - const mode = (options == null ? void 0 : options.mode) || this.options.mode; - if (mode === "textSize") { - const text = node.textBetween(0, node.content.size, void 0, " "); - return this.options.textCounter(text); - } - return node.nodeSize; - }; - this.storage.words = (options) => { - const node = (options == null ? void 0 : options.node) || this.editor.state.doc; - const text = node.textBetween(0, node.content.size, " ", " "); - return this.options.wordCounter(text); - }; - }, - addProseMirrorPlugins() { - let initialEvaluationDone = false; - return [ - new Plugin({ - key: new PluginKey("characterCount"), - appendTransaction: (transactions, oldState, newState) => { - if (initialEvaluationDone) { - return; - } - const limit = this.options.limit; - const autoTrim = this.options.autoTrim; - if (limit === null || limit === void 0 || limit === 0 || autoTrim === false) { - initialEvaluationDone = true; - return; - } - const initialContentSize = this.storage.characters({ node: newState.doc }); - if (initialContentSize > limit) { - const over = initialContentSize - limit; - const from = 0; - const to = over; - console.warn( - `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.` - ); - const tr = newState.tr.deleteRange(from, to); - initialEvaluationDone = true; - return tr; - } - initialEvaluationDone = true; - }, - filterTransaction: (transaction, state) => { - const limit = this.options.limit; - if (!transaction.docChanged || limit === 0 || limit === null || limit === void 0) { - return true; - } - const oldSize = this.storage.characters({ node: state.doc }); - const newSize = this.storage.characters({ node: transaction.doc }); - if (newSize <= limit) { - return true; - } - if (oldSize > limit && newSize > limit && newSize <= oldSize) { - return true; - } - if (oldSize > limit && newSize > limit && newSize > oldSize) { - return false; - } - const isPaste = transaction.getMeta("paste"); - if (!isPaste) { - return false; - } - const pos = transaction.selection.$head.pos; - const over = newSize - limit; - const from = pos - over; - const to = pos; - transaction.deleteRange(from, to); - const updatedSize = this.storage.characters({ node: transaction.doc }); - if (updatedSize > limit) { - return false; - } - return true; - } - }) - ]; - } -}); -export { - CharacterCount -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.js.map deleted file mode 100644 index 5dd59dc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/character-count/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/character-count/character-count.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\nexport interface CharacterCountOptions {\n /**\n * The maximum number of characters that should be allowed. Defaults to `0`.\n * @default null\n * @example 180\n */\n limit: number | null | undefined\n /**\n * The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used.\n * If set to `nodeSize`, the nodeSize of the document is used.\n * @default 'textSize'\n * @example 'textSize'\n */\n mode: 'textSize' | 'nodeSize'\n /**\n * Sets whether the content will be automatically trimmed when programatically setting content over the limit.\n * If set to false, the user will be able to trim the text manually.\n * @default true\n * @example false\n */\n autoTrim?: boolean\n /**\n * The text counter function to use. Defaults to a simple character count.\n * @default (text) => text.length\n * @example (text) => [...new Intl.Segmenter().segment(text)].length\n */\n textCounter: (text: string) => number\n /**\n * The word counter function to use. Defaults to a simple word count.\n * @default (text) => text.split(' ').filter(word => word !== '').length\n * @example (text) => text.split(/\\s+/).filter(word => word !== '').length\n */\n wordCounter: (text: string) => number\n}\n\nexport interface CharacterCountStorage {\n /**\n * Get the number of characters for the current document.\n * @param options The options for the character count. (optional)\n * @param options.node The node to get the characters from. Defaults to the current document.\n * @param options.mode The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used.\n */\n characters: (options?: { node?: ProseMirrorNode; mode?: 'textSize' | 'nodeSize' }) => number\n\n /**\n * Get the number of words for the current document.\n * @param options The options for the character count. (optional)\n * @param options.node The node to get the words from. Defaults to the current document.\n */\n words: (options?: { node?: ProseMirrorNode }) => number\n}\n\ndeclare module '@tiptap/core' {\n interface Storage {\n characterCount: CharacterCountStorage\n }\n}\n\n/**\n * This extension allows you to count the characters and words of your document.\n * @see https://tiptap.dev/api/extensions/character-count\n */\nexport const CharacterCount = Extension.create({\n name: 'characterCount',\n\n addOptions() {\n return {\n limit: null,\n autoTrim: true,\n mode: 'textSize',\n textCounter: text => text.length,\n wordCounter: text => text.split(' ').filter(word => word !== '').length,\n }\n },\n\n addStorage() {\n return {\n characters: () => 0,\n words: () => 0,\n }\n },\n\n onBeforeCreate() {\n this.storage.characters = options => {\n const node = options?.node || this.editor.state.doc\n const mode = options?.mode || this.options.mode\n\n if (mode === 'textSize') {\n const text = node.textBetween(0, node.content.size, undefined, ' ')\n\n return this.options.textCounter(text)\n }\n\n return node.nodeSize\n }\n\n this.storage.words = options => {\n const node = options?.node || this.editor.state.doc\n const text = node.textBetween(0, node.content.size, ' ', ' ')\n\n return this.options.wordCounter(text)\n }\n },\n\n addProseMirrorPlugins() {\n let initialEvaluationDone = false\n\n return [\n new Plugin({\n key: new PluginKey('characterCount'),\n appendTransaction: (transactions, oldState, newState) => {\n if (initialEvaluationDone) {\n return\n }\n\n const limit = this.options.limit\n const autoTrim = this.options.autoTrim\n\n if (limit === null || limit === undefined || limit === 0 || autoTrim === false) {\n initialEvaluationDone = true\n return\n }\n\n const initialContentSize = this.storage.characters({ node: newState.doc })\n\n if (initialContentSize > limit) {\n const over = initialContentSize - limit\n const from = 0\n const to = over\n\n console.warn(\n `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`,\n )\n const tr = newState.tr.deleteRange(from, to)\n initialEvaluationDone = true\n return tr\n }\n\n initialEvaluationDone = true\n },\n filterTransaction: (transaction, state) => {\n const limit = this.options.limit\n\n // Nothing has changed or no limit is defined. Ignore it.\n if (!transaction.docChanged || limit === 0 || limit === null || limit === undefined) {\n return true\n }\n\n const oldSize = this.storage.characters({ node: state.doc })\n const newSize = this.storage.characters({ node: transaction.doc })\n\n // Everything is in the limit. Good.\n if (newSize <= limit) {\n return true\n }\n\n // The limit has already been exceeded but will be reduced.\n if (oldSize > limit && newSize > limit && newSize <= oldSize) {\n return true\n }\n\n // The limit has already been exceeded and will be increased further.\n if (oldSize > limit && newSize > limit && newSize > oldSize) {\n return false\n }\n\n const isPaste = transaction.getMeta('paste')\n\n // Block all exceeding transactions that were not pasted.\n if (!isPaste) {\n return false\n }\n\n // For pasted content, we try to remove the exceeding content.\n const pos = transaction.selection.$head.pos\n const over = newSize - limit\n const from = pos - over\n const to = pos\n\n // It’s probably a bad idea to mutate transactions within `filterTransaction`\n // but for now this is working fine.\n transaction.deleteRange(from, to)\n\n // In some situations, the limit will continue to be exceeded after trimming.\n // This happens e.g. when truncating within a complex node (e.g. table)\n // and ProseMirror has to close this node again.\n // If this is the case, we prevent the transaction completely.\n const updatedSize = this.storage.characters({ node: transaction.doc })\n\n if (updatedSize > limit) {\n return false\n }\n\n return true\n },\n }),\n ]\n },\n})\n"],"mappings":";AAAA,SAAS,iBAAiB;AAE1B,SAAS,QAAQ,iBAAiB;AAgE3B,IAAM,iBAAiB,UAAU,OAAqD;AAAA,EAC3F,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,MAAM;AAAA,MACN,aAAa,UAAQ,KAAK;AAAA,MAC1B,aAAa,UAAQ,KAAK,MAAM,GAAG,EAAE,OAAO,UAAQ,SAAS,EAAE,EAAE;AAAA,IACnE;AAAA,EACF;AAAA,EAEA,aAAa;AACX,WAAO;AAAA,MACL,YAAY,MAAM;AAAA,MAClB,OAAO,MAAM;AAAA,IACf;AAAA,EACF;AAAA,EAEA,iBAAiB;AACf,SAAK,QAAQ,aAAa,aAAW;AACnC,YAAM,QAAO,mCAAS,SAAQ,KAAK,OAAO,MAAM;AAChD,YAAM,QAAO,mCAAS,SAAQ,KAAK,QAAQ;AAE3C,UAAI,SAAS,YAAY;AACvB,cAAM,OAAO,KAAK,YAAY,GAAG,KAAK,QAAQ,MAAM,QAAW,GAAG;AAElE,eAAO,KAAK,QAAQ,YAAY,IAAI;AAAA,MACtC;AAEA,aAAO,KAAK;AAAA,IACd;AAEA,SAAK,QAAQ,QAAQ,aAAW;AAC9B,YAAM,QAAO,mCAAS,SAAQ,KAAK,OAAO,MAAM;AAChD,YAAM,OAAO,KAAK,YAAY,GAAG,KAAK,QAAQ,MAAM,KAAK,GAAG;AAE5D,aAAO,KAAK,QAAQ,YAAY,IAAI;AAAA,IACtC;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,QAAI,wBAAwB;AAE5B,WAAO;AAAA,MACL,IAA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Y,UAAU,MAAM;AACxC,gBAAM,OAAO,UAAU;AACvB,gBAAM,OAAO,MAAM;AACnB,gBAAM,KAAK;AAIX,sBAAY,YAAY,MAAM,EAAE;AAMhC,gBAAM,cAAc,KAAK,QAAQ,WAAW,EAAE,MAAM,YAAY,IAAI,CAAC;AAErE,cAAI,cAAc,OAAO;AACvB,mBAAO;AAAA,UACT;AAEA,iBAAO;AAAA,QACT;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs deleted file mode 100644 index a149e5f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/drop-cursor/index.ts -var index_exports = {}; -__export(index_exports, { - Dropcursor: () => Dropcursor -}); -module.exports = __toCommonJS(index_exports); - -// src/drop-cursor/drop-cursor.ts -var import_core = require("@tiptap/core"); -var import_dropcursor = require("@tiptap/pm/dropcursor"); -var Dropcursor = import_core.Extension.create({ - name: "dropCursor", - addOptions() { - return { - color: "currentColor", - width: 1, - class: void 0 - }; - }, - addProseMirrorPlugins() { - return [(0, import_dropcursor.dropCursor)(this.options)]; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Dropcursor -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs.map deleted file mode 100644 index 585f848..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/drop-cursor/index.ts","../../src/drop-cursor/drop-cursor.ts"],"sourcesContent":["export * from './drop-cursor.js'\n","import { Extension } from '@tiptap/core'\nimport { dropCursor } from '@tiptap/pm/dropcursor'\n\nexport interface DropcursorOptions {\n /**\n * The color of the drop cursor. Use `false` to apply no color and rely only on class.\n * @default 'currentColor'\n * @example 'red'\n */\n color?: string | false\n\n /**\n * The width of the drop cursor\n * @default 1\n * @example 2\n */\n width: number | undefined\n\n /**\n * The class of the drop cursor\n * @default undefined\n * @example 'drop-cursor'\n */\n class: string | undefined\n}\n\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * in-between nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */\nexport const Dropcursor = Extension.create({\n name: 'dropCursor',\n\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [dropCursor(this.options)]\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA0B;AAC1B,wBAA2B;AA+BpB,IAAM,aAAa,sBAAU,OAA0B;AAAA,EAC5D,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,WAAO,KAAC,8BAAW,KAAK,OAAO,CAAC;AAAA,EAClC;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.cts deleted file mode 100644 index 54ea853..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.cts +++ /dev/null @@ -1,31 +0,0 @@ -import { Extension } from '@tiptap/core'; - -interface DropcursorOptions { - /** - * The color of the drop cursor. Use `false` to apply no color and rely only on class. - * @default 'currentColor' - * @example 'red' - */ - color?: string | false; - /** - * The width of the drop cursor - * @default 1 - * @example 2 - */ - width: number | undefined; - /** - * The class of the drop cursor - * @default undefined - * @example 'drop-cursor' - */ - class: string | undefined; -} -/** - * This extension allows you to add a drop cursor to your editor. - * A drop cursor is a line that appears when you drag and drop content - * in-between nodes. - * @see https://tiptap.dev/api/extensions/dropcursor - */ -declare const Dropcursor: Extension; - -export { Dropcursor, type DropcursorOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.ts deleted file mode 100644 index 54ea853..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Extension } from '@tiptap/core'; - -interface DropcursorOptions { - /** - * The color of the drop cursor. Use `false` to apply no color and rely only on class. - * @default 'currentColor' - * @example 'red' - */ - color?: string | false; - /** - * The width of the drop cursor - * @default 1 - * @example 2 - */ - width: number | undefined; - /** - * The class of the drop cursor - * @default undefined - * @example 'drop-cursor' - */ - class: string | undefined; -} -/** - * This extension allows you to add a drop cursor to your editor. - * A drop cursor is a line that appears when you drag and drop content - * in-between nodes. - * @see https://tiptap.dev/api/extensions/dropcursor - */ -declare const Dropcursor: Extension; - -export { Dropcursor, type DropcursorOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.js deleted file mode 100644 index 7bf9512..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// src/drop-cursor/drop-cursor.ts -import { Extension } from "@tiptap/core"; -import { dropCursor } from "@tiptap/pm/dropcursor"; -var Dropcursor = Extension.create({ - name: "dropCursor", - addOptions() { - return { - color: "currentColor", - width: 1, - class: void 0 - }; - }, - addProseMirrorPlugins() { - return [dropCursor(this.options)]; - } -}); -export { - Dropcursor -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.js.map deleted file mode 100644 index 768790e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/drop-cursor/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/drop-cursor/drop-cursor.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { dropCursor } from '@tiptap/pm/dropcursor'\n\nexport interface DropcursorOptions {\n /**\n * The color of the drop cursor. Use `false` to apply no color and rely only on class.\n * @default 'currentColor'\n * @example 'red'\n */\n color?: string | false\n\n /**\n * The width of the drop cursor\n * @default 1\n * @example 2\n */\n width: number | undefined\n\n /**\n * The class of the drop cursor\n * @default undefined\n * @example 'drop-cursor'\n */\n class: string | undefined\n}\n\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * in-between nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */\nexport const Dropcursor = Extension.create({\n name: 'dropCursor',\n\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [dropCursor(this.options)]\n },\n})\n"],"mappings":";AAAA,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AA+BpB,IAAM,aAAa,UAAU,OAA0B;AAAA,EAC5D,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,WAAO,CAAC,WAAW,KAAK,OAAO,CAAC;AAAA,EAClC;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.cjs deleted file mode 100644 index f6ca26d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.cjs +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/focus/index.ts -var index_exports = {}; -__export(index_exports, { - Focus: () => Focus -}); -module.exports = __toCommonJS(index_exports); - -// src/focus/focus.ts -var import_core = require("@tiptap/core"); -var import_state = require("@tiptap/pm/state"); -var import_view = require("@tiptap/pm/view"); -var Focus = import_core.Extension.create({ - name: "focus", - addOptions() { - return { - className: "has-focus", - mode: "all" - }; - }, - addProseMirrorPlugins() { - return [ - new import_state.Plugin({ - key: new import_state.PluginKey("focus"), - props: { - decorations: ({ doc, selection }) => { - const { isEditable, isFocused } = this.editor; - const { anchor } = selection; - const decorations = []; - if (!isEditable || !isFocused) { - return import_view.DecorationSet.create(doc, []); - } - let maxLevels = 0; - if (this.options.mode === "deepest") { - doc.descendants((node, pos) => { - if (node.isText) { - return; - } - const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1; - if (!isCurrent) { - return false; - } - maxLevels += 1; - }); - } - let currentLevel = 0; - doc.descendants((node, pos) => { - if (node.isText) { - return false; - } - const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1; - if (!isCurrent) { - return false; - } - currentLevel += 1; - const outOfScope = this.options.mode === "deepest" && maxLevels - currentLevel > 0 || this.options.mode === "shallowest" && currentLevel > 1; - if (outOfScope) { - return this.options.mode === "deepest"; - } - decorations.push( - import_view.Decoration.node(pos, pos + node.nodeSize, { - class: this.options.className - }) - ); - }); - return import_view.DecorationSet.create(doc, decorations); - } - } - }) - ]; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Focus -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.cjs.map deleted file mode 100644 index 07974b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/focus/index.ts","../../src/focus/focus.ts"],"sourcesContent":["export * from './focus.js'\n","import { Extension } from '@tiptap/core'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet } from '@tiptap/pm/view'\n\nexport interface FocusOptions {\n /**\n * The class name that should be added to the focused node.\n * @default 'has-focus'\n * @example 'is-focused'\n */\n className: string\n\n /**\n * The mode by which the focused node is determined.\n * - All: All nodes are marked as focused.\n * - Deepest: Only the deepest node is marked as focused.\n * - Shallowest: Only the shallowest node is marked as focused.\n *\n * @default 'all'\n * @example 'deepest'\n * @example 'shallowest'\n */\n mode: 'all' | 'deepest' | 'shallowest'\n}\n\n/**\n * This extension allows you to add a class to the focused node.\n * @see https://www.tiptap.dev/api/extensions/focus\n */\nexport const Focus = Extension.create({\n name: 'focus',\n\n addOptions() {\n return {\n className: 'has-focus',\n mode: 'all',\n }\n },\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('focus'),\n props: {\n decorations: ({ doc, selection }) => {\n const { isEditable, isFocused } = this.editor\n const { anchor } = selection\n const decorations: Decoration[] = []\n\n if (!isEditable || !isFocused) {\n return DecorationSet.create(doc, [])\n }\n\n // Maximum Levels\n let maxLevels = 0\n\n if (this.options.mode === 'deepest') {\n doc.descendants((node, pos) => {\n if (node.isText) {\n return\n }\n\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1\n\n if (!isCurrent) {\n return false\n }\n\n maxLevels += 1\n })\n }\n\n // Loop through current\n let currentLevel = 0\n\n doc.descendants((node, pos) => {\n if (node.isText) {\n return false\n }\n\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1\n\n if (!isCurrent) {\n return false\n }\n\n currentLevel += 1\n\n const outOfScope =\n (this.options.mode === 'deepest' && maxLevels - currentLevel > 0) ||\n (this.options.mode === 'shallowest' && currentLevel > 1)\n\n if (outOfScope) {\n return this.options.mode === 'deepest'\n }\n\n decorations.push(\n Decoration.node(pos, pos + node.nodeSize, {\n class: this.options.className,\n }),\n )\n })\n\n return DecorationSet.create(doc, decorations)\n },\n },\n }),\n ]\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA0B;AAC1B,mBAAkC;AAClC,kBAA0C;AA2BnC,IAAM,QAAQ,sBAAU,OAAqB;AAAA,EAClD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,WAAW;AAAA,MACX,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,WAAO;AAAA,MACL,IAAI,oBAAO;AAAA,QACT,KAAK,IAAI,uBAAU,OAAO;AAAA,QAC1B,OAAO;AAAA,UACL,aAAa,CAAC,EAAE,KAAK,UAAU,MAAM;AACnC,kBAAM,EAAE,YAAY,UAAU,IAAI,KAAK;AACvC,kBAAM,EAAE,OAAO,IAAI;AACnB,kBAAM,cAA4B,CAAC;AAEnC,gBAAI,CAAC,cAAc,CAAC,WAAW;AAC7B,qBAAO,0BAAc,OAAO,KAAK,CAAC,CAAC;AAAA,YACrC;AAGA,gBAAI,YAAY;AAEhB,gBAAI,KAAK,QAAQ,SAAS,WAAW;AACnC,kBAAI,YAAY,CAAC,MAAM,QAAQ;AAC7B,oBAAI,KAAK,QAAQ;AACf;AAAA,gBACF;AAEA,sBAAM,YAAY,UAAU,OAAO,UAAU,MAAM,KAAK,WAAW;AAEnE,oBAAI,CAAC,WAAW;AACd,yBAAO;AAAA,gBACT;AAEA,6BAAa;AAAA,cACf,CAAC;AAAA,YACH;AAGA,gBAAI,eAAe;AAEnB,gBAAI,YAAY,CAAC,MAAM,QAAQ;AAC7B,kBAAI,KAAK,QAAQ;AACf,uBAAO;AAAA,cACT;AAEA,oBAAM,YAAY,UAAU,OAAO,UAAU,MAAM,KAAK,WAAW;AAEnE,kBAAI,CAAC,WAAW;AACd,uBAAO;AAAA,cACT;AAEA,8BAAgB;AAEhB,oBAAM,aACH,KAAK,QAAQ,SAAS,aAAa,YAAY,eAAe,KAC9D,KAAK,QAAQ,SAAS,gBAAgB,eAAe;AAExD,kBAAI,YAAY;AACd,uBAAO,KAAK,QAAQ,SAAS;AAAA,cAC/B;AAEA,0BAAY;AAAA,gBACV,uBAAW,KAAK,KAAK,MAAM,KAAK,UAAU;AAAA,kBACxC,OAAO,KAAK,QAAQ;AAAA,gBACtB,CAAC;AAAA,cACH;AAAA,YACF,CAAC;AAED,mBAAO,0BAAc,OAAO,KAAK,WAAW;AAAA,UAC9C;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.d.cts deleted file mode 100644 index 5120e67..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.d.cts +++ /dev/null @@ -1,28 +0,0 @@ -import { Extension } from '@tiptap/core'; - -interface FocusOptions { - /** - * The class name that should be added to the focused node. - * @default 'has-focus' - * @example 'is-focused' - */ - className: string; - /** - * The mode by which the focused node is determined. - * - All: All nodes are marked as focused. - * - Deepest: Only the deepest node is marked as focused. - * - Shallowest: Only the shallowest node is marked as focused. - * - * @default 'all' - * @example 'deepest' - * @example 'shallowest' - */ - mode: 'all' | 'deepest' | 'shallowest'; -} -/** - * This extension allows you to add a class to the focused node. - * @see https://www.tiptap.dev/api/extensions/focus - */ -declare const Focus: Extension; - -export { Focus, type FocusOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.d.ts deleted file mode 100644 index 5120e67..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Extension } from '@tiptap/core'; - -interface FocusOptions { - /** - * The class name that should be added to the focused node. - * @default 'has-focus' - * @example 'is-focused' - */ - className: string; - /** - * The mode by which the focused node is determined. - * - All: All nodes are marked as focused. - * - Deepest: Only the deepest node is marked as focused. - * - Shallowest: Only the shallowest node is marked as focused. - * - * @default 'all' - * @example 'deepest' - * @example 'shallowest' - */ - mode: 'all' | 'deepest' | 'shallowest'; -} -/** - * This extension allows you to add a class to the focused node. - * @see https://www.tiptap.dev/api/extensions/focus - */ -declare const Focus: Extension; - -export { Focus, type FocusOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.js deleted file mode 100644 index 0d52e50..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.js +++ /dev/null @@ -1,68 +0,0 @@ -// src/focus/focus.ts -import { Extension } from "@tiptap/core"; -import { Plugin, PluginKey } from "@tiptap/pm/state"; -import { Decoration, DecorationSet } from "@tiptap/pm/view"; -var Focus = Extension.create({ - name: "focus", - addOptions() { - return { - className: "has-focus", - mode: "all" - }; - }, - addProseMirrorPlugins() { - return [ - new Plugin({ - key: new PluginKey("focus"), - props: { - decorations: ({ doc, selection }) => { - const { isEditable, isFocused } = this.editor; - const { anchor } = selection; - const decorations = []; - if (!isEditable || !isFocused) { - return DecorationSet.create(doc, []); - } - let maxLevels = 0; - if (this.options.mode === "deepest") { - doc.descendants((node, pos) => { - if (node.isText) { - return; - } - const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1; - if (!isCurrent) { - return false; - } - maxLevels += 1; - }); - } - let currentLevel = 0; - doc.descendants((node, pos) => { - if (node.isText) { - return false; - } - const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1; - if (!isCurrent) { - return false; - } - currentLevel += 1; - const outOfScope = this.options.mode === "deepest" && maxLevels - currentLevel > 0 || this.options.mode === "shallowest" && currentLevel > 1; - if (outOfScope) { - return this.options.mode === "deepest"; - } - decorations.push( - Decoration.node(pos, pos + node.nodeSize, { - class: this.options.className - }) - ); - }); - return DecorationSet.create(doc, decorations); - } - } - }) - ]; - } -}); -export { - Focus -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.js.map deleted file mode 100644 index da0ec86..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/focus/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/focus/focus.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet } from '@tiptap/pm/view'\n\nexport interface FocusOptions {\n /**\n * The class name that should be added to the focused node.\n * @default 'has-focus'\n * @example 'is-focused'\n */\n className: string\n\n /**\n * The mode by which the focused node is determined.\n * - All: All nodes are marked as focused.\n * - Deepest: Only the deepest node is marked as focused.\n * - Shallowest: Only the shallowest node is marked as focused.\n *\n * @default 'all'\n * @example 'deepest'\n * @example 'shallowest'\n */\n mode: 'all' | 'deepest' | 'shallowest'\n}\n\n/**\n * This extension allows you to add a class to the focused node.\n * @see https://www.tiptap.dev/api/extensions/focus\n */\nexport const Focus = Extension.create({\n name: 'focus',\n\n addOptions() {\n return {\n className: 'has-focus',\n mode: 'all',\n }\n },\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('focus'),\n props: {\n decorations: ({ doc, selection }) => {\n const { isEditable, isFocused } = this.editor\n const { anchor } = selection\n const decorations: Decoration[] = []\n\n if (!isEditable || !isFocused) {\n return DecorationSet.create(doc, [])\n }\n\n // Maximum Levels\n let maxLevels = 0\n\n if (this.options.mode === 'deepest') {\n doc.descendants((node, pos) => {\n if (node.isText) {\n return\n }\n\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1\n\n if (!isCurrent) {\n return false\n }\n\n maxLevels += 1\n })\n }\n\n // Loop through current\n let currentLevel = 0\n\n doc.descendants((node, pos) => {\n if (node.isText) {\n return false\n }\n\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1\n\n if (!isCurrent) {\n return false\n }\n\n currentLevel += 1\n\n const outOfScope =\n (this.options.mode === 'deepest' && maxLevels - currentLevel > 0) ||\n (this.options.mode === 'shallowest' && currentLevel > 1)\n\n if (outOfScope) {\n return this.options.mode === 'deepest'\n }\n\n decorations.push(\n Decoration.node(pos, pos + node.nodeSize, {\n class: this.options.className,\n }),\n )\n })\n\n return DecorationSet.create(doc, decorations)\n },\n },\n }),\n ]\n },\n})\n"],"mappings":";AAAA,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,iBAAiB;AAClC,SAAS,YAAY,qBAAqB;AA2BnC,IAAM,QAAQ,UAAU,OAAqB;AAAA,EAClD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,WAAW;AAAA,MACX,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,WAAO;AAAA,MACL,IAAI,OAAO;AAAA,QACT,KAAK,IAAI,UAAU,OAAO;AAAA,QAC1B,OAAO;AAAA,UACL,aAAa,CAAC,EAAE,KAAK,UAAU,MAAM;AACnC,kBAAM,EAAE,YAAY,UAAU,IAAI,KAAK;AACvC,kBAAM,EAAE,OAAO,IAAI;AACnB,kBAAM,cAA4B,CAAC;AAEnC,gBAAI,CAAC,cAAc,CAAC,WAAW;AAC7B,qBAAO,cAAc,OAAO,KAAK,CAAC,CAAC;AAAA,YACrC;AAGA,gBAAI,YAAY;AAEhB,gBAAI,KAAK,QAAQ,SAAS,WAAW;AACnC,kBAAI,YAAY,CAAC,MAAM,QAAQ;AAC7B,oBAAI,KAAK,QAAQ;AACf;AAAA,gBACF;AAEA,sBAAM,YAAY,UAAU,OAAO,UAAU,MAAM,KAAK,WAAW;AAEnE,oBAAI,CAAC,WAAW;AACd,yBAAO;AAAA,gBACT;AAEA,6BAAa;AAAA,cACf,CAAC;AAAA,YACH;AAGA,gBAAI,eAAe;AAEnB,gBAAI,YAAY,CAAC,MAAM,QAAQ;AAC7B,kBAAI,KAAK,QAAQ;AACf,uBAAO;AAAA,cACT;AAEA,oBAAM,YAAY,UAAU,OAAO,UAAU,MAAM,KAAK,WAAW;AAEnE,kBAAI,CAAC,WAAW;AACd,uBAAO;AAAA,cACT;AAEA,8BAAgB;AAEhB,oBAAM,aACH,KAAK,QAAQ,SAAS,aAAa,YAAY,eAAe,KAC9D,KAAK,QAAQ,SAAS,gBAAgB,eAAe;AAExD,kBAAI,YAAY;AACd,uBAAO,KAAK,QAAQ,SAAS;AAAA,cAC/B;AAEA,0BAAY;AAAA,gBACV,WAAW,KAAK,KAAK,MAAM,KAAK,UAAU;AAAA,kBACxC,OAAO,KAAK,QAAQ;AAAA,gBACtB,CAAC;AAAA,cACH;AAAA,YACF,CAAC;AAED,mBAAO,cAAc,OAAO,KAAK,WAAW;AAAA,UAC9C;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs deleted file mode 100644 index 20ceb7b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/gap-cursor/index.ts -var index_exports = {}; -__export(index_exports, { - Gapcursor: () => Gapcursor -}); -module.exports = __toCommonJS(index_exports); - -// src/gap-cursor/gap-cursor.ts -var import_core = require("@tiptap/core"); -var import_gapcursor = require("@tiptap/pm/gapcursor"); -var Gapcursor = import_core.Extension.create({ - name: "gapCursor", - addProseMirrorPlugins() { - return [(0, import_gapcursor.gapCursor)()]; - }, - extendNodeSchema(extension) { - var _a; - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage - }; - return { - allowGapCursor: (_a = (0, import_core.callOrReturn)((0, import_core.getExtensionField)(extension, "allowGapCursor", context))) != null ? _a : null - }; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Gapcursor -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs.map deleted file mode 100644 index 88c36cd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/gap-cursor/index.ts","../../src/gap-cursor/gap-cursor.ts"],"sourcesContent":["export * from './gap-cursor.js'\n","import type { ParentConfig } from '@tiptap/core'\nimport { callOrReturn, Extension, getExtensionField } from '@tiptap/core'\nimport { gapCursor } from '@tiptap/pm/gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig {\n /**\n * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.\n * @default null\n */\n allowGapCursor?:\n | boolean\n | null\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['allowGapCursor']\n }) => boolean | null)\n }\n}\n\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */\nexport const Gapcursor = Extension.create({\n name: 'gapCursor',\n\n addProseMirrorPlugins() {\n return [gapCursor()]\n },\n\n extendNodeSchema(extension) {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n\n return {\n allowGapCursor: callOrReturn(getExtensionField(extension, 'allowGapCursor', context)) ?? null,\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,kBAA2D;AAC3D,uBAA0B;AA0BnB,IAAM,YAAY,sBAAU,OAAO;AAAA,EACxC,MAAM;AAAA,EAEN,wBAAwB;AACtB,WAAO,KAAC,4BAAU,CAAC;AAAA,EACrB;AAAA,EAEA,iBAAiB,WAAW;AAnC9B;AAoCI,UAAM,UAAU;AAAA,MACd,MAAM,UAAU;AAAA,MAChB,SAAS,UAAU;AAAA,MACnB,SAAS,UAAU;AAAA,IACrB;AAEA,WAAO;AAAA,MACL,iBAAgB,uCAAa,+BAAkB,WAAW,kBAAkB,OAAO,CAAC,MAApE,YAAyE;AAAA,IAC3F;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.cts deleted file mode 100644 index 0a170f8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.cts +++ /dev/null @@ -1,25 +0,0 @@ -import { ParentConfig, Extension } from '@tiptap/core'; - -declare module '@tiptap/core' { - interface NodeConfig { - /** - * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`. - * @default null - */ - allowGapCursor?: boolean | null | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['allowGapCursor']; - }) => boolean | null); - } -} -/** - * This extension allows you to add a gap cursor to your editor. - * A gap cursor is a cursor that appears when you click on a place - * where no content is present, for example inbetween nodes. - * @see https://tiptap.dev/api/extensions/gapcursor - */ -declare const Gapcursor: Extension; - -export { Gapcursor }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.ts deleted file mode 100644 index 0a170f8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ParentConfig, Extension } from '@tiptap/core'; - -declare module '@tiptap/core' { - interface NodeConfig { - /** - * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`. - * @default null - */ - allowGapCursor?: boolean | null | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['allowGapCursor']; - }) => boolean | null); - } -} -/** - * This extension allows you to add a gap cursor to your editor. - * A gap cursor is a cursor that appears when you click on a place - * where no content is present, for example inbetween nodes. - * @see https://tiptap.dev/api/extensions/gapcursor - */ -declare const Gapcursor: Extension; - -export { Gapcursor }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.js deleted file mode 100644 index 31cd2d0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.js +++ /dev/null @@ -1,24 +0,0 @@ -// src/gap-cursor/gap-cursor.ts -import { callOrReturn, Extension, getExtensionField } from "@tiptap/core"; -import { gapCursor } from "@tiptap/pm/gapcursor"; -var Gapcursor = Extension.create({ - name: "gapCursor", - addProseMirrorPlugins() { - return [gapCursor()]; - }, - extendNodeSchema(extension) { - var _a; - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage - }; - return { - allowGapCursor: (_a = callOrReturn(getExtensionField(extension, "allowGapCursor", context))) != null ? _a : null - }; - } -}); -export { - Gapcursor -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.js.map deleted file mode 100644 index 70420f0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/gap-cursor/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/gap-cursor/gap-cursor.ts"],"sourcesContent":["import type { ParentConfig } from '@tiptap/core'\nimport { callOrReturn, Extension, getExtensionField } from '@tiptap/core'\nimport { gapCursor } from '@tiptap/pm/gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig {\n /**\n * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.\n * @default null\n */\n allowGapCursor?:\n | boolean\n | null\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['allowGapCursor']\n }) => boolean | null)\n }\n}\n\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */\nexport const Gapcursor = Extension.create({\n name: 'gapCursor',\n\n addProseMirrorPlugins() {\n return [gapCursor()]\n },\n\n extendNodeSchema(extension) {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n\n return {\n allowGapCursor: callOrReturn(getExtensionField(extension, 'allowGapCursor', context)) ?? null,\n }\n },\n})\n"],"mappings":";AACA,SAAS,cAAc,WAAW,yBAAyB;AAC3D,SAAS,iBAAiB;AA0BnB,IAAM,YAAY,UAAU,OAAO;AAAA,EACxC,MAAM;AAAA,EAEN,wBAAwB;AACtB,WAAO,CAAC,UAAU,CAAC;AAAA,EACrB;AAAA,EAEA,iBAAiB,WAAW;AAnC9B;AAoCI,UAAM,UAAU;AAAA,MACd,MAAM,UAAU;AAAA,MAChB,SAAS,UAAU;AAAA,MACnB,SAAS,UAAU;AAAA,IACrB;AAEA,WAAO;AAAA,MACL,iBAAgB,kBAAa,kBAAkB,WAAW,kBAAkB,OAAO,CAAC,MAApE,YAAyE;AAAA,IAC3F;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.cjs deleted file mode 100644 index 81f8a27..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.cjs +++ /dev/null @@ -1,693 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - CharacterCount: () => CharacterCount, - DEFAULT_DATA_ATTRIBUTE: () => DEFAULT_DATA_ATTRIBUTE, - Dropcursor: () => Dropcursor, - Focus: () => Focus, - Gapcursor: () => Gapcursor, - PLUGIN_KEY: () => PLUGIN_KEY, - Placeholder: () => Placeholder, - Selection: () => Selection, - TrailingNode: () => TrailingNode, - UndoRedo: () => UndoRedo, - preparePlaceholderAttribute: () => preparePlaceholderAttribute, - skipTrailingNodeMeta: () => skipTrailingNodeMeta -}); -module.exports = __toCommonJS(index_exports); - -// src/character-count/character-count.ts -var import_core = require("@tiptap/core"); -var import_state = require("@tiptap/pm/state"); -var CharacterCount = import_core.Extension.create({ - name: "characterCount", - addOptions() { - return { - limit: null, - autoTrim: true, - mode: "textSize", - textCounter: (text) => text.length, - wordCounter: (text) => text.split(" ").filter((word) => word !== "").length - }; - }, - addStorage() { - return { - characters: () => 0, - words: () => 0 - }; - }, - onBeforeCreate() { - this.storage.characters = (options) => { - const node = (options == null ? void 0 : options.node) || this.editor.state.doc; - const mode = (options == null ? void 0 : options.mode) || this.options.mode; - if (mode === "textSize") { - const text = node.textBetween(0, node.content.size, void 0, " "); - return this.options.textCounter(text); - } - return node.nodeSize; - }; - this.storage.words = (options) => { - const node = (options == null ? void 0 : options.node) || this.editor.state.doc; - const text = node.textBetween(0, node.content.size, " ", " "); - return this.options.wordCounter(text); - }; - }, - addProseMirrorPlugins() { - let initialEvaluationDone = false; - return [ - new import_state.Plugin({ - key: new import_state.PluginKey("characterCount"), - appendTransaction: (transactions, oldState, newState) => { - if (initialEvaluationDone) { - return; - } - const limit = this.options.limit; - const autoTrim = this.options.autoTrim; - if (limit === null || limit === void 0 || limit === 0 || autoTrim === false) { - initialEvaluationDone = true; - return; - } - const initialContentSize = this.storage.characters({ node: newState.doc }); - if (initialContentSize > limit) { - const over = initialContentSize - limit; - const from = 0; - const to = over; - console.warn( - `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.` - ); - const tr = newState.tr.deleteRange(from, to); - initialEvaluationDone = true; - return tr; - } - initialEvaluationDone = true; - }, - filterTransaction: (transaction, state) => { - const limit = this.options.limit; - if (!transaction.docChanged || limit === 0 || limit === null || limit === void 0) { - return true; - } - const oldSize = this.storage.characters({ node: state.doc }); - const newSize = this.storage.characters({ node: transaction.doc }); - if (newSize <= limit) { - return true; - } - if (oldSize > limit && newSize > limit && newSize <= oldSize) { - return true; - } - if (oldSize > limit && newSize > limit && newSize > oldSize) { - return false; - } - const isPaste = transaction.getMeta("paste"); - if (!isPaste) { - return false; - } - const pos = transaction.selection.$head.pos; - const over = newSize - limit; - const from = pos - over; - const to = pos; - transaction.deleteRange(from, to); - const updatedSize = this.storage.characters({ node: transaction.doc }); - if (updatedSize > limit) { - return false; - } - return true; - } - }) - ]; - } -}); - -// src/drop-cursor/drop-cursor.ts -var import_core2 = require("@tiptap/core"); -var import_dropcursor = require("@tiptap/pm/dropcursor"); -var Dropcursor = import_core2.Extension.create({ - name: "dropCursor", - addOptions() { - return { - color: "currentColor", - width: 1, - class: void 0 - }; - }, - addProseMirrorPlugins() { - return [(0, import_dropcursor.dropCursor)(this.options)]; - } -}); - -// src/focus/focus.ts -var import_core3 = require("@tiptap/core"); -var import_state2 = require("@tiptap/pm/state"); -var import_view = require("@tiptap/pm/view"); -var Focus = import_core3.Extension.create({ - name: "focus", - addOptions() { - return { - className: "has-focus", - mode: "all" - }; - }, - addProseMirrorPlugins() { - return [ - new import_state2.Plugin({ - key: new import_state2.PluginKey("focus"), - props: { - decorations: ({ doc, selection }) => { - const { isEditable, isFocused } = this.editor; - const { anchor } = selection; - const decorations = []; - if (!isEditable || !isFocused) { - return import_view.DecorationSet.create(doc, []); - } - let maxLevels = 0; - if (this.options.mode === "deepest") { - doc.descendants((node, pos) => { - if (node.isText) { - return; - } - const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1; - if (!isCurrent) { - return false; - } - maxLevels += 1; - }); - } - let currentLevel = 0; - doc.descendants((node, pos) => { - if (node.isText) { - return false; - } - const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1; - if (!isCurrent) { - return false; - } - currentLevel += 1; - const outOfScope = this.options.mode === "deepest" && maxLevels - currentLevel > 0 || this.options.mode === "shallowest" && currentLevel > 1; - if (outOfScope) { - return this.options.mode === "deepest"; - } - decorations.push( - import_view.Decoration.node(pos, pos + node.nodeSize, { - class: this.options.className - }) - ); - }); - return import_view.DecorationSet.create(doc, decorations); - } - } - }) - ]; - } -}); - -// src/gap-cursor/gap-cursor.ts -var import_core4 = require("@tiptap/core"); -var import_gapcursor = require("@tiptap/pm/gapcursor"); -var Gapcursor = import_core4.Extension.create({ - name: "gapCursor", - addProseMirrorPlugins() { - return [(0, import_gapcursor.gapCursor)()]; - }, - extendNodeSchema(extension) { - var _a; - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage - }; - return { - allowGapCursor: (_a = (0, import_core4.callOrReturn)((0, import_core4.getExtensionField)(extension, "allowGapCursor", context))) != null ? _a : null - }; - } -}); - -// src/placeholder/constants.ts -var import_state3 = require("@tiptap/pm/state"); -var DEFAULT_DATA_ATTRIBUTE = "placeholder"; -var PLUGIN_KEY = new import_state3.PluginKey("tiptap__placeholder"); -var VIEWPORT_OVERSCAN_PX = 200; - -// src/placeholder/placeholder.ts -var import_core6 = require("@tiptap/core"); - -// src/placeholder/plugins/PlaceholderPlugin.ts -var import_state4 = require("@tiptap/pm/state"); - -// src/placeholder/utils/buildPlaceholderDecorations.ts -var import_core5 = require("@tiptap/core"); -var import_view3 = require("@tiptap/pm/view"); - -// src/placeholder/utils/createPlaceholderDecoration.ts -var import_view2 = require("@tiptap/pm/view"); -function createPlaceholderDecoration(options) { - const { - editor, - placeholder, - dataAttribute, - pos, - node, - isEmptyDoc, - hasAnchor, - classes: { emptyNode, emptyEditor } - } = options; - const classes = [emptyNode]; - if (isEmptyDoc) { - classes.push(emptyEditor); - } - return import_view2.Decoration.node(pos, pos + node.nodeSize, { - class: classes.join(" "), - [dataAttribute]: typeof placeholder === "function" ? placeholder({ - editor, - node, - pos, - hasAnchor - }) : placeholder - }); -} - -// src/placeholder/utils/buildPlaceholderDecorations.ts -function resolveEmptyNodeClass(emptyNodeClass, props) { - return typeof emptyNodeClass === "function" ? emptyNodeClass(props) : emptyNodeClass; -} -function buildPlaceholderDecorations({ - editor, - options, - dataAttribute, - doc, - selection -}) { - var _a, _b; - const active = editor.isEditable || !options.showOnlyWhenEditable; - if (!active) { - return null; - } - const { anchor } = selection; - const decorations = []; - const isEmptyDoc = editor.isEmpty; - const useResolvedPath = options.showOnlyCurrent && !options.includeChildren; - if (useResolvedPath) { - const resolved = doc.resolve(anchor); - const node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter; - const nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor; - if (node && node.type.isTextblock && (0, import_core5.isNodeEmpty)(node)) { - const hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize; - decorations.push( - createPlaceholderDecoration({ - editor, - isEmptyDoc, - dataAttribute, - hasAnchor, - placeholder: options.placeholder, - classes: { - emptyEditor: options.emptyEditorClass, - emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, { - editor, - node, - pos: nodeStart, - hasAnchor - }) - }, - node, - pos: nodeStart - }) - ); - } - } else { - const pluginState = PLUGIN_KEY.getState(editor.state); - const from = (_a = pluginState == null ? void 0 : pluginState.topPos) != null ? _a : 0; - const to = (_b = pluginState == null ? void 0 : pluginState.bottomPos) != null ? _b : doc.content.size; - doc.nodesBetween(from, to, (node, pos) => { - const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize; - const isEmpty = !node.isLeaf && (0, import_core5.isNodeEmpty)(node); - if (!node.type.isTextblock) { - return options.includeChildren; - } - if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) { - decorations.push( - createPlaceholderDecoration({ - editor, - isEmptyDoc, - dataAttribute, - hasAnchor, - placeholder: options.placeholder, - classes: { - emptyEditor: options.emptyEditorClass, - emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, { - editor, - node, - pos, - hasAnchor - }) - }, - node, - pos - }) - ); - } - return options.includeChildren; - }); - } - return import_view3.DecorationSet.create(doc, decorations); -} - -// src/placeholder/utils/preparePlaceholderAttribute.ts -function preparePlaceholderAttribute(attr) { - return attr.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase(); -} - -// src/placeholder/utils/findScrollParent.ts -function isScrollable(el) { - const style = getComputedStyle(el); - const overflow = `${style.overflow} ${style.overflowY} ${style.overflowX}`; - return /auto|scroll|overlay/.test(overflow); -} -function findScrollParent(element) { - let el = element; - while (el) { - if (isScrollable(el)) { - return el; - } - const parent = el.parentElement; - if (!parent) { - const root = el.getRootNode(); - if (root instanceof ShadowRoot) { - el = root.host; - continue; - } - return window; - } - el = parent; - } - return window; -} - -// src/placeholder/utils/getViewportBoundaryPositions.ts -function getContainerRect(container) { - if (container === window) { - return { top: 0, bottom: window.innerHeight }; - } - return container.getBoundingClientRect(); -} -function getViewportBoundaryPositions({ - doc, - view, - scrollContainer -}) { - const editorRect = view.dom.getBoundingClientRect(); - const containerRect = scrollContainer ? getContainerRect(scrollContainer) : { top: 0, bottom: window.innerHeight }; - const visibleTop = Math.max(editorRect.top, containerRect.top) - VIEWPORT_OVERSCAN_PX; - const visibleBottom = Math.min(editorRect.bottom, containerRect.bottom) + VIEWPORT_OVERSCAN_PX; - if (visibleTop >= visibleBottom) { - return { top: 0, bottom: doc.content.size }; - } - const isRTL = getComputedStyle(view.dom).direction === "rtl"; - const x = isRTL ? Math.max(editorRect.right - 2, editorRect.left + 2) : editorRect.left + 2; - const topPos = view.posAtCoords({ left: x, top: visibleTop + 2 }); - const bottomPos = view.posAtCoords({ left: x, top: visibleBottom - 2 }); - return { - top: topPos ? topPos.pos : 0, - bottom: bottomPos ? bottomPos.pos : doc.content.size - }; -} - -// src/placeholder/utils/viewportTracking.ts -var viewportPluginState = { - /** - * Initialises the viewport state with no known positions. - * @returns The initial viewport state. - */ - init() { - return { topPos: null, bottomPos: null }; - }, - /** - * Updates the viewport state from incoming transactions. - * @param tr - The transaction being applied. - * @param prev - The previous viewport state. - * @returns The next viewport state. - */ - apply(tr, prev) { - const meta = tr.getMeta(PLUGIN_KEY); - if (meta == null ? void 0 : meta.positions) { - return { topPos: meta.positions.top, bottomPos: meta.positions.bottom }; - } - if (!tr.docChanged) { - return prev; - } - return { - topPos: prev.topPos !== null ? tr.mapping.map(prev.topPos) : null, - bottomPos: prev.bottomPos !== null ? tr.mapping.map(prev.bottomPos) : null - }; - } -}; -function createViewportPluginView(view) { - const scrollContainer = findScrollParent(view.dom); - const computeAndDispatch = () => { - const positions = getViewportBoundaryPositions({ - view, - doc: view.state.doc, - scrollContainer - }); - const prev = PLUGIN_KEY.getState(view.state); - if ((prev == null ? void 0 : prev.topPos) === positions.top && (prev == null ? void 0 : prev.bottomPos) === positions.bottom) { - return; - } - const tr = view.state.tr.setMeta(PLUGIN_KEY, { positions }); - view.dispatch(tr); - }; - let frame = null; - let lastCompute = 0; - const MIN_SCROLL_INTERVAL = 150; - const scheduleFrame = () => { - if (frame !== null) return; - frame = requestAnimationFrame(() => { - frame = null; - const now = performance.now(); - if (now - lastCompute >= MIN_SCROLL_INTERVAL) { - lastCompute = now; - computeAndDispatch(); - } else { - scheduleFrame(); - } - }); - }; - scrollContainer.addEventListener("scroll", scheduleFrame, { passive: true }); - computeAndDispatch(); - return { - update(_view, prevState) { - if (view.state.doc.content.size !== prevState.doc.content.size) { - scheduleFrame(); - } - }, - destroy: () => { - if (frame !== null) { - cancelAnimationFrame(frame); - } - scrollContainer.removeEventListener("scroll", scheduleFrame); - } - }; -} - -// src/placeholder/plugins/PlaceholderPlugin.ts -function createPlaceholderPlugin({ editor, options }) { - const dataAttribute = options.dataAttribute ? `data-${preparePlaceholderAttribute(options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`; - return new import_state4.Plugin({ - key: PLUGIN_KEY, - state: viewportPluginState, - view: createViewportPluginView, - props: { - decorations: ({ doc, selection }) => buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }) - } - }); -} - -// src/placeholder/placeholder.ts -var Placeholder = import_core6.Extension.create({ - name: "placeholder", - addOptions() { - return { - emptyEditorClass: "is-editor-empty", - emptyNodeClass: "is-empty", - dataAttribute: DEFAULT_DATA_ATTRIBUTE, - placeholder: "Write something \u2026", - showOnlyWhenEditable: true, - showOnlyCurrent: true, - includeChildren: false - }; - }, - addProseMirrorPlugins() { - return [createPlaceholderPlugin({ editor: this.editor, options: this.options })]; - } -}); - -// src/selection/selection.ts -var import_core7 = require("@tiptap/core"); -var import_state5 = require("@tiptap/pm/state"); -var import_view4 = require("@tiptap/pm/view"); -var selectionStyle = `.ProseMirror:not(.ProseMirror-focused) *::selection { - background: transparent; -} - -.ProseMirror:not(.ProseMirror-focused) *::-moz-selection { - background: transparent; -}`; -var Selection = import_core7.Extension.create({ - name: "selection", - addOptions() { - return { - className: "selection" - }; - }, - addProseMirrorPlugins() { - const { editor, options } = this; - if (editor.options.injectCSS && typeof document !== "undefined") { - (0, import_core7.createStyleTag)(selectionStyle, editor.options.injectNonce, "selection"); - } - return [ - new import_state5.Plugin({ - key: new import_state5.PluginKey("selection"), - props: { - decorations(state) { - if (state.selection.empty || editor.isFocused || !editor.isEditable || (0, import_core7.isNodeSelection)(state.selection) || editor.view.dragging) { - return null; - } - return import_view4.DecorationSet.create(state.doc, [ - import_view4.Decoration.inline(state.selection.from, state.selection.to, { - class: options.className - }) - ]); - } - } - }) - ]; - } -}); - -// src/trailing-node/trailing-node.ts -var import_core8 = require("@tiptap/core"); -var import_state6 = require("@tiptap/pm/state"); -var skipTrailingNodeMeta = "skipTrailingNode"; -function nodeEqualsType({ - types, - node -}) { - return node && Array.isArray(types) && types.includes(node.type) || (node == null ? void 0 : node.type) === types; -} -var TrailingNode = import_core8.Extension.create({ - name: "trailingNode", - addOptions() { - return { - node: void 0, - notAfter: [] - }; - }, - addProseMirrorPlugins() { - var _a; - const plugin = new import_state6.PluginKey(this.name); - const defaultNode = this.options.node || ((_a = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : _a.name) || "paragraph"; - const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name)); - return [ - new import_state6.Plugin({ - key: plugin, - appendTransaction: (transactions, __, state) => { - const { doc, tr, schema } = state; - const shouldInsertNodeAtEnd = plugin.getState(state); - const endPosition = doc.content.size; - const type = schema.nodes[defaultNode]; - if (transactions.some((transaction) => transaction.getMeta(skipTrailingNodeMeta))) { - return; - } - if (!shouldInsertNodeAtEnd) { - return; - } - return tr.insert(endPosition, type.create()); - }, - state: { - init: (_, state) => { - const lastNode = state.tr.doc.lastChild; - return !nodeEqualsType({ node: lastNode, types: disabledNodes }); - }, - apply: (tr, value) => { - if (!tr.docChanged) { - return value; - } - if (tr.getMeta("__uniqueIDTransaction")) { - return value; - } - const lastNode = tr.doc.lastChild; - return !nodeEqualsType({ node: lastNode, types: disabledNodes }); - } - } - }) - ]; - } -}); - -// src/undo-redo/undo-redo.ts -var import_core9 = require("@tiptap/core"); -var import_history = require("@tiptap/pm/history"); -var UndoRedo = import_core9.Extension.create({ - name: "undoRedo", - addOptions() { - return { - depth: 100, - newGroupDelay: 500 - }; - }, - addCommands() { - return { - undo: () => ({ state, dispatch }) => { - return (0, import_history.undo)(state, dispatch); - }, - redo: () => ({ state, dispatch }) => { - return (0, import_history.redo)(state, dispatch); - } - }; - }, - addProseMirrorPlugins() { - return [(0, import_history.history)(this.options)]; - }, - addKeyboardShortcuts() { - return { - "Mod-z": () => this.editor.commands.undo(), - "Shift-Mod-z": () => this.editor.commands.redo(), - "Mod-y": () => this.editor.commands.redo(), - // Russian keyboard layouts - "Mod-\u044F": () => this.editor.commands.undo(), - "Shift-Mod-\u044F": () => this.editor.commands.redo() - }; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - CharacterCount, - DEFAULT_DATA_ATTRIBUTE, - Dropcursor, - Focus, - Gapcursor, - PLUGIN_KEY, - Placeholder, - Selection, - TrailingNode, - UndoRedo, - preparePlaceholderAttribute, - skipTrailingNodeMeta -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.cjs.map deleted file mode 100644 index c285f77..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/character-count/character-count.ts","../src/drop-cursor/drop-cursor.ts","../src/focus/focus.ts","../src/gap-cursor/gap-cursor.ts","../src/placeholder/constants.ts","../src/placeholder/placeholder.ts","../src/placeholder/plugins/PlaceholderPlugin.ts","../src/placeholder/utils/buildPlaceholderDecorations.ts","../src/placeholder/utils/createPlaceholderDecoration.ts","../src/placeholder/utils/preparePlaceholderAttribute.ts","../src/placeholder/utils/findScrollParent.ts","../src/placeholder/utils/getViewportBoundaryPositions.ts","../src/placeholder/utils/viewportTracking.ts","../src/selection/selection.ts","../src/trailing-node/trailing-node.ts","../src/undo-redo/undo-redo.ts"],"sourcesContent":["export * from './character-count/index.js'\nexport * from './drop-cursor/index.js'\nexport * from './focus/index.js'\nexport * from './gap-cursor/index.js'\nexport * from './placeholder/index.js'\nexport * from './selection/index.js'\nexport * from './trailing-node/index.js'\nexport * from './undo-redo/index.js'\n","import { Extension } from '@tiptap/core'\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\nexport interface CharacterCountOptions {\n /**\n * The maximum number of characters that should be allowed. Defaults to `0`.\n * @default null\n * @example 180\n */\n limit: number | null | undefined\n /**\n * The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used.\n * If set to `nodeSize`, the nodeSize of the document is used.\n * @default 'textSize'\n * @example 'textSize'\n */\n mode: 'textSize' | 'nodeSize'\n /**\n * Sets whether the content will be automatically trimmed when programatically setting content over the limit.\n * If set to false, the user will be able to trim the text manually.\n * @default true\n * @example false\n */\n autoTrim?: boolean\n /**\n * The text counter function to use. Defaults to a simple character count.\n * @default (text) => text.length\n * @example (text) => [...new Intl.Segmenter().segment(text)].length\n */\n textCounter: (text: string) => number\n /**\n * The word counter function to use. Defaults to a simple word count.\n * @default (text) => text.split(' ').filter(word => word !== '').length\n * @example (text) => text.split(/\\s+/).filter(word => word !== '').length\n */\n wordCounter: (text: string) => number\n}\n\nexport interface CharacterCountStorage {\n /**\n * Get the number of characters for the current document.\n * @param options The options for the character count. (optional)\n * @param options.node The node to get the characters from. Defaults to the current document.\n * @param options.mode The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used.\n */\n characters: (options?: { node?: ProseMirrorNode; mode?: 'textSize' | 'nodeSize' }) => number\n\n /**\n * Get the number of words for the current document.\n * @param options The options for the character count. (optional)\n * @param options.node The node to get the words from. Defaults to the current document.\n */\n words: (options?: { node?: ProseMirrorNode }) => number\n}\n\ndeclare module '@tiptap/core' {\n interface Storage {\n characterCount: CharacterCountStorage\n }\n}\n\n/**\n * This extension allows you to count the characters and words of your document.\n * @see https://tiptap.dev/api/extensions/character-count\n */\nexport const CharacterCount = Extension.create({\n name: 'characterCount',\n\n addOptions() {\n return {\n limit: null,\n autoTrim: true,\n mode: 'textSize',\n textCounter: text => text.length,\n wordCounter: text => text.split(' ').filter(word => word !== '').length,\n }\n },\n\n addStorage() {\n return {\n characters: () => 0,\n words: () => 0,\n }\n },\n\n onBeforeCreate() {\n this.storage.characters = options => {\n const node = options?.node || this.editor.state.doc\n const mode = options?.mode || this.options.mode\n\n if (mode === 'textSize') {\n const text = node.textBetween(0, node.content.size, undefined, ' ')\n\n return this.options.textCounter(text)\n }\n\n return node.nodeSize\n }\n\n this.storage.words = options => {\n const node = options?.node || this.editor.state.doc\n const text = node.textBetween(0, node.content.size, ' ', ' ')\n\n return this.options.wordCounter(text)\n }\n },\n\n addProseMirrorPlugins() {\n let initialEvaluationDone = false\n\n return [\n new Plugin({\n key: new PluginKey('characterCount'),\n appendTransaction: (transactions, oldState, newState) => {\n if (initialEvaluationDone) {\n return\n }\n\n const limit = this.options.limit\n const autoTrim = this.options.autoTrim\n\n if (limit === null || limit === undefined || limit === 0 || autoTrim === false) {\n initialEvaluationDone = true\n return\n }\n\n const initialContentSize = this.storage.characters({ node: newState.doc })\n\n if (initialContentSize > limit) {\n const over = initialContentSize - limit\n const from = 0\n const to = over\n\n console.warn(\n `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`,\n )\n const tr = newState.tr.deleteRange(from, to)\n initialEvaluationDone = true\n return tr\n }\n\n initialEvaluationDone = true\n },\n filterTransaction: (transaction, state) => {\n const limit = this.options.limit\n\n // Nothing has changed or no limit is defined. Ignore it.\n if (!transaction.docChanged || limit === 0 || limit === null || limit === undefined) {\n return true\n }\n\n const oldSize = this.storage.characters({ node: state.doc })\n const newSize = this.storage.characters({ node: transaction.doc })\n\n // Everything is in the limit. Good.\n if (newSize <= limit) {\n return true\n }\n\n // The limit has already been exceeded but will be reduced.\n if (oldSize > limit && newSize > limit && newSize <= oldSize) {\n return true\n }\n\n // The limit has already been exceeded and will be increased further.\n if (oldSize > limit && newSize > limit && newSize > oldSize) {\n return false\n }\n\n const isPaste = transaction.getMeta('paste')\n\n // Block all exceeding transactions that were not pasted.\n if (!isPaste) {\n return false\n }\n\n // For pasted content, we try to remove the exceeding content.\n const pos = transaction.selection.$head.pos\n const over = newSize - limit\n const from = pos - over\n const to = pos\n\n // It’s probably a bad idea to mutate transactions within `filterTransaction`\n // but for now this is working fine.\n transaction.deleteRange(from, to)\n\n // In some situations, the limit will continue to be exceeded after trimming.\n // This happens e.g. when truncating within a complex node (e.g. table)\n // and ProseMirror has to close this node again.\n // If this is the case, we prevent the transaction completely.\n const updatedSize = this.storage.characters({ node: transaction.doc })\n\n if (updatedSize > limit) {\n return false\n }\n\n return true\n },\n }),\n ]\n },\n})\n","import { Extension } from '@tiptap/core'\nimport { dropCursor } from '@tiptap/pm/dropcursor'\n\nexport interface DropcursorOptions {\n /**\n * The color of the drop cursor. Use `false` to apply no color and rely only on class.\n * @default 'currentColor'\n * @example 'red'\n */\n color?: string | false\n\n /**\n * The width of the drop cursor\n * @default 1\n * @example 2\n */\n width: number | undefined\n\n /**\n * The class of the drop cursor\n * @default undefined\n * @example 'drop-cursor'\n */\n class: string | undefined\n}\n\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * in-between nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */\nexport const Dropcursor = Extension.create({\n name: 'dropCursor',\n\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [dropCursor(this.options)]\n },\n})\n","import { Extension } from '@tiptap/core'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet } from '@tiptap/pm/view'\n\nexport interface FocusOptions {\n /**\n * The class name that should be added to the focused node.\n * @default 'has-focus'\n * @example 'is-focused'\n */\n className: string\n\n /**\n * The mode by which the focused node is determined.\n * - All: All nodes are marked as focused.\n * - Deepest: Only the deepest node is marked as focused.\n * - Shallowest: Only the shallowest node is marked as focused.\n *\n * @default 'all'\n * @example 'deepest'\n * @example 'shallowest'\n */\n mode: 'all' | 'deepest' | 'shallowest'\n}\n\n/**\n * This extension allows you to add a class to the focused node.\n * @see https://www.tiptap.dev/api/extensions/focus\n */\nexport const Focus = Extension.create({\n name: 'focus',\n\n addOptions() {\n return {\n className: 'has-focus',\n mode: 'all',\n }\n },\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('focus'),\n props: {\n decorations: ({ doc, selection }) => {\n const { isEditable, isFocused } = this.editor\n const { anchor } = selection\n const decorations: Decoration[] = []\n\n if (!isEditable || !isFocused) {\n return DecorationSet.create(doc, [])\n }\n\n // Maximum Levels\n let maxLevels = 0\n\n if (this.options.mode === 'deepest') {\n doc.descendants((node, pos) => {\n if (node.isText) {\n return\n }\n\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1\n\n if (!isCurrent) {\n return false\n }\n\n maxLevels += 1\n })\n }\n\n // Loop through current\n let currentLevel = 0\n\n doc.descendants((node, pos) => {\n if (node.isText) {\n return false\n }\n\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1\n\n if (!isCurrent) {\n return false\n }\n\n currentLevel += 1\n\n const outOfScope =\n (this.options.mode === 'deepest' && maxLevels - currentLevel > 0) ||\n (this.options.mode === 'shallowest' && currentLevel > 1)\n\n if (outOfScope) {\n return this.options.mode === 'deepest'\n }\n\n decorations.push(\n Decoration.node(pos, pos + node.nodeSize, {\n class: this.options.className,\n }),\n )\n })\n\n return DecorationSet.create(doc, decorations)\n },\n },\n }),\n ]\n },\n})\n","import type { ParentConfig } from '@tiptap/core'\nimport { callOrReturn, Extension, getExtensionField } from '@tiptap/core'\nimport { gapCursor } from '@tiptap/pm/gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig {\n /**\n * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.\n * @default null\n */\n allowGapCursor?:\n | boolean\n | null\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['allowGapCursor']\n }) => boolean | null)\n }\n}\n\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */\nexport const Gapcursor = Extension.create({\n name: 'gapCursor',\n\n addProseMirrorPlugins() {\n return [gapCursor()]\n },\n\n extendNodeSchema(extension) {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n\n return {\n allowGapCursor: callOrReturn(getExtensionField(extension, 'allowGapCursor', context)) ?? null,\n }\n },\n})\n","import { PluginKey } from '@tiptap/pm/state'\n\nimport type { ViewportState } from './types.js'\n\n/** The default data attribute label */\nexport const DEFAULT_DATA_ATTRIBUTE = 'placeholder'\n\n/** The plugin key used to store and read the placeholder viewport state */\nexport const PLUGIN_KEY = new PluginKey('tiptap__placeholder')\n\n/**\n * Extra pixels added above and below the visible viewport when computing the\n * range of nodes to decorate. Decorating slightly beyond the fold means a\n * node already has its placeholder before it scrolls into view, which hides\n * the latency introduced by the throttled viewport recompute.\n */\nexport const VIEWPORT_OVERSCAN_PX = 200\n","import { Extension } from '@tiptap/core'\n\nimport { DEFAULT_DATA_ATTRIBUTE } from './constants.js'\nimport { createPlaceholderPlugin } from './plugins/PlaceholderPlugin.js'\nimport type { PlaceholderOptions } from './types.js'\n\n/**\n * This extension allows you to add a placeholder to your editor.\n * A placeholder is a text that appears when the editor or a node is empty.\n * @see https://www.tiptap.dev/api/extensions/placeholder\n */\nexport const Placeholder = Extension.create({\n name: 'placeholder',\n\n addOptions() {\n return {\n emptyEditorClass: 'is-editor-empty',\n emptyNodeClass: 'is-empty',\n dataAttribute: DEFAULT_DATA_ATTRIBUTE,\n placeholder: 'Write something …',\n showOnlyWhenEditable: true,\n showOnlyCurrent: true,\n includeChildren: false,\n }\n },\n\n addProseMirrorPlugins() {\n return [createPlaceholderPlugin({ editor: this.editor, options: this.options })]\n },\n})\n","import type { Editor } from '@tiptap/core'\nimport { Plugin } from '@tiptap/pm/state'\n\nimport { DEFAULT_DATA_ATTRIBUTE, PLUGIN_KEY } from '../constants.js'\nimport type { PlaceholderOptions } from '../types.js'\nimport { buildPlaceholderDecorations } from '../utils/buildPlaceholderDecorations.js'\nimport { preparePlaceholderAttribute } from '../utils/preparePlaceholderAttribute.js'\nimport { createViewportPluginView, viewportPluginState } from '../utils/viewportTracking.js'\n\nexport type CreatePluginOptions = {\n editor: Editor\n options: PlaceholderOptions\n}\n\n/**\n * Creates the ProseMirror plugin that renders placeholder decorations.\n * @param options.editor - The editor instance.\n * @param options.options - The resolved placeholder options.\n * @returns The configured placeholder plugin.\n */\nexport function createPlaceholderPlugin({ editor, options }: CreatePluginOptions) {\n const dataAttribute = options.dataAttribute\n ? `data-${preparePlaceholderAttribute(options.dataAttribute)}`\n : `data-${DEFAULT_DATA_ATTRIBUTE}`\n\n return new Plugin({\n key: PLUGIN_KEY,\n state: viewportPluginState,\n view: createViewportPluginView,\n props: {\n decorations: ({ doc, selection }) =>\n buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }),\n },\n })\n}\n","import type { Editor } from '@tiptap/core'\nimport { isNodeEmpty } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport type { Selection } from '@tiptap/pm/state'\nimport type { Decoration } from '@tiptap/pm/view'\nimport { DecorationSet } from '@tiptap/pm/view'\n\nimport { PLUGIN_KEY } from '../constants.js'\nimport type { PlaceholderOptions } from '../types.js'\nimport { createPlaceholderDecoration } from './createPlaceholderDecoration.js'\n\nfunction resolveEmptyNodeClass(\n emptyNodeClass: PlaceholderOptions['emptyNodeClass'],\n props: { editor: Editor; node: Node; pos: number; hasAnchor: boolean },\n): string {\n return typeof emptyNodeClass === 'function' ? emptyNodeClass(props) : emptyNodeClass\n}\n\n/**\n * Builds the placeholder decorations for the current document state.\n * @param options.editor - The editor instance.\n * @param options.options - The resolved placeholder options.\n * @param options.dataAttribute - The prepared `data-*` attribute name.\n * @param options.doc - The current document node.\n * @param options.selection - The current selection.\n * @returns A decoration set, or `null` when no placeholders should be shown.\n */\nexport function buildPlaceholderDecorations({\n editor,\n options,\n dataAttribute,\n doc,\n selection,\n}: {\n editor: Editor\n options: PlaceholderOptions\n dataAttribute: string\n doc: Node\n selection: Selection\n}): DecorationSet | null {\n const active = editor.isEditable || !options.showOnlyWhenEditable\n\n if (!active) {\n return null\n }\n\n const { anchor } = selection\n const decorations: Decoration[] = []\n const isEmptyDoc = editor.isEmpty\n\n const useResolvedPath = options.showOnlyCurrent && !options.includeChildren\n\n if (useResolvedPath) {\n const resolved = doc.resolve(anchor)\n\n // When the selection spans the whole document (e.g. an `AllSelection`\n // after Cmd+A), the anchor resolves to the document level (depth 0). In\n // that case the relevant textblock is the node directly after the\n // position rather than an ancestor. otherwise the placeholder would\n // disappear after selecting all and deleting.\n const node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter\n const nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor\n\n if (node && node.type.isTextblock && isNodeEmpty(node)) {\n const hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize\n\n decorations.push(\n createPlaceholderDecoration({\n editor,\n isEmptyDoc,\n dataAttribute,\n hasAnchor,\n placeholder: options.placeholder,\n classes: {\n emptyEditor: options.emptyEditorClass,\n emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n editor,\n node,\n pos: nodeStart,\n hasAnchor,\n }),\n },\n node,\n pos: nodeStart,\n }),\n )\n }\n } else {\n const pluginState = PLUGIN_KEY.getState(editor.state)\n const from = pluginState?.topPos ?? 0\n const to = pluginState?.bottomPos ?? doc.content.size\n\n doc.nodesBetween(from, to, (node, pos) => {\n const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize\n const isEmpty = !node.isLeaf && isNodeEmpty(node)\n\n if (!node.type.isTextblock) {\n return options.includeChildren\n }\n\n if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) {\n decorations.push(\n createPlaceholderDecoration({\n editor,\n isEmptyDoc,\n dataAttribute,\n hasAnchor,\n placeholder: options.placeholder,\n classes: {\n emptyEditor: options.emptyEditorClass,\n emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n editor,\n node,\n pos,\n hasAnchor,\n }),\n },\n node,\n pos,\n }),\n )\n }\n\n return options.includeChildren\n })\n }\n\n return DecorationSet.create(doc, decorations)\n}\n","import type { Editor } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport { Decoration } from '@tiptap/pm/view'\n\nimport type { PlaceholderOptions } from '../types.js'\n\n/**\n * Creates a ProseMirror node decoration that applies a placeholder\n * CSS class and data attribute to an empty node.\n * @param options.editor - The editor instance\n * @param options.pos - The position of the node in the document\n * @param options.node - The ProseMirror node\n * @param options.isEmptyDoc - Whether the entire document is empty\n * @param options.hasAnchor - Whether the selection anchor is within the node\n * @param options.dataAttribute - The data attribute name (e.g. `data-placeholder`)\n * @param options.classes - CSS classes for empty nodes and the empty editor\n * @param options.placeholder - The placeholder text or a function that returns it\n * @returns A ProseMirror node decoration with placeholder classes and data attribute\n */\nexport function createPlaceholderDecoration(options: {\n editor: Editor\n pos: number\n node: Node\n isEmptyDoc: boolean\n hasAnchor: boolean\n dataAttribute: string\n classes: {\n emptyEditor: PlaceholderOptions['emptyEditorClass']\n emptyNode: string\n }\n placeholder: PlaceholderOptions['placeholder']\n}) {\n const {\n editor,\n placeholder,\n dataAttribute,\n pos,\n node,\n isEmptyDoc,\n hasAnchor,\n classes: { emptyNode, emptyEditor },\n } = options\n const classes = [emptyNode]\n\n if (isEmptyDoc) {\n classes.push(emptyEditor)\n }\n\n return Decoration.node(pos, pos + node.nodeSize, {\n class: classes.join(' '),\n [dataAttribute]:\n typeof placeholder === 'function'\n ? placeholder({\n editor,\n node,\n pos,\n hasAnchor,\n })\n : placeholder,\n })\n}\n","/**\n * Prepares the placeholder attribute by ensuring it is properly formatted.\n * @param attr - The placeholder attribute string.\n * @returns The prepared placeholder attribute string.\n */\nexport function preparePlaceholderAttribute(attr: string): string {\n return (\n attr\n // replace whitespace with dashes\n .replace(/\\s+/g, '-')\n // replace non-alphanumeric characters\n // or special chars like $, %, &, etc.\n // but not dashes\n .replace(/[^a-zA-Z0-9-]/g, '')\n // and replace any numeric character at the start\n .replace(/^[0-9-]+/, '')\n // and finally replace any stray, leading dashes\n .replace(/^-+/, '')\n .toLowerCase()\n )\n}\n","/**\n * Checks if an element is scrollable by testing its overflow properties.\n * Elements with `overflow: hidden` or `overflow: clip` are intentionally\n * excluded — they clip content but don't emit scroll events.\n */\nfunction isScrollable(el: HTMLElement): boolean {\n const style = getComputedStyle(el)\n const overflow = `${style.overflow} ${style.overflowY} ${style.overflowX}`\n\n return /auto|scroll|overlay/.test(overflow)\n}\n\nexport function findScrollParent(element: HTMLElement): HTMLElement | Window {\n let el: HTMLElement | null = element\n\n while (el) {\n if (isScrollable(el)) {\n return el\n }\n\n // Check if we hit a Shadow DOM boundary. If so, jump to the shadow host\n // and continue traversing the light DOM.\n const parent = el.parentElement\n if (!parent) {\n const root = el.getRootNode()\n if (root instanceof ShadowRoot) {\n el = root.host as HTMLElement\n continue\n }\n\n return window\n }\n\n el = parent\n }\n\n return window\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorView } from '@tiptap/pm/view'\n\nimport { VIEWPORT_OVERSCAN_PX } from '../constants.js'\n\nfunction getContainerRect(container: HTMLElement | Window): { top: number; bottom: number } {\n if (container === window) {\n return { top: 0, bottom: window.innerHeight }\n }\n\n return (container as HTMLElement).getBoundingClientRect()\n}\n\nexport function getViewportBoundaryPositions({\n doc,\n view,\n scrollContainer,\n}: {\n doc: Node\n view: EditorView\n scrollContainer?: HTMLElement | Window\n}) {\n const editorRect = view.dom.getBoundingClientRect()\n const containerRect = scrollContainer\n ? getContainerRect(scrollContainer)\n : { top: 0, bottom: window.innerHeight }\n\n const visibleTop = Math.max(editorRect.top, containerRect.top) - VIEWPORT_OVERSCAN_PX\n const visibleBottom = Math.min(editorRect.bottom, containerRect.bottom) + VIEWPORT_OVERSCAN_PX\n\n if (visibleTop >= visibleBottom) {\n // Editor is not visible — fall back to full document range\n return { top: 0, bottom: doc.content.size }\n }\n\n // Pick the x-coordinate based on text direction. In LTR the content\n // starts at the left edge; in RTL it starts at the right edge.\n // Clamp to ensure the coordinate stays inside the editor bounds.\n const isRTL = getComputedStyle(view.dom).direction === 'rtl'\n const x = isRTL ? Math.max(editorRect.right - 2, editorRect.left + 2) : editorRect.left + 2\n\n const topPos = view.posAtCoords({ left: x, top: visibleTop + 2 })\n const bottomPos = view.posAtCoords({ left: x, top: visibleBottom - 2 })\n\n return {\n top: topPos ? topPos.pos : 0,\n bottom: bottomPos ? bottomPos.pos : doc.content.size,\n }\n}\n","import type { EditorState, PluginView, StateField, Transaction } from '@tiptap/pm/state'\nimport type { EditorView } from '@tiptap/pm/view'\n\nimport { PLUGIN_KEY } from '../constants.js'\nimport type { ViewportState } from '../types.js'\nimport { findScrollParent } from './findScrollParent.js'\nimport { getViewportBoundaryPositions } from './getViewportBoundaryPositions.js'\n\n/**\n * The plugin `state` config that tracks the visible viewport boundaries so the\n * decoration callback only scans the nodes currently on screen.\n */\nexport const viewportPluginState: StateField = {\n /**\n * Initialises the viewport state with no known positions.\n * @returns The initial viewport state.\n */\n init(): ViewportState {\n return { topPos: null, bottomPos: null }\n },\n\n /**\n * Updates the viewport state from incoming transactions.\n * @param tr - The transaction being applied.\n * @param prev - The previous viewport state.\n * @returns The next viewport state.\n */\n apply(tr: Transaction, prev: ViewportState): ViewportState {\n const meta = tr.getMeta(PLUGIN_KEY) as\n | { positions?: { top: number; bottom: number } }\n | undefined\n\n if (meta?.positions) {\n return { topPos: meta.positions.top, bottomPos: meta.positions.bottom }\n }\n\n if (!tr.docChanged) {\n return prev\n }\n\n // Preserve last known viewport positions across transactions.\n // Without this, every keystroke resets back to a full document\n // scan, defeating the viewport optimisation.\n // Only map when we have actual positions — null means \"no viewport\n // info yet\" and should stay null to fall back to full doc scan.\n return {\n topPos: prev.topPos !== null ? tr.mapping.map(prev.topPos) : null,\n bottomPos: prev.bottomPos !== null ? tr.mapping.map(prev.bottomPos) : null,\n }\n },\n}\n\n/**\n * Creates the plugin `view` that recomputes the visible viewport on scroll and\n * document size changes, dispatching the result into the plugin state.\n * @param view - The editor view the plugin is attached to.\n * @returns A plugin view with `update` and `destroy` handlers.\n */\nexport function createViewportPluginView(view: EditorView): PluginView {\n const scrollContainer = findScrollParent(view.dom)\n\n const computeAndDispatch = () => {\n const positions = getViewportBoundaryPositions({\n view,\n doc: view.state.doc,\n scrollContainer,\n })\n\n const prev = PLUGIN_KEY.getState(view.state)\n if (prev?.topPos === positions.top && prev?.bottomPos === positions.bottom) {\n return\n }\n\n const tr = view.state.tr.setMeta(PLUGIN_KEY, { positions })\n view.dispatch(tr)\n }\n\n // rAF-based scheduler with interval guard (150ms → ~6–7 Hz) used by\n // scroll events and update(). The overscan margin hides the extra\n // latency. When the guard blocks, the callback reschedules itself so\n // the trailing position is always captured.\n let frame: number | null = null\n let lastCompute = 0\n const MIN_SCROLL_INTERVAL = 150\n\n const scheduleFrame = () => {\n if (frame !== null) return\n frame = requestAnimationFrame(() => {\n frame = null\n const now = performance.now()\n if (now - lastCompute >= MIN_SCROLL_INTERVAL) {\n lastCompute = now\n computeAndDispatch()\n } else {\n scheduleFrame()\n }\n })\n }\n\n scrollContainer.addEventListener('scroll', scheduleFrame, { passive: true })\n\n // Fire once to populate initial viewport\n computeAndDispatch()\n\n return {\n update(_view: EditorView, prevState: EditorState) {\n if (view.state.doc.content.size !== prevState.doc.content.size) {\n scheduleFrame()\n }\n },\n destroy: () => {\n if (frame !== null) {\n cancelAnimationFrame(frame)\n }\n scrollContainer.removeEventListener('scroll', scheduleFrame)\n },\n }\n}\n","import { createStyleTag, Extension, isNodeSelection } from '@tiptap/core'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet } from '@tiptap/pm/view'\n\nconst selectionStyle = `.ProseMirror:not(.ProseMirror-focused) *::selection {\n background: transparent;\n}\n\n.ProseMirror:not(.ProseMirror-focused) *::-moz-selection {\n background: transparent;\n}`\n\nexport type SelectionOptions = {\n /**\n * The class name that should be added to the selected text.\n * @default 'selection'\n * @example 'is-selected'\n */\n className: string\n}\n\n/**\n * This extension allows you to add a class to the selected text.\n * @see https://www.tiptap.dev/api/extensions/selection\n */\nexport const Selection = Extension.create({\n name: 'selection',\n\n addOptions() {\n return {\n className: 'selection',\n }\n },\n\n addProseMirrorPlugins() {\n const { editor, options } = this\n\n if (editor.options.injectCSS && typeof document !== 'undefined') {\n createStyleTag(selectionStyle, editor.options.injectNonce, 'selection')\n }\n\n return [\n new Plugin({\n key: new PluginKey('selection'),\n props: {\n decorations(state) {\n if (\n state.selection.empty ||\n editor.isFocused ||\n !editor.isEditable ||\n isNodeSelection(state.selection) ||\n editor.view.dragging\n ) {\n return null\n }\n\n return DecorationSet.create(state.doc, [\n Decoration.inline(state.selection.from, state.selection.to, {\n class: options.className,\n }),\n ])\n },\n },\n }),\n ]\n },\n})\n\nexport default Selection\n","import { Extension } from '@tiptap/core'\nimport type { Node, NodeType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\nexport const skipTrailingNodeMeta = 'skipTrailingNode'\n\nfunction nodeEqualsType({\n types,\n node,\n}: {\n types: NodeType | NodeType[]\n node: Node | null | undefined\n}) {\n return (node && Array.isArray(types) && types.includes(node.type)) || node?.type === types\n}\n\n/**\n * Extension based on:\n * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js\n * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts\n */\n\nexport interface TrailingNodeOptions {\n /**\n * The node type that should be inserted at the end of the document.\n * @note the node will always be added to the `notAfter` lists to\n * prevent an infinite loop.\n * @default undefined\n */\n node?: string\n /**\n * The node types after which the trailing node should not be inserted.\n * @default ['paragraph']\n */\n notAfter?: string | string[]\n}\n\n/**\n * This extension allows you to add an extra node at the end of the document.\n * @see https://www.tiptap.dev/api/extensions/trailing-node\n */\nexport const TrailingNode = Extension.create({\n name: 'trailingNode',\n\n addOptions() {\n return {\n node: undefined,\n notAfter: [],\n }\n },\n\n addProseMirrorPlugins() {\n const plugin = new PluginKey(this.name)\n const defaultNode =\n this.options.node ||\n this.editor.schema.topNodeType.contentMatch.defaultType?.name ||\n 'paragraph'\n\n const disabledNodes = Object.entries(this.editor.schema.nodes)\n .map(([, value]) => value)\n .filter(node => (this.options.notAfter || []).concat(defaultNode).includes(node.name))\n\n return [\n new Plugin({\n key: plugin,\n appendTransaction: (transactions, __, state) => {\n const { doc, tr, schema } = state\n const shouldInsertNodeAtEnd = plugin.getState(state)\n const endPosition = doc.content.size\n const type = schema.nodes[defaultNode]\n\n if (transactions.some(transaction => transaction.getMeta(skipTrailingNodeMeta))) {\n return\n }\n\n if (!shouldInsertNodeAtEnd) {\n return\n }\n\n return tr.insert(endPosition, type.create())\n },\n state: {\n init: (_, state) => {\n const lastNode = state.tr.doc.lastChild\n\n return !nodeEqualsType({ node: lastNode, types: disabledNodes })\n },\n apply: (tr, value) => {\n if (!tr.docChanged) {\n return value\n }\n\n // Ignore transactions from UniqueID extension to prevent infinite loops\n // when UniqueID adds IDs to newly inserted trailing nodes\n if (tr.getMeta('__uniqueIDTransaction')) {\n return value\n }\n\n const lastNode = tr.doc.lastChild\n\n return !nodeEqualsType({ node: lastNode, types: disabledNodes })\n },\n },\n }),\n ]\n },\n})\n","import { Extension } from '@tiptap/core'\nimport { history, redo, undo } from '@tiptap/pm/history'\n\nexport interface UndoRedoOptions {\n /**\n * The amount of history events that are collected before the oldest events are discarded.\n * @default 100\n * @example 50\n */\n depth: number\n\n /**\n * The delay (in milliseconds) between changes after which a new group should be started.\n * @default 500\n * @example 1000\n */\n newGroupDelay: number\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n undoRedo: {\n /**\n * Undo recent changes\n * @example editor.commands.undo()\n */\n undo: () => ReturnType\n /**\n * Reapply reverted changes\n * @example editor.commands.redo()\n */\n redo: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to undo and redo recent changes.\n * @see https://www.tiptap.dev/api/extensions/undo-redo\n *\n * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n * the `undo-redo` extension, as it is not compatible with the `collaboration` extension.\n *\n * `@tiptap/extension-collaboration` uses its own history implementation.\n */\nexport const UndoRedo = Extension.create({\n name: 'undoRedo',\n\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500,\n }\n },\n\n addCommands() {\n return {\n undo:\n () =>\n ({ state, dispatch }) => {\n return undo(state, dispatch)\n },\n redo:\n () =>\n ({ state, dispatch }) => {\n return redo(state, dispatch)\n },\n }\n },\n\n addProseMirrorPlugins() {\n return [history(this.options)]\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-z': () => this.editor.commands.undo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n 'Mod-y': () => this.editor.commands.redo(),\n\n // Russian keyboard layouts\n 'Mod-я': () => this.editor.commands.undo(),\n 'Shift-Mod-я': () => this.editor.commands.redo(),\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA0B;AAE1B,mBAAkC;AAgE3B,IAAM,iBAAiB,sBAAU,OAAqD;AAAA,EAC3F,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,MAAM;AAAA,MACN,aAAa,UAAQ,KAAK;AAAA,MAC1B,aAAa,UAAQ,KAAK,MAAM,GAAG,EAAE,OAAO,UAAQ,SAAS,EAAE,EAAE;AAAA,IACn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ACjE;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;;;AC1GD,IAAAC,eAA0B;AAC1B,qBAAoC;AA4C7B,IAAM,WAAW,uBAAU,OAAwB;AAAA,EACxD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,OAAO;AAAA,MACP,eAAe;AAAA,IACjB;AAAA,EACF;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,MACE,MACA,CAAC,EAAE,OAAO,SAAS,MAAM;AACvB,mBAAO,qBAAK,OAAO,QAAQ;AAAA,MAC7B;AAAA,MACF,MACE,MACA,CAAC,EAAE,OAAO,SAAS,MAAM;AACvB,mBAAO,qBAAK,OAAO,QAAQ;AAAA,MAC7B;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,WAAO,KAAC,wBAAQ,KAAK,OAAO,CAAC;AAAA,EAC/B;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,SAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MACzC,eAAe,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MAC/C,SAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA;AAAA,MAGzC,cAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MACzC,oBAAe,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,IACjD;AAAA,EACF;AACF,CAAC;","names":["import_core","import_core","import_state","import_core","import_state","import_core","import_state","import_core","import_view","import_view","import_core","import_state","import_view","import_core","import_state","import_core"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.d.cts deleted file mode 100644 index f579d4f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.d.cts +++ /dev/null @@ -1,316 +0,0 @@ -import { Extension, ParentConfig, Editor } from '@tiptap/core'; -import { Node } from '@tiptap/pm/model'; -import { PluginKey } from '@tiptap/pm/state'; - -interface CharacterCountOptions { - /** - * The maximum number of characters that should be allowed. Defaults to `0`. - * @default null - * @example 180 - */ - limit: number | null | undefined; - /** - * The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used. - * If set to `nodeSize`, the nodeSize of the document is used. - * @default 'textSize' - * @example 'textSize' - */ - mode: 'textSize' | 'nodeSize'; - /** - * Sets whether the content will be automatically trimmed when programatically setting content over the limit. - * If set to false, the user will be able to trim the text manually. - * @default true - * @example false - */ - autoTrim?: boolean; - /** - * The text counter function to use. Defaults to a simple character count. - * @default (text) => text.length - * @example (text) => [...new Intl.Segmenter().segment(text)].length - */ - textCounter: (text: string) => number; - /** - * The word counter function to use. Defaults to a simple word count. - * @default (text) => text.split(' ').filter(word => word !== '').length - * @example (text) => text.split(/\s+/).filter(word => word !== '').length - */ - wordCounter: (text: string) => number; -} -interface CharacterCountStorage { - /** - * Get the number of characters for the current document. - * @param options The options for the character count. (optional) - * @param options.node The node to get the characters from. Defaults to the current document. - * @param options.mode The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used. - */ - characters: (options?: { - node?: Node; - mode?: 'textSize' | 'nodeSize'; - }) => number; - /** - * Get the number of words for the current document. - * @param options The options for the character count. (optional) - * @param options.node The node to get the words from. Defaults to the current document. - */ - words: (options?: { - node?: Node; - }) => number; -} -declare module '@tiptap/core' { - interface Storage { - characterCount: CharacterCountStorage; - } -} -/** - * This extension allows you to count the characters and words of your document. - * @see https://tiptap.dev/api/extensions/character-count - */ -declare const CharacterCount: Extension; - -interface DropcursorOptions { - /** - * The color of the drop cursor. Use `false` to apply no color and rely only on class. - * @default 'currentColor' - * @example 'red' - */ - color?: string | false; - /** - * The width of the drop cursor - * @default 1 - * @example 2 - */ - width: number | undefined; - /** - * The class of the drop cursor - * @default undefined - * @example 'drop-cursor' - */ - class: string | undefined; -} -/** - * This extension allows you to add a drop cursor to your editor. - * A drop cursor is a line that appears when you drag and drop content - * in-between nodes. - * @see https://tiptap.dev/api/extensions/dropcursor - */ -declare const Dropcursor: Extension; - -interface FocusOptions { - /** - * The class name that should be added to the focused node. - * @default 'has-focus' - * @example 'is-focused' - */ - className: string; - /** - * The mode by which the focused node is determined. - * - All: All nodes are marked as focused. - * - Deepest: Only the deepest node is marked as focused. - * - Shallowest: Only the shallowest node is marked as focused. - * - * @default 'all' - * @example 'deepest' - * @example 'shallowest' - */ - mode: 'all' | 'deepest' | 'shallowest'; -} -/** - * This extension allows you to add a class to the focused node. - * @see https://www.tiptap.dev/api/extensions/focus - */ -declare const Focus: Extension; - -declare module '@tiptap/core' { - interface NodeConfig { - /** - * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`. - * @default null - */ - allowGapCursor?: boolean | null | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['allowGapCursor']; - }) => boolean | null); - } -} -/** - * This extension allows you to add a gap cursor to your editor. - * A gap cursor is a cursor that appears when you click on a place - * where no content is present, for example inbetween nodes. - * @see https://tiptap.dev/api/extensions/gapcursor - */ -declare const Gapcursor: Extension; - -/** - * The viewport positions tracked by the placeholder plugin. - * `null` means "no viewport info yet" — the decoration callback falls back to - * a full document scan until the scroll handler fires. - */ -interface ViewportState { - topPos: number | null; - bottomPos: number | null; -} -interface PlaceholderOptions { - /** - * **The class name for the empty editor** - * @default 'is-editor-empty' - */ - emptyEditorClass: string; - /** - * **The class name for empty nodes** - * - * You can use a function to return a dynamic class name or a string. - * @default 'is-empty' - */ - emptyNodeClass: ((EmptyNodeClassProps: { - editor: Editor; - node: Node; - pos: number; - hasAnchor: boolean; - }) => string) | string; - /** - * **The data-attribute used for the placeholder label** - * Will be prepended with `data-` and converted to kebab-case and cleaned of special characters. - * @default 'placeholder' - */ - dataAttribute: string; - /** - * **The placeholder content** - * - * You can use a function to return a dynamic placeholder or a string. - * @default 'Write something …' - */ - placeholder: ((PlaceholderProps: { - editor: Editor; - node: Node; - pos: number; - hasAnchor: boolean; - }) => string) | string; - /** - * **Checks if the placeholder should be only shown when the editor is editable.** - * - * If true, the placeholder will only be shown when the editor is editable. - * If false, the placeholder will always be shown. - * @default true - */ - showOnlyWhenEditable: boolean; - /** - * **Checks if the placeholder should be only shown when the current node is empty.** - * - * If true, the placeholder will only be shown when the current node is empty. - * If false, the placeholder will be shown when any node is empty. - * @default true - */ - showOnlyCurrent: boolean; - /** - * **Controls if the placeholder should be shown for all descendants.** - * - * If true, the placeholder will be shown for all descendants. - * If false, the placeholder will only be shown for the current node. - * @default false - */ - includeChildren: boolean; -} - -/** The default data attribute label */ -declare const DEFAULT_DATA_ATTRIBUTE = "placeholder"; -/** The plugin key used to store and read the placeholder viewport state */ -declare const PLUGIN_KEY: PluginKey; - -/** - * This extension allows you to add a placeholder to your editor. - * A placeholder is a text that appears when the editor or a node is empty. - * @see https://www.tiptap.dev/api/extensions/placeholder - */ -declare const Placeholder: Extension; - -/** - * Prepares the placeholder attribute by ensuring it is properly formatted. - * @param attr - The placeholder attribute string. - * @returns The prepared placeholder attribute string. - */ -declare function preparePlaceholderAttribute(attr: string): string; - -type SelectionOptions = { - /** - * The class name that should be added to the selected text. - * @default 'selection' - * @example 'is-selected' - */ - className: string; -}; -/** - * This extension allows you to add a class to the selected text. - * @see https://www.tiptap.dev/api/extensions/selection - */ -declare const Selection: Extension; - -declare const skipTrailingNodeMeta = "skipTrailingNode"; -/** - * Extension based on: - * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js - * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts - */ -interface TrailingNodeOptions { - /** - * The node type that should be inserted at the end of the document. - * @note the node will always be added to the `notAfter` lists to - * prevent an infinite loop. - * @default undefined - */ - node?: string; - /** - * The node types after which the trailing node should not be inserted. - * @default ['paragraph'] - */ - notAfter?: string | string[]; -} -/** - * This extension allows you to add an extra node at the end of the document. - * @see https://www.tiptap.dev/api/extensions/trailing-node - */ -declare const TrailingNode: Extension; - -interface UndoRedoOptions { - /** - * The amount of history events that are collected before the oldest events are discarded. - * @default 100 - * @example 50 - */ - depth: number; - /** - * The delay (in milliseconds) between changes after which a new group should be started. - * @default 500 - * @example 1000 - */ - newGroupDelay: number; -} -declare module '@tiptap/core' { - interface Commands { - undoRedo: { - /** - * Undo recent changes - * @example editor.commands.undo() - */ - undo: () => ReturnType; - /** - * Reapply reverted changes - * @example editor.commands.redo() - */ - redo: () => ReturnType; - }; - } -} -/** - * This extension allows you to undo and redo recent changes. - * @see https://www.tiptap.dev/api/extensions/undo-redo - * - * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove - * the `undo-redo` extension, as it is not compatible with the `collaboration` extension. - * - * `@tiptap/extension-collaboration` uses its own history implementation. - */ -declare const UndoRedo: Extension; - -export { CharacterCount, type CharacterCountOptions, type CharacterCountStorage, DEFAULT_DATA_ATTRIBUTE, Dropcursor, type DropcursorOptions, Focus, type FocusOptions, Gapcursor, PLUGIN_KEY, Placeholder, type PlaceholderOptions, Selection, type SelectionOptions, TrailingNode, type TrailingNodeOptions, UndoRedo, type UndoRedoOptions, type ViewportState, preparePlaceholderAttribute, skipTrailingNodeMeta }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.d.ts deleted file mode 100644 index f579d4f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.d.ts +++ /dev/null @@ -1,316 +0,0 @@ -import { Extension, ParentConfig, Editor } from '@tiptap/core'; -import { Node } from '@tiptap/pm/model'; -import { PluginKey } from '@tiptap/pm/state'; - -interface CharacterCountOptions { - /** - * The maximum number of characters that should be allowed. Defaults to `0`. - * @default null - * @example 180 - */ - limit: number | null | undefined; - /** - * The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used. - * If set to `nodeSize`, the nodeSize of the document is used. - * @default 'textSize' - * @example 'textSize' - */ - mode: 'textSize' | 'nodeSize'; - /** - * Sets whether the content will be automatically trimmed when programatically setting content over the limit. - * If set to false, the user will be able to trim the text manually. - * @default true - * @example false - */ - autoTrim?: boolean; - /** - * The text counter function to use. Defaults to a simple character count. - * @default (text) => text.length - * @example (text) => [...new Intl.Segmenter().segment(text)].length - */ - textCounter: (text: string) => number; - /** - * The word counter function to use. Defaults to a simple word count. - * @default (text) => text.split(' ').filter(word => word !== '').length - * @example (text) => text.split(/\s+/).filter(word => word !== '').length - */ - wordCounter: (text: string) => number; -} -interface CharacterCountStorage { - /** - * Get the number of characters for the current document. - * @param options The options for the character count. (optional) - * @param options.node The node to get the characters from. Defaults to the current document. - * @param options.mode The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used. - */ - characters: (options?: { - node?: Node; - mode?: 'textSize' | 'nodeSize'; - }) => number; - /** - * Get the number of words for the current document. - * @param options The options for the character count. (optional) - * @param options.node The node to get the words from. Defaults to the current document. - */ - words: (options?: { - node?: Node; - }) => number; -} -declare module '@tiptap/core' { - interface Storage { - characterCount: CharacterCountStorage; - } -} -/** - * This extension allows you to count the characters and words of your document. - * @see https://tiptap.dev/api/extensions/character-count - */ -declare const CharacterCount: Extension; - -interface DropcursorOptions { - /** - * The color of the drop cursor. Use `false` to apply no color and rely only on class. - * @default 'currentColor' - * @example 'red' - */ - color?: string | false; - /** - * The width of the drop cursor - * @default 1 - * @example 2 - */ - width: number | undefined; - /** - * The class of the drop cursor - * @default undefined - * @example 'drop-cursor' - */ - class: string | undefined; -} -/** - * This extension allows you to add a drop cursor to your editor. - * A drop cursor is a line that appears when you drag and drop content - * in-between nodes. - * @see https://tiptap.dev/api/extensions/dropcursor - */ -declare const Dropcursor: Extension; - -interface FocusOptions { - /** - * The class name that should be added to the focused node. - * @default 'has-focus' - * @example 'is-focused' - */ - className: string; - /** - * The mode by which the focused node is determined. - * - All: All nodes are marked as focused. - * - Deepest: Only the deepest node is marked as focused. - * - Shallowest: Only the shallowest node is marked as focused. - * - * @default 'all' - * @example 'deepest' - * @example 'shallowest' - */ - mode: 'all' | 'deepest' | 'shallowest'; -} -/** - * This extension allows you to add a class to the focused node. - * @see https://www.tiptap.dev/api/extensions/focus - */ -declare const Focus: Extension; - -declare module '@tiptap/core' { - interface NodeConfig { - /** - * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`. - * @default null - */ - allowGapCursor?: boolean | null | ((this: { - name: string; - options: Options; - storage: Storage; - parent: ParentConfig>['allowGapCursor']; - }) => boolean | null); - } -} -/** - * This extension allows you to add a gap cursor to your editor. - * A gap cursor is a cursor that appears when you click on a place - * where no content is present, for example inbetween nodes. - * @see https://tiptap.dev/api/extensions/gapcursor - */ -declare const Gapcursor: Extension; - -/** - * The viewport positions tracked by the placeholder plugin. - * `null` means "no viewport info yet" — the decoration callback falls back to - * a full document scan until the scroll handler fires. - */ -interface ViewportState { - topPos: number | null; - bottomPos: number | null; -} -interface PlaceholderOptions { - /** - * **The class name for the empty editor** - * @default 'is-editor-empty' - */ - emptyEditorClass: string; - /** - * **The class name for empty nodes** - * - * You can use a function to return a dynamic class name or a string. - * @default 'is-empty' - */ - emptyNodeClass: ((EmptyNodeClassProps: { - editor: Editor; - node: Node; - pos: number; - hasAnchor: boolean; - }) => string) | string; - /** - * **The data-attribute used for the placeholder label** - * Will be prepended with `data-` and converted to kebab-case and cleaned of special characters. - * @default 'placeholder' - */ - dataAttribute: string; - /** - * **The placeholder content** - * - * You can use a function to return a dynamic placeholder or a string. - * @default 'Write something …' - */ - placeholder: ((PlaceholderProps: { - editor: Editor; - node: Node; - pos: number; - hasAnchor: boolean; - }) => string) | string; - /** - * **Checks if the placeholder should be only shown when the editor is editable.** - * - * If true, the placeholder will only be shown when the editor is editable. - * If false, the placeholder will always be shown. - * @default true - */ - showOnlyWhenEditable: boolean; - /** - * **Checks if the placeholder should be only shown when the current node is empty.** - * - * If true, the placeholder will only be shown when the current node is empty. - * If false, the placeholder will be shown when any node is empty. - * @default true - */ - showOnlyCurrent: boolean; - /** - * **Controls if the placeholder should be shown for all descendants.** - * - * If true, the placeholder will be shown for all descendants. - * If false, the placeholder will only be shown for the current node. - * @default false - */ - includeChildren: boolean; -} - -/** The default data attribute label */ -declare const DEFAULT_DATA_ATTRIBUTE = "placeholder"; -/** The plugin key used to store and read the placeholder viewport state */ -declare const PLUGIN_KEY: PluginKey; - -/** - * This extension allows you to add a placeholder to your editor. - * A placeholder is a text that appears when the editor or a node is empty. - * @see https://www.tiptap.dev/api/extensions/placeholder - */ -declare const Placeholder: Extension; - -/** - * Prepares the placeholder attribute by ensuring it is properly formatted. - * @param attr - The placeholder attribute string. - * @returns The prepared placeholder attribute string. - */ -declare function preparePlaceholderAttribute(attr: string): string; - -type SelectionOptions = { - /** - * The class name that should be added to the selected text. - * @default 'selection' - * @example 'is-selected' - */ - className: string; -}; -/** - * This extension allows you to add a class to the selected text. - * @see https://www.tiptap.dev/api/extensions/selection - */ -declare const Selection: Extension; - -declare const skipTrailingNodeMeta = "skipTrailingNode"; -/** - * Extension based on: - * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js - * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts - */ -interface TrailingNodeOptions { - /** - * The node type that should be inserted at the end of the document. - * @note the node will always be added to the `notAfter` lists to - * prevent an infinite loop. - * @default undefined - */ - node?: string; - /** - * The node types after which the trailing node should not be inserted. - * @default ['paragraph'] - */ - notAfter?: string | string[]; -} -/** - * This extension allows you to add an extra node at the end of the document. - * @see https://www.tiptap.dev/api/extensions/trailing-node - */ -declare const TrailingNode: Extension; - -interface UndoRedoOptions { - /** - * The amount of history events that are collected before the oldest events are discarded. - * @default 100 - * @example 50 - */ - depth: number; - /** - * The delay (in milliseconds) between changes after which a new group should be started. - * @default 500 - * @example 1000 - */ - newGroupDelay: number; -} -declare module '@tiptap/core' { - interface Commands { - undoRedo: { - /** - * Undo recent changes - * @example editor.commands.undo() - */ - undo: () => ReturnType; - /** - * Reapply reverted changes - * @example editor.commands.redo() - */ - redo: () => ReturnType; - }; - } -} -/** - * This extension allows you to undo and redo recent changes. - * @see https://www.tiptap.dev/api/extensions/undo-redo - * - * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove - * the `undo-redo` extension, as it is not compatible with the `collaboration` extension. - * - * `@tiptap/extension-collaboration` uses its own history implementation. - */ -declare const UndoRedo: Extension; - -export { CharacterCount, type CharacterCountOptions, type CharacterCountStorage, DEFAULT_DATA_ATTRIBUTE, Dropcursor, type DropcursorOptions, Focus, type FocusOptions, Gapcursor, PLUGIN_KEY, Placeholder, type PlaceholderOptions, Selection, type SelectionOptions, TrailingNode, type TrailingNodeOptions, UndoRedo, type UndoRedoOptions, type ViewportState, preparePlaceholderAttribute, skipTrailingNodeMeta }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.js deleted file mode 100644 index 59953c6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.js +++ /dev/null @@ -1,655 +0,0 @@ -// src/character-count/character-count.ts -import { Extension } from "@tiptap/core"; -import { Plugin, PluginKey } from "@tiptap/pm/state"; -var CharacterCount = Extension.create({ - name: "characterCount", - addOptions() { - return { - limit: null, - autoTrim: true, - mode: "textSize", - textCounter: (text) => text.length, - wordCounter: (text) => text.split(" ").filter((word) => word !== "").length - }; - }, - addStorage() { - return { - characters: () => 0, - words: () => 0 - }; - }, - onBeforeCreate() { - this.storage.characters = (options) => { - const node = (options == null ? void 0 : options.node) || this.editor.state.doc; - const mode = (options == null ? void 0 : options.mode) || this.options.mode; - if (mode === "textSize") { - const text = node.textBetween(0, node.content.size, void 0, " "); - return this.options.textCounter(text); - } - return node.nodeSize; - }; - this.storage.words = (options) => { - const node = (options == null ? void 0 : options.node) || this.editor.state.doc; - const text = node.textBetween(0, node.content.size, " ", " "); - return this.options.wordCounter(text); - }; - }, - addProseMirrorPlugins() { - let initialEvaluationDone = false; - return [ - new Plugin({ - key: new PluginKey("characterCount"), - appendTransaction: (transactions, oldState, newState) => { - if (initialEvaluationDone) { - return; - } - const limit = this.options.limit; - const autoTrim = this.options.autoTrim; - if (limit === null || limit === void 0 || limit === 0 || autoTrim === false) { - initialEvaluationDone = true; - return; - } - const initialContentSize = this.storage.characters({ node: newState.doc }); - if (initialContentSize > limit) { - const over = initialContentSize - limit; - const from = 0; - const to = over; - console.warn( - `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.` - ); - const tr = newState.tr.deleteRange(from, to); - initialEvaluationDone = true; - return tr; - } - initialEvaluationDone = true; - }, - filterTransaction: (transaction, state) => { - const limit = this.options.limit; - if (!transaction.docChanged || limit === 0 || limit === null || limit === void 0) { - return true; - } - const oldSize = this.storage.characters({ node: state.doc }); - const newSize = this.storage.characters({ node: transaction.doc }); - if (newSize <= limit) { - return true; - } - if (oldSize > limit && newSize > limit && newSize <= oldSize) { - return true; - } - if (oldSize > limit && newSize > limit && newSize > oldSize) { - return false; - } - const isPaste = transaction.getMeta("paste"); - if (!isPaste) { - return false; - } - const pos = transaction.selection.$head.pos; - const over = newSize - limit; - const from = pos - over; - const to = pos; - transaction.deleteRange(from, to); - const updatedSize = this.storage.characters({ node: transaction.doc }); - if (updatedSize > limit) { - return false; - } - return true; - } - }) - ]; - } -}); - -// src/drop-cursor/drop-cursor.ts -import { Extension as Extension2 } from "@tiptap/core"; -import { dropCursor } from "@tiptap/pm/dropcursor"; -var Dropcursor = Extension2.create({ - name: "dropCursor", - addOptions() { - return { - color: "currentColor", - width: 1, - class: void 0 - }; - }, - addProseMirrorPlugins() { - return [dropCursor(this.options)]; - } -}); - -// src/focus/focus.ts -import { Extension as Extension3 } from "@tiptap/core"; -import { Plugin as Plugin2, PluginKey as PluginKey2 } from "@tiptap/pm/state"; -import { Decoration, DecorationSet } from "@tiptap/pm/view"; -var Focus = Extension3.create({ - name: "focus", - addOptions() { - return { - className: "has-focus", - mode: "all" - }; - }, - addProseMirrorPlugins() { - return [ - new Plugin2({ - key: new PluginKey2("focus"), - props: { - decorations: ({ doc, selection }) => { - const { isEditable, isFocused } = this.editor; - const { anchor } = selection; - const decorations = []; - if (!isEditable || !isFocused) { - return DecorationSet.create(doc, []); - } - let maxLevels = 0; - if (this.options.mode === "deepest") { - doc.descendants((node, pos) => { - if (node.isText) { - return; - } - const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1; - if (!isCurrent) { - return false; - } - maxLevels += 1; - }); - } - let currentLevel = 0; - doc.descendants((node, pos) => { - if (node.isText) { - return false; - } - const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1; - if (!isCurrent) { - return false; - } - currentLevel += 1; - const outOfScope = this.options.mode === "deepest" && maxLevels - currentLevel > 0 || this.options.mode === "shallowest" && currentLevel > 1; - if (outOfScope) { - return this.options.mode === "deepest"; - } - decorations.push( - Decoration.node(pos, pos + node.nodeSize, { - class: this.options.className - }) - ); - }); - return DecorationSet.create(doc, decorations); - } - } - }) - ]; - } -}); - -// src/gap-cursor/gap-cursor.ts -import { callOrReturn, Extension as Extension4, getExtensionField } from "@tiptap/core"; -import { gapCursor } from "@tiptap/pm/gapcursor"; -var Gapcursor = Extension4.create({ - name: "gapCursor", - addProseMirrorPlugins() { - return [gapCursor()]; - }, - extendNodeSchema(extension) { - var _a; - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage - }; - return { - allowGapCursor: (_a = callOrReturn(getExtensionField(extension, "allowGapCursor", context))) != null ? _a : null - }; - } -}); - -// src/placeholder/constants.ts -import { PluginKey as PluginKey3 } from "@tiptap/pm/state"; -var DEFAULT_DATA_ATTRIBUTE = "placeholder"; -var PLUGIN_KEY = new PluginKey3("tiptap__placeholder"); -var VIEWPORT_OVERSCAN_PX = 200; - -// src/placeholder/placeholder.ts -import { Extension as Extension5 } from "@tiptap/core"; - -// src/placeholder/plugins/PlaceholderPlugin.ts -import { Plugin as Plugin3 } from "@tiptap/pm/state"; - -// src/placeholder/utils/buildPlaceholderDecorations.ts -import { isNodeEmpty } from "@tiptap/core"; -import { DecorationSet as DecorationSet2 } from "@tiptap/pm/view"; - -// src/placeholder/utils/createPlaceholderDecoration.ts -import { Decoration as Decoration2 } from "@tiptap/pm/view"; -function createPlaceholderDecoration(options) { - const { - editor, - placeholder, - dataAttribute, - pos, - node, - isEmptyDoc, - hasAnchor, - classes: { emptyNode, emptyEditor } - } = options; - const classes = [emptyNode]; - if (isEmptyDoc) { - classes.push(emptyEditor); - } - return Decoration2.node(pos, pos + node.nodeSize, { - class: classes.join(" "), - [dataAttribute]: typeof placeholder === "function" ? placeholder({ - editor, - node, - pos, - hasAnchor - }) : placeholder - }); -} - -// src/placeholder/utils/buildPlaceholderDecorations.ts -function resolveEmptyNodeClass(emptyNodeClass, props) { - return typeof emptyNodeClass === "function" ? emptyNodeClass(props) : emptyNodeClass; -} -function buildPlaceholderDecorations({ - editor, - options, - dataAttribute, - doc, - selection -}) { - var _a, _b; - const active = editor.isEditable || !options.showOnlyWhenEditable; - if (!active) { - return null; - } - const { anchor } = selection; - const decorations = []; - const isEmptyDoc = editor.isEmpty; - const useResolvedPath = options.showOnlyCurrent && !options.includeChildren; - if (useResolvedPath) { - const resolved = doc.resolve(anchor); - const node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter; - const nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor; - if (node && node.type.isTextblock && isNodeEmpty(node)) { - const hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize; - decorations.push( - createPlaceholderDecoration({ - editor, - isEmptyDoc, - dataAttribute, - hasAnchor, - placeholder: options.placeholder, - classes: { - emptyEditor: options.emptyEditorClass, - emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, { - editor, - node, - pos: nodeStart, - hasAnchor - }) - }, - node, - pos: nodeStart - }) - ); - } - } else { - const pluginState = PLUGIN_KEY.getState(editor.state); - const from = (_a = pluginState == null ? void 0 : pluginState.topPos) != null ? _a : 0; - const to = (_b = pluginState == null ? void 0 : pluginState.bottomPos) != null ? _b : doc.content.size; - doc.nodesBetween(from, to, (node, pos) => { - const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize; - const isEmpty = !node.isLeaf && isNodeEmpty(node); - if (!node.type.isTextblock) { - return options.includeChildren; - } - if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) { - decorations.push( - createPlaceholderDecoration({ - editor, - isEmptyDoc, - dataAttribute, - hasAnchor, - placeholder: options.placeholder, - classes: { - emptyEditor: options.emptyEditorClass, - emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, { - editor, - node, - pos, - hasAnchor - }) - }, - node, - pos - }) - ); - } - return options.includeChildren; - }); - } - return DecorationSet2.create(doc, decorations); -} - -// src/placeholder/utils/preparePlaceholderAttribute.ts -function preparePlaceholderAttribute(attr) { - return attr.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase(); -} - -// src/placeholder/utils/findScrollParent.ts -function isScrollable(el) { - const style = getComputedStyle(el); - const overflow = `${style.overflow} ${style.overflowY} ${style.overflowX}`; - return /auto|scroll|overlay/.test(overflow); -} -function findScrollParent(element) { - let el = element; - while (el) { - if (isScrollable(el)) { - return el; - } - const parent = el.parentElement; - if (!parent) { - const root = el.getRootNode(); - if (root instanceof ShadowRoot) { - el = root.host; - continue; - } - return window; - } - el = parent; - } - return window; -} - -// src/placeholder/utils/getViewportBoundaryPositions.ts -function getContainerRect(container) { - if (container === window) { - return { top: 0, bottom: window.innerHeight }; - } - return container.getBoundingClientRect(); -} -function getViewportBoundaryPositions({ - doc, - view, - scrollContainer -}) { - const editorRect = view.dom.getBoundingClientRect(); - const containerRect = scrollContainer ? getContainerRect(scrollContainer) : { top: 0, bottom: window.innerHeight }; - const visibleTop = Math.max(editorRect.top, containerRect.top) - VIEWPORT_OVERSCAN_PX; - const visibleBottom = Math.min(editorRect.bottom, containerRect.bottom) + VIEWPORT_OVERSCAN_PX; - if (visibleTop >= visibleBottom) { - return { top: 0, bottom: doc.content.size }; - } - const isRTL = getComputedStyle(view.dom).direction === "rtl"; - const x = isRTL ? Math.max(editorRect.right - 2, editorRect.left + 2) : editorRect.left + 2; - const topPos = view.posAtCoords({ left: x, top: visibleTop + 2 }); - const bottomPos = view.posAtCoords({ left: x, top: visibleBottom - 2 }); - return { - top: topPos ? topPos.pos : 0, - bottom: bottomPos ? bottomPos.pos : doc.content.size - }; -} - -// src/placeholder/utils/viewportTracking.ts -var viewportPluginState = { - /** - * Initialises the viewport state with no known positions. - * @returns The initial viewport state. - */ - init() { - return { topPos: null, bottomPos: null }; - }, - /** - * Updates the viewport state from incoming transactions. - * @param tr - The transaction being applied. - * @param prev - The previous viewport state. - * @returns The next viewport state. - */ - apply(tr, prev) { - const meta = tr.getMeta(PLUGIN_KEY); - if (meta == null ? void 0 : meta.positions) { - return { topPos: meta.positions.top, bottomPos: meta.positions.bottom }; - } - if (!tr.docChanged) { - return prev; - } - return { - topPos: prev.topPos !== null ? tr.mapping.map(prev.topPos) : null, - bottomPos: prev.bottomPos !== null ? tr.mapping.map(prev.bottomPos) : null - }; - } -}; -function createViewportPluginView(view) { - const scrollContainer = findScrollParent(view.dom); - const computeAndDispatch = () => { - const positions = getViewportBoundaryPositions({ - view, - doc: view.state.doc, - scrollContainer - }); - const prev = PLUGIN_KEY.getState(view.state); - if ((prev == null ? void 0 : prev.topPos) === positions.top && (prev == null ? void 0 : prev.bottomPos) === positions.bottom) { - return; - } - const tr = view.state.tr.setMeta(PLUGIN_KEY, { positions }); - view.dispatch(tr); - }; - let frame = null; - let lastCompute = 0; - const MIN_SCROLL_INTERVAL = 150; - const scheduleFrame = () => { - if (frame !== null) return; - frame = requestAnimationFrame(() => { - frame = null; - const now = performance.now(); - if (now - lastCompute >= MIN_SCROLL_INTERVAL) { - lastCompute = now; - computeAndDispatch(); - } else { - scheduleFrame(); - } - }); - }; - scrollContainer.addEventListener("scroll", scheduleFrame, { passive: true }); - computeAndDispatch(); - return { - update(_view, prevState) { - if (view.state.doc.content.size !== prevState.doc.content.size) { - scheduleFrame(); - } - }, - destroy: () => { - if (frame !== null) { - cancelAnimationFrame(frame); - } - scrollContainer.removeEventListener("scroll", scheduleFrame); - } - }; -} - -// src/placeholder/plugins/PlaceholderPlugin.ts -function createPlaceholderPlugin({ editor, options }) { - const dataAttribute = options.dataAttribute ? `data-${preparePlaceholderAttribute(options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`; - return new Plugin3({ - key: PLUGIN_KEY, - state: viewportPluginState, - view: createViewportPluginView, - props: { - decorations: ({ doc, selection }) => buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }) - } - }); -} - -// src/placeholder/placeholder.ts -var Placeholder = Extension5.create({ - name: "placeholder", - addOptions() { - return { - emptyEditorClass: "is-editor-empty", - emptyNodeClass: "is-empty", - dataAttribute: DEFAULT_DATA_ATTRIBUTE, - placeholder: "Write something \u2026", - showOnlyWhenEditable: true, - showOnlyCurrent: true, - includeChildren: false - }; - }, - addProseMirrorPlugins() { - return [createPlaceholderPlugin({ editor: this.editor, options: this.options })]; - } -}); - -// src/selection/selection.ts -import { createStyleTag, Extension as Extension6, isNodeSelection } from "@tiptap/core"; -import { Plugin as Plugin4, PluginKey as PluginKey4 } from "@tiptap/pm/state"; -import { Decoration as Decoration3, DecorationSet as DecorationSet3 } from "@tiptap/pm/view"; -var selectionStyle = `.ProseMirror:not(.ProseMirror-focused) *::selection { - background: transparent; -} - -.ProseMirror:not(.ProseMirror-focused) *::-moz-selection { - background: transparent; -}`; -var Selection = Extension6.create({ - name: "selection", - addOptions() { - return { - className: "selection" - }; - }, - addProseMirrorPlugins() { - const { editor, options } = this; - if (editor.options.injectCSS && typeof document !== "undefined") { - createStyleTag(selectionStyle, editor.options.injectNonce, "selection"); - } - return [ - new Plugin4({ - key: new PluginKey4("selection"), - props: { - decorations(state) { - if (state.selection.empty || editor.isFocused || !editor.isEditable || isNodeSelection(state.selection) || editor.view.dragging) { - return null; - } - return DecorationSet3.create(state.doc, [ - Decoration3.inline(state.selection.from, state.selection.to, { - class: options.className - }) - ]); - } - } - }) - ]; - } -}); - -// src/trailing-node/trailing-node.ts -import { Extension as Extension7 } from "@tiptap/core"; -import { Plugin as Plugin5, PluginKey as PluginKey5 } from "@tiptap/pm/state"; -var skipTrailingNodeMeta = "skipTrailingNode"; -function nodeEqualsType({ - types, - node -}) { - return node && Array.isArray(types) && types.includes(node.type) || (node == null ? void 0 : node.type) === types; -} -var TrailingNode = Extension7.create({ - name: "trailingNode", - addOptions() { - return { - node: void 0, - notAfter: [] - }; - }, - addProseMirrorPlugins() { - var _a; - const plugin = new PluginKey5(this.name); - const defaultNode = this.options.node || ((_a = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : _a.name) || "paragraph"; - const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name)); - return [ - new Plugin5({ - key: plugin, - appendTransaction: (transactions, __, state) => { - const { doc, tr, schema } = state; - const shouldInsertNodeAtEnd = plugin.getState(state); - const endPosition = doc.content.size; - const type = schema.nodes[defaultNode]; - if (transactions.some((transaction) => transaction.getMeta(skipTrailingNodeMeta))) { - return; - } - if (!shouldInsertNodeAtEnd) { - return; - } - return tr.insert(endPosition, type.create()); - }, - state: { - init: (_, state) => { - const lastNode = state.tr.doc.lastChild; - return !nodeEqualsType({ node: lastNode, types: disabledNodes }); - }, - apply: (tr, value) => { - if (!tr.docChanged) { - return value; - } - if (tr.getMeta("__uniqueIDTransaction")) { - return value; - } - const lastNode = tr.doc.lastChild; - return !nodeEqualsType({ node: lastNode, types: disabledNodes }); - } - } - }) - ]; - } -}); - -// src/undo-redo/undo-redo.ts -import { Extension as Extension8 } from "@tiptap/core"; -import { history, redo, undo } from "@tiptap/pm/history"; -var UndoRedo = Extension8.create({ - name: "undoRedo", - addOptions() { - return { - depth: 100, - newGroupDelay: 500 - }; - }, - addCommands() { - return { - undo: () => ({ state, dispatch }) => { - return undo(state, dispatch); - }, - redo: () => ({ state, dispatch }) => { - return redo(state, dispatch); - } - }; - }, - addProseMirrorPlugins() { - return [history(this.options)]; - }, - addKeyboardShortcuts() { - return { - "Mod-z": () => this.editor.commands.undo(), - "Shift-Mod-z": () => this.editor.commands.redo(), - "Mod-y": () => this.editor.commands.redo(), - // Russian keyboard layouts - "Mod-\u044F": () => this.editor.commands.undo(), - "Shift-Mod-\u044F": () => this.editor.commands.redo() - }; - } -}); -export { - CharacterCount, - DEFAULT_DATA_ATTRIBUTE, - Dropcursor, - Focus, - Gapcursor, - PLUGIN_KEY, - Placeholder, - Selection, - TrailingNode, - UndoRedo, - preparePlaceholderAttribute, - skipTrailingNodeMeta -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.js.map deleted file mode 100644 index 727926c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/character-count/character-count.ts","../src/drop-cursor/drop-cursor.ts","../src/focus/focus.ts","../src/gap-cursor/gap-cursor.ts","../src/placeholder/constants.ts","../src/placeholder/placeholder.ts","../src/placeholder/plugins/PlaceholderPlugin.ts","../src/placeholder/utils/buildPlaceholderDecorations.ts","../src/placeholder/utils/createPlaceholderDecoration.ts","../src/placeholder/utils/preparePlaceholderAttribute.ts","../src/placeholder/utils/findScrollParent.ts","../src/placeholder/utils/getViewportBoundaryPositions.ts","../src/placeholder/utils/viewportTracking.ts","../src/selection/selection.ts","../src/trailing-node/trailing-node.ts","../src/undo-redo/undo-redo.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\nexport interface CharacterCountOptions {\n /**\n * The maximum number of characters that should be allowed. Defaults to `0`.\n * @default null\n * @example 180\n */\n limit: number | null | undefined\n /**\n * The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used.\n * If set to `nodeSize`, the nodeSize of the document is used.\n * @default 'textSize'\n * @example 'textSize'\n */\n mode: 'textSize' | 'nodeSize'\n /**\n * Sets whether the content will be automatically trimmed when programatically setting content over the limit.\n * If set to false, the user will be able to trim the text manually.\n * @default true\n * @example false\n */\n autoTrim?: boolean\n /**\n * The text counter function to use. Defaults to a simple character count.\n * @default (text) => text.length\n * @example (text) => [...new Intl.Segmenter().segment(text)].length\n */\n textCounter: (text: string) => number\n /**\n * The word counter function to use. Defaults to a simple word count.\n * @default (text) => text.split(' ').filter(word => word !== '').length\n * @example (text) => text.split(/\\s+/).filter(word => word !== '').length\n */\n wordCounter: (text: string) => number\n}\n\nexport interface CharacterCountStorage {\n /**\n * Get the number of characters for the current document.\n * @param options The options for the character count. (optional)\n * @param options.node The node to get the characters from. Defaults to the current document.\n * @param options.mode The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used.\n */\n characters: (options?: { node?: ProseMirrorNode; mode?: 'textSize' | 'nodeSize' }) => number\n\n /**\n * Get the number of words for the current document.\n * @param options The options for the character count. (optional)\n * @param options.node The node to get the words from. Defaults to the current document.\n */\n words: (options?: { node?: ProseMirrorNode }) => number\n}\n\ndeclare module '@tiptap/core' {\n interface Storage {\n characterCount: CharacterCountStorage\n }\n}\n\n/**\n * This extension allows you to count the characters and words of your document.\n * @see https://tiptap.dev/api/extensions/character-count\n */\nexport const CharacterCount = Extension.create({\n name: 'characterCount',\n\n addOptions() {\n return {\n limit: null,\n autoTrim: true,\n mode: 'textSize',\n textCounter: text => text.length,\n wordCounter: text => text.split(' ').filter(word => word !== '').length,\n }\n },\n\n addStorage() {\n return {\n characters: () => 0,\n words: () => 0,\n }\n },\n\n onBeforeCreate() {\n this.storage.characters = options => {\n const node = options?.node || this.editor.state.doc\n const mode = options?.mode || this.options.mode\n\n if (mode === 'textSize') {\n const text = node.textBetween(0, node.content.size, undefined, ' ')\n\n return this.options.textCounter(text)\n }\n\n return node.nodeSize\n }\n\n this.storage.words = options => {\n const node = options?.node || this.editor.state.doc\n const text = node.textBetween(0, node.content.size, ' ', ' ')\n\n return this.options.wordCounter(text)\n }\n },\n\n addProseMirrorPlugins() {\n let initialEvaluationDone = false\n\n return [\n new Plugin({\n key: new PluginKey('characterCount'),\n appendTransaction: (transactions, oldState, newState) => {\n if (initialEvaluationDone) {\n return\n }\n\n const limit = this.options.limit\n const autoTrim = this.options.autoTrim\n\n if (limit === null || limit === undefined || limit === 0 || autoTrim === false) {\n initialEvaluationDone = true\n return\n }\n\n const initialContentSize = this.storage.characters({ node: newState.doc })\n\n if (initialContentSize > limit) {\n const over = initialContentSize - limit\n const from = 0\n const to = over\n\n console.warn(\n `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`,\n )\n const tr = newState.tr.deleteRange(from, to)\n initialEvaluationDone = true\n return tr\n }\n\n initialEvaluationDone = true\n },\n filterTransaction: (transaction, state) => {\n const limit = this.options.limit\n\n // Nothing has changed or no limit is defined. Ignore it.\n if (!transaction.docChanged || limit === 0 || limit === null || limit === undefined) {\n return true\n }\n\n const oldSize = this.storage.characters({ node: state.doc })\n const newSize = this.storage.characters({ node: transaction.doc })\n\n // Everything is in the limit. Good.\n if (newSize <= limit) {\n return true\n }\n\n // The limit has already been exceeded but will be reduced.\n if (oldSize > limit && newSize > limit && newSize <= oldSize) {\n return true\n }\n\n // The limit has already been exceeded and will be increased further.\n if (oldSize > limit && newSize > limit && newSize > oldSize) {\n return false\n }\n\n const isPaste = transaction.getMeta('paste')\n\n // Block all exceeding transactions that were not pasted.\n if (!isPaste) {\n return false\n }\n\n // For pasted content, we try to remove the exceeding content.\n const pos = transaction.selection.$head.pos\n const over = newSize - limit\n const from = pos - over\n const to = pos\n\n // It’s probably a bad idea to mutate transactions within `filterTransaction`\n // but for now this is working fine.\n transaction.deleteRange(from, to)\n\n // In some situations, the limit will continue to be exceeded after trimming.\n // This happens e.g. when truncating within a complex node (e.g. table)\n // and ProseMirror has to close this node again.\n // If this is the case, we prevent the transaction completely.\n const updatedSize = this.storage.characters({ node: transaction.doc })\n\n if (updatedSize > limit) {\n return false\n }\n\n return true\n },\n }),\n ]\n },\n})\n","import { Extension } from '@tiptap/core'\nimport { dropCursor } from '@tiptap/pm/dropcursor'\n\nexport interface DropcursorOptions {\n /**\n * The color of the drop cursor. Use `false` to apply no color and rely only on class.\n * @default 'currentColor'\n * @example 'red'\n */\n color?: string | false\n\n /**\n * The width of the drop cursor\n * @default 1\n * @example 2\n */\n width: number | undefined\n\n /**\n * The class of the drop cursor\n * @default undefined\n * @example 'drop-cursor'\n */\n class: string | undefined\n}\n\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * in-between nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */\nexport const Dropcursor = Extension.create({\n name: 'dropCursor',\n\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n }\n },\n\n addProseMirrorPlugins() {\n return [dropCursor(this.options)]\n },\n})\n","import { Extension } from '@tiptap/core'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet } from '@tiptap/pm/view'\n\nexport interface FocusOptions {\n /**\n * The class name that should be added to the focused node.\n * @default 'has-focus'\n * @example 'is-focused'\n */\n className: string\n\n /**\n * The mode by which the focused node is determined.\n * - All: All nodes are marked as focused.\n * - Deepest: Only the deepest node is marked as focused.\n * - Shallowest: Only the shallowest node is marked as focused.\n *\n * @default 'all'\n * @example 'deepest'\n * @example 'shallowest'\n */\n mode: 'all' | 'deepest' | 'shallowest'\n}\n\n/**\n * This extension allows you to add a class to the focused node.\n * @see https://www.tiptap.dev/api/extensions/focus\n */\nexport const Focus = Extension.create({\n name: 'focus',\n\n addOptions() {\n return {\n className: 'has-focus',\n mode: 'all',\n }\n },\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('focus'),\n props: {\n decorations: ({ doc, selection }) => {\n const { isEditable, isFocused } = this.editor\n const { anchor } = selection\n const decorations: Decoration[] = []\n\n if (!isEditable || !isFocused) {\n return DecorationSet.create(doc, [])\n }\n\n // Maximum Levels\n let maxLevels = 0\n\n if (this.options.mode === 'deepest') {\n doc.descendants((node, pos) => {\n if (node.isText) {\n return\n }\n\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1\n\n if (!isCurrent) {\n return false\n }\n\n maxLevels += 1\n })\n }\n\n // Loop through current\n let currentLevel = 0\n\n doc.descendants((node, pos) => {\n if (node.isText) {\n return false\n }\n\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1\n\n if (!isCurrent) {\n return false\n }\n\n currentLevel += 1\n\n const outOfScope =\n (this.options.mode === 'deepest' && maxLevels - currentLevel > 0) ||\n (this.options.mode === 'shallowest' && currentLevel > 1)\n\n if (outOfScope) {\n return this.options.mode === 'deepest'\n }\n\n decorations.push(\n Decoration.node(pos, pos + node.nodeSize, {\n class: this.options.className,\n }),\n )\n })\n\n return DecorationSet.create(doc, decorations)\n },\n },\n }),\n ]\n },\n})\n","import type { ParentConfig } from '@tiptap/core'\nimport { callOrReturn, Extension, getExtensionField } from '@tiptap/core'\nimport { gapCursor } from '@tiptap/pm/gapcursor'\n\ndeclare module '@tiptap/core' {\n interface NodeConfig {\n /**\n * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.\n * @default null\n */\n allowGapCursor?:\n | boolean\n | null\n | ((this: {\n name: string\n options: Options\n storage: Storage\n parent: ParentConfig>['allowGapCursor']\n }) => boolean | null)\n }\n}\n\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */\nexport const Gapcursor = Extension.create({\n name: 'gapCursor',\n\n addProseMirrorPlugins() {\n return [gapCursor()]\n },\n\n extendNodeSchema(extension) {\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n }\n\n return {\n allowGapCursor: callOrReturn(getExtensionField(extension, 'allowGapCursor', context)) ?? null,\n }\n },\n})\n","import { PluginKey } from '@tiptap/pm/state'\n\nimport type { ViewportState } from './types.js'\n\n/** The default data attribute label */\nexport const DEFAULT_DATA_ATTRIBUTE = 'placeholder'\n\n/** The plugin key used to store and read the placeholder viewport state */\nexport const PLUGIN_KEY = new PluginKey('tiptap__placeholder')\n\n/**\n * Extra pixels added above and below the visible viewport when computing the\n * range of nodes to decorate. Decorating slightly beyond the fold means a\n * node already has its placeholder before it scrolls into view, which hides\n * the latency introduced by the throttled viewport recompute.\n */\nexport const VIEWPORT_OVERSCAN_PX = 200\n","import { Extension } from '@tiptap/core'\n\nimport { DEFAULT_DATA_ATTRIBUTE } from './constants.js'\nimport { createPlaceholderPlugin } from './plugins/PlaceholderPlugin.js'\nimport type { PlaceholderOptions } from './types.js'\n\n/**\n * This extension allows you to add a placeholder to your editor.\n * A placeholder is a text that appears when the editor or a node is empty.\n * @see https://www.tiptap.dev/api/extensions/placeholder\n */\nexport const Placeholder = Extension.create({\n name: 'placeholder',\n\n addOptions() {\n return {\n emptyEditorClass: 'is-editor-empty',\n emptyNodeClass: 'is-empty',\n dataAttribute: DEFAULT_DATA_ATTRIBUTE,\n placeholder: 'Write something …',\n showOnlyWhenEditable: true,\n showOnlyCurrent: true,\n includeChildren: false,\n }\n },\n\n addProseMirrorPlugins() {\n return [createPlaceholderPlugin({ editor: this.editor, options: this.options })]\n },\n})\n","import type { Editor } from '@tiptap/core'\nimport { Plugin } from '@tiptap/pm/state'\n\nimport { DEFAULT_DATA_ATTRIBUTE, PLUGIN_KEY } from '../constants.js'\nimport type { PlaceholderOptions } from '../types.js'\nimport { buildPlaceholderDecorations } from '../utils/buildPlaceholderDecorations.js'\nimport { preparePlaceholderAttribute } from '../utils/preparePlaceholderAttribute.js'\nimport { createViewportPluginView, viewportPluginState } from '../utils/viewportTracking.js'\n\nexport type CreatePluginOptions = {\n editor: Editor\n options: PlaceholderOptions\n}\n\n/**\n * Creates the ProseMirror plugin that renders placeholder decorations.\n * @param options.editor - The editor instance.\n * @param options.options - The resolved placeholder options.\n * @returns The configured placeholder plugin.\n */\nexport function createPlaceholderPlugin({ editor, options }: CreatePluginOptions) {\n const dataAttribute = options.dataAttribute\n ? `data-${preparePlaceholderAttribute(options.dataAttribute)}`\n : `data-${DEFAULT_DATA_ATTRIBUTE}`\n\n return new Plugin({\n key: PLUGIN_KEY,\n state: viewportPluginState,\n view: createViewportPluginView,\n props: {\n decorations: ({ doc, selection }) =>\n buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }),\n },\n })\n}\n","import type { Editor } from '@tiptap/core'\nimport { isNodeEmpty } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport type { Selection } from '@tiptap/pm/state'\nimport type { Decoration } from '@tiptap/pm/view'\nimport { DecorationSet } from '@tiptap/pm/view'\n\nimport { PLUGIN_KEY } from '../constants.js'\nimport type { PlaceholderOptions } from '../types.js'\nimport { createPlaceholderDecoration } from './createPlaceholderDecoration.js'\n\nfunction resolveEmptyNodeClass(\n emptyNodeClass: PlaceholderOptions['emptyNodeClass'],\n props: { editor: Editor; node: Node; pos: number; hasAnchor: boolean },\n): string {\n return typeof emptyNodeClass === 'function' ? emptyNodeClass(props) : emptyNodeClass\n}\n\n/**\n * Builds the placeholder decorations for the current document state.\n * @param options.editor - The editor instance.\n * @param options.options - The resolved placeholder options.\n * @param options.dataAttribute - The prepared `data-*` attribute name.\n * @param options.doc - The current document node.\n * @param options.selection - The current selection.\n * @returns A decoration set, or `null` when no placeholders should be shown.\n */\nexport function buildPlaceholderDecorations({\n editor,\n options,\n dataAttribute,\n doc,\n selection,\n}: {\n editor: Editor\n options: PlaceholderOptions\n dataAttribute: string\n doc: Node\n selection: Selection\n}): DecorationSet | null {\n const active = editor.isEditable || !options.showOnlyWhenEditable\n\n if (!active) {\n return null\n }\n\n const { anchor } = selection\n const decorations: Decoration[] = []\n const isEmptyDoc = editor.isEmpty\n\n const useResolvedPath = options.showOnlyCurrent && !options.includeChildren\n\n if (useResolvedPath) {\n const resolved = doc.resolve(anchor)\n\n // When the selection spans the whole document (e.g. an `AllSelection`\n // after Cmd+A), the anchor resolves to the document level (depth 0). In\n // that case the relevant textblock is the node directly after the\n // position rather than an ancestor. otherwise the placeholder would\n // disappear after selecting all and deleting.\n const node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter\n const nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor\n\n if (node && node.type.isTextblock && isNodeEmpty(node)) {\n const hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize\n\n decorations.push(\n createPlaceholderDecoration({\n editor,\n isEmptyDoc,\n dataAttribute,\n hasAnchor,\n placeholder: options.placeholder,\n classes: {\n emptyEditor: options.emptyEditorClass,\n emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n editor,\n node,\n pos: nodeStart,\n hasAnchor,\n }),\n },\n node,\n pos: nodeStart,\n }),\n )\n }\n } else {\n const pluginState = PLUGIN_KEY.getState(editor.state)\n const from = pluginState?.topPos ?? 0\n const to = pluginState?.bottomPos ?? doc.content.size\n\n doc.nodesBetween(from, to, (node, pos) => {\n const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize\n const isEmpty = !node.isLeaf && isNodeEmpty(node)\n\n if (!node.type.isTextblock) {\n return options.includeChildren\n }\n\n if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) {\n decorations.push(\n createPlaceholderDecoration({\n editor,\n isEmptyDoc,\n dataAttribute,\n hasAnchor,\n placeholder: options.placeholder,\n classes: {\n emptyEditor: options.emptyEditorClass,\n emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n editor,\n node,\n pos,\n hasAnchor,\n }),\n },\n node,\n pos,\n }),\n )\n }\n\n return options.includeChildren\n })\n }\n\n return DecorationSet.create(doc, decorations)\n}\n","import type { Editor } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport { Decoration } from '@tiptap/pm/view'\n\nimport type { PlaceholderOptions } from '../types.js'\n\n/**\n * Creates a ProseMirror node decoration that applies a placeholder\n * CSS class and data attribute to an empty node.\n * @param options.editor - The editor instance\n * @param options.pos - The position of the node in the document\n * @param options.node - The ProseMirror node\n * @param options.isEmptyDoc - Whether the entire document is empty\n * @param options.hasAnchor - Whether the selection anchor is within the node\n * @param options.dataAttribute - The data attribute name (e.g. `data-placeholder`)\n * @param options.classes - CSS classes for empty nodes and the empty editor\n * @param options.placeholder - The placeholder text or a function that returns it\n * @returns A ProseMirror node decoration with placeholder classes and data attribute\n */\nexport function createPlaceholderDecoration(options: {\n editor: Editor\n pos: number\n node: Node\n isEmptyDoc: boolean\n hasAnchor: boolean\n dataAttribute: string\n classes: {\n emptyEditor: PlaceholderOptions['emptyEditorClass']\n emptyNode: string\n }\n placeholder: PlaceholderOptions['placeholder']\n}) {\n const {\n editor,\n placeholder,\n dataAttribute,\n pos,\n node,\n isEmptyDoc,\n hasAnchor,\n classes: { emptyNode, emptyEditor },\n } = options\n const classes = [emptyNode]\n\n if (isEmptyDoc) {\n classes.push(emptyEditor)\n }\n\n return Decoration.node(pos, pos + node.nodeSize, {\n class: classes.join(' '),\n [dataAttribute]:\n typeof placeholder === 'function'\n ? placeholder({\n editor,\n node,\n pos,\n hasAnchor,\n })\n : placeholder,\n })\n}\n","/**\n * Prepares the placeholder attribute by ensuring it is properly formatted.\n * @param attr - The placeholder attribute string.\n * @returns The prepared placeholder attribute string.\n */\nexport function preparePlaceholderAttribute(attr: string): string {\n return (\n attr\n // replace whitespace with dashes\n .replace(/\\s+/g, '-')\n // replace non-alphanumeric characters\n // or special chars like $, %, &, etc.\n // but not dashes\n .replace(/[^a-zA-Z0-9-]/g, '')\n // and replace any numeric character at the start\n .replace(/^[0-9-]+/, '')\n // and finally replace any stray, leading dashes\n .replace(/^-+/, '')\n .toLowerCase()\n )\n}\n","/**\n * Checks if an element is scrollable by testing its overflow properties.\n * Elements with `overflow: hidden` or `overflow: clip` are intentionally\n * excluded — they clip content but don't emit scroll events.\n */\nfunction isScrollable(el: HTMLElement): boolean {\n const style = getComputedStyle(el)\n const overflow = `${style.overflow} ${style.overflowY} ${style.overflowX}`\n\n return /auto|scroll|overlay/.test(overflow)\n}\n\nexport function findScrollParent(element: HTMLElement): HTMLElement | Window {\n let el: HTMLElement | null = element\n\n while (el) {\n if (isScrollable(el)) {\n return el\n }\n\n // Check if we hit a Shadow DOM boundary. If so, jump to the shadow host\n // and continue traversing the light DOM.\n const parent = el.parentElement\n if (!parent) {\n const root = el.getRootNode()\n if (root instanceof ShadowRoot) {\n el = root.host as HTMLElement\n continue\n }\n\n return window\n }\n\n el = parent\n }\n\n return window\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorView } from '@tiptap/pm/view'\n\nimport { VIEWPORT_OVERSCAN_PX } from '../constants.js'\n\nfunction getContainerRect(container: HTMLElement | Window): { top: number; bottom: number } {\n if (container === window) {\n return { top: 0, bottom: window.innerHeight }\n }\n\n return (container as HTMLElement).getBoundingClientRect()\n}\n\nexport function getViewportBoundaryPositions({\n doc,\n view,\n scrollContainer,\n}: {\n doc: Node\n view: EditorView\n scrollContainer?: HTMLElement | Window\n}) {\n const editorRect = view.dom.getBoundingClientRect()\n const containerRect = scrollContainer\n ? getContainerRect(scrollContainer)\n : { top: 0, bottom: window.innerHeight }\n\n const visibleTop = Math.max(editorRect.top, containerRect.top) - VIEWPORT_OVERSCAN_PX\n const visibleBottom = Math.min(editorRect.bottom, containerRect.bottom) + VIEWPORT_OVERSCAN_PX\n\n if (visibleTop >= visibleBottom) {\n // Editor is not visible — fall back to full document range\n return { top: 0, bottom: doc.content.size }\n }\n\n // Pick the x-coordinate based on text direction. In LTR the content\n // starts at the left edge; in RTL it starts at the right edge.\n // Clamp to ensure the coordinate stays inside the editor bounds.\n const isRTL = getComputedStyle(view.dom).direction === 'rtl'\n const x = isRTL ? Math.max(editorRect.right - 2, editorRect.left + 2) : editorRect.left + 2\n\n const topPos = view.posAtCoords({ left: x, top: visibleTop + 2 })\n const bottomPos = view.posAtCoords({ left: x, top: visibleBottom - 2 })\n\n return {\n top: topPos ? topPos.pos : 0,\n bottom: bottomPos ? bottomPos.pos : doc.content.size,\n }\n}\n","import type { EditorState, PluginView, StateField, Transaction } from '@tiptap/pm/state'\nimport type { EditorView } from '@tiptap/pm/view'\n\nimport { PLUGIN_KEY } from '../constants.js'\nimport type { ViewportState } from '../types.js'\nimport { findScrollParent } from './findScrollParent.js'\nimport { getViewportBoundaryPositions } from './getViewportBoundaryPositions.js'\n\n/**\n * The plugin `state` config that tracks the visible viewport boundaries so the\n * decoration callback only scans the nodes currently on screen.\n */\nexport const viewportPluginState: StateField = {\n /**\n * Initialises the viewport state with no known positions.\n * @returns The initial viewport state.\n */\n init(): ViewportState {\n return { topPos: null, bottomPos: null }\n },\n\n /**\n * Updates the viewport state from incoming transactions.\n * @param tr - The transaction being applied.\n * @param prev - The previous viewport state.\n * @returns The next viewport state.\n */\n apply(tr: Transaction, prev: ViewportState): ViewportState {\n const meta = tr.getMeta(PLUGIN_KEY) as\n | { positions?: { top: number; bottom: number } }\n | undefined\n\n if (meta?.positions) {\n return { topPos: meta.positions.top, bottomPos: meta.positions.bottom }\n }\n\n if (!tr.docChanged) {\n return prev\n }\n\n // Preserve last known viewport positions across transactions.\n // Without this, every keystroke resets back to a full document\n // scan, defeating the viewport optimisation.\n // Only map when we have actual positions — null means \"no viewport\n // info yet\" and should stay null to fall back to full doc scan.\n return {\n topPos: prev.topPos !== null ? tr.mapping.map(prev.topPos) : null,\n bottomPos: prev.bottomPos !== null ? tr.mapping.map(prev.bottomPos) : null,\n }\n },\n}\n\n/**\n * Creates the plugin `view` that recomputes the visible viewport on scroll and\n * document size changes, dispatching the result into the plugin state.\n * @param view - The editor view the plugin is attached to.\n * @returns A plugin view with `update` and `destroy` handlers.\n */\nexport function createViewportPluginView(view: EditorView): PluginView {\n const scrollContainer = findScrollParent(view.dom)\n\n const computeAndDispatch = () => {\n const positions = getViewportBoundaryPositions({\n view,\n doc: view.state.doc,\n scrollContainer,\n })\n\n const prev = PLUGIN_KEY.getState(view.state)\n if (prev?.topPos === positions.top && prev?.bottomPos === positions.bottom) {\n return\n }\n\n const tr = view.state.tr.setMeta(PLUGIN_KEY, { positions })\n view.dispatch(tr)\n }\n\n // rAF-based scheduler with interval guard (150ms → ~6–7 Hz) used by\n // scroll events and update(). The overscan margin hides the extra\n // latency. When the guard blocks, the callback reschedules itself so\n // the trailing position is always captured.\n let frame: number | null = null\n let lastCompute = 0\n const MIN_SCROLL_INTERVAL = 150\n\n const scheduleFrame = () => {\n if (frame !== null) return\n frame = requestAnimationFrame(() => {\n frame = null\n const now = performance.now()\n if (now - lastCompute >= MIN_SCROLL_INTERVAL) {\n lastCompute = now\n computeAndDispatch()\n } else {\n scheduleFrame()\n }\n })\n }\n\n scrollContainer.addEventListener('scroll', scheduleFrame, { passive: true })\n\n // Fire once to populate initial viewport\n computeAndDispatch()\n\n return {\n update(_view: EditorView, prevState: EditorState) {\n if (view.state.doc.content.size !== prevState.doc.content.size) {\n scheduleFrame()\n }\n },\n destroy: () => {\n if (frame !== null) {\n cancelAnimationFrame(frame)\n }\n scrollContainer.removeEventListener('scroll', scheduleFrame)\n },\n }\n}\n","import { createStyleTag, Extension, isNodeSelection } from '@tiptap/core'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet } from '@tiptap/pm/view'\n\nconst selectionStyle = `.ProseMirror:not(.ProseMirror-focused) *::selection {\n background: transparent;\n}\n\n.ProseMirror:not(.ProseMirror-focused) *::-moz-selection {\n background: transparent;\n}`\n\nexport type SelectionOptions = {\n /**\n * The class name that should be added to the selected text.\n * @default 'selection'\n * @example 'is-selected'\n */\n className: string\n}\n\n/**\n * This extension allows you to add a class to the selected text.\n * @see https://www.tiptap.dev/api/extensions/selection\n */\nexport const Selection = Extension.create({\n name: 'selection',\n\n addOptions() {\n return {\n className: 'selection',\n }\n },\n\n addProseMirrorPlugins() {\n const { editor, options } = this\n\n if (editor.options.injectCSS && typeof document !== 'undefined') {\n createStyleTag(selectionStyle, editor.options.injectNonce, 'selection')\n }\n\n return [\n new Plugin({\n key: new PluginKey('selection'),\n props: {\n decorations(state) {\n if (\n state.selection.empty ||\n editor.isFocused ||\n !editor.isEditable ||\n isNodeSelection(state.selection) ||\n editor.view.dragging\n ) {\n return null\n }\n\n return DecorationSet.create(state.doc, [\n Decoration.inline(state.selection.from, state.selection.to, {\n class: options.className,\n }),\n ])\n },\n },\n }),\n ]\n },\n})\n\nexport default Selection\n","import { Extension } from '@tiptap/core'\nimport type { Node, NodeType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\nexport const skipTrailingNodeMeta = 'skipTrailingNode'\n\nfunction nodeEqualsType({\n types,\n node,\n}: {\n types: NodeType | NodeType[]\n node: Node | null | undefined\n}) {\n return (node && Array.isArray(types) && types.includes(node.type)) || node?.type === types\n}\n\n/**\n * Extension based on:\n * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js\n * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts\n */\n\nexport interface TrailingNodeOptions {\n /**\n * The node type that should be inserted at the end of the document.\n * @note the node will always be added to the `notAfter` lists to\n * prevent an infinite loop.\n * @default undefined\n */\n node?: string\n /**\n * The node types after which the trailing node should not be inserted.\n * @default ['paragraph']\n */\n notAfter?: string | string[]\n}\n\n/**\n * This extension allows you to add an extra node at the end of the document.\n * @see https://www.tiptap.dev/api/extensions/trailing-node\n */\nexport const TrailingNode = Extension.create({\n name: 'trailingNode',\n\n addOptions() {\n return {\n node: undefined,\n notAfter: [],\n }\n },\n\n addProseMirrorPlugins() {\n const plugin = new PluginKey(this.name)\n const defaultNode =\n this.options.node ||\n this.editor.schema.topNodeType.contentMatch.defaultType?.name ||\n 'paragraph'\n\n const disabledNodes = Object.entries(this.editor.schema.nodes)\n .map(([, value]) => value)\n .filter(node => (this.options.notAfter || []).concat(defaultNode).includes(node.name))\n\n return [\n new Plugin({\n key: plugin,\n appendTransaction: (transactions, __, state) => {\n const { doc, tr, schema } = state\n const shouldInsertNodeAtEnd = plugin.getState(state)\n const endPosition = doc.content.size\n const type = schema.nodes[defaultNode]\n\n if (transactions.some(transaction => transaction.getMeta(skipTrailingNodeMeta))) {\n return\n }\n\n if (!shouldInsertNodeAtEnd) {\n return\n }\n\n return tr.insert(endPosition, type.create())\n },\n state: {\n init: (_, state) => {\n const lastNode = state.tr.doc.lastChild\n\n return !nodeEqualsType({ node: lastNode, types: disabledNodes })\n },\n apply: (tr, value) => {\n if (!tr.docChanged) {\n return value\n }\n\n // Ignore transactions from UniqueID extension to prevent infinite loops\n // when UniqueID adds IDs to newly inserted trailing nodes\n if (tr.getMeta('__uniqueIDTransaction')) {\n return value\n }\n\n const lastNode = tr.doc.lastChild\n\n return !nodeEqualsType({ node: lastNode, types: disabledNodes })\n },\n },\n }),\n ]\n },\n})\n","import { Extension } from '@tiptap/core'\nimport { history, redo, undo } from '@tiptap/pm/history'\n\nexport interface UndoRedoOptions {\n /**\n * The amount of history events that are collected before the oldest events are discarded.\n * @default 100\n * @example 50\n */\n depth: number\n\n /**\n * The delay (in milliseconds) between changes after which a new group should be started.\n * @default 500\n * @example 1000\n */\n newGroupDelay: number\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n undoRedo: {\n /**\n * Undo recent changes\n * @example editor.commands.undo()\n */\n undo: () => ReturnType\n /**\n * Reapply reverted changes\n * @example editor.commands.redo()\n */\n redo: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to undo and redo recent changes.\n * @see https://www.tiptap.dev/api/extensions/undo-redo\n *\n * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n * the `undo-redo` extension, as it is not compatible with the `collaboration` extension.\n *\n * `@tiptap/extension-collaboration` uses its own history implementation.\n */\nexport const UndoRedo = Extension.create({\n name: 'undoRedo',\n\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500,\n }\n },\n\n addCommands() {\n return {\n undo:\n () =>\n ({ state, dispatch }) => {\n return undo(state, dispatch)\n },\n redo:\n () =>\n ({ state, dispatch }) => {\n return redo(state, dispatch)\n },\n }\n },\n\n addProseMirrorPlugins() {\n return [history(this.options)]\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-z': () => this.editor.commands.undo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n 'Mod-y': () => this.editor.commands.redo(),\n\n // Russian keyboard layouts\n 'Mod-я': () => this.editor.commands.undo(),\n 'Shift-Mod-я': () => this.editor.commands.redo(),\n }\n },\n})\n"],"mappings":";AAAA,SAAS,iBAAiB;AAE1B,SAAS,QAAQ,iBAAiB;AAgE3B,IAAM,iBAAiB,UAAU,OAAqD;AAAA,EAC3F,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,MAAM;AAAA,MACN,aAAa,UAAQ,KAAK;AAAA,MAC1B,aAAa,UAAQ,KAAK,MAAM,GAAG,EAAE,OAAO,UAAQ,SAAS,EAAE,EAAE;AAAA,IACnE;AAAA,EACF;AAAA,EAEA,aAAa;AACX,WAAO;AAAA,MACL,YAAY,MAAM;AAAA,MAClB,OAAO,MAAM;AAAA,IACf;AAAA,EACF;AAAA,EAEA,iBAAiB;AACf,SAAK,QAAQ,aAAa,aAAW;AACnC,YAAM,QAAO,mCAAS,SAAQ,KAAK,OAAO,MAAM;AAChD,YAAM,QAAO,mCAAS,SAAQ,KAAK,QAAQ;AAE3C,UAAI,SAAS,YAAY;AACvB,cAAM,OAAO,KAAK,YAAY,GAAG,KAAK,QAAQ,MAAM,QAAW,GAAG;AAElE,eAAO,KAAK,QAAQ,YAAY,IAAI;AAAA,MACtC;AAEA,aAAO,KAAK;AAAA,IACd;AAEA,SAAK,QAAQ,QAAQ,aAAW;AAC9B,YAAM,QAAO,mCAAS,SAAQ,KAAK,OAAO,MAAM;AAChD,YAAM,OAAO,KAAK,YAAY,GAAG,KAAK,QAAQ,MAAM,KAAK,GAAG;AAE5D,aAAO,KAAK,QAAQ,YAAY,IAAI;AAAA,I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AM;AACvB,eAAO,KAAK,OAAO,QAAQ;AAAA,MAC7B;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,WAAO,CAAC,QAAQ,KAAK,OAAO,CAAC;AAAA,EAC/B;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,SAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MACzC,eAAe,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MAC/C,SAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA;AAAA,MAGzC,cAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MACzC,oBAAe,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,IACjD;AAAA,EACF;AACF,CAAC;","names":["Extension","Extension","Plugin","PluginKey","Extension","PluginKey","Extension","Plugin","DecorationSet","Decoration","DecorationSet","Plugin","Extension","Extension","Plugin","PluginKey","Decoration","DecorationSet","Extension","Plugin","PluginKey","Extension"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.cjs deleted file mode 100644 index f9bba06..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.cjs +++ /dev/null @@ -1,334 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/placeholder/index.ts -var index_exports = {}; -__export(index_exports, { - DEFAULT_DATA_ATTRIBUTE: () => DEFAULT_DATA_ATTRIBUTE, - PLUGIN_KEY: () => PLUGIN_KEY, - Placeholder: () => Placeholder, - preparePlaceholderAttribute: () => preparePlaceholderAttribute -}); -module.exports = __toCommonJS(index_exports); - -// src/placeholder/constants.ts -var import_state = require("@tiptap/pm/state"); -var DEFAULT_DATA_ATTRIBUTE = "placeholder"; -var PLUGIN_KEY = new import_state.PluginKey("tiptap__placeholder"); -var VIEWPORT_OVERSCAN_PX = 200; - -// src/placeholder/placeholder.ts -var import_core2 = require("@tiptap/core"); - -// src/placeholder/plugins/PlaceholderPlugin.ts -var import_state2 = require("@tiptap/pm/state"); - -// src/placeholder/utils/buildPlaceholderDecorations.ts -var import_core = require("@tiptap/core"); -var import_view2 = require("@tiptap/pm/view"); - -// src/placeholder/utils/createPlaceholderDecoration.ts -var import_view = require("@tiptap/pm/view"); -function createPlaceholderDecoration(options) { - const { - editor, - placeholder, - dataAttribute, - pos, - node, - isEmptyDoc, - hasAnchor, - classes: { emptyNode, emptyEditor } - } = options; - const classes = [emptyNode]; - if (isEmptyDoc) { - classes.push(emptyEditor); - } - return import_view.Decoration.node(pos, pos + node.nodeSize, { - class: classes.join(" "), - [dataAttribute]: typeof placeholder === "function" ? placeholder({ - editor, - node, - pos, - hasAnchor - }) : placeholder - }); -} - -// src/placeholder/utils/buildPlaceholderDecorations.ts -function resolveEmptyNodeClass(emptyNodeClass, props) { - return typeof emptyNodeClass === "function" ? emptyNodeClass(props) : emptyNodeClass; -} -function buildPlaceholderDecorations({ - editor, - options, - dataAttribute, - doc, - selection -}) { - var _a, _b; - const active = editor.isEditable || !options.showOnlyWhenEditable; - if (!active) { - return null; - } - const { anchor } = selection; - const decorations = []; - const isEmptyDoc = editor.isEmpty; - const useResolvedPath = options.showOnlyCurrent && !options.includeChildren; - if (useResolvedPath) { - const resolved = doc.resolve(anchor); - const node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter; - const nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor; - if (node && node.type.isTextblock && (0, import_core.isNodeEmpty)(node)) { - const hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize; - decorations.push( - createPlaceholderDecoration({ - editor, - isEmptyDoc, - dataAttribute, - hasAnchor, - placeholder: options.placeholder, - classes: { - emptyEditor: options.emptyEditorClass, - emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, { - editor, - node, - pos: nodeStart, - hasAnchor - }) - }, - node, - pos: nodeStart - }) - ); - } - } else { - const pluginState = PLUGIN_KEY.getState(editor.state); - const from = (_a = pluginState == null ? void 0 : pluginState.topPos) != null ? _a : 0; - const to = (_b = pluginState == null ? void 0 : pluginState.bottomPos) != null ? _b : doc.content.size; - doc.nodesBetween(from, to, (node, pos) => { - const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize; - const isEmpty = !node.isLeaf && (0, import_core.isNodeEmpty)(node); - if (!node.type.isTextblock) { - return options.includeChildren; - } - if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) { - decorations.push( - createPlaceholderDecoration({ - editor, - isEmptyDoc, - dataAttribute, - hasAnchor, - placeholder: options.placeholder, - classes: { - emptyEditor: options.emptyEditorClass, - emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, { - editor, - node, - pos, - hasAnchor - }) - }, - node, - pos - }) - ); - } - return options.includeChildren; - }); - } - return import_view2.DecorationSet.create(doc, decorations); -} - -// src/placeholder/utils/preparePlaceholderAttribute.ts -function preparePlaceholderAttribute(attr) { - return attr.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase(); -} - -// src/placeholder/utils/findScrollParent.ts -function isScrollable(el) { - const style = getComputedStyle(el); - const overflow = `${style.overflow} ${style.overflowY} ${style.overflowX}`; - return /auto|scroll|overlay/.test(overflow); -} -function findScrollParent(element) { - let el = element; - while (el) { - if (isScrollable(el)) { - return el; - } - const parent = el.parentElement; - if (!parent) { - const root = el.getRootNode(); - if (root instanceof ShadowRoot) { - el = root.host; - continue; - } - return window; - } - el = parent; - } - return window; -} - -// src/placeholder/utils/getViewportBoundaryPositions.ts -function getContainerRect(container) { - if (container === window) { - return { top: 0, bottom: window.innerHeight }; - } - return container.getBoundingClientRect(); -} -function getViewportBoundaryPositions({ - doc, - view, - scrollContainer -}) { - const editorRect = view.dom.getBoundingClientRect(); - const containerRect = scrollContainer ? getContainerRect(scrollContainer) : { top: 0, bottom: window.innerHeight }; - const visibleTop = Math.max(editorRect.top, containerRect.top) - VIEWPORT_OVERSCAN_PX; - const visibleBottom = Math.min(editorRect.bottom, containerRect.bottom) + VIEWPORT_OVERSCAN_PX; - if (visibleTop >= visibleBottom) { - return { top: 0, bottom: doc.content.size }; - } - const isRTL = getComputedStyle(view.dom).direction === "rtl"; - const x = isRTL ? Math.max(editorRect.right - 2, editorRect.left + 2) : editorRect.left + 2; - const topPos = view.posAtCoords({ left: x, top: visibleTop + 2 }); - const bottomPos = view.posAtCoords({ left: x, top: visibleBottom - 2 }); - return { - top: topPos ? topPos.pos : 0, - bottom: bottomPos ? bottomPos.pos : doc.content.size - }; -} - -// src/placeholder/utils/viewportTracking.ts -var viewportPluginState = { - /** - * Initialises the viewport state with no known positions. - * @returns The initial viewport state. - */ - init() { - return { topPos: null, bottomPos: null }; - }, - /** - * Updates the viewport state from incoming transactions. - * @param tr - The transaction being applied. - * @param prev - The previous viewport state. - * @returns The next viewport state. - */ - apply(tr, prev) { - const meta = tr.getMeta(PLUGIN_KEY); - if (meta == null ? void 0 : meta.positions) { - return { topPos: meta.positions.top, bottomPos: meta.positions.bottom }; - } - if (!tr.docChanged) { - return prev; - } - return { - topPos: prev.topPos !== null ? tr.mapping.map(prev.topPos) : null, - bottomPos: prev.bottomPos !== null ? tr.mapping.map(prev.bottomPos) : null - }; - } -}; -function createViewportPluginView(view) { - const scrollContainer = findScrollParent(view.dom); - const computeAndDispatch = () => { - const positions = getViewportBoundaryPositions({ - view, - doc: view.state.doc, - scrollContainer - }); - const prev = PLUGIN_KEY.getState(view.state); - if ((prev == null ? void 0 : prev.topPos) === positions.top && (prev == null ? void 0 : prev.bottomPos) === positions.bottom) { - return; - } - const tr = view.state.tr.setMeta(PLUGIN_KEY, { positions }); - view.dispatch(tr); - }; - let frame = null; - let lastCompute = 0; - const MIN_SCROLL_INTERVAL = 150; - const scheduleFrame = () => { - if (frame !== null) return; - frame = requestAnimationFrame(() => { - frame = null; - const now = performance.now(); - if (now - lastCompute >= MIN_SCROLL_INTERVAL) { - lastCompute = now; - computeAndDispatch(); - } else { - scheduleFrame(); - } - }); - }; - scrollContainer.addEventListener("scroll", scheduleFrame, { passive: true }); - computeAndDispatch(); - return { - update(_view, prevState) { - if (view.state.doc.content.size !== prevState.doc.content.size) { - scheduleFrame(); - } - }, - destroy: () => { - if (frame !== null) { - cancelAnimationFrame(frame); - } - scrollContainer.removeEventListener("scroll", scheduleFrame); - } - }; -} - -// src/placeholder/plugins/PlaceholderPlugin.ts -function createPlaceholderPlugin({ editor, options }) { - const dataAttribute = options.dataAttribute ? `data-${preparePlaceholderAttribute(options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`; - return new import_state2.Plugin({ - key: PLUGIN_KEY, - state: viewportPluginState, - view: createViewportPluginView, - props: { - decorations: ({ doc, selection }) => buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }) - } - }); -} - -// src/placeholder/placeholder.ts -var Placeholder = import_core2.Extension.create({ - name: "placeholder", - addOptions() { - return { - emptyEditorClass: "is-editor-empty", - emptyNodeClass: "is-empty", - dataAttribute: DEFAULT_DATA_ATTRIBUTE, - placeholder: "Write something \u2026", - showOnlyWhenEditable: true, - showOnlyCurrent: true, - includeChildren: false - }; - }, - addProseMirrorPlugins() { - return [createPlaceholderPlugin({ editor: this.editor, options: this.options })]; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - DEFAULT_DATA_ATTRIBUTE, - PLUGIN_KEY, - Placeholder, - preparePlaceholderAttribute -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.cjs.map deleted file mode 100644 index 749d0b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/placeholder/index.ts","../../src/placeholder/constants.ts","../../src/placeholder/placeholder.ts","../../src/placeholder/plugins/PlaceholderPlugin.ts","../../src/placeholder/utils/buildPlaceholderDecorations.ts","../../src/placeholder/utils/createPlaceholderDecoration.ts","../../src/placeholder/utils/preparePlaceholderAttribute.ts","../../src/placeholder/utils/findScrollParent.ts","../../src/placeholder/utils/getViewportBoundaryPositions.ts","../../src/placeholder/utils/viewportTracking.ts"],"sourcesContent":["export { DEFAULT_DATA_ATTRIBUTE, PLUGIN_KEY } from './constants.js'\nexport * from './placeholder.js'\nexport * from './types.js'\nexport { preparePlaceholderAttribute } from './utils/preparePlaceholderAttribute.js'\n","import { PluginKey } from '@tiptap/pm/state'\n\nimport type { ViewportState } from './types.js'\n\n/** The default data attribute label */\nexport const DEFAULT_DATA_ATTRIBUTE = 'placeholder'\n\n/** The plugin key used to store and read the placeholder viewport state */\nexport const PLUGIN_KEY = new PluginKey('tiptap__placeholder')\n\n/**\n * Extra pixels added above and below the visible viewport when computing the\n * range of nodes to decorate. Decorating slightly beyond the fold means a\n * node already has its placeholder before it scrolls into view, which hides\n * the latency introduced by the throttled viewport recompute.\n */\nexport const VIEWPORT_OVERSCAN_PX = 200\n","import { Extension } from '@tiptap/core'\n\nimport { DEFAULT_DATA_ATTRIBUTE } from './constants.js'\nimport { createPlaceholderPlugin } from './plugins/PlaceholderPlugin.js'\nimport type { PlaceholderOptions } from './types.js'\n\n/**\n * This extension allows you to add a placeholder to your editor.\n * A placeholder is a text that appears when the editor or a node is empty.\n * @see https://www.tiptap.dev/api/extensions/placeholder\n */\nexport const Placeholder = Extension.create({\n name: 'placeholder',\n\n addOptions() {\n return {\n emptyEditorClass: 'is-editor-empty',\n emptyNodeClass: 'is-empty',\n dataAttribute: DEFAULT_DATA_ATTRIBUTE,\n placeholder: 'Write something …',\n showOnlyWhenEditable: true,\n showOnlyCurrent: true,\n includeChildren: false,\n }\n },\n\n addProseMirrorPlugins() {\n return [createPlaceholderPlugin({ editor: this.editor, options: this.options })]\n },\n})\n","import type { Editor } from '@tiptap/core'\nimport { Plugin } from '@tiptap/pm/state'\n\nimport { DEFAULT_DATA_ATTRIBUTE, PLUGIN_KEY } from '../constants.js'\nimport type { PlaceholderOptions } from '../types.js'\nimport { buildPlaceholderDecorations } from '../utils/buildPlaceholderDecorations.js'\nimport { preparePlaceholderAttribute } from '../utils/preparePlaceholderAttribute.js'\nimport { createViewportPluginView, viewportPluginState } from '../utils/viewportTracking.js'\n\nexport type CreatePluginOptions = {\n editor: Editor\n options: PlaceholderOptions\n}\n\n/**\n * Creates the ProseMirror plugin that renders placeholder decorations.\n * @param options.editor - The editor instance.\n * @param options.options - The resolved placeholder options.\n * @returns The configured placeholder plugin.\n */\nexport function createPlaceholderPlugin({ editor, options }: CreatePluginOptions) {\n const dataAttribute = options.dataAttribute\n ? `data-${preparePlaceholderAttribute(options.dataAttribute)}`\n : `data-${DEFAULT_DATA_ATTRIBUTE}`\n\n return new Plugin({\n key: PLUGIN_KEY,\n state: viewportPluginState,\n view: createViewportPluginView,\n props: {\n decorations: ({ doc, selection }) =>\n buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }),\n },\n })\n}\n","import type { Editor } from '@tiptap/core'\nimport { isNodeEmpty } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport type { Selection } from '@tiptap/pm/state'\nimport type { Decoration } from '@tiptap/pm/view'\nimport { DecorationSet } from '@tiptap/pm/view'\n\nimport { PLUGIN_KEY } from '../constants.js'\nimport type { PlaceholderOptions } from '../types.js'\nimport { createPlaceholderDecoration } from './createPlaceholderDecoration.js'\n\nfunction resolveEmptyNodeClass(\n emptyNodeClass: PlaceholderOptions['emptyNodeClass'],\n props: { editor: Editor; node: Node; pos: number; hasAnchor: boolean },\n): string {\n return typeof emptyNodeClass === 'function' ? emptyNodeClass(props) : emptyNodeClass\n}\n\n/**\n * Builds the placeholder decorations for the current document state.\n * @param options.editor - The editor instance.\n * @param options.options - The resolved placeholder options.\n * @param options.dataAttribute - The prepared `data-*` attribute name.\n * @param options.doc - The current document node.\n * @param options.selection - The current selection.\n * @returns A decoration set, or `null` when no placeholders should be shown.\n */\nexport function buildPlaceholderDecorations({\n editor,\n options,\n dataAttribute,\n doc,\n selection,\n}: {\n editor: Editor\n options: PlaceholderOptions\n dataAttribute: string\n doc: Node\n selection: Selection\n}): DecorationSet | null {\n const active = editor.isEditable || !options.showOnlyWhenEditable\n\n if (!active) {\n return null\n }\n\n const { anchor } = selection\n const decorations: Decoration[] = []\n const isEmptyDoc = editor.isEmpty\n\n const useResolvedPath = options.showOnlyCurrent && !options.includeChildren\n\n if (useResolvedPath) {\n const resolved = doc.resolve(anchor)\n\n // When the selection spans the whole document (e.g. an `AllSelection`\n // after Cmd+A), the anchor resolves to the document level (depth 0). In\n // that case the relevant textblock is the node directly after the\n // position rather than an ancestor. otherwise the placeholder would\n // disappear after selecting all and deleting.\n const node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter\n const nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor\n\n if (node && node.type.isTextblock && isNodeEmpty(node)) {\n const hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize\n\n decorations.push(\n createPlaceholderDecoration({\n editor,\n isEmptyDoc,\n dataAttribute,\n hasAnchor,\n placeholder: options.placeholder,\n classes: {\n emptyEditor: options.emptyEditorClass,\n emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n editor,\n node,\n pos: nodeStart,\n hasAnchor,\n }),\n },\n node,\n pos: nodeStart,\n }),\n )\n }\n } else {\n const pluginState = PLUGIN_KEY.getState(editor.state)\n const from = pluginState?.topPos ?? 0\n const to = pluginState?.bottomPos ?? doc.content.size\n\n doc.nodesBetween(from, to, (node, pos) => {\n const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize\n const isEmpty = !node.isLeaf && isNodeEmpty(node)\n\n if (!node.type.isTextblock) {\n return options.includeChildren\n }\n\n if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) {\n decorations.push(\n createPlaceholderDecoration({\n editor,\n isEmptyDoc,\n dataAttribute,\n hasAnchor,\n placeholder: options.placeholder,\n classes: {\n emptyEditor: options.emptyEditorClass,\n emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n editor,\n node,\n pos,\n hasAnchor,\n }),\n },\n node,\n pos,\n }),\n )\n }\n\n return options.includeChildren\n })\n }\n\n return DecorationSet.create(doc, decorations)\n}\n","import type { Editor } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport { Decoration } from '@tiptap/pm/view'\n\nimport type { PlaceholderOptions } from '../types.js'\n\n/**\n * Creates a ProseMirror node decoration that applies a placeholder\n * CSS class and data attribute to an empty node.\n * @param options.editor - The editor instance\n * @param options.pos - The position of the node in the document\n * @param options.node - The ProseMirror node\n * @param options.isEmptyDoc - Whether the entire document is empty\n * @param options.hasAnchor - Whether the selection anchor is within the node\n * @param options.dataAttribute - The data attribute name (e.g. `data-placeholder`)\n * @param options.classes - CSS classes for empty nodes and the empty editor\n * @param options.placeholder - The placeholder text or a function that returns it\n * @returns A ProseMirror node decoration with placeholder classes and data attribute\n */\nexport function createPlaceholderDecoration(options: {\n editor: Editor\n pos: number\n node: Node\n isEmptyDoc: boolean\n hasAnchor: boolean\n dataAttribute: string\n classes: {\n emptyEditor: PlaceholderOptions['emptyEditorClass']\n emptyNode: string\n }\n placeholder: PlaceholderOptions['placeholder']\n}) {\n const {\n editor,\n placeholder,\n dataAttribute,\n pos,\n node,\n isEmptyDoc,\n hasAnchor,\n classes: { emptyNode, emptyEditor },\n } = options\n const classes = [emptyNode]\n\n if (isEmptyDoc) {\n classes.push(emptyEditor)\n }\n\n return Decoration.node(pos, pos + node.nodeSize, {\n class: classes.join(' '),\n [dataAttribute]:\n typeof placeholder === 'function'\n ? placeholder({\n editor,\n node,\n pos,\n hasAnchor,\n })\n : placeholder,\n })\n}\n","/**\n * Prepares the placeholder attribute by ensuring it is properly formatted.\n * @param attr - The placeholder attribute string.\n * @returns The prepared placeholder attribute string.\n */\nexport function preparePlaceholderAttribute(attr: string): string {\n return (\n attr\n // replace whitespace with dashes\n .replace(/\\s+/g, '-')\n // replace non-alphanumeric characters\n // or special chars like $, %, &, etc.\n // but not dashes\n .replace(/[^a-zA-Z0-9-]/g, '')\n // and replace any numeric character at the start\n .replace(/^[0-9-]+/, '')\n // and finally replace any stray, leading dashes\n .replace(/^-+/, '')\n .toLowerCase()\n )\n}\n","/**\n * Checks if an element is scrollable by testing its overflow properties.\n * Elements with `overflow: hidden` or `overflow: clip` are intentionally\n * excluded — they clip content but don't emit scroll events.\n */\nfunction isScrollable(el: HTMLElement): boolean {\n const style = getComputedStyle(el)\n const overflow = `${style.overflow} ${style.overflowY} ${style.overflowX}`\n\n return /auto|scroll|overlay/.test(overflow)\n}\n\nexport function findScrollParent(element: HTMLElement): HTMLElement | Window {\n let el: HTMLElement | null = element\n\n while (el) {\n if (isScrollable(el)) {\n return el\n }\n\n // Check if we hit a Shadow DOM boundary. If so, jump to the shadow host\n // and continue traversing the light DOM.\n const parent = el.parentElement\n if (!parent) {\n const root = el.getRootNode()\n if (root instanceof ShadowRoot) {\n el = root.host as HTMLElement\n continue\n }\n\n return window\n }\n\n el = parent\n }\n\n return window\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorView } from '@tiptap/pm/view'\n\nimport { VIEWPORT_OVERSCAN_PX } from '../constants.js'\n\nfunction getContainerRect(container: HTMLElement | Window): { top: number; bottom: number } {\n if (container === window) {\n return { top: 0, bottom: window.innerHeight }\n }\n\n return (container as HTMLElement).getBoundingClientRect()\n}\n\nexport function getViewportBoundaryPositions({\n doc,\n view,\n scrollContainer,\n}: {\n doc: Node\n view: EditorView\n scrollContainer?: HTMLElement | Window\n}) {\n const editorRect = view.dom.getBoundingClientRect()\n const containerRect = scrollContainer\n ? getContainerRect(scrollContainer)\n : { top: 0, bottom: window.innerHeight }\n\n const visibleTop = Math.max(editorRect.top, containerRect.top) - VIEWPORT_OVERSCAN_PX\n const visibleBottom = Math.min(editorRect.bottom, containerRect.bottom) + VIEWPORT_OVERSCAN_PX\n\n if (visibleTop >= visibleBottom) {\n // Editor is not visible — fall back to full document range\n return { top: 0, bottom: doc.content.size }\n }\n\n // Pick the x-coordinate based on text direction. In LTR the content\n // starts at the left edge; in RTL it starts at the right edge.\n // Clamp to ensure the coordinate stays inside the editor bounds.\n const isRTL = getComputedStyle(view.dom).direction === 'rtl'\n const x = isRTL ? Math.max(editorRect.right - 2, editorRect.left + 2) : editorRect.left + 2\n\n const topPos = view.posAtCoords({ left: x, top: visibleTop + 2 })\n const bottomPos = view.posAtCoords({ left: x, top: visibleBottom - 2 })\n\n return {\n top: topPos ? topPos.pos : 0,\n bottom: bottomPos ? bottomPos.pos : doc.content.size,\n }\n}\n","import type { EditorState, PluginView, StateField, Transaction } from '@tiptap/pm/state'\nimport type { EditorView } from '@tiptap/pm/view'\n\nimport { PLUGIN_KEY } from '../constants.js'\nimport type { ViewportState } from '../types.js'\nimport { findScrollParent } from './findScrollParent.js'\nimport { getViewportBoundaryPositions } from './getViewportBoundaryPositions.js'\n\n/**\n * The plugin `state` config that tracks the visible viewport boundaries so the\n * decoration callback only scans the nodes currently on screen.\n */\nexport const viewportPluginState: StateField = {\n /**\n * Initialises the viewport state with no known positions.\n * @returns The initial viewport state.\n */\n init(): ViewportState {\n return { topPos: null, bottomPos: null }\n },\n\n /**\n * Updates the viewport state from incoming transactions.\n * @param tr - The transaction being applied.\n * @param prev - The previous viewport state.\n * @returns The next viewport state.\n */\n apply(tr: Transaction, prev: ViewportState): ViewportState {\n const meta = tr.getMeta(PLUGIN_KEY) as\n | { positions?: { top: number; bottom: number } }\n | undefined\n\n if (meta?.positions) {\n return { topPos: meta.positions.top, bottomPos: meta.positions.bottom }\n }\n\n if (!tr.docChanged) {\n return prev\n }\n\n // Preserve last known viewport positions across transactions.\n // Without this, every keystroke resets back to a full document\n // scan, defeating the viewport optimisation.\n // Only map when we have actual positions — null means \"no viewport\n // info yet\" and should stay null to fall back to full doc scan.\n return {\n topPos: prev.topPos !== null ? tr.mapping.map(prev.topPos) : null,\n bottomPos: prev.bottomPos !== null ? tr.mapping.map(prev.bottomPos) : null,\n }\n },\n}\n\n/**\n * Creates the plugin `view` that recomputes the visible viewport on scroll and\n * document size changes, dispatching the result into the plugin state.\n * @param view - The editor view the plugin is attached to.\n * @returns A plugin view with `update` and `destroy` handlers.\n */\nexport function createViewportPluginView(view: EditorView): PluginView {\n const scrollContainer = findScrollParent(view.dom)\n\n const computeAndDispatch = () => {\n const positions = getViewportBoundaryPositions({\n view,\n doc: view.state.doc,\n scrollContainer,\n })\n\n const prev = PLUGIN_KEY.getState(view.state)\n if (prev?.topPos === positions.top && prev?.bottomPos === positions.bottom) {\n return\n }\n\n const tr = view.state.tr.setMeta(PLUGIN_KEY, { positions })\n view.dispatch(tr)\n }\n\n // rAF-based scheduler with interval guard (150ms → ~6–7 Hz) used by\n // scroll events and update(). The overscan margin hides the extra\n // latency. When the guard blocks, the callback reschedules itself so\n // the trailing position is always captured.\n let frame: number | null = null\n let lastCompute = 0\n const MIN_SCROLL_INTERVAL = 150\n\n const scheduleFrame = () => {\n if (frame !== null) return\n frame = requestAnimationFrame(() => {\n frame = null\n const now = performance.now()\n if (now - lastCompute >= MIN_SCROLL_INTERVAL) {\n lastCompute = now\n computeAndDispatch()\n } else {\n scheduleFrame()\n }\n })\n }\n\n scrollContainer.addEventListener('scroll', scheduleFrame, { passive: true })\n\n // Fire once to populate initial viewport\n computeAndDispatch()\n\n return {\n update(_view: EditorView, prevState: EditorState) {\n if (view.state.doc.content.size !== prevState.doc.content.size) {\n scheduleFrame()\n }\n },\n destroy: () => {\n if (frame !== null) {\n cancelAnimationFrame(frame)\n }\n scrollContainer.removeEventListener('scroll', scheduleFrame)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA0B;AAKnB,IAAM,yBAAyB;AAG/B,IAAM,aAAa,IAAI,uBAAyB,qBAAqB;AAQrE,IAAM,uBAAuB;;;AChBpC,IAAAA,eAA0B;;;ACC1B,IAAAC,gBAAuB;;;ACAvB,kBAA4B;AAI5B,IAAAC,eAA8B;;;ACH9B,kBAA2B;AAiBpB,SAAS,4BAA4B,SAYzC;AACD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,EAAE,WAAW,YAAY;AAAA,EACpC,IAAI;AACJ,QAAM,UAAU,CAAC,SAAS;AAE1B,MAAI,YAAY;AACd,Y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AC,CAAC;AAAA,EACjF;AACF,CAAC;","names":["import_core","import_state","import_view"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.d.cts deleted file mode 100644 index 9b36545..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.d.cts +++ /dev/null @@ -1,95 +0,0 @@ -import { PluginKey } from '@tiptap/pm/state'; -import { Editor, Extension } from '@tiptap/core'; -import { Node } from '@tiptap/pm/model'; - -/** - * The viewport positions tracked by the placeholder plugin. - * `null` means "no viewport info yet" — the decoration callback falls back to - * a full document scan until the scroll handler fires. - */ -interface ViewportState { - topPos: number | null; - bottomPos: number | null; -} -interface PlaceholderOptions { - /** - * **The class name for the empty editor** - * @default 'is-editor-empty' - */ - emptyEditorClass: string; - /** - * **The class name for empty nodes** - * - * You can use a function to return a dynamic class name or a string. - * @default 'is-empty' - */ - emptyNodeClass: ((EmptyNodeClassProps: { - editor: Editor; - node: Node; - pos: number; - hasAnchor: boolean; - }) => string) | string; - /** - * **The data-attribute used for the placeholder label** - * Will be prepended with `data-` and converted to kebab-case and cleaned of special characters. - * @default 'placeholder' - */ - dataAttribute: string; - /** - * **The placeholder content** - * - * You can use a function to return a dynamic placeholder or a string. - * @default 'Write something …' - */ - placeholder: ((PlaceholderProps: { - editor: Editor; - node: Node; - pos: number; - hasAnchor: boolean; - }) => string) | string; - /** - * **Checks if the placeholder should be only shown when the editor is editable.** - * - * If true, the placeholder will only be shown when the editor is editable. - * If false, the placeholder will always be shown. - * @default true - */ - showOnlyWhenEditable: boolean; - /** - * **Checks if the placeholder should be only shown when the current node is empty.** - * - * If true, the placeholder will only be shown when the current node is empty. - * If false, the placeholder will be shown when any node is empty. - * @default true - */ - showOnlyCurrent: boolean; - /** - * **Controls if the placeholder should be shown for all descendants.** - * - * If true, the placeholder will be shown for all descendants. - * If false, the placeholder will only be shown for the current node. - * @default false - */ - includeChildren: boolean; -} - -/** The default data attribute label */ -declare const DEFAULT_DATA_ATTRIBUTE = "placeholder"; -/** The plugin key used to store and read the placeholder viewport state */ -declare const PLUGIN_KEY: PluginKey; - -/** - * This extension allows you to add a placeholder to your editor. - * A placeholder is a text that appears when the editor or a node is empty. - * @see https://www.tiptap.dev/api/extensions/placeholder - */ -declare const Placeholder: Extension; - -/** - * Prepares the placeholder attribute by ensuring it is properly formatted. - * @param attr - The placeholder attribute string. - * @returns The prepared placeholder attribute string. - */ -declare function preparePlaceholderAttribute(attr: string): string; - -export { DEFAULT_DATA_ATTRIBUTE, PLUGIN_KEY, Placeholder, type PlaceholderOptions, type ViewportState, preparePlaceholderAttribute }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.d.ts deleted file mode 100644 index 9b36545..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { PluginKey } from '@tiptap/pm/state'; -import { Editor, Extension } from '@tiptap/core'; -import { Node } from '@tiptap/pm/model'; - -/** - * The viewport positions tracked by the placeholder plugin. - * `null` means "no viewport info yet" — the decoration callback falls back to - * a full document scan until the scroll handler fires. - */ -interface ViewportState { - topPos: number | null; - bottomPos: number | null; -} -interface PlaceholderOptions { - /** - * **The class name for the empty editor** - * @default 'is-editor-empty' - */ - emptyEditorClass: string; - /** - * **The class name for empty nodes** - * - * You can use a function to return a dynamic class name or a string. - * @default 'is-empty' - */ - emptyNodeClass: ((EmptyNodeClassProps: { - editor: Editor; - node: Node; - pos: number; - hasAnchor: boolean; - }) => string) | string; - /** - * **The data-attribute used for the placeholder label** - * Will be prepended with `data-` and converted to kebab-case and cleaned of special characters. - * @default 'placeholder' - */ - dataAttribute: string; - /** - * **The placeholder content** - * - * You can use a function to return a dynamic placeholder or a string. - * @default 'Write something …' - */ - placeholder: ((PlaceholderProps: { - editor: Editor; - node: Node; - pos: number; - hasAnchor: boolean; - }) => string) | string; - /** - * **Checks if the placeholder should be only shown when the editor is editable.** - * - * If true, the placeholder will only be shown when the editor is editable. - * If false, the placeholder will always be shown. - * @default true - */ - showOnlyWhenEditable: boolean; - /** - * **Checks if the placeholder should be only shown when the current node is empty.** - * - * If true, the placeholder will only be shown when the current node is empty. - * If false, the placeholder will be shown when any node is empty. - * @default true - */ - showOnlyCurrent: boolean; - /** - * **Controls if the placeholder should be shown for all descendants.** - * - * If true, the placeholder will be shown for all descendants. - * If false, the placeholder will only be shown for the current node. - * @default false - */ - includeChildren: boolean; -} - -/** The default data attribute label */ -declare const DEFAULT_DATA_ATTRIBUTE = "placeholder"; -/** The plugin key used to store and read the placeholder viewport state */ -declare const PLUGIN_KEY: PluginKey; - -/** - * This extension allows you to add a placeholder to your editor. - * A placeholder is a text that appears when the editor or a node is empty. - * @see https://www.tiptap.dev/api/extensions/placeholder - */ -declare const Placeholder: Extension; - -/** - * Prepares the placeholder attribute by ensuring it is properly formatted. - * @param attr - The placeholder attribute string. - * @returns The prepared placeholder attribute string. - */ -declare function preparePlaceholderAttribute(attr: string): string; - -export { DEFAULT_DATA_ATTRIBUTE, PLUGIN_KEY, Placeholder, type PlaceholderOptions, type ViewportState, preparePlaceholderAttribute }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.js deleted file mode 100644 index 800273c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.js +++ /dev/null @@ -1,304 +0,0 @@ -// src/placeholder/constants.ts -import { PluginKey } from "@tiptap/pm/state"; -var DEFAULT_DATA_ATTRIBUTE = "placeholder"; -var PLUGIN_KEY = new PluginKey("tiptap__placeholder"); -var VIEWPORT_OVERSCAN_PX = 200; - -// src/placeholder/placeholder.ts -import { Extension } from "@tiptap/core"; - -// src/placeholder/plugins/PlaceholderPlugin.ts -import { Plugin } from "@tiptap/pm/state"; - -// src/placeholder/utils/buildPlaceholderDecorations.ts -import { isNodeEmpty } from "@tiptap/core"; -import { DecorationSet } from "@tiptap/pm/view"; - -// src/placeholder/utils/createPlaceholderDecoration.ts -import { Decoration } from "@tiptap/pm/view"; -function createPlaceholderDecoration(options) { - const { - editor, - placeholder, - dataAttribute, - pos, - node, - isEmptyDoc, - hasAnchor, - classes: { emptyNode, emptyEditor } - } = options; - const classes = [emptyNode]; - if (isEmptyDoc) { - classes.push(emptyEditor); - } - return Decoration.node(pos, pos + node.nodeSize, { - class: classes.join(" "), - [dataAttribute]: typeof placeholder === "function" ? placeholder({ - editor, - node, - pos, - hasAnchor - }) : placeholder - }); -} - -// src/placeholder/utils/buildPlaceholderDecorations.ts -function resolveEmptyNodeClass(emptyNodeClass, props) { - return typeof emptyNodeClass === "function" ? emptyNodeClass(props) : emptyNodeClass; -} -function buildPlaceholderDecorations({ - editor, - options, - dataAttribute, - doc, - selection -}) { - var _a, _b; - const active = editor.isEditable || !options.showOnlyWhenEditable; - if (!active) { - return null; - } - const { anchor } = selection; - const decorations = []; - const isEmptyDoc = editor.isEmpty; - const useResolvedPath = options.showOnlyCurrent && !options.includeChildren; - if (useResolvedPath) { - const resolved = doc.resolve(anchor); - const node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter; - const nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor; - if (node && node.type.isTextblock && isNodeEmpty(node)) { - const hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize; - decorations.push( - createPlaceholderDecoration({ - editor, - isEmptyDoc, - dataAttribute, - hasAnchor, - placeholder: options.placeholder, - classes: { - emptyEditor: options.emptyEditorClass, - emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, { - editor, - node, - pos: nodeStart, - hasAnchor - }) - }, - node, - pos: nodeStart - }) - ); - } - } else { - const pluginState = PLUGIN_KEY.getState(editor.state); - const from = (_a = pluginState == null ? void 0 : pluginState.topPos) != null ? _a : 0; - const to = (_b = pluginState == null ? void 0 : pluginState.bottomPos) != null ? _b : doc.content.size; - doc.nodesBetween(from, to, (node, pos) => { - const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize; - const isEmpty = !node.isLeaf && isNodeEmpty(node); - if (!node.type.isTextblock) { - return options.includeChildren; - } - if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) { - decorations.push( - createPlaceholderDecoration({ - editor, - isEmptyDoc, - dataAttribute, - hasAnchor, - placeholder: options.placeholder, - classes: { - emptyEditor: options.emptyEditorClass, - emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, { - editor, - node, - pos, - hasAnchor - }) - }, - node, - pos - }) - ); - } - return options.includeChildren; - }); - } - return DecorationSet.create(doc, decorations); -} - -// src/placeholder/utils/preparePlaceholderAttribute.ts -function preparePlaceholderAttribute(attr) { - return attr.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase(); -} - -// src/placeholder/utils/findScrollParent.ts -function isScrollable(el) { - const style = getComputedStyle(el); - const overflow = `${style.overflow} ${style.overflowY} ${style.overflowX}`; - return /auto|scroll|overlay/.test(overflow); -} -function findScrollParent(element) { - let el = element; - while (el) { - if (isScrollable(el)) { - return el; - } - const parent = el.parentElement; - if (!parent) { - const root = el.getRootNode(); - if (root instanceof ShadowRoot) { - el = root.host; - continue; - } - return window; - } - el = parent; - } - return window; -} - -// src/placeholder/utils/getViewportBoundaryPositions.ts -function getContainerRect(container) { - if (container === window) { - return { top: 0, bottom: window.innerHeight }; - } - return container.getBoundingClientRect(); -} -function getViewportBoundaryPositions({ - doc, - view, - scrollContainer -}) { - const editorRect = view.dom.getBoundingClientRect(); - const containerRect = scrollContainer ? getContainerRect(scrollContainer) : { top: 0, bottom: window.innerHeight }; - const visibleTop = Math.max(editorRect.top, containerRect.top) - VIEWPORT_OVERSCAN_PX; - const visibleBottom = Math.min(editorRect.bottom, containerRect.bottom) + VIEWPORT_OVERSCAN_PX; - if (visibleTop >= visibleBottom) { - return { top: 0, bottom: doc.content.size }; - } - const isRTL = getComputedStyle(view.dom).direction === "rtl"; - const x = isRTL ? Math.max(editorRect.right - 2, editorRect.left + 2) : editorRect.left + 2; - const topPos = view.posAtCoords({ left: x, top: visibleTop + 2 }); - const bottomPos = view.posAtCoords({ left: x, top: visibleBottom - 2 }); - return { - top: topPos ? topPos.pos : 0, - bottom: bottomPos ? bottomPos.pos : doc.content.size - }; -} - -// src/placeholder/utils/viewportTracking.ts -var viewportPluginState = { - /** - * Initialises the viewport state with no known positions. - * @returns The initial viewport state. - */ - init() { - return { topPos: null, bottomPos: null }; - }, - /** - * Updates the viewport state from incoming transactions. - * @param tr - The transaction being applied. - * @param prev - The previous viewport state. - * @returns The next viewport state. - */ - apply(tr, prev) { - const meta = tr.getMeta(PLUGIN_KEY); - if (meta == null ? void 0 : meta.positions) { - return { topPos: meta.positions.top, bottomPos: meta.positions.bottom }; - } - if (!tr.docChanged) { - return prev; - } - return { - topPos: prev.topPos !== null ? tr.mapping.map(prev.topPos) : null, - bottomPos: prev.bottomPos !== null ? tr.mapping.map(prev.bottomPos) : null - }; - } -}; -function createViewportPluginView(view) { - const scrollContainer = findScrollParent(view.dom); - const computeAndDispatch = () => { - const positions = getViewportBoundaryPositions({ - view, - doc: view.state.doc, - scrollContainer - }); - const prev = PLUGIN_KEY.getState(view.state); - if ((prev == null ? void 0 : prev.topPos) === positions.top && (prev == null ? void 0 : prev.bottomPos) === positions.bottom) { - return; - } - const tr = view.state.tr.setMeta(PLUGIN_KEY, { positions }); - view.dispatch(tr); - }; - let frame = null; - let lastCompute = 0; - const MIN_SCROLL_INTERVAL = 150; - const scheduleFrame = () => { - if (frame !== null) return; - frame = requestAnimationFrame(() => { - frame = null; - const now = performance.now(); - if (now - lastCompute >= MIN_SCROLL_INTERVAL) { - lastCompute = now; - computeAndDispatch(); - } else { - scheduleFrame(); - } - }); - }; - scrollContainer.addEventListener("scroll", scheduleFrame, { passive: true }); - computeAndDispatch(); - return { - update(_view, prevState) { - if (view.state.doc.content.size !== prevState.doc.content.size) { - scheduleFrame(); - } - }, - destroy: () => { - if (frame !== null) { - cancelAnimationFrame(frame); - } - scrollContainer.removeEventListener("scroll", scheduleFrame); - } - }; -} - -// src/placeholder/plugins/PlaceholderPlugin.ts -function createPlaceholderPlugin({ editor, options }) { - const dataAttribute = options.dataAttribute ? `data-${preparePlaceholderAttribute(options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`; - return new Plugin({ - key: PLUGIN_KEY, - state: viewportPluginState, - view: createViewportPluginView, - props: { - decorations: ({ doc, selection }) => buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }) - } - }); -} - -// src/placeholder/placeholder.ts -var Placeholder = Extension.create({ - name: "placeholder", - addOptions() { - return { - emptyEditorClass: "is-editor-empty", - emptyNodeClass: "is-empty", - dataAttribute: DEFAULT_DATA_ATTRIBUTE, - placeholder: "Write something \u2026", - showOnlyWhenEditable: true, - showOnlyCurrent: true, - includeChildren: false - }; - }, - addProseMirrorPlugins() { - return [createPlaceholderPlugin({ editor: this.editor, options: this.options })]; - } -}); -export { - DEFAULT_DATA_ATTRIBUTE, - PLUGIN_KEY, - Placeholder, - preparePlaceholderAttribute -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.js.map deleted file mode 100644 index 8cdf1f3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/placeholder/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/placeholder/constants.ts","../../src/placeholder/placeholder.ts","../../src/placeholder/plugins/PlaceholderPlugin.ts","../../src/placeholder/utils/buildPlaceholderDecorations.ts","../../src/placeholder/utils/createPlaceholderDecoration.ts","../../src/placeholder/utils/preparePlaceholderAttribute.ts","../../src/placeholder/utils/findScrollParent.ts","../../src/placeholder/utils/getViewportBoundaryPositions.ts","../../src/placeholder/utils/viewportTracking.ts"],"sourcesContent":["import { PluginKey } from '@tiptap/pm/state'\n\nimport type { ViewportState } from './types.js'\n\n/** The default data attribute label */\nexport const DEFAULT_DATA_ATTRIBUTE = 'placeholder'\n\n/** The plugin key used to store and read the placeholder viewport state */\nexport const PLUGIN_KEY = new PluginKey('tiptap__placeholder')\n\n/**\n * Extra pixels added above and below the visible viewport when computing the\n * range of nodes to decorate. Decorating slightly beyond the fold means a\n * node already has its placeholder before it scrolls into view, which hides\n * the latency introduced by the throttled viewport recompute.\n */\nexport const VIEWPORT_OVERSCAN_PX = 200\n","import { Extension } from '@tiptap/core'\n\nimport { DEFAULT_DATA_ATTRIBUTE } from './constants.js'\nimport { createPlaceholderPlugin } from './plugins/PlaceholderPlugin.js'\nimport type { PlaceholderOptions } from './types.js'\n\n/**\n * This extension allows you to add a placeholder to your editor.\n * A placeholder is a text that appears when the editor or a node is empty.\n * @see https://www.tiptap.dev/api/extensions/placeholder\n */\nexport const Placeholder = Extension.create({\n name: 'placeholder',\n\n addOptions() {\n return {\n emptyEditorClass: 'is-editor-empty',\n emptyNodeClass: 'is-empty',\n dataAttribute: DEFAULT_DATA_ATTRIBUTE,\n placeholder: 'Write something …',\n showOnlyWhenEditable: true,\n showOnlyCurrent: true,\n includeChildren: false,\n }\n },\n\n addProseMirrorPlugins() {\n return [createPlaceholderPlugin({ editor: this.editor, options: this.options })]\n },\n})\n","import type { Editor } from '@tiptap/core'\nimport { Plugin } from '@tiptap/pm/state'\n\nimport { DEFAULT_DATA_ATTRIBUTE, PLUGIN_KEY } from '../constants.js'\nimport type { PlaceholderOptions } from '../types.js'\nimport { buildPlaceholderDecorations } from '../utils/buildPlaceholderDecorations.js'\nimport { preparePlaceholderAttribute } from '../utils/preparePlaceholderAttribute.js'\nimport { createViewportPluginView, viewportPluginState } from '../utils/viewportTracking.js'\n\nexport type CreatePluginOptions = {\n editor: Editor\n options: PlaceholderOptions\n}\n\n/**\n * Creates the ProseMirror plugin that renders placeholder decorations.\n * @param options.editor - The editor instance.\n * @param options.options - The resolved placeholder options.\n * @returns The configured placeholder plugin.\n */\nexport function createPlaceholderPlugin({ editor, options }: CreatePluginOptions) {\n const dataAttribute = options.dataAttribute\n ? `data-${preparePlaceholderAttribute(options.dataAttribute)}`\n : `data-${DEFAULT_DATA_ATTRIBUTE}`\n\n return new Plugin({\n key: PLUGIN_KEY,\n state: viewportPluginState,\n view: createViewportPluginView,\n props: {\n decorations: ({ doc, selection }) =>\n buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }),\n },\n })\n}\n","import type { Editor } from '@tiptap/core'\nimport { isNodeEmpty } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport type { Selection } from '@tiptap/pm/state'\nimport type { Decoration } from '@tiptap/pm/view'\nimport { DecorationSet } from '@tiptap/pm/view'\n\nimport { PLUGIN_KEY } from '../constants.js'\nimport type { PlaceholderOptions } from '../types.js'\nimport { createPlaceholderDecoration } from './createPlaceholderDecoration.js'\n\nfunction resolveEmptyNodeClass(\n emptyNodeClass: PlaceholderOptions['emptyNodeClass'],\n props: { editor: Editor; node: Node; pos: number; hasAnchor: boolean },\n): string {\n return typeof emptyNodeClass === 'function' ? emptyNodeClass(props) : emptyNodeClass\n}\n\n/**\n * Builds the placeholder decorations for the current document state.\n * @param options.editor - The editor instance.\n * @param options.options - The resolved placeholder options.\n * @param options.dataAttribute - The prepared `data-*` attribute name.\n * @param options.doc - The current document node.\n * @param options.selection - The current selection.\n * @returns A decoration set, or `null` when no placeholders should be shown.\n */\nexport function buildPlaceholderDecorations({\n editor,\n options,\n dataAttribute,\n doc,\n selection,\n}: {\n editor: Editor\n options: PlaceholderOptions\n dataAttribute: string\n doc: Node\n selection: Selection\n}): DecorationSet | null {\n const active = editor.isEditable || !options.showOnlyWhenEditable\n\n if (!active) {\n return null\n }\n\n const { anchor } = selection\n const decorations: Decoration[] = []\n const isEmptyDoc = editor.isEmpty\n\n const useResolvedPath = options.showOnlyCurrent && !options.includeChildren\n\n if (useResolvedPath) {\n const resolved = doc.resolve(anchor)\n\n // When the selection spans the whole document (e.g. an `AllSelection`\n // after Cmd+A), the anchor resolves to the document level (depth 0). In\n // that case the relevant textblock is the node directly after the\n // position rather than an ancestor. otherwise the placeholder would\n // disappear after selecting all and deleting.\n const node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter\n const nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor\n\n if (node && node.type.isTextblock && isNodeEmpty(node)) {\n const hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize\n\n decorations.push(\n createPlaceholderDecoration({\n editor,\n isEmptyDoc,\n dataAttribute,\n hasAnchor,\n placeholder: options.placeholder,\n classes: {\n emptyEditor: options.emptyEditorClass,\n emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n editor,\n node,\n pos: nodeStart,\n hasAnchor,\n }),\n },\n node,\n pos: nodeStart,\n }),\n )\n }\n } else {\n const pluginState = PLUGIN_KEY.getState(editor.state)\n const from = pluginState?.topPos ?? 0\n const to = pluginState?.bottomPos ?? doc.content.size\n\n doc.nodesBetween(from, to, (node, pos) => {\n const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize\n const isEmpty = !node.isLeaf && isNodeEmpty(node)\n\n if (!node.type.isTextblock) {\n return options.includeChildren\n }\n\n if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) {\n decorations.push(\n createPlaceholderDecoration({\n editor,\n isEmptyDoc,\n dataAttribute,\n hasAnchor,\n placeholder: options.placeholder,\n classes: {\n emptyEditor: options.emptyEditorClass,\n emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n editor,\n node,\n pos,\n hasAnchor,\n }),\n },\n node,\n pos,\n }),\n )\n }\n\n return options.includeChildren\n })\n }\n\n return DecorationSet.create(doc, decorations)\n}\n","import type { Editor } from '@tiptap/core'\nimport type { Node } from '@tiptap/pm/model'\nimport { Decoration } from '@tiptap/pm/view'\n\nimport type { PlaceholderOptions } from '../types.js'\n\n/**\n * Creates a ProseMirror node decoration that applies a placeholder\n * CSS class and data attribute to an empty node.\n * @param options.editor - The editor instance\n * @param options.pos - The position of the node in the document\n * @param options.node - The ProseMirror node\n * @param options.isEmptyDoc - Whether the entire document is empty\n * @param options.hasAnchor - Whether the selection anchor is within the node\n * @param options.dataAttribute - The data attribute name (e.g. `data-placeholder`)\n * @param options.classes - CSS classes for empty nodes and the empty editor\n * @param options.placeholder - The placeholder text or a function that returns it\n * @returns A ProseMirror node decoration with placeholder classes and data attribute\n */\nexport function createPlaceholderDecoration(options: {\n editor: Editor\n pos: number\n node: Node\n isEmptyDoc: boolean\n hasAnchor: boolean\n dataAttribute: string\n classes: {\n emptyEditor: PlaceholderOptions['emptyEditorClass']\n emptyNode: string\n }\n placeholder: PlaceholderOptions['placeholder']\n}) {\n const {\n editor,\n placeholder,\n dataAttribute,\n pos,\n node,\n isEmptyDoc,\n hasAnchor,\n classes: { emptyNode, emptyEditor },\n } = options\n const classes = [emptyNode]\n\n if (isEmptyDoc) {\n classes.push(emptyEditor)\n }\n\n return Decoration.node(pos, pos + node.nodeSize, {\n class: classes.join(' '),\n [dataAttribute]:\n typeof placeholder === 'function'\n ? placeholder({\n editor,\n node,\n pos,\n hasAnchor,\n })\n : placeholder,\n })\n}\n","/**\n * Prepares the placeholder attribute by ensuring it is properly formatted.\n * @param attr - The placeholder attribute string.\n * @returns The prepared placeholder attribute string.\n */\nexport function preparePlaceholderAttribute(attr: string): string {\n return (\n attr\n // replace whitespace with dashes\n .replace(/\\s+/g, '-')\n // replace non-alphanumeric characters\n // or special chars like $, %, &, etc.\n // but not dashes\n .replace(/[^a-zA-Z0-9-]/g, '')\n // and replace any numeric character at the start\n .replace(/^[0-9-]+/, '')\n // and finally replace any stray, leading dashes\n .replace(/^-+/, '')\n .toLowerCase()\n )\n}\n","/**\n * Checks if an element is scrollable by testing its overflow properties.\n * Elements with `overflow: hidden` or `overflow: clip` are intentionally\n * excluded — they clip content but don't emit scroll events.\n */\nfunction isScrollable(el: HTMLElement): boolean {\n const style = getComputedStyle(el)\n const overflow = `${style.overflow} ${style.overflowY} ${style.overflowX}`\n\n return /auto|scroll|overlay/.test(overflow)\n}\n\nexport function findScrollParent(element: HTMLElement): HTMLElement | Window {\n let el: HTMLElement | null = element\n\n while (el) {\n if (isScrollable(el)) {\n return el\n }\n\n // Check if we hit a Shadow DOM boundary. If so, jump to the shadow host\n // and continue traversing the light DOM.\n const parent = el.parentElement\n if (!parent) {\n const root = el.getRootNode()\n if (root instanceof ShadowRoot) {\n el = root.host as HTMLElement\n continue\n }\n\n return window\n }\n\n el = parent\n }\n\n return window\n}\n","import type { Node } from '@tiptap/pm/model'\nimport type { EditorView } from '@tiptap/pm/view'\n\nimport { VIEWPORT_OVERSCAN_PX } from '../constants.js'\n\nfunction getContainerRect(container: HTMLElement | Window): { top: number; bottom: number } {\n if (container === window) {\n return { top: 0, bottom: window.innerHeight }\n }\n\n return (container as HTMLElement).getBoundingClientRect()\n}\n\nexport function getViewportBoundaryPositions({\n doc,\n view,\n scrollContainer,\n}: {\n doc: Node\n view: EditorView\n scrollContainer?: HTMLElement | Window\n}) {\n const editorRect = view.dom.getBoundingClientRect()\n const containerRect = scrollContainer\n ? getContainerRect(scrollContainer)\n : { top: 0, bottom: window.innerHeight }\n\n const visibleTop = Math.max(editorRect.top, containerRect.top) - VIEWPORT_OVERSCAN_PX\n const visibleBottom = Math.min(editorRect.bottom, containerRect.bottom) + VIEWPORT_OVERSCAN_PX\n\n if (visibleTop >= visibleBottom) {\n // Editor is not visible — fall back to full document range\n return { top: 0, bottom: doc.content.size }\n }\n\n // Pick the x-coordinate based on text direction. In LTR the content\n // starts at the left edge; in RTL it starts at the right edge.\n // Clamp to ensure the coordinate stays inside the editor bounds.\n const isRTL = getComputedStyle(view.dom).direction === 'rtl'\n const x = isRTL ? Math.max(editorRect.right - 2, editorRect.left + 2) : editorRect.left + 2\n\n const topPos = view.posAtCoords({ left: x, top: visibleTop + 2 })\n const bottomPos = view.posAtCoords({ left: x, top: visibleBottom - 2 })\n\n return {\n top: topPos ? topPos.pos : 0,\n bottom: bottomPos ? bottomPos.pos : doc.content.size,\n }\n}\n","import type { EditorState, PluginView, StateField, Transaction } from '@tiptap/pm/state'\nimport type { EditorView } from '@tiptap/pm/view'\n\nimport { PLUGIN_KEY } from '../constants.js'\nimport type { ViewportState } from '../types.js'\nimport { findScrollParent } from './findScrollParent.js'\nimport { getViewportBoundaryPositions } from './getViewportBoundaryPositions.js'\n\n/**\n * The plugin `state` config that tracks the visible viewport boundaries so the\n * decoration callback only scans the nodes currently on screen.\n */\nexport const viewportPluginState: StateField = {\n /**\n * Initialises the viewport state with no known positions.\n * @returns The initial viewport state.\n */\n init(): ViewportState {\n return { topPos: null, bottomPos: null }\n },\n\n /**\n * Updates the viewport state from incoming transactions.\n * @param tr - The transaction being applied.\n * @param prev - The previous viewport state.\n * @returns The next viewport state.\n */\n apply(tr: Transaction, prev: ViewportState): ViewportState {\n const meta = tr.getMeta(PLUGIN_KEY) as\n | { positions?: { top: number; bottom: number } }\n | undefined\n\n if (meta?.positions) {\n return { topPos: meta.positions.top, bottomPos: meta.positions.bottom }\n }\n\n if (!tr.docChanged) {\n return prev\n }\n\n // Preserve last known viewport positions across transactions.\n // Without this, every keystroke resets back to a full document\n // scan, defeating the viewport optimisation.\n // Only map when we have actual positions — null means \"no viewport\n // info yet\" and should stay null to fall back to full doc scan.\n return {\n topPos: prev.topPos !== null ? tr.mapping.map(prev.topPos) : null,\n bottomPos: prev.bottomPos !== null ? tr.mapping.map(prev.bottomPos) : null,\n }\n },\n}\n\n/**\n * Creates the plugin `view` that recomputes the visible viewport on scroll and\n * document size changes, dispatching the result into the plugin state.\n * @param view - The editor view the plugin is attached to.\n * @returns A plugin view with `update` and `destroy` handlers.\n */\nexport function createViewportPluginView(view: EditorView): PluginView {\n const scrollContainer = findScrollParent(view.dom)\n\n const computeAndDispatch = () => {\n const positions = getViewportBoundaryPositions({\n view,\n doc: view.state.doc,\n scrollContainer,\n })\n\n const prev = PLUGIN_KEY.getState(view.state)\n if (prev?.topPos === positions.top && prev?.bottomPos === positions.bottom) {\n return\n }\n\n const tr = view.state.tr.setMeta(PLUGIN_KEY, { positions })\n view.dispatch(tr)\n }\n\n // rAF-based scheduler with interval guard (150ms → ~6–7 Hz) used by\n // scroll events and update(). The overscan margin hides the extra\n // latency. When the guard blocks, the callback reschedules itself so\n // the trailing position is always captured.\n let frame: number | null = null\n let lastCompute = 0\n const MIN_SCROLL_INTERVAL = 150\n\n const scheduleFrame = () => {\n if (frame !== null) return\n frame = requestAnimationFrame(() => {\n frame = null\n const now = performance.now()\n if (now - lastCompute >= MIN_SCROLL_INTERVAL) {\n lastCompute = now\n computeAndDispatch()\n } else {\n scheduleFrame()\n }\n })\n }\n\n scrollContainer.addEventListener('scroll', scheduleFrame, { passive: true })\n\n // Fire once to populate initial viewport\n computeAndDispatch()\n\n return {\n update(_view: EditorView, prevState: EditorState) {\n if (view.state.doc.content.size !== prevState.doc.content.size) {\n scheduleFrame()\n }\n },\n destroy: () => {\n if (frame !== null) {\n cancelAnimationFrame(frame)\n }\n scrollContainer.removeEventListener('scroll', scheduleFrame)\n },\n }\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;AAKnB,IAAM,yBAAyB;AAG/B,IAAM,aAAa,IAAI,UAAyB,qBAAqB;AAQrE,IAAM,uBAAuB;;;AChBpC,SAAS,iBAAiB;;;ACC1B,SAAS,cAAc;;;ACAvB,SAAS,mBAAmB;AAI5B,SAAS,qBAAqB;;;ACH9B,SAAS,kBAAkB;AAiBpB,SAAS,4BAA4B,SAYzC;AACD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,EAAE,WAAW,YAAY;AAAA,EACpC,IAAI;AACJ,QAAM,UAAU,CAAC,SAAS;AAE1B,MAAI,YAAY;AACd,YAAQ,KAAK,WAAW;AAAA,EAC1B;AAEA,SAAO,WAAW,KAAK,KAAK,MAAM,KAAK,UAAU;AAAA,IAC/C,OAAO,QAAQ,KAAK,GAAG;AAAA,IACvB,CAAC,aAAa,GACZ,OAAO,gBAAgB,aACnB,YAAY;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,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E,qBAAmB;AAEnB,SAAO;AAAA,IACL,OAAO,OAAmB,WAAwB;AAChD,UAAI,KAAK,MAAM,IAAI,QAAQ,SAAS,UAAU,IAAI,QAAQ,MAAM;AAC9D,sBAAc;AAAA,MAChB;AAAA,IACF;AAAA,IACA,SAAS,MAAM;AACb,UAAI,UAAU,MAAM;AAClB,6BAAqB,KAAK;AAAA,MAC5B;AACA,sBAAgB,oBAAoB,UAAU,aAAa;AAAA,IAC7D;AAAA,EACF;AACF;;;ANjGO,SAAS,wBAAwB,EAAE,QAAQ,QAAQ,GAAwB;AAChF,QAAM,gBAAgB,QAAQ,gBAC1B,QAAQ,4BAA4B,QAAQ,aAAa,CAAC,KAC1D,QAAQ,sBAAsB;AAElC,SAAO,IAAI,OAAO;AAAA,IAChB,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,MACL,aAAa,CAAC,EAAE,KAAK,UAAU,MAC7B,4BAA4B,EAAE,QAAQ,SAAS,eAAe,KAAK,UAAU,CAAC;AAAA,IAClF;AAAA,EACF,CAAC;AACH;;;ADvBO,IAAM,cAAc,UAAU,OAA2B;AAAA,EAC9D,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,MAChB,eAAe;AAAA,MACf,aAAa;AAAA,MACb,sBAAsB;AAAA,MACtB,iBAAiB;AAAA,MACjB,iBAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,WAAO,CAAC,wBAAwB,EAAE,QAAQ,KAAK,QAAQ,SAAS,KAAK,QAAQ,CAAC,CAAC;AAAA,EACjF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.cjs deleted file mode 100644 index f1dfeac..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.cjs +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/selection/index.ts -var index_exports = {}; -__export(index_exports, { - Selection: () => Selection -}); -module.exports = __toCommonJS(index_exports); - -// src/selection/selection.ts -var import_core = require("@tiptap/core"); -var import_state = require("@tiptap/pm/state"); -var import_view = require("@tiptap/pm/view"); -var selectionStyle = `.ProseMirror:not(.ProseMirror-focused) *::selection { - background: transparent; -} - -.ProseMirror:not(.ProseMirror-focused) *::-moz-selection { - background: transparent; -}`; -var Selection = import_core.Extension.create({ - name: "selection", - addOptions() { - return { - className: "selection" - }; - }, - addProseMirrorPlugins() { - const { editor, options } = this; - if (editor.options.injectCSS && typeof document !== "undefined") { - (0, import_core.createStyleTag)(selectionStyle, editor.options.injectNonce, "selection"); - } - return [ - new import_state.Plugin({ - key: new import_state.PluginKey("selection"), - props: { - decorations(state) { - if (state.selection.empty || editor.isFocused || !editor.isEditable || (0, import_core.isNodeSelection)(state.selection) || editor.view.dragging) { - return null; - } - return import_view.DecorationSet.create(state.doc, [ - import_view.Decoration.inline(state.selection.from, state.selection.to, { - class: options.className - }) - ]); - } - } - }) - ]; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Selection -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.cjs.map deleted file mode 100644 index 93f2154..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/selection/index.ts","../../src/selection/selection.ts"],"sourcesContent":["export * from './selection.js'\n","import { createStyleTag, Extension, isNodeSelection } from '@tiptap/core'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet } from '@tiptap/pm/view'\n\nconst selectionStyle = `.ProseMirror:not(.ProseMirror-focused) *::selection {\n background: transparent;\n}\n\n.ProseMirror:not(.ProseMirror-focused) *::-moz-selection {\n background: transparent;\n}`\n\nexport type SelectionOptions = {\n /**\n * The class name that should be added to the selected text.\n * @default 'selection'\n * @example 'is-selected'\n */\n className: string\n}\n\n/**\n * This extension allows you to add a class to the selected text.\n * @see https://www.tiptap.dev/api/extensions/selection\n */\nexport const Selection = Extension.create({\n name: 'selection',\n\n addOptions() {\n return {\n className: 'selection',\n }\n },\n\n addProseMirrorPlugins() {\n const { editor, options } = this\n\n if (editor.options.injectCSS && typeof document !== 'undefined') {\n createStyleTag(selectionStyle, editor.options.injectNonce, 'selection')\n }\n\n return [\n new Plugin({\n key: new PluginKey('selection'),\n props: {\n decorations(state) {\n if (\n state.selection.empty ||\n editor.isFocused ||\n !editor.isEditable ||\n isNodeSelection(state.selection) ||\n editor.view.dragging\n ) {\n return null\n }\n\n return DecorationSet.create(state.doc, [\n Decoration.inline(state.selection.from, state.selection.to, {\n class: options.className,\n }),\n ])\n },\n },\n }),\n ]\n },\n})\n\nexport default Selection\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA2D;AAC3D,mBAAkC;AAClC,kBAA0C;AAE1C,IAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBhB,IAAM,YAAY,sBAAU,OAAyB;AAAA,EAC1D,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,UAAM,EAAE,QAAQ,QAAQ,IAAI;AAE5B,QAAI,OAAO,QAAQ,aAAa,OAAO,aAAa,aAAa;AAC/D,sCAAe,gBAAgB,OAAO,QAAQ,aAAa,WAAW;AAAA,IACxE;AAEA,WAAO;AAAA,MACL,IAAI,oBAAO;AAAA,QACT,KAAK,IAAI,uBAAU,WAAW;AAAA,QAC9B,OAAO;AAAA,UACL,YAAY,OAAO;AACjB,gBACE,MAAM,UAAU,SAChB,OAAO,aACP,CAAC,OAAO,kBACR,6BAAgB,MAAM,SAAS,KAC/B,OAAO,KAAK,UACZ;AACA,qBAAO;AAAA,YACT;AAEA,mBAAO,0BAAc,OAAO,MAAM,KAAK;AAAA,cACrC,uBAAW,OAAO,MAAM,UAAU,MAAM,MAAM,UAAU,IAAI;AAAA,gBAC1D,OAAO,QAAQ;AAAA,cACjB,CAAC;AAAA,YACH,CAAC;AAAA,UACH;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.d.cts deleted file mode 100644 index 298013c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.d.cts +++ /dev/null @@ -1,17 +0,0 @@ -import { Extension } from '@tiptap/core'; - -type SelectionOptions = { - /** - * The class name that should be added to the selected text. - * @default 'selection' - * @example 'is-selected' - */ - className: string; -}; -/** - * This extension allows you to add a class to the selected text. - * @see https://www.tiptap.dev/api/extensions/selection - */ -declare const Selection: Extension; - -export { Selection, type SelectionOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.d.ts deleted file mode 100644 index 298013c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Extension } from '@tiptap/core'; - -type SelectionOptions = { - /** - * The class name that should be added to the selected text. - * @default 'selection' - * @example 'is-selected' - */ - className: string; -}; -/** - * This extension allows you to add a class to the selected text. - * @see https://www.tiptap.dev/api/extensions/selection - */ -declare const Selection: Extension; - -export { Selection, type SelectionOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.js deleted file mode 100644 index 5c54d94..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.js +++ /dev/null @@ -1,46 +0,0 @@ -// src/selection/selection.ts -import { createStyleTag, Extension, isNodeSelection } from "@tiptap/core"; -import { Plugin, PluginKey } from "@tiptap/pm/state"; -import { Decoration, DecorationSet } from "@tiptap/pm/view"; -var selectionStyle = `.ProseMirror:not(.ProseMirror-focused) *::selection { - background: transparent; -} - -.ProseMirror:not(.ProseMirror-focused) *::-moz-selection { - background: transparent; -}`; -var Selection = Extension.create({ - name: "selection", - addOptions() { - return { - className: "selection" - }; - }, - addProseMirrorPlugins() { - const { editor, options } = this; - if (editor.options.injectCSS && typeof document !== "undefined") { - createStyleTag(selectionStyle, editor.options.injectNonce, "selection"); - } - return [ - new Plugin({ - key: new PluginKey("selection"), - props: { - decorations(state) { - if (state.selection.empty || editor.isFocused || !editor.isEditable || isNodeSelection(state.selection) || editor.view.dragging) { - return null; - } - return DecorationSet.create(state.doc, [ - Decoration.inline(state.selection.from, state.selection.to, { - class: options.className - }) - ]); - } - } - }) - ]; - } -}); -export { - Selection -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.js.map deleted file mode 100644 index fb9dc2e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/selection/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/selection/selection.ts"],"sourcesContent":["import { createStyleTag, Extension, isNodeSelection } from '@tiptap/core'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet } from '@tiptap/pm/view'\n\nconst selectionStyle = `.ProseMirror:not(.ProseMirror-focused) *::selection {\n background: transparent;\n}\n\n.ProseMirror:not(.ProseMirror-focused) *::-moz-selection {\n background: transparent;\n}`\n\nexport type SelectionOptions = {\n /**\n * The class name that should be added to the selected text.\n * @default 'selection'\n * @example 'is-selected'\n */\n className: string\n}\n\n/**\n * This extension allows you to add a class to the selected text.\n * @see https://www.tiptap.dev/api/extensions/selection\n */\nexport const Selection = Extension.create({\n name: 'selection',\n\n addOptions() {\n return {\n className: 'selection',\n }\n },\n\n addProseMirrorPlugins() {\n const { editor, options } = this\n\n if (editor.options.injectCSS && typeof document !== 'undefined') {\n createStyleTag(selectionStyle, editor.options.injectNonce, 'selection')\n }\n\n return [\n new Plugin({\n key: new PluginKey('selection'),\n props: {\n decorations(state) {\n if (\n state.selection.empty ||\n editor.isFocused ||\n !editor.isEditable ||\n isNodeSelection(state.selection) ||\n editor.view.dragging\n ) {\n return null\n }\n\n return DecorationSet.create(state.doc, [\n Decoration.inline(state.selection.from, state.selection.to, {\n class: options.className,\n }),\n ])\n },\n },\n }),\n ]\n },\n})\n\nexport default Selection\n"],"mappings":";AAAA,SAAS,gBAAgB,WAAW,uBAAuB;AAC3D,SAAS,QAAQ,iBAAiB;AAClC,SAAS,YAAY,qBAAqB;AAE1C,IAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBhB,IAAM,YAAY,UAAU,OAAyB;AAAA,EAC1D,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,UAAM,EAAE,QAAQ,QAAQ,IAAI;AAE5B,QAAI,OAAO,QAAQ,aAAa,OAAO,aAAa,aAAa;AAC/D,qBAAe,gBAAgB,OAAO,QAAQ,aAAa,WAAW;AAAA,IACxE;AAEA,WAAO;AAAA,MACL,IAAI,OAAO;AAAA,QACT,KAAK,IAAI,UAAU,WAAW;AAAA,QAC9B,OAAO;AAAA,UACL,YAAY,OAAO;AACjB,gBACE,MAAM,UAAU,SAChB,OAAO,aACP,CAAC,OAAO,cACR,gBAAgB,MAAM,SAAS,KAC/B,OAAO,KAAK,UACZ;AACA,qBAAO;AAAA,YACT;AAEA,mBAAO,cAAc,OAAO,MAAM,KAAK;AAAA,cACrC,WAAW,OAAO,MAAM,UAAU,MAAM,MAAM,UAAU,IAAI;AAAA,gBAC1D,OAAO,QAAQ;AAAA,cACjB,CAAC;AAAA,YACH,CAAC;AAAA,UACH;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs deleted file mode 100644 index f661d4f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/trailing-node/index.ts -var index_exports = {}; -__export(index_exports, { - TrailingNode: () => TrailingNode, - skipTrailingNodeMeta: () => skipTrailingNodeMeta -}); -module.exports = __toCommonJS(index_exports); - -// src/trailing-node/trailing-node.ts -var import_core = require("@tiptap/core"); -var import_state = require("@tiptap/pm/state"); -var skipTrailingNodeMeta = "skipTrailingNode"; -function nodeEqualsType({ - types, - node -}) { - return node && Array.isArray(types) && types.includes(node.type) || (node == null ? void 0 : node.type) === types; -} -var TrailingNode = import_core.Extension.create({ - name: "trailingNode", - addOptions() { - return { - node: void 0, - notAfter: [] - }; - }, - addProseMirrorPlugins() { - var _a; - const plugin = new import_state.PluginKey(this.name); - const defaultNode = this.options.node || ((_a = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : _a.name) || "paragraph"; - const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name)); - return [ - new import_state.Plugin({ - key: plugin, - appendTransaction: (transactions, __, state) => { - const { doc, tr, schema } = state; - const shouldInsertNodeAtEnd = plugin.getState(state); - const endPosition = doc.content.size; - const type = schema.nodes[defaultNode]; - if (transactions.some((transaction) => transaction.getMeta(skipTrailingNodeMeta))) { - return; - } - if (!shouldInsertNodeAtEnd) { - return; - } - return tr.insert(endPosition, type.create()); - }, - state: { - init: (_, state) => { - const lastNode = state.tr.doc.lastChild; - return !nodeEqualsType({ node: lastNode, types: disabledNodes }); - }, - apply: (tr, value) => { - if (!tr.docChanged) { - return value; - } - if (tr.getMeta("__uniqueIDTransaction")) { - return value; - } - const lastNode = tr.doc.lastChild; - return !nodeEqualsType({ node: lastNode, types: disabledNodes }); - } - } - }) - ]; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - TrailingNode, - skipTrailingNodeMeta -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs.map deleted file mode 100644 index 1c11e22..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/trailing-node/index.ts","../../src/trailing-node/trailing-node.ts"],"sourcesContent":["export * from './trailing-node.js'\n","import { Extension } from '@tiptap/core'\nimport type { Node, NodeType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\nexport const skipTrailingNodeMeta = 'skipTrailingNode'\n\nfunction nodeEqualsType({\n types,\n node,\n}: {\n types: NodeType | NodeType[]\n node: Node | null | undefined\n}) {\n return (node && Array.isArray(types) && types.includes(node.type)) || node?.type === types\n}\n\n/**\n * Extension based on:\n * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js\n * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts\n */\n\nexport interface TrailingNodeOptions {\n /**\n * The node type that should be inserted at the end of the document.\n * @note the node will always be added to the `notAfter` lists to\n * prevent an infinite loop.\n * @default undefined\n */\n node?: string\n /**\n * The node types after which the trailing node should not be inserted.\n * @default ['paragraph']\n */\n notAfter?: string | string[]\n}\n\n/**\n * This extension allows you to add an extra node at the end of the document.\n * @see https://www.tiptap.dev/api/extensions/trailing-node\n */\nexport const TrailingNode = Extension.create({\n name: 'trailingNode',\n\n addOptions() {\n return {\n node: undefined,\n notAfter: [],\n }\n },\n\n addProseMirrorPlugins() {\n const plugin = new PluginKey(this.name)\n const defaultNode =\n this.options.node ||\n this.editor.schema.topNodeType.contentMatch.defaultType?.name ||\n 'paragraph'\n\n const disabledNodes = Object.entries(this.editor.schema.nodes)\n .map(([, value]) => value)\n .filter(node => (this.options.notAfter || []).concat(defaultNode).includes(node.name))\n\n return [\n new Plugin({\n key: plugin,\n appendTransaction: (transactions, __, state) => {\n const { doc, tr, schema } = state\n const shouldInsertNodeAtEnd = plugin.getState(state)\n const endPosition = doc.content.size\n const type = schema.nodes[defaultNode]\n\n if (transactions.some(transaction => transaction.getMeta(skipTrailingNodeMeta))) {\n return\n }\n\n if (!shouldInsertNodeAtEnd) {\n return\n }\n\n return tr.insert(endPosition, type.create())\n },\n state: {\n init: (_, state) => {\n const lastNode = state.tr.doc.lastChild\n\n return !nodeEqualsType({ node: lastNode, types: disabledNodes })\n },\n apply: (tr, value) => {\n if (!tr.docChanged) {\n return value\n }\n\n // Ignore transactions from UniqueID extension to prevent infinite loops\n // when UniqueID adds IDs to newly inserted trailing nodes\n if (tr.getMeta('__uniqueIDTransaction')) {\n return value\n }\n\n const lastNode = tr.doc.lastChild\n\n return !nodeEqualsType({ node: lastNode, types: disabledNodes })\n },\n },\n }),\n ]\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA0B;AAE1B,mBAAkC;AAE3B,IAAM,uBAAuB;AAEpC,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AACF,GAGG;AACD,SAAQ,QAAQ,MAAM,QAAQ,KAAK,KAAK,MAAM,SAAS,KAAK,IAAI,MAAM,6BAAM,UAAS;AACvF;AA2BO,IAAM,eAAe,sBAAU,OAA4B;AAAA,EAChE,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU,CAAC;AAAA,IACb;AAAA,EACF;AAAA,EAEA,wBAAwB;AAnD1B;AAoDI,UAAM,SAAS,IAAI,uBAAU,KAAK,IAAI;AACtC,UAAM,cACJ,KAAK,QAAQ,UACb,UAAK,OAAO,OAAO,YAAY,aAAa,gBAA5C,mBAAyD,SACzD;AAEF,UAAM,gBAAgB,OAAO,QAAQ,KAAK,OAAO,OAAO,KAAK,EAC1D,IAAI,CAAC,CAAC,EAAE,KAAK,MAAM,KAAK,EACxB,OAAO,WAAS,KAAK,QAAQ,YAAY,CAAC,GAAG,OAAO,WAAW,EAAE,SAAS,KAAK,IAAI,CAAC;AAEvF,WAAO;AAAA,MACL,IAAI,oBAAO;AAAA,QACT,KAAK;AAAA,QACL,mBAAmB,CAAC,cAAc,IAAI,UAAU;AAC9C,gBAAM,EAAE,KAAK,IAAI,OAAO,IAAI;AAC5B,gBAAM,wBAAwB,OAAO,SAAS,KAAK;AACnD,gBAAM,cAAc,IAAI,QAAQ;AAChC,gBAAM,OAAO,OAAO,MAAM,WAAW;AAErC,cAAI,aAAa,KAAK,iBAAe,YAAY,QAAQ,oBAAoB,CAAC,GAAG;AAC/E;AAAA,UACF;AAEA,cAAI,CAAC,uBAAuB;AAC1B;AAAA,UACF;AAEA,iBAAO,GAAG,OAAO,aAAa,KAAK,OAAO,CAAC;AAAA,QAC7C;AAAA,QACA,OAAO;AAAA,UACL,MAAM,CAAC,GAAG,UAAU;AAClB,kBAAM,WAAW,MAAM,GAAG,IAAI;AAE9B,mBAAO,CAAC,eAAe,EAAE,MAAM,UAAU,OAAO,cAAc,CAAC;AAAA,UACjE;AAAA,UACA,OAAO,CAAC,IAAI,UAAU;AACpB,gBAAI,CAAC,GAAG,YAAY;AAClB,qBAAO;AAAA,YACT;AAIA,gBAAI,GAAG,QAAQ,uBAAuB,GAAG;AACvC,qBAAO;AAAA,YACT;AAEA,kBAAM,WAAW,GAAG,IAAI;AAExB,mBAAO,CAAC,eAAe,EAAE,MAAM,UAAU,OAAO,cAAc,CAAC;AAAA,UACjE;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.d.cts deleted file mode 100644 index 05d02b4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.d.cts +++ /dev/null @@ -1,29 +0,0 @@ -import { Extension } from '@tiptap/core'; - -declare const skipTrailingNodeMeta = "skipTrailingNode"; -/** - * Extension based on: - * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js - * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts - */ -interface TrailingNodeOptions { - /** - * The node type that should be inserted at the end of the document. - * @note the node will always be added to the `notAfter` lists to - * prevent an infinite loop. - * @default undefined - */ - node?: string; - /** - * The node types after which the trailing node should not be inserted. - * @default ['paragraph'] - */ - notAfter?: string | string[]; -} -/** - * This extension allows you to add an extra node at the end of the document. - * @see https://www.tiptap.dev/api/extensions/trailing-node - */ -declare const TrailingNode: Extension; - -export { TrailingNode, type TrailingNodeOptions, skipTrailingNodeMeta }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.d.ts deleted file mode 100644 index 05d02b4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Extension } from '@tiptap/core'; - -declare const skipTrailingNodeMeta = "skipTrailingNode"; -/** - * Extension based on: - * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js - * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts - */ -interface TrailingNodeOptions { - /** - * The node type that should be inserted at the end of the document. - * @note the node will always be added to the `notAfter` lists to - * prevent an infinite loop. - * @default undefined - */ - node?: string; - /** - * The node types after which the trailing node should not be inserted. - * @default ['paragraph'] - */ - notAfter?: string | string[]; -} -/** - * This extension allows you to add an extra node at the end of the document. - * @see https://www.tiptap.dev/api/extensions/trailing-node - */ -declare const TrailingNode: Extension; - -export { TrailingNode, type TrailingNodeOptions, skipTrailingNodeMeta }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.js deleted file mode 100644 index 3778c5e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.js +++ /dev/null @@ -1,64 +0,0 @@ -// src/trailing-node/trailing-node.ts -import { Extension } from "@tiptap/core"; -import { Plugin, PluginKey } from "@tiptap/pm/state"; -var skipTrailingNodeMeta = "skipTrailingNode"; -function nodeEqualsType({ - types, - node -}) { - return node && Array.isArray(types) && types.includes(node.type) || (node == null ? void 0 : node.type) === types; -} -var TrailingNode = Extension.create({ - name: "trailingNode", - addOptions() { - return { - node: void 0, - notAfter: [] - }; - }, - addProseMirrorPlugins() { - var _a; - const plugin = new PluginKey(this.name); - const defaultNode = this.options.node || ((_a = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : _a.name) || "paragraph"; - const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name)); - return [ - new Plugin({ - key: plugin, - appendTransaction: (transactions, __, state) => { - const { doc, tr, schema } = state; - const shouldInsertNodeAtEnd = plugin.getState(state); - const endPosition = doc.content.size; - const type = schema.nodes[defaultNode]; - if (transactions.some((transaction) => transaction.getMeta(skipTrailingNodeMeta))) { - return; - } - if (!shouldInsertNodeAtEnd) { - return; - } - return tr.insert(endPosition, type.create()); - }, - state: { - init: (_, state) => { - const lastNode = state.tr.doc.lastChild; - return !nodeEqualsType({ node: lastNode, types: disabledNodes }); - }, - apply: (tr, value) => { - if (!tr.docChanged) { - return value; - } - if (tr.getMeta("__uniqueIDTransaction")) { - return value; - } - const lastNode = tr.doc.lastChild; - return !nodeEqualsType({ node: lastNode, types: disabledNodes }); - } - } - }) - ]; - } -}); -export { - TrailingNode, - skipTrailingNodeMeta -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.js.map deleted file mode 100644 index 4bcec30..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/trailing-node/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/trailing-node/trailing-node.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport type { Node, NodeType } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\nexport const skipTrailingNodeMeta = 'skipTrailingNode'\n\nfunction nodeEqualsType({\n types,\n node,\n}: {\n types: NodeType | NodeType[]\n node: Node | null | undefined\n}) {\n return (node && Array.isArray(types) && types.includes(node.type)) || node?.type === types\n}\n\n/**\n * Extension based on:\n * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js\n * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts\n */\n\nexport interface TrailingNodeOptions {\n /**\n * The node type that should be inserted at the end of the document.\n * @note the node will always be added to the `notAfter` lists to\n * prevent an infinite loop.\n * @default undefined\n */\n node?: string\n /**\n * The node types after which the trailing node should not be inserted.\n * @default ['paragraph']\n */\n notAfter?: string | string[]\n}\n\n/**\n * This extension allows you to add an extra node at the end of the document.\n * @see https://www.tiptap.dev/api/extensions/trailing-node\n */\nexport const TrailingNode = Extension.create({\n name: 'trailingNode',\n\n addOptions() {\n return {\n node: undefined,\n notAfter: [],\n }\n },\n\n addProseMirrorPlugins() {\n const plugin = new PluginKey(this.name)\n const defaultNode =\n this.options.node ||\n this.editor.schema.topNodeType.contentMatch.defaultType?.name ||\n 'paragraph'\n\n const disabledNodes = Object.entries(this.editor.schema.nodes)\n .map(([, value]) => value)\n .filter(node => (this.options.notAfter || []).concat(defaultNode).includes(node.name))\n\n return [\n new Plugin({\n key: plugin,\n appendTransaction: (transactions, __, state) => {\n const { doc, tr, schema } = state\n const shouldInsertNodeAtEnd = plugin.getState(state)\n const endPosition = doc.content.size\n const type = schema.nodes[defaultNode]\n\n if (transactions.some(transaction => transaction.getMeta(skipTrailingNodeMeta))) {\n return\n }\n\n if (!shouldInsertNodeAtEnd) {\n return\n }\n\n return tr.insert(endPosition, type.create())\n },\n state: {\n init: (_, state) => {\n const lastNode = state.tr.doc.lastChild\n\n return !nodeEqualsType({ node: lastNode, types: disabledNodes })\n },\n apply: (tr, value) => {\n if (!tr.docChanged) {\n return value\n }\n\n // Ignore transactions from UniqueID extension to prevent infinite loops\n // when UniqueID adds IDs to newly inserted trailing nodes\n if (tr.getMeta('__uniqueIDTransaction')) {\n return value\n }\n\n const lastNode = tr.doc.lastChild\n\n return !nodeEqualsType({ node: lastNode, types: disabledNodes })\n },\n },\n }),\n ]\n },\n})\n"],"mappings":";AAAA,SAAS,iBAAiB;AAE1B,SAAS,QAAQ,iBAAiB;A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AAM,UAAU,OAAO,cAAc,CAAC;AAAA,UACjE;AAAA,UACA,OAAO,CAAC,IAAI,UAAU;AACpB,gBAAI,CAAC,GAAG,YAAY;AAClB,qBAAO;AAAA,YACT;AAIA,gBAAI,GAAG,QAAQ,uBAAuB,GAAG;AACvC,qBAAO;AAAA,YACT;AAEA,kBAAM,WAAW,GAAG,IAAI;AAExB,mBAAO,CAAC,eAAe,EAAE,MAAM,UAAU,OAAO,cAAc,CAAC;AAAA,UACjE;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs deleted file mode 100644 index dab0a8e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/undo-redo/index.ts -var index_exports = {}; -__export(index_exports, { - UndoRedo: () => UndoRedo -}); -module.exports = __toCommonJS(index_exports); - -// src/undo-redo/undo-redo.ts -var import_core = require("@tiptap/core"); -var import_history = require("@tiptap/pm/history"); -var UndoRedo = import_core.Extension.create({ - name: "undoRedo", - addOptions() { - return { - depth: 100, - newGroupDelay: 500 - }; - }, - addCommands() { - return { - undo: () => ({ state, dispatch }) => { - return (0, import_history.undo)(state, dispatch); - }, - redo: () => ({ state, dispatch }) => { - return (0, import_history.redo)(state, dispatch); - } - }; - }, - addProseMirrorPlugins() { - return [(0, import_history.history)(this.options)]; - }, - addKeyboardShortcuts() { - return { - "Mod-z": () => this.editor.commands.undo(), - "Shift-Mod-z": () => this.editor.commands.redo(), - "Mod-y": () => this.editor.commands.redo(), - // Russian keyboard layouts - "Mod-\u044F": () => this.editor.commands.undo(), - "Shift-Mod-\u044F": () => this.editor.commands.redo() - }; - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - UndoRedo -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs.map deleted file mode 100644 index e2371d5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/undo-redo/index.ts","../../src/undo-redo/undo-redo.ts"],"sourcesContent":["export * from './undo-redo.js'\n","import { Extension } from '@tiptap/core'\nimport { history, redo, undo } from '@tiptap/pm/history'\n\nexport interface UndoRedoOptions {\n /**\n * The amount of history events that are collected before the oldest events are discarded.\n * @default 100\n * @example 50\n */\n depth: number\n\n /**\n * The delay (in milliseconds) between changes after which a new group should be started.\n * @default 500\n * @example 1000\n */\n newGroupDelay: number\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n undoRedo: {\n /**\n * Undo recent changes\n * @example editor.commands.undo()\n */\n undo: () => ReturnType\n /**\n * Reapply reverted changes\n * @example editor.commands.redo()\n */\n redo: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to undo and redo recent changes.\n * @see https://www.tiptap.dev/api/extensions/undo-redo\n *\n * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n * the `undo-redo` extension, as it is not compatible with the `collaboration` extension.\n *\n * `@tiptap/extension-collaboration` uses its own history implementation.\n */\nexport const UndoRedo = Extension.create({\n name: 'undoRedo',\n\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500,\n }\n },\n\n addCommands() {\n return {\n undo:\n () =>\n ({ state, dispatch }) => {\n return undo(state, dispatch)\n },\n redo:\n () =>\n ({ state, dispatch }) => {\n return redo(state, dispatch)\n },\n }\n },\n\n addProseMirrorPlugins() {\n return [history(this.options)]\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-z': () => this.editor.commands.undo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n 'Mod-y': () => this.editor.commands.redo(),\n\n // Russian keyboard layouts\n 'Mod-я': () => this.editor.commands.undo(),\n 'Shift-Mod-я': () => this.editor.commands.redo(),\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA0B;AAC1B,qBAAoC;AA4C7B,IAAM,WAAW,sBAAU,OAAwB;AAAA,EACxD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,OAAO;AAAA,MACP,eAAe;AAAA,IACjB;AAAA,EACF;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,MACE,MACA,CAAC,EAAE,OAAO,SAAS,MAAM;AACvB,mBAAO,qBAAK,OAAO,QAAQ;AAAA,MAC7B;AAAA,MACF,MACE,MACA,CAAC,EAAE,OAAO,SAAS,MAAM;AACvB,mBAAO,qBAAK,OAAO,QAAQ;AAAA,MAC7B;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,WAAO,KAAC,wBAAQ,KAAK,OAAO,CAAC;AAAA,EAC/B;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,SAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MACzC,eAAe,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MAC/C,SAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA;AAAA,MAGzC,cAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MACzC,oBAAe,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,IACjD;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.d.cts deleted file mode 100644 index 4a149f8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.d.cts +++ /dev/null @@ -1,44 +0,0 @@ -import { Extension } from '@tiptap/core'; - -interface UndoRedoOptions { - /** - * The amount of history events that are collected before the oldest events are discarded. - * @default 100 - * @example 50 - */ - depth: number; - /** - * The delay (in milliseconds) between changes after which a new group should be started. - * @default 500 - * @example 1000 - */ - newGroupDelay: number; -} -declare module '@tiptap/core' { - interface Commands { - undoRedo: { - /** - * Undo recent changes - * @example editor.commands.undo() - */ - undo: () => ReturnType; - /** - * Reapply reverted changes - * @example editor.commands.redo() - */ - redo: () => ReturnType; - }; - } -} -/** - * This extension allows you to undo and redo recent changes. - * @see https://www.tiptap.dev/api/extensions/undo-redo - * - * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove - * the `undo-redo` extension, as it is not compatible with the `collaboration` extension. - * - * `@tiptap/extension-collaboration` uses its own history implementation. - */ -declare const UndoRedo: Extension; - -export { UndoRedo, type UndoRedoOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.d.ts deleted file mode 100644 index 4a149f8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Extension } from '@tiptap/core'; - -interface UndoRedoOptions { - /** - * The amount of history events that are collected before the oldest events are discarded. - * @default 100 - * @example 50 - */ - depth: number; - /** - * The delay (in milliseconds) between changes after which a new group should be started. - * @default 500 - * @example 1000 - */ - newGroupDelay: number; -} -declare module '@tiptap/core' { - interface Commands { - undoRedo: { - /** - * Undo recent changes - * @example editor.commands.undo() - */ - undo: () => ReturnType; - /** - * Reapply reverted changes - * @example editor.commands.redo() - */ - redo: () => ReturnType; - }; - } -} -/** - * This extension allows you to undo and redo recent changes. - * @see https://www.tiptap.dev/api/extensions/undo-redo - * - * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove - * the `undo-redo` extension, as it is not compatible with the `collaboration` extension. - * - * `@tiptap/extension-collaboration` uses its own history implementation. - */ -declare const UndoRedo: Extension; - -export { UndoRedo, type UndoRedoOptions }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.js deleted file mode 100644 index b29bb6b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.js +++ /dev/null @@ -1,39 +0,0 @@ -// src/undo-redo/undo-redo.ts -import { Extension } from "@tiptap/core"; -import { history, redo, undo } from "@tiptap/pm/history"; -var UndoRedo = Extension.create({ - name: "undoRedo", - addOptions() { - return { - depth: 100, - newGroupDelay: 500 - }; - }, - addCommands() { - return { - undo: () => ({ state, dispatch }) => { - return undo(state, dispatch); - }, - redo: () => ({ state, dispatch }) => { - return redo(state, dispatch); - } - }; - }, - addProseMirrorPlugins() { - return [history(this.options)]; - }, - addKeyboardShortcuts() { - return { - "Mod-z": () => this.editor.commands.undo(), - "Shift-Mod-z": () => this.editor.commands.redo(), - "Mod-y": () => this.editor.commands.redo(), - // Russian keyboard layouts - "Mod-\u044F": () => this.editor.commands.undo(), - "Shift-Mod-\u044F": () => this.editor.commands.redo() - }; - } -}); -export { - UndoRedo -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.js.map deleted file mode 100644 index 7581d7b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/dist/undo-redo/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/undo-redo/undo-redo.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { history, redo, undo } from '@tiptap/pm/history'\n\nexport interface UndoRedoOptions {\n /**\n * The amount of history events that are collected before the oldest events are discarded.\n * @default 100\n * @example 50\n */\n depth: number\n\n /**\n * The delay (in milliseconds) between changes after which a new group should be started.\n * @default 500\n * @example 1000\n */\n newGroupDelay: number\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n undoRedo: {\n /**\n * Undo recent changes\n * @example editor.commands.undo()\n */\n undo: () => ReturnType\n /**\n * Reapply reverted changes\n * @example editor.commands.redo()\n */\n redo: () => ReturnType\n }\n }\n}\n\n/**\n * This extension allows you to undo and redo recent changes.\n * @see https://www.tiptap.dev/api/extensions/undo-redo\n *\n * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n * the `undo-redo` extension, as it is not compatible with the `collaboration` extension.\n *\n * `@tiptap/extension-collaboration` uses its own history implementation.\n */\nexport const UndoRedo = Extension.create({\n name: 'undoRedo',\n\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500,\n }\n },\n\n addCommands() {\n return {\n undo:\n () =>\n ({ state, dispatch }) => {\n return undo(state, dispatch)\n },\n redo:\n () =>\n ({ state, dispatch }) => {\n return redo(state, dispatch)\n },\n }\n },\n\n addProseMirrorPlugins() {\n return [history(this.options)]\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-z': () => this.editor.commands.undo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n 'Mod-y': () => this.editor.commands.redo(),\n\n // Russian keyboard layouts\n 'Mod-я': () => this.editor.commands.undo(),\n 'Shift-Mod-я': () => this.editor.commands.redo(),\n }\n },\n})\n"],"mappings":";AAAA,SAAS,iBAAiB;AAC1B,SAAS,SAAS,MAAM,YAAY;AA4C7B,IAAM,WAAW,UAAU,OAAwB;AAAA,EACxD,MAAM;AAAA,EAEN,aAAa;AACX,WAAO;AAAA,MACL,OAAO;AAAA,MACP,eAAe;AAAA,IACjB;AAAA,EACF;AAAA,EAEA,cAAc;AACZ,WAAO;AAAA,MACL,MACE,MACA,CAAC,EAAE,OAAO,SAAS,MAAM;AACvB,eAAO,KAAK,OAAO,QAAQ;AAAA,MAC7B;AAAA,MACF,MACE,MACA,CAAC,EAAE,OAAO,SAAS,MAAM;AACvB,eAAO,KAAK,OAAO,QAAQ;AAAA,MAC7B;AAAA,IACJ;AAAA,EACF;AAAA,EAEA,wBAAwB;AACtB,WAAO,CAAC,QAAQ,KAAK,OAAO,CAAC;AAAA,EAC/B;AAAA,EAEA,uBAAuB;AACrB,WAAO;AAAA,MACL,SAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MACzC,eAAe,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MAC/C,SAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA;AAAA,MAGzC,cAAS,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,MACzC,oBAAe,MAAM,KAAK,OAAO,SAAS,KAAK;AAAA,IACjD;AAAA,EACF;AACF,CAAC;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/package.json deleted file mode 100644 index e1f8109..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "name": "@tiptap/extensions", - "version": "3.26.0", - "description": "various extensions for tiptap", - "keywords": [ - "tiptap", - "tiptap extension" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "./character-count": { - "types": { - "import": "./dist/character-count/index.d.ts", - "require": "./dist/character-count/index.d.cts" - }, - "import": "./dist/character-count/index.js", - "require": "./dist/character-count/index.cjs" - }, - "./drop-cursor": { - "types": { - "import": "./dist/drop-cursor/index.d.ts", - "require": "./dist/drop-cursor/index.d.cts" - }, - "import": "./dist/drop-cursor/index.js", - "require": "./dist/drop-cursor/index.cjs" - }, - "./focus": { - "types": { - "import": "./dist/focus/index.d.ts", - "require": "./dist/focus/index.d.cts" - }, - "import": "./dist/focus/index.js", - "require": "./dist/focus/index.cjs" - }, - "./gap-cursor": { - "types": { - "import": "./dist/gap-cursor/index.d.ts", - "require": "./dist/gap-cursor/index.d.cts" - }, - "import": "./dist/gap-cursor/index.js", - "require": "./dist/gap-cursor/index.cjs" - }, - "./undo-redo": { - "types": { - "import": "./dist/undo-redo/index.d.ts", - "require": "./dist/undo-redo/index.d.cts" - }, - "import": "./dist/undo-redo/index.js", - "require": "./dist/undo-redo/index.cjs" - }, - "./placeholder": { - "types": { - "import": "./dist/placeholder/index.d.ts", - "require": "./dist/placeholder/index.d.cts" - }, - "import": "./dist/placeholder/index.js", - "require": "./dist/placeholder/index.cjs" - }, - "./selection": { - "types": { - "import": "./dist/selection/index.d.ts", - "require": "./dist/selection/index.d.cts" - }, - "import": "./dist/selection/index.js", - "require": "./dist/selection/index.cjs" - }, - "./trailing-node": { - "types": { - "import": "./dist/trailing-node/index.d.ts", - "require": "./dist/trailing-node/index.d.cts" - }, - "import": "./dist/trailing-node/index.js", - "require": "./dist/trailing-node/index.cjs" - } - }, - "devDependencies": { - "@tiptap/pm": "^3.26.0", - "@tiptap/core": "^3.26.0" - }, - "peerDependencies": { - "@tiptap/core": "3.26.0", - "@tiptap/pm": "3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/character-count/character-count.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/character-count/character-count.ts deleted file mode 100644 index d31e647..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/character-count/character-count.ts +++ /dev/null @@ -1,203 +0,0 @@ -import { Extension } from '@tiptap/core' -import type { Node as ProseMirrorNode } from '@tiptap/pm/model' -import { Plugin, PluginKey } from '@tiptap/pm/state' - -export interface CharacterCountOptions { - /** - * The maximum number of characters that should be allowed. Defaults to `0`. - * @default null - * @example 180 - */ - limit: number | null | undefined - /** - * The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used. - * If set to `nodeSize`, the nodeSize of the document is used. - * @default 'textSize' - * @example 'textSize' - */ - mode: 'textSize' | 'nodeSize' - /** - * Sets whether the content will be automatically trimmed when programatically setting content over the limit. - * If set to false, the user will be able to trim the text manually. - * @default true - * @example false - */ - autoTrim?: boolean - /** - * The text counter function to use. Defaults to a simple character count. - * @default (text) => text.length - * @example (text) => [...new Intl.Segmenter().segment(text)].length - */ - textCounter: (text: string) => number - /** - * The word counter function to use. Defaults to a simple word count. - * @default (text) => text.split(' ').filter(word => word !== '').length - * @example (text) => text.split(/\s+/).filter(word => word !== '').length - */ - wordCounter: (text: string) => number -} - -export interface CharacterCountStorage { - /** - * Get the number of characters for the current document. - * @param options The options for the character count. (optional) - * @param options.node The node to get the characters from. Defaults to the current document. - * @param options.mode The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used. - */ - characters: (options?: { node?: ProseMirrorNode; mode?: 'textSize' | 'nodeSize' }) => number - - /** - * Get the number of words for the current document. - * @param options The options for the character count. (optional) - * @param options.node The node to get the words from. Defaults to the current document. - */ - words: (options?: { node?: ProseMirrorNode }) => number -} - -declare module '@tiptap/core' { - interface Storage { - characterCount: CharacterCountStorage - } -} - -/** - * This extension allows you to count the characters and words of your document. - * @see https://tiptap.dev/api/extensions/character-count - */ -export const CharacterCount = Extension.create({ - name: 'characterCount', - - addOptions() { - return { - limit: null, - autoTrim: true, - mode: 'textSize', - textCounter: text => text.length, - wordCounter: text => text.split(' ').filter(word => word !== '').length, - } - }, - - addStorage() { - return { - characters: () => 0, - words: () => 0, - } - }, - - onBeforeCreate() { - this.storage.characters = options => { - const node = options?.node || this.editor.state.doc - const mode = options?.mode || this.options.mode - - if (mode === 'textSize') { - const text = node.textBetween(0, node.content.size, undefined, ' ') - - return this.options.textCounter(text) - } - - return node.nodeSize - } - - this.storage.words = options => { - const node = options?.node || this.editor.state.doc - const text = node.textBetween(0, node.content.size, ' ', ' ') - - return this.options.wordCounter(text) - } - }, - - addProseMirrorPlugins() { - let initialEvaluationDone = false - - return [ - new Plugin({ - key: new PluginKey('characterCount'), - appendTransaction: (transactions, oldState, newState) => { - if (initialEvaluationDone) { - return - } - - const limit = this.options.limit - const autoTrim = this.options.autoTrim - - if (limit === null || limit === undefined || limit === 0 || autoTrim === false) { - initialEvaluationDone = true - return - } - - const initialContentSize = this.storage.characters({ node: newState.doc }) - - if (initialContentSize > limit) { - const over = initialContentSize - limit - const from = 0 - const to = over - - console.warn( - `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`, - ) - const tr = newState.tr.deleteRange(from, to) - initialEvaluationDone = true - return tr - } - - initialEvaluationDone = true - }, - filterTransaction: (transaction, state) => { - const limit = this.options.limit - - // Nothing has changed or no limit is defined. Ignore it. - if (!transaction.docChanged || limit === 0 || limit === null || limit === undefined) { - return true - } - - const oldSize = this.storage.characters({ node: state.doc }) - const newSize = this.storage.characters({ node: transaction.doc }) - - // Everything is in the limit. Good. - if (newSize <= limit) { - return true - } - - // The limit has already been exceeded but will be reduced. - if (oldSize > limit && newSize > limit && newSize <= oldSize) { - return true - } - - // The limit has already been exceeded and will be increased further. - if (oldSize > limit && newSize > limit && newSize > oldSize) { - return false - } - - const isPaste = transaction.getMeta('paste') - - // Block all exceeding transactions that were not pasted. - if (!isPaste) { - return false - } - - // For pasted content, we try to remove the exceeding content. - const pos = transaction.selection.$head.pos - const over = newSize - limit - const from = pos - over - const to = pos - - // It’s probably a bad idea to mutate transactions within `filterTransaction` - // but for now this is working fine. - transaction.deleteRange(from, to) - - // In some situations, the limit will continue to be exceeded after trimming. - // This happens e.g. when truncating within a complex node (e.g. table) - // and ProseMirror has to close this node again. - // If this is the case, we prevent the transaction completely. - const updatedSize = this.storage.characters({ node: transaction.doc }) - - if (updatedSize > limit) { - return false - } - - return true - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/character-count/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/character-count/index.ts deleted file mode 100644 index 016071a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/character-count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './character-count.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/drop-cursor/drop-cursor.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/drop-cursor/drop-cursor.ts deleted file mode 100644 index 40f3cd5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/drop-cursor/drop-cursor.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Extension } from '@tiptap/core' -import { dropCursor } from '@tiptap/pm/dropcursor' - -export interface DropcursorOptions { - /** - * The color of the drop cursor. Use `false` to apply no color and rely only on class. - * @default 'currentColor' - * @example 'red' - */ - color?: string | false - - /** - * The width of the drop cursor - * @default 1 - * @example 2 - */ - width: number | undefined - - /** - * The class of the drop cursor - * @default undefined - * @example 'drop-cursor' - */ - class: string | undefined -} - -/** - * This extension allows you to add a drop cursor to your editor. - * A drop cursor is a line that appears when you drag and drop content - * in-between nodes. - * @see https://tiptap.dev/api/extensions/dropcursor - */ -export const Dropcursor = Extension.create({ - name: 'dropCursor', - - addOptions() { - return { - color: 'currentColor', - width: 1, - class: undefined, - } - }, - - addProseMirrorPlugins() { - return [dropCursor(this.options)] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/drop-cursor/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/drop-cursor/index.ts deleted file mode 100644 index 156d969..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/drop-cursor/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './drop-cursor.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/focus/focus.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/focus/focus.ts deleted file mode 100644 index fe905ee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/focus/focus.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Extension } from '@tiptap/core' -import { Plugin, PluginKey } from '@tiptap/pm/state' -import { Decoration, DecorationSet } from '@tiptap/pm/view' - -export interface FocusOptions { - /** - * The class name that should be added to the focused node. - * @default 'has-focus' - * @example 'is-focused' - */ - className: string - - /** - * The mode by which the focused node is determined. - * - All: All nodes are marked as focused. - * - Deepest: Only the deepest node is marked as focused. - * - Shallowest: Only the shallowest node is marked as focused. - * - * @default 'all' - * @example 'deepest' - * @example 'shallowest' - */ - mode: 'all' | 'deepest' | 'shallowest' -} - -/** - * This extension allows you to add a class to the focused node. - * @see https://www.tiptap.dev/api/extensions/focus - */ -export const Focus = Extension.create({ - name: 'focus', - - addOptions() { - return { - className: 'has-focus', - mode: 'all', - } - }, - - addProseMirrorPlugins() { - return [ - new Plugin({ - key: new PluginKey('focus'), - props: { - decorations: ({ doc, selection }) => { - const { isEditable, isFocused } = this.editor - const { anchor } = selection - const decorations: Decoration[] = [] - - if (!isEditable || !isFocused) { - return DecorationSet.create(doc, []) - } - - // Maximum Levels - let maxLevels = 0 - - if (this.options.mode === 'deepest') { - doc.descendants((node, pos) => { - if (node.isText) { - return - } - - const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1 - - if (!isCurrent) { - return false - } - - maxLevels += 1 - }) - } - - // Loop through current - let currentLevel = 0 - - doc.descendants((node, pos) => { - if (node.isText) { - return false - } - - const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1 - - if (!isCurrent) { - return false - } - - currentLevel += 1 - - const outOfScope = - (this.options.mode === 'deepest' && maxLevels - currentLevel > 0) || - (this.options.mode === 'shallowest' && currentLevel > 1) - - if (outOfScope) { - return this.options.mode === 'deepest' - } - - decorations.push( - Decoration.node(pos, pos + node.nodeSize, { - class: this.options.className, - }), - ) - }) - - return DecorationSet.create(doc, decorations) - }, - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/focus/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/focus/index.ts deleted file mode 100644 index db34427..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/focus/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './focus.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/gap-cursor/gap-cursor.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/gap-cursor/gap-cursor.ts deleted file mode 100644 index c2a0a02..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/gap-cursor/gap-cursor.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { ParentConfig } from '@tiptap/core' -import { callOrReturn, Extension, getExtensionField } from '@tiptap/core' -import { gapCursor } from '@tiptap/pm/gapcursor' - -declare module '@tiptap/core' { - interface NodeConfig { - /** - * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`. - * @default null - */ - allowGapCursor?: - | boolean - | null - | ((this: { - name: string - options: Options - storage: Storage - parent: ParentConfig>['allowGapCursor'] - }) => boolean | null) - } -} - -/** - * This extension allows you to add a gap cursor to your editor. - * A gap cursor is a cursor that appears when you click on a place - * where no content is present, for example inbetween nodes. - * @see https://tiptap.dev/api/extensions/gapcursor - */ -export const Gapcursor = Extension.create({ - name: 'gapCursor', - - addProseMirrorPlugins() { - return [gapCursor()] - }, - - extendNodeSchema(extension) { - const context = { - name: extension.name, - options: extension.options, - storage: extension.storage, - } - - return { - allowGapCursor: callOrReturn(getExtensionField(extension, 'allowGapCursor', context)) ?? null, - } - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/gap-cursor/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/gap-cursor/index.ts deleted file mode 100644 index 4099449..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/gap-cursor/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './gap-cursor.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/index.ts deleted file mode 100644 index 01cd652..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from './character-count/index.js' -export * from './drop-cursor/index.js' -export * from './focus/index.js' -export * from './gap-cursor/index.js' -export * from './placeholder/index.js' -export * from './selection/index.js' -export * from './trailing-node/index.js' -export * from './undo-redo/index.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/constants.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/constants.ts deleted file mode 100644 index 492049a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/constants.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { PluginKey } from '@tiptap/pm/state' - -import type { ViewportState } from './types.js' - -/** The default data attribute label */ -export const DEFAULT_DATA_ATTRIBUTE = 'placeholder' - -/** The plugin key used to store and read the placeholder viewport state */ -export const PLUGIN_KEY = new PluginKey('tiptap__placeholder') - -/** - * Extra pixels added above and below the visible viewport when computing the - * range of nodes to decorate. Decorating slightly beyond the fold means a - * node already has its placeholder before it scrolls into view, which hides - * the latency introduced by the throttled viewport recompute. - */ -export const VIEWPORT_OVERSCAN_PX = 200 diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/index.ts deleted file mode 100644 index e6ecc59..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { DEFAULT_DATA_ATTRIBUTE, PLUGIN_KEY } from './constants.js' -export * from './placeholder.js' -export * from './types.js' -export { preparePlaceholderAttribute } from './utils/preparePlaceholderAttribute.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/placeholder.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/placeholder.ts deleted file mode 100644 index cf55b57..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/placeholder.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Extension } from '@tiptap/core' - -import { DEFAULT_DATA_ATTRIBUTE } from './constants.js' -import { createPlaceholderPlugin } from './plugins/PlaceholderPlugin.js' -import type { PlaceholderOptions } from './types.js' - -/** - * This extension allows you to add a placeholder to your editor. - * A placeholder is a text that appears when the editor or a node is empty. - * @see https://www.tiptap.dev/api/extensions/placeholder - */ -export const Placeholder = Extension.create({ - name: 'placeholder', - - addOptions() { - return { - emptyEditorClass: 'is-editor-empty', - emptyNodeClass: 'is-empty', - dataAttribute: DEFAULT_DATA_ATTRIBUTE, - placeholder: 'Write something …', - showOnlyWhenEditable: true, - showOnlyCurrent: true, - includeChildren: false, - } - }, - - addProseMirrorPlugins() { - return [createPlaceholderPlugin({ editor: this.editor, options: this.options })] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/plugins/PlaceholderPlugin.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/plugins/PlaceholderPlugin.ts deleted file mode 100644 index 0cb93a0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/plugins/PlaceholderPlugin.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { Editor } from '@tiptap/core' -import { Plugin } from '@tiptap/pm/state' - -import { DEFAULT_DATA_ATTRIBUTE, PLUGIN_KEY } from '../constants.js' -import type { PlaceholderOptions } from '../types.js' -import { buildPlaceholderDecorations } from '../utils/buildPlaceholderDecorations.js' -import { preparePlaceholderAttribute } from '../utils/preparePlaceholderAttribute.js' -import { createViewportPluginView, viewportPluginState } from '../utils/viewportTracking.js' - -export type CreatePluginOptions = { - editor: Editor - options: PlaceholderOptions -} - -/** - * Creates the ProseMirror plugin that renders placeholder decorations. - * @param options.editor - The editor instance. - * @param options.options - The resolved placeholder options. - * @returns The configured placeholder plugin. - */ -export function createPlaceholderPlugin({ editor, options }: CreatePluginOptions) { - const dataAttribute = options.dataAttribute - ? `data-${preparePlaceholderAttribute(options.dataAttribute)}` - : `data-${DEFAULT_DATA_ATTRIBUTE}` - - return new Plugin({ - key: PLUGIN_KEY, - state: viewportPluginState, - view: createViewportPluginView, - props: { - decorations: ({ doc, selection }) => - buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }), - }, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/types.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/types.ts deleted file mode 100644 index f37ba16..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/types.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { Editor } from '@tiptap/core' -import type { Node as ProsemirrorNode } from '@tiptap/pm/model' - -/** - * The viewport positions tracked by the placeholder plugin. - * `null` means "no viewport info yet" — the decoration callback falls back to - * a full document scan until the scroll handler fires. - */ -export interface ViewportState { - topPos: number | null - bottomPos: number | null -} - -export interface PlaceholderOptions { - /** - * **The class name for the empty editor** - * @default 'is-editor-empty' - */ - emptyEditorClass: string - - /** - * **The class name for empty nodes** - * - * You can use a function to return a dynamic class name or a string. - * @default 'is-empty' - */ - emptyNodeClass: - | ((EmptyNodeClassProps: { - editor: Editor - node: ProsemirrorNode - pos: number - hasAnchor: boolean - }) => string) - | string - - /** - * **The data-attribute used for the placeholder label** - * Will be prepended with `data-` and converted to kebab-case and cleaned of special characters. - * @default 'placeholder' - */ - dataAttribute: string - - /** - * **The placeholder content** - * - * You can use a function to return a dynamic placeholder or a string. - * @default 'Write something …' - */ - placeholder: - | ((PlaceholderProps: { - editor: Editor - node: ProsemirrorNode - pos: number - hasAnchor: boolean - }) => string) - | string - - /** - * **Checks if the placeholder should be only shown when the editor is editable.** - * - * If true, the placeholder will only be shown when the editor is editable. - * If false, the placeholder will always be shown. - * @default true - */ - showOnlyWhenEditable: boolean - - /** - * **Checks if the placeholder should be only shown when the current node is empty.** - * - * If true, the placeholder will only be shown when the current node is empty. - * If false, the placeholder will be shown when any node is empty. - * @default true - */ - showOnlyCurrent: boolean - - /** - * **Controls if the placeholder should be shown for all descendants.** - * - * If true, the placeholder will be shown for all descendants. - * If false, the placeholder will only be shown for the current node. - * @default false - */ - includeChildren: boolean -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/buildPlaceholderDecorations.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/buildPlaceholderDecorations.ts deleted file mode 100644 index 5f907e6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/buildPlaceholderDecorations.ts +++ /dev/null @@ -1,129 +0,0 @@ -import type { Editor } from '@tiptap/core' -import { isNodeEmpty } from '@tiptap/core' -import type { Node } from '@tiptap/pm/model' -import type { Selection } from '@tiptap/pm/state' -import type { Decoration } from '@tiptap/pm/view' -import { DecorationSet } from '@tiptap/pm/view' - -import { PLUGIN_KEY } from '../constants.js' -import type { PlaceholderOptions } from '../types.js' -import { createPlaceholderDecoration } from './createPlaceholderDecoration.js' - -function resolveEmptyNodeClass( - emptyNodeClass: PlaceholderOptions['emptyNodeClass'], - props: { editor: Editor; node: Node; pos: number; hasAnchor: boolean }, -): string { - return typeof emptyNodeClass === 'function' ? emptyNodeClass(props) : emptyNodeClass -} - -/** - * Builds the placeholder decorations for the current document state. - * @param options.editor - The editor instance. - * @param options.options - The resolved placeholder options. - * @param options.dataAttribute - The prepared `data-*` attribute name. - * @param options.doc - The current document node. - * @param options.selection - The current selection. - * @returns A decoration set, or `null` when no placeholders should be shown. - */ -export function buildPlaceholderDecorations({ - editor, - options, - dataAttribute, - doc, - selection, -}: { - editor: Editor - options: PlaceholderOptions - dataAttribute: string - doc: Node - selection: Selection -}): DecorationSet | null { - const active = editor.isEditable || !options.showOnlyWhenEditable - - if (!active) { - return null - } - - const { anchor } = selection - const decorations: Decoration[] = [] - const isEmptyDoc = editor.isEmpty - - const useResolvedPath = options.showOnlyCurrent && !options.includeChildren - - if (useResolvedPath) { - const resolved = doc.resolve(anchor) - - // When the selection spans the whole document (e.g. an `AllSelection` - // after Cmd+A), the anchor resolves to the document level (depth 0). In - // that case the relevant textblock is the node directly after the - // position rather than an ancestor. otherwise the placeholder would - // disappear after selecting all and deleting. - const node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter - const nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor - - if (node && node.type.isTextblock && isNodeEmpty(node)) { - const hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize - - decorations.push( - createPlaceholderDecoration({ - editor, - isEmptyDoc, - dataAttribute, - hasAnchor, - placeholder: options.placeholder, - classes: { - emptyEditor: options.emptyEditorClass, - emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, { - editor, - node, - pos: nodeStart, - hasAnchor, - }), - }, - node, - pos: nodeStart, - }), - ) - } - } else { - const pluginState = PLUGIN_KEY.getState(editor.state) - const from = pluginState?.topPos ?? 0 - const to = pluginState?.bottomPos ?? doc.content.size - - doc.nodesBetween(from, to, (node, pos) => { - const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize - const isEmpty = !node.isLeaf && isNodeEmpty(node) - - if (!node.type.isTextblock) { - return options.includeChildren - } - - if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) { - decorations.push( - createPlaceholderDecoration({ - editor, - isEmptyDoc, - dataAttribute, - hasAnchor, - placeholder: options.placeholder, - classes: { - emptyEditor: options.emptyEditorClass, - emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, { - editor, - node, - pos, - hasAnchor, - }), - }, - node, - pos, - }), - ) - } - - return options.includeChildren - }) - } - - return DecorationSet.create(doc, decorations) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/createPlaceholderDecoration.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/createPlaceholderDecoration.ts deleted file mode 100644 index 2182f1b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/createPlaceholderDecoration.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { Editor } from '@tiptap/core' -import type { Node } from '@tiptap/pm/model' -import { Decoration } from '@tiptap/pm/view' - -import type { PlaceholderOptions } from '../types.js' - -/** - * Creates a ProseMirror node decoration that applies a placeholder - * CSS class and data attribute to an empty node. - * @param options.editor - The editor instance - * @param options.pos - The position of the node in the document - * @param options.node - The ProseMirror node - * @param options.isEmptyDoc - Whether the entire document is empty - * @param options.hasAnchor - Whether the selection anchor is within the node - * @param options.dataAttribute - The data attribute name (e.g. `data-placeholder`) - * @param options.classes - CSS classes for empty nodes and the empty editor - * @param options.placeholder - The placeholder text or a function that returns it - * @returns A ProseMirror node decoration with placeholder classes and data attribute - */ -export function createPlaceholderDecoration(options: { - editor: Editor - pos: number - node: Node - isEmptyDoc: boolean - hasAnchor: boolean - dataAttribute: string - classes: { - emptyEditor: PlaceholderOptions['emptyEditorClass'] - emptyNode: string - } - placeholder: PlaceholderOptions['placeholder'] -}) { - const { - editor, - placeholder, - dataAttribute, - pos, - node, - isEmptyDoc, - hasAnchor, - classes: { emptyNode, emptyEditor }, - } = options - const classes = [emptyNode] - - if (isEmptyDoc) { - classes.push(emptyEditor) - } - - return Decoration.node(pos, pos + node.nodeSize, { - class: classes.join(' '), - [dataAttribute]: - typeof placeholder === 'function' - ? placeholder({ - editor, - node, - pos, - hasAnchor, - }) - : placeholder, - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/findScrollParent.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/findScrollParent.ts deleted file mode 100644 index cc547d5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/findScrollParent.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Checks if an element is scrollable by testing its overflow properties. - * Elements with `overflow: hidden` or `overflow: clip` are intentionally - * excluded — they clip content but don't emit scroll events. - */ -function isScrollable(el: HTMLElement): boolean { - const style = getComputedStyle(el) - const overflow = `${style.overflow} ${style.overflowY} ${style.overflowX}` - - return /auto|scroll|overlay/.test(overflow) -} - -export function findScrollParent(element: HTMLElement): HTMLElement | Window { - let el: HTMLElement | null = element - - while (el) { - if (isScrollable(el)) { - return el - } - - // Check if we hit a Shadow DOM boundary. If so, jump to the shadow host - // and continue traversing the light DOM. - const parent = el.parentElement - if (!parent) { - const root = el.getRootNode() - if (root instanceof ShadowRoot) { - el = root.host as HTMLElement - continue - } - - return window - } - - el = parent - } - - return window -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/getViewportBoundaryPositions.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/getViewportBoundaryPositions.ts deleted file mode 100644 index d39963e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/getViewportBoundaryPositions.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { Node } from '@tiptap/pm/model' -import type { EditorView } from '@tiptap/pm/view' - -import { VIEWPORT_OVERSCAN_PX } from '../constants.js' - -function getContainerRect(container: HTMLElement | Window): { top: number; bottom: number } { - if (container === window) { - return { top: 0, bottom: window.innerHeight } - } - - return (container as HTMLElement).getBoundingClientRect() -} - -export function getViewportBoundaryPositions({ - doc, - view, - scrollContainer, -}: { - doc: Node - view: EditorView - scrollContainer?: HTMLElement | Window -}) { - const editorRect = view.dom.getBoundingClientRect() - const containerRect = scrollContainer - ? getContainerRect(scrollContainer) - : { top: 0, bottom: window.innerHeight } - - const visibleTop = Math.max(editorRect.top, containerRect.top) - VIEWPORT_OVERSCAN_PX - const visibleBottom = Math.min(editorRect.bottom, containerRect.bottom) + VIEWPORT_OVERSCAN_PX - - if (visibleTop >= visibleBottom) { - // Editor is not visible — fall back to full document range - return { top: 0, bottom: doc.content.size } - } - - // Pick the x-coordinate based on text direction. In LTR the content - // starts at the left edge; in RTL it starts at the right edge. - // Clamp to ensure the coordinate stays inside the editor bounds. - const isRTL = getComputedStyle(view.dom).direction === 'rtl' - const x = isRTL ? Math.max(editorRect.right - 2, editorRect.left + 2) : editorRect.left + 2 - - const topPos = view.posAtCoords({ left: x, top: visibleTop + 2 }) - const bottomPos = view.posAtCoords({ left: x, top: visibleBottom - 2 }) - - return { - top: topPos ? topPos.pos : 0, - bottom: bottomPos ? bottomPos.pos : doc.content.size, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/index.ts deleted file mode 100644 index e50573e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './buildPlaceholderDecorations.js' -export * from './createPlaceholderDecoration.js' -export * from './findScrollParent.js' -export * from './getViewportBoundaryPositions.js' -export * from './preparePlaceholderAttribute.js' -export * from './viewportTracking.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/preparePlaceholderAttribute.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/preparePlaceholderAttribute.ts deleted file mode 100644 index 8c6d674..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/preparePlaceholderAttribute.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Prepares the placeholder attribute by ensuring it is properly formatted. - * @param attr - The placeholder attribute string. - * @returns The prepared placeholder attribute string. - */ -export function preparePlaceholderAttribute(attr: string): string { - return ( - attr - // replace whitespace with dashes - .replace(/\s+/g, '-') - // replace non-alphanumeric characters - // or special chars like $, %, &, etc. - // but not dashes - .replace(/[^a-zA-Z0-9-]/g, '') - // and replace any numeric character at the start - .replace(/^[0-9-]+/, '') - // and finally replace any stray, leading dashes - .replace(/^-+/, '') - .toLowerCase() - ) -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/throttle.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/throttle.ts deleted file mode 100644 index 7f4c5a3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/throttle.ts +++ /dev/null @@ -1,28 +0,0 @@ -export function throttle void>( - fn: T, - delay: number, -): { call: T; cancel: () => void } { - let timer: ReturnType | null = null - - const call = ((...args: any[]) => { - if (timer) { - return - } - - // Leading-edge: fire immediately, then prevent subsequent calls - // until the timer fires and resets. - fn(...args) - timer = setTimeout(() => { - timer = null - }, delay) - }) as T - - const cancel = () => { - if (timer) { - clearTimeout(timer) - timer = null - } - } - - return { call, cancel } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/viewportTracking.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/viewportTracking.ts deleted file mode 100644 index 9149f9d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/placeholder/utils/viewportTracking.ts +++ /dev/null @@ -1,118 +0,0 @@ -import type { EditorState, PluginView, StateField, Transaction } from '@tiptap/pm/state' -import type { EditorView } from '@tiptap/pm/view' - -import { PLUGIN_KEY } from '../constants.js' -import type { ViewportState } from '../types.js' -import { findScrollParent } from './findScrollParent.js' -import { getViewportBoundaryPositions } from './getViewportBoundaryPositions.js' - -/** - * The plugin `state` config that tracks the visible viewport boundaries so the - * decoration callback only scans the nodes currently on screen. - */ -export const viewportPluginState: StateField = { - /** - * Initialises the viewport state with no known positions. - * @returns The initial viewport state. - */ - init(): ViewportState { - return { topPos: null, bottomPos: null } - }, - - /** - * Updates the viewport state from incoming transactions. - * @param tr - The transaction being applied. - * @param prev - The previous viewport state. - * @returns The next viewport state. - */ - apply(tr: Transaction, prev: ViewportState): ViewportState { - const meta = tr.getMeta(PLUGIN_KEY) as - | { positions?: { top: number; bottom: number } } - | undefined - - if (meta?.positions) { - return { topPos: meta.positions.top, bottomPos: meta.positions.bottom } - } - - if (!tr.docChanged) { - return prev - } - - // Preserve last known viewport positions across transactions. - // Without this, every keystroke resets back to a full document - // scan, defeating the viewport optimisation. - // Only map when we have actual positions — null means "no viewport - // info yet" and should stay null to fall back to full doc scan. - return { - topPos: prev.topPos !== null ? tr.mapping.map(prev.topPos) : null, - bottomPos: prev.bottomPos !== null ? tr.mapping.map(prev.bottomPos) : null, - } - }, -} - -/** - * Creates the plugin `view` that recomputes the visible viewport on scroll and - * document size changes, dispatching the result into the plugin state. - * @param view - The editor view the plugin is attached to. - * @returns A plugin view with `update` and `destroy` handlers. - */ -export function createViewportPluginView(view: EditorView): PluginView { - const scrollContainer = findScrollParent(view.dom) - - const computeAndDispatch = () => { - const positions = getViewportBoundaryPositions({ - view, - doc: view.state.doc, - scrollContainer, - }) - - const prev = PLUGIN_KEY.getState(view.state) - if (prev?.topPos === positions.top && prev?.bottomPos === positions.bottom) { - return - } - - const tr = view.state.tr.setMeta(PLUGIN_KEY, { positions }) - view.dispatch(tr) - } - - // rAF-based scheduler with interval guard (150ms → ~6–7 Hz) used by - // scroll events and update(). The overscan margin hides the extra - // latency. When the guard blocks, the callback reschedules itself so - // the trailing position is always captured. - let frame: number | null = null - let lastCompute = 0 - const MIN_SCROLL_INTERVAL = 150 - - const scheduleFrame = () => { - if (frame !== null) return - frame = requestAnimationFrame(() => { - frame = null - const now = performance.now() - if (now - lastCompute >= MIN_SCROLL_INTERVAL) { - lastCompute = now - computeAndDispatch() - } else { - scheduleFrame() - } - }) - } - - scrollContainer.addEventListener('scroll', scheduleFrame, { passive: true }) - - // Fire once to populate initial viewport - computeAndDispatch() - - return { - update(_view: EditorView, prevState: EditorState) { - if (view.state.doc.content.size !== prevState.doc.content.size) { - scheduleFrame() - } - }, - destroy: () => { - if (frame !== null) { - cancelAnimationFrame(frame) - } - scrollContainer.removeEventListener('scroll', scheduleFrame) - }, - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/selection/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/selection/index.ts deleted file mode 100644 index 2d79634..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/selection/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './selection.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/selection/selection.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/selection/selection.ts deleted file mode 100644 index d4a8b02..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/selection/selection.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { createStyleTag, Extension, isNodeSelection } from '@tiptap/core' -import { Plugin, PluginKey } from '@tiptap/pm/state' -import { Decoration, DecorationSet } from '@tiptap/pm/view' - -const selectionStyle = `.ProseMirror:not(.ProseMirror-focused) *::selection { - background: transparent; -} - -.ProseMirror:not(.ProseMirror-focused) *::-moz-selection { - background: transparent; -}` - -export type SelectionOptions = { - /** - * The class name that should be added to the selected text. - * @default 'selection' - * @example 'is-selected' - */ - className: string -} - -/** - * This extension allows you to add a class to the selected text. - * @see https://www.tiptap.dev/api/extensions/selection - */ -export const Selection = Extension.create({ - name: 'selection', - - addOptions() { - return { - className: 'selection', - } - }, - - addProseMirrorPlugins() { - const { editor, options } = this - - if (editor.options.injectCSS && typeof document !== 'undefined') { - createStyleTag(selectionStyle, editor.options.injectNonce, 'selection') - } - - return [ - new Plugin({ - key: new PluginKey('selection'), - props: { - decorations(state) { - if ( - state.selection.empty || - editor.isFocused || - !editor.isEditable || - isNodeSelection(state.selection) || - editor.view.dragging - ) { - return null - } - - return DecorationSet.create(state.doc, [ - Decoration.inline(state.selection.from, state.selection.to, { - class: options.className, - }), - ]) - }, - }, - }), - ] - }, -}) - -export default Selection diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/trailing-node/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/trailing-node/index.ts deleted file mode 100644 index 6ead83b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/trailing-node/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './trailing-node.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/trailing-node/trailing-node.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/trailing-node/trailing-node.ts deleted file mode 100644 index 679518f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/trailing-node/trailing-node.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { Extension } from '@tiptap/core' -import type { Node, NodeType } from '@tiptap/pm/model' -import { Plugin, PluginKey } from '@tiptap/pm/state' - -export const skipTrailingNodeMeta = 'skipTrailingNode' - -function nodeEqualsType({ - types, - node, -}: { - types: NodeType | NodeType[] - node: Node | null | undefined -}) { - return (node && Array.isArray(types) && types.includes(node.type)) || node?.type === types -} - -/** - * Extension based on: - * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js - * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts - */ - -export interface TrailingNodeOptions { - /** - * The node type that should be inserted at the end of the document. - * @note the node will always be added to the `notAfter` lists to - * prevent an infinite loop. - * @default undefined - */ - node?: string - /** - * The node types after which the trailing node should not be inserted. - * @default ['paragraph'] - */ - notAfter?: string | string[] -} - -/** - * This extension allows you to add an extra node at the end of the document. - * @see https://www.tiptap.dev/api/extensions/trailing-node - */ -export const TrailingNode = Extension.create({ - name: 'trailingNode', - - addOptions() { - return { - node: undefined, - notAfter: [], - } - }, - - addProseMirrorPlugins() { - const plugin = new PluginKey(this.name) - const defaultNode = - this.options.node || - this.editor.schema.topNodeType.contentMatch.defaultType?.name || - 'paragraph' - - const disabledNodes = Object.entries(this.editor.schema.nodes) - .map(([, value]) => value) - .filter(node => (this.options.notAfter || []).concat(defaultNode).includes(node.name)) - - return [ - new Plugin({ - key: plugin, - appendTransaction: (transactions, __, state) => { - const { doc, tr, schema } = state - const shouldInsertNodeAtEnd = plugin.getState(state) - const endPosition = doc.content.size - const type = schema.nodes[defaultNode] - - if (transactions.some(transaction => transaction.getMeta(skipTrailingNodeMeta))) { - return - } - - if (!shouldInsertNodeAtEnd) { - return - } - - return tr.insert(endPosition, type.create()) - }, - state: { - init: (_, state) => { - const lastNode = state.tr.doc.lastChild - - return !nodeEqualsType({ node: lastNode, types: disabledNodes }) - }, - apply: (tr, value) => { - if (!tr.docChanged) { - return value - } - - // Ignore transactions from UniqueID extension to prevent infinite loops - // when UniqueID adds IDs to newly inserted trailing nodes - if (tr.getMeta('__uniqueIDTransaction')) { - return value - } - - const lastNode = tr.doc.lastChild - - return !nodeEqualsType({ node: lastNode, types: disabledNodes }) - }, - }, - }), - ] - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/undo-redo/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/undo-redo/index.ts deleted file mode 100644 index f76d984..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/undo-redo/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './undo-redo.js' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/undo-redo/undo-redo.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/undo-redo/undo-redo.ts deleted file mode 100644 index cc2d59f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions/src/undo-redo/undo-redo.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Extension } from '@tiptap/core' -import { history, redo, undo } from '@tiptap/pm/history' - -export interface UndoRedoOptions { - /** - * The amount of history events that are collected before the oldest events are discarded. - * @default 100 - * @example 50 - */ - depth: number - - /** - * The delay (in milliseconds) between changes after which a new group should be started. - * @default 500 - * @example 1000 - */ - newGroupDelay: number -} - -declare module '@tiptap/core' { - interface Commands { - undoRedo: { - /** - * Undo recent changes - * @example editor.commands.undo() - */ - undo: () => ReturnType - /** - * Reapply reverted changes - * @example editor.commands.redo() - */ - redo: () => ReturnType - } - } -} - -/** - * This extension allows you to undo and redo recent changes. - * @see https://www.tiptap.dev/api/extensions/undo-redo - * - * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove - * the `undo-redo` extension, as it is not compatible with the `collaboration` extension. - * - * `@tiptap/extension-collaboration` uses its own history implementation. - */ -export const UndoRedo = Extension.create({ - name: 'undoRedo', - - addOptions() { - return { - depth: 100, - newGroupDelay: 500, - } - }, - - addCommands() { - return { - undo: - () => - ({ state, dispatch }) => { - return undo(state, dispatch) - }, - redo: - () => - ({ state, dispatch }) => { - return redo(state, dispatch) - }, - } - }, - - addProseMirrorPlugins() { - return [history(this.options)] - }, - - addKeyboardShortcuts() { - return { - 'Mod-z': () => this.editor.commands.undo(), - 'Shift-Mod-z': () => this.editor.commands.redo(), - 'Mod-y': () => this.editor.commands.redo(), - - // Russian keyboard layouts - 'Mod-я': () => this.editor.commands.undo(), - 'Shift-Mod-я': () => this.editor.commands.redo(), - } - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm b/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm deleted file mode 120000 index f877560..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/pm +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+pm@3.26.0/node_modules/@tiptap/pm \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/LICENSE b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/LICENSE deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/README.md deleted file mode 100644 index 144c68f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# @tiptap/pm - -[![Version](https://img.shields.io/npm/v/@tiptap/pm.svg?label=version)](https://www.npmjs.com/package/@tiptap/pm) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/pm.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/pm.svg)](https://www.npmjs.com/package/@tiptap/pm) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## What is this `pm` package? - -The `pm` package re-exports [ProseMirror](https://ProseMirror.net) packages under a single version range. It bundles all ProseMirror packages that are required to run Tiptap into one consistent dependency, so you don't need to install and align multiple ProseMirror packages yourself. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/THIRD_PARTY_LICENSES.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/THIRD_PARTY_LICENSES.md deleted file mode 100644 index 6b6d7f0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/THIRD_PARTY_LICENSES.md +++ /dev/null @@ -1,47 +0,0 @@ -# Third-party licenses - -This package re-exports packages from the [ProseMirror](https://prosemirror.net) project. - -ProseMirror is licensed under the MIT License. - -Copyright (C) Marijn Haverbeke and others - -The following ProseMirror packages are re-exported by this package: - -- prosemirror-changeset -- prosemirror-commands -- prosemirror-dropcursor -- prosemirror-gapcursor -- prosemirror-history -- prosemirror-inputrules -- prosemirror-keymap -- prosemirror-model -- prosemirror-schema-list -- prosemirror-state -- prosemirror-tables -- prosemirror-transform -- prosemirror-view - ---- - -## [MIT License (ProseMirror)](https://code.haverbeke.berlin/prosemirror/prosemirror/src/branch/main/LICENSE) - -Copyright (C) 2015-2017 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/changeset/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/changeset/index.ts deleted file mode 100644 index 83f924c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/changeset/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-changeset' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/commands/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/commands/index.ts deleted file mode 100644 index 50da9e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/commands/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-commands' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.cjs deleted file mode 100644 index 3077fa3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// changeset/index.ts -var _prosemirrorchangeset = require('prosemirror-changeset'); _createStarExport(_prosemirrorchangeset); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.d.cts deleted file mode 100644 index e630b59..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.d.cts +++ /dev/null @@ -1,13 +0,0 @@ -export * from 'prosemirror-changeset'; -import 'prosemirror-commands'; -import 'prosemirror-dropcursor'; -import 'prosemirror-gapcursor'; -import 'prosemirror-history'; -import 'prosemirror-inputrules'; -import 'prosemirror-keymap'; -import 'prosemirror-model'; -import 'prosemirror-schema-list'; -import 'prosemirror-state'; -import 'prosemirror-tables'; -import 'prosemirror-transform'; -import 'prosemirror-view'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.d.ts deleted file mode 100644 index e630b59..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export * from 'prosemirror-changeset'; -import 'prosemirror-commands'; -import 'prosemirror-dropcursor'; -import 'prosemirror-gapcursor'; -import 'prosemirror-history'; -import 'prosemirror-inputrules'; -import 'prosemirror-keymap'; -import 'prosemirror-model'; -import 'prosemirror-schema-list'; -import 'prosemirror-state'; -import 'prosemirror-tables'; -import 'prosemirror-transform'; -import 'prosemirror-view'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.js deleted file mode 100644 index 8d74953..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/changeset/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// changeset/index.ts -export * from "prosemirror-changeset"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.cjs deleted file mode 100644 index 4070a35..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// commands/index.ts -var _prosemirrorcommands = require('prosemirror-commands'); _createStarExport(_prosemirrorcommands); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.d.cts deleted file mode 100644 index de221a3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-commands'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.d.ts deleted file mode 100644 index de221a3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-commands'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.js deleted file mode 100644 index 374b0b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/commands/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// commands/index.ts -export * from "prosemirror-commands"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.cjs deleted file mode 100644 index 6dfcb0b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// dropcursor/index.ts -var _prosemirrordropcursor = require('prosemirror-dropcursor'); _createStarExport(_prosemirrordropcursor); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.d.cts deleted file mode 100644 index 7190bf9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-dropcursor'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.d.ts deleted file mode 100644 index 7190bf9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-dropcursor'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.js deleted file mode 100644 index b57fac0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/dropcursor/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// dropcursor/index.ts -export * from "prosemirror-dropcursor"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.cjs deleted file mode 100644 index fd88d28..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// gapcursor/index.ts -var _prosemirrorgapcursor = require('prosemirror-gapcursor'); _createStarExport(_prosemirrorgapcursor); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.d.cts deleted file mode 100644 index 4203bc0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-gapcursor'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.d.ts deleted file mode 100644 index 4203bc0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-gapcursor'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.js deleted file mode 100644 index ec6d877..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/gapcursor/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// gapcursor/index.ts -export * from "prosemirror-gapcursor"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.cjs deleted file mode 100644 index 8148a7d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// history/index.ts -var _prosemirrorhistory = require('prosemirror-history'); _createStarExport(_prosemirrorhistory); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.d.cts deleted file mode 100644 index 055ec97..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-history'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.d.ts deleted file mode 100644 index 055ec97..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-history'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.js deleted file mode 100644 index 7597066..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/history/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// history/index.ts -export * from "prosemirror-history"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.cjs deleted file mode 100644 index 29620f3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// inputrules/index.ts -var _prosemirrorinputrules = require('prosemirror-inputrules'); _createStarExport(_prosemirrorinputrules); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.d.cts deleted file mode 100644 index c6f2228..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-inputrules'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.d.ts deleted file mode 100644 index c6f2228..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-inputrules'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.js deleted file mode 100644 index 6a7de1e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/inputrules/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// inputrules/index.ts -export * from "prosemirror-inputrules"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.cjs deleted file mode 100644 index 6bd94cb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// keymap/index.ts -var _prosemirrorkeymap = require('prosemirror-keymap'); _createStarExport(_prosemirrorkeymap); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.d.cts deleted file mode 100644 index 44b86bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-keymap'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.d.ts deleted file mode 100644 index 44b86bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-keymap'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.js deleted file mode 100644 index 6314b80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/keymap/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// keymap/index.ts -export * from "prosemirror-keymap"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.cjs deleted file mode 100644 index 006c681..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// model/index.ts -var _prosemirrormodel = require('prosemirror-model'); _createStarExport(_prosemirrormodel); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.d.cts deleted file mode 100644 index 149a810..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-model'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.d.ts deleted file mode 100644 index 149a810..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-model'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.js deleted file mode 100644 index d55501c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/model/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// model/index.ts -export * from "prosemirror-model"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.cjs deleted file mode 100644 index c8b3394..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// schema-list/index.ts -var _prosemirrorschemalist = require('prosemirror-schema-list'); _createStarExport(_prosemirrorschemalist); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.d.cts deleted file mode 100644 index 3b97393..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-schema-list'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.d.ts deleted file mode 100644 index 3b97393..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-schema-list'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.js deleted file mode 100644 index d82ae4c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/schema-list/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// schema-list/index.ts -export * from "prosemirror-schema-list"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.cjs deleted file mode 100644 index 347d2fa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// state/index.ts -var _prosemirrorstate = require('prosemirror-state'); _createStarExport(_prosemirrorstate); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.d.cts deleted file mode 100644 index 455a4db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-state'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.d.ts deleted file mode 100644 index 455a4db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-state'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.js deleted file mode 100644 index c44ae8f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/state/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// state/index.ts -export * from "prosemirror-state"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.cjs deleted file mode 100644 index d6c6dfa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// tables/index.ts -var _prosemirrortables = require('prosemirror-tables'); _createStarExport(_prosemirrortables); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.d.cts deleted file mode 100644 index 625e583..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-tables'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.d.ts deleted file mode 100644 index 625e583..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-tables'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.js deleted file mode 100644 index 311dde7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/tables/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// tables/index.ts -export * from "prosemirror-tables"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.cjs deleted file mode 100644 index 5f9479b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// transform/index.ts -var _prosemirrortransform = require('prosemirror-transform'); _createStarExport(_prosemirrortransform); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.d.cts deleted file mode 100644 index 0b4f8de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-transform'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.d.ts deleted file mode 100644 index 0b4f8de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-transform'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.js deleted file mode 100644 index 71362c7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/transform/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// transform/index.ts -export * from "prosemirror-transform"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.cjs deleted file mode 100644 index 0417876..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }// view/index.ts -var _prosemirrorview = require('prosemirror-view'); _createStarExport(_prosemirrorview); diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.d.cts deleted file mode 100644 index 8b3c631..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.d.cts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-view'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.d.ts deleted file mode 100644 index 8b3c631..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-view'; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.js deleted file mode 100644 index 81301c7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dist/view/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// view/index.ts -export * from "prosemirror-view"; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dropcursor/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dropcursor/index.ts deleted file mode 100644 index 2f73bb5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/dropcursor/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-dropcursor' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/gapcursor/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/gapcursor/index.ts deleted file mode 100644 index fd3299b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/gapcursor/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-gapcursor' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/history/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/history/index.ts deleted file mode 100644 index f0013a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/history/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-history' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/inputrules/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/inputrules/index.ts deleted file mode 100644 index 1841be3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/inputrules/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-inputrules' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/keymap/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/keymap/index.ts deleted file mode 100644 index d97e478..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/keymap/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-keymap' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/model/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/model/index.ts deleted file mode 100644 index 11cb9bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/model/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-model' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/package.json deleted file mode 100644 index a6a08e0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/package.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "name": "@tiptap/pm", - "version": "3.26.0", - "description": "prosemirror wrapper package for tiptap", - "keywords": [ - "prosemirror", - "tiptap" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/pm" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "dist/**", - "changeset/**", - "commands/**", - "dropcursor/**", - "gapcursor/**", - "history/**", - "inputrules/**", - "keymap/**", - "model/**", - "schema-list/**", - "state/**", - "tables/**", - "transform/**", - "view/**", - "LICENSE", - "THIRD_PARTY_LICENSES.md" - ], - "type": "module", - "exports": { - "./changeset": { - "types": { - "import": "./dist/changeset/index.d.ts", - "require": "./dist/changeset/index.d.cts" - }, - "import": "./dist/changeset/index.js", - "require": "./dist/changeset/index.cjs" - }, - "./commands": { - "types": { - "import": "./dist/commands/index.d.ts", - "require": "./dist/commands/index.d.cts" - }, - "import": "./dist/commands/index.js", - "require": "./dist/commands/index.cjs" - }, - "./dropcursor": { - "types": { - "import": "./dist/dropcursor/index.d.ts", - "require": "./dist/dropcursor/index.d.cts" - }, - "import": "./dist/dropcursor/index.js", - "require": "./dist/dropcursor/index.cjs" - }, - "./inputrules": { - "types": { - "import": "./dist/inputrules/index.d.ts", - "require": "./dist/inputrules/index.d.cts" - }, - "import": "./dist/inputrules/index.js", - "require": "./dist/inputrules/index.cjs" - }, - "./gapcursor": { - "types": { - "import": "./dist/gapcursor/index.d.ts", - "require": "./dist/gapcursor/index.d.cts" - }, - "import": "./dist/gapcursor/index.js", - "require": "./dist/gapcursor/index.cjs" - }, - "./history": { - "types": { - "import": "./dist/history/index.d.ts", - "require": "./dist/history/index.d.cts" - }, - "import": "./dist/history/index.js", - "require": "./dist/history/index.cjs" - }, - "./keymap": { - "types": { - "import": "./dist/keymap/index.d.ts", - "require": "./dist/keymap/index.d.cts" - }, - "import": "./dist/keymap/index.js", - "require": "./dist/keymap/index.cjs" - }, - "./model": { - "types": { - "import": "./dist/model/index.d.ts", - "require": "./dist/model/index.d.cts" - }, - "import": "./dist/model/index.js", - "require": "./dist/model/index.cjs" - }, - "./schema-list": { - "types": { - "import": "./dist/schema/index.d.ts", - "require": "./dist/schema/index.d.cts" - }, - "import": "./dist/schema-list/index.js", - "require": "./dist/schema-list/index.cjs" - }, - "./state": { - "types": { - "import": "./dist/state/index.d.ts", - "require": "./dist/state/index.d.cts" - }, - "import": "./dist/state/index.js", - "require": "./dist/state/index.cjs" - }, - "./tables": { - "types": { - "import": "./dist/tables/index.d.ts", - "require": "./dist/tables/index.d.cts" - }, - "import": "./dist/tables/index.js", - "require": "./dist/tables/index.cjs" - }, - "./transform": { - "types": { - "import": "./dist/transform/index.d.ts", - "require": "./dist/transform/index.d.cts" - }, - "import": "./dist/transform/index.js", - "require": "./dist/transform/index.cjs" - }, - "./view": { - "types": { - "import": "./dist/view/index.d.ts", - "require": "./dist/view/index.d.cts" - }, - "import": "./dist/view/index.js", - "require": "./dist/view/index.cjs" - } - }, - "dependencies": { - "prosemirror-changeset": "^2.3.0", - "prosemirror-commands": "^1.6.2", - "prosemirror-dropcursor": "^1.8.1", - "prosemirror-gapcursor": "^1.3.2", - "prosemirror-history": "^1.4.1", - "prosemirror-inputrules": "^1.4.0", - "prosemirror-keymap": "^1.2.3", - "prosemirror-model": "^1.25.7", - "prosemirror-schema-list": "^1.5.0", - "prosemirror-state": "^1.4.4", - "prosemirror-tables": "^1.8.0", - "prosemirror-transform": "^1.12.0", - "prosemirror-view": "^1.41.8" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/schema-list/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/schema-list/index.ts deleted file mode 100644 index e931fed..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/schema-list/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-schema-list' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/state/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/state/index.ts deleted file mode 100644 index 0cfb285..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/state/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-state' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/tables/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/tables/index.ts deleted file mode 100644 index 5716c71..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/tables/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-tables' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/transform/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/transform/index.ts deleted file mode 100644 index 26df75c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/transform/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-transform' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/view/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/view/index.ts deleted file mode 100644 index 34d6b65..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/@tiptap/pm/view/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'prosemirror-view' diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-changeset b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-changeset deleted file mode 120000 index 82eeafe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-changeset +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-commands b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-commands deleted file mode 120000 index 9ec2cd9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-commands +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-commands@1.7.1/node_modules/prosemirror-commands \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-dropcursor b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-dropcursor deleted file mode 120000 index 66ad107..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-dropcursor +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-gapcursor b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-gapcursor deleted file mode 120000 index ac9bf80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-gapcursor +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-history b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-history deleted file mode 120000 index 57a22d3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-history +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-history@1.5.0/node_modules/prosemirror-history \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-inputrules b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-inputrules deleted file mode 120000 index 8bc3b2c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-inputrules +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-keymap b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-keymap deleted file mode 120000 index 2bb5f34..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-keymap +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-model b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-model deleted file mode 120000 index 420d071..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-model +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-model@1.25.7/node_modules/prosemirror-model \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-schema-list b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-schema-list deleted file mode 120000 index 9009ead..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-schema-list +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-state b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-state deleted file mode 120000 index f732de9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-state +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-state@1.4.4/node_modules/prosemirror-state \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-tables b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-tables deleted file mode 120000 index ed746b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-tables +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-tables@1.8.5/node_modules/prosemirror-tables \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-transform b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-transform deleted file mode 120000 index d9fd2cc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-transform +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-transform@1.12.0/node_modules/prosemirror-transform \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-view b/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-view deleted file mode 120000 index ed4297c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+pm@3.26.0/node_modules/prosemirror-view +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-view@1.41.8/node_modules/prosemirror-view \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/core deleted file mode 120000 index fc90913..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-blockquote b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-blockquote deleted file mode 120000 index d33fe9c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-blockquote +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-bold b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-bold deleted file mode 120000 index 58bec80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-bold +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-bullet-list b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-bullet-list deleted file mode 120000 index 71f7e47..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-bullet-list +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-code b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-code deleted file mode 120000 index 1aa298f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-code +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-code-block b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-code-block deleted file mode 120000 index 520c44c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-code-block +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-document b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-document deleted file mode 120000 index 2ba9a86..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-document +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-dropcursor b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-dropcursor deleted file mode 120000 index 9060f06..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-dropcursor +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-gapcursor b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-gapcursor deleted file mode 120000 index 31eb8f1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-gapcursor +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-hard-break b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-hard-break deleted file mode 120000 index 31c8794..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-hard-break +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-heading b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-heading deleted file mode 120000 index 27f7311..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-heading +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-horizontal-rule b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-horizontal-rule deleted file mode 120000 index f09bca5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-horizontal-rule +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-italic b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-italic deleted file mode 120000 index fb69447..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-italic +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-link b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-link deleted file mode 120000 index 317887c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-link +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list deleted file mode 120000 index e342d8d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list-item b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list-item deleted file mode 120000 index 498589f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list-item +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list-keymap b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list-keymap deleted file mode 120000 index 7f4fab2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-list-keymap +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-ordered-list b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-ordered-list deleted file mode 120000 index 3a790f4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-ordered-list +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-paragraph b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-paragraph deleted file mode 120000 index 4f2f62d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-paragraph +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-strike b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-strike deleted file mode 120000 index 1a1737a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-strike +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-text b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-text deleted file mode 120000 index d8866ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-text +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-underline b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-underline deleted file mode 120000 index 7d1d193..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extension-underline +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extensions b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extensions deleted file mode 120000 index fc01066..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/extensions +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/pm b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/pm deleted file mode 120000 index f877560..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/pm +++ /dev/null @@ -1 +0,0 @@ -../../../@tiptap+pm@3.26.0/node_modules/@tiptap/pm \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/LICENSE.md deleted file mode 100644 index 4b28a55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025, Tiptap GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/README.md b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/README.md deleted file mode 100644 index c1ab810..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# @tiptap/starter-kit - -[![Version](https://img.shields.io/npm/v/@tiptap/starter-kit.svg?label=version)](https://www.npmjs.com/package/@tiptap/starter-kit) -[![Downloads](https://img.shields.io/npm/dm/@tiptap/starter-kit.svg)](https://npmcharts.com/compare/tiptap?minimal=true) -[![License](https://img.shields.io/npm/l/@tiptap/starter-kit.svg)](https://www.npmjs.com/package/@tiptap/starter-kit) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) - -## Introduction - -Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_. - -## Official Documentation - -Documentation can be found on the [Tiptap website](https://tiptap.dev). - -## License - -Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.cjs deleted file mode 100644 index 050df89..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.cjs +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - StarterKit: () => StarterKit, - default: () => index_default -}); -module.exports = __toCommonJS(index_exports); - -// src/starter-kit.ts -var import_core = require("@tiptap/core"); -var import_extension_blockquote = require("@tiptap/extension-blockquote"); -var import_extension_bold = require("@tiptap/extension-bold"); -var import_extension_code = require("@tiptap/extension-code"); -var import_extension_code_block = require("@tiptap/extension-code-block"); -var import_extension_document = require("@tiptap/extension-document"); -var import_extension_hard_break = require("@tiptap/extension-hard-break"); -var import_extension_heading = require("@tiptap/extension-heading"); -var import_extension_horizontal_rule = require("@tiptap/extension-horizontal-rule"); -var import_extension_italic = require("@tiptap/extension-italic"); -var import_extension_link = require("@tiptap/extension-link"); -var import_extension_list = require("@tiptap/extension-list"); -var import_extension_paragraph = require("@tiptap/extension-paragraph"); -var import_extension_strike = require("@tiptap/extension-strike"); -var import_extension_text = require("@tiptap/extension-text"); -var import_extension_underline = require("@tiptap/extension-underline"); -var import_extensions = require("@tiptap/extensions"); -var StarterKit = import_core.Extension.create({ - name: "starterKit", - addExtensions() { - var _a, _b, _c, _d; - const extensions = []; - if (this.options.bold !== false) { - extensions.push(import_extension_bold.Bold.configure(this.options.bold)); - } - if (this.options.blockquote !== false) { - extensions.push(import_extension_blockquote.Blockquote.configure(this.options.blockquote)); - } - if (this.options.bulletList !== false) { - extensions.push(import_extension_list.BulletList.configure(this.options.bulletList)); - } - if (this.options.code !== false) { - extensions.push(import_extension_code.Code.configure(this.options.code)); - } - if (this.options.codeBlock !== false) { - extensions.push(import_extension_code_block.CodeBlock.configure(this.options.codeBlock)); - } - if (this.options.document !== false) { - extensions.push(import_extension_document.Document.configure(this.options.document)); - } - if (this.options.dropcursor !== false) { - extensions.push(import_extensions.Dropcursor.configure(this.options.dropcursor)); - } - if (this.options.gapcursor !== false) { - extensions.push(import_extensions.Gapcursor.configure(this.options.gapcursor)); - } - if (this.options.hardBreak !== false) { - extensions.push(import_extension_hard_break.HardBreak.configure(this.options.hardBreak)); - } - if (this.options.heading !== false) { - extensions.push(import_extension_heading.Heading.configure(this.options.heading)); - } - if (this.options.undoRedo !== false) { - extensions.push(import_extensions.UndoRedo.configure(this.options.undoRedo)); - } - if (this.options.horizontalRule !== false) { - extensions.push(import_extension_horizontal_rule.HorizontalRule.configure(this.options.horizontalRule)); - } - if (this.options.italic !== false) { - extensions.push(import_extension_italic.Italic.configure(this.options.italic)); - } - if (this.options.listItem !== false) { - extensions.push(import_extension_list.ListItem.configure(this.options.listItem)); - } - if (this.options.listKeymap !== false) { - extensions.push(import_extension_list.ListKeymap.configure((_a = this.options) == null ? void 0 : _a.listKeymap)); - } - if (this.options.link !== false) { - extensions.push(import_extension_link.Link.configure((_b = this.options) == null ? void 0 : _b.link)); - } - if (this.options.orderedList !== false) { - extensions.push(import_extension_list.OrderedList.configure(this.options.orderedList)); - } - if (this.options.paragraph !== false) { - extensions.push(import_extension_paragraph.Paragraph.configure(this.options.paragraph)); - } - if (this.options.strike !== false) { - extensions.push(import_extension_strike.Strike.configure(this.options.strike)); - } - if (this.options.text !== false) { - extensions.push(import_extension_text.Text.configure(this.options.text)); - } - if (this.options.underline !== false) { - extensions.push(import_extension_underline.Underline.configure((_c = this.options) == null ? void 0 : _c.underline)); - } - if (this.options.trailingNode !== false) { - extensions.push(import_extensions.TrailingNode.configure((_d = this.options) == null ? void 0 : _d.trailingNode)); - } - return extensions; - } -}); - -// src/index.ts -var index_default = StarterKit; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - StarterKit -}); -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.cjs.map deleted file mode 100644 index 990d473..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/starter-kit.ts"],"sourcesContent":["import { StarterKit } from './starter-kit.js'\n\nexport type { StarterKitOptions } from './starter-kit.js'\nexport * from './starter-kit.js'\n\nexport default StarterKit\n","import { Extension } from '@tiptap/core'\nimport type { BlockquoteOptions } from '@tiptap/extension-blockquote'\nimport { Blockquote } from '@tiptap/extension-blockquote'\nimport type { BoldOptions } from '@tiptap/extension-bold'\nimport { Bold } from '@tiptap/extension-bold'\nimport type { CodeOptions } from '@tiptap/extension-code'\nimport { Code } from '@tiptap/extension-code'\nimport type { CodeBlockOptions } from '@tiptap/extension-code-block'\nimport { CodeBlock } from '@tiptap/extension-code-block'\nimport { Document } from '@tiptap/extension-document'\nimport type { HardBreakOptions } from '@tiptap/extension-hard-break'\nimport { HardBreak } from '@tiptap/extension-hard-break'\nimport type { HeadingOptions } from '@tiptap/extension-heading'\nimport { Heading } from '@tiptap/extension-heading'\nimport type { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule'\nimport { HorizontalRule } from '@tiptap/extension-horizontal-rule'\nimport type { ItalicOptions } from '@tiptap/extension-italic'\nimport { Italic } from '@tiptap/extension-italic'\nimport type { LinkOptions } from '@tiptap/extension-link'\nimport { Link } from '@tiptap/extension-link'\nimport type {\n BulletListOptions,\n ListItemOptions,\n ListKeymapOptions,\n OrderedListOptions,\n} from '@tiptap/extension-list'\nimport { BulletList, ListItem, ListKeymap, OrderedList } from '@tiptap/extension-list'\nimport type { ParagraphOptions } from '@tiptap/extension-paragraph'\nimport { Paragraph } from '@tiptap/extension-paragraph'\nimport type { StrikeOptions } from '@tiptap/extension-strike'\nimport { Strike } from '@tiptap/extension-strike'\nimport { Text } from '@tiptap/extension-text'\nimport type { UnderlineOptions } from '@tiptap/extension-underline'\nimport { Underline } from '@tiptap/extension-underline'\nimport type { DropcursorOptions, TrailingNodeOptions, UndoRedoOptions } from '@tiptap/extensions'\nimport { Dropcursor, Gapcursor, TrailingNode, UndoRedo } from '@tiptap/extensions'\n\nexport interface StarterKitOptions {\n /**\n * If set to false, the blockquote extension will not be registered\n * @example blockquote: false\n */\n blockquote: Partial | false\n\n /**\n * If set to false, the bold extension will not be registered\n * @example bold: false\n */\n bold: Partial | false\n\n /**\n * If set to false, the bulletList extension will not be registered\n * @example bulletList: false\n */\n bulletList: Partial | false\n\n /**\n * If set to false, the code extension will not be registered\n * @example code: false\n */\n code: Partial | false\n\n /**\n * If set to false, the codeBlock extension will not be registered\n * @example codeBlock: false\n */\n codeBlock: Partial | false\n\n /**\n * If set to false, the document extension will not be registered\n * @example document: false\n */\n document: false\n\n /**\n * If set to false, the dropcursor extension will not be registered\n * @example dropcursor: false\n */\n dropcursor: Partial | false\n\n /**\n * If set to false, the gapcursor extension will not be registered\n * @example gapcursor: false\n */\n gapcursor: false\n\n /**\n * If set to false, the hardBreak extension will not be registered\n * @example hardBreak: false\n */\n hardBreak: Partial | false\n\n /**\n * If set to false, the heading extension will not be registered\n * @example heading: false\n */\n heading: Partial | false\n\n /**\n * If set to false, the undo-redo extension will not be registered\n * @example undoRedo: false\n */\n undoRedo: Partial | false\n\n /**\n * If set to false, the horizontalRule extension will not be registered\n * @example horizontalRule: false\n */\n horizontalRule: Partial | false\n\n /**\n * If set to false, the italic extension will not be registered\n * @example italic: false\n */\n italic: Partial | false\n\n /**\n * If set to false, the listItem extension will not be registered\n * @example listItem: false\n */\n listItem: Partial | false\n\n /**\n * If set to false, the listItemKeymap extension will not be registered\n * @example listKeymap: false\n */\n listKeymap: Partial | false\n\n /**\n * If set to false, the link extension will not be registered\n * @example link: false\n */\n link: Partial | false\n\n /**\n * If set to false, the orderedList extension will not be registered\n * @example orderedList: false\n */\n orderedList: Partial | false\n\n /**\n * If set to false, the paragraph extension will not be registered\n * @example paragraph: false\n */\n paragraph: Partial | false\n\n /**\n * If set to false, the strike extension will not be registered\n * @example strike: false\n */\n strike: Partial | false\n\n /**\n * If set to false, the text extension will not be registered\n * @example text: false\n */\n text: false\n\n /**\n * If set to false, the underline extension will not be registered\n * @example underline: false\n */\n underline: Partial | false\n\n /**\n * If set to false, the trailingNode extension will not be registered\n * @example trailingNode: false\n */\n trailingNode: Partial | false\n}\n\n/**\n * The starter kit is a collection of essential editor extensions.\n *\n * It’s a good starting point for building your own editor.\n */\nexport const StarterKit = Extension.create({\n name: 'starterKit',\n\n addExtensions() {\n const extensions = []\n\n if (this.options.bold !== false) {\n extensions.push(Bold.configure(this.options.bold))\n }\n\n if (this.options.blockquote !== false) {\n extensions.push(Blockquote.configure(this.options.blockquote))\n }\n\n if (this.options.bulletList !== false) {\n extensions.push(BulletList.configure(this.options.bulletList))\n }\n\n if (this.options.code !== false) {\n extensions.push(Code.configure(this.options.code))\n }\n\n if (this.options.codeBlock !== false) {\n extensions.push(CodeBlock.configure(this.options.codeBlock))\n }\n\n if (this.options.document !== false) {\n extensions.push(Document.configure(this.options.document))\n }\n\n if (this.options.dropcursor !== false) {\n extensions.push(Dropcursor.configure(this.options.dropcursor))\n }\n\n if (this.options.gapcursor !== false) {\n extensions.push(Gapcursor.configure(this.options.gapcursor))\n }\n\n if (this.options.hardBreak !== false) {\n extensions.push(HardBreak.configure(this.options.hardBreak))\n }\n\n if (this.options.heading !== false) {\n extensions.push(Heading.configure(this.options.heading))\n }\n\n if (this.options.undoRedo !== false) {\n extensions.push(UndoRedo.configure(this.options.undoRedo))\n }\n\n if (this.options.horizontalRule !== false) {\n extensions.push(HorizontalRule.configure(this.options.horizontalRule))\n }\n\n if (this.options.italic !== false) {\n extensions.push(Italic.configure(this.options.italic))\n }\n\n if (this.options.listItem !== false) {\n extensions.push(ListItem.configure(this.options.listItem))\n }\n\n if (this.options.listKeymap !== false) {\n extensions.push(ListKeymap.configure(this.options?.listKeymap))\n }\n\n if (this.options.link !== false) {\n extensions.push(Link.configure(this.options?.link))\n }\n\n if (this.options.orderedList !== false) {\n extensions.push(OrderedList.configure(this.options.orderedList))\n }\n\n if (this.options.paragraph !== false) {\n extensions.push(Paragraph.configure(this.options.paragraph))\n }\n\n if (this.options.strike !== false) {\n extensions.push(Strike.configure(this.options.strike))\n }\n\n if (this.options.text !== false) {\n extensions.push(Text.configure(this.options.text))\n }\n\n if (this.options.underline !== false) {\n extensions.push(Underline.configure(this.options?.underline))\n }\n\n if (this.options.trailingNode !== false) {\n extensions.push(TrailingNode.configure(this.options?.trailingNode))\n }\n\n return extensions\n },\n})\n"],"mappings":";;;;;;;;;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Q,MAAM,CAAC;AAAA,IACvD;AAEA,QAAI,KAAK,QAAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,2BAAK,UAAU,KAAK,QAAQ,IAAI,CAAC;AAAA,IACnD;AAEA,QAAI,KAAK,QAAQ,cAAc,OAAO;AACpC,iBAAW,KAAK,qCAAU,WAAU,UAAK,YAAL,mBAAc,SAAS,CAAC;AAAA,IAC9D;AAEA,QAAI,KAAK,QAAQ,iBAAiB,OAAO;AACvC,iBAAW,KAAK,+BAAa,WAAU,UAAK,YAAL,mBAAc,YAAY,CAAC;AAAA,IACpE;AAEA,WAAO;AAAA,EACT;AACF,CAAC;;;AD3QD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.d.cts deleted file mode 100644 index a8ae44f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.d.cts +++ /dev/null @@ -1,136 +0,0 @@ -import { Extension } from '@tiptap/core'; -import { BlockquoteOptions } from '@tiptap/extension-blockquote'; -import { BoldOptions } from '@tiptap/extension-bold'; -import { CodeOptions } from '@tiptap/extension-code'; -import { CodeBlockOptions } from '@tiptap/extension-code-block'; -import { HardBreakOptions } from '@tiptap/extension-hard-break'; -import { HeadingOptions } from '@tiptap/extension-heading'; -import { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule'; -import { ItalicOptions } from '@tiptap/extension-italic'; -import { LinkOptions } from '@tiptap/extension-link'; -import { BulletListOptions, ListItemOptions, ListKeymapOptions, OrderedListOptions } from '@tiptap/extension-list'; -import { ParagraphOptions } from '@tiptap/extension-paragraph'; -import { StrikeOptions } from '@tiptap/extension-strike'; -import { UnderlineOptions } from '@tiptap/extension-underline'; -import { DropcursorOptions, UndoRedoOptions, TrailingNodeOptions } from '@tiptap/extensions'; - -interface StarterKitOptions { - /** - * If set to false, the blockquote extension will not be registered - * @example blockquote: false - */ - blockquote: Partial | false; - /** - * If set to false, the bold extension will not be registered - * @example bold: false - */ - bold: Partial | false; - /** - * If set to false, the bulletList extension will not be registered - * @example bulletList: false - */ - bulletList: Partial | false; - /** - * If set to false, the code extension will not be registered - * @example code: false - */ - code: Partial | false; - /** - * If set to false, the codeBlock extension will not be registered - * @example codeBlock: false - */ - codeBlock: Partial | false; - /** - * If set to false, the document extension will not be registered - * @example document: false - */ - document: false; - /** - * If set to false, the dropcursor extension will not be registered - * @example dropcursor: false - */ - dropcursor: Partial | false; - /** - * If set to false, the gapcursor extension will not be registered - * @example gapcursor: false - */ - gapcursor: false; - /** - * If set to false, the hardBreak extension will not be registered - * @example hardBreak: false - */ - hardBreak: Partial | false; - /** - * If set to false, the heading extension will not be registered - * @example heading: false - */ - heading: Partial | false; - /** - * If set to false, the undo-redo extension will not be registered - * @example undoRedo: false - */ - undoRedo: Partial | false; - /** - * If set to false, the horizontalRule extension will not be registered - * @example horizontalRule: false - */ - horizontalRule: Partial | false; - /** - * If set to false, the italic extension will not be registered - * @example italic: false - */ - italic: Partial | false; - /** - * If set to false, the listItem extension will not be registered - * @example listItem: false - */ - listItem: Partial | false; - /** - * If set to false, the listItemKeymap extension will not be registered - * @example listKeymap: false - */ - listKeymap: Partial | false; - /** - * If set to false, the link extension will not be registered - * @example link: false - */ - link: Partial | false; - /** - * If set to false, the orderedList extension will not be registered - * @example orderedList: false - */ - orderedList: Partial | false; - /** - * If set to false, the paragraph extension will not be registered - * @example paragraph: false - */ - paragraph: Partial | false; - /** - * If set to false, the strike extension will not be registered - * @example strike: false - */ - strike: Partial | false; - /** - * If set to false, the text extension will not be registered - * @example text: false - */ - text: false; - /** - * If set to false, the underline extension will not be registered - * @example underline: false - */ - underline: Partial | false; - /** - * If set to false, the trailingNode extension will not be registered - * @example trailingNode: false - */ - trailingNode: Partial | false; -} -/** - * The starter kit is a collection of essential editor extensions. - * - * It’s a good starting point for building your own editor. - */ -declare const StarterKit: Extension; - -export { StarterKit, type StarterKitOptions, StarterKit as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.d.ts deleted file mode 100644 index a8ae44f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.d.ts +++ /dev/null @@ -1,136 +0,0 @@ -import { Extension } from '@tiptap/core'; -import { BlockquoteOptions } from '@tiptap/extension-blockquote'; -import { BoldOptions } from '@tiptap/extension-bold'; -import { CodeOptions } from '@tiptap/extension-code'; -import { CodeBlockOptions } from '@tiptap/extension-code-block'; -import { HardBreakOptions } from '@tiptap/extension-hard-break'; -import { HeadingOptions } from '@tiptap/extension-heading'; -import { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule'; -import { ItalicOptions } from '@tiptap/extension-italic'; -import { LinkOptions } from '@tiptap/extension-link'; -import { BulletListOptions, ListItemOptions, ListKeymapOptions, OrderedListOptions } from '@tiptap/extension-list'; -import { ParagraphOptions } from '@tiptap/extension-paragraph'; -import { StrikeOptions } from '@tiptap/extension-strike'; -import { UnderlineOptions } from '@tiptap/extension-underline'; -import { DropcursorOptions, UndoRedoOptions, TrailingNodeOptions } from '@tiptap/extensions'; - -interface StarterKitOptions { - /** - * If set to false, the blockquote extension will not be registered - * @example blockquote: false - */ - blockquote: Partial | false; - /** - * If set to false, the bold extension will not be registered - * @example bold: false - */ - bold: Partial | false; - /** - * If set to false, the bulletList extension will not be registered - * @example bulletList: false - */ - bulletList: Partial | false; - /** - * If set to false, the code extension will not be registered - * @example code: false - */ - code: Partial | false; - /** - * If set to false, the codeBlock extension will not be registered - * @example codeBlock: false - */ - codeBlock: Partial | false; - /** - * If set to false, the document extension will not be registered - * @example document: false - */ - document: false; - /** - * If set to false, the dropcursor extension will not be registered - * @example dropcursor: false - */ - dropcursor: Partial | false; - /** - * If set to false, the gapcursor extension will not be registered - * @example gapcursor: false - */ - gapcursor: false; - /** - * If set to false, the hardBreak extension will not be registered - * @example hardBreak: false - */ - hardBreak: Partial | false; - /** - * If set to false, the heading extension will not be registered - * @example heading: false - */ - heading: Partial | false; - /** - * If set to false, the undo-redo extension will not be registered - * @example undoRedo: false - */ - undoRedo: Partial | false; - /** - * If set to false, the horizontalRule extension will not be registered - * @example horizontalRule: false - */ - horizontalRule: Partial | false; - /** - * If set to false, the italic extension will not be registered - * @example italic: false - */ - italic: Partial | false; - /** - * If set to false, the listItem extension will not be registered - * @example listItem: false - */ - listItem: Partial | false; - /** - * If set to false, the listItemKeymap extension will not be registered - * @example listKeymap: false - */ - listKeymap: Partial | false; - /** - * If set to false, the link extension will not be registered - * @example link: false - */ - link: Partial | false; - /** - * If set to false, the orderedList extension will not be registered - * @example orderedList: false - */ - orderedList: Partial | false; - /** - * If set to false, the paragraph extension will not be registered - * @example paragraph: false - */ - paragraph: Partial | false; - /** - * If set to false, the strike extension will not be registered - * @example strike: false - */ - strike: Partial | false; - /** - * If set to false, the text extension will not be registered - * @example text: false - */ - text: false; - /** - * If set to false, the underline extension will not be registered - * @example underline: false - */ - underline: Partial | false; - /** - * If set to false, the trailingNode extension will not be registered - * @example trailingNode: false - */ - trailingNode: Partial | false; -} -/** - * The starter kit is a collection of essential editor extensions. - * - * It’s a good starting point for building your own editor. - */ -declare const StarterKit: Extension; - -export { StarterKit, type StarterKitOptions, StarterKit as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.js deleted file mode 100644 index 97954c4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.js +++ /dev/null @@ -1,100 +0,0 @@ -// src/starter-kit.ts -import { Extension } from "@tiptap/core"; -import { Blockquote } from "@tiptap/extension-blockquote"; -import { Bold } from "@tiptap/extension-bold"; -import { Code } from "@tiptap/extension-code"; -import { CodeBlock } from "@tiptap/extension-code-block"; -import { Document } from "@tiptap/extension-document"; -import { HardBreak } from "@tiptap/extension-hard-break"; -import { Heading } from "@tiptap/extension-heading"; -import { HorizontalRule } from "@tiptap/extension-horizontal-rule"; -import { Italic } from "@tiptap/extension-italic"; -import { Link } from "@tiptap/extension-link"; -import { BulletList, ListItem, ListKeymap, OrderedList } from "@tiptap/extension-list"; -import { Paragraph } from "@tiptap/extension-paragraph"; -import { Strike } from "@tiptap/extension-strike"; -import { Text } from "@tiptap/extension-text"; -import { Underline } from "@tiptap/extension-underline"; -import { Dropcursor, Gapcursor, TrailingNode, UndoRedo } from "@tiptap/extensions"; -var StarterKit = Extension.create({ - name: "starterKit", - addExtensions() { - var _a, _b, _c, _d; - const extensions = []; - if (this.options.bold !== false) { - extensions.push(Bold.configure(this.options.bold)); - } - if (this.options.blockquote !== false) { - extensions.push(Blockquote.configure(this.options.blockquote)); - } - if (this.options.bulletList !== false) { - extensions.push(BulletList.configure(this.options.bulletList)); - } - if (this.options.code !== false) { - extensions.push(Code.configure(this.options.code)); - } - if (this.options.codeBlock !== false) { - extensions.push(CodeBlock.configure(this.options.codeBlock)); - } - if (this.options.document !== false) { - extensions.push(Document.configure(this.options.document)); - } - if (this.options.dropcursor !== false) { - extensions.push(Dropcursor.configure(this.options.dropcursor)); - } - if (this.options.gapcursor !== false) { - extensions.push(Gapcursor.configure(this.options.gapcursor)); - } - if (this.options.hardBreak !== false) { - extensions.push(HardBreak.configure(this.options.hardBreak)); - } - if (this.options.heading !== false) { - extensions.push(Heading.configure(this.options.heading)); - } - if (this.options.undoRedo !== false) { - extensions.push(UndoRedo.configure(this.options.undoRedo)); - } - if (this.options.horizontalRule !== false) { - extensions.push(HorizontalRule.configure(this.options.horizontalRule)); - } - if (this.options.italic !== false) { - extensions.push(Italic.configure(this.options.italic)); - } - if (this.options.listItem !== false) { - extensions.push(ListItem.configure(this.options.listItem)); - } - if (this.options.listKeymap !== false) { - extensions.push(ListKeymap.configure((_a = this.options) == null ? void 0 : _a.listKeymap)); - } - if (this.options.link !== false) { - extensions.push(Link.configure((_b = this.options) == null ? void 0 : _b.link)); - } - if (this.options.orderedList !== false) { - extensions.push(OrderedList.configure(this.options.orderedList)); - } - if (this.options.paragraph !== false) { - extensions.push(Paragraph.configure(this.options.paragraph)); - } - if (this.options.strike !== false) { - extensions.push(Strike.configure(this.options.strike)); - } - if (this.options.text !== false) { - extensions.push(Text.configure(this.options.text)); - } - if (this.options.underline !== false) { - extensions.push(Underline.configure((_c = this.options) == null ? void 0 : _c.underline)); - } - if (this.options.trailingNode !== false) { - extensions.push(TrailingNode.configure((_d = this.options) == null ? void 0 : _d.trailingNode)); - } - return extensions; - } -}); - -// src/index.ts -var index_default = StarterKit; -export { - StarterKit, - index_default as default -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.js.map deleted file mode 100644 index ffe0af9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/starter-kit.ts","../src/index.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport type { BlockquoteOptions } from '@tiptap/extension-blockquote'\nimport { Blockquote } from '@tiptap/extension-blockquote'\nimport type { BoldOptions } from '@tiptap/extension-bold'\nimport { Bold } from '@tiptap/extension-bold'\nimport type { CodeOptions } from '@tiptap/extension-code'\nimport { Code } from '@tiptap/extension-code'\nimport type { CodeBlockOptions } from '@tiptap/extension-code-block'\nimport { CodeBlock } from '@tiptap/extension-code-block'\nimport { Document } from '@tiptap/extension-document'\nimport type { HardBreakOptions } from '@tiptap/extension-hard-break'\nimport { HardBreak } from '@tiptap/extension-hard-break'\nimport type { HeadingOptions } from '@tiptap/extension-heading'\nimport { Heading } from '@tiptap/extension-heading'\nimport type { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule'\nimport { HorizontalRule } from '@tiptap/extension-horizontal-rule'\nimport type { ItalicOptions } from '@tiptap/extension-italic'\nimport { Italic } from '@tiptap/extension-italic'\nimport type { LinkOptions } from '@tiptap/extension-link'\nimport { Link } from '@tiptap/extension-link'\nimport type {\n BulletListOptions,\n ListItemOptions,\n ListKeymapOptions,\n OrderedListOptions,\n} from '@tiptap/extension-list'\nimport { BulletList, ListItem, ListKeymap, OrderedList } from '@tiptap/extension-list'\nimport type { ParagraphOptions } from '@tiptap/extension-paragraph'\nimport { Paragraph } from '@tiptap/extension-paragraph'\nimport type { StrikeOptions } from '@tiptap/extension-strike'\nimport { Strike } from '@tiptap/extension-strike'\nimport { Text } from '@tiptap/extension-text'\nimport type { UnderlineOptions } from '@tiptap/extension-underline'\nimport { Underline } from '@tiptap/extension-underline'\nimport type { DropcursorOptions, TrailingNodeOptions, UndoRedoOptions } from '@tiptap/extensions'\nimport { Dropcursor, Gapcursor, TrailingNode, UndoRedo } from '@tiptap/extensions'\n\nexport interface StarterKitOptions {\n /**\n * If set to false, the blockquote extension will not be registered\n * @example blockquote: false\n */\n blockquote: Partial | false\n\n /**\n * If set to false, the bold extension will not be registered\n * @example bold: false\n */\n bold: Partial | false\n\n /**\n * If set to false, the bulletList extension will not be registered\n * @example bulletList: false\n */\n bulletList: Partial | false\n\n /**\n * If set to false, the code extension will not be registered\n * @example code: false\n */\n code: Partial | false\n\n /**\n * If set to false, the codeBlock extension will not be registered\n * @example codeBlock: false\n */\n codeBlock: Partial | false\n\n /**\n * If set to false, the document extension will not be registered\n * @example document: false\n */\n document: false\n\n /**\n * If set to false, the dropcursor extension will not be registered\n * @example dropcursor: false\n */\n dropcursor: Partial | false\n\n /**\n * If set to false, the gapcursor extension will not be registered\n * @example gapcursor: false\n */\n gapcursor: false\n\n /**\n * If set to false, the hardBreak extension will not be registered\n * @example hardBreak: false\n */\n hardBreak: Partial | false\n\n /**\n * If set to false, the heading extension will not be registered\n * @example heading: false\n */\n heading: Partial | false\n\n /**\n * If set to false, the undo-redo extension will not be registered\n * @example undoRedo: false\n */\n undoRedo: Partial | false\n\n /**\n * If set to false, the horizontalRule extension will not be registered\n * @example horizontalRule: false\n */\n horizontalRule: Partial | false\n\n /**\n * If set to false, the italic extension will not be registered\n * @example italic: false\n */\n italic: Partial | false\n\n /**\n * If set to false, the listItem extension will not be registered\n * @example listItem: false\n */\n listItem: Partial | false\n\n /**\n * If set to false, the listItemKeymap extension will not be registered\n * @example listKeymap: false\n */\n listKeymap: Partial | false\n\n /**\n * If set to false, the link extension will not be registered\n * @example link: false\n */\n link: Partial | false\n\n /**\n * If set to false, the orderedList extension will not be registered\n * @example orderedList: false\n */\n orderedList: Partial | false\n\n /**\n * If set to false, the paragraph extension will not be registered\n * @example paragraph: false\n */\n paragraph: Partial | false\n\n /**\n * If set to false, the strike extension will not be registered\n * @example strike: false\n */\n strike: Partial | false\n\n /**\n * If set to false, the text extension will not be registered\n * @example text: false\n */\n text: false\n\n /**\n * If set to false, the underline extension will not be registered\n * @example underline: false\n */\n underline: Partial | false\n\n /**\n * If set to false, the trailingNode extension will not be registered\n * @example trailingNode: false\n */\n trailingNode: Partial | false\n}\n\n/**\n * The starter kit is a collection of essential editor extensions.\n *\n * It’s a good starting point for building your own editor.\n */\nexport const StarterKit = Extension.create({\n name: 'starterKit',\n\n addExtensions() {\n const extensions = []\n\n if (this.options.bold !== false) {\n extensions.push(Bold.configure(this.options.bold))\n }\n\n if (this.options.blockquote !== false) {\n extensions.push(Blockquote.configure(this.options.blockquote))\n }\n\n if (this.options.bulletList !== false) {\n extensions.push(BulletList.configure(this.options.bulletList))\n }\n\n if (this.options.code !== false) {\n extensions.push(Code.configure(this.options.code))\n }\n\n if (this.options.codeBlock !== false) {\n extensions.push(CodeBlock.configure(this.options.codeBlock))\n }\n\n if (this.options.document !== false) {\n extensions.push(Document.configure(this.options.document))\n }\n\n if (this.options.dropcursor !== false) {\n extensions.push(Dropcursor.configure(this.options.dropcursor))\n }\n\n if (this.options.gapcursor !== false) {\n extensions.push(Gapcursor.configure(this.options.gapcursor))\n }\n\n if (this.options.hardBreak !== false) {\n extensions.push(HardBreak.configure(this.options.hardBreak))\n }\n\n if (this.options.heading !== false) {\n extensions.push(Heading.configure(this.options.heading))\n }\n\n if (this.options.undoRedo !== false) {\n extensions.push(UndoRedo.configure(this.options.undoRedo))\n }\n\n if (this.options.horizontalRule !== false) {\n extensions.push(HorizontalRule.configure(this.options.horizontalRule))\n }\n\n if (this.options.italic !== false) {\n extensions.push(Italic.configure(this.options.italic))\n }\n\n if (this.options.listItem !== false) {\n extensions.push(ListItem.configure(this.options.listItem))\n }\n\n if (this.options.listKeymap !== false) {\n extensions.push(ListKeymap.configure(this.options?.listKeymap))\n }\n\n if (this.options.link !== false) {\n extensions.push(Link.configure(this.options?.link))\n }\n\n if (this.options.orderedList !== false) {\n extensions.push(OrderedList.configure(this.options.orderedList))\n }\n\n if (this.options.paragraph !== false) {\n extensions.push(Paragraph.configure(this.options.paragraph))\n }\n\n if (this.options.strike !== false) {\n extensions.push(Strike.configure(this.options.strike))\n }\n\n if (this.options.text !== false) {\n extensions.push(Text.configure(this.options.text))\n }\n\n if (this.options.underline !== false) {\n extensions.push(Underline.configure(this.options?.underline))\n }\n\n if (this.options.trailingNode !== false) {\n extensions.push(TrailingNode.configure(this.options?.trailingNode))\n }\n\n return extensions\n },\n})\n","import { StarterKit } from './starter-kit.js'\n\nexport type { StarterKitOptions } from './starter-kit.js'\nexport * from './starter-kit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EA,QAAI,KAAK,QAAQ,WAAW,OAAO;AACjC,iBAAW,KAAK,OAAO,UAAU,KAAK,QAAQ,MAAM,CAAC;AAAA,IACvD;AAEA,QAAI,KAAK,QAAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,KAAK,UAAU,KAAK,QAAQ,IAAI,CAAC;AAAA,IACnD;AAEA,QAAI,KAAK,QAAQ,cAAc,OAAO;AACpC,iBAAW,KAAK,UAAU,WAAU,UAAK,YAAL,mBAAc,SAAS,CAAC;AAAA,IAC9D;AAEA,QAAI,KAAK,QAAQ,iBAAiB,OAAO;AACvC,iBAAW,KAAK,aAAa,WAAU,UAAK,YAAL,mBAAc,YAAY,CAAC;AAAA,IACpE;AAEA,WAAO;AAAA,EACT;AACF,CAAC;;;AC3QD,IAAO,gBAAQ;","names":[]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/package.json b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/package.json deleted file mode 100644 index 3690c64..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "@tiptap/starter-kit", - "version": "3.26.0", - "description": "starter kit for tiptap", - "keywords": [ - "tiptap", - "tiptap starter kit" - ], - "homepage": "https://tiptap.dev", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/starter-kit" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "files": [ - "src", - "dist" - ], - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "types": { - "import": "./dist/index.d.ts", - "require": "./dist/index.d.cts" - }, - "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "dependencies": { - "@tiptap/core": "^3.26.0", - "@tiptap/extension-blockquote": "^3.26.0", - "@tiptap/extension-bold": "^3.26.0", - "@tiptap/extension-bullet-list": "^3.26.0", - "@tiptap/extension-code": "^3.26.0", - "@tiptap/extension-code-block": "^3.26.0", - "@tiptap/extension-document": "^3.26.0", - "@tiptap/extension-dropcursor": "^3.26.0", - "@tiptap/extension-gapcursor": "^3.26.0", - "@tiptap/extension-hard-break": "^3.26.0", - "@tiptap/extension-heading": "^3.26.0", - "@tiptap/extension-horizontal-rule": "^3.26.0", - "@tiptap/extension-italic": "^3.26.0", - "@tiptap/extension-link": "^3.26.0", - "@tiptap/extension-list": "^3.26.0", - "@tiptap/extension-list-item": "^3.26.0", - "@tiptap/extension-list-keymap": "^3.26.0", - "@tiptap/extension-ordered-list": "^3.26.0", - "@tiptap/extension-paragraph": "^3.26.0", - "@tiptap/extension-strike": "^3.26.0", - "@tiptap/extension-text": "^3.26.0", - "@tiptap/extension-underline": "^3.26.0", - "@tiptap/extensions": "^3.26.0", - "@tiptap/pm": "^3.26.0" - }, - "scripts": { - "build": "tsup" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/src/index.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/src/index.ts deleted file mode 100644 index 13c6684..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { StarterKit } from './starter-kit.js' - -export type { StarterKitOptions } from './starter-kit.js' -export * from './starter-kit.js' - -export default StarterKit diff --git a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/src/starter-kit.ts b/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/src/starter-kit.ts deleted file mode 100644 index 528a16a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tiptap+starter-kit@3.26.0/node_modules/@tiptap/starter-kit/src/starter-kit.ts +++ /dev/null @@ -1,273 +0,0 @@ -import { Extension } from '@tiptap/core' -import type { BlockquoteOptions } from '@tiptap/extension-blockquote' -import { Blockquote } from '@tiptap/extension-blockquote' -import type { BoldOptions } from '@tiptap/extension-bold' -import { Bold } from '@tiptap/extension-bold' -import type { CodeOptions } from '@tiptap/extension-code' -import { Code } from '@tiptap/extension-code' -import type { CodeBlockOptions } from '@tiptap/extension-code-block' -import { CodeBlock } from '@tiptap/extension-code-block' -import { Document } from '@tiptap/extension-document' -import type { HardBreakOptions } from '@tiptap/extension-hard-break' -import { HardBreak } from '@tiptap/extension-hard-break' -import type { HeadingOptions } from '@tiptap/extension-heading' -import { Heading } from '@tiptap/extension-heading' -import type { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule' -import { HorizontalRule } from '@tiptap/extension-horizontal-rule' -import type { ItalicOptions } from '@tiptap/extension-italic' -import { Italic } from '@tiptap/extension-italic' -import type { LinkOptions } from '@tiptap/extension-link' -import { Link } from '@tiptap/extension-link' -import type { - BulletListOptions, - ListItemOptions, - ListKeymapOptions, - OrderedListOptions, -} from '@tiptap/extension-list' -import { BulletList, ListItem, ListKeymap, OrderedList } from '@tiptap/extension-list' -import type { ParagraphOptions } from '@tiptap/extension-paragraph' -import { Paragraph } from '@tiptap/extension-paragraph' -import type { StrikeOptions } from '@tiptap/extension-strike' -import { Strike } from '@tiptap/extension-strike' -import { Text } from '@tiptap/extension-text' -import type { UnderlineOptions } from '@tiptap/extension-underline' -import { Underline } from '@tiptap/extension-underline' -import type { DropcursorOptions, TrailingNodeOptions, UndoRedoOptions } from '@tiptap/extensions' -import { Dropcursor, Gapcursor, TrailingNode, UndoRedo } from '@tiptap/extensions' - -export interface StarterKitOptions { - /** - * If set to false, the blockquote extension will not be registered - * @example blockquote: false - */ - blockquote: Partial | false - - /** - * If set to false, the bold extension will not be registered - * @example bold: false - */ - bold: Partial | false - - /** - * If set to false, the bulletList extension will not be registered - * @example bulletList: false - */ - bulletList: Partial | false - - /** - * If set to false, the code extension will not be registered - * @example code: false - */ - code: Partial | false - - /** - * If set to false, the codeBlock extension will not be registered - * @example codeBlock: false - */ - codeBlock: Partial | false - - /** - * If set to false, the document extension will not be registered - * @example document: false - */ - document: false - - /** - * If set to false, the dropcursor extension will not be registered - * @example dropcursor: false - */ - dropcursor: Partial | false - - /** - * If set to false, the gapcursor extension will not be registered - * @example gapcursor: false - */ - gapcursor: false - - /** - * If set to false, the hardBreak extension will not be registered - * @example hardBreak: false - */ - hardBreak: Partial | false - - /** - * If set to false, the heading extension will not be registered - * @example heading: false - */ - heading: Partial | false - - /** - * If set to false, the undo-redo extension will not be registered - * @example undoRedo: false - */ - undoRedo: Partial | false - - /** - * If set to false, the horizontalRule extension will not be registered - * @example horizontalRule: false - */ - horizontalRule: Partial | false - - /** - * If set to false, the italic extension will not be registered - * @example italic: false - */ - italic: Partial | false - - /** - * If set to false, the listItem extension will not be registered - * @example listItem: false - */ - listItem: Partial | false - - /** - * If set to false, the listItemKeymap extension will not be registered - * @example listKeymap: false - */ - listKeymap: Partial | false - - /** - * If set to false, the link extension will not be registered - * @example link: false - */ - link: Partial | false - - /** - * If set to false, the orderedList extension will not be registered - * @example orderedList: false - */ - orderedList: Partial | false - - /** - * If set to false, the paragraph extension will not be registered - * @example paragraph: false - */ - paragraph: Partial | false - - /** - * If set to false, the strike extension will not be registered - * @example strike: false - */ - strike: Partial | false - - /** - * If set to false, the text extension will not be registered - * @example text: false - */ - text: false - - /** - * If set to false, the underline extension will not be registered - * @example underline: false - */ - underline: Partial | false - - /** - * If set to false, the trailingNode extension will not be registered - * @example trailingNode: false - */ - trailingNode: Partial | false -} - -/** - * The starter kit is a collection of essential editor extensions. - * - * It’s a good starting point for building your own editor. - */ -export const StarterKit = Extension.create({ - name: 'starterKit', - - addExtensions() { - const extensions = [] - - if (this.options.bold !== false) { - extensions.push(Bold.configure(this.options.bold)) - } - - if (this.options.blockquote !== false) { - extensions.push(Blockquote.configure(this.options.blockquote)) - } - - if (this.options.bulletList !== false) { - extensions.push(BulletList.configure(this.options.bulletList)) - } - - if (this.options.code !== false) { - extensions.push(Code.configure(this.options.code)) - } - - if (this.options.codeBlock !== false) { - extensions.push(CodeBlock.configure(this.options.codeBlock)) - } - - if (this.options.document !== false) { - extensions.push(Document.configure(this.options.document)) - } - - if (this.options.dropcursor !== false) { - extensions.push(Dropcursor.configure(this.options.dropcursor)) - } - - if (this.options.gapcursor !== false) { - extensions.push(Gapcursor.configure(this.options.gapcursor)) - } - - if (this.options.hardBreak !== false) { - extensions.push(HardBreak.configure(this.options.hardBreak)) - } - - if (this.options.heading !== false) { - extensions.push(Heading.configure(this.options.heading)) - } - - if (this.options.undoRedo !== false) { - extensions.push(UndoRedo.configure(this.options.undoRedo)) - } - - if (this.options.horizontalRule !== false) { - extensions.push(HorizontalRule.configure(this.options.horizontalRule)) - } - - if (this.options.italic !== false) { - extensions.push(Italic.configure(this.options.italic)) - } - - if (this.options.listItem !== false) { - extensions.push(ListItem.configure(this.options.listItem)) - } - - if (this.options.listKeymap !== false) { - extensions.push(ListKeymap.configure(this.options?.listKeymap)) - } - - if (this.options.link !== false) { - extensions.push(Link.configure(this.options?.link)) - } - - if (this.options.orderedList !== false) { - extensions.push(OrderedList.configure(this.options.orderedList)) - } - - if (this.options.paragraph !== false) { - extensions.push(Paragraph.configure(this.options.paragraph)) - } - - if (this.options.strike !== false) { - extensions.push(Strike.configure(this.options.strike)) - } - - if (this.options.text !== false) { - extensions.push(Text.configure(this.options.text)) - } - - if (this.options.underline !== false) { - extensions.push(Underline.configure(this.options?.underline)) - } - - if (this.options.trailingNode !== false) { - extensions.push(TrailingNode.configure(this.options?.trailingNode)) - } - - return extensions - }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.d.ts deleted file mode 100644 index a7efe94..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { EventEmitter } from 'events'; -declare function once(emitter: EventEmitter, name: string): once.CancelablePromise; -declare namespace once { - interface CancelFunction { - (): void; - } - interface CancelablePromise extends Promise { - cancel: CancelFunction; - } - type CancellablePromise = CancelablePromise; - function spread(emitter: EventEmitter, name: string): once.CancelablePromise; -} -export = once; diff --git a/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js b/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js deleted file mode 100644 index bfd0dc8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -function noop() { } -function once(emitter, name) { - const o = once.spread(emitter, name); - const r = o.then((args) => args[0]); - r.cancel = o.cancel; - return r; -} -(function (once) { - function spread(emitter, name) { - let c = null; - const p = new Promise((resolve, reject) => { - function cancel() { - emitter.removeListener(name, onEvent); - emitter.removeListener('error', onError); - p.cancel = noop; - } - function onEvent(...args) { - cancel(); - resolve(args); - } - function onError(err) { - cancel(); - reject(err); - } - c = cancel; - emitter.on(name, onEvent); - emitter.on('error', onError); - }); - if (!c) { - throw new TypeError('Could not get `cancel()` function'); - } - p.cancel = c; - return p; - } - once.spread = spread; -})(once || (once = {})); -module.exports = once; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js.map deleted file mode 100644 index 30d2049..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,SAAS,IAAI,KAAI,CAAC;AAElB,SAAS,IAAI,CACZ,OAAqB,EACrB,IAAY;IAEZ,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAM,OAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAA8B,CAAC;IACtE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACpB,OAAO,CAAC,CAAC;AACV,CAAC;AAED,WAAU,IAAI;IAWb,SAAgB,MAAM,CACrB,OAAqB,EACrB,IAAY;QAEZ,IAAI,CAAC,GAA+B,IAAI,CAAC;QACzC,MAAM,CAAC,GAAG,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5C,SAAS,MAAM;gBACd,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;gBACtC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBACzC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;YACjB,CAAC;YACD,SAAS,OAAO,CAAC,GAAG,IAAW;gBAC9B,MAAM,EAAE,CAAC;gBACT,OAAO,CAAC,IAAS,CAAC,CAAC;YACpB,CAAC;YACD,SAAS,OAAO,CAAC,GAAU;gBAC1B,MAAM,EAAE,CAAC;gBACT,MAAM,CAAC,GAAG,CAAC,CAAC;YACb,CAAC;YACD,CAAC,GAAG,MAAM,CAAC;YACX,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC1B,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9B,CAAC,CAA8B,CAAC;QAChC,IAAI,CAAC,CAAC,EAAE;YACP,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;SACzD;QACD,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACb,OAAO,CAAC,CAAC;IACV,CAAC;IA5Be,WAAM,SA4BrB,CAAA;AACF,CAAC,EAxCS,IAAI,KAAJ,IAAI,QAwCb;AAED,iBAAS,IAAI,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/package.json b/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/package.json deleted file mode 100644 index 8343f9f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "@tootallnate/once", - "version": "1.1.2", - "description": "Creates a Promise that waits for a single event", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "test": "mocha --reporter spec", - "test-lint": "eslint src --ext .js,.ts", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/once.git" - }, - "keywords": [], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/once/issues" - }, - "devDependencies": { - "@types/node": "^12.12.11", - "@typescript-eslint/eslint-plugin": "1.6.0", - "@typescript-eslint/parser": "1.1.0", - "eslint": "5.16.0", - "eslint-config-airbnb": "17.1.0", - "eslint-config-prettier": "4.1.0", - "eslint-import-resolver-typescript": "1.1.1", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-jsx-a11y": "6.2.1", - "eslint-plugin-react": "7.12.4", - "mocha": "^6.2.2", - "rimraf": "^3.0.0", - "typescript": "^3.7.3" - }, - "engines": { - "node": ">= 6" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/LICENSE b/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/LICENSE deleted file mode 100644 index 9bcfa9d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/LICENSE +++ /dev/null @@ -1,46 +0,0 @@ -This software is dual-licensed under the ISC and MIT licenses. -You may use this software under EITHER of the following licenses. - ----------- - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ----------- - -Copyright Isaac Z. Schlueter and Contributors -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/README.md b/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/README.md deleted file mode 100644 index 99746fe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# abbrev-js - -Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). - -Usage: - - var abbrev = require("abbrev"); - abbrev("foo", "fool", "folding", "flop"); - - // returns: - { fl: 'flop' - , flo: 'flop' - , flop: 'flop' - , fol: 'folding' - , fold: 'folding' - , foldi: 'folding' - , foldin: 'folding' - , folding: 'folding' - , foo: 'foo' - , fool: 'fool' - } - -This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/abbrev.js b/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/abbrev.js deleted file mode 100644 index 7b1dc5d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/abbrev.js +++ /dev/null @@ -1,61 +0,0 @@ -module.exports = exports = abbrev.abbrev = abbrev - -abbrev.monkeyPatch = monkeyPatch - -function monkeyPatch () { - Object.defineProperty(Array.prototype, 'abbrev', { - value: function () { return abbrev(this) }, - enumerable: false, configurable: true, writable: true - }) - - Object.defineProperty(Object.prototype, 'abbrev', { - value: function () { return abbrev(Object.keys(this)) }, - enumerable: false, configurable: true, writable: true - }) -} - -function abbrev (list) { - if (arguments.length !== 1 || !Array.isArray(list)) { - list = Array.prototype.slice.call(arguments, 0) - } - for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { - args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) - } - - // sort them lexicographically, so that they're next to their nearest kin - args = args.sort(lexSort) - - // walk through each, seeing how much it has in common with the next and previous - var abbrevs = {} - , prev = "" - for (var i = 0, l = args.length ; i < l ; i ++) { - var current = args[i] - , next = args[i + 1] || "" - , nextMatches = true - , prevMatches = true - if (current === next) continue - for (var j = 0, cl = current.length ; j < cl ; j ++) { - var curChar = current.charAt(j) - nextMatches = nextMatches && curChar === next.charAt(j) - prevMatches = prevMatches && curChar === prev.charAt(j) - if (!nextMatches && !prevMatches) { - j ++ - break - } - } - prev = current - if (j === cl) { - abbrevs[current] = current - continue - } - for (var a = current.substr(0, j) ; j <= cl ; j ++) { - abbrevs[a] = current - a += current.charAt(j) - } - } - return abbrevs -} - -function lexSort (a, b) { - return a === b ? 0 : a > b ? 1 : -1 -} diff --git a/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/package.json b/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/package.json deleted file mode 100644 index bf4e801..0000000 --- a/services/hocuspocus/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "abbrev", - "version": "1.1.1", - "description": "Like ruby's abbrev module, but in js", - "author": "Isaac Z. Schlueter ", - "main": "abbrev.js", - "scripts": { - "test": "tap test.js --100", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "repository": "http://github.com/isaacs/abbrev-js", - "license": "ISC", - "devDependencies": { - "tap": "^10.1" - }, - "files": [ - "abbrev.js" - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/README.md b/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/README.md deleted file mode 100644 index 256f1f3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/README.md +++ /dev/null @@ -1,145 +0,0 @@ -agent-base -========== -### Turn a function into an [`http.Agent`][http.Agent] instance -[![Build Status](https://github.com/TooTallNate/node-agent-base/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-agent-base/actions?workflow=Node+CI) - -This module provides an `http.Agent` generator. That is, you pass it an async -callback function, and it returns a new `http.Agent` instance that will invoke the -given callback function when sending outbound HTTP requests. - -#### Some subclasses: - -Here's some more interesting uses of `agent-base`. -Send a pull request to list yours! - - * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints - * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints - * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS - * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS - - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install agent-base -``` - - -Example -------- - -Here's a minimal example that creates a new `net.Socket` connection to the server -for every HTTP request (i.e. the equivalent of `agent: false` option): - -```js -var net = require('net'); -var tls = require('tls'); -var url = require('url'); -var http = require('http'); -var agent = require('agent-base'); - -var endpoint = 'http://nodejs.org/api/'; -var parsed = url.parse(endpoint); - -// This is the important part! -parsed.agent = agent(function (req, opts) { - var socket; - // `secureEndpoint` is true when using the https module - if (opts.secureEndpoint) { - socket = tls.connect(opts); - } else { - socket = net.connect(opts); - } - return socket; -}); - -// Everything else works just like normal... -http.get(parsed, function (res) { - console.log('"response" event!', res.headers); - res.pipe(process.stdout); -}); -``` - -Returning a Promise or using an `async` function is also supported: - -```js -agent(async function (req, opts) { - await sleep(1000); - // etc… -}); -``` - -Return another `http.Agent` instance to "pass through" the responsibility -for that HTTP request to that agent: - -```js -agent(function (req, opts) { - return opts.secureEndpoint ? https.globalAgent : http.globalAgent; -}); -``` - - -API ---- - -## Agent(Function callback[, Object options]) → [http.Agent][] - -Creates a base `http.Agent` that will execute the callback function `callback` -for every HTTP request that it is used as the `agent` for. The callback function -is responsible for creating a `stream.Duplex` instance of some kind that will be -used as the underlying socket in the HTTP request. - -The `options` object accepts the following properties: - - * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional). - -The callback function should have the following signature: - -### callback(http.ClientRequest req, Object options, Function cb) → undefined - -The ClientRequest `req` can be accessed to read request headers and -and the path, etc. The `options` object contains the options passed -to the `http.request()`/`https.request()` function call, and is formatted -to be directly passed to `net.connect()`/`tls.connect()`, or however -else you want a Socket to be created. Pass the created socket to -the callback function `cb` once created, and the HTTP request will -continue to proceed. - -If the `https` module is used to invoke the HTTP request, then the -`secureEndpoint` property on `options` _will be set to `true`_. - - -License -------- - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent -[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent -[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent -[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent -[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent diff --git a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.d.ts b/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.d.ts deleted file mode 100644 index bc4ab74..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -/// -import net from 'net'; -import http from 'http'; -import https from 'https'; -import { Duplex } from 'stream'; -import { EventEmitter } from 'events'; -declare function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent; -declare function createAgent(callback: createAgent.AgentCallback, opts?: createAgent.AgentOptions): createAgent.Agent; -declare namespace createAgent { - interface ClientRequest extends http.ClientRequest { - _last?: boolean; - _hadError?: boolean; - method: string; - } - interface AgentRequestOptions { - host?: string; - path?: string; - port: number; - } - interface HttpRequestOptions extends AgentRequestOptions, Omit { - secureEndpoint: false; - } - interface HttpsRequestOptions extends AgentRequestOptions, Omit { - secureEndpoint: true; - } - type RequestOptions = HttpRequestOptions | HttpsRequestOptions; - type AgentLike = Pick | http.Agent; - type AgentCallbackReturn = Duplex | AgentLike; - type AgentCallbackCallback = (err?: Error | null, socket?: createAgent.AgentCallbackReturn) => void; - type AgentCallbackPromise = (req: createAgent.ClientRequest, opts: createAgent.RequestOptions) => createAgent.AgentCallbackReturn | Promise; - type AgentCallback = typeof Agent.prototype.callback; - type AgentOptions = { - timeout?: number; - }; - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - class Agent extends EventEmitter { - timeout: number | null; - maxFreeSockets: number; - maxTotalSockets: number; - maxSockets: number; - sockets: { - [key: string]: net.Socket[]; - }; - freeSockets: { - [key: string]: net.Socket[]; - }; - requests: { - [key: string]: http.IncomingMessage[]; - }; - options: https.AgentOptions; - private promisifiedCallback?; - private explicitDefaultPort?; - private explicitProtocol?; - constructor(callback?: createAgent.AgentCallback | createAgent.AgentOptions, _opts?: createAgent.AgentOptions); - get defaultPort(): number; - set defaultPort(v: number); - get protocol(): string; - set protocol(v: string); - callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions, fn: createAgent.AgentCallbackCallback): void; - callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions): createAgent.AgentCallbackReturn | Promise; - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req: ClientRequest, _opts: RequestOptions): void; - freeSocket(socket: net.Socket, opts: AgentOptions): void; - destroy(): void; - } -} -export = createAgent; diff --git a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js b/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js deleted file mode 100644 index bfd9e22..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js +++ /dev/null @@ -1,203 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const events_1 = require("events"); -const debug_1 = __importDefault(require("debug")); -const promisify_1 = __importDefault(require("./promisify")); -const debug = debug_1.default('agent-base'); -function isAgent(v) { - return Boolean(v) && typeof v.addRequest === 'function'; -} -function isSecureEndpoint() { - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); -} -function createAgent(callback, opts) { - return new createAgent.Agent(callback, opts); -} -(function (createAgent) { - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - class Agent extends events_1.EventEmitter { - constructor(callback, _opts) { - super(); - let opts = _opts; - if (typeof callback === 'function') { - this.callback = callback; - } - else if (callback) { - opts = callback; - } - // Timeout for the socket to be returned from the callback - this.timeout = null; - if (opts && typeof opts.timeout === 'number') { - this.timeout = opts.timeout; - } - // These aren't actually used by `agent-base`, but are required - // for the TypeScript definition files in `@types/node` :/ - this.maxFreeSockets = 1; - this.maxSockets = 1; - this.maxTotalSockets = Infinity; - this.sockets = {}; - this.freeSockets = {}; - this.requests = {}; - this.options = {}; - } - get defaultPort() { - if (typeof this.explicitDefaultPort === 'number') { - return this.explicitDefaultPort; - } - return isSecureEndpoint() ? 443 : 80; - } - set defaultPort(v) { - this.explicitDefaultPort = v; - } - get protocol() { - if (typeof this.explicitProtocol === 'string') { - return this.explicitProtocol; - } - return isSecureEndpoint() ? 'https:' : 'http:'; - } - set protocol(v) { - this.explicitProtocol = v; - } - callback(req, opts, fn) { - throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); - } - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req, _opts) { - const opts = Object.assign({}, _opts); - if (typeof opts.secureEndpoint !== 'boolean') { - opts.secureEndpoint = isSecureEndpoint(); - } - if (opts.host == null) { - opts.host = 'localhost'; - } - if (opts.port == null) { - opts.port = opts.secureEndpoint ? 443 : 80; - } - if (opts.protocol == null) { - opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; - } - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most - // likely the result of a `url.parse()` call... we need to - // remove the `path` portion so that `net.connect()` doesn't - // attempt to open that as a unix socket file. - delete opts.path; - } - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - let timedOut = false; - let timeoutId = null; - const timeoutMs = opts.timeout || this.timeout; - const onerror = (err) => { - if (req._hadError) - return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - }; - const ontimeout = () => { - timeoutId = null; - timedOut = true; - const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); - err.code = 'ETIMEOUT'; - onerror(err); - }; - const callbackError = (err) => { - if (timedOut) - return; - if (timeoutId !== null) { - clearTimeout(timeoutId); - timeoutId = null; - } - onerror(err); - }; - const onsocket = (socket) => { - if (timedOut) - return; - if (timeoutId != null) { - clearTimeout(timeoutId); - timeoutId = null; - } - if (isAgent(socket)) { - // `socket` is actually an `http.Agent` instance, so - // relinquish responsibility for this `req` to the Agent - // from here on - debug('Callback returned another Agent instance %o', socket.constructor.name); - socket.addRequest(req, opts); - return; - } - if (socket) { - socket.once('free', () => { - this.freeSocket(socket, opts); - }); - req.onSocket(socket); - return; - } - const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); - onerror(err); - }; - if (typeof this.callback !== 'function') { - onerror(new Error('`callback` is not defined')); - return; - } - if (!this.promisifiedCallback) { - if (this.callback.length >= 3) { - debug('Converting legacy callback function to promise'); - this.promisifiedCallback = promisify_1.default(this.callback); - } - else { - this.promisifiedCallback = this.callback; - } - } - if (typeof timeoutMs === 'number' && timeoutMs > 0) { - timeoutId = setTimeout(ontimeout, timeoutMs); - } - if ('port' in opts && typeof opts.port !== 'number') { - opts.port = Number(opts.port); - } - try { - debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`); - Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); - } - catch (err) { - Promise.reject(err).catch(callbackError); - } - } - freeSocket(socket, opts) { - debug('Freeing socket %o %o', socket.constructor.name, opts); - socket.destroy(); - } - destroy() { - debug('Destroying agent %o', this.constructor.name); - } - } - createAgent.Agent = Agent; - // So that `instanceof` works correctly - createAgent.prototype = createAgent.Agent.prototype; -})(createAgent || (createAgent = {})); -module.exports = createAgent; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js.map b/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js.map deleted file mode 100644 index bd118ab..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAIA,mCAAsC;AACtC,kDAAgC;AAChC,4DAAoC;AAEpC,MAAM,KAAK,GAAG,eAAW,CAAC,YAAY,CAAC,CAAC;AAExC,SAAS,OAAO,CAAC,CAAM;IACtB,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC;AACzD,CAAC;AAED,SAAS,gBAAgB;IACxB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,CAAC;IAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,IAAK,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACxG,CAAC;AAOD,SAAS,WAAW,CACnB,QAA+D,EAC/D,IAA+B;IAE/B,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,WAAU,WAAW;IAmDpB;;;;;;OAMG;IACH,MAAa,KAAM,SAAQ,qBAAY;QAmBtC,YACC,QAA+D,EAC/D,KAAgC;YAEhC,KAAK,EAAE,CAAC;YAER,IAAI,IAAI,GAAG,KAAK,CAAC;YACjB,IAAI,OAAO,QAAQ,KAAK,U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AM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC9B;YAED,IAAI;gBACH,KAAK,CACJ,qCAAqC,EACrC,IAAI,CAAC,QAAQ,EACb,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAC3B,CAAC;gBACF,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CACxD,QAAQ,EACR,aAAa,CACb,CAAC;aACF;YAAC,OAAO,GAAG,EAAE;gBACb,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;aACzC;QACF,CAAC;QAED,UAAU,CAAC,MAAkB,EAAE,IAAkB;YAChD,KAAK,CAAC,sBAAsB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC7D,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC;QAED,OAAO;YACN,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC;KACD;IAxPY,iBAAK,QAwPjB,CAAA;IAED,uCAAuC;IACvC,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC;AACrD,CAAC,EAtTS,WAAW,KAAX,WAAW,QAsTpB;AAED,iBAAS,WAAW,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.d.ts b/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.d.ts deleted file mode 100644 index 0268869..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ClientRequest, RequestOptions, AgentCallbackCallback, AgentCallbackPromise } from './index'; -declare type LegacyCallback = (req: ClientRequest, opts: RequestOptions, fn: AgentCallbackCallback) => void; -export default function promisify(fn: LegacyCallback): AgentCallbackPromise; -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js b/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js deleted file mode 100644 index b2f6132..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function promisify(fn) { - return function (req, opts) { - return new Promise((resolve, reject) => { - fn.call(this, req, opts, (err, rtn) => { - if (err) { - reject(err); - } - else { - resolve(rtn); - } - }); - }); - }; -} -exports.default = promisify; -//# sourceMappingURL=promisify.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js.map b/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js.map deleted file mode 100644 index 4bff9bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promisify.js","sourceRoot":"","sources":["../../src/promisify.ts"],"names":[],"mappings":";;AAeA,SAAwB,SAAS,CAAC,EAAkB;IACnD,OAAO,UAAsB,GAAkB,EAAE,IAAoB;QACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,EAAE,CAAC,IAAI,CACN,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,CAAC,GAA6B,EAAE,GAAyB,EAAE,EAAE;gBAC5D,IAAI,GAAG,EAAE;oBACR,MAAM,CAAC,GAAG,CAAC,CAAC;iBACZ;qBAAM;oBACN,OAAO,CAAC,GAAG,CAAC,CAAC;iBACb;YACF,CAAC,CACD,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAjBD,4BAiBC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/package.json b/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/package.json deleted file mode 100644 index fadce3a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "agent-base", - "version": "6.0.2", - "description": "Turn a function into an `http.Agent` instance", - "main": "dist/src/index", - "typings": "dist/src/index", - "files": [ - "dist/src", - "src" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "postbuild": "cpy --parents src test '!**/*.ts' dist", - "test": "mocha --reporter spec dist/test/*.js", - "test-lint": "eslint src --ext .js,.ts", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-agent-base.git" - }, - "keywords": [ - "http", - "agent", - "base", - "barebones", - "https" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/node-agent-base/issues" - }, - "dependencies": { - "debug": "4" - }, - "devDependencies": { - "@types/debug": "4", - "@types/mocha": "^5.2.7", - "@types/node": "^14.0.20", - "@types/semver": "^7.1.0", - "@types/ws": "^6.0.3", - "@typescript-eslint/eslint-plugin": "1.6.0", - "@typescript-eslint/parser": "1.1.0", - "async-listen": "^1.2.0", - "cpy-cli": "^2.0.0", - "eslint": "5.16.0", - "eslint-config-airbnb": "17.1.0", - "eslint-config-prettier": "4.1.0", - "eslint-import-resolver-typescript": "1.1.1", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-jsx-a11y": "6.2.1", - "eslint-plugin-react": "7.12.4", - "mocha": "^6.2.0", - "rimraf": "^3.0.0", - "semver": "^7.1.2", - "typescript": "^3.5.3", - "ws": "^3.0.0" - }, - "engines": { - "node": ">= 6.0.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/src/index.ts b/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/src/index.ts deleted file mode 100644 index a47ccd4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/src/index.ts +++ /dev/null @@ -1,345 +0,0 @@ -import net from 'net'; -import http from 'http'; -import https from 'https'; -import { Duplex } from 'stream'; -import { EventEmitter } from 'events'; -import createDebug from 'debug'; -import promisify from './promisify'; - -const debug = createDebug('agent-base'); - -function isAgent(v: any): v is createAgent.AgentLike { - return Boolean(v) && typeof v.addRequest === 'function'; -} - -function isSecureEndpoint(): boolean { - const { stack } = new Error(); - if (typeof stack !== 'string') return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); -} - -function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent; -function createAgent( - callback: createAgent.AgentCallback, - opts?: createAgent.AgentOptions -): createAgent.Agent; -function createAgent( - callback?: createAgent.AgentCallback | createAgent.AgentOptions, - opts?: createAgent.AgentOptions -) { - return new createAgent.Agent(callback, opts); -} - -namespace createAgent { - export interface ClientRequest extends http.ClientRequest { - _last?: boolean; - _hadError?: boolean; - method: string; - } - - export interface AgentRequestOptions { - host?: string; - path?: string; - // `port` on `http.RequestOptions` can be a string or undefined, - // but `net.TcpNetConnectOpts` expects only a number - port: number; - } - - export interface HttpRequestOptions - extends AgentRequestOptions, - Omit { - secureEndpoint: false; - } - - export interface HttpsRequestOptions - extends AgentRequestOptions, - Omit { - secureEndpoint: true; - } - - export type RequestOptions = HttpRequestOptions | HttpsRequestOptions; - - export type AgentLike = Pick | http.Agent; - - export type AgentCallbackReturn = Duplex | AgentLike; - - export type AgentCallbackCallback = ( - err?: Error | null, - socket?: createAgent.AgentCallbackReturn - ) => void; - - export type AgentCallbackPromise = ( - req: createAgent.ClientRequest, - opts: createAgent.RequestOptions - ) => - | createAgent.AgentCallbackReturn - | Promise; - - export type AgentCallback = typeof Agent.prototype.callback; - - export type AgentOptions = { - timeout?: number; - }; - - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - export class Agent extends EventEmitter { - public timeout: number | null; - public maxFreeSockets: number; - public maxTotalSockets: number; - public maxSockets: number; - public sockets: { - [key: string]: net.Socket[]; - }; - public freeSockets: { - [key: string]: net.Socket[]; - }; - public requests: { - [key: string]: http.IncomingMessage[]; - }; - public options: https.AgentOptions; - private promisifiedCallback?: createAgent.AgentCallbackPromise; - private explicitDefaultPort?: number; - private explicitProtocol?: string; - - constructor( - callback?: createAgent.AgentCallback | createAgent.AgentOptions, - _opts?: createAgent.AgentOptions - ) { - super(); - - let opts = _opts; - if (typeof callback === 'function') { - this.callback = callback; - } else if (callback) { - opts = callback; - } - - // Timeout for the socket to be returned from the callback - this.timeout = null; - if (opts && typeof opts.timeout === 'number') { - this.timeout = opts.timeout; - } - - // These aren't actually used by `agent-base`, but are required - // for the TypeScript definition files in `@types/node` :/ - this.maxFreeSockets = 1; - this.maxSockets = 1; - this.maxTotalSockets = Infinity; - this.sockets = {}; - this.freeSockets = {}; - this.requests = {}; - this.options = {}; - } - - get defaultPort(): number { - if (typeof this.explicitDefaultPort === 'number') { - return this.explicitDefaultPort; - } - return isSecureEndpoint() ? 443 : 80; - } - - set defaultPort(v: number) { - this.explicitDefaultPort = v; - } - - get protocol(): string { - if (typeof this.explicitProtocol === 'string') { - return this.explicitProtocol; - } - return isSecureEndpoint() ? 'https:' : 'http:'; - } - - set protocol(v: string) { - this.explicitProtocol = v; - } - - callback( - req: createAgent.ClientRequest, - opts: createAgent.RequestOptions, - fn: createAgent.AgentCallbackCallback - ): void; - callback( - req: createAgent.ClientRequest, - opts: createAgent.RequestOptions - ): - | createAgent.AgentCallbackReturn - | Promise; - callback( - req: createAgent.ClientRequest, - opts: createAgent.AgentOptions, - fn?: createAgent.AgentCallbackCallback - ): - | createAgent.AgentCallbackReturn - | Promise - | void { - throw new Error( - '"agent-base" has no default implementation, you must subclass and override `callback()`' - ); - } - - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req: ClientRequest, _opts: RequestOptions): void { - const opts: RequestOptions = { ..._opts }; - - if (typeof opts.secureEndpoint !== 'boolean') { - opts.secureEndpoint = isSecureEndpoint(); - } - - if (opts.host == null) { - opts.host = 'localhost'; - } - - if (opts.port == null) { - opts.port = opts.secureEndpoint ? 443 : 80; - } - - if (opts.protocol == null) { - opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; - } - - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most - // likely the result of a `url.parse()` call... we need to - // remove the `path` portion so that `net.connect()` doesn't - // attempt to open that as a unix socket file. - delete opts.path; - } - - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - - let timedOut = false; - let timeoutId: ReturnType | null = null; - const timeoutMs = opts.timeout || this.timeout; - - const onerror = (err: NodeJS.ErrnoException) => { - if (req._hadError) return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - }; - - const ontimeout = () => { - timeoutId = null; - timedOut = true; - const err: NodeJS.ErrnoException = new Error( - `A "socket" was not created for HTTP request before ${timeoutMs}ms` - ); - err.code = 'ETIMEOUT'; - onerror(err); - }; - - const callbackError = (err: NodeJS.ErrnoException) => { - if (timedOut) return; - if (timeoutId !== null) { - clearTimeout(timeoutId); - timeoutId = null; - } - onerror(err); - }; - - const onsocket = (socket: AgentCallbackReturn) => { - if (timedOut) return; - if (timeoutId != null) { - clearTimeout(timeoutId); - timeoutId = null; - } - - if (isAgent(socket)) { - // `socket` is actually an `http.Agent` instance, so - // relinquish responsibility for this `req` to the Agent - // from here on - debug( - 'Callback returned another Agent instance %o', - socket.constructor.name - ); - (socket as createAgent.Agent).addRequest(req, opts); - return; - } - - if (socket) { - socket.once('free', () => { - this.freeSocket(socket as net.Socket, opts); - }); - req.onSocket(socket as net.Socket); - return; - } - - const err = new Error( - `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\`` - ); - onerror(err); - }; - - if (typeof this.callback !== 'function') { - onerror(new Error('`callback` is not defined')); - return; - } - - if (!this.promisifiedCallback) { - if (this.callback.length >= 3) { - debug('Converting legacy callback function to promise'); - this.promisifiedCallback = promisify(this.callback); - } else { - this.promisifiedCallback = this.callback; - } - } - - if (typeof timeoutMs === 'number' && timeoutMs > 0) { - timeoutId = setTimeout(ontimeout, timeoutMs); - } - - if ('port' in opts && typeof opts.port !== 'number') { - opts.port = Number(opts.port); - } - - try { - debug( - 'Resolving socket for %o request: %o', - opts.protocol, - `${req.method} ${req.path}` - ); - Promise.resolve(this.promisifiedCallback(req, opts)).then( - onsocket, - callbackError - ); - } catch (err) { - Promise.reject(err).catch(callbackError); - } - } - - freeSocket(socket: net.Socket, opts: AgentOptions) { - debug('Freeing socket %o %o', socket.constructor.name, opts); - socket.destroy(); - } - - destroy() { - debug('Destroying agent %o', this.constructor.name); - } - } - - // So that `instanceof` works correctly - createAgent.prototype = createAgent.Agent.prototype; -} - -export = createAgent; diff --git a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/src/promisify.ts b/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/src/promisify.ts deleted file mode 100644 index 60cc662..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/src/promisify.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { - Agent, - ClientRequest, - RequestOptions, - AgentCallbackCallback, - AgentCallbackPromise, - AgentCallbackReturn -} from './index'; - -type LegacyCallback = ( - req: ClientRequest, - opts: RequestOptions, - fn: AgentCallbackCallback -) => void; - -export default function promisify(fn: LegacyCallback): AgentCallbackPromise { - return function(this: Agent, req: ClientRequest, opts: RequestOptions) { - return new Promise((resolve, reject) => { - fn.call( - this, - req, - opts, - (err: Error | null | undefined, rtn?: AgentCallbackReturn) => { - if (err) { - reject(err); - } else { - resolve(rtn); - } - } - ); - }); - }; -} diff --git a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/debug b/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/debug deleted file mode 120000 index 6b438e1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agent-base@6.0.2/node_modules/debug +++ /dev/null @@ -1 +0,0 @@ -../../debug@4.4.3/node_modules/debug \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/LICENSE b/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/LICENSE deleted file mode 100644 index 941258c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License - -Copyright(c) node-modules and other contributors. -Copyright(c) 2012 - 2015 fengmk2 - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/README.md b/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/README.md deleted file mode 100644 index 6a7ee5a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/README.md +++ /dev/null @@ -1,256 +0,0 @@ -# agentkeepalive - -[![NPM version][npm-image]][npm-url] -[![Known Vulnerabilities][snyk-image]][snyk-url] -[![Node.js CI](https://github.com/node-modules/agentkeepalive/actions/workflows/nodejs.yml/badge.svg)](https://github.com/node-modules/agentkeepalive/actions/workflows/nodejs.yml) -[![npm download][download-image]][download-url] - -[npm-image]: https://img.shields.io/npm/v/agentkeepalive.svg?style=flat -[npm-url]: https://npmjs.org/package/agentkeepalive -[snyk-image]: https://snyk.io/test/npm/agentkeepalive/badge.svg?style=flat-square -[snyk-url]: https://snyk.io/test/npm/agentkeepalive -[download-image]: https://img.shields.io/npm/dm/agentkeepalive.svg?style=flat-square -[download-url]: https://npmjs.org/package/agentkeepalive - -The enhancement features `keep alive` `http.Agent`. Support `http` and `https`. - -## What's different from original `http.Agent`? - -- `keepAlive=true` by default -- Disable Nagle's algorithm: `socket.setNoDelay(true)` -- Add free socket timeout: avoid long time inactivity socket leak in the free-sockets queue. -- Add active socket timeout: avoid long time inactivity socket leak in the active-sockets queue. -- TTL for active socket. - -## Node.js version required - -Support Node.js >= `8.0.0` - -## Install - -```bash -$ npm install agentkeepalive --save -``` - -## new Agent([options]) - -* `options` {Object} Set of configurable options to set on the agent. - Can have the following fields: - * `keepAlive` {Boolean} Keep sockets around in a pool to be used by - other requests in the future. Default = `true`. - * `keepAliveMsecs` {Number} When using the keepAlive option, specifies the initial delay - for TCP Keep-Alive packets. Ignored when the keepAlive option is false or undefined. Defaults to 1000. - Default = `1000`. Only relevant if `keepAlive` is set to `true`. - * `freeSocketTimeout`: {Number} Sets the free socket to timeout - after `freeSocketTimeout` milliseconds of inactivity on the free socket. - The default [server-side timeout](https://nodejs.org/api/http.html#serverkeepalivetimeout) is 5000 milliseconds, to [avoid ECONNRESET exceptions](https://medium.com/ssense-tech/reduce-networking-errors-in-nodejs-23b4eb9f2d83), we set the default value to `4000` milliseconds. - Only relevant if `keepAlive` is set to `true`. - * `timeout`: {Number} Sets the working socket to timeout - after `timeout` milliseconds of inactivity on the working socket. - Default is `freeSocketTimeout * 2` so long as that value is greater than or equal to 8 seconds, otherwise the default is 8 seconds. - * `maxSockets` {Number} Maximum number of sockets to allow per - host. Default = `Infinity`. - * `maxFreeSockets` {Number} Maximum number of sockets (per host) to leave open - in a free state. Only relevant if `keepAlive` is set to `true`. - Default = `256`. - * `socketActiveTTL` {Number} Sets the socket active time to live, even if it's in use. - If not set, the behaviour keeps the same (the socket will be released only when free) - Default = `null`. - -## Usage - -```js -const http = require('http'); -const HttpAgent = require('agentkeepalive').HttpAgent; - -const keepaliveAgent = new HttpAgent({ - maxSockets: 100, - maxFreeSockets: 10, - timeout: 60000, // active socket keepalive for 60 seconds - freeSocketTimeout: 30000, // free socket keepalive for 30 seconds -}); - -const options = { - host: 'cnodejs.org', - port: 80, - path: '/', - method: 'GET', - agent: keepaliveAgent, -}; - -const req = http.request(options, res => { - console.log('STATUS: ' + res.statusCode); - console.log('HEADERS: ' + JSON.stringify(res.headers)); - res.setEncoding('utf8'); - res.on('data', function (chunk) { - console.log('BODY: ' + chunk); - }); -}); -req.on('error', e => { - console.log('problem with request: ' + e.message); -}); -req.end(); - -setTimeout(() => { - if (keepaliveAgent.statusChanged) { - console.log('[%s] agent status changed: %j', Date(), keepaliveAgent.getCurrentStatus()); - } -}, 2000); - -``` - -### `getter agent.statusChanged` - -counters have change or not after last checkpoint. - -### `agent.getCurrentStatus()` - -`agent.getCurrentStatus()` will return a object to show the status of this agent: - -```js -{ - createSocketCount: 10, - closeSocketCount: 5, - timeoutSocketCount: 0, - requestCount: 5, - freeSockets: { 'localhost:57479:': 3 }, - sockets: { 'localhost:57479:': 5 }, - requests: {} -} -``` - -### Support `https` - -```js -const https = require('https'); -const HttpsAgent = require('agentkeepalive').HttpsAgent; - -const keepaliveAgent = new HttpsAgent(); -// https://www.google.com/search?q=nodejs&sugexp=chrome,mod=12&sourceid=chrome&ie=UTF-8 -const options = { - host: 'www.google.com', - port: 443, - path: '/search?q=nodejs&sugexp=chrome,mod=12&sourceid=chrome&ie=UTF-8', - method: 'GET', - agent: keepaliveAgent, -}; - -const req = https.request(options, res => { - console.log('STATUS: ' + res.statusCode); - console.log('HEADERS: ' + JSON.stringify(res.headers)); - res.setEncoding('utf8'); - res.on('data', chunk => { - console.log('BODY: ' + chunk); - }); -}); - -req.on('error', e => { - console.log('problem with request: ' + e.message); -}); -req.end(); - -setTimeout(() => { - console.log('agent status: %j', keepaliveAgent.getCurrentStatus()); -}, 2000); -``` - -### Support `req.reusedSocket` - -This agent implements the `req.reusedSocket` to determine whether a request is send through a reused socket. - -When server closes connection at unfortunate time ([keep-alive race](https://code-examples.net/en/q/28a8069)), the http client will throw a `ECONNRESET` error. Under this circumstance, `req.reusedSocket` is useful when we want to retry the request automatically. - -```js -const http = require('http'); -const HttpAgent = require('agentkeepalive').HttpAgent; -const agent = new HttpAgent(); - -const req = http - .get('http://localhost:3000', { agent }, (res) => { - // ... - }) - .on('error', (err) => { - if (req.reusedSocket && err.code === 'ECONNRESET') { - // retry the request or anything else... - } - }) -``` - -This behavior is consistent with Node.js core. But through `agentkeepalive`, you can use this feature in older Node.js version. - -## [Benchmark](https://github.com/node-modules/agentkeepalive/tree/master/benchmark) - -run the benchmark: - -```bash -cd benchmark -sh start.sh -``` - -Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz - -node@v0.8.9 - -50 maxSockets, 60 concurrent, 1000 requests per concurrent, 5ms delay - -Keep alive agent (30 seconds): - -```js -Transactions: 60000 hits -Availability: 100.00 % -Elapsed time: 29.70 secs -Data transferred: 14.88 MB -Response time: 0.03 secs -Transaction rate: 2020.20 trans/sec -Throughput: 0.50 MB/sec -Concurrency: 59.84 -Successful transactions: 60000 -Failed transactions: 0 -Longest transaction: 0.15 -Shortest transaction: 0.01 -``` - -Normal agent: - -```js -Transactions: 60000 hits -Availability: 100.00 % -Elapsed time: 46.53 secs -Data transferred: 14.88 MB -Response time: 0.05 secs -Transaction rate: 1289.49 trans/sec -Throughput: 0.32 MB/sec -Concurrency: 59.81 -Successful transactions: 60000 -Failed transactions: 0 -Longest transaction: 0.45 -Shortest transaction: 0.00 -``` - -Socket created: - -```bash -[proxy.js:120000] keepalive, 50 created, 60000 requestFinished, 1200 req/socket, 0 requests, 0 sockets, 0 unusedSockets, 50 timeout -{" <10ms":662," <15ms":17825," <20ms":20552," <30ms":17646," <40ms":2315," <50ms":567," <100ms":377," <150ms":56," <200ms":0," >=200ms+":0} ----------------------------------------------------------------- -[proxy.js:120000] normal , 53866 created, 84260 requestFinished, 1.56 req/socket, 0 requests, 0 sockets -{" <10ms":75," <15ms":1112," <20ms":10947," <30ms":32130," <40ms":8228," <50ms":3002," <100ms":4274," <150ms":181," <200ms":18," >=200ms+":33} -``` - -## License - -[MIT](LICENSE) - - - -## Contributors - -|[
fengmk2](https://github.com/fengmk2)
|[
dead-horse](https://github.com/dead-horse)
|[
AndrewLeedham](https://github.com/AndrewLeedham)
|[
ngot](https://github.com/ngot)
|[
wrynearson](https://github.com/wrynearson)
|[
aaronArinder](https://github.com/aaronArinder)
| -| :---: | :---: | :---: | :---: | :---: | :---: | -|[
alexpenev-s](https://github.com/alexpenev-s)
|[
blemoine](https://github.com/blemoine)
|[
bdehamer](https://github.com/bdehamer)
|[
DylanPiercey](https://github.com/DylanPiercey)
|[
cixel](https://github.com/cixel)
|[
HerringtonDarkholme](https://github.com/HerringtonDarkholme)
| -|[
denghongcai](https://github.com/denghongcai)
|[
kibertoad](https://github.com/kibertoad)
|[
pangorgo](https://github.com/pangorgo)
|[
mattiash](https://github.com/mattiash)
|[
nabeelbukhari](https://github.com/nabeelbukhari)
|[
pmalouin](https://github.com/pmalouin)
| -[
SimenB](https://github.com/SimenB)
|[
vinaybedre](https://github.com/vinaybedre)
|[
starkwang](https://github.com/starkwang)
|[
killagu](https://github.com/killagu)
|[
tony-gutierrez](https://github.com/tony-gutierrez)
|[
whxaxes](https://github.com/whxaxes)
- -This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat Aug 05 2023 02:36:31 GMT+0800`. - - diff --git a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/browser.js b/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/browser.js deleted file mode 100644 index 29c9398..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/browser.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = noop; -module.exports.HttpsAgent = noop; - -// Noop function for browser since native api's don't use agents. -function noop () {} diff --git a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/index.d.ts b/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/index.d.ts deleted file mode 100644 index f4dbcec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/index.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import * as http from 'http'; -import * as https from 'https'; -import * as net from 'net'; - -interface PlainObject { - [key: string]: any; -} - -declare class _HttpAgent extends http.Agent { - constructor(opts?: AgentKeepAlive.HttpOptions); - readonly statusChanged: boolean; - createConnection(options: net.NetConnectOpts, cb?: Function): net.Socket; - createSocket(req: http.IncomingMessage, options: http.RequestOptions, cb: Function): void; - getCurrentStatus(): AgentKeepAlive.AgentStatus; -} - -interface Constants { - CURRENT_ID: Symbol; - CREATE_ID: Symbol; - INIT_SOCKET: Symbol; - CREATE_HTTPS_CONNECTION: Symbol; - SOCKET_CREATED_TIME: Symbol; - SOCKET_NAME: Symbol; - SOCKET_REQUEST_COUNT: Symbol; - SOCKET_REQUEST_FINISHED_COUNT: Symbol; -} - -/** - * @deprecated instead use `import { HttpAgent } from 'agentkeepalive'; or `const HttpAgent = require('agentkeepalive').HttpAgent;` - */ -declare class AgentKeepAlive extends _HttpAgent {} - -declare namespace AgentKeepAlive { - export interface AgentStatus { - createSocketCount: number; - createSocketErrorCount: number; - closeSocketCount: number; - errorSocketCount: number; - timeoutSocketCount: number; - requestCount: number; - freeSockets: PlainObject; - sockets: PlainObject; - requests: PlainObject; - } - - interface CommonHttpOption { - keepAlive?: boolean | undefined; - freeSocketTimeout?: number | undefined; - freeSocketKeepAliveTimeout?: number | undefined; - timeout?: number | undefined; - socketActiveTTL?: number | undefined; - } - - export interface HttpOptions extends http.AgentOptions, CommonHttpOption { } - export interface HttpsOptions extends https.AgentOptions, CommonHttpOption { } - - export class HttpAgent extends _HttpAgent {} - export class HttpsAgent extends https.Agent { - constructor(opts?: HttpsOptions); - readonly statusChanged: boolean; - createConnection(options: net.NetConnectOpts, cb?: Function): net.Socket; - createSocket(req: http.IncomingMessage, options: http.RequestOptions, cb: Function): void; - getCurrentStatus(): AgentStatus; - } - - export const constants: Constants; -} - -export = AgentKeepAlive; diff --git a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/index.js b/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/index.js deleted file mode 100644 index cfe41dc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -const HttpAgent = require('./lib/agent'); -module.exports = HttpAgent; -module.exports.HttpAgent = HttpAgent; -module.exports.HttpsAgent = require('./lib/https_agent'); -module.exports.constants = require('./lib/constants'); diff --git a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/agent.js b/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/agent.js deleted file mode 100644 index 8bd354e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/agent.js +++ /dev/null @@ -1,402 +0,0 @@ -'use strict'; - -const OriginalAgent = require('http').Agent; -const ms = require('humanize-ms'); -const debug = require('util').debuglog('agentkeepalive'); -const { - INIT_SOCKET, - CURRENT_ID, - CREATE_ID, - SOCKET_CREATED_TIME, - SOCKET_NAME, - SOCKET_REQUEST_COUNT, - SOCKET_REQUEST_FINISHED_COUNT, -} = require('./constants'); - -// OriginalAgent come from -// - https://github.com/nodejs/node/blob/v8.12.0/lib/_http_agent.js -// - https://github.com/nodejs/node/blob/v10.12.0/lib/_http_agent.js - -// node <= 10 -let defaultTimeoutListenerCount = 1; -const majorVersion = parseInt(process.version.split('.', 1)[0].substring(1)); -if (majorVersion >= 11 && majorVersion <= 12) { - defaultTimeoutListenerCount = 2; -} else if (majorVersion >= 13) { - defaultTimeoutListenerCount = 3; -} - -function deprecate(message) { - console.log('[agentkeepalive:deprecated] %s', message); -} - -class Agent extends OriginalAgent { - constructor(options) { - options = options || {}; - options.keepAlive = options.keepAlive !== false; - // default is keep-alive and 4s free socket timeout - // see https://medium.com/ssense-tech/reduce-networking-errors-in-nodejs-23b4eb9f2d83 - if (options.freeSocketTimeout === undefined) { - options.freeSocketTimeout = 4000; - } - // Legacy API: keepAliveTimeout should be rename to `freeSocketTimeout` - if (options.keepAliveTimeout) { - deprecate('options.keepAliveTimeout is deprecated, please use options.freeSocketTimeout instead'); - options.freeSocketTimeout = options.keepAliveTimeout; - delete options.keepAliveTimeout; - } - // Legacy API: freeSocketKeepAliveTimeout should be rename to `freeSocketTimeout` - if (options.freeSocketKeepAliveTimeout) { - deprecate('options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead'); - options.freeSocketTimeout = options.freeSocketKeepAliveTimeout; - delete options.freeSocketKeepAliveTimeout; - } - - // Sets the socket to timeout after timeout milliseconds of inactivity on the socket. - // By default is double free socket timeout. - if (options.timeout === undefined) { - // make sure socket default inactivity timeout >= 8s - options.timeout = Math.max(options.freeSocketTimeout * 2, 8000); - } - - // support humanize format - options.timeout = ms(options.timeout); - options.freeSocketTimeout = ms(options.freeSocketTimeout); - options.socketActiveTTL = options.socketActiveTTL ? ms(options.socketActiveTTL) : 0; - - super(options); - - this[CURRENT_ID] = 0; - - // create socket success counter - this.createSocketCount = 0; - this.createSocketCountLastCheck = 0; - - this.createSocketErrorCount = 0; - this.createSocketErrorCountLastCheck = 0; - - this.closeSocketCount = 0; - this.closeSocketCountLastCheck = 0; - - // socket error event count - this.errorSocketCount = 0; - this.errorSocketCountLastCheck = 0; - - // request finished counter - this.requestCount = 0; - this.requestCountLastCheck = 0; - - // including free socket timeout counter - this.timeoutSocketCount = 0; - this.timeoutSocketCountLastCheck = 0; - - this.on('free', socket => { - // https://github.com/nodejs/node/pull/32000 - // Node.js native agent will check socket timeout eqs agent.options.timeout. - // Use the ttl or freeSocketTimeout to overwrite. - const timeout = this.calcSocketTimeout(socket); - if (timeout > 0 && socket.timeout !== timeout) { - socket.setTimeout(timeout); - } - }); - } - - get freeSocketKeepAliveTimeout() { - deprecate('agent.freeSocketKeepAliveTimeout is deprecated, please use agent.options.freeSocketTimeout instead'); - return this.options.freeSocketTimeout; - } - - get timeout() { - deprecate('agent.timeout is deprecated, please use agent.options.timeout instead'); - return this.options.timeout; - } - - get socketActiveTTL() { - deprecate('agent.socketActiveTTL is deprecated, please use agent.options.socketActiveTTL instead'); - return this.options.socketActiveTTL; - } - - calcSocketTimeout(socket) { - /** - * return <= 0: should free socket - * return > 0: should update socket timeout - * return undefined: not find custom timeout - */ - let freeSocketTimeout = this.options.freeSocketTimeout; - const socketActiveTTL = this.options.socketActiveTTL; - if (socketActiveTTL) { - // check socketActiveTTL - const aliveTime = Date.now() - socket[SOCKET_CREATED_TIME]; - const diff = socketActiveTTL - aliveTime; - if (diff <= 0) { - return diff; - } - if (freeSocketTimeout && diff < freeSocketTimeout) { - freeSocketTimeout = diff; - } - } - // set freeSocketTimeout - if (freeSocketTimeout) { - // set free keepalive timer - // try to use socket custom freeSocketTimeout first, support headers['keep-alive'] - // https://github.com/node-modules/urllib/blob/b76053020923f4d99a1c93cf2e16e0c5ba10bacf/lib/urllib.js#L498 - const customFreeSocketTimeout = socket.freeSocketTimeout || socket.freeSocketKeepAliveTimeout; - return customFreeSocketTimeout || freeSocketTimeout; - } - } - - keepSocketAlive(socket) { - const result = super.keepSocketAlive(socket); - // should not keepAlive, do nothing - if (!result) return result; - - const customTimeout = this.calcSocketTimeout(socket); - if (typeof customTimeout === 'undefined') { - return true; - } - if (customTimeout <= 0) { - debug('%s(requests: %s, finished: %s) free but need to destroy by TTL, request count %s, diff is %s', - socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], customTimeout); - return false; - } - if (socket.timeout !== customTimeout) { - socket.setTimeout(customTimeout); - } - return true; - } - - // only call on addRequest - reuseSocket(...args) { - // reuseSocket(socket, req) - super.reuseSocket(...args); - const socket = args[0]; - const req = args[1]; - req.reusedSocket = true; - const agentTimeout = this.options.timeout; - if (getSocketTimeout(socket) !== agentTimeout) { - // reset timeout before use - socket.setTimeout(agentTimeout); - debug('%s reset timeout to %sms', socket[SOCKET_NAME], agentTimeout); - } - socket[SOCKET_REQUEST_COUNT]++; - debug('%s(requests: %s, finished: %s) reuse on addRequest, timeout %sms', - socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], - getSocketTimeout(socket)); - } - - [CREATE_ID]() { - const id = this[CURRENT_ID]++; - if (this[CURRENT_ID] === Number.MAX_SAFE_INTEGER) this[CURRENT_ID] = 0; - return id; - } - - [INIT_SOCKET](socket, options) { - // bugfix here. - // https on node 8, 10 won't set agent.options.timeout by default - // TODO: need to fix on node itself - if (options.timeout) { - const timeout = getSocketTimeout(socket); - if (!timeout) { - socket.setTimeout(options.timeout); - } - } - - if (this.options.keepAlive) { - // Disable Nagle's algorithm: http://blog.caustik.com/2012/04/08/scaling-node-js-to-100k-concurrent-connections/ - // https://fengmk2.com/benchmark/nagle-algorithm-delayed-ack-mock.html - socket.setNoDelay(true); - } - this.createSocketCount++; - if (this.options.socketActiveTTL) { - socket[SOCKET_CREATED_TIME] = Date.now(); - } - // don't show the hole '-----BEGIN CERTIFICATE----' key string - socket[SOCKET_NAME] = `sock[${this[CREATE_ID]()}#${options._agentKey}]`.split('-----BEGIN', 1)[0]; - socket[SOCKET_REQUEST_COUNT] = 1; - socket[SOCKET_REQUEST_FINISHED_COUNT] = 0; - installListeners(this, socket, options); - } - - createConnection(options, oncreate) { - let called = false; - const onNewCreate = (err, socket) => { - if (called) return; - called = true; - - if (err) { - this.createSocketErrorCount++; - return oncreate(err); - } - this[INIT_SOCKET](socket, options); - oncreate(err, socket); - }; - - const newSocket = super.createConnection(options, onNewCreate); - if (newSocket) onNewCreate(null, newSocket); - return newSocket; - } - - get statusChanged() { - const changed = this.createSocketCount !== this.createSocketCountLastCheck || - this.createSocketErrorCount !== this.createSocketErrorCountLastCheck || - this.closeSocketCount !== this.closeSocketCountLastCheck || - this.errorSocketCount !== this.errorSocketCountLastCheck || - this.timeoutSocketCount !== this.timeoutSocketCountLastCheck || - this.requestCount !== this.requestCountLastCheck; - if (changed) { - this.createSocketCountLastCheck = this.createSocketCount; - this.createSocketErrorCountLastCheck = this.createSocketErrorCount; - this.closeSocketCountLastCheck = this.closeSocketCount; - this.errorSocketCountLastCheck = this.errorSocketCount; - this.timeoutSocketCountLastCheck = this.timeoutSocketCount; - this.requestCountLastCheck = this.requestCount; - } - return changed; - } - - getCurrentStatus() { - return { - createSocketCount: this.createSocketCount, - createSocketErrorCount: this.createSocketErrorCount, - closeSocketCount: this.closeSocketCount, - errorSocketCount: this.errorSocketCount, - timeoutSocketCount: this.timeoutSocketCount, - requestCount: this.requestCount, - freeSockets: inspect(this.freeSockets), - sockets: inspect(this.sockets), - requests: inspect(this.requests), - }; - } -} - -// node 8 don't has timeout attribute on socket -// https://github.com/nodejs/node/pull/21204/files#diff-e6ef024c3775d787c38487a6309e491dR408 -function getSocketTimeout(socket) { - return socket.timeout || socket._idleTimeout; -} - -function installListeners(agent, socket, options) { - debug('%s create, timeout %sms', socket[SOCKET_NAME], getSocketTimeout(socket)); - - // listener socket events: close, timeout, error, free - function onFree() { - // create and socket.emit('free') logic - // https://github.com/nodejs/node/blob/master/lib/_http_agent.js#L311 - // no req on the socket, it should be the new socket - if (!socket._httpMessage && socket[SOCKET_REQUEST_COUNT] === 1) return; - - socket[SOCKET_REQUEST_FINISHED_COUNT]++; - agent.requestCount++; - debug('%s(requests: %s, finished: %s) free', - socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]); - - // should reuse on pedding requests? - const name = agent.getName(options); - if (socket.writable && agent.requests[name] && agent.requests[name].length) { - // will be reuse on agent free listener - socket[SOCKET_REQUEST_COUNT]++; - debug('%s(requests: %s, finished: %s) will be reuse on agent free event', - socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]); - } - } - socket.on('free', onFree); - - function onClose(isError) { - debug('%s(requests: %s, finished: %s) close, isError: %s', - socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], isError); - agent.closeSocketCount++; - } - socket.on('close', onClose); - - // start socket timeout handler - function onTimeout() { - // onTimeout and emitRequestTimeout(_http_client.js) - // https://github.com/nodejs/node/blob/v12.x/lib/_http_client.js#L711 - const listenerCount = socket.listeners('timeout').length; - // node <= 10, default listenerCount is 1, onTimeout - // 11 < node <= 12, default listenerCount is 2, onTimeout and emitRequestTimeout - // node >= 13, default listenerCount is 3, onTimeout, - // onTimeout(https://github.com/nodejs/node/pull/32000/files#diff-5f7fb0850412c6be189faeddea6c5359R333) - // and emitRequestTimeout - const timeout = getSocketTimeout(socket); - const req = socket._httpMessage; - const reqTimeoutListenerCount = req && req.listeners('timeout').length || 0; - debug('%s(requests: %s, finished: %s) timeout after %sms, listeners %s, defaultTimeoutListenerCount %s, hasHttpRequest %s, HttpRequest timeoutListenerCount %s', - socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], - timeout, listenerCount, defaultTimeoutListenerCount, !!req, reqTimeoutListenerCount); - if (debug.enabled) { - debug('timeout listeners: %s', socket.listeners('timeout').map(f => f.name).join(', ')); - } - agent.timeoutSocketCount++; - const name = agent.getName(options); - if (agent.freeSockets[name] && agent.freeSockets[name].indexOf(socket) !== -1) { - // free socket timeout, destroy quietly - socket.destroy(); - // Remove it from freeSockets list immediately to prevent new requests - // from being sent through this socket. - agent.removeSocket(socket, options); - debug('%s is free, destroy quietly', socket[SOCKET_NAME]); - } else { - // if there is no any request socket timeout handler, - // agent need to handle socket timeout itself. - // - // custom request socket timeout handle logic must follow these rules: - // 1. Destroy socket first - // 2. Must emit socket 'agentRemove' event tell agent remove socket - // from freeSockets list immediately. - // Otherise you may be get 'socket hang up' error when reuse - // free socket and timeout happen in the same time. - if (reqTimeoutListenerCount === 0) { - const error = new Error('Socket timeout'); - error.code = 'ERR_SOCKET_TIMEOUT'; - error.timeout = timeout; - // must manually call socket.end() or socket.destroy() to end the connection. - // https://nodejs.org/dist/latest-v10.x/docs/api/net.html#net_socket_settimeout_timeout_callback - socket.destroy(error); - agent.removeSocket(socket, options); - debug('%s destroy with timeout error', socket[SOCKET_NAME]); - } - } - } - socket.on('timeout', onTimeout); - - function onError(err) { - const listenerCount = socket.listeners('error').length; - debug('%s(requests: %s, finished: %s) error: %s, listenerCount: %s', - socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], - err, listenerCount); - agent.errorSocketCount++; - if (listenerCount === 1) { - // if socket don't contain error event handler, don't catch it, emit it again - debug('%s emit uncaught error event', socket[SOCKET_NAME]); - socket.removeListener('error', onError); - socket.emit('error', err); - } - } - socket.on('error', onError); - - function onRemove() { - debug('%s(requests: %s, finished: %s) agentRemove', - socket[SOCKET_NAME], - socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]); - // We need this function for cases like HTTP 'upgrade' - // (defined by WebSockets) where we need to remove a socket from the - // pool because it'll be locked up indefinitely - socket.removeListener('close', onClose); - socket.removeListener('error', onError); - socket.removeListener('free', onFree); - socket.removeListener('timeout', onTimeout); - socket.removeListener('agentRemove', onRemove); - } - socket.on('agentRemove', onRemove); -} - -module.exports = Agent; - -function inspect(obj) { - const res = {}; - for (const key in obj) { - res[key] = obj[key].length; - } - return res; -} diff --git a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/constants.js b/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/constants.js deleted file mode 100644 index ca7ab97..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/constants.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -module.exports = { - // agent - CURRENT_ID: Symbol('agentkeepalive#currentId'), - CREATE_ID: Symbol('agentkeepalive#createId'), - INIT_SOCKET: Symbol('agentkeepalive#initSocket'), - CREATE_HTTPS_CONNECTION: Symbol('agentkeepalive#createHttpsConnection'), - // socket - SOCKET_CREATED_TIME: Symbol('agentkeepalive#socketCreatedTime'), - SOCKET_NAME: Symbol('agentkeepalive#socketName'), - SOCKET_REQUEST_COUNT: Symbol('agentkeepalive#socketRequestCount'), - SOCKET_REQUEST_FINISHED_COUNT: Symbol('agentkeepalive#socketRequestFinishedCount'), -}; diff --git a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/https_agent.js b/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/https_agent.js deleted file mode 100644 index 344fb32..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/https_agent.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -const OriginalHttpsAgent = require('https').Agent; -const HttpAgent = require('./agent'); -const { - INIT_SOCKET, - CREATE_HTTPS_CONNECTION, -} = require('./constants'); - -class HttpsAgent extends HttpAgent { - constructor(options) { - super(options); - - this.defaultPort = 443; - this.protocol = 'https:'; - this.maxCachedSessions = this.options.maxCachedSessions; - /* istanbul ignore next */ - if (this.maxCachedSessions === undefined) { - this.maxCachedSessions = 100; - } - - this._sessionCache = { - map: {}, - list: [], - }; - } - - createConnection(options, oncreate) { - const socket = this[CREATE_HTTPS_CONNECTION](options, oncreate); - this[INIT_SOCKET](socket, options); - return socket; - } -} - -// https://github.com/nodejs/node/blob/master/lib/https.js#L89 -HttpsAgent.prototype[CREATE_HTTPS_CONNECTION] = OriginalHttpsAgent.prototype.createConnection; - -[ - 'getName', - '_getSession', - '_cacheSession', - // https://github.com/nodejs/node/pull/4982 - '_evictSession', -].forEach(function(method) { - /* istanbul ignore next */ - if (typeof OriginalHttpsAgent.prototype[method] === 'function') { - HttpsAgent.prototype[method] = OriginalHttpsAgent.prototype[method]; - } -}); - -module.exports = HttpsAgent; diff --git a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/package.json b/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/package.json deleted file mode 100644 index e6fc7f0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "agentkeepalive", - "version": "4.6.0", - "description": "Missing keepalive http.Agent", - "main": "index.js", - "browser": "browser.js", - "files": [ - "index.js", - "index.d.ts", - "browser.js", - "lib" - ], - "scripts": { - "contributor": "git-contributor", - "test": "npm run lint && egg-bin test --full-trace", - "test-local": "egg-bin test --full-trace", - "cov": "cross-env NODE_DEBUG=agentkeepalive egg-bin cov --full-trace", - "ci": "npm run lint && npm run cov", - "lint": "eslint lib test index.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/node-modules/agentkeepalive.git" - }, - "bugs": { - "url": "https://github.com/node-modules/agentkeepalive/issues" - }, - "keywords": [ - "http", - "https", - "agent", - "keepalive", - "agentkeepalive", - "HttpAgent", - "HttpsAgent" - ], - "dependencies": { - "humanize-ms": "^1.2.1" - }, - "devDependencies": { - "coffee": "^5.3.0", - "cross-env": "^6.0.3", - "egg-bin": "^4.9.0", - "eslint": "^5.7.0", - "eslint-config-egg": "^7.1.0", - "git-contributor": "^2.0.0", - "mm": "^2.4.1", - "pedding": "^1.1.0", - "typescript": "^3.8.3" - }, - "engines": { - "node": ">= 8.0.0" - }, - "author": "fengmk2 (https://github.com/fengmk2)", - "license": "MIT" -} diff --git a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/humanize-ms b/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/humanize-ms deleted file mode 120000 index 986f420..0000000 --- a/services/hocuspocus/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/humanize-ms +++ /dev/null @@ -1 +0,0 @@ -../../humanize-ms@1.2.1/node_modules/humanize-ms \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.d.ts b/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.d.ts deleted file mode 100644 index 502bf7a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** -Create an error from multiple errors. -*/ -declare class AggregateError extends Error implements Iterable { - readonly name: 'AggregateError'; - - /** - @param errors - If a string, a new `Error` is created with the string as the error message. If a non-Error object, a new `Error` is created with all properties from the object copied over. - @returns An Error that is also an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables) for the individual errors. - - @example - ``` - import AggregateError = require('aggregate-error'); - - const error = new AggregateError([new Error('foo'), 'bar', {message: 'baz'}]); - - throw error; - - // AggregateError: - // Error: foo - // at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:33) - // Error: bar - // at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) - // Error: baz - // at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) - // at AggregateError (/Users/sindresorhus/dev/aggregate-error/index.js:19:3) - // at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) - // at Module._compile (module.js:556:32) - // at Object.Module._extensions..js (module.js:565:10) - // at Module.load (module.js:473:32) - // at tryModuleLoad (module.js:432:12) - // at Function.Module._load (module.js:424:3) - // at Module.runMain (module.js:590:10) - // at run (bootstrap_node.js:394:7) - // at startup (bootstrap_node.js:149:9) - - - for (const individualError of error) { - console.log(individualError); - } - //=> [Error: foo] - //=> [Error: bar] - //=> [Error: baz] - ``` - */ - constructor(errors: ReadonlyArray); - - [Symbol.iterator](): IterableIterator; -} - -export = AggregateError; diff --git a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js b/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js deleted file mode 100644 index ba5bf02..0000000 --- a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -const indentString = require('indent-string'); -const cleanStack = require('clean-stack'); - -const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); - -class AggregateError extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - - errors = [...errors].map(error => { - if (error instanceof Error) { - return error; - } - - if (error !== null && typeof error === 'object') { - // Handle plain error objects with message property and/or possibly other metadata - return Object.assign(new Error(error.message), error); - } - - return new Error(error); - }); - - let message = errors - .map(error => { - // The `stack` property is not standardized, so we can't assume it exists - return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error); - }) - .join('\n'); - message = '\n' + indentString(message, 4); - super(message); - - this.name = 'AggregateError'; - - Object.defineProperty(this, '_errors', {value: errors}); - } - - * [Symbol.iterator]() { - for (const error of this._errors) { - yield error; - } - } -} - -module.exports = AggregateError; diff --git a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/license b/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/license deleted file mode 100644 index e7af2f7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/package.json b/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/package.json deleted file mode 100644 index 74fcc37..0000000 --- a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "aggregate-error", - "version": "3.1.0", - "description": "Create an error from multiple errors", - "license": "MIT", - "repository": "sindresorhus/aggregate-error", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "aggregate", - "error", - "combine", - "multiple", - "many", - "collection", - "iterable", - "iterator" - ], - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.7.1", - "xo": "^0.25.3" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/readme.md b/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/readme.md deleted file mode 100644 index 850de98..0000000 --- a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# aggregate-error [![Build Status](https://travis-ci.org/sindresorhus/aggregate-error.svg?branch=master)](https://travis-ci.org/sindresorhus/aggregate-error) - -> Create an error from multiple errors - - -## Install - -``` -$ npm install aggregate-error -``` - - -## Usage - -```js -const AggregateError = require('aggregate-error'); - -const error = new AggregateError([new Error('foo'), 'bar', {message: 'baz'}]); - -throw error; -/* -AggregateError: - Error: foo - at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:33) - Error: bar - at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) - Error: baz - at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) - at AggregateError (/Users/sindresorhus/dev/aggregate-error/index.js:19:3) - at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) - at Module._compile (module.js:556:32) - at Object.Module._extensions..js (module.js:565:10) - at Module.load (module.js:473:32) - at tryModuleLoad (module.js:432:12) - at Function.Module._load (module.js:424:3) - at Module.runMain (module.js:590:10) - at run (bootstrap_node.js:394:7) - at startup (bootstrap_node.js:149:9) -*/ - -for (const individualError of error) { - console.log(individualError); -} -//=> [Error: foo] -//=> [Error: bar] -//=> [Error: baz] -``` - - -## API - -### AggregateError(errors) - -Returns an `Error` that is also an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables) for the individual errors. - -#### errors - -Type: `Array` - -If a string, a new `Error` is created with the string as the error message.
-If a non-Error object, a new `Error` is created with all properties from the object copied over. diff --git a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/clean-stack b/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/clean-stack deleted file mode 120000 index 940be15..0000000 --- a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/clean-stack +++ /dev/null @@ -1 +0,0 @@ -../../clean-stack@2.2.0/node_modules/clean-stack \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/indent-string b/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/indent-string deleted file mode 120000 index 20f20c5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/aggregate-error@3.1.0/node_modules/indent-string +++ /dev/null @@ -1 +0,0 @@ -../../indent-string@4.0.0/node_modules/indent-string \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.d.ts b/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.d.ts deleted file mode 100644 index 2dbf6af..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -declare namespace ansiRegex { - interface Options { - /** - Match only the first ANSI escape. - - @default false - */ - onlyFirst: boolean; - } -} - -/** -Regular expression for matching ANSI escape codes. - -@example -``` -import ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` -*/ -declare function ansiRegex(options?: ansiRegex.Options): RegExp; - -export = ansiRegex; diff --git a/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js b/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js deleted file mode 100644 index 616ff83..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; diff --git a/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/license b/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/package.json b/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/package.json deleted file mode 100644 index 017f531..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "ansi-regex", - "version": "5.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/readme.md b/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/readme.md deleted file mode 100644 index 4d848bc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,78 +0,0 @@ -# ansi-regex - -> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` - - -## API - -### ansiRegex(options?) - -Returns a regex for matching ANSI escape codes. - -#### options - -Type: `object` - -##### onlyFirst - -Type: `boolean`
-Default: `false` *(Matches any ANSI escape codes in a string)* - -Match only the first ANSI escape. - - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/LICENSE b/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/LICENSE deleted file mode 100644 index f4be44d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - diff --git a/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/README.md b/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/README.md deleted file mode 100644 index 0bfc594..0000000 --- a/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/README.md +++ /dev/null @@ -1,94 +0,0 @@ -aproba -====== - -A ridiculously light-weight function argument validator - -``` -var validate = require("aproba") - -function myfunc(a, b, c) { - // `a` must be a string, `b` a number, `c` a function - validate('SNF', arguments) // [a,b,c] is also valid -} - -myfunc('test', 23, function () {}) // ok -myfunc(123, 23, function () {}) // type error -myfunc('test', 23) // missing arg error -myfunc('test', 23, function () {}, true) // too many args error - -``` - -Valid types are: - -| type | description -| :--: | :---------- -| * | matches any type -| A | `Array.isArray` OR an `arguments` object -| S | typeof == string -| N | typeof == number -| F | typeof == function -| O | typeof == object and not type A and not type E -| B | typeof == boolean -| E | `instanceof Error` OR `null` **(special: see below)** -| Z | == `null` - -Validation failures throw one of three exception types, distinguished by a -`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. - -If you pass in an invalid type then it will throw with a code of -`EUNKNOWNTYPE`. - -If an **error** argument is found and is not null then the remaining -arguments are optional. That is, if you say `ESO` then that's like using a -non-magical `E` in: `E|ESO|ZSO`. - -### But I have optional arguments?! - -You can provide more than one signature by separating them with pipes `|`. -If any signature matches the arguments then they'll be considered valid. - -So for example, say you wanted to write a signature for -`fs.createWriteStream`. The docs for it describe it thusly: - -``` -fs.createWriteStream(path[, options]) -``` - -This would be a signature of `SO|S`. That is, a string and and object, or -just a string. - -Now, if you read the full `fs` docs, you'll see that actually path can ALSO -be a buffer. And options can be a string, that is: -``` -path | -options | -``` - -To reproduce this you have to fully enumerate all of the possible -combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The -awkwardness is a feature: It reminds you of the complexity you're adding to -your API when you do this sort of thing. - - -### Browser support - -This has no dependencies and should work in browsers, though you'll have -noisier stack traces. - -### Why this exists - -I wanted a very simple argument validator. It needed to do two things: - -1. Be more concise and easier to use than assertions - -2. Not encourage an infinite bikeshed of DSLs - -This is why types are specified by a single character and there's no such -thing as an optional argument. - -This is not intended to validate user data. This is specifically about -asserting the interface of your functions. - -If you need greater validation, I encourage you to write them by hand or -look elsewhere. - diff --git a/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/index.js b/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/index.js deleted file mode 100644 index 5a58e81..0000000 --- a/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/index.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' -module.exports = validate - -function isArguments (thingy) { - return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') -} - -const types = { - '*': {label: 'any', check: () => true}, - A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)}, - S: {label: 'string', check: _ => typeof _ === 'string'}, - N: {label: 'number', check: _ => typeof _ === 'number'}, - F: {label: 'function', check: _ => typeof _ === 'function'}, - O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)}, - B: {label: 'boolean', check: _ => typeof _ === 'boolean'}, - E: {label: 'error', check: _ => _ instanceof Error}, - Z: {label: 'null', check: _ => _ == null} -} - -function addSchema (schema, arity) { - const group = arity[schema.length] = arity[schema.length] || [] - if (group.indexOf(schema) === -1) group.push(schema) -} - -function validate (rawSchemas, args) { - if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) - if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') - if (!args) throw missingRequiredArg(1, 'args') - if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas) - if (!types.A.check(args)) throw invalidType(1, ['array'], args) - const schemas = rawSchemas.split('|') - const arity = {} - - schemas.forEach(schema => { - for (let ii = 0; ii < schema.length; ++ii) { - const type = schema[ii] - if (!types[type]) throw unknownType(ii, type) - } - if (/E.*E/.test(schema)) throw moreThanOneError(schema) - addSchema(schema, arity) - if (/E/.test(schema)) { - addSchema(schema.replace(/E.*$/, 'E'), arity) - addSchema(schema.replace(/E/, 'Z'), arity) - if (schema.length === 1) addSchema('', arity) - } - }) - let matching = arity[args.length] - if (!matching) { - throw wrongNumberOfArgs(Object.keys(arity), args.length) - } - for (let ii = 0; ii < args.length; ++ii) { - let newMatching = matching.filter(schema => { - const type = schema[ii] - const typeCheck = types[type].check - return typeCheck(args[ii]) - }) - if (!newMatching.length) { - const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null) - throw invalidType(ii, labels, args[ii]) - } - matching = newMatching - } -} - -function missingRequiredArg (num) { - return newException('EMISSINGARG', 'Missing required argument #' + (num + 1)) -} - -function unknownType (num, type) { - return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1)) -} - -function invalidType (num, expectedTypes, value) { - let valueType - Object.keys(types).forEach(typeCode => { - if (types[typeCode].check(value)) valueType = types[typeCode].label - }) - return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' + - englishList(expectedTypes) + ' but got ' + valueType) -} - -function englishList (list) { - return list.join(', ').replace(/, ([^,]+)$/, ' or $1') -} - -function wrongNumberOfArgs (expected, got) { - const english = englishList(expected) - const args = expected.every(ex => ex.length === 1) - ? 'argument' - : 'arguments' - return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got) -} - -function moreThanOneError (schema) { - return newException('ETOOMANYERRORTYPES', - 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"') -} - -function newException (code, msg) { - const err = new TypeError(msg) - err.code = code - /* istanbul ignore else */ - if (Error.captureStackTrace) Error.captureStackTrace(err, validate) - return err -} diff --git a/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/package.json b/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/package.json deleted file mode 100644 index 71c7fca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "aproba", - "version": "2.1.0", - "description": "A ridiculously light-weight argument validator (now browser friendly)", - "main": "index.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "standard": "^11.0.1", - "tap": "^12.0.1" - }, - "files": [ - "index.js" - ], - "scripts": { - "pretest": "standard", - "test": "tap --100 -J test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/iarna/aproba" - }, - "keywords": [ - "argument", - "validate" - ], - "author": "Rebecca Turner ", - "license": "ISC", - "bugs": { - "url": "https://github.com/iarna/aproba/issues" - }, - "homepage": "https://github.com/iarna/aproba" -} diff --git a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/LICENSE.md deleted file mode 100644 index 845be76..0000000 --- a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/README.md b/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/README.md deleted file mode 100644 index caae19b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/README.md +++ /dev/null @@ -1,208 +0,0 @@ -are-we-there-yet ----------------- - -Track complex hierarchies of asynchronous task completion statuses. This is -intended to give you a way of recording and reporting the progress of the big -recursive fan-out and gather type workflows that are so common in async. - -What you do with this completion data is up to you, but the most common use case is to -feed it to one of the many progress bar modules. - -Most progress bar modules include a rudimentary version of this, but my -needs were more complex. - -Usage -===== - -```javascript -var TrackerGroup = require("are-we-there-yet").TrackerGroup - -var top = new TrackerGroup("program") - -var single = top.newItem("one thing", 100) -single.completeWork(20) - -console.log(top.completed()) // 0.2 - -fs.stat("file", function(er, stat) { - if (er) throw er - var stream = top.newStream("file", stat.size) - console.log(top.completed()) // now 0.1 as single is 50% of the job and is 20% complete - // and 50% * 20% == 10% - fs.createReadStream("file").pipe(stream).on("data", function (chunk) { - // do stuff with chunk - }) - top.on("change", function (name) { - // called each time a chunk is read from "file" - // top.completed() will start at 0.1 and fill up to 0.6 as the file is read - }) -}) -``` - -Shared Methods -============== - -* var completed = tracker.completed() - -Implemented in: `Tracker`, `TrackerGroup`, `TrackerStream` - -Returns the ratio of completed work to work to be done. Range of 0 to 1. - -* tracker.finish() - -Implemented in: `Tracker`, `TrackerGroup` - -Marks the tracker as completed. With a TrackerGroup this marks all of its -components as completed. - -Marks all of the components of this tracker as finished, which in turn means -that `tracker.completed()` for this will now be 1. - -This will result in one or more `change` events being emitted. - -Events -====== - -All tracker objects emit `change` events with the following arguments: - -``` -function (name, completed, tracker) -``` - -`name` is the name of the tracker that originally emitted the event, -or if it didn't have one, the first containing tracker group that had one. - -`completed` is the percent complete (as returned by `tracker.completed()` method). - -`tracker` is the tracker object that you are listening for events on. - -TrackerGroup -============ - -* var tracker = new TrackerGroup(**name**) - - * **name** *(optional)* - The name of this tracker group, used in change - notifications if the component updating didn't have a name. Defaults to undefined. - -Creates a new empty tracker aggregation group. These are trackers whose -completion status is determined by the completion status of other trackers added to this aggregation group. - -Ex. - -```javascript -var tracker = new TrackerGroup("parent") -var foo = tracker.newItem("firstChild", 100) -var bar = tracker.newItem("secondChild", 100) - -foo.finish() -console.log(tracker.completed()) // 0.5 -bar.finish() -console.log(tracker.completed()) // 1 -``` - -* tracker.addUnit(**otherTracker**, **weight**) - - * **otherTracker** - Any of the other are-we-there-yet tracker objects - * **weight** *(optional)* - The weight to give the tracker, defaults to 1. - -Adds the **otherTracker** to this aggregation group. The weight determines -how long you expect this tracker to take to complete in proportion to other -units. So for instance, if you add one tracker with a weight of 1 and -another with a weight of 2, you're saying the second will take twice as long -to complete as the first. As such, the first will account for 33% of the -completion of this tracker and the second will account for the other 67%. - -Returns **otherTracker**. - -* var subGroup = tracker.newGroup(**name**, **weight**) - -The above is exactly equivalent to: - -```javascript - var subGroup = tracker.addUnit(new TrackerGroup(name), weight) -``` - -* var subItem = tracker.newItem(**name**, **todo**, **weight**) - -The above is exactly equivalent to: - -```javascript - var subItem = tracker.addUnit(new Tracker(name, todo), weight) -``` - -* var subStream = tracker.newStream(**name**, **todo**, **weight**) - -The above is exactly equivalent to: - -```javascript - var subStream = tracker.addUnit(new TrackerStream(name, todo), weight) -``` - -* console.log( tracker.debug() ) - -Returns a tree showing the completion of this tracker group and all of its -children, including recursively entering all of the children. - -Tracker -======= - -* var tracker = new Tracker(**name**, **todo**) - - * **name** *(optional)* The name of this counter to report in change - events. Defaults to undefined. - * **todo** *(optional)* The amount of work todo (a number). Defaults to 0. - -Ordinarily these are constructed as a part of a tracker group (via -`newItem`). - -* var completed = tracker.completed() - -Returns the ratio of completed work to work to be done. Range of 0 to 1. If -total work to be done is 0 then it will return 0. - -* tracker.addWork(**todo**) - - * **todo** A number to add to the amount of work to be done. - -Increases the amount of work to be done, thus decreasing the completion -percentage. Triggers a `change` event. - -* tracker.completeWork(**completed**) - - * **completed** A number to add to the work complete - -Increase the amount of work complete, thus increasing the completion percentage. -Will never increase the work completed past the amount of work todo. That is, -percentages > 100% are not allowed. Triggers a `change` event. - -* tracker.finish() - -Marks this tracker as finished, tracker.completed() will now be 1. Triggers -a `change` event. - -TrackerStream -============= - -* var tracker = new TrackerStream(**name**, **size**, **options**) - - * **name** *(optional)* The name of this counter to report in change - events. Defaults to undefined. - * **size** *(optional)* The number of bytes being sent through this stream. - * **options** *(optional)* A hash of stream options - -The tracker stream object is a pass through stream that updates an internal -tracker object each time a block passes through. It's intended to track -downloads, file extraction and other related activities. You use it by piping -your data source into it and then using it as your data source. - -If your data has a length attribute then that's used as the amount of work -completed when the chunk is passed through. If it does not (eg, object -streams) then each chunk counts as completing 1 unit of work, so your size -should be the total number of objects being streamed. - -* tracker.addWork(**todo**) - - * **todo** Increase the expected overall size by **todo** bytes. - -Increases the amount of work to be done, thus decreasing the completion -percentage. Triggers a `change` event. diff --git a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/index.js b/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/index.js deleted file mode 100644 index 57d8743..0000000 --- a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict' -exports.TrackerGroup = require('./tracker-group.js') -exports.Tracker = require('./tracker.js') -exports.TrackerStream = require('./tracker-stream.js') diff --git a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-base.js b/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-base.js deleted file mode 100644 index 6f43687..0000000 --- a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-base.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' -var EventEmitter = require('events').EventEmitter -var util = require('util') - -var trackerId = 0 -var TrackerBase = module.exports = function (name) { - EventEmitter.call(this) - this.id = ++trackerId - this.name = name -} -util.inherits(TrackerBase, EventEmitter) diff --git a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-group.js b/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-group.js deleted file mode 100644 index a3c7af8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-group.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict' -var util = require('util') -var TrackerBase = require('./tracker-base.js') -var Tracker = require('./tracker.js') -var TrackerStream = require('./tracker-stream.js') - -var TrackerGroup = module.exports = function (name) { - TrackerBase.call(this, name) - this.parentGroup = null - this.trackers = [] - this.completion = {} - this.weight = {} - this.totalWeight = 0 - this.finished = false - this.bubbleChange = bubbleChange(this) -} -util.inherits(TrackerGroup, TrackerBase) - -function bubbleChange (trackerGroup) { - return function (name, completed, tracker) { - trackerGroup.completion[tracker.id] = completed - if (trackerGroup.finished) { - return - } - trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup) - } -} - -TrackerGroup.prototype.nameInTree = function () { - var names = [] - var from = this - while (from) { - names.unshift(from.name) - from = from.parentGroup - } - return names.join('/') -} - -TrackerGroup.prototype.addUnit = function (unit, weight) { - if (unit.addUnit) { - var toTest = this - while (toTest) { - if (unit === toTest) { - throw new Error( - 'Attempted to add tracker group ' + - unit.name + ' to tree that already includes it ' + - this.nameInTree(this)) - } - toTest = toTest.parentGroup - } - unit.parentGroup = this - } - this.weight[unit.id] = weight || 1 - this.totalWeight += this.weight[unit.id] - this.trackers.push(unit) - this.completion[unit.id] = unit.completed() - unit.on('change', this.bubbleChange) - if (!this.finished) { - this.emit('change', unit.name, this.completion[unit.id], unit) - } - return unit -} - -TrackerGroup.prototype.completed = function () { - if (this.trackers.length === 0) { - return 0 - } - var valPerWeight = 1 / this.totalWeight - var completed = 0 - for (var ii = 0; ii < this.trackers.length; ii++) { - var trackerId = this.trackers[ii].id - completed += - valPerWeight * this.weight[trackerId] * this.completion[trackerId] - } - return completed -} - -TrackerGroup.prototype.newGroup = function (name, weight) { - return this.addUnit(new TrackerGroup(name), weight) -} - -TrackerGroup.prototype.newItem = function (name, todo, weight) { - return this.addUnit(new Tracker(name, todo), weight) -} - -TrackerGroup.prototype.newStream = function (name, todo, weight) { - return this.addUnit(new TrackerStream(name, todo), weight) -} - -TrackerGroup.prototype.finish = function () { - this.finished = true - if (!this.trackers.length) { - this.addUnit(new Tracker(), 1, true) - } - for (var ii = 0; ii < this.trackers.length; ii++) { - var tracker = this.trackers[ii] - tracker.finish() - tracker.removeListener('change', this.bubbleChange) - } - this.emit('change', this.name, 1, this) -} - -var buffer = ' ' -TrackerGroup.prototype.debug = function (depth) { - depth = depth || 0 - var indent = depth ? buffer.slice(0, depth) : '' - var output = indent + (this.name || 'top') + ': ' + this.completed() + '\n' - this.trackers.forEach(function (tracker) { - if (tracker instanceof TrackerGroup) { - output += tracker.debug(depth + 1) - } else { - output += indent + ' ' + tracker.name + ': ' + tracker.completed() + '\n' - } - }) - return output -} diff --git a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-stream.js b/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-stream.js deleted file mode 100644 index e1cf850..0000000 --- a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker-stream.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict' -var util = require('util') -var stream = require('readable-stream') -var delegate = require('delegates') -var Tracker = require('./tracker.js') - -var TrackerStream = module.exports = function (name, size, options) { - stream.Transform.call(this, options) - this.tracker = new Tracker(name, size) - this.name = name - this.id = this.tracker.id - this.tracker.on('change', delegateChange(this)) -} -util.inherits(TrackerStream, stream.Transform) - -function delegateChange (trackerStream) { - return function (name, completion, tracker) { - trackerStream.emit('change', name, completion, trackerStream) - } -} - -TrackerStream.prototype._transform = function (data, encoding, cb) { - this.tracker.completeWork(data.length ? data.length : 1) - this.push(data) - cb() -} - -TrackerStream.prototype._flush = function (cb) { - this.tracker.finish() - cb() -} - -delegate(TrackerStream.prototype, 'tracker') - .method('completed') - .method('addWork') - .method('finish') diff --git a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker.js b/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker.js deleted file mode 100644 index a8f8b3b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/lib/tracker.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict' -var util = require('util') -var TrackerBase = require('./tracker-base.js') - -var Tracker = module.exports = function (name, todo) { - TrackerBase.call(this, name) - this.workDone = 0 - this.workTodo = todo || 0 -} -util.inherits(Tracker, TrackerBase) - -Tracker.prototype.completed = function () { - return this.workTodo === 0 ? 0 : this.workDone / this.workTodo -} - -Tracker.prototype.addWork = function (work) { - this.workTodo += work - this.emit('change', this.name, this.completed(), this) -} - -Tracker.prototype.completeWork = function (work) { - this.workDone += work - if (this.workDone > this.workTodo) { - this.workDone = this.workTodo - } - this.emit('change', this.name, this.completed(), this) -} - -Tracker.prototype.finish = function () { - this.workTodo = this.workDone = 1 - this.emit('change', this.name, 1, this) -} diff --git a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/package.json b/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/package.json deleted file mode 100644 index cc3d750..0000000 --- a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/are-we-there-yet/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "are-we-there-yet", - "version": "3.0.1", - "description": "Keep track of the overall completion of many disparate processes", - "main": "lib/index.js", - "scripts": { - "test": "tap", - "npmclilint": "npmcli-lint", - "lint": "eslint \"**/*.js\"", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "postsnap": "npm run lintfix --", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "snap": "tap", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/are-we-there-yet.git" - }, - "author": "GitHub Inc.", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/are-we-there-yet/issues" - }, - "homepage": "https://github.com/npm/are-we-there-yet", - "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", - "tap": "^16.0.1" - }, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - }, - "tap": { - "branches": 68, - "statements": 92, - "functions": 86, - "lines": 92 - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/delegates b/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/delegates deleted file mode 120000 index 6fada0b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/delegates +++ /dev/null @@ -1 +0,0 @@ -../../delegates@1.0.0/node_modules/delegates \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/readable-stream b/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/readable-stream deleted file mode 120000 index 4ca17de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/are-we-there-yet@3.0.1/node_modules/readable-stream +++ /dev/null @@ -1 +0,0 @@ -../../readable-stream@3.6.2/node_modules/readable-stream \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/AUTHORS b/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/AUTHORS deleted file mode 100644 index 668bb1e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/AUTHORS +++ /dev/null @@ -1,21 +0,0 @@ -# Authors ordered by first contribution. - -rain1017 (https://github.com/rain1017) -JonathanPicques (https://github.com/JonathanPicques) -Rogier Schouten (https://github.com/rogierschouten) -erikvold (https://github.com/erikvold) -Christian Passet (https://github.com/thePunIssuer) -Tanguy Krotoff (https://github.com/tkrotoff) -jtyers (https://github.com/jtyers) -Paul Roub (https://github.com/paulroub) -Geoff Whatley (https://github.com/meatwallace) -Patryk L. (https://github.com/LosTigeros) -Julian Saunderson (https://github.com/bitrivers) -Philipp Keck (https://github.com/Philipp91) -abozaralizadeh (https://github.com/abozaralizadeh) -ThePiz (https://github.com/ThePiz) -Luke Stead (https://github.com/luke-stead-sonocent) -Simeon Borko (https://github.com/simeonborko) -Tim Schmidt (https://github.com/taschmidt) -Motty Milshtein (https://github.com/mottymilshtein) - diff --git a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/History.md b/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/History.md deleted file mode 100644 index 3fc10e8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/History.md +++ /dev/null @@ -1,132 +0,0 @@ -1.4.0 -================== -* add execution timeout (thank you @mottymilshtein) - -1.3.2 -================== -* Handle errors from user-supplied callback better (Thank you @simeonborko) -* Ensure the array parameter does not get mutated for batch acquire (Thank you @taschmidt) - -1.3.1 -================== -* Show queue name in errors (thank you @luke-stead-sonocent) - -1.3.0 -================== -* Add maxOccupationTime option (Thank you @abozaralizadeh and @ThePiz) - -1.2.8 -================== -* Fix #37 process not set when acquiring lock (Thank you @Philipp91) - -1.2.7 -================== -DO NOT USE, erroneous publish - -1.2.6 -================== -* Fix `maxPending = Infinity` no longer allowed (thank you @coderaiser) - -1.2.5 -================== -* Allow `maxPending = 0` (thank you @bmrpatel) -* Upgrade dependencies - -1.2.4 -================== -* Be robust to lock names that are also Object keys - simpler solution, extra tests. - -1.2.3 -================== -* Be robust to lock names that are also Object keys. -* Upgrade dependencies - -1.2.2 -================== -* Fix grunt-env accidentally having become a dependency (#25) - -1.2.1 -================== -* Remove empty postinstall script (#24) -* Fixed some vulnerable dev dependencies - -1.2.0 -================== -* ES5 compatibility (#21) - -1.1.4 -================== -* Fix for #17, update dependencies - -1.1.3 -================== -* Fix for #14 - -1.1.1 -================== -* Fix result Promise not resolving when locking empty key array - -1.1.0 / 2017-10-17 -================== -* Add option to add waiters to the front of the queue - -1.1.0 / 2017-10-17 -================== -* Add option to add waiters to the front of the queue - -1.0.0 / 2017-06-29 -================== -* Remove dependency on Q by using the global Promise variable by default. Thank you @erikvold (https://github.com/erikvold) for the PR - -0.3.10 / 2017-06-27 -================== -* Remove dependencies on Q-specific nodify(), try(), and defer() methods so that you can inject e.g. standard ES6 promises using `new AsyncLock({ Promise: Promise })` - -0.3.9 / 2016-11-30 -================== -* Referred to MIT license in package.json -* Update NPM module dependencies, remove no-longer-maintained blanket code coverage -* Change author to rogierschouten -* Fix invalid JSDoc comments (thanks @JonathanPicques) -* Bugfix: TypeError when locking multiple keys at once - -0.3.7-0.3.8 -================== -Unknown, previous author did not commit this to Github. - -0.3.6 / 2015-09-07 -================== -* Performance improvement - -0.3.5 / 2015-06-15 -================== -* Performance improvement - -0.3.4 / 2015-06-09 -================== -* Bug fix - -0.3.3 / 2015-05-19 -================== -* Bug fix - -0.3.2 / 2015-05-08 -================== -* Set default timeout to never - -0.3.1 / 2015-04-15 -================== -* Use your own promise - -0.3.0 / 2015-03-06 -================== -* Domain reentrant - -0.2.0 / 2015-02-21 -================== -* Support promise mode -* Pending task limit - -0.1.0 / 2015-01-13 -================== -* Initial version diff --git a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/LICENSE b/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/LICENSE deleted file mode 100644 index 8bfd9e0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Rogier Schouten - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/README.md b/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/README.md deleted file mode 100644 index 06ebe6a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/README.md +++ /dev/null @@ -1,177 +0,0 @@ -# async-lock - -Lock on asynchronous code - -[![Build Status](https://travis-ci.org/rogierschouten/async-lock.svg?branch=master)](https://travis-ci.org/rogierschouten/async-lock) - -* ES6 promise supported -* Multiple keys lock supported -* Timeout supported -* Occupation time limit supported -* Execution time limit supported -* Pending task limit supported -* Domain reentrant supported -* 100% code coverage - -## Disclaimer - -I did not create this package, and I will not add any features to it myself. I was granted the ownership because it was no longer being -maintained, and I volunteered to fix a bug. - -If you have a new feature you would like to have incorporated, please send me a PR and I will be happy to work with you and get it merged. -For any bugs, PRs are most welcome but when possible I will try to get them resolved as soon as possible. - -## Why do you need locking on single threaded nodejs? - -Nodejs is single threaded, and the code execution never gets interrupted inside an event loop, so locking is unnecessary? This is true ONLY IF your critical section can be executed inside a single event loop. -However, if you have any async code inside your critical section (it can be simply triggered by any I/O operation, or timer), your critical logic will across multiple event loops, therefore it's not concurrency safe! - -Consider the following code -```js -redis.get('key', function(err, value) { - redis.set('key', value * 2); -}); -``` -The above code simply multiply a redis key by 2. -However, if two users run concurrently, the execution order may like this -``` -user1: redis.get('key') -> 1 -user2: redis.get('key') -> 1 -user1: redis.set('key', 1 x 2) -> 2 -user2: redis.set('key', 1 x 2) -> 2 -``` -Obviously it's not what you expected - - -With asyncLock, you can easily write your async critical section -```js -lock.acquire('key', function(cb) { - // Concurrency safe - redis.get('key', function(err, value) { - redis.set('key', value * 2, cb); - }); -}, function(err, ret) { -}); -``` - -## Get Started - -```js -var AsyncLock = require('async-lock'); -var lock = new AsyncLock(); - -/** - * @param {String|Array} key resource key or keys to lock - * @param {function} fn execute function - * @param {function} cb (optional) callback function, otherwise will return a promise - * @param {Object} opts (optional) options - */ -lock.acquire(key, function(done) { - // async work - done(err, ret); -}, function(err, ret) { - // lock released -}, opts); - -// Promise mode -lock.acquire(key, function() { - // return value or promise -}, opts).then(function() { - // lock released -}); -``` - -## Error Handling - -```js -// Callback mode -lock.acquire(key, function(done) { - done(new Error('error')); -}, function(err, ret) { - console.log(err.message) // output: error -}); - -// Promise mode -lock.acquire(key, function() { - throw new Error('error'); -}).catch(function(err) { - console.log(err.message) // output: error -}); -``` - -## Acquire multiple keys - -```js -lock.acquire([key1, key2], fn, cb); -``` - -## Domain reentrant lock - -Lock is reentrant in the same domain - -```js -var domain = require('domain'); -var lock = new AsyncLock({domainReentrant : true}); - -var d = domain.create(); -d.run(function() { - lock.acquire('key', function() { - //Enter lock - return lock.acquire('key', function() { - //Enter same lock twice - }); - }); -}); -``` - -## Options - -```js -// Specify timeout - max amount of time an item can remain in the queue before acquiring the lock -var lock = new AsyncLock({timeout: 5000}); -lock.acquire(key, fn, function(err, ret) { - // timed out error will be returned here if lock not acquired in given time -}); - -// Specify max occupation time - max amount of time allowed between entering the queue and completing execution -var lock = new AsyncLock({maxOccupationTime: 3000}); -lock.acquire(key, fn, function(err, ret) { - // occupation time exceeded error will be returned here if job not completed in given time -}); - -// Specify max execution time - max amount of time allowed between acquiring the lock and completing execution -var lock = new AsyncLock({maxExecutionTime: 3000}); -lock.acquire(key, fn, function(err, ret) { - // execution time exceeded error will be returned here if job not completed in given time -}); - -// Set max pending tasks - max number of tasks allowed in the queue at a time -var lock = new AsyncLock({maxPending: 1000}); -lock.acquire(key, fn, function(err, ret) { - // Handle too much pending error -}) - -// Whether there is any running or pending async function -lock.isBusy(); - -// Use your own promise library instead of the global Promise variable -var lock = new AsyncLock({Promise: require('bluebird')}); // Bluebird -var lock = new AsyncLock({Promise: require('q')}); // Q - -// Add a task to the front of the queue waiting for a given lock -lock.acquire(key, fn1, cb); // runs immediately -lock.acquire(key, fn2, cb); // added to queue -lock.acquire(key, priorityFn, cb, {skipQueue: true}); // jumps queue and runs before fn2 -``` - -## Changelog - -See [Changelog](./History.md) - -## Issues - -See [issue tracker](https://github.com/rogierschouten/async-lock/issues). - -## License - -MIT, see [LICENSE](./LICENSE) diff --git a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/index.js b/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/index.js deleted file mode 100644 index 48315bb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/index.js +++ /dev/null @@ -1,2 +0,0 @@ -'use strict'; -module.exports = require('./lib'); diff --git a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/lib/index.js b/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/lib/index.js deleted file mode 100644 index b3e741c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/lib/index.js +++ /dev/null @@ -1,312 +0,0 @@ -'use strict'; - -var AsyncLock = function (opts) { - opts = opts || {}; - - this.Promise = opts.Promise || Promise; - - // format: {key : [fn, fn]} - // queues[key] = null indicates no job running for key - this.queues = Object.create(null); - - // lock is reentrant for same domain - this.domainReentrant = opts.domainReentrant || false; - if (this.domainReentrant) { - if (typeof process === 'undefined' || typeof process.domain === 'undefined') { - throw new Error( - 'Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, ' + - 'use a NodeJS version that still implements Domain, or install a browser polyfill.'); - } - // domain of current running func {key : fn} - this.domains = Object.create(null); - } - - this.timeout = opts.timeout || AsyncLock.DEFAULT_TIMEOUT; - this.maxOccupationTime = opts.maxOccupationTime || AsyncLock.DEFAULT_MAX_OCCUPATION_TIME; - this.maxExecutionTime = opts.maxExecutionTime || AsyncLock.DEFAULT_MAX_EXECUTION_TIME; - if (opts.maxPending === Infinity || (Number.isInteger(opts.maxPending) && opts.maxPending >= 0)) { - this.maxPending = opts.maxPending; - } else { - this.maxPending = AsyncLock.DEFAULT_MAX_PENDING; - } -}; - -AsyncLock.DEFAULT_TIMEOUT = 0; //Never -AsyncLock.DEFAULT_MAX_OCCUPATION_TIME = 0; //Never -AsyncLock.DEFAULT_MAX_EXECUTION_TIME = 0; //Never -AsyncLock.DEFAULT_MAX_PENDING = 1000; - -/** - * Acquire Locks - * - * @param {String|Array} key resource key or keys to lock - * @param {function} fn async function - * @param {function} cb callback function, otherwise will return a promise - * @param {Object} opts options - */ -AsyncLock.prototype.acquire = function (key, fn, cb, opts) { - if (Array.isArray(key)) { - return this._acquireBatch(key, fn, cb, opts); - } - - if (typeof (fn) !== 'function') { - throw new Error('You must pass a function to execute'); - } - - // faux-deferred promise using new Promise() (as Promise.defer is deprecated) - var deferredResolve = null; - var deferredReject = null; - var deferred = null; - - if (typeof (cb) !== 'function') { - opts = cb; - cb = null; - - // will return a promise - deferred = new this.Promise(function(resolve, reject) { - deferredResolve = resolve; - deferredReject = reject; - }); - } - - opts = opts || {}; - - var resolved = false; - var timer = null; - var occupationTimer = null; - var executionTimer = null; - var self = this; - - var done = function (locked, err, ret) { - - if (occupationTimer) { - clearTimeout(occupationTimer); - occupationTimer = null; - } - - if (executionTimer) { - clearTimeout(executionTimer); - executionTimer = null; - } - - if (locked) { - if (!!self.queues[key] && self.queues[key].length === 0) { - delete self.queues[key]; - } - if (self.domainReentrant) { - delete self.domains[key]; - } - } - - if (!resolved) { - if (!deferred) { - if (typeof (cb) === 'function') { - cb(err, ret); - } - } - else { - //promise mode - if (err) { - deferredReject(err); - } - else { - deferredResolve(ret); - } - } - resolved = true; - } - - if (locked) { - //run next func - if (!!self.queues[key] && self.queues[key].length > 0) { - self.queues[key].shift()(); - } - } - }; - - var exec = function (locked) { - if (resolved) { // may due to timed out - return done(locked); - } - - if (timer) { - clearTimeout(timer); - timer = null; - } - - if (self.domainReentrant && locked) { - self.domains[key] = process.domain; - } - - var maxExecutionTime = opts.maxExecutionTime || self.maxExecutionTime; - if (maxExecutionTime) { - executionTimer = setTimeout(function () { - if (!!self.queues[key]) { - done(locked, new Error('Maximum execution time is exceeded ' + key)); - } - }, maxExecutionTime); - } - - // Callback mode - if (fn.length === 1) { - var called = false; - try { - fn(function (err, ret) { - if (!called) { - called = true; - done(locked, err, ret); - } - }); - } catch (err) { - // catching error thrown in user function fn - if (!called) { - called = true; - done(locked, err); - } - } - } - else { - // Promise mode - self._promiseTry(function () { - return fn(); - }) - .then(function(ret){ - done(locked, undefined, ret); - }, function(error){ - done(locked, error); - }); - } - }; - - if (self.domainReentrant && !!process.domain) { - exec = process.domain.bind(exec); - } - - var maxPending = opts.maxPending || self.maxPending; - - if (!self.queues[key]) { - self.queues[key] = []; - exec(true); - } - else if (self.domainReentrant && !!process.domain && process.domain === self.domains[key]) { - // If code is in the same domain of current running task, run it directly - // Since lock is re-enterable - exec(false); - } - else if (self.queues[key].length >= maxPending) { - done(false, new Error('Too many pending tasks in queue ' + key)); - } - else { - var taskFn = function () { - exec(true); - }; - if (opts.skipQueue) { - self.queues[key].unshift(taskFn); - } else { - self.queues[key].push(taskFn); - } - - var timeout = opts.timeout || self.timeout; - if (timeout) { - timer = setTimeout(function () { - timer = null; - done(false, new Error('async-lock timed out in queue ' + key)); - }, timeout); - } - } - - var maxOccupationTime = opts.maxOccupationTime || self.maxOccupationTime; - if (maxOccupationTime) { - occupationTimer = setTimeout(function () { - if (!!self.queues[key]) { - done(false, new Error('Maximum occupation time is exceeded in queue ' + key)); - } - }, maxOccupationTime); - } - - if (deferred) { - return deferred; - } -}; - -/* - * Below is how this function works: - * - * Equivalent code: - * self.acquire(key1, function(cb){ - * self.acquire(key2, function(cb){ - * self.acquire(key3, fn, cb); - * }, cb); - * }, cb); - * - * Equivalent code: - * var fn3 = getFn(key3, fn); - * var fn2 = getFn(key2, fn3); - * var fn1 = getFn(key1, fn2); - * fn1(cb); - */ -AsyncLock.prototype._acquireBatch = function (keys, fn, cb, opts) { - if (typeof (cb) !== 'function') { - opts = cb; - cb = null; - } - - var self = this; - var getFn = function (key, fn) { - return function (cb) { - self.acquire(key, fn, cb, opts); - }; - }; - - var fnx = keys.reduceRight(function (prev, key) { - return getFn(key, prev); - }, fn); - - if (typeof (cb) === 'function') { - fnx(cb); - } - else { - return new this.Promise(function (resolve, reject) { - // check for promise mode in case keys is empty array - if (fnx.length === 1) { - fnx(function (err, ret) { - if (err) { - reject(err); - } - else { - resolve(ret); - } - }); - } else { - resolve(fnx()); - } - }); - } -}; - -/* - * Whether there is any running or pending asyncFunc - * - * @param {String} key - */ -AsyncLock.prototype.isBusy = function (key) { - if (!key) { - return Object.keys(this.queues).length > 0; - } - else { - return !!this.queues[key]; - } -}; - -/** - * Promise.try() implementation to become independent of Q-specific methods - */ -AsyncLock.prototype._promiseTry = function(fn) { - try { - return this.Promise.resolve(fn()); - } catch (e) { - return this.Promise.reject(e); - } -}; - -module.exports = AsyncLock; diff --git a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/package.json b/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/package.json deleted file mode 100644 index dab3bd9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "async-lock", - "description": "Lock on asynchronous code", - "version": "1.4.1", - "author": { - "name": "Rogier Schouten", - "url": "https://github.com/rogierschouten/", - "email": "github@workingcode.ninja" - }, - "private": false, - "homepage": "https://github.com/rogierschouten/async-lock", - "repository": { - "type": "git", - "url": "git+https://github.com/rogierschouten/async-lock.git" - }, - "bugs": { - "url": "https://github.com/rogierschouten/async-lock/issues" - }, - "license": "MIT", - "keywords": [ - "lock", - "async", - "concurrency", - "critical", - "section", - "mutex" - ], - "engines": {}, - "scripts": { - "start": "grunt", - "test": "grunt test" - }, - "devDependencies": { - "bluebird": "^3.5.1", - "grunt": "^1.0.4", - "grunt-cli": "^1.2.0", - "grunt-contrib-clean": "^1.1.0", - "grunt-contrib-jshint": "^3.2.0", - "grunt-contrib-watch": "^1.1.0", - "grunt-env": "^1.0.1", - "grunt-mocha-test": "^0.13.3", - "load-grunt-tasks": "^4.0.0", - "lodash": "^4.17.20", - "mocha": "^10.2.0", - "q": "^1.5.1", - "should": "^13.2.1" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/LICENSE b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/LICENSE deleted file mode 100644 index cb6f7bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Christian Speckner - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/README.md b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/README.md deleted file mode 100644 index 95c30b8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/README.md +++ /dev/null @@ -1,540 +0,0 @@ -[![Build status](https://github.com/DirtyHairy/async-mutex/workflows/Build%20and%20Tests/badge.svg)](https://github.com/DirtyHairy/async-mutex/actions?query=workflow%3A%22Build+and+Tests%22) -[![NPM version](https://badge.fury.io/js/async-mutex.svg)](https://badge.fury.io/js/async-mutex) -[![Coverage Status](https://coveralls.io/repos/github/DirtyHairy/async-mutex/badge.svg?branch=master)](https://coveralls.io/github/DirtyHairy/async-mutex?branch=master) - -# What is it? - -This package implements primitives for synchronizing asynchronous operations in -Javascript. - -## Mutex - -The term "mutex" usually refers to a data structure used to synchronize -concurrent processes running on different threads. For example, before accessing -a non-threadsafe resource, a thread will lock the mutex. This is guaranteed -to block the thread until no other thread holds a lock on the mutex and thus -enforces exclusive access to the resource. Once the operation is complete, the -thread releases the lock, allowing other threads to acquire a lock and access the -resource. - -While Javascript is strictly single-threaded, the asynchronous nature of its -execution model allows for race conditions that require similar synchronization -primitives. Consider for example a library communicating with a web worker that -needs to exchange several subsequent messages with the worker in order to achieve -a task. As these messages are exchanged in an asynchronous manner, it is perfectly -possible that the library is called again during this process. Depending on the -way state is handled during the async process, this will lead to race conditions -that are hard to fix and even harder to track down. - -This library solves the problem by applying the concept of mutexes to Javascript. -Locking the mutex will return a promise that resolves once the mutex becomes -available. Once the async process is complete (usually taking multiple -spins of the event loop), a callback supplied to the caller should be called in order -to release the mutex, allowing the next scheduled worker to execute. - -# Semaphore - -Imagine a situation where you need to control access to several instances of -a shared resource. For example, you might want to distribute images between several -worker processes that perform transformations, or you might want to create a web -crawler that performs a defined number of requests in parallel. - -A semaphore is a data structure that is initialized with an arbitrary integer value and that -can be locked multiple times. -As long as the semaphore value is positive, locking it will return the current value -and the locking process will continue execution immediately; the semaphore will -be decremented upon locking. Releasing the lock will increment the semaphore again. - -Once the semaphore has reached zero, the next process that attempts to acquire a lock -will be suspended until another process releases its lock and this increments the semaphore -again. - -This library provides a semaphore implementation for Javascript that is similar to the -mutex implementation described above. - -# How to use it? - -## Installation - -You can install the library into your project via npm - - npm install async-mutex - -The library is written in TypeScript and will work in any environment that -supports ES5, ES6 promises and `Array.isArray`. On ancient browsers, -a shim can be used (e.g. [core-js](https://github.com/zloirock/core-js)). -No external typings are required for using this library with -TypeScript (version >= 2). - -Starting with Node 12.16 and 13.7, native ES6 style imports are supported. - -**WARNING:** Node 13 versions < 13.2.0 fail to import this package correctly. -Node 12 and earlier are fine, as are newer versions of Node 13. - -## Importing - -**CommonJS:** -```javascript -var Mutex = require('async-mutex').Mutex; -var Semaphore = require('async-mutex').Semaphore; -var withTimeout = require('async-mutex').withTimeout; -``` - -**ES6:** -```javascript -import {Mutex, Semaphore, withTimeout} from 'async-mutex'; -``` - -**TypeScript:** -```typescript -import {Mutex, MutexInterface, Semaphore, SemaphoreInterface, withTimeout} from 'async-mutex'; -``` - -With the latest version of Node, native ES6 style imports are supported. - -## Mutex API - -### Creating - -```typescript -const mutex = new Mutex(); -``` - -Create a new mutex. - -### Synchronized code execution - -Promise style: -```typescript -mutex - .runExclusive(() => { - // ... - }) - .then((result) => { - // ... - }); -``` - -async/await: -```typescript -await mutex.runExclusive(async () => { - // ... -}); -``` - -`runExclusive` schedules the supplied callback to be run once the mutex is unlocked. -The function may return a promise. Once the promise is resolved or rejected (or immediately after -execution if an immediate value was returned), -the mutex is released. `runExclusive` returns a promise that adopts the state of the function result. - -The mutex is released and the result rejected if an exception occurs during execution -of the callback. - -### Manual locking / releasing - -Promise style: -```typescript -mutex - .acquire() - .then(function(release) { - // ... - - release(); - }); -``` - -async/await: -```typescript -const release = await mutex.acquire(); -try { - // ... -} finally { - release(); -} -``` - -`acquire` returns an (ES6) promise that will resolve as soon as the mutex is -available. The promise resolves with a function `release` that -must be called once the mutex should be released again. The `release` callback -is idempotent. - -**IMPORTANT:** Failure to call `release` will hold the mutex locked and will -likely deadlock the application. Make sure to call `release` under all circumstances -and handle exceptions accordingly. - -### Unscoped release - -As an alternative to calling the `release` callback returned by `acquire`, the mutex -can be released by calling `release` directly on it: - -```typescript -mutex.release(); -``` - -### Checking whether the mutex is locked - -```typescript -mutex.isLocked(); -``` - -### Cancelling pending locks - -Pending locks can be cancelled by calling `cancel()` on the mutex. This will reject -all pending locks with `E_CANCELED`: - -Promise style: -```typescript -import {E_CANCELED} from 'async-mutex'; - -mutex - .runExclusive(() => { - // ... - }) - .then(() => { - // ... - }) - .catch(e => { - if (e === E_CANCELED) { - // ... - } - }); -``` - -async/await: -```typescript -import {E_CANCELED} from 'async-mutex'; - -try { - await mutex.runExclusive(() => { - // ... - }); -} catch (e) { - if (e === E_CANCELED) { - // ... - } -} -``` - -This works with `acquire`, too: -if `acquire` is used for locking, the resulting promise will reject with `E_CANCELED`. - -The error that is thrown can be customized by passing a different error to the `Mutex` -constructor: - -```typescript -const mutex = new Mutex(new Error('fancy custom error')); -``` - -Note that while all pending locks are cancelled, a currently held lock will not be -revoked. In consequence, the mutex may not be available even after `cancel()` has been called. - -### Waiting until the mutex is available - -You can wait until the mutex is available without locking it by calling `waitForUnlock()`. -This will return a promise that resolve once the mutex can be acquired again. This operation -will not lock the mutex, and there is no guarantee that the mutex will still be available -once an async barrier has been encountered. - -Promise style: -```typescript -mutex - .waitForUnlock() - .then(() => { - // ... - }); -``` - -Async/await: -```typescript -await mutex.waitForUnlock(); -// ... -``` - - -## Semaphore API - -### Creating - -```typescript -const semaphore = new Semaphore(initialValue); -``` - -Creates a new semaphore. `initialValue` is an arbitrary integer that defines the -initial value of the semaphore. - -### Synchronized code execution - -Promise style: -```typescript -semaphore - .runExclusive(function(value) { - // ... - }) - .then(function(result) { - // ... - }); -``` - -async/await: -```typescript -await semaphore.runExclusive(async (value) => { - // ... -}); -``` - -`runExclusive` schedules the supplied callback to be run once the semaphore is available. -The callback will receive the current value of the semaphore as its argument. -The function may return a promise. Once the promise is resolved or rejected (or immediately after -execution if an immediate value was returned), -the semaphore is released. `runExclusive` returns a promise that adopts the state of the function result. - -The semaphore is released and the result rejected if an exception occurs during execution -of the callback. - -`runExclusive` accepts a first optional argument `weight`. Specifying a `weight` will decrement the -semaphore by the specified value, and the callback will only be invoked once the semaphore's -value greater or equal to `weight`. - -`runExclusive` accepts a second optional argument `priority`. Specifying a greater value for `priority` -tells the scheduler to run this task before other tasks. `priority` can be any real number. The default -is zero. - -### Manual locking / releasing - -Promise style: -```typescript -semaphore - .acquire() - .then(function([value, release]) { - // ... - - release(); - }); -``` - -async/await: -```typescript -const [value, release] = await semaphore.acquire(); -try { - // ... -} finally { - release(); -} -``` - -`acquire` returns an (ES6) promise that will resolve as soon as the semaphore is -available. The promise resolves to an array with the -first entry being the current value of the semaphore, and the second value a -function that must be called to release the semaphore once the critical operation -has completed. The `release` callback is idempotent. - -**IMPORTANT:** Failure to call `release` will hold the semaphore locked and will -likely deadlock the application. Make sure to call `release` under all circumstances -and handle exceptions accordingly. - -`acquire` accepts a first optional argument `weight`. Specifying a `weight` will decrement the -semaphore by the specified value, and the semaphore will only be acquired once its -value is greater or equal to `weight`. - -`acquire` accepts a second optional argument `priority`. Specifying a greater value for `priority` -tells the scheduler to release the semaphore to the caller before other callers. `priority` can be -any real number. The default is zero. - -### Unscoped release - -As an alternative to calling the `release` callback returned by `acquire`, the semaphore -can be released by calling `release` directly on it: - -```typescript -semaphore.release(); -``` - -`release` accepts an optional argument `weight` and increments the semaphore accordingly. - -**IMPORTANT:** Releasing a previously acquired semaphore with the releaser that was -returned by acquire will automatically increment the semaphore by the correct weight. If -you release by calling the unscoped `release` you have to supply the correct weight -yourself! - -### Getting the semaphore value - -```typescript -semaphore.getValue() -``` - -### Checking whether the semaphore is locked - -```typescript -semaphore.isLocked(); -``` - -The semaphore is considered to be locked if its value is either zero or negative. - -### Setting the semaphore value - -The value of a semaphore can be set directly to a desired value. A positive value will -cause the semaphore to schedule any pending waiters accordingly. - -```typescript -semaphore.setValue(); -``` - -### Cancelling pending locks - -Pending locks can be cancelled by calling `cancel()` on the semaphore. This will reject -all pending locks with `E_CANCELED`: - -Promise style: -```typescript -import {E_CANCELED} from 'async-mutex'; - -semaphore - .runExclusive(() => { - // ... - }) - .then(() => { - // ... - }) - .catch(e => { - if (e === E_CANCELED) { - // ... - } - }); -``` - -async/await: -```typescript -import {E_CANCELED} from 'async-mutex'; - -try { - await semaphore.runExclusive(() => { - // ... - }); -} catch (e) { - if (e === E_CANCELED) { - // ... - } -} -``` - -This works with `acquire`, too: -if `acquire` is used for locking, the resulting promise will reject with `E_CANCELED`. - -The error that is thrown can be customized by passing a different error to the `Semaphore` -constructor: - -```typescript -const semaphore = new Semaphore(2, new Error('fancy custom error')); -``` - -Note that while all pending locks are cancelled, any currently held locks will not be -revoked. In consequence, the semaphore may not be available even after `cancel()` has been called. - -### Waiting until the semaphore is available - -You can wait until the semaphore is available without locking it by calling `waitForUnlock()`. -This will return a promise that resolve once the semaphore can be acquired again. This operation -will not lock the semaphore, and there is no guarantee that the semaphore will still be available -once an async barrier has been encountered. - -Promise style: -```typescript -semaphore - .waitForUnlock() - .then(() => { - // ... - }); -``` - -Async/await: -```typescript -await semaphore.waitForUnlock(); -// ... -``` - -`waitForUnlock` accepts optional arguments `weight` and `priority`. The promise will resolve as soon -as it is possible to `acquire` the semaphore with the given weight and priority. Scheduled tasks with -the greatest `priority` values execute first. - - -## Limiting the time waiting for a mutex or semaphore to become available - -Sometimes it is desirable to limit the time a program waits for a mutex or -semaphore to become available. The `withTimeout` decorator can be applied -to both semaphores and mutexes and changes the behavior of `acquire` and -`runExclusive` accordingly. - -```typescript -import {withTimeout, E_TIMEOUT} from 'async-mutex'; - -const mutexWithTimeout = withTimeout(new Mutex(), 100); -const semaphoreWithTimeout = withTimeout(new Semaphore(5), 100); -``` - -The API of the decorated mutex or semaphore is unchanged. - -The second argument of `withTimeout` is the timeout in milliseconds. After the -timeout is exceeded, the promise returned by `acquire` and `runExclusive` will -reject with `E_TIMEOUT`. The latter will not run the provided callback in case -of an timeout. - -The third argument of `withTimeout` is optional and can be used to -customize the error with which the promise is rejected. - -```typescript -const mutexWithTimeout = withTimeout(new Mutex(), 100, new Error('new fancy error')); -const semaphoreWithTimeout = withTimeout(new Semaphore(5), 100, new Error('new fancy error')); -``` - -### Failing early if the mutex or semaphore is not available - -A shortcut exists for the case where you do not want to wait for a lock to -be available at all. The `tryAcquire` decorator can be applied to both mutexes -and semaphores and changes the behavior of `acquire` and `runExclusive` to -immediately throw `E_ALREADY_LOCKED` if the mutex is not available. - -Promise style: -```typescript -import {tryAcquire, E_ALREADY_LOCKED} from 'async-mutex'; - -tryAcquire(semaphoreOrMutex) - .runExclusive(() => { - // ... - }) - .then(() => { - // ... - }) - .catch(e => { - if (e === E_ALREADY_LOCKED) { - // ... - } - }); -``` - -async/await: -```typescript -import {tryAcquire, E_ALREADY_LOCKED} from 'async-mutex'; - -try { - await tryAcquire(semaphoreOrMutex).runExclusive(() => { - // ... - }); -} catch (e) { - if (e === E_ALREADY_LOCKED) { - // ... - } -} -``` - -Again, the error can be customized by providing a custom error as second argument to -`tryAcquire`. - -```typescript -tryAcquire(semaphoreOrMutex, new Error('new fancy error')) - .runExclusive(() => { - // ... - }); -``` -# License - -Feel free to use this library under the conditions of the MIT license. diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/Mutex.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/Mutex.js deleted file mode 100644 index 0a06ff9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/Mutex.js +++ /dev/null @@ -1,41 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import Semaphore from './Semaphore'; -var Mutex = /** @class */ (function () { - function Mutex(cancelError) { - this._semaphore = new Semaphore(1, cancelError); - } - Mutex.prototype.acquire = function () { - return __awaiter(this, arguments, void 0, function (priority) { - var _a, releaser; - if (priority === void 0) { priority = 0; } - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, this._semaphore.acquire(1, priority)]; - case 1: - _a = _b.sent(), releaser = _a[1]; - return [2 /*return*/, releaser]; - } - }); - }); - }; - Mutex.prototype.runExclusive = function (callback, priority) { - if (priority === void 0) { priority = 0; } - return this._semaphore.runExclusive(function () { return callback(); }, 1, priority); - }; - Mutex.prototype.isLocked = function () { - return this._semaphore.isLocked(); - }; - Mutex.prototype.waitForUnlock = function (priority) { - if (priority === void 0) { priority = 0; } - return this._semaphore.waitForUnlock(1, priority); - }; - Mutex.prototype.release = function () { - if (this._semaphore.isLocked()) - this._semaphore.release(); - }; - Mutex.prototype.cancel = function () { - return this._semaphore.cancel(); - }; - return Mutex; -}()); -export default Mutex; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/MutexInterface.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/MutexInterface.js deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/MutexInterface.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/Semaphore.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/Semaphore.js deleted file mode 100644 index 5eb505b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/Semaphore.js +++ /dev/null @@ -1,153 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import { E_CANCELED } from './errors'; -var Semaphore = /** @class */ (function () { - function Semaphore(_value, _cancelError) { - if (_cancelError === void 0) { _cancelError = E_CANCELED; } - this._value = _value; - this._cancelError = _cancelError; - this._queue = []; - this._weightedWaiters = []; - } - Semaphore.prototype.acquire = function (weight, priority) { - var _this = this; - if (weight === void 0) { weight = 1; } - if (priority === void 0) { priority = 0; } - if (weight <= 0) - throw new Error("invalid weight ".concat(weight, ": must be positive")); - return new Promise(function (resolve, reject) { - var task = { resolve: resolve, reject: reject, weight: weight, priority: priority }; - var i = findIndexFromEnd(_this._queue, function (other) { return priority <= other.priority; }); - if (i === -1 && weight <= _this._value) { - // Needs immediate dispatch, skip the queue - _this._dispatchItem(task); - } - else { - _this._queue.splice(i + 1, 0, task); - } - }); - }; - Semaphore.prototype.runExclusive = function (callback_1) { - return __awaiter(this, arguments, void 0, function (callback, weight, priority) { - var _a, value, release; - if (weight === void 0) { weight = 1; } - if (priority === void 0) { priority = 0; } - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, this.acquire(weight, priority)]; - case 1: - _a = _b.sent(), value = _a[0], release = _a[1]; - _b.label = 2; - case 2: - _b.trys.push([2, , 4, 5]); - return [4 /*yield*/, callback(value)]; - case 3: return [2 /*return*/, _b.sent()]; - case 4: - release(); - return [7 /*endfinally*/]; - case 5: return [2 /*return*/]; - } - }); - }); - }; - Semaphore.prototype.waitForUnlock = function (weight, priority) { - var _this = this; - if (weight === void 0) { weight = 1; } - if (priority === void 0) { priority = 0; } - if (weight <= 0) - throw new Error("invalid weight ".concat(weight, ": must be positive")); - if (this._couldLockImmediately(weight, priority)) { - return Promise.resolve(); - } - else { - return new Promise(function (resolve) { - if (!_this._weightedWaiters[weight - 1]) - _this._weightedWaiters[weight - 1] = []; - insertSorted(_this._weightedWaiters[weight - 1], { resolve: resolve, priority: priority }); - }); - } - }; - Semaphore.prototype.isLocked = function () { - return this._value <= 0; - }; - Semaphore.prototype.getValue = function () { - return this._value; - }; - Semaphore.prototype.setValue = function (value) { - this._value = value; - this._dispatchQueue(); - }; - Semaphore.prototype.release = function (weight) { - if (weight === void 0) { weight = 1; } - if (weight <= 0) - throw new Error("invalid weight ".concat(weight, ": must be positive")); - this._value += weight; - this._dispatchQueue(); - }; - Semaphore.prototype.cancel = function () { - var _this = this; - this._queue.forEach(function (entry) { return entry.reject(_this._cancelError); }); - this._queue = []; - }; - Semaphore.prototype._dispatchQueue = function () { - this._drainUnlockWaiters(); - while (this._queue.length > 0 && this._queue[0].weight <= this._value) { - this._dispatchItem(this._queue.shift()); - this._drainUnlockWaiters(); - } - }; - Semaphore.prototype._dispatchItem = function (item) { - var previousValue = this._value; - this._value -= item.weight; - item.resolve([previousValue, this._newReleaser(item.weight)]); - }; - Semaphore.prototype._newReleaser = function (weight) { - var _this = this; - var called = false; - return function () { - if (called) - return; - called = true; - _this.release(weight); - }; - }; - Semaphore.prototype._drainUnlockWaiters = function () { - if (this._queue.length === 0) { - for (var weight = this._value; weight > 0; weight--) { - var waiters = this._weightedWaiters[weight - 1]; - if (!waiters) - continue; - waiters.forEach(function (waiter) { return waiter.resolve(); }); - this._weightedWaiters[weight - 1] = []; - } - } - else { - var queuedPriority_1 = this._queue[0].priority; - for (var weight = this._value; weight > 0; weight--) { - var waiters = this._weightedWaiters[weight - 1]; - if (!waiters) - continue; - var i = waiters.findIndex(function (waiter) { return waiter.priority <= queuedPriority_1; }); - (i === -1 ? waiters : waiters.splice(0, i)) - .forEach((function (waiter) { return waiter.resolve(); })); - } - } - }; - Semaphore.prototype._couldLockImmediately = function (weight, priority) { - return (this._queue.length === 0 || this._queue[0].priority < priority) && - weight <= this._value; - }; - return Semaphore; -}()); -function insertSorted(a, v) { - var i = findIndexFromEnd(a, function (other) { return v.priority <= other.priority; }); - a.splice(i + 1, 0, v); -} -function findIndexFromEnd(a, predicate) { - for (var i = a.length - 1; i >= 0; i--) { - if (predicate(a[i])) { - return i; - } - } - return -1; -} -export default Semaphore; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/SemaphoreInterface.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/SemaphoreInterface.js deleted file mode 100644 index cb0ff5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/SemaphoreInterface.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/errors.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/errors.js deleted file mode 100644 index 6b3eddd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/errors.js +++ /dev/null @@ -1,3 +0,0 @@ -export var E_TIMEOUT = new Error('timeout while waiting for mutex to become available'); -export var E_ALREADY_LOCKED = new Error('mutex already locked'); -export var E_CANCELED = new Error('request for lock canceled'); diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/index.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/index.js deleted file mode 100644 index f1859de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/index.js +++ /dev/null @@ -1,5 +0,0 @@ -export { default as Mutex } from './Mutex'; -export { default as Semaphore } from './Semaphore'; -export { withTimeout } from './withTimeout'; -export { tryAcquire } from './tryAcquire'; -export * from './errors'; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/tryAcquire.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/tryAcquire.js deleted file mode 100644 index 20e5781..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/tryAcquire.js +++ /dev/null @@ -1,8 +0,0 @@ -import { E_ALREADY_LOCKED } from './errors'; -import { withTimeout } from './withTimeout'; -// eslint-disable-next-lisne @typescript-eslint/explicit-module-boundary-types -export function tryAcquire(sync, alreadyAcquiredError) { - if (alreadyAcquiredError === void 0) { alreadyAcquiredError = E_ALREADY_LOCKED; } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return withTimeout(sync, 0, alreadyAcquiredError); -} diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/withTimeout.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/withTimeout.js deleted file mode 100644 index fb5267c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/es6/withTimeout.js +++ /dev/null @@ -1,124 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { E_TIMEOUT } from './errors'; -export function withTimeout(sync, timeout, timeoutError) { - var _this = this; - if (timeoutError === void 0) { timeoutError = E_TIMEOUT; } - return { - acquire: function (weightOrPriority, priority) { - var weight; - if (isSemaphore(sync)) { - weight = weightOrPriority; - } - else { - weight = undefined; - priority = weightOrPriority; - } - if (weight !== undefined && weight <= 0) { - throw new Error("invalid weight ".concat(weight, ": must be positive")); - } - return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () { - var isTimeout, handle, ticket, release, e_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - isTimeout = false; - handle = setTimeout(function () { - isTimeout = true; - reject(timeoutError); - }, timeout); - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, (isSemaphore(sync) - ? sync.acquire(weight, priority) - : sync.acquire(priority))]; - case 2: - ticket = _a.sent(); - if (isTimeout) { - release = Array.isArray(ticket) ? ticket[1] : ticket; - release(); - } - else { - clearTimeout(handle); - resolve(ticket); - } - return [3 /*break*/, 4]; - case 3: - e_1 = _a.sent(); - if (!isTimeout) { - clearTimeout(handle); - reject(e_1); - } - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }); }); - }, - runExclusive: function (callback, weight, priority) { - return __awaiter(this, void 0, void 0, function () { - var release, ticket; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - release = function () { return undefined; }; - _a.label = 1; - case 1: - _a.trys.push([1, , 7, 8]); - return [4 /*yield*/, this.acquire(weight, priority)]; - case 2: - ticket = _a.sent(); - if (!Array.isArray(ticket)) return [3 /*break*/, 4]; - release = ticket[1]; - return [4 /*yield*/, callback(ticket[0])]; - case 3: return [2 /*return*/, _a.sent()]; - case 4: - release = ticket; - return [4 /*yield*/, callback()]; - case 5: return [2 /*return*/, _a.sent()]; - case 6: return [3 /*break*/, 8]; - case 7: - release(); - return [7 /*endfinally*/]; - case 8: return [2 /*return*/]; - } - }); - }); - }, - release: function (weight) { - sync.release(weight); - }, - cancel: function () { - return sync.cancel(); - }, - waitForUnlock: function (weightOrPriority, priority) { - var weight; - if (isSemaphore(sync)) { - weight = weightOrPriority; - } - else { - weight = undefined; - priority = weightOrPriority; - } - if (weight !== undefined && weight <= 0) { - throw new Error("invalid weight ".concat(weight, ": must be positive")); - } - return new Promise(function (resolve, reject) { - var handle = setTimeout(function () { return reject(timeoutError); }, timeout); - (isSemaphore(sync) - ? sync.waitForUnlock(weight, priority) - : sync.waitForUnlock(priority)).then(function () { - clearTimeout(handle); - resolve(); - }); - }); - }, - isLocked: function () { return sync.isLocked(); }, - getValue: function () { return sync.getValue(); }, - setValue: function (value) { return sync.setValue(value); }, - }; -} -function isSemaphore(sync) { - return sync.getValue !== undefined; -} diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/index.mjs b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/index.mjs deleted file mode 100644 index d32d6a5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/index.mjs +++ /dev/null @@ -1,291 +0,0 @@ -const E_TIMEOUT = new Error('timeout while waiting for mutex to become available'); -const E_ALREADY_LOCKED = new Error('mutex already locked'); -const E_CANCELED = new Error('request for lock canceled'); - -var __awaiter$2 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -class Semaphore { - constructor(_value, _cancelError = E_CANCELED) { - this._value = _value; - this._cancelError = _cancelError; - this._queue = []; - this._weightedWaiters = []; - } - acquire(weight = 1, priority = 0) { - if (weight <= 0) - throw new Error(`invalid weight ${weight}: must be positive`); - return new Promise((resolve, reject) => { - const task = { resolve, reject, weight, priority }; - const i = findIndexFromEnd(this._queue, (other) => priority <= other.priority); - if (i === -1 && weight <= this._value) { - // Needs immediate dispatch, skip the queue - this._dispatchItem(task); - } - else { - this._queue.splice(i + 1, 0, task); - } - }); - } - runExclusive(callback_1) { - return __awaiter$2(this, arguments, void 0, function* (callback, weight = 1, priority = 0) { - const [value, release] = yield this.acquire(weight, priority); - try { - return yield callback(value); - } - finally { - release(); - } - }); - } - waitForUnlock(weight = 1, priority = 0) { - if (weight <= 0) - throw new Error(`invalid weight ${weight}: must be positive`); - if (this._couldLockImmediately(weight, priority)) { - return Promise.resolve(); - } - else { - return new Promise((resolve) => { - if (!this._weightedWaiters[weight - 1]) - this._weightedWaiters[weight - 1] = []; - insertSorted(this._weightedWaiters[weight - 1], { resolve, priority }); - }); - } - } - isLocked() { - return this._value <= 0; - } - getValue() { - return this._value; - } - setValue(value) { - this._value = value; - this._dispatchQueue(); - } - release(weight = 1) { - if (weight <= 0) - throw new Error(`invalid weight ${weight}: must be positive`); - this._value += weight; - this._dispatchQueue(); - } - cancel() { - this._queue.forEach((entry) => entry.reject(this._cancelError)); - this._queue = []; - } - _dispatchQueue() { - this._drainUnlockWaiters(); - while (this._queue.length > 0 && this._queue[0].weight <= this._value) { - this._dispatchItem(this._queue.shift()); - this._drainUnlockWaiters(); - } - } - _dispatchItem(item) { - const previousValue = this._value; - this._value -= item.weight; - item.resolve([previousValue, this._newReleaser(item.weight)]); - } - _newReleaser(weight) { - let called = false; - return () => { - if (called) - return; - called = true; - this.release(weight); - }; - } - _drainUnlockWaiters() { - if (this._queue.length === 0) { - for (let weight = this._value; weight > 0; weight--) { - const waiters = this._weightedWaiters[weight - 1]; - if (!waiters) - continue; - waiters.forEach((waiter) => waiter.resolve()); - this._weightedWaiters[weight - 1] = []; - } - } - else { - const queuedPriority = this._queue[0].priority; - for (let weight = this._value; weight > 0; weight--) { - const waiters = this._weightedWaiters[weight - 1]; - if (!waiters) - continue; - const i = waiters.findIndex((waiter) => waiter.priority <= queuedPriority); - (i === -1 ? waiters : waiters.splice(0, i)) - .forEach((waiter => waiter.resolve())); - } - } - } - _couldLockImmediately(weight, priority) { - return (this._queue.length === 0 || this._queue[0].priority < priority) && - weight <= this._value; - } -} -function insertSorted(a, v) { - const i = findIndexFromEnd(a, (other) => v.priority <= other.priority); - a.splice(i + 1, 0, v); -} -function findIndexFromEnd(a, predicate) { - for (let i = a.length - 1; i >= 0; i--) { - if (predicate(a[i])) { - return i; - } - } - return -1; -} - -var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -class Mutex { - constructor(cancelError) { - this._semaphore = new Semaphore(1, cancelError); - } - acquire() { - return __awaiter$1(this, arguments, void 0, function* (priority = 0) { - const [, releaser] = yield this._semaphore.acquire(1, priority); - return releaser; - }); - } - runExclusive(callback, priority = 0) { - return this._semaphore.runExclusive(() => callback(), 1, priority); - } - isLocked() { - return this._semaphore.isLocked(); - } - waitForUnlock(priority = 0) { - return this._semaphore.waitForUnlock(1, priority); - } - release() { - if (this._semaphore.isLocked()) - this._semaphore.release(); - } - cancel() { - return this._semaphore.cancel(); - } -} - -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -function withTimeout(sync, timeout, timeoutError = E_TIMEOUT) { - return { - acquire: (weightOrPriority, priority) => { - let weight; - if (isSemaphore(sync)) { - weight = weightOrPriority; - } - else { - weight = undefined; - priority = weightOrPriority; - } - if (weight !== undefined && weight <= 0) { - throw new Error(`invalid weight ${weight}: must be positive`); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let isTimeout = false; - const handle = setTimeout(() => { - isTimeout = true; - reject(timeoutError); - }, timeout); - try { - const ticket = yield (isSemaphore(sync) - ? sync.acquire(weight, priority) - : sync.acquire(priority)); - if (isTimeout) { - const release = Array.isArray(ticket) ? ticket[1] : ticket; - release(); - } - else { - clearTimeout(handle); - resolve(ticket); - } - } - catch (e) { - if (!isTimeout) { - clearTimeout(handle); - reject(e); - } - } - })); - }, - runExclusive(callback, weight, priority) { - return __awaiter(this, void 0, void 0, function* () { - let release = () => undefined; - try { - const ticket = yield this.acquire(weight, priority); - if (Array.isArray(ticket)) { - release = ticket[1]; - return yield callback(ticket[0]); - } - else { - release = ticket; - return yield callback(); - } - } - finally { - release(); - } - }); - }, - release(weight) { - sync.release(weight); - }, - cancel() { - return sync.cancel(); - }, - waitForUnlock: (weightOrPriority, priority) => { - let weight; - if (isSemaphore(sync)) { - weight = weightOrPriority; - } - else { - weight = undefined; - priority = weightOrPriority; - } - if (weight !== undefined && weight <= 0) { - throw new Error(`invalid weight ${weight}: must be positive`); - } - return new Promise((resolve, reject) => { - const handle = setTimeout(() => reject(timeoutError), timeout); - (isSemaphore(sync) - ? sync.waitForUnlock(weight, priority) - : sync.waitForUnlock(priority)).then(() => { - clearTimeout(handle); - resolve(); - }); - }); - }, - isLocked: () => sync.isLocked(), - getValue: () => sync.getValue(), - setValue: (value) => sync.setValue(value), - }; -} -function isSemaphore(sync) { - return sync.getValue !== undefined; -} - -// eslint-disable-next-lisne @typescript-eslint/explicit-module-boundary-types -function tryAcquire(sync, alreadyAcquiredError = E_ALREADY_LOCKED) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return withTimeout(sync, 0, alreadyAcquiredError); -} - -export { E_ALREADY_LOCKED, E_CANCELED, E_TIMEOUT, Mutex, Semaphore, tryAcquire, withTimeout }; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Mutex.d.ts b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Mutex.d.ts deleted file mode 100644 index 420f63b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Mutex.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import MutexInterface from './MutexInterface'; -declare class Mutex implements MutexInterface { - constructor(cancelError?: Error); - acquire(priority?: number): Promise; - runExclusive(callback: MutexInterface.Worker, priority?: number): Promise; - isLocked(): boolean; - waitForUnlock(priority?: number): Promise; - release(): void; - cancel(): void; - private _semaphore; -} -export default Mutex; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Mutex.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Mutex.js deleted file mode 100644 index bc2097a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Mutex.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var Semaphore_1 = require("./Semaphore"); -var Mutex = /** @class */ (function () { - function Mutex(cancelError) { - this._semaphore = new Semaphore_1.default(1, cancelError); - } - Mutex.prototype.acquire = function () { - return tslib_1.__awaiter(this, arguments, void 0, function (priority) { - var _a, releaser; - if (priority === void 0) { priority = 0; } - return tslib_1.__generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, this._semaphore.acquire(1, priority)]; - case 1: - _a = _b.sent(), releaser = _a[1]; - return [2 /*return*/, releaser]; - } - }); - }); - }; - Mutex.prototype.runExclusive = function (callback, priority) { - if (priority === void 0) { priority = 0; } - return this._semaphore.runExclusive(function () { return callback(); }, 1, priority); - }; - Mutex.prototype.isLocked = function () { - return this._semaphore.isLocked(); - }; - Mutex.prototype.waitForUnlock = function (priority) { - if (priority === void 0) { priority = 0; } - return this._semaphore.waitForUnlock(1, priority); - }; - Mutex.prototype.release = function () { - if (this._semaphore.isLocked()) - this._semaphore.release(); - }; - Mutex.prototype.cancel = function () { - return this._semaphore.cancel(); - }; - return Mutex; -}()); -exports.default = Mutex; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/MutexInterface.d.ts b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/MutexInterface.d.ts deleted file mode 100644 index 53b37aa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/MutexInterface.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -interface MutexInterface { - acquire(priority?: number): Promise; - runExclusive(callback: MutexInterface.Worker, priority?: number): Promise; - waitForUnlock(priority?: number): Promise; - isLocked(): boolean; - release(): void; - cancel(): void; -} -declare namespace MutexInterface { - interface Releaser { - (): void; - } - interface Worker { - (): Promise | T; - } -} -export default MutexInterface; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/MutexInterface.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/MutexInterface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/MutexInterface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Semaphore.d.ts b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Semaphore.d.ts deleted file mode 100644 index e29b23d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Semaphore.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import SemaphoreInterface from './SemaphoreInterface'; -declare class Semaphore implements SemaphoreInterface { - private _value; - private _cancelError; - constructor(_value: number, _cancelError?: Error); - acquire(weight?: number, priority?: number): Promise<[number, SemaphoreInterface.Releaser]>; - runExclusive(callback: SemaphoreInterface.Worker, weight?: number, priority?: number): Promise; - waitForUnlock(weight?: number, priority?: number): Promise; - isLocked(): boolean; - getValue(): number; - setValue(value: number): void; - release(weight?: number): void; - cancel(): void; - private _dispatchQueue; - private _dispatchItem; - private _newReleaser; - private _drainUnlockWaiters; - private _couldLockImmediately; - private _queue; - private _weightedWaiters; -} -export default Semaphore; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Semaphore.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Semaphore.js deleted file mode 100644 index 77c76e6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/Semaphore.js +++ /dev/null @@ -1,155 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var errors_1 = require("./errors"); -var Semaphore = /** @class */ (function () { - function Semaphore(_value, _cancelError) { - if (_cancelError === void 0) { _cancelError = errors_1.E_CANCELED; } - this._value = _value; - this._cancelError = _cancelError; - this._queue = []; - this._weightedWaiters = []; - } - Semaphore.prototype.acquire = function (weight, priority) { - var _this = this; - if (weight === void 0) { weight = 1; } - if (priority === void 0) { priority = 0; } - if (weight <= 0) - throw new Error("invalid weight ".concat(weight, ": must be positive")); - return new Promise(function (resolve, reject) { - var task = { resolve: resolve, reject: reject, weight: weight, priority: priority }; - var i = findIndexFromEnd(_this._queue, function (other) { return priority <= other.priority; }); - if (i === -1 && weight <= _this._value) { - // Needs immediate dispatch, skip the queue - _this._dispatchItem(task); - } - else { - _this._queue.splice(i + 1, 0, task); - } - }); - }; - Semaphore.prototype.runExclusive = function (callback_1) { - return tslib_1.__awaiter(this, arguments, void 0, function (callback, weight, priority) { - var _a, value, release; - if (weight === void 0) { weight = 1; } - if (priority === void 0) { priority = 0; } - return tslib_1.__generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, this.acquire(weight, priority)]; - case 1: - _a = _b.sent(), value = _a[0], release = _a[1]; - _b.label = 2; - case 2: - _b.trys.push([2, , 4, 5]); - return [4 /*yield*/, callback(value)]; - case 3: return [2 /*return*/, _b.sent()]; - case 4: - release(); - return [7 /*endfinally*/]; - case 5: return [2 /*return*/]; - } - }); - }); - }; - Semaphore.prototype.waitForUnlock = function (weight, priority) { - var _this = this; - if (weight === void 0) { weight = 1; } - if (priority === void 0) { priority = 0; } - if (weight <= 0) - throw new Error("invalid weight ".concat(weight, ": must be positive")); - if (this._couldLockImmediately(weight, priority)) { - return Promise.resolve(); - } - else { - return new Promise(function (resolve) { - if (!_this._weightedWaiters[weight - 1]) - _this._weightedWaiters[weight - 1] = []; - insertSorted(_this._weightedWaiters[weight - 1], { resolve: resolve, priority: priority }); - }); - } - }; - Semaphore.prototype.isLocked = function () { - return this._value <= 0; - }; - Semaphore.prototype.getValue = function () { - return this._value; - }; - Semaphore.prototype.setValue = function (value) { - this._value = value; - this._dispatchQueue(); - }; - Semaphore.prototype.release = function (weight) { - if (weight === void 0) { weight = 1; } - if (weight <= 0) - throw new Error("invalid weight ".concat(weight, ": must be positive")); - this._value += weight; - this._dispatchQueue(); - }; - Semaphore.prototype.cancel = function () { - var _this = this; - this._queue.forEach(function (entry) { return entry.reject(_this._cancelError); }); - this._queue = []; - }; - Semaphore.prototype._dispatchQueue = function () { - this._drainUnlockWaiters(); - while (this._queue.length > 0 && this._queue[0].weight <= this._value) { - this._dispatchItem(this._queue.shift()); - this._drainUnlockWaiters(); - } - }; - Semaphore.prototype._dispatchItem = function (item) { - var previousValue = this._value; - this._value -= item.weight; - item.resolve([previousValue, this._newReleaser(item.weight)]); - }; - Semaphore.prototype._newReleaser = function (weight) { - var _this = this; - var called = false; - return function () { - if (called) - return; - called = true; - _this.release(weight); - }; - }; - Semaphore.prototype._drainUnlockWaiters = function () { - if (this._queue.length === 0) { - for (var weight = this._value; weight > 0; weight--) { - var waiters = this._weightedWaiters[weight - 1]; - if (!waiters) - continue; - waiters.forEach(function (waiter) { return waiter.resolve(); }); - this._weightedWaiters[weight - 1] = []; - } - } - else { - var queuedPriority_1 = this._queue[0].priority; - for (var weight = this._value; weight > 0; weight--) { - var waiters = this._weightedWaiters[weight - 1]; - if (!waiters) - continue; - var i = waiters.findIndex(function (waiter) { return waiter.priority <= queuedPriority_1; }); - (i === -1 ? waiters : waiters.splice(0, i)) - .forEach((function (waiter) { return waiter.resolve(); })); - } - } - }; - Semaphore.prototype._couldLockImmediately = function (weight, priority) { - return (this._queue.length === 0 || this._queue[0].priority < priority) && - weight <= this._value; - }; - return Semaphore; -}()); -function insertSorted(a, v) { - var i = findIndexFromEnd(a, function (other) { return v.priority <= other.priority; }); - a.splice(i + 1, 0, v); -} -function findIndexFromEnd(a, predicate) { - for (var i = a.length - 1; i >= 0; i--) { - if (predicate(a[i])) { - return i; - } - } - return -1; -} -exports.default = Semaphore; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/SemaphoreInterface.d.ts b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/SemaphoreInterface.d.ts deleted file mode 100644 index 84d6932..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/SemaphoreInterface.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -interface SemaphoreInterface { - acquire(weight?: number, priority?: number): Promise<[number, SemaphoreInterface.Releaser]>; - runExclusive(callback: SemaphoreInterface.Worker, weight?: number, priority?: number): Promise; - waitForUnlock(weight?: number, priority?: number): Promise; - isLocked(): boolean; - getValue(): number; - setValue(value: number): void; - release(weight?: number): void; - cancel(): void; -} -declare namespace SemaphoreInterface { - interface Releaser { - (): void; - } - interface Worker { - (value: number): Promise | T; - } -} -export default SemaphoreInterface; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/SemaphoreInterface.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/SemaphoreInterface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/SemaphoreInterface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/errors.d.ts b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/errors.d.ts deleted file mode 100644 index 52d2db3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/errors.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const E_TIMEOUT: Error; -export declare const E_ALREADY_LOCKED: Error; -export declare const E_CANCELED: Error; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/errors.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/errors.js deleted file mode 100644 index c539331..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/errors.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.E_CANCELED = exports.E_ALREADY_LOCKED = exports.E_TIMEOUT = void 0; -exports.E_TIMEOUT = new Error('timeout while waiting for mutex to become available'); -exports.E_ALREADY_LOCKED = new Error('mutex already locked'); -exports.E_CANCELED = new Error('request for lock canceled'); diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/index.d.ts b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/index.d.ts deleted file mode 100644 index df2a2d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { default as Mutex } from './Mutex'; -export { default as MutexInterface } from './MutexInterface'; -export { default as Semaphore } from './Semaphore'; -export { default as SemaphoreInterface } from './SemaphoreInterface'; -export { withTimeout } from './withTimeout'; -export { tryAcquire } from './tryAcquire'; -export * from './errors'; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/index.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/index.js deleted file mode 100644 index 0a57479..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/index.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.tryAcquire = exports.withTimeout = exports.Semaphore = exports.Mutex = void 0; -var tslib_1 = require("tslib"); -var Mutex_1 = require("./Mutex"); -Object.defineProperty(exports, "Mutex", { enumerable: true, get: function () { return Mutex_1.default; } }); -var Semaphore_1 = require("./Semaphore"); -Object.defineProperty(exports, "Semaphore", { enumerable: true, get: function () { return Semaphore_1.default; } }); -var withTimeout_1 = require("./withTimeout"); -Object.defineProperty(exports, "withTimeout", { enumerable: true, get: function () { return withTimeout_1.withTimeout; } }); -var tryAcquire_1 = require("./tryAcquire"); -Object.defineProperty(exports, "tryAcquire", { enumerable: true, get: function () { return tryAcquire_1.tryAcquire; } }); -tslib_1.__exportStar(require("./errors"), exports); diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/tryAcquire.d.ts b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/tryAcquire.d.ts deleted file mode 100644 index 0341fc0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/tryAcquire.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import MutexInterface from './MutexInterface'; -import SemaphoreInterface from './SemaphoreInterface'; -export declare function tryAcquire(mutex: MutexInterface, alreadyAcquiredError?: Error): MutexInterface; -export declare function tryAcquire(semaphore: SemaphoreInterface, alreadyAcquiredError?: Error): SemaphoreInterface; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/tryAcquire.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/tryAcquire.js deleted file mode 100644 index b975336..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/tryAcquire.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.tryAcquire = void 0; -var errors_1 = require("./errors"); -var withTimeout_1 = require("./withTimeout"); -// eslint-disable-next-lisne @typescript-eslint/explicit-module-boundary-types -function tryAcquire(sync, alreadyAcquiredError) { - if (alreadyAcquiredError === void 0) { alreadyAcquiredError = errors_1.E_ALREADY_LOCKED; } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return (0, withTimeout_1.withTimeout)(sync, 0, alreadyAcquiredError); -} -exports.tryAcquire = tryAcquire; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/withTimeout.d.ts b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/withTimeout.d.ts deleted file mode 100644 index 98912d8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/withTimeout.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import MutexInterface from './MutexInterface'; -import SemaphoreInterface from './SemaphoreInterface'; -export declare function withTimeout(mutex: MutexInterface, timeout: number, timeoutError?: Error): MutexInterface; -export declare function withTimeout(semaphore: SemaphoreInterface, timeout: number, timeoutError?: Error): SemaphoreInterface; diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/withTimeout.js b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/withTimeout.js deleted file mode 100644 index 1350a5b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/lib/withTimeout.js +++ /dev/null @@ -1,128 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withTimeout = void 0; -var tslib_1 = require("tslib"); -/* eslint-disable @typescript-eslint/no-explicit-any */ -var errors_1 = require("./errors"); -function withTimeout(sync, timeout, timeoutError) { - var _this = this; - if (timeoutError === void 0) { timeoutError = errors_1.E_TIMEOUT; } - return { - acquire: function (weightOrPriority, priority) { - var weight; - if (isSemaphore(sync)) { - weight = weightOrPriority; - } - else { - weight = undefined; - priority = weightOrPriority; - } - if (weight !== undefined && weight <= 0) { - throw new Error("invalid weight ".concat(weight, ": must be positive")); - } - return new Promise(function (resolve, reject) { return tslib_1.__awaiter(_this, void 0, void 0, function () { - var isTimeout, handle, ticket, release, e_1; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - isTimeout = false; - handle = setTimeout(function () { - isTimeout = true; - reject(timeoutError); - }, timeout); - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, (isSemaphore(sync) - ? sync.acquire(weight, priority) - : sync.acquire(priority))]; - case 2: - ticket = _a.sent(); - if (isTimeout) { - release = Array.isArray(ticket) ? ticket[1] : ticket; - release(); - } - else { - clearTimeout(handle); - resolve(ticket); - } - return [3 /*break*/, 4]; - case 3: - e_1 = _a.sent(); - if (!isTimeout) { - clearTimeout(handle); - reject(e_1); - } - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }); }); - }, - runExclusive: function (callback, weight, priority) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var release, ticket; - return tslib_1.__generator(this, function (_a) { - switch (_a.label) { - case 0: - release = function () { return undefined; }; - _a.label = 1; - case 1: - _a.trys.push([1, , 7, 8]); - return [4 /*yield*/, this.acquire(weight, priority)]; - case 2: - ticket = _a.sent(); - if (!Array.isArray(ticket)) return [3 /*break*/, 4]; - release = ticket[1]; - return [4 /*yield*/, callback(ticket[0])]; - case 3: return [2 /*return*/, _a.sent()]; - case 4: - release = ticket; - return [4 /*yield*/, callback()]; - case 5: return [2 /*return*/, _a.sent()]; - case 6: return [3 /*break*/, 8]; - case 7: - release(); - return [7 /*endfinally*/]; - case 8: return [2 /*return*/]; - } - }); - }); - }, - release: function (weight) { - sync.release(weight); - }, - cancel: function () { - return sync.cancel(); - }, - waitForUnlock: function (weightOrPriority, priority) { - var weight; - if (isSemaphore(sync)) { - weight = weightOrPriority; - } - else { - weight = undefined; - priority = weightOrPriority; - } - if (weight !== undefined && weight <= 0) { - throw new Error("invalid weight ".concat(weight, ": must be positive")); - } - return new Promise(function (resolve, reject) { - var handle = setTimeout(function () { return reject(timeoutError); }, timeout); - (isSemaphore(sync) - ? sync.waitForUnlock(weight, priority) - : sync.waitForUnlock(priority)).then(function () { - clearTimeout(handle); - resolve(); - }); - }); - }, - isLocked: function () { return sync.isLocked(); }, - getValue: function () { return sync.getValue(); }, - setValue: function (value) { return sync.setValue(value); }, - }; -} -exports.withTimeout = withTimeout; -function isSemaphore(sync) { - return sync.getValue !== undefined; -} diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/package.json b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/package.json deleted file mode 100644 index af2f2ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "async-mutex", - "version": "0.5.0", - "description": "A mutex for guarding async workflows", - "scripts": { - "lint": "eslint src/**/*.ts test/**/*.ts", - "build": "tsc && tsc -p tsconfig.es6.json && tsc -p tsconfig.mjs.json && rollup -o index.mjs mjs/index.js", - "prepublishOnly": "yarn test && yarn build", - "test": "yarn lint && nyc --reporter=text --reporter=html --reporter=lcov mocha test/*.ts", - "coveralls": "cat ./coverage/lcov.info | coveralls" - }, - "author": "Christian Speckner (https://github.com/DirtyHairy/)", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/DirtyHairy/async-mutex" - }, - "prettier": { - "printWidth": 120, - "tabWidth": 4, - "singleQuote": true, - "parser": "typescript" - }, - "importSort": { - ".js, .jsx, .ts, .tsx": { - "style": "eslint", - "parser": "typescript" - } - }, - "eslintConfig": { - "root": true, - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint" - ], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - "rules": { - "eqeqeq": "error", - "@typescript-eslint/no-namespace": "off", - "no-async-promise-executor": "off" - } - }, - "keywords": [ - "mutex", - "async" - ], - "files": [ - "lib", - "es6", - "index.mjs" - ], - "devDependencies": { - "@sinonjs/fake-timers": "^11.2.2", - "@types/mocha": "^10.0.6", - "@types/node": "^20.11.25", - "@types/sinonjs__fake-timers": "^8.1.2", - "@typescript-eslint/eslint-plugin": "^7.2.0", - "@typescript-eslint/parser": "^7.2.0", - "coveralls": "^3.1.1", - "eslint": "^8.57.0", - "import-sort-style-eslint": "^6.0.0", - "mocha": "^10.3.0", - "nyc": "^15.1.0", - "prettier": "^3.2.5", - "prettier-plugin-import-sort": "^0.0.7", - "rollup": "^4.12.1", - "ts-node": "^10.9.1", - "typescript": "^5.4.2" - }, - "main": "lib/index.js", - "module": "es6/index.js", - "types": "lib/index.d.ts", - "exports": { - ".": { - "import": "./index.mjs", - "require": "./lib/index.js", - "default": "./lib/index.js" - }, - "./package.json": "./package.json" - }, - "dependencies": { - "tslib": "^2.4.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/tslib b/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/tslib deleted file mode 120000 index 4edba0e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/async-mutex@0.5.0/node_modules/tslib +++ /dev/null @@ -1 +0,0 @@ -../../tslib@2.8.1/node_modules/tslib \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/.github/FUNDING.yml b/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/.github/FUNDING.yml deleted file mode 100644 index cea8b16..0000000 --- a/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -tidelift: "npm/balanced-match" -patreon: juliangruber diff --git a/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/LICENSE.md deleted file mode 100644 index 2cdc8e4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/README.md b/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/README.md deleted file mode 100644 index d2a48b6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# balanced-match - -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### var r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ , ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## Security contact information - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js b/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js deleted file mode 100644 index c67a646..0000000 --- a/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - if(a===b) { - return [ai, bi]; - } - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/package.json b/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/package.json deleted file mode 100644 index ce6073e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "balanced-match", - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "1.0.2", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "main": "index.js", - "scripts": { - "test": "tape test/test.js", - "bench": "matcha test/bench.js" - }, - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/LICENSE b/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/LICENSE deleted file mode 100644 index 6d52b8a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Jameson Little - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/README.md b/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/README.md deleted file mode 100644 index b42a48f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/README.md +++ /dev/null @@ -1,34 +0,0 @@ -base64-js -========= - -`base64-js` does basic base64 encoding/decoding in pure JS. - -[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js) - -Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data. - -Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. - -## install - -With [npm](https://npmjs.org) do: - -`npm install base64-js` and `var base64js = require('base64-js')` - -For use in web browsers do: - -`` - -[Get supported base64-js with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-base64-js?utm_source=npm-base64-js&utm_medium=referral&utm_campaign=readme) - -## methods - -`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument. - -* `byteLength` - Takes a base64 string and returns length of byte array -* `toByteArray` - Takes a base64 string and returns a byte array -* `fromByteArray` - Takes a byte array and returns a base64 string - -## license - -MIT diff --git a/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/base64js.min.js b/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/base64js.min.js deleted file mode 100644 index 908ac83..0000000 --- a/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/base64js.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,b.base64js=a()}})(function(){return function(){function b(d,e,g){function a(j,i){if(!e[j]){if(!d[j]){var f="function"==typeof require&&require;if(!i&&f)return f(j,!0);if(h)return h(j,!0);var c=new Error("Cannot find module '"+j+"'");throw c.code="MODULE_NOT_FOUND",c}var k=e[j]={exports:{}};d[j][0].call(k.exports,function(b){var c=d[j][1][b];return a(c||b)},k,k.exports,b,d,e,g)}return e[j].exports}for(var h="function"==typeof require&&require,c=0;c>16,j[k++]=255&b>>8,j[k++]=255&b;return 2===h&&(b=l[a.charCodeAt(c)]<<2|l[a.charCodeAt(c+1)]>>4,j[k++]=255&b),1===h&&(b=l[a.charCodeAt(c)]<<10|l[a.charCodeAt(c+1)]<<4|l[a.charCodeAt(c+2)]>>2,j[k++]=255&b>>8,j[k++]=255&b),j}function g(a){return k[63&a>>18]+k[63&a>>12]+k[63&a>>6]+k[63&a]}function h(a,b,c){for(var d,e=[],f=b;fj?j:g+f));return 1===d?(b=a[c-1],e.push(k[b>>2]+k[63&b<<4]+"==")):2===d&&(b=(a[c-2]<<8)+a[c-1],e.push(k[b>>10]+k[63&b>>4]+k[63&b<<2]+"=")),e.join("")}c.byteLength=function(a){var b=d(a),c=b[0],e=b[1];return 3*(c+e)/4-e},c.toByteArray=f,c.fromByteArray=j;for(var k=[],l=[],m="undefined"==typeof Uint8Array?Array:Uint8Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,p=n.length;o 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len - - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) - - return [validLen, placeHoldersLen] -} - -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - - var curByte = 0 - - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen - - var i - for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } - - return parts.join('') -} diff --git a/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/package.json b/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/package.json deleted file mode 100644 index c3972e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "base64-js", - "description": "Base64 encoding/decoding in pure JS", - "version": "1.5.1", - "author": "T. Jameson Little ", - "typings": "index.d.ts", - "bugs": { - "url": "https://github.com/beatgammit/base64-js/issues" - }, - "devDependencies": { - "babel-minify": "^0.5.1", - "benchmark": "^2.1.4", - "browserify": "^16.3.0", - "standard": "*", - "tape": "4.x" - }, - "homepage": "https://github.com/beatgammit/base64-js", - "keywords": [ - "base64" - ], - "license": "MIT", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/beatgammit/base64-js.git" - }, - "scripts": { - "build": "browserify -s base64js -r ./ | minify > base64js.min.js", - "lint": "standard", - "test": "npm run lint && npm run unit", - "unit": "tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/LICENSE.md deleted file mode 100644 index 5a92289..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/LICENSE.md +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/README.md b/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/README.md deleted file mode 100644 index 5b3e7a8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/README.md +++ /dev/null @@ -1,98 +0,0 @@ -node-bindings -============= -### Helper module for loading your native module's `.node` file - -This is a helper module for authors of Node.js native addon modules. -It is basically the "swiss army knife" of `require()`ing your native module's -`.node` file. - -Throughout the course of Node's native addon history, addons have ended up being -compiled in a variety of different places, depending on which build tool and which -version of node was used. To make matters worse, now the `gyp` build tool can -produce either a __Release__ or __Debug__ build, each being built into different -locations. - -This module checks _all_ the possible locations that a native addon would be built -at, and returns the first one that loads successfully. - - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install --save bindings -``` - -Or add it to the `"dependencies"` section of your `package.json` file. - - -Example -------- - -`require()`ing the proper bindings file for the current node version, platform -and architecture is as simple as: - -``` js -var bindings = require('bindings')('binding.node') - -// Use your bindings defined in your C files -bindings.your_c_function() -``` - - -Nice Error Output ------------------ - -When the `.node` file could not be loaded, `node-bindings` throws an Error with -a nice error message telling you exactly what was tried. You can also check the -`err.tries` Array property. - -``` -Error: Could not load the bindings file. Tried: - → /Users/nrajlich/ref/build/binding.node - → /Users/nrajlich/ref/build/Debug/binding.node - → /Users/nrajlich/ref/build/Release/binding.node - → /Users/nrajlich/ref/out/Debug/binding.node - → /Users/nrajlich/ref/Debug/binding.node - → /Users/nrajlich/ref/out/Release/binding.node - → /Users/nrajlich/ref/Release/binding.node - → /Users/nrajlich/ref/build/default/binding.node - → /Users/nrajlich/ref/compiled/0.8.2/darwin/x64/binding.node - at bindings (/Users/nrajlich/ref/node_modules/bindings/bindings.js:84:13) - at Object. (/Users/nrajlich/ref/lib/ref.js:5:47) - at Module._compile (module.js:449:26) - at Object.Module._extensions..js (module.js:467:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - ... -``` - -The searching for the `.node` file will originate from the first directory in which has a `package.json` file is found. - -License -------- - -(The MIT License) - -Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js b/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js deleted file mode 100644 index 727413a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Module dependencies. - */ - -var fs = require('fs'), - path = require('path'), - fileURLToPath = require('file-uri-to-path'), - join = path.join, - dirname = path.dirname, - exists = - (fs.accessSync && - function(path) { - try { - fs.accessSync(path); - } catch (e) { - return false; - } - return true; - }) || - fs.existsSync || - path.existsSync, - defaults = { - arrow: process.env.NODE_BINDINGS_ARROW || ' → ', - compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled', - platform: process.platform, - arch: process.arch, - nodePreGyp: - 'node-v' + - process.versions.modules + - '-' + - process.platform + - '-' + - process.arch, - version: process.versions.node, - bindings: 'bindings.node', - try: [ - // node-gyp's linked version in the "build" dir - ['module_root', 'build', 'bindings'], - // node-waf and gyp_addon (a.k.a node-gyp) - ['module_root', 'build', 'Debug', 'bindings'], - ['module_root', 'build', 'Release', 'bindings'], - // Debug files, for development (legacy behavior, remove for node v0.9) - ['module_root', 'out', 'Debug', 'bindings'], - ['module_root', 'Debug', 'bindings'], - // Release files, but manually compiled (legacy behavior, remove for node v0.9) - ['module_root', 'out', 'Release', 'bindings'], - ['module_root', 'Release', 'bindings'], - // Legacy from node-waf, node <= 0.4.x - ['module_root', 'build', 'default', 'bindings'], - // Production "Release" buildtype binary (meh...) - ['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'], - // node-qbs builds - ['module_root', 'addon-build', 'release', 'install-root', 'bindings'], - ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'], - ['module_root', 'addon-build', 'default', 'install-root', 'bindings'], - // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch} - ['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings'] - ] - }; - -/** - * The main `bindings()` function loads the compiled bindings for a given module. - * It uses V8's Error API to determine the parent filename that this function is - * being invoked from, which is then used to find the root directory. - */ - -function bindings(opts) { - // Argument surgery - if (typeof opts == 'string') { - opts = { bindings: opts }; - } else if (!opts) { - opts = {}; - } - - // maps `defaults` onto `opts` object - Object.keys(defaults).map(function(i) { - if (!(i in opts)) opts[i] = defaults[i]; - }); - - // Get the module root - if (!opts.module_root) { - opts.module_root = exports.getRoot(exports.getFileName()); - } - - // Ensure the given bindings name ends with .node - if (path.extname(opts.bindings) != '.node') { - opts.bindings += '.node'; - } - - // https://github.com/webpack/webpack/issues/4175#issuecomment-342931035 - var requireFunc = - typeof __webpack_require__ === 'function' - ? __non_webpack_require__ - : require; - - var tries = [], - i = 0, - l = opts.try.length, - n, - b, - err; - - for (; i < l; i++) { - n = join.apply( - null, - opts.try[i].map(function(p) { - return opts[p] || p; - }) - ); - tries.push(n); - try { - b = opts.path ? requireFunc.resolve(n) : requireFunc(n); - if (!opts.path) { - b.path = n; - } - return b; - } catch (e) { - if (e.code !== 'MODULE_NOT_FOUND' && - e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' && - !/not find/i.test(e.message)) { - throw e; - } - } - } - - err = new Error( - 'Could not locate the bindings file. Tried:\n' + - tries - .map(function(a) { - return opts.arrow + a; - }) - .join('\n') - ); - err.tries = tries; - throw err; -} -module.exports = exports = bindings; - -/** - * Gets the filename of the JavaScript file that invokes this function. - * Used to help find the root directory of a module. - * Optionally accepts an filename argument to skip when searching for the invoking filename - */ - -exports.getFileName = function getFileName(calling_file) { - var origPST = Error.prepareStackTrace, - origSTL = Error.stackTraceLimit, - dummy = {}, - fileName; - - Error.stackTraceLimit = 10; - - Error.prepareStackTrace = function(e, st) { - for (var i = 0, l = st.length; i < l; i++) { - fileName = st[i].getFileName(); - if (fileName !== __filename) { - if (calling_file) { - if (fileName !== calling_file) { - return; - } - } else { - return; - } - } - } - }; - - // run the 'prepareStackTrace' function above - Error.captureStackTrace(dummy); - dummy.stack; - - // cleanup - Error.prepareStackTrace = origPST; - Error.stackTraceLimit = origSTL; - - // handle filename that starts with "file://" - var fileSchema = 'file://'; - if (fileName.indexOf(fileSchema) === 0) { - fileName = fileURLToPath(fileName); - } - - return fileName; -}; - -/** - * Gets the root directory of a module, given an arbitrary filename - * somewhere in the module tree. The "root directory" is the directory - * containing the `package.json` file. - * - * In: /home/nate/node-native-module/lib/index.js - * Out: /home/nate/node-native-module - */ - -exports.getRoot = function getRoot(file) { - var dir = dirname(file), - prev; - while (true) { - if (dir === '.') { - // Avoids an infinite loop in rare cases, like the REPL - dir = process.cwd(); - } - if ( - exists(join(dir, 'package.json')) || - exists(join(dir, 'node_modules')) - ) { - // Found the 'package.json' file or 'node_modules' dir; we're done - return dir; - } - if (prev === dir) { - // Got to the top - throw new Error( - 'Could not find module root given file: "' + - file + - '". Do you have a `package.json` file? ' - ); - } - // Try the parent dir next - prev = dir; - dir = join(dir, '..'); - } -}; diff --git a/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/package.json b/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/package.json deleted file mode 100644 index d027ee7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "bindings", - "description": "Helper module for loading your native module's .node file", - "keywords": [ - "native", - "addon", - "bindings", - "gyp", - "waf", - "c", - "c++" - ], - "version": "1.5.0", - "author": "Nathan Rajlich (http://tootallnate.net)", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-bindings.git" - }, - "main": "./bindings.js", - "bugs": { - "url": "https://github.com/TooTallNate/node-bindings/issues" - }, - "homepage": "https://github.com/TooTallNate/node-bindings", - "license": "MIT", - "dependencies": { - "file-uri-to-path": "1.0.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/file-uri-to-path b/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/file-uri-to-path deleted file mode 120000 index 233e26c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bindings@1.5.0/node_modules/file-uri-to-path +++ /dev/null @@ -1 +0,0 @@ -../../file-uri-to-path@1.0.0/node_modules/file-uri-to-path \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/.travis.yml b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/.travis.yml deleted file mode 100644 index 016eaf5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -sudo: false -arch: - - amd64 - - ppc64le -language: node_js -node_js: - - '6' - - '8' - - '10' - - '12' - - '14' - - '15' - - lts/* -notifications: - email: - - rod@vagg.org - - matteo.collina@gmail.com diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js deleted file mode 100644 index 471ee77..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js +++ /dev/null @@ -1,396 +0,0 @@ -'use strict' - -const { Buffer } = require('buffer') -const symbol = Symbol.for('BufferList') - -function BufferList (buf) { - if (!(this instanceof BufferList)) { - return new BufferList(buf) - } - - BufferList._init.call(this, buf) -} - -BufferList._init = function _init (buf) { - Object.defineProperty(this, symbol, { value: true }) - - this._bufs = [] - this.length = 0 - - if (buf) { - this.append(buf) - } -} - -BufferList.prototype._new = function _new (buf) { - return new BufferList(buf) -} - -BufferList.prototype._offset = function _offset (offset) { - if (offset === 0) { - return [0, 0] - } - - let tot = 0 - - for (let i = 0; i < this._bufs.length; i++) { - const _t = tot + this._bufs[i].length - if (offset < _t || i === this._bufs.length - 1) { - return [i, offset - tot] - } - tot = _t - } -} - -BufferList.prototype._reverseOffset = function (blOffset) { - const bufferId = blOffset[0] - let offset = blOffset[1] - - for (let i = 0; i < bufferId; i++) { - offset += this._bufs[i].length - } - - return offset -} - -BufferList.prototype.get = function get (index) { - if (index > this.length || index < 0) { - return undefined - } - - const offset = this._offset(index) - - return this._bufs[offset[0]][offset[1]] -} - -BufferList.prototype.slice = function slice (start, end) { - if (typeof start === 'number' && start < 0) { - start += this.length - } - - if (typeof end === 'number' && end < 0) { - end += this.length - } - - return this.copy(null, 0, start, end) -} - -BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) { - if (typeof srcStart !== 'number' || srcStart < 0) { - srcStart = 0 - } - - if (typeof srcEnd !== 'number' || srcEnd > this.length) { - srcEnd = this.length - } - - if (srcStart >= this.length) { - return dst || Buffer.alloc(0) - } - - if (srcEnd <= 0) { - return dst || Buffer.alloc(0) - } - - const copy = !!dst - const off = this._offset(srcStart) - const len = srcEnd - srcStart - let bytes = len - let bufoff = (copy && dstStart) || 0 - let start = off[1] - - // copy/slice everything - if (srcStart === 0 && srcEnd === this.length) { - if (!copy) { - // slice, but full concat if multiple buffers - return this._bufs.length === 1 - ? this._bufs[0] - : Buffer.concat(this._bufs, this.length) - } - - // copy, need to copy individual buffers - for (let i = 0; i < this._bufs.length; i++) { - this._bufs[i].copy(dst, bufoff) - bufoff += this._bufs[i].length - } - - return dst - } - - // easy, cheap case where it's a subset of one of the buffers - if (bytes <= this._bufs[off[0]].length - start) { - return copy - ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) - : this._bufs[off[0]].slice(start, start + bytes) - } - - if (!copy) { - // a slice, we need something to copy in to - dst = Buffer.allocUnsafe(len) - } - - for (let i = off[0]; i < this._bufs.length; i++) { - const l = this._bufs[i].length - start - - if (bytes > l) { - this._bufs[i].copy(dst, bufoff, start) - bufoff += l - } else { - this._bufs[i].copy(dst, bufoff, start, start + bytes) - bufoff += l - break - } - - bytes -= l - - if (start) { - start = 0 - } - } - - // safeguard so that we don't return uninitialized memory - if (dst.length > bufoff) return dst.slice(0, bufoff) - - return dst -} - -BufferList.prototype.shallowSlice = function shallowSlice (start, end) { - start = start || 0 - end = typeof end !== 'number' ? this.length : end - - if (start < 0) { - start += this.length - } - - if (end < 0) { - end += this.length - } - - if (start === end) { - return this._new() - } - - const startOffset = this._offset(start) - const endOffset = this._offset(end) - const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1) - - if (endOffset[1] === 0) { - buffers.pop() - } else { - buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1]) - } - - if (startOffset[1] !== 0) { - buffers[0] = buffers[0].slice(startOffset[1]) - } - - return this._new(buffers) -} - -BufferList.prototype.toString = function toString (encoding, start, end) { - return this.slice(start, end).toString(encoding) -} - -BufferList.prototype.consume = function consume (bytes) { - // first, normalize the argument, in accordance with how Buffer does it - bytes = Math.trunc(bytes) - // do nothing if not a positive number - if (Number.isNaN(bytes) || bytes <= 0) return this - - while (this._bufs.length) { - if (bytes >= this._bufs[0].length) { - bytes -= this._bufs[0].length - this.length -= this._bufs[0].length - this._bufs.shift() - } else { - this._bufs[0] = this._bufs[0].slice(bytes) - this.length -= bytes - break - } - } - - return this -} - -BufferList.prototype.duplicate = function duplicate () { - const copy = this._new() - - for (let i = 0; i < this._bufs.length; i++) { - copy.append(this._bufs[i]) - } - - return copy -} - -BufferList.prototype.append = function append (buf) { - if (buf == null) { - return this - } - - if (buf.buffer) { - // append a view of the underlying ArrayBuffer - this._appendBuffer(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)) - } else if (Array.isArray(buf)) { - for (let i = 0; i < buf.length; i++) { - this.append(buf[i]) - } - } else if (this._isBufferList(buf)) { - // unwrap argument into individual BufferLists - for (let i = 0; i < buf._bufs.length; i++) { - this.append(buf._bufs[i]) - } - } else { - // coerce number arguments to strings, since Buffer(number) does - // uninitialized memory allocation - if (typeof buf === 'number') { - buf = buf.toString() - } - - this._appendBuffer(Buffer.from(buf)) - } - - return this -} - -BufferList.prototype._appendBuffer = function appendBuffer (buf) { - this._bufs.push(buf) - this.length += buf.length -} - -BufferList.prototype.indexOf = function (search, offset, encoding) { - if (encoding === undefined && typeof offset === 'string') { - encoding = offset - offset = undefined - } - - if (typeof search === 'function' || Array.isArray(search)) { - throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.') - } else if (typeof search === 'number') { - search = Buffer.from([search]) - } else if (typeof search === 'string') { - search = Buffer.from(search, encoding) - } else if (this._isBufferList(search)) { - search = search.slice() - } else if (Array.isArray(search.buffer)) { - search = Buffer.from(search.buffer, search.byteOffset, search.byteLength) - } else if (!Buffer.isBuffer(search)) { - search = Buffer.from(search) - } - - offset = Number(offset || 0) - - if (isNaN(offset)) { - offset = 0 - } - - if (offset < 0) { - offset = this.length + offset - } - - if (offset < 0) { - offset = 0 - } - - if (search.length === 0) { - return offset > this.length ? this.length : offset - } - - const blOffset = this._offset(offset) - let blIndex = blOffset[0] // index of which internal buffer we're working on - let buffOffset = blOffset[1] // offset of the internal buffer we're working on - - // scan over each buffer - for (; blIndex < this._bufs.length; blIndex++) { - const buff = this._bufs[blIndex] - - while (buffOffset < buff.length) { - const availableWindow = buff.length - buffOffset - - if (availableWindow >= search.length) { - const nativeSearchResult = buff.indexOf(search, buffOffset) - - if (nativeSearchResult !== -1) { - return this._reverseOffset([blIndex, nativeSearchResult]) - } - - buffOffset = buff.length - search.length + 1 // end of native search window - } else { - const revOffset = this._reverseOffset([blIndex, buffOffset]) - - if (this._match(revOffset, search)) { - return revOffset - } - - buffOffset++ - } - } - - buffOffset = 0 - } - - return -1 -} - -BufferList.prototype._match = function (offset, search) { - if (this.length - offset < search.length) { - return false - } - - for (let searchOffset = 0; searchOffset < search.length; searchOffset++) { - if (this.get(offset + searchOffset) !== search[searchOffset]) { - return false - } - } - return true -} - -;(function () { - const methods = { - readDoubleBE: 8, - readDoubleLE: 8, - readFloatBE: 4, - readFloatLE: 4, - readInt32BE: 4, - readInt32LE: 4, - readUInt32BE: 4, - readUInt32LE: 4, - readInt16BE: 2, - readInt16LE: 2, - readUInt16BE: 2, - readUInt16LE: 2, - readInt8: 1, - readUInt8: 1, - readIntBE: null, - readIntLE: null, - readUIntBE: null, - readUIntLE: null - } - - for (const m in methods) { - (function (m) { - if (methods[m] === null) { - BufferList.prototype[m] = function (offset, byteLength) { - return this.slice(offset, offset + byteLength)[m](0, byteLength) - } - } else { - BufferList.prototype[m] = function (offset = 0) { - return this.slice(offset, offset + methods[m])[m](0) - } - } - }(m)) - } -}()) - -// Used internally by the class and also as an indicator of this object being -// a `BufferList`. It's not possible to use `instanceof BufferList` in a browser -// environment because there could be multiple different copies of the -// BufferList class and some `BufferList`s might be `BufferList`s. -BufferList.prototype._isBufferList = function _isBufferList (b) { - return b instanceof BufferList || BufferList.isBufferList(b) -} - -BufferList.isBufferList = function isBufferList (b) { - return b != null && b[symbol] -} - -module.exports = BufferList diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/LICENSE.md deleted file mode 100644 index ecbe516..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/LICENSE.md +++ /dev/null @@ -1,13 +0,0 @@ -The MIT License (MIT) -===================== - -Copyright (c) 2013-2019 bl contributors ----------------------------------- - -*bl contributors listed at * - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/README.md b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/README.md deleted file mode 100644 index 9680b1d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/README.md +++ /dev/null @@ -1,247 +0,0 @@ -# bl *(BufferList)* - -[![Build Status](https://api.travis-ci.com/rvagg/bl.svg?branch=master)](https://travis-ci.com/rvagg/bl/) - -**A Node.js Buffer list collector, reader and streamer thingy.** - -[![NPM](https://nodei.co/npm/bl.svg)](https://nodei.co/npm/bl/) - -**bl** is a storage object for collections of Node Buffers, exposing them with the main Buffer readable API. Also works as a duplex stream so you can collect buffers from a stream that emits them and emit buffers to a stream that consumes them! - -The original buffers are kept intact and copies are only done as necessary. Any reads that require the use of a single original buffer will return a slice of that buffer only (which references the same memory as the original buffer). Reads that span buffers perform concatenation as required and return the results transparently. - -```js -const { BufferList } = require('bl') - -const bl = new BufferList() -bl.append(Buffer.from('abcd')) -bl.append(Buffer.from('efg')) -bl.append('hi') // bl will also accept & convert Strings -bl.append(Buffer.from('j')) -bl.append(Buffer.from([ 0x3, 0x4 ])) - -console.log(bl.length) // 12 - -console.log(bl.slice(0, 10).toString('ascii')) // 'abcdefghij' -console.log(bl.slice(3, 10).toString('ascii')) // 'defghij' -console.log(bl.slice(3, 6).toString('ascii')) // 'def' -console.log(bl.slice(3, 8).toString('ascii')) // 'defgh' -console.log(bl.slice(5, 10).toString('ascii')) // 'fghij' - -console.log(bl.indexOf('def')) // 3 -console.log(bl.indexOf('asdf')) // -1 - -// or just use toString! -console.log(bl.toString()) // 'abcdefghij\u0003\u0004' -console.log(bl.toString('ascii', 3, 8)) // 'defgh' -console.log(bl.toString('ascii', 5, 10)) // 'fghij' - -// other standard Buffer readables -console.log(bl.readUInt16BE(10)) // 0x0304 -console.log(bl.readUInt16LE(10)) // 0x0403 -``` - -Give it a callback in the constructor and use it just like **[concat-stream](https://github.com/maxogden/node-concat-stream)**: - -```js -const { BufferListStream } = require('bl') -const fs = require('fs') - -fs.createReadStream('README.md') - .pipe(BufferListStream((err, data) => { // note 'new' isn't strictly required - // `data` is a complete Buffer object containing the full data - console.log(data.toString()) - })) -``` - -Note that when you use the *callback* method like this, the resulting `data` parameter is a concatenation of all `Buffer` objects in the list. If you want to avoid the overhead of this concatenation (in cases of extreme performance consciousness), then avoid the *callback* method and just listen to `'end'` instead, like a standard Stream. - -Or to fetch a URL using [hyperquest](https://github.com/substack/hyperquest) (should work with [request](http://github.com/mikeal/request) and even plain Node http too!): - -```js -const hyperquest = require('hyperquest') -const { BufferListStream } = require('bl') - -const url = 'https://raw.github.com/rvagg/bl/master/README.md' - -hyperquest(url).pipe(BufferListStream((err, data) => { - console.log(data.toString()) -})) -``` - -Or, use it as a readable stream to recompose a list of Buffers to an output source: - -```js -const { BufferListStream } = require('bl') -const fs = require('fs') - -var bl = new BufferListStream() -bl.append(Buffer.from('abcd')) -bl.append(Buffer.from('efg')) -bl.append(Buffer.from('hi')) -bl.append(Buffer.from('j')) - -bl.pipe(fs.createWriteStream('gibberish.txt')) -``` - -## API - - * new BufferList([ buf ]) - * BufferList.isBufferList(obj) - * bl.length - * bl.append(buffer) - * bl.get(index) - * bl.indexOf(value[, byteOffset][, encoding]) - * bl.slice([ start[, end ] ]) - * bl.shallowSlice([ start[, end ] ]) - * bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) - * bl.duplicate() - * bl.consume(bytes) - * bl.toString([encoding, [ start, [ end ]]]) - * bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() - * new BufferListStream([ callback ]) - --------------------------------------------------------- - -### new BufferList([ Buffer | Buffer array | BufferList | BufferList array | String ]) -No arguments are _required_ for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` objects. - -`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with: - -```js -const { BufferList } = require('bl') -const bl = BufferList() - -// equivalent to: - -const { BufferList } = require('bl') -const bl = new BufferList() -``` - --------------------------------------------------------- - -### BufferList.isBufferList(obj) -Determines if the passed object is a `BufferList`. It will return `true` if the passed object is an instance of `BufferList` **or** `BufferListStream` and `false` otherwise. - -N.B. this won't return `true` for `BufferList` or `BufferListStream` instances created by versions of this library before this static method was added. - --------------------------------------------------------- - -### bl.length -Get the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list. - --------------------------------------------------------- - -### bl.append(Buffer | Buffer array | BufferList | BufferList array | String) -`append(buffer)` adds an additional buffer or BufferList to the internal list. `this` is returned so it can be chained. - --------------------------------------------------------- - -### bl.get(index) -`get()` will return the byte at the specified index. - --------------------------------------------------------- - -### bl.indexOf(value[, byteOffset][, encoding]) -`get()` will return the byte at the specified index. -`indexOf()` method returns the first index at which a given element can be found in the BufferList, or -1 if it is not present. - --------------------------------------------------------- - -### bl.slice([ start, [ end ] ]) -`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively. - -If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer. - --------------------------------------------------------- - -### bl.shallowSlice([ start, [ end ] ]) -`shallowSlice()` returns a new `BufferList` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively. - -No copies will be performed. All buffers in the result share memory with the original list. - --------------------------------------------------------- - -### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) -`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively. - --------------------------------------------------------- - -### bl.duplicate() -`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example: - -```js -var bl = new BufferListStream() - -bl.append('hello') -bl.append(' world') -bl.append('\n') - -bl.duplicate().pipe(process.stdout, { end: false }) - -console.log(bl.toString()) -``` - --------------------------------------------------------- - -### bl.consume(bytes) -`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers—initial offsets will be calculated accordingly in order to give you a consistent view of the data. - --------------------------------------------------------- - -### bl.toString([encoding, [ start, [ end ]]]) -`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information. - --------------------------------------------------------- - -### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() - -All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently. - -See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work. - --------------------------------------------------------- - -### new BufferListStream([ callback | Buffer | Buffer array | BufferList | BufferList array | String ]) -**BufferListStream** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **BufferListStream** instance. - -The constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream. - -Normally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object. - -`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with: - -```js -const { BufferListStream } = require('bl') -const bl = BufferListStream() - -// equivalent to: - -const { BufferListStream } = require('bl') -const bl = new BufferListStream() -``` - -N.B. For backwards compatibility reasons, `BufferListStream` is the **default** export when you `require('bl')`: - -```js -const { BufferListStream } = require('bl') -// equivalent to: -const BufferListStream = require('bl') -``` - --------------------------------------------------------- - -## Contributors - -**bl** is brought to you by the following hackers: - - * [Rod Vagg](https://github.com/rvagg) - * [Matteo Collina](https://github.com/mcollina) - * [Jarett Cruger](https://github.com/jcrugzz) - - -## License & copyright - -Copyright (c) 2013-2019 bl contributors (listed above). - -bl is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details. diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js deleted file mode 100644 index 40228f8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict' - -const DuplexStream = require('readable-stream').Duplex -const inherits = require('inherits') -const BufferList = require('./BufferList') - -function BufferListStream (callback) { - if (!(this instanceof BufferListStream)) { - return new BufferListStream(callback) - } - - if (typeof callback === 'function') { - this._callback = callback - - const piper = function piper (err) { - if (this._callback) { - this._callback(err) - this._callback = null - } - }.bind(this) - - this.on('pipe', function onPipe (src) { - src.on('error', piper) - }) - this.on('unpipe', function onUnpipe (src) { - src.removeListener('error', piper) - }) - - callback = null - } - - BufferList._init.call(this, callback) - DuplexStream.call(this) -} - -inherits(BufferListStream, DuplexStream) -Object.assign(BufferListStream.prototype, BufferList.prototype) - -BufferListStream.prototype._new = function _new (callback) { - return new BufferListStream(callback) -} - -BufferListStream.prototype._write = function _write (buf, encoding, callback) { - this._appendBuffer(buf) - - if (typeof callback === 'function') { - callback() - } -} - -BufferListStream.prototype._read = function _read (size) { - if (!this.length) { - return this.push(null) - } - - size = Math.min(size, this.length) - this.push(this.slice(0, size)) - this.consume(size) -} - -BufferListStream.prototype.end = function end (chunk) { - DuplexStream.prototype.end.call(this, chunk) - - if (this._callback) { - this._callback(null, this.slice()) - this._callback = null - } -} - -BufferListStream.prototype._destroy = function _destroy (err, cb) { - this._bufs.length = 0 - this.length = 0 - cb(err) -} - -BufferListStream.prototype._isBufferList = function _isBufferList (b) { - return b instanceof BufferListStream || b instanceof BufferList || BufferListStream.isBufferList(b) -} - -BufferListStream.isBufferList = BufferList.isBufferList - -module.exports = BufferListStream -module.exports.BufferListStream = BufferListStream -module.exports.BufferList = BufferList diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/package.json b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/package.json deleted file mode 100644 index 3b2be3f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "bl", - "version": "4.1.0", - "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!", - "license": "MIT", - "main": "bl.js", - "scripts": { - "lint": "standard *.js test/*.js", - "test": "npm run lint && node test/test.js | faucet" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/bl.git" - }, - "homepage": "https://github.com/rvagg/bl", - "authors": [ - "Rod Vagg (https://github.com/rvagg)", - "Matteo Collina (https://github.com/mcollina)", - "Jarett Cruger (https://github.com/jcrugzz)" - ], - "keywords": [ - "buffer", - "buffers", - "stream", - "awesomesauce" - ], - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - }, - "devDependencies": { - "faucet": "~0.0.1", - "standard": "^14.3.0", - "tape": "^4.11.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/convert.js b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/convert.js deleted file mode 100644 index 9f3e235..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/convert.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict' - -const tape = require('tape') -const { BufferList, BufferListStream } = require('../') -const { Buffer } = require('buffer') - -tape('convert from BufferList to BufferListStream', (t) => { - const data = Buffer.from(`TEST-${Date.now()}`) - const bl = new BufferList(data) - const bls = new BufferListStream(bl) - t.ok(bl.slice().equals(bls.slice())) - t.end() -}) - -tape('convert from BufferListStream to BufferList', (t) => { - const data = Buffer.from(`TEST-${Date.now()}`) - const bls = new BufferListStream(data) - const bl = new BufferList(bls) - t.ok(bl.slice().equals(bls.slice())) - t.end() -}) diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/indexOf.js b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/indexOf.js deleted file mode 100644 index 62dcb01..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/indexOf.js +++ /dev/null @@ -1,492 +0,0 @@ -'use strict' - -const tape = require('tape') -const BufferList = require('../') -const { Buffer } = require('buffer') - -tape('indexOf single byte needle', (t) => { - const bl = new BufferList(['abcdefg', 'abcdefg', '12345']) - - t.equal(bl.indexOf('e'), 4) - t.equal(bl.indexOf('e', 5), 11) - t.equal(bl.indexOf('e', 12), -1) - t.equal(bl.indexOf('5'), 18) - - t.end() -}) - -tape('indexOf multiple byte needle', (t) => { - const bl = new BufferList(['abcdefg', 'abcdefg']) - - t.equal(bl.indexOf('ef'), 4) - t.equal(bl.indexOf('ef', 5), 11) - - t.end() -}) - -tape('indexOf multiple byte needles across buffer boundaries', (t) => { - const bl = new BufferList(['abcdefg', 'abcdefg']) - - t.equal(bl.indexOf('fgabc'), 5) - - t.end() -}) - -tape('indexOf takes a Uint8Array search', (t) => { - const bl = new BufferList(['abcdefg', 'abcdefg']) - const search = new Uint8Array([102, 103, 97, 98, 99]) // fgabc - - t.equal(bl.indexOf(search), 5) - - t.end() -}) - -tape('indexOf takes a buffer list search', (t) => { - const bl = new BufferList(['abcdefg', 'abcdefg']) - const search = new BufferList('fgabc') - - t.equal(bl.indexOf(search), 5) - - t.end() -}) - -tape('indexOf a zero byte needle', (t) => { - const b = new BufferList('abcdef') - const bufEmpty = Buffer.from('') - - t.equal(b.indexOf(''), 0) - t.equal(b.indexOf('', 1), 1) - t.equal(b.indexOf('', b.length + 1), b.length) - t.equal(b.indexOf('', Infinity), b.length) - t.equal(b.indexOf(bufEmpty), 0) - t.equal(b.indexOf(bufEmpty, 1), 1) - t.equal(b.indexOf(bufEmpty, b.length + 1), b.length) - t.equal(b.indexOf(bufEmpty, Infinity), b.length) - - t.end() -}) - -tape('indexOf buffers smaller and larger than the needle', (t) => { - const bl = new BufferList(['abcdefg', 'a', 'bcdefg', 'a', 'bcfgab']) - - t.equal(bl.indexOf('fgabc'), 5) - t.equal(bl.indexOf('fgabc', 6), 12) - t.equal(bl.indexOf('fgabc', 13), -1) - - t.end() -}) - -// only present in node 6+ -;(process.version.substr(1).split('.')[0] >= 6) && tape('indexOf latin1 and binary encoding', (t) => { - const b = new BufferList('abcdef') - - // test latin1 encoding - t.equal( - new BufferList(Buffer.from(b.toString('latin1'), 'latin1')) - .indexOf('d', 0, 'latin1'), - 3 - ) - t.equal( - new BufferList(Buffer.from(b.toString('latin1'), 'latin1')) - .indexOf(Buffer.from('d', 'latin1'), 0, 'latin1'), - 3 - ) - t.equal( - new BufferList(Buffer.from('aa\u00e8aa', 'latin1')) - .indexOf('\u00e8', 'latin1'), - 2 - ) - t.equal( - new BufferList(Buffer.from('\u00e8', 'latin1')) - .indexOf('\u00e8', 'latin1'), - 0 - ) - t.equal( - new BufferList(Buffer.from('\u00e8', 'latin1')) - .indexOf(Buffer.from('\u00e8', 'latin1'), 'latin1'), - 0 - ) - - // test binary encoding - t.equal( - new BufferList(Buffer.from(b.toString('binary'), 'binary')) - .indexOf('d', 0, 'binary'), - 3 - ) - t.equal( - new BufferList(Buffer.from(b.toString('binary'), 'binary')) - .indexOf(Buffer.from('d', 'binary'), 0, 'binary'), - 3 - ) - t.equal( - new BufferList(Buffer.from('aa\u00e8aa', 'binary')) - .indexOf('\u00e8', 'binary'), - 2 - ) - t.equal( - new BufferList(Buffer.from('\u00e8', 'binary')) - .indexOf('\u00e8', 'binary'), - 0 - ) - t.equal( - new BufferList(Buffer.from('\u00e8', 'binary')) - .indexOf(Buffer.from('\u00e8', 'binary'), 'binary'), - 0 - ) - - t.end() -}) - -tape('indexOf the entire nodejs10 buffer test suite', (t) => { - const b = new BufferList('abcdef') - const bufA = Buffer.from('a') - const bufBc = Buffer.from('bc') - const bufF = Buffer.from('f') - const bufZ = Buffer.from('z') - - const stringComparison = 'abcdef' - - t.equal(b.indexOf('a'), 0) - t.equal(b.indexOf('a', 1), -1) - t.equal(b.indexOf('a', -1), -1) - t.equal(b.indexOf('a', -4), -1) - t.equal(b.indexOf('a', -b.length), 0) - t.equal(b.indexOf('a', NaN), 0) - t.equal(b.indexOf('a', -Infinity), 0) - t.equal(b.indexOf('a', Infinity), -1) - t.equal(b.indexOf('bc'), 1) - t.equal(b.indexOf('bc', 2), -1) - t.equal(b.indexOf('bc', -1), -1) - t.equal(b.indexOf('bc', -3), -1) - t.equal(b.indexOf('bc', -5), 1) - t.equal(b.indexOf('bc', NaN), 1) - t.equal(b.indexOf('bc', -Infinity), 1) - t.equal(b.indexOf('bc', Infinity), -1) - t.equal(b.indexOf('f'), b.length - 1) - t.equal(b.indexOf('z'), -1) - - // empty search tests - t.equal(b.indexOf(bufA), 0) - t.equal(b.indexOf(bufA, 1), -1) - t.equal(b.indexOf(bufA, -1), -1) - t.equal(b.indexOf(bufA, -4), -1) - t.equal(b.indexOf(bufA, -b.length), 0) - t.equal(b.indexOf(bufA, NaN), 0) - t.equal(b.indexOf(bufA, -Infinity), 0) - t.equal(b.indexOf(bufA, Infinity), -1) - t.equal(b.indexOf(bufBc), 1) - t.equal(b.indexOf(bufBc, 2), -1) - t.equal(b.indexOf(bufBc, -1), -1) - t.equal(b.indexOf(bufBc, -3), -1) - t.equal(b.indexOf(bufBc, -5), 1) - t.equal(b.indexOf(bufBc, NaN), 1) - t.equal(b.indexOf(bufBc, -Infinity), 1) - t.equal(b.indexOf(bufBc, Infinity), -1) - t.equal(b.indexOf(bufF), b.length - 1) - t.equal(b.indexOf(bufZ), -1) - t.equal(b.indexOf(0x61), 0) - t.equal(b.indexOf(0x61, 1), -1) - t.equal(b.indexOf(0x61, -1), -1) - t.equal(b.indexOf(0x61, -4), -1) - t.equal(b.indexOf(0x61, -b.length), 0) - t.equal(b.indexOf(0x61, NaN), 0) - t.equal(b.indexOf(0x61, -Infinity), 0) - t.equal(b.indexOf(0x61, Infinity), -1) - t.equal(b.indexOf(0x0), -1) - - // test offsets - t.equal(b.indexOf('d', 2), 3) - t.equal(b.indexOf('f', 5), 5) - t.equal(b.indexOf('f', -1), 5) - t.equal(b.indexOf('f', 6), -1) - - t.equal(b.indexOf(Buffer.from('d'), 2), 3) - t.equal(b.indexOf(Buffer.from('f'), 5), 5) - t.equal(b.indexOf(Buffer.from('f'), -1), 5) - t.equal(b.indexOf(Buffer.from('f'), 6), -1) - - t.equal(Buffer.from('ff').indexOf(Buffer.from('f'), 1, 'ucs2'), -1) - - // test invalid and uppercase encoding - t.equal(b.indexOf('b', 'utf8'), 1) - t.equal(b.indexOf('b', 'UTF8'), 1) - t.equal(b.indexOf('62', 'HEX'), 1) - t.throws(() => b.indexOf('bad', 'enc'), TypeError) - - // test hex encoding - t.equal( - Buffer.from(b.toString('hex'), 'hex') - .indexOf('64', 0, 'hex'), - 3 - ) - t.equal( - Buffer.from(b.toString('hex'), 'hex') - .indexOf(Buffer.from('64', 'hex'), 0, 'hex'), - 3 - ) - - // test base64 encoding - t.equal( - Buffer.from(b.toString('base64'), 'base64') - .indexOf('ZA==', 0, 'base64'), - 3 - ) - t.equal( - Buffer.from(b.toString('base64'), 'base64') - .indexOf(Buffer.from('ZA==', 'base64'), 0, 'base64'), - 3 - ) - - // test ascii encoding - t.equal( - Buffer.from(b.toString('ascii'), 'ascii') - .indexOf('d', 0, 'ascii'), - 3 - ) - t.equal( - Buffer.from(b.toString('ascii'), 'ascii') - .indexOf(Buffer.from('d', 'ascii'), 0, 'ascii'), - 3 - ) - - // test optional offset with passed encoding - t.equal(Buffer.from('aaaa0').indexOf('30', 'hex'), 4) - t.equal(Buffer.from('aaaa00a').indexOf('3030', 'hex'), 4) - - { - // test usc2 encoding - const twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2') - - t.equal(8, twoByteString.indexOf('\u0395', 4, 'ucs2')) - t.equal(6, twoByteString.indexOf('\u03a3', -4, 'ucs2')) - t.equal(4, twoByteString.indexOf('\u03a3', -6, 'ucs2')) - t.equal(4, twoByteString.indexOf( - Buffer.from('\u03a3', 'ucs2'), -6, 'ucs2')) - t.equal(-1, twoByteString.indexOf('\u03a3', -2, 'ucs2')) - } - - const mixedByteStringUcs2 = - Buffer.from('\u039a\u0391abc\u03a3\u03a3\u0395', 'ucs2') - - t.equal(6, mixedByteStringUcs2.indexOf('bc', 0, 'ucs2')) - t.equal(10, mixedByteStringUcs2.indexOf('\u03a3', 0, 'ucs2')) - t.equal(-1, mixedByteStringUcs2.indexOf('\u0396', 0, 'ucs2')) - - t.equal( - 6, mixedByteStringUcs2.indexOf(Buffer.from('bc', 'ucs2'), 0, 'ucs2')) - t.equal( - 10, mixedByteStringUcs2.indexOf(Buffer.from('\u03a3', 'ucs2'), 0, 'ucs2')) - t.equal( - -1, mixedByteStringUcs2.indexOf(Buffer.from('\u0396', 'ucs2'), 0, 'ucs2')) - - { - const twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2') - - // Test single char pattern - t.equal(0, twoByteString.indexOf('\u039a', 0, 'ucs2')) - let index = twoByteString.indexOf('\u0391', 0, 'ucs2') - t.equal(2, index, `Alpha - at index ${index}`) - index = twoByteString.indexOf('\u03a3', 0, 'ucs2') - t.equal(4, index, `First Sigma - at index ${index}`) - index = twoByteString.indexOf('\u03a3', 6, 'ucs2') - t.equal(6, index, `Second Sigma - at index ${index}`) - index = twoByteString.indexOf('\u0395', 0, 'ucs2') - t.equal(8, index, `Epsilon - at index ${index}`) - index = twoByteString.indexOf('\u0392', 0, 'ucs2') - t.equal(-1, index, `Not beta - at index ${index}`) - - // Test multi-char pattern - index = twoByteString.indexOf('\u039a\u0391', 0, 'ucs2') - t.equal(0, index, `Lambda Alpha - at index ${index}`) - index = twoByteString.indexOf('\u0391\u03a3', 0, 'ucs2') - t.equal(2, index, `Alpha Sigma - at index ${index}`) - index = twoByteString.indexOf('\u03a3\u03a3', 0, 'ucs2') - t.equal(4, index, `Sigma Sigma - at index ${index}`) - index = twoByteString.indexOf('\u03a3\u0395', 0, 'ucs2') - t.equal(6, index, `Sigma Epsilon - at index ${index}`) - } - - const mixedByteStringUtf8 = Buffer.from('\u039a\u0391abc\u03a3\u03a3\u0395') - - t.equal(5, mixedByteStringUtf8.indexOf('bc')) - t.equal(5, mixedByteStringUtf8.indexOf('bc', 5)) - t.equal(5, mixedByteStringUtf8.indexOf('bc', -8)) - t.equal(7, mixedByteStringUtf8.indexOf('\u03a3')) - t.equal(-1, mixedByteStringUtf8.indexOf('\u0396')) - - // Test complex string indexOf algorithms. Only trigger for long strings. - // Long string that isn't a simple repeat of a shorter string. - let longString = 'A' - for (let i = 66; i < 76; i++) { // from 'B' to 'K' - longString = longString + String.fromCharCode(i) + longString - } - - const longBufferString = Buffer.from(longString) - - // pattern of 15 chars, repeated every 16 chars in long - let pattern = 'ABACABADABACABA' - for (let i = 0; i < longBufferString.length - pattern.length; i += 7) { - const index = longBufferString.indexOf(pattern, i) - t.equal((i + 15) & ~0xf, index, - `Long ABACABA...-string at index ${i}`) - } - - let index = longBufferString.indexOf('AJABACA') - t.equal(510, index, `Long AJABACA, First J - at index ${index}`) - index = longBufferString.indexOf('AJABACA', 511) - t.equal(1534, index, `Long AJABACA, Second J - at index ${index}`) - - pattern = 'JABACABADABACABA' - index = longBufferString.indexOf(pattern) - t.equal(511, index, `Long JABACABA..., First J - at index ${index}`) - index = longBufferString.indexOf(pattern, 512) - t.equal( - 1535, index, `Long JABACABA..., Second J - at index ${index}`) - - // Search for a non-ASCII string in a pure ASCII string. - const asciiString = Buffer.from( - 'somethingnotatallsinisterwhichalsoworks') - t.equal(-1, asciiString.indexOf('\x2061')) - t.equal(3, asciiString.indexOf('eth', 0)) - - // Search in string containing many non-ASCII chars. - const allCodePoints = [] - for (let i = 0; i < 65536; i++) { - allCodePoints[i] = i - } - - const allCharsString = String.fromCharCode.apply(String, allCodePoints) - const allCharsBufferUtf8 = Buffer.from(allCharsString) - const allCharsBufferUcs2 = Buffer.from(allCharsString, 'ucs2') - - // Search for string long enough to trigger complex search with ASCII pattern - // and UC16 subject. - t.equal(-1, allCharsBufferUtf8.indexOf('notfound')) - t.equal(-1, allCharsBufferUcs2.indexOf('notfound')) - - // Needle is longer than haystack, but only because it's encoded as UTF-16 - t.equal(Buffer.from('aaaa').indexOf('a'.repeat(4), 'ucs2'), -1) - - t.equal(Buffer.from('aaaa').indexOf('a'.repeat(4), 'utf8'), 0) - t.equal(Buffer.from('aaaa').indexOf('你好', 'ucs2'), -1) - - // Haystack has odd length, but the needle is UCS2. - t.equal(Buffer.from('aaaaa').indexOf('b', 'ucs2'), -1) - - { - // Find substrings in Utf8. - const lengths = [1, 3, 15] // Single char, simple and complex. - const indices = [0x5, 0x60, 0x400, 0x680, 0x7ee, 0xFF02, 0x16610, 0x2f77b] - for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) { - for (let i = 0; i < indices.length; i++) { - const index = indices[i] - let length = lengths[lengthIndex] - - if (index + length > 0x7F) { - length = 2 * length - } - - if (index + length > 0x7FF) { - length = 3 * length - } - - if (index + length > 0xFFFF) { - length = 4 * length - } - - const patternBufferUtf8 = allCharsBufferUtf8.slice(index, index + length) - t.equal(index, allCharsBufferUtf8.indexOf(patternBufferUtf8)) - - const patternStringUtf8 = patternBufferUtf8.toString() - t.equal(index, allCharsBufferUtf8.indexOf(patternStringUtf8)) - } - } - } - - { - // Find substrings in Usc2. - const lengths = [2, 4, 16] // Single char, simple and complex. - const indices = [0x5, 0x65, 0x105, 0x205, 0x285, 0x2005, 0x2085, 0xfff0] - - for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) { - for (let i = 0; i < indices.length; i++) { - const index = indices[i] * 2 - const length = lengths[lengthIndex] - - const patternBufferUcs2 = - allCharsBufferUcs2.slice(index, index + length) - t.equal( - index, allCharsBufferUcs2.indexOf(patternBufferUcs2, 0, 'ucs2')) - - const patternStringUcs2 = patternBufferUcs2.toString('ucs2') - t.equal( - index, allCharsBufferUcs2.indexOf(patternStringUcs2, 0, 'ucs2')) - } - } - } - - [ - () => {}, - {}, - [] - ].forEach((val) => { - t.throws(() => b.indexOf(val), TypeError, `"${JSON.stringify(val)}" should throw`) - }) - - // Test weird offset arguments. - // The following offsets coerce to NaN or 0, searching the whole Buffer - t.equal(b.indexOf('b', undefined), 1) - t.equal(b.indexOf('b', {}), 1) - t.equal(b.indexOf('b', 0), 1) - t.equal(b.indexOf('b', null), 1) - t.equal(b.indexOf('b', []), 1) - - // The following offset coerces to 2, in other words +[2] === 2 - t.equal(b.indexOf('b', [2]), -1) - - // Behavior should match String.indexOf() - t.equal( - b.indexOf('b', undefined), - stringComparison.indexOf('b', undefined)) - t.equal( - b.indexOf('b', {}), - stringComparison.indexOf('b', {})) - t.equal( - b.indexOf('b', 0), - stringComparison.indexOf('b', 0)) - t.equal( - b.indexOf('b', null), - stringComparison.indexOf('b', null)) - t.equal( - b.indexOf('b', []), - stringComparison.indexOf('b', [])) - t.equal( - b.indexOf('b', [2]), - stringComparison.indexOf('b', [2])) - - // test truncation of Number arguments to uint8 - { - const buf = Buffer.from('this is a test') - - t.equal(buf.indexOf(0x6973), 3) - t.equal(buf.indexOf(0x697320), 4) - t.equal(buf.indexOf(0x69732069), 2) - t.equal(buf.indexOf(0x697374657374), 0) - t.equal(buf.indexOf(0x69737374), 0) - t.equal(buf.indexOf(0x69737465), 11) - t.equal(buf.indexOf(0x69737465), 11) - t.equal(buf.indexOf(-140), 0) - t.equal(buf.indexOf(-152), 1) - t.equal(buf.indexOf(0xff), -1) - t.equal(buf.indexOf(0xffff), -1) - } - - // Test that Uint8Array arguments are okay. - { - const needle = new Uint8Array([0x66, 0x6f, 0x6f]) - const haystack = new BufferList(Buffer.from('a foo b foo')) - t.equal(haystack.indexOf(needle), 2) - } - - t.end() -}) diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/isBufferList.js b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/isBufferList.js deleted file mode 100644 index 9d895d5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/isBufferList.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict' - -const tape = require('tape') -const { BufferList, BufferListStream } = require('../') -const { Buffer } = require('buffer') - -tape('isBufferList positives', (t) => { - t.ok(BufferList.isBufferList(new BufferList())) - t.ok(BufferList.isBufferList(new BufferListStream())) - - t.end() -}) - -tape('isBufferList negatives', (t) => { - const types = [ - null, - undefined, - NaN, - true, - false, - {}, - [], - Buffer.alloc(0), - [Buffer.alloc(0)] - ] - - for (const obj of types) { - t.notOk(BufferList.isBufferList(obj)) - } - - t.end() -}) diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/test.js b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/test.js deleted file mode 100644 index e523d0c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/bl/test/test.js +++ /dev/null @@ -1,869 +0,0 @@ -'use strict' - -const tape = require('tape') -const crypto = require('crypto') -const fs = require('fs') -const path = require('path') -const BufferList = require('../') -const { Buffer } = require('buffer') - -const encodings = - ('hex utf8 utf-8 ascii binary base64' + - (process.browser ? '' : ' ucs2 ucs-2 utf16le utf-16le')).split(' ') - -require('./indexOf') -require('./isBufferList') -require('./convert') - -tape('single bytes from single buffer', function (t) { - const bl = new BufferList() - - bl.append(Buffer.from('abcd')) - - t.equal(bl.length, 4) - t.equal(bl.get(-1), undefined) - t.equal(bl.get(0), 97) - t.equal(bl.get(1), 98) - t.equal(bl.get(2), 99) - t.equal(bl.get(3), 100) - t.equal(bl.get(4), undefined) - - t.end() -}) - -tape('single bytes from multiple buffers', function (t) { - const bl = new BufferList() - - bl.append(Buffer.from('abcd')) - bl.append(Buffer.from('efg')) - bl.append(Buffer.from('hi')) - bl.append(Buffer.from('j')) - - t.equal(bl.length, 10) - - t.equal(bl.get(0), 97) - t.equal(bl.get(1), 98) - t.equal(bl.get(2), 99) - t.equal(bl.get(3), 100) - t.equal(bl.get(4), 101) - t.equal(bl.get(5), 102) - t.equal(bl.get(6), 103) - t.equal(bl.get(7), 104) - t.equal(bl.get(8), 105) - t.equal(bl.get(9), 106) - - t.end() -}) - -tape('multi bytes from single buffer', function (t) { - const bl = new BufferList() - - bl.append(Buffer.from('abcd')) - - t.equal(bl.length, 4) - - t.equal(bl.slice(0, 4).toString('ascii'), 'abcd') - t.equal(bl.slice(0, 3).toString('ascii'), 'abc') - t.equal(bl.slice(1, 4).toString('ascii'), 'bcd') - t.equal(bl.slice(-4, -1).toString('ascii'), 'abc') - - t.end() -}) - -tape('multi bytes from single buffer (negative indexes)', function (t) { - const bl = new BufferList() - - bl.append(Buffer.from('buffer')) - - t.equal(bl.length, 6) - - t.equal(bl.slice(-6, -1).toString('ascii'), 'buffe') - t.equal(bl.slice(-6, -2).toString('ascii'), 'buff') - t.equal(bl.slice(-5, -2).toString('ascii'), 'uff') - - t.end() -}) - -tape('multiple bytes from multiple buffers', function (t) { - const bl = new BufferList() - - bl.append(Buffer.from('abcd')) - bl.append(Buffer.from('efg')) - bl.append(Buffer.from('hi')) - bl.append(Buffer.from('j')) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') - t.equal(bl.slice(3, 6).toString('ascii'), 'def') - t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') - t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') - t.equal(bl.slice(-7, -4).toString('ascii'), 'def') - - t.end() -}) - -tape('multiple bytes from multiple buffer lists', function (t) { - const bl = new BufferList() - - bl.append(new BufferList([Buffer.from('abcd'), Buffer.from('efg')])) - bl.append(new BufferList([Buffer.from('hi'), Buffer.from('j')])) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - - t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') - t.equal(bl.slice(3, 6).toString('ascii'), 'def') - t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') - t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') - - t.end() -}) - -// same data as previous test, just using nested constructors -tape('multiple bytes from crazy nested buffer lists', function (t) { - const bl = new BufferList() - - bl.append(new BufferList([ - new BufferList([ - new BufferList(Buffer.from('abc')), - Buffer.from('d'), - new BufferList(Buffer.from('efg')) - ]), - new BufferList([Buffer.from('hi')]), - new BufferList(Buffer.from('j')) - ])) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - - t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') - t.equal(bl.slice(3, 6).toString('ascii'), 'def') - t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') - t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') - - t.end() -}) - -tape('append accepts arrays of Buffers', function (t) { - const bl = new BufferList() - - bl.append(Buffer.from('abc')) - bl.append([Buffer.from('def')]) - bl.append([Buffer.from('ghi'), Buffer.from('jkl')]) - bl.append([Buffer.from('mnop'), Buffer.from('qrstu'), Buffer.from('vwxyz')]) - t.equal(bl.length, 26) - t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') - - t.end() -}) - -tape('append accepts arrays of Uint8Arrays', function (t) { - const bl = new BufferList() - - bl.append(new Uint8Array([97, 98, 99])) - bl.append([Uint8Array.from([100, 101, 102])]) - bl.append([new Uint8Array([103, 104, 105]), new Uint8Array([106, 107, 108])]) - bl.append([new Uint8Array([109, 110, 111, 112]), new Uint8Array([113, 114, 115, 116, 117]), new Uint8Array([118, 119, 120, 121, 122])]) - t.equal(bl.length, 26) - t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') - - t.end() -}) - -tape('append accepts arrays of BufferLists', function (t) { - const bl = new BufferList() - - bl.append(Buffer.from('abc')) - bl.append([new BufferList('def')]) - bl.append(new BufferList([Buffer.from('ghi'), new BufferList('jkl')])) - bl.append([Buffer.from('mnop'), new BufferList([Buffer.from('qrstu'), Buffer.from('vwxyz')])]) - t.equal(bl.length, 26) - t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') - - t.end() -}) - -tape('append chainable', function (t) { - const bl = new BufferList() - - t.ok(bl.append(Buffer.from('abcd')) === bl) - t.ok(bl.append([Buffer.from('abcd')]) === bl) - t.ok(bl.append(new BufferList(Buffer.from('abcd'))) === bl) - t.ok(bl.append([new BufferList(Buffer.from('abcd'))]) === bl) - - t.end() -}) - -tape('append chainable (test results)', function (t) { - const bl = new BufferList('abc') - .append([new BufferList('def')]) - .append(new BufferList([Buffer.from('ghi'), new BufferList('jkl')])) - .append([Buffer.from('mnop'), new BufferList([Buffer.from('qrstu'), Buffer.from('vwxyz')])]) - - t.equal(bl.length, 26) - t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') - - t.end() -}) - -tape('consuming from multiple buffers', function (t) { - const bl = new BufferList() - - bl.append(Buffer.from('abcd')) - bl.append(Buffer.from('efg')) - bl.append(Buffer.from('hi')) - bl.append(Buffer.from('j')) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - - bl.consume(3) - t.equal(bl.length, 7) - t.equal(bl.slice(0, 7).toString('ascii'), 'defghij') - - bl.consume(2) - t.equal(bl.length, 5) - t.equal(bl.slice(0, 5).toString('ascii'), 'fghij') - - bl.consume(1) - t.equal(bl.length, 4) - t.equal(bl.slice(0, 4).toString('ascii'), 'ghij') - - bl.consume(1) - t.equal(bl.length, 3) - t.equal(bl.slice(0, 3).toString('ascii'), 'hij') - - bl.consume(2) - t.equal(bl.length, 1) - t.equal(bl.slice(0, 1).toString('ascii'), 'j') - - t.end() -}) - -tape('complete consumption', function (t) { - const bl = new BufferList() - - bl.append(Buffer.from('a')) - bl.append(Buffer.from('b')) - - bl.consume(2) - - t.equal(bl.length, 0) - t.equal(bl._bufs.length, 0) - - t.end() -}) - -tape('test readUInt8 / readInt8', function (t) { - const buf1 = Buffer.alloc(1) - const buf2 = Buffer.alloc(3) - const buf3 = Buffer.alloc(3) - const bl = new BufferList() - - buf1[0] = 0x1 - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt8(), 0x1) - t.equal(bl.readUInt8(2), 0x3) - t.equal(bl.readInt8(2), 0x3) - t.equal(bl.readUInt8(3), 0x4) - t.equal(bl.readInt8(3), 0x4) - t.equal(bl.readUInt8(4), 0x23) - t.equal(bl.readInt8(4), 0x23) - t.equal(bl.readUInt8(5), 0x42) - t.equal(bl.readInt8(5), 0x42) - - t.end() -}) - -tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) { - const buf1 = Buffer.alloc(1) - const buf2 = Buffer.alloc(3) - const buf3 = Buffer.alloc(3) - const bl = new BufferList() - - buf1[0] = 0x1 - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt16BE(), 0x0100) - t.equal(bl.readUInt16LE(), 0x0001) - t.equal(bl.readUInt16BE(2), 0x0304) - t.equal(bl.readUInt16LE(2), 0x0403) - t.equal(bl.readInt16BE(2), 0x0304) - t.equal(bl.readInt16LE(2), 0x0403) - t.equal(bl.readUInt16BE(3), 0x0423) - t.equal(bl.readUInt16LE(3), 0x2304) - t.equal(bl.readInt16BE(3), 0x0423) - t.equal(bl.readInt16LE(3), 0x2304) - t.equal(bl.readUInt16BE(4), 0x2342) - t.equal(bl.readUInt16LE(4), 0x4223) - t.equal(bl.readInt16BE(4), 0x2342) - t.equal(bl.readInt16LE(4), 0x4223) - - t.end() -}) - -tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) { - const buf1 = Buffer.alloc(1) - const buf2 = Buffer.alloc(3) - const buf3 = Buffer.alloc(3) - const bl = new BufferList() - - buf1[0] = 0x1 - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt32BE(), 0x01000304) - t.equal(bl.readUInt32LE(), 0x04030001) - t.equal(bl.readUInt32BE(2), 0x03042342) - t.equal(bl.readUInt32LE(2), 0x42230403) - t.equal(bl.readInt32BE(2), 0x03042342) - t.equal(bl.readInt32LE(2), 0x42230403) - - t.end() -}) - -tape('test readUIntLE / readUIntBE / readIntLE / readIntBE', function (t) { - const buf1 = Buffer.alloc(1) - const buf2 = Buffer.alloc(3) - const buf3 = Buffer.alloc(3) - const bl = new BufferList() - - buf2[0] = 0x2 - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - buf3[2] = 0x61 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUIntBE(1, 1), 0x02) - t.equal(bl.readUIntBE(1, 2), 0x0203) - t.equal(bl.readUIntBE(1, 3), 0x020304) - t.equal(bl.readUIntBE(1, 4), 0x02030423) - t.equal(bl.readUIntBE(1, 5), 0x0203042342) - t.equal(bl.readUIntBE(1, 6), 0x020304234261) - t.equal(bl.readUIntLE(1, 1), 0x02) - t.equal(bl.readUIntLE(1, 2), 0x0302) - t.equal(bl.readUIntLE(1, 3), 0x040302) - t.equal(bl.readUIntLE(1, 4), 0x23040302) - t.equal(bl.readUIntLE(1, 5), 0x4223040302) - t.equal(bl.readUIntLE(1, 6), 0x614223040302) - t.equal(bl.readIntBE(1, 1), 0x02) - t.equal(bl.readIntBE(1, 2), 0x0203) - t.equal(bl.readIntBE(1, 3), 0x020304) - t.equal(bl.readIntBE(1, 4), 0x02030423) - t.equal(bl.readIntBE(1, 5), 0x0203042342) - t.equal(bl.readIntBE(1, 6), 0x020304234261) - t.equal(bl.readIntLE(1, 1), 0x02) - t.equal(bl.readIntLE(1, 2), 0x0302) - t.equal(bl.readIntLE(1, 3), 0x040302) - t.equal(bl.readIntLE(1, 4), 0x23040302) - t.equal(bl.readIntLE(1, 5), 0x4223040302) - t.equal(bl.readIntLE(1, 6), 0x614223040302) - - t.end() -}) - -tape('test readFloatLE / readFloatBE', function (t) { - const buf1 = Buffer.alloc(1) - const buf2 = Buffer.alloc(3) - const buf3 = Buffer.alloc(3) - const bl = new BufferList() - - buf1[0] = 0x01 - buf2[1] = 0x00 - buf2[2] = 0x00 - buf3[0] = 0x80 - buf3[1] = 0x3f - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - const canonical = Buffer.concat([buf1, buf2, buf3]) - t.equal(bl.readFloatLE(), canonical.readFloatLE()) - t.equal(bl.readFloatBE(), canonical.readFloatBE()) - t.equal(bl.readFloatLE(2), canonical.readFloatLE(2)) - t.equal(bl.readFloatBE(2), canonical.readFloatBE(2)) - - t.end() -}) - -tape('test readDoubleLE / readDoubleBE', function (t) { - const buf1 = Buffer.alloc(1) - const buf2 = Buffer.alloc(3) - const buf3 = Buffer.alloc(10) - const bl = new BufferList() - - buf1[0] = 0x01 - buf2[1] = 0x55 - buf2[2] = 0x55 - buf3[0] = 0x55 - buf3[1] = 0x55 - buf3[2] = 0x55 - buf3[3] = 0x55 - buf3[4] = 0xd5 - buf3[5] = 0x3f - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - const canonical = Buffer.concat([buf1, buf2, buf3]) - t.equal(bl.readDoubleBE(), canonical.readDoubleBE()) - t.equal(bl.readDoubleLE(), canonical.readDoubleLE()) - t.equal(bl.readDoubleBE(2), canonical.readDoubleBE(2)) - t.equal(bl.readDoubleLE(2), canonical.readDoubleLE(2)) - - t.end() -}) - -tape('test toString', function (t) { - const bl = new BufferList() - - bl.append(Buffer.from('abcd')) - bl.append(Buffer.from('efg')) - bl.append(Buffer.from('hi')) - bl.append(Buffer.from('j')) - - t.equal(bl.toString('ascii', 0, 10), 'abcdefghij') - t.equal(bl.toString('ascii', 3, 10), 'defghij') - t.equal(bl.toString('ascii', 3, 6), 'def') - t.equal(bl.toString('ascii', 3, 8), 'defgh') - t.equal(bl.toString('ascii', 5, 10), 'fghij') - - t.end() -}) - -tape('test toString encoding', function (t) { - const bl = new BufferList() - const b = Buffer.from('abcdefghij\xff\x00') - - bl.append(Buffer.from('abcd')) - bl.append(Buffer.from('efg')) - bl.append(Buffer.from('hi')) - bl.append(Buffer.from('j')) - bl.append(Buffer.from('\xff\x00')) - - encodings.forEach(function (enc) { - t.equal(bl.toString(enc), b.toString(enc), enc) - }) - - t.end() -}) - -tape('uninitialized memory', function (t) { - const secret = crypto.randomBytes(256) - for (let i = 0; i < 1e6; i++) { - const clone = Buffer.from(secret) - const bl = new BufferList() - bl.append(Buffer.from('a')) - bl.consume(-1024) - const buf = bl.slice(1) - if (buf.indexOf(clone) !== -1) { - t.fail(`Match (at ${i})`) - break - } - } - t.end() -}) - -!process.browser && tape('test stream', function (t) { - const random = crypto.randomBytes(65534) - - const bl = new BufferList((err, buf) => { - t.ok(Buffer.isBuffer(buf)) - t.ok(err === null) - t.ok(random.equals(bl.slice())) - t.ok(random.equals(buf.slice())) - - bl.pipe(fs.createWriteStream('/tmp/bl_test_rnd_out.dat')) - .on('close', function () { - const rndhash = crypto.createHash('md5').update(random).digest('hex') - const md5sum = crypto.createHash('md5') - const s = fs.createReadStream('/tmp/bl_test_rnd_out.dat') - - s.on('data', md5sum.update.bind(md5sum)) - s.on('end', function () { - t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!') - t.end() - }) - }) - }) - - fs.writeFileSync('/tmp/bl_test_rnd.dat', random) - fs.createReadStream('/tmp/bl_test_rnd.dat').pipe(bl) -}) - -tape('instantiation with Buffer', function (t) { - const buf = crypto.randomBytes(1024) - const buf2 = crypto.randomBytes(1024) - let b = BufferList(buf) - - t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer') - b = BufferList([buf, buf2]) - t.equal(b.slice().toString('hex'), Buffer.concat([buf, buf2]).toString('hex'), 'same buffer') - - t.end() -}) - -tape('test String appendage', function (t) { - const bl = new BufferList() - const b = Buffer.from('abcdefghij\xff\x00') - - bl.append('abcd') - bl.append('efg') - bl.append('hi') - bl.append('j') - bl.append('\xff\x00') - - encodings.forEach(function (enc) { - t.equal(bl.toString(enc), b.toString(enc)) - }) - - t.end() -}) - -tape('test Number appendage', function (t) { - const bl = new BufferList() - const b = Buffer.from('1234567890') - - bl.append(1234) - bl.append(567) - bl.append(89) - bl.append(0) - - encodings.forEach(function (enc) { - t.equal(bl.toString(enc), b.toString(enc)) - }) - - t.end() -}) - -tape('write nothing, should get empty buffer', function (t) { - t.plan(3) - BufferList(function (err, data) { - t.notOk(err, 'no error') - t.ok(Buffer.isBuffer(data), 'got a buffer') - t.equal(0, data.length, 'got a zero-length buffer') - t.end() - }).end() -}) - -tape('unicode string', function (t) { - t.plan(2) - - const inp1 = '\u2600' - const inp2 = '\u2603' - const exp = inp1 + ' and ' + inp2 - const bl = BufferList() - - bl.write(inp1) - bl.write(' and ') - bl.write(inp2) - t.equal(exp, bl.toString()) - t.equal(Buffer.from(exp).toString('hex'), bl.toString('hex')) -}) - -tape('should emit finish', function (t) { - const source = BufferList() - const dest = BufferList() - - source.write('hello') - source.pipe(dest) - - dest.on('finish', function () { - t.equal(dest.toString('utf8'), 'hello') - t.end() - }) -}) - -tape('basic copy', function (t) { - const buf = crypto.randomBytes(1024) - const buf2 = Buffer.alloc(1024) - const b = BufferList(buf) - - b.copy(buf2) - t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') - - t.end() -}) - -tape('copy after many appends', function (t) { - const buf = crypto.randomBytes(512) - const buf2 = Buffer.alloc(1024) - const b = BufferList(buf) - - b.append(buf) - b.copy(buf2) - t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') - - t.end() -}) - -tape('copy at a precise position', function (t) { - const buf = crypto.randomBytes(1004) - const buf2 = Buffer.alloc(1024) - const b = BufferList(buf) - - b.copy(buf2, 20) - t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer') - - t.end() -}) - -tape('copy starting from a precise location', function (t) { - const buf = crypto.randomBytes(10) - const buf2 = Buffer.alloc(5) - const b = BufferList(buf) - - b.copy(buf2, 0, 5) - t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer') - - t.end() -}) - -tape('copy in an interval', function (t) { - const rnd = crypto.randomBytes(10) - const b = BufferList(rnd) // put the random bytes there - const actual = Buffer.alloc(3) - const expected = Buffer.alloc(3) - - rnd.copy(expected, 0, 5, 8) - b.copy(actual, 0, 5, 8) - - t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer') - - t.end() -}) - -tape('copy an interval between two buffers', function (t) { - const buf = crypto.randomBytes(10) - const buf2 = Buffer.alloc(10) - const b = BufferList(buf) - - b.append(buf) - b.copy(buf2, 0, 5, 15) - - t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer') - - t.end() -}) - -tape('shallow slice across buffer boundaries', function (t) { - const bl = new BufferList(['First', 'Second', 'Third']) - - t.equal(bl.shallowSlice(3, 13).toString(), 'stSecondTh') - - t.end() -}) - -tape('shallow slice within single buffer', function (t) { - t.plan(2) - - const bl = new BufferList(['First', 'Second', 'Third']) - - t.equal(bl.shallowSlice(5, 10).toString(), 'Secon') - t.equal(bl.shallowSlice(7, 10).toString(), 'con') - - t.end() -}) - -tape('shallow slice single buffer', function (t) { - t.plan(3) - - const bl = new BufferList(['First', 'Second', 'Third']) - - t.equal(bl.shallowSlice(0, 5).toString(), 'First') - t.equal(bl.shallowSlice(5, 11).toString(), 'Second') - t.equal(bl.shallowSlice(11, 16).toString(), 'Third') -}) - -tape('shallow slice with negative or omitted indices', function (t) { - t.plan(4) - - const bl = new BufferList(['First', 'Second', 'Third']) - - t.equal(bl.shallowSlice().toString(), 'FirstSecondThird') - t.equal(bl.shallowSlice(5).toString(), 'SecondThird') - t.equal(bl.shallowSlice(5, -3).toString(), 'SecondTh') - t.equal(bl.shallowSlice(-8).toString(), 'ondThird') -}) - -tape('shallow slice does not make a copy', function (t) { - t.plan(1) - - const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')] - const bl = (new BufferList(buffers)).shallowSlice(5, -3) - - buffers[1].fill('h') - buffers[2].fill('h') - - t.equal(bl.toString(), 'hhhhhhhh') -}) - -tape('shallow slice with 0 length', function (t) { - t.plan(1) - - const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')] - const bl = (new BufferList(buffers)).shallowSlice(0, 0) - - t.equal(bl.length, 0) -}) - -tape('shallow slice with 0 length from middle', function (t) { - t.plan(1) - - const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')] - const bl = (new BufferList(buffers)).shallowSlice(10, 10) - - t.equal(bl.length, 0) -}) - -tape('duplicate', function (t) { - t.plan(2) - - const bl = new BufferList('abcdefghij\xff\x00') - const dup = bl.duplicate() - - t.equal(bl.prototype, dup.prototype) - t.equal(bl.toString('hex'), dup.toString('hex')) -}) - -tape('destroy no pipe', function (t) { - t.plan(2) - - const bl = new BufferList('alsdkfja;lsdkfja;lsdk') - - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) -}) - -tape('destroy with error', function (t) { - t.plan(3) - - const bl = new BufferList('alsdkfja;lsdkfja;lsdk') - const err = new Error('kaboom') - - bl.destroy(err) - bl.on('error', function (_err) { - t.equal(_err, err) - }) - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) -}) - -!process.browser && tape('destroy with pipe before read end', function (t) { - t.plan(2) - - const bl = new BufferList() - fs.createReadStream(path.join(__dirname, '/test.js')) - .pipe(bl) - - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) -}) - -!process.browser && tape('destroy with pipe before read end with race', function (t) { - t.plan(2) - - const bl = new BufferList() - - fs.createReadStream(path.join(__dirname, '/test.js')) - .pipe(bl) - - setTimeout(function () { - bl.destroy() - setTimeout(function () { - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) - }, 500) - }, 500) -}) - -!process.browser && tape('destroy with pipe after read end', function (t) { - t.plan(2) - - const bl = new BufferList() - - fs.createReadStream(path.join(__dirname, '/test.js')) - .on('end', onEnd) - .pipe(bl) - - function onEnd () { - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) - } -}) - -!process.browser && tape('destroy with pipe while writing to a destination', function (t) { - t.plan(4) - - const bl = new BufferList() - const ds = new BufferList() - - fs.createReadStream(path.join(__dirname, '/test.js')) - .on('end', onEnd) - .pipe(bl) - - function onEnd () { - bl.pipe(ds) - - setTimeout(function () { - bl.destroy() - - t.equals(bl._bufs.length, 0) - t.equals(bl.length, 0) - - ds.destroy() - - t.equals(bl._bufs.length, 0) - t.equals(bl.length, 0) - }, 100) - } -}) - -!process.browser && tape('handle error', function (t) { - t.plan(2) - - fs.createReadStream('/does/not/exist').pipe(BufferList(function (err, data) { - t.ok(err instanceof Error, 'has error') - t.notOk(data, 'no data') - })) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/buffer b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/buffer deleted file mode 120000 index 4b421ea..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/buffer +++ /dev/null @@ -1 +0,0 @@ -../../buffer@5.7.1/node_modules/buffer \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/inherits b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/inherits deleted file mode 120000 index a2c9607..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/inherits +++ /dev/null @@ -1 +0,0 @@ -../../inherits@2.0.4/node_modules/inherits \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/readable-stream b/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/readable-stream deleted file mode 120000 index 4ca17de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/bl@4.1.0/node_modules/readable-stream +++ /dev/null @@ -1 +0,0 @@ -../../readable-stream@3.6.2/node_modules/readable-stream \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/balanced-match b/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/balanced-match deleted file mode 120000 index ac7ce81..0000000 --- a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/balanced-match +++ /dev/null @@ -1 +0,0 @@ -../../balanced-match@1.0.2/node_modules/balanced-match \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/LICENSE b/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/LICENSE deleted file mode 100644 index de32266..0000000 --- a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013 Julian Gruber - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/README.md b/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/README.md deleted file mode 100644 index 6b4e0e1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) -[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## Sponsors - -This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! - -Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/index.js b/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/index.js deleted file mode 100644 index 92a0b6b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,203 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str, options) { - if (!str) - return []; - - options = options || {}; - var max = options.max == null ? Infinity : options.max; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), max, true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, max, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,(?!,).*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str, max, true); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], max, false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, max, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, max, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.max(Math.abs(numeric(n[2])), 1) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y) && N.length < max; i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, max, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length && expansions.length < max; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} diff --git a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/package.json b/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/package.json deleted file mode 100644 index ceb54d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "brace-expansion", - "description": "Brace expansion as known from sh/bash", - "version": "1.1.15", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "main": "index.js", - "scripts": { - "test": "tape test/*.js", - "gentest": "bash test/generate.sh", - "bench": "matcha test/perf/bench.js" - }, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - }, - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "keywords": [], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "publishConfig": { - "tag": "1.x" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/concat-map b/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/concat-map deleted file mode 120000 index 1b8bb9b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/brace-expansion@1.1.15/node_modules/concat-map +++ /dev/null @@ -1 +0,0 @@ -../../concat-map@0.0.1/node_modules/concat-map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/base64-js b/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/base64-js deleted file mode 120000 index 47fd237..0000000 --- a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/base64-js +++ /dev/null @@ -1 +0,0 @@ -../../base64-js@1.5.1/node_modules/base64-js \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/AUTHORS.md b/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/AUTHORS.md deleted file mode 100644 index 22eb171..0000000 --- a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/AUTHORS.md +++ /dev/null @@ -1,70 +0,0 @@ -# Authors - -#### Ordered by first contribution. - -- Romain Beauxis (toots@rastageeks.org) -- Tobias Koppers (tobias.koppers@googlemail.com) -- Janus (ysangkok@gmail.com) -- Rainer Dreyer (rdrey1@gmail.com) -- Tõnis Tiigi (tonistiigi@gmail.com) -- James Halliday (mail@substack.net) -- Michael Williamson (mike@zwobble.org) -- elliottcable (github@elliottcable.name) -- rafael (rvalle@livelens.net) -- Andrew Kelley (superjoe30@gmail.com) -- Andreas Madsen (amwebdk@gmail.com) -- Mike Brevoort (mike.brevoort@pearson.com) -- Brian White (mscdex@mscdex.net) -- Feross Aboukhadijeh (feross@feross.org) -- Ruben Verborgh (ruben@verborgh.org) -- eliang (eliang.cs@gmail.com) -- Jesse Tane (jesse.tane@gmail.com) -- Alfonso Boza (alfonso@cloud.com) -- Mathias Buus (mathiasbuus@gmail.com) -- Devon Govett (devongovett@gmail.com) -- Daniel Cousens (github@dcousens.com) -- Joseph Dykstra (josephdykstra@gmail.com) -- Parsha Pourkhomami (parshap+git@gmail.com) -- Damjan Košir (damjan.kosir@gmail.com) -- daverayment (dave.rayment@gmail.com) -- kawanet (u-suke@kawa.net) -- Linus Unnebäck (linus@folkdatorn.se) -- Nolan Lawson (nolan.lawson@gmail.com) -- Calvin Metcalf (calvin.metcalf@gmail.com) -- Koki Takahashi (hakatasiloving@gmail.com) -- Guy Bedford (guybedford@gmail.com) -- Jan Schär (jscissr@gmail.com) -- RaulTsc (tomescu.raul@gmail.com) -- Matthieu Monsch (monsch@alum.mit.edu) -- Dan Ehrenberg (littledan@chromium.org) -- Kirill Fomichev (fanatid@ya.ru) -- Yusuke Kawasaki (u-suke@kawa.net) -- DC (dcposch@dcpos.ch) -- John-David Dalton (john.david.dalton@gmail.com) -- adventure-yunfei (adventure030@gmail.com) -- Emil Bay (github@tixz.dk) -- Sam Sudar (sudar.sam@gmail.com) -- Volker Mische (volker.mische@gmail.com) -- David Walton (support@geekstocks.com) -- Сковорода Никита Андреевич (chalkerx@gmail.com) -- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com) -- ukstv (sergey.ukustov@machinomy.com) -- Renée Kooi (renee@kooi.me) -- ranbochen (ranbochen@qq.com) -- Vladimir Borovik (bobahbdb@gmail.com) -- greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com) -- kumavis (aaron@kumavis.me) -- Sergey Ukustov (sergey.ukustov@machinomy.com) -- Fei Liu (liu.feiwood@gmail.com) -- Blaine Bublitz (blaine.bublitz@gmail.com) -- clement (clement@seald.io) -- Koushik Dutta (koushd@gmail.com) -- Jordan Harband (ljharb@gmail.com) -- Niklas Mischkulnig (mischnic@users.noreply.github.com) -- Nikolai Vavilov (vvnicholas@gmail.com) -- Fedor Nezhivoi (gyzerok@users.noreply.github.com) -- Peter Newman (peternewman@users.noreply.github.com) -- mathmakgakpak (44949126+mathmakgakpak@users.noreply.github.com) -- jkkang (jkkang@smartauth.kr) - -#### Generated by bin/update-authors.sh. diff --git a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/LICENSE b/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/LICENSE deleted file mode 100644 index d6bf75d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh, and other contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/README.md b/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/README.md deleted file mode 100644 index 9a23d7c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/README.md +++ /dev/null @@ -1,410 +0,0 @@ -# buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/buffer/master.svg -[travis-url]: https://travis-ci.org/feross/buffer -[npm-image]: https://img.shields.io/npm/v/buffer.svg -[npm-url]: https://npmjs.org/package/buffer -[downloads-image]: https://img.shields.io/npm/dm/buffer.svg -[downloads-url]: https://npmjs.org/package/buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### The buffer module from [node.js](https://nodejs.org/), for the browser. - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg -[saucelabs-url]: https://saucelabs.com/u/buffer - -With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module. - -The goal is to provide an API that is 100% identical to -[node's Buffer API](https://nodejs.org/api/buffer.html). Read the -[official docs](https://nodejs.org/api/buffer.html) for the full list of properties, -instance methods, and class methods that are supported. - -## features - -- Manipulate binary data like a boss, in all browsers! -- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`) -- Extremely small bundle size (**6.75KB minified + gzipped**, 51.9KB with comments) -- Excellent browser support (Chrome, Firefox, Edge, Safari 9+, IE 11, iOS 9+, Android, etc.) -- Preserves Node API exactly, with one minor difference (see below) -- Square-bracket `buf[4]` notation works! -- Does not modify any browser prototypes or put anything on `window` -- Comprehensive test suite (including all buffer tests from node.js core) - -## install - -To use this module directly (without browserify), install it: - -```bash -npm install buffer -``` - -This module was previously called **native-buffer-browserify**, but please use **buffer** -from now on. - -If you do not use a bundler, you can use the [standalone script](https://bundle.run/buffer). - -## usage - -The module's API is identical to node's `Buffer` API. Read the -[official docs](https://nodejs.org/api/buffer.html) for the full list of properties, -instance methods, and class methods that are supported. - -As mentioned above, `require('buffer')` or use the `Buffer` global with -[browserify](http://browserify.org) and this module will automatically be included -in your bundle. Almost any npm module will work in the browser, even if it assumes that -the node `Buffer` API will be available. - -To depend on this module explicitly (without browserify), require it like this: - -```js -var Buffer = require('buffer/').Buffer // note: the trailing slash is important! -``` - -To require this module explicitly, use `require('buffer/')` which tells the node.js module -lookup algorithm (also used by browserify) to use the **npm module** named `buffer` -instead of the **node.js core** module named `buffer`! - - -## how does it work? - -The Buffer constructor returns instances of `Uint8Array` that have their prototype -changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`, -so the returned instances will have all the node `Buffer` methods and the -`Uint8Array` methods. Square bracket notation works as expected -- it returns a -single octet. - -The `Uint8Array` prototype remains unmodified. - - -## tracking the latest node api - -This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer -API is considered **stable** in the -[node stability index](https://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index), -so it is unlikely that there will ever be breaking changes. -Nonetheless, when/if the Buffer API changes in node, this module's API will change -accordingly. - -## related packages - -- [`buffer-reverse`](https://www.npmjs.com/package/buffer-reverse) - Reverse a buffer -- [`buffer-xor`](https://www.npmjs.com/package/buffer-xor) - Bitwise xor a buffer -- [`is-buffer`](https://www.npmjs.com/package/is-buffer) - Determine if an object is a Buffer without including the whole `Buffer` package - -## conversion packages - -### convert typed array to buffer - -Use [`typedarray-to-buffer`](https://www.npmjs.com/package/typedarray-to-buffer) to convert any kind of typed array to a `Buffer`. Does not perform a copy, so it's super fast. - -### convert buffer to typed array - -`Buffer` is a subclass of `Uint8Array` (which is a typed array). So there is no need to explicitly convert to typed array. Just use the buffer as a `Uint8Array`. - -### convert blob to buffer - -Use [`blob-to-buffer`](https://www.npmjs.com/package/blob-to-buffer) to convert a `Blob` to a `Buffer`. - -### convert buffer to blob - -To convert a `Buffer` to a `Blob`, use the `Blob` constructor: - -```js -var blob = new Blob([ buffer ]) -``` - -Optionally, specify a mimetype: - -```js -var blob = new Blob([ buffer ], { type: 'text/html' }) -``` - -### convert arraybuffer to buffer - -To convert an `ArrayBuffer` to a `Buffer`, use the `Buffer.from` function. Does not perform a copy, so it's super fast. - -```js -var buffer = Buffer.from(arrayBuffer) -``` - -### convert buffer to arraybuffer - -To convert a `Buffer` to an `ArrayBuffer`, use the `.buffer` property (which is present on all `Uint8Array` objects): - -```js -var arrayBuffer = buffer.buffer.slice( - buffer.byteOffset, buffer.byteOffset + buffer.byteLength -) -``` - -Alternatively, use the [`to-arraybuffer`](https://www.npmjs.com/package/to-arraybuffer) module. - -## performance - -See perf tests in `/perf`. - -`BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as a -sanity check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will -always be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module, -which is included to compare against. - -NOTE: Performance has improved since these benchmarks were taken. PR welcome to update the README. - -### Chrome 38 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ | -| Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | | -| | | | | -| BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | | -| Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | | -| Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | | -| Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | | -| Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | | -| Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ | -| DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | | -| | | | | -| BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ | -| DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | | -| | | | | -| BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ | -| DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | | -| | | | | -| BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | | -| Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | | -| DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ | - - -### Firefox 33 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | | -| Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ | -| | | | | -| BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | | -| Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | | -| Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | | -| Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | | -| Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | | -| Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | | -| DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ | -| | | | | -| BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | | -| DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ | -| | | | | -| BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ | -| DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | | -| | | | | -| BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | | -| Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | | -| DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ | - -### Safari 8 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ | -| Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | | -| | | | | -| BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | | -| Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | | -| Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | | -| Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | | -| Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | | -| Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | | -| DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ | -| | | | | -| BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | | -| DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ | -| | | | | -| BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | | -| DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ | -| | | | | -| BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | | -| Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | | -| DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ | - - -### Node 0.11.14 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | | -| Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ | -| NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | | -| | | | | -| BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | | -| Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ | -| NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | | -| | | | | -| BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | | -| Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ | -| NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | | -| | | | | -| BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | | -| Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ | -| NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | | -| | | | | -| BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | | -| Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | | -| NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | | -| Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ | -| NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | | -| | | | | -| BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ | -| DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | | -| NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | | -| | | | | -| BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ | -| DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | | -| NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | | -| | | | | -| BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | | -| DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | | -| NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ | -| | | | | -| BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | | -| Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ | -| NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | | -| | | | | -| BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | | -| DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ | -| NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | | - -### iojs 1.8.1 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | | -| Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | | -| NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ | -| | | | | -| BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | | -| Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | | -| NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | | -| Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | | -| NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | | -| Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ | -| NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | | -| | | | | -| BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | | -| Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | | -| NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | | -| Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ | -| NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | | -| | | | | -| BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ | -| DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | | -| NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | | -| | | | | -| BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ | -| DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | | -| NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | | -| | | | | -| BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | | -| DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | | -| NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ | -| | | | | -| BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | | -| Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | | -| NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | | -| DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ | -| NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | | -| | | | | - -## Testing the project - -First, install the project: - - npm install - -Then, to run tests in Node.js, run: - - npm run test-node - -To test locally in a browser, you can run: - - npm run test-browser-es5-local # For ES5 browsers that don't support ES6 - npm run test-browser-es6-local # For ES6 compliant browsers - -This will print out a URL that you can then open in a browser to run the tests, using [airtap](https://www.npmjs.com/package/airtap). - -To run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run: - - npm test - -This is what's run in Travis, to check against various browsers. The list of browsers is kept in the `bin/airtap-es5.yml` and `bin/airtap-es6.yml` files. - -## JavaScript Standard Style - -This module uses [JavaScript Standard Style](https://github.com/feross/standard). - -[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -To test that the code conforms to the style, `npm install` and run: - - ./node_modules/.bin/standard - -## credit - -This was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify). - -## Security Policies and Procedures - -The `buffer` team and community take all security bugs in `buffer` seriously. Please see our [security policies and procedures](https://github.com/feross/security) document to learn how to report issues. - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis. diff --git a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts b/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts deleted file mode 100644 index 5d1a804..0000000 --- a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts +++ /dev/null @@ -1,186 +0,0 @@ -export class Buffer extends Uint8Array { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - reverse(): this; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer | Uint8Array): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initializing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; -} diff --git a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js b/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js deleted file mode 100644 index 609cf31..0000000 --- a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js +++ /dev/null @@ -1,1817 +0,0 @@ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -'use strict' - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var customInspectSymbol = - (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation - ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation - : null - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -var K_MAX_LENGTH = 0x7fffffff -exports.kMaxLength = K_MAX_LENGTH - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Print warning and recommend using `buffer` v4.x which has an Object - * implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * We report that the browser does not support typed arrays if the are not subclassable - * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` - * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support - * for __proto__ and has a buggy typed array implementation. - */ -Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() - -if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && - typeof console.error === 'function') { - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by ' + - '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ) -} - -function typedArraySupport () { - // Can typed array instances can be augmented? - try { - var arr = new Uint8Array(1) - var proto = { foo: function () { return 42 } } - Object.setPrototypeOf(proto, Uint8Array.prototype) - Object.setPrototypeOf(arr, proto) - return arr.foo() === 42 - } catch (e) { - return false - } -} - -Object.defineProperty(Buffer.prototype, 'parent', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.buffer - } -}) - -Object.defineProperty(Buffer.prototype, 'offset', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.byteOffset - } -}) - -function createBuffer (length) { - if (length > K_MAX_LENGTH) { - throw new RangeError('The value "' + length + '" is invalid for option "size"') - } - // Return an augmented `Uint8Array` instance - var buf = new Uint8Array(length) - Object.setPrototypeOf(buf, Buffer.prototype) - return buf -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new TypeError( - 'The "string" argument must be of type string. Received type number' - ) - } - return allocUnsafe(arg) - } - return from(arg, encodingOrOffset, length) -} - -Buffer.poolSize = 8192 // not used by this implementation - -function from (value, encodingOrOffset, length) { - if (typeof value === 'string') { - return fromString(value, encodingOrOffset) - } - - if (ArrayBuffer.isView(value)) { - return fromArrayView(value) - } - - if (value == null) { - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) - } - - if (isInstance(value, ArrayBuffer) || - (value && isInstance(value.buffer, ArrayBuffer))) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof SharedArrayBuffer !== 'undefined' && - (isInstance(value, SharedArrayBuffer) || - (value && isInstance(value.buffer, SharedArrayBuffer)))) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof value === 'number') { - throw new TypeError( - 'The "value" argument must not be of type number. Received type number' - ) - } - - var valueOf = value.valueOf && value.valueOf() - if (valueOf != null && valueOf !== value) { - return Buffer.from(valueOf, encodingOrOffset, length) - } - - var b = fromObject(value) - if (b) return b - - if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && - typeof value[Symbol.toPrimitive] === 'function') { - return Buffer.from( - value[Symbol.toPrimitive]('string'), encodingOrOffset, length - ) - } - - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(value, encodingOrOffset, length) -} - -// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: -// https://github.com/feross/buffer/pull/148 -Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype) -Object.setPrototypeOf(Buffer, Uint8Array) - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be of type number') - } else if (size < 0) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } -} - -function alloc (size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpreted as a start offset. - return typeof encoding === 'string' - ? createBuffer(size).fill(fill, encoding) - : createBuffer(size).fill(fill) - } - return createBuffer(size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(size, fill, encoding) -} - -function allocUnsafe (size) { - assertSize(size) - return createBuffer(size < 0 ? 0 : checked(size) | 0) -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(size) -} - -function fromString (string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - - var length = byteLength(string, encoding) | 0 - var buf = createBuffer(length) - - var actual = buf.write(string, encoding) - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - buf = buf.slice(0, actual) - } - - return buf -} - -function fromArrayLike (array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - var buf = createBuffer(length) - for (var i = 0; i < length; i += 1) { - buf[i] = array[i] & 255 - } - return buf -} - -function fromArrayView (arrayView) { - if (isInstance(arrayView, Uint8Array)) { - var copy = new Uint8Array(arrayView) - return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength) - } - return fromArrayLike(arrayView) -} - -function fromArrayBuffer (array, byteOffset, length) { - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('"offset" is outside of buffer bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('"length" is outside of buffer bounds') - } - - var buf - if (byteOffset === undefined && length === undefined) { - buf = new Uint8Array(array) - } else if (length === undefined) { - buf = new Uint8Array(array, byteOffset) - } else { - buf = new Uint8Array(array, byteOffset, length) - } - - // Return an augmented `Uint8Array` instance - Object.setPrototypeOf(buf, Buffer.prototype) - - return buf -} - -function fromObject (obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - var buf = createBuffer(len) - - if (buf.length === 0) { - return buf - } - - obj.copy(buf, 0, 0, len) - return buf - } - - if (obj.length !== undefined) { - if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { - return createBuffer(0) - } - return fromArrayLike(obj) - } - - if (obj.type === 'Buffer' && Array.isArray(obj.data)) { - return fromArrayLike(obj.data) - } -} - -function checked (length) { - // Note: cannot use `length < K_MAX_LENGTH` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= K_MAX_LENGTH) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} - -Buffer.isBuffer = function isBuffer (b) { - return b != null && b._isBuffer === true && - b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false -} - -Buffer.compare = function compare (a, b) { - if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) - if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError( - 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' - ) - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!Array.isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } - - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (isInstance(buf, Uint8Array)) { - if (pos + buf.length > buffer.length) { - Buffer.from(buf).copy(buffer, pos) - } else { - Uint8Array.prototype.set.call( - buffer, - buf, - pos - ) - } - } else if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } else { - buf.copy(buffer, pos) - } - pos += buf.length - } - return buffer -} - -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - throw new TypeError( - 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + - 'Received type ' + typeof string - ) - } - - var len = string.length - var mustMatch = (arguments.length > 2 && arguments[2] === true) - if (!mustMatch && len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) { - return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 - } - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coercion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) -// to detect a Buffer instance. It's not possible to use `instanceof Buffer` -// reliably in a browserify context because there could be multiple different -// copies of the 'buffer' package in use. This method works even for Buffer -// instances that were created from another copy of the `buffer` package. -// See: https://github.com/feross/buffer/issues/154 -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} - -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} - -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this -} - -Buffer.prototype.toString = function toString () { - var length = this.length - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.toLocaleString = Buffer.prototype.toString - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() - if (this.length > max) str += ' ... ' - return '' -} -if (customInspectSymbol) { - Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (isInstance(target, Uint8Array)) { - target = Buffer.from(target, target.offset, target.byteLength) - } - if (!Buffer.isBuffer(target)) { - throw new TypeError( - 'The "target" argument must be one of type Buffer or Uint8Array. ' + - 'Received type ' + (typeof target) - ) - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - - if (this === target) return 0 - - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) - - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (numberIsNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } - - return -1 -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} - -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - var strLen = string.length - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (numberIsNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset >>> 0 - if (isFinite(length)) { - length = length >>> 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - case 'latin1': - case 'binary': - return asciiWrite(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) - ? 4 - : (firstByte > 0xDF) - ? 3 - : (firstByte > 0xBF) - ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; ++i) { - out += hexSliceLookupTable[buf[i]] - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - // If bytes.length is odd, the last 8 bits must be ignored (same as node.js) - for (var i = 0; i < bytes.length - 1; i += 2) { - res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf = this.subarray(start, end) - // Return an augmented `Uint8Array` instance - Object.setPrototypeOf(newBuf, Buffer.prototype) - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUintLE = -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUintBE = -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUint8 = -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUint16LE = -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUint16BE = -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUint32LE = -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUint32BE = -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUintLE = -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUintBE = -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUint8 = -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeUint16LE = -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeUint16BE = -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeUint32LE = -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeUint32BE = -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('Index out of range') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - - if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { - // Use built-in when available, missing from IE11 - this.copyWithin(targetStart, start, end) - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, end), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if ((encoding === 'utf8' && code < 128) || - encoding === 'latin1') { - // Fast path: If `val` fits into a single byte, use that numeric value. - val = code - } - } - } else if (typeof val === 'number') { - val = val & 255 - } else if (typeof val === 'boolean') { - val = Number(val) - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : Buffer.from(val, encoding) - var len = bytes.length - if (len === 0) { - throw new TypeError('The value "' + val + - '" is invalid for argument "value"') - } - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node takes equal signs as end of the Base64 encoding - str = str.split('=')[0] - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = str.trim().replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass -// the `instanceof` check but they should be treated as of that type. -// See: https://github.com/feross/buffer/issues/166 -function isInstance (obj, type) { - return obj instanceof type || - (obj != null && obj.constructor != null && obj.constructor.name != null && - obj.constructor.name === type.name) -} -function numberIsNaN (obj) { - // For IE11 support - return obj !== obj // eslint-disable-line no-self-compare -} - -// Create lookup table for `toString('hex')` -// See: https://github.com/feross/buffer/issues/219 -var hexSliceLookupTable = (function () { - var alphabet = '0123456789abcdef' - var table = new Array(256) - for (var i = 0; i < 16; ++i) { - var i16 = i * 16 - for (var j = 0; j < 16; ++j) { - table[i16 + j] = alphabet[i] + alphabet[j] - } - } - return table -})() diff --git a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/package.json b/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/package.json deleted file mode 100644 index 3b1b498..0000000 --- a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "buffer", - "description": "Node.js Buffer API, for the browser", - "version": "5.7.1", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/buffer/issues" - }, - "contributors": [ - "Romain Beauxis ", - "James Halliday " - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - }, - "devDependencies": { - "airtap": "^3.0.0", - "benchmark": "^2.1.4", - "browserify": "^17.0.0", - "concat-stream": "^2.0.0", - "hyperquest": "^2.1.3", - "is-buffer": "^2.0.4", - "is-nan": "^1.3.0", - "split": "^1.0.1", - "standard": "*", - "tape": "^5.0.1", - "through2": "^4.0.2", - "uglify-js": "^3.11.3" - }, - "homepage": "https://github.com/feross/buffer", - "jspm": { - "map": { - "./index.js": { - "node": "@node/buffer" - } - } - }, - "keywords": [ - "arraybuffer", - "browser", - "browserify", - "buffer", - "compatible", - "dataview", - "uint8array" - ], - "license": "MIT", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/buffer.git" - }, - "scripts": { - "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html", - "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js", - "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c", - "test": "standard && node ./bin/test.js", - "test-browser-es5": "airtap -- test/*.js", - "test-browser-es5-local": "airtap --local -- test/*.js", - "test-browser-es6": "airtap -- test/*.js test/node/*.js", - "test-browser-es6-local": "airtap --local -- test/*.js test/node/*.js", - "test-node": "tape test/*.js test/node/*.js", - "update-authors": "./bin/update-authors.sh" - }, - "standard": { - "ignore": [ - "test/node/**/*.js", - "test/common.js", - "test/_polyfill.js", - "perf/**/*.js" - ], - "globals": [ - "SharedArrayBuffer" - ] - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/ieee754 b/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/ieee754 deleted file mode 120000 index 3b17b57..0000000 --- a/services/hocuspocus/node_modules/.pnpm/buffer@5.7.1/node_modules/ieee754 +++ /dev/null @@ -1 +0,0 @@ -../../ieee754@1.2.1/node_modules/ieee754 \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/@npmcli/fs b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/@npmcli/fs deleted file mode 120000 index 6525252..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/@npmcli/fs +++ /dev/null @@ -1 +0,0 @@ -../../../@npmcli+fs@1.1.1/node_modules/@npmcli/fs \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/@npmcli/move-file b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/@npmcli/move-file deleted file mode 120000 index bcb65db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/@npmcli/move-file +++ /dev/null @@ -1 +0,0 @@ -../../../@npmcli+move-file@1.1.2/node_modules/@npmcli/move-file \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/LICENSE.md deleted file mode 100644 index 8d28acf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/LICENSE.md +++ /dev/null @@ -1,16 +0,0 @@ -ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for -any purpose with or without fee is hereby granted, provided that the -above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS -ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/README.md b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/README.md deleted file mode 100644 index 6dc11ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/README.md +++ /dev/null @@ -1,703 +0,0 @@ -# cacache [![npm version](https://img.shields.io/npm/v/cacache.svg)](https://npm.im/cacache) [![license](https://img.shields.io/npm/l/cacache.svg)](https://npm.im/cacache) [![Travis](https://img.shields.io/travis/npm/cacache.svg)](https://travis-ci.org/npm/cacache) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/cacache?svg=true)](https://ci.appveyor.com/project/npm/cacache) [![Coverage Status](https://coveralls.io/repos/github/npm/cacache/badge.svg?branch=latest)](https://coveralls.io/github/npm/cacache?branch=latest) - -[`cacache`](https://github.com/npm/cacache) is a Node.js library for managing -local key and content address caches. It's really fast, really good at -concurrency, and it will never give you corrupted data, even if cache files -get corrupted or manipulated. - -On systems that support user and group settings on files, cacache will -match the `uid` and `gid` values to the folder where the cache lives, even -when running as `root`. - -It was written to be used as [npm](https://npm.im)'s local cache, but can -just as easily be used on its own. - -## Install - -`$ npm install --save cacache` - -## Table of Contents - -* [Example](#example) -* [Features](#features) -* [Contributing](#contributing) -* [API](#api) - * [Using localized APIs](#localized-api) - * Reading - * [`ls`](#ls) - * [`ls.stream`](#ls-stream) - * [`get`](#get-data) - * [`get.stream`](#get-stream) - * [`get.info`](#get-info) - * [`get.hasContent`](#get-hasContent) - * Writing - * [`put`](#put-data) - * [`put.stream`](#put-stream) - * [`rm.all`](#rm-all) - * [`rm.entry`](#rm-entry) - * [`rm.content`](#rm-content) - * [`index.compact`](#index-compact) - * [`index.insert`](#index-insert) - * Utilities - * [`clearMemoized`](#clear-memoized) - * [`tmp.mkdir`](#tmp-mkdir) - * [`tmp.withTmp`](#with-tmp) - * Integrity - * [Subresource Integrity](#integrity) - * [`verify`](#verify) - * [`verify.lastRun`](#verify-last-run) - -### Example - -```javascript -const cacache = require('cacache') -const fs = require('fs') - -const tarball = '/path/to/mytar.tgz' -const cachePath = '/tmp/my-toy-cache' -const key = 'my-unique-key-1234' - -// Cache it! Use `cachePath` as the root of the content cache -cacache.put(cachePath, key, '10293801983029384').then(integrity => { - console.log(`Saved content to ${cachePath}.`) -}) - -const destination = '/tmp/mytar.tgz' - -// Copy the contents out of the cache and into their destination! -// But this time, use stream instead! -cacache.get.stream( - cachePath, key -).pipe( - fs.createWriteStream(destination) -).on('finish', () => { - console.log('done extracting!') -}) - -// The same thing, but skip the key index. -cacache.get.byDigest(cachePath, integrityHash).then(data => { - fs.writeFile(destination, data, err => { - console.log('tarball data fetched based on its sha512sum and written out!') - }) -}) -``` - -### Features - -* Extraction by key or by content address (shasum, etc) -* [Subresource Integrity](#integrity) web standard support -* Multi-hash support - safely host sha1, sha512, etc, in a single cache -* Automatic content deduplication -* Fault tolerance (immune to corruption, partial writes, process races, etc) -* Consistency guarantees on read and write (full data verification) -* Lockless, high-concurrency cache access -* Streaming support -* Promise support -* Fast -- sub-millisecond reads and writes including verification -* Arbitrary metadata storage -* Garbage collection and additional offline verification -* Thorough test coverage -* There's probably a bloom filter in there somewhere. Those are cool, right? 🤔 - -### Contributing - -The cacache team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear. - -All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other. - -Please refer to the [Changelog](CHANGELOG.md) for project history details, too. - -Happy hacking! - -### API - -#### `> cacache.ls(cache) -> Promise` - -Lists info for all entries currently in the cache as a single large object. Each -entry in the object will be keyed by the unique index key, with corresponding -[`get.info`](#get-info) objects as the values. - -##### Example - -```javascript -cacache.ls(cachePath).then(console.log) -// Output -{ - 'my-thing': { - key: 'my-thing', - integrity: 'sha512-BaSe64/EnCoDED+HAsh==' - path: '.testcache/content/deadbeef', // joined with `cachePath` - time: 12345698490, - size: 4023948, - metadata: { - name: 'blah', - version: '1.2.3', - description: 'this was once a package but now it is my-thing' - } - }, - 'other-thing': { - key: 'other-thing', - integrity: 'sha1-ANothER+hasH=', - path: '.testcache/content/bada55', - time: 11992309289, - size: 111112 - } -} -``` - -#### `> cacache.ls.stream(cache) -> Readable` - -Lists info for all entries currently in the cache as a single large object. - -This works just like [`ls`](#ls), except [`get.info`](#get-info) entries are -returned as `'data'` events on the returned stream. - -##### Example - -```javascript -cacache.ls.stream(cachePath).on('data', console.log) -// Output -{ - key: 'my-thing', - integrity: 'sha512-BaSe64HaSh', - path: '.testcache/content/deadbeef', // joined with `cachePath` - time: 12345698490, - size: 13423, - metadata: { - name: 'blah', - version: '1.2.3', - description: 'this was once a package but now it is my-thing' - } -} - -{ - key: 'other-thing', - integrity: 'whirlpool-WoWSoMuchSupport', - path: '.testcache/content/bada55', - time: 11992309289, - size: 498023984029 -} - -{ - ... -} -``` - -#### `> cacache.get(cache, key, [opts]) -> Promise({data, metadata, integrity})` - -Returns an object with the cached data, digest, and metadata identified by -`key`. The `data` property of this object will be a `Buffer` instance that -presumably holds some data that means something to you. I'm sure you know what -to do with it! cacache just won't care. - -`integrity` is a [Subresource -Integrity](#integrity) -string. That is, a string that can be used to verify `data`, which looks like -`-`. - -If there is no content identified by `key`, or if the locally-stored data does -not pass the validity checksum, the promise will be rejected. - -A sub-function, `get.byDigest` may be used for identical behavior, except lookup -will happen by integrity hash, bypassing the index entirely. This version of the -function *only* returns `data` itself, without any wrapper. - -See: [options](#get-options) - -##### Note - -This function loads the entire cache entry into memory before returning it. If -you're dealing with Very Large data, consider using [`get.stream`](#get-stream) -instead. - -##### Example - -```javascript -// Look up by key -cache.get(cachePath, 'my-thing').then(console.log) -// Output: -{ - metadata: { - thingName: 'my' - }, - integrity: 'sha512-BaSe64HaSh', - data: Buffer#, - size: 9320 -} - -// Look up by digest -cache.get.byDigest(cachePath, 'sha512-BaSe64HaSh').then(console.log) -// Output: -Buffer# -``` - -#### `> cacache.get.stream(cache, key, [opts]) -> Readable` - -Returns a [Readable Stream](https://nodejs.org/api/stream.html#stream_readable_streams) of the cached data identified by `key`. - -If there is no content identified by `key`, or if the locally-stored data does -not pass the validity checksum, an error will be emitted. - -`metadata` and `integrity` events will be emitted before the stream closes, if -you need to collect that extra data about the cached entry. - -A sub-function, `get.stream.byDigest` may be used for identical behavior, -except lookup will happen by integrity hash, bypassing the index entirely. This -version does not emit the `metadata` and `integrity` events at all. - -See: [options](#get-options) - -##### Example - -```javascript -// Look up by key -cache.get.stream( - cachePath, 'my-thing' -).on('metadata', metadata => { - console.log('metadata:', metadata) -}).on('integrity', integrity => { - console.log('integrity:', integrity) -}).pipe( - fs.createWriteStream('./x.tgz') -) -// Outputs: -metadata: { ... } -integrity: 'sha512-SoMeDIGest+64==' - -// Look up by digest -cache.get.stream.byDigest( - cachePath, 'sha512-SoMeDIGest+64==' -).pipe( - fs.createWriteStream('./x.tgz') -) -``` - -#### `> cacache.get.info(cache, key) -> Promise` - -Looks up `key` in the cache index, returning information about the entry if -one exists. - -##### Fields - -* `key` - Key the entry was looked up under. Matches the `key` argument. -* `integrity` - [Subresource Integrity hash](#integrity) for the content this entry refers to. -* `path` - Filesystem path where content is stored, joined with `cache` argument. -* `time` - Timestamp the entry was first added on. -* `metadata` - User-assigned metadata associated with the entry/content. - -##### Example - -```javascript -cacache.get.info(cachePath, 'my-thing').then(console.log) - -// Output -{ - key: 'my-thing', - integrity: 'sha256-MUSTVERIFY+ALL/THINGS==' - path: '.testcache/content/deadbeef', - time: 12345698490, - size: 849234, - metadata: { - name: 'blah', - version: '1.2.3', - description: 'this was once a package but now it is my-thing' - } -} -``` - -#### `> cacache.get.hasContent(cache, integrity) -> Promise` - -Looks up a [Subresource Integrity hash](#integrity) in the cache. If content -exists for this `integrity`, it will return an object, with the specific single integrity hash -that was found in `sri` key, and the size of the found content as `size`. If no content exists for this integrity, it will return `false`. - -##### Example - -```javascript -cacache.get.hasContent(cachePath, 'sha256-MUSTVERIFY+ALL/THINGS==').then(console.log) - -// Output -{ - sri: { - source: 'sha256-MUSTVERIFY+ALL/THINGS==', - algorithm: 'sha256', - digest: 'MUSTVERIFY+ALL/THINGS==', - options: [] - }, - size: 9001 -} - -cacache.get.hasContent(cachePath, 'sha521-NOT+IN/CACHE==').then(console.log) - -// Output -false -``` - -##### Options - -##### `opts.integrity` -If present, the pre-calculated digest for the inserted content. If this option -is provided and does not match the post-insertion digest, insertion will fail -with an `EINTEGRITY` error. - -##### `opts.memoize` - -Default: null - -If explicitly truthy, cacache will read from memory and memoize data on bulk read. If `false`, cacache will read from disk data. Reader functions by default read from in-memory cache. - -##### `opts.size` -If provided, the data stream will be verified to check that enough data was -passed through. If there's more or less data than expected, insertion will fail -with an `EBADSIZE` error. - - -#### `> cacache.put(cache, key, data, [opts]) -> Promise` - -Inserts data passed to it into the cache. The returned Promise resolves with a -digest (generated according to [`opts.algorithms`](#optsalgorithms)) after the -cache entry has been successfully written. - -See: [options](#put-options) - -##### Example - -```javascript -fetch( - 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz' -).then(data => { - return cacache.put(cachePath, 'registry.npmjs.org|cacache@1.0.0', data) -}).then(integrity => { - console.log('integrity hash is', integrity) -}) -``` - -#### `> cacache.put.stream(cache, key, [opts]) -> Writable` - -Returns a [Writable -Stream](https://nodejs.org/api/stream.html#stream_writable_streams) that inserts -data written to it into the cache. Emits an `integrity` event with the digest of -written contents when it succeeds. - -See: [options](#put-options) - -##### Example - -```javascript -request.get( - 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz' -).pipe( - cacache.put.stream( - cachePath, 'registry.npmjs.org|cacache@1.0.0' - ).on('integrity', d => console.log(`integrity digest is ${d}`)) -) -``` - -##### Options - -##### `opts.metadata` - -Arbitrary metadata to be attached to the inserted key. - -##### `opts.size` - -If provided, the data stream will be verified to check that enough data was -passed through. If there's more or less data than expected, insertion will fail -with an `EBADSIZE` error. - -##### `opts.integrity` - -If present, the pre-calculated digest for the inserted content. If this option -is provided and does not match the post-insertion digest, insertion will fail -with an `EINTEGRITY` error. - -`algorithms` has no effect if this option is present. - -##### `opts.algorithms` - -Default: ['sha512'] - -Hashing algorithms to use when calculating the [subresource integrity -digest](#integrity) -for inserted data. Can use any algorithm listed in `crypto.getHashes()` or -`'omakase'`/`'お任せします'` to pick a random hash algorithm on each insertion. You -may also use any anagram of `'modnar'` to use this feature. - -Currently only supports one algorithm at a time (i.e., an array length of -exactly `1`). Has no effect if `opts.integrity` is present. - -##### `opts.memoize` - -Default: null - -If provided, cacache will memoize the given cache insertion in memory, bypassing -any filesystem checks for that key or digest in future cache fetches. Nothing -will be written to the in-memory cache unless this option is explicitly truthy. - -If `opts.memoize` is an object or a `Map`-like (that is, an object with `get` -and `set` methods), it will be written to instead of the global memoization -cache. - -Reading from disk data can be forced by explicitly passing `memoize: false` to -the reader functions, but their default will be to read from memory. - -##### `opts.tmpPrefix` -Default: null - -Prefix to append on the temporary directory name inside the cache's tmp dir. - -#### `> cacache.rm.all(cache) -> Promise` - -Clears the entire cache. Mainly by blowing away the cache directory itself. - -##### Example - -```javascript -cacache.rm.all(cachePath).then(() => { - console.log('THE APOCALYPSE IS UPON US 😱') -}) -``` - -#### `> cacache.rm.entry(cache, key, [opts]) -> Promise` - -Alias: `cacache.rm` - -Removes the index entry for `key`. Content will still be accessible if -requested directly by content address ([`get.stream.byDigest`](#get-stream)). - -By default, this appends a new entry to the index with an integrity of `null`. -If `opts.removeFully` is set to `true` then the index file itself will be -physically deleted rather than appending a `null`. - -To remove the content itself (which might still be used by other entries), use -[`rm.content`](#rm-content). Or, to safely vacuum any unused content, use -[`verify`](#verify). - -##### Example - -```javascript -cacache.rm.entry(cachePath, 'my-thing').then(() => { - console.log('I did not like it anyway') -}) -``` - -#### `> cacache.rm.content(cache, integrity) -> Promise` - -Removes the content identified by `integrity`. Any index entries referring to it -will not be usable again until the content is re-added to the cache with an -identical digest. - -##### Example - -```javascript -cacache.rm.content(cachePath, 'sha512-SoMeDIGest/IN+BaSE64==').then(() => { - console.log('data for my-thing is gone!') -}) -``` - -#### `> cacache.index.compact(cache, key, matchFn, [opts]) -> Promise` - -Uses `matchFn`, which must be a synchronous function that accepts two entries -and returns a boolean indicating whether or not the two entries match, to -deduplicate all entries in the cache for the given `key`. - -If `opts.validateEntry` is provided, it will be called as a function with the -only parameter being a single index entry. The function must return a Boolean, -if it returns `true` the entry is considered valid and will be kept in the index, -if it returns `false` the entry will be removed from the index. - -If `opts.validateEntry` is not provided, however, every entry in the index will -be deduplicated and kept until the first `null` integrity is reached, removing -all entries that were written before the `null`. - -The deduplicated list of entries is both written to the index, replacing the -existing content, and returned in the Promise. - -#### `> cacache.index.insert(cache, key, integrity, opts) -> Promise` - -Writes an index entry to the cache for the given `key` without writing content. - -It is assumed if you are using this method, you have already stored the content -some other way and you only wish to add a new index to that content. The `metadata` -and `size` properties are read from `opts` and used as part of the index entry. - -Returns a Promise resolving to the newly added entry. - -#### `> cacache.clearMemoized()` - -Completely resets the in-memory entry cache. - -#### `> tmp.mkdir(cache, opts) -> Promise` - -Returns a unique temporary directory inside the cache's `tmp` dir. This -directory will use the same safe user assignment that all the other stuff use. - -Once the directory is made, it's the user's responsibility that all files -within are given the appropriate `gid`/`uid` ownership settings to match -the rest of the cache. If not, you can ask cacache to do it for you by -calling [`tmp.fix()`](#tmp-fix), which will fix all tmp directory -permissions. - -If you want automatic cleanup of this directory, use -[`tmp.withTmp()`](#with-tpm) - -See: [options](#tmp-options) - -##### Example - -```javascript -cacache.tmp.mkdir(cache).then(dir => { - fs.writeFile(path.join(dir, 'blablabla'), Buffer#<1234>, ...) -}) -``` - -#### `> tmp.fix(cache) -> Promise` - -Sets the `uid` and `gid` properties on all files and folders within the tmp -folder to match the rest of the cache. - -Use this after manually writing files into [`tmp.mkdir`](#tmp-mkdir) or -[`tmp.withTmp`](#with-tmp). - -##### Example - -```javascript -cacache.tmp.mkdir(cache).then(dir => { - writeFile(path.join(dir, 'file'), someData).then(() => { - // make sure we didn't just put a root-owned file in the cache - cacache.tmp.fix().then(() => { - // all uids and gids match now - }) - }) -}) -``` - -#### `> tmp.withTmp(cache, opts, cb) -> Promise` - -Creates a temporary directory with [`tmp.mkdir()`](#tmp-mkdir) and calls `cb` -with it. The created temporary directory will be removed when the return value -of `cb()` resolves, the tmp directory will be automatically deleted once that -promise completes. - -The same caveats apply when it comes to managing permissions for the tmp dir's -contents. - -See: [options](#tmp-options) - -##### Example - -```javascript -cacache.tmp.withTmp(cache, dir => { - return fs.writeFileAsync(path.join(dir, 'blablabla'), Buffer#<1234>, ...) -}).then(() => { - // `dir` no longer exists -}) -``` - -##### Options - -##### `opts.tmpPrefix` -Default: null - -Prefix to append on the temporary directory name inside the cache's tmp dir. - -#### Subresource Integrity Digests - -For content verification and addressing, cacache uses strings following the -[Subresource -Integrity spec](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity). -That is, any time cacache expects an `integrity` argument or option, it -should be in the format `-`. - -One deviation from the current spec is that cacache will support any hash -algorithms supported by the underlying Node.js process. You can use -`crypto.getHashes()` to see which ones you can use. - -##### Generating Digests Yourself - -If you have an existing content shasum, they are generally formatted as a -hexadecimal string (that is, a sha1 would look like: -`5f5513f8822fdbe5145af33b64d8d970dcf95c6e`). In order to be compatible with -cacache, you'll need to convert this to an equivalent subresource integrity -string. For this example, the corresponding hash would be: -`sha1-X1UT+IIv2+UUWvM7ZNjZcNz5XG4=`. - -If you want to generate an integrity string yourself for existing data, you can -use something like this: - -```javascript -const crypto = require('crypto') -const hashAlgorithm = 'sha512' -const data = 'foobarbaz' - -const integrity = ( - hashAlgorithm + - '-' + - crypto.createHash(hashAlgorithm).update(data).digest('base64') -) -``` - -You can also use [`ssri`](https://npm.im/ssri) to have a richer set of functionality -around SRI strings, including generation, parsing, and translating from existing -hex-formatted strings. - -#### `> cacache.verify(cache, opts) -> Promise` - -Checks out and fixes up your cache: - -* Cleans up corrupted or invalid index entries. -* Custom entry filtering options. -* Garbage collects any content entries not referenced by the index. -* Checks integrity for all content entries and removes invalid content. -* Fixes cache ownership. -* Removes the `tmp` directory in the cache and all its contents. - -When it's done, it'll return an object with various stats about the verification -process, including amount of storage reclaimed, number of valid entries, number -of entries removed, etc. - -##### Options - -##### `opts.concurrency` - -Default: 20 - -Number of concurrently read files in the filesystem while doing clean up. - -##### `opts.filter` -Receives a formatted entry. Return false to remove it. -Note: might be called more than once on the same entry. - -##### `opts.log` -Custom logger function: -``` - log: { silly () {} } - log.silly('verify', 'verifying cache at', cache) -``` - -##### Example - -```sh -echo somegarbage >> $CACHEPATH/content/deadbeef -``` - -```javascript -cacache.verify(cachePath).then(stats => { - // deadbeef collected, because of invalid checksum. - console.log('cache is much nicer now! stats:', stats) -}) -``` - -#### `> cacache.verify.lastRun(cache) -> Promise` - -Returns a `Date` representing the last time `cacache.verify` was run on `cache`. - -##### Example - -```javascript -cacache.verify(cachePath).then(() => { - cacache.verify.lastRun(cachePath).then(lastTime => { - console.log('cacache.verify was last called on' + lastTime) - }) -}) -``` diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/get.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/get.js deleted file mode 100644 index 4e905e7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/get.js +++ /dev/null @@ -1,237 +0,0 @@ -'use strict' - -const Collect = require('minipass-collect') -const Minipass = require('minipass') -const Pipeline = require('minipass-pipeline') -const fs = require('fs') -const util = require('util') - -const index = require('./lib/entry-index') -const memo = require('./lib/memoization') -const read = require('./lib/content/read') - -const writeFile = util.promisify(fs.writeFile) - -function getData (cache, key, opts = {}) { - const { integrity, memoize, size } = opts - const memoized = memo.get(cache, key, opts) - if (memoized && memoize !== false) { - return Promise.resolve({ - metadata: memoized.entry.metadata, - data: memoized.data, - integrity: memoized.entry.integrity, - size: memoized.entry.size, - }) - } - - return index.find(cache, key, opts).then((entry) => { - if (!entry) - throw new index.NotFoundError(cache, key) - - return read(cache, entry.integrity, { integrity, size }).then((data) => { - if (memoize) - memo.put(cache, entry, data, opts) - - return { - data, - metadata: entry.metadata, - size: entry.size, - integrity: entry.integrity, - } - }) - }) -} -module.exports = getData - -function getDataByDigest (cache, key, opts = {}) { - const { integrity, memoize, size } = opts - const memoized = memo.get.byDigest(cache, key, opts) - if (memoized && memoize !== false) - return Promise.resolve(memoized) - - return read(cache, key, { integrity, size }).then((res) => { - if (memoize) - memo.put.byDigest(cache, key, res, opts) - return res - }) -} -module.exports.byDigest = getDataByDigest - -function getDataSync (cache, key, opts = {}) { - const { integrity, memoize, size } = opts - const memoized = memo.get(cache, key, opts) - - if (memoized && memoize !== false) { - return { - metadata: memoized.entry.metadata, - data: memoized.data, - integrity: memoized.entry.integrity, - size: memoized.entry.size, - } - } - const entry = index.find.sync(cache, key, opts) - if (!entry) - throw new index.NotFoundError(cache, key) - const data = read.sync(cache, entry.integrity, { - integrity: integrity, - size: size, - }) - const res = { - metadata: entry.metadata, - data: data, - size: entry.size, - integrity: entry.integrity, - } - if (memoize) - memo.put(cache, entry, res.data, opts) - - return res -} - -module.exports.sync = getDataSync - -function getDataByDigestSync (cache, digest, opts = {}) { - const { integrity, memoize, size } = opts - const memoized = memo.get.byDigest(cache, digest, opts) - - if (memoized && memoize !== false) - return memoized - - const res = read.sync(cache, digest, { - integrity: integrity, - size: size, - }) - if (memoize) - memo.put.byDigest(cache, digest, res, opts) - - return res -} -module.exports.sync.byDigest = getDataByDigestSync - -const getMemoizedStream = (memoized) => { - const stream = new Minipass() - stream.on('newListener', function (ev, cb) { - ev === 'metadata' && cb(memoized.entry.metadata) - ev === 'integrity' && cb(memoized.entry.integrity) - ev === 'size' && cb(memoized.entry.size) - }) - stream.end(memoized.data) - return stream -} - -function getStream (cache, key, opts = {}) { - const { memoize, size } = opts - const memoized = memo.get(cache, key, opts) - if (memoized && memoize !== false) - return getMemoizedStream(memoized) - - const stream = new Pipeline() - index - .find(cache, key) - .then((entry) => { - if (!entry) - throw new index.NotFoundError(cache, key) - - stream.emit('metadata', entry.metadata) - stream.emit('integrity', entry.integrity) - stream.emit('size', entry.size) - stream.on('newListener', function (ev, cb) { - ev === 'metadata' && cb(entry.metadata) - ev === 'integrity' && cb(entry.integrity) - ev === 'size' && cb(entry.size) - }) - - const src = read.readStream( - cache, - entry.integrity, - { ...opts, size: typeof size !== 'number' ? entry.size : size } - ) - - if (memoize) { - const memoStream = new Collect.PassThrough() - memoStream.on('collect', data => memo.put(cache, entry, data, opts)) - stream.unshift(memoStream) - } - stream.unshift(src) - }) - .catch((err) => stream.emit('error', err)) - - return stream -} - -module.exports.stream = getStream - -function getStreamDigest (cache, integrity, opts = {}) { - const { memoize } = opts - const memoized = memo.get.byDigest(cache, integrity, opts) - if (memoized && memoize !== false) { - const stream = new Minipass() - stream.end(memoized) - return stream - } else { - const stream = read.readStream(cache, integrity, opts) - if (!memoize) - return stream - - const memoStream = new Collect.PassThrough() - memoStream.on('collect', data => memo.put.byDigest( - cache, - integrity, - data, - opts - )) - return new Pipeline(stream, memoStream) - } -} - -module.exports.stream.byDigest = getStreamDigest - -function info (cache, key, opts = {}) { - const { memoize } = opts - const memoized = memo.get(cache, key, opts) - if (memoized && memoize !== false) - return Promise.resolve(memoized.entry) - else - return index.find(cache, key) -} -module.exports.info = info - -function copy (cache, key, dest, opts = {}) { - if (read.copy) { - return index.find(cache, key, opts).then((entry) => { - if (!entry) - throw new index.NotFoundError(cache, key) - return read.copy(cache, entry.integrity, dest, opts) - .then(() => { - return { - metadata: entry.metadata, - size: entry.size, - integrity: entry.integrity, - } - }) - }) - } - - return getData(cache, key, opts).then((res) => { - return writeFile(dest, res.data).then(() => { - return { - metadata: res.metadata, - size: res.size, - integrity: res.integrity, - } - }) - }) -} -module.exports.copy = copy - -function copyByDigest (cache, key, dest, opts = {}) { - if (read.copy) - return read.copy(cache, key, dest, opts).then(() => key) - - return getDataByDigest(cache, key, opts).then((res) => { - return writeFile(dest, res).then(() => key) - }) -} -module.exports.copy.byDigest = copyByDigest - -module.exports.hasContent = read.hasContent diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/index.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/index.js deleted file mode 100644 index c8c52b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/index.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict' - -const ls = require('./ls.js') -const get = require('./get.js') -const put = require('./put.js') -const rm = require('./rm.js') -const verify = require('./verify.js') -const { clearMemoized } = require('./lib/memoization.js') -const tmp = require('./lib/util/tmp.js') -const index = require('./lib/entry-index.js') - -module.exports.index = {} -module.exports.index.compact = index.compact -module.exports.index.insert = index.insert - -module.exports.ls = ls -module.exports.ls.stream = ls.stream - -module.exports.get = get -module.exports.get.byDigest = get.byDigest -module.exports.get.sync = get.sync -module.exports.get.sync.byDigest = get.sync.byDigest -module.exports.get.stream = get.stream -module.exports.get.stream.byDigest = get.stream.byDigest -module.exports.get.copy = get.copy -module.exports.get.copy.byDigest = get.copy.byDigest -module.exports.get.info = get.info -module.exports.get.hasContent = get.hasContent -module.exports.get.hasContent.sync = get.hasContent.sync - -module.exports.put = put -module.exports.put.stream = put.stream - -module.exports.rm = rm.entry -module.exports.rm.all = rm.all -module.exports.rm.entry = module.exports.rm -module.exports.rm.content = rm.content - -module.exports.clearMemoized = clearMemoized - -module.exports.tmp = {} -module.exports.tmp.mkdir = tmp.mkdir -module.exports.tmp.withTmp = tmp.withTmp - -module.exports.verify = verify -module.exports.verify.lastRun = verify.lastRun diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/path.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/path.js deleted file mode 100644 index ad5a76a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/path.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict' - -const contentVer = require('../../package.json')['cache-version'].content -const hashToSegments = require('../util/hash-to-segments') -const path = require('path') -const ssri = require('ssri') - -// Current format of content file path: -// -// sha512-BaSE64Hex= -> -// ~/.my-cache/content-v2/sha512/ba/da/55deadbeefc0ffee -// -module.exports = contentPath - -function contentPath (cache, integrity) { - const sri = ssri.parse(integrity, { single: true }) - // contentPath is the *strongest* algo given - return path.join( - contentDir(cache), - sri.algorithm, - ...hashToSegments(sri.hexDigest()) - ) -} - -module.exports.contentDir = contentDir - -function contentDir (cache) { - return path.join(cache, `content-v${contentVer}`) -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/read.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/read.js deleted file mode 100644 index 034e8ee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/read.js +++ /dev/null @@ -1,244 +0,0 @@ -'use strict' - -const util = require('util') - -const fs = require('fs') -const fsm = require('fs-minipass') -const ssri = require('ssri') -const contentPath = require('./path') -const Pipeline = require('minipass-pipeline') - -const lstat = util.promisify(fs.lstat) -const readFile = util.promisify(fs.readFile) - -module.exports = read - -const MAX_SINGLE_READ_SIZE = 64 * 1024 * 1024 -function read (cache, integrity, opts = {}) { - const { size } = opts - return withContentSri(cache, integrity, (cpath, sri) => { - // get size - return lstat(cpath).then(stat => ({ stat, cpath, sri })) - }).then(({ stat, cpath, sri }) => { - if (typeof size === 'number' && stat.size !== size) - throw sizeError(size, stat.size) - - if (stat.size > MAX_SINGLE_READ_SIZE) - return readPipeline(cpath, stat.size, sri, new Pipeline()).concat() - - return readFile(cpath, null).then((data) => { - if (!ssri.checkData(data, sri)) - throw integrityError(sri, cpath) - - return data - }) - }) -} - -const readPipeline = (cpath, size, sri, stream) => { - stream.push( - new fsm.ReadStream(cpath, { - size, - readSize: MAX_SINGLE_READ_SIZE, - }), - ssri.integrityStream({ - integrity: sri, - size, - }) - ) - return stream -} - -module.exports.sync = readSync - -function readSync (cache, integrity, opts = {}) { - const { size } = opts - return withContentSriSync(cache, integrity, (cpath, sri) => { - const data = fs.readFileSync(cpath) - if (typeof size === 'number' && size !== data.length) - throw sizeError(size, data.length) - - if (ssri.checkData(data, sri)) - return data - - throw integrityError(sri, cpath) - }) -} - -module.exports.stream = readStream -module.exports.readStream = readStream - -function readStream (cache, integrity, opts = {}) { - const { size } = opts - const stream = new Pipeline() - withContentSri(cache, integrity, (cpath, sri) => { - // just lstat to ensure it exists - return lstat(cpath).then((stat) => ({ stat, cpath, sri })) - }).then(({ stat, cpath, sri }) => { - if (typeof size === 'number' && size !== stat.size) - return stream.emit('error', sizeError(size, stat.size)) - - readPipeline(cpath, stat.size, sri, stream) - }, er => stream.emit('error', er)) - - return stream -} - -let copyFile -if (fs.copyFile) { - module.exports.copy = copy - module.exports.copy.sync = copySync - copyFile = util.promisify(fs.copyFile) -} - -function copy (cache, integrity, dest) { - return withContentSri(cache, integrity, (cpath, sri) => { - return copyFile(cpath, dest) - }) -} - -function copySync (cache, integrity, dest) { - return withContentSriSync(cache, integrity, (cpath, sri) => { - return fs.copyFileSync(cpath, dest) - }) -} - -module.exports.hasContent = hasContent - -function hasContent (cache, integrity) { - if (!integrity) - return Promise.resolve(false) - - return withContentSri(cache, integrity, (cpath, sri) => { - return lstat(cpath).then((stat) => ({ size: stat.size, sri, stat })) - }).catch((err) => { - if (err.code === 'ENOENT') - return false - - if (err.code === 'EPERM') { - /* istanbul ignore else */ - if (process.platform !== 'win32') - throw err - else - return false - } - }) -} - -module.exports.hasContent.sync = hasContentSync - -function hasContentSync (cache, integrity) { - if (!integrity) - return false - - return withContentSriSync(cache, integrity, (cpath, sri) => { - try { - const stat = fs.lstatSync(cpath) - return { size: stat.size, sri, stat } - } catch (err) { - if (err.code === 'ENOENT') - return false - - if (err.code === 'EPERM') { - /* istanbul ignore else */ - if (process.platform !== 'win32') - throw err - else - return false - } - } - }) -} - -function withContentSri (cache, integrity, fn) { - const tryFn = () => { - const sri = ssri.parse(integrity) - // If `integrity` has multiple entries, pick the first digest - // with available local data. - const algo = sri.pickAlgorithm() - const digests = sri[algo] - - if (digests.length <= 1) { - const cpath = contentPath(cache, digests[0]) - return fn(cpath, digests[0]) - } else { - // Can't use race here because a generic error can happen before - // a ENOENT error, and can happen before a valid result - return Promise - .all(digests.map((meta) => { - return withContentSri(cache, meta, fn) - .catch((err) => { - if (err.code === 'ENOENT') { - return Object.assign( - new Error('No matching content found for ' + sri.toString()), - { code: 'ENOENT' } - ) - } - return err - }) - })) - .then((results) => { - // Return the first non error if it is found - const result = results.find((r) => !(r instanceof Error)) - if (result) - return result - - // Throw the No matching content found error - const enoentError = results.find((r) => r.code === 'ENOENT') - if (enoentError) - throw enoentError - - // Throw generic error - throw results.find((r) => r instanceof Error) - }) - } - } - - return new Promise((resolve, reject) => { - try { - tryFn() - .then(resolve) - .catch(reject) - } catch (err) { - reject(err) - } - }) -} - -function withContentSriSync (cache, integrity, fn) { - const sri = ssri.parse(integrity) - // If `integrity` has multiple entries, pick the first digest - // with available local data. - const algo = sri.pickAlgorithm() - const digests = sri[algo] - if (digests.length <= 1) { - const cpath = contentPath(cache, digests[0]) - return fn(cpath, digests[0]) - } else { - let lastErr = null - for (const meta of digests) { - try { - return withContentSriSync(cache, meta, fn) - } catch (err) { - lastErr = err - } - } - throw lastErr - } -} - -function sizeError (expected, found) { - const err = new Error(`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`) - err.expected = expected - err.found = found - err.code = 'EBADSIZE' - return err -} - -function integrityError (sri, path) { - const err = new Error(`Integrity verification failed for ${sri} (${path})`) - err.code = 'EINTEGRITY' - err.sri = sri - err.path = path - return err -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/rm.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/rm.js deleted file mode 100644 index 6a3d1a3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/rm.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict' - -const util = require('util') - -const contentPath = require('./path') -const { hasContent } = require('./read') -const rimraf = util.promisify(require('rimraf')) - -module.exports = rm - -function rm (cache, integrity) { - return hasContent(cache, integrity).then((content) => { - // ~pretty~ sure we can't end up with a content lacking sri, but be safe - if (content && content.sri) - return rimraf(contentPath(cache, content.sri)).then(() => true) - else - return false - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/write.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/write.js deleted file mode 100644 index dde1bd1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/content/write.js +++ /dev/null @@ -1,189 +0,0 @@ -'use strict' - -const util = require('util') - -const contentPath = require('./path') -const fixOwner = require('../util/fix-owner') -const fs = require('fs') -const moveFile = require('../util/move-file') -const Minipass = require('minipass') -const Pipeline = require('minipass-pipeline') -const Flush = require('minipass-flush') -const path = require('path') -const rimraf = util.promisify(require('rimraf')) -const ssri = require('ssri') -const uniqueFilename = require('unique-filename') -const { disposer } = require('./../util/disposer') -const fsm = require('fs-minipass') - -const writeFile = util.promisify(fs.writeFile) - -module.exports = write - -function write (cache, data, opts = {}) { - const { algorithms, size, integrity } = opts - if (algorithms && algorithms.length > 1) - throw new Error('opts.algorithms only supports a single algorithm for now') - - if (typeof size === 'number' && data.length !== size) - return Promise.reject(sizeError(size, data.length)) - - const sri = ssri.fromData(data, algorithms ? { algorithms } : {}) - if (integrity && !ssri.checkData(data, integrity, opts)) - return Promise.reject(checksumError(integrity, sri)) - - return disposer(makeTmp(cache, opts), makeTmpDisposer, - (tmp) => { - return writeFile(tmp.target, data, { flag: 'wx' }) - .then(() => moveToDestination(tmp, cache, sri, opts)) - }) - .then(() => ({ integrity: sri, size: data.length })) -} - -module.exports.stream = writeStream - -// writes proxied to the 'inputStream' that is passed to the Promise -// 'end' is deferred until content is handled. -class CacacheWriteStream extends Flush { - constructor (cache, opts) { - super() - this.opts = opts - this.cache = cache - this.inputStream = new Minipass() - this.inputStream.on('error', er => this.emit('error', er)) - this.inputStream.on('drain', () => this.emit('drain')) - this.handleContentP = null - } - - write (chunk, encoding, cb) { - if (!this.handleContentP) { - this.handleContentP = handleContent( - this.inputStream, - this.cache, - this.opts - ) - } - return this.inputStream.write(chunk, encoding, cb) - } - - flush (cb) { - this.inputStream.end(() => { - if (!this.handleContentP) { - const e = new Error('Cache input stream was empty') - e.code = 'ENODATA' - // empty streams are probably emitting end right away. - // defer this one tick by rejecting a promise on it. - return Promise.reject(e).catch(cb) - } - this.handleContentP.then( - (res) => { - res.integrity && this.emit('integrity', res.integrity) - res.size !== null && this.emit('size', res.size) - cb() - }, - (er) => cb(er) - ) - }) - } -} - -function writeStream (cache, opts = {}) { - return new CacacheWriteStream(cache, opts) -} - -function handleContent (inputStream, cache, opts) { - return disposer(makeTmp(cache, opts), makeTmpDisposer, (tmp) => { - return pipeToTmp(inputStream, cache, tmp.target, opts) - .then((res) => { - return moveToDestination( - tmp, - cache, - res.integrity, - opts - ).then(() => res) - }) - }) -} - -function pipeToTmp (inputStream, cache, tmpTarget, opts) { - let integrity - let size - const hashStream = ssri.integrityStream({ - integrity: opts.integrity, - algorithms: opts.algorithms, - size: opts.size, - }) - hashStream.on('integrity', i => { - integrity = i - }) - hashStream.on('size', s => { - size = s - }) - - const outStream = new fsm.WriteStream(tmpTarget, { - flags: 'wx', - }) - - // NB: this can throw if the hashStream has a problem with - // it, and the data is fully written. but pipeToTmp is only - // called in promisory contexts where that is handled. - const pipeline = new Pipeline( - inputStream, - hashStream, - outStream - ) - - return pipeline.promise() - .then(() => ({ integrity, size })) - .catch(er => rimraf(tmpTarget).then(() => { - throw er - })) -} - -function makeTmp (cache, opts) { - const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) - return fixOwner.mkdirfix(cache, path.dirname(tmpTarget)).then(() => ({ - target: tmpTarget, - moved: false, - })) -} - -function makeTmpDisposer (tmp) { - if (tmp.moved) - return Promise.resolve() - - return rimraf(tmp.target) -} - -function moveToDestination (tmp, cache, sri, opts) { - const destination = contentPath(cache, sri) - const destDir = path.dirname(destination) - - return fixOwner - .mkdirfix(cache, destDir) - .then(() => { - return moveFile(tmp.target, destination) - }) - .then(() => { - tmp.moved = true - return fixOwner.chownr(cache, destination) - }) -} - -function sizeError (expected, found) { - const err = new Error(`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`) - err.expected = expected - err.found = found - err.code = 'EBADSIZE' - return err -} - -function checksumError (expected, found) { - const err = new Error(`Integrity check failed: - Wanted: ${expected} - Found: ${found}`) - err.code = 'EINTEGRITY' - err.expected = expected - err.found = found - return err -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/entry-index.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/entry-index.js deleted file mode 100644 index 71aac5e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/entry-index.js +++ /dev/null @@ -1,394 +0,0 @@ -'use strict' - -const util = require('util') -const crypto = require('crypto') -const fs = require('fs') -const Minipass = require('minipass') -const path = require('path') -const ssri = require('ssri') -const uniqueFilename = require('unique-filename') - -const { disposer } = require('./util/disposer') -const contentPath = require('./content/path') -const fixOwner = require('./util/fix-owner') -const hashToSegments = require('./util/hash-to-segments') -const indexV = require('../package.json')['cache-version'].index -const moveFile = require('@npmcli/move-file') -const _rimraf = require('rimraf') -const rimraf = util.promisify(_rimraf) -rimraf.sync = _rimraf.sync - -const appendFile = util.promisify(fs.appendFile) -const readFile = util.promisify(fs.readFile) -const readdir = util.promisify(fs.readdir) -const writeFile = util.promisify(fs.writeFile) - -module.exports.NotFoundError = class NotFoundError extends Error { - constructor (cache, key) { - super(`No cache entry for ${key} found in ${cache}`) - this.code = 'ENOENT' - this.cache = cache - this.key = key - } -} - -module.exports.compact = compact - -async function compact (cache, key, matchFn, opts = {}) { - const bucket = bucketPath(cache, key) - const entries = await bucketEntries(bucket) - const newEntries = [] - // we loop backwards because the bottom-most result is the newest - // since we add new entries with appendFile - for (let i = entries.length - 1; i >= 0; --i) { - const entry = entries[i] - // a null integrity could mean either a delete was appended - // or the user has simply stored an index that does not map - // to any content. we determine if the user wants to keep the - // null integrity based on the validateEntry function passed in options. - // if the integrity is null and no validateEntry is provided, we break - // as we consider the null integrity to be a deletion of everything - // that came before it. - if (entry.integrity === null && !opts.validateEntry) - break - - // if this entry is valid, and it is either the first entry or - // the newEntries array doesn't already include an entry that - // matches this one based on the provided matchFn, then we add - // it to the beginning of our list - if ((!opts.validateEntry || opts.validateEntry(entry) === true) && - (newEntries.length === 0 || - !newEntries.find((oldEntry) => matchFn(oldEntry, entry)))) - newEntries.unshift(entry) - } - - const newIndex = '\n' + newEntries.map((entry) => { - const stringified = JSON.stringify(entry) - const hash = hashEntry(stringified) - return `${hash}\t${stringified}` - }).join('\n') - - const setup = async () => { - const target = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) - await fixOwner.mkdirfix(cache, path.dirname(target)) - return { - target, - moved: false, - } - } - - const teardown = async (tmp) => { - if (!tmp.moved) - return rimraf(tmp.target) - } - - const write = async (tmp) => { - await writeFile(tmp.target, newIndex, { flag: 'wx' }) - await fixOwner.mkdirfix(cache, path.dirname(bucket)) - // we use @npmcli/move-file directly here because we - // want to overwrite the existing file - await moveFile(tmp.target, bucket) - tmp.moved = true - try { - await fixOwner.chownr(cache, bucket) - } catch (err) { - if (err.code !== 'ENOENT') - throw err - } - } - - // write the file atomically - await disposer(setup(), teardown, write) - - // we reverse the list we generated such that the newest - // entries come first in order to make looping through them easier - // the true passed to formatEntry tells it to keep null - // integrity values, if they made it this far it's because - // validateEntry returned true, and as such we should return it - return newEntries.reverse().map((entry) => formatEntry(cache, entry, true)) -} - -module.exports.insert = insert - -function insert (cache, key, integrity, opts = {}) { - const { metadata, size } = opts - const bucket = bucketPath(cache, key) - const entry = { - key, - integrity: integrity && ssri.stringify(integrity), - time: Date.now(), - size, - metadata, - } - return fixOwner - .mkdirfix(cache, path.dirname(bucket)) - .then(() => { - const stringified = JSON.stringify(entry) - // NOTE - Cleverness ahoy! - // - // This works because it's tremendously unlikely for an entry to corrupt - // another while still preserving the string length of the JSON in - // question. So, we just slap the length in there and verify it on read. - // - // Thanks to @isaacs for the whiteboarding session that ended up with - // this. - return appendFile(bucket, `\n${hashEntry(stringified)}\t${stringified}`) - }) - .then(() => fixOwner.chownr(cache, bucket)) - .catch((err) => { - if (err.code === 'ENOENT') - return undefined - - throw err - // There's a class of race conditions that happen when things get deleted - // during fixOwner, or between the two mkdirfix/chownr calls. - // - // It's perfectly fine to just not bother in those cases and lie - // that the index entry was written. Because it's a cache. - }) - .then(() => { - return formatEntry(cache, entry) - }) -} - -module.exports.insert.sync = insertSync - -function insertSync (cache, key, integrity, opts = {}) { - const { metadata, size } = opts - const bucket = bucketPath(cache, key) - const entry = { - key, - integrity: integrity && ssri.stringify(integrity), - time: Date.now(), - size, - metadata, - } - fixOwner.mkdirfix.sync(cache, path.dirname(bucket)) - const stringified = JSON.stringify(entry) - fs.appendFileSync(bucket, `\n${hashEntry(stringified)}\t${stringified}`) - try { - fixOwner.chownr.sync(cache, bucket) - } catch (err) { - if (err.code !== 'ENOENT') - throw err - } - return formatEntry(cache, entry) -} - -module.exports.find = find - -function find (cache, key) { - const bucket = bucketPath(cache, key) - return bucketEntries(bucket) - .then((entries) => { - return entries.reduce((latest, next) => { - if (next && next.key === key) - return formatEntry(cache, next) - else - return latest - }, null) - }) - .catch((err) => { - if (err.code === 'ENOENT') - return null - else - throw err - }) -} - -module.exports.find.sync = findSync - -function findSync (cache, key) { - const bucket = bucketPath(cache, key) - try { - return bucketEntriesSync(bucket).reduce((latest, next) => { - if (next && next.key === key) - return formatEntry(cache, next) - else - return latest - }, null) - } catch (err) { - if (err.code === 'ENOENT') - return null - else - throw err - } -} - -module.exports.delete = del - -function del (cache, key, opts = {}) { - if (!opts.removeFully) - return insert(cache, key, null, opts) - - const bucket = bucketPath(cache, key) - return rimraf(bucket) -} - -module.exports.delete.sync = delSync - -function delSync (cache, key, opts = {}) { - if (!opts.removeFully) - return insertSync(cache, key, null, opts) - - const bucket = bucketPath(cache, key) - return rimraf.sync(bucket) -} - -module.exports.lsStream = lsStream - -function lsStream (cache) { - const indexDir = bucketDir(cache) - const stream = new Minipass({ objectMode: true }) - - readdirOrEmpty(indexDir).then(buckets => Promise.all( - buckets.map(bucket => { - const bucketPath = path.join(indexDir, bucket) - return readdirOrEmpty(bucketPath).then(subbuckets => Promise.all( - subbuckets.map(subbucket => { - const subbucketPath = path.join(bucketPath, subbucket) - - // "/cachename//./*" - return readdirOrEmpty(subbucketPath).then(entries => Promise.all( - entries.map(entry => { - const entryPath = path.join(subbucketPath, entry) - return bucketEntries(entryPath).then(entries => - // using a Map here prevents duplicate keys from - // showing up twice, I guess? - entries.reduce((acc, entry) => { - acc.set(entry.key, entry) - return acc - }, new Map()) - ).then(reduced => { - // reduced is a map of key => entry - for (const entry of reduced.values()) { - const formatted = formatEntry(cache, entry) - if (formatted) - stream.write(formatted) - } - }).catch(err => { - if (err.code === 'ENOENT') - return undefined - throw err - }) - }) - )) - }) - )) - }) - )) - .then( - () => stream.end(), - err => stream.emit('error', err) - ) - - return stream -} - -module.exports.ls = ls - -function ls (cache) { - return lsStream(cache).collect().then(entries => - entries.reduce((acc, xs) => { - acc[xs.key] = xs - return acc - }, {}) - ) -} - -module.exports.bucketEntries = bucketEntries - -function bucketEntries (bucket, filter) { - return readFile(bucket, 'utf8').then((data) => _bucketEntries(data, filter)) -} - -module.exports.bucketEntries.sync = bucketEntriesSync - -function bucketEntriesSync (bucket, filter) { - const data = fs.readFileSync(bucket, 'utf8') - return _bucketEntries(data, filter) -} - -function _bucketEntries (data, filter) { - const entries = [] - data.split('\n').forEach((entry) => { - if (!entry) - return - - const pieces = entry.split('\t') - if (!pieces[1] || hashEntry(pieces[1]) !== pieces[0]) { - // Hash is no good! Corruption or malice? Doesn't matter! - // EJECT EJECT - return - } - let obj - try { - obj = JSON.parse(pieces[1]) - } catch (e) { - // Entry is corrupted! - return - } - if (obj) - entries.push(obj) - }) - return entries -} - -module.exports.bucketDir = bucketDir - -function bucketDir (cache) { - return path.join(cache, `index-v${indexV}`) -} - -module.exports.bucketPath = bucketPath - -function bucketPath (cache, key) { - const hashed = hashKey(key) - return path.join.apply( - path, - [bucketDir(cache)].concat(hashToSegments(hashed)) - ) -} - -module.exports.hashKey = hashKey - -function hashKey (key) { - return hash(key, 'sha256') -} - -module.exports.hashEntry = hashEntry - -function hashEntry (str) { - return hash(str, 'sha1') -} - -function hash (str, digest) { - return crypto - .createHash(digest) - .update(str) - .digest('hex') -} - -function formatEntry (cache, entry, keepAll) { - // Treat null digests as deletions. They'll shadow any previous entries. - if (!entry.integrity && !keepAll) - return null - - return { - key: entry.key, - integrity: entry.integrity, - path: entry.integrity ? contentPath(cache, entry.integrity) : undefined, - size: entry.size, - time: entry.time, - metadata: entry.metadata, - } -} - -function readdirOrEmpty (dir) { - return readdir(dir).catch((err) => { - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') - return [] - - throw err - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/memoization.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/memoization.js deleted file mode 100644 index d5465f3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/memoization.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict' - -const LRU = require('lru-cache') - -const MAX_SIZE = 50 * 1024 * 1024 // 50MB -const MAX_AGE = 3 * 60 * 1000 - -const MEMOIZED = new LRU({ - max: MAX_SIZE, - maxAge: MAX_AGE, - length: (entry, key) => key.startsWith('key:') ? entry.data.length : entry.length, -}) - -module.exports.clearMemoized = clearMemoized - -function clearMemoized () { - const old = {} - MEMOIZED.forEach((v, k) => { - old[k] = v - }) - MEMOIZED.reset() - return old -} - -module.exports.put = put - -function put (cache, entry, data, opts) { - pickMem(opts).set(`key:${cache}:${entry.key}`, { entry, data }) - putDigest(cache, entry.integrity, data, opts) -} - -module.exports.put.byDigest = putDigest - -function putDigest (cache, integrity, data, opts) { - pickMem(opts).set(`digest:${cache}:${integrity}`, data) -} - -module.exports.get = get - -function get (cache, key, opts) { - return pickMem(opts).get(`key:${cache}:${key}`) -} - -module.exports.get.byDigest = getDigest - -function getDigest (cache, integrity, opts) { - return pickMem(opts).get(`digest:${cache}:${integrity}`) -} - -class ObjProxy { - constructor (obj) { - this.obj = obj - } - - get (key) { - return this.obj[key] - } - - set (key, val) { - this.obj[key] = val - } -} - -function pickMem (opts) { - if (!opts || !opts.memoize) - return MEMOIZED - else if (opts.memoize.get && opts.memoize.set) - return opts.memoize - else if (typeof opts.memoize === 'object') - return new ObjProxy(opts.memoize) - else - return MEMOIZED -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/disposer.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/disposer.js deleted file mode 100644 index aa8aed5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/disposer.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict' - -module.exports.disposer = disposer - -function disposer (creatorFn, disposerFn, fn) { - const runDisposer = (resource, result, shouldThrow = false) => { - return disposerFn(resource) - .then( - // disposer resolved, do something with original fn's promise - () => { - if (shouldThrow) - throw result - - return result - }, - // Disposer fn failed, crash process - (err) => { - throw err - // Or process.exit? - }) - } - - return creatorFn - .then((resource) => { - // fn(resource) can throw, so wrap in a promise here - return Promise.resolve().then(() => fn(resource)) - .then((result) => runDisposer(resource, result)) - .catch((err) => runDisposer(resource, err, true)) - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/fix-owner.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/fix-owner.js deleted file mode 100644 index 90ffece..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/fix-owner.js +++ /dev/null @@ -1,142 +0,0 @@ -'use strict' - -const util = require('util') - -const chownr = util.promisify(require('chownr')) -const mkdirp = require('mkdirp') -const inflight = require('promise-inflight') -const inferOwner = require('infer-owner') - -// Memoize getuid()/getgid() calls. -// patch process.setuid/setgid to invalidate cached value on change -const self = { uid: null, gid: null } -const getSelf = () => { - if (typeof self.uid !== 'number') { - self.uid = process.getuid() - const setuid = process.setuid - process.setuid = (uid) => { - self.uid = null - process.setuid = setuid - return process.setuid(uid) - } - } - if (typeof self.gid !== 'number') { - self.gid = process.getgid() - const setgid = process.setgid - process.setgid = (gid) => { - self.gid = null - process.setgid = setgid - return process.setgid(gid) - } - } -} - -module.exports.chownr = fixOwner - -function fixOwner (cache, filepath) { - if (!process.getuid) { - // This platform doesn't need ownership fixing - return Promise.resolve() - } - - getSelf() - if (self.uid !== 0) { - // almost certainly can't chown anyway - return Promise.resolve() - } - - return Promise.resolve(inferOwner(cache)).then((owner) => { - const { uid, gid } = owner - - // No need to override if it's already what we used. - if (self.uid === uid && self.gid === gid) - return - - return inflight('fixOwner: fixing ownership on ' + filepath, () => - chownr( - filepath, - typeof uid === 'number' ? uid : self.uid, - typeof gid === 'number' ? gid : self.gid - ).catch((err) => { - if (err.code === 'ENOENT') - return null - - throw err - }) - ) - }) -} - -module.exports.chownr.sync = fixOwnerSync - -function fixOwnerSync (cache, filepath) { - if (!process.getuid) { - // This platform doesn't need ownership fixing - return - } - const { uid, gid } = inferOwner.sync(cache) - getSelf() - if (self.uid !== 0) { - // almost certainly can't chown anyway - return - } - - if (self.uid === uid && self.gid === gid) { - // No need to override if it's already what we used. - return - } - try { - chownr.sync( - filepath, - typeof uid === 'number' ? uid : self.uid, - typeof gid === 'number' ? gid : self.gid - ) - } catch (err) { - // only catch ENOENT, any other error is a problem. - if (err.code === 'ENOENT') - return null - - throw err - } -} - -module.exports.mkdirfix = mkdirfix - -function mkdirfix (cache, p, cb) { - // we have to infer the owner _before_ making the directory, even though - // we aren't going to use the results, since the cache itself might not - // exist yet. If we mkdirp it, then our current uid/gid will be assumed - // to be correct if it creates the cache folder in the process. - return Promise.resolve(inferOwner(cache)).then(() => { - return mkdirp(p) - .then((made) => { - if (made) - return fixOwner(cache, made).then(() => made) - }) - .catch((err) => { - if (err.code === 'EEXIST') - return fixOwner(cache, p).then(() => null) - - throw err - }) - }) -} - -module.exports.mkdirfix.sync = mkdirfixSync - -function mkdirfixSync (cache, p) { - try { - inferOwner.sync(cache) - const made = mkdirp.sync(p) - if (made) { - fixOwnerSync(cache, made) - return made - } - } catch (err) { - if (err.code === 'EEXIST') { - fixOwnerSync(cache, p) - return null - } else - throw err - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/hash-to-segments.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/hash-to-segments.js deleted file mode 100644 index 445599b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/hash-to-segments.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -module.exports = hashToSegments - -function hashToSegments (hash) { - return [hash.slice(0, 2), hash.slice(2, 4), hash.slice(4)] -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/move-file.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/move-file.js deleted file mode 100644 index c3f9e35..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/move-file.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict' - -const fs = require('fs') -const util = require('util') -const chmod = util.promisify(fs.chmod) -const unlink = util.promisify(fs.unlink) -const stat = util.promisify(fs.stat) -const move = require('@npmcli/move-file') -const pinflight = require('promise-inflight') - -module.exports = moveFile - -function moveFile (src, dest) { - const isWindows = global.__CACACHE_TEST_FAKE_WINDOWS__ || - process.platform === 'win32' - - // This isn't quite an fs.rename -- the assumption is that - // if `dest` already exists, and we get certain errors while - // trying to move it, we should just not bother. - // - // In the case of cache corruption, users will receive an - // EINTEGRITY error elsewhere, and can remove the offending - // content their own way. - // - // Note that, as the name suggests, this strictly only supports file moves. - return new Promise((resolve, reject) => { - fs.link(src, dest, (err) => { - if (err) { - if (isWindows && err.code === 'EPERM') { - // XXX This is a really weird way to handle this situation, as it - // results in the src file being deleted even though the dest - // might not exist. Since we pretty much always write files to - // deterministic locations based on content hash, this is likely - // ok (or at worst, just ends in a future cache miss). But it would - // be worth investigating at some time in the future if this is - // really what we want to do here. - return resolve() - } else if (err.code === 'EEXIST' || err.code === 'EBUSY') { - // file already exists, so whatever - return resolve() - } else - return reject(err) - } else - return resolve() - }) - }) - .then(() => { - // content should never change for any reason, so make it read-only - return Promise.all([ - unlink(src), - !isWindows && chmod(dest, '0444'), - ]) - }) - .catch(() => { - return pinflight('cacache-move-file:' + dest, () => { - return stat(dest).catch((err) => { - if (err.code !== 'ENOENT') { - // Something else is wrong here. Bail bail bail - throw err - } - // file doesn't already exist! let's try a rename -> copy fallback - // only delete if it successfully copies - return move(src, dest) - }) - }) - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/tmp.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/tmp.js deleted file mode 100644 index 0a5a50e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/util/tmp.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict' - -const fs = require('@npmcli/fs') - -const fixOwner = require('./fix-owner') -const path = require('path') - -module.exports.mkdir = mktmpdir - -function mktmpdir (cache, opts = {}) { - const { tmpPrefix } = opts - const tmpDir = path.join(cache, 'tmp') - return fs.mkdir(tmpDir, { recursive: true, owner: 'inherit' }) - .then(() => { - // do not use path.join(), it drops the trailing / if tmpPrefix is unset - const target = `${tmpDir}${path.sep}${tmpPrefix || ''}` - return fs.mkdtemp(target, { owner: 'inherit' }) - }) -} - -module.exports.withTmp = withTmp - -function withTmp (cache, opts, cb) { - if (!cb) { - cb = opts - opts = {} - } - return fs.withTempDir(path.join(cache, 'tmp'), cb, opts) -} - -module.exports.fix = fixtmpdir - -function fixtmpdir (cache) { - return fixOwner(cache, path.join(cache, 'tmp')) -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/verify.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/verify.js deleted file mode 100644 index e9d679e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/lib/verify.js +++ /dev/null @@ -1,287 +0,0 @@ -'use strict' - -const util = require('util') - -const pMap = require('p-map') -const contentPath = require('./content/path') -const fixOwner = require('./util/fix-owner') -const fs = require('fs') -const fsm = require('fs-minipass') -const glob = util.promisify(require('glob')) -const index = require('./entry-index') -const path = require('path') -const rimraf = util.promisify(require('rimraf')) -const ssri = require('ssri') - -const hasOwnProperty = (obj, key) => - Object.prototype.hasOwnProperty.call(obj, key) - -const stat = util.promisify(fs.stat) -const truncate = util.promisify(fs.truncate) -const writeFile = util.promisify(fs.writeFile) -const readFile = util.promisify(fs.readFile) - -const verifyOpts = (opts) => ({ - concurrency: 20, - log: { silly () {} }, - ...opts, -}) - -module.exports = verify - -function verify (cache, opts) { - opts = verifyOpts(opts) - opts.log.silly('verify', 'verifying cache at', cache) - - const steps = [ - markStartTime, - fixPerms, - garbageCollect, - rebuildIndex, - cleanTmp, - writeVerifile, - markEndTime, - ] - - return steps - .reduce((promise, step, i) => { - const label = step.name - const start = new Date() - return promise.then((stats) => { - return step(cache, opts).then((s) => { - s && - Object.keys(s).forEach((k) => { - stats[k] = s[k] - }) - const end = new Date() - if (!stats.runTime) - stats.runTime = {} - - stats.runTime[label] = end - start - return Promise.resolve(stats) - }) - }) - }, Promise.resolve({})) - .then((stats) => { - stats.runTime.total = stats.endTime - stats.startTime - opts.log.silly( - 'verify', - 'verification finished for', - cache, - 'in', - `${stats.runTime.total}ms` - ) - return stats - }) -} - -function markStartTime (cache, opts) { - return Promise.resolve({ startTime: new Date() }) -} - -function markEndTime (cache, opts) { - return Promise.resolve({ endTime: new Date() }) -} - -function fixPerms (cache, opts) { - opts.log.silly('verify', 'fixing cache permissions') - return fixOwner - .mkdirfix(cache, cache) - .then(() => { - // TODO - fix file permissions too - return fixOwner.chownr(cache, cache) - }) - .then(() => null) -} - -// Implements a naive mark-and-sweep tracing garbage collector. -// -// The algorithm is basically as follows: -// 1. Read (and filter) all index entries ("pointers") -// 2. Mark each integrity value as "live" -// 3. Read entire filesystem tree in `content-vX/` dir -// 4. If content is live, verify its checksum and delete it if it fails -// 5. If content is not marked as live, rimraf it. -// -function garbageCollect (cache, opts) { - opts.log.silly('verify', 'garbage collecting content') - const indexStream = index.lsStream(cache) - const liveContent = new Set() - indexStream.on('data', (entry) => { - if (opts.filter && !opts.filter(entry)) - return - - liveContent.add(entry.integrity.toString()) - }) - return new Promise((resolve, reject) => { - indexStream.on('end', resolve).on('error', reject) - }).then(() => { - const contentDir = contentPath.contentDir(cache) - return glob(path.join(contentDir, '**'), { - follow: false, - nodir: true, - nosort: true, - }).then((files) => { - return Promise.resolve({ - verifiedContent: 0, - reclaimedCount: 0, - reclaimedSize: 0, - badContentCount: 0, - keptSize: 0, - }).then((stats) => - pMap( - files, - (f) => { - const split = f.split(/[/\\]/) - const digest = split.slice(split.length - 3).join('') - const algo = split[split.length - 4] - const integrity = ssri.fromHex(digest, algo) - if (liveContent.has(integrity.toString())) { - return verifyContent(f, integrity).then((info) => { - if (!info.valid) { - stats.reclaimedCount++ - stats.badContentCount++ - stats.reclaimedSize += info.size - } else { - stats.verifiedContent++ - stats.keptSize += info.size - } - return stats - }) - } else { - // No entries refer to this content. We can delete. - stats.reclaimedCount++ - return stat(f).then((s) => { - return rimraf(f).then(() => { - stats.reclaimedSize += s.size - return stats - }) - }) - } - }, - { concurrency: opts.concurrency } - ).then(() => stats) - ) - }) - }) -} - -function verifyContent (filepath, sri) { - return stat(filepath) - .then((s) => { - const contentInfo = { - size: s.size, - valid: true, - } - return ssri - .checkStream(new fsm.ReadStream(filepath), sri) - .catch((err) => { - if (err.code !== 'EINTEGRITY') - throw err - - return rimraf(filepath).then(() => { - contentInfo.valid = false - }) - }) - .then(() => contentInfo) - }) - .catch((err) => { - if (err.code === 'ENOENT') - return { size: 0, valid: false } - - throw err - }) -} - -function rebuildIndex (cache, opts) { - opts.log.silly('verify', 'rebuilding index') - return index.ls(cache).then((entries) => { - const stats = { - missingContent: 0, - rejectedEntries: 0, - totalEntries: 0, - } - const buckets = {} - for (const k in entries) { - /* istanbul ignore else */ - if (hasOwnProperty(entries, k)) { - const hashed = index.hashKey(k) - const entry = entries[k] - const excluded = opts.filter && !opts.filter(entry) - excluded && stats.rejectedEntries++ - if (buckets[hashed] && !excluded) - buckets[hashed].push(entry) - else if (buckets[hashed] && excluded) { - // skip - } else if (excluded) { - buckets[hashed] = [] - buckets[hashed]._path = index.bucketPath(cache, k) - } else { - buckets[hashed] = [entry] - buckets[hashed]._path = index.bucketPath(cache, k) - } - } - } - return pMap( - Object.keys(buckets), - (key) => { - return rebuildBucket(cache, buckets[key], stats, opts) - }, - { concurrency: opts.concurrency } - ).then(() => stats) - }) -} - -function rebuildBucket (cache, bucket, stats, opts) { - return truncate(bucket._path).then(() => { - // This needs to be serialized because cacache explicitly - // lets very racy bucket conflicts clobber each other. - return bucket.reduce((promise, entry) => { - return promise.then(() => { - const content = contentPath(cache, entry.integrity) - return stat(content) - .then(() => { - return index - .insert(cache, entry.key, entry.integrity, { - metadata: entry.metadata, - size: entry.size, - }) - .then(() => { - stats.totalEntries++ - }) - }) - .catch((err) => { - if (err.code === 'ENOENT') { - stats.rejectedEntries++ - stats.missingContent++ - return - } - throw err - }) - }) - }, Promise.resolve()) - }) -} - -function cleanTmp (cache, opts) { - opts.log.silly('verify', 'cleaning tmp directory') - return rimraf(path.join(cache, 'tmp')) -} - -function writeVerifile (cache, opts) { - const verifile = path.join(cache, '_lastverified') - opts.log.silly('verify', 'writing verifile to ' + verifile) - try { - return writeFile(verifile, '' + +new Date()) - } finally { - fixOwner.chownr.sync(cache, verifile) - } -} - -module.exports.lastRun = lastRun - -function lastRun (cache) { - return readFile(path.join(cache, '_lastverified'), 'utf8').then( - (data) => new Date(+data) - ) -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/ls.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/ls.js deleted file mode 100644 index 6006c99..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/ls.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict' - -const index = require('./lib/entry-index') - -module.exports = index.ls -module.exports.stream = index.lsStream diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/node_modules/.bin/mkdirp b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/node_modules/.bin/mkdirp deleted file mode 100755 index 004ee98..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/node_modules/.bin/mkdirp +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../mkdirp@1.0.4/node_modules/mkdirp/bin/cmd.js" "$@" -else - exec node "$basedir/../../../../../mkdirp@1.0.4/node_modules/mkdirp/bin/cmd.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/node_modules/.bin/rimraf b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/node_modules/.bin/rimraf deleted file mode 100755 index c35a660..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/node_modules/.bin/rimraf +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../rimraf@3.0.2/node_modules/rimraf/bin.js" "$@" -else - exec node "$basedir/../../../../../rimraf@3.0.2/node_modules/rimraf/bin.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/package.json b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/package.json deleted file mode 100644 index 6cb4140..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "cacache", - "version": "15.3.0", - "cache-version": { - "content": "2", - "index": "5" - }, - "description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.", - "main": "index.js", - "files": [ - "*.js", - "lib" - ], - "scripts": { - "benchmarks": "node test/benchmarks", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "test": "tap", - "snap": "tap", - "coverage": "tap", - "test-docker": "docker run -it --rm --name pacotest -v \"$PWD\":/tmp -w /tmp node:latest npm test", - "lint": "npm run npmclilint -- \"*.*js\" \"lib/**/*.*js\" \"test/**/*.*js\"", - "npmclilint": "npmcli-lint", - "lintfix": "npm run lint -- --fix", - "postsnap": "npm run lintfix --" - }, - "repository": "https://github.com/npm/cacache", - "keywords": [ - "cache", - "caching", - "content-addressable", - "sri", - "sri hash", - "subresource integrity", - "cache", - "storage", - "store", - "file store", - "filesystem", - "disk cache", - "disk storage" - ], - "license": "ISC", - "dependencies": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - }, - "devDependencies": { - "@npmcli/lint": "^1.0.1", - "benchmark": "^2.1.4", - "chalk": "^4.0.0", - "require-inject": "^1.4.4", - "tacks": "^1.3.0", - "tap": "^15.0.9" - }, - "tap": { - "100": true, - "test-regex": "test/[^/]*.js" - }, - "engines": { - "node": ">= 10" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/put.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/put.js deleted file mode 100644 index 84e9562..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/put.js +++ /dev/null @@ -1,83 +0,0 @@ -'use strict' - -const index = require('./lib/entry-index') -const memo = require('./lib/memoization') -const write = require('./lib/content/write') -const Flush = require('minipass-flush') -const { PassThrough } = require('minipass-collect') -const Pipeline = require('minipass-pipeline') - -const putOpts = (opts) => ({ - algorithms: ['sha512'], - ...opts, -}) - -module.exports = putData - -function putData (cache, key, data, opts = {}) { - const { memoize } = opts - opts = putOpts(opts) - return write(cache, data, opts).then((res) => { - return index - .insert(cache, key, res.integrity, { ...opts, size: res.size }) - .then((entry) => { - if (memoize) - memo.put(cache, entry, data, opts) - - return res.integrity - }) - }) -} - -module.exports.stream = putStream - -function putStream (cache, key, opts = {}) { - const { memoize } = opts - opts = putOpts(opts) - let integrity - let size - - let memoData - const pipeline = new Pipeline() - // first item in the pipeline is the memoizer, because we need - // that to end first and get the collected data. - if (memoize) { - const memoizer = new PassThrough().on('collect', data => { - memoData = data - }) - pipeline.push(memoizer) - } - - // contentStream is a write-only, not a passthrough - // no data comes out of it. - const contentStream = write.stream(cache, opts) - .on('integrity', (int) => { - integrity = int - }) - .on('size', (s) => { - size = s - }) - - pipeline.push(contentStream) - - // last but not least, we write the index and emit hash and size, - // and memoize if we're doing that - pipeline.push(new Flush({ - flush () { - return index - .insert(cache, key, integrity, { ...opts, size }) - .then((entry) => { - if (memoize && memoData) - memo.put(cache, entry, memoData, opts) - - if (integrity) - pipeline.emit('integrity', integrity) - - if (size) - pipeline.emit('size', size) - }) - }, - })) - - return pipeline -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/rm.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/rm.js deleted file mode 100644 index f2ef6b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/rm.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict' - -const util = require('util') - -const index = require('./lib/entry-index') -const memo = require('./lib/memoization') -const path = require('path') -const rimraf = util.promisify(require('rimraf')) -const rmContent = require('./lib/content/rm') - -module.exports = entry -module.exports.entry = entry - -function entry (cache, key, opts) { - memo.clearMemoized() - return index.delete(cache, key, opts) -} - -module.exports.content = content - -function content (cache, integrity) { - memo.clearMemoized() - return rmContent(cache, integrity) -} - -module.exports.all = all - -function all (cache) { - memo.clearMemoized() - return rimraf(path.join(cache, '*(content-*|index-*)')) -} diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/verify.js b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/verify.js deleted file mode 100644 index db7763d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/cacache/verify.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' - -module.exports = require('./lib/verify') diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/chownr b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/chownr deleted file mode 120000 index 13273af..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/chownr +++ /dev/null @@ -1 +0,0 @@ -../../chownr@2.0.0/node_modules/chownr \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/fs-minipass b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/fs-minipass deleted file mode 120000 index 5855c9a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/fs-minipass +++ /dev/null @@ -1 +0,0 @@ -../../fs-minipass@2.1.0/node_modules/fs-minipass \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/glob b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/glob deleted file mode 120000 index e88081c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/glob +++ /dev/null @@ -1 +0,0 @@ -../../glob@7.2.3/node_modules/glob \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/infer-owner b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/infer-owner deleted file mode 120000 index f650f29..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/infer-owner +++ /dev/null @@ -1 +0,0 @@ -../../infer-owner@1.0.4/node_modules/infer-owner \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/lru-cache b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/lru-cache deleted file mode 120000 index 4e6ca5d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/lru-cache +++ /dev/null @@ -1 +0,0 @@ -../../lru-cache@6.0.0/node_modules/lru-cache \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass deleted file mode 120000 index 7c1951b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass +++ /dev/null @@ -1 +0,0 @@ -../../minipass@3.3.6/node_modules/minipass \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-collect b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-collect deleted file mode 120000 index 29e4c6b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-collect +++ /dev/null @@ -1 +0,0 @@ -../../minipass-collect@1.0.2/node_modules/minipass-collect \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-flush b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-flush deleted file mode 120000 index 14aeee7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-flush +++ /dev/null @@ -1 +0,0 @@ -../../minipass-flush@1.0.7/node_modules/minipass-flush \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-pipeline b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-pipeline deleted file mode 120000 index acc150d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/minipass-pipeline +++ /dev/null @@ -1 +0,0 @@ -../../minipass-pipeline@1.2.4/node_modules/minipass-pipeline \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/mkdirp b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/mkdirp deleted file mode 120000 index 42e5e74..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/mkdirp +++ /dev/null @@ -1 +0,0 @@ -../../mkdirp@1.0.4/node_modules/mkdirp \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/p-map b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/p-map deleted file mode 120000 index ad45f27..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/p-map +++ /dev/null @@ -1 +0,0 @@ -../../p-map@4.0.0/node_modules/p-map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/promise-inflight b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/promise-inflight deleted file mode 120000 index f3805e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/promise-inflight +++ /dev/null @@ -1 +0,0 @@ -../../promise-inflight@1.0.1/node_modules/promise-inflight \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/rimraf b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/rimraf deleted file mode 120000 index cfdf82e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/rimraf +++ /dev/null @@ -1 +0,0 @@ -../../rimraf@3.0.2/node_modules/rimraf \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/ssri b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/ssri deleted file mode 120000 index f9d9ad2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/ssri +++ /dev/null @@ -1 +0,0 @@ -../../ssri@8.0.1/node_modules/ssri \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/tar b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/tar deleted file mode 120000 index e8fc4f9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/tar +++ /dev/null @@ -1 +0,0 @@ -../../tar@6.2.1/node_modules/tar \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/unique-filename b/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/unique-filename deleted file mode 120000 index b9d6447..0000000 --- a/services/hocuspocus/node_modules/.pnpm/cacache@15.3.0/node_modules/unique-filename +++ /dev/null @@ -1 +0,0 @@ -../../unique-filename@1.1.1/node_modules/unique-filename \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/LICENSE b/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/README.md b/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/README.md deleted file mode 100644 index 70e9a54..0000000 --- a/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Like `chown -R`. - -Takes the same arguments as `fs.chown()` diff --git a/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/chownr.js b/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/chownr.js deleted file mode 100644 index 0d40932..0000000 --- a/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/chownr.js +++ /dev/null @@ -1,167 +0,0 @@ -'use strict' -const fs = require('fs') -const path = require('path') - -/* istanbul ignore next */ -const LCHOWN = fs.lchown ? 'lchown' : 'chown' -/* istanbul ignore next */ -const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' - -/* istanbul ignore next */ -const needEISDIRHandled = fs.lchown && - !process.version.match(/v1[1-9]+\./) && - !process.version.match(/v10\.[6-9]/) - -const lchownSync = (path, uid, gid) => { - try { - return fs[LCHOWNSYNC](path, uid, gid) - } catch (er) { - if (er.code !== 'ENOENT') - throw er - } -} - -/* istanbul ignore next */ -const chownSync = (path, uid, gid) => { - try { - return fs.chownSync(path, uid, gid) - } catch (er) { - if (er.code !== 'ENOENT') - throw er - } -} - -/* istanbul ignore next */ -const handleEISDIR = - needEISDIRHandled ? (path, uid, gid, cb) => er => { - // Node prior to v10 had a very questionable implementation of - // fs.lchown, which would always try to call fs.open on a directory - // Fall back to fs.chown in those cases. - if (!er || er.code !== 'EISDIR') - cb(er) - else - fs.chown(path, uid, gid, cb) - } - : (_, __, ___, cb) => cb - -/* istanbul ignore next */ -const handleEISDirSync = - needEISDIRHandled ? (path, uid, gid) => { - try { - return lchownSync(path, uid, gid) - } catch (er) { - if (er.code !== 'EISDIR') - throw er - chownSync(path, uid, gid) - } - } - : (path, uid, gid) => lchownSync(path, uid, gid) - -// fs.readdir could only accept an options object as of node v6 -const nodeVersion = process.version -let readdir = (path, options, cb) => fs.readdir(path, options, cb) -let readdirSync = (path, options) => fs.readdirSync(path, options) -/* istanbul ignore next */ -if (/^v4\./.test(nodeVersion)) - readdir = (path, options, cb) => fs.readdir(path, cb) - -const chown = (cpath, uid, gid, cb) => { - fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => { - // Skip ENOENT error - cb(er && er.code !== 'ENOENT' ? er : null) - })) -} - -const chownrKid = (p, child, uid, gid, cb) => { - if (typeof child === 'string') - return fs.lstat(path.resolve(p, child), (er, stats) => { - // Skip ENOENT error - if (er) - return cb(er.code !== 'ENOENT' ? er : null) - stats.name = child - chownrKid(p, stats, uid, gid, cb) - }) - - if (child.isDirectory()) { - chownr(path.resolve(p, child.name), uid, gid, er => { - if (er) - return cb(er) - const cpath = path.resolve(p, child.name) - chown(cpath, uid, gid, cb) - }) - } else { - const cpath = path.resolve(p, child.name) - chown(cpath, uid, gid, cb) - } -} - - -const chownr = (p, uid, gid, cb) => { - readdir(p, { withFileTypes: true }, (er, children) => { - // any error other than ENOTDIR or ENOTSUP means it's not readable, - // or doesn't exist. give up. - if (er) { - if (er.code === 'ENOENT') - return cb() - else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') - return cb(er) - } - if (er || !children.length) - return chown(p, uid, gid, cb) - - let len = children.length - let errState = null - const then = er => { - if (errState) - return - if (er) - return cb(errState = er) - if (-- len === 0) - return chown(p, uid, gid, cb) - } - - children.forEach(child => chownrKid(p, child, uid, gid, then)) - }) -} - -const chownrKidSync = (p, child, uid, gid) => { - if (typeof child === 'string') { - try { - const stats = fs.lstatSync(path.resolve(p, child)) - stats.name = child - child = stats - } catch (er) { - if (er.code === 'ENOENT') - return - else - throw er - } - } - - if (child.isDirectory()) - chownrSync(path.resolve(p, child.name), uid, gid) - - handleEISDirSync(path.resolve(p, child.name), uid, gid) -} - -const chownrSync = (p, uid, gid) => { - let children - try { - children = readdirSync(p, { withFileTypes: true }) - } catch (er) { - if (er.code === 'ENOENT') - return - else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP') - return handleEISDirSync(p, uid, gid) - else - throw er - } - - if (children && children.length) - children.forEach(child => chownrKidSync(p, child, uid, gid)) - - return handleEISDirSync(p, uid, gid) -} - -module.exports = chownr -chownr.sync = chownrSync diff --git a/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/package.json b/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/package.json deleted file mode 100644 index c273a7d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "name": "chownr", - "description": "like `chown -R`", - "version": "1.1.4", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/chownr.git" - }, - "main": "chownr.js", - "files": [ - "chownr.js" - ], - "devDependencies": { - "mkdirp": "0.3", - "rimraf": "^2.7.1", - "tap": "^14.10.6" - }, - "tap": { - "check-coverage": true - }, - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "license": "ISC" -} diff --git a/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/LICENSE b/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/README.md b/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/README.md deleted file mode 100644 index 70e9a54..0000000 --- a/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Like `chown -R`. - -Takes the same arguments as `fs.chown()` diff --git a/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/chownr.js b/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/chownr.js deleted file mode 100644 index 0d40932..0000000 --- a/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/chownr.js +++ /dev/null @@ -1,167 +0,0 @@ -'use strict' -const fs = require('fs') -const path = require('path') - -/* istanbul ignore next */ -const LCHOWN = fs.lchown ? 'lchown' : 'chown' -/* istanbul ignore next */ -const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' - -/* istanbul ignore next */ -const needEISDIRHandled = fs.lchown && - !process.version.match(/v1[1-9]+\./) && - !process.version.match(/v10\.[6-9]/) - -const lchownSync = (path, uid, gid) => { - try { - return fs[LCHOWNSYNC](path, uid, gid) - } catch (er) { - if (er.code !== 'ENOENT') - throw er - } -} - -/* istanbul ignore next */ -const chownSync = (path, uid, gid) => { - try { - return fs.chownSync(path, uid, gid) - } catch (er) { - if (er.code !== 'ENOENT') - throw er - } -} - -/* istanbul ignore next */ -const handleEISDIR = - needEISDIRHandled ? (path, uid, gid, cb) => er => { - // Node prior to v10 had a very questionable implementation of - // fs.lchown, which would always try to call fs.open on a directory - // Fall back to fs.chown in those cases. - if (!er || er.code !== 'EISDIR') - cb(er) - else - fs.chown(path, uid, gid, cb) - } - : (_, __, ___, cb) => cb - -/* istanbul ignore next */ -const handleEISDirSync = - needEISDIRHandled ? (path, uid, gid) => { - try { - return lchownSync(path, uid, gid) - } catch (er) { - if (er.code !== 'EISDIR') - throw er - chownSync(path, uid, gid) - } - } - : (path, uid, gid) => lchownSync(path, uid, gid) - -// fs.readdir could only accept an options object as of node v6 -const nodeVersion = process.version -let readdir = (path, options, cb) => fs.readdir(path, options, cb) -let readdirSync = (path, options) => fs.readdirSync(path, options) -/* istanbul ignore next */ -if (/^v4\./.test(nodeVersion)) - readdir = (path, options, cb) => fs.readdir(path, cb) - -const chown = (cpath, uid, gid, cb) => { - fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => { - // Skip ENOENT error - cb(er && er.code !== 'ENOENT' ? er : null) - })) -} - -const chownrKid = (p, child, uid, gid, cb) => { - if (typeof child === 'string') - return fs.lstat(path.resolve(p, child), (er, stats) => { - // Skip ENOENT error - if (er) - return cb(er.code !== 'ENOENT' ? er : null) - stats.name = child - chownrKid(p, stats, uid, gid, cb) - }) - - if (child.isDirectory()) { - chownr(path.resolve(p, child.name), uid, gid, er => { - if (er) - return cb(er) - const cpath = path.resolve(p, child.name) - chown(cpath, uid, gid, cb) - }) - } else { - const cpath = path.resolve(p, child.name) - chown(cpath, uid, gid, cb) - } -} - - -const chownr = (p, uid, gid, cb) => { - readdir(p, { withFileTypes: true }, (er, children) => { - // any error other than ENOTDIR or ENOTSUP means it's not readable, - // or doesn't exist. give up. - if (er) { - if (er.code === 'ENOENT') - return cb() - else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') - return cb(er) - } - if (er || !children.length) - return chown(p, uid, gid, cb) - - let len = children.length - let errState = null - const then = er => { - if (errState) - return - if (er) - return cb(errState = er) - if (-- len === 0) - return chown(p, uid, gid, cb) - } - - children.forEach(child => chownrKid(p, child, uid, gid, then)) - }) -} - -const chownrKidSync = (p, child, uid, gid) => { - if (typeof child === 'string') { - try { - const stats = fs.lstatSync(path.resolve(p, child)) - stats.name = child - child = stats - } catch (er) { - if (er.code === 'ENOENT') - return - else - throw er - } - } - - if (child.isDirectory()) - chownrSync(path.resolve(p, child.name), uid, gid) - - handleEISDirSync(path.resolve(p, child.name), uid, gid) -} - -const chownrSync = (p, uid, gid) => { - let children - try { - children = readdirSync(p, { withFileTypes: true }) - } catch (er) { - if (er.code === 'ENOENT') - return - else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP') - return handleEISDirSync(p, uid, gid) - else - throw er - } - - if (children && children.length) - children.forEach(child => chownrKidSync(p, child, uid, gid)) - - return handleEISDirSync(p, uid, gid) -} - -module.exports = chownr -chownr.sync = chownrSync diff --git a/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/package.json b/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/package.json deleted file mode 100644 index 5b0214c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "name": "chownr", - "description": "like `chown -R`", - "version": "2.0.0", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/chownr.git" - }, - "main": "chownr.js", - "files": [ - "chownr.js" - ], - "devDependencies": { - "mkdirp": "0.3", - "rimraf": "^2.7.1", - "tap": "^14.10.6" - }, - "tap": { - "check-coverage": true - }, - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "license": "ISC", - "engines": { - "node": ">=10" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.d.ts b/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.d.ts deleted file mode 100644 index ed58995..0000000 --- a/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -declare namespace cleanStack { - interface Options { - /** - Prettify the file paths in the stack: - - `/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15` → `~/dev/clean-stack/unicorn.js:2:15` - - @default false - */ - readonly pretty?: boolean; - } -} - -/** -Clean up error stack traces. Removes the mostly unhelpful internal Node.js entries. - -@param stack - The `stack` property of an `Error`. - -@example -``` -import cleanStack = require('clean-stack'); - -const error = new Error('Missing unicorn'); - -console.log(error.stack); - -// Error: Missing unicorn -// at Object. (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15) -// at Module._compile (module.js:409:26) -// at Object.Module._extensions..js (module.js:416:10) -// at Module.load (module.js:343:32) -// at Function.Module._load (module.js:300:12) -// at Function.Module.runMain (module.js:441:10) -// at startup (node.js:139:18) - -console.log(cleanStack(error.stack)); - -// Error: Missing unicorn -// at Object. (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15) -``` -*/ -declare function cleanStack( - stack: string, - options?: cleanStack.Options -): string; - -export = cleanStack; diff --git a/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js b/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js deleted file mode 100644 index 8c1dcc4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; -const os = require('os'); - -const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; -const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; -const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir(); - -module.exports = (stack, options) => { - options = Object.assign({pretty: false}, options); - - return stack.replace(/\\/g, '/') - .split('\n') - .filter(line => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - - const match = pathMatches[1]; - - // Electron - if ( - match.includes('.app/Contents/Resources/electron.asar') || - match.includes('.app/Contents/Resources/default_app.asar') - ) { - return false; - } - - return !pathRegex.test(match); - }) - .filter(line => line.trim() !== '') - .map(line => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~'))); - } - - return line; - }) - .join('\n'); -}; diff --git a/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/license b/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/license deleted file mode 100644 index e7af2f7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/package.json b/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/package.json deleted file mode 100644 index 719fdff..0000000 --- a/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "clean-stack", - "version": "2.2.0", - "description": "Clean up error stack traces", - "license": "MIT", - "repository": "sindresorhus/clean-stack", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "clean", - "stack", - "trace", - "traces", - "error", - "err", - "electron" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - }, - "browser": { - "os": false - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/readme.md b/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/readme.md deleted file mode 100644 index 8d44160..0000000 --- a/services/hocuspocus/node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/readme.md +++ /dev/null @@ -1,76 +0,0 @@ -# clean-stack [![Build Status](https://travis-ci.org/sindresorhus/clean-stack.svg?branch=master)](https://travis-ci.org/sindresorhus/clean-stack) - -> Clean up error stack traces - -Removes the mostly unhelpful internal Node.js entries. - -Also works in Electron. - - -## Install - -``` -$ npm install clean-stack -``` - - -## Usage - -```js -const cleanStack = require('clean-stack'); - -const error = new Error('Missing unicorn'); - -console.log(error.stack); -/* -Error: Missing unicorn - at Object. (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15) - at Module._compile (module.js:409:26) - at Object.Module._extensions..js (module.js:416:10) - at Module.load (module.js:343:32) - at Function.Module._load (module.js:300:12) - at Function.Module.runMain (module.js:441:10) - at startup (node.js:139:18) -*/ - -console.log(cleanStack(error.stack)); -/* -Error: Missing unicorn - at Object. (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15) -*/ -``` - - -## API - -### cleanStack(stack, [options]) - -#### stack - -Type: `string` - -The `stack` property of an `Error`. - -#### options - -Type: `Object` - -##### pretty - -Type: `boolean`
-Default: `false` - -Prettify the file paths in the stack: - -`/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15` → `~/dev/clean-stack/unicorn.js:2:15` - - -## Related - -- [extrack-stack](https://github.com/sindresorhus/extract-stack) - Extract the actual stack of an error -- [stack-utils](https://github.com/tapjs/stack-utils) - Captures and cleans stack traces - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/LICENSE b/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/README.md b/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/README.md deleted file mode 100644 index f89aa17..0000000 --- a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# color-support - -A module which will endeavor to guess your terminal's level of color -support. - -[![Build Status](https://travis-ci.org/isaacs/color-support.svg?branch=master)](https://travis-ci.org/isaacs/color-support) [![Coverage Status](https://coveralls.io/repos/github/isaacs/color-support/badge.svg?branch=master)](https://coveralls.io/github/isaacs/color-support?branch=master) - -This is similar to `supports-color`, but it does not read -`process.argv`. - -1. If not in a node environment, not supported. - -2. If stdout is not a TTY, not supported, unless the `ignoreTTY` - option is set. - -3. If the `TERM` environ is `dumb`, not supported, unless the - `ignoreDumb` option is set. - -4. If on Windows, then support 16 colors. - -5. If using Tmux, then support 256 colors. - -7. Handle continuous-integration servers. If `CI` or - `TEAMCITY_VERSION` are set in the environment, and `TRAVIS` is not - set, then color is not supported, unless `ignoreCI` option is set. - -6. Guess based on the `TERM_PROGRAM` environ. These terminals support - 16m colors: - - - `iTerm.app` version 3.x supports 16m colors, below support 256 - - `MacTerm` supports 16m colors - - `Apple_Terminal` supports 256 colors - - Have more things that belong on this list? Send a PR! - -8. Make a guess based on the `TERM` environment variable. Any - `xterm-256color` will get 256 colors. Any screen, xterm, vt100, - color, ansi, cygwin, or linux `TERM` will get 16 colors. - -9. If `COLORTERM` environment variable is set, then support 16 colors. - -10. At this point, we assume that color is not supported. - -## USAGE - -```javascript -var testColorSupport = require('color-support') -var colorSupport = testColorSupport(/* options object */) - -if (!colorSupport) { - console.log('color is not supported') -} else if (colorSupport.has16m) { - console.log('\x1b[38;2;102;194;255m16m colors\x1b[0m') -} else if (colorSupport.has256) { - console.log('\x1b[38;5;119m256 colors\x1b[0m') -} else if (colorSupport.hasBasic) { - console.log('\x1b[31mbasic colors\x1b[0m') -} else { - console.log('this is impossible, but colors are not supported') -} -``` - -If you don't have any options to set, you can also just look at the -flags which will all be set on the test function itself. (Of course, -this doesn't return a falsey value when colors aren't supported, and -doesn't allow you to set options.) - -```javascript -var colorSupport = require('color-support') - -if (colorSupport.has16m) { - console.log('\x1b[38;2;102;194;255m16m colors\x1b[0m') -} else if (colorSupport.has256) { - console.log('\x1b[38;5;119m256 colors\x1b[0m') -} else if (colorSupport.hasBasic) { - console.log('\x1b[31mbasic colors\x1b[0m') -} else { - console.log('colors are not supported') -} -``` - -## Options - -You can pass in the following options. - -* ignoreTTY - default false. Ignore the `isTTY` check. -* ignoreDumb - default false. Ignore `TERM=dumb` environ check. -* ignoreCI - default false. Ignore `CI` environ check. -* env - Object for environment vars. Defaults to `process.env`. -* stream - Stream for `isTTY` check. Defaults to `process.stdout`. -* term - String for `TERM` checking. Defaults to `env.TERM`. -* alwaysReturn - default false. Return an object when colors aren't - supported (instead of returning `false`). -* level - A number from 0 to 3. This will return a result for the - specified level. This is useful if you want to be able to set the - color support level explicitly as a number in an environment - variable or config, but then use the object flags in your program. - Except for `alwaysReturn` to return an object for level 0, all other - options are ignored, since no checking is done if a level is - explicitly set. - -## Return Value - -If no color support is available, then `false` is returned by default, -unless the `alwaysReturn` flag is set to `true`. This is so that the -simple question of "can I use colors or not" can treat any truthy -return as "yes". - -Otherwise, the return object has the following fields: - -* `level` - A number from 0 to 3 - * `0` - No color support - * `1` - Basic (16) color support - * `2` - 256 color support - * `3` - 16 million (true) color support -* `hasBasic` - Boolean -* `has256` - Boolean -* `has16m` - Boolean - -## CLI - -You can run the `color-support` bin from the command line which will -just dump the values as this module calculates them in whatever env -it's run. It takes no command line arguments. - -## Credits - -This is a spiritual, if not actual, fork of -[supports-color](http://npm.im/supports-color) by the ever prolific -[Sindre Sorhus](http://npm.im/~sindresorhus). diff --git a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/bin.js b/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/bin.js deleted file mode 100755 index 3c0a967..0000000 --- a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/bin.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var colorSupport = require('./')({alwaysReturn: true }) -console.log(JSON.stringify(colorSupport, null, 2)) diff --git a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/browser.js b/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/browser.js deleted file mode 100644 index ab5c663..0000000 --- a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/browser.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = colorSupport({ alwaysReturn: true }, colorSupport) - -function colorSupport(options, obj) { - obj = obj || {} - options = options || {} - obj.level = 0 - obj.hasBasic = false - obj.has256 = false - obj.has16m = false - if (!options.alwaysReturn) { - return false - } - return obj -} diff --git a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/index.js b/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/index.js deleted file mode 100644 index 6b6f3b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/index.js +++ /dev/null @@ -1,134 +0,0 @@ -// call it on itself so we can test the export val for basic stuff -module.exports = colorSupport({ alwaysReturn: true }, colorSupport) - -function hasNone (obj, options) { - obj.level = 0 - obj.hasBasic = false - obj.has256 = false - obj.has16m = false - if (!options.alwaysReturn) { - return false - } - return obj -} - -function hasBasic (obj) { - obj.hasBasic = true - obj.has256 = false - obj.has16m = false - obj.level = 1 - return obj -} - -function has256 (obj) { - obj.hasBasic = true - obj.has256 = true - obj.has16m = false - obj.level = 2 - return obj -} - -function has16m (obj) { - obj.hasBasic = true - obj.has256 = true - obj.has16m = true - obj.level = 3 - return obj -} - -function colorSupport (options, obj) { - options = options || {} - - obj = obj || {} - - // if just requesting a specific level, then return that. - if (typeof options.level === 'number') { - switch (options.level) { - case 0: - return hasNone(obj, options) - case 1: - return hasBasic(obj) - case 2: - return has256(obj) - case 3: - return has16m(obj) - } - } - - obj.level = 0 - obj.hasBasic = false - obj.has256 = false - obj.has16m = false - - if (typeof process === 'undefined' || - !process || - !process.stdout || - !process.env || - !process.platform) { - return hasNone(obj, options) - } - - var env = options.env || process.env - var stream = options.stream || process.stdout - var term = options.term || env.TERM || '' - var platform = options.platform || process.platform - - if (!options.ignoreTTY && !stream.isTTY) { - return hasNone(obj, options) - } - - if (!options.ignoreDumb && term === 'dumb' && !env.COLORTERM) { - return hasNone(obj, options) - } - - if (platform === 'win32') { - return hasBasic(obj) - } - - if (env.TMUX) { - return has256(obj) - } - - if (!options.ignoreCI && (env.CI || env.TEAMCITY_VERSION)) { - if (env.TRAVIS) { - return has256(obj) - } else { - return hasNone(obj, options) - } - } - - // TODO: add more term programs - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - var ver = env.TERM_PROGRAM_VERSION || '0.' - if (/^[0-2]\./.test(ver)) { - return has256(obj) - } else { - return has16m(obj) - } - - case 'HyperTerm': - case 'Hyper': - return has16m(obj) - - case 'MacTerm': - return has16m(obj) - - case 'Apple_Terminal': - return has256(obj) - } - - if (/^xterm-256/.test(term)) { - return has256(obj) - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(term)) { - return hasBasic(obj) - } - - if (env.COLORTERM) { - return hasBasic(obj) - } - - return hasNone(obj, options) -} diff --git a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/node_modules/.bin/color-support b/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/node_modules/.bin/color-support deleted file mode 100755 index 6be27f6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/node_modules/.bin/color-support +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../bin.js" "$@" -else - exec node "$basedir/../../bin.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/package.json b/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/package.json deleted file mode 100644 index f3e3b77..0000000 --- a/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "color-support", - "version": "1.1.3", - "description": "A module which will endeavor to guess your terminal's level of color support.", - "main": "index.js", - "browser": "browser.js", - "bin": "bin.js", - "devDependencies": { - "tap": "^10.3.3" - }, - "scripts": { - "test": "tap test/*.js --100 -J", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/color-support.git" - }, - "keywords": [ - "terminal", - "color", - "support", - "xterm", - "truecolor", - "256" - ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "files": [ - "browser.js", - "index.js", - "bin.js" - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/.travis.yml b/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/.travis.yml deleted file mode 100644 index f1d0f13..0000000 --- a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/LICENSE b/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/README.markdown b/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/README.markdown deleted file mode 100644 index 408f70a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/README.markdown +++ /dev/null @@ -1,62 +0,0 @@ -concat-map -========== - -Concatenative mapdashery. - -[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) - -[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) - -example -======= - -``` js -var concatMap = require('concat-map'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); -``` - -*** - -``` -[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] -``` - -methods -======= - -``` js -var concatMap = require('concat-map') -``` - -concatMap(xs, fn) ------------------ - -Return an array of concatenated elements by calling `fn(x, i)` for each element -`x` and each index `i` in the array `xs`. - -When `fn(x, i)` returns an array, its result will be concatenated with the -result array. If `fn(x, i)` returns anything else, that value will be pushed -onto the end of the result array. - -install -======= - -With [npm](http://npmjs.org) do: - -``` -npm install concat-map -``` - -license -======= - -MIT - -notes -===== - -This module was written while sitting high above the ground in a tree. diff --git a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/example/map.js b/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/example/map.js deleted file mode 100644 index 3365621..0000000 --- a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/example/map.js +++ /dev/null @@ -1,6 +0,0 @@ -var concatMap = require('../'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); diff --git a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js b/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js deleted file mode 100644 index b29a781..0000000 --- a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/package.json b/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/package.json deleted file mode 100644 index d3640e6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name" : "concat-map", - "description" : "concatenative mapdashery", - "version" : "0.0.1", - "repository" : { - "type" : "git", - "url" : "git://github.com/substack/node-concat-map.git" - }, - "main" : "index.js", - "keywords" : [ - "concat", - "concatMap", - "map", - "functional", - "higher-order" - ], - "directories" : { - "example" : "example", - "test" : "test" - }, - "scripts" : { - "test" : "tape test/*.js" - }, - "devDependencies" : { - "tape" : "~2.4.0" - }, - "license" : "MIT", - "author" : { - "name" : "James Halliday", - "email" : "mail@substack.net", - "url" : "http://substack.net" - }, - "testling" : { - "files" : "test/*.js", - "browsers" : { - "ie" : [ 6, 7, 8, 9 ], - "ff" : [ 3.5, 10, 15.0 ], - "chrome" : [ 10, 22 ], - "safari" : [ 5.1 ], - "opera" : [ 12 ] - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/test/map.js b/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/test/map.js deleted file mode 100644 index fdbd702..0000000 --- a/services/hocuspocus/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/test/map.js +++ /dev/null @@ -1,39 +0,0 @@ -var concatMap = require('../'); -var test = require('tape'); - -test('empty or not', function (t) { - var xs = [ 1, 2, 3, 4, 5, 6 ]; - var ixes = []; - var ys = concatMap(xs, function (x, ix) { - ixes.push(ix); - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; - }); - t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); - t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); - t.end(); -}); - -test('always something', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('scalars', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : x; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('undefs', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function () {}); - t.same(ys, [ undefined, undefined, undefined, undefined ]); - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/LICENSE b/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/LICENSE deleted file mode 100644 index e756052..0000000 --- a/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2014, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/README.md b/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/README.md deleted file mode 100644 index f58cc8d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/README.md +++ /dev/null @@ -1,145 +0,0 @@ -# Console Control Strings - -A library of cross-platform tested terminal/console command strings for -doing things like color and cursor positioning. This is a subset of both -ansi and vt100. All control codes included work on both Windows & Unix-like -OSes, except where noted. - -## Usage - -```js -var consoleControl = require('console-control-strings') - -console.log(consoleControl.color('blue','bgRed', 'bold') + 'hi there' + consoleControl.color('reset')) -process.stdout.write(consoleControl.goto(75, 10)) -``` - -## Why Another? - -There are tons of libraries similar to this one. I wanted one that was: - -1. Very clear about compatibility goals. -2. Could emit, for instance, a start color code without an end one. -3. Returned strings w/o writing to streams. -4. Was not weighed down with other unrelated baggage. - -## Functions - -### var code = consoleControl.up(_num = 1_) - -Returns the escape sequence to move _num_ lines up. - -### var code = consoleControl.down(_num = 1_) - -Returns the escape sequence to move _num_ lines down. - -### var code = consoleControl.forward(_num = 1_) - -Returns the escape sequence to move _num_ lines righ. - -### var code = consoleControl.back(_num = 1_) - -Returns the escape sequence to move _num_ lines left. - -### var code = consoleControl.nextLine(_num = 1_) - -Returns the escape sequence to move _num_ lines down and to the beginning of -the line. - -### var code = consoleControl.previousLine(_num = 1_) - -Returns the escape sequence to move _num_ lines up and to the beginning of -the line. - -### var code = consoleControl.eraseData() - -Returns the escape sequence to erase everything from the current cursor -position to the bottom right of the screen. This is line based, so it -erases the remainder of the current line and all following lines. - -### var code = consoleControl.eraseLine() - -Returns the escape sequence to erase to the end of the current line. - -### var code = consoleControl.goto(_x_, _y_) - -Returns the escape sequence to move the cursor to the designated position. -Note that the origin is _1, 1_ not _0, 0_. - -### var code = consoleControl.gotoSOL() - -Returns the escape sequence to move the cursor to the beginning of the -current line. (That is, it returns a carriage return, `\r`.) - -### var code = consoleControl.beep() - -Returns the escape sequence to cause the termianl to beep. (That is, it -returns unicode character `\x0007`, a Control-G.) - -### var code = consoleControl.hideCursor() - -Returns the escape sequence to hide the cursor. - -### var code = consoleControl.showCursor() - -Returns the escape sequence to show the cursor. - -### var code = consoleControl.color(_colors = []_) - -### var code = consoleControl.color(_color1_, _color2_, _…_, _colorn_) - -Returns the escape sequence to set the current terminal display attributes -(mostly colors). Arguments can either be a list of attributes or an array -of attributes. The difference between passing in an array or list of colors -and calling `.color` separately for each one, is that in the former case a -single escape sequence will be produced where as in the latter each change -will have its own distinct escape sequence. Each attribute can be one of: - -* Reset: - * **reset** – Reset all attributes to the terminal default. -* Styles: - * **bold** – Display text as bold. In some terminals this means using a - bold font, in others this means changing the color. In some it means - both. - * **italic** – Display text as italic. This is not available in most Windows terminals. - * **underline** – Underline text. This is not available in most Windows Terminals. - * **inverse** – Invert the foreground and background colors. - * **stopBold** – Do not display text as bold. - * **stopItalic** – Do not display text as italic. - * **stopUnderline** – Do not underline text. - * **stopInverse** – Do not invert foreground and background. -* Colors: - * **white** - * **black** - * **blue** - * **cyan** - * **green** - * **magenta** - * **red** - * **yellow** - * **grey** / **brightBlack** - * **brightRed** - * **brightGreen** - * **brightYellow** - * **brightBlue** - * **brightMagenta** - * **brightCyan** - * **brightWhite** -* Background Colors: - * **bgWhite** - * **bgBlack** - * **bgBlue** - * **bgCyan** - * **bgGreen** - * **bgMagenta** - * **bgRed** - * **bgYellow** - * **bgGrey** / **bgBrightBlack** - * **bgBrightRed** - * **bgBrightGreen** - * **bgBrightYellow** - * **bgBrightBlue** - * **bgBrightMagenta** - * **bgBrightCyan** - * **bgBrightWhite** - diff --git a/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/index.js b/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/index.js deleted file mode 100644 index bf89034..0000000 --- a/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/index.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict' - -// These tables borrowed from `ansi` - -var prefix = '\x1b[' - -exports.up = function up (num) { - return prefix + (num || '') + 'A' -} - -exports.down = function down (num) { - return prefix + (num || '') + 'B' -} - -exports.forward = function forward (num) { - return prefix + (num || '') + 'C' -} - -exports.back = function back (num) { - return prefix + (num || '') + 'D' -} - -exports.nextLine = function nextLine (num) { - return prefix + (num || '') + 'E' -} - -exports.previousLine = function previousLine (num) { - return prefix + (num || '') + 'F' -} - -exports.horizontalAbsolute = function horizontalAbsolute (num) { - if (num == null) throw new Error('horizontalAboslute requires a column to position to') - return prefix + num + 'G' -} - -exports.eraseData = function eraseData () { - return prefix + 'J' -} - -exports.eraseLine = function eraseLine () { - return prefix + 'K' -} - -exports.goto = function (x, y) { - return prefix + y + ';' + x + 'H' -} - -exports.gotoSOL = function () { - return '\r' -} - -exports.beep = function () { - return '\x07' -} - -exports.hideCursor = function hideCursor () { - return prefix + '?25l' -} - -exports.showCursor = function showCursor () { - return prefix + '?25h' -} - -var colors = { - reset: 0, -// styles - bold: 1, - italic: 3, - underline: 4, - inverse: 7, -// resets - stopBold: 22, - stopItalic: 23, - stopUnderline: 24, - stopInverse: 27, -// colors - white: 37, - black: 30, - blue: 34, - cyan: 36, - green: 32, - magenta: 35, - red: 31, - yellow: 33, - bgWhite: 47, - bgBlack: 40, - bgBlue: 44, - bgCyan: 46, - bgGreen: 42, - bgMagenta: 45, - bgRed: 41, - bgYellow: 43, - - grey: 90, - brightBlack: 90, - brightRed: 91, - brightGreen: 92, - brightYellow: 93, - brightBlue: 94, - brightMagenta: 95, - brightCyan: 96, - brightWhite: 97, - - bgGrey: 100, - bgBrightBlack: 100, - bgBrightRed: 101, - bgBrightGreen: 102, - bgBrightYellow: 103, - bgBrightBlue: 104, - bgBrightMagenta: 105, - bgBrightCyan: 106, - bgBrightWhite: 107 -} - -exports.color = function color (colorWith) { - if (arguments.length !== 1 || !Array.isArray(colorWith)) { - colorWith = Array.prototype.slice.call(arguments) - } - return prefix + colorWith.map(colorNameToCode).join(';') + 'm' -} - -function colorNameToCode (color) { - if (colors[color] != null) return colors[color] - throw new Error('Unknown color or style name: ' + color) -} diff --git a/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/package.json b/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/package.json deleted file mode 100644 index eb6c62a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "console-control-strings", - "version": "1.1.0", - "description": "A library of cross-platform tested terminal/console command strings for doing things like color and cursor positioning. This is a subset of both ansi and vt100. All control codes included work on both Windows & Unix-like OSes, except where noted.", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "standard && tap test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/iarna/console-control-strings" - }, - "keywords": [], - "author": "Rebecca Turner (http://re-becca.org/)", - "license": "ISC", - "files": [ - "LICENSE", - "index.js" - ], - "devDependencies": { - "standard": "^7.1.2", - "tap": "^5.7.2" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/LICENSE b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/LICENSE deleted file mode 100644 index 5fe3df6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/LICENSE +++ /dev/null @@ -1,46 +0,0 @@ -MIT License - -Copyright (c) Pooya Parsa - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---- - -Bundled with https://github.com/websockets/ws - -Copyright (c) 2011 Einar Otto Stangvik -Copyright (c) 2013 Arnout Kazemier and contributors -Copyright (c) 2016 Luigi Pinca and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/README.md b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/README.md deleted file mode 100644 index a62740d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# crossws - - - -[![npm version](https://flat.badgen.net/npm/v/crossws)](https://npmjs.com/package/crossws) -[![npm downloads](https://flat.badgen.net/npm/dm/crossws)](https://npmjs.com/package/crossws) - - - -Elegant, typed, and simple toolkit to implement cross-platform WebSocket servers. - -👉 [📖 documentation](https://crossws.h3.dev) - -## Features - -🧩 Seamlessly integrates with [Bun](https://crossws.h3.dev/adapters/bun), [Cloudflare Workers](https://crossws.h3.dev/adapters/cloudflare), [Deno](https://crossws.h3.dev/adapters/deno) and [Node.js](https://crossws.h3.dev/adapters/node) and any compatible web framework. - -✅ Prebundled with [ws](https://github.com/websockets/ws) for Node.js support with alternative/much faster [uWebSockets](https://crossws.h3.dev/adapters/node#uwebsockets) adapter. - -📦 Extremely lightweight and tree-shakable conditional ESM exports. - -🚀 High-performance and simple hooks API, without per-connection callback creation. - -🌟 Typed hooks API and developer-friendly object inspection. - -[^1]: crossws supports Node.js via [npm:ws](https://github.com/websockets/ws) (prebundled) or [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js). - -## Contribution - -
- Local development - -- Clone this repository -- Install the latest LTS version of [Node.js](https://nodejs.org/en/) -- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` -- Install dependencies using `pnpm install` -- Run examples using `pnpm play:` scripts - -
- - - -## License - - - -Published under the [MIT](https://github.com/h3js/crossws/blob/main/LICENSE) license. -Made by [@pi0](https://github.com/pi0) and [community](https://github.com/h3js/crossws/graphs/contributors) 💛 -

- - - - - - - - ---- - -_🤖 auto updated with [automd](https://automd.unjs.io)_ - - diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/bun.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/bun.d.ts deleted file mode 100644 index c9f3811..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/bun.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/adapters/bun.mjs"; -export { default } from "../dist/adapters/bun.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/bunny.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/bunny.d.ts deleted file mode 100644 index d7227e6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/bunny.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/adapters/bunny.mjs"; -export { default } from "../dist/adapters/bunny.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/cloudflare.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/cloudflare.d.ts deleted file mode 100644 index 60203fc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/cloudflare.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/adapters/cloudflare.mjs"; -export { default } from "../dist/adapters/cloudflare.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/deno.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/deno.d.ts deleted file mode 100644 index 5f28035..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/deno.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/adapters/deno.mjs"; -export { default } from "../dist/adapters/deno.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/node.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/node.d.ts deleted file mode 100644 index f8af25c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/node.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/adapters/node.mjs"; -export { default } from "../dist/adapters/node.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/sse.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/sse.d.ts deleted file mode 100644 index 2ed0882..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/sse.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/adapters/sse.mjs"; -export { default } from "../dist/adapters/sse.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/uws.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/uws.d.ts deleted file mode 100644 index 3a68fd5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/adapters/uws.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/adapters/uws.mjs"; -export { default } from "../dist/adapters/uws.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/THIRD-PARTY-LICENSES.md b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/THIRD-PARTY-LICENSES.md deleted file mode 100644 index 9f3f030..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/THIRD-PARTY-LICENSES.md +++ /dev/null @@ -1,33 +0,0 @@ -# Licenses of Bundled Dependencies - -The published artifact additionally contains code with the following licenses: -MIT - -# Bundled Dependencies - -## ws - -License: MIT -By: Einar Otto Stangvik -Repository: https://github.com/websockets/ws - -> Copyright (c) 2011 Einar Otto Stangvik -> Copyright (c) 2013 Arnout Kazemier and contributors -> Copyright (c) 2016 Luigi Pinca and contributors -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of -> this software and associated documentation files (the "Software"), to deal in -> the Software without restriction, including without limitation the rights to -> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -> the Software, and to permit persons to whom the Software is furnished to do so, -> subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/_request.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/_request.mjs deleted file mode 100644 index 1bff754..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/_request.mjs +++ /dev/null @@ -1,80 +0,0 @@ -const StubRequest = /* @__PURE__ */ (() => { - class StubRequest { - url; - _abortController; - _headers; - _init; - constructor(url, init = {}) { - this.url = url; - this._init = init; - } - get headers() { - if (!this._headers) this._headers = new Headers(this._init?.headers); - return this._headers; - } - clone() { - return new StubRequest(this.url, this._init); - } - get method() { - return "GET"; - } - get signal() { - if (!this._abortController) this._abortController = new AbortController(); - return this._abortController.signal; - } - get cache() { - return "default"; - } - get credentials() { - return "same-origin"; - } - get destination() { - return ""; - } - get integrity() { - return ""; - } - get keepalive() { - return false; - } - get redirect() { - return "follow"; - } - get mode() { - return "cors"; - } - get referrer() { - return "about:client"; - } - get referrerPolicy() { - return ""; - } - get body() { - return null; - } - get bodyUsed() { - return false; - } - arrayBuffer() { - return Promise.resolve(/* @__PURE__ */ new ArrayBuffer(0)); - } - blob() { - return Promise.resolve(new Blob()); - } - bytes() { - return Promise.resolve(new Uint8Array()); - } - formData() { - return Promise.resolve(new FormData()); - } - json() { - return Promise.resolve(JSON.parse("")); - } - text() { - return Promise.resolve(""); - } - } - Object.setPrototypeOf(StubRequest.prototype, globalThis.Request.prototype); - return StubRequest; -})(); -export { StubRequest as t }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/_types.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/_types.d.mts deleted file mode 100644 index bc1859c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/_types.d.mts +++ /dev/null @@ -1,23 +0,0 @@ -import { a as Hooks } from "./adapter.mjs"; -import { n as BunOptions } from "./bun.mjs"; -import { n as BunnyOptions } from "./bunny.mjs"; -import { n as CloudflareOptions } from "./cloudflare.mjs"; -import { n as DenoOptions } from "./deno.mjs"; -import { n as NodeOptions } from "./node.mjs"; -import { n as SSEOptions } from "./sse.mjs"; -import { Server, ServerOptions, ServerPlugin, ServerRequest } from "srvx"; -type WSOptions = Partial & { - resolve?: (req: ServerRequest) => Partial | Promise>; - options?: { - bun?: BunOptions; - bunny?: BunnyOptions; - deno?: DenoOptions; - node?: NodeOptions; - sse?: SSEOptions; - cloudflare?: CloudflareOptions; - }; -}; -type ServerWithWSOptions = ServerOptions & { - websocket?: WSOptions; -}; -export { WSOptions as n, ServerWithWSOptions as t }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/adapter.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/adapter.d.mts deleted file mode 100644 index 7360741..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/adapter.d.mts +++ /dev/null @@ -1,166 +0,0 @@ -import { a as WebSocket } from "./web.mjs"; -declare class WSError extends Error { - constructor(...args: any[]); -} -declare const kNodeInspect: unique symbol; -interface PeerContext extends Record {} -interface AdapterInternal { - ws: unknown; - request: Request; - namespace: string; - peers?: Set; - context?: PeerContext; -} -declare abstract class Peer { - #private; - protected _internal: Internal; - protected _topics: Set; - protected _id?: string; - constructor(internal: Internal); - get context(): PeerContext; - get namespace(): string; - /** - * Unique random [uuid v4](https://developer.mozilla.org/en-US/docs/Glossary/UUID) identifier for the peer. - */ - get id(): string; - /** IP address of the peer */ - get remoteAddress(): string | undefined; - /** upgrade request */ - get request(): Request; - /** - * Get the [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) instance. - * - * **Note:** crossws adds polyfill for the following properties if native values are not available: - * - `protocol`: Extracted from the `sec-websocket-protocol` header. - * - `extensions`: Extracted from the `sec-websocket-extensions` header. - * - `url`: Extracted from the request URL (http -> ws). - * */ - get websocket(): Partial; - /** All connected peers to the server */ - get peers(): Set; - /** All topics, this peer has been subscribed to. */ - get topics(): Set; - abstract close(code?: number, reason?: string): void; - /** Abruptly close the connection */ - terminate(): void; - /** Subscribe to a topic */ - subscribe(topic: string): void; - /** Unsubscribe from a topic */ - unsubscribe(topic: string): void; - /** Send a message to the peer. */ - abstract send(data: unknown, options?: { - compress?: boolean; - }): number | void | undefined; - /** Send message to subscribes of topic */ - abstract publish(topic: string, data: unknown, options?: { - compress?: boolean; - }): void; - toString(): string; - [Symbol.toPrimitive](): string; - [Symbol.toStringTag](): "WebSocket"; - [kNodeInspect](): unknown; -} -declare class Message implements Partial { - #private; - /** Access to the original [message event](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/message_event) if available. */ - readonly event?: MessageEvent; - /** Access to the Peer that emitted the message. */ - readonly peer?: Peer; - /** Raw message data (can be of any type). */ - readonly rawData: unknown; - constructor(rawData: unknown, peer: Peer, event?: MessageEvent); - /** - * Unique random [uuid v4](https://developer.mozilla.org/en-US/docs/Glossary/UUID) identifier for the message. - */ - get id(): string; - /** - * Get data as [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) value. - * - * If raw data is in any other format or string, it will be automatically converted and encoded. - */ - uint8Array(): Uint8Array; - /** - * Get data as [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) value. - * - * If raw data is in any other format or string, it will be automatically converted and encoded. - */ - arrayBuffer(): ArrayBuffer | SharedArrayBuffer; - /** - * Get data as [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) value. - * - * If raw data is in any other format or string, it will be automatically converted and encoded. */ - blob(): Blob; - /** - * Get stringified text version of the message. - * - * If raw data is in any other format, it will be automatically converted and decoded. - */ - text(): string; - /** - * Get parsed version of the message text with [`JSON.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). - */ - json(): T; - /** - * Message data (value varies based on `peer.websocket.binaryType`). - */ - get data(): unknown; - toString(): string; - [Symbol.toPrimitive](): string; - [kNodeInspect](): unknown; -} -declare function defineHooks = Partial>(hooks: T): T; -type ResolveHooks = (request: Request & { - readonly context?: PeerContext; -}) => Partial | Promise>; -type MaybePromise = T | Promise; -interface Hooks { - /** - * Upgrading a request to a WebSocket connection. - * - * - You can throw a Response to abort the upgrade. - * - You can return { headers } to modify the response. - * - You can return { namespace } to change the pub/sub namespace. - * - You can return { context } to provide a custom peer context. - * - You can return { handled: true } to signal that the upgrade has - * already been performed by the hook (e.g. delegated to an external - * node-style `(req, socket, head)` handler). The adapter will then - * leave the socket alone and skip its own upgrade. - * - * @param request - * @throws {Response} - */ - upgrade: (request: Request & { - readonly context?: Record; - }) => MaybePromise<{ - headers?: HeadersInit; - namespace?: string; - context?: PeerContext; - handled?: boolean; - } | Response | void>; - /** A message is received */ - message: (peer: Peer, message: Message) => MaybePromise; - /** A socket is opened */ - open: (peer: Peer) => MaybePromise; - /** A socket is closed */ - close: (peer: Peer, details: { - code?: number; - reason?: string; - }) => MaybePromise; - /** An error occurs */ - error: (peer: Peer, error: WSError) => MaybePromise; -} -interface AdapterInstance { - readonly peers: Map>; - readonly publish: (topic: string, data: unknown, options?: { - compress?: boolean; - namespace?: string; - }) => void; -} -interface AdapterOptions { - resolve?: ResolveHooks; - getNamespace?: (request: Request) => string; - hooks?: Partial; -} -type Adapter = (options?: Options) => AdapterT; -declare function defineWebSocketAdapter(factory: Adapter): Adapter; -export { Hooks as a, Message as c, PeerContext as d, WSError as f, defineWebSocketAdapter as i, AdapterInternal as l, AdapterInstance as n, ResolveHooks as o, AdapterOptions as r, defineHooks as s, Adapter as t, Peer as u }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/adapter.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/adapter.mjs deleted file mode 100644 index 995209b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/adapter.mjs +++ /dev/null @@ -1,92 +0,0 @@ -var AdapterHookable = class { - options; - constructor(options) { - this.options = options || {}; - } - callHook(name, arg1, arg2) { - const globalHook = this.options.hooks?.[name]; - const globalPromise = globalHook?.(arg1, arg2); - const request = arg1.request || arg1; - const resolveHooksPromise = this.options.resolve?.(request); - if (!resolveHooksPromise) return globalPromise; - const resolvePromise = resolveHooksPromise instanceof Promise ? resolveHooksPromise.then((hooks) => hooks?.[name]) : resolveHooksPromise?.[name]; - return Promise.all([globalPromise, resolvePromise]).then(([globalRes, hook]) => { - const hookResPromise = hook?.(arg1, arg2); - return hookResPromise instanceof Promise ? hookResPromise.then((hookRes) => hookRes || globalRes) : hookResPromise || globalRes; - }); - } - async upgrade(request) { - let namespace = this.options.getNamespace?.(request) ?? new URL(request.url).pathname; - const context = request.context || {}; - try { - const res = await this.callHook("upgrade", request); - if (!res) return { - context, - namespace - }; - if (res.namespace) namespace = res.namespace; - if (res.context) Object.assign(context, res.context); - if (res instanceof Response) return { - context, - namespace, - endResponse: res - }; - if (res.handled) return { - context, - namespace, - handled: true - }; - if (res.headers) return { - context, - namespace, - upgradeHeaders: res.headers - }; - } catch (error) { - const errResponse = error.response || error; - if (errResponse instanceof Response) return { - context, - namespace, - endResponse: errResponse - }; - throw error; - } - return { - context, - namespace - }; - } -}; -function defineHooks(hooks) { - return hooks; -} -function adapterUtils(globalPeers) { - return { - peers: globalPeers, - publish(topic, message, options) { - for (const peers of options?.namespace ? [globalPeers.get(options.namespace) || []] : globalPeers.values()) { - let firstPeerWithTopic; - for (const peer of peers) if (peer.topics.has(topic)) { - firstPeerWithTopic = peer; - break; - } - if (firstPeerWithTopic) { - firstPeerWithTopic.send(message, options); - firstPeerWithTopic.publish(topic, message, options); - } - } - } - }; -} -function getPeers(globalPeers, namespace) { - if (!namespace) throw new Error("Websocket publish namespace missing."); - let peers = globalPeers.get(namespace); - if (!peers) { - peers = /* @__PURE__ */ new Set(); - globalPeers.set(namespace, peers); - } - return peers; -} -function defineWebSocketAdapter(factory) { - return factory; -} -export { defineHooks as a, AdapterHookable as i, defineWebSocketAdapter as n, getPeers as r, adapterUtils as t }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/bun.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/bun.d.mts deleted file mode 100644 index 7834ff6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/bun.d.mts +++ /dev/null @@ -1,35 +0,0 @@ -import { d as PeerContext, n as AdapterInstance, r as AdapterOptions, t as Adapter, u as Peer } from "./adapter.mjs"; -import { Server, ServerWebSocket, WebSocketHandler } from "bun"; -interface BunAdapter extends AdapterInstance { - websocket: WebSocketHandler; - handleUpgrade(req: Request, server: Server): Promise; -} -interface BunOptions extends AdapterOptions {} -type ContextData = { - peer?: BunPeer; - namespace: string; - request: Request; - server?: Server; - context: PeerContext; -}; -declare const bunAdapter: Adapter; -declare class BunPeer extends Peer<{ - ws: ServerWebSocket; - namespace: string; - request: Request; - peers: Set; -}> { - get remoteAddress(): string; - get context(): PeerContext; - send(data: unknown, options?: { - compress?: boolean; - }): number; - publish(topic: string, data: unknown, options?: { - compress?: boolean; - }): number; - subscribe(topic: string): void; - unsubscribe(topic: string): void; - close(code?: number, reason?: string): void; - terminate(): void; -} -export { BunOptions as n, bunAdapter as r, BunAdapter as t }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/bunny.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/bunny.d.mts deleted file mode 100644 index 39baa73..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/bunny.d.mts +++ /dev/null @@ -1,22 +0,0 @@ -import { n as AdapterInstance, r as AdapterOptions, t as Adapter } from "./adapter.mjs"; -interface BunnyAdapter extends AdapterInstance { - handleUpgrade(req: Request): Promise; -} -interface BunnyOptions extends AdapterOptions { - /** - * The WebSocket subprotocol to use for the connection. - */ - protocol?: string; - /** - * The number of seconds to wait for a pong response before closing the connection. - * If the client does not respond within this timeout, the connection is deemed - * unhealthy and closed, emitting the close and error events. - * If no data is transmitted from the client for 2 minutes, the connection - * will be closed regardless of this configuration. - * - * @default 30 - */ - idleTimeout?: number; -} -declare const bunnyAdapter: Adapter; -export { BunnyOptions as n, bunnyAdapter as r, BunnyAdapter as t }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/cloudflare.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/cloudflare.d.mts deleted file mode 100644 index 86621e6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/cloudflare.d.mts +++ /dev/null @@ -1,42 +0,0 @@ -import { n as AdapterInstance, r as AdapterOptions, t as Adapter } from "./adapter.mjs"; -import { a as WebSocket$1 } from "./web.mjs"; -import { DurableObject } from "cloudflare:workers"; -import * as CF from "@cloudflare/workers-types"; -type WSDurableObjectStub = CF.DurableObjectStub & { - webSocketPublish?: (topic: string, data: unknown, opts: any) => Promise; -}; -type ResolveDurableStub = (req: CF.Request | undefined, env: unknown, context: CF.ExecutionContext | undefined) => WSDurableObjectStub | undefined | Promise; -interface CloudflareOptions extends AdapterOptions { - /** - * Durable Object binding name from environment. - * - * **Note:** This option will be ignored if `resolveDurableStub` is provided. - * - * @default "$DurableObject" - */ - bindingName?: string; - /** - * Durable Object instance name. - * - * **Note:** This option will be ignored if `resolveDurableStub` is provided. - * - * @default "crossws" - */ - instanceName?: string; - /** - * Custom function that resolves Durable Object binding to handle the WebSocket upgrade. - * - * **Note:** This option will override `bindingName` and `instanceName`. - */ - resolveDurableStub?: ResolveDurableStub; -} -declare const cloudflareAdapter: Adapter; -interface CloudflareDurableAdapter extends AdapterInstance { - handleUpgrade(req: Request | CF.Request, env: unknown, context: CF.ExecutionContext): Promise; - handleDurableInit(obj: DurableObject, state: DurableObjectState, env: unknown): void; - handleDurableUpgrade(obj: DurableObject, req: Request | CF.Request): Promise; - handleDurableMessage(obj: DurableObject, ws: WebSocket | CF.WebSocket | WebSocket$1, message: ArrayBuffer | string): Promise; - handleDurablePublish: (obj: DurableObject, topic: string, data: unknown, opts: any) => Promise; - handleDurableClose(obj: DurableObject, ws: WebSocket | CF.WebSocket | WebSocket$1, code: number, reason: string, wasClean: boolean): Promise; -} -export { CloudflareOptions as n, cloudflareAdapter as r, CloudflareDurableAdapter as t }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/deno.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/deno.d.mts deleted file mode 100644 index bdd79a9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/deno.d.mts +++ /dev/null @@ -1,14 +0,0 @@ -import { n as AdapterInstance, r as AdapterOptions, t as Adapter } from "./adapter.mjs"; -interface DenoAdapter extends AdapterInstance { - handleUpgrade(req: Request, info: ServeHandlerInfo): Promise; -} -interface DenoOptions extends AdapterOptions {} -type ServeHandlerInfo = { - remoteAddr?: { - transport: string; - hostname: string; - port: number; - }; -}; -declare const denoAdapter: Adapter; -export { DenoOptions as n, denoAdapter as r, DenoAdapter as t }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/error.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/error.mjs deleted file mode 100644 index de783f0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/error.mjs +++ /dev/null @@ -1,7 +0,0 @@ -var WSError = class extends Error { - constructor(...args) { - super(...args); - this.name = "WSError"; - } -}; -export { WSError as t }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/libs/ws.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/libs/ws.mjs deleted file mode 100644 index dcc0112..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/libs/ws.mjs +++ /dev/null @@ -1,2429 +0,0 @@ -import { n as __require, r as __toESM, t as __commonJSMin } from "../rolldown-runtime.mjs"; -var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const BINARY_TYPES = [ - "nodebuffer", - "arraybuffer", - "fragments" - ]; - const hasBlob = typeof Blob !== "undefined"; - if (hasBlob) BINARY_TYPES.push("blob"); - module.exports = { - BINARY_TYPES, - CLOSE_TIMEOUT: 3e4, - EMPTY_BUFFER: Buffer.alloc(0), - GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11", - hasBlob, - kForOnEventAttribute: Symbol("kIsForOnEventAttribute"), - kListener: Symbol("kListener"), - kStatusCode: Symbol("status-code"), - kWebSocket: Symbol("websocket"), - NOOP: () => {} - }; -})); -var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { EMPTY_BUFFER } = require_constants(); - const FastBuffer = Buffer[Symbol.species]; - function concat(list, totalLength) { - if (list.length === 0) return EMPTY_BUFFER; - if (list.length === 1) return list[0]; - const target = Buffer.allocUnsafe(totalLength); - let offset = 0; - for (let i = 0; i < list.length; i++) { - const buf = list[i]; - target.set(buf, offset); - offset += buf.length; - } - if (offset < totalLength) return new FastBuffer(target.buffer, target.byteOffset, offset); - return target; - } - function _mask(source, mask, output, offset, length) { - for (let i = 0; i < length; i++) output[offset + i] = source[i] ^ mask[i & 3]; - } - function _unmask(buffer, mask) { - for (let i = 0; i < buffer.length; i++) buffer[i] ^= mask[i & 3]; - } - function toArrayBuffer(buf) { - if (buf.length === buf.buffer.byteLength) return buf.buffer; - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length); - } - function toBuffer(data) { - toBuffer.readOnly = true; - if (Buffer.isBuffer(data)) return data; - let buf; - if (data instanceof ArrayBuffer) buf = new FastBuffer(data); - else if (ArrayBuffer.isView(data)) buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength); - else { - buf = Buffer.from(data); - toBuffer.readOnly = false; - } - return buf; - } - module.exports = { - concat, - mask: _mask, - toArrayBuffer, - toBuffer, - unmask: _unmask - }; - if (!process.env.WS_NO_BUFFER_UTIL) try { - const bufferUtil = __require("bufferutil"); - module.exports.mask = function(source, mask, output, offset, length) { - if (length < 48) _mask(source, mask, output, offset, length); - else bufferUtil.mask(source, mask, output, offset, length); - }; - module.exports.unmask = function(buffer, mask) { - if (buffer.length < 32) _unmask(buffer, mask); - else bufferUtil.unmask(buffer, mask); - }; - } catch (e) {} -})); -var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const kDone = Symbol("kDone"); - const kRun = Symbol("kRun"); - var Limiter = class { - constructor(concurrency) { - this[kDone] = () => { - this.pending--; - this[kRun](); - }; - this.concurrency = concurrency || Infinity; - this.jobs = []; - this.pending = 0; - } - add(job) { - this.jobs.push(job); - this[kRun](); - } - [kRun]() { - if (this.pending === this.concurrency) return; - if (this.jobs.length) { - const job = this.jobs.shift(); - this.pending++; - job(this[kDone]); - } - } - }; - module.exports = Limiter; -})); -var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const zlib = __require("zlib"); - const bufferUtil = require_buffer_util(); - const Limiter = require_limiter(); - const { kStatusCode } = require_constants(); - const FastBuffer = Buffer[Symbol.species]; - const TRAILER = Buffer.from([ - 0, - 0, - 255, - 255 - ]); - const kPerMessageDeflate = Symbol("permessage-deflate"); - const kTotalLength = Symbol("total-length"); - const kCallback = Symbol("callback"); - const kBuffers = Symbol("buffers"); - const kError = Symbol("error"); - let zlibLimiter; - var PerMessageDeflate = class { - constructor(options) { - this._options = options || {}; - this._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024; - this._maxPayload = this._options.maxPayload | 0; - this._isServer = !!this._options.isServer; - this._deflate = null; - this._inflate = null; - this.params = null; - if (!zlibLimiter) zlibLimiter = new Limiter(this._options.concurrencyLimit !== void 0 ? this._options.concurrencyLimit : 10); - } - static get extensionName() { - return "permessage-deflate"; - } - offer() { - const params = {}; - if (this._options.serverNoContextTakeover) params.server_no_context_takeover = true; - if (this._options.clientNoContextTakeover) params.client_no_context_takeover = true; - if (this._options.serverMaxWindowBits) params.server_max_window_bits = this._options.serverMaxWindowBits; - if (this._options.clientMaxWindowBits) params.client_max_window_bits = this._options.clientMaxWindowBits; - else if (this._options.clientMaxWindowBits == null) params.client_max_window_bits = true; - return params; - } - accept(configurations) { - configurations = this.normalizeParams(configurations); - this.params = this._isServer ? this.acceptAsServer(configurations) : this.acceptAsClient(configurations); - return this.params; - } - cleanup() { - if (this._inflate) { - this._inflate.close(); - this._inflate = null; - } - if (this._deflate) { - const callback = this._deflate[kCallback]; - this._deflate.close(); - this._deflate = null; - if (callback) callback(/* @__PURE__ */ new Error("The deflate stream was closed while data was being processed")); - } - } - acceptAsServer(offers) { - const opts = this._options; - const accepted = offers.find((params) => { - if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && !params.client_max_window_bits) return false; - return true; - }); - if (!accepted) throw new Error("None of the extension offers can be accepted"); - if (opts.serverNoContextTakeover) accepted.server_no_context_takeover = true; - if (opts.clientNoContextTakeover) accepted.client_no_context_takeover = true; - if (typeof opts.serverMaxWindowBits === "number") accepted.server_max_window_bits = opts.serverMaxWindowBits; - if (typeof opts.clientMaxWindowBits === "number") accepted.client_max_window_bits = opts.clientMaxWindowBits; - else if (accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false) delete accepted.client_max_window_bits; - return accepted; - } - acceptAsClient(response) { - const params = response[0]; - if (this._options.clientNoContextTakeover === false && params.client_no_context_takeover) throw new Error("Unexpected parameter \"client_no_context_takeover\""); - if (!params.client_max_window_bits) { - if (typeof this._options.clientMaxWindowBits === "number") params.client_max_window_bits = this._options.clientMaxWindowBits; - } else if (this._options.clientMaxWindowBits === false || typeof this._options.clientMaxWindowBits === "number" && params.client_max_window_bits > this._options.clientMaxWindowBits) throw new Error("Unexpected or invalid parameter \"client_max_window_bits\""); - return params; - } - normalizeParams(configurations) { - configurations.forEach((params) => { - Object.keys(params).forEach((key) => { - let value = params[key]; - if (value.length > 1) throw new Error(`Parameter "${key}" must have only a single value`); - value = value[0]; - if (key === "client_max_window_bits") { - if (value !== true) { - const num = +value; - if (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter "${key}": ${value}`); - value = num; - } else if (!this._isServer) throw new TypeError(`Invalid value for parameter "${key}": ${value}`); - } else if (key === "server_max_window_bits") { - const num = +value; - if (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter "${key}": ${value}`); - value = num; - } else if (key === "client_no_context_takeover" || key === "server_no_context_takeover") { - if (value !== true) throw new TypeError(`Invalid value for parameter "${key}": ${value}`); - } else throw new Error(`Unknown parameter "${key}"`); - params[key] = value; - }); - }); - return configurations; - } - decompress(data, fin, callback) { - zlibLimiter.add((done) => { - this._decompress(data, fin, (err, result) => { - done(); - callback(err, result); - }); - }); - } - compress(data, fin, callback) { - zlibLimiter.add((done) => { - this._compress(data, fin, (err, result) => { - done(); - callback(err, result); - }); - }); - } - _decompress(data, fin, callback) { - const endpoint = this._isServer ? "client" : "server"; - if (!this._inflate) { - const key = `${endpoint}_max_window_bits`; - const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key]; - this._inflate = zlib.createInflateRaw({ - ...this._options.zlibInflateOptions, - windowBits - }); - this._inflate[kPerMessageDeflate] = this; - this._inflate[kTotalLength] = 0; - this._inflate[kBuffers] = []; - this._inflate.on("error", inflateOnError); - this._inflate.on("data", inflateOnData); - } - this._inflate[kCallback] = callback; - this._inflate.write(data); - if (fin) this._inflate.write(TRAILER); - this._inflate.flush(() => { - const err = this._inflate[kError]; - if (err) { - this._inflate.close(); - this._inflate = null; - callback(err); - return; - } - const data = bufferUtil.concat(this._inflate[kBuffers], this._inflate[kTotalLength]); - if (this._inflate._readableState.endEmitted) { - this._inflate.close(); - this._inflate = null; - } else { - this._inflate[kTotalLength] = 0; - this._inflate[kBuffers] = []; - if (fin && this.params[`${endpoint}_no_context_takeover`]) this._inflate.reset(); - } - callback(null, data); - }); - } - _compress(data, fin, callback) { - const endpoint = this._isServer ? "server" : "client"; - if (!this._deflate) { - const key = `${endpoint}_max_window_bits`; - const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key]; - this._deflate = zlib.createDeflateRaw({ - ...this._options.zlibDeflateOptions, - windowBits - }); - this._deflate[kTotalLength] = 0; - this._deflate[kBuffers] = []; - this._deflate.on("data", deflateOnData); - } - this._deflate[kCallback] = callback; - this._deflate.write(data); - this._deflate.flush(zlib.Z_SYNC_FLUSH, () => { - if (!this._deflate) return; - let data = bufferUtil.concat(this._deflate[kBuffers], this._deflate[kTotalLength]); - if (fin) data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4); - this._deflate[kCallback] = null; - this._deflate[kTotalLength] = 0; - this._deflate[kBuffers] = []; - if (fin && this.params[`${endpoint}_no_context_takeover`]) this._deflate.reset(); - callback(null, data); - }); - } - }; - module.exports = PerMessageDeflate; - function deflateOnData(chunk) { - this[kBuffers].push(chunk); - this[kTotalLength] += chunk.length; - } - function inflateOnData(chunk) { - this[kTotalLength] += chunk.length; - if (this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload) { - this[kBuffers].push(chunk); - return; - } - this[kError] = /* @__PURE__ */ new RangeError("Max payload size exceeded"); - this[kError].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"; - this[kError][kStatusCode] = 1009; - this.removeListener("data", inflateOnData); - this.reset(); - } - function inflateOnError(err) { - this[kPerMessageDeflate]._inflate = null; - if (this[kError]) { - this[kCallback](this[kError]); - return; - } - err[kStatusCode] = 1007; - this[kCallback](err); - } -})); -var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { isUtf8 } = __require("buffer"); - const { hasBlob } = require_constants(); - const tokenChars = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 1, - 1, - 0, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 0, - 1, - 0 - ]; - function isValidStatusCode(code) { - return code >= 1e3 && code <= 1014 && code !== 1004 && code !== 1005 && code !== 1006 || code >= 3e3 && code <= 4999; - } - function _isValidUTF8(buf) { - const len = buf.length; - let i = 0; - while (i < len) if ((buf[i] & 128) === 0) i++; - else if ((buf[i] & 224) === 192) { - if (i + 1 === len || (buf[i + 1] & 192) !== 128 || (buf[i] & 254) === 192) return false; - i += 2; - } else if ((buf[i] & 240) === 224) { - if (i + 2 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || buf[i] === 224 && (buf[i + 1] & 224) === 128 || buf[i] === 237 && (buf[i + 1] & 224) === 160) return false; - i += 3; - } else if ((buf[i] & 248) === 240) { - if (i + 3 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || (buf[i + 3] & 192) !== 128 || buf[i] === 240 && (buf[i + 1] & 240) === 128 || buf[i] === 244 && buf[i + 1] > 143 || buf[i] > 244) return false; - i += 4; - } else return false; - return true; - } - function isBlob(value) { - return hasBlob && typeof value === "object" && typeof value.arrayBuffer === "function" && typeof value.type === "string" && typeof value.stream === "function" && (value[Symbol.toStringTag] === "Blob" || value[Symbol.toStringTag] === "File"); - } - module.exports = { - isBlob, - isValidStatusCode, - isValidUTF8: _isValidUTF8, - tokenChars - }; - if (isUtf8) module.exports.isValidUTF8 = function(buf) { - return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf); - }; - else if (!process.env.WS_NO_UTF_8_VALIDATE) try { - const isValidUTF8 = __require("utf-8-validate"); - module.exports.isValidUTF8 = function(buf) { - return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf); - }; - } catch (e) {} -})); -var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { Writable } = __require("stream"); - const PerMessageDeflate = require_permessage_deflate(); - const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } = require_constants(); - const { concat, toArrayBuffer, unmask } = require_buffer_util(); - const { isValidStatusCode, isValidUTF8 } = require_validation(); - const FastBuffer = Buffer[Symbol.species]; - const GET_INFO = 0; - const GET_PAYLOAD_LENGTH_16 = 1; - const GET_PAYLOAD_LENGTH_64 = 2; - const GET_MASK = 3; - const GET_DATA = 4; - const INFLATING = 5; - const DEFER_EVENT = 6; - var Receiver = class extends Writable { - constructor(options = {}) { - super(); - this._allowSynchronousEvents = options.allowSynchronousEvents !== void 0 ? options.allowSynchronousEvents : true; - this._binaryType = options.binaryType || BINARY_TYPES[0]; - this._extensions = options.extensions || {}; - this._isServer = !!options.isServer; - this._maxPayload = options.maxPayload | 0; - this._skipUTF8Validation = !!options.skipUTF8Validation; - this[kWebSocket] = void 0; - this._bufferedBytes = 0; - this._buffers = []; - this._compressed = false; - this._payloadLength = 0; - this._mask = void 0; - this._fragmented = 0; - this._masked = false; - this._fin = false; - this._opcode = 0; - this._totalPayloadLength = 0; - this._messageLength = 0; - this._fragments = []; - this._errored = false; - this._loop = false; - this._state = GET_INFO; - } - _write(chunk, encoding, cb) { - if (this._opcode === 8 && this._state == GET_INFO) return cb(); - this._bufferedBytes += chunk.length; - this._buffers.push(chunk); - this.startLoop(cb); - } - consume(n) { - this._bufferedBytes -= n; - if (n === this._buffers[0].length) return this._buffers.shift(); - if (n < this._buffers[0].length) { - const buf = this._buffers[0]; - this._buffers[0] = new FastBuffer(buf.buffer, buf.byteOffset + n, buf.length - n); - return new FastBuffer(buf.buffer, buf.byteOffset, n); - } - const dst = Buffer.allocUnsafe(n); - do { - const buf = this._buffers[0]; - const offset = dst.length - n; - if (n >= buf.length) dst.set(this._buffers.shift(), offset); - else { - dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset); - this._buffers[0] = new FastBuffer(buf.buffer, buf.byteOffset + n, buf.length - n); - } - n -= buf.length; - } while (n > 0); - return dst; - } - startLoop(cb) { - this._loop = true; - do - switch (this._state) { - case GET_INFO: - this.getInfo(cb); - break; - case GET_PAYLOAD_LENGTH_16: - this.getPayloadLength16(cb); - break; - case GET_PAYLOAD_LENGTH_64: - this.getPayloadLength64(cb); - break; - case GET_MASK: - this.getMask(); - break; - case GET_DATA: - this.getData(cb); - break; - case INFLATING: - case DEFER_EVENT: - this._loop = false; - return; - } - while (this._loop); - if (!this._errored) cb(); - } - getInfo(cb) { - if (this._bufferedBytes < 2) { - this._loop = false; - return; - } - const buf = this.consume(2); - if ((buf[0] & 48) !== 0) { - cb(this.createError(RangeError, "RSV2 and RSV3 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_2_3")); - return; - } - const compressed = (buf[0] & 64) === 64; - if (compressed && !this._extensions[PerMessageDeflate.extensionName]) { - cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1")); - return; - } - this._fin = (buf[0] & 128) === 128; - this._opcode = buf[0] & 15; - this._payloadLength = buf[1] & 127; - if (this._opcode === 0) { - if (compressed) { - cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1")); - return; - } - if (!this._fragmented) { - cb(this.createError(RangeError, "invalid opcode 0", true, 1002, "WS_ERR_INVALID_OPCODE")); - return; - } - this._opcode = this._fragmented; - } else if (this._opcode === 1 || this._opcode === 2) { - if (this._fragmented) { - cb(this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, "WS_ERR_INVALID_OPCODE")); - return; - } - this._compressed = compressed; - } else if (this._opcode > 7 && this._opcode < 11) { - if (!this._fin) { - cb(this.createError(RangeError, "FIN must be set", true, 1002, "WS_ERR_EXPECTED_FIN")); - return; - } - if (compressed) { - cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1")); - return; - } - if (this._payloadLength > 125 || this._opcode === 8 && this._payloadLength === 1) { - cb(this.createError(RangeError, `invalid payload length ${this._payloadLength}`, true, 1002, "WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")); - return; - } - } else { - cb(this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, "WS_ERR_INVALID_OPCODE")); - return; - } - if (!this._fin && !this._fragmented) this._fragmented = this._opcode; - this._masked = (buf[1] & 128) === 128; - if (this._isServer) { - if (!this._masked) { - cb(this.createError(RangeError, "MASK must be set", true, 1002, "WS_ERR_EXPECTED_MASK")); - return; - } - } else if (this._masked) { - cb(this.createError(RangeError, "MASK must be clear", true, 1002, "WS_ERR_UNEXPECTED_MASK")); - return; - } - if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16; - else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64; - else this.haveLength(cb); - } - getPayloadLength16(cb) { - if (this._bufferedBytes < 2) { - this._loop = false; - return; - } - this._payloadLength = this.consume(2).readUInt16BE(0); - this.haveLength(cb); - } - getPayloadLength64(cb) { - if (this._bufferedBytes < 8) { - this._loop = false; - return; - } - const buf = this.consume(8); - const num = buf.readUInt32BE(0); - if (num > Math.pow(2, 21) - 1) { - cb(this.createError(RangeError, "Unsupported WebSocket frame: payload length > 2^53 - 1", false, 1009, "WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")); - return; - } - this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4); - this.haveLength(cb); - } - haveLength(cb) { - if (this._payloadLength && this._opcode < 8) { - this._totalPayloadLength += this._payloadLength; - if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) { - cb(this.createError(RangeError, "Max payload size exceeded", false, 1009, "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")); - return; - } - } - if (this._masked) this._state = GET_MASK; - else this._state = GET_DATA; - } - getMask() { - if (this._bufferedBytes < 4) { - this._loop = false; - return; - } - this._mask = this.consume(4); - this._state = GET_DATA; - } - getData(cb) { - let data = EMPTY_BUFFER; - if (this._payloadLength) { - if (this._bufferedBytes < this._payloadLength) { - this._loop = false; - return; - } - data = this.consume(this._payloadLength); - if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) unmask(data, this._mask); - } - if (this._opcode > 7) { - this.controlMessage(data, cb); - return; - } - if (this._compressed) { - this._state = INFLATING; - this.decompress(data, cb); - return; - } - if (data.length) { - this._messageLength = this._totalPayloadLength; - this._fragments.push(data); - } - this.dataMessage(cb); - } - decompress(data, cb) { - this._extensions[PerMessageDeflate.extensionName].decompress(data, this._fin, (err, buf) => { - if (err) return cb(err); - if (buf.length) { - this._messageLength += buf.length; - if (this._messageLength > this._maxPayload && this._maxPayload > 0) { - cb(this.createError(RangeError, "Max payload size exceeded", false, 1009, "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")); - return; - } - this._fragments.push(buf); - } - this.dataMessage(cb); - if (this._state === GET_INFO) this.startLoop(cb); - }); - } - dataMessage(cb) { - if (!this._fin) { - this._state = GET_INFO; - return; - } - const messageLength = this._messageLength; - const fragments = this._fragments; - this._totalPayloadLength = 0; - this._messageLength = 0; - this._fragmented = 0; - this._fragments = []; - if (this._opcode === 2) { - let data; - if (this._binaryType === "nodebuffer") data = concat(fragments, messageLength); - else if (this._binaryType === "arraybuffer") data = toArrayBuffer(concat(fragments, messageLength)); - else if (this._binaryType === "blob") data = new Blob(fragments); - else data = fragments; - if (this._allowSynchronousEvents) { - this.emit("message", data, true); - this._state = GET_INFO; - } else { - this._state = DEFER_EVENT; - setImmediate(() => { - this.emit("message", data, true); - this._state = GET_INFO; - this.startLoop(cb); - }); - } - } else { - const buf = concat(fragments, messageLength); - if (!this._skipUTF8Validation && !isValidUTF8(buf)) { - cb(this.createError(Error, "invalid UTF-8 sequence", true, 1007, "WS_ERR_INVALID_UTF8")); - return; - } - if (this._state === INFLATING || this._allowSynchronousEvents) { - this.emit("message", buf, false); - this._state = GET_INFO; - } else { - this._state = DEFER_EVENT; - setImmediate(() => { - this.emit("message", buf, false); - this._state = GET_INFO; - this.startLoop(cb); - }); - } - } - } - controlMessage(data, cb) { - if (this._opcode === 8) { - if (data.length === 0) { - this._loop = false; - this.emit("conclude", 1005, EMPTY_BUFFER); - this.end(); - } else { - const code = data.readUInt16BE(0); - if (!isValidStatusCode(code)) { - cb(this.createError(RangeError, `invalid status code ${code}`, true, 1002, "WS_ERR_INVALID_CLOSE_CODE")); - return; - } - const buf = new FastBuffer(data.buffer, data.byteOffset + 2, data.length - 2); - if (!this._skipUTF8Validation && !isValidUTF8(buf)) { - cb(this.createError(Error, "invalid UTF-8 sequence", true, 1007, "WS_ERR_INVALID_UTF8")); - return; - } - this._loop = false; - this.emit("conclude", code, buf); - this.end(); - } - this._state = GET_INFO; - return; - } - if (this._allowSynchronousEvents) { - this.emit(this._opcode === 9 ? "ping" : "pong", data); - this._state = GET_INFO; - } else { - this._state = DEFER_EVENT; - setImmediate(() => { - this.emit(this._opcode === 9 ? "ping" : "pong", data); - this._state = GET_INFO; - this.startLoop(cb); - }); - } - } - createError(ErrorCtor, message, prefix, statusCode, errorCode) { - this._loop = false; - this._errored = true; - const err = new ErrorCtor(prefix ? `Invalid WebSocket frame: ${message}` : message); - Error.captureStackTrace(err, this.createError); - err.code = errorCode; - err[kStatusCode] = statusCode; - return err; - } - }; - module.exports = Receiver; -})); -var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { Duplex: Duplex$3 } = __require("stream"); - const { randomFillSync } = __require("crypto"); - const PerMessageDeflate = require_permessage_deflate(); - const { EMPTY_BUFFER, kWebSocket, NOOP } = require_constants(); - const { isBlob, isValidStatusCode } = require_validation(); - const { mask: applyMask, toBuffer } = require_buffer_util(); - const kByteLength = Symbol("kByteLength"); - const maskBuffer = Buffer.alloc(4); - const RANDOM_POOL_SIZE = 8 * 1024; - let randomPool; - let randomPoolPointer = RANDOM_POOL_SIZE; - const DEFAULT = 0; - const DEFLATING = 1; - const GET_BLOB_DATA = 2; - module.exports = class Sender { - constructor(socket, extensions, generateMask) { - this._extensions = extensions || {}; - if (generateMask) { - this._generateMask = generateMask; - this._maskBuffer = Buffer.alloc(4); - } - this._socket = socket; - this._firstFragment = true; - this._compress = false; - this._bufferedBytes = 0; - this._queue = []; - this._state = DEFAULT; - this.onerror = NOOP; - this[kWebSocket] = void 0; - } - static frame(data, options) { - let mask; - let merge = false; - let offset = 2; - let skipMasking = false; - if (options.mask) { - mask = options.maskBuffer || maskBuffer; - if (options.generateMask) options.generateMask(mask); - else { - if (randomPoolPointer === RANDOM_POOL_SIZE) { - if (randomPool === void 0) randomPool = Buffer.alloc(RANDOM_POOL_SIZE); - randomFillSync(randomPool, 0, RANDOM_POOL_SIZE); - randomPoolPointer = 0; - } - mask[0] = randomPool[randomPoolPointer++]; - mask[1] = randomPool[randomPoolPointer++]; - mask[2] = randomPool[randomPoolPointer++]; - mask[3] = randomPool[randomPoolPointer++]; - } - skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0; - offset = 6; - } - let dataLength; - if (typeof data === "string") if ((!options.mask || skipMasking) && options[kByteLength] !== void 0) dataLength = options[kByteLength]; - else { - data = Buffer.from(data); - dataLength = data.length; - } - else { - dataLength = data.length; - merge = options.mask && options.readOnly && !skipMasking; - } - let payloadLength = dataLength; - if (dataLength >= 65536) { - offset += 8; - payloadLength = 127; - } else if (dataLength > 125) { - offset += 2; - payloadLength = 126; - } - const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset); - target[0] = options.fin ? options.opcode | 128 : options.opcode; - if (options.rsv1) target[0] |= 64; - target[1] = payloadLength; - if (payloadLength === 126) target.writeUInt16BE(dataLength, 2); - else if (payloadLength === 127) { - target[2] = target[3] = 0; - target.writeUIntBE(dataLength, 4, 6); - } - if (!options.mask) return [target, data]; - target[1] |= 128; - target[offset - 4] = mask[0]; - target[offset - 3] = mask[1]; - target[offset - 2] = mask[2]; - target[offset - 1] = mask[3]; - if (skipMasking) return [target, data]; - if (merge) { - applyMask(data, mask, target, offset, dataLength); - return [target]; - } - applyMask(data, mask, data, 0, dataLength); - return [target, data]; - } - close(code, data, mask, cb) { - let buf; - if (code === void 0) buf = EMPTY_BUFFER; - else if (typeof code !== "number" || !isValidStatusCode(code)) throw new TypeError("First argument must be a valid error code number"); - else if (data === void 0 || !data.length) { - buf = Buffer.allocUnsafe(2); - buf.writeUInt16BE(code, 0); - } else { - const length = Buffer.byteLength(data); - if (length > 123) throw new RangeError("The message must not be greater than 123 bytes"); - buf = Buffer.allocUnsafe(2 + length); - buf.writeUInt16BE(code, 0); - if (typeof data === "string") buf.write(data, 2); - else buf.set(data, 2); - } - const options = { - [kByteLength]: buf.length, - fin: true, - generateMask: this._generateMask, - mask, - maskBuffer: this._maskBuffer, - opcode: 8, - readOnly: false, - rsv1: false - }; - if (this._state !== DEFAULT) this.enqueue([ - this.dispatch, - buf, - false, - options, - cb - ]); - else this.sendFrame(Sender.frame(buf, options), cb); - } - ping(data, mask, cb) { - let byteLength; - let readOnly; - if (typeof data === "string") { - byteLength = Buffer.byteLength(data); - readOnly = false; - } else if (isBlob(data)) { - byteLength = data.size; - readOnly = false; - } else { - data = toBuffer(data); - byteLength = data.length; - readOnly = toBuffer.readOnly; - } - if (byteLength > 125) throw new RangeError("The data size must not be greater than 125 bytes"); - const options = { - [kByteLength]: byteLength, - fin: true, - generateMask: this._generateMask, - mask, - maskBuffer: this._maskBuffer, - opcode: 9, - readOnly, - rsv1: false - }; - if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([ - this.getBlobData, - data, - false, - options, - cb - ]); - else this.getBlobData(data, false, options, cb); - else if (this._state !== DEFAULT) this.enqueue([ - this.dispatch, - data, - false, - options, - cb - ]); - else this.sendFrame(Sender.frame(data, options), cb); - } - pong(data, mask, cb) { - let byteLength; - let readOnly; - if (typeof data === "string") { - byteLength = Buffer.byteLength(data); - readOnly = false; - } else if (isBlob(data)) { - byteLength = data.size; - readOnly = false; - } else { - data = toBuffer(data); - byteLength = data.length; - readOnly = toBuffer.readOnly; - } - if (byteLength > 125) throw new RangeError("The data size must not be greater than 125 bytes"); - const options = { - [kByteLength]: byteLength, - fin: true, - generateMask: this._generateMask, - mask, - maskBuffer: this._maskBuffer, - opcode: 10, - readOnly, - rsv1: false - }; - if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([ - this.getBlobData, - data, - false, - options, - cb - ]); - else this.getBlobData(data, false, options, cb); - else if (this._state !== DEFAULT) this.enqueue([ - this.dispatch, - data, - false, - options, - cb - ]); - else this.sendFrame(Sender.frame(data, options), cb); - } - send(data, options, cb) { - const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; - let opcode = options.binary ? 2 : 1; - let rsv1 = options.compress; - let byteLength; - let readOnly; - if (typeof data === "string") { - byteLength = Buffer.byteLength(data); - readOnly = false; - } else if (isBlob(data)) { - byteLength = data.size; - readOnly = false; - } else { - data = toBuffer(data); - byteLength = data.length; - readOnly = toBuffer.readOnly; - } - if (this._firstFragment) { - this._firstFragment = false; - if (rsv1 && perMessageDeflate && perMessageDeflate.params[perMessageDeflate._isServer ? "server_no_context_takeover" : "client_no_context_takeover"]) rsv1 = byteLength >= perMessageDeflate._threshold; - this._compress = rsv1; - } else { - rsv1 = false; - opcode = 0; - } - if (options.fin) this._firstFragment = true; - const opts = { - [kByteLength]: byteLength, - fin: options.fin, - generateMask: this._generateMask, - mask: options.mask, - maskBuffer: this._maskBuffer, - opcode, - readOnly, - rsv1 - }; - if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([ - this.getBlobData, - data, - this._compress, - opts, - cb - ]); - else this.getBlobData(data, this._compress, opts, cb); - else if (this._state !== DEFAULT) this.enqueue([ - this.dispatch, - data, - this._compress, - opts, - cb - ]); - else this.dispatch(data, this._compress, opts, cb); - } - getBlobData(blob, compress, options, cb) { - this._bufferedBytes += options[kByteLength]; - this._state = GET_BLOB_DATA; - blob.arrayBuffer().then((arrayBuffer) => { - if (this._socket.destroyed) { - const err = /* @__PURE__ */ new Error("The socket was closed while the blob was being read"); - process.nextTick(callCallbacks, this, err, cb); - return; - } - this._bufferedBytes -= options[kByteLength]; - const data = toBuffer(arrayBuffer); - if (!compress) { - this._state = DEFAULT; - this.sendFrame(Sender.frame(data, options), cb); - this.dequeue(); - } else this.dispatch(data, compress, options, cb); - }).catch((err) => { - process.nextTick(onError, this, err, cb); - }); - } - dispatch(data, compress, options, cb) { - if (!compress) { - this.sendFrame(Sender.frame(data, options), cb); - return; - } - const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; - this._bufferedBytes += options[kByteLength]; - this._state = DEFLATING; - perMessageDeflate.compress(data, options.fin, (_, buf) => { - if (this._socket.destroyed) { - callCallbacks(this, /* @__PURE__ */ new Error("The socket was closed while data was being compressed"), cb); - return; - } - this._bufferedBytes -= options[kByteLength]; - this._state = DEFAULT; - options.readOnly = false; - this.sendFrame(Sender.frame(buf, options), cb); - this.dequeue(); - }); - } - dequeue() { - while (this._state === DEFAULT && this._queue.length) { - const params = this._queue.shift(); - this._bufferedBytes -= params[3][kByteLength]; - Reflect.apply(params[0], this, params.slice(1)); - } - } - enqueue(params) { - this._bufferedBytes += params[3][kByteLength]; - this._queue.push(params); - } - sendFrame(list, cb) { - if (list.length === 2) { - this._socket.cork(); - this._socket.write(list[0]); - this._socket.write(list[1], cb); - this._socket.uncork(); - } else this._socket.write(list[0], cb); - } - }; - function callCallbacks(sender, err, cb) { - if (typeof cb === "function") cb(err); - for (let i = 0; i < sender._queue.length; i++) { - const params = sender._queue[i]; - const callback = params[params.length - 1]; - if (typeof callback === "function") callback(err); - } - } - function onError(sender, err, cb) { - callCallbacks(sender, err, cb); - sender.onerror(err); - } -})); -var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { kForOnEventAttribute, kListener } = require_constants(); - const kCode = Symbol("kCode"); - const kData = Symbol("kData"); - const kError = Symbol("kError"); - const kMessage = Symbol("kMessage"); - const kReason = Symbol("kReason"); - const kTarget = Symbol("kTarget"); - const kType = Symbol("kType"); - const kWasClean = Symbol("kWasClean"); - var Event = class { - constructor(type) { - this[kTarget] = null; - this[kType] = type; - } - get target() { - return this[kTarget]; - } - get type() { - return this[kType]; - } - }; - Object.defineProperty(Event.prototype, "target", { enumerable: true }); - Object.defineProperty(Event.prototype, "type", { enumerable: true }); - var CloseEvent = class extends Event { - constructor(type, options = {}) { - super(type); - this[kCode] = options.code === void 0 ? 0 : options.code; - this[kReason] = options.reason === void 0 ? "" : options.reason; - this[kWasClean] = options.wasClean === void 0 ? false : options.wasClean; - } - get code() { - return this[kCode]; - } - get reason() { - return this[kReason]; - } - get wasClean() { - return this[kWasClean]; - } - }; - Object.defineProperty(CloseEvent.prototype, "code", { enumerable: true }); - Object.defineProperty(CloseEvent.prototype, "reason", { enumerable: true }); - Object.defineProperty(CloseEvent.prototype, "wasClean", { enumerable: true }); - var ErrorEvent = class extends Event { - constructor(type, options = {}) { - super(type); - this[kError] = options.error === void 0 ? null : options.error; - this[kMessage] = options.message === void 0 ? "" : options.message; - } - get error() { - return this[kError]; - } - get message() { - return this[kMessage]; - } - }; - Object.defineProperty(ErrorEvent.prototype, "error", { enumerable: true }); - Object.defineProperty(ErrorEvent.prototype, "message", { enumerable: true }); - var MessageEvent = class extends Event { - constructor(type, options = {}) { - super(type); - this[kData] = options.data === void 0 ? null : options.data; - } - get data() { - return this[kData]; - } - }; - Object.defineProperty(MessageEvent.prototype, "data", { enumerable: true }); - module.exports = { - CloseEvent, - ErrorEvent, - Event, - EventTarget: { - addEventListener(type, handler, options = {}) { - for (const listener of this.listeners(type)) if (!options[kForOnEventAttribute] && listener[kListener] === handler && !listener[kForOnEventAttribute]) return; - let wrapper; - if (type === "message") wrapper = function onMessage(data, isBinary) { - const event = new MessageEvent("message", { data: isBinary ? data : data.toString() }); - event[kTarget] = this; - callListener(handler, this, event); - }; - else if (type === "close") wrapper = function onClose(code, message) { - const event = new CloseEvent("close", { - code, - reason: message.toString(), - wasClean: this._closeFrameReceived && this._closeFrameSent - }); - event[kTarget] = this; - callListener(handler, this, event); - }; - else if (type === "error") wrapper = function onError(error) { - const event = new ErrorEvent("error", { - error, - message: error.message - }); - event[kTarget] = this; - callListener(handler, this, event); - }; - else if (type === "open") wrapper = function onOpen() { - const event = new Event("open"); - event[kTarget] = this; - callListener(handler, this, event); - }; - else return; - wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute]; - wrapper[kListener] = handler; - if (options.once) this.once(type, wrapper); - else this.on(type, wrapper); - }, - removeEventListener(type, handler) { - for (const listener of this.listeners(type)) if (listener[kListener] === handler && !listener[kForOnEventAttribute]) { - this.removeListener(type, listener); - break; - } - } - }, - MessageEvent - }; - function callListener(listener, thisArg, event) { - if (typeof listener === "object" && listener.handleEvent) listener.handleEvent.call(listener, event); - else listener.call(thisArg, event); - } -})); -var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { tokenChars } = require_validation(); - function push(dest, name, elem) { - if (dest[name] === void 0) dest[name] = [elem]; - else dest[name].push(elem); - } - function parse(header) { - const offers = Object.create(null); - let params = Object.create(null); - let mustUnescape = false; - let isEscaping = false; - let inQuotes = false; - let extensionName; - let paramName; - let start = -1; - let code = -1; - let end = -1; - let i = 0; - for (; i < header.length; i++) { - code = header.charCodeAt(i); - if (extensionName === void 0) if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (i !== 0 && (code === 32 || code === 9)) { - if (end === -1 && start !== -1) end = i; - } else if (code === 59 || code === 44) { - if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`); - if (end === -1) end = i; - const name = header.slice(start, end); - if (code === 44) { - push(offers, name, params); - params = Object.create(null); - } else extensionName = name; - start = end = -1; - } else throw new SyntaxError(`Unexpected character at index ${i}`); - else if (paramName === void 0) if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (code === 32 || code === 9) { - if (end === -1 && start !== -1) end = i; - } else if (code === 59 || code === 44) { - if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`); - if (end === -1) end = i; - push(params, header.slice(start, end), true); - if (code === 44) { - push(offers, extensionName, params); - params = Object.create(null); - extensionName = void 0; - } - start = end = -1; - } else if (code === 61 && start !== -1 && end === -1) { - paramName = header.slice(start, i); - start = end = -1; - } else throw new SyntaxError(`Unexpected character at index ${i}`); - else if (isEscaping) { - if (tokenChars[code] !== 1) throw new SyntaxError(`Unexpected character at index ${i}`); - if (start === -1) start = i; - else if (!mustUnescape) mustUnescape = true; - isEscaping = false; - } else if (inQuotes) if (tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (code === 34 && start !== -1) { - inQuotes = false; - end = i; - } else if (code === 92) isEscaping = true; - else throw new SyntaxError(`Unexpected character at index ${i}`); - else if (code === 34 && header.charCodeAt(i - 1) === 61) inQuotes = true; - else if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (start !== -1 && (code === 32 || code === 9)) { - if (end === -1) end = i; - } else if (code === 59 || code === 44) { - if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`); - if (end === -1) end = i; - let value = header.slice(start, end); - if (mustUnescape) { - value = value.replace(/\\/g, ""); - mustUnescape = false; - } - push(params, paramName, value); - if (code === 44) { - push(offers, extensionName, params); - params = Object.create(null); - extensionName = void 0; - } - paramName = void 0; - start = end = -1; - } else throw new SyntaxError(`Unexpected character at index ${i}`); - } - if (start === -1 || inQuotes || code === 32 || code === 9) throw new SyntaxError("Unexpected end of input"); - if (end === -1) end = i; - const token = header.slice(start, end); - if (extensionName === void 0) push(offers, token, params); - else { - if (paramName === void 0) push(params, token, true); - else if (mustUnescape) push(params, paramName, token.replace(/\\/g, "")); - else push(params, paramName, token); - push(offers, extensionName, params); - } - return offers; - } - function format(extensions) { - return Object.keys(extensions).map((extension) => { - let configurations = extensions[extension]; - if (!Array.isArray(configurations)) configurations = [configurations]; - return configurations.map((params) => { - return [extension].concat(Object.keys(params).map((k) => { - let values = params[k]; - if (!Array.isArray(values)) values = [values]; - return values.map((v) => v === true ? k : `${k}=${v}`).join("; "); - })).join("; "); - }).join(", "); - }).join(", "); - } - module.exports = { - format, - parse - }; -})); -var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const EventEmitter$1 = __require("events"); - const https = __require("https"); - const http$1 = __require("http"); - const net = __require("net"); - const tls = __require("tls"); - const { randomBytes, createHash: createHash$1 } = __require("crypto"); - const { Duplex: Duplex$2, Readable } = __require("stream"); - const { URL } = __require("url"); - const PerMessageDeflate = require_permessage_deflate(); - const Receiver = require_receiver(); - const Sender = require_sender(); - const { isBlob } = require_validation(); - const { BINARY_TYPES, CLOSE_TIMEOUT, EMPTY_BUFFER, GUID, kForOnEventAttribute, kListener, kStatusCode, kWebSocket, NOOP } = require_constants(); - const { EventTarget: { addEventListener, removeEventListener } } = require_event_target(); - const { format, parse } = require_extension(); - const { toBuffer } = require_buffer_util(); - const kAborted = Symbol("kAborted"); - const protocolVersions = [8, 13]; - const readyStates = [ - "CONNECTING", - "OPEN", - "CLOSING", - "CLOSED" - ]; - const subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/; - var WebSocket = class WebSocket extends EventEmitter$1 { - constructor(address, protocols, options) { - super(); - this._binaryType = BINARY_TYPES[0]; - this._closeCode = 1006; - this._closeFrameReceived = false; - this._closeFrameSent = false; - this._closeMessage = EMPTY_BUFFER; - this._closeTimer = null; - this._errorEmitted = false; - this._extensions = {}; - this._paused = false; - this._protocol = ""; - this._readyState = WebSocket.CONNECTING; - this._receiver = null; - this._sender = null; - this._socket = null; - if (address !== null) { - this._bufferedAmount = 0; - this._isServer = false; - this._redirects = 0; - if (protocols === void 0) protocols = []; - else if (!Array.isArray(protocols)) if (typeof protocols === "object" && protocols !== null) { - options = protocols; - protocols = []; - } else protocols = [protocols]; - initAsClient(this, address, protocols, options); - } else { - this._autoPong = options.autoPong; - this._closeTimeout = options.closeTimeout; - this._isServer = true; - } - } - get binaryType() { - return this._binaryType; - } - set binaryType(type) { - if (!BINARY_TYPES.includes(type)) return; - this._binaryType = type; - if (this._receiver) this._receiver._binaryType = type; - } - get bufferedAmount() { - if (!this._socket) return this._bufferedAmount; - return this._socket._writableState.length + this._sender._bufferedBytes; - } - get extensions() { - return Object.keys(this._extensions).join(); - } - get isPaused() { - return this._paused; - } - get onclose() { - return null; - } - get onerror() { - return null; - } - get onopen() { - return null; - } - get onmessage() { - return null; - } - get protocol() { - return this._protocol; - } - get readyState() { - return this._readyState; - } - get url() { - return this._url; - } - setSocket(socket, head, options) { - const receiver = new Receiver({ - allowSynchronousEvents: options.allowSynchronousEvents, - binaryType: this.binaryType, - extensions: this._extensions, - isServer: this._isServer, - maxPayload: options.maxPayload, - skipUTF8Validation: options.skipUTF8Validation - }); - const sender = new Sender(socket, this._extensions, options.generateMask); - this._receiver = receiver; - this._sender = sender; - this._socket = socket; - receiver[kWebSocket] = this; - sender[kWebSocket] = this; - socket[kWebSocket] = this; - receiver.on("conclude", receiverOnConclude); - receiver.on("drain", receiverOnDrain); - receiver.on("error", receiverOnError); - receiver.on("message", receiverOnMessage); - receiver.on("ping", receiverOnPing); - receiver.on("pong", receiverOnPong); - sender.onerror = senderOnError; - if (socket.setTimeout) socket.setTimeout(0); - if (socket.setNoDelay) socket.setNoDelay(); - if (head.length > 0) socket.unshift(head); - socket.on("close", socketOnClose); - socket.on("data", socketOnData); - socket.on("end", socketOnEnd); - socket.on("error", socketOnError); - this._readyState = WebSocket.OPEN; - this.emit("open"); - } - emitClose() { - if (!this._socket) { - this._readyState = WebSocket.CLOSED; - this.emit("close", this._closeCode, this._closeMessage); - return; - } - if (this._extensions[PerMessageDeflate.extensionName]) this._extensions[PerMessageDeflate.extensionName].cleanup(); - this._receiver.removeAllListeners(); - this._readyState = WebSocket.CLOSED; - this.emit("close", this._closeCode, this._closeMessage); - } - close(code, data) { - if (this.readyState === WebSocket.CLOSED) return; - if (this.readyState === WebSocket.CONNECTING) { - abortHandshake(this, this._req, "WebSocket was closed before the connection was established"); - return; - } - if (this.readyState === WebSocket.CLOSING) { - if (this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted)) this._socket.end(); - return; - } - this._readyState = WebSocket.CLOSING; - this._sender.close(code, data, !this._isServer, (err) => { - if (err) return; - this._closeFrameSent = true; - if (this._closeFrameReceived || this._receiver._writableState.errorEmitted) this._socket.end(); - }); - setCloseTimer(this); - } - pause() { - if (this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED) return; - this._paused = true; - this._socket.pause(); - } - ping(data, mask, cb) { - if (this.readyState === WebSocket.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)"); - if (typeof data === "function") { - cb = data; - data = mask = void 0; - } else if (typeof mask === "function") { - cb = mask; - mask = void 0; - } - if (typeof data === "number") data = data.toString(); - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - if (mask === void 0) mask = !this._isServer; - this._sender.ping(data || EMPTY_BUFFER, mask, cb); - } - pong(data, mask, cb) { - if (this.readyState === WebSocket.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)"); - if (typeof data === "function") { - cb = data; - data = mask = void 0; - } else if (typeof mask === "function") { - cb = mask; - mask = void 0; - } - if (typeof data === "number") data = data.toString(); - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - if (mask === void 0) mask = !this._isServer; - this._sender.pong(data || EMPTY_BUFFER, mask, cb); - } - resume() { - if (this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED) return; - this._paused = false; - if (!this._receiver._writableState.needDrain) this._socket.resume(); - } - send(data, options, cb) { - if (this.readyState === WebSocket.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)"); - if (typeof options === "function") { - cb = options; - options = {}; - } - if (typeof data === "number") data = data.toString(); - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - const opts = { - binary: typeof data !== "string", - mask: !this._isServer, - compress: true, - fin: true, - ...options - }; - if (!this._extensions[PerMessageDeflate.extensionName]) opts.compress = false; - this._sender.send(data || EMPTY_BUFFER, opts, cb); - } - terminate() { - if (this.readyState === WebSocket.CLOSED) return; - if (this.readyState === WebSocket.CONNECTING) { - abortHandshake(this, this._req, "WebSocket was closed before the connection was established"); - return; - } - if (this._socket) { - this._readyState = WebSocket.CLOSING; - this._socket.destroy(); - } - } - }; - Object.defineProperty(WebSocket, "CONNECTING", { - enumerable: true, - value: readyStates.indexOf("CONNECTING") - }); - Object.defineProperty(WebSocket.prototype, "CONNECTING", { - enumerable: true, - value: readyStates.indexOf("CONNECTING") - }); - Object.defineProperty(WebSocket, "OPEN", { - enumerable: true, - value: readyStates.indexOf("OPEN") - }); - Object.defineProperty(WebSocket.prototype, "OPEN", { - enumerable: true, - value: readyStates.indexOf("OPEN") - }); - Object.defineProperty(WebSocket, "CLOSING", { - enumerable: true, - value: readyStates.indexOf("CLOSING") - }); - Object.defineProperty(WebSocket.prototype, "CLOSING", { - enumerable: true, - value: readyStates.indexOf("CLOSING") - }); - Object.defineProperty(WebSocket, "CLOSED", { - enumerable: true, - value: readyStates.indexOf("CLOSED") - }); - Object.defineProperty(WebSocket.prototype, "CLOSED", { - enumerable: true, - value: readyStates.indexOf("CLOSED") - }); - [ - "binaryType", - "bufferedAmount", - "extensions", - "isPaused", - "protocol", - "readyState", - "url" - ].forEach((property) => { - Object.defineProperty(WebSocket.prototype, property, { enumerable: true }); - }); - [ - "open", - "error", - "close", - "message" - ].forEach((method) => { - Object.defineProperty(WebSocket.prototype, `on${method}`, { - enumerable: true, - get() { - for (const listener of this.listeners(method)) if (listener[kForOnEventAttribute]) return listener[kListener]; - return null; - }, - set(handler) { - for (const listener of this.listeners(method)) if (listener[kForOnEventAttribute]) { - this.removeListener(method, listener); - break; - } - if (typeof handler !== "function") return; - this.addEventListener(method, handler, { [kForOnEventAttribute]: true }); - } - }); - }); - WebSocket.prototype.addEventListener = addEventListener; - WebSocket.prototype.removeEventListener = removeEventListener; - module.exports = WebSocket; - function initAsClient(websocket, address, protocols, options) { - const opts = { - allowSynchronousEvents: true, - autoPong: true, - closeTimeout: CLOSE_TIMEOUT, - protocolVersion: protocolVersions[1], - maxPayload: 100 * 1024 * 1024, - skipUTF8Validation: false, - perMessageDeflate: true, - followRedirects: false, - maxRedirects: 10, - ...options, - socketPath: void 0, - hostname: void 0, - protocol: void 0, - timeout: void 0, - method: "GET", - host: void 0, - path: void 0, - port: void 0 - }; - websocket._autoPong = opts.autoPong; - websocket._closeTimeout = opts.closeTimeout; - if (!protocolVersions.includes(opts.protocolVersion)) throw new RangeError(`Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`); - let parsedUrl; - if (address instanceof URL) parsedUrl = address; - else try { - parsedUrl = new URL(address); - } catch { - throw new SyntaxError(`Invalid URL: ${address}`); - } - if (parsedUrl.protocol === "http:") parsedUrl.protocol = "ws:"; - else if (parsedUrl.protocol === "https:") parsedUrl.protocol = "wss:"; - websocket._url = parsedUrl.href; - const isSecure = parsedUrl.protocol === "wss:"; - const isIpcUrl = parsedUrl.protocol === "ws+unix:"; - let invalidUrlMessage; - if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) invalidUrlMessage = "The URL's protocol must be one of \"ws:\", \"wss:\", \"http:\", \"https:\", or \"ws+unix:\""; - else if (isIpcUrl && !parsedUrl.pathname) invalidUrlMessage = "The URL's pathname is empty"; - else if (parsedUrl.hash) invalidUrlMessage = "The URL contains a fragment identifier"; - if (invalidUrlMessage) { - const err = new SyntaxError(invalidUrlMessage); - if (websocket._redirects === 0) throw err; - else { - emitErrorAndClose(websocket, err); - return; - } - } - const defaultPort = isSecure ? 443 : 80; - const key = randomBytes(16).toString("base64"); - const request = isSecure ? https.request : http$1.request; - const protocolSet = /* @__PURE__ */ new Set(); - let perMessageDeflate; - opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect); - opts.defaultPort = opts.defaultPort || defaultPort; - opts.port = parsedUrl.port || defaultPort; - opts.host = parsedUrl.hostname.startsWith("[") ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname; - opts.headers = { - ...opts.headers, - "Sec-WebSocket-Version": opts.protocolVersion, - "Sec-WebSocket-Key": key, - Connection: "Upgrade", - Upgrade: "websocket" - }; - opts.path = parsedUrl.pathname + parsedUrl.search; - opts.timeout = opts.handshakeTimeout; - if (opts.perMessageDeflate) { - perMessageDeflate = new PerMessageDeflate({ - ...opts.perMessageDeflate, - isServer: false, - maxPayload: opts.maxPayload - }); - opts.headers["Sec-WebSocket-Extensions"] = format({ [PerMessageDeflate.extensionName]: perMessageDeflate.offer() }); - } - if (protocols.length) { - for (const protocol of protocols) { - if (typeof protocol !== "string" || !subprotocolRegex.test(protocol) || protocolSet.has(protocol)) throw new SyntaxError("An invalid or duplicated subprotocol was specified"); - protocolSet.add(protocol); - } - opts.headers["Sec-WebSocket-Protocol"] = protocols.join(","); - } - if (opts.origin) if (opts.protocolVersion < 13) opts.headers["Sec-WebSocket-Origin"] = opts.origin; - else opts.headers.Origin = opts.origin; - if (parsedUrl.username || parsedUrl.password) opts.auth = `${parsedUrl.username}:${parsedUrl.password}`; - if (isIpcUrl) { - const parts = opts.path.split(":"); - opts.socketPath = parts[0]; - opts.path = parts[1]; - } - let req; - if (opts.followRedirects) { - if (websocket._redirects === 0) { - websocket._originalIpc = isIpcUrl; - websocket._originalSecure = isSecure; - websocket._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host; - const headers = options && options.headers; - options = { - ...options, - headers: {} - }; - if (headers) for (const [key, value] of Object.entries(headers)) options.headers[key.toLowerCase()] = value; - } else if (websocket.listenerCount("redirect") === 0) { - const isSameHost = isIpcUrl ? websocket._originalIpc ? opts.socketPath === websocket._originalHostOrSocketPath : false : websocket._originalIpc ? false : parsedUrl.host === websocket._originalHostOrSocketPath; - if (!isSameHost || websocket._originalSecure && !isSecure) { - delete opts.headers.authorization; - delete opts.headers.cookie; - if (!isSameHost) delete opts.headers.host; - opts.auth = void 0; - } - } - if (opts.auth && !options.headers.authorization) options.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64"); - req = websocket._req = request(opts); - if (websocket._redirects) websocket.emit("redirect", websocket.url, req); - } else req = websocket._req = request(opts); - if (opts.timeout) req.on("timeout", () => { - abortHandshake(websocket, req, "Opening handshake has timed out"); - }); - req.on("error", (err) => { - if (req === null || req[kAborted]) return; - req = websocket._req = null; - emitErrorAndClose(websocket, err); - }); - req.on("response", (res) => { - const location = res.headers.location; - const statusCode = res.statusCode; - if (location && opts.followRedirects && statusCode >= 300 && statusCode < 400) { - if (++websocket._redirects > opts.maxRedirects) { - abortHandshake(websocket, req, "Maximum redirects exceeded"); - return; - } - req.abort(); - let addr; - try { - addr = new URL(location, address); - } catch (e) { - emitErrorAndClose(websocket, /* @__PURE__ */ new SyntaxError(`Invalid URL: ${location}`)); - return; - } - initAsClient(websocket, addr, protocols, options); - } else if (!websocket.emit("unexpected-response", req, res)) abortHandshake(websocket, req, `Unexpected server response: ${res.statusCode}`); - }); - req.on("upgrade", (res, socket, head) => { - websocket.emit("upgrade", res); - if (websocket.readyState !== WebSocket.CONNECTING) return; - req = websocket._req = null; - const upgrade = res.headers.upgrade; - if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") { - abortHandshake(websocket, socket, "Invalid Upgrade header"); - return; - } - const digest = createHash$1("sha1").update(key + GUID).digest("base64"); - if (res.headers["sec-websocket-accept"] !== digest) { - abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header"); - return; - } - const serverProt = res.headers["sec-websocket-protocol"]; - let protError; - if (serverProt !== void 0) { - if (!protocolSet.size) protError = "Server sent a subprotocol but none was requested"; - else if (!protocolSet.has(serverProt)) protError = "Server sent an invalid subprotocol"; - } else if (protocolSet.size) protError = "Server sent no subprotocol"; - if (protError) { - abortHandshake(websocket, socket, protError); - return; - } - if (serverProt) websocket._protocol = serverProt; - const secWebSocketExtensions = res.headers["sec-websocket-extensions"]; - if (secWebSocketExtensions !== void 0) { - if (!perMessageDeflate) { - abortHandshake(websocket, socket, "Server sent a Sec-WebSocket-Extensions header but no extension was requested"); - return; - } - let extensions; - try { - extensions = parse(secWebSocketExtensions); - } catch (err) { - abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Extensions header"); - return; - } - const extensionNames = Object.keys(extensions); - if (extensionNames.length !== 1 || extensionNames[0] !== PerMessageDeflate.extensionName) { - abortHandshake(websocket, socket, "Server indicated an extension that was not requested"); - return; - } - try { - perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]); - } catch (err) { - abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Extensions header"); - return; - } - websocket._extensions[PerMessageDeflate.extensionName] = perMessageDeflate; - } - websocket.setSocket(socket, head, { - allowSynchronousEvents: opts.allowSynchronousEvents, - generateMask: opts.generateMask, - maxPayload: opts.maxPayload, - skipUTF8Validation: opts.skipUTF8Validation - }); - }); - if (opts.finishRequest) opts.finishRequest(req, websocket); - else req.end(); - } - function emitErrorAndClose(websocket, err) { - websocket._readyState = WebSocket.CLOSING; - websocket._errorEmitted = true; - websocket.emit("error", err); - websocket.emitClose(); - } - function netConnect(options) { - options.path = options.socketPath; - return net.connect(options); - } - function tlsConnect(options) { - options.path = void 0; - if (!options.servername && options.servername !== "") options.servername = net.isIP(options.host) ? "" : options.host; - return tls.connect(options); - } - function abortHandshake(websocket, stream, message) { - websocket._readyState = WebSocket.CLOSING; - const err = new Error(message); - Error.captureStackTrace(err, abortHandshake); - if (stream.setHeader) { - stream[kAborted] = true; - stream.abort(); - if (stream.socket && !stream.socket.destroyed) stream.socket.destroy(); - process.nextTick(emitErrorAndClose, websocket, err); - } else { - stream.destroy(err); - stream.once("error", websocket.emit.bind(websocket, "error")); - stream.once("close", websocket.emitClose.bind(websocket)); - } - } - function sendAfterClose(websocket, data, cb) { - if (data) { - const length = isBlob(data) ? data.size : toBuffer(data).length; - if (websocket._socket) websocket._sender._bufferedBytes += length; - else websocket._bufferedAmount += length; - } - if (cb) { - const err = /* @__PURE__ */ new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`); - process.nextTick(cb, err); - } - } - function receiverOnConclude(code, reason) { - const websocket = this[kWebSocket]; - websocket._closeFrameReceived = true; - websocket._closeMessage = reason; - websocket._closeCode = code; - if (websocket._socket[kWebSocket] === void 0) return; - websocket._socket.removeListener("data", socketOnData); - process.nextTick(resume, websocket._socket); - if (code === 1005) websocket.close(); - else websocket.close(code, reason); - } - function receiverOnDrain() { - const websocket = this[kWebSocket]; - if (!websocket.isPaused) websocket._socket.resume(); - } - function receiverOnError(err) { - const websocket = this[kWebSocket]; - if (websocket._socket[kWebSocket] !== void 0) { - websocket._socket.removeListener("data", socketOnData); - process.nextTick(resume, websocket._socket); - websocket.close(err[kStatusCode]); - } - if (!websocket._errorEmitted) { - websocket._errorEmitted = true; - websocket.emit("error", err); - } - } - function receiverOnFinish() { - this[kWebSocket].emitClose(); - } - function receiverOnMessage(data, isBinary) { - this[kWebSocket].emit("message", data, isBinary); - } - function receiverOnPing(data) { - const websocket = this[kWebSocket]; - if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP); - websocket.emit("ping", data); - } - function receiverOnPong(data) { - this[kWebSocket].emit("pong", data); - } - function resume(stream) { - stream.resume(); - } - function senderOnError(err) { - const websocket = this[kWebSocket]; - if (websocket.readyState === WebSocket.CLOSED) return; - if (websocket.readyState === WebSocket.OPEN) { - websocket._readyState = WebSocket.CLOSING; - setCloseTimer(websocket); - } - this._socket.end(); - if (!websocket._errorEmitted) { - websocket._errorEmitted = true; - websocket.emit("error", err); - } - } - function setCloseTimer(websocket) { - websocket._closeTimer = setTimeout(websocket._socket.destroy.bind(websocket._socket), websocket._closeTimeout); - } - function socketOnClose() { - const websocket = this[kWebSocket]; - this.removeListener("close", socketOnClose); - this.removeListener("data", socketOnData); - this.removeListener("end", socketOnEnd); - websocket._readyState = WebSocket.CLOSING; - if (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && this._readableState.length !== 0) { - const chunk = this.read(this._readableState.length); - websocket._receiver.write(chunk); - } - websocket._receiver.end(); - this[kWebSocket] = void 0; - clearTimeout(websocket._closeTimer); - if (websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted) websocket.emitClose(); - else { - websocket._receiver.on("error", receiverOnFinish); - websocket._receiver.on("finish", receiverOnFinish); - } - } - function socketOnData(chunk) { - if (!this[kWebSocket]._receiver.write(chunk)) this.pause(); - } - function socketOnEnd() { - const websocket = this[kWebSocket]; - websocket._readyState = WebSocket.CLOSING; - websocket._receiver.end(); - this.end(); - } - function socketOnError() { - const websocket = this[kWebSocket]; - this.removeListener("error", socketOnError); - this.on("error", NOOP); - if (websocket) { - websocket._readyState = WebSocket.CLOSING; - this.destroy(); - } - } -})); -var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { - require_websocket(); - const { Duplex: Duplex$1 } = __require("stream"); - function emitClose(stream) { - stream.emit("close"); - } - function duplexOnEnd() { - if (!this.destroyed && this._writableState.finished) this.destroy(); - } - function duplexOnError(err) { - this.removeListener("error", duplexOnError); - this.destroy(); - if (this.listenerCount("error") === 0) this.emit("error", err); - } - function createWebSocketStream(ws, options) { - let terminateOnDestroy = true; - const duplex = new Duplex$1({ - ...options, - autoDestroy: false, - emitClose: false, - objectMode: false, - writableObjectMode: false - }); - ws.on("message", function message(msg, isBinary) { - const data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg; - if (!duplex.push(data)) ws.pause(); - }); - ws.once("error", function error(err) { - if (duplex.destroyed) return; - terminateOnDestroy = false; - duplex.destroy(err); - }); - ws.once("close", function close() { - if (duplex.destroyed) return; - duplex.push(null); - }); - duplex._destroy = function(err, callback) { - if (ws.readyState === ws.CLOSED) { - callback(err); - process.nextTick(emitClose, duplex); - return; - } - let called = false; - ws.once("error", function error(err) { - called = true; - callback(err); - }); - ws.once("close", function close() { - if (!called) callback(err); - process.nextTick(emitClose, duplex); - }); - if (terminateOnDestroy) ws.terminate(); - }; - duplex._final = function(callback) { - if (ws.readyState === ws.CONNECTING) { - ws.once("open", function open() { - duplex._final(callback); - }); - return; - } - if (ws._socket === null) return; - if (ws._socket._writableState.finished) { - callback(); - if (duplex._readableState.endEmitted) duplex.destroy(); - } else { - ws._socket.once("finish", function finish() { - callback(); - }); - ws.close(); - } - }; - duplex._read = function() { - if (ws.isPaused) ws.resume(); - }; - duplex._write = function(chunk, encoding, callback) { - if (ws.readyState === ws.CONNECTING) { - ws.once("open", function open() { - duplex._write(chunk, encoding, callback); - }); - return; - } - ws.send(chunk, callback); - }; - duplex.on("end", duplexOnEnd); - duplex.on("error", duplexOnError); - return duplex; - } - module.exports = createWebSocketStream; -})); -var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { tokenChars } = require_validation(); - function parse(header) { - const protocols = /* @__PURE__ */ new Set(); - let start = -1; - let end = -1; - let i = 0; - for (; i < header.length; i++) { - const code = header.charCodeAt(i); - if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (i !== 0 && (code === 32 || code === 9)) { - if (end === -1 && start !== -1) end = i; - } else if (code === 44) { - if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`); - if (end === -1) end = i; - const protocol = header.slice(start, end); - if (protocols.has(protocol)) throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`); - protocols.add(protocol); - start = end = -1; - } else throw new SyntaxError(`Unexpected character at index ${i}`); - } - if (start === -1 || end !== -1) throw new SyntaxError("Unexpected end of input"); - const protocol = header.slice(start, i); - if (protocols.has(protocol)) throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`); - protocols.add(protocol); - return protocols; - } - module.exports = { parse }; -})); -var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const EventEmitter = __require("events"); - const http = __require("http"); - const { Duplex } = __require("stream"); - const { createHash } = __require("crypto"); - const extension = require_extension(); - const PerMessageDeflate = require_permessage_deflate(); - const subprotocol = require_subprotocol(); - const WebSocket = require_websocket(); - const { CLOSE_TIMEOUT, GUID, kWebSocket } = require_constants(); - const keyRegex = /^[+/0-9A-Za-z]{22}==$/; - const RUNNING = 0; - const CLOSING = 1; - const CLOSED = 2; - var WebSocketServer = class extends EventEmitter { - constructor(options, callback) { - super(); - options = { - allowSynchronousEvents: true, - autoPong: true, - maxPayload: 100 * 1024 * 1024, - skipUTF8Validation: false, - perMessageDeflate: false, - handleProtocols: null, - clientTracking: true, - closeTimeout: CLOSE_TIMEOUT, - verifyClient: null, - noServer: false, - backlog: null, - server: null, - host: null, - path: null, - port: null, - WebSocket, - ...options - }; - if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) throw new TypeError("One and only one of the \"port\", \"server\", or \"noServer\" options must be specified"); - if (options.port != null) { - this._server = http.createServer((req, res) => { - const body = http.STATUS_CODES[426]; - res.writeHead(426, { - "Content-Length": body.length, - "Content-Type": "text/plain" - }); - res.end(body); - }); - this._server.listen(options.port, options.host, options.backlog, callback); - } else if (options.server) this._server = options.server; - if (this._server) { - const emitConnection = this.emit.bind(this, "connection"); - this._removeListeners = addListeners(this._server, { - listening: this.emit.bind(this, "listening"), - error: this.emit.bind(this, "error"), - upgrade: (req, socket, head) => { - this.handleUpgrade(req, socket, head, emitConnection); - } - }); - } - if (options.perMessageDeflate === true) options.perMessageDeflate = {}; - if (options.clientTracking) { - this.clients = /* @__PURE__ */ new Set(); - this._shouldEmitClose = false; - } - this.options = options; - this._state = RUNNING; - } - address() { - if (this.options.noServer) throw new Error("The server is operating in \"noServer\" mode"); - if (!this._server) return null; - return this._server.address(); - } - close(cb) { - if (this._state === CLOSED) { - if (cb) this.once("close", () => { - cb(/* @__PURE__ */ new Error("The server is not running")); - }); - process.nextTick(emitClose, this); - return; - } - if (cb) this.once("close", cb); - if (this._state === CLOSING) return; - this._state = CLOSING; - if (this.options.noServer || this.options.server) { - if (this._server) { - this._removeListeners(); - this._removeListeners = this._server = null; - } - if (this.clients) if (!this.clients.size) process.nextTick(emitClose, this); - else this._shouldEmitClose = true; - else process.nextTick(emitClose, this); - } else { - const server = this._server; - this._removeListeners(); - this._removeListeners = this._server = null; - server.close(() => { - emitClose(this); - }); - } - } - shouldHandle(req) { - if (this.options.path) { - const index = req.url.indexOf("?"); - if ((index !== -1 ? req.url.slice(0, index) : req.url) !== this.options.path) return false; - } - return true; - } - handleUpgrade(req, socket, head, cb) { - socket.on("error", socketOnError); - const key = req.headers["sec-websocket-key"]; - const upgrade = req.headers.upgrade; - const version = +req.headers["sec-websocket-version"]; - if (req.method !== "GET") { - abortHandshakeOrEmitwsClientError(this, req, socket, 405, "Invalid HTTP method"); - return; - } - if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") { - abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid Upgrade header"); - return; - } - if (key === void 0 || !keyRegex.test(key)) { - abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Missing or invalid Sec-WebSocket-Key header"); - return; - } - if (version !== 13 && version !== 8) { - abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Missing or invalid Sec-WebSocket-Version header", { "Sec-WebSocket-Version": "13, 8" }); - return; - } - if (!this.shouldHandle(req)) { - abortHandshake(socket, 400); - return; - } - const secWebSocketProtocol = req.headers["sec-websocket-protocol"]; - let protocols = /* @__PURE__ */ new Set(); - if (secWebSocketProtocol !== void 0) try { - protocols = subprotocol.parse(secWebSocketProtocol); - } catch (err) { - abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid Sec-WebSocket-Protocol header"); - return; - } - const secWebSocketExtensions = req.headers["sec-websocket-extensions"]; - const extensions = {}; - if (this.options.perMessageDeflate && secWebSocketExtensions !== void 0) { - const perMessageDeflate = new PerMessageDeflate({ - ...this.options.perMessageDeflate, - isServer: true, - maxPayload: this.options.maxPayload - }); - try { - const offers = extension.parse(secWebSocketExtensions); - if (offers[PerMessageDeflate.extensionName]) { - perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]); - extensions[PerMessageDeflate.extensionName] = perMessageDeflate; - } - } catch (err) { - abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid or unacceptable Sec-WebSocket-Extensions header"); - return; - } - } - if (this.options.verifyClient) { - const info = { - origin: req.headers[`${version === 8 ? "sec-websocket-origin" : "origin"}`], - secure: !!(req.socket.authorized || req.socket.encrypted), - req - }; - if (this.options.verifyClient.length === 2) { - this.options.verifyClient(info, (verified, code, message, headers) => { - if (!verified) return abortHandshake(socket, code || 401, message, headers); - this.completeUpgrade(extensions, key, protocols, req, socket, head, cb); - }); - return; - } - if (!this.options.verifyClient(info)) return abortHandshake(socket, 401); - } - this.completeUpgrade(extensions, key, protocols, req, socket, head, cb); - } - completeUpgrade(extensions, key, protocols, req, socket, head, cb) { - if (!socket.readable || !socket.writable) return socket.destroy(); - if (socket[kWebSocket]) throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration"); - if (this._state > RUNNING) return abortHandshake(socket, 503); - const headers = [ - "HTTP/1.1 101 Switching Protocols", - "Upgrade: websocket", - "Connection: Upgrade", - `Sec-WebSocket-Accept: ${createHash("sha1").update(key + GUID).digest("base64")}` - ]; - const ws = new this.options.WebSocket(null, void 0, this.options); - if (protocols.size) { - const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value; - if (protocol) { - headers.push(`Sec-WebSocket-Protocol: ${protocol}`); - ws._protocol = protocol; - } - } - if (extensions[PerMessageDeflate.extensionName]) { - const params = extensions[PerMessageDeflate.extensionName].params; - const value = extension.format({ [PerMessageDeflate.extensionName]: [params] }); - headers.push(`Sec-WebSocket-Extensions: ${value}`); - ws._extensions = extensions; - } - this.emit("headers", headers, req); - socket.write(headers.concat("\r\n").join("\r\n")); - socket.removeListener("error", socketOnError); - ws.setSocket(socket, head, { - allowSynchronousEvents: this.options.allowSynchronousEvents, - maxPayload: this.options.maxPayload, - skipUTF8Validation: this.options.skipUTF8Validation - }); - if (this.clients) { - this.clients.add(ws); - ws.on("close", () => { - this.clients.delete(ws); - if (this._shouldEmitClose && !this.clients.size) process.nextTick(emitClose, this); - }); - } - cb(ws, req); - } - }; - module.exports = WebSocketServer; - function addListeners(server, map) { - for (const event of Object.keys(map)) server.on(event, map[event]); - return function removeListeners() { - for (const event of Object.keys(map)) server.removeListener(event, map[event]); - }; - } - function emitClose(server) { - server._state = CLOSED; - server.emit("close"); - } - function socketOnError() { - this.destroy(); - } - function abortHandshake(socket, code, message, headers) { - message = message || http.STATUS_CODES[code]; - headers = { - Connection: "close", - "Content-Type": "text/html", - "Content-Length": Buffer.byteLength(message), - ...headers - }; - socket.once("finish", socket.destroy); - socket.end(`HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message); - } - function abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) { - if (server.listenerCount("wsClientError")) { - const err = new Error(message); - Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError); - server.emit("wsClientError", err, socket, req); - } else abortHandshake(socket, code, message, headers); - } -})); -require_stream(); -require_extension(); -require_permessage_deflate(); -require_receiver(); -require_sender(); -require_subprotocol(); -var import_websocket = /* @__PURE__ */ __toESM(require_websocket(), 1); -var import_websocket_server = /* @__PURE__ */ __toESM(require_websocket_server(), 1); -export { import_websocket_server as n, import_websocket as t }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/node.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/node.d.mts deleted file mode 100644 index 41cd20a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/node.d.mts +++ /dev/null @@ -1,328 +0,0 @@ -import { a as Hooks, n as AdapterInstance, r as AdapterOptions, t as Adapter } from "./adapter.mjs"; -import { EventEmitter } from "events"; -import { Agent, ClientRequest, ClientRequestArgs, IncomingMessage, OutgoingHttpHeaders, Server } from "node:http"; -import { Duplex, DuplexOptions } from "node:stream"; -import { Server as Server$1 } from "node:https"; -import { SecureContextOptions } from "node:tls"; -import { URL } from "node:url"; -import { ZlibOptions } from "node:zlib"; -type BufferLike = string | Buffer | DataView | number | ArrayBufferView | Uint8Array | ArrayBuffer | SharedArrayBuffer | readonly any[] | readonly number[] | { - valueOf(): ArrayBuffer; -} | { - valueOf(): SharedArrayBuffer; -} | { - valueOf(): Uint8Array; -} | { - valueOf(): readonly number[]; -} | { - valueOf(): string; -} | { - [Symbol.toPrimitive](hint: string): string; -}; -declare class WebSocket extends EventEmitter { - static readonly createWebSocketStream: typeof createWebSocketStream; - static readonly WebSocketServer: WebSocketServer; - static readonly Server: typeof Server$2; - static readonly WebSocket: typeof WebSocket; - /** The connection is not yet open. */ - static readonly CONNECTING: 0; - /** The connection is open and ready to communicate. */ - static readonly OPEN: 1; - /** The connection is in the process of closing. */ - static readonly CLOSING: 2; - /** The connection is closed. */ - static readonly CLOSED: 3; - binaryType: "nodebuffer" | "arraybuffer" | "fragments"; - readonly bufferedAmount: number; - readonly extensions: string; - /** Indicates whether the websocket is paused */ - readonly isPaused: boolean; - readonly protocol: string; - /** The current state of the connection */ - readonly readyState: typeof WebSocket.CONNECTING | typeof WebSocket.OPEN | typeof WebSocket.CLOSING | typeof WebSocket.CLOSED; - readonly url: string; - /** The connection is not yet open. */ - readonly CONNECTING: 0; - /** The connection is open and ready to communicate. */ - readonly OPEN: 1; - /** The connection is in the process of closing. */ - readonly CLOSING: 2; - /** The connection is closed. */ - readonly CLOSED: 3; - onopen: ((event: Event) => void) | null; - onerror: ((event: ErrorEvent) => void) | null; - onclose: ((event: CloseEvent) => void) | null; - onmessage: ((event: MessageEvent) => void) | null; - constructor(address: null); - constructor(address: string | URL, options?: ClientOptions | ClientRequestArgs); - constructor(address: string | URL, protocols?: string | string[], options?: ClientOptions | ClientRequestArgs); - close(code?: number, data?: string | Buffer): void; - ping(data?: any, mask?: boolean, cb?: (err: Error) => void): void; - pong(data?: any, mask?: boolean, cb?: (err: Error) => void): void; - send(data: BufferLike, cb?: (err?: Error) => void): void; - send(data: BufferLike, options: { - mask?: boolean | undefined; - binary?: boolean | undefined; - compress?: boolean | undefined; - fin?: boolean | undefined; - }, cb?: (err?: Error) => void): void; - terminate(): void; - /** - * Pause the websocket causing it to stop emitting events. Some events can still be - * emitted after this is called, until all buffered data is consumed. This method - * is a noop if the ready state is `CONNECTING` or `CLOSED`. - */ - pause(): void; - /** - * Make a paused socket resume emitting events. This method is a noop if the ready - * state is `CONNECTING` or `CLOSED`. - */ - resume(): void; - addEventListener(method: "message", cb: (event: MessageEvent) => void, options?: EventListenerOptions): void; - addEventListener(method: "close", cb: (event: CloseEvent) => void, options?: EventListenerOptions): void; - addEventListener(method: "error", cb: (event: ErrorEvent) => void, options?: EventListenerOptions): void; - addEventListener(method: "open", cb: (event: Event) => void, options?: EventListenerOptions): void; - removeEventListener(method: "message", cb: (event: MessageEvent) => void): void; - removeEventListener(method: "close", cb: (event: CloseEvent) => void): void; - removeEventListener(method: "error", cb: (event: ErrorEvent) => void): void; - removeEventListener(method: "open", cb: (event: Event) => void): void; - on(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this; - on(event: "error", listener: (this: WebSocket, err: Error) => void): this; - on(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this; - on(event: "message", listener: (this: WebSocket, data: RawData, isBinary: boolean) => void): this; - on(event: "open", listener: (this: WebSocket) => void): this; - on(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this; - on(event: "unexpected-response", listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void): this; - on(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this; - once(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this; - once(event: "error", listener: (this: WebSocket, err: Error) => void): this; - once(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this; - once(event: "message", listener: (this: WebSocket, data: RawData, isBinary: boolean) => void): this; - once(event: "open", listener: (this: WebSocket) => void): this; - once(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this; - once(event: "unexpected-response", listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void): this; - once(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this; - off(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this; - off(event: "error", listener: (this: WebSocket, err: Error) => void): this; - off(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this; - off(event: "message", listener: (this: WebSocket, data: RawData, isBinary: boolean) => void): this; - off(event: "open", listener: (this: WebSocket) => void): this; - off(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this; - off(event: "unexpected-response", listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void): this; - off(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this; - addListener(event: "close", listener: (code: number, reason: Buffer) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "upgrade", listener: (request: IncomingMessage) => void): this; - addListener(event: "message", listener: (data: RawData, isBinary: boolean) => void): this; - addListener(event: "open", listener: () => void): this; - addListener(event: "ping" | "pong", listener: (data: Buffer) => void): this; - addListener(event: "unexpected-response", listener: (request: ClientRequest, response: IncomingMessage) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: "close", listener: (code: number, reason: Buffer) => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "upgrade", listener: (request: IncomingMessage) => void): this; - removeListener(event: "message", listener: (data: RawData, isBinary: boolean) => void): this; - removeListener(event: "open", listener: () => void): this; - removeListener(event: "ping" | "pong", listener: (data: Buffer) => void): this; - removeListener(event: "unexpected-response", listener: (request: ClientRequest, response: IncomingMessage) => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; -} -/** - * Data represents the raw message payload received over the - */ -type RawData = Buffer | ArrayBuffer | Buffer[]; -/** - * Data represents the message payload received over the - */ -type Data = string | Buffer | ArrayBuffer | Buffer[]; -/** - * CertMeta represents the accepted types for certificate & key data. - */ -type CertMeta = string | string[] | Buffer | Buffer[]; -/** - * VerifyClientCallbackSync is a synchronous callback used to inspect the - * incoming message. The return value (boolean) of the function determines - * whether or not to accept the handshake. - */ -type VerifyClientCallbackSync = (info: { - origin: string; - secure: boolean; - req: Request; -}) => boolean; -/** - * VerifyClientCallbackAsync is an asynchronous callback used to inspect the - * incoming message. The return value (boolean) of the function determines - * whether or not to accept the handshake. - */ -type VerifyClientCallbackAsync = (info: { - origin: string; - secure: boolean; - req: Request; -}, callback: (res: boolean, code?: number, message?: string, headers?: OutgoingHttpHeaders) => void) => void; -interface ClientOptions extends SecureContextOptions { - protocol?: string | undefined; - followRedirects?: boolean | undefined; - generateMask?(mask: Buffer): void; - handshakeTimeout?: number | undefined; - maxRedirects?: number | undefined; - perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined; - localAddress?: string | undefined; - protocolVersion?: number | undefined; - headers?: { - [key: string]: string; - } | undefined; - origin?: string | undefined; - agent?: Agent | undefined; - host?: string | undefined; - family?: number | undefined; - checkServerIdentity?(servername: string, cert: CertMeta): boolean; - rejectUnauthorized?: boolean | undefined; - maxPayload?: number | undefined; - skipUTF8Validation?: boolean | undefined; -} -interface PerMessageDeflateOptions { - serverNoContextTakeover?: boolean | undefined; - clientNoContextTakeover?: boolean | undefined; - serverMaxWindowBits?: number | undefined; - clientMaxWindowBits?: number | undefined; - zlibDeflateOptions?: { - flush?: number | undefined; - finishFlush?: number | undefined; - chunkSize?: number | undefined; - windowBits?: number | undefined; - level?: number | undefined; - memLevel?: number | undefined; - strategy?: number | undefined; - dictionary?: Buffer | Buffer[] | DataView | undefined; - info?: boolean | undefined; - } | undefined; - zlibInflateOptions?: ZlibOptions | undefined; - threshold?: number | undefined; - concurrencyLimit?: number | undefined; -} -interface Event { - type: string; - target: WebSocket; -} -interface ErrorEvent { - error: any; - message: string; - type: string; - target: WebSocket; -} -interface CloseEvent { - wasClean: boolean; - code: number; - reason: string; - type: string; - target: WebSocket; -} -interface MessageEvent { - data: Data; - type: string; - target: WebSocket; -} -interface EventListenerOptions { - once?: boolean | undefined; -} -interface ServerOptions { - host?: string | undefined; - port?: number | undefined; - backlog?: number | undefined; - server?: Server | Server$1 | undefined; - verifyClient?: VerifyClientCallbackAsync> | VerifyClientCallbackSync> | undefined; - handleProtocols?: (protocols: Set, request: InstanceType) => string | false; - path?: string | undefined; - noServer?: boolean | undefined; - clientTracking?: boolean | undefined; - perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined; - maxPayload?: number | undefined; - skipUTF8Validation?: boolean | undefined; - WebSocket?: U | undefined; -} -interface AddressInfo { - address: string; - family: string; - port: number; -} -declare class Server$2 extends EventEmitter { - options: ServerOptions; - path: string; - clients: Set>; - constructor(options?: ServerOptions, callback?: () => void); - address(): AddressInfo | string; - close(cb?: (err?: Error) => void): void; - handleUpgrade(request: InstanceType, socket: Duplex, upgradeHead: Buffer, callback: (client: InstanceType, request: InstanceType) => void): void; - shouldHandle(request: InstanceType): boolean | Promise; - on(event: "connection", cb: (this: Server$2, socket: InstanceType, request: InstanceType) => void): this; - on(event: "error", cb: (this: Server$2, error: Error) => void): this; - on(event: "headers", cb: (this: Server$2, headers: string[], request: InstanceType) => void): this; - on(event: "close" | "listening", cb: (this: Server$2) => void): this; - on(event: string | symbol, listener: (this: Server$2, ...args: any[]) => void): this; - once(event: "connection", cb: (this: Server$2, socket: InstanceType, request: InstanceType) => void): this; - once(event: "error", cb: (this: Server$2, error: Error) => void): this; - once(event: "headers", cb: (this: Server$2, headers: string[], request: InstanceType) => void): this; - once(event: "close" | "listening", cb: (this: Server$2) => void): this; - once(event: string | symbol, listener: (this: Server$2, ...args: any[]) => void): this; - off(event: "connection", cb: (this: Server$2, socket: InstanceType, request: InstanceType) => void): this; - off(event: "error", cb: (this: Server$2, error: Error) => void): this; - off(event: "headers", cb: (this: Server$2, headers: string[], request: InstanceType) => void): this; - off(event: "close" | "listening", cb: (this: Server$2) => void): this; - off(event: string | symbol, listener: (this: Server$2, ...args: any[]) => void): this; - addListener(event: "connection", cb: (client: InstanceType, request: InstanceType) => void): this; - addListener(event: "error", cb: (err: Error) => void): this; - addListener(event: "headers", cb: (headers: string[], request: InstanceType) => void): this; - addListener(event: "close" | "listening", cb: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: "connection", cb: (client: InstanceType, request: InstanceType) => void): this; - removeListener(event: "error", cb: (err: Error) => void): this; - removeListener(event: "headers", cb: (headers: string[], request: InstanceType) => void): this; - removeListener(event: "close" | "listening", cb: () => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; -} -type WebSocketServer = Server$2; -declare function createWebSocketStream(websocket: WebSocket, options?: DuplexOptions): Duplex; -/** - * A Node.js `(req, socket, head)` upgrade handler. - */ -type NodeUpgradeHandler = (req: IncomingMessage, socket: Duplex, head: Buffer) => void | Promise; -/** - * Wrap a Node.js `(req, socket, head)` upgrade handler as a {@link Hooks} - * object that can be mounted via `crossws/server/node`. - * - * The wrapped handler takes ownership of the socket; crossws's other - * lifecycle hooks (`open`/`message`/`close`/`error`) are **not** invoked - * for connections routed through it. - * - * @example - * ```ts - * import { WebSocketServer } from "ws"; - * import { fromNodeUpgradeHandler } from "crossws/adapters/node"; - * import { serve } from "crossws/server/node"; - * - * const wss = new WebSocketServer({ noServer: true }); - * wss.on("connection", (ws) => { - * ws.on("message", (data) => ws.send(data)); - * }); - * - * serve({ - * websocket: fromNodeUpgradeHandler((req, socket, head) => { - * wss.handleUpgrade(req, socket, head, (ws) => { - * wss.emit("connection", ws, req); - * }); - * }), - * fetch: () => new Response("ok"), - * }); - * ``` - */ -declare function fromNodeUpgradeHandler(handler: NodeUpgradeHandler): Partial; -interface NodeAdapter extends AdapterInstance { - handleUpgrade(req: IncomingMessage, socket: Duplex, head: Buffer, webRequest?: Request): Promise; - closeAll: (code?: number, data?: string | Buffer, force?: boolean) => void; -} -interface NodeOptions extends AdapterOptions { - wss?: WebSocketServer; - serverOptions?: ServerOptions; -} -declare const nodeAdapter: Adapter; -export { fromNodeUpgradeHandler as a, NodeUpgradeHandler as i, NodeOptions as n, nodeAdapter as r, NodeAdapter as t }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/node.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/node.mjs deleted file mode 100644 index 2fa941d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/node.mjs +++ /dev/null @@ -1,129 +0,0 @@ -import { i as AdapterHookable, r as getPeers, t as adapterUtils } from "./adapter.mjs"; -import { n as import_websocket_server } from "./libs/ws.mjs"; -import { n as Message, r as toBufferLike, t as Peer } from "./peer.mjs"; -import { t as WSError } from "./error.mjs"; -import { t as StubRequest } from "./_request.mjs"; -function fromNodeUpgradeHandler(handler) { - return { async upgrade(request) { - const node = request.runtime?.node; - if (!node?.upgrade) throw new Error("[crossws] `fromNodeUpgradeHandler` must be mounted via `crossws/server/node`."); - await handler(node.req, node.upgrade.socket, node.upgrade.head); - return { handled: true }; - } }; -} -const nodeAdapter = (options = {}) => { - if ("Deno" in globalThis || "Bun" in globalThis) throw new Error("[crossws] Using Node.js adapter in an incompatible environment."); - const hooks = new AdapterHookable(options); - const globalPeers = /* @__PURE__ */ new Map(); - const wss = options.wss || new import_websocket_server.default({ - noServer: true, - handleProtocols: () => false, - ...options.serverOptions - }); - wss.on("connection", (ws, nodeReq) => { - const request = new NodeReqProxy(nodeReq); - const peers = getPeers(globalPeers, nodeReq._namespace); - const peer = new NodePeer({ - ws, - request, - peers, - nodeReq, - namespace: nodeReq._namespace - }); - peers.add(peer); - hooks.callHook("open", peer); - ws.on("message", (data, isBinary) => { - if (Array.isArray(data)) data = Buffer.concat(data); - if (!isBinary && Buffer.isBuffer(data)) data = data.toString("utf8"); - hooks.callHook("message", peer, new Message(data, peer)); - }); - ws.on("error", (error) => { - peers.delete(peer); - hooks.callHook("error", peer, new WSError(error)); - }); - ws.on("close", (code, reason) => { - peers.delete(peer); - hooks.callHook("close", peer, { - code, - reason: reason?.toString() - }); - }); - }); - wss.on("headers", (outgoingHeaders, req) => { - const upgradeHeaders = req._upgradeHeaders; - if (upgradeHeaders) for (const [key, value] of new Headers(upgradeHeaders)) outgoingHeaders.push(`${key}: ${value}`); - }); - return { - ...adapterUtils(globalPeers), - handleUpgrade: async (nodeReq, socket, head, webRequest) => { - const request = webRequest || new NodeReqProxy(nodeReq); - const { upgradeHeaders, endResponse, handled, context, namespace } = await hooks.upgrade(request); - if (endResponse) return sendResponse(socket, endResponse); - if (handled) return; - nodeReq._request = request; - nodeReq._upgradeHeaders = upgradeHeaders; - nodeReq._context = context; - nodeReq._namespace = namespace; - wss.handleUpgrade(nodeReq, socket, head, (ws) => { - wss.emit("connection", ws, nodeReq); - }); - }, - closeAll: (code, data, force) => { - for (const client of wss.clients) if (force) client.terminate(); - else client.close(code, data); - } - }; -}; -var NodePeer = class extends Peer { - get remoteAddress() { - return this._internal.nodeReq.socket?.remoteAddress; - } - get context() { - return this._internal.nodeReq._context; - } - send(data, options) { - const dataBuff = toBufferLike(data); - const isBinary = typeof dataBuff !== "string"; - this._internal.ws.send(dataBuff, { - compress: options?.compress, - binary: isBinary, - ...options - }); - return 0; - } - publish(topic, data, options) { - const dataBuff = toBufferLike(data); - const isBinary = typeof data !== "string"; - const sendOptions = { - compress: options?.compress, - binary: isBinary, - ...options - }; - for (const peer of this._internal.peers) if (peer !== this && peer._topics.has(topic)) peer._internal.ws.send(dataBuff, sendOptions); - } - close(code, data) { - this._internal.ws.close(code, data); - } - terminate() { - this._internal.ws.terminate(); - } -}; -var NodeReqProxy = class extends StubRequest { - constructor(req) { - const host = req.headers["host"] || "localhost"; - const url = `${req.socket?.encrypted ?? req.headers["x-forwarded-proto"] === "https" ? "https" : "http"}://${host}${req.url}`; - super(url, { headers: req.headers }); - } -}; -async function sendResponse(socket, res) { - const head = [`HTTP/1.1 ${res.status || 200} ${res.statusText || ""}`, ...[...res.headers.entries()].map(([key, value]) => `${key}: ${value}`)]; - socket.write(head.join("\r\n") + "\r\n\r\n"); - if (res.body) for await (const chunk of res.body) socket.write(chunk); - return new Promise((resolve) => { - socket.end(() => { - socket.destroy(); - resolve(); - }); - }); -} -export { fromNodeUpgradeHandler as n, nodeAdapter as t }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/peer.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/peer.mjs deleted file mode 100644 index b210df8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/peer.mjs +++ /dev/null @@ -1,186 +0,0 @@ -const kNodeInspect = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom"); -function toBufferLike(val) { - if (val === void 0 || val === null) return ""; - const type = typeof val; - if (type === "string") return val; - if (type === "number" || type === "boolean" || type === "bigint") return val.toString(); - if (type === "function" || type === "symbol") return "{}"; - if (val instanceof Uint8Array || val instanceof ArrayBuffer) return val; - if (isPlainObject(val)) return JSON.stringify(val); - return val; -} -function toString(val) { - if (typeof val === "string") return val; - const data = toBufferLike(val); - if (typeof data === "string") return data; - return `data:application/octet-stream;base64,${btoa(String.fromCharCode(...new Uint8Array(data)))}`; -} -function isPlainObject(value) { - if (value === null || typeof value !== "object") return false; - const prototype = Object.getPrototypeOf(value); - if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false; - if (Symbol.iterator in value) return false; - if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]"; - return true; -} -var Message = class { - event; - peer; - rawData; - #id; - #uint8Array; - #arrayBuffer; - #blob; - #text; - #json; - constructor(rawData, peer, event) { - this.rawData = rawData || ""; - this.peer = peer; - this.event = event; - } - get id() { - if (!this.#id) this.#id = crypto.randomUUID(); - return this.#id; - } - uint8Array() { - const _uint8Array = this.#uint8Array; - if (_uint8Array) return _uint8Array; - const rawData = this.rawData; - if (rawData instanceof Uint8Array) return this.#uint8Array = rawData; - if (rawData instanceof ArrayBuffer || rawData instanceof SharedArrayBuffer) { - this.#arrayBuffer = rawData; - return this.#uint8Array = new Uint8Array(rawData); - } - if (typeof rawData === "string") { - this.#text = rawData; - return this.#uint8Array = new TextEncoder().encode(this.#text); - } - if (Symbol.iterator in rawData) return this.#uint8Array = new Uint8Array(rawData); - if (typeof rawData?.length === "number") return this.#uint8Array = new Uint8Array(rawData); - if (rawData instanceof DataView) return this.#uint8Array = new Uint8Array(rawData.buffer, rawData.byteOffset, rawData.byteLength); - throw new TypeError(`Unsupported message type: ${Object.prototype.toString.call(rawData)}`); - } - arrayBuffer() { - const _arrayBuffer = this.#arrayBuffer; - if (_arrayBuffer) return _arrayBuffer; - const rawData = this.rawData; - if (rawData instanceof ArrayBuffer || rawData instanceof SharedArrayBuffer) return this.#arrayBuffer = rawData; - return this.#arrayBuffer = this.uint8Array().buffer; - } - blob() { - const _blob = this.#blob; - if (_blob) return _blob; - const rawData = this.rawData; - if (rawData instanceof Blob) return this.#blob = rawData; - return this.#blob = new Blob([this.uint8Array()]); - } - text() { - const _text = this.#text; - if (_text) return _text; - const rawData = this.rawData; - if (typeof rawData === "string") return this.#text = rawData; - return this.#text = new TextDecoder().decode(this.uint8Array()); - } - json() { - const _json = this.#json; - if (_json) return _json; - return this.#json = JSON.parse(this.text()); - } - get data() { - switch (this.peer?.websocket?.binaryType) { - case "arraybuffer": return this.arrayBuffer(); - case "blob": return this.blob(); - case "nodebuffer": return globalThis.Buffer ? Buffer.from(this.uint8Array()) : this.uint8Array(); - case "uint8array": return this.uint8Array(); - case "text": return this.text(); - default: return this.rawData; - } - } - toString() { - return this.text(); - } - [Symbol.toPrimitive]() { - return this.text(); - } - [kNodeInspect]() { - return { message: { - id: this.id, - peer: this.peer, - text: this.text() - } }; - } -}; -var Peer = class { - _internal; - _topics; - _id; - #ws; - constructor(internal) { - this._topics = /* @__PURE__ */ new Set(); - this._internal = internal; - } - get context() { - return this._internal.context ??= {}; - } - get namespace() { - return this._internal.namespace; - } - get id() { - if (!this._id) this._id = crypto.randomUUID(); - return this._id; - } - get remoteAddress() {} - get request() { - return this._internal.request; - } - get websocket() { - if (!this.#ws) { - const _ws = this._internal.ws; - const _request = this._internal.request; - this.#ws = _request ? createWsProxy(_ws, _request) : _ws; - } - return this.#ws; - } - get peers() { - return this._internal.peers || /* @__PURE__ */ new Set(); - } - get topics() { - return this._topics; - } - terminate() { - this.close(); - } - subscribe(topic) { - this._topics.add(topic); - } - unsubscribe(topic) { - this._topics.delete(topic); - } - toString() { - return this.id; - } - [Symbol.toPrimitive]() { - return this.id; - } - [Symbol.toStringTag]() { - return "WebSocket"; - } - [kNodeInspect]() { - return { peer: { - id: this.id, - ip: this.remoteAddress - } }; - } -}; -function createWsProxy(ws, request) { - return new Proxy(ws, { get: (target, prop) => { - const value = Reflect.get(target, prop); - if (!value) switch (prop) { - case "protocol": return request?.headers?.get("sec-websocket-protocol") || ""; - case "extensions": return request?.headers?.get("sec-websocket-extensions") || ""; - case "url": return request?.url?.replace(/^http/, "ws") || void 0; - } - return value; - } }); -} -export { toString as i, Message as n, toBufferLike as r, Peer as t }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/rolldown-runtime.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/rolldown-runtime.mjs deleted file mode 100644 index 67a6813..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/rolldown-runtime.mjs +++ /dev/null @@ -1,24 +0,0 @@ -import { createRequire } from "node:module"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { - key = keys[i]; - if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { - get: ((k) => from[k]).bind(null, key), - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable - }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { - value: mod, - enumerable: true -}) : target, mod)); -var __require = /* @__PURE__ */ createRequire(import.meta.url); -export { __require as n, __toESM as r, __commonJSMin as t }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/sse.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/sse.d.mts deleted file mode 100644 index 7e5790c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/sse.d.mts +++ /dev/null @@ -1,9 +0,0 @@ -import { n as AdapterInstance, r as AdapterOptions, t as Adapter } from "./adapter.mjs"; -interface SSEAdapter extends AdapterInstance { - fetch(req: Request): Promise; -} -interface SSEOptions extends AdapterOptions { - bidir?: boolean; -} -declare const sseAdapter: Adapter; -export { SSEOptions as n, sseAdapter as r, SSEAdapter as t }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/web.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/web.d.mts deleted file mode 100644 index 0bb06bb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/_chunks/web.d.mts +++ /dev/null @@ -1,296 +0,0 @@ -/** - * A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent) - */ -interface CloseEvent extends Event { - /** - * Returns the WebSocket connection close code provided by the server. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/code) - */ - readonly code: number; - /** - * Returns the WebSocket connection close reason provided by the server. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/reason) - */ - readonly reason: string; - /** - * Returns true if the connection closed cleanly; false otherwise. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean) - */ - readonly wasClean: boolean; -} -/** - * An event which takes place in the DOM. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event) - */ -interface Event { - /** - * Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles) - */ - readonly bubbles: boolean; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble) - */ - cancelBubble: boolean; - /** - * Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable) - */ - readonly cancelable: boolean; - /** - * Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed) - */ - readonly composed: boolean; - /** - * Returns the object whose event listener's callback is currently being invoked. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget) - */ - readonly currentTarget: EventTarget | null; - /** - * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented) - */ - readonly defaultPrevented: boolean; - /** - * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase) - */ - readonly eventPhase: number; - /** - * Returns true if event was dispatched by the user agent, and false otherwise. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted) - */ - readonly isTrusted: boolean; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue) - */ - returnValue: boolean; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement) - */ - readonly srcElement: EventTarget | null; - /** - * Returns the object to which event is dispatched (its target). - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target) - */ - readonly target: EventTarget | null; - /** - * Returns the event's timestamp as the number of milliseconds measured relative to the time origin. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp) - */ - readonly timeStamp: DOMHighResTimeStamp; - /** - * Returns the type of event, e.g. "click", "hashchange", or "submit". - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type) - */ - readonly type: string; - /** - * Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath) - */ - composedPath(): EventTarget[]; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent) - */ - initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void; - /** - * If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault) - */ - preventDefault(): void; - /** - * Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation) - */ - stopImmediatePropagation(): void; - /** - * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation) - */ - stopPropagation(): void; - readonly NONE: 0; - readonly CAPTURING_PHASE: 1; - readonly AT_TARGET: 2; - readonly BUBBLING_PHASE: 3; -} -/** - * EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget) - */ -interface EventTarget { - /** - * Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. - * - * The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. - * - * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. - * - * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. - * - * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. - * - * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. - * - * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener) - */ - addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void; - /** - * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) - */ - dispatchEvent(event: Event): boolean; - /** - * Removes the event listener in target's event listener list with the same type, callback, and options. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener) - */ - removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void; -} -/** - * A message received by a target object. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent) - */ -interface MessageEvent extends Event { - /** - * Returns the data of the message. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data) - */ - readonly data: T; - /** - * Returns the last event ID string, for server-sent events. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId) - */ - readonly lastEventId: string; - /** - * Returns the origin of the message, for server-sent events and cross-document messaging. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin) - */ - readonly origin: string; - /** - * Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports) - */ - readonly ports: ReadonlyArray; - /** - * Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source) - */ - readonly source: MessageEventSource | null; - /** @deprecated */ - initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void; -} -/** - * Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket) - */ -interface WebSocket extends EventTarget { - /** - * Returns a string that indicates how binary data from the WebSocket object is exposed to scripts: - * - * Can be set, to change how binary data is returned. The default is "blob". - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType) - */ - binaryType: BinaryType | (string & {}); - /** - * Returns the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but not yet been transmitted to the network. - * - * If the WebSocket connection is closed, this attribute's value will only increase with each call to the send() method. (The number does not reset to zero once the connection closes.) - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/bufferedAmount) - */ - readonly bufferedAmount: number; - /** - * Returns the extensions selected by the server, if any. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions) - */ - readonly extensions: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close_event) */ - onclose: ((this: WebSocket, ev: CloseEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/error_event) */ - onerror: ((this: WebSocket, ev: Event) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/message_event) */ - onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/open_event) */ - onopen: ((this: WebSocket, ev: Event) => any) | null; - /** - * Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol) - */ - readonly protocol: string; - /** - * Returns the state of the WebSocket object's connection. It can have the values described below. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState) - */ - readonly readyState: number; - /** - * Returns the URL that was used to establish the WebSocket connection. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/url) - */ - readonly url: string; - /** - * Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close) - */ - close(code?: number, reason?: string): void; - /** - * Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send) - */ - send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void; - readonly CONNECTING: 0; - readonly OPEN: 1; - readonly CLOSING: 2; - readonly CLOSED: 3; - addEventListener(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} -export { WebSocket as a, MessageEvent as i, Event as n, EventTarget as r, CloseEvent as t }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bun.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bun.d.mts deleted file mode 100644 index c698840..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bun.d.mts +++ /dev/null @@ -1,2 +0,0 @@ -import { n as BunOptions, r as bunAdapter, t as BunAdapter } from "../_chunks/bun.mjs"; -export { BunAdapter, BunOptions, bunAdapter as default }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bun.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bun.mjs deleted file mode 100644 index 6ad9106..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bun.mjs +++ /dev/null @@ -1,84 +0,0 @@ -import { i as AdapterHookable, r as getPeers, t as adapterUtils } from "../_chunks/adapter.mjs"; -import { n as Message, r as toBufferLike, t as Peer } from "../_chunks/peer.mjs"; -const bunAdapter = (options = {}) => { - if (typeof Bun === "undefined") throw new Error("[crossws] Using Bun adapter in an incompatible environment."); - const hooks = new AdapterHookable(options); - const globalPeers = /* @__PURE__ */ new Map(); - return { - ...adapterUtils(globalPeers), - async handleUpgrade(request, server) { - const { upgradeHeaders, endResponse, context, namespace } = await hooks.upgrade(request); - if (endResponse) return endResponse; - if (!server.upgrade(request, { - data: { - server, - request, - context, - namespace - }, - headers: upgradeHeaders - })) return new Response("Upgrade failed", { status: 500 }); - }, - websocket: { - message: (ws, message) => { - const peer = getPeer(ws, getPeers(globalPeers, ws.data.namespace)); - hooks.callHook("message", peer, new Message(message, peer)); - }, - open: (ws) => { - const peers = getPeers(globalPeers, ws.data.namespace); - const peer = getPeer(ws, peers); - peers.add(peer); - hooks.callHook("open", peer); - }, - close: (ws, code, reason) => { - const peers = getPeers(globalPeers, ws.data.namespace); - const peer = getPeer(ws, peers); - peers.delete(peer); - hooks.callHook("close", peer, { - code, - reason - }); - } - } - }; -}; -function getPeer(ws, peers) { - if (ws.data.peer) return ws.data.peer; - const peer = new BunPeer({ - ws, - request: ws.data.request, - peers, - namespace: ws.data.namespace - }); - ws.data.peer = peer; - return peer; -} -var BunPeer = class extends Peer { - get remoteAddress() { - return this._internal.ws.remoteAddress; - } - get context() { - return this._internal.ws.data.context; - } - send(data, options) { - return this._internal.ws.send(toBufferLike(data), options?.compress); - } - publish(topic, data, options) { - return this._internal.ws.publish(topic, toBufferLike(data), options?.compress); - } - subscribe(topic) { - this._topics.add(topic); - this._internal.ws.subscribe(topic); - } - unsubscribe(topic) { - this._topics.delete(topic); - this._internal.ws.unsubscribe(topic); - } - close(code, reason) { - this._internal.ws.close(code, reason); - } - terminate() { - this._internal.ws.terminate(); - } -}; -export { bunAdapter as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bunny.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bunny.d.mts deleted file mode 100644 index 2f6d0d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bunny.d.mts +++ /dev/null @@ -1,2 +0,0 @@ -import { n as BunnyOptions, r as bunnyAdapter, t as BunnyAdapter } from "../_chunks/bunny.mjs"; -export { BunnyAdapter, BunnyOptions, bunnyAdapter as default }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bunny.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bunny.mjs deleted file mode 100644 index e1fc19d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/bunny.mjs +++ /dev/null @@ -1,68 +0,0 @@ -import { i as AdapterHookable, r as getPeers, t as adapterUtils } from "../_chunks/adapter.mjs"; -import { n as Message, r as toBufferLike, t as Peer } from "../_chunks/peer.mjs"; -import { t as WSError } from "../_chunks/error.mjs"; -const bunnyAdapter = (options = {}) => { - const hooks = new AdapterHookable(options); - const globalPeers = /* @__PURE__ */ new Map(); - return { - ...adapterUtils(globalPeers), - handleUpgrade: async (request) => { - if (!request.upgradeWebSocket || typeof request.upgradeWebSocket !== "function") throw new Error("[crossws] Bunny adapter requires the request to have an upgradeWebSocket method."); - const { endResponse, context, namespace, upgradeHeaders } = await hooks.upgrade(request); - if (endResponse) return endResponse; - const negotiatedProtocol = (upgradeHeaders instanceof Headers ? upgradeHeaders : new Headers(upgradeHeaders)).get("sec-websocket-protocol") ?? options.protocol; - const upgradeOptions = {}; - if (negotiatedProtocol) upgradeOptions.protocol = negotiatedProtocol; - if (options.idleTimeout !== void 0) upgradeOptions.idleTimeout = options.idleTimeout; - const { response, socket } = request.upgradeWebSocket(Object.keys(upgradeOptions).length > 0 ? upgradeOptions : void 0); - const remoteAddress = request.headers.get("x-real-ip") || void 0; - const peers = getPeers(globalPeers, namespace); - const peer = new BunnyPeer({ - ws: socket, - request, - namespace, - remoteAddress, - peers, - context - }); - peers.add(peer); - socket.addEventListener("open", () => { - hooks.callHook("open", peer); - }); - socket.addEventListener("message", (event) => { - hooks.callHook("message", peer, new Message(event.data, peer, event)); - }); - socket.addEventListener("close", (event) => { - peers.delete(peer); - hooks.callHook("close", peer, { - code: event.code, - reason: event.reason - }); - }); - socket.addEventListener("error", (error) => { - peers.delete(peer); - hooks.callHook("error", peer, new WSError(error)); - }); - return response; - } - }; -}; -var BunnyPeer = class extends Peer { - get remoteAddress() { - return this._internal.remoteAddress; - } - send(data) { - return this._internal.ws.send(toBufferLike(data)); - } - publish(topic, data) { - const dataBuff = toBufferLike(data); - for (const peer of this._internal.peers) if (peer !== this && peer._topics.has(topic)) peer._internal.ws.send(dataBuff); - } - close(code, reason) { - this._internal.ws.close(code, reason); - } - terminate() { - this._internal.ws.close(); - } -}; -export { bunnyAdapter as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/cloudflare.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/cloudflare.d.mts deleted file mode 100644 index 14abaa7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/cloudflare.d.mts +++ /dev/null @@ -1,2 +0,0 @@ -import { n as CloudflareOptions, r as cloudflareAdapter, t as CloudflareDurableAdapter } from "../_chunks/cloudflare.mjs"; -export { CloudflareDurableAdapter, CloudflareOptions, cloudflareAdapter as default }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/cloudflare.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/cloudflare.mjs deleted file mode 100644 index a388d08..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/cloudflare.mjs +++ /dev/null @@ -1,176 +0,0 @@ -import { i as AdapterHookable, r as getPeers, t as adapterUtils } from "../_chunks/adapter.mjs"; -import { n as Message, r as toBufferLike, t as Peer } from "../_chunks/peer.mjs"; -import { t as WSError } from "../_chunks/error.mjs"; -import { t as StubRequest } from "../_chunks/_request.mjs"; -import { env } from "cloudflare:workers"; -const cloudflareAdapter = (opts = {}) => { - const hooks = new AdapterHookable(opts); - const globalPeers = /* @__PURE__ */ new Map(); - const resolveDurableStub = opts.resolveDurableStub || ((_req, env$1, _context) => { - const bindingName = opts.bindingName || "$DurableObject"; - const binding = (env$1 || env)[bindingName]; - if (binding) { - const instanceId = binding.idFromName(opts.instanceName || "crossws"); - return binding.get(instanceId); - } - }); - const { publish: durablePublish, ...utils } = adapterUtils(globalPeers); - return { - ...utils, - handleUpgrade: async (request, cfEnv, cfCtx) => { - const stub = await resolveDurableStub(request, cfEnv, cfCtx); - if (stub) return stub.fetch(request); - const { upgradeHeaders, endResponse, context, namespace } = await hooks.upgrade(request); - if (endResponse) return endResponse; - const peers = getPeers(globalPeers, namespace); - const pair = new WebSocketPair(); - const client = pair[0]; - const server = pair[1]; - const peer = new CloudflareFallbackPeer({ - ws: client, - peers, - wsServer: server, - request, - cfEnv, - cfCtx, - context, - namespace - }); - peers.add(peer); - server.accept(); - hooks.callHook("open", peer); - server.addEventListener("message", (event) => { - hooks.callHook("message", peer, new Message(event.data, peer, event)); - }); - server.addEventListener("error", (event) => { - peers.delete(peer); - hooks.callHook("error", peer, new WSError(event.error)); - }); - server.addEventListener("close", (event) => { - peers.delete(peer); - hooks.callHook("close", peer, event); - server.close(); - }); - return new Response(null, { - status: 101, - webSocket: client, - headers: upgradeHeaders - }); - }, - handleDurableInit: async (_obj, _state, _env) => {}, - handleDurableUpgrade: async (obj, request) => { - const { upgradeHeaders, endResponse, namespace } = await hooks.upgrade(request); - if (endResponse) return endResponse; - const peers = getPeers(globalPeers, namespace); - const pair = new WebSocketPair(); - const client = pair[0]; - const server = pair[1]; - const peer = CloudflareDurablePeer._restore(obj, server, request, namespace); - peers.add(peer); - obj.ctx.acceptWebSocket(server); - await hooks.callHook("open", peer); - return new Response(null, { - status: 101, - webSocket: client, - headers: upgradeHeaders - }); - }, - handleDurableMessage: async (obj, ws, message) => { - const peer = CloudflareDurablePeer._restore(obj, ws); - await hooks.callHook("message", peer, new Message(message, peer)); - }, - handleDurableClose: async (obj, ws, code, reason, wasClean) => { - const peer = CloudflareDurablePeer._restore(obj, ws); - getPeers(globalPeers, peer.namespace).delete(peer); - const details = { - code, - reason, - wasClean - }; - await hooks.callHook("close", peer, details); - }, - handleDurablePublish: async (_obj, topic, data, opts) => { - return durablePublish(topic, data, opts); - }, - publish: async (topic, data, opts) => { - const stub = await resolveDurableStub(void 0, env, void 0); - if (!stub) throw new Error("[crossws] Durable Object binding cannot be resolved."); - try { - return await stub.webSocketPublish(topic, data, opts); - } catch (error) { - console.error(error); - throw error; - } - } - }; -}; -var CloudflareDurablePeer = class CloudflareDurablePeer extends Peer { - get peers() { - return new Set(this.#getwebsockets().map((ws) => CloudflareDurablePeer._restore(this._internal.durable, ws))); - } - #getwebsockets() { - return this._internal.durable.ctx.getWebSockets(); - } - send(data) { - return this._internal.ws.send(toBufferLike(data)); - } - subscribe(topic) { - super.subscribe(topic); - const state = getAttachedState(this._internal.ws); - if (!state.t) state.t = /* @__PURE__ */ new Set(); - state.t.add(topic); - setAttachedState(this._internal.ws, state); - } - publish(topic, data) { - const websockets = this.#getwebsockets(); - if (websockets.length < 2) return; - const dataBuff = toBufferLike(data); - for (const ws of websockets) { - if (ws === this._internal.ws) continue; - if (getAttachedState(ws).t?.has(topic)) ws.send(dataBuff); - } - } - close(code, reason) { - this._internal.ws.close(code, reason); - } - static _restore(durable, ws, request, namespace) { - let peer = ws._crosswsPeer; - if (peer) return peer; - const state = ws.deserializeAttachment() || {}; - peer = ws._crosswsPeer = new CloudflareDurablePeer({ - ws, - request: request || new StubRequest(state.u || ""), - namespace: namespace || state.n || "", - durable - }); - if (state.i) peer._id = state.i; - if (request?.url) state.u = request.url; - state.i = peer.id; - setAttachedState(ws, state); - return peer; - } -}; -var CloudflareFallbackPeer = class extends Peer { - send(data) { - this._internal.wsServer.send(toBufferLike(data)); - return 0; - } - publish(_topic, _message) { - console.warn("[crossws] [cloudflare] pub/sub support requires Durable Objects."); - } - close(code, reason) { - this._internal.ws.close(code, reason); - } -}; -function getAttachedState(ws) { - let state = ws._crosswsState; - if (state) return state; - state = ws.deserializeAttachment() || {}; - ws._crosswsState = state; - return state; -} -function setAttachedState(ws, state) { - ws._crosswsState = state; - ws.serializeAttachment(state); -} -export { cloudflareAdapter as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/deno.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/deno.d.mts deleted file mode 100644 index 4293580..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/deno.d.mts +++ /dev/null @@ -1,2 +0,0 @@ -import { n as DenoOptions, r as denoAdapter, t as DenoAdapter } from "../_chunks/deno.mjs"; -export { DenoAdapter, DenoOptions, denoAdapter as default }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/deno.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/deno.mjs deleted file mode 100644 index c776315..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/deno.mjs +++ /dev/null @@ -1,64 +0,0 @@ -import { i as AdapterHookable, r as getPeers, t as adapterUtils } from "../_chunks/adapter.mjs"; -import { n as Message, r as toBufferLike, t as Peer } from "../_chunks/peer.mjs"; -import { t as WSError } from "../_chunks/error.mjs"; -const denoAdapter = (options = {}) => { - if (typeof Deno === "undefined") throw new Error("[crossws] Using Deno adapter in an incompatible environment."); - const hooks = new AdapterHookable(options); - const globalPeers = /* @__PURE__ */ new Map(); - return { - ...adapterUtils(globalPeers), - handleUpgrade: async (request, info) => { - const { upgradeHeaders, endResponse, context, namespace } = await hooks.upgrade(request); - if (endResponse) return endResponse; - const headers = upgradeHeaders instanceof Headers ? upgradeHeaders : new Headers(upgradeHeaders); - const upgrade = Deno.upgradeWebSocket(request, { - headers, - protocol: headers.get("sec-websocket-protocol") ?? "" - }); - const peers = getPeers(globalPeers, namespace); - const peer = new DenoPeer({ - ws: upgrade.socket, - request, - peers, - denoInfo: info, - context, - namespace - }); - peers.add(peer); - upgrade.socket.addEventListener("open", () => { - hooks.callHook("open", peer); - }); - upgrade.socket.addEventListener("message", (event) => { - hooks.callHook("message", peer, new Message(event.data, peer, event)); - }); - upgrade.socket.addEventListener("close", () => { - peers.delete(peer); - hooks.callHook("close", peer, {}); - }); - upgrade.socket.addEventListener("error", (error) => { - peers.delete(peer); - hooks.callHook("error", peer, new WSError(error)); - }); - return upgrade.response; - } - }; -}; -var DenoPeer = class extends Peer { - get remoteAddress() { - return this._internal.denoInfo.remoteAddr?.hostname; - } - send(data) { - return this._internal.ws.send(toBufferLike(data)); - } - publish(topic, data) { - const dataBuff = toBufferLike(data); - for (const peer of this._internal.peers) if (peer !== this && peer._topics.has(topic)) peer._internal.ws.send(dataBuff); - } - close(code, reason) { - this._internal.ws.close(code, reason); - } - terminate() { - this._internal.ws.terminate(); - } -}; -export { denoAdapter as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/node.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/node.d.mts deleted file mode 100644 index 8ac030b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/node.d.mts +++ /dev/null @@ -1,2 +0,0 @@ -import { a as fromNodeUpgradeHandler, i as NodeUpgradeHandler, n as NodeOptions, r as nodeAdapter, t as NodeAdapter } from "../_chunks/node.mjs"; -export { NodeAdapter, NodeOptions, NodeUpgradeHandler, nodeAdapter as default, fromNodeUpgradeHandler }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/node.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/node.mjs deleted file mode 100644 index ff8a633..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/node.mjs +++ /dev/null @@ -1,2 +0,0 @@ -import { n as fromNodeUpgradeHandler, t as nodeAdapter } from "../_chunks/node.mjs"; -export { nodeAdapter as default, fromNodeUpgradeHandler }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/sse.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/sse.d.mts deleted file mode 100644 index 00cfa23..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/sse.d.mts +++ /dev/null @@ -1,2 +0,0 @@ -import { n as SSEOptions, r as sseAdapter, t as SSEAdapter } from "../_chunks/sse.mjs"; -export { SSEAdapter, SSEOptions, sseAdapter as default }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/sse.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/sse.mjs deleted file mode 100644 index dc48d37..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/sse.mjs +++ /dev/null @@ -1,97 +0,0 @@ -import { i as AdapterHookable, r as getPeers, t as adapterUtils } from "../_chunks/adapter.mjs"; -import { i as toString, n as Message, t as Peer } from "../_chunks/peer.mjs"; -const sseAdapter = (opts = {}) => { - const hooks = new AdapterHookable(opts); - const globalPeers = /* @__PURE__ */ new Map(); - const peersMap = opts.bidir ? /* @__PURE__ */ new Map() : void 0; - return { - ...adapterUtils(globalPeers), - fetch: async (request) => { - const { upgradeHeaders, endResponse, context, namespace } = await hooks.upgrade(request); - if (endResponse) return endResponse; - let peer; - if (opts.bidir && request.body && request.headers.has("x-crossws-id")) { - const id = request.headers.get("x-crossws-id"); - peer = peersMap?.get(id); - if (!peer) return new Response("invalid peer id", { status: 400 }); - const stream = request.body.pipeThrough(new TextDecoderStream()); - try { - for await (const chunk of stream) hooks.callHook("message", peer, new Message(chunk, peer)); - } catch { - await stream.cancel().catch(() => {}); - } - return new Response(null, {}); - } else { - const ws = new SSEWebSocketStub(); - const peers = getPeers(globalPeers, namespace); - peer = new SSEPeer({ - peers, - peersMap, - request, - hooks, - ws, - context, - namespace - }); - peers.add(peer); - if (opts.bidir) { - peersMap.set(peer.id, peer); - peer._sendEvent("crossws-id", peer.id); - } - } - let headers = { - "Content-Type": "text/event-stream", - "Cache-Control": "no-cache", - Connection: "keep-alive" - }; - if (opts.bidir) headers["x-crossws-id"] = peer.id; - if (upgradeHeaders) { - headers = new Headers(headers); - for (const [key, value] of new Headers(upgradeHeaders)) headers.set(key, value); - } - return new Response(peer._sseStream, { headers }); - } - }; -}; -var SSEPeer = class extends Peer { - _sseStream; - _sseStreamController; - constructor(_internal) { - super(_internal); - _internal.ws.readyState = 0; - this._sseStream = new ReadableStream({ - start: (controller) => { - _internal.ws.readyState = 1; - this._sseStreamController = controller; - _internal.hooks.callHook("open", this); - }, - cancel: () => { - _internal.ws.readyState = 2; - _internal.peers.delete(this); - _internal.peersMap?.delete(this.id); - Promise.resolve(this._internal.hooks.callHook("close", this)).finally(() => { - _internal.ws.readyState = 3; - }); - } - }).pipeThrough(new TextEncoderStream()); - } - _sendEvent(event, data) { - const lines = data.split("\n"); - this._sseStreamController?.enqueue(`event: ${event}\n${lines.map((l) => `data: ${l}`)}\n\n`); - } - send(data) { - this._sendEvent("message", toString(data)); - return 0; - } - publish(topic, data) { - const dataBuff = toString(data); - for (const peer of this._internal.peers) if (peer !== this && peer._topics.has(topic)) peer._sendEvent("message", dataBuff); - } - close() { - this._sseStreamController?.close(); - } -}; -var SSEWebSocketStub = class { - readyState; -}; -export { sseAdapter as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/uws.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/uws.d.mts deleted file mode 100644 index f27445e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/uws.d.mts +++ /dev/null @@ -1,57 +0,0 @@ -import { d as PeerContext, n as AdapterInstance, r as AdapterOptions, t as Adapter, u as Peer } from "../_chunks/adapter.mjs"; -import { a as WebSocket } from "../_chunks/web.mjs"; -import uws from "uWebSockets.js"; -declare const StubRequest: { - new (url: string, init?: RequestInit): Request; -}; -type UserData = { - peer?: UWSPeer; - req: uws.HttpRequest; - res: uws.HttpResponse; - webReq: UWSReqProxy; - protocol: string; - extensions: string; - context: PeerContext; - namespace: string; -}; -type WebSocketHandler = uws.WebSocketBehavior; -interface UWSAdapter extends AdapterInstance { - websocket: WebSocketHandler; -} -interface UWSOptions extends AdapterOptions { - uws?: Exclude, "close" | "drain" | "message" | "open" | "ping" | "pong" | "subscription" | "upgrade">; -} -declare const uwsAdapter: Adapter; -declare class UWSPeer extends Peer<{ - peers: Set; - request: UWSReqProxy; - namespace: string; - uws: uws.WebSocket; - ws: UwsWebSocketProxy; - uwsData: UserData; -}> { - get remoteAddress(): string | undefined; - get context(): PeerContext; - send(data: unknown, options?: { - compress?: boolean; - }): number; - subscribe(topic: string): void; - unsubscribe(topic: string): void; - publish(topic: string, message: string, options?: { - compress?: boolean; - }): number; - close(code?: number, reason?: uws.RecognizedString): void; - terminate(): void; -} -declare class UWSReqProxy extends StubRequest { - constructor(req: uws.HttpRequest); -} -declare class UwsWebSocketProxy implements Partial { - private _uws; - readyState?: number; - constructor(_uws: uws.WebSocket); - get bufferedAmount(): number; - get protocol(): string; - get extensions(): string; -} -export { UWSAdapter, UWSOptions, uwsAdapter as default }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/uws.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/uws.mjs deleted file mode 100644 index 52d6513..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/adapters/uws.mjs +++ /dev/null @@ -1,153 +0,0 @@ -import { i as AdapterHookable, r as getPeers, t as adapterUtils } from "../_chunks/adapter.mjs"; -import { n as Message, r as toBufferLike, t as Peer } from "../_chunks/peer.mjs"; -import { t as StubRequest } from "../_chunks/_request.mjs"; -const uwsAdapter = (options = {}) => { - const hooks = new AdapterHookable(options); - const globalPeers = /* @__PURE__ */ new Map(); - return { - ...adapterUtils(globalPeers), - websocket: { - ...options.uws, - close(ws, code, message) { - const peers = getPeers(globalPeers, ws.getUserData().namespace); - const peer = getPeer(ws, peers); - peer._internal.ws.readyState = 2; - peers.delete(peer); - hooks.callHook("close", peer, { - code, - reason: message?.toString() - }); - peer._internal.ws.readyState = 3; - }, - message(ws, message, _isBinary) { - const peer = getPeer(ws, getPeers(globalPeers, ws.getUserData().namespace)); - hooks.callHook("message", peer, new Message(message, peer)); - }, - open(ws) { - const peers = getPeers(globalPeers, ws.getUserData().namespace); - const peer = getPeer(ws, peers); - peers.add(peer); - hooks.callHook("open", peer); - }, - async upgrade(res, req, uwsContext) { - let aborted = false; - res.onAborted(() => { - aborted = true; - }); - const webReq = new UWSReqProxy(req); - const { upgradeHeaders, endResponse, context, namespace } = await hooks.upgrade(webReq); - if (endResponse) { - res.writeStatus(`${endResponse.status} ${endResponse.statusText}`); - for (const [key, value] of endResponse.headers) res.writeHeader(key, value); - if (endResponse.body) for await (const chunk of endResponse.body) { - if (aborted) break; - res.write(chunk); - } - if (!aborted) res.end(); - return; - } - if (aborted) return; - res.writeStatus("101 Switching Protocols"); - if (upgradeHeaders) { - const headers = upgradeHeaders instanceof Headers ? upgradeHeaders : new Headers(upgradeHeaders); - for (const [key, value] of headers) res.writeHeader(key, value); - } - res.cork(() => { - const key = req.getHeader("sec-websocket-key"); - const protocol = req.getHeader("sec-websocket-protocol"); - const extensions = req.getHeader("sec-websocket-extensions"); - res.upgrade({ - req, - res, - webReq, - protocol, - extensions, - context, - namespace - }, key, "", extensions, uwsContext); - }); - } - } - }; -}; -function getPeer(uws, peers) { - const uwsData = uws.getUserData(); - if (uwsData.peer) return uwsData.peer; - const peer = new UWSPeer({ - peers, - uws, - ws: new UwsWebSocketProxy(uws), - request: uwsData.webReq, - namespace: uwsData.namespace, - uwsData - }); - uwsData.peer = peer; - return peer; -} -var UWSPeer = class extends Peer { - get remoteAddress() { - try { - return new TextDecoder().decode(this._internal.uws.getRemoteAddressAsText()); - } catch {} - } - get context() { - return this._internal.uwsData.context; - } - send(data, options) { - const dataBuff = toBufferLike(data); - const isBinary = typeof dataBuff !== "string"; - return this._internal.uws.send(dataBuff, isBinary, options?.compress); - } - subscribe(topic) { - this._topics.add(topic); - this._internal.uws.subscribe(topic); - } - unsubscribe(topic) { - this._topics.delete(topic); - this._internal.uws.unsubscribe(topic); - } - publish(topic, message, options) { - const data = toBufferLike(message); - const isBinary = typeof data !== "string"; - this._internal.uws.publish(topic, data, isBinary, options?.compress); - return 0; - } - close(code, reason) { - this._internal.uws.end(code, reason); - } - terminate() { - this._internal.uws.close(); - } -}; -var UWSReqProxy = class extends StubRequest { - constructor(req) { - const rawHeaders = []; - let host = "localhost"; - let proto = "http"; - req.forEach((key, value) => { - if (key === "host") host = value; - else if (key === "x-forwarded-proto" && value === "https") proto = "https"; - rawHeaders.push([key, value]); - }); - const query = req.getQuery(); - const pathname = req.getUrl(); - const url = `${proto}://${host}${pathname}${query ? `?${query}` : ""}`; - super(url, { headers: rawHeaders }); - } -}; -var UwsWebSocketProxy = class { - readyState = 1; - constructor(_uws) { - this._uws = _uws; - } - get bufferedAmount() { - return this._uws?.getBufferedAmount(); - } - get protocol() { - return this._uws?.getUserData().protocol; - } - get extensions() { - return this._uws?.getUserData().extensions; - } -}; -export { uwsAdapter as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/index.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/index.d.mts deleted file mode 100644 index b2e2d20..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/index.d.mts +++ /dev/null @@ -1,82 +0,0 @@ -import { a as Hooks, c as Message, d as PeerContext, f as WSError, i as defineWebSocketAdapter, l as AdapterInternal, n as AdapterInstance, o as ResolveHooks, r as AdapterOptions, s as defineHooks, t as Adapter, u as Peer } from "./_chunks/adapter.mjs"; -import { n as WSOptions, t as ServerWithWSOptions } from "./_chunks/_types.mjs"; -interface WebSocketProxyOptions { - /** - * Target WebSocket URL to proxy to (`ws://` or `wss://`). - * - * Can be a static string/URL or a function that resolves the target dynamically - * based on the incoming {@link Peer}. - */ - target: string | URL | ((peer: Peer) => string | URL); - /** - * Forward the client's `sec-websocket-protocol` header to the upstream. - * - * @default true - */ - forwardProtocol?: boolean; - /** - * Maximum number of bytes buffered per peer while the upstream connection - * is still opening. If exceeded, the peer is closed with code `1009` - * (Message Too Big). Set to `0` to disable the limit. - * - * @default 1048576 (1 MiB) - */ - maxBufferSize?: number; - /** - * Milliseconds to wait for the upstream WebSocket handshake to complete. - * If the upstream does not open within the timeout, the peer is closed - * with code `1011`. Set to `0` to disable the timeout. - * - * @default 10000 - */ - connectTimeout?: number; - /** - * Custom `WebSocket` constructor used to dial the upstream. Useful when - * the runtime does not expose a global `WebSocket` (Node.js < 22) or - * when you want to use a different client implementation (e.g. `ws`, - * `undici`, a mock for tests). - * - * @default globalThis.WebSocket - */ - WebSocket?: typeof WebSocket; - /** - * Extra headers to send on the upstream handshake. Can be a static - * object or a resolver called per peer. - * - * Useful to forward identity from the incoming request (`cookie`, - * `authorization`, `origin`), or to inject a shared secret the - * upstream expects. - * - * > [!NOTE] - * > The WHATWG global `WebSocket` constructor does not accept custom - * > headers — this option is only honored by `WebSocket` constructors - * > that take a third options argument (e.g. `ws`, `undici`). Pass - * > one via the {@link WebSocket} option to use it. - * - * @example - * ```ts - * createWebSocketProxy({ - * target: "wss://backend.example.com", - * WebSocket: WsFromNodeWs, - * headers: (peer) => ({ - * cookie: peer.request.headers.get("cookie") ?? "", - * "x-forwarded-for": peer.remoteAddress ?? "", - * }), - * }); - * ``` - */ - headers?: HeadersInit | ((peer: Peer) => HeadersInit | undefined | void); -} -/** - * Create a set of crossws hooks that proxy incoming WebSocket connections - * to an upstream `ws://` or `wss://` target. - * - * @example - * ```ts - * import { createWebSocketProxy } from "crossws"; - * - * const hooks = createWebSocketProxy("wss://echo.websocket.org"); - * ``` - */ -declare function createWebSocketProxy(target: WebSocketProxyOptions["target"] | WebSocketProxyOptions): Partial; -export { type Adapter, type AdapterInstance, type AdapterInternal, type AdapterOptions, type Hooks, type Message, type Peer, type PeerContext, type ResolveHooks, type ServerWithWSOptions, type WSError, type WSOptions, type WebSocketProxyOptions, createWebSocketProxy, defineHooks, defineWebSocketAdapter }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/index.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/index.mjs deleted file mode 100644 index d66df28..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/index.mjs +++ /dev/null @@ -1,162 +0,0 @@ -import { a as defineHooks, n as defineWebSocketAdapter } from "./_chunks/adapter.mjs"; -const DEFAULT_MAX_BUFFER_SIZE = 1024 * 1024; -const DEFAULT_CONNECT_TIMEOUT = 1e4; -const TOKEN_RE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; -function createWebSocketProxy(target) { - const options = typeof target === "string" || target instanceof URL || typeof target === "function" ? { target } : target; - const WebSocketCtor = options.WebSocket ?? globalThis.WebSocket; - if (typeof WebSocketCtor !== "function") throw new TypeError("createWebSocketProxy requires a `WebSocket` constructor. Pass one via the `WebSocket` option, or use a runtime that provides a global `WebSocket` (Node.js >= 22, Bun, Deno, Cloudflare Workers, browsers)."); - const upstreams = /* @__PURE__ */ new Map(); - return { - upgrade(request) { - const reqProtocol = request.headers.get("sec-websocket-protocol"); - if (options.forwardProtocol === false || !reqProtocol) return; - const accepted = reqProtocol.split(",")[0].trim(); - if (!TOKEN_RE.test(accepted)) return; - return { headers: { "sec-websocket-protocol": accepted } }; - }, - open(peer) { - let ws; - try { - const url = _resolveTarget(options.target, peer); - const protocols = _resolveProtocols(peer, options.forwardProtocol); - const wsOptions = _resolveWsOptions(options.headers, peer); - ws = wsOptions ? new WebSocketCtor(url, protocols, wsOptions) : new WebSocketCtor(url, protocols); - ws.binaryType = "arraybuffer"; - } catch { - _safeClose(peer, 1011, "Upstream setup failed"); - return; - } - const state = { - ws, - buffer: [], - bufferSize: 0, - open: false, - timeout: void 0 - }; - upstreams.set(peer.id, state); - const timeoutMs = options.connectTimeout ?? DEFAULT_CONNECT_TIMEOUT; - if (timeoutMs > 0) state.timeout = setTimeout(() => { - if (upstreams.get(peer.id) !== state || state.open) return; - _cleanupState(upstreams, peer.id, state); - _safeClose(peer, 1011, "Upstream connect timeout"); - }, timeoutMs); - ws.addEventListener("open", () => { - _clearTimeout(state); - state.open = true; - for (const data of state.buffer) ws.send(data); - state.buffer.length = 0; - state.bufferSize = 0; - }); - ws.addEventListener("message", (event) => { - _safeSend(peer, event.data); - }); - ws.addEventListener("close", (event) => { - if (upstreams.get(peer.id) !== state) return; - _cleanupState(upstreams, peer.id, state); - _safeClose(peer, _remapIncomingCode(event.code), event.reason); - }); - ws.addEventListener("error", () => { - if (upstreams.get(peer.id) !== state) return; - _cleanupState(upstreams, peer.id, state); - _safeClose(peer, 1011, "Upstream error"); - }); - }, - message(peer, message) { - const state = upstreams.get(peer.id); - if (!state) return; - const raw = typeof message.rawData === "string" ? message.rawData : message.uint8Array(); - if (state.open) { - try { - state.ws.send(raw); - } catch {} - return; - } - const size = typeof raw === "string" ? raw.length * 3 : raw.byteLength; - const limit = options.maxBufferSize ?? DEFAULT_MAX_BUFFER_SIZE; - if (limit > 0 && state.bufferSize + size > limit) { - _cleanupState(upstreams, peer.id, state); - _safeClose(peer, 1009, "Proxy buffer limit exceeded"); - return; - } - state.buffer.push(typeof raw === "string" ? raw : Uint8Array.from(raw)); - state.bufferSize += size; - }, - close(peer, details) { - const state = upstreams.get(peer.id); - if (!state) return; - _clearTimeout(state); - upstreams.delete(peer.id); - try { - state.ws.close(_normalizeOutgoingCode(details.code), _truncateReason(details.reason)); - } catch {} - }, - error(peer) { - const state = upstreams.get(peer.id); - if (!state) return; - _clearTimeout(state); - upstreams.delete(peer.id); - try { - state.ws.close(1011, "Peer error"); - } catch {} - } - }; -} -function _cleanupState(upstreams, id, state) { - _clearTimeout(state); - upstreams.delete(id); - try { - state.ws.close(); - } catch {} -} -function _clearTimeout(state) { - if (state.timeout !== void 0) { - clearTimeout(state.timeout); - state.timeout = void 0; - } -} -function _resolveTarget(target, peer) { - const raw = typeof target === "function" ? target(peer) : target; - return raw instanceof URL ? raw : new URL(raw); -} -function _resolveWsOptions(headers, peer) { - if (!headers) return; - const resolved = typeof headers === "function" ? headers(peer) : headers; - if (!resolved) return; - return { headers: resolved }; -} -function _resolveProtocols(peer, forwardProtocol) { - if (forwardProtocol === false) return; - const header = peer.request?.headers.get("sec-websocket-protocol"); - if (!header) return; - return header.split(",").map((p) => p.trim()).filter(Boolean); -} -function _safeClose(peer, code, reason) { - try { - peer.close(code, _truncateReason(reason)); - } catch {} -} -function _safeSend(peer, data) { - try { - peer.send(data); - } catch {} -} -function _truncateReason(reason) { - if (!reason) return reason; - const bytes = new TextEncoder().encode(reason); - if (bytes.length <= 123) return reason; - return new TextDecoder("utf-8", { fatal: false }).decode(bytes.subarray(0, 123)); -} -function _remapIncomingCode(code) { - if (code === void 0) return void 0; - if (code === 1005) return 1e3; - if (code === 1006 || code === 1015) return 1011; - return code; -} -function _normalizeOutgoingCode(code) { - if (code === void 0) return void 0; - if (code === 1e3) return 1e3; - if (code >= 3e3 && code <= 4999) return code; - return 1e3; -} -export { createWebSocketProxy, defineHooks, defineWebSocketAdapter }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bun.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bun.d.mts deleted file mode 100644 index 4b2d931..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bun.d.mts +++ /dev/null @@ -1,5 +0,0 @@ -import { n as WSOptions, t as ServerWithWSOptions } from "../_chunks/_types.mjs"; -import { Server, ServerPlugin } from "srvx"; -declare function plugin(wsOpts: WSOptions): ServerPlugin; -declare function serve(options: ServerWithWSOptions): Server; -export { plugin, serve }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bun.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bun.mjs deleted file mode 100644 index 1dc731d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bun.mjs +++ /dev/null @@ -1,26 +0,0 @@ -import bunAdapter from "../adapters/bun.mjs"; -import { serve as serve$1 } from "srvx/bun"; -function plugin(wsOpts) { - return (server) => { - const ws = bunAdapter({ - hooks: wsOpts, - resolve: wsOpts.resolve, - ...wsOpts.options?.bun - }); - server.options.middleware.unshift((req, next) => { - if (req.headers.get("upgrade")?.toLowerCase() === "websocket") return ws.handleUpgrade(req, req.runtime.bun.server); - return next(); - }); - server.options.bun ??= {}; - if (server.options.bun.websocket) throw new Error("websocket handlers for bun already set!"); - server.options.bun.websocket = ws.websocket; - }; -} -function serve(options) { - if (options.websocket) { - options.plugins ||= []; - options.plugins.push(plugin(options.websocket)); - } - return serve$1(options); -} -export { plugin, serve }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bunny.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bunny.d.mts deleted file mode 100644 index 4b2d931..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bunny.d.mts +++ /dev/null @@ -1,5 +0,0 @@ -import { n as WSOptions, t as ServerWithWSOptions } from "../_chunks/_types.mjs"; -import { Server, ServerPlugin } from "srvx"; -declare function plugin(wsOpts: WSOptions): ServerPlugin; -declare function serve(options: ServerWithWSOptions): Server; -export { plugin, serve }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bunny.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bunny.mjs deleted file mode 100644 index 41f5b73..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/bunny.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import bunnyAdapter from "../adapters/bunny.mjs"; -import { serve as serve$1 } from "srvx/bunny"; -function plugin(wsOpts) { - return (server) => { - const ws = bunnyAdapter({ - hooks: wsOpts, - resolve: wsOpts.resolve, - ...wsOpts.options?.bunny - }); - server.options.middleware.unshift((req, next) => { - if (req.headers.get("upgrade")?.toLowerCase() === "websocket") return ws.handleUpgrade(req); - return next(); - }); - }; -} -function serve(options) { - if (options.websocket) { - options.plugins ||= []; - options.plugins.push(plugin(options.websocket)); - } - return serve$1(options); -} -export { plugin, serve }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/cloudflare.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/cloudflare.d.mts deleted file mode 100644 index 4b2d931..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/cloudflare.d.mts +++ /dev/null @@ -1,5 +0,0 @@ -import { n as WSOptions, t as ServerWithWSOptions } from "../_chunks/_types.mjs"; -import { Server, ServerPlugin } from "srvx"; -declare function plugin(wsOpts: WSOptions): ServerPlugin; -declare function serve(options: ServerWithWSOptions): Server; -export { plugin, serve }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/cloudflare.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/cloudflare.mjs deleted file mode 100644 index d58b0ea..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/cloudflare.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import cloudflareAdapter from "../adapters/cloudflare.mjs"; -import { serve as serve$1 } from "srvx/cloudflare"; -function plugin(wsOpts) { - return (server) => { - const ws = cloudflareAdapter({ - hooks: wsOpts, - resolve: wsOpts.resolve, - ...wsOpts.options?.cloudflare - }); - server.options.middleware.unshift((req, next) => { - if (req.headers.get("upgrade")?.toLowerCase() === "websocket") return ws.handleUpgrade(req, req.runtime.cloudflare.env, req.runtime.cloudflare.context); - return next(); - }); - }; -} -function serve(options) { - if (options.websocket) { - options.plugins ||= []; - options.plugins.push(plugin(options.websocket)); - } - return serve$1(options); -} -export { plugin, serve }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/default.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/default.d.mts deleted file mode 100644 index 4b2d931..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/default.d.mts +++ /dev/null @@ -1,5 +0,0 @@ -import { n as WSOptions, t as ServerWithWSOptions } from "../_chunks/_types.mjs"; -import { Server, ServerPlugin } from "srvx"; -declare function plugin(wsOpts: WSOptions): ServerPlugin; -declare function serve(options: ServerWithWSOptions): Server; -export { plugin, serve }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/default.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/default.mjs deleted file mode 100644 index c2f1e08..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/default.mjs +++ /dev/null @@ -1,24 +0,0 @@ -import sseAdapter from "../adapters/sse.mjs"; -import { serve as serve$1 } from "srvx"; -function plugin(wsOpts) { - const ws = sseAdapter({ - hooks: wsOpts, - resolve: wsOpts.resolve, - ...wsOpts.options?.sse - }); - console.warn("[crossws] Using SSE adapter for WebSocket support. This requires a custom WebSocket client (https://crossws.h3.dev/adapters/sse)."); - return (server) => { - server.options.middleware.unshift((req, next) => { - if (req.headers.get("upgrade")?.toLowerCase() === "websocket") return ws.fetch(req); - return next(); - }); - }; -} -function serve(options) { - if (options.websocket) { - options.plugins ||= []; - options.plugins.push(plugin(options.websocket)); - } - return serve$1(options); -} -export { plugin, serve }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/deno.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/deno.d.mts deleted file mode 100644 index 4b2d931..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/deno.d.mts +++ /dev/null @@ -1,5 +0,0 @@ -import { n as WSOptions, t as ServerWithWSOptions } from "../_chunks/_types.mjs"; -import { Server, ServerPlugin } from "srvx"; -declare function plugin(wsOpts: WSOptions): ServerPlugin; -declare function serve(options: ServerWithWSOptions): Server; -export { plugin, serve }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/deno.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/deno.mjs deleted file mode 100644 index 6947dad..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/deno.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import denoAdapter from "../adapters/deno.mjs"; -import { serve as serve$1 } from "srvx/deno"; -function plugin(wsOpts) { - return (server) => { - const ws = denoAdapter({ - hooks: wsOpts, - resolve: wsOpts.resolve, - ...wsOpts.options?.deno - }); - server.options.middleware.unshift((req, next) => { - if (req.headers.get("upgrade")?.toLowerCase() === "websocket") return ws.handleUpgrade(req, req.runtime.deno.info); - return next(); - }); - }; -} -function serve(options) { - if (options.websocket) { - options.plugins ||= []; - options.plugins.push(plugin(options.websocket)); - } - return serve$1(options); -} -export { plugin, serve }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/node.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/node.d.mts deleted file mode 100644 index 4b2d931..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/node.d.mts +++ /dev/null @@ -1,5 +0,0 @@ -import { n as WSOptions, t as ServerWithWSOptions } from "../_chunks/_types.mjs"; -import { Server, ServerPlugin } from "srvx"; -declare function plugin(wsOpts: WSOptions): ServerPlugin; -declare function serve(options: ServerWithWSOptions): Server; -export { plugin, serve }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/node.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/node.mjs deleted file mode 100644 index 2e7e305..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/server/node.mjs +++ /dev/null @@ -1,32 +0,0 @@ -import { t as nodeAdapter } from "../_chunks/node.mjs"; -import { NodeRequest, serve as serve$1 } from "srvx/node"; -function plugin(wsOpts) { - return (server) => { - const ws = nodeAdapter({ - hooks: wsOpts, - resolve: wsOpts.resolve, - ...wsOpts.options?.deno - }); - const originalServe = server.serve; - server.serve = () => { - server.node?.server.on("upgrade", (req, socket, head) => { - ws.handleUpgrade(req, socket, head, new NodeRequest({ - req, - upgrade: { - socket, - head - } - })); - }); - return originalServe.call(server); - }; - }; -} -function serve(options) { - if (options.websocket) { - options.plugins ||= []; - options.plugins.push(plugin(options.websocket)); - } - return serve$1(options); -} -export { plugin, serve }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/native.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/native.d.mts deleted file mode 100644 index 69a7939..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/native.d.mts +++ /dev/null @@ -1,2 +0,0 @@ -declare const WebSocket: typeof globalThis.WebSocket; -export { WebSocket as default }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/native.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/native.mjs deleted file mode 100644 index 891f339..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/native.mjs +++ /dev/null @@ -1,2 +0,0 @@ -const WebSocket = globalThis.WebSocket; -export { WebSocket as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/node.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/node.d.mts deleted file mode 100644 index 1c7b45c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/node.d.mts +++ /dev/null @@ -1,2 +0,0 @@ -declare const Websocket: typeof globalThis.WebSocket; -export { Websocket as default }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/node.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/node.mjs deleted file mode 100644 index 9983dcc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/node.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import { t as import_websocket } from "../_chunks/libs/ws.mjs"; -const Websocket = globalThis.WebSocket || import_websocket.default; -export { Websocket as default }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/sse.d.mts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/sse.d.mts deleted file mode 100644 index 7c8c407..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/sse.d.mts +++ /dev/null @@ -1,39 +0,0 @@ -import { a as WebSocket, i as MessageEvent, n as Event, r as EventTarget, t as CloseEvent } from "../_chunks/web.mjs"; -type Ctor = { - prototype: T; - new (): T; -}; -declare const _EventTarget: Ctor; -interface WebSocketSSEOptions { - protocols?: string | string[]; - /** enabled by default */ - bidir?: boolean; - /** enabled by default */ - stream?: boolean; - headers?: HeadersInit; -} -declare class WebSocketSSE extends _EventTarget implements WebSocket { - #private; - static CONNECTING: number; - static OPEN: number; - static CLOSING: number; - static CLOSED: number; - readonly CONNECTING = 0; - readonly OPEN = 1; - readonly CLOSING = 2; - readonly CLOSED = 3; - onclose: ((this: WebSocket, ev: CloseEvent) => any) | null; - onerror: ((this: WebSocket, ev: Event) => any) | null; - onopen: ((this: WebSocket, ev: Event) => any) | null; - onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null; - binaryType: BinaryType; - readyState: number; - readonly url: string; - readonly protocol: string; - readonly extensions: string; - readonly bufferedAmount: number; - constructor(url: string, init?: string | string[] | WebSocketSSEOptions); - close(_code?: number, _reason?: string): void; - send(data: any): Promise; -} -export { WebSocketSSE, WebSocketSSEOptions }; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/sse.mjs b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/sse.mjs deleted file mode 100644 index bfce172..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/dist/websocket/sse.mjs +++ /dev/null @@ -1,113 +0,0 @@ -const _EventTarget = EventTarget; -const defaultOptions = Object.freeze({ - bidir: true, - stream: true -}); -var WebSocketSSE = class WebSocketSSE extends _EventTarget { - static CONNECTING = 0; - static OPEN = 1; - static CLOSING = 2; - static CLOSED = 3; - CONNECTING = 0; - OPEN = 1; - CLOSING = 2; - CLOSED = 3; - onclose = null; - onerror = null; - onopen = null; - onmessage = null; - binaryType = "blob"; - readyState = WebSocketSSE.CONNECTING; - url; - protocol = ""; - extensions = ""; - bufferedAmount = 0; - #options = {}; - #sse; - #id; - #sendController; - #queue = []; - constructor(url, init) { - super(); - this.url = url.replace(/^ws/, "http"); - if (typeof init === "string") this.#options = { - ...defaultOptions, - protocols: init - }; - else if (Array.isArray(init)) this.#options = { - ...defaultOptions, - protocols: init - }; - else this.#options = { - ...defaultOptions, - ...init - }; - this.#sse = new EventSource(this.url); - this.#sse.addEventListener("open", (_sseEvent) => { - this.readyState = WebSocketSSE.OPEN; - const event = new Event("open"); - this.onopen?.(event); - this.dispatchEvent(event); - }); - this.#sse.addEventListener("message", (sseEvent) => { - const _event = new MessageEvent("message", { data: sseEvent.data }); - this.onmessage?.(_event); - this.dispatchEvent(_event); - }); - if (this.#options.bidir) this.#sse.addEventListener("crossws-id", (sseEvent) => { - this.#id = sseEvent.data; - if (this.#options.stream) fetch(this.url, { - method: "POST", - duplex: "half", - headers: { - "content-type": "application/octet-stream", - "x-crossws-id": this.#id - }, - body: new ReadableStream({ - start: (controller) => { - this.#sendController = controller; - }, - cancel: () => { - this.#sendController = void 0; - } - }).pipeThrough(new TextEncoderStream()) - }).catch(() => {}); - for (const data of this.#queue) this.send(data); - this.#queue = []; - }); - this.#sse.addEventListener("error", (_sseEvent) => { - const event = new Event("error"); - this.onerror?.(event); - this.dispatchEvent(event); - }); - this.#sse.addEventListener("close", (_sseEvent) => { - this.readyState = WebSocketSSE.CLOSED; - const event = new Event("close"); - this.onclose?.(event); - this.dispatchEvent(event); - }); - } - close(_code, _reason) { - this.readyState = WebSocketSSE.CLOSING; - this.#sse.close(); - this.readyState = WebSocketSSE.CLOSED; - } - async send(data) { - if (!this.#options.bidir) throw new Error("bdir option is not enabled!"); - if (this.readyState !== WebSocketSSE.OPEN) throw new Error("WebSocket is not open!"); - if (!this.#id) { - this.#queue.push(data); - return; - } - if (this.#sendController) { - this.#sendController.enqueue(data); - return; - } - await fetch(this.url, { - method: "POST", - headers: { "x-crossws-id": this.#id }, - body: data - }); - } -}; -export { WebSocketSSE }; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/package.json b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/package.json deleted file mode 100644 index bf4ad42..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/package.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "name": "crossws", - "version": "0.4.5", - "description": "Cross-platform WebSocket Servers for Node.js, Deno, Bun and Cloudflare Workers", - "homepage": "https://crossws.h3.dev", - "license": "MIT", - "repository": "h3js/crossws", - "files": [ - "dist", - "adapters", - "websocket", - "server", - "*.d.ts" - ], - "type": "module", - "sideEffects": false, - "main": "./dist/index.mjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.mts", - "exports": { - ".": "./dist/index.mjs", - "./adapters/bun": "./dist/adapters/bun.mjs", - "./adapters/bunny": "./dist/adapters/bunny.mjs", - "./adapters/deno": "./dist/adapters/deno.mjs", - "./adapters/cloudflare": "./dist/adapters/cloudflare.mjs", - "./adapters/sse": "./dist/adapters/sse.mjs", - "./adapters/node": "./dist/adapters/node.mjs", - "./adapters/uws": "./dist/adapters/uws.mjs", - "./server/bun": "./dist/server/bun.mjs", - "./server/bunny": "./dist/server/bunny.mjs", - "./server/deno": "./dist/server/deno.mjs", - "./server/node": "./dist/server/node.mjs", - "./server": { - "deno": "./dist/server/deno.mjs", - "bun": "./dist/server/bun.mjs", - "workerd": "./dist/server/cloudflare.mjs", - "node": "./dist/server/node.mjs", - "default": "./dist/server/default.mjs" - }, - "./websocket/sse": "./dist/websocket/sse.mjs", - "./websocket": { - "browser": "./dist/websocket/native.mjs", - "worker": "./dist/websocket/native.mjs", - "bun": "./dist/websocket/native.mjs", - "deno": "./dist/websocket/native.mjs", - "edge-light": "./dist/websocket/native.mjs", - "workerd": "./dist/websocket/native.mjs", - "node": "./dist/websocket/node.mjs", - "default": "./dist/websocket/native.mjs" - } - }, - "scripts": { - "build": "obuild", - "dev": "vitest", - "lint": "oxlint . && oxfmt --check src test", - "fmt": "oxlint . --fix && oxfmt src test", - "prepack": "pnpm run build", - "play:bun": "bun --watch test/fixture/bun.ts", - "play:cf": "wrangler dev --port 3001 -c test/fixture/wrangler.toml", - "play:cf-durable": "wrangler dev --port 3001 -c test/fixture/wrangler-durable.toml", - "play:deno": "deno run --watch --unstable-byonm -A test/fixture/deno.ts", - "play:node": "jiti test/fixture/node.ts", - "play:sse": "deno run --unstable-byonm -A --watch test/fixture/sse.ts", - "play:uws": "jiti test/fixture/uws.ts", - "release": "pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags", - "test": "pnpm lint && pnpm typecheck && vitest run --coverage", - "typecheck": "tsgo --noEmit --skipLibCheck" - }, - "devDependencies": { - "@cloudflare/workers-types": "^4.20260410.1", - "@types/bun": "^1.3.12", - "@types/deno": "^2.5.0", - "@types/node": "^25.6.0", - "@types/web": "^0.0.345", - "@types/ws": "^8.18.1", - "@typescript/native-preview": "^7.0.0-dev.20260410.1", - "@vitest/coverage-v8": "^4.1.4", - "automd": "^0.4.3", - "changelogen": "^0.6.2", - "consola": "^3.4.2", - "eslint-config-unjs": "^0.6.2", - "eventsource": "^4.1.0", - "execa": "^9.6.1", - "get-port-please": "^3.2.0", - "h3": "^2.0.1-rc.20", - "jiti": "^2.6.1", - "listhen": "^1.9.1", - "obuild": "^0.4.33", - "oxfmt": "^0.44.0", - "oxlint": "^1.59.0", - "srvx": "^0.11.15", - "typescript": "^6.0.2", - "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.57.0", - "unbuild": "^3.6.1", - "undici": "^8.0.2", - "vitest": "^4.1.4", - "wrangler": "^4.81.1", - "ws": "^8.20.0" - }, - "peerDependencies": { - "srvx": ">=0.11.5" - }, - "peerDependenciesMeta": { - "srvx": { - "optional": true - } - }, - "resolutions": { - "crossws": "workspace:*" - }, - "packageManager": "pnpm@10.33.0", - "pnpm": { - "ignoredBuiltDependencies": [ - "@parcel/watcher", - "esbuild", - "sharp", - "workerd" - ], - "onlyBuiltDependencies": [ - "@parcel/watcher", - "esbuild", - "sharp", - "workerd" - ] - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server.d.ts deleted file mode 100644 index 83c569f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./dist/server/node.mjs"; -export { default } from "./dist/server/node.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/bun.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/bun.d.ts deleted file mode 100644 index 8e51b41..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/bun.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/server/bun.mjs"; -export { default } from "../dist/server/bun.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/bunny.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/bunny.d.ts deleted file mode 100644 index 866093a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/bunny.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/server/bunny.mjs"; -export { default } from "../dist/server/bunny.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/deno.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/deno.d.ts deleted file mode 100644 index 2ad867d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/deno.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/server/deno.mjs"; -export { default } from "../dist/server/deno.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/node.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/node.d.ts deleted file mode 100644 index a970b6b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/server/node.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/server/node.mjs"; -export { default } from "../dist/server/node.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/websocket.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/websocket.d.ts deleted file mode 100644 index 39e6990..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/websocket.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./dist/websocket/native.mjs"; -export { default } from "./dist/websocket/native.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/websocket/sse.d.ts b/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/websocket/sse.d.ts deleted file mode 100644 index 9d2882e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/crossws@0.4.5/node_modules/crossws/websocket/sse.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../dist/websocket/sse.mjs"; -export { default } from "../dist/websocket/sse.mjs"; diff --git a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/LICENSE b/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/LICENSE deleted file mode 100644 index 1a9820e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/README.md b/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/README.md deleted file mode 100644 index 9ebdfbf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/README.md +++ /dev/null @@ -1,481 +0,0 @@ -# debug -[![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm - -#### Windows command prompt notes - -##### CMD - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) - -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` - -Then, run the program to be debugged as usual. - -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - - - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. - - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - -## Usage in child processes - -Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. -For example: - -```javascript -worker = fork(WORKER_WRAP_PATH, [workerPath], { - stdio: [ - /* stdin: */ 0, - /* stdout: */ 'pipe', - /* stderr: */ 'pipe', - 'ipc', - ], - env: Object.assign({}, process.env, { - DEBUG_COLORS: 1 // without this settings, colors won't be shown - }), -}); - -worker.stderr.pipe(process.stderr, { end: false }); -``` - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - - Josh Junon - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/package.json b/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/package.json deleted file mode 100644 index ee8abb5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "debug", - "version": "4.4.3", - "repository": { - "type": "git", - "url": "git://github.com/debug-js/debug.git" - }, - "description": "Lightweight debugging utility for Node.js and the browser", - "keywords": [ - "debug", - "log", - "debugger" - ], - "files": [ - "src", - "LICENSE", - "README.md" - ], - "author": "Josh Junon (https://github.com/qix-)", - "contributors": [ - "TJ Holowaychuk ", - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser && npm run lint", - "test:node": "mocha test.js test.node.js", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls" - }, - "dependencies": { - "ms": "^2.1.3" - }, - "devDependencies": { - "brfs": "^2.0.1", - "browserify": "^16.2.3", - "coveralls": "^3.0.2", - "karma": "^3.1.4", - "karma-browserify": "^6.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "sinon": "^14.0.0", - "xo": "^0.23.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "engines": { - "node": ">=6.0" - }, - "xo": { - "rules": { - "import/extensions": "off" - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js b/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js deleted file mode 100644 index 5993451..0000000 --- a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js +++ /dev/null @@ -1,272 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - let m; - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - // eslint-disable-next-line no-return-assign - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; diff --git a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js b/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js deleted file mode 100644 index 141cb57..0000000 --- a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js +++ /dev/null @@ -1,292 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - const split = (typeof namespaces === 'string' ? namespaces : '') - .trim() - .replace(/\s+/g, ',') - .split(',') - .filter(Boolean); - - for (const ns of split) { - if (ns[0] === '-') { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - - /** - * Checks if the given string matches a namespace template, honoring - * asterisks as wildcards. - * - * @param {String} search - * @param {String} template - * @return {Boolean} - */ - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { - // Match character or proceed with wildcard - if (template[templateIndex] === '*') { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; // Skip the '*' - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition - // Backtrack to the last '*' and try to match more characters - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; // No match - } - } - - // Handle trailing '*' in template - while (templateIndex < template.length && template[templateIndex] === '*') { - templateIndex++; - } - - return templateIndex === template.length; - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name, skip)) { - return false; - } - } - - for (const ns of createDebug.names) { - if (matchesTemplate(name, ns)) { - return true; - } - } - - return false; - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js b/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js b/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js deleted file mode 100644 index 715560a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/ms b/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/ms deleted file mode 120000 index e1d5029..0000000 --- a/services/hocuspocus/node_modules/.pnpm/debug@4.4.3/node_modules/ms +++ /dev/null @@ -1 +0,0 @@ -../../ms@2.1.3/node_modules/ms \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/index.d.ts b/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/index.d.ts deleted file mode 100644 index c0be175..0000000 --- a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/// -import {IncomingMessage} from 'http'; - -/** -Decompress a HTTP response if needed. - -@param response - The HTTP incoming stream with compressed data. -@returns The decompressed HTTP response stream. - -@example -``` -import {http} from 'http'; -import decompressResponse = require('decompress-response'); - -http.get('https://sindresorhus.com', response => { - response = decompressResponse(response); -}); -``` -*/ -declare function decompressResponse(response: IncomingMessage): IncomingMessage; - -export = decompressResponse; diff --git a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/index.js b/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/index.js deleted file mode 100644 index c861036..0000000 --- a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/index.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; -const {Transform, PassThrough} = require('stream'); -const zlib = require('zlib'); -const mimicResponse = require('mimic-response'); - -module.exports = response => { - const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase(); - - if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) { - return response; - } - - // TODO: Remove this when targeting Node.js 12. - const isBrotli = contentEncoding === 'br'; - if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') { - response.destroy(new Error('Brotli is not supported on Node.js < 12')); - return response; - } - - let isEmpty = true; - - const checker = new Transform({ - transform(data, _encoding, callback) { - isEmpty = false; - - callback(null, data); - }, - - flush(callback) { - callback(); - } - }); - - const finalStream = new PassThrough({ - autoDestroy: false, - destroy(error, callback) { - response.destroy(); - - callback(error); - } - }); - - const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip(); - - decompressStream.once('error', error => { - if (isEmpty && !response.readable) { - finalStream.end(); - return; - } - - finalStream.destroy(error); - }); - - mimicResponse(response, finalStream); - response.pipe(checker).pipe(decompressStream).pipe(finalStream); - - return finalStream; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/license b/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/license deleted file mode 100644 index fa7ceba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/package.json b/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/package.json deleted file mode 100644 index 57df889..0000000 --- a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "decompress-response", - "version": "6.0.0", - "description": "Decompress a HTTP response if needed", - "license": "MIT", - "repository": "sindresorhus/decompress-response", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "decompress", - "response", - "http", - "https", - "zlib", - "gzip", - "zip", - "deflate", - "unzip", - "ungzip", - "incoming", - "message", - "stream", - "compressed", - "brotli" - ], - "dependencies": { - "mimic-response": "^3.1.0" - }, - "devDependencies": { - "@types/node": "^14.0.1", - "ava": "^2.2.0", - "get-stream": "^5.0.0", - "pify": "^5.0.0", - "tsd": "^0.11.0", - "xo": "^0.30.0" - }, - "xo": { - "rules": { - "@typescript-eslint/prefer-readonly-parameter-types": "off" - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/readme.md b/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/readme.md deleted file mode 100644 index 58523ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/readme.md +++ /dev/null @@ -1,48 +0,0 @@ -# decompress-response [![Build Status](https://travis-ci.com/sindresorhus/decompress-response.svg?branch=master)](https://travis-ci.com/sindresorhus/decompress-response) - -> Decompress a HTTP response if needed - -Decompresses the [response](https://nodejs.org/api/http.html#http_class_http_incomingmessage) from [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) if it's gzipped, deflated or compressed with Brotli, otherwise just passes it through. - -Used by [`got`](https://github.com/sindresorhus/got). - -## Install - -``` -$ npm install decompress-response -``` - -## Usage - -```js -const http = require('http'); -const decompressResponse = require('decompress-response'); - -http.get('https://sindresorhus.com', response => { - response = decompressResponse(response); -}); -``` - -## API - -### decompressResponse(response) - -Returns the decompressed HTTP response stream. - -#### response - -Type: [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -The HTTP incoming stream with compressed data. - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/mimic-response b/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/mimic-response deleted file mode 120000 index d0350bd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/decompress-response@6.0.0/node_modules/mimic-response +++ /dev/null @@ -1 +0,0 @@ -../../mimic-response@3.1.0/node_modules/mimic-response \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/CHANGELOG.md deleted file mode 100644 index dd13ec1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/CHANGELOG.md +++ /dev/null @@ -1,46 +0,0 @@ -Changelog -========= - -v0.6.0 ------- - -- Updated "devDependencies" versions to fix vulnerability alerts -- Dropped support of io.js and node.js v0.12.x and lower since new versions of - "devDependencies" couldn't work with those old node.js versions - (minimal supported version of node.js now is v4.0.0) - -v0.5.1 ------- - -- Fix prototype pollution vulnerability (thanks to @mwakerman for the PR) -- Avoid using deprecated Buffer API (thanks to @ChALkeR for the PR) - -v0.5.0 ------- - -- Auto-testing provided by Travis CI; -- Support older Node.JS versions (`v0.11.x` and `v0.10.x`); -- Removed tests files from npm package. - -v0.4.2 ------- - -- Fix for `null` as an argument. - -v0.4.1 ------- - -- Removed test code from npm package - ([see pull request #21](https://github.com/unclechu/node-deep-extend/pull/21)); -- Increased minimal version of Node from `0.4.0` to `0.12.0` - (because can't run tests on lesser version anyway). - -v0.4.0 ------- - -- **WARNING!** Broken backward compatibility with `v0.3.x`; -- Fixed bug with extending arrays instead of cloning; -- Deep cloning for arrays; -- Check for own property; -- Fixed some documentation issues; -- Strict JS mode. diff --git a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/LICENSE b/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/LICENSE deleted file mode 100644 index 5c58916..0000000 --- a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2018, Viacheslav Lotsmanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/README.md b/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/README.md deleted file mode 100644 index 67c7fc0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/README.md +++ /dev/null @@ -1,91 +0,0 @@ -Deep Extend -=========== - -Recursive object extending. - -[![Build Status](https://api.travis-ci.org/unclechu/node-deep-extend.svg?branch=master)](https://travis-ci.org/unclechu/node-deep-extend) - -[![NPM](https://nodei.co/npm/deep-extend.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/deep-extend/) - -Install -------- - -```bash -$ npm install deep-extend -``` - -Usage ------ - -```javascript -var deepExtend = require('deep-extend'); -var obj1 = { - a: 1, - b: 2, - d: { - a: 1, - b: [], - c: { test1: 123, test2: 321 } - }, - f: 5, - g: 123, - i: 321, - j: [1, 2] -}; -var obj2 = { - b: 3, - c: 5, - d: { - b: { first: 'one', second: 'two' }, - c: { test2: 222 } - }, - e: { one: 1, two: 2 }, - f: [], - g: (void 0), - h: /abc/g, - i: null, - j: [3, 4] -}; - -deepExtend(obj1, obj2); - -console.log(obj1); -/* -{ a: 1, - b: 3, - d: - { a: 1, - b: { first: 'one', second: 'two' }, - c: { test1: 123, test2: 222 } }, - f: [], - g: undefined, - c: 5, - e: { one: 1, two: 2 }, - h: /abc/g, - i: null, - j: [3, 4] } -*/ -``` - -Unit testing ------------- - -```bash -$ npm test -``` - -Changelog ---------- - -[CHANGELOG.md](./CHANGELOG.md) - -Any issues? ------------ - -Please, report about issues -[here](https://github.com/unclechu/node-deep-extend/issues). - -License -------- - -[MIT](./LICENSE) diff --git a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/index.js b/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/index.js deleted file mode 100644 index 762d81e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/deep-extend'); diff --git a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/lib/deep-extend.js b/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/lib/deep-extend.js deleted file mode 100644 index 651fd8d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/lib/deep-extend.js +++ /dev/null @@ -1,150 +0,0 @@ -/*! - * @description Recursive object extending - * @author Viacheslav Lotsmanov - * @license MIT - * - * The MIT License (MIT) - * - * Copyright (c) 2013-2018 Viacheslav Lotsmanov - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -'use strict'; - -function isSpecificValue(val) { - return ( - val instanceof Buffer - || val instanceof Date - || val instanceof RegExp - ) ? true : false; -} - -function cloneSpecificValue(val) { - if (val instanceof Buffer) { - var x = Buffer.alloc - ? Buffer.alloc(val.length) - : new Buffer(val.length); - val.copy(x); - return x; - } else if (val instanceof Date) { - return new Date(val.getTime()); - } else if (val instanceof RegExp) { - return new RegExp(val); - } else { - throw new Error('Unexpected situation'); - } -} - -/** - * Recursive cloning array. - */ -function deepCloneArray(arr) { - var clone = []; - arr.forEach(function (item, index) { - if (typeof item === 'object' && item !== null) { - if (Array.isArray(item)) { - clone[index] = deepCloneArray(item); - } else if (isSpecificValue(item)) { - clone[index] = cloneSpecificValue(item); - } else { - clone[index] = deepExtend({}, item); - } - } else { - clone[index] = item; - } - }); - return clone; -} - -function safeGetProperty(object, property) { - return property === '__proto__' ? undefined : object[property]; -} - -/** - * Extening object that entered in first argument. - * - * Returns extended object or false if have no target object or incorrect type. - * - * If you wish to clone source object (without modify it), just use empty new - * object as first argument, like this: - * deepExtend({}, yourObj_1, [yourObj_N]); - */ -var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) { - if (arguments.length < 1 || typeof arguments[0] !== 'object') { - return false; - } - - if (arguments.length < 2) { - return arguments[0]; - } - - var target = arguments[0]; - - // convert arguments to array and cut off target object - var args = Array.prototype.slice.call(arguments, 1); - - var val, src, clone; - - args.forEach(function (obj) { - // skip argument if isn't an object, is null, or is an array - if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) { - return; - } - - Object.keys(obj).forEach(function (key) { - src = safeGetProperty(target, key); // source value - val = safeGetProperty(obj, key); // new value - - // recursion prevention - if (val === target) { - return; - - /** - * if new value isn't object then just overwrite by new value - * instead of extending. - */ - } else if (typeof val !== 'object' || val === null) { - target[key] = val; - return; - - // just clone arrays (and recursive clone objects inside) - } else if (Array.isArray(val)) { - target[key] = deepCloneArray(val); - return; - - // custom cloning and overwrite for specific objects - } else if (isSpecificValue(val)) { - target[key] = cloneSpecificValue(val); - return; - - // overwrite by new value if source isn't object or array - } else if (typeof src !== 'object' || src === null || Array.isArray(src)) { - target[key] = deepExtend({}, val); - return; - - // source value and new value is objects both, extending... - } else { - target[key] = deepExtend(src, val); - return; - } - }); - }); - - return target; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/package.json b/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/package.json deleted file mode 100644 index 5f2195f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "deep-extend", - "description": "Recursive object extending", - "license": "MIT", - "version": "0.6.0", - "homepage": "https://github.com/unclechu/node-deep-extend", - "keywords": [ - "deep-extend", - "extend", - "deep", - "recursive", - "xtend", - "clone", - "merge", - "json" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://raw.githubusercontent.com/unclechu/node-deep-extend/master/LICENSE" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/unclechu/node-deep-extend.git" - }, - "author": "Viacheslav Lotsmanov ", - "bugs": "https://github.com/unclechu/node-deep-extend/issues", - "contributors": [ - { - "name": "Romain Prieto", - "url": "https://github.com/rprieto" - }, - { - "name": "Max Maximov", - "url": "https://github.com/maxmaximov" - }, - { - "name": "Marshall Bowers", - "url": "https://github.com/maxdeviant" - }, - { - "name": "Misha Wakerman", - "url": "https://github.com/mwakerman" - } - ], - "main": "lib/deep-extend.js", - "engines": { - "node": ">=4.0.0" - }, - "scripts": { - "test": "./node_modules/.bin/mocha" - }, - "devDependencies": { - "mocha": "5.2.0", - "should": "13.2.1" - }, - "files": [ - "index.js", - "lib/" - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/.npmignore b/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/.npmignore deleted file mode 100644 index c2658d7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/History.md b/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/History.md deleted file mode 100644 index 25959ea..0000000 --- a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/History.md +++ /dev/null @@ -1,22 +0,0 @@ - -1.0.0 / 2015-12-14 -================== - - * Merge pull request #12 from kasicka/master - * Add license text - -0.1.0 / 2014-10-17 -================== - - * adds `.fluent()` to api - -0.0.3 / 2014-01-13 -================== - - * fix receiver for .method() - -0.0.2 / 2014-01-13 -================== - - * Object.defineProperty() sucks - * Initial commit diff --git a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/License b/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/License deleted file mode 100644 index 60de60a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/License +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2015 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/Makefile b/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/Makefile deleted file mode 100644 index a9dcfd5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec \ - --bail - -.PHONY: test \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/Readme.md b/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/Readme.md deleted file mode 100644 index ab8cf4a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/Readme.md +++ /dev/null @@ -1,94 +0,0 @@ - -# delegates - - Node method and accessor delegation utilty. - -## Installation - -``` -$ npm install delegates -``` - -## Example - -```js -var delegate = require('delegates'); - -... - -delegate(proto, 'request') - .method('acceptsLanguages') - .method('acceptsEncodings') - .method('acceptsCharsets') - .method('accepts') - .method('is') - .access('querystring') - .access('idempotent') - .access('socket') - .access('length') - .access('query') - .access('search') - .access('status') - .access('method') - .access('path') - .access('body') - .access('host') - .access('url') - .getter('subdomains') - .getter('protocol') - .getter('header') - .getter('stale') - .getter('fresh') - .getter('secure') - .getter('ips') - .getter('ip') -``` - -# API - -## Delegate(proto, prop) - -Creates a delegator instance used to configure using the `prop` on the given -`proto` object. (which is usually a prototype) - -## Delegate#method(name) - -Allows the given method `name` to be accessed on the host. - -## Delegate#getter(name) - -Creates a "getter" for the property with the given `name` on the delegated -object. - -## Delegate#setter(name) - -Creates a "setter" for the property with the given `name` on the delegated -object. - -## Delegate#access(name) - -Creates an "accessor" (ie: both getter *and* setter) for the property with the -given `name` on the delegated object. - -## Delegate#fluent(name) - -A unique type of "accessor" that works for a "fluent" API. When called as a -getter, the method returns the expected value. However, if the method is called -with a value, it will return itself so it can be chained. For example: - -```js -delegate(proto, 'request') - .fluent('query') - -// getter -var q = request.query(); - -// setter (chainable) -request - .query({ a: 1 }) - .query({ b: 2 }); -``` - -# License - - MIT diff --git a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/index.js b/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/index.js deleted file mode 100644 index 17c222d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/index.js +++ /dev/null @@ -1,121 +0,0 @@ - -/** - * Expose `Delegator`. - */ - -module.exports = Delegator; - -/** - * Initialize a delegator. - * - * @param {Object} proto - * @param {String} target - * @api public - */ - -function Delegator(proto, target) { - if (!(this instanceof Delegator)) return new Delegator(proto, target); - this.proto = proto; - this.target = target; - this.methods = []; - this.getters = []; - this.setters = []; - this.fluents = []; -} - -/** - * Delegate method `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.method = function(name){ - var proto = this.proto; - var target = this.target; - this.methods.push(name); - - proto[name] = function(){ - return this[target][name].apply(this[target], arguments); - }; - - return this; -}; - -/** - * Delegator accessor `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.access = function(name){ - return this.getter(name).setter(name); -}; - -/** - * Delegator getter `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.getter = function(name){ - var proto = this.proto; - var target = this.target; - this.getters.push(name); - - proto.__defineGetter__(name, function(){ - return this[target][name]; - }); - - return this; -}; - -/** - * Delegator setter `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.setter = function(name){ - var proto = this.proto; - var target = this.target; - this.setters.push(name); - - proto.__defineSetter__(name, function(val){ - return this[target][name] = val; - }); - - return this; -}; - -/** - * Delegator fluent accessor - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.fluent = function (name) { - var proto = this.proto; - var target = this.target; - this.fluents.push(name); - - proto[name] = function(val){ - if ('undefined' != typeof val) { - this[target][name] = val; - return this; - } else { - return this[target][name]; - } - }; - - return this; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/package.json b/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/package.json deleted file mode 100644 index 1724038..0000000 --- a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "delegates", - "version": "1.0.0", - "repository": "visionmedia/node-delegates", - "description": "delegate methods and accessors to another property", - "keywords": ["delegate", "delegation"], - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "license": "MIT" -} diff --git a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/test/index.js b/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/test/index.js deleted file mode 100644 index 7b6e3d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/test/index.js +++ /dev/null @@ -1,94 +0,0 @@ - -var assert = require('assert'); -var delegate = require('..'); - -describe('.method(name)', function(){ - it('should delegate methods', function(){ - var obj = {}; - - obj.request = { - foo: function(bar){ - assert(this == obj.request); - return bar; - } - }; - - delegate(obj, 'request').method('foo'); - - obj.foo('something').should.equal('something'); - }) -}) - -describe('.getter(name)', function(){ - it('should delegate getters', function(){ - var obj = {}; - - obj.request = { - get type() { - return 'text/html'; - } - } - - delegate(obj, 'request').getter('type'); - - obj.type.should.equal('text/html'); - }) -}) - -describe('.setter(name)', function(){ - it('should delegate setters', function(){ - var obj = {}; - - obj.request = { - get type() { - return this._type.toUpperCase(); - }, - - set type(val) { - this._type = val; - } - } - - delegate(obj, 'request').setter('type'); - - obj.type = 'hey'; - obj.request.type.should.equal('HEY'); - }) -}) - -describe('.access(name)', function(){ - it('should delegate getters and setters', function(){ - var obj = {}; - - obj.request = { - get type() { - return this._type.toUpperCase(); - }, - - set type(val) { - this._type = val; - } - } - - delegate(obj, 'request').access('type'); - - obj.type = 'hey'; - obj.type.should.equal('HEY'); - }) -}) - -describe('.fluent(name)', function () { - it('should delegate in a fluent fashion', function () { - var obj = { - settings: { - env: 'development' - } - }; - - delegate(obj, 'settings').fluent('env'); - - obj.env().should.equal('development'); - obj.env('production').should.equal(obj); - obj.settings.env.should.equal('production'); - }) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/LICENSE b/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/README.md b/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/README.md deleted file mode 100644 index 23212fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/README.md +++ /dev/null @@ -1,163 +0,0 @@ -# detect-libc - -Node.js module to detect details of the C standard library (libc) -implementation provided by a given Linux system. - -Currently supports detection of GNU glibc and MUSL libc. - -Provides asychronous and synchronous functions for the -family (e.g. `glibc`, `musl`) and version (e.g. `1.23`, `1.2.3`). - -The version numbers of libc implementations -are not guaranteed to be semver-compliant. - -For previous v1.x releases, please see the -[v1](https://github.com/lovell/detect-libc/tree/v1) branch. - -## Install - -```sh -npm install detect-libc -``` - -## API - -### GLIBC - -```ts -const GLIBC: string = 'glibc'; -``` - -A String constant containing the value `glibc`. - -### MUSL - -```ts -const MUSL: string = 'musl'; -``` - -A String constant containing the value `musl`. - -### family - -```ts -function family(): Promise; -``` - -Resolves asychronously with: - -* `glibc` or `musl` when the libc family can be determined -* `null` when the libc family cannot be determined -* `null` when run on a non-Linux platform - -```js -const { family, GLIBC, MUSL } = require('detect-libc'); - -switch (await family()) { - case GLIBC: ... - case MUSL: ... - case null: ... -} -``` - -### familySync - -```ts -function familySync(): string | null; -``` - -Synchronous version of `family()`. - -```js -const { familySync, GLIBC, MUSL } = require('detect-libc'); - -switch (familySync()) { - case GLIBC: ... - case MUSL: ... - case null: ... -} -``` - -### version - -```ts -function version(): Promise; -``` - -Resolves asychronously with: - -* The version when it can be determined -* `null` when the libc family cannot be determined -* `null` when run on a non-Linux platform - -```js -const { version } = require('detect-libc'); - -const v = await version(); -if (v) { - const [major, minor, patch] = v.split('.'); -} -``` - -### versionSync - -```ts -function versionSync(): string | null; -``` - -Synchronous version of `version()`. - -```js -const { versionSync } = require('detect-libc'); - -const v = versionSync(); -if (v) { - const [major, minor, patch] = v.split('.'); -} -``` - -### isNonGlibcLinux - -```ts -function isNonGlibcLinux(): Promise; -``` - -Resolves asychronously with: - -* `false` when the libc family is `glibc` -* `true` when the libc family is not `glibc` -* `false` when run on a non-Linux platform - -```js -const { isNonGlibcLinux } = require('detect-libc'); - -if (await isNonGlibcLinux()) { ... } -``` - -### isNonGlibcLinuxSync - -```ts -function isNonGlibcLinuxSync(): boolean; -``` - -Synchronous version of `isNonGlibcLinux()`. - -```js -const { isNonGlibcLinuxSync } = require('detect-libc'); - -if (isNonGlibcLinuxSync()) { ... } -``` - -## Licensing - -Copyright 2017 Lovell Fuller and others. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0.html) - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/index.d.ts b/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/index.d.ts deleted file mode 100644 index 4c0fb2b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2017 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - -export const GLIBC: 'glibc'; -export const MUSL: 'musl'; - -export function family(): Promise; -export function familySync(): string | null; - -export function isNonGlibcLinux(): Promise; -export function isNonGlibcLinuxSync(): boolean; - -export function version(): Promise; -export function versionSync(): string | null; diff --git a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js b/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js deleted file mode 100644 index 01299b4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright 2017 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - -'use strict'; - -const childProcess = require('child_process'); -const { isLinux, getReport } = require('./process'); -const { LDD_PATH, SELF_PATH, readFile, readFileSync } = require('./filesystem'); -const { interpreterPath } = require('./elf'); - -let cachedFamilyInterpreter; -let cachedFamilyFilesystem; -let cachedVersionFilesystem; - -const command = 'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true'; -let commandOut = ''; - -const safeCommand = () => { - if (!commandOut) { - return new Promise((resolve) => { - childProcess.exec(command, (err, out) => { - commandOut = err ? ' ' : out; - resolve(commandOut); - }); - }); - } - return commandOut; -}; - -const safeCommandSync = () => { - if (!commandOut) { - try { - commandOut = childProcess.execSync(command, { encoding: 'utf8' }); - } catch (_err) { - commandOut = ' '; - } - } - return commandOut; -}; - -/** - * A String constant containing the value `glibc`. - * @type {string} - * @public - */ -const GLIBC = 'glibc'; - -/** - * A Regexp constant to get the GLIBC Version. - * @type {string} - */ -const RE_GLIBC_VERSION = /LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i; - -/** - * A String constant containing the value `musl`. - * @type {string} - * @public - */ -const MUSL = 'musl'; - -const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-'); - -const familyFromReport = () => { - const report = getReport(); - if (report.header && report.header.glibcVersionRuntime) { - return GLIBC; - } - if (Array.isArray(report.sharedObjects)) { - if (report.sharedObjects.some(isFileMusl)) { - return MUSL; - } - } - return null; -}; - -const familyFromCommand = (out) => { - const [getconf, ldd1] = out.split(/[\r\n]+/); - if (getconf && getconf.includes(GLIBC)) { - return GLIBC; - } - if (ldd1 && ldd1.includes(MUSL)) { - return MUSL; - } - return null; -}; - -const familyFromInterpreterPath = (path) => { - if (path) { - if (path.includes('/ld-musl-')) { - return MUSL; - } else if (path.includes('/ld-linux-')) { - return GLIBC; - } - } - return null; -}; - -const getFamilyFromLddContent = (content) => { - content = content.toString(); - if (content.includes('musl')) { - return MUSL; - } - if (content.includes('GNU C Library')) { - return GLIBC; - } - return null; -}; - -const familyFromFilesystem = async () => { - if (cachedFamilyFilesystem !== undefined) { - return cachedFamilyFilesystem; - } - cachedFamilyFilesystem = null; - try { - const lddContent = await readFile(LDD_PATH); - cachedFamilyFilesystem = getFamilyFromLddContent(lddContent); - } catch (e) {} - return cachedFamilyFilesystem; -}; - -const familyFromFilesystemSync = () => { - if (cachedFamilyFilesystem !== undefined) { - return cachedFamilyFilesystem; - } - cachedFamilyFilesystem = null; - try { - const lddContent = readFileSync(LDD_PATH); - cachedFamilyFilesystem = getFamilyFromLddContent(lddContent); - } catch (e) {} - return cachedFamilyFilesystem; -}; - -const familyFromInterpreter = async () => { - if (cachedFamilyInterpreter !== undefined) { - return cachedFamilyInterpreter; - } - cachedFamilyInterpreter = null; - try { - const selfContent = await readFile(SELF_PATH); - const path = interpreterPath(selfContent); - cachedFamilyInterpreter = familyFromInterpreterPath(path); - } catch (e) {} - return cachedFamilyInterpreter; -}; - -const familyFromInterpreterSync = () => { - if (cachedFamilyInterpreter !== undefined) { - return cachedFamilyInterpreter; - } - cachedFamilyInterpreter = null; - try { - const selfContent = readFileSync(SELF_PATH); - const path = interpreterPath(selfContent); - cachedFamilyInterpreter = familyFromInterpreterPath(path); - } catch (e) {} - return cachedFamilyInterpreter; -}; - -/** - * Resolves with the libc family when it can be determined, `null` otherwise. - * @returns {Promise} - */ -const family = async () => { - let family = null; - if (isLinux()) { - family = await familyFromInterpreter(); - if (!family) { - family = await familyFromFilesystem(); - if (!family) { - family = familyFromReport(); - } - if (!family) { - const out = await safeCommand(); - family = familyFromCommand(out); - } - } - } - return family; -}; - -/** - * Returns the libc family when it can be determined, `null` otherwise. - * @returns {?string} - */ -const familySync = () => { - let family = null; - if (isLinux()) { - family = familyFromInterpreterSync(); - if (!family) { - family = familyFromFilesystemSync(); - if (!family) { - family = familyFromReport(); - } - if (!family) { - const out = safeCommandSync(); - family = familyFromCommand(out); - } - } - } - return family; -}; - -/** - * Resolves `true` only when the platform is Linux and the libc family is not `glibc`. - * @returns {Promise} - */ -const isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC; - -/** - * Returns `true` only when the platform is Linux and the libc family is not `glibc`. - * @returns {boolean} - */ -const isNonGlibcLinuxSync = () => isLinux() && familySync() !== GLIBC; - -const versionFromFilesystem = async () => { - if (cachedVersionFilesystem !== undefined) { - return cachedVersionFilesystem; - } - cachedVersionFilesystem = null; - try { - const lddContent = await readFile(LDD_PATH); - const versionMatch = lddContent.match(RE_GLIBC_VERSION); - if (versionMatch) { - cachedVersionFilesystem = versionMatch[1]; - } - } catch (e) {} - return cachedVersionFilesystem; -}; - -const versionFromFilesystemSync = () => { - if (cachedVersionFilesystem !== undefined) { - return cachedVersionFilesystem; - } - cachedVersionFilesystem = null; - try { - const lddContent = readFileSync(LDD_PATH); - const versionMatch = lddContent.match(RE_GLIBC_VERSION); - if (versionMatch) { - cachedVersionFilesystem = versionMatch[1]; - } - } catch (e) {} - return cachedVersionFilesystem; -}; - -const versionFromReport = () => { - const report = getReport(); - if (report.header && report.header.glibcVersionRuntime) { - return report.header.glibcVersionRuntime; - } - return null; -}; - -const versionSuffix = (s) => s.trim().split(/\s+/)[1]; - -const versionFromCommand = (out) => { - const [getconf, ldd1, ldd2] = out.split(/[\r\n]+/); - if (getconf && getconf.includes(GLIBC)) { - return versionSuffix(getconf); - } - if (ldd1 && ldd2 && ldd1.includes(MUSL)) { - return versionSuffix(ldd2); - } - return null; -}; - -/** - * Resolves with the libc version when it can be determined, `null` otherwise. - * @returns {Promise} - */ -const version = async () => { - let version = null; - if (isLinux()) { - version = await versionFromFilesystem(); - if (!version) { - version = versionFromReport(); - } - if (!version) { - const out = await safeCommand(); - version = versionFromCommand(out); - } - } - return version; -}; - -/** - * Returns the libc version when it can be determined, `null` otherwise. - * @returns {?string} - */ -const versionSync = () => { - let version = null; - if (isLinux()) { - version = versionFromFilesystemSync(); - if (!version) { - version = versionFromReport(); - } - if (!version) { - const out = safeCommandSync(); - version = versionFromCommand(out); - } - } - return version; -}; - -module.exports = { - GLIBC, - MUSL, - family, - familySync, - isNonGlibcLinux, - isNonGlibcLinuxSync, - version, - versionSync -}; diff --git a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js b/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js deleted file mode 100644 index aa166aa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2017 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - -'use strict'; - -const interpreterPath = (elf) => { - if (elf.length < 64) { - return null; - } - if (elf.readUInt32BE(0) !== 0x7F454C46) { - // Unexpected magic bytes - return null; - } - if (elf.readUInt8(4) !== 2) { - // Not a 64-bit ELF - return null; - } - if (elf.readUInt8(5) !== 1) { - // Not little-endian - return null; - } - const offset = elf.readUInt32LE(32); - const size = elf.readUInt16LE(54); - const count = elf.readUInt16LE(56); - for (let i = 0; i < count; i++) { - const headerOffset = offset + (i * size); - const type = elf.readUInt32LE(headerOffset); - if (type === 3) { - const fileOffset = elf.readUInt32LE(headerOffset + 8); - const fileSize = elf.readUInt32LE(headerOffset + 32); - return elf.subarray(fileOffset, fileOffset + fileSize).toString().replace(/\0.*$/g, ''); - } - } - return null; -}; - -module.exports = { - interpreterPath -}; diff --git a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js b/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js deleted file mode 100644 index 4c2443c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2017 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - -'use strict'; - -const fs = require('fs'); - -const LDD_PATH = '/usr/bin/ldd'; -const SELF_PATH = '/proc/self/exe'; -const MAX_LENGTH = 2048; - -/** - * Read the content of a file synchronous - * - * @param {string} path - * @returns {Buffer} - */ -const readFileSync = (path) => { - const fd = fs.openSync(path, 'r'); - const buffer = Buffer.alloc(MAX_LENGTH); - const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0); - fs.close(fd, () => {}); - return buffer.subarray(0, bytesRead); -}; - -/** - * Read the content of a file - * - * @param {string} path - * @returns {Promise} - */ -const readFile = (path) => new Promise((resolve, reject) => { - fs.open(path, 'r', (err, fd) => { - if (err) { - reject(err); - } else { - const buffer = Buffer.alloc(MAX_LENGTH); - fs.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => { - resolve(buffer.subarray(0, bytesRead)); - fs.close(fd, () => {}); - }); - } - }); -}); - -module.exports = { - LDD_PATH, - SELF_PATH, - readFileSync, - readFile -}; diff --git a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js b/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js deleted file mode 100644 index ee78ad2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2017 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - -'use strict'; - -const isLinux = () => process.platform === 'linux'; - -let report = null; -const getReport = () => { - if (!report) { - /* istanbul ignore next */ - if (isLinux() && process.report) { - const orig = process.report.excludeNetwork; - process.report.excludeNetwork = true; - report = process.report.getReport(); - process.report.excludeNetwork = orig; - } else { - report = {}; - } - } - return report; -}; - -module.exports = { isLinux, getReport }; diff --git a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/package.json b/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/package.json deleted file mode 100644 index 36d0f2b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "detect-libc", - "version": "2.1.2", - "description": "Node.js module to detect the C standard library (libc) implementation family and version", - "main": "lib/detect-libc.js", - "files": [ - "lib/", - "index.d.ts" - ], - "scripts": { - "test": "semistandard && nyc --reporter=text --check-coverage --branches=100 ava test/unit.js", - "changelog": "conventional-changelog -i CHANGELOG.md -s", - "bench": "node benchmark/detect-libc", - "bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/lovell/detect-libc.git" - }, - "keywords": [ - "libc", - "glibc", - "musl" - ], - "author": "Lovell Fuller ", - "contributors": [ - "Niklas Salmoukas ", - "Vinícius Lourenço " - ], - "license": "Apache-2.0", - "devDependencies": { - "ava": "^2.4.0", - "benchmark": "^2.1.4", - "conventional-changelog-cli": "^5.0.0", - "eslint-config-standard": "^13.0.1", - "nyc": "^15.1.0", - "proxyquire": "^2.1.3", - "semistandard": "^14.2.3" - }, - "engines": { - "node": ">=8" - }, - "types": "index.d.ts" -} diff --git a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/LICENSE-MIT.txt b/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/README.md b/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/README.md deleted file mode 100644 index f10e173..0000000 --- a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# emoji-regex [![Build status](https://travis-ci.org/mathiasbynens/emoji-regex.svg?branch=master)](https://travis-ci.org/mathiasbynens/emoji-regex) - -_emoji-regex_ offers a regular expression to match all emoji symbols (including textual representations of emoji) as per the Unicode Standard. - -This repository contains a script that generates this regular expression based on [the data from Unicode v12](https://github.com/mathiasbynens/unicode-12.0.0). Because of this, the regular expression can easily be updated whenever new emoji are added to the Unicode standard. - -## Installation - -Via [npm](https://www.npmjs.com/): - -```bash -npm install emoji-regex -``` - -In [Node.js](https://nodejs.org/): - -```js -const emojiRegex = require('emoji-regex'); -// Note: because the regular expression has the global flag set, this module -// exports a function that returns the regex rather than exporting the regular -// expression itself, to make it impossible to (accidentally) mutate the -// original regular expression. - -const text = ` -\u{231A}: ⌚ default emoji presentation character (Emoji_Presentation) -\u{2194}\u{FE0F}: ↔️ default text presentation character rendered as emoji -\u{1F469}: 👩 emoji modifier base (Emoji_Modifier_Base) -\u{1F469}\u{1F3FF}: 👩🏿 emoji modifier base followed by a modifier -`; - -const regex = emojiRegex(); -let match; -while (match = regex.exec(text)) { - const emoji = match[0]; - console.log(`Matched sequence ${ emoji } — code points: ${ [...emoji].length }`); -} -``` - -Console output: - -``` -Matched sequence ⌚ — code points: 1 -Matched sequence ⌚ — code points: 1 -Matched sequence ↔️ — code points: 2 -Matched sequence ↔️ — code points: 2 -Matched sequence 👩 — code points: 1 -Matched sequence 👩 — code points: 1 -Matched sequence 👩🏿 — code points: 2 -Matched sequence 👩🏿 — code points: 2 -``` - -To match emoji in their textual representation as well (i.e. emoji that are not `Emoji_Presentation` symbols and that aren’t forced to render as emoji by a variation selector), `require` the other regex: - -```js -const emojiRegex = require('emoji-regex/text.js'); -``` - -Additionally, in environments which support ES2015 Unicode escapes, you may `require` ES2015-style versions of the regexes: - -```js -const emojiRegex = require('emoji-regex/es2015/index.js'); -const emojiRegexText = require('emoji-regex/es2015/text.js'); -``` - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -_emoji-regex_ is available under the [MIT](https://mths.be/mit) license. diff --git a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/es2015/index.js b/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/es2015/index.js deleted file mode 100644 index b4cf3dc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/es2015/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F3F4}\u200D\u2620)\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F415}\u200D\u{1F9BA}|\u{1F469}\u200D\u{1F466}|\u{1F469}\u200D\u{1F467}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F1F6}\u{1F1E6}|[#\*0-9]\uFE0F\u20E3|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}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F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-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D}]/gu; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/es2015/text.js b/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/es2015/text.js deleted file mode 100644 index 780309d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/es2015/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{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F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F?|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.d.ts b/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.d.ts deleted file mode 100644 index 1955b47..0000000 --- a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -declare module 'emoji-regex' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} - -declare module 'emoji-regex/text' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} - -declare module 'emoji-regex/es2015' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} - -declare module 'emoji-regex/es2015/text' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} diff --git a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js b/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js deleted file mode 100644 index d993a3a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD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u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/package.json b/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/package.json deleted file mode 100644 index 6d32352..0000000 --- a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "emoji-regex", - "version": "8.0.0", - "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", - "homepage": "https://mths.be/emoji-regex", - "main": "index.js", - "types": "index.d.ts", - "keywords": [ - "unicode", - "regex", - "regexp", - "regular expressions", - "code points", - "symbols", - "characters", - "emoji" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" - }, - "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", - "files": [ - "LICENSE-MIT.txt", - "index.js", - "index.d.ts", - "text.js", - "es2015/index.js", - "es2015/text.js" - ], - "scripts": { - "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js", - "test": "mocha", - "test:watch": "npm run test -- --watch" - }, - "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.3.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", - "@babel/preset-env": "^7.3.4", - "mocha": "^6.0.2", - "regexgen": "^1.3.0", - "unicode-12.0.0": "^0.7.9" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/text.js b/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/text.js deleted file mode 100644 index 0a55ce2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2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\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2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5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/.prettierrc.js b/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/.prettierrc.js deleted file mode 100644 index 3f83654..0000000 --- a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/.prettierrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - printWidth: 160, - tabWidth: 4, - singleQuote: true, - endOfLine: 'lf', - trailingComma: 'none', - arrowParens: 'avoid' -}; diff --git a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/.travis.yml b/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/.travis.yml deleted file mode 100644 index abc4f48..0000000 --- a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: node_js -sudo: false -node_js: - - "0.10" - - 0.12 - - iojs - - 4 - - 5 -env: - - CXX=g++-4.8 -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.8 -notifications: - email: - - andris@kreata.ee - webhooks: - urls: - - https://webhooks.gitter.im/e/0ed18fd9b3e529b3c2cc - on_success: change # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: false # default: false diff --git a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/LICENSE b/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/LICENSE deleted file mode 100644 index 33f5a9a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -Copyright (c) 2012-2014 Andris Reinman - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/README.md b/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/README.md deleted file mode 100644 index 6188918..0000000 --- a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Encoding - -**encoding** is a simple wrapper around [iconv-lite](https://github.com/ashtuchkin/iconv-lite/) to convert strings from one encoding to another. - -[![Build Status](https://secure.travis-ci.org/andris9/encoding.svg)](http://travis-ci.org/andris9/Nodemailer) -[![npm version](https://badge.fury.io/js/encoding.svg)](http://badge.fury.io/js/encoding) - -Initially _encoding_ was a wrapper around _node-iconv_ (main) and _iconv-lite_ (fallback) and was used as the encoding layer for Nodemailer/mailparser. Somehow it also ended up as a dependency for a bunch of other project, none of these actually using _node-iconv_. The loading mechanics caused issues for front-end projects and Nodemailer/malparser had moved on, so _node-iconv_ was removed. - -## Install - -Install through npm - - npm install encoding - -## Usage - -Require the module - - var encoding = require("encoding"); - -Convert with encoding.convert() - - var resultBuffer = encoding.convert(text, toCharset, fromCharset); - -Where - -- **text** is either a Buffer or a String to be converted -- **toCharset** is the characterset to convert the string -- **fromCharset** (_optional_, defaults to UTF-8) is the source charset - -Output of the conversion is always a Buffer object. - -Example - - var result = encoding.convert("ÕÄÖÜ", "Latin_1"); - console.log(result); // - -## License - -**MIT** diff --git a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/lib/encoding.js b/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/lib/encoding.js deleted file mode 100644 index 865c24b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/lib/encoding.js +++ /dev/null @@ -1,83 +0,0 @@ -'use strict'; - -var iconvLite = require('iconv-lite'); - -// Expose to the world -module.exports.convert = convert; - -/** - * Convert encoding of an UTF-8 string or a buffer - * - * @param {String|Buffer} str String to be converted - * @param {String} to Encoding to be converted to - * @param {String} [from='UTF-8'] Encoding to be converted from - * @return {Buffer} Encoded string - */ -function convert(str, to, from) { - from = checkEncoding(from || 'UTF-8'); - to = checkEncoding(to || 'UTF-8'); - str = str || ''; - - var result; - - if (from !== 'UTF-8' && typeof str === 'string') { - str = Buffer.from(str, 'binary'); - } - - if (from === to) { - if (typeof str === 'string') { - result = Buffer.from(str); - } else { - result = str; - } - } else { - try { - result = convertIconvLite(str, to, from); - } catch (E) { - console.error(E); - result = str; - } - } - - if (typeof result === 'string') { - result = Buffer.from(result, 'utf-8'); - } - - return result; -} - -/** - * Convert encoding of astring with iconv-lite - * - * @param {String|Buffer} str String to be converted - * @param {String} to Encoding to be converted to - * @param {String} [from='UTF-8'] Encoding to be converted from - * @return {Buffer} Encoded string - */ -function convertIconvLite(str, to, from) { - if (to === 'UTF-8') { - return iconvLite.decode(str, from); - } else if (from === 'UTF-8') { - return iconvLite.encode(str, to); - } else { - return iconvLite.encode(iconvLite.decode(str, from), to); - } -} - -/** - * Converts charset name if needed - * - * @param {String} name Character set - * @return {String} Character set name - */ -function checkEncoding(name) { - return (name || '') - .toString() - .trim() - .replace(/^latin[\-_]?(\d+)$/i, 'ISO-8859-$1') - .replace(/^win(?:dows)?[\-_]?(\d+)$/i, 'WINDOWS-$1') - .replace(/^utf[\-_]?(\d+)$/i, 'UTF-$1') - .replace(/^ks_c_5601\-1987$/i, 'CP949') - .replace(/^us[\-_]?ascii$/i, 'ASCII') - .toUpperCase(); -} diff --git a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/package.json b/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/package.json deleted file mode 100644 index 773a943..0000000 --- a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "encoding", - "version": "0.1.13", - "description": "Convert encodings, uses iconv-lite", - "main": "lib/encoding.js", - "scripts": { - "test": "nodeunit test" - }, - "repository": "https://github.com/andris9/encoding.git", - "author": "Andris Reinman", - "license": "MIT", - "dependencies": { - "iconv-lite": "^0.6.2" - }, - "devDependencies": { - "nodeunit": "0.11.3" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/test/test.js b/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/test/test.js deleted file mode 100644 index 3a7dfee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/test/test.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -var encoding = require('../lib/encoding'); - -exports['General tests'] = { - 'From UTF-8 to Latin_1': function (test) { - var input = 'ÕÄÖÜ', - expected = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc]); - test.deepEqual(encoding.convert(input, 'latin1'), expected); - test.done(); - }, - - 'From Latin_1 to UTF-8': function (test) { - var input = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc]), - expected = 'ÕÄÖÜ'; - test.deepEqual(encoding.convert(input, 'utf-8', 'latin1').toString(), expected); - test.done(); - }, - - 'From UTF-8 to UTF-8': function (test) { - var input = 'ÕÄÖÜ', - expected = Buffer.from('ÕÄÖÜ'); - test.deepEqual(encoding.convert(input, 'utf-8', 'utf-8'), expected); - test.done(); - }, - - 'From Latin_13 to Latin_15': function (test) { - var input = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc, 0xd0]), - expected = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc, 0xa6]); - test.deepEqual(encoding.convert(input, 'latin_15', 'latin13'), expected); - test.done(); - } - - /* - // ISO-2022-JP is not supported by iconv-lite - "From ISO-2022-JP to UTF-8 with Iconv": function (test) { - var input = Buffer.from( - "GyRCM1g5OzU7PVEwdzgmPSQ4IUYkMnFKczlwGyhC", - "base64" - ), - expected = Buffer.from( - "5a2m5qCh5oqA6KGT5ZOh56CU5L+u5qSc6KiO5Lya5aCx5ZGK", - "base64" - ); - test.deepEqual(encoding.convert(input, "utf-8", "ISO-2022-JP"), expected); - test.done(); - }, - */ -}; diff --git a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/iconv-lite b/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/iconv-lite deleted file mode 120000 index 63c57dd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/encoding@0.1.13/node_modules/iconv-lite +++ /dev/null @@ -1 +0,0 @@ -../../iconv-lite@0.6.3/node_modules/iconv-lite \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/LICENSE b/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/LICENSE deleted file mode 100644 index 757562e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/README.md b/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/README.md deleted file mode 100644 index 857b14b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# end-of-stream - -A node module that calls a callback when a readable/writable/duplex stream has completed or failed. - - npm install end-of-stream - -[![Build status](https://travis-ci.org/mafintosh/end-of-stream.svg?branch=master)](https://travis-ci.org/mafintosh/end-of-stream) - -## Usage - -Simply pass a stream and a callback to the `eos`. -Both legacy streams, streams2 and stream3 are supported. - -``` js -var eos = require('end-of-stream'); - -eos(readableStream, function(err) { - // this will be set to the stream instance - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended', this === readableStream); -}); - -eos(writableStream, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has finished', this === writableStream); -}); - -eos(duplexStream, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended and finished', this === duplexStream); -}); - -eos(duplexStream, {readable:false}, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has finished but might still be readable'); -}); - -eos(duplexStream, {writable:false}, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended but might still be writable'); -}); - -eos(readableStream, {error:false}, function(err) { - // do not treat emit('error', err) as a end-of-stream -}); -``` - -## License - -MIT - -## Related - -`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js b/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js deleted file mode 100644 index 7ce47e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js +++ /dev/null @@ -1,96 +0,0 @@ -var once = require('once'); - -var noop = function() {}; - -var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process); - -var isRequest = function(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -}; - -var isChildProcess = function(stream) { - return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 -}; - -var eos = function(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - - callback = once(callback || noop); - - var ws = stream._writableState; - var rs = stream._readableState; - var readable = opts.readable || (opts.readable !== false && stream.readable); - var writable = opts.writable || (opts.writable !== false && stream.writable); - var cancelled = false; - - var onlegacyfinish = function() { - if (!stream.writable) onfinish(); - }; - - var onfinish = function() { - writable = false; - if (!readable) callback.call(stream); - }; - - var onend = function() { - readable = false; - if (!writable) callback.call(stream); - }; - - var onexit = function(exitCode) { - callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); - }; - - var onerror = function(err) { - callback.call(stream, err); - }; - - var onclose = function() { - qnt(onclosenexttick); - }; - - var onclosenexttick = function() { - if (cancelled) return; - if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); - }; - - var onrequest = function() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest(); - else stream.on('request', onrequest); - } else if (writable && !ws) { // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - - if (isChildProcess(stream)) stream.on('exit', onexit); - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - - return function() { - cancelled = true; - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -}; - -module.exports = eos; diff --git a/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/package.json b/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/package.json deleted file mode 100644 index 0b530cd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "end-of-stream", - "version": "1.4.5", - "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/end-of-stream.git" - }, - "dependencies": { - "once": "^1.4.0" - }, - "scripts": { - "test": "node test.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "stream", - "streams", - "callback", - "finish", - "close", - "end", - "wait" - ], - "bugs": { - "url": "https://github.com/mafintosh/end-of-stream/issues" - }, - "homepage": "https://github.com/mafintosh/end-of-stream", - "main": "index.js", - "author": "Mathias Buus ", - "license": "MIT", - "devDependencies": { - "tape": "^4.11.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/once b/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/once deleted file mode 120000 index 72cb153..0000000 --- a/services/hocuspocus/node_modules/.pnpm/end-of-stream@1.4.5/node_modules/once +++ /dev/null @@ -1 +0,0 @@ -../../once@1.4.0/node_modules/once \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.d.ts b/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.d.ts deleted file mode 100644 index 277ddc0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -declare namespace envPaths { - export interface Options { - /** - __Don't use this option unless you really have to!__ - - Suffix appended to the project name to avoid name conflicts with native apps. Pass an empty string to disable it. - - @default 'nodejs' - */ - readonly suffix?: string; - } - - export interface Paths { - /** - Directory for data files. - - Example locations (with the default `nodejs` suffix): - - - macOS: `~/Library/Application Support/MyApp-nodejs` - - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Data` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Data`) - - Linux: `~/.local/share/MyApp-nodejs` (or `$XDG_DATA_HOME/MyApp-nodejs`) - */ - readonly data: string; - - /** - Directory for data files. - - Example locations (with the default `nodejs` suffix): - - - macOS: `~/Library/Preferences/MyApp-nodejs` - - Windows: `%APPDATA%\MyApp-nodejs\Config` (for example, `C:\Users\USERNAME\AppData\Roaming\MyApp-nodejs\Config`) - - Linux: `~/.config/MyApp-nodejs` (or `$XDG_CONFIG_HOME/MyApp-nodejs`) - */ - readonly config: string; - - /** - Directory for non-essential data files. - - Example locations (with the default `nodejs` suffix): - - - macOS: `~/Library/Caches/MyApp-nodejs` - - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Cache` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Cache`) - - Linux: `~/.cache/MyApp-nodejs` (or `$XDG_CACHE_HOME/MyApp-nodejs`) - */ - readonly cache: string; - - /** - Directory for log files. - - Example locations (with the default `nodejs` suffix): - - - macOS: `~/Library/Logs/MyApp-nodejs` - - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Log` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Log`) - - Linux: `~/.local/state/MyApp-nodejs` (or `$XDG_STATE_HOME/MyApp-nodejs`) - */ - readonly log: string; - - /** - Directory for temporary files. - - Example locations (with the default `nodejs` suffix): - - - macOS: `/var/folders/jf/f2twvvvs5jl_m49tf034ffpw0000gn/T/MyApp-nodejs` - - Windows: `%LOCALAPPDATA%\Temp\MyApp-nodejs` (for example, `C:\Users\USERNAME\AppData\Local\Temp\MyApp-nodejs`) - - Linux: `/tmp/USERNAME/MyApp-nodejs` - */ - readonly temp: string; - } -} - -declare const envPaths: { - /** - Get paths for storing things like data, config, cache, etc. - - Note: It only generates the path strings. It doesn't create the directories for you. You could use [`make-dir`](https://github.com/sindresorhus/make-dir) to create the directories. - - @param name - Name of your project. Used to generate the paths. - @returns The paths to use for your project on current OS. - - @example - ``` - import envPaths = require('env-paths'); - - const paths = envPaths('MyApp'); - - paths.data; - //=> '/home/sindresorhus/.local/share/MyApp-nodejs' - - paths.config - //=> '/home/sindresorhus/.config/MyApp-nodejs' - ``` - */ - (name: string, options?: envPaths.Options): envPaths.Paths; - - // TODO: Remove this for the next major release, refactor the whole definition to: - // declare function envPaths(name: string, options?: envPaths.Options): envPaths.Paths; - // export = envPaths; - default: typeof envPaths; -}; - -export = envPaths; diff --git a/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js b/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js deleted file mode 100644 index 7e7b50b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; -const path = require('path'); -const os = require('os'); - -const homedir = os.homedir(); -const tmpdir = os.tmpdir(); -const {env} = process; - -const macos = name => { - const library = path.join(homedir, 'Library'); - - return { - data: path.join(library, 'Application Support', name), - config: path.join(library, 'Preferences', name), - cache: path.join(library, 'Caches', name), - log: path.join(library, 'Logs', name), - temp: path.join(tmpdir, name) - }; -}; - -const windows = name => { - const appData = env.APPDATA || path.join(homedir, 'AppData', 'Roaming'); - const localAppData = env.LOCALAPPDATA || path.join(homedir, 'AppData', 'Local'); - - return { - // Data/config/cache/log are invented by me as Windows isn't opinionated about this - data: path.join(localAppData, name, 'Data'), - config: path.join(appData, name, 'Config'), - cache: path.join(localAppData, name, 'Cache'), - log: path.join(localAppData, name, 'Log'), - temp: path.join(tmpdir, name) - }; -}; - -// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html -const linux = name => { - const username = path.basename(homedir); - - return { - data: path.join(env.XDG_DATA_HOME || path.join(homedir, '.local', 'share'), name), - config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, '.config'), name), - cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, '.cache'), name), - // https://wiki.debian.org/XDGBaseDirectorySpecification#state - log: path.join(env.XDG_STATE_HOME || path.join(homedir, '.local', 'state'), name), - temp: path.join(tmpdir, username, name) - }; -}; - -const envPaths = (name, options) => { - if (typeof name !== 'string') { - throw new TypeError(`Expected string, got ${typeof name}`); - } - - options = Object.assign({suffix: 'nodejs'}, options); - - if (options.suffix) { - // Add suffix to prevent possible conflict with native apps - name += `-${options.suffix}`; - } - - if (process.platform === 'darwin') { - return macos(name); - } - - if (process.platform === 'win32') { - return windows(name); - } - - return linux(name); -}; - -module.exports = envPaths; -// TODO: Remove this for the next major release -module.exports.default = envPaths; diff --git a/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/license b/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/license deleted file mode 100644 index e7af2f7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/package.json b/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/package.json deleted file mode 100644 index fae4ebc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "env-paths", - "version": "2.2.1", - "description": "Get paths for storing things like data, config, cache, etc", - "license": "MIT", - "repository": "sindresorhus/env-paths", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "common", - "user", - "paths", - "env", - "environment", - "directory", - "dir", - "appdir", - "path", - "data", - "config", - "cache", - "logs", - "temp", - "linux", - "unix" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/readme.md b/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/readme.md deleted file mode 100644 index b66d571..0000000 --- a/services/hocuspocus/node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/readme.md +++ /dev/null @@ -1,115 +0,0 @@ -# env-paths - -> Get paths for storing things like data, config, cache, etc - -Uses the correct OS-specific paths. Most developers get this wrong. - - -## Install - -``` -$ npm install env-paths -``` - - -## Usage - -```js -const envPaths = require('env-paths'); - -const paths = envPaths('MyApp'); - -paths.data; -//=> '/home/sindresorhus/.local/share/MyApp-nodejs' - -paths.config -//=> '/home/sindresorhus/.config/MyApp-nodejs' -``` - - -## API - -### paths = envPaths(name, options?) - -Note: It only generates the path strings. It doesn't create the directories for you. You could use [`make-dir`](https://github.com/sindresorhus/make-dir) to create the directories. - -#### name - -Type: `string` - -Name of your project. Used to generate the paths. - -#### options - -Type: `object` - -##### suffix - -Type: `string`
-Default: `'nodejs'` - -**Don't use this option unless you really have to!**
-Suffix appended to the project name to avoid name conflicts with native -apps. Pass an empty string to disable it. - -### paths.data - -Directory for data files. - -Example locations (with the default `nodejs` [suffix](#suffix)): - -- macOS: `~/Library/Application Support/MyApp-nodejs` -- Windows: `%LOCALAPPDATA%\MyApp-nodejs\Data` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Data`) -- Linux: `~/.local/share/MyApp-nodejs` (or `$XDG_DATA_HOME/MyApp-nodejs`) - -### paths.config - -Directory for config files. - -Example locations (with the default `nodejs` [suffix](#suffix)): - -- macOS: `~/Library/Preferences/MyApp-nodejs` -- Windows: `%APPDATA%\MyApp-nodejs\Config` (for example, `C:\Users\USERNAME\AppData\Roaming\MyApp-nodejs\Config`) -- Linux: `~/.config/MyApp-nodejs` (or `$XDG_CONFIG_HOME/MyApp-nodejs`) - -### paths.cache - -Directory for non-essential data files. - -Example locations (with the default `nodejs` [suffix](#suffix)): - -- macOS: `~/Library/Caches/MyApp-nodejs` -- Windows: `%LOCALAPPDATA%\MyApp-nodejs\Cache` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Cache`) -- Linux: `~/.cache/MyApp-nodejs` (or `$XDG_CACHE_HOME/MyApp-nodejs`) - -### paths.log - -Directory for log files. - -Example locations (with the default `nodejs` [suffix](#suffix)): - -- macOS: `~/Library/Logs/MyApp-nodejs` -- Windows: `%LOCALAPPDATA%\MyApp-nodejs\Log` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Log`) -- Linux: `~/.local/state/MyApp-nodejs` (or `$XDG_STATE_HOME/MyApp-nodejs`) - -### paths.temp - -Directory for temporary files. - -Example locations (with the default `nodejs` [suffix](#suffix)): - -- macOS: `/var/folders/jf/f2twvvvs5jl_m49tf034ffpw0000gn/T/MyApp-nodejs` -- Windows: `%LOCALAPPDATA%\Temp\MyApp-nodejs` (for example, `C:\Users\USERNAME\AppData\Local\Temp\MyApp-nodejs`) -- Linux: `/tmp/USERNAME/MyApp-nodejs` - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.editorconfig b/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.editorconfig deleted file mode 100644 index 829280b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[package.json] -indent_size = 2 diff --git a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.eslintrc.json b/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.eslintrc.json deleted file mode 100644 index 4829595..0000000 --- a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.eslintrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "root": true, - "extends": [ - "@satazor/eslint-config/es6", - "@satazor/eslint-config/addons/node" - ] -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.travis.yml b/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.travis.yml deleted file mode 100644 index b29cf66..0000000 --- a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "4" - - "6" diff --git a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/README.md b/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/README.md deleted file mode 100644 index 5afdab0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# err-code - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url] - -[npm-url]:https://npmjs.org/package/err-code -[downloads-image]:http://img.shields.io/npm/dm/err-code.svg -[npm-image]:http://img.shields.io/npm/v/err-code.svg -[travis-url]:https://travis-ci.org/IndigoUnited/js-err-code -[travis-image]:http://img.shields.io/travis/IndigoUnited/js-err-code/master.svg -[david-dm-url]:https://david-dm.org/IndigoUnited/js-err-code -[david-dm-image]:https://img.shields.io/david/IndigoUnited/js-err-code.svg -[david-dm-dev-url]:https://david-dm.org/IndigoUnited/js-err-code?type=dev -[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/js-err-code.svg -[greenkeeper-image]:https://badges.greenkeeper.io/IndigoUnited/js-err-code.svg -[greenkeeper-url]:https://greenkeeper.io/ - -Create new error instances with a code and additional properties. - - -## Installation - -```console -$ npm install err-code -// or -$ bower install err-code -``` - -The browser file is named index.umd.js which supports CommonJS, AMD and globals (errCode). - - -## Why - -I find myself doing this repeatedly: - -```js -var err = new Error('My message'); -err.code = 'SOMECODE'; -err.detail = 'Additional information about the error'; -throw err; -``` - - -## Usage - -Simple usage. - -```js -var errcode = require('err-code'); - -// fill error with message + code -throw errcode(new Error('My message'), 'ESOMECODE'); -// fill error with message + code + props -throw errcode(new Error('My message'), 'ESOMECODE', { detail: 'Additional information about the error' }); -// fill error with message + props -throw errcode(new Error('My message'), { detail: 'Additional information about the error' }); -``` - -## Pre-existing fields - -If the passed `Error` already has a `.code` field, or fields specified in the third argument to `errcode` they will be overwritten, unless the fields are read only or otherwise throw during assignment in which case a new object will be created that shares a prototype chain with the original `Error`. The `.stack` and `.message` properties will be carried over from the original error and `.code` or any passed properties will be set on it. - - -## Tests - -`$ npm test` - - -## License - -Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/bower.json b/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/bower.json deleted file mode 100644 index a39cb70..0000000 --- a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/bower.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "err-code", - "version": "1.1.1", - "description": "Create new error instances with a code and additional properties", - "main": "index.umd.js", - "homepage": "https://github.com/IndigoUnited/js-err-code", - "authors": [ - "IndigoUnited (http://indigounited.com)" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "error", - "err", - "code", - "properties", - "property" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/index.js b/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/index.js deleted file mode 100644 index 9ff3e9c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -function assign(obj, props) { - for (const key in props) { - Object.defineProperty(obj, key, { - value: props[key], - enumerable: true, - configurable: true, - }); - } - - return obj; -} - -function createError(err, code, props) { - if (!err || typeof err === 'string') { - throw new TypeError('Please pass an Error to err-code'); - } - - if (!props) { - props = {}; - } - - if (typeof code === 'object') { - props = code; - code = undefined; - } - - if (code != null) { - props.code = code; - } - - try { - return assign(err, props); - } catch (_) { - props.message = err.message; - props.stack = err.stack; - - const ErrClass = function () {}; - - ErrClass.prototype = Object.create(Object.getPrototypeOf(err)); - - return assign(new ErrClass(), props); - } -} - -module.exports = createError; diff --git a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/index.umd.js b/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/index.umd.js deleted file mode 100644 index 4100726..0000000 --- a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/index.umd.js +++ /dev/null @@ -1,51 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.errCode = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i index.umd.js" - }, - "bugs": { - "url": "https://github.com/IndigoUnited/js-err-code/issues/" - }, - "repository": { - "type": "git", - "url": "git://github.com/IndigoUnited/js-err-code.git" - }, - "keywords": [ - "error", - "err", - "code", - "properties", - "property" - ], - "author": "IndigoUnited (http://indigounited.com)", - "license": "MIT", - "devDependencies": { - "@satazor/eslint-config": "^3.0.0", - "browserify": "^16.5.1", - "eslint": "^7.2.0", - "expect.js": "^0.3.1", - "mocha": "^8.0.1" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/test/.eslintrc.json b/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/test/.eslintrc.json deleted file mode 100644 index f9fbb2d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/test/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "env": { - "mocha": true - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/test/test.js b/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/test/test.js deleted file mode 100644 index 22ba0a8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/test/test.js +++ /dev/null @@ -1,159 +0,0 @@ -'use strict'; - -const errcode = require('../index'); -const expect = require('expect.js'); - -describe('errcode', () => { - describe('string as first argument', () => { - it('should throw an error', () => { - expect(() => { errcode('my message'); }).to.throwError((err) => { - expect(err).to.be.a(TypeError); - }); - }); - }); - - describe('error as first argument', () => { - it('should accept an error and do nothing', () => { - const myErr = new Error('my message'); - const err = errcode(myErr); - - expect(err).to.be(myErr); - expect(err.hasOwnProperty(err.code)).to.be(false); - }); - - it('should accept an error and add a code', () => { - const myErr = new Error('my message'); - const err = errcode(myErr, 'ESOME'); - - expect(err).to.be(myErr); - expect(err.code).to.be('ESOME'); - }); - - it('should accept an error object and add code & properties', () => { - const myErr = new Error('my message'); - const err = errcode(myErr, 'ESOME', { foo: 'bar', bar: 'foo' }); - - expect(err).to.be.an(Error); - expect(err.code).to.be('ESOME'); - expect(err.foo).to.be('bar'); - expect(err.bar).to.be('foo'); - }); - - it('should create an error object without code but with properties', () => { - const myErr = new Error('my message'); - const err = errcode(myErr, { foo: 'bar', bar: 'foo' }); - - expect(err).to.be.an(Error); - expect(err.code).to.be(undefined); - expect(err.foo).to.be('bar'); - expect(err.bar).to.be('foo'); - }); - - it('should set a non-writable field', () => { - const myErr = new Error('my message'); - - Object.defineProperty(myErr, 'code', { - value: 'derp', - writable: false, - }); - const err = errcode(myErr, 'ERR_WAT'); - - expect(err).to.be.an(Error); - expect(err.stack).to.equal(myErr.stack); - expect(err.code).to.be('ERR_WAT'); - }); - - it('should add a code to frozen object', () => { - const myErr = new Error('my message'); - const err = errcode(Object.freeze(myErr), 'ERR_WAT'); - - expect(err).to.be.an(Error); - expect(err.stack).to.equal(myErr.stack); - expect(err.code).to.be('ERR_WAT'); - }); - - it('should to set a field that throws at assignment time', () => { - const myErr = new Error('my message'); - - Object.defineProperty(myErr, 'code', { - enumerable: true, - set() { - throw new Error('Nope!'); - }, - get() { - return 'derp'; - }, - }); - const err = errcode(myErr, 'ERR_WAT'); - - expect(err).to.be.an(Error); - expect(err.stack).to.equal(myErr.stack); - expect(err.code).to.be('ERR_WAT'); - }); - - it('should retain error type', () => { - const myErr = new TypeError('my message'); - - Object.defineProperty(myErr, 'code', { - value: 'derp', - writable: false, - }); - const err = errcode(myErr, 'ERR_WAT'); - - expect(err).to.be.a(TypeError); - expect(err.stack).to.equal(myErr.stack); - expect(err.code).to.be('ERR_WAT'); - }); - - it('should add a code to a class that extends Error', () => { - class CustomError extends Error { - set code(val) { - throw new Error('Nope!'); - } - } - - const myErr = new CustomError('my message'); - - Object.defineProperty(myErr, 'code', { - value: 'derp', - writable: false, - configurable: false, - }); - const err = errcode(myErr, 'ERR_WAT'); - - expect(err).to.be.a(CustomError); - expect(err.stack).to.equal(myErr.stack); - expect(err.code).to.be('ERR_WAT'); - - // original prototype chain should be intact - expect(() => { - const otherErr = new CustomError('my message'); - - otherErr.code = 'derp'; - }).to.throwError(); - }); - - it('should support errors that are not Errors', () => { - const err = errcode({ - message: 'Oh noes!', - }, 'ERR_WAT'); - - expect(err.message).to.be('Oh noes!'); - expect(err.code).to.be('ERR_WAT'); - }); - }); - - describe('falsy first arguments', () => { - it('should not allow passing null as the first argument', () => { - expect(() => { errcode(null); }).to.throwError((err) => { - expect(err).to.be.a(TypeError); - }); - }); - - it('should not allow passing undefined as the first argument', () => { - expect(() => { errcode(undefined); }).to.throwError((err) => { - expect(err).to.be.a(TypeError); - }); - }); - }); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/.travis.yml b/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/.travis.yml deleted file mode 100644 index 1335a77..0000000 --- a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js - -node_js: - - 6 - - 8 - - 10 diff --git a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/LICENSE b/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/LICENSE deleted file mode 100644 index 814aef4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Lars-Magnus Skog - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/README.md b/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/README.md deleted file mode 100644 index b98aa48..0000000 --- a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# expand-template - -> Expand placeholders in a template string. - -[![npm](https://img.shields.io/npm/v/expand-template.svg)](https://www.npmjs.com/package/expand-template) -![Node version](https://img.shields.io/node/v/expand-template.svg) -[![Build Status](https://travis-ci.org/ralphtheninja/expand-template.svg?branch=master)](https://travis-ci.org/ralphtheninja/expand-template) -[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) - -## Install - -``` -$ npm i expand-template -S -``` - -## Usage - -Default functionality expands templates using `{}` as separators for string placeholders. - -```js -var expand = require('expand-template')() -var template = '{foo}/{foo}/{bar}/{bar}' -console.log(expand(template, { - foo: 'BAR', - bar: 'FOO' -})) -// -> BAR/BAR/FOO/FOO -``` - -Custom separators: - -```js -var expand = require('expand-template')({ sep: '[]' }) -var template = '[foo]/[foo]/[bar]/[bar]' -console.log(expand(template, { - foo: 'BAR', - bar: 'FOO' -})) -// -> BAR/BAR/FOO/FOO -``` - -## License -All code, unless stated otherwise, is dual-licensed under [`WTFPL`](http://www.wtfpl.net/txt/copying/) and [`MIT`](https://opensource.org/licenses/MIT). diff --git a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/index.js b/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/index.js deleted file mode 100644 index e182837..0000000 --- a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/index.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = function (opts) { - var sep = opts ? opts.sep : '{}' - var len = sep.length - - var whitespace = '\\s*' - var left = escape(sep.substring(0, len / 2)) + whitespace - var right = whitespace + escape(sep.substring(len / 2, len)) - - return function (template, values) { - Object.keys(values).forEach(function (key) { - var value = String(values[key]).replace(/\$/g, '$$$$') - template = template.replace(regExp(key), value) - }) - return template - } - - function escape (s) { - return [].map.call(s, function (char) { - return '\\' + char - }).join('') - } - - function regExp (key) { - return new RegExp(left + key + right, 'g') - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/package.json b/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/package.json deleted file mode 100644 index 9a09656..0000000 --- a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "expand-template", - "version": "2.0.3", - "description": "Expand placeholders in a template string", - "main": "index.js", - "repository": { - "type": "git", - "url": "https://github.com/ralphtheninja/expand-template.git" - }, - "homepage": "https://github.com/ralphtheninja/expand-template", - "scripts": { - "test": "tape test.js && standard" - }, - "keywords": [ - "template", - "expand", - "replace" - ], - "author": "LM ", - "license": "(MIT OR WTFPL)", - "dependencies": {}, - "devDependencies": { - "standard": "^12.0.0", - "tape": "^4.2.2" - }, - "engines": { - "node": ">=6" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/test.js b/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/test.js deleted file mode 100644 index ba6ed87..0000000 --- a/services/hocuspocus/node_modules/.pnpm/expand-template@2.0.3/node_modules/expand-template/test.js +++ /dev/null @@ -1,67 +0,0 @@ -var test = require('tape') -var Expand = require('./') - -test('default expands {} placeholders', function (t) { - var expand = Expand() - t.equal(typeof expand, 'function', 'is a function') - t.equal(expand('{foo}/{bar}', { - foo: 'BAR', bar: 'FOO' - }), 'BAR/FOO') - t.equal(expand('{foo}{foo}{foo}', { - foo: 'FOO' - }), 'FOOFOOFOO', 'expands one placeholder many times') - t.end() -}) - -test('support for custom separators', function (t) { - var expand = Expand({ sep: '[]' }) - t.equal(expand('[foo]/[bar]', { - foo: 'BAR', bar: 'FOO' - }), 'BAR/FOO') - t.equal(expand('[foo][foo][foo]', { - foo: 'FOO' - }), 'FOOFOOFOO', 'expands one placeholder many times') - t.end() -}) - -test('support for longer custom separators', function (t) { - var expand = Expand({ sep: '[[]]' }) - t.equal(expand('[[foo]]/[[bar]]', { - foo: 'BAR', bar: 'FOO' - }), 'BAR/FOO') - t.equal(expand('[[foo]][[foo]][[foo]]', { - foo: 'FOO' - }), 'FOOFOOFOO', 'expands one placeholder many times') - t.end() -}) - -test('whitespace-insensitive', function (t) { - var expand = Expand({ sep: '[]' }) - t.equal(expand('[ foo ]/[ bar ]', { - foo: 'BAR', bar: 'FOO' - }), 'BAR/FOO') - t.equal(expand('[ foo ][ foo ][ foo]', { - foo: 'FOO' - }), 'FOOFOOFOO', 'expands one placeholder many times') - t.end() -}) - -test('dollar escape', function (t) { - var expand = Expand() - t.equal(expand('before {foo} after', { - foo: '$' - }), 'before $ after') - t.equal(expand('before {foo} after', { - foo: '$&' - }), 'before $& after') - t.equal(expand('before {foo} after', { - foo: '$`' - }), 'before $` after') - t.equal(expand('before {foo} after', { - foo: '$\'' - }), 'before $\' after') - t.equal(expand('before {foo} after', { - foo: '$0' - }), 'before $0 after') - t.end() -}) diff --git a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/.npmignore b/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/.npmignore deleted file mode 100644 index 07e6e47..0000000 --- a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/.travis.yml b/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/.travis.yml deleted file mode 100644 index 016bb6e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -sudo: false - -language: node_js - -node_js: - - "0.8" - - "0.10" - - "0.12" - - "1" - - "2" - - "3" - - "4" - - "5" - - "6" - - "7" - - "8" - -install: - - PATH="`npm bin`:`npm bin -g`:$PATH" - # Node 0.8 comes with a too obsolete npm - - if [[ "`node --version`" =~ ^v0\.8\. ]]; then npm install -g npm@1.4.28 ; fi - # Install dependencies and build - - npm install - -script: - # Output useful info for debugging - - node --version - - npm --version - # Run tests - - npm test diff --git a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/History.md b/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/History.md deleted file mode 100644 index c8682be..0000000 --- a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/History.md +++ /dev/null @@ -1,21 +0,0 @@ - -1.0.0 / 2017-07-06 -================== - - * update "mocha" to v3 - * fixed unicode URI decoding (#6) - * add typings for Typescript - * README: use SVG Travis-CI badge - * add LICENSE file (MIT) - * add .travis.yml file (testing Node.js 0.8 through 8 currently) - * add README.md file - -0.0.2 / 2014-01-27 -================== - - * index: invert the path separators on Windows - -0.0.1 / 2014-01-27 -================== - - * initial commit diff --git a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/LICENSE b/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/LICENSE deleted file mode 100644 index e1af783..0000000 --- a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/README.md b/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/README.md deleted file mode 100644 index ab30be8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/README.md +++ /dev/null @@ -1,74 +0,0 @@ -file-uri-to-path -================ -### Convert a `file:` URI to a file path -[![Build Status](https://travis-ci.org/TooTallNate/file-uri-to-path.svg?branch=master)](https://travis-ci.org/TooTallNate/file-uri-to-path) - -Accepts a `file:` URI and returns a regular file path suitable for use with the -`fs` module functions. - - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install file-uri-to-path -``` - - -Example -------- - -``` js -var uri2path = require('file-uri-to-path'); - -uri2path('file://localhost/c|/WINDOWS/clock.avi'); -// "c:\\WINDOWS\\clock.avi" - -uri2path('file:///c|/WINDOWS/clock.avi'); -// "c:\\WINDOWS\\clock.avi" - -uri2path('file://localhost/c:/WINDOWS/clock.avi'); -// "c:\\WINDOWS\\clock.avi" - -uri2path('file://hostname/path/to/the%20file.txt'); -// "\\\\hostname\\path\\to\\the file.txt" - -uri2path('file:///c:/path/to/the%20file.txt'); -// "c:\\path\\to\\the file.txt" -``` - - -API ---- - -### fileUriToPath(String uri) → String - - - -License -------- - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.d.ts b/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.d.ts deleted file mode 100644 index 99dc3f9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function fileUriToPath(uri: string): string; -export = fileUriToPath; diff --git a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.js b/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.js deleted file mode 100644 index 48cb280..0000000 --- a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.js +++ /dev/null @@ -1,66 +0,0 @@ - -/** - * Module dependencies. - */ - -var sep = require('path').sep || '/'; - -/** - * Module exports. - */ - -module.exports = fileUriToPath; - -/** - * File URI to Path function. - * - * @param {String} uri - * @return {String} path - * @api public - */ - -function fileUriToPath (uri) { - if ('string' != typeof uri || - uri.length <= 7 || - 'file://' != uri.substring(0, 7)) { - throw new TypeError('must pass in a file:// URI to convert to a file path'); - } - - var rest = decodeURI(uri.substring(7)); - var firstSlash = rest.indexOf('/'); - var host = rest.substring(0, firstSlash); - var path = rest.substring(firstSlash + 1); - - // 2. Scheme Definition - // As a special case, can be the string "localhost" or the empty - // string; this is interpreted as "the machine from which the URL is - // being interpreted". - if ('localhost' == host) host = ''; - - if (host) { - host = sep + sep + host; - } - - // 3.2 Drives, drive letters, mount points, file system root - // Drive letters are mapped into the top of a file URI in various ways, - // depending on the implementation; some applications substitute - // vertical bar ("|") for the colon after the drive letter, yielding - // "file:///c|/tmp/test.txt". In some cases, the colon is left - // unchanged, as in "file:///c:/tmp/test.txt". In other cases, the - // colon is simply omitted, as in "file:///c/tmp/test.txt". - path = path.replace(/^(.+)\|/, '$1:'); - - // for Windows, we need to invert the path separators from what a URI uses - if (sep == '\\') { - path = path.replace(/\//g, '\\'); - } - - if (/^.+\:/.test(path)) { - // has Windows drive at beginning of path - } else { - // unix path… - path = sep + path; - } - - return host + path; -} diff --git a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/package.json b/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/package.json deleted file mode 100644 index b6a4a07..0000000 --- a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "file-uri-to-path", - "version": "1.0.0", - "description": "Convert a file: URI to a file path", - "main": "index.js", - "types": "index.d.ts", - "directories": { - "test": "test" - }, - "scripts": { - "test": "mocha --reporter spec" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/file-uri-to-path.git" - }, - "keywords": [ - "file", - "uri", - "convert", - "path" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/file-uri-to-path/issues" - }, - "homepage": "https://github.com/TooTallNate/file-uri-to-path", - "devDependencies": { - "mocha": "3" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/test/test.js b/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/test/test.js deleted file mode 100644 index 79305dc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/test/test.js +++ /dev/null @@ -1,24 +0,0 @@ - -var sep = require('path').sep || '/'; -var assert = require('assert'); -var uri2path = require('../'); -var tests = require('./tests.json'); - -describe('file-uri-to-path', function () { - - Object.keys(tests).forEach(function (uri) { - - // the test cases were generated from Windows' PathCreateFromUrlA() function. - // On Unix, we have to replace the path separator with the Unix one instead of - // the Windows one. - var expected = tests[uri].replace(/\\/g, sep); - - it('should convert ' + JSON.stringify(uri) + ' to ' + JSON.stringify(expected), - function () { - var actual = uri2path(uri); - assert.equal(actual, expected); - }); - - }); - -}); diff --git a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/test/tests.json b/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/test/tests.json deleted file mode 100644 index b935a63..0000000 --- a/services/hocuspocus/node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/test/tests.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "file://host/path": "\\\\host\\path", - "file://localhost/etc/fstab": "\\etc\\fstab", - "file:///etc/fstab": "\\etc\\fstab", - "file:///c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi", - "file://localhost/c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi", - "file:///c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi", - "file://localhost/c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi", - "file://hostname/path/to/the%20file.txt": "\\\\hostname\\path\\to\\the file.txt", - "file:///c:/path/to/the%20file.txt": "c:\\path\\to\\the file.txt", - "file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc": "C:\\Documents and Settings\\davris\\FileSchemeURIs.doc", - "file:///C:/caf%C3%A9/%C3%A5r/d%C3%BCnn/%E7%89%9B%E9%93%83/Ph%E1%BB%9F/%F0%9F%98%B5.exe": "C:\\café\\år\\dünn\\牛铃\\Phở\\😵.exe" -} diff --git a/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/LICENSE b/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/LICENSE deleted file mode 100644 index cb757e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/README.md b/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/README.md deleted file mode 100644 index 62b3374..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# fs-constants - -Small module that allows you to get the fs constants across -Node and the browser. - -``` -npm install fs-constants -``` - -Previously you would use `require('constants')` for this in node but that has been -deprecated and changed to `require('fs').constants` which does not browserify. - -This module uses `require('constants')` in the browser and `require('fs').constants` in node to work around this - - -## Usage - -``` js -var constants = require('fs-constants') - -console.log('constants:', constants) -``` - -## License - -MIT diff --git a/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/browser.js b/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/browser.js deleted file mode 100644 index 3c87638..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('constants') diff --git a/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js b/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js deleted file mode 100644 index 2a3aadf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('fs').constants || require('constants') diff --git a/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/package.json b/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/package.json deleted file mode 100644 index 6f2b8f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "fs-constants", - "version": "1.0.0", - "description": "Require constants across node and the browser", - "main": "index.js", - "browser": "browser.js", - "dependencies": {}, - "devDependencies": {}, - "repository": { - "type": "git", - "url": "https://github.com/mafintosh/fs-constants.git" - }, - "author": "Mathias Buus (@mafintosh)", - "license": "MIT", - "bugs": { - "url": "https://github.com/mafintosh/fs-constants/issues" - }, - "homepage": "https://github.com/mafintosh/fs-constants" -} diff --git a/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/LICENSE b/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/README.md b/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/README.md deleted file mode 100644 index 1e61241..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# fs-minipass - -Filesystem streams based on [minipass](http://npm.im/minipass). - -4 classes are exported: - -- ReadStream -- ReadStreamSync -- WriteStream -- WriteStreamSync - -When using `ReadStreamSync`, all of the data is made available -immediately upon consuming the stream. Nothing is buffered in memory -when the stream is constructed. If the stream is piped to a writer, -then it will synchronously `read()` and emit data into the writer as -fast as the writer can consume it. (That is, it will respect -backpressure.) If you call `stream.read()` then it will read the -entire file and return the contents. - -When using `WriteStreamSync`, every write is flushed to the file -synchronously. If your writes all come in a single tick, then it'll -write it all out in a single tick. It's as synchronous as you are. - -The async versions work much like their node builtin counterparts, -with the exception of introducing significantly less Stream machinery -overhead. - -## USAGE - -It's just streams, you pipe them or read() them or write() to them. - -```js -const fsm = require('fs-minipass') -const readStream = new fsm.ReadStream('file.txt') -const writeStream = new fsm.WriteStream('output.txt') -writeStream.write('some file header or whatever\n') -readStream.pipe(writeStream) -``` - -## ReadStream(path, options) - -Path string is required, but somewhat irrelevant if an open file -descriptor is passed in as an option. - -Options: - -- `fd` Pass in a numeric file descriptor, if the file is already open. -- `readSize` The size of reads to do, defaults to 16MB -- `size` The size of the file, if known. Prevents zero-byte read() - call at the end. -- `autoClose` Set to `false` to prevent the file descriptor from being - closed when the file is done being read. - -## WriteStream(path, options) - -Path string is required, but somewhat irrelevant if an open file -descriptor is passed in as an option. - -Options: - -- `fd` Pass in a numeric file descriptor, if the file is already open. -- `mode` The mode to create the file with. Defaults to `0o666`. -- `start` The position in the file to start reading. If not - specified, then the file will start writing at position zero, and be - truncated by default. -- `autoClose` Set to `false` to prevent the file descriptor from being - closed when the stream is ended. -- `flags` Flags to use when opening the file. Irrelevant if `fd` is - passed in, since file won't be opened in that case. Defaults to - `'a'` if a `pos` is specified, or `'w'` otherwise. diff --git a/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/index.js b/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/index.js deleted file mode 100644 index 9b0779c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/index.js +++ /dev/null @@ -1,422 +0,0 @@ -'use strict' -const MiniPass = require('minipass') -const EE = require('events').EventEmitter -const fs = require('fs') - -let writev = fs.writev -/* istanbul ignore next */ -if (!writev) { - // This entire block can be removed if support for earlier than Node.js - // 12.9.0 is not needed. - const binding = process.binding('fs') - const FSReqWrap = binding.FSReqWrap || binding.FSReqCallback - - writev = (fd, iovec, pos, cb) => { - const done = (er, bw) => cb(er, bw, iovec) - const req = new FSReqWrap() - req.oncomplete = done - binding.writeBuffers(fd, iovec, pos, req) - } -} - -const _autoClose = Symbol('_autoClose') -const _close = Symbol('_close') -const _ended = Symbol('_ended') -const _fd = Symbol('_fd') -const _finished = Symbol('_finished') -const _flags = Symbol('_flags') -const _flush = Symbol('_flush') -const _handleChunk = Symbol('_handleChunk') -const _makeBuf = Symbol('_makeBuf') -const _mode = Symbol('_mode') -const _needDrain = Symbol('_needDrain') -const _onerror = Symbol('_onerror') -const _onopen = Symbol('_onopen') -const _onread = Symbol('_onread') -const _onwrite = Symbol('_onwrite') -const _open = Symbol('_open') -const _path = Symbol('_path') -const _pos = Symbol('_pos') -const _queue = Symbol('_queue') -const _read = Symbol('_read') -const _readSize = Symbol('_readSize') -const _reading = Symbol('_reading') -const _remain = Symbol('_remain') -const _size = Symbol('_size') -const _write = Symbol('_write') -const _writing = Symbol('_writing') -const _defaultFlag = Symbol('_defaultFlag') -const _errored = Symbol('_errored') - -class ReadStream extends MiniPass { - constructor (path, opt) { - opt = opt || {} - super(opt) - - this.readable = true - this.writable = false - - if (typeof path !== 'string') - throw new TypeError('path must be a string') - - this[_errored] = false - this[_fd] = typeof opt.fd === 'number' ? opt.fd : null - this[_path] = path - this[_readSize] = opt.readSize || 16*1024*1024 - this[_reading] = false - this[_size] = typeof opt.size === 'number' ? opt.size : Infinity - this[_remain] = this[_size] - this[_autoClose] = typeof opt.autoClose === 'boolean' ? - opt.autoClose : true - - if (typeof this[_fd] === 'number') - this[_read]() - else - this[_open]() - } - - get fd () { return this[_fd] } - get path () { return this[_path] } - - write () { - throw new TypeError('this is a readable stream') - } - - end () { - throw new TypeError('this is a readable stream') - } - - [_open] () { - fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd)) - } - - [_onopen] (er, fd) { - if (er) - this[_onerror](er) - else { - this[_fd] = fd - this.emit('open', fd) - this[_read]() - } - } - - [_makeBuf] () { - return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])) - } - - [_read] () { - if (!this[_reading]) { - this[_reading] = true - const buf = this[_makeBuf]() - /* istanbul ignore if */ - if (buf.length === 0) - return process.nextTick(() => this[_onread](null, 0, buf)) - fs.read(this[_fd], buf, 0, buf.length, null, (er, br, buf) => - this[_onread](er, br, buf)) - } - } - - [_onread] (er, br, buf) { - this[_reading] = false - if (er) - this[_onerror](er) - else if (this[_handleChunk](br, buf)) - this[_read]() - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')) - } - } - - [_onerror] (er) { - this[_reading] = true - this[_close]() - this.emit('error', er) - } - - [_handleChunk] (br, buf) { - let ret = false - // no effect if infinite - this[_remain] -= br - if (br > 0) - ret = super.write(br < buf.length ? buf.slice(0, br) : buf) - - if (br === 0 || this[_remain] <= 0) { - ret = false - this[_close]() - super.end() - } - - return ret - } - - emit (ev, data) { - switch (ev) { - case 'prefinish': - case 'finish': - break - - case 'drain': - if (typeof this[_fd] === 'number') - this[_read]() - break - - case 'error': - if (this[_errored]) - return - this[_errored] = true - return super.emit(ev, data) - - default: - return super.emit(ev, data) - } - } -} - -class ReadStreamSync extends ReadStream { - [_open] () { - let threw = true - try { - this[_onopen](null, fs.openSync(this[_path], 'r')) - threw = false - } finally { - if (threw) - this[_close]() - } - } - - [_read] () { - let threw = true - try { - if (!this[_reading]) { - this[_reading] = true - do { - const buf = this[_makeBuf]() - /* istanbul ignore next */ - const br = buf.length === 0 ? 0 - : fs.readSync(this[_fd], buf, 0, buf.length, null) - if (!this[_handleChunk](br, buf)) - break - } while (true) - this[_reading] = false - } - threw = false - } finally { - if (threw) - this[_close]() - } - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.closeSync(fd) - this.emit('close') - } - } -} - -class WriteStream extends EE { - constructor (path, opt) { - opt = opt || {} - super(opt) - this.readable = false - this.writable = true - this[_errored] = false - this[_writing] = false - this[_ended] = false - this[_needDrain] = false - this[_queue] = [] - this[_path] = path - this[_fd] = typeof opt.fd === 'number' ? opt.fd : null - this[_mode] = opt.mode === undefined ? 0o666 : opt.mode - this[_pos] = typeof opt.start === 'number' ? opt.start : null - this[_autoClose] = typeof opt.autoClose === 'boolean' ? - opt.autoClose : true - - // truncating makes no sense when writing into the middle - const defaultFlag = this[_pos] !== null ? 'r+' : 'w' - this[_defaultFlag] = opt.flags === undefined - this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags - - if (this[_fd] === null) - this[_open]() - } - - emit (ev, data) { - if (ev === 'error') { - if (this[_errored]) - return - this[_errored] = true - } - return super.emit(ev, data) - } - - - get fd () { return this[_fd] } - get path () { return this[_path] } - - [_onerror] (er) { - this[_close]() - this[_writing] = true - this.emit('error', er) - } - - [_open] () { - fs.open(this[_path], this[_flags], this[_mode], - (er, fd) => this[_onopen](er, fd)) - } - - [_onopen] (er, fd) { - if (this[_defaultFlag] && - this[_flags] === 'r+' && - er && er.code === 'ENOENT') { - this[_flags] = 'w' - this[_open]() - } else if (er) - this[_onerror](er) - else { - this[_fd] = fd - this.emit('open', fd) - this[_flush]() - } - } - - end (buf, enc) { - if (buf) - this.write(buf, enc) - - this[_ended] = true - - // synthetic after-write logic, where drain/finish live - if (!this[_writing] && !this[_queue].length && - typeof this[_fd] === 'number') - this[_onwrite](null, 0) - return this - } - - write (buf, enc) { - if (typeof buf === 'string') - buf = Buffer.from(buf, enc) - - if (this[_ended]) { - this.emit('error', new Error('write() after end()')) - return false - } - - if (this[_fd] === null || this[_writing] || this[_queue].length) { - this[_queue].push(buf) - this[_needDrain] = true - return false - } - - this[_writing] = true - this[_write](buf) - return true - } - - [_write] (buf) { - fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => - this[_onwrite](er, bw)) - } - - [_onwrite] (er, bw) { - if (er) - this[_onerror](er) - else { - if (this[_pos] !== null) - this[_pos] += bw - if (this[_queue].length) - this[_flush]() - else { - this[_writing] = false - - if (this[_ended] && !this[_finished]) { - this[_finished] = true - this[_close]() - this.emit('finish') - } else if (this[_needDrain]) { - this[_needDrain] = false - this.emit('drain') - } - } - } - } - - [_flush] () { - if (this[_queue].length === 0) { - if (this[_ended]) - this[_onwrite](null, 0) - } else if (this[_queue].length === 1) - this[_write](this[_queue].pop()) - else { - const iovec = this[_queue] - this[_queue] = [] - writev(this[_fd], iovec, this[_pos], - (er, bw) => this[_onwrite](er, bw)) - } - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')) - } - } -} - -class WriteStreamSync extends WriteStream { - [_open] () { - let fd - // only wrap in a try{} block if we know we'll retry, to avoid - // the rethrow obscuring the error's source frame in most cases. - if (this[_defaultFlag] && this[_flags] === 'r+') { - try { - fd = fs.openSync(this[_path], this[_flags], this[_mode]) - } catch (er) { - if (er.code === 'ENOENT') { - this[_flags] = 'w' - return this[_open]() - } else - throw er - } - } else - fd = fs.openSync(this[_path], this[_flags], this[_mode]) - - this[_onopen](null, fd) - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.closeSync(fd) - this.emit('close') - } - } - - [_write] (buf) { - // throw the original, but try to close if it fails - let threw = true - try { - this[_onwrite](null, - fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos])) - threw = false - } finally { - if (threw) - try { this[_close]() } catch (_) {} - } - } -} - -exports.ReadStream = ReadStream -exports.ReadStreamSync = ReadStreamSync - -exports.WriteStream = WriteStream -exports.WriteStreamSync = WriteStreamSync diff --git a/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/package.json b/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/package.json deleted file mode 100644 index 2f2436c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "fs-minipass", - "version": "2.1.0", - "main": "index.js", - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "keywords": [], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/fs-minipass.git" - }, - "bugs": { - "url": "https://github.com/npm/fs-minipass/issues" - }, - "homepage": "https://github.com/npm/fs-minipass#readme", - "description": "fs read and write streams based on minipass", - "dependencies": { - "minipass": "^3.0.0" - }, - "devDependencies": { - "mutate-fs": "^2.0.1", - "tap": "^14.6.4" - }, - "files": [ - "index.js" - ], - "tap": { - "check-coverage": true - }, - "engines": { - "node": ">= 8" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/minipass b/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/minipass deleted file mode 120000 index 7c1951b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs-minipass@2.1.0/node_modules/minipass +++ /dev/null @@ -1 +0,0 @@ -../../minipass@3.3.6/node_modules/minipass \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/LICENSE b/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/LICENSE deleted file mode 100644 index 5bd884c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/LICENSE +++ /dev/null @@ -1,43 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ----- - -This library bundles a version of the `fs.realpath` and `fs.realpathSync` -methods from Node.js v0.10 under the terms of the Node.js MIT license. - -Node's license follows, also included at the header of `old.js` which contains -the licensed code: - - Copyright Joyent, Inc. and other Node contributors. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/README.md b/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/README.md deleted file mode 100644 index a42ceac..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# fs.realpath - -A backwards-compatible fs.realpath for Node v6 and above - -In Node v6, the JavaScript implementation of fs.realpath was replaced -with a faster (but less resilient) native implementation. That raises -new and platform-specific errors and cannot handle long or excessively -symlink-looping paths. - -This module handles those cases by detecting the new errors and -falling back to the JavaScript implementation. On versions of Node -prior to v6, it has no effect. - -## USAGE - -```js -var rp = require('fs.realpath') - -// async version -rp.realpath(someLongAndLoopingPath, function (er, real) { - // the ELOOP was handled, but it was a bit slower -}) - -// sync version -var real = rp.realpathSync(someLongAndLoopingPath) - -// monkeypatch at your own risk! -// This replaces the fs.realpath/fs.realpathSync builtins -rp.monkeypatch() - -// un-do the monkeypatching -rp.unmonkeypatch() -``` diff --git a/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js b/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js deleted file mode 100644 index b09c7c7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js +++ /dev/null @@ -1,66 +0,0 @@ -module.exports = realpath -realpath.realpath = realpath -realpath.sync = realpathSync -realpath.realpathSync = realpathSync -realpath.monkeypatch = monkeypatch -realpath.unmonkeypatch = unmonkeypatch - -var fs = require('fs') -var origRealpath = fs.realpath -var origRealpathSync = fs.realpathSync - -var version = process.version -var ok = /^v[0-5]\./.test(version) -var old = require('./old.js') - -function newError (er) { - return er && er.syscall === 'realpath' && ( - er.code === 'ELOOP' || - er.code === 'ENOMEM' || - er.code === 'ENAMETOOLONG' - ) -} - -function realpath (p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb) - } - - if (typeof cache === 'function') { - cb = cache - cache = null - } - origRealpath(p, cache, function (er, result) { - if (newError(er)) { - old.realpath(p, cache, cb) - } else { - cb(er, result) - } - }) -} - -function realpathSync (p, cache) { - if (ok) { - return origRealpathSync(p, cache) - } - - try { - return origRealpathSync(p, cache) - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache) - } else { - throw er - } - } -} - -function monkeypatch () { - fs.realpath = realpath - fs.realpathSync = realpathSync -} - -function unmonkeypatch () { - fs.realpath = origRealpath - fs.realpathSync = origRealpathSync -} diff --git a/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js b/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js deleted file mode 100644 index b40305e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var pathModule = require('path'); -var isWindows = process.platform === 'win32'; -var fs = require('fs'); - -// JavaScript implementation of realpath, ported from node pre-v6 - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; - - return callback; - - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; diff --git a/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/package.json b/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/package.json deleted file mode 100644 index 3edc57d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "fs.realpath", - "version": "1.0.0", - "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "scripts": { - "test": "tap test/*.js --cov" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/fs.realpath.git" - }, - "keywords": [ - "realpath", - "fs", - "polyfill" - ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "files": [ - "old.js", - "index.js" - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/aproba b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/aproba deleted file mode 120000 index 7f8dd45..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/aproba +++ /dev/null @@ -1 +0,0 @@ -../../aproba@2.1.0/node_modules/aproba \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/color-support b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/color-support deleted file mode 120000 index 997ffc0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/color-support +++ /dev/null @@ -1 +0,0 @@ -../../color-support@1.1.3/node_modules/color-support \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/console-control-strings b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/console-control-strings deleted file mode 120000 index e1f9a74..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/console-control-strings +++ /dev/null @@ -1 +0,0 @@ -../../console-control-strings@1.1.0/node_modules/console-control-strings \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/LICENSE.md deleted file mode 100644 index 5fc208f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ - - -ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/README.md b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/README.md deleted file mode 100644 index cbef5a5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/README.md +++ /dev/null @@ -1,402 +0,0 @@ -gauge -===== - -A nearly stateless terminal based horizontal gauge / progress bar. - -```javascript -var Gauge = require("gauge") - -var gauge = new Gauge() - -gauge.show("working…", 0) -setTimeout(() => { gauge.pulse(); gauge.show("working…", 0.25) }, 500) -setTimeout(() => { gauge.pulse(); gauge.show("working…", 0.50) }, 1000) -setTimeout(() => { gauge.pulse(); gauge.show("working…", 0.75) }, 1500) -setTimeout(() => { gauge.pulse(); gauge.show("working…", 0.99) }, 2000) -setTimeout(() => gauge.hide(), 2300) -``` - -See also the [demos](docs/demo.js): - -![](./docs/gauge-demo.gif) - - -### CHANGES FROM 1.x - -Gauge 2.x is breaking release, please see the [changelog] for details on -what's changed if you were previously a user of this module. - -[changelog]: CHANGELOG.md - -### THE GAUGE CLASS - -This is the typical interface to the module– it provides a pretty -fire-and-forget interface to displaying your status information. - -``` -var Gauge = require("gauge") - -var gauge = new Gauge([stream], [options]) -``` - -* **stream** – *(optional, default STDERR)* A stream that progress bar - updates are to be written to. Gauge honors backpressure and will pause - most writing if it is indicated. -* **options** – *(optional)* An option object. - -Constructs a new gauge. Gauges are drawn on a single line, and are not drawn -if **stream** isn't a tty and a tty isn't explicitly provided. - -If **stream** is a terminal or if you pass in **tty** to **options** then we -will detect terminal resizes and redraw to fit. We do this by watching for -`resize` events on the tty. (To work around a bug in versions of Node prior -to 2.5.0, we watch for them on stdout if the tty is stderr.) Resizes to -larger window sizes will be clean, but shrinking the window will always -result in some cruft. - -**IMPORTANT:** If you previously were passing in a non-tty stream but you still -want output (for example, a stream wrapped by the `ansi` module) then you -need to pass in the **tty** option below, as `gauge` needs access to -the underlying tty in order to do things like terminal resizes and terminal -width detection. - -The **options** object can have the following properties, all of which are -optional: - -* **updateInterval**: How often gauge updates should be drawn, in milliseconds. -* **fixedFramerate**: Defaults to false on node 0.8, true on everything - else. When this is true a timer is created to trigger once every - `updateInterval` ms, when false, updates are printed as soon as they come - in but updates more often than `updateInterval` are ignored. The reason - 0.8 doesn't have this set to true is that it can't `unref` its timer and - so it would stop your program from exiting– if you want to use this - feature with 0.8 just make sure you call `gauge.disable()` before you - expect your program to exit. -* **themes**: A themeset to use when selecting the theme to use. Defaults - to `gauge/themes`, see the [themes] documentation for details. -* **theme**: Select a theme for use, it can be a: - * Theme object, in which case the **themes** is not used. - * The name of a theme, which will be looked up in the current *themes* - object. - * A configuration object with any of `hasUnicode`, `hasColor` or - `platform` keys, which if will be used to override our guesses when making - a default theme selection. - - If no theme is selected then a default is picked using a combination of our - best guesses at your OS, color support and unicode support. -* **template**: Describes what you want your gauge to look like. The - default is what npm uses. Detailed [documentation] is later in this - document. -* **hideCursor**: Defaults to true. If true, then the cursor will be hidden - while the gauge is displayed. -* **tty**: The tty that you're ultimately writing to. Defaults to the same - as **stream**. This is used for detecting the width of the terminal and - resizes. The width used is `tty.columns - 1`. If no tty is available then - a width of `79` is assumed. -* **enabled**: Defaults to true if `tty` is a TTY, false otherwise. If true - the gauge starts enabled. If disabled then all update commands are - ignored and no gauge will be printed until you call `.enable()`. -* **Plumbing**: The class to use to actually generate the gauge for - printing. This defaults to `require('gauge/plumbing')` and ordinarily you - shouldn't need to override this. -* **cleanupOnExit**: Defaults to true. Ordinarily we register an exit - handler to make sure your cursor is turned back on and the progress bar - erased when your process exits, even if you Ctrl-C out or otherwise exit - unexpectedly. You can disable this and it won't register the exit handler. - -[has-unicode]: https://www.npmjs.com/package/has-unicode -[themes]: #themes -[documentation]: #templates - -#### `gauge.show(section | status, [completed])` - -The first argument is either the section, the name of the current thing -contributing to progress, or an object with keys like **section**, -**subsection** & **completed** (or any others you have types for in a custom -template). If you don't want to update or set any of these you can pass -`null` and it will be ignored. - -The second argument is the percent completed as a value between 0 and 1. -Without it, completion is just not updated. You'll also note that completion -can be passed in as part of a status object as the first argument. If both -it and the completed argument are passed in, the completed argument wins. - -#### `gauge.hide([cb])` - -Removes the gauge from the terminal. Optionally, callback `cb` after IO has -had an opportunity to happen (currently this just means after `setImmediate` -has called back.) - -It turns out this is important when you're pausing the progress bar on one -filehandle and printing to another– otherwise (with a big enough print) node -can end up printing the "end progress bar" bits to the progress bar filehandle -while other stuff is printing to another filehandle. These getting interleaved -can cause corruption in some terminals. - -#### `gauge.pulse([subsection])` - -* **subsection** – *(optional)* The specific thing that triggered this pulse - -Spins the spinner in the gauge to show output. If **subsection** is -included then it will be combined with the last name passed to `gauge.show`. - -#### `gauge.disable()` - -Hides the gauge and ignores further calls to `show` or `pulse`. - -#### `gauge.enable()` - -Shows the gauge and resumes updating when `show` or `pulse` is called. - -#### `gauge.isEnabled()` - -Returns true if the gauge is enabled. - -#### `gauge.setThemeset(themes)` - -Change the themeset to select a theme from. The same as the `themes` option -used in the constructor. The theme will be reselected from this themeset. - -#### `gauge.setTheme(theme)` - -Change the active theme, will be displayed with the next show or pulse. This can be: - -* Theme object, in which case the **themes** is not used. -* The name of a theme, which will be looked up in the current *themes* - object. -* A configuration object with any of `hasUnicode`, `hasColor` or - `platform` keys, which if will be used to override our guesses when making - a default theme selection. - -If no theme is selected then a default is picked using a combination of our -best guesses at your OS, color support and unicode support. - -#### `gauge.setTemplate(template)` - -Change the active template, will be displayed with the next show or pulse - -### Tracking Completion - -If you have more than one thing going on that you want to track completion -of, you may find the related [are-we-there-yet] helpful. It's `change` -event can be wired up to the `show` method to get a more traditional -progress bar interface. - -[are-we-there-yet]: https://www.npmjs.com/package/are-we-there-yet - -### THEMES - -``` -var themes = require('gauge/themes') - -// fetch the default color unicode theme for this platform -var ourTheme = themes({hasUnicode: true, hasColor: true}) - -// fetch the default non-color unicode theme for osx -var ourTheme = themes({hasUnicode: true, hasColor: false, platform: 'darwin'}) - -// create a new theme based on the color ascii theme for this platform -// that brackets the progress bar with arrows -var ourTheme = themes.newTheme(themes({hasUnicode: false, hasColor: true}), { - preProgressbar: '→', - postProgressbar: '←' -}) -``` - -The object returned by `gauge/themes` is an instance of the `ThemeSet` class. - -``` -var ThemeSet = require('gauge/theme-set') -var themes = new ThemeSet() -// or -var themes = require('gauge/themes') -var mythemes = themes.newThemeSet() // creates a new themeset based on the default themes -``` - -#### themes(opts) -#### themes.getDefault(opts) - -Theme objects are a function that fetches the default theme based on -platform, unicode and color support. - -Options is an object with the following properties: - -* **hasUnicode** - If true, fetch a unicode theme, if no unicode theme is - available then a non-unicode theme will be used. -* **hasColor** - If true, fetch a color theme, if no color theme is - available a non-color theme will be used. -* **platform** (optional) - Defaults to `process.platform`. If no - platform match is available then `fallback` is used instead. - -If no compatible theme can be found then an error will be thrown with a -`code` of `EMISSINGTHEME`. - -#### themes.addTheme(themeName, themeObj) -#### themes.addTheme(themeName, [parentTheme], newTheme) - -Adds a named theme to the themeset. You can pass in either a theme object, -as returned by `themes.newTheme` or the arguments you'd pass to -`themes.newTheme`. - -#### themes.getThemeNames() - -Return a list of all of the names of the themes in this themeset. Suitable -for use in `themes.getTheme(…)`. - -#### themes.getTheme(name) - -Returns the theme object from this theme set named `name`. - -If `name` does not exist in this themeset an error will be thrown with -a `code` of `EMISSINGTHEME`. - -#### themes.setDefault([opts], themeName) - -`opts` is an object with the following properties. - -* **platform** - Defaults to `'fallback'`. If your theme is platform - specific, specify that here with the platform from `process.platform`, eg, - `win32`, `darwin`, etc. -* **hasUnicode** - Defaults to `false`. If your theme uses unicode you - should set this to true. -* **hasColor** - Defaults to `false`. If your theme uses color you should - set this to true. - -`themeName` is the name of the theme (as given to `addTheme`) to use for -this set of `opts`. - -#### themes.newTheme([parentTheme,] newTheme) - -Create a new theme object based on `parentTheme`. If no `parentTheme` is -provided then a minimal parentTheme that defines functions for rendering the -activity indicator (spinner) and progress bar will be defined. (This -fallback parent is defined in `gauge/base-theme`.) - -newTheme should be a bare object– we'll start by discussing the properties -defined by the default themes: - -* **preProgressbar** - displayed prior to the progress bar, if the progress - bar is displayed. -* **postProgressbar** - displayed after the progress bar, if the progress bar - is displayed. -* **progressBarTheme** - The subtheme passed through to the progress bar - renderer, it's an object with `complete` and `remaining` properties - that are the strings you want repeated for those sections of the progress - bar. -* **activityIndicatorTheme** - The theme for the activity indicator (spinner), - this can either be a string, in which each character is a different step, or - an array of strings. -* **preSubsection** - Displayed as a separator between the `section` and - `subsection` when the latter is printed. - -More generally, themes can have any value that would be a valid value when rendering -templates. The properties in the theme are used when their name matches a type in -the template. Their values can be: - -* **strings & numbers** - They'll be included as is -* **function (values, theme, width)** - Should return what you want in your output. - *values* is an object with values provided via `gauge.show`, - *theme* is the theme specific to this item (see below) or this theme object, - and *width* is the number of characters wide your result should be. - -There are a couple of special prefixes: - -* **pre** - Is shown prior to the property, if its displayed. -* **post** - Is shown after the property, if its displayed. - -And one special suffix: - -* **Theme** - Its value is passed to a function-type item as the theme. - -#### themes.addToAllThemes(theme) - -This *mixes-in* `theme` into all themes currently defined. It also adds it -to the default parent theme for this themeset, so future themes added to -this themeset will get the values from `theme` by default. - -#### themes.newThemeSet() - -Copy the current themeset into a new one. This allows you to easily inherit -one themeset from another. - -### TEMPLATES - -A template is an array of objects and strings that, after being evaluated, -will be turned into the gauge line. The default template is: - -```javascript -[ - {type: 'progressbar', length: 20}, - {type: 'activityIndicator', kerning: 1, length: 1}, - {type: 'section', kerning: 1, default: ''}, - {type: 'subsection', kerning: 1, default: ''} -] -``` - -The various template elements can either be **plain strings**, in which case they will -be be included verbatum in the output, or objects with the following properties: - -* *type* can be any of the following plus any keys you pass into `gauge.show` plus - any keys you have on a custom theme. - * `section` – What big thing you're working on now. - * `subsection` – What component of that thing is currently working. - * `activityIndicator` – Shows a spinner using the `activityIndicatorTheme` - from your active theme. - * `progressbar` – A progress bar representing your current `completed` - using the `progressbarTheme` from your active theme. -* *kerning* – Number of spaces that must be between this item and other - items, if this item is displayed at all. -* *maxLength* – The maximum length for this element. If its value is longer it - will be truncated. -* *minLength* – The minimum length for this element. If its value is shorter it - will be padded according to the *align* value. -* *align* – (Default: left) Possible values "left", "right" and "center". Works - as you'd expect from word processors. -* *length* – Provides a single value for both *minLength* and *maxLength*. If both - *length* and *minLength or *maxLength* are specified then the latter take precedence. -* *value* – A literal value to use for this template item. -* *default* – A default value to use for this template item if a value - wasn't otherwise passed in. - -### PLUMBING - -This is the super simple, assume nothing, do no magic internals used by gauge to -implement its ordinary interface. - -``` -var Plumbing = require('gauge/plumbing') -var gauge = new Plumbing(theme, template, width) -``` - -* **theme**: The theme to use. -* **template**: The template to use. -* **width**: How wide your gauge should be - -#### `gauge.setTheme(theme)` - -Change the active theme. - -#### `gauge.setTemplate(template)` - -Change the active template. - -#### `gauge.setWidth(width)` - -Change the width to render at. - -#### `gauge.hide()` - -Return the string necessary to hide the progress bar - -#### `gauge.hideCursor()` - -Return a string to hide the cursor. - -#### `gauge.showCursor()` - -Return a string to show the cursor. - -#### `gauge.show(status)` - -Using `status` for values, render the provided template with the theme and return -a string that is suitable for printing to update the gauge. diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/base-theme.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/base-theme.js deleted file mode 100644 index 00bf568..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/base-theme.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict' -var spin = require('./spin.js') -var progressBar = require('./progress-bar.js') - -module.exports = { - activityIndicator: function (values, theme, width) { - if (values.spun == null) { - return - } - return spin(theme, values.spun) - }, - progressbar: function (values, theme, width) { - if (values.completed == null) { - return - } - return progressBar(theme, width, values.completed) - }, -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/error.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/error.js deleted file mode 100644 index d9914ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/error.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict' -var util = require('util') - -var User = exports.User = function User (msg) { - var err = new Error(msg) - Error.captureStackTrace(err, User) - err.code = 'EGAUGE' - return err -} - -exports.MissingTemplateValue = function MissingTemplateValue (item, values) { - var err = new User(util.format('Missing template value "%s"', item.type)) - Error.captureStackTrace(err, MissingTemplateValue) - err.template = item - err.values = values - return err -} - -exports.Internal = function Internal (msg) { - var err = new Error(msg) - Error.captureStackTrace(err, Internal) - err.code = 'EGAUGEINTERNAL' - return err -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/has-color.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/has-color.js deleted file mode 100644 index 16cba0e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/has-color.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict' -var colorSupport = require('color-support') - -module.exports = colorSupport().hasBasic diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/index.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/index.js deleted file mode 100644 index 37fc5ac..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/index.js +++ /dev/null @@ -1,289 +0,0 @@ -'use strict' -var Plumbing = require('./plumbing.js') -var hasUnicode = require('has-unicode') -var hasColor = require('./has-color.js') -var onExit = require('signal-exit') -var defaultThemes = require('./themes') -var setInterval = require('./set-interval.js') -var process = require('./process.js') -var setImmediate = require('./set-immediate') - -module.exports = Gauge - -function callWith (obj, method) { - return function () { - return method.call(obj) - } -} - -function Gauge (arg1, arg2) { - var options, writeTo - if (arg1 && arg1.write) { - writeTo = arg1 - options = arg2 || {} - } else if (arg2 && arg2.write) { - writeTo = arg2 - options = arg1 || {} - } else { - writeTo = process.stderr - options = arg1 || arg2 || {} - } - - this._status = { - spun: 0, - section: '', - subsection: '', - } - this._paused = false // are we paused for back pressure? - this._disabled = true // are all progress bar updates disabled? - this._showing = false // do we WANT the progress bar on screen - this._onScreen = false // IS the progress bar on screen - this._needsRedraw = false // should we print something at next tick? - this._hideCursor = options.hideCursor == null ? true : options.hideCursor - this._fixedFramerate = options.fixedFramerate == null - ? !(/^v0\.8\./.test(process.version)) - : options.fixedFramerate - this._lastUpdateAt = null - this._updateInterval = options.updateInterval == null ? 50 : options.updateInterval - - this._themes = options.themes || defaultThemes - this._theme = options.theme - var theme = this._computeTheme(options.theme) - var template = options.template || [ - { type: 'progressbar', length: 20 }, - { type: 'activityIndicator', kerning: 1, length: 1 }, - { type: 'section', kerning: 1, default: '' }, - { type: 'subsection', kerning: 1, default: '' }, - ] - this.setWriteTo(writeTo, options.tty) - var PlumbingClass = options.Plumbing || Plumbing - this._gauge = new PlumbingClass(theme, template, this.getWidth()) - - this._$$doRedraw = callWith(this, this._doRedraw) - this._$$handleSizeChange = callWith(this, this._handleSizeChange) - - this._cleanupOnExit = options.cleanupOnExit == null || options.cleanupOnExit - this._removeOnExit = null - - if (options.enabled || (options.enabled == null && this._tty && this._tty.isTTY)) { - this.enable() - } else { - this.disable() - } -} -Gauge.prototype = {} - -Gauge.prototype.isEnabled = function () { - return !this._disabled -} - -Gauge.prototype.setTemplate = function (template) { - this._gauge.setTemplate(template) - if (this._showing) { - this._requestRedraw() - } -} - -Gauge.prototype._computeTheme = function (theme) { - if (!theme) { - theme = {} - } - if (typeof theme === 'string') { - theme = this._themes.getTheme(theme) - } else if ( - Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null - ) { - var useUnicode = theme.hasUnicode == null ? hasUnicode() : theme.hasUnicode - var useColor = theme.hasColor == null ? hasColor : theme.hasColor - theme = this._themes.getDefault({ - hasUnicode: useUnicode, - hasColor: useColor, - platform: theme.platform, - }) - } - return theme -} - -Gauge.prototype.setThemeset = function (themes) { - this._themes = themes - this.setTheme(this._theme) -} - -Gauge.prototype.setTheme = function (theme) { - this._gauge.setTheme(this._computeTheme(theme)) - if (this._showing) { - this._requestRedraw() - } - this._theme = theme -} - -Gauge.prototype._requestRedraw = function () { - this._needsRedraw = true - if (!this._fixedFramerate) { - this._doRedraw() - } -} - -Gauge.prototype.getWidth = function () { - return ((this._tty && this._tty.columns) || 80) - 1 -} - -Gauge.prototype.setWriteTo = function (writeTo, tty) { - var enabled = !this._disabled - if (enabled) { - this.disable() - } - this._writeTo = writeTo - this._tty = tty || - (writeTo === process.stderr && process.stdout.isTTY && process.stdout) || - (writeTo.isTTY && writeTo) || - this._tty - if (this._gauge) { - this._gauge.setWidth(this.getWidth()) - } - if (enabled) { - this.enable() - } -} - -Gauge.prototype.enable = function () { - if (!this._disabled) { - return - } - this._disabled = false - if (this._tty) { - this._enableEvents() - } - if (this._showing) { - this.show() - } -} - -Gauge.prototype.disable = function () { - if (this._disabled) { - return - } - if (this._showing) { - this._lastUpdateAt = null - this._showing = false - this._doRedraw() - this._showing = true - } - this._disabled = true - if (this._tty) { - this._disableEvents() - } -} - -Gauge.prototype._enableEvents = function () { - if (this._cleanupOnExit) { - this._removeOnExit = onExit(callWith(this, this.disable)) - } - this._tty.on('resize', this._$$handleSizeChange) - if (this._fixedFramerate) { - this.redrawTracker = setInterval(this._$$doRedraw, this._updateInterval) - if (this.redrawTracker.unref) { - this.redrawTracker.unref() - } - } -} - -Gauge.prototype._disableEvents = function () { - this._tty.removeListener('resize', this._$$handleSizeChange) - if (this._fixedFramerate) { - clearInterval(this.redrawTracker) - } - if (this._removeOnExit) { - this._removeOnExit() - } -} - -Gauge.prototype.hide = function (cb) { - if (this._disabled) { - return cb && process.nextTick(cb) - } - if (!this._showing) { - return cb && process.nextTick(cb) - } - this._showing = false - this._doRedraw() - cb && setImmediate(cb) -} - -Gauge.prototype.show = function (section, completed) { - this._showing = true - if (typeof section === 'string') { - this._status.section = section - } else if (typeof section === 'object') { - var sectionKeys = Object.keys(section) - for (var ii = 0; ii < sectionKeys.length; ++ii) { - var key = sectionKeys[ii] - this._status[key] = section[key] - } - } - if (completed != null) { - this._status.completed = completed - } - if (this._disabled) { - return - } - this._requestRedraw() -} - -Gauge.prototype.pulse = function (subsection) { - this._status.subsection = subsection || '' - this._status.spun++ - if (this._disabled) { - return - } - if (!this._showing) { - return - } - this._requestRedraw() -} - -Gauge.prototype._handleSizeChange = function () { - this._gauge.setWidth(this._tty.columns - 1) - this._requestRedraw() -} - -Gauge.prototype._doRedraw = function () { - if (this._disabled || this._paused) { - return - } - if (!this._fixedFramerate) { - var now = Date.now() - if (this._lastUpdateAt && now - this._lastUpdateAt < this._updateInterval) { - return - } - this._lastUpdateAt = now - } - if (!this._showing && this._onScreen) { - this._onScreen = false - var result = this._gauge.hide() - if (this._hideCursor) { - result += this._gauge.showCursor() - } - return this._writeTo.write(result) - } - if (!this._showing && !this._onScreen) { - return - } - if (this._showing && !this._onScreen) { - this._onScreen = true - this._needsRedraw = true - if (this._hideCursor) { - this._writeTo.write(this._gauge.hideCursor()) - } - } - if (!this._needsRedraw) { - return - } - if (!this._writeTo.write(this._gauge.show(this._status))) { - this._paused = true - this._writeTo.on('drain', callWith(this, function () { - this._paused = false - this._doRedraw() - })) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/plumbing.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/plumbing.js deleted file mode 100644 index c4dc3e0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/plumbing.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict' -var consoleControl = require('console-control-strings') -var renderTemplate = require('./render-template.js') -var validate = require('aproba') - -var Plumbing = module.exports = function (theme, template, width) { - if (!width) { - width = 80 - } - validate('OAN', [theme, template, width]) - this.showing = false - this.theme = theme - this.width = width - this.template = template -} -Plumbing.prototype = {} - -Plumbing.prototype.setTheme = function (theme) { - validate('O', [theme]) - this.theme = theme -} - -Plumbing.prototype.setTemplate = function (template) { - validate('A', [template]) - this.template = template -} - -Plumbing.prototype.setWidth = function (width) { - validate('N', [width]) - this.width = width -} - -Plumbing.prototype.hide = function () { - return consoleControl.gotoSOL() + consoleControl.eraseLine() -} - -Plumbing.prototype.hideCursor = consoleControl.hideCursor - -Plumbing.prototype.showCursor = consoleControl.showCursor - -Plumbing.prototype.show = function (status) { - var values = Object.create(this.theme) - for (var key in status) { - values[key] = status[key] - } - - return renderTemplate(this.width, this.template, values).trim() + - consoleControl.color('reset') + - consoleControl.eraseLine() + consoleControl.gotoSOL() -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/process.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/process.js deleted file mode 100644 index 05e8569..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/process.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' -// this exists so we can replace it during testing -module.exports = process diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/progress-bar.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/progress-bar.js deleted file mode 100644 index 184ff25..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/progress-bar.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict' -var validate = require('aproba') -var renderTemplate = require('./render-template.js') -var wideTruncate = require('./wide-truncate') -var stringWidth = require('string-width') - -module.exports = function (theme, width, completed) { - validate('ONN', [theme, width, completed]) - if (completed < 0) { - completed = 0 - } - if (completed > 1) { - completed = 1 - } - if (width <= 0) { - return '' - } - var sofar = Math.round(width * completed) - var rest = width - sofar - var template = [ - { type: 'complete', value: repeat(theme.complete, sofar), length: sofar }, - { type: 'remaining', value: repeat(theme.remaining, rest), length: rest }, - ] - return renderTemplate(width, template, theme) -} - -// lodash's way of repeating -function repeat (string, width) { - var result = '' - var n = width - do { - if (n % 2) { - result += string - } - n = Math.floor(n / 2) - /* eslint no-self-assign: 0 */ - string += string - } while (n && stringWidth(result) < width) - - return wideTruncate(result, width) -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/render-template.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/render-template.js deleted file mode 100644 index d1b52c0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/render-template.js +++ /dev/null @@ -1,222 +0,0 @@ -'use strict' -var align = require('wide-align') -var validate = require('aproba') -var wideTruncate = require('./wide-truncate') -var error = require('./error') -var TemplateItem = require('./template-item') - -function renderValueWithValues (values) { - return function (item) { - return renderValue(item, values) - } -} - -var renderTemplate = module.exports = function (width, template, values) { - var items = prepareItems(width, template, values) - var rendered = items.map(renderValueWithValues(values)).join('') - return align.left(wideTruncate(rendered, width), width) -} - -function preType (item) { - var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1) - return 'pre' + cappedTypeName -} - -function postType (item) { - var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1) - return 'post' + cappedTypeName -} - -function hasPreOrPost (item, values) { - if (!item.type) { - return - } - return values[preType(item)] || values[postType(item)] -} - -function generatePreAndPost (baseItem, parentValues) { - var item = Object.assign({}, baseItem) - var values = Object.create(parentValues) - var template = [] - var pre = preType(item) - var post = postType(item) - if (values[pre]) { - template.push({ value: values[pre] }) - values[pre] = null - } - item.minLength = null - item.length = null - item.maxLength = null - template.push(item) - values[item.type] = values[item.type] - if (values[post]) { - template.push({ value: values[post] }) - values[post] = null - } - return function ($1, $2, length) { - return renderTemplate(length, template, values) - } -} - -function prepareItems (width, template, values) { - function cloneAndObjectify (item, index, arr) { - var cloned = new TemplateItem(item, width) - var type = cloned.type - if (cloned.value == null) { - if (!(type in values)) { - if (cloned.default == null) { - throw new error.MissingTemplateValue(cloned, values) - } else { - cloned.value = cloned.default - } - } else { - cloned.value = values[type] - } - } - if (cloned.value == null || cloned.value === '') { - return null - } - cloned.index = index - cloned.first = index === 0 - cloned.last = index === arr.length - 1 - if (hasPreOrPost(cloned, values)) { - cloned.value = generatePreAndPost(cloned, values) - } - return cloned - } - - var output = template.map(cloneAndObjectify).filter(function (item) { - return item != null - }) - - var remainingSpace = width - var variableCount = output.length - - function consumeSpace (length) { - if (length > remainingSpace) { - length = remainingSpace - } - remainingSpace -= length - } - - function finishSizing (item, length) { - if (item.finished) { - throw new error.Internal('Tried to finish template item that was already finished') - } - if (length === Infinity) { - throw new error.Internal('Length of template item cannot be infinity') - } - if (length != null) { - item.length = length - } - item.minLength = null - item.maxLength = null - --variableCount - item.finished = true - if (item.length == null) { - item.length = item.getBaseLength() - } - if (item.length == null) { - throw new error.Internal('Finished template items must have a length') - } - consumeSpace(item.getLength()) - } - - output.forEach(function (item) { - if (!item.kerning) { - return - } - var prevPadRight = item.first ? 0 : output[item.index - 1].padRight - if (!item.first && prevPadRight < item.kerning) { - item.padLeft = item.kerning - prevPadRight - } - if (!item.last) { - item.padRight = item.kerning - } - }) - - // Finish any that have a fixed (literal or intuited) length - output.forEach(function (item) { - if (item.getBaseLength() == null) { - return - } - finishSizing(item) - }) - - var resized = 0 - var resizing - var hunkSize - do { - resizing = false - hunkSize = Math.round(remainingSpace / variableCount) - output.forEach(function (item) { - if (item.finished) { - return - } - if (!item.maxLength) { - return - } - if (item.getMaxLength() < hunkSize) { - finishSizing(item, item.maxLength) - resizing = true - } - }) - } while (resizing && resized++ < output.length) - if (resizing) { - throw new error.Internal('Resize loop iterated too many times while determining maxLength') - } - - resized = 0 - do { - resizing = false - hunkSize = Math.round(remainingSpace / variableCount) - output.forEach(function (item) { - if (item.finished) { - return - } - if (!item.minLength) { - return - } - if (item.getMinLength() >= hunkSize) { - finishSizing(item, item.minLength) - resizing = true - } - }) - } while (resizing && resized++ < output.length) - if (resizing) { - throw new error.Internal('Resize loop iterated too many times while determining minLength') - } - - hunkSize = Math.round(remainingSpace / variableCount) - output.forEach(function (item) { - if (item.finished) { - return - } - finishSizing(item, hunkSize) - }) - - return output -} - -function renderFunction (item, values, length) { - validate('OON', arguments) - if (item.type) { - return item.value(values, values[item.type + 'Theme'] || {}, length) - } else { - return item.value(values, {}, length) - } -} - -function renderValue (item, values) { - var length = item.getBaseLength() - var value = typeof item.value === 'function' ? renderFunction(item, values, length) : item.value - if (value == null || value === '') { - return '' - } - var alignWith = align[item.align] || align.left - var leftPadding = item.padLeft ? align.left('', item.padLeft) : '' - var rightPadding = item.padRight ? align.right('', item.padRight) : '' - var truncated = wideTruncate(String(value), length) - var aligned = alignWith(truncated, length) - return leftPadding + aligned + rightPadding -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/set-immediate.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/set-immediate.js deleted file mode 100644 index 6650a48..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/set-immediate.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' -var process = require('./process') -try { - module.exports = setImmediate -} catch (ex) { - module.exports = process.nextTick -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/set-interval.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/set-interval.js deleted file mode 100644 index 5761987..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/set-interval.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' -// this exists so we can replace it during testing -module.exports = setInterval diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/spin.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/spin.js deleted file mode 100644 index 34142ee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/spin.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -module.exports = function spin (spinstr, spun) { - return spinstr[spun % spinstr.length] -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/template-item.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/template-item.js deleted file mode 100644 index e307e9b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/template-item.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict' -var stringWidth = require('string-width') - -module.exports = TemplateItem - -function isPercent (num) { - if (typeof num !== 'string') { - return false - } - return num.slice(-1) === '%' -} - -function percent (num) { - return Number(num.slice(0, -1)) / 100 -} - -function TemplateItem (values, outputLength) { - this.overallOutputLength = outputLength - this.finished = false - this.type = null - this.value = null - this.length = null - this.maxLength = null - this.minLength = null - this.kerning = null - this.align = 'left' - this.padLeft = 0 - this.padRight = 0 - this.index = null - this.first = null - this.last = null - if (typeof values === 'string') { - this.value = values - } else { - for (var prop in values) { - this[prop] = values[prop] - } - } - // Realize percents - if (isPercent(this.length)) { - this.length = Math.round(this.overallOutputLength * percent(this.length)) - } - if (isPercent(this.minLength)) { - this.minLength = Math.round(this.overallOutputLength * percent(this.minLength)) - } - if (isPercent(this.maxLength)) { - this.maxLength = Math.round(this.overallOutputLength * percent(this.maxLength)) - } - return this -} - -TemplateItem.prototype = {} - -TemplateItem.prototype.getBaseLength = function () { - var length = this.length - if ( - length == null && - typeof this.value === 'string' && - this.maxLength == null && - this.minLength == null - ) { - length = stringWidth(this.value) - } - return length -} - -TemplateItem.prototype.getLength = function () { - var length = this.getBaseLength() - if (length == null) { - return null - } - return length + this.padLeft + this.padRight -} - -TemplateItem.prototype.getMaxLength = function () { - if (this.maxLength == null) { - return null - } - return this.maxLength + this.padLeft + this.padRight -} - -TemplateItem.prototype.getMinLength = function () { - if (this.minLength == null) { - return null - } - return this.minLength + this.padLeft + this.padRight -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/theme-set.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/theme-set.js deleted file mode 100644 index 643d7db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/theme-set.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict' - -module.exports = function () { - return ThemeSetProto.newThemeSet() -} - -var ThemeSetProto = {} - -ThemeSetProto.baseTheme = require('./base-theme.js') - -ThemeSetProto.newTheme = function (parent, theme) { - if (!theme) { - theme = parent - parent = this.baseTheme - } - return Object.assign({}, parent, theme) -} - -ThemeSetProto.getThemeNames = function () { - return Object.keys(this.themes) -} - -ThemeSetProto.addTheme = function (name, parent, theme) { - this.themes[name] = this.newTheme(parent, theme) -} - -ThemeSetProto.addToAllThemes = function (theme) { - var themes = this.themes - Object.keys(themes).forEach(function (name) { - Object.assign(themes[name], theme) - }) - Object.assign(this.baseTheme, theme) -} - -ThemeSetProto.getTheme = function (name) { - if (!this.themes[name]) { - throw this.newMissingThemeError(name) - } - return this.themes[name] -} - -ThemeSetProto.setDefault = function (opts, name) { - if (name == null) { - name = opts - opts = {} - } - var platform = opts.platform == null ? 'fallback' : opts.platform - var hasUnicode = !!opts.hasUnicode - var hasColor = !!opts.hasColor - if (!this.defaults[platform]) { - this.defaults[platform] = { true: {}, false: {} } - } - this.defaults[platform][hasUnicode][hasColor] = name -} - -ThemeSetProto.getDefault = function (opts) { - if (!opts) { - opts = {} - } - var platformName = opts.platform || process.platform - var platform = this.defaults[platformName] || this.defaults.fallback - var hasUnicode = !!opts.hasUnicode - var hasColor = !!opts.hasColor - if (!platform) { - throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) - } - if (!platform[hasUnicode][hasColor]) { - if (hasUnicode && hasColor && platform[!hasUnicode][hasColor]) { - hasUnicode = false - } else if (hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { - hasColor = false - } else if (hasUnicode && hasColor && platform[!hasUnicode][!hasColor]) { - hasUnicode = false - hasColor = false - } else if (hasUnicode && !hasColor && platform[!hasUnicode][hasColor]) { - hasUnicode = false - } else if (!hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { - hasColor = false - } else if (platform === this.defaults.fallback) { - throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) - } - } - if (platform[hasUnicode][hasColor]) { - return this.getTheme(platform[hasUnicode][hasColor]) - } else { - return this.getDefault(Object.assign({}, opts, { platform: 'fallback' })) - } -} - -ThemeSetProto.newMissingThemeError = function newMissingThemeError (name) { - var err = new Error('Could not find a gauge theme named "' + name + '"') - Error.captureStackTrace.call(err, newMissingThemeError) - err.theme = name - err.code = 'EMISSINGTHEME' - return err -} - -ThemeSetProto.newMissingDefaultThemeError = - function newMissingDefaultThemeError (platformName, hasUnicode, hasColor) { - var err = new Error( - 'Could not find a gauge theme for your platform/unicode/color use combo:\n' + - ' platform = ' + platformName + '\n' + - ' hasUnicode = ' + hasUnicode + '\n' + - ' hasColor = ' + hasColor) - Error.captureStackTrace.call(err, newMissingDefaultThemeError) - err.platform = platformName - err.hasUnicode = hasUnicode - err.hasColor = hasColor - err.code = 'EMISSINGTHEME' - return err - } - -ThemeSetProto.newThemeSet = function () { - var themeset = function (opts) { - return themeset.getDefault(opts) - } - return Object.assign(themeset, ThemeSetProto, { - themes: Object.assign({}, this.themes), - baseTheme: Object.assign({}, this.baseTheme), - defaults: JSON.parse(JSON.stringify(this.defaults || {})), - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/themes.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/themes.js deleted file mode 100644 index d2e62bb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/themes.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict' -var color = require('console-control-strings').color -var ThemeSet = require('./theme-set.js') - -var themes = module.exports = new ThemeSet() - -themes.addTheme('ASCII', { - preProgressbar: '[', - postProgressbar: ']', - progressbarTheme: { - complete: '#', - remaining: '.', - }, - activityIndicatorTheme: '-\\|/', - preSubsection: '>', -}) - -themes.addTheme('colorASCII', themes.getTheme('ASCII'), { - progressbarTheme: { - preComplete: color('bgBrightWhite', 'brightWhite'), - complete: '#', - postComplete: color('reset'), - preRemaining: color('bgBrightBlack', 'brightBlack'), - remaining: '.', - postRemaining: color('reset'), - }, -}) - -themes.addTheme('brailleSpinner', { - preProgressbar: '(', - postProgressbar: ')', - progressbarTheme: { - complete: '#', - remaining: '⠂', - }, - activityIndicatorTheme: '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏', - preSubsection: '>', -}) - -themes.addTheme('colorBrailleSpinner', themes.getTheme('brailleSpinner'), { - progressbarTheme: { - preComplete: color('bgBrightWhite', 'brightWhite'), - complete: '#', - postComplete: color('reset'), - preRemaining: color('bgBrightBlack', 'brightBlack'), - remaining: '⠂', - postRemaining: color('reset'), - }, -}) - -themes.setDefault({}, 'ASCII') -themes.setDefault({ hasColor: true }, 'colorASCII') -themes.setDefault({ platform: 'darwin', hasUnicode: true }, 'brailleSpinner') -themes.setDefault({ platform: 'darwin', hasUnicode: true, hasColor: true }, 'colorBrailleSpinner') -themes.setDefault({ platform: 'linux', hasUnicode: true }, 'brailleSpinner') -themes.setDefault({ platform: 'linux', hasUnicode: true, hasColor: true }, 'colorBrailleSpinner') diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/wide-truncate.js b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/wide-truncate.js deleted file mode 100644 index 5284a69..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/lib/wide-truncate.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict' -var stringWidth = require('string-width') -var stripAnsi = require('strip-ansi') - -module.exports = wideTruncate - -function wideTruncate (str, target) { - if (stringWidth(str) === 0) { - return str - } - if (target <= 0) { - return '' - } - if (stringWidth(str) <= target) { - return str - } - - // We compute the number of bytes of ansi sequences here and add - // that to our initial truncation to ensure that we don't slice one - // that we want to keep in half. - var noAnsi = stripAnsi(str) - var ansiSize = str.length + noAnsi.length - var truncated = str.slice(0, target + ansiSize) - - // we have to shrink the result to account for our ansi sequence buffer - // (if an ansi sequence was truncated) and double width characters. - while (stringWidth(truncated) > target) { - truncated = truncated.slice(0, -1) - } - return truncated -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/node_modules/.bin/color-support b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/node_modules/.bin/color-support deleted file mode 100755 index 612f45e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/node_modules/.bin/color-support +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/color-support@1.1.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../color-support@1.1.3/node_modules/color-support/bin.js" "$@" -else - exec node "$basedir/../../../../../color-support@1.1.3/node_modules/color-support/bin.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/package.json b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/package.json deleted file mode 100644 index bce3e68..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/gauge/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "gauge", - "version": "4.0.4", - "description": "A terminal based horizontal gauge", - "main": "lib", - "scripts": { - "test": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "snap": "tap", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/gauge.git" - }, - "keywords": [ - "progressbar", - "progress", - "gauge" - ], - "author": "GitHub Inc.", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/gauge/issues" - }, - "homepage": "https://github.com/npm/gauge", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.0", - "readable-stream": "^3.6.0", - "tap": "^16.0.1" - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - }, - "tap": { - "branches": 79, - "statements": 89, - "functions": 92, - "lines": 90 - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/has-unicode b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/has-unicode deleted file mode 120000 index 4001574..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/has-unicode +++ /dev/null @@ -1 +0,0 @@ -../../has-unicode@2.0.1/node_modules/has-unicode \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/signal-exit b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/signal-exit deleted file mode 120000 index 6150234..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/signal-exit +++ /dev/null @@ -1 +0,0 @@ -../../signal-exit@3.0.7/node_modules/signal-exit \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/string-width b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/string-width deleted file mode 120000 index aa75650..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/string-width +++ /dev/null @@ -1 +0,0 @@ -../../string-width@4.2.3/node_modules/string-width \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/strip-ansi b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/strip-ansi deleted file mode 120000 index b9fe8ad..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/strip-ansi +++ /dev/null @@ -1 +0,0 @@ -../../strip-ansi@6.0.1/node_modules/strip-ansi \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/wide-align b/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/wide-align deleted file mode 120000 index f269bf7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/gauge@4.0.4/node_modules/wide-align +++ /dev/null @@ -1 +0,0 @@ -../../wide-align@1.1.5/node_modules/wide-align \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/.travis.yml b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/.travis.yml deleted file mode 100644 index 895dbd3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/LICENSE b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/example/package.json b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/example/package.json deleted file mode 100644 index 03494f4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/example/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "beep-boop", - "version": "1.2.3", - "repository" : { - "type" : "git", - "url": "git@github.com:substack/beep-boop.git" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/example/url.js b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/example/url.js deleted file mode 100644 index 138fb8a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/example/url.js +++ /dev/null @@ -1,3 +0,0 @@ -var github = require('../'); -var url = github(require('./package.json')); -console.log(url); diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/index.js b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/index.js deleted file mode 100644 index 3d1d657..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/index.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = function (pkg) { - var m; - if (m = match(JSON.stringify(pkg.repository))) { - return m; - } - else if (m = match(JSON.stringify(pkg))) { - return m; - } - return undefined; -}; - -function match (str) { - var m = /\bgithub.com[:\/]([^\/"]+)\/([^\/"]+)/.exec(str); - if (m) { - return 'https://github.com/' + m[1] + '/' + m[2].replace(/\.git$/, ''); - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/package.json b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/package.json deleted file mode 100644 index a3e240f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name" : "github-from-package", - "version" : "0.0.0", - "description" : "return the github url from a package.json file", - "main" : "index.js", - "devDependencies" : { - "tap" : "~0.3.0", - "tape" : "~0.1.5" - }, - "scripts" : { - "test" : "tap test/*.js" - }, - "repository" : { - "type" : "git", - "url" : "git://github.com/substack/github-from-package.git" - }, - "homepage" : "https://github.com/substack/github-from-package", - "keywords" : [ - "github", - "package.json", - "npm", - "repository" - ], - "author" : { - "name" : "James Halliday", - "email" : "mail@substack.net", - "url" : "http://substack.net" - }, - "license" : "MIT" -} diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/readme.markdown b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/readme.markdown deleted file mode 100644 index 5ba397d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/readme.markdown +++ /dev/null @@ -1,53 +0,0 @@ -# github-from-package - -return the github url from a package.json file - -[![build status](https://secure.travis-ci.org/substack/github-from-package.png)](http://travis-ci.org/substack/github-from-package) - -# example - -For the `./package.json` file: - -``` json -{ - "name": "beep-boop", - "version": "1.2.3", - "repository" : { - "type" : "git", - "url": "git@github.com:substack/beep-boop.git" - } -} -``` - -``` js -var github = require('github-from-package'); -var url = github(require('./package.json')); -console.log(url); -``` - -``` -https://github.com/substack/beep-boop -``` - -# methods - -``` js -var github = require('github-from-package') -``` - -## var url = github(pkg) - -Return the most likely github url from the package.json contents `pkg`. If no -github url can be determined, return `undefined`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install github-from-package -``` - -# license - -MIT diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/a.json b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/a.json deleted file mode 100644 index 03494f4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/a.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "beep-boop", - "version": "1.2.3", - "repository" : { - "type" : "git", - "url": "git@github.com:substack/beep-boop.git" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/b.json b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/b.json deleted file mode 100644 index 0209325..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/b.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "beep-boop", - "version": "1.2.3", - "repository" : "git@github.com:substack/beep-boop.git" -} diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/c.json b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/c.json deleted file mode 100644 index 65f6dda..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/c.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "beep-boop", - "version": "1.2.3", - "repository" : "https://github.com/substack/beep-boop.git" -} diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/d.json b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/d.json deleted file mode 100644 index c61f3cd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/d.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "beep-boop", - "version": "1.2.3", - "repository" : { - "url": "https://github.com/substack/beep-boop" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/e.json b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/e.json deleted file mode 100644 index 770b438..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/e.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "beep-boop", - "version": "1.2.3", - "homepage": "https://github.com/substack/beep-boop/issues" -} diff --git a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/url.js b/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/url.js deleted file mode 100644 index d5a0a66..0000000 --- a/services/hocuspocus/node_modules/.pnpm/github-from-package@0.0.0/node_modules/github-from-package/test/url.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tape'); -var github = require('../'); -var packages = { - a : require('./a.json'), - b : require('./b.json'), - c : require('./c.json'), - d : require('./d.json'), - e : require('./e.json') -}; - -test(function (t) { - t.plan(5); - var url = 'https://github.com/substack/beep-boop'; - t.equal(url, github(packages.a), 'a.json comparison'); - t.equal(url, github(packages.b), 'b.json comparison'); - t.equal(url, github(packages.c), 'c.json comparison'); - t.equal(url, github(packages.d), 'd.json comparison'); - t.equal(url, github(packages.e), 'e.json comparison'); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/fs.realpath b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/fs.realpath deleted file mode 120000 index 28bfcbb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/fs.realpath +++ /dev/null @@ -1 +0,0 @@ -../../fs.realpath@1.0.0/node_modules/fs.realpath \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/LICENSE b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/LICENSE deleted file mode 100644 index 42ca266..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -## Glob Logo - -Glob's logo created by Tanya Brassie , licensed -under a Creative Commons Attribution-ShareAlike 4.0 International License -https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/README.md b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/README.md deleted file mode 100644 index 83f0c83..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/README.md +++ /dev/null @@ -1,378 +0,0 @@ -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![a fun cartoon logo made of glob characters](logo/glob.png) - -## Usage - -Install with npm - -``` -npm i glob -``` - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* `cb` `{Function}` - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* return: `{Array}` filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` `{String}` pattern to search for -* `options` `{Object}` -* `cb` `{Function}` Called when an error occurs, or matches are found - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'FILE'` - Path exists, and is not a directory - * `'DIR'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the specific - thing that matched. It is not deduplicated or resolved to a realpath. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of glob patterns to exclude matches. - Note: `ignore` patterns are *always* in `dot:true` mode, regardless - of any other settings. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) -* `absolute` Set to true to always receive absolute paths for matched - files. Unlike `realpath`, this also affects the values returned in - the `match` event. -* `fs` File-system object with Node's `fs` API. By default, the built-in - `fs` module will be used. Set to a volume provided by a library like - `memfs` to avoid using the "real" file-system. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if it -started with a `#` character, or a "negated" pattern if it started -with a `!` character. - -These options were deprecated in version 5, and removed in version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Glob Logo -Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo). - -The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/). - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` - -![](oh-my-glob.gif) diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js deleted file mode 100644 index 424c46e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js +++ /dev/null @@ -1,238 +0,0 @@ -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var fs = require("fs") -var path = require("path") -var minimatch = require("minimatch") -var isAbsolute = require("path-is-absolute") -var Minimatch = minimatch.Minimatch - -function alphasort (a, b) { - return a.localeCompare(b, 'en') -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - self.fs = options.fs || fs - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - // always treat \ in patterns as escapes, not path separators - options.allowWindowsEscape = false - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js deleted file mode 100644 index 37a4d7e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js +++ /dev/null @@ -1,790 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var globSync = require('./sync.js') -var common = require('./common.js') -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - - if (!pattern) - return false - - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - this._processing = 0 - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - var sync = true - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - sync = false - - function done () { - --self._processing - if (self._processing <= 0) { - if (sync) { - process.nextTick(function () { - self._finish() - }) - } else { - self._finish() - } - } - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - rp.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || - isAbsolute(pattern.map(function (p) { - return typeof p === 'string' ? p : '[*]' - }).join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - self.fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - self.fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - self.fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return self.fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/package.json b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/package.json deleted file mode 100644 index 5940b64..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "name": "glob", - "description": "a little globber", - "version": "7.2.3", - "publishConfig": { - "tag": "v7-legacy" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "main": "glob.js", - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "engines": { - "node": "*" - }, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "devDependencies": { - "memfs": "^3.2.0", - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^15.0.6", - "tick": "0.0.6" - }, - "tap": { - "before": "test/00-setup.js", - "after": "test/zz-cleanup.js", - "jobs": 1 - }, - "scripts": { - "prepublish": "npm run benchclean", - "profclean": "rm -f v8.log profile.txt", - "test": "tap", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", - "bench": "bash benchmark.sh", - "prof": "bash prof.sh && cat profile.txt", - "benchclean": "node benchclean.js" - }, - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js deleted file mode 100644 index 2c4f480..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js +++ /dev/null @@ -1,486 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var common = require('./common.js') -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert.ok(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert.ok(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || - isAbsolute(pattern.map(function (p) { - return typeof p === 'string' ? p : '[*]' - }).join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/inflight b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/inflight deleted file mode 120000 index d508145..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/inflight +++ /dev/null @@ -1 +0,0 @@ -../../inflight@1.0.6/node_modules/inflight \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/inherits b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/inherits deleted file mode 120000 index a2c9607..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/inherits +++ /dev/null @@ -1 +0,0 @@ -../../inherits@2.0.4/node_modules/inherits \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/minimatch b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/minimatch deleted file mode 120000 index b69ce20..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/minimatch +++ /dev/null @@ -1 +0,0 @@ -../../minimatch@3.1.5/node_modules/minimatch \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/once b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/once deleted file mode 120000 index 72cb153..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/once +++ /dev/null @@ -1 +0,0 @@ -../../once@1.4.0/node_modules/once \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/path-is-absolute b/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/path-is-absolute deleted file mode 120000 index d26a4ad..0000000 --- a/services/hocuspocus/node_modules/.pnpm/glob@7.2.3/node_modules/path-is-absolute +++ /dev/null @@ -1 +0,0 @@ -../../path-is-absolute@1.0.1/node_modules/path-is-absolute \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/LICENSE b/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/LICENSE deleted file mode 100644 index e906a25..0000000 --- a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/README.md b/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/README.md deleted file mode 100644 index 82d6e4d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over [fs module](https://nodejs.org/api/fs.html) - -* Queues up `open` and `readdir` calls, and retries them once - something closes if there is an EMFILE error from too many file - descriptors. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. - -## USAGE - -```javascript -// use just like fs -var fs = require('graceful-fs') - -// now go and do stuff with it... -fs.readFile('some-file-or-whatever', (err, data) => { - // Do stuff here. -}) -``` - -## Sync methods - -This module cannot intercept or handle `EMFILE` or `ENFILE` errors from sync -methods. If you use sync methods which open file descriptors then you are -responsible for dealing with any errors. - -This is a known limitation, not a bug. - -## Global Patching - -If you want to patch the global fs module (or any other fs-like -module) you can do this: - -```javascript -// Make sure to read the caveat below. -var realFs = require('fs') -var gracefulFs = require('graceful-fs') -gracefulFs.gracefulify(realFs) -``` - -This should only ever be done at the top-level application layer, in -order to delay on EMFILE errors from any fs-using dependencies. You -should **not** do this in a library, because it can cause unexpected -delays in other parts of the program. - -## Changes - -This module is fairly stable at this point, and used by a lot of -things. That being said, because it implements a subtle behavior -change in a core part of the node API, even modest changes can be -extremely breaking, and the versioning is thus biased towards -bumping the major when in doubt. - -The main change between major versions has been switching between -providing a fully-patched `fs` module vs monkey-patching the node core -builtin, and the approach by which a non-monkey-patched `fs` was -created. - -The goal is to trade `EMFILE` errors for slower fs operations. So, if -you try to open a zillion files, rather than crashing, `open` -operations will be queued up and wait for something else to `close`. - -There are advantages to each approach. Monkey-patching the fs means -that no `EMFILE` errors can possibly occur anywhere in your -application, because everything is using the same core `fs` module, -which is patched. However, it can also obviously cause undesirable -side-effects, especially if the module is loaded multiple times. - -Implementing a separate-but-identical patched `fs` module is more -surgical (and doesn't run the risk of patching multiple times), but -also imposes the challenge of keeping in sync with the core module. - -The current approach loads the `fs` module, and then creates a -lookalike object that has all the same methods, except a few that are -patched. It is safe to use in all versions of Node from 0.8 through -7.0. - -### v4 - -* Do not monkey-patch the fs module. This module may now be used as a - drop-in dep, and users can opt into monkey-patching the fs builtin - if their app requires it. - -### v3 - -* Monkey-patch fs, because the eval approach no longer works on recent - node. -* fixed possible type-error throw if rename fails on windows -* verify that we *never* get EMFILE errors -* Ignore ENOSYS from chmod/chown -* clarify that graceful-fs must be used as a drop-in - -### v2.1.0 - -* Use eval rather than monkey-patching fs. -* readdir: Always sort the results -* win32: requeue a file if error has an OK status - -### v2.0 - -* A return to monkey patching -* wrap process.cwd - -### v1.1 - -* wrap readFile -* Wrap fs.writeFile. -* readdir protection -* Don't clobber the fs builtin -* Handle fs.read EAGAIN errors by trying again -* Expose the curOpen counter -* No-op lchown/lchmod if not implemented -* fs.rename patch only for win32 -* Patch fs.rename to handle AV software on Windows -* Close #4 Chown should not fail on einval or eperm if non-root -* Fix isaacs/fstream#1 Only wrap fs one time -* Fix #3 Start at 1024 max files, then back off on EMFILE -* lutimes that doens't blow up on Linux -* A full on-rewrite using a queue instead of just swallowing the EMFILE error -* Wrap Read/Write streams as well - -### 1.0 - -* Update engines for node 0.6 -* Be lstat-graceful on Windows -* first diff --git a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js b/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js deleted file mode 100644 index dff3cc8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict' - -module.exports = clone - -var getPrototypeOf = Object.getPrototypeOf || function (obj) { - return obj.__proto__ -} - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} diff --git a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js b/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index 8d5b89e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,448 +0,0 @@ -var fs = require('fs') -var polyfills = require('./polyfills.js') -var legacy = require('./legacy-streams.js') -var clone = require('./clone.js') - -var util = require('util') - -/* istanbul ignore next - node 0.x polyfill */ -var gracefulQueue -var previousSymbol - -/* istanbul ignore else - node 0.x polyfill */ -if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { - gracefulQueue = Symbol.for('graceful-fs.queue') - // This is used in testing by future versions - previousSymbol = Symbol.for('graceful-fs.previous') -} else { - gracefulQueue = '___graceful-fs.queue' - previousSymbol = '___graceful-fs.previous' -} - -function noop () {} - -function publishQueue(context, queue) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue - } - }) -} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -// Once time initialization -if (!fs[gracefulQueue]) { - // This queue can be shared by multiple loaded instances - var queue = global[gracefulQueue] || [] - publishQueue(fs, queue) - - // Patch fs.close/closeSync to shared queue version, because we need - // to retry() whenever a close happens *anywhere* in the program. - // This is essential when multiple graceful-fs instances are - // in play at the same time. - fs.close = (function (fs$close) { - function close (fd, cb) { - return fs$close.call(fs, fd, function (err) { - // This function uses the graceful-fs shared queue - if (!err) { - resetQueue() - } - - if (typeof cb === 'function') - cb.apply(this, arguments) - }) - } - - Object.defineProperty(close, previousSymbol, { - value: fs$close - }) - return close - })(fs.close) - - fs.closeSync = (function (fs$closeSync) { - function closeSync (fd) { - // This function uses the graceful-fs shared queue - fs$closeSync.apply(fs, arguments) - resetQueue() - } - - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }) - return closeSync - })(fs.closeSync) - - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(fs[gracefulQueue]) - require('assert').equal(fs[gracefulQueue].length, 0) - }) - } -} - -if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); -} - -module.exports = patch(clone(fs)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module.exports = patch(fs) - fs.__patched = true; -} - -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - - function go$readFile (path, options, cb, startTime) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$writeFile(path, data, options, cb) - - function go$writeFile (path, data, options, cb, startTime) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$appendFile(path, data, options, cb) - - function go$appendFile (path, data, options, cb, startTime) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$copyFile = fs.copyFile - if (fs$copyFile) - fs.copyFile = copyFile - function copyFile (src, dest, flags, cb) { - if (typeof flags === 'function') { - cb = flags - flags = 0 - } - return go$copyFile(src, dest, flags, cb) - - function go$copyFile (src, dest, flags, cb, startTime) { - return fs$copyFile(src, dest, flags, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$readdir = fs.readdir - fs.readdir = readdir - var noReaddirOptionVersions = /^v[0-5]\./ - function readdir (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - var go$readdir = noReaddirOptionVersions.test(process.version) - ? function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, fs$readdirCallback( - path, options, cb, startTime - )) - } - : function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, options, fs$readdirCallback( - path, options, cb, startTime - )) - } - - return go$readdir(path, options, cb) - - function fs$readdirCallback (path, options, cb, startTime) { - return function (err, files) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([ - go$readdir, - [path, options, cb], - err, - startTime || Date.now(), - Date.now() - ]) - else { - if (files && files.sort) - files.sort() - - if (typeof cb === 'function') - cb.call(this, err, files) - } - } - } - } - - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - - var fs$ReadStream = fs.ReadStream - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - } - - var fs$WriteStream = fs.WriteStream - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - } - - Object.defineProperty(fs, 'ReadStream', { - get: function () { - return ReadStream - }, - set: function (val) { - ReadStream = val - }, - enumerable: true, - configurable: true - }) - Object.defineProperty(fs, 'WriteStream', { - get: function () { - return WriteStream - }, - set: function (val) { - WriteStream = val - }, - enumerable: true, - configurable: true - }) - - // legacy names - var FileReadStream = ReadStream - Object.defineProperty(fs, 'FileReadStream', { - get: function () { - return FileReadStream - }, - set: function (val) { - FileReadStream = val - }, - enumerable: true, - configurable: true - }) - var FileWriteStream = WriteStream - Object.defineProperty(fs, 'FileWriteStream', { - get: function () { - return FileWriteStream - }, - set: function (val) { - FileWriteStream = val - }, - enumerable: true, - configurable: true - }) - - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() - - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } - - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } - - function createReadStream (path, options) { - return new fs.ReadStream(path, options) - } - - function createWriteStream (path, options) { - return new fs.WriteStream(path, options) - } - - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null - - return go$open(path, flags, mode, cb) - - function go$open (path, flags, mode, cb, startTime) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - fs[gracefulQueue].push(elem) - retry() -} - -// keep track of the timeout between retry() calls -var retryTimer - -// reset the startTime and lastTime to now -// this resets the start of the 60 second overall timeout as well as the -// delay between attempts so that we'll retry these jobs sooner -function resetQueue () { - var now = Date.now() - for (var i = 0; i < fs[gracefulQueue].length; ++i) { - // entries that are only a length of 2 are from an older version, don't - // bother modifying those since they'll be retried anyway. - if (fs[gracefulQueue][i].length > 2) { - fs[gracefulQueue][i][3] = now // startTime - fs[gracefulQueue][i][4] = now // lastTime - } - } - // call retry to make sure we're actively processing the queue - retry() -} - -function retry () { - // clear the timer and remove it to help prevent unintended concurrency - clearTimeout(retryTimer) - retryTimer = undefined - - if (fs[gracefulQueue].length === 0) - return - - var elem = fs[gracefulQueue].shift() - var fn = elem[0] - var args = elem[1] - // these items may be unset if they were added by an older graceful-fs - var err = elem[2] - var startTime = elem[3] - var lastTime = elem[4] - - // if we don't have a startTime we have no way of knowing if we've waited - // long enough, so go ahead and retry this item now - if (startTime === undefined) { - debug('RETRY', fn.name, args) - fn.apply(null, args) - } else if (Date.now() - startTime >= 60000) { - // it's been more than 60 seconds total, bail now - debug('TIMEOUT', fn.name, args) - var cb = args.pop() - if (typeof cb === 'function') - cb.call(null, err) - } else { - // the amount of time between the last attempt and right now - var sinceAttempt = Date.now() - lastTime - // the amount of time between when we first tried, and when we last tried - // rounded up to at least 1 - var sinceStart = Math.max(lastTime - startTime, 1) - // backoff. wait longer than the total time we've been retrying, but only - // up to a maximum of 100ms - var desiredDelay = Math.min(sinceStart * 1.2, 100) - // it's been long enough since the last retry, do it again - if (sinceAttempt >= desiredDelay) { - debug('RETRY', fn.name, args) - fn.apply(null, args.concat([startTime])) - } else { - // if we can't do this job yet, push it to the end of the queue - // and let the next iteration check again - fs[gracefulQueue].push(elem) - } - } - - // schedule our next run if one isn't already scheduled - if (retryTimer === undefined) { - retryTimer = setTimeout(retry, 0) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js b/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js deleted file mode 100644 index d617b50..0000000 --- a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js +++ /dev/null @@ -1,118 +0,0 @@ -var Stream = require('stream').Stream - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/package.json b/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/package.json deleted file mode 100644 index 87babf0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "graceful-fs", - "description": "A drop-in replacement for fs, making various improvements.", - "version": "4.2.11", - "repository": { - "type": "git", - "url": "https://github.com/isaacs/node-graceful-fs" - }, - "main": "graceful-fs.js", - "directories": { - "test": "test" - }, - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", - "test": "nyc --silent node test.js | tap -c -", - "posttest": "nyc report" - }, - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "ISC", - "devDependencies": { - "import-fresh": "^2.0.0", - "mkdirp": "^0.5.0", - "rimraf": "^2.2.8", - "tap": "^16.3.4" - }, - "files": [ - "fs.js", - "graceful-fs.js", - "legacy-streams.js", - "polyfills.js", - "clone.js" - ], - "tap": { - "reporter": "classic" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js b/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js deleted file mode 100644 index 453f1a9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js +++ /dev/null @@ -1,355 +0,0 @@ -var constants = require('constants') - -var origCwd = process.cwd -var cwd = null - -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform - -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} - -// This check is needed until node.js 12 is required -if (typeof process.chdir === 'function') { - var chdir = process.chdir - process.chdir = function (d) { - cwd = null - chdir.call(process, d) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) -} - -module.exports = patch - -function patch (fs) { - // (re-)implement some things that are known busted or missing. - - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } - - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } - - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. - - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) - - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) - - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) - - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) - - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) - - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) - - // if lchmod/lchown do not exist, then make them no-ops - if (fs.chmod && !fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (fs.chown && !fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } - - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. - - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = typeof fs.rename !== 'function' ? fs.rename - : (function (fs$rename) { - function rename (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er) - }) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename) - return rename - })(fs.rename) - } - - // if read() returns EAGAIN, then just try it again. - fs.read = typeof fs.read !== 'function' ? fs.read - : (function (fs$read) { - function read (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - - // This ensures `util.promisify` works as it does for native `fs.read`. - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) - return read - })(fs.read) - - fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync - : (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } - }})(fs.readSync) - - function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - } - - function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - - } else if (fs.futimes) { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } - } - - function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - - function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - function callback (er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - if (cb) cb.apply(this, arguments) - } - return options ? orig.call(fs, target, options, callback) - : orig.call(fs, target, callback) - } - } - - function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options) { - var stats = options ? orig.call(fs, target, options) - : orig.call(fs, target) - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - return stats; - } - } - - // ENOSYS means that the fs doesn't support the op. Just ignore - // that, because it doesn't matter. - // - // if there's no getuid, or if getuid() is something other - // than 0, and the error is EINVAL or EPERM, then just ignore - // it. - // - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // - // When running as root, or if other types of errors are - // encountered, then it's strict. - function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/LICENSE b/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/LICENSE deleted file mode 100644 index d42e25e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2014, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - diff --git a/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/README.md b/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/README.md deleted file mode 100644 index 5a03e59..0000000 --- a/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/README.md +++ /dev/null @@ -1,43 +0,0 @@ -has-unicode -=========== - -Try to guess if your terminal supports unicode - -```javascript -var hasUnicode = require("has-unicode") - -if (hasUnicode()) { - // the terminal probably has unicode support -} -``` -```javascript -var hasUnicode = require("has-unicode").tryHarder -hasUnicode(function(unicodeSupported) { - if (unicodeSupported) { - // the terminal probably has unicode support - } -}) -``` - -## Detecting Unicode - -What we actually detect is UTF-8 support, as that's what Node itself supports. -If you have a UTF-16 locale then you won't be detected as unicode capable. - -### Windows - -Since at least Windows 7, `cmd` and `powershell` have been unicode capable, -but unfortunately even then it's not guaranteed. In many localizations it -still uses legacy code pages and there's no facility short of running -programs or linking C++ that will let us detect this. As such, we -report any Windows installation as NOT unicode capable, and recommend -that you encourage your users to override this via config. - -### Unix Like Operating Systems - -We look at the environment variables `LC_ALL`, `LC_CTYPE`, and `LANG` in -that order. For `LC_ALL` and `LANG`, it looks for `.UTF-8` in the value. -For `LC_CTYPE` it looks to see if the value is `UTF-8`. This is sufficient -for most POSIX systems. While locale data can be put in `/etc/locale.conf` -as well, AFAIK it's always copied into the environment. - diff --git a/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/index.js b/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/index.js deleted file mode 100644 index 9b0fe44..0000000 --- a/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/index.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict" -var os = require("os") - -var hasUnicode = module.exports = function () { - // Recent Win32 platforms (>XP) CAN support unicode in the console but - // don't have to, and in non-english locales often use traditional local - // code pages. There's no way, short of windows system calls or execing - // the chcp command line program to figure this out. As such, we default - // this to false and encourage your users to override it via config if - // appropriate. - if (os.type() == "Windows_NT") { return false } - - var isUTF8 = /UTF-?8$/i - var ctype = process.env.LC_ALL || process.env.LC_CTYPE || process.env.LANG - return isUTF8.test(ctype) -} diff --git a/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/package.json b/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/package.json deleted file mode 100644 index ebe9d76..0000000 --- a/services/hocuspocus/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "has-unicode", - "version": "2.0.1", - "description": "Try to guess if your terminal supports unicode", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/iarna/has-unicode" - }, - "keywords": [ - "unicode", - "terminal" - ], - "files": [ - "index.js" - ], - "author": "Rebecca Turner ", - "license": "ISC", - "bugs": { - "url": "https://github.com/iarna/has-unicode/issues" - }, - "homepage": "https://github.com/iarna/has-unicode", - "devDependencies": { - "require-inject": "^1.3.0", - "tap": "^2.3.1" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/LICENSE b/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/LICENSE deleted file mode 100644 index 493d2ea..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2016-2018 Kornel Lesiński - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/README.md b/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/README.md deleted file mode 100644 index de951c1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/README.md +++ /dev/null @@ -1,268 +0,0 @@ -# Can I cache this? - -This library tells when responses can be reused from a cache, taking into account [HTTP RFC 7234/9111](http://httpwg.org/specs/rfc9111.html) rules for user agents and shared caches. -It also implements `stale-if-error` and `stale-while-revalidate` from [RFC 5861](https://tools.ietf.org/html/rfc5861). -It's aware of many tricky details such as the `Vary` header, proxy revalidation, and authenticated responses. - -## Basic Usage - -`CachePolicy` is a metadata object that is meant to be stored in the cache, and it will keep track of cacheability of the response. - -Cacheability of an HTTP response depends on how it was requested, so both `request` and `response` are required to create the policy. - -```js -const policy = new CachePolicy(request, response, options); - -if (!policy.storable()) { - // throw the response away, it's not usable at all - return; -} - -// Cache the data AND the policy object in your cache -// (this is pseudocode, roll your own cache (lru-cache package works)) -letsPretendThisIsSomeCache.set( - request.url, - { policy, body: response.body }, // you only need to store the response body. CachePolicy holds the headers. - policy.timeToLive() -); -``` - -```js -// And later, when you receive a new request: -const { policy, body } = letsPretendThisIsSomeCache.get(newRequest.url); - -// It's not enough that it exists in the cache, it has to match the new request, too: -if (policy && policy.satisfiesWithoutRevalidation(newRequest)) { - // OK, the previous response can be used to respond to the `newRequest`. - // Response headers have to be updated, e.g. to add Age and remove uncacheable headers. - return { - headers: policy.responseHeaders(), - body, - } -} - -// Cache miss. See revalidationHeaders() and revalidatedPolicy() for advanced usage. -``` - -It may be surprising, but it's not enough for an HTTP response to be [fresh](#yo-fresh) to satisfy a request. It may need to match request headers specified in `Vary`. Even a matching fresh response may still not be usable if the new request restricted cacheability, etc. - -The key method is `satisfiesWithoutRevalidation(newRequest)`, which checks whether the `newRequest` is compatible with the original request and whether all caching conditions are met. - -### Constructor options - -Request and response must have a `headers` property with all header names in lower case. `url`, `status` and `method` are optional (defaults are any URL, status `200`, and `GET` method). - -```js -const request = { - url: '/', - method: 'GET', - headers: { - accept: '*/*', - }, -}; - -const response = { - status: 200, - headers: { - 'cache-control': 'public, max-age=7234', - }, -}; - -const options = { - shared: true, - cacheHeuristic: 0.1, - immutableMinTimeToLive: 24 * 3600 * 1000, // 24h - ignoreCargoCult: false, -}; -``` - -If `options.shared` is `true` (default), then the response is evaluated from a perspective of a shared cache (i.e. `private` is not cacheable and `s-maxage` is respected). If `options.shared` is `false`, then the response is evaluated from a perspective of a single-user cache (i.e. `private` is cacheable and `s-maxage` is ignored). `shared: true` is recommended for HTTP clients. - -`options.cacheHeuristic` is a fraction of response's age that is used as a fallback cache duration. The default is 0.1 (10%), e.g. if a file hasn't been modified for 100 days, it'll be cached for 100\*0.1 = 10 days. - -`options.immutableMinTimeToLive` is a number of milliseconds to assume as the default time to cache responses with `Cache-Control: immutable`. Note that [per RFC](http://httpwg.org/http-extensions/immutable.html) these can become stale, so `max-age` still overrides the default. - -If `options.ignoreCargoCult` is true, common anti-cache directives will be completely ignored if the non-standard `pre-check` and `post-check` directives are present. These two useless directives are most commonly found in bad StackOverflow answers and PHP's "session limiter" defaults. - -### `storable()` - -Returns `true` if the response can be stored in a cache. If it's `false` then you MUST NOT store either the request or the response. - -### `satisfiesWithoutRevalidation(newRequest)` - -Use this method to check whether the cached response is still fresh in the context of the new request. - -If it returns `true`, then the given `request` matches the original response this cache policy has been created with, and the response can be reused without contacting the server. Note that the old response can't be returned without being updated, see `responseHeaders()`. - -If it returns `false`, then the response may not be matching at all (e.g. it's for a different URL or method), or may require to be refreshed first (see `revalidationHeaders()`). - -### `responseHeaders()` - -Returns updated, filtered set of response headers to return to clients receiving the cached response. This function is necessary, because proxies MUST always remove hop-by-hop headers (such as `TE` and `Connection`) and update response's `Age` to avoid doubling cache time. - -```js -cachedResponse.headers = cachePolicy.responseHeaders(); -``` - -### `timeToLive()` - -Suggests a time in _milliseconds_ for how long this cache entry may be useful. This is not freshness, so always check with `satisfiesWithoutRevalidation()`. This time may be longer than response's `max-age` to allow for `stale-if-error` and `stale-while-revalidate`. - -After that time (when `timeToLive() <= 0`) the response may still be usable in certain cases, e.g. if client can explicitly allows stale responses. - -### `toObject()`/`fromObject(json)` - -You'll want to store the `CachePolicy` object along with the cached response. `obj = policy.toObject()` gives a plain JSON-serializable object. `policy = CachePolicy.fromObject(obj)` creates an instance from it. - -## Complete Usage - -### `evaluateRequest(newRequest)` - -Returns an object telling what to do next — optional `revalidation`, and optional `response` from cache. Either one of these properties will be present. Both may be present at the same time. - -```js -{ - // If defined, you must send a request to the server. - revalidation: { - headers: {}, // HTTP headers to use when sending the revalidation response - // If true, you MUST wait for a response from the server before using the cache - // If false, this is stale-while-revalidate. The cache is stale, but you can use it while you update it asynchronously. - synchronous: bool, - }, - // If defined, you can use this cached response. - response: { - headers: {}, // Updated cached HTTP headers you must use when responding to the client - }, -} -``` - -### Example - -```js -let cached = cacheStorage.get(incomingRequest.url); - -// Cache miss - make a request to the origin and cache it -if (!cached) { - const newResponse = await makeRequest(incomingRequest); - const policy = new CachePolicy(incomingRequest, newResponse); - - cacheStorage.set( - incomingRequest.url, - { policy, body: newResponse.body }, - policy.timeToLive() - ); - - return { - // use responseHeaders() to remove hop-by-hop headers that should not be passed through proxies - headers: policy.responseHeaders(), - body: newResponse.body, - } -} - -// There's something cached, see if it's a hit -let { revalidation, response } = cached.policy.evaluateRequest(incomingRequest); - -// Revalidation always goes first -if (revalidation) { - // It's very important to update the request headers to make a correct revalidation request - incomingRequest.headers = revalidation.headers; // Same as cached.policy.revalidationHeaders() - - // The cache may be updated immediately or in the background, - // so use a Promise to optionally defer the update - const updatedResponsePromise = makeRequest(incomingRequest).then(() => { - // Refresh the old response with the new information, if applicable - const { policy, modified } = cached.policy.revalidatedPolicy(incomingRequest, newResponse); - - const body = modified ? newResponse.body : cached.body; - - // Update the cache with the newer response - if (policy.storable()) { - cacheStorage.set( - incomingRequest.url, - { policy, body }, - policy.timeToLive() - ); - } - - return { - headers: policy.responseHeaders(), // these are from the new revalidated policy - body, - } - }); - - if (revalidation.synchronous) { - // If synchronous, then you MUST get a reply from the server first - return await updatedResponsePromise; - } - - // If not synchronous, it can fall thru to returning the cached response, - // while the request to the server is happening in the background. -} - -return { - headers: response.headers, // Same as cached.policy.responseHeaders() - body: cached.body, -} -``` - -### Refreshing stale cache (revalidation) - -When a cached response has expired, it can be made fresh again by making a request to the origin server. The server may respond with status 304 (Not Modified) without sending the response body again, saving bandwidth. - -The following methods help perform the update efficiently and correctly. - -#### `revalidationHeaders(newRequest)` - -Returns updated, filtered set of request headers to send to the origin server to check if the cached response can be reused. These headers allow the origin server to return status 304 indicating the response is still fresh. All headers unrelated to caching are passed through as-is. - -Use this method when updating cache from the origin server. Also available in `evaluateRequest(newRequest).revalidation.headers`. - -```js -updateRequest.headers = cachePolicy.revalidationHeaders(updateRequest); -``` - -#### `revalidatedPolicy(revalidationRequest, revalidationResponse)` - -Use this method to update the cache after receiving a new response from the origin server. It returns an object with two keys: - -- `policy` — A new `CachePolicy` with HTTP headers updated from `revalidationResponse`. You can always replace the old cached `CachePolicy` with the new one. -- `modified` — Boolean indicating whether the response body has changed, and you should use the new response body sent by the server. - - If `true`, you should use the new response body, and you can replace the old cached response with the updated one. - - If `false`, then you should reuse the old cached response body. Either a valid 304 Not Modified response has been received, or an error happened and `stale-if-error` allows falling back to the cache. - -# Yo, FRESH - -![satisfiesWithoutRevalidation](fresh.jpg) - -## Used by - -- [ImageOptim API](https://imageoptim.com/api), [make-fetch-happen](https://github.com/zkat/make-fetch-happen), [cacheable-request](https://www.npmjs.com/package/cacheable-request) ([got](https://www.npmjs.com/package/got)), [npm/registry-fetch](https://github.com/npm/registry-fetch), [etc.](https://github.com/kornelski/http-cache-semantics/network/dependents) -- [Rust version of this library](https://lib.rs/crates/http-cache-semantics). - -## Implemented - -- `Cache-Control` response header with all the quirks. -- `Expires` with check for bad clocks. -- `Pragma` response header. -- `Age` response header. -- `Vary` response header. -- Default cacheability of statuses and methods. -- Requests for stale data. -- Filtering of hop-by-hop headers. -- Basic revalidation request -- `stale-if-error` -- `stale-while-revalidate` - -## Unimplemented - -- Merging of range requests, `If-Range` (but correctly supports them as non-cacheable) -- Revalidation of multiple representations - -### Trusting server `Date` - -Per the RFC, the cache should take into account the time between server-supplied `Date` and the time it received the response. The RFC-mandated behavior creates two problems: - - * Servers with incorrectly set timezone may add several hours to cache age (or more, if the clock is completely wrong). - * Even reasonably correct clocks may be off by a couple of seconds, breaking `max-age=1` trick (which is useful for reverse proxies on high-traffic servers). - -Previous versions of this library had an option to ignore the server date if it was "too inaccurate". To support the `max-age=1` trick the library also has to ignore dates that pretty accurate. There's no point of having an option to trust dates that are only a bit inaccurate, so this library won't trust any server dates. `max-age` will be interpreted from the time the response has been received, not from when it has been sent. This will affect only [RFC 1149 networks](https://tools.ietf.org/html/rfc1149). diff --git a/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js b/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js deleted file mode 100644 index f01e9a1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js +++ /dev/null @@ -1,928 +0,0 @@ -'use strict'; - -/** - * @typedef {Object} HttpRequest - * @property {Record} headers - Request headers - * @property {string} [method] - HTTP method - * @property {string} [url] - Request URL - */ - -/** - * @typedef {Object} HttpResponse - * @property {Record} headers - Response headers - * @property {number} [status] - HTTP status code - */ - -/** - * Set of default cacheable status codes per RFC 7231 section 6.1. - * @type {Set} - */ -const statusCodeCacheableByDefault = new Set([ - 200, - 203, - 204, - 206, - 300, - 301, - 308, - 404, - 405, - 410, - 414, - 501, -]); - -/** - * Set of HTTP status codes that the cache implementation understands. - * Note: This implementation does not understand partial responses (206). - * @type {Set} - */ -const understoodStatuses = new Set([ - 200, - 203, - 204, - 300, - 301, - 302, - 303, - 307, - 308, - 404, - 405, - 410, - 414, - 501, -]); - -/** - * Set of HTTP error status codes. - * @type {Set} - */ -const errorStatusCodes = new Set([ - 500, - 502, - 503, - 504, -]); - -/** - * Object representing hop-by-hop headers that should be removed. - * @type {Record} - */ -const hopByHopHeaders = { - date: true, // included, because we add Age update Date - connection: true, - 'keep-alive': true, - 'proxy-authenticate': true, - 'proxy-authorization': true, - te: true, - trailer: true, - 'transfer-encoding': true, - upgrade: true, -}; - -/** - * Headers that are excluded from revalidation update. - * @type {Record} - */ -const excludedFromRevalidationUpdate = { - // Since the old body is reused, it doesn't make sense to change properties of the body - 'content-length': true, - 'content-encoding': true, - 'transfer-encoding': true, - 'content-range': true, -}; - -/** - * Converts a string to a number or returns zero if the conversion fails. - * @param {string} s - The string to convert. - * @returns {number} The parsed number or 0. - */ -function toNumberOrZero(s) { - const n = parseInt(s, 10); - return isFinite(n) ? n : 0; -} - -/** - * Determines if the given response is an error response. - * Implements RFC 5861 behavior. - * @param {HttpResponse|undefined} response - The HTTP response object. - * @returns {boolean} true if the response is an error or undefined, false otherwise. - */ -function isErrorResponse(response) { - // consider undefined response as faulty - if (!response) { - return true; - } - return errorStatusCodes.has(response.status); -} - -/** - * Parses a Cache-Control header string into an object. - * @param {string} [header] - The Cache-Control header value. - * @returns {Record} An object representing Cache-Control directives. - */ -function parseCacheControl(header) { - /** @type {Record} */ - const cc = {}; - if (!header) return cc; - - // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives), - // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale - const parts = header.trim().split(/,/); - for (const part of parts) { - const [k, v] = part.split(/=/, 2); - cc[k.trim()] = v === undefined ? true : v.trim().replace(/^"|"$/g, ''); - } - - return cc; -} - -/** - * Formats a Cache-Control directives object into a header string. - * @param {Record} cc - The Cache-Control directives. - * @returns {string|undefined} A formatted Cache-Control header string or undefined if empty. - */ -function formatCacheControl(cc) { - let parts = []; - for (const k in cc) { - const v = cc[k]; - parts.push(v === true ? k : k + '=' + v); - } - if (!parts.length) { - return undefined; - } - return parts.join(', '); -} - -module.exports = class CachePolicy { - /** - * Creates a new CachePolicy instance. - * @param {HttpRequest} req - Incoming client request. - * @param {HttpResponse} res - Received server response. - * @param {Object} [options={}] - Configuration options. - * @param {boolean} [options.shared=true] - Is the cache shared (a public proxy)? `false` for personal browser caches. - * @param {number} [options.cacheHeuristic=0.1] - Fallback heuristic (age fraction) for cache duration. - * @param {number} [options.immutableMinTimeToLive=86400000] - Minimum TTL for immutable responses in milliseconds. - * @param {boolean} [options.ignoreCargoCult=false] - Detect nonsense cache headers, and override them. - * @param {any} [options._fromObject] - Internal parameter for deserialization. Do not use. - */ - constructor( - req, - res, - { - shared, - cacheHeuristic, - immutableMinTimeToLive, - ignoreCargoCult, - _fromObject, - } = {} - ) { - if (_fromObject) { - this._fromObject(_fromObject); - return; - } - - if (!res || !res.headers) { - throw Error('Response headers missing'); - } - this._assertRequestHasHeaders(req); - - /** @type {number} Timestamp when the response was received */ - this._responseTime = this.now(); - /** @type {boolean} Indicates if the cache is shared */ - this._isShared = shared !== false; - /** @type {boolean} Indicates if legacy cargo cult directives should be ignored */ - this._ignoreCargoCult = !!ignoreCargoCult; - /** @type {number} Heuristic cache fraction */ - this._cacheHeuristic = - undefined !== cacheHeuristic ? cacheHeuristic : 0.1; // 10% matches IE - /** @type {number} Minimum TTL for immutable responses in ms */ - this._immutableMinTtl = - undefined !== immutableMinTimeToLive - ? immutableMinTimeToLive - : 24 * 3600 * 1000; - - /** @type {number} HTTP status code */ - this._status = 'status' in res ? res.status : 200; - /** @type {Record} Response headers */ - this._resHeaders = res.headers; - /** @type {Record} Parsed Cache-Control directives from response */ - this._rescc = parseCacheControl(res.headers['cache-control']); - /** @type {string} HTTP method (e.g., GET, POST) */ - this._method = 'method' in req ? req.method : 'GET'; - /** @type {string} Request URL */ - this._url = req.url; - /** @type {string} Host header from the request */ - this._host = req.headers.host; - /** @type {boolean} Whether the request does not include an Authorization header */ - this._noAuthorization = !req.headers.authorization; - /** @type {Record|null} Request headers used for Vary matching */ - this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used - /** @type {Record} Parsed Cache-Control directives from request */ - this._reqcc = parseCacheControl(req.headers['cache-control']); - - // Assume that if someone uses legacy, non-standard uncecessary options they don't understand caching, - // so there's no point stricly adhering to the blindly copy&pasted directives. - if ( - this._ignoreCargoCult && - 'pre-check' in this._rescc && - 'post-check' in this._rescc - ) { - delete this._rescc['pre-check']; - delete this._rescc['post-check']; - delete this._rescc['no-cache']; - delete this._rescc['no-store']; - delete this._rescc['must-revalidate']; - this._resHeaders = Object.assign({}, this._resHeaders, { - 'cache-control': formatCacheControl(this._rescc), - }); - delete this._resHeaders.expires; - delete this._resHeaders.pragma; - } - - // When the Cache-Control header field is not present in a request, caches MUST consider the no-cache request pragma-directive - // as having the same effect as if "Cache-Control: no-cache" were present (see Section 5.2.1). - if ( - res.headers['cache-control'] == null && - /no-cache/.test(res.headers.pragma) - ) { - this._rescc['no-cache'] = true; - } - } - - /** - * You can monkey-patch it for testing. - * @returns {number} Current time in milliseconds. - */ - now() { - return Date.now(); - } - - /** - * Determines if the response is storable in a cache. - * @returns {boolean} `false` if can never be cached. - */ - storable() { - // The "no-store" request directive indicates that a cache MUST NOT store any part of either this request or any response to it. - return !!( - !this._reqcc['no-store'] && - // A cache MUST NOT store a response to any request, unless: - // The request method is understood by the cache and defined as being cacheable, and - ('GET' === this._method || - 'HEAD' === this._method || - ('POST' === this._method && this._hasExplicitExpiration())) && - // the response status code is understood by the cache, and - understoodStatuses.has(this._status) && - // the "no-store" cache directive does not appear in request or response header fields, and - !this._rescc['no-store'] && - // the "private" response directive does not appear in the response, if the cache is shared, and - (!this._isShared || !this._rescc.private) && - // the Authorization header field does not appear in the request, if the cache is shared, - (!this._isShared || - this._noAuthorization || - this._allowsStoringAuthenticated()) && - // the response either: - // contains an Expires header field, or - (this._resHeaders.expires || - // contains a max-age response directive, or - // contains a s-maxage response directive and the cache is shared, or - // contains a public response directive. - this._rescc['max-age'] || - (this._isShared && this._rescc['s-maxage']) || - this._rescc.public || - // has a status code that is defined as cacheable by default - statusCodeCacheableByDefault.has(this._status)) - ); - } - - /** - * @returns {boolean} true if expiration is explicitly defined. - */ - _hasExplicitExpiration() { - // 4.2.1 Calculating Freshness Lifetime - return !!( - (this._isShared && this._rescc['s-maxage']) || - this._rescc['max-age'] || - this._resHeaders.expires - ); - } - - /** - * @param {HttpRequest} req - a request - * @throws {Error} if the headers are missing. - */ - _assertRequestHasHeaders(req) { - if (!req || !req.headers) { - throw Error('Request headers missing'); - } - } - - /** - * Checks if the request matches the cache and can be satisfied from the cache immediately, - * without having to make a request to the server. - * - * This doesn't support `stale-while-revalidate`. See `evaluateRequest()` for a more complete solution. - * - * @param {HttpRequest} req - The new incoming HTTP request. - * @returns {boolean} `true`` if the cached response used to construct this cache policy satisfies the request without revalidation. - */ - satisfiesWithoutRevalidation(req) { - const result = this.evaluateRequest(req); - return !result.revalidation; - } - - /** - * @param {{headers: Record, synchronous: boolean}|undefined} revalidation - Revalidation information, if any. - * @returns {{response: {headers: Record}, revalidation: {headers: Record, synchronous: boolean}|undefined}} An object with a cached response headers and revalidation info. - */ - _evaluateRequestHitResult(revalidation) { - return { - response: { - headers: this.responseHeaders(), - }, - revalidation, - }; - } - - /** - * @param {HttpRequest} request - new incoming - * @param {boolean} synchronous - whether revalidation must be synchronous (not s-w-r). - * @returns {{headers: Record, synchronous: boolean}} An object with revalidation headers and a synchronous flag. - */ - _evaluateRequestRevalidation(request, synchronous) { - return { - synchronous, - headers: this.revalidationHeaders(request), - }; - } - - /** - * @param {HttpRequest} request - new incoming - * @returns {{response: undefined, revalidation: {headers: Record, synchronous: boolean}}} An object indicating no cached response and revalidation details. - */ - _evaluateRequestMissResult(request) { - return { - response: undefined, - revalidation: this._evaluateRequestRevalidation(request, true), - }; - } - - /** - * Checks if the given request matches this cache entry, and how the cache can be used to satisfy it. Returns an object with: - * - * ``` - * { - * // If defined, you must send a request to the server. - * revalidation: { - * headers: {}, // HTTP headers to use when sending the revalidation response - * // If true, you MUST wait for a response from the server before using the cache - * // If false, this is stale-while-revalidate. The cache is stale, but you can use it while you update it asynchronously. - * synchronous: bool, - * }, - * // If defined, you can use this cached response. - * response: { - * headers: {}, // Updated cached HTTP headers you must use when responding to the client - * }, - * } - * ``` - * @param {HttpRequest} req - new incoming HTTP request - * @returns {{response: {headers: Record}|undefined, revalidation: {headers: Record, synchronous: boolean}|undefined}} An object containing keys: - * - revalidation: { headers: Record, synchronous: boolean } Set if you should send this to the origin server - * - response: { headers: Record } Set if you can respond to the client with these cached headers - */ - evaluateRequest(req) { - this._assertRequestHasHeaders(req); - - // In all circumstances, a cache MUST NOT ignore the must-revalidate directive - if (this._rescc['must-revalidate']) { - return this._evaluateRequestMissResult(req); - } - - if (!this._requestMatches(req, false)) { - return this._evaluateRequestMissResult(req); - } - - // When presented with a request, a cache MUST NOT reuse a stored response, unless: - // the presented request does not contain the no-cache pragma (Section 5.4), nor the no-cache cache directive, - // unless the stored response is successfully validated (Section 4.3), and - const requestCC = parseCacheControl(req.headers['cache-control']); - - if (requestCC['no-cache'] || /no-cache/.test(req.headers.pragma)) { - return this._evaluateRequestMissResult(req); - } - - if (requestCC['max-age'] && this.age() > toNumberOrZero(requestCC['max-age'])) { - return this._evaluateRequestMissResult(req); - } - - if (requestCC['min-fresh'] && this.maxAge() - this.age() < toNumberOrZero(requestCC['min-fresh'])) { - return this._evaluateRequestMissResult(req); - } - - // the stored response is either: - // fresh, or allowed to be served stale - if (this.stale()) { - // If a value is present, then the client is willing to accept a response that has - // exceeded its freshness lifetime by no more than the specified number of seconds - const allowsStaleWithoutRevalidation = 'max-stale' in requestCC && - (true === requestCC['max-stale'] || requestCC['max-stale'] > this.age() - this.maxAge()); - - if (allowsStaleWithoutRevalidation) { - return this._evaluateRequestHitResult(undefined); - } - - if (this.useStaleWhileRevalidate()) { - return this._evaluateRequestHitResult(this._evaluateRequestRevalidation(req, false)); - } - - return this._evaluateRequestMissResult(req); - } - - return this._evaluateRequestHitResult(undefined); - } - - /** - * @param {HttpRequest} req - check if this is for the same cache entry - * @param {boolean} allowHeadMethod - allow a HEAD method to match. - * @returns {boolean} `true` if the request matches. - */ - _requestMatches(req, allowHeadMethod) { - // The presented effective request URI and that of the stored response match, and - return !!( - (!this._url || this._url === req.url) && - this._host === req.headers.host && - // the request method associated with the stored response allows it to be used for the presented request, and - (!req.method || - this._method === req.method || - (allowHeadMethod && 'HEAD' === req.method)) && - // selecting header fields nominated by the stored response (if any) match those presented, and - this._varyMatches(req) - ); - } - - /** - * Determines whether storing authenticated responses is allowed. - * @returns {boolean} `true` if allowed. - */ - _allowsStoringAuthenticated() { - // following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage. - return !!( - this._rescc['must-revalidate'] || - this._rescc.public || - this._rescc['s-maxage'] - ); - } - - /** - * Checks whether the Vary header in the response matches the new request. - * @param {HttpRequest} req - incoming HTTP request - * @returns {boolean} `true` if the vary headers match. - */ - _varyMatches(req) { - if (!this._resHeaders.vary) { - return true; - } - - // A Vary header field-value of "*" always fails to match - if (this._resHeaders.vary === '*') { - return false; - } - - const fields = this._resHeaders.vary - .trim() - .toLowerCase() - .split(/\s*,\s*/); - for (const name of fields) { - if (req.headers[name] !== this._reqHeaders[name]) return false; - } - return true; - } - - /** - * Creates a copy of the given headers without any hop-by-hop headers. - * @param {Record} inHeaders - old headers from the cached response - * @returns {Record} A new headers object without hop-by-hop headers. - */ - _copyWithoutHopByHopHeaders(inHeaders) { - /** @type {Record} */ - const headers = {}; - for (const name in inHeaders) { - if (hopByHopHeaders[name]) continue; - headers[name] = inHeaders[name]; - } - // 9.1. Connection - if (inHeaders.connection) { - const tokens = inHeaders.connection.trim().split(/\s*,\s*/); - for (const name of tokens) { - delete headers[name]; - } - } - if (headers.warning) { - const warnings = headers.warning.split(/,/).filter(warning => { - return !/^\s*1[0-9][0-9]/.test(warning); - }); - if (!warnings.length) { - delete headers.warning; - } else { - headers.warning = warnings.join(',').trim(); - } - } - return headers; - } - - /** - * Returns the response headers adjusted for serving the cached response. - * Removes hop-by-hop headers and updates the Age and Date headers. - * @returns {Record} The adjusted response headers. - */ - responseHeaders() { - const headers = this._copyWithoutHopByHopHeaders(this._resHeaders); - const age = this.age(); - - // A cache SHOULD generate 113 warning if it heuristically chose a freshness - // lifetime greater than 24 hours and the response's age is greater than 24 hours. - if ( - age > 3600 * 24 && - !this._hasExplicitExpiration() && - this.maxAge() > 3600 * 24 - ) { - headers.warning = - (headers.warning ? `${headers.warning}, ` : '') + - '113 - "rfc7234 5.5.4"'; - } - headers.age = `${Math.round(age)}`; - headers.date = new Date(this.now()).toUTCString(); - return headers; - } - - /** - * Returns the Date header value from the response or the current time if invalid. - * @returns {number} Timestamp (in milliseconds) representing the Date header or response time. - */ - date() { - const serverDate = Date.parse(this._resHeaders.date); - if (isFinite(serverDate)) { - return serverDate; - } - return this._responseTime; - } - - /** - * Value of the Age header, in seconds, updated for the current time. - * May be fractional. - * @returns {number} The age in seconds. - */ - age() { - let age = this._ageValue(); - - const residentTime = (this.now() - this._responseTime) / 1000; - return age + residentTime; - } - - /** - * @returns {number} The Age header value as a number. - */ - _ageValue() { - return toNumberOrZero(this._resHeaders.age); - } - - /** - * Possibly outdated value of applicable max-age (or heuristic equivalent) in seconds. - * This counts since response's `Date`. - * - * For an up-to-date value, see `timeToLive()`. - * - * Returns the maximum age (freshness lifetime) of the response in seconds. - * @returns {number} The max-age value in seconds. - */ - maxAge() { - if (!this.storable() || this._rescc['no-cache']) { - return 0; - } - - // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default - // so this implementation requires explicit opt-in via public header - if ( - this._isShared && - (this._resHeaders['set-cookie'] && - !this._rescc.public && - !this._rescc.immutable) - ) { - return 0; - } - - if (this._resHeaders.vary === '*') { - return 0; - } - - if (this._isShared) { - if (this._rescc['proxy-revalidate']) { - return 0; - } - // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field. - if (this._rescc['s-maxage']) { - return toNumberOrZero(this._rescc['s-maxage']); - } - } - - // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field. - if (this._rescc['max-age']) { - return toNumberOrZero(this._rescc['max-age']); - } - - const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0; - - const serverDate = this.date(); - if (this._resHeaders.expires) { - const expires = Date.parse(this._resHeaders.expires); - // A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired"). - if (Number.isNaN(expires) || expires < serverDate) { - return 0; - } - return Math.max(defaultMinTtl, (expires - serverDate) / 1000); - } - - if (this._resHeaders['last-modified']) { - const lastModified = Date.parse(this._resHeaders['last-modified']); - if (isFinite(lastModified) && serverDate > lastModified) { - return Math.max( - defaultMinTtl, - ((serverDate - lastModified) / 1000) * this._cacheHeuristic - ); - } - } - - return defaultMinTtl; - } - - /** - * Remaining time this cache entry may be useful for, in *milliseconds*. - * You can use this as an expiration time for your cache storage. - * - * Prefer this method over `maxAge()`, because it includes other factors like `age` and `stale-while-revalidate`. - * @returns {number} Time-to-live in milliseconds. - */ - timeToLive() { - const age = this.maxAge() - this.age(); - const staleIfErrorAge = age + toNumberOrZero(this._rescc['stale-if-error']); - const staleWhileRevalidateAge = age + toNumberOrZero(this._rescc['stale-while-revalidate']); - return Math.round(Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1000); - } - - /** - * If true, this cache entry is past its expiration date. - * Note that stale cache may be useful sometimes, see `evaluateRequest()`. - * @returns {boolean} `false` doesn't mean it's fresh nor usable - */ - stale() { - return this.maxAge() <= this.age(); - } - - /** - * @returns {boolean} `true` if `stale-if-error` condition allows use of a stale response. - */ - _useStaleIfError() { - return this.maxAge() + toNumberOrZero(this._rescc['stale-if-error']) > this.age(); - } - - /** See `evaluateRequest()` for a more complete solution - * @returns {boolean} `true` if `stale-while-revalidate` is currently allowed. - */ - useStaleWhileRevalidate() { - const swr = toNumberOrZero(this._rescc['stale-while-revalidate']); - return swr > 0 && this.maxAge() + swr > this.age(); - } - - /** - * Creates a `CachePolicy` instance from a serialized object. - * @param {Object} obj - The serialized object. - * @returns {CachePolicy} A new CachePolicy instance. - */ - static fromObject(obj) { - return new this(undefined, undefined, { _fromObject: obj }); - } - - /** - * @param {any} obj - The serialized object. - * @throws {Error} If already initialized or if the object is invalid. - */ - _fromObject(obj) { - if (this._responseTime) throw Error('Reinitialized'); - if (!obj || obj.v !== 1) throw Error('Invalid serialization'); - - this._responseTime = obj.t; - this._isShared = obj.sh; - this._cacheHeuristic = obj.ch; - this._immutableMinTtl = - obj.imm !== undefined ? obj.imm : 24 * 3600 * 1000; - this._ignoreCargoCult = !!obj.icc; - this._status = obj.st; - this._resHeaders = obj.resh; - this._rescc = obj.rescc; - this._method = obj.m; - this._url = obj.u; - this._host = obj.h; - this._noAuthorization = obj.a; - this._reqHeaders = obj.reqh; - this._reqcc = obj.reqcc; - } - - /** - * Serializes the `CachePolicy` instance into a JSON-serializable object. - * @returns {Object} The serialized object. - */ - toObject() { - return { - v: 1, - t: this._responseTime, - sh: this._isShared, - ch: this._cacheHeuristic, - imm: this._immutableMinTtl, - icc: this._ignoreCargoCult, - st: this._status, - resh: this._resHeaders, - rescc: this._rescc, - m: this._method, - u: this._url, - h: this._host, - a: this._noAuthorization, - reqh: this._reqHeaders, - reqcc: this._reqcc, - }; - } - - /** - * Headers for sending to the origin server to revalidate stale response. - * Allows server to return 304 to allow reuse of the previous response. - * - * Hop by hop headers are always stripped. - * Revalidation headers may be added or removed, depending on request. - * @param {HttpRequest} incomingReq - The incoming HTTP request. - * @returns {Record} The headers for the revalidation request. - */ - revalidationHeaders(incomingReq) { - this._assertRequestHasHeaders(incomingReq); - const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers); - - // This implementation does not understand range requests - delete headers['if-range']; - - if (!this._requestMatches(incomingReq, true) || !this.storable()) { - // revalidation allowed via HEAD - // not for the same resource, or wasn't allowed to be cached anyway - delete headers['if-none-match']; - delete headers['if-modified-since']; - return headers; - } - - /* MUST send that entity-tag in any cache validation request (using If-Match or If-None-Match) if an entity-tag has been provided by the origin server. */ - if (this._resHeaders.etag) { - headers['if-none-match'] = headers['if-none-match'] - ? `${headers['if-none-match']}, ${this._resHeaders.etag}` - : this._resHeaders.etag; - } - - // Clients MAY issue simple (non-subrange) GET requests with either weak validators or strong validators. Clients MUST NOT use weak validators in other forms of request. - const forbidsWeakValidators = - headers['accept-ranges'] || - headers['if-match'] || - headers['if-unmodified-since'] || - (this._method && this._method != 'GET'); - - /* SHOULD send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since) if only a Last-Modified value has been provided by the origin server. - Note: This implementation does not understand partial responses (206) */ - if (forbidsWeakValidators) { - delete headers['if-modified-since']; - - if (headers['if-none-match']) { - const etags = headers['if-none-match'] - .split(/,/) - .filter(etag => { - return !/^\s*W\//.test(etag); - }); - if (!etags.length) { - delete headers['if-none-match']; - } else { - headers['if-none-match'] = etags.join(',').trim(); - } - } - } else if ( - this._resHeaders['last-modified'] && - !headers['if-modified-since'] - ) { - headers['if-modified-since'] = this._resHeaders['last-modified']; - } - - return headers; - } - - /** - * Creates new CachePolicy with information combined from the previews response, - * and the new revalidation response. - * - * Returns {policy, modified} where modified is a boolean indicating - * whether the response body has been modified, and old cached body can't be used. - * - * @param {HttpRequest} request - The latest HTTP request asking for the cached entry. - * @param {HttpResponse} response - The latest revalidation HTTP response from the origin server. - * @returns {{policy: CachePolicy, modified: boolean, matches: boolean}} The updated policy and modification status. - * @throws {Error} If the response headers are missing. - */ - revalidatedPolicy(request, response) { - this._assertRequestHasHeaders(request); - - if (this._useStaleIfError() && isErrorResponse(response)) { - return { - policy: this, - modified: false, - matches: true, - }; - } - - if (!response || !response.headers) { - throw Error('Response headers missing'); - } - - // These aren't going to be supported exactly, since one CachePolicy object - // doesn't know about all the other cached objects. - let matches = false; - if (response.status !== undefined && response.status != 304) { - matches = false; - } else if ( - response.headers.etag && - !/^\s*W\//.test(response.headers.etag) - ) { - // "All of the stored responses with the same strong validator are selected. - // If none of the stored responses contain the same strong validator, - // then the cache MUST NOT use the new response to update any stored responses." - matches = - this._resHeaders.etag && - this._resHeaders.etag.replace(/^\s*W\//, '') === - response.headers.etag; - } else if (this._resHeaders.etag && response.headers.etag) { - // "If the new response contains a weak validator and that validator corresponds - // to one of the cache's stored responses, - // then the most recent of those matching stored responses is selected for update." - matches = - this._resHeaders.etag.replace(/^\s*W\//, '') === - response.headers.etag.replace(/^\s*W\//, ''); - } else if (this._resHeaders['last-modified']) { - matches = - this._resHeaders['last-modified'] === - response.headers['last-modified']; - } else { - // If the new response does not include any form of validator (such as in the case where - // a client generates an If-Modified-Since request from a source other than the Last-Modified - // response header field), and there is only one stored response, and that stored response also - // lacks a validator, then that stored response is selected for update. - if ( - !this._resHeaders.etag && - !this._resHeaders['last-modified'] && - !response.headers.etag && - !response.headers['last-modified'] - ) { - matches = true; - } - } - - const optionsCopy = { - shared: this._isShared, - cacheHeuristic: this._cacheHeuristic, - immutableMinTimeToLive: this._immutableMinTtl, - ignoreCargoCult: this._ignoreCargoCult, - }; - - if (!matches) { - return { - policy: new this.constructor(request, response, optionsCopy), - // Client receiving 304 without body, even if it's invalid/mismatched has no option - // but to reuse a cached body. We don't have a good way to tell clients to do - // error recovery in such case. - modified: response.status != 304, - matches: false, - }; - } - - // use other header fields provided in the 304 (Not Modified) response to replace all instances - // of the corresponding header fields in the stored response. - const headers = {}; - for (const k in this._resHeaders) { - headers[k] = - k in response.headers && !excludedFromRevalidationUpdate[k] - ? response.headers[k] - : this._resHeaders[k]; - } - - const newResponse = Object.assign({}, response, { - status: this._status, - method: this._method, - headers, - }); - return { - policy: new this.constructor(request, newResponse, optionsCopy), - modified: false, - matches: true, - }; - } -}; diff --git a/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/package.json b/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/package.json deleted file mode 100644 index d45dfa1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "http-cache-semantics", - "version": "4.2.0", - "description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies", - "repository": { - "type": "git", - "url": "git+https://github.com/kornelski/http-cache-semantics.git" - }, - "main": "index.js", - "types": "index.js", - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "author": "Kornel Lesiński (https://kornel.ski/)", - "license": "BSD-2-Clause", - "devDependencies": { - "mocha": "^11.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/@tootallnate/once b/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/@tootallnate/once deleted file mode 120000 index a0b2a15..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/@tootallnate/once +++ /dev/null @@ -1 +0,0 @@ -../../../@tootallnate+once@1.1.2/node_modules/@tootallnate/once \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/agent-base b/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/agent-base deleted file mode 120000 index a786004..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/agent-base +++ /dev/null @@ -1 +0,0 @@ -../../agent-base@6.0.2/node_modules/agent-base \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/debug b/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/debug deleted file mode 120000 index 6b438e1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/debug +++ /dev/null @@ -1 +0,0 @@ -../../debug@4.4.3/node_modules/debug \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/README.md b/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/README.md deleted file mode 100644 index d60e206..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/README.md +++ /dev/null @@ -1,74 +0,0 @@ -http-proxy-agent -================ -### An HTTP(s) proxy `http.Agent` implementation for HTTP -[![Build Status](https://github.com/TooTallNate/node-http-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-http-proxy-agent/actions?workflow=Node+CI) - -This module provides an `http.Agent` implementation that connects to a specified -HTTP or HTTPS proxy server, and can be used with the built-in `http` module. - -__Note:__ For HTTP proxy usage with the `https` module, check out -[`node-https-proxy-agent`](https://github.com/TooTallNate/node-https-proxy-agent). - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install http-proxy-agent -``` - - -Example -------- - -``` js -var url = require('url'); -var http = require('http'); -var HttpProxyAgent = require('http-proxy-agent'); - -// HTTP/HTTPS proxy to connect to -var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; -console.log('using proxy server %j', proxy); - -// HTTP endpoint for the proxy to connect to -var endpoint = process.argv[2] || 'http://nodejs.org/api/'; -console.log('attempting to GET %j', endpoint); -var opts = url.parse(endpoint); - -// create an instance of the `HttpProxyAgent` class with the proxy server information -var agent = new HttpProxyAgent(proxy); -opts.agent = agent; - -http.get(opts, function (res) { - console.log('"response" event!', res.headers); - res.pipe(process.stdout); -}); -``` - - -License -------- - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.d.ts b/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.d.ts deleted file mode 100644 index 3f043f7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/// -import net from 'net'; -import { Agent, ClientRequest, RequestOptions } from 'agent-base'; -import { HttpProxyAgentOptions } from '.'; -interface HttpProxyAgentClientRequest extends ClientRequest { - path: string; - output?: string[]; - outputData?: { - data: string; - }[]; - _header?: string | null; - _implicitHeader(): void; -} -/** - * The `HttpProxyAgent` implements an HTTP Agent subclass that connects - * to the specified "HTTP proxy server" in order to proxy HTTP requests. - * - * @api public - */ -export default class HttpProxyAgent extends Agent { - private secureProxy; - private proxy; - constructor(_opts: string | HttpProxyAgentOptions); - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req: HttpProxyAgentClientRequest, opts: RequestOptions): Promise; -} -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js b/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js deleted file mode 100644 index 0252850..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js +++ /dev/null @@ -1,145 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const net_1 = __importDefault(require("net")); -const tls_1 = __importDefault(require("tls")); -const url_1 = __importDefault(require("url")); -const debug_1 = __importDefault(require("debug")); -const once_1 = __importDefault(require("@tootallnate/once")); -const agent_base_1 = require("agent-base"); -const debug = debug_1.default('http-proxy-agent'); -function isHTTPS(protocol) { - return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; -} -/** - * The `HttpProxyAgent` implements an HTTP Agent subclass that connects - * to the specified "HTTP proxy server" in order to proxy HTTP requests. - * - * @api public - */ -class HttpProxyAgent extends agent_base_1.Agent { - constructor(_opts) { - let opts; - if (typeof _opts === 'string') { - opts = url_1.default.parse(_opts); - } - else { - opts = _opts; - } - if (!opts) { - throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); - } - debug('Creating new HttpProxyAgent instance: %o', opts); - super(opts); - const proxy = Object.assign({}, opts); - // If `true`, then connect to the proxy server over TLS. - // Defaults to `false`. - this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); - // Prefer `hostname` over `host`, and set the `port` if needed. - proxy.host = proxy.hostname || proxy.host; - if (typeof proxy.port === 'string') { - proxy.port = parseInt(proxy.port, 10); - } - if (!proxy.port && proxy.host) { - proxy.port = this.secureProxy ? 443 : 80; - } - if (proxy.host && proxy.path) { - // If both a `host` and `path` are specified then it's most likely - // the result of a `url.parse()` call... we need to remove the - // `path` portion so that `net.connect()` doesn't attempt to open - // that as a Unix socket file. - delete proxy.path; - delete proxy.pathname; - } - this.proxy = proxy; - } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req, opts) { - return __awaiter(this, void 0, void 0, function* () { - const { proxy, secureProxy } = this; - const parsed = url_1.default.parse(req.path); - if (!parsed.protocol) { - parsed.protocol = 'http:'; - } - if (!parsed.hostname) { - parsed.hostname = opts.hostname || opts.host || null; - } - if (parsed.port == null && typeof opts.port) { - parsed.port = String(opts.port); - } - if (parsed.port === '80') { - // if port is 80, then we can remove the port so that the - // ":80" portion is not on the produced URL - delete parsed.port; - } - // Change the `http.ClientRequest` instance's "path" field - // to the absolute path of the URL that will be requested. - req.path = url_1.default.format(parsed); - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.auth) { - req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`); - } - // Create a socket connection to the proxy server. - let socket; - if (secureProxy) { - debug('Creating `tls.Socket`: %o', proxy); - socket = tls_1.default.connect(proxy); - } - else { - debug('Creating `net.Socket`: %o', proxy); - socket = net_1.default.connect(proxy); - } - // At this point, the http ClientRequest's internal `_header` field - // might have already been set. If this is the case then we'll need - // to re-generate the string since we just changed the `req.path`. - if (req._header) { - let first; - let endOfHeaders; - debug('Regenerating stored HTTP header string for request'); - req._header = null; - req._implicitHeader(); - if (req.output && req.output.length > 0) { - // Node < 12 - debug('Patching connection write() output buffer with updated header'); - first = req.output[0]; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.output[0] = req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.output); - } - else if (req.outputData && req.outputData.length > 0) { - // Node >= 12 - debug('Patching connection write() output buffer with updated header'); - first = req.outputData[0].data; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.outputData[0].data = - req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.outputData[0].data); - } - } - // Wait for the socket's `connect` event, so that this `callback()` - // function throws instead of the `http` request machinery. This is - // important for i.e. `PacProxyAgent` which determines a failed proxy - // connection via the `callback()` function throwing. - yield once_1.default(socket, 'connect'); - return socket; - }); - } -} -exports.default = HttpProxyAgent; -//# sourceMappingURL=agent.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js.map b/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js.map deleted file mode 100644 index 7a40762..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,8CAAsB;AACtB,8CAAsB;AACtB,kDAAgC;AAChC,6DAAqC;AACrC,2CAAkE;AAGlE,MAAM,KAAK,GAAG,eAAW,CAAC,kBAAkB,CAAC,CAAC;AAY9C,SAAS,OAAO,CAAC,QAAwB;IACxC,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC3E,CAAC;AAED;;;;;GAKG;AACH,MAAqB,cAAe,SAAQ,kBAAK;IAIhD,YAAY,KAAqC;QAChD,IAAI,IAA2B,CAAC;QAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC9B,IAAI,GAAG,aAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACxB;aAAM;YACN,IAAI,GAAG,KAAK,CAAC;SACb;QACD,IAAI,CAAC,IAAI,EAAE;YACV,MAAM,IAAI,KAAK,CACd,8DAA8D,CAC9D,CAAC;SACF;QACD,KAAK,CAAC,0CAA0C,EAAE,IAAI,CAAC,CA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xy-agent/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.d.ts deleted file mode 100644 index 24bdb52..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/// -import net from 'net'; -import tls from 'tls'; -import { Url } from 'url'; -import { AgentOptions } from 'agent-base'; -import _HttpProxyAgent from './agent'; -declare function createHttpProxyAgent(opts: string | createHttpProxyAgent.HttpProxyAgentOptions): _HttpProxyAgent; -declare namespace createHttpProxyAgent { - interface BaseHttpProxyAgentOptions { - secureProxy?: boolean; - host?: string | null; - path?: string | null; - port?: string | number | null; - } - export interface HttpProxyAgentOptions extends AgentOptions, BaseHttpProxyAgentOptions, Partial> { - } - export type HttpProxyAgent = _HttpProxyAgent; - export const HttpProxyAgent: typeof _HttpProxyAgent; - export {}; -} -export = createHttpProxyAgent; diff --git a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js b/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js deleted file mode 100644 index 0a71180..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const agent_1 = __importDefault(require("./agent")); -function createHttpProxyAgent(opts) { - return new agent_1.default(opts); -} -(function (createHttpProxyAgent) { - createHttpProxyAgent.HttpProxyAgent = agent_1.default; - createHttpProxyAgent.prototype = agent_1.default.prototype; -})(createHttpProxyAgent || (createHttpProxyAgent = {})); -module.exports = createHttpProxyAgent; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js.map deleted file mode 100644 index e07dae5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAIA,oDAAsC;AAEtC,SAAS,oBAAoB,CAC5B,IAAyD;IAEzD,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,WAAU,oBAAoB;IAmBhB,mCAAc,GAAG,eAAe,CAAC;IAE9C,oBAAoB,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;AAC5D,CAAC,EAtBS,oBAAoB,KAApB,oBAAoB,QAsB7B;AAED,iBAAS,oBAAoB,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/package.json b/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/package.json deleted file mode 100644 index 870dd5d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "http-proxy-agent", - "version": "4.0.1", - "description": "An HTTP(s) proxy `http.Agent` implementation for HTTP", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "test": "mocha", - "test-lint": "eslint src --ext .js,.ts", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-http-proxy-agent.git" - }, - "keywords": [ - "http", - "proxy", - "endpoint", - "agent" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/node-http-proxy-agent/issues" - }, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "devDependencies": { - "@types/debug": "4", - "@types/node": "^12.12.11", - "@typescript-eslint/eslint-plugin": "1.6.0", - "@typescript-eslint/parser": "1.1.0", - "eslint": "5.16.0", - "eslint-config-airbnb": "17.1.0", - "eslint-config-prettier": "4.1.0", - "eslint-import-resolver-typescript": "1.1.1", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-jsx-a11y": "6.2.1", - "eslint-plugin-react": "7.12.4", - "mocha": "^6.2.2", - "proxy": "1", - "rimraf": "^3.0.0", - "typescript": "^3.5.3" - }, - "engines": { - "node": ">= 6" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/agent-base b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/agent-base deleted file mode 120000 index a786004..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/agent-base +++ /dev/null @@ -1 +0,0 @@ -../../agent-base@6.0.2/node_modules/agent-base \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/debug b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/debug deleted file mode 120000 index 6b438e1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/debug +++ /dev/null @@ -1 +0,0 @@ -../../debug@4.4.3/node_modules/debug \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/README.md b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/README.md deleted file mode 100644 index 328656a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/README.md +++ /dev/null @@ -1,137 +0,0 @@ -https-proxy-agent -================ -### An HTTP(s) proxy `http.Agent` implementation for HTTPS -[![Build Status](https://github.com/TooTallNate/node-https-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-https-proxy-agent/actions?workflow=Node+CI) - -This module provides an `http.Agent` implementation that connects to a specified -HTTP or HTTPS proxy server, and can be used with the built-in `https` module. - -Specifically, this `Agent` implementation connects to an intermediary "proxy" -server and issues the [CONNECT HTTP method][CONNECT], which tells the proxy to -open a direct TCP connection to the destination server. - -Since this agent implements the CONNECT HTTP method, it also works with other -protocols that use this method when connecting over proxies (i.e. WebSockets). -See the "Examples" section below for more. - - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install https-proxy-agent -``` - - -Examples --------- - -#### `https` module example - -``` js -var url = require('url'); -var https = require('https'); -var HttpsProxyAgent = require('https-proxy-agent'); - -// HTTP/HTTPS proxy to connect to -var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; -console.log('using proxy server %j', proxy); - -// HTTPS endpoint for the proxy to connect to -var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate'; -console.log('attempting to GET %j', endpoint); -var options = url.parse(endpoint); - -// create an instance of the `HttpsProxyAgent` class with the proxy server information -var agent = new HttpsProxyAgent(proxy); -options.agent = agent; - -https.get(options, function (res) { - console.log('"response" event!', res.headers); - res.pipe(process.stdout); -}); -``` - -#### `ws` WebSocket connection example - -``` js -var url = require('url'); -var WebSocket = require('ws'); -var HttpsProxyAgent = require('https-proxy-agent'); - -// HTTP/HTTPS proxy to connect to -var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; -console.log('using proxy server %j', proxy); - -// WebSocket endpoint for the proxy to connect to -var endpoint = process.argv[2] || 'ws://echo.websocket.org'; -var parsed = url.parse(endpoint); -console.log('attempting to connect to WebSocket %j', endpoint); - -// create an instance of the `HttpsProxyAgent` class with the proxy server information -var options = url.parse(proxy); - -var agent = new HttpsProxyAgent(options); - -// finally, initiate the WebSocket connection -var socket = new WebSocket(endpoint, { agent: agent }); - -socket.on('open', function () { - console.log('"open" event!'); - socket.send('hello world'); -}); - -socket.on('message', function (data, flags) { - console.log('"message" event! %j %j', data, flags); - socket.close(); -}); -``` - -API ---- - -### new HttpsProxyAgent(Object options) - -The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects -to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket -requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT]. - -The `options` argument may either be a string URI of the proxy server to use, or an -"options" object with more specific properties: - - * `host` - String - Proxy host to connect to (may use `hostname` as well). Required. - * `port` - Number - Proxy port to connect to. Required. - * `protocol` - String - If `https:`, then use TLS to connect to the proxy. - * `headers` - Object - Additional HTTP headers to be sent on the HTTP CONNECT method. - * Any other options given are passed to the `net.connect()`/`tls.connect()` functions. - - -License -------- - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -[CONNECT]: http://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_Tunneling diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.d.ts b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.d.ts deleted file mode 100644 index 4f1c636..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// -import net from 'net'; -import { Agent, ClientRequest, RequestOptions } from 'agent-base'; -import { HttpsProxyAgentOptions } from '.'; -/** - * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to - * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. - * - * Outgoing HTTP requests are first tunneled through the proxy server using the - * `CONNECT` HTTP request method to establish a connection to the proxy server, - * and then the proxy server connects to the destination target and issues the - * HTTP request from the proxy server. - * - * `https:` requests have their socket connection upgraded to TLS once - * the connection to the proxy server has been established. - * - * @api public - */ -export default class HttpsProxyAgent extends Agent { - private secureProxy; - private proxy; - constructor(_opts: string | HttpsProxyAgentOptions); - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req: ClientRequest, opts: RequestOptions): Promise; -} diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js deleted file mode 100644 index 75d1136..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js +++ /dev/null @@ -1,177 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const net_1 = __importDefault(require("net")); -const tls_1 = __importDefault(require("tls")); -const url_1 = __importDefault(require("url")); -const assert_1 = __importDefault(require("assert")); -const debug_1 = __importDefault(require("debug")); -const agent_base_1 = require("agent-base"); -const parse_proxy_response_1 = __importDefault(require("./parse-proxy-response")); -const debug = debug_1.default('https-proxy-agent:agent'); -/** - * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to - * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. - * - * Outgoing HTTP requests are first tunneled through the proxy server using the - * `CONNECT` HTTP request method to establish a connection to the proxy server, - * and then the proxy server connects to the destination target and issues the - * HTTP request from the proxy server. - * - * `https:` requests have their socket connection upgraded to TLS once - * the connection to the proxy server has been established. - * - * @api public - */ -class HttpsProxyAgent extends agent_base_1.Agent { - constructor(_opts) { - let opts; - if (typeof _opts === 'string') { - opts = url_1.default.parse(_opts); - } - else { - opts = _opts; - } - if (!opts) { - throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); - } - debug('creating new HttpsProxyAgent instance: %o', opts); - super(opts); - const proxy = Object.assign({}, opts); - // If `true`, then connect to the proxy server over TLS. - // Defaults to `false`. - this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); - // Prefer `hostname` over `host`, and set the `port` if needed. - proxy.host = proxy.hostname || proxy.host; - if (typeof proxy.port === 'string') { - proxy.port = parseInt(proxy.port, 10); - } - if (!proxy.port && proxy.host) { - proxy.port = this.secureProxy ? 443 : 80; - } - // ALPN is supported by Node.js >= v5. - // attempt to negotiate http/1.1 for proxy servers that support http/2 - if (this.secureProxy && !('ALPNProtocols' in proxy)) { - proxy.ALPNProtocols = ['http 1.1']; - } - if (proxy.host && proxy.path) { - // If both a `host` and `path` are specified then it's most likely - // the result of a `url.parse()` call... we need to remove the - // `path` portion so that `net.connect()` doesn't attempt to open - // that as a Unix socket file. - delete proxy.path; - delete proxy.pathname; - } - this.proxy = proxy; - } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req, opts) { - return __awaiter(this, void 0, void 0, function* () { - const { proxy, secureProxy } = this; - // Create a socket connection to the proxy server. - let socket; - if (secureProxy) { - debug('Creating `tls.Socket`: %o', proxy); - socket = tls_1.default.connect(proxy); - } - else { - debug('Creating `net.Socket`: %o', proxy); - socket = net_1.default.connect(proxy); - } - const headers = Object.assign({}, proxy.headers); - const hostname = `${opts.host}:${opts.port}`; - let payload = `CONNECT ${hostname} HTTP/1.1\r\n`; - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.auth) { - headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`; - } - // The `Host` header should only include the port - // number when it is not the default port. - let { host, port, secureEndpoint } = opts; - if (!isDefaultPort(port, secureEndpoint)) { - host += `:${port}`; - } - headers.Host = host; - headers.Connection = 'close'; - for (const name of Object.keys(headers)) { - payload += `${name}: ${headers[name]}\r\n`; - } - const proxyResponsePromise = parse_proxy_response_1.default(socket); - socket.write(`${payload}\r\n`); - const { statusCode, buffered } = yield proxyResponsePromise; - if (statusCode === 200) { - req.once('socket', resume); - if (opts.secureEndpoint) { - // The proxy is connecting to a TLS server, so upgrade - // this socket connection to a TLS connection. - debug('Upgrading socket connection to TLS'); - const servername = opts.servername || opts.host; - return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, - servername })); - } - return socket; - } - // Some other status code that's not 200... need to re-play the HTTP - // header "data" events onto the socket once the HTTP machinery is - // attached so that the node core `http` can parse and handle the - // error status code. - // Close the original socket, and a new "fake" socket is returned - // instead, so that the proxy doesn't get the HTTP request - // written to it (which may contain `Authorization` headers or other - // sensitive data). - // - // See: https://hackerone.com/reports/541502 - socket.destroy(); - const fakeSocket = new net_1.default.Socket({ writable: false }); - fakeSocket.readable = true; - // Need to wait for the "socket" event to re-play the "data" events. - req.once('socket', (s) => { - debug('replaying proxy buffer for failed request'); - assert_1.default(s.listenerCount('data') > 0); - // Replay the "buffered" Buffer onto the fake `socket`, since at - // this point the HTTP module machinery has been hooked up for - // the user. - s.push(buffered); - s.push(null); - }); - return fakeSocket; - }); - } -} -exports.default = HttpsProxyAgent; -function resume(socket) { - socket.resume(); -} -function isDefaultPort(port, secure) { - return Boolean((!secure && port === 80) || (secure && port === 443)); -} -function isHTTPS(protocol) { - return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; -} -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; -} -//# sourceMappingURL=agent.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js.map b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js.map deleted file mode 100644 index 0af6c17..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,8CAAsB;AACtB,8CAAsB;AACtB,oDAA4B;AAC5B,kDAAgC;AAEhC,2CAAkE;AAElE,kFAAwD;AAExD,MAAM,KAAK,GAAG,eAAW,CAAC,yBAAyB,CAAC,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,MAAqB,eAAgB,SAAQ,kBAAK;IAIjD,YAAY,KAAsC;QACjD,IAAI,IAA4B,CAAC;QACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC9B,IAAI,GAAG,aAAG,CAAC,KAAK,CAAC,K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gBAChE,8DAA8D;gBAC9D,YAAY;gBACZ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACjB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACd,CAAC,CAAC,CAAC;YAEH,OAAO,UAAU,CAAC;QACnB,CAAC;KAAA;CACD;AA3JD,kCA2JC;AAED,SAAS,MAAM,CAAC,MAAkC;IACjD,MAAM,CAAC,MAAM,EAAE,CAAC;AACjB,CAAC;AAED,SAAS,aAAa,CAAC,IAAY,EAAE,MAAe;IACnD,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,OAAO,CAAC,QAAwB;IACxC,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC3E,CAAC;AAED,SAAS,IAAI,CACZ,GAAM,EACN,GAAG,IAAO;IAIV,MAAM,GAAG,GAAG,EAEX,CAAC;IACF,IAAI,GAAqB,CAAC;IAC1B,KAAK,GAAG,IAAI,GAAG,EAAE;QAChB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACxB,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;SACpB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.d.ts deleted file mode 100644 index 0d60062..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/// -import net from 'net'; -import tls from 'tls'; -import { Url } from 'url'; -import { AgentOptions } from 'agent-base'; -import { OutgoingHttpHeaders } from 'http'; -import _HttpsProxyAgent from './agent'; -declare function createHttpsProxyAgent(opts: string | createHttpsProxyAgent.HttpsProxyAgentOptions): _HttpsProxyAgent; -declare namespace createHttpsProxyAgent { - interface BaseHttpsProxyAgentOptions { - headers?: OutgoingHttpHeaders; - secureProxy?: boolean; - host?: string | null; - path?: string | null; - port?: string | number | null; - } - export interface HttpsProxyAgentOptions extends AgentOptions, BaseHttpsProxyAgentOptions, Partial> { - } - export type HttpsProxyAgent = _HttpsProxyAgent; - export const HttpsProxyAgent: typeof _HttpsProxyAgent; - export {}; -} -export = createHttpsProxyAgent; diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js deleted file mode 100644 index b03e763..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const agent_1 = __importDefault(require("./agent")); -function createHttpsProxyAgent(opts) { - return new agent_1.default(opts); -} -(function (createHttpsProxyAgent) { - createHttpsProxyAgent.HttpsProxyAgent = agent_1.default; - createHttpsProxyAgent.prototype = agent_1.default.prototype; -})(createHttpsProxyAgent || (createHttpsProxyAgent = {})); -module.exports = createHttpsProxyAgent; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js.map b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js.map deleted file mode 100644 index f3ce559..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAKA,oDAAuC;AAEvC,SAAS,qBAAqB,CAC7B,IAA2D;IAE3D,OAAO,IAAI,eAAgB,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,WAAU,qBAAqB;IAoBjB,qCAAe,GAAG,eAAgB,CAAC;IAEhD,qBAAqB,CAAC,SAAS,GAAG,eAAgB,CAAC,SAAS,CAAC;AAC9D,CAAC,EAvBS,qBAAqB,KAArB,qBAAqB,QAuB9B;AAED,iBAAS,qBAAqB,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts deleted file mode 100644 index 7565674..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -import { Readable } from 'stream'; -export interface ProxyResponse { - statusCode: number; - buffered: Buffer; -} -export default function parseProxyResponse(socket: Readable): Promise; diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js deleted file mode 100644 index aa5ce3c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const debug_1 = __importDefault(require("debug")); -const debug = debug_1.default('https-proxy-agent:parse-proxy-response'); -function parseProxyResponse(socket) { - return new Promise((resolve, reject) => { - // we need to buffer any HTTP traffic that happens with the proxy before we get - // the CONNECT response, so that if the response is anything other than an "200" - // response code, then we can re-play the "data" events on the socket once the - // HTTP parser is hooked up... - let buffersLength = 0; - const buffers = []; - function read() { - const b = socket.read(); - if (b) - ondata(b); - else - socket.once('readable', read); - } - function cleanup() { - socket.removeListener('end', onend); - socket.removeListener('error', onerror); - socket.removeListener('close', onclose); - socket.removeListener('readable', read); - } - function onclose(err) { - debug('onclose had error %o', err); - } - function onend() { - debug('onend'); - } - function onerror(err) { - cleanup(); - debug('onerror %o', err); - reject(err); - } - function ondata(b) { - buffers.push(b); - buffersLength += b.length; - const buffered = Buffer.concat(buffers, buffersLength); - const endOfHeaders = buffered.indexOf('\r\n\r\n'); - if (endOfHeaders === -1) { - // keep buffering - debug('have not received end of HTTP headers yet...'); - read(); - return; - } - const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\r\n')); - const statusCode = +firstLine.split(' ')[1]; - debug('got proxy server response: %o', firstLine); - resolve({ - statusCode, - buffered - }); - } - socket.on('error', onerror); - socket.on('close', onclose); - socket.on('end', onend); - read(); - }); -} -exports.default = parseProxyResponse; -//# sourceMappingURL=parse-proxy-response.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map deleted file mode 100644 index bacdb84..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse-proxy-response.js","sourceRoot":"","sources":["../src/parse-proxy-response.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B,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YACvD,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAElD,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE;gBACxB,iBAAiB;gBACjB,KAAK,CAAC,8CAA8C,CAAC,CAAC;gBACtD,IAAI,EAAE,CAAC;gBACP,OAAO;aACP;YAED,MAAM,SAAS,GAAG,QAAQ,CAAC,QAAQ,CAClC,OAAO,EACP,CAAC,EACD,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CACxB,CAAC;YACF,MAAM,UAAU,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,KAAK,CAAC,+BAA+B,EAAE,SAAS,CAAC,CAAC;YAClD,OAAO,CAAC;gBACP,UAAU;gBACV,QAAQ;aACR,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAExB,IAAI,EAAE,CAAC;IACR,CAAC,CAAC,CAAC;AACJ,CAAC;AAvED,qCAuEC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/package.json b/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/package.json deleted file mode 100644 index fb2aba1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "https-proxy-agent", - "version": "5.0.1", - "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS", - "main": "dist/index", - "types": "dist/index", - "files": [ - "dist" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "test": "mocha --reporter spec", - "test-lint": "eslint src --ext .js,.ts", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-https-proxy-agent.git" - }, - "keywords": [ - "https", - "proxy", - "endpoint", - "agent" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/node-https-proxy-agent/issues" - }, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "devDependencies": { - "@types/debug": "4", - "@types/node": "^12.12.11", - "@typescript-eslint/eslint-plugin": "1.6.0", - "@typescript-eslint/parser": "1.1.0", - "eslint": "5.16.0", - "eslint-config-airbnb": "17.1.0", - "eslint-config-prettier": "4.1.0", - "eslint-import-resolver-typescript": "1.1.1", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-jsx-a11y": "6.2.1", - "eslint-plugin-react": "7.12.4", - "mocha": "^6.2.2", - "proxy": "1", - "rimraf": "^3.0.0", - "typescript": "^3.5.3" - }, - "engines": { - "node": ">= 6" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/History.md b/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/History.md deleted file mode 100644 index b159587..0000000 --- a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/History.md +++ /dev/null @@ -1,25 +0,0 @@ - -1.2.1 / 2017-05-19 -================== - - * fix: package.json to reduce vulnerabilities (#3) - -1.2.0 / 2016-05-21 -================== - - * feat: warn with stack - -1.1.0 / 2016-04-04 -================== - - * deps: upgrade ms to 0.7.0 - -1.0.1 / 2014-12-31 -================== - - * feat(index.js): warn when result is undefined - -1.0.0 / 2014-08-14 -================== - - * init diff --git a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/LICENSE b/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/LICENSE deleted file mode 100644 index 89de354..0000000 --- a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/LICENSE +++ /dev/null @@ -1,17 +0,0 @@ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/README.md b/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/README.md deleted file mode 100644 index 20a2ca3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/README.md +++ /dev/null @@ -1,40 +0,0 @@ -humanize-ms ---------------- - -[![NPM version][npm-image]][npm-url] -[![build status][travis-image]][travis-url] -[![Test coverage][coveralls-image]][coveralls-url] -[![Gittip][gittip-image]][gittip-url] -[![David deps][david-image]][david-url] - -[npm-image]: https://img.shields.io/npm/v/humanize-ms.svg?style=flat -[npm-url]: https://npmjs.org/package/humanize-ms -[travis-image]: https://img.shields.io/travis/node-modules/humanize-ms.svg?style=flat -[travis-url]: https://travis-ci.org/node-modules/humanize-ms -[coveralls-image]: https://img.shields.io/coveralls/node-modules/humanize-ms.svg?style=flat -[coveralls-url]: https://coveralls.io/r/node-modules/humanize-ms?branch=master -[gittip-image]: https://img.shields.io/gittip/dead-horse.svg?style=flat -[gittip-url]: https://www.gittip.com/dead-horse/ -[david-image]: https://img.shields.io/david/node-modules/humanize-ms.svg?style=flat -[david-url]: https://david-dm.org/node-modules/humanize-ms - -transform humanize time to ms - -## Installation - -```bash -$ npm install humanize-ms -``` - -## Examples - -```js -var ms = require('humanize-ms'); - -ms('1s') // 1000 -ms(1000) // 1000 -``` - -### License - -MIT diff --git a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js b/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js deleted file mode 100644 index 660df81..0000000 --- a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/*! - * humanize-ms - index.js - * Copyright(c) 2014 dead_horse - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - */ - -var util = require('util'); -var ms = require('ms'); - -module.exports = function (t) { - if (typeof t === 'number') return t; - var r = ms(t); - if (r === undefined) { - var err = new Error(util.format('humanize-ms(%j) result undefined', t)); - console.warn(err.stack); - } - return r; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/package.json b/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/package.json deleted file mode 100644 index da4ab7f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "humanize-ms", - "version": "1.2.1", - "description": "transform humanize time to ms", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "make test" - }, - "keywords": [ - "humanize", - "ms" - ], - "author": { - "name": "dead-horse", - "email": "dead_horse@qq.com", - "url": "http://deadhorse.me" - }, - "repository": { - "type": "git", - "url": "https://github.com/node-modules/humanize-ms" - }, - "license": "MIT", - "dependencies": { - "ms": "^2.0.0" - }, - "devDependencies": { - "autod": "*", - "beautify-benchmark": "~0.2.4", - "benchmark": "~1.0.0", - "istanbul": "*", - "mocha": "*", - "should": "*" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/ms b/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/ms deleted file mode 120000 index e1d5029..0000000 --- a/services/hocuspocus/node_modules/.pnpm/humanize-ms@1.2.1/node_modules/ms +++ /dev/null @@ -1 +0,0 @@ -../../ms@2.1.3/node_modules/ms \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/.github/dependabot.yml b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/.github/dependabot.yml deleted file mode 100644 index e4a0e0a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "daily" - allow: - - dependency-type: production diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/Changelog.md b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/Changelog.md deleted file mode 100644 index 464549b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/Changelog.md +++ /dev/null @@ -1,212 +0,0 @@ -## 0.6.3 / 2021-05-23 - * Fix HKSCS encoding to prefer Big5 codes if both Big5 and HKSCS codes are possible (#264) - - -## 0.6.2 / 2020-07-08 - * Support Uint8Array-s decoding without conversion to Buffers, plus fix an edge case. - - -## 0.6.1 / 2020-06-28 - * Support Uint8Array-s directly when decoding (#246, by @gyzerok) - * Unify package.json version ranges to be strictly semver-compatible (#241) - * Fix minor issue in UTF-32 decoder's endianness detection code. - - -## 0.6.0 / 2020-06-08 - * Updated 'gb18030' encoding to :2005 edition (see https://github.com/whatwg/encoding/issues/22). - * Removed `iconv.extendNodeEncodings()` mechanism. It was deprecated 5 years ago and didn't work - in recent Node versions. - * Reworked Streaming API behavior in browser environments to fix #204. Streaming API will be - excluded by default in browser packs, saving ~100Kb bundle size, unless enabled explicitly using - `iconv.enableStreamingAPI(require('stream'))`. - * Updates to development environment & tests: - * Added ./test/webpack private package to test complex new use cases that need custom environment. - It's tested as a separate job in Travis CI. - * Updated generation code for the new EUC-KR index file format from Encoding Standard. - * Removed Buffer() constructor in tests (#197 by @gabrielschulhof). - - -## 0.5.2 / 2020-06-08 - * Added `iconv.getEncoder()` and `iconv.getDecoder()` methods to typescript definitions (#229). - * Fixed semver version to 6.1.2 to support Node 8.x (by @tanandara). - * Capped iconv version to 2.x as 3.x has dropped support for older Node versions. - * Switched from instanbul to c8 for code coverage. - - -## 0.5.1 / 2020-01-18 - - * Added cp720 encoding (#221, by @kr-deps) - * (minor) Changed Changelog.md formatting to use h2. - - -## 0.5.0 / 2019-06-26 - - * Added UTF-32 encoding, both little-endian and big-endian variants (UTF-32LE, UTF32-BE). If endianness - is not provided for decoding, it's deduced automatically from the stream using a heuristic similar to - what we use in UTF-16. (great work in #216 by @kshetline) - * Several minor updates to README (#217 by @oldj, plus some more) - * Added Node versions 10 and 12 to Travis test harness. - - -## 0.4.24 / 2018-08-22 - - * Added MIK encoding (#196, by @Ivan-Kalatchev) - - -## 0.4.23 / 2018-05-07 - - * Fix deprecation warning in Node v10 due to the last usage of `new Buffer` (#185, by @felixbuenemann) - * Switched from NodeBuffer to Buffer in typings (#155 by @felixfbecker, #186 by @larssn) - - -## 0.4.22 / 2018-05-05 - - * Use older semver style for dependencies to be compatible with Node version 0.10 (#182, by @dougwilson) - * Fix tests to accomodate fixes in Node v10 (#182, by @dougwilson) - - -## 0.4.21 / 2018-04-06 - - * Fix encoding canonicalization (#156) - * Fix the paths in the "browser" field in package.json (#174 by @LMLB) - * Removed "contributors" section in package.json - see Git history instead. - - -## 0.4.20 / 2018-04-06 - - * Updated `new Buffer()` usages with recommended replacements as it's being deprecated in Node v10 (#176, #178 by @ChALkeR) - - -## 0.4.19 / 2017-09-09 - - * Fixed iso8859-1 codec regression in handling untranslatable characters (#162, caused by #147) - * Re-generated windows1255 codec, because it was updated in iconv project - * Fixed grammar in error message when iconv-lite is loaded with encoding other than utf8 - - -## 0.4.18 / 2017-06-13 - - * Fixed CESU-8 regression in Node v8. - - -## 0.4.17 / 2017-04-22 - - * Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn) - - -## 0.4.16 / 2017-04-22 - - * Added support for React Native (#150) - * Changed iso8859-1 encoding to usine internal 'binary' encoding, as it's the same thing (#147 by @mscdex) - * Fixed typo in Readme (#138 by @jiangzhuo) - * Fixed build for Node v6.10+ by making correct version comparison - * Added a warning if iconv-lite is loaded not as utf-8 (see #142) - - -## 0.4.15 / 2016-11-21 - - * Fixed typescript type definition (#137) - - -## 0.4.14 / 2016-11-20 - - * Preparation for v1.0 - * Added Node v6 and latest Node versions to Travis CI test rig - * Deprecated Node v0.8 support - * Typescript typings (@larssn) - * Fix encoding of Euro character in GB 18030 (inspired by @lygstate) - * Add ms prefix to dbcs windows encodings (@rokoroku) - - -## 0.4.13 / 2015-10-01 - - * Fix silly mistake in deprecation notice. - - -## 0.4.12 / 2015-09-26 - - * Node v4 support: - * Added CESU-8 decoding (#106) - * Added deprecation notice for `extendNodeEncodings` - * Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol) - - -## 0.4.11 / 2015-07-03 - - * Added CESU-8 encoding. - - -## 0.4.10 / 2015-05-26 - - * Changed UTF-16 endianness heuristic to take into account any ASCII chars, not - just spaces. This should minimize the importance of "default" endianness. - - -## 0.4.9 / 2015-05-24 - - * Streamlined BOM handling: strip BOM by default, add BOM when encoding if - addBOM: true. Added docs to Readme. - * UTF16 now uses UTF16-LE by default. - * Fixed minor issue with big5 encoding. - * Added io.js testing on Travis; updated node-iconv version to test against. - Now we just skip testing SBCS encodings that node-iconv doesn't support. - * (internal refactoring) Updated codec interface to use classes. - * Use strict mode in all files. - - -## 0.4.8 / 2015-04-14 - - * added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94) - - -## 0.4.7 / 2015-02-05 - - * stop official support of Node.js v0.8. Should still work, but no guarantees. - reason: Packages needed for testing are hard to get on Travis CI. - * work in environment where Object.prototype is monkey patched with enumerable - props (#89). - - -## 0.4.6 / 2015-01-12 - - * fix rare aliases of single-byte encodings (thanks @mscdex) - * double the timeout for dbcs tests to make them less flaky on travis - - -## 0.4.5 / 2014-11-20 - - * fix windows-31j and x-sjis encoding support (@nleush) - * minor fix: undefined variable reference when internal error happens - - -## 0.4.4 / 2014-07-16 - - * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3) - * fixed streaming base64 encoding - - -## 0.4.3 / 2014-06-14 - - * added encodings UTF-16BE and UTF-16 with BOM - - -## 0.4.2 / 2014-06-12 - - * don't throw exception if `extendNodeEncodings()` is called more than once - - -## 0.4.1 / 2014-06-11 - - * codepage 808 added - - -## 0.4.0 / 2014-06-10 - - * code is rewritten from scratch - * all widespread encodings are supported - * streaming interface added - * browserify compatibility added - * (optional) extend core primitive encodings to make usage even simpler - * moved from vows to mocha as the testing framework - - diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/LICENSE b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/LICENSE deleted file mode 100644 index d518d83..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011 Alexander Shtuchkin - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/README.md b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/README.md deleted file mode 100644 index 3c97f87..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/README.md +++ /dev/null @@ -1,130 +0,0 @@ -## iconv-lite: Pure JS character encoding conversion - - * No need for native code compilation. Quick to install, works on Windows and in sandboxed environments like [Cloud9](http://c9.io). - * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser), - [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others. - * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison). - * Intuitive encode/decode API, including Streaming support. - * In-browser usage via [browserify](https://github.com/substack/node-browserify) or [webpack](https://webpack.js.org/) (~180kb gzip compressed with Buffer shim included). - * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included. - * React Native is supported (need to install `stream` module to enable Streaming API). - * License: MIT. - -[![NPM Stats](https://nodei.co/npm/iconv-lite.png)](https://npmjs.org/package/iconv-lite/) -[![Build Status](https://travis-ci.org/ashtuchkin/iconv-lite.svg?branch=master)](https://travis-ci.org/ashtuchkin/iconv-lite) -[![npm](https://img.shields.io/npm/v/iconv-lite.svg)](https://npmjs.org/package/iconv-lite/) -[![npm downloads](https://img.shields.io/npm/dm/iconv-lite.svg)](https://npmjs.org/package/iconv-lite/) -[![npm bundle size](https://img.shields.io/bundlephobia/min/iconv-lite.svg)](https://npmjs.org/package/iconv-lite/) - -## Usage -### Basic API -```javascript -var iconv = require('iconv-lite'); - -// Convert from an encoded buffer to a js string. -str = iconv.decode(Buffer.from([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251'); - -// Convert from a js string to an encoded buffer. -buf = iconv.encode("Sample input string", 'win1251'); - -// Check if encoding is supported -iconv.encodingExists("us-ascii") -``` - -### Streaming API -```javascript - -// Decode stream (from binary data stream to js strings) -http.createServer(function(req, res) { - var converterStream = iconv.decodeStream('win1251'); - req.pipe(converterStream); - - converterStream.on('data', function(str) { - console.log(str); // Do something with decoded strings, chunk-by-chunk. - }); -}); - -// Convert encoding streaming example -fs.createReadStream('file-in-win1251.txt') - .pipe(iconv.decodeStream('win1251')) - .pipe(iconv.encodeStream('ucs2')) - .pipe(fs.createWriteStream('file-in-ucs2.txt')); - -// Sugar: all encode/decode streams have .collect(cb) method to accumulate data. -http.createServer(function(req, res) { - req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) { - assert(typeof body == 'string'); - console.log(body); // full request body string - }); -}); -``` - -## Supported encodings - - * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex. - * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap, utf32, utf32-le, and utf32-be. - * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family, - IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library. - Aliases like 'latin1', 'us-ascii' also supported. - * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP. - -See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). - -Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors! - -Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors! - - -## Encoding/decoding speed - -Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0). -Note: your results may vary, so please always check on your hardware. - - operation iconv@2.1.4 iconv-lite@0.4.7 - ---------------------------------------------------------- - encode('win1251') ~96 Mb/s ~320 Mb/s - decode('win1251') ~95 Mb/s ~246 Mb/s - -## BOM handling - - * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options - (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`). - A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found. - * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module. - * Encoding: No BOM added, unless overridden by `addBOM: true` option. - -## UTF-16 Encodings - -This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be -smart about endianness in the following ways: - * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be - overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`. - * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override. - -## UTF-32 Encodings - -This library supports UTF-32LE, UTF-32BE and UTF-32 encodings. Like the UTF-16 encoding above, UTF-32 defaults to UTF-32LE, but uses BOM and 'spaces heuristics' to determine input endianness. - * The default of UTF-32LE can be overridden with the `defaultEncoding: 'utf-32be'` option. Strips BOM unless `stripBOM: false`. - * Encoding: uses UTF-32LE and writes BOM by default. Use `addBOM: false` to override. (`defaultEncoding: 'utf-32be'` can also be used here to change encoding.) - -## Other notes - -When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding). -Untranslatable characters are set to � or ?. No transliteration is currently supported. -Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77). - -## Testing - -```bash -$ git clone git@github.com:ashtuchkin/iconv-lite.git -$ cd iconv-lite -$ npm install -$ npm test - -$ # To view performance: -$ node test/performance.js - -$ # To view test coverage: -$ npm run coverage -$ open coverage/lcov-report/index.html -``` diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-codec.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-codec.js deleted file mode 100644 index fa83917..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-codec.js +++ /dev/null @@ -1,597 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. -// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. -// To save memory and loading time, we read table files only when requested. - -exports._dbcs = DBCSCodec; - -var UNASSIGNED = -1, - GB18030_CODE = -2, - SEQ_START = -10, - NODE_START = -1000, - UNASSIGNED_NODE = new Array(0x100), - DEF_CHAR = -1; - -for (var i = 0; i < 0x100; i++) - UNASSIGNED_NODE[i] = UNASSIGNED; - - -// Class DBCSCodec reads and initializes mapping tables. -function DBCSCodec(codecOptions, iconv) { - this.encodingName = codecOptions.encodingName; - if (!codecOptions) - throw new Error("DBCS codec is called without the data.") - if (!codecOptions.table) - throw new Error("Encoding '" + this.encodingName + "' has no data."); - - // Load tables. - var mappingTable = codecOptions.table(); - - - // Decode tables: MBCS -> Unicode. - - // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. - // Trie root is decodeTables[0]. - // Values: >= 0 -> unicode character code. can be > 0xFFFF - // == UNASSIGNED -> unknown/unassigned sequence. - // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. - // <= NODE_START -> index of the next node in our trie to process next byte. - // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. - this.decodeTables = []; - this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. - - // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. - this.decodeTableSeq = []; - - // Actual mapping tables consist of chunks. Use them to fill up decode tables. - for (var i = 0; i < mappingTable.length; i++) - this._addDecodeChunk(mappingTable[i]); - - // Load & create GB18030 tables when needed. - if (typeof codecOptions.gb18030 === 'function') { - this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. - - // Add GB18030 common decode nodes. - var commonThirdByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - var commonFourthByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - // Fill out the tree - var firstByteNode = this.decodeTables[0]; - for (var i = 0x81; i <= 0xFE; i++) { - var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; - for (var j = 0x30; j <= 0x39; j++) { - if (secondByteNode[j] === UNASSIGNED) { - secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; - } else if (secondByteNode[j] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 2"); - } - - var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; - for (var k = 0x81; k <= 0xFE; k++) { - if (thirdByteNode[k] === UNASSIGNED) { - thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; - } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { - continue; - } else if (thirdByteNode[k] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 3"); - } - - var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; - for (var l = 0x30; l <= 0x39; l++) { - if (fourthByteNode[l] === UNASSIGNED) - fourthByteNode[l] = GB18030_CODE; - } - } - } - } - } - - this.defaultCharUnicode = iconv.defaultCharUnicode; - - - // Encode tables: Unicode -> DBCS. - - // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. - // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. - // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). - // == UNASSIGNED -> no conversion found. Output a default char. - // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. - this.encodeTable = []; - - // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of - // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key - // means end of sequence (needed when one sequence is a strict subsequence of another). - // Objects are kept separately from encodeTable to increase performance. - this.encodeTableSeq = []; - - // Some chars can be decoded, but need not be encoded. - var skipEncodeChars = {}; - if (codecOptions.encodeSkipVals) - for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { - var val = codecOptions.encodeSkipVals[i]; - if (typeof val === 'number') - skipEncodeChars[val] = true; - else - for (var j = val.from; j <= val.to; j++) - skipEncodeChars[j] = true; - } - - // Use decode trie to recursively fill out encode tables. - this._fillEncodeTable(0, 0, skipEncodeChars); - - // Add more encoding pairs when needed. - if (codecOptions.encodeAdd) { - for (var uChar in codecOptions.encodeAdd) - if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) - this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); - } - - this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; - if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; - if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); -} - -DBCSCodec.prototype.encoder = DBCSEncoder; -DBCSCodec.prototype.decoder = DBCSDecoder; - -// Decoder helpers -DBCSCodec.prototype._getDecodeTrieNode = function(addr) { - var bytes = []; - for (; addr > 0; addr >>>= 8) - bytes.push(addr & 0xFF); - if (bytes.length == 0) - bytes.push(0); - - var node = this.decodeTables[0]; - for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. - var val = node[bytes[i]]; - - if (val == UNASSIGNED) { // Create new node. - node[bytes[i]] = NODE_START - this.decodeTables.length; - this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); - } - else if (val <= NODE_START) { // Existing node. - node = this.decodeTables[NODE_START - val]; - } - else - throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); - } - return node; -} - - -DBCSCodec.prototype._addDecodeChunk = function(chunk) { - // First element of chunk is the hex mbcs code where we start. - var curAddr = parseInt(chunk[0], 16); - - // Choose the decoding node where we'll write our chars. - var writeTable = this._getDecodeTrieNode(curAddr); - curAddr = curAddr & 0xFF; - - // Write all other elements of the chunk to the table. - for (var k = 1; k < chunk.length; k++) { - var part = chunk[k]; - if (typeof part === "string") { // String, write as-is. - for (var l = 0; l < part.length;) { - var code = part.charCodeAt(l++); - if (0xD800 <= code && code < 0xDC00) { // Decode surrogate - var codeTrail = part.charCodeAt(l++); - if (0xDC00 <= codeTrail && codeTrail < 0xE000) - writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); - else - throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); - } - else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) - var len = 0xFFF - code + 2; - var seq = []; - for (var m = 0; m < len; m++) - seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. - - writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; - this.decodeTableSeq.push(seq); - } - else - writeTable[curAddr++] = code; // Basic char - } - } - else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. - var charCode = writeTable[curAddr - 1] + 1; - for (var l = 0; l < part; l++) - writeTable[curAddr++] = charCode++; - } - else - throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); - } - if (curAddr > 0xFF) - throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); -} - -// Encoder helpers -DBCSCodec.prototype._getEncodeBucket = function(uCode) { - var high = uCode >> 8; // This could be > 0xFF because of astral characters. - if (this.encodeTable[high] === undefined) - this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. - return this.encodeTable[high]; -} - -DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - if (bucket[low] <= SEQ_START) - this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. - else if (bucket[low] == UNASSIGNED) - bucket[low] = dbcsCode; -} - -DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { - - // Get the root of character tree according to first character of the sequence. - var uCode = seq[0]; - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - - var node; - if (bucket[low] <= SEQ_START) { - // There's already a sequence with - use it. - node = this.encodeTableSeq[SEQ_START-bucket[low]]; - } - else { - // There was no sequence object - allocate a new one. - node = {}; - if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. - bucket[low] = SEQ_START - this.encodeTableSeq.length; - this.encodeTableSeq.push(node); - } - - // Traverse the character tree, allocating new nodes as needed. - for (var j = 1; j < seq.length-1; j++) { - var oldVal = node[uCode]; - if (typeof oldVal === 'object') - node = oldVal; - else { - node = node[uCode] = {} - if (oldVal !== undefined) - node[DEF_CHAR] = oldVal - } - } - - // Set the leaf to given dbcsCode. - uCode = seq[seq.length-1]; - node[uCode] = dbcsCode; -} - -DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { - var node = this.decodeTables[nodeIdx]; - var hasValues = false; - var subNodeEmpty = {}; - for (var i = 0; i < 0x100; i++) { - var uCode = node[i]; - var mbCode = prefix + i; - if (skipEncodeChars[mbCode]) - continue; - - if (uCode >= 0) { - this._setEncodeChar(uCode, mbCode); - hasValues = true; - } else if (uCode <= NODE_START) { - var subNodeIdx = NODE_START - uCode; - if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). - var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive. - if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) - hasValues = true; - else - subNodeEmpty[subNodeIdx] = true; - } - } else if (uCode <= SEQ_START) { - this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); - hasValues = true; - } - } - return hasValues; -} - - - -// == Encoder ================================================================== - -function DBCSEncoder(options, codec) { - // Encoder state - this.leadSurrogate = -1; - this.seqObj = undefined; - - // Static data - this.encodeTable = codec.encodeTable; - this.encodeTableSeq = codec.encodeTableSeq; - this.defaultCharSingleByte = codec.defCharSB; - this.gb18030 = codec.gb18030; -} - -DBCSEncoder.prototype.write = function(str) { - var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), - leadSurrogate = this.leadSurrogate, - seqObj = this.seqObj, nextChar = -1, - i = 0, j = 0; - - while (true) { - // 0. Get next character. - if (nextChar === -1) { - if (i == str.length) break; - var uCode = str.charCodeAt(i++); - } - else { - var uCode = nextChar; - nextChar = -1; - } - - // 1. Handle surrogates. - if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. - if (uCode < 0xDC00) { // We've got lead surrogate. - if (leadSurrogate === -1) { - leadSurrogate = uCode; - continue; - } else { - leadSurrogate = uCode; - // Double lead surrogate found. - uCode = UNASSIGNED; - } - } else { // We've got trail surrogate. - if (leadSurrogate !== -1) { - uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); - leadSurrogate = -1; - } else { - // Incomplete surrogate pair - only trail surrogate found. - uCode = UNASSIGNED; - } - - } - } - else if (leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. - leadSurrogate = -1; - } - - // 2. Convert uCode character. - var dbcsCode = UNASSIGNED; - if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence - var resCode = seqObj[uCode]; - if (typeof resCode === 'object') { // Sequence continues. - seqObj = resCode; - continue; - - } else if (typeof resCode == 'number') { // Sequence finished. Write it. - dbcsCode = resCode; - - } else if (resCode == undefined) { // Current character is not part of the sequence. - - // Try default character for this sequence - resCode = seqObj[DEF_CHAR]; - if (resCode !== undefined) { - dbcsCode = resCode; // Found. Write it. - nextChar = uCode; // Current character will be written too in the next iteration. - - } else { - // TODO: What if we have no default? (resCode == undefined) - // Then, we should write first char of the sequence as-is and try the rest recursively. - // Didn't do it for now because no encoding has this situation yet. - // Currently, just skip the sequence and write current char. - } - } - seqObj = undefined; - } - else if (uCode >= 0) { // Regular character - var subtable = this.encodeTable[uCode >> 8]; - if (subtable !== undefined) - dbcsCode = subtable[uCode & 0xFF]; - - if (dbcsCode <= SEQ_START) { // Sequence start - seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; - continue; - } - - if (dbcsCode == UNASSIGNED && this.gb18030) { - // Use GB18030 algorithm to find character(s) to write. - var idx = findIdx(this.gb18030.uChars, uCode); - if (idx != -1) { - var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; - newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; - newBuf[j++] = 0x30 + dbcsCode; - continue; - } - } - } - - // 3. Write dbcsCode character. - if (dbcsCode === UNASSIGNED) - dbcsCode = this.defaultCharSingleByte; - - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else if (dbcsCode < 0x10000) { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - else if (dbcsCode < 0x1000000) { - newBuf[j++] = dbcsCode >> 16; - newBuf[j++] = (dbcsCode >> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } else { - newBuf[j++] = dbcsCode >>> 24; - newBuf[j++] = (dbcsCode >>> 16) & 0xFF; - newBuf[j++] = (dbcsCode >>> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } - } - - this.seqObj = seqObj; - this.leadSurrogate = leadSurrogate; - return newBuf.slice(0, j); -} - -DBCSEncoder.prototype.end = function() { - if (this.leadSurrogate === -1 && this.seqObj === undefined) - return; // All clean. Most often case. - - var newBuf = Buffer.alloc(10), j = 0; - - if (this.seqObj) { // We're in the sequence. - var dbcsCode = this.seqObj[DEF_CHAR]; - if (dbcsCode !== undefined) { // Write beginning of the sequence. - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - } else { - // See todo above. - } - this.seqObj = undefined; - } - - if (this.leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - newBuf[j++] = this.defaultCharSingleByte; - this.leadSurrogate = -1; - } - - return newBuf.slice(0, j); -} - -// Export for testing -DBCSEncoder.prototype.findIdx = findIdx; - - -// == Decoder ================================================================== - -function DBCSDecoder(options, codec) { - // Decoder state - this.nodeIdx = 0; - this.prevBytes = []; - - // Static data - this.decodeTables = codec.decodeTables; - this.decodeTableSeq = codec.decodeTableSeq; - this.defaultCharUnicode = codec.defaultCharUnicode; - this.gb18030 = codec.gb18030; -} - -DBCSDecoder.prototype.write = function(buf) { - var newBuf = Buffer.alloc(buf.length*2), - nodeIdx = this.nodeIdx, - prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, - seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence. - uCode; - - for (var i = 0, j = 0; i < buf.length; i++) { - var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset]; - - // Lookup in current trie node. - var uCode = this.decodeTables[nodeIdx][curByte]; - - if (uCode >= 0) { - // Normal character, just use it. - } - else if (uCode === UNASSIGNED) { // Unknown char. - // TODO: Callback with seq. - uCode = this.defaultCharUnicode.charCodeAt(0); - i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again. - } - else if (uCode === GB18030_CODE) { - if (i >= 3) { - var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30); - } else { - var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + - (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + - (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + - (curByte-0x30); - } - var idx = findIdx(this.gb18030.gbChars, ptr); - uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; - } - else if (uCode <= NODE_START) { // Go to next trie node. - nodeIdx = NODE_START - uCode; - continue; - } - else if (uCode <= SEQ_START) { // Output a sequence of chars. - var seq = this.decodeTableSeq[SEQ_START - uCode]; - for (var k = 0; k < seq.length - 1; k++) { - uCode = seq[k]; - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - } - uCode = seq[seq.length-1]; - } - else - throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); - - // Write the character to buffer, handling higher planes using surrogate pair. - if (uCode >= 0x10000) { - uCode -= 0x10000; - var uCodeLead = 0xD800 | (uCode >> 10); - newBuf[j++] = uCodeLead & 0xFF; - newBuf[j++] = uCodeLead >> 8; - - uCode = 0xDC00 | (uCode & 0x3FF); - } - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - - // Reset trie node. - nodeIdx = 0; seqStart = i+1; - } - - this.nodeIdx = nodeIdx; - this.prevBytes = (seqStart >= 0) - ? Array.prototype.slice.call(buf, seqStart) - : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); - - return newBuf.slice(0, j).toString('ucs2'); -} - -DBCSDecoder.prototype.end = function() { - var ret = ''; - - // Try to parse all remaining chars. - while (this.prevBytes.length > 0) { - // Skip 1 character in the buffer. - ret += this.defaultCharUnicode; - var bytesArr = this.prevBytes.slice(1); - - // Parse remaining as usual. - this.prevBytes = []; - this.nodeIdx = 0; - if (bytesArr.length > 0) - ret += this.write(bytesArr); - } - - this.prevBytes = []; - this.nodeIdx = 0; - return ret; -} - -// Binary search for GB18030. Returns largest i such that table[i] <= val. -function findIdx(table, val) { - if (table[0] > val) - return -1; - - var l = 0, r = table.length; - while (l < r-1) { // always table[l] <= val < table[r] - var mid = l + ((r-l+1) >> 1); - if (table[mid] <= val) - l = mid; - else - r = mid; - } - return l; -} - diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-data.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-data.js deleted file mode 100644 index 0d17e58..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-data.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; - -// Description of supported double byte encodings and aliases. -// Tables are not require()-d until they are needed to speed up library load. -// require()-s are direct to support Browserify. - -module.exports = { - - // == Japanese/ShiftJIS ==================================================== - // All japanese encodings are based on JIS X set of standards: - // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. - // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. - // Has several variations in 1978, 1983, 1990 and 1997. - // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. - // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. - // 2 planes, first is superset of 0208, second - revised 0212. - // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) - - // Byte encodings are: - // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte - // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. - // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. - // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. - // 0x00-0x7F - lower part of 0201 - // 0x8E, 0xA1-0xDF - upper part of 0201 - // (0xA1-0xFE)x2 - 0208 plane (94x94). - // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). - // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. - // Used as-is in ISO2022 family. - // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, - // 0201-1976 Roman, 0208-1978, 0208-1983. - // * ISO2022-JP-1: Adds esc seq for 0212-1990. - // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. - // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. - // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. - // - // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. - // - // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html - - 'shiftjis': { - type: '_dbcs', - table: function() { return require('./tables/shiftjis.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - encodeSkipVals: [{from: 0xED40, to: 0xF940}], - }, - 'csshiftjis': 'shiftjis', - 'mskanji': 'shiftjis', - 'sjis': 'shiftjis', - 'windows31j': 'shiftjis', - 'ms31j': 'shiftjis', - 'xsjis': 'shiftjis', - 'windows932': 'shiftjis', - 'ms932': 'shiftjis', - '932': 'shiftjis', - 'cp932': 'shiftjis', - - 'eucjp': { - type: '_dbcs', - table: function() { return require('./tables/eucjp.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - }, - - // TODO: KDDI extension to Shift_JIS - // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. - // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. - - - // == Chinese/GBK ========================================================== - // http://en.wikipedia.org/wiki/GBK - // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder - - // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 - 'gb2312': 'cp936', - 'gb231280': 'cp936', - 'gb23121980': 'cp936', - 'csgb2312': 'cp936', - 'csiso58gb231280': 'cp936', - 'euccn': 'cp936', - - // Microsoft's CP936 is a subset and approximation of GBK. - 'windows936': 'cp936', - 'ms936': 'cp936', - '936': 'cp936', - 'cp936': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json') }, - }, - - // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. - 'gbk': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - }, - 'xgbk': 'gbk', - 'isoir58': 'gbk', - - // GB18030 is an algorithmic extension of GBK. - // Main source: https://www.w3.org/TR/encoding/#gbk-encoder - // http://icu-project.org/docs/papers/gb18030.html - // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml - // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 - 'gb18030': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - gb18030: function() { return require('./tables/gb18030-ranges.json') }, - encodeSkipVals: [0x80], - encodeAdd: {'€': 0xA2E3}, - }, - - 'chinese': 'gb18030', - - - // == Korean =============================================================== - // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. - 'windows949': 'cp949', - 'ms949': 'cp949', - '949': 'cp949', - 'cp949': { - type: '_dbcs', - table: function() { return require('./tables/cp949.json') }, - }, - - 'cseuckr': 'cp949', - 'csksc56011987': 'cp949', - 'euckr': 'cp949', - 'isoir149': 'cp949', - 'korean': 'cp949', - 'ksc56011987': 'cp949', - 'ksc56011989': 'cp949', - 'ksc5601': 'cp949', - - - // == Big5/Taiwan/Hong Kong ================================================ - // There are lots of tables for Big5 and cp950. Please see the following links for history: - // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html - // Variations, in roughly number of defined chars: - // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT - // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ - // * Big5-2003 (Taiwan standard) almost superset of cp950. - // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. - // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. - // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. - // Plus, it has 4 combining sequences. - // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 - // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. - // Implementations are not consistent within browsers; sometimes labeled as just big5. - // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. - // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 - // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. - // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt - // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt - // - // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder - // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. - - 'windows950': 'cp950', - 'ms950': 'cp950', - '950': 'cp950', - 'cp950': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json') }, - }, - - // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. - 'big5': 'big5hkscs', - 'big5hkscs': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, - encodeSkipVals: [ - // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of - // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. - // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. - 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, - 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, - 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, - 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, - 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, - - // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 - 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce, - ], - }, - - 'cnbig5': 'big5hkscs', - 'csbig5': 'big5hkscs', - 'xxbig5': 'big5hkscs', -}; diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/index.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/index.js deleted file mode 100644 index d95c244..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/index.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -// Update this array if you add/rename/remove files in this directory. -// We support Browserify by skipping automatic module discovery and requiring modules directly. -var modules = [ - require("./internal"), - require("./utf32"), - require("./utf16"), - require("./utf7"), - require("./sbcs-codec"), - require("./sbcs-data"), - require("./sbcs-data-generated"), - require("./dbcs-codec"), - require("./dbcs-data"), -]; - -// Put all encoding/alias/codec definitions to single object and export it. -for (var i = 0; i < modules.length; i++) { - var module = modules[i]; - for (var enc in module) - if (Object.prototype.hasOwnProperty.call(module, enc)) - exports[enc] = module[enc]; -} diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/internal.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/internal.js deleted file mode 100644 index dc1074f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/internal.js +++ /dev/null @@ -1,198 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Export Node.js internal encodings. - -module.exports = { - // Encodings - utf8: { type: "_internal", bomAware: true}, - cesu8: { type: "_internal", bomAware: true}, - unicode11utf8: "utf8", - - ucs2: { type: "_internal", bomAware: true}, - utf16le: "ucs2", - - binary: { type: "_internal" }, - base64: { type: "_internal" }, - hex: { type: "_internal" }, - - // Codec. - _internal: InternalCodec, -}; - -//------------------------------------------------------------------------------ - -function InternalCodec(codecOptions, iconv) { - this.enc = codecOptions.encodingName; - this.bomAware = codecOptions.bomAware; - - if (this.enc === "base64") - this.encoder = InternalEncoderBase64; - else if (this.enc === "cesu8") { - this.enc = "utf8"; // Use utf8 for decoding. - this.encoder = InternalEncoderCesu8; - - // Add decoder for versions of Node not supporting CESU-8 - if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { - this.decoder = InternalDecoderCesu8; - this.defaultCharUnicode = iconv.defaultCharUnicode; - } - } -} - -InternalCodec.prototype.encoder = InternalEncoder; -InternalCodec.prototype.decoder = InternalDecoder; - -//------------------------------------------------------------------------------ - -// We use node.js internal decoder. Its signature is the same as ours. -var StringDecoder = require('string_decoder').StringDecoder; - -if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. - StringDecoder.prototype.end = function() {}; - - -function InternalDecoder(options, codec) { - this.decoder = new StringDecoder(codec.enc); -} - -InternalDecoder.prototype.write = function(buf) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer.from(buf); - } - - return this.decoder.write(buf); -} - -InternalDecoder.prototype.end = function() { - return this.decoder.end(); -} - - -//------------------------------------------------------------------------------ -// Encoder is mostly trivial - -function InternalEncoder(options, codec) { - this.enc = codec.enc; -} - -InternalEncoder.prototype.write = function(str) { - return Buffer.from(str, this.enc); -} - -InternalEncoder.prototype.end = function() { -} - - -//------------------------------------------------------------------------------ -// Except base64 encoder, which must keep its state. - -function InternalEncoderBase64(options, codec) { - this.prevStr = ''; -} - -InternalEncoderBase64.prototype.write = function(str) { - str = this.prevStr + str; - var completeQuads = str.length - (str.length % 4); - this.prevStr = str.slice(completeQuads); - str = str.slice(0, completeQuads); - - return Buffer.from(str, "base64"); -} - -InternalEncoderBase64.prototype.end = function() { - return Buffer.from(this.prevStr, "base64"); -} - - -//------------------------------------------------------------------------------ -// CESU-8 encoder is also special. - -function InternalEncoderCesu8(options, codec) { -} - -InternalEncoderCesu8.prototype.write = function(str) { - var buf = Buffer.alloc(str.length * 3), bufIdx = 0; - for (var i = 0; i < str.length; i++) { - var charCode = str.charCodeAt(i); - // Naive implementation, but it works because CESU-8 is especially easy - // to convert from UTF-16 (which all JS strings are encoded in). - if (charCode < 0x80) - buf[bufIdx++] = charCode; - else if (charCode < 0x800) { - buf[bufIdx++] = 0xC0 + (charCode >>> 6); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - else { // charCode will always be < 0x10000 in javascript. - buf[bufIdx++] = 0xE0 + (charCode >>> 12); - buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - } - return buf.slice(0, bufIdx); -} - -InternalEncoderCesu8.prototype.end = function() { -} - -//------------------------------------------------------------------------------ -// CESU-8 decoder is not implemented in Node v4.0+ - -function InternalDecoderCesu8(options, codec) { - this.acc = 0; - this.contBytes = 0; - this.accBytes = 0; - this.defaultCharUnicode = codec.defaultCharUnicode; -} - -InternalDecoderCesu8.prototype.write = function(buf) { - var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, - res = ''; - for (var i = 0; i < buf.length; i++) { - var curByte = buf[i]; - if ((curByte & 0xC0) !== 0x80) { // Leading byte - if (contBytes > 0) { // Previous code is invalid - res += this.defaultCharUnicode; - contBytes = 0; - } - - if (curByte < 0x80) { // Single-byte code - res += String.fromCharCode(curByte); - } else if (curByte < 0xE0) { // Two-byte code - acc = curByte & 0x1F; - contBytes = 1; accBytes = 1; - } else if (curByte < 0xF0) { // Three-byte code - acc = curByte & 0x0F; - contBytes = 2; accBytes = 1; - } else { // Four or more are not supported for CESU-8. - res += this.defaultCharUnicode; - } - } else { // Continuation byte - if (contBytes > 0) { // We're waiting for it. - acc = (acc << 6) | (curByte & 0x3f); - contBytes--; accBytes++; - if (contBytes === 0) { - // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) - if (accBytes === 2 && acc < 0x80 && acc > 0) - res += this.defaultCharUnicode; - else if (accBytes === 3 && acc < 0x800) - res += this.defaultCharUnicode; - else - // Actually add character. - res += String.fromCharCode(acc); - } - } else { // Unexpected continuation byte - res += this.defaultCharUnicode; - } - } - } - this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; - return res; -} - -InternalDecoderCesu8.prototype.end = function() { - var res = 0; - if (this.contBytes > 0) - res += this.defaultCharUnicode; - return res; -} diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-codec.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-codec.js deleted file mode 100644 index abac5ff..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-codec.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that -// correspond to encoded bytes (if 128 - then lower half is ASCII). - -exports._sbcs = SBCSCodec; -function SBCSCodec(codecOptions, iconv) { - if (!codecOptions) - throw new Error("SBCS codec is called without the data.") - - // Prepare char buffer for decoding. - if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) - throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); - - if (codecOptions.chars.length === 128) { - var asciiString = ""; - for (var i = 0; i < 128; i++) - asciiString += String.fromCharCode(i); - codecOptions.chars = asciiString + codecOptions.chars; - } - - this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); - - // Encoding buffer. - var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); - - for (var i = 0; i < codecOptions.chars.length; i++) - encodeBuf[codecOptions.chars.charCodeAt(i)] = i; - - this.encodeBuf = encodeBuf; -} - -SBCSCodec.prototype.encoder = SBCSEncoder; -SBCSCodec.prototype.decoder = SBCSDecoder; - - -function SBCSEncoder(options, codec) { - this.encodeBuf = codec.encodeBuf; -} - -SBCSEncoder.prototype.write = function(str) { - var buf = Buffer.alloc(str.length); - for (var i = 0; i < str.length; i++) - buf[i] = this.encodeBuf[str.charCodeAt(i)]; - - return buf; -} - -SBCSEncoder.prototype.end = function() { -} - - -function SBCSDecoder(options, codec) { - this.decodeBuf = codec.decodeBuf; -} - -SBCSDecoder.prototype.write = function(buf) { - // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. - var decodeBuf = this.decodeBuf; - var newBuf = Buffer.alloc(buf.length*2); - var idx1 = 0, idx2 = 0; - for (var i = 0; i < buf.length; i++) { - idx1 = buf[i]*2; idx2 = i*2; - newBuf[idx2] = decodeBuf[idx1]; - newBuf[idx2+1] = decodeBuf[idx1+1]; - } - return newBuf.toString('ucs2'); -} - -SBCSDecoder.prototype.end = function() { -} diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data-generated.js deleted file mode 100644 index 9b48236..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data-generated.js +++ /dev/null @@ -1,451 +0,0 @@ -"use strict"; - -// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. -module.exports = { - "437": "cp437", - "737": "cp737", - "775": "cp775", - "850": "cp850", - "852": "cp852", - "855": "cp855", - "856": "cp856", - "857": "cp857", - "858": "cp858", - "860": "cp860", - "861": "cp861", - "862": "cp862", - "863": "cp863", - "864": "cp864", - "865": "cp865", - "866": "cp866", - "869": "cp869", - "874": "windows874", - "922": "cp922", - "1046": "cp1046", - "1124": "cp1124", - "1125": "cp1125", - "1129": "cp1129", - "1133": "cp1133", - "1161": "cp1161", - "1162": "cp1162", - "1163": "cp1163", - "1250": "windows1250", - "1251": "windows1251", - "1252": "windows1252", - "1253": "windows1253", - "1254": "windows1254", - "1255": "windows1255", - "1256": "windows1256", - "1257": "windows1257", - "1258": "windows1258", - "28591": "iso88591", - "28592": "iso88592", - "28593": "iso88593", - "28594": "iso88594", - "28595": "iso88595", - "28596": "iso88596", - "28597": "iso88597", - "28598": "iso88598", - "28599": "iso88599", - "28600": "iso885910", - "28601": "iso885911", - "28603": "iso885913", - "28604": "iso885914", - "28605": "iso885915", - "28606": "iso885916", - "windows874": { - "type": "_sbcs", - "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "win874": "windows874", - "cp874": "windows874", - "windows1250": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "win1250": "windows1250", - "cp1250": "windows1250", - "windows1251": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "win1251": "windows1251", - "cp1251": "windows1251", - "windows1252": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "win1252": "windows1252", - "cp1252": "windows1252", - "windows1253": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "win1253": "windows1253", - "cp1253": "windows1253", - "windows1254": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "win1254": "windows1254", - "cp1254": "windows1254", - "windows1255": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "win1255": "windows1255", - "cp1255": "windows1255", - "windows1256": { - "type": "_sbcs", - "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" - }, - "win1256": "windows1256", - "cp1256": "windows1256", - "windows1257": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" - }, - "win1257": "windows1257", - "cp1257": "windows1257", - "windows1258": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "win1258": "windows1258", - "cp1258": "windows1258", - "iso88591": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28591": "iso88591", - "iso88592": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "cp28592": "iso88592", - "iso88593": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�ݰħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" - }, - "cp28593": "iso88593", - "iso88594": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤Ĩϧ¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩšēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖרŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" - }, - "cp28594": "iso88594", - "iso88595": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" - }, - "cp28595": "iso88595", - "iso88596": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" - }, - "cp28596": "iso88596", - "iso88597": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "cp28597": "iso88597", - "iso88598": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "cp28598": "iso88598", - "iso88599": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "cp28599": "iso88599", - "iso885910": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨͧĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" - }, - "cp28600": "iso885910", - "iso885911": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "cp28601": "iso885911", - "iso885913": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" - }, - "cp28603": "iso885913", - "iso885914": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" - }, - "cp28604": "iso885914", - "iso885915": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28605": "iso885915", - "iso885916": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Чš©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" - }, - "cp28606": "iso885916", - "cp437": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm437": "cp437", - "csibm437": "cp437", - "cp737": { - "type": "_sbcs", - "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " - }, - "ibm737": "cp737", - "csibm737": "cp737", - "cp775": { - "type": "_sbcs", - "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£Ø×¤ĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " - }, - "ibm775": "cp775", - "csibm775": "cp775", - "cp850": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm850": "cp850", - "csibm850": "cp850", - "cp852": { - "type": "_sbcs", - "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " - }, - "ibm852": "cp852", - "csibm852": "cp852", - "cp855": { - "type": "_sbcs", - "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " - }, - "ibm855": "cp855", - "csibm855": "cp855", - "cp856": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm856": "cp856", - "csibm856": "cp856", - "cp857": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " - }, - "ibm857": "cp857", - "csibm857": "cp857", - "cp858": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm858": "cp858", - "csibm858": "cp858", - "cp860": { - "type": "_sbcs", - "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm860": "cp860", - "csibm860": "cp860", - "cp861": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm861": "cp861", - "csibm861": "cp861", - "cp862": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm862": "cp862", - "csibm862": "cp862", - "cp863": { - "type": "_sbcs", - "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm863": "cp863", - "csibm863": "cp863", - "cp864": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" - }, - "ibm864": "cp864", - "csibm864": "cp864", - "cp865": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm865": "cp865", - "csibm865": "cp865", - "cp866": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " - }, - "ibm866": "cp866", - "csibm866": "cp866", - "cp869": { - "type": "_sbcs", - "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " - }, - "ibm869": "cp869", - "csibm869": "cp869", - "cp922": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖרÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" - }, - "ibm922": "cp922", - "csibm922": "cp922", - "cp1046": { - "type": "_sbcs", - "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" - }, - "ibm1046": "cp1046", - "csibm1046": "cp1046", - "cp1124": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" - }, - "ibm1124": "cp1124", - "csibm1124": "cp1124", - "cp1125": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " - }, - "ibm1125": "cp1125", - "csibm1125": "cp1125", - "cp1129": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1129": "cp1129", - "csibm1129": "cp1129", - "cp1133": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" - }, - "ibm1133": "cp1133", - "csibm1133": "cp1133", - "cp1161": { - "type": "_sbcs", - "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " - }, - "ibm1161": "cp1161", - "csibm1161": "cp1161", - "cp1162": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "ibm1162": "cp1162", - "csibm1162": "cp1162", - "cp1163": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1163": "cp1163", - "csibm1163": "cp1163", - "maccroatian": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" - }, - "maccyrillic": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "macgreek": { - "type": "_sbcs", - "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" - }, - "maciceland": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macroman": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macromania": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macthai": { - "type": "_sbcs", - "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" - }, - "macturkish": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macukraine": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "koi8r": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8u": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8ru": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8t": { - "type": "_sbcs", - "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "armscii8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" - }, - "rk1048": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "tcvn": { - "type": "_sbcs", - "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" - }, - "georgianacademy": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "georgianps": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "pt154": { - "type": "_sbcs", - "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "viscii": { - "type": "_sbcs", - "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" - }, - "iso646cn": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "iso646jp": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "hproman8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" - }, - "macintosh": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "ascii": { - "type": "_sbcs", - "chars": "��������������������������������������������������������������������������������������������������������������������������������" - }, - "tis620": { - "type": "_sbcs", - "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data.js deleted file mode 100644 index 066f904..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data.js +++ /dev/null @@ -1,179 +0,0 @@ -"use strict"; - -// Manually added data to be used by sbcs codec in addition to generated one. - -module.exports = { - // Not supported by iconv, not sure why. - "10029": "maccenteuro", - "maccenteuro": { - "type": "_sbcs", - "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" - }, - - "808": "cp808", - "ibm808": "cp808", - "cp808": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " - }, - - "mik": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - - "cp720": { - "type": "_sbcs", - "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" - }, - - // Aliases of generated encodings. - "ascii8bit": "ascii", - "usascii": "ascii", - "ansix34": "ascii", - "ansix341968": "ascii", - "ansix341986": "ascii", - "csascii": "ascii", - "cp367": "ascii", - "ibm367": "ascii", - "isoir6": "ascii", - "iso646us": "ascii", - "iso646irv": "ascii", - "us": "ascii", - - "latin1": "iso88591", - "latin2": "iso88592", - "latin3": "iso88593", - "latin4": "iso88594", - "latin5": "iso88599", - "latin6": "iso885910", - "latin7": "iso885913", - "latin8": "iso885914", - "latin9": "iso885915", - "latin10": "iso885916", - - "csisolatin1": "iso88591", - "csisolatin2": "iso88592", - "csisolatin3": "iso88593", - "csisolatin4": "iso88594", - "csisolatincyrillic": "iso88595", - "csisolatinarabic": "iso88596", - "csisolatingreek" : "iso88597", - "csisolatinhebrew": "iso88598", - "csisolatin5": "iso88599", - "csisolatin6": "iso885910", - - "l1": "iso88591", - "l2": "iso88592", - "l3": "iso88593", - "l4": "iso88594", - "l5": "iso88599", - "l6": "iso885910", - "l7": "iso885913", - "l8": "iso885914", - "l9": "iso885915", - "l10": "iso885916", - - "isoir14": "iso646jp", - "isoir57": "iso646cn", - "isoir100": "iso88591", - "isoir101": "iso88592", - "isoir109": "iso88593", - "isoir110": "iso88594", - "isoir144": "iso88595", - "isoir127": "iso88596", - "isoir126": "iso88597", - "isoir138": "iso88598", - "isoir148": "iso88599", - "isoir157": "iso885910", - "isoir166": "tis620", - "isoir179": "iso885913", - "isoir199": "iso885914", - "isoir203": "iso885915", - "isoir226": "iso885916", - - "cp819": "iso88591", - "ibm819": "iso88591", - - "cyrillic": "iso88595", - - "arabic": "iso88596", - "arabic8": "iso88596", - "ecma114": "iso88596", - "asmo708": "iso88596", - - "greek" : "iso88597", - "greek8" : "iso88597", - "ecma118" : "iso88597", - "elot928" : "iso88597", - - "hebrew": "iso88598", - "hebrew8": "iso88598", - - "turkish": "iso88599", - "turkish8": "iso88599", - - "thai": "iso885911", - "thai8": "iso885911", - - "celtic": "iso885914", - "celtic8": "iso885914", - "isoceltic": "iso885914", - - "tis6200": "tis620", - "tis62025291": "tis620", - "tis62025330": "tis620", - - "10000": "macroman", - "10006": "macgreek", - "10007": "maccyrillic", - "10079": "maciceland", - "10081": "macturkish", - - "cspc8codepage437": "cp437", - "cspc775baltic": "cp775", - "cspc850multilingual": "cp850", - "cspcp852": "cp852", - "cspc862latinhebrew": "cp862", - "cpgr": "cp869", - - "msee": "cp1250", - "mscyrl": "cp1251", - "msansi": "cp1252", - "msgreek": "cp1253", - "msturk": "cp1254", - "mshebr": "cp1255", - "msarab": "cp1256", - "winbaltrim": "cp1257", - - "cp20866": "koi8r", - "20866": "koi8r", - "ibm878": "koi8r", - "cskoi8r": "koi8r", - - "cp21866": "koi8u", - "21866": "koi8u", - "ibm1168": "koi8u", - - "strk10482002": "rk1048", - - "tcvn5712": "tcvn", - "tcvn57121": "tcvn", - - "gb198880": "iso646cn", - "cn": "iso646cn", - - "csiso14jisc6220ro": "iso646jp", - "jisc62201969ro": "iso646jp", - "jp": "iso646jp", - - "cshproman8": "hproman8", - "r8": "hproman8", - "roman8": "hproman8", - "xroman8": "hproman8", - "ibm1051": "hproman8", - - "mac": "macintosh", - "csmacintosh": "macintosh", -}; - diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/big5-added.json b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/big5-added.json deleted file mode 100644 index 3c3d3c2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/big5-added.json +++ /dev/null @@ -1,122 +0,0 @@ -[ -["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"], -["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"], -["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"], -["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"], -["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"], -["8940","𪎩𡅅"], -["8943","攊"], -["8946","丽滝鵎釟"], -["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"], -["89a1","琑糼緍楆竉刧"], -["89ab","醌碸酞肼"], -["89b0","贋胶𠧧"], -["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"], -["89c1","溚舾甙"], -["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"], -["8a40","𧶄唥"], -["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"], -["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"], -["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"], -["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"], -["8aac","䠋𠆩㿺塳𢶍"], -["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"], -["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"], -["8ac9","𪘁𠸉𢫏𢳉"], -["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"], -["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"], -["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"], -["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"], -["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"], -["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"], -["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"], -["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"], -["8ca1","𣏹椙橃𣱣泿"], -["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"], -["8cc9","顨杫䉶圽"], -["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"], -["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"], -["8d40","𠮟"], -["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"], -["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"], -["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"], -["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"], -["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"], -["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"], -["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"], -["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"], -["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"], -["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"], -["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"], -["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"], -["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"], -["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"], -["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"], -["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"], -["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"], -["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"], -["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"], -["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"], -["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"], -["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"], -["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"], -["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"], -["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"], -["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"], -["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"], -["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"], -["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"], -["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"], -["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"], -["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"], -["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"], -["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"], -["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"], -["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"], -["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"], -["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"], -["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"], -["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"], -["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"], -["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"], -["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"], -["9fae","酙隁酜"], -["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"], -["9fc1","𤤙盖鮝个𠳔莾衂"], -["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"], -["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"], -["9fe7","毺蠘罸"], -["9feb","嘠𪙊蹷齓"], -["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"], -["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"], -["a055","𡠻𦸅"], -["a058","詾𢔛"], -["a05b","惽癧髗鵄鍮鮏蟵"], -["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"], -["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"], -["a0a1","嵗𨯂迚𨸹"], -["a0a6","僙𡵆礆匲阸𠼻䁥"], -["a0ae","矾"], -["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"], -["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"], -["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"], -["a3c0","␀",31,"␡"], -["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23], -["c740","す",58,"ァアィイ"], -["c7a1","ゥ",81,"А",5,"ЁЖ",4], -["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"], -["c8a1","龰冈龱𧘇"], -["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"], -["c8f5","ʃɐɛɔɵœøŋʊɪ"], -["f9fe","■"], -["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"], -["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"], -["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"], -["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"], -["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"], -["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"], -["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"], -["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"], -["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"], -["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"] -] diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp936.json b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp936.json deleted file mode 100644 index 49ddb9a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp936.json +++ /dev/null @@ -1,264 +0,0 @@ -[ -["0","\u0000",127,"€"], -["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"], -["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"], -["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11], -["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"], -["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"], -["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5], -["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"], -["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"], -["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"], -["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"], -["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"], -["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"], -["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4], -["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6], -["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"], -["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7], -["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"], -["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"], -["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"], -["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5], -["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"], -["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6], -["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"], -["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4], -["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4], -["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"], -["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"], -["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6], -["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"], -["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"], -["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"], -["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6], -["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"], -["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"], -["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"], -["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"], -["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"], -["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"], -["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8], -["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"], -["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"], -["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"], -["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"], -["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5], -["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"], -["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"], -["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"], -["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"], -["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5], -["9980","檧檨檪檭",114,"欥欦欨",6], -["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"], -["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"], -["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"], -["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"], -["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"], -["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5], -["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"], -["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"], -["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6], -["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"], -["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"], -["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4], -["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19], -["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"], -["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"], -["a2a1","ⅰ",9], -["a2b1","⒈",19,"⑴",19,"①",9], -["a2e5","㈠",9], -["a2f1","Ⅰ",11], -["a3a1","!"#¥%",88," ̄"], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"], -["a6ee","︻︼︷︸︱"], -["a6f4","︳︴"], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6], -["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"], -["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"], -["a8bd","ńň"], -["a8c0","ɡ"], -["a8c5","ㄅ",36], -["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"], -["a959","℡㈱"], -["a95c","‐"], -["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8], -["a980","﹢",4,"﹨﹩﹪﹫"], -["a996","〇"], -["a9a4","─",75], -["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8], -["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"], -["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4], -["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4], -["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11], -["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"], -["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12], -["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"], -["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"], -["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"], -["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"], -["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"], -["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"], -["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"], -["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"], -["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"], -["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4], -["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"], -["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"], -["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"], -["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9], -["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"], -["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"], -["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"], -["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"], -["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"], -["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16], -["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"], -["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"], -["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"], -["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"], -["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"], -["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"], -["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"], -["bb40","籃",9,"籎",36,"籵",5,"籾",9], -["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"], -["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5], -["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"], -["bd40","紷",54,"絯",7], -["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"], -["be40","継",12,"綧",6,"綯",42], -["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"], -["bf40","緻",62], -["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"], -["c040","繞",35,"纃",23,"纜纝纞"], -["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"], -["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"], -["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"], -["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"], -["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"], -["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"], -["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"], -["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"], -["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"], -["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"], -["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"], -["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"], -["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"], -["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"], -["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"], -["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"], -["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"], -["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"], -["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"], -["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10], -["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"], -["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"], -["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"], -["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"], -["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"], -["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"], -["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"], -["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"], -["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"], -["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9], -["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"], -["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"], -["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"], -["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5], -["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"], -["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"], -["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"], -["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6], -["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"], -["d440","訞",31,"訿",8,"詉",21], -["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"], -["d540","誁",7,"誋",7,"誔",46], -["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"], -["d640","諤",34,"謈",27], -["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"], -["d740","譆",31,"譧",4,"譭",25], -["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"], -["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"], -["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"], -["d940","貮",62], -["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"], -["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"], -["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"], -["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"], -["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"], -["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7], -["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"], -["dd40","軥",62], -["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"], -["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"], -["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"], -["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"], -["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"], -["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"], -["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"], -["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"], -["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"], -["e240","釦",62], -["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"], -["e340","鉆",45,"鉵",16], -["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"], -["e440","銨",5,"銯",24,"鋉",31], -["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"], -["e540","錊",51,"錿",10], -["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"], -["e640","鍬",34,"鎐",27], -["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"], -["e740","鏎",7,"鏗",54], -["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"], -["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"], -["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"], -["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42], -["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"], -["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"], -["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"], -["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"], -["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"], -["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7], -["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"], -["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46], -["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"], -["ee40","頏",62], -["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"], -["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4], -["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"], -["f040","餈",4,"餎餏餑",28,"餯",26], -["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"], -["f140","馌馎馚",10,"馦馧馩",47], -["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"], -["f240","駺",62], -["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"], -["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"], -["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"], -["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5], -["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"], -["f540","魼",62], -["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"], -["f640","鯜",62], -["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"], -["f740","鰼",62], -["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"], -["f840","鳣",62], -["f880","鴢",32], -["f940","鵃",62], -["f980","鶂",32], -["fa40","鶣",62], -["fa80","鷢",32], -["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"], -["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"], -["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6], -["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"], -["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38], -["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"], -["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"] -] diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp949.json b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp949.json deleted file mode 100644 index 2022a00..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp949.json +++ /dev/null @@ -1,273 +0,0 @@ -[ -["0","\u0000",127], -["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"], -["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"], -["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"], -["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5], -["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"], -["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18], -["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7], -["8361","긝",18,"긲긳긵긶긹긻긼"], -["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8], -["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8], -["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18], -["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"], -["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4], -["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"], -["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"], -["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"], -["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10], -["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"], -["8741","놞",9,"놩",15], -["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"], -["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4], -["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4], -["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"], -["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"], -["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"], -["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"], -["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15], -["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"], -["8a61","둧",4,"둭",18,"뒁뒂"], -["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"], -["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"], -["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8], -["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18], -["8c41","똀",15,"똒똓똕똖똗똙",4], -["8c61","똞",6,"똦",5,"똭",6,"똵",5], -["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16], -["8d41","뛃",16,"뛕",8], -["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"], -["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"], -["8e41","랟랡",6,"랪랮",5,"랶랷랹",8], -["8e61","럂",4,"럈럊",19], -["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7], -["8f41","뢅",7,"뢎",17], -["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4], -["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5], -["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"], -["9061","륾",5,"릆릈릋릌릏",15], -["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"], -["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5], -["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5], -["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6], -["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"], -["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4], -["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"], -["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"], -["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8], -["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"], -["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8], -["9461","봞",5,"봥",6,"봭",12], -["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24], -["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"], -["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"], -["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14], -["9641","뺸",23,"뻒뻓"], -["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8], -["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44], -["9741","뾃",16,"뾕",8], -["9761","뾞",17,"뾱",7], -["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"], -["9841","쁀",16,"쁒",5,"쁙쁚쁛"], -["9861","쁝쁞쁟쁡",6,"쁪",15], -["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"], -["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"], -["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"], -["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"], -["9a41","숤숥숦숧숪숬숮숰숳숵",16], -["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"], -["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"], -["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8], -["9b61","쌳",17,"썆",7], -["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"], -["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5], -["9c61","쏿",8,"쐉",6,"쐑",9], -["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12], -["9d41","쒪",13,"쒹쒺쒻쒽",8], -["9d61","쓆",25], -["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"], -["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"], -["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"], -["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"], -["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"], -["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"], -["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"], -["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"], -["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13], -["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"], -["a141","좥좦좧좩",18,"좾좿죀죁"], -["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"], -["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"], -["a241","줐줒",5,"줙",18], -["a261","줭",6,"줵",18], -["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"], -["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"], -["a361","즑",6,"즚즜즞",16], -["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"], -["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"], -["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12], -["a481","쨦쨧쨨쨪",28,"ㄱ",93], -["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"], -["a561","쩫",17,"쩾",5,"쪅쪆"], -["a581","쪇",16,"쪙",14,"ⅰ",9], -["a5b0","Ⅰ",9], -["a5c1","Α",16,"Σ",6], -["a5e1","α",16,"σ",6], -["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"], -["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6], -["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7], -["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7], -["a761","쬪",22,"쭂쭃쭄"], -["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"], -["a841","쭭",10,"쭺",14], -["a861","쮉",18,"쮝",6], -["a881","쮤",19,"쮹",11,"ÆÐªĦ"], -["a8a6","IJ"], -["a8a8","ĿŁØŒºÞŦŊ"], -["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"], -["a941","쯅",14,"쯕",10], -["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18], -["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"], -["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"], -["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"], -["aa81","챳챴챶",29,"ぁ",82], -["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"], -["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5], -["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85], -["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"], -["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4], -["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25], -["acd1","а",5,"ёж",25], -["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7], -["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"], -["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"], -["ae41","췆",5,"췍췎췏췑",16], -["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4], -["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"], -["af41","츬츭츮츯츲츴츶",19], -["af61","칊",13,"칚칛칝칞칢",5,"칪칬"], -["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"], -["b041","캚",5,"캢캦",5,"캮",12], -["b061","캻",5,"컂",19], -["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"], -["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"], -["b161","켥",6,"켮켲",5,"켹",11], -["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"], -["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"], -["b261","쾎",18,"쾢",5,"쾩"], -["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"], -["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"], -["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5], -["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"], -["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5], -["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"], -["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"], -["b541","킕",14,"킦킧킩킪킫킭",5], -["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4], -["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"], -["b641","턅",7,"턎",17], -["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"], -["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"], -["b741","텮",13,"텽",6,"톅톆톇톉톊"], -["b761","톋",20,"톢톣톥톦톧"], -["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"], -["b841","퇐",7,"퇙",17], -["b861","퇫",8,"퇵퇶퇷퇹",13], -["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"], -["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"], -["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"], -["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"], -["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"], -["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5], -["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"], -["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"], -["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"], -["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"], -["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"], -["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"], -["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"], -["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"], -["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13], -["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"], -["be41","퐸",7,"푁푂푃푅",14], -["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"], -["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"], -["bf41","풞",10,"풪",14], -["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"], -["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"], -["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5], -["c061","픞",25], -["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"], -["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"], -["c161","햌햍햎햏햑",19,"햦햧"], -["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"], -["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"], -["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"], -["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"], -["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4], -["c361","홢",4,"홨홪",5,"홲홳홵",11], -["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"], -["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"], -["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4], -["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"], -["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"], -["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4], -["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"], -["c641","힍힎힏힑",6,"힚힜힞",5], -["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"], -["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"], -["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"], -["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"], -["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"], -["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"], -["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"], -["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"], -["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"], -["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"], -["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"], -["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"], -["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"], -["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"], -["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"], -["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"], -["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"], -["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"], -["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"], -["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"], -["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"], -["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"], -["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"], -["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"], -["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"], -["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"], -["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"], -["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"], -["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"], -["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"], -["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"], -["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"], -["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"], -["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"], -["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"], -["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"], -["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"], -["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"], -["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"], -["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"], -["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"], -["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"], -["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"], -["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"], -["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"], -["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"], -["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"], -["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"], -["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"], -["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"], -["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"], -["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"], -["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"], -["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"], -["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"] -] diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp950.json b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp950.json deleted file mode 100644 index d8bc871..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp950.json +++ /dev/null @@ -1,177 +0,0 @@ -[ -["0","\u0000",127], -["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"], -["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"], -["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"], -["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21], -["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10], -["a3a1","ㄐ",25,"˙ˉˊˇˋ"], -["a3e1","€"], -["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"], -["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"], -["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"], -["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"], -["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"], -["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"], -["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"], -["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"], -["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"], -["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"], -["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"], -["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"], -["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"], -["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"], -["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"], -["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"], -["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"], -["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"], -["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"], -["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"], -["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"], -["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"], -["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"], -["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"], -["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"], -["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"], -["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"], -["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"], -["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"], -["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"], -["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"], -["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"], -["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"], -["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"], -["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"], -["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"], -["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"], -["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"], -["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"], -["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"], -["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"], -["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"], -["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"], -["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"], -["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"], -["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"], -["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"], -["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"], -["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"], -["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"], -["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"], -["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"], -["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"], -["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"], -["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"], -["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"], -["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"], -["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"], -["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"], -["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"], -["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"], -["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"], -["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"], -["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"], -["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"], -["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"], -["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"], -["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"], -["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"], -["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"], -["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"], -["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"], -["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"], -["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"], -["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"], -["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"], -["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"], -["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"], -["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"], -["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"], -["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"], -["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"], -["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"], -["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"], -["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"], -["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"], -["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"], -["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"], -["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"], -["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"], -["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"], -["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"], -["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"], -["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"], -["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"], -["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"], -["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"], -["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"], -["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"], -["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"], -["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"], -["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"], -["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"], -["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"], -["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"], -["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"], -["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"], -["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"], -["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"], -["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"], -["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"], -["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"], -["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"], -["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"], -["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"], -["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"], -["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"], -["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"], -["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"], -["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"], -["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"], -["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"], -["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"], -["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"], -["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"], -["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"], -["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"], -["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"], -["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"], -["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"], -["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"], -["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"], -["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"], -["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"], -["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"], -["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"], -["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"], -["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"], -["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"], -["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"], -["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"], -["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"], -["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"], -["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"], -["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"], -["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"], -["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"], -["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"], -["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"], -["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"], -["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"], -["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"], -["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"], -["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"], -["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"], -["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"], -["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"], -["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"], -["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"], -["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"], -["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"], -["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"], -["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"], -["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"], -["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"], -["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"], -["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"] -] diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/eucjp.json b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/eucjp.json deleted file mode 100644 index 4fa61ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/eucjp.json +++ /dev/null @@ -1,182 +0,0 @@ -[ -["0","\u0000",127], -["8ea1","。",62], -["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"], -["a2a1","◆□■△▲▽▼※〒→←↑↓〓"], -["a2ba","∈∋⊆⊇⊂⊃∪∩"], -["a2ca","∧∨¬⇒⇔∀∃"], -["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["a2f2","ʼn♯♭♪†‡¶"], -["a2fe","◯"], -["a3b0","0",9], -["a3c1","A",25], -["a3e1","a",25], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["ada1","①",19,"Ⅰ",9], -["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"], -["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"], -["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"], -["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"], -["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"], -["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"], -["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"], -["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"], -["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"], -["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"], -["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"], -["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"], -["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"], -["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"], -["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"], -["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"], -["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"], -["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"], -["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"], -["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"], -["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"], -["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"], -["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"], -["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"], -["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"], -["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"], -["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"], -["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"], -["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"], -["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"], -["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"], -["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"], -["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"], -["f4a1","堯槇遙瑤凜熙"], -["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"], -["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"], -["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["fcf1","ⅰ",9,"¬¦'""], -["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"], -["8fa2c2","¡¦¿"], -["8fa2eb","ºª©®™¤№"], -["8fa6e1","ΆΈΉΊΪ"], -["8fa6e7","Ό"], -["8fa6e9","ΎΫ"], -["8fa6ec","Ώ"], -["8fa6f1","άέήίϊΐόςύϋΰώ"], -["8fa7c2","Ђ",10,"ЎЏ"], -["8fa7f2","ђ",10,"ўџ"], -["8fa9a1","ÆĐ"], -["8fa9a4","Ħ"], -["8fa9a6","IJ"], -["8fa9a8","ŁĿ"], -["8fa9ab","ŊØŒ"], -["8fa9af","ŦÞ"], -["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"], -["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"], -["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"], -["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"], -["8fabbd","ġĥíìïîǐ"], -["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"], -["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"], -["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"], -["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"], -["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"], -["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"], -["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"], -["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"], -["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"], -["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"], -["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"], -["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"], -["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"], -["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"], -["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"], -["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"], -["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"], -["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"], -["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"], -["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"], -["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"], -["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"], -["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"], -["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"], -["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"], -["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"], -["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"], -["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"], -["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"], -["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"], -["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"], -["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"], -["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"], -["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"], -["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"], -["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5], -["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"], -["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"], -["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"], -["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"], -["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"], -["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"], -["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"], -["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"], -["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"], -["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"], -["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"], -["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"], -["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"], -["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"], -["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"], -["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"], -["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"], -["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"], -["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"], -["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"], -["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"], -["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"], -["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4], -["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"], -["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"], -["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"], -["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"] -] diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json deleted file mode 100644 index 85c6934..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gbk-added.json b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gbk-added.json deleted file mode 100644 index b742e36..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gbk-added.json +++ /dev/null @@ -1,56 +0,0 @@ -[ -["a140","",62], -["a180","",32], -["a240","",62], -["a280","",32], -["a2ab","",5], -["a2e3","€"], -["a2ef",""], -["a2fd",""], -["a340","",62], -["a380","",31," "], -["a440","",62], -["a480","",32], -["a4f4","",10], -["a540","",62], -["a580","",32], -["a5f7","",7], -["a640","",62], -["a680","",32], -["a6b9","",7], -["a6d9","",6], -["a6ec",""], -["a6f3",""], -["a6f6","",8], -["a740","",62], -["a780","",32], -["a7c2","",14], -["a7f2","",12], -["a896","",10], -["a8bc","ḿ"], -["a8bf","ǹ"], -["a8c1",""], -["a8ea","",20], -["a958",""], -["a95b",""], -["a95d",""], -["a989","〾⿰",11], -["a997","",12], -["a9f0","",14], -["aaa1","",93], -["aba1","",93], -["aca1","",93], -["ada1","",93], -["aea1","",93], -["afa1","",93], -["d7fa","",4], -["f8a1","",93], -["f9a1","",93], -["faa1","",93], -["fba1","",93], -["fca1","",93], -["fda1","",93], -["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], -["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93], -["8135f437",""] -] diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/shiftjis.json b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/shiftjis.json deleted file mode 100644 index 5a3a43c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/shiftjis.json +++ /dev/null @@ -1,125 +0,0 @@ -[ -["0","\u0000",128], -["a1","。",62], -["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"], -["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"], -["81b8","∈∋⊆⊇⊂⊃∪∩"], -["81c8","∧∨¬⇒⇔∀∃"], -["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["81f0","ʼn♯♭♪†‡¶"], -["81fc","◯"], -["824f","0",9], -["8260","A",25], -["8281","a",25], -["829f","ぁ",82], -["8340","ァ",62], -["8380","ム",22], -["839f","Α",16,"Σ",6], -["83bf","α",16,"σ",6], -["8440","А",5,"ЁЖ",25], -["8470","а",5,"ёж",7], -["8480","о",17], -["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["8740","①",19,"Ⅰ",9], -["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["877e","㍻"], -["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"], -["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"], -["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"], -["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"], -["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"], -["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"], -["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"], -["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"], -["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"], -["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"], -["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"], -["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"], -["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"], -["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"], -["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"], -["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"], -["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"], -["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"], -["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"], -["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"], -["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"], -["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"], -["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"], -["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"], -["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"], -["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"], -["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"], -["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"], -["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"], -["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"], -["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"], -["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"], -["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"], -["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"], -["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"], -["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"], -["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["eeef","ⅰ",9,"¬¦'""], -["f040","",62], -["f080","",124], -["f140","",62], -["f180","",124], -["f240","",62], -["f280","",124], -["f340","",62], -["f380","",124], -["f440","",62], -["f480","",124], -["f540","",62], -["f580","",124], -["f640","",62], -["f680","",124], -["f740","",62], -["f780","",124], -["f840","",62], -["f880","",124], -["f940",""], -["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"], -["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"], -["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"], -["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"], -["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"] -] diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf16.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf16.js deleted file mode 100644 index 97d0669..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf16.js +++ /dev/null @@ -1,197 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js - -// == UTF16-BE codec. ========================================================== - -exports.utf16be = Utf16BECodec; -function Utf16BECodec() { -} - -Utf16BECodec.prototype.encoder = Utf16BEEncoder; -Utf16BECodec.prototype.decoder = Utf16BEDecoder; -Utf16BECodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf16BEEncoder() { -} - -Utf16BEEncoder.prototype.write = function(str) { - var buf = Buffer.from(str, 'ucs2'); - for (var i = 0; i < buf.length; i += 2) { - var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; - } - return buf; -} - -Utf16BEEncoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf16BEDecoder() { - this.overflowByte = -1; -} - -Utf16BEDecoder.prototype.write = function(buf) { - if (buf.length == 0) - return ''; - - var buf2 = Buffer.alloc(buf.length + 1), - i = 0, j = 0; - - if (this.overflowByte !== -1) { - buf2[0] = buf[0]; - buf2[1] = this.overflowByte; - i = 1; j = 2; - } - - for (; i < buf.length-1; i += 2, j+= 2) { - buf2[j] = buf[i+1]; - buf2[j+1] = buf[i]; - } - - this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; - - return buf2.slice(0, j).toString('ucs2'); -} - -Utf16BEDecoder.prototype.end = function() { - this.overflowByte = -1; -} - - -// == UTF-16 codec ============================================================= -// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. -// Defaults to UTF-16LE, as it's prevalent and default in Node. -// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le -// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); - -// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). - -exports.utf16 = Utf16Codec; -function Utf16Codec(codecOptions, iconv) { - this.iconv = iconv; -} - -Utf16Codec.prototype.encoder = Utf16Encoder; -Utf16Codec.prototype.decoder = Utf16Decoder; - - -// -- Encoding (pass-through) - -function Utf16Encoder(options, codec) { - options = options || {}; - if (options.addBOM === undefined) - options.addBOM = true; - this.encoder = codec.iconv.getEncoder('utf-16le', options); -} - -Utf16Encoder.prototype.write = function(str) { - return this.encoder.write(str); -} - -Utf16Encoder.prototype.end = function() { - return this.encoder.end(); -} - - -// -- Decoding - -function Utf16Decoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf16Decoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - - if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.write(buf); -} - -Utf16Decoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - var trail = this.decoder.end(); - if (trail) - resStr += trail; - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - return this.decoder.end(); -} - -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE. - - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 2) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le'; - if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be'; - } - - if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; - if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; - - b.length = 0; - charsProcessed++; - - if (charsProcessed >= 100) { - break outer_loop; - } - } - } - } - - // Make decisions. - // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. - // So, we count ASCII as if it was LE or BE, and decide from that. - if (asciiCharsBE > asciiCharsLE) return 'utf-16be'; - if (asciiCharsBE < asciiCharsLE) return 'utf-16le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-16le'; -} - - diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf32.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf32.js deleted file mode 100644 index 2fa900a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf32.js +++ /dev/null @@ -1,319 +0,0 @@ -'use strict'; - -var Buffer = require('safer-buffer').Buffer; - -// == UTF32-LE/BE codec. ========================================================== - -exports._utf32 = Utf32Codec; - -function Utf32Codec(codecOptions, iconv) { - this.iconv = iconv; - this.bomAware = true; - this.isLE = codecOptions.isLE; -} - -exports.utf32le = { type: '_utf32', isLE: true }; -exports.utf32be = { type: '_utf32', isLE: false }; - -// Aliases -exports.ucs4le = 'utf32le'; -exports.ucs4be = 'utf32be'; - -Utf32Codec.prototype.encoder = Utf32Encoder; -Utf32Codec.prototype.decoder = Utf32Decoder; - -// -- Encoding - -function Utf32Encoder(options, codec) { - this.isLE = codec.isLE; - this.highSurrogate = 0; -} - -Utf32Encoder.prototype.write = function(str) { - var src = Buffer.from(str, 'ucs2'); - var dst = Buffer.alloc(src.length * 2); - var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE; - var offset = 0; - - for (var i = 0; i < src.length; i += 2) { - var code = src.readUInt16LE(i); - var isHighSurrogate = (0xD800 <= code && code < 0xDC00); - var isLowSurrogate = (0xDC00 <= code && code < 0xE000); - - if (this.highSurrogate) { - if (isHighSurrogate || !isLowSurrogate) { - // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low - // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character - // (technically wrong, but expected by some applications, like Windows file names). - write32.call(dst, this.highSurrogate, offset); - offset += 4; - } - else { - // Create 32-bit value from high and low surrogates; - var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000; - - write32.call(dst, codepoint, offset); - offset += 4; - this.highSurrogate = 0; - - continue; - } - } - - if (isHighSurrogate) - this.highSurrogate = code; - else { - // Even if the current character is a low surrogate, with no previous high surrogate, we'll - // encode it as a semi-invalid stand-alone character for the same reasons expressed above for - // unpaired high surrogates. - write32.call(dst, code, offset); - offset += 4; - this.highSurrogate = 0; - } - } - - if (offset < dst.length) - dst = dst.slice(0, offset); - - return dst; -}; - -Utf32Encoder.prototype.end = function() { - // Treat any leftover high surrogate as a semi-valid independent character. - if (!this.highSurrogate) - return; - - var buf = Buffer.alloc(4); - - if (this.isLE) - buf.writeUInt32LE(this.highSurrogate, 0); - else - buf.writeUInt32BE(this.highSurrogate, 0); - - this.highSurrogate = 0; - - return buf; -}; - -// -- Decoding - -function Utf32Decoder(options, codec) { - this.isLE = codec.isLE; - this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0); - this.overflow = []; -} - -Utf32Decoder.prototype.write = function(src) { - if (src.length === 0) - return ''; - - var i = 0; - var codepoint = 0; - var dst = Buffer.alloc(src.length + 4); - var offset = 0; - var isLE = this.isLE; - var overflow = this.overflow; - var badChar = this.badChar; - - if (overflow.length > 0) { - for (; i < src.length && overflow.length < 4; i++) - overflow.push(src[i]); - - if (overflow.length === 4) { - // NOTE: codepoint is a signed int32 and can be negative. - // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer). - if (isLE) { - codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24); - } else { - codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24); - } - overflow.length = 0; - - offset = _writeCodepoint(dst, offset, codepoint, badChar); - } - } - - // Main loop. Should be as optimized as possible. - for (; i < src.length - 3; i += 4) { - // NOTE: codepoint is a signed int32 and can be negative. - if (isLE) { - codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24); - } else { - codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24); - } - offset = _writeCodepoint(dst, offset, codepoint, badChar); - } - - // Keep overflowing bytes. - for (; i < src.length; i++) { - overflow.push(src[i]); - } - - return dst.slice(0, offset).toString('ucs2'); -}; - -function _writeCodepoint(dst, offset, codepoint, badChar) { - // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations. - if (codepoint < 0 || codepoint > 0x10FFFF) { - // Not a valid Unicode codepoint - codepoint = badChar; - } - - // Ephemeral Planes: Write high surrogate. - if (codepoint >= 0x10000) { - codepoint -= 0x10000; - - var high = 0xD800 | (codepoint >> 10); - dst[offset++] = high & 0xff; - dst[offset++] = high >> 8; - - // Low surrogate is written below. - var codepoint = 0xDC00 | (codepoint & 0x3FF); - } - - // Write BMP char or low surrogate. - dst[offset++] = codepoint & 0xff; - dst[offset++] = codepoint >> 8; - - return offset; -}; - -Utf32Decoder.prototype.end = function() { - this.overflow.length = 0; -}; - -// == UTF-32 Auto codec ============================================================= -// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic. -// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32 -// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'}); - -// Encoder prepends BOM (which can be overridden with (addBOM: false}). - -exports.utf32 = Utf32AutoCodec; -exports.ucs4 = 'utf32'; - -function Utf32AutoCodec(options, iconv) { - this.iconv = iconv; -} - -Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder; -Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; - -// -- Encoding - -function Utf32AutoEncoder(options, codec) { - options = options || {}; - - if (options.addBOM === undefined) - options.addBOM = true; - - this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options); -} - -Utf32AutoEncoder.prototype.write = function(str) { - return this.encoder.write(str); -}; - -Utf32AutoEncoder.prototype.end = function() { - return this.encoder.end(); -}; - -// -- Decoding - -function Utf32AutoDecoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf32AutoDecoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - - if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.write(buf); -}; - -Utf32AutoDecoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - var trail = this.decoder.end(); - if (trail) - resStr += trail; - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.end(); -}; - -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE. - var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE. - - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 4) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) { - return 'utf-32le'; - } - if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) { - return 'utf-32be'; - } - } - - if (b[0] !== 0 || b[1] > 0x10) invalidBE++; - if (b[3] !== 0 || b[2] > 0x10) invalidLE++; - - if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++; - if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++; - - b.length = 0; - charsProcessed++; - - if (charsProcessed >= 100) { - break outer_loop; - } - } - } - } - - // Make decisions. - if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be'; - if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-32le'; -} diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf7.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf7.js deleted file mode 100644 index eacae34..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf7.js +++ /dev/null @@ -1,290 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 -// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 - -exports.utf7 = Utf7Codec; -exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 -function Utf7Codec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7Codec.prototype.encoder = Utf7Encoder; -Utf7Codec.prototype.decoder = Utf7Decoder; -Utf7Codec.prototype.bomAware = true; - - -// -- Encoding - -var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; - -function Utf7Encoder(options, codec) { - this.iconv = codec.iconv; -} - -Utf7Encoder.prototype.write = function(str) { - // Naive implementation. - // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". - return Buffer.from(str.replace(nonDirectChars, function(chunk) { - return "+" + (chunk === '+' ? '' : - this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) - + "-"; - }.bind(this))); -} - -Utf7Encoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf7Decoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64Regex = /[A-Za-z0-9\/+]/; -var base64Chars = []; -for (var i = 0; i < 256; i++) - base64Chars[i] = base64Regex.test(String.fromCharCode(i)); - -var plusChar = '+'.charCodeAt(0), - minusChar = '-'.charCodeAt(0), - andChar = '&'.charCodeAt(0); - -Utf7Decoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '+' - if (buf[i] == plusChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64Chars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" - res += "+"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus is absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7Decoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - -// UTF-7-IMAP codec. -// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) -// Differences: -// * Base64 part is started by "&" instead of "+" -// * Direct characters are 0x20-0x7E, except "&" (0x26) -// * In Base64, "," is used instead of "/" -// * Base64 must not be used to represent direct characters. -// * No implicit shift back from Base64 (should always end with '-') -// * String must end in non-shifted position. -// * "-&" while in base64 is not allowed. - - -exports.utf7imap = Utf7IMAPCodec; -function Utf7IMAPCodec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; -Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; -Utf7IMAPCodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf7IMAPEncoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = Buffer.alloc(6); - this.base64AccumIdx = 0; -} - -Utf7IMAPEncoder.prototype.write = function(str) { - var inBase64 = this.inBase64, - base64Accum = this.base64Accum, - base64AccumIdx = this.base64AccumIdx, - buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; - - for (var i = 0; i < str.length; i++) { - var uChar = str.charCodeAt(i); - if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. - if (inBase64) { - if (base64AccumIdx > 0) { - bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - inBase64 = false; - } - - if (!inBase64) { - buf[bufIdx++] = uChar; // Write direct character - - if (uChar === andChar) // Ampersand -> '&-' - buf[bufIdx++] = minusChar; - } - - } else { // Non-direct character - if (!inBase64) { - buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. - inBase64 = true; - } - if (inBase64) { - base64Accum[base64AccumIdx++] = uChar >> 8; - base64Accum[base64AccumIdx++] = uChar & 0xFF; - - if (base64AccumIdx == base64Accum.length) { - bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); - base64AccumIdx = 0; - } - } - } - } - - this.inBase64 = inBase64; - this.base64AccumIdx = base64AccumIdx; - - return buf.slice(0, bufIdx); -} - -Utf7IMAPEncoder.prototype.end = function() { - var buf = Buffer.alloc(10), bufIdx = 0; - if (this.inBase64) { - if (this.base64AccumIdx > 0) { - bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - this.base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - this.inBase64 = false; - } - - return buf.slice(0, bufIdx); -} - - -// -- Decoding - -function Utf7IMAPDecoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64IMAPChars = base64Chars.slice(); -base64IMAPChars[','.charCodeAt(0)] = true; - -Utf7IMAPDecoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '&' - if (buf[i] == andChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64IMAPChars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" - res += "&"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/'); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus may be absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/'); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7IMAPDecoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/bom-handling.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/bom-handling.js deleted file mode 100644 index 1050872..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/bom-handling.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -var BOMChar = '\uFEFF'; - -exports.PrependBOM = PrependBOMWrapper -function PrependBOMWrapper(encoder, options) { - this.encoder = encoder; - this.addBOM = true; -} - -PrependBOMWrapper.prototype.write = function(str) { - if (this.addBOM) { - str = BOMChar + str; - this.addBOM = false; - } - - return this.encoder.write(str); -} - -PrependBOMWrapper.prototype.end = function() { - return this.encoder.end(); -} - - -//------------------------------------------------------------------------------ - -exports.StripBOM = StripBOMWrapper; -function StripBOMWrapper(decoder, options) { - this.decoder = decoder; - this.pass = false; - this.options = options || {}; -} - -StripBOMWrapper.prototype.write = function(buf) { - var res = this.decoder.write(buf); - if (this.pass || !res) - return res; - - if (res[0] === BOMChar) { - res = res.slice(1); - if (typeof this.options.stripBOM === 'function') - this.options.stripBOM(); - } - - this.pass = true; - return res; -} - -StripBOMWrapper.prototype.end = function() { - return this.decoder.end(); -} - diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.d.ts b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.d.ts deleted file mode 100644 index 99f200f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - * REQUIREMENT: This definition is dependent on the @types/node definition. - * Install with `npm install @types/node --save-dev` - *--------------------------------------------------------------------------------------------*/ - -declare module 'iconv-lite' { - // Basic API - export function decode(buffer: Buffer, encoding: string, options?: Options): string; - - export function encode(content: string, encoding: string, options?: Options): Buffer; - - export function encodingExists(encoding: string): boolean; - - // Stream API - export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; - - export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; - - // Low-level stream APIs - export function getEncoder(encoding: string, options?: Options): EncoderStream; - - export function getDecoder(encoding: string, options?: Options): DecoderStream; -} - -export interface Options { - stripBOM?: boolean; - addBOM?: boolean; - defaultEncoding?: string; -} - -export interface EncoderStream { - write(str: string): Buffer; - end(): Buffer | undefined; -} - -export interface DecoderStream { - write(buf: Buffer): string; - end(): string | undefined; -} diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.js deleted file mode 100644 index 657701c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.js +++ /dev/null @@ -1,180 +0,0 @@ -"use strict"; - -var Buffer = require("safer-buffer").Buffer; - -var bomHandling = require("./bom-handling"), - iconv = module.exports; - -// All codecs and aliases are kept here, keyed by encoding name/alias. -// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. -iconv.encodings = null; - -// Characters emitted in case of error. -iconv.defaultCharUnicode = '�'; -iconv.defaultCharSingleByte = '?'; - -// Public API. -iconv.encode = function encode(str, encoding, options) { - str = "" + (str || ""); // Ensure string. - - var encoder = iconv.getEncoder(encoding, options); - - var res = encoder.write(str); - var trail = encoder.end(); - - return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; -} - -iconv.decode = function decode(buf, encoding, options) { - if (typeof buf === 'string') { - if (!iconv.skipDecodeWarning) { - console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); - iconv.skipDecodeWarning = true; - } - - buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. - } - - var decoder = iconv.getDecoder(encoding, options); - - var res = decoder.write(buf); - var trail = decoder.end(); - - return trail ? (res + trail) : res; -} - -iconv.encodingExists = function encodingExists(enc) { - try { - iconv.getCodec(enc); - return true; - } catch (e) { - return false; - } -} - -// Legacy aliases to convert functions -iconv.toEncoding = iconv.encode; -iconv.fromEncoding = iconv.decode; - -// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. -iconv._codecDataCache = {}; -iconv.getCodec = function getCodec(encoding) { - if (!iconv.encodings) - iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. - - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - var enc = iconv._canonicalizeEncoding(encoding); - - // Traverse iconv.encodings to find actual codec. - var codecOptions = {}; - while (true) { - var codec = iconv._codecDataCache[enc]; - if (codec) - return codec; - - var codecDef = iconv.encodings[enc]; - - switch (typeof codecDef) { - case "string": // Direct alias to other encoding. - enc = codecDef; - break; - - case "object": // Alias with options. Can be layered. - for (var key in codecDef) - codecOptions[key] = codecDef[key]; - - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - enc = codecDef.type; - break; - - case "function": // Codec itself. - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - // The codec function must load all tables and return object with .encoder and .decoder methods. - // It'll be called only once (for each different options object). - codec = new codecDef(codecOptions, iconv); - - iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. - return codec; - - default: - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); - } - } -} - -iconv._canonicalizeEncoding = function(encoding) { - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); -} - -iconv.getEncoder = function getEncoder(encoding, options) { - var codec = iconv.getCodec(encoding), - encoder = new codec.encoder(options, codec); - - if (codec.bomAware && options && options.addBOM) - encoder = new bomHandling.PrependBOM(encoder, options); - - return encoder; -} - -iconv.getDecoder = function getDecoder(encoding, options) { - var codec = iconv.getCodec(encoding), - decoder = new codec.decoder(options, codec); - - if (codec.bomAware && !(options && options.stripBOM === false)) - decoder = new bomHandling.StripBOM(decoder, options); - - return decoder; -} - -// Streaming API -// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add -// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. -// If you would like to enable it explicitly, please add the following code to your app: -// > iconv.enableStreamingAPI(require('stream')); -iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) { - if (iconv.supportsStreams) - return; - - // Dependency-inject stream module to create IconvLite stream classes. - var streams = require("./streams")(stream_module); - - // Not public API yet, but expose the stream classes. - iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; - iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; - - // Streaming API. - iconv.encodeStream = function encodeStream(encoding, options) { - return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); - } - - iconv.decodeStream = function decodeStream(encoding, options) { - return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); - } - - iconv.supportsStreams = true; -} - -// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). -var stream_module; -try { - stream_module = require("stream"); -} catch (e) {} - -if (stream_module && stream_module.Transform) { - iconv.enableStreamingAPI(stream_module); - -} else { - // In rare cases where 'stream' module is not available by default, throw a helpful exception. - iconv.encodeStream = iconv.decodeStream = function() { - throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); - }; -} - -if ("Ā" != "\u0100") { - console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); -} diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/streams.js b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/streams.js deleted file mode 100644 index a150648..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/streams.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; - -var Buffer = require("safer-buffer").Buffer; - -// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), -// we opt to dependency-inject it instead of creating a hard dependency. -module.exports = function(stream_module) { - var Transform = stream_module.Transform; - - // == Encoder stream ======================================================= - - function IconvLiteEncoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.decodeStrings = false; // We accept only strings, so we don't need to decode them. - Transform.call(this, options); - } - - IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteEncoderStream } - }); - - IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { - if (typeof chunk != 'string') - return done(new Error("Iconv encoding stream needs strings as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype.collect = function(cb) { - var chunks = []; - this.on('error', cb); - this.on('data', function(chunk) { chunks.push(chunk); }); - this.on('end', function() { - cb(null, Buffer.concat(chunks)); - }); - return this; - } - - - // == Decoder stream ======================================================= - - function IconvLiteDecoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.encoding = this.encoding = 'utf8'; // We output strings. - Transform.call(this, options); - } - - IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteDecoderStream } - }); - - IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { - if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) - return done(new Error("Iconv decoding stream needs buffers as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype.collect = function(cb) { - var res = ''; - this.on('error', cb); - this.on('data', function(chunk) { res += chunk; }); - this.on('end', function() { - cb(null, res); - }); - return this; - } - - return { - IconvLiteEncoderStream: IconvLiteEncoderStream, - IconvLiteDecoderStream: IconvLiteDecoderStream, - }; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/package.json b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/package.json deleted file mode 100644 index d351115..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "iconv-lite", - "description": "Convert character encodings in pure javascript.", - "version": "0.6.3", - "license": "MIT", - "keywords": [ - "iconv", - "convert", - "charset", - "icu" - ], - "author": "Alexander Shtuchkin ", - "main": "./lib/index.js", - "typings": "./lib/index.d.ts", - "homepage": "https://github.com/ashtuchkin/iconv-lite", - "bugs": "https://github.com/ashtuchkin/iconv-lite/issues", - "repository": { - "type": "git", - "url": "git://github.com/ashtuchkin/iconv-lite.git" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "coverage": "c8 _mocha --grep .", - "test": "mocha --reporter spec --grep ." - }, - "browser": { - "stream": false - }, - "devDependencies": { - "async": "^3.2.0", - "c8": "^7.2.0", - "errto": "^0.2.1", - "iconv": "^2.3.5", - "mocha": "^3.5.3", - "request": "^2.88.2", - "semver": "^6.3.0", - "unorm": "^1.6.0" - }, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/safer-buffer b/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/safer-buffer deleted file mode 120000 index 4313903..0000000 --- a/services/hocuspocus/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/safer-buffer +++ /dev/null @@ -1 +0,0 @@ -../../safer-buffer@2.1.2/node_modules/safer-buffer \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/LICENSE b/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/LICENSE deleted file mode 100644 index 5aac82c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright 2008 Fair Oaks Labs, Inc. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/README.md b/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/README.md deleted file mode 100644 index cb7527b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# ieee754 [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/ieee754/master.svg -[travis-url]: https://travis-ci.org/feross/ieee754 -[npm-image]: https://img.shields.io/npm/v/ieee754.svg -[npm-url]: https://npmjs.org/package/ieee754 -[downloads-image]: https://img.shields.io/npm/dm/ieee754.svg -[downloads-url]: https://npmjs.org/package/ieee754 -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[saucelabs-image]: https://saucelabs.com/browser-matrix/ieee754.svg -[saucelabs-url]: https://saucelabs.com/u/ieee754 - -### Read/write IEEE754 floating point numbers from/to a Buffer or array-like object. - -## install - -``` -npm install ieee754 -``` - -## methods - -`var ieee754 = require('ieee754')` - -The `ieee754` object has the following functions: - -``` -ieee754.read = function (buffer, offset, isLE, mLen, nBytes) -ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) -``` - -The arguments mean the following: - -- buffer = the buffer -- offset = offset into the buffer -- value = value to set (only for `write`) -- isLe = is little endian? -- mLen = mantissa length -- nBytes = number of bytes - -## what is ieee754? - -The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. [Read more](http://en.wikipedia.org/wiki/IEEE_floating_point). - -## license - -BSD 3 Clause. Copyright (c) 2008, Fair Oaks Labs, Inc. diff --git a/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.d.ts b/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.d.ts deleted file mode 100644 index f1e4354..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare namespace ieee754 { - export function read( - buffer: Uint8Array, offset: number, isLE: boolean, mLen: number, - nBytes: number): number; - export function write( - buffer: Uint8Array, value: number, offset: number, isLE: boolean, - mLen: number, nBytes: number): void; - } - - export = ieee754; \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js b/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js deleted file mode 100644 index 81d26c3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js +++ /dev/null @@ -1,85 +0,0 @@ -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} diff --git a/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/package.json b/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/package.json deleted file mode 100644 index 7b23851..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "ieee754", - "description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object", - "version": "1.2.1", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "contributors": [ - "Romain Beauxis " - ], - "devDependencies": { - "airtap": "^3.0.0", - "standard": "*", - "tape": "^5.0.1" - }, - "keywords": [ - "IEEE 754", - "buffer", - "convert", - "floating point", - "ieee754" - ], - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/ieee754.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "airtap -- test/*.js", - "test-browser-local": "airtap --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/README.md b/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/README.md deleted file mode 100644 index f35b20a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/README.md +++ /dev/null @@ -1,122 +0,0 @@ -iMurmurHash.js -============== - -An incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js). - -This version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing. - -Installation ------------- - -To use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site. - -```html - - -``` - ---- - -To use iMurmurHash in Node.js, install the module using NPM: - -```bash -npm install imurmurhash -``` - -Then simply include it in your scripts: - -```javascript -MurmurHash3 = require('imurmurhash'); -``` - -Quick Example -------------- - -```javascript -// Create the initial hash -var hashState = MurmurHash3('string'); - -// Incrementally add text -hashState.hash('more strings'); -hashState.hash('even more strings'); - -// All calls can be chained if desired -hashState.hash('and').hash('some').hash('more'); - -// Get a result -hashState.result(); -// returns 0xe4ccfe6b -``` - -Functions ---------- - -### MurmurHash3 ([string], [seed]) -Get a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example: - -```javascript -// Use the cached object, calling the function again will return the same -// object (but reset, so the current state would be lost) -hashState = MurmurHash3(); -... - -// Create a new object that can be safely used however you wish. Calling the -// function again will simply return a new state object, and no state loss -// will occur, at the cost of creating more objects. -hashState = new MurmurHash3(); -``` - -Both methods can be mixed however you like if you have different use cases. - ---- - -### MurmurHash3.prototype.hash (string) -Incrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained. - ---- - -### MurmurHash3.prototype.result () -Get the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`. - -```javascript -// Do the whole string at once -MurmurHash3('this is a test string').result(); -// 0x70529328 - -// Do part of the string, get a result, then the other part -var m = MurmurHash3('this is a'); -m.result(); -// 0xbfc4f834 -m.hash(' test string').result(); -// 0x70529328 (same as above) -``` - ---- - -### MurmurHash3.prototype.reset ([seed]) -Reset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained. - ---- - -License (MIT) -------------- -Copyright (c) 2013 Gary Court, Jens Taylor - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js b/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js deleted file mode 100644 index e63146a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js +++ /dev/null @@ -1,138 +0,0 @@ -/** - * @preserve - * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) - * - * @author Jens Taylor - * @see http://github.com/homebrewing/brauhaus-diff - * @author Gary Court - * @see http://github.com/garycourt/murmurhash-js - * @author Austin Appleby - * @see http://sites.google.com/site/murmurhash/ - */ -(function(){ - var cache; - - // Call this function without `new` to use the cached object (good for - // single-threaded environments), or with `new` to create a new object. - // - // @param {string} key A UTF-16 or ASCII string - // @param {number} seed An optional positive integer - // @return {object} A MurmurHash3 object for incremental hashing - function MurmurHash3(key, seed) { - var m = this instanceof MurmurHash3 ? this : cache; - m.reset(seed) - if (typeof key === 'string' && key.length > 0) { - m.hash(key); - } - - if (m !== this) { - return m; - } - }; - - // Incrementally add a string to this hash - // - // @param {string} key A UTF-16 or ASCII string - // @return {object} this - MurmurHash3.prototype.hash = function(key) { - var h1, k1, i, top, len; - - len = key.length; - this.len += len; - - k1 = this.k1; - i = 0; - switch (this.rem) { - case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0; - case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0; - case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0; - case 3: - k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0; - k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0; - } - - this.rem = (len + this.rem) & 3; // & 3 is same as % 4 - len -= this.rem; - if (len > 0) { - h1 = this.h1; - while (1) { - k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; - k1 = (k1 << 15) | (k1 >>> 17); - k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; - - h1 ^= k1; - h1 = (h1 << 13) | (h1 >>> 19); - h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff; - - if (i >= len) { - break; - } - - k1 = ((key.charCodeAt(i++) & 0xffff)) ^ - ((key.charCodeAt(i++) & 0xffff) << 8) ^ - ((key.charCodeAt(i++) & 0xffff) << 16); - top = key.charCodeAt(i++); - k1 ^= ((top & 0xff) << 24) ^ - ((top & 0xff00) >> 8); - } - - k1 = 0; - switch (this.rem) { - case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16; - case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8; - case 1: k1 ^= (key.charCodeAt(i) & 0xffff); - } - - this.h1 = h1; - } - - this.k1 = k1; - return this; - }; - - // Get the result of this hash - // - // @return {number} The 32-bit hash - MurmurHash3.prototype.result = function() { - var k1, h1; - - k1 = this.k1; - h1 = this.h1; - - if (k1 > 0) { - k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; - k1 = (k1 << 15) | (k1 >>> 17); - k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; - h1 ^= k1; - } - - h1 ^= this.len; - - h1 ^= h1 >>> 16; - h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff; - h1 ^= h1 >>> 13; - h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff; - h1 ^= h1 >>> 16; - - return h1 >>> 0; - }; - - // Reset the hash object for reuse - // - // @param {number} seed An optional positive integer - MurmurHash3.prototype.reset = function(seed) { - this.h1 = typeof seed === 'number' ? seed : 0; - this.rem = this.k1 = this.len = 0; - return this; - }; - - // A cached object to use. This can be safely used if you're in a single- - // threaded environment, otherwise you need to create new hashes to use. - cache = new MurmurHash3(); - - if (typeof(module) != 'undefined') { - module.exports = MurmurHash3; - } else { - this.MurmurHash3 = MurmurHash3; - } -}()); diff --git a/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.min.js b/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.min.js deleted file mode 100644 index dc0ee88..0000000 --- a/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @preserve - * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) - * - * @author Jens Taylor - * @see http://github.com/homebrewing/brauhaus-diff - * @author Gary Court - * @see http://github.com/garycourt/murmurhash-js - * @author Austin Appleby - * @see http://sites.google.com/site/murmurhash/ - */ -!function(){function t(h,r){var s=this instanceof t?this:e;return s.reset(r),"string"==typeof h&&h.length>0&&s.hash(h),s!==this?s:void 0}var e;t.prototype.hash=function(t){var e,h,r,s,i;switch(i=t.length,this.len+=i,h=this.k1,r=0,this.rem){case 0:h^=i>r?65535&t.charCodeAt(r++):0;case 1:h^=i>r?(65535&t.charCodeAt(r++))<<8:0;case 2:h^=i>r?(65535&t.charCodeAt(r++))<<16:0;case 3:h^=i>r?(255&t.charCodeAt(r))<<24:0,h^=i>r?(65280&t.charCodeAt(r++))>>8:0}if(this.rem=3&i+this.rem,i-=this.rem,i>0){for(e=this.h1;;){if(h=4294967295&11601*h+3432906752*(65535&h),h=h<<15|h>>>17,h=4294967295&13715*h+461832192*(65535&h),e^=h,e=e<<13|e>>>19,e=4294967295&5*e+3864292196,r>=i)break;h=65535&t.charCodeAt(r++)^(65535&t.charCodeAt(r++))<<8^(65535&t.charCodeAt(r++))<<16,s=t.charCodeAt(r++),h^=(255&s)<<24^(65280&s)>>8}switch(h=0,this.rem){case 3:h^=(65535&t.charCodeAt(r+2))<<16;case 2:h^=(65535&t.charCodeAt(r+1))<<8;case 1:h^=65535&t.charCodeAt(r)}this.h1=e}return this.k1=h,this},t.prototype.result=function(){var t,e;return t=this.k1,e=this.h1,t>0&&(t=4294967295&11601*t+3432906752*(65535&t),t=t<<15|t>>>17,t=4294967295&13715*t+461832192*(65535&t),e^=t),e^=this.len,e^=e>>>16,e=4294967295&51819*e+2246770688*(65535&e),e^=e>>>13,e=4294967295&44597*e+3266445312*(65535&e),e^=e>>>16,e>>>0},t.prototype.reset=function(t){return this.h1="number"==typeof t?t:0,this.rem=this.k1=this.len=0,this},e=new t,"undefined"!=typeof module?module.exports=t:this.MurmurHash3=t}(); \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/package.json b/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/package.json deleted file mode 100644 index 8a93edb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "imurmurhash", - "version": "0.1.4", - "description": "An incremental implementation of MurmurHash3", - "homepage": "https://github.com/jensyt/imurmurhash-js", - "main": "imurmurhash.js", - "files": [ - "imurmurhash.js", - "imurmurhash.min.js", - "package.json", - "README.md" - ], - "repository": { - "type": "git", - "url": "https://github.com/jensyt/imurmurhash-js" - }, - "bugs": { - "url": "https://github.com/jensyt/imurmurhash-js/issues" - }, - "keywords": [ - "murmur", - "murmurhash", - "murmurhash3", - "hash", - "incremental" - ], - "author": { - "name": "Jens Taylor", - "email": "jensyt@gmail.com", - "url": "https://github.com/homebrewing" - }, - "license": "MIT", - "dependencies": { - }, - "devDependencies": { - }, - "engines": { - "node": ">=0.8.19" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.d.ts b/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.d.ts deleted file mode 100644 index 1185231..0000000 --- a/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -declare namespace indentString { - interface Options { - /** - The string to use for the indent. - - @default ' ' - */ - readonly indent?: string; - - /** - Also indent empty lines. - - @default false - */ - readonly includeEmptyLines?: boolean; - } -} - -/** -Indent each line in a string. - -@param string - The string to indent. -@param count - How many times you want `options.indent` repeated. Default: `1`. - -@example -``` -import indentString = require('indent-string'); - -indentString('Unicorns\nRainbows', 4); -//=> ' Unicorns\n Rainbows' - -indentString('Unicorns\nRainbows', 4, {indent: '♥'}); -//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows' -``` -*/ -declare function indentString( - string: string, - count?: number, - options?: indentString.Options -): string; - -export = indentString; diff --git a/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js b/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js deleted file mode 100644 index e1ab804..0000000 --- a/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -module.exports = (string, count = 1, options) => { - options = { - indent: ' ', - includeEmptyLines: false, - ...options - }; - - if (typeof string !== 'string') { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - - if (typeof count !== 'number') { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - - if (typeof options.indent !== 'string') { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - - if (count === 0) { - return string; - } - - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - - return string.replace(regex, options.indent.repeat(count)); -}; diff --git a/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/license b/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/license deleted file mode 100644 index e7af2f7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/package.json b/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/package.json deleted file mode 100644 index 497bb83..0000000 --- a/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "indent-string", - "version": "4.0.0", - "description": "Indent each line in a string", - "license": "MIT", - "repository": "sindresorhus/indent-string", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "indent", - "string", - "pad", - "align", - "line", - "text", - "each", - "every" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/readme.md b/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/readme.md deleted file mode 100644 index 49967de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/readme.md +++ /dev/null @@ -1,70 +0,0 @@ -# indent-string [![Build Status](https://travis-ci.org/sindresorhus/indent-string.svg?branch=master)](https://travis-ci.org/sindresorhus/indent-string) - -> Indent each line in a string - - -## Install - -``` -$ npm install indent-string -``` - - -## Usage - -```js -const indentString = require('indent-string'); - -indentString('Unicorns\nRainbows', 4); -//=> ' Unicorns\n Rainbows' - -indentString('Unicorns\nRainbows', 4, {indent: '♥'}); -//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows' -``` - - -## API - -### indentString(string, [count], [options]) - -#### string - -Type: `string` - -The string to indent. - -#### count - -Type: `number`
-Default: `1` - -How many times you want `options.indent` repeated. - -#### options - -Type: `object` - -##### indent - -Type: `string`
-Default: `' '` - -The string to use for the indent. - -##### includeEmptyLines - -Type: `boolean`
-Default: `false` - -Also indent empty lines. - - -## Related - -- [indent-string-cli](https://github.com/sindresorhus/indent-string-cli) - CLI for this module -- [strip-indent](https://github.com/sindresorhus/strip-indent) - Strip leading whitespace from every line in a string - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/LICENSE b/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/LICENSE deleted file mode 100644 index 20a4762..0000000 --- a/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/README.md b/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/README.md deleted file mode 100644 index 146caf7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# infer-owner - -Infer the owner of a path based on the owner of its nearest existing parent - -## USAGE - -```js -const inferOwner = require('infer-owner') - -inferOwner('/some/cache/folder/file').then(owner => { - // owner is {uid, gid} that should be attached to - // the /some/cache/folder/file, based on ownership - // of /some/cache/folder, /some/cache, /some, or /, - // whichever is the first to exist -}) - -// same, but not async -const owner = inferOwner.sync('/some/cache/folder/file') - -// results are cached! to reset the cache (eg, to change -// permissions for whatever reason), do this: -inferOwner.clearCache() -``` - -This module endeavors to be as performant as possible. Parallel requests -for ownership of the same path will only stat the directories one time. - -## API - -* `inferOwner(path) -> Promise<{ uid, gid }>` - - If the path exists, return its uid and gid. If it does not, look to - its parent, then its grandparent, and so on. - -* `inferOwner(path) -> { uid, gid }` - - Sync form of `inferOwner(path)`. - -* `inferOwner.clearCache()` - - Delete all cached ownership information and in-flight tracking. diff --git a/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/index.js b/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/index.js deleted file mode 100644 index a7bddcb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/index.js +++ /dev/null @@ -1,71 +0,0 @@ -const cache = new Map() -const fs = require('fs') -const { dirname, resolve } = require('path') - - -const lstat = path => new Promise((res, rej) => - fs.lstat(path, (er, st) => er ? rej(er) : res(st))) - -const inferOwner = path => { - path = resolve(path) - if (cache.has(path)) - return Promise.resolve(cache.get(path)) - - const statThen = st => { - const { uid, gid } = st - cache.set(path, { uid, gid }) - return { uid, gid } - } - const parent = dirname(path) - const parentTrap = parent === path ? null : er => { - return inferOwner(parent).then((owner) => { - cache.set(path, owner) - return owner - }) - } - return lstat(path).then(statThen, parentTrap) -} - -const inferOwnerSync = path => { - path = resolve(path) - if (cache.has(path)) - return cache.get(path) - - const parent = dirname(path) - - // avoid obscuring call site by re-throwing - // "catch" the error by returning from a finally, - // only if we're not at the root, and the parent call works. - let threw = true - try { - const st = fs.lstatSync(path) - threw = false - const { uid, gid } = st - cache.set(path, { uid, gid }) - return { uid, gid } - } finally { - if (threw && parent !== path) { - const owner = inferOwnerSync(parent) - cache.set(path, owner) - return owner // eslint-disable-line no-unsafe-finally - } - } -} - -const inflight = new Map() -module.exports = path => { - path = resolve(path) - if (inflight.has(path)) - return Promise.resolve(inflight.get(path)) - const p = inferOwner(path).then(owner => { - inflight.delete(path) - return owner - }) - inflight.set(path, p) - return p -} -module.exports.sync = inferOwnerSync -module.exports.clearCache = () => { - cache.clear() - inflight.clear() -} diff --git a/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/package.json b/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/package.json deleted file mode 100644 index c4b2b6e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/infer-owner@1.0.4/node_modules/infer-owner/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "infer-owner", - "version": "1.0.4", - "description": "Infer the owner of a path based on the owner of its nearest existing parent", - "author": "Isaac Z. Schlueter (https://izs.me)", - "license": "ISC", - "scripts": { - "test": "tap -J test/*.js --100", - "snap": "TAP_SNAPSHOT=1 tap -J test/*.js --100", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "devDependencies": { - "mutate-fs": "^2.1.1", - "tap": "^12.4.2" - }, - "main": "index.js", - "repository": "https://github.com/npm/infer-owner", - "publishConfig": { - "access": "public" - }, - "files": [ - "index.js" - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/LICENSE b/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/LICENSE deleted file mode 100644 index 05eeeb8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/README.md b/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/README.md deleted file mode 100644 index 6dc8929..0000000 --- a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# inflight - -Add callbacks to requests in flight to avoid async duplication - -## USAGE - -```javascript -var inflight = require('inflight') - -// some request that does some stuff -function req(key, callback) { - // key is any random string. like a url or filename or whatever. - // - // will return either a falsey value, indicating that the - // request for this key is already in flight, or a new callback - // which when called will call all callbacks passed to inflightk - // with the same key - callback = inflight(key, callback) - - // If we got a falsey value back, then there's already a req going - if (!callback) return - - // this is where you'd fetch the url or whatever - // callback is also once()-ified, so it can safely be assigned - // to multiple events etc. First call wins. - setTimeout(function() { - callback(null, key) - }, 100) -} - -// only assigns a single setTimeout -// when it dings, all cbs get called -req('foo', cb1) -req('foo', cb2) -req('foo', cb3) -req('foo', cb4) -``` diff --git a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js b/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js deleted file mode 100644 index 48202b3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js +++ /dev/null @@ -1,54 +0,0 @@ -var wrappy = require('wrappy') -var reqs = Object.create(null) -var once = require('once') - -module.exports = wrappy(inflight) - -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) - } -} - -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) - - // XXX It's somewhat ambiguous whether a new callback added in this - // pass should be queued for later execution if something in the - // list of callbacks throws, or if it should just be discarded. - // However, it's such an edge case that it hardly matters, and either - // choice is likely as surprising as the other. - // As it happens, we do go ahead and schedule it for later execution. - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - } finally { - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] - } - } - }) -} - -function slice (args) { - var length = args.length - var array = [] - - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} diff --git a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/package.json b/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/package.json deleted file mode 100644 index 6084d35..0000000 --- a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "inflight", - "version": "1.0.6", - "description": "Add callbacks to requests in flight to avoid async duplication", - "main": "inflight.js", - "files": [ - "inflight.js" - ], - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - }, - "devDependencies": { - "tap": "^7.1.2" - }, - "scripts": { - "test": "tap test.js --100" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/inflight.git" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "bugs": { - "url": "https://github.com/isaacs/inflight/issues" - }, - "homepage": "https://github.com/isaacs/inflight", - "license": "ISC" -} diff --git a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/once b/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/once deleted file mode 120000 index 72cb153..0000000 --- a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/once +++ /dev/null @@ -1 +0,0 @@ -../../once@1.4.0/node_modules/once \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/wrappy b/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/wrappy deleted file mode 120000 index 83be1df..0000000 --- a/services/hocuspocus/node_modules/.pnpm/inflight@1.0.6/node_modules/wrappy +++ /dev/null @@ -1 +0,0 @@ -../../wrappy@1.0.2/node_modules/wrappy \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/LICENSE b/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013..0000000 --- a/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/README.md b/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/README.md deleted file mode 100644 index b1c5665..0000000 --- a/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js b/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js deleted file mode 100644 index f71f2d9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js +++ /dev/null @@ -1,9 +0,0 @@ -try { - var util = require('util'); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = require('./inherits_browser.js'); -} diff --git a/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js b/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js deleted file mode 100644 index 86bbb3d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,27 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/package.json b/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/package.json deleted file mode 100644 index 37b4366..0000000 --- a/services/hocuspocus/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.4", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": "git://github.com/isaacs/inherits", - "license": "ISC", - "scripts": { - "test": "tap" - }, - "devDependencies": { - "tap": "^14.2.4" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/LICENSE b/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/README.md b/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/README.md deleted file mode 100644 index 33df258..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/README.md +++ /dev/null @@ -1,102 +0,0 @@ -An ini format parser and serializer for node. - -Sections are treated as nested objects. Items before the first -heading are saved on the object directly. - -## Usage - -Consider an ini-file `config.ini` that looks like this: - - ; this comment is being ignored - scope = global - - [database] - user = dbuser - password = dbpassword - database = use_this_database - - [paths.default] - datadir = /var/lib/data - array[] = first value - array[] = second value - array[] = third value - -You can read, manipulate and write the ini-file like so: - - var fs = require('fs') - , ini = require('ini') - - var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8')) - - config.scope = 'local' - config.database.database = 'use_another_database' - config.paths.default.tmpdir = '/tmp' - delete config.paths.default.datadir - config.paths.default.array.push('fourth value') - - fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' })) - -This will result in a file called `config_modified.ini` being written -to the filesystem with the following content: - - [section] - scope=local - [section.database] - user=dbuser - password=dbpassword - database=use_another_database - [section.paths.default] - tmpdir=/tmp - array[]=first value - array[]=second value - array[]=third value - array[]=fourth value - - -## API - -### decode(inistring) - -Decode the ini-style formatted `inistring` into a nested object. - -### parse(inistring) - -Alias for `decode(inistring)` - -### encode(object, [options]) - -Encode the object `object` into an ini-style formatted string. If the -optional parameter `section` is given, then all top-level properties -of the object are put into this section and the `section`-string is -prepended to all sub-sections, see the usage example above. - -The `options` object may contain the following: - -* `section` A string which will be the first `section` in the encoded - ini data. Defaults to none. -* `whitespace` Boolean to specify whether to put whitespace around the - `=` character. By default, whitespace is omitted, to be friendly to - some persnickety old parsers that don't tolerate it well. But some - find that it's more human-readable and pretty with the whitespace. - -For backwards compatibility reasons, if a `string` options is passed -in, then it is assumed to be the `section` value. - -### stringify(object, [options]) - -Alias for `encode(object, [options])` - -### safe(val) - -Escapes the string `val` such that it is safe to be used as a key or -value in an ini-file. Basically escapes quotes. For example - - ini.safe('"unsafe string"') - -would result in - - "\"unsafe string\"" - -### unsafe(val) - -Unescapes the string `val` diff --git a/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js b/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js deleted file mode 100644 index b576f08..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js +++ /dev/null @@ -1,206 +0,0 @@ -exports.parse = exports.decode = decode - -exports.stringify = exports.encode = encode - -exports.safe = safe -exports.unsafe = unsafe - -var eol = typeof process !== 'undefined' && - process.platform === 'win32' ? '\r\n' : '\n' - -function encode (obj, opt) { - var children = [] - var out = '' - - if (typeof opt === 'string') { - opt = { - section: opt, - whitespace: false, - } - } else { - opt = opt || {} - opt.whitespace = opt.whitespace === true - } - - var separator = opt.whitespace ? ' = ' : '=' - - Object.keys(obj).forEach(function (k, _, __) { - var val = obj[k] - if (val && Array.isArray(val)) { - val.forEach(function (item) { - out += safe(k + '[]') + separator + safe(item) + '\n' - }) - } else if (val && typeof val === 'object') - children.push(k) - else - out += safe(k) + separator + safe(val) + eol - }) - - if (opt.section && out.length) - out = '[' + safe(opt.section) + ']' + eol + out - - children.forEach(function (k, _, __) { - var nk = dotSplit(k).join('\\.') - var section = (opt.section ? opt.section + '.' : '') + nk - var child = encode(obj[k], { - section: section, - whitespace: opt.whitespace, - }) - if (out.length && child.length) - out += eol - - out += child - }) - - return out -} - -function dotSplit (str) { - return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') - .replace(/\\\./g, '\u0001') - .split(/\./).map(function (part) { - return part.replace(/\1/g, '\\.') - .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001') - }) -} - -function decode (str) { - var out = {} - var p = out - var section = null - // section |key = value - var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i - var lines = str.split(/[\r\n]+/g) - - lines.forEach(function (line, _, __) { - if (!line || line.match(/^\s*[;#]/)) - return - var match = line.match(re) - if (!match) - return - if (match[1] !== undefined) { - section = unsafe(match[1]) - if (section === '__proto__') { - // not allowed - // keep parsing the section, but don't attach it. - p = {} - return - } - p = out[section] = out[section] || {} - return - } - var key = unsafe(match[2]) - if (key === '__proto__') - return - var value = match[3] ? unsafe(match[4]) : true - switch (value) { - case 'true': - case 'false': - case 'null': value = JSON.parse(value) - } - - // Convert keys with '[]' suffix to an array - if (key.length > 2 && key.slice(-2) === '[]') { - key = key.substring(0, key.length - 2) - if (key === '__proto__') - return - if (!p[key]) - p[key] = [] - else if (!Array.isArray(p[key])) - p[key] = [p[key]] - } - - // safeguard against resetting a previously defined - // array by accidentally forgetting the brackets - if (Array.isArray(p[key])) - p[key].push(value) - else - p[key] = value - }) - - // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} - // use a filter to return the keys that have to be deleted. - Object.keys(out).filter(function (k, _, __) { - if (!out[k] || - typeof out[k] !== 'object' || - Array.isArray(out[k])) - return false - - // see if the parent section is also an object. - // if so, add it to that, and mark this one for deletion - var parts = dotSplit(k) - var p = out - var l = parts.pop() - var nl = l.replace(/\\\./g, '.') - parts.forEach(function (part, _, __) { - if (part === '__proto__') - return - if (!p[part] || typeof p[part] !== 'object') - p[part] = {} - p = p[part] - }) - if (p === out && nl === l) - return false - - p[nl] = out[k] - return true - }).forEach(function (del, _, __) { - delete out[del] - }) - - return out -} - -function isQuoted (val) { - return (val.charAt(0) === '"' && val.slice(-1) === '"') || - (val.charAt(0) === "'" && val.slice(-1) === "'") -} - -function safe (val) { - return (typeof val !== 'string' || - val.match(/[=\r\n]/) || - val.match(/^\[/) || - (val.length > 1 && - isQuoted(val)) || - val !== val.trim()) - ? JSON.stringify(val) - : val.replace(/;/g, '\\;').replace(/#/g, '\\#') -} - -function unsafe (val, doUnesc) { - val = (val || '').trim() - if (isQuoted(val)) { - // remove the single quotes before calling JSON.parse - if (val.charAt(0) === "'") - val = val.substr(1, val.length - 2) - - try { - val = JSON.parse(val) - } catch (_) {} - } else { - // walk the val to find the first not-escaped ; character - var esc = false - var unesc = '' - for (var i = 0, l = val.length; i < l; i++) { - var c = val.charAt(i) - if (esc) { - if ('\\;#'.indexOf(c) !== -1) - unesc += c - else - unesc += '\\' + c - - esc = false - } else if (';#'.indexOf(c) !== -1) - break - else if (c === '\\') - esc = true - else - unesc += c - } - if (esc) - unesc += '\\' - - return unesc.trim() - } - return val -} diff --git a/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/package.json b/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/package.json deleted file mode 100644 index c830a35..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ini@1.3.8/node_modules/ini/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "name": "ini", - "description": "An ini encoder/decoder for node", - "version": "1.3.8", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/ini.git" - }, - "main": "ini.js", - "scripts": { - "eslint": "eslint", - "lint": "npm run eslint -- ini.js test/*.js", - "lintfix": "npm run lint -- --fix", - "test": "tap", - "posttest": "npm run lint", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "devDependencies": { - "eslint": "^7.9.0", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.1", - "tap": "14" - }, - "license": "ISC", - "files": [ - "ini.js" - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/LICENSE b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/LICENSE deleted file mode 100644 index ec79adb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2011 by Beau Gunderson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/README.md b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/README.md deleted file mode 100644 index 190b653..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/README.md +++ /dev/null @@ -1,278 +0,0 @@ -[![CircleCI](https://dl.circleci.com/status-badge/img/circleci/9fJmTZfn8d8p7GtVt688PY/JjriGjhcxBD6zYKygMZaet/tree/master.svg?style=svg&circle-token=7baede7efd3db5f1f25fb439e97d5f695ff76318)](https://dl.circleci.com/status-badge/redirect/circleci/9fJmTZfn8d8p7GtVt688PY/JjriGjhcxBD6zYKygMZaet/tree/master) -[![codecov]](https://codecov.io/github/beaugunderson/ip-address?branch=master) -[![downloads]](https://www.npmjs.com/package/ip-address) -[![npm]](https://www.npmjs.com/package/ip-address) - -[codecov]: https://codecov.io/github/beaugunderson/ip-address/coverage.svg?branch=master -[downloads]: https://img.shields.io/npm/dm/ip-address.svg -[npm]: https://img.shields.io/npm/v/ip-address.svg - -## ip-address - -`ip-address` is a library for validating and manipulating IPv4 and IPv6 addresses in JavaScript and TypeScript. - -### Install - -```sh -npm install ip-address -``` - -### Examples - -```ts -import { Address4, Address6 } from 'ip-address'; - -// Validation -Address4.isValid('192.168.1.1'); // true -Address6.isValid('2001:db8::1'); // true -Address6.isValid('not an address'); // false - -// Parsing (throws AddressError on invalid input) -const v4 = new Address4('192.168.1.1/24'); -const v6 = new Address6('2001:db8::1/64'); - -// Subnet membership -const host = new Address4('192.168.1.42'); -const network = new Address4('192.168.1.0/24'); -host.isInSubnet(network); // true - -// Subnet range -network.startAddress().correctForm(); // '192.168.1.0' -network.endAddress().correctForm(); // '192.168.1.255' - -// Strict network-address check (host bits must be zero). -// isValid() accepts CIDRs with host bits set — '192.168.1.5/24' is a valid -// host-with-subnet, but it isn't a network address. -const cidr = new Address4('192.168.1.5/24'); -Address4.isValid('192.168.1.5/24'); // true -cidr.correctForm() === cidr.startAddress().correctForm(); // false - -// Address properties -const link = new Address6('fe80::1'); -link.isLinkLocal(); // true -link.isMulticast(); // false -link.isLoopback(); // false - -new Address4('192.168.1.1').isPrivate(); // true (RFC 1918) -new Address6('fc00::1').isULA(); // true (RFC 4193) - -// Numeric and byte representations -v4.bigInt(); // 3232235777n -v4.toArray(); // [192, 168, 1, 1] -v6.canonicalForm(); // '2001:0db8:0000:0000:0000:0000:0000:0001' - -// Embedded IPv4 + Teredo -const teredo = new Address6('2001:0:ce49:7601:e866:efff:62c3:fffe'); -teredo.inspectTeredo().client4; // '157.60.0.1' - -// Parse host + port from a URL -Address6.fromURL('http://[2001:db8::1]:8080/').port; // 8080 -``` - -### Features - -- Written in TypeScript with full type definitions; usable from CommonJS and ESM -- Zero runtime dependencies -- Parses all standard IPv4 and IPv6 notations, including subnets and zones -- Parses IPv6 hosts (and ports) from URLs via `Address6.fromURL(url)` -- Subnet membership checks (`isInSubnet`) and range queries (`startAddress` / `endAddress`) -- Special-property checks: private (RFC 1918) / ULA (RFC 4193), loopback, link-local, multicast, broadcast, unspecified, CGNAT, documentation, Teredo, 6to4, v4-in-v6 -- Decodes [Teredo](http://en.wikipedia.org/wiki/Teredo_tunneling#IPv6_addressing) and 6to4 tunneling information -- Conversions: canonical/correct form, hex, binary, decimal, byte arrays, BigInt, `in-addr.arpa` / `ip6.arpa` -- Runs in Node.js and the browser -- Thousands of test cases - -### Terminology - -A few terms used throughout the API can be confusing if you haven't worked deeply with IPv6 before: - -- **Correct form** — the shortest valid representation, per [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952): leading zeros stripped, the longest run of zero groups collapsed to `::`, and hex digits lowercased (e.g. `2001:db8::1`). This is what most software displays. -- **Canonical form** — the fully expanded representation: all 8 groups, each padded to 4 hex digits, no `::` collapsing (e.g. `2001:0db8:0000:0000:0000:0000:0000:0001`). Useful for sorting and byte-exact comparison. -- **Subnet** — the network portion of an address expressed as a CIDR prefix length (e.g. `/24` for IPv4, `/64` for IPv6). `startAddress()` / `endAddress()` return the bounds of the subnet's range. -- **Zone** — the IPv6 scope identifier appended after `%`, used to disambiguate link-local addresses across interfaces (e.g. `fe80::1%eth0`). -- **v4-in-v6** — mixed notation that embeds an IPv4 address as the last 32 bits of an IPv6 address, e.g. `::ffff:192.168.0.1`. Used for IPv4-mapped IPv6 addresses. -- **Teredo** — a tunneling protocol that encodes an IPv4 endpoint, port, and flags inside a `2001::/32` IPv6 address. `inspectTeredo()` decodes those fields. -- **6to4** — a tunneling protocol that embeds an IPv4 address as the second 16 bits of a `2002::/16` IPv6 address. `inspect6to4()` decodes the embedded v4 address. - -### API - - - -#### AddressError - -**Constructor** - -- `new AddressError(message: string, parseMessage?: string): AddressError` - -**Properties** - -- `parseMessage: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/address-error.ts#L2) - -#### Address4 - -Represents an IPv4 address - -**Constructor** - -- `new Address4(address: string): Address4` - -**Static methods** - -- `static isValid(address: string): boolean` — Returns true if the given string is a valid IPv4 address (with optional CIDR subnet), false otherwise. Host bits in the subnet portion are allowed (e.g. `192.168.1.5/24` is valid); for strict network-address validation compare `correctForm()` to `startAddress().correctForm()`, or use `networkForm()`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L53) -- `static fromAddressAndMask(address: string, mask: string): Address4` — Construct an `Address4` from an address and a dotted-decimal subnet mask given as separate strings (e.g. as returned by Node's `os.networkInterfaces()`). Throws `AddressError` if the mask is non-contiguous (e.g. `255.0.255.0`). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L104) -- `static fromAddressAndWildcardMask(address: string, wildcardMask: string): Address4` — Construct an `Address4` from an address and a Cisco-style wildcard mask given as separate strings (e.g. `0.0.0.255` for a `/24`). The wildcard mask is the bitwise inverse of the subnet mask. Throws `AddressError` if the mask is non-contiguous (e.g. `0.255.0.255`). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L118) -- `static fromWildcard(input: string): Address4` — Construct an `Address4` from a wildcard pattern with trailing `*` octets. The number of trailing wildcards determines the prefix length: each `*` represents 8 bits. Only trailing whole-octet wildcards are supported. Partial-octet wildcards (e.g. `192.168.0.1*`) and interior wildcards (e.g. `192.*.0.1`) throw `AddressError`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L140) -- `static fromHex(hex: string): Address4` — Converts a hex string to an IPv4 address object. Accepts 8 hex digits with optional `:` separators (e.g. `'7f000001'` or `'7f:00:00:01'`). Throws `AddressError` for any other length or for non-hex characters. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L175) -- `static fromInteger(integer: number): Address4` — Converts an integer into a IPv4 address object. The integer must be a non-negative safe integer in the range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L198) -- `static fromArpa(arpaFormAddress: string): Address4` — Return an address from in-addr.arpa form [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L214) -- `static fromBigInt(bigInt: bigint): Address4` — Converts a BigInt to a v4 address object. The value must be in the range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L361) -- `static fromByteArray(bytes: number[]): Address4` — Convert a byte array to an Address4 object. To convert from a Node.js `Buffer`, spread it: `Address4.fromByteArray([...buf])`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L376) -- `static fromUnsignedByteArray(bytes: number[]): Address4` — Convert an unsigned byte array to an Address4 object [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L396) - -**Instance methods** - -- `parse(address: string): string[]` — Parses an IPv4 address string into its four octet groups and stores the result on `this.parsedAddress`. Called automatically by the constructor; you typically don't need to call it directly. Throws `AddressError` if the input is not a valid IPv4 address. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L70) -- `correctForm(): string` — Returns the address in correct form: octets joined with `.` and any leading zeros stripped (e.g. `192.168.1.1`). For IPv4 this matches the canonical dotted-decimal representation. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L85) -- `toHex(): string` — Converts an IPv4 address object to a hex string [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L227) -- `toArray(): number[]` — Converts an IPv4 address object to an array of bytes. To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toArray())`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L237) -- `toGroup6(): string` — Converts an IPv4 address object to an IPv6 address group [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L245) -- `bigInt(): bigint` — Returns the address as a `bigint` [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L264) -- `startAddress(): Address4` — The first address in the range given by this address' subnet. Often referred to as the Network Address. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L281) -- `startAddressExclusive(): Address4` — The first host address in the range given by this address's subnet ie the first address after the Network Address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L290) -- `endAddress(): Address4` — The last address in the range given by this address' subnet Often referred to as the Broadcast [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L308) -- `endAddressExclusive(): Address4` — The last host address in the range given by this address's subnet ie the last address prior to the Broadcast Address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L317) -- `subnetMaskAddress(): Address4` — The dotted-decimal form of the subnet mask, e.g. `255.255.240.0` for a `/20`. Returns an `Address4`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L327) -- `wildcardMask(): Address4` — The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is the bitwise inverse of `subnetMaskAddress()`. Returns an `Address4`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L339) -- `networkForm(): string` — The network address in CIDR string form, e.g. `192.168.1.0/24` for `192.168.1.5/24`. For an address with no explicit subnet the prefix is `/32`, e.g. `networkForm()` on `192.168.1.5` returns `192.168.1.5/32`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L351) -- `mask(mask?: number): string` — Returns the first n bits of the address, defaulting to the subnet mask [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L410) -- `getBitsBase2(start: number, end: number): string` — Returns the bits in the given range as a base-2 string [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L422) -- `reverseForm(options?: ReverseFormOptions): string` — Return the reversed ip6.arpa form of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L432) -- `isMulticast(): boolean` — Returns true if the given address is a multicast address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L456) -- `isPrivate(): boolean` — Returns true if the address is in one of the [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private address ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L464) -- `isLoopback(): boolean` — Returns true if the address is in the loopback range `127.0.0.0/8` ([RFC 1122](https://datatracker.ietf.org/doc/html/rfc1122)). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L472) -- `isLinkLocal(): boolean` — Returns true if the address is in the link-local range `169.254.0.0/16` ([RFC 3927](https://datatracker.ietf.org/doc/html/rfc3927)). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L480) -- `isUnspecified(): boolean` — Returns true if the address is the unspecified address `0.0.0.0`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L488) -- `isBroadcast(): boolean` — Returns true if the address is the limited broadcast address `255.255.255.255` ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L496) -- `isCGNAT(): boolean` — Returns true if the address is in the carrier-grade NAT range `100.64.0.0/10` ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L504) -- `binaryZeroPad(): string` — Returns a zero-padded base-2 string representation of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L512) -- `groupForV6(): string` — Groups an IPv4 address for inclusion at the end of an IPv6 address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L523) - -**Properties** - -- `address: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L14) -- `addressMinusSuffix: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L15) -- `groups: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L16) -- `parsedAddress: string[]` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L17) -- `parsedSubnet: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L18) -- `subnet: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L19) -- `subnetMask: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L20) -- `v4: boolean` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L21) -- `isCorrect: (this: Address4 | Address6) => boolean` — Returns true if the address is correct, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L93) -- `isInSubnet: (this: Address4 | Address6, address: Address4 | Address6) => boolean` — Returns true if the given address is in the subnet of the current address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L450) - -#### Address6 - -Represents an IPv6 address - -**Constructor** - -- `new Address6(address: string, optionalGroups?: number): Address6` - -**Static methods** - -- `static isValid(address: string): boolean` — Returns true if the given string is a valid IPv6 address (with optional CIDR subnet and zone identifier), false otherwise. Host bits in the subnet portion are allowed (e.g. `2001:db8::1/32` is valid); for strict network-address validation compare `correctForm()` to `startAddress().correctForm()`, or use `networkForm()`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L163) -- `static fromBigInt(bigInt: bigint): Address6` — Convert a BigInt to a v6 address object. The value must be in the range `[0, 2**128 - 1]`; otherwise `AddressError` is thrown. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L184) -- `static fromURL(url: string): { error: string; address: null; port: null } | { error?: undefined; address: Address6; port: number | null }` — Parse a URL (with optional bracketed host and port) into an address and port. Returns either `{ address, port }` on success or `{ error, address: null, port: null }` if the URL could not be parsed. Ports are returned as numbers (or `null` if absent or out of range). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L209) -- `static fromAddressAndMask(address: string, mask: string): Address6` — Construct an `Address6` from an address and a hex subnet mask given as separate strings (e.g. as returned by Node's `os.networkInterfaces()`). Throws `AddressError` if the mask is non-contiguous (e.g. `ffff::ffff`). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L273) -- `static fromAddressAndWildcardMask(address: string, wildcardMask: string): Address6` — Construct an `Address6` from an address and a Cisco-style wildcard mask given as separate strings (e.g. `::ffff:ffff:ffff:ffff` for a `/64`). The wildcard mask is the bitwise inverse of the subnet mask. Throws `AddressError` if the mask is non-contiguous. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L287) -- `static fromWildcard(input: string): Address6` — Construct an `Address6` from a wildcard pattern with trailing `*` groups. The number of trailing wildcards determines the prefix length: each `*` represents 16 bits. `::` is expanded to zero groups (not wildcards) before evaluating trailing wildcards. Only trailing whole-group wildcards are supported. Partial-group wildcards (e.g. `2001:db8::0*`) and interior wildcards (e.g. `*::1`) throw `AddressError`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L310) -- `static fromAddress4(address: string): Address6` — Create an IPv6-mapped address given an IPv4 address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L371) -- `static fromArpa(arpaFormAddress: string): Address6` — Return an address from ip6.arpa form [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L387) -- `static fromAddress4Nat64(address: string, prefix: string): Address6` — Embed an IPv4 address into a NAT64 IPv6 address using the encoding defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052). The default prefix is the well-known prefix `64:ff9b::/96`. The prefix length must be one of 32, 40, 48, 56, 64, or 96; for prefixes shorter than /64 the IPv4 octets are split around the reserved bits 64–71. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1048) -- `static fromByteArray(bytes: any[]): Address6` — Convert a byte array to an Address6 object. To convert from a Node.js `Buffer`, spread it: `Address6.fromByteArray([...buf])`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1154) -- `static fromUnsignedByteArray(bytes: any[]): Address6` — Convert an unsigned byte array to an Address6 object. To convert from a Node.js `Buffer`, spread it: `Address6.fromUnsignedByteArray([...buf])`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1164) - -**Instance methods** - -- `microsoftTranscription(): string` — Return the Microsoft UNC transcription of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L413) -- `mask(mask?: number): string` — Return the first n bits of the address, defaulting to the subnet mask [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L422) -- `possibleSubnets(subnetSize?: number): string` — Return the number of possible subnets of a given size in the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L432) -- `startAddress(): Address6` — The first address in the range given by this address' subnet Often referred to as the Network Address. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L457) -- `startAddressExclusive(): Address6` — The first host address in the range given by this address's subnet ie the first address after the Network Address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L466) -- `endAddress(): Address6` — The last address in the range given by this address' subnet Often referred to as the Broadcast [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L484) -- `endAddressExclusive(): Address6` — The last host address in the range given by this address's subnet ie the last address prior to the Broadcast Address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L493) -- `subnetMaskAddress(): Address6` — The hex form of the subnet mask, e.g. `ffff:ffff:ffff:ffff::` for a `/64`. Returns an `Address6`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L503) -- `wildcardMask(): Address6` — The Cisco-style wildcard mask, e.g. `::ffff:ffff:ffff:ffff` for a `/64`. This is the bitwise inverse of `subnetMaskAddress()`. Returns an `Address6`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L515) -- `networkForm(): string` — The network address in CIDR string form, e.g. `2001:db8::/32` for `2001:db8::1/32`. For an address with no explicit subnet the prefix is `/128`, e.g. `networkForm()` on `2001:db8::1` returns `2001:db8::1/128`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L528) -- `getScope(): string` — Return the scope of the address. The 4-bit scope field ([RFC 4291 §2.7](https://datatracker.ietf.org/doc/html/rfc4291#section-2.7)) is only defined for multicast addresses; for unicast addresses the scope is derived from the address type per [RFC 4007 §6](https://datatracker.ietf.org/doc/html/rfc4007#section-6). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L540) -- `getType(): string` — Return the type of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L567) -- `getBits(start: number, end: number): bigint` — Return the bits in the given range as a BigInt [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L582) -- `getBitsBase2(start: number, end: number): string` — Return the bits in the given range as a base-2 string [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L590) -- `getBitsBase16(start: number, end: number): string` — Return the bits in the given range as a base-16 string [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L598) -- `getBitsPastSubnet(): string` — Return the bits that are set past the subnet mask length [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L614) -- `reverseForm(options?: ReverseFormOptions): string` — Return the reversed ip6.arpa form of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L624) -- `correctForm(): string` — Returns the address in correct form, per [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952): leading zeros stripped, the longest run of zero groups collapsed to `::`, and hex digits lowercased (e.g. `2001:db8::1`). This is the recommended form for display. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L659) -- `binaryZeroPad(): string` — Return a zero-padded base-2 string representation of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L721) -- `parse4in6(address: string): string` — Parses a v4-in-v6 string (e.g. `::ffff:192.168.0.1`) by extracting the trailing IPv4 address into `this.address4` / `this.parsedAddress4` and returning the address with the v4 portion converted to two v6 groups. Used internally by `parse()`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L735) -- `parse(address: string): string[]` — Parses an IPv6 address string into its 8 hexadecimal groups (expanding any `::` elision and any trailing v4-in-v6 portion) and stores the result on `this.parsedAddress`. Called automatically by the constructor; you typically don't need to call it directly. Throws `AddressError` if the input is malformed. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L783) -- `canonicalForm(): string` — Returns the canonical (fully expanded) form of the address: all 8 groups, each padded to 4 hex digits, with no `::` collapsing (e.g. `2001:0db8:0000:0000:0000:0000:0000:0001`). Useful for sorting and byte-exact comparison. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L863) -- `decimal(): string` — Return the decimal form of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L871) -- `bigInt(): bigint` — Return the address as a BigInt [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L879) -- `to4(): Address4` — Return the last two groups of this address as an IPv4 address string. If this address carries a CIDR prefix that covers the trailing 32 bits (i.e. `subnetMask >= 96`), the resulting `Address4` inherits the corresponding v4 prefix (`subnetMask - 96`); otherwise it defaults to `/32`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L894) -- `to4in6(): string` — Return the v4-in-v6 form of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L916) -- `inspectTeredo(): TeredoProperties` — Decodes the Teredo tunneling fields embedded in this address. Returns the Teredo prefix, server IPv4, client IPv4, raw flag bits, cone-NAT flag, UDP port, and Microsoft-format flag breakdown (reserved, universal/local, group/individual, nonce). Only meaningful for addresses in `2001::/32`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L937) -- `inspect6to4(): SixToFourProperties` — Decodes the 6to4 tunneling fields embedded in this address. Returns the 6to4 prefix and the embedded IPv4 gateway address. Only meaningful for addresses in `2002::/16`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1002) -- `to6to4(): Address6 | null` — Return a v6 6to4 address from a v6 v4inv6 address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1022) -- `toAddress4Nat64(prefix: string): Address4 | null` — Extract the embedded IPv4 address from a NAT64 IPv6 address using the encoding defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052). The default prefix is the well-known prefix `64:ff9b::/96`. Returns `null` if this address is not contained within the given prefix. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1089) -- `toByteArray(): number[]` — Return a byte array. To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toByteArray())`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1124) -- `toUnsignedByteArray(): number[]` — Return an unsigned byte array. To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toUnsignedByteArray())`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1144) -- `isCanonical(): boolean` — Returns true if the address is in the canonical form, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1195) -- `isLinkLocal(): boolean` — Returns true if the address is a link local address, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1203) -- `isMulticast(): boolean` — Returns true if the address is a multicast address, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1219) -- `is4(): boolean` — Returns true if the address was written in v4-in-v6 dotted-quad notation (e.g. `::ffff:127.0.0.1`), false otherwise. This is a notation-level flag and does not reflect whether the address bits lie in the IPv4-mapped (`::ffff:0:0/96`) subnet — for that, see isMapped4. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1231) -- `isMapped4(): boolean` — Returns true if the address is an IPv4-mapped IPv6 address in `::ffff:0:0/96` ([RFC 4291 §2.5.5.2](https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.2)), false otherwise. Unlike is4, this checks the underlying address bits rather than the textual notation, so `::ffff:127.0.0.1` and `::ffff:7f00:1` both return true. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1243) -- `isTeredo(): boolean` — Returns true if the address is a Teredo address, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1251) -- `is6to4(): boolean` — Returns true if the address is a 6to4 address, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1259) -- `isLoopback(): boolean` — Returns true if the address is a loopback address, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1267) -- `isULA(): boolean` — Returns true if the address is a Unique Local Address in `fc00::/7` ([RFC 4193](https://datatracker.ietf.org/doc/html/rfc4193)). ULAs are the IPv6 equivalent of IPv4 [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private addresses. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1275) -- `isUnspecified(): boolean` — Returns true if the address is the unspecified address `::`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1283) -- `isDocumentation(): boolean` — Returns true if the address is in the documentation prefix `2001:db8::/32` ([RFC 3849](https://datatracker.ietf.org/doc/html/rfc3849)). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1291) -- `href(optionalPort?: string | number): string` — Returns the address as an HTTP URL with the host bracketed, e.g. `http://[2001:db8::1]/`. If `optionalPort` is provided it is appended, e.g. `http://[2001:db8::1]:8080/`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1302) -- `link(options?: { className?: string; prefix?: string; v4?: boolean }): string` — Returns an HTML `` element whose `href` encodes the address in a URL hash fragment (default prefix `/#address=`). Useful for linking between pages of an address-inspector UI. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1320) -- `group(): string` — Groups an address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1360) -- `regularExpressionString(this: Address6, substringSearch: boolean): string` — Generate a regular expression string that can be used to find or validate all variations of this address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1412) -- `regularExpression(this: Address6, substringSearch: boolean): RegExp` — Generate a regular expression that can be used to find or validate all variations of this address. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1466) - -**Properties** - -- `address4: Address4` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L98) -- `address: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L99) -- `addressMinusSuffix: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L100) -- `elidedGroups: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L101) -- `elisionBegin: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L102) -- `elisionEnd: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L103) -- `groups: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L104) -- `parsedAddress4: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L105) -- `parsedAddress: string[]` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L106) -- `parsedSubnet: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L107) -- `subnet: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L108) -- `subnetMask: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L109) -- `v4: boolean` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L110) -- `zone: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L111) -- `isInSubnet: (this: Address4 | Address6, address: Address4 | Address6) => boolean` — Returns true if the given address is in the subnet of the current address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1183) -- `isCorrect: (this: Address4 | Address6) => boolean` — Returns true if the address is correct, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1189) - - - -### Used by - -`ip-address` is downloaded ~66 million times per week, mostly via the Node proxy/agent ecosystem. The dependency chain runs through a handful of widely-used packages: - -- [**socks**](https://github.com/JoshGlazebrook/socks) (~53M weekly) — SOCKS4/5 client for Node; depends on `ip-address` directly. The single biggest source of downloads. -- [**socks-proxy-agent**](https://github.com/TooTallNate/proxy-agents/tree/main/packages/socks-proxy-agent) (~57M weekly) — `http.Agent` for SOCKS proxies; depends on `socks`. Bundled by virtually every CLI that respects `HTTPS_PROXY`. -- [**npm**](https://github.com/npm/cli) and [**pnpm**](https://github.com/pnpm/pnpm) — both bundle `socks-proxy-agent` through their HTTP fetch stack (`make-fetch-happen` → `@npmcli/agent`), so every Node install on the planet pulls in `ip-address` as a transitive dependency. -- [**Puppeteer**](https://github.com/puppeteer/puppeteer) — `@puppeteer/browsers` uses `proxy-agent` for browser-binary downloads, which routes through `socks-proxy-agent` → `socks` → `ip-address`. -- [**proxy-agent**](https://github.com/TooTallNate/proxy-agents/tree/main/packages/proxy-agent) (~28M weekly) and [**pac-proxy-agent**](https://github.com/TooTallNate/proxy-agents/tree/main/packages/pac-proxy-agent) (~27M weekly) — auto-detecting proxy agents (HTTP/HTTPS/SOCKS/PAC) used widely in scraping, headless-browser, and CI tooling. -- [**cacache**](https://github.com/npm/cacache) (~44M weekly) — npm's content-addressable cache; pulls in the same fetch stack. - -Beyond the proxy chain, `ip-address` has been used by Juniper Networks' Contrail, Ably's proxy-protocol implementation, Rackspace's serialization framework, IPFS, and the [SwitchyOmega](https://github.com/FelisCatus/SwitchyOmega) Chrome extension, among many others. diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.d.ts b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.d.ts deleted file mode 100644 index dcb8260..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class AddressError extends Error { - parseMessage?: string; - constructor(message: string, parseMessage?: string); -} diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.js b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.js deleted file mode 100644 index c178ae4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AddressError = void 0; -class AddressError extends Error { - constructor(message, parseMessage) { - super(message); - this.name = 'AddressError'; - this.parseMessage = parseMessage; - } -} -exports.AddressError = AddressError; -//# sourceMappingURL=address-error.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.js.map b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.js.map deleted file mode 100644 index 7acd56e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/address-error.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"address-error.js","sourceRoot":"","sources":["../src/address-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAa,SAAQ,KAAK;IAGrC,YAAY,OAAe,EAAE,YAAqB;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAE3B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AAVD,oCAUC","sourcesContent":["export class AddressError extends Error {\n parseMessage?: string;\n\n constructor(message: string, parseMessage?: string) {\n super(message);\n\n this.name = 'AddressError';\n\n this.parseMessage = parseMessage;\n }\n}\n"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.d.ts b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.d.ts deleted file mode 100644 index 1f809c2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Address4 } from './ipv4'; -import { Address6 } from './ipv6'; -export interface ReverseFormOptions { - omitSuffix?: boolean; -} -export declare function isInSubnet(this: Address4 | Address6, address: Address4 | Address6): boolean; -export declare function isCorrect(defaultBits: number): (this: Address4 | Address6) => boolean; -/** - * Returns the prefix length (number of leading 1 bits) of a contiguous - * subnet mask. Throws `AddressError` if the mask is non-contiguous (e.g. - * `255.0.255.0`). - */ -export declare function prefixLengthFromMask(value: bigint, totalBits: number): number; -export declare function numberToPaddedHex(number: number): string; -export declare function stringToPaddedHex(numberString: string): string; -/** - * @param binaryValue Binary representation of a value (e.g. `10`) - * @param position Byte position, where 0 is the least significant bit - */ -export declare function testBit(binaryValue: string, position: number): boolean; diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.js b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.js deleted file mode 100644 index 6b76e05..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isInSubnet = isInSubnet; -exports.isCorrect = isCorrect; -exports.prefixLengthFromMask = prefixLengthFromMask; -exports.numberToPaddedHex = numberToPaddedHex; -exports.stringToPaddedHex = stringToPaddedHex; -exports.testBit = testBit; -const address_error_1 = require("./address-error"); -function isInSubnet(address) { - if (this.subnetMask < address.subnetMask) { - return false; - } - if (this.mask(address.subnetMask) === address.mask()) { - return true; - } - return false; -} -function isCorrect(defaultBits) { - return function () { - if (this.addressMinusSuffix !== this.correctForm()) { - return false; - } - if (this.subnetMask === defaultBits && !this.parsedSubnet) { - return true; - } - return this.parsedSubnet === String(this.subnetMask); - }; -} -/** - * Returns the prefix length (number of leading 1 bits) of a contiguous - * subnet mask. Throws `AddressError` if the mask is non-contiguous (e.g. - * `255.0.255.0`). - */ -function prefixLengthFromMask(value, totalBits) { - const binary = value.toString(2).padStart(totalBits, '0'); - if (binary.length > totalBits) { - throw new address_error_1.AddressError('Invalid subnet mask.'); - } - const firstZero = binary.indexOf('0'); - if (firstZero === -1) { - return totalBits; - } - if (binary.slice(firstZero).includes('1')) { - throw new address_error_1.AddressError('Invalid subnet mask.'); - } - return firstZero; -} -function numberToPaddedHex(number) { - return number.toString(16).padStart(2, '0'); -} -function stringToPaddedHex(numberString) { - return numberToPaddedHex(parseInt(numberString, 10)); -} -/** - * @param binaryValue Binary representation of a value (e.g. `10`) - * @param position Byte position, where 0 is the least significant bit - */ -function testBit(binaryValue, position) { - const { length } = binaryValue; - if (position > length) { - return false; - } - const positionInString = length - position; - return binaryValue.substring(positionInString, positionInString + 1) === '1'; -} -//# sourceMappingURL=common.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.js.map b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.js.map deleted file mode 100644 index ae882d5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/common.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":";;AAQA,gCAUC;AAED,8BAYC;AAOD,oDAkBC;AAED,8CAEC;AAED,8CAEC;AAMD,0BASC;AA9ED,mDAA+C;AAM/C,SAAgB,UAAU,CAA4B,OAA4B;IAChF,IAAI,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACzC,OAAO,KAAK,CAAC;IACf,CA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AM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC9C,CAAC;AAED,SAAgB,iBAAiB,CAAC,YAAoB;IACpD,OAAO,iBAAiB,CAAC,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC;AACvD,CAAC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,WAAmB,EAAE,QAAgB;IAC3D,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;IAE/B,IAAI,QAAQ,GAAG,MAAM,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC3C,OAAO,WAAW,CAAC,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;AAC/E,CAAC","sourcesContent":["import { Address4 } from './ipv4';\nimport { Address6 } from './ipv6';\nimport { AddressError } from './address-error';\n\nexport interface ReverseFormOptions {\n omitSuffix?: boolean;\n}\n\nexport function isInSubnet(this: Address4 | Address6, address: Address4 | Address6) {\n if (this.subnetMask < address.subnetMask) {\n return false;\n }\n\n if (this.mask(address.subnetMask) === address.mask()) {\n return true;\n }\n\n return false;\n}\n\nexport function isCorrect(defaultBits: number) {\n return function (this: Address4 | Address6) {\n if (this.addressMinusSuffix !== this.correctForm()) {\n return false;\n }\n\n if (this.subnetMask === defaultBits && !this.parsedSubnet) {\n return true;\n }\n\n return this.parsedSubnet === String(this.subnetMask);\n };\n}\n\n/**\n * Returns the prefix length (number of leading 1 bits) of a contiguous\n * subnet mask. Throws `AddressError` if the mask is non-contiguous (e.g.\n * `255.0.255.0`).\n */\nexport function prefixLengthFromMask(value: bigint, totalBits: number): number {\n const binary = value.toString(2).padStart(totalBits, '0');\n\n if (binary.length > totalBits) {\n throw new AddressError('Invalid subnet mask.');\n }\n\n const firstZero = binary.indexOf('0');\n\n if (firstZero === -1) {\n return totalBits;\n }\n\n if (binary.slice(firstZero).includes('1')) {\n throw new AddressError('Invalid subnet mask.');\n }\n\n return firstZero;\n}\n\nexport function numberToPaddedHex(number: number) {\n return number.toString(16).padStart(2, '0');\n}\n\nexport function stringToPaddedHex(numberString: string) {\n return numberToPaddedHex(parseInt(numberString, 10));\n}\n\n/**\n * @param binaryValue Binary representation of a value (e.g. `10`)\n * @param position Byte position, where 0 is the least significant bit\n */\nexport function testBit(binaryValue: string, position: number): boolean {\n const { length } = binaryValue;\n\n if (position > length) {\n return false;\n }\n\n const positionInString = length - position;\n return binaryValue.substring(positionInString, positionInString + 1) === '1';\n}\n"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.d.ts b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.d.ts deleted file mode 100644 index 2d55600..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { Address4 } from './ipv4'; -export { Address6 } from './ipv6'; -export { AddressError } from './address-error'; -import * as helpers from './v6/helpers'; -export declare const v6: { - helpers: typeof helpers; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.js b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.js deleted file mode 100644 index 84f3487..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.v6 = exports.AddressError = exports.Address6 = exports.Address4 = void 0; -var ipv4_1 = require("./ipv4"); -Object.defineProperty(exports, "Address4", { enumerable: true, get: function () { return ipv4_1.Address4; } }); -var ipv6_1 = require("./ipv6"); -Object.defineProperty(exports, "Address6", { enumerable: true, get: function () { return ipv6_1.Address6; } }); -var address_error_1 = require("./address-error"); -Object.defineProperty(exports, "AddressError", { enumerable: true, get: function () { return address_error_1.AddressError; } }); -const helpers = __importStar(require("./v6/helpers")); -exports.v6 = { helpers }; -//# sourceMappingURL=ip-address.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.js.map b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.js.map deleted file mode 100644 index d8d314e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ip-address.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ip-address.js","sourceRoot":"","sources":["../src/ip-address.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAkC;AAAzB,gGAAA,QAAQ,OAAA;AACjB,+BAAkC;AAAzB,gGAAA,QAAQ,OAAA;AACjB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AAErB,sDAAwC;AAE3B,QAAA,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC","sourcesContent":["export { Address4 } from './ipv4';\nexport { Address6 } from './ipv6';\nexport { AddressError } from './address-error';\n\nimport * as helpers from './v6/helpers';\n\nexport const v6 = { helpers };\n"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.d.ts b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.d.ts deleted file mode 100644 index 034ec65..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.d.ts +++ /dev/null @@ -1,267 +0,0 @@ -import * as common from './common'; -/** - * Represents an IPv4 address - * @param {string} address - An IPv4 address string - */ -export declare class Address4 { - address: string; - addressMinusSuffix?: string; - groups: number; - parsedAddress: string[]; - parsedSubnet: string; - subnet: string; - subnetMask: number; - v4: boolean; - private _binaryZeroPad?; - constructor(address: string); - /** - * Returns true if the given string is a valid IPv4 address (with optional - * CIDR subnet), false otherwise. Host bits in the subnet portion are - * allowed (e.g. `192.168.1.5/24` is valid); for strict network-address - * validation compare `correctForm()` to `startAddress().correctForm()`, - * or use `networkForm()`. - */ - static isValid(address: string): boolean; - /** - * Parses an IPv4 address string into its four octet groups and stores the - * result on `this.parsedAddress`. Called automatically by the constructor; - * you typically don't need to call it directly. Throws `AddressError` if - * the input is not a valid IPv4 address. - */ - parse(address: string): string[]; - /** - * Returns the address in correct form: octets joined with `.` and any - * leading zeros stripped (e.g. `192.168.1.1`). For IPv4 this matches the - * canonical dotted-decimal representation. - */ - correctForm(): string; - /** - * Returns true if the address is correct, false otherwise - * @returns {Boolean} - */ - isCorrect: (this: Address4 | import("./ipv6").Address6) => boolean; - /** - * Construct an `Address4` from an address and a dotted-decimal subnet - * mask given as separate strings (e.g. as returned by Node's - * `os.networkInterfaces()`). Throws `AddressError` if the mask is - * non-contiguous (e.g. `255.0.255.0`). - * @example - * var address = Address4.fromAddressAndMask('192.168.1.1', '255.255.255.0'); - * address.subnetMask; // 24 - */ - static fromAddressAndMask(address: string, mask: string): Address4; - /** - * Construct an `Address4` from an address and a Cisco-style wildcard mask - * given as separate strings (e.g. `0.0.0.255` for a `/24`). The wildcard - * mask is the bitwise inverse of the subnet mask. Throws `AddressError` - * if the mask is non-contiguous (e.g. `0.255.0.255`). - * @example - * var address = Address4.fromAddressAndWildcardMask('10.0.0.1', '0.0.0.255'); - * address.subnetMask; // 24 - */ - static fromAddressAndWildcardMask(address: string, wildcardMask: string): Address4; - /** - * Construct an `Address4` from a wildcard pattern with trailing `*` - * octets. The number of trailing wildcards determines the prefix - * length: each `*` represents 8 bits. - * - * Only trailing whole-octet wildcards are supported. Partial-octet - * wildcards (e.g. `192.168.0.1*`) and interior wildcards (e.g. - * `192.*.0.1`) throw `AddressError`. - * @example - * Address4.fromWildcard('192.168.0.*').subnet; // '/24' - * Address4.fromWildcard('192.168.*.*').subnet; // '/16' - * Address4.fromWildcard('*.*.*.*').subnet; // '/0' - */ - static fromWildcard(input: string): Address4; - /** - * Converts a hex string to an IPv4 address object. Accepts 8 hex digits - * with optional `:` separators (e.g. `'7f000001'` or `'7f:00:00:01'`). - * Throws `AddressError` for any other length or for non-hex characters. - * @param {string} hex - a hex string to convert - * @returns {Address4} - */ - static fromHex(hex: string): Address4; - /** - * Converts an integer into a IPv4 address object. The integer must be a - * non-negative safe integer in the range `[0, 2**32 - 1]`; otherwise - * `AddressError` is thrown. - * @param {integer} integer - a number to convert - * @returns {Address4} - */ - static fromInteger(integer: number): Address4; - /** - * Return an address from in-addr.arpa form - * @param {string} arpaFormAddress - an 'in-addr.arpa' form ipv4 address - * @returns {Adress4} - * @example - * var address = Address4.fromArpa(42.2.0.192.in-addr.arpa.) - * address.correctForm(); // '192.0.2.42' - */ - static fromArpa(arpaFormAddress: string): Address4; - /** - * Converts an IPv4 address object to a hex string - * @returns {String} - */ - toHex(): string; - /** - * Converts an IPv4 address object to an array of bytes. - * - * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toArray())`. - * @returns {Array} - */ - toArray(): number[]; - /** - * Converts an IPv4 address object to an IPv6 address group - * @returns {String} - */ - toGroup6(): string; - /** - * Returns the address as a `bigint` - * @returns {bigint} - */ - bigInt(): bigint; - /** - * Helper function getting start address. - * @returns {bigint} - */ - _startAddress(): bigint; - /** - * The first address in the range given by this address' subnet. - * Often referred to as the Network Address. - * @returns {Address4} - */ - startAddress(): Address4; - /** - * The first host address in the range given by this address's subnet ie - * the first address after the Network Address - * @returns {Address4} - */ - startAddressExclusive(): Address4; - /** - * Helper function getting end address. - * @returns {bigint} - */ - _endAddress(): bigint; - /** - * The last address in the range given by this address' subnet - * Often referred to as the Broadcast - * @returns {Address4} - */ - endAddress(): Address4; - /** - * The last host address in the range given by this address's subnet ie - * the last address prior to the Broadcast Address - * @returns {Address4} - */ - endAddressExclusive(): Address4; - /** - * The dotted-decimal form of the subnet mask, e.g. `255.255.240.0` for - * a `/20`. Returns an `Address4`; call `.correctForm()` for the string. - * @returns {Address4} - */ - subnetMaskAddress(): Address4; - /** - * The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is - * the bitwise inverse of `subnetMaskAddress()`. Returns an `Address4`; - * call `.correctForm()` for the string. - * @returns {Address4} - */ - wildcardMask(): Address4; - /** - * The network address in CIDR string form, e.g. `192.168.1.0/24` for - * `192.168.1.5/24`. For an address with no explicit subnet the prefix is - * `/32`, e.g. `networkForm()` on `192.168.1.5` returns `192.168.1.5/32`. - * @returns {string} - */ - networkForm(): string; - /** - * Converts a BigInt to a v4 address object. The value must be in the - * range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown. - * @param {bigint} bigInt - a BigInt to convert - * @returns {Address4} - */ - static fromBigInt(bigInt: bigint): Address4; - /** - * Convert a byte array to an Address4 object. - * - * To convert from a Node.js `Buffer`, spread it: `Address4.fromByteArray([...buf])`. - * @param {Array} bytes - an array of 4 bytes (0-255) - * @returns {Address4} - */ - static fromByteArray(bytes: Array): Address4; - /** - * Convert an unsigned byte array to an Address4 object - * @param {Array} bytes - an array of 4 unsigned bytes (0-255) - * @returns {Address4} - */ - static fromUnsignedByteArray(bytes: Array): Address4; - /** - * Returns the first n bits of the address, defaulting to the - * subnet mask - * @returns {String} - */ - mask(mask?: number): string; - /** - * Returns the bits in the given range as a base-2 string - * @returns {string} - */ - getBitsBase2(start: number, end: number): string; - /** - * Return the reversed ip6.arpa form of the address - * @param {Object} options - * @param {boolean} options.omitSuffix - omit the "in-addr.arpa" suffix - * @returns {String} - */ - reverseForm(options?: common.ReverseFormOptions): string; - /** - * Returns true if the given address is in the subnet of the current address - * @returns {boolean} - */ - isInSubnet: typeof common.isInSubnet; - /** - * Returns true if the given address is a multicast address - * @returns {boolean} - */ - isMulticast(): boolean; - /** - * Returns true if the address is in one of the [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private address ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`). - * @returns {boolean} - */ - isPrivate(): boolean; - /** - * Returns true if the address is in the loopback range `127.0.0.0/8` ([RFC 1122](https://datatracker.ietf.org/doc/html/rfc1122)). - * @returns {boolean} - */ - isLoopback(): boolean; - /** - * Returns true if the address is in the link-local range `169.254.0.0/16` ([RFC 3927](https://datatracker.ietf.org/doc/html/rfc3927)). - * @returns {boolean} - */ - isLinkLocal(): boolean; - /** - * Returns true if the address is the unspecified address `0.0.0.0`. - * @returns {boolean} - */ - isUnspecified(): boolean; - /** - * Returns true if the address is the limited broadcast address `255.255.255.255` ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)). - * @returns {boolean} - */ - isBroadcast(): boolean; - /** - * Returns true if the address is in the carrier-grade NAT range `100.64.0.0/10` ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)). - * @returns {boolean} - */ - isCGNAT(): boolean; - /** - * Returns a zero-padded base-2 string representation of the address - * @returns {string} - */ - binaryZeroPad(): string; - /** - * Groups an IPv4 address for inclusion at the end of an IPv6 address - * @returns {String} - */ - groupForV6(): string; -} diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.js b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.js deleted file mode 100644 index 2c0fd18..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.js +++ /dev/null @@ -1,485 +0,0 @@ -"use strict"; -/* eslint-disable no-param-reassign */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Address4 = void 0; -const common = __importStar(require("./common")); -const constants = __importStar(require("./v4/constants")); -const address_error_1 = require("./address-error"); -const isCorrect4 = common.isCorrect(constants.BITS); -/** - * Represents an IPv4 address - * @param {string} address - An IPv4 address string - */ -class Address4 { - constructor(address) { - this.groups = constants.GROUPS; - this.parsedAddress = []; - this.parsedSubnet = ''; - this.subnet = '/32'; - this.subnetMask = 32; - this.v4 = true; - /** - * Returns true if the address is correct, false otherwise - * @returns {Boolean} - */ - this.isCorrect = isCorrect4; - /** - * Returns true if the given address is in the subnet of the current address - * @returns {boolean} - */ - this.isInSubnet = common.isInSubnet; - this.address = address; - const subnet = constants.RE_SUBNET_STRING.exec(address); - if (subnet) { - this.parsedSubnet = subnet[0].replace('/', ''); - this.subnetMask = parseInt(this.parsedSubnet, 10); - this.subnet = `/${this.subnetMask}`; - if (this.subnetMask < 0 || this.subnetMask > constants.BITS) { - throw new address_error_1.AddressError('Invalid subnet mask.'); - } - address = address.replace(constants.RE_SUBNET_STRING, ''); - } - this.addressMinusSuffix = address; - this.parsedAddress = this.parse(address); - } - /** - * Returns true if the given string is a valid IPv4 address (with optional - * CIDR subnet), false otherwise. Host bits in the subnet portion are - * allowed (e.g. `192.168.1.5/24` is valid); for strict network-address - * validation compare `correctForm()` to `startAddress().correctForm()`, - * or use `networkForm()`. - */ - static isValid(address) { - try { - // eslint-disable-next-line no-new - new Address4(address); - return true; - } - catch (e) { - return false; - } - } - /** - * Parses an IPv4 address string into its four octet groups and stores the - * result on `this.parsedAddress`. Called automatically by the constructor; - * you typically don't need to call it directly. Throws `AddressError` if - * the input is not a valid IPv4 address. - */ - parse(address) { - const groups = address.split('.'); - if (!address.match(constants.RE_ADDRESS)) { - throw new address_error_1.AddressError('Invalid IPv4 address.'); - } - return groups; - } - /** - * Returns the address in correct form: octets joined with `.` and any - * leading zeros stripped (e.g. `192.168.1.1`). For IPv4 this matches the - * canonical dotted-decimal representation. - */ - correctForm() { - return this.parsedAddress.map((part) => parseInt(part, 10)).join('.'); - } - /** - * Construct an `Address4` from an address and a dotted-decimal subnet - * mask given as separate strings (e.g. as returned by Node's - * `os.networkInterfaces()`). Throws `AddressError` if the mask is - * non-contiguous (e.g. `255.0.255.0`). - * @example - * var address = Address4.fromAddressAndMask('192.168.1.1', '255.255.255.0'); - * address.subnetMask; // 24 - */ - static fromAddressAndMask(address, mask) { - const bits = common.prefixLengthFromMask(new Address4(mask).bigInt(), constants.BITS); - return new Address4(`${address}/${bits}`); - } - /** - * Construct an `Address4` from an address and a Cisco-style wildcard mask - * given as separate strings (e.g. `0.0.0.255` for a `/24`). The wildcard - * mask is the bitwise inverse of the subnet mask. Throws `AddressError` - * if the mask is non-contiguous (e.g. `0.255.0.255`). - * @example - * var address = Address4.fromAddressAndWildcardMask('10.0.0.1', '0.0.0.255'); - * address.subnetMask; // 24 - */ - static fromAddressAndWildcardMask(address, wildcardMask) { - const wildcard = new Address4(wildcardMask).bigInt(); - const allOnes = (BigInt(1) << BigInt(constants.BITS)) - BigInt(1); - // eslint-disable-next-line no-bitwise - const mask = wildcard ^ allOnes; - const bits = common.prefixLengthFromMask(mask, constants.BITS); - return new Address4(`${address}/${bits}`); - } - /** - * Construct an `Address4` from a wildcard pattern with trailing `*` - * octets. The number of trailing wildcards determines the prefix - * length: each `*` represents 8 bits. - * - * Only trailing whole-octet wildcards are supported. Partial-octet - * wildcards (e.g. `192.168.0.1*`) and interior wildcards (e.g. - * `192.*.0.1`) throw `AddressError`. - * @example - * Address4.fromWildcard('192.168.0.*').subnet; // '/24' - * Address4.fromWildcard('192.168.*.*').subnet; // '/16' - * Address4.fromWildcard('*.*.*.*').subnet; // '/0' - */ - static fromWildcard(input) { - const groups = input.split('.'); - if (groups.length !== constants.GROUPS) { - throw new address_error_1.AddressError('Wildcard pattern must have 4 octets'); - } - let firstWildcard = -1; - for (let i = 0; i < groups.length; i++) { - if (groups[i] === '*') { - if (firstWildcard === -1) { - firstWildcard = i; - } - } - else if (firstWildcard !== -1) { - throw new address_error_1.AddressError('Wildcard `*` must only appear in trailing octets (e.g. `192.168.0.*`)'); - } - } - const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard; - const replaced = groups.map((g) => (g === '*' ? '0' : g)); - const subnetBits = constants.BITS - trailing * 8; - return new Address4(`${replaced.join('.')}/${subnetBits}`); - } - /** - * Converts a hex string to an IPv4 address object. Accepts 8 hex digits - * with optional `:` separators (e.g. `'7f000001'` or `'7f:00:00:01'`). - * Throws `AddressError` for any other length or for non-hex characters. - * @param {string} hex - a hex string to convert - * @returns {Address4} - */ - static fromHex(hex) { - const stripped = hex.replace(/:/g, ''); - if (!/^[0-9a-fA-F]{8}$/.test(stripped)) { - throw new address_error_1.AddressError('IPv4 hex must be exactly 8 hex digits'); - } - const groups = []; - for (let i = 0; i < 8; i += 2) { - groups.push(parseInt(stripped.slice(i, i + 2), 16)); - } - return new Address4(groups.join('.')); - } - /** - * Converts an integer into a IPv4 address object. The integer must be a - * non-negative safe integer in the range `[0, 2**32 - 1]`; otherwise - * `AddressError` is thrown. - * @param {integer} integer - a number to convert - * @returns {Address4} - */ - static fromInteger(integer) { - if (!Number.isInteger(integer) || integer < 0 || integer > 0xffffffff) { - throw new address_error_1.AddressError('IPv4 integer must be in the range 0 to 2**32 - 1'); - } - return Address4.fromHex(integer.toString(16).padStart(8, '0')); - } - /** - * Return an address from in-addr.arpa form - * @param {string} arpaFormAddress - an 'in-addr.arpa' form ipv4 address - * @returns {Adress4} - * @example - * var address = Address4.fromArpa(42.2.0.192.in-addr.arpa.) - * address.correctForm(); // '192.0.2.42' - */ - static fromArpa(arpaFormAddress) { - // remove ending ".in-addr.arpa." or just "." - const leader = arpaFormAddress.replace(/(\.in-addr\.arpa)?\.$/, ''); - const address = leader.split('.').reverse().join('.'); - return new Address4(address); - } - /** - * Converts an IPv4 address object to a hex string - * @returns {String} - */ - toHex() { - return this.parsedAddress.map((part) => common.stringToPaddedHex(part)).join(':'); - } - /** - * Converts an IPv4 address object to an array of bytes. - * - * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toArray())`. - * @returns {Array} - */ - toArray() { - return this.parsedAddress.map((part) => parseInt(part, 10)); - } - /** - * Converts an IPv4 address object to an IPv6 address group - * @returns {String} - */ - toGroup6() { - const output = []; - let i; - for (i = 0; i < constants.GROUPS; i += 2) { - output.push(`${common.stringToPaddedHex(this.parsedAddress[i])}${common.stringToPaddedHex(this.parsedAddress[i + 1])}`); - } - return output.join(':'); - } - /** - * Returns the address as a `bigint` - * @returns {bigint} - */ - bigInt() { - return BigInt(`0x${this.parsedAddress.map((n) => common.stringToPaddedHex(n)).join('')}`); - } - /** - * Helper function getting start address. - * @returns {bigint} - */ - _startAddress() { - return BigInt(`0b${this.mask() + '0'.repeat(constants.BITS - this.subnetMask)}`); - } - /** - * The first address in the range given by this address' subnet. - * Often referred to as the Network Address. - * @returns {Address4} - */ - startAddress() { - return Address4.fromBigInt(this._startAddress()); - } - /** - * The first host address in the range given by this address's subnet ie - * the first address after the Network Address - * @returns {Address4} - */ - startAddressExclusive() { - const adjust = BigInt('1'); - return Address4.fromBigInt(this._startAddress() + adjust); - } - /** - * Helper function getting end address. - * @returns {bigint} - */ - _endAddress() { - return BigInt(`0b${this.mask() + '1'.repeat(constants.BITS - this.subnetMask)}`); - } - /** - * The last address in the range given by this address' subnet - * Often referred to as the Broadcast - * @returns {Address4} - */ - endAddress() { - return Address4.fromBigInt(this._endAddress()); - } - /** - * The last host address in the range given by this address's subnet ie - * the last address prior to the Broadcast Address - * @returns {Address4} - */ - endAddressExclusive() { - const adjust = BigInt('1'); - return Address4.fromBigInt(this._endAddress() - adjust); - } - /** - * The dotted-decimal form of the subnet mask, e.g. `255.255.240.0` for - * a `/20`. Returns an `Address4`; call `.correctForm()` for the string. - * @returns {Address4} - */ - subnetMaskAddress() { - return Address4.fromBigInt(BigInt(`0b${'1'.repeat(this.subnetMask)}${'0'.repeat(constants.BITS - this.subnetMask)}`)); - } - /** - * The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is - * the bitwise inverse of `subnetMaskAddress()`. Returns an `Address4`; - * call `.correctForm()` for the string. - * @returns {Address4} - */ - wildcardMask() { - return Address4.fromBigInt(BigInt(`0b${'0'.repeat(this.subnetMask)}${'1'.repeat(constants.BITS - this.subnetMask)}`)); - } - /** - * The network address in CIDR string form, e.g. `192.168.1.0/24` for - * `192.168.1.5/24`. For an address with no explicit subnet the prefix is - * `/32`, e.g. `networkForm()` on `192.168.1.5` returns `192.168.1.5/32`. - * @returns {string} - */ - networkForm() { - return `${this.startAddress().correctForm()}/${this.subnetMask}`; - } - /** - * Converts a BigInt to a v4 address object. The value must be in the - * range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown. - * @param {bigint} bigInt - a BigInt to convert - * @returns {Address4} - */ - static fromBigInt(bigInt) { - if (bigInt < 0n || bigInt > 0xffffffffn) { - throw new address_error_1.AddressError('IPv4 BigInt must be in the range 0 to 2**32 - 1'); - } - return Address4.fromHex(bigInt.toString(16).padStart(8, '0')); - } - /** - * Convert a byte array to an Address4 object. - * - * To convert from a Node.js `Buffer`, spread it: `Address4.fromByteArray([...buf])`. - * @param {Array} bytes - an array of 4 bytes (0-255) - * @returns {Address4} - */ - static fromByteArray(bytes) { - if (bytes.length !== 4) { - throw new address_error_1.AddressError('IPv4 addresses require exactly 4 bytes'); - } - // Validate that all bytes are within valid range (0-255) - for (let i = 0; i < bytes.length; i++) { - if (!Number.isInteger(bytes[i]) || bytes[i] < 0 || bytes[i] > 255) { - throw new address_error_1.AddressError('All bytes must be integers between 0 and 255'); - } - } - return this.fromUnsignedByteArray(bytes); - } - /** - * Convert an unsigned byte array to an Address4 object - * @param {Array} bytes - an array of 4 unsigned bytes (0-255) - * @returns {Address4} - */ - static fromUnsignedByteArray(bytes) { - if (bytes.length !== 4) { - throw new address_error_1.AddressError('IPv4 addresses require exactly 4 bytes'); - } - const address = bytes.join('.'); - return new Address4(address); - } - /** - * Returns the first n bits of the address, defaulting to the - * subnet mask - * @returns {String} - */ - mask(mask) { - if (mask === undefined) { - mask = this.subnetMask; - } - return this.getBitsBase2(0, mask); - } - /** - * Returns the bits in the given range as a base-2 string - * @returns {string} - */ - getBitsBase2(start, end) { - return this.binaryZeroPad().slice(start, end); - } - /** - * Return the reversed ip6.arpa form of the address - * @param {Object} options - * @param {boolean} options.omitSuffix - omit the "in-addr.arpa" suffix - * @returns {String} - */ - reverseForm(options) { - if (!options) { - options = {}; - } - const reversed = this.correctForm().split('.').reverse().join('.'); - if (options.omitSuffix) { - return reversed; - } - return `${reversed}.in-addr.arpa.`; - } - /** - * Returns true if the given address is a multicast address - * @returns {boolean} - */ - isMulticast() { - return this.isInSubnet(MULTICAST_V4); - } - /** - * Returns true if the address is in one of the [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private address ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`). - * @returns {boolean} - */ - isPrivate() { - return PRIVATE_V4.some((subnet) => this.isInSubnet(subnet)); - } - /** - * Returns true if the address is in the loopback range `127.0.0.0/8` ([RFC 1122](https://datatracker.ietf.org/doc/html/rfc1122)). - * @returns {boolean} - */ - isLoopback() { - return this.isInSubnet(LOOPBACK_V4); - } - /** - * Returns true if the address is in the link-local range `169.254.0.0/16` ([RFC 3927](https://datatracker.ietf.org/doc/html/rfc3927)). - * @returns {boolean} - */ - isLinkLocal() { - return this.isInSubnet(LINK_LOCAL_V4); - } - /** - * Returns true if the address is the unspecified address `0.0.0.0`. - * @returns {boolean} - */ - isUnspecified() { - return this.isInSubnet(UNSPECIFIED_V4); - } - /** - * Returns true if the address is the limited broadcast address `255.255.255.255` ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)). - * @returns {boolean} - */ - isBroadcast() { - return this.isInSubnet(BROADCAST_V4); - } - /** - * Returns true if the address is in the carrier-grade NAT range `100.64.0.0/10` ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)). - * @returns {boolean} - */ - isCGNAT() { - return this.isInSubnet(CGNAT_V4); - } - /** - * Returns a zero-padded base-2 string representation of the address - * @returns {string} - */ - binaryZeroPad() { - if (this._binaryZeroPad === undefined) { - this._binaryZeroPad = this.bigInt().toString(2).padStart(constants.BITS, '0'); - } - return this._binaryZeroPad; - } - /** - * Groups an IPv4 address for inclusion at the end of an IPv6 address - * @returns {String} - */ - groupForV6() { - const segments = this.parsedAddress; - return this.address.replace(constants.RE_ADDRESS, `${segments - .slice(0, 2) - .join('.')}.${segments - .slice(2, 4) - .join('.')}`); - } -} -exports.Address4 = Address4; -const MULTICAST_V4 = new Address4('224.0.0.0/4'); -const PRIVATE_V4 = [ - new Address4('10.0.0.0/8'), - new Address4('172.16.0.0/12'), - new Address4('192.168.0.0/16'), -]; -const LOOPBACK_V4 = new Address4('127.0.0.0/8'); -const LINK_LOCAL_V4 = new Address4('169.254.0.0/16'); -const UNSPECIFIED_V4 = new Address4('0.0.0.0/32'); -const BROADCAST_V4 = new Address4('255.255.255.255/32'); -const CGNAT_V4 = new Address4('100.64.0.0/10'); -//# sourceMappingURL=ipv4.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.js.map b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.js.map deleted file mode 100644 index d0b8c64..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv4.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ipv4.js","sourceRoot":"","sources":["../src/ipv4.ts"],"names":[],"mappings":";AAAA,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,iDAAmC;AACnC,0DAA4C;AAC5C,mDAA+C;AAE/C,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAEpD;;;GAGG;AACH,MAAa,QAAQ;IAWnB,YAAY,OAAe;QAR3B,WAAM,GAAW,SAAS,CAAC,MAAM,CAAC;QAClC,kBAAa,GAAa,EAAE,CAAC;QAC7B,iBAAY,GAAW,EAAE,CAAC;QAC1B,WAAM,GAAW,KAAK,CAAC;QACvB,eAAU,GAAW,EAAE,CAAC;QACxB,OAAE,GAAY,IAAI,CAAC;QAoEnB;;;WAGG;QACH,cAAS,GAAG,UAAU,CAAC;QAiWvB;;;WAGG;QACH,eAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAza7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,MAAM,GAAG,SAAS,CAAC,gBAAgB,CAA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AC,YAAY,CAAC,CAAC;AAClD,MAAM,YAAY,GAAG,IAAI,QAAQ,CAAC,oBAAoB,CAAC,CAAC;AACxD,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC","sourcesContent":["/* eslint-disable no-param-reassign */\n\nimport * as common from './common';\nimport * as constants from './v4/constants';\nimport { AddressError } from './address-error';\n\nconst isCorrect4 = common.isCorrect(constants.BITS);\n\n/**\n * Represents an IPv4 address\n * @param {string} address - An IPv4 address string\n */\nexport class Address4 {\n address: string;\n addressMinusSuffix?: string;\n groups: number = constants.GROUPS;\n parsedAddress: string[] = [];\n parsedSubnet: string = '';\n subnet: string = '/32';\n subnetMask: number = 32;\n v4: boolean = true;\n private _binaryZeroPad?: string;\n\n constructor(address: string) {\n this.address = address;\n\n const subnet = constants.RE_SUBNET_STRING.exec(address);\n\n if (subnet) {\n this.parsedSubnet = subnet[0].replace('/', '');\n this.subnetMask = parseInt(this.parsedSubnet, 10);\n this.subnet = `/${this.subnetMask}`;\n\n if (this.subnetMask < 0 || this.subnetMask > constants.BITS) {\n throw new AddressError('Invalid subnet mask.');\n }\n\n address = address.replace(constants.RE_SUBNET_STRING, '');\n }\n\n this.addressMinusSuffix = address;\n\n this.parsedAddress = this.parse(address);\n }\n\n /**\n * Returns true if the given string is a valid IPv4 address (with optional\n * CIDR subnet), false otherwise. Host bits in the subnet portion are\n * allowed (e.g. `192.168.1.5/24` is valid); for strict network-address\n * validation compare `correctForm()` to `startAddress().correctForm()`,\n * or use `networkForm()`.\n */\n static isValid(address: string): boolean {\n try {\n // eslint-disable-next-line no-new\n new Address4(address);\n\n return true;\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Parses an IPv4 address string into its four octet groups and stores the\n * result on `this.parsedAddress`. Called automatically by the constructor;\n * you typically don't need to call it directly. Throws `AddressError` if\n * the input is not a valid IPv4 address.\n */\n parse(address: string) {\n const groups = address.split('.');\n\n if (!address.match(constants.RE_ADDRESS)) {\n throw new AddressError('Invalid IPv4 address.');\n }\n\n return groups;\n }\n\n /**\n * Returns the address in correct form: octets joined with `.` and any\n * leading zeros stripped (e.g. `192.168.1.1`). For IPv4 this matches the\n * canonical dotted-decimal representation.\n */\n correctForm(): string {\n return this.parsedAddress.map((part) => parseInt(part, 10)).join('.');\n }\n\n /**\n * Returns true if the address is correct, false otherwise\n * @returns {Boolean}\n */\n isCorrect = isCorrect4;\n\n /**\n * Construct an `Address4` from an address and a dotted-decimal subnet\n * mask given as separate strings (e.g. as returned by Node's\n * `os.networkInterfaces()`). Throws `AddressError` if the mask is\n * non-contiguous (e.g. `255.0.255.0`).\n * @example\n * var address = Address4.fromAddressAndMask('192.168.1.1', '255.255.255.0');\n * address.subnetMask; // 24\n */\n static fromAddressAndMask(address: string, mask: string): Address4 {\n const bits = common.prefixLengthFromMask(new Address4(mask).bigInt(), constants.BITS);\n return new Address4(`${address}/${bits}`);\n }\n\n /**\n * Construct an `Address4` from an address and a Cisco-style wildcard mask\n * given as separate strings (e.g. `0.0.0.255` for a `/24`). The wildcard\n * mask is the bitwise inverse of the subnet mask. Throws `AddressError`\n * if the mask is non-contiguous (e.g. `0.255.0.255`).\n * @example\n * var address = Address4.fromAddressAndWildcardMask('10.0.0.1', '0.0.0.255');\n * address.subnetMask; // 24\n */\n static fromAddressAndWildcardMask(address: string, wildcardMask: string): Address4 {\n const wildcard = new Address4(wildcardMask).bigInt();\n const allOnes = (BigInt(1) << BigInt(constants.BITS)) - BigInt(1);\n // eslint-disable-next-line no-bitwise\n const mask = wildcard ^ allOnes;\n const bits = common.prefixLengthFromMask(mask, constants.BITS);\n return new Address4(`${address}/${bits}`);\n }\n\n /**\n * Construct an `Address4` from a wildcard pattern with trailing `*`\n * octets. The number of trailing wildcards determines the prefix\n * length: each `*` represents 8 bits.\n *\n * Only trailing whole-octet wildcards are supported. Partial-octet\n * wildcards (e.g. `192.168.0.1*`) and interior wildcards (e.g.\n * `192.*.0.1`) throw `AddressError`.\n * @example\n * Address4.fromWildcard('192.168.0.*').subnet; // '/24'\n * Address4.fromWildcard('192.168.*.*').subnet; // '/16'\n * Address4.fromWildcard('*.*.*.*').subnet; // '/0'\n */\n static fromWildcard(input: string): Address4 {\n const groups = input.split('.');\n\n if (groups.length !== constants.GROUPS) {\n throw new AddressError('Wildcard pattern must have 4 octets');\n }\n\n let firstWildcard = -1;\n\n for (let i = 0; i < groups.length; i++) {\n if (groups[i] === '*') {\n if (firstWildcard === -1) {\n firstWildcard = i;\n }\n } else if (firstWildcard !== -1) {\n throw new AddressError(\n 'Wildcard `*` must only appear in trailing octets (e.g. `192.168.0.*`)',\n );\n }\n }\n\n const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard;\n const replaced = groups.map((g) => (g === '*' ? '0' : g));\n const subnetBits = constants.BITS - trailing * 8;\n\n return new Address4(`${replaced.join('.')}/${subnetBits}`);\n }\n\n /**\n * Converts a hex string to an IPv4 address object. Accepts 8 hex digits\n * with optional `:` separators (e.g. `'7f000001'` or `'7f:00:00:01'`).\n * Throws `AddressError` for any other length or for non-hex characters.\n * @param {string} hex - a hex string to convert\n * @returns {Address4}\n */\n static fromHex(hex: string): Address4 {\n const stripped = hex.replace(/:/g, '');\n\n if (!/^[0-9a-fA-F]{8}$/.test(stripped)) {\n throw new AddressError('IPv4 hex must be exactly 8 hex digits');\n }\n\n const groups = [];\n\n for (let i = 0; i < 8; i += 2) {\n groups.push(parseInt(stripped.slice(i, i + 2), 16));\n }\n\n return new Address4(groups.join('.'));\n }\n\n /**\n * Converts an integer into a IPv4 address object. The integer must be a\n * non-negative safe integer in the range `[0, 2**32 - 1]`; otherwise\n * `AddressError` is thrown.\n * @param {integer} integer - a number to convert\n * @returns {Address4}\n */\n static fromInteger(integer: number): Address4 {\n if (!Number.isInteger(integer) || integer < 0 || integer > 0xffffffff) {\n throw new AddressError('IPv4 integer must be in the range 0 to 2**32 - 1');\n }\n\n return Address4.fromHex(integer.toString(16).padStart(8, '0'));\n }\n\n /**\n * Return an address from in-addr.arpa form\n * @param {string} arpaFormAddress - an 'in-addr.arpa' form ipv4 address\n * @returns {Adress4}\n * @example\n * var address = Address4.fromArpa(42.2.0.192.in-addr.arpa.)\n * address.correctForm(); // '192.0.2.42'\n */\n static fromArpa(arpaFormAddress: string): Address4 {\n // remove ending \".in-addr.arpa.\" or just \".\"\n const leader = arpaFormAddress.replace(/(\\.in-addr\\.arpa)?\\.$/, '');\n\n const address = leader.split('.').reverse().join('.');\n\n return new Address4(address);\n }\n\n /**\n * Converts an IPv4 address object to a hex string\n * @returns {String}\n */\n toHex(): string {\n return this.parsedAddress.map((part) => common.stringToPaddedHex(part)).join(':');\n }\n\n /**\n * Converts an IPv4 address object to an array of bytes.\n *\n * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toArray())`.\n * @returns {Array}\n */\n toArray(): number[] {\n return this.parsedAddress.map((part) => parseInt(part, 10));\n }\n\n /**\n * Converts an IPv4 address object to an IPv6 address group\n * @returns {String}\n */\n toGroup6(): string {\n const output = [];\n let i;\n\n for (i = 0; i < constants.GROUPS; i += 2) {\n output.push(\n `${common.stringToPaddedHex(this.parsedAddress[i])}${common.stringToPaddedHex(\n this.parsedAddress[i + 1],\n )}`,\n );\n }\n\n return output.join(':');\n }\n\n /**\n * Returns the address as a `bigint`\n * @returns {bigint}\n */\n bigInt(): bigint {\n return BigInt(`0x${this.parsedAddress.map((n) => common.stringToPaddedHex(n)).join('')}`);\n }\n\n /**\n * Helper function getting start address.\n * @returns {bigint}\n */\n _startAddress(): bigint {\n return BigInt(`0b${this.mask() + '0'.repeat(constants.BITS - this.subnetMask)}`);\n }\n\n /**\n * The first address in the range given by this address' subnet.\n * Often referred to as the Network Address.\n * @returns {Address4}\n */\n startAddress(): Address4 {\n return Address4.fromBigInt(this._startAddress());\n }\n\n /**\n * The first host address in the range given by this address's subnet ie\n * the first address after the Network Address\n * @returns {Address4}\n */\n startAddressExclusive(): Address4 {\n const adjust = BigInt('1');\n return Address4.fromBigInt(this._startAddress() + adjust);\n }\n\n /**\n * Helper function getting end address.\n * @returns {bigint}\n */\n _endAddress(): bigint {\n return BigInt(`0b${this.mask() + '1'.repeat(constants.BITS - this.subnetMask)}`);\n }\n\n /**\n * The last address in the range given by this address' subnet\n * Often referred to as the Broadcast\n * @returns {Address4}\n */\n endAddress(): Address4 {\n return Address4.fromBigInt(this._endAddress());\n }\n\n /**\n * The last host address in the range given by this address's subnet ie\n * the last address prior to the Broadcast Address\n * @returns {Address4}\n */\n endAddressExclusive(): Address4 {\n const adjust = BigInt('1');\n return Address4.fromBigInt(this._endAddress() - adjust);\n }\n\n /**\n * The dotted-decimal form of the subnet mask, e.g. `255.255.240.0` for\n * a `/20`. Returns an `Address4`; call `.correctForm()` for the string.\n * @returns {Address4}\n */\n subnetMaskAddress(): Address4 {\n return Address4.fromBigInt(\n BigInt(`0b${'1'.repeat(this.subnetMask)}${'0'.repeat(constants.BITS - this.subnetMask)}`),\n );\n }\n\n /**\n * The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is\n * the bitwise inverse of `subnetMaskAddress()`. Returns an `Address4`;\n * call `.correctForm()` for the string.\n * @returns {Address4}\n */\n wildcardMask(): Address4 {\n return Address4.fromBigInt(\n BigInt(`0b${'0'.repeat(this.subnetMask)}${'1'.repeat(constants.BITS - this.subnetMask)}`),\n );\n }\n\n /**\n * The network address in CIDR string form, e.g. `192.168.1.0/24` for\n * `192.168.1.5/24`. For an address with no explicit subnet the prefix is\n * `/32`, e.g. `networkForm()` on `192.168.1.5` returns `192.168.1.5/32`.\n * @returns {string}\n */\n networkForm(): string {\n return `${this.startAddress().correctForm()}/${this.subnetMask}`;\n }\n\n /**\n * Converts a BigInt to a v4 address object. The value must be in the\n * range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown.\n * @param {bigint} bigInt - a BigInt to convert\n * @returns {Address4}\n */\n static fromBigInt(bigInt: bigint): Address4 {\n if (bigInt < 0n || bigInt > 0xffffffffn) {\n throw new AddressError('IPv4 BigInt must be in the range 0 to 2**32 - 1');\n }\n\n return Address4.fromHex(bigInt.toString(16).padStart(8, '0'));\n }\n\n /**\n * Convert a byte array to an Address4 object.\n *\n * To convert from a Node.js `Buffer`, spread it: `Address4.fromByteArray([...buf])`.\n * @param {Array} bytes - an array of 4 bytes (0-255)\n * @returns {Address4}\n */\n static fromByteArray(bytes: Array): Address4 {\n if (bytes.length !== 4) {\n throw new AddressError('IPv4 addresses require exactly 4 bytes');\n }\n\n // Validate that all bytes are within valid range (0-255)\n for (let i = 0; i < bytes.length; i++) {\n if (!Number.isInteger(bytes[i]) || bytes[i] < 0 || bytes[i] > 255) {\n throw new AddressError('All bytes must be integers between 0 and 255');\n }\n }\n\n return this.fromUnsignedByteArray(bytes);\n }\n\n /**\n * Convert an unsigned byte array to an Address4 object\n * @param {Array} bytes - an array of 4 unsigned bytes (0-255)\n * @returns {Address4}\n */\n static fromUnsignedByteArray(bytes: Array): Address4 {\n if (bytes.length !== 4) {\n throw new AddressError('IPv4 addresses require exactly 4 bytes');\n }\n\n const address = bytes.join('.');\n return new Address4(address);\n }\n\n /**\n * Returns the first n bits of the address, defaulting to the\n * subnet mask\n * @returns {String}\n */\n mask(mask?: number): string {\n if (mask === undefined) {\n mask = this.subnetMask;\n }\n\n return this.getBitsBase2(0, mask);\n }\n\n /**\n * Returns the bits in the given range as a base-2 string\n * @returns {string}\n */\n getBitsBase2(start: number, end: number): string {\n return this.binaryZeroPad().slice(start, end);\n }\n\n /**\n * Return the reversed ip6.arpa form of the address\n * @param {Object} options\n * @param {boolean} options.omitSuffix - omit the \"in-addr.arpa\" suffix\n * @returns {String}\n */\n reverseForm(options?: common.ReverseFormOptions): string {\n if (!options) {\n options = {};\n }\n\n const reversed = this.correctForm().split('.').reverse().join('.');\n\n if (options.omitSuffix) {\n return reversed;\n }\n\n return `${reversed}.in-addr.arpa.`;\n }\n\n /**\n * Returns true if the given address is in the subnet of the current address\n * @returns {boolean}\n */\n isInSubnet = common.isInSubnet;\n\n /**\n * Returns true if the given address is a multicast address\n * @returns {boolean}\n */\n isMulticast(): boolean {\n return this.isInSubnet(MULTICAST_V4);\n }\n\n /**\n * Returns true if the address is in one of the [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private address ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`).\n * @returns {boolean}\n */\n isPrivate(): boolean {\n return PRIVATE_V4.some((subnet) => this.isInSubnet(subnet));\n }\n\n /**\n * Returns true if the address is in the loopback range `127.0.0.0/8` ([RFC 1122](https://datatracker.ietf.org/doc/html/rfc1122)).\n * @returns {boolean}\n */\n isLoopback(): boolean {\n return this.isInSubnet(LOOPBACK_V4);\n }\n\n /**\n * Returns true if the address is in the link-local range `169.254.0.0/16` ([RFC 3927](https://datatracker.ietf.org/doc/html/rfc3927)).\n * @returns {boolean}\n */\n isLinkLocal(): boolean {\n return this.isInSubnet(LINK_LOCAL_V4);\n }\n\n /**\n * Returns true if the address is the unspecified address `0.0.0.0`.\n * @returns {boolean}\n */\n isUnspecified(): boolean {\n return this.isInSubnet(UNSPECIFIED_V4);\n }\n\n /**\n * Returns true if the address is the limited broadcast address `255.255.255.255` ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)).\n * @returns {boolean}\n */\n isBroadcast(): boolean {\n return this.isInSubnet(BROADCAST_V4);\n }\n\n /**\n * Returns true if the address is in the carrier-grade NAT range `100.64.0.0/10` ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)).\n * @returns {boolean}\n */\n isCGNAT(): boolean {\n return this.isInSubnet(CGNAT_V4);\n }\n\n /**\n * Returns a zero-padded base-2 string representation of the address\n * @returns {string}\n */\n binaryZeroPad(): string {\n if (this._binaryZeroPad === undefined) {\n this._binaryZeroPad = this.bigInt().toString(2).padStart(constants.BITS, '0');\n }\n return this._binaryZeroPad;\n }\n\n /**\n * Groups an IPv4 address for inclusion at the end of an IPv6 address\n * @returns {String}\n */\n groupForV6(): string {\n const segments = this.parsedAddress;\n\n return this.address.replace(\n constants.RE_ADDRESS,\n `${segments\n .slice(0, 2)\n .join('.')}.${segments\n .slice(2, 4)\n .join('.')}`,\n );\n }\n}\n\nconst MULTICAST_V4 = new Address4('224.0.0.0/4');\nconst PRIVATE_V4 = [\n new Address4('10.0.0.0/8'),\n new Address4('172.16.0.0/12'),\n new Address4('192.168.0.0/16'),\n];\nconst LOOPBACK_V4 = new Address4('127.0.0.0/8');\nconst LINK_LOCAL_V4 = new Address4('169.254.0.0/16');\nconst UNSPECIFIED_V4 = new Address4('0.0.0.0/32');\nconst BROADCAST_V4 = new Address4('255.255.255.255/32');\nconst CGNAT_V4 = new Address4('100.64.0.0/10');\n"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.d.ts b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.d.ts deleted file mode 100644 index d4f841d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.d.ts +++ /dev/null @@ -1,489 +0,0 @@ -import * as common from './common'; -import { Address4 } from './ipv4'; -interface SixToFourProperties { - prefix: string; - gateway: string; -} -interface TeredoProperties { - prefix: string; - server4: string; - client4: string; - flags: string; - coneNat: boolean; - microsoft: { - reserved: boolean; - universalLocal: boolean; - groupIndividual: boolean; - nonce: string; - }; - udpPort: string; -} -/** - * Represents an IPv6 address - * @param {string} address - An IPv6 address string - * @param {number} [groups=8] - How many octets to parse - * @example - * var address = new Address6('2001::/32'); - */ -export declare class Address6 { - address4?: Address4; - address: string; - addressMinusSuffix: string; - elidedGroups?: number; - elisionBegin?: number; - elisionEnd?: number; - groups: number; - parsedAddress4?: string; - parsedAddress: string[]; - parsedSubnet: string; - subnet: string; - subnetMask: number; - v4: boolean; - zone: string; - private _binaryZeroPad?; - constructor(address: string, optionalGroups?: number); - /** - * Returns true if the given string is a valid IPv6 address (with optional - * CIDR subnet and zone identifier), false otherwise. Host bits in the - * subnet portion are allowed (e.g. `2001:db8::1/32` is valid); for strict - * network-address validation compare `correctForm()` to - * `startAddress().correctForm()`, or use `networkForm()`. - */ - static isValid(address: string): boolean; - /** - * Convert a BigInt to a v6 address object. The value must be in the - * range `[0, 2**128 - 1]`; otherwise `AddressError` is thrown. - * @param {bigint} bigInt - a BigInt to convert - * @returns {Address6} - * @example - * var bigInt = BigInt('1000000000000'); - * var address = Address6.fromBigInt(bigInt); - * address.correctForm(); // '::e8:d4a5:1000' - */ - static fromBigInt(bigInt: bigint): Address6; - /** - * Parse a URL (with optional bracketed host and port) into an address and - * port. Returns either `{ address, port }` on success or - * `{ error, address: null, port: null }` if the URL could not be parsed. - * Ports are returned as numbers (or `null` if absent or out of range). - * @example - * var addressAndPort = Address6.fromURL('http://[ffff::]:8080/foo/'); - * addressAndPort.address.correctForm(); // 'ffff::' - * addressAndPort.port; // 8080 - */ - static fromURL(url: string): { - error: string; - address: null; - port: null; - } | { - address: Address6; - port: number | null; - error?: undefined; - }; - /** - * Construct an `Address6` from an address and a hex subnet mask given as - * separate strings (e.g. as returned by Node's `os.networkInterfaces()`). - * Throws `AddressError` if the mask is non-contiguous (e.g. - * `ffff::ffff`). - * @example - * var address = Address6.fromAddressAndMask('fe80::1', 'ffff:ffff:ffff:ffff::'); - * address.subnetMask; // 64 - */ - static fromAddressAndMask(address: string, mask: string): Address6; - /** - * Construct an `Address6` from an address and a Cisco-style wildcard mask - * given as separate strings (e.g. `::ffff:ffff:ffff:ffff` for a `/64`). - * The wildcard mask is the bitwise inverse of the subnet mask. Throws - * `AddressError` if the mask is non-contiguous. - * @example - * var address = Address6.fromAddressAndWildcardMask('fe80::1', '::ffff:ffff:ffff:ffff'); - * address.subnetMask; // 64 - */ - static fromAddressAndWildcardMask(address: string, wildcardMask: string): Address6; - /** - * Construct an `Address6` from a wildcard pattern with trailing `*` - * groups. The number of trailing wildcards determines the prefix - * length: each `*` represents 16 bits. `::` is expanded to zero groups - * (not wildcards) before evaluating trailing wildcards. - * - * Only trailing whole-group wildcards are supported. Partial-group - * wildcards (e.g. `2001:db8::0*`) and interior wildcards (e.g. - * `*::1`) throw `AddressError`. - * @example - * Address6.fromWildcard('2001:db8:*:*:*:*:*:*').subnet; // '/32' - * Address6.fromWildcard('2001:db8::*').subnet; // '/112' - * Address6.fromWildcard('*:*:*:*:*:*:*:*').subnet; // '/0' - */ - static fromWildcard(input: string): Address6; - /** - * Create an IPv6-mapped address given an IPv4 address - * @param {string} address - An IPv4 address string - * @returns {Address6} - * @example - * var address = Address6.fromAddress4('192.168.0.1'); - * address.correctForm(); // '::ffff:c0a8:1' - * address.to4in6(); // '::ffff:192.168.0.1' - */ - static fromAddress4(address: string): Address6; - /** - * Return an address from ip6.arpa form - * @param {string} arpaFormAddress - an 'ip6.arpa' form address - * @returns {Adress6} - * @example - * var address = Address6.fromArpa(e.f.f.f.3.c.2.6.f.f.f.e.6.6.8.e.1.0.6.7.9.4.e.c.0.0.0.0.1.0.0.2.ip6.arpa.) - * address.correctForm(); // '2001:0:ce49:7601:e866:efff:62c3:fffe' - */ - static fromArpa(arpaFormAddress: string): Address6; - /** - * Return the Microsoft UNC transcription of the address - * @returns {String} the Microsoft UNC transcription of the address - */ - microsoftTranscription(): string; - /** - * Return the first n bits of the address, defaulting to the subnet mask - * @param {number} [mask=subnet] - the number of bits to mask - * @returns {String} the first n bits of the address as a string - */ - mask(mask?: number): string; - /** - * Return the number of possible subnets of a given size in the address - * @param {number} [subnetSize=128] - the subnet size - * @returns {String} - */ - possibleSubnets(subnetSize?: number): string; - /** - * Helper function getting start address. - * @returns {bigint} - */ - _startAddress(): bigint; - /** - * The first address in the range given by this address' subnet - * Often referred to as the Network Address. - * @returns {Address6} - */ - startAddress(): Address6; - /** - * The first host address in the range given by this address's subnet ie - * the first address after the Network Address - * @returns {Address6} - */ - startAddressExclusive(): Address6; - /** - * Helper function getting end address. - * @returns {bigint} - */ - _endAddress(): bigint; - /** - * The last address in the range given by this address' subnet - * Often referred to as the Broadcast - * @returns {Address6} - */ - endAddress(): Address6; - /** - * The last host address in the range given by this address's subnet ie - * the last address prior to the Broadcast Address - * @returns {Address6} - */ - endAddressExclusive(): Address6; - /** - * The hex form of the subnet mask, e.g. `ffff:ffff:ffff:ffff::` for a - * `/64`. Returns an `Address6`; call `.correctForm()` for the string. - * @returns {Address6} - */ - subnetMaskAddress(): Address6; - /** - * The Cisco-style wildcard mask, e.g. `::ffff:ffff:ffff:ffff` for a - * `/64`. This is the bitwise inverse of `subnetMaskAddress()`. Returns - * an `Address6`; call `.correctForm()` for the string. - * @returns {Address6} - */ - wildcardMask(): Address6; - /** - * The network address in CIDR string form, e.g. `2001:db8::/32` for - * `2001:db8::1/32`. For an address with no explicit subnet the prefix - * is `/128`, e.g. `networkForm()` on `2001:db8::1` returns - * `2001:db8::1/128`. - * @returns {string} - */ - networkForm(): string; - /** - * Return the scope of the address. The 4-bit scope field - * ([RFC 4291 §2.7](https://datatracker.ietf.org/doc/html/rfc4291#section-2.7)) - * is only defined for multicast addresses; for unicast addresses the scope - * is derived from the address type per - * [RFC 4007 §6](https://datatracker.ietf.org/doc/html/rfc4007#section-6). - * @returns {String} - */ - getScope(): string; - /** - * Return the type of the address - * @returns {String} - */ - getType(): string; - /** - * Return the bits in the given range as a BigInt - * @returns {bigint} - */ - getBits(start: number, end: number): bigint; - /** - * Return the bits in the given range as a base-2 string - * @returns {String} - */ - getBitsBase2(start: number, end: number): string; - /** - * Return the bits in the given range as a base-16 string - * @returns {String} - */ - getBitsBase16(start: number, end: number): string; - /** - * Return the bits that are set past the subnet mask length - * @returns {String} - */ - getBitsPastSubnet(): string; - /** - * Return the reversed ip6.arpa form of the address - * @param {Object} options - * @param {boolean} options.omitSuffix - omit the "ip6.arpa" suffix - * @returns {String} - */ - reverseForm(options?: common.ReverseFormOptions): string; - /** - * Returns the address in correct form, per - * [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952): leading zeros - * stripped, the longest run of zero groups collapsed to `::`, and hex digits - * lowercased (e.g. `2001:db8::1`). This is the recommended form for display. - */ - correctForm(): string; - /** - * Return a zero-padded base-2 string representation of the address - * @returns {String} - * @example - * var address = new Address6('2001:4860:4001:803::1011'); - * address.binaryZeroPad(); - * // '0010000000000001010010000110000001000000000000010000100000000011 - * // 0000000000000000000000000000000000000000000000000001000000010001' - */ - binaryZeroPad(): string; - /** - * Parses a v4-in-v6 string (e.g. `::ffff:192.168.0.1`) by extracting the - * trailing IPv4 address into `this.address4` / `this.parsedAddress4` and - * returning the address with the v4 portion converted to two v6 groups. - * Used internally by `parse()`. - */ - parse4in6(address: string): string; - /** - * Parses an IPv6 address string into its 8 hexadecimal groups (expanding - * any `::` elision and any trailing v4-in-v6 portion) and stores the result - * on `this.parsedAddress`. Called automatically by the constructor; you - * typically don't need to call it directly. Throws `AddressError` if the - * input is malformed. - */ - parse(address: string): string[]; - /** - * Returns the canonical (fully expanded) form of the address: all 8 groups, - * each padded to 4 hex digits, with no `::` collapsing - * (e.g. `2001:0db8:0000:0000:0000:0000:0000:0001`). Useful for sorting and - * byte-exact comparison. - */ - canonicalForm(): string; - /** - * Return the decimal form of the address - * @returns {String} - */ - decimal(): string; - /** - * Return the address as a BigInt - * @returns {bigint} - */ - bigInt(): bigint; - /** - * Return the last two groups of this address as an IPv4 address string - * @returns {Address4} - * @example - * var address = new Address6('2001:4860:4001::1825:bf11'); - * address.to4().correctForm(); // '24.37.191.17' - */ - to4(): Address4; - /** - * Return the v4-in-v6 form of the address - * @returns {String} - */ - to4in6(): string; - /** - * Decodes the Teredo tunneling fields embedded in this address. Returns the - * Teredo prefix, server IPv4, client IPv4, raw flag bits, cone-NAT flag, - * UDP port, and Microsoft-format flag breakdown (reserved, universal/local, - * group/individual, nonce). Only meaningful for addresses in `2001::/32`. - */ - inspectTeredo(): TeredoProperties; - /** - * Decodes the 6to4 tunneling fields embedded in this address. Returns the - * 6to4 prefix and the embedded IPv4 gateway address. Only meaningful for - * addresses in `2002::/16`. - */ - inspect6to4(): SixToFourProperties; - /** - * Return a v6 6to4 address from a v6 v4inv6 address - * @returns {Address6} - */ - to6to4(): Address6 | null; - /** - * Embed an IPv4 address into a NAT64 IPv6 address using the encoding - * defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052). - * The default prefix is the well-known prefix `64:ff9b::/96`. The prefix - * length must be one of 32, 40, 48, 56, 64, or 96; for prefixes shorter - * than /64 the IPv4 octets are split around the reserved bits 64–71. - * @example - * Address6.fromAddress4Nat64('192.0.2.33').correctForm(); // '64:ff9b::c000:221' - * Address6.fromAddress4Nat64('192.0.2.33', '2001:db8::/32').correctForm(); // '2001:db8:c000:221::' - */ - static fromAddress4Nat64(address: string, prefix?: string): Address6; - /** - * Extract the embedded IPv4 address from a NAT64 IPv6 address using the - * encoding defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052). - * The default prefix is the well-known prefix `64:ff9b::/96`. Returns - * `null` if this address is not contained within the given prefix. - * @example - * new Address6('64:ff9b::c000:221').toAddress4Nat64()!.correctForm(); // '192.0.2.33' - */ - toAddress4Nat64(prefix?: string): Address4 | null; - /** - * Return a byte array. - * - * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toByteArray())`. - * @returns {Array} - */ - toByteArray(): number[]; - /** - * Return an unsigned byte array. - * - * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toUnsignedByteArray())`. - * @returns {Array} - */ - toUnsignedByteArray(): number[]; - /** - * Convert a byte array to an Address6 object. - * - * To convert from a Node.js `Buffer`, spread it: `Address6.fromByteArray([...buf])`. - * @returns {Address6} - */ - static fromByteArray(bytes: Array): Address6; - /** - * Convert an unsigned byte array to an Address6 object. - * - * To convert from a Node.js `Buffer`, spread it: `Address6.fromUnsignedByteArray([...buf])`. - * @returns {Address6} - */ - static fromUnsignedByteArray(bytes: Array): Address6; - /** - * Returns true if the given address is in the subnet of the current address - * @returns {boolean} - */ - isInSubnet: typeof common.isInSubnet; - /** - * Returns true if the address is correct, false otherwise - * @returns {boolean} - */ - isCorrect: (this: Address4 | Address6) => boolean; - /** - * Returns true if the address is in the canonical form, false otherwise - * @returns {boolean} - */ - isCanonical(): boolean; - /** - * Returns true if the address is a link local address, false otherwise - * @returns {boolean} - */ - isLinkLocal(): boolean; - /** - * Returns true if the address is a multicast address, false otherwise - * @returns {boolean} - */ - isMulticast(): boolean; - /** - * Returns true if the address was written in v4-in-v6 dotted-quad notation - * (e.g. `::ffff:127.0.0.1`), false otherwise. This is a notation-level flag - * and does not reflect whether the address bits lie in the IPv4-mapped - * (`::ffff:0:0/96`) subnet — for that, see {@link isMapped4}. - * @returns {boolean} - */ - is4(): boolean; - /** - * Returns true if the address is an IPv4-mapped IPv6 address in - * `::ffff:0:0/96` ([RFC 4291 §2.5.5.2](https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.2)), - * false otherwise. Unlike {@link is4}, this checks the underlying address - * bits rather than the textual notation, so `::ffff:127.0.0.1` and - * `::ffff:7f00:1` both return true. - * @returns {boolean} - */ - isMapped4(): boolean; - /** - * Returns true if the address is a Teredo address, false otherwise - * @returns {boolean} - */ - isTeredo(): boolean; - /** - * Returns true if the address is a 6to4 address, false otherwise - * @returns {boolean} - */ - is6to4(): boolean; - /** - * Returns true if the address is a loopback address, false otherwise - * @returns {boolean} - */ - isLoopback(): boolean; - /** - * Returns true if the address is a Unique Local Address in `fc00::/7` ([RFC 4193](https://datatracker.ietf.org/doc/html/rfc4193)). ULAs are the IPv6 equivalent of IPv4 [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private addresses. - * @returns {boolean} - */ - isULA(): boolean; - /** - * Returns true if the address is the unspecified address `::`. - * @returns {boolean} - */ - isUnspecified(): boolean; - /** - * Returns true if the address is in the documentation prefix `2001:db8::/32` ([RFC 3849](https://datatracker.ietf.org/doc/html/rfc3849)). - * @returns {boolean} - */ - isDocumentation(): boolean; - /** - * Returns the address as an HTTP URL with the host bracketed, e.g. - * `http://[2001:db8::1]/`. If `optionalPort` is provided it is appended, - * e.g. `http://[2001:db8::1]:8080/`. - */ - href(optionalPort?: number | string): string; - /** - * Returns an HTML `` element whose `href` encodes the address in a URL - * hash fragment (default prefix `/#address=`). Useful for linking between - * pages of an address-inspector UI. - * @param options.className - CSS class for the rendered `` element - * @param options.prefix - hash prefix prepended to the address (default `/#address=`) - * @param options.v4 - when true, render the address in v4-in-v6 form - */ - link(options?: { - className?: string; - prefix?: string; - v4?: boolean; - }): string; - /** - * Groups an address - * @returns {String} - */ - group(): string; - /** - * Generate a regular expression string that can be used to find or validate - * all variations of this address - * @param {boolean} substringSearch - * @returns {string} - */ - regularExpressionString(this: Address6, substringSearch?: boolean): string; - /** - * Generate a regular expression that can be used to find or validate all - * variations of this address. - * @param {boolean} substringSearch - * @returns {RegExp} - */ - regularExpression(this: Address6, substringSearch?: boolean): RegExp; -} -export {}; diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.js b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.js deleted file mode 100644 index a78020e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.js +++ /dev/null @@ -1,1217 +0,0 @@ -"use strict"; -/* eslint-disable prefer-destructuring */ -/* eslint-disable no-param-reassign */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Address6 = void 0; -const common = __importStar(require("./common")); -const constants4 = __importStar(require("./v4/constants")); -const constants6 = __importStar(require("./v6/constants")); -const helpers = __importStar(require("./v6/helpers")); -const ipv4_1 = require("./ipv4"); -const regular_expressions_1 = require("./v6/regular-expressions"); -const address_error_1 = require("./address-error"); -const common_1 = require("./common"); -const isCorrect6 = common.isCorrect(constants6.BITS); -function assert(condition) { - if (!condition) { - throw new Error('Assertion failed.'); - } -} -function addCommas(number) { - const r = /(\d+)(\d{3})/; - while (r.test(number)) { - number = number.replace(r, '$1,$2'); - } - return number; -} -function spanLeadingZeroes4(n) { - n = n.replace(/^(0{1,})([1-9]+)$/, '$1$2'); - n = n.replace(/^(0{1,})(0)$/, '$1$2'); - return n; -} -/* - * A helper function to compact an array - */ -function compact(address, slice) { - const s1 = []; - const s2 = []; - let i; - for (i = 0; i < address.length; i++) { - if (i < slice[0]) { - s1.push(address[i]); - } - else if (i > slice[1]) { - s2.push(address[i]); - } - } - return s1.concat(['compact']).concat(s2); -} -function paddedHex(octet) { - return parseInt(octet, 16).toString(16).padStart(4, '0'); -} -function unsignByte(b) { - // eslint-disable-next-line no-bitwise - return b & 0xff; -} -/** - * Represents an IPv6 address - * @param {string} address - An IPv6 address string - * @param {number} [groups=8] - How many octets to parse - * @example - * var address = new Address6('2001::/32'); - */ -class Address6 { - constructor(address, optionalGroups) { - this.addressMinusSuffix = ''; - this.parsedSubnet = ''; - this.subnet = '/128'; - this.subnetMask = 128; - this.v4 = false; - this.zone = ''; - // #region Attributes - /** - * Returns true if the given address is in the subnet of the current address - * @returns {boolean} - */ - this.isInSubnet = common.isInSubnet; - /** - * Returns true if the address is correct, false otherwise - * @returns {boolean} - */ - this.isCorrect = isCorrect6; - if (optionalGroups === undefined) { - this.groups = constants6.GROUPS; - } - else { - this.groups = optionalGroups; - } - this.address = address; - const subnet = constants6.RE_SUBNET_STRING.exec(address); - if (subnet) { - this.parsedSubnet = subnet[0].replace('/', ''); - this.subnetMask = parseInt(this.parsedSubnet, 10); - this.subnet = `/${this.subnetMask}`; - if (Number.isNaN(this.subnetMask) || - this.subnetMask < 0 || - this.subnetMask > constants6.BITS) { - throw new address_error_1.AddressError('Invalid subnet mask.'); - } - address = address.replace(constants6.RE_SUBNET_STRING, ''); - } - else if (/\//.test(address)) { - throw new address_error_1.AddressError('Invalid subnet mask.'); - } - const zone = constants6.RE_ZONE_STRING.exec(address); - if (zone) { - this.zone = zone[0]; - address = address.replace(constants6.RE_ZONE_STRING, ''); - } - this.addressMinusSuffix = address; - this.parsedAddress = this.parse(this.addressMinusSuffix); - } - /** - * Returns true if the given string is a valid IPv6 address (with optional - * CIDR subnet and zone identifier), false otherwise. Host bits in the - * subnet portion are allowed (e.g. `2001:db8::1/32` is valid); for strict - * network-address validation compare `correctForm()` to - * `startAddress().correctForm()`, or use `networkForm()`. - */ - static isValid(address) { - try { - // eslint-disable-next-line no-new - new Address6(address); - return true; - } - catch (e) { - return false; - } - } - /** - * Convert a BigInt to a v6 address object. The value must be in the - * range `[0, 2**128 - 1]`; otherwise `AddressError` is thrown. - * @param {bigint} bigInt - a BigInt to convert - * @returns {Address6} - * @example - * var bigInt = BigInt('1000000000000'); - * var address = Address6.fromBigInt(bigInt); - * address.correctForm(); // '::e8:d4a5:1000' - */ - static fromBigInt(bigInt) { - if (bigInt < 0n || bigInt > (1n << BigInt(constants6.BITS)) - 1n) { - throw new address_error_1.AddressError('IPv6 BigInt must be in the range 0 to 2**128 - 1'); - } - const hex = bigInt.toString(16).padStart(32, '0'); - const groups = []; - for (let i = 0; i < constants6.GROUPS; i++) { - groups.push(hex.slice(i * 4, (i + 1) * 4)); - } - return new Address6(groups.join(':')); - } - /** - * Parse a URL (with optional bracketed host and port) into an address and - * port. Returns either `{ address, port }` on success or - * `{ error, address: null, port: null }` if the URL could not be parsed. - * Ports are returned as numbers (or `null` if absent or out of range). - * @example - * var addressAndPort = Address6.fromURL('http://[ffff::]:8080/foo/'); - * addressAndPort.address.correctForm(); // 'ffff::' - * addressAndPort.port; // 8080 - */ - static fromURL(url) { - let host; - let port = null; - let result; - // If we have brackets parse them and find a port - if (url.indexOf('[') !== -1 && url.indexOf(']:') !== -1) { - result = constants6.RE_URL_WITH_PORT.exec(url); - if (result === null) { - return { - error: 'failed to parse address with port', - address: null, - port: null, - }; - } - host = result[1]; - port = result[2]; - // If there's a URL extract the address - } - else if (url.indexOf('/') !== -1) { - // Remove the protocol prefix - url = url.replace(/^[a-z0-9]+:\/\//, ''); - // Parse the address - result = constants6.RE_URL.exec(url); - if (result === null) { - return { - error: 'failed to parse address from URL', - address: null, - port: null, - }; - } - host = result[1]; - // Otherwise just assign the URL to the host and let the library parse it - } - else { - host = url; - } - // If there's a port convert it to an integer - if (port) { - port = parseInt(port, 10); - // squelch out of range ports - if (port < 0 || port > 65536) { - port = null; - } - } - else { - // Standardize `undefined` to `null` - port = null; - } - return { - address: new Address6(host), - port, - }; - } - /** - * Construct an `Address6` from an address and a hex subnet mask given as - * separate strings (e.g. as returned by Node's `os.networkInterfaces()`). - * Throws `AddressError` if the mask is non-contiguous (e.g. - * `ffff::ffff`). - * @example - * var address = Address6.fromAddressAndMask('fe80::1', 'ffff:ffff:ffff:ffff::'); - * address.subnetMask; // 64 - */ - static fromAddressAndMask(address, mask) { - const bits = common.prefixLengthFromMask(new Address6(mask).bigInt(), constants6.BITS); - return new Address6(`${address}/${bits}`); - } - /** - * Construct an `Address6` from an address and a Cisco-style wildcard mask - * given as separate strings (e.g. `::ffff:ffff:ffff:ffff` for a `/64`). - * The wildcard mask is the bitwise inverse of the subnet mask. Throws - * `AddressError` if the mask is non-contiguous. - * @example - * var address = Address6.fromAddressAndWildcardMask('fe80::1', '::ffff:ffff:ffff:ffff'); - * address.subnetMask; // 64 - */ - static fromAddressAndWildcardMask(address, wildcardMask) { - const wildcard = new Address6(wildcardMask).bigInt(); - const allOnes = (BigInt(1) << BigInt(constants6.BITS)) - BigInt(1); - // eslint-disable-next-line no-bitwise - const mask = wildcard ^ allOnes; - const bits = common.prefixLengthFromMask(mask, constants6.BITS); - return new Address6(`${address}/${bits}`); - } - /** - * Construct an `Address6` from a wildcard pattern with trailing `*` - * groups. The number of trailing wildcards determines the prefix - * length: each `*` represents 16 bits. `::` is expanded to zero groups - * (not wildcards) before evaluating trailing wildcards. - * - * Only trailing whole-group wildcards are supported. Partial-group - * wildcards (e.g. `2001:db8::0*`) and interior wildcards (e.g. - * `*::1`) throw `AddressError`. - * @example - * Address6.fromWildcard('2001:db8:*:*:*:*:*:*').subnet; // '/32' - * Address6.fromWildcard('2001:db8::*').subnet; // '/112' - * Address6.fromWildcard('*:*:*:*:*:*:*:*').subnet; // '/0' - */ - static fromWildcard(input) { - if (input.includes('%') || input.includes('/')) { - throw new address_error_1.AddressError('Wildcard pattern must not include a zone or CIDR suffix'); - } - const halves = input.split('::'); - if (halves.length > 2) { - throw new address_error_1.AddressError("Wildcard pattern cannot contain more than one '::'"); - } - let groups; - if (halves.length === 2) { - const left = halves[0] === '' ? [] : halves[0].split(':'); - const right = halves[1] === '' ? [] : halves[1].split(':'); - const remaining = constants6.GROUPS - left.length - right.length; - if (remaining < 1) { - throw new address_error_1.AddressError("Wildcard pattern with '::' has too many groups"); - } - groups = [...left, ...new Array(remaining).fill('0'), ...right]; - } - else { - groups = input.split(':'); - } - if (groups.length !== constants6.GROUPS) { - throw new address_error_1.AddressError('Wildcard pattern must have 8 groups'); - } - let firstWildcard = -1; - for (let i = 0; i < groups.length; i++) { - if (groups[i] === '*') { - if (firstWildcard === -1) { - firstWildcard = i; - } - } - else if (firstWildcard !== -1) { - throw new address_error_1.AddressError('Wildcard `*` must only appear in trailing groups (e.g. `2001:db8:*:*:*:*:*:*`)'); - } - } - const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard; - const replaced = groups.map((g) => (g === '*' ? '0' : g)); - const subnetBits = constants6.BITS - trailing * 16; - return new Address6(`${replaced.join(':')}/${subnetBits}`); - } - /** - * Create an IPv6-mapped address given an IPv4 address - * @param {string} address - An IPv4 address string - * @returns {Address6} - * @example - * var address = Address6.fromAddress4('192.168.0.1'); - * address.correctForm(); // '::ffff:c0a8:1' - * address.to4in6(); // '::ffff:192.168.0.1' - */ - static fromAddress4(address) { - const address4 = new ipv4_1.Address4(address); - const mask6 = constants6.BITS - (constants4.BITS - address4.subnetMask); - return new Address6(`::ffff:${address4.correctForm()}/${mask6}`); - } - /** - * Return an address from ip6.arpa form - * @param {string} arpaFormAddress - an 'ip6.arpa' form address - * @returns {Adress6} - * @example - * var address = Address6.fromArpa(e.f.f.f.3.c.2.6.f.f.f.e.6.6.8.e.1.0.6.7.9.4.e.c.0.0.0.0.1.0.0.2.ip6.arpa.) - * address.correctForm(); // '2001:0:ce49:7601:e866:efff:62c3:fffe' - */ - static fromArpa(arpaFormAddress) { - // remove ending ".ip6.arpa." or just "." - let address = arpaFormAddress.replace(/(\.ip6\.arpa)?\.$/, ''); - const semicolonAmount = 7; - // correct ip6.arpa form with ending removed will be 63 characters - if (address.length !== 63) { - throw new address_error_1.AddressError("Invalid 'ip6.arpa' form."); - } - const parts = address.split('.').reverse(); - for (let i = semicolonAmount; i > 0; i--) { - const insertIndex = i * 4; - parts.splice(insertIndex, 0, ':'); - } - address = parts.join(''); - return new Address6(address); - } - /** - * Return the Microsoft UNC transcription of the address - * @returns {String} the Microsoft UNC transcription of the address - */ - microsoftTranscription() { - return `${this.correctForm().replace(/:/g, '-')}.ipv6-literal.net`; - } - /** - * Return the first n bits of the address, defaulting to the subnet mask - * @param {number} [mask=subnet] - the number of bits to mask - * @returns {String} the first n bits of the address as a string - */ - mask(mask = this.subnetMask) { - return this.getBitsBase2(0, mask); - } - /** - * Return the number of possible subnets of a given size in the address - * @param {number} [subnetSize=128] - the subnet size - * @returns {String} - */ - // TODO: probably useful to have a numeric version of this too - possibleSubnets(subnetSize = 128) { - const availableBits = constants6.BITS - this.subnetMask; - const subnetBits = Math.abs(subnetSize - constants6.BITS); - const subnetPowers = availableBits - subnetBits; - if (subnetPowers < 0) { - return '0'; - } - return addCommas((BigInt('2') ** BigInt(subnetPowers)).toString(10)); - } - /** - * Helper function getting start address. - * @returns {bigint} - */ - _startAddress() { - return BigInt(`0b${this.mask() + '0'.repeat(constants6.BITS - this.subnetMask)}`); - } - /** - * The first address in the range given by this address' subnet - * Often referred to as the Network Address. - * @returns {Address6} - */ - startAddress() { - return Address6.fromBigInt(this._startAddress()); - } - /** - * The first host address in the range given by this address's subnet ie - * the first address after the Network Address - * @returns {Address6} - */ - startAddressExclusive() { - const adjust = BigInt('1'); - return Address6.fromBigInt(this._startAddress() + adjust); - } - /** - * Helper function getting end address. - * @returns {bigint} - */ - _endAddress() { - return BigInt(`0b${this.mask() + '1'.repeat(constants6.BITS - this.subnetMask)}`); - } - /** - * The last address in the range given by this address' subnet - * Often referred to as the Broadcast - * @returns {Address6} - */ - endAddress() { - return Address6.fromBigInt(this._endAddress()); - } - /** - * The last host address in the range given by this address's subnet ie - * the last address prior to the Broadcast Address - * @returns {Address6} - */ - endAddressExclusive() { - const adjust = BigInt('1'); - return Address6.fromBigInt(this._endAddress() - adjust); - } - /** - * The hex form of the subnet mask, e.g. `ffff:ffff:ffff:ffff::` for a - * `/64`. Returns an `Address6`; call `.correctForm()` for the string. - * @returns {Address6} - */ - subnetMaskAddress() { - return Address6.fromBigInt(BigInt(`0b${'1'.repeat(this.subnetMask)}${'0'.repeat(constants6.BITS - this.subnetMask)}`)); - } - /** - * The Cisco-style wildcard mask, e.g. `::ffff:ffff:ffff:ffff` for a - * `/64`. This is the bitwise inverse of `subnetMaskAddress()`. Returns - * an `Address6`; call `.correctForm()` for the string. - * @returns {Address6} - */ - wildcardMask() { - return Address6.fromBigInt(BigInt(`0b${'0'.repeat(this.subnetMask)}${'1'.repeat(constants6.BITS - this.subnetMask)}`)); - } - /** - * The network address in CIDR string form, e.g. `2001:db8::/32` for - * `2001:db8::1/32`. For an address with no explicit subnet the prefix - * is `/128`, e.g. `networkForm()` on `2001:db8::1` returns - * `2001:db8::1/128`. - * @returns {string} - */ - networkForm() { - return `${this.startAddress().correctForm()}/${this.subnetMask}`; - } - /** - * Return the scope of the address. The 4-bit scope field - * ([RFC 4291 §2.7](https://datatracker.ietf.org/doc/html/rfc4291#section-2.7)) - * is only defined for multicast addresses; for unicast addresses the scope - * is derived from the address type per - * [RFC 4007 §6](https://datatracker.ietf.org/doc/html/rfc4007#section-6). - * @returns {String} - */ - getScope() { - const type = this.getType(); - if (type === 'Multicast' || type.startsWith('Multicast ')) { - const scope = constants6.SCOPES[parseInt(this.getBits(12, 16).toString(10), 10)]; - return scope || 'Unknown'; - } - // RFC 4291 §2.5.3: the loopback address is treated as having Link-Local - // scope. (Multicast scope 1, "Interface-Local", is a different concept - // used only for loopback transmission of multicast.) - if (type === 'Link-local unicast' || type === 'Loopback') { - return 'Link local'; - } - // RFC 4007 §6: the unspecified address has no scope. - if (type === 'Unspecified') { - return 'Unknown'; - } - return 'Global'; - } - /** - * Return the type of the address - * @returns {String} - */ - getType() { - for (let i = 0; i < TYPE_SUBNETS.length; i++) { - const entry = TYPE_SUBNETS[i]; - if (this.isInSubnet(entry[0])) { - return entry[1]; - } - } - return 'Global unicast'; - } - /** - * Return the bits in the given range as a BigInt - * @returns {bigint} - */ - getBits(start, end) { - return BigInt(`0b${this.getBitsBase2(start, end)}`); - } - /** - * Return the bits in the given range as a base-2 string - * @returns {String} - */ - getBitsBase2(start, end) { - return this.binaryZeroPad().slice(start, end); - } - /** - * Return the bits in the given range as a base-16 string - * @returns {String} - */ - getBitsBase16(start, end) { - const length = end - start; - if (length % 4 !== 0) { - throw new Error('Length of bits to retrieve must be divisible by four'); - } - return this.getBits(start, end) - .toString(16) - .padStart(length / 4, '0'); - } - /** - * Return the bits that are set past the subnet mask length - * @returns {String} - */ - getBitsPastSubnet() { - return this.getBitsBase2(this.subnetMask, constants6.BITS); - } - /** - * Return the reversed ip6.arpa form of the address - * @param {Object} options - * @param {boolean} options.omitSuffix - omit the "ip6.arpa" suffix - * @returns {String} - */ - reverseForm(options) { - if (!options) { - options = {}; - } - const characters = Math.floor(this.subnetMask / 4); - const reversed = this.canonicalForm() - .replace(/:/g, '') - .split('') - .slice(0, characters) - .reverse() - .join('.'); - if (characters > 0) { - if (options.omitSuffix) { - return reversed; - } - return `${reversed}.ip6.arpa.`; - } - if (options.omitSuffix) { - return ''; - } - return 'ip6.arpa.'; - } - /** - * Returns the address in correct form, per - * [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952): leading zeros - * stripped, the longest run of zero groups collapsed to `::`, and hex digits - * lowercased (e.g. `2001:db8::1`). This is the recommended form for display. - */ - correctForm() { - let i; - let groups = []; - let zeroCounter = 0; - const zeroes = []; - for (i = 0; i < this.parsedAddress.length; i++) { - const value = parseInt(this.parsedAddress[i], 16); - if (value === 0) { - zeroCounter++; - } - if (value !== 0 && zeroCounter > 0) { - if (zeroCounter > 1) { - zeroes.push([i - zeroCounter, i - 1]); - } - zeroCounter = 0; - } - } - // Do we end with a string of zeroes? - if (zeroCounter > 1) { - zeroes.push([this.parsedAddress.length - zeroCounter, this.parsedAddress.length - 1]); - } - const zeroLengths = zeroes.map((n) => n[1] - n[0] + 1); - if (zeroes.length > 0) { - const index = zeroLengths.indexOf(Math.max(...zeroLengths)); - groups = compact(this.parsedAddress, zeroes[index]); - } - else { - groups = this.parsedAddress; - } - for (i = 0; i < groups.length; i++) { - if (groups[i] !== 'compact') { - groups[i] = parseInt(groups[i], 16).toString(16); - } - } - let correct = groups.join(':'); - correct = correct.replace(/^compact$/, '::'); - correct = correct.replace(/(^compact)|(compact$)/, ':'); - correct = correct.replace(/compact/, ''); - return correct; - } - /** - * Return a zero-padded base-2 string representation of the address - * @returns {String} - * @example - * var address = new Address6('2001:4860:4001:803::1011'); - * address.binaryZeroPad(); - * // '0010000000000001010010000110000001000000000000010000100000000011 - * // 0000000000000000000000000000000000000000000000000001000000010001' - */ - binaryZeroPad() { - if (this._binaryZeroPad === undefined) { - this._binaryZeroPad = this.bigInt().toString(2).padStart(constants6.BITS, '0'); - } - return this._binaryZeroPad; - } - /** - * Parses a v4-in-v6 string (e.g. `::ffff:192.168.0.1`) by extracting the - * trailing IPv4 address into `this.address4` / `this.parsedAddress4` and - * returning the address with the v4 portion converted to two v6 groups. - * Used internally by `parse()`. - */ - // TODO: Improve the semantics of this helper function - parse4in6(address) { - if (address.indexOf('.') === -1) { - return address; - } - const groups = address.split(':'); - const lastGroup = groups.slice(-1)[0]; - const address4 = lastGroup.match(constants4.RE_ADDRESS); - if (address4) { - this.parsedAddress4 = address4[0]; - this.address4 = new ipv4_1.Address4(this.parsedAddress4); - for (let i = 0; i < this.address4.groups; i++) { - if (/^0[0-9]+/.test(this.address4.parsedAddress[i])) { - // The prefix groups haven't been through the bad-character check - // yet, so escape them before including in the error HTML. - const highlighted = this.address4.parsedAddress.map(spanLeadingZeroes4).join('.'); - const prefix = groups.slice(0, -1).map(helpers.escapeHtml).join(':'); - const separator = groups.length > 1 ? ':' : ''; - throw new address_error_1.AddressError("IPv4 addresses can't have leading zeroes.", `${prefix}${separator}${highlighted}`); - } - } - this.v4 = true; - groups[groups.length - 1] = this.address4.toGroup6(); - address = groups.join(':'); - } - return address; - } - /** - * Parses an IPv6 address string into its 8 hexadecimal groups (expanding - * any `::` elision and any trailing v4-in-v6 portion) and stores the result - * on `this.parsedAddress`. Called automatically by the constructor; you - * typically don't need to call it directly. Throws `AddressError` if the - * input is malformed. - */ - // TODO: Make private? - parse(address) { - address = this.parse4in6(address); - const badCharacters = address.match(constants6.RE_BAD_CHARACTERS); - if (badCharacters) { - throw new address_error_1.AddressError(`Bad character${badCharacters.length > 1 ? 's' : ''} detected in address: ${badCharacters.join('')}`, address.replace(constants6.RE_BAD_CHARACTERS, '$1')); - } - const badAddress = address.match(constants6.RE_BAD_ADDRESS); - if (badAddress) { - throw new address_error_1.AddressError(`Address failed regex: ${badAddress.join('')}`, address.replace(constants6.RE_BAD_ADDRESS, '$1')); - } - let groups = []; - const halves = address.split('::'); - if (halves.length === 2) { - let first = halves[0].split(':'); - let last = halves[1].split(':'); - if (first.length === 1 && first[0] === '') { - first = []; - } - if (last.length === 1 && last[0] === '') { - last = []; - } - const remaining = this.groups - (first.length + last.length); - if (!remaining) { - throw new address_error_1.AddressError('Error parsing groups'); - } - this.elidedGroups = remaining; - this.elisionBegin = first.length; - this.elisionEnd = first.length + this.elidedGroups; - groups = groups.concat(first); - for (let i = 0; i < remaining; i++) { - groups.push('0'); - } - groups = groups.concat(last); - } - else if (halves.length === 1) { - groups = address.split(':'); - this.elidedGroups = 0; - } - else { - throw new address_error_1.AddressError('Too many :: groups found'); - } - groups = groups.map((group) => parseInt(group, 16).toString(16)); - if (groups.length !== this.groups) { - throw new address_error_1.AddressError('Incorrect number of groups found'); - } - return groups; - } - /** - * Returns the canonical (fully expanded) form of the address: all 8 groups, - * each padded to 4 hex digits, with no `::` collapsing - * (e.g. `2001:0db8:0000:0000:0000:0000:0000:0001`). Useful for sorting and - * byte-exact comparison. - */ - canonicalForm() { - return this.parsedAddress.map(paddedHex).join(':'); - } - /** - * Return the decimal form of the address - * @returns {String} - */ - decimal() { - return this.parsedAddress.map((n) => parseInt(n, 16).toString(10).padStart(5, '0')).join(':'); - } - /** - * Return the address as a BigInt - * @returns {bigint} - */ - bigInt() { - return BigInt(`0x${this.parsedAddress.map(paddedHex).join('')}`); - } - /** - * Return the last two groups of this address as an IPv4 address string - * @returns {Address4} - * @example - * var address = new Address6('2001:4860:4001::1825:bf11'); - * address.to4().correctForm(); // '24.37.191.17' - */ - to4() { - const binary = this.binaryZeroPad().split(''); - return ipv4_1.Address4.fromHex(BigInt(`0b${binary.slice(96, 128).join('')}`).toString(16).padStart(8, '0')); - } - /** - * Return the v4-in-v6 form of the address - * @returns {String} - */ - to4in6() { - const address4 = this.to4(); - const address6 = new Address6(this.parsedAddress.slice(0, 6).join(':'), 6); - const correct = address6.correctForm(); - let infix = ''; - if (!/:$/.test(correct)) { - infix = ':'; - } - return correct + infix + address4.address; - } - /** - * Decodes the Teredo tunneling fields embedded in this address. Returns the - * Teredo prefix, server IPv4, client IPv4, raw flag bits, cone-NAT flag, - * UDP port, and Microsoft-format flag breakdown (reserved, universal/local, - * group/individual, nonce). Only meaningful for addresses in `2001::/32`. - */ - inspectTeredo() { - /* - - Bits 0 to 31 are set to the Teredo prefix (normally 2001:0000::/32). - - Bits 32 to 63 embed the primary IPv4 address of the Teredo server that - is used. - - Bits 64 to 79 can be used to define some flags. Currently only the - higher order bit is used; it is set to 1 if the Teredo client is - located behind a cone NAT, 0 otherwise. For Microsoft's Windows Vista - and Windows Server 2008 implementations, more bits are used. In those - implementations, the format for these 16 bits is "CRAAAAUG AAAAAAAA", - where "C" remains the "Cone" flag. The "R" bit is reserved for future - use. The "U" bit is for the Universal/Local flag (set to 0). The "G" bit - is Individual/Group flag (set to 0). The A bits are set to a 12-bit - randomly generated number chosen by the Teredo client to introduce - additional protection for the Teredo node against IPv6-based scanning - attacks. - - Bits 80 to 95 contains the obfuscated UDP port number. This is the - port number that is mapped by the NAT to the Teredo client with all - bits inverted. - - Bits 96 to 127 contains the obfuscated IPv4 address. This is the - public IPv4 address of the NAT with all bits inverted. - */ - const prefix = this.getBitsBase16(0, 32); - const bitsForUdpPort = this.getBits(80, 96); - // eslint-disable-next-line no-bitwise - const udpPort = (bitsForUdpPort ^ BigInt('0xffff')).toString(); - const server4 = ipv4_1.Address4.fromHex(this.getBitsBase16(32, 64)); - const bitsForClient4 = this.getBits(96, 128); - // eslint-disable-next-line no-bitwise - const client4 = ipv4_1.Address4.fromHex((bitsForClient4 ^ BigInt('0xffffffff')).toString(16).padStart(8, '0')); - const flagsBase2 = this.getBitsBase2(64, 80); - const coneNat = (0, common_1.testBit)(flagsBase2, 15); - const reserved = (0, common_1.testBit)(flagsBase2, 14); - const groupIndividual = (0, common_1.testBit)(flagsBase2, 8); - const universalLocal = (0, common_1.testBit)(flagsBase2, 9); - const nonce = BigInt(`0b${flagsBase2.slice(2, 6) + flagsBase2.slice(8, 16)}`).toString(10); - return { - prefix: `${prefix.slice(0, 4)}:${prefix.slice(4, 8)}`, - server4: server4.address, - client4: client4.address, - flags: flagsBase2, - coneNat, - microsoft: { - reserved, - universalLocal, - groupIndividual, - nonce, - }, - udpPort, - }; - } - /** - * Decodes the 6to4 tunneling fields embedded in this address. Returns the - * 6to4 prefix and the embedded IPv4 gateway address. Only meaningful for - * addresses in `2002::/16`. - */ - inspect6to4() { - /* - - Bits 0 to 15 are set to the 6to4 prefix (2002::/16). - - Bits 16 to 48 embed the IPv4 address of the 6to4 gateway that is used. - */ - const prefix = this.getBitsBase16(0, 16); - const gateway = ipv4_1.Address4.fromHex(this.getBitsBase16(16, 48)); - return { - prefix: prefix.slice(0, 4), - gateway: gateway.address, - }; - } - /** - * Return a v6 6to4 address from a v6 v4inv6 address - * @returns {Address6} - */ - to6to4() { - if (!this.is4()) { - return null; - } - const addr6to4 = [ - '2002', - this.getBitsBase16(96, 112), - this.getBitsBase16(112, 128), - '', - '/16', - ].join(':'); - return new Address6(addr6to4); - } - /** - * Embed an IPv4 address into a NAT64 IPv6 address using the encoding - * defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052). - * The default prefix is the well-known prefix `64:ff9b::/96`. The prefix - * length must be one of 32, 40, 48, 56, 64, or 96; for prefixes shorter - * than /64 the IPv4 octets are split around the reserved bits 64–71. - * @example - * Address6.fromAddress4Nat64('192.0.2.33').correctForm(); // '64:ff9b::c000:221' - * Address6.fromAddress4Nat64('192.0.2.33', '2001:db8::/32').correctForm(); // '2001:db8:c000:221::' - */ - static fromAddress4Nat64(address, prefix = '64:ff9b::/96') { - const v4 = new ipv4_1.Address4(address); - const prefix6 = new Address6(prefix); - const pl = prefix6.subnetMask; - if (pl !== 32 && pl !== 40 && pl !== 48 && pl !== 56 && pl !== 64 && pl !== 96) { - throw new address_error_1.AddressError('NAT64 prefix length must be 32, 40, 48, 56, 64, or 96'); - } - const prefixBits = prefix6.binaryZeroPad(); - const v4Bits = v4.binaryZeroPad(); - let bits; - if (pl === 96) { - bits = prefixBits.slice(0, 96) + v4Bits; - } - else { - const beforeU = 64 - pl; - bits = - prefixBits.slice(0, pl) + - v4Bits.slice(0, beforeU) + - '00000000' + - v4Bits.slice(beforeU) + - '0'.repeat(128 - 72 - (32 - beforeU)); - } - const hex = BigInt(`0b${bits}`).toString(16).padStart(32, '0'); - const groups = []; - for (let i = 0; i < 8; i++) { - groups.push(hex.slice(i * 4, (i + 1) * 4)); - } - return new Address6(groups.join(':')); - } - /** - * Extract the embedded IPv4 address from a NAT64 IPv6 address using the - * encoding defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052). - * The default prefix is the well-known prefix `64:ff9b::/96`. Returns - * `null` if this address is not contained within the given prefix. - * @example - * new Address6('64:ff9b::c000:221').toAddress4Nat64()!.correctForm(); // '192.0.2.33' - */ - toAddress4Nat64(prefix = '64:ff9b::/96') { - const prefix6 = new Address6(prefix); - const pl = prefix6.subnetMask; - if (pl !== 32 && pl !== 40 && pl !== 48 && pl !== 56 && pl !== 64 && pl !== 96) { - throw new address_error_1.AddressError('NAT64 prefix length must be 32, 40, 48, 56, 64, or 96'); - } - if (!this.isInSubnet(prefix6)) { - return null; - } - const bits = this.binaryZeroPad(); - let v4Bits; - if (pl === 96) { - v4Bits = bits.slice(96, 128); - } - else { - const beforeU = 64 - pl; - v4Bits = bits.slice(pl, pl + beforeU) + bits.slice(72, 72 + (32 - beforeU)); - } - const octets = []; - for (let i = 0; i < 4; i++) { - octets.push(parseInt(v4Bits.slice(i * 8, (i + 1) * 8), 2).toString()); - } - return new ipv4_1.Address4(octets.join('.')); - } - /** - * Return a byte array. - * - * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toByteArray())`. - * @returns {Array} - */ - toByteArray() { - const valueWithoutPadding = this.bigInt().toString(16); - const leadingPad = '0'.repeat(valueWithoutPadding.length % 2); - const value = `${leadingPad}${valueWithoutPadding}`; - const bytes = []; - for (let i = 0, length = value.length; i < length; i += 2) { - bytes.push(parseInt(value.substring(i, i + 2), 16)); - } - return bytes; - } - /** - * Return an unsigned byte array. - * - * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toUnsignedByteArray())`. - * @returns {Array} - */ - toUnsignedByteArray() { - return this.toByteArray().map(unsignByte); - } - /** - * Convert a byte array to an Address6 object. - * - * To convert from a Node.js `Buffer`, spread it: `Address6.fromByteArray([...buf])`. - * @returns {Address6} - */ - static fromByteArray(bytes) { - return this.fromUnsignedByteArray(bytes.map(unsignByte)); - } - /** - * Convert an unsigned byte array to an Address6 object. - * - * To convert from a Node.js `Buffer`, spread it: `Address6.fromUnsignedByteArray([...buf])`. - * @returns {Address6} - */ - static fromUnsignedByteArray(bytes) { - const BYTE_MAX = BigInt('256'); - let result = BigInt('0'); - let multiplier = BigInt('1'); - for (let i = bytes.length - 1; i >= 0; i--) { - result += multiplier * BigInt(bytes[i].toString(10)); - multiplier *= BYTE_MAX; - } - return Address6.fromBigInt(result); - } - /** - * Returns true if the address is in the canonical form, false otherwise - * @returns {boolean} - */ - isCanonical() { - return this.addressMinusSuffix === this.canonicalForm(); - } - /** - * Returns true if the address is a link local address, false otherwise - * @returns {boolean} - */ - isLinkLocal() { - // Zeroes are required, i.e. we can't check isInSubnet with 'fe80::/10' - if (this.getBitsBase2(0, 64) === - '1111111010000000000000000000000000000000000000000000000000000000') { - return true; - } - return false; - } - /** - * Returns true if the address is a multicast address, false otherwise - * @returns {boolean} - */ - isMulticast() { - const type = this.getType(); - return type === 'Multicast' || type.startsWith('Multicast '); - } - /** - * Returns true if the address was written in v4-in-v6 dotted-quad notation - * (e.g. `::ffff:127.0.0.1`), false otherwise. This is a notation-level flag - * and does not reflect whether the address bits lie in the IPv4-mapped - * (`::ffff:0:0/96`) subnet — for that, see {@link isMapped4}. - * @returns {boolean} - */ - is4() { - return this.v4; - } - /** - * Returns true if the address is an IPv4-mapped IPv6 address in - * `::ffff:0:0/96` ([RFC 4291 §2.5.5.2](https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.2)), - * false otherwise. Unlike {@link is4}, this checks the underlying address - * bits rather than the textual notation, so `::ffff:127.0.0.1` and - * `::ffff:7f00:1` both return true. - * @returns {boolean} - */ - isMapped4() { - return this.isInSubnet(IPV4_MAPPED_SUBNET); - } - /** - * Returns true if the address is a Teredo address, false otherwise - * @returns {boolean} - */ - isTeredo() { - return this.isInSubnet(TEREDO_SUBNET); - } - /** - * Returns true if the address is a 6to4 address, false otherwise - * @returns {boolean} - */ - is6to4() { - return this.isInSubnet(SIX_TO_FOUR_SUBNET); - } - /** - * Returns true if the address is a loopback address, false otherwise - * @returns {boolean} - */ - isLoopback() { - return this.getType() === 'Loopback'; - } - /** - * Returns true if the address is a Unique Local Address in `fc00::/7` ([RFC 4193](https://datatracker.ietf.org/doc/html/rfc4193)). ULAs are the IPv6 equivalent of IPv4 [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private addresses. - * @returns {boolean} - */ - isULA() { - return this.isInSubnet(ULA_SUBNET); - } - /** - * Returns true if the address is the unspecified address `::`. - * @returns {boolean} - */ - isUnspecified() { - return this.getType() === 'Unspecified'; - } - /** - * Returns true if the address is in the documentation prefix `2001:db8::/32` ([RFC 3849](https://datatracker.ietf.org/doc/html/rfc3849)). - * @returns {boolean} - */ - isDocumentation() { - return this.isInSubnet(DOCUMENTATION_SUBNET); - } - // #endregion - // #region HTML - /** - * Returns the address as an HTTP URL with the host bracketed, e.g. - * `http://[2001:db8::1]/`. If `optionalPort` is provided it is appended, - * e.g. `http://[2001:db8::1]:8080/`. - */ - href(optionalPort) { - if (optionalPort === undefined) { - optionalPort = ''; - } - else { - optionalPort = `:${optionalPort}`; - } - return `http://[${this.correctForm()}]${optionalPort}/`; - } - /** - * Returns an HTML `` element whose `href` encodes the address in a URL - * hash fragment (default prefix `/#address=`). Useful for linking between - * pages of an address-inspector UI. - * @param options.className - CSS class for the rendered `` element - * @param options.prefix - hash prefix prepended to the address (default `/#address=`) - * @param options.v4 - when true, render the address in v4-in-v6 form - */ - link(options) { - if (!options) { - options = {}; - } - if (options.className === undefined) { - options.className = ''; - } - if (options.prefix === undefined) { - options.prefix = '/#address='; - } - if (options.v4 === undefined) { - options.v4 = false; - } - let formFunction = this.correctForm; - if (options.v4) { - formFunction = this.to4in6; - } - const form = formFunction.call(this); - const safeHref = helpers.escapeHtml(`${options.prefix}${form}`); - const safeForm = helpers.escapeHtml(form); - if (options.className) { - const safeClass = helpers.escapeHtml(options.className); - return `${safeForm}`; - } - return `${safeForm}`; - } - /** - * Groups an address - * @returns {String} - */ - group() { - if (this.elidedGroups === 0) { - // The simple case - return helpers.simpleGroup(this.addressMinusSuffix).join(':'); - } - assert(typeof this.elidedGroups === 'number'); - assert(typeof this.elisionBegin === 'number'); - // The elided case - const output = []; - const [left, right] = this.addressMinusSuffix.split('::'); - if (left.length) { - output.push(...helpers.simpleGroup(left)); - } - else { - output.push(''); - } - const classes = ['hover-group']; - for (let i = this.elisionBegin; i < this.elisionBegin + this.elidedGroups; i++) { - classes.push(`group-${i}`); - } - output.push(``); - if (right.length) { - output.push(...helpers.simpleGroup(right, this.elisionEnd)); - } - else { - output.push(''); - } - if (this.is4()) { - assert(this.address4 instanceof ipv4_1.Address4); - output.pop(); - output.push(this.address4.groupForV6()); - } - return output.join(':'); - } - // #endregion - // #region Regular expressions - /** - * Generate a regular expression string that can be used to find or validate - * all variations of this address - * @param {boolean} substringSearch - * @returns {string} - */ - regularExpressionString(substringSearch = false) { - let output = []; - // TODO: revisit why this is necessary - const address6 = new Address6(this.correctForm()); - if (address6.elidedGroups === 0) { - // The simple case - output.push((0, regular_expressions_1.simpleRegularExpression)(address6.parsedAddress)); - } - else if (address6.elidedGroups === constants6.GROUPS) { - // A completely elided address - output.push((0, regular_expressions_1.possibleElisions)(constants6.GROUPS)); - } - else { - // A partially elided address - const halves = address6.address.split('::'); - if (halves[0].length) { - output.push((0, regular_expressions_1.simpleRegularExpression)(halves[0].split(':'))); - } - assert(typeof address6.elidedGroups === 'number'); - output.push((0, regular_expressions_1.possibleElisions)(address6.elidedGroups, halves[0].length !== 0, halves[1].length !== 0)); - if (halves[1].length) { - output.push((0, regular_expressions_1.simpleRegularExpression)(halves[1].split(':'))); - } - output = [output.join(':')]; - } - if (!substringSearch) { - output = [ - '(?=^|', - regular_expressions_1.ADDRESS_BOUNDARY, - '|[^\\w\\:])(', - ...output, - ')(?=[^\\w\\:]|', - regular_expressions_1.ADDRESS_BOUNDARY, - '|$)', - ]; - } - return output.join(''); - } - /** - * Generate a regular expression that can be used to find or validate all - * variations of this address. - * @param {boolean} substringSearch - * @returns {RegExp} - */ - regularExpression(substringSearch = false) { - return new RegExp(this.regularExpressionString(substringSearch), 'i'); - } -} -exports.Address6 = Address6; -const TYPE_SUBNETS = Object.keys(constants6.TYPES).map((subnet) => [ - new Address6(subnet), - constants6.TYPES[subnet], -]); -const TEREDO_SUBNET = new Address6('2001::/32'); -const SIX_TO_FOUR_SUBNET = new Address6('2002::/16'); -const ULA_SUBNET = new Address6('fc00::/7'); -const DOCUMENTATION_SUBNET = new Address6('2001:db8::/32'); -const IPV4_MAPPED_SUBNET = new Address6('::ffff:0:0/96'); -//# sourceMappingURL=ipv6.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.js.map b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.js.map deleted file mode 100644 index 3169e43..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/ipv6.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ipv6.js","sourceRoot":"","sources":["../src/ipv6.ts"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;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AAC;QAED,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACH,iBAAiB,CAAiB,kBAA2B,KAAK;QAChE,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,EAAE,GAAG,CAAC,CAAC;IACxE,CAAC;CAEF;AAn1CD,4BAm1CC;AAED,MAAM,YAAY,GAA8B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IAC5F,IAAI,QAAQ,CAAC,MAAM,CAAC;IACpB,UAAU,CAAC,KAAK,CAAC,MAAM,CAAW;CACnC,CAAC,CAAC;AACH,MAAM,aAAa,GAAG,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;AAChD,MAAM,kBAAkB,GAAG,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;AACrD,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC5C,MAAM,oBAAoB,GAAG,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC;AAC3D,MAAM,kBAAkB,GAAG,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC","sourcesContent":["/* eslint-disable prefer-destructuring */\n/* eslint-disable no-param-reassign */\n\nimport * as common from './common';\nimport * as constants4 from './v4/constants';\nimport * as constants6 from './v6/constants';\nimport * as helpers from './v6/helpers';\nimport { Address4 } from './ipv4';\nimport {\n ADDRESS_BOUNDARY,\n possibleElisions,\n simpleRegularExpression,\n} from './v6/regular-expressions';\nimport { AddressError } from './address-error';\nimport { testBit } from './common';\n\nconst isCorrect6 = common.isCorrect(constants6.BITS);\n\nfunction assert(condition: any): asserts condition {\n if (!condition) {\n throw new Error('Assertion failed.');\n }\n}\n\nfunction addCommas(number: string): string {\n const r = /(\\d+)(\\d{3})/;\n\n while (r.test(number)) {\n number = number.replace(r, '$1,$2');\n }\n\n return number;\n}\n\nfunction spanLeadingZeroes4(n: string): string {\n n = n.replace(/^(0{1,})([1-9]+)$/, '$1$2');\n n = n.replace(/^(0{1,})(0)$/, '$1$2');\n\n return n;\n}\n\n/*\n * A helper function to compact an array\n */\nfunction compact(address: string[], slice: number[]) {\n const s1 = [];\n const s2 = [];\n let i;\n\n for (i = 0; i < address.length; i++) {\n if (i < slice[0]) {\n s1.push(address[i]);\n } else if (i > slice[1]) {\n s2.push(address[i]);\n }\n }\n\n return s1.concat(['compact']).concat(s2);\n}\n\nfunction paddedHex(octet: string): string {\n return parseInt(octet, 16).toString(16).padStart(4, '0');\n}\n\nfunction unsignByte(b: number) {\n // eslint-disable-next-line no-bitwise\n return b & 0xff;\n}\n\ninterface SixToFourProperties {\n prefix: string;\n gateway: string;\n}\n\ninterface TeredoProperties {\n prefix: string;\n server4: string;\n client4: string;\n flags: string;\n coneNat: boolean;\n microsoft: {\n reserved: boolean;\n universalLocal: boolean;\n groupIndividual: boolean;\n nonce: string;\n };\n udpPort: string;\n}\n\n/**\n * Represents an IPv6 address\n * @param {string} address - An IPv6 address string\n * @param {number} [groups=8] - How many octets to parse\n * @example\n * var address = new Address6('2001::/32');\n */\nexport class Address6 {\n address4?: Address4;\n address: string;\n addressMinusSuffix: string = '';\n elidedGroups?: number;\n elisionBegin?: number;\n elisionEnd?: number;\n groups: number;\n parsedAddress4?: string;\n parsedAddress: string[];\n parsedSubnet: string = '';\n subnet: string = '/128';\n subnetMask: number = 128;\n v4: boolean = false;\n zone: string = '';\n private _binaryZeroPad?: string;\n\n constructor(address: string, optionalGroups?: number) {\n if (optionalGroups === undefined) {\n this.groups = constants6.GROUPS;\n } else {\n this.groups = optionalGroups;\n }\n\n this.address = address;\n\n const subnet = constants6.RE_SUBNET_STRING.exec(address);\n\n if (subnet) {\n this.parsedSubnet = subnet[0].replace('/', '');\n this.subnetMask = parseInt(this.parsedSubnet, 10);\n this.subnet = `/${this.subnetMask}`;\n\n if (\n Number.isNaN(this.subnetMask) ||\n this.subnetMask < 0 ||\n this.subnetMask > constants6.BITS\n ) {\n throw new AddressError('Invalid subnet mask.');\n }\n\n address = address.replace(constants6.RE_SUBNET_STRING, '');\n } else if (/\\//.test(address)) {\n throw new AddressError('Invalid subnet mask.');\n }\n\n const zone = constants6.RE_ZONE_STRING.exec(address);\n\n if (zone) {\n this.zone = zone[0];\n\n address = address.replace(constants6.RE_ZONE_STRING, '');\n }\n\n this.addressMinusSuffix = address;\n\n this.parsedAddress = this.parse(this.addressMinusSuffix);\n }\n\n /**\n * Returns true if the given string is a valid IPv6 address (with optional\n * CIDR subnet and zone identifier), false otherwise. Host bits in the\n * subnet portion are allowed (e.g. `2001:db8::1/32` is valid); for strict\n * network-address validation compare `correctForm()` to\n * `startAddress().correctForm()`, or use `networkForm()`.\n */\n static isValid(address: string): boolean {\n try {\n // eslint-disable-next-line no-new\n new Address6(address);\n\n return true;\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Convert a BigInt to a v6 address object. The value must be in the\n * range `[0, 2**128 - 1]`; otherwise `AddressError` is thrown.\n * @param {bigint} bigInt - a BigInt to convert\n * @returns {Address6}\n * @example\n * var bigInt = BigInt('1000000000000');\n * var address = Address6.fromBigInt(bigInt);\n * address.correctForm(); // '::e8:d4a5:1000'\n */\n static fromBigInt(bigInt: bigint): Address6 {\n if (bigInt < 0n || bigInt > (1n << BigInt(constants6.BITS)) - 1n) {\n throw new AddressError('IPv6 BigInt must be in the range 0 to 2**128 - 1');\n }\n\n const hex = bigInt.toString(16).padStart(32, '0');\n const groups = [];\n\n for (let i = 0; i < constants6.GROUPS; i++) {\n groups.push(hex.slice(i * 4, (i + 1) * 4));\n }\n\n return new Address6(groups.join(':'));\n }\n\n /**\n * Parse a URL (with optional bracketed host and port) into an address and\n * port. Returns either `{ address, port }` on success or\n * `{ error, address: null, port: null }` if the URL could not be parsed.\n * Ports are returned as numbers (or `null` if absent or out of range).\n * @example\n * var addressAndPort = Address6.fromURL('http://[ffff::]:8080/foo/');\n * addressAndPort.address.correctForm(); // 'ffff::'\n * addressAndPort.port; // 8080\n */\n static fromURL(url: string) {\n let host: string;\n let port: string | number | null = null;\n let result: string[] | null;\n\n // If we have brackets parse them and find a port\n if (url.indexOf('[') !== -1 && url.indexOf(']:') !== -1) {\n result = constants6.RE_URL_WITH_PORT.exec(url);\n\n if (result === null) {\n return {\n error: 'failed to parse address with port',\n address: null,\n port: null,\n };\n }\n\n host = result[1];\n port = result[2];\n // If there's a URL extract the address\n } else if (url.indexOf('/') !== -1) {\n // Remove the protocol prefix\n url = url.replace(/^[a-z0-9]+:\\/\\//, '');\n\n // Parse the address\n result = constants6.RE_URL.exec(url);\n\n if (result === null) {\n return {\n error: 'failed to parse address from URL',\n address: null,\n port: null,\n };\n }\n\n host = result[1];\n // Otherwise just assign the URL to the host and let the library parse it\n } else {\n host = url;\n }\n\n // If there's a port convert it to an integer\n if (port) {\n port = parseInt(port, 10);\n\n // squelch out of range ports\n if (port < 0 || port > 65536) {\n port = null;\n }\n } else {\n // Standardize `undefined` to `null`\n port = null;\n }\n\n return {\n address: new Address6(host),\n port,\n };\n }\n\n /**\n * Construct an `Address6` from an address and a hex subnet mask given as\n * separate strings (e.g. as returned by Node's `os.networkInterfaces()`).\n * Throws `AddressError` if the mask is non-contiguous (e.g.\n * `ffff::ffff`).\n * @example\n * var address = Address6.fromAddressAndMask('fe80::1', 'ffff:ffff:ffff:ffff::');\n * address.subnetMask; // 64\n */\n static fromAddressAndMask(address: string, mask: string): Address6 {\n const bits = common.prefixLengthFromMask(new Address6(mask).bigInt(), constants6.BITS);\n return new Address6(`${address}/${bits}`);\n }\n\n /**\n * Construct an `Address6` from an address and a Cisco-style wildcard mask\n * given as separate strings (e.g. `::ffff:ffff:ffff:ffff` for a `/64`).\n * The wildcard mask is the bitwise inverse of the subnet mask. Throws\n * `AddressError` if the mask is non-contiguous.\n * @example\n * var address = Address6.fromAddressAndWildcardMask('fe80::1', '::ffff:ffff:ffff:ffff');\n * address.subnetMask; // 64\n */\n static fromAddressAndWildcardMask(address: string, wildcardMask: string): Address6 {\n const wildcard = new Address6(wildcardMask).bigInt();\n const allOnes = (BigInt(1) << BigInt(constants6.BITS)) - BigInt(1);\n // eslint-disable-next-line no-bitwise\n const mask = wildcard ^ allOnes;\n const bits = common.prefixLengthFromMask(mask, constants6.BITS);\n return new Address6(`${address}/${bits}`);\n }\n\n /**\n * Construct an `Address6` from a wildcard pattern with trailing `*`\n * groups. The number of trailing wildcards determines the prefix\n * length: each `*` represents 16 bits. `::` is expanded to zero groups\n * (not wildcards) before evaluating trailing wildcards.\n *\n * Only trailing whole-group wildcards are supported. Partial-group\n * wildcards (e.g. `2001:db8::0*`) and interior wildcards (e.g.\n * `*::1`) throw `AddressError`.\n * @example\n * Address6.fromWildcard('2001:db8:*:*:*:*:*:*').subnet; // '/32'\n * Address6.fromWildcard('2001:db8::*').subnet; // '/112'\n * Address6.fromWildcard('*:*:*:*:*:*:*:*').subnet; // '/0'\n */\n static fromWildcard(input: string): Address6 {\n if (input.includes('%') || input.includes('/')) {\n throw new AddressError('Wildcard pattern must not include a zone or CIDR suffix');\n }\n\n const halves = input.split('::');\n\n if (halves.length > 2) {\n throw new AddressError(\"Wildcard pattern cannot contain more than one '::'\");\n }\n\n let groups: string[];\n\n if (halves.length === 2) {\n const left = halves[0] === '' ? [] : halves[0].split(':');\n const right = halves[1] === '' ? [] : halves[1].split(':');\n const remaining = constants6.GROUPS - left.length - right.length;\n\n if (remaining < 1) {\n throw new AddressError(\"Wildcard pattern with '::' has too many groups\");\n }\n\n groups = [...left, ...new Array(remaining).fill('0'), ...right];\n } else {\n groups = input.split(':');\n }\n\n if (groups.length !== constants6.GROUPS) {\n throw new AddressError('Wildcard pattern must have 8 groups');\n }\n\n let firstWildcard = -1;\n\n for (let i = 0; i < groups.length; i++) {\n if (groups[i] === '*') {\n if (firstWildcard === -1) {\n firstWildcard = i;\n }\n } else if (firstWildcard !== -1) {\n throw new AddressError(\n 'Wildcard `*` must only appear in trailing groups (e.g. `2001:db8:*:*:*:*:*:*`)',\n );\n }\n }\n\n const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard;\n const replaced = groups.map((g) => (g === '*' ? '0' : g));\n const subnetBits = constants6.BITS - trailing * 16;\n\n return new Address6(`${replaced.join(':')}/${subnetBits}`);\n }\n\n /**\n * Create an IPv6-mapped address given an IPv4 address\n * @param {string} address - An IPv4 address string\n * @returns {Address6}\n * @example\n * var address = Address6.fromAddress4('192.168.0.1');\n * address.correctForm(); // '::ffff:c0a8:1'\n * address.to4in6(); // '::ffff:192.168.0.1'\n */\n static fromAddress4(address: string): Address6 {\n const address4 = new Address4(address);\n\n const mask6 = constants6.BITS - (constants4.BITS - address4.subnetMask);\n\n return new Address6(`::ffff:${address4.correctForm()}/${mask6}`);\n }\n\n /**\n * Return an address from ip6.arpa form\n * @param {string} arpaFormAddress - an 'ip6.arpa' form address\n * @returns {Adress6}\n * @example\n * var address = Address6.fromArpa(e.f.f.f.3.c.2.6.f.f.f.e.6.6.8.e.1.0.6.7.9.4.e.c.0.0.0.0.1.0.0.2.ip6.arpa.)\n * address.correctForm(); // '2001:0:ce49:7601:e866:efff:62c3:fffe'\n */\n static fromArpa(arpaFormAddress: string): Address6 {\n // remove ending \".ip6.arpa.\" or just \".\"\n let address = arpaFormAddress.replace(/(\\.ip6\\.arpa)?\\.$/, '');\n const semicolonAmount = 7;\n\n // correct ip6.arpa form with ending removed will be 63 characters\n if (address.length !== 63) {\n throw new AddressError(\"Invalid 'ip6.arpa' form.\");\n }\n\n const parts = address.split('.').reverse();\n\n for (let i = semicolonAmount; i > 0; i--) {\n const insertIndex = i * 4;\n parts.splice(insertIndex, 0, ':');\n }\n\n address = parts.join('');\n\n return new Address6(address);\n }\n\n /**\n * Return the Microsoft UNC transcription of the address\n * @returns {String} the Microsoft UNC transcription of the address\n */\n microsoftTranscription(): string {\n return `${this.correctForm().replace(/:/g, '-')}.ipv6-literal.net`;\n }\n\n /**\n * Return the first n bits of the address, defaulting to the subnet mask\n * @param {number} [mask=subnet] - the number of bits to mask\n * @returns {String} the first n bits of the address as a string\n */\n mask(mask: number = this.subnetMask): string {\n return this.getBitsBase2(0, mask);\n }\n\n /**\n * Return the number of possible subnets of a given size in the address\n * @param {number} [subnetSize=128] - the subnet size\n * @returns {String}\n */\n // TODO: probably useful to have a numeric version of this too\n possibleSubnets(subnetSize: number = 128): string {\n const availableBits = constants6.BITS - this.subnetMask;\n const subnetBits = Math.abs(subnetSize - constants6.BITS);\n const subnetPowers = availableBits - subnetBits;\n\n if (subnetPowers < 0) {\n return '0';\n }\n\n return addCommas((BigInt('2') ** BigInt(subnetPowers)).toString(10));\n }\n\n /**\n * Helper function getting start address.\n * @returns {bigint}\n */\n _startAddress(): bigint {\n return BigInt(`0b${this.mask() + '0'.repeat(constants6.BITS - this.subnetMask)}`);\n }\n\n /**\n * The first address in the range given by this address' subnet\n * Often referred to as the Network Address.\n * @returns {Address6}\n */\n startAddress(): Address6 {\n return Address6.fromBigInt(this._startAddress());\n }\n\n /**\n * The first host address in the range given by this address's subnet ie\n * the first address after the Network Address\n * @returns {Address6}\n */\n startAddressExclusive(): Address6 {\n const adjust = BigInt('1');\n return Address6.fromBigInt(this._startAddress() + adjust);\n }\n\n /**\n * Helper function getting end address.\n * @returns {bigint}\n */\n _endAddress(): bigint {\n return BigInt(`0b${this.mask() + '1'.repeat(constants6.BITS - this.subnetMask)}`);\n }\n\n /**\n * The last address in the range given by this address' subnet\n * Often referred to as the Broadcast\n * @returns {Address6}\n */\n endAddress(): Address6 {\n return Address6.fromBigInt(this._endAddress());\n }\n\n /**\n * The last host address in the range given by this address's subnet ie\n * the last address prior to the Broadcast Address\n * @returns {Address6}\n */\n endAddressExclusive(): Address6 {\n const adjust = BigInt('1');\n return Address6.fromBigInt(this._endAddress() - adjust);\n }\n\n /**\n * The hex form of the subnet mask, e.g. `ffff:ffff:ffff:ffff::` for a\n * `/64`. Returns an `Address6`; call `.correctForm()` for the string.\n * @returns {Address6}\n */\n subnetMaskAddress(): Address6 {\n return Address6.fromBigInt(\n BigInt(`0b${'1'.repeat(this.subnetMask)}${'0'.repeat(constants6.BITS - this.subnetMask)}`),\n );\n }\n\n /**\n * The Cisco-style wildcard mask, e.g. `::ffff:ffff:ffff:ffff` for a\n * `/64`. This is the bitwise inverse of `subnetMaskAddress()`. Returns\n * an `Address6`; call `.correctForm()` for the string.\n * @returns {Address6}\n */\n wildcardMask(): Address6 {\n return Address6.fromBigInt(\n BigInt(`0b${'0'.repeat(this.subnetMask)}${'1'.repeat(constants6.BITS - this.subnetMask)}`),\n );\n }\n\n /**\n * The network address in CIDR string form, e.g. `2001:db8::/32` for\n * `2001:db8::1/32`. For an address with no explicit subnet the prefix\n * is `/128`, e.g. `networkForm()` on `2001:db8::1` returns\n * `2001:db8::1/128`.\n * @returns {string}\n */\n networkForm(): string {\n return `${this.startAddress().correctForm()}/${this.subnetMask}`;\n }\n\n /**\n * Return the scope of the address. The 4-bit scope field\n * ([RFC 4291 §2.7](https://datatracker.ietf.org/doc/html/rfc4291#section-2.7))\n * is only defined for multicast addresses; for unicast addresses the scope\n * is derived from the address type per\n * [RFC 4007 §6](https://datatracker.ietf.org/doc/html/rfc4007#section-6).\n * @returns {String}\n */\n getScope(): string {\n const type = this.getType();\n\n if (type === 'Multicast' || type.startsWith('Multicast ')) {\n const scope = constants6.SCOPES[parseInt(this.getBits(12, 16).toString(10), 10)];\n return scope || 'Unknown';\n }\n\n // RFC 4291 §2.5.3: the loopback address is treated as having Link-Local\n // scope. (Multicast scope 1, \"Interface-Local\", is a different concept\n // used only for loopback transmission of multicast.)\n if (type === 'Link-local unicast' || type === 'Loopback') {\n return 'Link local';\n }\n\n // RFC 4007 §6: the unspecified address has no scope.\n if (type === 'Unspecified') {\n return 'Unknown';\n }\n\n return 'Global';\n }\n\n /**\n * Return the type of the address\n * @returns {String}\n */\n getType(): string {\n for (let i = 0; i < TYPE_SUBNETS.length; i++) {\n const entry = TYPE_SUBNETS[i];\n if (this.isInSubnet(entry[0])) {\n return entry[1];\n }\n }\n\n return 'Global unicast';\n }\n\n /**\n * Return the bits in the given range as a BigInt\n * @returns {bigint}\n */\n getBits(start: number, end: number): bigint {\n return BigInt(`0b${this.getBitsBase2(start, end)}`);\n }\n\n /**\n * Return the bits in the given range as a base-2 string\n * @returns {String}\n */\n getBitsBase2(start: number, end: number): string {\n return this.binaryZeroPad().slice(start, end);\n }\n\n /**\n * Return the bits in the given range as a base-16 string\n * @returns {String}\n */\n getBitsBase16(start: number, end: number): string {\n const length = end - start;\n\n if (length % 4 !== 0) {\n throw new Error('Length of bits to retrieve must be divisible by four');\n }\n\n return this.getBits(start, end)\n .toString(16)\n .padStart(length / 4, '0');\n }\n\n /**\n * Return the bits that are set past the subnet mask length\n * @returns {String}\n */\n getBitsPastSubnet(): string {\n return this.getBitsBase2(this.subnetMask, constants6.BITS);\n }\n\n /**\n * Return the reversed ip6.arpa form of the address\n * @param {Object} options\n * @param {boolean} options.omitSuffix - omit the \"ip6.arpa\" suffix\n * @returns {String}\n */\n reverseForm(options?: common.ReverseFormOptions): string {\n if (!options) {\n options = {};\n }\n\n const characters = Math.floor(this.subnetMask / 4);\n\n const reversed = this.canonicalForm()\n .replace(/:/g, '')\n .split('')\n .slice(0, characters)\n .reverse()\n .join('.');\n\n if (characters > 0) {\n if (options.omitSuffix) {\n return reversed;\n }\n\n return `${reversed}.ip6.arpa.`;\n }\n\n if (options.omitSuffix) {\n return '';\n }\n\n return 'ip6.arpa.';\n }\n\n /**\n * Returns the address in correct form, per\n * [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952): leading zeros\n * stripped, the longest run of zero groups collapsed to `::`, and hex digits\n * lowercased (e.g. `2001:db8::1`). This is the recommended form for display.\n */\n correctForm(): string {\n let i;\n let groups = [];\n\n let zeroCounter = 0;\n const zeroes = [];\n\n for (i = 0; i < this.parsedAddress.length; i++) {\n const value = parseInt(this.parsedAddress[i], 16);\n\n if (value === 0) {\n zeroCounter++;\n }\n\n if (value !== 0 && zeroCounter > 0) {\n if (zeroCounter > 1) {\n zeroes.push([i - zeroCounter, i - 1]);\n }\n\n zeroCounter = 0;\n }\n }\n\n // Do we end with a string of zeroes?\n if (zeroCounter > 1) {\n zeroes.push([this.parsedAddress.length - zeroCounter, this.parsedAddress.length - 1]);\n }\n\n const zeroLengths = zeroes.map((n) => n[1] - n[0] + 1);\n\n if (zeroes.length > 0) {\n const index = zeroLengths.indexOf(Math.max(...zeroLengths) as number);\n\n groups = compact(this.parsedAddress, zeroes[index]);\n } else {\n groups = this.parsedAddress;\n }\n\n for (i = 0; i < groups.length; i++) {\n if (groups[i] !== 'compact') {\n groups[i] = parseInt(groups[i], 16).toString(16);\n }\n }\n\n let correct = groups.join(':');\n\n correct = correct.replace(/^compact$/, '::');\n correct = correct.replace(/(^compact)|(compact$)/, ':');\n correct = correct.replace(/compact/, '');\n\n return correct;\n }\n\n /**\n * Return a zero-padded base-2 string representation of the address\n * @returns {String}\n * @example\n * var address = new Address6('2001:4860:4001:803::1011');\n * address.binaryZeroPad();\n * // '0010000000000001010010000110000001000000000000010000100000000011\n * // 0000000000000000000000000000000000000000000000000001000000010001'\n */\n binaryZeroPad(): string {\n if (this._binaryZeroPad === undefined) {\n this._binaryZeroPad = this.bigInt().toString(2).padStart(constants6.BITS, '0');\n }\n return this._binaryZeroPad;\n }\n\n /**\n * Parses a v4-in-v6 string (e.g. `::ffff:192.168.0.1`) by extracting the\n * trailing IPv4 address into `this.address4` / `this.parsedAddress4` and\n * returning the address with the v4 portion converted to two v6 groups.\n * Used internally by `parse()`.\n */\n // TODO: Improve the semantics of this helper function\n parse4in6(address: string): string {\n if (address.indexOf('.') === -1) {\n return address;\n }\n\n const groups = address.split(':');\n const lastGroup = groups.slice(-1)[0];\n\n const address4 = lastGroup.match(constants4.RE_ADDRESS);\n\n if (address4) {\n this.parsedAddress4 = address4[0];\n this.address4 = new Address4(this.parsedAddress4);\n\n for (let i = 0; i < this.address4.groups; i++) {\n if (/^0[0-9]+/.test(this.address4.parsedAddress[i])) {\n // The prefix groups haven't been through the bad-character check\n // yet, so escape them before including in the error HTML.\n const highlighted = this.address4.parsedAddress.map(spanLeadingZeroes4).join('.');\n const prefix = groups.slice(0, -1).map(helpers.escapeHtml).join(':');\n const separator = groups.length > 1 ? ':' : '';\n\n throw new AddressError(\n \"IPv4 addresses can't have leading zeroes.\",\n `${prefix}${separator}${highlighted}`,\n );\n }\n }\n\n this.v4 = true;\n\n groups[groups.length - 1] = this.address4.toGroup6();\n\n address = groups.join(':');\n }\n\n return address;\n }\n\n /**\n * Parses an IPv6 address string into its 8 hexadecimal groups (expanding\n * any `::` elision and any trailing v4-in-v6 portion) and stores the result\n * on `this.parsedAddress`. Called automatically by the constructor; you\n * typically don't need to call it directly. Throws `AddressError` if the\n * input is malformed.\n */\n // TODO: Make private?\n parse(address: string): string[] {\n address = this.parse4in6(address);\n\n const badCharacters = address.match(constants6.RE_BAD_CHARACTERS);\n\n if (badCharacters) {\n throw new AddressError(\n `Bad character${\n badCharacters.length > 1 ? 's' : ''\n } detected in address: ${badCharacters.join('')}`,\n address.replace(constants6.RE_BAD_CHARACTERS, '$1'),\n );\n }\n\n const badAddress = address.match(constants6.RE_BAD_ADDRESS);\n\n if (badAddress) {\n throw new AddressError(\n `Address failed regex: ${badAddress.join('')}`,\n address.replace(constants6.RE_BAD_ADDRESS, '$1'),\n );\n }\n\n let groups: string[] = [];\n\n const halves = address.split('::');\n\n if (halves.length === 2) {\n let first = halves[0].split(':');\n let last = halves[1].split(':');\n\n if (first.length === 1 && first[0] === '') {\n first = [];\n }\n\n if (last.length === 1 && last[0] === '') {\n last = [];\n }\n\n const remaining = this.groups - (first.length + last.length);\n\n if (!remaining) {\n throw new AddressError('Error parsing groups');\n }\n\n this.elidedGroups = remaining;\n\n this.elisionBegin = first.length;\n this.elisionEnd = first.length + this.elidedGroups;\n\n groups = groups.concat(first);\n\n for (let i = 0; i < remaining; i++) {\n groups.push('0');\n }\n\n groups = groups.concat(last);\n } else if (halves.length === 1) {\n groups = address.split(':');\n\n this.elidedGroups = 0;\n } else {\n throw new AddressError('Too many :: groups found');\n }\n\n groups = groups.map((group: string) => parseInt(group, 16).toString(16));\n\n if (groups.length !== this.groups) {\n throw new AddressError('Incorrect number of groups found');\n }\n\n return groups;\n }\n\n /**\n * Returns the canonical (fully expanded) form of the address: all 8 groups,\n * each padded to 4 hex digits, with no `::` collapsing\n * (e.g. `2001:0db8:0000:0000:0000:0000:0000:0001`). Useful for sorting and\n * byte-exact comparison.\n */\n canonicalForm(): string {\n return this.parsedAddress.map(paddedHex).join(':');\n }\n\n /**\n * Return the decimal form of the address\n * @returns {String}\n */\n decimal(): string {\n return this.parsedAddress.map((n) => parseInt(n, 16).toString(10).padStart(5, '0')).join(':');\n }\n\n /**\n * Return the address as a BigInt\n * @returns {bigint}\n */\n bigInt(): bigint {\n return BigInt(`0x${this.parsedAddress.map(paddedHex).join('')}`);\n }\n\n /**\n * Return the last two groups of this address as an IPv4 address string\n * @returns {Address4}\n * @example\n * var address = new Address6('2001:4860:4001::1825:bf11');\n * address.to4().correctForm(); // '24.37.191.17'\n */\n to4(): Address4 {\n const binary = this.binaryZeroPad().split('');\n\n return Address4.fromHex(\n BigInt(`0b${binary.slice(96, 128).join('')}`).toString(16).padStart(8, '0'),\n );\n }\n\n /**\n * Return the v4-in-v6 form of the address\n * @returns {String}\n */\n to4in6(): string {\n const address4 = this.to4();\n const address6 = new Address6(this.parsedAddress.slice(0, 6).join(':'), 6);\n\n const correct = address6.correctForm();\n\n let infix = '';\n\n if (!/:$/.test(correct)) {\n infix = ':';\n }\n\n return correct + infix + address4.address;\n }\n\n /**\n * Decodes the Teredo tunneling fields embedded in this address. Returns the\n * Teredo prefix, server IPv4, client IPv4, raw flag bits, cone-NAT flag,\n * UDP port, and Microsoft-format flag breakdown (reserved, universal/local,\n * group/individual, nonce). Only meaningful for addresses in `2001::/32`.\n */\n inspectTeredo(): TeredoProperties {\n /*\n - Bits 0 to 31 are set to the Teredo prefix (normally 2001:0000::/32).\n - Bits 32 to 63 embed the primary IPv4 address of the Teredo server that\n is used.\n - Bits 64 to 79 can be used to define some flags. Currently only the\n higher order bit is used; it is set to 1 if the Teredo client is\n located behind a cone NAT, 0 otherwise. For Microsoft's Windows Vista\n and Windows Server 2008 implementations, more bits are used. In those\n implementations, the format for these 16 bits is \"CRAAAAUG AAAAAAAA\",\n where \"C\" remains the \"Cone\" flag. The \"R\" bit is reserved for future\n use. The \"U\" bit is for the Universal/Local flag (set to 0). The \"G\" bit\n is Individual/Group flag (set to 0). The A bits are set to a 12-bit\n randomly generated number chosen by the Teredo client to introduce\n additional protection for the Teredo node against IPv6-based scanning\n attacks.\n - Bits 80 to 95 contains the obfuscated UDP port number. This is the\n port number that is mapped by the NAT to the Teredo client with all\n bits inverted.\n - Bits 96 to 127 contains the obfuscated IPv4 address. This is the\n public IPv4 address of the NAT with all bits inverted.\n */\n const prefix = this.getBitsBase16(0, 32);\n\n const bitsForUdpPort: bigint = this.getBits(80, 96);\n // eslint-disable-next-line no-bitwise\n const udpPort = (bitsForUdpPort ^ BigInt('0xffff')).toString();\n\n const server4 = Address4.fromHex(this.getBitsBase16(32, 64));\n\n const bitsForClient4 = this.getBits(96, 128);\n // eslint-disable-next-line no-bitwise\n const client4 = Address4.fromHex(\n (bitsForClient4 ^ BigInt('0xffffffff')).toString(16).padStart(8, '0'),\n );\n\n const flagsBase2 = this.getBitsBase2(64, 80);\n\n const coneNat = testBit(flagsBase2, 15);\n const reserved = testBit(flagsBase2, 14);\n const groupIndividual = testBit(flagsBase2, 8);\n const universalLocal = testBit(flagsBase2, 9);\n const nonce = BigInt(`0b${flagsBase2.slice(2, 6) + flagsBase2.slice(8, 16)}`).toString(10);\n\n return {\n prefix: `${prefix.slice(0, 4)}:${prefix.slice(4, 8)}`,\n server4: server4.address,\n client4: client4.address,\n flags: flagsBase2,\n coneNat,\n microsoft: {\n reserved,\n universalLocal,\n groupIndividual,\n nonce,\n },\n udpPort,\n };\n }\n\n /**\n * Decodes the 6to4 tunneling fields embedded in this address. Returns the\n * 6to4 prefix and the embedded IPv4 gateway address. Only meaningful for\n * addresses in `2002::/16`.\n */\n inspect6to4(): SixToFourProperties {\n /*\n - Bits 0 to 15 are set to the 6to4 prefix (2002::/16).\n - Bits 16 to 48 embed the IPv4 address of the 6to4 gateway that is used.\n */\n\n const prefix = this.getBitsBase16(0, 16);\n\n const gateway = Address4.fromHex(this.getBitsBase16(16, 48));\n\n return {\n prefix: prefix.slice(0, 4),\n gateway: gateway.address,\n };\n }\n\n /**\n * Return a v6 6to4 address from a v6 v4inv6 address\n * @returns {Address6}\n */\n to6to4(): Address6 | null {\n if (!this.is4()) {\n return null;\n }\n\n const addr6to4 = [\n '2002',\n this.getBitsBase16(96, 112),\n this.getBitsBase16(112, 128),\n '',\n '/16',\n ].join(':');\n\n return new Address6(addr6to4);\n }\n\n /**\n * Embed an IPv4 address into a NAT64 IPv6 address using the encoding\n * defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052).\n * The default prefix is the well-known prefix `64:ff9b::/96`. The prefix\n * length must be one of 32, 40, 48, 56, 64, or 96; for prefixes shorter\n * than /64 the IPv4 octets are split around the reserved bits 64–71.\n * @example\n * Address6.fromAddress4Nat64('192.0.2.33').correctForm(); // '64:ff9b::c000:221'\n * Address6.fromAddress4Nat64('192.0.2.33', '2001:db8::/32').correctForm(); // '2001:db8:c000:221::'\n */\n static fromAddress4Nat64(address: string, prefix: string = '64:ff9b::/96'): Address6 {\n const v4 = new Address4(address);\n const prefix6 = new Address6(prefix);\n const pl = prefix6.subnetMask;\n\n if (pl !== 32 && pl !== 40 && pl !== 48 && pl !== 56 && pl !== 64 && pl !== 96) {\n throw new AddressError('NAT64 prefix length must be 32, 40, 48, 56, 64, or 96');\n }\n\n const prefixBits = prefix6.binaryZeroPad();\n const v4Bits = v4.binaryZeroPad();\n\n let bits: string;\n if (pl === 96) {\n bits = prefixBits.slice(0, 96) + v4Bits;\n } else {\n const beforeU = 64 - pl;\n bits =\n prefixBits.slice(0, pl) +\n v4Bits.slice(0, beforeU) +\n '00000000' +\n v4Bits.slice(beforeU) +\n '0'.repeat(128 - 72 - (32 - beforeU));\n }\n\n const hex = BigInt(`0b${bits}`).toString(16).padStart(32, '0');\n const groups: string[] = [];\n for (let i = 0; i < 8; i++) {\n groups.push(hex.slice(i * 4, (i + 1) * 4));\n }\n return new Address6(groups.join(':'));\n }\n\n /**\n * Extract the embedded IPv4 address from a NAT64 IPv6 address using the\n * encoding defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052).\n * The default prefix is the well-known prefix `64:ff9b::/96`. Returns\n * `null` if this address is not contained within the given prefix.\n * @example\n * new Address6('64:ff9b::c000:221').toAddress4Nat64()!.correctForm(); // '192.0.2.33'\n */\n toAddress4Nat64(prefix: string = '64:ff9b::/96'): Address4 | null {\n const prefix6 = new Address6(prefix);\n const pl = prefix6.subnetMask;\n\n if (pl !== 32 && pl !== 40 && pl !== 48 && pl !== 56 && pl !== 64 && pl !== 96) {\n throw new AddressError('NAT64 prefix length must be 32, 40, 48, 56, 64, or 96');\n }\n\n if (!this.isInSubnet(prefix6)) {\n return null;\n }\n\n const bits = this.binaryZeroPad();\n let v4Bits: string;\n\n if (pl === 96) {\n v4Bits = bits.slice(96, 128);\n } else {\n const beforeU = 64 - pl;\n v4Bits = bits.slice(pl, pl + beforeU) + bits.slice(72, 72 + (32 - beforeU));\n }\n\n const octets: string[] = [];\n for (let i = 0; i < 4; i++) {\n octets.push(parseInt(v4Bits.slice(i * 8, (i + 1) * 8), 2).toString());\n }\n return new Address4(octets.join('.'));\n }\n\n /**\n * Return a byte array.\n *\n * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toByteArray())`.\n * @returns {Array}\n */\n toByteArray(): number[] {\n const valueWithoutPadding = this.bigInt().toString(16);\n const leadingPad = '0'.repeat(valueWithoutPadding.length % 2);\n\n const value = `${leadingPad}${valueWithoutPadding}`;\n\n const bytes = [];\n for (let i = 0, length = value.length; i < length; i += 2) {\n bytes.push(parseInt(value.substring(i, i + 2), 16));\n }\n\n return bytes;\n }\n\n /**\n * Return an unsigned byte array.\n *\n * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toUnsignedByteArray())`.\n * @returns {Array}\n */\n toUnsignedByteArray(): number[] {\n return this.toByteArray().map(unsignByte);\n }\n\n /**\n * Convert a byte array to an Address6 object.\n *\n * To convert from a Node.js `Buffer`, spread it: `Address6.fromByteArray([...buf])`.\n * @returns {Address6}\n */\n static fromByteArray(bytes: Array): Address6 {\n return this.fromUnsignedByteArray(bytes.map(unsignByte));\n }\n\n /**\n * Convert an unsigned byte array to an Address6 object.\n *\n * To convert from a Node.js `Buffer`, spread it: `Address6.fromUnsignedByteArray([...buf])`.\n * @returns {Address6}\n */\n static fromUnsignedByteArray(bytes: Array): Address6 {\n const BYTE_MAX = BigInt('256');\n let result = BigInt('0');\n let multiplier = BigInt('1');\n\n for (let i = bytes.length - 1; i >= 0; i--) {\n result += multiplier * BigInt(bytes[i].toString(10));\n\n multiplier *= BYTE_MAX;\n }\n\n return Address6.fromBigInt(result);\n }\n\n // #region Attributes\n /**\n * Returns true if the given address is in the subnet of the current address\n * @returns {boolean}\n */\n isInSubnet = common.isInSubnet;\n\n /**\n * Returns true if the address is correct, false otherwise\n * @returns {boolean}\n */\n isCorrect = isCorrect6;\n\n /**\n * Returns true if the address is in the canonical form, false otherwise\n * @returns {boolean}\n */\n isCanonical(): boolean {\n return this.addressMinusSuffix === this.canonicalForm();\n }\n\n /**\n * Returns true if the address is a link local address, false otherwise\n * @returns {boolean}\n */\n isLinkLocal(): boolean {\n // Zeroes are required, i.e. we can't check isInSubnet with 'fe80::/10'\n if (\n this.getBitsBase2(0, 64) ===\n '1111111010000000000000000000000000000000000000000000000000000000'\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Returns true if the address is a multicast address, false otherwise\n * @returns {boolean}\n */\n isMulticast(): boolean {\n const type = this.getType();\n return type === 'Multicast' || type.startsWith('Multicast ');\n }\n\n /**\n * Returns true if the address was written in v4-in-v6 dotted-quad notation\n * (e.g. `::ffff:127.0.0.1`), false otherwise. This is a notation-level flag\n * and does not reflect whether the address bits lie in the IPv4-mapped\n * (`::ffff:0:0/96`) subnet — for that, see {@link isMapped4}.\n * @returns {boolean}\n */\n is4(): boolean {\n return this.v4;\n }\n\n /**\n * Returns true if the address is an IPv4-mapped IPv6 address in\n * `::ffff:0:0/96` ([RFC 4291 §2.5.5.2](https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.2)),\n * false otherwise. Unlike {@link is4}, this checks the underlying address\n * bits rather than the textual notation, so `::ffff:127.0.0.1` and\n * `::ffff:7f00:1` both return true.\n * @returns {boolean}\n */\n isMapped4(): boolean {\n return this.isInSubnet(IPV4_MAPPED_SUBNET);\n }\n\n /**\n * Returns true if the address is a Teredo address, false otherwise\n * @returns {boolean}\n */\n isTeredo(): boolean {\n return this.isInSubnet(TEREDO_SUBNET);\n }\n\n /**\n * Returns true if the address is a 6to4 address, false otherwise\n * @returns {boolean}\n */\n is6to4(): boolean {\n return this.isInSubnet(SIX_TO_FOUR_SUBNET);\n }\n\n /**\n * Returns true if the address is a loopback address, false otherwise\n * @returns {boolean}\n */\n isLoopback(): boolean {\n return this.getType() === 'Loopback';\n }\n\n /**\n * Returns true if the address is a Unique Local Address in `fc00::/7` ([RFC 4193](https://datatracker.ietf.org/doc/html/rfc4193)). ULAs are the IPv6 equivalent of IPv4 [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private addresses.\n * @returns {boolean}\n */\n isULA(): boolean {\n return this.isInSubnet(ULA_SUBNET);\n }\n\n /**\n * Returns true if the address is the unspecified address `::`.\n * @returns {boolean}\n */\n isUnspecified(): boolean {\n return this.getType() === 'Unspecified';\n }\n\n /**\n * Returns true if the address is in the documentation prefix `2001:db8::/32` ([RFC 3849](https://datatracker.ietf.org/doc/html/rfc3849)).\n * @returns {boolean}\n */\n isDocumentation(): boolean {\n return this.isInSubnet(DOCUMENTATION_SUBNET);\n }\n // #endregion\n\n // #region HTML\n /**\n * Returns the address as an HTTP URL with the host bracketed, e.g.\n * `http://[2001:db8::1]/`. If `optionalPort` is provided it is appended,\n * e.g. `http://[2001:db8::1]:8080/`.\n */\n href(optionalPort?: number | string): string {\n if (optionalPort === undefined) {\n optionalPort = '';\n } else {\n optionalPort = `:${optionalPort}`;\n }\n\n return `http://[${this.correctForm()}]${optionalPort}/`;\n }\n\n /**\n * Returns an HTML `` element whose `href` encodes the address in a URL\n * hash fragment (default prefix `/#address=`). Useful for linking between\n * pages of an address-inspector UI.\n * @param options.className - CSS class for the rendered `` element\n * @param options.prefix - hash prefix prepended to the address (default `/#address=`)\n * @param options.v4 - when true, render the address in v4-in-v6 form\n */\n link(options?: { className?: string; prefix?: string; v4?: boolean }): string {\n if (!options) {\n options = {};\n }\n\n if (options.className === undefined) {\n options.className = '';\n }\n\n if (options.prefix === undefined) {\n options.prefix = '/#address=';\n }\n\n if (options.v4 === undefined) {\n options.v4 = false;\n }\n\n let formFunction = this.correctForm;\n\n if (options.v4) {\n formFunction = this.to4in6;\n }\n\n const form = formFunction.call(this);\n const safeHref = helpers.escapeHtml(`${options.prefix}${form}`);\n const safeForm = helpers.escapeHtml(form);\n\n if (options.className) {\n const safeClass = helpers.escapeHtml(options.className);\n\n return `${safeForm}`;\n }\n\n return `${safeForm}`;\n }\n\n /**\n * Groups an address\n * @returns {String}\n */\n group(): string {\n if (this.elidedGroups === 0) {\n // The simple case\n return helpers.simpleGroup(this.addressMinusSuffix).join(':');\n }\n\n assert(typeof this.elidedGroups === 'number');\n assert(typeof this.elisionBegin === 'number');\n\n // The elided case\n const output = [];\n\n const [left, right] = this.addressMinusSuffix.split('::');\n\n if (left.length) {\n output.push(...helpers.simpleGroup(left));\n } else {\n output.push('');\n }\n\n const classes = ['hover-group'];\n\n for (let i = this.elisionBegin; i < this.elisionBegin + this.elidedGroups; i++) {\n classes.push(`group-${i}`);\n }\n\n output.push(``);\n\n if (right.length) {\n output.push(...helpers.simpleGroup(right, this.elisionEnd));\n } else {\n output.push('');\n }\n\n if (this.is4()) {\n assert(this.address4 instanceof Address4);\n\n output.pop();\n output.push(this.address4.groupForV6());\n }\n\n return output.join(':');\n }\n // #endregion\n\n // #region Regular expressions\n /**\n * Generate a regular expression string that can be used to find or validate\n * all variations of this address\n * @param {boolean} substringSearch\n * @returns {string}\n */\n regularExpressionString(this: Address6, substringSearch: boolean = false): string {\n let output: string[] = [];\n\n // TODO: revisit why this is necessary\n const address6 = new Address6(this.correctForm());\n\n if (address6.elidedGroups === 0) {\n // The simple case\n output.push(simpleRegularExpression(address6.parsedAddress));\n } else if (address6.elidedGroups === constants6.GROUPS) {\n // A completely elided address\n output.push(possibleElisions(constants6.GROUPS));\n } else {\n // A partially elided address\n const halves = address6.address.split('::');\n\n if (halves[0].length) {\n output.push(simpleRegularExpression(halves[0].split(':')));\n }\n\n assert(typeof address6.elidedGroups === 'number');\n\n output.push(\n possibleElisions(address6.elidedGroups, halves[0].length !== 0, halves[1].length !== 0),\n );\n\n if (halves[1].length) {\n output.push(simpleRegularExpression(halves[1].split(':')));\n }\n\n output = [output.join(':')];\n }\n\n if (!substringSearch) {\n output = [\n '(?=^|',\n ADDRESS_BOUNDARY,\n '|[^\\\\w\\\\:])(',\n ...output,\n ')(?=[^\\\\w\\\\:]|',\n ADDRESS_BOUNDARY,\n '|$)',\n ];\n }\n\n return output.join('');\n }\n\n /**\n * Generate a regular expression that can be used to find or validate all\n * variations of this address.\n * @param {boolean} substringSearch\n * @returns {RegExp}\n */\n regularExpression(this: Address6, substringSearch: boolean = false): RegExp {\n return new RegExp(this.regularExpressionString(substringSearch), 'i');\n }\n // #endregion\n}\n\nconst TYPE_SUBNETS: Array<[Address6, string]> = Object.keys(constants6.TYPES).map((subnet) => [\n new Address6(subnet),\n constants6.TYPES[subnet] as string,\n]);\nconst TEREDO_SUBNET = new Address6('2001::/32');\nconst SIX_TO_FOUR_SUBNET = new Address6('2002::/16');\nconst ULA_SUBNET = new Address6('fc00::/7');\nconst DOCUMENTATION_SUBNET = new Address6('2001:db8::/32');\nconst IPV4_MAPPED_SUBNET = new Address6('::ffff:0:0/96');\n"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.d.ts b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.d.ts deleted file mode 100644 index 67af030..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const BITS = 32; -export declare const GROUPS = 4; -export declare const RE_ADDRESS: RegExp; -export declare const RE_SUBNET_STRING: RegExp; diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.js b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.js deleted file mode 100644 index 6fa2518..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RE_SUBNET_STRING = exports.RE_ADDRESS = exports.GROUPS = exports.BITS = void 0; -exports.BITS = 32; -exports.GROUPS = 4; -exports.RE_ADDRESS = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g; -exports.RE_SUBNET_STRING = /\/\d{1,2}$/; -//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.js.map b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.js.map deleted file mode 100644 index a0171aa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v4/constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/v4/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,EAAE,CAAC;AACV,QAAA,MAAM,GAAG,CAAC,CAAC;AAEX,QAAA,UAAU,GACrB,mKAAmK,CAAC;AAEzJ,QAAA,gBAAgB,GAAG,YAAY,CAAC","sourcesContent":["export const BITS = 32;\nexport const GROUPS = 4;\n\nexport const RE_ADDRESS =\n /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;\n\nexport const RE_SUBNET_STRING = /\\/\\d{1,2}$/;\n"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.d.ts b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.d.ts deleted file mode 100644 index 44e72f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export declare const BITS = 128; -export declare const GROUPS = 8; -/** - * Represents IPv6 address scopes - * @memberof Address6 - * @static - */ -export declare const SCOPES: { - [key: number]: string | undefined; -}; -/** - * Represents IPv6 address types - * @memberof Address6 - * @static - */ -export declare const TYPES: { - [key: string]: string | undefined; -}; -/** - * A regular expression that matches bad characters in an IPv6 address - * @memberof Address6 - * @static - */ -export declare const RE_BAD_CHARACTERS: RegExp; -/** - * A regular expression that matches an incorrect IPv6 address - * @memberof Address6 - * @static - */ -export declare const RE_BAD_ADDRESS: RegExp; -/** - * A regular expression that matches an IPv6 subnet - * @memberof Address6 - * @static - */ -export declare const RE_SUBNET_STRING: RegExp; -/** - * A regular expression that matches an IPv6 zone - * @memberof Address6 - * @static - */ -export declare const RE_ZONE_STRING: RegExp; -export declare const RE_URL: RegExp; -export declare const RE_URL_WITH_PORT: RegExp; diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.js b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.js deleted file mode 100644 index 1a8cd1d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RE_URL_WITH_PORT = exports.RE_URL = exports.RE_ZONE_STRING = exports.RE_SUBNET_STRING = exports.RE_BAD_ADDRESS = exports.RE_BAD_CHARACTERS = exports.TYPES = exports.SCOPES = exports.GROUPS = exports.BITS = void 0; -exports.BITS = 128; -exports.GROUPS = 8; -/** - * Represents IPv6 address scopes - * @memberof Address6 - * @static - */ -exports.SCOPES = { - 0: 'Reserved', - 1: 'Interface local', - 2: 'Link local', - 4: 'Admin local', - 5: 'Site local', - 8: 'Organization local', - 14: 'Global', - 15: 'Reserved', -}; -/** - * Represents IPv6 address types - * @memberof Address6 - * @static - */ -exports.TYPES = { - 'ff01::1/128': 'Multicast (All nodes on this interface)', - 'ff01::2/128': 'Multicast (All routers on this interface)', - 'ff02::1/128': 'Multicast (All nodes on this link)', - 'ff02::2/128': 'Multicast (All routers on this link)', - 'ff05::2/128': 'Multicast (All routers in this site)', - 'ff02::5/128': 'Multicast (OSPFv3 AllSPF routers)', - 'ff02::6/128': 'Multicast (OSPFv3 AllDR routers)', - 'ff02::9/128': 'Multicast (RIP routers)', - 'ff02::a/128': 'Multicast (EIGRP routers)', - 'ff02::d/128': 'Multicast (PIM routers)', - 'ff02::16/128': 'Multicast (MLDv2 reports)', - 'ff01::fb/128': 'Multicast (mDNSv6)', - 'ff02::fb/128': 'Multicast (mDNSv6)', - 'ff05::fb/128': 'Multicast (mDNSv6)', - 'ff02::1:2/128': 'Multicast (All DHCP servers and relay agents on this link)', - 'ff05::1:2/128': 'Multicast (All DHCP servers and relay agents in this site)', - 'ff02::1:3/128': 'Multicast (All DHCP servers on this link)', - 'ff05::1:3/128': 'Multicast (All DHCP servers in this site)', - '::/128': 'Unspecified', - '::1/128': 'Loopback', - 'ff00::/8': 'Multicast', - 'fe80::/10': 'Link-local unicast', - 'fc00::/7': 'Unique local', - '2002::/16': '6to4', - '2001:db8::/32': 'Documentation', - '64:ff9b::/96': 'NAT64 (well-known)', - '64:ff9b:1::/48': 'NAT64 (local-use)', -}; -/** - * A regular expression that matches bad characters in an IPv6 address - * @memberof Address6 - * @static - */ -exports.RE_BAD_CHARACTERS = /([^0-9a-f:/%])/gi; -/** - * A regular expression that matches an incorrect IPv6 address - * @memberof Address6 - * @static - */ -exports.RE_BAD_ADDRESS = /([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi; -/** - * A regular expression that matches an IPv6 subnet - * @memberof Address6 - * @static - */ -exports.RE_SUBNET_STRING = /\/\d{1,3}(?=%|$)/; -/** - * A regular expression that matches an IPv6 zone - * @memberof Address6 - * @static - */ -exports.RE_ZONE_STRING = /%.*$/; -exports.RE_URL = /^\[{0,1}([0-9a-f:]+)\]{0,1}/; -exports.RE_URL_WITH_PORT = /\[([0-9a-f:]+)\]:([0-9]{1,5})/; -//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.js.map b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.js.map deleted file mode 100644 index c6c65b6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/v6/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,GAAG,CAAC;AACX,QAAA,MAAM,GAAG,CAAC,CAAC;AAExB;;;;GAIG;AACU,QAAA,MAAM,GAA0C;IAC3D,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,iBAAiB;IACpB,CAAC,EAAE,YAAY;IACf,CAAC,EAAE,aAAa;IAChB,CAAC,EAAE,YAAY;IACf,CAAC,EAAE,oBAAoB;IACvB,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,UAAU;CACN,CAAC;AAEX;;;;GAIG;AACU,QAAA,KAAK,GAA0C;IAC1D,aAAa,EAAE,yCAAyC;IACxD,aAAa,EAAE,2CAA2C;IAC1D,aAAa,EAAE,oCAAoC;IACnD,aAAa,EAAE,sCAAsC;IACrD,aAAa,EAAE,sCAAsC;IACrD,aAAa,EAAE,mCAAmC;IAClD,aAAa,EAAE,kCAAkC;IACjD,aAAa,EAAE,yBAAyB;IACxC,aAAa,EAAE,2BAA2B;IAC1C,aAAa,EAAE,yBAAyB;IACxC,cAAc,EAAE,2BAA2B;IAC3C,cAAc,EAAE,oBAAoB;IACpC,cAAc,EAAE,oBAAoB;IACpC,cAAc,EAAE,oBAAoB;IACpC,eAAe,EAAE,4DAA4D;IAC7E,eAAe,EAAE,4DAA4D;IAC7E,eAAe,EAAE,2CAA2C;IAC5D,eAAe,EAAE,2CAA2C;IAC5D,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE,WAAW;IACvB,WAAW,EAAE,oBAAoB;IACjC,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,eAAe;IAChC,cAAc,EAAE,oBAAoB;IACpC,gBAAgB,EAAE,mBAAmB;CAC7B,CAAC;AAEX;;;;GAIG;AACU,QAAA,iBAAiB,GAAG,kBAAkB,CAAC;AAEpD;;;;GAIG;AACU,QAAA,cAAc,GAAG,0CAA0C,CAAC;AAEzE;;;;GAIG;AACU,QAAA,gBAAgB,GAAG,kBAAkB,CAAC;AAEnD;;;;GAIG;AACU,QAAA,cAAc,GAAG,MAAM,CAAC;AAExB,QAAA,MAAM,GAAG,6BAA6B,CAAC;AACvC,QAAA,gBAAgB,GAAG,+BAA+B,CAAC","sourcesContent":["export const BITS = 128;\nexport const GROUPS = 8;\n\n/**\n * Represents IPv6 address scopes\n * @memberof Address6\n * @static\n */\nexport const SCOPES: { [key: number]: string | undefined } = {\n 0: 'Reserved',\n 1: 'Interface local',\n 2: 'Link local',\n 4: 'Admin local',\n 5: 'Site local',\n 8: 'Organization local',\n 14: 'Global',\n 15: 'Reserved',\n} as const;\n\n/**\n * Represents IPv6 address types\n * @memberof Address6\n * @static\n */\nexport const TYPES: { [key: string]: string | undefined } = {\n 'ff01::1/128': 'Multicast (All nodes on this interface)',\n 'ff01::2/128': 'Multicast (All routers on this interface)',\n 'ff02::1/128': 'Multicast (All nodes on this link)',\n 'ff02::2/128': 'Multicast (All routers on this link)',\n 'ff05::2/128': 'Multicast (All routers in this site)',\n 'ff02::5/128': 'Multicast (OSPFv3 AllSPF routers)',\n 'ff02::6/128': 'Multicast (OSPFv3 AllDR routers)',\n 'ff02::9/128': 'Multicast (RIP routers)',\n 'ff02::a/128': 'Multicast (EIGRP routers)',\n 'ff02::d/128': 'Multicast (PIM routers)',\n 'ff02::16/128': 'Multicast (MLDv2 reports)',\n 'ff01::fb/128': 'Multicast (mDNSv6)',\n 'ff02::fb/128': 'Multicast (mDNSv6)',\n 'ff05::fb/128': 'Multicast (mDNSv6)',\n 'ff02::1:2/128': 'Multicast (All DHCP servers and relay agents on this link)',\n 'ff05::1:2/128': 'Multicast (All DHCP servers and relay agents in this site)',\n 'ff02::1:3/128': 'Multicast (All DHCP servers on this link)',\n 'ff05::1:3/128': 'Multicast (All DHCP servers in this site)',\n '::/128': 'Unspecified',\n '::1/128': 'Loopback',\n 'ff00::/8': 'Multicast',\n 'fe80::/10': 'Link-local unicast',\n 'fc00::/7': 'Unique local',\n '2002::/16': '6to4',\n '2001:db8::/32': 'Documentation',\n '64:ff9b::/96': 'NAT64 (well-known)',\n '64:ff9b:1::/48': 'NAT64 (local-use)',\n} as const;\n\n/**\n * A regular expression that matches bad characters in an IPv6 address\n * @memberof Address6\n * @static\n */\nexport const RE_BAD_CHARACTERS = /([^0-9a-f:/%])/gi;\n\n/**\n * A regular expression that matches an incorrect IPv6 address\n * @memberof Address6\n * @static\n */\nexport const RE_BAD_ADDRESS = /([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\\/$)/gi;\n\n/**\n * A regular expression that matches an IPv6 subnet\n * @memberof Address6\n * @static\n */\nexport const RE_SUBNET_STRING = /\\/\\d{1,3}(?=%|$)/;\n\n/**\n * A regular expression that matches an IPv6 zone\n * @memberof Address6\n * @static\n */\nexport const RE_ZONE_STRING = /%.*$/;\n\nexport const RE_URL = /^\\[{0,1}([0-9a-f:]+)\\]{0,1}/;\nexport const RE_URL_WITH_PORT = /\\[([0-9a-f:]+)\\]:([0-9]{1,5})/;\n"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.d.ts b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.d.ts deleted file mode 100644 index 70ec46e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export declare function escapeHtml(s: string): string; -/** - * @returns {String} the string with all zeroes contained in a - */ -export declare function spanAllZeroes(s: string): string; -/** - * @returns {String} the string with each character contained in a - */ -export declare function spanAll(s: string, offset?: number): string; -/** - * @returns {String} the string with leading zeroes contained in a - */ -export declare function spanLeadingZeroes(address: string): string; -/** - * Groups an address - * @returns {String} a grouped address - */ -export declare function simpleGroup(addressString: string, offset?: number): string[]; diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.js b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.js deleted file mode 100644 index e6bae04..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.escapeHtml = escapeHtml; -exports.spanAllZeroes = spanAllZeroes; -exports.spanAll = spanAll; -exports.spanLeadingZeroes = spanLeadingZeroes; -exports.simpleGroup = simpleGroup; -function escapeHtml(s) { - return s - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, '''); -} -/** - * @returns {String} the string with all zeroes contained in a - */ -function spanAllZeroes(s) { - return escapeHtml(s).replace(/(0+)/g, '$1'); -} -/** - * @returns {String} the string with each character contained in a - */ -function spanAll(s, offset = 0) { - const letters = s.split(''); - return letters - .map((n, i) => `${spanAllZeroes(n)}`) - .join(''); -} -function spanLeadingZeroesSimple(group) { - return escapeHtml(group).replace(/^(0+)/, '$1'); -} -/** - * @returns {String} the string with leading zeroes contained in a - */ -function spanLeadingZeroes(address) { - const groups = address.split(':'); - return groups.map((g) => spanLeadingZeroesSimple(g)).join(':'); -} -/** - * Groups an address - * @returns {String} a grouped address - */ -function simpleGroup(addressString, offset = 0) { - const groups = addressString.split(':'); - return groups.map((g, i) => { - if (/group-v4/.test(g)) { - return g; - } - return `${spanLeadingZeroesSimple(g)}`; - }); -} -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.js.map b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.js.map deleted file mode 100644 index f7ea189..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/v6/helpers.ts"],"names":[],"mappings":";;AAAA,gCAOC;AAKD,sCAEC;AAKD,0BASC;AASD,8CAIC;AAMD,kCAUC;AAzDD,SAAgB,UAAU,CAAC,CAAS;IAClC,OAAO,CAAC;SACL,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,CAAS;IACrC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,8BAA8B,CAAC,CAAC;AACxE,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO,CAAC,CAAS,EAAE,SAAiB,CAAC;IACnD,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE5B,OAAO,OAAO;SACX,GAAG,CACF,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACP,4BAA4B,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,SAAS,CACjG;SACA,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAa;IAC5C,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,8BAA8B,CAAC,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,SAAgB,iBAAiB,CAAC,OAAe;IAC/C,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,SAAgB,WAAW,CAAC,aAAqB,EAAE,SAAiB,CAAC;IACnE,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAExC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACzB,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACvB,OAAO,CAAC,CAAC;QACX,CAAC;QAED,OAAO,kCAAkC,CAAC,GAAG,MAAM,KAAK,uBAAuB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9F,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["export function escapeHtml(s: string): string {\n return s\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\n/**\n * @returns {String} the string with all zeroes contained in a \n */\nexport function spanAllZeroes(s: string): string {\n return escapeHtml(s).replace(/(0+)/g, '$1');\n}\n\n/**\n * @returns {String} the string with each character contained in a \n */\nexport function spanAll(s: string, offset: number = 0): string {\n const letters = s.split('');\n\n return letters\n .map(\n (n, i) =>\n `${spanAllZeroes(n)}`,\n )\n .join('');\n}\n\nfunction spanLeadingZeroesSimple(group: string): string {\n return escapeHtml(group).replace(/^(0+)/, '$1');\n}\n\n/**\n * @returns {String} the string with leading zeroes contained in a \n */\nexport function spanLeadingZeroes(address: string): string {\n const groups = address.split(':');\n\n return groups.map((g) => spanLeadingZeroesSimple(g)).join(':');\n}\n\n/**\n * Groups an address\n * @returns {String} a grouped address\n */\nexport function simpleGroup(addressString: string, offset: number = 0): string[] {\n const groups = addressString.split(':');\n\n return groups.map((g, i) => {\n if (/group-v4/.test(g)) {\n return g;\n }\n\n return `${spanLeadingZeroesSimple(g)}`;\n });\n}\n"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.d.ts b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.d.ts deleted file mode 100644 index daa38f9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare function groupPossibilities(possibilities: string[]): string; -export declare function padGroup(group: string): string; -export declare const ADDRESS_BOUNDARY = "[^A-Fa-f0-9:]"; -export declare function simpleRegularExpression(groups: string[]): string; -export declare function possibleElisions(elidedGroups: number, moreLeft?: boolean, moreRight?: boolean): string; diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.js b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.js deleted file mode 100644 index a2c5145..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ADDRESS_BOUNDARY = void 0; -exports.groupPossibilities = groupPossibilities; -exports.padGroup = padGroup; -exports.simpleRegularExpression = simpleRegularExpression; -exports.possibleElisions = possibleElisions; -const v6 = __importStar(require("./constants")); -function groupPossibilities(possibilities) { - return `(${possibilities.join('|')})`; -} -function padGroup(group) { - if (group.length < 4) { - return `0{0,${4 - group.length}}${group}`; - } - return group; -} -exports.ADDRESS_BOUNDARY = '[^A-Fa-f0-9:]'; -function simpleRegularExpression(groups) { - const zeroIndexes = []; - groups.forEach((group, i) => { - const groupInteger = parseInt(group, 16); - if (groupInteger === 0) { - zeroIndexes.push(i); - } - }); - // You can technically elide a single 0, this creates the regular expressions - // to match that eventuality - const possibilities = zeroIndexes.map((zeroIndex) => groups - .map((group, i) => { - if (i === zeroIndex) { - const elision = i === 0 || i === v6.GROUPS - 1 ? ':' : ''; - return groupPossibilities([padGroup(group), elision]); - } - return padGroup(group); - }) - .join(':')); - // The simplest case - possibilities.push(groups.map(padGroup).join(':')); - return groupPossibilities(possibilities); -} -function possibleElisions(elidedGroups, moreLeft, moreRight) { - const left = moreLeft ? '' : ':'; - const right = moreRight ? '' : ':'; - const possibilities = []; - // 1. elision of everything (::) - if (!moreLeft && !moreRight) { - possibilities.push('::'); - } - // 2. complete elision of the middle - if (moreLeft && moreRight) { - possibilities.push(''); - } - if ((moreRight && !moreLeft) || (!moreRight && moreLeft)) { - // 3. complete elision of one side - possibilities.push(':'); - } - // 4. elision from the left side - possibilities.push(`${left}(:0{1,4}){1,${elidedGroups - 1}}`); - // 5. elision from the right side - possibilities.push(`(0{1,4}:){1,${elidedGroups - 1}}${right}`); - // 6. no elision - possibilities.push(`(0{1,4}:){${elidedGroups - 1}}0{1,4}`); - // 7. elision (including sloppy elision) from the middle - for (let groups = 1; groups < elidedGroups - 1; groups++) { - for (let position = 1; position < elidedGroups - groups; position++) { - possibilities.push(`(0{1,4}:){${position}}:(0{1,4}:){${elidedGroups - position - groups - 1}}0{1,4}`); - } - } - return groupPossibilities(possibilities); -} -//# sourceMappingURL=regular-expressions.js.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.js.map b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.js.map deleted file mode 100644 index a6cd2f4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/dist/v6/regular-expressions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"regular-expressions.js","sourceRoot":"","sources":["../../src/v6/regular-expressions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,gDAEC;AAED,4BAMC;AAID,0DA+BC;AAED,4CA4CC;AA7FD,gDAAkC;AAElC,SAAgB,kBAAkB,CAAC,aAAuB;IACxD,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AACxC,CAAC;AAED,SAAgB,QAAQ,CAAC,KAAa;IACpC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;IAC5C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAEY,QAAA,gBAAgB,GAAG,eAAe,CAAC;AAEhD,SAAgB,uBAAuB,CAAC,MAAgB;IACtD,MAAM,WAAW,GAAa,EAAE,CAAC;IAEjC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAC1B,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEzC,IAAI,YA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,CAAC;IAC3B,CAAC;IAED,oCAAoC;IACpC,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC;QAC1B,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC;IAED,IAAI,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,SAAS,IAAI,QAAQ,CAAC,EAAE,CAAC;QACzD,kCAAkC;QAClC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED,gCAAgC;IAChC,aAAa,CAAC,IAAI,CAAC,GAAG,IAAI,eAAe,YAAY,GAAG,CAAC,GAAG,CAAC,CAAC;IAE9D,iCAAiC;IACjC,aAAa,CAAC,IAAI,CAAC,eAAe,YAAY,GAAG,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAE/D,gBAAgB;IAChB,aAAa,CAAC,IAAI,CAAC,aAAa,YAAY,GAAG,CAAC,SAAS,CAAC,CAAC;IAE3D,wDAAwD;IACxD,KAAK,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;QACzD,KAAK,IAAI,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;YACpE,aAAa,CAAC,IAAI,CAChB,aAAa,QAAQ,eAAe,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,CAAC,SAAS,CAClF,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["import * as v6 from './constants';\n\nexport function groupPossibilities(possibilities: string[]): string {\n return `(${possibilities.join('|')})`;\n}\n\nexport function padGroup(group: string): string {\n if (group.length < 4) {\n return `0{0,${4 - group.length}}${group}`;\n }\n\n return group;\n}\n\nexport const ADDRESS_BOUNDARY = '[^A-Fa-f0-9:]';\n\nexport function simpleRegularExpression(groups: string[]) {\n const zeroIndexes: number[] = [];\n\n groups.forEach((group, i) => {\n const groupInteger = parseInt(group, 16);\n\n if (groupInteger === 0) {\n zeroIndexes.push(i);\n }\n });\n\n // You can technically elide a single 0, this creates the regular expressions\n // to match that eventuality\n const possibilities = zeroIndexes.map((zeroIndex) =>\n groups\n .map((group, i) => {\n if (i === zeroIndex) {\n const elision = i === 0 || i === v6.GROUPS - 1 ? ':' : '';\n\n return groupPossibilities([padGroup(group), elision]);\n }\n\n return padGroup(group);\n })\n .join(':'),\n );\n\n // The simplest case\n possibilities.push(groups.map(padGroup).join(':'));\n\n return groupPossibilities(possibilities);\n}\n\nexport function possibleElisions(\n elidedGroups: number,\n moreLeft?: boolean,\n moreRight?: boolean,\n): string {\n const left = moreLeft ? '' : ':';\n const right = moreRight ? '' : ':';\n\n const possibilities = [];\n\n // 1. elision of everything (::)\n if (!moreLeft && !moreRight) {\n possibilities.push('::');\n }\n\n // 2. complete elision of the middle\n if (moreLeft && moreRight) {\n possibilities.push('');\n }\n\n if ((moreRight && !moreLeft) || (!moreRight && moreLeft)) {\n // 3. complete elision of one side\n possibilities.push(':');\n }\n\n // 4. elision from the left side\n possibilities.push(`${left}(:0{1,4}){1,${elidedGroups - 1}}`);\n\n // 5. elision from the right side\n possibilities.push(`(0{1,4}:){1,${elidedGroups - 1}}${right}`);\n\n // 6. no elision\n possibilities.push(`(0{1,4}:){${elidedGroups - 1}}0{1,4}`);\n\n // 7. elision (including sloppy elision) from the middle\n for (let groups = 1; groups < elidedGroups - 1; groups++) {\n for (let position = 1; position < elidedGroups - groups; position++) {\n possibilities.push(\n `(0{1,4}:){${position}}:(0{1,4}:){${elidedGroups - position - groups - 1}}0{1,4}`,\n );\n }\n }\n\n return groupPossibilities(possibilities);\n}\n"]} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/package.json b/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/package.json deleted file mode 100644 index 47d109e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ip-address@10.2.0/node_modules/ip-address/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "ip-address", - "description": "A library for parsing IPv4 and IPv6 IP addresses in node and the browser.", - "keywords": [ - "ip", - "ipv4", - "ipv6", - "address", - "cidr", - "subnet", - "netmask", - "validate", - "validation", - "parse", - "arpa", - "bigint", - "browser" - ], - "version": "10.2.0", - "author": "Beau Gunderson (https://beaugunderson.com/)", - "license": "MIT", - "main": "dist/ip-address.js", - "types": "dist/ip-address.d.ts", - "scripts": { - "docs": "tsx scripts/build-readme.ts", - "build": "rm -rf dist; mkdir dist; tsc", - "prepack": "npm run docs && npm run build", - "test-ci": "c8 --experimental-monocart mocha", - "test": "mocha", - "watch": "mocha --watch" - }, - "c8": { - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "**/*.d.ts", - "src/ip-address.ts", - "src/v4/constants.ts", - "src/v6/constants.ts" - ], - "reporter": [ - "html", - "lcov", - "text" - ] - }, - "engines": { - "node": ">= 12" - }, - "sideEffects": false, - "files": [ - "dist" - ], - "repository": { - "type": "git", - "url": "git://github.com/beaugunderson/ip-address.git" - }, - "overrides": { - "diff": "^8.0.3", - "serialize-javascript": "^7.0.5", - "@eslint/plugin-kit": "^0.7.1" - }, - "devDependencies": { - "@types/chai": "^5.2.3", - "@types/mocha": "^10.0.10", - "@typescript-eslint/eslint-plugin": "^8.59.1", - "@typescript-eslint/parser": "^8.59.1", - "c8": "^11.0.0", - "chai": "^6.2.2", - "eslint": "^8.57.1", - "eslint_d": "^14.0.4", - "eslint-config-airbnb": "^19.0.4", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-filenames": "^1.3.2", - "eslint-plugin-import": "^2.32.0", - "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-prettier": "^5.5.5", - "eslint-plugin-sort-imports-es6-autofix": "^0.6.0", - "mocha": "^11.7.5", - "monocart-coverage-reports": "^2.12.11", - "prettier": "^3.8.3", - "source-map-support": "^0.5.21", - "tsx": "^4.21.0", - "typedoc": "^0.28.19", - "typescript": "<5.6.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.d.ts b/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.d.ts deleted file mode 100644 index 729d202..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** -Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms). - -@param codePoint - The [code point](https://en.wikipedia.org/wiki/Code_point) of a character. - -@example -``` -import isFullwidthCodePoint from 'is-fullwidth-code-point'; - -isFullwidthCodePoint('谢'.codePointAt(0)); -//=> true - -isFullwidthCodePoint('a'.codePointAt(0)); -//=> false -``` -*/ -export default function isFullwidthCodePoint(codePoint: number): boolean; diff --git a/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js b/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js deleted file mode 100644 index 671f97f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js +++ /dev/null @@ -1,50 +0,0 @@ -/* eslint-disable yoda */ -'use strict'; - -const isFullwidthCodePoint = codePoint => { - if (Number.isNaN(codePoint)) { - return false; - } - - // Code points are derived from: - // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt - if ( - codePoint >= 0x1100 && ( - codePoint <= 0x115F || // Hangul Jamo - codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET - codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET - // CJK Radicals Supplement .. Enclosed CJK Letters and Months - (0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) || - // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A - (0x3250 <= codePoint && codePoint <= 0x4DBF) || - // CJK Unified Ideographs .. Yi Radicals - (0x4E00 <= codePoint && codePoint <= 0xA4C6) || - // Hangul Jamo Extended-A - (0xA960 <= codePoint && codePoint <= 0xA97C) || - // Hangul Syllables - (0xAC00 <= codePoint && codePoint <= 0xD7A3) || - // CJK Compatibility Ideographs - (0xF900 <= codePoint && codePoint <= 0xFAFF) || - // Vertical Forms - (0xFE10 <= codePoint && codePoint <= 0xFE19) || - // CJK Compatibility Forms .. Small Form Variants - (0xFE30 <= codePoint && codePoint <= 0xFE6B) || - // Halfwidth and Fullwidth Forms - (0xFF01 <= codePoint && codePoint <= 0xFF60) || - (0xFFE0 <= codePoint && codePoint <= 0xFFE6) || - // Kana Supplement - (0x1B000 <= codePoint && codePoint <= 0x1B001) || - // Enclosed Ideographic Supplement - (0x1F200 <= codePoint && codePoint <= 0x1F251) || - // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane - (0x20000 <= codePoint && codePoint <= 0x3FFFD) - ) - ) { - return true; - } - - return false; -}; - -module.exports = isFullwidthCodePoint; -module.exports.default = isFullwidthCodePoint; diff --git a/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/license b/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/license deleted file mode 100644 index e7af2f7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/package.json b/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/package.json deleted file mode 100644 index 2137e88..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "is-fullwidth-code-point", - "version": "3.0.0", - "description": "Check if the character represented by a given Unicode code point is fullwidth", - "license": "MIT", - "repository": "sindresorhus/is-fullwidth-code-point", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd-check" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "fullwidth", - "full-width", - "full", - "width", - "unicode", - "character", - "string", - "codepoint", - "code", - "point", - "is", - "detect", - "check" - ], - "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/readme.md b/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/readme.md deleted file mode 100644 index 4236bba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) - -> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) - - -## Install - -``` -$ npm install is-fullwidth-code-point -``` - - -## Usage - -```js -const isFullwidthCodePoint = require('is-fullwidth-code-point'); - -isFullwidthCodePoint('谢'.codePointAt(0)); -//=> true - -isFullwidthCodePoint('a'.codePointAt(0)); -//=> false -``` - - -## API - -### isFullwidthCodePoint(codePoint) - -#### codePoint - -Type: `number` - -The [code point](https://en.wikipedia.org/wiki/Code_point) of a character. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/.npmignore b/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/.travis.yml b/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/.travis.yml deleted file mode 100644 index 03dcca5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: -- '7' -- '6' -- '5' -- '4' -- '0.12' -- '0.10' diff --git a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/LICENSE b/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/LICENSE deleted file mode 100644 index 4a59c94..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-2017 Thomas Watson Steen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/README.md b/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/README.md deleted file mode 100644 index 31a8f56..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# is-lambda - -Returns `true` if the current environment is an [AWS -Lambda](https://aws.amazon.com/lambda/) server. - -[![Build status](https://travis-ci.org/watson/is-lambda.svg?branch=master)](https://travis-ci.org/watson/is-lambda) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) - -## Installation - -``` -npm install is-lambda -``` - -## Usage - -```js -var isLambda = require('is-lambda') - -if (isLambda) { - console.log('The code is running on a AWS Lambda') -} -``` - -## License - -MIT diff --git a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/index.js b/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/index.js deleted file mode 100644 index b245ab1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict' - -module.exports = !!( - (process.env.LAMBDA_TASK_ROOT && process.env.AWS_EXECUTION_ENV) || - false -) diff --git a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/package.json b/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/package.json deleted file mode 100644 index d855089..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "is-lambda", - "version": "1.0.1", - "description": "Detect if your code is running on an AWS Lambda server", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "clear-require": "^1.0.1", - "standard": "^10.0.2" - }, - "scripts": { - "test": "standard && node test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/watson/is-lambda.git" - }, - "keywords": [ - "aws", - "hosting", - "hosted", - "lambda", - "detect" - ], - "author": "Thomas Watson Steen (https://twitter.com/wa7son)", - "license": "MIT", - "bugs": { - "url": "https://github.com/watson/is-lambda/issues" - }, - "homepage": "https://github.com/watson/is-lambda", - "coordinates": [ - 37.3859955, - -122.0838831 - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/test.js b/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/test.js deleted file mode 100644 index e8e7325..0000000 --- a/services/hocuspocus/node_modules/.pnpm/is-lambda@1.0.1/node_modules/is-lambda/test.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -var assert = require('assert') -var clearRequire = require('clear-require') - -process.env.AWS_EXECUTION_ENV = 'AWS_Lambda_nodejs6.10' -process.env.LAMBDA_TASK_ROOT = '/var/task' - -var isCI = require('./') -assert(isCI) - -delete process.env.AWS_EXECUTION_ENV - -clearRequire('./') -isCI = require('./') -assert(!isCI) diff --git a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/.npmignore b/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/.npmignore deleted file mode 100644 index c1cb757..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.nyc_output/ -coverage/ diff --git a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/LICENSE b/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/README.md b/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/README.md deleted file mode 100644 index 35769e8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# isexe - -Minimal module to check if a file is executable, and a normal file. - -Uses `fs.stat` and tests against the `PATHEXT` environment variable on -Windows. - -## USAGE - -```javascript -var isexe = require('isexe') -isexe('some-file-name', function (err, isExe) { - if (err) { - console.error('probably file does not exist or something', err) - } else if (isExe) { - console.error('this thing can be run') - } else { - console.error('cannot be run') - } -}) - -// same thing but synchronous, throws errors -var isExe = isexe.sync('some-file-name') - -// treat errors as just "not executable" -isexe('maybe-missing-file', { ignoreErrors: true }, callback) -var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) -``` - -## API - -### `isexe(path, [options], [callback])` - -Check if the path is executable. If no callback provided, and a -global `Promise` object is available, then a Promise will be returned. - -Will raise whatever errors may be raised by `fs.stat`, unless -`options.ignoreErrors` is set to true. - -### `isexe.sync(path, [options])` - -Same as `isexe` but returns the value and throws any errors raised. - -### Options - -* `ignoreErrors` Treat all errors as "no, this is not executable", but - don't raise them. -* `uid` Number to use as the user id -* `gid` Number to use as the group id -* `pathExt` List of path extensions to use instead of `PATHEXT` - environment variable on Windows. diff --git a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js b/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js deleted file mode 100644 index 553fb32..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var fs = require('fs') -var core -if (process.platform === 'win32' || global.TESTING_WINDOWS) { - core = require('./windows.js') -} else { - core = require('./mode.js') -} - -module.exports = isexe -isexe.sync = sync - -function isexe (path, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - if (!cb) { - if (typeof Promise !== 'function') { - throw new TypeError('callback not provided') - } - - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er) - } else { - resolve(is) - } - }) - }) - } - - core(path, options || {}, function (er, is) { - // ignore EACCES because that just means we aren't allowed to run it - if (er) { - if (er.code === 'EACCES' || options && options.ignoreErrors) { - er = null - is = false - } - } - cb(er, is) - }) -} - -function sync (path, options) { - // my kingdom for a filtered catch - try { - return core.sync(path, options || {}) - } catch (er) { - if (options && options.ignoreErrors || er.code === 'EACCES') { - return false - } else { - throw er - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js b/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js deleted file mode 100644 index 1995ea4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = isexe -isexe.sync = sync - -var fs = require('fs') - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), options) -} - -function checkStat (stat, options) { - return stat.isFile() && checkMode(stat, options) -} - -function checkMode (stat, options) { - var mod = stat.mode - var uid = stat.uid - var gid = stat.gid - - var myUid = options.uid !== undefined ? - options.uid : process.getuid && process.getuid() - var myGid = options.gid !== undefined ? - options.gid : process.getgid && process.getgid() - - var u = parseInt('100', 8) - var g = parseInt('010', 8) - var o = parseInt('001', 8) - var ug = u | g - - var ret = (mod & o) || - (mod & g) && gid === myGid || - (mod & u) && uid === myUid || - (mod & ug) && myUid === 0 - - return ret -} diff --git a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/package.json b/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/package.json deleted file mode 100644 index e452689..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "isexe", - "version": "2.0.0", - "description": "Minimal module to check if a file is executable.", - "main": "index.js", - "directories": { - "test": "test" - }, - "devDependencies": { - "mkdirp": "^0.5.1", - "rimraf": "^2.5.0", - "tap": "^10.3.0" - }, - "scripts": { - "test": "tap test/*.js --100", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/isexe.git" - }, - "keywords": [], - "bugs": { - "url": "https://github.com/isaacs/isexe/issues" - }, - "homepage": "https://github.com/isaacs/isexe#readme" -} diff --git a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/test/basic.js b/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/test/basic.js deleted file mode 100644 index d926df6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/test/basic.js +++ /dev/null @@ -1,221 +0,0 @@ -var t = require('tap') -var fs = require('fs') -var path = require('path') -var fixture = path.resolve(__dirname, 'fixtures') -var meow = fixture + '/meow.cat' -var mine = fixture + '/mine.cat' -var ours = fixture + '/ours.cat' -var fail = fixture + '/fail.false' -var noent = fixture + '/enoent.exe' -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') - -var isWindows = process.platform === 'win32' -var hasAccess = typeof fs.access === 'function' -var winSkip = isWindows && 'windows' -var accessSkip = !hasAccess && 'no fs.access function' -var hasPromise = typeof Promise === 'function' -var promiseSkip = !hasPromise && 'no global Promise' - -function reset () { - delete require.cache[require.resolve('../')] - return require('../') -} - -t.test('setup fixtures', function (t) { - rimraf.sync(fixture) - mkdirp.sync(fixture) - fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') - fs.chmodSync(meow, parseInt('0755', 8)) - fs.writeFileSync(fail, '#!/usr/bin/env false\n') - fs.chmodSync(fail, parseInt('0644', 8)) - fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') - fs.chmodSync(mine, parseInt('0744', 8)) - fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') - fs.chmodSync(ours, parseInt('0754', 8)) - t.end() -}) - -t.test('promise', { skip: promiseSkip }, function (t) { - var isexe = reset() - t.test('meow async', function (t) { - isexe(meow).then(function (is) { - t.ok(is) - t.end() - }) - }) - t.test('fail async', function (t) { - isexe(fail).then(function (is) { - t.notOk(is) - t.end() - }) - }) - t.test('noent async', function (t) { - isexe(noent).catch(function (er) { - t.ok(er) - t.end() - }) - }) - t.test('noent ignore async', function (t) { - isexe(noent, { ignoreErrors: true }).then(function (is) { - t.notOk(is) - t.end() - }) - }) - t.end() -}) - -t.test('no promise', function (t) { - global.Promise = null - var isexe = reset() - t.throws('try to meow a promise', function () { - isexe(meow) - }) - t.end() -}) - -t.test('access', { skip: accessSkip || winSkip }, function (t) { - runTest(t) -}) - -t.test('mode', { skip: winSkip }, function (t) { - delete fs.access - delete fs.accessSync - var isexe = reset() - t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) - t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) - runTest(t) -}) - -t.test('windows', function (t) { - global.TESTING_WINDOWS = true - var pathExt = '.EXE;.CAT;.CMD;.COM' - t.test('pathExt option', function (t) { - runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) - }) - t.test('pathExt env', function (t) { - process.env.PATHEXT = pathExt - runTest(t) - }) - t.test('no pathExt', function (t) { - // with a pathExt of '', any filename is fine. - // so the "fail" one would still pass. - runTest(t, { pathExt: '', skipFail: true }) - }) - t.test('pathext with empty entry', function (t) { - // with a pathExt of '', any filename is fine. - // so the "fail" one would still pass. - runTest(t, { pathExt: ';' + pathExt, skipFail: true }) - }) - t.end() -}) - -t.test('cleanup', function (t) { - rimraf.sync(fixture) - t.end() -}) - -function runTest (t, options) { - var isexe = reset() - - var optionsIgnore = Object.create(options || {}) - optionsIgnore.ignoreErrors = true - - if (!options || !options.skipFail) { - t.notOk(isexe.sync(fail, options)) - } - t.notOk(isexe.sync(noent, optionsIgnore)) - if (!options) { - t.ok(isexe.sync(meow)) - } else { - t.ok(isexe.sync(meow, options)) - } - - t.ok(isexe.sync(mine, options)) - t.ok(isexe.sync(ours, options)) - t.throws(function () { - isexe.sync(noent, options) - }) - - t.test('meow async', function (t) { - if (!options) { - isexe(meow, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - } else { - isexe(meow, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - } - }) - - t.test('mine async', function (t) { - isexe(mine, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - }) - - t.test('ours async', function (t) { - isexe(ours, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - }) - - if (!options || !options.skipFail) { - t.test('fail async', function (t) { - isexe(fail, options, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - } - - t.test('noent async', function (t) { - isexe(noent, options, function (er, is) { - t.ok(er) - t.notOk(is) - t.end() - }) - }) - - t.test('noent ignore async', function (t) { - isexe(noent, optionsIgnore, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - - t.test('directory is not executable', function (t) { - isexe(__dirname, options, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - - t.end() -} diff --git a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js b/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js deleted file mode 100644 index 3499673..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +++ /dev/null @@ -1,42 +0,0 @@ -module.exports = isexe -isexe.sync = sync - -var fs = require('fs') - -function checkPathExt (path, options) { - var pathext = options.pathExt !== undefined ? - options.pathExt : process.env.PATHEXT - - if (!pathext) { - return true - } - - pathext = pathext.split(';') - if (pathext.indexOf('') !== -1) { - return true - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase() - if (p && path.substr(-p.length).toLowerCase() === p) { - return true - } - } - return false -} - -function checkStat (stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false - } - return checkPathExt(path, options) -} - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), path, options) -} diff --git a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/LICENSE b/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/LICENSE deleted file mode 100644 index fa92d45..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Kevin Jahns . - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/README.md b/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/README.md deleted file mode 100644 index 4561a05..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Isomorphic.js - -This module provides platform-specific features as a common API. This module is mainly about providing crypto features to node, browser, and non-supported platforms using a polyfill. \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/browser.js b/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/browser.js deleted file mode 100644 index b41af93..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/browser.js +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-env browser */ -const perf = typeof performance === 'undefined' ? null : performance - -const isoCrypto = typeof crypto === 'undefined' ? null : crypto - -/** - * @type {function(number):ArrayBuffer} - */ -const cryptoRandomBuffer = isoCrypto !== null - ? len => { - // browser - const buf = new ArrayBuffer(len) - const arr = new Uint8Array(buf) - isoCrypto.getRandomValues(arr) - return buf - } - : len => { - // polyfill - const buf = new ArrayBuffer(len) - const arr = new Uint8Array(buf) - for (let i = 0; i < len; i++) { - arr[i] = Math.ceil((Math.random() * 0xFFFFFFFF) >>> 0) - } - return buf - } - -exports.performance = perf -exports.cryptoRandomBuffer = cryptoRandomBuffer diff --git a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/browser.mjs b/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/browser.mjs deleted file mode 100644 index 3a9d168..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/browser.mjs +++ /dev/null @@ -1,25 +0,0 @@ -/* eslint-env browser */ -export const performance = typeof window === 'undefined' ? null : (typeof window.performance !== 'undefined' && window.performance) || null - -const isoCrypto = typeof crypto === 'undefined' ? null : crypto - -/** - * @type {function(number):ArrayBuffer} - */ -export const cryptoRandomBuffer = isoCrypto !== null - ? len => { - // browser - const buf = new ArrayBuffer(len) - const arr = new Uint8Array(buf) - isoCrypto.getRandomValues(arr) - return buf - } - : len => { - // polyfill - const buf = new ArrayBuffer(len) - const arr = new Uint8Array(buf) - for (let i = 0; i < len; i++) { - arr[i] = Math.ceil((Math.random() * 0xFFFFFFFF) >>> 0) - } - return buf - } diff --git a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/iso.js b/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/iso.js deleted file mode 100644 index 3d3f2b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/iso.js +++ /dev/null @@ -1,18 +0,0 @@ - -const isNode = typeof process !== 'undefined' && process.release && /node|io\.js/.test(process.release.name) - -const isoBrowser = require('./browser.js') - -const perf = isNode ? require('perf_hooks').performance : isoBrowser.performance -const nodeCrypto = isNode ? require('crypto') : null - -/** - * @type {function(number):ArrayBuffer} - */ -const cryptoRandomBuffer = nodeCrypto - // node - ? len => nodeCrypto.randomBytes(len).buffer - : isoBrowser.cryptoRandomBuffer - -exports.performance = perf -exports.cryptoRandomBuffer = cryptoRandomBuffer diff --git a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/node.mjs b/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/node.mjs deleted file mode 100644 index d726a2e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/node.mjs +++ /dev/null @@ -1,5 +0,0 @@ -import perfHooks from 'perf_hooks' -import crypto from 'crypto' - -export const performance = perfHooks.performance -export const cryptoRandomBuffer = len => crypto.randomBytes(len).buffer diff --git a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/package.json b/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/package.json deleted file mode 100644 index a4faf44..0000000 --- a/services/hocuspocus/node_modules/.pnpm/isomorphic.js@0.2.5/node_modules/isomorphic.js/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "isomorphic.js", - "version": "0.2.5", - "description": "Isomorphic JavaScript helper functions (performance, crpyto, ..)", - "sideEffects": false, - "main": "./iso.js", - "browser": "./browser.mjs", - "unpkg": "./browser.mjs", - "module": "./browser.mjs", - "exports": { - ".": { - "node": { - "import": "./node.mjs", - "require": "./iso.js" - }, - "browser": { - "import": "./browser.mjs", - "require": "./browser.js" - }, - "default": { - "import": "./browser.mjs", - "require": "./iso.js" - } - }, - "./package.json": "./package.json" - }, - "dependencies": {}, - "funding": { - "type": "GitHub Sponsors ❤", - "url": "https://github.com/sponsors/dmonad" - }, - "devDependencies": { - "@types/node": "^13.13.9", - "standard": "^14.3.4", - "typescript": "^3.9.3" - }, - "scripts": { - "test": "npm run lint", - "lint": "standard && tsc", - "preversion": "npm run test" - }, - "files": [ - "browser.js", - "browser.mjs", - "iso.js", - "node.js", - "node.mjs" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/dmonad/isomorphic.js.git" - }, - "author": "Kevin Jahns ", - "license": "MIT", - "bugs": { - "url": "https://github.com/dmonad/isomorphic.js/issues" - }, - "homepage": "https://github.com/dmonad/isomorphic.js#readme", - "standard": { - "ignore": [ - "/dist", - "/node_modules", - "/docs" - ] - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.d.ts b/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.d.ts deleted file mode 100644 index cab25c6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -declare function print(input: string | boolean | number): string; -declare function print(input: undefined | void): undefined; -declare function print(input: null): null; -type Colorize = typeof print; - -export declare const $: { enabled: boolean }; - -// Colors -export declare const black: Colorize; -export declare const red: Colorize; -export declare const green: Colorize; -export declare const yellow: Colorize; -export declare const blue: Colorize; -export declare const magenta: Colorize; -export declare const cyan: Colorize; -export declare const white: Colorize; -export declare const gray: Colorize; -export declare const grey: Colorize; - -// Backgrounds -export declare const bgBlack: Colorize; -export declare const bgRed: Colorize; -export declare const bgGreen: Colorize; -export declare const bgYellow: Colorize; -export declare const bgBlue: Colorize; -export declare const bgMagenta: Colorize; -export declare const bgCyan: Colorize; -export declare const bgWhite: Colorize; - -// Modifiers -export declare const reset: Colorize; -export declare const bold: Colorize; -export declare const dim: Colorize; -export declare const italic: Colorize; -export declare const underline: Colorize; -export declare const inverse: Colorize; -export declare const hidden: Colorize; -export declare const strikethrough: Colorize; diff --git a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.js b/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.js deleted file mode 100644 index 89fb012..0000000 --- a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.js +++ /dev/null @@ -1,53 +0,0 @@ -let FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY=true; -if (typeof process !== 'undefined') { - ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}); - isTTY = process.stdout && process.stdout.isTTY; -} - -const $ = exports.$ = { - enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== 'dumb' && ( - FORCE_COLOR != null && FORCE_COLOR !== '0' || isTTY - ) -} - -function init(x, y) { - let rgx = new RegExp(`\\x1b\\[${y}m`, 'g'); - let open = `\x1b[${x}m`, close = `\x1b[${y}m`; - - return function (txt) { - if (!$.enabled || txt == null) return txt; - return open + (!!~(''+txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; - }; -} - -// modifiers -exports.reset = init(0, 0); -exports.bold = init(1, 22); -exports.dim = init(2, 22); -exports.italic = init(3, 23); -exports.underline = init(4, 24); -exports.inverse = init(7, 27); -exports.hidden = init(8, 28); -exports.strikethrough = init(9, 29); - -// colors -exports.black = init(30, 39); -exports.red = init(31, 39); -exports.green = init(32, 39); -exports.yellow = init(33, 39); -exports.blue = init(34, 39); -exports.magenta = init(35, 39); -exports.cyan = init(36, 39); -exports.white = init(37, 39); -exports.gray = init(90, 39); -exports.grey = init(90, 39); - -// background colors -exports.bgBlack = init(40, 49); -exports.bgRed = init(41, 49); -exports.bgGreen = init(42, 49); -exports.bgYellow = init(43, 49); -exports.bgBlue = init(44, 49); -exports.bgMagenta = init(45, 49); -exports.bgCyan = init(46, 49); -exports.bgWhite = init(47, 49); diff --git a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs b/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs deleted file mode 100644 index e9feb83..0000000 --- a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs +++ /dev/null @@ -1,53 +0,0 @@ -let FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY=true; -if (typeof process !== 'undefined') { - ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}); - isTTY = process.stdout && process.stdout.isTTY; -} - -export const $ = { - enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== 'dumb' && ( - FORCE_COLOR != null && FORCE_COLOR !== '0' || isTTY - ) -} - -function init(x, y) { - let rgx = new RegExp(`\\x1b\\[${y}m`, 'g'); - let open = `\x1b[${x}m`, close = `\x1b[${y}m`; - - return function (txt) { - if (!$.enabled || txt == null) return txt; - return open + (!!~(''+txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; - }; -} - -// modifiers -export const reset = init(0, 0); -export const bold = init(1, 22); -export const dim = init(2, 22); -export const italic = init(3, 23); -export const underline = init(4, 24); -export const inverse = init(7, 27); -export const hidden = init(8, 28); -export const strikethrough = init(9, 29); - -// colors -export const black = init(30, 39); -export const red = init(31, 39); -export const green = init(32, 39); -export const yellow = init(33, 39); -export const blue = init(34, 39); -export const magenta = init(35, 39); -export const cyan = init(36, 39); -export const white = init(37, 39); -export const gray = init(90, 39); -export const grey = init(90, 39); - -// background colors -export const bgBlack = init(40, 49); -export const bgRed = init(41, 49); -export const bgGreen = init(42, 49); -export const bgYellow = init(43, 49); -export const bgBlue = init(44, 49); -export const bgMagenta = init(45, 49); -export const bgCyan = init(46, 49); -export const bgWhite = init(47, 49); diff --git a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.d.ts b/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.d.ts deleted file mode 100644 index fdc26ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Originally by: Rogier Schouten -// Adapted by: Madhav Varshney -declare namespace kleur { - interface Color { - (x: string | number): string; - (): Kleur; - } - - interface Kleur { - // Colors - black: Color; - red: Color; - green: Color; - yellow: Color; - blue: Color; - magenta: Color; - cyan: Color; - white: Color; - gray: Color; - grey: Color; - - // Backgrounds - bgBlack: Color; - bgRed: Color; - bgGreen: Color; - bgYellow: Color; - bgBlue: Color; - bgMagenta: Color; - bgCyan: Color; - bgWhite: Color; - - // Modifiers - reset: Color; - bold: Color; - dim: Color; - italic: Color; - underline: Color; - inverse: Color; - hidden: Color; - strikethrough: Color; - } -} - -declare let kleur: kleur.Kleur & { enabled: boolean }; -export = kleur; diff --git a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.js b/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.js deleted file mode 100644 index 5800b98..0000000 --- a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.js +++ /dev/null @@ -1,110 +0,0 @@ -'use strict'; - -let FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY=true; -if (typeof process !== 'undefined') { - ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}); - isTTY = process.stdout && process.stdout.isTTY; -} - -const $ = { - enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== 'dumb' && ( - FORCE_COLOR != null && FORCE_COLOR !== '0' || isTTY - ), - - // modifiers - reset: init(0, 0), - bold: init(1, 22), - dim: init(2, 22), - italic: init(3, 23), - underline: init(4, 24), - inverse: init(7, 27), - hidden: init(8, 28), - strikethrough: init(9, 29), - - // colors - black: init(30, 39), - red: init(31, 39), - green: init(32, 39), - yellow: init(33, 39), - blue: init(34, 39), - magenta: init(35, 39), - cyan: init(36, 39), - white: init(37, 39), - gray: init(90, 39), - grey: init(90, 39), - - // background colors - bgBlack: init(40, 49), - bgRed: init(41, 49), - bgGreen: init(42, 49), - bgYellow: init(43, 49), - bgBlue: init(44, 49), - bgMagenta: init(45, 49), - bgCyan: init(46, 49), - bgWhite: init(47, 49) -}; - -function run(arr, str) { - let i=0, tmp, beg='', end=''; - for (; i < arr.length; i++) { - tmp = arr[i]; - beg += tmp.open; - end += tmp.close; - if (!!~str.indexOf(tmp.close)) { - str = str.replace(tmp.rgx, tmp.close + tmp.open); - } - } - return beg + str + end; -} - -function chain(has, keys) { - let ctx = { has, keys }; - - ctx.reset = $.reset.bind(ctx); - ctx.bold = $.bold.bind(ctx); - ctx.dim = $.dim.bind(ctx); - ctx.italic = $.italic.bind(ctx); - ctx.underline = $.underline.bind(ctx); - ctx.inverse = $.inverse.bind(ctx); - ctx.hidden = $.hidden.bind(ctx); - ctx.strikethrough = $.strikethrough.bind(ctx); - - ctx.black = $.black.bind(ctx); - ctx.red = $.red.bind(ctx); - ctx.green = $.green.bind(ctx); - ctx.yellow = $.yellow.bind(ctx); - ctx.blue = $.blue.bind(ctx); - ctx.magenta = $.magenta.bind(ctx); - ctx.cyan = $.cyan.bind(ctx); - ctx.white = $.white.bind(ctx); - ctx.gray = $.gray.bind(ctx); - ctx.grey = $.grey.bind(ctx); - - ctx.bgBlack = $.bgBlack.bind(ctx); - ctx.bgRed = $.bgRed.bind(ctx); - ctx.bgGreen = $.bgGreen.bind(ctx); - ctx.bgYellow = $.bgYellow.bind(ctx); - ctx.bgBlue = $.bgBlue.bind(ctx); - ctx.bgMagenta = $.bgMagenta.bind(ctx); - ctx.bgCyan = $.bgCyan.bind(ctx); - ctx.bgWhite = $.bgWhite.bind(ctx); - - return ctx; -} - -function init(open, close) { - let blk = { - open: `\x1b[${open}m`, - close: `\x1b[${close}m`, - rgx: new RegExp(`\\x1b\\[${close}m`, 'g') - }; - return function (txt) { - if (this !== void 0 && this.has !== void 0) { - !!~this.has.indexOf(open) || (this.has.push(open),this.keys.push(blk)); - return txt === void 0 ? this : $.enabled ? run(this.keys, txt+'') : txt+''; - } - return txt === void 0 ? chain([open], [blk]) : $.enabled ? run([blk], txt+'') : txt+''; - }; -} - -module.exports = $; diff --git a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.mjs b/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.mjs deleted file mode 100644 index 96dadad..0000000 --- a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/index.mjs +++ /dev/null @@ -1,110 +0,0 @@ -'use strict'; - -let FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY=true; -if (typeof process !== 'undefined') { - ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}); - isTTY = process.stdout && process.stdout.isTTY; -} - -const $ = { - enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== 'dumb' && ( - FORCE_COLOR != null && FORCE_COLOR !== '0' || isTTY - ), - - // modifiers - reset: init(0, 0), - bold: init(1, 22), - dim: init(2, 22), - italic: init(3, 23), - underline: init(4, 24), - inverse: init(7, 27), - hidden: init(8, 28), - strikethrough: init(9, 29), - - // colors - black: init(30, 39), - red: init(31, 39), - green: init(32, 39), - yellow: init(33, 39), - blue: init(34, 39), - magenta: init(35, 39), - cyan: init(36, 39), - white: init(37, 39), - gray: init(90, 39), - grey: init(90, 39), - - // background colors - bgBlack: init(40, 49), - bgRed: init(41, 49), - bgGreen: init(42, 49), - bgYellow: init(43, 49), - bgBlue: init(44, 49), - bgMagenta: init(45, 49), - bgCyan: init(46, 49), - bgWhite: init(47, 49) -}; - -function run(arr, str) { - let i=0, tmp, beg='', end=''; - for (; i < arr.length; i++) { - tmp = arr[i]; - beg += tmp.open; - end += tmp.close; - if (!!~str.indexOf(tmp.close)) { - str = str.replace(tmp.rgx, tmp.close + tmp.open); - } - } - return beg + str + end; -} - -function chain(has, keys) { - let ctx = { has, keys }; - - ctx.reset = $.reset.bind(ctx); - ctx.bold = $.bold.bind(ctx); - ctx.dim = $.dim.bind(ctx); - ctx.italic = $.italic.bind(ctx); - ctx.underline = $.underline.bind(ctx); - ctx.inverse = $.inverse.bind(ctx); - ctx.hidden = $.hidden.bind(ctx); - ctx.strikethrough = $.strikethrough.bind(ctx); - - ctx.black = $.black.bind(ctx); - ctx.red = $.red.bind(ctx); - ctx.green = $.green.bind(ctx); - ctx.yellow = $.yellow.bind(ctx); - ctx.blue = $.blue.bind(ctx); - ctx.magenta = $.magenta.bind(ctx); - ctx.cyan = $.cyan.bind(ctx); - ctx.white = $.white.bind(ctx); - ctx.gray = $.gray.bind(ctx); - ctx.grey = $.grey.bind(ctx); - - ctx.bgBlack = $.bgBlack.bind(ctx); - ctx.bgRed = $.bgRed.bind(ctx); - ctx.bgGreen = $.bgGreen.bind(ctx); - ctx.bgYellow = $.bgYellow.bind(ctx); - ctx.bgBlue = $.bgBlue.bind(ctx); - ctx.bgMagenta = $.bgMagenta.bind(ctx); - ctx.bgCyan = $.bgCyan.bind(ctx); - ctx.bgWhite = $.bgWhite.bind(ctx); - - return ctx; -} - -function init(open, close) { - let blk = { - open: `\x1b[${open}m`, - close: `\x1b[${close}m`, - rgx: new RegExp(`\\x1b\\[${close}m`, 'g') - }; - return function (txt) { - if (this !== void 0 && this.has !== void 0) { - !!~this.has.indexOf(open) || (this.has.push(open),this.keys.push(blk)); - return txt === void 0 ? this : $.enabled ? run(this.keys, txt+'') : txt+''; - } - return txt === void 0 ? chain([open], [blk]) : $.enabled ? run([blk], txt+'') : txt+''; - }; -} - -export default $; diff --git a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/license b/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/license deleted file mode 100644 index a3f96f8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Luke Edwards (lukeed.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/package.json b/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/package.json deleted file mode 100644 index 5007c05..0000000 --- a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "kleur", - "version": "4.1.5", - "repository": "lukeed/kleur", - "description": "The fastest Node.js library for formatting terminal text with ANSI colors~!", - "module": "index.mjs", - "types": "index.d.ts", - "main": "index.js", - "license": "MIT", - "exports": { - ".": { - "types": "./index.d.ts", - "import": "./index.mjs", - "require": "./index.js" - }, - "./colors": { - "types": "./colors.d.ts", - "import": "./colors.mjs", - "require": "./colors.js" - } - }, - "files": [ - "*.d.ts", - "colors.*", - "index.*" - ], - "author": { - "name": "Luke Edwards", - "email": "luke.edwards05@gmail.com", - "url": "https://lukeed.com" - }, - "scripts": { - "build": "node build", - "test": "uvu -r esm -i utils -i xyz" - }, - "engines": { - "node": ">=6" - }, - "keywords": [ - "ansi", - "cli", - "color", - "colors", - "console", - "terminal" - ], - "devDependencies": { - "esm": "3.2.25", - "uvu": "0.3.3" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/readme.md b/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/readme.md deleted file mode 100644 index de7f5aa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/readme.md +++ /dev/null @@ -1,232 +0,0 @@ -
- kleur -
- - - -
The fastest Node.js library for formatting terminal text with ANSI colors~!
- -## Features - -* No dependencies -* Super [lightweight](#load-time) & [performant](#performance) -* Supports [nested](#nested-methods) & [chained](#chained-methods) colors -* No `String.prototype` modifications -* Conditional [color support](#conditional-support) -* [Fully treeshakable](#individual-colors) -* Familiar [API](#api) - ---- - -As of `v3.0` the Chalk-style syntax (magical getter) is no longer used.
Please visit [History](#history) for migration paths supporting that syntax. - ---- - - -## Install - -``` -$ npm install --save kleur -``` - - -## Usage - -```js -import kleur from 'kleur'; - -// basic usage -kleur.red('red text'); - -// chained methods -kleur.blue().bold().underline('howdy partner'); - -// nested methods -kleur.bold(`${ white().bgRed('[ERROR]') } ${ kleur.red().italic('Something happened')}`); -``` - -### Chained Methods - -```js -const { bold, green } = require('kleur'); - -console.log(bold().red('this is a bold red message')); -console.log(bold().italic('this is a bold italicized message')); -console.log(bold().yellow().bgRed().italic('this is a bold yellow italicized message')); -console.log(green().bold().underline('this is a bold green underlined message')); -``` - - - -### Nested Methods - -```js -const { yellow, red, cyan } = require('kleur'); - -console.log(yellow(`foo ${red().bold('red')} bar ${cyan('cyan')} baz`)); -console.log(yellow('foo ' + red().bold('red') + ' bar ' + cyan('cyan') + ' baz')); -``` - - - - -### Conditional Support - -Toggle color support as needed; `kleur` includes simple auto-detection which may not cover all cases. - -> **Note:** Both `kleur` and `kleur/colors` share the same detection logic. - -```js -import kleur from 'kleur'; - -// manually disable -kleur.enabled = false; - -// or use another library to detect support -kleur.enabled = require('color-support').level > 0; - -console.log(kleur.red('I will only be colored red if the terminal supports colors')); -``` - -> **Important:**
Colors will be disabled automatically in non [TTY contexts](https://nodejs.org/api/process.html#process_a_note_on_process_i_o). For example, spawning another process or piping output into another process will disable colorization automatically. To force colors in your piped output, you may do so with the `FORCE_COLOR=1` environment variable: - -```sh -$ node app.js #=> COLORS -$ node app.js > log.txt #=> NO COLORS -$ FORCE_COLOR=1 node app.js > log.txt #=> COLORS -$ FORCE_COLOR=0 node app.js > log.txt #=> NO COLORS -``` - -## API - -Any `kleur` method returns a `String` when invoked with input; otherwise chaining is expected. - -> It's up to the developer to pass the output to destinations like `console.log`, `process.stdout.write`, etc. - -The methods below are grouped by type for legibility purposes only. They each can be [chained](#chained-methods) or [nested](#nested-methods) with one another. - -***Colors:*** -> black — red — green — yellow — blue — magenta — cyan — white — gray — grey - -***Backgrounds:*** -> bgBlack — bgRed — bgGreen — bgYellow — bgBlue — bgMagenta — bgCyan — bgWhite - -***Modifiers:*** -> reset — bold — dim — italic* — underline — inverse — hidden — strikethrough* - -* Not widely supported - - -## Individual Colors - -When you only need a few colors, it doesn't make sense to import _all_ of `kleur` because, as small as it is, `kleur` is not treeshakeable, and so most of its code will be doing nothing. In order to fix this, you can import from the `kleur/colors` submodule which _fully_ supports tree-shaking. - -The caveat with this approach is that color functions **are not** chainable~!
Each function receives and colorizes its input. You may combine colors, backgrounds, and modifiers by nesting function calls within other functions. - -```js -// or: import * as kleur from 'kleur/colors'; -import { red, underline, bgWhite } from 'kleur/colors'; - -red('red text'); -//~> kleur.red('red text'); - -underline(red('red underlined text')); -//~> kleur.underline().red('red underlined text'); - -bgWhite(underline(red('red underlined text w/ white background'))); -//~> kleur.bgWhite().underline().red('red underlined text w/ white background'); -``` - -> **Note:** All the same [colors, backgrounds, and modifiers](#api) are available. - -***Conditional Support*** - -The `kleur/colors` submodule also allows you to toggle color support, as needed.
-It includes the same initial assumptions as `kleur`, in an attempt to have colors enabled by default. - -Unlike `kleur`, this setting exists as `kleur.$.enabled` instead of `kleur.enabled`: - -```js -import * as kleur from 'kleur/colors'; -// or: import { $, red } from 'kleur/colors'; - -// manually disabled -kleur.$.enabled = false; - -// or use another library to detect support -kleur.$.enabled = require('color-support').level > 0; - -console.log(red('I will only be colored red if the terminal supports colors')); -``` - - -## Benchmarks - -> Using Node v10.13.0 - -### Load time - -``` -chalk :: 5.303ms -kleur :: 0.488ms -kleur/colors :: 0.369ms -ansi-colors :: 1.504ms -``` - -### Performance - -``` -# All Colors - ansi-colors x 177,625 ops/sec ±1.47% (92 runs sampled) - chalk x 611,907 ops/sec ±0.20% (92 runs sampled) - kleur x 742,509 ops/sec ±1.47% (93 runs sampled) - kleur/colors x 881,742 ops/sec ±0.19% (98 runs sampled) - -# Stacked colors - ansi-colors x 23,331 ops/sec ±1.81% (94 runs sampled) - chalk x 337,178 ops/sec ±0.20% (98 runs sampled) - kleur x 78,299 ops/sec ±1.01% (97 runs sampled) - kleur/colors x 104,431 ops/sec ±0.22% (97 runs sampled) - -# Nested colors - ansi-colors x 67,181 ops/sec ±1.15% (92 runs sampled) - chalk x 116,361 ops/sec ±0.63% (94 runs sampled) - kleur x 139,514 ops/sec ±0.76% (95 runs sampled) - kleur/colors x 145,716 ops/sec ±0.97% (97 runs sampled) -``` - - -## History - -This project originally forked [`ansi-colors`](https://github.com/doowb/ansi-colors). - -Beginning with `kleur@3.0`, the Chalk-style syntax (magical getter) has been replaced with function calls per key: - -```js -// Old: -c.red.bold.underline('old'); - -// New: -c.red().bold().underline('new'); -``` -> As I work more with Rust, the newer syntax feels so much better & more natural! - -If you prefer the old syntax, you may migrate to `ansi-colors` or newer `chalk` releases.
Versions below `kleur@3.0` have been officially deprecated. - - -## License - -MIT © [Luke Edwards](https://lukeed.com) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/isomorphic.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/isomorphic.js deleted file mode 120000 index 679b469..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/isomorphic.js +++ /dev/null @@ -1 +0,0 @@ -../../isomorphic.js@0.2.5/node_modules/isomorphic.js \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/.github/workflows/node.js.yml b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/.github/workflows/node.js.yml deleted file mode 100644 index 22254fa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/.github/workflows/node.js.yml +++ /dev/null @@ -1,24 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Testing Lib0 -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x, 18.x] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm test diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/.jsdoc.json b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/.jsdoc.json deleted file mode 100644 index ff0a61b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/.jsdoc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "plugins": [ - "plugins/markdown", - "jsdoc-plugin-typescript" - ], - "recurseDepth": 10, - "source": { - "excludePattern": "/\\.test\\.js/" - }, - "sourceType": "module", - "tags": { - "allowUnknownTags": true, - "dictionaries": ["jsdoc", "closure"] - }, - "typescript": { - "moduleRoot": "./" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/LICENSE b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/LICENSE deleted file mode 100644 index ac0e51d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2019 Kevin Jahns . - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/README.md b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/README.md deleted file mode 100644 index b360944..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/README.md +++ /dev/null @@ -1,1414 +0,0 @@ - -# Lib0 -> Monorepo of isomorphic utility functions - -This library is meant to replace all global JavaScript functions with isomorphic module imports. Additionally, it implements several performance-oriented utility modules. Most noteworthy are the binary encoding/decoding modules **[lib0/encoding]** / **[lib0/decoding]**, the randomized testing framework **[lib0/testing]**, the fast Pseudo Random Number Generator **[lib0/PRNG]**, the small socket.io alternative **[lib0/websocket]**, and the logging module **[lib0/logging]** that allows colorized logging in all environments. Lib0 has only one dependency, which is also from the author of lib0. If lib0 is transpiled with rollup or webpack, very little code is produced because of the way that it is written. All exports are pure and are removed by transpilers that support dead code elimination. Here is an example of how dead code elemination and mangling optimizes code from lib0: - -```js -// How the code is optimized by transpilers: - -// lib0/json.js -export const stringify = JSON.stringify -export const parse = JSON.parse - -// index.js -import * as json from 'lib0/json' -export const f = (arg1, arg2) => json.stringify(arg1) + json.stringify(arg2) - -// compiled with rollup and uglifyjs: -const s=JSON.stringify,f=(a,b)=>s(a)+s(b) -export {f} -``` - -## Performance resources - -Each function in this library is tested thoroughly and is not deoptimized by v8 (except some logging and comparison functions that can't be implemented without deoptimizations). This library implements its own test suite that is designed for randomized testing and inspecting performance issues. - -* `node --trace-deopt` and `node --trace-opt` -* https://youtu.be/IFWulQnM5E0 Good intro video -* https://github.com/thlorenz/v8-perf -* https://github.com/thlorenz/deoptigate - A great tool for investigating deoptimizations -* https://github.com/vhf/v8-bailout-reasons - Description of some deopt messages - -## Code style - -The code style might be a bit different from what you are used to. Stay open. Most of the design choices have been thought through. The purpose of this code style is to create code that is optimized by the compiler and that results in small code bundles when used with common module bundlers. Keep that in mind when reading the library. - -* No polymorphism! -* Modules should only export pure functions and constants. This way the module bundler can eliminate dead code. The statement `const x = someCondition ? A : B` cannot be eleminated, because it is tied to a condition. -* Use Classes for structuring data. Classes are well supported by jsdoc and are immediately optimized by the compiler. I.e. prefer `class Coord { constructor (x, y) { this.x = x; this.y = y} }` instead of `{ x: x, y: y }`, because the compiler needs to be assured that the order of properties does not change. `{ y: y, x: x }` has a different hidden class than `{ x: x, y: y }`, which will lead to code deoptimizations if their use is alternated. -* The user of your module should never create data objects with the `new` keyword. Prefer exporting factory functions like `const createCoordinate = (x, y) => new Coord(x, y)`. -* The use of class methods is discouraged, because method names can't be mangled or removed by dead code elimination. -* The only acceptable use of methods is when two objects implement functionality differently. - E.g. `class Duck { eat () { swallow() } }` and `class Cow { eat () { chew() } }` have the - same signature, but implement it differently. -* Prefer `const` variable declarations. Use `let` only in loops. `const` always leads to easier code. -* Keep the potential execution stack small and compartmentalized. Nobody wants to debug spaghetti code. -* Give proper names to your functions and ask yourself if you would know what the function does if you saw it in the execution stack. -* Avoid recursion. There is a stack limit in most browsers and not every recursive function is optimized by the compiler. -* Semicolons are superfluous. Lint with https://standardjs.com/ - -## Using lib0 - -`lib0` contains isomorphic modules that work in nodejs, the browser, and other environments. It exports modules as the `commonjs` and the new `esm module` format. - -If possible, - -**ESM module** -```js -import module from 'lib0/[module]' // automatically resolves to lib0/[module].js -``` - -**CommonJS** -```js -require('lib0/[module]') // automatically resolves to lib0/dist/[module].cjs -``` - -**Manual** - -Automatically resolving to `commonjs` and `esm modules` is implemented using *conditional exports* which is available in `node>=v12`. If support for older versions is required, then it is recommended to define the location of the module manually: - -```js -import module from 'lib0/[module].js' -// require('lib0/dist/[module].cjs') -``` - -## Modules - -
[lib0/array] Utility module to work with Arrays. -
import * as array from 'lib0/array'
-
-array.last(arr: ArrayLike<L>): L
-

Return the last element of an array. The element must exist

-array.create(): Array<C>
-array.copy(a: Array<D>): Array<D>
-array.appendTo(dest: Array<M>, src: Array<M>)
-

Append elements from src to dest

-array.from(arraylike: ArrayLike<T>|Iterable<T>): T
-

Transforms something array-like to an actual Array.

-array.every(arr: ARR, f: function(ITEM, number, ARR):boolean): boolean
-

True iff condition holds on every element in the Array.

-array.some(arr: ARR, f: function(S, number, ARR):boolean): boolean
-

True iff condition holds on some element in the Array.

-array.equalFlat(a: ArrayLike<ELEM>, b: ArrayLike<ELEM>): boolean
-array.flatten(arr: Array<Array<ELEM>>): Array<ELEM>
-array.isArray
-array.unique(arr: Array<T>): Array<T>
-array.uniqueBy(arr: ArrayLike<T>, mapper: function(T):M): Array<T>
-
-
-
[lib0/binary] Binary data constants. -
import * as binary from 'lib0/binary'
-
-binary.BIT1: number
-

n-th bit activated.

-binary.BIT2
-binary.BIT3
-binary.BIT4
-binary.BIT5
-binary.BIT6
-binary.BIT7
-binary.BIT8
-binary.BIT9
-binary.BIT10
-binary.BIT11
-binary.BIT12
-binary.BIT13
-binary.BIT14
-binary.BIT15
-binary.BIT16
-binary.BIT17
-binary.BIT18
-binary.BIT19
-binary.BIT20
-binary.BIT21
-binary.BIT22
-binary.BIT23
-binary.BIT24
-binary.BIT25
-binary.BIT26
-binary.BIT27
-binary.BIT28
-binary.BIT29
-binary.BIT30
-binary.BIT31
-binary.BIT32
-binary.BITS0: number
-

First n bits activated.

-binary.BITS1
-binary.BITS2
-binary.BITS3
-binary.BITS4
-binary.BITS5
-binary.BITS6
-binary.BITS7
-binary.BITS8
-binary.BITS9
-binary.BITS10
-binary.BITS11
-binary.BITS12
-binary.BITS13
-binary.BITS14
-binary.BITS15
-binary.BITS16
-binary.BITS17
-binary.BITS18
-binary.BITS19
-binary.BITS20
-binary.BITS21
-binary.BITS22
-binary.BITS23
-binary.BITS24
-binary.BITS25
-binary.BITS26
-binary.BITS27
-binary.BITS28
-binary.BITS29
-binary.BITS30
-binary.BITS31: number
-binary.BITS32: number
-
-
-
[lib0/broadcastchannel] Helpers for cross-tab communication using broadcastchannel with LocalStorage fallback. -
import * as broadcastchannel from 'lib0/broadcastchannel'
- -
// In browser window A:
-broadcastchannel.subscribe('my events', data => console.log(data))
-broadcastchannel.publish('my events', 'Hello world!') // => A: 'Hello world!' fires synchronously in same tab
-
-// In browser window B:
-broadcastchannel.publish('my events', 'hello from tab B') // => A: 'hello from tab B'
-
-
-broadcastchannel.subscribe(room: string, f: function(any, any):any)
-

Subscribe to global publish events.

-broadcastchannel.unsubscribe(room: string, f: function(any, any):any)
-

Unsubscribe from publish global events.

-broadcastchannel.publish(room: string, data: any, origin: any)
-

Publish data to all subscribers (including subscribers on this tab)

-
-
-
[lib0/buffer] Utility functions to work with buffers (Uint8Array). -
import * as buffer from 'lib0/buffer'
-
-buffer.createUint8ArrayFromLen(len: number)
-buffer.createUint8ArrayViewFromArrayBuffer(buffer: ArrayBuffer, byteOffset: number, length: number)
-

Create Uint8Array with initial content from buffer

-buffer.createUint8ArrayFromArrayBuffer(buffer: ArrayBuffer)
-

Create Uint8Array with initial content from buffer

-buffer.toBase64
-buffer.fromBase64
-buffer.copyUint8Array(uint8Array: Uint8Array): Uint8Array
-

Copy the content of an Uint8Array view to a new ArrayBuffer.

-buffer.encodeAny(data: any): Uint8Array
-

Encode anything as a UInt8Array. It's a pun on typescripts's any type. -See encoding.writeAny for more information.

-buffer.decodeAny(buf: Uint8Array): any
-

Decode an any-encoded value.

-
-
-
[lib0/cache] An implementation of a map which has keys that expire. -
import * as cache from 'lib0/cache'
-
-new cache.Cache(timeout: number)
-cache.removeStale(cache: module:cache.Cache<K, V>): number
-cache.set(cache: module:cache.Cache<K, V>, key: K, value: V)
-cache.get(cache: module:cache.Cache<K, V>, key: K): V | undefined
-cache.refreshTimeout(cache: module:cache.Cache<K, V>, key: K)
-cache.getAsync(cache: module:cache.Cache<K, V>, key: K): V | Promise<V> | undefined
-

Works well in conjunktion with setIfUndefined which has an async init function. -Using getAsync & setIfUndefined ensures that the init function is only called once.

-cache.remove(cache: module:cache.Cache<K, V>, key: K)
-cache.setIfUndefined(cache: module:cache.Cache<K, V>, key: K, init: function():Promise<V>, removeNull: boolean): Promise<V> | V
-cache.create(timeout: number)
-
-
-
[lib0/component] Web components. -
import * as component from 'lib0/component'
-
-component.registry: CustomElementRegistry
-component.define(name: string, constr: any, opts: ElementDefinitionOptions)
-component.whenDefined(name: string): Promise<CustomElementConstructor>
-new component.Lib0Component(state: S)
-component.Lib0Component#state: S|null
-component.Lib0Component#setState(state: S, forceStateUpdate: boolean)
-component.Lib0Component#updateState(stateUpdate: any)
-component.createComponent(name: string, cnf: module:component~CONF<T>): Class<module:component.Lib0Component>
-component.createComponentDefiner(definer: function)
-component.defineListComponent
-component.defineLazyLoadingComponent
-
-
-
[lib0/conditions] Often used conditions. -
import * as conditions from 'lib0/conditions'
-
-conditions.undefinedToNull
-
-
-
[lib0/crypto] -
import * as crypto from 'lib0/crypto'
-
-y(data: string | Uint8Array): Uint8Array
-ymmetricKey(secret: string | Uint8Array, salt: string | Uint8Array, opts: Object, opts.extractable: boolean, opts.usages: Array<'sign'|'verify'|'encrypt'|'decrypt'>): PromiseLike<CryptoKey>
-ymmetricKey()
-eAsymmetricKey(opts: Object, opts.extractable: boolean, opts.usages: Array<'sign'|'verify'|'encrypt'|'decrypt'>)
-eAsymmetricKey()
-ey(key: CryptoKey)
-ey()
-ymmetricKey(jwk: any, opts: Object, opts.extractable: boolean, opts.usages: Array<'sign'|'verify'|'encrypt'|'decrypt'>)
-ymmetricKey()
-symmetricKey(jwk: any, opts: Object, opts.extractable: boolean, opts.usages: Array<'sign'|'verify'|'encrypt'|'decrypt'>)
-symmetricKey()
-(data: Uint8Array, key: CryptoKey): PromiseLike<Uint8Array>
-()
-(data: Uint8Array, key: CryptoKey): PromiseLike<Uint8Array>
-()
-(data: Uint8Array, privateKey: CryptoKey): PromiseLike<Uint8Array>
-()
-(signature: Uint8Array, data: Uint8Array, publicKey: CryptoKey): PromiseLike<boolean>
-()
-
-
-
[lib0/decoding] Efficient schema-less binary decoding with support for variable length encoding. -
import * as decoding from 'lib0/decoding'
- -

Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function.

-

Encodes numbers in little-endian order (least to most significant byte order) -and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) -which is also used in Protocol Buffers.

-
// encoding step
-const encoder = encoding.createEncoder()
-encoding.writeVarUint(encoder, 256)
-encoding.writeVarString(encoder, 'Hello world!')
-const buf = encoding.toUint8Array(encoder)
-
-
// decoding step
-const decoder = decoding.createDecoder(buf)
-decoding.readVarUint(decoder) // => 256
-decoding.readVarString(decoder) // => 'Hello world!'
-decoding.hasContent(decoder) // => false - all data is read
-
-
-new decoding.Decoder(uint8Array: Uint8Array)
-

A Decoder handles the decoding of an Uint8Array.

-decoding.Decoder#arr: Uint8Array
-

Decoding target.

-decoding.Decoder#pos: number
-

Current decoding position.

-decoding.createDecoder(uint8Array: Uint8Array): module:decoding.Decoder
-decoding.hasContent(decoder: module:decoding.Decoder): boolean
-decoding.clone(decoder: module:decoding.Decoder, newPos: number): module:decoding.Decoder
-

Clone a decoder instance. -Optionally set a new position parameter.

-decoding.readUint8Array(decoder: module:decoding.Decoder, len: number): Uint8Array
-

Create an Uint8Array view of the next len bytes and advance the position by len.

-

Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. -Use buffer.copyUint8Array to copy the result into a new Uint8Array.

-decoding.readVarUint8Array(decoder: module:decoding.Decoder): Uint8Array
-

Read variable length Uint8Array.

-

Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. -Use buffer.copyUint8Array to copy the result into a new Uint8Array.

-decoding.readTailAsUint8Array(decoder: module:decoding.Decoder): Uint8Array
-

Read the rest of the content as an ArrayBuffer

-decoding.skip8(decoder: module:decoding.Decoder): number
-

Skip one byte, jump to the next position.

-decoding.readUint8(decoder: module:decoding.Decoder): number
-

Read one byte as unsigned integer.

-decoding.readUint16(decoder: module:decoding.Decoder): number
-

Read 2 bytes as unsigned integer.

-decoding.readUint32(decoder: module:decoding.Decoder): number
-

Read 4 bytes as unsigned integer.

-decoding.readUint32BigEndian(decoder: module:decoding.Decoder): number
-

Read 4 bytes as unsigned integer in big endian order. -(most significant byte first)

-decoding.peekUint8(decoder: module:decoding.Decoder): number
-

Look ahead without incrementing the position -to the next byte and read it as unsigned integer.

-decoding.peekUint16(decoder: module:decoding.Decoder): number
-

Look ahead without incrementing the position -to the next byte and read it as unsigned integer.

-decoding.peekUint32(decoder: module:decoding.Decoder): number
-

Look ahead without incrementing the position -to the next byte and read it as unsigned integer.

-decoding.readVarUint(decoder: module:decoding.Decoder): number
-

Read unsigned integer (32bit) with variable length. -1/8th of the storage is used as encoding overhead.

-
    -
  • numbers < 2^7 is stored in one bytlength
  • -
  • numbers < 2^14 is stored in two bylength
  • -
-decoding.readVarInt(decoder: module:decoding.Decoder): number
-

Read signed integer (32bit) with variable length. -1/8th of the storage is used as encoding overhead.

-
    -
  • numbers < 2^7 is stored in one bytlength
  • -
  • numbers < 2^14 is stored in two bylength
  • -
-decoding.peekVarUint(decoder: module:decoding.Decoder): number
-

Look ahead and read varUint without incrementing position

-decoding.peekVarInt(decoder: module:decoding.Decoder): number
-

Look ahead and read varUint without incrementing position

-decoding.readVarString
-decoding.peekVarString(decoder: module:decoding.Decoder): string
-

Look ahead and read varString without incrementing position

-decoding.readFromDataView(decoder: module:decoding.Decoder, len: number): DataView
-decoding.readFloat32(decoder: module:decoding.Decoder)
-decoding.readFloat64(decoder: module:decoding.Decoder)
-decoding.readBigInt64(decoder: module:decoding.Decoder)
-decoding.readBigUint64(decoder: module:decoding.Decoder)
-decoding.readAny(decoder: module:decoding.Decoder)
-new decoding.RleDecoder(uint8Array: Uint8Array, reader: function(module:decoding.Decoder):T)
-

T must not be null.

-decoding.RleDecoder#s: T|null
-

Current state

-decoding.RleDecoder#read()
-decoding.RleDecoder#s: T
-new decoding.IntDiffDecoder(uint8Array: Uint8Array, start: number)
-decoding.IntDiffDecoder#s: number
-

Current state

-decoding.IntDiffDecoder#read(): number
-new decoding.RleIntDiffDecoder(uint8Array: Uint8Array, start: number)
-decoding.RleIntDiffDecoder#s: number
-

Current state

-decoding.RleIntDiffDecoder#read(): number
-decoding.RleIntDiffDecoder#s: number
-new decoding.UintOptRleDecoder(uint8Array: Uint8Array)
-decoding.UintOptRleDecoder#s: number
-decoding.UintOptRleDecoder#read()
-decoding.UintOptRleDecoder#s: number
-new decoding.IncUintOptRleDecoder(uint8Array: Uint8Array)
-decoding.IncUintOptRleDecoder#s: number
-decoding.IncUintOptRleDecoder#read()
-new decoding.IntDiffOptRleDecoder(uint8Array: Uint8Array)
-decoding.IntDiffOptRleDecoder#s: number
-decoding.IntDiffOptRleDecoder#read(): number
-new decoding.StringDecoder(uint8Array: Uint8Array)
-decoding.StringDecoder#spos: number
-decoding.StringDecoder#read(): string
-decoding.RleDecoder#arr: Uint8Array
-

Decoding target.

-decoding.RleDecoder#pos: number
-

Current decoding position.

-decoding.IntDiffDecoder#arr: Uint8Array
-

Decoding target.

-decoding.IntDiffDecoder#pos: number
-

Current decoding position.

-decoding.RleIntDiffDecoder#arr: Uint8Array
-

Decoding target.

-decoding.RleIntDiffDecoder#pos: number
-

Current decoding position.

-decoding.UintOptRleDecoder#arr: Uint8Array
-

Decoding target.

-decoding.UintOptRleDecoder#pos: number
-

Current decoding position.

-decoding.IncUintOptRleDecoder#arr: Uint8Array
-

Decoding target.

-decoding.IncUintOptRleDecoder#pos: number
-

Current decoding position.

-decoding.IntDiffOptRleDecoder#arr: Uint8Array
-

Decoding target.

-decoding.IntDiffOptRleDecoder#pos: number
-

Current decoding position.

-
-
-
[lib0/diff] Efficient diffs. -
import * as diff from 'lib0/diff'
-
-diff.simpleDiffString(a: string, b: string): module:diff~SimpleDiff<string>
-

Create a diff between two strings. This diff implementation is highly -efficient, but not very sophisticated.

-diff.simpleDiff
-diff.simpleDiffArray(a: Array<T>, b: Array<T>, compare: function(T, T):boolean): module:diff~SimpleDiff<Array<T>>
-

Create a diff between two arrays. This diff implementation is highly -efficient, but not very sophisticated.

-

Note: This is basically the same function as above. Another function was created so that the runtime -can better optimize these function calls.

-diff.simpleDiffStringWithCursor(a: string, b: string, cursor: number)
-

Diff text and try to diff at the current cursor position.

-
-
-
[lib0/dom] Utility module to work with the DOM. -
import * as dom from 'lib0/dom'
-
-dom.doc: Document
-dom.createElement
-dom.createDocumentFragment
-dom.createTextNode
-dom.domParser
-dom.emitCustomEvent
-dom.setAttributes
-dom.setAttributesMap
-dom.fragment
-dom.append
-dom.remove
-dom.addEventListener
-dom.removeEventListener
-dom.addEventListeners
-dom.removeEventListeners
-dom.element
-dom.canvas
-dom.text
-dom.pairToStyleString
-dom.pairsToStyleString
-dom.mapToStyleString
-dom.querySelector
-dom.querySelectorAll
-dom.getElementById
-dom.parseFragment
-dom.childNodes: any
-dom.parseElement
-dom.replaceWith
-dom.insertBefore
-dom.appendChild
-dom.ELEMENT_NODE
-dom.TEXT_NODE
-dom.CDATA_SECTION_NODE
-dom.COMMENT_NODE
-dom.DOCUMENT_NODE
-dom.DOCUMENT_TYPE_NODE
-dom.DOCUMENT_FRAGMENT_NODE
-dom.checkNodeType(node: any, type: number)
-dom.isParentOf(parent: Node, child: HTMLElement)
-
-
-
[lib0/encoding] Efficient schema-less binary encoding with support for variable length encoding. -
import * as encoding from 'lib0/encoding'
- -

Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function.

-

Encodes numbers in little-endian order (least to most significant byte order) -and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) -which is also used in Protocol Buffers.

-
// encoding step
-const encoder = encoding.createEncoder()
-encoding.writeVarUint(encoder, 256)
-encoding.writeVarString(encoder, 'Hello world!')
-const buf = encoding.toUint8Array(encoder)
-
-
// decoding step
-const decoder = decoding.createDecoder(buf)
-decoding.readVarUint(decoder) // => 256
-decoding.readVarString(decoder) // => 'Hello world!'
-decoding.hasContent(decoder) // => false - all data is read
-
-
-new encoding.Encoder()
-

A BinaryEncoder handles the encoding to an Uint8Array.

-encoding.Encoder#bufs: Array<Uint8Array>
-encoding.createEncoder(): module:encoding.Encoder
-encoding.length(encoder: module:encoding.Encoder): number
-

The current length of the encoded data.

-encoding.toUint8Array(encoder: module:encoding.Encoder): Uint8Array
-

Transform to Uint8Array.

-encoding.verifyLen(encoder: module:encoding.Encoder, len: number)
-

Verify that it is possible to write len bytes wtihout checking. If -necessary, a new Buffer with the required length is attached.

-encoding.write(encoder: module:encoding.Encoder, num: number)
-

Write one byte to the encoder.

-encoding.set(encoder: module:encoding.Encoder, pos: number, num: number)
-

Write one byte at a specific position. -Position must already be written (i.e. encoder.length > pos)

-encoding.writeUint8(encoder: module:encoding.Encoder, num: number)
-

Write one byte as an unsigned integer.

-encoding.setUint8(encoder: module:encoding.Encoder, pos: number, num: number)
-

Write one byte as an unsigned Integer at a specific location.

-encoding.writeUint16(encoder: module:encoding.Encoder, num: number)
-

Write two bytes as an unsigned integer.

-encoding.setUint16(encoder: module:encoding.Encoder, pos: number, num: number)
-

Write two bytes as an unsigned integer at a specific location.

-encoding.writeUint32(encoder: module:encoding.Encoder, num: number)
-

Write two bytes as an unsigned integer

-encoding.writeUint32BigEndian(encoder: module:encoding.Encoder, num: number)
-

Write two bytes as an unsigned integer in big endian order. -(most significant byte first)

-encoding.setUint32(encoder: module:encoding.Encoder, pos: number, num: number)
-

Write two bytes as an unsigned integer at a specific location.

-encoding.writeVarUint(encoder: module:encoding.Encoder, num: number)
-

Write a variable length unsigned integer. Max encodable integer is 2^53.

-encoding.writeVarInt(encoder: module:encoding.Encoder, num: number)
-

Write a variable length integer.

-

We use the 7th bit instead for signaling that this is a negative number.

-encoding.writeVarString
-encoding.writeBinaryEncoder(encoder: module:encoding.Encoder, append: module:encoding.Encoder)
-

Write the content of another Encoder.

-encoding.writeUint8Array(encoder: module:encoding.Encoder, uint8Array: Uint8Array)
-

Append fixed-length Uint8Array to the encoder.

-encoding.writeVarUint8Array(encoder: module:encoding.Encoder, uint8Array: Uint8Array)
-

Append an Uint8Array to Encoder.

-encoding.writeOnDataView(encoder: module:encoding.Encoder, len: number): DataView
-

Create an DataView of the next len bytes. Use it to write data after -calling this function.

-
// write float32 using DataView
-const dv = writeOnDataView(encoder, 4)
-dv.setFloat32(0, 1.1)
-// read float32 using DataView
-const dv = readFromDataView(encoder, 4)
-dv.getFloat32(0) // => 1.100000023841858 (leaving it to the reader to find out why this is the correct result)
-
-encoding.writeFloat32(encoder: module:encoding.Encoder, num: number)
-encoding.writeFloat64(encoder: module:encoding.Encoder, num: number)
-encoding.writeBigInt64(encoder: module:encoding.Encoder, num: bigint)
-encoding.writeBigUint64(encoder: module:encoding.Encoder, num: bigint)
-encoding.writeAny(encoder: module:encoding.Encoder, data: undefined|null|number|bigint|boolean|string|Object<string,any>|Array<any>|Uint8Array)
-

Encode data with efficient binary format.

-

Differences to JSON: -• Transforms data to a binary format (not to a string) -• Encodes undefined, NaN, and ArrayBuffer (these can't be represented in JSON) -• Numbers are efficiently encoded either as a variable length integer, as a -32 bit float, as a 64 bit float, or as a 64 bit bigint.

-

Encoding table:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Data TypePrefixEncoding MethodComment
undefined127Functions, symbol, and everything that cannot be identified is encoded as undefined
null126
integer125writeVarIntOnly encodes 32 bit signed integers
float32124writeFloat32
float64123writeFloat64
bigint122writeBigInt64
boolean (false)121True and false are different data types so we save the following byte
boolean (true)120- 0b01111000 so the last bit determines whether true or false
string119writeVarString
object<string,any>118customWrites {length} then {length} key-value pairs
array117customWrites {length} then {length} json values
Uint8Array116writeVarUint8ArrayWe use Uint8Array for any kind of binary data
-

Reasons for the decreasing prefix: -We need the first bit for extendability (later we may want to encode the -prefix with writeVarUint). The remaining 7 bits are divided as follows: -[0-30] the beginning of the data range is used for custom purposes -(defined by the function that uses this library) -[31-127] the end of the data range is used for data encoding by -lib0/encoding.js

-new encoding.RleEncoder(writer: function(module:encoding.Encoder, T):void)
-

Now come a few stateful encoder that have their own classes.

-encoding.RleEncoder#s: T|null
-

Current state

-encoding.RleEncoder#write(v: T)
-new encoding.IntDiffEncoder(start: number)
-

Basic diff decoder using variable length encoding.

-

Encodes the values [3, 1100, 1101, 1050, 0] to [3, 1097, 1, -51, -1050] using writeVarInt.

-encoding.IntDiffEncoder#s: number
-

Current state

-encoding.IntDiffEncoder#write(v: number)
-new encoding.RleIntDiffEncoder(start: number)
-

A combination of IntDiffEncoder and RleEncoder.

-

Basically first writes the IntDiffEncoder and then counts duplicate diffs using RleEncoding.

-

Encodes the values [1,1,1,2,3,4,5,6] as [1,1,0,2,1,5] (RLE([1,0,0,1,1,1,1,1]) ⇒ RleIntDiff[1,1,0,2,1,5])

-encoding.RleIntDiffEncoder#s: number
-

Current state

-encoding.RleIntDiffEncoder#write(v: number)
-new encoding.UintOptRleEncoder()
-

Optimized Rle encoder that does not suffer from the mentioned problem of the basic Rle encoder.

-

Internally uses VarInt encoder to write unsigned integers. If the input occurs multiple times, we write -write it as a negative number. The UintOptRleDecoder then understands that it needs to read a count.

-

Encodes [1,2,3,3,3] as [1,2,-3,3] (once 1, once 2, three times 3)

-encoding.UintOptRleEncoder#s: number
-encoding.UintOptRleEncoder#write(v: number)
-encoding.UintOptRleEncoder#toUint8Array()
-new encoding.IncUintOptRleEncoder()
-

Increasing Uint Optimized RLE Encoder

-

The RLE encoder counts the number of same occurences of the same value. -The IncUintOptRle encoder counts if the value increases. -I.e. 7, 8, 9, 10 will be encoded as [-7, 4]. 1, 3, 5 will be encoded -as [1, 3, 5].

-encoding.IncUintOptRleEncoder#s: number
-encoding.IncUintOptRleEncoder#write(v: number)
-encoding.IncUintOptRleEncoder#toUint8Array()
-new encoding.IntDiffOptRleEncoder()
-

A combination of the IntDiffEncoder and the UintOptRleEncoder.

-

The count approach is similar to the UintDiffOptRleEncoder, but instead of using the negative bitflag, it encodes -in the LSB whether a count is to be read. Therefore this Encoder only supports 31 bit integers!

-

Encodes [1, 2, 3, 2] as [3, 1, 6, -1] (more specifically [(1 << 1) | 1, (3 << 0) | 0, -1])

-

Internally uses variable length encoding. Contrary to normal UintVar encoding, the first byte contains:

-
    -
  • 1 bit that denotes whether the next value is a count (LSB)
  • -
  • 1 bit that denotes whether this value is negative (MSB - 1)
  • -
  • 1 bit that denotes whether to continue reading the variable length integer (MSB)
  • -
-

Therefore, only five bits remain to encode diff ranges.

-

Use this Encoder only when appropriate. In most cases, this is probably a bad idea.

-encoding.IntDiffOptRleEncoder#s: number
-encoding.IntDiffOptRleEncoder#write(v: number)
-encoding.IntDiffOptRleEncoder#toUint8Array()
-new encoding.StringEncoder()
-

Optimized String Encoder.

-

Encoding many small strings in a simple Encoder is not very efficient. The function call to decode a string takes some time and creates references that must be eventually deleted. -In practice, when decoding several million small strings, the GC will kick in more and more often to collect orphaned string objects (or maybe there is another reason?).

-

This string encoder solves the above problem. All strings are concatenated and written as a single string using a single encoding call.

-

The lengths are encoded using a UintOptRleEncoder.

-encoding.StringEncoder#sarr: Array<string>
-encoding.StringEncoder#write(string: string)
-encoding.StringEncoder#toUint8Array()
-encoding.RleEncoder#bufs: Array<Uint8Array>
-encoding.IntDiffEncoder#bufs: Array<Uint8Array>
-encoding.RleIntDiffEncoder#bufs: Array<Uint8Array>
-
-
-
[lib0/environment] Isomorphic module to work access the environment (query params, env variables). -
import * as env from 'lib0/environment'
-
-env.isNode
-env.isBrowser
-env.isMac
-env.hasParam
-env.getParam
-env.getVariable
-env.getConf(name: string): string|null
-env.hasConf
-env.production
-env.supportsColor
-
-
-
[lib0/error] Error helpers. -
import * as error from 'lib0/error'
-
-error.create(s: string): Error
-error.methodUnimplemented(): never
-error.unexpectedCase(): never
-
-
-
[lib0/eventloop] Utility module to work with EcmaScript's event loop. -
import * as eventloop from 'lib0/eventloop'
-
-eventloop.enqueue(f: function():void)
-eventloop#destroy()
-eventloop.timeout(timeout: number, callback: function): module:eventloop~TimeoutObject
-eventloop.interval(timeout: number, callback: function): module:eventloop~TimeoutObject
-eventloop.Animation
-eventloop.animationFrame(cb: function(number):void): module:eventloop~TimeoutObject
-eventloop.idleCallback(cb: function): module:eventloop~TimeoutObject
-

Note: this is experimental and is probably only useful in browsers.

-eventloop.createDebouncer(timeout: number): function(function():void):void
-
-
-
[lib0/function] Common functions and function call helpers. -
import * as function from 'lib0/function'
-
-function.callAll(fs: Array<function>, args: Array<any>)
-

Calls all functions in fs with args. Only throws after all functions were called.

-function.nop
-function.apply(f: function():T): T
-function.id(a: A): A
-function.equalityStrict(a: T, b: T): boolean
-function.equalityFlat(a: Array<T>|object, b: Array<T>|object): boolean
-function.equalityDeep(a: any, b: any): boolean
-function.isOneOf(value: V, options: Array<OPTS>)
-
-
-
[lib0/lib0] Experimental method to import lib0. -
import * as lib0 from 'lib0/index'
- -

Not recommended if the module bundler doesn't support dead code elimination.

-
-
-
-
[lib0/indexeddb] Helpers to work with IndexedDB. -
import * as indexeddb from 'lib0/indexeddb'
-
-indexeddb.rtop(request: IDBRequest): Promise<any>
-

IDB Request to Promise transformer

-indexeddb.openDB(name: string, initDB: function(IDBDatabase):any): Promise<IDBDatabase>
-indexeddb.deleteDB(name: string)
-indexeddb.createStores(db: IDBDatabase, definitions: Array<Array<string>|Array<string|IDBObjectStoreParameters|undefined>>)
-indexeddb.transact(db: IDBDatabase, stores: Array<string>, access: "readwrite"|"readonly"): Array<IDBObjectStore>
-indexeddb.count(store: IDBObjectStore, range: IDBKeyRange): Promise<number>
-indexeddb.get(store: IDBObjectStore, key: String | number | ArrayBuffer | Date | Array<any> ): Promise<String | number | ArrayBuffer | Date | Array<any>>
-indexeddb.del(store: IDBObjectStore, key: String | number | ArrayBuffer | Date | IDBKeyRange | Array<any> )
-indexeddb.put(store: IDBObjectStore, item: String | number | ArrayBuffer | Date | boolean, key: String | number | ArrayBuffer | Date | Array<any>)
-indexeddb.add(store: IDBObjectStore, item: String|number|ArrayBuffer|Date|boolean, key: String|number|ArrayBuffer|Date|Array.<any>): Promise<any>
-indexeddb.addAutoKey(store: IDBObjectStore, item: String|number|ArrayBuffer|Date): Promise<number>
-indexeddb.getAll(store: IDBObjectStore, range: IDBKeyRange, limit: number): Promise<Array<any>>
-indexeddb.getAllKeys(store: IDBObjectStore, range: IDBKeyRange, limit: number): Promise<Array<any>>
-indexeddb.queryFirst(store: IDBObjectStore, query: IDBKeyRange|null, direction: 'next'|'prev'|'nextunique'|'prevunique'): Promise<any>
-indexeddb.getLastKey(store: IDBObjectStore, range: IDBKeyRange?): Promise<any>
-indexeddb.getFirstKey(store: IDBObjectStore, range: IDBKeyRange?): Promise<any>
-indexeddb.getAllKeysValues(store: IDBObjectStore, range: IDBKeyRange, limit: number): Promise<Array<KeyValuePair>>
-indexeddb.iterate(store: IDBObjectStore, keyrange: IDBKeyRange|null, f: function(any,any):void|boolean|Promise<void|boolean>, direction: 'next'|'prev'|'nextunique'|'prevunique')
-

Iterate on keys and values

-indexeddb.iterateKeys(store: IDBObjectStore, keyrange: IDBKeyRange|null, f: function(any):void|boolean|Promise<void|boolean>, direction: 'next'|'prev'|'nextunique'|'prevunique')
-

Iterate on the keys (no values)

-indexeddb.getStore(t: IDBTransaction, store: String)IDBObjectStore
-

Open store from transaction

-indexeddb.createIDBKeyRangeBound(lower: any, upper: any, lowerOpen: boolean, upperOpen: boolean)
-indexeddb.createIDBKeyRangeUpperBound(upper: any, upperOpen: boolean)
-indexeddb.createIDBKeyRangeLowerBound(lower: any, lowerOpen: boolean)
-
-
-
[lib0/isomorphic] Isomorphic library exports from isomorphic.js. -
import * as isomorphic from 'lib0/isomorphic'
-
-
-
-
[lib0/iterator] Utility module to create and manipulate Iterators. -
import * as iterator from 'lib0/iterator'
-
-iterator.mapIterator(iterator: Iterator<T>, f: function(T):R): IterableIterator<R>
-iterator.createIterator(next: function():IteratorResult<T>): IterableIterator<T>
-iterator.iteratorFilter(iterator: Iterator<T>, filter: function(T):boolean)
-iterator.iteratorMap(iterator: Iterator<T>, fmap: function(T):M)
-
-
-
[lib0/json] JSON utility functions. -
import * as json from 'lib0/json'
-
-json.stringify(object: any): string
-

Transform JavaScript object to JSON.

-json.parse(json: string): any
-

Parse JSON object.

-
-
-
[lib0/list] -
import * as list from 'lib0/list'
-
-new e#ListNode()
-e#next: this|null
-e#prev: this|null
-new st()
-art: N | null
-d: N | null
-(): module:list.List<N>
-()
-(queue: module:list.List<N>)
-()
-(queue: module:list.List<N>, node: N)
-

Remove a single node from the queue. Only works with Queues that operate on Doubly-linked lists of nodes.

-()
-ode
-ode()
-etween(queue: module:list.List<N>, left: N| null, right: N| null, node: N)
-etween()
-(queue: module:list.List<N>, node: N, newNode: N)
-

Remove a single node from the queue. Only works with Queues that operate on Doubly-linked lists of nodes.

-()
-(queue: module:list.List<N>, n: N)
-()
-nt(queue: module:list.List<N>, n: N)
-nt()
-t(list: module:list.List<N>): N| null
-t()
-(list: module:list.List<N>): N| null
-()
-(list: module:list.List<N>, f: function(N):M): Array<M>
-()
-(list: module:list.List<N>)
-()
-(list: module:list.List<N>, f: function(N):M)
-()
-
-
-
[lib0/logging] Isomorphic logging module with support for colors! -
import * as logging from 'lib0/logging'
-
-logging.BOLD
-logging.UNBOLD
-logging.BLUE
-logging.GREY
-logging.GREEN
-logging.RED
-logging.PURPLE
-logging.ORANGE
-logging.UNCOLOR
-logging.print(args: Array<string|Symbol|Object|number>)
-logging.warn(args: Array<string|Symbol|Object|number>)
-logging.printError(err: Error)
-logging.printImg(url: string, height: number)
-logging.printImgBase64(base64: string, height: number)
-logging.group(args: Array<string|Symbol|Object|number>)
-logging.groupCollapsed(args: Array<string|Symbol|Object|number>)
-logging.groupEnd
-logging.printDom(createNode: function():Node)
-logging.printCanvas(canvas: HTMLCanvasElement, height: number)
-logging.vconsoles
-new logging.VConsole(dom: Element)
-logging.VConsole#ccontainer: Element
-logging.VConsole#group(args: Array<string|Symbol|Object|number>, collapsed: boolean)
-logging.VConsole#groupCollapsed(args: Array<string|Symbol|Object|number>)
-logging.VConsole#groupEnd()
-logging.VConsole#print(args: Array<string|Symbol|Object|number>)
-logging.VConsole#printError(err: Error)
-logging.VConsole#printImg(url: string, height: number)
-logging.VConsole#printDom(node: Node)
-logging.VConsole#destroy()
-logging.createVConsole(dom: Element)
-logging.createModuleLogger(moduleName: string): function(...any):void
-
-
-
[lib0/map] Utility module to work with key-value stores. -
import * as map from 'lib0/map'
-
-map.create(): Map<any, any>
-

Creates a new Map instance.

-map.copy(m: Map<X,Y>): Map<X,Y>
-

Copy a Map object into a fresh Map object.

-map.setIfUndefined(map: Map<K, T>, key: K, createT: function():T): T
-

Get map property. Create T if property is undefined and set T on map.

-
const listeners = map.setIfUndefined(events, 'eventName', set.create)
-listeners.add(listener)
-
-map.map(m: Map<K,V>, f: function(V,K):R): Array<R>
-

Creates an Array and populates it with the content of all key-value pairs using the f(value, key) function.

-map.any(m: Map<K,V>, f: function(V,K):boolean): boolean
-

Tests whether any key-value pairs pass the test implemented by f(value, key).

-map.all(m: Map<K,V>, f: function(V,K):boolean): boolean
-

Tests whether all key-value pairs pass the test implemented by f(value, key).

-
-
-
[lib0/math] Common Math expressions. -
import * as math from 'lib0/math'
-
-math.floor
-math.ceil
-math.abs
-math.imul
-math.round
-math.log10
-math.log2
-math.log
-math.sqrt
-math.add(a: number, b: number): number
-math.min(a: number, b: number): number
-math.max(a: number, b: number): number
-math.isNaN
-math.pow
-math.exp10(exp: number): number
-

Base 10 exponential function. Returns the value of 10 raised to the power of pow.

-math.sign
-math.isNegativeZero(n: number): boolean
-
-
-
[lib0/metric] Utility module to convert metric values. -
import * as metric from 'lib0/metric'
-
-metric.yotta
-metric.zetta
-metric.exa
-metric.peta
-metric.tera
-metric.giga
-metric.mega
-metric.kilo
-metric.hecto
-metric.deca
-metric.deci
-metric.centi
-metric.milli
-metric.micro
-metric.nano
-metric.pico
-metric.femto
-metric.atto
-metric.zepto
-metric.yocto
-metric.prefix(n: number, baseMultiplier: number): {n:number,prefix:string}
-

Calculate the metric prefix for a number. Assumes E.g. prefix(1000) = { n: 1, prefix: 'k' }

-
-
-
[lib0/mutex] Mutual exclude for JavaScript. -
import * as mutex from 'lib0/mutex'
-
-mutex.createMutex(): mutex
-

Creates a mutual exclude function with the following property:

-
const mutex = createMutex()
-mutex(() => {
-  // This function is immediately executed
-  mutex(() => {
-    // This function is not executed, as the mutex is already active.
-  })
-})
-
-
-
-
[lib0/number] -
import * as number from 'lib0/number'
-
-number.MAX_SAFE_INTEGER
-number.MIN_SAFE_INTEGER
-number.LOWEST_INT32
-number.HIGHEST_INT32: number
-number.isInteger
-number.isNaN
-number.parseInt
-
-
-
[lib0/object] Utility functions for working with EcmaScript objects. -
import * as object from 'lib0/object'
-
-object.create(): Object<string,any>
-object.assign
-

Object.assign

-object.keys(obj: Object<string,any>)
-object.forEach(obj: Object<string,any>, f: function(any,string):any)
-object.map(obj: Object<string,any>, f: function(any,string):R): Array<R>
-object.length(obj: Object<string,any>): number
-object.some(obj: Object<string,any>, f: function(any,string):boolean): boolean
-object.isEmpty(obj: Object|undefined)
-object.every(obj: Object<string,any>, f: function(any,string):boolean): boolean
-object.hasProperty(obj: any, key: string|symbol): boolean
-

Calls Object.prototype.hasOwnProperty.

-object.equalFlat(a: Object<string,any>, b: Object<string,any>): boolean
-
-
-
[lib0/observable] Observable class prototype. -
import * as observable from 'lib0/observable'
-
-new observable.Observable()
-

Handles named events.

-observable.Observable#on(name: N, f: function)
-observable.Observable#once(name: N, f: function)
-observable.Observable#off(name: N, f: function)
-observable.Observable#emit(name: N, args: Array<any>)
-

Emit a named event. All registered event listeners that listen to the -specified name will receive the event.

-observable.Observable#destroy()
-websocket.WebsocketClient#on(name: N, f: function)
-websocket.WebsocketClient#once(name: N, f: function)
-websocket.WebsocketClient#off(name: N, f: function)
-websocket.WebsocketClient#emit(name: N, args: Array<any>)
-

Emit a named event. All registered event listeners that listen to the -specified name will receive the event.

-
-
-
[lib0/pair] Working with value pairs. -
import * as pair from 'lib0/pair'
-
-new pair.Pair(left: L, right: R)
-pair.create(left: L, right: R): module:pair.Pair<L,R>
-pair.createReversed(right: R, left: L): module:pair.Pair<L,R>
-pair.forEach(arr: Array<module:pair.Pair<L,R>>, f: function(L, R):any)
-pair.map(arr: Array<module:pair.Pair<L,R>>, f: function(L, R):X): Array<X>
-
-
-
[lib0/prng] Fast Pseudo Random Number Generators. -
import * as prng from 'lib0/prng'
- -

Given a seed a PRNG generates a sequence of numbers that cannot be reasonably predicted. -Two PRNGs must generate the same random sequence of numbers if given the same seed.

-
-prng.DefaultPRNG
-prng.create(seed: number): module:prng~PRNG
-

Create a Xoroshiro128plus Pseudo-Random-Number-Generator. -This is the fastest full-period generator passing BigCrush without systematic failures. -But there are more PRNGs available in ./PRNG/.

-prng.bool(gen: module:prng~PRNG): Boolean
-

Generates a single random bool.

-prng.int53(gen: module:prng~PRNG, min: Number, max: Number): Number
-

Generates a random integer with 53 bit resolution.

-prng.uint53(gen: module:prng~PRNG, min: Number, max: Number): Number
-

Generates a random integer with 53 bit resolution.

-prng.int32(gen: module:prng~PRNG, min: Number, max: Number): Number
-

Generates a random integer with 32 bit resolution.

-prng.uint32(gen: module:prng~PRNG, min: Number, max: Number): Number
-

Generates a random integer with 53 bit resolution.

-prng.int31(gen: module:prng~PRNG, min: Number, max: Number): Number
-prng.real53(gen: module:prng~PRNG): Number
-

Generates a random real on [0, 1) with 53 bit resolution.

-prng.char(gen: module:prng~PRNG): string
-

Generates a random character from char code 32 - 126. I.e. Characters, Numbers, special characters, and Space:

-prng.letter(gen: module:prng~PRNG): string
-prng.word(gen: module:prng~PRNG, minLen: number, maxLen: number): string
-prng.utf16Rune(gen: module:prng~PRNG): string
-

TODO: this function produces invalid runes. Does not cover all of utf16!!

-prng.utf16String(gen: module:prng~PRNG, maxlen: number)
-prng.oneOf(gen: module:prng~PRNG, array: Array<T>): T
-

Returns one element of a given array.

-prng.uint8Array(gen: module:prng~PRNG, len: number): Uint8Array
-prng.uint16Array(gen: module:prng~PRNG, len: number): Uint16Array
-prng.uint32Array(gen: module:prng~PRNG, len: number): Uint32Array
-
-
-
[lib0/promise] Utility helpers to work with promises. -
import * as promise from 'lib0/promise'
-
-promise.create(f: function(PromiseResolve<T>,function(Error):void):any): Promise<T>
-promise.createEmpty(f: function(function():void,function(Error):void):void): Promise<void>
-promise.all(arrp: Array<Promise<T>>): Promise<Array<T>>
-

Promise.all wait for all promises in the array to resolve and return the result

-promise.reject(reason: Error): Promise<never>
-promise.resolve(res: T|void): Promise<T|void>
-promise.resolveWith(res: T): Promise<T>
-promise.until(timeout: number, check: function():boolean, intervalResolution: number): Promise<void>
-promise.wait(timeout: number): Promise<undefined>
-promise.isPromise(p: any): boolean
-

Checks if an object is a promise using ducktyping.

-

Promises are often polyfilled, so it makes sense to add some additional guarantees if the user of this -library has some insane environment where global Promise objects are overwritten.

-
-
-
[lib0/queue] -
import * as queue from 'lib0/queue'
-
-new de#QueueNode()
-de#next: module:queue.QueueNode|null
-new ueue()
-tart: module:queue.QueueNode | null
-nd: module:queue.QueueNode | null
-(): module:queue.Queue
-()
-(queue: module:queue.Queue)
-()
-(queue: module:queue.Queue, n: module:queue.QueueNode)
-()
-(queue: module:queue.Queue): module:queue.QueueNode | null
-()
-
-
-
[lib0/random] Isomorphic module for true random numbers / buffers / uuids. -
import * as random from 'lib0/random'
- -

Attention: falls back to Math.random if the browser does not support crypto.

-
-random.rand
-random.uint32
-random.uint53
-random.oneOf(arr: Array<T>): T
-random.uuidv4
-
-
-
[lib0/set] Utility module to work with sets. -
import * as set from 'lib0/set'
-
-set.create
-set.toArray(set: Set<T>): Array<T>
-set.first(set: Set<T>): T
-set.from(entries: Iterable<T>): Set<T>
-
-
-
[lib0/sort] Efficient sort implementations. -
import * as sort from 'lib0/sort'
- -

Note: These sort implementations were created to compare different sorting algorithms in JavaScript. -Don't use them if you don't know what you are doing. Native Array.sort is almost always a better choice.

-
-sort.insertionSort(arr: Array<T>, compare: function(T,T):number): void
-sort.quicksort(arr: Array<T>, compare: function(T,T):number): void
-

This algorithm beats Array.prototype.sort in Chrome only with arrays with 10 million entries. -In most cases [].sort will do just fine. Make sure to performance test your use-case before you -integrate this algorithm.

-

Note that Chrome's sort is now a stable algorithm (Timsort). Quicksort is not stable.

-
-
-
[lib0/statistics] Utility helpers for generating statistics. -
import * as statistics from 'lib0/statistics'
-
-statistics.median(arr: Array<number>): number
-statistics.average(arr: Array<number>): number
-
-
-
[lib0/storage] Isomorphic variable storage. -
import * as storage from 'lib0/storage'
- -

Uses LocalStorage in the browser and falls back to in-memory storage.

-
-storage.varStorage
-

This is basically localStorage in browser, or a polyfill in nodejs

-storage.onChange(eventHandler: function({ key: string, newValue: string, oldValue: string }): void)
-

A polyfill for addEventListener('storage', event => {..}) that does nothing if the polyfill is being used.

-
-
-
[lib0/string] Utility module to work with strings. -
import * as string from 'lib0/string'
-
-string.fromCharCode
-string.fromCodePoint
-string.trimLeft(s: string): string
-string.fromCamelCase(s: string, separator: string): string
-string.utf8ByteLength(str: string): number
-

Compute the utf8ByteLength

-string.utf8TextEncoder
-string.encodeUtf8
-string.decodeUtf8
-string.splice(str: string, index: number, remove: number, insert: string)
-
-
-
[lib0/symbol] Utility module to work with EcmaScript Symbols. -
import * as symbol from 'lib0/symbol'
-
-symbol.create(): Symbol
-

Return fresh symbol.

-symbol.isSymbol(s: any): boolean
-
-
-
[lib0/testing] Testing framework with support for generating tests. -
import * as testing from 'lib0/testing'
- -
// test.js template for creating a test executable
-import { runTests } from 'lib0/testing'
-import * as log from 'lib0/logging'
-import * as mod1 from './mod1.test.js'
-import * as mod2 from './mod2.test.js'
-import { isBrowser, isNode } from 'lib0/environment.js'
-
-if (isBrowser) {
-  // optional: if this is ran in the browser, attach a virtual console to the dom
-  log.createVConsole(document.body)
-}
-
-runTests({
- mod1,
- mod2,
-}).then(success => {
-  if (isNode) {
-    process.exit(success ? 0 : 1)
-  }
-})
-
-
// mod1.test.js
-/**
- * runTests automatically tests all exported functions that start with "test".
- * The name of the function should be in camelCase and is used for the logging output.
- *
- * @param {t.TestCase} tc
- *\/
-export const testMyFirstTest = tc => {
-  t.compare({ a: 4 }, { a: 4 }, 'objects are equal')
-}
-
-

Now you can simply run node test.js to run your test or run test.js in the browser.

-
-testing.extensive
-testing.envSeed
-new testing.TestCase(moduleName: string, testName: string)
-testing.TestCase#moduleName: string
-testing.TestCase#testName: string
-testing.TestCase#resetSeed()
-testing.TestCase#prng: prng.PRNG
-

A PRNG for this test case. Use only this PRNG for randomness to make the test case reproducible.

-testing.repetitionTime
-testing.run(moduleName: string, name: string, f: function(module:testing.TestCase):void|Promise<any>, i: number, numberOfTests: number)
-testing.describe(description: string, info: string)
-

Describe what you are currently testing. The message will be logged.

-
export const testMyFirstTest = tc => {
-  t.describe('crunching numbers', 'already crunched 4 numbers!') // the optional second argument can describe the state.
-}
-
-testing.info(info: string)
-

Describe the state of the current computation.

-
export const testMyFirstTest = tc => {
-  t.info(already crunched 4 numbers!') // the optional second argument can describe the state.
-}
-
-testing.printDom
-testing.printCanvas
-testing.group(description: string, f: function(void):void)
-

Group outputs in a collapsible category.

-
export const testMyFirstTest = tc => {
-  t.group('subtest 1', () => {
-    t.describe('this message is part of a collapsible section')
-  })
-  await t.groupAsync('subtest async 2', async () => {
-    await someaction()
-    t.describe('this message is part of a collapsible section')
-  })
-}
-
-testing.groupAsync(description: string, f: function(void):Promise<any>)
-

Group outputs in a collapsible category.

-
export const testMyFirstTest = async tc => {
-  t.group('subtest 1', () => {
-    t.describe('this message is part of a collapsible section')
-  })
-  await t.groupAsync('subtest async 2', async () => {
-    await someaction()
-    t.describe('this message is part of a collapsible section')
-  })
-}
-
-testing.measureTime(message: string, f: function():void): number
-

Measure the time that it takes to calculate something.

-
export const testMyFirstTest = async tc => {
-  t.measureTime('measurement', () => {
-    heavyCalculation()
-  })
-  await t.groupAsync('async measurement', async () => {
-    await heavyAsyncCalculation()
-  })
-}
-
-testing.measureTimeAsync(message: string, f: function():Promise<any>): Promise<number>
-

Measure the time that it takes to calculate something.

-
export const testMyFirstTest = async tc => {
-  t.measureTimeAsync('measurement', async () => {
-    await heavyCalculation()
-  })
-  await t.groupAsync('async measurement', async () => {
-    await heavyAsyncCalculation()
-  })
-}
-
-testing.compareArrays(as: Array<T>, bs: Array<T>, m: string): boolean
-testing.compareStrings(a: string, b: string, m: string)
-testing.compareObjects(a: Object<K,V>, b: Object<K,V>, m: string)
-testing.compare(a: T, b: T, message: string?, customCompare: function(any,T,T,string,any):boolean)
-testing.assert(condition: boolean, message: string?)
-testing.promiseRejected(f: function():Promise<any>)
-testing.fails(f: function():void)
-testing.runTests(tests: Object<string, Object<string, function(module:testing.TestCase):void|Promise<any>>>)
-testing.fail(reason: string)
-testing.skip(cond: boolean)
-
-
-
[lib0/time] Utility module to work with time. -
import * as time from 'lib0/time'
-
-time.getDate(): Date
-

Return current time.

-time.getUnixTime(): number
-

Return current unix time.

-time.humanizeDuration(d: number): string
-

Transform time (in ms) to a human readable format. E.g. 1100 => 1.1s. 60s => 1min. .001 => 10μs.

-
-
-
[lib0/tree] Red-black-tree implementation. -
import * as tree from 'lib0/tree'
-
-new tree.Tree()
-

This is a Red Black Tree implementation

-tree.Tree#findNext(id: K)
-tree.Tree#findPrev(id: K)
-tree.Tree#findNodeWithLowerBound(from: K)
-tree.Tree#findNodeWithUpperBound(to: K)
-tree.Tree#findSmallestNode(): V
-tree.Tree#findWithLowerBound(from: K): V
-tree.Tree#findWithUpperBound(to: K): V
-tree.Tree#iterate(from: K, from: K, f: K)
-tree.Tree#find(id: K): V|null
-tree.Tree#findNode(id: K): module:tree~N<V>|null
-tree.Tree#delete(id: K)
-tree.Tree#put()
-
-
-
[lib0/url] Utility module to work with urls. -
import * as url from 'lib0/url'
-
-url.decodeQueryParams(url: string): Object<string,string>
-

Parse query parameters from an url.

-url.encodeQueryParams(params: Object<string,string>): string
-
-
-
[lib0/webcrypto.browser] -
import * as webcrypto.browser from 'lib0/webcrypto.browser'
-
-
-()
-omValues
-omValues()
-
-
-
[lib0/webcrypto.node] -
import * as webcrypto.node from 'lib0/webcrypto.node'
-
-
-()
-to.subtle: any
-omValues
-omValues()
-
-
-
[lib0/websocket] Tiny websocket connection handler. -
import * as websocket from 'lib0/websocket'
- -

Implements exponential backoff reconnects, ping/pong, and a nice event system using [lib0/observable].

-
-new websocket.WebsocketClient(url: string, opts: object, opts.binaryType: 'arraybuffer' | 'blob' | null)
-websocket.WebsocketClient#ws: WebSocket?
-websocket.WebsocketClient#shouldConnect: boolean
-

Whether to connect to other peers or not

-websocket.WebsocketClient#send(message: any)
-websocket.WebsocketClient#destroy()
-websocket.WebsocketClient#disconnect()
-websocket.WebsocketClient#connect()
-
-
- -### React-Native support - -React-native apps should be able to use lib0. You need to install a polyfill for -webcrypto and enable package-exports support in react-native: - -```sh -# install polyfill -npm i isomorphic-webcrypto@^2.3.8 # last known working version was 2.3.8 -``` - -Add this to `metro.config.js` [(see docs)](https://reactnative.dev/blog/2023/06/21/package-exports-support): - -```js -const config = { - // ... - resolver: { - unstable_enablePackageExports: true - } -} -``` - -### License - -[The MIT License](./LICENSE) © Kevin Jahns diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.d.ts deleted file mode 100644 index 4b2730c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export function last(arr: ArrayLike): L; -export function create(): Array; -export function copy(a: Array): Array; -export function appendTo(dest: Array, src: Array): void; -/** - * Transforms something array-like to an actual Array. - * - * @function - * @template T - * @param {ArrayLike|Iterable} arraylike - * @return {T} - */ -export const from: { - (arrayLike: ArrayLike): T_1[]; - (arrayLike: ArrayLike, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[]; - (iterable: Iterable | ArrayLike): T_1[]; - (iterable: Iterable | ArrayLike, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[]; -}; -export function every>(arr: ARR, f: ARR extends ArrayLike ? ((value: S, index: number, arr: ARR) => boolean) : any): boolean; -export function some>(arr: ARR, f: ARR extends ArrayLike ? ((value: S, index: number, arr: ARR) => boolean) : never): boolean; -export function equalFlat(a: ArrayLike, b: ArrayLike): boolean; -export function flatten(arr: Array>): Array; -export function unfold(len: number, f: (arg0: number, arg1: Array) => T_1): Array; -export function fold(arr: Array, seed: RESULT, folder: (arg0: RESULT, arg1: T_1, arg2: number) => RESULT): RESULT; -export const isArray: (arg: any) => arg is any[]; -export function unique(arr: Array): Array; -export function uniqueBy(arr: ArrayLike, mapper: (arg0: T_1) => M): Array; -export function map, MAPPER extends (arg0: ARR extends ArrayLike ? T_1 : never, arg1: number, arg2: ARR) => any>(arr: ARR, mapper: MAPPER): Array infer M ? M : never>; -export function bubblesortItem(arr: Array, i: number, compareFn: (a: T_1, b: T_1) => number): number; -//# sourceMappingURL=array.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.d.ts.map deleted file mode 100644 index 4fbdf26..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["array.js"],"names":[],"mappings":"AAeO,qBAJM,CAAC,OACH,SAAS,CAAC,CAAC,CAAC,GACX,CAAC,CAEiC;AAMvC,uBAHM,CAAC,KACF,KAAK,CAAC,CAAC,CAAC,CAEoC;AAOjD,qBAJM,CAAC,KACH,KAAK,C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C,CAE4B;AASzC,8BALM,CAAC,OACH,SAAS,CAAC,GAAC,CAAC,UACZ,CAAS,IAAC,EAAD,GAAC,KAAE,CAAC,GACZ,KAAK,CAAC,GAAC,CAAC,CAoBnB;AASM,oBANuB,GAAG,SAAnB,SAAS,CAAC,GAAG,CAAE,EACwD,MAAM,SAA9E,CAAU,IAA0C,EAA1C,GAAG,SAAS,SAAS,CAAC,MAAM,GAAC,CAAC,GAAG,GAAC,GAAG,KAAK,EAAE,IAAM,EAAN,MAAM,EAAE,IAAG,EAAH,GAAG,KAAE,GAAI,OACzE,GAAG,UACH,MAAM,GACL,KAAK,CAAC,MAAM,SAAS,IAAS,IAAM,EAAH,GAAG,EAAA,KAAG,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAWtE;AAoBM,yCAJI,KAAK,CAAC,GAAC,CAAC,KACR,MAAM,aACN,CAAC,CAAC,EAAC,GAAC,EAAC,CAAC,EAAC,GAAC,KAAK,MAAM,UAkB7B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.js deleted file mode 100644 index 5d9f2f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.js +++ /dev/null @@ -1,219 +0,0 @@ -/** - * Utility module to work with Arrays. - * - * @module array - */ - -import * as set from './set.js' - -/** - * Return the last element of an array. The element must exist - * - * @template L - * @param {ArrayLike} arr - * @return {L} - */ -export const last = arr => arr[arr.length - 1] - -/** - * @template C - * @return {Array} - */ -export const create = () => /** @type {Array} */ ([]) - -/** - * @template D - * @param {Array} a - * @return {Array} - */ -export const copy = a => /** @type {Array} */ (a.slice()) - -/** - * Append elements from src to dest - * - * @template M - * @param {Array} dest - * @param {Array} src - */ -export const appendTo = (dest, src) => { - for (let i = 0; i < src.length; i++) { - dest.push(src[i]) - } -} - -/** - * Transforms something array-like to an actual Array. - * - * @function - * @template T - * @param {ArrayLike|Iterable} arraylike - * @return {T} - */ -export const from = Array.from - -/** - * True iff condition holds on every element in the Array. - * - * @function - * @template {ArrayLike} ARR - * - * @param {ARR} arr - * @param {ARR extends ArrayLike ? ((value:S, index:number, arr:ARR) => boolean) : any} f - * @return {boolean} - */ -export const every = (arr, f) => { - for (let i = 0; i < arr.length; i++) { - if (!f(arr[i], i, arr)) { - return false - } - } - return true -} - -/** - * True iff condition holds on some element in the Array. - * - * @function - * @template {ArrayLike} ARR - * - * @param {ARR} arr - * @param {ARR extends ArrayLike ? ((value:S, index:number, arr:ARR) => boolean) : never} f - * @return {boolean} - */ -export const some = (arr, f) => { - for (let i = 0; i < arr.length; i++) { - if (f(arr[i], i, arr)) { - return true - } - } - return false -} - -/** - * @template ELEM - * - * @param {ArrayLike} a - * @param {ArrayLike} b - * @return {boolean} - */ -export const equalFlat = (a, b) => a.length === b.length && every(a, (item, index) => item === b[index]) - -/** - * @template ELEM - * @param {Array>} arr - * @return {Array} - */ -export const flatten = arr => fold(arr, /** @type {Array} */ ([]), (acc, val) => acc.concat(val)) - -/** - * @template T - * @param {number} len - * @param {function(number, Array):T} f - * @return {Array} - */ -export const unfold = (len, f) => { - const array = new Array(len) - for (let i = 0; i < len; i++) { - array[i] = f(i, array) - } - return array -} - -/** - * @template T - * @template RESULT - * @param {Array} arr - * @param {RESULT} seed - * @param {function(RESULT, T, number):RESULT} folder - */ -export const fold = (arr, seed, folder) => arr.reduce(folder, seed) - -export const isArray = Array.isArray - -/** - * @template T - * @param {Array} arr - * @return {Array} - */ -export const unique = arr => from(set.from(arr)) - -/** - * @template T - * @template M - * @param {ArrayLike} arr - * @param {function(T):M} mapper - * @return {Array} - */ -export const uniqueBy = (arr, mapper) => { - /** - * @type {Set} - */ - const happened = set.create() - /** - * @type {Array} - */ - const result = [] - for (let i = 0; i < arr.length; i++) { - const el = arr[i] - const mapped = mapper(el) - if (!happened.has(mapped)) { - happened.add(mapped) - result.push(el) - } - } - return result -} - -/** - * @template {ArrayLike} ARR - * @template {function(ARR extends ArrayLike ? T : never, number, ARR):any} MAPPER - * @param {ARR} arr - * @param {MAPPER} mapper - * @return {Array} - */ -export const map = (arr, mapper) => { - /** - * @type {Array} - */ - const res = Array(arr.length) - for (let i = 0; i < arr.length; i++) { - res[i] = mapper(/** @type {any} */ (arr[i]), i, /** @type {any} */ (arr)) - } - return /** @type {any} */ (res) -} - -/** - * This function bubble-sorts a single item to the correct position. The sort happens in-place and - * might be useful to ensure that a single item is at the correct position in an otherwise sorted - * array. - * - * @example - * const arr = [3, 2, 5] - * arr.sort((a, b) => a - b) - * arr // => [2, 3, 5] - * arr.splice(1, 0, 7) - * array.bubbleSortItem(arr, 1, (a, b) => a - b) - * arr // => [2, 3, 5, 7] - * - * @template T - * @param {Array} arr - * @param {number} i - * @param {(a:T,b:T) => number} compareFn - */ -export const bubblesortItem = (arr, i, compareFn) => { - const n = arr[i] - let j = i - // try to sort to the right - while (j + 1 < arr.length && compareFn(n, arr[j + 1]) > 0) { - arr[j] = arr[j + 1] - arr[++j] = n - } - if (i === j && j > 0) { // no change yet - // sort to the left - while (j > 0 && compareFn(arr[j - 1], n) > 0) { - arr[j] = arr[j - 1] - arr[--j] = n - } - } - return j -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.test.d.ts deleted file mode 100644 index 4776afd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.test.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export function testIsarrayPerformance(_tc: t.TestCase): void; -export function testAppend(_tc: t.TestCase): void; -export function testBasic(_tc: t.TestCase): void; -export function testflatten(_tc: t.TestCase): void; -export function testFolding(_tc: t.TestCase): void; -export function testEvery(_tc: t.TestCase): void; -export function testIsArray(_tc: t.TestCase): void; -export function testUnique(_tc: t.TestCase): void; -export function testBubblesortItemEdgeCases(tc: t.TestCase): void; -export function testRepeatBubblesortItem(tc: t.TestCase): void; -export function testRepeatBubblesort(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=array.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.test.d.ts.map deleted file mode 100644 index ce900d0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"array.test.d.ts","sourceRoot":"","sources":["array.test.js"],"names":[],"mappings":"AAOO,4CAFI,CAAC,CAAC,QAAQ,QAkCpB;AAKM,gCAFI,CAAC,CAAC,QAAQ,QAMpB;AAKM,+BAFI,CAAC,CAAC,QAAQ,QAMpB;AAKM,iCAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,iCAFI,CAAC,CAAC,QAAQ,QAkBpB;AAKM,+BAFI,CAAC,CAAC,QAAQ,QAQpB;AAKM,iCAFI,CAAC,CAAC,QAAQ,QASpB;AAKM,gCAFI,CAAC,CAAC,QAAQ,QAOpB;AAKM,gDAFI,CAAC,CAAC,QAAQ,QAOpB;AAKM,6CAFI,CAAC,CAAC,QAAQ,QAWpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,QASpB;mBA1JkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.d.ts deleted file mode 100644 index 71a08e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=0ecdsa-generate-keypair.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.d.ts.map deleted file mode 100644 index 4db84e1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"0ecdsa-generate-keypair.d.ts","sourceRoot":"","sources":["0ecdsa-generate-keypair.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js deleted file mode 100755 index d973ae9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0ecdsa-generate-keypair.js +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env node -import * as ecdsa from 'lib0/crypto/ecdsa' -import * as json from 'lib0/json' -import * as env from 'lib0/environment' - -const prefix = env.getConf('name') - -const keypair = await ecdsa.generateKeyPair({ extractable: true }) -const privateJwk = json.stringify(await ecdsa.exportKeyJwk(keypair.privateKey)) -const publicJwk = json.stringify(await ecdsa.exportKeyJwk(keypair.publicKey)) - -console.log(` -${prefix ? prefix.toUpperCase() + '_' : ''}PUBLIC_KEY=${publicJwk} -${prefix ? prefix.toUpperCase() + '_' : ''}PRIVATE_KEY=${privateJwk} -`) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.d.ts deleted file mode 100644 index 97bafa4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=0serve.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.d.ts.map deleted file mode 100644 index 1d0eeab..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"0serve.d.ts","sourceRoot":"","sources":["0serve.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.js deleted file mode 100755 index a69d09b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/0serve.js +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env node - -/** - * Simple http server implementation. - * Optionally, you may set `DEBUG_BROWSER` environment variable to use a different browser to debug - * web apps. - */ - -import * as http from 'http' -import * as path from 'path' -import * as fs from 'fs' -import * as env from '../environment.js' -import * as number from '../number.js' -import * as logging from 'lib0/logging' - -const host = env.getParam('--host', 'localhost') -const port = number.parseInt(env.getParam('--port', '8000')) -const paramOpenFile = env.getParam('-o', '') -const debugBrowser = env.getConf('DEBUG_BROWSER') - -/** - * @type {Object} - */ -const types = { - html: 'text/html', - css: 'text/css', - js: 'application/javascript', - mjs: 'application/javascript', - png: 'image/png', - jpg: 'image/jpeg', - jpeg: 'image/jpeg', - gif: 'image/gif', - json: 'application/json', - xml: 'application/xml', - wasm: 'application/wasm' -} - -const root = path.normalize(path.resolve('./')) - -const server = http.createServer((req, res) => { - const url = (req.url || '/index.html').split('?')[0] - logging.print(logging.ORANGE, logging.BOLD, req.method || '', ' ', logging.GREY, logging.UNBOLD, url) - const extension = path.extname(url).slice(1) - /** - * @type {string} - */ - const type = (extension && types[extension]) || types.html - const supportedExtension = Boolean(type) - if (!supportedExtension) { - res.writeHead(404, { 'Content-Type': 'text/html' }) - res.end('404: File not found') - return - } - let fileName = url - if (url === '/') fileName = 'index.html' - else if (!extension) { - try { - fs.accessSync(path.join(root, url + '.html'), fs.constants.F_OK) - fileName = url + '.html' - } catch (e) { - fileName = path.join(url, 'index.html') - } - } - - const filePath = path.join(root, fileName) - const isPathUnderRoot = path - .normalize(path.resolve(filePath)) - .startsWith(root) - - if (!isPathUnderRoot) { - res.writeHead(404, { 'Content-Type': 'text/html' }) - res.end('404: File not found') - logging.print(logging.RED, logging.BOLD, 'Not Found: ', logging.GREY, logging.UNBOLD, url) - return - } - - fs.readFile(filePath, (err, data) => { - if (err) { - logging.print(logging.RED, logging.BOLD, 'Cannot read file: ', logging.GREY, logging.UNBOLD, url) - res.writeHead(404, { 'Content-Type': 'text/html' }) - res.end('404: File not found') - } else { - res.writeHead(200, { 'Content-Type': type }) - res.end(data) - } - }) -}) - -server.listen(port, host, () => { - logging.print(logging.BOLD, logging.ORANGE, `Server is running on http://${host}:${port}`) - if (paramOpenFile) { - const start = debugBrowser || (process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open') - import('child_process').then(cp => { - cp.exec(`${start} http://${host}:${port}/${paramOpenFile}`) - }) - } -}) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.d.ts deleted file mode 100644 index 422e119..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=gendocs.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.d.ts.map deleted file mode 100644 index 55ab940..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gendocs.d.ts","sourceRoot":"","sources":["gendocs.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.js deleted file mode 100644 index ea9b624..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gendocs.js +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env node -// @ts-ignore -import jsdoc from 'jsdoc-api' -import * as fs from 'fs' - -const firstTagContentRegex = /<\w>([^<]+)<\/\w>([^]*)/ -const jsdocReturnRegex = /\* @return {(.*)}/ -const jsdocTypeRegex = /\* @type {(.*)}/ - -const files = fs.readdirSync('./').filter(file => /(?/g -/** - * @param {string} s - */ -const toSafeHtml = s => s.replace(_ltregex, '<').replace(_rtregex, '>') - -const READMEcontent = fs.readFileSync('./README.md', 'utf8') - -jsdoc.explain({ - files, - configure: '.jsdoc.json' -}).then(/** @param {Array} json */ json => { - const strBuilder = [] - /** - * @type {Object, name: string, description: string }>} - */ - const modules = {} - json.forEach(item => { - if (item.meta && item.meta.filename) { - const mod = modules[item.meta.filename] || (modules[item.meta.filename] = { items: [], name: item.meta.filename.slice(0, -3), description: '' }) - if (item.kind === 'module') { - mod.name = item.name - mod.description = item.description || '' - } else { - mod.items.push(item) - } - } - }) - /** - * @type {Object} - */ - const classDescriptions = {} - for (const fileName in modules) { - const mod = modules[fileName] - const items = mod.items - const desc = firstTagContentRegex.exec(mod.description) - const descHead = desc ? desc[1] : '' - const descRest = desc ? desc[2] : '' - strBuilder.push(`
[lib0/${mod.name}] ${descHead}`) - strBuilder.push(`
import * as ${mod.name} from 'lib0/${fileName.slice(0, -3)}'
`) - if (descRest.length > 0) { - strBuilder.push(descRest) - } - strBuilder.push('
') - for (let i = 0; i < items.length; i++) { - const item = items[i] - if (!item.ignore && item.scope !== 'inner' && item.name[0] !== '_' && item.longname.indexOf('~') < 0) { - // strBuilder.push(JSON.stringify(item)) // output json for debugging - switch (item.kind) { - case 'class': { - if (item.params == null) { - classDescriptions[item.longname] = item.classdesc - break - } - } - // eslint-disable-next-line - case 'constant': { - if (item.params == null && item.returns == null) { - const typeEval = jsdocTypeRegex.exec(item.comment) - strBuilder.push(`${item.longname.slice(7)}${typeEval ? (': ' + toSafeHtml(typeEval[1])) : ''}
`) - if (item.description) { - strBuilder.push(`
${item.description}
`) - } - break - } - } - // eslint-disable-next-line - case 'function': { - /** - * @param {string} name - */ - const getOriginalParamTypeDecl = name => { - const regval = new RegExp('@param {(.*)} \\[?' + name + '\\]?[^\\w]*').exec(item.comment) - return regval ? regval[1] : null - } - if (item.params == null && item.returns == null) { - break - } - const paramVal = (item.params || []).map(/** @param {any} ret */ ret => `${ret.name}: ${getOriginalParamTypeDecl(ret.name) || ret.type.names.join('|')}`).join(', ') - const evalReturnRegex = jsdocReturnRegex.exec(item.comment) - const returnVal = evalReturnRegex ? `: ${evalReturnRegex[1]}` : (item.returns ? item.returns.map(/** @param {any} r */ r => r.type.names.join('|')).join('|') : '') - strBuilder.push(`${item.kind === 'class' ? 'new ' : ''}${item.longname.slice(7)}(${toSafeHtml(paramVal)})${toSafeHtml(returnVal)}
`) - const desc = item.description || item.classdesc || classDescriptions[item.longname] || null - if (desc) { - strBuilder.push(`
${desc}
`) - } - break - } - case 'member': { - if (item.type) { - strBuilder.push(`${item.longname.slice(7)}: ${toSafeHtml(/** @type {RegExpExecArray} */ (jsdocTypeRegex.exec(item.comment))[1])}
`) - if (item.description) { - strBuilder.push(`
${item.description}
`) - } - } - } - } - } - } - strBuilder.push('
') - strBuilder.push('
') - } - const replaceReadme = READMEcontent.replace(/
[^]*<\/details>/, strBuilder.join('\n')) - fs.writeFileSync('./README.md', replaceReadme) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.d.ts deleted file mode 100644 index 39f067b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=gentesthtml.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.d.ts.map deleted file mode 100644 index 95d65b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gentesthtml.d.ts","sourceRoot":"","sources":["gentesthtml.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js deleted file mode 100755 index 3c4a085..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/gentesthtml.js +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env node -import * as fs from 'fs' -import * as object from '../object.js' -import * as env from '../environment.js' - -const script = env.getParam('--script', './test.js') -const includeDeps = env.getParam('--include-dependencies', '').split(',').filter(d => d.length) -const customImportsPath = env.getParam('--custom-imports', '') - -/** - * @type {Object} - */ -const exports = {} -/** - * @type {Object>} - */ -const scopes = {} - -/** - * @param {any} v - * @param {string} k - * @param {string} pkgName - * @param {string} pathPrefix - * @param {Object} importMap - */ -const extractModMap = (v, k, pkgName, pathPrefix, importMap) => { - if (k[0] !== '.') return - if (typeof v === 'object') { - extractModMap(v.browser || v.import || v.module || v.default, k, pkgName, pathPrefix, importMap) - } else if (v && v[0] === '.') { - importMap[pkgName + k.slice(1)] = pathPrefix + v.slice(1) - } -} - -/** - * @param {string} s - */ -const _maybeAddRelPrefix = s => (s[0] !== '.' ? './' : '') + s - -/** - * @param {any} pkgJson - * @param {string} pathPrefix - * @param {Object} importMap - */ -const readPkg = (pkgJson, pathPrefix, importMap) => { - if (pkgJson.exports == null && pkgJson.main != null) { - importMap[pkgJson.name] = pathPrefix + _maybeAddRelPrefix(pkgJson.main).slice(1) - } - object.forEach(pkgJson.exports, (v, k) => extractModMap(v, k, pkgJson.name, pathPrefix, importMap)) - object.forEach(pkgJson.dependencies, (_v, depName) => { - const nextImportMap = pathPrefix === '.' ? exports : (scopes[pathPrefix + '/'] || (scopes[pathPrefix + '/'] = {})) - const prefix = `./node_modules/${depName}` - const depPkgJson = JSON.parse(fs.readFileSync(prefix + '/package.json', { encoding: 'utf8' })) - readPkg(depPkgJson, prefix, nextImportMap) - }) -} - -const rootPkgJson = JSON.parse(fs.readFileSync('./package.json', { encoding: 'utf8' })) -readPkg(rootPkgJson, '.', exports) -includeDeps.forEach(depName => { - const prefix = `./node_modules/${depName}` - const depPkgJson = JSON.parse(fs.readFileSync(`${prefix}/package.json`, { encoding: 'utf8' })) - readPkg(depPkgJson, prefix, exports) -}) - -const customImports = {} -if (customImportsPath !== '') { - object.assign(customImports, JSON.parse(fs.readFileSync(customImportsPath, { encoding: 'utf8' }))) -} - -const testHtml = ` - - - - Testing ${rootPkgJson.name} - - - - - - -` - -console.log(testHtml) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.d.ts deleted file mode 100644 index 890f0c4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Binary data constants. - * - * @module binary - */ -/** - * n-th bit activated. - * - * @type {number} - */ -export const BIT1: number; -export const BIT2: 2; -export const BIT3: 4; -export const BIT4: 8; -export const BIT5: 16; -export const BIT6: 32; -export const BIT7: 64; -export const BIT8: 128; -export const BIT9: 256; -export const BIT10: 512; -export const BIT11: 1024; -export const BIT12: 2048; -export const BIT13: 4096; -export const BIT14: 8192; -export const BIT15: 16384; -export const BIT16: 32768; -export const BIT17: 65536; -export const BIT18: number; -export const BIT19: number; -export const BIT20: number; -export const BIT21: number; -export const BIT22: number; -export const BIT23: number; -export const BIT24: number; -export const BIT25: number; -export const BIT26: number; -export const BIT27: number; -export const BIT28: number; -export const BIT29: number; -export const BIT30: number; -export const BIT31: number; -export const BIT32: number; -/** - * First n bits activated. - * - * @type {number} - */ -export const BITS0: number; -export const BITS1: 1; -export const BITS2: 3; -export const BITS3: 7; -export const BITS4: 15; -export const BITS5: 31; -export const BITS6: 63; -export const BITS7: 127; -export const BITS8: 255; -export const BITS9: 511; -export const BITS10: 1023; -export const BITS11: 2047; -export const BITS12: 4095; -export const BITS13: 8191; -export const BITS14: 16383; -export const BITS15: 32767; -export const BITS16: 65535; -export const BITS17: number; -export const BITS18: number; -export const BITS19: number; -export const BITS20: number; -export const BITS21: number; -export const BITS22: number; -export const BITS23: number; -export const BITS24: number; -export const BITS25: number; -export const BITS26: number; -export const BITS27: number; -export const BITS28: number; -export const BITS29: number; -export const BITS30: number; -/** - * @type {number} - */ -export const BITS31: number; -/** - * @type {number} - */ -export const BITS32: number; -//# sourceMappingURL=binary.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.d.ts.map deleted file mode 100644 index 678cb8f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["binary.js"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH;;;;GAIG;AACH,mBAFU,MAAM,CAEK;AACrB,mBAAoB,CAAC,CAAA;AACrB,mBAAoB,CAAC,CAAA;AACrB,mBAAoB,CAAC,CAAA;AACrB,mBAAoB,EAAE,CAAA;AACtB,mBAAoB,EAAE,CAAA;AACtB,mBAAoB,EAAE,CAAA;AACtB,mBAAoB,GAAG,CAAA;AACvB,mBAAoB,GAAG,CAAA;AACvB,oBAAqB,GAAG,CAAA;AACxB,oBAAqB,IAAI,CAAA;AACzB,oBAAqB,IAAI,CAAA;AACzB,oBAAqB,IAAI,CAAA;AACzB,oBAAqB,IAAI,CAAA;AACzB,oBAAqB,KAAK,CAAA;AAC1B,oBAAqB,KAAK,CAAA;AAC1B,oBAAqB,KAAK,CAAA;AAC1B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAE5B;;;;GAIG;AACH,oBAFU,MAAM,CAEM;AACtB,oBAAqB,CAAC,CAAA;AACtB,oBAAqB,CAAC,CAAA;AACtB,oBAAqB,CAAC,CAAA;AACtB,oBAAqB,EAAE,CAAA;AACvB,oBAAqB,EAAE,CAAA;AACvB,oBAAqB,EAAE,CAAA;AACvB,oBAAqB,GAAG,CAAA;AACxB,oBAAqB,GAAG,CAAA;AACxB,oBAAqB,GAAG,CAAA;AACxB,qBAAsB,IAAI,CAAA;AAC1B,qBAAsB,IAAI,CAAA;AAC1B,qBAAsB,IAAI,CAAA;AAC1B,qBAAsB,IAAI,CAAA;AAC1B,qBAAsB,KAAK,CAAA;AAC3B,qBAAsB,KAAK,CAAA;AAC3B,qBAAsB,KAAK,CAAA;AAC3B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B;;GAEG;AACH,qBAFU,MAAM,CAEgB;AAChC;;GAEG;AACH,qBAFU,MAAM,CAEgB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.js deleted file mode 100644 index babab55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.js +++ /dev/null @@ -1,90 +0,0 @@ -/* eslint-env browser */ - -/** - * Binary data constants. - * - * @module binary - */ - -/** - * n-th bit activated. - * - * @type {number} - */ -export const BIT1 = 1 -export const BIT2 = 2 -export const BIT3 = 4 -export const BIT4 = 8 -export const BIT5 = 16 -export const BIT6 = 32 -export const BIT7 = 64 -export const BIT8 = 128 -export const BIT9 = 256 -export const BIT10 = 512 -export const BIT11 = 1024 -export const BIT12 = 2048 -export const BIT13 = 4096 -export const BIT14 = 8192 -export const BIT15 = 16384 -export const BIT16 = 32768 -export const BIT17 = 65536 -export const BIT18 = 1 << 17 -export const BIT19 = 1 << 18 -export const BIT20 = 1 << 19 -export const BIT21 = 1 << 20 -export const BIT22 = 1 << 21 -export const BIT23 = 1 << 22 -export const BIT24 = 1 << 23 -export const BIT25 = 1 << 24 -export const BIT26 = 1 << 25 -export const BIT27 = 1 << 26 -export const BIT28 = 1 << 27 -export const BIT29 = 1 << 28 -export const BIT30 = 1 << 29 -export const BIT31 = 1 << 30 -export const BIT32 = 1 << 31 - -/** - * First n bits activated. - * - * @type {number} - */ -export const BITS0 = 0 -export const BITS1 = 1 -export const BITS2 = 3 -export const BITS3 = 7 -export const BITS4 = 15 -export const BITS5 = 31 -export const BITS6 = 63 -export const BITS7 = 127 -export const BITS8 = 255 -export const BITS9 = 511 -export const BITS10 = 1023 -export const BITS11 = 2047 -export const BITS12 = 4095 -export const BITS13 = 8191 -export const BITS14 = 16383 -export const BITS15 = 32767 -export const BITS16 = 65535 -export const BITS17 = BIT18 - 1 -export const BITS18 = BIT19 - 1 -export const BITS19 = BIT20 - 1 -export const BITS20 = BIT21 - 1 -export const BITS21 = BIT22 - 1 -export const BITS22 = BIT23 - 1 -export const BITS23 = BIT24 - 1 -export const BITS24 = BIT25 - 1 -export const BITS25 = BIT26 - 1 -export const BITS26 = BIT27 - 1 -export const BITS27 = BIT28 - 1 -export const BITS28 = BIT29 - 1 -export const BITS29 = BIT30 - 1 -export const BITS30 = BIT31 - 1 -/** - * @type {number} - */ -export const BITS31 = 0x7FFFFFFF -/** - * @type {number} - */ -export const BITS32 = 0xFFFFFFFF diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.test.d.ts deleted file mode 100644 index 1c2e586..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.test.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function testBitx(tc: t.TestCase): void; -export function testBitsx(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=binary.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.test.d.ts.map deleted file mode 100644 index cebb86f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binary.test.d.ts","sourceRoot":"","sources":["binary.test.js"],"names":[],"mappings":"AAMO,6BAFI,CAAC,CAAC,QAAQ,QAOpB;AAKM,8BAFI,CAAC,CAAC,QAAQ,QAWpB;mBAxBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.d.ts deleted file mode 100644 index d8f048e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function subscribe(room: string, f: (arg0: any, arg1: any) => any): (arg0: any, arg1: any) => any; -export function unsubscribe(room: string, f: (arg0: any, arg1: any) => any): boolean; -export function publish(room: string, data: any, origin?: any): void; -export type Channel = { - subs: Set<(arg0: any, arg1: any) => any>; - bc: any; -}; -//# sourceMappingURL=broadcastchannel.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.d.ts.map deleted file mode 100644 index 6508b47..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"broadcastchannel.d.ts","sourceRoot":"","sources":["broadcastchannel.js"],"names":[],"mappings":"AA+FO,gCAHI,MAAM,KACN,CAAS,IAAG,EAAH,GAAG,EAAE,IAAG,EAAH,GAAG,KAAE,GAAG,UAAb,GAAG,QAAE,GAAG,KAAE,GAAG,CAKhC;AASM,kCAHI,MAAM,KACN,CAAS,IAAG,EAAH,GAAG,EAAE,IAAG,EAAH,GAAG,KAAE,GAAG,WAUhC;AAUM,8BAJI,MAAM,QACN,GAAG,WACH,GAAG,QAMb;;UAvGa,GAAG,CAAC,CAAS,IAAG,EAAH,GAAG,EAAE,IAAG,EAAH,GAAG,KAAE,GAAG,CAAC;QAC3B,GAAG"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.js deleted file mode 100644 index 327f2d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.js +++ /dev/null @@ -1,130 +0,0 @@ -/* eslint-env browser */ - -/** - * Helpers for cross-tab communication using broadcastchannel with LocalStorage fallback. - * - * ```js - * // In browser window A: - * broadcastchannel.subscribe('my events', data => console.log(data)) - * broadcastchannel.publish('my events', 'Hello world!') // => A: 'Hello world!' fires synchronously in same tab - * - * // In browser window B: - * broadcastchannel.publish('my events', 'hello from tab B') // => A: 'hello from tab B' - * ``` - * - * @module broadcastchannel - */ - -// @todo before next major: use Uint8Array instead as buffer object - -import * as map from './map.js' -import * as set from './set.js' -import * as buffer from './buffer.js' -import * as storage from './storage.js' - -/** - * @typedef {Object} Channel - * @property {Set} Channel.subs - * @property {any} Channel.bc - */ - -/** - * @type {Map} - */ -const channels = new Map() - -/* c8 ignore start */ -class LocalStoragePolyfill { - /** - * @param {string} room - */ - constructor (room) { - this.room = room - /** - * @type {null|function({data:Uint8Array}):void} - */ - this.onmessage = null - /** - * @param {any} e - */ - this._onChange = e => e.key === room && this.onmessage !== null && this.onmessage({ data: buffer.fromBase64(e.newValue || '') }) - storage.onChange(this._onChange) - } - - /** - * @param {ArrayBuffer} buf - */ - postMessage (buf) { - storage.varStorage.setItem(this.room, buffer.toBase64(buffer.createUint8ArrayFromArrayBuffer(buf))) - } - - close () { - storage.offChange(this._onChange) - } -} -/* c8 ignore stop */ - -// Use BroadcastChannel or Polyfill -/* c8 ignore next */ -const BC = typeof BroadcastChannel === 'undefined' ? LocalStoragePolyfill : BroadcastChannel - -/** - * @param {string} room - * @return {Channel} - */ -const getChannel = room => - map.setIfUndefined(channels, room, () => { - const subs = set.create() - const bc = new BC(room) - /** - * @param {{data:ArrayBuffer}} e - */ - /* c8 ignore next */ - bc.onmessage = e => subs.forEach(sub => sub(e.data, 'broadcastchannel')) - return { - bc, subs - } - }) - -/** - * Subscribe to global `publish` events. - * - * @function - * @param {string} room - * @param {function(any, any):any} f - */ -export const subscribe = (room, f) => { - getChannel(room).subs.add(f) - return f -} - -/** - * Unsubscribe from `publish` global events. - * - * @function - * @param {string} room - * @param {function(any, any):any} f - */ -export const unsubscribe = (room, f) => { - const channel = getChannel(room) - const unsubscribed = channel.subs.delete(f) - if (unsubscribed && channel.subs.size === 0) { - channel.bc.close() - channels.delete(room) - } - return unsubscribed -} - -/** - * Publish data to all subscribers (including subscribers on this tab) - * - * @function - * @param {string} room - * @param {any} data - * @param {any} [origin] - */ -export const publish = (room, data, origin = null) => { - const c = getChannel(room) - c.bc.postMessage(data) - c.subs.forEach(sub => sub(data, origin)) -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.test.d.ts deleted file mode 100644 index a746c1d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testBroadcastChannel(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=broadcastchannel.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.test.d.ts.map deleted file mode 100644 index 50ebd67..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"broadcastchannel.test.d.ts","sourceRoot":"","sources":["broadcastchannel.test.js"],"names":[],"mappings":"AAMO,yCAFI,CAAC,CAAC,QAAQ,QAkBpB;mBAtBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.d.ts deleted file mode 100644 index 2f27c30..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export function createUint8ArrayFromLen(len: number): Uint8Array; -export function createUint8ArrayViewFromArrayBuffer(buffer: ArrayBuffer, byteOffset: number, length: number): Uint8Array; -export function createUint8ArrayFromArrayBuffer(buffer: ArrayBuffer): Uint8Array; -/** - * @param {Uint8Array} bytes - * @return {string} - */ -export function toBase64(bytes: Uint8Array): string; -/** - * @param {string} s - * @return {Uint8Array} - */ -export function fromBase64(s: string): Uint8Array; -export function toBase64UrlEncoded(buf: Uint8Array): string; -export function fromBase64UrlEncoded(base64: string): Uint8Array; -export function toHexString(buf: Uint8Array): string; -export function fromHexString(hex: string): Uint8Array; -export function copyUint8Array(uint8Array: Uint8Array): Uint8Array; -export function encodeAny(data: any): Uint8Array; -export function decodeAny(buf: Uint8Array): any; -export function shiftNBitsLeft(bs: Uint8Array, N: number): Uint8Array; -//# sourceMappingURL=buffer.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.d.ts.map deleted file mode 100644 index efa7de2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["buffer.js"],"names":[],"mappings":"AAgBO,6CAFI,MAAM,2BAEgD;AAS1D,4DAJI,WAAW,cACX,MAAM,UACN,MAAM,2BAE4G;AAOtH,wDAFI,WAAW,2BAEyD;AAG/E;;;GAGG;AACH,gCAHW,UAAU,GACT,MAAM,CASjB;AAUD;;;GAGG;AACH,8BAHW,MAAM,GACL,UAAU,CAAC,WAAW,CAAC,CAUlC;AAqBM,wCAFI,UAAU,UAE+F;AAK7G,6CAFI,MAAM,2BAEyF;AAOnG,iCAFI,UAAU,UAE0E;AAOxF,mCAFI,MAAM,2BAShB;AAQM,2CAHI,UAAU,GACT,UAAU,CAMrB;AASM,gCAHI,GAAG,GACF,UAAU,CAGwC;AAQvD,+BAHI,UAAU,GACT,GAAG,CAE8D;AAQtE,mCAHI,UAAU,KACV,MAAM,+BAWhB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.js deleted file mode 100644 index 375fe7c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.js +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Utility functions to work with buffers (Uint8Array). - * - * @module buffer - */ - -import * as string from './string.js' -import * as env from './environment.js' -import * as array from './array.js' -import * as math from './math.js' -import * as encoding from './encoding.js' -import * as decoding from './decoding.js' - -/** - * @param {number} len - */ -export const createUint8ArrayFromLen = len => new Uint8Array(len) - -/** - * Create Uint8Array with initial content from buffer - * - * @param {ArrayBuffer} buffer - * @param {number} byteOffset - * @param {number} length - */ -export const createUint8ArrayViewFromArrayBuffer = (buffer, byteOffset, length) => new Uint8Array(buffer, byteOffset, length) - -/** - * Create Uint8Array with initial content from buffer - * - * @param {ArrayBuffer} buffer - */ -export const createUint8ArrayFromArrayBuffer = buffer => new Uint8Array(buffer) - -/* c8 ignore start */ -/** - * @param {Uint8Array} bytes - * @return {string} - */ -const toBase64Browser = bytes => { - let s = '' - for (let i = 0; i < bytes.byteLength; i++) { - s += string.fromCharCode(bytes[i]) - } - // eslint-disable-next-line no-undef - return btoa(s) -} -/* c8 ignore stop */ - -/** - * @param {Uint8Array} bytes - * @return {string} - */ -const toBase64Node = bytes => Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString('base64') - -/* c8 ignore start */ -/** - * @param {string} s - * @return {Uint8Array} - */ -const fromBase64Browser = s => { - // eslint-disable-next-line no-undef - const a = atob(s) - const bytes = createUint8ArrayFromLen(a.length) - for (let i = 0; i < a.length; i++) { - bytes[i] = a.charCodeAt(i) - } - return bytes -} -/* c8 ignore stop */ - -/** - * @param {string} s - */ -const fromBase64Node = s => { - const buf = Buffer.from(s, 'base64') - return createUint8ArrayViewFromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength) -} - -/* c8 ignore next */ -export const toBase64 = env.isBrowser ? toBase64Browser : toBase64Node - -/* c8 ignore next */ -export const fromBase64 = env.isBrowser ? fromBase64Browser : fromBase64Node - -/** - * Implements base64url - see https://datatracker.ietf.org/doc/html/rfc4648#section-5 - * @param {Uint8Array} buf - */ -export const toBase64UrlEncoded = buf => toBase64(buf).replaceAll('+', '-').replaceAll('/', '_').replaceAll('=', '') - -/** - * @param {string} base64 - */ -export const fromBase64UrlEncoded = base64 => fromBase64(base64.replaceAll('-', '+').replaceAll('_', '/')) - -/** - * Base64 is always a more efficient choice. This exists for utility purposes only. - * - * @param {Uint8Array} buf - */ -export const toHexString = buf => array.map(buf, b => b.toString(16).padStart(2, '0')).join('') - -/** - * Note: This function expects that the hex doesn't start with 0x.. - * - * @param {string} hex - */ -export const fromHexString = hex => { - const hlen = hex.length - const buf = new Uint8Array(math.ceil(hlen / 2)) - for (let i = 0; i < hlen; i += 2) { - buf[buf.length - i / 2 - 1] = Number.parseInt(hex.slice(hlen - i - 2, hlen - i), 16) - } - return buf -} - -/** - * Copy the content of an Uint8Array view to a new ArrayBuffer. - * - * @param {Uint8Array} uint8Array - * @return {Uint8Array} - */ -export const copyUint8Array = uint8Array => { - const newBuf = createUint8ArrayFromLen(uint8Array.byteLength) - newBuf.set(uint8Array) - return newBuf -} - -/** - * Encode anything as a UInt8Array. It's a pun on typescripts's `any` type. - * See encoding.writeAny for more information. - * - * @param {any} data - * @return {Uint8Array} - */ -export const encodeAny = data => - encoding.encode(encoder => encoding.writeAny(encoder, data)) - -/** - * Decode an any-encoded value. - * - * @param {Uint8Array} buf - * @return {any} - */ -export const decodeAny = buf => decoding.readAny(decoding.createDecoder(buf)) - -/** - * Shift Byte Array {N} bits to the left. Does not expand byte array. - * - * @param {Uint8Array} bs - * @param {number} N should be in the range of [0-7] - */ -export const shiftNBitsLeft = (bs, N) => { - if (N === 0) return bs - bs = new Uint8Array(bs) - bs[0] <<= N - for (let i = 1; i < bs.length; i++) { - bs[i - 1] |= bs[i] >>> (8 - N) - bs[i] <<= N - } - return bs -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.test.d.ts deleted file mode 100644 index 0bd7014..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testRepeatBase64urlEncoding(tc: t.TestCase): void; -export function testRepeatBase64Encoding(tc: t.TestCase): void; -export function testRepeatHexEncoding(tc: t.TestCase): void; -export function testAnyEncoding(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=buffer.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.test.d.ts.map deleted file mode 100644 index 5305916..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer.test.d.ts","sourceRoot":"","sources":["buffer.test.js"],"names":[],"mappings":"AA2BO,gDAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,6CAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,0CAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,qCAFI,CAAC,CAAC,QAAQ,QAMpB;mBApDkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.d.ts deleted file mode 100644 index 3317bc2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @template K, V - */ -export class Cache { - /** - * @param {number} timeout - */ - constructor(timeout: number); - timeout: number; - /** - * @type list.List> - */ - _q: list.List>; - /** - * @type {Map>} - */ - _map: Map>; -} -export function removeStale(cache: Cache): number; -export function set(cache: Cache, key: K, value: V): void; -export function get(cache: Cache, key: K): V | undefined; -export function refreshTimeout(cache: Cache, key: K): void; -export function getAsync(cache: Cache, key: K): V | Promise | undefined; -export function remove(cache: Cache, key: K): NonNullable | undefined; -export function setIfUndefined(cache: Cache, key: K, init: () => Promise, removeNull?: boolean): Promise | V; -export function create(timeout: number): Cache; -import * as list from './list.js'; -/** - * @template K, V - * - * @implements {list.ListNode} - */ -declare class Entry implements list.ListNode { - /** - * @param {K} key - * @param {V | Promise} val - */ - constructor(key: K, val: V | Promise); - /** - * @type {this | null} - */ - prev: this | null; - /** - * @type {this | null} - */ - next: this | null; - created: number; - val: V | Promise; - key: K; -} -export {}; -//# sourceMappingURL=cache.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.d.ts.map deleted file mode 100644 index 527a9dd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["cache.js"],"names":[],"mappings":"AAqCA;;GAEG;AACH,mBAFa,CAAC,EAAE,CAAC;IAGf;;OAEG;IACH,qBAFW,MAAM,EAYhB;IATC,gBAAsB;IACtB;;OAEG;IACH,IAFS,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAER;IACvB;;OAEG;IACH,MAFU,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAEL;CAE3B;AAQM,4BALM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GACV,MAAM,CAUjB;AASM,oBANM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,SACD,CAAC,QAgBX;AAwBM,oBANM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,GACA,CAAC,GAAG,SAAS,CAKxB;AAQM,+BALM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,QAWX;AAYM,yBANM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,GACA,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAKrC;AAQM,uBALM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,8BASX;AAWM,+BARM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,QACD,MAAW,OAAO,CAAC,CAAC,CAAC,eACrB,OAAO,GACN,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAuBzB;AAKM,gCAFI,MAAM,mBAEkC;sBArM7B,WAAW;AAIjC;;;;GAIG;AACH,oBAJa,CAAC,EAAE,CAAC,aAED,IAAI,CAAC,QAAQ;IAG3B;;;OAGG;IACH,iBAHW,CAAC,OACD,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAcxB;IAXC;;OAEG;IACH,MAFU,IAAI,GAAG,IAAI,CAEL;IAChB;;OAEG;IACH,MAFU,IAAI,GAAG,IAAI,CAEL;IAChB,gBAAiC;IACjC,oBAAc;IACd,OAAc;CAEjB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.js deleted file mode 100644 index 6bb716a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.js +++ /dev/null @@ -1,206 +0,0 @@ -/* eslint-env browser */ - -/** - * An implementation of a map which has keys that expire. - * - * @module cache - */ - -import * as list from './list.js' -import * as map from './map.js' -import * as time from './time.js' - -/** - * @template K, V - * - * @implements {list.ListNode} - */ -class Entry { - /** - * @param {K} key - * @param {V | Promise} val - */ - constructor (key, val) { - /** - * @type {this | null} - */ - this.prev = null - /** - * @type {this | null} - */ - this.next = null - this.created = time.getUnixTime() - this.val = val - this.key = key - } -} - -/** - * @template K, V - */ -export class Cache { - /** - * @param {number} timeout - */ - constructor (timeout) { - this.timeout = timeout - /** - * @type list.List> - */ - this._q = list.create() - /** - * @type {Map>} - */ - this._map = map.create() - } -} - -/** - * @template K, V - * - * @param {Cache} cache - * @return {number} Returns the current timestamp - */ -export const removeStale = cache => { - const now = time.getUnixTime() - const q = cache._q - while (q.start && now - q.start.created > cache.timeout) { - cache._map.delete(q.start.key) - list.popFront(q) - } - return now -} - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - * @param {V} value - */ -export const set = (cache, key, value) => { - const now = removeStale(cache) - const q = cache._q - const n = cache._map.get(key) - if (n) { - list.removeNode(q, n) - list.pushEnd(q, n) - n.created = now - n.val = value - } else { - const node = new Entry(key, value) - list.pushEnd(q, node) - cache._map.set(key, node) - } -} - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - * @return {Entry | undefined} - */ -const getNode = (cache, key) => { - removeStale(cache) - const n = cache._map.get(key) - if (n) { - return n - } -} - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - * @return {V | undefined} - */ -export const get = (cache, key) => { - const n = getNode(cache, key) - return n && !(n.val instanceof Promise) ? n.val : undefined -} - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - */ -export const refreshTimeout = (cache, key) => { - const now = time.getUnixTime() - const q = cache._q - const n = cache._map.get(key) - if (n) { - list.removeNode(q, n) - list.pushEnd(q, n) - n.created = now - } -} - -/** - * Works well in conjunktion with setIfUndefined which has an async init function. - * Using getAsync & setIfUndefined ensures that the init function is only called once. - * - * @template K, V - * - * @param {Cache} cache - * @param {K} key - * @return {V | Promise | undefined} - */ -export const getAsync = (cache, key) => { - const n = getNode(cache, key) - return n ? n.val : undefined -} - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - */ -export const remove = (cache, key) => { - const n = cache._map.get(key) - if (n) { - list.removeNode(cache._q, n) - cache._map.delete(key) - return n.val && !(n.val instanceof Promise) ? n.val : undefined - } -} - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - * @param {function():Promise} init - * @param {boolean} removeNull Optional argument that automatically removes values that resolve to null/undefined from the cache. - * @return {Promise | V} - */ -export const setIfUndefined = (cache, key, init, removeNull = false) => { - removeStale(cache) - const q = cache._q - const n = cache._map.get(key) - if (n) { - return n.val - } else { - const p = init() - const node = new Entry(key, p) - list.pushEnd(q, node) - cache._map.set(key, node) - p.then(v => { - if (p === node.val) { - node.val = v - } - if (removeNull && v == null) { - remove(cache, key) - } - }) - return p - } -} - -/** - * @param {number} timeout - */ -export const create = timeout => new Cache(timeout) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.test.d.ts deleted file mode 100644 index 693e0d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testCache(tc: t.TestCase): Promise; -import * as t from './testing.js'; -//# sourceMappingURL=cache.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.test.d.ts.map deleted file mode 100644 index 62478d6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/cache.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cache.test.d.ts","sourceRoot":"","sources":["cache.test.js"],"names":[],"mappings":"AAOO,8BAFI,CAAC,CAAC,QAAQ,iBA6EpB;mBAlFkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.d.ts deleted file mode 100644 index 8108665..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @type {CustomElementRegistry} - */ -export const registry: CustomElementRegistry; -export function define(name: string, constr: any, opts?: ElementDefinitionOptions): void; -export function whenDefined(name: string): Promise; -/** - * @template S - */ -export class Lib0Component extends HTMLElement { - /** - * @param {S} [state] - */ - constructor(state?: S); - /** - * @type {S|null} - */ - state: S | null; - /** - * @type {any} - */ - _internal: any; - /** - * @param {S} _state - * @param {boolean} [_forceStateUpdate] Force that the state is rerendered even if state didn't change - */ - setState(_state: S, _forceStateUpdate?: boolean): void; - /** - * @param {any} _stateUpdate - */ - updateState(_stateUpdate: any): void; -} -export function createComponent(name: string, { template, style, state: defaultState, onStateChange, childStates, attrs, listeners, slots }: CONF): typeof Lib0Component; -export function createComponentDefiner(definer: Function): () => any; -export function defineListComponent(): any; -export function defineLazyLoadingComponent(): any; -export type CONF = { - /** - * Template for the shadow dom. - */ - template?: string | null | undefined; - /** - * shadow dom style. Is only used when - * `CONF.template` is defined - */ - style?: string | undefined; - /** - * Initial component state. - */ - state?: S | undefined; - /** - * Called when - * the state changes. - */ - onStateChange?: ((arg0: S, arg1: S | null, arg2: Lib0Component) => void) | undefined; - /** - * maps from - * CSS-selector to transformer function. The first element that matches the - * CSS-selector receives state updates via the transformer function. - */ - childStates?: { - [x: string]: (arg0: any, arg1: any) => Object; - } | undefined; - /** - * attrs-keys and state-keys should be camelCase, but the DOM uses kebap-case. I.e. - * `attrs = { myAttr: 4 }` is represeted as `` in the DOM - */ - attrs?: { - [x: string]: "string" | "number" | "json" | "bool"; - } | undefined; - /** - * Maps from dom-event-name - * to event listener. - */ - listeners?: { - [x: string]: (arg0: CustomEvent, arg1: Lib0Component) => boolean | void; - } | undefined; - /** - * Fill slots - * automatically when state changes. Maps from slot-name to slot-html. - */ - slots?: ((arg0: S, arg1: S, arg2: Lib0Component) => { - [x: string]: string; - }) | undefined; -}; -//# sourceMappingURL=component.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.d.ts.map deleted file mode 100644 index 88f5a5d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["component.js"],"names":[],"mappings":"AAiBA;;GAEG;AACH,uBAFU,qBAAqB,CAEO;AAO/B,6BAJI,MAAM,UACN,GAAG,SACH,wBAAwB,QAE8C;AAM1E,kCAHI,MAAM,GACL,OAAO,CAAC,wBAAwB,CAAC,CAEgB;AAM7D;;GAEG;AACH,2BAFa,CAAC;IAGZ;;OAEG;IACH,oBAFW,CAAC,EAYX;IARC;;OAEG;IACH,OAFU,CAAC,GAAC,IAAI,CAEuB;IACvC;;OAEG;IACH,WAFU,GAAG,CAEM;IAGrB;;;OAGG;IACH,iBAHW,CAAC,sBACD,OAAO,QAE4B;IAE9C;;QAEI;IACJ,0BAFY,GAAG,QAEe;CAC/B;AA6DM,gCALM,CAAC,QACH,MAAM,iGACN,IAAI,CAAC,CAAC,CAAC,GACN,OAAO,aAAa,CAuM/B;AAKM,qEAWN;AANQ,2CAKN;AALM,kDAKN;iBA9OU,CAAC;;;;;;;;;;;;;;;;;;4BAMS,CAAC,QAAC,CAAC,GAAC,IAAI,QAAC,aAAa,CAAC,CAAC,CAAC,KAAE,IAAI;;;;;;;4BAEjB,GAAG,QAAE,GAAG,KAAE,MAAM;;;;;;;;;;;;;;4BAMf,WAAW,QAAE,aAAa,CAAC,GAAG,CAAC,KAAE,OAAO,GAAC,IAAI;;;;;;oBAE5D,CAAC,QAAE,CAAC,QAAE,aAAa,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.js deleted file mode 100644 index 1f851f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/component.js +++ /dev/null @@ -1,414 +0,0 @@ -/* eslint-env browser */ - -/** - * Web components. - * - * @module component - */ - -import * as dom from './dom.js' -import * as diff from './diff.js' -import * as object from './object.js' -import * as json from './json.js' -import * as string from './string.js' -import * as array from './array.js' -import * as number from './number.js' -import * as func from './function.js' - -/** - * @type {CustomElementRegistry} - */ -export const registry = customElements - -/** - * @param {string} name - * @param {any} constr - * @param {ElementDefinitionOptions} [opts] - */ -export const define = (name, constr, opts) => registry.define(name, constr, opts) - -/** - * @param {string} name - * @return {Promise} - */ -export const whenDefined = name => registry.whenDefined(name) - -const upgradedEventName = 'upgraded' -const connectedEventName = 'connected' -const disconnectedEventName = 'disconnected' - -/** - * @template S - */ -export class Lib0Component extends HTMLElement { - /** - * @param {S} [state] - */ - constructor (state) { - super() - /** - * @type {S|null} - */ - this.state = /** @type {any} */ (state) - /** - * @type {any} - */ - this._internal = {} - } - - /** - * @param {S} _state - * @param {boolean} [_forceStateUpdate] Force that the state is rerendered even if state didn't change - */ - setState (_state, _forceStateUpdate = true) {} - - /** - * @param {any} _stateUpdate - */ - updateState (_stateUpdate) { } -} - -/** - * @param {any} val - * @param {"json"|"string"|"number"} type - * @return {string} - */ -const encodeAttrVal = (val, type) => { - if (type === 'json') { - val = json.stringify(val) - } - return val + '' -} - -/** - * @param {any} val - * @param {"json"|"string"|"number"|"bool"} type - * @return {any} - */ -const parseAttrVal = (val, type) => { - switch (type) { - case 'json': - return json.parse(val) - case 'number': - return Number.parseFloat(val) - case 'string': - return val - case 'bool': - return val != null - default: - return null - } -} - -/** - * @template S - * @typedef {Object} CONF - * @property {string?} [CONF.template] Template for the shadow dom. - * @property {string} [CONF.style] shadow dom style. Is only used when - * `CONF.template` is defined - * @property {S} [CONF.state] Initial component state. - * @property {function(S,S|null,Lib0Component):void} [CONF.onStateChange] Called when - * the state changes. - * @property {Object} [CONF.childStates] maps from - * CSS-selector to transformer function. The first element that matches the - * CSS-selector receives state updates via the transformer function. - * @property {Object} [CONF.attrs] - * attrs-keys and state-keys should be camelCase, but the DOM uses kebap-case. I.e. - * `attrs = { myAttr: 4 }` is represeted as `` in the DOM - * @property {Object):boolean|void>} [CONF.listeners] Maps from dom-event-name - * to event listener. - * @property {function(S, S, Lib0Component):Object} [CONF.slots] Fill slots - * automatically when state changes. Maps from slot-name to slot-html. - */ - -/** - * @template T - * @param {string} name - * @param {CONF} cnf - * @return {typeof Lib0Component} - */ -export const createComponent = (name, { template, style = '', state: defaultState, onStateChange = () => {}, childStates = { }, attrs = {}, listeners = {}, slots = () => ({}) }) => { - /** - * Maps from camelCase attribute name to kebap-case attribute name. - * @type {Object} - */ - const normalizedAttrs = {} - for (const key in attrs) { - normalizedAttrs[string.fromCamelCase(key, '-')] = key - } - const templateElement = template - ? /** @type {HTMLTemplateElement} */ (dom.parseElement(` - - `)) - : null - - class _Lib0Component extends HTMLElement { - /** - * @param {T} [state] - */ - constructor (state) { - super() - /** - * @type {Array<{d:Lib0Component, s:function(any, any):Object}>} - */ - this._childStates = [] - /** - * @type {Object} - */ - this._slots = {} - this._init = false - /** - * @type {any} - */ - this._internal = {} - /** - * @type {any} - */ - this.state = state || null - this.connected = false - // init shadow dom - if (templateElement) { - const shadow = /** @type {ShadowRoot} */ (this.attachShadow({ mode: 'open' })) - shadow.appendChild(templateElement.content.cloneNode(true)) - // fill child states - for (const key in childStates) { - this._childStates.push({ - d: /** @type {Lib0Component} */ (dom.querySelector(/** @type {any} */ (shadow), key)), - s: childStates[key] - }) - } - } - dom.emitCustomEvent(this, upgradedEventName, { bubbles: true }) - } - - connectedCallback () { - this.connected = true - if (!this._init) { - this._init = true - const shadow = this.shadowRoot - if (shadow) { - dom.addEventListener(shadow, upgradedEventName, event => { - this.setState(this.state, true) - event.stopPropagation() - }) - } - /** - * @type {Object} - */ - const startState = this.state || object.assign({}, defaultState) - if (attrs) { - for (const key in attrs) { - const normalizedKey = string.fromCamelCase(key, '-') - const val = parseAttrVal(this.getAttribute(normalizedKey), attrs[key]) - if (val) { - startState[key] = val - } - } - } - // add event listeners - for (const key in listeners) { - dom.addEventListener(shadow || this, key, event => { - if (listeners[key](/** @type {CustomEvent} */ (event), this) !== false) { - event.stopPropagation() - event.preventDefault() - return false - } - }) - } - // first setState call - this.state = null - this.setState(startState) - } - dom.emitCustomEvent(/** @type {any} */ (this.shadowRoot || this), connectedEventName, { bubbles: true }) - } - - disconnectedCallback () { - this.connected = false - dom.emitCustomEvent(/** @type {any} */ (this.shadowRoot || this), disconnectedEventName, { bubbles: true }) - this.setState(null) - } - - static get observedAttributes () { - return object.keys(normalizedAttrs) - } - - /** - * @param {string} name - * @param {string} oldVal - * @param {string} newVal - * - * @private - */ - attributeChangedCallback (name, oldVal, newVal) { - const curState = /** @type {any} */ (this.state) - const camelAttrName = normalizedAttrs[name] - const type = attrs[camelAttrName] - const parsedVal = parseAttrVal(newVal, type) - if (curState && (type !== 'json' || json.stringify(curState[camelAttrName]) !== newVal) && curState[camelAttrName] !== parsedVal && !number.isNaN(parsedVal)) { - this.updateState({ [camelAttrName]: parsedVal }) - } - } - - /** - * @param {any} stateUpdate - */ - updateState (stateUpdate) { - this.setState(object.assign({}, this.state, stateUpdate)) - } - - /** - * @param {any} state - */ - setState (state, forceStateUpdates = false) { - const prevState = this.state - this.state = state - if (this._init && (!func.equalityFlat(state, prevState) || forceStateUpdates)) { - // fill slots - if (state) { - const slotElems = slots(state, prevState, this) - for (const key in slotElems) { - const slotContent = slotElems[key] - if (this._slots[key] !== slotContent) { - this._slots[key] = slotContent - const currentSlots = /** @type {Array} */ (key !== 'default' ? array.from(dom.querySelectorAll(this, `[slot="${key}"]`)) : array.from(this.childNodes).filter(/** @param {any} child */ child => !dom.checkNodeType(child, dom.ELEMENT_NODE) || !child.hasAttribute('slot'))) - currentSlots.slice(1).map(dom.remove) - const nextSlot = dom.parseFragment(slotContent) - if (key !== 'default') { - array.from(nextSlot.children).forEach(c => c.setAttribute('slot', key)) - } - if (currentSlots.length > 0) { - dom.replaceWith(currentSlots[0], nextSlot) - } else { - dom.appendChild(this, nextSlot) - } - } - } - } - onStateChange(state, prevState, this) - if (state != null) { - this._childStates.forEach(cnf => { - const d = cnf.d - if (d.updateState) { - d.updateState(cnf.s(state, this)) - } - }) - } - for (const key in attrs) { - const normalizedKey = string.fromCamelCase(key, '-') - if (state == null) { - this.removeAttribute(normalizedKey) - } else { - const stateVal = state[key] - const attrsType = attrs[key] - if (!prevState || prevState[key] !== stateVal) { - if (attrsType === 'bool') { - if (stateVal) { - this.setAttribute(normalizedKey, '') - } else { - this.removeAttribute(normalizedKey) - } - } else if (stateVal == null && (attrsType === 'string' || attrsType === 'number')) { - this.removeAttribute(normalizedKey) - } else { - this.setAttribute(normalizedKey, encodeAttrVal(stateVal, attrsType)) - } - } - } - } - } - } - } - define(name, _Lib0Component) - // @ts-ignore - return _Lib0Component -} - -/** - * @param {function} definer function that defines a component when executed - */ -export const createComponentDefiner = definer => { - /** - * @type {any} - */ - let defined = null - return () => { - if (!defined) { - defined = definer() - } - return defined - } -} - -export const defineListComponent = createComponentDefiner(() => { - const ListItem = createComponent('lib0-list-item', { - template: '', - slots: state => ({ - content: `
${state}
` - }) - }) - return createComponent('lib0-list', { - state: { list: /** @type {Array} */ ([]), Item: ListItem }, - onStateChange: (state, prevState, component) => { - if (state == null) { - return - } - const { list = /** @type {Array} */ ([]), Item = ListItem } = state - // @todo deep compare here by providing another parameter to simpleDiffArray - let { index, remove, insert } = diff.simpleDiffArray(prevState ? prevState.list : [], list, func.equalityFlat) - if (remove === 0 && insert.length === 0) { - return - } - let child = /** @type {Lib0Component} */ (component.firstChild) - while (index-- > 0) { - child = /** @type {Lib0Component} */ (child.nextElementSibling) - } - let insertStart = 0 - while (insertStart < insert.length && remove-- > 0) { - // update existing state - child.setState(insert[insertStart++]) - child = /** @type {Lib0Component} */ (child.nextElementSibling) - } - while (remove-- > 0) { - // remove remaining - const prevChild = child - child = /** @type {Lib0Component} */ (child.nextElementSibling) - component.removeChild(prevChild) - } - // insert remaining - component.insertBefore(dom.fragment(insert.slice(insertStart).map(/** @param {any} insState */ insState => { - const el = new Item() - el.setState(insState) - return el - })), child) - } - }) -}) - -export const defineLazyLoadingComponent = createComponentDefiner(() => createComponent('lib0-lazy', { - state: /** @type {{component:null|String,import:null|function():Promise,state:null|object}} */ ({ - component: null, import: null, state: null - }), - attrs: { - component: 'string' - }, - onStateChange: ({ component, state, import: getImport }, prevState, componentEl) => { - if (component !== null) { - if (getImport) { - getImport() - } - if (!prevState || component !== prevState.component) { - const el = /** @type {any} */ (dom.createElement(component)) - componentEl.innerHTML = '' - componentEl.insertBefore(el, null) - } - const el = /** @type {any} */ (componentEl.firstElementChild) - // @todo generalize setting state and check if setState is defined - if (el.setState) { - el.setState(state) - } - } - } -})) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.d.ts deleted file mode 100644 index 0ed4306..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function undefinedToNull(v: T | null | undefined): T | null; -//# sourceMappingURL=conditions.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.d.ts.map deleted file mode 100644 index 0f764ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["conditions.js"],"names":[],"mappings":"AAYO,gCALM,CAAC,KACH,CAAC,GAAC,IAAI,GAAC,SAAS,GACf,CAAC,GAAC,IAAI,CAG4C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.js deleted file mode 100644 index f348e8a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Often used conditions. - * - * @module conditions - */ - -/** - * @template T - * @param {T|null|undefined} v - * @return {T|null} - */ -/* c8 ignore next */ -export const undefinedToNull = v => v === undefined ? null : v diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/coverage/tmp/coverage-70359-1766561372098-0.json b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/coverage/tmp/coverage-70359-1766561372098-0.json deleted file mode 100644 index 925f2ae..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/coverage/tmp/coverage-70359-1766561372098-0.json +++ /dev/null @@ -1 +0,0 @@ -{"result":[{"scriptId":"3","url":"node:internal/per_context/primordials","functions":[{"functionName":"SafeIterator","ranges":[{"startOffset":9162,"endOffset":9233,"count":3}],"isBlockCoverage":false},{"functionName":"next","ranges":[{"startOffset":9238,"endOffset":9287,"count":77}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":9292,"endOffset":9337,"count":2}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":10902,"endOffset":10969,"count":1}],"isBlockCoverage":false},{"functionName":"SafeMap","ranges":[{"startOffset":11627,"endOffset":11655,"count":2}],"isBlockCoverage":false},{"functionName":"SafeSet","ranges":[{"startOffset":11956,"endOffset":11984,"count":3}],"isBlockCoverage":false},{"functionName":"SafeFinalizationRegistry","ranges":[{"startOffset":12408,"endOffset":12464,"count":3}],"isBlockCoverage":false},{"functionName":"SafeWeakRef","ranges":[{"startOffset":12617,"endOffset":12655,"count":10}],"isBlockCoverage":false}]},{"scriptId":"6","url":"node:internal/bootstrap/realm","functions":[{"functionName":"internalBinding","ranges":[{"startOffset":6003,"endOffset":6265,"count":17}],"isBlockCoverage":false},{"functionName":"allowRequireByUsers","ranges":[{"startOffset":8452,"endOffset":8813,"count":1}],"isBlockCoverage":false},{"functionName":"canBeRequiredByUsers","ranges":[{"startOffset":9498,"endOffset":9573,"count":2}],"isBlockCoverage":false},{"functionName":"canBeRequiredWithoutScheme","ranges":[{"startOffset":9584,"endOffset":9678,"count":2}],"isBlockCoverage":false},{"functionName":"normalizeRequirableId","ranges":[{"startOffset":9689,"endOffset":10034,"count":1}],"isBlockCoverage":false},{"functionName":"getCanBeRequiredByUsersWithoutSchemeList","ranges":[{"startOffset":10297,"endOffset":10406,"count":1}],"isBlockCoverage":false},{"functionName":"compileForPublicLoader","ranges":[{"startOffset":10564,"endOffset":11227,"count":1}],"isBlockCoverage":false},{"functionName":"compileForInternalLoader","ranges":[{"startOffset":12509,"endOffset":13331,"count":162}],"isBlockCoverage":false},{"functionName":"requireBuiltin","ranges":[{"startOffset":13526,"endOffset":13891,"count":162}],"isBlockCoverage":false}]},{"scriptId":"7","url":"node:internal/errors","functions":[{"functionName":"defaultPrepareStackTrace","ranges":[{"startOffset":2323,"endOffset":2790,"count":1}],"isBlockCoverage":false},{"functionName":"setInternalPrepareStackTrace","ranges":[{"startOffset":2792,"endOffset":2883,"count":1}],"isBlockCoverage":false},{"functionName":"prepareStackTraceCallback","ranges":[{"startOffset":3709,"endOffset":4840,"count":1}],"isBlockCoverage":false},{"functionName":"ErrorPrepareStackTrace","ranges":[{"startOffset":4905,"endOffset":5004,"count":1}],"isBlockCoverage":false},{"functionName":"lazyInternalUtilInspect","ranges":[{"startOffset":6520,"endOffset":6648,"count":1}],"isBlockCoverage":false},{"functionName":"lazyUtilColors","ranges":[{"startOffset":6666,"endOffset":6766,"count":1}],"isBlockCoverage":false},{"functionName":"wrappedFn","ranges":[{"startOffset":14711,"endOffset":14917,"count":26}],"isBlockCoverage":false},{"functionName":"beforeInspector","ranges":[{"startOffset":24308,"endOffset":24699,"count":1}],"isBlockCoverage":false},{"functionName":"afterInspector","ranges":[{"startOffset":24703,"endOffset":25986,"count":1}],"isBlockCoverage":false}]},{"scriptId":"8","url":"node:internal/assert","functions":[{"functionName":"assert","ranges":[{"startOffset":128,"endOffset":278,"count":4}],"isBlockCoverage":false}]},{"scriptId":"9","url":"node:internal/bootstrap/node","functions":[{"functionName":"get","ranges":[{"startOffset":3830,"endOffset":3880,"count":1}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":3886,"endOffset":3944,"count":2}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":4128,"endOffset":4547,"count":2}],"isBlockCoverage":false}]},{"scriptId":"11","url":"node:internal/async_hooks","functions":[{"functionName":"clearDefaultTriggerAsyncId","ranges":[{"startOffset":15287,"endOffset":15376,"count":1}],"isBlockCoverage":false}]},{"scriptId":"12","url":"node:internal/validators","functions":[{"functionName":"","ranges":[{"startOffset":2438,"endOffset":2819,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":4381,"endOffset":4493,"count":20}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":5898,"endOffset":6012,"count":3}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":6594,"endOffset":7613,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":13109,"endOffset":13225,"count":1}],"isBlockCoverage":false}]},{"scriptId":"13","url":"node:internal/util","functions":[{"functionName":"isError","ranges":[{"startOffset":2012,"endOffset":2262,"count":1}],"isBlockCoverage":false},{"functionName":"exposeInterface","ranges":[{"startOffset":16386,"endOffset":16606,"count":1}],"isBlockCoverage":false},{"functionName":"defineLazyProperties","ranges":[{"startOffset":17105,"endOffset":18038,"count":2}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":17324,"endOffset":17467,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":17570,"endOffset":17766,"count":0}],"isBlockCoverage":false},{"functionName":"defineReplaceableLazyAttribute","ranges":[{"startOffset":18040,"endOffset":18940,"count":2}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":18252,"endOffset":18488,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":18593,"endOffset":18664,"count":0}],"isBlockCoverage":false},{"functionName":"exposeLazyInterfaces","ranges":[{"startOffset":18942,"endOffset":19042,"count":2}],"isBlockCoverage":false},{"functionName":"setOwnProperty","ranges":[{"startOffset":20237,"endOffset":20427,"count":3}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":22375,"endOffset":22503,"count":2}],"isBlockCoverage":false},{"functionName":"setupCoverageHooks","ranges":[{"startOffset":22631,"endOffset":23308,"count":1}],"isBlockCoverage":false},{"functionName":"guessHandleType","ranges":[{"startOffset":23381,"endOffset":23478,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":23500,"endOffset":24086,"count":10}],"isBlockCoverage":false},{"functionName":"WeakReference","ranges":[{"startOffset":23617,"endOffset":23684,"count":10}],"isBlockCoverage":false},{"functionName":"incRef","ranges":[{"startOffset":23688,"endOffset":23906,"count":0}],"isBlockCoverage":false},{"functionName":"decRef","ranges":[{"startOffset":23910,"endOffset":24038,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":24042,"endOffset":24084,"count":0}],"isBlockCoverage":false}]},{"scriptId":"14","url":"node:internal/options","functions":[{"functionName":"getCLIOptionsFromBinding","ranges":[{"startOffset":495,"endOffset":582,"count":63}],"isBlockCoverage":false},{"functionName":"getEmbedderOptions","ranges":[{"startOffset":671,"endOffset":766,"count":6}],"isBlockCoverage":false},{"functionName":"refreshOptions","ranges":[{"startOffset":768,"endOffset":824,"count":1}],"isBlockCoverage":false},{"functionName":"getOptionValue","ranges":[{"startOffset":826,"endOffset":914,"count":63}],"isBlockCoverage":false}]},{"scriptId":"18","url":"node:internal/util/inspect","functions":[{"functionName":"inspect","ranges":[{"startOffset":9465,"endOffset":11491,"count":1}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":11602,"endOffset":11647,"count":1}],"isBlockCoverage":false},{"functionName":"isInstanceof","ranges":[{"startOffset":17811,"endOffset":17929,"count":1}],"isBlockCoverage":false},{"functionName":"getConstructorName","ranges":[{"startOffset":18668,"endOffset":20421,"count":1}],"isBlockCoverage":false},{"functionName":"getKeys","ranges":[{"startOffset":22960,"endOffset":23951,"count":1}],"isBlockCoverage":false},{"functionName":"filter","ranges":[{"startOffset":23791,"endOffset":23847,"count":0}],"isBlockCoverage":false},{"functionName":"formatValue","ranges":[{"startOffset":24850,"endOffset":27650,"count":1}],"isBlockCoverage":false},{"functionName":"formatRaw","ranges":[{"startOffset":27652,"endOffset":38746,"count":1}],"isBlockCoverage":false},{"functionName":"getStackString","ranges":[{"startOffset":42648,"endOffset":42869,"count":1}],"isBlockCoverage":false},{"functionName":"getStackFrames","ranges":[{"startOffset":42871,"endOffset":43767,"count":1}],"isBlockCoverage":false},{"functionName":"improveStack","ranges":[{"startOffset":43866,"endOffset":45254,"count":1}],"isBlockCoverage":false},{"functionName":"removeDuplicateErrorKeys","ranges":[{"startOffset":45256,"endOffset":45730,"count":1}],"isBlockCoverage":false},{"functionName":"formatError","ranges":[{"startOffset":47335,"endOffset":49727,"count":1}],"isBlockCoverage":false}]},{"scriptId":"19","url":"node:internal/util/debuglog","functions":[{"functionName":"initializeDebugEnv","ranges":[{"startOffset":832,"endOffset":1305,"count":1}],"isBlockCoverage":false},{"functionName":"testEnabled","ranges":[{"startOffset":1199,"endOffset":1256,"count":0}],"isBlockCoverage":false},{"functionName":"testEnabled","ranges":[{"startOffset":1287,"endOffset":1298,"count":3}],"isBlockCoverage":false},{"functionName":"emitWarningIfNeeded","ranges":[{"startOffset":1379,"endOffset":1718,"count":1}],"isBlockCoverage":false},{"functionName":"noop","ranges":[{"startOffset":1733,"endOffset":1741,"count":2}],"isBlockCoverage":false},{"functionName":"debuglogImpl","ranges":[{"startOffset":1862,"endOffset":2426,"count":2}],"isBlockCoverage":false},{"functionName":"debug","ranges":[{"startOffset":2051,"endOffset":2344,"count":0}],"isBlockCoverage":false},{"functionName":"debuglog","ranges":[{"startOffset":2646,"endOffset":3672,"count":1}],"isBlockCoverage":false},{"functionName":"init","ranges":[{"startOffset":2677,"endOffset":2773,"count":2}],"isBlockCoverage":false},{"functionName":"debug","ranges":[{"startOffset":2788,"endOffset":3182,"count":2}],"isBlockCoverage":false},{"functionName":"test","ranges":[{"startOffset":3212,"endOffset":3281,"count":0}],"isBlockCoverage":false},{"functionName":"logger","ranges":[{"startOffset":3300,"endOffset":3495,"count":2}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":3566,"endOffset":3600,"count":0}],"isBlockCoverage":false},{"functionName":"ensureTimerFlagsAreUpdated","ranges":[{"startOffset":9664,"endOffset":9817,"count":1}],"isBlockCoverage":false},{"functionName":"internalEndTimer","ranges":[{"startOffset":10204,"endOffset":10532,"count":1}],"isBlockCoverage":false},{"functionName":"init","ranges":[{"startOffset":10920,"endOffset":11418,"count":1}],"isBlockCoverage":false},{"functionName":"startTimer","ranges":[{"startOffset":11477,"endOffset":11627,"count":1}],"isBlockCoverage":false}]},{"scriptId":"22","url":"node:events","functions":[{"functionName":"EventEmitter","ranges":[{"startOffset":6589,"endOffset":6658,"count":1}],"isBlockCoverage":false},{"functionName":"checkListener","ranges":[{"startOffset":8109,"endOffset":8187,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":9985,"endOffset":10633,"count":1}],"isBlockCoverage":false},{"functionName":"emit","ranges":[{"startOffset":13430,"endOffset":15722,"count":4}],"isBlockCoverage":false},{"functionName":"_addListener","ranges":[{"startOffset":15725,"endOffset":17641,"count":1}],"isBlockCoverage":false},{"functionName":"addListener","ranges":[{"startOffset":17819,"endOffset":17911,"count":1}],"isBlockCoverage":false},{"functionName":"arrayClone","ranges":[{"startOffset":25312,"endOffset":25785,"count":1}],"isBlockCoverage":false}]},{"scriptId":"24","url":"node:buffer","functions":[{"functionName":"get","ranges":[{"startOffset":8399,"endOffset":8427,"count":1}],"isBlockCoverage":false}]},{"scriptId":"25","url":"node:internal/buffer","functions":[{"functionName":"reconnectZeroFillToggle","ranges":[{"startOffset":31899,"endOffset":31971,"count":1}],"isBlockCoverage":false}]},{"scriptId":"26","url":"node:internal/worker/js_transferable","functions":[{"functionName":"markTransferMode","ranges":[{"startOffset":2750,"endOffset":3148,"count":1}],"isBlockCoverage":false}]},{"scriptId":"28","url":"node:internal/process/per_thread","functions":[{"functionName":"toggleTraceCategoryState","ranges":[{"startOffset":12288,"endOffset":12571,"count":1}],"isBlockCoverage":false}]},{"scriptId":"30","url":"node:internal/process/promises","functions":[{"functionName":"","ranges":[{"startOffset":1335,"endOffset":1447,"count":1}],"isBlockCoverage":false}]},{"scriptId":"34","url":"node:internal/process/execution","functions":[{"functionName":"tryGetCwd","ranges":[{"startOffset":1136,"endOffset":1466,"count":2}],"isBlockCoverage":false},{"functionName":"evalScript","ranges":[{"startOffset":2178,"endOffset":3231,"count":1}],"isBlockCoverage":false},{"functionName":"evalFunction","ranges":[{"startOffset":2657,"endOffset":3092,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":4938,"endOffset":6489,"count":1}],"isBlockCoverage":false},{"functionName":"compileScript","ranges":[{"startOffset":13914,"endOffset":14707,"count":1}],"isBlockCoverage":false},{"functionName":"importModuleDynamically","ranges":[{"startOffset":14006,"endOffset":14253,"count":0}],"isBlockCoverage":false},{"functionName":"shouldUseModuleEntryPoint","ranges":[{"startOffset":14907,"endOffset":15181,"count":1}],"isBlockCoverage":false},{"functionName":"createModule","ranges":[{"startOffset":15330,"endOffset":15602,"count":1}],"isBlockCoverage":false},{"functionName":"runScriptInContext","ranges":[{"startOffset":16115,"endOffset":17042,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":16648,"endOffset":16836,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":16934,"endOffset":16966,"count":0}],"isBlockCoverage":false}]},{"scriptId":"35","url":"node:path","functions":[{"functionName":"isPosixPathSeparator","ranges":[{"startOffset":2070,"endOffset":2147,"count":293}],"isBlockCoverage":false},{"functionName":"normalizeString","ranges":[{"startOffset":2382,"endOffset":4330,"count":8}],"isBlockCoverage":false},{"functionName":"resolve","ranges":[{"startOffset":36644,"endOffset":37748,"count":7}],"isBlockCoverage":false},{"functionName":"normalize","ranges":[{"startOffset":37814,"endOffset":38427,"count":1}],"isBlockCoverage":false},{"functionName":"join","ranges":[{"startOffset":38719,"endOffset":39083,"count":1}],"isBlockCoverage":false},{"functionName":"dirname","ranges":[{"startOffset":41741,"endOffset":42417,"count":3}],"isBlockCoverage":false}]},{"scriptId":"36","url":"node:internal/url","functions":[{"functionName":"","ranges":[{"startOffset":3563,"endOffset":4335,"count":1}],"isBlockCoverage":false},{"functionName":"get hasPort","ranges":[{"startOffset":4114,"endOffset":4179,"count":0}],"isBlockCoverage":false},{"functionName":"get hasSearch","ranges":[{"startOffset":4183,"endOffset":4258,"count":0}],"isBlockCoverage":false},{"functionName":"get hasHash","ranges":[{"startOffset":4262,"endOffset":4333,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":22444,"endOffset":33908,"count":1}],"isBlockCoverage":false},{"functionName":"setURLSearchParamsModified","ranges":[{"startOffset":22564,"endOffset":23052,"count":0}],"isBlockCoverage":false},{"functionName":"URL","ranges":[{"startOffset":23061,"endOffset":23966,"count":1}],"isBlockCoverage":false},{"functionName":"parse","ranges":[{"startOffset":23977,"endOffset":24219,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":24223,"endOffset":24943,"count":0}],"isBlockCoverage":false},{"functionName":"#getSearchFromContext","ranges":[{"startOffset":24947,"endOffset":25281,"count":0}],"isBlockCoverage":false},{"functionName":"#getSearchFromParams","ranges":[{"startOffset":25285,"endOffset":25396,"count":0}],"isBlockCoverage":false},{"functionName":"#ensureSearchParamsUpdated","ranges":[{"startOffset":25400,"endOffset":25839,"count":1}],"isBlockCoverage":false},{"functionName":"#updateContext","ranges":[{"startOffset":26087,"endOffset":27732,"count":1}],"isBlockCoverage":false},{"functionName":"toString","ranges":[{"startOffset":27736,"endOffset":27921,"count":0}],"isBlockCoverage":false},{"functionName":"get href","ranges":[{"startOffset":27925,"endOffset":28110,"count":1}],"isBlockCoverage":false},{"functionName":"set href","ranges":[{"startOffset":28114,"endOffset":28333,"count":0}],"isBlockCoverage":false},{"functionName":"get origin","ranges":[{"startOffset":28351,"endOffset":29220,"count":0}],"isBlockCoverage":false},{"functionName":"get protocol","ranges":[{"startOffset":29224,"endOffset":29328,"count":0}],"isBlockCoverage":false},{"functionName":"set protocol","ranges":[{"startOffset":29332,"endOffset":29505,"count":0}],"isBlockCoverage":false},{"functionName":"get username","ranges":[{"startOffset":29509,"endOffset":29736,"count":0}],"isBlockCoverage":false},{"functionName":"set username","ranges":[{"startOffset":29740,"endOffset":29913,"count":0}],"isBlockCoverage":false},{"functionName":"get password","ranges":[{"startOffset":29917,"endOffset":30140,"count":0}],"isBlockCoverage":false},{"functionName":"set password","ranges":[{"startOffset":30144,"endOffset":30317,"count":0}],"isBlockCoverage":false},{"functionName":"get host","ranges":[{"startOffset":30321,"endOffset":30752,"count":0}],"isBlockCoverage":false},{"functionName":"set host","ranges":[{"startOffset":30756,"endOffset":30921,"count":0}],"isBlockCoverage":false},{"functionName":"get hostname","ranges":[{"startOffset":30925,"endOffset":31207,"count":0}],"isBlockCoverage":false},{"functionName":"set hostname","ranges":[{"startOffset":31211,"endOffset":31384,"count":0}],"isBlockCoverage":false},{"functionName":"get port","ranges":[{"startOffset":31388,"endOffset":31496,"count":0}],"isBlockCoverage":false},{"functionName":"set port","ranges":[{"startOffset":31500,"endOffset":31665,"count":0}],"isBlockCoverage":false},{"functionName":"get pathname","ranges":[{"startOffset":31669,"endOffset":31961,"count":0}],"isBlockCoverage":false},{"functionName":"set pathname","ranges":[{"startOffset":31965,"endOffset":32138,"count":0}],"isBlockCoverage":false},{"functionName":"get search","ranges":[{"startOffset":32142,"endOffset":32339,"count":0}],"isBlockCoverage":false},{"functionName":"set search","ranges":[{"startOffset":32343,"endOffset":32547,"count":0}],"isBlockCoverage":false},{"functionName":"get searchParams","ranges":[{"startOffset":32565,"endOffset":32923,"count":0}],"isBlockCoverage":false},{"functionName":"get hash","ranges":[{"startOffset":32927,"endOffset":33142,"count":0}],"isBlockCoverage":false},{"functionName":"set hash","ranges":[{"startOffset":33146,"endOffset":33311,"count":0}],"isBlockCoverage":false},{"functionName":"toJSON","ranges":[{"startOffset":33315,"endOffset":33498,"count":0}],"isBlockCoverage":false},{"functionName":"canParse","ranges":[{"startOffset":33509,"endOffset":33906,"count":0}],"isBlockCoverage":false},{"functionName":"pathToFileURL","ranges":[{"startOffset":44127,"endOffset":45978,"count":1}],"isBlockCoverage":false}]},{"scriptId":"40","url":"node:internal/vm","functions":[{"functionName":"makeContextifyScript","ranges":[{"startOffset":6642,"endOffset":7818,"count":1}],"isBlockCoverage":false}]},{"scriptId":"42","url":"node:internal/source_map/source_map_cache","functions":[{"functionName":"setSourceMapsSupport","ranges":[{"startOffset":2067,"endOffset":2836,"count":1}],"isBlockCoverage":false}]},{"scriptId":"43","url":"node:internal/modules/helpers","functions":[{"functionName":"","ranges":[{"startOffset":1339,"endOffset":1364,"count":1}],"isBlockCoverage":false},{"functionName":"initializeCjsConditions","ranges":[{"startOffset":2081,"endOffset":2572,"count":1}],"isBlockCoverage":false},{"functionName":"loadBuiltinModule","ranges":[{"startOffset":2993,"endOffset":3373,"count":1}],"isBlockCoverage":false},{"functionName":"lazyModule","ranges":[{"startOffset":3466,"endOffset":3559,"count":1}],"isBlockCoverage":false},{"functionName":"makeRequireFunction","ranges":[{"startOffset":3782,"endOffset":4860,"count":1}],"isBlockCoverage":false},{"functionName":"require","ranges":[{"startOffset":3977,"endOffset":4035,"count":0}],"isBlockCoverage":false},{"functionName":"resolve","ranges":[{"startOffset":4216,"endOffset":4362,"count":0}],"isBlockCoverage":false},{"functionName":"paths","ranges":[{"startOffset":4507,"endOffset":4629,"count":0}],"isBlockCoverage":false},{"functionName":"addBuiltinLibsToObject","ranges":[{"startOffset":5500,"endOffset":7439,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":5999,"endOffset":7435,"count":68}],"isBlockCoverage":false},{"functionName":"setReal","ranges":[{"startOffset":6593,"endOffset":6763,"count":1}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":6841,"endOffset":7351,"count":1}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":7107,"endOffset":7116,"count":0}],"isBlockCoverage":false},{"functionName":"hasStartedUserCJSExecution","ranges":[{"startOffset":12928,"endOffset":13002,"count":1}],"isBlockCoverage":false},{"functionName":"setHasStartedUserCJSExecution","ranges":[{"startOffset":13006,"endOffset":13083,"count":1}],"isBlockCoverage":false},{"functionName":"hasStartedUserESMExecution","ranges":[{"startOffset":13087,"endOffset":13161,"count":1}],"isBlockCoverage":false}]},{"scriptId":"55","url":"node:internal/console/constructor","functions":[{"functionName":"value","ranges":[{"startOffset":5822,"endOffset":6401,"count":1}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":6031,"endOffset":6095,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":6107,"endOffset":6137,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":6267,"endOffset":6331,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":6343,"endOffset":6373,"count":0}],"isBlockCoverage":false},{"functionName":"initializeGlobalConsole","ranges":[{"startOffset":19660,"endOffset":20650,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":20545,"endOffset":20646,"count":0}],"isBlockCoverage":false}]},{"scriptId":"56","url":"node:diagnostics_channel","functions":[{"functionName":"set","ranges":[{"startOffset":930,"endOffset":1047,"count":10}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":1051,"endOffset":1099,"count":10}],"isBlockCoverage":false},{"functionName":"Channel","ranges":[{"startOffset":4074,"endOffset":4215,"count":10}],"isBlockCoverage":false},{"functionName":"get hasSubscribers","ranges":[{"startOffset":4683,"endOffset":4727,"count":5}],"isBlockCoverage":false},{"functionName":"channel","ranges":[{"startOffset":4874,"endOffset":5140,"count":10}],"isBlockCoverage":false},{"functionName":"tracingChannelFrom","ranges":[{"startOffset":5698,"endOffset":6223,"count":10}],"isBlockCoverage":false},{"functionName":"TracingChannel","ranges":[{"startOffset":6250,"endOffset":6523,"count":2}],"isBlockCoverage":false},{"functionName":"get hasSubscribers","ranges":[{"startOffset":6527,"endOffset":6742,"count":1}],"isBlockCoverage":false},{"functionName":"traceSync","ranges":[{"startOffset":7235,"endOffset":7746,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":7445,"endOffset":7740,"count":0}],"isBlockCoverage":false},{"functionName":"tracingChannel","ranges":[{"startOffset":10037,"endOffset":10125,"count":2}],"isBlockCoverage":false}]},{"scriptId":"58","url":"node:internal/event_target","functions":[{"functionName":"defineEventHandler","ranges":[{"startOffset":29797,"endOffset":31263,"count":1}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":29957,"endOffset":30093,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":30192,"endOffset":31030,"count":0}],"isBlockCoverage":false}]},{"scriptId":"61","url":"node:internal/bootstrap/switches/is_main_thread","functions":[{"functionName":"createWritableStdioStream","ranges":[{"startOffset":1428,"endOffset":3030,"count":1}],"isBlockCoverage":false},{"functionName":"write","ranges":[{"startOffset":2845,"endOffset":2892,"count":0}],"isBlockCoverage":false},{"functionName":"addCleanup","ranges":[{"startOffset":3643,"endOffset":3734,"count":1}],"isBlockCoverage":false},{"functionName":"getStderr","ranges":[{"startOffset":4430,"endOffset":5121,"count":2}],"isBlockCoverage":false},{"functionName":"cleanupStderr","ranges":[{"startOffset":4787,"endOffset":4965,"count":0}],"isBlockCoverage":false}]},{"scriptId":"62","url":"node:internal/v8/startup_snapshot","functions":[{"functionName":"isBuildingSnapshot","ranges":[{"startOffset":433,"endOffset":504,"count":5}],"isBlockCoverage":false},{"functionName":"runDeserializeCallbacks","ranges":[{"startOffset":831,"endOffset":1004,"count":1}],"isBlockCoverage":false}]},{"scriptId":"63","url":"node:internal/process/signal","functions":[{"functionName":"isSignal","ranges":[{"startOffset":238,"endOffset":334,"count":1}],"isBlockCoverage":false},{"functionName":"startListeningIfSignal","ranges":[{"startOffset":398,"endOffset":908,"count":1}],"isBlockCoverage":false}]},{"scriptId":"65","url":"node:internal/modules/cjs/loader","functions":[{"functionName":"","ranges":[{"startOffset":4762,"endOffset":4805,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":5473,"endOffset":5532,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":5621,"endOffset":5659,"count":1}],"isBlockCoverage":false},{"functionName":"wrapModuleLoad","ranges":[{"startOffset":5894,"endOffset":6321,"count":1}],"isBlockCoverage":false},{"functionName":"updateChildren","ranges":[{"startOffset":7420,"endOffset":7622,"count":2}],"isBlockCoverage":false},{"functionName":"reportModuleToWatchMode","ranges":[{"startOffset":7739,"endOffset":7895,"count":1}],"isBlockCoverage":false},{"functionName":"Module","ranges":[{"startOffset":8409,"endOffset":8672,"count":2}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":10621,"endOffset":10646,"count":1}],"isBlockCoverage":false},{"functionName":"initializeCJS","ranges":[{"startOffset":11366,"endOffset":12170,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":25341,"endOffset":26529,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":31073,"endOffset":34951,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":35413,"endOffset":38275,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":40770,"endOffset":41071,"count":1}],"isBlockCoverage":false},{"functionName":"wrapSafe","ranges":[{"startOffset":46662,"endOffset":48669,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":49118,"endOffset":50869,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":59075,"endOffset":60040,"count":1}],"isBlockCoverage":false}]},{"scriptId":"67","url":"node:internal/modules/esm/utils","functions":[{"functionName":"initializeDefaultConditions","ranges":[{"startOffset":1785,"endOffset":2290,"count":1}],"isBlockCoverage":false},{"functionName":"initializeESM","ranges":[{"startOffset":10602,"endOffset":10988,"count":1}],"isBlockCoverage":false}]},{"scriptId":"68","url":"node:internal/process/pre_execution","functions":[{"functionName":"prepareMainThreadExecution","ranges":[{"startOffset":1056,"endOffset":1240,"count":1}],"isBlockCoverage":false},{"functionName":"prepareExecution","ranges":[{"startOffset":2420,"endOffset":4520,"count":1}],"isBlockCoverage":false},{"functionName":"setupSymbolDisposePolyfill","ranges":[{"startOffset":4522,"endOffset":5257,"count":1}],"isBlockCoverage":false},{"functionName":"setupUserModules","ranges":[{"startOffset":5259,"endOffset":6007,"count":1}],"isBlockCoverage":false},{"functionName":"refreshRuntimeOptions","ranges":[{"startOffset":6009,"endOffset":6065,"count":1}],"isBlockCoverage":false},{"functionName":"patchProcessObject","ranges":[{"startOffset":6492,"endOffset":8829,"count":1}],"isBlockCoverage":false},{"functionName":"addReadOnlyProcessAlias","ranges":[{"startOffset":8831,"endOffset":9112,"count":13}],"isBlockCoverage":false},{"functionName":"setupWarningHandler","ranges":[{"startOffset":9114,"endOffset":9634,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":9518,"endOffset":9620,"count":0}],"isBlockCoverage":false},{"functionName":"setupUndici","ranges":[{"startOffset":9709,"endOffset":10038,"count":1}],"isBlockCoverage":false},{"functionName":"setupEventsource","ranges":[{"startOffset":10106,"endOffset":10231,"count":1}],"isBlockCoverage":false},{"functionName":"setupNavigator","ranges":[{"startOffset":10335,"endOffset":10736,"count":1}],"isBlockCoverage":false},{"functionName":"setupWebCrypto","ranges":[{"startOffset":10840,"endOffset":11792,"count":1}],"isBlockCoverage":false},{"functionName":"cryptoThisCheck","ranges":[{"startOffset":11166,"endOffset":11342,"count":0}],"isBlockCoverage":false},{"functionName":"get crypto","ranges":[{"startOffset":11643,"endOffset":11742,"count":0}],"isBlockCoverage":false},{"functionName":"setupSQLite","ranges":[{"startOffset":11794,"endOffset":12001,"count":1}],"isBlockCoverage":false},{"functionName":"setupWebStorage","ranges":[{"startOffset":12003,"endOffset":12408,"count":1}],"isBlockCoverage":false},{"functionName":"setupCodeCoverage","ranges":[{"startOffset":12410,"endOffset":12931,"count":1}],"isBlockCoverage":false},{"functionName":"setupCustomEvent","ranges":[{"startOffset":13037,"endOffset":13314,"count":1}],"isBlockCoverage":false},{"functionName":"setupStacktracePrinterOnSigint","ranges":[{"startOffset":13316,"endOffset":13541,"count":1}],"isBlockCoverage":false},{"functionName":"initializeReport","ranges":[{"startOffset":13543,"endOffset":13792,"count":1}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":13688,"endOffset":13783,"count":0}],"isBlockCoverage":false},{"functionName":"setupDebugEnv","ranges":[{"startOffset":13794,"endOffset":14025,"count":1}],"isBlockCoverage":false},{"functionName":"initializeReportSignalHandlers","ranges":[{"startOffset":14087,"endOffset":14275,"count":1}],"isBlockCoverage":false},{"functionName":"initializeHeapSnapshotSignalHandlers","ranges":[{"startOffset":14277,"endOffset":15011,"count":1}],"isBlockCoverage":false},{"functionName":"doWriteHeapSnapshot","ranges":[{"startOffset":14585,"endOffset":14739,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":14931,"endOffset":15003,"count":0}],"isBlockCoverage":false},{"functionName":"setupTraceCategoryState","ranges":[{"startOffset":15013,"endOffset":15272,"count":1}],"isBlockCoverage":false},{"functionName":"setupInspectorHooks","ranges":[{"startOffset":15274,"endOffset":15856,"count":1}],"isBlockCoverage":false},{"functionName":"setupNetworkInspection","ranges":[{"startOffset":15858,"endOffset":16171,"count":1}],"isBlockCoverage":false},{"functionName":"initializeDeprecations","ranges":[{"startOffset":16366,"endOffset":18268,"count":1}],"isBlockCoverage":false},{"functionName":"setupChildProcessIpcChannel","ranges":[{"startOffset":18270,"endOffset":18787,"count":1}],"isBlockCoverage":false},{"functionName":"initializeClusterIPC","ranges":[{"startOffset":18789,"endOffset":19059,"count":1}],"isBlockCoverage":false},{"functionName":"initializePermission","ranges":[{"startOffset":19061,"endOffset":20965,"count":1}],"isBlockCoverage":false},{"functionName":"binding","ranges":[{"startOffset":19190,"endOffset":19277,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":20810,"endOffset":20957,"count":6}],"isBlockCoverage":false},{"functionName":"initializeCJSLoader","ranges":[{"startOffset":20967,"endOffset":21088,"count":1}],"isBlockCoverage":false},{"functionName":"initializeESMLoader","ranges":[{"startOffset":21090,"endOffset":21673,"count":1}],"isBlockCoverage":false},{"functionName":"initializeSourceMapsHandlers","ranges":[{"startOffset":21675,"endOffset":22181,"count":1}],"isBlockCoverage":false},{"functionName":"initializeFrozenIntrinsics","ranges":[{"startOffset":22183,"endOffset":22370,"count":1}],"isBlockCoverage":false},{"functionName":"loadPreloadModules","ranges":[{"startOffset":22477,"endOffset":22825,"count":1}],"isBlockCoverage":false},{"functionName":"markBootstrapComplete","ranges":[{"startOffset":22827,"endOffset":22921,"count":1}],"isBlockCoverage":false}]},{"scriptId":"71","url":"node:internal/dns/utils","functions":[{"functionName":"initializeDns","ranges":[{"startOffset":5465,"endOffset":5946,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":5886,"endOffset":5942,"count":0}],"isBlockCoverage":false}]},{"scriptId":"73","url":"node:internal/bootstrap/switches/does_own_process_state","functions":[{"functionName":"wrappedCwd","ranges":[{"startOffset":3731,"endOffset":3834,"count":2}],"isBlockCoverage":false}]},{"scriptId":"74","url":"node:internal/main/eval_string","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":2738,"count":1}],"isBlockCoverage":false},{"functionName":"setReal","ranges":[{"startOffset":1837,"endOffset":2007,"count":0}],"isBlockCoverage":false}]},{"scriptId":"75","url":"node:module","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":1121,"count":1}],"isBlockCoverage":false}]},{"scriptId":"76","url":"node:internal/modules/esm/loader","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":36514,"count":1}],"isBlockCoverage":false},{"functionName":"newResolveCache","ranges":[{"startOffset":1705,"endOffset":1835,"count":0}],"isBlockCoverage":false},{"functionName":"newLoadCache","ranges":[{"startOffset":1989,"endOffset":2110,"count":0}],"isBlockCoverage":false},{"functionName":"getTranslators","ranges":[{"startOffset":2272,"endOffset":2394,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":3167,"endOffset":29227,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":29310,"endOffset":31908,"count":0}],"isBlockCoverage":false},{"functionName":"createModuleLoader","ranges":[{"startOffset":32292,"endOffset":33916,"count":0}],"isBlockCoverage":false},{"functionName":"getHooksProxy","ranges":[{"startOffset":34029,"endOffset":34205,"count":0}],"isBlockCoverage":false},{"functionName":"getOrInitializeCascadedLoader","ranges":[{"startOffset":34707,"endOffset":34819,"count":0}],"isBlockCoverage":false},{"functionName":"register","ranges":[{"startOffset":36061,"endOffset":36406,"count":0}],"isBlockCoverage":false}]},{"scriptId":"77","url":"node:internal/modules/esm/assert","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":3875,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":1301,"endOffset":1342,"count":5}],"isBlockCoverage":true},{"functionName":"validateAttributes","ranges":[{"startOffset":1763,"endOffset":3145,"count":0}],"isBlockCoverage":false},{"functionName":"handleInvalidType","ranges":[{"startOffset":3379,"endOffset":3802,"count":0}],"isBlockCoverage":false}]},{"scriptId":"78","url":"node:internal/source_map/source_map","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":12164,"count":1}],"isBlockCoverage":false},{"functionName":"StringCharIterator","ranges":[{"startOffset":4050,"endOffset":4126,"count":0}],"isBlockCoverage":false},{"functionName":"next","ranges":[{"startOffset":4164,"endOffset":4242,"count":0}],"isBlockCoverage":false},{"functionName":"peek","ranges":[{"startOffset":4280,"endOffset":4356,"count":0}],"isBlockCoverage":false},{"functionName":"hasNext","ranges":[{"startOffset":4395,"endOffset":4459,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":4616,"endOffset":10114,"count":0}],"isBlockCoverage":false},{"functionName":"isSeparator","ranges":[{"startOffset":10169,"endOffset":10238,"count":0}],"isBlockCoverage":false},{"functionName":"decodeVLQ","ranges":[{"startOffset":10328,"endOffset":11261,"count":0}],"isBlockCoverage":false},{"functionName":"cloneSourceMapV3","ranges":[{"startOffset":11328,"endOffset":11640,"count":0}],"isBlockCoverage":false},{"functionName":"compareSourceMapEntry","ranges":[{"startOffset":11835,"endOffset":12114,"count":0}],"isBlockCoverage":false}]},{"scriptId":"80","url":"[eval]-wrapper","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":182,"count":1}],"isBlockCoverage":true},{"functionName":"","ranges":[{"startOffset":160,"endOffset":176,"count":1}],"isBlockCoverage":true}]},{"scriptId":"82","url":"node:internal/util/colors","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":1136,"count":1}],"isBlockCoverage":false},{"functionName":"lazyInternalTTY","ranges":[{"startOffset":32,"endOffset":127,"count":0}],"isBlockCoverage":false},{"functionName":"shouldColorize","ranges":[{"startOffset":257,"endOffset":517,"count":2},{"startOffset":329,"endOffset":388,"count":0},{"startOffset":414,"endOffset":512,"count":0}],"isBlockCoverage":true},{"functionName":"refresh","ranges":[{"startOffset":521,"endOffset":1104,"count":1},{"startOffset":638,"endOffset":652,"count":0},{"startOffset":696,"endOffset":710,"count":0},{"startOffset":754,"endOffset":768,"count":0},{"startOffset":813,"endOffset":827,"count":0},{"startOffset":869,"endOffset":883,"count":0},{"startOffset":926,"endOffset":940,"count":0},{"startOffset":984,"endOffset":995,"count":0},{"startOffset":1039,"endOffset":1052,"count":0}],"isBlockCoverage":true}]},{"scriptId":"83","url":"node:internal/fs/sync_write_stream","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":1085,"count":1}],"isBlockCoverage":false},{"functionName":"SyncWriteStream","ranges":[{"startOffset":221,"endOffset":469,"count":1},{"startOffset":440,"endOffset":446,"count":0}],"isBlockCoverage":true},{"functionName":"SyncWriteStream._write","ranges":[{"startOffset":625,"endOffset":765,"count":0}],"isBlockCoverage":false},{"functionName":"SyncWriteStream._destroy","ranges":[{"startOffset":805,"endOffset":970,"count":0}],"isBlockCoverage":false}]},{"scriptId":"84","url":"node:stream","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":5095,"count":1}],"isBlockCoverage":false},{"functionName":"fn","ranges":[{"startOffset":2552,"endOffset":2712,"count":0}],"isBlockCoverage":false},{"functionName":"fn","ranges":[{"startOffset":3214,"endOffset":3352,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":4400,"endOffset":4432,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":4530,"endOffset":4571,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":4664,"endOffset":4705,"count":0}],"isBlockCoverage":false},{"functionName":"_uint8ArrayToBuffer","ranges":[{"startOffset":4886,"endOffset":5093,"count":0}],"isBlockCoverage":false}]},{"scriptId":"85","url":"node:internal/streams/operators","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":10140,"count":1}],"isBlockCoverage":false},{"functionName":"compose","ranges":[{"startOffset":971,"endOffset":1551,"count":0}],"isBlockCoverage":false},{"functionName":"map","ranges":[{"startOffset":1553,"endOffset":4656,"count":0}],"isBlockCoverage":false},{"functionName":"some","ranges":[{"startOffset":4658,"endOffset":4806,"count":0}],"isBlockCoverage":false},{"functionName":"every","ranges":[{"startOffset":4808,"endOffset":5136,"count":0}],"isBlockCoverage":false},{"functionName":"find","ranges":[{"startOffset":5138,"endOffset":5280,"count":0}],"isBlockCoverage":false},{"functionName":"forEach","ranges":[{"startOffset":5282,"endOffset":5652,"count":0}],"isBlockCoverage":false},{"functionName":"filter","ranges":[{"startOffset":5654,"endOffset":5981,"count":0}],"isBlockCoverage":false},{"functionName":"ReduceAwareErrMissingArgs","ranges":[{"startOffset":6197,"endOffset":6311,"count":0}],"isBlockCoverage":false},{"functionName":"reduce","ranges":[{"startOffset":6315,"endOffset":7757,"count":0}],"isBlockCoverage":false},{"functionName":"toArray","ranges":[{"startOffset":7759,"endOffset":8188,"count":0}],"isBlockCoverage":false},{"functionName":"flatMap","ranges":[{"startOffset":8190,"endOffset":8384,"count":0}],"isBlockCoverage":false},{"functionName":"toIntegerOrInfinity","ranges":[{"startOffset":8386,"endOffset":8708,"count":0}],"isBlockCoverage":false},{"functionName":"drop","ranges":[{"startOffset":8710,"endOffset":9258,"count":0}],"isBlockCoverage":false},{"functionName":"take","ranges":[{"startOffset":9260,"endOffset":9930,"count":0}],"isBlockCoverage":false}]},{"scriptId":"86","url":"node:internal/abort_controller","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":15245,"count":1}],"isBlockCoverage":false},{"functionName":"lazyMessageChannel","ranges":[{"startOffset":1746,"endOffset":1879,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":2023,"endOffset":2272,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":2386,"endOffset":2799,"count":0}],"isBlockCoverage":false},{"functionName":"customInspect","ranges":[{"startOffset":3154,"endOffset":3413,"count":0}],"isBlockCoverage":false},{"functionName":"validateThisAbortSignal","ranges":[{"startOffset":3415,"endOffset":3540,"count":0}],"isBlockCoverage":false},{"functionName":"setWeakAbortSignalTimeout","ranges":[{"startOffset":4122,"endOffset":4522,"count":0}],"isBlockCoverage":false},{"functionName":"AbortSignal","ranges":[{"startOffset":4782,"endOffset":5293,"count":0}],"isBlockCoverage":false},{"functionName":"get aborted","ranges":[{"startOffset":5330,"endOffset":5413,"count":0}],"isBlockCoverage":false},{"functionName":"get reason","ranges":[{"startOffset":5446,"endOffset":5525,"count":0}],"isBlockCoverage":false},{"functionName":"throwIfAborted","ranges":[{"startOffset":5529,"endOffset":5645,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":5649,"endOffset":5778,"count":0}],"isBlockCoverage":false},{"functionName":"abort","ranges":[{"startOffset":5856,"endOffset":6016,"count":0}],"isBlockCoverage":false},{"functionName":"timeout","ranges":[{"startOffset":6094,"endOffset":6374,"count":0}],"isBlockCoverage":false},{"functionName":"any","ranges":[{"startOffset":6461,"endOffset":8487,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":8491,"endOffset":9259,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":9263,"endOffset":9617,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":9621,"endOffset":10228,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":10232,"endOffset":10484,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":10488,"endOffset":10936,"count":0}],"isBlockCoverage":false},{"functionName":"ClonedAbortSignal","ranges":[{"startOffset":10940,"endOffset":11040,"count":0}],"isBlockCoverage":false},{"functionName":"ClonedAbortSignal.","ranges":[{"startOffset":11085,"endOffset":11093,"count":0}],"isBlockCoverage":false},{"functionName":"abortSignal","ranges":[{"startOffset":11463,"endOffset":12741,"count":0}],"isBlockCoverage":false},{"functionName":"runAbort","ranges":[{"startOffset":12795,"endOffset":12923,"count":0}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":12947,"endOffset":13626,"count":0}],"isBlockCoverage":false},{"functionName":"transferableAbortSignal","ranges":[{"startOffset":13774,"endOffset":13985,"count":0}],"isBlockCoverage":false},{"functionName":"transferableAbortController","ranges":[{"startOffset":14057,"endOffset":14146,"count":0}],"isBlockCoverage":false},{"functionName":"aborted","ranges":[{"startOffset":14240,"endOffset":14796,"count":0}],"isBlockCoverage":false}]},{"scriptId":"87","url":"node:internal/streams/end-of-stream","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":8484,"count":1}],"isBlockCoverage":false},{"functionName":"isRequest","ranges":[{"startOffset":883,"endOffset":978,"count":0}],"isBlockCoverage":false},{"functionName":"nop","ranges":[{"startOffset":992,"endOffset":1000,"count":0}],"isBlockCoverage":false},{"functionName":"eos","ranges":[{"startOffset":1003,"endOffset":7053,"count":0}],"isBlockCoverage":false},{"functionName":"eosWeb","ranges":[{"startOffset":7055,"endOffset":7964,"count":0}],"isBlockCoverage":false},{"functionName":"finished","ranges":[{"startOffset":7966,"endOffset":8424,"count":0}],"isBlockCoverage":false}]},{"scriptId":"88","url":"node:internal/streams/compose","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":5511,"count":1}],"isBlockCoverage":false},{"functionName":"compose","ranges":[{"startOffset":592,"endOffset":5509,"count":0}],"isBlockCoverage":false}]},{"scriptId":"89","url":"node:internal/streams/pipeline","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":12467,"count":1}],"isBlockCoverage":false},{"functionName":"destroyer","ranges":[{"startOffset":1056,"endOffset":1485,"count":0}],"isBlockCoverage":false},{"functionName":"popCallback","ranges":[{"startOffset":1487,"endOffset":1815,"count":0}],"isBlockCoverage":false},{"functionName":"makeAsyncIterable","ranges":[{"startOffset":1817,"endOffset":2103,"count":0}],"isBlockCoverage":false},{"functionName":"fromReadable","ranges":[{"startOffset":2105,"endOffset":2255,"count":0}],"isBlockCoverage":false},{"functionName":"pumpToNode","ranges":[{"startOffset":2257,"endOffset":3301,"count":0}],"isBlockCoverage":false},{"functionName":"pumpToWeb","ranges":[{"startOffset":3303,"endOffset":3901,"count":0}],"isBlockCoverage":false},{"functionName":"pipeline","ranges":[{"startOffset":3903,"endOffset":3996,"count":0}],"isBlockCoverage":false},{"functionName":"pipelineImpl","ranges":[{"startOffset":3998,"endOffset":10588,"count":0}],"isBlockCoverage":false},{"functionName":"pipe","ranges":[{"startOffset":10590,"endOffset":12420,"count":0}],"isBlockCoverage":false}]},{"scriptId":"90","url":"node:internal/streams/destroy","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":7355,"count":1}],"isBlockCoverage":false},{"functionName":"checkError","ranges":[{"startOffset":488,"endOffset":799,"count":0}],"isBlockCoverage":false},{"functionName":"destroy","ranges":[{"startOffset":909,"endOffset":1786,"count":0}],"isBlockCoverage":false},{"functionName":"_destroy","ranges":[{"startOffset":1788,"endOffset":2412,"count":0}],"isBlockCoverage":false},{"functionName":"emitErrorCloseNT","ranges":[{"startOffset":2414,"endOffset":2501,"count":0}],"isBlockCoverage":false},{"functionName":"emitCloseNT","ranges":[{"startOffset":2503,"endOffset":2823,"count":0}],"isBlockCoverage":false},{"functionName":"emitErrorNT","ranges":[{"startOffset":2825,"endOffset":3172,"count":0}],"isBlockCoverage":false},{"functionName":"undestroy","ranges":[{"startOffset":3174,"endOffset":3864,"count":0}],"isBlockCoverage":false},{"functionName":"errorOrDestroy","ranges":[{"startOffset":3866,"endOffset":5005,"count":0}],"isBlockCoverage":false},{"functionName":"construct","ranges":[{"startOffset":5007,"endOffset":5423,"count":0}],"isBlockCoverage":false},{"functionName":"constructNT","ranges":[{"startOffset":5425,"endOffset":6164,"count":0}],"isBlockCoverage":false},{"functionName":"isRequest","ranges":[{"startOffset":6166,"endOffset":6262,"count":0}],"isBlockCoverage":false},{"functionName":"emitCloseLegacy","ranges":[{"startOffset":6264,"endOffset":6324,"count":0}],"isBlockCoverage":false},{"functionName":"emitErrorCloseLegacy","ranges":[{"startOffset":6326,"endOffset":6446,"count":0}],"isBlockCoverage":false},{"functionName":"destroyer","ranges":[{"startOffset":6481,"endOffset":7263,"count":0}],"isBlockCoverage":false}]},{"scriptId":"91","url":"node:internal/streams/duplex","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":6529,"count":1}],"isBlockCoverage":false},{"functionName":"Duplex","ranges":[{"startOffset":2315,"endOffset":4278,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":5426,"endOffset":5638,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":5644,"endOffset":5905,"count":0}],"isBlockCoverage":false},{"functionName":"lazyWebStreams","ranges":[{"startOffset":5979,"endOffset":6143,"count":0}],"isBlockCoverage":false},{"functionName":"Duplex.fromWeb","ranges":[{"startOffset":6162,"endOffset":6280,"count":0}],"isBlockCoverage":false},{"functionName":"Duplex.toWeb","ranges":[{"startOffset":6298,"endOffset":6387,"count":0}],"isBlockCoverage":false},{"functionName":"Duplex.from","ranges":[{"startOffset":6420,"endOffset":6527,"count":0}],"isBlockCoverage":false}]},{"scriptId":"92","url":"node:internal/streams/legacy","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":3251,"count":1}],"isBlockCoverage":false},{"functionName":"Stream","ranges":[{"startOffset":130,"endOffset":178,"count":1}],"isBlockCoverage":true},{"functionName":"Stream.pipe","ranges":[{"startOffset":292,"endOffset":2094,"count":0}],"isBlockCoverage":false},{"functionName":"eventNames","ranges":[{"startOffset":2127,"endOffset":2393,"count":0}],"isBlockCoverage":false},{"functionName":"prependListener","ranges":[{"startOffset":2396,"endOffset":3203,"count":0}],"isBlockCoverage":false}]},{"scriptId":"93","url":"node:internal/streams/readable","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":51284,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":1880,"endOffset":1905,"count":0}],"isBlockCoverage":false},{"functionName":"nop","ranges":[{"startOffset":2867,"endOffset":2875,"count":0}],"isBlockCoverage":false},{"functionName":"makeBitMapDescriptor","ranges":[{"startOffset":3771,"endOffset":3993,"count":19}],"isBlockCoverage":true},{"functionName":"get","ranges":[{"startOffset":3846,"endOffset":3890,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":3896,"endOffset":3985,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":6167,"endOffset":6255,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":6261,"endOffset":6427,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":6504,"endOffset":6604,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":6610,"endOffset":6840,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":6909,"endOffset":6997,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":7003,"endOffset":7169,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":7239,"endOffset":7329,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":7335,"endOffset":7504,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":7573,"endOffset":7676,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":7682,"endOffset":7949,"count":0}],"isBlockCoverage":false},{"functionName":"ReadableState","ranges":[{"startOffset":7962,"endOffset":9928,"count":0}],"isBlockCoverage":false},{"functionName":"onConstructed","ranges":[{"startOffset":9972,"endOffset":10089,"count":0}],"isBlockCoverage":false},{"functionName":"Readable","ranges":[{"startOffset":10092,"endOffset":11126,"count":0}],"isBlockCoverage":false},{"functionName":"Readable._destroy","ranges":[{"startOffset":11263,"endOffset":11295,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.","ranges":[{"startOffset":11346,"endOffset":11384,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.","ranges":[{"startOffset":11428,"endOffset":11684,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.push","ranges":[{"startOffset":11913,"endOffset":12182,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.unshift","ranges":[{"startOffset":12278,"endOffset":12545,"count":0}],"isBlockCoverage":false},{"functionName":"readableAddChunkUnshiftByteMode","ranges":[{"startOffset":12549,"endOffset":13605,"count":0}],"isBlockCoverage":false},{"functionName":"readableAddChunkUnshiftObjectMode","ranges":[{"startOffset":13607,"endOffset":13847,"count":0}],"isBlockCoverage":false},{"functionName":"readableAddChunkUnshiftValue","ranges":[{"startOffset":13849,"endOffset":14182,"count":0}],"isBlockCoverage":false},{"functionName":"readableAddChunkPushByteMode","ranges":[{"startOffset":14184,"endOffset":15566,"count":0}],"isBlockCoverage":false},{"functionName":"readableAddChunkPushObjectMode","ranges":[{"startOffset":15568,"endOffset":16165,"count":0}],"isBlockCoverage":false},{"functionName":"canPushMore","ranges":[{"startOffset":16167,"endOffset":16497,"count":0}],"isBlockCoverage":false},{"functionName":"addChunk","ranges":[{"startOffset":16499,"endOffset":17443,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.isPaused","ranges":[{"startOffset":17475,"endOffset":17630,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.setEncoding","ranges":[{"startOffset":17694,"endOffset":18264,"count":0}],"isBlockCoverage":false},{"functionName":"computeNewHighWaterMark","ranges":[{"startOffset":18325,"endOffset":18676,"count":0}],"isBlockCoverage":false},{"functionName":"howMuchToRead","ranges":[{"startOffset":18789,"endOffset":19270,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.read","ranges":[{"startOffset":19367,"endOffset":24042,"count":0}],"isBlockCoverage":false},{"functionName":"onEofChunk","ranges":[{"startOffset":24045,"endOffset":24999,"count":0}],"isBlockCoverage":false},{"functionName":"emitReadable","ranges":[{"startOffset":25200,"endOffset":25531,"count":0}],"isBlockCoverage":false},{"functionName":"emitReadable_","ranges":[{"startOffset":25533,"endOffset":26205,"count":0}],"isBlockCoverage":false},{"functionName":"maybeReadMore","ranges":[{"startOffset":26555,"endOffset":26762,"count":0}],"isBlockCoverage":false},{"functionName":"maybeReadMore_","ranges":[{"startOffset":26764,"endOffset":28593,"count":0}],"isBlockCoverage":false},{"functionName":"Readable._read","ranges":[{"startOffset":28864,"endOffset":28930,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.pipe","ranges":[{"startOffset":28959,"endOffset":33469,"count":0}],"isBlockCoverage":false},{"functionName":"pipeOnDrain","ranges":[{"startOffset":33472,"endOffset":34149,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.unpipe","ranges":[{"startOffset":34180,"endOffset":34881,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.on","ranges":[{"startOffset":35007,"endOffset":36016,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.removeListener","ranges":[{"startOffset":36111,"endOffset":36818,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.removeAllListeners","ranges":[{"startOffset":36921,"endOffset":37515,"count":0}],"isBlockCoverage":false},{"functionName":"updateReadableListening","ranges":[{"startOffset":37518,"endOffset":38220,"count":0}],"isBlockCoverage":false},{"functionName":"nReadingNextTick","ranges":[{"startOffset":38222,"endOffset":38310,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.resume","ranges":[{"startOffset":38464,"endOffset":38969,"count":0}],"isBlockCoverage":false},{"functionName":"resume","ranges":[{"startOffset":38972,"endOffset":39145,"count":0}],"isBlockCoverage":false},{"functionName":"resume_","ranges":[{"startOffset":39147,"endOffset":39461,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.pause","ranges":[{"startOffset":39490,"endOffset":39802,"count":0}],"isBlockCoverage":false},{"functionName":"flow","ranges":[{"startOffset":39805,"endOffset":39956,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.wrap","ranges":[{"startOffset":40140,"endOffset":41161,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.","ranges":[{"startOffset":41206,"endOffset":41258,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.iterator","ranges":[{"startOffset":41291,"endOffset":41434,"count":0}],"isBlockCoverage":false},{"functionName":"streamToAsyncIterator","ranges":[{"startOffset":41437,"endOffset":41686,"count":0}],"isBlockCoverage":false},{"functionName":"createAsyncIterator","ranges":[{"startOffset":41688,"endOffset":42764,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":42983,"endOffset":43372,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":43378,"endOffset":43508,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":43590,"endOffset":43654,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":43736,"endOffset":43944,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":44032,"endOffset":44098,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":44179,"endOffset":44239,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":44321,"endOffset":44381,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":44392,"endOffset":44501,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":44577,"endOffset":44631,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":44711,"endOffset":44799,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":44877,"endOffset":44962,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":45031,"endOffset":45115,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":45160,"endOffset":45244,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":45315,"endOffset":45402,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":45408,"endOffset":45697,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":45772,"endOffset":45860,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":46001,"endOffset":46046,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":46126,"endOffset":46184,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":46190,"endOffset":46351,"count":0}],"isBlockCoverage":false},{"functionName":"fromList","ranges":[{"startOffset":46657,"endOffset":49109,"count":0}],"isBlockCoverage":false},{"functionName":"endReadable","ranges":[{"startOffset":49111,"endOffset":49337,"count":0}],"isBlockCoverage":false},{"functionName":"endReadableNT","ranges":[{"startOffset":49339,"endOffset":50232,"count":0}],"isBlockCoverage":false},{"functionName":"endWritableNT","ranges":[{"startOffset":50234,"endOffset":50394,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.from","ranges":[{"startOffset":50412,"endOffset":50481,"count":0}],"isBlockCoverage":false},{"functionName":"lazyWebStreams","ranges":[{"startOffset":50546,"endOffset":50710,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.fromWeb","ranges":[{"startOffset":50731,"endOffset":50865,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.toWeb","ranges":[{"startOffset":50885,"endOffset":51019,"count":0}],"isBlockCoverage":false},{"functionName":"Readable.wrap","ranges":[{"startOffset":51038,"endOffset":51282,"count":0}],"isBlockCoverage":false}]},{"scriptId":"94","url":"node:internal/streams/add-abort-signal","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":1734,"count":1}],"isBlockCoverage":false},{"functionName":"validateAbortSignal","ranges":[{"startOffset":563,"endOffset":722,"count":0}],"isBlockCoverage":false},{"functionName":"addAbortSignal","ranges":[{"startOffset":757,"endOffset":1068,"count":0}],"isBlockCoverage":false},{"functionName":"module.exports.addAbortSignalNoValidate","ranges":[{"startOffset":1113,"endOffset":1732,"count":0}],"isBlockCoverage":false}]},{"scriptId":"95","url":"node:internal/streams/state","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":1440,"count":1}],"isBlockCoverage":false},{"functionName":"highWaterMarkFrom","ranges":[{"startOffset":395,"endOffset":562,"count":1},{"startOffset":493,"endOffset":516,"count":0},{"startOffset":532,"endOffset":552,"count":0}],"isBlockCoverage":true},{"functionName":"getDefaultHighWaterMark","ranges":[{"startOffset":564,"endOffset":694,"count":1},{"startOffset":631,"endOffset":663,"count":0}],"isBlockCoverage":true},{"functionName":"setDefaultHighWaterMark","ranges":[{"startOffset":696,"endOffset":907,"count":0}],"isBlockCoverage":false},{"functionName":"getHighWaterMark","ranges":[{"startOffset":909,"endOffset":1342,"count":1},{"startOffset":1056,"endOffset":1268,"count":0}],"isBlockCoverage":true}]},{"scriptId":"96","url":"node:string_decoder","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":5141,"count":1}],"isBlockCoverage":false},{"functionName":"normalizeEncoding","ranges":[{"startOffset":2172,"endOffset":2422,"count":0}],"isBlockCoverage":false},{"functionName":"StringDecoder","ranges":[{"startOffset":2633,"endOffset":2832,"count":0}],"isBlockCoverage":false},{"functionName":"write","ranges":[{"startOffset":3155,"endOffset":3540,"count":0}],"isBlockCoverage":false},{"functionName":"end","ranges":[{"startOffset":3817,"endOffset":4008,"count":0}],"isBlockCoverage":false},{"functionName":"text","ranges":[{"startOffset":4219,"endOffset":4376,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":4514,"endOffset":4727,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":4819,"endOffset":4882,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":4975,"endOffset":5090,"count":0}],"isBlockCoverage":false}]},{"scriptId":"97","url":"node:internal/streams/from","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":4321,"count":1}],"isBlockCoverage":false},{"functionName":"from","ranges":[{"startOffset":241,"endOffset":4296,"count":0}],"isBlockCoverage":false}]},{"scriptId":"98","url":"node:internal/streams/writable","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":33592,"count":1}],"isBlockCoverage":false},{"functionName":"nop","ranges":[{"startOffset":2779,"endOffset":2796,"count":0}],"isBlockCoverage":false},{"functionName":"makeBitMapDescriptor","ranges":[{"startOffset":3852,"endOffset":4074,"count":20}],"isBlockCoverage":true},{"functionName":"get","ranges":[{"startOffset":3927,"endOffset":3971,"count":1}],"isBlockCoverage":true},{"functionName":"set","ranges":[{"startOffset":3977,"endOffset":4066,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":7038,"endOffset":7116,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":7122,"endOffset":7288,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":7358,"endOffset":7458,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":7464,"endOffset":7737,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":7814,"endOffset":7914,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":7920,"endOffset":8150,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":8291,"endOffset":8368,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":8374,"endOffset":8538,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":8725,"endOffset":8825,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":8831,"endOffset":9028,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":9098,"endOffset":9176,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":9182,"endOffset":9349,"count":0}],"isBlockCoverage":false},{"functionName":"WritableState","ranges":[{"startOffset":9362,"endOffset":11644,"count":1},{"startOffset":9630,"endOffset":9658,"count":0},{"startOffset":9675,"endOffset":9705,"count":0},{"startOffset":9711,"endOffset":9739,"count":0},{"startOffset":10030,"endOffset":10066,"count":0},{"startOffset":10258,"endOffset":10286,"count":0},{"startOffset":10409,"endOffset":10439,"count":0},{"startOffset":10696,"endOffset":10702,"count":0},{"startOffset":10734,"endOffset":10763,"count":0},{"startOffset":10764,"endOffset":10794,"count":0},{"startOffset":10843,"endOffset":11052,"count":0}],"isBlockCoverage":true},{"functionName":"resetBuffer","ranges":[{"startOffset":11646,"endOffset":11810,"count":1}],"isBlockCoverage":true},{"functionName":"getBuffer","ranges":[{"startOffset":11848,"endOffset":11977,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":12073,"endOffset":12184,"count":0}],"isBlockCoverage":false},{"functionName":"onConstructed","ranges":[{"startOffset":12233,"endOffset":12419,"count":0}],"isBlockCoverage":false},{"functionName":"Writable","ranges":[{"startOffset":12422,"endOffset":13528,"count":1},{"startOffset":12490,"endOffset":12519,"count":0},{"startOffset":12914,"endOffset":12942,"count":0},{"startOffset":12996,"endOffset":13026,"count":0},{"startOffset":13081,"endOffset":13113,"count":0},{"startOffset":13166,"endOffset":13194,"count":0},{"startOffset":13251,"endOffset":13287,"count":0},{"startOffset":13319,"endOffset":13356,"count":0},{"startOffset":13424,"endOffset":13526,"count":0}],"isBlockCoverage":true},{"functionName":"","ranges":[{"startOffset":13458,"endOffset":13520,"count":0}],"isBlockCoverage":false},{"functionName":"value","ranges":[{"startOffset":13610,"endOffset":13814,"count":1},{"startOffset":13699,"endOffset":13809,"count":0}],"isBlockCoverage":true},{"functionName":"Writable.pipe","ranges":[{"startOffset":13915,"endOffset":13983,"count":0}],"isBlockCoverage":false},{"functionName":"_write","ranges":[{"startOffset":13986,"endOffset":15384,"count":0}],"isBlockCoverage":false},{"functionName":"Writable.write","ranges":[{"startOffset":15413,"endOffset":15604,"count":0}],"isBlockCoverage":false},{"functionName":"Writable.cork","ranges":[{"startOffset":15633,"endOffset":15731,"count":0}],"isBlockCoverage":false},{"functionName":"Writable.uncork","ranges":[{"startOffset":15762,"endOffset":16000,"count":0}],"isBlockCoverage":false},{"functionName":"setDefaultEncoding","ranges":[{"startOffset":16043,"endOffset":16368,"count":0}],"isBlockCoverage":false},{"functionName":"writeOrBuffer","ranges":[{"startOffset":16558,"endOffset":17762,"count":0}],"isBlockCoverage":false},{"functionName":"doWrite","ranges":[{"startOffset":17764,"endOffset":18201,"count":0}],"isBlockCoverage":false},{"functionName":"onwriteError","ranges":[{"startOffset":18203,"endOffset":18588,"count":0}],"isBlockCoverage":false},{"functionName":"onwrite","ranges":[{"startOffset":18590,"endOffset":21196,"count":0}],"isBlockCoverage":false},{"functionName":"afterWriteTick","ranges":[{"startOffset":21198,"endOffset":21385,"count":0}],"isBlockCoverage":false},{"functionName":"afterWrite","ranges":[{"startOffset":21387,"endOffset":21895,"count":0}],"isBlockCoverage":false},{"functionName":"errorBuffer","ranges":[{"startOffset":21967,"endOffset":22518,"count":0}],"isBlockCoverage":false},{"functionName":"clearBuffer","ranges":[{"startOffset":22584,"endOffset":24254,"count":0}],"isBlockCoverage":false},{"functionName":"Writable._write","ranges":[{"startOffset":24284,"endOffset":24453,"count":0}],"isBlockCoverage":false},{"functionName":"Writable.end","ranges":[{"startOffset":24517,"endOffset":26157,"count":0}],"isBlockCoverage":false},{"functionName":"needFinish","ranges":[{"startOffset":26160,"endOffset":26589,"count":0}],"isBlockCoverage":false},{"functionName":"onFinish","ranges":[{"startOffset":26591,"endOffset":27223,"count":0}],"isBlockCoverage":false},{"functionName":"prefinish","ranges":[{"startOffset":27225,"endOffset":27749,"count":0}],"isBlockCoverage":false},{"functionName":"finishMaybe","ranges":[{"startOffset":27751,"endOffset":28250,"count":0}],"isBlockCoverage":false},{"functionName":"finish","ranges":[{"startOffset":28252,"endOffset":28895,"count":0}],"isBlockCoverage":false},{"functionName":"callFinishedCallbacks","ranges":[{"startOffset":28897,"endOffset":29215,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":29299,"endOffset":29402,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":29450,"endOffset":29556,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":29562,"endOffset":29812,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":29859,"endOffset":30262,"count":0}],"isBlockCoverage":false},{"functionName":"set","ranges":[{"startOffset":30268,"endOffset":30402,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":30457,"endOffset":30575,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":30632,"endOffset":30752,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":30805,"endOffset":30900,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":30952,"endOffset":31068,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":31124,"endOffset":31277,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":31337,"endOffset":31426,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":31479,"endOffset":31572,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":31625,"endOffset":31707,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":31776,"endOffset":31873,"count":0}],"isBlockCoverage":false},{"functionName":"get","ranges":[{"startOffset":31932,"endOffset":32189,"count":0}],"isBlockCoverage":false},{"functionName":"Writable.destroy","ranges":[{"startOffset":32267,"endOffset":32547,"count":0}],"isBlockCoverage":false},{"functionName":"Writable._destroy","ranges":[{"startOffset":32635,"endOffset":32667,"count":0}],"isBlockCoverage":false},{"functionName":"Writable.","ranges":[{"startOffset":32718,"endOffset":32756,"count":0}],"isBlockCoverage":false},{"functionName":"lazyWebStreams","ranges":[{"startOffset":32821,"endOffset":32985,"count":0}],"isBlockCoverage":false},{"functionName":"Writable.fromWeb","ranges":[{"startOffset":33006,"endOffset":33140,"count":0}],"isBlockCoverage":false},{"functionName":"Writable.toWeb","ranges":[{"startOffset":33160,"endOffset":33267,"count":0}],"isBlockCoverage":false},{"functionName":"Writable.","ranges":[{"startOffset":33311,"endOffset":33590,"count":0}],"isBlockCoverage":false}]},{"scriptId":"99","url":"node:stream/promises","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":917,"count":1}],"isBlockCoverage":false},{"functionName":"pipeline","ranges":[{"startOffset":318,"endOffset":869,"count":0}],"isBlockCoverage":false}]},{"scriptId":"100","url":"node:internal/streams/transform","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":7123,"count":1}],"isBlockCoverage":false},{"functionName":"Transform","ranges":[{"startOffset":3920,"endOffset":5500,"count":0}],"isBlockCoverage":false},{"functionName":"final","ranges":[{"startOffset":5502,"endOffset":5946,"count":0}],"isBlockCoverage":false},{"functionName":"prefinish","ranges":[{"startOffset":5948,"endOffset":6029,"count":0}],"isBlockCoverage":false},{"functionName":"Transform._transform","ranges":[{"startOffset":6101,"endOffset":6196,"count":0}],"isBlockCoverage":false},{"functionName":"Transform._write","ranges":[{"startOffset":6228,"endOffset":6965,"count":0}],"isBlockCoverage":false},{"functionName":"Transform._read","ranges":[{"startOffset":6996,"endOffset":7121,"count":0}],"isBlockCoverage":false}]},{"scriptId":"101","url":"node:internal/streams/passthrough","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":1762,"count":1}],"isBlockCoverage":false},{"functionName":"PassThrough","ranges":[{"startOffset":1529,"endOffset":1671,"count":0}],"isBlockCoverage":false},{"functionName":"PassThrough._transform","ranges":[{"startOffset":1708,"endOffset":1760,"count":0}],"isBlockCoverage":false}]},{"scriptId":"102","url":"node:internal/streams/duplexpair","functions":[{"functionName":"","ranges":[{"startOffset":0,"endOffset":1373,"count":1}],"isBlockCoverage":false},{"functionName":"","ranges":[{"startOffset":251,"endOffset":1136,"count":0}],"isBlockCoverage":false},{"functionName":"duplexPair","ranges":[{"startOffset":1138,"endOffset":1343,"count":0}],"isBlockCoverage":false}]}],"timestamp":17391.066092} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto.test.d.ts deleted file mode 100644 index 050692d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto.test.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function testJwt(_tc: t.TestCase): Promise; -export function testEncryption(tc: t.TestCase): Promise; -export function testReapeatEncryption(tc: t.TestCase): Promise; -export function testImportExport(tc: t.TestCase): Promise; -export function testEncryptionPerformance(tc: t.TestCase): Promise; -export function testConsistentKeyGeneration(_tc: t.TestCase): Promise; -export function testSigning(tc: t.TestCase): Promise; -import * as t from './testing.js'; -//# sourceMappingURL=crypto.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto.test.d.ts.map deleted file mode 100644 index 0bae474..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"crypto.test.d.ts","sourceRoot":"","sources":["crypto.test.js"],"names":[],"mappings":"AAYO,6BAFI,CAAC,CAAC,QAAQ,iBA8BpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,iBAoCpB;AAKM,0CAFI,CAAC,CAAC,QAAQ,iBA8BpB;AAKM,qCAFI,CAAC,CAAC,QAAQ,iBAgDpB;AAKM,8CAFI,CAAC,CAAC,QAAQ,iBAwCpB;AAKM,iDAFI,CAAC,CAAC,QAAQ,iBA2EpB;AAKM,gCAFI,CAAC,CAAC,QAAQ,iBAapB;mBAvSkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.d.ts deleted file mode 100644 index 2120545..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export function encrypt(key: CryptoKey, data: Uint8Array): Promise>; -export function decrypt(key: CryptoKey, data: Uint8Array): PromiseLike; -export function importKeyJwk(jwk: any, { usages, extractable }?: { - usages?: Usages | undefined; - extractable?: boolean | undefined; -}): Promise; -export function importKeyRaw(raw: Uint8Array, { usages, extractable }?: { - usages?: Usages | undefined; - extractable?: boolean | undefined; -}): Promise; -export function deriveKey(secret: Uint8Array | string, salt: Uint8Array | string, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export type Usages = Array<"encrypt" | "decrypt">; -export { exportKeyJwk, exportKeyRaw } from "./common.js"; -//# sourceMappingURL=aes-gcm.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.d.ts.map deleted file mode 100644 index d910a37..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aes-gcm.d.ts","sourceRoot":"","sources":["aes-gcm.js"],"names":[],"mappings":"AAuBO,6BAHI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,oCAkBjC;AAWM,6BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,CAclC;AAaM,kCALI,GAAG,4BAEX;IAAsB,MAAM;IACL,WAAW;CAAC,sBAQrC;AAUM,kCALI,UAAU,CAAC,WAAW,CAAC,4BAE/B;IAAsB,MAAM;IACL,WAAW;CAAC,sBAG0D;AAmBzF,kCANI,UAAU,CAAC,WAAW,CAAC,GAAC,MAAM,QAC9B,UAAU,CAAC,WAAW,CAAC,GAAC,MAAM,4BAEtC;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAsB7B;qBAxHU,KAAK,CAAC,SAAS,GAAC,SAAS,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.js deleted file mode 100644 index 98cd694..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/aes-gcm.js +++ /dev/null @@ -1,132 +0,0 @@ -/** - * AES-GCM is a symmetric key for encryption - */ - -import * as encoding from '../encoding.js' -import * as decoding from '../decoding.js' -import * as webcrypto from 'lib0/webcrypto' -import * as string from '../string.js' -export { exportKeyJwk, exportKeyRaw } from './common.js' - -/** - * @typedef {Array<'encrypt'|'decrypt'>} Usages - */ - -/** - * @type {Usages} - */ -const defaultUsages = ['encrypt', 'decrypt'] - -/** - * @param {CryptoKey} key - * @param {Uint8Array} data - */ -export const encrypt = (key, data) => { - const iv = webcrypto.getRandomValues(new Uint8Array(16)) // 92bit is enough. 128bit is recommended if space is not an issue. - return webcrypto.subtle.encrypt( - { - name: 'AES-GCM', - iv - }, - key, - data - ).then(cipher => { - const encryptedDataEncoder = encoding.createEncoder() - // iv may be sent in the clear to the other peers - encoding.writeUint8Array(encryptedDataEncoder, iv) - encoding.writeVarUint8Array(encryptedDataEncoder, new Uint8Array(cipher)) - return encoding.toUint8Array(encryptedDataEncoder) - }) -} - -/** - * @experimental The API is not final! - * - * Decrypt some data using AES-GCM method. - * - * @param {CryptoKey} key - * @param {Uint8Array} data - * @return {PromiseLike} decrypted buffer - */ -export const decrypt = (key, data) => { - const dataDecoder = decoding.createDecoder(data) - const iv = decoding.readUint8Array(dataDecoder, 16) - const cipher = decoding.readVarUint8Array(dataDecoder) - return webcrypto.subtle.decrypt( - { - name: 'AES-GCM', - iv - }, - key, - cipher - ).then(data => new Uint8Array(data)) -} - -const aesAlgDef = { - name: 'AES-GCM', - length: 256 -} - -/** - * @param {any} jwk - * @param {Object} opts - * @param {Usages} [opts.usages] - * @param {boolean} [opts.extractable] - */ -export const importKeyJwk = (jwk, { usages, extractable = false } = {}) => { - if (usages == null) { - /* c8 ignore next */ - usages = jwk.key_ops || defaultUsages - } - return webcrypto.subtle.importKey('jwk', jwk, 'AES-GCM', extractable, /** @type {Usages} */ (usages)) -} - -/** - * Only suited for importing public keys. - * - * @param {Uint8Array} raw - * @param {Object} opts - * @param {Usages} [opts.usages] - * @param {boolean} [opts.extractable] - */ -export const importKeyRaw = (raw, { usages = defaultUsages, extractable = false } = {}) => - webcrypto.subtle.importKey('raw', raw, aesAlgDef, extractable, /** @type {Usages} */ (usages)) - -/** - * @param {Uint8Array | string} data - */ -/* c8 ignore next */ -const toBinary = data => typeof data === 'string' ? string.encodeUtf8(data) : data - -/** - * @experimental The API is not final! - * - * Derive an symmetric key using the Password-Based-Key-Derivation-Function-2. - * - * @param {Uint8Array|string} secret - * @param {Uint8Array|string} salt - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - */ -export const deriveKey = (secret, salt, { extractable = false, usages = defaultUsages } = {}) => - webcrypto.subtle.importKey( - 'raw', - toBinary(secret), - 'PBKDF2', - false, - ['deriveKey'] - ).then(keyMaterial => - webcrypto.subtle.deriveKey( - { - name: 'PBKDF2', - salt: toBinary(salt), // NIST recommends at least 64 bits - iterations: 600000, // OWASP recommends 600k iterations - hash: 'SHA-256' - }, - keyMaterial, - aesAlgDef, - extractable, - usages - ) - ) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.d.ts deleted file mode 100644 index 75106c9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function exportKeyJwk(key: CryptoKey): Promise; -export function exportKeyRaw(key: CryptoKey): Promise>; -//# sourceMappingURL=common.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.d.ts.map deleted file mode 100644 index bcf4398..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.js"],"names":[],"mappings":"AAKO,kCAFI,SAAS,uBAMnB;AAQM,kCAHI,SAAS,GACR,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAG6B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.js deleted file mode 100644 index ae90978..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/common.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as webcrypto from 'lib0/webcrypto' - -/** - * @param {CryptoKey} key - */ -export const exportKeyJwk = async key => { - const jwk = await webcrypto.subtle.exportKey('jwk', key) - jwk.key_ops = key.usages - return jwk -} - -/** - * Only suited for exporting public keys. - * - * @param {CryptoKey} key - * @return {Promise>} - */ -export const exportKeyRaw = key => - webcrypto.subtle.exportKey('raw', key).then(key => new Uint8Array(key)) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.d.ts deleted file mode 100644 index 5ebdfe1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export function sign(key: CryptoKey, data: Uint8Array): PromiseLike>; -export function verify(key: CryptoKey, signature: Uint8Array, data: Uint8Array): PromiseLike; -export function generateKeyPair({ extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export function importKeyJwk(jwk: any, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export function importKeyRaw(raw: any, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export type Usages = Array<"sign" | "verify">; -export { exportKeyJwk, exportKeyRaw } from "./common.js"; -//# sourceMappingURL=ecdsa.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.d.ts.map deleted file mode 100644 index 3b330b7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ecdsa.d.ts","sourceRoot":"","sources":["ecdsa.js"],"names":[],"mappings":"AA8BO,0BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAOA;AAYzC,4BALI,SAAS,aACT,UAAU,CAAC,WAAW,CAAC,QACvB,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,OAAO,CAAC,CAQ7B;AAaI,0DAHJ;IAAuB,WAAW;IACZ,MAAM;CAAC,0BAO7B;AAQI,kCALI,GAAG,4BAEX;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAQ/B;AAUM,kCALI,GAAG,4BAEX;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAGkD;qBAxFrE,KAAK,CAAC,MAAM,GAAC,QAAQ,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.js deleted file mode 100644 index 6882af2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/ecdsa.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * ECDSA is an asymmetric key for signing - */ - -import * as webcrypto from 'lib0/webcrypto' -export { exportKeyJwk, exportKeyRaw } from './common.js' - -/** - * @typedef {Array<'sign'|'verify'>} Usages - */ - -/** - * @type {Usages} - */ -const defaultUsages = ['sign', 'verify'] - -const defaultSignAlgorithm = { - name: 'ECDSA', - hash: 'SHA-384' -} - -/** - * @experimental The API is not final! - * - * Sign a message - * - * @param {CryptoKey} key - * @param {Uint8Array} data - * @return {PromiseLike>} signature - */ -export const sign = (key, data) => - webcrypto.subtle.sign( - defaultSignAlgorithm, - key, - data - ).then(signature => new Uint8Array(signature)) - -/** - * @experimental The API is not final! - * - * Sign a message - * - * @param {CryptoKey} key - * @param {Uint8Array} signature - * @param {Uint8Array} data - * @return {PromiseLike} signature - */ -export const verify = (key, signature, data) => - webcrypto.subtle.verify( - defaultSignAlgorithm, - key, - signature, - data - ) - -const defaultKeyAlgorithm = { - name: 'ECDSA', - namedCurve: 'P-384' -} - -/* c8 ignore next */ -/** - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - */ -export const generateKeyPair = ({ extractable = false, usages = defaultUsages } = {}) => - webcrypto.subtle.generateKey( - defaultKeyAlgorithm, - extractable, - usages - ) - -/** - * @param {any} jwk - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - */ -export const importKeyJwk = (jwk, { extractable = false, usages } = {}) => { - if (usages == null) { - /* c8 ignore next 2 */ - usages = jwk.key_ops || defaultUsages - } - return webcrypto.subtle.importKey('jwk', jwk, defaultKeyAlgorithm, extractable, /** @type {Usages} */ (usages)) -} - -/** - * Only suited for importing public keys. - * - * @param {any} raw - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - */ -export const importKeyRaw = (raw, { extractable = false, usages = defaultUsages } = {}) => - webcrypto.subtle.importKey('raw', raw, defaultKeyAlgorithm, extractable, usages) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.d.ts deleted file mode 100644 index 0447def..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function encodeJwt(privateKey: CryptoKey, payload: Object): PromiseLike; -export function verifyJwt(publicKey: CryptoKey, jwt: string): Promise<{ - header: any; - payload: any; -}>; -export function unsafeDecode(jwt: string): { - header: any; - payload: any; -}; -//# sourceMappingURL=jwt.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.d.ts.map deleted file mode 100644 index 96d4eb8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["jwt.js"],"names":[],"mappings":"AAqBO,sCAHI,SAAS,WACT,MAAM,uBAgBhB;AAMM,qCAHI,SAAS,OACT,MAAM;;;GAiBhB;AAOM,kCAFI,MAAM;;;EAQhB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.js deleted file mode 100644 index cbcc33d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/jwt.js +++ /dev/null @@ -1,70 +0,0 @@ -import * as error from '../error.js' -import * as buffer from '../buffer.js' -import * as string from '../string.js' -import * as json from '../json.js' -import * as ecdsa from '../crypto/ecdsa.js' -import * as time from '../time.js' - -/** - * @param {Object} data - */ -const _stringify = data => buffer.toBase64UrlEncoded(string.encodeUtf8(json.stringify(data))) - -/** - * @param {string} base64url - */ -const _parse = base64url => json.parse(string.decodeUtf8(buffer.fromBase64UrlEncoded(base64url))) - -/** - * @param {CryptoKey} privateKey - * @param {Object} payload - */ -export const encodeJwt = (privateKey, payload) => { - const { name: algName, namedCurve: algCurve } = /** @type {any} */ (privateKey.algorithm) - /* c8 ignore next 3 */ - if (algName !== 'ECDSA' || algCurve !== 'P-384') { - error.unexpectedCase() - } - const header = { - alg: 'ES384', - typ: 'JWT' - } - const jwt = _stringify(header) + '.' + _stringify(payload) - return ecdsa.sign(privateKey, string.encodeUtf8(jwt)).then(signature => - jwt + '.' + buffer.toBase64UrlEncoded(signature) - ) -} - -/** - * @param {CryptoKey} publicKey - * @param {string} jwt - */ -export const verifyJwt = async (publicKey, jwt) => { - const [headerBase64, payloadBase64, signatureBase64] = jwt.split('.') - const verified = await ecdsa.verify(publicKey, buffer.fromBase64UrlEncoded(signatureBase64), string.encodeUtf8(headerBase64 + '.' + payloadBase64)) - /* c8 ignore next 3 */ - if (!verified) { - throw new Error('Invalid JWT') - } - const payload = _parse(payloadBase64) - if (payload.exp != null && time.getUnixTime() > payload.exp) { - throw new Error('Expired JWT') - } - return { - header: _parse(headerBase64), - payload - } -} - -/** - * Decode a jwt without verifying it. Probably a bad idea to use this. Only use if you know the jwt was already verified! - * - * @param {string} jwt - */ -export const unsafeDecode = jwt => { - const [headerBase64, payloadBase64] = jwt.split('.') - return { - header: _parse(headerBase64), - payload: _parse(payloadBase64) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.d.ts deleted file mode 100644 index b8bf3e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export { exportKeyJwk } from "./common.js"; -export function encrypt(key: CryptoKey, data: Uint8Array): PromiseLike>; -export function decrypt(key: CryptoKey, data: Uint8Array): PromiseLike; -export function generateKeyPair({ extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export function importKeyJwk(jwk: any, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export type Usages = Array<"encrypt" | "decrypt">; -//# sourceMappingURL=rsa-oaep.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.d.ts.map deleted file mode 100644 index e62c758..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rsa-oaep.d.ts","sourceRoot":"","sources":["rsa-oaep.js"],"names":[],"mappings":";AAuBO,6BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CASZ;AAW7B,6BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,CASG;AAQ/B,0DAJJ;IAAuB,WAAW;IACZ,MAAM;CAC5B,GAAS,OAAO,CAAC,aAAa,CAAC,CAY/B;AAQI,kCALI,GAAG,4BAEX;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAQ/B;qBAxEY,KAAK,CAAC,SAAS,GAAC,SAAS,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.js deleted file mode 100644 index 7a4e296..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/crypto/rsa-oaep.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * RSA-OAEP is an asymmetric keypair used for encryption - */ - -import * as webcrypto from 'lib0/webcrypto' -export { exportKeyJwk } from './common.js' - -/** - * @typedef {Array<'encrypt'|'decrypt'>} Usages - */ - -/** - * @type {Usages} - */ -const defaultUsages = ['encrypt', 'decrypt'] - -/** - * Note that the max data size is limited by the size of the RSA key. - * - * @param {CryptoKey} key - * @param {Uint8Array} data - * @return {PromiseLike>} - */ -export const encrypt = (key, data) => - webcrypto.subtle.encrypt( - { - name: 'RSA-OAEP' - }, - key, - data - ).then(buf => new Uint8Array(buf)) - -/** - * @experimental The API is not final! - * - * Decrypt some data using AES-GCM method. - * - * @param {CryptoKey} key - * @param {Uint8Array} data - * @return {PromiseLike} decrypted buffer - */ -export const decrypt = (key, data) => - webcrypto.subtle.decrypt( - { - name: 'RSA-OAEP' - }, - key, - data - ).then(data => new Uint8Array(data)) - -/** - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - * @return {Promise} - */ -export const generateKeyPair = ({ extractable = false, usages = defaultUsages } = {}) => - webcrypto.subtle.generateKey( - { - name: 'RSA-OAEP', - modulusLength: 4096, - publicExponent: new Uint8Array([1, 0, 1]), - hash: 'SHA-256' - }, - extractable, - usages - ) - -/** - * @param {any} jwk - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - */ -export const importKeyJwk = (jwk, { extractable = false, usages } = {}) => { - if (usages == null) { - /* c8 ignore next */ - usages = jwk.key_ops || defaultUsages - } - return webcrypto.subtle.importKey('jwk', jwk, { name: 'RSA-OAEP', hash: 'SHA-256' }, extractable, /** @type {Usages} */ (usages)) -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.d.ts deleted file mode 100644 index 4eff347..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.d.ts +++ /dev/null @@ -1,165 +0,0 @@ -/** - * A Decoder handles the decoding of an Uint8Array. - * @template {ArrayBufferLike} [Buf=ArrayBufferLike] - */ -export class Decoder { - /** - * @param {Uint8Array} uint8Array Binary data to decode - */ - constructor(uint8Array: Uint8Array); - /** - * Decoding target. - * - * @type {Uint8Array} - */ - arr: Uint8Array; - /** - * Current decoding position. - * - * @type {number} - */ - pos: number; -} -export function createDecoder(uint8Array: Uint8Array): Decoder; -export function hasContent(decoder: Decoder): boolean; -export function clone(decoder: Decoder, newPos?: number): Decoder; -export function readUint8Array(decoder: Decoder, len: number): Uint8Array; -export function readVarUint8Array(decoder: Decoder): Uint8Array; -export function readTailAsUint8Array(decoder: Decoder): Uint8Array; -export function skip8(decoder: Decoder): number; -export function readUint8(decoder: Decoder): number; -export function readUint16(decoder: Decoder): number; -export function readUint32(decoder: Decoder): number; -export function readUint32BigEndian(decoder: Decoder): number; -export function peekUint8(decoder: Decoder): number; -export function peekUint16(decoder: Decoder): number; -export function peekUint32(decoder: Decoder): number; -export function readVarUint(decoder: Decoder): number; -export function readVarInt(decoder: Decoder): number; -export function peekVarUint(decoder: Decoder): number; -export function peekVarInt(decoder: Decoder): number; -export function _readVarStringPolyfill(decoder: Decoder): string; -export function _readVarStringNative(decoder: Decoder): string; -export function readVarString(decoder: Decoder): string; -export function readTerminatedUint8Array(decoder: Decoder): Uint8Array; -export function readTerminatedString(decoder: Decoder): string; -export function peekVarString(decoder: Decoder): string; -export function readFromDataView(decoder: Decoder, len: number): DataView; -export function readFloat32(decoder: Decoder): number; -export function readFloat64(decoder: Decoder): number; -export function readBigInt64(decoder: Decoder): any; -export function readBigUint64(decoder: Decoder): any; -export function readAny(decoder: Decoder): any; -/** - * T must not be null. - * - * @template T - */ -export class RleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {function(Decoder):T} reader - */ - constructor(uint8Array: Uint8Array, reader: (arg0: Decoder) => T); - /** - * The reader - */ - reader: (arg0: Decoder) => T; - /** - * Current state - * @type {T|null} - */ - s: T | null; - count: number; - read(): T; -} -export class IntDiffDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {number} start - */ - constructor(uint8Array: Uint8Array, start: number); - /** - * Current state - * @type {number} - */ - s: number; - /** - * @return {number} - */ - read(): number; -} -export class RleIntDiffDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {number} start - */ - constructor(uint8Array: Uint8Array, start: number); - /** - * Current state - * @type {number} - */ - s: number; - count: number; - /** - * @return {number} - */ - read(): number; -} -export class UintOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor(uint8Array: Uint8Array); - /** - * @type {number} - */ - s: number; - count: number; - read(): number; -} -export class IncUintOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor(uint8Array: Uint8Array); - /** - * @type {number} - */ - s: number; - count: number; - read(): number; -} -export class IntDiffOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor(uint8Array: Uint8Array); - /** - * @type {number} - */ - s: number; - count: number; - diff: number; - /** - * @return {number} - */ - read(): number; -} -export class StringDecoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor(uint8Array: Uint8Array); - decoder: UintOptRleDecoder; - str: string; - /** - * @type {number} - */ - spos: number; - /** - * @return {string} - */ - read(): string; -} -//# sourceMappingURL=decoding.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.d.ts.map deleted file mode 100644 index eb592d7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decoding.d.ts","sourceRoot":"","sources":["decoding.js"],"names":[],"mappings":"AAsCA;;;GAGG;AACH,qBAFgC,GAAG,SAArB,eAAgB;IAG5B;;OAEG;IACH,wBAFW,UAAU,CAAC,GAAG,CAAC,EAezB;IAZC;;;;OAIG;IACH,KAFU,UAAU,CAAC,GAAG,CAAC,CAEJ;IACrB;;;;OAIG;IACH,KAFU,MAAM,CAEJ;CAEf;AAQM,8BAJwB,GAAG,SAApB,eAAgB,cACnB,UAAU,CAAC,GAAG,CAAC,GACd,OAAO,CAAC,GAAG,CAAC,CAE0C;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W,UAAU,UACV,CAAS,IAAO,EAAP,OAAO,KAAE,CAAC,EAc7B;IAVC;;OAEG;IACH,eAPkB,OAAO,KAAE,CAAC,CAOR;IACpB;;;OAGG;IACH,GAFU,CAAC,GAAC,IAAI,CAEH;IACb,cAAc;IAGhB,QAUoB,CAAC,CACpB;CACF;AAED;IACE;;;OAGG;IACH,wBAHW,UAAU,SACV,MAAM,EAShB;IALC;;;OAGG;IACH,GAFU,MAAM,CAEF;IAGhB;;OAEG;IACH,QAFY,MAAM,CAKjB;CACF;AAED;IACE;;;OAGG;IACH,wBAHW,UAAU,SACV,MAAM,EAUhB;IANC;;;OAGG;IACH,GAFU,MAAM,CAEF;IACd,cAAc;IAGhB;;OAEG;IACH,QAFY,MAAM,CAajB;CACF;AAED;IACE;;OAEG;IACH,wBAFW,UAAU,EASpB;IALC;;OAEG;IACH,GAFU,MAAM,CAEN;IACV,cAAc;IAGhB,QAYoB,MAAM,CACzB;CACF;AAED;IACE;;OAEG;IACH,wBAFW,UAAU,EASpB;IALC;;OAEG;IACH,GAFU,MAAM,CAEN;IACV,cAAc;IAGhB,QAYoB,MAAM,CACzB;CACF;AAED;IACE;;OAEG;IACH,wBAFW,UAAU,EAUpB;IANC;;OAEG;IACH,GAFU,MAAM,CAEN;IACV,cAAc;IACd,aAAa;IAGf;;OAEG;IACH,QAFY,MAAM,CAgBjB;CACF;AAED;IACE;;OAEG;IACH,wBAFW,UAAU,EASpB;IANC,2BAAgD;IAChD,YAAsC;IACtC;;OAEG;IACH,MAFU,MAAM,CAEH;IAGf;;OAEG;IACH,QAFY,MAAM,CAOjB;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.js deleted file mode 100644 index 6fd751f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.js +++ /dev/null @@ -1,710 +0,0 @@ -/** - * Efficient schema-less binary decoding with support for variable length encoding. - * - * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module decoding - */ - -import * as binary from './binary.js' -import * as math from './math.js' -import * as number from './number.js' -import * as string from './string.js' -import * as error from './error.js' -import * as encoding from './encoding.js' - -const errorUnexpectedEndOfArray = error.create('Unexpected end of array') -const errorIntegerOutOfRange = error.create('Integer out of Range') - -/** - * A Decoder handles the decoding of an Uint8Array. - * @template {ArrayBufferLike} [Buf=ArrayBufferLike] - */ -export class Decoder { - /** - * @param {Uint8Array} uint8Array Binary data to decode - */ - constructor (uint8Array) { - /** - * Decoding target. - * - * @type {Uint8Array} - */ - this.arr = uint8Array - /** - * Current decoding position. - * - * @type {number} - */ - this.pos = 0 - } -} - -/** - * @function - * @template {ArrayBufferLike} Buf - * @param {Uint8Array} uint8Array - * @return {Decoder} - */ -export const createDecoder = uint8Array => new Decoder(uint8Array) - -/** - * @function - * @param {Decoder} decoder - * @return {boolean} - */ -export const hasContent = decoder => decoder.pos !== decoder.arr.length - -/** - * Clone a decoder instance. - * Optionally set a new position parameter. - * - * @function - * @param {Decoder} decoder The decoder instance - * @param {number} [newPos] Defaults to current position - * @return {Decoder} A clone of `decoder` - */ -export const clone = (decoder, newPos = decoder.pos) => { - const _decoder = createDecoder(decoder.arr) - _decoder.pos = newPos - return _decoder -} - -/** - * Create an Uint8Array view of the next `len` bytes and advance the position by `len`. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @template {ArrayBufferLike} Buf - * @param {Decoder} decoder The decoder instance - * @param {number} len The length of bytes to read - * @return {Uint8Array} - */ -export const readUint8Array = (decoder, len) => { - const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len) - decoder.pos += len - return view -} - -/** - * Read variable length Uint8Array. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @template {ArrayBufferLike} Buf - * @param {Decoder} decoder - * @return {Uint8Array} - */ -export const readVarUint8Array = decoder => readUint8Array(decoder, readVarUint(decoder)) - -/** - * Read the rest of the content as an ArrayBuffer - * @function - * @param {Decoder} decoder - * @return {Uint8Array} - */ -export const readTailAsUint8Array = decoder => readUint8Array(decoder, decoder.arr.length - decoder.pos) - -/** - * Skip one byte, jump to the next position. - * @function - * @param {Decoder} decoder The decoder instance - * @return {number} The next position - */ -export const skip8 = decoder => decoder.pos++ - -/** - * Read one byte as unsigned integer. - * @function - * @param {Decoder} decoder The decoder instance - * @return {number} Unsigned 8-bit integer - */ -export const readUint8 = decoder => decoder.arr[decoder.pos++] - -/** - * Read 2 bytes as unsigned integer. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -export const readUint16 = decoder => { - const uint = - decoder.arr[decoder.pos] + - (decoder.arr[decoder.pos + 1] << 8) - decoder.pos += 2 - return uint -} - -/** - * Read 4 bytes as unsigned integer. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -export const readUint32 = decoder => { - const uint = - (decoder.arr[decoder.pos] + - (decoder.arr[decoder.pos + 1] << 8) + - (decoder.arr[decoder.pos + 2] << 16) + - (decoder.arr[decoder.pos + 3] << 24)) >>> 0 - decoder.pos += 4 - return uint -} - -/** - * Read 4 bytes as unsigned integer in big endian order. - * (most significant byte first) - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -export const readUint32BigEndian = decoder => { - const uint = - (decoder.arr[decoder.pos + 3] + - (decoder.arr[decoder.pos + 2] << 8) + - (decoder.arr[decoder.pos + 1] << 16) + - (decoder.arr[decoder.pos] << 24)) >>> 0 - decoder.pos += 4 - return uint -} - -/** - * Look ahead without incrementing the position - * to the next byte and read it as unsigned integer. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -export const peekUint8 = decoder => decoder.arr[decoder.pos] - -/** - * Look ahead without incrementing the position - * to the next byte and read it as unsigned integer. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -export const peekUint16 = decoder => - decoder.arr[decoder.pos] + - (decoder.arr[decoder.pos + 1] << 8) - -/** - * Look ahead without incrementing the position - * to the next byte and read it as unsigned integer. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -export const peekUint32 = decoder => ( - decoder.arr[decoder.pos] + - (decoder.arr[decoder.pos + 1] << 8) + - (decoder.arr[decoder.pos + 2] << 16) + - (decoder.arr[decoder.pos + 3] << 24) -) >>> 0 - -/** - * Read unsigned integer (32bit) with variable length. - * 1/8th of the storage is used as encoding overhead. - * * numbers < 2^7 is stored in one bytlength - * * numbers < 2^14 is stored in two bylength - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer.length - */ -export const readVarUint = decoder => { - let num = 0 - let mult = 1 - const len = decoder.arr.length - while (decoder.pos < len) { - const r = decoder.arr[decoder.pos++] - // num = num | ((r & binary.BITS7) << len) - num = num + (r & binary.BITS7) * mult // shift $r << (7*#iterations) and add it to num - mult *= 128 // next iteration, shift 7 "more" to the left - if (r < binary.BIT8) { - return num - } - /* c8 ignore start */ - if (num > number.MAX_SAFE_INTEGER) { - throw errorIntegerOutOfRange - } - /* c8 ignore stop */ - } - throw errorUnexpectedEndOfArray -} - -/** - * Read signed integer (32bit) with variable length. - * 1/8th of the storage is used as encoding overhead. - * * numbers < 2^7 is stored in one bytlength - * * numbers < 2^14 is stored in two bylength - * @todo This should probably create the inverse ~num if number is negative - but this would be a breaking change. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer.length - */ -export const readVarInt = decoder => { - let r = decoder.arr[decoder.pos++] - let num = r & binary.BITS6 - let mult = 64 - const sign = (r & binary.BIT7) > 0 ? -1 : 1 - if ((r & binary.BIT8) === 0) { - // don't continue reading - return sign * num - } - const len = decoder.arr.length - while (decoder.pos < len) { - r = decoder.arr[decoder.pos++] - // num = num | ((r & binary.BITS7) << len) - num = num + (r & binary.BITS7) * mult - mult *= 128 - if (r < binary.BIT8) { - return sign * num - } - /* c8 ignore start */ - if (num > number.MAX_SAFE_INTEGER) { - throw errorIntegerOutOfRange - } - /* c8 ignore stop */ - } - throw errorUnexpectedEndOfArray -} - -/** - * Look ahead and read varUint without incrementing position - * - * @function - * @param {Decoder} decoder - * @return {number} - */ -export const peekVarUint = decoder => { - const pos = decoder.pos - const s = readVarUint(decoder) - decoder.pos = pos - return s -} - -/** - * Look ahead and read varUint without incrementing position - * - * @function - * @param {Decoder} decoder - * @return {number} - */ -export const peekVarInt = decoder => { - const pos = decoder.pos - const s = readVarInt(decoder) - decoder.pos = pos - return s -} - -/** - * We don't test this function anymore as we use native decoding/encoding by default now. - * Better not modify this anymore.. - * - * Transforming utf8 to a string is pretty expensive. The code performs 10x better - * when String.fromCodePoint is fed with all characters as arguments. - * But most environments have a maximum number of arguments per functions. - * For effiency reasons we apply a maximum of 10000 characters at once. - * - * @function - * @param {Decoder} decoder - * @return {String} The read String. - */ -/* c8 ignore start */ -export const _readVarStringPolyfill = decoder => { - let remainingLen = readVarUint(decoder) - if (remainingLen === 0) { - return '' - } else { - let encodedString = String.fromCodePoint(readUint8(decoder)) // remember to decrease remainingLen - if (--remainingLen < 100) { // do not create a Uint8Array for small strings - while (remainingLen--) { - encodedString += String.fromCodePoint(readUint8(decoder)) - } - } else { - while (remainingLen > 0) { - const nextLen = remainingLen < 10000 ? remainingLen : 10000 - // this is dangerous, we create a fresh array view from the existing buffer - const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen) - decoder.pos += nextLen - // Starting with ES5.1 we can supply a generic array-like object as arguments - encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes)) - remainingLen -= nextLen - } - } - return decodeURIComponent(escape(encodedString)) - } -} -/* c8 ignore stop */ - -/** - * @function - * @param {Decoder} decoder - * @return {String} The read String - */ -export const _readVarStringNative = decoder => - /** @type any */ (string.utf8TextDecoder).decode(readVarUint8Array(decoder)) - -/** - * Read string of variable length - * * varUint is used to store the length of the string - * - * @function - * @param {Decoder} decoder - * @return {String} The read String - * - */ -/* c8 ignore next */ -export const readVarString = string.utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill - -/** - * @param {Decoder} decoder - * @return {Uint8Array} - */ -export const readTerminatedUint8Array = decoder => { - const encoder = encoding.createEncoder() - let b - while (true) { - b = readUint8(decoder) - if (b === 0) { - return encoding.toUint8Array(encoder) - } - if (b === 1) { - b = readUint8(decoder) - } - encoding.write(encoder, b) - } -} - -/** - * @param {Decoder} decoder - * @return {string} - */ -export const readTerminatedString = decoder => string.decodeUtf8(readTerminatedUint8Array(decoder)) - -/** - * Look ahead and read varString without incrementing position - * - * @function - * @param {Decoder} decoder - * @return {string} - */ -export const peekVarString = decoder => { - const pos = decoder.pos - const s = readVarString(decoder) - decoder.pos = pos - return s -} - -/** - * @param {Decoder} decoder - * @param {number} len - * @return {DataView} - */ -export const readFromDataView = (decoder, len) => { - const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len) - decoder.pos += len - return dv -} - -/** - * @param {Decoder} decoder - */ -export const readFloat32 = decoder => readFromDataView(decoder, 4).getFloat32(0, false) - -/** - * @param {Decoder} decoder - */ -export const readFloat64 = decoder => readFromDataView(decoder, 8).getFloat64(0, false) - -/** - * @param {Decoder} decoder - */ -export const readBigInt64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigInt64(0, false) - -/** - * @param {Decoder} decoder - */ -export const readBigUint64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigUint64(0, false) - -/** - * @type {Array} - */ -const readAnyLookupTable = [ - decoder => undefined, // CASE 127: undefined - decoder => null, // CASE 126: null - readVarInt, // CASE 125: integer - readFloat32, // CASE 124: float32 - readFloat64, // CASE 123: float64 - readBigInt64, // CASE 122: bigint - decoder => false, // CASE 121: boolean (false) - decoder => true, // CASE 120: boolean (true) - readVarString, // CASE 119: string - decoder => { // CASE 118: object - const len = readVarUint(decoder) - /** - * @type {Object} - */ - const obj = {} - for (let i = 0; i < len; i++) { - const key = readVarString(decoder) - obj[key] = readAny(decoder) - } - return obj - }, - decoder => { // CASE 117: array - const len = readVarUint(decoder) - const arr = [] - for (let i = 0; i < len; i++) { - arr.push(readAny(decoder)) - } - return arr - }, - readVarUint8Array // CASE 116: Uint8Array -] - -/** - * @param {Decoder} decoder - */ -export const readAny = decoder => readAnyLookupTable[127 - readUint8(decoder)](decoder) - -/** - * T must not be null. - * - * @template T - */ -export class RleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {function(Decoder):T} reader - */ - constructor (uint8Array, reader) { - super(uint8Array) - /** - * The reader - */ - this.reader = reader - /** - * Current state - * @type {T|null} - */ - this.s = null - this.count = 0 - } - - read () { - if (this.count === 0) { - this.s = this.reader(this) - if (hasContent(this)) { - this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented - } else { - this.count = -1 // read the current value forever - } - } - this.count-- - return /** @type {T} */ (this.s) - } -} - -export class IntDiffDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {number} start - */ - constructor (uint8Array, start) { - super(uint8Array) - /** - * Current state - * @type {number} - */ - this.s = start - } - - /** - * @return {number} - */ - read () { - this.s += readVarInt(this) - return this.s - } -} - -export class RleIntDiffDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {number} start - */ - constructor (uint8Array, start) { - super(uint8Array) - /** - * Current state - * @type {number} - */ - this.s = start - this.count = 0 - } - - /** - * @return {number} - */ - read () { - if (this.count === 0) { - this.s += readVarInt(this) - if (hasContent(this)) { - this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented - } else { - this.count = -1 // read the current value forever - } - } - this.count-- - return /** @type {number} */ (this.s) - } -} - -export class UintOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor (uint8Array) { - super(uint8Array) - /** - * @type {number} - */ - this.s = 0 - this.count = 0 - } - - read () { - if (this.count === 0) { - this.s = readVarInt(this) - // if the sign is negative, we read the count too, otherwise count is 1 - const isNegative = math.isNegativeZero(this.s) - this.count = 1 - if (isNegative) { - this.s = -this.s - this.count = readVarUint(this) + 2 - } - } - this.count-- - return /** @type {number} */ (this.s) - } -} - -export class IncUintOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor (uint8Array) { - super(uint8Array) - /** - * @type {number} - */ - this.s = 0 - this.count = 0 - } - - read () { - if (this.count === 0) { - this.s = readVarInt(this) - // if the sign is negative, we read the count too, otherwise count is 1 - const isNegative = math.isNegativeZero(this.s) - this.count = 1 - if (isNegative) { - this.s = -this.s - this.count = readVarUint(this) + 2 - } - } - this.count-- - return /** @type {number} */ (this.s++) - } -} - -export class IntDiffOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor (uint8Array) { - super(uint8Array) - /** - * @type {number} - */ - this.s = 0 - this.count = 0 - this.diff = 0 - } - - /** - * @return {number} - */ - read () { - if (this.count === 0) { - const diff = readVarInt(this) - // if the first bit is set, we read more data - const hasCount = diff & 1 - this.diff = math.floor(diff / 2) // shift >> 1 - this.count = 1 - if (hasCount) { - this.count = readVarUint(this) + 2 - } - } - this.s += this.diff - this.count-- - return this.s - } -} - -export class StringDecoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor (uint8Array) { - this.decoder = new UintOptRleDecoder(uint8Array) - this.str = readVarString(this.decoder) - /** - * @type {number} - */ - this.spos = 0 - } - - /** - * @return {string} - */ - read () { - const end = this.spos + this.decoder.read() - const res = this.str.slice(this.spos, end) - this.spos = end - return res - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.d.ts deleted file mode 100644 index 5bf528f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * @template T - * @typedef {import('../schema.js').Schema} Schema - */ -/** - * @template {delta.AbstractDelta} DeltaA - * @template {delta.AbstractDelta} DeltaB - */ -export class Binding { - /** - * @param {RDT} a - * @param {RDT} b - * @param {dt.Template} template - */ - constructor(a: RDT, b: RDT, template: dt.Template); - /** - * @type {dt.Transformer} - */ - t: dt.Transformer; - a: RDT; - b: RDT; - _mux: mux.mutex; - _achanged: (delta: DeltaA) => void; - _bchanged: (delta: DeltaB) => void; - destroy: () => void; -} -export function bind>(a: RDT, b: RDT ? DeltaB : never>, template: dt.Template): Binding ? DeltaB : never>; -export function deltaRDT($delta: Schema): DeltaRDT; -export const $domDelta: any; -export function domRDT(dom: Element): DomRDT>; -export type Schema = import("../schema.js").Schema; -/** - * Abstract Interface for a delta-based Replicated Data Type. - */ -export type RDT = ObservableV2<{ - "change": (delta: Delta) => void; - "destroy": (rdt: RDT) => void; -}> & { - update: (delta: Delta) => any; - destroy: () => void; -}; -export type DomDelta = delta.RecursiveNode; -import * as delta from './delta.js'; -import * as dt from './t3.test.js'; -import * as mux from '../mutex.js'; -/** - * @template {delta.AbstractDelta} Delta - * @implements RDT - * @extends {ObservableV2<{ change: (delta: Delta) => void, 'destroy': (rdt:DeltaRDT)=>void }>} - */ -declare class DeltaRDT extends ObservableV2<{ - change: (delta: Delta) => void; - destroy: (rdt: DeltaRDT) => void; -}> implements RDT { - /** - * @param {Schema} $delta - */ - constructor($delta: Schema); - $delta: s.Schema; - /** - * @type {Delta?} - */ - state: Delta | null; - _mux: mux.mutex; - /** - * @param {Delta} delta - */ - update: (delta: Delta) => any; -} -/** - * @typedef {delta.RecursiveNode} DomDelta - */ -/** - * @template {DomDelta} [D=DomDelta] - * @implements RDT - * @extends {ObservableV2<{ change: (delta: D)=>void, destroy: (rdt:DomRDT)=>void }>}>} - */ -declare class DomRDT> extends ObservableV2<{ - change: (delta: D) => void; - destroy: (rdt: DomRDT) => void; -}> implements RDT { - /** - * @param {Element} observedNode - */ - constructor(observedNode: Element); - observedNode: Element; - _mux: mux.mutex; - observer: MutationObserver; - /** - * @param {MutationRecord[]} mutations - */ - _mutationHandler: (mutations: MutationRecord[]) => any; - /** - * @param {D} delta - */ - update: (delta: D) => void; -} -import { ObservableV2 } from '../observable.js'; -import * as s from '../schema.js'; -export {}; -//# sourceMappingURL=binding.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.d.ts.map deleted file mode 100644 index 524ae15..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["binding.js"],"names":[],"mappings":"AAeA;;;GAGG;AAEH;;;GAGG;AACH,qBAHmC,MAAM,SAA3B,KAAK,CAAC,aAAc,EACC,MAAM,SAA3B,KAAK,CAAC,aAAc;IAGhC;;;;OAIG;IACH,eAJW,GAAG,CAAC,MAAM,CAAC,KACX,GAAG,CAAC,MAAM,CAAC,YACX,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAC,MAAM,CAAC,EA4BxC;IAzBC;;OAEG;IACH,GAFU,EAAE,CAAC,WAAW,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;;;;GAIG;AACH,uBAJmC,KAAK,SAA1B,KAAK,CAAC,aAAc;YAEE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;aAAa,CAAC,GAAG,EAAC,QAAQ,CAAC,KAAK,CAAC,KAAG,IAAI;cADnF,GAAG,CAAC,KAAK;IAItB;;OAEG;IACH,oBAFW,MAAM,CAAC,KAAK,CAAC,EAUvB;IANC,wBAAoB;IACpB;;OAEG;IACH,OAFU,KAAK,OAAC,CAEC;IACjB,gBAA6B;IAG/B;;OAEG;IACH,SAAS,OAFE,KAEG,SAOZ;CAMH;AAkMD;;GAEG;AAEH;;;;GAIG;AACH,qBAJyB,CAAC,SAAZ,QAAS;;;YAEa,CAAC,KAAK,EAAE,CAAC,KAAG,IAAI;aAAW,CAAC,GAAG,EAAC,MAAM,CAAC,CAAC,CAAC,KAAG,IAAI;cADrE,GAAG,CAAC,CAAC;IAIlB;;OAEG;IACH,0BAFW,OAAO,EAajB;IATC,sBAAgC;IAChC,gBAA6B;IAC7B,2BAA2D;IAS7D;;OAEG;IACH,mBAAmB,WAFR,cAAc,EAEG,SAGxB;IAEJ;;OAEG;IACH,SAAS,OAFE,CAEG,UAWb;CAOF;6BA1W4B,kBAAkB;mBAS5B,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.js deleted file mode 100644 index 2a1c007..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.js +++ /dev/null @@ -1,372 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -// @todo remove all @ts-nocheck and eslint-disable -/* global MutationObserver */ -import { ObservableV2 } from '../observable.js' -import * as delta from './delta.js' -import * as dt from './t3.test.js' // eslint-disable-line -import * as dom from '../dom.js' -import * as set from '../set.js' -import * as map from '../map.js' -import * as error from '../error.js' -import * as math from '../math.js' -import * as mux from '../mutex.js' -import * as s from '../schema.js' - -/** - * @template T - * @typedef {import('../schema.js').Schema} Schema - */ - -/** - * @template {delta.AbstractDelta} DeltaA - * @template {delta.AbstractDelta} DeltaB - */ -export class Binding { - /** - * @param {RDT} a - * @param {RDT} b - * @param {dt.Template} template - */ - constructor (a, b, template) { - /** - * @type {dt.Transformer} - */ - this.t = template.init() - this.a = a - this.b = b - this._mux = mux.createMutex() - this._achanged = this.a.on('change', d => this._mux(() => { - const tres = this.t.applyA(d) - if (tres.a) { - a.update(tres.a) - } - if (tres.b) { - b.update(tres.b) - } - })) - this._bchanged = this.b.on('change', d => this._mux(() => { - const tres = this.t.applyB(d) - if (tres.b) { - this.b.update(tres.b) - } - if (tres.a) { - a.update(tres.a) - } - })) - } - - destroy = () => { - this.a.off('destroy', this.destroy) - this.b.off('destroy', this.destroy) - this.a.off('change', this._achanged) - this.b.off('change', this._bchanged) - } -} - -/** - * Abstract Interface for a delta-based Replicated Data Type. - * - * @template {delta.AbstractDelta} Delta - * @typedef {ObservableV2<{ 'change': (delta: Delta) => void, 'destroy': (rdt:RDT)=>void }> & { update: (delta: Delta) => any, destroy: () => void }} RDT - */ - -/** - * @template {delta.AbstractDelta} DeltaA - * @template {dt.Template} Transformer - * @param {RDT} a - * @param {RDT ? DeltaB : never>} b - * @param {dt.Template} template - */ -export const bind = (a, b, template) => new Binding(a, b, template) - -/** - * @template {delta.AbstractDelta} Delta - * @implements RDT - * @extends {ObservableV2<{ change: (delta: Delta) => void, 'destroy': (rdt:DeltaRDT)=>void }>} - */ -class DeltaRDT extends ObservableV2 { - /** - * @param {Schema} $delta - */ - constructor ($delta) { - super() - this.$delta = $delta - /** - * @type {Delta?} - */ - this.state = null - this._mux = mux.createMutex() - } - - /** - * @param {Delta} delta - */ - update = delta => delta.isEmpty() || this._mux(() => { - if (this.state != null) { - this.state.apply(delta) - } else { - this.state = delta - } - this.emit('change', [delta]) - }) - - destroy () { - this.emit('destroy', [this]) - super.destroy() - } -} - -/** - * @template {delta.AbstractDelta} Delta - * @param {Schema} $delta - */ -export const deltaRDT = $delta => new DeltaRDT($delta) - -/** - * @param {Node} domNode - */ -const domToDelta = domNode => { - if (dom.$element.check(domNode)) { - const d = delta.node(domNode.nodeName.toLowerCase()) - for (let i = 0; i < domNode.attributes.length; i++) { - const attr = /** @type {Attr} */ (domNode.attributes.item(i)) - d.attributes.set(attr.nodeName, attr.value) - } - domNode.childNodes.forEach(child => { - d.children.insert(dom.$text.check(child) ? child.textContent : [domToDelta(child)]) - }) - return d - } - error.unexpectedCase() -} - -/** - * @param {DomDelta} d - */ -const deltaToDom = d => { - if (delta.$nodeAny.check(d)) { - const n = dom.element(d.name) - d.attributes.forEach(change => { - if (delta.$insertOp.check(change)) { - n.setAttribute(change.key, change.value) - } - }) - d.children.forEach(child => { - if (delta.$insertOp.check(child)) { - n.append(...child.insert.map(deltaToDom)) - } else if (delta.$textOp.check(child)) { - n.append(dom.text(child.insert)) - } - }) - return n - } - error.unexpectedCase() -} - -/** - * @param {Element} el - * @param {delta.Node} d - */ -const applyDeltaToDom = (el, d) => { - d.attributes.forEach(change => { - if (delta.$deleteOp.check(change)) { - el.removeAttribute(change.key) - } else { - el.setAttribute(change.key, change.value) - } - }) - let childIndex = 0 - let childOffset = 0 - d.children.forEach(change => { - let child = el.childNodes[childIndex] || null - if (delta.$deleteOp.check(change)) { - let len = change.length - while (len > 0) { - if (dom.$element.check(child)) { - child.remove() - len-- - } else if (dom.$text.check(child)) { - const childLen = child.length - if (childOffset === 0 && childLen <= len) { - child.remove() - len -= childLen - } else { - const spliceLen = math.min(len, childLen - childOffset) - child.deleteData(childOffset, spliceLen) - if (child.length <= childOffset) { - childOffset = 0 - childIndex++ - } - } - } - } - } else if (delta.$insertOp.check(change)) { - if (childOffset > 0) { - const tchild = dom.$text.cast(child) - child = tchild.splitText(childOffset) - childIndex++ - childOffset = 0 - } - el.insertBefore(dom.fragment(change.insert.map(deltaToDom)), child) - } else if (delta.$modifyOp.check(change)) { - applyDeltaToDom(dom.$element.cast(child), change.modify) - } else if (delta.$textOp.check(change)) { - el.insertBefore(dom.text(change.insert), child) - } else { - error.unexpectedCase() - } - }) -} - -export const $domDelta = delta.$node(s.$string, s.$record(s.$string, s.$string), s.$never, { recursive: true, withText: true }) - -/** - * @param {Element} observedNode - * @param {MutationRecord[]} mutations - * @param {any} origin assign this origin to the generated delta - */ -const _mutationsToDelta = (observedNode, mutations, origin) => { - /** - * @typedef {{ removedBefore: Map, added: Set, modified: number, d: delta.Node }} ChangedNodeInfo - */ - /** - * Compute all deltas without recursion. - * - * 1. mark all changed parents in parentsChanged - * 2. fill out necessary information for each changed parent () - */ - // - /** - * @type {Map} - */ - const changedNodes = map.create() - /** - * @param {Node} node - * @return {ChangedNodeInfo} - */ - const getChangedNodeInfo = node => map.setIfUndefined(changedNodes, node, () => ({ removedBefore: map.create(), added: set.create(), modified: 0, d: delta.node(node.nodeName.toLowerCase()) })) - const observedNodeInfo = getChangedNodeInfo(observedNode) - mutations.forEach(mutation => { - const target = /** @type {HTMLElement} */ (mutation.target) - const parent = target.parentNode - const attrName = /** @type {string} */ (mutation.attributeName) - const newVal = target.getAttribute(attrName) - const info = getChangedNodeInfo(target) - const d = info.d - // go up the tree and mark that a child has been modified - for (let changedParent = parent; changedParent != null && getChangedNodeInfo(changedParent).modified++ > 1 && changedParent !== observedNode; changedParent = changedParent.parentNode) { - // nop - } - switch (mutation.type) { - case 'attributes': { - const attrs = /** @type {delta.Node} */ (d).attributes - if (newVal == null) { - attrs.delete(attrName) - } else { - attrs.set(/** @type {string} */ (attrName), newVal) - } - break - } - case 'characterData': { - error.methodUnimplemented() - break - } - case 'childList': { - const targetInfo = getChangedNodeInfo(target) - mutation.addedNodes.forEach(node => { - targetInfo.added.add(node) - }) - const removed = mutation.removedNodes.length - if (removed > 0) { - // @todo this can't work because next can be null - targetInfo.removedBefore.set(mutation.nextSibling, removed) - } - break - } - } - }) - changedNodes.forEach((info, node) => { - const numOfChildChanges = info.modified + info.removedBefore.size + info.added.size - const d = /** @type {delta.Node} */ (info.d) - if (numOfChildChanges > 0) { - node.childNodes.forEach(nchild => { - if (info.removedBefore.has(nchild)) { // can happen separately - d.children.delete(/** @type {number} */ (info.removedBefore.get(nchild))) - } - if (info.added.has(nchild)) { - d.children.insert(dom.$text.check(nchild) ? nchild.textContent : [domToDelta(nchild)]) - } else if (changedNodes.has(nchild)) { - d.children.modify(getChangedNodeInfo(nchild).d) - } - }) - // remove items to the end, if necessary - d.children.delete(info.removedBefore.get(null) ?? 0) - } - d.done() - }) - observedNodeInfo.d.origin = origin - return observedNodeInfo.d -} - -/** - * @typedef {delta.RecursiveNode} DomDelta - */ - -/** - * @template {DomDelta} [D=DomDelta] - * @implements RDT - * @extends {ObservableV2<{ change: (delta: D)=>void, destroy: (rdt:DomRDT)=>void }>}>} - */ -class DomRDT extends ObservableV2 { - /** - * @param {Element} observedNode - */ - constructor (observedNode) { - super() - this.observedNode = observedNode - this._mux = mux.createMutex() - this.observer = new MutationObserver(this._mutationHandler) - this.observer.observe(observedNode, { - subtree: true, - childList: true, - attributes: true, - characterDataOldValue: true - }) - } - - /** - * @param {MutationRecord[]} mutations - */ - _mutationHandler = mutations => - mutations.length > 0 && this._mux(() => { - this.emit('change', [/** @type {D} */(_mutationsToDelta(this.observedNode, mutations, this))]) - }) - - /** - * @param {D} delta - */ - update = delta => { - if (delta.origin !== this) { - // @todo the retrieved changes must be transformed agains the updated changes. need a proper - // transaction system - this._mutationHandler(this.observer.takeRecords()) - this._mux(() => { - applyDeltaToDom(this.observedNode, delta) - const mutations = this.observer.takeRecords() - this.emit('change', [/** @type {D} */(_mutationsToDelta(this.observedNode, mutations, delta.origin))]) - }) - } - } - - destroy () { - this.emit('destroy', [this]) - super.destroy() - this.observer.disconnect() - } -} - -/** - * @param {Element} dom - */ -export const domRDT = dom => new DomRDT(dom) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.test.d.ts deleted file mode 100644 index eae1385..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.test.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function testBinding(): void; -export function testDomBindingBasics(): void; -export function testDomBindingBackAndForth(): void; -export function testDataToDom(): void; -//# sourceMappingURL=binding.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.test.d.ts.map deleted file mode 100644 index fbeb785..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/binding.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binding.test.d.ts","sourceRoot":"","sources":["binding.test.js"],"names":[],"mappings":"AAUO,oCAcN;AAEM,6CAcN;AAEM,mDAkCN;AAEM,sCAiBN"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta-pitch.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta-pitch.test.d.ts deleted file mode 100644 index 1d4291c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta-pitch.test.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function testDeltaBasics(_tc: t.TestCase): void; -export function testDeltaBasicSchema(_tc: t.TestCase): void; -export function testDeltaValues(_tc: t.TestCase): void; -import * as t from 'lib0/testing'; -//# sourceMappingURL=delta-pitch.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta-pitch.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta-pitch.test.d.ts.map deleted file mode 100644 index 1a2ad3e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta-pitch.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delta-pitch.test.d.ts","sourceRoot":"","sources":["delta-pitch.test.js"],"names":[],"mappings":"AAmCO,qCAFI,CAAC,CAAC,QAAQ,QAWpB;AAmBM,0CAFI,CAAC,CAAC,QAAQ,QAWpB;AAYM,qCAFI,CAAC,CAAC,QAAQ,QAwBpB;mBAzGkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.d.ts deleted file mode 100644 index 2f11094..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.d.ts +++ /dev/null @@ -1,1008 +0,0 @@ -/** - * @typedef {{ - * insert?: string[] - * insertAt?: number - * delete?: string[] - * deleteAt?: number - * format?: Record - * formatAt?: number - * }} Attribution - */ -/** - * @type {s.Schema} - */ -export const $attribution: s.Schema; -/** - * @typedef {s.Unwrap<$anyOp>} DeltaOps - */ -/** - * @typedef {{ [key: string]: any }} FormattingAttributes - */ -/** - * @typedef {{ - * type: 'delta', - * name?: string, - * attrs?: { [Key in string|number]: DeltaAttrOpJSON }, - * children?: Array - * }} DeltaJSON - */ -/** - * @typedef {{ type: 'insert', insert: string|Array, format?: { [key: string]: any }, attribution?: Attribution } | { delete: number } | { type: 'retain', retain: number, format?: { [key:string]: any }, attribution?: Attribution } | { type: 'modify', value: object }} DeltaListOpJSON - */ -/** - * @typedef {{ type: 'insert', value: any, prevValue?: any, attribution?: Attribution } | { type: 'delete', prevValue?: any, attribution?: Attribution } | { type: 'modify', value: DeltaJSON }} DeltaAttrOpJSON - */ -/** - * @typedef {TextOp|InsertOp|DeleteOp|RetainOp|ModifyOp} ChildrenOpAny - */ -/** - * @typedef {AttrInsertOp|AttrDeleteOp|AttrModifyOp} AttrOpAny - */ -/** - * @typedef {ChildrenOpAny|AttrOpAny} _OpAny - */ -/** - * @type {s.Schema} - */ -export const $deltaMapChangeJson: s.Schema; -export class TextOp extends list.ListNode { - /** - * @param {string} insert - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(insert: string, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {string} - */ - readonly insert: string; - /** - * @readonly - * @type {FormattingAttributes|null} - */ - readonly format: FormattingAttributes | null; - attribution: Attribution | null; - /** - * @type {string?} - */ - _fingerprint: string | null; - /** - * @param {string} newVal - */ - _updateInsert(newVal: string): void; - /** - * @return {'insert'} - */ - get type(): "insert"; - get length(): number; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} offset - * @param {number} len - */ - _splice(offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - /** - * @return {TextOp} - */ - clone(start?: number, end?: number): TextOp; - /** - * @param {TextOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: TextOp): boolean; -} -/** - * @template {fingerprintTrait.Fingerprintable} ArrayContent - */ -export class InsertOp extends list.ListNode { - /** - * @param {Array} insert - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(insert: Array, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {Array} - */ - readonly insert: Array; - /** - * @readonly - * @type {FormattingAttributes?} - */ - readonly format: FormattingAttributes | null; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string?} - */ - _fingerprint: string | null; - /** - * @param {ArrayContent} newVal - */ - _updateInsert(newVal: ArrayContent): void; - /** - * @return {'insert'} - */ - get type(): "insert"; - get length(): number; - /** - * @param {number} i - * @return {Extract} - */ - _modValue(i: number): Extract; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} offset - * @param {number} len - */ - _splice(offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - /** - * @return {InsertOp} - */ - clone(start?: number, end?: number): InsertOp; - /** - * @param {InsertOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: InsertOp): boolean; -} -/** - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - */ -export class DeleteOp extends list.ListNode { - /** - * @param {number} len - */ - constructor(len: number); - delete: number; - /** - * @type {(Children|Text) extends never ? null : (Delta?)} - */ - prevValue: (Children | Text) extends never ? null : (Delta | null); - /** - * @type {string|null} - */ - _fingerprint: string | null; - /** - * @return {'delete'} - */ - get type(): "delete"; - get length(): number; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} len - */ - _splice(_offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - clone(start?: number, end?: number): DeleteOp; - /** - * @param {DeleteOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: DeleteOp): boolean; -} -export class RetainOp extends list.ListNode { - /** - * @param {number} retain - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(retain: number, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {number} - */ - readonly retain: number; - /** - * @readonly - * @type {FormattingAttributes?} - */ - readonly format: FormattingAttributes | null; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - /** - * @return {'retain'} - */ - get type(): "retain"; - get length(): number; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} len - */ - _splice(_offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - clone(start?: number, end?: number): RetainOp; - /** - * @param {RetainOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: RetainOp): boolean; -} -/** - * Delta that can be applied on a YType Embed - * - * @template {DeltaAny} [DTypes=DeltaAny] - */ -export class ModifyOp extends list.ListNode { - /** - * @param {DTypes} delta - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(delta: DTypes, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {DTypes} - */ - readonly value: DTypes; - /** - * @readonly - * @type {FormattingAttributes?} - */ - readonly format: FormattingAttributes | null; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - /** - * @return {'modify'} - */ - get type(): "modify"; - get length(): number; - /** - * @type {DeltaBuilderAny} - */ - get _modValue(): DeltaBuilderAny; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} _len - */ - _splice(_offset: number, _len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - /** - * @return {ModifyOp} - */ - clone(): ModifyOp; - /** - * @param {ModifyOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: ModifyOp): boolean; -} -/** - * @template {fingerprintTrait.Fingerprintable} V - * @template {string|number} [K=any] - */ -export class AttrInsertOp { - /** - * @param {K} key - * @param {V} value - * @param {V|undefined} prevValue - * @param {Attribution?} attribution - */ - constructor(key: K, value: V, prevValue: V | undefined, attribution: Attribution | null); - /** - * @readonly - * @type {K} - */ - readonly key: K; - /** - * @readonly - * @type {V} - */ - readonly value: V; - /** - * @readonly - * @type {V|undefined} - */ - readonly prevValue: V | undefined; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - /** - * @return {'insert'} - */ - get type(): "insert"; - /** - * @type {DeltaBuilderAny} - */ - get _modValue(): DeltaBuilderAny; - get fingerprint(): string; - toJSON(): { - type: "insert"; - value: V | DeltaJSON; - } & (({ - attribution: Attribution; - } | { - attribution?: undefined; - }) & ({ - prevValue: V & {}; - } | { - prevValue?: undefined; - })); - /** - * @return {AttrInsertOp} - */ - clone(): AttrInsertOp; - /** - * @param {AttrInsertOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: AttrInsertOp): boolean; -} -/** - * @template V - * @template {string|number} [K=string] - */ -export class AttrDeleteOp { - /** - * @param {K} key - * @param {V|undefined} prevValue - * @param {Attribution?} attribution - */ - constructor(key: K, prevValue: V | undefined, attribution: Attribution | null); - /** - * @type {K} - */ - key: K; - /** - * @type {V|undefined} - */ - prevValue: V | undefined; - attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - get value(): undefined; - /** - * @type {'delete'} - */ - get type(): "delete"; - get fingerprint(): string; - /** - * @return {DeltaAttrOpJSON} - */ - toJSON(): DeltaAttrOpJSON; - clone(): AttrDeleteOp; - /** - * @param {AttrDeleteOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: AttrDeleteOp): boolean; -} -/** - * @template {DeltaAny} [Modifier=DeltaAny] - * @template {string|number} [K=string] - */ -export class AttrModifyOp { - /** - * @param {K} key - * @param {Modifier} delta - */ - constructor(key: K, delta: Modifier); - /** - * @readonly - * @type {K} - */ - readonly key: K; - /** - * @readonly - * @type {Modifier} - */ - readonly value: Modifier; - /** - * @type {string|null} - */ - _fingerprint: string | null; - /** - * @type {'modify'} - */ - get type(): "modify"; - get fingerprint(): string; - /** - * @return {DeltaBuilder} - */ - get _modValue(): DeltaBuilder; - /** - * @return {DeltaAttrOpJSON} - */ - toJSON(): DeltaAttrOpJSON; - /** - * @return {AttrModifyOp} - */ - clone(): AttrModifyOp; - /** - * @param {AttrModifyOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: AttrModifyOp): boolean; -} -/** - * @type {s.Schema | DeleteOp>} - */ -export const $deleteOp: s.Schema | DeleteOp>; -/** - * @type {s.Schema | InsertOp>} - */ -export const $insertOp: s.Schema | InsertOp>; -export function $insertOpWith($content: s.Schema): s.Schema | InsertOp>; -/** - * @type {s.Schema} - */ -export const $textOp: s.Schema; -/** - * @type {s.Schema} - */ -export const $retainOp: s.Schema; -/** - * @type {s.Schema} - */ -export const $modifyOp: s.Schema; -export function $modifyOpWith($content: s.Schema): s.Schema | ModifyOp>; -export const $anyOp: s.Schema | InsertOp | AttrDeleteOp | DeleteOp | TextOp | AttrModifyOp | ModifyOp>; -/** - * @template {Array|string} C1 - * @template {Array|string} C2 - * @typedef {Extract> extends never - * ? never - * : (Array<(Extract> extends Array ? (unknown extends AC1 ? never : AC1) : never)>)} MergeListArrays - */ -/** - * @template {{[Key in string|number]: any}} Attrs - * @template {string|number} Key - * @template {any} Val - * @typedef {{ [K in (Key | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (Key extends K ? Val : never) }} AddToAttrs - */ -/** - * @template {{[Key in string|number|symbol]: any}} Attrs - * @template {{[Key in string|number|symbol]: any}} NewAttrs - * @typedef {{ [K in (keyof NewAttrs | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (unknown extends NewAttrs[K] ? never : NewAttrs[K]) }} MergeAttrs - */ -/** - * @template X - * @typedef {0 extends (1 & X) ? null : X} _AnyToNull - */ -/** - * @template {s.Schema>|null} Schema - * @typedef {_AnyToNull extends null ? Delta : (Schema extends s.Schema ? D : never)} AllowedDeltaFromSchema - */ -/** - * @typedef {Delta} DeltaAny - */ -/** - * @typedef {DeltaBuilder} DeltaBuilderAny - */ -/** - * @template {string} [NodeName=any] - * @template {{[k:string|number]:any}} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - * @template {s.Schema>|null} [Schema=any] - */ -export class Delta> | null = any> { - /** - * @param {NodeName} [name] - * @param {Schema} [$schema] - */ - constructor(name?: NodeName, $schema?: Schema); - name: NodeName | null; - $schema: NonNullable | null; - /** - * @type {{ [K in keyof Attrs]?: K extends string|number ? (AttrInsertOp|AttrDeleteOp|(Delta extends Attrs[K] ? AttrModifyOp,K> : never)) : never } - * & { [Symbol.iterator]: () => Iterator<{ [K in keyof Attrs]: K extends string|number ? (AttrInsertOp|AttrDeleteOp|(Delta extends Attrs[K] ? AttrModifyOp,K> : never)) : never }[keyof Attrs]> } - * } - */ - attrs: { [K in keyof Attrs]?: K extends string | number ? (AttrInsertOp | AttrDeleteOp | (Delta extends Attrs[K] ? AttrModifyOp, K> : never)) : never; } & { - [Symbol.iterator]: () => Iterator<{ [K in keyof Attrs]: K extends string | number ? (AttrInsertOp | AttrDeleteOp | (Delta extends Attrs[K] ? AttrModifyOp, K> : never)) : never; }[keyof Attrs]>; - }; - /** - * @type {list.List< - * RetainOp - * | DeleteOp - * | (Text extends never ? never : TextOp) - * | (Children extends never ? never : InsertOp) - * | (Delta extends Children ? ModifyOp>> : never) - * >} - */ - children: list.List) | (Delta extends Children ? ModifyOp>> : never)>; - childCnt: number; - /** - * @type {any} - */ - origin: any; - /** - * @type {string|null} - */ - _fingerprint: string | null; - isDone: boolean; - /** - * @type {string} - */ - get fingerprint(): string; - isEmpty(): boolean; - /** - * @return {DeltaJSON} - */ - toJSON(): DeltaJSON; - /** - * @param {Delta} other - * @return {boolean} - */ - equals(other: Delta): boolean; - /** - * @return {DeltaBuilder} - */ - clone(): DeltaBuilder; - /** - * @param {number} start - * @param {number} end - * @return {DeltaBuilder} - */ - slice(start?: number, end?: number): DeltaBuilder; - /** - * Mark this delta as done and perform some cleanup (e.g. remove appended retains without - * formats&attributions). In the future, there might be additional merge operations that can be - * performed to result in smaller deltas. Set `markAsDone=false` to only perform the cleanup. - * - * @return {Delta} - */ - done(markAsDone?: boolean): Delta; - [fingerprintTrait.FingerprintTraitSymbol](): string; - /** - * @param {any} other - * @return {boolean} - */ - [equalityTrait.EqualityTraitSymbol](other: any): boolean; -} -export function clone(d: D): D extends DeltaBuilder ? DeltaBuilder : never; -/** - * @template {string} [NodeName=any] - * @template {{[key:string|number]:any}} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - * @template {s.Schema>|null} [Schema=any] - * @extends {Delta} - */ -export class DeltaBuilder> | null = any> extends Delta { - /** - * @type {FormattingAttributes?} - */ - usedAttributes: FormattingAttributes | null; - /** - * @type {Attribution?} - */ - usedAttribution: Attribution | null; - /** - * @param {Attribution?} attribution - */ - useAttribution(attribution: Attribution | null): this; - /** - * @param {FormattingAttributes?} attributes - * @return {this} - */ - useAttributes(attributes: FormattingAttributes | null): this; - /** - * @param {string} name - * @param {any} value - */ - updateUsedAttributes(name: string, value: any): this; - /** - * @template {keyof Attribution} NAME - * @param {NAME} name - * @param {Attribution[NAME]?} value - */ - updateUsedAttribution(name: NAME, value: Attribution[NAME] | null): this; - /** - * @template {AllowedDeltaFromSchema extends Delta ? ((Children extends never ? never : Array) | Text) : never} NewContent - * @param {NewContent} insert - * @param {FormattingAttributes?} [formatting] - * @param {Attribution?} [attribution] - * @return {DeltaBuilder< - * NodeName, - * Attrs, - * Exclude[number]|Children, - * (Extract|Text) extends never ? never : string, - * Schema - * >} - */ - insert extends Delta ? ((Children_1 extends never ? never : Array) | Text_1) : never>(insert: NewContent, formatting?: FormattingAttributes | null, attribution?: Attribution | null): DeltaBuilder[number] | Children, (Extract | Text) extends never ? never : string, Schema>; - /** - * @template {AllowedDeltaFromSchema extends Delta ? Extract> : never} NewContent - * @param {NewContent} modify - * @param {FormattingAttributes?} formatting - * @param {Attribution?} attribution - * @return {DeltaBuilder< - * NodeName, - * Attrs, - * Exclude[number]|Children, - * (Extract|Text) extends string ? string : never, - * Schema - * >} - */ - modify extends Delta ? Extract> : never>(modify: NewContent, formatting?: FormattingAttributes | null, attribution?: Attribution | null): DeltaBuilder[number] | Children, (Extract | Text) extends string ? string : never, Schema>; - /** - * @param {number} len - * @param {FormattingAttributes?} [format] - * @param {Attribution?} [attribution] - */ - retain(len: number, format?: FormattingAttributes | null, attribution?: Attribution | null): this; - /** - * @param {number} len - */ - delete(len: number): this; - /** - * @template {AllowedDeltaFromSchema extends Delta ? (keyof Attrs) : never} Key - * @template {AllowedDeltaFromSchema extends Delta ? (Attrs[Key]) : never} Val - * @param {Key} key - * @param {Val} val - * @param {Attribution?} attribution - * @param {Val|undefined} [prevValue] - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - set extends Delta ? (keyof Attrs_1) : never, Val extends AllowedDeltaFromSchema extends Delta ? (Attrs_1[Key]) : never>(key: Key, val: Val, attribution?: Attribution | null, prevValue?: Val | undefined): DeltaBuilder]: AddToAttrs[K]; }, Children, Text, Schema>; - /** - * @template {AllowedDeltaFromSchema extends Delta ? Attrs : never} NewAttrs - * @param {NewAttrs} attrs - * @param {Attribution?} attribution - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof MergeAttrs]: MergeAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - setMany extends Delta ? Attrs_1 : never>(attrs: NewAttrs, attribution?: Attribution | null): DeltaBuilder]: MergeAttrs[K]; }, Children, Text, Schema>; - /** - * @template {AllowedDeltaFromSchema extends Delta ? keyof As : never} Key - * @param {Key} key - * @param {Attribution?} attribution - * @param {any} [prevValue] - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - unset extends Delta ? keyof As : never>(key: Key, attribution?: Attribution | null, prevValue?: any): DeltaBuilder]: AddToAttrs[K]; }, Children, Text, Schema>; - /** - * @template {AllowedDeltaFromSchema extends Delta ? { [K in keyof As]: Extract> extends never ? never : K }[keyof As] : never} Key - * @template {AllowedDeltaFromSchema extends Delta ? Extract> : never} D - * @param {Key} key - * @param {D} modify - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - update extends Delta ? { [K in keyof As]: Extract> extends never ? never : K; }[keyof As] : never, D extends AllowedDeltaFromSchema extends Delta ? Extract> : never>(key: Key, modify: D): DeltaBuilder]: AddToAttrs[K]; }, Children, Text, Schema>; - /** - * @param {Delta} other - */ - apply(other: Delta): this; - /** - * @param {DeltaAny} other - * @param {boolean} priority - */ - rebase(other: DeltaAny, priority: boolean): this; - /** - * Same as doing `delta.rebase(other.inverse())`, without creating a temporary delta. - * - * @param {DeltaAny} other - * @param {boolean} priority - */ - rebaseOnInverse(other: DeltaAny, priority: boolean): this; - /** - * Append child ops from one op to the other. - * - * delta.create().insert('a').append(delta.create().insert('b')) // => insert "ab" - * - * @template {DeltaAny} OtherDelta - * @param {OtherDelta} other - * @return {CastToDelta extends Delta ? DeltaBuilder : never} - */ - append(other: OtherDelta): CastToDelta extends Delta ? DeltaBuilder : never; -} -/** - * @template {DeltaAny} D - * @typedef {D extends DeltaBuilder ? Delta : D} CastToDelta - */ -/** - * @template {string} NodeName - * @template {{ [key: string|number]: any }} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable|never} [Children=never] - * @template {string|never} [Text=never] - * @typedef {Delta|RecursiveDelta,Text>} RecursiveDelta - */ -/** - * @template {string} Name - * @template {{[k:string|number]:any}} Attrs - * @template {fingerprintTrait.Fingerprintable} Children - * @template {boolean} HasText - * @template {{ [k:string]:any }} Formats - * @template {boolean} Recursive - * @extends {s.Schema : never), - * HasText extends true ? string : never, - * any>>} - */ -export class $Delta extends s.Schema : never), HasText extends true ? string : never, any>> { - /** - * @param {s.Schema} $name - * @param {s.Schema} $attrs - * @param {s.Schema} $children - * @param {HasText} hasText - * @param {s.Schema} $formats - * @param {Recursive} recursive - */ - constructor($name: s.Schema, $attrs: s.Schema, $children: s.Schema, hasText: HasText, $formats: s.Schema, recursive: Recursive); - shape: { - $name: s.Schema; - $attrs: s.Schema | s.Schema; - [key: number]: s.Schema; - [key: symbol]: s.Schema; - }>>>; - $children: s.Schema; - hasText: HasText; - $formats: s.Schema; - }; -} -export function $delta | string | Array = s.Schema, AttrsSchema extends s.Schema<{ - [key: string | number]: any; -}> | { - [key: string | number]: any; -} = s.Schema<{}>, ChildrenSchema extends unknown = s.Schema, HasText extends boolean = false, Recursive extends boolean = false, Formats extends { - [k: string]: any; -} = { - [k: string]: any; -}>({ name, attrs, children, text, formats, recursive }: { - name?: NodeNameSchema | null | undefined; - attrs?: AttrsSchema | null | undefined; - children?: ChildrenSchema | null | undefined; - text?: HasText | undefined; - formats?: Formats | undefined; - recursive?: Recursive | undefined; -}): [s.Unwrap>, s.Unwrap>, s.Unwrap>] extends [infer NodeName_1, infer Attrs_1, infer Children_1] ? s.Schema : never), HasText extends true ? string : never>> : never; -export const $$delta: s.Schema<$Delta>; -export function _$delta | string | Array = s.Schema, AttrsSchema extends s.Schema<{ - [key: string | number]: any; -}> | { - [key: string | number]: any; -} = s.Schema<{}>, ChildrenSchema extends unknown = s.Schema, HasText extends boolean = false, Recursive extends boolean = false>({ name, attrs, children, text, recursive }: { - name?: NodeNameSchema | null | undefined; - attrs?: AttrsSchema | null | undefined; - children?: ChildrenSchema | null | undefined; - text?: HasText | undefined; - recursive?: Recursive | undefined; -}): [s.Unwrap>, s.Unwrap>, s.Unwrap>] extends [infer NodeName_1, infer Attrs_1, infer Children_1] ? s.Schema : never), HasText extends true ? string : never>> : never; -/** - * @type {s.Schema} - */ -export const $deltaAny: s.Schema; -/** - * @type {s.Schema} - */ -export const $deltaBuilderAny: s.Schema; -export function mergeAttrs(a: T | null, b: T | null): T | null; -export function mergeDeltas(a: D, b: D): D; -export function random(gen: prng.PRNG, $d: s.Schema): D extends Delta ? DeltaBuilder : never; -/** - * @overload - * @return {DeltaBuilder} - */ -export function create(): DeltaBuilder; -/** - * @template {string} NodeName - * @overload - * @param {NodeName} nodeName - * @return {DeltaBuilder} - */ -export function create(nodeName: NodeName): DeltaBuilder; -/** - * @template {string} NodeName - * @template {s.Schema} Schema - * @overload - * @param {NodeName} nodeName - * @param {Schema} schema - * @return {Schema extends s.Schema> ? DeltaBuilder : never} - */ -export function create>(nodeName: NodeName, schema: Schema): Schema extends s.Schema> ? DeltaBuilder : never; -/** - * @template {s.Schema} Schema - * @overload - * @param {Schema} schema - * @return {Schema extends s.Schema> ? DeltaBuilder : never} - */ -export function create>(schema: Schema): Schema extends s.Schema> ? DeltaBuilder : never; -/** - * @template {string|null} NodeName - * @template {{[k:string|number]:any}|null} Attrs - * @template {Array|string} [Children=never] - * @overload - * @param {NodeName} nodeName - * @param {Attrs} attrs - * @param {Children} [children] - * @return {DeltaBuilder< - * NodeName extends null ? any : NodeName, - * Attrs extends null ? {} : Attrs, - * Extract> extends Array ? (unknown extends Ac ? never : Ac) : never, - * Extract, - * null - * >} - */ -export function create | string = never>(nodeName: NodeName, attrs: Attrs, children?: Children | undefined): DeltaBuilder> extends Array ? (unknown extends Ac ? never : Ac) : never, Extract, null>; -export function $text<$Embeds extends Array> = any>(...$embeds: $Embeds): s.Schema extends null ? never : ($Embeds extends Array> ? $C : never)>>; -export const $textOnly: s.Schema>; -export function text> = s.Schema>>($schema?: Schema_1): Schema_1 extends s.Schema> ? DeltaBuilder : never; -export function $array<$Children extends unknown>($children?: $Children): s.Schema>>>; -export function array<$Schema extends s.Schema> = never>($schema: $Schema): $Schema extends never ? ArrayDeltaBuilder : DeltaBuilder; -export function $map<$Attrs extends { - [K: string | number]: any; -}>($attrs: s.Schema<$Attrs>): s.Schema>; -export function map<$Schema extends s.Schema> | undefined = undefined>($schema?: $Schema): $Schema extends s.Schema> ? DeltaBuilder : MapDeltaBuilder<{}>; -export function diff(d1: D, d2: NoInfer): D extends Delta ? DeltaBuilder : never; -export type Attribution = { - insert?: string[]; - insertAt?: number; - delete?: string[]; - deleteAt?: number; - format?: Record; - formatAt?: number; -}; -export type DeltaOps = s.Unwrap | InsertOp | AttrDeleteOp | DeleteOp | TextOp | AttrModifyOp | ModifyOp>>; -export type FormattingAttributes = { - [key: string]: any; -}; -export type DeltaJSON = { - type: "delta"; - name?: string; - attrs?: { [Key in string | number]: DeltaAttrOpJSON; }; - children?: Array; -}; -export type DeltaListOpJSON = { - type: "insert"; - insert: string | Array; - format?: { - [key: string]: any; - }; - attribution?: Attribution; -} | { - delete: number; -} | { - type: "retain"; - retain: number; - format?: { - [key: string]: any; - }; - attribution?: Attribution; -} | { - type: "modify"; - value: object; -}; -export type DeltaAttrOpJSON = { - type: "insert"; - value: any; - prevValue?: any; - attribution?: Attribution; -} | { - type: "delete"; - prevValue?: any; - attribution?: Attribution; -} | { - type: "modify"; - value: DeltaJSON; -}; -export type ChildrenOpAny = TextOp | InsertOp | DeleteOp | RetainOp | ModifyOp; -export type AttrOpAny = AttrInsertOp | AttrDeleteOp | AttrModifyOp; -export type _OpAny = ChildrenOpAny | AttrOpAny; -export type MergeListArrays | string, C2 extends Array | string> = Extract> extends never ? never : (Array<(Extract> extends Array ? (unknown extends AC1 ? never : AC1) : never)>); -export type AddToAttrs = { [K in (Key | keyof Attrs_1)]: (unknown extends Attrs_1[K] ? never : Attrs_1[K]) | (Key extends K ? Val : never); }; -export type MergeAttrs = { [K in (keyof NewAttrs | keyof Attrs_1)]: (unknown extends Attrs_1[K] ? never : Attrs_1[K]) | (unknown extends NewAttrs[K] ? never : NewAttrs[K]); }; -export type _AnyToNull = 0 extends (1 & X) ? null : X; -export type AllowedDeltaFromSchema> | null> = _AnyToNull extends null ? Delta : (Schema_1 extends s.Schema ? D : never); -export type DeltaAny = Delta; -export type DeltaBuilderAny = DeltaBuilder; -export type CastToDelta = D extends DeltaBuilder ? Delta : D; -export type RecursiveDelta = Delta | RecursiveDelta, Text>; -export type TextDelta = Delta; -export type TextDeltaBuilder = DeltaBuilder; -export type ArrayDelta = Delta; -export type ArrayDeltaBuilder = DeltaBuilder; -export type MapDelta = Delta; -export type MapDeltaBuilder = DeltaBuilder; -import * as s from '../schema.js'; -import * as list from '../list.js'; -import * as equalityTrait from '../trait/equality.js'; -import * as fingerprintTrait from '../trait/fingerprint.js'; -import * as prng from '../prng.js'; -//# sourceMappingURL=delta.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.d.ts.map deleted file mode 100644 index a312111..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delta.d.ts","sourceRoot":"","sources":["delta.js"],"names":[],"mappings":"AAyBA;;;;;;;;;GASG;AAEH;;GAEG;AACH,2BAFU,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAS7B;AAEF;;GAEG;AAEH;;GAEG;AAEH;;;;;;;GAOG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AACH,kCAFU,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAMlC;AAeD;IACE;;;;OAIG;IACH,oBAJW,MAAM,UACN,oBAAoB,GAAC,IAAI,eACzB,WAAW,OAAC,EAoBtB;IAfC;;;OAGG;IACH,iBAFU,MAAM,CAEI;IACpB;;;OAGG;IACH,iBAFU,oBAAoB,GAAC,IAAI,CAEf;IACpB,gCAA8B;IAC9B;;OAEG;IACH,cAFU,MAAM,OAAC,CAEO;IAG1B;;OAEG;IACH,sBAFW,MAAM,QAMhB;IAED;;OAEG;IACH,YAFY,QAAQ,CAInB;IAED,qBAEC;IAED,0BAMC;IAED;;;;;OAKG;IACH,gBAHW,MAAM,OACN,MAAM,QAOhB;IAED;;OAEG;IACH,UAFY,eAAe,CAK1B;IASD;;OAEG;IACH,qCAFY,MAAM,CAIjB;IAZD;;OAEG;IACH,2CAFW,MAAM,WAIhB;CAQF;AAED;;GAEG;AACH,sBAFgD,YAAY,SAA9C,gBAAgB,CAAC,eAAgB;IAG7C;;;;OAIG;IACH,oBAJW,KAAK,CAAC,YAAY,CAAC,UACnB,oBAAoB,GAAC,IAAI,eACzB,WAAW,OAAC,EAuBtB;IAnBC;;;OAGG;IACH,iBAFU,KAAK,CAAC,YAAY,CAAC,CAET;IACpB;;;OAGG;IACH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OAAK,EAAC,UAAQ,EAAC,IAAI,CAAC,GAAC,cAAc,CAAC,UAAQ,EAAC,OAAK,EAAC,UAAQ,EAAC,IAAI,CAAC,EAAC,IAAI,CAAC;sBA4QhF,MAAM,SAAzC,gBAAgB,CAAC,eAAgB,YAClC,KAAK,CAAC,GAAG,EAAC,EAAE,EAAC,MAAM,EAAC,MAAM,CAAC;6BAIS,MAAM,SAAzC,gBAAgB,CAAC,eAAgB,YAClC,YAAY,CAAC,GAAG,EAAC,EAAE,EAAC,MAAM,EAAC,MAAM,CAAC;0CAmBjC,gBAAgB,CAAC,eAAgB,IAClC,KAAK,CAAC,GAAG,EAAC,EAAE,EAAC,UAAQ,EAAC,KAAK,CAAC;iDAI3B,gBAAgB,CAAC,eAAgB,IAClC,YAAY,CAAC,GAAG,EAAC,EAAE,EAAC,UAAQ,EAAC,KAAK,CAAC;qCAkBnC;IAAG,CAAC,CAAC,EAAE,MAAM,GAAC,MAAM,GAAG,GAAG,CAAA;CAAG,IAC7B,KAAK,CAAC,GAAG,EAAC,OAAK,EAAC,KAAK,EAAC,KAAK,CAAC;4CAI5B;IAAG,CAAC,CAAC,EAAE,MAAM,GAAC,MAAM,GAAG,GAAG,CAAA;CAAG,IAC7B,YAAY,CAAC,GAAG,EAAC,OAAK,EAAC,KAAK,EAAC,KAAK,CAAC;mBAnlE7B,cAAc;sBANX,YAAY;+BAEH,sBAAsB;kCACnB,yBAAyB;sBAUrC,YAAY"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.js deleted file mode 100644 index 18d8f6d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.js +++ /dev/null @@ -1,2362 +0,0 @@ -/** - * @beta this API is about to change - * - * ## Mutability - * - * Deltas are mutable by default. But references are often shared, by marking a Delta as "done". You - * may only modify deltas by applying other deltas to them. Casting a Delta to a DeltaBuilder - * manually, will likely modify "shared" state. - */ - -import * as list from '../list.js' -import * as object from '../object.js' -import * as equalityTrait from '../trait/equality.js' -import * as fingerprintTrait from '../trait/fingerprint.js' -import * as arr from '../array.js' -import * as fun from '../function.js' -import * as s from '../schema.js' -import * as error from '../error.js' -import * as math from '../math.js' -import * as rabin from '../hash/rabin.js' -import * as encoding from '../encoding.js' -import * as buffer from '../buffer.js' -import * as patience from '../diff/patience.js' -import * as prng from '../prng.js' - -/** - * @typedef {{ - * insert?: string[] - * insertAt?: number - * delete?: string[] - * deleteAt?: number - * format?: Record - * formatAt?: number - * }} Attribution - */ - -/** - * @type {s.Schema} - */ -export const $attribution = s.$object({ - insert: s.$array(s.$string).optional, - insertAt: s.$number.optional, - delete: s.$array(s.$string).optional, - deleteAt: s.$number.optional, - format: s.$record(s.$string, s.$array(s.$string)).optional, - formatAt: s.$number.optional -}) - -/** - * @typedef {s.Unwrap<$anyOp>} DeltaOps - */ - -/** - * @typedef {{ [key: string]: any }} FormattingAttributes - */ - -/** - * @typedef {{ - * type: 'delta', - * name?: string, - * attrs?: { [Key in string|number]: DeltaAttrOpJSON }, - * children?: Array - * }} DeltaJSON - */ - -/** - * @typedef {{ type: 'insert', insert: string|Array, format?: { [key: string]: any }, attribution?: Attribution } | { delete: number } | { type: 'retain', retain: number, format?: { [key:string]: any }, attribution?: Attribution } | { type: 'modify', value: object }} DeltaListOpJSON - */ - -/** - * @typedef {{ type: 'insert', value: any, prevValue?: any, attribution?: Attribution } | { type: 'delete', prevValue?: any, attribution?: Attribution } | { type: 'modify', value: DeltaJSON }} DeltaAttrOpJSON - */ - -/** - * @typedef {TextOp|InsertOp|DeleteOp|RetainOp|ModifyOp} ChildrenOpAny - */ - -/** - * @typedef {AttrInsertOp|AttrDeleteOp|AttrModifyOp} AttrOpAny - */ - -/** - * @typedef {ChildrenOpAny|AttrOpAny} _OpAny - */ - -/** - * @type {s.Schema} - */ -export const $deltaMapChangeJson = s.$union( - s.$object({ type: s.$literal('insert'), value: s.$any, prevValue: s.$any.optional, attribution: $attribution.optional }), - s.$object({ type: s.$literal('modify'), value: s.$any }), - s.$object({ type: s.$literal('delete'), prevValue: s.$any.optional, attribution: $attribution.optional }) -) - -/** - * @template {{[key:string]: any} | null} Attrs - * @param {Attrs} attrs - * @return {Attrs} - */ -const _cloneAttrs = attrs => attrs == null ? attrs : { ...attrs } -/** - * @template {any} MaybeDelta - * @param {MaybeDelta} maybeDelta - * @return {MaybeDelta} - */ -const _markMaybeDeltaAsDone = maybeDelta => $deltaAny.check(maybeDelta) ? /** @type {MaybeDelta} */ (maybeDelta.done()) : maybeDelta - -export class TextOp extends list.ListNode { - /** - * @param {string} insert - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor (insert, format, attribution) { - super() - // Whenever this is modified, make sure to clear _fingerprint - /** - * @readonly - * @type {string} - */ - this.insert = insert - /** - * @readonly - * @type {FormattingAttributes|null} - */ - this.format = format - this.attribution = attribution - /** - * @type {string?} - */ - this._fingerprint = null - } - - /** - * @param {string} newVal - */ - _updateInsert (newVal) { - // @ts-ignore - this.insert = newVal - this._fingerprint = null - } - - /** - * @return {'insert'} - */ - get type () { - return 'insert' - } - - get length () { - return this.insert.length - } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 0) // textOp type: 0 - encoding.writeVarString(encoder, this.insert) - encoding.writeAny(encoder, this.format) - }))) - } - - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} offset - * @param {number} len - */ - _splice (offset, len) { - this._fingerprint = null - // @ts-ignore - this.insert = this.insert.slice(0, offset) + this.insert.slice(offset + len) - return this - } - - /** - * @return {DeltaListOpJSON} - */ - toJSON () { - const { insert, format, attribution } = this - return object.assign(/** @type {{type: 'insert', insert: string}} */ ({ type: 'insert', insert }), format != null ? { format } : ({}), attribution != null ? { attribution } : ({})) - } - - /** - * @param {TextOp} other - */ - [equalityTrait.EqualityTraitSymbol] (other) { - return fun.equalityDeep(this.insert, other.insert) && fun.equalityDeep(this.format, other.format) && fun.equalityDeep(this.attribution, other.attribution) - } - - /** - * @return {TextOp} - */ - clone (start = 0, end = this.length) { - return new TextOp(this.insert.slice(start, end), _cloneAttrs(this.format), _cloneAttrs(this.attribution)) - } -} - -/** - * @template {fingerprintTrait.Fingerprintable} ArrayContent - */ -export class InsertOp extends list.ListNode { - /** - * @param {Array} insert - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor (insert, format, attribution) { - super() - /** - * @readonly - * @type {Array} - */ - this.insert = insert - /** - * @readonly - * @type {FormattingAttributes?} - */ - this.format = format - /** - * @readonly - * @type {Attribution?} - */ - this.attribution = attribution - /** - * @type {string?} - */ - this._fingerprint = null - } - - /** - * @param {ArrayContent} newVal - */ - _updateInsert (newVal) { - // @ts-ignore - this.insert = newVal - this._fingerprint = null - } - - /** - * @return {'insert'} - */ - get type () { - return 'insert' - } - - get length () { - return this.insert.length - } - - /** - * @param {number} i - * @return {Extract} - */ - _modValue (i) { - /** - * @type {any} - */ - let d = this.insert[i] - this._fingerprint = null - $deltaAny.expect(d) - if (d.isDone) { - // @ts-ignore - this.insert[i] = (d = clone(d)) - return d - } - return d - } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 1) // insertOp type: 1 - encoding.writeVarUint(encoder, this.insert.length) - this.insert.forEach(ins => { - encoding.writeVarString(encoder, fingerprintTrait.fingerprint(ins)) - }) - encoding.writeAny(encoder, this.format) - }))) - } - - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} offset - * @param {number} len - */ - _splice (offset, len) { - this._fingerprint = null - this.insert.splice(offset, len) - return this - } - - /** - * @return {DeltaListOpJSON} - */ - toJSON () { - const { insert, format, attribution } = this - return object.assign({ type: /** @type {'insert'} */ ('insert'), insert: insert.map(ins => $deltaAny.check(ins) ? ins.toJSON() : ins) }, format ? { format } : ({}), attribution != null ? { attribution } : ({})) - } - - /** - * @param {InsertOp} other - */ - [equalityTrait.EqualityTraitSymbol] (other) { - return fun.equalityDeep(this.insert, other.insert) && fun.equalityDeep(this.format, other.format) && fun.equalityDeep(this.attribution, other.attribution) - } - - /** - * @return {InsertOp} - */ - clone (start = 0, end = this.length) { - return new InsertOp(this.insert.slice(start, end).map(_markMaybeDeltaAsDone), _cloneAttrs(this.format), _cloneAttrs(this.attribution)) - } -} - -/** - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - */ -export class DeleteOp extends list.ListNode { - /** - * @param {number} len - */ - constructor (len) { - super() - this.delete = len - /** - * @type {(Children|Text) extends never ? null : (Delta?)} - */ - this.prevValue = null - /** - * @type {string|null} - */ - this._fingerprint = null - } - - /** - * @return {'delete'} - */ - get type () { - return 'delete' - } - - get length () { - return 0 - } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 2) // deleteOp type: 2 - encoding.writeVarUint(encoder, this.delete) - }))) - } - - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} len - */ - _splice (_offset, len) { - this.prevValue = /** @type {any} */ (this.prevValue?.slice(_offset, len) || null) - this._fingerprint = null - this.delete -= len - return this - } - - /** - * @return {DeltaListOpJSON} - */ - toJSON () { - return { delete: this.delete } - } - - /** - * @param {DeleteOp} other - */ - [equalityTrait.EqualityTraitSymbol] (other) { - return this.delete === other.delete - } - - clone (start = 0, end = this.delete) { - return new DeleteOp(end - start) - } -} - -export class RetainOp extends list.ListNode { - /** - * @param {number} retain - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor (retain, format, attribution) { - super() - /** - * @readonly - * @type {number} - */ - this.retain = retain - /** - * @readonly - * @type {FormattingAttributes?} - */ - this.format = format - /** - * @readonly - * @type {Attribution?} - */ - this.attribution = attribution - /** - * @type {string|null} - */ - this._fingerprint = null - } - - /** - * @return {'retain'} - */ - get type () { - return 'retain' - } - - get length () { - return this.retain - } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 3) // retainOp type: 3 - encoding.writeVarUint(encoder, this.retain) - encoding.writeAny(encoder, this.format) - }))) - } - - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} len - */ - _splice (_offset, len) { - // @ts-ignore - this.retain -= len - this._fingerprint = null - return this - } - - /** - * @return {DeltaListOpJSON} - */ - toJSON () { - const { retain, format, attribution } = this - return object.assign({ type: /** @type {'retain'} */ ('retain'), retain }, format ? { format } : {}, attribution != null ? { attribution } : {}) - } - - /** - * @param {RetainOp} other - */ - [equalityTrait.EqualityTraitSymbol] (other) { - return this.retain === other.retain && fun.equalityDeep(this.format, other.format) && fun.equalityDeep(this.attribution, other.attribution) - } - - clone (start = 0, end = this.retain) { - return new RetainOp(end - start, _cloneAttrs(this.format), _cloneAttrs(this.attribution)) - } -} - -/** - * Delta that can be applied on a YType Embed - * - * @template {DeltaAny} [DTypes=DeltaAny] - */ -export class ModifyOp extends list.ListNode { - /** - * @param {DTypes} delta - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor (delta, format, attribution) { - super() - /** - * @readonly - * @type {DTypes} - */ - this.value = delta - /** - * @readonly - * @type {FormattingAttributes?} - */ - this.format = format - /** - * @readonly - * @type {Attribution?} - */ - this.attribution = attribution - /** - * @type {string|null} - */ - this._fingerprint = null - } - - /** - * @return {'modify'} - */ - get type () { - return 'modify' - } - - get length () { - return 1 - } - - /** - * @type {DeltaBuilderAny} - */ - get _modValue () { - /** - * @type {any} - */ - const d = this.value - this._fingerprint = null - if (d.isDone) { - // @ts-ignore - return (this.value = clone(d)) - } - return d - } - - get fingerprint () { - // don't cache fingerprint because we don't know when delta changes - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 4) // modifyOp type: 4 - encoding.writeVarString(encoder, this.value.fingerprint) - encoding.writeAny(encoder, this.format) - }))) - } - - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} _len - */ - _splice (_offset, _len) { - return this - } - - /** - * @return {DeltaListOpJSON} - */ - toJSON () { - const { value, attribution, format } = this - return object.assign({ type: /** @type {'modify'} */ ('modify'), value: value.toJSON() }, format ? { format } : {}, attribution != null ? { attribution } : {}) - } - - /** - * @param {ModifyOp} other - */ - [equalityTrait.EqualityTraitSymbol] (other) { - return this.value[equalityTrait.EqualityTraitSymbol](other.value) && fun.equalityDeep(this.format, other.format) && fun.equalityDeep(this.attribution, other.attribution) - } - - /** - * @return {ModifyOp} - */ - clone () { - return new ModifyOp(/** @type {DTypes} */ (this.value.done()), _cloneAttrs(this.format), _cloneAttrs(this.attribution)) - } -} - -/** - * @template {fingerprintTrait.Fingerprintable} V - * @template {string|number} [K=any] - */ -export class AttrInsertOp { - /** - * @param {K} key - * @param {V} value - * @param {V|undefined} prevValue - * @param {Attribution?} attribution - */ - constructor (key, value, prevValue, attribution) { - /** - * @readonly - * @type {K} - */ - this.key = key - /** - * @readonly - * @type {V} - */ - this.value = value - /** - * @readonly - * @type {V|undefined} - */ - this.prevValue = prevValue - /** - * @readonly - * @type {Attribution?} - */ - this.attribution = attribution - /** - * @type {string|null} - */ - this._fingerprint = null - } - - /** - * @return {'insert'} - */ - get type () { return 'insert' } - - /** - * @type {DeltaBuilderAny} - */ - get _modValue () { - /** - * @type {any} - */ - const v = this.value - this._fingerprint = null - if ($deltaAny.check(v) && v.isDone) { - // @ts-ignore - return (this.value = clone(v)) - } - return v - } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 5) // map insert type: 5 - encoding.writeAny(encoder, this.key) - if ($deltaAny.check(this.value)) { - encoding.writeUint8(encoder, 0) - encoding.writeVarString(encoder, this.value.fingerprint) - } else { - encoding.writeUint8(encoder, 1) - encoding.writeAny(encoder, this.value) - } - }))) - } - - toJSON () { - const v = this.value - const prevValue = this.prevValue - const attribution = this.attribution - return object.assign({ - type: this.type, - value: $deltaAny.check(v) ? v.toJSON() : v - }, attribution != null ? { attribution } : {}, prevValue !== undefined ? { prevValue } : {}) - } - - /** - * @param {AttrInsertOp} other - */ - [equalityTrait.EqualityTraitSymbol] (other) { - return this.key === other.key && fun.equalityDeep(this.value, other.value) && fun.equalityDeep(this.attribution, other.attribution) - } - - /** - * @return {AttrInsertOp} - */ - clone () { - return new AttrInsertOp(this.key, _markMaybeDeltaAsDone(this.value), _markMaybeDeltaAsDone(this.prevValue), _cloneAttrs(this.attribution)) - } -} - -/** - * @template V - * @template {string|number} [K=string] - */ -export class AttrDeleteOp { - /** - * @param {K} key - * @param {V|undefined} prevValue - * @param {Attribution?} attribution - */ - constructor (key, prevValue, attribution) { - /** - * @type {K} - */ - this.key = key - /** - * @type {V|undefined} - */ - this.prevValue = prevValue - this.attribution = attribution - /** - * @type {string|null} - */ - this._fingerprint = null - } - - get value () { return undefined } - - /** - * @type {'delete'} - */ - get type () { return 'delete' } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 6) // map delete type: 6 - encoding.writeAny(encoder, this.key) - }))) - } - - /** - * @return {DeltaAttrOpJSON} - */ - toJSON () { - const { - type, attribution, prevValue - } = this - return object.assign({ type }, attribution != null ? { attribution } : {}, prevValue !== undefined ? { prevValue } : {}) - } - - /** - * @param {AttrDeleteOp} other - */ - [equalityTrait.EqualityTraitSymbol] (other) { - return this.key === other.key && fun.equalityDeep(this.attribution, other.attribution) - } - - clone () { - return new AttrDeleteOp(this.key, _markMaybeDeltaAsDone(this.prevValue), _cloneAttrs(this.attribution)) - } -} - -/** - * @template {DeltaAny} [Modifier=DeltaAny] - * @template {string|number} [K=string] - */ -export class AttrModifyOp { - /** - * @param {K} key - * @param {Modifier} delta - */ - constructor (key, delta) { - /** - * @readonly - * @type {K} - */ - this.key = key - /** - * @readonly - * @type {Modifier} - */ - this.value = delta - /** - * @type {string|null} - */ - this._fingerprint = null - } - - /** - * @type {'modify'} - */ - get type () { return 'modify' } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 7) // map modify type: 7 - encoding.writeAny(encoder, this.key) - encoding.writeVarString(encoder, this.value.fingerprint) - }))) - } - - /** - * @return {DeltaBuilder} - */ - get _modValue () { - this._fingerprint = null - if (this.value.isDone) { - // @ts-ignore - this.value = /** @type {any} */ (clone(this.value)) - } - // @ts-ignore - return this.value - } - - /** - * @return {DeltaAttrOpJSON} - */ - toJSON () { - return { - type: this.type, - value: this.value.toJSON() - } - } - - /** - * @param {AttrModifyOp} other - */ - [equalityTrait.EqualityTraitSymbol] (other) { - return this.key === other.key && this.value[equalityTrait.EqualityTraitSymbol](other.value) - } - - /** - * @return {AttrModifyOp} - */ - clone () { - return new AttrModifyOp(this.key, /** @type {Modifier} */ (this.value.done())) - } -} - -/** - * @type {s.Schema | DeleteOp>} - */ -export const $deleteOp = s.$custom(o => o != null && (o.constructor === DeleteOp || o.constructor === AttrDeleteOp)) - -/** - * @type {s.Schema | InsertOp>} - */ -export const $insertOp = s.$custom(o => o != null && (o.constructor === AttrInsertOp || o.constructor === InsertOp)) - -/** - * @template {fingerprintTrait.Fingerprintable} Content - * @param {s.Schema} $content - * @return {s.Schema | InsertOp>} - */ -export const $insertOpWith = $content => s.$custom(o => - o != null && ( - (o.constructor === AttrInsertOp && $content.check(/** @type {AttrInsertOp} */ (o).value)) || - (o.constructor === InsertOp && /** @type {InsertOp} */ (o).insert.every(ins => $content.check(ins))) - ) -) - -/** - * @type {s.Schema} - */ -export const $textOp = s.$constructedBy(TextOp) - -/** - * @type {s.Schema} - */ -export const $retainOp = s.$constructedBy(RetainOp) - -/** - * @type {s.Schema} - */ -export const $modifyOp = s.$custom(o => o != null && (o.constructor === AttrModifyOp || o.constructor === ModifyOp)) - -/** - * @template {DeltaAny} Modify - * @param {s.Schema} $content - * @return {s.Schema | ModifyOp>} - */ -export const $modifyOpWith = $content => s.$custom(o => - o != null && ( - (o.constructor === AttrModifyOp && $content.check(/** @type {AttrModifyOp} */ (o).value)) || - (o.constructor === ModifyOp && $content.check(/** @type {ModifyOp} */ (o).value)) - ) -) - -export const $anyOp = s.$union($insertOp, $deleteOp, $textOp, $modifyOp) - -/** - * @template {Array|string} C1 - * @template {Array|string} C2 - * @typedef {Extract> extends never - * ? never - * : (Array<(Extract> extends Array ? (unknown extends AC1 ? never : AC1) : never)>)} MergeListArrays - */ - -/** - * @template {{[Key in string|number]: any}} Attrs - * @template {string|number} Key - * @template {any} Val - * @typedef {{ [K in (Key | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (Key extends K ? Val : never) }} AddToAttrs - */ - -/** - * @template {{[Key in string|number|symbol]: any}} Attrs - * @template {{[Key in string|number|symbol]: any}} NewAttrs - * @typedef {{ [K in (keyof NewAttrs | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (unknown extends NewAttrs[K] ? never : NewAttrs[K]) }} MergeAttrs - */ - -/** - * @template X - * @typedef {0 extends (1 & X) ? null : X} _AnyToNull - */ - -/** - * @template {s.Schema>|null} Schema - * @typedef {_AnyToNull extends null ? Delta : (Schema extends s.Schema ? D : never)} AllowedDeltaFromSchema - */ - -/** - * @typedef {Delta} DeltaAny - */ -/** - * @typedef {DeltaBuilder} DeltaBuilderAny - */ - -/** - * @template {string} [NodeName=any] - * @template {{[k:string|number]:any}} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - * @template {s.Schema>|null} [Schema=any] - */ -export class Delta { - /** - * @param {NodeName} [name] - * @param {Schema} [$schema] - */ - constructor (name, $schema) { - this.name = name || null - this.$schema = $schema || null - /** - * @type {{ [K in keyof Attrs]?: K extends string|number ? (AttrInsertOp|AttrDeleteOp|(Delta extends Attrs[K] ? AttrModifyOp,K> : never)) : never } - * & { [Symbol.iterator]: () => Iterator<{ [K in keyof Attrs]: K extends string|number ? (AttrInsertOp|AttrDeleteOp|(Delta extends Attrs[K] ? AttrModifyOp,K> : never)) : never }[keyof Attrs]> } - * } - */ - this.attrs = /** @type {any} */ ({ - * [Symbol.iterator] () { - for (const k in this) { - yield this[k] - } - } - }) - - /** - * @type {list.List< - * RetainOp - * | DeleteOp - * | (Text extends never ? never : TextOp) - * | (Children extends never ? never : InsertOp) - * | (Delta extends Children ? ModifyOp>> : never) - * >} - */ - this.children = /** @type {any} */ (list.create()) - this.childCnt = 0 - /** - * @type {any} - */ - this.origin = null - /** - * @type {string|null} - */ - this._fingerprint = null - this.isDone = false - } - - /** - * @type {string} - */ - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeUint32(encoder, 0xf2ae5680) // "magic number" that ensures that different types of content don't yield the same fingerprint - encoding.writeAny(encoder, this.name) - /** - * @type {Array} - */ - const keys = [] - for (const attr of this.attrs) { - keys.push(attr.key) - } - keys.sort((a, b) => { - const aIsString = s.$string.check(a) - const bIsString = s.$string.check(b) - // numbers first - // in ascending order - return (aIsString && bIsString) - ? a.localeCompare(b) - : (aIsString ? 1 : (bIsString ? -1 : (a - b))) - }) - encoding.writeVarUint(encoder, keys.length) - for (const key of keys) { - encoding.writeVarString(encoder, /** @type {any} */ (this.attrs[/** @type {keyof Attrs} */ (key)]).fingerprint) - } - encoding.writeVarUint(encoder, this.children.len) - for (const child of this.children) { - encoding.writeVarString(encoder, child.fingerprint) - } - return buffer.toBase64(rabin.fingerprint(rabin.StandardIrreducible128, encoding.toUint8Array(encoder))) - }))) - } - - [fingerprintTrait.FingerprintTraitSymbol] () { - return this.fingerprint - } - - isEmpty () { - return object.isEmpty(this.attrs) && list.isEmpty(this.children) - } - - /** - * @return {DeltaJSON} - */ - toJSON () { - const name = this.name - /** - * @type {any} - */ - const attrs = {} - /** - * @type {any} - */ - const children = [] - for (const attr of this.attrs) { - attrs[attr.key] = attr.toJSON() - } - this.children.forEach(val => { - children.push(val.toJSON()) - }) - return object.assign( - { type: /** @type {'delta'} */ ('delta') }, - (name != null ? { name } : {}), - (object.isEmpty(attrs) ? {} : { attrs }), - (children.length > 0 ? { children } : {}) - ) - } - - /** - * @param {Delta} other - * @return {boolean} - */ - equals (other) { - return this[equalityTrait.EqualityTraitSymbol](other) - } - - /** - * @param {any} other - * @return {boolean} - */ - [equalityTrait.EqualityTraitSymbol] (other) { - // @todo it is only necessary to compare finrerprints OR do a deep equality check (remove - // childCnt as well) - return this.name === other.name && fun.equalityDeep(this.attrs, other.attrs) && fun.equalityDeep(this.children, other.children) && this.childCnt === other.childCnt - } - - /** - * @return {DeltaBuilder} - */ - clone () { - return this.slice(0, this.childCnt) - } - - /** - * @param {number} start - * @param {number} end - * @return {DeltaBuilder} - */ - slice (start = 0, end = this.childCnt) { - const cpy = /** @type {DeltaAny} */ (new DeltaBuilder(/** @type {any} */ (this.name), this.$schema)) - cpy.origin = this.origin - // copy attrs - for (const op of this.attrs) { - cpy.attrs[op.key] = /** @type {any} */ (op.clone()) - } - // copy children - const slicedLen = end - start - let remainingLen = slicedLen - /** - * @type {ChildrenOpAny?} - */ - let currNode = this.children.start - let currNodeOffset = 0 - while (start > 0 && currNode != null) { - if (currNode.length <= start) { - start -= currNode.length - currNode = currNode.next - } else { - currNodeOffset = start - start = 0 - } - } - if (currNodeOffset > 0 && currNode) { - const ncpy = currNode.clone(currNodeOffset, currNodeOffset + math.min(remainingLen, currNode.length - currNodeOffset)) - list.pushEnd(cpy.children, ncpy) - remainingLen -= ncpy.length - currNode = currNode.next - } - while (currNode != null && currNode.length <= remainingLen) { - list.pushEnd(cpy.children, currNode.clone()) - remainingLen -= currNode.length - currNode = currNode.next - } - if (currNode != null && remainingLen > 0) { - list.pushEnd(cpy.children, currNode.clone(0, remainingLen)) - remainingLen -= math.min(currNode.length, remainingLen) - } - cpy.childCnt = slicedLen - remainingLen - // @ts-ignore - return cpy - } - - /** - * Mark this delta as done and perform some cleanup (e.g. remove appended retains without - * formats&attributions). In the future, there might be additional merge operations that can be - * performed to result in smaller deltas. Set `markAsDone=false` to only perform the cleanup. - * - * @return {Delta} - */ - done (markAsDone = true) { - if (!this.isDone) { - this.isDone = markAsDone - const cs = this.children - for (let end = cs.end; end !== null && $retainOp.check(end) && end.format == null && end.attribution == null; end = cs.end) { - this.childCnt -= end.length - list.popEnd(cs) - } - } - return this - } -} - -/** - * @template {DeltaAny} D - * @param {D} d - * @return {D extends DeltaBuilder ? DeltaBuilder : never} - */ -export const clone = d => /** @type {any} */ (d.slice(0, d.childCnt)) - -/** - * Try merging this op with the previous op - * @param {list.List} parent - * @param {InsertOp|RetainOp|DeleteOp|TextOp|ModifyOp} op - */ -const tryMergeWithPrev = (parent, op) => { - const prevOp = op.prev - if ( - prevOp?.constructor !== op.constructor || - ( - (!$deleteOp.check(op) && !$modifyOp.check(op)) && (!fun.equalityDeep(op.format, /** @type {InsertOp} */ (prevOp).format) || !fun.equalityDeep(op.attribution, /** @type {InsertOp} */ (prevOp).attribution)) - ) - ) { - // constructor mismatch or format/attribution mismatch - return - } - // can be merged - if ($insertOp.check(op)) { - /** @type {InsertOp} */ (prevOp).insert.push(...op.insert) - } else if ($retainOp.check(op)) { - // @ts-ignore - /** @type {RetainOp} */ (prevOp).retain += op.retain - } else if ($deleteOp.check(op)) { - /** @type {DeleteOp} */ (prevOp).delete += op.delete - } else if ($textOp.check(op)) { - /** @type {TextOp} */ (prevOp)._updateInsert(/** @type {TextOp} */ (prevOp).insert + op.insert) - } else { - error.unexpectedCase() - } - list.remove(parent, op) -} - -/** - * Ensures that the delta can be edited. clears _fingerprint cache. - * - * @param {any} d - */ -const modDeltaCheck = d => { - if (d.isDone) { - /** - * You tried to modify a delta after it has been marked as "done". - */ - throw error.create("Readonly Delta can't be modified") - } - d._fingerprint = null -} - -/** - * @template {string} [NodeName=any] - * @template {{[key:string|number]:any}} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - * @template {s.Schema>|null} [Schema=any] - * @extends {Delta} - */ -export class DeltaBuilder extends Delta { - /** - * @param {NodeName} [name] - * @param {Schema} [$schema] - */ - constructor (name, $schema) { - super(name, $schema) - /** - * @type {FormattingAttributes?} - */ - this.usedAttributes = null - /** - * @type {Attribution?} - */ - this.usedAttribution = null - } - - /** - * @param {Attribution?} attribution - */ - useAttribution (attribution) { - modDeltaCheck(this) - this.usedAttribution = attribution - return this - } - - /** - * @param {FormattingAttributes?} attributes - * @return {this} - */ - useAttributes (attributes) { - modDeltaCheck(this) - this.usedAttributes = attributes - return this - } - - /** - * @param {string} name - * @param {any} value - */ - updateUsedAttributes (name, value) { - modDeltaCheck(this) - if (value == null) { - this.usedAttributes = object.assign({}, this.usedAttributes) - delete this.usedAttributes?.[name] - if (object.isEmpty(this.usedAttributes)) { - this.usedAttributes = null - } - } else if (!fun.equalityDeep(this.usedAttributes?.[name], value)) { - this.usedAttributes = object.assign({}, this.usedAttributes) - this.usedAttributes[name] = value - } - return this - } - - /** - * @template {keyof Attribution} NAME - * @param {NAME} name - * @param {Attribution[NAME]?} value - */ - updateUsedAttribution (name, value) { - modDeltaCheck(this) - if (value == null) { - this.usedAttribution = object.assign({}, this.usedAttribution) - delete this.usedAttribution?.[name] - if (object.isEmpty(this.usedAttribution)) { - this.usedAttribution = null - } - } else if (!fun.equalityDeep(this.usedAttribution?.[name], value)) { - this.usedAttribution = object.assign({}, this.usedAttribution) - this.usedAttribution[name] = value - } - return this - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? ((Children extends never ? never : Array) | Text) : never} NewContent - * @param {NewContent} insert - * @param {FormattingAttributes?} [formatting] - * @param {Attribution?} [attribution] - * @return {DeltaBuilder< - * NodeName, - * Attrs, - * Exclude[number]|Children, - * (Extract|Text) extends never ? never : string, - * Schema - * >} - */ - insert (insert, formatting = null, attribution = null) { - modDeltaCheck(this) - const mergedAttributes = mergeAttrs(this.usedAttributes, formatting) - const mergedAttribution = mergeAttrs(this.usedAttribution, attribution) - /** - * @param {TextOp | InsertOp} lastOp - */ - const checkMergedEquals = lastOp => (mergedAttributes === lastOp.format || fun.equalityDeep(mergedAttributes, lastOp.format)) && (mergedAttribution === lastOp.attribution || fun.equalityDeep(mergedAttribution, lastOp.attribution)) - const end = this.children.end - if (s.$string.check(insert)) { - if ($textOp.check(end) && checkMergedEquals(end)) { - end._updateInsert(end.insert + insert) - } else if (insert.length > 0) { - list.pushEnd(this.children, new TextOp(insert, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution)) - } - this.childCnt += insert.length - } else if (arr.isArray(insert)) { - if ($insertOp.check(end) && checkMergedEquals(end)) { - // @ts-ignore - end.insert.push(...insert) - end._fingerprint = null - } else if (insert.length > 0) { - list.pushEnd(this.children, new InsertOp(insert, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution)) - } - this.childCnt += insert.length - } - return /** @type {any} */ (this) - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? Extract> : never} NewContent - * @param {NewContent} modify - * @param {FormattingAttributes?} formatting - * @param {Attribution?} attribution - * @return {DeltaBuilder< - * NodeName, - * Attrs, - * Exclude[number]|Children, - * (Extract|Text) extends string ? string : never, - * Schema - * >} - */ - modify (modify, formatting = null, attribution = null) { - modDeltaCheck(this) - const mergedAttributes = mergeAttrs(this.usedAttributes, formatting) - const mergedAttribution = mergeAttrs(this.usedAttribution, attribution) - list.pushEnd(this.children, new ModifyOp(modify, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution)) - this.childCnt += 1 - return /** @type {any} */ (this) - } - - /** - * @param {number} len - * @param {FormattingAttributes?} [format] - * @param {Attribution?} [attribution] - */ - retain (len, format = null, attribution = null) { - modDeltaCheck(this) - const mergedFormats = mergeAttrs(this.usedAttributes, format) - const mergedAttribution = mergeAttrs(this.usedAttribution, attribution) - const lastOp = /** @type {RetainOp|InsertOp} */ (this.children.end) - if (lastOp instanceof RetainOp && fun.equalityDeep(mergedFormats, lastOp.format) && fun.equalityDeep(mergedAttribution, lastOp.attribution)) { - // @ts-ignore - lastOp.retain += len - } else if (len > 0) { - list.pushEnd(this.children, new RetainOp(len, mergedFormats, mergedAttribution)) - } - this.childCnt += len - return this - } - - /** - * @param {number} len - */ - delete (len) { - modDeltaCheck(this) - const lastOp = /** @type {DeleteOp|InsertOp} */ (this.children.end) - if (lastOp instanceof DeleteOp) { - lastOp.delete += len - } else if (len > 0) { - list.pushEnd(this.children, new DeleteOp(len)) - } - this.childCnt += len - return this - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? (keyof Attrs) : never} Key - * @template {AllowedDeltaFromSchema extends Delta ? (Attrs[Key]) : never} Val - * @param {Key} key - * @param {Val} val - * @param {Attribution?} attribution - * @param {Val|undefined} [prevValue] - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - set (key, val, attribution = null, prevValue) { - modDeltaCheck(this) - this.attrs[key] = /** @type {any} */ (new AttrInsertOp(key, val, prevValue, mergeAttrs(this.usedAttribution, attribution))) - return /** @type {any} */ (this) - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? Attrs : never} NewAttrs - * @param {NewAttrs} attrs - * @param {Attribution?} attribution - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof MergeAttrs]: MergeAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - setMany (attrs, attribution = null) { - modDeltaCheck(this) - for (const k in attrs) { - this.set(/** @type {any} */ (k), attrs[k], attribution) - } - return /** @type {any} */ (this) - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? keyof As : never} Key - * @param {Key} key - * @param {Attribution?} attribution - * @param {any} [prevValue] - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - unset (key, attribution = null, prevValue) { - modDeltaCheck(this) - this.attrs[key] = /** @type {any} */ (new AttrDeleteOp(key, prevValue, mergeAttrs(this.usedAttribution, attribution))) - return /** @type {any} */ (this) - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? { [K in keyof As]: Extract> extends never ? never : K }[keyof As] : never} Key - * @template {AllowedDeltaFromSchema extends Delta ? Extract> : never} D - * @param {Key} key - * @param {D} modify - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - update (key, modify) { - modDeltaCheck(this) - this.attrs[key] = /** @type {any} */ (new AttrModifyOp(key, modify)) - return /** @type {any} */ (this) - } - - /** - * @param {Delta} other - */ - apply (other) { - modDeltaCheck(this) - this.$schema?.expect(other) - // apply attrs - for (const op of other.attrs) { - const c = /** @type {AttrInsertOp|AttrDeleteOp|AttrModifyOp} */ (this.attrs[op.key]) - if ($modifyOp.check(op)) { - if ($deltaAny.check(c?.value)) { - c._modValue.apply(op.value) - } else { - // then this is a simple modify - // @ts-ignore - this.attrs[op.key] = op.clone() - } - } else if ($insertOp.check(op)) { - // @ts-ignore - op.prevValue = c?.value - // @ts-ignore - this.attrs[op.key] = op.clone() - } else if ($deleteOp.check(op)) { - op.prevValue = c?.value - delete this.attrs[op.key] - } - } - // apply children - /** - * @type {ChildrenOpAny?} - */ - let opsI = this.children.start - let offset = 0 - /** - * At the end, we will try to merge this op, and op.next op with their respective previous op. - * - * Hence, anytime an op is cloned, deleted, or inserted (anytime list.* api is used) we must add - * an op to maybeMergeable. - * - * @type {Array|RetainOp|DeleteOp|TextOp|ModifyOp>} - */ - const maybeMergeable = [] - /** - * @template {InsertOp|RetainOp|DeleteOp|TextOp|ModifyOp|null} OP - * @param {OP} op - * @return {OP} - */ - const scheduleForMerge = op => { - op && maybeMergeable.push(op) - return op - } - other.children.forEach(op => { - if ($textOp.check(op) || $insertOp.check(op)) { - if (offset === 0) { - list.insertBetween(this.children, opsI == null ? this.children.end : opsI.prev, opsI, scheduleForMerge(op.clone())) - } else { - // @todo inmplement "splitHelper" and "insertHelper" - I'm splitting all the time and - // forget to update opsI - if (opsI == null) error.unexpectedCase() - const cpy = scheduleForMerge(opsI.clone(offset)) - opsI._splice(offset, opsI.length - offset) - list.insertBetween(this.children, opsI, opsI.next || null, cpy) - list.insertBetween(this.children, opsI, cpy || null, scheduleForMerge(op.clone())) - opsI = cpy - offset = 0 - } - this.childCnt += op.insert.length - } else if ($retainOp.check(op)) { - let retainLen = op.length - - if (offset > 0 && opsI != null && op.format != null && !$deleteOp.check(opsI) && !object.every(op.format, (v, k) => fun.equalityDeep(v, /** @type {InsertOp|RetainOp|ModifyOp} */ (opsI).format?.[k] || null))) { - // need to split current op - const cpy = scheduleForMerge(opsI.clone(offset)) - opsI._splice(offset, opsI.length - offset) - list.insertBetween(this.children, opsI, opsI.next || null, cpy) - opsI = cpy - offset = 0 - } - - while (opsI != null && opsI.length - offset <= retainLen) { - op.format != null && updateOpFormat(opsI, op.format) - retainLen -= opsI.length - offset - opsI = opsI?.next || null - offset = 0 - } - - if (opsI != null) { - if (op.format != null && retainLen > 0) { - // split current op and apply format - const cpy = scheduleForMerge(opsI.clone(retainLen)) - opsI._splice(retainLen, opsI.length - retainLen) - list.insertBetween(this.children, opsI, opsI.next || null, cpy) - updateOpFormat(opsI, op.format) - opsI = cpy - } else { - offset += retainLen - } - } else if (retainLen > 0) { - list.pushEnd(this.children, scheduleForMerge(new RetainOp(retainLen, op.format, op.attribution))) - this.childCnt += retainLen - } - } else if ($deleteOp.check(op)) { - let remainingLen = op.delete - while (remainingLen > 0) { - if (opsI == null) { - list.pushEnd(this.children, scheduleForMerge(new DeleteOp(remainingLen))) - this.childCnt += remainingLen - break - } else if (opsI instanceof DeleteOp) { - const delLen = opsI.length - offset - // the same content can't be deleted twice, remove duplicated deletes - if (delLen >= remainingLen) { - offset = 0 - opsI = opsI.next - } else { - offset += remainingLen - } - remainingLen -= delLen - } else { // insert / embed / retain / modify ⇒ replace - // case1: delete o fully - // case2: delete some part of beginning - // case3: delete some part of end - // case4: delete some part of center - const delLen = math.min(opsI.length - offset, remainingLen) - this.childCnt -= delLen - if (opsI.length === delLen) { - // case 1 - offset = 0 - scheduleForMerge(opsI.next) - list.remove(this.children, opsI) - opsI = opsI.next - } else if (offset === 0) { - // case 2 - offset = 0 - opsI._splice(0, delLen) - } else if (offset + delLen === opsI.length) { - // case 3 - opsI._splice(offset, delLen) - offset = 0 - opsI = opsI.next - } else { - // case 4 - opsI._splice(offset, delLen) - } - remainingLen -= delLen - } - } - } else if ($modifyOp.check(op)) { - if (opsI == null) { - list.pushEnd(this.children, op.clone()) - this.childCnt += 1 - return - } - if ($modifyOp.check(opsI)) { - opsI._modValue.apply(op.value) - } else if ($insertOp.check(opsI)) { - opsI._modValue(offset).apply(op.value) - } else if ($retainOp.check(opsI)) { - if (offset > 0) { - const cpy = scheduleForMerge(opsI.clone(0, offset)) // skipped len - opsI._splice(0, offset) // new remainder - list.insertBetween(this.children, opsI.prev, opsI, cpy) // insert skipped len - offset = 0 - } - list.insertBetween(this.children, opsI.prev, opsI, scheduleForMerge(op.clone())) // insert skipped len - if (opsI.length === 1) { - list.remove(this.children, opsI) - } else { - opsI._splice(0, 1) - scheduleForMerge(opsI) - } - } else if ($deleteOp.check(opsI)) { - // nop - } else { - error.unexpectedCase() - } - } else { - error.unexpectedCase() - } - }) - maybeMergeable.forEach(op => { - // check if this is still integrated - if (op.prev?.next === op) { - tryMergeWithPrev(this.children, op) - op.next && tryMergeWithPrev(this.children, op.next) - } - }) - return this - } - - /** - * @param {DeltaAny} other - * @param {boolean} priority - */ - rebase (other, priority) { - modDeltaCheck(this) - /** - * Rebase attributes - * - * - insert vs delete ⇒ insert takes precedence - * - insert vs modify ⇒ insert takes precedence - * - insert vs insert ⇒ priority decides - * - delete vs modify ⇒ delete takes precedence - * - delete vs delete ⇒ current delete op is removed because item has already been deleted - * - modify vs modify ⇒ rebase using priority - */ - for (const op of this.attrs) { - if ($insertOp.check(op)) { - if ($insertOp.check(other.attrs[op.key]) && !priority) { - delete this.attrs[op.key] - } - } else if ($deleteOp.check(op)) { - const otherOp = other.attrs[/** @type {any} */ (op.key)] - if ($insertOp.check(otherOp)) { - delete this.attrs[otherOp.key] - } - } else if ($modifyOp.check(op)) { - const otherOp = other.attrs[/** @type {any} */ (op.key)] - if (otherOp == null) { - // nop - } else if ($modifyOp.check(otherOp)) { - op._modValue.rebase(otherOp.value, priority) - } else { - delete this.attrs[otherOp.key] - } - } - } - /** - * Rebase children. - * - * Precedence: insert with higher priority comes first. Op with less priority is transformed to - * be inserted later. - * - * @todo always check if inser OR text - */ - /** - * @type {ChildrenOpAny?} - */ - let currChild = this.children.start - let currOffset = 0 - /** - * @type {ChildrenOpAny?} - */ - let otherChild = other.children.start - let otherOffset = 0 - while (currChild != null && otherChild != null) { - if ($insertOp.check(currChild) || $textOp.check(currChild)) { - /** - * Transforming *insert*. If other is.. - * - insert: transform based on priority - * - retain/delete/modify: transform next op against other - */ - if ($insertOp.check(otherChild) || $modifyOp.check(otherChild) || $textOp.check(otherChild)) { - if (!priority) { - list.insertBetween(this.children, currChild.prev, currChild, new RetainOp(otherChild.length, null, null)) - this.childCnt += otherChild.length - // curr is transformed against other, transform curr against next - otherOffset = otherChild.length - } else { - // curr stays as is, transform next op - currOffset = currChild.length - } - } else { // otherChild = delete | retain | modify - curr stays as is, transform next op - currOffset = currChild.length - } - } else if ($modifyOp.check(currChild)) { - /** - * Transforming *modify*. If other is.. - * - insert: adjust position - * - modify: rebase curr modify on other modify - * - delete: remove modify - * - retain: adjust offset - */ - if ($insertOp.check(otherChild) || $textOp.check(otherChild)) { - // @todo: with all list changes (retain insertions, removal), try to merge the surrounding - // ops later - list.insertBetween(this.children, currChild.prev, currChild, new RetainOp(otherChild.length, null, null)) - this.childCnt += otherChild.length - // curr is transformed against other, transform curr against next - otherOffset = otherChild.length - } else { - if ($modifyOp.check(otherChild)) { - /** @type {any} */ (currChild.value).rebase(otherChild, priority) - } else if ($deleteOp.check(otherChild)) { - list.remove(this.children, currChild) - this.childCnt -= 1 - } - currOffset += 1 - otherOffset += 1 - } - } else { // DeleteOp | RetainOp - const maxCommonLen = math.min(currChild.length - currOffset, otherChild.length - otherOffset) - /** - * Transforming *retain* OR *delete*. If other is.. - * - retain / modify: adjust offsets - * - delete: shorten curr op - * - insert: split curr op and insert retain - */ - if ($retainOp.check(otherChild) || $modifyOp.check(otherChild)) { - currOffset += maxCommonLen - otherOffset += maxCommonLen - } else if ($deleteOp.check(otherChild)) { - if ($retainOp.check(currChild)) { - // @ts-ignore - currChild.retain -= maxCommonLen - } else if ($deleteOp.check(currChild)) { - currChild.delete -= maxCommonLen - } - this.childCnt -= maxCommonLen - } else { // insert/text.check(currOp) - if (currOffset > 0) { - const leftPart = currChild.clone(currOffset) - list.insertBetween(this.children, currChild.prev, currChild, leftPart) - currChild._splice(currOffset, currChild.length - currOffset) - currOffset = 0 - } - list.insertBetween(this.children, currChild.prev, currChild, new RetainOp(otherChild.length, null, null)) - this.childCnt += otherChild.length - otherOffset = otherChild.length - } - } - if (currOffset >= currChild.length) { - currChild = currChild.next - currOffset = 0 - } - if (otherOffset >= otherChild.length) { - otherChild = otherChild.next - otherOffset = 0 - } - } - return this - } - - /** - * Same as doing `delta.rebase(other.inverse())`, without creating a temporary delta. - * - * @param {DeltaAny} other - * @param {boolean} priority - */ - rebaseOnInverse (other, priority) { - modDeltaCheck(this) - // @todo - console.info('method rebaseOnInverse unimplemented') - return this - } - - /** - * Append child ops from one op to the other. - * - * delta.create().insert('a').append(delta.create().insert('b')) // => insert "ab" - * - * @template {DeltaAny} OtherDelta - * @param {OtherDelta} other - * @return {CastToDelta extends Delta ? DeltaBuilder : never} - */ - append (other) { - const children = this.children - const prevLast = children.end - // @todo Investigate. Above is a typescript issue. It is necessary to cast OtherDelta to a Delta first before - // inferring type, otherwise Children will contain Text. - for (const child of other.children) { - list.pushEnd(children, child.clone()) - } - this.childCnt += other.childCnt - prevLast?.next && tryMergeWithPrev(children, prevLast.next) - // @ts-ignore - return this - } -} - -/** - * @param {ChildrenOpAny} op - * @param {{[k:string]:any}} formatUpdate - */ -const updateOpFormat = (op, formatUpdate) => { - if (!$deleteOp.check(op)) { - // apply formatting attributes - for (const k in formatUpdate) { - const v = formatUpdate[k] - if (v != null || $retainOp.check(op)) { - // never modify formats - /** @type {any} */ (op).format = object.assign({}, op.format, { [k]: v }) - } else if (op.format != null) { - const { [k]: _, ...rest } = op.format - ;/** @type {any} */ (op).format = rest - } - } - } -} - -/** - * @template {DeltaAny} D - * @typedef {D extends DeltaBuilder ? Delta : D} CastToDelta - */ - -/** - * @template {string} NodeName - * @template {{ [key: string|number]: any }} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable|never} [Children=never] - * @template {string|never} [Text=never] - * @typedef {Delta|RecursiveDelta,Text>} RecursiveDelta - */ - -/** - * @template {string} Name - * @template {{[k:string|number]:any}} Attrs - * @template {fingerprintTrait.Fingerprintable} Children - * @template {boolean} HasText - * @template {{ [k:string]:any }} Formats - * @template {boolean} Recursive - * @extends {s.Schema : never), - * HasText extends true ? string : never, - * any>>} - */ -export class $Delta extends s.Schema { - /** - * @param {s.Schema} $name - * @param {s.Schema} $attrs - * @param {s.Schema} $children - * @param {HasText} hasText - * @param {s.Schema} $formats - * @param {Recursive} recursive - */ - constructor ($name, $attrs, $children, hasText, $formats, recursive) { - super() - const $attrsPartial = s.$$object.check($attrs) ? $attrs.partial : $attrs - if (recursive) { - // @ts-ignore - $children = s.$union($children, this) - } - this.shape = { $name, $attrs: $attrsPartial, $children, hasText, $formats } - } - - /** - * @param {any} o - * @param {s.ValidationError} [err] - * @return {o is Delta< - * Name, - * Attrs, - * Children|(Recursive extends true ? RecursiveDelta : never), - * HasText extends true ? string : never, - * any>} - */ - check (o, err = undefined) { - const { $name, $attrs, $children, hasText, $formats } = this.shape - if (!(o instanceof Delta)) { - err?.extend(null, 'Delta', o?.constructor.name, 'Constructor match failed') - } else if (o.name != null && !$name.check(o.name, err)) { - err?.extend('Delta.name', $name.toString(), o.name, 'Unexpected node name') - } else if (list.toArray(o.children).some(c => (!hasText && $textOp.check(c)) || (hasText && $textOp.check(c) && c.format != null && !$formats.check(c.format)) || ($insertOp.check(c) && !c.insert.every(ins => $children.check(ins))))) { - err?.extend('Delta.children', '', '', 'Children don\'t match the schema') - } else if (object.some(o.attrs, (op, k) => $insertOp.check(op) && !$attrs.check({ [k]: op.value }, err))) { - err?.extend('Delta.attrs', '', '', 'Attrs don\'t match the schema') - } else { - return true - } - return false - } -} - -/** - * @template {s.Schema|string|Array} [NodeNameSchema=s.Schema] - * @template {s.Schema<{ [key: string|number]: any }>|{ [key:string|number]:any }} [AttrsSchema=s.Schema<{}>] - * @template {any} [ChildrenSchema=s.Schema] - * @template {boolean} [HasText=false] - * @template {boolean} [Recursive=false] - * @template {{ [k:string]:any }} [Formats={[k:string]:any}] - * @param {object} opts - * @param {NodeNameSchema?} [opts.name] - * @param {AttrsSchema?} [opts.attrs] What key-value pairs are included. - * @param {ChildrenSchema?} [opts.children] The type of content in `insertOp` - * @param {HasText} [opts.text] Whether this delta contains text using `textOp` - * @param {Formats} [opts.formats] - * @param {Recursive} [opts.recursive] - * @return {[s.Unwrap>,s.Unwrap>,s.Unwrap>] extends [infer NodeName, infer Attrs, infer Children] ? s.Schema : never), - * HasText extends true ? string : never - * >> : never} - */ -export const $delta = ({ name, attrs, children, text, formats, recursive }) => /** @type {any} */ (new $Delta( - name == null ? s.$any : s.$(name), - /** @type {any} */ (attrs == null ? s.$object({}) : s.$(attrs)), - /** @type {any} */ (children == null ? s.$never : s.$(children)), - text ?? false, - formats == null ? s.$any : s.$(formats), - recursive ?? false -)) - -export const $$delta = s.$constructedBy($Delta) - -/** - * @todo remove this - * - * @template {s.Schema|string|Array} [NodeNameSchema=s.Schema] - * @template {s.Schema<{ [key: string|number]: any }>|{ [key:string|number]:any }} [AttrsSchema=s.Schema<{}>] - * @template {any} [ChildrenSchema=s.Schema] - * @template {boolean} [HasText=false] - * @template {boolean} [Recursive=false] - * @param {object} opts - * @param {NodeNameSchema?} [opts.name] - * @param {AttrsSchema?} [opts.attrs] - * @param {ChildrenSchema?} [opts.children] - * @param {HasText} [opts.text] - * @param {Recursive} [opts.recursive] - * @return {[s.Unwrap>,s.Unwrap>,s.Unwrap>] extends [infer NodeName, infer Attrs, infer Children] ? s.Schema : never), - * HasText extends true ? string : never - * >> : never} - */ -export const _$delta = ({ name, attrs, children, text, recursive }) => { - /** - * @type {s.Schema>} - */ - let $arrContent = children == null ? s.$never : s.$array(s.$(children)) - const $name = name == null ? s.$any : s.$(name) - const $attrsPartial = attrs == null ? s.$object({}) : (s.$$record.check(attrs) ? attrs : /** @type {any} */ (s.$(attrs)).partial) - const $d = s.$instanceOf(Delta, /** @param {Delta} d */ d => { - if ( - !$name.check(d.name) || - object.some(d.attrs, - (op, k) => $insertOp.check(op) && !$attrsPartial.check({ [k]: op.value }) - ) - ) return false - for (const op of d.children) { - if ((!text && $textOp.check(op)) || ($insertOp.check(op) && !$arrContent.check(op.insert))) { - return false - } - } - return true - }) - if (recursive) { - $arrContent = children == null ? s.$array($d) : s.$array(s.$(children), $d) - } - return /** @type {any} */ ($d) -} - -/** - * @type {s.Schema} - */ -export const $deltaAny = /** @type {any} */ (s.$instanceOf(Delta)) - -/** - * @type {s.Schema} - */ -export const $deltaBuilderAny = /** @type {any} */ (s.$instanceOf(DeltaBuilder)) - -/** - * Helper function to merge attribution and attributes. The latter input "wins". - * - * @template {{ [key: string]: any }} T - * @param {T | null} a - * @param {T | null} b - */ -export const mergeAttrs = (a, b) => object.isEmpty(a) - ? (object.isEmpty(b) ? null : b) - : (object.isEmpty(b) ? a : object.assign({}, a, b)) - -/** - * @template {DeltaAny|null} D - * @param {D} a - * @param {D} b - * @return {D} - */ -export const mergeDeltas = (a, b) => { - if (a != null && b != null) { - const c = clone(a) - c.apply(b) - return /** @type {any} */ (c) - } - return a == null ? b : (a || null) -} - -/** - * @template {DeltaAny} D - * @param {prng.PRNG} gen - * @param {s.Schema} $d - * @return {D extends Delta ? DeltaBuilder : never} - */ -export const random = (gen, $d) => { - const { $name, $attrs, $children, hasText, $formats: $formats_ } = /** @type {$Delta} */ (/** @type {any} */ ($d)).shape - const d = s.$$any.check($name) ? create($deltaAny) : create(s.random(gen, $name), $deltaAny) - const $formats = s.$$any.check($formats_) ? s.$null : $formats_ - prng.bool(gen) && d.setMany(s.random(gen, $attrs)) - for (let i = prng.uint32(gen, 0, 5); i > 0; i--) { - if (hasText && prng.bool(gen)) { - d.insert(prng.word(gen), s.random(gen, $formats)) - } else if (!s.$$never.check($children)) { - /** - * @type {Array} - */ - const ins = [] - let insN = prng.int32(gen, 0, 5) - while (insN--) { - ins.push(s.random(gen, $children)) - } - d.insert(ins, s.random(gen, $formats)) - } - } - return /** @type {any} */ (d) -} - -/** - * @overload - * @return {DeltaBuilder} - */ -/** - * @template {string} NodeName - * @overload - * @param {NodeName} nodeName - * @return {DeltaBuilder} - */ -/** - * @template {string} NodeName - * @template {s.Schema} Schema - * @overload - * @param {NodeName} nodeName - * @param {Schema} schema - * @return {Schema extends s.Schema> ? DeltaBuilder : never} - */ -/** - * @template {s.Schema} Schema - * @overload - * @param {Schema} schema - * @return {Schema extends s.Schema> ? DeltaBuilder : never} - */ -/** - * @template {string|null} NodeName - * @template {{[k:string|number]:any}|null} Attrs - * @template {Array|string} [Children=never] - * @overload - * @param {NodeName} nodeName - * @param {Attrs} attrs - * @param {Children} [children] - * @return {DeltaBuilder< - * NodeName extends null ? any : NodeName, - * Attrs extends null ? {} : Attrs, - * Extract> extends Array ? (unknown extends Ac ? never : Ac) : never, - * Extract, - * null - * >} - */ -/** - * @param {string|s.Schema} [nodeNameOrSchema] - * @param {{[K:string|number]:any}|s.Schema} [attrsOrSchema] - * @param {(Array|string)} [children] - * @return {DeltaBuilder} - */ -export const create = (nodeNameOrSchema, attrsOrSchema, children) => { - const nodeName = /** @type {any} */ (s.$string.check(nodeNameOrSchema) ? nodeNameOrSchema : null) - const schema = /** @type {any} */ (s.$$schema.check(nodeNameOrSchema) ? nodeNameOrSchema : (s.$$schema.check(attrsOrSchema) ? attrsOrSchema : null)) - const d = /** @type {DeltaBuilder} */ (new DeltaBuilder(nodeName, schema)) - if (s.$objectAny.check(attrsOrSchema)) { - d.setMany(attrsOrSchema) - } - children && d.insert(children) - return d -} - -// DELTA TEXT - -/** - * @template {fingerprintTrait.Fingerprintable} [Embeds=never] - * @typedef {Delta} TextDelta - */ - -/** - * @template {fingerprintTrait.Fingerprintable} [Embeds=never] - * @typedef {DeltaBuilder} TextDeltaBuilder - */ - -/** - * @template {Array>} [$Embeds=any] - * @param {$Embeds} $embeds - * @return {s.Schema extends null ? never : ($Embeds extends Array> ? $C : never)>>} - */ -export const $text = (...$embeds) => /** @type {any} */ ($delta({ children: s.$union(...$embeds), text: true })) -export const $textOnly = $text() - -/** - * @template {s.Schema>} [Schema=s.Schema>] - * @param {Schema} [$schema] - * @return {Schema extends s.Schema> ? DeltaBuilder : never} - */ -export const text = $schema => /** @type {any} */ (create($schema || $textOnly)) - -/** - * @template {fingerprintTrait.Fingerprintable} Children - * @typedef {Delta} ArrayDelta - */ - -/** - * @template {fingerprintTrait.Fingerprintable} Children - * @typedef {DeltaBuilder} ArrayDeltaBuilder - */ - -/** - * @template {any|s.Schema} $Children - * @param {$Children} [$children] - * @return {s.Schema>>>} - */ -export const $array = $children => /** @type {any} */ ($delta({ children: $children })) - -/** - * @template {s.Schema>} [$Schema=never] - * @param {$Schema} $schema - * @return {$Schema extends never ? ArrayDeltaBuilder : DeltaBuilder} - */ -export const array = $schema => /** @type {any} */ ($schema ? create($schema) : create()) - -/** - * @template {{ [K: string|number]: any }} Attrs - * @typedef {Delta} MapDelta - */ - -/** - * @template {{ [K: string|number]: any }} Attrs - * @typedef {DeltaBuilder} MapDeltaBuilder - */ - -/** - * @template {{ [K: string|number]: any }} $Attrs - * @param {s.Schema<$Attrs>} $attrs - * @return {s.Schema>} - */ -export const $map = $attrs => /** @type {any} */ ($delta({ attrs: $attrs })) - -/** - * @template {s.Schema>|undefined} [$Schema=undefined] - * @param {$Schema} [$schema] - * @return {$Schema extends s.Schema> ? DeltaBuilder : MapDeltaBuilder<{}>} - */ -export const map = $schema => /** @type {any} */ (create(/** @type {any} */ ($schema))) - -/** - * @template {DeltaAny} D - * @param {D} d1 - * @param {NoInfer} d2 - * @return {D extends Delta ? DeltaBuilder : never} - */ -export const diff = (d1, d2) => { - /** - * @type {DeltaBuilderAny} - */ - const d = create() - if (d1.fingerprint !== d2.fingerprint) { - let left1 = d1.children.start - let left2 = d2.children.start - let right1 = d1.children.end - let right2 = d2.children.end - let commonPrefixOffset = 0 - // perform a patience sort - // 1) remove common prefix and suffix - while (left1 != null && left1.fingerprint === left2?.fingerprint) { - if (!$deleteOp.check(left1)) { - commonPrefixOffset += left1.length - } - left1 = left1.next - left2 = left2.next - } - while (right1 !== null && right1 !== left1 && right1.fingerprint === right2?.fingerprint) { - right1 = right1.prev - right2 = right2.prev - } - /** - * @type {Array} - */ - const ops1 = [] - /** - * @type {Array} - */ - const ops2 = [] - while (left1 !== null && left1 !== right1?.next) { - ops1.push(left1) - left1 = left1.next - } - while (left2 !== null && left2 !== right2?.next) { - ops2.push(left2) - left2 = left2.next - } - const fprints1 = ops1.map(op => op.fingerprint) - const fprints2 = ops2.map(op => op.fingerprint) - const changeset = patience.diff(fprints1, fprints2) - d.retain(commonPrefixOffset) - for (let i = 0, lastIndex1 = 0, currIndexOffset2 = 0; i < changeset.length; i++) { - const change = changeset[i] - d.retain(change.index - lastIndex1) - // insert minimal diff at curred position in d - /** - * - * @todo it would be better if these would be slices of delta (an actual delta) - * - * @param {ChildrenOpAny[]} opsIs - * @param {ChildrenOpAny[]} opsShould - */ - const diffAndApply = (opsIs, opsShould) => { - const d = create() - // @todo unoptimized implementation. Convert content to array and diff that based on - // generated fingerprints. We probably could do better and cache more information. - // - benchmark - // - cache fingerprints in ops - /** - * @type {Array} - */ - const isContent = opsIs.flatMap(op => $insertOp.check(op) ? op.insert : ($textOp.check(op) ? op.insert.split('') : error.unexpectedCase())) - /** - * @type {Array} - */ - const shouldContent = opsShould.flatMap(op => $insertOp.check(op) ? op.insert : ($textOp.check(op) ? op.insert.split('') : error.unexpectedCase())) - const isContentFingerprinted = isContent.map(c => s.$string.check(c) ? c : fingerprintTrait.fingerprint(c)) - const shouldContentFingerprinted = shouldContent.map(c => s.$string.check(c) ? c : fingerprintTrait.fingerprint(c)) - const hasFormatting = opsIs.some(op => !$deleteOp.check(op) && op.format != null) || opsShould.some(op => !$deleteOp.check(op) && op.format != null) - /** - * @type {{ index: number, insert: Array, remove: Array }[]} - */ - const cdiff = patience.diff(isContentFingerprinted, shouldContentFingerprinted) - // overwrite fingerprinted content with actual content - for (let i = 0, adj = 0; i < cdiff.length; i++) { - const cd = cdiff[i] - cd.remove = isContent.slice(cd.index, cd.index + cd.remove.length) - cd.insert = shouldContent.slice(cd.index + adj, cd.index + adj + cd.insert.length) - adj += cd.insert.length - cd.remove.length - } - for (let i = 0, lastIndex = 0; i < cdiff.length; i++) { - const cd = cdiff[i] - d.retain(cd.index - lastIndex) - lastIndex = cd.index - let cdii = 0 - let cdri = 0 - // try to match as much content as possible, preferring to skip over non-deltas - for (; cdii < cd.insert.length && cdri < cd.remove.length;) { - const a = cd.insert[cdii] - const b = cd.remove[cdri] - if ($deltaAny.check(a) && $deltaAny.check(b) && a.name === b.name) { - d.modify(diff(b, a)) - cdii++ - cdri++ - } else if ($deltaAny.check(b)) { - d.insert(s.$string.check(a) ? a : [a]) - cdii++ - } else { - d.delete(1) - cdri++ - } - } - for (; cdii < cd.insert.length; cdii++) { - const a = cd.insert[cdii] - d.insert(s.$string.check(a) ? a : [a]) - } - d.delete(cd.remove.length - cdri) - } - // create the diff for formatting - if (hasFormatting) { - const formattingDiff = create() - // update opsIs with content diff. then we can figure out the formatting diff. - const isUpdated = create() - // copy opsIs to fresh delta - opsIs.forEach(op => { - isUpdated.childCnt += op.length - list.pushEnd(isUpdated.children, op.clone()) - }) - isUpdated.apply(d) - let shouldI = 0 - let shouldOffset = 0 - let isOp = isUpdated.children.start - let isOffset = 0 - while (shouldI < opsShould.length && isOp != null) { - const shouldOp = opsShould[shouldI] - if (!$deleteOp.check(shouldOp) && !$deleteOp.check(isOp)) { - const isFormat = isOp.format - const minForward = math.min(shouldOp.length - shouldOffset, isOp.length - isOffset) - shouldOffset += minForward - isOffset += minForward - if (fun.equalityDeep(shouldOp.format, isFormat)) { - formattingDiff.retain(minForward) - } else { - /** - * @type {FormattingAttributes} - */ - const fupdate = {} - shouldOp.format != null && object.forEach(shouldOp.format, (v, k) => { - if (!fun.equalityDeep(v, isFormat?.[k] || null)) { - fupdate[k] = v - } - }) - isFormat && object.forEach(isFormat, (_, k) => { - if (shouldOp?.format?.[k] === undefined) { - fupdate[k] = null - } - }) - formattingDiff.retain(minForward, fupdate) - } - // update offset and iterators - if (shouldOffset >= shouldOp.length) { - shouldI++ - shouldOffset = 0 - } - if (isOffset >= isOp.length) { - isOp = isOp.next - isOffset = 0 - } - } - } - d.apply(formattingDiff) - } - return d - } - const subd = diffAndApply(ops1.slice(change.index, change.index + change.remove.length), ops2.slice(change.index + currIndexOffset2, change.index + currIndexOffset2 + change.insert.length)) - d.append(subd) - lastIndex1 = change.index + change.remove.length - currIndexOffset2 += change.insert.length - change.remove.length - } - for (const attr2 of d2.attrs) { - const attr1 = d1.attrs[attr2.key] - if (attr1 == null || (attr1.fingerprint !== attr2.fingerprint)) { - /* c8 ignore else */ - if ($insertOp.check(attr2)) { - d.set(attr2.key, attr2.value) - } else { - /* c8 ignore next 2 */ - error.unexpectedCase() - } - } - } - for (const attr1 of d1.attrs) { - if (d2.attrs[attr1.key] == null) { - d.unset(attr1.key) - } - } - } - return /** @type {any} */ (d.done(false)) -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.test.d.ts deleted file mode 100644 index ceb757e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.test.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export function testDeltaBasicApi(_tc: t.TestCase): void; -export function testDeltaValues(_tc: t.TestCase): void; -export function testDeltaBasicCases(): void; -export function testDeltaArrayBasics(): void; -export function testAssignability(): void; -export function testText(): void; -export function testDelta(_tc: t.TestCase): void; -export function testDeltaMerging(_tc: t.TestCase): void; -export function testUseAttributes(_tc: t.TestCase): void; -export function testUseAttribution(_tc: t.TestCase): void; -export function testMapTyping(): void; -export function testMapDeltaBasics(_tc: t.TestCase): void; -export function testMapDeltaModify(_tc: t.TestCase): void; -export function testMapDelta(_tc: t.TestCase): void; -export function testRepeatRebaseMergeDeltas(tc: t.TestCase): void; -export function testNodeDelta(_tc: t.TestCase): void; -export function testRecursiveNode(): void; -export function testSimplifiedDeltaSchemaDefinition(): void; -export function testDiffing(): void; -export function testDiffingCommonPreSuffix(): void; -export function testSlice(): void; -export function testRepeatRandomListDiff(tc: t.TestCase): void; -export function testRepeatRandomMapDiff(tc: t.TestCase): void; -export function testDeltaAppend(_tc: t.TestCase): void; -export function testDeltaDiffWithFormatting(): void; -export function testDeltaDiffWithFormatting2(): void; -export function testDeltaDiffIssue1(): void; -import * as t from 'lib0/testing'; -//# sourceMappingURL=delta.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.test.d.ts.map deleted file mode 100644 index 3f61b71..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/delta.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delta.test.d.ts","sourceRoot":"","sources":["delta.test.js"],"names":[],"mappings":"AAqCO,uCAFI,CAAC,CAAC,QAAQ,QAWpB;AAYM,qCAFI,CAAC,CAAC,QAAQ,QAwBpB;AAEM,4CA2BN;AAEM,6CAMN;AAKM,0CAkJN;AAEM,iCAWN;AAKM,+BAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAYpB;AAKM,uCAFI,CAAC,CAAC,QAAQ,QAuBpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QAsBpB;AAEM,sCAaN;AAKM,wCAFI,CAAC,CAAC,QAAQ,QA4BpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QA2CpB;AAKM,kCAFI,CAAC,CAAC,QAAQ,QAqDpB;AAKM,gDAFI,CAAC,CAAC,QAAQ,QAoEpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,QAiCpB;AAEM,0CAmBN;AAEM,4DAIN;AAEM,oCAMN;AAEM,mDAMN;AAEM,kCAGN;AAKM,6CAFI,CAAC,CAAC,QAAQ,QAWpB;AAKM,4CAFI,CAAC,CAAC,QAAQ,QAWpB;AAKM,qCAFI,CAAC,CAAC,QAAQ,QAQpB;AAEM,oDAKN;AAEM,qDAKN;AAEM,4CAQN;mBAjtBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/readme.md b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/readme.md deleted file mode 100644 index 0491c10..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/readme.md +++ /dev/null @@ -1,129 +0,0 @@ -# Deltas - -- Enable you to efficiently represent changes on all kinds of data structures. -- Support schemas -- Support OT-style conflict resolution `delta2.apply(delta1.rebase(delta2, true)) === delta1.apply(delta2.rebase(delta1, false))` -- nice typings - -## Delta for Map-like structures - -```javascript -// define schema -const $d = delta.$delta(s.$any, { attr1: s.$string, attr2: s.$number }) -const d = delta.create($d) - - -// create an update -const update = delta.create().set('attr1', 'val1').set('attr2', 42) -d.apply(update) - -// In case of an invalid update -const update2 = delta.create().set('attr1', 42) -// it is possible to check an update beforehand -$d.check(update2) // => false -// and you also get type errors -d.apply(update2) // type error: expected 'attr1' to be of type string -``` - -## Delta for Text-like structures - -Text-like deltas work similarly to [Quill Deltas]{https://quilljs.com/docs/delta} - -```javascript -// define schema -const $d = delta.$delta(s.$any, null, s.$string) -const d = delta.create($d).insert('hello world') - -// create an update -const update = delta.create().retain(11).insert('!') -d.apply(update) - -// In case of an invalid update -const update2 = delta.create().insert([{ some: 'object' }]) -// it is possible to check an update beforehando -$d.check(update2) // => false -// and you also get type errors -d.apply(update2) // type error: unexpected attribute 'attr1' -``` - -## Delta for Array-like structures - -```javascript -// define schema -const $d = delta.$delta(s.$any, null, s.$array(s.object({ some: s.$string }, s.$string))) -const d = delta.create($d).insert(['hello world']) - -// create an update -const update = delta.create().retain(1).insert({ some: 'object' }) -d.apply(update) - -// In case of an invalid update -const update2 = delta.create().insert([{ unknown: 'prop' }]) -// it is possible to check an update beforehando -$d.check(update2) // => false -// and you also get type errors -d.apply(update2) // type error: { unknown: 'prop' } is not assignable to { some: string } -``` - -## Delta for Node-like structures (similar to XML,Trees with named nodes) - -```javascript -// define schema for a 'p'|'h1' node that may contain text or other instances of itself -const $d = delta.$delta(s.$literal('div', 'p', 'h1'), { style: s.$string }, s.$string, true)) -const d = delta.create('div', $d) - -// create an update - insert paragraph into the
-const update = delta.create().insert([delta.create('p', { style: 'bold: true' }, 'hello world')]) -d.apply(update) - -// modify the paragraph by deleting the text 'world' and appending '!' -d.apply(delta.create().modify( - delta.create().retain(6).delete(5).insert('!') -)) -``` - -# Transformers - -We often have two different data structures that we want to sync. There might be -slight differences between those data structures. I.e. we might have a Yjs data -structure containing the following content: - -```javascript -/** - * { - * headline: {{ headline }}, - * content: {{ content }} - * } - */ -const $data = s.$delta(null, { headline: s.$string, content: s.$string }) -``` - -A typical scenario is that we want to sync that to the dom and back. "two-way bindings" -- When the Yjs struucture updates, we want to sync the changes to the dom. -- When the dom is updated (because the dom is a `contenteditable` editor), we -want to sync back the changes to the yjs structure. - -Now, the dom might look like this: - -```javascript -/** - *
- *

{{headline}}

- * dturianed - *

{{content}}

- *
- */ -``` - -We can achieve automattic back-and-forth transformations with delta -transformers: - -```javascript -const Λdata = Λ.transform($data, $d => - Λ.delta('div', {}, [ - Λ.delta('h1', { style: 'bold:true' }, [Λ.query('headline')($d)], []), - Λ.delta('p', null, [Λ.query('content')($d)]) - ]) -) -``` - diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/t3.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/t3.test.d.ts deleted file mode 100644 index b449d55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/t3.test.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export function transformResult(a: DeltaA, b: DeltaB): TransformResult; -export const transformResultEmpty: TransformResult; -export type TransformResult = { - a: DeltaA | null; - b: DeltaB | null; -}; -export type DeltaTransformer = (t: { - a: DeltaA | null; - b: DeltaB | null; -}) => ({ - a: DeltaA | null; - b: DeltaB | null; -}); -export type Transform = { - applyA: (da: DeltaA) => TransformResult; - applyB: (db: DeltaB) => TransformResult; -}; -import * as delta from './delta.js'; -//# sourceMappingURL=t3.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/t3.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/t3.test.d.ts.map deleted file mode 100644 index 3559346..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/delta/t3.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"t3.test.d.ts","sourceRoot":"","sources":["t3.test.js"],"names":[],"mappings":"AAoBO,gCAN4B,MAAM,SAA3B,KAAK,CAAC,YAAY,OAAE,EACC,MAAM,SAA3B,KAAK,CAAC,YAAY,OAAE,KACvB,MAAM,KACN,MAAM,GACL,eAAe,CAAC,MAAM,OAAC,EAAC,MAAM,OAAC,CAAC,CAEO;AACnD,+DAA+D;4BAbnC,MAAM,SAApB,KAAK,CAAC,KAAK,OAAE,EACC,MAAM,SAApB,KAAK,CAAC,KAAK,OAAE,IACd;IAAE,CAAC,EAAE,MAAM,OAAC,CAAC;IAAC,CAAC,EAAE,MAAM,OAAC,CAAA;CAAE;6BAiBT,MAAM,SAAtB,KAAK,CAAC,QAAS,EACC,MAAM,SAAtB,KAAK,CAAC,QAAS,IAChB,CAAC,CAAC,EAAC;IAAC,CAAC,EAAC,MAAM,OAAC,CAAC;IAAA,CAAC,EAAC,MAAM,OAAC,CAAA;CAAC,KAAG,CAAC;IAAC,CAAC,EAAC,MAAM,OAAC,CAAC;IAAA,CAAC,EAAC,MAAM,OAAC,CAAA;CAAC,CAAC;sBA2GpC,MAAM,SAAnB,KAAK,CAAC,KAAM,EACC,MAAM,SAAnB,KAAK,CAAC,KAAM,IACb;IAAE,MAAM,EAAE,CAAC,EAAE,EAAC,MAAM,KAAG,eAAe,CAAC,MAAM,EAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,CAAC,EAAE,EAAC,MAAM,KAAG,eAAe,CAAC,MAAM,EAAC,MAAM,CAAC,CAAA;CAAE;uBAvIlG,YAAY"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/deno.json b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/deno.json deleted file mode 100644 index 6e68cf4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/deno.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "imports": { - "isomorphic.js": "./node_modules/isomorphic.js/node.mjs", - "lib0/logging": "./logging.node.js", - "lib0/performance": "./performance.node.js", - "lib0/crypto/aes-gcm": "./crypto/aes-gcm.js", - "lib0/crypto/rsa-oaep": "./crypto/rsa-oaep.js", - "lib0/crypto/ecdsa": "./crypto/ecdsa.js", - "lib0/crypto/jwt": "./crypto/jwt.js", - "lib0/webcrypto": "./webcrypto.deno.js" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/deno.lock b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/deno.lock deleted file mode 100644 index 794d4eb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/deno.lock +++ /dev/null @@ -1,122 +0,0 @@ -{ - "version": "2", - "remote": { - "https://deno.land/std@0.177.0/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462", - "https://deno.land/std@0.177.0/_util/os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3", - "https://deno.land/std@0.177.0/bytes/index_of_needle.ts": "65c939607df609374c4415598fa4dad04a2f14c4d98cd15775216f0aaf597f24", - "https://deno.land/std@0.177.0/crypto/_wasm/lib/deno_std_wasm_crypto.generated.mjs": "5dedb7f9aa05f0e18ed017691c58df5f4686e4cbbd70368c6f896e5cca03f2b4", - "https://deno.land/std@0.177.0/crypto/_wasm/mod.ts": "e2df88236fc061eac7a89e8cb0b97843f5280b08b2a990e473b7397a3e566003", - "https://deno.land/std@0.177.0/crypto/timing_safe_equal.ts": "8d69ab611c67fe51b6127d97fcfb4d8e7d0e1b6b4f3e0cc4ab86744c3691f965", - "https://deno.land/std@0.177.0/encoding/base64.ts": "7de04c2f8aeeb41453b09b186480be90f2ff357613b988e99fabb91d2eeceba1", - "https://deno.land/std@0.177.0/encoding/base64url.ts": "3f1178f6446834457b16bfde8b559c1cd3481727fe384d3385e4a9995dc2d851", - "https://deno.land/std@0.177.0/encoding/hex.ts": "50f8c95b52eae24395d3dfcb5ec1ced37c5fe7610ef6fffdcc8b0fdc38e3b32f", - "https://deno.land/std@0.177.0/flags/mod.ts": "d1cdefa18472ef69858a17df5cf7c98445ed27ac10e1460183081303b0ebc270", - "https://deno.land/std@0.177.0/node/_core.ts": "9a58c0ef98ee77e9b8fcc405511d1b37a003a705eb6a9b6e95f75434d8009adc", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/asn1.js/base/buffer.js": "c9364c761681134015ec8ba6f33b39c067d6e5dd59860d55face8d5be8522744", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/asn1.js/base/node.js": "8f7f23bfa300990bbd6db7e7395e9688b54a04e3eb2fab5cab9a9a72e26c525f", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/asn1.js/base/reporter.js": "788aec7662991da549e5f7f3edbc3e3d6c6cecabc894b18d1a705b0f204e06c3", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/asn1.js/constants/der.js": "57181db0519bb3864a6cdf4e7eb9bfeb1bf5f80605187fbe80e27083b473e367", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/asn1.js/decoders/der.js": "fdc4de98c9b0b59db169a2b225895741e2ab34b00e14315ac2ff5e389d6db16e", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/asn1.js/decoders/pem.js": "fd7f0072c193c82959fec0374f4fd3adf3f4ac38594fd404d66b3e8724107151", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/asn1.js/encoders/der.js": "137bc4f8fe66b9950c743025e199789e25342f791e2d52353ceb016ad2854b42", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/asn1.js/encoders/pem.js": "e43bc706973c4c27e1e2f96262daba3d38822cb10f5b494f6944c726ee655160", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/asn1.js/mod.js": "1f88293688296be7a6c735bd8ea39425f5b274b94db1d6b7968dddfb54ac9d37", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/bn.js/bn.js": "f3f3c1dae1aa55de9e6472af1d6bec5ccda4b4890ee5c52a90961137fe99564e", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/aes.js": "698e1ed386b7dff27b2d59fa1c75f506beceec96b78670a15a734e438c08f138", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/auth_cipher.js": "5c245b5685b066356a7c9529a3a441bf5f57823a6946ce1b0ef2e1af32bb76f4", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/decrypter.js": "39152b2b3409893b8548feeab7e5997ceb1595f31df0dedaf765708be8f025c0", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/encrypter.js": "f9cc703d5a7b5255999c1a3600fbf48ff564b65f827744877526803093ceebff", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/ghash.js": "759d80b760f44cd3a454b4f161fd03a7d6c359901446f0a907a6870cb66d6767", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/incr32.js": "2bdea27b74b3990ee56807a1a5abe335f118826beabeeb905459c8768094b28f", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/mod.js": "fe4affebbd210d885b2e5135c668751f9d10bc14aa0cc3905cbfff66f04b4c58", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/modes/cbc.js": "ff24b4506522a724ba7a03c1403ad8938aba45056f9fd47c7f0b4fcb3a640adf", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/modes/cfb.js": "643720a1db969b6bcc896c95523630838a8335513d02f340514fd524bb4113cb", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/modes/cfb1.js": "01c9a46aa3affd84a54ae33652fb0fa0ff7c862be2a459d9cb188cb8e2c4b11e", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/modes/cfb8.js": "97476cee25103e02a02b196d7fe6f28a9f0f9e47ee344687d7492bc7282a59f8", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/modes/ctr.js": "1e3835adb753cfe6761e4df8c43d190e31e1ca6a586fd582747c8255c82ed78d", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/modes/ecb.js": "79677b96d4af50c49f0a4f698e5c7e5a64f1d2926b799e0d2eac2cdd5ec7488c", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/modes/mod.js": "fe3db429b867a0a8066c64d7b33b840a1f24cad9174156384a763733f68cf518", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/modes/ofb.js": "3553308f98d078e2006eac39bb6d91818f8bb376b01d962ae98eabf6ee79ad4e", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/stream_cipher.js": "70f50f37ddec530ae95911ca2f286ebd2ddbd54d914ab0be461ec1dc3c61990f", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_aes/xor.ts": "7132baacdb39ba82c3bfe325a60e68ca87469c0ed0cdd0508caf6f40bab852b8", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/browserify_rsa.js": "96e0e4fee7c2cf75ef86d958c709bfc239297a080fd17ace5ea5ab699a1b6174", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/cipher_base.js": "9ebc6ccc364cf7b23024821054d2e72a2d8da8d8a2a36cacdc5aa6cc6770ef93", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/evp_bytes_to_key.ts": "7c4c27b6e321b2d7065a6703d90264921e9a805d91d9dfdb21103393228024e2", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/parse_asn1/asn1.js": "7d99b6df508164169a33377346e8840d519fe2defccb362a023c92c5bd503433", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/parse_asn1/certificate.js": "5795348417b3ec7aafa4854ba55f364e0148eadfdd29d1566c90e617237621bb", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/parse_asn1/fix_proc.js": "858dd3e6ce264d75822cadc21bb55114f4e4867a706abde1663548aa2710fc1b", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/parse_asn1/mod.js": "ea164fbd497ce3d710426742d4b72f71da8954c4ebaeb7eadc33316c5b0060f1", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/public_encrypt/mgf.js": "dfac5008a550b3e7e6b851c4fb42e984aa9e7fae64707888f47f2aa0991c004d", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/public_encrypt/mod.js": "0704326ff3ee2bb0764a964995d1aa62b1147b714ad5465e878ba4d57731e3db", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/public_encrypt/private_decrypt.js": "8a1d11edb176d95d1e3bdf1aff5c3248a986bf9734d1a6b07508e29132d2f65c", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/public_encrypt/public_encrypt.js": "f88b0e3c228d84096fdbc03e614e86bef86e56013cb9628b2425e31b3b142b2c", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/public_encrypt/with_public.js": "752da754d253b5743d89c0f2432b6eb6f8815b80efd9ee588683e10a13d34400", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/public_encrypt/xor.js": "087ebef8f6fcb8ca4c7216cc22de728d9a61ec27b9a036b900681ff25d6409af", - "https://deno.land/std@0.177.0/node/_crypto/crypto_browserify/randombytes.ts": "23bde8be640e274d7bb88cf10d1da8bba252654252dc6a877fed86a77da5952c", - "https://deno.land/std@0.177.0/node/_events.d.ts": "1347437fd6b084d7c9a4e16b9fe7435f00b030970086482edeeb3b179d0775af", - "https://deno.land/std@0.177.0/node/_events.mjs": "d4ba4e629abe3db9f1b14659fd5c282b7da8b2b95eaf13238eee4ebb142a2448", - "https://deno.land/std@0.177.0/node/_global.d.ts": "2d88342f38b4083b858998e27c706725fb03a74aa14ef8d985dc18438b5188e4", - "https://deno.land/std@0.177.0/node/_next_tick.ts": "9a3cf107d59b019a355d3cf32275b4c6157282e4b68ea85b46a799cb1d379305", - "https://deno.land/std@0.177.0/node/_process/exiting.ts": "6e336180aaabd1192bf99ffeb0d14b689116a3dec1dfb34a2afbacd6766e98ab", - "https://deno.land/std@0.177.0/node/_process/process.ts": "c96bb1f6253824c372f4866ee006dcefda02b7050d46759736e403f862d91051", - "https://deno.land/std@0.177.0/node/_process/stdio.mjs": "cf17727eac8da3a665851df700b5aca6a12bacc3ebbf33e63e4b919f80ba44a6", - "https://deno.land/std@0.177.0/node/_stream.d.ts": "112e1a0677cd6db932c3ce0e6e5bbdc7a2ac1874572f449044ecc82afcf5ee2e", - "https://deno.land/std@0.177.0/node/_stream.mjs": "d6e2c86c1158ac65b4c2ca4fa019d7e84374ff12e21e2175345fe68c0823efe3", - "https://deno.land/std@0.177.0/node/_utils.ts": "7fd55872a0cf9275e3c080a60e2fa6d45b8de9e956ebcde9053e72a344185884", - "https://deno.land/std@0.177.0/node/buffer.ts": "85617be2063eccaf177dbb84c7580d1e32023724ed14bd9df4e453b152a26167", - "https://deno.land/std@0.177.0/node/crypto.ts": "2c94fa0f76e90190fbc34df891dc5c284bddb86c932fae8ac11747de3f75293c", - "https://deno.land/std@0.177.0/node/events.ts": "d2de352d509de11a375e2cb397d6b98f5fed4e562fc1d41be33214903a38e6b0", - "https://deno.land/std@0.177.0/node/internal/buffer.d.ts": "bdfa991cd88cb02fd08bf8235d2618550e3e511c970b2a8f2e1a6885a2793cac", - "https://deno.land/std@0.177.0/node/internal/buffer.mjs": "e92303a3cc6d9aaabcd270a937ad9319825d9ba08cb332650944df4562029b27", - "https://deno.land/std@0.177.0/node/internal/crypto/_keys.ts": "8f3c3b5a141aa0331a53c205e9338655f1b3b307a08085fd6ff6dda6f7c4190b", - "https://deno.land/std@0.177.0/node/internal/crypto/_randomBytes.ts": "36dd164747f73b830ba86562abb160a8ac5bea34aaeb816a67f3005a00d41177", - "https://deno.land/std@0.177.0/node/internal/crypto/_randomFill.ts": "297186f290eba87a1ad7b8aa42a960ff4278a8b6b0c963fa81918c326d5c0b58", - "https://deno.land/std@0.177.0/node/internal/crypto/_randomInt.ts": "6cf19da9684b67520e67a2d99f2581a3f841140842c7ce2e014d166457550fe1", - "https://deno.land/std@0.177.0/node/internal/crypto/certificate.ts": "b4a6695f82e70a42e85247c74a7691ed4b3a904646451af0287e49efe1a28814", - "https://deno.land/std@0.177.0/node/internal/crypto/cipher.ts": "2bae9b4d94c465e4d1c70e5a9e8fd67ce20bcc66fecd2eec6be00d35144ca4eb", - "https://deno.land/std@0.177.0/node/internal/crypto/constants.ts": "544d605703053218499b08214f2e25cf4310651d535b7ab995891c4b7a217693", - "https://deno.land/std@0.177.0/node/internal/crypto/diffiehellman.ts": "9cfb219c5b2936db773f559b6affe6d25b0e40531010389f05df3f05ce7eebf5", - "https://deno.land/std@0.177.0/node/internal/crypto/hash.ts": "d01f5d3ad5477655b432036d2d553c7a0c31a901ac0e1e9e0d8b3975daae7624", - "https://deno.land/std@0.177.0/node/internal/crypto/hkdf.ts": "5bd801234e56468fbd47466f46e88bdadc66432d625e3616abe38878d410bb66", - "https://deno.land/std@0.177.0/node/internal/crypto/keygen.ts": "530cc1a00acf71a43719bb876a2dc563b6196095d080eba77c92c9f39658a5b9", - "https://deno.land/std@0.177.0/node/internal/crypto/keys.ts": "c4dfa5aa3420cf700178b87203593a0989c8a93934bfef2b29adb3399d687958", - "https://deno.land/std@0.177.0/node/internal/crypto/pbkdf2.ts": "0a0a3e0d3d45db0638fe75a4199c7ed7ca2164405750a520e786e4adebdb45a4", - "https://deno.land/std@0.177.0/node/internal/crypto/random.ts": "85f3147e14cb45c18e016da45d319a5c663309411232a956fdc09c2317acdd9f", - "https://deno.land/std@0.177.0/node/internal/crypto/scrypt.ts": "b55a0fcd12b295af4127d05b1c0bc3098b74fc0e3c62321c2a43c20f9ed18209", - "https://deno.land/std@0.177.0/node/internal/crypto/sig.ts": "25819a89d49c1ebfe3baa1f9464501ec599a36cf53e9b600ec0399e568b9dccc", - "https://deno.land/std@0.177.0/node/internal/crypto/types.ts": "52feb182bcbd59206f3e2f4a3cb8a5775d4452c2a8045c3e613e2178d32c2a86", - "https://deno.land/std@0.177.0/node/internal/crypto/util.ts": "db282c0413aeee28bc0665fcfc1c08a65fc96dc12ed4d03282f2da4907fcf0ce", - "https://deno.land/std@0.177.0/node/internal/crypto/x509.ts": "0e8a541c4f58ecb83862c373d3f7d2371aa8f5108f55bc837b190c4ab3408764", - "https://deno.land/std@0.177.0/node/internal/error_codes.ts": "8495e33f448a484518d76fa3d41d34fc20fe03c14b30130ad8e936b0035d4b8b", - "https://deno.land/std@0.177.0/node/internal/errors.ts": "1c699b8a3cb93174f697a348c004b1c6d576b66688eac8a48ebb78e65c720aae", - "https://deno.land/std@0.177.0/node/internal/fixed_queue.ts": "62bb119afa5b5ae8fc0c7048b50502347bec82e2588017d0b250c4671d6eff8f", - "https://deno.land/std@0.177.0/node/internal/hide_stack_frames.ts": "9dd1bad0a6e62a1042ce3a51eb1b1ecee2f246907bff44835f86e8f021de679a", - "https://deno.land/std@0.177.0/node/internal/normalize_encoding.mjs": "fd1d9df61c44d7196432f6e8244621468715131d18cc79cd299fc78ac549f707", - "https://deno.land/std@0.177.0/node/internal/options.ts": "888f267c3fe8f18dc7b2f2fbdbe7e4a0fd3302ff3e99f5d6645601e924f3e3fb", - "https://deno.land/std@0.177.0/node/internal/primordials.mjs": "a72d86b5aa55d3d50b8e916b6a59b7cc0dc5a31da8937114b4a113ad5aa08c74", - "https://deno.land/std@0.177.0/node/internal/streams/destroy.mjs": "b665fc71178919a34ddeac8389d162a81b4bc693ff7dc2557fa41b3a91011967", - "https://deno.land/std@0.177.0/node/internal/streams/end-of-stream.mjs": "a4fb1c2e32d58dff440d4e716e2c4daaa403b3095304a028bb428575cfeed716", - "https://deno.land/std@0.177.0/node/internal/streams/utils.mjs": "f2fe2e6bdc506da24c758970890cc2a21642045b129dee618bd3827c60dd9e33", - "https://deno.land/std@0.177.0/node/internal/streams/writable.mjs": "775928726d0483ace8e45a35f30db2019a22dd7b9a81b67b158420e21cc692c5", - "https://deno.land/std@0.177.0/node/internal/util.mjs": "f7fe2e1ca5e66f550ad0856b9f5ee4d666f0c071fe212ea7fc7f37cfa81f97a5", - "https://deno.land/std@0.177.0/node/internal/util/inspect.mjs": "11d7c9cab514b8e485acc3978c74b837263ff9c08ae4537fa18ad56bae633259", - "https://deno.land/std@0.177.0/node/internal/util/types.ts": "0e587b44ec5e017cf228589fc5ce9983b75beece6c39409c34170cfad49d6417", - "https://deno.land/std@0.177.0/node/internal/validators.mjs": "e02f2b02dd072a5d623970292588d541204dc82207b4c58985d933a5f4b382e6", - "https://deno.land/std@0.177.0/node/internal_binding/_libuv_winerror.ts": "30c9569603d4b97a1f1a034d88a3f74800d5ea1f12fcc3d225c9899d4e1a518b", - "https://deno.land/std@0.177.0/node/internal_binding/_node.ts": "cb2389b0eab121df99853eb6a5e3a684e4537e065fb8bf2cca0cbf219ce4e32e", - "https://deno.land/std@0.177.0/node/internal_binding/_timingSafeEqual.ts": "7d9732464d3c669ff07713868ce5d25bc974a06112edbfb5f017fc3c70c0853e", - "https://deno.land/std@0.177.0/node/internal_binding/_utils.ts": "7c58a2fbb031a204dee9583ba211cf9c67922112fe77e7f0b3226112469e9fe1", - "https://deno.land/std@0.177.0/node/internal_binding/_winerror.ts": "3e8cfdfe22e89f13d2b28529bab35155e6b1730c0221ec5a6fc7077dc037be13", - "https://deno.land/std@0.177.0/node/internal_binding/buffer.ts": "31729e0537921d6c730ad0afea44a7e8a0a1044d070ade8368226cb6f7390c8b", - "https://deno.land/std@0.177.0/node/internal_binding/constants.ts": "21ff9d1ee71d0a2086541083a7711842fc6ae25e264dbf45c73815aadce06f4c", - "https://deno.land/std@0.177.0/node/internal_binding/crypto.ts": "29e8f94f283a2e7d4229d3551369c6a40c2af9737fad948cb9be56bef6c468cd", - "https://deno.land/std@0.177.0/node/internal_binding/node_options.ts": "0b5cb0bf4379a39278d7b7bb6bb2c2751baf428fe437abe5ed3e8441fae1f18b", - "https://deno.land/std@0.177.0/node/internal_binding/string_decoder.ts": "54c3c1cbd5a9254881be58bf22637965dc69535483014dab60487e299cb95445", - "https://deno.land/std@0.177.0/node/internal_binding/types.ts": "2187595a58d2cf0134f4db6cc2a12bf777f452f52b15b6c3aed73fa072aa5fc3", - "https://deno.land/std@0.177.0/node/internal_binding/util.ts": "808ff3b92740284184ab824adfc420e75398c88c8bccf5111f0c24ac18c48f10", - "https://deno.land/std@0.177.0/node/internal_binding/uv.ts": "eb0048e30af4db407fb3f95563e30d70efd6187051c033713b0a5b768593a3a3", - "https://deno.land/std@0.177.0/node/perf_hooks.ts": "c20e1f02f463e065e8f6c1d4fa97b0d3832dc0db5b5d8ea37f99a962ecf11f35", - "https://deno.land/std@0.177.0/node/stream.ts": "09e348302af40dcc7dc58aa5e40fdff868d11d8d6b0cfb85cbb9c75b9fe450c7", - "https://deno.land/std@0.177.0/node/string_decoder.ts": "1a17e3572037c512cc5fc4b29076613e90f225474362d18da908cb7e5ccb7e88" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.d.ts deleted file mode 100644 index 290daec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export function simpleDiffString(a: string, b: string): SimpleDiff; -export function simpleDiff(a: string, b: string): SimpleDiff; -export function simpleDiffArray(a: Array, b: Array, compare?: (arg0: T, arg1: T) => boolean): SimpleDiff>; -export function simpleDiffStringWithCursor(a: string, b: string, cursor: number): { - index: number; - remove: number; - insert: string; -}; -/** - * A SimpleDiff describes a change on a String. - * - * ```js - * console.log(a) // the old value - * console.log(b) // the updated value - * // Apply changes of diff (pseudocode) - * a.remove(diff.index, diff.remove) // Remove `diff.remove` characters - * a.insert(diff.index, diff.insert) // Insert `diff.insert` - * a === b // values match - * ``` - */ -export type SimpleDiff> = { - /** - * The index where changes were applied - */ - index: number; - /** - * The number of characters to delete starting - * at `index`. - */ - remove: number; - /** - * The new text to insert at `index` after applying - */ - insert: T; -}; -//# sourceMappingURL=diff.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.d.ts.map deleted file mode 100644 index 5f32a1f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["diff.js"],"names":[],"mappings":"AAyCO,oCAJI,MAAM,KACN,MAAM,GACL,UAAU,CAAC,MAAM,CAAC,CAoB7B;AAlBM,8BAJI,MAAM,KACN,MAAM,GACL,UAAU,CAAC,MAAM,CAAC,CAoB7B;AAuBM,gCAPM,CAAC,KAEH,KAAK,CAAC,CAAC,CAAC,KACR,KAAK,CAAC,CAAC,CAAC,YACR,CAAS,IAAC,EAAD,CAAC,EAAE,IAAC,EAAD,CAAC,KAAE,OAAO,GACrB,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAgB/B;AASM,8CAJI,MAAM,KACN,MAAM,UACN,MAAM;;;;EAyChB;;;;;;;;;;;;;uBA5HgC,CAAC,SAApB,MAAM,GAAC,KAAK,CAAC,GAAG,CAAE;;;;;;;;;;;;;YAKlB,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.js deleted file mode 100644 index ddfa903..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.js +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Efficient diffs. - * - * @module diff - */ - -import { equalityStrict } from './function.js' - -/** - * A SimpleDiff describes a change on a String. - * - * ```js - * console.log(a) // the old value - * console.log(b) // the updated value - * // Apply changes of diff (pseudocode) - * a.remove(diff.index, diff.remove) // Remove `diff.remove` characters - * a.insert(diff.index, diff.insert) // Insert `diff.insert` - * a === b // values match - * ``` - * - * @template {string|Array} T - * @typedef {Object} SimpleDiff - * @property {Number} index The index where changes were applied - * @property {Number} remove The number of characters to delete starting - * at `index`. - * @property {T} insert The new text to insert at `index` after applying - */ - -const highSurrogateRegex = /[\uD800-\uDBFF]/ -const lowSurrogateRegex = /[\uDC00-\uDFFF]/ - -/** - * Create a diff between two strings. This diff implementation is highly - * efficient, but not very sophisticated. - * - * @function - * - * @param {string} a The old version of the string - * @param {string} b The updated version of the string - * @return {SimpleDiff} The diff description. - */ -export const simpleDiffString = (a, b) => { - let left = 0 // number of same characters counting from left - let right = 0 // number of same characters counting from right - while (left < a.length && left < b.length && a[left] === b[left]) { - left++ - } - // If the last same character is a high surrogate, we need to rollback to the previous character - if (left > 0 && highSurrogateRegex.test(a[left - 1])) left-- - while (right + left < a.length && right + left < b.length && a[a.length - right - 1] === b[b.length - right - 1]) { - right++ - } - // If the last same character is a low surrogate, we need to rollback to the previous character - if (right > 0 && lowSurrogateRegex.test(a[a.length - right])) right-- - return { - index: left, - remove: a.length - left - right, - insert: b.slice(left, b.length - right) - } -} - -/** - * @todo Remove in favor of simpleDiffString - * @deprecated - */ -export const simpleDiff = simpleDiffString - -/** - * Create a diff between two arrays. This diff implementation is highly - * efficient, but not very sophisticated. - * - * Note: This is basically the same function as above. Another function was created so that the runtime - * can better optimize these function calls. - * - * @function - * @template T - * - * @param {Array} a The old version of the array - * @param {Array} b The updated version of the array - * @param {function(T, T):boolean} [compare] - * @return {SimpleDiff>} The diff description. - */ -export const simpleDiffArray = (a, b, compare = equalityStrict) => { - let left = 0 // number of same characters counting from left - let right = 0 // number of same characters counting from right - while (left < a.length && left < b.length && compare(a[left], b[left])) { - left++ - } - while (right + left < a.length && right + left < b.length && compare(a[a.length - right - 1], b[b.length - right - 1])) { - right++ - } - return { - index: left, - remove: a.length - left - right, - insert: b.slice(left, b.length - right) - } -} - -/** - * Diff text and try to diff at the current cursor position. - * - * @param {string} a - * @param {string} b - * @param {number} cursor This should refer to the current left cursor-range position - */ -export const simpleDiffStringWithCursor = (a, b, cursor) => { - let left = 0 // number of same characters counting from left - let right = 0 // number of same characters counting from right - // Iterate left to the right until we find a changed character - // First iteration considers the current cursor position - while ( - left < a.length && - left < b.length && - a[left] === b[left] && - left < cursor - ) { - left++ - } - // If the last same character is a high surrogate, we need to rollback to the previous character - if (left > 0 && highSurrogateRegex.test(a[left - 1])) left-- - // Iterate right to the left until we find a changed character - while ( - right + left < a.length && - right + left < b.length && - a[a.length - right - 1] === b[b.length - right - 1] - ) { - right++ - } - // If the last same character is a low surrogate, we need to rollback to the previous character - if (right > 0 && lowSurrogateRegex.test(a[a.length - right])) right-- - // Try to iterate left further to the right without caring about the current cursor position - while ( - right + left < a.length && - right + left < b.length && - a[left] === b[left] - ) { - left++ - } - if (left > 0 && highSurrogateRegex.test(a[left - 1])) left-- - return { - index: left, - remove: a.length - left - right, - insert: b.slice(left, b.length - right) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.test.d.ts deleted file mode 100644 index 5df670c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testDiffing(tc: t.TestCase): void; -export function testRepeatDiffing(tc: t.TestCase): void; -export function testSimpleDiffWithCursor(tc: t.TestCase): void; -export function testArrayDiffing(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=diff.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.test.d.ts.map deleted file mode 100644 index a0157b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"diff.test.d.ts","sourceRoot":"","sources":["diff.test.js"],"names":[],"mappings":"AA0BO,gCAFI,CAAC,CAAC,QAAQ,QAmBpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAQpB;AAKM,6CAFI,CAAC,CAAC,QAAQ,QA4CpB;AAKM,qCAFI,CAAC,CAAC,QAAQ,QAQpB;mBA7GkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.d.ts deleted file mode 100644 index bb84468..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export function diff(as: Array, bs: Array): Array<{ - index: number; - remove: Array; - insert: Array; -}>; -export function diffSplitBy(a: string, b: string, _regexp: RegExp | string): { - index: number; - remove: string; - insert: string; -}[]; -export function diffAuto(a: string, b: string): { - insert: string; - remove: string; - index: number; -}[]; -//# sourceMappingURL=patience.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.d.ts.map deleted file mode 100644 index e2fe8b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patience.d.ts","sourceRoot":"","sources":["patience.js"],"names":[],"mappings":"AAoBO,yBAJI,KAAK,CAAC,MAAM,CAAC,MACb,KAAK,CAAC,MAAM,CAAC,GACZ,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAC,CAAC,CAShF;AAOM,+BAJI,MAAM,KACN,MAAM,WACN,MAAM,GAAC,MAAM;;;;IAqBvB;AAWM,4BAHI,MAAM,KACN,MAAM;;;;IASP"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.js deleted file mode 100644 index 40c1381..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.js +++ /dev/null @@ -1,226 +0,0 @@ -/** - * A very simple diff algorithm. Slightly adapted to support splitting at different stages (e.g. - * first diff lines, then diff words) - * - * https://bramcohen.livejournal.com/73318.html - * - * @experiemantal This API will likely change. - */ - -import * as map from '../map.js' -import * as math from '../math.js' -import * as array from '../array.js' - -/** - * Implementation of patience diff. Expects that content is pre-split (e.g. by newline). - * - * @param {Array} as - * @param {Array} bs - * @return {Array<{ index: number, remove: Array, insert: Array}>} changeset @todo should use delta instead - */ -export const diff = (as, bs) => { - const { - middleAs, - middleBs, - commonPrefix - } = removeCommonPrefixAndSuffix(as, bs) - return lcs(middleAs, middleBs, commonPrefix) -} - -/** - * @param {string} a - * @param {string} b - * @param {RegExp|string} _regexp - */ -export const diffSplitBy = (a, b, _regexp) => { - const isStringSeparator = typeof _regexp === 'string' - const separator = isStringSeparator ? _regexp : '' - const regexp = isStringSeparator ? new RegExp(_regexp, 'g') : _regexp - const as = splitByRegexp(a, regexp, !isStringSeparator) - const bs = splitByRegexp(b, regexp, !isStringSeparator) - const changes = diff(as, bs) - let prevSplitIndex = 0 - let prevStringIndex = 0 - return changes.map(change => { - for (; prevSplitIndex < change.index; prevSplitIndex++) { - prevStringIndex += as[prevSplitIndex].length - } - return { - index: prevStringIndex, - remove: change.remove.join(separator), - insert: change.insert.join(separator) - } - }) -} - -/** - * Sensible default for diffing strings using patience (it's fast though). - * - * Perform different types of patience diff on the content. Diff first by newline, then paragraphs, then by word - * (split by space, brackets, punctuation) - * - * @param {string} a - * @param {string} b - */ -export const diffAuto = (a, b) => - diffSplitBy(a, b, '\n').map(d => - diffSplitBy(d.remove, d.insert, /\. |[a-zA-Z0-9]+|[. ()[\],;{}]/g).map(dd => ({ - insert: dd.insert, - remove: dd.remove, - index: dd.index + d.index - })) - ).flat() - -/** - * @param {Array} as - * @param {Array} bs - */ -const removeCommonPrefixAndSuffix = (as, bs) => { - const commonLen = math.min(as.length, bs.length) - let commonPrefix = 0 - let commonSuffix = 0 - // match start - for (; commonPrefix < commonLen && as[commonPrefix] === bs[commonPrefix]; commonPrefix++) { /* nop */ } - // match end - for (; commonSuffix < commonLen - commonPrefix && as[as.length - 1 - commonSuffix] === bs[bs.length - 1 - commonSuffix]; commonSuffix++) { /* nop */ } - const middleAs = as.slice(commonPrefix, as.length - commonSuffix) - const middleBs = bs.slice(commonPrefix, bs.length - commonSuffix) - return { - middleAs, middleBs, commonPrefix, commonSuffix - } -} - -/** - * Splits string by regex and returns all strings as an array. The matched parts are also returned. - * - * @param {string} str - * @param {RegExp} regexp - * @param {boolean} includeSeparator - */ -const splitByRegexp = (str, regexp, includeSeparator) => { - const matches = [...str.matchAll(regexp)] - let prevIndex = 0 - /** - * @type {Array} - */ - const res = [] - matches.forEach(m => { - prevIndex < (m.index || 0) && res.push(str.slice(prevIndex, m.index)) - includeSeparator && res.push(m[0]) // is always non-empty - prevIndex = /** @type {number} */ (m.index) + m[0].length - }) - const end = str.slice(prevIndex) - end.length > 0 && res.push(end) - return res -} - -/** - * An item may have multiple occurances (not when matching unique entries). It also may have a - * reference to the stack of other items (from as to bs). - */ -class Item { - constructor () { - /** - * @type {Array} - */ - this.indexes = [] - /** - * The matching item from the other side - * @type {Item?} - */ - this.match = null - /** - * For patience sort. Reference (index of the stack) to the previous pile. - * - * @type {Item?} - */ - this.ref = null - } -} - -/** - * @param {Array} xs - */ -const partition = xs => { - /** - * @type {Map} - */ - const refs = map.create() - xs.forEach((x, index) => { - map.setIfUndefined(refs, x, () => new Item()).indexes.push(index) - }) - return refs -} - -/** - * Find the longest common subsequence of items using patience sort. - * - * @param {Array} as - * @param {Array} bs - * @param {number} indexAdjust - */ -const lcs = (as, bs, indexAdjust) => { - if (as.length === 0 && bs.length === 0) return [] - const aParts = partition(as) - const bParts = partition(bs) - /** - * @type {Array>} I.e. Array> - */ - const piles = [] - aParts.forEach((aItem, aKey) => { - // skip if no match or if either item is not unique - if (aItem.indexes.length > 1 || (aItem.match = bParts.get(aKey) || null) == null || aItem.match.indexes.length > 1) return - for (let i = 0; i < piles.length; i++) { - const pile = piles[i] - if (aItem.match.indexes[0] < /** @type {Item} */ (pile[pile.length - 1].match).indexes[0]) { - pile.push(aItem) - if (i > 0) aItem.ref = array.last(piles[i - 1]) - return - } - } - piles.length > 0 && (aItem.ref = array.last(piles[piles.length - 1])) - piles.push([aItem]) - }) - /** - * References to all matched items - * - * @type {Array} - */ - const matches = [] - /** - * @type {Item?} - */ - let currPileItem = piles[piles.length - 1]?.[0] - while (currPileItem != null) { - matches.push(currPileItem) - currPileItem = currPileItem.ref - } - matches.reverse() - // add pseude match (assume the string terminal always matches) - const pseudoA = new Item() - const pseudoB = new Item() - pseudoA.match = pseudoB - pseudoA.indexes.push(as.length) - pseudoB.indexes.push(bs.length) - matches.push(pseudoA) - /** - * @type {Array<{ index: number, remove: Array, insert: Array}>} - */ - const changeset = [] - let diffAStart = 0 - let diffBStart = 0 - for (let i = 0; i < matches.length; i++) { - const m = matches[i] - const delLength = m.indexes[0] - diffAStart - const insLength = /** @type {Item} */ (m.match).indexes[0] - diffBStart - if (delLength !== 0 || insLength !== 0) { - const stripped = removeCommonPrefixAndSuffix(as.slice(diffAStart, diffAStart + delLength), bs.slice(diffBStart, diffBStart + insLength)) - if (stripped.middleAs.length !== 0 || stripped.middleBs.length !== 0) { - changeset.push({ index: diffAStart + indexAdjust + stripped.commonPrefix, remove: stripped.middleAs, insert: stripped.middleBs }) - } - } - diffAStart = m.indexes[0] + 1 - diffBStart = /** @type {Item} */ (m.match).indexes[0] + 1 - } - return changeset -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.test.d.ts deleted file mode 100644 index 7633a91..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.test.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function testDiffing(_tc: t.TestCase): void; -export function testRepeatRandomWordReplace(tc: t.TestCase): void; -import * as t from '../testing.js'; -//# sourceMappingURL=patience.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.test.d.ts.map deleted file mode 100644 index d836cc4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/diff/patience.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patience.test.d.ts","sourceRoot":"","sources":["patience.test.js"],"names":[],"mappings":"AAmBO,iCAFI,CAAC,CAAC,QAAQ,QAwGpB;AAKM,gDAFI,CAAC,CAAC,QAAQ,QAgDpB;mBA3KkB,eAAe"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/aes-gcm.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/aes-gcm.cjs deleted file mode 100644 index fac8f5d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/aes-gcm.cjs +++ /dev/null @@ -1,171 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var encoding = require('./encoding-1a745c43.cjs'); -var decoding = require('./decoding-76e75827.cjs'); -var webcrypto = require('lib0/webcrypto'); -var string = require('./string-fddc5f8b.cjs'); -var common = require('./common.cjs'); -require('./math-96d5e8c4.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./error-0c1f634f.cjs'); - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var webcrypto__namespace = /*#__PURE__*/_interopNamespace(webcrypto); - -/** - * AES-GCM is a symmetric key for encryption - */ - -/** - * @typedef {Array<'encrypt'|'decrypt'>} Usages - */ - -/** - * @type {Usages} - */ -const defaultUsages = ['encrypt', 'decrypt']; - -/** - * @param {CryptoKey} key - * @param {Uint8Array} data - */ -const encrypt = (key, data) => { - const iv = webcrypto__namespace.getRandomValues(new Uint8Array(16)); // 92bit is enough. 128bit is recommended if space is not an issue. - return webcrypto__namespace.subtle.encrypt( - { - name: 'AES-GCM', - iv - }, - key, - data - ).then(cipher => { - const encryptedDataEncoder = encoding.createEncoder(); - // iv may be sent in the clear to the other peers - encoding.writeUint8Array(encryptedDataEncoder, iv); - encoding.writeVarUint8Array(encryptedDataEncoder, new Uint8Array(cipher)); - return encoding.toUint8Array(encryptedDataEncoder) - }) -}; - -/** - * @experimental The API is not final! - * - * Decrypt some data using AES-GCM method. - * - * @param {CryptoKey} key - * @param {Uint8Array} data - * @return {PromiseLike} decrypted buffer - */ -const decrypt = (key, data) => { - const dataDecoder = decoding.createDecoder(data); - const iv = decoding.readUint8Array(dataDecoder, 16); - const cipher = decoding.readVarUint8Array(dataDecoder); - return webcrypto__namespace.subtle.decrypt( - { - name: 'AES-GCM', - iv - }, - key, - cipher - ).then(data => new Uint8Array(data)) -}; - -const aesAlgDef = { - name: 'AES-GCM', - length: 256 -}; - -/** - * @param {any} jwk - * @param {Object} opts - * @param {Usages} [opts.usages] - * @param {boolean} [opts.extractable] - */ -const importKeyJwk = (jwk, { usages, extractable = false } = {}) => { - if (usages == null) { - /* c8 ignore next */ - usages = jwk.key_ops || defaultUsages; - } - return webcrypto__namespace.subtle.importKey('jwk', jwk, 'AES-GCM', extractable, /** @type {Usages} */ (usages)) -}; - -/** - * Only suited for importing public keys. - * - * @param {Uint8Array} raw - * @param {Object} opts - * @param {Usages} [opts.usages] - * @param {boolean} [opts.extractable] - */ -const importKeyRaw = (raw, { usages = defaultUsages, extractable = false } = {}) => - webcrypto__namespace.subtle.importKey('raw', raw, aesAlgDef, extractable, /** @type {Usages} */ (usages)); - -/** - * @param {Uint8Array | string} data - */ -/* c8 ignore next */ -const toBinary = data => typeof data === 'string' ? string.encodeUtf8(data) : data; - -/** - * @experimental The API is not final! - * - * Derive an symmetric key using the Password-Based-Key-Derivation-Function-2. - * - * @param {Uint8Array|string} secret - * @param {Uint8Array|string} salt - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - */ -const deriveKey = (secret, salt, { extractable = false, usages = defaultUsages } = {}) => - webcrypto__namespace.subtle.importKey( - 'raw', - toBinary(secret), - 'PBKDF2', - false, - ['deriveKey'] - ).then(keyMaterial => - webcrypto__namespace.subtle.deriveKey( - { - name: 'PBKDF2', - salt: toBinary(salt), // NIST recommends at least 64 bits - iterations: 600000, // OWASP recommends 600k iterations - hash: 'SHA-256' - }, - keyMaterial, - aesAlgDef, - extractable, - usages - ) - ); - -exports.exportKeyJwk = common.exportKeyJwk; -exports.exportKeyRaw = common.exportKeyRaw; -exports.decrypt = decrypt; -exports.deriveKey = deriveKey; -exports.encrypt = encrypt; -exports.importKeyJwk = importKeyJwk; -exports.importKeyRaw = importKeyRaw; -//# sourceMappingURL=aes-gcm.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/aes-gcm.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/aes-gcm.cjs.map deleted file mode 100644 index 2e86cf8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/aes-gcm.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aes-gcm.cjs","sources":["../crypto/aes-gcm.js"],"sourcesContent":["/**\n * AES-GCM is a symmetric key for encryption\n */\n\nimport * as encoding from '../encoding.js'\nimport * as decoding from '../decoding.js'\nimport * as webcrypto from 'lib0/webcrypto'\nimport * as string from '../string.js'\nexport { exportKeyJwk, exportKeyRaw } from './common.js'\n\n/**\n * @typedef {Array<'encrypt'|'decrypt'>} Usages\n */\n\n/**\n * @type {Usages}\n */\nconst defaultUsages = ['encrypt', 'decrypt']\n\n/**\n * @param {CryptoKey} key\n * @param {Uint8Array} data\n */\nexport const encrypt = (key, data) => {\n const iv = webcrypto.getRandomValues(new Uint8Array(16)) // 92bit is enough. 128bit is recommended if space is not an issue.\n return webcrypto.subtle.encrypt(\n {\n name: 'AES-GCM',\n iv\n },\n key,\n data\n ).then(cipher => {\n const encryptedDataEncoder = encoding.createEncoder()\n // iv may be sent in the clear to the other peers\n encoding.writeUint8Array(encryptedDataEncoder, iv)\n encoding.writeVarUint8Array(encryptedDataEncoder, new Uint8Array(cipher))\n return encoding.toUint8Array(encryptedDataEncoder)\n })\n}\n\n/**\n * @experimental The API is not final!\n *\n * Decrypt some data using AES-GCM method.\n *\n * @param {CryptoKey} key\n * @param {Uint8Array} data\n * @return {PromiseLike} decrypted buffer\n */\nexport const decrypt = (key, data) => {\n const dataDecoder = decoding.createDecoder(data)\n const iv = decoding.readUint8Array(dataDecoder, 16)\n const cipher = decoding.readVarUint8Array(dataDecoder)\n return webcrypto.subtle.decrypt(\n {\n name: 'AES-GCM',\n iv\n },\n key,\n cipher\n ).then(data => new Uint8Array(data))\n}\n\nconst aesAlgDef = {\n name: 'AES-GCM',\n length: 256\n}\n\n/**\n * @param {any} jwk\n * @param {Object} opts\n * @param {Usages} [opts.usages]\n * @param {boolean} [opts.extractable]\n */\nexport const importKeyJwk = (jwk, { usages, extractable = false } = {}) => {\n if (usages == null) {\n /* c8 ignore next */\n usages = jwk.key_ops || defaultUsages\n }\n return webcrypto.subtle.importKey('jwk', jwk, 'AES-GCM', extractable, /** @type {Usages} */ (usages))\n}\n\n/**\n * Only suited for importing public keys.\n *\n * @param {Uint8Array} raw\n * @param {Object} opts\n * @param {Usages} [opts.usages]\n * @param {boolean} [opts.extractable]\n */\nexport const importKeyRaw = (raw, { usages = defaultUsages, extractable = false } = {}) =>\n webcrypto.subtle.importKey('raw', raw, aesAlgDef, extractable, /** @type {Usages} */ (usages))\n\n/**\n * @param {Uint8Array | string} data\n */\n/* c8 ignore next */\nconst toBinary = data => typeof data === 'string' ? string.encodeUtf8(data) : data\n\n/**\n * @experimental The API is not final!\n *\n * Derive an symmetric key using the Password-Based-Key-Derivation-Function-2.\n *\n * @param {Uint8Array|string} secret\n * @param {Uint8Array|string} salt\n * @param {Object} opts\n * @param {boolean} [opts.extractable]\n * @param {Usages} [opts.usages]\n */\nexport const deriveKey = (secret, salt, { extractable = false, usages = defaultUsages } = {}) =>\n webcrypto.subtle.importKey(\n 'raw',\n toBinary(secret),\n 'PBKDF2',\n false,\n ['deriveKey']\n ).then(keyMaterial =>\n webcrypto.subtle.deriveKey(\n {\n name: 'PBKDF2',\n salt: toBinary(salt), // NIST recommends at least 64 bits\n iterations: 600000, // OWASP recommends 600k iterations\n hash: 'SHA-256'\n },\n keyMaterial,\n aesAlgDef,\n extractable,\n usages\n )\n )\n"],"names":["webcrypto","encoding.createEncoder","encoding.writeUint8Array","encoding.writeVarUint8Array","encoding.toUint8Array","decoding.createDecoder","decoding.readUint8Array","decoding.readVarUint8Array","string.encodeUtf8"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,SAAS,EAAC;AAC5C;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK;AACtC,EAAE,MAAM,EAAE,GAAGA,oBAAS,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,EAAC;AAC1D,EAAE,OAAOA,oBAAS,CAAC,MAAM,CAAC,OAAO;AACjC,IAAI;AACJ,MAAM,IAAI,EAAE,SAAS;AACrB,MAAM,EAAE;AACR,KAAK;AACL,IAAI,GAAG;AACP,IAAI,IAAI;AACR,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI;AACnB,IAAI,MAAM,oBAAoB,GAAGC,sBAAsB,GAAE;AACzD;AACA,IAAIC,wBAAwB,CAAC,oBAAoB,EAAE,EAAE,EAAC;AACtD,IAAIC,2BAA2B,CAAC,oBAAoB,EAAE,IAAI,UAAU,CAAC,MAAM,CAAC,EAAC;AAC7E,IAAI,OAAOC,qBAAqB,CAAC,oBAAoB,CAAC;AACtD,GAAG,CAAC;AACJ,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK;AACtC,EAAE,MAAM,WAAW,GAAGC,sBAAsB,CAAC,IAAI,EAAC;AAClD,EAAE,MAAM,EAAE,GAAGC,uBAAuB,CAAC,WAAW,EAAE,EAAE,EAAC;AACrD,EAAE,MAAM,MAAM,GAAGC,0BAA0B,CAAC,WAAW,EAAC;AACxD,EAAE,OAAOP,oBAAS,CAAC,MAAM,CAAC,OAAO;AACjC,IAAI;AACJ,MAAM,IAAI,EAAE,SA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C,MAAM,CAAC,SAAS;AAC5B,IAAI,KAAK;AACT,IAAI,QAAQ,CAAC,MAAM,CAAC;AACpB,IAAI,QAAQ;AACZ,IAAI,KAAK;AACT,IAAI,CAAC,WAAW,CAAC;AACjB,GAAG,CAAC,IAAI,CAAC,WAAW;AACpB,IAAIA,oBAAS,CAAC,MAAM,CAAC,SAAS;AAC9B,MAAM;AACN,QAAQ,IAAI,EAAE,QAAQ;AACtB,QAAQ,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;AAC5B,QAAQ,UAAU,EAAE,MAAM;AAC1B,QAAQ,IAAI,EAAE,SAAS;AACvB,OAAO;AACP,MAAM,WAAW;AACjB,MAAM,SAAS;AACf,MAAM,WAAW;AACjB,MAAM,MAAM;AACZ,KAAK;AACL;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array-78849c95.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array-78849c95.cjs deleted file mode 100644 index fca0aff..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array-78849c95.cjs +++ /dev/null @@ -1,260 +0,0 @@ -'use strict'; - -var set = require('./set-5b47859e.cjs'); - -/** - * Utility module to work with Arrays. - * - * @module array - */ - -/** - * Return the last element of an array. The element must exist - * - * @template L - * @param {ArrayLike} arr - * @return {L} - */ -const last = arr => arr[arr.length - 1]; - -/** - * @template C - * @return {Array} - */ -const create = () => /** @type {Array} */ ([]); - -/** - * @template D - * @param {Array} a - * @return {Array} - */ -const copy = a => /** @type {Array} */ (a.slice()); - -/** - * Append elements from src to dest - * - * @template M - * @param {Array} dest - * @param {Array} src - */ -const appendTo = (dest, src) => { - for (let i = 0; i < src.length; i++) { - dest.push(src[i]); - } -}; - -/** - * Transforms something array-like to an actual Array. - * - * @function - * @template T - * @param {ArrayLike|Iterable} arraylike - * @return {T} - */ -const from = Array.from; - -/** - * True iff condition holds on every element in the Array. - * - * @function - * @template {ArrayLike} ARR - * - * @param {ARR} arr - * @param {ARR extends ArrayLike ? ((value:S, index:number, arr:ARR) => boolean) : any} f - * @return {boolean} - */ -const every = (arr, f) => { - for (let i = 0; i < arr.length; i++) { - if (!f(arr[i], i, arr)) { - return false - } - } - return true -}; - -/** - * True iff condition holds on some element in the Array. - * - * @function - * @template {ArrayLike} ARR - * - * @param {ARR} arr - * @param {ARR extends ArrayLike ? ((value:S, index:number, arr:ARR) => boolean) : never} f - * @return {boolean} - */ -const some = (arr, f) => { - for (let i = 0; i < arr.length; i++) { - if (f(arr[i], i, arr)) { - return true - } - } - return false -}; - -/** - * @template ELEM - * - * @param {ArrayLike} a - * @param {ArrayLike} b - * @return {boolean} - */ -const equalFlat = (a, b) => a.length === b.length && every(a, (item, index) => item === b[index]); - -/** - * @template ELEM - * @param {Array>} arr - * @return {Array} - */ -const flatten = arr => fold(arr, /** @type {Array} */ ([]), (acc, val) => acc.concat(val)); - -/** - * @template T - * @param {number} len - * @param {function(number, Array):T} f - * @return {Array} - */ -const unfold = (len, f) => { - const array = new Array(len); - for (let i = 0; i < len; i++) { - array[i] = f(i, array); - } - return array -}; - -/** - * @template T - * @template RESULT - * @param {Array} arr - * @param {RESULT} seed - * @param {function(RESULT, T, number):RESULT} folder - */ -const fold = (arr, seed, folder) => arr.reduce(folder, seed); - -const isArray = Array.isArray; - -/** - * @template T - * @param {Array} arr - * @return {Array} - */ -const unique = arr => from(set.from(arr)); - -/** - * @template T - * @template M - * @param {ArrayLike} arr - * @param {function(T):M} mapper - * @return {Array} - */ -const uniqueBy = (arr, mapper) => { - /** - * @type {Set} - */ - const happened = set.create(); - /** - * @type {Array} - */ - const result = []; - for (let i = 0; i < arr.length; i++) { - const el = arr[i]; - const mapped = mapper(el); - if (!happened.has(mapped)) { - happened.add(mapped); - result.push(el); - } - } - return result -}; - -/** - * @template {ArrayLike} ARR - * @template {function(ARR extends ArrayLike ? T : never, number, ARR):any} MAPPER - * @param {ARR} arr - * @param {MAPPER} mapper - * @return {Array} - */ -const map = (arr, mapper) => { - /** - * @type {Array} - */ - const res = Array(arr.length); - for (let i = 0; i < arr.length; i++) { - res[i] = mapper(/** @type {any} */ (arr[i]), i, /** @type {any} */ (arr)); - } - return /** @type {any} */ (res) -}; - -/** - * This function bubble-sorts a single item to the correct position. The sort happens in-place and - * might be useful to ensure that a single item is at the correct position in an otherwise sorted - * array. - * - * @example - * const arr = [3, 2, 5] - * arr.sort((a, b) => a - b) - * arr // => [2, 3, 5] - * arr.splice(1, 0, 7) - * array.bubbleSortItem(arr, 1, (a, b) => a - b) - * arr // => [2, 3, 5, 7] - * - * @template T - * @param {Array} arr - * @param {number} i - * @param {(a:T,b:T) => number} compareFn - */ -const bubblesortItem = (arr, i, compareFn) => { - const n = arr[i]; - let j = i; - // try to sort to the right - while (j + 1 < arr.length && compareFn(n, arr[j + 1]) > 0) { - arr[j] = arr[j + 1]; - arr[++j] = n; - } - if (i === j && j > 0) { // no change yet - // sort to the left - while (j > 0 && compareFn(arr[j - 1], n) > 0) { - arr[j] = arr[j - 1]; - arr[--j] = n; - } - } - return j -}; - -var array = /*#__PURE__*/Object.freeze({ - __proto__: null, - last: last, - create: create, - copy: copy, - appendTo: appendTo, - from: from, - every: every, - some: some, - equalFlat: equalFlat, - flatten: flatten, - unfold: unfold, - fold: fold, - isArray: isArray, - unique: unique, - uniqueBy: uniqueBy, - map: map, - bubblesortItem: bubblesortItem -}); - -exports.appendTo = appendTo; -exports.array = array; -exports.bubblesortItem = bubblesortItem; -exports.copy = copy; -exports.create = create; -exports.equalFlat = equalFlat; -exports.every = every; -exports.flatten = flatten; -exports.fold = fold; -exports.from = from; -exports.isArray = isArray; -exports.last = last; -exports.map = map; -exports.some = some; -exports.unfold = unfold; -exports.unique = unique; -exports.uniqueBy = uniqueBy; -//# sourceMappingURL=array-78849c95.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array-78849c95.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array-78849c95.cjs.map deleted file mode 100644 index 6a353b3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array-78849c95.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"array-78849c95.cjs","sources":["../array.js"],"sourcesContent":["/**\n * Utility module to work with Arrays.\n *\n * @module array\n */\n\nimport * as set from './set.js'\n\n/**\n * Return the last element of an array. The element must exist\n *\n * @template L\n * @param {ArrayLike} arr\n * @return {L}\n */\nexport const last = arr => arr[arr.length - 1]\n\n/**\n * @template C\n * @return {Array}\n */\nexport const create = () => /** @type {Array} */ ([])\n\n/**\n * @template D\n * @param {Array} a\n * @return {Array}\n */\nexport const copy = a => /** @type {Array} */ (a.slice())\n\n/**\n * Append elements from src to dest\n *\n * @template M\n * @param {Array} dest\n * @param {Array} src\n */\nexport const appendTo = (dest, src) => {\n for (let i = 0; i < src.length; i++) {\n dest.push(src[i])\n }\n}\n\n/**\n * Transforms something array-like to an actual Array.\n *\n * @function\n * @template T\n * @param {ArrayLike|Iterable} arraylike\n * @return {T}\n */\nexport const from = Array.from\n\n/**\n * True iff condition holds on every element in the Array.\n *\n * @function\n * @template {ArrayLike} ARR\n *\n * @param {ARR} arr\n * @param {ARR extends ArrayLike ? ((value:S, index:number, arr:ARR) => boolean) : any} f\n * @return {boolean}\n */\nexport const every = (arr, f) => {\n for (let i = 0; i < arr.length; i++) {\n if (!f(arr[i], i, arr)) {\n return false\n }\n }\n return true\n}\n\n/**\n * True iff condition holds on some element in the Array.\n *\n * @function\n * @template {ArrayLike} ARR\n *\n * @param {ARR} arr\n * @param {ARR extends ArrayLike ? ((value:S, index:number, arr:ARR) => boolean) : never} f\n * @return {boolean}\n */\nexport const some = (arr, f) => {\n for (let i = 0; i < arr.length; i++) {\n if (f(arr[i], i, arr)) {\n return true\n }\n }\n return false\n}\n\n/**\n * @template ELEM\n *\n * @param {ArrayLike} a\n * @param {ArrayLike} b\n * @return {boolean}\n */\nexport const equalFlat = (a, b) => a.length === b.length && every(a, (item, index) => item === b[index])\n\n/**\n * @template ELEM\n * @param {Array>} arr\n * @return {Array}\n */\nexport const flatten = arr => fold(arr, /** @type {Array} */ ([]), (acc, val) => acc.concat(val))\n\n/**\n * @template T\n * @param {number} len\n * @param {function(number, Array):T} f\n * @return {Array}\n */\nexport const unfold = (len, f) => {\n const array = new Array(len)\n for (let i = 0; i < len; i++) {\n array[i] = f(i, array)\n }\n return array\n}\n\n/**\n * @template T\n * @template RESULT\n * @param {Array} arr\n * @param {RESULT} seed\n * @param {function(RESULT, T, number):RESULT} folder\n */\nexport const fold = (arr, seed, folder) => arr.reduce(folder, seed)\n\nexport const isArray = Array.isArray\n\n/**\n * @template T\n * @param {Array} arr\n * @return {Array}\n */\nexport const unique = arr => from(set.from(arr))\n\n/**\n * @template T\n * @template M\n * @param {ArrayLike} arr\n * @param {function(T):M} mapper\n * @return {Array}\n */\nexport const uniqueBy = (arr, mapper) => {\n /**\n * @type {Set}\n */\n const happened = set.create()\n /**\n * @type {Array}\n */\n const result = []\n for (let i = 0; i < arr.length; i++) {\n const el = arr[i]\n const mapped = mapper(el)\n if (!happened.has(mapped)) {\n happened.add(mapped)\n result.push(el)\n }\n }\n return result\n}\n\n/**\n * @template {ArrayLike} ARR\n * @template {function(ARR extends ArrayLike ? T : never, number, ARR):any} MAPPER\n * @param {ARR} arr\n * @param {MAPPER} mapper\n * @return {Array}\n */\nexport const map = (arr, mapper) => {\n /**\n * @type {Array}\n */\n const res = Array(arr.length)\n for (let i = 0; i < arr.length; i++) {\n res[i] = mapper(/** @type {any} */ (arr[i]), i, /** @type {any} */ (arr))\n }\n return /** @type {any} */ (res)\n}\n\n/**\n * This function bubble-sorts a single item to the correct position. The sort happens in-place and\n * might be useful to ensure that a single item is at the correct position in an otherwise sorted\n * array.\n *\n * @example\n * const arr = [3, 2, 5]\n * arr.sort((a, b) => a - b)\n * arr // => [2, 3, 5]\n * arr.splice(1, 0, 7)\n * array.bubbleSortItem(arr, 1, (a, b) => a - b)\n * arr // => [2, 3, 5, 7]\n *\n * @template T\n * @param {Array} arr\n * @param {number} i\n * @param {(a:T,b:T) => number} compareFn\n */\nexport const bubblesortItem = (arr, i, compareFn) => {\n const n = arr[i]\n let j = i\n // try to sort to the right\n while (j + 1 < arr.length && compareFn(n, arr[j + 1]) > 0) {\n arr[j] = arr[j + 1]\n arr[++j] = n\n }\n if (i === j && j > 0) { // no change yet\n // sort to the left\n while (j > 0 && compareFn(arr[j - 1], n) > 0) {\n arr[j] = arr[j - 1]\n arr[--j] = n\n }\n }\n return j\n}\n"],"names":["set.from","set.create"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,EAAC;AAC9C;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,+BAA+B,EAAE,EAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,6BAA6B,CAAC,CAAC,KAAK,EAAE,EAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK;AACvC,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACvC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAC;AACrB,GAAG;AACH,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,KAAK,CAAC,KAAI;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,KAAK,GAAG,CAAC,GAAG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E,CAAC,CAAC,GAAG,EAAC;AAClB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,CAAC;AACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.cjs deleted file mode 100644 index e0f3417..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.cjs +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./set-5b47859e.cjs'); -var array = require('./array-78849c95.cjs'); - - - -exports.appendTo = array.appendTo; -exports.bubblesortItem = array.bubblesortItem; -exports.copy = array.copy; -exports.create = array.create; -exports.equalFlat = array.equalFlat; -exports.every = array.every; -exports.flatten = array.flatten; -exports.fold = array.fold; -exports.from = array.from; -exports.isArray = array.isArray; -exports.last = array.last; -exports.map = array.map; -exports.some = array.some; -exports.unfold = array.unfold; -exports.unique = array.unique; -exports.uniqueBy = array.uniqueBy; -//# sourceMappingURL=array.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.cjs.map deleted file mode 100644 index 0a2fe5f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"array.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.d.ts deleted file mode 100644 index 4b2730c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export function last(arr: ArrayLike): L; -export function create(): Array; -export function copy(a: Array): Array; -export function appendTo(dest: Array, src: Array): void; -/** - * Transforms something array-like to an actual Array. - * - * @function - * @template T - * @param {ArrayLike|Iterable} arraylike - * @return {T} - */ -export const from: { - (arrayLike: ArrayLike): T_1[]; - (arrayLike: ArrayLike, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[]; - (iterable: Iterable | ArrayLike): T_1[]; - (iterable: Iterable | ArrayLike, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[]; -}; -export function every>(arr: ARR, f: ARR extends ArrayLike ? ((value: S, index: number, arr: ARR) => boolean) : any): boolean; -export function some>(arr: ARR, f: ARR extends ArrayLike ? ((value: S, index: number, arr: ARR) => boolean) : never): boolean; -export function equalFlat(a: ArrayLike, b: ArrayLike): boolean; -export function flatten(arr: Array>): Array; -export function unfold(len: number, f: (arg0: number, arg1: Array) => T_1): Array; -export function fold(arr: Array, seed: RESULT, folder: (arg0: RESULT, arg1: T_1, arg2: number) => RESULT): RESULT; -export const isArray: (arg: any) => arg is any[]; -export function unique(arr: Array): Array; -export function uniqueBy(arr: ArrayLike, mapper: (arg0: T_1) => M): Array; -export function map, MAPPER extends (arg0: ARR extends ArrayLike ? T_1 : never, arg1: number, arg2: ARR) => any>(arr: ARR, mapper: MAPPER): Array infer M ? M : never>; -export function bubblesortItem(arr: Array, i: number, compareFn: (a: T_1, b: T_1) => number): number; -//# sourceMappingURL=array.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.d.ts.map deleted file mode 100644 index 37490fc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.d.ts.map +++ /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;AASM,0BALM,MAAM,OACR,KAAK,CAAC,GAAC,CAAC,QACR,MAAM,UACN,CAAS,IAAM,EAAN,MAAM,EAAE,IAAC,EAAD,GAAC,EAAE,IAAM,EAAN,MAAM,KAAE,MAAM,UAEsB;AAEnE,iDAAoC;AAO7B,iCAHI,KAAK,CAAC,GAAC,CAAC,GACP,KAAK,CAAC,GAAC,CAAC,CAE4B;AASzC,8BALM,CAAC,OACH,SAAS,CAAC,GAAC,CAAC,UACZ,CAAS,IAAC,EAAD,GAAC,KAAE,CAAC,GACZ,KAAK,CAAC,GAAC,CAAC,CAoBnB;AASM,oBANuB,GAAG,SAAnB,SAAS,CAAC,GAAG,CAAE,EACwD,MAAM,SAA9E,CAAU,IAA0C,EAA1C,GAAG,SAAS,SAAS,CAAC,MAAM,GAAC,CAAC,GAAG,GAAC,GAAG,KAAK,EAAE,IAAM,EAAN,MAAM,EAAE,IAAG,EAAH,GAAG,KAAE,GAAI,OACzE,GAAG,UACH,MAAM,GACL,KAAK,CAAC,MAAM,SAAS,IAAS,IAAM,EAAH,GAAG,EAAA,KAAG,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAWtE;AAoBM,yCAJI,KAAK,CAAC,GAAC,CAAC,KACR,MAAM,aACN,CAAC,CAAC,EAAC,GAAC,EAAC,CAAC,EAAC,GAAC,KAAK,MAAM,UAkB7B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.test.d.ts deleted file mode 100644 index 4776afd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.test.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export function testIsarrayPerformance(_tc: t.TestCase): void; -export function testAppend(_tc: t.TestCase): void; -export function testBasic(_tc: t.TestCase): void; -export function testflatten(_tc: t.TestCase): void; -export function testFolding(_tc: t.TestCase): void; -export function testEvery(_tc: t.TestCase): void; -export function testIsArray(_tc: t.TestCase): void; -export function testUnique(_tc: t.TestCase): void; -export function testBubblesortItemEdgeCases(tc: t.TestCase): void; -export function testRepeatBubblesortItem(tc: t.TestCase): void; -export function testRepeatBubblesort(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=array.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.test.d.ts.map deleted file mode 100644 index f9df3b5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/array.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"array.test.d.ts","sourceRoot":"","sources":["../array.test.js"],"names":[],"mappings":"AAOO,4CAFI,CAAC,CAAC,QAAQ,QAkCpB;AAKM,gCAFI,CAAC,CAAC,QAAQ,QAMpB;AAKM,+BAFI,CAAC,CAAC,QAAQ,QAMpB;AAKM,iCAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,iCAFI,CAAC,CAAC,QAAQ,QAkBpB;AAKM,+BAFI,CAAC,CAAC,QAAQ,QAQpB;AAKM,iCAFI,CAAC,CAAC,QAAQ,QASpB;AAKM,gCAFI,CAAC,CAAC,QAAQ,QAOpB;AAKM,gDAFI,CAAC,CAAC,QAAQ,QAOpB;AAKM,6CAFI,CAAC,CAAC,QAAQ,QAWpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,QASpB;mBA1JkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0ecdsa-generate-keypair.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0ecdsa-generate-keypair.d.ts deleted file mode 100644 index 71a08e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0ecdsa-generate-keypair.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=0ecdsa-generate-keypair.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0ecdsa-generate-keypair.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0ecdsa-generate-keypair.d.ts.map deleted file mode 100644 index 58c48c6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0ecdsa-generate-keypair.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"0ecdsa-generate-keypair.d.ts","sourceRoot":"","sources":["../../bin/0ecdsa-generate-keypair.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0serve.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0serve.d.ts deleted file mode 100644 index 97bafa4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0serve.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=0serve.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0serve.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0serve.d.ts.map deleted file mode 100644 index 8e6e013..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/0serve.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"0serve.d.ts","sourceRoot":"","sources":["../../bin/0serve.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gendocs.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gendocs.d.ts deleted file mode 100644 index 422e119..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gendocs.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=gendocs.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gendocs.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gendocs.d.ts.map deleted file mode 100644 index 9ea4ead..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gendocs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gendocs.d.ts","sourceRoot":"","sources":["../../bin/gendocs.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gentesthtml.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gentesthtml.d.ts deleted file mode 100644 index 39f067b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gentesthtml.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=gentesthtml.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gentesthtml.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gentesthtml.d.ts.map deleted file mode 100644 index f4bf70a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/bin/gentesthtml.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gentesthtml.d.ts","sourceRoot":"","sources":["../../bin/gentesthtml.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary-ac8e39e2.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary-ac8e39e2.cjs deleted file mode 100644 index 7b705b8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary-ac8e39e2.cjs +++ /dev/null @@ -1,229 +0,0 @@ -'use strict'; - -/* eslint-env browser */ - -/** - * Binary data constants. - * - * @module binary - */ - -/** - * n-th bit activated. - * - * @type {number} - */ -const BIT1 = 1; -const BIT2 = 2; -const BIT3 = 4; -const BIT4 = 8; -const BIT5 = 16; -const BIT6 = 32; -const BIT7 = 64; -const BIT8 = 128; -const BIT9 = 256; -const BIT10 = 512; -const BIT11 = 1024; -const BIT12 = 2048; -const BIT13 = 4096; -const BIT14 = 8192; -const BIT15 = 16384; -const BIT16 = 32768; -const BIT17 = 65536; -const BIT18 = 1 << 17; -const BIT19 = 1 << 18; -const BIT20 = 1 << 19; -const BIT21 = 1 << 20; -const BIT22 = 1 << 21; -const BIT23 = 1 << 22; -const BIT24 = 1 << 23; -const BIT25 = 1 << 24; -const BIT26 = 1 << 25; -const BIT27 = 1 << 26; -const BIT28 = 1 << 27; -const BIT29 = 1 << 28; -const BIT30 = 1 << 29; -const BIT31 = 1 << 30; -const BIT32 = 1 << 31; - -/** - * First n bits activated. - * - * @type {number} - */ -const BITS0 = 0; -const BITS1 = 1; -const BITS2 = 3; -const BITS3 = 7; -const BITS4 = 15; -const BITS5 = 31; -const BITS6 = 63; -const BITS7 = 127; -const BITS8 = 255; -const BITS9 = 511; -const BITS10 = 1023; -const BITS11 = 2047; -const BITS12 = 4095; -const BITS13 = 8191; -const BITS14 = 16383; -const BITS15 = 32767; -const BITS16 = 65535; -const BITS17 = BIT18 - 1; -const BITS18 = BIT19 - 1; -const BITS19 = BIT20 - 1; -const BITS20 = BIT21 - 1; -const BITS21 = BIT22 - 1; -const BITS22 = BIT23 - 1; -const BITS23 = BIT24 - 1; -const BITS24 = BIT25 - 1; -const BITS25 = BIT26 - 1; -const BITS26 = BIT27 - 1; -const BITS27 = BIT28 - 1; -const BITS28 = BIT29 - 1; -const BITS29 = BIT30 - 1; -const BITS30 = BIT31 - 1; -/** - * @type {number} - */ -const BITS31 = 0x7FFFFFFF; -/** - * @type {number} - */ -const BITS32 = 0xFFFFFFFF; - -var binary = /*#__PURE__*/Object.freeze({ - __proto__: null, - BIT1: BIT1, - BIT2: BIT2, - BIT3: BIT3, - BIT4: BIT4, - BIT5: BIT5, - BIT6: BIT6, - BIT7: BIT7, - BIT8: BIT8, - BIT9: BIT9, - BIT10: BIT10, - BIT11: BIT11, - BIT12: BIT12, - BIT13: BIT13, - BIT14: BIT14, - BIT15: BIT15, - BIT16: BIT16, - BIT17: BIT17, - BIT18: BIT18, - BIT19: BIT19, - BIT20: BIT20, - BIT21: BIT21, - BIT22: BIT22, - BIT23: BIT23, - BIT24: BIT24, - BIT25: BIT25, - BIT26: BIT26, - BIT27: BIT27, - BIT28: BIT28, - BIT29: BIT29, - BIT30: BIT30, - BIT31: BIT31, - BIT32: BIT32, - BITS0: BITS0, - BITS1: BITS1, - BITS2: BITS2, - BITS3: BITS3, - BITS4: BITS4, - BITS5: BITS5, - BITS6: BITS6, - BITS7: BITS7, - BITS8: BITS8, - BITS9: BITS9, - BITS10: BITS10, - BITS11: BITS11, - BITS12: BITS12, - BITS13: BITS13, - BITS14: BITS14, - BITS15: BITS15, - BITS16: BITS16, - BITS17: BITS17, - BITS18: BITS18, - BITS19: BITS19, - BITS20: BITS20, - BITS21: BITS21, - BITS22: BITS22, - BITS23: BITS23, - BITS24: BITS24, - BITS25: BITS25, - BITS26: BITS26, - BITS27: BITS27, - BITS28: BITS28, - BITS29: BITS29, - BITS30: BITS30, - BITS31: BITS31, - BITS32: BITS32 -}); - -exports.BIT1 = BIT1; -exports.BIT10 = BIT10; -exports.BIT11 = BIT11; -exports.BIT12 = BIT12; -exports.BIT13 = BIT13; -exports.BIT14 = BIT14; -exports.BIT15 = BIT15; -exports.BIT16 = BIT16; -exports.BIT17 = BIT17; -exports.BIT18 = BIT18; -exports.BIT19 = BIT19; -exports.BIT2 = BIT2; -exports.BIT20 = BIT20; -exports.BIT21 = BIT21; -exports.BIT22 = BIT22; -exports.BIT23 = BIT23; -exports.BIT24 = BIT24; -exports.BIT25 = BIT25; -exports.BIT26 = BIT26; -exports.BIT27 = BIT27; -exports.BIT28 = BIT28; -exports.BIT29 = BIT29; -exports.BIT3 = BIT3; -exports.BIT30 = BIT30; -exports.BIT31 = BIT31; -exports.BIT32 = BIT32; -exports.BIT4 = BIT4; -exports.BIT5 = BIT5; -exports.BIT6 = BIT6; -exports.BIT7 = BIT7; -exports.BIT8 = BIT8; -exports.BIT9 = BIT9; -exports.BITS0 = BITS0; -exports.BITS1 = BITS1; -exports.BITS10 = BITS10; -exports.BITS11 = BITS11; -exports.BITS12 = BITS12; -exports.BITS13 = BITS13; -exports.BITS14 = BITS14; -exports.BITS15 = BITS15; -exports.BITS16 = BITS16; -exports.BITS17 = BITS17; -exports.BITS18 = BITS18; -exports.BITS19 = BITS19; -exports.BITS2 = BITS2; -exports.BITS20 = BITS20; -exports.BITS21 = BITS21; -exports.BITS22 = BITS22; -exports.BITS23 = BITS23; -exports.BITS24 = BITS24; -exports.BITS25 = BITS25; -exports.BITS26 = BITS26; -exports.BITS27 = BITS27; -exports.BITS28 = BITS28; -exports.BITS29 = BITS29; -exports.BITS3 = BITS3; -exports.BITS30 = BITS30; -exports.BITS31 = BITS31; -exports.BITS32 = BITS32; -exports.BITS4 = BITS4; -exports.BITS5 = BITS5; -exports.BITS6 = BITS6; -exports.BITS7 = BITS7; -exports.BITS8 = BITS8; -exports.BITS9 = BITS9; -exports.binary = binary; -//# sourceMappingURL=binary-ac8e39e2.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary-ac8e39e2.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary-ac8e39e2.cjs.map deleted file mode 100644 index cee5b9b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary-ac8e39e2.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binary-ac8e39e2.cjs","sources":["../binary.js"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * Binary data constants.\n *\n * @module binary\n */\n\n/**\n * n-th bit activated.\n *\n * @type {number}\n */\nexport const BIT1 = 1\nexport const BIT2 = 2\nexport const BIT3 = 4\nexport const BIT4 = 8\nexport const BIT5 = 16\nexport const BIT6 = 32\nexport const BIT7 = 64\nexport const BIT8 = 128\nexport const BIT9 = 256\nexport const BIT10 = 512\nexport const BIT11 = 1024\nexport const BIT12 = 2048\nexport const BIT13 = 4096\nexport const BIT14 = 8192\nexport const BIT15 = 16384\nexport const BIT16 = 32768\nexport const BIT17 = 65536\nexport const BIT18 = 1 << 17\nexport const BIT19 = 1 << 18\nexport const BIT20 = 1 << 19\nexport const BIT21 = 1 << 20\nexport const BIT22 = 1 << 21\nexport const BIT23 = 1 << 22\nexport const BIT24 = 1 << 23\nexport const BIT25 = 1 << 24\nexport const BIT26 = 1 << 25\nexport const BIT27 = 1 << 26\nexport const BIT28 = 1 << 27\nexport const BIT29 = 1 << 28\nexport const BIT30 = 1 << 29\nexport const BIT31 = 1 << 30\nexport const BIT32 = 1 << 31\n\n/**\n * First n bits activated.\n *\n * @type {number}\n */\nexport const BITS0 = 0\nexport const BITS1 = 1\nexport const BITS2 = 3\nexport const BITS3 = 7\nexport const BITS4 = 15\nexport const BITS5 = 31\nexport const BITS6 = 63\nexport const BITS7 = 127\nexport const BITS8 = 255\nexport const BITS9 = 511\nexport const BITS10 = 1023\nexport const BITS11 = 2047\nexport const BITS12 = 4095\nexport const BITS13 = 8191\nexport const BITS14 = 16383\nexport const BITS15 = 32767\nexport const BITS16 = 65535\nexport const BITS17 = BIT18 - 1\nexport const BITS18 = BIT19 - 1\nexport const BITS19 = BIT20 - 1\nexport const BITS20 = BIT21 - 1\nexport const BITS21 = BIT22 - 1\nexport const BITS22 = BIT23 - 1\nexport const BITS23 = BIT24 - 1\nexport const BITS24 = BIT25 - 1\nexport const BITS25 = BIT26 - 1\nexport const BITS26 = BIT27 - 1\nexport const BITS27 = BIT28 - 1\nexport const BITS28 = BIT29 - 1\nexport const BITS29 = BIT30 - 1\nexport const BITS30 = BIT31 - 1\n/**\n * @type {number}\n */\nexport const BITS31 = 0x7FFFFFFF\n/**\n * @type {number}\n */\nexport const BITS32 = 0xFFFFFFFF\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,EAAC;AACT,MAAC,IAAI,GAAG,EAAC;AACT,MAAC,IAAI,GAAG,EAAC;AACT,MAAC,IAAI,GAAG,EAAC;AACT,MAAC,IAAI,GAAG,GAAE;AACV,MAAC,IAAI,GAAG,GAAE;AACV,MAAC,IAAI,GAAG,GAAE;AACV,MAAC,IAAI,GAAG,IAAG;AACX,MAAC,IAAI,GAAG,IAAG;AACX,MAAC,KAAK,GAAG,IAAG;AACZ,MAAC,KAAK,GAAG,KAAI;AACb,MAAC,KAAK,GAAG,KAAI;AACb,MAAC,KAAK,GAAG,KAAI;AACb,MAAC,KAAK,GAAG,KAAI;AACb,MAAC,KAAK,GAAG,MAAK;AACd,MAAC,KAAK,GAAG,MAAK;AACd,MAAC,KAAK,GAAG,MAAK;AACd,MAAC,KAAK,GAAG,CAAC,IAAI,GAAE;AAChB,MAAC,KAAK,GAAG,CAAC,IAAI,GAAE;AAChB,MAAC,KAAK,GAAG,CAAC,IAAI,GAAE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AG,EAAC;AACnB,MAAC,MAAM,GAAG,KAAK,GAAG,EAAC;AACnB,MAAC,MAAM,GAAG,KAAK,GAAG,EAAC;AACnB,MAAC,MAAM,GAAG,KAAK,GAAG,EAAC;AACnB,MAAC,MAAM,GAAG,KAAK,GAAG,EAAC;AACnB,MAAC,MAAM,GAAG,KAAK,GAAG,EAAC;AACnB,MAAC,MAAM,GAAG,KAAK,GAAG,EAAC;AACnB,MAAC,MAAM,GAAG,KAAK,GAAG,EAAC;AACnB,MAAC,MAAM,GAAG,KAAK,GAAG,EAAC;AACnB,MAAC,MAAM,GAAG,KAAK,GAAG,EAAC;AAC/B;AACA;AACA;AACY,MAAC,MAAM,GAAG,WAAU;AAChC;AACA;AACA;AACY,MAAC,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.cjs deleted file mode 100644 index ea72a37..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.cjs +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var binary = require('./binary-ac8e39e2.cjs'); - - - -exports.BIT1 = binary.BIT1; -exports.BIT10 = binary.BIT10; -exports.BIT11 = binary.BIT11; -exports.BIT12 = binary.BIT12; -exports.BIT13 = binary.BIT13; -exports.BIT14 = binary.BIT14; -exports.BIT15 = binary.BIT15; -exports.BIT16 = binary.BIT16; -exports.BIT17 = binary.BIT17; -exports.BIT18 = binary.BIT18; -exports.BIT19 = binary.BIT19; -exports.BIT2 = binary.BIT2; -exports.BIT20 = binary.BIT20; -exports.BIT21 = binary.BIT21; -exports.BIT22 = binary.BIT22; -exports.BIT23 = binary.BIT23; -exports.BIT24 = binary.BIT24; -exports.BIT25 = binary.BIT25; -exports.BIT26 = binary.BIT26; -exports.BIT27 = binary.BIT27; -exports.BIT28 = binary.BIT28; -exports.BIT29 = binary.BIT29; -exports.BIT3 = binary.BIT3; -exports.BIT30 = binary.BIT30; -exports.BIT31 = binary.BIT31; -exports.BIT32 = binary.BIT32; -exports.BIT4 = binary.BIT4; -exports.BIT5 = binary.BIT5; -exports.BIT6 = binary.BIT6; -exports.BIT7 = binary.BIT7; -exports.BIT8 = binary.BIT8; -exports.BIT9 = binary.BIT9; -exports.BITS0 = binary.BITS0; -exports.BITS1 = binary.BITS1; -exports.BITS10 = binary.BITS10; -exports.BITS11 = binary.BITS11; -exports.BITS12 = binary.BITS12; -exports.BITS13 = binary.BITS13; -exports.BITS14 = binary.BITS14; -exports.BITS15 = binary.BITS15; -exports.BITS16 = binary.BITS16; -exports.BITS17 = binary.BITS17; -exports.BITS18 = binary.BITS18; -exports.BITS19 = binary.BITS19; -exports.BITS2 = binary.BITS2; -exports.BITS20 = binary.BITS20; -exports.BITS21 = binary.BITS21; -exports.BITS22 = binary.BITS22; -exports.BITS23 = binary.BITS23; -exports.BITS24 = binary.BITS24; -exports.BITS25 = binary.BITS25; -exports.BITS26 = binary.BITS26; -exports.BITS27 = binary.BITS27; -exports.BITS28 = binary.BITS28; -exports.BITS29 = binary.BITS29; -exports.BITS3 = binary.BITS3; -exports.BITS30 = binary.BITS30; -exports.BITS31 = binary.BITS31; -exports.BITS32 = binary.BITS32; -exports.BITS4 = binary.BITS4; -exports.BITS5 = binary.BITS5; -exports.BITS6 = binary.BITS6; -exports.BITS7 = binary.BITS7; -exports.BITS8 = binary.BITS8; -exports.BITS9 = binary.BITS9; -//# sourceMappingURL=binary.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.cjs.map deleted file mode 100644 index eaadb4c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binary.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.d.ts deleted file mode 100644 index 890f0c4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Binary data constants. - * - * @module binary - */ -/** - * n-th bit activated. - * - * @type {number} - */ -export const BIT1: number; -export const BIT2: 2; -export const BIT3: 4; -export const BIT4: 8; -export const BIT5: 16; -export const BIT6: 32; -export const BIT7: 64; -export const BIT8: 128; -export const BIT9: 256; -export const BIT10: 512; -export const BIT11: 1024; -export const BIT12: 2048; -export const BIT13: 4096; -export const BIT14: 8192; -export const BIT15: 16384; -export const BIT16: 32768; -export const BIT17: 65536; -export const BIT18: number; -export const BIT19: number; -export const BIT20: number; -export const BIT21: number; -export const BIT22: number; -export const BIT23: number; -export const BIT24: number; -export const BIT25: number; -export const BIT26: number; -export const BIT27: number; -export const BIT28: number; -export const BIT29: number; -export const BIT30: number; -export const BIT31: number; -export const BIT32: number; -/** - * First n bits activated. - * - * @type {number} - */ -export const BITS0: number; -export const BITS1: 1; -export const BITS2: 3; -export const BITS3: 7; -export const BITS4: 15; -export const BITS5: 31; -export const BITS6: 63; -export const BITS7: 127; -export const BITS8: 255; -export const BITS9: 511; -export const BITS10: 1023; -export const BITS11: 2047; -export const BITS12: 4095; -export const BITS13: 8191; -export const BITS14: 16383; -export const BITS15: 32767; -export const BITS16: 65535; -export const BITS17: number; -export const BITS18: number; -export const BITS19: number; -export const BITS20: number; -export const BITS21: number; -export const BITS22: number; -export const BITS23: number; -export const BITS24: number; -export const BITS25: number; -export const BITS26: number; -export const BITS27: number; -export const BITS28: number; -export const BITS29: number; -export const BITS30: number; -/** - * @type {number} - */ -export const BITS31: number; -/** - * @type {number} - */ -export const BITS32: number; -//# sourceMappingURL=binary.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.d.ts.map deleted file mode 100644 index 183f702..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../binary.js"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH;;;;GAIG;AACH,mBAFU,MAAM,CAEK;AACrB,mBAAoB,CAAC,CAAA;AACrB,mBAAoB,CAAC,CAAA;AACrB,mBAAoB,CAAC,CAAA;AACrB,mBAAoB,EAAE,CAAA;AACtB,mBAAoB,EAAE,CAAA;AACtB,mBAAoB,EAAE,CAAA;AACtB,mBAAoB,GAAG,CAAA;AACvB,mBAAoB,GAAG,CAAA;AACvB,oBAAqB,GAAG,CAAA;AACxB,oBAAqB,IAAI,CAAA;AACzB,oBAAqB,IAAI,CAAA;AACzB,oBAAqB,IAAI,CAAA;AACzB,oBAAqB,IAAI,CAAA;AACzB,oBAAqB,KAAK,CAAA;AAC1B,oBAAqB,KAAK,CAAA;AAC1B,oBAAqB,KAAK,CAAA;AAC1B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAE5B;;;;GAIG;AACH,oBAFU,MAAM,CAEM;AACtB,oBAAqB,CAAC,CAAA;AACtB,oBAAqB,CAAC,CAAA;AACtB,oBAAqB,CAAC,CAAA;AACtB,oBAAqB,EAAE,CAAA;AACvB,oBAAqB,EAAE,CAAA;AACvB,oBAAqB,EAAE,CAAA;AACvB,oBAAqB,GAAG,CAAA;AACxB,oBAAqB,GAAG,CAAA;AACxB,oBAAqB,GAAG,CAAA;AACxB,qBAAsB,IAAI,CAAA;AAC1B,qBAAsB,IAAI,CAAA;AAC1B,qBAAsB,IAAI,CAAA;AAC1B,qBAAsB,IAAI,CAAA;AAC1B,qBAAsB,KAAK,CAAA;AAC3B,qBAAsB,KAAK,CAAA;AAC3B,qBAAsB,KAAK,CAAA;AAC3B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B,4BAA+B;AAC/B;;GAEG;AACH,qBAFU,MAAM,CAEgB;AAChC;;GAEG;AACH,qBAFU,MAAM,CAEgB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.test.d.ts deleted file mode 100644 index 1c2e586..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.test.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function testBitx(tc: t.TestCase): void; -export function testBitsx(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=binary.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.test.d.ts.map deleted file mode 100644 index 8434c62..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binary.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binary.test.d.ts","sourceRoot":"","sources":["../binary.test.js"],"names":[],"mappings":"AAMO,6BAFI,CAAC,CAAC,QAAQ,QAOpB;AAKM,8BAFI,CAAC,CAAC,QAAQ,QAWpB;mBAxBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binding.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binding.cjs deleted file mode 100644 index 00c550e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binding.cjs +++ /dev/null @@ -1,484 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var observable = require('./observable.cjs'); -var delta = require('./delta.cjs'); -require('./testing.cjs'); -var schema = require('./schema.cjs'); -var dom = require('./dom-7e625b09.cjs'); -var set = require('./set-5b47859e.cjs'); -var map = require('./map-24d263c0.cjs'); -var error = require('./error-0c1f634f.cjs'); -var math = require('./math-96d5e8c4.cjs'); -var mutex = require('./mutex-63f09c81.cjs'); -require('./array-78849c95.cjs'); -require('./list.cjs'); -require('./function-314580f7.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./fingerprint.cjs'); -require('./encoding-1a745c43.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./string-fddc5f8b.cjs'); -require('./rabin.cjs'); -require('./buffer-3e750729.cjs'); -require('./environment-1c97264d.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./decoding-76e75827.cjs'); -require('./patience.cjs'); -require('./prng-37d48618.cjs'); -require('lib0/logging'); -require('./diff-9d236524.cjs'); -require('./random.cjs'); -require('lib0/webcrypto'); -require('./statistics-65f6114b.cjs'); -require('./json-092190a1.cjs'); -require('./time-d8438852.cjs'); -require('./metric.cjs'); -require('./promise-cda7b9bb.cjs'); -require('lib0/performance'); -require('./pair-ab022bc3.cjs'); - -/* eslint-disable */ - -/** - * @template {delta.Delta?} DeltaA - * @template {delta.Delta?} DeltaB - * @typedef {{ a: DeltaA?, b: DeltaB? }} TransformResult - */ - -/** - * @template {delta.DeltaBuilder?} DeltaA - * @template {delta.DeltaBuilder?} DeltaB - * @param {DeltaA} a - * @param {DeltaB} b - * @return {TransformResult} - */ -const transformResult = (a, b) => ({ a, b }); - -transformResult(delta.create('x'), null); - -/** - * @template {delta.DeltaAny} DeltaA - * @template {delta.DeltaAny} DeltaB - * @typedef {(t:{a:DeltaA?,b:DeltaB?})=>({a:DeltaA?,b:DeltaB?})} DeltaTransformer - */ - -/** - * @template {delta.Delta} A - * @template {(A extends delta.Delta ? delta.Delta<`x-${NodeName}`,Attrs,Children,Text> : never)} B - * @param {TransformResult} t - * @return {TransformResult} - */ -const rename = t => { - /** - * @type {any} - */ - const tout = /** @type {any} */ (transformResult(null, null)); - if (t.a) { - const c = /** @type {delta.Delta} */ (t.a.clone()); - c.name = 'x-' + c.name; - // @ts-ignore - tout.b = c; - } - if (t.b) { - const c = /** @type {delta.Delta} */ (t.b.clone()); - c.name = c.name.slice(2); - // @ts-ignore - tout.a = c; - } - return tout -}; - -delta.create('x', { x: 'dtrn' }); -rename({ a: delta.create('x', { x: 'dtrn' }), b: null }); -// -// /** -// * @template {delta.Delta} D -// * @param {s.Schema} $d -// * @return {Transformer} -// */ -// const id = ($d) => /** @type {Transformer} */ (new Transformer($d)) -// -// const q = id(delta.$delta({ name: 'div' })) -// const q2 = id(delta.$delta({ name: 'div', attrs: { a: s.$string } })).pipe(t.delta('h1', { color: t => query('a')(t), name:'mystuff' }, t => [query('b')(t)])) -// const q3 = t.delta('h1', { color: t => query('a')(t), name:'mystuff' }, t => [query('b')(t)])(id(delta.$delta({ name: 'div', attrs: { a: s.$string } })))) -// -// -// /** -// * @param {Transformer>} t -// */ -// const dataToH1 = t => t.delta('h1', { color: t => query('a')(t), name:'mystuff' }, t => [query('b')(t)])(t) -// const q4 = dataToH1(id(delta.$delta({ name: 'div', attrs: { a: s.$string } }))) -// -// const dataToH1_2 = t => rename('h1')(renameAttr({ a: 'color' })(static(delta.create('h1', { name: 'mystuff' }, 'some content!'))(t))) - -/* eslint-disable */ - -/** - * @template T - * @typedef {import('../schema.js').Schema} Schema - */ - -/** - * @template {delta.AbstractDelta} DeltaA - * @template {delta.AbstractDelta} DeltaB - */ -class Binding { - /** - * @param {RDT} a - * @param {RDT} b - * @param {dt.Template} template - */ - constructor (a, b, template) { - /** - * @type {dt.Transformer} - */ - this.t = template.init(); - this.a = a; - this.b = b; - this._mux = mutex.createMutex(); - this._achanged = this.a.on('change', d => this._mux(() => { - const tres = this.t.applyA(d); - if (tres.a) { - a.update(tres.a); - } - if (tres.b) { - b.update(tres.b); - } - })); - this._bchanged = this.b.on('change', d => this._mux(() => { - const tres = this.t.applyB(d); - if (tres.b) { - this.b.update(tres.b); - } - if (tres.a) { - a.update(tres.a); - } - })); - } - - destroy = () => { - this.a.off('destroy', this.destroy); - this.b.off('destroy', this.destroy); - this.a.off('change', this._achanged); - this.b.off('change', this._bchanged); - } -} - -/** - * Abstract Interface for a delta-based Replicated Data Type. - * - * @template {delta.AbstractDelta} Delta - * @typedef {ObservableV2<{ 'change': (delta: Delta) => void, 'destroy': (rdt:RDT)=>void }> & { update: (delta: Delta) => any, destroy: () => void }} RDT - */ - -/** - * @template {delta.AbstractDelta} DeltaA - * @template {dt.Template} Transformer - * @param {RDT} a - * @param {RDT ? DeltaB : never>} b - * @param {dt.Template} template - */ -const bind = (a, b, template) => new Binding(a, b, template); - -/** - * @template {delta.AbstractDelta} Delta - * @implements RDT - * @extends {ObservableV2<{ change: (delta: Delta) => void, 'destroy': (rdt:DeltaRDT)=>void }>} - */ -class DeltaRDT extends observable.ObservableV2 { - /** - * @param {Schema} $delta - */ - constructor ($delta) { - super(); - this.$delta = $delta; - /** - * @type {Delta?} - */ - this.state = null; - this._mux = mutex.createMutex(); - } - - /** - * @param {Delta} delta - */ - update = delta => delta.isEmpty() || this._mux(() => { - if (this.state != null) { - this.state.apply(delta); - } else { - this.state = delta; - } - this.emit('change', [delta]); - }) - - destroy () { - this.emit('destroy', [this]); - super.destroy(); - } -} - -/** - * @template {delta.AbstractDelta} Delta - * @param {Schema} $delta - */ -const deltaRDT = $delta => new DeltaRDT($delta); - -/** - * @param {Node} domNode - */ -const domToDelta = domNode => { - if (dom.$element.check(domNode)) { - const d = undefined(domNode.nodeName.toLowerCase()); - for (let i = 0; i < domNode.attributes.length; i++) { - const attr = /** @type {Attr} */ (domNode.attributes.item(i)); - d.attributes.set(attr.nodeName, attr.value); - } - domNode.childNodes.forEach(child => { - d.children.insert(dom.$text.check(child) ? child.textContent : [domToDelta(child)]); - }); - return d - } - error.unexpectedCase(); -}; - -/** - * @param {DomDelta} d - */ -const deltaToDom = d => { - if (undefined(d)) { - const n = dom.element(d.name); - d.attributes.forEach(change => { - if (delta.$insertOp.check(change)) { - n.setAttribute(change.key, change.value); - } - }); - d.children.forEach(child => { - if (delta.$insertOp.check(child)) { - n.append(...child.insert.map(deltaToDom)); - } else if (delta.$textOp.check(child)) { - n.append(dom.text(child.insert)); - } - }); - return n - } - error.unexpectedCase(); -}; - -/** - * @param {Element} el - * @param {delta.Node} d - */ -const applyDeltaToDom = (el, d) => { - d.attributes.forEach(change => { - if (delta.$deleteOp.check(change)) { - el.removeAttribute(change.key); - } else { - el.setAttribute(change.key, change.value); - } - }); - let childIndex = 0; - let childOffset = 0; - d.children.forEach(change => { - let child = el.childNodes[childIndex] || null; - if (delta.$deleteOp.check(change)) { - let len = change.length; - while (len > 0) { - if (dom.$element.check(child)) { - child.remove(); - len--; - } else if (dom.$text.check(child)) { - const childLen = child.length; - if (childOffset === 0 && childLen <= len) { - child.remove(); - len -= childLen; - } else { - const spliceLen = math.min(len, childLen - childOffset); - child.deleteData(childOffset, spliceLen); - if (child.length <= childOffset) { - childOffset = 0; - childIndex++; - } - } - } - } - } else if (delta.$insertOp.check(change)) { - if (childOffset > 0) { - const tchild = dom.$text.cast(child); - child = tchild.splitText(childOffset); - childIndex++; - childOffset = 0; - } - el.insertBefore(dom.fragment(change.insert.map(deltaToDom)), child); - } else if (delta.$modifyOp.check(change)) { - applyDeltaToDom(dom.$element.cast(child), change.modify); - } else if (delta.$textOp.check(change)) { - el.insertBefore(dom.text(change.insert), child); - } else { - error.unexpectedCase(); - } - }); -}; - -const $domDelta = undefined(schema.$string, schema.$record(schema.$string, schema.$string), schema.$never, { recursive: true, withText: true }); - -/** - * @param {Element} observedNode - * @param {MutationRecord[]} mutations - * @param {any} origin assign this origin to the generated delta - */ -const _mutationsToDelta = (observedNode, mutations, origin) => { - /** - * @typedef {{ removedBefore: Map, added: Set, modified: number, d: delta.Node }} ChangedNodeInfo - */ - /** - * Compute all deltas without recursion. - * - * 1. mark all changed parents in parentsChanged - * 2. fill out necessary information for each changed parent () - */ - // - /** - * @type {Map} - */ - const changedNodes = map.create(); - /** - * @param {Node} node - * @return {ChangedNodeInfo} - */ - const getChangedNodeInfo = node => map.setIfUndefined(changedNodes, node, () => ({ removedBefore: map.create(), added: set.create(), modified: 0, d: undefined(node.nodeName.toLowerCase()) })); - const observedNodeInfo = getChangedNodeInfo(observedNode); - mutations.forEach(mutation => { - const target = /** @type {HTMLElement} */ (mutation.target); - const parent = target.parentNode; - const attrName = /** @type {string} */ (mutation.attributeName); - const newVal = target.getAttribute(attrName); - const info = getChangedNodeInfo(target); - const d = info.d; - // go up the tree and mark that a child has been modified - for (let changedParent = parent; changedParent != null && getChangedNodeInfo(changedParent).modified++ > 1 && changedParent !== observedNode; changedParent = changedParent.parentNode) { - // nop - } - switch (mutation.type) { - case 'attributes': { - const attrs = /** @type {delta.Node} */ (d).attributes; - if (newVal == null) { - attrs.delete(attrName); - } else { - attrs.set(/** @type {string} */ (attrName), newVal); - } - break - } - case 'characterData': { - error.methodUnimplemented(); - break - } - case 'childList': { - const targetInfo = getChangedNodeInfo(target); - mutation.addedNodes.forEach(node => { - targetInfo.added.add(node); - }); - const removed = mutation.removedNodes.length; - if (removed > 0) { - // @todo this can't work because next can be null - targetInfo.removedBefore.set(mutation.nextSibling, removed); - } - break - } - } - }); - changedNodes.forEach((info, node) => { - const numOfChildChanges = info.modified + info.removedBefore.size + info.added.size; - const d = /** @type {delta.Node} */ (info.d); - if (numOfChildChanges > 0) { - node.childNodes.forEach(nchild => { - if (info.removedBefore.has(nchild)) { // can happen separately - d.children.delete(/** @type {number} */ (info.removedBefore.get(nchild))); - } - if (info.added.has(nchild)) { - d.children.insert(dom.$text.check(nchild) ? nchild.textContent : [domToDelta(nchild)]); - } else if (changedNodes.has(nchild)) { - d.children.modify(getChangedNodeInfo(nchild).d); - } - }); - // remove items to the end, if necessary - d.children.delete(info.removedBefore.get(null) ?? 0); - } - d.done(); - }); - observedNodeInfo.d.origin = origin; - return observedNodeInfo.d -}; - -/** - * @typedef {delta.RecursiveNode} DomDelta - */ - -/** - * @template {DomDelta} [D=DomDelta] - * @implements RDT - * @extends {ObservableV2<{ change: (delta: D)=>void, destroy: (rdt:DomRDT)=>void }>}>} - */ -class DomRDT extends observable.ObservableV2 { - /** - * @param {Element} observedNode - */ - constructor (observedNode) { - super(); - this.observedNode = observedNode; - this._mux = mutex.createMutex(); - this.observer = new MutationObserver(this._mutationHandler); - this.observer.observe(observedNode, { - subtree: true, - childList: true, - attributes: true, - characterDataOldValue: true - }); - } - - /** - * @param {MutationRecord[]} mutations - */ - _mutationHandler = mutations => - mutations.length > 0 && this._mux(() => { - this.emit('change', [/** @type {D} */(_mutationsToDelta(this.observedNode, mutations, this))]); - }) - - /** - * @param {D} delta - */ - update = delta => { - if (delta.origin !== this) { - // @todo the retrieved changes must be transformed agains the updated changes. need a proper - // transaction system - this._mutationHandler(this.observer.takeRecords()); - this._mux(() => { - applyDeltaToDom(this.observedNode, delta); - const mutations = this.observer.takeRecords(); - this.emit('change', [/** @type {D} */(_mutationsToDelta(this.observedNode, mutations, delta.origin))]); - }); - } - } - - destroy () { - this.emit('destroy', [this]); - super.destroy(); - this.observer.disconnect(); - } -} - -/** - * @param {Element} dom - */ -const domRDT = dom => new DomRDT(dom); - -exports.$domDelta = $domDelta; -exports.Binding = Binding; -exports.bind = bind; -exports.deltaRDT = deltaRDT; -exports.domRDT = domRDT; -//# sourceMappingURL=binding.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binding.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binding.cjs.map deleted file mode 100644 index 289185f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/binding.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binding.cjs","sources":["../delta/t3.test.js","../delta/binding.js"],"sourcesContent":["/* eslint-disable */\n// @ts-nocheck\nimport * as t from '../testing.js'\nimport * as delta from './delta.js'\nimport * as s from '../schema.js'\nimport * as array from '../array.js'\n\n/**\n * @template {delta.Delta?} DeltaA\n * @template {delta.Delta?} DeltaB\n * @typedef {{ a: DeltaA?, b: DeltaB? }} TransformResult\n */\n\n/**\n * @template {delta.DeltaBuilder?} DeltaA\n * @template {delta.DeltaBuilder?} DeltaB\n * @param {DeltaA} a\n * @param {DeltaB} b\n * @return {TransformResult}\n */\nexport const transformResult = (a, b) => ({ a, b })\nexport const transformResultEmpty = transformResult(null, null)\n\nlet x = transformResult(delta.create('x'), null)\nx = transformResult(null, null)\n\n/**\n * @template {delta.DeltaAny} DeltaA\n * @template {delta.DeltaAny} DeltaB\n * @typedef {(t:{a:DeltaA?,b:DeltaB?})=>({a:DeltaA?,b:DeltaB?})} DeltaTransformer\n */\n\n/**\n * @template {delta.Delta} A\n * @template {(A extends delta.Delta ? delta.Delta<`x-${NodeName}`,Attrs,Children,Text> : never)} B\n * @param {TransformResult} t\n * @return {TransformResult}\n */\nconst rename = t => {\n /**\n * @type {any}\n */\n const tout = /** @type {any} */ (transformResult(null, null))\n if (t.a) {\n const c = /** @type {delta.Delta} */ (t.a.clone())\n c.name = 'x-' + c.name\n // @ts-ignore\n tout.b = c\n }\n if (t.b) {\n const c = /** @type {delta.Delta} */ (t.b.clone())\n c.name = c.name.slice(2)\n // @ts-ignore\n tout.a = c\n }\n return tout\n}\n\n/**\n * @param {Set} allowed\n */\nconst filter = (allowed) => {\n /**\n * contains inserted items that didn't make it into t.b\n */\n const diff = delta.create()\n /**\n * @template {delta.Delta?} A\n * @template {(A extends delta.Delta ? delta.Delta<`x-${NodeName}`,Attrs,Children,Text> : never)} B\n * @param {{ a: A?, b: B? }} t\n * @return {{ a: A?, b: B? }}\n */\n return t => {\n /**\n * @type {any}\n */\n const tout = /** @type {any} */ (transformResult(null, null))\n if (t.a) {\n const c = delta.create()\n let index = 0\n /**\n * Split delta into two parts: hidden and visible. hidden contains all \"hidden\" changes (filtered inserts).\n * visible everything else.\n *\n * return visible.rebaseAgainstInverse(diff)\n * apply `diff.apply(merge)`\n *\n */\n for (const child of t.a.children) {\n if (delta.$insertOp.check(child)) {\n for (let i = 0; i < child.insert.length; i++) {\n const ins = child.insert[i]\n if (delta.$deltaAny.check(ins) && allowed.has(ins.name)) {\n ins\n } else {\n\n }\n ins\n }\n }\n if (!delta.$deleteOp.check(child)) {\n index += child.length\n }\n }\n }\n if (t.b) {\n }\n return tout\n }\n}\n\nconst dd = delta.create('x', { x: 'dtrn' })\nconst y = rename({ a: delta.create('x', { x: 'dtrn' }), b: null })\n\n/**\n * @template {delta.DeltaAny} DeltaA\n * @template {delta.DeltaAny} Delta_\n * @template {delta.DeltaAny} DeltaB\n * @param {(t:TransformResult)=>TransformResult} t1\n * @param {(t:TransformResult)=>TransformResult} t2\n * @return {(dx:TransformResult)=>TransformResult}\n */\nconst pipe = (t1, t2) => (dx) => {\n return /** @type {any} */ (null)\n}\n\n// next idea: Transform object that changes typings\n\n/**\n * Transforms should..\n * - transform from a->b->c->b->a\n * - extendable mod(Transform):Transform\n * - i can start with id: mod(Id($d))\n */\n\n/**\n * @template {delta.Delta} DeltaA\n * @template {delta.Delta} DeltaB\n * @typedef {{ applyA: (da:DeltaA)=>TransformResult, applyB: (db:DeltaB)=>TransformResult }} Transform\n */\n\n/**\n * @template {delta.DeltaBuilder} A\n * @template {delta.DeltaBuilder} B\n */\nclass Transformer {\n /**\n * @param {s.Schema} $da\n */\n constructor ($da) {\n this.$da = $da\n /**\n * @type {Array>}\n */\n this._tr = []\n }\n\n /**\n * @param {TransformResult} d\n * @return {TransformResult}\n */\n apply ({ a, b }) {\n if (a == null && b == null) return transformResult(null, null)\n /**\n * @type {Array<{ a: delta.DeltaBuilder?, b: delta.DeltaBuilder? }>}\n */\n const pendingApply = array.unfold(this._tr.length + 2, () => ({ a: null, b: null }))\n pendingApply[1].a = a\n pendingApply[pendingApply.length - 2].b = b\n /**\n * @param {number} i\n */\n const applyTransformI = i => {\n const p = pendingApply[i + 1]\n const t = this._tr[i]\n const aout = p.a !== null ? t.applyA(p.a) : transformResult(null, null)\n if (p.b !== null) {\n if (aout.b !== null) {\n p.b = p.b.rebase(aout.b, true)\n }\n const bout = t.applyB(p.b)\n aout.a = delta.mergeDeltas(aout.a, bout.a)\n aout.b = delta.mergeDeltas(aout.b, bout.b)\n }\n // write out.a into prev.b, and out.b into next.a\n pendingApply[i].b = delta.mergeDeltas(pendingApply[i].b, aout.a)\n pendingApply[i + 2].a = delta.mergeDeltas(pendingApply[i + 2].a, aout.b)\n return aout\n }\n let needsBackwardTransform = a != null\n let needsForwardTransform = b != null\n while (needsBackwardTransform || needsForwardTransform) {\n if (needsForwardTransform) {\n for (let i = 0; i < this._tr.length; i++) {\n const r = applyTransformI(i)\n if (i != null) {\n needsBackwardTransform = needsBackwardTransform || r.a != null\n }\n }\n needsForwardTransform = false\n }\n if (needsBackwardTransform) {\n for (let i = this._tr.length - 1; i >= 0; i--) {\n const r = applyTransformI(i)\n if (i != null) {\n needsForwardTransform = needsForwardTransform || r.b != null\n }\n }\n needsBackwardTransform = false\n }\n }\n return /** @type {TransformResult} */ (transformResult(pendingApply[0].b, pendingApply[pendingApply.length - 1].a))\n }\n}\n//\n// /**\n// * @template {delta.Delta} D\n// * @param {s.Schema} $d\n// * @return {Transformer}\n// */\n// const id = ($d) => /** @type {Transformer} */ (new Transformer($d))\n//\n// const q = id(delta.$delta({ name: 'div' }))\n// const q2 = id(delta.$delta({ name: 'div', attrs: { a: s.$string } })).pipe(t.delta('h1', { color: t => query('a')(t), name:'mystuff' }, t => [query('b')(t)]))\n// const q3 = t.delta('h1', { color: t => query('a')(t), name:'mystuff' }, t => [query('b')(t)])(id(delta.$delta({ name: 'div', attrs: { a: s.$string } }))))\n//\n//\n// /**\n// * @param {Transformer>} t\n// */\n// const dataToH1 = t => t.delta('h1', { color: t => query('a')(t), name:'mystuff' }, t => [query('b')(t)])(t)\n// const q4 = dataToH1(id(delta.$delta({ name: 'div', attrs: { a: s.$string } })))\n//\n// const dataToH1_2 = t => rename('h1')(renameAttr({ a: 'color' })(static(delta.create('h1', { name: 'mystuff' }, 'some content!'))(t)))\n","/* eslint-disable */\n// @ts-nocheck\n// @todo remove all @ts-nocheck and eslint-disable\n/* global MutationObserver */\nimport { ObservableV2 } from '../observable.js'\nimport * as delta from './delta.js'\nimport * as dt from './t3.test.js' // eslint-disable-line\nimport * as dom from '../dom.js'\nimport * as set from '../set.js'\nimport * as map from '../map.js'\nimport * as error from '../error.js'\nimport * as math from '../math.js'\nimport * as mux from '../mutex.js'\nimport * as s from '../schema.js'\n\n/**\n * @template T\n * @typedef {import('../schema.js').Schema} Schema\n */\n\n/**\n * @template {delta.AbstractDelta} DeltaA\n * @template {delta.AbstractDelta} DeltaB\n */\nexport class Binding {\n /**\n * @param {RDT} a\n * @param {RDT} b\n * @param {dt.Template} template\n */\n constructor (a, b, template) {\n /**\n * @type {dt.Transformer}\n */\n this.t = template.init()\n this.a = a\n this.b = b\n this._mux = mux.createMutex()\n this._achanged = this.a.on('change', d => this._mux(() => {\n const tres = this.t.applyA(d)\n if (tres.a) {\n a.update(tres.a)\n }\n if (tres.b) {\n b.update(tres.b)\n }\n }))\n this._bchanged = this.b.on('change', d => this._mux(() => {\n const tres = this.t.applyB(d)\n if (tres.b) {\n this.b.update(tres.b)\n }\n if (tres.a) {\n a.update(tres.a)\n }\n }))\n }\n\n destroy = () => {\n this.a.off('destroy', this.destroy)\n this.b.off('destroy', this.destroy)\n this.a.off('change', this._achanged)\n this.b.off('change', this._bchanged)\n }\n}\n\n/**\n * Abstract Interface for a delta-based Replicated Data Type.\n *\n * @template {delta.AbstractDelta} Delta\n * @typedef {ObservableV2<{ 'change': (delta: Delta) => void, 'destroy': (rdt:RDT)=>void }> & { update: (delta: Delta) => any, destroy: () => void }} RDT\n */\n\n/**\n * @template {delta.AbstractDelta} DeltaA\n * @template {dt.Template} Transformer\n * @param {RDT} a\n * @param {RDT ? DeltaB : never>} b\n * @param {dt.Template} template\n */\nexport const bind = (a, b, template) => new Binding(a, b, template)\n\n/**\n * @template {delta.AbstractDelta} Delta\n * @implements RDT\n * @extends {ObservableV2<{ change: (delta: Delta) => void, 'destroy': (rdt:DeltaRDT)=>void }>}\n */\nclass DeltaRDT extends ObservableV2 {\n /**\n * @param {Schema} $delta\n */\n constructor ($delta) {\n super()\n this.$delta = $delta\n /**\n * @type {Delta?}\n */\n this.state = null\n this._mux = mux.createMutex()\n }\n\n /**\n * @param {Delta} delta\n */\n update = delta => delta.isEmpty() || this._mux(() => {\n if (this.state != null) {\n this.state.apply(delta)\n } else {\n this.state = delta\n }\n this.emit('change', [delta])\n })\n\n destroy () {\n this.emit('destroy', [this])\n super.destroy()\n }\n}\n\n/**\n * @template {delta.AbstractDelta} Delta\n * @param {Schema} $delta\n */\nexport const deltaRDT = $delta => new DeltaRDT($delta)\n\n/**\n * @param {Node} domNode\n */\nconst domToDelta = domNode => {\n if (dom.$element.check(domNode)) {\n const d = delta.node(domNode.nodeName.toLowerCase())\n for (let i = 0; i < domNode.attributes.length; i++) {\n const attr = /** @type {Attr} */ (domNode.attributes.item(i))\n d.attributes.set(attr.nodeName, attr.value)\n }\n domNode.childNodes.forEach(child => {\n d.children.insert(dom.$text.check(child) ? child.textContent : [domToDelta(child)])\n })\n return d\n }\n error.unexpectedCase()\n}\n\n/**\n * @param {DomDelta} d\n */\nconst deltaToDom = d => {\n if (delta.$nodeAny.check(d)) {\n const n = dom.element(d.name)\n d.attributes.forEach(change => {\n if (delta.$insertOp.check(change)) {\n n.setAttribute(change.key, change.value)\n }\n })\n d.children.forEach(child => {\n if (delta.$insertOp.check(child)) {\n n.append(...child.insert.map(deltaToDom))\n } else if (delta.$textOp.check(child)) {\n n.append(dom.text(child.insert))\n }\n })\n return n\n }\n error.unexpectedCase()\n}\n\n/**\n * @param {Element} el\n * @param {delta.Node} d\n */\nconst applyDeltaToDom = (el, d) => {\n d.attributes.forEach(change => {\n if (delta.$deleteOp.check(change)) {\n el.removeAttribute(change.key)\n } else {\n el.setAttribute(change.key, change.value)\n }\n })\n let childIndex = 0\n let childOffset = 0\n d.children.forEach(change => {\n let child = el.childNodes[childIndex] || null\n if (delta.$deleteOp.check(change)) {\n let len = change.length\n while (len > 0) {\n if (dom.$element.check(child)) {\n child.remove()\n len--\n } else if (dom.$text.check(child)) {\n const childLen = child.length\n if (childOffset === 0 && childLen <= len) {\n child.remove()\n len -= childLen\n } else {\n const spliceLen = math.min(len, childLen - childOffset)\n child.deleteData(childOffset, spliceLen)\n if (child.length <= childOffset) {\n childOffset = 0\n childIndex++\n }\n }\n }\n }\n } else if (delta.$insertOp.check(change)) {\n if (childOffset > 0) {\n const tchild = dom.$text.cast(child)\n child = tchild.splitText(childOffset)\n childIndex++\n childOffset = 0\n }\n el.insertBefore(dom.fragment(change.insert.map(deltaToDom)), child)\n } else if (delta.$modifyOp.check(change)) {\n applyDeltaToDom(dom.$element.cast(child), change.modify)\n } else if (delta.$textOp.check(change)) {\n el.insertBefore(dom.text(change.insert), child)\n } else {\n error.unexpectedCase()\n }\n })\n}\n\nexport const $domDelta = delta.$node(s.$string, s.$record(s.$string, s.$string), s.$never, { recursive: true, withText: true })\n\n/**\n * @param {Element} observedNode\n * @param {MutationRecord[]} mutations\n * @param {any} origin assign this origin to the generated delta\n */\nconst _mutationsToDelta = (observedNode, mutations, origin) => {\n /**\n * @typedef {{ removedBefore: Map, added: Set, modified: number, d: delta.Node }} ChangedNodeInfo\n */\n /**\n * Compute all deltas without recursion.\n *\n * 1. mark all changed parents in parentsChanged\n * 2. fill out necessary information for each changed parent ()\n */\n //\n /**\n * @type {Map}\n */\n const changedNodes = map.create()\n /**\n * @param {Node} node\n * @return {ChangedNodeInfo}\n */\n const getChangedNodeInfo = node => map.setIfUndefined(changedNodes, node, () => ({ removedBefore: map.create(), added: set.create(), modified: 0, d: delta.node(node.nodeName.toLowerCase()) }))\n const observedNodeInfo = getChangedNodeInfo(observedNode)\n mutations.forEach(mutation => {\n const target = /** @type {HTMLElement} */ (mutation.target)\n const parent = target.parentNode\n const attrName = /** @type {string} */ (mutation.attributeName)\n const newVal = target.getAttribute(attrName)\n const info = getChangedNodeInfo(target)\n const d = info.d\n // go up the tree and mark that a child has been modified\n for (let changedParent = parent; changedParent != null && getChangedNodeInfo(changedParent).modified++ > 1 && changedParent !== observedNode; changedParent = changedParent.parentNode) {\n // nop\n }\n switch (mutation.type) {\n case 'attributes': {\n const attrs = /** @type {delta.Node} */ (d).attributes\n if (newVal == null) {\n attrs.delete(attrName)\n } else {\n attrs.set(/** @type {string} */ (attrName), newVal)\n }\n break\n }\n case 'characterData': {\n error.methodUnimplemented()\n break\n }\n case 'childList': {\n const targetInfo = getChangedNodeInfo(target)\n mutation.addedNodes.forEach(node => {\n targetInfo.added.add(node)\n })\n const removed = mutation.removedNodes.length\n if (removed > 0) {\n // @todo this can't work because next can be null\n targetInfo.removedBefore.set(mutation.nextSibling, removed)\n }\n break\n }\n }\n })\n changedNodes.forEach((info, node) => {\n const numOfChildChanges = info.modified + info.removedBefore.size + info.added.size\n const d = /** @type {delta.Node} */ (info.d)\n if (numOfChildChanges > 0) {\n node.childNodes.forEach(nchild => {\n if (info.removedBefore.has(nchild)) { // can happen separately\n d.children.delete(/** @type {number} */ (info.removedBefore.get(nchild)))\n }\n if (info.added.has(nchild)) {\n d.children.insert(dom.$text.check(nchild) ? nchild.textContent : [domToDelta(nchild)])\n } else if (changedNodes.has(nchild)) {\n d.children.modify(getChangedNodeInfo(nchild).d)\n }\n })\n // remove items to the end, if necessary\n d.children.delete(info.removedBefore.get(null) ?? 0)\n }\n d.done()\n })\n observedNodeInfo.d.origin = origin\n return observedNodeInfo.d\n}\n\n/**\n * @typedef {delta.RecursiveNode} DomDelta\n */\n\n/**\n * @template {DomDelta} [D=DomDelta]\n * @implements RDT\n * @extends {ObservableV2<{ change: (delta: D)=>void, destroy: (rdt:DomRDT)=>void }>}>}\n */\nclass DomRDT extends ObservableV2 {\n /**\n * @param {Element} observedNode\n */\n constructor (observedNode) {\n super()\n this.observedNode = observedNode\n this._mux = mux.createMutex()\n this.observer = new MutationObserver(this._mutationHandler)\n this.observer.observe(observedNode, {\n subtree: true,\n childList: true,\n attributes: true,\n characterDataOldValue: true\n })\n }\n\n /**\n * @param {MutationRecord[]} mutations\n */\n _mutationHandler = mutations =>\n mutations.length > 0 && this._mux(() => {\n this.emit('change', [/** @type {D} */(_mutationsToDelta(this.observedNode, mutations, this))])\n })\n\n /**\n * @param {D} delta\n */\n update = delta => {\n if (delta.origin !== this) {\n // @todo the retrieved changes must be transformed agains the updated changes. need a proper\n // transaction system\n this._mutationHandler(this.observer.takeRecords())\n this._mux(() => {\n applyDeltaToDom(this.observedNode, delta)\n const mutations = this.observer.takeRecords()\n this.emit('change', [/** @type {D} */(_mutationsToDelta(this.observedNode, mutations, delta.origin))])\n })\n }\n }\n\n destroy () {\n this.emit('destroy', [this])\n super.destroy()\n this.observer.disconnect()\n }\n}\n\n/**\n * @param {Element} dom\n */\nexport const domRDT = dom => new DomRDT(dom)\n"],"names":["delta.create","mux.createMutex","ObservableV2","dom.$element","delta.node","dom.$text","error.unexpectedCase","delta.$nodeAny.check","dom.element","delta.$insertOp","delta.$textOp","dom.text","delta.$deleteOp","math.min","dom.fragment","delta.$modifyOp","delta.$node","s.$string","s.$record","s.$never","map.create","map.setIfUndefined","set.create","error.methodUnimplemented"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,eAAe,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,EAAC;AAEnD;AACQ,eAAe,CAACA,YAAY,CAAC,GAAG,CAAC,EAAE,IAAI,EAAC;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,MAAM,GAAG,CAAC,IAAI;AACpB;AACA;AACA;AACA,EAAE,MAAM,IAAI,uBAAuB,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,EAAC;AAC/D,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE;AACX,IAAI,MAAM,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAC;AACtD,IAAI,CAAC,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,KAAI;AAC1B;AACA,IAAI,IAAI,CAAC,CAAC,GAAG,EAAC;AACd,GAAG;AACH,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE;AACX,IAAI,MAAM,CAAC,+BAA+B,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,OAAO,CAAC,GAAG;AACb,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,EAAC;AAChC,IAAI,KAAK,CAAC,OAAO,GAAE;AACnB,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,GAAE;AAC9B,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,CAAC,GAAG;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel-aca4f606.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel-aca4f606.cjs deleted file mode 100644 index 960d19c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel-aca4f606.cjs +++ /dev/null @@ -1,128 +0,0 @@ -'use strict'; - -var map = require('./map-24d263c0.cjs'); -var set = require('./set-5b47859e.cjs'); -var buffer = require('./buffer-3e750729.cjs'); -var storage = require('./storage.cjs'); - -/* eslint-env browser */ - -/** - * @typedef {Object} Channel - * @property {Set} Channel.subs - * @property {any} Channel.bc - */ - -/** - * @type {Map} - */ -const channels = new Map(); - -/* c8 ignore start */ -class LocalStoragePolyfill { - /** - * @param {string} room - */ - constructor (room) { - this.room = room; - /** - * @type {null|function({data:Uint8Array}):void} - */ - this.onmessage = null; - /** - * @param {any} e - */ - this._onChange = e => e.key === room && this.onmessage !== null && this.onmessage({ data: buffer.fromBase64(e.newValue || '') }); - storage.onChange(this._onChange); - } - - /** - * @param {ArrayBuffer} buf - */ - postMessage (buf) { - storage.varStorage.setItem(this.room, buffer.toBase64(buffer.createUint8ArrayFromArrayBuffer(buf))); - } - - close () { - storage.offChange(this._onChange); - } -} -/* c8 ignore stop */ - -// Use BroadcastChannel or Polyfill -/* c8 ignore next */ -const BC = typeof BroadcastChannel === 'undefined' ? LocalStoragePolyfill : BroadcastChannel; - -/** - * @param {string} room - * @return {Channel} - */ -const getChannel = room => - map.setIfUndefined(channels, room, () => { - const subs = set.create(); - const bc = new BC(room); - /** - * @param {{data:ArrayBuffer}} e - */ - /* c8 ignore next */ - bc.onmessage = e => subs.forEach(sub => sub(e.data, 'broadcastchannel')); - return { - bc, subs - } - }); - -/** - * Subscribe to global `publish` events. - * - * @function - * @param {string} room - * @param {function(any, any):any} f - */ -const subscribe = (room, f) => { - getChannel(room).subs.add(f); - return f -}; - -/** - * Unsubscribe from `publish` global events. - * - * @function - * @param {string} room - * @param {function(any, any):any} f - */ -const unsubscribe = (room, f) => { - const channel = getChannel(room); - const unsubscribed = channel.subs.delete(f); - if (unsubscribed && channel.subs.size === 0) { - channel.bc.close(); - channels.delete(room); - } - return unsubscribed -}; - -/** - * Publish data to all subscribers (including subscribers on this tab) - * - * @function - * @param {string} room - * @param {any} data - * @param {any} [origin] - */ -const publish = (room, data, origin = null) => { - const c = getChannel(room); - c.bc.postMessage(data); - c.subs.forEach(sub => sub(data, origin)); -}; - -var broadcastchannel = /*#__PURE__*/Object.freeze({ - __proto__: null, - subscribe: subscribe, - unsubscribe: unsubscribe, - publish: publish -}); - -exports.broadcastchannel = broadcastchannel; -exports.publish = publish; -exports.subscribe = subscribe; -exports.unsubscribe = unsubscribe; -//# sourceMappingURL=broadcastchannel-aca4f606.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel-aca4f606.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel-aca4f606.cjs.map deleted file mode 100644 index f17692b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel-aca4f606.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"broadcastchannel-aca4f606.cjs","sources":["../broadcastchannel.js"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * Helpers for cross-tab communication using broadcastchannel with LocalStorage fallback.\n *\n * ```js\n * // In browser window A:\n * broadcastchannel.subscribe('my events', data => console.log(data))\n * broadcastchannel.publish('my events', 'Hello world!') // => A: 'Hello world!' fires synchronously in same tab\n *\n * // In browser window B:\n * broadcastchannel.publish('my events', 'hello from tab B') // => A: 'hello from tab B'\n * ```\n *\n * @module broadcastchannel\n */\n\n// @todo before next major: use Uint8Array instead as buffer object\n\nimport * as map from './map.js'\nimport * as set from './set.js'\nimport * as buffer from './buffer.js'\nimport * as storage from './storage.js'\n\n/**\n * @typedef {Object} Channel\n * @property {Set} Channel.subs\n * @property {any} Channel.bc\n */\n\n/**\n * @type {Map}\n */\nconst channels = new Map()\n\n/* c8 ignore start */\nclass LocalStoragePolyfill {\n /**\n * @param {string} room\n */\n constructor (room) {\n this.room = room\n /**\n * @type {null|function({data:Uint8Array}):void}\n */\n this.onmessage = null\n /**\n * @param {any} e\n */\n this._onChange = e => e.key === room && this.onmessage !== null && this.onmessage({ data: buffer.fromBase64(e.newValue || '') })\n storage.onChange(this._onChange)\n }\n\n /**\n * @param {ArrayBuffer} buf\n */\n postMessage (buf) {\n storage.varStorage.setItem(this.room, buffer.toBase64(buffer.createUint8ArrayFromArrayBuffer(buf)))\n }\n\n close () {\n storage.offChange(this._onChange)\n }\n}\n/* c8 ignore stop */\n\n// Use BroadcastChannel or Polyfill\n/* c8 ignore next */\nconst BC = typeof BroadcastChannel === 'undefined' ? LocalStoragePolyfill : BroadcastChannel\n\n/**\n * @param {string} room\n * @return {Channel}\n */\nconst getChannel = room =>\n map.setIfUndefined(channels, room, () => {\n const subs = set.create()\n const bc = new BC(room)\n /**\n * @param {{data:ArrayBuffer}} e\n */\n /* c8 ignore next */\n bc.onmessage = e => subs.forEach(sub => sub(e.data, 'broadcastchannel'))\n return {\n bc, subs\n }\n })\n\n/**\n * Subscribe to global `publish` events.\n *\n * @function\n * @param {string} room\n * @param {function(any, any):any} f\n */\nexport const subscribe = (room, f) => {\n getChannel(room).subs.add(f)\n return f\n}\n\n/**\n * Unsubscribe from `publish` global events.\n *\n * @function\n * @param {string} room\n * @param {function(any, any):any} f\n */\nexport const unsubscribe = (room, f) => {\n const channel = getChannel(room)\n const unsubscribed = channel.subs.delete(f)\n if (unsubscribed && channel.subs.size === 0) {\n channel.bc.close()\n channels.delete(room)\n }\n return unsubscribed\n}\n\n/**\n * Publish data to all subscribers (including subscribers on this tab)\n *\n * @function\n * @param {string} room\n * @param {any} data\n * @param {any} [origin]\n */\nexport const publish = (room, data, origin = null) => {\n const c = getChannel(room)\n c.bc.postMessage(data)\n c.subs.forEach(sub => sub(data, origin))\n}\n"],"names":["buffer.fromBase64","storage.onChange","storage.varStorage","buffer.toBase64","buffer.createUint8ArrayFromArrayBuffer","storage.offChange","map.setIfUndefined","set.create"],"mappings":";;;;;;;AAAA;AAuBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,QAAQ,GAAG,IAAI,GAAG,GAAE;AAC1B;AACA;AACA,MAAM,oBAAoB,CAAC;AAC3B;AACA;AACA;AACA,EAAE,WAAW,CAAC,CAAC,IAAI,EAAE;AACrB,IAAI,IAAI,CAAC,IAAI,GAAG,KAAI;AACpB;AACA;AACA;AACA,IAAI,IAAI,CAAC,SAAS,GAAG,KAAI;AACzB;AACA;AACA;AACA,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAEA,iBAAiB,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,EAAC;AACpI,IAAIC,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAC;AACpC,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE,WAAW,CAAC,CAAC,GAAG,EAAE;AACpB,IAAIC,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAEC,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E;AAC/C,IAAI,OAAO,CAAC,EAAE,CAAC,KAAK,GAAE;AACtB,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAC;AACzB,GAAG;AACH,EAAE,OAAO,YAAY;AACrB,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK;AACtD,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,IAAI,EAAC;AAC5B,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,IAAI,EAAC;AACxB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,EAAC;AAC1C;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.cjs deleted file mode 100644 index 18ad41d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.cjs +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./map-24d263c0.cjs'); -require('./set-5b47859e.cjs'); -require('./buffer-3e750729.cjs'); -require('./storage.cjs'); -var broadcastchannel = require('./broadcastchannel-aca4f606.cjs'); -require('./string-fddc5f8b.cjs'); -require('./array-78849c95.cjs'); -require('./environment-1c97264d.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./function-314580f7.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./math-96d5e8c4.cjs'); -require('./encoding-1a745c43.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./decoding-76e75827.cjs'); -require('./error-0c1f634f.cjs'); - - - -exports.publish = broadcastchannel.publish; -exports.subscribe = broadcastchannel.subscribe; -exports.unsubscribe = broadcastchannel.unsubscribe; -//# sourceMappingURL=broadcastchannel.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.cjs.map deleted file mode 100644 index 77829c4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"broadcastchannel.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.d.ts deleted file mode 100644 index d8f048e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function subscribe(room: string, f: (arg0: any, arg1: any) => any): (arg0: any, arg1: any) => any; -export function unsubscribe(room: string, f: (arg0: any, arg1: any) => any): boolean; -export function publish(room: string, data: any, origin?: any): void; -export type Channel = { - subs: Set<(arg0: any, arg1: any) => any>; - bc: any; -}; -//# sourceMappingURL=broadcastchannel.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.d.ts.map deleted file mode 100644 index 00c571a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"broadcastchannel.d.ts","sourceRoot":"","sources":["../broadcastchannel.js"],"names":[],"mappings":"AA+FO,gCAHI,MAAM,KACN,CAAS,IAAG,EAAH,GAAG,EAAE,IAAG,EAAH,GAAG,KAAE,GAAG,UAAb,GAAG,QAAE,GAAG,KAAE,GAAG,CAKhC;AASM,kCAHI,MAAM,KACN,CAAS,IAAG,EAAH,GAAG,EAAE,IAAG,EAAH,GAAG,KAAE,GAAG,WAUhC;AAUM,8BAJI,MAAM,QACN,GAAG,WACH,GAAG,QAMb;;UAvGa,GAAG,CAAC,CAAS,IAAG,EAAH,GAAG,EAAE,IAAG,EAAH,GAAG,KAAE,GAAG,CAAC;QAC3B,GAAG"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.test.d.ts deleted file mode 100644 index a746c1d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testBroadcastChannel(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=broadcastchannel.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.test.d.ts.map deleted file mode 100644 index e42fcf1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/broadcastchannel.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"broadcastchannel.test.d.ts","sourceRoot":"","sources":["../broadcastchannel.test.js"],"names":[],"mappings":"AAMO,yCAFI,CAAC,CAAC,QAAQ,QAkBpB;mBAtBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer-3e750729.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer-3e750729.cjs deleted file mode 100644 index ea76659..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer-3e750729.cjs +++ /dev/null @@ -1,198 +0,0 @@ -'use strict'; - -var string = require('./string-fddc5f8b.cjs'); -var environment = require('./environment-1c97264d.cjs'); -var array = require('./array-78849c95.cjs'); -var math = require('./math-96d5e8c4.cjs'); -var encoding = require('./encoding-1a745c43.cjs'); -var decoding = require('./decoding-76e75827.cjs'); - -/** - * Utility functions to work with buffers (Uint8Array). - * - * @module buffer - */ - -/** - * @param {number} len - */ -const createUint8ArrayFromLen = len => new Uint8Array(len); - -/** - * Create Uint8Array with initial content from buffer - * - * @param {ArrayBuffer} buffer - * @param {number} byteOffset - * @param {number} length - */ -const createUint8ArrayViewFromArrayBuffer = (buffer, byteOffset, length) => new Uint8Array(buffer, byteOffset, length); - -/** - * Create Uint8Array with initial content from buffer - * - * @param {ArrayBuffer} buffer - */ -const createUint8ArrayFromArrayBuffer = buffer => new Uint8Array(buffer); - -/* c8 ignore start */ -/** - * @param {Uint8Array} bytes - * @return {string} - */ -const toBase64Browser = bytes => { - let s = ''; - for (let i = 0; i < bytes.byteLength; i++) { - s += string.fromCharCode(bytes[i]); - } - // eslint-disable-next-line no-undef - return btoa(s) -}; -/* c8 ignore stop */ - -/** - * @param {Uint8Array} bytes - * @return {string} - */ -const toBase64Node = bytes => Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString('base64'); - -/* c8 ignore start */ -/** - * @param {string} s - * @return {Uint8Array} - */ -const fromBase64Browser = s => { - // eslint-disable-next-line no-undef - const a = atob(s); - const bytes = createUint8ArrayFromLen(a.length); - for (let i = 0; i < a.length; i++) { - bytes[i] = a.charCodeAt(i); - } - return bytes -}; -/* c8 ignore stop */ - -/** - * @param {string} s - */ -const fromBase64Node = s => { - const buf = Buffer.from(s, 'base64'); - return createUint8ArrayViewFromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength) -}; - -/* c8 ignore next */ -const toBase64 = environment.isBrowser ? toBase64Browser : toBase64Node; - -/* c8 ignore next */ -const fromBase64 = environment.isBrowser ? fromBase64Browser : fromBase64Node; - -/** - * Implements base64url - see https://datatracker.ietf.org/doc/html/rfc4648#section-5 - * @param {Uint8Array} buf - */ -const toBase64UrlEncoded = buf => toBase64(buf).replaceAll('+', '-').replaceAll('/', '_').replaceAll('=', ''); - -/** - * @param {string} base64 - */ -const fromBase64UrlEncoded = base64 => fromBase64(base64.replaceAll('-', '+').replaceAll('_', '/')); - -/** - * Base64 is always a more efficient choice. This exists for utility purposes only. - * - * @param {Uint8Array} buf - */ -const toHexString = buf => array.map(buf, b => b.toString(16).padStart(2, '0')).join(''); - -/** - * Note: This function expects that the hex doesn't start with 0x.. - * - * @param {string} hex - */ -const fromHexString = hex => { - const hlen = hex.length; - const buf = new Uint8Array(math.ceil(hlen / 2)); - for (let i = 0; i < hlen; i += 2) { - buf[buf.length - i / 2 - 1] = Number.parseInt(hex.slice(hlen - i - 2, hlen - i), 16); - } - return buf -}; - -/** - * Copy the content of an Uint8Array view to a new ArrayBuffer. - * - * @param {Uint8Array} uint8Array - * @return {Uint8Array} - */ -const copyUint8Array = uint8Array => { - const newBuf = createUint8ArrayFromLen(uint8Array.byteLength); - newBuf.set(uint8Array); - return newBuf -}; - -/** - * Encode anything as a UInt8Array. It's a pun on typescripts's `any` type. - * See encoding.writeAny for more information. - * - * @param {any} data - * @return {Uint8Array} - */ -const encodeAny = data => - encoding.encode(encoder => encoding.writeAny(encoder, data)); - -/** - * Decode an any-encoded value. - * - * @param {Uint8Array} buf - * @return {any} - */ -const decodeAny = buf => decoding.readAny(decoding.createDecoder(buf)); - -/** - * Shift Byte Array {N} bits to the left. Does not expand byte array. - * - * @param {Uint8Array} bs - * @param {number} N should be in the range of [0-7] - */ -const shiftNBitsLeft = (bs, N) => { - if (N === 0) return bs - bs = new Uint8Array(bs); - bs[0] <<= N; - for (let i = 1; i < bs.length; i++) { - bs[i - 1] |= bs[i] >>> (8 - N); - bs[i] <<= N; - } - return bs -}; - -var buffer = /*#__PURE__*/Object.freeze({ - __proto__: null, - createUint8ArrayFromLen: createUint8ArrayFromLen, - createUint8ArrayViewFromArrayBuffer: createUint8ArrayViewFromArrayBuffer, - createUint8ArrayFromArrayBuffer: createUint8ArrayFromArrayBuffer, - toBase64: toBase64, - fromBase64: fromBase64, - toBase64UrlEncoded: toBase64UrlEncoded, - fromBase64UrlEncoded: fromBase64UrlEncoded, - toHexString: toHexString, - fromHexString: fromHexString, - copyUint8Array: copyUint8Array, - encodeAny: encodeAny, - decodeAny: decodeAny, - shiftNBitsLeft: shiftNBitsLeft -}); - -exports.buffer = buffer; -exports.copyUint8Array = copyUint8Array; -exports.createUint8ArrayFromArrayBuffer = createUint8ArrayFromArrayBuffer; -exports.createUint8ArrayFromLen = createUint8ArrayFromLen; -exports.createUint8ArrayViewFromArrayBuffer = createUint8ArrayViewFromArrayBuffer; -exports.decodeAny = decodeAny; -exports.encodeAny = encodeAny; -exports.fromBase64 = fromBase64; -exports.fromBase64UrlEncoded = fromBase64UrlEncoded; -exports.fromHexString = fromHexString; -exports.shiftNBitsLeft = shiftNBitsLeft; -exports.toBase64 = toBase64; -exports.toBase64UrlEncoded = toBase64UrlEncoded; -exports.toHexString = toHexString; -//# sourceMappingURL=buffer-3e750729.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer-3e750729.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer-3e750729.cjs.map deleted file mode 100644 index f355adb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer-3e750729.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer-3e750729.cjs","sources":["../buffer.js"],"sourcesContent":["/**\n * Utility functions to work with buffers (Uint8Array).\n *\n * @module buffer\n */\n\nimport * as string from './string.js'\nimport * as env from './environment.js'\nimport * as array from './array.js'\nimport * as math from './math.js'\nimport * as encoding from './encoding.js'\nimport * as decoding from './decoding.js'\n\n/**\n * @param {number} len\n */\nexport const createUint8ArrayFromLen = len => new Uint8Array(len)\n\n/**\n * Create Uint8Array with initial content from buffer\n *\n * @param {ArrayBuffer} buffer\n * @param {number} byteOffset\n * @param {number} length\n */\nexport const createUint8ArrayViewFromArrayBuffer = (buffer, byteOffset, length) => new Uint8Array(buffer, byteOffset, length)\n\n/**\n * Create Uint8Array with initial content from buffer\n *\n * @param {ArrayBuffer} buffer\n */\nexport const createUint8ArrayFromArrayBuffer = buffer => new Uint8Array(buffer)\n\n/* c8 ignore start */\n/**\n * @param {Uint8Array} bytes\n * @return {string}\n */\nconst toBase64Browser = bytes => {\n let s = ''\n for (let i = 0; i < bytes.byteLength; i++) {\n s += string.fromCharCode(bytes[i])\n }\n // eslint-disable-next-line no-undef\n return btoa(s)\n}\n/* c8 ignore stop */\n\n/**\n * @param {Uint8Array} bytes\n * @return {string}\n */\nconst toBase64Node = bytes => Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString('base64')\n\n/* c8 ignore start */\n/**\n * @param {string} s\n * @return {Uint8Array}\n */\nconst fromBase64Browser = s => {\n // eslint-disable-next-line no-undef\n const a = atob(s)\n const bytes = createUint8ArrayFromLen(a.length)\n for (let i = 0; i < a.length; i++) {\n bytes[i] = a.charCodeAt(i)\n }\n return bytes\n}\n/* c8 ignore stop */\n\n/**\n * @param {string} s\n */\nconst fromBase64Node = s => {\n const buf = Buffer.from(s, 'base64')\n return createUint8ArrayViewFromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength)\n}\n\n/* c8 ignore next */\nexport const toBase64 = env.isBrowser ? toBase64Browser : toBase64Node\n\n/* c8 ignore next */\nexport const fromBase64 = env.isBrowser ? fromBase64Browser : fromBase64Node\n\n/**\n * Implements base64url - see https://datatracker.ietf.org/doc/html/rfc4648#section-5\n * @param {Uint8Array} buf\n */\nexport const toBase64UrlEncoded = buf => toBase64(buf).replaceAll('+', '-').replaceAll('/', '_').replaceAll('=', '')\n\n/**\n * @param {string} base64\n */\nexport const fromBase64UrlEncoded = base64 => fromBase64(base64.replaceAll('-', '+').replaceAll('_', '/'))\n\n/**\n * Base64 is always a more efficient choice. This exists for utility purposes only.\n *\n * @param {Uint8Array} buf\n */\nexport const toHexString = buf => array.map(buf, b => b.toString(16).padStart(2, '0')).join('')\n\n/**\n * Note: This function expects that the hex doesn't start with 0x..\n *\n * @param {string} hex\n */\nexport const fromHexString = hex => {\n const hlen = hex.length\n const buf = new Uint8Array(math.ceil(hlen / 2))\n for (let i = 0; i < hlen; i += 2) {\n buf[buf.length - i / 2 - 1] = Number.parseInt(hex.slice(hlen - i - 2, hlen - i), 16)\n }\n return buf\n}\n\n/**\n * Copy the content of an Uint8Array view to a new ArrayBuffer.\n *\n * @param {Uint8Array} uint8Array\n * @return {Uint8Array}\n */\nexport const copyUint8Array = uint8Array => {\n const newBuf = createUint8ArrayFromLen(uint8Array.byteLength)\n newBuf.set(uint8Array)\n return newBuf\n}\n\n/**\n * Encode anything as a UInt8Array. It's a pun on typescripts's `any` type.\n * See encoding.writeAny for more information.\n *\n * @param {any} data\n * @return {Uint8Array}\n */\nexport const encodeAny = data =>\n encoding.encode(encoder => encoding.writeAny(encoder, data))\n\n/**\n * Decode an any-encoded value.\n *\n * @param {Uint8Array} buf\n * @return {any}\n */\nexport const decodeAny = buf => decoding.readAny(decoding.createDecoder(buf))\n\n/**\n * Shift Byte Array {N} bits to the left. Does not expand byte array.\n *\n * @param {Uint8Array} bs\n * @param {number} N should be in the range of [0-7]\n */\nexport const shiftNBitsLeft = (bs, N) => {\n if (N === 0) return bs\n bs = new Uint8Array(bs)\n bs[0] <<= N\n for (let i = 1; i < bs.length; i++) {\n bs[i - 1] |= bs[i] >>> (8 - N)\n bs[i] <<= N\n }\n return bs\n}\n"],"names":["string.fromCharCode","env.isBrowser","array.map","math.ceil","encoding.encode","encoding.writeAny","decoding.readAny","decoding.createDecoder"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACY,MAAC,uBAAuB,GAAG,GAAG,IAAI,IAAI,UAAU,CAAC,GAAG,EAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,mCAAmC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAC;AAC7H;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,+BAA+B,GAAG,MAAM,IAAI,IAAI,UAAU,CAAC,MAAM,EAAC;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,eAAe,GAAG,KAAK,IAAI;AACjC,EAAE,IAAI,CAAC,GAAG,GAAE;AACZ,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE;AAC7C,IAAI,CAAC,IAAIA,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAC;AACtC,GAAG;AACH;AACA,EAAE,OAAO,IAAI,CAAC,CAAC,CAAC;AAChB,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAC;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAiB,GAAG,CAAC,IAAI;AAC/B;AACA,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,EAAC;AACnB,EAAE,MAAM,KAAK,GAAG,uBAAuB,CAAC,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GAAG,IAAI,UAAU,CAAC,EAAE,EAAC;AACzB,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,EAAC;AACb,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACtC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAC;AAClC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,EAAC;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.cjs deleted file mode 100644 index 84222ff..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.cjs +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./string-fddc5f8b.cjs'); -require('./environment-1c97264d.cjs'); -require('./array-78849c95.cjs'); -require('./math-96d5e8c4.cjs'); -require('./encoding-1a745c43.cjs'); -require('./decoding-76e75827.cjs'); -var buffer = require('./buffer-3e750729.cjs'); -require('./map-24d263c0.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./set-5b47859e.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./error-0c1f634f.cjs'); - - - -exports.copyUint8Array = buffer.copyUint8Array; -exports.createUint8ArrayFromArrayBuffer = buffer.createUint8ArrayFromArrayBuffer; -exports.createUint8ArrayFromLen = buffer.createUint8ArrayFromLen; -exports.createUint8ArrayViewFromArrayBuffer = buffer.createUint8ArrayViewFromArrayBuffer; -exports.decodeAny = buffer.decodeAny; -exports.encodeAny = buffer.encodeAny; -exports.fromBase64 = buffer.fromBase64; -exports.fromBase64UrlEncoded = buffer.fromBase64UrlEncoded; -exports.fromHexString = buffer.fromHexString; -exports.shiftNBitsLeft = buffer.shiftNBitsLeft; -exports.toBase64 = buffer.toBase64; -exports.toBase64UrlEncoded = buffer.toBase64UrlEncoded; -exports.toHexString = buffer.toHexString; -//# sourceMappingURL=buffer.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.cjs.map deleted file mode 100644 index ce79402..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.d.ts deleted file mode 100644 index 2f27c30..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export function createUint8ArrayFromLen(len: number): Uint8Array; -export function createUint8ArrayViewFromArrayBuffer(buffer: ArrayBuffer, byteOffset: number, length: number): Uint8Array; -export function createUint8ArrayFromArrayBuffer(buffer: ArrayBuffer): Uint8Array; -/** - * @param {Uint8Array} bytes - * @return {string} - */ -export function toBase64(bytes: Uint8Array): string; -/** - * @param {string} s - * @return {Uint8Array} - */ -export function fromBase64(s: string): Uint8Array; -export function toBase64UrlEncoded(buf: Uint8Array): string; -export function fromBase64UrlEncoded(base64: string): Uint8Array; -export function toHexString(buf: Uint8Array): string; -export function fromHexString(hex: string): Uint8Array; -export function copyUint8Array(uint8Array: Uint8Array): Uint8Array; -export function encodeAny(data: any): Uint8Array; -export function decodeAny(buf: Uint8Array): any; -export function shiftNBitsLeft(bs: Uint8Array, N: number): Uint8Array; -//# sourceMappingURL=buffer.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.d.ts.map deleted file mode 100644 index a51b03a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../buffer.js"],"names":[],"mappings":"AAgBO,6CAFI,MAAM,2BAEgD;AAS1D,4DAJI,WAAW,cACX,MAAM,UACN,MAAM,2BAE4G;AAOtH,wDAFI,WAAW,2BAEyD;AAG/E;;;GAGG;AACH,gCAHW,UAAU,GACT,MAAM,CASjB;AAUD;;;GAGG;AACH,8BAHW,MAAM,GACL,UAAU,CAAC,WAAW,CAAC,CAUlC;AAqBM,wCAFI,UAAU,UAE+F;AAK7G,6CAFI,MAAM,2BAEyF;AAOnG,iCAFI,UAAU,UAE0E;AAOxF,mCAFI,MAAM,2BAShB;AAQM,2CAHI,UAAU,GACT,UAAU,CAMrB;AASM,gCAHI,GAAG,GACF,UAAU,CAGwC;AAQvD,+BAHI,UAAU,GACT,GAAG,CAE8D;AAQtE,mCAHI,UAAU,KACV,MAAM,+BAWhB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.test.d.ts deleted file mode 100644 index 0bd7014..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testRepeatBase64urlEncoding(tc: t.TestCase): void; -export function testRepeatBase64Encoding(tc: t.TestCase): void; -export function testRepeatHexEncoding(tc: t.TestCase): void; -export function testAnyEncoding(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=buffer.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.test.d.ts.map deleted file mode 100644 index 5b23123..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/buffer.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer.test.d.ts","sourceRoot":"","sources":["../buffer.test.js"],"names":[],"mappings":"AA2BO,gDAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,6CAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,0CAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,qCAFI,CAAC,CAAC,QAAQ,QAMpB;mBApDkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.cjs deleted file mode 100644 index fe8908a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.cjs +++ /dev/null @@ -1,223 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var list = require('./list.cjs'); -var map = require('./map-24d263c0.cjs'); -var time = require('./time-d8438852.cjs'); -require('./function-314580f7.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./error-0c1f634f.cjs'); -require('./metric.cjs'); -require('./math-96d5e8c4.cjs'); - -/* eslint-env browser */ - -/** - * @template K, V - * - * @implements {list.ListNode} - */ -class Entry { - /** - * @param {K} key - * @param {V | Promise} val - */ - constructor (key, val) { - /** - * @type {this | null} - */ - this.prev = null; - /** - * @type {this | null} - */ - this.next = null; - this.created = time.getUnixTime(); - this.val = val; - this.key = key; - } -} - -/** - * @template K, V - */ -class Cache { - /** - * @param {number} timeout - */ - constructor (timeout) { - this.timeout = timeout; - /** - * @type list.List> - */ - this._q = list.create(); - /** - * @type {Map>} - */ - this._map = map.create(); - } -} - -/** - * @template K, V - * - * @param {Cache} cache - * @return {number} Returns the current timestamp - */ -const removeStale = cache => { - const now = time.getUnixTime(); - const q = cache._q; - while (q.start && now - q.start.created > cache.timeout) { - cache._map.delete(q.start.key); - list.popFront(q); - } - return now -}; - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - * @param {V} value - */ -const set = (cache, key, value) => { - const now = removeStale(cache); - const q = cache._q; - const n = cache._map.get(key); - if (n) { - list.removeNode(q, n); - list.pushEnd(q, n); - n.created = now; - n.val = value; - } else { - const node = new Entry(key, value); - list.pushEnd(q, node); - cache._map.set(key, node); - } -}; - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - * @return {Entry | undefined} - */ -const getNode = (cache, key) => { - removeStale(cache); - const n = cache._map.get(key); - if (n) { - return n - } -}; - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - * @return {V | undefined} - */ -const get = (cache, key) => { - const n = getNode(cache, key); - return n && !(n.val instanceof Promise) ? n.val : undefined -}; - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - */ -const refreshTimeout = (cache, key) => { - const now = time.getUnixTime(); - const q = cache._q; - const n = cache._map.get(key); - if (n) { - list.removeNode(q, n); - list.pushEnd(q, n); - n.created = now; - } -}; - -/** - * Works well in conjunktion with setIfUndefined which has an async init function. - * Using getAsync & setIfUndefined ensures that the init function is only called once. - * - * @template K, V - * - * @param {Cache} cache - * @param {K} key - * @return {V | Promise | undefined} - */ -const getAsync = (cache, key) => { - const n = getNode(cache, key); - return n ? n.val : undefined -}; - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - */ -const remove = (cache, key) => { - const n = cache._map.get(key); - if (n) { - list.removeNode(cache._q, n); - cache._map.delete(key); - return n.val && !(n.val instanceof Promise) ? n.val : undefined - } -}; - -/** - * @template K, V - * - * @param {Cache} cache - * @param {K} key - * @param {function():Promise} init - * @param {boolean} removeNull Optional argument that automatically removes values that resolve to null/undefined from the cache. - * @return {Promise | V} - */ -const setIfUndefined = (cache, key, init, removeNull = false) => { - removeStale(cache); - const q = cache._q; - const n = cache._map.get(key); - if (n) { - return n.val - } else { - const p = init(); - const node = new Entry(key, p); - list.pushEnd(q, node); - cache._map.set(key, node); - p.then(v => { - if (p === node.val) { - node.val = v; - } - if (removeNull && v == null) { - remove(cache, key); - } - }); - return p - } -}; - -/** - * @param {number} timeout - */ -const create = timeout => new Cache(timeout); - -exports.Cache = Cache; -exports.create = create; -exports.get = get; -exports.getAsync = getAsync; -exports.refreshTimeout = refreshTimeout; -exports.remove = remove; -exports.removeStale = removeStale; -exports.set = set; -exports.setIfUndefined = setIfUndefined; -//# sourceMappingURL=cache.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.cjs.map deleted file mode 100644 index 81dc848..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cache.cjs","sources":["../cache.js"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * An implementation of a map which has keys that expire.\n *\n * @module cache\n */\n\nimport * as list from './list.js'\nimport * as map from './map.js'\nimport * as time from './time.js'\n\n/**\n * @template K, V\n *\n * @implements {list.ListNode}\n */\nclass Entry {\n /**\n * @param {K} key\n * @param {V | Promise} val\n */\n constructor (key, val) {\n /**\n * @type {this | null}\n */\n this.prev = null\n /**\n * @type {this | null}\n */\n this.next = null\n this.created = time.getUnixTime()\n this.val = val\n this.key = key\n }\n}\n\n/**\n * @template K, V\n */\nexport class Cache {\n /**\n * @param {number} timeout\n */\n constructor (timeout) {\n this.timeout = timeout\n /**\n * @type list.List>\n */\n this._q = list.create()\n /**\n * @type {Map>}\n */\n this._map = map.create()\n }\n}\n\n/**\n * @template K, V\n *\n * @param {Cache} cache\n * @return {number} Returns the current timestamp\n */\nexport const removeStale = cache => {\n const now = time.getUnixTime()\n const q = cache._q\n while (q.start && now - q.start.created > cache.timeout) {\n cache._map.delete(q.start.key)\n list.popFront(q)\n }\n return now\n}\n\n/**\n * @template K, V\n *\n * @param {Cache} cache\n * @param {K} key\n * @param {V} value\n */\nexport const set = (cache, key, value) => {\n const now = removeStale(cache)\n const q = cache._q\n const n = cache._map.get(key)\n if (n) {\n list.removeNode(q, n)\n list.pushEnd(q, n)\n n.created = now\n n.val = value\n } else {\n const node = new Entry(key, value)\n list.pushEnd(q, node)\n cache._map.set(key, node)\n }\n}\n\n/**\n * @template K, V\n *\n * @param {Cache} cache\n * @param {K} key\n * @return {Entry | undefined}\n */\nconst getNode = (cache, key) => {\n removeStale(cache)\n const n = cache._map.get(key)\n if (n) {\n return n\n }\n}\n\n/**\n * @template K, V\n *\n * @param {Cache} cache\n * @param {K} key\n * @return {V | undefined}\n */\nexport const get = (cache, key) => {\n const n = getNode(cache, key)\n return n && !(n.val instanceof Promise) ? n.val : undefined\n}\n\n/**\n * @template K, V\n *\n * @param {Cache} cache\n * @param {K} key\n */\nexport const refreshTimeout = (cache, key) => {\n const now = time.getUnixTime()\n const q = cache._q\n const n = cache._map.get(key)\n if (n) {\n list.removeNode(q, n)\n list.pushEnd(q, n)\n n.created = now\n }\n}\n\n/**\n * Works well in conjunktion with setIfUndefined which has an async init function.\n * Using getAsync & setIfUndefined ensures that the init function is only called once.\n *\n * @template K, V\n *\n * @param {Cache} cache\n * @param {K} key\n * @return {V | Promise | undefined}\n */\nexport const getAsync = (cache, key) => {\n const n = getNode(cache, key)\n return n ? n.val : undefined\n}\n\n/**\n * @template K, V\n *\n * @param {Cache} cache\n * @param {K} key\n */\nexport const remove = (cache, key) => {\n const n = cache._map.get(key)\n if (n) {\n list.removeNode(cache._q, n)\n cache._map.delete(key)\n return n.val && !(n.val instanceof Promise) ? n.val : undefined\n }\n}\n\n/**\n * @template K, V\n *\n * @param {Cache} cache\n * @param {K} key\n * @param {function():Promise} init\n * @param {boolean} removeNull Optional argument that automatically removes values that resolve to null/undefined from the cache.\n * @return {Promise | V}\n */\nexport const setIfUndefined = (cache, key, init, removeNull = false) => {\n removeStale(cache)\n const q = cache._q\n const n = cache._map.get(key)\n if (n) {\n return n.val\n } else {\n const p = init()\n const node = new Entry(key, p)\n list.pushEnd(q, node)\n cache._map.set(key, node)\n p.then(v => {\n if (p === node.val) {\n node.val = v\n }\n if (removeNull && v == null) {\n remove(cache, key)\n }\n })\n return p\n }\n}\n\n/**\n * @param {number} timeout\n */\nexport const create = timeout => new Cache(timeout)\n"],"names":["time.getUnixTime","list.create","map.create","list.popFront","list.removeNode","list.pushEnd"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAK,CAAC;AACZ;AACA;AACA;AACA;AACA,EAAE,WAAW,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE;AACzB;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,GAAG,KAAI;AACpB;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,GAAG,KAAI;AACpB,IAAI,IAAI,CAAC,OAAO,GAAGA,gBAAgB,GAAE;AACrC,IAAI,IAAI,CAAC,GAAG,GAAG,IAAG;AAClB,IAAI,IAAI,CAAC,GAAG,GAAG,IAAG;AAClB,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AAC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,CAAC,EAAE,IAAI,EAAC;AACzB,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAC;AAC7B,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI;AAChB,MAAM,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE;AAC1B,QAAQ,IAAI,CAAC,GAAG,GAAG,EAAC;AACpB,OAAO;AACP,MAAM,IAAI,UAAU,IAAI,CAAC,IAAI,IAAI,EAAE;AACnC,QAAQ,MAAM,CAAC,KAAK,EAAE,GAAG,EAAC;AAC1B,OAAO;AACP,KAAK,EAAC;AACN,IAAI,OAAO,CAAC;AACZ,GAAG;AACH,EAAC;AACD;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,OAAO,IAAI,IAAI,KAAK,CAAC,OAAO;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.d.ts deleted file mode 100644 index 3317bc2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @template K, V - */ -export class Cache { - /** - * @param {number} timeout - */ - constructor(timeout: number); - timeout: number; - /** - * @type list.List> - */ - _q: list.List>; - /** - * @type {Map>} - */ - _map: Map>; -} -export function removeStale(cache: Cache): number; -export function set(cache: Cache, key: K, value: V): void; -export function get(cache: Cache, key: K): V | undefined; -export function refreshTimeout(cache: Cache, key: K): void; -export function getAsync(cache: Cache, key: K): V | Promise | undefined; -export function remove(cache: Cache, key: K): NonNullable | undefined; -export function setIfUndefined(cache: Cache, key: K, init: () => Promise, removeNull?: boolean): Promise | V; -export function create(timeout: number): Cache; -import * as list from './list.js'; -/** - * @template K, V - * - * @implements {list.ListNode} - */ -declare class Entry implements list.ListNode { - /** - * @param {K} key - * @param {V | Promise} val - */ - constructor(key: K, val: V | Promise); - /** - * @type {this | null} - */ - prev: this | null; - /** - * @type {this | null} - */ - next: this | null; - created: number; - val: V | Promise; - key: K; -} -export {}; -//# sourceMappingURL=cache.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.d.ts.map deleted file mode 100644 index c2505aa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../cache.js"],"names":[],"mappings":"AAqCA;;GAEG;AACH,mBAFa,CAAC,EAAE,CAAC;IAGf;;OAEG;IACH,qBAFW,MAAM,EAYhB;IATC,gBAAsB;IACtB;;OAEG;IACH,IAFS,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAER;IACvB;;OAEG;IACH,MAFU,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAEL;CAE3B;AAQM,4BALM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GACV,MAAM,CAUjB;AASM,oBANM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,SACD,CAAC,QAgBX;AAwBM,oBANM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,GACA,CAAC,GAAG,SAAS,CAKxB;AAQM,+BALM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,QAWX;AAYM,yBANM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,GACA,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAKrC;AAQM,uBALM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,8BASX;AAWM,+BARM,CAAC,EAAE,CAAC,SAEN,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OACX,CAAC,QACD,MAAW,OAAO,CAAC,CAAC,CAAC,eACrB,OAAO,GACN,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAuBzB;AAKM,gCAFI,MAAM,mBAEkC;sBArM7B,WAAW;AAIjC;;;;GAIG;AACH,oBAJa,CAAC,EAAE,CAAC,aAED,IAAI,CAAC,QAAQ;IAG3B;;;OAGG;IACH,iBAHW,CAAC,OACD,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAcxB;IAXC;;OAEG;IACH,MAFU,IAAI,GAAG,IAAI,CAEL;IAChB;;OAEG;IACH,MAFU,IAAI,GAAG,IAAI,CAEL;IAChB,gBAAiC;IACjC,oBAAc;IACd,OAAc;CAEjB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.test.d.ts deleted file mode 100644 index 693e0d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testCache(tc: t.TestCase): Promise; -import * as t from './testing.js'; -//# sourceMappingURL=cache.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.test.d.ts.map deleted file mode 100644 index 2b7d5f8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/cache.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cache.test.d.ts","sourceRoot":"","sources":["../cache.test.js"],"names":[],"mappings":"AAOO,8BAFI,CAAC,CAAC,QAAQ,iBA6EpB;mBAlFkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/common.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/common.cjs deleted file mode 100644 index 5936706..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/common.cjs +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var webcrypto = require('lib0/webcrypto'); - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var webcrypto__namespace = /*#__PURE__*/_interopNamespace(webcrypto); - -/** - * @param {CryptoKey} key - */ -const exportKeyJwk = async key => { - const jwk = await webcrypto__namespace.subtle.exportKey('jwk', key); - jwk.key_ops = key.usages; - return jwk -}; - -/** - * Only suited for exporting public keys. - * - * @param {CryptoKey} key - * @return {Promise>} - */ -const exportKeyRaw = key => - webcrypto__namespace.subtle.exportKey('raw', key).then(key => new Uint8Array(key)); - -exports.exportKeyJwk = exportKeyJwk; -exports.exportKeyRaw = exportKeyRaw; -//# sourceMappingURL=common.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/common.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/common.cjs.map deleted file mode 100644 index bc9fa8e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/common.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"common.cjs","sources":["../crypto/common.js"],"sourcesContent":["import * as webcrypto from 'lib0/webcrypto'\n\n/**\n * @param {CryptoKey} key\n */\nexport const exportKeyJwk = async key => {\n const jwk = await webcrypto.subtle.exportKey('jwk', key)\n jwk.key_ops = key.usages\n return jwk\n}\n\n/**\n * Only suited for exporting public keys.\n *\n * @param {CryptoKey} key\n * @return {Promise>}\n */\nexport const exportKeyRaw = key =>\n webcrypto.subtle.exportKey('raw', key).then(key => new Uint8Array(key))\n"],"names":["webcrypto"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACY,MAAC,YAAY,GAAG,MAAM,GAAG,IAAI;AACzC,EAAE,MAAM,GAAG,GAAG,MAAMA,oBAAS,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAC;AAC1D,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAM;AAC1B,EAAE,OAAO,GAAG;AACZ,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,GAAG;AAC/B,EAAEA,oBAAS,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,UAAU,CAAC,GAAG,CAAC;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.cjs deleted file mode 100644 index a7b903b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.cjs +++ /dev/null @@ -1,437 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var dom = require('./dom-7e625b09.cjs'); -var diff = require('./diff-9d236524.cjs'); -var object = require('./object-c0c9435b.cjs'); -var json = require('./json-092190a1.cjs'); -var string = require('./string-fddc5f8b.cjs'); -var array = require('./array-78849c95.cjs'); -var number = require('./number-1fb57bba.cjs'); -var _function = require('./function-314580f7.cjs'); -require('./pair-ab022bc3.cjs'); -require('./map-24d263c0.cjs'); -require('./schema.cjs'); -require('./error-0c1f634f.cjs'); -require('./environment-1c97264d.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./equality.cjs'); -require('./prng-37d48618.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./math-96d5e8c4.cjs'); -require('./buffer-3e750729.cjs'); -require('./encoding-1a745c43.cjs'); -require('./decoding-76e75827.cjs'); -require('./set-5b47859e.cjs'); - -/* eslint-env browser */ - -/** - * @type {CustomElementRegistry} - */ -const registry = customElements; - -/** - * @param {string} name - * @param {any} constr - * @param {ElementDefinitionOptions} [opts] - */ -const define = (name, constr, opts) => registry.define(name, constr, opts); - -/** - * @param {string} name - * @return {Promise} - */ -const whenDefined = name => registry.whenDefined(name); - -const upgradedEventName = 'upgraded'; -const connectedEventName = 'connected'; -const disconnectedEventName = 'disconnected'; - -/** - * @template S - */ -class Lib0Component extends HTMLElement { - /** - * @param {S} [state] - */ - constructor (state) { - super(); - /** - * @type {S|null} - */ - this.state = /** @type {any} */ (state); - /** - * @type {any} - */ - this._internal = {}; - } - - /** - * @param {S} _state - * @param {boolean} [_forceStateUpdate] Force that the state is rerendered even if state didn't change - */ - setState (_state, _forceStateUpdate = true) {} - - /** - * @param {any} _stateUpdate - */ - updateState (_stateUpdate) { } -} - -/** - * @param {any} val - * @param {"json"|"string"|"number"} type - * @return {string} - */ -const encodeAttrVal = (val, type) => { - if (type === 'json') { - val = json.stringify(val); - } - return val + '' -}; - -/** - * @param {any} val - * @param {"json"|"string"|"number"|"bool"} type - * @return {any} - */ -const parseAttrVal = (val, type) => { - switch (type) { - case 'json': - return json.parse(val) - case 'number': - return Number.parseFloat(val) - case 'string': - return val - case 'bool': - return val != null - default: - return null - } -}; - -/** - * @template S - * @typedef {Object} CONF - * @property {string?} [CONF.template] Template for the shadow dom. - * @property {string} [CONF.style] shadow dom style. Is only used when - * `CONF.template` is defined - * @property {S} [CONF.state] Initial component state. - * @property {function(S,S|null,Lib0Component):void} [CONF.onStateChange] Called when - * the state changes. - * @property {Object} [CONF.childStates] maps from - * CSS-selector to transformer function. The first element that matches the - * CSS-selector receives state updates via the transformer function. - * @property {Object} [CONF.attrs] - * attrs-keys and state-keys should be camelCase, but the DOM uses kebap-case. I.e. - * `attrs = { myAttr: 4 }` is represeted as `` in the DOM - * @property {Object):boolean|void>} [CONF.listeners] Maps from dom-event-name - * to event listener. - * @property {function(S, S, Lib0Component):Object} [CONF.slots] Fill slots - * automatically when state changes. Maps from slot-name to slot-html. - */ - -/** - * @template T - * @param {string} name - * @param {CONF} cnf - * @return {typeof Lib0Component} - */ -const createComponent = (name, { template, style = '', state: defaultState, onStateChange = () => {}, childStates = { }, attrs = {}, listeners = {}, slots = () => ({}) }) => { - /** - * Maps from camelCase attribute name to kebap-case attribute name. - * @type {Object} - */ - const normalizedAttrs = {}; - for (const key in attrs) { - normalizedAttrs[string.fromCamelCase(key, '-')] = key; - } - const templateElement = template - ? /** @type {HTMLTemplateElement} */ (dom.parseElement(` - - `)) - : null; - - class _Lib0Component extends HTMLElement { - /** - * @param {T} [state] - */ - constructor (state) { - super(); - /** - * @type {Array<{d:Lib0Component, s:function(any, any):Object}>} - */ - this._childStates = []; - /** - * @type {Object} - */ - this._slots = {}; - this._init = false; - /** - * @type {any} - */ - this._internal = {}; - /** - * @type {any} - */ - this.state = state || null; - this.connected = false; - // init shadow dom - if (templateElement) { - const shadow = /** @type {ShadowRoot} */ (this.attachShadow({ mode: 'open' })); - shadow.appendChild(templateElement.content.cloneNode(true)); - // fill child states - for (const key in childStates) { - this._childStates.push({ - d: /** @type {Lib0Component} */ (dom.querySelector(/** @type {any} */ (shadow), key)), - s: childStates[key] - }); - } - } - dom.emitCustomEvent(this, upgradedEventName, { bubbles: true }); - } - - connectedCallback () { - this.connected = true; - if (!this._init) { - this._init = true; - const shadow = this.shadowRoot; - if (shadow) { - dom.addEventListener(shadow, upgradedEventName, event => { - this.setState(this.state, true); - event.stopPropagation(); - }); - } - /** - * @type {Object} - */ - const startState = this.state || object.assign({}, defaultState); - if (attrs) { - for (const key in attrs) { - const normalizedKey = string.fromCamelCase(key, '-'); - const val = parseAttrVal(this.getAttribute(normalizedKey), attrs[key]); - if (val) { - startState[key] = val; - } - } - } - // add event listeners - for (const key in listeners) { - dom.addEventListener(shadow || this, key, event => { - if (listeners[key](/** @type {CustomEvent} */ (event), this) !== false) { - event.stopPropagation(); - event.preventDefault(); - return false - } - }); - } - // first setState call - this.state = null; - this.setState(startState); - } - dom.emitCustomEvent(/** @type {any} */ (this.shadowRoot || this), connectedEventName, { bubbles: true }); - } - - disconnectedCallback () { - this.connected = false; - dom.emitCustomEvent(/** @type {any} */ (this.shadowRoot || this), disconnectedEventName, { bubbles: true }); - this.setState(null); - } - - static get observedAttributes () { - return object.keys(normalizedAttrs) - } - - /** - * @param {string} name - * @param {string} oldVal - * @param {string} newVal - * - * @private - */ - attributeChangedCallback (name, oldVal, newVal) { - const curState = /** @type {any} */ (this.state); - const camelAttrName = normalizedAttrs[name]; - const type = attrs[camelAttrName]; - const parsedVal = parseAttrVal(newVal, type); - if (curState && (type !== 'json' || json.stringify(curState[camelAttrName]) !== newVal) && curState[camelAttrName] !== parsedVal && !number.isNaN(parsedVal)) { - this.updateState({ [camelAttrName]: parsedVal }); - } - } - - /** - * @param {any} stateUpdate - */ - updateState (stateUpdate) { - this.setState(object.assign({}, this.state, stateUpdate)); - } - - /** - * @param {any} state - */ - setState (state, forceStateUpdates = false) { - const prevState = this.state; - this.state = state; - if (this._init && (!_function.equalityFlat(state, prevState) || forceStateUpdates)) { - // fill slots - if (state) { - const slotElems = slots(state, prevState, this); - for (const key in slotElems) { - const slotContent = slotElems[key]; - if (this._slots[key] !== slotContent) { - this._slots[key] = slotContent; - const currentSlots = /** @type {Array} */ (key !== 'default' ? array.from(dom.querySelectorAll(this, `[slot="${key}"]`)) : array.from(this.childNodes).filter(/** @param {any} child */ child => !dom.checkNodeType(child, dom.ELEMENT_NODE) || !child.hasAttribute('slot'))); - currentSlots.slice(1).map(dom.remove); - const nextSlot = dom.parseFragment(slotContent); - if (key !== 'default') { - array.from(nextSlot.children).forEach(c => c.setAttribute('slot', key)); - } - if (currentSlots.length > 0) { - dom.replaceWith(currentSlots[0], nextSlot); - } else { - dom.appendChild(this, nextSlot); - } - } - } - } - onStateChange(state, prevState, this); - if (state != null) { - this._childStates.forEach(cnf => { - const d = cnf.d; - if (d.updateState) { - d.updateState(cnf.s(state, this)); - } - }); - } - for (const key in attrs) { - const normalizedKey = string.fromCamelCase(key, '-'); - if (state == null) { - this.removeAttribute(normalizedKey); - } else { - const stateVal = state[key]; - const attrsType = attrs[key]; - if (!prevState || prevState[key] !== stateVal) { - if (attrsType === 'bool') { - if (stateVal) { - this.setAttribute(normalizedKey, ''); - } else { - this.removeAttribute(normalizedKey); - } - } else if (stateVal == null && (attrsType === 'string' || attrsType === 'number')) { - this.removeAttribute(normalizedKey); - } else { - this.setAttribute(normalizedKey, encodeAttrVal(stateVal, attrsType)); - } - } - } - } - } - } - } - define(name, _Lib0Component); - // @ts-ignore - return _Lib0Component -}; - -/** - * @param {function} definer function that defines a component when executed - */ -const createComponentDefiner = definer => { - /** - * @type {any} - */ - let defined = null; - return () => { - if (!defined) { - defined = definer(); - } - return defined - } -}; - -const defineListComponent = createComponentDefiner(() => { - const ListItem = createComponent('lib0-list-item', { - template: '', - slots: state => ({ - content: `
${state}
` - }) - }); - return createComponent('lib0-list', { - state: { list: /** @type {Array} */ ([]), Item: ListItem }, - onStateChange: (state, prevState, component) => { - if (state == null) { - return - } - const { list = /** @type {Array} */ ([]), Item = ListItem } = state; - // @todo deep compare here by providing another parameter to simpleDiffArray - let { index, remove, insert } = diff.simpleDiffArray(prevState ? prevState.list : [], list, _function.equalityFlat); - if (remove === 0 && insert.length === 0) { - return - } - let child = /** @type {Lib0Component} */ (component.firstChild); - while (index-- > 0) { - child = /** @type {Lib0Component} */ (child.nextElementSibling); - } - let insertStart = 0; - while (insertStart < insert.length && remove-- > 0) { - // update existing state - child.setState(insert[insertStart++]); - child = /** @type {Lib0Component} */ (child.nextElementSibling); - } - while (remove-- > 0) { - // remove remaining - const prevChild = child; - child = /** @type {Lib0Component} */ (child.nextElementSibling); - component.removeChild(prevChild); - } - // insert remaining - component.insertBefore(dom.fragment(insert.slice(insertStart).map(/** @param {any} insState */ insState => { - const el = new Item(); - el.setState(insState); - return el - })), child); - } - }) -}); - -const defineLazyLoadingComponent = createComponentDefiner(() => createComponent('lib0-lazy', { - state: /** @type {{component:null|String,import:null|function():Promise,state:null|object}} */ ({ - component: null, import: null, state: null - }), - attrs: { - component: 'string' - }, - onStateChange: ({ component, state, import: getImport }, prevState, componentEl) => { - if (component !== null) { - if (getImport) { - getImport(); - } - if (!prevState || component !== prevState.component) { - const el = /** @type {any} */ (dom.createElement(component)); - componentEl.innerHTML = ''; - componentEl.insertBefore(el, null); - } - const el = /** @type {any} */ (componentEl.firstElementChild); - // @todo generalize setting state and check if setState is defined - if (el.setState) { - el.setState(state); - } - } - } -})); - -exports.Lib0Component = Lib0Component; -exports.createComponent = createComponent; -exports.createComponentDefiner = createComponentDefiner; -exports.define = define; -exports.defineLazyLoadingComponent = defineLazyLoadingComponent; -exports.defineListComponent = defineListComponent; -exports.registry = registry; -exports.whenDefined = whenDefined; -//# sourceMappingURL=component.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.cjs.map deleted file mode 100644 index dab924b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"component.cjs","sources":["../component.js"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * Web components.\n *\n * @module component\n */\n\nimport * as dom from './dom.js'\nimport * as diff from './diff.js'\nimport * as object from './object.js'\nimport * as json from './json.js'\nimport * as string from './string.js'\nimport * as array from './array.js'\nimport * as number from './number.js'\nimport * as func from './function.js'\n\n/**\n * @type {CustomElementRegistry}\n */\nexport const registry = customElements\n\n/**\n * @param {string} name\n * @param {any} constr\n * @param {ElementDefinitionOptions} [opts]\n */\nexport const define = (name, constr, opts) => registry.define(name, constr, opts)\n\n/**\n * @param {string} name\n * @return {Promise}\n */\nexport const whenDefined = name => registry.whenDefined(name)\n\nconst upgradedEventName = 'upgraded'\nconst connectedEventName = 'connected'\nconst disconnectedEventName = 'disconnected'\n\n/**\n * @template S\n */\nexport class Lib0Component extends HTMLElement {\n /**\n * @param {S} [state]\n */\n constructor (state) {\n super()\n /**\n * @type {S|null}\n */\n this.state = /** @type {any} */ (state)\n /**\n * @type {any}\n */\n this._internal = {}\n }\n\n /**\n * @param {S} _state\n * @param {boolean} [_forceStateUpdate] Force that the state is rerendered even if state didn't change\n */\n setState (_state, _forceStateUpdate = true) {}\n\n /**\n * @param {any} _stateUpdate\n */\n updateState (_stateUpdate) { }\n}\n\n/**\n * @param {any} val\n * @param {\"json\"|\"string\"|\"number\"} type\n * @return {string}\n */\nconst encodeAttrVal = (val, type) => {\n if (type === 'json') {\n val = json.stringify(val)\n }\n return val + ''\n}\n\n/**\n * @param {any} val\n * @param {\"json\"|\"string\"|\"number\"|\"bool\"} type\n * @return {any}\n */\nconst parseAttrVal = (val, type) => {\n switch (type) {\n case 'json':\n return json.parse(val)\n case 'number':\n return Number.parseFloat(val)\n case 'string':\n return val\n case 'bool':\n return val != null\n default:\n return null\n }\n}\n\n/**\n * @template S\n * @typedef {Object} CONF\n * @property {string?} [CONF.template] Template for the shadow dom.\n * @property {string} [CONF.style] shadow dom style. Is only used when\n * `CONF.template` is defined\n * @property {S} [CONF.state] Initial component state.\n * @property {function(S,S|null,Lib0Component):void} [CONF.onStateChange] Called when\n * the state changes.\n * @property {Object} [CONF.childStates] maps from\n * CSS-selector to transformer function. The first element that matches the\n * CSS-selector receives state updates via the transformer function.\n * @property {Object} [CONF.attrs]\n * attrs-keys and state-keys should be camelCase, but the DOM uses kebap-case. I.e.\n * `attrs = { myAttr: 4 }` is represeted as `` in the DOM\n * @property {Object):boolean|void>} [CONF.listeners] Maps from dom-event-name\n * to event listener.\n * @property {function(S, S, Lib0Component):Object} [CONF.slots] Fill slots\n * automatically when state changes. Maps from slot-name to slot-html.\n */\n\n/**\n * @template T\n * @param {string} name\n * @param {CONF} cnf\n * @return {typeof Lib0Component}\n */\nexport const createComponent = (name, { template, style = '', state: defaultState, onStateChange = () => {}, childStates = { }, attrs = {}, listeners = {}, slots = () => ({}) }) => {\n /**\n * Maps from camelCase attribute name to kebap-case attribute name.\n * @type {Object}\n */\n const normalizedAttrs = {}\n for (const key in attrs) {\n normalizedAttrs[string.fromCamelCase(key, '-')] = key\n }\n const templateElement = template\n ? /** @type {HTMLTemplateElement} */ (dom.parseElement(`\n \n `))\n : null\n\n class _Lib0Component extends HTMLElement {\n /**\n * @param {T} [state]\n */\n constructor (state) {\n super()\n /**\n * @type {Array<{d:Lib0Component, s:function(any, any):Object}>}\n */\n this._childStates = []\n /**\n * @type {Object}\n */\n this._slots = {}\n this._init = false\n /**\n * @type {any}\n */\n this._internal = {}\n /**\n * @type {any}\n */\n this.state = state || null\n this.connected = false\n // init shadow dom\n if (templateElement) {\n const shadow = /** @type {ShadowRoot} */ (this.attachShadow({ mode: 'open' }))\n shadow.appendChild(templateElement.content.cloneNode(true))\n // fill child states\n for (const key in childStates) {\n this._childStates.push({\n d: /** @type {Lib0Component} */ (dom.querySelector(/** @type {any} */ (shadow), key)),\n s: childStates[key]\n })\n }\n }\n dom.emitCustomEvent(this, upgradedEventName, { bubbles: true })\n }\n\n connectedCallback () {\n this.connected = true\n if (!this._init) {\n this._init = true\n const shadow = this.shadowRoot\n if (shadow) {\n dom.addEventListener(shadow, upgradedEventName, event => {\n this.setState(this.state, true)\n event.stopPropagation()\n })\n }\n /**\n * @type {Object}\n */\n const startState = this.state || object.assign({}, defaultState)\n if (attrs) {\n for (const key in attrs) {\n const normalizedKey = string.fromCamelCase(key, '-')\n const val = parseAttrVal(this.getAttribute(normalizedKey), attrs[key])\n if (val) {\n startState[key] = val\n }\n }\n }\n // add event listeners\n for (const key in listeners) {\n dom.addEventListener(shadow || this, key, event => {\n if (listeners[key](/** @type {CustomEvent} */ (event), this) !== false) {\n event.stopPropagation()\n event.preventDefault()\n return false\n }\n })\n }\n // first setState call\n this.state = null\n this.setState(startState)\n }\n dom.emitCustomEvent(/** @type {any} */ (this.shadowRoot || this), connectedEventName, { bubbles: true })\n }\n\n disconnectedCallback () {\n this.connected = false\n dom.emitCustomEvent(/** @type {any} */ (this.shadowRoot || this), disconnectedEventName, { bubbles: true })\n this.setState(null)\n }\n\n static get observedAttributes () {\n return object.keys(normalizedAttrs)\n }\n\n /**\n * @param {string} name\n * @param {string} oldVal\n * @param {string} newVal\n *\n * @private\n */\n attributeChangedCallback (name, oldVal, newVal) {\n const curState = /** @type {any} */ (this.state)\n const camelAttrName = normalizedAttrs[name]\n const type = attrs[camelAttrName]\n const parsedVal = parseAttrVal(newVal, type)\n if (curState && (type !== 'json' || json.stringify(curState[camelAttrName]) !== newVal) && curState[camelAttrName] !== parsedVal && !number.isNaN(parsedVal)) {\n this.updateState({ [camelAttrName]: parsedVal })\n }\n }\n\n /**\n * @param {any} stateUpdate\n */\n updateState (stateUpdate) {\n this.setState(object.assign({}, this.state, stateUpdate))\n }\n\n /**\n * @param {any} state\n */\n setState (state, forceStateUpdates = false) {\n const prevState = this.state\n this.state = state\n if (this._init && (!func.equalityFlat(state, prevState) || forceStateUpdates)) {\n // fill slots\n if (state) {\n const slotElems = slots(state, prevState, this)\n for (const key in slotElems) {\n const slotContent = slotElems[key]\n if (this._slots[key] !== slotContent) {\n this._slots[key] = slotContent\n const currentSlots = /** @type {Array} */ (key !== 'default' ? array.from(dom.querySelectorAll(this, `[slot=\"${key}\"]`)) : array.from(this.childNodes).filter(/** @param {any} child */ child => !dom.checkNodeType(child, dom.ELEMENT_NODE) || !child.hasAttribute('slot')))\n currentSlots.slice(1).map(dom.remove)\n const nextSlot = dom.parseFragment(slotContent)\n if (key !== 'default') {\n array.from(nextSlot.children).forEach(c => c.setAttribute('slot', key))\n }\n if (currentSlots.length > 0) {\n dom.replaceWith(currentSlots[0], nextSlot)\n } else {\n dom.appendChild(this, nextSlot)\n }\n }\n }\n }\n onStateChange(state, prevState, this)\n if (state != null) {\n this._childStates.forEach(cnf => {\n const d = cnf.d\n if (d.updateState) {\n d.updateState(cnf.s(state, this))\n }\n })\n }\n for (const key in attrs) {\n const normalizedKey = string.fromCamelCase(key, '-')\n if (state == null) {\n this.removeAttribute(normalizedKey)\n } else {\n const stateVal = state[key]\n const attrsType = attrs[key]\n if (!prevState || prevState[key] !== stateVal) {\n if (attrsType === 'bool') {\n if (stateVal) {\n this.setAttribute(normalizedKey, '')\n } else {\n this.removeAttribute(normalizedKey)\n }\n } else if (stateVal == null && (attrsType === 'string' || attrsType === 'number')) {\n this.removeAttribute(normalizedKey)\n } else {\n this.setAttribute(normalizedKey, encodeAttrVal(stateVal, attrsType))\n }\n }\n }\n }\n }\n }\n }\n define(name, _Lib0Component)\n // @ts-ignore\n return _Lib0Component\n}\n\n/**\n * @param {function} definer function that defines a component when executed\n */\nexport const createComponentDefiner = definer => {\n /**\n * @type {any}\n */\n let defined = null\n return () => {\n if (!defined) {\n defined = definer()\n }\n return defined\n }\n}\n\nexport const defineListComponent = createComponentDefiner(() => {\n const ListItem = createComponent('lib0-list-item', {\n template: '',\n slots: state => ({\n content: `
${state}
`\n })\n })\n return createComponent('lib0-list', {\n state: { list: /** @type {Array} */ ([]), Item: ListItem },\n onStateChange: (state, prevState, component) => {\n if (state == null) {\n return\n }\n const { list = /** @type {Array} */ ([]), Item = ListItem } = state\n // @todo deep compare here by providing another parameter to simpleDiffArray\n let { index, remove, insert } = diff.simpleDiffArray(prevState ? prevState.list : [], list, func.equalityFlat)\n if (remove === 0 && insert.length === 0) {\n return\n }\n let child = /** @type {Lib0Component} */ (component.firstChild)\n while (index-- > 0) {\n child = /** @type {Lib0Component} */ (child.nextElementSibling)\n }\n let insertStart = 0\n while (insertStart < insert.length && remove-- > 0) {\n // update existing state\n child.setState(insert[insertStart++])\n child = /** @type {Lib0Component} */ (child.nextElementSibling)\n }\n while (remove-- > 0) {\n // remove remaining\n const prevChild = child\n child = /** @type {Lib0Component} */ (child.nextElementSibling)\n component.removeChild(prevChild)\n }\n // insert remaining\n component.insertBefore(dom.fragment(insert.slice(insertStart).map(/** @param {any} insState */ insState => {\n const el = new Item()\n el.setState(insState)\n return el\n })), child)\n }\n })\n})\n\nexport const defineLazyLoadingComponent = createComponentDefiner(() => createComponent('lib0-lazy', {\n state: /** @type {{component:null|String,import:null|function():Promise,state:null|object}} */ ({\n component: null, import: null, state: null\n }),\n attrs: {\n component: 'string'\n },\n onStateChange: ({ component, state, import: getImport }, prevState, componentEl) => {\n if (component !== null) {\n if (getImport) {\n getImport()\n }\n if (!prevState || component !== prevState.component) {\n const el = /** @type {any} */ (dom.createElement(component))\n componentEl.innerHTML = ''\n componentEl.insertBefore(el, null)\n }\n const el = /** @type {any} */ (componentEl.firstElementChild)\n // @todo generalize setting state and check if setState is defined\n if (el.setState) {\n el.setState(state)\n }\n }\n }\n}))\n"],"names":["json.stringify","json.parse","string.fromCamelCase","dom.parseElement","dom.querySelector","dom.emitCustomEvent","dom.addEventListener","object.assign","object.keys","number.isNaN","func.equalityFlat","array.from","dom.querySelectorAll","dom.checkNodeType","dom.ELEMENT_NODE","dom.remove","dom.parseFragment","dom.replaceWith","dom.appendChild","diff.simpleDiffArray","dom.fragment","dom.createElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAgBA;AACA;AACA;AACA;AACY,M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AC;AAC7B,QAAQ,OAAO,EAAE;AACjB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAC;AACjB,KAAK;AACL,GAAG,CAAC;AACJ,CAAC,EAAC;AACF;AACY,MAAC,0BAA0B,GAAG,sBAAsB,CAAC,MAAM,eAAe,CAAC,WAAW,EAAE;AACpG,EAAE,KAAK,gGAAgG;AACvG,IAAI,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI;AAC9C,GAAG,CAAC;AACJ,EAAE,KAAK,EAAE;AACT,IAAI,SAAS,EAAE,QAAQ;AACvB,GAAG;AACH,EAAE,aAAa,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,WAAW,KAAK;AACtF,IAAI,IAAI,SAAS,KAAK,IAAI,EAAE;AAC5B,MAAM,IAAI,SAAS,EAAE;AACrB,QAAQ,SAAS,GAAE;AACnB,OAAO;AACP,MAAM,IAAI,CAAC,SAAS,IAAI,SAAS,KAAK,SAAS,CAAC,SAAS,EAAE;AAC3D,QAAQ,MAAM,EAAE,uBAAuBC,iBAAiB,CAAC,SAAS,CAAC,EAAC;AACpE,QAAQ,WAAW,CAAC,SAAS,GAAG,GAAE;AAClC,QAAQ,WAAW,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,EAAC;AAC1C,OAAO;AACP,MAAM,MAAM,EAAE,uBAAuB,WAAW,CAAC,iBAAiB,EAAC;AACnE;AACA,MAAM,IAAI,EAAE,CAAC,QAAQ,EAAE;AACvB,QAAQ,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAC;AAC1B,OAAO;AACP,KAAK;AACL,GAAG;AACH,CAAC,CAAC;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.d.ts deleted file mode 100644 index 8108665..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @type {CustomElementRegistry} - */ -export const registry: CustomElementRegistry; -export function define(name: string, constr: any, opts?: ElementDefinitionOptions): void; -export function whenDefined(name: string): Promise; -/** - * @template S - */ -export class Lib0Component extends HTMLElement { - /** - * @param {S} [state] - */ - constructor(state?: S); - /** - * @type {S|null} - */ - state: S | null; - /** - * @type {any} - */ - _internal: any; - /** - * @param {S} _state - * @param {boolean} [_forceStateUpdate] Force that the state is rerendered even if state didn't change - */ - setState(_state: S, _forceStateUpdate?: boolean): void; - /** - * @param {any} _stateUpdate - */ - updateState(_stateUpdate: any): void; -} -export function createComponent(name: string, { template, style, state: defaultState, onStateChange, childStates, attrs, listeners, slots }: CONF): typeof Lib0Component; -export function createComponentDefiner(definer: Function): () => any; -export function defineListComponent(): any; -export function defineLazyLoadingComponent(): any; -export type CONF = { - /** - * Template for the shadow dom. - */ - template?: string | null | undefined; - /** - * shadow dom style. Is only used when - * `CONF.template` is defined - */ - style?: string | undefined; - /** - * Initial component state. - */ - state?: S | undefined; - /** - * Called when - * the state changes. - */ - onStateChange?: ((arg0: S, arg1: S | null, arg2: Lib0Component) => void) | undefined; - /** - * maps from - * CSS-selector to transformer function. The first element that matches the - * CSS-selector receives state updates via the transformer function. - */ - childStates?: { - [x: string]: (arg0: any, arg1: any) => Object; - } | undefined; - /** - * attrs-keys and state-keys should be camelCase, but the DOM uses kebap-case. I.e. - * `attrs = { myAttr: 4 }` is represeted as `` in the DOM - */ - attrs?: { - [x: string]: "string" | "number" | "json" | "bool"; - } | undefined; - /** - * Maps from dom-event-name - * to event listener. - */ - listeners?: { - [x: string]: (arg0: CustomEvent, arg1: Lib0Component) => boolean | void; - } | undefined; - /** - * Fill slots - * automatically when state changes. Maps from slot-name to slot-html. - */ - slots?: ((arg0: S, arg1: S, arg2: Lib0Component) => { - [x: string]: string; - }) | undefined; -}; -//# sourceMappingURL=component.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.d.ts.map deleted file mode 100644 index d812115..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/component.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../component.js"],"names":[],"mappings":"AAiBA;;GAEG;AACH,uBAFU,qBAAqB,CAEO;AAO/B,6BAJI,MAAM,UACN,GAAG,SACH,wBAAwB,QAE8C;AAM1E,kCAHI,MAAM,GACL,OAAO,CAAC,wBAAwB,CAAC,CAEgB;AAM7D;;GAEG;AACH,2BAFa,CAAC;IAGZ;;OAEG;IACH,oBAFW,CAAC,EAYX;IARC;;OAEG;IACH,OAFU,CAAC,GAAC,IAAI,CAEuB;IACvC;;OAEG;IACH,WAFU,GAAG,CAEM;IAGrB;;;OAGG;IACH,iBAHW,CAAC,sBACD,OAAO,QAE4B;IAE9C;;QAEI;IACJ,0BAFY,GAAG,QAEe;CAC/B;AA6DM,gCALM,CAAC,QACH,MAAM,iGACN,IAAI,CAAC,CAAC,CAAC,GACN,OAAO,aAAa,CAuM/B;AAKM,qEAWN;AANQ,2CAKN;AALM,kDAKN;iBA9OU,CAAC;;;;;;;;;;;;;;;;;;4BAMS,CAAC,QAAC,CAAC,GAAC,IAAI,QAAC,aAAa,CAAC,CAAC,CAAC,KAAE,IAAI;;;;;;;4BAEjB,GAAG,QAAE,GAAG,KAAE,MAAM;;;;;;;;;;;;;;4BAMf,WAAW,QAAE,aAAa,CAAC,GAAG,CAAC,KAAE,OAAO,GAAC,IAAI;;;;;;oBAE5D,CAAC,QAAE,CAAC,QAAE,aAAa,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions-f5c0c102.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions-f5c0c102.cjs deleted file mode 100644 index 262c8cc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions-f5c0c102.cjs +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -/** - * Often used conditions. - * - * @module conditions - */ - -/** - * @template T - * @param {T|null|undefined} v - * @return {T|null} - */ -/* c8 ignore next */ -const undefinedToNull = v => v === undefined ? null : v; - -var conditions = /*#__PURE__*/Object.freeze({ - __proto__: null, - undefinedToNull: undefinedToNull -}); - -exports.conditions = conditions; -exports.undefinedToNull = undefinedToNull; -//# sourceMappingURL=conditions-f5c0c102.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions-f5c0c102.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions-f5c0c102.cjs.map deleted file mode 100644 index fea384d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions-f5c0c102.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"conditions-f5c0c102.cjs","sources":["../conditions.js"],"sourcesContent":["/**\n * Often used conditions.\n *\n * @module conditions\n */\n\n/**\n * @template T\n * @param {T|null|undefined} v\n * @return {T|null}\n */\n/* c8 ignore next */\nexport const undefinedToNull = v => v === undefined ? null : v\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,SAAS,GAAG,IAAI,GAAG;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.cjs deleted file mode 100644 index 789d383..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.cjs +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var conditions = require('./conditions-f5c0c102.cjs'); - - - -exports.undefinedToNull = conditions.undefinedToNull; -//# sourceMappingURL=conditions.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.cjs.map deleted file mode 100644 index 1f545ee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"conditions.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.d.ts deleted file mode 100644 index 0ed4306..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function undefinedToNull(v: T | null | undefined): T | null; -//# sourceMappingURL=conditions.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.d.ts.map deleted file mode 100644 index 846b836..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/conditions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../conditions.js"],"names":[],"mappings":"AAYO,gCALM,CAAC,KACH,CAAC,GAAC,IAAI,GAAC,SAAS,GACf,CAAC,GAAC,IAAI,CAG4C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto.test.d.ts deleted file mode 100644 index 050692d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto.test.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function testJwt(_tc: t.TestCase): Promise; -export function testEncryption(tc: t.TestCase): Promise; -export function testReapeatEncryption(tc: t.TestCase): Promise; -export function testImportExport(tc: t.TestCase): Promise; -export function testEncryptionPerformance(tc: t.TestCase): Promise; -export function testConsistentKeyGeneration(_tc: t.TestCase): Promise; -export function testSigning(tc: t.TestCase): Promise; -import * as t from './testing.js'; -//# sourceMappingURL=crypto.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto.test.d.ts.map deleted file mode 100644 index 1bac65c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"crypto.test.d.ts","sourceRoot":"","sources":["../crypto.test.js"],"names":[],"mappings":"AAYO,6BAFI,CAAC,CAAC,QAAQ,iBA8BpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,iBAoCpB;AAKM,0CAFI,CAAC,CAAC,QAAQ,iBA8BpB;AAKM,qCAFI,CAAC,CAAC,QAAQ,iBAgDpB;AAKM,8CAFI,CAAC,CAAC,QAAQ,iBAwCpB;AAKM,iDAFI,CAAC,CAAC,QAAQ,iBA2EpB;AAKM,gCAFI,CAAC,CAAC,QAAQ,iBAapB;mBAvSkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/aes-gcm.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/aes-gcm.d.ts deleted file mode 100644 index 2120545..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/aes-gcm.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export function encrypt(key: CryptoKey, data: Uint8Array): Promise>; -export function decrypt(key: CryptoKey, data: Uint8Array): PromiseLike; -export function importKeyJwk(jwk: any, { usages, extractable }?: { - usages?: Usages | undefined; - extractable?: boolean | undefined; -}): Promise; -export function importKeyRaw(raw: Uint8Array, { usages, extractable }?: { - usages?: Usages | undefined; - extractable?: boolean | undefined; -}): Promise; -export function deriveKey(secret: Uint8Array | string, salt: Uint8Array | string, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export type Usages = Array<"encrypt" | "decrypt">; -export { exportKeyJwk, exportKeyRaw } from "./common.js"; -//# sourceMappingURL=aes-gcm.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/aes-gcm.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/aes-gcm.d.ts.map deleted file mode 100644 index 2b78179..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/aes-gcm.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aes-gcm.d.ts","sourceRoot":"","sources":["../../crypto/aes-gcm.js"],"names":[],"mappings":"AAuBO,6BAHI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,oCAkBjC;AAWM,6BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,CAclC;AAaM,kCALI,GAAG,4BAEX;IAAsB,MAAM;IACL,WAAW;CAAC,sBAQrC;AAUM,kCALI,UAAU,CAAC,WAAW,CAAC,4BAE/B;IAAsB,MAAM;IACL,WAAW;CAAC,sBAG0D;AAmBzF,kCANI,UAAU,CAAC,WAAW,CAAC,GAAC,MAAM,QAC9B,UAAU,CAAC,WAAW,CAAC,GAAC,MAAM,4BAEtC;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAsB7B;qBAxHU,KAAK,CAAC,SAAS,GAAC,SAAS,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/common.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/common.d.ts deleted file mode 100644 index 75106c9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/common.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function exportKeyJwk(key: CryptoKey): Promise; -export function exportKeyRaw(key: CryptoKey): Promise>; -//# sourceMappingURL=common.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/common.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/common.d.ts.map deleted file mode 100644 index 23671f9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/common.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../crypto/common.js"],"names":[],"mappings":"AAKO,kCAFI,SAAS,uBAMnB;AAQM,kCAHI,SAAS,GACR,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAG6B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/ecdsa.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/ecdsa.d.ts deleted file mode 100644 index 5ebdfe1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/ecdsa.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export function sign(key: CryptoKey, data: Uint8Array): PromiseLike>; -export function verify(key: CryptoKey, signature: Uint8Array, data: Uint8Array): PromiseLike; -export function generateKeyPair({ extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export function importKeyJwk(jwk: any, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export function importKeyRaw(raw: any, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export type Usages = Array<"sign" | "verify">; -export { exportKeyJwk, exportKeyRaw } from "./common.js"; -//# sourceMappingURL=ecdsa.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/ecdsa.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/ecdsa.d.ts.map deleted file mode 100644 index 1295e2c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/ecdsa.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ecdsa.d.ts","sourceRoot":"","sources":["../../crypto/ecdsa.js"],"names":[],"mappings":"AA8BO,0BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAOA;AAYzC,4BALI,SAAS,aACT,UAAU,CAAC,WAAW,CAAC,QACvB,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,OAAO,CAAC,CAQ7B;AAaI,0DAHJ;IAAuB,WAAW;IACZ,MAAM;CAAC,0BAO7B;AAQI,kCALI,GAAG,4BAEX;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAQ/B;AAUM,kCALI,GAAG,4BAEX;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAGkD;qBAxFrE,KAAK,CAAC,MAAM,GAAC,QAAQ,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/jwt.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/jwt.d.ts deleted file mode 100644 index 0447def..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/jwt.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function encodeJwt(privateKey: CryptoKey, payload: Object): PromiseLike; -export function verifyJwt(publicKey: CryptoKey, jwt: string): Promise<{ - header: any; - payload: any; -}>; -export function unsafeDecode(jwt: string): { - header: any; - payload: any; -}; -//# sourceMappingURL=jwt.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/jwt.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/jwt.d.ts.map deleted file mode 100644 index 1ac8dfd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/jwt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../crypto/jwt.js"],"names":[],"mappings":"AAqBO,sCAHI,SAAS,WACT,MAAM,uBAgBhB;AAMM,qCAHI,SAAS,OACT,MAAM;;;GAiBhB;AAOM,kCAFI,MAAM;;;EAQhB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/rsa-oaep.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/rsa-oaep.d.ts deleted file mode 100644 index b8bf3e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/rsa-oaep.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export { exportKeyJwk } from "./common.js"; -export function encrypt(key: CryptoKey, data: Uint8Array): PromiseLike>; -export function decrypt(key: CryptoKey, data: Uint8Array): PromiseLike; -export function generateKeyPair({ extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export function importKeyJwk(jwk: any, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export type Usages = Array<"encrypt" | "decrypt">; -//# sourceMappingURL=rsa-oaep.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/rsa-oaep.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/rsa-oaep.d.ts.map deleted file mode 100644 index 1f83434..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/crypto/rsa-oaep.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rsa-oaep.d.ts","sourceRoot":"","sources":["../../crypto/rsa-oaep.js"],"names":[],"mappings":";AAuBO,6BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CASZ;AAW7B,6BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,CASG;AAQ/B,0DAJJ;IAAuB,WAAW;IACZ,MAAM;CAC5B,GAAS,OAAO,CAAC,aAAa,CAAC,CAY/B;AAQI,kCALI,GAAG,4BAEX;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAQ/B;qBAxEY,KAAK,CAAC,SAAS,GAAC,SAAS,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding-76e75827.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding-76e75827.cjs deleted file mode 100644 index 175342d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding-76e75827.cjs +++ /dev/null @@ -1,795 +0,0 @@ -'use strict'; - -var binary = require('./binary-ac8e39e2.cjs'); -var math = require('./math-96d5e8c4.cjs'); -var number = require('./number-1fb57bba.cjs'); -var string = require('./string-fddc5f8b.cjs'); -var error = require('./error-0c1f634f.cjs'); -var encoding = require('./encoding-1a745c43.cjs'); - -/** - * Efficient schema-less binary decoding with support for variable length encoding. - * - * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module decoding - */ - -const errorUnexpectedEndOfArray = error.create('Unexpected end of array'); -const errorIntegerOutOfRange = error.create('Integer out of Range'); - -/** - * A Decoder handles the decoding of an Uint8Array. - * @template {ArrayBufferLike} [Buf=ArrayBufferLike] - */ -class Decoder { - /** - * @param {Uint8Array} uint8Array Binary data to decode - */ - constructor (uint8Array) { - /** - * Decoding target. - * - * @type {Uint8Array} - */ - this.arr = uint8Array; - /** - * Current decoding position. - * - * @type {number} - */ - this.pos = 0; - } -} - -/** - * @function - * @template {ArrayBufferLike} Buf - * @param {Uint8Array} uint8Array - * @return {Decoder} - */ -const createDecoder = uint8Array => new Decoder(uint8Array); - -/** - * @function - * @param {Decoder} decoder - * @return {boolean} - */ -const hasContent = decoder => decoder.pos !== decoder.arr.length; - -/** - * Clone a decoder instance. - * Optionally set a new position parameter. - * - * @function - * @param {Decoder} decoder The decoder instance - * @param {number} [newPos] Defaults to current position - * @return {Decoder} A clone of `decoder` - */ -const clone = (decoder, newPos = decoder.pos) => { - const _decoder = createDecoder(decoder.arr); - _decoder.pos = newPos; - return _decoder -}; - -/** - * Create an Uint8Array view of the next `len` bytes and advance the position by `len`. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @template {ArrayBufferLike} Buf - * @param {Decoder} decoder The decoder instance - * @param {number} len The length of bytes to read - * @return {Uint8Array} - */ -const readUint8Array = (decoder, len) => { - const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len); - decoder.pos += len; - return view -}; - -/** - * Read variable length Uint8Array. - * - * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks. - * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array. - * - * @function - * @template {ArrayBufferLike} Buf - * @param {Decoder} decoder - * @return {Uint8Array} - */ -const readVarUint8Array = decoder => readUint8Array(decoder, readVarUint(decoder)); - -/** - * Read the rest of the content as an ArrayBuffer - * @function - * @param {Decoder} decoder - * @return {Uint8Array} - */ -const readTailAsUint8Array = decoder => readUint8Array(decoder, decoder.arr.length - decoder.pos); - -/** - * Skip one byte, jump to the next position. - * @function - * @param {Decoder} decoder The decoder instance - * @return {number} The next position - */ -const skip8 = decoder => decoder.pos++; - -/** - * Read one byte as unsigned integer. - * @function - * @param {Decoder} decoder The decoder instance - * @return {number} Unsigned 8-bit integer - */ -const readUint8 = decoder => decoder.arr[decoder.pos++]; - -/** - * Read 2 bytes as unsigned integer. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -const readUint16 = decoder => { - const uint = - decoder.arr[decoder.pos] + - (decoder.arr[decoder.pos + 1] << 8); - decoder.pos += 2; - return uint -}; - -/** - * Read 4 bytes as unsigned integer. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -const readUint32 = decoder => { - const uint = - (decoder.arr[decoder.pos] + - (decoder.arr[decoder.pos + 1] << 8) + - (decoder.arr[decoder.pos + 2] << 16) + - (decoder.arr[decoder.pos + 3] << 24)) >>> 0; - decoder.pos += 4; - return uint -}; - -/** - * Read 4 bytes as unsigned integer in big endian order. - * (most significant byte first) - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -const readUint32BigEndian = decoder => { - const uint = - (decoder.arr[decoder.pos + 3] + - (decoder.arr[decoder.pos + 2] << 8) + - (decoder.arr[decoder.pos + 1] << 16) + - (decoder.arr[decoder.pos] << 24)) >>> 0; - decoder.pos += 4; - return uint -}; - -/** - * Look ahead without incrementing the position - * to the next byte and read it as unsigned integer. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -const peekUint8 = decoder => decoder.arr[decoder.pos]; - -/** - * Look ahead without incrementing the position - * to the next byte and read it as unsigned integer. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -const peekUint16 = decoder => - decoder.arr[decoder.pos] + - (decoder.arr[decoder.pos + 1] << 8); - -/** - * Look ahead without incrementing the position - * to the next byte and read it as unsigned integer. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer. - */ -const peekUint32 = decoder => ( - decoder.arr[decoder.pos] + - (decoder.arr[decoder.pos + 1] << 8) + - (decoder.arr[decoder.pos + 2] << 16) + - (decoder.arr[decoder.pos + 3] << 24) -) >>> 0; - -/** - * Read unsigned integer (32bit) with variable length. - * 1/8th of the storage is used as encoding overhead. - * * numbers < 2^7 is stored in one bytlength - * * numbers < 2^14 is stored in two bylength - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer.length - */ -const readVarUint = decoder => { - let num = 0; - let mult = 1; - const len = decoder.arr.length; - while (decoder.pos < len) { - const r = decoder.arr[decoder.pos++]; - // num = num | ((r & binary.BITS7) << len) - num = num + (r & binary.BITS7) * mult; // shift $r << (7*#iterations) and add it to num - mult *= 128; // next iteration, shift 7 "more" to the left - if (r < binary.BIT8) { - return num - } - /* c8 ignore start */ - if (num > number.MAX_SAFE_INTEGER) { - throw errorIntegerOutOfRange - } - /* c8 ignore stop */ - } - throw errorUnexpectedEndOfArray -}; - -/** - * Read signed integer (32bit) with variable length. - * 1/8th of the storage is used as encoding overhead. - * * numbers < 2^7 is stored in one bytlength - * * numbers < 2^14 is stored in two bylength - * @todo This should probably create the inverse ~num if number is negative - but this would be a breaking change. - * - * @function - * @param {Decoder} decoder - * @return {number} An unsigned integer.length - */ -const readVarInt = decoder => { - let r = decoder.arr[decoder.pos++]; - let num = r & binary.BITS6; - let mult = 64; - const sign = (r & binary.BIT7) > 0 ? -1 : 1; - if ((r & binary.BIT8) === 0) { - // don't continue reading - return sign * num - } - const len = decoder.arr.length; - while (decoder.pos < len) { - r = decoder.arr[decoder.pos++]; - // num = num | ((r & binary.BITS7) << len) - num = num + (r & binary.BITS7) * mult; - mult *= 128; - if (r < binary.BIT8) { - return sign * num - } - /* c8 ignore start */ - if (num > number.MAX_SAFE_INTEGER) { - throw errorIntegerOutOfRange - } - /* c8 ignore stop */ - } - throw errorUnexpectedEndOfArray -}; - -/** - * Look ahead and read varUint without incrementing position - * - * @function - * @param {Decoder} decoder - * @return {number} - */ -const peekVarUint = decoder => { - const pos = decoder.pos; - const s = readVarUint(decoder); - decoder.pos = pos; - return s -}; - -/** - * Look ahead and read varUint without incrementing position - * - * @function - * @param {Decoder} decoder - * @return {number} - */ -const peekVarInt = decoder => { - const pos = decoder.pos; - const s = readVarInt(decoder); - decoder.pos = pos; - return s -}; - -/** - * We don't test this function anymore as we use native decoding/encoding by default now. - * Better not modify this anymore.. - * - * Transforming utf8 to a string is pretty expensive. The code performs 10x better - * when String.fromCodePoint is fed with all characters as arguments. - * But most environments have a maximum number of arguments per functions. - * For effiency reasons we apply a maximum of 10000 characters at once. - * - * @function - * @param {Decoder} decoder - * @return {String} The read String. - */ -/* c8 ignore start */ -const _readVarStringPolyfill = decoder => { - let remainingLen = readVarUint(decoder); - if (remainingLen === 0) { - return '' - } else { - let encodedString = String.fromCodePoint(readUint8(decoder)); // remember to decrease remainingLen - if (--remainingLen < 100) { // do not create a Uint8Array for small strings - while (remainingLen--) { - encodedString += String.fromCodePoint(readUint8(decoder)); - } - } else { - while (remainingLen > 0) { - const nextLen = remainingLen < 10000 ? remainingLen : 10000; - // this is dangerous, we create a fresh array view from the existing buffer - const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen); - decoder.pos += nextLen; - // Starting with ES5.1 we can supply a generic array-like object as arguments - encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes)); - remainingLen -= nextLen; - } - } - return decodeURIComponent(escape(encodedString)) - } -}; -/* c8 ignore stop */ - -/** - * @function - * @param {Decoder} decoder - * @return {String} The read String - */ -const _readVarStringNative = decoder => - /** @type any */ (string.utf8TextDecoder).decode(readVarUint8Array(decoder)); - -/** - * Read string of variable length - * * varUint is used to store the length of the string - * - * @function - * @param {Decoder} decoder - * @return {String} The read String - * - */ -/* c8 ignore next */ -const readVarString = string.utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill; - -/** - * @param {Decoder} decoder - * @return {Uint8Array} - */ -const readTerminatedUint8Array = decoder => { - const encoder = encoding.createEncoder(); - let b; - while (true) { - b = readUint8(decoder); - if (b === 0) { - return encoding.toUint8Array(encoder) - } - if (b === 1) { - b = readUint8(decoder); - } - encoding.write(encoder, b); - } -}; - -/** - * @param {Decoder} decoder - * @return {string} - */ -const readTerminatedString = decoder => string.decodeUtf8(readTerminatedUint8Array(decoder)); - -/** - * Look ahead and read varString without incrementing position - * - * @function - * @param {Decoder} decoder - * @return {string} - */ -const peekVarString = decoder => { - const pos = decoder.pos; - const s = readVarString(decoder); - decoder.pos = pos; - return s -}; - -/** - * @param {Decoder} decoder - * @param {number} len - * @return {DataView} - */ -const readFromDataView = (decoder, len) => { - const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len); - decoder.pos += len; - return dv -}; - -/** - * @param {Decoder} decoder - */ -const readFloat32 = decoder => readFromDataView(decoder, 4).getFloat32(0, false); - -/** - * @param {Decoder} decoder - */ -const readFloat64 = decoder => readFromDataView(decoder, 8).getFloat64(0, false); - -/** - * @param {Decoder} decoder - */ -const readBigInt64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigInt64(0, false); - -/** - * @param {Decoder} decoder - */ -const readBigUint64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigUint64(0, false); - -/** - * @type {Array} - */ -const readAnyLookupTable = [ - decoder => undefined, // CASE 127: undefined - decoder => null, // CASE 126: null - readVarInt, // CASE 125: integer - readFloat32, // CASE 124: float32 - readFloat64, // CASE 123: float64 - readBigInt64, // CASE 122: bigint - decoder => false, // CASE 121: boolean (false) - decoder => true, // CASE 120: boolean (true) - readVarString, // CASE 119: string - decoder => { // CASE 118: object - const len = readVarUint(decoder); - /** - * @type {Object} - */ - const obj = {}; - for (let i = 0; i < len; i++) { - const key = readVarString(decoder); - obj[key] = readAny(decoder); - } - return obj - }, - decoder => { // CASE 117: array - const len = readVarUint(decoder); - const arr = []; - for (let i = 0; i < len; i++) { - arr.push(readAny(decoder)); - } - return arr - }, - readVarUint8Array // CASE 116: Uint8Array -]; - -/** - * @param {Decoder} decoder - */ -const readAny = decoder => readAnyLookupTable[127 - readUint8(decoder)](decoder); - -/** - * T must not be null. - * - * @template T - */ -class RleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {function(Decoder):T} reader - */ - constructor (uint8Array, reader) { - super(uint8Array); - /** - * The reader - */ - this.reader = reader; - /** - * Current state - * @type {T|null} - */ - this.s = null; - this.count = 0; - } - - read () { - if (this.count === 0) { - this.s = this.reader(this); - if (hasContent(this)) { - this.count = readVarUint(this) + 1; // see encoder implementation for the reason why this is incremented - } else { - this.count = -1; // read the current value forever - } - } - this.count--; - return /** @type {T} */ (this.s) - } -} - -class IntDiffDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {number} start - */ - constructor (uint8Array, start) { - super(uint8Array); - /** - * Current state - * @type {number} - */ - this.s = start; - } - - /** - * @return {number} - */ - read () { - this.s += readVarInt(this); - return this.s - } -} - -class RleIntDiffDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {number} start - */ - constructor (uint8Array, start) { - super(uint8Array); - /** - * Current state - * @type {number} - */ - this.s = start; - this.count = 0; - } - - /** - * @return {number} - */ - read () { - if (this.count === 0) { - this.s += readVarInt(this); - if (hasContent(this)) { - this.count = readVarUint(this) + 1; // see encoder implementation for the reason why this is incremented - } else { - this.count = -1; // read the current value forever - } - } - this.count--; - return /** @type {number} */ (this.s) - } -} - -class UintOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor (uint8Array) { - super(uint8Array); - /** - * @type {number} - */ - this.s = 0; - this.count = 0; - } - - read () { - if (this.count === 0) { - this.s = readVarInt(this); - // if the sign is negative, we read the count too, otherwise count is 1 - const isNegative = math.isNegativeZero(this.s); - this.count = 1; - if (isNegative) { - this.s = -this.s; - this.count = readVarUint(this) + 2; - } - } - this.count--; - return /** @type {number} */ (this.s) - } -} - -class IncUintOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor (uint8Array) { - super(uint8Array); - /** - * @type {number} - */ - this.s = 0; - this.count = 0; - } - - read () { - if (this.count === 0) { - this.s = readVarInt(this); - // if the sign is negative, we read the count too, otherwise count is 1 - const isNegative = math.isNegativeZero(this.s); - this.count = 1; - if (isNegative) { - this.s = -this.s; - this.count = readVarUint(this) + 2; - } - } - this.count--; - return /** @type {number} */ (this.s++) - } -} - -class IntDiffOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor (uint8Array) { - super(uint8Array); - /** - * @type {number} - */ - this.s = 0; - this.count = 0; - this.diff = 0; - } - - /** - * @return {number} - */ - read () { - if (this.count === 0) { - const diff = readVarInt(this); - // if the first bit is set, we read more data - const hasCount = diff & 1; - this.diff = math.floor(diff / 2); // shift >> 1 - this.count = 1; - if (hasCount) { - this.count = readVarUint(this) + 2; - } - } - this.s += this.diff; - this.count--; - return this.s - } -} - -class StringDecoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor (uint8Array) { - this.decoder = new UintOptRleDecoder(uint8Array); - this.str = readVarString(this.decoder); - /** - * @type {number} - */ - this.spos = 0; - } - - /** - * @return {string} - */ - read () { - const end = this.spos + this.decoder.read(); - const res = this.str.slice(this.spos, end); - this.spos = end; - return res - } -} - -var decoding = /*#__PURE__*/Object.freeze({ - __proto__: null, - Decoder: Decoder, - createDecoder: createDecoder, - hasContent: hasContent, - clone: clone, - readUint8Array: readUint8Array, - readVarUint8Array: readVarUint8Array, - readTailAsUint8Array: readTailAsUint8Array, - skip8: skip8, - readUint8: readUint8, - readUint16: readUint16, - readUint32: readUint32, - readUint32BigEndian: readUint32BigEndian, - peekUint8: peekUint8, - peekUint16: peekUint16, - peekUint32: peekUint32, - readVarUint: readVarUint, - readVarInt: readVarInt, - peekVarUint: peekVarUint, - peekVarInt: peekVarInt, - _readVarStringPolyfill: _readVarStringPolyfill, - _readVarStringNative: _readVarStringNative, - readVarString: readVarString, - readTerminatedUint8Array: readTerminatedUint8Array, - readTerminatedString: readTerminatedString, - peekVarString: peekVarString, - readFromDataView: readFromDataView, - readFloat32: readFloat32, - readFloat64: readFloat64, - readBigInt64: readBigInt64, - readBigUint64: readBigUint64, - readAny: readAny, - RleDecoder: RleDecoder, - IntDiffDecoder: IntDiffDecoder, - RleIntDiffDecoder: RleIntDiffDecoder, - UintOptRleDecoder: UintOptRleDecoder, - IncUintOptRleDecoder: IncUintOptRleDecoder, - IntDiffOptRleDecoder: IntDiffOptRleDecoder, - StringDecoder: StringDecoder -}); - -exports.Decoder = Decoder; -exports.IncUintOptRleDecoder = IncUintOptRleDecoder; -exports.IntDiffDecoder = IntDiffDecoder; -exports.IntDiffOptRleDecoder = IntDiffOptRleDecoder; -exports.RleDecoder = RleDecoder; -exports.RleIntDiffDecoder = RleIntDiffDecoder; -exports.StringDecoder = StringDecoder; -exports.UintOptRleDecoder = UintOptRleDecoder; -exports._readVarStringNative = _readVarStringNative; -exports._readVarStringPolyfill = _readVarStringPolyfill; -exports.clone = clone; -exports.createDecoder = createDecoder; -exports.decoding = decoding; -exports.hasContent = hasContent; -exports.peekUint16 = peekUint16; -exports.peekUint32 = peekUint32; -exports.peekUint8 = peekUint8; -exports.peekVarInt = peekVarInt; -exports.peekVarString = peekVarString; -exports.peekVarUint = peekVarUint; -exports.readAny = readAny; -exports.readBigInt64 = readBigInt64; -exports.readBigUint64 = readBigUint64; -exports.readFloat32 = readFloat32; -exports.readFloat64 = readFloat64; -exports.readFromDataView = readFromDataView; -exports.readTailAsUint8Array = readTailAsUint8Array; -exports.readTerminatedString = readTerminatedString; -exports.readTerminatedUint8Array = readTerminatedUint8Array; -exports.readUint16 = readUint16; -exports.readUint32 = readUint32; -exports.readUint32BigEndian = readUint32BigEndian; -exports.readUint8 = readUint8; -exports.readUint8Array = readUint8Array; -exports.readVarInt = readVarInt; -exports.readVarString = readVarString; -exports.readVarUint = readVarUint; -exports.readVarUint8Array = readVarUint8Array; -exports.skip8 = skip8; -//# sourceMappingURL=decoding-76e75827.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding-76e75827.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding-76e75827.cjs.map deleted file mode 100644 index 96eba52..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding-76e75827.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decoding-76e75827.cjs","sources":["../decoding.js"],"sourcesContent":["/**\n * Efficient schema-less binary decoding with support for variable length encoding.\n *\n * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n *\n * @module decoding\n */\n\nimport * as binary from './binary.js'\nimport * as math from './math.js'\nimport * as number from './number.js'\nimport * as string from './string.js'\nimport * as error from './error.js'\nimport * as encoding from './encoding.js'\n\nconst errorUnexpectedEndOfArray = error.create('Unexpected end of array')\nconst errorIntegerOutOfRange = error.create('Integer out of Range')\n\n/**\n * A Decoder handles the decoding of an Uint8Array.\n * @template {ArrayBufferLike} [Buf=ArrayBufferLike]\n */\nexport class Decoder {\n /**\n * @param {Uint8Array} uint8Array Binary data to decode\n */\n constructor (uint8Array) {\n /**\n * Decoding target.\n *\n * @type {Uint8Array}\n */\n this.arr = uint8Array\n /**\n * Current decoding position.\n *\n * @type {number}\n */\n this.pos = 0\n }\n}\n\n/**\n * @function\n * @template {ArrayBufferLike} Buf\n * @param {Uint8Array} uint8Array\n * @return {Decoder}\n */\nexport const createDecoder = uint8Array => new Decoder(uint8Array)\n\n/**\n * @function\n * @param {Decoder} decoder\n * @return {boolean}\n */\nexport const hasContent = decoder => decoder.pos !== decoder.arr.length\n\n/**\n * Clone a decoder instance.\n * Optionally set a new position parameter.\n *\n * @function\n * @param {Decoder} decoder The decoder instance\n * @param {number} [newPos] Defaults to current position\n * @return {Decoder} A clone of `decoder`\n */\nexport const clone = (decoder, newPos = decoder.pos) => {\n const _decoder = createDecoder(decoder.arr)\n _decoder.pos = newPos\n return _decoder\n}\n\n/**\n * Create an Uint8Array view of the next `len` bytes and advance the position by `len`.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n *\n * @function\n * @template {ArrayBufferLike} Buf\n * @param {Decoder} decoder The decoder instance\n * @param {number} len The length of bytes to read\n * @return {Uint8Array}\n */\nexport const readUint8Array = (decoder, len) => {\n const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len)\n decoder.pos += len\n return view\n}\n\n/**\n * Read variable length Uint8Array.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n *\n * @function\n * @template {ArrayBufferLike} Buf\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readVarUint8Array = decoder => readUint8Array(decoder, readVarUint(decoder))\n\n/**\n * Read the rest of the content as an ArrayBuffer\n * @function\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readTailAsUint8Array = decoder => readUint8Array(decoder, decoder.arr.length - decoder.pos)\n\n/**\n * Skip one byte, jump to the next position.\n * @function\n * @param {Decoder} decoder The decoder instance\n * @return {number} The next position\n */\nexport const skip8 = decoder => decoder.pos++\n\n/**\n * Read one byte as unsigned integer.\n * @function\n * @param {Decoder} decoder The decoder instance\n * @return {number} Unsigned 8-bit integer\n */\nexport const readUint8 = decoder => decoder.arr[decoder.pos++]\n\n/**\n * Read 2 bytes as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint16 = decoder => {\n const uint =\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8)\n decoder.pos += 2\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint32 = decoder => {\n const uint =\n (decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8) +\n (decoder.arr[decoder.pos + 2] << 16) +\n (decoder.arr[decoder.pos + 3] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer in big endian order.\n * (most significant byte first)\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const readUint32BigEndian = decoder => {\n const uint =\n (decoder.arr[decoder.pos + 3] +\n (decoder.arr[decoder.pos + 2] << 8) +\n (decoder.arr[decoder.pos + 1] << 16) +\n (decoder.arr[decoder.pos] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint8 = decoder => decoder.arr[decoder.pos]\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint16 = decoder =>\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8)\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.\n */\nexport const peekUint32 = decoder => (\n decoder.arr[decoder.pos] +\n (decoder.arr[decoder.pos + 1] << 8) +\n (decoder.arr[decoder.pos + 2] << 16) +\n (decoder.arr[decoder.pos + 3] << 24)\n) >>> 0\n\n/**\n * Read unsigned integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * * numbers < 2^7 is stored in one bytlength\n * * numbers < 2^14 is stored in two bylength\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.length\n */\nexport const readVarUint = decoder => {\n let num = 0\n let mult = 1\n const len = decoder.arr.length\n while (decoder.pos < len) {\n const r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & binary.BITS7) * mult // shift $r << (7*#iterations) and add it to num\n mult *= 128 // next iteration, shift 7 \"more\" to the left\n if (r < binary.BIT8) {\n return num\n }\n /* c8 ignore start */\n if (num > number.MAX_SAFE_INTEGER) {\n throw errorIntegerOutOfRange\n }\n /* c8 ignore stop */\n }\n throw errorUnexpectedEndOfArray\n}\n\n/**\n * Read signed integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * * numbers < 2^7 is stored in one bytlength\n * * numbers < 2^14 is stored in two bylength\n * @todo This should probably create the inverse ~num if number is negative - but this would be a breaking change.\n *\n * @function\n * @param {Decoder} decoder\n * @return {number} An unsigned integer.length\n */\nexport const readVarInt = decoder => {\n let r = decoder.arr[decoder.pos++]\n let num = r & binary.BITS6\n let mult = 64\n const sign = (r & binary.BIT7) > 0 ? -1 : 1\n if ((r & binary.BIT8) === 0) {\n // don't continue reading\n return sign * num\n }\n const len = decoder.arr.length\n while (decoder.pos < len) {\n r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & binary.BITS7) * mult\n mult *= 128\n if (r < binary.BIT8) {\n return sign * num\n }\n /* c8 ignore start */\n if (num > number.MAX_SAFE_INTEGER) {\n throw errorIntegerOutOfRange\n }\n /* c8 ignore stop */\n }\n throw errorUnexpectedEndOfArray\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {number}\n */\nexport const peekVarUint = decoder => {\n const pos = decoder.pos\n const s = readVarUint(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {number}\n */\nexport const peekVarInt = decoder => {\n const pos = decoder.pos\n const s = readVarInt(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * We don't test this function anymore as we use native decoding/encoding by default now.\n * Better not modify this anymore..\n *\n * Transforming utf8 to a string is pretty expensive. The code performs 10x better\n * when String.fromCodePoint is fed with all characters as arguments.\n * But most environments have a maximum number of arguments per functions.\n * For effiency reasons we apply a maximum of 10000 characters at once.\n *\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String.\n */\n/* c8 ignore start */\nexport const _readVarStringPolyfill = decoder => {\n let remainingLen = readVarUint(decoder)\n if (remainingLen === 0) {\n return ''\n } else {\n let encodedString = String.fromCodePoint(readUint8(decoder)) // remember to decrease remainingLen\n if (--remainingLen < 100) { // do not create a Uint8Array for small strings\n while (remainingLen--) {\n encodedString += String.fromCodePoint(readUint8(decoder))\n }\n } else {\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n // this is dangerous, we create a fresh array view from the existing buffer\n const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen)\n decoder.pos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes))\n remainingLen -= nextLen\n }\n }\n return decodeURIComponent(escape(encodedString))\n }\n}\n/* c8 ignore stop */\n\n/**\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String\n */\nexport const _readVarStringNative = decoder =>\n /** @type any */ (string.utf8TextDecoder).decode(readVarUint8Array(decoder))\n\n/**\n * Read string of variable length\n * * varUint is used to store the length of the string\n *\n * @function\n * @param {Decoder} decoder\n * @return {String} The read String\n *\n */\n/* c8 ignore next */\nexport const readVarString = string.utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill\n\n/**\n * @param {Decoder} decoder\n * @return {Uint8Array}\n */\nexport const readTerminatedUint8Array = decoder => {\n const encoder = encoding.createEncoder()\n let b\n while (true) {\n b = readUint8(decoder)\n if (b === 0) {\n return encoding.toUint8Array(encoder)\n }\n if (b === 1) {\n b = readUint8(decoder)\n }\n encoding.write(encoder, b)\n }\n}\n\n/**\n * @param {Decoder} decoder\n * @return {string}\n */\nexport const readTerminatedString = decoder => string.decodeUtf8(readTerminatedUint8Array(decoder))\n\n/**\n * Look ahead and read varString without incrementing position\n *\n * @function\n * @param {Decoder} decoder\n * @return {string}\n */\nexport const peekVarString = decoder => {\n const pos = decoder.pos\n const s = readVarString(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * @param {Decoder} decoder\n * @param {number} len\n * @return {DataView}\n */\nexport const readFromDataView = (decoder, len) => {\n const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len)\n decoder.pos += len\n return dv\n}\n\n/**\n * @param {Decoder} decoder\n */\nexport const readFloat32 = decoder => readFromDataView(decoder, 4).getFloat32(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readFloat64 = decoder => readFromDataView(decoder, 8).getFloat64(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readBigInt64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigInt64(0, false)\n\n/**\n * @param {Decoder} decoder\n */\nexport const readBigUint64 = decoder => /** @type {any} */ (readFromDataView(decoder, 8)).getBigUint64(0, false)\n\n/**\n * @type {Array}\n */\nconst readAnyLookupTable = [\n decoder => undefined, // CASE 127: undefined\n decoder => null, // CASE 126: null\n readVarInt, // CASE 125: integer\n readFloat32, // CASE 124: float32\n readFloat64, // CASE 123: float64\n readBigInt64, // CASE 122: bigint\n decoder => false, // CASE 121: boolean (false)\n decoder => true, // CASE 120: boolean (true)\n readVarString, // CASE 119: string\n decoder => { // CASE 118: object\n const len = readVarUint(decoder)\n /**\n * @type {Object}\n */\n const obj = {}\n for (let i = 0; i < len; i++) {\n const key = readVarString(decoder)\n obj[key] = readAny(decoder)\n }\n return obj\n },\n decoder => { // CASE 117: array\n const len = readVarUint(decoder)\n const arr = []\n for (let i = 0; i < len; i++) {\n arr.push(readAny(decoder))\n }\n return arr\n },\n readVarUint8Array // CASE 116: Uint8Array\n]\n\n/**\n * @param {Decoder} decoder\n */\nexport const readAny = decoder => readAnyLookupTable[127 - readUint8(decoder)](decoder)\n\n/**\n * T must not be null.\n *\n * @template T\n */\nexport class RleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {function(Decoder):T} reader\n */\n constructor (uint8Array, reader) {\n super(uint8Array)\n /**\n * The reader\n */\n this.reader = reader\n /**\n * Current state\n * @type {T|null}\n */\n this.s = null\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = this.reader(this)\n if (hasContent(this)) {\n this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented\n } else {\n this.count = -1 // read the current value forever\n }\n }\n this.count--\n return /** @type {T} */ (this.s)\n }\n}\n\nexport class IntDiffDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {number} start\n */\n constructor (uint8Array, start) {\n super(uint8Array)\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n }\n\n /**\n * @return {number}\n */\n read () {\n this.s += readVarInt(this)\n return this.s\n }\n}\n\nexport class RleIntDiffDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n * @param {number} start\n */\n constructor (uint8Array, start) {\n super(uint8Array)\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n this.count = 0\n }\n\n /**\n * @return {number}\n */\n read () {\n if (this.count === 0) {\n this.s += readVarInt(this)\n if (hasContent(this)) {\n this.count = readVarUint(this) + 1 // see encoder implementation for the reason why this is incremented\n } else {\n this.count = -1 // read the current value forever\n }\n }\n this.count--\n return /** @type {number} */ (this.s)\n }\n}\n\nexport class UintOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = readVarInt(this)\n // if the sign is negative, we read the count too, otherwise count is 1\n const isNegative = math.isNegativeZero(this.s)\n this.count = 1\n if (isNegative) {\n this.s = -this.s\n this.count = readVarUint(this) + 2\n }\n }\n this.count--\n return /** @type {number} */ (this.s)\n }\n}\n\nexport class IncUintOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n read () {\n if (this.count === 0) {\n this.s = readVarInt(this)\n // if the sign is negative, we read the count too, otherwise count is 1\n const isNegative = math.isNegativeZero(this.s)\n this.count = 1\n if (isNegative) {\n this.s = -this.s\n this.count = readVarUint(this) + 2\n }\n }\n this.count--\n return /** @type {number} */ (this.s++)\n }\n}\n\nexport class IntDiffOptRleDecoder extends Decoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n super(uint8Array)\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n this.diff = 0\n }\n\n /**\n * @return {number}\n */\n read () {\n if (this.count === 0) {\n const diff = readVarInt(this)\n // if the first bit is set, we read more data\n const hasCount = diff & 1\n this.diff = math.floor(diff / 2) // shift >> 1\n this.count = 1\n if (hasCount) {\n this.count = readVarUint(this) + 2\n }\n }\n this.s += this.diff\n this.count--\n return this.s\n }\n}\n\nexport class StringDecoder {\n /**\n * @param {Uint8Array} uint8Array\n */\n constructor (uint8Array) {\n this.decoder = new UintOptRleDecoder(uint8Array)\n this.str = readVarString(this.decoder)\n /**\n * @type {number}\n */\n this.spos = 0\n }\n\n /**\n * @return {string}\n */\n read () {\n const end = this.spos + this.decoder.read()\n const res = this.str.slice(this.spos, end)\n this.spos = end\n return res\n }\n}\n"],"names":["error.create","binary.BITS7","binary.BIT8","number.MAX_SAFE_INTEGER","binary.BITS6","binary.BIT7","string.utf8TextDecoder","encoding.createEncoder","encoding.toUint8Array","encoding.write","string.decodeUtf8","math.isNegativeZero","math.floor"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA,MAAM,y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UAAU,EAAE;AAC3B,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAC;AACpD,IAAI,IAAI,CAAC,GAAG,GAAG,aAAa,CAAC,IAAI,CAAC,OAAO,EAAC;AAC1C;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,GAAG,EAAC;AACjB,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE,IAAI,CAAC,GAAG;AACV,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,GAAE;AAC/C,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAC;AAC9C,IAAI,IAAI,CAAC,IAAI,GAAG,IAAG;AACnB,IAAI,OAAO,GAAG;AACd,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.cjs deleted file mode 100644 index 988b235..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.cjs +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./binary-ac8e39e2.cjs'); -require('./math-96d5e8c4.cjs'); -require('./number-1fb57bba.cjs'); -require('./string-fddc5f8b.cjs'); -require('./error-0c1f634f.cjs'); -require('./encoding-1a745c43.cjs'); -var decoding = require('./decoding-76e75827.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); - - - -exports.Decoder = decoding.Decoder; -exports.IncUintOptRleDecoder = decoding.IncUintOptRleDecoder; -exports.IntDiffDecoder = decoding.IntDiffDecoder; -exports.IntDiffOptRleDecoder = decoding.IntDiffOptRleDecoder; -exports.RleDecoder = decoding.RleDecoder; -exports.RleIntDiffDecoder = decoding.RleIntDiffDecoder; -exports.StringDecoder = decoding.StringDecoder; -exports.UintOptRleDecoder = decoding.UintOptRleDecoder; -exports._readVarStringNative = decoding._readVarStringNative; -exports._readVarStringPolyfill = decoding._readVarStringPolyfill; -exports.clone = decoding.clone; -exports.createDecoder = decoding.createDecoder; -exports.hasContent = decoding.hasContent; -exports.peekUint16 = decoding.peekUint16; -exports.peekUint32 = decoding.peekUint32; -exports.peekUint8 = decoding.peekUint8; -exports.peekVarInt = decoding.peekVarInt; -exports.peekVarString = decoding.peekVarString; -exports.peekVarUint = decoding.peekVarUint; -exports.readAny = decoding.readAny; -exports.readBigInt64 = decoding.readBigInt64; -exports.readBigUint64 = decoding.readBigUint64; -exports.readFloat32 = decoding.readFloat32; -exports.readFloat64 = decoding.readFloat64; -exports.readFromDataView = decoding.readFromDataView; -exports.readTailAsUint8Array = decoding.readTailAsUint8Array; -exports.readTerminatedString = decoding.readTerminatedString; -exports.readTerminatedUint8Array = decoding.readTerminatedUint8Array; -exports.readUint16 = decoding.readUint16; -exports.readUint32 = decoding.readUint32; -exports.readUint32BigEndian = decoding.readUint32BigEndian; -exports.readUint8 = decoding.readUint8; -exports.readUint8Array = decoding.readUint8Array; -exports.readVarInt = decoding.readVarInt; -exports.readVarString = decoding.readVarString; -exports.readVarUint = decoding.readVarUint; -exports.readVarUint8Array = decoding.readVarUint8Array; -exports.skip8 = decoding.skip8; -//# sourceMappingURL=decoding.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.cjs.map deleted file mode 100644 index 85f4368..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decoding.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.d.ts deleted file mode 100644 index 4eff347..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.d.ts +++ /dev/null @@ -1,165 +0,0 @@ -/** - * A Decoder handles the decoding of an Uint8Array. - * @template {ArrayBufferLike} [Buf=ArrayBufferLike] - */ -export class Decoder { - /** - * @param {Uint8Array} uint8Array Binary data to decode - */ - constructor(uint8Array: Uint8Array); - /** - * Decoding target. - * - * @type {Uint8Array} - */ - arr: Uint8Array; - /** - * Current decoding position. - * - * @type {number} - */ - pos: number; -} -export function createDecoder(uint8Array: Uint8Array): Decoder; -export function hasContent(decoder: Decoder): boolean; -export function clone(decoder: Decoder, newPos?: number): Decoder; -export function readUint8Array(decoder: Decoder, len: number): Uint8Array; -export function readVarUint8Array(decoder: Decoder): Uint8Array; -export function readTailAsUint8Array(decoder: Decoder): Uint8Array; -export function skip8(decoder: Decoder): number; -export function readUint8(decoder: Decoder): number; -export function readUint16(decoder: Decoder): number; -export function readUint32(decoder: Decoder): number; -export function readUint32BigEndian(decoder: Decoder): number; -export function peekUint8(decoder: Decoder): number; -export function peekUint16(decoder: Decoder): number; -export function peekUint32(decoder: Decoder): number; -export function readVarUint(decoder: Decoder): number; -export function readVarInt(decoder: Decoder): number; -export function peekVarUint(decoder: Decoder): number; -export function peekVarInt(decoder: Decoder): number; -export function _readVarStringPolyfill(decoder: Decoder): string; -export function _readVarStringNative(decoder: Decoder): string; -export function readVarString(decoder: Decoder): string; -export function readTerminatedUint8Array(decoder: Decoder): Uint8Array; -export function readTerminatedString(decoder: Decoder): string; -export function peekVarString(decoder: Decoder): string; -export function readFromDataView(decoder: Decoder, len: number): DataView; -export function readFloat32(decoder: Decoder): number; -export function readFloat64(decoder: Decoder): number; -export function readBigInt64(decoder: Decoder): any; -export function readBigUint64(decoder: Decoder): any; -export function readAny(decoder: Decoder): any; -/** - * T must not be null. - * - * @template T - */ -export class RleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {function(Decoder):T} reader - */ - constructor(uint8Array: Uint8Array, reader: (arg0: Decoder) => T); - /** - * The reader - */ - reader: (arg0: Decoder) => T; - /** - * Current state - * @type {T|null} - */ - s: T | null; - count: number; - read(): T; -} -export class IntDiffDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {number} start - */ - constructor(uint8Array: Uint8Array, start: number); - /** - * Current state - * @type {number} - */ - s: number; - /** - * @return {number} - */ - read(): number; -} -export class RleIntDiffDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - * @param {number} start - */ - constructor(uint8Array: Uint8Array, start: number); - /** - * Current state - * @type {number} - */ - s: number; - count: number; - /** - * @return {number} - */ - read(): number; -} -export class UintOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor(uint8Array: Uint8Array); - /** - * @type {number} - */ - s: number; - count: number; - read(): number; -} -export class IncUintOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor(uint8Array: Uint8Array); - /** - * @type {number} - */ - s: number; - count: number; - read(): number; -} -export class IntDiffOptRleDecoder extends Decoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor(uint8Array: Uint8Array); - /** - * @type {number} - */ - s: number; - count: number; - diff: number; - /** - * @return {number} - */ - read(): number; -} -export class StringDecoder { - /** - * @param {Uint8Array} uint8Array - */ - constructor(uint8Array: Uint8Array); - decoder: UintOptRleDecoder; - str: string; - /** - * @type {number} - */ - spos: number; - /** - * @return {string} - */ - read(): string; -} -//# sourceMappingURL=decoding.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.d.ts.map deleted file mode 100644 index e662563..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/decoding.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decoding.d.ts","sourceRoot":"","sources":["../decoding.js"],"names":[],"mappings":"AAsCA;;;GAGG;AACH,qBAFgC,GAAG,SAArB,eAAgB;IAG5B;;OAEG;IACH,wBAFW,UAAU,CAAC,GAAG,CAAC,EAezB;IAZC;;;;OAIG;IACH,KAFU,UAAU,CAAC,GAAG,CAAC,CAEJ;IACrB;;;;OAIG;IACH,KAFU,MAAM,CAEJ;CAEf;AAQM,8BAJwB,GAAG,SAApB,eAAgB,cACnB,UAAU,CAAC,GAAG,CAAC,GACd,OAAO,CAAC,GAAG,CAAC,CAE0C;AAO3D,oCAHI,OAAO,GACN,OAAO,CAEoD;AAWhE,+BAJI,OAAO,WACP,MAAM,GACL,OAAO,CAMlB;AAcM,+BALwB,GAAG,SAApB,eAAgB,WACnB,OAAO,CAAC,GAAG,CAAC,OACZ,MAAM,GACL,UAAU,CAAC,GAAG,CAAC,CAM1B;AAaM,kCAJwB,GAAG,SAApB,eAAgB,WACnB,OAAO,CAAC,GAAG,CAAC,GACX,UAAU,CAAC,GAAG,CAAC,CAE8D;AAQlF,8CAHI,OAAO,GACN,UAAU,CAEkF;AAQjG,+BAHI,OAAO,GACN,MAAM,CAE2B;AAQtC,mCAHI,OAAO,GACN,MAAM,CAE4C;AASvD,oCAHI,OAAO,GACN,MAAM,CAQjB;AASM,oCAHI,OAAO,GACN,MAAM,CAUjB;AAUM,6CAHI,OAAO,GACN,MAAM,CAUjB;AAUM,mCAHI,OAAO,GACN,MAAM,CAE0C;AAUrD,oCAHI,OAAO,GACN,MAAM,CAImB;AAU9B,oCAHI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wBAFW,UAAU,EASpB;IALC;;OAEG;IACH,GAFU,MAAM,CAEN;IACV,cAAc;IAGhB,QAYoB,MAAM,CACzB;CACF;AAED;IACE;;OAEG;IACH,wBAFW,UAAU,EAUpB;IANC;;OAEG;IACH,GAFU,MAAM,CAEN;IACV,cAAc;IACd,aAAa;IAGf;;OAEG;IACH,QAFY,MAAM,CAgBjB;CACF;AAED;IACE;;OAEG;IACH,wBAFW,UAAU,EASpB;IANC,2BAAgD;IAChD,YAAsC;IACtC;;OAEG;IACH,MAFU,MAAM,CAEH;IAGf;;OAEG;IACH,QAFY,MAAM,CAOjB;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta.cjs deleted file mode 100644 index 3ca0986..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta.cjs +++ /dev/null @@ -1,2412 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var list = require('./list.cjs'); -var object = require('./object-c0c9435b.cjs'); -var equality = require('./equality.cjs'); -var fingerprint = require('./fingerprint.cjs'); -var array$1 = require('./array-78849c95.cjs'); -var _function = require('./function-314580f7.cjs'); -var schema = require('./schema.cjs'); -var error = require('./error-0c1f634f.cjs'); -var math = require('./math-96d5e8c4.cjs'); -var rabin = require('./rabin.cjs'); -var encoding = require('./encoding-1a745c43.cjs'); -var buffer = require('./buffer-3e750729.cjs'); -var patience = require('./patience.cjs'); -var prng = require('./prng-37d48618.cjs'); -require('./set-5b47859e.cjs'); -require('./environment-1c97264d.cjs'); -require('./map-24d263c0.cjs'); -require('./string-fddc5f8b.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./decoding-76e75827.cjs'); - -/** - * @beta this API is about to change - * - * ## Mutability - * - * Deltas are mutable by default. But references are often shared, by marking a Delta as "done". You - * may only modify deltas by applying other deltas to them. Casting a Delta to a DeltaBuilder - * manually, will likely modify "shared" state. - */ - -/** - * @typedef {{ - * insert?: string[] - * insertAt?: number - * delete?: string[] - * deleteAt?: number - * format?: Record - * formatAt?: number - * }} Attribution - */ - -/** - * @type {s.Schema} - */ -const $attribution = schema.$object({ - insert: schema.$array(schema.$string).optional, - insertAt: schema.$number.optional, - delete: schema.$array(schema.$string).optional, - deleteAt: schema.$number.optional, - format: schema.$record(schema.$string, schema.$array(schema.$string)).optional, - formatAt: schema.$number.optional -}); - -/** - * @typedef {s.Unwrap<$anyOp>} DeltaOps - */ - -/** - * @typedef {{ [key: string]: any }} FormattingAttributes - */ - -/** - * @typedef {{ - * type: 'delta', - * name?: string, - * attrs?: { [Key in string|number]: DeltaAttrOpJSON }, - * children?: Array - * }} DeltaJSON - */ - -/** - * @typedef {{ type: 'insert', insert: string|Array, format?: { [key: string]: any }, attribution?: Attribution } | { delete: number } | { type: 'retain', retain: number, format?: { [key:string]: any }, attribution?: Attribution } | { type: 'modify', value: object }} DeltaListOpJSON - */ - -/** - * @typedef {{ type: 'insert', value: any, prevValue?: any, attribution?: Attribution } | { type: 'delete', prevValue?: any, attribution?: Attribution } | { type: 'modify', value: DeltaJSON }} DeltaAttrOpJSON - */ - -/** - * @typedef {TextOp|InsertOp|DeleteOp|RetainOp|ModifyOp} ChildrenOpAny - */ - -/** - * @typedef {AttrInsertOp|AttrDeleteOp|AttrModifyOp} AttrOpAny - */ - -/** - * @typedef {ChildrenOpAny|AttrOpAny} _OpAny - */ - -/** - * @type {s.Schema} - */ -const $deltaMapChangeJson = schema.$union( - schema.$object({ type: schema.$literal('insert'), value: schema.$any, prevValue: schema.$any.optional, attribution: $attribution.optional }), - schema.$object({ type: schema.$literal('modify'), value: schema.$any }), - schema.$object({ type: schema.$literal('delete'), prevValue: schema.$any.optional, attribution: $attribution.optional }) -); - -/** - * @template {{[key:string]: any} | null} Attrs - * @param {Attrs} attrs - * @return {Attrs} - */ -const _cloneAttrs = attrs => attrs == null ? attrs : { ...attrs }; -/** - * @template {any} MaybeDelta - * @param {MaybeDelta} maybeDelta - * @return {MaybeDelta} - */ -const _markMaybeDeltaAsDone = maybeDelta => $deltaAny.check(maybeDelta) ? /** @type {MaybeDelta} */ (maybeDelta.done()) : maybeDelta; - -class TextOp extends list.ListNode { - /** - * @param {string} insert - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor (insert, format, attribution) { - super(); - // Whenever this is modified, make sure to clear _fingerprint - /** - * @readonly - * @type {string} - */ - this.insert = insert; - /** - * @readonly - * @type {FormattingAttributes|null} - */ - this.format = format; - this.attribution = attribution; - /** - * @type {string?} - */ - this._fingerprint = null; - } - - /** - * @param {string} newVal - */ - _updateInsert (newVal) { - // @ts-ignore - this.insert = newVal; - this._fingerprint = null; - } - - /** - * @return {'insert'} - */ - get type () { - return 'insert' - } - - get length () { - return this.insert.length - } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 0); // textOp type: 0 - encoding.writeVarString(encoder, this.insert); - encoding.writeAny(encoder, this.format); - }))) - } - - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} offset - * @param {number} len - */ - _splice (offset, len) { - this._fingerprint = null; - // @ts-ignore - this.insert = this.insert.slice(0, offset) + this.insert.slice(offset + len); - return this - } - - /** - * @return {DeltaListOpJSON} - */ - toJSON () { - const { insert, format, attribution } = this; - return object.assign(/** @type {{type: 'insert', insert: string}} */ ({ type: 'insert', insert }), format != null ? { format } : ({}), attribution != null ? { attribution } : ({})) - } - - /** - * @param {TextOp} other - */ - [equality.EqualityTraitSymbol] (other) { - return _function.equalityDeep(this.insert, other.insert) && _function.equalityDeep(this.format, other.format) && _function.equalityDeep(this.attribution, other.attribution) - } - - /** - * @return {TextOp} - */ - clone (start = 0, end = this.length) { - return new TextOp(this.insert.slice(start, end), _cloneAttrs(this.format), _cloneAttrs(this.attribution)) - } -} - -/** - * @template {fingerprintTrait.Fingerprintable} ArrayContent - */ -class InsertOp extends list.ListNode { - /** - * @param {Array} insert - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor (insert, format, attribution) { - super(); - /** - * @readonly - * @type {Array} - */ - this.insert = insert; - /** - * @readonly - * @type {FormattingAttributes?} - */ - this.format = format; - /** - * @readonly - * @type {Attribution?} - */ - this.attribution = attribution; - /** - * @type {string?} - */ - this._fingerprint = null; - } - - /** - * @param {ArrayContent} newVal - */ - _updateInsert (newVal) { - // @ts-ignore - this.insert = newVal; - this._fingerprint = null; - } - - /** - * @return {'insert'} - */ - get type () { - return 'insert' - } - - get length () { - return this.insert.length - } - - /** - * @param {number} i - * @return {Extract} - */ - _modValue (i) { - /** - * @type {any} - */ - let d = this.insert[i]; - this._fingerprint = null; - $deltaAny.expect(d); - if (d.isDone) { - // @ts-ignore - this.insert[i] = (d = clone(d)); - return d - } - return d - } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 1); // insertOp type: 1 - encoding.writeVarUint(encoder, this.insert.length); - this.insert.forEach(ins => { - encoding.writeVarString(encoder, fingerprint.fingerprint(ins)); - }); - encoding.writeAny(encoder, this.format); - }))) - } - - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} offset - * @param {number} len - */ - _splice (offset, len) { - this._fingerprint = null; - this.insert.splice(offset, len); - return this - } - - /** - * @return {DeltaListOpJSON} - */ - toJSON () { - const { insert, format, attribution } = this; - return object.assign({ type: /** @type {'insert'} */ ('insert'), insert: insert.map(ins => $deltaAny.check(ins) ? ins.toJSON() : ins) }, format ? { format } : ({}), attribution != null ? { attribution } : ({})) - } - - /** - * @param {InsertOp} other - */ - [equality.EqualityTraitSymbol] (other) { - return _function.equalityDeep(this.insert, other.insert) && _function.equalityDeep(this.format, other.format) && _function.equalityDeep(this.attribution, other.attribution) - } - - /** - * @return {InsertOp} - */ - clone (start = 0, end = this.length) { - return new InsertOp(this.insert.slice(start, end).map(_markMaybeDeltaAsDone), _cloneAttrs(this.format), _cloneAttrs(this.attribution)) - } -} - -/** - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - */ -class DeleteOp extends list.ListNode { - /** - * @param {number} len - */ - constructor (len) { - super(); - this.delete = len; - /** - * @type {(Children|Text) extends never ? null : (Delta?)} - */ - this.prevValue = null; - /** - * @type {string|null} - */ - this._fingerprint = null; - } - - /** - * @return {'delete'} - */ - get type () { - return 'delete' - } - - get length () { - return 0 - } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 2); // deleteOp type: 2 - encoding.writeVarUint(encoder, this.delete); - }))) - } - - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} len - */ - _splice (_offset, len) { - this.prevValue = /** @type {any} */ (this.prevValue?.slice(_offset, len) || null); - this._fingerprint = null; - this.delete -= len; - return this - } - - /** - * @return {DeltaListOpJSON} - */ - toJSON () { - return { delete: this.delete } - } - - /** - * @param {DeleteOp} other - */ - [equality.EqualityTraitSymbol] (other) { - return this.delete === other.delete - } - - clone (start = 0, end = this.delete) { - return new DeleteOp(end - start) - } -} - -class RetainOp extends list.ListNode { - /** - * @param {number} retain - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor (retain, format, attribution) { - super(); - /** - * @readonly - * @type {number} - */ - this.retain = retain; - /** - * @readonly - * @type {FormattingAttributes?} - */ - this.format = format; - /** - * @readonly - * @type {Attribution?} - */ - this.attribution = attribution; - /** - * @type {string|null} - */ - this._fingerprint = null; - } - - /** - * @return {'retain'} - */ - get type () { - return 'retain' - } - - get length () { - return this.retain - } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 3); // retainOp type: 3 - encoding.writeVarUint(encoder, this.retain); - encoding.writeAny(encoder, this.format); - }))) - } - - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} len - */ - _splice (_offset, len) { - // @ts-ignore - this.retain -= len; - this._fingerprint = null; - return this - } - - /** - * @return {DeltaListOpJSON} - */ - toJSON () { - const { retain, format, attribution } = this; - return object.assign({ type: /** @type {'retain'} */ ('retain'), retain }, format ? { format } : {}, attribution != null ? { attribution } : {}) - } - - /** - * @param {RetainOp} other - */ - [equality.EqualityTraitSymbol] (other) { - return this.retain === other.retain && _function.equalityDeep(this.format, other.format) && _function.equalityDeep(this.attribution, other.attribution) - } - - clone (start = 0, end = this.retain) { - return new RetainOp(end - start, _cloneAttrs(this.format), _cloneAttrs(this.attribution)) - } -} - -/** - * Delta that can be applied on a YType Embed - * - * @template {DeltaAny} [DTypes=DeltaAny] - */ -class ModifyOp extends list.ListNode { - /** - * @param {DTypes} delta - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor (delta, format, attribution) { - super(); - /** - * @readonly - * @type {DTypes} - */ - this.value = delta; - /** - * @readonly - * @type {FormattingAttributes?} - */ - this.format = format; - /** - * @readonly - * @type {Attribution?} - */ - this.attribution = attribution; - /** - * @type {string|null} - */ - this._fingerprint = null; - } - - /** - * @return {'modify'} - */ - get type () { - return 'modify' - } - - get length () { - return 1 - } - - /** - * @type {DeltaBuilderAny} - */ - get _modValue () { - /** - * @type {any} - */ - const d = this.value; - this._fingerprint = null; - if (d.isDone) { - // @ts-ignore - return (this.value = clone(d)) - } - return d - } - - get fingerprint () { - // don't cache fingerprint because we don't know when delta changes - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 4); // modifyOp type: 4 - encoding.writeVarString(encoder, this.value.fingerprint); - encoding.writeAny(encoder, this.format); - }))) - } - - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} _len - */ - _splice (_offset, _len) { - return this - } - - /** - * @return {DeltaListOpJSON} - */ - toJSON () { - const { value, attribution, format } = this; - return object.assign({ type: /** @type {'modify'} */ ('modify'), value: value.toJSON() }, format ? { format } : {}, attribution != null ? { attribution } : {}) - } - - /** - * @param {ModifyOp} other - */ - [equality.EqualityTraitSymbol] (other) { - return this.value[equality.EqualityTraitSymbol](other.value) && _function.equalityDeep(this.format, other.format) && _function.equalityDeep(this.attribution, other.attribution) - } - - /** - * @return {ModifyOp} - */ - clone () { - return new ModifyOp(/** @type {DTypes} */ (this.value.done()), _cloneAttrs(this.format), _cloneAttrs(this.attribution)) - } -} - -/** - * @template {fingerprintTrait.Fingerprintable} V - * @template {string|number} [K=any] - */ -class AttrInsertOp { - /** - * @param {K} key - * @param {V} value - * @param {V|undefined} prevValue - * @param {Attribution?} attribution - */ - constructor (key, value, prevValue, attribution) { - /** - * @readonly - * @type {K} - */ - this.key = key; - /** - * @readonly - * @type {V} - */ - this.value = value; - /** - * @readonly - * @type {V|undefined} - */ - this.prevValue = prevValue; - /** - * @readonly - * @type {Attribution?} - */ - this.attribution = attribution; - /** - * @type {string|null} - */ - this._fingerprint = null; - } - - /** - * @return {'insert'} - */ - get type () { return 'insert' } - - /** - * @type {DeltaBuilderAny} - */ - get _modValue () { - /** - * @type {any} - */ - const v = this.value; - this._fingerprint = null; - if ($deltaAny.check(v) && v.isDone) { - // @ts-ignore - return (this.value = clone(v)) - } - return v - } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 5); // map insert type: 5 - encoding.writeAny(encoder, this.key); - if ($deltaAny.check(this.value)) { - encoding.writeUint8(encoder, 0); - encoding.writeVarString(encoder, this.value.fingerprint); - } else { - encoding.writeUint8(encoder, 1); - encoding.writeAny(encoder, this.value); - } - }))) - } - - toJSON () { - const v = this.value; - const prevValue = this.prevValue; - const attribution = this.attribution; - return object.assign({ - type: this.type, - value: $deltaAny.check(v) ? v.toJSON() : v - }, attribution != null ? { attribution } : {}, prevValue !== undefined ? { prevValue } : {}) - } - - /** - * @param {AttrInsertOp} other - */ - [equality.EqualityTraitSymbol] (other) { - return this.key === other.key && _function.equalityDeep(this.value, other.value) && _function.equalityDeep(this.attribution, other.attribution) - } - - /** - * @return {AttrInsertOp} - */ - clone () { - return new AttrInsertOp(this.key, _markMaybeDeltaAsDone(this.value), _markMaybeDeltaAsDone(this.prevValue), _cloneAttrs(this.attribution)) - } -} - -/** - * @template V - * @template {string|number} [K=string] - */ -class AttrDeleteOp { - /** - * @param {K} key - * @param {V|undefined} prevValue - * @param {Attribution?} attribution - */ - constructor (key, prevValue, attribution) { - /** - * @type {K} - */ - this.key = key; - /** - * @type {V|undefined} - */ - this.prevValue = prevValue; - this.attribution = attribution; - /** - * @type {string|null} - */ - this._fingerprint = null; - } - - get value () { return undefined } - - /** - * @type {'delete'} - */ - get type () { return 'delete' } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 6); // map delete type: 6 - encoding.writeAny(encoder, this.key); - }))) - } - - /** - * @return {DeltaAttrOpJSON} - */ - toJSON () { - const { - type, attribution, prevValue - } = this; - return object.assign({ type }, attribution != null ? { attribution } : {}, prevValue !== undefined ? { prevValue } : {}) - } - - /** - * @param {AttrDeleteOp} other - */ - [equality.EqualityTraitSymbol] (other) { - return this.key === other.key && _function.equalityDeep(this.attribution, other.attribution) - } - - clone () { - return new AttrDeleteOp(this.key, _markMaybeDeltaAsDone(this.prevValue), _cloneAttrs(this.attribution)) - } -} - -/** - * @template {DeltaAny} [Modifier=DeltaAny] - * @template {string|number} [K=string] - */ -class AttrModifyOp { - /** - * @param {K} key - * @param {Modifier} delta - */ - constructor (key, delta) { - /** - * @readonly - * @type {K} - */ - this.key = key; - /** - * @readonly - * @type {Modifier} - */ - this.value = delta; - /** - * @type {string|null} - */ - this._fingerprint = null; - } - - /** - * @type {'modify'} - */ - get type () { return 'modify' } - - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeVarUint(encoder, 7); // map modify type: 7 - encoding.writeAny(encoder, this.key); - encoding.writeVarString(encoder, this.value.fingerprint); - }))) - } - - /** - * @return {DeltaBuilder} - */ - get _modValue () { - this._fingerprint = null; - if (this.value.isDone) { - // @ts-ignore - this.value = /** @type {any} */ (clone(this.value)); - } - // @ts-ignore - return this.value - } - - /** - * @return {DeltaAttrOpJSON} - */ - toJSON () { - return { - type: this.type, - value: this.value.toJSON() - } - } - - /** - * @param {AttrModifyOp} other - */ - [equality.EqualityTraitSymbol] (other) { - return this.key === other.key && this.value[equality.EqualityTraitSymbol](other.value) - } - - /** - * @return {AttrModifyOp} - */ - clone () { - return new AttrModifyOp(this.key, /** @type {Modifier} */ (this.value.done())) - } -} - -/** - * @type {s.Schema | DeleteOp>} - */ -const $deleteOp = schema.$custom(o => o != null && (o.constructor === DeleteOp || o.constructor === AttrDeleteOp)); - -/** - * @type {s.Schema | InsertOp>} - */ -const $insertOp = schema.$custom(o => o != null && (o.constructor === AttrInsertOp || o.constructor === InsertOp)); - -/** - * @template {fingerprintTrait.Fingerprintable} Content - * @param {s.Schema} $content - * @return {s.Schema | InsertOp>} - */ -const $insertOpWith = $content => schema.$custom(o => - o != null && ( - (o.constructor === AttrInsertOp && $content.check(/** @type {AttrInsertOp} */ (o).value)) || - (o.constructor === InsertOp && /** @type {InsertOp} */ (o).insert.every(ins => $content.check(ins))) - ) -); - -/** - * @type {s.Schema} - */ -const $textOp = schema.$constructedBy(TextOp); - -/** - * @type {s.Schema} - */ -const $retainOp = schema.$constructedBy(RetainOp); - -/** - * @type {s.Schema} - */ -const $modifyOp = schema.$custom(o => o != null && (o.constructor === AttrModifyOp || o.constructor === ModifyOp)); - -/** - * @template {DeltaAny} Modify - * @param {s.Schema} $content - * @return {s.Schema | ModifyOp>} - */ -const $modifyOpWith = $content => schema.$custom(o => - o != null && ( - (o.constructor === AttrModifyOp && $content.check(/** @type {AttrModifyOp} */ (o).value)) || - (o.constructor === ModifyOp && $content.check(/** @type {ModifyOp} */ (o).value)) - ) -); - -const $anyOp = schema.$union($insertOp, $deleteOp, $textOp, $modifyOp); - -/** - * @template {Array|string} C1 - * @template {Array|string} C2 - * @typedef {Extract> extends never - * ? never - * : (Array<(Extract> extends Array ? (unknown extends AC1 ? never : AC1) : never)>)} MergeListArrays - */ - -/** - * @template {{[Key in string|number]: any}} Attrs - * @template {string|number} Key - * @template {any} Val - * @typedef {{ [K in (Key | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (Key extends K ? Val : never) }} AddToAttrs - */ - -/** - * @template {{[Key in string|number|symbol]: any}} Attrs - * @template {{[Key in string|number|symbol]: any}} NewAttrs - * @typedef {{ [K in (keyof NewAttrs | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (unknown extends NewAttrs[K] ? never : NewAttrs[K]) }} MergeAttrs - */ - -/** - * @template X - * @typedef {0 extends (1 & X) ? null : X} _AnyToNull - */ - -/** - * @template {s.Schema>|null} Schema - * @typedef {_AnyToNull extends null ? Delta : (Schema extends s.Schema ? D : never)} AllowedDeltaFromSchema - */ - -/** - * @typedef {Delta} DeltaAny - */ -/** - * @typedef {DeltaBuilder} DeltaBuilderAny - */ - -/** - * @template {string} [NodeName=any] - * @template {{[k:string|number]:any}} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - * @template {s.Schema>|null} [Schema=any] - */ -class Delta { - /** - * @param {NodeName} [name] - * @param {Schema} [$schema] - */ - constructor (name, $schema) { - this.name = name || null; - this.$schema = $schema || null; - /** - * @type {{ [K in keyof Attrs]?: K extends string|number ? (AttrInsertOp|AttrDeleteOp|(Delta extends Attrs[K] ? AttrModifyOp,K> : never)) : never } - * & { [Symbol.iterator]: () => Iterator<{ [K in keyof Attrs]: K extends string|number ? (AttrInsertOp|AttrDeleteOp|(Delta extends Attrs[K] ? AttrModifyOp,K> : never)) : never }[keyof Attrs]> } - * } - */ - this.attrs = /** @type {any} */ ({ - * [Symbol.iterator] () { - for (const k in this) { - yield this[k]; - } - } - }); - - /** - * @type {list.List< - * RetainOp - * | DeleteOp - * | (Text extends never ? never : TextOp) - * | (Children extends never ? never : InsertOp) - * | (Delta extends Children ? ModifyOp>> : never) - * >} - */ - this.children = /** @type {any} */ (list.create()); - this.childCnt = 0; - /** - * @type {any} - */ - this.origin = null; - /** - * @type {string|null} - */ - this._fingerprint = null; - this.isDone = false; - } - - /** - * @type {string} - */ - get fingerprint () { - return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => { - encoding.writeUint32(encoder, 0xf2ae5680); // "magic number" that ensures that different types of content don't yield the same fingerprint - encoding.writeAny(encoder, this.name); - /** - * @type {Array} - */ - const keys = []; - for (const attr of this.attrs) { - keys.push(attr.key); - } - keys.sort((a, b) => { - const aIsString = schema.$string.check(a); - const bIsString = schema.$string.check(b); - // numbers first - // in ascending order - return (aIsString && bIsString) - ? a.localeCompare(b) - : (aIsString ? 1 : (bIsString ? -1 : (a - b))) - }); - encoding.writeVarUint(encoder, keys.length); - for (const key of keys) { - encoding.writeVarString(encoder, /** @type {any} */ (this.attrs[/** @type {keyof Attrs} */ (key)]).fingerprint); - } - encoding.writeVarUint(encoder, this.children.len); - for (const child of this.children) { - encoding.writeVarString(encoder, child.fingerprint); - } - return buffer.toBase64(rabin.fingerprint(rabin.StandardIrreducible128, encoding.toUint8Array(encoder))) - }))) - } - - [fingerprint.FingerprintTraitSymbol] () { - return this.fingerprint - } - - isEmpty () { - return object.isEmpty(this.attrs) && list.isEmpty(this.children) - } - - /** - * @return {DeltaJSON} - */ - toJSON () { - const name = this.name; - /** - * @type {any} - */ - const attrs = {}; - /** - * @type {any} - */ - const children = []; - for (const attr of this.attrs) { - attrs[attr.key] = attr.toJSON(); - } - this.children.forEach(val => { - children.push(val.toJSON()); - }); - return object.assign( - { type: /** @type {'delta'} */ ('delta') }, - (name != null ? { name } : {}), - (object.isEmpty(attrs) ? {} : { attrs }), - (children.length > 0 ? { children } : {}) - ) - } - - /** - * @param {Delta} other - * @return {boolean} - */ - equals (other) { - return this[equality.EqualityTraitSymbol](other) - } - - /** - * @param {any} other - * @return {boolean} - */ - [equality.EqualityTraitSymbol] (other) { - // @todo it is only necessary to compare finrerprints OR do a deep equality check (remove - // childCnt as well) - return this.name === other.name && _function.equalityDeep(this.attrs, other.attrs) && _function.equalityDeep(this.children, other.children) && this.childCnt === other.childCnt - } - - /** - * @return {DeltaBuilder} - */ - clone () { - return this.slice(0, this.childCnt) - } - - /** - * @param {number} start - * @param {number} end - * @return {DeltaBuilder} - */ - slice (start = 0, end = this.childCnt) { - const cpy = /** @type {DeltaAny} */ (new DeltaBuilder(/** @type {any} */ (this.name), this.$schema)); - cpy.origin = this.origin; - // copy attrs - for (const op of this.attrs) { - cpy.attrs[op.key] = /** @type {any} */ (op.clone()); - } - // copy children - const slicedLen = end - start; - let remainingLen = slicedLen; - /** - * @type {ChildrenOpAny?} - */ - let currNode = this.children.start; - let currNodeOffset = 0; - while (start > 0 && currNode != null) { - if (currNode.length <= start) { - start -= currNode.length; - currNode = currNode.next; - } else { - currNodeOffset = start; - start = 0; - } - } - if (currNodeOffset > 0 && currNode) { - const ncpy = currNode.clone(currNodeOffset, currNodeOffset + math.min(remainingLen, currNode.length - currNodeOffset)); - list.pushEnd(cpy.children, ncpy); - remainingLen -= ncpy.length; - currNode = currNode.next; - } - while (currNode != null && currNode.length <= remainingLen) { - list.pushEnd(cpy.children, currNode.clone()); - remainingLen -= currNode.length; - currNode = currNode.next; - } - if (currNode != null && remainingLen > 0) { - list.pushEnd(cpy.children, currNode.clone(0, remainingLen)); - remainingLen -= math.min(currNode.length, remainingLen); - } - cpy.childCnt = slicedLen - remainingLen; - // @ts-ignore - return cpy - } - - /** - * Mark this delta as done and perform some cleanup (e.g. remove appended retains without - * formats&attributions). In the future, there might be additional merge operations that can be - * performed to result in smaller deltas. Set `markAsDone=false` to only perform the cleanup. - * - * @return {Delta} - */ - done (markAsDone = true) { - if (!this.isDone) { - this.isDone = markAsDone; - const cs = this.children; - for (let end = cs.end; end !== null && $retainOp.check(end) && end.format == null && end.attribution == null; end = cs.end) { - this.childCnt -= end.length; - list.popEnd(cs); - } - } - return this - } -} - -/** - * @template {DeltaAny} D - * @param {D} d - * @return {D extends DeltaBuilder ? DeltaBuilder : never} - */ -const clone = d => /** @type {any} */ (d.slice(0, d.childCnt)); - -/** - * Try merging this op with the previous op - * @param {list.List} parent - * @param {InsertOp|RetainOp|DeleteOp|TextOp|ModifyOp} op - */ -const tryMergeWithPrev = (parent, op) => { - const prevOp = op.prev; - if ( - prevOp?.constructor !== op.constructor || - ( - (!$deleteOp.check(op) && !$modifyOp.check(op)) && (!_function.equalityDeep(op.format, /** @type {InsertOp} */ (prevOp).format) || !_function.equalityDeep(op.attribution, /** @type {InsertOp} */ (prevOp).attribution)) - ) - ) { - // constructor mismatch or format/attribution mismatch - return - } - // can be merged - if ($insertOp.check(op)) { - /** @type {InsertOp} */ (prevOp).insert.push(...op.insert); - } else if ($retainOp.check(op)) { - // @ts-ignore - /** @type {RetainOp} */ (prevOp).retain += op.retain; - } else if ($deleteOp.check(op)) { - /** @type {DeleteOp} */ (prevOp).delete += op.delete; - } else if ($textOp.check(op)) { - /** @type {TextOp} */ (prevOp)._updateInsert(/** @type {TextOp} */ (prevOp).insert + op.insert); - } else { - error.unexpectedCase(); - } - list.remove(parent, op); -}; - -/** - * Ensures that the delta can be edited. clears _fingerprint cache. - * - * @param {any} d - */ -const modDeltaCheck = d => { - if (d.isDone) { - /** - * You tried to modify a delta after it has been marked as "done". - */ - throw error.create("Readonly Delta can't be modified") - } - d._fingerprint = null; -}; - -/** - * @template {string} [NodeName=any] - * @template {{[key:string|number]:any}} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - * @template {s.Schema>|null} [Schema=any] - * @extends {Delta} - */ -class DeltaBuilder extends Delta { - /** - * @param {NodeName} [name] - * @param {Schema} [$schema] - */ - constructor (name, $schema) { - super(name, $schema); - /** - * @type {FormattingAttributes?} - */ - this.usedAttributes = null; - /** - * @type {Attribution?} - */ - this.usedAttribution = null; - } - - /** - * @param {Attribution?} attribution - */ - useAttribution (attribution) { - modDeltaCheck(this); - this.usedAttribution = attribution; - return this - } - - /** - * @param {FormattingAttributes?} attributes - * @return {this} - */ - useAttributes (attributes) { - modDeltaCheck(this); - this.usedAttributes = attributes; - return this - } - - /** - * @param {string} name - * @param {any} value - */ - updateUsedAttributes (name, value) { - modDeltaCheck(this); - if (value == null) { - this.usedAttributes = object.assign({}, this.usedAttributes); - delete this.usedAttributes?.[name]; - if (object.isEmpty(this.usedAttributes)) { - this.usedAttributes = null; - } - } else if (!_function.equalityDeep(this.usedAttributes?.[name], value)) { - this.usedAttributes = object.assign({}, this.usedAttributes); - this.usedAttributes[name] = value; - } - return this - } - - /** - * @template {keyof Attribution} NAME - * @param {NAME} name - * @param {Attribution[NAME]?} value - */ - updateUsedAttribution (name, value) { - modDeltaCheck(this); - if (value == null) { - this.usedAttribution = object.assign({}, this.usedAttribution); - delete this.usedAttribution?.[name]; - if (object.isEmpty(this.usedAttribution)) { - this.usedAttribution = null; - } - } else if (!_function.equalityDeep(this.usedAttribution?.[name], value)) { - this.usedAttribution = object.assign({}, this.usedAttribution); - this.usedAttribution[name] = value; - } - return this - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? ((Children extends never ? never : Array) | Text) : never} NewContent - * @param {NewContent} insert - * @param {FormattingAttributes?} [formatting] - * @param {Attribution?} [attribution] - * @return {DeltaBuilder< - * NodeName, - * Attrs, - * Exclude[number]|Children, - * (Extract|Text) extends never ? never : string, - * Schema - * >} - */ - insert (insert, formatting = null, attribution = null) { - modDeltaCheck(this); - const mergedAttributes = mergeAttrs(this.usedAttributes, formatting); - const mergedAttribution = mergeAttrs(this.usedAttribution, attribution); - /** - * @param {TextOp | InsertOp} lastOp - */ - const checkMergedEquals = lastOp => (mergedAttributes === lastOp.format || _function.equalityDeep(mergedAttributes, lastOp.format)) && (mergedAttribution === lastOp.attribution || _function.equalityDeep(mergedAttribution, lastOp.attribution)); - const end = this.children.end; - if (schema.$string.check(insert)) { - if ($textOp.check(end) && checkMergedEquals(end)) { - end._updateInsert(end.insert + insert); - } else if (insert.length > 0) { - list.pushEnd(this.children, new TextOp(insert, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution)); - } - this.childCnt += insert.length; - } else if (array$1.isArray(insert)) { - if ($insertOp.check(end) && checkMergedEquals(end)) { - // @ts-ignore - end.insert.push(...insert); - end._fingerprint = null; - } else if (insert.length > 0) { - list.pushEnd(this.children, new InsertOp(insert, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution)); - } - this.childCnt += insert.length; - } - return /** @type {any} */ (this) - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? Extract> : never} NewContent - * @param {NewContent} modify - * @param {FormattingAttributes?} formatting - * @param {Attribution?} attribution - * @return {DeltaBuilder< - * NodeName, - * Attrs, - * Exclude[number]|Children, - * (Extract|Text) extends string ? string : never, - * Schema - * >} - */ - modify (modify, formatting = null, attribution = null) { - modDeltaCheck(this); - const mergedAttributes = mergeAttrs(this.usedAttributes, formatting); - const mergedAttribution = mergeAttrs(this.usedAttribution, attribution); - list.pushEnd(this.children, new ModifyOp(modify, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution)); - this.childCnt += 1; - return /** @type {any} */ (this) - } - - /** - * @param {number} len - * @param {FormattingAttributes?} [format] - * @param {Attribution?} [attribution] - */ - retain (len, format = null, attribution = null) { - modDeltaCheck(this); - const mergedFormats = mergeAttrs(this.usedAttributes, format); - const mergedAttribution = mergeAttrs(this.usedAttribution, attribution); - const lastOp = /** @type {RetainOp|InsertOp} */ (this.children.end); - if (lastOp instanceof RetainOp && _function.equalityDeep(mergedFormats, lastOp.format) && _function.equalityDeep(mergedAttribution, lastOp.attribution)) { - // @ts-ignore - lastOp.retain += len; - } else if (len > 0) { - list.pushEnd(this.children, new RetainOp(len, mergedFormats, mergedAttribution)); - } - this.childCnt += len; - return this - } - - /** - * @param {number} len - */ - delete (len) { - modDeltaCheck(this); - const lastOp = /** @type {DeleteOp|InsertOp} */ (this.children.end); - if (lastOp instanceof DeleteOp) { - lastOp.delete += len; - } else if (len > 0) { - list.pushEnd(this.children, new DeleteOp(len)); - } - this.childCnt += len; - return this - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? (keyof Attrs) : never} Key - * @template {AllowedDeltaFromSchema extends Delta ? (Attrs[Key]) : never} Val - * @param {Key} key - * @param {Val} val - * @param {Attribution?} attribution - * @param {Val|undefined} [prevValue] - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - set (key, val, attribution = null, prevValue) { - modDeltaCheck(this); - this.attrs[key] = /** @type {any} */ (new AttrInsertOp(key, val, prevValue, mergeAttrs(this.usedAttribution, attribution))); - return /** @type {any} */ (this) - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? Attrs : never} NewAttrs - * @param {NewAttrs} attrs - * @param {Attribution?} attribution - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof MergeAttrs]: MergeAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - setMany (attrs, attribution = null) { - modDeltaCheck(this); - for (const k in attrs) { - this.set(/** @type {any} */ (k), attrs[k], attribution); - } - return /** @type {any} */ (this) - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? keyof As : never} Key - * @param {Key} key - * @param {Attribution?} attribution - * @param {any} [prevValue] - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - unset (key, attribution = null, prevValue) { - modDeltaCheck(this); - this.attrs[key] = /** @type {any} */ (new AttrDeleteOp(key, prevValue, mergeAttrs(this.usedAttribution, attribution))); - return /** @type {any} */ (this) - } - - /** - * @template {AllowedDeltaFromSchema extends Delta ? { [K in keyof As]: Extract> extends never ? never : K }[keyof As] : never} Key - * @template {AllowedDeltaFromSchema extends Delta ? Extract> : never} D - * @param {Key} key - * @param {D} modify - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - update (key, modify) { - modDeltaCheck(this); - this.attrs[key] = /** @type {any} */ (new AttrModifyOp(key, modify)); - return /** @type {any} */ (this) - } - - /** - * @param {Delta} other - */ - apply (other) { - modDeltaCheck(this); - this.$schema?.expect(other); - // apply attrs - for (const op of other.attrs) { - const c = /** @type {AttrInsertOp|AttrDeleteOp|AttrModifyOp} */ (this.attrs[op.key]); - if ($modifyOp.check(op)) { - if ($deltaAny.check(c?.value)) { - c._modValue.apply(op.value); - } else { - // then this is a simple modify - // @ts-ignore - this.attrs[op.key] = op.clone(); - } - } else if ($insertOp.check(op)) { - // @ts-ignore - op.prevValue = c?.value; - // @ts-ignore - this.attrs[op.key] = op.clone(); - } else if ($deleteOp.check(op)) { - op.prevValue = c?.value; - delete this.attrs[op.key]; - } - } - // apply children - /** - * @type {ChildrenOpAny?} - */ - let opsI = this.children.start; - let offset = 0; - /** - * At the end, we will try to merge this op, and op.next op with their respective previous op. - * - * Hence, anytime an op is cloned, deleted, or inserted (anytime list.* api is used) we must add - * an op to maybeMergeable. - * - * @type {Array|RetainOp|DeleteOp|TextOp|ModifyOp>} - */ - const maybeMergeable = []; - /** - * @template {InsertOp|RetainOp|DeleteOp|TextOp|ModifyOp|null} OP - * @param {OP} op - * @return {OP} - */ - const scheduleForMerge = op => { - op && maybeMergeable.push(op); - return op - }; - other.children.forEach(op => { - if ($textOp.check(op) || $insertOp.check(op)) { - if (offset === 0) { - list.insertBetween(this.children, opsI == null ? this.children.end : opsI.prev, opsI, scheduleForMerge(op.clone())); - } else { - // @todo inmplement "splitHelper" and "insertHelper" - I'm splitting all the time and - // forget to update opsI - if (opsI == null) error.unexpectedCase(); - const cpy = scheduleForMerge(opsI.clone(offset)); - opsI._splice(offset, opsI.length - offset); - list.insertBetween(this.children, opsI, opsI.next || null, cpy); - list.insertBetween(this.children, opsI, cpy || null, scheduleForMerge(op.clone())); - opsI = cpy; - offset = 0; - } - this.childCnt += op.insert.length; - } else if ($retainOp.check(op)) { - let retainLen = op.length; - - if (offset > 0 && opsI != null && op.format != null && !$deleteOp.check(opsI) && !object.every(op.format, (v, k) => _function.equalityDeep(v, /** @type {InsertOp|RetainOp|ModifyOp} */ (opsI).format?.[k] || null))) { - // need to split current op - const cpy = scheduleForMerge(opsI.clone(offset)); - opsI._splice(offset, opsI.length - offset); - list.insertBetween(this.children, opsI, opsI.next || null, cpy); - opsI = cpy; - offset = 0; - } - - while (opsI != null && opsI.length - offset <= retainLen) { - op.format != null && updateOpFormat(opsI, op.format); - retainLen -= opsI.length - offset; - opsI = opsI?.next || null; - offset = 0; - } - - if (opsI != null) { - if (op.format != null && retainLen > 0) { - // split current op and apply format - const cpy = scheduleForMerge(opsI.clone(retainLen)); - opsI._splice(retainLen, opsI.length - retainLen); - list.insertBetween(this.children, opsI, opsI.next || null, cpy); - updateOpFormat(opsI, op.format); - opsI = cpy; - } else { - offset += retainLen; - } - } else if (retainLen > 0) { - list.pushEnd(this.children, scheduleForMerge(new RetainOp(retainLen, op.format, op.attribution))); - this.childCnt += retainLen; - } - } else if ($deleteOp.check(op)) { - let remainingLen = op.delete; - while (remainingLen > 0) { - if (opsI == null) { - list.pushEnd(this.children, scheduleForMerge(new DeleteOp(remainingLen))); - this.childCnt += remainingLen; - break - } else if (opsI instanceof DeleteOp) { - const delLen = opsI.length - offset; - // the same content can't be deleted twice, remove duplicated deletes - if (delLen >= remainingLen) { - offset = 0; - opsI = opsI.next; - } else { - offset += remainingLen; - } - remainingLen -= delLen; - } else { // insert / embed / retain / modify ⇒ replace - // case1: delete o fully - // case2: delete some part of beginning - // case3: delete some part of end - // case4: delete some part of center - const delLen = math.min(opsI.length - offset, remainingLen); - this.childCnt -= delLen; - if (opsI.length === delLen) { - // case 1 - offset = 0; - scheduleForMerge(opsI.next); - list.remove(this.children, opsI); - opsI = opsI.next; - } else if (offset === 0) { - // case 2 - offset = 0; - opsI._splice(0, delLen); - } else if (offset + delLen === opsI.length) { - // case 3 - opsI._splice(offset, delLen); - offset = 0; - opsI = opsI.next; - } else { - // case 4 - opsI._splice(offset, delLen); - } - remainingLen -= delLen; - } - } - } else if ($modifyOp.check(op)) { - if (opsI == null) { - list.pushEnd(this.children, op.clone()); - this.childCnt += 1; - return - } - if ($modifyOp.check(opsI)) { - opsI._modValue.apply(op.value); - } else if ($insertOp.check(opsI)) { - opsI._modValue(offset).apply(op.value); - } else if ($retainOp.check(opsI)) { - if (offset > 0) { - const cpy = scheduleForMerge(opsI.clone(0, offset)); // skipped len - opsI._splice(0, offset); // new remainder - list.insertBetween(this.children, opsI.prev, opsI, cpy); // insert skipped len - offset = 0; - } - list.insertBetween(this.children, opsI.prev, opsI, scheduleForMerge(op.clone())); // insert skipped len - if (opsI.length === 1) { - list.remove(this.children, opsI); - } else { - opsI._splice(0, 1); - scheduleForMerge(opsI); - } - } else if ($deleteOp.check(opsI)) ; else { - error.unexpectedCase(); - } - } else { - error.unexpectedCase(); - } - }); - maybeMergeable.forEach(op => { - // check if this is still integrated - if (op.prev?.next === op) { - tryMergeWithPrev(this.children, op); - op.next && tryMergeWithPrev(this.children, op.next); - } - }); - return this - } - - /** - * @param {DeltaAny} other - * @param {boolean} priority - */ - rebase (other, priority) { - modDeltaCheck(this); - /** - * Rebase attributes - * - * - insert vs delete ⇒ insert takes precedence - * - insert vs modify ⇒ insert takes precedence - * - insert vs insert ⇒ priority decides - * - delete vs modify ⇒ delete takes precedence - * - delete vs delete ⇒ current delete op is removed because item has already been deleted - * - modify vs modify ⇒ rebase using priority - */ - for (const op of this.attrs) { - if ($insertOp.check(op)) { - if ($insertOp.check(other.attrs[op.key]) && !priority) { - delete this.attrs[op.key]; - } - } else if ($deleteOp.check(op)) { - const otherOp = other.attrs[/** @type {any} */ (op.key)]; - if ($insertOp.check(otherOp)) { - delete this.attrs[otherOp.key]; - } - } else if ($modifyOp.check(op)) { - const otherOp = other.attrs[/** @type {any} */ (op.key)]; - if (otherOp == null) ; else if ($modifyOp.check(otherOp)) { - op._modValue.rebase(otherOp.value, priority); - } else { - delete this.attrs[otherOp.key]; - } - } - } - /** - * Rebase children. - * - * Precedence: insert with higher priority comes first. Op with less priority is transformed to - * be inserted later. - * - * @todo always check if inser OR text - */ - /** - * @type {ChildrenOpAny?} - */ - let currChild = this.children.start; - let currOffset = 0; - /** - * @type {ChildrenOpAny?} - */ - let otherChild = other.children.start; - let otherOffset = 0; - while (currChild != null && otherChild != null) { - if ($insertOp.check(currChild) || $textOp.check(currChild)) { - /** - * Transforming *insert*. If other is.. - * - insert: transform based on priority - * - retain/delete/modify: transform next op against other - */ - if ($insertOp.check(otherChild) || $modifyOp.check(otherChild) || $textOp.check(otherChild)) { - if (!priority) { - list.insertBetween(this.children, currChild.prev, currChild, new RetainOp(otherChild.length, null, null)); - this.childCnt += otherChild.length; - // curr is transformed against other, transform curr against next - otherOffset = otherChild.length; - } else { - // curr stays as is, transform next op - currOffset = currChild.length; - } - } else { // otherChild = delete | retain | modify - curr stays as is, transform next op - currOffset = currChild.length; - } - } else if ($modifyOp.check(currChild)) { - /** - * Transforming *modify*. If other is.. - * - insert: adjust position - * - modify: rebase curr modify on other modify - * - delete: remove modify - * - retain: adjust offset - */ - if ($insertOp.check(otherChild) || $textOp.check(otherChild)) { - // @todo: with all list changes (retain insertions, removal), try to merge the surrounding - // ops later - list.insertBetween(this.children, currChild.prev, currChild, new RetainOp(otherChild.length, null, null)); - this.childCnt += otherChild.length; - // curr is transformed against other, transform curr against next - otherOffset = otherChild.length; - } else { - if ($modifyOp.check(otherChild)) { - /** @type {any} */ (currChild.value).rebase(otherChild, priority); - } else if ($deleteOp.check(otherChild)) { - list.remove(this.children, currChild); - this.childCnt -= 1; - } - currOffset += 1; - otherOffset += 1; - } - } else { // DeleteOp | RetainOp - const maxCommonLen = math.min(currChild.length - currOffset, otherChild.length - otherOffset); - /** - * Transforming *retain* OR *delete*. If other is.. - * - retain / modify: adjust offsets - * - delete: shorten curr op - * - insert: split curr op and insert retain - */ - if ($retainOp.check(otherChild) || $modifyOp.check(otherChild)) { - currOffset += maxCommonLen; - otherOffset += maxCommonLen; - } else if ($deleteOp.check(otherChild)) { - if ($retainOp.check(currChild)) { - // @ts-ignore - currChild.retain -= maxCommonLen; - } else if ($deleteOp.check(currChild)) { - currChild.delete -= maxCommonLen; - } - this.childCnt -= maxCommonLen; - } else { // insert/text.check(currOp) - if (currOffset > 0) { - const leftPart = currChild.clone(currOffset); - list.insertBetween(this.children, currChild.prev, currChild, leftPart); - currChild._splice(currOffset, currChild.length - currOffset); - currOffset = 0; - } - list.insertBetween(this.children, currChild.prev, currChild, new RetainOp(otherChild.length, null, null)); - this.childCnt += otherChild.length; - otherOffset = otherChild.length; - } - } - if (currOffset >= currChild.length) { - currChild = currChild.next; - currOffset = 0; - } - if (otherOffset >= otherChild.length) { - otherChild = otherChild.next; - otherOffset = 0; - } - } - return this - } - - /** - * Same as doing `delta.rebase(other.inverse())`, without creating a temporary delta. - * - * @param {DeltaAny} other - * @param {boolean} priority - */ - rebaseOnInverse (other, priority) { - modDeltaCheck(this); - // @todo - console.info('method rebaseOnInverse unimplemented'); - return this - } - - /** - * Append child ops from one op to the other. - * - * delta.create().insert('a').append(delta.create().insert('b')) // => insert "ab" - * - * @template {DeltaAny} OtherDelta - * @param {OtherDelta} other - * @return {CastToDelta extends Delta ? DeltaBuilder : never} - */ - append (other) { - const children = this.children; - const prevLast = children.end; - // @todo Investigate. Above is a typescript issue. It is necessary to cast OtherDelta to a Delta first before - // inferring type, otherwise Children will contain Text. - for (const child of other.children) { - list.pushEnd(children, child.clone()); - } - this.childCnt += other.childCnt; - prevLast?.next && tryMergeWithPrev(children, prevLast.next); - // @ts-ignore - return this - } -} - -/** - * @param {ChildrenOpAny} op - * @param {{[k:string]:any}} formatUpdate - */ -const updateOpFormat = (op, formatUpdate) => { - if (!$deleteOp.check(op)) { - // apply formatting attributes - for (const k in formatUpdate) { - const v = formatUpdate[k]; - if (v != null || $retainOp.check(op)) { - // never modify formats - /** @type {any} */ (op).format = object.assign({}, op.format, { [k]: v }); - } else if (op.format != null) { - const { [k]: _, ...rest } = op.format - ;/** @type {any} */ (op).format = rest; - } - } - } -}; - -/** - * @template {DeltaAny} D - * @typedef {D extends DeltaBuilder ? Delta : D} CastToDelta - */ - -/** - * @template {string} NodeName - * @template {{ [key: string|number]: any }} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable|never} [Children=never] - * @template {string|never} [Text=never] - * @typedef {Delta|RecursiveDelta,Text>} RecursiveDelta - */ - -/** - * @template {string} Name - * @template {{[k:string|number]:any}} Attrs - * @template {fingerprintTrait.Fingerprintable} Children - * @template {boolean} HasText - * @template {{ [k:string]:any }} Formats - * @template {boolean} Recursive - * @extends {s.Schema : never), - * HasText extends true ? string : never, - * any>>} - */ -class $Delta extends schema.Schema { - /** - * @param {s.Schema} $name - * @param {s.Schema} $attrs - * @param {s.Schema} $children - * @param {HasText} hasText - * @param {s.Schema} $formats - * @param {Recursive} recursive - */ - constructor ($name, $attrs, $children, hasText, $formats, recursive) { - super(); - const $attrsPartial = schema.$$object.check($attrs) ? $attrs.partial : $attrs; - if (recursive) { - // @ts-ignore - $children = schema.$union($children, this); - } - this.shape = { $name, $attrs: $attrsPartial, $children, hasText, $formats }; - } - - /** - * @param {any} o - * @param {s.ValidationError} [err] - * @return {o is Delta< - * Name, - * Attrs, - * Children|(Recursive extends true ? RecursiveDelta : never), - * HasText extends true ? string : never, - * any>} - */ - check (o, err = undefined) { - const { $name, $attrs, $children, hasText, $formats } = this.shape; - if (!(o instanceof Delta)) { - err?.extend(null, 'Delta', o?.constructor.name, 'Constructor match failed'); - } else if (o.name != null && !$name.check(o.name, err)) { - err?.extend('Delta.name', $name.toString(), o.name, 'Unexpected node name'); - } else if (list.toArray(o.children).some(c => (!hasText && $textOp.check(c)) || (hasText && $textOp.check(c) && c.format != null && !$formats.check(c.format)) || ($insertOp.check(c) && !c.insert.every(ins => $children.check(ins))))) { - err?.extend('Delta.children', '', '', 'Children don\'t match the schema'); - } else if (object.some(o.attrs, (op, k) => $insertOp.check(op) && !$attrs.check({ [k]: op.value }, err))) { - err?.extend('Delta.attrs', '', '', 'Attrs don\'t match the schema'); - } else { - return true - } - return false - } -} - -/** - * @template {s.Schema|string|Array} [NodeNameSchema=s.Schema] - * @template {s.Schema<{ [key: string|number]: any }>|{ [key:string|number]:any }} [AttrsSchema=s.Schema<{}>] - * @template {any} [ChildrenSchema=s.Schema] - * @template {boolean} [HasText=false] - * @template {boolean} [Recursive=false] - * @template {{ [k:string]:any }} [Formats={[k:string]:any}] - * @param {object} opts - * @param {NodeNameSchema?} [opts.name] - * @param {AttrsSchema?} [opts.attrs] What key-value pairs are included. - * @param {ChildrenSchema?} [opts.children] The type of content in `insertOp` - * @param {HasText} [opts.text] Whether this delta contains text using `textOp` - * @param {Formats} [opts.formats] - * @param {Recursive} [opts.recursive] - * @return {[s.Unwrap>,s.Unwrap>,s.Unwrap>] extends [infer NodeName, infer Attrs, infer Children] ? s.Schema : never), - * HasText extends true ? string : never - * >> : never} - */ -const $delta = ({ name, attrs, children, text, formats, recursive }) => /** @type {any} */ (new $Delta( - name == null ? schema.$any : schema.$(name), - /** @type {any} */ (attrs == null ? schema.$object({}) : schema.$(attrs)), - /** @type {any} */ (children == null ? schema.$never : schema.$(children)), - text ?? false, - formats == null ? schema.$any : schema.$(formats), - recursive ?? false -)); - -const $$delta = schema.$constructedBy($Delta); - -/** - * @todo remove this - * - * @template {s.Schema|string|Array} [NodeNameSchema=s.Schema] - * @template {s.Schema<{ [key: string|number]: any }>|{ [key:string|number]:any }} [AttrsSchema=s.Schema<{}>] - * @template {any} [ChildrenSchema=s.Schema] - * @template {boolean} [HasText=false] - * @template {boolean} [Recursive=false] - * @param {object} opts - * @param {NodeNameSchema?} [opts.name] - * @param {AttrsSchema?} [opts.attrs] - * @param {ChildrenSchema?} [opts.children] - * @param {HasText} [opts.text] - * @param {Recursive} [opts.recursive] - * @return {[s.Unwrap>,s.Unwrap>,s.Unwrap>] extends [infer NodeName, infer Attrs, infer Children] ? s.Schema : never), - * HasText extends true ? string : never - * >> : never} - */ -const _$delta = ({ name, attrs, children, text, recursive }) => { - /** - * @type {s.Schema>} - */ - let $arrContent = children == null ? schema.$never : schema.$array(schema.$(children)); - const $name = name == null ? schema.$any : schema.$(name); - const $attrsPartial = attrs == null ? schema.$object({}) : (schema.$$record.check(attrs) ? attrs : /** @type {any} */ (schema.$(attrs)).partial); - const $d = schema.$instanceOf(Delta, /** @param {Delta} d */ d => { - if ( - !$name.check(d.name) || - object.some(d.attrs, - (op, k) => $insertOp.check(op) && !$attrsPartial.check({ [k]: op.value }) - ) - ) return false - for (const op of d.children) { - if ((!text && $textOp.check(op)) || ($insertOp.check(op) && !$arrContent.check(op.insert))) { - return false - } - } - return true - }); - if (recursive) { - $arrContent = children == null ? schema.$array($d) : schema.$array(schema.$(children), $d); - } - return /** @type {any} */ ($d) -}; - -/** - * @type {s.Schema} - */ -const $deltaAny = /** @type {any} */ (schema.$instanceOf(Delta)); - -/** - * @type {s.Schema} - */ -const $deltaBuilderAny = /** @type {any} */ (schema.$instanceOf(DeltaBuilder)); - -/** - * Helper function to merge attribution and attributes. The latter input "wins". - * - * @template {{ [key: string]: any }} T - * @param {T | null} a - * @param {T | null} b - */ -const mergeAttrs = (a, b) => object.isEmpty(a) - ? (object.isEmpty(b) ? null : b) - : (object.isEmpty(b) ? a : object.assign({}, a, b)); - -/** - * @template {DeltaAny|null} D - * @param {D} a - * @param {D} b - * @return {D} - */ -const mergeDeltas = (a, b) => { - if (a != null && b != null) { - const c = clone(a); - c.apply(b); - return /** @type {any} */ (c) - } - return a == null ? b : (a || null) -}; - -/** - * @template {DeltaAny} D - * @param {prng.PRNG} gen - * @param {s.Schema} $d - * @return {D extends Delta ? DeltaBuilder : never} - */ -const random = (gen, $d) => { - const { $name, $attrs, $children, hasText, $formats: $formats_ } = /** @type {$Delta} */ (/** @type {any} */ ($d)).shape; - const d = schema.$$any.check($name) ? create($deltaAny) : create(schema.random(gen, $name), $deltaAny); - const $formats = schema.$$any.check($formats_) ? schema.$null : $formats_; - prng.bool(gen) && d.setMany(schema.random(gen, $attrs)); - for (let i = prng.uint32(gen, 0, 5); i > 0; i--) { - if (hasText && prng.bool(gen)) { - d.insert(prng.word(gen), schema.random(gen, $formats)); - } else if (!schema.$$never.check($children)) { - /** - * @type {Array} - */ - const ins = []; - let insN = prng.int32(gen, 0, 5); - while (insN--) { - ins.push(schema.random(gen, $children)); - } - d.insert(ins, schema.random(gen, $formats)); - } - } - return /** @type {any} */ (d) -}; - -/** - * @overload - * @return {DeltaBuilder} - */ -/** - * @template {string} NodeName - * @overload - * @param {NodeName} nodeName - * @return {DeltaBuilder} - */ -/** - * @template {string} NodeName - * @template {s.Schema} Schema - * @overload - * @param {NodeName} nodeName - * @param {Schema} schema - * @return {Schema extends s.Schema> ? DeltaBuilder : never} - */ -/** - * @template {s.Schema} Schema - * @overload - * @param {Schema} schema - * @return {Schema extends s.Schema> ? DeltaBuilder : never} - */ -/** - * @template {string|null} NodeName - * @template {{[k:string|number]:any}|null} Attrs - * @template {Array|string} [Children=never] - * @overload - * @param {NodeName} nodeName - * @param {Attrs} attrs - * @param {Children} [children] - * @return {DeltaBuilder< - * NodeName extends null ? any : NodeName, - * Attrs extends null ? {} : Attrs, - * Extract> extends Array ? (unknown extends Ac ? never : Ac) : never, - * Extract, - * null - * >} - */ -/** - * @param {string|s.Schema} [nodeNameOrSchema] - * @param {{[K:string|number]:any}|s.Schema} [attrsOrSchema] - * @param {(Array|string)} [children] - * @return {DeltaBuilder} - */ -const create = (nodeNameOrSchema, attrsOrSchema, children) => { - const nodeName = /** @type {any} */ (schema.$string.check(nodeNameOrSchema) ? nodeNameOrSchema : null); - const schema$1 = /** @type {any} */ (schema.$$schema.check(nodeNameOrSchema) ? nodeNameOrSchema : (schema.$$schema.check(attrsOrSchema) ? attrsOrSchema : null)); - const d = /** @type {DeltaBuilder} */ (new DeltaBuilder(nodeName, schema$1)); - if (schema.$objectAny.check(attrsOrSchema)) { - d.setMany(attrsOrSchema); - } - children && d.insert(children); - return d -}; - -// DELTA TEXT - -/** - * @template {fingerprintTrait.Fingerprintable} [Embeds=never] - * @typedef {Delta} TextDelta - */ - -/** - * @template {fingerprintTrait.Fingerprintable} [Embeds=never] - * @typedef {DeltaBuilder} TextDeltaBuilder - */ - -/** - * @template {Array>} [$Embeds=any] - * @param {$Embeds} $embeds - * @return {s.Schema extends null ? never : ($Embeds extends Array> ? $C : never)>>} - */ -const $text = (...$embeds) => /** @type {any} */ ($delta({ children: schema.$union(...$embeds), text: true })); -const $textOnly = $text(); - -/** - * @template {s.Schema>} [Schema=s.Schema>] - * @param {Schema} [$schema] - * @return {Schema extends s.Schema> ? DeltaBuilder : never} - */ -const text = $schema => /** @type {any} */ (create($schema || $textOnly)); - -/** - * @template {fingerprintTrait.Fingerprintable} Children - * @typedef {Delta} ArrayDelta - */ - -/** - * @template {fingerprintTrait.Fingerprintable} Children - * @typedef {DeltaBuilder} ArrayDeltaBuilder - */ - -/** - * @template {any|s.Schema} $Children - * @param {$Children} [$children] - * @return {s.Schema>>>} - */ -const $array = $children => /** @type {any} */ ($delta({ children: $children })); - -/** - * @template {s.Schema>} [$Schema=never] - * @param {$Schema} $schema - * @return {$Schema extends never ? ArrayDeltaBuilder : DeltaBuilder} - */ -const array = $schema => /** @type {any} */ ($schema ? create($schema) : create()); - -/** - * @template {{ [K: string|number]: any }} Attrs - * @typedef {Delta} MapDelta - */ - -/** - * @template {{ [K: string|number]: any }} Attrs - * @typedef {DeltaBuilder} MapDeltaBuilder - */ - -/** - * @template {{ [K: string|number]: any }} $Attrs - * @param {s.Schema<$Attrs>} $attrs - * @return {s.Schema>} - */ -const $map = $attrs => /** @type {any} */ ($delta({ attrs: $attrs })); - -/** - * @template {s.Schema>|undefined} [$Schema=undefined] - * @param {$Schema} [$schema] - * @return {$Schema extends s.Schema> ? DeltaBuilder : MapDeltaBuilder<{}>} - */ -const map = $schema => /** @type {any} */ (create(/** @type {any} */ ($schema))); - -/** - * @template {DeltaAny} D - * @param {D} d1 - * @param {NoInfer} d2 - * @return {D extends Delta ? DeltaBuilder : never} - */ -const diff = (d1, d2) => { - /** - * @type {DeltaBuilderAny} - */ - const d = create(); - if (d1.fingerprint !== d2.fingerprint) { - let left1 = d1.children.start; - let left2 = d2.children.start; - let right1 = d1.children.end; - let right2 = d2.children.end; - let commonPrefixOffset = 0; - // perform a patience sort - // 1) remove common prefix and suffix - while (left1 != null && left1.fingerprint === left2?.fingerprint) { - if (!$deleteOp.check(left1)) { - commonPrefixOffset += left1.length; - } - left1 = left1.next; - left2 = left2.next; - } - while (right1 !== null && right1 !== left1 && right1.fingerprint === right2?.fingerprint) { - right1 = right1.prev; - right2 = right2.prev; - } - /** - * @type {Array} - */ - const ops1 = []; - /** - * @type {Array} - */ - const ops2 = []; - while (left1 !== null && left1 !== right1?.next) { - ops1.push(left1); - left1 = left1.next; - } - while (left2 !== null && left2 !== right2?.next) { - ops2.push(left2); - left2 = left2.next; - } - const fprints1 = ops1.map(op => op.fingerprint); - const fprints2 = ops2.map(op => op.fingerprint); - const changeset = patience.diff(fprints1, fprints2); - d.retain(commonPrefixOffset); - for (let i = 0, lastIndex1 = 0, currIndexOffset2 = 0; i < changeset.length; i++) { - const change = changeset[i]; - d.retain(change.index - lastIndex1); - // insert minimal diff at curred position in d - /** - * - * @todo it would be better if these would be slices of delta (an actual delta) - * - * @param {ChildrenOpAny[]} opsIs - * @param {ChildrenOpAny[]} opsShould - */ - const diffAndApply = (opsIs, opsShould) => { - const d = create(); - // @todo unoptimized implementation. Convert content to array and diff that based on - // generated fingerprints. We probably could do better and cache more information. - // - benchmark - // - cache fingerprints in ops - /** - * @type {Array} - */ - const isContent = opsIs.flatMap(op => $insertOp.check(op) ? op.insert : ($textOp.check(op) ? op.insert.split('') : error.unexpectedCase())); - /** - * @type {Array} - */ - const shouldContent = opsShould.flatMap(op => $insertOp.check(op) ? op.insert : ($textOp.check(op) ? op.insert.split('') : error.unexpectedCase())); - const isContentFingerprinted = isContent.map(c => schema.$string.check(c) ? c : fingerprint.fingerprint(c)); - const shouldContentFingerprinted = shouldContent.map(c => schema.$string.check(c) ? c : fingerprint.fingerprint(c)); - const hasFormatting = opsIs.some(op => !$deleteOp.check(op) && op.format != null) || opsShould.some(op => !$deleteOp.check(op) && op.format != null); - /** - * @type {{ index: number, insert: Array, remove: Array }[]} - */ - const cdiff = patience.diff(isContentFingerprinted, shouldContentFingerprinted); - // overwrite fingerprinted content with actual content - for (let i = 0, adj = 0; i < cdiff.length; i++) { - const cd = cdiff[i]; - cd.remove = isContent.slice(cd.index, cd.index + cd.remove.length); - cd.insert = shouldContent.slice(cd.index + adj, cd.index + adj + cd.insert.length); - adj += cd.insert.length - cd.remove.length; - } - for (let i = 0, lastIndex = 0; i < cdiff.length; i++) { - const cd = cdiff[i]; - d.retain(cd.index - lastIndex); - lastIndex = cd.index; - let cdii = 0; - let cdri = 0; - // try to match as much content as possible, preferring to skip over non-deltas - for (; cdii < cd.insert.length && cdri < cd.remove.length;) { - const a = cd.insert[cdii]; - const b = cd.remove[cdri]; - if ($deltaAny.check(a) && $deltaAny.check(b) && a.name === b.name) { - d.modify(diff(b, a)); - cdii++; - cdri++; - } else if ($deltaAny.check(b)) { - d.insert(schema.$string.check(a) ? a : [a]); - cdii++; - } else { - d.delete(1); - cdri++; - } - } - for (; cdii < cd.insert.length; cdii++) { - const a = cd.insert[cdii]; - d.insert(schema.$string.check(a) ? a : [a]); - } - d.delete(cd.remove.length - cdri); - } - // create the diff for formatting - if (hasFormatting) { - const formattingDiff = create(); - // update opsIs with content diff. then we can figure out the formatting diff. - const isUpdated = create(); - // copy opsIs to fresh delta - opsIs.forEach(op => { - isUpdated.childCnt += op.length; - list.pushEnd(isUpdated.children, op.clone()); - }); - isUpdated.apply(d); - let shouldI = 0; - let shouldOffset = 0; - let isOp = isUpdated.children.start; - let isOffset = 0; - while (shouldI < opsShould.length && isOp != null) { - const shouldOp = opsShould[shouldI]; - if (!$deleteOp.check(shouldOp) && !$deleteOp.check(isOp)) { - const isFormat = isOp.format; - const minForward = math.min(shouldOp.length - shouldOffset, isOp.length - isOffset); - shouldOffset += minForward; - isOffset += minForward; - if (_function.equalityDeep(shouldOp.format, isFormat)) { - formattingDiff.retain(minForward); - } else { - /** - * @type {FormattingAttributes} - */ - const fupdate = {}; - shouldOp.format != null && object.forEach(shouldOp.format, (v, k) => { - if (!_function.equalityDeep(v, isFormat?.[k] || null)) { - fupdate[k] = v; - } - }); - isFormat && object.forEach(isFormat, (_, k) => { - if (shouldOp?.format?.[k] === undefined) { - fupdate[k] = null; - } - }); - formattingDiff.retain(minForward, fupdate); - } - // update offset and iterators - if (shouldOffset >= shouldOp.length) { - shouldI++; - shouldOffset = 0; - } - if (isOffset >= isOp.length) { - isOp = isOp.next; - isOffset = 0; - } - } - } - d.apply(formattingDiff); - } - return d - }; - const subd = diffAndApply(ops1.slice(change.index, change.index + change.remove.length), ops2.slice(change.index + currIndexOffset2, change.index + currIndexOffset2 + change.insert.length)); - d.append(subd); - lastIndex1 = change.index + change.remove.length; - currIndexOffset2 += change.insert.length - change.remove.length; - } - for (const attr2 of d2.attrs) { - const attr1 = d1.attrs[attr2.key]; - if (attr1 == null || (attr1.fingerprint !== attr2.fingerprint)) { - /* c8 ignore else */ - if ($insertOp.check(attr2)) { - d.set(attr2.key, attr2.value); - } else { - /* c8 ignore next 2 */ - error.unexpectedCase(); - } - } - } - for (const attr1 of d1.attrs) { - if (d2.attrs[attr1.key] == null) { - d.unset(attr1.key); - } - } - } - return /** @type {any} */ (d.done(false)) -}; - -exports.$$delta = $$delta; -exports.$Delta = $Delta; -exports.$anyOp = $anyOp; -exports.$array = $array; -exports.$attribution = $attribution; -exports.$deleteOp = $deleteOp; -exports.$delta = $delta; -exports.$deltaAny = $deltaAny; -exports.$deltaBuilderAny = $deltaBuilderAny; -exports.$deltaMapChangeJson = $deltaMapChangeJson; -exports.$insertOp = $insertOp; -exports.$insertOpWith = $insertOpWith; -exports.$map = $map; -exports.$modifyOp = $modifyOp; -exports.$modifyOpWith = $modifyOpWith; -exports.$retainOp = $retainOp; -exports.$text = $text; -exports.$textOnly = $textOnly; -exports.$textOp = $textOp; -exports.AttrDeleteOp = AttrDeleteOp; -exports.AttrInsertOp = AttrInsertOp; -exports.AttrModifyOp = AttrModifyOp; -exports.DeleteOp = DeleteOp; -exports.Delta = Delta; -exports.DeltaBuilder = DeltaBuilder; -exports.InsertOp = InsertOp; -exports.ModifyOp = ModifyOp; -exports.RetainOp = RetainOp; -exports.TextOp = TextOp; -exports._$delta = _$delta; -exports.array = array; -exports.clone = clone; -exports.create = create; -exports.diff = diff; -exports.map = map; -exports.mergeAttrs = mergeAttrs; -exports.mergeDeltas = mergeDeltas; -exports.random = random; -exports.text = text; -//# sourceMappingURL=delta.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta.cjs.map deleted file mode 100644 index 0846bbc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delta.cjs","sources":["../delta/delta.js"],"sourcesContent":["/**\n * @beta this API is about to change\n *\n * ## Mutability\n *\n * Deltas are mutable by default. But references are often shared, by marking a Delta as \"done\". You\n * may only modify deltas by applying other deltas to them. Casting a Delta to a DeltaBuilder\n * manually, will likely modify \"shared\" state.\n */\n\nimport * as list from '../list.js'\nimport * as object from '../object.js'\nimport * as equalityTrait from '../trait/equality.js'\nimport * as fingerprintTrait from '../trait/fingerprint.js'\nimport * as arr from '../array.js'\nimport * as fun from '../function.js'\nimport * as s from '../schema.js'\nimport * as error from '../error.js'\nimport * as math from '../math.js'\nimport * as rabin from '../hash/rabin.js'\nimport * as encoding from '../encoding.js'\nimport * as buffer from '../buffer.js'\nimport * as patience from '../diff/patience.js'\nimport * as prng from '../prng.js'\n\n/**\n * @typedef {{\n * insert?: string[]\n * insertAt?: number\n * delete?: string[]\n * deleteAt?: number\n * format?: Record\n * formatAt?: number\n * }} Attribution\n */\n\n/**\n * @type {s.Schema}\n */\nexport const $attribution = s.$object({\n insert: s.$array(s.$string).optional,\n insertAt: s.$number.optional,\n delete: s.$array(s.$string).optional,\n deleteAt: s.$number.optional,\n format: s.$record(s.$string, s.$array(s.$string)).optional,\n formatAt: s.$number.optional\n})\n\n/**\n * @typedef {s.Unwrap<$anyOp>} DeltaOps\n */\n\n/**\n * @typedef {{ [key: string]: any }} FormattingAttributes\n */\n\n/**\n * @typedef {{\n * type: 'delta',\n * name?: string,\n * attrs?: { [Key in string|number]: DeltaAttrOpJSON },\n * children?: Array\n * }} DeltaJSON\n */\n\n/**\n * @typedef {{ type: 'insert', insert: string|Array, format?: { [key: string]: any }, attribution?: Attribution } | { delete: number } | { type: 'retain', retain: number, format?: { [key:string]: any }, attribution?: Attribution } | { type: 'modify', value: object }} DeltaListOpJSON\n */\n\n/**\n * @typedef {{ type: 'insert', value: any, prevValue?: any, attribution?: Attribution } | { type: 'delete', prevValue?: any, attribution?: Attribution } | { type: 'modify', value: DeltaJSON }} DeltaAttrOpJSON\n */\n\n/**\n * @typedef {TextOp|InsertOp|DeleteOp|RetainOp|ModifyOp} ChildrenOpAny\n */\n\n/**\n * @typedef {AttrInsertOp|AttrDeleteOp|AttrModifyOp} AttrOpAny\n */\n\n/**\n * @typedef {ChildrenOpAny|AttrOpAny} _OpAny\n */\n\n/**\n * @type {s.Schema}\n */\nexport const $deltaMapChangeJson = s.$union(\n s.$object({ type: s.$literal('insert'), value: s.$any, prevValue: s.$any.optional, attribution: $attribution.optional }),\n s.$object({ type: s.$literal('modify'), value: s.$any }),\n s.$object({ type: s.$literal('delete'), prevValue: s.$any.optional, attribution: $attribution.optional })\n)\n\n/**\n * @template {{[key:string]: any} | null} Attrs\n * @param {Attrs} attrs\n * @return {Attrs}\n */\nconst _cloneAttrs = attrs => attrs == null ? attrs : { ...attrs }\n/**\n * @template {any} MaybeDelta\n * @param {MaybeDelta} maybeDelta\n * @return {MaybeDelta}\n */\nconst _markMaybeDeltaAsDone = maybeDelta => $deltaAny.check(maybeDelta) ? /** @type {MaybeDelta} */ (maybeDelta.done()) : maybeDelta\n\nexport class TextOp extends list.ListNode {\n /**\n * @param {string} insert\n * @param {FormattingAttributes|null} format\n * @param {Attribution?} attribution\n */\n constructor (insert, format, attribution) {\n super()\n // Whenever this is modified, make sure to clear _fingerprint\n /**\n * @readonly\n * @type {string}\n */\n this.insert = insert\n /**\n * @readonly\n * @type {FormattingAttributes|null}\n */\n this.format = format\n this.attribution = attribution\n /**\n * @type {string?}\n */\n this._fingerprint = null\n }\n\n /**\n * @param {string} newVal\n */\n _updateInsert (newVal) {\n // @ts-ignore\n this.insert = newVal\n this._fingerprint = null\n }\n\n /**\n * @return {'insert'}\n */\n get type () {\n return 'insert'\n }\n\n get length () {\n return this.insert.length\n }\n\n get fingerprint () {\n return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => {\n encoding.writeVarUint(encoder, 0) // textOp type: 0\n encoding.writeVarString(encoder, this.insert)\n encoding.writeAny(encoder, this.format)\n })))\n }\n\n /**\n * Remove a part of the operation (similar to Array.splice)\n *\n * @param {number} offset\n * @param {number} len\n */\n _splice (offset, len) {\n this._fingerprint = null\n // @ts-ignore\n this.insert = this.insert.slice(0, offset) + this.insert.slice(offset + len)\n return this\n }\n\n /**\n * @return {DeltaListOpJSON}\n */\n toJSON () {\n const { insert, format, attribution } = this\n return object.assign(/** @type {{type: 'insert', insert: string}} */ ({ type: 'insert', insert }), format != null ? { format } : ({}), attribution != null ? { attribution } : ({}))\n }\n\n /**\n * @param {TextOp} other\n */\n [equalityTrait.EqualityTraitSymbol] (other) {\n return fun.equalityDeep(this.insert, other.insert) && fun.equalityDeep(this.format, other.format) && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n /**\n * @return {TextOp}\n */\n clone (start = 0, end = this.length) {\n return new TextOp(this.insert.slice(start, end), _cloneAttrs(this.format), _cloneAttrs(this.attribution))\n }\n}\n\n/**\n * @template {fingerprintTrait.Fingerprintable} ArrayContent\n */\nexport class InsertOp extends list.ListNode {\n /**\n * @param {Array} insert\n * @param {FormattingAttributes|null} format\n * @param {Attribution?} attribution\n */\n constructor (insert, format, attribution) {\n super()\n /**\n * @readonly\n * @type {Array}\n */\n this.insert = insert\n /**\n * @readonly\n * @type {FormattingAttributes?}\n */\n this.format = format\n /**\n * @readonly\n * @type {Attribution?}\n */\n this.attribution = attribution\n /**\n * @type {string?}\n */\n this._fingerprint = null\n }\n\n /**\n * @param {ArrayContent} newVal\n */\n _updateInsert (newVal) {\n // @ts-ignore\n this.insert = newVal\n this._fingerprint = null\n }\n\n /**\n * @return {'insert'}\n */\n get type () {\n return 'insert'\n }\n\n get length () {\n return this.insert.length\n }\n\n /**\n * @param {number} i\n * @return {Extract}\n */\n _modValue (i) {\n /**\n * @type {any}\n */\n let d = this.insert[i]\n this._fingerprint = null\n $deltaAny.expect(d)\n if (d.isDone) {\n // @ts-ignore\n this.insert[i] = (d = clone(d))\n return d\n }\n return d\n }\n\n get fingerprint () {\n return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => {\n encoding.writeVarUint(encoder, 1) // insertOp type: 1\n encoding.writeVarUint(encoder, this.insert.length)\n this.insert.forEach(ins => {\n encoding.writeVarString(encoder, fingerprintTrait.fingerprint(ins))\n })\n encoding.writeAny(encoder, this.format)\n })))\n }\n\n /**\n * Remove a part of the operation (similar to Array.splice)\n *\n * @param {number} offset\n * @param {number} len\n */\n _splice (offset, len) {\n this._fingerprint = null\n this.insert.splice(offset, len)\n return this\n }\n\n /**\n * @return {DeltaListOpJSON}\n */\n toJSON () {\n const { insert, format, attribution } = this\n return object.assign({ type: /** @type {'insert'} */ ('insert'), insert: insert.map(ins => $deltaAny.check(ins) ? ins.toJSON() : ins) }, format ? { format } : ({}), attribution != null ? { attribution } : ({}))\n }\n\n /**\n * @param {InsertOp} other\n */\n [equalityTrait.EqualityTraitSymbol] (other) {\n return fun.equalityDeep(this.insert, other.insert) && fun.equalityDeep(this.format, other.format) && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n /**\n * @return {InsertOp}\n */\n clone (start = 0, end = this.length) {\n return new InsertOp(this.insert.slice(start, end).map(_markMaybeDeltaAsDone), _cloneAttrs(this.format), _cloneAttrs(this.attribution))\n }\n}\n\n/**\n * @template {fingerprintTrait.Fingerprintable} [Children=never]\n * @template {string} [Text=never]\n */\nexport class DeleteOp extends list.ListNode {\n /**\n * @param {number} len\n */\n constructor (len) {\n super()\n this.delete = len\n /**\n * @type {(Children|Text) extends never ? null : (Delta?)}\n */\n this.prevValue = null\n /**\n * @type {string|null}\n */\n this._fingerprint = null\n }\n\n /**\n * @return {'delete'}\n */\n get type () {\n return 'delete'\n }\n\n get length () {\n return 0\n }\n\n get fingerprint () {\n return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => {\n encoding.writeVarUint(encoder, 2) // deleteOp type: 2\n encoding.writeVarUint(encoder, this.delete)\n })))\n }\n\n /**\n * Remove a part of the operation (similar to Array.splice)\n *\n * @param {number} _offset\n * @param {number} len\n */\n _splice (_offset, len) {\n this.prevValue = /** @type {any} */ (this.prevValue?.slice(_offset, len) || null)\n this._fingerprint = null\n this.delete -= len\n return this\n }\n\n /**\n * @return {DeltaListOpJSON}\n */\n toJSON () {\n return { delete: this.delete }\n }\n\n /**\n * @param {DeleteOp} other\n */\n [equalityTrait.EqualityTraitSymbol] (other) {\n return this.delete === other.delete\n }\n\n clone (start = 0, end = this.delete) {\n return new DeleteOp(end - start)\n }\n}\n\nexport class RetainOp extends list.ListNode {\n /**\n * @param {number} retain\n * @param {FormattingAttributes|null} format\n * @param {Attribution?} attribution\n */\n constructor (retain, format, attribution) {\n super()\n /**\n * @readonly\n * @type {number}\n */\n this.retain = retain\n /**\n * @readonly\n * @type {FormattingAttributes?}\n */\n this.format = format\n /**\n * @readonly\n * @type {Attribution?}\n */\n this.attribution = attribution\n /**\n * @type {string|null}\n */\n this._fingerprint = null\n }\n\n /**\n * @return {'retain'}\n */\n get type () {\n return 'retain'\n }\n\n get length () {\n return this.retain\n }\n\n get fingerprint () {\n return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => {\n encoding.writeVarUint(encoder, 3) // retainOp type: 3\n encoding.writeVarUint(encoder, this.retain)\n encoding.writeAny(encoder, this.format)\n })))\n }\n\n /**\n * Remove a part of the operation (similar to Array.splice)\n *\n * @param {number} _offset\n * @param {number} len\n */\n _splice (_offset, len) {\n // @ts-ignore\n this.retain -= len\n this._fingerprint = null\n return this\n }\n\n /**\n * @return {DeltaListOpJSON}\n */\n toJSON () {\n const { retain, format, attribution } = this\n return object.assign({ type: /** @type {'retain'} */ ('retain'), retain }, format ? { format } : {}, attribution != null ? { attribution } : {})\n }\n\n /**\n * @param {RetainOp} other\n */\n [equalityTrait.EqualityTraitSymbol] (other) {\n return this.retain === other.retain && fun.equalityDeep(this.format, other.format) && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n clone (start = 0, end = this.retain) {\n return new RetainOp(end - start, _cloneAttrs(this.format), _cloneAttrs(this.attribution))\n }\n}\n\n/**\n * Delta that can be applied on a YType Embed\n *\n * @template {DeltaAny} [DTypes=DeltaAny]\n */\nexport class ModifyOp extends list.ListNode {\n /**\n * @param {DTypes} delta\n * @param {FormattingAttributes|null} format\n * @param {Attribution?} attribution\n */\n constructor (delta, format, attribution) {\n super()\n /**\n * @readonly\n * @type {DTypes}\n */\n this.value = delta\n /**\n * @readonly\n * @type {FormattingAttributes?}\n */\n this.format = format\n /**\n * @readonly\n * @type {Attribution?}\n */\n this.attribution = attribution\n /**\n * @type {string|null}\n */\n this._fingerprint = null\n }\n\n /**\n * @return {'modify'}\n */\n get type () {\n return 'modify'\n }\n\n get length () {\n return 1\n }\n\n /**\n * @type {DeltaBuilderAny}\n */\n get _modValue () {\n /**\n * @type {any}\n */\n const d = this.value\n this._fingerprint = null\n if (d.isDone) {\n // @ts-ignore\n return (this.value = clone(d))\n }\n return d\n }\n\n get fingerprint () {\n // don't cache fingerprint because we don't know when delta changes\n return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => {\n encoding.writeVarUint(encoder, 4) // modifyOp type: 4\n encoding.writeVarString(encoder, this.value.fingerprint)\n encoding.writeAny(encoder, this.format)\n })))\n }\n\n /**\n * Remove a part of the operation (similar to Array.splice)\n *\n * @param {number} _offset\n * @param {number} _len\n */\n _splice (_offset, _len) {\n return this\n }\n\n /**\n * @return {DeltaListOpJSON}\n */\n toJSON () {\n const { value, attribution, format } = this\n return object.assign({ type: /** @type {'modify'} */ ('modify'), value: value.toJSON() }, format ? { format } : {}, attribution != null ? { attribution } : {})\n }\n\n /**\n * @param {ModifyOp} other\n */\n [equalityTrait.EqualityTraitSymbol] (other) {\n return this.value[equalityTrait.EqualityTraitSymbol](other.value) && fun.equalityDeep(this.format, other.format) && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n /**\n * @return {ModifyOp}\n */\n clone () {\n return new ModifyOp(/** @type {DTypes} */ (this.value.done()), _cloneAttrs(this.format), _cloneAttrs(this.attribution))\n }\n}\n\n/**\n * @template {fingerprintTrait.Fingerprintable} V\n * @template {string|number} [K=any]\n */\nexport class AttrInsertOp {\n /**\n * @param {K} key\n * @param {V} value\n * @param {V|undefined} prevValue\n * @param {Attribution?} attribution\n */\n constructor (key, value, prevValue, attribution) {\n /**\n * @readonly\n * @type {K}\n */\n this.key = key\n /**\n * @readonly\n * @type {V}\n */\n this.value = value\n /**\n * @readonly\n * @type {V|undefined}\n */\n this.prevValue = prevValue\n /**\n * @readonly\n * @type {Attribution?}\n */\n this.attribution = attribution\n /**\n * @type {string|null}\n */\n this._fingerprint = null\n }\n\n /**\n * @return {'insert'}\n */\n get type () { return 'insert' }\n\n /**\n * @type {DeltaBuilderAny}\n */\n get _modValue () {\n /**\n * @type {any}\n */\n const v = this.value\n this._fingerprint = null\n if ($deltaAny.check(v) && v.isDone) {\n // @ts-ignore\n return (this.value = clone(v))\n }\n return v\n }\n\n get fingerprint () {\n return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => {\n encoding.writeVarUint(encoder, 5) // map insert type: 5\n encoding.writeAny(encoder, this.key)\n if ($deltaAny.check(this.value)) {\n encoding.writeUint8(encoder, 0)\n encoding.writeVarString(encoder, this.value.fingerprint)\n } else {\n encoding.writeUint8(encoder, 1)\n encoding.writeAny(encoder, this.value)\n }\n })))\n }\n\n toJSON () {\n const v = this.value\n const prevValue = this.prevValue\n const attribution = this.attribution\n return object.assign({\n type: this.type,\n value: $deltaAny.check(v) ? v.toJSON() : v\n }, attribution != null ? { attribution } : {}, prevValue !== undefined ? { prevValue } : {})\n }\n\n /**\n * @param {AttrInsertOp} other\n */\n [equalityTrait.EqualityTraitSymbol] (other) {\n return this.key === other.key && fun.equalityDeep(this.value, other.value) && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n /**\n * @return {AttrInsertOp}\n */\n clone () {\n return new AttrInsertOp(this.key, _markMaybeDeltaAsDone(this.value), _markMaybeDeltaAsDone(this.prevValue), _cloneAttrs(this.attribution))\n }\n}\n\n/**\n * @template V\n * @template {string|number} [K=string]\n */\nexport class AttrDeleteOp {\n /**\n * @param {K} key\n * @param {V|undefined} prevValue\n * @param {Attribution?} attribution\n */\n constructor (key, prevValue, attribution) {\n /**\n * @type {K}\n */\n this.key = key\n /**\n * @type {V|undefined}\n */\n this.prevValue = prevValue\n this.attribution = attribution\n /**\n * @type {string|null}\n */\n this._fingerprint = null\n }\n\n get value () { return undefined }\n\n /**\n * @type {'delete'}\n */\n get type () { return 'delete' }\n\n get fingerprint () {\n return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => {\n encoding.writeVarUint(encoder, 6) // map delete type: 6\n encoding.writeAny(encoder, this.key)\n })))\n }\n\n /**\n * @return {DeltaAttrOpJSON}\n */\n toJSON () {\n const {\n type, attribution, prevValue\n } = this\n return object.assign({ type }, attribution != null ? { attribution } : {}, prevValue !== undefined ? { prevValue } : {})\n }\n\n /**\n * @param {AttrDeleteOp} other\n */\n [equalityTrait.EqualityTraitSymbol] (other) {\n return this.key === other.key && fun.equalityDeep(this.attribution, other.attribution)\n }\n\n clone () {\n return new AttrDeleteOp(this.key, _markMaybeDeltaAsDone(this.prevValue), _cloneAttrs(this.attribution))\n }\n}\n\n/**\n * @template {DeltaAny} [Modifier=DeltaAny]\n * @template {string|number} [K=string]\n */\nexport class AttrModifyOp {\n /**\n * @param {K} key\n * @param {Modifier} delta\n */\n constructor (key, delta) {\n /**\n * @readonly\n * @type {K}\n */\n this.key = key\n /**\n * @readonly\n * @type {Modifier}\n */\n this.value = delta\n /**\n * @type {string|null}\n */\n this._fingerprint = null\n }\n\n /**\n * @type {'modify'}\n */\n get type () { return 'modify' }\n\n get fingerprint () {\n return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => {\n encoding.writeVarUint(encoder, 7) // map modify type: 7\n encoding.writeAny(encoder, this.key)\n encoding.writeVarString(encoder, this.value.fingerprint)\n })))\n }\n\n /**\n * @return {DeltaBuilder}\n */\n get _modValue () {\n this._fingerprint = null\n if (this.value.isDone) {\n // @ts-ignore\n this.value = /** @type {any} */ (clone(this.value))\n }\n // @ts-ignore\n return this.value\n }\n\n /**\n * @return {DeltaAttrOpJSON}\n */\n toJSON () {\n return {\n type: this.type,\n value: this.value.toJSON()\n }\n }\n\n /**\n * @param {AttrModifyOp} other\n */\n [equalityTrait.EqualityTraitSymbol] (other) {\n return this.key === other.key && this.value[equalityTrait.EqualityTraitSymbol](other.value)\n }\n\n /**\n * @return {AttrModifyOp}\n */\n clone () {\n return new AttrModifyOp(this.key, /** @type {Modifier} */ (this.value.done()))\n }\n}\n\n/**\n * @type {s.Schema | DeleteOp>}\n */\nexport const $deleteOp = s.$custom(o => o != null && (o.constructor === DeleteOp || o.constructor === AttrDeleteOp))\n\n/**\n * @type {s.Schema | InsertOp>}\n */\nexport const $insertOp = s.$custom(o => o != null && (o.constructor === AttrInsertOp || o.constructor === InsertOp))\n\n/**\n * @template {fingerprintTrait.Fingerprintable} Content\n * @param {s.Schema} $content\n * @return {s.Schema | InsertOp>}\n */\nexport const $insertOpWith = $content => s.$custom(o =>\n o != null && (\n (o.constructor === AttrInsertOp && $content.check(/** @type {AttrInsertOp} */ (o).value)) ||\n (o.constructor === InsertOp && /** @type {InsertOp} */ (o).insert.every(ins => $content.check(ins)))\n )\n)\n\n/**\n * @type {s.Schema}\n */\nexport const $textOp = s.$constructedBy(TextOp)\n\n/**\n * @type {s.Schema}\n */\nexport const $retainOp = s.$constructedBy(RetainOp)\n\n/**\n * @type {s.Schema}\n */\nexport const $modifyOp = s.$custom(o => o != null && (o.constructor === AttrModifyOp || o.constructor === ModifyOp))\n\n/**\n * @template {DeltaAny} Modify\n * @param {s.Schema} $content\n * @return {s.Schema | ModifyOp>}\n */\nexport const $modifyOpWith = $content => s.$custom(o =>\n o != null && (\n (o.constructor === AttrModifyOp && $content.check(/** @type {AttrModifyOp} */ (o).value)) ||\n (o.constructor === ModifyOp && $content.check(/** @type {ModifyOp} */ (o).value))\n )\n)\n\nexport const $anyOp = s.$union($insertOp, $deleteOp, $textOp, $modifyOp)\n\n/**\n * @template {Array|string} C1\n * @template {Array|string} C2\n * @typedef {Extract> extends never\n * ? never\n * : (Array<(Extract> extends Array ? (unknown extends AC1 ? never : AC1) : never)>)} MergeListArrays\n */\n\n/**\n * @template {{[Key in string|number]: any}} Attrs\n * @template {string|number} Key\n * @template {any} Val\n * @typedef {{ [K in (Key | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (Key extends K ? Val : never) }} AddToAttrs\n */\n\n/**\n * @template {{[Key in string|number|symbol]: any}} Attrs\n * @template {{[Key in string|number|symbol]: any}} NewAttrs\n * @typedef {{ [K in (keyof NewAttrs | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (unknown extends NewAttrs[K] ? never : NewAttrs[K]) }} MergeAttrs\n */\n\n/**\n * @template X\n * @typedef {0 extends (1 & X) ? null : X} _AnyToNull\n */\n\n/**\n * @template {s.Schema>|null} Schema\n * @typedef {_AnyToNull extends null ? Delta : (Schema extends s.Schema ? D : never)} AllowedDeltaFromSchema\n */\n\n/**\n * @typedef {Delta} DeltaAny\n */\n/**\n * @typedef {DeltaBuilder} DeltaBuilderAny\n */\n\n/**\n * @template {string} [NodeName=any]\n * @template {{[k:string|number]:any}} [Attrs={}]\n * @template {fingerprintTrait.Fingerprintable} [Children=never]\n * @template {string} [Text=never]\n * @template {s.Schema>|null} [Schema=any]\n */\nexport class Delta {\n /**\n * @param {NodeName} [name]\n * @param {Schema} [$schema]\n */\n constructor (name, $schema) {\n this.name = name || null\n this.$schema = $schema || null\n /**\n * @type {{ [K in keyof Attrs]?: K extends string|number ? (AttrInsertOp|AttrDeleteOp|(Delta extends Attrs[K] ? AttrModifyOp,K> : never)) : never }\n * & { [Symbol.iterator]: () => Iterator<{ [K in keyof Attrs]: K extends string|number ? (AttrInsertOp|AttrDeleteOp|(Delta extends Attrs[K] ? AttrModifyOp,K> : never)) : never }[keyof Attrs]> }\n * }\n */\n this.attrs = /** @type {any} */ ({\n * [Symbol.iterator] () {\n for (const k in this) {\n yield this[k]\n }\n }\n })\n\n /**\n * @type {list.List<\n * RetainOp\n * | DeleteOp\n * | (Text extends never ? never : TextOp)\n * | (Children extends never ? never : InsertOp)\n * | (Delta extends Children ? ModifyOp>> : never)\n * >}\n */\n this.children = /** @type {any} */ (list.create())\n this.childCnt = 0\n /**\n * @type {any}\n */\n this.origin = null\n /**\n * @type {string|null}\n */\n this._fingerprint = null\n this.isDone = false\n }\n\n /**\n * @type {string}\n */\n get fingerprint () {\n return this._fingerprint || (this._fingerprint = buffer.toBase64(encoding.encode(encoder => {\n encoding.writeUint32(encoder, 0xf2ae5680) // \"magic number\" that ensures that different types of content don't yield the same fingerprint\n encoding.writeAny(encoder, this.name)\n /**\n * @type {Array}\n */\n const keys = []\n for (const attr of this.attrs) {\n keys.push(attr.key)\n }\n keys.sort((a, b) => {\n const aIsString = s.$string.check(a)\n const bIsString = s.$string.check(b)\n // numbers first\n // in ascending order\n return (aIsString && bIsString)\n ? a.localeCompare(b)\n : (aIsString ? 1 : (bIsString ? -1 : (a - b)))\n })\n encoding.writeVarUint(encoder, keys.length)\n for (const key of keys) {\n encoding.writeVarString(encoder, /** @type {any} */ (this.attrs[/** @type {keyof Attrs} */ (key)]).fingerprint)\n }\n encoding.writeVarUint(encoder, this.children.len)\n for (const child of this.children) {\n encoding.writeVarString(encoder, child.fingerprint)\n }\n return buffer.toBase64(rabin.fingerprint(rabin.StandardIrreducible128, encoding.toUint8Array(encoder)))\n })))\n }\n\n [fingerprintTrait.FingerprintTraitSymbol] () {\n return this.fingerprint\n }\n\n isEmpty () {\n return object.isEmpty(this.attrs) && list.isEmpty(this.children)\n }\n\n /**\n * @return {DeltaJSON}\n */\n toJSON () {\n const name = this.name\n /**\n * @type {any}\n */\n const attrs = {}\n /**\n * @type {any}\n */\n const children = []\n for (const attr of this.attrs) {\n attrs[attr.key] = attr.toJSON()\n }\n this.children.forEach(val => {\n children.push(val.toJSON())\n })\n return object.assign(\n { type: /** @type {'delta'} */ ('delta') },\n (name != null ? { name } : {}),\n (object.isEmpty(attrs) ? {} : { attrs }),\n (children.length > 0 ? { children } : {})\n )\n }\n\n /**\n * @param {Delta} other\n * @return {boolean}\n */\n equals (other) {\n return this[equalityTrait.EqualityTraitSymbol](other)\n }\n\n /**\n * @param {any} other\n * @return {boolean}\n */\n [equalityTrait.EqualityTraitSymbol] (other) {\n // @todo it is only necessary to compare finrerprints OR do a deep equality check (remove\n // childCnt as well)\n return this.name === other.name && fun.equalityDeep(this.attrs, other.attrs) && fun.equalityDeep(this.children, other.children) && this.childCnt === other.childCnt\n }\n\n /**\n * @return {DeltaBuilder}\n */\n clone () {\n return this.slice(0, this.childCnt)\n }\n\n /**\n * @param {number} start\n * @param {number} end\n * @return {DeltaBuilder}\n */\n slice (start = 0, end = this.childCnt) {\n const cpy = /** @type {DeltaAny} */ (new DeltaBuilder(/** @type {any} */ (this.name), this.$schema))\n cpy.origin = this.origin\n // copy attrs\n for (const op of this.attrs) {\n cpy.attrs[op.key] = /** @type {any} */ (op.clone())\n }\n // copy children\n const slicedLen = end - start\n let remainingLen = slicedLen\n /**\n * @type {ChildrenOpAny?}\n */\n let currNode = this.children.start\n let currNodeOffset = 0\n while (start > 0 && currNode != null) {\n if (currNode.length <= start) {\n start -= currNode.length\n currNode = currNode.next\n } else {\n currNodeOffset = start\n start = 0\n }\n }\n if (currNodeOffset > 0 && currNode) {\n const ncpy = currNode.clone(currNodeOffset, currNodeOffset + math.min(remainingLen, currNode.length - currNodeOffset))\n list.pushEnd(cpy.children, ncpy)\n remainingLen -= ncpy.length\n currNode = currNode.next\n }\n while (currNode != null && currNode.length <= remainingLen) {\n list.pushEnd(cpy.children, currNode.clone())\n remainingLen -= currNode.length\n currNode = currNode.next\n }\n if (currNode != null && remainingLen > 0) {\n list.pushEnd(cpy.children, currNode.clone(0, remainingLen))\n remainingLen -= math.min(currNode.length, remainingLen)\n }\n cpy.childCnt = slicedLen - remainingLen\n // @ts-ignore\n return cpy\n }\n\n /**\n * Mark this delta as done and perform some cleanup (e.g. remove appended retains without\n * formats&attributions). In the future, there might be additional merge operations that can be\n * performed to result in smaller deltas. Set `markAsDone=false` to only perform the cleanup.\n *\n * @return {Delta}\n */\n done (markAsDone = true) {\n if (!this.isDone) {\n this.isDone = markAsDone\n const cs = this.children\n for (let end = cs.end; end !== null && $retainOp.check(end) && end.format == null && end.attribution == null; end = cs.end) {\n this.childCnt -= end.length\n list.popEnd(cs)\n }\n }\n return this\n }\n}\n\n/**\n * @template {DeltaAny} D\n * @param {D} d\n * @return {D extends DeltaBuilder ? DeltaBuilder : never}\n */\nexport const clone = d => /** @type {any} */ (d.slice(0, d.childCnt))\n\n/**\n * Try merging this op with the previous op\n * @param {list.List} parent\n * @param {InsertOp|RetainOp|DeleteOp|TextOp|ModifyOp} op\n */\nconst tryMergeWithPrev = (parent, op) => {\n const prevOp = op.prev\n if (\n prevOp?.constructor !== op.constructor ||\n (\n (!$deleteOp.check(op) && !$modifyOp.check(op)) && (!fun.equalityDeep(op.format, /** @type {InsertOp} */ (prevOp).format) || !fun.equalityDeep(op.attribution, /** @type {InsertOp} */ (prevOp).attribution))\n )\n ) {\n // constructor mismatch or format/attribution mismatch\n return\n }\n // can be merged\n if ($insertOp.check(op)) {\n /** @type {InsertOp} */ (prevOp).insert.push(...op.insert)\n } else if ($retainOp.check(op)) {\n // @ts-ignore\n /** @type {RetainOp} */ (prevOp).retain += op.retain\n } else if ($deleteOp.check(op)) {\n /** @type {DeleteOp} */ (prevOp).delete += op.delete\n } else if ($textOp.check(op)) {\n /** @type {TextOp} */ (prevOp)._updateInsert(/** @type {TextOp} */ (prevOp).insert + op.insert)\n } else {\n error.unexpectedCase()\n }\n list.remove(parent, op)\n}\n\n/**\n * Ensures that the delta can be edited. clears _fingerprint cache.\n *\n * @param {any} d\n */\nconst modDeltaCheck = d => {\n if (d.isDone) {\n /**\n * You tried to modify a delta after it has been marked as \"done\".\n */\n throw error.create(\"Readonly Delta can't be modified\")\n }\n d._fingerprint = null\n}\n\n/**\n * @template {string} [NodeName=any]\n * @template {{[key:string|number]:any}} [Attrs={}]\n * @template {fingerprintTrait.Fingerprintable} [Children=never]\n * @template {string} [Text=never]\n * @template {s.Schema>|null} [Schema=any]\n * @extends {Delta}\n */\nexport class DeltaBuilder extends Delta {\n /**\n * @param {NodeName} [name]\n * @param {Schema} [$schema]\n */\n constructor (name, $schema) {\n super(name, $schema)\n /**\n * @type {FormattingAttributes?}\n */\n this.usedAttributes = null\n /**\n * @type {Attribution?}\n */\n this.usedAttribution = null\n }\n\n /**\n * @param {Attribution?} attribution\n */\n useAttribution (attribution) {\n modDeltaCheck(this)\n this.usedAttribution = attribution\n return this\n }\n\n /**\n * @param {FormattingAttributes?} attributes\n * @return {this}\n */\n useAttributes (attributes) {\n modDeltaCheck(this)\n this.usedAttributes = attributes\n return this\n }\n\n /**\n * @param {string} name\n * @param {any} value\n */\n updateUsedAttributes (name, value) {\n modDeltaCheck(this)\n if (value == null) {\n this.usedAttributes = object.assign({}, this.usedAttributes)\n delete this.usedAttributes?.[name]\n if (object.isEmpty(this.usedAttributes)) {\n this.usedAttributes = null\n }\n } else if (!fun.equalityDeep(this.usedAttributes?.[name], value)) {\n this.usedAttributes = object.assign({}, this.usedAttributes)\n this.usedAttributes[name] = value\n }\n return this\n }\n\n /**\n * @template {keyof Attribution} NAME\n * @param {NAME} name\n * @param {Attribution[NAME]?} value\n */\n updateUsedAttribution (name, value) {\n modDeltaCheck(this)\n if (value == null) {\n this.usedAttribution = object.assign({}, this.usedAttribution)\n delete this.usedAttribution?.[name]\n if (object.isEmpty(this.usedAttribution)) {\n this.usedAttribution = null\n }\n } else if (!fun.equalityDeep(this.usedAttribution?.[name], value)) {\n this.usedAttribution = object.assign({}, this.usedAttribution)\n this.usedAttribution[name] = value\n }\n return this\n }\n\n /**\n * @template {AllowedDeltaFromSchema extends Delta ? ((Children extends never ? never : Array) | Text) : never} NewContent\n * @param {NewContent} insert\n * @param {FormattingAttributes?} [formatting]\n * @param {Attribution?} [attribution]\n * @return {DeltaBuilder<\n * NodeName,\n * Attrs,\n * Exclude[number]|Children,\n * (Extract|Text) extends never ? never : string,\n * Schema\n * >}\n */\n insert (insert, formatting = null, attribution = null) {\n modDeltaCheck(this)\n const mergedAttributes = mergeAttrs(this.usedAttributes, formatting)\n const mergedAttribution = mergeAttrs(this.usedAttribution, attribution)\n /**\n * @param {TextOp | InsertOp} lastOp\n */\n const checkMergedEquals = lastOp => (mergedAttributes === lastOp.format || fun.equalityDeep(mergedAttributes, lastOp.format)) && (mergedAttribution === lastOp.attribution || fun.equalityDeep(mergedAttribution, lastOp.attribution))\n const end = this.children.end\n if (s.$string.check(insert)) {\n if ($textOp.check(end) && checkMergedEquals(end)) {\n end._updateInsert(end.insert + insert)\n } else if (insert.length > 0) {\n list.pushEnd(this.children, new TextOp(insert, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution))\n }\n this.childCnt += insert.length\n } else if (arr.isArray(insert)) {\n if ($insertOp.check(end) && checkMergedEquals(end)) {\n // @ts-ignore\n end.insert.push(...insert)\n end._fingerprint = null\n } else if (insert.length > 0) {\n list.pushEnd(this.children, new InsertOp(insert, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution))\n }\n this.childCnt += insert.length\n }\n return /** @type {any} */ (this)\n }\n\n /**\n * @template {AllowedDeltaFromSchema extends Delta ? Extract> : never} NewContent\n * @param {NewContent} modify\n * @param {FormattingAttributes?} formatting\n * @param {Attribution?} attribution\n * @return {DeltaBuilder<\n * NodeName,\n * Attrs,\n * Exclude[number]|Children,\n * (Extract|Text) extends string ? string : never,\n * Schema\n * >}\n */\n modify (modify, formatting = null, attribution = null) {\n modDeltaCheck(this)\n const mergedAttributes = mergeAttrs(this.usedAttributes, formatting)\n const mergedAttribution = mergeAttrs(this.usedAttribution, attribution)\n list.pushEnd(this.children, new ModifyOp(modify, object.isEmpty(mergedAttributes) ? null : mergedAttributes, object.isEmpty(mergedAttribution) ? null : mergedAttribution))\n this.childCnt += 1\n return /** @type {any} */ (this)\n }\n\n /**\n * @param {number} len\n * @param {FormattingAttributes?} [format]\n * @param {Attribution?} [attribution]\n */\n retain (len, format = null, attribution = null) {\n modDeltaCheck(this)\n const mergedFormats = mergeAttrs(this.usedAttributes, format)\n const mergedAttribution = mergeAttrs(this.usedAttribution, attribution)\n const lastOp = /** @type {RetainOp|InsertOp} */ (this.children.end)\n if (lastOp instanceof RetainOp && fun.equalityDeep(mergedFormats, lastOp.format) && fun.equalityDeep(mergedAttribution, lastOp.attribution)) {\n // @ts-ignore\n lastOp.retain += len\n } else if (len > 0) {\n list.pushEnd(this.children, new RetainOp(len, mergedFormats, mergedAttribution))\n }\n this.childCnt += len\n return this\n }\n\n /**\n * @param {number} len\n */\n delete (len) {\n modDeltaCheck(this)\n const lastOp = /** @type {DeleteOp|InsertOp} */ (this.children.end)\n if (lastOp instanceof DeleteOp) {\n lastOp.delete += len\n } else if (len > 0) {\n list.pushEnd(this.children, new DeleteOp(len))\n }\n this.childCnt += len\n return this\n }\n\n /**\n * @template {AllowedDeltaFromSchema extends Delta ? (keyof Attrs) : never} Key\n * @template {AllowedDeltaFromSchema extends Delta ? (Attrs[Key]) : never} Val\n * @param {Key} key\n * @param {Val} val\n * @param {Attribution?} attribution\n * @param {Val|undefined} [prevValue]\n * @return {DeltaBuilder<\n * NodeName,\n * { [K in keyof AddToAttrs]: AddToAttrs[K] },\n * Children,\n * Text,\n * Schema\n * >}\n */\n set (key, val, attribution = null, prevValue) {\n modDeltaCheck(this)\n this.attrs[key] = /** @type {any} */ (new AttrInsertOp(key, val, prevValue, mergeAttrs(this.usedAttribution, attribution)))\n return /** @type {any} */ (this)\n }\n\n /**\n * @template {AllowedDeltaFromSchema extends Delta ? Attrs : never} NewAttrs\n * @param {NewAttrs} attrs\n * @param {Attribution?} attribution\n * @return {DeltaBuilder<\n * NodeName,\n * { [K in keyof MergeAttrs]: MergeAttrs[K] },\n * Children,\n * Text,\n * Schema\n * >}\n */\n setMany (attrs, attribution = null) {\n modDeltaCheck(this)\n for (const k in attrs) {\n this.set(/** @type {any} */ (k), attrs[k], attribution)\n }\n return /** @type {any} */ (this)\n }\n\n /**\n * @template {AllowedDeltaFromSchema extends Delta ? keyof As : never} Key\n * @param {Key} key\n * @param {Attribution?} attribution\n * @param {any} [prevValue]\n * @return {DeltaBuilder<\n * NodeName,\n * { [K in keyof AddToAttrs]: AddToAttrs[K] },\n * Children,\n * Text,\n * Schema\n * >}\n */\n unset (key, attribution = null, prevValue) {\n modDeltaCheck(this)\n this.attrs[key] = /** @type {any} */ (new AttrDeleteOp(key, prevValue, mergeAttrs(this.usedAttribution, attribution)))\n return /** @type {any} */ (this)\n }\n\n /**\n * @template {AllowedDeltaFromSchema extends Delta ? { [K in keyof As]: Extract> extends never ? never : K }[keyof As] : never} Key\n * @template {AllowedDeltaFromSchema extends Delta ? Extract> : never} D\n * @param {Key} key\n * @param {D} modify\n * @return {DeltaBuilder<\n * NodeName,\n * { [K in keyof AddToAttrs]: AddToAttrs[K] },\n * Children,\n * Text,\n * Schema\n * >}\n */\n update (key, modify) {\n modDeltaCheck(this)\n this.attrs[key] = /** @type {any} */ (new AttrModifyOp(key, modify))\n return /** @type {any} */ (this)\n }\n\n /**\n * @param {Delta} other\n */\n apply (other) {\n modDeltaCheck(this)\n this.$schema?.expect(other)\n // apply attrs\n for (const op of other.attrs) {\n const c = /** @type {AttrInsertOp|AttrDeleteOp|AttrModifyOp} */ (this.attrs[op.key])\n if ($modifyOp.check(op)) {\n if ($deltaAny.check(c?.value)) {\n c._modValue.apply(op.value)\n } else {\n // then this is a simple modify\n // @ts-ignore\n this.attrs[op.key] = op.clone()\n }\n } else if ($insertOp.check(op)) {\n // @ts-ignore\n op.prevValue = c?.value\n // @ts-ignore\n this.attrs[op.key] = op.clone()\n } else if ($deleteOp.check(op)) {\n op.prevValue = c?.value\n delete this.attrs[op.key]\n }\n }\n // apply children\n /**\n * @type {ChildrenOpAny?}\n */\n let opsI = this.children.start\n let offset = 0\n /**\n * At the end, we will try to merge this op, and op.next op with their respective previous op.\n *\n * Hence, anytime an op is cloned, deleted, or inserted (anytime list.* api is used) we must add\n * an op to maybeMergeable.\n *\n * @type {Array|RetainOp|DeleteOp|TextOp|ModifyOp>}\n */\n const maybeMergeable = []\n /**\n * @template {InsertOp|RetainOp|DeleteOp|TextOp|ModifyOp|null} OP\n * @param {OP} op\n * @return {OP}\n */\n const scheduleForMerge = op => {\n op && maybeMergeable.push(op)\n return op\n }\n other.children.forEach(op => {\n if ($textOp.check(op) || $insertOp.check(op)) {\n if (offset === 0) {\n list.insertBetween(this.children, opsI == null ? this.children.end : opsI.prev, opsI, scheduleForMerge(op.clone()))\n } else {\n // @todo inmplement \"splitHelper\" and \"insertHelper\" - I'm splitting all the time and\n // forget to update opsI\n if (opsI == null) error.unexpectedCase()\n const cpy = scheduleForMerge(opsI.clone(offset))\n opsI._splice(offset, opsI.length - offset)\n list.insertBetween(this.children, opsI, opsI.next || null, cpy)\n list.insertBetween(this.children, opsI, cpy || null, scheduleForMerge(op.clone()))\n opsI = cpy\n offset = 0\n }\n this.childCnt += op.insert.length\n } else if ($retainOp.check(op)) {\n let retainLen = op.length\n\n if (offset > 0 && opsI != null && op.format != null && !$deleteOp.check(opsI) && !object.every(op.format, (v, k) => fun.equalityDeep(v, /** @type {InsertOp|RetainOp|ModifyOp} */ (opsI).format?.[k] || null))) {\n // need to split current op\n const cpy = scheduleForMerge(opsI.clone(offset))\n opsI._splice(offset, opsI.length - offset)\n list.insertBetween(this.children, opsI, opsI.next || null, cpy)\n opsI = cpy\n offset = 0\n }\n\n while (opsI != null && opsI.length - offset <= retainLen) {\n op.format != null && updateOpFormat(opsI, op.format)\n retainLen -= opsI.length - offset\n opsI = opsI?.next || null\n offset = 0\n }\n\n if (opsI != null) {\n if (op.format != null && retainLen > 0) {\n // split current op and apply format\n const cpy = scheduleForMerge(opsI.clone(retainLen))\n opsI._splice(retainLen, opsI.length - retainLen)\n list.insertBetween(this.children, opsI, opsI.next || null, cpy)\n updateOpFormat(opsI, op.format)\n opsI = cpy\n } else {\n offset += retainLen\n }\n } else if (retainLen > 0) {\n list.pushEnd(this.children, scheduleForMerge(new RetainOp(retainLen, op.format, op.attribution)))\n this.childCnt += retainLen\n }\n } else if ($deleteOp.check(op)) {\n let remainingLen = op.delete\n while (remainingLen > 0) {\n if (opsI == null) {\n list.pushEnd(this.children, scheduleForMerge(new DeleteOp(remainingLen)))\n this.childCnt += remainingLen\n break\n } else if (opsI instanceof DeleteOp) {\n const delLen = opsI.length - offset\n // the same content can't be deleted twice, remove duplicated deletes\n if (delLen >= remainingLen) {\n offset = 0\n opsI = opsI.next\n } else {\n offset += remainingLen\n }\n remainingLen -= delLen\n } else { // insert / embed / retain / modify ⇒ replace\n // case1: delete o fully\n // case2: delete some part of beginning\n // case3: delete some part of end\n // case4: delete some part of center\n const delLen = math.min(opsI.length - offset, remainingLen)\n this.childCnt -= delLen\n if (opsI.length === delLen) {\n // case 1\n offset = 0\n scheduleForMerge(opsI.next)\n list.remove(this.children, opsI)\n opsI = opsI.next\n } else if (offset === 0) {\n // case 2\n offset = 0\n opsI._splice(0, delLen)\n } else if (offset + delLen === opsI.length) {\n // case 3\n opsI._splice(offset, delLen)\n offset = 0\n opsI = opsI.next\n } else {\n // case 4\n opsI._splice(offset, delLen)\n }\n remainingLen -= delLen\n }\n }\n } else if ($modifyOp.check(op)) {\n if (opsI == null) {\n list.pushEnd(this.children, op.clone())\n this.childCnt += 1\n return\n }\n if ($modifyOp.check(opsI)) {\n opsI._modValue.apply(op.value)\n } else if ($insertOp.check(opsI)) {\n opsI._modValue(offset).apply(op.value)\n } else if ($retainOp.check(opsI)) {\n if (offset > 0) {\n const cpy = scheduleForMerge(opsI.clone(0, offset)) // skipped len\n opsI._splice(0, offset) // new remainder\n list.insertBetween(this.children, opsI.prev, opsI, cpy) // insert skipped len\n offset = 0\n }\n list.insertBetween(this.children, opsI.prev, opsI, scheduleForMerge(op.clone())) // insert skipped len\n if (opsI.length === 1) {\n list.remove(this.children, opsI)\n } else {\n opsI._splice(0, 1)\n scheduleForMerge(opsI)\n }\n } else if ($deleteOp.check(opsI)) {\n // nop\n } else {\n error.unexpectedCase()\n }\n } else {\n error.unexpectedCase()\n }\n })\n maybeMergeable.forEach(op => {\n // check if this is still integrated\n if (op.prev?.next === op) {\n tryMergeWithPrev(this.children, op)\n op.next && tryMergeWithPrev(this.children, op.next)\n }\n })\n return this\n }\n\n /**\n * @param {DeltaAny} other\n * @param {boolean} priority\n */\n rebase (other, priority) {\n modDeltaCheck(this)\n /**\n * Rebase attributes\n *\n * - insert vs delete ⇒ insert takes precedence\n * - insert vs modify ⇒ insert takes precedence\n * - insert vs insert ⇒ priority decides\n * - delete vs modify ⇒ delete takes precedence\n * - delete vs delete ⇒ current delete op is removed because item has already been deleted\n * - modify vs modify ⇒ rebase using priority\n */\n for (const op of this.attrs) {\n if ($insertOp.check(op)) {\n if ($insertOp.check(other.attrs[op.key]) && !priority) {\n delete this.attrs[op.key]\n }\n } else if ($deleteOp.check(op)) {\n const otherOp = other.attrs[/** @type {any} */ (op.key)]\n if ($insertOp.check(otherOp)) {\n delete this.attrs[otherOp.key]\n }\n } else if ($modifyOp.check(op)) {\n const otherOp = other.attrs[/** @type {any} */ (op.key)]\n if (otherOp == null) {\n // nop\n } else if ($modifyOp.check(otherOp)) {\n op._modValue.rebase(otherOp.value, priority)\n } else {\n delete this.attrs[otherOp.key]\n }\n }\n }\n /**\n * Rebase children.\n *\n * Precedence: insert with higher priority comes first. Op with less priority is transformed to\n * be inserted later.\n *\n * @todo always check if inser OR text\n */\n /**\n * @type {ChildrenOpAny?}\n */\n let currChild = this.children.start\n let currOffset = 0\n /**\n * @type {ChildrenOpAny?}\n */\n let otherChild = other.children.start\n let otherOffset = 0\n while (currChild != null && otherChild != null) {\n if ($insertOp.check(currChild) || $textOp.check(currChild)) {\n /**\n * Transforming *insert*. If other is..\n * - insert: transform based on priority\n * - retain/delete/modify: transform next op against other\n */\n if ($insertOp.check(otherChild) || $modifyOp.check(otherChild) || $textOp.check(otherChild)) {\n if (!priority) {\n list.insertBetween(this.children, currChild.prev, currChild, new RetainOp(otherChild.length, null, null))\n this.childCnt += otherChild.length\n // curr is transformed against other, transform curr against next\n otherOffset = otherChild.length\n } else {\n // curr stays as is, transform next op\n currOffset = currChild.length\n }\n } else { // otherChild = delete | retain | modify - curr stays as is, transform next op\n currOffset = currChild.length\n }\n } else if ($modifyOp.check(currChild)) {\n /**\n * Transforming *modify*. If other is..\n * - insert: adjust position\n * - modify: rebase curr modify on other modify\n * - delete: remove modify\n * - retain: adjust offset\n */\n if ($insertOp.check(otherChild) || $textOp.check(otherChild)) {\n // @todo: with all list changes (retain insertions, removal), try to merge the surrounding\n // ops later\n list.insertBetween(this.children, currChild.prev, currChild, new RetainOp(otherChild.length, null, null))\n this.childCnt += otherChild.length\n // curr is transformed against other, transform curr against next\n otherOffset = otherChild.length\n } else {\n if ($modifyOp.check(otherChild)) {\n /** @type {any} */ (currChild.value).rebase(otherChild, priority)\n } else if ($deleteOp.check(otherChild)) {\n list.remove(this.children, currChild)\n this.childCnt -= 1\n }\n currOffset += 1\n otherOffset += 1\n }\n } else { // DeleteOp | RetainOp\n const maxCommonLen = math.min(currChild.length - currOffset, otherChild.length - otherOffset)\n /**\n * Transforming *retain* OR *delete*. If other is..\n * - retain / modify: adjust offsets\n * - delete: shorten curr op\n * - insert: split curr op and insert retain\n */\n if ($retainOp.check(otherChild) || $modifyOp.check(otherChild)) {\n currOffset += maxCommonLen\n otherOffset += maxCommonLen\n } else if ($deleteOp.check(otherChild)) {\n if ($retainOp.check(currChild)) {\n // @ts-ignore\n currChild.retain -= maxCommonLen\n } else if ($deleteOp.check(currChild)) {\n currChild.delete -= maxCommonLen\n }\n this.childCnt -= maxCommonLen\n } else { // insert/text.check(currOp)\n if (currOffset > 0) {\n const leftPart = currChild.clone(currOffset)\n list.insertBetween(this.children, currChild.prev, currChild, leftPart)\n currChild._splice(currOffset, currChild.length - currOffset)\n currOffset = 0\n }\n list.insertBetween(this.children, currChild.prev, currChild, new RetainOp(otherChild.length, null, null))\n this.childCnt += otherChild.length\n otherOffset = otherChild.length\n }\n }\n if (currOffset >= currChild.length) {\n currChild = currChild.next\n currOffset = 0\n }\n if (otherOffset >= otherChild.length) {\n otherChild = otherChild.next\n otherOffset = 0\n }\n }\n return this\n }\n\n /**\n * Same as doing `delta.rebase(other.inverse())`, without creating a temporary delta.\n *\n * @param {DeltaAny} other\n * @param {boolean} priority\n */\n rebaseOnInverse (other, priority) {\n modDeltaCheck(this)\n // @todo\n console.info('method rebaseOnInverse unimplemented')\n return this\n }\n\n /**\n * Append child ops from one op to the other.\n *\n * delta.create().insert('a').append(delta.create().insert('b')) // => insert \"ab\"\n *\n * @template {DeltaAny} OtherDelta\n * @param {OtherDelta} other\n * @return {CastToDelta extends Delta ? DeltaBuilder : never}\n */\n append (other) {\n const children = this.children\n const prevLast = children.end\n // @todo Investigate. Above is a typescript issue. It is necessary to cast OtherDelta to a Delta first before\n // inferring type, otherwise Children will contain Text.\n for (const child of other.children) {\n list.pushEnd(children, child.clone())\n }\n this.childCnt += other.childCnt\n prevLast?.next && tryMergeWithPrev(children, prevLast.next)\n // @ts-ignore\n return this\n }\n}\n\n/**\n * @param {ChildrenOpAny} op\n * @param {{[k:string]:any}} formatUpdate\n */\nconst updateOpFormat = (op, formatUpdate) => {\n if (!$deleteOp.check(op)) {\n // apply formatting attributes\n for (const k in formatUpdate) {\n const v = formatUpdate[k]\n if (v != null || $retainOp.check(op)) {\n // never modify formats\n /** @type {any} */ (op).format = object.assign({}, op.format, { [k]: v })\n } else if (op.format != null) {\n const { [k]: _, ...rest } = op.format\n ;/** @type {any} */ (op).format = rest\n }\n }\n }\n}\n\n/**\n * @template {DeltaAny} D\n * @typedef {D extends DeltaBuilder ? Delta : D} CastToDelta\n */\n\n/**\n * @template {string} NodeName\n * @template {{ [key: string|number]: any }} [Attrs={}]\n * @template {fingerprintTrait.Fingerprintable|never} [Children=never]\n * @template {string|never} [Text=never]\n * @typedef {Delta|RecursiveDelta,Text>} RecursiveDelta\n */\n\n/**\n * @template {string} Name\n * @template {{[k:string|number]:any}} Attrs\n * @template {fingerprintTrait.Fingerprintable} Children\n * @template {boolean} HasText\n * @template {{ [k:string]:any }} Formats\n * @template {boolean} Recursive\n * @extends {s.Schema : never),\n * HasText extends true ? string : never,\n * any>>}\n */\nexport class $Delta extends s.Schema {\n /**\n * @param {s.Schema} $name\n * @param {s.Schema} $attrs\n * @param {s.Schema} $children\n * @param {HasText} hasText\n * @param {s.Schema} $formats\n * @param {Recursive} recursive\n */\n constructor ($name, $attrs, $children, hasText, $formats, recursive) {\n super()\n const $attrsPartial = s.$$object.check($attrs) ? $attrs.partial : $attrs\n if (recursive) {\n // @ts-ignore\n $children = s.$union($children, this)\n }\n this.shape = { $name, $attrs: $attrsPartial, $children, hasText, $formats }\n }\n\n /**\n * @param {any} o\n * @param {s.ValidationError} [err]\n * @return {o is Delta<\n * Name,\n * Attrs,\n * Children|(Recursive extends true ? RecursiveDelta : never),\n * HasText extends true ? string : never,\n * any>}\n */\n check (o, err = undefined) {\n const { $name, $attrs, $children, hasText, $formats } = this.shape\n if (!(o instanceof Delta)) {\n err?.extend(null, 'Delta', o?.constructor.name, 'Constructor match failed')\n } else if (o.name != null && !$name.check(o.name, err)) {\n err?.extend('Delta.name', $name.toString(), o.name, 'Unexpected node name')\n } else if (list.toArray(o.children).some(c => (!hasText && $textOp.check(c)) || (hasText && $textOp.check(c) && c.format != null && !$formats.check(c.format)) || ($insertOp.check(c) && !c.insert.every(ins => $children.check(ins))))) {\n err?.extend('Delta.children', '', '', 'Children don\\'t match the schema')\n } else if (object.some(o.attrs, (op, k) => $insertOp.check(op) && !$attrs.check({ [k]: op.value }, err))) {\n err?.extend('Delta.attrs', '', '', 'Attrs don\\'t match the schema')\n } else {\n return true\n }\n return false\n }\n}\n\n/**\n * @template {s.Schema|string|Array} [NodeNameSchema=s.Schema]\n * @template {s.Schema<{ [key: string|number]: any }>|{ [key:string|number]:any }} [AttrsSchema=s.Schema<{}>]\n * @template {any} [ChildrenSchema=s.Schema]\n * @template {boolean} [HasText=false]\n * @template {boolean} [Recursive=false]\n * @template {{ [k:string]:any }} [Formats={[k:string]:any}]\n * @param {object} opts\n * @param {NodeNameSchema?} [opts.name]\n * @param {AttrsSchema?} [opts.attrs] What key-value pairs are included.\n * @param {ChildrenSchema?} [opts.children] The type of content in `insertOp`\n * @param {HasText} [opts.text] Whether this delta contains text using `textOp`\n * @param {Formats} [opts.formats]\n * @param {Recursive} [opts.recursive]\n * @return {[s.Unwrap>,s.Unwrap>,s.Unwrap>] extends [infer NodeName, infer Attrs, infer Children] ? s.Schema : never),\n * HasText extends true ? string : never\n * >> : never}\n */\nexport const $delta = ({ name, attrs, children, text, formats, recursive }) => /** @type {any} */ (new $Delta(\n name == null ? s.$any : s.$(name),\n /** @type {any} */ (attrs == null ? s.$object({}) : s.$(attrs)),\n /** @type {any} */ (children == null ? s.$never : s.$(children)),\n text ?? false,\n formats == null ? s.$any : s.$(formats),\n recursive ?? false\n))\n\nexport const $$delta = s.$constructedBy($Delta)\n\n/**\n * @todo remove this\n *\n * @template {s.Schema|string|Array} [NodeNameSchema=s.Schema]\n * @template {s.Schema<{ [key: string|number]: any }>|{ [key:string|number]:any }} [AttrsSchema=s.Schema<{}>]\n * @template {any} [ChildrenSchema=s.Schema]\n * @template {boolean} [HasText=false]\n * @template {boolean} [Recursive=false]\n * @param {object} opts\n * @param {NodeNameSchema?} [opts.name]\n * @param {AttrsSchema?} [opts.attrs]\n * @param {ChildrenSchema?} [opts.children]\n * @param {HasText} [opts.text]\n * @param {Recursive} [opts.recursive]\n * @return {[s.Unwrap>,s.Unwrap>,s.Unwrap>] extends [infer NodeName, infer Attrs, infer Children] ? s.Schema : never),\n * HasText extends true ? string : never\n * >> : never}\n */\nexport const _$delta = ({ name, attrs, children, text, recursive }) => {\n /**\n * @type {s.Schema>}\n */\n let $arrContent = children == null ? s.$never : s.$array(s.$(children))\n const $name = name == null ? s.$any : s.$(name)\n const $attrsPartial = attrs == null ? s.$object({}) : (s.$$record.check(attrs) ? attrs : /** @type {any} */ (s.$(attrs)).partial)\n const $d = s.$instanceOf(Delta, /** @param {Delta} d */ d => {\n if (\n !$name.check(d.name) ||\n object.some(d.attrs,\n (op, k) => $insertOp.check(op) && !$attrsPartial.check({ [k]: op.value })\n )\n ) return false\n for (const op of d.children) {\n if ((!text && $textOp.check(op)) || ($insertOp.check(op) && !$arrContent.check(op.insert))) {\n return false\n }\n }\n return true\n })\n if (recursive) {\n $arrContent = children == null ? s.$array($d) : s.$array(s.$(children), $d)\n }\n return /** @type {any} */ ($d)\n}\n\n/**\n * @type {s.Schema}\n */\nexport const $deltaAny = /** @type {any} */ (s.$instanceOf(Delta))\n\n/**\n * @type {s.Schema}\n */\nexport const $deltaBuilderAny = /** @type {any} */ (s.$instanceOf(DeltaBuilder))\n\n/**\n * Helper function to merge attribution and attributes. The latter input \"wins\".\n *\n * @template {{ [key: string]: any }} T\n * @param {T | null} a\n * @param {T | null} b\n */\nexport const mergeAttrs = (a, b) => object.isEmpty(a)\n ? (object.isEmpty(b) ? null : b)\n : (object.isEmpty(b) ? a : object.assign({}, a, b))\n\n/**\n * @template {DeltaAny|null} D\n * @param {D} a\n * @param {D} b\n * @return {D}\n */\nexport const mergeDeltas = (a, b) => {\n if (a != null && b != null) {\n const c = clone(a)\n c.apply(b)\n return /** @type {any} */ (c)\n }\n return a == null ? b : (a || null)\n}\n\n/**\n * @template {DeltaAny} D\n * @param {prng.PRNG} gen\n * @param {s.Schema} $d\n * @return {D extends Delta ? DeltaBuilder : never}\n */\nexport const random = (gen, $d) => {\n const { $name, $attrs, $children, hasText, $formats: $formats_ } = /** @type {$Delta} */ (/** @type {any} */ ($d)).shape\n const d = s.$$any.check($name) ? create($deltaAny) : create(s.random(gen, $name), $deltaAny)\n const $formats = s.$$any.check($formats_) ? s.$null : $formats_\n prng.bool(gen) && d.setMany(s.random(gen, $attrs))\n for (let i = prng.uint32(gen, 0, 5); i > 0; i--) {\n if (hasText && prng.bool(gen)) {\n d.insert(prng.word(gen), s.random(gen, $formats))\n } else if (!s.$$never.check($children)) {\n /**\n * @type {Array}\n */\n const ins = []\n let insN = prng.int32(gen, 0, 5)\n while (insN--) {\n ins.push(s.random(gen, $children))\n }\n d.insert(ins, s.random(gen, $formats))\n }\n }\n return /** @type {any} */ (d)\n}\n\n/**\n * @overload\n * @return {DeltaBuilder}\n */\n/**\n * @template {string} NodeName\n * @overload\n * @param {NodeName} nodeName\n * @return {DeltaBuilder}\n */\n/**\n * @template {string} NodeName\n * @template {s.Schema} Schema\n * @overload\n * @param {NodeName} nodeName\n * @param {Schema} schema\n * @return {Schema extends s.Schema> ? DeltaBuilder : never}\n */\n/**\n * @template {s.Schema} Schema\n * @overload\n * @param {Schema} schema\n * @return {Schema extends s.Schema> ? DeltaBuilder : never}\n */\n/**\n * @template {string|null} NodeName\n * @template {{[k:string|number]:any}|null} Attrs\n * @template {Array|string} [Children=never]\n * @overload\n * @param {NodeName} nodeName\n * @param {Attrs} attrs\n * @param {Children} [children]\n * @return {DeltaBuilder<\n * NodeName extends null ? any : NodeName,\n * Attrs extends null ? {} : Attrs,\n * Extract> extends Array ? (unknown extends Ac ? never : Ac) : never,\n * Extract,\n * null\n * >}\n */\n/**\n * @param {string|s.Schema} [nodeNameOrSchema]\n * @param {{[K:string|number]:any}|s.Schema} [attrsOrSchema]\n * @param {(Array|string)} [children]\n * @return {DeltaBuilder}\n */\nexport const create = (nodeNameOrSchema, attrsOrSchema, children) => {\n const nodeName = /** @type {any} */ (s.$string.check(nodeNameOrSchema) ? nodeNameOrSchema : null)\n const schema = /** @type {any} */ (s.$$schema.check(nodeNameOrSchema) ? nodeNameOrSchema : (s.$$schema.check(attrsOrSchema) ? attrsOrSchema : null))\n const d = /** @type {DeltaBuilder} */ (new DeltaBuilder(nodeName, schema))\n if (s.$objectAny.check(attrsOrSchema)) {\n d.setMany(attrsOrSchema)\n }\n children && d.insert(children)\n return d\n}\n\n// DELTA TEXT\n\n/**\n * @template {fingerprintTrait.Fingerprintable} [Embeds=never]\n * @typedef {Delta} TextDelta\n */\n\n/**\n * @template {fingerprintTrait.Fingerprintable} [Embeds=never]\n * @typedef {DeltaBuilder} TextDeltaBuilder\n */\n\n/**\n * @template {Array>} [$Embeds=any]\n * @param {$Embeds} $embeds\n * @return {s.Schema extends null ? never : ($Embeds extends Array> ? $C : never)>>}\n */\nexport const $text = (...$embeds) => /** @type {any} */ ($delta({ children: s.$union(...$embeds), text: true }))\nexport const $textOnly = $text()\n\n/**\n * @template {s.Schema>} [Schema=s.Schema>]\n * @param {Schema} [$schema]\n * @return {Schema extends s.Schema> ? DeltaBuilder : never}\n */\nexport const text = $schema => /** @type {any} */ (create($schema || $textOnly))\n\n/**\n * @template {fingerprintTrait.Fingerprintable} Children\n * @typedef {Delta} ArrayDelta\n */\n\n/**\n * @template {fingerprintTrait.Fingerprintable} Children\n * @typedef {DeltaBuilder} ArrayDeltaBuilder\n */\n\n/**\n * @template {any|s.Schema} $Children\n * @param {$Children} [$children]\n * @return {s.Schema>>>}\n */\nexport const $array = $children => /** @type {any} */ ($delta({ children: $children }))\n\n/**\n * @template {s.Schema>} [$Schema=never]\n * @param {$Schema} $schema\n * @return {$Schema extends never ? ArrayDeltaBuilder : DeltaBuilder}\n */\nexport const array = $schema => /** @type {any} */ ($schema ? create($schema) : create())\n\n/**\n * @template {{ [K: string|number]: any }} Attrs\n * @typedef {Delta} MapDelta\n */\n\n/**\n * @template {{ [K: string|number]: any }} Attrs\n * @typedef {DeltaBuilder} MapDeltaBuilder\n */\n\n/**\n * @template {{ [K: string|number]: any }} $Attrs\n * @param {s.Schema<$Attrs>} $attrs\n * @return {s.Schema>}\n */\nexport const $map = $attrs => /** @type {any} */ ($delta({ attrs: $attrs }))\n\n/**\n * @template {s.Schema>|undefined} [$Schema=undefined]\n * @param {$Schema} [$schema]\n * @return {$Schema extends s.Schema> ? DeltaBuilder : MapDeltaBuilder<{}>}\n */\nexport const map = $schema => /** @type {any} */ (create(/** @type {any} */ ($schema)))\n\n/**\n * @template {DeltaAny} D\n * @param {D} d1\n * @param {NoInfer} d2\n * @return {D extends Delta ? DeltaBuilder : never}\n */\nexport const diff = (d1, d2) => {\n /**\n * @type {DeltaBuilderAny}\n */\n const d = create()\n if (d1.fingerprint !== d2.fingerprint) {\n let left1 = d1.children.start\n let left2 = d2.children.start\n let right1 = d1.children.end\n let right2 = d2.children.end\n let commonPrefixOffset = 0\n // perform a patience sort\n // 1) remove common prefix and suffix\n while (left1 != null && left1.fingerprint === left2?.fingerprint) {\n if (!$deleteOp.check(left1)) {\n commonPrefixOffset += left1.length\n }\n left1 = left1.next\n left2 = left2.next\n }\n while (right1 !== null && right1 !== left1 && right1.fingerprint === right2?.fingerprint) {\n right1 = right1.prev\n right2 = right2.prev\n }\n /**\n * @type {Array}\n */\n const ops1 = []\n /**\n * @type {Array}\n */\n const ops2 = []\n while (left1 !== null && left1 !== right1?.next) {\n ops1.push(left1)\n left1 = left1.next\n }\n while (left2 !== null && left2 !== right2?.next) {\n ops2.push(left2)\n left2 = left2.next\n }\n const fprints1 = ops1.map(op => op.fingerprint)\n const fprints2 = ops2.map(op => op.fingerprint)\n const changeset = patience.diff(fprints1, fprints2)\n d.retain(commonPrefixOffset)\n for (let i = 0, lastIndex1 = 0, currIndexOffset2 = 0; i < changeset.length; i++) {\n const change = changeset[i]\n d.retain(change.index - lastIndex1)\n // insert minimal diff at curred position in d\n /**\n *\n * @todo it would be better if these would be slices of delta (an actual delta)\n *\n * @param {ChildrenOpAny[]} opsIs\n * @param {ChildrenOpAny[]} opsShould\n */\n const diffAndApply = (opsIs, opsShould) => {\n const d = create()\n // @todo unoptimized implementation. Convert content to array and diff that based on\n // generated fingerprints. We probably could do better and cache more information.\n // - benchmark\n // - cache fingerprints in ops\n /**\n * @type {Array}\n */\n const isContent = opsIs.flatMap(op => $insertOp.check(op) ? op.insert : ($textOp.check(op) ? op.insert.split('') : error.unexpectedCase()))\n /**\n * @type {Array}\n */\n const shouldContent = opsShould.flatMap(op => $insertOp.check(op) ? op.insert : ($textOp.check(op) ? op.insert.split('') : error.unexpectedCase()))\n const isContentFingerprinted = isContent.map(c => s.$string.check(c) ? c : fingerprintTrait.fingerprint(c))\n const shouldContentFingerprinted = shouldContent.map(c => s.$string.check(c) ? c : fingerprintTrait.fingerprint(c))\n const hasFormatting = opsIs.some(op => !$deleteOp.check(op) && op.format != null) || opsShould.some(op => !$deleteOp.check(op) && op.format != null)\n /**\n * @type {{ index: number, insert: Array, remove: Array }[]}\n */\n const cdiff = patience.diff(isContentFingerprinted, shouldContentFingerprinted)\n // overwrite fingerprinted content with actual content\n for (let i = 0, adj = 0; i < cdiff.length; i++) {\n const cd = cdiff[i]\n cd.remove = isContent.slice(cd.index, cd.index + cd.remove.length)\n cd.insert = shouldContent.slice(cd.index + adj, cd.index + adj + cd.insert.length)\n adj += cd.insert.length - cd.remove.length\n }\n for (let i = 0, lastIndex = 0; i < cdiff.length; i++) {\n const cd = cdiff[i]\n d.retain(cd.index - lastIndex)\n lastIndex = cd.index\n let cdii = 0\n let cdri = 0\n // try to match as much content as possible, preferring to skip over non-deltas\n for (; cdii < cd.insert.length && cdri < cd.remove.length;) {\n const a = cd.insert[cdii]\n const b = cd.remove[cdri]\n if ($deltaAny.check(a) && $deltaAny.check(b) && a.name === b.name) {\n d.modify(diff(b, a))\n cdii++\n cdri++\n } else if ($deltaAny.check(b)) {\n d.insert(s.$string.check(a) ? a : [a])\n cdii++\n } else {\n d.delete(1)\n cdri++\n }\n }\n for (; cdii < cd.insert.length; cdii++) {\n const a = cd.insert[cdii]\n d.insert(s.$string.check(a) ? a : [a])\n }\n d.delete(cd.remove.length - cdri)\n }\n // create the diff for formatting\n if (hasFormatting) {\n const formattingDiff = create()\n // update opsIs with content diff. then we can figure out the formatting diff.\n const isUpdated = create()\n // copy opsIs to fresh delta\n opsIs.forEach(op => {\n isUpdated.childCnt += op.length\n list.pushEnd(isUpdated.children, op.clone())\n })\n isUpdated.apply(d)\n let shouldI = 0\n let shouldOffset = 0\n let isOp = isUpdated.children.start\n let isOffset = 0\n while (shouldI < opsShould.length && isOp != null) {\n const shouldOp = opsShould[shouldI]\n if (!$deleteOp.check(shouldOp) && !$deleteOp.check(isOp)) {\n const isFormat = isOp.format\n const minForward = math.min(shouldOp.length - shouldOffset, isOp.length - isOffset)\n shouldOffset += minForward\n isOffset += minForward\n if (fun.equalityDeep(shouldOp.format, isFormat)) {\n formattingDiff.retain(minForward)\n } else {\n /**\n * @type {FormattingAttributes}\n */\n const fupdate = {}\n shouldOp.format != null && object.forEach(shouldOp.format, (v, k) => {\n if (!fun.equalityDeep(v, isFormat?.[k] || null)) {\n fupdate[k] = v\n }\n })\n isFormat && object.forEach(isFormat, (_, k) => {\n if (shouldOp?.format?.[k] === undefined) {\n fupdate[k] = null\n }\n })\n formattingDiff.retain(minForward, fupdate)\n }\n // update offset and iterators\n if (shouldOffset >= shouldOp.length) {\n shouldI++\n shouldOffset = 0\n }\n if (isOffset >= isOp.length) {\n isOp = isOp.next\n isOffset = 0\n }\n }\n }\n d.apply(formattingDiff)\n }\n return d\n }\n const subd = diffAndApply(ops1.slice(change.index, change.index + change.remove.length), ops2.slice(change.index + currIndexOffset2, change.index + currIndexOffset2 + change.insert.length))\n d.append(subd)\n lastIndex1 = change.index + change.remove.length\n currIndexOffset2 += change.insert.length - change.remove.length\n }\n for (const attr2 of d2.attrs) {\n const attr1 = d1.attrs[attr2.key]\n if (attr1 == null || (attr1.fingerprint !== attr2.fingerprint)) {\n /* c8 ignore else */\n if ($insertOp.check(attr2)) {\n d.set(attr2.key, attr2.value)\n } else {\n /* c8 ignore next 2 */\n error.unexpectedCase()\n }\n }\n }\n for (const attr1 of d1.attrs) {\n if (d2.attrs[attr1.key] == null) {\n d.unset(attr1.key)\n }\n }\n }\n return /** @type {any} */ (d.done(false))\n}\n"],"names":["s.$object","s.$array","s.$string","s.$number","s.$record","s.$union","s.$literal","s.$any","list.ListNode","buffer.toBase64","encoding.encode","encoding.writeVarUint","encoding.writeVarString","encoding.writeAny","object.assign","equalityTrait.EqualityTraitSymbol","fun.equalityDeep","fingerprintTrait.fingerprint","encoding.writeUint8","s.$custom","s.$constructedBy","list.create","encoding.writeUint32","rabin.fingerprint","rabin.StandardIrreducible128","encoding.toUint8Array","fingerprintTrait.FingerprintTraitSymbol","object.isEmpty","list.isEmpty","math.min","list.pushEnd","list.popEnd","error.unexpectedCase","list.remove","error.create","arr.isArray","list.insertBetween","object.every","s.Schema","s.$$object","list.toArray","object.some","s.$","s.$never","s.$$record","s.$instanceOf","s.$$any","s.random","s.$null","prng.bool","prng.uint32","prng.word","s.$$never","prng.int32","schema","s.$$schema","s.$objectAny","patience.diff","object.forEach"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAGA,cAAS,CAAC;AACtC,EAAE,MAAM,EAAEC,aAAQ,CAACC,cAAS,CAAC,CAAC,QAAQ;AACtC,EAAE,QAAQ,EAAEC,cAAS,CAAC,QAAQ;AAC9B,EAAE,MAAM,EAAEF,aAAQ,CAACC,cAAS,CAAC,CAAC,QAAQ;AACtC,EAAE,QAAQ,EAAEC,cAAS,CAAC,QAAQ;AAC9B,EAAE,MAAM,EAAEC,cAAS,CAACF,cAAS,EAAED,aAAQ,CAACC,cAAS,CAAC,CAAC,CAAC,QAAQ;AAC5D,EAAE,QAAQ,EAAEC,cAAS,CAAC,QAAQ;AAC9B,CAAC,EAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,mBAAmB,GAAGE,aAAQ;AAC3C,EAAEL,cAAS,CAAC,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;AACnM,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,EAAC;AACpB,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,OAAM;AACtD,MAAM,gBAAgB,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAM;AACrE,KAAK;AACL,IAAI,KAAK,MAAM,KAAK,IAAI,EAAE,CAAC,KAAK,EAAE;AAClC,MAAM,MAAM,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAC;AACvC,MAAM,IAAI,KAAK,IAAI,IAAI,KAAK,KAAK,CAAC,WAAW,KAAK,KAAK,CAAC,WAAW,CAAC,EAAE;AACtE;AACA,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACpC,UAAU,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAC;AACvC,SAAS,MAAM;AACf;AACA,UAAU1B,oBAAoB,GAAE;AAChC,SAAS;AACT,OAAO;AACP,KAAK;AACL,IAAI,KAAK,MAAM,KAAK,IAAI,EAAE,CAAC,KAAK,EAAE;AAClC,MAAM,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE;AACvC,QAAQ,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAC;AAC1B,OAAO;AACP,KAAK;AACL,GAAG;AACH,EAAE,2BAA2B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.d.ts deleted file mode 100644 index 5bf528f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * @template T - * @typedef {import('../schema.js').Schema} Schema - */ -/** - * @template {delta.AbstractDelta} DeltaA - * @template {delta.AbstractDelta} DeltaB - */ -export class Binding { - /** - * @param {RDT} a - * @param {RDT} b - * @param {dt.Template} template - */ - constructor(a: RDT, b: RDT, template: dt.Template); - /** - * @type {dt.Transformer} - */ - t: dt.Transformer; - a: RDT; - b: RDT; - _mux: mux.mutex; - _achanged: (delta: DeltaA) => void; - _bchanged: (delta: DeltaB) => void; - destroy: () => void; -} -export function bind>(a: RDT, b: RDT ? DeltaB : never>, template: dt.Template): Binding ? DeltaB : never>; -export function deltaRDT($delta: Schema): DeltaRDT; -export const $domDelta: any; -export function domRDT(dom: Element): DomRDT>; -export type Schema = import("../schema.js").Schema; -/** - * Abstract Interface for a delta-based Replicated Data Type. - */ -export type RDT = ObservableV2<{ - "change": (delta: Delta) => void; - "destroy": (rdt: RDT) => void; -}> & { - update: (delta: Delta) => any; - destroy: () => void; -}; -export type DomDelta = delta.RecursiveNode; -import * as delta from './delta.js'; -import * as dt from './t3.test.js'; -import * as mux from '../mutex.js'; -/** - * @template {delta.AbstractDelta} Delta - * @implements RDT - * @extends {ObservableV2<{ change: (delta: Delta) => void, 'destroy': (rdt:DeltaRDT)=>void }>} - */ -declare class DeltaRDT extends ObservableV2<{ - change: (delta: Delta) => void; - destroy: (rdt: DeltaRDT) => void; -}> implements RDT { - /** - * @param {Schema} $delta - */ - constructor($delta: Schema); - $delta: s.Schema; - /** - * @type {Delta?} - */ - state: Delta | null; - _mux: mux.mutex; - /** - * @param {Delta} delta - */ - update: (delta: Delta) => any; -} -/** - * @typedef {delta.RecursiveNode} DomDelta - */ -/** - * @template {DomDelta} [D=DomDelta] - * @implements RDT - * @extends {ObservableV2<{ change: (delta: D)=>void, destroy: (rdt:DomRDT)=>void }>}>} - */ -declare class DomRDT> extends ObservableV2<{ - change: (delta: D) => void; - destroy: (rdt: DomRDT) => void; -}> implements RDT { - /** - * @param {Element} observedNode - */ - constructor(observedNode: Element); - observedNode: Element; - _mux: mux.mutex; - observer: MutationObserver; - /** - * @param {MutationRecord[]} mutations - */ - _mutationHandler: (mutations: MutationRecord[]) => any; - /** - * @param {D} delta - */ - update: (delta: D) => void; -} -import { ObservableV2 } from '../observable.js'; -import * as s from '../schema.js'; -export {}; -//# sourceMappingURL=binding.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.d.ts.map deleted file mode 100644 index d865fff..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../../delta/binding.js"],"names":[],"mappings":"AAeA;;;GAGG;AAEH;;;GAGG;AACH,qBAHmC,MAAM,SAA3B,KAAK,CAAC,aAAc,EACC,MAAM,SAA3B,KAAK,CAAC,aAAc;IAGhC;;;;OAIG;IACH,eAJW,GAAG,CAAC,MAAM,CAAC,KACX,GAAG,CAAC,MAAM,CAAC,YACX,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAC,MAAM,CAAC,EA4BxC;IAzBC;;OAEG;IACH,GAFU,EAAE,CAAC,WAAW,CAAC,GAAG,EAAC,MAAM,EAAC,MAAM,CAAC,CAEnB;IACxB,eAAU;IACV,eAAU;IACV,gBAA6B;IAC7B,8BAgCoD,IAAI,CAxBrD;IACH,8BAuBoD,IAAI,CAfrD;IAGL,oBAKC;CACF;AAgBM,qBAN4B,MAAM,SAA3B,KAAK,CAAC,aAAc,EACS,WAAW,SAAxC,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAC,GAAG,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OAAC,CAEC;IACjB,gBAA6B;IAG/B;;OAEG;IACH,SAAS,OAFE,KAEG,SAOZ;CAMH;AAkMD;;GAEG;AAEH;;;;GAIG;AACH,qBAJyB,CAAC,SAAZ,QAAS;;;YAEa,CAAC,KAAK,EAAE,CAAC,KAAG,IAAI;aAAW,CAAC,GAAG,EAAC,MAAM,CAAC,CAAC,CAAC,KAAG,IAAI;cADrE,GAAG,CAAC,CAAC;IAIlB;;OAEG;IACH,0BAFW,OAAO,EAajB;IATC,sBAAgC;IAChC,gBAA6B;IAC7B,2BAA2D;IAS7D;;OAEG;IACH,mBAAmB,WAFR,cAAc,EAEG,SAGxB;IAEJ;;OAEG;IACH,SAAS,OAFE,CAEG,UAWb;CAOF;6BA1W4B,kBAAkB;mBAS5B,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.test.d.ts deleted file mode 100644 index eae1385..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.test.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function testBinding(): void; -export function testDomBindingBasics(): void; -export function testDomBindingBackAndForth(): void; -export function testDataToDom(): void; -//# sourceMappingURL=binding.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.test.d.ts.map deleted file mode 100644 index 35b9b93..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/binding.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binding.test.d.ts","sourceRoot":"","sources":["../../delta/binding.test.js"],"names":[],"mappings":"AAUO,oCAcN;AAEM,6CAcN;AAEM,mDAkCN;AAEM,sCAiBN"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta-pitch.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta-pitch.test.d.ts deleted file mode 100644 index 1d4291c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta-pitch.test.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function testDeltaBasics(_tc: t.TestCase): void; -export function testDeltaBasicSchema(_tc: t.TestCase): void; -export function testDeltaValues(_tc: t.TestCase): void; -import * as t from 'lib0/testing'; -//# sourceMappingURL=delta-pitch.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta-pitch.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta-pitch.test.d.ts.map deleted file mode 100644 index 16331c3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta-pitch.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delta-pitch.test.d.ts","sourceRoot":"","sources":["../../delta/delta-pitch.test.js"],"names":[],"mappings":"AAmCO,qCAFI,CAAC,CAAC,QAAQ,QAWpB;AAmBM,0CAFI,CAAC,CAAC,QAAQ,QAWpB;AAYM,qCAFI,CAAC,CAAC,QAAQ,QAwBpB;mBAzGkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.d.ts deleted file mode 100644 index 2f11094..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.d.ts +++ /dev/null @@ -1,1008 +0,0 @@ -/** - * @typedef {{ - * insert?: string[] - * insertAt?: number - * delete?: string[] - * deleteAt?: number - * format?: Record - * formatAt?: number - * }} Attribution - */ -/** - * @type {s.Schema} - */ -export const $attribution: s.Schema; -/** - * @typedef {s.Unwrap<$anyOp>} DeltaOps - */ -/** - * @typedef {{ [key: string]: any }} FormattingAttributes - */ -/** - * @typedef {{ - * type: 'delta', - * name?: string, - * attrs?: { [Key in string|number]: DeltaAttrOpJSON }, - * children?: Array - * }} DeltaJSON - */ -/** - * @typedef {{ type: 'insert', insert: string|Array, format?: { [key: string]: any }, attribution?: Attribution } | { delete: number } | { type: 'retain', retain: number, format?: { [key:string]: any }, attribution?: Attribution } | { type: 'modify', value: object }} DeltaListOpJSON - */ -/** - * @typedef {{ type: 'insert', value: any, prevValue?: any, attribution?: Attribution } | { type: 'delete', prevValue?: any, attribution?: Attribution } | { type: 'modify', value: DeltaJSON }} DeltaAttrOpJSON - */ -/** - * @typedef {TextOp|InsertOp|DeleteOp|RetainOp|ModifyOp} ChildrenOpAny - */ -/** - * @typedef {AttrInsertOp|AttrDeleteOp|AttrModifyOp} AttrOpAny - */ -/** - * @typedef {ChildrenOpAny|AttrOpAny} _OpAny - */ -/** - * @type {s.Schema} - */ -export const $deltaMapChangeJson: s.Schema; -export class TextOp extends list.ListNode { - /** - * @param {string} insert - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(insert: string, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {string} - */ - readonly insert: string; - /** - * @readonly - * @type {FormattingAttributes|null} - */ - readonly format: FormattingAttributes | null; - attribution: Attribution | null; - /** - * @type {string?} - */ - _fingerprint: string | null; - /** - * @param {string} newVal - */ - _updateInsert(newVal: string): void; - /** - * @return {'insert'} - */ - get type(): "insert"; - get length(): number; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} offset - * @param {number} len - */ - _splice(offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - /** - * @return {TextOp} - */ - clone(start?: number, end?: number): TextOp; - /** - * @param {TextOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: TextOp): boolean; -} -/** - * @template {fingerprintTrait.Fingerprintable} ArrayContent - */ -export class InsertOp extends list.ListNode { - /** - * @param {Array} insert - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(insert: Array, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {Array} - */ - readonly insert: Array; - /** - * @readonly - * @type {FormattingAttributes?} - */ - readonly format: FormattingAttributes | null; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string?} - */ - _fingerprint: string | null; - /** - * @param {ArrayContent} newVal - */ - _updateInsert(newVal: ArrayContent): void; - /** - * @return {'insert'} - */ - get type(): "insert"; - get length(): number; - /** - * @param {number} i - * @return {Extract} - */ - _modValue(i: number): Extract; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} offset - * @param {number} len - */ - _splice(offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - /** - * @return {InsertOp} - */ - clone(start?: number, end?: number): InsertOp; - /** - * @param {InsertOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: InsertOp): boolean; -} -/** - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - */ -export class DeleteOp extends list.ListNode { - /** - * @param {number} len - */ - constructor(len: number); - delete: number; - /** - * @type {(Children|Text) extends never ? null : (Delta?)} - */ - prevValue: (Children | Text) extends never ? null : (Delta | null); - /** - * @type {string|null} - */ - _fingerprint: string | null; - /** - * @return {'delete'} - */ - get type(): "delete"; - get length(): number; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} len - */ - _splice(_offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - clone(start?: number, end?: number): DeleteOp; - /** - * @param {DeleteOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: DeleteOp): boolean; -} -export class RetainOp extends list.ListNode { - /** - * @param {number} retain - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(retain: number, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {number} - */ - readonly retain: number; - /** - * @readonly - * @type {FormattingAttributes?} - */ - readonly format: FormattingAttributes | null; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - /** - * @return {'retain'} - */ - get type(): "retain"; - get length(): number; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} len - */ - _splice(_offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - clone(start?: number, end?: number): RetainOp; - /** - * @param {RetainOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: RetainOp): boolean; -} -/** - * Delta that can be applied on a YType Embed - * - * @template {DeltaAny} [DTypes=DeltaAny] - */ -export class ModifyOp extends list.ListNode { - /** - * @param {DTypes} delta - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(delta: DTypes, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {DTypes} - */ - readonly value: DTypes; - /** - * @readonly - * @type {FormattingAttributes?} - */ - readonly format: FormattingAttributes | null; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - /** - * @return {'modify'} - */ - get type(): "modify"; - get length(): number; - /** - * @type {DeltaBuilderAny} - */ - get _modValue(): DeltaBuilderAny; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} _len - */ - _splice(_offset: number, _len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - /** - * @return {ModifyOp} - */ - clone(): ModifyOp; - /** - * @param {ModifyOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: ModifyOp): boolean; -} -/** - * @template {fingerprintTrait.Fingerprintable} V - * @template {string|number} [K=any] - */ -export class AttrInsertOp { - /** - * @param {K} key - * @param {V} value - * @param {V|undefined} prevValue - * @param {Attribution?} attribution - */ - constructor(key: K, value: V, prevValue: V | undefined, attribution: Attribution | null); - /** - * @readonly - * @type {K} - */ - readonly key: K; - /** - * @readonly - * @type {V} - */ - readonly value: V; - /** - * @readonly - * @type {V|undefined} - */ - readonly prevValue: V | undefined; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - /** - * @return {'insert'} - */ - get type(): "insert"; - /** - * @type {DeltaBuilderAny} - */ - get _modValue(): DeltaBuilderAny; - get fingerprint(): string; - toJSON(): { - type: "insert"; - value: V | DeltaJSON; - } & (({ - attribution: Attribution; - } | { - attribution?: undefined; - }) & ({ - prevValue: V & {}; - } | { - prevValue?: undefined; - })); - /** - * @return {AttrInsertOp} - */ - clone(): AttrInsertOp; - /** - * @param {AttrInsertOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: AttrInsertOp): boolean; -} -/** - * @template V - * @template {string|number} [K=string] - */ -export class AttrDeleteOp { - /** - * @param {K} key - * @param {V|undefined} prevValue - * @param {Attribution?} attribution - */ - constructor(key: K, prevValue: V | undefined, attribution: Attribution | null); - /** - * @type {K} - */ - key: K; - /** - * @type {V|undefined} - */ - prevValue: V | undefined; - attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - get value(): undefined; - /** - * @type {'delete'} - */ - get type(): "delete"; - get fingerprint(): string; - /** - * @return {DeltaAttrOpJSON} - */ - toJSON(): DeltaAttrOpJSON; - clone(): AttrDeleteOp; - /** - * @param {AttrDeleteOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: AttrDeleteOp): boolean; -} -/** - * @template {DeltaAny} [Modifier=DeltaAny] - * @template {string|number} [K=string] - */ -export class AttrModifyOp { - /** - * @param {K} key - * @param {Modifier} delta - */ - constructor(key: K, delta: Modifier); - /** - * @readonly - * @type {K} - */ - readonly key: K; - /** - * @readonly - * @type {Modifier} - */ - readonly value: Modifier; - /** - * @type {string|null} - */ - _fingerprint: string | null; - /** - * @type {'modify'} - */ - get type(): "modify"; - get fingerprint(): string; - /** - * @return {DeltaBuilder} - */ - get _modValue(): DeltaBuilder; - /** - * @return {DeltaAttrOpJSON} - */ - toJSON(): DeltaAttrOpJSON; - /** - * @return {AttrModifyOp} - */ - clone(): AttrModifyOp; - /** - * @param {AttrModifyOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: AttrModifyOp): boolean; -} -/** - * @type {s.Schema | DeleteOp>} - */ -export const $deleteOp: s.Schema | DeleteOp>; -/** - * @type {s.Schema | InsertOp>} - */ -export const $insertOp: s.Schema | InsertOp>; -export function $insertOpWith($content: s.Schema): s.Schema | InsertOp>; -/** - * @type {s.Schema} - */ -export const $textOp: s.Schema; -/** - * @type {s.Schema} - */ -export const $retainOp: s.Schema; -/** - * @type {s.Schema} - */ -export const $modifyOp: s.Schema; -export function $modifyOpWith($content: s.Schema): s.Schema | ModifyOp>; -export const $anyOp: s.Schema | InsertOp | AttrDeleteOp | DeleteOp | TextOp | AttrModifyOp | ModifyOp>; -/** - * @template {Array|string} C1 - * @template {Array|string} C2 - * @typedef {Extract> extends never - * ? never - * : (Array<(Extract> extends Array ? (unknown extends AC1 ? never : AC1) : never)>)} MergeListArrays - */ -/** - * @template {{[Key in string|number]: any}} Attrs - * @template {string|number} Key - * @template {any} Val - * @typedef {{ [K in (Key | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (Key extends K ? Val : never) }} AddToAttrs - */ -/** - * @template {{[Key in string|number|symbol]: any}} Attrs - * @template {{[Key in string|number|symbol]: any}} NewAttrs - * @typedef {{ [K in (keyof NewAttrs | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (unknown extends NewAttrs[K] ? never : NewAttrs[K]) }} MergeAttrs - */ -/** - * @template X - * @typedef {0 extends (1 & X) ? null : X} _AnyToNull - */ -/** - * @template {s.Schema>|null} Schema - * @typedef {_AnyToNull extends null ? Delta : (Schema extends s.Schema ? D : never)} AllowedDeltaFromSchema - */ -/** - * @typedef {Delta} DeltaAny - */ -/** - * @typedef {DeltaBuilder} DeltaBuilderAny - */ -/** - * @template {string} [NodeName=any] - * @template {{[k:string|number]:any}} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - * @template {s.Schema>|null} [Schema=any] - */ -export class Delta> | null = any> { - /** - * @param {NodeName} [name] - * @param {Schema} [$schema] - */ - constructor(name?: NodeName, $schema?: Schema); - name: NodeName | null; - $schema: NonNullable | null; - /** - * @type {{ [K in keyof Attrs]?: K extends string|number ? (AttrInsertOp|AttrDeleteOp|(Delta extends Attrs[K] ? AttrModifyOp,K> : never)) : never } - * & { [Symbol.iterator]: () => Iterator<{ [K in keyof Attrs]: K extends string|number ? (AttrInsertOp|AttrDeleteOp|(Delta extends Attrs[K] ? AttrModifyOp,K> : never)) : never }[keyof Attrs]> } - * } - */ - attrs: { [K in keyof Attrs]?: K extends string | number ? (AttrInsertOp | AttrDeleteOp | (Delta extends Attrs[K] ? AttrModifyOp, K> : never)) : never; } & { - [Symbol.iterator]: () => Iterator<{ [K in keyof Attrs]: K extends string | number ? (AttrInsertOp | AttrDeleteOp | (Delta extends Attrs[K] ? AttrModifyOp, K> : never)) : never; }[keyof Attrs]>; - }; - /** - * @type {list.List< - * RetainOp - * | DeleteOp - * | (Text extends never ? never : TextOp) - * | (Children extends never ? never : InsertOp) - * | (Delta extends Children ? ModifyOp>> : never) - * >} - */ - children: list.List) | (Delta extends Children ? ModifyOp>> : never)>; - childCnt: number; - /** - * @type {any} - */ - origin: any; - /** - * @type {string|null} - */ - _fingerprint: string | null; - isDone: boolean; - /** - * @type {string} - */ - get fingerprint(): string; - isEmpty(): boolean; - /** - * @return {DeltaJSON} - */ - toJSON(): DeltaJSON; - /** - * @param {Delta} other - * @return {boolean} - */ - equals(other: Delta): boolean; - /** - * @return {DeltaBuilder} - */ - clone(): DeltaBuilder; - /** - * @param {number} start - * @param {number} end - * @return {DeltaBuilder} - */ - slice(start?: number, end?: number): DeltaBuilder; - /** - * Mark this delta as done and perform some cleanup (e.g. remove appended retains without - * formats&attributions). In the future, there might be additional merge operations that can be - * performed to result in smaller deltas. Set `markAsDone=false` to only perform the cleanup. - * - * @return {Delta} - */ - done(markAsDone?: boolean): Delta; - [fingerprintTrait.FingerprintTraitSymbol](): string; - /** - * @param {any} other - * @return {boolean} - */ - [equalityTrait.EqualityTraitSymbol](other: any): boolean; -} -export function clone(d: D): D extends DeltaBuilder ? DeltaBuilder : never; -/** - * @template {string} [NodeName=any] - * @template {{[key:string|number]:any}} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable} [Children=never] - * @template {string} [Text=never] - * @template {s.Schema>|null} [Schema=any] - * @extends {Delta} - */ -export class DeltaBuilder> | null = any> extends Delta { - /** - * @type {FormattingAttributes?} - */ - usedAttributes: FormattingAttributes | null; - /** - * @type {Attribution?} - */ - usedAttribution: Attribution | null; - /** - * @param {Attribution?} attribution - */ - useAttribution(attribution: Attribution | null): this; - /** - * @param {FormattingAttributes?} attributes - * @return {this} - */ - useAttributes(attributes: FormattingAttributes | null): this; - /** - * @param {string} name - * @param {any} value - */ - updateUsedAttributes(name: string, value: any): this; - /** - * @template {keyof Attribution} NAME - * @param {NAME} name - * @param {Attribution[NAME]?} value - */ - updateUsedAttribution(name: NAME, value: Attribution[NAME] | null): this; - /** - * @template {AllowedDeltaFromSchema extends Delta ? ((Children extends never ? never : Array) | Text) : never} NewContent - * @param {NewContent} insert - * @param {FormattingAttributes?} [formatting] - * @param {Attribution?} [attribution] - * @return {DeltaBuilder< - * NodeName, - * Attrs, - * Exclude[number]|Children, - * (Extract|Text) extends never ? never : string, - * Schema - * >} - */ - insert extends Delta ? ((Children_1 extends never ? never : Array) | Text_1) : never>(insert: NewContent, formatting?: FormattingAttributes | null, attribution?: Attribution | null): DeltaBuilder[number] | Children, (Extract | Text) extends never ? never : string, Schema>; - /** - * @template {AllowedDeltaFromSchema extends Delta ? Extract> : never} NewContent - * @param {NewContent} modify - * @param {FormattingAttributes?} formatting - * @param {Attribution?} attribution - * @return {DeltaBuilder< - * NodeName, - * Attrs, - * Exclude[number]|Children, - * (Extract|Text) extends string ? string : never, - * Schema - * >} - */ - modify extends Delta ? Extract> : never>(modify: NewContent, formatting?: FormattingAttributes | null, attribution?: Attribution | null): DeltaBuilder[number] | Children, (Extract | Text) extends string ? string : never, Schema>; - /** - * @param {number} len - * @param {FormattingAttributes?} [format] - * @param {Attribution?} [attribution] - */ - retain(len: number, format?: FormattingAttributes | null, attribution?: Attribution | null): this; - /** - * @param {number} len - */ - delete(len: number): this; - /** - * @template {AllowedDeltaFromSchema extends Delta ? (keyof Attrs) : never} Key - * @template {AllowedDeltaFromSchema extends Delta ? (Attrs[Key]) : never} Val - * @param {Key} key - * @param {Val} val - * @param {Attribution?} attribution - * @param {Val|undefined} [prevValue] - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - set extends Delta ? (keyof Attrs_1) : never, Val extends AllowedDeltaFromSchema extends Delta ? (Attrs_1[Key]) : never>(key: Key, val: Val, attribution?: Attribution | null, prevValue?: Val | undefined): DeltaBuilder]: AddToAttrs[K]; }, Children, Text, Schema>; - /** - * @template {AllowedDeltaFromSchema extends Delta ? Attrs : never} NewAttrs - * @param {NewAttrs} attrs - * @param {Attribution?} attribution - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof MergeAttrs]: MergeAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - setMany extends Delta ? Attrs_1 : never>(attrs: NewAttrs, attribution?: Attribution | null): DeltaBuilder]: MergeAttrs[K]; }, Children, Text, Schema>; - /** - * @template {AllowedDeltaFromSchema extends Delta ? keyof As : never} Key - * @param {Key} key - * @param {Attribution?} attribution - * @param {any} [prevValue] - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - unset extends Delta ? keyof As : never>(key: Key, attribution?: Attribution | null, prevValue?: any): DeltaBuilder]: AddToAttrs[K]; }, Children, Text, Schema>; - /** - * @template {AllowedDeltaFromSchema extends Delta ? { [K in keyof As]: Extract> extends never ? never : K }[keyof As] : never} Key - * @template {AllowedDeltaFromSchema extends Delta ? Extract> : never} D - * @param {Key} key - * @param {D} modify - * @return {DeltaBuilder< - * NodeName, - * { [K in keyof AddToAttrs]: AddToAttrs[K] }, - * Children, - * Text, - * Schema - * >} - */ - update extends Delta ? { [K in keyof As]: Extract> extends never ? never : K; }[keyof As] : never, D extends AllowedDeltaFromSchema extends Delta ? Extract> : never>(key: Key, modify: D): DeltaBuilder]: AddToAttrs[K]; }, Children, Text, Schema>; - /** - * @param {Delta} other - */ - apply(other: Delta): this; - /** - * @param {DeltaAny} other - * @param {boolean} priority - */ - rebase(other: DeltaAny, priority: boolean): this; - /** - * Same as doing `delta.rebase(other.inverse())`, without creating a temporary delta. - * - * @param {DeltaAny} other - * @param {boolean} priority - */ - rebaseOnInverse(other: DeltaAny, priority: boolean): this; - /** - * Append child ops from one op to the other. - * - * delta.create().insert('a').append(delta.create().insert('b')) // => insert "ab" - * - * @template {DeltaAny} OtherDelta - * @param {OtherDelta} other - * @return {CastToDelta extends Delta ? DeltaBuilder : never} - */ - append(other: OtherDelta): CastToDelta extends Delta ? DeltaBuilder : never; -} -/** - * @template {DeltaAny} D - * @typedef {D extends DeltaBuilder ? Delta : D} CastToDelta - */ -/** - * @template {string} NodeName - * @template {{ [key: string|number]: any }} [Attrs={}] - * @template {fingerprintTrait.Fingerprintable|never} [Children=never] - * @template {string|never} [Text=never] - * @typedef {Delta|RecursiveDelta,Text>} RecursiveDelta - */ -/** - * @template {string} Name - * @template {{[k:string|number]:any}} Attrs - * @template {fingerprintTrait.Fingerprintable} Children - * @template {boolean} HasText - * @template {{ [k:string]:any }} Formats - * @template {boolean} Recursive - * @extends {s.Schema : never), - * HasText extends true ? string : never, - * any>>} - */ -export class $Delta extends s.Schema : never), HasText extends true ? string : never, any>> { - /** - * @param {s.Schema} $name - * @param {s.Schema} $attrs - * @param {s.Schema} $children - * @param {HasText} hasText - * @param {s.Schema} $formats - * @param {Recursive} recursive - */ - constructor($name: s.Schema, $attrs: s.Schema, $children: s.Schema, hasText: HasText, $formats: s.Schema, recursive: Recursive); - shape: { - $name: s.Schema; - $attrs: s.Schema | s.Schema; - [key: number]: s.Schema; - [key: symbol]: s.Schema; - }>>>; - $children: s.Schema; - hasText: HasText; - $formats: s.Schema; - }; -} -export function $delta | string | Array = s.Schema, AttrsSchema extends s.Schema<{ - [key: string | number]: any; -}> | { - [key: string | number]: any; -} = s.Schema<{}>, ChildrenSchema extends unknown = s.Schema, HasText extends boolean = false, Recursive extends boolean = false, Formats extends { - [k: string]: any; -} = { - [k: string]: any; -}>({ name, attrs, children, text, formats, recursive }: { - name?: NodeNameSchema | null | undefined; - attrs?: AttrsSchema | null | undefined; - children?: ChildrenSchema | null | undefined; - text?: HasText | undefined; - formats?: Formats | undefined; - recursive?: Recursive | undefined; -}): [s.Unwrap>, s.Unwrap>, s.Unwrap>] extends [infer NodeName_1, infer Attrs_1, infer Children_1] ? s.Schema : never), HasText extends true ? string : never>> : never; -export const $$delta: s.Schema<$Delta>; -export function _$delta | string | Array = s.Schema, AttrsSchema extends s.Schema<{ - [key: string | number]: any; -}> | { - [key: string | number]: any; -} = s.Schema<{}>, ChildrenSchema extends unknown = s.Schema, HasText extends boolean = false, Recursive extends boolean = false>({ name, attrs, children, text, recursive }: { - name?: NodeNameSchema | null | undefined; - attrs?: AttrsSchema | null | undefined; - children?: ChildrenSchema | null | undefined; - text?: HasText | undefined; - recursive?: Recursive | undefined; -}): [s.Unwrap>, s.Unwrap>, s.Unwrap>] extends [infer NodeName_1, infer Attrs_1, infer Children_1] ? s.Schema : never), HasText extends true ? string : never>> : never; -/** - * @type {s.Schema} - */ -export const $deltaAny: s.Schema; -/** - * @type {s.Schema} - */ -export const $deltaBuilderAny: s.Schema; -export function mergeAttrs(a: T | null, b: T | null): T | null; -export function mergeDeltas(a: D, b: D): D; -export function random(gen: prng.PRNG, $d: s.Schema): D extends Delta ? DeltaBuilder : never; -/** - * @overload - * @return {DeltaBuilder} - */ -export function create(): DeltaBuilder; -/** - * @template {string} NodeName - * @overload - * @param {NodeName} nodeName - * @return {DeltaBuilder} - */ -export function create(nodeName: NodeName): DeltaBuilder; -/** - * @template {string} NodeName - * @template {s.Schema} Schema - * @overload - * @param {NodeName} nodeName - * @param {Schema} schema - * @return {Schema extends s.Schema> ? DeltaBuilder : never} - */ -export function create>(nodeName: NodeName, schema: Schema): Schema extends s.Schema> ? DeltaBuilder : never; -/** - * @template {s.Schema} Schema - * @overload - * @param {Schema} schema - * @return {Schema extends s.Schema> ? DeltaBuilder : never} - */ -export function create>(schema: Schema): Schema extends s.Schema> ? DeltaBuilder : never; -/** - * @template {string|null} NodeName - * @template {{[k:string|number]:any}|null} Attrs - * @template {Array|string} [Children=never] - * @overload - * @param {NodeName} nodeName - * @param {Attrs} attrs - * @param {Children} [children] - * @return {DeltaBuilder< - * NodeName extends null ? any : NodeName, - * Attrs extends null ? {} : Attrs, - * Extract> extends Array ? (unknown extends Ac ? never : Ac) : never, - * Extract, - * null - * >} - */ -export function create | string = never>(nodeName: NodeName, attrs: Attrs, children?: Children | undefined): DeltaBuilder> extends Array ? (unknown extends Ac ? never : Ac) : never, Extract, null>; -export function $text<$Embeds extends Array> = any>(...$embeds: $Embeds): s.Schema extends null ? never : ($Embeds extends Array> ? $C : never)>>; -export const $textOnly: s.Schema>; -export function text> = s.Schema>>($schema?: Schema_1): Schema_1 extends s.Schema> ? DeltaBuilder : never; -export function $array<$Children extends unknown>($children?: $Children): s.Schema>>>; -export function array<$Schema extends s.Schema> = never>($schema: $Schema): $Schema extends never ? ArrayDeltaBuilder : DeltaBuilder; -export function $map<$Attrs extends { - [K: string | number]: any; -}>($attrs: s.Schema<$Attrs>): s.Schema>; -export function map<$Schema extends s.Schema> | undefined = undefined>($schema?: $Schema): $Schema extends s.Schema> ? DeltaBuilder : MapDeltaBuilder<{}>; -export function diff(d1: D, d2: NoInfer): D extends Delta ? DeltaBuilder : never; -export type Attribution = { - insert?: string[]; - insertAt?: number; - delete?: string[]; - deleteAt?: number; - format?: Record; - formatAt?: number; -}; -export type DeltaOps = s.Unwrap | InsertOp | AttrDeleteOp | DeleteOp | TextOp | AttrModifyOp | ModifyOp>>; -export type FormattingAttributes = { - [key: string]: any; -}; -export type DeltaJSON = { - type: "delta"; - name?: string; - attrs?: { [Key in string | number]: DeltaAttrOpJSON; }; - children?: Array; -}; -export type DeltaListOpJSON = { - type: "insert"; - insert: string | Array; - format?: { - [key: string]: any; - }; - attribution?: Attribution; -} | { - delete: number; -} | { - type: "retain"; - retain: number; - format?: { - [key: string]: any; - }; - attribution?: Attribution; -} | { - type: "modify"; - value: object; -}; -export type DeltaAttrOpJSON = { - type: "insert"; - value: any; - prevValue?: any; - attribution?: Attribution; -} | { - type: "delete"; - prevValue?: any; - attribution?: Attribution; -} | { - type: "modify"; - value: DeltaJSON; -}; -export type ChildrenOpAny = TextOp | InsertOp | DeleteOp | RetainOp | ModifyOp; -export type AttrOpAny = AttrInsertOp | AttrDeleteOp | AttrModifyOp; -export type _OpAny = ChildrenOpAny | AttrOpAny; -export type MergeListArrays | string, C2 extends Array | string> = Extract> extends never ? never : (Array<(Extract> extends Array ? (unknown extends AC1 ? never : AC1) : never)>); -export type AddToAttrs = { [K in (Key | keyof Attrs_1)]: (unknown extends Attrs_1[K] ? never : Attrs_1[K]) | (Key extends K ? Val : never); }; -export type MergeAttrs = { [K in (keyof NewAttrs | keyof Attrs_1)]: (unknown extends Attrs_1[K] ? never : Attrs_1[K]) | (unknown extends NewAttrs[K] ? never : NewAttrs[K]); }; -export type _AnyToNull = 0 extends (1 & X) ? null : X; -export type AllowedDeltaFromSchema> | null> = _AnyToNull extends null ? Delta : (Schema_1 extends s.Schema ? D : never); -export type DeltaAny = Delta; -export type DeltaBuilderAny = DeltaBuilder; -export type CastToDelta = D extends DeltaBuilder ? Delta : D; -export type RecursiveDelta = Delta | RecursiveDelta, Text>; -export type TextDelta = Delta; -export type TextDeltaBuilder = DeltaBuilder; -export type ArrayDelta = Delta; -export type ArrayDeltaBuilder = DeltaBuilder; -export type MapDelta = Delta; -export type MapDeltaBuilder = DeltaBuilder; -import * as s from '../schema.js'; -import * as list from '../list.js'; -import * as equalityTrait from '../trait/equality.js'; -import * as fingerprintTrait from '../trait/fingerprint.js'; -import * as prng from '../prng.js'; -//# sourceMappingURL=delta.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.d.ts.map deleted file mode 100644 index 635d23a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delta.d.ts","sourceRoot":"","sources":["../../delta/delta.js"],"names":[],"mappings":"AAyBA;;;;;;;;;GASG;AAEH;;GAEG;AACH,2BAFU,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAS7B;AAEF;;GAEG;AAEH;;GAEG;AAEH;;;;;;;GAOG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AACH,kCAFU,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAMlC;AAeD;IACE;;;;OAIG;IACH,oBAJW,MAAM,UACN,oBAAoB,GAAC,IAAI,eACzB,WAAW,OAAC,EAoBt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E,MAAM,GAAC,MAAM,GAAG,GAAG,CAAA;CAAG,IAC7B,KAAK,CAAC,GAAG,EAAC,OAAK,EAAC,KAAK,EAAC,KAAK,CAAC;4CAI5B;IAAG,CAAC,CAAC,EAAE,MAAM,GAAC,MAAM,GAAG,GAAG,CAAA;CAAG,IAC7B,YAAY,CAAC,GAAG,EAAC,OAAK,EAAC,KAAK,EAAC,KAAK,CAAC;mBAnlE7B,cAAc;sBANX,YAAY;+BAEH,sBAAsB;kCACnB,yBAAyB;sBAUrC,YAAY"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.test.d.ts deleted file mode 100644 index ceb757e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.test.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export function testDeltaBasicApi(_tc: t.TestCase): void; -export function testDeltaValues(_tc: t.TestCase): void; -export function testDeltaBasicCases(): void; -export function testDeltaArrayBasics(): void; -export function testAssignability(): void; -export function testText(): void; -export function testDelta(_tc: t.TestCase): void; -export function testDeltaMerging(_tc: t.TestCase): void; -export function testUseAttributes(_tc: t.TestCase): void; -export function testUseAttribution(_tc: t.TestCase): void; -export function testMapTyping(): void; -export function testMapDeltaBasics(_tc: t.TestCase): void; -export function testMapDeltaModify(_tc: t.TestCase): void; -export function testMapDelta(_tc: t.TestCase): void; -export function testRepeatRebaseMergeDeltas(tc: t.TestCase): void; -export function testNodeDelta(_tc: t.TestCase): void; -export function testRecursiveNode(): void; -export function testSimplifiedDeltaSchemaDefinition(): void; -export function testDiffing(): void; -export function testDiffingCommonPreSuffix(): void; -export function testSlice(): void; -export function testRepeatRandomListDiff(tc: t.TestCase): void; -export function testRepeatRandomMapDiff(tc: t.TestCase): void; -export function testDeltaAppend(_tc: t.TestCase): void; -export function testDeltaDiffWithFormatting(): void; -export function testDeltaDiffWithFormatting2(): void; -export function testDeltaDiffIssue1(): void; -import * as t from 'lib0/testing'; -//# sourceMappingURL=delta.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.test.d.ts.map deleted file mode 100644 index 07fa814..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/delta.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delta.test.d.ts","sourceRoot":"","sources":["../../delta/delta.test.js"],"names":[],"mappings":"AAqCO,uCAFI,CAAC,CAAC,QAAQ,QAWpB;AAYM,qCAFI,CAAC,CAAC,QAAQ,QAwBpB;AAEM,4CA2BN;AAEM,6CAMN;AAKM,0CAkJN;AAEM,iCAWN;AAKM,+BAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAYpB;AAKM,uCAFI,CAAC,CAAC,QAAQ,QAuBpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QAsBpB;AAEM,sCAaN;AAKM,wCAFI,CAAC,CAAC,QAAQ,QA4BpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QA2CpB;AAKM,kCAFI,CAAC,CAAC,QAAQ,QAqDpB;AAKM,gDAFI,CAAC,CAAC,QAAQ,QAoEpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,QAiCpB;AAEM,0CAmBN;AAEM,4DAIN;AAEM,oCAMN;AAEM,mDAMN;AAEM,kCAGN;AAKM,6CAFI,CAAC,CAAC,QAAQ,QAWpB;AAKM,4CAFI,CAAC,CAAC,QAAQ,QAWpB;AAKM,qCAFI,CAAC,CAAC,QAAQ,QAQpB;AAEM,oDAKN;AAEM,qDAKN;AAEM,4CAQN;mBAjtBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/t3.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/t3.test.d.ts deleted file mode 100644 index b449d55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/t3.test.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export function transformResult(a: DeltaA, b: DeltaB): TransformResult; -export const transformResultEmpty: TransformResult; -export type TransformResult = { - a: DeltaA | null; - b: DeltaB | null; -}; -export type DeltaTransformer = (t: { - a: DeltaA | null; - b: DeltaB | null; -}) => ({ - a: DeltaA | null; - b: DeltaB | null; -}); -export type Transform = { - applyA: (da: DeltaA) => TransformResult; - applyB: (db: DeltaB) => TransformResult; -}; -import * as delta from './delta.js'; -//# sourceMappingURL=t3.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/t3.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/t3.test.d.ts.map deleted file mode 100644 index dc1e002..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/delta/t3.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"t3.test.d.ts","sourceRoot":"","sources":["../../delta/t3.test.js"],"names":[],"mappings":"AAoBO,gCAN4B,MAAM,SAA3B,KAAK,CAAC,YAAY,OAAE,EACC,MAAM,SAA3B,KAAK,CAAC,YAAY,OAAE,KACvB,MAAM,KACN,MAAM,GACL,eAAe,CAAC,MAAM,OAAC,EAAC,MAAM,OAAC,CAAC,CAEO;AACnD,+DAA+D;4BAbnC,MAAM,SAApB,KAAK,CAAC,KAAK,OAAE,EACC,MAAM,SAApB,KAAK,CAAC,KAAK,OAAE,IACd;IAAE,CAAC,EAAE,MAAM,OAAC,CAAC;IAAC,CAAC,EAAE,MAAM,OAAC,CAAA;CAAE;6BAiBT,MAAM,SAAtB,KAAK,CAAC,QAAS,EACC,MAAM,SAAtB,KAAK,CAAC,QAAS,IAChB,CAAC,CAAC,EAAC;IAAC,CAAC,EAAC,MAAM,OAAC,CAAC;IAAA,CAAC,EAAC,MAAM,OAAC,CAAA;CAAC,KAAG,CAAC;IAAC,CAAC,EAAC,MAAM,OAAC,CAAC;IAAA,CAAC,EAAC,MAAM,OAAC,CAAA;CAAC,CAAC;sBA2GpC,MAAM,SAAnB,KAAK,CAAC,KAAM,EACC,MAAM,SAAnB,KAAK,CAAC,KAAM,IACb;IAAE,MAAM,EAAE,CAAC,EAAE,EAAC,MAAM,KAAG,eAAe,CAAC,MAAM,EAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,CAAC,EAAE,EAAC,MAAM,KAAG,eAAe,CAAC,MAAM,EAAC,MAAM,CAAC,CAAA;CAAE;uBAvIlG,YAAY"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff-9d236524.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff-9d236524.cjs deleted file mode 100644 index 56ab6ed..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff-9d236524.cjs +++ /dev/null @@ -1,162 +0,0 @@ -'use strict'; - -var _function = require('./function-314580f7.cjs'); - -/** - * Efficient diffs. - * - * @module diff - */ - -/** - * A SimpleDiff describes a change on a String. - * - * ```js - * console.log(a) // the old value - * console.log(b) // the updated value - * // Apply changes of diff (pseudocode) - * a.remove(diff.index, diff.remove) // Remove `diff.remove` characters - * a.insert(diff.index, diff.insert) // Insert `diff.insert` - * a === b // values match - * ``` - * - * @template {string|Array} T - * @typedef {Object} SimpleDiff - * @property {Number} index The index where changes were applied - * @property {Number} remove The number of characters to delete starting - * at `index`. - * @property {T} insert The new text to insert at `index` after applying - */ - -const highSurrogateRegex = /[\uD800-\uDBFF]/; -const lowSurrogateRegex = /[\uDC00-\uDFFF]/; - -/** - * Create a diff between two strings. This diff implementation is highly - * efficient, but not very sophisticated. - * - * @function - * - * @param {string} a The old version of the string - * @param {string} b The updated version of the string - * @return {SimpleDiff} The diff description. - */ -const simpleDiffString = (a, b) => { - let left = 0; // number of same characters counting from left - let right = 0; // number of same characters counting from right - while (left < a.length && left < b.length && a[left] === b[left]) { - left++; - } - // If the last same character is a high surrogate, we need to rollback to the previous character - if (left > 0 && highSurrogateRegex.test(a[left - 1])) left--; - while (right + left < a.length && right + left < b.length && a[a.length - right - 1] === b[b.length - right - 1]) { - right++; - } - // If the last same character is a low surrogate, we need to rollback to the previous character - if (right > 0 && lowSurrogateRegex.test(a[a.length - right])) right--; - return { - index: left, - remove: a.length - left - right, - insert: b.slice(left, b.length - right) - } -}; - -/** - * @todo Remove in favor of simpleDiffString - * @deprecated - */ -const simpleDiff = simpleDiffString; - -/** - * Create a diff between two arrays. This diff implementation is highly - * efficient, but not very sophisticated. - * - * Note: This is basically the same function as above. Another function was created so that the runtime - * can better optimize these function calls. - * - * @function - * @template T - * - * @param {Array} a The old version of the array - * @param {Array} b The updated version of the array - * @param {function(T, T):boolean} [compare] - * @return {SimpleDiff>} The diff description. - */ -const simpleDiffArray = (a, b, compare = _function.equalityStrict) => { - let left = 0; // number of same characters counting from left - let right = 0; // number of same characters counting from right - while (left < a.length && left < b.length && compare(a[left], b[left])) { - left++; - } - while (right + left < a.length && right + left < b.length && compare(a[a.length - right - 1], b[b.length - right - 1])) { - right++; - } - return { - index: left, - remove: a.length - left - right, - insert: b.slice(left, b.length - right) - } -}; - -/** - * Diff text and try to diff at the current cursor position. - * - * @param {string} a - * @param {string} b - * @param {number} cursor This should refer to the current left cursor-range position - */ -const simpleDiffStringWithCursor = (a, b, cursor) => { - let left = 0; // number of same characters counting from left - let right = 0; // number of same characters counting from right - // Iterate left to the right until we find a changed character - // First iteration considers the current cursor position - while ( - left < a.length && - left < b.length && - a[left] === b[left] && - left < cursor - ) { - left++; - } - // If the last same character is a high surrogate, we need to rollback to the previous character - if (left > 0 && highSurrogateRegex.test(a[left - 1])) left--; - // Iterate right to the left until we find a changed character - while ( - right + left < a.length && - right + left < b.length && - a[a.length - right - 1] === b[b.length - right - 1] - ) { - right++; - } - // If the last same character is a low surrogate, we need to rollback to the previous character - if (right > 0 && lowSurrogateRegex.test(a[a.length - right])) right--; - // Try to iterate left further to the right without caring about the current cursor position - while ( - right + left < a.length && - right + left < b.length && - a[left] === b[left] - ) { - left++; - } - if (left > 0 && highSurrogateRegex.test(a[left - 1])) left--; - return { - index: left, - remove: a.length - left - right, - insert: b.slice(left, b.length - right) - } -}; - -var diff = /*#__PURE__*/Object.freeze({ - __proto__: null, - simpleDiffString: simpleDiffString, - simpleDiff: simpleDiff, - simpleDiffArray: simpleDiffArray, - simpleDiffStringWithCursor: simpleDiffStringWithCursor -}); - -exports.diff = diff; -exports.simpleDiff = simpleDiff; -exports.simpleDiffArray = simpleDiffArray; -exports.simpleDiffString = simpleDiffString; -exports.simpleDiffStringWithCursor = simpleDiffStringWithCursor; -//# sourceMappingURL=diff-9d236524.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff-9d236524.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff-9d236524.cjs.map deleted file mode 100644 index de12614..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff-9d236524.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"diff-9d236524.cjs","sources":["../diff.js"],"sourcesContent":["/**\n * Efficient diffs.\n *\n * @module diff\n */\n\nimport { equalityStrict } from './function.js'\n\n/**\n * A SimpleDiff describes a change on a String.\n *\n * ```js\n * console.log(a) // the old value\n * console.log(b) // the updated value\n * // Apply changes of diff (pseudocode)\n * a.remove(diff.index, diff.remove) // Remove `diff.remove` characters\n * a.insert(diff.index, diff.insert) // Insert `diff.insert`\n * a === b // values match\n * ```\n *\n * @template {string|Array} T\n * @typedef {Object} SimpleDiff\n * @property {Number} index The index where changes were applied\n * @property {Number} remove The number of characters to delete starting\n * at `index`.\n * @property {T} insert The new text to insert at `index` after applying\n */\n\nconst highSurrogateRegex = /[\\uD800-\\uDBFF]/\nconst lowSurrogateRegex = /[\\uDC00-\\uDFFF]/\n\n/**\n * Create a diff between two strings. This diff implementation is highly\n * efficient, but not very sophisticated.\n *\n * @function\n *\n * @param {string} a The old version of the string\n * @param {string} b The updated version of the string\n * @return {SimpleDiff} The diff description.\n */\nexport const simpleDiffString = (a, b) => {\n let left = 0 // number of same characters counting from left\n let right = 0 // number of same characters counting from right\n while (left < a.length && left < b.length && a[left] === b[left]) {\n left++\n }\n // If the last same character is a high surrogate, we need to rollback to the previous character\n if (left > 0 && highSurrogateRegex.test(a[left - 1])) left--\n while (right + left < a.length && right + left < b.length && a[a.length - right - 1] === b[b.length - right - 1]) {\n right++\n }\n // If the last same character is a low surrogate, we need to rollback to the previous character\n if (right > 0 && lowSurrogateRegex.test(a[a.length - right])) right--\n return {\n index: left,\n remove: a.length - left - right,\n insert: b.slice(left, b.length - right)\n }\n}\n\n/**\n * @todo Remove in favor of simpleDiffString\n * @deprecated\n */\nexport const simpleDiff = simpleDiffString\n\n/**\n * Create a diff between two arrays. This diff implementation is highly\n * efficient, but not very sophisticated.\n *\n * Note: This is basically the same function as above. Another function was created so that the runtime\n * can better optimize these function calls.\n *\n * @function\n * @template T\n *\n * @param {Array} a The old version of the array\n * @param {Array} b The updated version of the array\n * @param {function(T, T):boolean} [compare]\n * @return {SimpleDiff>} The diff description.\n */\nexport const simpleDiffArray = (a, b, compare = equalityStrict) => {\n let left = 0 // number of same characters counting from left\n let right = 0 // number of same characters counting from right\n while (left < a.length && left < b.length && compare(a[left], b[left])) {\n left++\n }\n while (right + left < a.length && right + left < b.length && compare(a[a.length - right - 1], b[b.length - right - 1])) {\n right++\n }\n return {\n index: left,\n remove: a.length - left - right,\n insert: b.slice(left, b.length - right)\n }\n}\n\n/**\n * Diff text and try to diff at the current cursor position.\n *\n * @param {string} a\n * @param {string} b\n * @param {number} cursor This should refer to the current left cursor-range position\n */\nexport const simpleDiffStringWithCursor = (a, b, cursor) => {\n let left = 0 // number of same characters counting from left\n let right = 0 // number of same characters counting from right\n // Iterate left to the right until we find a changed character\n // First iteration considers the current cursor position\n while (\n left < a.length &&\n left < b.length &&\n a[left] === b[left] &&\n left < cursor\n ) {\n left++\n }\n // If the last same character is a high surrogate, we need to rollback to the previous character\n if (left > 0 && highSurrogateRegex.test(a[left - 1])) left--\n // Iterate right to the left until we find a changed character\n while (\n right + left < a.length &&\n right + left < b.length &&\n a[a.length - right - 1] === b[b.length - right - 1]\n ) {\n right++\n }\n // If the last same character is a low surrogate, we need to rollback to the previous character\n if (right > 0 && lowSurrogateRegex.test(a[a.length - right])) right--\n // Try to iterate left further to the right without caring about the current cursor position\n while (\n right + left < a.length &&\n right + left < b.length &&\n a[left] === b[left]\n ) {\n left++\n }\n if (left > 0 && highSurrogateRegex.test(a[left - 1])) left--\n return {\n index: left,\n remove: a.length - left - right,\n insert: b.slice(left, b.length - right)\n }\n}\n"],"names":["equalityStrict"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,kBAAiB;AAC5C,MAAM,iBAAiB,GAAG,kBAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,gBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC1C,EAAE,IAAI,IAAI,GAAG,EAAC;AACd,EAAE,IAAI,KAAK,GAAG,EAAC;AACf,EAAE,OAAO,IAAI,GAAG,CAAC,CAAC,MAAM,IAAI,IAAI,GAAG,C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AC,EAAE,IAAI,GAAE;AAC9D;AACA,EAAE;AACF,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM;AAC3B,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM;AAC3B,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC;AACvD,IAAI;AACJ,IAAI,KAAK,GAAE;AACX,GAAG;AACH;AACA,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,EAAE,KAAK,GAAE;AACvE;AACA,EAAE;AACF,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM;AAC3B,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM;AAC3B,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AACvB,IAAI;AACJ,IAAI,IAAI,GAAE;AACV,GAAG;AACH,EAAE,IAAI,IAAI,GAAG,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,GAAE;AAC9D,EAAE,OAAO;AACT,IAAI,KAAK,EAAE,IAAI;AACf,IAAI,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,IAAI,GAAG,KAAK;AACnC,IAAI,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;AAC3C,GAAG;AACH;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.cjs deleted file mode 100644 index 0896a87..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.cjs +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./function-314580f7.cjs'); -var diff = require('./diff-9d236524.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); - - - -exports.simpleDiff = diff.simpleDiff; -exports.simpleDiffArray = diff.simpleDiffArray; -exports.simpleDiffString = diff.simpleDiffString; -exports.simpleDiffStringWithCursor = diff.simpleDiffStringWithCursor; -//# sourceMappingURL=diff.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.cjs.map deleted file mode 100644 index 2a5df78..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"diff.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.d.ts deleted file mode 100644 index 290daec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export function simpleDiffString(a: string, b: string): SimpleDiff; -export function simpleDiff(a: string, b: string): SimpleDiff; -export function simpleDiffArray(a: Array, b: Array, compare?: (arg0: T, arg1: T) => boolean): SimpleDiff>; -export function simpleDiffStringWithCursor(a: string, b: string, cursor: number): { - index: number; - remove: number; - insert: string; -}; -/** - * A SimpleDiff describes a change on a String. - * - * ```js - * console.log(a) // the old value - * console.log(b) // the updated value - * // Apply changes of diff (pseudocode) - * a.remove(diff.index, diff.remove) // Remove `diff.remove` characters - * a.insert(diff.index, diff.insert) // Insert `diff.insert` - * a === b // values match - * ``` - */ -export type SimpleDiff> = { - /** - * The index where changes were applied - */ - index: number; - /** - * The number of characters to delete starting - * at `index`. - */ - remove: number; - /** - * The new text to insert at `index` after applying - */ - insert: T; -}; -//# sourceMappingURL=diff.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.d.ts.map deleted file mode 100644 index 5e3aa18..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../diff.js"],"names":[],"mappings":"AAyCO,oCAJI,MAAM,KACN,MAAM,GACL,UAAU,CAAC,MAAM,CAAC,CAoB7B;AAlBM,8BAJI,MAAM,KACN,MAAM,GACL,UAAU,CAAC,MAAM,CAAC,CAoB7B;AAuBM,gCAPM,CAAC,KAEH,KAAK,CAAC,CAAC,CAAC,KACR,KAAK,CAAC,CAAC,CAAC,YACR,CAAS,IAAC,EAAD,CAAC,EAAE,IAAC,EAAD,CAAC,KAAE,OAAO,GACrB,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAgB/B;AASM,8CAJI,MAAM,KACN,MAAM,UACN,MAAM;;;;EAyChB;;;;;;;;;;;;;uBA5HgC,CAAC,SAApB,MAAM,GAAC,KAAK,CAAC,GAAG,CAAE;;;;;;;;;;;;;YAKlB,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.test.d.ts deleted file mode 100644 index 5df670c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testDiffing(tc: t.TestCase): void; -export function testRepeatDiffing(tc: t.TestCase): void; -export function testSimpleDiffWithCursor(tc: t.TestCase): void; -export function testArrayDiffing(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=diff.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.test.d.ts.map deleted file mode 100644 index d7a8c5f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"diff.test.d.ts","sourceRoot":"","sources":["../diff.test.js"],"names":[],"mappings":"AA0BO,gCAFI,CAAC,CAAC,QAAQ,QAmBpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAQpB;AAKM,6CAFI,CAAC,CAAC,QAAQ,QA4CpB;AAKM,qCAFI,CAAC,CAAC,QAAQ,QAQpB;mBA7GkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.d.ts deleted file mode 100644 index bb84468..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export function diff(as: Array, bs: Array): Array<{ - index: number; - remove: Array; - insert: Array; -}>; -export function diffSplitBy(a: string, b: string, _regexp: RegExp | string): { - index: number; - remove: string; - insert: string; -}[]; -export function diffAuto(a: string, b: string): { - insert: string; - remove: string; - index: number; -}[]; -//# sourceMappingURL=patience.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.d.ts.map deleted file mode 100644 index 306eaee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patience.d.ts","sourceRoot":"","sources":["../../diff/patience.js"],"names":[],"mappings":"AAoBO,yBAJI,KAAK,CAAC,MAAM,CAAC,MACb,KAAK,CAAC,MAAM,CAAC,GACZ,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAC,CAAC,CAShF;AAOM,+BAJI,MAAM,KACN,MAAM,WACN,MAAM,GAAC,MAAM;;;;IAqBvB;AAWM,4BAHI,MAAM,KACN,MAAM;;;;IASP"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.test.d.ts deleted file mode 100644 index 7633a91..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.test.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function testDiffing(_tc: t.TestCase): void; -export function testRepeatRandomWordReplace(tc: t.TestCase): void; -import * as t from '../testing.js'; -//# sourceMappingURL=patience.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.test.d.ts.map deleted file mode 100644 index a5842fa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/diff/patience.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patience.test.d.ts","sourceRoot":"","sources":["../../diff/patience.test.js"],"names":[],"mappings":"AAmBO,iCAFI,CAAC,CAAC,QAAQ,QAwGpB;AAKM,gDAFI,CAAC,CAAC,QAAQ,QAgDpB;mBA3KkB,eAAe"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom-7e625b09.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom-7e625b09.cjs deleted file mode 100644 index 9f6df5b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom-7e625b09.cjs +++ /dev/null @@ -1,371 +0,0 @@ -'use strict'; - -var pair = require('./pair-ab022bc3.cjs'); -var map = require('./map-24d263c0.cjs'); -var schema = require('./schema.cjs'); - -/* eslint-env browser */ - -/* c8 ignore start */ -/** - * @type {Document} - */ -const doc = /** @type {Document} */ (typeof document !== 'undefined' ? document : {}); - -/** - * @param {string} name - * @return {HTMLElement} - */ -const createElement = name => doc.createElement(name); - -/** - * @return {DocumentFragment} - */ -const createDocumentFragment = () => doc.createDocumentFragment(); - -/** - * @type {$.Schema} - */ -const $fragment = schema.$custom(el => el.nodeType === DOCUMENT_FRAGMENT_NODE); - -/** - * @param {string} text - * @return {Text} - */ -const createTextNode = text => doc.createTextNode(text); - -const domParser = /** @type {DOMParser} */ (typeof DOMParser !== 'undefined' ? new DOMParser() : null); - -/** - * @param {HTMLElement} el - * @param {string} name - * @param {Object} opts - */ -const emitCustomEvent = (el, name, opts) => el.dispatchEvent(new CustomEvent(name, opts)); - -/** - * @param {Element} el - * @param {Array>} attrs Array of key-value pairs - * @return {Element} - */ -const setAttributes = (el, attrs) => { - pair.forEach(attrs, (key, value) => { - if (value === false) { - el.removeAttribute(key); - } else if (value === true) { - el.setAttribute(key, ''); - } else { - // @ts-ignore - el.setAttribute(key, value); - } - }); - return el -}; - -/** - * @param {Element} el - * @param {Map} attrs Array of key-value pairs - * @return {Element} - */ -const setAttributesMap = (el, attrs) => { - attrs.forEach((value, key) => { el.setAttribute(key, value); }); - return el -}; - -/** - * @param {Array|HTMLCollection} children - * @return {DocumentFragment} - */ -const fragment = children => { - const fragment = createDocumentFragment(); - for (let i = 0; i < children.length; i++) { - appendChild(fragment, children[i]); - } - return fragment -}; - -/** - * @param {Element} parent - * @param {Array} nodes - * @return {Element} - */ -const append = (parent, nodes) => { - appendChild(parent, fragment(nodes)); - return parent -}; - -/** - * @param {HTMLElement} el - */ -const remove = el => el.remove(); - -/** - * @param {EventTarget} el - * @param {string} name - * @param {EventListener} f - */ -const addEventListener = (el, name, f) => el.addEventListener(name, f); - -/** - * @param {EventTarget} el - * @param {string} name - * @param {EventListener} f - */ -const removeEventListener = (el, name, f) => el.removeEventListener(name, f); - -/** - * @param {Node} node - * @param {Array>} listeners - * @return {Node} - */ -const addEventListeners = (node, listeners) => { - pair.forEach(listeners, (name, f) => addEventListener(node, name, f)); - return node -}; - -/** - * @param {Node} node - * @param {Array>} listeners - * @return {Node} - */ -const removeEventListeners = (node, listeners) => { - pair.forEach(listeners, (name, f) => removeEventListener(node, name, f)); - return node -}; - -/** - * @param {string} name - * @param {Array|pair.Pair>} attrs Array of key-value pairs - * @param {Array} children - * @return {Element} - */ -const element = (name, attrs = [], children = []) => - append(setAttributes(createElement(name), attrs), children); - -/** - * @type {$.Schema} - */ -const $element = schema.$custom(el => el.nodeType === ELEMENT_NODE); - -/** - * @param {number} width - * @param {number} height - */ -const canvas = (width, height) => { - const c = /** @type {HTMLCanvasElement} */ (createElement('canvas')); - c.height = height; - c.width = width; - return c -}; - -/** - * @param {string} t - * @return {Text} - */ -const text = createTextNode; - -/** - * @type {$.Schema} - */ -const $text = schema.$custom(el => el.nodeType === TEXT_NODE); - -/** - * @param {pair.Pair} pair - */ -const pairToStyleString = pair => `${pair.left}:${pair.right};`; - -/** - * @param {Array>} pairs - * @return {string} - */ -const pairsToStyleString = pairs => pairs.map(pairToStyleString).join(''); - -/** - * @param {Map} m - * @return {string} - */ -const mapToStyleString = m => map.map(m, (value, key) => `${key}:${value};`).join(''); - -/** - * @todo should always query on a dom element - * - * @param {HTMLElement|ShadowRoot} el - * @param {string} query - * @return {HTMLElement | null} - */ -const querySelector = (el, query) => el.querySelector(query); - -/** - * @param {HTMLElement|ShadowRoot} el - * @param {string} query - * @return {NodeListOf} - */ -const querySelectorAll = (el, query) => el.querySelectorAll(query); - -/** - * @param {string} id - * @return {HTMLElement} - */ -const getElementById = id => /** @type {HTMLElement} */ (doc.getElementById(id)); - -/** - * @param {string} html - * @return {HTMLElement} - */ -const _parse = html => domParser.parseFromString(`${html}`, 'text/html').body; - -/** - * @param {string} html - * @return {DocumentFragment} - */ -const parseFragment = html => fragment(/** @type {any} */ (_parse(html).childNodes)); - -/** - * @param {string} html - * @return {HTMLElement} - */ -const parseElement = html => /** @type HTMLElement */ (_parse(html).firstElementChild); - -/** - * @param {HTMLElement} oldEl - * @param {HTMLElement|DocumentFragment} newEl - */ -const replaceWith = (oldEl, newEl) => oldEl.replaceWith(newEl); - -/** - * @param {HTMLElement} parent - * @param {HTMLElement} el - * @param {Node|null} ref - * @return {HTMLElement} - */ -const insertBefore = (parent, el, ref) => parent.insertBefore(el, ref); - -/** - * @param {Node} parent - * @param {Node} child - * @return {Node} - */ -const appendChild = (parent, child) => parent.appendChild(child); - -const ELEMENT_NODE = doc.ELEMENT_NODE; -const TEXT_NODE = doc.TEXT_NODE; -const CDATA_SECTION_NODE = doc.CDATA_SECTION_NODE; -const COMMENT_NODE = doc.COMMENT_NODE; -const DOCUMENT_NODE = doc.DOCUMENT_NODE; -const DOCUMENT_TYPE_NODE = doc.DOCUMENT_TYPE_NODE; -const DOCUMENT_FRAGMENT_NODE = doc.DOCUMENT_FRAGMENT_NODE; - -/** - * @type {$.Schema} - */ -const $node = schema.$custom(el => el.nodeType === DOCUMENT_NODE); - -/** - * @param {any} node - * @param {number} type - */ -const checkNodeType = (node, type) => node.nodeType === type; - -/** - * @param {Node} parent - * @param {HTMLElement} child - */ -const isParentOf = (parent, child) => { - let p = child.parentNode; - while (p && p !== parent) { - p = p.parentNode; - } - return p === parent -}; -/* c8 ignore stop */ - -var dom = /*#__PURE__*/Object.freeze({ - __proto__: null, - doc: doc, - createElement: createElement, - createDocumentFragment: createDocumentFragment, - $fragment: $fragment, - createTextNode: createTextNode, - domParser: domParser, - emitCustomEvent: emitCustomEvent, - setAttributes: setAttributes, - setAttributesMap: setAttributesMap, - fragment: fragment, - append: append, - remove: remove, - addEventListener: addEventListener, - removeEventListener: removeEventListener, - addEventListeners: addEventListeners, - removeEventListeners: removeEventListeners, - element: element, - $element: $element, - canvas: canvas, - text: text, - $text: $text, - pairToStyleString: pairToStyleString, - pairsToStyleString: pairsToStyleString, - mapToStyleString: mapToStyleString, - querySelector: querySelector, - querySelectorAll: querySelectorAll, - getElementById: getElementById, - parseFragment: parseFragment, - parseElement: parseElement, - replaceWith: replaceWith, - insertBefore: insertBefore, - appendChild: appendChild, - ELEMENT_NODE: ELEMENT_NODE, - TEXT_NODE: TEXT_NODE, - CDATA_SECTION_NODE: CDATA_SECTION_NODE, - COMMENT_NODE: COMMENT_NODE, - DOCUMENT_NODE: DOCUMENT_NODE, - DOCUMENT_TYPE_NODE: DOCUMENT_TYPE_NODE, - DOCUMENT_FRAGMENT_NODE: DOCUMENT_FRAGMENT_NODE, - $node: $node, - checkNodeType: checkNodeType, - isParentOf: isParentOf -}); - -exports.$element = $element; -exports.$fragment = $fragment; -exports.$node = $node; -exports.$text = $text; -exports.CDATA_SECTION_NODE = CDATA_SECTION_NODE; -exports.COMMENT_NODE = COMMENT_NODE; -exports.DOCUMENT_FRAGMENT_NODE = DOCUMENT_FRAGMENT_NODE; -exports.DOCUMENT_NODE = DOCUMENT_NODE; -exports.DOCUMENT_TYPE_NODE = DOCUMENT_TYPE_NODE; -exports.ELEMENT_NODE = ELEMENT_NODE; -exports.TEXT_NODE = TEXT_NODE; -exports.addEventListener = addEventListener; -exports.addEventListeners = addEventListeners; -exports.append = append; -exports.appendChild = appendChild; -exports.canvas = canvas; -exports.checkNodeType = checkNodeType; -exports.createDocumentFragment = createDocumentFragment; -exports.createElement = createElement; -exports.createTextNode = createTextNode; -exports.doc = doc; -exports.dom = dom; -exports.domParser = domParser; -exports.element = element; -exports.emitCustomEvent = emitCustomEvent; -exports.fragment = fragment; -exports.getElementById = getElementById; -exports.insertBefore = insertBefore; -exports.isParentOf = isParentOf; -exports.mapToStyleString = mapToStyleString; -exports.pairToStyleString = pairToStyleString; -exports.pairsToStyleString = pairsToStyleString; -exports.parseElement = parseElement; -exports.parseFragment = parseFragment; -exports.querySelector = querySelector; -exports.querySelectorAll = querySelectorAll; -exports.remove = remove; -exports.removeEventListener = removeEventListener; -exports.removeEventListeners = removeEventListeners; -exports.replaceWith = replaceWith; -exports.setAttributes = setAttributes; -exports.setAttributesMap = setAttributesMap; -exports.text = text; -//# sourceMappingURL=dom-7e625b09.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom-7e625b09.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom-7e625b09.cjs.map deleted file mode 100644 index 7575ff8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom-7e625b09.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dom-7e625b09.cjs","sources":["../dom.js"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * Utility module to work with the DOM.\n *\n * @module dom\n */\n\nimport * as pair from './pair.js'\nimport * as map from './map.js'\nimport * as $ from './schema.js'\n\n/* c8 ignore start */\n/**\n * @type {Document}\n */\nexport const doc = /** @type {Document} */ (typeof document !== 'undefined' ? document : {})\n\n/**\n * @param {string} name\n * @return {HTMLElement}\n */\nexport const createElement = name => doc.createElement(name)\n\n/**\n * @return {DocumentFragment}\n */\nexport const createDocumentFragment = () => doc.createDocumentFragment()\n\n/**\n * @type {$.Schema}\n */\nexport const $fragment = $.$custom(el => el.nodeType === DOCUMENT_FRAGMENT_NODE)\n\n/**\n * @param {string} text\n * @return {Text}\n */\nexport const createTextNode = text => doc.createTextNode(text)\n\nexport const domParser = /** @type {DOMParser} */ (typeof DOMParser !== 'undefined' ? new DOMParser() : null)\n\n/**\n * @param {HTMLElement} el\n * @param {string} name\n * @param {Object} opts\n */\nexport const emitCustomEvent = (el, name, opts) => el.dispatchEvent(new CustomEvent(name, opts))\n\n/**\n * @param {Element} el\n * @param {Array>} attrs Array of key-value pairs\n * @return {Element}\n */\nexport const setAttributes = (el, attrs) => {\n pair.forEach(attrs, (key, value) => {\n if (value === false) {\n el.removeAttribute(key)\n } else if (value === true) {\n el.setAttribute(key, '')\n } else {\n // @ts-ignore\n el.setAttribute(key, value)\n }\n })\n return el\n}\n\n/**\n * @param {Element} el\n * @param {Map} attrs Array of key-value pairs\n * @return {Element}\n */\nexport const setAttributesMap = (el, attrs) => {\n attrs.forEach((value, key) => { el.setAttribute(key, value) })\n return el\n}\n\n/**\n * @param {Array|HTMLCollection} children\n * @return {DocumentFragment}\n */\nexport const fragment = children => {\n const fragment = createDocumentFragment()\n for (let i = 0; i < children.length; i++) {\n appendChild(fragment, children[i])\n }\n return fragment\n}\n\n/**\n * @param {Element} parent\n * @param {Array} nodes\n * @return {Element}\n */\nexport const append = (parent, nodes) => {\n appendChild(parent, fragment(nodes))\n return parent\n}\n\n/**\n * @param {HTMLElement} el\n */\nexport const remove = el => el.remove()\n\n/**\n * @param {EventTarget} el\n * @param {string} name\n * @param {EventListener} f\n */\nexport const addEventListener = (el, name, f) => el.addEventListener(name, f)\n\n/**\n * @param {EventTarget} el\n * @param {string} name\n * @param {EventListener} f\n */\nexport const removeEventListener = (el, name, f) => el.removeEventListener(name, f)\n\n/**\n * @param {Node} node\n * @param {Array>} listeners\n * @return {Node}\n */\nexport const addEventListeners = (node, listeners) => {\n pair.forEach(listeners, (name, f) => addEventListener(node, name, f))\n return node\n}\n\n/**\n * @param {Node} node\n * @param {Array>} listeners\n * @return {Node}\n */\nexport const removeEventListeners = (node, listeners) => {\n pair.forEach(listeners, (name, f) => removeEventListener(node, name, f))\n return node\n}\n\n/**\n * @param {string} name\n * @param {Array|pair.Pair>} attrs Array of key-value pairs\n * @param {Array} children\n * @return {Element}\n */\nexport const element = (name, attrs = [], children = []) =>\n append(setAttributes(createElement(name), attrs), children)\n\n/**\n * @type {$.Schema}\n */\nexport const $element = $.$custom(el => el.nodeType === ELEMENT_NODE)\n\n/**\n * @param {number} width\n * @param {number} height\n */\nexport const canvas = (width, height) => {\n const c = /** @type {HTMLCanvasElement} */ (createElement('canvas'))\n c.height = height\n c.width = width\n return c\n}\n\n/**\n * @param {string} t\n * @return {Text}\n */\nexport const text = createTextNode\n\n/**\n * @type {$.Schema}\n */\nexport const $text = $.$custom(el => el.nodeType === TEXT_NODE)\n\n/**\n * @param {pair.Pair} pair\n */\nexport const pairToStyleString = pair => `${pair.left}:${pair.right};`\n\n/**\n * @param {Array>} pairs\n * @return {string}\n */\nexport const pairsToStyleString = pairs => pairs.map(pairToStyleString).join('')\n\n/**\n * @param {Map} m\n * @return {string}\n */\nexport const mapToStyleString = m => map.map(m, (value, key) => `${key}:${value};`).join('')\n\n/**\n * @todo should always query on a dom element\n *\n * @param {HTMLElement|ShadowRoot} el\n * @param {string} query\n * @return {HTMLElement | null}\n */\nexport const querySelector = (el, query) => el.querySelector(query)\n\n/**\n * @param {HTMLElement|ShadowRoot} el\n * @param {string} query\n * @return {NodeListOf}\n */\nexport const querySelectorAll = (el, query) => el.querySelectorAll(query)\n\n/**\n * @param {string} id\n * @return {HTMLElement}\n */\nexport const getElementById = id => /** @type {HTMLElement} */ (doc.getElementById(id))\n\n/**\n * @param {string} html\n * @return {HTMLElement}\n */\nconst _parse = html => domParser.parseFromString(`${html}`, 'text/html').body\n\n/**\n * @param {string} html\n * @return {DocumentFragment}\n */\nexport const parseFragment = html => fragment(/** @type {any} */ (_parse(html).childNodes))\n\n/**\n * @param {string} html\n * @return {HTMLElement}\n */\nexport const parseElement = html => /** @type HTMLElement */ (_parse(html).firstElementChild)\n\n/**\n * @param {HTMLElement} oldEl\n * @param {HTMLElement|DocumentFragment} newEl\n */\nexport const replaceWith = (oldEl, newEl) => oldEl.replaceWith(newEl)\n\n/**\n * @param {HTMLElement} parent\n * @param {HTMLElement} el\n * @param {Node|null} ref\n * @return {HTMLElement}\n */\nexport const insertBefore = (parent, el, ref) => parent.insertBefore(el, ref)\n\n/**\n * @param {Node} parent\n * @param {Node} child\n * @return {Node}\n */\nexport const appendChild = (parent, child) => parent.appendChild(child)\n\nexport const ELEMENT_NODE = doc.ELEMENT_NODE\nexport const TEXT_NODE = doc.TEXT_NODE\nexport const CDATA_SECTION_NODE = doc.CDATA_SECTION_NODE\nexport const COMMENT_NODE = doc.COMMENT_NODE\nexport const DOCUMENT_NODE = doc.DOCUMENT_NODE\nexport const DOCUMENT_TYPE_NODE = doc.DOCUMENT_TYPE_NODE\nexport const DOCUMENT_FRAGMENT_NODE = doc.DOCUMENT_FRAGMENT_NODE\n\n/**\n * @type {$.Schema}\n */\nexport const $node = $.$custom(el => el.nodeType === DOCUMENT_NODE)\n\n/**\n * @param {any} node\n * @param {number} type\n */\nexport const checkNodeType = (node, type) => node.nodeType === type\n\n/**\n * @param {Node} parent\n * @param {HTMLElement} child\n */\nexport const isParentOf = (parent, child) => {\n let p = child.parentNode\n while (p && p !== parent) {\n p = p.parentNode\n }\n return p === parent\n}\n/* c8 ignore stop */\n"],"names":["$.$custom","pair.forEach","map.map"],"mappings":";;;;;;AAAA;AAWA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,4BAA4B,OAAO,QAAQ,KAAK,WAAW,GAAG,QAAQ,GAAG,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services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.cjs deleted file mode 100644 index ad46360..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.cjs +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./pair-ab022bc3.cjs'); -require('./map-24d263c0.cjs'); -require('./schema.cjs'); -var dom = require('./dom-7e625b09.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./error-0c1f634f.cjs'); -require('./environment-1c97264d.cjs'); -require('./string-fddc5f8b.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -require('./prng-37d48618.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./math-96d5e8c4.cjs'); -require('./buffer-3e750729.cjs'); -require('./encoding-1a745c43.cjs'); -require('./number-1fb57bba.cjs'); -require('./decoding-76e75827.cjs'); - - - -exports.$element = dom.$element; -exports.$fragment = dom.$fragment; -exports.$node = dom.$node; -exports.$text = dom.$text; -exports.CDATA_SECTION_NODE = dom.CDATA_SECTION_NODE; -exports.COMMENT_NODE = dom.COMMENT_NODE; -exports.DOCUMENT_FRAGMENT_NODE = dom.DOCUMENT_FRAGMENT_NODE; -exports.DOCUMENT_NODE = dom.DOCUMENT_NODE; -exports.DOCUMENT_TYPE_NODE = dom.DOCUMENT_TYPE_NODE; -exports.ELEMENT_NODE = dom.ELEMENT_NODE; -exports.TEXT_NODE = dom.TEXT_NODE; -exports.addEventListener = dom.addEventListener; -exports.addEventListeners = dom.addEventListeners; -exports.append = dom.append; -exports.appendChild = dom.appendChild; -exports.canvas = dom.canvas; -exports.checkNodeType = dom.checkNodeType; -exports.createDocumentFragment = dom.createDocumentFragment; -exports.createElement = dom.createElement; -exports.createTextNode = dom.createTextNode; -exports.doc = dom.doc; -exports.domParser = dom.domParser; -exports.element = dom.element; -exports.emitCustomEvent = dom.emitCustomEvent; -exports.fragment = dom.fragment; -exports.getElementById = dom.getElementById; -exports.insertBefore = dom.insertBefore; -exports.isParentOf = dom.isParentOf; -exports.mapToStyleString = dom.mapToStyleString; -exports.pairToStyleString = dom.pairToStyleString; -exports.pairsToStyleString = dom.pairsToStyleString; -exports.parseElement = dom.parseElement; -exports.parseFragment = dom.parseFragment; -exports.querySelector = dom.querySelector; -exports.querySelectorAll = dom.querySelectorAll; -exports.remove = dom.remove; -exports.removeEventListener = dom.removeEventListener; -exports.removeEventListeners = dom.removeEventListeners; -exports.replaceWith = dom.replaceWith; -exports.setAttributes = dom.setAttributes; -exports.setAttributesMap = dom.setAttributesMap; -exports.text = dom.text; -//# sourceMappingURL=dom.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.cjs.map deleted file mode 100644 index 36267b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dom.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.d.ts deleted file mode 100644 index e71a664..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @type {Document} - */ -export const doc: Document; -export function createElement(name: string): HTMLElement; -export function createDocumentFragment(): DocumentFragment; -/** - * @type {$.Schema} - */ -export const $fragment: $.Schema; -export function createTextNode(text: string): Text; -export const domParser: DOMParser; -export function emitCustomEvent(el: HTMLElement, name: string, opts: Object): boolean; -export function setAttributes(el: Element, attrs: Array>): Element; -export function setAttributesMap(el: Element, attrs: Map): Element; -export function fragment(children: Array | HTMLCollection): DocumentFragment; -export function append(parent: Element, nodes: Array): Element; -export function remove(el: HTMLElement): void; -export function addEventListener(el: EventTarget, name: string, f: EventListener): void; -export function removeEventListener(el: EventTarget, name: string, f: EventListener): void; -export function addEventListeners(node: Node, listeners: Array>): Node; -export function removeEventListeners(node: Node, listeners: Array>): Node; -export function element(name: string, attrs?: Array | pair.Pair>, children?: Array): Element; -/** - * @type {$.Schema} - */ -export const $element: $.Schema; -export function canvas(width: number, height: number): HTMLCanvasElement; -export function text(text: string): Text; -/** - * @type {$.Schema} - */ -export const $text: $.Schema; -export function pairToStyleString(pair: pair.Pair): string; -export function pairsToStyleString(pairs: Array>): string; -export function mapToStyleString(m: Map): string; -export function querySelector(el: HTMLElement | ShadowRoot, query: string): HTMLElement | null; -export function querySelectorAll(el: HTMLElement | ShadowRoot, query: string): NodeListOf; -export function getElementById(id: string): HTMLElement; -export function parseFragment(html: string): DocumentFragment; -export function parseElement(html: string): HTMLElement; -export function replaceWith(oldEl: HTMLElement, newEl: HTMLElement | DocumentFragment): void; -export function insertBefore(parent: HTMLElement, el: HTMLElement, ref: Node | null): HTMLElement; -export function appendChild(parent: Node, child: Node): Node; -export const ELEMENT_NODE: 1; -export const TEXT_NODE: 3; -export const CDATA_SECTION_NODE: 4; -export const COMMENT_NODE: 8; -export const DOCUMENT_NODE: 9; -export const DOCUMENT_TYPE_NODE: 10; -export const DOCUMENT_FRAGMENT_NODE: 11; -/** - * @type {$.Schema} - */ -export const $node: $.Schema; -export function checkNodeType(node: any, type: number): boolean; -export function isParentOf(parent: Node, child: HTMLElement): boolean; -import * as $ from './schema.js'; -import * as pair from './pair.js'; -//# sourceMappingURL=dom.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.d.ts.map deleted file mode 100644 index e5532cd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/dom.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../dom.js"],"names":[],"mappings":"AAaA;;GAEG;AACH,kBAFU,QAAQ,CAE0E;AAMrF,oCAHI,MAAM,GACL,WAAW,CAEqC;AAKrD,0CAFK,gBAAgB,CAE4C;AAExE;;GAEG;AACH,wBAFU,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAE4C;AAMzE,qCAHI,MAAM,GACL,IAAI,CAE8C;AAE9D,wBAAoC,SAAS,CAAgE;AAOtG,oCAJI,WAAW,QACX,MAAM,QACN,MAAM,WAE+E;AAOzF,kCAJI,OAAO,SACP,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAC,MAAM,GAAC,OAAO,CAAC,CAAC,GACtC,OAAO,CAclB;AAOM,qCAJI,OAAO,SACP,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAClB,OAAO,CAKlB;AAMM,mCAHI,KAAK,CAAC,IAAI,CAAC,GAAC,cAAc,GACzB,gBAAgB,CAQ3B;AAOM,+BAJI,OAAO,SACP,KAAK,CAAC,IAAI,CAAC,GACV,OAAO,CAKlB;AAKM,2BAFI,WAAW,QAEiB;AAOhC,qCAJI,WAAW,QACX,MAAM,KACN,aAAa,QAEqD;AAOtE,wCAJI,WAAW,QACX,MAAM,KACN,aAAa,QAE2D;AAO5E,wCAJI,IAAI,aACJ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAC,aAAa,CAAC,CAAC,GACrC,IAAI,CAKf;AAOM,2CAJI,IAAI,aACJ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,E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ACxD,wCAAgE;AAEhE;;GAEG;AACH,oBAFU,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAE2C;AAM5D,oCAHI,GAAG,QACH,MAAM,WAEkD;AAM5D,mCAHI,IAAI,SACJ,WAAW,WAQrB;mBAhRkB,aAAa;sBAFV,WAAW"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/ecdsa.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/ecdsa.cjs deleted file mode 100644 index d5b528e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/ecdsa.cjs +++ /dev/null @@ -1,130 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var webcrypto = require('lib0/webcrypto'); -var common = require('./common.cjs'); - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var webcrypto__namespace = /*#__PURE__*/_interopNamespace(webcrypto); - -/** - * ECDSA is an asymmetric key for signing - */ - -/** - * @typedef {Array<'sign'|'verify'>} Usages - */ - -/** - * @type {Usages} - */ -const defaultUsages = ['sign', 'verify']; - -const defaultSignAlgorithm = { - name: 'ECDSA', - hash: 'SHA-384' -}; - -/** - * @experimental The API is not final! - * - * Sign a message - * - * @param {CryptoKey} key - * @param {Uint8Array} data - * @return {PromiseLike>} signature - */ -const sign = (key, data) => - webcrypto__namespace.subtle.sign( - defaultSignAlgorithm, - key, - data - ).then(signature => new Uint8Array(signature)); - -/** - * @experimental The API is not final! - * - * Sign a message - * - * @param {CryptoKey} key - * @param {Uint8Array} signature - * @param {Uint8Array} data - * @return {PromiseLike} signature - */ -const verify = (key, signature, data) => - webcrypto__namespace.subtle.verify( - defaultSignAlgorithm, - key, - signature, - data - ); - -const defaultKeyAlgorithm = { - name: 'ECDSA', - namedCurve: 'P-384' -}; - -/* c8 ignore next */ -/** - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - */ -const generateKeyPair = ({ extractable = false, usages = defaultUsages } = {}) => - webcrypto__namespace.subtle.generateKey( - defaultKeyAlgorithm, - extractable, - usages - ); - -/** - * @param {any} jwk - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - */ -const importKeyJwk = (jwk, { extractable = false, usages } = {}) => { - if (usages == null) { - /* c8 ignore next 2 */ - usages = jwk.key_ops || defaultUsages; - } - return webcrypto__namespace.subtle.importKey('jwk', jwk, defaultKeyAlgorithm, extractable, /** @type {Usages} */ (usages)) -}; - -/** - * Only suited for importing public keys. - * - * @param {any} raw - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - */ -const importKeyRaw = (raw, { extractable = false, usages = defaultUsages } = {}) => - webcrypto__namespace.subtle.importKey('raw', raw, defaultKeyAlgorithm, extractable, usages); - -exports.exportKeyJwk = common.exportKeyJwk; -exports.exportKeyRaw = common.exportKeyRaw; -exports.generateKeyPair = generateKeyPair; -exports.importKeyJwk = importKeyJwk; -exports.importKeyRaw = importKeyRaw; -exports.sign = sign; -exports.verify = verify; -//# sourceMappingURL=ecdsa.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/ecdsa.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/ecdsa.cjs.map deleted file mode 100644 index 1cda5d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/ecdsa.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ecdsa.cjs","sources":["../crypto/ecdsa.js"],"sourcesContent":["/**\n * ECDSA is an asymmetric key for signing\n */\n\nimport * as webcrypto from 'lib0/webcrypto'\nexport { exportKeyJwk, exportKeyRaw } from './common.js'\n\n/**\n * @typedef {Array<'sign'|'verify'>} Usages\n */\n\n/**\n * @type {Usages}\n */\nconst defaultUsages = ['sign', 'verify']\n\nconst defaultSignAlgorithm = {\n name: 'ECDSA',\n hash: 'SHA-384'\n}\n\n/**\n * @experimental The API is not final!\n *\n * Sign a message\n *\n * @param {CryptoKey} key\n * @param {Uint8Array} data\n * @return {PromiseLike>} signature\n */\nexport const sign = (key, data) =>\n webcrypto.subtle.sign(\n defaultSignAlgorithm,\n key,\n data\n ).then(signature => new Uint8Array(signature))\n\n/**\n * @experimental The API is not final!\n *\n * Sign a message\n *\n * @param {CryptoKey} key\n * @param {Uint8Array} signature\n * @param {Uint8Array} data\n * @return {PromiseLike} signature\n */\nexport const verify = (key, signature, data) =>\n webcrypto.subtle.verify(\n defaultSignAlgorithm,\n key,\n signature,\n data\n )\n\nconst defaultKeyAlgorithm = {\n name: 'ECDSA',\n namedCurve: 'P-384'\n}\n\n/* c8 ignore next */\n/**\n * @param {Object} opts\n * @param {boolean} [opts.extractable]\n * @param {Usages} [opts.usages]\n */\nexport const generateKeyPair = ({ extractable = false, usages = defaultUsages } = {}) =>\n webcrypto.subtle.generateKey(\n defaultKeyAlgorithm,\n extractable,\n usages\n )\n\n/**\n * @param {any} jwk\n * @param {Object} opts\n * @param {boolean} [opts.extractable]\n * @param {Usages} [opts.usages]\n */\nexport const importKeyJwk = (jwk, { extractable = false, usages } = {}) => {\n if (usages == null) {\n /* c8 ignore next 2 */\n usages = jwk.key_ops || defaultUsages\n }\n return webcrypto.subtle.importKey('jwk', jwk, defaultKeyAlgorithm, extractable, /** @type {Usages} */ (usages))\n}\n\n/**\n * Only suited for importing public keys.\n *\n * @param {any} raw\n * @param {Object} opts\n * @param {boolean} [opts.extractable]\n * @param {Usages} [opts.usages]\n */\nexport const importKeyRaw = (raw, { extractable = false, usages = defaultUsages } = {}) =>\n webcrypto.subtle.importKey('raw', raw, defaultKeyAlgorithm, extractable, usages)\n"],"names":["webcrypto"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAC;AACxC;AACA,MAAM,oBAAoB,GAAG;AAC7B,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE,SAAS;AACjB,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,GAAG,EAAE,IAAI;AAC9B,EAAEA,oBAAS,CAAC,MAAM,CAAC,IAAI;AACvB,IAAI,oBAAoB;AACxB,IAAI,GAAG;AACP,IAAI,IAAI;AACR,GAAG,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,UAAU,CAAC,SAAS,CAAC,EAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI;AAC3C,EAAEA,oBAAS,CAAC,MAAM,CAAC,MAAM;AACzB,IAAI,oBAAoB;AACxB,IAAI,GAAG;AACP,IAAI,SAAS;AACb,IAAI,IAAI;AACR,IAAG;AACH;AACA,MAAM,mBAAmB,GAAG;AAC5B,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,UAAU,EAAE,OAAO;AACrB,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAG,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,GAAG,EAAE;AACpF,EAAEA,oBAAS,CAAC,MAAM,CAAC,WAAW;AAC9B,IAAI,mBAAmB;AACvB,IAAI,WAAW;AACf,IAAI,MAAM;AACV,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,CAAC,GAAG,EAAE,EAAE,WAAW,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK;AAC3E,EAAE,IAAI,MAAM,IAAI,IAAI,EAAE;AACtB;AACA,IAAI,MAAM,GAAG,GAAG,CAAC,OAAO,IAAI,cAAa;AACzC,GAAG;AACH,EAAE,OAAOA,oBAAS,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,mBAAmB,EAAE,WAAW,yBAAyB,MAAM,EAAE;AACjH,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,CAAC,GAAG,EAAE,EAAE,WAAW,GAAG,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,GAAG,EAAE;AACtF,EAAEA,oBAAS,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding-1a745c43.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding-1a745c43.cjs deleted file mode 100644 index 705a008..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding-1a745c43.cjs +++ /dev/null @@ -1,1025 +0,0 @@ -'use strict'; - -var math = require('./math-96d5e8c4.cjs'); -var number = require('./number-1fb57bba.cjs'); -var binary = require('./binary-ac8e39e2.cjs'); -var string = require('./string-fddc5f8b.cjs'); -var array = require('./array-78849c95.cjs'); - -/** - * Efficient schema-less binary encoding with support for variable length encoding. - * - * Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module encoding - */ - -/** - * A BinaryEncoder handles the encoding to an Uint8Array. - */ -class Encoder { - constructor () { - this.cpos = 0; - this.cbuf = new Uint8Array(100); - /** - * @type {Array} - */ - this.bufs = []; - } -} - -/** - * @function - * @return {Encoder} - */ -const createEncoder = () => new Encoder(); - -/** - * @param {function(Encoder):void} f - */ -const encode = (f) => { - const encoder = createEncoder(); - f(encoder); - return toUint8Array(encoder) -}; - -/** - * The current length of the encoded data. - * - * @function - * @param {Encoder} encoder - * @return {number} - */ -const length = encoder => { - let len = encoder.cpos; - for (let i = 0; i < encoder.bufs.length; i++) { - len += encoder.bufs[i].length; - } - return len -}; - -/** - * Check whether encoder is empty. - * - * @function - * @param {Encoder} encoder - * @return {boolean} - */ -const hasContent = encoder => encoder.cpos > 0 || encoder.bufs.length > 0; - -/** - * Transform to Uint8Array. - * - * @function - * @param {Encoder} encoder - * @return {Uint8Array} The created ArrayBuffer. - */ -const toUint8Array = encoder => { - const uint8arr = new Uint8Array(length(encoder)); - let curPos = 0; - for (let i = 0; i < encoder.bufs.length; i++) { - const d = encoder.bufs[i]; - uint8arr.set(d, curPos); - curPos += d.length; - } - uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos); - return uint8arr -}; - -/** - * Verify that it is possible to write `len` bytes wtihout checking. If - * necessary, a new Buffer with the required length is attached. - * - * @param {Encoder} encoder - * @param {number} len - */ -const verifyLen = (encoder, len) => { - const bufferLen = encoder.cbuf.length; - if (bufferLen - encoder.cpos < len) { - encoder.bufs.push(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos)); - encoder.cbuf = new Uint8Array(math.max(bufferLen, len) * 2); - encoder.cpos = 0; - } -}; - -/** - * Write one byte to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {number} num The byte that is to be encoded. - */ -const write = (encoder, num) => { - const bufferLen = encoder.cbuf.length; - if (encoder.cpos === bufferLen) { - encoder.bufs.push(encoder.cbuf); - encoder.cbuf = new Uint8Array(bufferLen * 2); - encoder.cpos = 0; - } - encoder.cbuf[encoder.cpos++] = num; -}; - -/** - * Write one byte at a specific position. - * Position must already be written (i.e. encoder.length > pos) - * - * @function - * @param {Encoder} encoder - * @param {number} pos Position to which to write data - * @param {number} num Unsigned 8-bit integer - */ -const set = (encoder, pos, num) => { - let buffer = null; - // iterate all buffers and adjust position - for (let i = 0; i < encoder.bufs.length && buffer === null; i++) { - const b = encoder.bufs[i]; - if (pos < b.length) { - buffer = b; // found buffer - } else { - pos -= b.length; - } - } - if (buffer === null) { - // use current buffer - buffer = encoder.cbuf; - } - buffer[pos] = num; -}; - -/** - * Write one byte as an unsigned integer. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -const writeUint8 = write; - -/** - * Write one byte as an unsigned Integer at a specific location. - * - * @function - * @param {Encoder} encoder - * @param {number} pos The location where the data will be written. - * @param {number} num The number that is to be encoded. - */ -const setUint8 = set; - -/** - * Write two bytes as an unsigned integer. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -const writeUint16 = (encoder, num) => { - write(encoder, num & binary.BITS8); - write(encoder, (num >>> 8) & binary.BITS8); -}; -/** - * Write two bytes as an unsigned integer at a specific location. - * - * @function - * @param {Encoder} encoder - * @param {number} pos The location where the data will be written. - * @param {number} num The number that is to be encoded. - */ -const setUint16 = (encoder, pos, num) => { - set(encoder, pos, num & binary.BITS8); - set(encoder, pos + 1, (num >>> 8) & binary.BITS8); -}; - -/** - * Write two bytes as an unsigned integer - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -const writeUint32 = (encoder, num) => { - for (let i = 0; i < 4; i++) { - write(encoder, num & binary.BITS8); - num >>>= 8; - } -}; - -/** - * Write two bytes as an unsigned integer in big endian order. - * (most significant byte first) - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -const writeUint32BigEndian = (encoder, num) => { - for (let i = 3; i >= 0; i--) { - write(encoder, (num >>> (8 * i)) & binary.BITS8); - } -}; - -/** - * Write two bytes as an unsigned integer at a specific location. - * - * @function - * @param {Encoder} encoder - * @param {number} pos The location where the data will be written. - * @param {number} num The number that is to be encoded. - */ -const setUint32 = (encoder, pos, num) => { - for (let i = 0; i < 4; i++) { - set(encoder, pos + i, num & binary.BITS8); - num >>>= 8; - } -}; - -/** - * Write a variable length unsigned integer. Max encodable integer is 2^53. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -const writeVarUint = (encoder, num) => { - while (num > binary.BITS7) { - write(encoder, binary.BIT8 | (binary.BITS7 & num)); - num = math.floor(num / 128); // shift >>> 7 - } - write(encoder, binary.BITS7 & num); -}; - -/** - * Write a variable length integer. - * - * We use the 7th bit instead for signaling that this is a negative number. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -const writeVarInt = (encoder, num) => { - const isNegative = math.isNegativeZero(num); - if (isNegative) { - num = -num; - } - // |- whether to continue reading |- whether is negative |- number - write(encoder, (num > binary.BITS6 ? binary.BIT8 : 0) | (isNegative ? binary.BIT7 : 0) | (binary.BITS6 & num)); - num = math.floor(num / 64); // shift >>> 6 - // We don't need to consider the case of num === 0 so we can use a different - // pattern here than above. - while (num > 0) { - write(encoder, (num > binary.BITS7 ? binary.BIT8 : 0) | (binary.BITS7 & num)); - num = math.floor(num / 128); // shift >>> 7 - } -}; - -/** - * A cache to store strings temporarily - */ -const _strBuffer = new Uint8Array(30000); -const _maxStrBSize = _strBuffer.length / 3; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -const _writeVarStringNative = (encoder, str) => { - if (str.length < _maxStrBSize) { - // We can encode the string into the existing buffer - /* c8 ignore next */ - const written = string.utf8TextEncoder.encodeInto(str, _strBuffer).written || 0; - writeVarUint(encoder, written); - for (let i = 0; i < written; i++) { - write(encoder, _strBuffer[i]); - } - } else { - writeVarUint8Array(encoder, string.encodeUtf8(str)); - } -}; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -const _writeVarStringPolyfill = (encoder, str) => { - const encodedString = unescape(encodeURIComponent(str)); - const len = encodedString.length; - writeVarUint(encoder, len); - for (let i = 0; i < len; i++) { - write(encoder, /** @type {number} */ (encodedString.codePointAt(i))); - } -}; - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -/* c8 ignore next */ -const writeVarString = (string.utf8TextEncoder && /** @type {any} */ (string.utf8TextEncoder).encodeInto) ? _writeVarStringNative : _writeVarStringPolyfill; - -/** - * Write a string terminated by a special byte sequence. This is not very performant and is - * generally discouraged. However, the resulting byte arrays are lexiographically ordered which - * makes this a nice feature for databases. - * - * The string will be encoded using utf8 and then terminated and escaped using writeTerminatingUint8Array. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -const writeTerminatedString = (encoder, str) => - writeTerminatedUint8Array(encoder, string.encodeUtf8(str)); - -/** - * Write a terminating Uint8Array. Note that this is not performant and is generally - * discouraged. There are few situations when this is needed. - * - * We use 0x0 as a terminating character. 0x1 serves as an escape character for 0x0 and 0x1. - * - * Example: [0,1,2] is encoded to [1,0,1,1,2,0]. 0x0, and 0x1 needed to be escaped using 0x1. Then - * the result is terminated using the 0x0 character. - * - * This is basically how many systems implement null terminated strings. However, we use an escape - * character 0x1 to avoid issues and potenial attacks on our database (if this is used as a key - * encoder for NoSql databases). - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} buf The string that is to be encoded. - */ -const writeTerminatedUint8Array = (encoder, buf) => { - for (let i = 0; i < buf.length; i++) { - const b = buf[i]; - if (b === 0 || b === 1) { - write(encoder, 1); - } - write(encoder, buf[i]); - } - write(encoder, 0); -}; - -/** - * Write the content of another Encoder. - * - * @TODO: can be improved! - * - Note: Should consider that when appending a lot of small Encoders, we should rather clone than referencing the old structure. - * Encoders start with a rather big initial buffer. - * - * @function - * @param {Encoder} encoder The enUint8Arr - * @param {Encoder} append The BinaryEncoder to be written. - */ -const writeBinaryEncoder = (encoder, append) => writeUint8Array(encoder, toUint8Array(append)); - -/** - * Append fixed-length Uint8Array to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -const writeUint8Array = (encoder, uint8Array) => { - const bufferLen = encoder.cbuf.length; - const cpos = encoder.cpos; - const leftCopyLen = math.min(bufferLen - cpos, uint8Array.length); - const rightCopyLen = uint8Array.length - leftCopyLen; - encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos); - encoder.cpos += leftCopyLen; - if (rightCopyLen > 0) { - // Still something to write, write right half.. - // Append new buffer - encoder.bufs.push(encoder.cbuf); - // must have at least size of remaining buffer - encoder.cbuf = new Uint8Array(math.max(bufferLen * 2, rightCopyLen)); - // copy array - encoder.cbuf.set(uint8Array.subarray(leftCopyLen)); - encoder.cpos = rightCopyLen; - } -}; - -/** - * Append an Uint8Array to Encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -const writeVarUint8Array = (encoder, uint8Array) => { - writeVarUint(encoder, uint8Array.byteLength); - writeUint8Array(encoder, uint8Array); -}; - -/** - * Create an DataView of the next `len` bytes. Use it to write data after - * calling this function. - * - * ```js - * // write float32 using DataView - * const dv = writeOnDataView(encoder, 4) - * dv.setFloat32(0, 1.1) - * // read float32 using DataView - * const dv = readFromDataView(encoder, 4) - * dv.getFloat32(0) // => 1.100000023841858 (leaving it to the reader to find out why this is the correct result) - * ``` - * - * @param {Encoder} encoder - * @param {number} len - * @return {DataView} - */ -const writeOnDataView = (encoder, len) => { - verifyLen(encoder, len); - const dview = new DataView(encoder.cbuf.buffer, encoder.cpos, len); - encoder.cpos += len; - return dview -}; - -/** - * @param {Encoder} encoder - * @param {number} num - */ -const writeFloat32 = (encoder, num) => writeOnDataView(encoder, 4).setFloat32(0, num, false); - -/** - * @param {Encoder} encoder - * @param {number} num - */ -const writeFloat64 = (encoder, num) => writeOnDataView(encoder, 8).setFloat64(0, num, false); - -/** - * @param {Encoder} encoder - * @param {bigint} num - */ -const writeBigInt64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigInt64(0, num, false); - -/** - * @param {Encoder} encoder - * @param {bigint} num - */ -const writeBigUint64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigUint64(0, num, false); - -const floatTestBed = new DataView(new ArrayBuffer(4)); -/** - * Check if a number can be encoded as a 32 bit float. - * - * @param {number} num - * @return {boolean} - */ -const isFloat32 = num => { - floatTestBed.setFloat32(0, num); - return floatTestBed.getFloat32(0) === num -}; - -/** - * @typedef {Array} AnyEncodableArray - */ - -/** - * @typedef {undefined|null|number|bigint|boolean|string|{[k:string]:AnyEncodable}|AnyEncodableArray|Uint8Array} AnyEncodable - */ - -/** - * Encode data with efficient binary format. - * - * Differences to JSON: - * • Transforms data to a binary format (not to a string) - * • Encodes undefined, NaN, and ArrayBuffer (these can't be represented in JSON) - * • Numbers are efficiently encoded either as a variable length integer, as a - * 32 bit float, as a 64 bit float, or as a 64 bit bigint. - * - * Encoding table: - * - * | Data Type | Prefix | Encoding Method | Comment | - * | ------------------- | -------- | ------------------ | ------- | - * | undefined | 127 | | Functions, symbol, and everything that cannot be identified is encoded as undefined | - * | null | 126 | | | - * | integer | 125 | writeVarInt | Only encodes 32 bit signed integers | - * | float32 | 124 | writeFloat32 | | - * | float64 | 123 | writeFloat64 | | - * | bigint | 122 | writeBigInt64 | | - * | boolean (false) | 121 | | True and false are different data types so we save the following byte | - * | boolean (true) | 120 | | - 0b01111000 so the last bit determines whether true or false | - * | string | 119 | writeVarString | | - * | object | 118 | custom | Writes {length} then {length} key-value pairs | - * | array | 117 | custom | Writes {length} then {length} json values | - * | Uint8Array | 116 | writeVarUint8Array | We use Uint8Array for any kind of binary data | - * - * Reasons for the decreasing prefix: - * We need the first bit for extendability (later we may want to encode the - * prefix with writeVarUint). The remaining 7 bits are divided as follows: - * [0-30] the beginning of the data range is used for custom purposes - * (defined by the function that uses this library) - * [31-127] the end of the data range is used for data encoding by - * lib0/encoding.js - * - * @param {Encoder} encoder - * @param {AnyEncodable} data - */ -const writeAny = (encoder, data) => { - switch (typeof data) { - case 'string': - // TYPE 119: STRING - write(encoder, 119); - writeVarString(encoder, data); - break - case 'number': - if (number.isInteger(data) && math.abs(data) <= binary.BITS31) { - // TYPE 125: INTEGER - write(encoder, 125); - writeVarInt(encoder, data); - } else if (isFloat32(data)) { - // TYPE 124: FLOAT32 - write(encoder, 124); - writeFloat32(encoder, data); - } else { - // TYPE 123: FLOAT64 - write(encoder, 123); - writeFloat64(encoder, data); - } - break - case 'bigint': - // TYPE 122: BigInt - write(encoder, 122); - writeBigInt64(encoder, data); - break - case 'object': - if (data === null) { - // TYPE 126: null - write(encoder, 126); - } else if (array.isArray(data)) { - // TYPE 117: Array - write(encoder, 117); - writeVarUint(encoder, data.length); - for (let i = 0; i < data.length; i++) { - writeAny(encoder, data[i]); - } - } else if (data instanceof Uint8Array) { - // TYPE 116: ArrayBuffer - write(encoder, 116); - writeVarUint8Array(encoder, data); - } else { - // TYPE 118: Object - write(encoder, 118); - const keys = Object.keys(data); - writeVarUint(encoder, keys.length); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - writeVarString(encoder, key); - writeAny(encoder, data[key]); - } - } - break - case 'boolean': - // TYPE 120/121: boolean (true/false) - write(encoder, data ? 120 : 121); - break - default: - // TYPE 127: undefined - write(encoder, 127); - } -}; - -/** - * Now come a few stateful encoder that have their own classes. - */ - -/** - * Basic Run Length Encoder - a basic compression implementation. - * - * Encodes [1,1,1,7] to [1,3,7,1] (3 times 1, 1 time 7). This encoder might do more harm than good if there are a lot of values that are not repeated. - * - * It was originally used for image compression. Cool .. article http://csbruce.com/cbm/transactor/pdfs/trans_v7_i06.pdf - * - * @note T must not be null! - * - * @template T - */ -class RleEncoder extends Encoder { - /** - * @param {function(Encoder, T):void} writer - */ - constructor (writer) { - super(); - /** - * The writer - */ - this.w = writer; - /** - * Current state - * @type {T|null} - */ - this.s = null; - this.count = 0; - } - - /** - * @param {T} v - */ - write (v) { - if (this.s === v) { - this.count++; - } else { - if (this.count > 0) { - // flush counter, unless this is the first value (count = 0) - writeVarUint(this, this.count - 1); // since count is always > 0, we can decrement by one. non-standard encoding ftw - } - this.count = 1; - // write first value - this.w(this, v); - this.s = v; - } - } -} - -/** - * Basic diff decoder using variable length encoding. - * - * Encodes the values [3, 1100, 1101, 1050, 0] to [3, 1097, 1, -51, -1050] using writeVarInt. - */ -class IntDiffEncoder extends Encoder { - /** - * @param {number} start - */ - constructor (start) { - super(); - /** - * Current state - * @type {number} - */ - this.s = start; - } - - /** - * @param {number} v - */ - write (v) { - writeVarInt(this, v - this.s); - this.s = v; - } -} - -/** - * A combination of IntDiffEncoder and RleEncoder. - * - * Basically first writes the IntDiffEncoder and then counts duplicate diffs using RleEncoding. - * - * Encodes the values [1,1,1,2,3,4,5,6] as [1,1,0,2,1,5] (RLE([1,0,0,1,1,1,1,1]) ⇒ RleIntDiff[1,1,0,2,1,5]) - */ -class RleIntDiffEncoder extends Encoder { - /** - * @param {number} start - */ - constructor (start) { - super(); - /** - * Current state - * @type {number} - */ - this.s = start; - this.count = 0; - } - - /** - * @param {number} v - */ - write (v) { - if (this.s === v && this.count > 0) { - this.count++; - } else { - if (this.count > 0) { - // flush counter, unless this is the first value (count = 0) - writeVarUint(this, this.count - 1); // since count is always > 0, we can decrement by one. non-standard encoding ftw - } - this.count = 1; - // write first value - writeVarInt(this, v - this.s); - this.s = v; - } - } -} - -/** - * @param {UintOptRleEncoder} encoder - */ -const flushUintOptRleEncoder = encoder => { - if (encoder.count > 0) { - // flush counter, unless this is the first value (count = 0) - // case 1: just a single value. set sign to positive - // case 2: write several values. set sign to negative to indicate that there is a length coming - writeVarInt(encoder.encoder, encoder.count === 1 ? encoder.s : -encoder.s); - if (encoder.count > 1) { - writeVarUint(encoder.encoder, encoder.count - 2); // since count is always > 1, we can decrement by one. non-standard encoding ftw - } - } -}; - -/** - * Optimized Rle encoder that does not suffer from the mentioned problem of the basic Rle encoder. - * - * Internally uses VarInt encoder to write unsigned integers. If the input occurs multiple times, we write - * write it as a negative number. The UintOptRleDecoder then understands that it needs to read a count. - * - * Encodes [1,2,3,3,3] as [1,2,-3,3] (once 1, once 2, three times 3) - */ -class UintOptRleEncoder { - constructor () { - this.encoder = new Encoder(); - /** - * @type {number} - */ - this.s = 0; - this.count = 0; - } - - /** - * @param {number} v - */ - write (v) { - if (this.s === v) { - this.count++; - } else { - flushUintOptRleEncoder(this); - this.count = 1; - this.s = v; - } - } - - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array () { - flushUintOptRleEncoder(this); - return toUint8Array(this.encoder) - } -} - -/** - * Increasing Uint Optimized RLE Encoder - * - * The RLE encoder counts the number of same occurences of the same value. - * The IncUintOptRle encoder counts if the value increases. - * I.e. 7, 8, 9, 10 will be encoded as [-7, 4]. 1, 3, 5 will be encoded - * as [1, 3, 5]. - */ -class IncUintOptRleEncoder { - constructor () { - this.encoder = new Encoder(); - /** - * @type {number} - */ - this.s = 0; - this.count = 0; - } - - /** - * @param {number} v - */ - write (v) { - if (this.s + this.count === v) { - this.count++; - } else { - flushUintOptRleEncoder(this); - this.count = 1; - this.s = v; - } - } - - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array () { - flushUintOptRleEncoder(this); - return toUint8Array(this.encoder) - } -} - -/** - * @param {IntDiffOptRleEncoder} encoder - */ -const flushIntDiffOptRleEncoder = encoder => { - if (encoder.count > 0) { - // 31 bit making up the diff | wether to write the counter - // const encodedDiff = encoder.diff << 1 | (encoder.count === 1 ? 0 : 1) - const encodedDiff = encoder.diff * 2 + (encoder.count === 1 ? 0 : 1); - // flush counter, unless this is the first value (count = 0) - // case 1: just a single value. set first bit to positive - // case 2: write several values. set first bit to negative to indicate that there is a length coming - writeVarInt(encoder.encoder, encodedDiff); - if (encoder.count > 1) { - writeVarUint(encoder.encoder, encoder.count - 2); // since count is always > 1, we can decrement by one. non-standard encoding ftw - } - } -}; - -/** - * A combination of the IntDiffEncoder and the UintOptRleEncoder. - * - * The count approach is similar to the UintDiffOptRleEncoder, but instead of using the negative bitflag, it encodes - * in the LSB whether a count is to be read. Therefore this Encoder only supports 31 bit integers! - * - * Encodes [1, 2, 3, 2] as [3, 1, 6, -1] (more specifically [(1 << 1) | 1, (3 << 0) | 0, -1]) - * - * Internally uses variable length encoding. Contrary to normal UintVar encoding, the first byte contains: - * * 1 bit that denotes whether the next value is a count (LSB) - * * 1 bit that denotes whether this value is negative (MSB - 1) - * * 1 bit that denotes whether to continue reading the variable length integer (MSB) - * - * Therefore, only five bits remain to encode diff ranges. - * - * Use this Encoder only when appropriate. In most cases, this is probably a bad idea. - */ -class IntDiffOptRleEncoder { - constructor () { - this.encoder = new Encoder(); - /** - * @type {number} - */ - this.s = 0; - this.count = 0; - this.diff = 0; - } - - /** - * @param {number} v - */ - write (v) { - if (this.diff === v - this.s) { - this.s = v; - this.count++; - } else { - flushIntDiffOptRleEncoder(this); - this.count = 1; - this.diff = v - this.s; - this.s = v; - } - } - - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array () { - flushIntDiffOptRleEncoder(this); - return toUint8Array(this.encoder) - } -} - -/** - * Optimized String Encoder. - * - * Encoding many small strings in a simple Encoder is not very efficient. The function call to decode a string takes some time and creates references that must be eventually deleted. - * In practice, when decoding several million small strings, the GC will kick in more and more often to collect orphaned string objects (or maybe there is another reason?). - * - * This string encoder solves the above problem. All strings are concatenated and written as a single string using a single encoding call. - * - * The lengths are encoded using a UintOptRleEncoder. - */ -class StringEncoder { - constructor () { - /** - * @type {Array} - */ - this.sarr = []; - this.s = ''; - this.lensE = new UintOptRleEncoder(); - } - - /** - * @param {string} string - */ - write (string) { - this.s += string; - if (this.s.length > 19) { - this.sarr.push(this.s); - this.s = ''; - } - this.lensE.write(string.length); - } - - toUint8Array () { - const encoder = new Encoder(); - this.sarr.push(this.s); - this.s = ''; - writeVarString(encoder, this.sarr.join('')); - writeUint8Array(encoder, this.lensE.toUint8Array()); - return toUint8Array(encoder) - } -} - -var encoding = /*#__PURE__*/Object.freeze({ - __proto__: null, - Encoder: Encoder, - createEncoder: createEncoder, - encode: encode, - length: length, - hasContent: hasContent, - toUint8Array: toUint8Array, - verifyLen: verifyLen, - write: write, - set: set, - writeUint8: writeUint8, - setUint8: setUint8, - writeUint16: writeUint16, - setUint16: setUint16, - writeUint32: writeUint32, - writeUint32BigEndian: writeUint32BigEndian, - setUint32: setUint32, - writeVarUint: writeVarUint, - writeVarInt: writeVarInt, - _writeVarStringNative: _writeVarStringNative, - _writeVarStringPolyfill: _writeVarStringPolyfill, - writeVarString: writeVarString, - writeTerminatedString: writeTerminatedString, - writeTerminatedUint8Array: writeTerminatedUint8Array, - writeBinaryEncoder: writeBinaryEncoder, - writeUint8Array: writeUint8Array, - writeVarUint8Array: writeVarUint8Array, - writeOnDataView: writeOnDataView, - writeFloat32: writeFloat32, - writeFloat64: writeFloat64, - writeBigInt64: writeBigInt64, - writeBigUint64: writeBigUint64, - writeAny: writeAny, - RleEncoder: RleEncoder, - IntDiffEncoder: IntDiffEncoder, - RleIntDiffEncoder: RleIntDiffEncoder, - UintOptRleEncoder: UintOptRleEncoder, - IncUintOptRleEncoder: IncUintOptRleEncoder, - IntDiffOptRleEncoder: IntDiffOptRleEncoder, - StringEncoder: StringEncoder -}); - -exports.Encoder = Encoder; -exports.IncUintOptRleEncoder = IncUintOptRleEncoder; -exports.IntDiffEncoder = IntDiffEncoder; -exports.IntDiffOptRleEncoder = IntDiffOptRleEncoder; -exports.RleEncoder = RleEncoder; -exports.RleIntDiffEncoder = RleIntDiffEncoder; -exports.StringEncoder = StringEncoder; -exports.UintOptRleEncoder = UintOptRleEncoder; -exports._writeVarStringNative = _writeVarStringNative; -exports._writeVarStringPolyfill = _writeVarStringPolyfill; -exports.createEncoder = createEncoder; -exports.encode = encode; -exports.encoding = encoding; -exports.hasContent = hasContent; -exports.length = length; -exports.set = set; -exports.setUint16 = setUint16; -exports.setUint32 = setUint32; -exports.setUint8 = setUint8; -exports.toUint8Array = toUint8Array; -exports.verifyLen = verifyLen; -exports.write = write; -exports.writeAny = writeAny; -exports.writeBigInt64 = writeBigInt64; -exports.writeBigUint64 = writeBigUint64; -exports.writeBinaryEncoder = writeBinaryEncoder; -exports.writeFloat32 = writeFloat32; -exports.writeFloat64 = writeFloat64; -exports.writeOnDataView = writeOnDataView; -exports.writeTerminatedString = writeTerminatedString; -exports.writeTerminatedUint8Array = writeTerminatedUint8Array; -exports.writeUint16 = writeUint16; -exports.writeUint32 = writeUint32; -exports.writeUint32BigEndian = writeUint32BigEndian; -exports.writeUint8 = writeUint8; -exports.writeUint8Array = writeUint8Array; -exports.writeVarInt = writeVarInt; -exports.writeVarString = writeVarString; -exports.writeVarUint = writeVarUint; -exports.writeVarUint8Array = writeVarUint8Array; -//# sourceMappingURL=encoding-1a745c43.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding-1a745c43.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding-1a745c43.cjs.map deleted file mode 100644 index d071bbb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding-1a745c43.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encoding-1a745c43.cjs","sources":["../encoding.js"],"sourcesContent":["/**\n * Efficient schema-less binary encoding with support for variable length encoding.\n *\n * Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n *\n * @module encoding\n */\n\nimport * as math from './math.js'\nimport * as number from './number.js'\nimport * as binary from './binary.js'\nimport * as string from './string.js'\nimport * as array from './array.js'\n\n/**\n * A BinaryEncoder handles the encoding to an Uint8Array.\n */\nexport class Encoder {\n constructor () {\n this.cpos = 0\n this.cbuf = new Uint8Array(100)\n /**\n * @type {Array}\n */\n this.bufs = []\n }\n}\n\n/**\n * @function\n * @return {Encoder}\n */\nexport const createEncoder = () => new Encoder()\n\n/**\n * @param {function(Encoder):void} f\n */\nexport const encode = (f) => {\n const encoder = createEncoder()\n f(encoder)\n return toUint8Array(encoder)\n}\n\n/**\n * The current length of the encoded data.\n *\n * @function\n * @param {Encoder} encoder\n * @return {number}\n */\nexport const length = encoder => {\n let len = encoder.cpos\n for (let i = 0; i < encoder.bufs.length; i++) {\n len += encoder.bufs[i].length\n }\n return len\n}\n\n/**\n * Check whether encoder is empty.\n *\n * @function\n * @param {Encoder} encoder\n * @return {boolean}\n */\nexport const hasContent = encoder => encoder.cpos > 0 || encoder.bufs.length > 0\n\n/**\n * Transform to Uint8Array.\n *\n * @function\n * @param {Encoder} encoder\n * @return {Uint8Array} The created ArrayBuffer.\n */\nexport const toUint8Array = encoder => {\n const uint8arr = new Uint8Array(length(encoder))\n let curPos = 0\n for (let i = 0; i < encoder.bufs.length; i++) {\n const d = encoder.bufs[i]\n uint8arr.set(d, curPos)\n curPos += d.length\n }\n uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos)\n return uint8arr\n}\n\n/**\n * Verify that it is possible to write `len` bytes wtihout checking. If\n * necessary, a new Buffer with the required length is attached.\n *\n * @param {Encoder} encoder\n * @param {number} len\n */\nexport const verifyLen = (encoder, len) => {\n const bufferLen = encoder.cbuf.length\n if (bufferLen - encoder.cpos < len) {\n encoder.bufs.push(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos))\n encoder.cbuf = new Uint8Array(math.max(bufferLen, len) * 2)\n encoder.cpos = 0\n }\n}\n\n/**\n * Write one byte to the encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The byte that is to be encoded.\n */\nexport const write = (encoder, num) => {\n const bufferLen = encoder.cbuf.length\n if (encoder.cpos === bufferLen) {\n encoder.bufs.push(encoder.cbuf)\n encoder.cbuf = new Uint8Array(bufferLen * 2)\n encoder.cpos = 0\n }\n encoder.cbuf[encoder.cpos++] = num\n}\n\n/**\n * Write one byte at a specific position.\n * Position must already be written (i.e. encoder.length > pos)\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos Position to which to write data\n * @param {number} num Unsigned 8-bit integer\n */\nexport const set = (encoder, pos, num) => {\n let buffer = null\n // iterate all buffers and adjust position\n for (let i = 0; i < encoder.bufs.length && buffer === null; i++) {\n const b = encoder.bufs[i]\n if (pos < b.length) {\n buffer = b // found buffer\n } else {\n pos -= b.length\n }\n }\n if (buffer === null) {\n // use current buffer\n buffer = encoder.cbuf\n }\n buffer[pos] = num\n}\n\n/**\n * Write one byte as an unsigned integer.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint8 = write\n\n/**\n * Write one byte as an unsigned Integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint8 = set\n\n/**\n * Write two bytes as an unsigned integer.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint16 = (encoder, num) => {\n write(encoder, num & binary.BITS8)\n write(encoder, (num >>> 8) & binary.BITS8)\n}\n/**\n * Write two bytes as an unsigned integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint16 = (encoder, pos, num) => {\n set(encoder, pos, num & binary.BITS8)\n set(encoder, pos + 1, (num >>> 8) & binary.BITS8)\n}\n\n/**\n * Write two bytes as an unsigned integer\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint32 = (encoder, num) => {\n for (let i = 0; i < 4; i++) {\n write(encoder, num & binary.BITS8)\n num >>>= 8\n }\n}\n\n/**\n * Write two bytes as an unsigned integer in big endian order.\n * (most significant byte first)\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeUint32BigEndian = (encoder, num) => {\n for (let i = 3; i >= 0; i--) {\n write(encoder, (num >>> (8 * i)) & binary.BITS8)\n }\n}\n\n/**\n * Write two bytes as an unsigned integer at a specific location.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} pos The location where the data will be written.\n * @param {number} num The number that is to be encoded.\n */\nexport const setUint32 = (encoder, pos, num) => {\n for (let i = 0; i < 4; i++) {\n set(encoder, pos + i, num & binary.BITS8)\n num >>>= 8\n }\n}\n\n/**\n * Write a variable length unsigned integer. Max encodable integer is 2^53.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeVarUint = (encoder, num) => {\n while (num > binary.BITS7) {\n write(encoder, binary.BIT8 | (binary.BITS7 & num))\n num = math.floor(num / 128) // shift >>> 7\n }\n write(encoder, binary.BITS7 & num)\n}\n\n/**\n * Write a variable length integer.\n *\n * We use the 7th bit instead for signaling that this is a negative number.\n *\n * @function\n * @param {Encoder} encoder\n * @param {number} num The number that is to be encoded.\n */\nexport const writeVarInt = (encoder, num) => {\n const isNegative = math.isNegativeZero(num)\n if (isNegative) {\n num = -num\n }\n // |- whether to continue reading |- whether is negative |- number\n write(encoder, (num > binary.BITS6 ? binary.BIT8 : 0) | (isNegative ? binary.BIT7 : 0) | (binary.BITS6 & num))\n num = math.floor(num / 64) // shift >>> 6\n // We don't need to consider the case of num === 0 so we can use a different\n // pattern here than above.\n while (num > 0) {\n write(encoder, (num > binary.BITS7 ? binary.BIT8 : 0) | (binary.BITS7 & num))\n num = math.floor(num / 128) // shift >>> 7\n }\n}\n\n/**\n * A cache to store strings temporarily\n */\nconst _strBuffer = new Uint8Array(30000)\nconst _maxStrBSize = _strBuffer.length / 3\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const _writeVarStringNative = (encoder, str) => {\n if (str.length < _maxStrBSize) {\n // We can encode the string into the existing buffer\n /* c8 ignore next */\n const written = string.utf8TextEncoder.encodeInto(str, _strBuffer).written || 0\n writeVarUint(encoder, written)\n for (let i = 0; i < written; i++) {\n write(encoder, _strBuffer[i])\n }\n } else {\n writeVarUint8Array(encoder, string.encodeUtf8(str))\n }\n}\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const _writeVarStringPolyfill = (encoder, str) => {\n const encodedString = unescape(encodeURIComponent(str))\n const len = encodedString.length\n writeVarUint(encoder, len)\n for (let i = 0; i < len; i++) {\n write(encoder, /** @type {number} */ (encodedString.codePointAt(i)))\n }\n}\n\n/**\n * Write a variable length string.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\n/* c8 ignore next */\nexport const writeVarString = (string.utf8TextEncoder && /** @type {any} */ (string.utf8TextEncoder).encodeInto) ? _writeVarStringNative : _writeVarStringPolyfill\n\n/**\n * Write a string terminated by a special byte sequence. This is not very performant and is\n * generally discouraged. However, the resulting byte arrays are lexiographically ordered which\n * makes this a nice feature for databases.\n *\n * The string will be encoded using utf8 and then terminated and escaped using writeTerminatingUint8Array.\n *\n * @function\n * @param {Encoder} encoder\n * @param {String} str The string that is to be encoded.\n */\nexport const writeTerminatedString = (encoder, str) =>\n writeTerminatedUint8Array(encoder, string.encodeUtf8(str))\n\n/**\n * Write a terminating Uint8Array. Note that this is not performant and is generally\n * discouraged. There are few situations when this is needed.\n *\n * We use 0x0 as a terminating character. 0x1 serves as an escape character for 0x0 and 0x1.\n *\n * Example: [0,1,2] is encoded to [1,0,1,1,2,0]. 0x0, and 0x1 needed to be escaped using 0x1. Then\n * the result is terminated using the 0x0 character.\n *\n * This is basically how many systems implement null terminated strings. However, we use an escape\n * character 0x1 to avoid issues and potenial attacks on our database (if this is used as a key\n * encoder for NoSql databases).\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} buf The string that is to be encoded.\n */\nexport const writeTerminatedUint8Array = (encoder, buf) => {\n for (let i = 0; i < buf.length; i++) {\n const b = buf[i]\n if (b === 0 || b === 1) {\n write(encoder, 1)\n }\n write(encoder, buf[i])\n }\n write(encoder, 0)\n}\n\n/**\n * Write the content of another Encoder.\n *\n * @TODO: can be improved!\n * - Note: Should consider that when appending a lot of small Encoders, we should rather clone than referencing the old structure.\n * Encoders start with a rather big initial buffer.\n *\n * @function\n * @param {Encoder} encoder The enUint8Arr\n * @param {Encoder} append The BinaryEncoder to be written.\n */\nexport const writeBinaryEncoder = (encoder, append) => writeUint8Array(encoder, toUint8Array(append))\n\n/**\n * Append fixed-length Uint8Array to the encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} uint8Array\n */\nexport const writeUint8Array = (encoder, uint8Array) => {\n const bufferLen = encoder.cbuf.length\n const cpos = encoder.cpos\n const leftCopyLen = math.min(bufferLen - cpos, uint8Array.length)\n const rightCopyLen = uint8Array.length - leftCopyLen\n encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos)\n encoder.cpos += leftCopyLen\n if (rightCopyLen > 0) {\n // Still something to write, write right half..\n // Append new buffer\n encoder.bufs.push(encoder.cbuf)\n // must have at least size of remaining buffer\n encoder.cbuf = new Uint8Array(math.max(bufferLen * 2, rightCopyLen))\n // copy array\n encoder.cbuf.set(uint8Array.subarray(leftCopyLen))\n encoder.cpos = rightCopyLen\n }\n}\n\n/**\n * Append an Uint8Array to Encoder.\n *\n * @function\n * @param {Encoder} encoder\n * @param {Uint8Array} uint8Array\n */\nexport const writeVarUint8Array = (encoder, uint8Array) => {\n writeVarUint(encoder, uint8Array.byteLength)\n writeUint8Array(encoder, uint8Array)\n}\n\n/**\n * Create an DataView of the next `len` bytes. Use it to write data after\n * calling this function.\n *\n * ```js\n * // write float32 using DataView\n * const dv = writeOnDataView(encoder, 4)\n * dv.setFloat32(0, 1.1)\n * // read float32 using DataView\n * const dv = readFromDataView(encoder, 4)\n * dv.getFloat32(0) // => 1.100000023841858 (leaving it to the reader to find out why this is the correct result)\n * ```\n *\n * @param {Encoder} encoder\n * @param {number} len\n * @return {DataView}\n */\nexport const writeOnDataView = (encoder, len) => {\n verifyLen(encoder, len)\n const dview = new DataView(encoder.cbuf.buffer, encoder.cpos, len)\n encoder.cpos += len\n return dview\n}\n\n/**\n * @param {Encoder} encoder\n * @param {number} num\n */\nexport const writeFloat32 = (encoder, num) => writeOnDataView(encoder, 4).setFloat32(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {number} num\n */\nexport const writeFloat64 = (encoder, num) => writeOnDataView(encoder, 8).setFloat64(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {bigint} num\n */\nexport const writeBigInt64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigInt64(0, num, false)\n\n/**\n * @param {Encoder} encoder\n * @param {bigint} num\n */\nexport const writeBigUint64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigUint64(0, num, false)\n\nconst floatTestBed = new DataView(new ArrayBuffer(4))\n/**\n * Check if a number can be encoded as a 32 bit float.\n *\n * @param {number} num\n * @return {boolean}\n */\nconst isFloat32 = num => {\n floatTestBed.setFloat32(0, num)\n return floatTestBed.getFloat32(0) === num\n}\n\n/**\n * @typedef {Array} AnyEncodableArray\n */\n\n/**\n * @typedef {undefined|null|number|bigint|boolean|string|{[k:string]:AnyEncodable}|AnyEncodableArray|Uint8Array} AnyEncodable\n */\n\n/**\n * Encode data with efficient binary format.\n *\n * Differences to JSON:\n * • Transforms data to a binary format (not to a string)\n * • Encodes undefined, NaN, and ArrayBuffer (these can't be represented in JSON)\n * • Numbers are efficiently encoded either as a variable length integer, as a\n * 32 bit float, as a 64 bit float, or as a 64 bit bigint.\n *\n * Encoding table:\n *\n * | Data Type | Prefix | Encoding Method | Comment |\n * | ------------------- | -------- | ------------------ | ------- |\n * | undefined | 127 | | Functions, symbol, and everything that cannot be identified is encoded as undefined |\n * | null | 126 | | |\n * | integer | 125 | writeVarInt | Only encodes 32 bit signed integers |\n * | float32 | 124 | writeFloat32 | |\n * | float64 | 123 | writeFloat64 | |\n * | bigint | 122 | writeBigInt64 | |\n * | boolean (false) | 121 | | True and false are different data types so we save the following byte |\n * | boolean (true) | 120 | | - 0b01111000 so the last bit determines whether true or false |\n * | string | 119 | writeVarString | |\n * | object | 118 | custom | Writes {length} then {length} key-value pairs |\n * | array | 117 | custom | Writes {length} then {length} json values |\n * | Uint8Array | 116 | writeVarUint8Array | We use Uint8Array for any kind of binary data |\n *\n * Reasons for the decreasing prefix:\n * We need the first bit for extendability (later we may want to encode the\n * prefix with writeVarUint). The remaining 7 bits are divided as follows:\n * [0-30] the beginning of the data range is used for custom purposes\n * (defined by the function that uses this library)\n * [31-127] the end of the data range is used for data encoding by\n * lib0/encoding.js\n *\n * @param {Encoder} encoder\n * @param {AnyEncodable} data\n */\nexport const writeAny = (encoder, data) => {\n switch (typeof data) {\n case 'string':\n // TYPE 119: STRING\n write(encoder, 119)\n writeVarString(encoder, data)\n break\n case 'number':\n if (number.isInteger(data) && math.abs(data) <= binary.BITS31) {\n // TYPE 125: INTEGER\n write(encoder, 125)\n writeVarInt(encoder, data)\n } else if (isFloat32(data)) {\n // TYPE 124: FLOAT32\n write(encoder, 124)\n writeFloat32(encoder, data)\n } else {\n // TYPE 123: FLOAT64\n write(encoder, 123)\n writeFloat64(encoder, data)\n }\n break\n case 'bigint':\n // TYPE 122: BigInt\n write(encoder, 122)\n writeBigInt64(encoder, data)\n break\n case 'object':\n if (data === null) {\n // TYPE 126: null\n write(encoder, 126)\n } else if (array.isArray(data)) {\n // TYPE 117: Array\n write(encoder, 117)\n writeVarUint(encoder, data.length)\n for (let i = 0; i < data.length; i++) {\n writeAny(encoder, data[i])\n }\n } else if (data instanceof Uint8Array) {\n // TYPE 116: ArrayBuffer\n write(encoder, 116)\n writeVarUint8Array(encoder, data)\n } else {\n // TYPE 118: Object\n write(encoder, 118)\n const keys = Object.keys(data)\n writeVarUint(encoder, keys.length)\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n writeVarString(encoder, key)\n writeAny(encoder, data[key])\n }\n }\n break\n case 'boolean':\n // TYPE 120/121: boolean (true/false)\n write(encoder, data ? 120 : 121)\n break\n default:\n // TYPE 127: undefined\n write(encoder, 127)\n }\n}\n\n/**\n * Now come a few stateful encoder that have their own classes.\n */\n\n/**\n * Basic Run Length Encoder - a basic compression implementation.\n *\n * Encodes [1,1,1,7] to [1,3,7,1] (3 times 1, 1 time 7). This encoder might do more harm than good if there are a lot of values that are not repeated.\n *\n * It was originally used for image compression. Cool .. article http://csbruce.com/cbm/transactor/pdfs/trans_v7_i06.pdf\n *\n * @note T must not be null!\n *\n * @template T\n */\nexport class RleEncoder extends Encoder {\n /**\n * @param {function(Encoder, T):void} writer\n */\n constructor (writer) {\n super()\n /**\n * The writer\n */\n this.w = writer\n /**\n * Current state\n * @type {T|null}\n */\n this.s = null\n this.count = 0\n }\n\n /**\n * @param {T} v\n */\n write (v) {\n if (this.s === v) {\n this.count++\n } else {\n if (this.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw\n }\n this.count = 1\n // write first value\n this.w(this, v)\n this.s = v\n }\n }\n}\n\n/**\n * Basic diff decoder using variable length encoding.\n *\n * Encodes the values [3, 1100, 1101, 1050, 0] to [3, 1097, 1, -51, -1050] using writeVarInt.\n */\nexport class IntDiffEncoder extends Encoder {\n /**\n * @param {number} start\n */\n constructor (start) {\n super()\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n writeVarInt(this, v - this.s)\n this.s = v\n }\n}\n\n/**\n * A combination of IntDiffEncoder and RleEncoder.\n *\n * Basically first writes the IntDiffEncoder and then counts duplicate diffs using RleEncoding.\n *\n * Encodes the values [1,1,1,2,3,4,5,6] as [1,1,0,2,1,5] (RLE([1,0,0,1,1,1,1,1]) ⇒ RleIntDiff[1,1,0,2,1,5])\n */\nexport class RleIntDiffEncoder extends Encoder {\n /**\n * @param {number} start\n */\n constructor (start) {\n super()\n /**\n * Current state\n * @type {number}\n */\n this.s = start\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s === v && this.count > 0) {\n this.count++\n } else {\n if (this.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw\n }\n this.count = 1\n // write first value\n writeVarInt(this, v - this.s)\n this.s = v\n }\n }\n}\n\n/**\n * @param {UintOptRleEncoder} encoder\n */\nconst flushUintOptRleEncoder = encoder => {\n if (encoder.count > 0) {\n // flush counter, unless this is the first value (count = 0)\n // case 1: just a single value. set sign to positive\n // case 2: write several values. set sign to negative to indicate that there is a length coming\n writeVarInt(encoder.encoder, encoder.count === 1 ? encoder.s : -encoder.s)\n if (encoder.count > 1) {\n writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw\n }\n }\n}\n\n/**\n * Optimized Rle encoder that does not suffer from the mentioned problem of the basic Rle encoder.\n *\n * Internally uses VarInt encoder to write unsigned integers. If the input occurs multiple times, we write\n * write it as a negative number. The UintOptRleDecoder then understands that it needs to read a count.\n *\n * Encodes [1,2,3,3,3] as [1,2,-3,3] (once 1, once 2, three times 3)\n */\nexport class UintOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s === v) {\n this.count++\n } else {\n flushUintOptRleEncoder(this)\n this.count = 1\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushUintOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * Increasing Uint Optimized RLE Encoder\n *\n * The RLE encoder counts the number of same occurences of the same value.\n * The IncUintOptRle encoder counts if the value increases.\n * I.e. 7, 8, 9, 10 will be encoded as [-7, 4]. 1, 3, 5 will be encoded\n * as [1, 3, 5].\n */\nexport class IncUintOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.s + this.count === v) {\n this.count++\n } else {\n flushUintOptRleEncoder(this)\n this.count = 1\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushUintOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * @param {IntDiffOptRleEncoder} encoder\n */\nconst flushIntDiffOptRleEncoder = encoder => {\n if (encoder.count > 0) {\n // 31 bit making up the diff | wether to write the counter\n // const encodedDiff = encoder.diff << 1 | (encoder.count === 1 ? 0 : 1)\n const encodedDiff = encoder.diff * 2 + (encoder.count === 1 ? 0 : 1)\n // flush counter, unless this is the first value (count = 0)\n // case 1: just a single value. set first bit to positive\n // case 2: write several values. set first bit to negative to indicate that there is a length coming\n writeVarInt(encoder.encoder, encodedDiff)\n if (encoder.count > 1) {\n writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw\n }\n }\n}\n\n/**\n * A combination of the IntDiffEncoder and the UintOptRleEncoder.\n *\n * The count approach is similar to the UintDiffOptRleEncoder, but instead of using the negative bitflag, it encodes\n * in the LSB whether a count is to be read. Therefore this Encoder only supports 31 bit integers!\n *\n * Encodes [1, 2, 3, 2] as [3, 1, 6, -1] (more specifically [(1 << 1) | 1, (3 << 0) | 0, -1])\n *\n * Internally uses variable length encoding. Contrary to normal UintVar encoding, the first byte contains:\n * * 1 bit that denotes whether the next value is a count (LSB)\n * * 1 bit that denotes whether this value is negative (MSB - 1)\n * * 1 bit that denotes whether to continue reading the variable length integer (MSB)\n *\n * Therefore, only five bits remain to encode diff ranges.\n *\n * Use this Encoder only when appropriate. In most cases, this is probably a bad idea.\n */\nexport class IntDiffOptRleEncoder {\n constructor () {\n this.encoder = new Encoder()\n /**\n * @type {number}\n */\n this.s = 0\n this.count = 0\n this.diff = 0\n }\n\n /**\n * @param {number} v\n */\n write (v) {\n if (this.diff === v - this.s) {\n this.s = v\n this.count++\n } else {\n flushIntDiffOptRleEncoder(this)\n this.count = 1\n this.diff = v - this.s\n this.s = v\n }\n }\n\n /**\n * Flush the encoded state and transform this to a Uint8Array.\n *\n * Note that this should only be called once.\n */\n toUint8Array () {\n flushIntDiffOptRleEncoder(this)\n return toUint8Array(this.encoder)\n }\n}\n\n/**\n * Optimized String Encoder.\n *\n * Encoding many small strings in a simple Encoder is not very efficient. The function call to decode a string takes some time and creates references that must be eventually deleted.\n * In practice, when decoding several million small strings, the GC will kick in more and more often to collect orphaned string objects (or maybe there is another reason?).\n *\n * This string encoder solves the above problem. All strings are concatenated and written as a single string using a single encoding call.\n *\n * The lengths are encoded using a UintOptRleEncoder.\n */\nexport class StringEncoder {\n constructor () {\n /**\n * @type {Array}\n */\n this.sarr = []\n this.s = ''\n this.lensE = new UintOptRleEncoder()\n }\n\n /**\n * @param {string} string\n */\n write (string) {\n this.s += string\n if (this.s.length > 19) {\n this.sarr.push(this.s)\n this.s = ''\n }\n this.lensE.write(string.length)\n }\n\n toUint8Array () {\n const encoder = new Encoder()\n this.sarr.push(this.s)\n this.s = ''\n writeVarString(encoder, this.sarr.join(''))\n writeUint8Array(encoder, this.lensE.toUint8Array())\n return toUint8Array(encoder)\n }\n}\n"],"names":["math.max","binary.BITS8","binary.BITS7","binary.BIT8","math.floor","math.isNegativeZero","binary.BITS6","binary.BIT7","string.utf8TextEncoder","string.encodeUtf8","math.min","number.isInteger","math.abs","binary.BITS31","array.isArray"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACO,MAAM,OAAO,CAAC;AACrB,EAAE,WAAW,CAAC,GAAG;AACjB,IAAI,IAAI,CAAC,IAAI,GAAG,EAAC;AACjB,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,GAAG,EAAC;AACnC;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,GAAG,GAAE;AAClB,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,MAAM,IAAI,OAAO,GAAE;AAChD;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,CAAC,KAAK;AAC7B,EAAE,MAAM,OAAO,GAAG,aAAa,GAAE;AACjC,EAAE,CAAC,CAAC,OAAO,EAAC;AACZ,EAAE,OAAO,YAAY,CAAC,OAAO,CAAC;AAC9B,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,OAAO,IAAI;AACjC,EAAE,IAAI,GAAG,GAAG,OAAO,CAAC,KAA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K,GAAG,IAAI,iBAAiB,GAAE;AACxC,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE;AACjB,IAAI,IAAI,CAAC,CAAC,IAAI,OAAM;AACpB,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,EAAE,EAAE;AAC5B,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAC;AAC5B,MAAM,IAAI,CAAC,CAAC,GAAG,GAAE;AACjB,KAAK;AACL,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAC;AACnC,GAAG;AACH;AACA,EAAE,YAAY,CAAC,GAAG;AAClB,IAAI,MAAM,OAAO,GAAG,IAAI,OAAO,GAAE;AACjC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAC;AAC1B,IAAI,IAAI,CAAC,CAAC,GAAG,GAAE;AACf,IAAI,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAC;AAC/C,IAAI,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,EAAC;AACvD,IAAI,OAAO,YAAY,CAAC,OAAO,CAAC;AAChC,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.cjs deleted file mode 100644 index d3aec26..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.cjs +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./math-96d5e8c4.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./string-fddc5f8b.cjs'); -require('./array-78849c95.cjs'); -var encoding = require('./encoding-1a745c43.cjs'); -require('./set-5b47859e.cjs'); - - - -exports.Encoder = encoding.Encoder; -exports.IncUintOptRleEncoder = encoding.IncUintOptRleEncoder; -exports.IntDiffEncoder = encoding.IntDiffEncoder; -exports.IntDiffOptRleEncoder = encoding.IntDiffOptRleEncoder; -exports.RleEncoder = encoding.RleEncoder; -exports.RleIntDiffEncoder = encoding.RleIntDiffEncoder; -exports.StringEncoder = encoding.StringEncoder; -exports.UintOptRleEncoder = encoding.UintOptRleEncoder; -exports._writeVarStringNative = encoding._writeVarStringNative; -exports._writeVarStringPolyfill = encoding._writeVarStringPolyfill; -exports.createEncoder = encoding.createEncoder; -exports.encode = encoding.encode; -exports.hasContent = encoding.hasContent; -exports.length = encoding.length; -exports.set = encoding.set; -exports.setUint16 = encoding.setUint16; -exports.setUint32 = encoding.setUint32; -exports.setUint8 = encoding.setUint8; -exports.toUint8Array = encoding.toUint8Array; -exports.verifyLen = encoding.verifyLen; -exports.write = encoding.write; -exports.writeAny = encoding.writeAny; -exports.writeBigInt64 = encoding.writeBigInt64; -exports.writeBigUint64 = encoding.writeBigUint64; -exports.writeBinaryEncoder = encoding.writeBinaryEncoder; -exports.writeFloat32 = encoding.writeFloat32; -exports.writeFloat64 = encoding.writeFloat64; -exports.writeOnDataView = encoding.writeOnDataView; -exports.writeTerminatedString = encoding.writeTerminatedString; -exports.writeTerminatedUint8Array = encoding.writeTerminatedUint8Array; -exports.writeUint16 = encoding.writeUint16; -exports.writeUint32 = encoding.writeUint32; -exports.writeUint32BigEndian = encoding.writeUint32BigEndian; -exports.writeUint8 = encoding.writeUint8; -exports.writeUint8Array = encoding.writeUint8Array; -exports.writeVarInt = encoding.writeVarInt; -exports.writeVarString = encoding.writeVarString; -exports.writeVarUint = encoding.writeVarUint; -exports.writeVarUint8Array = encoding.writeVarUint8Array; -//# sourceMappingURL=encoding.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.cjs.map deleted file mode 100644 index 4f4b002..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encoding.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.d.ts deleted file mode 100644 index 574ca97..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.d.ts +++ /dev/null @@ -1,235 +0,0 @@ -/** - * A BinaryEncoder handles the encoding to an Uint8Array. - */ -export class Encoder { - cpos: number; - cbuf: Uint8Array; - /** - * @type {Array} - */ - bufs: Array; -} -export function createEncoder(): Encoder; -export function encode(f: (arg0: Encoder) => void): Uint8Array; -export function length(encoder: Encoder): number; -export function hasContent(encoder: Encoder): boolean; -export function toUint8Array(encoder: Encoder): Uint8Array; -export function verifyLen(encoder: Encoder, len: number): void; -export function write(encoder: Encoder, num: number): void; -export function set(encoder: Encoder, pos: number, num: number): void; -export function writeUint8(encoder: Encoder, num: number): void; -export function setUint8(encoder: Encoder, pos: number, num: number): void; -export function writeUint16(encoder: Encoder, num: number): void; -export function setUint16(encoder: Encoder, pos: number, num: number): void; -export function writeUint32(encoder: Encoder, num: number): void; -export function writeUint32BigEndian(encoder: Encoder, num: number): void; -export function setUint32(encoder: Encoder, pos: number, num: number): void; -export function writeVarUint(encoder: Encoder, num: number): void; -export function writeVarInt(encoder: Encoder, num: number): void; -export function _writeVarStringNative(encoder: Encoder, str: string): void; -export function _writeVarStringPolyfill(encoder: Encoder, str: string): void; -export function writeVarString(encoder: Encoder, str: string): void; -export function writeTerminatedString(encoder: Encoder, str: string): void; -export function writeTerminatedUint8Array(encoder: Encoder, buf: Uint8Array): void; -export function writeBinaryEncoder(encoder: Encoder, append: Encoder): void; -export function writeUint8Array(encoder: Encoder, uint8Array: Uint8Array): void; -export function writeVarUint8Array(encoder: Encoder, uint8Array: Uint8Array): void; -export function writeOnDataView(encoder: Encoder, len: number): DataView; -export function writeFloat32(encoder: Encoder, num: number): void; -export function writeFloat64(encoder: Encoder, num: number): void; -export function writeBigInt64(encoder: Encoder, num: bigint): any; -export function writeBigUint64(encoder: Encoder, num: bigint): any; -export function writeAny(encoder: Encoder, data: AnyEncodable): void; -/** - * Now come a few stateful encoder that have their own classes. - */ -/** - * Basic Run Length Encoder - a basic compression implementation. - * - * Encodes [1,1,1,7] to [1,3,7,1] (3 times 1, 1 time 7). This encoder might do more harm than good if there are a lot of values that are not repeated. - * - * It was originally used for image compression. Cool .. article http://csbruce.com/cbm/transactor/pdfs/trans_v7_i06.pdf - * - * @note T must not be null! - * - * @template T - */ -export class RleEncoder extends Encoder { - /** - * @param {function(Encoder, T):void} writer - */ - constructor(writer: (arg0: Encoder, arg1: T) => void); - /** - * The writer - */ - w: (arg0: Encoder, arg1: T) => void; - /** - * Current state - * @type {T|null} - */ - s: T | null; - count: number; - /** - * @param {T} v - */ - write(v: T): void; -} -/** - * Basic diff decoder using variable length encoding. - * - * Encodes the values [3, 1100, 1101, 1050, 0] to [3, 1097, 1, -51, -1050] using writeVarInt. - */ -export class IntDiffEncoder extends Encoder { - /** - * @param {number} start - */ - constructor(start: number); - /** - * Current state - * @type {number} - */ - s: number; - /** - * @param {number} v - */ - write(v: number): void; -} -/** - * A combination of IntDiffEncoder and RleEncoder. - * - * Basically first writes the IntDiffEncoder and then counts duplicate diffs using RleEncoding. - * - * Encodes the values [1,1,1,2,3,4,5,6] as [1,1,0,2,1,5] (RLE([1,0,0,1,1,1,1,1]) ⇒ RleIntDiff[1,1,0,2,1,5]) - */ -export class RleIntDiffEncoder extends Encoder { - /** - * @param {number} start - */ - constructor(start: number); - /** - * Current state - * @type {number} - */ - s: number; - count: number; - /** - * @param {number} v - */ - write(v: number): void; -} -/** - * Optimized Rle encoder that does not suffer from the mentioned problem of the basic Rle encoder. - * - * Internally uses VarInt encoder to write unsigned integers. If the input occurs multiple times, we write - * write it as a negative number. The UintOptRleDecoder then understands that it needs to read a count. - * - * Encodes [1,2,3,3,3] as [1,2,-3,3] (once 1, once 2, three times 3) - */ -export class UintOptRleEncoder { - encoder: Encoder; - /** - * @type {number} - */ - s: number; - count: number; - /** - * @param {number} v - */ - write(v: number): void; - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array(): Uint8Array; -} -/** - * Increasing Uint Optimized RLE Encoder - * - * The RLE encoder counts the number of same occurences of the same value. - * The IncUintOptRle encoder counts if the value increases. - * I.e. 7, 8, 9, 10 will be encoded as [-7, 4]. 1, 3, 5 will be encoded - * as [1, 3, 5]. - */ -export class IncUintOptRleEncoder { - encoder: Encoder; - /** - * @type {number} - */ - s: number; - count: number; - /** - * @param {number} v - */ - write(v: number): void; - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array(): Uint8Array; -} -/** - * A combination of the IntDiffEncoder and the UintOptRleEncoder. - * - * The count approach is similar to the UintDiffOptRleEncoder, but instead of using the negative bitflag, it encodes - * in the LSB whether a count is to be read. Therefore this Encoder only supports 31 bit integers! - * - * Encodes [1, 2, 3, 2] as [3, 1, 6, -1] (more specifically [(1 << 1) | 1, (3 << 0) | 0, -1]) - * - * Internally uses variable length encoding. Contrary to normal UintVar encoding, the first byte contains: - * * 1 bit that denotes whether the next value is a count (LSB) - * * 1 bit that denotes whether this value is negative (MSB - 1) - * * 1 bit that denotes whether to continue reading the variable length integer (MSB) - * - * Therefore, only five bits remain to encode diff ranges. - * - * Use this Encoder only when appropriate. In most cases, this is probably a bad idea. - */ -export class IntDiffOptRleEncoder { - encoder: Encoder; - /** - * @type {number} - */ - s: number; - count: number; - diff: number; - /** - * @param {number} v - */ - write(v: number): void; - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array(): Uint8Array; -} -/** - * Optimized String Encoder. - * - * Encoding many small strings in a simple Encoder is not very efficient. The function call to decode a string takes some time and creates references that must be eventually deleted. - * In practice, when decoding several million small strings, the GC will kick in more and more often to collect orphaned string objects (or maybe there is another reason?). - * - * This string encoder solves the above problem. All strings are concatenated and written as a single string using a single encoding call. - * - * The lengths are encoded using a UintOptRleEncoder. - */ -export class StringEncoder { - /** - * @type {Array} - */ - sarr: Array; - s: string; - lensE: UintOptRleEncoder; - /** - * @param {string} string - */ - write(string: string): void; - toUint8Array(): Uint8Array; -} -export type AnyEncodableArray = Array; -export type AnyEncodable = undefined | null | number | bigint | boolean | string | { - [k: string]: AnyEncodable; -} | AnyEncodableArray | Uint8Array; -//# sourceMappingURL=encoding.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.d.ts.map deleted file mode 100644 index 44bfcf6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../encoding.js"],"names":[],"mappings":"AAkCA;;GAEG;AACH;IAEI,aAAa;IACb,8BAA+B;IAC/B;;OAEG;IACH,MAFU,KAAK,CAAC,UAAU,CAAC,CAEb;CAEjB;AAMM,iCAFK,OAAO,CAE6B;AAKzC,0BAFI,CAAS,IAAO,EAA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AAC,MAAM,GAAC,OAAO,GAAC,MAAM,GAAC;IAAC,CAAC,CAAC,EAAC,MAAM,GAAE,YAAY,CAAA;CAAC,GAAC,iBAAiB,GAAC,UAAU"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.test.d.ts deleted file mode 100644 index 83f548f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.test.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -export function testGolangBinaryEncodingCompatibility(): void; -export function testVerifyLen(): void; -export function testStringEncodingPerformanceNativeVsPolyfill(): void; -export function testDecodingPerformanceNativeVsPolyfill(): void; -export function testStringDecodingPerformance(): void; -export function testAnyEncodeUnknowns(_tc: t.TestCase): void; -export function testAnyEncodeDate(_tc: t.TestCase): void; -export function testEncodeMax32bitUint(_tc: t.TestCase): void; -export function testVarUintEncoding(_tc: t.TestCase): void; -export function testVarIntEncoding(_tc: t.TestCase): void; -export function testRepeatVarUintEncoding(tc: t.TestCase): void; -export function testRepeatVarUintEncoding53bit(tc: t.TestCase): void; -export function testRepeatVarIntEncoding(tc: t.TestCase): void; -export function testRepeatVarIntEncoding53bit(tc: t.TestCase): void; -export function testRepeanntAnyEncoding(tc: t.TestCase): void; -export function testRepeatPeekVarUintEncoding(tc: t.TestCase): void; -export function testRepeatPeekVarIntEncoding(tc: t.TestCase): void; -export function testAnyVsJsonEncoding(tc: t.TestCase): void; -export function testStringEncoding(_tc: t.TestCase): void; -export function testRepeatStringEncoding(tc: t.TestCase): void; -export function testSetMethods(_tc: t.TestCase): void; -export function testRepeatRandomWrites(tc: t.TestCase): void; -export function testWriteUint8ArrayOverflow(_tc: t.TestCase): void; -export function testSetOnOverflow(_tc: t.TestCase): void; -export function testCloneDecoder(_tc: t.TestCase): void; -export function testWriteBinaryEncoder(_tc: t.TestCase): void; -export function testOverflowStringDecoding(tc: t.TestCase): void; -export function testRleEncoder(_tc: t.TestCase): void; -export function testRleIntDiffEncoder(_tc: t.TestCase): void; -export function testUintOptRleEncoder(_tc: t.TestCase): void; -export function testIncUintOptRleEncoder(_tc: t.TestCase): void; -export function testIntDiffRleEncoder(_tc: t.TestCase): void; -export function testIntEncoders(tc: t.TestCase): void; -export function testIntDiffEncoder(_tc: t.TestCase): void; -export function testStringDecoder(tc: t.TestCase): void; -export function testLargeNumberEncoding(tc: t.TestCase): void; -export function testInvalidVarIntEncoding(_tc: t.TestCase): void; -export function testTerminatedEncodering(_tc: t.TestCase): void; -export type EncodingPair = { - read: (arg0: decoding.Decoder) => any; - write: (arg0: encoding.Encoder, arg1: any) => void; - gen: (arg0: prng.PRNG) => any; - compare: (arg0: any, arg1: any) => boolean; - name: string; -}; -import * as t from './testing.js'; -import * as decoding from './decoding.js'; -import * as encoding from './encoding.js'; -import * as prng from './prng.js'; -//# sourceMappingURL=encoding.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.test.d.ts.map deleted file mode 100644 index 887f658..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/encoding.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encoding.test.d.ts","sourceRoot":"","sources":["../encoding.test.js"],"names":[],"mappings":"AA6CO,8DAkCN;AAwCM,sCAQN;AAEM,sEA2CN;AAEM,gEAoDN;AAEM,sDAiDN;AAKM,2CAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,uCAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,4CAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,QASpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QAUp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OAAO,EAAC,IAAG,EAAH,GAAG,KAAE,IAAI;SACnC,CAAS,IAAS,EAAT,IAAI,CAAC,IAAI,KAAE,GAAG;aACvB,CAAS,IAAG,EAAH,GAAG,EAAC,IAAG,EAAH,GAAG,KAAE,OAAO;UACzB,MAAM;;mBAhdD,cAAc;0BAFP,eAAe;0BADf,eAAe;sBAEnB,WAAW"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment-1c97264d.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment-1c97264d.cjs deleted file mode 100644 index 6e456f4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment-1c97264d.cjs +++ /dev/null @@ -1,180 +0,0 @@ -'use strict'; - -var map = require('./map-24d263c0.cjs'); -var string = require('./string-fddc5f8b.cjs'); -var conditions = require('./conditions-f5c0c102.cjs'); -var storage = require('./storage.cjs'); -var _function = require('./function-314580f7.cjs'); - -/** - * Isomorphic module to work access the environment (query params, env variables). - * - * @module environment - */ - -/* c8 ignore next 2 */ -// @ts-ignore -const isNode = typeof process !== 'undefined' && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'; - -/* c8 ignore next */ -const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && !isNode; -/* c8 ignore next 3 */ -const isMac = typeof navigator !== 'undefined' - ? /Mac/.test(navigator.platform) - : false; - -/** - * @type {Map} - */ -let params; - -/* c8 ignore start */ -const computeParams = () => { - if (params === undefined) { - if (isNode) { - params = map.create(); - const pargs = process.argv; - let currParamName = null; - for (let i = 0; i < pargs.length; i++) { - const parg = pargs[i]; - if (parg[0] === '-') { - if (currParamName !== null) { - params.set(currParamName, ''); - } - currParamName = parg; - } else { - if (currParamName !== null) { - params.set(currParamName, parg); - currParamName = null; - } - } - } - if (currParamName !== null) { - params.set(currParamName, ''); - } - // in ReactNative for example this would not be true (unless connected to the Remote Debugger) - } else if (typeof location === 'object') { - params = map.create(); // eslint-disable-next-line no-undef - (location.search || '?').slice(1).split('&').forEach((kv) => { - if (kv.length !== 0) { - const [key, value] = kv.split('='); - params.set(`--${string.fromCamelCase(key, '-')}`, value); - params.set(`-${string.fromCamelCase(key, '-')}`, value); - } - }); - } else { - params = map.create(); - } - } - return params -}; -/* c8 ignore stop */ - -/** - * @param {string} name - * @return {boolean} - */ -/* c8 ignore next */ -const hasParam = (name) => computeParams().has(name); - -/** - * @param {string} name - * @param {string} defaultVal - * @return {string} - */ -/* c8 ignore next 2 */ -const getParam = (name, defaultVal) => - computeParams().get(name) || defaultVal; - -/** - * @param {string} name - * @return {string|null} - */ -/* c8 ignore next 4 */ -const getVariable = (name) => - isNode - ? conditions.undefinedToNull(process.env[name.toUpperCase().replaceAll('-', '_')]) - : conditions.undefinedToNull(storage.varStorage.getItem(name)); - -/** - * @param {string} name - * @return {string|null} - */ -/* c8 ignore next 2 */ -const getConf = (name) => - computeParams().get('--' + name) || getVariable(name); - -/** - * @param {string} name - * @return {string} - */ -/* c8 ignore next 5 */ -const ensureConf = (name) => { - const c = getConf(name); - if (c == null) throw new Error(`Expected configuration "${name.toUpperCase().replaceAll('-', '_')}"`) - return c -}; - -/** - * @param {string} name - * @return {boolean} - */ -/* c8 ignore next 2 */ -const hasConf = (name) => - hasParam('--' + name) || getVariable(name) !== null; - -/* c8 ignore next */ -const production = hasConf('production'); - -/* c8 ignore next 2 */ -const forceColor = isNode && - _function.isOneOf(process.env.FORCE_COLOR, ['true', '1', '2']); - -/* c8 ignore start */ -/** - * Color is enabled by default if the terminal supports it. - * - * Explicitly enable color using `--color` parameter - * Disable color using `--no-color` parameter or using `NO_COLOR=1` environment variable. - * `FORCE_COLOR=1` enables color and takes precedence over all. - */ -const supportsColor = forceColor || ( - !hasParam('--no-colors') && // @todo deprecate --no-colors - !hasConf('no-color') && - (!isNode || process.stdout.isTTY) && ( - !isNode || - hasParam('--color') || - getVariable('COLORTERM') !== null || - (getVariable('TERM') || '').includes('color') - ) -); -/* c8 ignore stop */ - -var environment = /*#__PURE__*/Object.freeze({ - __proto__: null, - isNode: isNode, - isBrowser: isBrowser, - isMac: isMac, - hasParam: hasParam, - getParam: getParam, - getVariable: getVariable, - getConf: getConf, - ensureConf: ensureConf, - hasConf: hasConf, - production: production, - supportsColor: supportsColor -}); - -exports.ensureConf = ensureConf; -exports.environment = environment; -exports.getConf = getConf; -exports.getParam = getParam; -exports.getVariable = getVariable; -exports.hasConf = hasConf; -exports.hasParam = hasParam; -exports.isBrowser = isBrowser; -exports.isMac = isMac; -exports.isNode = isNode; -exports.production = production; -exports.supportsColor = supportsColor; -//# sourceMappingURL=environment-1c97264d.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment-1c97264d.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment-1c97264d.cjs.map deleted file mode 100644 index 2f9deb3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment-1c97264d.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"environment-1c97264d.cjs","sources":["../environment.js"],"sourcesContent":["/**\n * Isomorphic module to work access the environment (query params, env variables).\n *\n * @module environment\n */\n\nimport * as map from './map.js'\nimport * as string from './string.js'\nimport * as conditions from './conditions.js'\nimport * as storage from './storage.js'\nimport * as f from './function.js'\n\n/* c8 ignore next 2 */\n// @ts-ignore\nexport const isNode = typeof process !== 'undefined' && process.release && /node|io\\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n\n/* c8 ignore next */\nexport const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && !isNode\n/* c8 ignore next 3 */\nexport const isMac = typeof navigator !== 'undefined'\n ? /Mac/.test(navigator.platform)\n : false\n\n/**\n * @type {Map}\n */\nlet params\nconst args = []\n\n/* c8 ignore start */\nconst computeParams = () => {\n if (params === undefined) {\n if (isNode) {\n params = map.create()\n const pargs = process.argv\n let currParamName = null\n for (let i = 0; i < pargs.length; i++) {\n const parg = pargs[i]\n if (parg[0] === '-') {\n if (currParamName !== null) {\n params.set(currParamName, '')\n }\n currParamName = parg\n } else {\n if (currParamName !== null) {\n params.set(currParamName, parg)\n currParamName = null\n } else {\n args.push(parg)\n }\n }\n }\n if (currParamName !== null) {\n params.set(currParamName, '')\n }\n // in ReactNative for example this would not be true (unless connected to the Remote Debugger)\n } else if (typeof location === 'object') {\n params = map.create(); // eslint-disable-next-line no-undef\n (location.search || '?').slice(1).split('&').forEach((kv) => {\n if (kv.length !== 0) {\n const [key, value] = kv.split('=')\n params.set(`--${string.fromCamelCase(key, '-')}`, value)\n params.set(`-${string.fromCamelCase(key, '-')}`, value)\n }\n })\n } else {\n params = map.create()\n }\n }\n return params\n}\n/* c8 ignore stop */\n\n/**\n * @param {string} name\n * @return {boolean}\n */\n/* c8 ignore next */\nexport const hasParam = (name) => computeParams().has(name)\n\n/**\n * @param {string} name\n * @param {string} defaultVal\n * @return {string}\n */\n/* c8 ignore next 2 */\nexport const getParam = (name, defaultVal) =>\n computeParams().get(name) || defaultVal\n\n/**\n * @param {string} name\n * @return {string|null}\n */\n/* c8 ignore next 4 */\nexport const getVariable = (name) =>\n isNode\n ? conditions.undefinedToNull(process.env[name.toUpperCase().replaceAll('-', '_')])\n : conditions.undefinedToNull(storage.varStorage.getItem(name))\n\n/**\n * @param {string} name\n * @return {string|null}\n */\n/* c8 ignore next 2 */\nexport const getConf = (name) =>\n computeParams().get('--' + name) || getVariable(name)\n\n/**\n * @param {string} name\n * @return {string}\n */\n/* c8 ignore next 5 */\nexport const ensureConf = (name) => {\n const c = getConf(name)\n if (c == null) throw new Error(`Expected configuration \"${name.toUpperCase().replaceAll('-', '_')}\"`)\n return c\n}\n\n/**\n * @param {string} name\n * @return {boolean}\n */\n/* c8 ignore next 2 */\nexport const hasConf = (name) =>\n hasParam('--' + name) || getVariable(name) !== null\n\n/* c8 ignore next */\nexport const production = hasConf('production')\n\n/* c8 ignore next 2 */\nconst forceColor = isNode &&\n f.isOneOf(process.env.FORCE_COLOR, ['true', '1', '2'])\n\n/* c8 ignore start */\n/**\n * Color is enabled by default if the terminal supports it.\n *\n * Explicitly enable color using `--color` parameter\n * Disable color using `--no-color` parameter or using `NO_COLOR=1` environment variable.\n * `FORCE_COLOR=1` enables color and takes precedence over all.\n */\nexport const supportsColor = forceColor || (\n !hasParam('--no-colors') && // @todo deprecate --no-colors\n !hasConf('no-color') &&\n (!isNode || process.stdout.isTTY) && (\n !isNode ||\n hasParam('--color') ||\n getVariable('COLORTERM') !== null ||\n (getVariable('TERM') || '').includes('color')\n )\n)\n/* c8 ignore stop */\n"],"names":["map.create","string.fromCamelCase","conditions.undefinedToNull","storage.varStorage","f.isOneOf"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACY,MAAC,MAAM,GAAG,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK,WAAW,GAAG,OAAO,GAAG,CAAC,CAAC,KAAK,mBAAkB;AAC1N;AACA;AACY,MAAC,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,CAAC,OAAM;AACpG;AACY,MAAC,KAAK,GAAG,OAAO,SAAS,KAAK,WAAW;AACrD,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;AAClC,IAAI,MAAK;AACT;AACA;AACA;AACA;AACA,IAAI,OAAM;AAEV;AACA;AACA,MAAM,aAAa,GAAG,MAAM;AAC5B,EAAE,IAAI,MAAM,KAAK,SAAS,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IAAI,CAAC,IAAI,IAAI,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC,wBAAwB,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACvG,EAAE,OAAO,CAAC;AACV,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,IAAI;AAC5B,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,KAAI;AACrD;AACA;AACY,MAAC,UAAU,GAAG,OAAO,CAAC,YAAY,EAAC;AAC/C;AACA;AACA,MAAM,UAAU,GAAG,MAAM;AACzB,EAAEC,iBAAS,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,EAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,UAAU;AACvC,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;AAC1B,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;AACtB,GAAG,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;AACnC,IAAI,CAAC,MAAM;AACX,IAAI,QAAQ,CAAC,SAAS,CAAC;AACvB,IAAI,WAAW,CAAC,WAAW,CAAC,KAAK,IAAI;AACrC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC;AACjD,GAAG;AACH,EAAC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.cjs deleted file mode 100644 index dc0c842..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.cjs +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./map-24d263c0.cjs'); -require('./string-fddc5f8b.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -var environment = require('./environment-1c97264d.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); - - - -exports.ensureConf = environment.ensureConf; -exports.getConf = environment.getConf; -exports.getParam = environment.getParam; -exports.getVariable = environment.getVariable; -exports.hasConf = environment.hasConf; -exports.hasParam = environment.hasParam; -exports.isBrowser = environment.isBrowser; -exports.isMac = environment.isMac; -exports.isNode = environment.isNode; -exports.production = environment.production; -exports.supportsColor = environment.supportsColor; -//# sourceMappingURL=environment.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.cjs.map deleted file mode 100644 index 8bb5bc4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"environment.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.d.ts deleted file mode 100644 index 9366538..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export const isNode: boolean; -export const isBrowser: boolean; -export const isMac: boolean; -export function hasParam(name: string): boolean; -export function getParam(name: string, defaultVal: string): string; -export function getVariable(name: string): string | null; -export function getConf(name: string): string | null; -export function ensureConf(name: string): string; -export function hasConf(name: string): boolean; -export const production: boolean; -/** - * Color is enabled by default if the terminal supports it. - * - * Explicitly enable color using `--color` parameter - * Disable color using `--no-color` parameter or using `NO_COLOR=1` environment variable. - * `FORCE_COLOR=1` enables color and takes precedence over all. - */ -export const supportsColor: boolean; -//# sourceMappingURL=environment.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.d.ts.map deleted file mode 100644 index 642f36d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/environment.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../environment.js"],"names":[],"mappings":"AAcA,6BAA0N;AAG1N,gCAAoG;AAEpG,4BAES;AAyDF,+BAJI,MAAM,GACL,OAAO,CAGwC;AAQpD,+BALI,MAAM,cACN,MAAM,GACL,MAAM,CAIuB;AAOlC,kCAJI,MAAM,GACL,MAAM,GAAC,IAAI,CAM2C;AAO3D,8BAJI,MAAM,GACL,MAAM,GAAC,IAAI,CAIgC;AAOhD,iCAJI,MAAM,GACL,MAAM,CAOjB;AAOM,8BAJI,MAAM,GACL,OAAO,CAIkC;AAGrD,iCAA+C;AAO/C;;;;;;GAMG;AACH,oCASC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/equality.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/equality.cjs deleted file mode 100644 index dc7d131..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/equality.cjs +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -const EqualityTraitSymbol = Symbol('Equality'); - -/** - * @typedef {{ [EqualityTraitSymbol]:(other:EqualityTrait)=>boolean }} EqualityTrait - */ - -/** - * - * Utility function to compare any two objects. - * - * Note that it is expected that the first parameter is more specific than the latter one. - * - * @example js - * class X { [traits.EqualityTraitSymbol] (other) { return other === this } } - * class X2 { [traits.EqualityTraitSymbol] (other) { return other === this }, x2 () { return 2 } } - * // this is fine - * traits.equals(new X2(), new X()) - * // this is not, because the left type is less specific than the right one - * traits.equals(new X(), new X2()) - * - * @template {EqualityTrait} T - * @param {NoInfer} a - * @param {T} b - * @return {boolean} - */ -const equals = (a, b) => a === b || !!a?.[EqualityTraitSymbol]?.(b) || false; - -exports.EqualityTraitSymbol = EqualityTraitSymbol; -exports.equals = equals; -//# sourceMappingURL=equality.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/equality.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/equality.cjs.map deleted file mode 100644 index 8c7d72a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/equality.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"equality.cjs","sources":["../trait/equality.js"],"sourcesContent":["export const EqualityTraitSymbol = Symbol('Equality')\n\n/**\n * @typedef {{ [EqualityTraitSymbol]:(other:EqualityTrait)=>boolean }} EqualityTrait\n */\n\n/**\n *\n * Utility function to compare any two objects.\n *\n * Note that it is expected that the first parameter is more specific than the latter one.\n *\n * @example js\n * class X { [traits.EqualityTraitSymbol] (other) { return other === this } }\n * class X2 { [traits.EqualityTraitSymbol] (other) { return other === this }, x2 () { return 2 } }\n * // this is fine\n * traits.equals(new X2(), new X())\n * // this is not, because the left type is less specific than the right one\n * traits.equals(new X(), new X2())\n *\n * @template {EqualityTrait} T\n * @param {NoInfer} a\n * @param {T} b\n * @return {boolean}\n */\nexport const equals = (a, b) => a === b || !!a?.[EqualityTraitSymbol]?.(b) || false\n"],"names":[],"mappings":";;;;AAAY,MAAC,mBAAmB,GAAG,MAAM,CAAC,UAAU,EAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC,IAAI;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error-0c1f634f.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error-0c1f634f.cjs deleted file mode 100644 index e0a8429..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error-0c1f634f.cjs +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -/** - * Error helpers. - * - * @module error - */ - -/** - * @param {string} s - * @return {Error} - */ -/* c8 ignore next */ -const create = s => new Error(s); - -/** - * @throws {Error} - * @return {never} - */ -/* c8 ignore next 3 */ -const methodUnimplemented = () => { - throw create('Method unimplemented') -}; - -/** - * @throws {Error} - * @return {never} - */ -/* c8 ignore next 3 */ -const unexpectedCase = () => { - throw create('Unexpected case') -}; - -/** - * @param {boolean} property - * @return {asserts property is true} - */ -const assert = property => { if (!property) throw create('Assert failed') }; - -var error = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create, - methodUnimplemented: methodUnimplemented, - unexpectedCase: unexpectedCase, - assert: assert -}); - -exports.assert = assert; -exports.create = create; -exports.error = error; -exports.methodUnimplemented = methodUnimplemented; -exports.unexpectedCase = unexpectedCase; -//# sourceMappingURL=error-0c1f634f.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error-0c1f634f.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error-0c1f634f.cjs.map deleted file mode 100644 index 63f2a92..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error-0c1f634f.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error-0c1f634f.cjs","sources":["../error.js"],"sourcesContent":["/**\n * Error helpers.\n *\n * @module error\n */\n\n/**\n * @param {string} s\n * @return {Error}\n */\n/* c8 ignore next */\nexport const create = s => new Error(s)\n\n/**\n * @throws {Error}\n * @return {never}\n */\n/* c8 ignore next 3 */\nexport const methodUnimplemented = () => {\n throw create('Method unimplemented')\n}\n\n/**\n * @throws {Error}\n * @return {never}\n */\n/* c8 ignore next 3 */\nexport const unexpectedCase = () => {\n throw create('Unexpected case')\n}\n\n/**\n * @param {boolean} property\n * @return {asserts property is true}\n */\nexport const assert = property => { if (!property) throw create('Assert failed') }\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC,EAAC;AACvC;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,mBAAmB,GAAG,MAAM;AACzC,EAAE,MAAM,MAAM,CAAC,sBAAsB,CAAC;AACtC,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,cAAc,GAAG,MAAM;AACpC,EAAE,MAAM,MAAM,CAAC,iBAAiB,CAAC;AACjC,EAAC;AACD;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,QAAQ,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,MAAM,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.cjs deleted file mode 100644 index 022e218..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.cjs +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var error = require('./error-0c1f634f.cjs'); - - - -exports.assert = error.assert; -exports.create = error.create; -exports.methodUnimplemented = error.methodUnimplemented; -exports.unexpectedCase = error.unexpectedCase; -//# sourceMappingURL=error.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.cjs.map deleted file mode 100644 index a024bec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.d.ts deleted file mode 100644 index e60d1b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function create(s: string): Error; -export function methodUnimplemented(): never; -export function unexpectedCase(): never; -export function assert(property: boolean): asserts property is true; -//# sourceMappingURL=error.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.d.ts.map deleted file mode 100644 index 9b25e95..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/error.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../error.js"],"names":[],"mappings":"AAWO,0BAJI,MAAM,GACL,KAAK,CAGsB;AAOhC,uCAHK,KAAK,CAKhB;AAOM,kCAHK,KAAK,CAKhB;AAMM,iCAHI,OAAO,GACN,QAAQ,QAAQ,IAAI,IAAI,CAE8C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop-a0168106.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop-a0168106.cjs deleted file mode 100644 index 313cb9e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop-a0168106.cjs +++ /dev/null @@ -1,151 +0,0 @@ -'use strict'; - -var time = require('./time-d8438852.cjs'); - -/* global requestIdleCallback, requestAnimationFrame, cancelIdleCallback, cancelAnimationFrame */ - -/** - * Utility module to work with EcmaScript's event loop. - * - * @module eventloop - */ - -/** - * @type {Array} - */ -let queue = []; - -const _runQueue = () => { - for (let i = 0; i < queue.length; i++) { - queue[i](); - } - queue = []; -}; - -/** - * @param {function():void} f - */ -const enqueue = f => { - queue.push(f); - if (queue.length === 1) { - setTimeout(_runQueue, 0); - } -}; - -/** - * @typedef {Object} TimeoutObject - * @property {function} TimeoutObject.destroy - */ - -/** - * @param {function(number):void} clearFunction - */ -const createTimeoutClass = clearFunction => class TT { - /** - * @param {number} timeoutId - */ - constructor (timeoutId) { - this._ = timeoutId; - } - - destroy () { - clearFunction(this._); - } -}; - -const Timeout = createTimeoutClass(clearTimeout); - -/** - * @param {number} timeout - * @param {function} callback - * @return {TimeoutObject} - */ -const timeout = (timeout, callback) => new Timeout(setTimeout(callback, timeout)); - -const Interval = createTimeoutClass(clearInterval); - -/** - * @param {number} timeout - * @param {function} callback - * @return {TimeoutObject} - */ -const interval = (timeout, callback) => new Interval(setInterval(callback, timeout)); - -/* c8 ignore next */ -const Animation = createTimeoutClass(arg => typeof requestAnimationFrame !== 'undefined' && cancelAnimationFrame(arg)); - -/** - * @param {function(number):void} cb - * @return {TimeoutObject} - */ -/* c8 ignore next */ -const animationFrame = cb => typeof requestAnimationFrame === 'undefined' ? timeout(0, cb) : new Animation(requestAnimationFrame(cb)); - -/* c8 ignore next */ -// @ts-ignore -const Idle = createTimeoutClass(arg => typeof cancelIdleCallback !== 'undefined' && cancelIdleCallback(arg)); - -/** - * Note: this is experimental and is probably only useful in browsers. - * - * @param {function} cb - * @return {TimeoutObject} - */ -/* c8 ignore next 2 */ -// @ts-ignore -const idleCallback = cb => typeof requestIdleCallback !== 'undefined' ? new Idle(requestIdleCallback(cb)) : timeout(1000, cb); - -/** - * @param {number} timeout Timeout of the debounce action - * @param {number} triggerAfter Optional. Trigger callback after a certain amount of time - * without waiting for debounce. - */ -const createDebouncer = (timeout, triggerAfter = -1) => { - let timer = -1; - /** - * @type {number?} - */ - let lastCall = null; - /** - * @param {((...args: any)=>void)?} cb function to trigger after debounce. If null, it will reset the - * debounce. - */ - return cb => { - clearTimeout(timer); - if (cb) { - if (triggerAfter >= 0) { - const now = time.getUnixTime(); - if (lastCall === null) lastCall = now; - if (now - lastCall > triggerAfter) { - lastCall = null; - timer = /** @type {any} */ (setTimeout(cb, 0)); - return - } - } - timer = /** @type {any} */ (setTimeout(() => { lastCall = null; cb(); }, timeout)); - } else { - lastCall = null; - } - } -}; - -var eventloop = /*#__PURE__*/Object.freeze({ - __proto__: null, - enqueue: enqueue, - timeout: timeout, - interval: interval, - Animation: Animation, - animationFrame: animationFrame, - idleCallback: idleCallback, - createDebouncer: createDebouncer -}); - -exports.Animation = Animation; -exports.animationFrame = animationFrame; -exports.createDebouncer = createDebouncer; -exports.enqueue = enqueue; -exports.eventloop = eventloop; -exports.idleCallback = idleCallback; -exports.interval = interval; -exports.timeout = timeout; -//# sourceMappingURL=eventloop-a0168106.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop-a0168106.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop-a0168106.cjs.map deleted file mode 100644 index 08f5a44..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop-a0168106.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventloop-a0168106.cjs","sources":["../eventloop.js"],"sourcesContent":["/* global requestIdleCallback, requestAnimationFrame, cancelIdleCallback, cancelAnimationFrame */\n\nimport * as time from './time.js'\n\n/**\n * Utility module to work with EcmaScript's event loop.\n *\n * @module eventloop\n */\n\n/**\n * @type {Array}\n */\nlet queue = []\n\nconst _runQueue = () => {\n for (let i = 0; i < queue.length; i++) {\n queue[i]()\n }\n queue = []\n}\n\n/**\n * @param {function():void} f\n */\nexport const enqueue = f => {\n queue.push(f)\n if (queue.length === 1) {\n setTimeout(_runQueue, 0)\n }\n}\n\n/**\n * @typedef {Object} TimeoutObject\n * @property {function} TimeoutObject.destroy\n */\n\n/**\n * @param {function(number):void} clearFunction\n */\nconst createTimeoutClass = clearFunction => class TT {\n /**\n * @param {number} timeoutId\n */\n constructor (timeoutId) {\n this._ = timeoutId\n }\n\n destroy () {\n clearFunction(this._)\n }\n}\n\nconst Timeout = createTimeoutClass(clearTimeout)\n\n/**\n * @param {number} timeout\n * @param {function} callback\n * @return {TimeoutObject}\n */\nexport const timeout = (timeout, callback) => new Timeout(setTimeout(callback, timeout))\n\nconst Interval = createTimeoutClass(clearInterval)\n\n/**\n * @param {number} timeout\n * @param {function} callback\n * @return {TimeoutObject}\n */\nexport const interval = (timeout, callback) => new Interval(setInterval(callback, timeout))\n\n/* c8 ignore next */\nexport const Animation = createTimeoutClass(arg => typeof requestAnimationFrame !== 'undefined' && cancelAnimationFrame(arg))\n\n/**\n * @param {function(number):void} cb\n * @return {TimeoutObject}\n */\n/* c8 ignore next */\nexport const animationFrame = cb => typeof requestAnimationFrame === 'undefined' ? timeout(0, cb) : new Animation(requestAnimationFrame(cb))\n\n/* c8 ignore next */\n// @ts-ignore\nconst Idle = createTimeoutClass(arg => typeof cancelIdleCallback !== 'undefined' && cancelIdleCallback(arg))\n\n/**\n * Note: this is experimental and is probably only useful in browsers.\n *\n * @param {function} cb\n * @return {TimeoutObject}\n */\n/* c8 ignore next 2 */\n// @ts-ignore\nexport const idleCallback = cb => typeof requestIdleCallback !== 'undefined' ? new Idle(requestIdleCallback(cb)) : timeout(1000, cb)\n\n/**\n * @param {number} timeout Timeout of the debounce action\n * @param {number} triggerAfter Optional. Trigger callback after a certain amount of time\n * without waiting for debounce.\n */\nexport const createDebouncer = (timeout, triggerAfter = -1) => {\n let timer = -1\n /**\n * @type {number?}\n */\n let lastCall = null\n /**\n * @param {((...args: any)=>void)?} cb function to trigger after debounce. If null, it will reset the\n * debounce.\n */\n return cb => {\n clearTimeout(timer)\n if (cb) {\n if (triggerAfter >= 0) {\n const now = time.getUnixTime()\n if (lastCall === null) lastCall = now\n if (now - lastCall > triggerAfter) {\n lastCall = null\n timer = /** @type {any} */ (setTimeout(cb, 0))\n return\n }\n }\n timer = /** @type {any} */ (setTimeout(() => { lastCall = null; cb() }, timeout))\n } else {\n lastCall = null\n }\n }\n}\n"],"names":["time.getUnixTime"],"mappings":";;;;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,KAAK,GAAG,GAAE;AACd;AACA,MAAM,SAAS,GAAG,MAAM;AACxB,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACzC,IAAI,KAAK,CAAC,CAAC,CAAC,GAAE;AACd,GAAG;AACH,EAAE,KAAK,GAAG,GAAE;AACZ,EAAC;AACD;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,IAAI;AAC5B,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,EAAC;AACf,EAAE,IAAI,KAAK,CAAC,MAAM,KAA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AAC,GAAG,CAAC,EAAC;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,EAAE,IAAI,OAAO,mBAAmB,KAAK,WAAW,GAAG,IAAI,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,EAAE,EAAE,EAAC;AACpI;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAG,CAAC,OAAO,EAAE,YAAY,GAAG,CAAC,CAAC,KAAK;AAC/D,EAAE,IAAI,KAAK,GAAG,CAAC,EAAC;AAChB;AACA;AACA;AACA,EAAE,IAAI,QAAQ,GAAG,KAAI;AACrB;AACA;AACA;AACA;AACA,EAAE,OAAO,EAAE,IAAI;AACf,IAAI,YAAY,CAAC,KAAK,EAAC;AACvB,IAAI,IAAI,EAAE,EAAE;AACZ,MAAM,IAAI,YAAY,IAAI,CAAC,EAAE;AAC7B,QAAQ,MAAM,GAAG,GAAGA,gBAAgB,GAAE;AACtC,QAAQ,IAAI,QAAQ,KAAK,IAAI,EAAE,QAAQ,GAAG,IAAG;AAC7C,QAAQ,IAAI,GAAG,GAAG,QAAQ,GAAG,YAAY,EAAE;AAC3C,UAAU,QAAQ,GAAG,KAAI;AACzB,UAAU,KAAK,uBAAuB,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,EAAC;AACxD,UAAU,MAAM;AAChB,SAAS;AACT,OAAO;AACP,MAAM,KAAK,uBAAuB,UAAU,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC,CAAC,EAAE,GAAE,EAAE,EAAE,OAAO,CAAC,EAAC;AACvF,KAAK,MAAM;AACX,MAAM,QAAQ,GAAG,KAAI;AACrB,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.cjs deleted file mode 100644 index b53bf14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.cjs +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./time-d8438852.cjs'); -var eventloop = require('./eventloop-a0168106.cjs'); -require('./metric.cjs'); -require('./math-96d5e8c4.cjs'); - - - -exports.Animation = eventloop.Animation; -exports.animationFrame = eventloop.animationFrame; -exports.createDebouncer = eventloop.createDebouncer; -exports.enqueue = eventloop.enqueue; -exports.idleCallback = eventloop.idleCallback; -exports.interval = eventloop.interval; -exports.timeout = eventloop.timeout; -//# sourceMappingURL=eventloop.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.cjs.map deleted file mode 100644 index 0227967..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventloop.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.d.ts deleted file mode 100644 index 73d266a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export function enqueue(f: () => void): void; -export function timeout(timeout: number, callback: Function): TimeoutObject; -export function interval(timeout: number, callback: Function): TimeoutObject; -export const Animation: { - new (timeoutId: number): { - _: number; - destroy(): void; - }; -}; -export function animationFrame(cb: (arg0: number) => void): TimeoutObject; -export function idleCallback(cb: Function): TimeoutObject; -export function createDebouncer(timeout: number, triggerAfter?: number): (cb: ((...args: any) => void) | null) => void; -export type TimeoutObject = { - destroy: Function; -}; -//# sourceMappingURL=eventloop.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.d.ts.map deleted file mode 100644 index 900ed9e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventloop.d.ts","sourceRoot":"","sources":["../eventloop.js"],"names":[],"mappings":"AAyBO,2BAFI,MAAW,IAAI,QAOzB;AA8BM,iCAJI,MAAM,uBAEL,aAAa,CAE+D;AASjF,kCAJI,MAAM,uBAEL,aAAa,CAEkE;AAG3F;oBA9Ba,MAAM;;;;EA8B0G;AAOtH,mCAJI,CAAS,IAAM,EAAN,MAAM,KAAE,IAAI,GACpB,aAAa,CAGmH;AAcrI,4CAJK,aAAa,CAI2G;AAO7H,yCAJI,MAAM,iBACN,MAAM,IAaR,IAHI,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,KAAG,IAAI,CAAC,OAGxB,UAiBV"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.test.d.ts deleted file mode 100644 index a5ff2f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.test.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function testEventloopOrder(_tc: t.TestCase): Promise<[void, void]>; -export function testTimeout(_tc: t.TestCase): Promise; -export function testInterval(_tc: t.TestCase): Promise; -export function testAnimationFrame(_tc: t.TestCase): Promise; -export function testIdleCallback(_tc: t.TestCase): Promise; -export function testDebouncer(_tc: t.TestCase): Promise; -export function testDebouncerTriggerAfter(_tc: t.TestCase): Promise; -export function testDebouncerClear(_tc: t.TestCase): Promise; -import * as t from './testing.js'; -//# sourceMappingURL=eventloop.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.test.d.ts.map deleted file mode 100644 index b4c3cc1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/eventloop.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventloop.test.d.ts","sourceRoot":"","sources":["../eventloop.test.js"],"names":[],"mappings":"AAOO,wCAFI,CAAC,CAAC,QAAQ,yBAkBpB;AAKM,iCAFI,CAAC,CAAC,QAAQ,iBAYpB;AAKM,kCAFI,CAAC,CAAC,QAAQ,iBAepB;AAKM,wCAFI,CAAC,CAAC,QAAQ,iBAOpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,iBAMpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,iBAcpB;AAKM,+CAFI,CAAC,CAAC,QAAQ,iBAyBpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,iBAyBpB;mBAnJkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/fingerprint.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/fingerprint.cjs deleted file mode 100644 index eb7305f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/fingerprint.cjs +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var encoding = require('./encoding-1a745c43.cjs'); -var rabin = require('./rabin.cjs'); -var buffer = require('./buffer-3e750729.cjs'); -require('./math-96d5e8c4.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./string-fddc5f8b.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./map-24d263c0.cjs'); -require('./environment-1c97264d.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./decoding-76e75827.cjs'); -require('./error-0c1f634f.cjs'); - -const FingerprintTraitSymbol = Symbol('Fingerprint'); - -/** - * When implementing this trait, it is recommended to write some sort of "magic number" first to - * ensure that different types of objects don't have the same fingerprint. - * - * The recommended pracice is to generate a random u32 number as your magic number. e.g. using - * `console.log(random.uint32().toString(16))` - * - * @typedef {{ [FingerprintTraitSymbol]:()=>string } | import('../encoding.js').AnyEncodable} Fingerprintable - */ - -/** - * @param {Fingerprintable} a - * @return {string} - */ -const fingerprint = a => (a != null && /** @type {any} */ (a)[FingerprintTraitSymbol]?.()) || buffer.toBase64(rabin.fingerprint(rabin.StandardIrreducible128, encoding.encode(encoder => { encoding.writeUint32(encoder, 0x8de1c475); encoding.writeAny(encoder, a); }))); - -exports.FingerprintTraitSymbol = FingerprintTraitSymbol; -exports.fingerprint = fingerprint; -//# sourceMappingURL=fingerprint.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/fingerprint.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/fingerprint.cjs.map deleted file mode 100644 index d29864b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/fingerprint.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fingerprint.cjs","sources":["../trait/fingerprint.js"],"sourcesContent":["import * as encoding from '../encoding.js'\nimport * as rabin from '../hash/rabin.js'\nimport * as buffer from '../buffer.js'\n\nexport const FingerprintTraitSymbol = Symbol('Fingerprint')\n\n/**\n * When implementing this trait, it is recommended to write some sort of \"magic number\" first to\n * ensure that different types of objects don't have the same fingerprint.\n *\n * The recommended pracice is to generate a random u32 number as your magic number. e.g. using\n * `console.log(random.uint32().toString(16))`\n *\n * @typedef {{ [FingerprintTraitSymbol]:()=>string } | import('../encoding.js').AnyEncodable} Fingerprintable\n */\n\n/**\n * @param {Fingerprintable} a\n * @return {string}\n */\nexport const fingerprint = a => (a != null && /** @type {any} */ (a)[FingerprintTraitSymbol]?.()) || buffer.toBase64(rabin.fingerprint(rabin.StandardIrreducible128, encoding.encode(encoder => { encoding.writeUint32(encoder, 0x8de1c475); encoding.writeAny(encoder, a) })))\n"],"names":["buffer.toBase64","rabin.fingerprint","rabin.StandardIrreducible128","encoding.encode","encoding.writeUint32","encoding.writeAny"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIY,MAAC,sBAAsB,GAAG,MAAM,CAAC,aAAa,EAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,uBAAuB,CAAC,CAAC,EAAE,sBAAsB,CAAC,IAAI,KAAKA,eAAe,CAACC,iBAAiB,CAACC,4BAA4B,EAAEC,eAAe,CAAC,OAAO,IAAI,EAAEC,oBAAoB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAACC,iBAAiB,CAAC,OAAO,EAAE,CAAC,EAAC,EAAE,CAAC,CAAC;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function-314580f7.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function-314580f7.cjs deleted file mode 100644 index a4336f0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function-314580f7.cjs +++ /dev/null @@ -1,223 +0,0 @@ -'use strict'; - -var array = require('./array-78849c95.cjs'); -var object = require('./object-c0c9435b.cjs'); -var equality = require('./equality.cjs'); - -/** - * Common functions and function call helpers. - * - * @module function - */ - -/** - * Calls all functions in `fs` with args. Only throws after all functions were called. - * - * @param {Array} fs - * @param {Array} args - */ -const callAll = (fs, args, i = 0) => { - try { - for (; i < fs.length; i++) { - fs[i](...args); - } - } finally { - if (i < fs.length) { - callAll(fs, args, i + 1); - } - } -}; - -const nop = () => {}; - -/** - * @template T - * @param {function():T} f - * @return {T} - */ -const apply = f => f(); - -/** - * @template A - * - * @param {A} a - * @return {A} - */ -const id = a => a; - -/** - * @template T - * - * @param {T} a - * @param {T} b - * @return {boolean} - */ -const equalityStrict = (a, b) => a === b; - -/** - * @template T - * - * @param {Array|object} a - * @param {Array|object} b - * @return {boolean} - */ -const equalityFlat = (a, b) => a === b || (a != null && b != null && a.constructor === b.constructor && ((array.isArray(a) && array.equalFlat(a, /** @type {Array} */ (b))) || (typeof a === 'object' && object.equalFlat(a, b)))); - -/* c8 ignore start */ - -/** - * @param {any} a - * @param {any} b - * @return {boolean} - */ -const equalityDeep = (a, b) => { - if (a === b) { - return true - } - if (a == null || b == null || (a.constructor !== b.constructor && (a.constructor || Object) !== (b.constructor || Object))) { - return false - } - if (a[equality.EqualityTraitSymbol] != null) { - return a[equality.EqualityTraitSymbol](b) - } - switch (a.constructor) { - case ArrayBuffer: - a = new Uint8Array(a); - b = new Uint8Array(b); - // eslint-disable-next-line no-fallthrough - case Uint8Array: { - if (a.byteLength !== b.byteLength) { - return false - } - for (let i = 0; i < a.length; i++) { - if (a[i] !== b[i]) { - return false - } - } - break - } - case Set: { - if (a.size !== b.size) { - return false - } - for (const value of a) { - if (!b.has(value)) { - return false - } - } - break - } - case Map: { - if (a.size !== b.size) { - return false - } - for (const key of a.keys()) { - if (!b.has(key) || !equalityDeep(a.get(key), b.get(key))) { - return false - } - } - break - } - case undefined: - case Object: - if (object.size(a) !== object.size(b)) { - return false - } - for (const key in a) { - if (!object.hasProperty(a, key) || !equalityDeep(a[key], b[key])) { - return false - } - } - break - case Array: - if (a.length !== b.length) { - return false - } - for (let i = 0; i < a.length; i++) { - if (!equalityDeep(a[i], b[i])) { - return false - } - } - break - default: - return false - } - return true -}; - -/** - * @template V - * @template {V} OPTS - * - * @param {V} value - * @param {Array} options - */ -// @ts-ignore -const isOneOf = (value, options) => options.includes(value); -/* c8 ignore stop */ - -const isArray = array.isArray; - -/** - * @param {any} s - * @return {s is String} - */ -const isString = (s) => s && s.constructor === String; - -/** - * @param {any} n - * @return {n is Number} - */ -const isNumber = n => n != null && n.constructor === Number; - -/** - * @template {abstract new (...args: any) => any} TYPE - * @param {any} n - * @param {TYPE} T - * @return {n is InstanceType} - */ -const is = (n, T) => n && n.constructor === T; - -/** - * @template {abstract new (...args: any) => any} TYPE - * @param {TYPE} T - */ -const isTemplate = (T) => - /** - * @param {any} n - * @return {n is InstanceType} - **/ - n => n && n.constructor === T; - -var _function = /*#__PURE__*/Object.freeze({ - __proto__: null, - callAll: callAll, - nop: nop, - apply: apply, - id: id, - equalityStrict: equalityStrict, - equalityFlat: equalityFlat, - equalityDeep: equalityDeep, - isOneOf: isOneOf, - isArray: isArray, - isString: isString, - isNumber: isNumber, - is: is, - isTemplate: isTemplate -}); - -exports._function = _function; -exports.apply = apply; -exports.callAll = callAll; -exports.equalityDeep = equalityDeep; -exports.equalityFlat = equalityFlat; -exports.equalityStrict = equalityStrict; -exports.id = id; -exports.is = is; -exports.isArray = isArray; -exports.isNumber = isNumber; -exports.isOneOf = isOneOf; -exports.isString = isString; -exports.isTemplate = isTemplate; -exports.nop = nop; -//# sourceMappingURL=function-314580f7.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function-314580f7.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function-314580f7.cjs.map deleted file mode 100644 index 886a689..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function-314580f7.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"function-314580f7.cjs","sources":["../function.js"],"sourcesContent":["/**\n * Common functions and function call helpers.\n *\n * @module function\n */\n\nimport * as array from './array.js'\nimport * as object from './object.js'\nimport * as equalityTrait from './trait/equality.js'\n\n/**\n * Calls all functions in `fs` with args. Only throws after all functions were called.\n *\n * @param {Array} fs\n * @param {Array} args\n */\nexport const callAll = (fs, args, i = 0) => {\n try {\n for (; i < fs.length; i++) {\n fs[i](...args)\n }\n } finally {\n if (i < fs.length) {\n callAll(fs, args, i + 1)\n }\n }\n}\n\nexport const nop = () => {}\n\n/**\n * @template T\n * @param {function():T} f\n * @return {T}\n */\nexport const apply = f => f()\n\n/**\n * @template A\n *\n * @param {A} a\n * @return {A}\n */\nexport const id = a => a\n\n/**\n * @template T\n *\n * @param {T} a\n * @param {T} b\n * @return {boolean}\n */\nexport const equalityStrict = (a, b) => a === b\n\n/**\n * @template T\n *\n * @param {Array|object} a\n * @param {Array|object} b\n * @return {boolean}\n */\nexport const equalityFlat = (a, b) => a === b || (a != null && b != null && a.constructor === b.constructor && ((array.isArray(a) && array.equalFlat(a, /** @type {Array} */ (b))) || (typeof a === 'object' && object.equalFlat(a, b))))\n\n/* c8 ignore start */\n\n/**\n * @param {any} a\n * @param {any} b\n * @return {boolean}\n */\nexport const equalityDeep = (a, b) => {\n if (a === b) {\n return true\n }\n if (a == null || b == null || (a.constructor !== b.constructor && (a.constructor || Object) !== (b.constructor || Object))) {\n return false\n }\n if (a[equalityTrait.EqualityTraitSymbol] != null) {\n return a[equalityTrait.EqualityTraitSymbol](b)\n }\n switch (a.constructor) {\n case ArrayBuffer:\n a = new Uint8Array(a)\n b = new Uint8Array(b)\n // eslint-disable-next-line no-fallthrough\n case Uint8Array: {\n if (a.byteLength !== b.byteLength) {\n return false\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false\n }\n }\n break\n }\n case Set: {\n if (a.size !== b.size) {\n return false\n }\n for (const value of a) {\n if (!b.has(value)) {\n return false\n }\n }\n break\n }\n case Map: {\n if (a.size !== b.size) {\n return false\n }\n for (const key of a.keys()) {\n if (!b.has(key) || !equalityDeep(a.get(key), b.get(key))) {\n return false\n }\n }\n break\n }\n case undefined:\n case Object:\n if (object.size(a) !== object.size(b)) {\n return false\n }\n for (const key in a) {\n if (!object.hasProperty(a, key) || !equalityDeep(a[key], b[key])) {\n return false\n }\n }\n break\n case Array:\n if (a.length !== b.length) {\n return false\n }\n for (let i = 0; i < a.length; i++) {\n if (!equalityDeep(a[i], b[i])) {\n return false\n }\n }\n break\n default:\n return false\n }\n return true\n}\n\n/**\n * @template V\n * @template {V} OPTS\n *\n * @param {V} value\n * @param {Array} options\n */\n// @ts-ignore\nexport const isOneOf = (value, options) => options.includes(value)\n/* c8 ignore stop */\n\nexport const isArray = array.isArray\n\n/**\n * @param {any} s\n * @return {s is String}\n */\nexport const isString = (s) => s && s.constructor === String\n\n/**\n * @param {any} n\n * @return {n is Number}\n */\nexport const isNumber = n => n != null && n.constructor === Number\n\n/**\n * @template {abstract new (...args: any) => any} TYPE\n * @param {any} n\n * @param {TYPE} T\n * @return {n is InstanceType}\n */\nexport const is = (n, T) => n && n.constructor === T\n\n/**\n * @template {abstract new (...args: any) => any} TYPE\n * @param {TYPE} T\n */\nexport const isTemplate = (T) =>\n /**\n * @param {any} n\n * @return {n is InstanceType}\n **/\n n => n && n.constructor === T\n"],"names":["array.isArray","array.equalFlat","object.equalFlat","equalityTrait.EqualityTraitSymbol","object.size","object.hasProperty"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK;AAC5C,EAAE,IAAI;AACN,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,E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KAAK;AAClB,GAAG;AACH,EAAE,OAAO,IAAI;AACb,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAC;AAClE;AACA;AACY,MAAC,OAAO,GAAGL,cAAa;AACpC;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,WAAW,KAAK,OAAM;AAC5D;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,WAAW,KAAK,OAAM;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,WAAW,KAAK,EAAC;AACpD;AACA;AACA;AACA;AACA;AACY,MAAC,UAAU,GAAG,CAAC,CAAC;AAC5B;AACA;AACA;AACA;AACA,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.cjs deleted file mode 100644 index 54c3daa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.cjs +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./array-78849c95.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -var _function = require('./function-314580f7.cjs'); -require('./set-5b47859e.cjs'); - - - -exports.apply = _function.apply; -exports.callAll = _function.callAll; -exports.equalityDeep = _function.equalityDeep; -exports.equalityFlat = _function.equalityFlat; -exports.equalityStrict = _function.equalityStrict; -exports.id = _function.id; -exports.is = _function.is; -exports.isArray = _function.isArray; -exports.isNumber = _function.isNumber; -exports.isOneOf = _function.isOneOf; -exports.isString = _function.isString; -exports.isTemplate = _function.isTemplate; -exports.nop = _function.nop; -//# sourceMappingURL=function.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.cjs.map deleted file mode 100644 index 52c4808..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"function.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.d.ts deleted file mode 100644 index 1bd353e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export function callAll(fs: Array, args: Array, i?: number): void; -export function nop(): void; -export function apply(f: () => T): T; -export function id
(a: A): A; -export function equalityStrict(a: T, b: T): boolean; -export function equalityFlat(a: Array | object, b: Array | object): boolean; -export function equalityDeep(a: any, b: any): boolean; -export function isOneOf(value: V, options: Array): boolean; -export const isArray: (arg: any) => arg is any[]; -export function isString(s: any): s is string; -export function isNumber(n: any): n is number; -export function is any>(n: any, T: TYPE): n is InstanceType; -export function isTemplate any>(T: TYPE): ( -/** - * @param {any} n - * @return {n is InstanceType} - **/ -n: any) => n is InstanceType; -//# sourceMappingURL=function.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.d.ts.map deleted file mode 100644 index 9638b0d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../function.js"],"names":[],"mappings":"AAgBO,4BAHI,KAAK,UAAU,QACf,KAAK,CAAC,GAAG,CAAC,oBAYpB;AAEM,4BAAoB;AAOpB,sBAJM,CAAC,KACH,MAAW,CAAC,GACX,CAAC,CAEgB;AAQtB,mBALM,CAAC,KAEH,CAAC,GACA,CAAC,CAEW;AASjB,+BANM,CAAC,KAEH,CAAC,KACD,CAAC,GACA,OAAO,CAE4B;AASxC,6BANM,CAAC,KAEH,KAAK,CAAC,CAAC,CAAC,GAAC,MAAM,KACf,KAAK,CAAC,CAAC,CAAC,GAAC,MAAM,GACd,OAAO,CAEyN;AASrO,gCAJI,GAAG,KACH,GAAG,GACF,OAAO,CA2ElB;AAUM,wBAPM,CAAC,EACG,IAAI,SAAP,CAAE,SAEL,CAAC,WACD,KAAK,CAAC,IAAI,CAAC,WAG4C;AAGlE,iDAAoC;AAM7B,4BAHI,GAAG,GACF,CAAC,UAAU,CAEqC;AAMrD,4BAHI,GAAG,GACF,CAAC,UAAU,CAE2C;AAQ3D,mBAL2C,IAAI,SAAxC,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,KAAK,GAAI,KACtC,GAAG,KACH,IAAI,GACH,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,CAEiB;AAM7C,2BAH2C,IAAI,SAAxC,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,KAAK,GAAI,KACtC,IAAI;AAGb;;;IAGI;AACJ,GAHW,GAGV,KAFW,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,CAEN"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.test.d.ts deleted file mode 100644 index 8d7b277..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.test.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function testBasics(_tc: t.TestCase): void; -export function testCallAll(_tc: t.TestCase): void; -export function testDeepEquality(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=function.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.test.d.ts.map deleted file mode 100644 index e2a1d49..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/function.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"function.test.d.ts","sourceRoot":"","sources":["../function.test.js"],"names":[],"mappings":"AAMO,gCAFI,CAAC,CAAC,QAAQ,QA+CpB;AAKM,iCAFI,CAAC,CAAC,QAAQ,QAuBpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAkEpB;mBAjJkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-gf2-polynomial.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-gf2-polynomial.d.ts deleted file mode 100644 index d6d03d6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-gf2-polynomial.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a GF2 Polynomial abstraction that is not meant for production! - * - * It is easy to understand and it's correctness is as obvious as possible. It can be used to verify - * efficient implementations of algorithms on GF2. - */ -export class GF2Polynomial { - /** - * @type {Set} - */ - degrees: Set; -} -export function createFromBytes(bytes: Uint8Array): GF2Polynomial; -export function toUint8Array(p: GF2Polynomial, byteLength?: number): Uint8Array; -export function createFromUint(uint: number): GF2Polynomial; -export function createRandom(degree: number): GF2Polynomial; -export function getHighestDegree(p: GF2Polynomial): number; -export function addInto(p1: GF2Polynomial, p2: GF2Polynomial): void; -export function orInto(p1: GF2Polynomial, p2: GF2Polynomial): void; -export function add(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function clone(p: GF2Polynomial): GF2Polynomial; -export function addDegreeInto(p: GF2Polynomial, degree: number): void; -export function multiply(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function shiftLeft(p: GF2Polynomial, shift: number): GF2Polynomial; -export function mod(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function modPow(p: GF2Polynomial, e: number, m: GF2Polynomial): GF2Polynomial; -export function gcd(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function equals(p1: GF2Polynomial, p2: GF2Polynomial): boolean; -export function isIrreducibleBenOr(p: GF2Polynomial): boolean; -export function createIrreducible(degree: number): GF2Polynomial; -export function fingerprint(buf: Uint8Array, m: GF2Polynomial): Uint8Array; -export class RabinPolynomialEncoder { - /** - * @param {GF2Polynomial} m The irreducible polynomial - */ - constructor(m: GF2Polynomial); - fingerprint: GF2Polynomial; - m: GF2Polynomial; - /** - * @param {number} b - */ - write(b: number): void; - getFingerprint(): Uint8Array; -} -//# sourceMappingURL=rabin-gf2-polynomial.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-gf2-polynomial.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-gf2-polynomial.d.ts.map deleted file mode 100644 index 4fa40ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-gf2-polynomial.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin-gf2-polynomial.d.ts","sourceRoot":"","sources":["../../hash/rabin-gf2-polynomial.js"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH;IAEI;;QAEI;IACJ,SAFW,GAAG,CAAC,MAAM,CAAC,CAEE;CAE3B;AAOM,uCAFI,UAAU,iBAcpB;AAQM,gCAHI,aAAa,eACb,MAAM,2BAahB;AAOM,qCAFI,MAAM,iBAQhB;AAOM,qCAFI,MAAM,iBAYhB;AAMM,oCAHI,aAAa,UAG2D;AAU5E,4BAHI,aAAa,MACb,aAAa,QAUvB;AAUM,2BAHI,aAAa,MACb,aAAa,QAMvB;AAUM,wBAHI,aAAa,MACb,aAAa,iBAevB;AASM,yBAFI,aAAa,iBAMvB;AAUM,iCAHI,aAAa,UACb,MAAM,QAQhB;AAQM,6BAHI,aAAa,MACb,aAAa,iBAUvB;AAQM,6BAHI,aAAa,SACb,MAAM,iBAShB;AAQM,wBAHI,aAAa,MACb,aAAa,iBAavB;AAWM,0BAJI,aAAa,KACb,MAAM,KACN,aAAa,iBAcvB;AAQM,wBAHI,aAAa,MACb,aAAa,iBASvB;AAQM,2BAHI,aAAa,MACb,aAAa,WAQvB;AAgCM,sCAFI,aAAa,WAYvB;AAKM,0CAFI,MAAM,iBAOhB;AAQM,iCAHI,UAAU,KACV,aAAa,2BAE0G;AAElI;IACE;;OAEG;IACH,eAFW,aAAa,EAKvB;IAFC,2BAAsC;IACtC,iBAAU;IAGZ;;OAEG;IACH,SAFW,MAAM,QAOhB;IAED,0CAEC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-uncached.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-uncached.d.ts deleted file mode 100644 index 5adc6e2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-uncached.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export class RabinUncachedEncoder { - /** - * @param {Uint8Array} m assert(m[0] === 1) - */ - constructor(m: Uint8Array); - m: Uint8Array; - blen: number; - bs: Uint8Array; - /** - * This describes the position of the most significant byte (starts with 0 and increases with - * shift) - */ - bpos: number; - /** - * Add/Xor/Substract bytes. - * - * Discards bytes that are out of range. - * @todo put this in function or inline - * - * @param {Uint8Array} cs - */ - add(cs: Uint8Array): void; - /** - * @param {number} byte - */ - write(byte: number): void; - getFingerprint(): Uint8Array; -} -//# sourceMappingURL=rabin-uncached.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-uncached.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-uncached.d.ts.map deleted file mode 100644 index 07e69c2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin-uncached.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin-uncached.d.ts","sourceRoot":"","sources":["../../hash/rabin-uncached.js"],"names":[],"mappings":"AAUA;IACE;;OAEG;IACH,eAFW,UAAU,EAWpB;IARC,+BAAU;IACV,aAAwB;IACxB,4BAAmC;IACnC;;;OAGG;IACH,aAAa;IAGf;;;;;;;OAOG;IACH,QAFW,UAAU,QAQpB;IAED;;OAEG;IACH,YAFW,MAAM,QAgBhB;IAED,0CAMC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.d.ts deleted file mode 100644 index cd3061a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export const StandardIrreducible8: Uint8Array; -export const StandardIrreducible16: Uint8Array; -export const StandardIrreducible32: Uint8Array; -export const StandardIrreducible64: Uint8Array; -export const StandardIrreducible128: Uint8Array; -export class RabinEncoder { - /** - * @param {Uint8Array} m assert(m[0] === 1) - */ - constructor(m: Uint8Array); - m: Uint8Array; - blen: number; - bs: Uint8Array; - cache: Uint8Array; - /** - * This describes the position of the most significant byte (starts with 0 and increases with - * shift) - */ - bpos: number; - /** - * @param {number} byte - */ - write(byte: number): void; - getFingerprint(): Uint8Array; -} -export function fingerprint(irreducible: Uint8Array, data: Uint8Array): Uint8Array; -//# sourceMappingURL=rabin.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.d.ts.map deleted file mode 100644 index c8d2659..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin.d.ts","sourceRoot":"","sources":["../../hash/rabin.js"],"names":[],"mappings":"AAUA,2DAA4D;AAC5D,4DAAkE;AAClE,4DAA4E;AAC5E,4DAA+F;AAC/F,6DAAmI;AAmCnI;IACE;;OAEG;IACH,eAFW,UAAU,EAYpB;IATC,+BAAU;IACV,aAAwB;IACxB,4BAAmC;IACnC,+BAA2B;IAC3B;;;OAGG;IACH,aAAa;IAGf;;OAEG;IACH,YAFW,MAAM,QAYhB;IAED,0CAMC;CACF;AAMM,yCAHI,UAAU,QACV,UAAU,2BAQpB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.test.d.ts deleted file mode 100644 index 6ed6dd5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.test.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function testPolynomialBasics(_tc: t.TestCase): void; -export function testIrreducibleInput(_tc: t.TestCase): void; -export function testIrreducibleSpread(_tc: t.TestCase): void; -export function testGenerateIrreducibles(_tc: t.TestCase): void; -export function testFingerprintCompatiblity(tc: t.TestCase): void; -export function testConflicts(tc: t.TestCase): void; -import * as t from '../testing.js'; -//# sourceMappingURL=rabin.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.test.d.ts.map deleted file mode 100644 index aa81148..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/rabin.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin.test.d.ts","sourceRoot":"","sources":["../../hash/rabin.test.js"],"names":[],"mappings":"AAaO,0CAFI,CAAC,CAAC,QAAQ,QASpB;AAKM,0CAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,2CAFI,CAAC,CAAC,QAAQ,QASpB;AAwBM,8CAFI,CAAC,CAAC,QAAQ,QAyBpB;AAmGM,gDAFI,CAAC,CAAC,QAAQ,QAQpB;AAKM,kCAFI,CAAC,CAAC,QAAQ,QA4BpB;mBAvOkB,eAAe"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.d.ts deleted file mode 100644 index b3014a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function digest(data: Uint8Array): Uint8Array; -//# sourceMappingURL=sha256.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.d.ts.map deleted file mode 100644 index 64428a3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.d.ts","sourceRoot":"","sources":["../../hash/sha256.js"],"names":[],"mappings":"AA+KO,6BAFI,UAAU,2BAEkC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.node.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.node.d.ts deleted file mode 100644 index e5e6591..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.node.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function digest(data: Uint8Array): Buffer; -//# sourceMappingURL=sha256.node.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.node.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.node.d.ts.map deleted file mode 100644 index 6b3af1b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.node.d.ts","sourceRoot":"","sources":["../../hash/sha256.node.js"],"names":[],"mappings":"AAKO,6BAFI,UAAU,2BAMpB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.test.d.ts deleted file mode 100644 index 39fc538..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.test.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function testSelfReferencingHash(_tc: t.TestCase): void; -export function testSha256Basics(_tc: t.TestCase): Promise; -export function testLargeValue(_tc: t.TestCase): Promise; -export function testRepeatSha256Hashing(tc: t.TestCase): Promise; -export function testBenchmarkSha256(_tc: t.TestCase): Promise; -import * as t from '../testing.js'; -//# sourceMappingURL=sha256.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.test.d.ts.map deleted file mode 100644 index 3174ccd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/hash/sha256.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.test.d.ts","sourceRoot":"","sources":["../../hash/sha256.test.js"],"names":[],"mappings":"AAcO,6CAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,iBA2BpB;AAOM,oCAFI,CAAC,CAAC,QAAQ,iBA4BpB;AAKM,4CAFI,CAAC,CAAC,QAAQ,iBAQpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,iBAmDpB;mBAjJkB,eAAe"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.cjs deleted file mode 100644 index 0070288..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.cjs +++ /dev/null @@ -1,99 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var array = require('./array-78849c95.cjs'); -var binary = require('./binary-ac8e39e2.cjs'); -var broadcastchannel = require('./broadcastchannel-aca4f606.cjs'); -var buffer = require('./buffer-3e750729.cjs'); -var conditions = require('./conditions-f5c0c102.cjs'); -var decoding = require('./decoding-76e75827.cjs'); -var diff = require('./diff-9d236524.cjs'); -var dom = require('./dom-7e625b09.cjs'); -var encoding = require('./encoding-1a745c43.cjs'); -var environment = require('./environment-1c97264d.cjs'); -var error = require('./error-0c1f634f.cjs'); -var eventloop = require('./eventloop-a0168106.cjs'); -var _function = require('./function-314580f7.cjs'); -var indexeddb = require('./indexeddb-46d1e737.cjs'); -var iterator = require('./iterator-9fc627c1.cjs'); -var json = require('./json-092190a1.cjs'); -var log = require('lib0/logging'); -var map = require('./map-24d263c0.cjs'); -var math = require('./math-96d5e8c4.cjs'); -var mutex = require('./mutex-63f09c81.cjs'); -var number = require('./number-1fb57bba.cjs'); -var object = require('./object-c0c9435b.cjs'); -var pair = require('./pair-ab022bc3.cjs'); -var prng = require('./prng-37d48618.cjs'); -var promise = require('./promise-cda7b9bb.cjs'); -var set = require('./set-5b47859e.cjs'); -var sort = require('./sort-812cc211.cjs'); -var statistics = require('./statistics-65f6114b.cjs'); -var string = require('./string-fddc5f8b.cjs'); -var symbol = require('./symbol-9c439012.cjs'); -var time = require('./time-d8438852.cjs'); -var tree = require('./tree-9f3c8837.cjs'); -var websocket = require('./websocket-b073d0fc.cjs'); -require('./storage.cjs'); -require('./schema.cjs'); -require('./equality.cjs'); -require('./metric.cjs'); -require('./observable.cjs'); - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var log__namespace = /*#__PURE__*/_interopNamespace(log); - - - -exports.array = array.array; -exports.binary = binary.binary; -exports.broadcastchannel = broadcastchannel.broadcastchannel; -exports.buffer = buffer.buffer; -exports.conditions = conditions.conditions; -exports.decoding = decoding.decoding; -exports.diff = diff.diff; -exports.dom = dom.dom; -exports.encoding = encoding.encoding; -exports.environment = environment.environment; -exports.error = error.error; -exports.eventloop = eventloop.eventloop; -exports.func = _function._function; -exports.indexeddb = indexeddb.indexeddb; -exports.iterator = iterator.iterator; -exports.json = json.json; -exports.logging = log__namespace; -exports.map = map.map$1; -exports.math = math.math; -exports.mutex = mutex.mutex; -exports.number = number.number; -exports.object = object.object; -exports.pair = pair.pair; -exports.prng = prng.prng; -exports.promise = promise.promise; -exports.set = set.set; -exports.sort = sort.sort; -exports.statistics = statistics.statistics; -exports.string = string.string; -exports.symbol = symbol.symbol; -exports.time = time.time; -exports.tree = tree.tree; -exports.websocket = websocket.websocket; -//# sourceMappingURL=index.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.cjs.map deleted file mode 100644 index 76ec6b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.d.ts deleted file mode 100644 index 8aa3ac2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import * as array from './array.js'; -import * as binary from './binary.js'; -import * as broadcastchannel from './broadcastchannel.js'; -import * as buffer from './buffer.js'; -import * as conditions from './conditions.js'; -import * as decoding from './decoding.js'; -import * as diff from './diff.js'; -import * as dom from './dom.js'; -import * as encoding from './encoding.js'; -import * as environment from './environment.js'; -import * as error from './error.js'; -import * as eventloop from './eventloop.js'; -import * as func from './function.js'; -import * as indexeddb from './indexeddb.js'; -import * as iterator from './iterator.js'; -import * as json from './json.js'; -import * as logging from 'lib0/logging'; -import * as map from './map.js'; -import * as math from './math.js'; -import * as mutex from './mutex.js'; -import * as number from './number.js'; -import * as object from './object.js'; -import * as pair from './pair.js'; -import * as prng from './prng.js'; -import * as promise from './promise.js'; -import * as set from './set.js'; -import * as sort from './sort.js'; -import * as statistics from './statistics.js'; -import * as string from './string.js'; -import * as symbol from './symbol.js'; -import * as time from './time.js'; -import * as tree from './tree.js'; -import * as websocket from './websocket.js'; -export { array, binary, broadcastchannel, buffer, conditions, decoding, diff, dom, encoding, environment, error, eventloop, func, indexeddb, iterator, json, logging, map, math, mutex, number, object, pair, prng, promise, set, sort, statistics, string, symbol, time, tree, websocket }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.d.ts.map deleted file mode 100644 index d84038f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":"uBAQuB,YAAY;wBACX,aAAa;kCACH,uBAAuB;wBACjC,aAAa;4BACT,iBAAiB;0BACnB,eAAe;sBACnB,WAAW;qBACZ,UAAU;0BACL,eAAe;6BACZ,kBAAkB;uBACxB,YAAY;2BACR,gBAAgB;sBAErB,eAAe;2BACV,gBAAgB;0BACjB,eAAe;sBACnB,WAAW;yBACR,cAAc;qBAClB,UAAU;sBACT,WAAW;uBACV,YAAY;wBACX,aAAa;wBACb,aAAa;sBACf,WAAW;sBACX,WAAW;yBACR,cAAc;qBAElB,UAAU;sBACT,WAAW;4BACL,iBAAiB;wBACrB,aAAa;wBACb,aAAa;sBAEf,WAAW;sBACX,WAAW;2BACN,gBAAgB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb-46d1e737.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb-46d1e737.cjs deleted file mode 100644 index 8d8fb7d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb-46d1e737.cjs +++ /dev/null @@ -1,311 +0,0 @@ -'use strict'; - -var promise = require('./promise-cda7b9bb.cjs'); -var error = require('./error-0c1f634f.cjs'); - -/* eslint-env browser */ - -/* c8 ignore start */ - -/** - * IDB Request to Promise transformer - * - * @param {IDBRequest} request - * @return {Promise} - */ -const rtop = request => promise.create((resolve, reject) => { - // @ts-ignore - request.onerror = event => reject(new Error(event.target.error)); - // @ts-ignore - request.onsuccess = event => resolve(event.target.result); -}); - -/** - * @param {string} name - * @param {function(IDBDatabase):any} initDB Called when the database is first created - * @return {Promise} - */ -const openDB = (name, initDB) => promise.create((resolve, reject) => { - const request = indexedDB.open(name); - /** - * @param {any} event - */ - request.onupgradeneeded = event => initDB(event.target.result); - /** - * @param {any} event - */ - request.onerror = event => reject(error.create(event.target.error)); - /** - * @param {any} event - */ - request.onsuccess = event => { - /** - * @type {IDBDatabase} - */ - const db = event.target.result; - db.onversionchange = () => { db.close(); }; - resolve(db); - }; -}); - -/** - * @param {string} name - */ -const deleteDB = name => rtop(indexedDB.deleteDatabase(name)); - -/** - * @param {IDBDatabase} db - * @param {Array|Array>} definitions - */ -const createStores = (db, definitions) => definitions.forEach(d => - // @ts-ignore - db.createObjectStore.apply(db, d) -); - -/** - * @param {IDBDatabase} db - * @param {Array} stores - * @param {"readwrite"|"readonly"} [access] - * @return {Array} - */ -const transact = (db, stores, access = 'readwrite') => { - const transaction = db.transaction(stores, access); - return stores.map(store => getStore(transaction, store)) -}; - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange} [range] - * @return {Promise} - */ -const count = (store, range) => - rtop(store.count(range)); - -/** - * @param {IDBObjectStore} store - * @param {String | number | ArrayBuffer | Date | Array } key - * @return {Promise>} - */ -const get = (store, key) => - rtop(store.get(key)); - -/** - * @param {IDBObjectStore} store - * @param {String | number | ArrayBuffer | Date | IDBKeyRange | Array } key - */ -const del = (store, key) => - rtop(store.delete(key)); - -/** - * @param {IDBObjectStore} store - * @param {String | number | ArrayBuffer | Date | boolean} item - * @param {String | number | ArrayBuffer | Date | Array} [key] - */ -const put = (store, item, key) => - rtop(store.put(item, key)); - -/** - * @param {IDBObjectStore} store - * @param {String | number | ArrayBuffer | Date | boolean} item - * @param {String | number | ArrayBuffer | Date | Array} key - * @return {Promise} - */ -const add = (store, item, key) => - rtop(store.add(item, key)); - -/** - * @param {IDBObjectStore} store - * @param {String | number | ArrayBuffer | Date} item - * @return {Promise} Returns the generated key - */ -const addAutoKey = (store, item) => - rtop(store.add(item)); - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange} [range] - * @param {number} [limit] - * @return {Promise>} - */ -const getAll = (store, range, limit) => - rtop(store.getAll(range, limit)); - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange} [range] - * @param {number} [limit] - * @return {Promise>} - */ -const getAllKeys = (store, range, limit) => - rtop(store.getAllKeys(range, limit)); - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange|null} query - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - * @return {Promise} - */ -const queryFirst = (store, query, direction) => { - /** - * @type {any} - */ - let first = null; - return iterateKeys(store, query, key => { - first = key; - return false - }, direction).then(() => first) -}; - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange?} [range] - * @return {Promise} - */ -const getLastKey = (store, range = null) => queryFirst(store, range, 'prev'); - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange?} [range] - * @return {Promise} - */ -const getFirstKey = (store, range = null) => queryFirst(store, range, 'next'); - -/** - * @typedef KeyValuePair - * @type {Object} - * @property {any} k key - * @property {any} v Value - */ - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange} [range] - * @param {number} [limit] - * @return {Promise>} - */ -const getAllKeysValues = (store, range, limit) => - // @ts-ignore - promise.all([getAllKeys(store, range, limit), getAll(store, range, limit)]).then(([ks, vs]) => ks.map((k, i) => ({ k, v: vs[i] }))); - -/** - * @param {any} request - * @param {function(IDBCursorWithValue):void|boolean|Promise} f - * @return {Promise} - */ -const iterateOnRequest = (request, f) => promise.create((resolve, reject) => { - request.onerror = reject; - /** - * @param {any} event - */ - request.onsuccess = async event => { - const cursor = event.target.result; - if (cursor === null || (await f(cursor)) === false) { - return resolve() - } - cursor.continue(); - }; -}); - -/** - * Iterate on keys and values - * @param {IDBObjectStore} store - * @param {IDBKeyRange|null} keyrange - * @param {function(any,any):void|boolean|Promise} f Callback that receives (value, key) - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - */ -const iterate = (store, keyrange, f, direction = 'next') => - iterateOnRequest(store.openCursor(keyrange, direction), cursor => f(cursor.value, cursor.key)); - -/** - * Iterate on the keys (no values) - * - * @param {IDBObjectStore} store - * @param {IDBKeyRange|null} keyrange - * @param {function(any):void|boolean|Promise} f callback that receives the key - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - */ -const iterateKeys = (store, keyrange, f, direction = 'next') => - iterateOnRequest(store.openKeyCursor(keyrange, direction), cursor => f(cursor.key)); - -/** - * Open store from transaction - * @param {IDBTransaction} t - * @param {String} store - * @returns {IDBObjectStore} - */ -const getStore = (t, store) => t.objectStore(store); - -/** - * @param {any} lower - * @param {any} upper - * @param {boolean} lowerOpen - * @param {boolean} upperOpen - */ -const createIDBKeyRangeBound = (lower, upper, lowerOpen, upperOpen) => IDBKeyRange.bound(lower, upper, lowerOpen, upperOpen); - -/** - * @param {any} upper - * @param {boolean} upperOpen - */ -const createIDBKeyRangeUpperBound = (upper, upperOpen) => IDBKeyRange.upperBound(upper, upperOpen); - -/** - * @param {any} lower - * @param {boolean} lowerOpen - */ -const createIDBKeyRangeLowerBound = (lower, lowerOpen) => IDBKeyRange.lowerBound(lower, lowerOpen); - -/* c8 ignore stop */ - -var indexeddb = /*#__PURE__*/Object.freeze({ - __proto__: null, - rtop: rtop, - openDB: openDB, - deleteDB: deleteDB, - createStores: createStores, - transact: transact, - count: count, - get: get, - del: del, - put: put, - add: add, - addAutoKey: addAutoKey, - getAll: getAll, - getAllKeys: getAllKeys, - queryFirst: queryFirst, - getLastKey: getLastKey, - getFirstKey: getFirstKey, - getAllKeysValues: getAllKeysValues, - iterate: iterate, - iterateKeys: iterateKeys, - getStore: getStore, - createIDBKeyRangeBound: createIDBKeyRangeBound, - createIDBKeyRangeUpperBound: createIDBKeyRangeUpperBound, - createIDBKeyRangeLowerBound: createIDBKeyRangeLowerBound -}); - -exports.add = add; -exports.addAutoKey = addAutoKey; -exports.count = count; -exports.createIDBKeyRangeBound = createIDBKeyRangeBound; -exports.createIDBKeyRangeLowerBound = createIDBKeyRangeLowerBound; -exports.createIDBKeyRangeUpperBound = createIDBKeyRangeUpperBound; -exports.createStores = createStores; -exports.del = del; -exports.deleteDB = deleteDB; -exports.get = get; -exports.getAll = getAll; -exports.getAllKeys = getAllKeys; -exports.getAllKeysValues = getAllKeysValues; -exports.getFirstKey = getFirstKey; -exports.getLastKey = getLastKey; -exports.getStore = getStore; -exports.indexeddb = indexeddb; -exports.iterate = iterate; -exports.iterateKeys = iterateKeys; -exports.openDB = openDB; -exports.put = put; -exports.queryFirst = queryFirst; -exports.rtop = rtop; -exports.transact = transact; -//# sourceMappingURL=indexeddb-46d1e737.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb-46d1e737.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb-46d1e737.cjs.map deleted file mode 100644 index 3e9056c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb-46d1e737.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexeddb-46d1e737.cjs","sources":["../indexeddb.js"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * Helpers to work with IndexedDB.\n *\n * @module indexeddb\n */\n\nimport * as promise from './promise.js'\nimport * as error from './error.js'\n\n/* c8 ignore start */\n\n/**\n * IDB Request to Promise transformer\n *\n * @param {IDBRequest} request\n * @return {Promise}\n */\nexport const rtop = request => promise.create((resolve, reject) => {\n // @ts-ignore\n request.onerror = event => reject(new Error(event.target.error))\n // @ts-ignore\n request.onsuccess = event => resolve(event.target.result)\n})\n\n/**\n * @param {string} name\n * @param {function(IDBDatabase):any} initDB Called when the database is first created\n * @return {Promise}\n */\nexport const openDB = (name, initDB) => promise.create((resolve, reject) => {\n const request = indexedDB.open(name)\n /**\n * @param {any} event\n */\n request.onupgradeneeded = event => initDB(event.target.result)\n /**\n * @param {any} event\n */\n request.onerror = event => reject(error.create(event.target.error))\n /**\n * @param {any} event\n */\n request.onsuccess = event => {\n /**\n * @type {IDBDatabase}\n */\n const db = event.target.result\n db.onversionchange = () => { db.close() }\n resolve(db)\n }\n})\n\n/**\n * @param {string} name\n */\nexport const deleteDB = name => rtop(indexedDB.deleteDatabase(name))\n\n/**\n * @param {IDBDatabase} db\n * @param {Array|Array>} definitions\n */\nexport const createStores = (db, definitions) => definitions.forEach(d =>\n // @ts-ignore\n db.createObjectStore.apply(db, d)\n)\n\n/**\n * @param {IDBDatabase} db\n * @param {Array} stores\n * @param {\"readwrite\"|\"readonly\"} [access]\n * @return {Array}\n */\nexport const transact = (db, stores, access = 'readwrite') => {\n const transaction = db.transaction(stores, access)\n return stores.map(store => getStore(transaction, store))\n}\n\n/**\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange} [range]\n * @return {Promise}\n */\nexport const count = (store, range) =>\n rtop(store.count(range))\n\n/**\n * @param {IDBObjectStore} store\n * @param {String | number | ArrayBuffer | Date | Array } key\n * @return {Promise>}\n */\nexport const get = (store, key) =>\n rtop(store.get(key))\n\n/**\n * @param {IDBObjectStore} store\n * @param {String | number | ArrayBuffer | Date | IDBKeyRange | Array } key\n */\nexport const del = (store, key) =>\n rtop(store.delete(key))\n\n/**\n * @param {IDBObjectStore} store\n * @param {String | number | ArrayBuffer | Date | boolean} item\n * @param {String | number | ArrayBuffer | Date | Array} [key]\n */\nexport const put = (store, item, key) =>\n rtop(store.put(item, key))\n\n/**\n * @param {IDBObjectStore} store\n * @param {String | number | ArrayBuffer | Date | boolean} item\n * @param {String | number | ArrayBuffer | Date | Array} key\n * @return {Promise}\n */\nexport const add = (store, item, key) =>\n rtop(store.add(item, key))\n\n/**\n * @param {IDBObjectStore} store\n * @param {String | number | ArrayBuffer | Date} item\n * @return {Promise} Returns the generated key\n */\nexport const addAutoKey = (store, item) =>\n rtop(store.add(item))\n\n/**\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange} [range]\n * @param {number} [limit]\n * @return {Promise>}\n */\nexport const getAll = (store, range, limit) =>\n rtop(store.getAll(range, limit))\n\n/**\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange} [range]\n * @param {number} [limit]\n * @return {Promise>}\n */\nexport const getAllKeys = (store, range, limit) =>\n rtop(store.getAllKeys(range, limit))\n\n/**\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange|null} query\n * @param {'next'|'prev'|'nextunique'|'prevunique'} direction\n * @return {Promise}\n */\nexport const queryFirst = (store, query, direction) => {\n /**\n * @type {any}\n */\n let first = null\n return iterateKeys(store, query, key => {\n first = key\n return false\n }, direction).then(() => first)\n}\n\n/**\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange?} [range]\n * @return {Promise}\n */\nexport const getLastKey = (store, range = null) => queryFirst(store, range, 'prev')\n\n/**\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange?} [range]\n * @return {Promise}\n */\nexport const getFirstKey = (store, range = null) => queryFirst(store, range, 'next')\n\n/**\n * @typedef KeyValuePair\n * @type {Object}\n * @property {any} k key\n * @property {any} v Value\n */\n\n/**\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange} [range]\n * @param {number} [limit]\n * @return {Promise>}\n */\nexport const getAllKeysValues = (store, range, limit) =>\n // @ts-ignore\n promise.all([getAllKeys(store, range, limit), getAll(store, range, limit)]).then(([ks, vs]) => ks.map((k, i) => ({ k, v: vs[i] })))\n\n/**\n * @param {any} request\n * @param {function(IDBCursorWithValue):void|boolean|Promise} f\n * @return {Promise}\n */\nconst iterateOnRequest = (request, f) => promise.create((resolve, reject) => {\n request.onerror = reject\n /**\n * @param {any} event\n */\n request.onsuccess = async event => {\n const cursor = event.target.result\n if (cursor === null || (await f(cursor)) === false) {\n return resolve()\n }\n cursor.continue()\n }\n})\n\n/**\n * Iterate on keys and values\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange|null} keyrange\n * @param {function(any,any):void|boolean|Promise} f Callback that receives (value, key)\n * @param {'next'|'prev'|'nextunique'|'prevunique'} direction\n */\nexport const iterate = (store, keyrange, f, direction = 'next') =>\n iterateOnRequest(store.openCursor(keyrange, direction), cursor => f(cursor.value, cursor.key))\n\n/**\n * Iterate on the keys (no values)\n *\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange|null} keyrange\n * @param {function(any):void|boolean|Promise} f callback that receives the key\n * @param {'next'|'prev'|'nextunique'|'prevunique'} direction\n */\nexport const iterateKeys = (store, keyrange, f, direction = 'next') =>\n iterateOnRequest(store.openKeyCursor(keyrange, direction), cursor => f(cursor.key))\n\n/**\n * Open store from transaction\n * @param {IDBTransaction} t\n * @param {String} store\n * @returns {IDBObjectStore}\n */\nexport const getStore = (t, store) => t.objectStore(store)\n\n/**\n * @param {any} lower\n * @param {any} upper\n * @param {boolean} lowerOpen\n * @param {boolean} upperOpen\n */\nexport const createIDBKeyRangeBound = (lower, upper, lowerOpen, upperOpen) => IDBKeyRange.bound(lower, upper, lowerOpen, upperOpen)\n\n/**\n * @param {any} upper\n * @param {boolean} upperOpen\n */\nexport const createIDBKeyRangeUpperBound = (upper, upperOpen) => IDBKeyRange.upperBound(upper, upperOpen)\n\n/**\n * @param {any} lower\n * @param {boolean} lowerOpen\n */\nexport const createIDBKeyRangeLowerBound = (lower, lowerOpen) => IDBKeyRange.lowerBound(lower, lowerOpen)\n\n/* c8 ignore stop */\n"],"names":["promise.create","error.create","promise.all"],"mappings":";;;;;AAAA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,OAAO,IAAIA,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;AACnE;AACA,EAAE,OAAO,CAAC,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC;AAClE;AACA,EAAE,OAAO,CAAC,SAAS,GAAG,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAC;AAC3D,CAAC,EAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAKA,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;AAC5E,EAAE,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC;AACtC;AACA;AACA;AACA,EAAE,OAAO,CAAC,eAAe,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAC;AAChE;AACA;AACA;AACA,EAAE,OAAO,CAAC,OAAO,GAAG,KAAK,IAAI,MAAM,CAACC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC;AACrE;AACA;AACA;AACA,EAAE,OAAO,CAAC,SAAS,GAAG,KAAK,IAAI;AAC/B;AACA;AACA;AACA,IAAI,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,OAAM;AAClC,IAAI,EAAE,CAAC,eAAe,GAAG,MAAM,E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G,MAAM;AAC9D,EAAE,gBAAgB,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,EAAC;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM;AAClE,EAAE,gBAAgB,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAC;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,WAAW,CAAC,KAAK,EAAC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,sBAAsB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,KAAK,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAC;AACnI;AACA;AACA;AACA;AACA;AACY,MAAC,2BAA2B,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,EAAC;AACzG;AACA;AACA;AACA;AACA;AACY,MAAC,2BAA2B,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,EAAC;AACzG;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.cjs deleted file mode 100644 index 86fca31..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.cjs +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./promise-cda7b9bb.cjs'); -require('./error-0c1f634f.cjs'); -var indexeddb = require('./indexeddb-46d1e737.cjs'); -require('./time-d8438852.cjs'); -require('./metric.cjs'); -require('./math-96d5e8c4.cjs'); - - - -exports.add = indexeddb.add; -exports.addAutoKey = indexeddb.addAutoKey; -exports.count = indexeddb.count; -exports.createIDBKeyRangeBound = indexeddb.createIDBKeyRangeBound; -exports.createIDBKeyRangeLowerBound = indexeddb.createIDBKeyRangeLowerBound; -exports.createIDBKeyRangeUpperBound = indexeddb.createIDBKeyRangeUpperBound; -exports.createStores = indexeddb.createStores; -exports.del = indexeddb.del; -exports.deleteDB = indexeddb.deleteDB; -exports.get = indexeddb.get; -exports.getAll = indexeddb.getAll; -exports.getAllKeys = indexeddb.getAllKeys; -exports.getAllKeysValues = indexeddb.getAllKeysValues; -exports.getFirstKey = indexeddb.getFirstKey; -exports.getLastKey = indexeddb.getLastKey; -exports.getStore = indexeddb.getStore; -exports.iterate = indexeddb.iterate; -exports.iterateKeys = indexeddb.iterateKeys; -exports.openDB = indexeddb.openDB; -exports.put = indexeddb.put; -exports.queryFirst = indexeddb.queryFirst; -exports.rtop = indexeddb.rtop; -exports.transact = indexeddb.transact; -//# sourceMappingURL=indexeddb.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.cjs.map deleted file mode 100644 index 5bfcf7f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexeddb.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.d.ts deleted file mode 100644 index fe7148e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -export function rtop(request: IDBRequest): Promise; -export function openDB(name: string, initDB: (arg0: IDBDatabase) => any): Promise; -export function deleteDB(name: string): Promise; -export function createStores(db: IDBDatabase, definitions: Array | Array>): void; -export function transact(db: IDBDatabase, stores: Array, access?: "readwrite" | "readonly"): Array; -export function count(store: IDBObjectStore, range?: IDBKeyRange): Promise; -export function get(store: IDBObjectStore, key: string | number | ArrayBuffer | Date | Array): Promise>; -export function del(store: IDBObjectStore, key: string | number | ArrayBuffer | Date | IDBKeyRange | Array): Promise; -export function put(store: IDBObjectStore, item: string | number | ArrayBuffer | Date | boolean, key?: string | number | ArrayBuffer | Date | Array): Promise; -export function add(store: IDBObjectStore, item: string | number | ArrayBuffer | Date | boolean, key: string | number | ArrayBuffer | Date | Array): Promise; -export function addAutoKey(store: IDBObjectStore, item: string | number | ArrayBuffer | Date): Promise; -export function getAll(store: IDBObjectStore, range?: IDBKeyRange, limit?: number): Promise>; -export function getAllKeys(store: IDBObjectStore, range?: IDBKeyRange, limit?: number): Promise>; -export function queryFirst(store: IDBObjectStore, query: IDBKeyRange | null, direction: "next" | "prev" | "nextunique" | "prevunique"): Promise; -export function getLastKey(store: IDBObjectStore, range?: IDBKeyRange | null): Promise; -export function getFirstKey(store: IDBObjectStore, range?: IDBKeyRange | null): Promise; -export function getAllKeysValues(store: IDBObjectStore, range?: IDBKeyRange, limit?: number): Promise>; -export function iterate(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any, arg1: any) => void | boolean | Promise, direction?: "next" | "prev" | "nextunique" | "prevunique"): Promise; -export function iterateKeys(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any) => void | boolean | Promise, direction?: "next" | "prev" | "nextunique" | "prevunique"): Promise; -export function getStore(t: IDBTransaction, store: string): IDBObjectStore; -export function createIDBKeyRangeBound(lower: any, upper: any, lowerOpen: boolean, upperOpen: boolean): IDBKeyRange; -export function createIDBKeyRangeUpperBound(upper: any, upperOpen: boolean): IDBKeyRange; -export function createIDBKeyRangeLowerBound(lower: any, lowerOpen: boolean): IDBKeyRange; -export type KeyValuePair = { - /** - * key - */ - k: any; - /** - * Value - */ - v: any; -}; -//# sourceMappingURL=indexeddb.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.d.ts.map deleted file mode 100644 index 3a81bb3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexeddb.d.ts","sourceRoot":"","sources":["../indexeddb.js"],"names":[],"mappings":"AAmBO,8BAHI,UAAU,GACT,OAAO,CAAC,GAAG,CAAC,CAOtB;AAOK,6BAJI,MAAM,UACN,CAAS,IAAW,EAAX,WAAW,KAAE,GAAG,GACxB,OAAO,CAAC,WAAW,CAAC,CAuB9B;AAKK,+BAFI,MAAM,gBAEmD;AAM7D,iCAHI,WAAW,eACX,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,GAAC,KAAK,CAAC,MAAM,GAAC,wBAAwB,GAAC,SAAS,CAAC,CAAC,QAK/E;AAQM,6BALI,WAAW,UACX,KAAK,CAAC,MAAM,CAAC,WACb,WAAW,GAAC,UAAU,GACrB,KAAK,CAAC,cAAc,CAAC,CAKhC;AAOM,6BAJI,cAAc,U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AC,CAE4D;AAe7E,wCALI,cAAc,UACd,WAAW,UACX,MAAM,GACL,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAI6F;AA4B9H,+BALI,cAAc,YACd,WAAW,GAAC,IAAI,KAChB,CAAS,IAAG,EAAH,GAAG,EAAC,IAAG,EAAH,GAAG,KAAE,IAAI,GAAC,OAAO,GAAC,OAAO,CAAC,IAAI,GAAC,OAAO,CAAC,cACpD,MAAM,GAAC,MAAM,GAAC,YAAY,GAAC,YAAY,iBAG8C;AAUzF,mCALI,cAAc,YACd,WAAW,GAAC,IAAI,KAChB,CAAS,IAAG,EAAH,GAAG,KAAE,IAAI,GAAC,OAAO,GAAC,OAAO,CAAC,IAAI,GAAC,OAAO,CAAC,cAChD,MAAM,GAAC,MAAM,GAAC,YAAY,GAAC,YAAY,iBAGmC;AAQ9E,4BAJI,cAAc,kBAEZ,cAAc,CAE+B;AAQnD,8CALI,GAAG,SACH,GAAG,aACH,OAAO,aACP,OAAO,eAEiH;AAM5H,mDAHI,GAAG,aACH,OAAO,eAEuF;AAMlG,mDAHI,GAAG,aACH,OAAO,eAEuF;;;;;OAhF3F,GAAG;;;;OACH,GAAG"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.test.d.ts deleted file mode 100644 index e45d0c9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testRetrieveElements(): Promise; -export function testBlocked(): Promise; -//# sourceMappingURL=indexeddb.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.test.d.ts.map deleted file mode 100644 index ecfbc2d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddb.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexeddb.test.d.ts","sourceRoot":"","sources":["../indexeddb.test.js"],"names":[],"mappings":"AAyBO,sDAoEN;AAGM,6CAWN"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.cjs deleted file mode 100644 index 577e952..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.cjs +++ /dev/null @@ -1,288 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var pledge = require('./pledge.cjs'); -require('./queue.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); - -/* eslint-env browser */ - -/* c8 ignore start */ - -/** - * IDB Request to Pledge transformer - * - * @param {pledge.PledgeInstance} p - * @param {IDBRequest} request - */ -const bindPledge = (p, request) => { - // @ts-ignore - request.onerror = event => p.cancel(event.target.error); - // @ts-ignore - request.onsuccess = event => p.resolve(event.target.result); -}; - -/** - * @param {string} name - * @param {function(IDBDatabase):any} initDB Called when the database is first created - * @return {pledge.PledgeInstance} - */ -const openDB = (name, initDB) => { - /** - * @type {pledge.PledgeInstance} - */ - const p = pledge.create(); - const request = indexedDB.open(name); - /** - * @param {any} event - */ - request.onupgradeneeded = event => initDB(event.target.result); - /** - * @param {any} event - */ - request.onerror = event => p.cancel(event.target.error); - /** - * @param {any} event - */ - request.onsuccess = event => { - /** - * @type {IDBDatabase} - */ - const db = event.target.result; - db.onversionchange = () => { db.close(); }; - p.resolve(db); - }; - return p -}; - -/** - * @param {pledge.Pledge} name - * @return {pledge.PledgeInstance} - */ -const deleteDB = name => pledge.createWithDependencies((p, name) => bindPledge(p, indexedDB.deleteDatabase(name)), name); - -/** - * @param {IDBDatabase} db - * @param {Array|Array>} definitions - */ -const createStores = (db, definitions) => definitions.forEach(d => - // @ts-ignore - db.createObjectStore.apply(db, d) -); - -/** - * @param {pledge.Pledge} db - * @param {pledge.Pledge>} stores - * @param {"readwrite"|"readonly"} [access] - * @return {pledge.Pledge>} - */ -const transact = (db, stores, access = 'readwrite') => pledge.createWithDependencies((p, db, stores) => { - const transaction = db.transaction(stores, access); - p.resolve(stores.map(store => getStore(transaction, store))); -}, db, stores); - -/** - * @param {IDBObjectStore} store - * @param {pledge.Pledge} [range] - * @return {pledge.PledgeInstance} - */ -const count = (store, range) => pledge.createWithDependencies((p, store, range) => bindPledge(p, store.count(range)), store, range); - -/** - * @param {pledge.Pledge} store - * @param {pledge.Pledge>} key - * @return {pledge.PledgeInstance>} - */ -const get = (store, key) => pledge.createWithDependencies((p, store, key) => bindPledge(p, store.get(key)), store, key); - -/** - * @param {pledge.Pledge} store - * @param {String | number | ArrayBuffer | Date | IDBKeyRange | Array } key - */ -const del = (store, key) => pledge.createWithDependencies((p, store, key) => bindPledge(p, store.delete(key)), store, key); - -/** - * @param {pledge.Pledge} store - * @param {String | number | ArrayBuffer | Date | boolean} item - * @param {String | number | ArrayBuffer | Date | Array} [key] - */ -const put = (store, item, key) => pledge.createWithDependencies((p, store, item, key) => bindPledge(p, store.put(item, key)), store, item, key); - -/** - * @param {pledge.Pledge} store - * @param {String | number | ArrayBuffer | Date | boolean} item - * @param {String | number | ArrayBuffer | Date | Array} key - * @return {pledge.PledgeInstance} - */ -const add = (store, item, key) => pledge.createWithDependencies((p, store, item, key) => bindPledge(p, store.add(item, key)), store, item, key); - -/** - * @param {pledge.Pledge} store - * @param {String | number | ArrayBuffer | Date} item - * @return {pledge.PledgeInstance} Returns the generated key - */ -const addAutoKey = (store, item) => pledge.createWithDependencies((p, store, item) => bindPledge(p, store.add(item)), store, item); - -/** - * @param {pledge.Pledge} store - * @param {IDBKeyRange} [range] - * @param {number} [limit] - * @return {pledge.PledgeInstance>} - */ -const getAll = (store, range, limit) => pledge.createWithDependencies((p, store, range, limit) => bindPledge(p, store.getAll(range, limit)), store, range, limit); - -/** - * @param {pledge.Pledge} store - * @param {IDBKeyRange} [range] - * @param {number} [limit] - * @return {pledge.PledgeInstance>} - */ -const getAllKeys = (store, range, limit) => pledge.createWithDependencies((p, store, range, limit) => bindPledge(p, store.getAllKeys(range, limit)), store, range, limit); - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange|null} query - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - * @return {pledge.PledgeInstance} - */ -const queryFirst = (store, query, direction) => { - /** - * @type {any} - */ - let first = null; - return iterateKeys(store, query, key => { - first = key; - return false - }, direction).map(() => first) -}; - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange?} [range] - * @return {pledge.PledgeInstance} - */ -const getLastKey = (store, range = null) => queryFirst(store, range, 'prev'); - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange?} [range] - * @return {pledge.PledgeInstance} - */ -const getFirstKey = (store, range = null) => queryFirst(store, range, 'next'); - -/** - * @typedef KeyValuePair - * @type {Object} - * @property {any} k key - * @property {any} v Value - */ - -/** - * @param {pledge.Pledge} store - * @param {pledge.Pledge} [range] - * @param {pledge.Pledge} [limit] - * @return {pledge.PledgeInstance>} - */ -const getAllKeysValues = (store, range, limit) => pledge.createWithDependencies((p, store, range, limit) => { - pledge.all([getAllKeys(store, range, limit), getAll(store, range, limit)]).map(([ks, vs]) => ks.map((k, i) => ({ k, v: vs[i] }))).whenResolved(p.resolve.bind(p)); -}, store, range, limit); - -/** - * @param {pledge.PledgeInstance} p - * @param {any} request - * @param {function(IDBCursorWithValue):void|boolean|Promise} f - */ -const iterateOnRequest = (p, request, f) => { - request.onerror = p.cancel.bind(p); - /** - * @param {any} event - */ - request.onsuccess = async event => { - const cursor = event.target.result; - if (cursor === null || (await f(cursor)) === false) { - p.resolve(undefined); - return - } - cursor.continue(); - }; -}; - -/** - * Iterate on keys and values - * @param {pledge.Pledge} store - * @param {pledge.Pledge} keyrange - * @param {function(any,any):void|boolean|Promise} f Callback that receives (value, key) - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - */ -const iterate = (store, keyrange, f, direction = 'next') => pledge.createWithDependencies((p, store, keyrange) => { - iterateOnRequest(p, store.openCursor(keyrange, direction), cursor => f(cursor.value, cursor.key)); -}, store, keyrange); - -/** - * Iterate on the keys (no values) - * - * @param {pledge.Pledge} store - * @param {pledge.Pledge} keyrange - * @param {function(any):void|boolean|Promise} f callback that receives the key - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - */ -const iterateKeys = (store, keyrange, f, direction = 'next') => pledge.createWithDependencies((p, store, keyrange) => { - iterateOnRequest(p, store.openKeyCursor(keyrange, direction), cursor => f(cursor.key)); -}, store, keyrange); - -/** - * Open store from transaction - * @param {IDBTransaction} t - * @param {String} store - * @returns {IDBObjectStore} - */ -const getStore = (t, store) => t.objectStore(store); - -/** - * @param {any} lower - * @param {any} upper - * @param {boolean} lowerOpen - * @param {boolean} upperOpen - */ -const createIDBKeyRangeBound = (lower, upper, lowerOpen, upperOpen) => IDBKeyRange.bound(lower, upper, lowerOpen, upperOpen); - -/** - * @param {any} upper - * @param {boolean} upperOpen - */ -const createIDBKeyRangeUpperBound = (upper, upperOpen) => IDBKeyRange.upperBound(upper, upperOpen); - -/** - * @param {any} lower - * @param {boolean} lowerOpen - */ -const createIDBKeyRangeLowerBound = (lower, lowerOpen) => IDBKeyRange.lowerBound(lower, lowerOpen); - -/* c8 ignore stop */ - -exports.add = add; -exports.addAutoKey = addAutoKey; -exports.bindPledge = bindPledge; -exports.count = count; -exports.createIDBKeyRangeBound = createIDBKeyRangeBound; -exports.createIDBKeyRangeLowerBound = createIDBKeyRangeLowerBound; -exports.createIDBKeyRangeUpperBound = createIDBKeyRangeUpperBound; -exports.createStores = createStores; -exports.del = del; -exports.deleteDB = deleteDB; -exports.get = get; -exports.getAll = getAll; -exports.getAllKeys = getAllKeys; -exports.getAllKeysValues = getAllKeysValues; -exports.getFirstKey = getFirstKey; -exports.getLastKey = getLastKey; -exports.getStore = getStore; -exports.iterate = iterate; -exports.iterateKeys = iterateKeys; -exports.openDB = openDB; -exports.put = put; -exports.queryFirst = queryFirst; -exports.transact = transact; -//# sourceMappingURL=indexeddbV2.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.cjs.map deleted file mode 100644 index b3e94a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexeddbV2.cjs","sources":["../indexeddbV2.js"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * Helpers to work with IndexedDB.\n * This is an experimental implementation using Pledge instead of Promise.\n *\n * @experimental\n *\n * @module indexeddbv2\n */\n\nimport * as pledge from './pledge.js'\n\n/* c8 ignore start */\n\n/**\n * IDB Request to Pledge transformer\n *\n * @param {pledge.PledgeInstance} p\n * @param {IDBRequest} request\n */\nexport const bindPledge = (p, request) => {\n // @ts-ignore\n request.onerror = event => p.cancel(event.target.error)\n // @ts-ignore\n request.onsuccess = event => p.resolve(event.target.result)\n}\n\n/**\n * @param {string} name\n * @param {function(IDBDatabase):any} initDB Called when the database is first created\n * @return {pledge.PledgeInstance}\n */\nexport const openDB = (name, initDB) => {\n /**\n * @type {pledge.PledgeInstance}\n */\n const p = pledge.create()\n const request = indexedDB.open(name)\n /**\n * @param {any} event\n */\n request.onupgradeneeded = event => initDB(event.target.result)\n /**\n * @param {any} event\n */\n request.onerror = event => p.cancel(event.target.error)\n /**\n * @param {any} event\n */\n request.onsuccess = event => {\n /**\n * @type {IDBDatabase}\n */\n const db = event.target.result\n db.onversionchange = () => { db.close() }\n p.resolve(db)\n }\n return p\n}\n\n/**\n * @param {pledge.Pledge} name\n * @return {pledge.PledgeInstance}\n */\nexport const deleteDB = name => pledge.createWithDependencies((p, name) => bindPledge(p, indexedDB.deleteDatabase(name)), name)\n\n/**\n * @param {IDBDatabase} db\n * @param {Array|Array>} definitions\n */\nexport const createStores = (db, definitions) => definitions.forEach(d =>\n // @ts-ignore\n db.createObjectStore.apply(db, d)\n)\n\n/**\n * @param {pledge.Pledge} db\n * @param {pledge.Pledge>} stores\n * @param {\"readwrite\"|\"readonly\"} [access]\n * @return {pledge.Pledge>}\n */\nexport const transact = (db, stores, access = 'readwrite') => pledge.createWithDependencies((p, db, stores) => {\n const transaction = db.transaction(stores, access)\n p.resolve(stores.map(store => getStore(transaction, store)))\n}, db, stores)\n\n/**\n * @param {IDBObjectStore} store\n * @param {pledge.Pledge} [range]\n * @return {pledge.PledgeInstance}\n */\nexport const count = (store, range) => pledge.createWithDependencies((p, store, range) => bindPledge(p, store.count(range)), store, range)\n\n/**\n * @param {pledge.Pledge} store\n * @param {pledge.Pledge>} key\n * @return {pledge.PledgeInstance>}\n */\nexport const get = (store, key) => pledge.createWithDependencies((p, store, key) => bindPledge(p, store.get(key)), store, key)\n\n/**\n * @param {pledge.Pledge} store\n * @param {String | number | ArrayBuffer | Date | IDBKeyRange | Array } key\n */\nexport const del = (store, key) => pledge.createWithDependencies((p, store, key) => bindPledge(p, store.delete(key)), store, key)\n\n/**\n * @param {pledge.Pledge} store\n * @param {String | number | ArrayBuffer | Date | boolean} item\n * @param {String | number | ArrayBuffer | Date | Array} [key]\n */\nexport const put = (store, item, key) => pledge.createWithDependencies((p, store, item, key) => bindPledge(p, store.put(item, key)), store, item, key)\n\n/**\n * @param {pledge.Pledge} store\n * @param {String | number | ArrayBuffer | Date | boolean} item\n * @param {String | number | ArrayBuffer | Date | Array} key\n * @return {pledge.PledgeInstance}\n */\nexport const add = (store, item, key) => pledge.createWithDependencies((p, store, item, key) => bindPledge(p, store.add(item, key)), store, item, key)\n\n/**\n * @param {pledge.Pledge} store\n * @param {String | number | ArrayBuffer | Date} item\n * @return {pledge.PledgeInstance} Returns the generated key\n */\nexport const addAutoKey = (store, item) => pledge.createWithDependencies((p, store, item) => bindPledge(p, store.add(item)), store, item)\n\n/**\n * @param {pledge.Pledge} store\n * @param {IDBKeyRange} [range]\n * @param {number} [limit]\n * @return {pledge.PledgeInstance>}\n */\nexport const getAll = (store, range, limit) => pledge.createWithDependencies((p, store, range, limit) => bindPledge(p, store.getAll(range, limit)), store, range, limit)\n\n/**\n * @param {pledge.Pledge} store\n * @param {IDBKeyRange} [range]\n * @param {number} [limit]\n * @return {pledge.PledgeInstance>}\n */\nexport const getAllKeys = (store, range, limit) => pledge.createWithDependencies((p, store, range, limit) => bindPledge(p, store.getAllKeys(range, limit)), store, range, limit)\n\n/**\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange|null} query\n * @param {'next'|'prev'|'nextunique'|'prevunique'} direction\n * @return {pledge.PledgeInstance}\n */\nexport const queryFirst = (store, query, direction) => {\n /**\n * @type {any}\n */\n let first = null\n return iterateKeys(store, query, key => {\n first = key\n return false\n }, direction).map(() => first)\n}\n\n/**\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange?} [range]\n * @return {pledge.PledgeInstance}\n */\nexport const getLastKey = (store, range = null) => queryFirst(store, range, 'prev')\n\n/**\n * @param {IDBObjectStore} store\n * @param {IDBKeyRange?} [range]\n * @return {pledge.PledgeInstance}\n */\nexport const getFirstKey = (store, range = null) => queryFirst(store, range, 'next')\n\n/**\n * @typedef KeyValuePair\n * @type {Object}\n * @property {any} k key\n * @property {any} v Value\n */\n\n/**\n * @param {pledge.Pledge} store\n * @param {pledge.Pledge} [range]\n * @param {pledge.Pledge} [limit]\n * @return {pledge.PledgeInstance>}\n */\nexport const getAllKeysValues = (store, range, limit) => pledge.createWithDependencies((p, store, range, limit) => {\n pledge.all([getAllKeys(store, range, limit), getAll(store, range, limit)]).map(([ks, vs]) => ks.map((k, i) => ({ k, v: vs[i] }))).whenResolved(p.resolve.bind(p))\n}, store, range, limit)\n\n/**\n * @param {pledge.PledgeInstance} p\n * @param {any} request\n * @param {function(IDBCursorWithValue):void|boolean|Promise} f\n */\nconst iterateOnRequest = (p, request, f) => {\n request.onerror = p.cancel.bind(p)\n /**\n * @param {any} event\n */\n request.onsuccess = async event => {\n const cursor = event.target.result\n if (cursor === null || (await f(cursor)) === false) {\n p.resolve(undefined)\n return\n }\n cursor.continue()\n }\n}\n\n/**\n * Iterate on keys and values\n * @param {pledge.Pledge} store\n * @param {pledge.Pledge} keyrange\n * @param {function(any,any):void|boolean|Promise} f Callback that receives (value, key)\n * @param {'next'|'prev'|'nextunique'|'prevunique'} direction\n */\nexport const iterate = (store, keyrange, f, direction = 'next') => pledge.createWithDependencies((p, store, keyrange) => {\n iterateOnRequest(p, store.openCursor(keyrange, direction), cursor => f(cursor.value, cursor.key))\n}, store, keyrange)\n\n/**\n * Iterate on the keys (no values)\n *\n * @param {pledge.Pledge} store\n * @param {pledge.Pledge} keyrange\n * @param {function(any):void|boolean|Promise} f callback that receives the key\n * @param {'next'|'prev'|'nextunique'|'prevunique'} direction\n */\nexport const iterateKeys = (store, keyrange, f, direction = 'next') => pledge.createWithDependencies((p, store, keyrange) => {\n iterateOnRequest(p, store.openKeyCursor(keyrange, direction), cursor => f(cursor.key))\n}, store, keyrange)\n\n/**\n * Open store from transaction\n * @param {IDBTransaction} t\n * @param {String} store\n * @returns {IDBObjectStore}\n */\nexport const getStore = (t, store) => t.objectStore(store)\n\n/**\n * @param {any} lower\n * @param {any} upper\n * @param {boolean} lowerOpen\n * @param {boolean} upperOpen\n */\nexport const createIDBKeyRangeBound = (lower, upper, lowerOpen, upperOpen) => IDBKeyRange.bound(lower, upper, lowerOpen, upperOpen)\n\n/**\n * @param {any} upper\n * @param {boolean} upperOpen\n */\nexport const createIDBKeyRangeUpperBound = (upper, upperOpen) => IDBKeyRange.upperBound(upper, upperOpen)\n\n/**\n * @param {any} lower\n * @param {boolean} lowerOpen\n */\nexport const createIDBKeyRangeLowerBound = (lower, lowerOpen) => IDBKeyRange.lowerBound(lower, lowerOpen)\n\n/* c8 ignore stop */\n"],"names":["pledge.create","pledge.createWithDependencies","pledge.all"],"mappings":";;;;;;;;;AAAA;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,UAAU,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK;AAC1C;AACA,EAAE,OAAO,CAAC,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAC;AACzD;AACA,EAAE,OAAO,CAAC,SAAS,GAAG,KAAK,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAC;AAC7D,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK;AACxC;AACA;AACA;AACA,EAAE,MAAM,CAAC,GAAGA,aAAa,GAAE;AAC3B,EAAE,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC;AACtC;AACA;AACA;AACA,EAAE,OAAO,CAAC,eAAe,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAC;AAChE;AACA;AACA;AACA,EAAE,OAAO,CAAC,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAC;AACzD;AACA;AACA;AACA,EAAE,OAAO,CAAC,SAAS,GAAG,KAAK,IAAI;AAC/B;AACA;AACA;AACA,IAAI,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,OAAM;AAClC,IAAI,EAAE,CAAC,eAAe,GAAG,MAAM,EAAE,EAAE,CAAC,KAAK,GAAE,GAAE;AAC7C,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,EAAC;AACjB,IAAG;AACH,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;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.d.ts deleted file mode 100644 index 0b104d9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export function bindPledge(p: pledge.PledgeInstance, request: IDBRequest): void; -export function openDB(name: string, initDB: (arg0: IDBDatabase) => any): pledge.PledgeInstance; -export function deleteDB(name: pledge.Pledge): pledge.PledgeInstance; -export function createStores(db: IDBDatabase, definitions: Array | Array>): void; -export function transact(db: pledge.Pledge, stores: pledge.Pledge>, access?: "readwrite" | "readonly"): pledge.Pledge>; -export function count(store: IDBObjectStore, range?: pledge.Pledge): pledge.PledgeInstance; -export function get(store: pledge.Pledge, key: pledge.Pledge>): pledge.PledgeInstance>; -export function del(store: pledge.Pledge, key: string | number | ArrayBuffer | Date | IDBKeyRange | Array): pledge.PledgeInstance; -export function put(store: pledge.Pledge, item: string | number | ArrayBuffer | Date | boolean, key?: string | number | ArrayBuffer | Date | Array): pledge.PledgeInstance; -export function add(store: pledge.Pledge, item: string | number | ArrayBuffer | Date | boolean, key: string | number | ArrayBuffer | Date | Array): pledge.PledgeInstance; -export function addAutoKey(store: pledge.Pledge, item: string | number | ArrayBuffer | Date): pledge.PledgeInstance; -export function getAll(store: pledge.Pledge, range?: IDBKeyRange, limit?: number): pledge.PledgeInstance>; -export function getAllKeys(store: pledge.Pledge, range?: IDBKeyRange, limit?: number): pledge.PledgeInstance>; -export function queryFirst(store: IDBObjectStore, query: IDBKeyRange | null, direction: "next" | "prev" | "nextunique" | "prevunique"): pledge.PledgeInstance; -export function getLastKey(store: IDBObjectStore, range?: IDBKeyRange | null): pledge.PledgeInstance; -export function getFirstKey(store: IDBObjectStore, range?: IDBKeyRange | null): pledge.PledgeInstance; -export function getAllKeysValues(store: pledge.Pledge, range?: pledge.Pledge, limit?: pledge.Pledge): pledge.PledgeInstance>; -export function iterate(store: pledge.Pledge, keyrange: pledge.Pledge, f: (arg0: any, arg1: any) => void | boolean | Promise, direction?: "next" | "prev" | "nextunique" | "prevunique"): pledge.PledgeInstance; -export function iterateKeys(store: pledge.Pledge, keyrange: pledge.Pledge, f: (arg0: any) => void | boolean | Promise, direction?: "next" | "prev" | "nextunique" | "prevunique"): pledge.PledgeInstance; -export function getStore(t: IDBTransaction, store: string): IDBObjectStore; -export function createIDBKeyRangeBound(lower: any, upper: any, lowerOpen: boolean, upperOpen: boolean): IDBKeyRange; -export function createIDBKeyRangeUpperBound(upper: any, upperOpen: boolean): IDBKeyRange; -export function createIDBKeyRangeLowerBound(lower: any, lowerOpen: boolean): IDBKeyRange; -export type KeyValuePair = { - /** - * key - */ - k: any; - /** - * Value - */ - v: any; -}; -import * as pledge from './pledge.js'; -//# sourceMappingURL=indexeddbV2.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.d.ts.map deleted file mode 100644 index b1abe0f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexeddbV2.d.ts","sourceRoot":"","sources":["../indexeddbV2.js"],"names":[],"mappings":"AAqBO,8BAHI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,WAC1B,UAAU,QAOpB;AAOM,6BAJI,MAAM,UACN,CAAS,IAAW,EAAX,WAAW,KAAE,GAAG,GACxB,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CA4B7C;AAMM,+BAHI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GACpB,M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O,GAAC,OAAO,CAAC,IAAI,GAAC,OAAO,CAAC,cACpD,MAAM,GAAC,MAAM,GAAC,YAAY,GAAC,YAAY,qCAI/B;AAUZ,mCALI,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,YAC7B,MAAM,CAAC,MAAM,CAAC,WAAW,GAAC,IAAI,CAAC,KAC/B,CAAS,IAAG,EAAH,GAAG,KAAE,IAAI,GAAC,OAAO,GAAC,OAAO,CAAC,IAAI,GAAC,OAAO,CAAC,cAChD,MAAM,GAAC,MAAM,GAAC,YAAY,GAAC,YAAY,qCAI/B;AAQZ,4BAJI,cAAc,kBAEZ,cAAc,CAE+B;AAQnD,8CALI,GAAG,SACH,GAAG,aACH,OAAO,aACP,OAAO,eAEiH;AAM5H,mDAHI,GAAG,aACH,OAAO,eAEuF;AAMlG,mDAHI,GAAG,aACH,OAAO,eAEuF;;;;;OAnF3F,GAAG;;;;OACH,GAAG;;wBAzKO,aAAa"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.test.d.ts deleted file mode 100644 index c61e1a6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testRetrieveElements(): Promise; -export function testBlocked(): Promise; -//# sourceMappingURL=indexeddbV2.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.test.d.ts.map deleted file mode 100644 index d90b7c6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/indexeddbV2.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexeddbV2.test.d.ts","sourceRoot":"","sources":["../indexeddbV2.test.js"],"names":[],"mappings":"AA0BO,sDAoEN;AAGM,6CAgBN"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/isomorphic.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/isomorphic.cjs deleted file mode 100644 index 4663b38..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/isomorphic.cjs +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var isomorphic_js = require('isomorphic.js'); - - - -Object.defineProperty(exports, 'cryptoRandomBuffer', { - enumerable: true, - get: function () { return isomorphic_js.cryptoRandomBuffer; } -}); -Object.defineProperty(exports, 'performance', { - enumerable: true, - get: function () { return isomorphic_js.performance; } -}); -//# sourceMappingURL=isomorphic.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/isomorphic.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/isomorphic.cjs.map deleted file mode 100644 index 76549af..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/isomorphic.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isomorphic.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator-9fc627c1.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator-9fc627c1.cjs deleted file mode 100644 index 96af2b9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator-9fc627c1.cjs +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -/** - * Utility module to create and manipulate Iterators. - * - * @module iterator - */ - -/** - * @template T,R - * @param {Iterator} iterator - * @param {function(T):R} f - * @return {IterableIterator} - */ -const mapIterator = (iterator, f) => ({ - [Symbol.iterator] () { - return this - }, - // @ts-ignore - next () { - const r = iterator.next(); - return { value: r.done ? undefined : f(r.value), done: r.done } - } -}); - -/** - * @template T - * @param {function():IteratorResult} next - * @return {IterableIterator} - */ -const createIterator = next => ({ - /** - * @return {IterableIterator} - */ - [Symbol.iterator] () { - return this - }, - // @ts-ignore - next -}); - -/** - * @template T - * @param {Iterator} iterator - * @param {function(T):boolean} filter - */ -const iteratorFilter = (iterator, filter) => createIterator(() => { - let res; - do { - res = iterator.next(); - } while (!res.done && !filter(res.value)) - return res -}); - -/** - * @template T,M - * @param {Iterator} iterator - * @param {function(T):M} fmap - */ -const iteratorMap = (iterator, fmap) => createIterator(() => { - const { done, value } = iterator.next(); - return { done, value: done ? undefined : fmap(value) } -}); - -var iterator = /*#__PURE__*/Object.freeze({ - __proto__: null, - mapIterator: mapIterator, - createIterator: createIterator, - iteratorFilter: iteratorFilter, - iteratorMap: iteratorMap -}); - -exports.createIterator = createIterator; -exports.iterator = iterator; -exports.iteratorFilter = iteratorFilter; -exports.iteratorMap = iteratorMap; -exports.mapIterator = mapIterator; -//# sourceMappingURL=iterator-9fc627c1.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator-9fc627c1.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator-9fc627c1.cjs.map deleted file mode 100644 index 39a3ded..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator-9fc627c1.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterator-9fc627c1.cjs","sources":["../iterator.js"],"sourcesContent":["/**\n * Utility module to create and manipulate Iterators.\n *\n * @module iterator\n */\n\n/**\n * @template T,R\n * @param {Iterator} iterator\n * @param {function(T):R} f\n * @return {IterableIterator}\n */\nexport const mapIterator = (iterator, f) => ({\n [Symbol.iterator] () {\n return this\n },\n // @ts-ignore\n next () {\n const r = iterator.next()\n return { value: r.done ? undefined : f(r.value), done: r.done }\n }\n})\n\n/**\n * @template T\n * @param {function():IteratorResult} next\n * @return {IterableIterator}\n */\nexport const createIterator = next => ({\n /**\n * @return {IterableIterator}\n */\n [Symbol.iterator] () {\n return this\n },\n // @ts-ignore\n next\n})\n\n/**\n * @template T\n * @param {Iterator} iterator\n * @param {function(T):boolean} filter\n */\nexport const iteratorFilter = (iterator, filter) => createIterator(() => {\n let res\n do {\n res = iterator.next()\n } while (!res.done && !filter(res.value))\n return res\n})\n\n/**\n * @template T,M\n * @param {Iterator} iterator\n * @param {function(T):M} fmap\n */\nexport const iteratorMap = (iterator, fmap) => createIterator(() => {\n const { done, value } = iterator.next()\n return { done, value: done ? undefined : fmap(value) }\n})\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,CAAC,QAAQ,EAAE,CAAC,MAAM;AAC7C,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG;AACvB,IAAI,OAAO,IAAI;AACf,GAAG;AACH;AACA,EAAE,IAAI,CAAC,GAAG;AACV,IAAI,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,GAAE;AAC7B,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;AACnE,GAAG;AACH,CAAC,EAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,cAAc,GAAG,IAAI,KAAK;AACvC;AACA;AACA;AACA,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG;AACvB,IAAI,OAAO,IAAI;AACf,GAAG;AACH;AACA,EAAE,IAAI;AACN,CAAC,EAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,cAAc,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,CAAC,MAAM;AACzE,EAAE,IAAI,IAAG;AACT,EAAE,GAAG;AACL,IAAI,GAAG,GAAG,QAAQ,CAAC,IAAI,GAAE;AACzB,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC3C,EAAE,OAAO,GAAG;AACZ,CAAC,EAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,CAAC,QAAQ,EAAE,IAAI,KAAK,cAAc,CAAC,MAAM;AACpE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,IAAI,GAAE;AACzC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE;AACxD,CAAC;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.cjs deleted file mode 100644 index f09575e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.cjs +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var iterator = require('./iterator-9fc627c1.cjs'); - - - -exports.createIterator = iterator.createIterator; -exports.iteratorFilter = iterator.iteratorFilter; -exports.iteratorMap = iterator.iteratorMap; -exports.mapIterator = iterator.mapIterator; -//# sourceMappingURL=iterator.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.cjs.map deleted file mode 100644 index 298b3d0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterator.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.d.ts deleted file mode 100644 index 91a2024..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function mapIterator(iterator: Iterator, f: (arg0: T) => R): IterableIterator; -export function createIterator(next: () => IteratorResult): IterableIterator; -export function iteratorFilter(iterator: Iterator, filter: (arg0: T) => boolean): IterableIterator; -export function iteratorMap(iterator: Iterator, fmap: (arg0: T) => M): IterableIterator; -//# sourceMappingURL=iterator.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.d.ts.map deleted file mode 100644 index 2529860..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/iterator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterator.d.ts","sourceRoot":"","sources":["../iterator.js"],"names":[],"mappings":"AAYO,4BALM,CAAC,EAAC,CAAC,YACL,QAAQ,CAAC,CAAC,CAAC,KACX,CAAS,IAAC,EAAD,CAAC,KAAE,CAAC,GACZ,gBAAgB,CAAC,CAAC,CAAC,CAW7B;AAOK,+BAJM,CAAC,QACH,MAAW,cAAc,CAAC,CAAC,CAAC,GAC3B,gBAAgB,CAAC,CAAC,CAAC,CAW7B;AAOK,+BAJM,CAAC,YACH,QAAQ,CAAC,CAAC,CAAC,UACX,CAAS,IAAC,EAAD,CAAC,KAAE,OAAO,uBAQ5B;AAOK,4BAJM,CAAC,EAAC,CAAC,YACL,QAAQ,CAAC,CAAC,CAAC,QACX,CAAS,IAAC,EAAD,CAAC,KAAE,CAAC,mCAKtB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json-092190a1.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json-092190a1.cjs deleted file mode 100644 index c68df3c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json-092190a1.cjs +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -/** - * JSON utility functions. - * - * @module json - */ - -/** - * Transform JavaScript object to JSON. - * - * @param {any} object - * @return {string} - */ -const stringify = JSON.stringify; - -/** - * Parse JSON object. - * - * @param {string} json - * @return {any} - */ -const parse = JSON.parse; - -var json = /*#__PURE__*/Object.freeze({ - __proto__: null, - stringify: stringify, - parse: parse -}); - -exports.json = json; -exports.parse = parse; -exports.stringify = stringify; -//# sourceMappingURL=json-092190a1.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json-092190a1.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json-092190a1.cjs.map deleted file mode 100644 index a1f913e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json-092190a1.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"json-092190a1.cjs","sources":["../json.js"],"sourcesContent":["/**\n * JSON utility functions.\n *\n * @module json\n */\n\n/**\n * Transform JavaScript object to JSON.\n *\n * @param {any} object\n * @return {string}\n */\nexport const stringify = JSON.stringify\n\n/**\n * Parse JSON object.\n *\n * @param {string} json\n * @return {any}\n */\nexport const parse = JSON.parse\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,IAAI,CAAC,UAAS;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,KAAK,GAAG,IAAI,CAAC;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.cjs deleted file mode 100644 index e660d4b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.cjs +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var json = require('./json-092190a1.cjs'); - - - -exports.parse = json.parse; -exports.stringify = json.stringify; -//# sourceMappingURL=json.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.cjs.map deleted file mode 100644 index c3dabfb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.d.ts deleted file mode 100644 index 146362c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * JSON utility functions. - * - * @module json - */ -/** - * Transform JavaScript object to JSON. - * - * @param {any} object - * @return {string} - */ -export const stringify: { - (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - (value: any, replacer?: (number | string)[] | null, space?: string | number): string; -}; -/** - * Parse JSON object. - * - * @param {string} json - * @return {any} - */ -export const parse: (text: string, reviver?: (this: any, key: string, value: any) => any) => any; -//# sourceMappingURL=json.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.d.ts.map deleted file mode 100644 index dce94de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/json.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../json.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH;;;EAAuC;AAEvC;;;;;GAKG;AACH,iGAA+B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/jwt.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/jwt.cjs deleted file mode 100644 index f0c4172..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/jwt.cjs +++ /dev/null @@ -1,96 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var error = require('./error-0c1f634f.cjs'); -var buffer = require('./buffer-3e750729.cjs'); -var string = require('./string-fddc5f8b.cjs'); -var json = require('./json-092190a1.cjs'); -var ecdsa = require('./ecdsa.cjs'); -var time = require('./time-d8438852.cjs'); -require('./environment-1c97264d.cjs'); -require('./map-24d263c0.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./math-96d5e8c4.cjs'); -require('./encoding-1a745c43.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./decoding-76e75827.cjs'); -require('lib0/webcrypto'); -require('./common.cjs'); -require('./metric.cjs'); - -/** - * @param {Object} data - */ -const _stringify = data => buffer.toBase64UrlEncoded(string.encodeUtf8(json.stringify(data))); - -/** - * @param {string} base64url - */ -const _parse = base64url => json.parse(string.decodeUtf8(buffer.fromBase64UrlEncoded(base64url))); - -/** - * @param {CryptoKey} privateKey - * @param {Object} payload - */ -const encodeJwt = (privateKey, payload) => { - const { name: algName, namedCurve: algCurve } = /** @type {any} */ (privateKey.algorithm); - /* c8 ignore next 3 */ - if (algName !== 'ECDSA' || algCurve !== 'P-384') { - error.unexpectedCase(); - } - const header = { - alg: 'ES384', - typ: 'JWT' - }; - const jwt = _stringify(header) + '.' + _stringify(payload); - return ecdsa.sign(privateKey, string.encodeUtf8(jwt)).then(signature => - jwt + '.' + buffer.toBase64UrlEncoded(signature) - ) -}; - -/** - * @param {CryptoKey} publicKey - * @param {string} jwt - */ -const verifyJwt = async (publicKey, jwt) => { - const [headerBase64, payloadBase64, signatureBase64] = jwt.split('.'); - const verified = await ecdsa.verify(publicKey, buffer.fromBase64UrlEncoded(signatureBase64), string.encodeUtf8(headerBase64 + '.' + payloadBase64)); - /* c8 ignore next 3 */ - if (!verified) { - throw new Error('Invalid JWT') - } - const payload = _parse(payloadBase64); - if (payload.exp != null && time.getUnixTime() > payload.exp) { - throw new Error('Expired JWT') - } - return { - header: _parse(headerBase64), - payload - } -}; - -/** - * Decode a jwt without verifying it. Probably a bad idea to use this. Only use if you know the jwt was already verified! - * - * @param {string} jwt - */ -const unsafeDecode = jwt => { - const [headerBase64, payloadBase64] = jwt.split('.'); - return { - header: _parse(headerBase64), - payload: _parse(payloadBase64) - } -}; - -exports.encodeJwt = encodeJwt; -exports.unsafeDecode = unsafeDecode; -exports.verifyJwt = verifyJwt; -//# sourceMappingURL=jwt.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/jwt.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/jwt.cjs.map deleted file mode 100644 index 1050ef0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/jwt.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jwt.cjs","sources":["../crypto/jwt.js"],"sourcesContent":["import * as error from '../error.js'\nimport * as buffer from '../buffer.js'\nimport * as string from '../string.js'\nimport * as json from '../json.js'\nimport * as ecdsa from '../crypto/ecdsa.js'\nimport * as time from '../time.js'\n\n/**\n * @param {Object} data\n */\nconst _stringify = data => buffer.toBase64UrlEncoded(string.encodeUtf8(json.stringify(data)))\n\n/**\n * @param {string} base64url\n */\nconst _parse = base64url => json.parse(string.decodeUtf8(buffer.fromBase64UrlEncoded(base64url)))\n\n/**\n * @param {CryptoKey} privateKey\n * @param {Object} payload\n */\nexport const encodeJwt = (privateKey, payload) => {\n const { name: algName, namedCurve: algCurve } = /** @type {any} */ (privateKey.algorithm)\n /* c8 ignore next 3 */\n if (algName !== 'ECDSA' || algCurve !== 'P-384') {\n error.unexpectedCase()\n }\n const header = {\n alg: 'ES384',\n typ: 'JWT'\n }\n const jwt = _stringify(header) + '.' + _stringify(payload)\n return ecdsa.sign(privateKey, string.encodeUtf8(jwt)).then(signature =>\n jwt + '.' + buffer.toBase64UrlEncoded(signature)\n )\n}\n\n/**\n * @param {CryptoKey} publicKey\n * @param {string} jwt\n */\nexport const verifyJwt = async (publicKey, jwt) => {\n const [headerBase64, payloadBase64, signatureBase64] = jwt.split('.')\n const verified = await ecdsa.verify(publicKey, buffer.fromBase64UrlEncoded(signatureBase64), string.encodeUtf8(headerBase64 + '.' + payloadBase64))\n /* c8 ignore next 3 */\n if (!verified) {\n throw new Error('Invalid JWT')\n }\n const payload = _parse(payloadBase64)\n if (payload.exp != null && time.getUnixTime() > payload.exp) {\n throw new Error('Expired JWT')\n }\n return {\n header: _parse(headerBase64),\n payload\n }\n}\n\n/**\n * Decode a jwt without verifying it. Probably a bad idea to use this. Only use if you know the jwt was already verified!\n *\n * @param {string} jwt\n */\nexport const unsafeDecode = jwt => {\n const [headerBase64, payloadBase64] = jwt.split('.')\n return {\n header: _parse(headerBase64),\n payload: _parse(payloadBase64)\n }\n}\n"],"names":["buffer.toBase64UrlEncoded","string.encodeUtf8","json.stringify","json.parse","string.decodeUtf8","buffer.fromBase64UrlEncoded","error.unexpectedCase","ecdsa.sign","ecdsa.verify","time.getUnixTime"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;AACA;AACA;AACA,MAAM,UAAU,GAAG,IAAI,IAAIA,yBAAyB,CAACC,iBAAiB,CAACC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAC;AAC7F;AACA;AACA;AACA;AACA,MAAM,MAAM,GAAG,SAAS,IAAIC,UAAU,CAACC,iBAAiB,CAACC,2BAA2B,CAAC,SAAS,CAAC,CAAC,EAAC;AACjG;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,CAAC,UAAU,EAAE,OAAO,KAAK;AAClD,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,uBAAuB,UAAU,CAAC,SAAS,EAAC;AAC3F;AACA,EAAE,IAAI,OAAO,KAAK,OAAO,IAAI,QAAQ,KAAK,OAAO,EAAE;AACnD,IAAIC,oBAAoB,GAAE;AAC1B,GAAG;AACH,EAAE,MAAM,MAAM,GAAG;AACjB,IAAI,GAAG,EAAE,OAAO;AAChB,IAAI,GAAG,EAAE,KAAK;AACd,IAAG;AACH,EAAE,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,UAAU,CAAC,OAAO,EAAC;AAC5D,EAAE,OAAOC,UAAU,CAAC,UAAU,EAAEN,iBAAiB,CAAC,GAAG,CAAC,CAAC,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cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.cjs deleted file mode 100644 index f5da03b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.cjs +++ /dev/null @@ -1,266 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var _function = require('./function-314580f7.cjs'); -var error = require('./error-0c1f634f.cjs'); -var equality = require('./equality.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./object-c0c9435b.cjs'); - -class ListNode { - constructor () { - /** - * @type {this|null} - */ - this.next = null; - /** - * @type {this|null} - */ - this.prev = null; - } -} - -/** - * @template {ListNode} N - */ -class List { - constructor () { - /** - * @type {N | null} - */ - this.start = null; - /** - * @type {N | null} - */ - this.end = null; - this.len = 0; - } - - * [Symbol.iterator] () { - let n = this.start; - while (n) { - yield n; - n = n.next; - } - } - - toArray () { - return map(this, _function.id) - } - - /** - * @param {function(N):any} f - */ - forEach (f) { - forEach(this, f); - } - - /** - * @template M - * @param {function(N):M} f - * @return {Array} - */ - map (f) { - return map(this, f) - } - - /** - * @param {List} other - */ - [equality.EqualityTraitSymbol] (other) { - let n = this.start; - let m = other.start; - while (n && m) { - if (!equality.equals(n, m)) return false - n = n.next; - m = m.next; - } - return n === m // only true iff n == null && m == null - } -} - -/** - * @note The queue implementation is experimental and unfinished. - * Don't use this in production yet. - * - * @template {ListNode} N - * - * @return {List} - */ -const create = () => new List(); - -/** - * @template {ListNode} N - * - * @param {List} queue - */ -const isEmpty = queue => queue.start === null; - -/** - * Remove a single node from the queue. Only works with Queues that operate on Doubly-linked lists of nodes. - * - * @template {ListNode} N - * - * @param {List} list - * @param {N} node - */ -const remove = (list, node) => { - const prev = node.prev; - const next = node.next; - if (prev) { - prev.next = next; - } else { - list.start = next; - } - if (next) { - next.prev = prev; - } else { - list.end = prev; - } - list.len--; - return node -}; - -/** - * @deprecated @todo remove in next major release - */ -const removeNode = remove; - -/** - * @template {ListNode} N - * - * @param {List} queue - * @param {N| null} left - * @param {N| null} right - * @param {N} node - */ -const insertBetween = (queue, left, right, node) => { - /* c8 ignore start */ - if (left != null && left.next !== right) { - throw error.unexpectedCase() - } - /* c8 ignore stop */ - if (left) { - left.next = node; - } else { - queue.start = node; - } - if (right) { - right.prev = node; - } else { - queue.end = node; - } - node.prev = left; - node.next = right; - queue.len++; -}; - -/** - * Remove a single node from the queue. Only works with Queues that operate on Doubly-linked lists of nodes. - * - * @template {ListNode} N - * - * @param {List} queue - * @param {N} node - * @param {N} newNode - */ -const replace = (queue, node, newNode) => { - insertBetween(queue, node, node.next, newNode); - remove(queue, node); -}; - -/** - * @template {ListNode} N - * - * @param {List} queue - * @param {N} n - */ -const pushEnd = (queue, n) => - insertBetween(queue, queue.end, null, n); - -/** - * @template {ListNode} N - * - * @param {List} queue - * @param {N} n - */ -const pushFront = (queue, n) => - insertBetween(queue, null, queue.start, n); - -/** - * @template {ListNode} N - * - * @param {List} list - * @return {N| null} - */ -const popFront = list => - list.start ? removeNode(list, list.start) : null; - -/** - * @template {ListNode} N - * - * @param {List} list - * @return {N| null} - */ -const popEnd = list => - list.end ? removeNode(list, list.end) : null; - -/** - * @template {ListNode} N - * @template M - * - * @param {List} list - * @param {function(N):M} f - * @return {Array} - */ -const map = (list, f) => { - /** - * @type {Array} - */ - const arr = []; - let n = list.start; - while (n) { - arr.push(f(n)); - n = n.next; - } - return arr -}; - -/** - * @template {ListNode} N - * - * @param {List} list - */ -const toArray = list => map(list, _function.id); - -/** - * @template {ListNode} N - * @param {List} list - * @param {function(N):any} f - */ -const forEach = (list, f) => { - let n = list.start; - while (n) { - f(n); - n = n.next; - } -}; - -exports.List = List; -exports.ListNode = ListNode; -exports.create = create; -exports.forEach = forEach; -exports.insertBetween = insertBetween; -exports.isEmpty = isEmpty; -exports.map = map; -exports.popEnd = popEnd; -exports.popFront = popFront; -exports.pushEnd = pushEnd; -exports.pushFront = pushFront; -exports.remove = remove; -exports.removeNode = removeNode; -exports.replace = replace; -exports.toArray = toArray; -//# sourceMappingURL=list.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.cjs.map deleted file mode 100644 index 0d02aa8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"list.cjs","sources":["../list.js"],"sourcesContent":["import { id } from './function.js'\nimport * as error from './error.js'\nimport * as equalityTrait from './trait/equality.js'\nimport * as f from './function.js'\n\nexport class ListNode {\n constructor () {\n /**\n * @type {this|null}\n */\n this.next = null\n /**\n * @type {this|null}\n */\n this.prev = null\n }\n}\n\n/**\n * @template {ListNode} N\n */\nexport class List {\n constructor () {\n /**\n * @type {N | null}\n */\n this.start = null\n /**\n * @type {N | null}\n */\n this.end = null\n this.len = 0\n }\n\n * [Symbol.iterator] () {\n let n = this.start\n while (n) {\n yield n\n n = n.next\n }\n }\n\n toArray () {\n return map(this, f.id)\n }\n\n /**\n * @param {function(N):any} f\n */\n forEach (f) {\n forEach(this, f)\n }\n\n /**\n * @template M\n * @param {function(N):M} f\n * @return {Array}\n */\n map (f) {\n return map(this, f)\n }\n\n /**\n * @param {List} other\n */\n [equalityTrait.EqualityTraitSymbol] (other) {\n let n = this.start\n let m = other.start\n while (n && m) {\n if (!equalityTrait.equals(n, m)) return false\n n = n.next\n m = m.next\n }\n return n === m // only true iff n == null && m == null\n }\n}\n\n/**\n * @note The queue implementation is experimental and unfinished.\n * Don't use this in production yet.\n *\n * @template {ListNode} N\n *\n * @return {List}\n */\nexport const create = () => new List()\n\n/**\n * @template {ListNode} N\n *\n * @param {List} queue\n */\nexport const isEmpty = queue => queue.start === null\n\n/**\n * Remove a single node from the queue. Only works with Queues that operate on Doubly-linked lists of nodes.\n *\n * @template {ListNode} N\n *\n * @param {List} list\n * @param {N} node\n */\nexport const remove = (list, node) => {\n const prev = node.prev\n const next = node.next\n if (prev) {\n prev.next = next\n } else {\n list.start = next\n }\n if (next) {\n next.prev = prev\n } else {\n list.end = prev\n }\n list.len--\n return node\n}\n\n/**\n * @deprecated @todo remove in next major release\n */\nexport const removeNode = remove\n\n/**\n * @template {ListNode} N\n *\n * @param {List} queue\n * @param {N| null} left\n * @param {N| null} right\n * @param {N} node\n */\nexport const insertBetween = (queue, left, right, node) => {\n /* c8 ignore start */\n if (left != null && left.next !== right) {\n throw error.unexpectedCase()\n }\n /* c8 ignore stop */\n if (left) {\n left.next = node\n } else {\n queue.start = node\n }\n if (right) {\n right.prev = node\n } else {\n queue.end = node\n }\n node.prev = left\n node.next = right\n queue.len++\n}\n\n/**\n * Remove a single node from the queue. Only works with Queues that operate on Doubly-linked lists of nodes.\n *\n * @template {ListNode} N\n *\n * @param {List} queue\n * @param {N} node\n * @param {N} newNode\n */\nexport const replace = (queue, node, newNode) => {\n insertBetween(queue, node, node.next, newNode)\n remove(queue, node)\n}\n\n/**\n * @template {ListNode} N\n *\n * @param {List} queue\n * @param {N} n\n */\nexport const pushEnd = (queue, n) =>\n insertBetween(queue, queue.end, null, n)\n\n/**\n * @template {ListNode} N\n *\n * @param {List} queue\n * @param {N} n\n */\nexport const pushFront = (queue, n) =>\n insertBetween(queue, null, queue.start, n)\n\n/**\n * @template {ListNode} N\n *\n * @param {List} list\n * @return {N| null}\n */\nexport const popFront = list =>\n list.start ? removeNode(list, list.start) : null\n\n/**\n * @template {ListNode} N\n *\n * @param {List} list\n * @return {N| null}\n */\nexport const popEnd = list =>\n list.end ? removeNode(list, list.end) : null\n\n/**\n * @template {ListNode} N\n * @template M\n *\n * @param {List} list\n * @param {function(N):M} f\n * @return {Array}\n */\nexport const map = (list, f) => {\n /**\n * @type {Array}\n */\n const arr = []\n let n = list.start\n while (n) {\n arr.push(f(n))\n n = n.next\n }\n return arr\n}\n\n/**\n * @template {ListNode} N\n *\n * @param {List} list\n */\nexport const toArray = list => map(list, id)\n\n/**\n * @template {ListNode} N\n * @param {List} list\n * @param {function(N):any} f\n */\nexport const forEach = (list, f) => {\n let n = list.start\n while (n) {\n f(n)\n n = n.next\n }\n}\n"],"names":["f.id","equalityTrait.EqualityTraitSymbol","equalityTrait.equals","error.unexpectedCase","id"],"mappings":";;;;;;;;;;;AAKO,MAAM,QAAQ,CAAC;AACtB,EAAE,WAAW,CAAC,GAAG;AACjB;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,GAAG,KAAI;AACpB;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,GAAG,KAAI;AACpB,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACO,MAAM,IAAI,CAAC;AAClB,EAAE,WAAW,CAAC,GAAG;AACjB;AACA;AACA;AACA,IAAI,IAAI,CAAC,KAAK,GAAG,KAAI;AACrB;AACA;AACA;AACA,IAAI,IAAI,CAAC,GAAG,GAAG,KAAI;AACnB,IAAI,IAAI,CAAC,GAAG,GAAG,EAAC;AAChB,GAAG;AACH;AACA,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,GAAG;AACzB,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,MAAK;AACtB,IAAI,OAAO,CAAC,EAAE;AACd,MAAM,MAAM,EAAC;AACb,MAAM,CAAC,GAAG,CAAC,CAAC,KAAI;AAChB,KAAK;AACL,GAAG;AACH;AACA,EAAE,OAAO,CAAC,GAAG;AACb,IAAI,OAAO,GAAG,CAAC,IAAI,EAAEA,YAAI,CAAC;AAC1B,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE;AACd,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,EAAC;AACpB,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE;AACV,IAAI,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;AACvB,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,KAAK,EAAE,CAAC,EAAC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,IAAI;AAC5B,EAAE,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,KAAI;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,IAAI;AAC1B,EAAE,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,KAAI;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK;AAChC;AACA;AACA;AACA,EAAE,MAAM,GAAG,GAAG,GAAE;AAChB,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,MAAK;AACpB,EAAE,OAAO,CAAC,EAAE;AACZ,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC;AAClB,IAAI,CAAC,GAAG,CAAC,CAAC,KAAI;AACd,GAAG;AACH,EAAE,OAAO,GAAG;AACZ,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,IAAI,IAAI,GAAG,CAAC,IAAI,EAAEC,YAAE,EAAC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK;AACpC,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,MAAK;AACpB,EAAE,OAAO,CAAC,EAAE;AACZ,IAAI,CAAC,CAAC,CAAC,EAAC;AACR,IAAI,CAAC,GAAG,CAAC,CAAC,KAAI;AACd,GAAG;AACH;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.d.ts deleted file mode 100644 index bd60710..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -export class ListNode { - /** - * @type {this|null} - */ - next: this | null; - /** - * @type {this|null} - */ - prev: this | null; -} -/** - * @template {ListNode} N - */ -export class List { - /** - * @type {N | null} - */ - start: N | null; - /** - * @type {N | null} - */ - end: N | null; - len: number; - toArray(): N[]; - /** - * @param {function(N):any} f - */ - forEach(f: (arg0: N) => any): void; - /** - * @template M - * @param {function(N):M} f - * @return {Array} - */ - map(f: (arg0: N) => M): Array; - [Symbol.iterator](): Generator; - /** - * @param {List} other - */ - [equalityTrait.EqualityTraitSymbol](other: List): boolean; -} -export function create(): List; -export function isEmpty(queue: List): boolean; -export function remove(list: List, node: N): N; -export function removeNode(list: List, node: N): N; -export function insertBetween(queue: List, left: N | null, right: N | null, node: N): void; -export function replace(queue: List, node: N, newNode: N): void; -export function pushEnd(queue: List, n: N): void; -export function pushFront(queue: List, n: N): void; -export function popFront(list: List): N | null; -export function popEnd(list: List): N | null; -export function map(list: List, f: (arg0: N) => M): Array; -export function toArray(list: List): N[]; -export function forEach(list: List, f: (arg0: N) => any): void; -import * as equalityTrait from './trait/equality.js'; -//# sourceMappingURL=list.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.d.ts.map deleted file mode 100644 index 3e9ba46..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../list.js"],"names":[],"mappings":"AAKA;IAEI;;OAEG;IACH,MAFU,IAAI,GAAC,IAAI,CAEH;IAChB;;OAEG;IACH,MAFU,IAAI,GAAC,IAAI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,QAAS,QAEZ,IAAI,CAAC,CAAC,CAAC,GACN,CAAC,GAAE,IAAI,CAG2B;AAUvC,oBAPiB,CAAC,SAAX,QAAS,EACV,CAAC,QAEH,IAAI,CAAC,CAAC,CAAC,KACP,CAAS,IAAC,EAAD,CAAC,KAAE,CAAC,GACZ,KAAK,CAAC,CAAC,CAAC,CAanB;AAOM,wBAJiB,CAAC,SAAX,QAAS,QAEZ,IAAI,CAAC,CAAC,CAAC,OAE0B;AAOrC,wBAJiB,CAAC,SAAX,QAAS,QACZ,IAAI,CAAC,CAAC,CAAC,KACP,CAAS,IAAC,EAAD,CAAC,KAAE,GAAG,QAQzB;+BAhP8B,qBAAqB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.test.d.ts deleted file mode 100644 index 7227113..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testAssignability(_tc: t.TestCase): void; -export function testEnqueueDequeue(_tc: t.TestCase): void; -export function testSelectivePop(_tc: t.TestCase): void; -export function testEquality(): void; -import * as t from './testing.js'; -//# sourceMappingURL=list.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.test.d.ts.map deleted file mode 100644 index e12f350..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/list.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"list.test.d.ts","sourceRoot":"","sources":["../list.test.js"],"names":[],"mappings":"AA2BO,uCAFI,CAAC,CAAC,QAAQ,QAcpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QA8BpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAiCpB;AAEM,qCAgBN;mBA9HkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.cjs deleted file mode 100644 index b5514b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.cjs +++ /dev/null @@ -1,428 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var environment = require('./environment-1c97264d.cjs'); -var set = require('./set-5b47859e.cjs'); -var pair = require('./pair-ab022bc3.cjs'); -var dom = require('./dom-7e625b09.cjs'); -var json = require('./json-092190a1.cjs'); -var map = require('./map-24d263c0.cjs'); -var eventloop = require('./eventloop-a0168106.cjs'); -var math = require('./math-96d5e8c4.cjs'); -var logging_common = require('./logging.common.cjs'); -require('./string-fddc5f8b.cjs'); -require('./array-78849c95.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./schema.cjs'); -require('./error-0c1f634f.cjs'); -require('./prng-37d48618.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./buffer-3e750729.cjs'); -require('./encoding-1a745c43.cjs'); -require('./number-1fb57bba.cjs'); -require('./decoding-76e75827.cjs'); -require('./time-d8438852.cjs'); -require('./metric.cjs'); -require('./symbol-9c439012.cjs'); - -/** - * Isomorphic logging module with support for colors! - * - * @module logging - */ - -/** - * @type {Object>} - */ -const _browserStyleMap = { - [logging_common.BOLD]: pair.create('font-weight', 'bold'), - [logging_common.UNBOLD]: pair.create('font-weight', 'normal'), - [logging_common.BLUE]: pair.create('color', 'blue'), - [logging_common.GREEN]: pair.create('color', 'green'), - [logging_common.GREY]: pair.create('color', 'grey'), - [logging_common.RED]: pair.create('color', 'red'), - [logging_common.PURPLE]: pair.create('color', 'purple'), - [logging_common.ORANGE]: pair.create('color', 'orange'), // not well supported in chrome when debugging node with inspector - TODO: deprecate - [logging_common.UNCOLOR]: pair.create('color', 'black') -}; - -/** - * @param {Array} args - * @return {Array} - */ -/* c8 ignore start */ -const computeBrowserLoggingArgs = (args) => { - if (args.length === 1 && args[0]?.constructor === Function) { - args = /** @type {Array} */ (/** @type {[function]} */ (args)[0]()); - } - const strBuilder = []; - const styles = []; - const currentStyle = map.create(); - /** - * @type {Array} - */ - let logArgs = []; - // try with formatting until we find something unsupported - let i = 0; - for (; i < args.length; i++) { - const arg = args[i]; - // @ts-ignore - const style = _browserStyleMap[arg]; - if (style !== undefined) { - currentStyle.set(style.left, style.right); - } else { - if (arg === undefined) { - break - } - if (arg.constructor === String || arg.constructor === Number) { - const style = dom.mapToStyleString(currentStyle); - if (i > 0 || style.length > 0) { - strBuilder.push('%c' + arg); - styles.push(style); - } else { - strBuilder.push(arg); - } - } else { - break - } - } - } - if (i > 0) { - // create logArgs with what we have so far - logArgs = styles; - logArgs.unshift(strBuilder.join('')); - } - // append the rest - for (; i < args.length; i++) { - const arg = args[i]; - if (!(arg instanceof Symbol)) { - logArgs.push(arg); - } - } - return logArgs -}; -/* c8 ignore stop */ - -/* c8 ignore start */ -const computeLoggingArgs = environment.supportsColor - ? computeBrowserLoggingArgs - : logging_common.computeNoColorLoggingArgs; -/* c8 ignore stop */ - -/** - * @param {Array} args - */ -const print = (...args) => { - console.log(...computeLoggingArgs(args)); - /* c8 ignore next */ - vconsoles.forEach((vc) => vc.print(args)); -}; - -/* c8 ignore start */ -/** - * @param {Array} args - */ -const warn = (...args) => { - console.warn(...computeLoggingArgs(args)); - args.unshift(logging_common.ORANGE); - vconsoles.forEach((vc) => vc.print(args)); -}; -/* c8 ignore stop */ - -/** - * @param {Error} err - */ -/* c8 ignore start */ -const printError = (err) => { - console.error(err); - vconsoles.forEach((vc) => vc.printError(err)); -}; -/* c8 ignore stop */ - -/** - * @param {string} url image location - * @param {number} height height of the image in pixel - */ -/* c8 ignore start */ -const printImg = (url, height) => { - if (environment.isBrowser) { - console.log( - '%c ', - `font-size: ${height}px; background-size: contain; background-repeat: no-repeat; background-image: url(${url})` - ); - // console.log('%c ', `font-size: ${height}x; background: url(${url}) no-repeat;`) - } - vconsoles.forEach((vc) => vc.printImg(url, height)); -}; -/* c8 ignore stop */ - -/** - * @param {string} base64 - * @param {number} height - */ -/* c8 ignore next 2 */ -const printImgBase64 = (base64, height) => - printImg(`data:image/gif;base64,${base64}`, height); - -/** - * @param {Array} args - */ -const group = (...args) => { - console.group(...computeLoggingArgs(args)); - /* c8 ignore next */ - vconsoles.forEach((vc) => vc.group(args)); -}; - -/** - * @param {Array} args - */ -const groupCollapsed = (...args) => { - console.groupCollapsed(...computeLoggingArgs(args)); - /* c8 ignore next */ - vconsoles.forEach((vc) => vc.groupCollapsed(args)); -}; - -const groupEnd = () => { - console.groupEnd(); - /* c8 ignore next */ - vconsoles.forEach((vc) => vc.groupEnd()); -}; - -/** - * @param {function():Node} createNode - */ -/* c8 ignore next 2 */ -const printDom = (createNode) => - vconsoles.forEach((vc) => vc.printDom(createNode())); - -/** - * @param {HTMLCanvasElement} canvas - * @param {number} height - */ -/* c8 ignore next 2 */ -const printCanvas = (canvas, height) => - printImg(canvas.toDataURL(), height); - -const vconsoles = set.create(); - -/** - * @param {Array} args - * @return {Array} - */ -/* c8 ignore start */ -const _computeLineSpans = (args) => { - const spans = []; - const currentStyle = new Map(); - // try with formatting until we find something unsupported - let i = 0; - for (; i < args.length; i++) { - let arg = args[i]; - // @ts-ignore - const style = _browserStyleMap[arg]; - if (style !== undefined) { - currentStyle.set(style.left, style.right); - } else { - if (arg === undefined) { - arg = 'undefined '; - } - if (arg.constructor === String || arg.constructor === Number) { - // @ts-ignore - const span = dom.element('span', [ - pair.create('style', dom.mapToStyleString(currentStyle)) - ], [dom.text(arg.toString())]); - if (span.innerHTML === '') { - span.innerHTML = ' '; - } - spans.push(span); - } else { - break - } - } - } - // append the rest - for (; i < args.length; i++) { - let content = args[i]; - if (!(content instanceof Symbol)) { - if (content.constructor !== String && content.constructor !== Number) { - content = ' ' + json.stringify(content) + ' '; - } - spans.push( - dom.element('span', [], [dom.text(/** @type {string} */ (content))]) - ); - } - } - return spans -}; -/* c8 ignore stop */ - -const lineStyle = - 'font-family:monospace;border-bottom:1px solid #e2e2e2;padding:2px;'; - -/* c8 ignore start */ -class VConsole { - /** - * @param {Element} dom - */ - constructor (dom) { - this.dom = dom; - /** - * @type {Element} - */ - this.ccontainer = this.dom; - this.depth = 0; - vconsoles.add(this); - } - - /** - * @param {Array} args - * @param {boolean} collapsed - */ - group (args, collapsed = false) { - eventloop.enqueue(() => { - const triangleDown = dom.element('span', [ - pair.create('hidden', collapsed), - pair.create('style', 'color:grey;font-size:120%;') - ], [dom.text('▼')]); - const triangleRight = dom.element('span', [ - pair.create('hidden', !collapsed), - pair.create('style', 'color:grey;font-size:125%;') - ], [dom.text('▶')]); - const content = dom.element( - 'div', - [pair.create( - 'style', - `${lineStyle};padding-left:${this.depth * 10}px` - )], - [triangleDown, triangleRight, dom.text(' ')].concat( - _computeLineSpans(args) - ) - ); - const nextContainer = dom.element('div', [ - pair.create('hidden', collapsed) - ]); - const nextLine = dom.element('div', [], [content, nextContainer]); - dom.append(this.ccontainer, [nextLine]); - this.ccontainer = nextContainer; - this.depth++; - // when header is clicked, collapse/uncollapse container - dom.addEventListener(content, 'click', (_event) => { - nextContainer.toggleAttribute('hidden'); - triangleDown.toggleAttribute('hidden'); - triangleRight.toggleAttribute('hidden'); - }); - }); - } - - /** - * @param {Array} args - */ - groupCollapsed (args) { - this.group(args, true); - } - - groupEnd () { - eventloop.enqueue(() => { - if (this.depth > 0) { - this.depth--; - // @ts-ignore - this.ccontainer = this.ccontainer.parentElement.parentElement; - } - }); - } - - /** - * @param {Array} args - */ - print (args) { - eventloop.enqueue(() => { - dom.append(this.ccontainer, [ - dom.element('div', [ - pair.create( - 'style', - `${lineStyle};padding-left:${this.depth * 10}px` - ) - ], _computeLineSpans(args)) - ]); - }); - } - - /** - * @param {Error} err - */ - printError (err) { - this.print([logging_common.RED, logging_common.BOLD, err.toString()]); - } - - /** - * @param {string} url - * @param {number} height - */ - printImg (url, height) { - eventloop.enqueue(() => { - dom.append(this.ccontainer, [ - dom.element('img', [ - pair.create('src', url), - pair.create('height', `${math.round(height * 1.5)}px`) - ]) - ]); - }); - } - - /** - * @param {Node} node - */ - printDom (node) { - eventloop.enqueue(() => { - dom.append(this.ccontainer, [node]); - }); - } - - destroy () { - eventloop.enqueue(() => { - vconsoles.delete(this); - }); - } -} -/* c8 ignore stop */ - -/** - * @param {Element} dom - */ -/* c8 ignore next */ -const createVConsole = (dom) => new VConsole(dom); - -/** - * @param {string} moduleName - * @return {function(...any):void} - */ -const createModuleLogger = (moduleName) => logging_common.createModuleLogger(print, moduleName); - -exports.BLUE = logging_common.BLUE; -exports.BOLD = logging_common.BOLD; -exports.GREEN = logging_common.GREEN; -exports.GREY = logging_common.GREY; -exports.ORANGE = logging_common.ORANGE; -exports.PURPLE = logging_common.PURPLE; -exports.RED = logging_common.RED; -exports.UNBOLD = logging_common.UNBOLD; -exports.UNCOLOR = logging_common.UNCOLOR; -exports.VConsole = VConsole; -exports.createModuleLogger = createModuleLogger; -exports.createVConsole = createVConsole; -exports.group = group; -exports.groupCollapsed = groupCollapsed; -exports.groupEnd = groupEnd; -exports.print = print; -exports.printCanvas = printCanvas; -exports.printDom = printDom; -exports.printError = printError; -exports.printImg = printImg; -exports.printImgBase64 = printImgBase64; -exports.vconsoles = vconsoles; -exports.warn = warn; -//# sourceMappingURL=logging.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.cjs.map deleted file mode 100644 index 6e86714..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logging.cjs","sources":["../logging.js"],"sourcesContent":["/**\n * Isomorphic logging module with support for colors!\n *\n * @module logging\n */\n\nimport * as env from './environment.js'\nimport * as set from './set.js'\nimport * as pair from './pair.js'\nimport * as dom from './dom.js'\nimport * as json from './json.js'\nimport * as map from './map.js'\nimport * as eventloop from './eventloop.js'\nimport * as math from './math.js'\nimport * as common from './logging.common.js'\n\nexport { BOLD, UNBOLD, BLUE, GREY, GREEN, RED, PURPLE, ORANGE, UNCOLOR } from './logging.common.js'\n\n/**\n * @type {Object>}\n */\nconst _browserStyleMap = {\n [common.BOLD]: pair.create('font-weight', 'bold'),\n [common.UNBOLD]: pair.create('font-weight', 'normal'),\n [common.BLUE]: pair.create('color', 'blue'),\n [common.GREEN]: pair.create('color', 'green'),\n [common.GREY]: pair.create('color', 'grey'),\n [common.RED]: pair.create('color', 'red'),\n [common.PURPLE]: pair.create('color', 'purple'),\n [common.ORANGE]: pair.create('color', 'orange'), // not well supported in chrome when debugging node with inspector - TODO: deprecate\n [common.UNCOLOR]: pair.create('color', 'black')\n}\n\n/**\n * @param {Array} args\n * @return {Array}\n */\n/* c8 ignore start */\nconst computeBrowserLoggingArgs = (args) => {\n if (args.length === 1 && args[0]?.constructor === Function) {\n args = /** @type {Array} */ (/** @type {[function]} */ (args)[0]())\n }\n const strBuilder = []\n const styles = []\n const currentStyle = map.create()\n /**\n * @type {Array}\n */\n let logArgs = []\n // try with formatting until we find something unsupported\n let i = 0\n for (; i < args.length; i++) {\n const arg = args[i]\n // @ts-ignore\n const style = _browserStyleMap[arg]\n if (style !== undefined) {\n currentStyle.set(style.left, style.right)\n } else {\n if (arg === undefined) {\n break\n }\n if (arg.constructor === String || arg.constructor === Number) {\n const style = dom.mapToStyleString(currentStyle)\n if (i > 0 || style.length > 0) {\n strBuilder.push('%c' + arg)\n styles.push(style)\n } else {\n strBuilder.push(arg)\n }\n } else {\n break\n }\n }\n }\n if (i > 0) {\n // create logArgs with what we have so far\n logArgs = styles\n logArgs.unshift(strBuilder.join(''))\n }\n // append the rest\n for (; i < args.length; i++) {\n const arg = args[i]\n if (!(arg instanceof Symbol)) {\n logArgs.push(arg)\n }\n }\n return logArgs\n}\n/* c8 ignore stop */\n\n/* c8 ignore start */\nconst computeLoggingArgs = env.supportsColor\n ? computeBrowserLoggingArgs\n : common.computeNoColorLoggingArgs\n/* c8 ignore stop */\n\n/**\n * @param {Array} args\n */\nexport const print = (...args) => {\n console.log(...computeLoggingArgs(args))\n /* c8 ignore next */\n vconsoles.forEach((vc) => vc.print(args))\n}\n\n/* c8 ignore start */\n/**\n * @param {Array} args\n */\nexport const warn = (...args) => {\n console.warn(...computeLoggingArgs(args))\n args.unshift(common.ORANGE)\n vconsoles.forEach((vc) => vc.print(args))\n}\n/* c8 ignore stop */\n\n/**\n * @param {Error} err\n */\n/* c8 ignore start */\nexport const printError = (err) => {\n console.error(err)\n vconsoles.forEach((vc) => vc.printError(err))\n}\n/* c8 ignore stop */\n\n/**\n * @param {string} url image location\n * @param {number} height height of the image in pixel\n */\n/* c8 ignore start */\nexport const printImg = (url, height) => {\n if (env.isBrowser) {\n console.log(\n '%c ',\n `font-size: ${height}px; background-size: contain; background-repeat: no-repeat; background-image: url(${url})`\n )\n // console.log('%c ', `font-size: ${height}x; background: url(${url}) no-repeat;`)\n }\n vconsoles.forEach((vc) => vc.printImg(url, height))\n}\n/* c8 ignore stop */\n\n/**\n * @param {string} base64\n * @param {number} height\n */\n/* c8 ignore next 2 */\nexport const printImgBase64 = (base64, height) =>\n printImg(`data:image/gif;base64,${base64}`, height)\n\n/**\n * @param {Array} args\n */\nexport const group = (...args) => {\n console.group(...computeLoggingArgs(args))\n /* c8 ignore next */\n vconsoles.forEach((vc) => vc.group(args))\n}\n\n/**\n * @param {Array} args\n */\nexport const groupCollapsed = (...args) => {\n console.groupCollapsed(...computeLoggingArgs(args))\n /* c8 ignore next */\n vconsoles.forEach((vc) => vc.groupCollapsed(args))\n}\n\nexport const groupEnd = () => {\n console.groupEnd()\n /* c8 ignore next */\n vconsoles.forEach((vc) => vc.groupEnd())\n}\n\n/**\n * @param {function():Node} createNode\n */\n/* c8 ignore next 2 */\nexport const printDom = (createNode) =>\n vconsoles.forEach((vc) => vc.printDom(createNode()))\n\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {number} height\n */\n/* c8 ignore next 2 */\nexport const printCanvas = (canvas, height) =>\n printImg(canvas.toDataURL(), height)\n\nexport const vconsoles = set.create()\n\n/**\n * @param {Array} args\n * @return {Array}\n */\n/* c8 ignore start */\nconst _computeLineSpans = (args) => {\n const spans = []\n const currentStyle = new Map()\n // try with formatting until we find something unsupported\n let i = 0\n for (; i < args.length; i++) {\n let arg = args[i]\n // @ts-ignore\n const style = _browserStyleMap[arg]\n if (style !== undefined) {\n currentStyle.set(style.left, style.right)\n } else {\n if (arg === undefined) {\n arg = 'undefined '\n }\n if (arg.constructor === String || arg.constructor === Number) {\n // @ts-ignore\n const span = dom.element('span', [\n pair.create('style', dom.mapToStyleString(currentStyle))\n ], [dom.text(arg.toString())])\n if (span.innerHTML === '') {\n span.innerHTML = ' '\n }\n spans.push(span)\n } else {\n break\n }\n }\n }\n // append the rest\n for (; i < args.length; i++) {\n let content = args[i]\n if (!(content instanceof Symbol)) {\n if (content.constructor !== String && content.constructor !== Number) {\n content = ' ' + json.stringify(content) + ' '\n }\n spans.push(\n dom.element('span', [], [dom.text(/** @type {string} */ (content))])\n )\n }\n }\n return spans\n}\n/* c8 ignore stop */\n\nconst lineStyle =\n 'font-family:monospace;border-bottom:1px solid #e2e2e2;padding:2px;'\n\n/* c8 ignore start */\nexport class VConsole {\n /**\n * @param {Element} dom\n */\n constructor (dom) {\n this.dom = dom\n /**\n * @type {Element}\n */\n this.ccontainer = this.dom\n this.depth = 0\n vconsoles.add(this)\n }\n\n /**\n * @param {Array} args\n * @param {boolean} collapsed\n */\n group (args, collapsed = false) {\n eventloop.enqueue(() => {\n const triangleDown = dom.element('span', [\n pair.create('hidden', collapsed),\n pair.create('style', 'color:grey;font-size:120%;')\n ], [dom.text('▼')])\n const triangleRight = dom.element('span', [\n pair.create('hidden', !collapsed),\n pair.create('style', 'color:grey;font-size:125%;')\n ], [dom.text('▶')])\n const content = dom.element(\n 'div',\n [pair.create(\n 'style',\n `${lineStyle};padding-left:${this.depth * 10}px`\n )],\n [triangleDown, triangleRight, dom.text(' ')].concat(\n _computeLineSpans(args)\n )\n )\n const nextContainer = dom.element('div', [\n pair.create('hidden', collapsed)\n ])\n const nextLine = dom.element('div', [], [content, nextContainer])\n dom.append(this.ccontainer, [nextLine])\n this.ccontainer = nextContainer\n this.depth++\n // when header is clicked, collapse/uncollapse container\n dom.addEventListener(content, 'click', (_event) => {\n nextContainer.toggleAttribute('hidden')\n triangleDown.toggleAttribute('hidden')\n triangleRight.toggleAttribute('hidden')\n })\n })\n }\n\n /**\n * @param {Array} args\n */\n groupCollapsed (args) {\n this.group(args, true)\n }\n\n groupEnd () {\n eventloop.enqueue(() => {\n if (this.depth > 0) {\n this.depth--\n // @ts-ignore\n this.ccontainer = this.ccontainer.parentElement.parentElement\n }\n })\n }\n\n /**\n * @param {Array} args\n */\n print (args) {\n eventloop.enqueue(() => {\n dom.append(this.ccontainer, [\n dom.element('div', [\n pair.create(\n 'style',\n `${lineStyle};padding-left:${this.depth * 10}px`\n )\n ], _computeLineSpans(args))\n ])\n })\n }\n\n /**\n * @param {Error} err\n */\n printError (err) {\n this.print([common.RED, common.BOLD, err.toString()])\n }\n\n /**\n * @param {string} url\n * @param {number} height\n */\n printImg (url, height) {\n eventloop.enqueue(() => {\n dom.append(this.ccontainer, [\n dom.element('img', [\n pair.create('src', url),\n pair.create('height', `${math.round(height * 1.5)}px`)\n ])\n ])\n })\n }\n\n /**\n * @param {Node} node\n */\n printDom (node) {\n eventloop.enqueue(() => {\n dom.append(this.ccontainer, [node])\n })\n }\n\n destroy () {\n eventloop.enqueue(() => {\n vconsoles.delete(this)\n })\n }\n}\n/* c8 ignore stop */\n\n/**\n * @param {Element} dom\n */\n/* c8 ignore next */\nexport const createVConsole = (dom) => new VConsole(dom)\n\n/**\n * @param {string} moduleName\n * @return {function(...any):void}\n */\nexport const createModuleLogger = (moduleName) => common.createModuleLogger(print, moduleName)\n"],"names":["common.BOLD","pair.create","common.UNBOLD","common.BLUE","common.GREEN","common.GREY","common.RED","common.PURPLE","common.ORANGE","common.UNCOLOR","map.create","dom.mapToStyleString","env.supportsColor","common.computeNoColorLoggingArgs","env.isBrowser","set.create","dom.element","dom.text","json.stringify","eventloop.enqueue","dom.append","dom.addEventListener","math.round","common.createModuleLogger"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAaA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAG;AACzB,EAAE,CAACA,mBAAW,GAAGC,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC;AACnD,EAAE,CAACC,qBAAa,GAAGD,WAAW,CAAC,aAAa,EAAE,QAAQ,CAAC;AACvD,EAAE,CAACE,mBAAW,GAAGF,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC;AAC7C,EAAE,CAACG,oBAAY,GAAGH,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC;AAC/C,EAAE,CAACI,mBAAW,GAAGJ,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC;AAC7C,EAAE,CAACK,kBAAU,GAAGL,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC;AAC3C,EAAE,CAACM,qBAAa,GAAGN,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC;AACjD,EAAE,CAACO,qBAAa,GAAGP,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC;AACjD,EAAE,CAACQ,sBAAc,GAAGR,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC;AACjD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,yBAAyB,GAAG,CAAC,IAAI,KAAK;AAC5C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iCAAyB,CAAC,KAAK,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.cjs deleted file mode 100644 index 8bc2b26..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.cjs +++ /dev/null @@ -1,132 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var symbol = require('./symbol-9c439012.cjs'); -var time = require('./time-d8438852.cjs'); -var environment = require('./environment-1c97264d.cjs'); -var _function = require('./function-314580f7.cjs'); -var json = require('./json-092190a1.cjs'); -require('./metric.cjs'); -require('./math-96d5e8c4.cjs'); -require('./map-24d263c0.cjs'); -require('./string-fddc5f8b.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); - -const BOLD = symbol.create(); -const UNBOLD = symbol.create(); -const BLUE = symbol.create(); -const GREY = symbol.create(); -const GREEN = symbol.create(); -const RED = symbol.create(); -const PURPLE = symbol.create(); -const ORANGE = symbol.create(); -const UNCOLOR = symbol.create(); - -/* c8 ignore start */ -/** - * @param {Array} args - * @return {Array} - */ -const computeNoColorLoggingArgs = args => { - if (args.length === 1 && args[0]?.constructor === Function) { - args = /** @type {Array} */ (/** @type {[function]} */ (args)[0]()); - } - const strBuilder = []; - const logArgs = []; - // try with formatting until we find something unsupported - let i = 0; - for (; i < args.length; i++) { - const arg = args[i]; - if (arg === undefined) { - break - } else if (arg.constructor === String || arg.constructor === Number) { - strBuilder.push(arg); - } else if (arg.constructor === Object) { - break - } - } - if (i > 0) { - // create logArgs with what we have so far - logArgs.push(strBuilder.join('')); - } - // append the rest - for (; i < args.length; i++) { - const arg = args[i]; - if (!(arg instanceof Symbol)) { - logArgs.push(arg); - } - } - return logArgs -}; -/* c8 ignore stop */ - -const loggingColors = [GREEN, PURPLE, ORANGE, BLUE]; -let nextColor = 0; -let lastLoggingTime = time.getUnixTime(); - -/* c8 ignore start */ -/** - * @param {function(...any):void} _print - * @param {string} moduleName - * @return {function(...any):void} - */ -const createModuleLogger = (_print, moduleName) => { - const color = loggingColors[nextColor]; - const debugRegexVar = environment.getVariable('log'); - const doLogging = debugRegexVar !== null && - (debugRegexVar === '*' || debugRegexVar === 'true' || - new RegExp(debugRegexVar, 'gi').test(moduleName)); - nextColor = (nextColor + 1) % loggingColors.length; - moduleName += ': '; - return !doLogging - ? _function.nop - : (...args) => { - if (args.length === 1 && args[0]?.constructor === Function) { - args = args[0](); - } - const timeNow = time.getUnixTime(); - const timeDiff = timeNow - lastLoggingTime; - lastLoggingTime = timeNow; - _print( - color, - moduleName, - UNCOLOR, - ...args.map((arg) => { - if (arg != null && arg.constructor === Uint8Array) { - arg = Array.from(arg); - } - const t = typeof arg; - switch (t) { - case 'string': - case 'symbol': - return arg - default: { - return json.stringify(arg) - } - } - }), - color, - ' +' + timeDiff + 'ms' - ); - } -}; -/* c8 ignore stop */ - -exports.BLUE = BLUE; -exports.BOLD = BOLD; -exports.GREEN = GREEN; -exports.GREY = GREY; -exports.ORANGE = ORANGE; -exports.PURPLE = PURPLE; -exports.RED = RED; -exports.UNBOLD = UNBOLD; -exports.UNCOLOR = UNCOLOR; -exports.computeNoColorLoggingArgs = computeNoColorLoggingArgs; -exports.createModuleLogger = createModuleLogger; -//# sourceMappingURL=logging.common.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.cjs.map deleted file mode 100644 index a898cf0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logging.common.cjs","sources":["../logging.common.js"],"sourcesContent":["import * as symbol from './symbol.js'\nimport * as time from './time.js'\nimport * as env from './environment.js'\nimport * as func from './function.js'\nimport * as json from './json.js'\n\nexport const BOLD = symbol.create()\nexport const UNBOLD = symbol.create()\nexport const BLUE = symbol.create()\nexport const GREY = symbol.create()\nexport const GREEN = symbol.create()\nexport const RED = symbol.create()\nexport const PURPLE = symbol.create()\nexport const ORANGE = symbol.create()\nexport const UNCOLOR = symbol.create()\n\n/* c8 ignore start */\n/**\n * @param {Array} args\n * @return {Array}\n */\nexport const computeNoColorLoggingArgs = args => {\n if (args.length === 1 && args[0]?.constructor === Function) {\n args = /** @type {Array} */ (/** @type {[function]} */ (args)[0]())\n }\n const strBuilder = []\n const logArgs = []\n // try with formatting until we find something unsupported\n let i = 0\n for (; i < args.length; i++) {\n const arg = args[i]\n if (arg === undefined) {\n break\n } else if (arg.constructor === String || arg.constructor === Number) {\n strBuilder.push(arg)\n } else if (arg.constructor === Object) {\n break\n }\n }\n if (i > 0) {\n // create logArgs with what we have so far\n logArgs.push(strBuilder.join(''))\n }\n // append the rest\n for (; i < args.length; i++) {\n const arg = args[i]\n if (!(arg instanceof Symbol)) {\n logArgs.push(arg)\n }\n }\n return logArgs\n}\n/* c8 ignore stop */\n\nconst loggingColors = [GREEN, PURPLE, ORANGE, BLUE]\nlet nextColor = 0\nlet lastLoggingTime = time.getUnixTime()\n\n/* c8 ignore start */\n/**\n * @param {function(...any):void} _print\n * @param {string} moduleName\n * @return {function(...any):void}\n */\nexport const createModuleLogger = (_print, moduleName) => {\n const color = loggingColors[nextColor]\n const debugRegexVar = env.getVariable('log')\n const doLogging = debugRegexVar !== null &&\n (debugRegexVar === '*' || debugRegexVar === 'true' ||\n new RegExp(debugRegexVar, 'gi').test(moduleName))\n nextColor = (nextColor + 1) % loggingColors.length\n moduleName += ': '\n return !doLogging\n ? func.nop\n : (...args) => {\n if (args.length === 1 && args[0]?.constructor === Function) {\n args = args[0]()\n }\n const timeNow = time.getUnixTime()\n const timeDiff = timeNow - lastLoggingTime\n lastLoggingTime = timeNow\n _print(\n color,\n moduleName,\n UNCOLOR,\n ...args.map((arg) => {\n if (arg != null && arg.constructor === Uint8Array) {\n arg = Array.from(arg)\n }\n const t = typeof arg\n switch (t) {\n case 'string':\n case 'symbol':\n return arg\n default: {\n return json.stringify(arg)\n }\n }\n }),\n color,\n ' +' + timeDiff + 'ms'\n )\n }\n}\n/* c8 ignore stop */\n"],"names":["symbol.create","time.getUnixTime","env.getVariable","func.nop","json.stringify"],"mappings":";;;;;;;;;;;;;;;;;;;;AAMY,MAAC,IAAI,GAAGA,aAAa,GAAE;AACvB,MAAC,MAAM,GAAGA,aAAa,GAAE;AACzB,MAAC,IAAI,GAAGA,aAAa,GAAE;AACvB,MAAC,IAAI,GAAGA,aAAa,GAAE;AACvB,MAAC,KAAK,GAAGA,aAAa,GAAE;AACxB,MAAC,GAAG,GAAGA,aAAa,GAAE;AACtB,MAAC,MAAM,GAAGA,aAAa,GAAE;AACzB,MAAC,MAAM,GAAGA,aAAa,GAAE;AACzB,MAAC,OAAO,GAAGA,aAAa,GAAE;AACtC;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,yBAAyB,GAAG,IAAI,IAAI;AACjD,EAAE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,KAAK,QAAQ,EAAE;AAC9D,IAAI,IAAI,gFAAgF,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAC;AACpG,GAAG;AACH,EAAE,MAAM,UAAU,GAAG,GAAE;AACvB,EAAE,MAAM,OAAO,GAAG,GAAE;AACpB;AACA,EAAE,IAAI,CAAC,GAAG,EAAC;AACX,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/B,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,E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/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.d.ts deleted file mode 100644 index f0489be..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export const BOLD: symbol; -export const UNBOLD: symbol; -export const BLUE: symbol; -export const GREY: symbol; -export const GREEN: symbol; -export const RED: symbol; -export const PURPLE: symbol; -export const ORANGE: symbol; -export const UNCOLOR: symbol; -export function computeNoColorLoggingArgs(args: Array any)>): Array; -export function createModuleLogger(_print: (...args: any[]) => void, moduleName: string): (...args: any[]) => void; -//# sourceMappingURL=logging.common.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.d.ts.map deleted file mode 100644 index 712b060..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.common.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logging.common.d.ts","sourceRoot":"","sources":["../logging.common.js"],"names":[],"mappings":"AAMA,0BAAmC;AACnC,4BAAqC;AACrC,0BAAmC;AACnC,0BAAmC;AACnC,2BAAoC;AACpC,yBAAkC;AAClC,4BAAqC;AACrC,4BAAqC;AACrC,6BAAsC;AAO/B,gDAHI,KAAK,CAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,IAAC,MAAW,GAAG,CAAA,CAAC,GAC1D,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,SAAS,CAAC,CAgChD;AAaM,2CAJI,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,IAAI,cACrB,MAAM,GACL,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,IAAI,CAyChC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.d.ts deleted file mode 100644 index a768a17..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -export function print(...args: Array): void; -export function warn(...args: Array): void; -export function printError(err: Error): void; -export function printImg(url: string, height: number): void; -export function printImgBase64(base64: string, height: number): void; -export function group(...args: Array): void; -export function groupCollapsed(...args: Array): void; -export function groupEnd(): void; -export function printDom(createNode: () => Node): void; -export function printCanvas(canvas: HTMLCanvasElement, height: number): void; -export const vconsoles: Set; -export class VConsole { - /** - * @param {Element} dom - */ - constructor(dom: Element); - dom: Element; - /** - * @type {Element} - */ - ccontainer: Element; - depth: number; - /** - * @param {Array} args - * @param {boolean} collapsed - */ - group(args: Array, collapsed?: boolean): void; - /** - * @param {Array} args - */ - groupCollapsed(args: Array): void; - groupEnd(): void; - /** - * @param {Array} args - */ - print(args: Array): void; - /** - * @param {Error} err - */ - printError(err: Error): void; - /** - * @param {string} url - * @param {number} height - */ - printImg(url: string, height: number): void; - /** - * @param {Node} node - */ - printDom(node: Node): void; - destroy(): void; -} -export function createVConsole(dom: Element): VConsole; -export function createModuleLogger(moduleName: string): (...args: any[]) => void; -export { BOLD, UNBOLD, BLUE, GREY, GREEN, RED, PURPLE, ORANGE, UNCOLOR } from "./logging.common.js"; -//# sourceMappingURL=logging.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.d.ts.map deleted file mode 100644 index e195ce2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/log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AH,GAAG,EAAA,KAAE,IAAI,CAE6D"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.cjs deleted file mode 100644 index c64ba3d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.cjs +++ /dev/null @@ -1,203 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var environment = require('./environment-1c97264d.cjs'); -var logging_common = require('./logging.common.cjs'); -require('./map-24d263c0.cjs'); -require('./string-fddc5f8b.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./symbol-9c439012.cjs'); -require('./time-d8438852.cjs'); -require('./metric.cjs'); -require('./math-96d5e8c4.cjs'); -require('./json-092190a1.cjs'); - -/** - * Isomorphic logging module with support for colors! - * - * @module logging - */ - -const _nodeStyleMap = { - [logging_common.BOLD]: '\u001b[1m', - [logging_common.UNBOLD]: '\u001b[2m', - [logging_common.BLUE]: '\x1b[34m', - [logging_common.GREEN]: '\x1b[32m', - [logging_common.GREY]: '\u001b[37m', - [logging_common.RED]: '\x1b[31m', - [logging_common.PURPLE]: '\x1b[35m', - [logging_common.ORANGE]: '\x1b[38;5;208m', - [logging_common.UNCOLOR]: '\x1b[0m' -}; - -/* c8 ignore start */ -/** - * @param {Array>} args - * @return {Array} - */ -const computeNodeLoggingArgs = (args) => { - if (args.length === 1 && args[0]?.constructor === Function) { - args = /** @type {Array} */ (/** @type {[function]} */ (args)[0]()); - } - const strBuilder = []; - const logArgs = []; - // try with formatting until we find something unsupported - let i = 0; - for (; i < args.length; i++) { - const arg = args[i]; - // @ts-ignore - const style = _nodeStyleMap[arg]; - if (style !== undefined) { - strBuilder.push(style); - } else { - if (arg === undefined) { - break - } else if (arg.constructor === String || arg.constructor === Number) { - strBuilder.push(arg); - } else { - break - } - } - } - if (i > 0) { - // create logArgs with what we have so far - strBuilder.push('\x1b[0m'); - logArgs.push(strBuilder.join('')); - } - // append the rest - for (; i < args.length; i++) { - const arg = args[i]; - if (!(arg instanceof Symbol)) { - logArgs.push(arg); - } - } - return logArgs -}; -/* c8 ignore stop */ - -/* c8 ignore start */ -const computeLoggingArgs = environment.supportsColor - ? computeNodeLoggingArgs - : logging_common.computeNoColorLoggingArgs; -/* c8 ignore stop */ - -/** - * @param {Array} args - */ -const print = (...args) => { - console.log(...computeLoggingArgs(args)); -}; - -/* c8 ignore start */ -/** - * @param {Array} args - */ -const warn = (...args) => { - console.warn(...computeLoggingArgs(args)); -}; -/* c8 ignore stop */ - -/** - * @param {Error} err - */ -/* c8 ignore start */ -const printError = (err) => { - console.error(err); -}; -/* c8 ignore stop */ - -/** - * @param {string} _url image location - * @param {number} _height height of the image in pixel - */ -/* c8 ignore start */ -const printImg = (_url, _height) => { - // console.log('%c ', `font-size: ${height}x; background: url(${url}) no-repeat;`) -}; -/* c8 ignore stop */ - -/** - * @param {string} base64 - * @param {number} height - */ -/* c8 ignore next 2 */ -const printImgBase64 = (base64, height) => - printImg(); - -/** - * @param {Array} args - */ -/* c8 ignore next 3 */ -const group = (...args) => { - console.group(...computeLoggingArgs(args)); -}; - -/** - * @param {Array} args - */ -/* c8 ignore next 3 */ -const groupCollapsed = (...args) => { - console.groupCollapsed(...computeLoggingArgs(args)); -}; - -/* c8 ignore next 3 */ -const groupEnd = () => { - console.groupEnd(); -}; - -/** - * @param {function():Node} _createNode - */ -/* c8 ignore next 2 */ -const printDom = (_createNode) => {}; - -/** - * @param {HTMLCanvasElement} canvas - * @param {number} height - */ -/* c8 ignore next 2 */ -const printCanvas = (canvas, height) => - printImg(canvas.toDataURL()); - -/** - * @param {Element} _dom - */ -/* c8 ignore next */ -const createVConsole = (_dom) => {}; - -/** - * @param {string} moduleName - * @return {function(...any):void} - */ -/* c8 ignore next */ -const createModuleLogger = (moduleName) => logging_common.createModuleLogger(print, moduleName); - -exports.BLUE = logging_common.BLUE; -exports.BOLD = logging_common.BOLD; -exports.GREEN = logging_common.GREEN; -exports.GREY = logging_common.GREY; -exports.ORANGE = logging_common.ORANGE; -exports.PURPLE = logging_common.PURPLE; -exports.RED = logging_common.RED; -exports.UNBOLD = logging_common.UNBOLD; -exports.UNCOLOR = logging_common.UNCOLOR; -exports.createModuleLogger = createModuleLogger; -exports.createVConsole = createVConsole; -exports.group = group; -exports.groupCollapsed = groupCollapsed; -exports.groupEnd = groupEnd; -exports.print = print; -exports.printCanvas = printCanvas; -exports.printDom = printDom; -exports.printError = printError; -exports.printImg = printImg; -exports.printImgBase64 = printImgBase64; -exports.warn = warn; -//# sourceMappingURL=logging.node.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.cjs.map deleted file mode 100644 index ac495f3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logging.node.cjs","sources":["../logging.node.js"],"sourcesContent":["/**\n * Isomorphic logging module with support for colors!\n *\n * @module logging\n */\n\nimport * as env from './environment.js'\nimport * as common from './logging.common.js'\n\nexport { BOLD, UNBOLD, BLUE, GREY, GREEN, RED, PURPLE, ORANGE, UNCOLOR } from './logging.common.js'\n\nconst _nodeStyleMap = {\n [common.BOLD]: '\\u001b[1m',\n [common.UNBOLD]: '\\u001b[2m',\n [common.BLUE]: '\\x1b[34m',\n [common.GREEN]: '\\x1b[32m',\n [common.GREY]: '\\u001b[37m',\n [common.RED]: '\\x1b[31m',\n [common.PURPLE]: '\\x1b[35m',\n [common.ORANGE]: '\\x1b[38;5;208m',\n [common.UNCOLOR]: '\\x1b[0m'\n}\n\n/* c8 ignore start */\n/**\n * @param {Array>} args\n * @return {Array}\n */\nconst computeNodeLoggingArgs = (args) => {\n if (args.length === 1 && args[0]?.constructor === Function) {\n args = /** @type {Array} */ (/** @type {[function]} */ (args)[0]())\n }\n const strBuilder = []\n const logArgs = []\n // try with formatting until we find something unsupported\n let i = 0\n for (; i < args.length; i++) {\n const arg = args[i]\n // @ts-ignore\n const style = _nodeStyleMap[arg]\n if (style !== undefined) {\n strBuilder.push(style)\n } else {\n if (arg === undefined) {\n break\n } else if (arg.constructor === String || arg.constructor === Number) {\n strBuilder.push(arg)\n } else {\n break\n }\n }\n }\n if (i > 0) {\n // create logArgs with what we have so far\n strBuilder.push('\\x1b[0m')\n logArgs.push(strBuilder.join(''))\n }\n // append the rest\n for (; i < args.length; i++) {\n const arg = args[i]\n if (!(arg instanceof Symbol)) {\n logArgs.push(arg)\n }\n }\n return logArgs\n}\n/* c8 ignore stop */\n\n/* c8 ignore start */\nconst computeLoggingArgs = env.supportsColor\n ? computeNodeLoggingArgs\n : common.computeNoColorLoggingArgs\n/* c8 ignore stop */\n\n/**\n * @param {Array} args\n */\nexport const print = (...args) => {\n console.log(...computeLoggingArgs(args))\n}\n\n/* c8 ignore start */\n/**\n * @param {Array} args\n */\nexport const warn = (...args) => {\n console.warn(...computeLoggingArgs(args))\n}\n/* c8 ignore stop */\n\n/**\n * @param {Error} err\n */\n/* c8 ignore start */\nexport const printError = (err) => {\n console.error(err)\n}\n/* c8 ignore stop */\n\n/**\n * @param {string} _url image location\n * @param {number} _height height of the image in pixel\n */\n/* c8 ignore start */\nexport const printImg = (_url, _height) => {\n // console.log('%c ', `font-size: ${height}x; background: url(${url}) no-repeat;`)\n}\n/* c8 ignore stop */\n\n/**\n * @param {string} base64\n * @param {number} height\n */\n/* c8 ignore next 2 */\nexport const printImgBase64 = (base64, height) =>\n printImg(`data:image/gif;base64,${base64}`, height)\n\n/**\n * @param {Array} args\n */\n/* c8 ignore next 3 */\nexport const group = (...args) => {\n console.group(...computeLoggingArgs(args))\n}\n\n/**\n * @param {Array} args\n */\n/* c8 ignore next 3 */\nexport const groupCollapsed = (...args) => {\n console.groupCollapsed(...computeLoggingArgs(args))\n}\n\n/* c8 ignore next 3 */\nexport const groupEnd = () => {\n console.groupEnd()\n}\n\n/**\n * @param {function():Node} _createNode\n */\n/* c8 ignore next 2 */\nexport const printDom = (_createNode) => {}\n\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {number} height\n */\n/* c8 ignore next 2 */\nexport const printCanvas = (canvas, height) =>\n printImg(canvas.toDataURL(), height)\n\n/**\n * @param {Element} _dom\n */\n/* c8 ignore next */\nexport const createVConsole = (_dom) => {}\n\n/**\n * @param {string} moduleName\n * @return {function(...any):void}\n */\n/* c8 ignore next */\nexport const createModuleLogger = (moduleName) => common.createModuleLogger(print, moduleName)\n"],"names":["common.BOLD","common.UNBOLD","common.BLUE","common.GREEN","common.GREY","common.RED","common.PURPLE","common.ORANGE","common.UNCOLOR","env.supportsColor","common.computeNoColorLoggingArgs","common.createModuleLogger"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAMA;AACA,MAAM,aAAa,GAAG;AACtB,EAAE,CAACA,mBAAW,GAAG,WAAW;AAC5B,EAAE,CAACC,qBAAa,GAAG,WAAW;AAC9B,EAAE,CAACC,mBAAW,GAAG,UAAU;AAC3B,EAAE,CAACC,oBAAY,GAAG,UAAU;AAC5B,EAAE,CAACC,mBAAW,GAAG,YAAY;AAC7B,EAAE,CAACC,kBAAU,GAAG,UAAU;AAC1B,EAAE,CAACC,qBAAa,GAAG,UAAU;AAC7B,EAAE,CAACC,qBAAa,GAAG,gBAAgB;AACnC,EAAE,CAACC,sBAAc,GAAG,SAAS;AAC7B,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,sBAAsB,GAAG,CAAC,IAAI,KAAK;AACzC,EAAE,IAAI,IAAI,CAAC,MAAM,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AQ,GAAE;AACpB,EAAC;AACD;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,CAAC,WAAW,KAAK,GAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM;AAC1C,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAU,EAAC;AACtC;AACA;AACA;AACA;AACA;AACY,MAAC,cAAc,GAAG,CAAC,IAAI,KAAK,GAAE;AAC1C;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,kBAAkB,GAAG,CAAC,UAAU,KAAKC,iCAAyB,CAAC,KAAK,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.d.ts deleted file mode 100644 index 69edeeb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export function print(...args: Array): void; -export function warn(...args: Array): void; -export function printError(err: Error): void; -export function printImg(_url: string, _height: number): void; -export function printImgBase64(base64: string, height: number): void; -export function group(...args: Array): void; -export function groupCollapsed(...args: Array): void; -export function groupEnd(): void; -export function printDom(_createNode: () => Node): void; -export function printCanvas(canvas: HTMLCanvasElement, height: number): void; -export function createVConsole(_dom: Element): void; -export function createModuleLogger(moduleName: string): (...args: any[]) => void; -export { BOLD, UNBOLD, BLUE, GREY, GREEN, RED, PURPLE, ORANGE, UNCOLOR } from "./logging.common.js"; -//# sourceMappingURL=logging.node.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.d.ts.map deleted file mode 100644 index 380ad71..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logging.node.d.ts","sourceRoot":"","sources":["../logging.node.js"],"names":[],"mappings":"AA6EO,+BAFI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,SAAS,CAAC,QAItD;AAMM,8BAFI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAI5C;AAOM,gCAHI,KAAK,QAKf;AAQM,+BAJI,MAAM,WACN,MAAM,QAKhB;AAQM,uCAJI,MAAM,UACN,MAAM,QAIoC;AAM9C,+BAHI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAK5C;AAMM,wCAHI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAK5C;AAGM,iCAEN;AAMM,sCAHI,MAAW,IAAI,QAGiB;AAOpC,oCAJI,iBAAiB,UACjB,MAAM,QAIqB;AAM/B,qCAHI,OAAO,QAGwB;AAOnC,+CAJI,MAAM,GACL,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,IAAI,CAG6D"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.test.d.ts deleted file mode 100644 index 0bdf329..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testLogging(): void; -export function testModuleLogger(): void; -//# sourceMappingURL=logging.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.test.d.ts.map deleted file mode 100644 index 6c43710..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/logging.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logging.test.d.ts","sourceRoot":"","sources":["../logging.test.js"],"names":[],"mappings":"AAEO,oCAgBN;AAEM,yCAON"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map-24d263c0.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map-24d263c0.cjs deleted file mode 100644 index e9f9146..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map-24d263c0.cjs +++ /dev/null @@ -1,139 +0,0 @@ -'use strict'; - -/** - * Utility module to work with key-value stores. - * - * @module map - */ - -/** - * @template K - * @template V - * @typedef {Map} GlobalMap - */ - -/** - * Creates a new Map instance. - * - * @function - * @return {Map} - * - * @function - */ -const create = () => new Map(); - -/** - * Copy a Map object into a fresh Map object. - * - * @function - * @template K,V - * @param {Map} m - * @return {Map} - */ -const copy = m => { - const r = create(); - m.forEach((v, k) => { r.set(k, v); }); - return r -}; - -/** - * Get map property. Create T if property is undefined and set T on map. - * - * ```js - * const listeners = map.setIfUndefined(events, 'eventName', set.create) - * listeners.add(listener) - * ``` - * - * @function - * @template {Map} MAP - * @template {MAP extends Map ? function():V : unknown} CF - * @param {MAP} map - * @param {MAP extends Map ? K : unknown} key - * @param {CF} createT - * @return {ReturnType} - */ -const setIfUndefined = (map, key, createT) => { - let set = map.get(key); - if (set === undefined) { - map.set(key, set = createT()); - } - return set -}; - -/** - * Creates an Array and populates it with the content of all key-value pairs using the `f(value, key)` function. - * - * @function - * @template K - * @template V - * @template R - * @param {Map} m - * @param {function(V,K):R} f - * @return {Array} - */ -const map = (m, f) => { - const res = []; - for (const [key, value] of m) { - res.push(f(value, key)); - } - return res -}; - -/** - * Tests whether any key-value pairs pass the test implemented by `f(value, key)`. - * - * @todo should rename to some - similarly to Array.some - * - * @function - * @template K - * @template V - * @param {Map} m - * @param {function(V,K):boolean} f - * @return {boolean} - */ -const any = (m, f) => { - for (const [key, value] of m) { - if (f(value, key)) { - return true - } - } - return false -}; - -/** - * Tests whether all key-value pairs pass the test implemented by `f(value, key)`. - * - * @function - * @template K - * @template V - * @param {Map} m - * @param {function(V,K):boolean} f - * @return {boolean} - */ -const all = (m, f) => { - for (const [key, value] of m) { - if (!f(value, key)) { - return false - } - } - return true -}; - -var map$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create, - copy: copy, - setIfUndefined: setIfUndefined, - map: map, - any: any, - all: all -}); - -exports.all = all; -exports.any = any; -exports.copy = copy; -exports.create = create; -exports.map = map; -exports.map$1 = map$1; -exports.setIfUndefined = setIfUndefined; -//# sourceMappingURL=map-24d263c0.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map-24d263c0.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map-24d263c0.cjs.map deleted file mode 100644 index 990eff5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map-24d263c0.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map-24d263c0.cjs","sources":["../map.js"],"sourcesContent":["/**\n * Utility module to work with key-value stores.\n *\n * @module map\n */\n\n/**\n * @template K\n * @template V\n * @typedef {Map} GlobalMap\n */\n\n/**\n * Creates a new Map instance.\n *\n * @function\n * @return {Map}\n *\n * @function\n */\nexport const create = () => new Map()\n\n/**\n * Copy a Map object into a fresh Map object.\n *\n * @function\n * @template K,V\n * @param {Map} m\n * @return {Map}\n */\nexport const copy = m => {\n const r = create()\n m.forEach((v, k) => { r.set(k, v) })\n return r\n}\n\n/**\n * Get map property. Create T if property is undefined and set T on map.\n *\n * ```js\n * const listeners = map.setIfUndefined(events, 'eventName', set.create)\n * listeners.add(listener)\n * ```\n *\n * @function\n * @template {Map} MAP\n * @template {MAP extends Map ? function():V : unknown} CF\n * @param {MAP} map\n * @param {MAP extends Map ? K : unknown} key\n * @param {CF} createT\n * @return {ReturnType}\n */\nexport const setIfUndefined = (map, key, createT) => {\n let set = map.get(key)\n if (set === undefined) {\n map.set(key, set = createT())\n }\n return set\n}\n\n/**\n * Creates an Array and populates it with the content of all key-value pairs using the `f(value, key)` function.\n *\n * @function\n * @template K\n * @template V\n * @template R\n * @param {Map} m\n * @param {function(V,K):R} f\n * @return {Array}\n */\nexport const map = (m, f) => {\n const res = []\n for (const [key, value] of m) {\n res.push(f(value, key))\n }\n return res\n}\n\n/**\n * Tests whether any key-value pairs pass the test implemented by `f(value, key)`.\n *\n * @todo should rename to some - similarly to Array.some\n *\n * @function\n * @template K\n * @template V\n * @param {Map} m\n * @param {function(V,K):boolean} f\n * @return {boolean}\n */\nexport const any = (m, f) => {\n for (const [key, value] of m) {\n if (f(value, key)) {\n return true\n }\n }\n return false\n}\n\n/**\n * Tests whether all key-value pairs pass the test implemented by `f(value, key)`.\n *\n * @function\n * @template K\n * @template V\n * @param {Map} m\n * @param {function(V,K):boolean} f\n * @return {boolean}\n */\nexport const all = (m, f) => {\n for (const [key, value] of m) {\n if (!f(value, key)) {\n return false\n }\n }\n return true\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,IAAI,GAAG,GAAE;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,IAAI;AACzB,EAAE,MAAM,CAAC,GAAG,MAAM,GAAE;AACpB,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,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,KAAK;AAC7B,EAAE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE;AAChC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;AACxB,MAAM,OAAO,KAAK;AAClB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,IAAI;AACb;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.cjs deleted file mode 100644 index 3542805..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.cjs +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var map = require('./map-24d263c0.cjs'); - - - -exports.all = map.all; -exports.any = map.any; -exports.copy = map.copy; -exports.create = map.create; -exports.map = map.map; -exports.setIfUndefined = map.setIfUndefined; -//# sourceMappingURL=map.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.cjs.map deleted file mode 100644 index 26c68a0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.d.ts deleted file mode 100644 index f1f216e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function create(): Map; -export function copy(m: Map): Map; -export function setIfUndefined, CF extends MAP extends Map ? () => V : unknown>(map: MAP, key: MAP extends Map ? K : unknown, createT: CF): ReturnType; -export function map(m: Map, f: (arg0: V, arg1: K) => R): Array; -export function any(m: Map, f: (arg0: V, arg1: K) => boolean): boolean; -export function all(m: Map, f: (arg0: V, arg1: K) => boolean): boolean; -export type GlobalMap = Map; -//# sourceMappingURL=map.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.d.ts.map deleted file mode 100644 index 64a9f60..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../map.js"],"names":[],"mappings":"AAoBO,0BAJK,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAIY;AAU9B,qBAJM,CAAC,EAAC,CAAC,KACL,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,GACP,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAMnB;AAkBM,+BAPsB,GAAG,SAAlB,GAAG,CAAC,GAAG,EAAE,GAAG,CAAE,EACyC,EAAE,SAAzD,GAAG,SAAS,GAAG,CAAC,GAAG,EAAC,MAAM,CAAC,CAAC,GAAG,MAAW,CAAC,GAAG,OAAQ,OACzD,GAAG,OACH,GAAG,SAAS,GAAG,CAAC,MAAM,CAAC,EAAC,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,WAC1C,EAAE,GACD,UAAU,CAAC,EAAE,CAAC,CAQzB;AAaM,oBAPM,CAAC,EACD,CAAC,EACD,CAAC,KACH,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,KACR,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,CAAC,GACd,KAAK,CAAC,CAAC,CAAC,CAQnB;AAcM,oBANM,CAAC,EACD,CAAC,KACH,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,KACR,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,OAAO,GACpB,OAAO,CASlB;AAYM,oBANM,CAAC,EACD,CAAC,KACH,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,KACR,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,OAAO,GACpB,OAAO,CASlB;sBA9GY,CAAC,EACD,CAAC,IACD,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.test.d.ts deleted file mode 100644 index ca8dbcc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.test.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function testMap(_tc: t.TestCase): void; -export function testTypeDefinitions(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=map.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.test.d.ts.map deleted file mode 100644 index a8cde1c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/map.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.test.d.ts","sourceRoot":"","sources":["../map.test.js"],"names":[],"mappings":"AAOO,6BAFI,CAAC,CAAC,QAAQ,QAsBpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,QAwBpB;mBApDkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math-96d5e8c4.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math-96d5e8c4.cjs deleted file mode 100644 index 5ced2bc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math-96d5e8c4.cjs +++ /dev/null @@ -1,103 +0,0 @@ -'use strict'; - -/** - * Common Math expressions. - * - * @module math - */ - -const floor = Math.floor; -const ceil = Math.ceil; -const abs = Math.abs; -const imul = Math.imul; -const round = Math.round; -const log10 = Math.log10; -const log2 = Math.log2; -const log = Math.log; -const sqrt = Math.sqrt; - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The sum of a and b - */ -const add = (a, b) => a + b; - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The smaller element of a and b - */ -const min = (a, b) => a < b ? a : b; - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The bigger element of a and b - */ -const max = (a, b) => a > b ? a : b; - -const isNaN = Number.isNaN; - -const pow = Math.pow; -/** - * Base 10 exponential function. Returns the value of 10 raised to the power of pow. - * - * @param {number} exp - * @return {number} - */ -const exp10 = exp => Math.pow(10, exp); - -const sign = Math.sign; - -/** - * Check whether n is negative, while considering the -0 edge case. While `-0 < 0` is false, this - * function returns true for -0,-1,,.. and returns false for 0,1,2,... - * @param {number} n - * @return {boolean} Wether n is negative. This function also distinguishes between -0 and +0 - */ -const isNegativeZero = n => n !== 0 ? n < 0 : 1 / n < 0; - -var math = /*#__PURE__*/Object.freeze({ - __proto__: null, - floor: floor, - ceil: ceil, - abs: abs, - imul: imul, - round: round, - log10: log10, - log2: log2, - log: log, - sqrt: sqrt, - add: add, - min: min, - max: max, - isNaN: isNaN, - pow: pow, - exp10: exp10, - sign: sign, - isNegativeZero: isNegativeZero -}); - -exports.abs = abs; -exports.add = add; -exports.ceil = ceil; -exports.exp10 = exp10; -exports.floor = floor; -exports.imul = imul; -exports.isNaN = isNaN; -exports.isNegativeZero = isNegativeZero; -exports.log = log; -exports.log10 = log10; -exports.log2 = log2; -exports.math = math; -exports.max = max; -exports.min = min; -exports.pow = pow; -exports.round = round; -exports.sign = sign; -exports.sqrt = sqrt; -//# sourceMappingURL=math-96d5e8c4.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math-96d5e8c4.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math-96d5e8c4.cjs.map deleted file mode 100644 index 3581431..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math-96d5e8c4.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"math-96d5e8c4.cjs","sources":["../math.js"],"sourcesContent":["/**\n * Common Math expressions.\n *\n * @module math\n */\n\nexport const floor = Math.floor\nexport const ceil = Math.ceil\nexport const abs = Math.abs\nexport const imul = Math.imul\nexport const round = Math.round\nexport const log10 = Math.log10\nexport const log2 = Math.log2\nexport const log = Math.log\nexport const sqrt = Math.sqrt\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The sum of a and b\n */\nexport const add = (a, b) => a + b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The smaller element of a and b\n */\nexport const min = (a, b) => a < b ? a : b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The bigger element of a and b\n */\nexport const max = (a, b) => a > b ? a : b\n\nexport const isNaN = Number.isNaN\n\nexport const pow = Math.pow\n/**\n * Base 10 exponential function. Returns the value of 10 raised to the power of pow.\n *\n * @param {number} exp\n * @return {number}\n */\nexport const exp10 = exp => Math.pow(10, exp)\n\nexport const sign = Math.sign\n\n/**\n * Check whether n is negative, while considering the -0 edge case. While `-0 < 0` is false, this\n * function returns true for -0,-1,,.. and returns false for 0,1,2,...\n * @param {number} n\n * @return {boolean} Wether n is negative. This function also distinguishes between -0 and +0\n */\nexport const isNegativeZero = n => n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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.cjs deleted file mode 100644 index 197d13c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.cjs +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var math = require('./math-96d5e8c4.cjs'); - - - -exports.abs = math.abs; -exports.add = math.add; -exports.ceil = math.ceil; -exports.exp10 = math.exp10; -exports.floor = math.floor; -exports.imul = math.imul; -exports.isNaN = math.isNaN; -exports.isNegativeZero = math.isNegativeZero; -exports.log = math.log; -exports.log10 = math.log10; -exports.log2 = math.log2; -exports.max = math.max; -exports.min = math.min; -exports.pow = math.pow; -exports.round = math.round; -exports.sign = math.sign; -exports.sqrt = math.sqrt; -//# sourceMappingURL=math.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.cjs.map deleted file mode 100644 index 3e597d7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"math.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.d.ts deleted file mode 100644 index 7490f90..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Common Math expressions. - * - * @module math - */ -export const floor: (x: number) => number; -export const ceil: (x: number) => number; -export const abs: (x: number) => number; -export const imul: (x: number, y: number) => number; -export const round: (x: number) => number; -export const log10: (x: number) => number; -export const log2: (x: number) => number; -export const log: (x: number) => number; -export const sqrt: (x: number) => number; -export function add(a: number, b: number): number; -export function min(a: number, b: number): number; -export function max(a: number, b: number): number; -export const isNaN: (number: unknown) => boolean; -export const pow: (x: number, y: number) => number; -export function exp10(exp: number): number; -export const sign: (x: number) => number; -export function isNegativeZero(n: number): boolean; -//# sourceMappingURL=math.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.d.ts.map deleted file mode 100644 index db6fa61..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../math.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,0CAA+B;AAC/B,yCAA6B;AAC7B,wCAA2B;AAC3B,oDAA6B;AAC7B,0CAA+B;AAC/B,0CAA+B;AAC/B,yCAA6B;AAC7B,wCAA2B;AAC3B,yCAA6B;AAQtB,uBAJI,MAAM,KACN,MAAM,GACL,MAAM,CAEgB;AAQ3B,uBAJI,MAAM,KACN,MAAM,GACL,MAAM,CAEwB;AAQnC,uBAJI,MAAM,KACN,MAAM,GACL,MAAM,CAEwB;AAE1C,iDAAiC;AAEjC,mDAA2B;AAOpB,2BAHI,MAAM,GACL,MAAM,CAE2B;AAE7C,yCAA6B;AAQtB,kCAHI,MAAM,GACL,OAAO,CAE2C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.test.d.ts deleted file mode 100644 index ff01d80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testMath(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=math.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.test.d.ts.map deleted file mode 100644 index 2d45428..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/math.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"math.test.d.ts","sourceRoot":"","sources":["../math.test.js"],"names":[],"mappings":"AAOO,6BAFI,CAAC,CAAC,QAAQ,QA0BpB;mBA/BkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.cjs deleted file mode 100644 index d651b1f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.cjs +++ /dev/null @@ -1,83 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var math = require('./math-96d5e8c4.cjs'); - -/** - * Utility module to convert metric values. - * - * @module metric - */ - -const yotta = 1e24; -const zetta = 1e21; -const exa = 1e18; -const peta = 1e15; -const tera = 1e12; -const giga = 1e9; -const mega = 1e6; -const kilo = 1e3; -const hecto = 1e2; -const deca = 10; -const deci = 0.1; -const centi = 0.01; -const milli = 1e-3; -const micro = 1e-6; -const nano = 1e-9; -const pico = 1e-12; -const femto = 1e-15; -const atto = 1e-18; -const zepto = 1e-21; -const yocto = 1e-24; - -const prefixUp = ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']; -const prefixDown = ['', 'm', 'μ', 'n', 'p', 'f', 'a', 'z', 'y']; - -/** - * Calculate the metric prefix for a number. Assumes E.g. `prefix(1000) = { n: 1, prefix: 'k' }` - * - * @param {number} n - * @param {number} [baseMultiplier] Multiplier of the base (10^(3*baseMultiplier)). E.g. `convert(time, -3)` if time is already in milli seconds - * @return {{n:number,prefix:string}} - */ -const prefix = (n, baseMultiplier = 0) => { - const nPow = n === 0 ? 0 : math.log10(n); - let mult = 0; - while (nPow < mult * 3 && baseMultiplier > -8) { - baseMultiplier--; - mult--; - } - while (nPow >= 3 + mult * 3 && baseMultiplier < 8) { - baseMultiplier++; - mult++; - } - const prefix = baseMultiplier < 0 ? prefixDown[-baseMultiplier] : prefixUp[baseMultiplier]; - return { - n: math.round((mult > 0 ? n / math.exp10(mult * 3) : n * math.exp10(mult * -3)) * 1e12) / 1e12, - prefix - } -}; - -exports.atto = atto; -exports.centi = centi; -exports.deca = deca; -exports.deci = deci; -exports.exa = exa; -exports.femto = femto; -exports.giga = giga; -exports.hecto = hecto; -exports.kilo = kilo; -exports.mega = mega; -exports.micro = micro; -exports.milli = milli; -exports.nano = nano; -exports.peta = peta; -exports.pico = pico; -exports.prefix = prefix; -exports.tera = tera; -exports.yocto = yocto; -exports.yotta = yotta; -exports.zepto = zepto; -exports.zetta = zetta; -//# sourceMappingURL=metric.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.cjs.map deleted file mode 100644 index 7868cc0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metric.cjs","sources":["../metric.js"],"sourcesContent":["/**\n * Utility module to convert metric values.\n *\n * @module metric\n */\n\nimport * as math from './math.js'\n\nexport const yotta = 1e24\nexport const zetta = 1e21\nexport const exa = 1e18\nexport const peta = 1e15\nexport const tera = 1e12\nexport const giga = 1e9\nexport const mega = 1e6\nexport const kilo = 1e3\nexport const hecto = 1e2\nexport const deca = 10\nexport const deci = 0.1\nexport const centi = 0.01\nexport const milli = 1e-3\nexport const micro = 1e-6\nexport const nano = 1e-9\nexport const pico = 1e-12\nexport const femto = 1e-15\nexport const atto = 1e-18\nexport const zepto = 1e-21\nexport const yocto = 1e-24\n\nconst prefixUp = ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']\nconst prefixDown = ['', 'm', 'μ', 'n', 'p', 'f', 'a', 'z', 'y']\n\n/**\n * Calculate the metric prefix for a number. Assumes E.g. `prefix(1000) = { n: 1, prefix: 'k' }`\n *\n * @param {number} n\n * @param {number} [baseMultiplier] Multiplier of the base (10^(3*baseMultiplier)). E.g. `convert(time, -3)` if time is already in milli seconds\n * @return {{n:number,prefix:string}}\n */\nexport const prefix = (n, baseMultiplier = 0) => {\n const nPow = n === 0 ? 0 : math.log10(n)\n let mult = 0\n while (nPow < mult * 3 && baseMultiplier > -8) {\n baseMultiplier--\n mult--\n }\n while (nPow >= 3 + mult * 3 && baseMultiplier < 8) {\n baseMultiplier++\n mult++\n }\n const prefix = baseMultiplier < 0 ? prefixDown[-baseMultiplier] : prefixUp[baseMultiplier]\n return {\n n: math.round((mult > 0 ? n / math.exp10(mult * 3) : n * math.exp10(mult * -3)) * 1e12) / 1e12,\n prefix\n }\n}\n"],"names":["math.log10","math.round","math.exp10"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAGA;AACY,MAAC,KAAK,GAAG,KAAI;AACb,MAAC,KAAK,GAAG,KAAI;AACb,MAAC,GAAG,GAAG,KAAI;AACX,MAAC,IAAI,GAAG,KAAI;AACZ,MAAC,IAAI,GAAG,KAAI;AACZ,MAAC,IAAI,GAAG,IAAG;AACX,MAAC,IAAI,GAAG,IAAG;AACX,MAAC,IAAI,GAAG,IAAG;AACX,MAAC,KAAK,G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AQ,CAAC,cAAc,EAAC;AAC5F,EAAE,OAAO;AACT,IAAI,CAAC,EAAEC,UAAU,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,GAAGC,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,GAAGA,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI;AAClG,IAAI,MAAM;AACV,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.d.ts deleted file mode 100644 index 144f43c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export const yotta: 1e+24; -export const zetta: 1e+21; -export const exa: 1000000000000000000; -export const peta: 1000000000000000; -export const tera: 1000000000000; -export const giga: 1000000000; -export const mega: 1000000; -export const kilo: 1000; -export const hecto: 100; -export const deca: 10; -export const deci: 0.1; -export const centi: 0.01; -export const milli: 0.001; -export const micro: 0.000001; -export const nano: 1e-9; -export const pico: 1e-12; -export const femto: 1e-15; -export const atto: 1e-18; -export const zepto: 1e-21; -export const yocto: 1e-24; -export function prefix(n: number, baseMultiplier?: number): { - n: number; - prefix: string; -}; -//# sourceMappingURL=metric.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.d.ts.map deleted file mode 100644 index 8873adc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metric.d.ts","sourceRoot":"","sources":["../metric.js"],"names":[],"mappings":"AAQA,oBAAqB,KAAI,CAAA;AACzB,oBAAqB,KAAI,CAAA;AACzB,kBAAmB,mBAAI,CAAA;AACvB,mBAAoB,gBAAI,CAAA;AACxB,mBAAoB,aAAI,CAAA;AACxB,mBAAoB,UAAG,CAAA;AACvB,mBAAoB,OAAG,CAAA;AACvB,mBAAoB,IAAG,CAAA;AACvB,oBAAqB,GAAG,CAAA;AACxB,mBAAoB,EAAE,CAAA;AACtB,mBAAoB,GAAG,CAAA;AACvB,oBAAqB,IAAI,CAAA;AACzB,oBAAqB,KAAI,CAAA;AACzB,oBAAqB,QAAI,CAAA;AACzB,mBAAoB,IAAI,CAAA;AACxB,mBAAoB,KAAK,CAAA;AACzB,oBAAqB,KAAK,CAAA;AAC1B,mBAAoB,KAAK,CAAA;AACzB,oBAAqB,KAAK,CAAA;AAC1B,oBAAqB,KAAK,CAAA;AAYnB,0BAJI,MAAM,mBACN,MAAM,GACL;IAAC,CAAC,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,MAAM,CAAA;CAAC,CAkBnC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.test.d.ts deleted file mode 100644 index 3672726..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testMetricPrefix(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=metric.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.test.d.ts.map deleted file mode 100644 index b5a2d84..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/metric.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metric.test.d.ts","sourceRoot":"","sources":["../metric.test.js"],"names":[],"mappings":"AAMO,qCAFI,CAAC,CAAC,QAAQ,QA8BpB;mBAlCkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex-63f09c81.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex-63f09c81.cjs deleted file mode 100644 index 5295d3d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex-63f09c81.cjs +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -/** - * Mutual exclude for JavaScript. - * - * @module mutex - */ - -/** - * @callback mutex - * @param {function():void} cb Only executed when this mutex is not in the current stack - * @param {function():void} [elseCb] Executed when this mutex is in the current stack - */ - -/** - * Creates a mutual exclude function with the following property: - * - * ```js - * const mutex = createMutex() - * mutex(() => { - * // This function is immediately executed - * mutex(() => { - * // This function is not executed, as the mutex is already active. - * }) - * }) - * ``` - * - * @return {mutex} A mutual exclude function - * @public - */ -const createMutex = () => { - let token = true; - return (f, g) => { - if (token) { - token = false; - try { - f(); - } finally { - token = true; - } - } else if (g !== undefined) { - g(); - } - } -}; - -var mutex = /*#__PURE__*/Object.freeze({ - __proto__: null, - createMutex: createMutex -}); - -exports.createMutex = createMutex; -exports.mutex = mutex; -//# sourceMappingURL=mutex-63f09c81.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex-63f09c81.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex-63f09c81.cjs.map deleted file mode 100644 index 48c234b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex-63f09c81.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mutex-63f09c81.cjs","sources":["../mutex.js"],"sourcesContent":["/**\n * Mutual exclude for JavaScript.\n *\n * @module mutex\n */\n\n/**\n * @callback mutex\n * @param {function():void} cb Only executed when this mutex is not in the current stack\n * @param {function():void} [elseCb] Executed when this mutex is in the current stack\n */\n\n/**\n * Creates a mutual exclude function with the following property:\n *\n * ```js\n * const mutex = createMutex()\n * mutex(() => {\n * // This function is immediately executed\n * mutex(() => {\n * // This function is not executed, as the mutex is already active.\n * })\n * })\n * ```\n *\n * @return {mutex} A mutual exclude function\n * @public\n */\nexport const createMutex = () => {\n let token = true\n return (f, g) => {\n if (token) {\n token = false\n try {\n f()\n } finally {\n token = true\n }\n } else if (g !== undefined) {\n g()\n }\n }\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,MAAM;AACjC,EAAE,IAAI,KAAK,GAAG,KAAI;AAClB,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK;AACnB,IAAI,IAAI,KAAK,EAAE;AACf,MAAM,KAAK,GAAG,MAAK;AACnB,MAAM,IAAI;AACV,QAAQ,CAAC,GAAE;AACX,OAAO,SAAS;AAChB,QAAQ,KAAK,GAAG,KAAI;AACpB,OAAO;AACP,KAAK,MAAM,IAAI,CAAC,KAAK,SAAS,EAAE;AAChC,MAAM,CAAC,GAAE;AACT,KAAK;AACL,GAAG;AACH;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.cjs deleted file mode 100644 index db550c6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.cjs +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var mutex = require('./mutex-63f09c81.cjs'); - - - -exports.createMutex = mutex.createMutex; -//# sourceMappingURL=mutex.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.cjs.map deleted file mode 100644 index caa21ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mutex.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.d.ts deleted file mode 100644 index 92fd40f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function createMutex(): mutex; -export type mutex = (cb: () => void, elseCb?: (() => void) | undefined) => any; -//# sourceMappingURL=mutex.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.d.ts.map deleted file mode 100644 index 2f72216..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mutex.d.ts","sourceRoot":"","sources":["../mutex.js"],"names":[],"mappings":"AA4BO,+BAHK,KAAK,CAiBhB;yBAlCU,MAAW,IAAI,kBACJ,IAAI"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.test.d.ts deleted file mode 100644 index d58484b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testMutex(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=mutex.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.test.d.ts.map deleted file mode 100644 index 8bd1937..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/mutex.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mutex.test.d.ts","sourceRoot":"","sources":["../mutex.test.js"],"names":[],"mappings":"AAMO,+BAFI,CAAC,CAAC,QAAQ,QAmBpB;mBAvBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number-1fb57bba.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number-1fb57bba.cjs deleted file mode 100644 index e30b2d5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number-1fb57bba.cjs +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -var math = require('./math-96d5e8c4.cjs'); -var binary = require('./binary-ac8e39e2.cjs'); - -/** - * Utility helpers for working with numbers. - * - * @module number - */ - -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER; -const MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER; - -const LOWEST_INT32 = 1 << 31; -const HIGHEST_INT32 = binary.BITS31; -const HIGHEST_UINT32 = binary.BITS32; - -/* c8 ignore next */ -const isInteger = Number.isInteger || (num => typeof num === 'number' && isFinite(num) && math.floor(num) === num); -const isNaN = Number.isNaN; -const parseInt = Number.parseInt; - -/** - * Count the number of "1" bits in an unsigned 32bit number. - * - * Super fun bitcount algorithm by Brian Kernighan. - * - * @param {number} n - */ -const countBits = n => { - n &= binary.BITS32; - let count = 0; - while (n) { - n &= (n - 1); - count++; - } - return count -}; - -var number = /*#__PURE__*/Object.freeze({ - __proto__: null, - MAX_SAFE_INTEGER: MAX_SAFE_INTEGER, - MIN_SAFE_INTEGER: MIN_SAFE_INTEGER, - LOWEST_INT32: LOWEST_INT32, - HIGHEST_INT32: HIGHEST_INT32, - HIGHEST_UINT32: HIGHEST_UINT32, - isInteger: isInteger, - isNaN: isNaN, - parseInt: parseInt, - countBits: countBits -}); - -exports.HIGHEST_INT32 = HIGHEST_INT32; -exports.HIGHEST_UINT32 = HIGHEST_UINT32; -exports.LOWEST_INT32 = LOWEST_INT32; -exports.MAX_SAFE_INTEGER = MAX_SAFE_INTEGER; -exports.MIN_SAFE_INTEGER = MIN_SAFE_INTEGER; -exports.countBits = countBits; -exports.isInteger = isInteger; -exports.isNaN = isNaN; -exports.number = number; -exports.parseInt = parseInt; -//# sourceMappingURL=number-1fb57bba.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number-1fb57bba.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number-1fb57bba.cjs.map deleted file mode 100644 index 61118ea..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number-1fb57bba.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"number-1fb57bba.cjs","sources":["../number.js"],"sourcesContent":["/**\n * Utility helpers for working with numbers.\n *\n * @module number\n */\n\nimport * as math from './math.js'\nimport * as binary from './binary.js'\n\nexport const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER\nexport const MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER\n\nexport const LOWEST_INT32 = 1 << 31\nexport const HIGHEST_INT32 = binary.BITS31\nexport const HIGHEST_UINT32 = binary.BITS32\n\n/* c8 ignore next */\nexport const isInteger = Number.isInteger || (num => typeof num === 'number' && isFinite(num) && math.floor(num) === num)\nexport const isNaN = Number.isNaN\nexport const parseInt = Number.parseInt\n\n/**\n * Count the number of \"1\" bits in an unsigned 32bit number.\n *\n * Super fun bitcount algorithm by Brian Kernighan.\n *\n * @param {number} n\n */\nexport const countBits = n => {\n n &= binary.BITS32\n let count = 0\n while (n) {\n n &= (n - 1)\n count++\n }\n return count\n}\n"],"names":["binary.BITS31","binary.BITS32","math.floor"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AAIA;AACY,MAAC,gBAAgB,GAAG,MAAM,CAAC,iBAAgB;AAC3C,MAAC,gBAAgB,GAAG,MAAM,CAAC,iBAAgB;AACvD;AACY,MAAC,YAAY,GAAG,CAAC,IAAI,GAAE;AACvB,MAAC,aAAa,GAAGA,cAAa;AAC9B,MAAC,cAAc,GAAGC,cAAa;AAC3C;AACA;AACY,MAAC,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAIC,UAAU,CAAC,GAAG,CAAC,KAAK,GAAG,EAAC;AAC7G,MAAC,KAAK,GAAG,MAAM,CAAC,MAAK;AACrB,MAAC,QAAQ,GAAG,MAAM,CAAC,SAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,CAAC,IAAI;AAC9B,EAAE,CAAC,IAAID,cAAa;AACpB,EAAE,IAAI,KAAK,GAAG,EAAC;AACf,EAAE,OAAO,CAAC,EAAE;AACZ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAC;AAChB,IAAI,KAAK,GAAE;AACX,GAAG;AACH,EAAE,OAAO,KAAK;AACd;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.cjs deleted file mode 100644 index 45f184b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.cjs +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./math-96d5e8c4.cjs'); -require('./binary-ac8e39e2.cjs'); -var number = require('./number-1fb57bba.cjs'); - - - -exports.HIGHEST_INT32 = number.HIGHEST_INT32; -exports.HIGHEST_UINT32 = number.HIGHEST_UINT32; -exports.LOWEST_INT32 = number.LOWEST_INT32; -exports.MAX_SAFE_INTEGER = number.MAX_SAFE_INTEGER; -exports.MIN_SAFE_INTEGER = number.MIN_SAFE_INTEGER; -exports.countBits = number.countBits; -exports.isInteger = number.isInteger; -exports.isNaN = number.isNaN; -exports.parseInt = number.parseInt; -//# sourceMappingURL=number.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.cjs.map deleted file mode 100644 index 50fed4d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"number.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.d.ts deleted file mode 100644 index 851ba98..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const MAX_SAFE_INTEGER: number; -export const MIN_SAFE_INTEGER: number; -export const LOWEST_INT32: number; -export const HIGHEST_INT32: number; -export const HIGHEST_UINT32: number; -export const isInteger: (number: unknown) => boolean; -export const isNaN: (number: unknown) => boolean; -export const parseInt: (string: string, radix?: number) => number; -export function countBits(n: number): number; -//# sourceMappingURL=number.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.d.ts.map deleted file mode 100644 index a004c5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../number.js"],"names":[],"mappings":"AASA,sCAAuD;AACvD,sCAAuD;AAEvD,kCAAmC;AACnC,mCAA0C;AAC1C,oCAA2C;AAG3C,qDAAyH;AACzH,iDAAiC;AACjC,kEAAuC;AAShC,6BAFI,MAAM,UAUhB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.test.d.ts deleted file mode 100644 index 71df185..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.test.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function testNumber(_tc: t.TestCase): void; -export function testShiftVsDivision(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=number.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.test.d.ts.map deleted file mode 100644 index 63fc50a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/number.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"number.test.d.ts","sourceRoot":"","sources":["../number.test.js"],"names":[],"mappings":"AAQO,gCAFI,CAAC,CAAC,QAAQ,QAiBpB;AAOM,wCAFI,CAAC,CAAC,QAAQ,QA6DpB;mBAzFkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object-c0c9435b.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object-c0c9435b.cjs deleted file mode 100644 index 6ec90d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object-c0c9435b.cjs +++ /dev/null @@ -1,212 +0,0 @@ -'use strict'; - -var equality = require('./equality.cjs'); - -/** - * Utility functions for working with EcmaScript objects. - * - * @module object - */ - -/** - * @return {Object} obj - */ -const create = () => Object.create(null); - -/** - * @param {any} o - * @return {o is { [k:string]:any }} - */ -const isObject = o => typeof o === 'object'; - -/** - * Object.assign - */ -const assign = Object.assign; - -/** - * @param {Object} obj - */ -const keys = Object.keys; - -/** - * @template V - * @param {{[key:string]: V}} obj - * @return {Array} - */ -const values = Object.values; - -/** - * @template V - * @param {{[k:string]:V}} obj - * @param {function(V,string):any} f - */ -const forEach = (obj, f) => { - for (const key in obj) { - f(obj[key], key); - } -}; - -/** - * @todo implement mapToArray & map - * - * @template R - * @param {Object} obj - * @param {function(any,string):R} f - * @return {Array} - */ -const map = (obj, f) => { - const results = []; - for (const key in obj) { - results.push(f(obj[key], key)); - } - return results -}; - -/** - * @deprecated use object.size instead - * @param {Object} obj - * @return {number} - */ -const length = obj => keys(obj).length; - -/** - * @param {Object} obj - * @return {number} - */ -const size = obj => keys(obj).length; - -/** - * @template {{ [key:string|number|symbol]: any }} T - * @param {T} obj - * @param {(v:T[keyof T],k:keyof T)=>boolean} f - * @return {boolean} - */ -const some = (obj, f) => { - for (const key in obj) { - if (f(obj[key], key)) { - return true - } - } - return false -}; - -/** - * @param {Object|null|undefined} obj - */ -const isEmpty = obj => { - // eslint-disable-next-line no-unreachable-loop - for (const _k in obj) { - return false - } - return true -}; - -/** - * @template {{ [key:string|number|symbol]: any }} T - * @param {T} obj - * @param {(v:T[keyof T],k:keyof T)=>boolean} f - * @return {boolean} - */ -const every = (obj, f) => { - for (const key in obj) { - if (!f(obj[key], key)) { - return false - } - } - return true -}; - -/** - * Calls `Object.prototype.hasOwnProperty`. - * - * @param {any} obj - * @param {string|number|symbol} key - * @return {boolean} - */ -const hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key); - -/** - * @param {Object} a - * @param {Object} b - * @return {boolean} - */ -const equalFlat = (a, b) => a === b || (size(a) === size(b) && every(a, (val, key) => (val !== undefined || hasProperty(b, key)) && equality.equals(b[key], val))); - -/** - * Make an object immutable. This hurts performance and is usually not needed if you perform good - * coding practices. - */ -const freeze = Object.freeze; - -/** - * Make an object and all its children immutable. - * This *really* hurts performance and is usually not needed if you perform good coding practices. - * - * @template {any} T - * @param {T} o - * @return {Readonly} - */ -const deepFreeze = (o) => { - for (const key in o) { - const c = o[key]; - if (typeof c === 'object' || typeof c === 'function') { - deepFreeze(o[key]); - } - } - return freeze(o) -}; - -/** - * Get object property. Create T if property is undefined and set T on object. - * - * @function - * @template {object} KV - * @template {keyof KV} [K=keyof KV] - * @param {KV} o - * @param {K} key - * @param {() => KV[K]} createT - * @return {KV[K]} - */ -const setIfUndefined = (o, key, createT) => hasProperty(o, key) ? o[key] : (o[key] = createT()); - -var object = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create, - isObject: isObject, - assign: assign, - keys: keys, - values: values, - forEach: forEach, - map: map, - length: length, - size: size, - some: some, - isEmpty: isEmpty, - every: every, - hasProperty: hasProperty, - equalFlat: equalFlat, - freeze: freeze, - deepFreeze: deepFreeze, - setIfUndefined: setIfUndefined -}); - -exports.assign = assign; -exports.create = create; -exports.deepFreeze = deepFreeze; -exports.equalFlat = equalFlat; -exports.every = every; -exports.forEach = forEach; -exports.freeze = freeze; -exports.hasProperty = hasProperty; -exports.isEmpty = isEmpty; -exports.isObject = isObject; -exports.keys = keys; -exports.length = length; -exports.map = map; -exports.object = object; -exports.setIfUndefined = setIfUndefined; -exports.size = size; -exports.some = some; -exports.values = values; -//# sourceMappingURL=object-c0c9435b.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object-c0c9435b.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object-c0c9435b.cjs.map deleted file mode 100644 index 8d519f0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object-c0c9435b.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"object-c0c9435b.cjs","sources":["../object.js"],"sourcesContent":["import * as equalityTrait from './trait/equality.js'\n\n/**\n * Utility functions for working with EcmaScript objects.\n *\n * @module object\n */\n\n/**\n * @return {Object} obj\n */\nexport const create = () => Object.create(null)\n\n/**\n * @param {any} o\n * @return {o is { [k:string]:any }}\n */\nexport const isObject = o => typeof o === 'object'\n\n/**\n * Object.assign\n */\nexport const assign = Object.assign\n\n/**\n * @param {Object} obj\n */\nexport const keys = Object.keys\n\n/**\n * @template V\n * @param {{[key:string]: V}} obj\n * @return {Array}\n */\nexport const values = Object.values\n\n/**\n * @template V\n * @param {{[k:string]:V}} obj\n * @param {function(V,string):any} f\n */\nexport const forEach = (obj, f) => {\n for (const key in obj) {\n f(obj[key], key)\n }\n}\n\n/**\n * @todo implement mapToArray & map\n *\n * @template R\n * @param {Object} obj\n * @param {function(any,string):R} f\n * @return {Array}\n */\nexport const map = (obj, f) => {\n const results = []\n for (const key in obj) {\n results.push(f(obj[key], key))\n }\n return results\n}\n\n/**\n * @deprecated use object.size instead\n * @param {Object} obj\n * @return {number}\n */\nexport const length = obj => keys(obj).length\n\n/**\n * @param {Object} obj\n * @return {number}\n */\nexport const size = obj => keys(obj).length\n\n/**\n * @template {{ [key:string|number|symbol]: any }} T\n * @param {T} obj\n * @param {(v:T[keyof T],k:keyof T)=>boolean} f\n * @return {boolean}\n */\nexport const some = (obj, f) => {\n for (const key in obj) {\n if (f(obj[key], key)) {\n return true\n }\n }\n return false\n}\n\n/**\n * @param {Object|null|undefined} obj\n */\nexport const isEmpty = obj => {\n // eslint-disable-next-line no-unreachable-loop\n for (const _k in obj) {\n return false\n }\n return true\n}\n\n/**\n * @template {{ [key:string|number|symbol]: any }} T\n * @param {T} obj\n * @param {(v:T[keyof T],k:keyof T)=>boolean} f\n * @return {boolean}\n */\nexport const every = (obj, f) => {\n for (const key in obj) {\n if (!f(obj[key], key)) {\n return false\n }\n }\n return true\n}\n\n/**\n * Calls `Object.prototype.hasOwnProperty`.\n *\n * @param {any} obj\n * @param {string|number|symbol} key\n * @return {boolean}\n */\nexport const hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key)\n\n/**\n * @param {Object} a\n * @param {Object} b\n * @return {boolean}\n */\nexport const equalFlat = (a, b) => a === b || (size(a) === size(b) && every(a, (val, key) => (val !== undefined || hasProperty(b, key)) && equalityTrait.equals(b[key], val)))\n\n/**\n * Make an object immutable. This hurts performance and is usually not needed if you perform good\n * coding practices.\n */\nexport const freeze = Object.freeze\n\n/**\n * Make an object and all its children immutable.\n * This *really* hurts performance and is usually not needed if you perform good coding practices.\n *\n * @template {any} T\n * @param {T} o\n * @return {Readonly}\n */\nexport const deepFreeze = (o) => {\n for (const key in o) {\n const c = o[key]\n if (typeof c === 'object' || typeof c === 'function') {\n deepFreeze(o[key])\n }\n }\n return freeze(o)\n}\n\n/**\n * Get object property. Create T if property is undefined and set T on object.\n *\n * @function\n * @template {object} KV\n * @template {keyof KV} [K=keyof KV]\n * @param {KV} o\n * @param {K} key\n * @param {() => KV[K]} createT\n * @return {KV[K]}\n */\nexport const setIfUndefined = (o, key, createT) => hasProperty(o, key) ? o[key] : (o[key] = createT())\n"],"names":["equalityTrait.equals"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,EAAC;AAC/C;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,SAAQ;AAClD;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,CAAC,OAAM;AACnC;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,MAAM,CAAC,KAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,CAAC,OAAM;AACnC;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK;AACnC,EAAE,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;AACzB,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,EAAC;AACpB,GAAG;AACH,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK;AAC/B,EAAE,MAAM,OAAO,GAAG,GAAE;AACpB,EAAE,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;AACzB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAC;AAClC,GAAG;AACH,EAAE,OAAO,OAAO;AAChB,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,OAAM;AAC7C;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,OAAM;AAC3C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oB,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,EAAC;AAC9K;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,CAAC,OAAM;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,UAAU,GAAG,CAAC,CAAC,KAAK;AACjC,EAAE,KAAK,MAAM,GAAG,IAAI,CAAC,EAAE;AACvB,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAC;AACpB,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE;AAC1D,MAAM,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,EAAC;AACxB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,MAAM,CAAC,CAAC,CAAC;AAClB,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,cAAc,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,KAAK,WAAW,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.cjs deleted file mode 100644 index 7d3ad01..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.cjs +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./equality.cjs'); -var object = require('./object-c0c9435b.cjs'); - - - -exports.assign = object.assign; -exports.create = object.create; -exports.deepFreeze = object.deepFreeze; -exports.equalFlat = object.equalFlat; -exports.every = object.every; -exports.forEach = object.forEach; -exports.freeze = object.freeze; -exports.hasProperty = object.hasProperty; -exports.isEmpty = object.isEmpty; -exports.isObject = object.isObject; -exports.keys = object.keys; -exports.length = object.length; -exports.map = object.map; -exports.setIfUndefined = object.setIfUndefined; -exports.size = object.size; -exports.some = object.some; -exports.values = object.values; -//# sourceMappingURL=object.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.cjs.map deleted file mode 100644 index e07c1fc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"object.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.d.ts deleted file mode 100644 index 59f4dfe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -export function create(): { - [x: string]: any; -}; -export function isObject(o: any): o is { - [k: string]: any; -}; -/** - * Object.assign - */ -export const assign: { - (target: T, source: U): T & U; - (target: T, source1: U, source2: V_1): T & U & V_1; - (target: T, source1: U, source2: V_1, source3: W): T & U & V_1 & W; - (target: object, ...sources: any[]): any; -}; -/** - * @param {Object} obj - */ -export const keys: { - (o: object): string[]; - (o: {}): string[]; -}; -/** - * @template V - * @param {{[key:string]: V}} obj - * @return {Array} - */ -export const values: { - (o: { - [s: string]: T; - } | ArrayLike): T[]; - (o: {}): any[]; -}; -export function forEach(obj: { - [k: string]: V_1; -}, f: (arg0: V_1, arg1: string) => any): void; -export function map(obj: { - [x: string]: any; -}, f: (arg0: any, arg1: string) => R): Array; -export function length(obj: { - [x: string]: any; -}): number; -export function size(obj: { - [x: string]: any; -}): number; -export function some(obj: T, f: (v: T[keyof T], k: keyof T) => boolean): boolean; -export function isEmpty(obj: Object | null | undefined): boolean; -export function every(obj: T, f: (v: T[keyof T], k: keyof T) => boolean): boolean; -export function hasProperty(obj: any, key: string | number | symbol): boolean; -export function equalFlat(a: { - [x: string]: any; -}, b: { - [x: string]: any; -}): boolean; -/** - * Make an object immutable. This hurts performance and is usually not needed if you perform good - * coding practices. - */ -export const freeze: { - (f: T): T; - (o: T): Readonly; - (o: T): Readonly; -}; -export function deepFreeze(o: T): Readonly; -export function setIfUndefined(o: KV, key: K, createT: () => KV[K]): KV[K]; -//# sourceMappingURL=object.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.d.ts.map deleted file mode 100644 index 64f66da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../object.js"],"names":[],"mappings":"AAWO;;EAAwC;AAMxC,4BAHI,GAAG,GACF,CAAC,IAAI;IAAE,CAAC,CAAC,EAAC,MAAM,GAAE,GAAG,CAAA;CAAE,CAEe;AAElD;;GAEG;AACH;;;;;EAAmC;AAEnC;;GAEG;AACH;;;EAA+B;AAE/B;;;;GAIG;AACH;;;;;EAAmC;AAO5B,kCAHI;IAAC,CAAC,CAAC,EAAC,MAAM,GAAE,GAAC,CAAA;CAAC,KACd,CAAS,IAAC,EAAD,GAAC,EAAC,IAAM,EAAN,MAAM,KAAE,GAAG,QAMhC;AAUM,oBALM,CAAC;;MAEH,CAAS,IAAG,EAAH,GAAG,EAAC,IAAM,EAAN,MAAM,KAAE,CAAC,GACrB,KAAK,CAAC,CAAC,CAAC,CAQnB;AAOM;;IAFK,MAAM,CAE2B;AAMtC;;IAFK,MAAM,CAEyB;AAQpC,qBAL4C,CAAC,SAAvC;IAAG,CAAC,GAAG,EAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAG,GAAG,CAAA;CAAG,OACvC,CAAC,KACD,CAAC,CAAC,EAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAC,CAAC,EAAC,MAAM,CAAC,KAAG,OAAO,GAChC,OAAO,CASlB;AAKM,6BAFI,MAAM,GAAC,IAAI,GAAC,SAAS,WAQ/B;AAQM,sBAL4C,CAAC,SAAvC;IAAG,CAAC,GAAG,EAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAG,GAAG,CAAA;CAAG,OACvC,CAAC,KACD,CAAC,CAAC,EAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAC,CAAC,EAAC,MAAM,CAAC,KAAG,OAAO,GAChC,OAAO,CASlB;AASM,iCAJI,GAAG,OACH,MAAM,GAAC,MAAM,GAAC,MAAM,GACnB,OAAO,CAEoE;AAOhF;;;;IAFK,OAAO,CAE2J;AAE9K;;;GAGG;AACH;;;;;;EAAmC;AAU5B,2BAJY,CAAC,qBACT,CAAC,GACA,QAAQ,CAAC,CAAC,CAAC,CAUtB;AAaM,+BAPe,EAAE,SAAX,MAAQ,EACI,CAAC,SAAb,MAAO,EAAG,gBACZ,EAAE,OACF,CAAC,WACD,MAAM,EAAE,CAAC,CAAC,CAAC,GACV,EAAE,CAAC,CAAC,CAAC,CAEqF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.test.d.ts deleted file mode 100644 index 9b50e5f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testEqualFlat(): void; -export function testObject(_tc: t.TestCase): void; -export function testFreeze(_tc: t.TestCase): void; -export function testSetifundefined(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=object.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.test.d.ts.map deleted file mode 100644 index 9e46160..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/object.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"object.test.d.ts","sourceRoot":"","sources":["../object.test.js"],"names":[],"mappings":"AAIO,sCAEN;AAKM,gCAFI,CAAC,CAAC,QAAQ,QA4CpB;AAKM,gCAFI,CAAC,CAAC,QAAQ,QAuBpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QAgBpB;mBAlGkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.cjs deleted file mode 100644 index 2858686..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.cjs +++ /dev/null @@ -1,169 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var map = require('./map-24d263c0.cjs'); -var set = require('./set-5b47859e.cjs'); -var array = require('./array-78849c95.cjs'); - -/** - * Observable class prototype. - * - * @module observable - */ - -/** - * Handles named events. - * @experimental - * - * This is basically a (better typed) duplicate of Observable, which will replace Observable in the - * next release. - * - * @template {{[key in keyof EVENTS]: function(...any):void}} EVENTS - */ -class ObservableV2 { - constructor () { - /** - * Some desc. - * @type {Map>} - */ - this._observers = map.create(); - } - - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - on (name, f) { - map.setIfUndefined(this._observers, /** @type {string} */ (name), set.create).add(f); - return f - } - - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - once (name, f) { - /** - * @param {...any} args - */ - const _f = (...args) => { - this.off(name, /** @type {any} */ (_f)); - f(...args); - }; - this.on(name, /** @type {any} */ (_f)); - } - - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - off (name, f) { - const observers = this._observers.get(name); - if (observers !== undefined) { - observers.delete(f); - if (observers.size === 0) { - this._observers.delete(name); - } - } - } - - /** - * Emit a named event. All registered event listeners that listen to the - * specified name will receive the event. - * - * @todo This should catch exceptions - * - * @template {keyof EVENTS & string} NAME - * @param {NAME} name The event name. - * @param {Parameters} args The arguments that are applied to the event listener. - */ - emit (name, args) { - // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called. - return array.from((this._observers.get(name) || map.create()).values()).forEach(f => f(...args)) - } - - destroy () { - this._observers = map.create(); - } -} - -/* c8 ignore start */ -/** - * Handles named events. - * - * @deprecated - * @template N - */ -class Observable { - constructor () { - /** - * Some desc. - * @type {Map} - */ - this._observers = map.create(); - } - - /** - * @param {N} name - * @param {function} f - */ - on (name, f) { - map.setIfUndefined(this._observers, name, set.create).add(f); - } - - /** - * @param {N} name - * @param {function} f - */ - once (name, f) { - /** - * @param {...any} args - */ - const _f = (...args) => { - this.off(name, _f); - f(...args); - }; - this.on(name, _f); - } - - /** - * @param {N} name - * @param {function} f - */ - off (name, f) { - const observers = this._observers.get(name); - if (observers !== undefined) { - observers.delete(f); - if (observers.size === 0) { - this._observers.delete(name); - } - } - } - - /** - * Emit a named event. All registered event listeners that listen to the - * specified name will receive the event. - * - * @todo This should catch exceptions - * - * @param {N} name The event name. - * @param {Array} args The arguments that are applied to the event listener. - */ - emit (name, args) { - // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called. - return array.from((this._observers.get(name) || map.create()).values()).forEach(f => f(...args)) - } - - destroy () { - this._observers = map.create(); - } -} -/* c8 ignore end */ - -exports.Observable = Observable; -exports.ObservableV2 = ObservableV2; -//# sourceMappingURL=observable.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.cjs.map deleted file mode 100644 index 5579301..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observable.cjs","sources":["../observable.js"],"sourcesContent":["/**\n * Observable class prototype.\n *\n * @module observable\n */\n\nimport * as map from './map.js'\nimport * as set from './set.js'\nimport * as array from './array.js'\n\n/**\n * Handles named events.\n * @experimental\n *\n * This is basically a (better typed) duplicate of Observable, which will replace Observable in the\n * next release.\n *\n * @template {{[key in keyof EVENTS]: function(...any):void}} EVENTS\n */\nexport class ObservableV2 {\n constructor () {\n /**\n * Some desc.\n * @type {Map>}\n */\n this._observers = map.create()\n }\n\n /**\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name\n * @param {EVENTS[NAME]} f\n */\n on (name, f) {\n map.setIfUndefined(this._observers, /** @type {string} */ (name), set.create).add(f)\n return f\n }\n\n /**\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name\n * @param {EVENTS[NAME]} f\n */\n once (name, f) {\n /**\n * @param {...any} args\n */\n const _f = (...args) => {\n this.off(name, /** @type {any} */ (_f))\n f(...args)\n }\n this.on(name, /** @type {any} */ (_f))\n }\n\n /**\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name\n * @param {EVENTS[NAME]} f\n */\n off (name, f) {\n const observers = this._observers.get(name)\n if (observers !== undefined) {\n observers.delete(f)\n if (observers.size === 0) {\n this._observers.delete(name)\n }\n }\n }\n\n /**\n * Emit a named event. All registered event listeners that listen to the\n * specified name will receive the event.\n *\n * @todo This should catch exceptions\n *\n * @template {keyof EVENTS & string} NAME\n * @param {NAME} name The event name.\n * @param {Parameters} args The arguments that are applied to the event listener.\n */\n emit (name, args) {\n // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called.\n return array.from((this._observers.get(name) || map.create()).values()).forEach(f => f(...args))\n }\n\n destroy () {\n this._observers = map.create()\n }\n}\n\n/* c8 ignore start */\n/**\n * Handles named events.\n *\n * @deprecated\n * @template N\n */\nexport class Observable {\n constructor () {\n /**\n * Some desc.\n * @type {Map}\n */\n this._observers = map.create()\n }\n\n /**\n * @param {N} name\n * @param {function} f\n */\n on (name, f) {\n map.setIfUndefined(this._observers, name, set.create).add(f)\n }\n\n /**\n * @param {N} name\n * @param {function} f\n */\n once (name, f) {\n /**\n * @param {...any} args\n */\n const _f = (...args) => {\n this.off(name, _f)\n f(...args)\n }\n this.on(name, _f)\n }\n\n /**\n * @param {N} name\n * @param {function} f\n */\n off (name, f) {\n const observers = this._observers.get(name)\n if (observers !== undefined) {\n observers.delete(f)\n if (observers.size === 0) {\n this._observers.delete(name)\n }\n }\n }\n\n /**\n * Emit a named event. All registered event listeners that listen to the\n * specified name will receive the event.\n *\n * @todo This should catch exceptions\n *\n * @param {N} name The event name.\n * @param {Array} args The arguments that are applied to the event listener.\n */\n emit (name, args) {\n // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called.\n return array.from((this._observers.get(name) || map.create()).values()).forEach(f => f(...args))\n }\n\n destroy () {\n this._observers = map.create()\n }\n}\n/* c8 ignore end */\n"],"names":["map.create","map.setIfUndefined","set.create","array.from"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,YAAY,CAAC;AAC1B,EAAE,WAAW,CAAC,GAAG;AACjB;AACA;AACA;AACA;AACA,IAAI,IAAI,CAAC,UAAU,GAAGA,UAAU,GAAE;AAClC,GA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OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE;AACpB;AACA,IAAI,OAAOC,UAAU,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAIH,UAAU,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AACpG,GAAG;AACH;AACA,EAAE,OAAO,CAAC,GAAG;AACb,IAAI,IAAI,CAAC,UAAU,GAAGA,UAAU,GAAE;AAClC,GAAG;AACH,CAAC;AACD;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.d.ts deleted file mode 100644 index 8d83170..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Handles named events. - * @experimental - * - * This is basically a (better typed) duplicate of Observable, which will replace Observable in the - * next release. - * - * @template {{[key in keyof EVENTS]: function(...any):void}} EVENTS - */ -export class ObservableV2 void; }> { - /** - * Some desc. - * @type {Map>} - */ - _observers: Map>; - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - on(name: NAME, f: EVENTS[NAME]): EVENTS[NAME]; - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - once(name: NAME, f: EVENTS[NAME]): void; - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - off(name: NAME, f: EVENTS[NAME]): void; - /** - * Emit a named event. All registered event listeners that listen to the - * specified name will receive the event. - * - * @todo This should catch exceptions - * - * @template {keyof EVENTS & string} NAME - * @param {NAME} name The event name. - * @param {Parameters} args The arguments that are applied to the event listener. - */ - emit(name: NAME, args: Parameters): void; - destroy(): void; -} -/** - * Handles named events. - * - * @deprecated - * @template N - */ -export class Observable { - /** - * Some desc. - * @type {Map} - */ - _observers: Map; - /** - * @param {N} name - * @param {function} f - */ - on(name: N, f: Function): void; - /** - * @param {N} name - * @param {function} f - */ - once(name: N, f: Function): void; - /** - * @param {N} name - * @param {function} f - */ - off(name: N, f: Function): void; - /** - * Emit a named event. All registered event listeners that listen to the - * specified name will receive the event. - * - * @todo This should catch exceptions - * - * @param {N} name The event name. - * @param {Array} args The arguments that are applied to the event listener. - */ - emit(name: N, args: Array): void; - destroy(): void; -} -//# sourceMappingURL=observable.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.d.ts.map deleted file mode 100644 index de50536..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observable.d.ts","sourceRoot":"","sources":["../observable.js"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH,0BAF8D,MAAM,SAAvD,GAAG,GAAG,IAAI,MAAM,MAAM,GAAG,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,IAAI,GAAE;IAIzD;;;OAGG;IACH,YAFU,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAED;IAGhC;;;;OAIG;IACH,GAJqC,IAAI,SAA3B,MAAM,MAAM,GAAG,MAAO,QACzB,IAAI,KACJ,MAAM,CAAC,IAAI,CAAC,gBAKtB;IAED;;;;OAIG;IACH,KAJqC,IAAI,SAA3B,MAAM,MAAM,GAAG,MAAO,QACzB,IAAI,KACJ,MAAM,CAAC,IAAI,CAAC,QAWtB;IAED;;;;OAIG;IACH,IAJqC,IAAI,SAA3B,MAAM,MAAM,GAAG,MAAO,QACzB,IAAI,KACJ,MAAM,CAAC,IAAI,CAAC,QAUtB;IAED;;;;;;;;;OASG;IACH,KAJqC,IAAI,SAA3B,MAAM,MAAM,GAAG,MAAO,QACzB,IAAI,QACJ,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAKlC;IAED,gBAEC;CACF;AAGD;;;;;GAKG;AACH,wBAFa,CAAC;IAIV;;;OAGG;IACH,YAFU,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAES;IAGhC;;;OAGG;IACH,SAHW,CAAC,qBAKX;IAED;;;OAGG;IACH,WAHW,CAAC,qBAYX;IAED;;;OAGG;IACH,UAHW,CAAC,qBAWX;IAED;;;;;;;;OAQG;IACH,WAHW,CAAC,QACD,KAAK,CAAC,GAAG,CAAC,QAKpB;IAED,gBAEC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.test.d.ts deleted file mode 100644 index 895ebfe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testTypedObservable(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=observable.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.test.d.ts.map deleted file mode 100644 index 0e8e333..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/observable.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observable.test.d.ts","sourceRoot":"","sources":["../observable.test.js"],"names":[],"mappings":"AAMO,yCAFI,CAAC,CAAC,QAAQ,QA6CpB;mBAjDkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair-ab022bc3.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair-ab022bc3.cjs deleted file mode 100644 index 1df371e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair-ab022bc3.cjs +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -/** - * Working with value pairs. - * - * @module pair - */ - -/** - * @template L,R - */ -class Pair { - /** - * @param {L} left - * @param {R} right - */ - constructor (left, right) { - this.left = left; - this.right = right; - } -} - -/** - * @template L,R - * @param {L} left - * @param {R} right - * @return {Pair} - */ -const create = (left, right) => new Pair(left, right); - -/** - * @template L,R - * @param {R} right - * @param {L} left - * @return {Pair} - */ -const createReversed = (right, left) => new Pair(left, right); - -/** - * @template L,R - * @param {Array>} arr - * @param {function(L, R):any} f - */ -const forEach = (arr, f) => arr.forEach(p => f(p.left, p.right)); - -/** - * @template L,R,X - * @param {Array>} arr - * @param {function(L, R):X} f - * @return {Array} - */ -const map = (arr, f) => arr.map(p => f(p.left, p.right)); - -var pair = /*#__PURE__*/Object.freeze({ - __proto__: null, - Pair: Pair, - create: create, - createReversed: createReversed, - forEach: forEach, - map: map -}); - -exports.Pair = Pair; -exports.create = create; -exports.createReversed = createReversed; -exports.forEach = forEach; -exports.map = map; -exports.pair = pair; -//# sourceMappingURL=pair-ab022bc3.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair-ab022bc3.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair-ab022bc3.cjs.map deleted file mode 100644 index 6b99924..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair-ab022bc3.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pair-ab022bc3.cjs","sources":["../pair.js"],"sourcesContent":["/**\n * Working with value pairs.\n *\n * @module pair\n */\n\n/**\n * @template L,R\n */\nexport class Pair {\n /**\n * @param {L} left\n * @param {R} right\n */\n constructor (left, right) {\n this.left = left\n this.right = right\n }\n}\n\n/**\n * @template L,R\n * @param {L} left\n * @param {R} right\n * @return {Pair}\n */\nexport const create = (left, right) => new Pair(left, right)\n\n/**\n * @template L,R\n * @param {R} right\n * @param {L} left\n * @return {Pair}\n */\nexport const createReversed = (right, left) => new Pair(left, right)\n\n/**\n * @template L,R\n * @param {Array>} arr\n * @param {function(L, R):any} f\n */\nexport const forEach = (arr, f) => arr.forEach(p => f(p.left, p.right))\n\n/**\n * @template L,R,X\n * @param {Array>} arr\n * @param {function(L, R):X} f\n * @return {Array}\n */\nexport const map = (arr, f) => arr.map(p => f(p.left, p.right))\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,IAAI,CAAC;AAClB;AACA;AACA;AACA;AACA,EAAE,WAAW,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE;AAC5B,IAAI,IAAI,CAAC,IAAI,GAAG,KAAI;AACpB,IAAI,IAAI,CAAC,KAAK,GAAG,MAAK;AACtB,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,cAAc,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC;AACpE;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,EAAC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.cjs deleted file mode 100644 index f16af58..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.cjs +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var pair = require('./pair-ab022bc3.cjs'); - - - -exports.Pair = pair.Pair; -exports.create = pair.create; -exports.createReversed = pair.createReversed; -exports.forEach = pair.forEach; -exports.map = pair.map; -//# sourceMappingURL=pair.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.cjs.map deleted file mode 100644 index 4ba3e24..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pair.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.d.ts deleted file mode 100644 index 08c917d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Working with value pairs. - * - * @module pair - */ -/** - * @template L,R - */ -export class Pair { - /** - * @param {L} left - * @param {R} right - */ - constructor(left: L, right: R); - left: L; - right: R; -} -export function create(left: L, right: R): Pair; -export function createReversed(right: R, left: L): Pair; -export function forEach(arr: Array>, f: (arg0: L, arg1: R) => any): void; -export function map(arr: Array>, f: (arg0: L, arg1: R) => X): Array; -//# sourceMappingURL=pair.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.d.ts.map deleted file mode 100644 index d1f8095..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pair.d.ts","sourceRoot":"","sources":["../pair.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,kBAFa,CAAC,EAAC,CAAC;IAGd;;;OAGG;IACH,kBAHW,CAAC,SACD,CAAC,EAKX;IAFC,QAAgB;IAChB,SAAkB;CAErB;AAQM,uBALM,CAAC,EAAC,CAAC,QACL,CAAC,SACD,CAAC,GACA,IAAI,CAAC,CAAC,EAAC,CAAC,CAAC,CAEuC;AAQrD,+BALM,CAAC,EAAC,CAAC,SACL,CAAC,QACD,CAAC,GACA,IAAI,CAAC,CAAC,EAAC,CAAC,CAAC,CAE+C;AAO7D,wBAJM,CAAC,EAAC,CAAC,OACL,KAAK,CAAC,IAAI,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,KAChB,CAAS,IAAC,EAAD,CAAC,EAAE,IAAC,EAAD,CAAC,KAAE,GAAG,QAE0C;AAQhE,oBALM,CAAC,EAAC,CAAC,EAAC,CAAC,OACP,KAAK,CAAC,IAAI,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,KAChB,CAAS,IAAC,EAAD,CAAC,EAAE,IAAC,EAAD,CAAC,KAAE,CAAC,GACf,KAAK,CAAC,CAAC,CAAC,CAE2C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.test.d.ts deleted file mode 100644 index ab51b8b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testPair(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=pair.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.test.d.ts.map deleted file mode 100644 index 340e4d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pair.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pair.test.d.ts","sourceRoot":"","sources":["../pair.test.js"],"names":[],"mappings":"AAOO,6BAFI,CAAC,CAAC,QAAQ,QAepB;mBApBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/patience.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/patience.cjs deleted file mode 100644 index 44789f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/patience.cjs +++ /dev/null @@ -1,236 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var map = require('./map-24d263c0.cjs'); -var math = require('./math-96d5e8c4.cjs'); -var array = require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); - -/** - * A very simple diff algorithm. Slightly adapted to support splitting at different stages (e.g. - * first diff lines, then diff words) - * - * https://bramcohen.livejournal.com/73318.html - * - * @experiemantal This API will likely change. - */ - -/** - * Implementation of patience diff. Expects that content is pre-split (e.g. by newline). - * - * @param {Array} as - * @param {Array} bs - * @return {Array<{ index: number, remove: Array, insert: Array}>} changeset @todo should use delta instead - */ -const diff = (as, bs) => { - const { - middleAs, - middleBs, - commonPrefix - } = removeCommonPrefixAndSuffix(as, bs); - return lcs(middleAs, middleBs, commonPrefix) -}; - -/** - * @param {string} a - * @param {string} b - * @param {RegExp|string} _regexp - */ -const diffSplitBy = (a, b, _regexp) => { - const isStringSeparator = typeof _regexp === 'string'; - const separator = isStringSeparator ? _regexp : ''; - const regexp = isStringSeparator ? new RegExp(_regexp, 'g') : _regexp; - const as = splitByRegexp(a, regexp, !isStringSeparator); - const bs = splitByRegexp(b, regexp, !isStringSeparator); - const changes = diff(as, bs); - let prevSplitIndex = 0; - let prevStringIndex = 0; - return changes.map(change => { - for (; prevSplitIndex < change.index; prevSplitIndex++) { - prevStringIndex += as[prevSplitIndex].length; - } - return { - index: prevStringIndex, - remove: change.remove.join(separator), - insert: change.insert.join(separator) - } - }) -}; - -/** - * Sensible default for diffing strings using patience (it's fast though). - * - * Perform different types of patience diff on the content. Diff first by newline, then paragraphs, then by word - * (split by space, brackets, punctuation) - * - * @param {string} a - * @param {string} b - */ -const diffAuto = (a, b) => - diffSplitBy(a, b, '\n').map(d => - diffSplitBy(d.remove, d.insert, /\. |[a-zA-Z0-9]+|[. ()[\],;{}]/g).map(dd => ({ - insert: dd.insert, - remove: dd.remove, - index: dd.index + d.index - })) - ).flat(); - -/** - * @param {Array} as - * @param {Array} bs - */ -const removeCommonPrefixAndSuffix = (as, bs) => { - const commonLen = math.min(as.length, bs.length); - let commonPrefix = 0; - let commonSuffix = 0; - // match start - for (; commonPrefix < commonLen && as[commonPrefix] === bs[commonPrefix]; commonPrefix++) { /* nop */ } - // match end - for (; commonSuffix < commonLen - commonPrefix && as[as.length - 1 - commonSuffix] === bs[bs.length - 1 - commonSuffix]; commonSuffix++) { /* nop */ } - const middleAs = as.slice(commonPrefix, as.length - commonSuffix); - const middleBs = bs.slice(commonPrefix, bs.length - commonSuffix); - return { - middleAs, middleBs, commonPrefix, commonSuffix - } -}; - -/** - * Splits string by regex and returns all strings as an array. The matched parts are also returned. - * - * @param {string} str - * @param {RegExp} regexp - * @param {boolean} includeSeparator - */ -const splitByRegexp = (str, regexp, includeSeparator) => { - const matches = [...str.matchAll(regexp)]; - let prevIndex = 0; - /** - * @type {Array} - */ - const res = []; - matches.forEach(m => { - prevIndex < (m.index || 0) && res.push(str.slice(prevIndex, m.index)); - includeSeparator && res.push(m[0]); // is always non-empty - prevIndex = /** @type {number} */ (m.index) + m[0].length; - }); - const end = str.slice(prevIndex); - end.length > 0 && res.push(end); - return res -}; - -/** - * An item may have multiple occurances (not when matching unique entries). It also may have a - * reference to the stack of other items (from as to bs). - */ -class Item { - constructor () { - /** - * @type {Array} - */ - this.indexes = []; - /** - * The matching item from the other side - * @type {Item?} - */ - this.match = null; - /** - * For patience sort. Reference (index of the stack) to the previous pile. - * - * @type {Item?} - */ - this.ref = null; - } -} - -/** - * @param {Array} xs - */ -const partition = xs => { - /** - * @type {Map} - */ - const refs = map.create(); - xs.forEach((x, index) => { - map.setIfUndefined(refs, x, () => new Item()).indexes.push(index); - }); - return refs -}; - -/** - * Find the longest common subsequence of items using patience sort. - * - * @param {Array} as - * @param {Array} bs - * @param {number} indexAdjust - */ -const lcs = (as, bs, indexAdjust) => { - if (as.length === 0 && bs.length === 0) return [] - const aParts = partition(as); - const bParts = partition(bs); - /** - * @type {Array>} I.e. Array> - */ - const piles = []; - aParts.forEach((aItem, aKey) => { - // skip if no match or if either item is not unique - if (aItem.indexes.length > 1 || (aItem.match = bParts.get(aKey) || null) == null || aItem.match.indexes.length > 1) return - for (let i = 0; i < piles.length; i++) { - const pile = piles[i]; - if (aItem.match.indexes[0] < /** @type {Item} */ (pile[pile.length - 1].match).indexes[0]) { - pile.push(aItem); - if (i > 0) aItem.ref = array.last(piles[i - 1]); - return - } - } - piles.length > 0 && (aItem.ref = array.last(piles[piles.length - 1])); - piles.push([aItem]); - }); - /** - * References to all matched items - * - * @type {Array} - */ - const matches = []; - /** - * @type {Item?} - */ - let currPileItem = piles[piles.length - 1]?.[0]; - while (currPileItem != null) { - matches.push(currPileItem); - currPileItem = currPileItem.ref; - } - matches.reverse(); - // add pseude match (assume the string terminal always matches) - const pseudoA = new Item(); - const pseudoB = new Item(); - pseudoA.match = pseudoB; - pseudoA.indexes.push(as.length); - pseudoB.indexes.push(bs.length); - matches.push(pseudoA); - /** - * @type {Array<{ index: number, remove: Array, insert: Array}>} - */ - const changeset = []; - let diffAStart = 0; - let diffBStart = 0; - for (let i = 0; i < matches.length; i++) { - const m = matches[i]; - const delLength = m.indexes[0] - diffAStart; - const insLength = /** @type {Item} */ (m.match).indexes[0] - diffBStart; - if (delLength !== 0 || insLength !== 0) { - const stripped = removeCommonPrefixAndSuffix(as.slice(diffAStart, diffAStart + delLength), bs.slice(diffBStart, diffBStart + insLength)); - if (stripped.middleAs.length !== 0 || stripped.middleBs.length !== 0) { - changeset.push({ index: diffAStart + indexAdjust + stripped.commonPrefix, remove: stripped.middleAs, insert: stripped.middleBs }); - } - } - diffAStart = m.indexes[0] + 1; - diffBStart = /** @type {Item} */ (m.match).indexes[0] + 1; - } - return changeset -}; - -exports.diff = diff; -exports.diffAuto = diffAuto; -exports.diffSplitBy = diffSplitBy; -//# sourceMappingURL=patience.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/patience.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/patience.cjs.map deleted file mode 100644 index 875d1b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/patience.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patience.cjs","sources":["../diff/patience.js"],"sourcesContent":["/**\n * A very simple diff algorithm. Slightly adapted to support splitting at different stages (e.g.\n * first diff lines, then diff words)\n *\n * https://bramcohen.livejournal.com/73318.html\n *\n * @experiemantal This API will likely change.\n */\n\nimport * as map from '../map.js'\nimport * as math from '../math.js'\nimport * as array from '../array.js'\n\n/**\n * Implementation of patience diff. Expects that content is pre-split (e.g. by newline).\n *\n * @param {Array} as\n * @param {Array} bs\n * @return {Array<{ index: number, remove: Array, insert: Array}>} changeset @todo should use delta instead\n */\nexport const diff = (as, bs) => {\n const {\n middleAs,\n middleBs,\n commonPrefix\n } = removeCommonPrefixAndSuffix(as, bs)\n return lcs(middleAs, middleBs, commonPrefix)\n}\n\n/**\n * @param {string} a\n * @param {string} b\n * @param {RegExp|string} _regexp\n */\nexport const diffSplitBy = (a, b, _regexp) => {\n const isStringSeparator = typeof _regexp === 'string'\n const separator = isStringSeparator ? _regexp : ''\n const regexp = isStringSeparator ? new RegExp(_regexp, 'g') : _regexp\n const as = splitByRegexp(a, regexp, !isStringSeparator)\n const bs = splitByRegexp(b, regexp, !isStringSeparator)\n const changes = diff(as, bs)\n let prevSplitIndex = 0\n let prevStringIndex = 0\n return changes.map(change => {\n for (; prevSplitIndex < change.index; prevSplitIndex++) {\n prevStringIndex += as[prevSplitIndex].length\n }\n return {\n index: prevStringIndex,\n remove: change.remove.join(separator),\n insert: change.insert.join(separator)\n }\n })\n}\n\n/**\n * Sensible default for diffing strings using patience (it's fast though).\n *\n * Perform different types of patience diff on the content. Diff first by newline, then paragraphs, then by word\n * (split by space, brackets, punctuation)\n *\n * @param {string} a\n * @param {string} b\n */\nexport const diffAuto = (a, b) =>\n diffSplitBy(a, b, '\\n').map(d =>\n diffSplitBy(d.remove, d.insert, /\\. |[a-zA-Z0-9]+|[. ()[\\],;{}]/g).map(dd => ({\n insert: dd.insert,\n remove: dd.remove,\n index: dd.index + d.index\n }))\n ).flat()\n\n/**\n * @param {Array} as\n * @param {Array} bs\n */\nconst removeCommonPrefixAndSuffix = (as, bs) => {\n const commonLen = math.min(as.length, bs.length)\n let commonPrefix = 0\n let commonSuffix = 0\n // match start\n for (; commonPrefix < commonLen && as[commonPrefix] === bs[commonPrefix]; commonPrefix++) { /* nop */ }\n // match end\n for (; commonSuffix < commonLen - commonPrefix && as[as.length - 1 - commonSuffix] === bs[bs.length - 1 - commonSuffix]; commonSuffix++) { /* nop */ }\n const middleAs = as.slice(commonPrefix, as.length - commonSuffix)\n const middleBs = bs.slice(commonPrefix, bs.length - commonSuffix)\n return {\n middleAs, middleBs, commonPrefix, commonSuffix\n }\n}\n\n/**\n * Splits string by regex and returns all strings as an array. The matched parts are also returned.\n *\n * @param {string} str\n * @param {RegExp} regexp\n * @param {boolean} includeSeparator\n */\nconst splitByRegexp = (str, regexp, includeSeparator) => {\n const matches = [...str.matchAll(regexp)]\n let prevIndex = 0\n /**\n * @type {Array}\n */\n const res = []\n matches.forEach(m => {\n prevIndex < (m.index || 0) && res.push(str.slice(prevIndex, m.index))\n includeSeparator && res.push(m[0]) // is always non-empty\n prevIndex = /** @type {number} */ (m.index) + m[0].length\n })\n const end = str.slice(prevIndex)\n end.length > 0 && res.push(end)\n return res\n}\n\n/**\n * An item may have multiple occurances (not when matching unique entries). It also may have a\n * reference to the stack of other items (from as to bs).\n */\nclass Item {\n constructor () {\n /**\n * @type {Array}\n */\n this.indexes = []\n /**\n * The matching item from the other side\n * @type {Item?}\n */\n this.match = null\n /**\n * For patience sort. Reference (index of the stack) to the previous pile.\n *\n * @type {Item?}\n */\n this.ref = null\n }\n}\n\n/**\n * @param {Array} xs\n */\nconst partition = xs => {\n /**\n * @type {Map}\n */\n const refs = map.create()\n xs.forEach((x, index) => {\n map.setIfUndefined(refs, x, () => new Item()).indexes.push(index)\n })\n return refs\n}\n\n/**\n * Find the longest common subsequence of items using patience sort.\n *\n * @param {Array} as\n * @param {Array} bs\n * @param {number} indexAdjust\n */\nconst lcs = (as, bs, indexAdjust) => {\n if (as.length === 0 && bs.length === 0) return []\n const aParts = partition(as)\n const bParts = partition(bs)\n /**\n * @type {Array>} I.e. Array>\n */\n const piles = []\n aParts.forEach((aItem, aKey) => {\n // skip if no match or if either item is not unique\n if (aItem.indexes.length > 1 || (aItem.match = bParts.get(aKey) || null) == null || aItem.match.indexes.length > 1) return\n for (let i = 0; i < piles.length; i++) {\n const pile = piles[i]\n if (aItem.match.indexes[0] < /** @type {Item} */ (pile[pile.length - 1].match).indexes[0]) {\n pile.push(aItem)\n if (i > 0) aItem.ref = array.last(piles[i - 1])\n return\n }\n }\n piles.length > 0 && (aItem.ref = array.last(piles[piles.length - 1]))\n piles.push([aItem])\n })\n /**\n * References to all matched items\n *\n * @type {Array}\n */\n const matches = []\n /**\n * @type {Item?}\n */\n let currPileItem = piles[piles.length - 1]?.[0]\n while (currPileItem != null) {\n matches.push(currPileItem)\n currPileItem = currPileItem.ref\n }\n matches.reverse()\n // add pseude match (assume the string terminal always matches)\n const pseudoA = new Item()\n const pseudoB = new Item()\n pseudoA.match = pseudoB\n pseudoA.indexes.push(as.length)\n pseudoB.indexes.push(bs.length)\n matches.push(pseudoA)\n /**\n * @type {Array<{ index: number, remove: Array, insert: Array}>}\n */\n const changeset = []\n let diffAStart = 0\n let diffBStart = 0\n for (let i = 0; i < matches.length; i++) {\n const m = matches[i]\n const delLength = m.indexes[0] - diffAStart\n const insLength = /** @type {Item} */ (m.match).indexes[0] - diffBStart\n if (delLength !== 0 || insLength !== 0) {\n const stripped = removeCommonPrefixAndSuffix(as.slice(diffAStart, diffAStart + delLength), bs.slice(diffBStart, diffBStart + insLength))\n if (stripped.middleAs.length !== 0 || stripped.middleBs.length !== 0) {\n changeset.push({ index: diffAStart + indexAdjust + stripped.commonPrefix, remove: stripped.middleAs, insert: stripped.middleBs })\n }\n }\n diffAStart = m.indexes[0] + 1\n diffBStart = /** @type {Item} */ (m.match).indexes[0] + 1\n }\n return changeset\n}\n"],"names":["math.min","map.create","map.setIfUndefined","array.last"],"mappings":";;;;;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,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAC;AACzI,OAAO;AACP,KAAK;AACL,IAAI,UAAU,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAC;AACjC,IAAI,UAAU,uBAAuB,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,EAAC;AAC7D,GAAG;AACH,EAAE,OAAO,SAAS;AAClB;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.cjs deleted file mode 100644 index 641f4d7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.cjs +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -/* eslint-env browser */ - -const measure = performance.measure.bind(performance); -const now = performance.now.bind(performance); -const mark = performance.mark.bind(performance); - -exports.mark = mark; -exports.measure = measure; -exports.now = now; -//# sourceMappingURL=performance.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.cjs.map deleted file mode 100644 index 072c415..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"performance.cjs","sources":["../performance.js"],"sourcesContent":["/* eslint-env browser */\n\nexport const measure = performance.measure.bind(performance)\nexport const now = performance.now.bind(performance)\nexport const mark = performance.mark.bind(performance)\n"],"names":[],"mappings":";;;;AAAA;AACA;AACY,MAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAC;AAChD,MAAC,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAC;AACxC,MAAC,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.d.ts deleted file mode 100644 index 0226088..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const measure: (measureName: string, startOrMeasureOptions?: string | PerformanceMeasureOptions, endMark?: string) => PerformanceMeasure; -export const now: () => DOMHighResTimeStamp; -export const mark: (markName: string, markOptions?: PerformanceMarkOptions) => PerformanceMark; -//# sourceMappingURL=performance.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.d.ts.map deleted file mode 100644 index d5d5311..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../performance.js"],"names":[],"mappings":"AAEA,gJAA4D;AAC5D,4CAAoD;AACpD,+FAAsD"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.cjs deleted file mode 100644 index d097aa3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.cjs +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var node_perf_hooks = require('node:perf_hooks'); -var _function = require('./function-314580f7.cjs'); -var time = require('./time-d8438852.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./metric.cjs'); -require('./math-96d5e8c4.cjs'); - -/** - * @type {typeof performance.measure} - */ -/* c8 ignore next */ -const measure = node_perf_hooks.performance.measure ? node_perf_hooks.performance.measure.bind(node_perf_hooks.performance) : /** @type {any} */ (_function.nop); - -/** - * @type {typeof performance.now} - */ -/* c8 ignore next */ -const now = node_perf_hooks.performance.now ? node_perf_hooks.performance.now.bind(node_perf_hooks.performance) : time.getUnixTime; - -/** - * @type {typeof performance.mark} - */ -/* c8 ignore next */ -const mark = node_perf_hooks.performance.mark ? node_perf_hooks.performance.mark.bind(node_perf_hooks.performance) : /** @type {any} */ (_function.nop); - -exports.mark = mark; -exports.measure = measure; -exports.now = now; -//# sourceMappingURL=performance.node.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.cjs.map deleted file mode 100644 index 75c0c33..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"performance.node.cjs","sources":["../performance.node.js"],"sourcesContent":["import { performance } from 'node:perf_hooks'\nimport { nop } from './function.js'\nimport * as time from './time.js'\n\n/**\n * @type {typeof performance.measure}\n */\n/* c8 ignore next */\nexport const measure = performance.measure ? performance.measure.bind(performance) : /** @type {any} */ (nop)\n\n/**\n * @type {typeof performance.now}\n */\n/* c8 ignore next */\nexport const now = performance.now ? performance.now.bind(performance) : time.getUnixTime\n\n/**\n * @type {typeof performance.mark}\n */\n/* c8 ignore next */\nexport const mark = performance.mark ? performance.mark.bind(performance) : /** @type {any} */ (nop)\n"],"names":["performance","nop","time.getUnixTime"],"mappings":";;;;;;;;;;;;;;AAIA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAGA,2BAAW,CAAC,OAAO,GAAGA,2BAAW,CAAC,OAAO,CAAC,IAAI,CAACA,2BAAW,CAAC,uBAAuBC,aAAG,EAAC;AAC7G;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAGD,2BAAW,CAAC,GAAG,GAAGA,2BAAW,CAAC,GAAG,CAAC,IAAI,CAACA,2BAAW,CAAC,GAAGE,iBAAgB;AACzF;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAGF,2BAAW,CAAC,IAAI,GAAGA,2BAAW,CAAC,IAAI,CAAC,IAAI,CAACA,2BAAW,CAAC,uBAAuBC,aAAG;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.d.ts deleted file mode 100644 index 4458270..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @type {typeof performance.measure} - */ -export const measure: typeof performance.measure; -/** - * @type {typeof performance.now} - */ -export const now: typeof performance.now; -/** - * @type {typeof performance.mark} - */ -export const mark: typeof performance.mark; -import { performance } from 'node:perf_hooks'; -//# sourceMappingURL=performance.node.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.d.ts.map deleted file mode 100644 index 93f4ecb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/performance.node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"performance.node.d.ts","sourceRoot":"","sources":["../performance.node.js"],"names":[],"mappings":"AAIA;;GAEG;AAEH,sBAHU,OAAO,WAAW,CAAC,OAAO,CAGyE;AAE7G;;GAEG;AAEH,kBAHU,OAAO,WAAW,CAAC,GAAG,CAGyD;AAEzF;;GAEG;AAEH,mBAHU,OAAO,WAAW,CAAC,IAAI,CAGmE;4BApBxE,iBAAiB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.cjs deleted file mode 100644 index ee637e0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.cjs +++ /dev/null @@ -1,308 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var queue = require('./queue.cjs'); -var object = require('./object-c0c9435b.cjs'); -require('./equality.cjs'); - -/** - * @experimental Use of this module is not encouraged! - * This is just an experiment. - * @todo remove `c8 ignore` line once this is moved to "non-experimental" - */ - -/* c8 ignore start */ - -/** - * @type {queue.Queuevoid>>} - */ -const ctxFs = queue.create(); - -/** - * @param {() => void} f - */ -const runInGlobalContext = f => { - const isEmpty = queue.isEmpty(ctxFs); - queue.enqueue(ctxFs, new queue.QueueValue(f)); - if (isEmpty) { - while (!queue.isEmpty(ctxFs)) { - /** @type {queue.QueueValue<()=>{}>} */ (ctxFs.start).v(); - queue.dequeue(ctxFs); - } - } -}; - -/** - * @template V - * @typedef {V | PledgeInstance} Pledge - */ - -/** - * @template {any} Val - * @template {any} [CancelReason=Error] - */ -class PledgeInstance { - constructor () { - /** - * @type {Val | CancelReason | null} - */ - this._v = null; - this.isResolved = false; - /** - * @type {Array | null} - */ - this._whenResolved = []; - /** - * @type {Array | null} - */ - this._whenCanceled = []; - } - - get isDone () { - return this._whenResolved === null - } - - get isCanceled () { - return !this.isResolved && this._whenResolved === null - } - - /** - * @param {Val} v - */ - resolve (v) { - const whenResolved = this._whenResolved; - if (whenResolved === null) return - this._v = v; - this.isResolved = true; - this._whenResolved = null; - this._whenCanceled = null; - for (let i = 0; i < whenResolved.length; i++) { - whenResolved[i](v); - } - } - - /** - * @param {CancelReason} reason - */ - cancel (reason) { - const whenCanceled = this._whenCanceled; - if (whenCanceled === null) return - this._v = reason; - this._whenResolved = null; - this._whenCanceled = null; - for (let i = 0; i < whenCanceled.length; i++) { - whenCanceled[i](reason); - } - } - - /** - * @template R - * @param {function(Val):Pledge} f - * @return {PledgeInstance} - */ - map (f) { - /** - * @type {PledgeInstance} - */ - const p = new PledgeInstance(); - this.whenResolved(v => { - const result = f(v); - if (result instanceof PledgeInstance) { - if (result._whenResolved === null) { - result.resolve(/** @type {R} */ (result._v)); - } else { - result._whenResolved.push(p.resolve.bind(p)); - } - } else { - p.resolve(result); - } - }); - return p - } - - /** - * @param {function(Val):void} f - */ - whenResolved (f) { - if (this.isResolved) { - f(/** @type {Val} */ (this._v)); - } else { - this._whenResolved?.push(f); - } - } - - /** - * @param {(reason: CancelReason) => void} f - */ - whenCanceled (f) { - if (this.isCanceled) { - f(/** @type {CancelReason} */ (this._v)); - } else { - this._whenCanceled?.push(f); - } - } - - /** - * @return {Promise} - */ - promise () { - return new Promise((resolve, reject) => { - this.whenResolved(resolve); - this.whenCanceled(reject); - }) - } -} - -/** - * @template T - * @return {PledgeInstance} - */ -const create = () => new PledgeInstance(); - -/** - * @typedef {Array> | Object>} PledgeMap - */ - -/** - * @template {Pledge | PledgeMap} P - * @typedef {P extends PledgeMap ? { [K in keyof P]: P[K] extends Pledge ? V : P[K]} : (P extends Pledge ? V : never)} Resolved

- */ - -/** - * @todo Create a "resolveHelper" that will simplify creating indxeddbv2 functions. Double arguments - * are not necessary. - * - * @template V - * @template {Array>} DEPS - * @param {(p: PledgeInstance, ...deps: Resolved) => void} init - * @param {DEPS} deps - * @return {PledgeInstance} - */ -const createWithDependencies = (init, ...deps) => { - /** - * @type {PledgeInstance} - */ - const p = new PledgeInstance(); - // @ts-ignore @todo remove this - all(deps).whenResolved(ds => init(p, ...ds)); - return p -}; - -/** - * @template R - * @param {Pledge} p - * @param {function(R):void} f - */ -const whenResolved = (p, f) => { - if (p instanceof PledgeInstance) { - return p.whenResolved(f) - } - return f(p) -}; - -/** - * @template {Pledge} P - * @param {P} p - * @param {P extends PledgeInstance ? function(CancelReason):void : function(any):void} f - */ -const whenCanceled = (p, f) => { - if (p instanceof PledgeInstance) { - p.whenCanceled(f); - } -}; - -/** - * @template P - * @template Q - * @param {Pledge

} p - * @param {(r: P) => Q} f - * @return {Pledge} - */ -const map = (p, f) => { - if (p instanceof PledgeInstance) { - return p.map(f) - } - return f(p) -}; - -/** - * @template {PledgeMap} PS - * @param {PS} ps - * @return {PledgeInstance>} - */ -const all = ps => { - /** - * @type {any} - */ - const pall = create(); - /** - * @type {any} - */ - const result = ps instanceof Array ? new Array(ps.length) : {}; - let waitingPs = ps instanceof Array ? ps.length : object.size(ps); - for (const key in ps) { - const p = ps[key]; - whenResolved(p, r => { - result[key] = r; - if (--waitingPs === 0) { - // @ts-ignore - pall.resolve(result); - } - }); - } - return pall -}; - -/** - * @template Result - * @template {any} YieldResults - * @param {() => Generator | PledgeInstance, Result, any>} f - * @return {PledgeInstance} - */ -const coroutine = f => { - const p = create(); - const gen = f(); - /** - * @param {any} [yv] - */ - const handleGen = (yv) => { - const res = gen.next(yv); - if (res.done) { - p.resolve(res.value); - return - } - // @ts-ignore - whenCanceled(res.value, (reason) => { - gen.throw(reason); - }); - runInGlobalContext(() => - whenResolved(res.value, handleGen) - ); - }; - handleGen(); - return p -}; - -/** - * @param {number} timeout - * @return {PledgeInstance} - */ -const wait = timeout => { - const p = create(); - setTimeout(p.resolve.bind(p), timeout); - return p -}; - -/* c8 ignore end */ - -exports.PledgeInstance = PledgeInstance; -exports.all = all; -exports.coroutine = coroutine; -exports.create = create; -exports.createWithDependencies = createWithDependencies; -exports.map = map; -exports.wait = wait; -exports.whenCanceled = whenCanceled; -exports.whenResolved = whenResolved; -//# sourceMappingURL=pledge.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.cjs.map deleted file mode 100644 index aa7dd1c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pledge.cjs","sources":["../pledge.js"],"sourcesContent":["/**\n * @experimental Use of this module is not encouraged!\n * This is just an experiment.\n * @todo remove `c8 ignore` line once this is moved to \"non-experimental\"\n */\n\nimport * as queue from './queue.js'\nimport * as object from './object.js'\n\n/* c8 ignore start */\n\n/**\n * @type {queue.Queuevoid>>}\n */\nconst ctxFs = queue.create()\n\n/**\n * @param {() => void} f\n */\nconst runInGlobalContext = f => {\n const isEmpty = queue.isEmpty(ctxFs)\n queue.enqueue(ctxFs, new queue.QueueValue(f))\n if (isEmpty) {\n while (!queue.isEmpty(ctxFs)) {\n /** @type {queue.QueueValue<()=>{}>} */ (ctxFs.start).v()\n queue.dequeue(ctxFs)\n }\n }\n}\n\n/**\n * @template V\n * @typedef {V | PledgeInstance} Pledge\n */\n\n/**\n * @template {any} Val\n * @template {any} [CancelReason=Error]\n */\nexport class PledgeInstance {\n constructor () {\n /**\n * @type {Val | CancelReason | null}\n */\n this._v = null\n this.isResolved = false\n /**\n * @type {Array | null}\n */\n this._whenResolved = []\n /**\n * @type {Array | null}\n */\n this._whenCanceled = []\n }\n\n get isDone () {\n return this._whenResolved === null\n }\n\n get isCanceled () {\n return !this.isResolved && this._whenResolved === null\n }\n\n /**\n * @param {Val} v\n */\n resolve (v) {\n const whenResolved = this._whenResolved\n if (whenResolved === null) return\n this._v = v\n this.isResolved = true\n this._whenResolved = null\n this._whenCanceled = null\n for (let i = 0; i < whenResolved.length; i++) {\n whenResolved[i](v)\n }\n }\n\n /**\n * @param {CancelReason} reason\n */\n cancel (reason) {\n const whenCanceled = this._whenCanceled\n if (whenCanceled === null) return\n this._v = reason\n this._whenResolved = null\n this._whenCanceled = null\n for (let i = 0; i < whenCanceled.length; i++) {\n whenCanceled[i](reason)\n }\n }\n\n /**\n * @template R\n * @param {function(Val):Pledge} f\n * @return {PledgeInstance}\n */\n map (f) {\n /**\n * @type {PledgeInstance}\n */\n const p = new PledgeInstance()\n this.whenResolved(v => {\n const result = f(v)\n if (result instanceof PledgeInstance) {\n if (result._whenResolved === null) {\n result.resolve(/** @type {R} */ (result._v))\n } else {\n result._whenResolved.push(p.resolve.bind(p))\n }\n } else {\n p.resolve(result)\n }\n })\n return p\n }\n\n /**\n * @param {function(Val):void} f\n */\n whenResolved (f) {\n if (this.isResolved) {\n f(/** @type {Val} */ (this._v))\n } else {\n this._whenResolved?.push(f)\n }\n }\n\n /**\n * @param {(reason: CancelReason) => void} f\n */\n whenCanceled (f) {\n if (this.isCanceled) {\n f(/** @type {CancelReason} */ (this._v))\n } else {\n this._whenCanceled?.push(f)\n }\n }\n\n /**\n * @return {Promise}\n */\n promise () {\n return new Promise((resolve, reject) => {\n this.whenResolved(resolve)\n this.whenCanceled(reject)\n })\n }\n}\n\n/**\n * @template T\n * @return {PledgeInstance}\n */\nexport const create = () => new PledgeInstance()\n\n/**\n * @typedef {Array> | Object>} PledgeMap\n */\n\n/**\n * @template {Pledge | PledgeMap} P\n * @typedef {P extends PledgeMap ? { [K in keyof P]: P[K] extends Pledge ? V : P[K]} : (P extends Pledge ? V : never)} Resolved

\n */\n\n/**\n * @todo Create a \"resolveHelper\" that will simplify creating indxeddbv2 functions. Double arguments\n * are not necessary.\n *\n * @template V\n * @template {Array>} DEPS\n * @param {(p: PledgeInstance, ...deps: Resolved) => void} init\n * @param {DEPS} deps\n * @return {PledgeInstance}\n */\nexport const createWithDependencies = (init, ...deps) => {\n /**\n * @type {PledgeInstance}\n */\n const p = new PledgeInstance()\n // @ts-ignore @todo remove this\n all(deps).whenResolved(ds => init(p, ...ds))\n return p\n}\n\n/**\n * @template R\n * @param {Pledge} p\n * @param {function(R):void} f\n */\nexport const whenResolved = (p, f) => {\n if (p instanceof PledgeInstance) {\n return p.whenResolved(f)\n }\n return f(p)\n}\n\n/**\n * @template {Pledge} P\n * @param {P} p\n * @param {P extends PledgeInstance ? function(CancelReason):void : function(any):void} f\n */\nexport const whenCanceled = (p, f) => {\n if (p instanceof PledgeInstance) {\n p.whenCanceled(f)\n }\n}\n\n/**\n * @template P\n * @template Q\n * @param {Pledge

} p\n * @param {(r: P) => Q} f\n * @return {Pledge}\n */\nexport const map = (p, f) => {\n if (p instanceof PledgeInstance) {\n return p.map(f)\n }\n return f(p)\n}\n\n/**\n * @template {PledgeMap} PS\n * @param {PS} ps\n * @return {PledgeInstance>}\n */\nexport const all = ps => {\n /**\n * @type {any}\n */\n const pall = create()\n /**\n * @type {any}\n */\n const result = ps instanceof Array ? new Array(ps.length) : {}\n let waitingPs = ps instanceof Array ? ps.length : object.size(ps)\n for (const key in ps) {\n const p = ps[key]\n whenResolved(p, r => {\n result[key] = r\n if (--waitingPs === 0) {\n // @ts-ignore\n pall.resolve(result)\n }\n })\n }\n return pall\n}\n\n/**\n * @template Result\n * @template {any} YieldResults\n * @param {() => Generator | PledgeInstance, Result, any>} f\n * @return {PledgeInstance}\n */\nexport const coroutine = f => {\n const p = create()\n const gen = f()\n /**\n * @param {any} [yv]\n */\n const handleGen = (yv) => {\n const res = gen.next(yv)\n if (res.done) {\n p.resolve(res.value)\n return\n }\n // @ts-ignore\n whenCanceled(res.value, (reason) => {\n gen.throw(reason)\n })\n runInGlobalContext(() =>\n whenResolved(res.value, handleGen)\n )\n }\n handleGen()\n return p\n}\n\n/**\n * @param {number} timeout\n * @return {PledgeInstance}\n */\nexport const wait = timeout => {\n const p = create()\n setTimeout(p.resolve.bind(p), timeout)\n return p\n}\n\n/* c8 ignore end */\n"],"names":["queue.create","queue.isEmpty","queue.enqueue","queue.QueueValue","queue.dequeue","object.size"],"mappings":";;;;;;;;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AAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAC;AACxC,EAAE,OAAO,CAAC;AACV,EAAC;AACD;AACA;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.d.ts deleted file mode 100644 index c8dcfb7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @template V - * @typedef {V | PledgeInstance} Pledge - */ -/** - * @template {any} Val - * @template {any} [CancelReason=Error] - */ -export class PledgeInstance { - /** - * @type {Val | CancelReason | null} - */ - _v: Val | CancelReason | null; - isResolved: boolean; - /** - * @type {Array | null} - */ - _whenResolved: Array<(arg0: Val) => void> | null; - /** - * @type {Array | null} - */ - _whenCanceled: Array<(arg0: CancelReason) => void> | null; - get isDone(): boolean; - get isCanceled(): boolean; - /** - * @param {Val} v - */ - resolve(v: Val): void; - /** - * @param {CancelReason} reason - */ - cancel(reason: CancelReason): void; - /** - * @template R - * @param {function(Val):Pledge} f - * @return {PledgeInstance} - */ - map(f: (arg0: Val) => Pledge): PledgeInstance; - /** - * @param {function(Val):void} f - */ - whenResolved(f: (arg0: Val) => void): void; - /** - * @param {(reason: CancelReason) => void} f - */ - whenCanceled(f: (reason: CancelReason) => void): void; - /** - * @return {Promise} - */ - promise(): Promise; -} -export function create(): PledgeInstance; -export function createWithDependencies>>(init: (p: PledgeInstance, ...deps: Resolved) => void, ...deps: DEPS): PledgeInstance; -export function whenResolved(p: Pledge, f: (arg0: R) => void): void; -export function whenCanceled

>(p: P, f: P extends PledgeInstance ? (arg0: CancelReason) => void : (arg0: any) => void): void; -export function map(p: Pledge

, f: (r: P) => Q): Pledge; -export function all(ps: PS): PledgeInstance>; -export function coroutine(f: () => Generator | PledgeInstance, Result, any>): PledgeInstance; -export function wait(timeout: number): PledgeInstance; -export type Pledge = V | PledgeInstance; -export type PledgeMap = Array> | { - [x: string]: Pledge; -}; -/** - *

- */ -export type Resolved

| PledgeMap> = P extends PledgeMap ? { [K in keyof P]: P[K] extends Pledge ? V : P[K]; } : (P extends Pledge ? V : never); -//# sourceMappingURL=pledge.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.d.ts.map deleted file mode 100644 index 6d9c85c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pledge.d.ts","sourceRoot":"","sources":["../pledge.js"],"names":[],"mappings":"AA8BA;;;GAGG;AAEH;;;GAGG;AACH,4BAHmB,GAAG,kBACF,YAAY;IAI5B;;OAEG;IACH,IAFU,GAAG,GAAG,YAAY,GAAG,IAAI,CAErB;IACd,oBAAuB;IACvB;;OAEG;IACH,eAFU,KAAK,CAAC,CAAS,IAAG,EAAH,GAAG,KAAE,IAAI,CAAC,GAAG,IAAI,CAEnB;IACvB;;OAEG;IACH,eAFU,KAAK,CAAC,CAAS,IAAY,EAAZ,YAAY,KAAE,IAAI,CAAC,GAAG,IAAI,CAE5B;IAGzB,sBAEC;IAED,0BAEC;IAED;;OAEG;IACH,WAFW,GAAG,QAYb;IAED;;OAEG;IACH,eAFW,YAAY,QAWtB;IAED;;;;OAIG;IACH,IAJa,CAAC,KACH,CAAS,IAAG,EAAH,GAAG,KAAE,MAAM,CAAC,CAAC,CAAC,GACtB,cAAc,CAAC,CAAC,CAAC,CAoB5B;IAED;;OAEG;IACH,gBAFW,CAAS,IAAG,EAAH,GAAG,KAAE,IAAI,QAQ5B;IAED;;OAEG;IACH,gBAFW,CAAC,MAAM,EAAE,YAAY,KA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CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG;QAAO,MAAM,GAAC,MAAM,CAAC,OAAO,CAAC;CAAC;;;;qBAIzB,CAAC,SAA9B,MAAM,CAAC,OAAO,CAAC,GAAG,SAAU,IAC7B,CAAC,SAAS,SAAS,GAAG,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAC,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.test.d.ts deleted file mode 100644 index 0398e18..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testPledgeCoroutine(_tc: t.TestCase): Promise; -export function testPledgeVsPromisePerformanceTimeout(_tc: t.TestCase): Promise; -export function testPledgeVsPromisePerformanceResolved(_tc: t.TestCase): Promise; -export type MaybePromise = Promise | number; -import * as t from './testing.js'; -//# sourceMappingURL=pledge.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.test.d.ts.map deleted file mode 100644 index a319a0d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/pledge.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pledge.test.d.ts","sourceRoot":"","sources":["../pledge.test.js"],"names":[],"mappings":"AAOO,yCAFI,CAAC,CAAC,QAAQ,iBAepB;AAKM,2DAFI,CAAC,CAAC,QAAQ,iBAiBpB;AASM,4DAFI,CAAC,CAAC,QAAQ,iBAqCpB;2BAzCY,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM;mBA3ClB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng-37d48618.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng-37d48618.cjs deleted file mode 100644 index 021d210..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng-37d48618.cjs +++ /dev/null @@ -1,387 +0,0 @@ -'use strict'; - -var binary = require('./binary-ac8e39e2.cjs'); -var string = require('./string-fddc5f8b.cjs'); -var math = require('./math-96d5e8c4.cjs'); -var buffer = require('./buffer-3e750729.cjs'); - -/** - * @module prng - */ - -/** - * Xorshift32 is a very simple but elegang PRNG with a period of `2^32-1`. - */ -class Xorshift32 { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor (seed) { - this.seed = seed; - /** - * @type {number} - */ - this._state = seed; - } - - /** - * Generate a random signed integer. - * - * @return {Number} A 32 bit signed integer. - */ - next () { - let x = this._state; - x ^= x << 13; - x ^= x >> 17; - x ^= x << 5; - this._state = x; - return (x >>> 0) / (binary.BITS32 + 1) - } -} - -/** - * @module prng - */ - -/** - * This is a variant of xoroshiro128plus - the fastest full-period generator passing BigCrush without systematic failures. - * - * This implementation follows the idea of the original xoroshiro128plus implementation, - * but is optimized for the JavaScript runtime. I.e. - * * The operations are performed on 32bit integers (the original implementation works with 64bit values). - * * The initial 128bit state is computed based on a 32bit seed and Xorshift32. - * * This implementation returns two 32bit values based on the 64bit value that is computed by xoroshiro128plus. - * Caution: The last addition step works slightly different than in the original implementation - the add carry of the - * first 32bit addition is not carried over to the last 32bit. - * - * [Reference implementation](http://vigna.di.unimi.it/xorshift/xoroshiro128plus.c) - */ -class Xoroshiro128plus { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor (seed) { - this.seed = seed; - // This is a variant of Xoroshiro128plus to fill the initial state - const xorshift32 = new Xorshift32(seed); - this.state = new Uint32Array(4); - for (let i = 0; i < 4; i++) { - this.state[i] = xorshift32.next() * binary.BITS32; - } - this._fresh = true; - } - - /** - * @return {number} Float/Double in [0,1) - */ - next () { - const state = this.state; - if (this._fresh) { - this._fresh = false; - return ((state[0] + state[2]) >>> 0) / (binary.BITS32 + 1) - } else { - this._fresh = true; - const s0 = state[0]; - const s1 = state[1]; - const s2 = state[2] ^ s0; - const s3 = state[3] ^ s1; - // function js_rotl (x, k) { - // k = k - 32 - // const x1 = x[0] - // const x2 = x[1] - // x[0] = x2 << k | x1 >>> (32 - k) - // x[1] = x1 << k | x2 >>> (32 - k) - // } - // rotl(s0, 55) // k = 23 = 55 - 32; j = 9 = 32 - 23 - state[0] = (s1 << 23 | s0 >>> 9) ^ s2 ^ (s2 << 14 | s3 >>> 18); - state[1] = (s0 << 23 | s1 >>> 9) ^ s3 ^ (s3 << 14); - // rol(s1, 36) // k = 4 = 36 - 32; j = 23 = 32 - 9 - state[2] = s3 << 4 | s2 >>> 28; - state[3] = s2 << 4 | s3 >>> 28; - return (((state[1] + state[3]) >>> 0) / (binary.BITS32 + 1)) - } - } -} - -/* -// Reference implementation -// Source: http://vigna.di.unimi.it/xorshift/xoroshiro128plus.c -// By David Blackman and Sebastiano Vigna -// Who published the reference implementation under Public Domain (CC0) - -#include -#include - -uint64_t s[2]; - -static inline uint64_t rotl(const uint64_t x, int k) { - return (x << k) | (x >> (64 - k)); -} - -uint64_t next(void) { - const uint64_t s0 = s[0]; - uint64_t s1 = s[1]; - s1 ^= s0; - s[0] = rotl(s0, 55) ^ s1 ^ (s1 << 14); // a, b - s[1] = rotl(s1, 36); // c - return (s[0] + s[1]) & 0xFFFFFFFF; -} - -int main(void) -{ - int i; - s[0] = 1111 | (1337ul << 32); - s[1] = 1234 | (9999ul << 32); - - printf("1000 outputs of genrand_int31()\n"); - for (i=0; i<100; i++) { - printf("%10lu ", i); - printf("%10lu ", next()); - printf("- %10lu ", s[0] >> 32); - printf("%10lu ", (s[0] << 32) >> 32); - printf("%10lu ", s[1] >> 32); - printf("%10lu ", (s[1] << 32) >> 32); - printf("\n"); - // if (i%5==4) printf("\n"); - } - return 0; -} -*/ - -/** - * Fast Pseudo Random Number Generators. - * - * Given a seed a PRNG generates a sequence of numbers that cannot be reasonably predicted. - * Two PRNGs must generate the same random sequence of numbers if given the same seed. - * - * @module prng - */ - -/** - * Description of the function - * @callback generatorNext - * @return {number} A random float in the cange of [0,1) - */ - -/** - * A random type generator. - * - * @typedef {Object} PRNG - * @property {generatorNext} next Generate new number - */ -const DefaultPRNG = Xoroshiro128plus; - -/** - * Create a Xoroshiro128plus Pseudo-Random-Number-Generator. - * This is the fastest full-period generator passing BigCrush without systematic failures. - * But there are more PRNGs available in ./PRNG/. - * - * @param {number} seed A positive 32bit integer. Do not use negative numbers. - * @return {PRNG} - */ -const create = seed => new DefaultPRNG(seed); - -/** - * Generates a single random bool. - * - * @param {PRNG} gen A random number generator. - * @return {Boolean} A random boolean - */ -const bool = gen => (gen.next() >= 0.5); - -/** - * Generates a random integer with 53 bit resolution. - * - * @param {PRNG} gen A random number generator. - * @param {Number} min The lower bound of the allowed return values (inclusive). - * @param {Number} max The upper bound of the allowed return values (inclusive). - * @return {Number} A random integer on [min, max] - */ -const int53 = (gen, min, max) => math.floor(gen.next() * (max + 1 - min) + min); - -/** - * Generates a random integer with 53 bit resolution. - * - * @param {PRNG} gen A random number generator. - * @param {Number} min The lower bound of the allowed return values (inclusive). - * @param {Number} max The upper bound of the allowed return values (inclusive). - * @return {Number} A random integer on [min, max] - */ -const uint53 = (gen, min, max) => math.abs(int53(gen, min, max)); - -/** - * Generates a random integer with 32 bit resolution. - * - * @param {PRNG} gen A random number generator. - * @param {Number} min The lower bound of the allowed return values (inclusive). - * @param {Number} max The upper bound of the allowed return values (inclusive). - * @return {Number} A random integer on [min, max] - */ -const int32 = (gen, min, max) => math.floor(gen.next() * (max + 1 - min) + min); - -/** - * Generates a random integer with 53 bit resolution. - * - * @param {PRNG} gen A random number generator. - * @param {Number} min The lower bound of the allowed return values (inclusive). - * @param {Number} max The upper bound of the allowed return values (inclusive). - * @return {Number} A random integer on [min, max] - */ -const uint32 = (gen, min, max) => int32(gen, min, max) >>> 0; - -/** - * @deprecated - * Optimized version of prng.int32. It has the same precision as prng.int32, but should be preferred when - * openaring on smaller ranges. - * - * @param {PRNG} gen A random number generator. - * @param {Number} min The lower bound of the allowed return values (inclusive). - * @param {Number} max The upper bound of the allowed return values (inclusive). The max inclusive number is `binary.BITS31-1` - * @return {Number} A random integer on [min, max] - */ -const int31 = (gen, min, max) => int32(gen, min, max); - -/** - * Generates a random real on [0, 1) with 53 bit resolution. - * - * @param {PRNG} gen A random number generator. - * @return {Number} A random real number on [0, 1). - */ -const real53 = gen => gen.next(); // (((gen.next() >>> 5) * binary.BIT26) + (gen.next() >>> 6)) / MAX_SAFE_INTEGER - -/** - * Generates a random character from char code 32 - 126. I.e. Characters, Numbers, special characters, and Space: - * - * @param {PRNG} gen A random number generator. - * @return {string} - * - * (Space)!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[/]^_`abcdefghijklmnopqrstuvwxyz{|}~ - */ -const char = gen => string.fromCharCode(int31(gen, 32, 126)); - -/** - * @param {PRNG} gen - * @return {string} A single letter (a-z) - */ -const letter = gen => string.fromCharCode(int31(gen, 97, 122)); - -/** - * @param {PRNG} gen - * @param {number} [minLen=0] - * @param {number} [maxLen=20] - * @return {string} A random word (0-20 characters) without spaces consisting of letters (a-z) - */ -const word = (gen, minLen = 0, maxLen = 20) => { - const len = int31(gen, minLen, maxLen); - let str = ''; - for (let i = 0; i < len; i++) { - str += letter(gen); - } - return str -}; - -/** - * TODO: this function produces invalid runes. Does not cover all of utf16!! - * - * @param {PRNG} gen - * @return {string} - */ -const utf16Rune = gen => { - const codepoint = int31(gen, 0, 256); - return string.fromCodePoint(codepoint) -}; - -/** - * @param {PRNG} gen - * @param {number} [maxlen = 20] - */ -const utf16String = (gen, maxlen = 20) => { - const len = int31(gen, 0, maxlen); - let str = ''; - for (let i = 0; i < len; i++) { - str += utf16Rune(gen); - } - return str -}; - -/** - * Returns one element of a given array. - * - * @param {PRNG} gen A random number generator. - * @param {Array} array Non empty Array of possible values. - * @return {T} One of the values of the supplied Array. - * @template T - */ -const oneOf = (gen, array) => array[int31(gen, 0, array.length - 1)]; - -/** - * @param {PRNG} gen - * @param {number} len - * @return {Uint8Array} - */ -const uint8Array = (gen, len) => { - const buf = buffer.createUint8ArrayFromLen(len); - for (let i = 0; i < buf.length; i++) { - buf[i] = int32(gen, 0, binary.BITS8); - } - return buf -}; - -/* c8 ignore start */ -/** - * @param {PRNG} gen - * @param {number} len - * @return {Uint16Array} - */ -const uint16Array = (gen, len) => new Uint16Array(uint8Array(gen, len * 2).buffer); - -/** - * @param {PRNG} gen - * @param {number} len - * @return {Uint32Array} - */ -const uint32Array = (gen, len) => new Uint32Array(uint8Array(gen, len * 4).buffer); -/* c8 ignore stop */ - -var prng = /*#__PURE__*/Object.freeze({ - __proto__: null, - DefaultPRNG: DefaultPRNG, - create: create, - bool: bool, - int53: int53, - uint53: uint53, - int32: int32, - uint32: uint32, - int31: int31, - real53: real53, - char: char, - letter: letter, - word: word, - utf16Rune: utf16Rune, - utf16String: utf16String, - oneOf: oneOf, - uint8Array: uint8Array, - uint16Array: uint16Array, - uint32Array: uint32Array -}); - -exports.DefaultPRNG = DefaultPRNG; -exports.bool = bool; -exports.char = char; -exports.create = create; -exports.int31 = int31; -exports.int32 = int32; -exports.int53 = int53; -exports.letter = letter; -exports.oneOf = oneOf; -exports.prng = prng; -exports.real53 = real53; -exports.uint16Array = uint16Array; -exports.uint32 = uint32; -exports.uint32Array = uint32Array; -exports.uint53 = uint53; -exports.uint8Array = uint8Array; -exports.utf16Rune = utf16Rune; -exports.utf16String = utf16String; -exports.word = word; -//# sourceMappingURL=prng-37d48618.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng-37d48618.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng-37d48618.cjs.map deleted file mode 100644 index 48c3b12..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng-37d48618.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"prng-37d48618.cjs","sources":["../prng/Xorshift32.js","../prng/Xoroshiro128plus.js","../prng.js"],"sourcesContent":["/**\n * @module prng\n */\n\nimport * as binary from '../binary.js'\n\n/**\n * Xorshift32 is a very simple but elegang PRNG with a period of `2^32-1`.\n */\nexport class Xorshift32 {\n /**\n * @param {number} seed Unsigned 32 bit number\n */\n constructor (seed) {\n this.seed = seed\n /**\n * @type {number}\n */\n this._state = seed\n }\n\n /**\n * Generate a random signed integer.\n *\n * @return {Number} A 32 bit signed integer.\n */\n next () {\n let x = this._state\n x ^= x << 13\n x ^= x >> 17\n x ^= x << 5\n this._state = x\n return (x >>> 0) / (binary.BITS32 + 1)\n }\n}\n","/**\n * @module prng\n */\n\nimport { Xorshift32 } from './Xorshift32.js'\nimport * as binary from '../binary.js'\n\n/**\n * This is a variant of xoroshiro128plus - the fastest full-period generator passing BigCrush without systematic failures.\n *\n * This implementation follows the idea of the original xoroshiro128plus implementation,\n * but is optimized for the JavaScript runtime. I.e.\n * * The operations are performed on 32bit integers (the original implementation works with 64bit values).\n * * The initial 128bit state is computed based on a 32bit seed and Xorshift32.\n * * This implementation returns two 32bit values based on the 64bit value that is computed by xoroshiro128plus.\n * Caution: The last addition step works slightly different than in the original implementation - the add carry of the\n * first 32bit addition is not carried over to the last 32bit.\n *\n * [Reference implementation](http://vigna.di.unimi.it/xorshift/xoroshiro128plus.c)\n */\nexport class Xoroshiro128plus {\n /**\n * @param {number} seed Unsigned 32 bit number\n */\n constructor (seed) {\n this.seed = seed\n // This is a variant of Xoroshiro128plus to fill the initial state\n const xorshift32 = new Xorshift32(seed)\n this.state = new Uint32Array(4)\n for (let i = 0; i < 4; i++) {\n this.state[i] = xorshift32.next() * binary.BITS32\n }\n this._fresh = true\n }\n\n /**\n * @return {number} Float/Double in [0,1)\n */\n next () {\n const state = this.state\n if (this._fresh) {\n this._fresh = false\n return ((state[0] + state[2]) >>> 0) / (binary.BITS32 + 1)\n } else {\n this._fresh = true\n const s0 = state[0]\n const s1 = state[1]\n const s2 = state[2] ^ s0\n const s3 = state[3] ^ s1\n // function js_rotl (x, k) {\n // k = k - 32\n // const x1 = x[0]\n // const x2 = x[1]\n // x[0] = x2 << k | x1 >>> (32 - k)\n // x[1] = x1 << k | x2 >>> (32 - k)\n // }\n // rotl(s0, 55) // k = 23 = 55 - 32; j = 9 = 32 - 23\n state[0] = (s1 << 23 | s0 >>> 9) ^ s2 ^ (s2 << 14 | s3 >>> 18)\n state[1] = (s0 << 23 | s1 >>> 9) ^ s3 ^ (s3 << 14)\n // rol(s1, 36) // k = 4 = 36 - 32; j = 23 = 32 - 9\n state[2] = s3 << 4 | s2 >>> 28\n state[3] = s2 << 4 | s3 >>> 28\n return (((state[1] + state[3]) >>> 0) / (binary.BITS32 + 1))\n }\n }\n}\n\n/*\n// Reference implementation\n// Source: http://vigna.di.unimi.it/xorshift/xoroshiro128plus.c\n// By David Blackman and Sebastiano Vigna\n// Who published the reference implementation under Public Domain (CC0)\n\n#include \n#include \n\nuint64_t s[2];\n\nstatic inline uint64_t rotl(const uint64_t x, int k) {\n return (x << k) | (x >> (64 - k));\n}\n\nuint64_t next(void) {\n const uint64_t s0 = s[0];\n uint64_t s1 = s[1];\n s1 ^= s0;\n s[0] = rotl(s0, 55) ^ s1 ^ (s1 << 14); // a, b\n s[1] = rotl(s1, 36); // c\n return (s[0] + s[1]) & 0xFFFFFFFF;\n}\n\nint main(void)\n{\n int i;\n s[0] = 1111 | (1337ul << 32);\n s[1] = 1234 | (9999ul << 32);\n\n printf(\"1000 outputs of genrand_int31()\\n\");\n for (i=0; i<100; i++) {\n printf(\"%10lu \", i);\n printf(\"%10lu \", next());\n printf(\"- %10lu \", s[0] >> 32);\n printf(\"%10lu \", (s[0] << 32) >> 32);\n printf(\"%10lu \", s[1] >> 32);\n printf(\"%10lu \", (s[1] << 32) >> 32);\n printf(\"\\n\");\n // if (i%5==4) printf(\"\\n\");\n }\n return 0;\n}\n*/\n","/**\n * Fast Pseudo Random Number Generators.\n *\n * Given a seed a PRNG generates a sequence of numbers that cannot be reasonably predicted.\n * Two PRNGs must generate the same random sequence of numbers if given the same seed.\n *\n * @module prng\n */\n\nimport * as binary from './binary.js'\nimport { fromCharCode, fromCodePoint } from './string.js'\nimport * as math from './math.js'\nimport { Xoroshiro128plus } from './prng/Xoroshiro128plus.js'\nimport * as buffer from './buffer.js'\n\n/**\n * Description of the function\n * @callback generatorNext\n * @return {number} A random float in the cange of [0,1)\n */\n\n/**\n * A random type generator.\n *\n * @typedef {Object} PRNG\n * @property {generatorNext} next Generate new number\n */\nexport const DefaultPRNG = Xoroshiro128plus\n\n/**\n * Create a Xoroshiro128plus Pseudo-Random-Number-Generator.\n * This is the fastest full-period generator passing BigCrush without systematic failures.\n * But there are more PRNGs available in ./PRNG/.\n *\n * @param {number} seed A positive 32bit integer. Do not use negative numbers.\n * @return {PRNG}\n */\nexport const create = seed => new DefaultPRNG(seed)\n\n/**\n * Generates a single random bool.\n *\n * @param {PRNG} gen A random number generator.\n * @return {Boolean} A random boolean\n */\nexport const bool = gen => (gen.next() >= 0.5)\n\n/**\n * Generates a random integer with 53 bit resolution.\n *\n * @param {PRNG} gen A random number generator.\n * @param {Number} min The lower bound of the allowed return values (inclusive).\n * @param {Number} max The upper bound of the allowed return values (inclusive).\n * @return {Number} A random integer on [min, max]\n */\nexport const int53 = (gen, min, max) => math.floor(gen.next() * (max + 1 - min) + min)\n\n/**\n * Generates a random integer with 53 bit resolution.\n *\n * @param {PRNG} gen A random number generator.\n * @param {Number} min The lower bound of the allowed return values (inclusive).\n * @param {Number} max The upper bound of the allowed return values (inclusive).\n * @return {Number} A random integer on [min, max]\n */\nexport const uint53 = (gen, min, max) => math.abs(int53(gen, min, max))\n\n/**\n * Generates a random integer with 32 bit resolution.\n *\n * @param {PRNG} gen A random number generator.\n * @param {Number} min The lower bound of the allowed return values (inclusive).\n * @param {Number} max The upper bound of the allowed return values (inclusive).\n * @return {Number} A random integer on [min, max]\n */\nexport const int32 = (gen, min, max) => math.floor(gen.next() * (max + 1 - min) + min)\n\n/**\n * Generates a random integer with 53 bit resolution.\n *\n * @param {PRNG} gen A random number generator.\n * @param {Number} min The lower bound of the allowed return values (inclusive).\n * @param {Number} max The upper bound of the allowed return values (inclusive).\n * @return {Number} A random integer on [min, max]\n */\nexport const uint32 = (gen, min, max) => int32(gen, min, max) >>> 0\n\n/**\n * @deprecated\n * Optimized version of prng.int32. It has the same precision as prng.int32, but should be preferred when\n * openaring on smaller ranges.\n *\n * @param {PRNG} gen A random number generator.\n * @param {Number} min The lower bound of the allowed return values (inclusive).\n * @param {Number} max The upper bound of the allowed return values (inclusive). The max inclusive number is `binary.BITS31-1`\n * @return {Number} A random integer on [min, max]\n */\nexport const int31 = (gen, min, max) => int32(gen, min, max)\n\n/**\n * Generates a random real on [0, 1) with 53 bit resolution.\n *\n * @param {PRNG} gen A random number generator.\n * @return {Number} A random real number on [0, 1).\n */\nexport const real53 = gen => gen.next() // (((gen.next() >>> 5) * binary.BIT26) + (gen.next() >>> 6)) / MAX_SAFE_INTEGER\n\n/**\n * Generates a random character from char code 32 - 126. I.e. Characters, Numbers, special characters, and Space:\n *\n * @param {PRNG} gen A random number generator.\n * @return {string}\n *\n * (Space)!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[/]^_`abcdefghijklmnopqrstuvwxyz{|}~\n */\nexport const char = gen => fromCharCode(int31(gen, 32, 126))\n\n/**\n * @param {PRNG} gen\n * @return {string} A single letter (a-z)\n */\nexport const letter = gen => fromCharCode(int31(gen, 97, 122))\n\n/**\n * @param {PRNG} gen\n * @param {number} [minLen=0]\n * @param {number} [maxLen=20]\n * @return {string} A random word (0-20 characters) without spaces consisting of letters (a-z)\n */\nexport const word = (gen, minLen = 0, maxLen = 20) => {\n const len = int31(gen, minLen, maxLen)\n let str = ''\n for (let i = 0; i < len; i++) {\n str += letter(gen)\n }\n return str\n}\n\n/**\n * TODO: this function produces invalid runes. Does not cover all of utf16!!\n *\n * @param {PRNG} gen\n * @return {string}\n */\nexport const utf16Rune = gen => {\n const codepoint = int31(gen, 0, 256)\n return fromCodePoint(codepoint)\n}\n\n/**\n * @param {PRNG} gen\n * @param {number} [maxlen = 20]\n */\nexport const utf16String = (gen, maxlen = 20) => {\n const len = int31(gen, 0, maxlen)\n let str = ''\n for (let i = 0; i < len; i++) {\n str += utf16Rune(gen)\n }\n return str\n}\n\n/**\n * Returns one element of a given array.\n *\n * @param {PRNG} gen A random number generator.\n * @param {Array} array Non empty Array of possible values.\n * @return {T} One of the values of the supplied Array.\n * @template T\n */\nexport const oneOf = (gen, array) => array[int31(gen, 0, array.length - 1)]\n\n/**\n * @param {PRNG} gen\n * @param {number} len\n * @return {Uint8Array}\n */\nexport const uint8Array = (gen, len) => {\n const buf = buffer.createUint8ArrayFromLen(len)\n for (let i = 0; i < buf.length; i++) {\n buf[i] = int32(gen, 0, binary.BITS8)\n }\n return buf\n}\n\n/* c8 ignore start */\n/**\n * @param {PRNG} gen\n * @param {number} len\n * @return {Uint16Array}\n */\nexport const uint16Array = (gen, len) => new Uint16Array(uint8Array(gen, len * 2).buffer)\n\n/**\n * @param {PRNG} gen\n * @param {number} len\n * @return {Uint32Array}\n */\nexport const uint32Array = (gen, len) => new Uint32Array(uint8Array(gen, len * 4).buffer)\n/* c8 ignore stop */\n"],"names":["binary.BITS32","math.floor","math.abs","fromCharCode","fromCodePoint","buffer.createUint8ArrayFromLen","binary.BITS8"],"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,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,iBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,IAAI,IAAI,IAAI,WAAW,CAAC,IAAI,EAAC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,GAAG,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,KAAKC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,EAAC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,KAAKC,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,KAAKD,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,EAAC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,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AC,GAAG,EAAE,GAAG,KAAK,IAAI,WAAW,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,EAAC;AACzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.cjs deleted file mode 100644 index 4f80450..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.cjs +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./binary-ac8e39e2.cjs'); -require('./string-fddc5f8b.cjs'); -require('./math-96d5e8c4.cjs'); -var prng = require('./prng-37d48618.cjs'); -require('./buffer-3e750729.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./environment-1c97264d.cjs'); -require('./map-24d263c0.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./encoding-1a745c43.cjs'); -require('./number-1fb57bba.cjs'); -require('./decoding-76e75827.cjs'); -require('./error-0c1f634f.cjs'); - - - -exports.DefaultPRNG = prng.DefaultPRNG; -exports.bool = prng.bool; -exports.char = prng.char; -exports.create = prng.create; -exports.int31 = prng.int31; -exports.int32 = prng.int32; -exports.int53 = prng.int53; -exports.letter = prng.letter; -exports.oneOf = prng.oneOf; -exports.real53 = prng.real53; -exports.uint16Array = prng.uint16Array; -exports.uint32 = prng.uint32; -exports.uint32Array = prng.uint32Array; -exports.uint53 = prng.uint53; -exports.uint8Array = prng.uint8Array; -exports.utf16Rune = prng.utf16Rune; -exports.utf16String = prng.utf16String; -exports.word = prng.word; -//# sourceMappingURL=prng.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.cjs.map deleted file mode 100644 index 4949942..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"prng.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.d.ts deleted file mode 100644 index 77c666d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Description of the function - * @callback generatorNext - * @return {number} A random float in the cange of [0,1) - */ -/** - * A random type generator. - * - * @typedef {Object} PRNG - * @property {generatorNext} next Generate new number - */ -export const DefaultPRNG: typeof Xoroshiro128plus; -export function create(seed: number): PRNG; -export function bool(gen: PRNG): boolean; -export function int53(gen: PRNG, min: number, max: number): number; -export function uint53(gen: PRNG, min: number, max: number): number; -export function int32(gen: PRNG, min: number, max: number): number; -export function uint32(gen: PRNG, min: number, max: number): number; -export function int31(gen: PRNG, min: number, max: number): number; -export function real53(gen: PRNG): number; -export function char(gen: PRNG): string; -export function letter(gen: PRNG): string; -export function word(gen: PRNG, minLen?: number, maxLen?: number): string; -export function utf16Rune(gen: PRNG): string; -export function utf16String(gen: PRNG, maxlen?: number): string; -export function oneOf(gen: PRNG, array: Array): T; -export function uint8Array(gen: PRNG, len: number): Uint8Array; -export function uint16Array(gen: PRNG, len: number): Uint16Array; -export function uint32Array(gen: PRNG, len: number): Uint32Array; -/** - * Description of the function - */ -export type generatorNext = () => number; -/** - * A random type generator. - */ -export type PRNG = { - /** - * Generate new number - */ - next: generatorNext; -}; -import { Xoroshiro128plus } from './prng/Xoroshiro128plus.js'; -//# sourceMappingURL=prng.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.d.ts.map deleted file mode 100644 index 5babc5d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"prng.d.ts","sourceRoot":"","sources":["../prng.js"],"names":[],"mappings":"AAeA;;;;GAIG;AAEH;;;;;GAKG;AACH,kDAA2C;AAUpC,6BAHI,MAAM,GACL,IAAI,CAEmC;AAQ5C,0BAHI,IAAI,WAG+B;AAUvC,2BALI,IAAI,oCAKuE;AAU/E,4BALI,IAAI,oCAKwD;AAUhE,2BALI,IAAI,oCAKuE;AAU/E,4BALI,IAAI,oCAKoD;AAY5D,2BALI,IAAI,oCAK6C;AAQrD,4BAHI,IAAI,UAGwB;AAUhC,0BALI,IAAI,GACH,MAAM,CAI0C;AAMrD,4BAHI,IAAI,GACH,MAAM,CAE4C;AAQvD,0BALI,IAAI,WACJ,MAAM,WACN,MAAM,GACL,MAAM,CASjB;AAQM,+BAHI,IAAI,GACH,MAAM,CAKjB;AAMM,iCAHI,IAAI,WACJ,MAAM,UAShB;AAUM,sBAFM,CAAC,OAHH,IAAI,SACJ,KAAK,CAAC,CAAC,CAAC,GACP,CAAC,CAG8D;AAOpE,gCAJI,IAAI,OACJ,MAAM,GACL,UAAU,CAAC,WAAW,CAAC,CAQlC;AAQM,iCAJI,IAAI,OACJ,MAAM,GACL,WAAW,CAEkE;AAOlF,iCAJI,IAAI,OACJ,MAAM,GACL,WAAW,CAEkE;;;;kCApL5E,MAAM;;;;;;;;UAOL,aAAa;;iCAbM,4BAA4B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.test.d.ts deleted file mode 100644 index dd69f9a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testGeneratorXoroshiro128plus(tc: t.TestCase): void; -export function testGeneratorXorshift32(tc: t.TestCase): void; -export function testGeneratorMt19937(tc: t.TestCase): void; -export function testNumberDistributions(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=prng.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.test.d.ts.map deleted file mode 100644 index ca3eaca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"prng.test.d.ts","sourceRoot":"","sources":["../prng.test.js"],"names":[],"mappings":"AA4LO,kDAFI,CAAC,CAAC,QAAQ,QAE2E;AAKzF,4CAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,QAIpB;AA2BM,4CAFI,CAAC,CAAC,QAAQ,QAOpB;mBAtOkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Mt19937.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Mt19937.d.ts deleted file mode 100644 index 8b499e0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Mt19937.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This is a port of Shawn Cokus's implementation of the original Mersenne Twister algorithm (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/MTARCOK/mt19937ar-cok.c). - * MT has a very high period of 2^19937. Though the authors of xorshift describe that a high period is not - * very relevant (http://vigna.di.unimi.it/xorshift/). It is four times slower than xoroshiro128plus and - * needs to recompute its state after generating 624 numbers. - * - * ```js - * const gen = new Mt19937(new Date().getTime()) - * console.log(gen.next()) - * ``` - * - * @public - */ -export class Mt19937 { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor(seed: number); - seed: number; - _state: Uint32Array; - _i: number; - /** - * Generate a random signed integer. - * - * @return {Number} A 32 bit signed integer. - */ - next(): number; -} -//# sourceMappingURL=Mt19937.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Mt19937.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Mt19937.d.ts.map deleted file mode 100644 index b1d307f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Mt19937.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Mt19937.d.ts","sourceRoot":"","sources":["../../prng/Mt19937.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;GAYG;AACH;IACE;;OAEG;IACH,kBAFW,MAAM,EAYhB;IATC,aAAgB;IAMhB,iCAAmB;IACnB,WAAW;IAIb;;;;OAIG;IACH,eAYC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xoroshiro128plus.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xoroshiro128plus.d.ts deleted file mode 100644 index 5f2f9fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xoroshiro128plus.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This is a variant of xoroshiro128plus - the fastest full-period generator passing BigCrush without systematic failures. - * - * This implementation follows the idea of the original xoroshiro128plus implementation, - * but is optimized for the JavaScript runtime. I.e. - * * The operations are performed on 32bit integers (the original implementation works with 64bit values). - * * The initial 128bit state is computed based on a 32bit seed and Xorshift32. - * * This implementation returns two 32bit values based on the 64bit value that is computed by xoroshiro128plus. - * Caution: The last addition step works slightly different than in the original implementation - the add carry of the - * first 32bit addition is not carried over to the last 32bit. - * - * [Reference implementation](http://vigna.di.unimi.it/xorshift/xoroshiro128plus.c) - */ -export class Xoroshiro128plus { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor(seed: number); - seed: number; - state: Uint32Array; - _fresh: boolean; - /** - * @return {number} Float/Double in [0,1) - */ - next(): number; -} -//# sourceMappingURL=Xoroshiro128plus.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xoroshiro128plus.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xoroshiro128plus.d.ts.map deleted file mode 100644 index ac920da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xoroshiro128plus.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Xoroshiro128plus.d.ts","sourceRoot":"","sources":["../../prng/Xoroshiro128plus.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;GAYG;AACH;IACE;;OAEG;IACH,kBAFW,MAAM,EAWhB;IARC,aAAgB;IAGhB,gCAA+B;IAI/B,gBAAkB;IAGpB;;OAEG;IACH,QAFY,MAAM,CA4BjB;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xorshift32.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xorshift32.d.ts deleted file mode 100644 index 436b8bc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xorshift32.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Xorshift32 is a very simple but elegang PRNG with a period of `2^32-1`. - */ -export class Xorshift32 { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor(seed: number); - seed: number; - /** - * @type {number} - */ - _state: number; - /** - * Generate a random signed integer. - * - * @return {Number} A 32 bit signed integer. - */ - next(): number; -} -//# sourceMappingURL=Xorshift32.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xorshift32.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xorshift32.d.ts.map deleted file mode 100644 index 0bf8199..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/prng/Xorshift32.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Xorshift32.d.ts","sourceRoot":"","sources":["../../prng/Xorshift32.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IACE;;OAEG;IACH,kBAFW,MAAM,EAQhB;IALC,aAAgB;IAChB;;OAEG;IACH,QAFU,MAAM,CAEE;IAGpB;;;;OAIG;IACH,eAOC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise-cda7b9bb.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise-cda7b9bb.cjs deleted file mode 100644 index e23a073..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise-cda7b9bb.cjs +++ /dev/null @@ -1,145 +0,0 @@ -'use strict'; - -var time = require('./time-d8438852.cjs'); - -/** - * Utility helpers to work with promises. - * - * @module promise - */ - -/** - * @template T - * @callback PromiseResolve - * @param {T|PromiseLike} [result] - */ - -/** - * @template T - * @param {function(PromiseResolve,function(Error):void):any} f - * @return {Promise} - */ -const create = f => /** @type {Promise} */ (new Promise(f)); - -/** - * @param {function(function():void,function(Error):void):void} f - * @return {Promise} - */ -const createEmpty = f => new Promise(f); - -/** - * `Promise.all` wait for all promises in the array to resolve and return the result - * @template {unknown[] | []} PS - * - * @param {PS} ps - * @return {Promise<{ -readonly [P in keyof PS]: Awaited }>} - */ -const all = Promise.all.bind(Promise); - -/** - * @param {Error} [reason] - * @return {Promise} - */ -const reject = reason => Promise.reject(reason); - -/** - * @template T - * @param {T|void} res - * @return {Promise} - */ -const resolve = res => Promise.resolve(res); - -/** - * @template T - * @param {T} res - * @return {Promise} - */ -const resolveWith = res => Promise.resolve(res); - -/** - * @todo Next version, reorder parameters: check, [timeout, [intervalResolution]] - * @deprecated use untilAsync instead - * - * @param {number} timeout - * @param {function():boolean} check - * @param {number} [intervalResolution] - * @return {Promise} - */ -const until = (timeout, check, intervalResolution = 10) => create((resolve, reject) => { - const startTime = time.getUnixTime(); - const hasTimeout = timeout > 0; - const untilInterval = () => { - if (check()) { - clearInterval(intervalHandle); - resolve(); - } else if (hasTimeout) { - /* c8 ignore else */ - if (time.getUnixTime() - startTime > timeout) { - clearInterval(intervalHandle); - reject(new Error('Timeout')); - } - } - }; - const intervalHandle = setInterval(untilInterval, intervalResolution); -}); - -/** - * @param {()=>Promise|boolean} check - * @param {number} timeout - * @param {number} intervalResolution - * @return {Promise} - */ -const untilAsync = async (check, timeout = 0, intervalResolution = 10) => { - const startTime = time.getUnixTime(); - const noTimeout = timeout <= 0; - // eslint-disable-next-line no-unmodified-loop-condition - while (noTimeout || time.getUnixTime() - startTime <= timeout) { - if (await check()) return - await wait(intervalResolution); - } - throw new Error('Timeout') -}; - -/** - * @param {number} timeout - * @return {Promise} - */ -const wait = timeout => create((resolve, _reject) => setTimeout(resolve, timeout)); - -/** - * Checks if an object is a promise using ducktyping. - * - * Promises are often polyfilled, so it makes sense to add some additional guarantees if the user of this - * library has some insane environment where global Promise objects are overwritten. - * - * @param {any} p - * @return {boolean} - */ -const isPromise = p => p instanceof Promise || (p && p.then && p.catch && p.finally); - -var promise = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create, - createEmpty: createEmpty, - all: all, - reject: reject, - resolve: resolve, - resolveWith: resolveWith, - until: until, - untilAsync: untilAsync, - wait: wait, - isPromise: isPromise -}); - -exports.all = all; -exports.create = create; -exports.createEmpty = createEmpty; -exports.isPromise = isPromise; -exports.promise = promise; -exports.reject = reject; -exports.resolve = resolve; -exports.resolveWith = resolveWith; -exports.until = until; -exports.untilAsync = untilAsync; -exports.wait = wait; -//# sourceMappingURL=promise-cda7b9bb.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise-cda7b9bb.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise-cda7b9bb.cjs.map deleted file mode 100644 index 7c00208..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise-cda7b9bb.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promise-cda7b9bb.cjs","sources":["../promise.js"],"sourcesContent":["/**\n * Utility helpers to work with promises.\n *\n * @module promise\n */\n\nimport * as time from './time.js'\n\n/**\n * @template T\n * @callback PromiseResolve\n * @param {T|PromiseLike} [result]\n */\n\n/**\n * @template T\n * @param {function(PromiseResolve,function(Error):void):any} f\n * @return {Promise}\n */\nexport const create = f => /** @type {Promise} */ (new Promise(f))\n\n/**\n * @param {function(function():void,function(Error):void):void} f\n * @return {Promise}\n */\nexport const createEmpty = f => new Promise(f)\n\n/**\n * `Promise.all` wait for all promises in the array to resolve and return the result\n * @template {unknown[] | []} PS\n *\n * @param {PS} ps\n * @return {Promise<{ -readonly [P in keyof PS]: Awaited }>}\n */\nexport const all = Promise.all.bind(Promise)\n\n/**\n * @param {Error} [reason]\n * @return {Promise}\n */\nexport const reject = reason => Promise.reject(reason)\n\n/**\n * @template T\n * @param {T|void} res\n * @return {Promise}\n */\nexport const resolve = res => Promise.resolve(res)\n\n/**\n * @template T\n * @param {T} res\n * @return {Promise}\n */\nexport const resolveWith = res => Promise.resolve(res)\n\n/**\n * @todo Next version, reorder parameters: check, [timeout, [intervalResolution]]\n * @deprecated use untilAsync instead\n *\n * @param {number} timeout\n * @param {function():boolean} check\n * @param {number} [intervalResolution]\n * @return {Promise}\n */\nexport const until = (timeout, check, intervalResolution = 10) => create((resolve, reject) => {\n const startTime = time.getUnixTime()\n const hasTimeout = timeout > 0\n const untilInterval = () => {\n if (check()) {\n clearInterval(intervalHandle)\n resolve()\n } else if (hasTimeout) {\n /* c8 ignore else */\n if (time.getUnixTime() - startTime > timeout) {\n clearInterval(intervalHandle)\n reject(new Error('Timeout'))\n }\n }\n }\n const intervalHandle = setInterval(untilInterval, intervalResolution)\n})\n\n/**\n * @param {()=>Promise|boolean} check\n * @param {number} timeout\n * @param {number} intervalResolution\n * @return {Promise}\n */\nexport const untilAsync = async (check, timeout = 0, intervalResolution = 10) => {\n const startTime = time.getUnixTime()\n const noTimeout = timeout <= 0\n // eslint-disable-next-line no-unmodified-loop-condition\n while (noTimeout || time.getUnixTime() - startTime <= timeout) {\n if (await check()) return\n await wait(intervalResolution)\n }\n throw new Error('Timeout')\n}\n\n/**\n * @param {number} timeout\n * @return {Promise}\n */\nexport const wait = timeout => create((resolve, _reject) => setTimeout(resolve, timeout))\n\n/**\n * Checks if an object is a promise using ducktyping.\n *\n * Promises are often polyfilled, so it makes sense to add some additional guarantees if the user of this\n * library has some insane environment where global Promise objects are overwritten.\n *\n * @param {any} p\n * @return {boolean}\n */\nexport const isPromise = p => p instanceof Promise || (p && p.then && p.catch && p.finally)\n"],"names":["time.getUnixTime"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY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AAG,WAAW,CAAC,aAAa,EAAE,kBAAkB,EAAC;AACvE,CAAC,EAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,UAAU,GAAG,OAAO,KAAK,EAAE,OAAO,GAAG,CAAC,EAAE,kBAAkB,GAAG,EAAE,KAAK;AACjF,EAAE,MAAM,SAAS,GAAGA,gBAAgB,GAAE;AACtC,EAAE,MAAM,SAAS,GAAG,OAAO,IAAI,EAAC;AAChC;AACA,EAAE,OAAO,SAAS,IAAIA,gBAAgB,EAAE,GAAG,SAAS,IAAI,OAAO,EAAE;AACjE,IAAI,IAAI,MAAM,KAAK,EAAE,EAAE,MAAM;AAC7B,IAAI,MAAM,IAAI,CAAC,kBAAkB,EAAC;AAClC,GAAG;AACH,EAAE,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC;AAC5B,EAAC;AACD;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,OAAO,IAAI,MAAM,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,EAAC;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,CAAC,IAAI,CAAC,YAAY,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.cjs deleted file mode 100644 index 3f8e54f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.cjs +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./time-d8438852.cjs'); -var promise = require('./promise-cda7b9bb.cjs'); -require('./metric.cjs'); -require('./math-96d5e8c4.cjs'); - - - -exports.all = promise.all; -exports.create = promise.create; -exports.createEmpty = promise.createEmpty; -exports.isPromise = promise.isPromise; -exports.reject = promise.reject; -exports.resolve = promise.resolve; -exports.resolveWith = promise.resolveWith; -exports.until = promise.until; -exports.untilAsync = promise.untilAsync; -exports.wait = promise.wait; -//# sourceMappingURL=promise.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.cjs.map deleted file mode 100644 index af5ad36..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promise.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.d.ts deleted file mode 100644 index ccb4234..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export function create(f: (arg0: PromiseResolve, arg1: (arg0: Error) => void) => any): Promise; -export function createEmpty(f: (arg0: () => void, arg1: (arg0: Error) => void) => void): Promise; -/** - * `Promise.all` wait for all promises in the array to resolve and return the result - * @template {unknown[] | []} PS - * - * @param {PS} ps - * @return {Promise<{ -readonly [P in keyof PS]: Awaited }>} - */ -export const all: { - (values: Iterable>): Promise[]>; - (values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; -}; -export function reject(reason?: Error): Promise; -export function resolve(res: T | void): Promise; -export function resolveWith(res: T): Promise; -export function until(timeout: number, check: () => boolean, intervalResolution?: number): Promise; -export function untilAsync(check: () => Promise | boolean, timeout?: number, intervalResolution?: number): Promise; -export function wait(timeout: number): Promise; -export function isPromise(p: any): boolean; -export type PromiseResolve = (result?: T | PromiseLike | undefined) => any; -//# sourceMappingURL=promise.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.d.ts.map deleted file mode 100644 index 28dbe4f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["../promise.js"],"names":[],"mappings":"AAmBO,uBAJM,CAAC,KACH,CAAS,IAAiB,EAAjB,cAAc,CAAC,CAAC,CAAC,EAAC,IAAoB,EAApB,CAAS,IAAK,EAAL,KAAK,KAAE,IAAI,KAAE,GAAG,GACnD,OAAO,CAAC,CAAC,CAAC,CAE+C;AAM9D,+BAHI,CAAS,IAAe,EAAf,MAAW,IAAI,EAAC,IAAoB,EAApB,CAAS,IAAK,EAAL,KAAK,KAAE,IAAI,KAAE,IAAI,GAClD,OAAO,CAAC,IAAI,CAAC,CAEqB;AAE9C;;;;;;GAMG;AACH;;8DAwCM,CAAC;EAxCqC;AAMrC,gCAHI,KAAK,GACJ,OAAO,CAAC,KAAK,CAAC,CAE4B;AAO/C,wBAJM,CAAC,OACH,CAAC,GAAC,IAAI,GACL,OAAO,CAAC,CAAC,GAAC,IAAI,CAAC,CAEuB;AAO3C,4BAJM,CAAC,OACH,CAAC,GACA,OAAO,CAAC,CAAC,CAAC,CAEgC;AAW/C,+BALI,MAAM,SACN,MAAW,OAAO,uBAClB,MAAM,GACL,OAAO,CAAC,IAAI,CAAC,CAkBvB;AAQK,kCALI,MAAI,OAAO,CAAC,OAAO,CAAC,GAAC,OAAO,YAC5B,MAAM,uBACN,MAAM,GACL,OAAO,CAAC,IAAI,CAAC,CAWxB;AAMM,8BAHI,MAAM,GACL,OAAO,CAAC,SAAS,CAAC,CAE2D;AAWlF,6BAHI,GAAG,GACF,OAAO,CAEwE;2BA1G9E,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.test.d.ts deleted file mode 100644 index aa230e1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.test.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function testRepeatPromise(_tc: t.TestCase): Promise; -export function testispromise(_tc: t.TestCase): void; -export function testTypings(_tc: t.TestCase): Promise; -import * as t from './testing.js'; -//# sourceMappingURL=promise.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.test.d.ts.map deleted file mode 100644 index b9b9a0a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/promise.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promise.test.d.ts","sourceRoot":"","sources":["../promise.test.js"],"names":[],"mappings":"AA6BO,uCAFI,CAAC,CAAC,QAAQ,iBAmBpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,iCAFI,CAAC,CAAC,QAAQ,iBAapB;mBA7EkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.cjs deleted file mode 100644 index 9439270..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.cjs +++ /dev/null @@ -1,97 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -class QueueNode { - constructor () { - /** - * @type {QueueNode|null} - */ - this.next = null; - } -} - -/** - * @template V - */ -class QueueValue extends QueueNode { - /** - * @param {V} v - */ - constructor (v) { - super(); - this.v = v; - } -} - -/** - * @template {QueueNode} N - */ -class Queue { - constructor () { - /** - * @type {N | null} - */ - this.start = null; - /** - * @type {N | null} - */ - this.end = null; - } -} - -/** - * @note The queue implementation is experimental and unfinished. - * Don't use this in production yet. - * - * @template {QueueNode} N - * @return {Queue} - */ -const create = () => new Queue(); - -/** - * @param {Queue} queue - */ -const isEmpty = queue => queue.start === null; - -/** - * @template {Queue} Q - * @param {Q} queue - * @param {Q extends Queue ? N : never} n - */ -const enqueue = (queue, n) => { - if (queue.end !== null) { - queue.end.next = n; - queue.end = n; - } else { - queue.end = n; - queue.start = n; - } -}; - -/** - * @template {QueueNode} N - * @param {Queue} queue - * @return {N | null} - */ -const dequeue = queue => { - const n = queue.start; - if (n !== null) { - // @ts-ignore - queue.start = n.next; - if (queue.start === null) { - queue.end = null; - } - return n - } - return null -}; - -exports.Queue = Queue; -exports.QueueNode = QueueNode; -exports.QueueValue = QueueValue; -exports.create = create; -exports.dequeue = dequeue; -exports.enqueue = enqueue; -exports.isEmpty = isEmpty; -//# sourceMappingURL=queue.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.cjs.map deleted file mode 100644 index b6c47aa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queue.cjs","sources":["../queue.js"],"sourcesContent":["export class QueueNode {\n constructor () {\n /**\n * @type {QueueNode|null}\n */\n this.next = null\n }\n}\n\n/**\n * @template V\n */\nexport class QueueValue extends QueueNode {\n /**\n * @param {V} v\n */\n constructor (v) {\n super()\n this.v = v\n }\n}\n\n/**\n * @template {QueueNode} N\n */\nexport class Queue {\n constructor () {\n /**\n * @type {N | null}\n */\n this.start = null\n /**\n * @type {N | null}\n */\n this.end = null\n }\n}\n\n/**\n * @note The queue implementation is experimental and unfinished.\n * Don't use this in production yet.\n *\n * @template {QueueNode} N\n * @return {Queue}\n */\nexport const create = () => new Queue()\n\n/**\n * @param {Queue} queue\n */\nexport const isEmpty = queue => queue.start === null\n\n/**\n * @template {Queue} Q\n * @param {Q} queue\n * @param {Q extends Queue ? N : never} n\n */\nexport const enqueue = (queue, n) => {\n if (queue.end !== null) {\n queue.end.next = n\n queue.end = n\n } else {\n queue.end = n\n queue.start = n\n }\n}\n\n/**\n * @template {QueueNode} N\n * @param {Queue} queue\n * @return {N | null}\n */\nexport const dequeue = queue => {\n const n = queue.start\n if (n !== null) {\n // @ts-ignore\n queue.start = n.next\n if (queue.start === null) {\n queue.end = null\n }\n return n\n }\n return null\n}\n"],"names":[],"mappings":";;;;AAAO,MAAM,SAAS,CAAC;AACvB,EAAE,WAAW,CAAC,GAAG;AACjB;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,GAAG,KAAI;AACpB,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACO,MAAM,UAAU,SAAS,SAAS,CAAC;AAC1C;AACA;AACA;AACA,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE;AAClB,IAAI,KAAK,GAAE;AACX,IAAI,IAAI,CAAC,CAAC,GAAG,EAAC;AACd,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACO,MAAM,KAAK,CAAC;AACnB,EAAE,WAAW,CAAC,GAAG;AACjB;AACA;AACA;AACA,IAAI,IAAI,CAAC,KAAK,GAAG,KAAI;AACrB;AACA;AACA;AACA,IAAI,IAAI,CAAC,GAAG,GAAG,KAAI;AACnB,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,IAAI,KAAK,GAAE;AACvC;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,KAAI;AACpD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,KAAK,EAAE,CAAC,KAAK;AACrC,EAAE,IAAI,KAAK,CAAC,GAAG,KAAK,IAAI,EAAE;AAC1B,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,EAAC;AACtB,IAAI,KAAK,CAAC,GAAG,GAAG,EAAC;AACjB,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,GAAG,GAAG,EAAC;AACjB,IAAI,KAAK,CAAC,KAAK,GAAG,EAAC;AACnB,GAAG;AACH,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,KAAK,IAAI;AAChC,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,MAAK;AACvB,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;AAClB;AACA,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,KAAI;AACxB,IAAI,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,EAAE;AAC9B,MAAM,KAAK,CAAC,GAAG,GAAG,KAAI;AACtB,KAAK;AACL,IAAI,OAAO,CAAC;AACZ,GAAG;AACH,EAAE,OAAO,IAAI;AACb;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.d.ts deleted file mode 100644 index abba016..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -export class QueueNode { - /** - * @type {QueueNode|null} - */ - next: QueueNode | null; -} -/** - * @template V - */ -export class QueueValue extends QueueNode { - /** - * @param {V} v - */ - constructor(v: V); - v: V; -} -/** - * @template {QueueNode} N - */ -export class Queue { - /** - * @type {N | null} - */ - start: N | null; - /** - * @type {N | null} - */ - end: N | null; -} -export function create(): Queue; -export function isEmpty(queue: Queue): boolean; -export function enqueue>(queue: Q, n: Q extends Queue ? N : never): void; -export function dequeue(queue: Queue): N | null; -//# sourceMappingURL=queue.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.d.ts.map deleted file mode 100644 index d9a6790..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../queue.js"],"names":[],"mappings":"AAAA;IAEI;;OAEG;IACH,MAFU,SAAS,GAAC,IAAI,CAER;CAEnB;AAED;;GAEG;AACH,wBAFa,CAAC;IAGZ;;OAEG;IACH,eAFW,CAAC,EAKX;IADC,KAAU;CAEb;AAED;;GAEG;AACH,mBAFyB,CAAC,SAAZ,SAAU;IAIpB;;OAEG;IACH,OAFU,CAAC,GAAG,IAAI,CAED;IACjB;;OAEG;IACH,KAFU,CAAC,GAAG,IAAI,CAEH;CAElB;AASM,uBAHkB,CAAC,SAAZ,SAAU,KACZ,KAAK,CAAC,CAAC,CAAC,CAEmB;AAKhC,+BAFI,KAAK,CAAC,GAAG,CAAC,WAE+B;AAO7C,wBAJmB,CAAC,SAAb,KAAK,CAAC,GAAG,CAAE,SACd,CAAC,KACD,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,QAU9C;AAOM,wBAJkB,CAAC,SAAZ,SAAU,SACb,KAAK,CAAC,CAAC,CAAC,GACP,CAAC,GAAG,IAAI,CAanB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.test.d.ts deleted file mode 100644 index 7caa54d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testEnqueueDequeue(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=queue.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.test.d.ts.map deleted file mode 100644 index df87497..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/queue.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queue.test.d.ts","sourceRoot":"","sources":["../queue.test.js"],"names":[],"mappings":"AAMO,wCAFI,CAAC,CAAC,QAAQ,QA8BpB;mBAlCkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-gf2-polynomial.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-gf2-polynomial.cjs deleted file mode 100644 index a0ff38f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-gf2-polynomial.cjs +++ /dev/null @@ -1,440 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var math = require('./math-96d5e8c4.cjs'); -var webcrypto = require('lib0/webcrypto'); -var array = require('./array-78849c95.cjs'); -var buffer = require('./buffer-3e750729.cjs'); -require('./set-5b47859e.cjs'); -require('./string-fddc5f8b.cjs'); -require('./environment-1c97264d.cjs'); -require('./map-24d263c0.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./encoding-1a745c43.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./decoding-76e75827.cjs'); -require('./error-0c1f634f.cjs'); - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var webcrypto__namespace = /*#__PURE__*/_interopNamespace(webcrypto); - -/** - * The idea of the Rabin fingerprint algorithm is to represent the binary as a polynomial in a - * finite field (Galois Field G(2)). The polynomial will then be taken "modulo" by an irreducible - * polynomial of the desired size. - * - * This implementation is inefficient and is solely used to verify the actually performant - * implementation in `./rabin.js`. - * - * @module rabin-gf2-polynomial - */ - -/** - * @param {number} degree - */ -const _degreeToMinByteLength = degree => math.floor(degree / 8) + 1; - -/** - * This is a GF2 Polynomial abstraction that is not meant for production! - * - * It is easy to understand and it's correctness is as obvious as possible. It can be used to verify - * efficient implementations of algorithms on GF2. - */ -class GF2Polynomial { - constructor () { - /** - * @type {Set} - */ - this.degrees = new Set(); - } -} - -/** - * From Uint8Array (MSB). - * - * @param {Uint8Array} bytes - */ -const createFromBytes = bytes => { - const p = new GF2Polynomial(); - for (let bsi = bytes.length - 1, currDegree = 0; bsi >= 0; bsi--) { - const currByte = bytes[bsi]; - for (let i = 0; i < 8; i++) { - if (((currByte >>> i) & 1) === 1) { - p.degrees.add(currDegree); - } - currDegree++; - } - } - return p -}; - -/** - * Transform to Uint8Array (MSB). - * - * @param {GF2Polynomial} p - * @param {number} byteLength - */ -const toUint8Array = (p, byteLength = _degreeToMinByteLength(getHighestDegree(p))) => { - const buf = buffer.createUint8ArrayFromLen(byteLength); - /** - * @param {number} i - */ - const setBit = i => { - const bi = math.floor(i / 8); - buf[buf.length - 1 - bi] |= (1 << (i % 8)); - }; - p.degrees.forEach(setBit); - return buf -}; - -/** - * Create from unsigned integer (max 32bit uint) - read most-significant-byte first. - * - * @param {number} uint - */ -const createFromUint = uint => { - const buf = new Uint8Array(4); - for (let i = 0; i < 4; i++) { - buf[i] = uint >>> 8 * (3 - i); - } - return createFromBytes(buf) -}; - -/** - * Create a random polynomial of a specified degree. - * - * @param {number} degree - */ -const createRandom = degree => { - const bs = new Uint8Array(_degreeToMinByteLength(degree)); - webcrypto__namespace.getRandomValues(bs); - // Get first byte and explicitly set the bit of "degree" to 1 (the result must have the specified - // degree). - const firstByte = bs[0] | 1 << (degree % 8); - // Find out how many bits of the first byte need to be filled with zeros because they are >degree. - const zeros = 7 - (degree % 8); - bs[0] = ((firstByte << zeros) & 0xff) >>> zeros; - return createFromBytes(bs) -}; - -/** - * @param {GF2Polynomial} p - * @return number - */ -const getHighestDegree = p => array.fold(array.from(p.degrees), 0, math.max); - -/** - * Add (+) p2 int the p1 polynomial. - * - * Addition is defined as xor in F2. Substraction is equivalent to addition in F2. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -const addInto = (p1, p2) => { - p2.degrees.forEach(degree => { - if (p1.degrees.has(degree)) { - p1.degrees.delete(degree); - } else { - p1.degrees.add(degree); - } - }); -}; - -/** - * Or (|) p2 into the p1 polynomial. - * - * Addition is defined as xor in F2. Substraction is equivalent to addition in F2. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -const orInto = (p1, p2) => { - p2.degrees.forEach(degree => { - p1.degrees.add(degree); - }); -}; - -/** - * Add (+) p2 to the p1 polynomial. - * - * Addition is defined as xor in F2. Substraction is equivalent to addition in F2. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -const add = (p1, p2) => { - const result = new GF2Polynomial(); - p2.degrees.forEach(degree => { - if (!p1.degrees.has(degree)) { - result.degrees.add(degree); - } - }); - p1.degrees.forEach(degree => { - if (!p2.degrees.has(degree)) { - result.degrees.add(degree); - } - }); - return result -}; - -/** - * Add (+) p2 to the p1 polynomial. - * - * Addition is defined as xor in F2. Substraction is equivalent to addition in F2. - * - * @param {GF2Polynomial} p - */ -const clone = (p) => { - const result = new GF2Polynomial(); - p.degrees.forEach(d => result.degrees.add(d)); - return result -}; - -/** - * Add (+) p2 to the p1 polynomial. - * - * Addition is defined as xor in F2. Substraction is equivalent to addition in F2. - * - * @param {GF2Polynomial} p - * @param {number} degree - */ -const addDegreeInto = (p, degree) => { - if (p.degrees.has(degree)) { - p.degrees.delete(degree); - } else { - p.degrees.add(degree); - } -}; - -/** - * Multiply (•) p1 with p2 and store the result in p1. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -const multiply = (p1, p2) => { - const result = new GF2Polynomial(); - p1.degrees.forEach(degree1 => { - p2.degrees.forEach(degree2 => { - addDegreeInto(result, degree1 + degree2); - }); - }); - return result -}; - -/** - * Multiply (•) p1 with p2 and store the result in p1. - * - * @param {GF2Polynomial} p - * @param {number} shift - */ -const shiftLeft = (p, shift) => { - const result = new GF2Polynomial(); - p.degrees.forEach(degree => { - const r = degree + shift; - r >= 0 && result.degrees.add(r); - }); - return result -}; - -/** - * Computes p1 % p2. I.e. the remainder of p1/p2. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -const mod = (p1, p2) => { - const maxDeg1 = getHighestDegree(p1); - const maxDeg2 = getHighestDegree(p2); - const result = clone(p1); - for (let i = maxDeg1 - maxDeg2; i >= 0; i--) { - if (result.degrees.has(maxDeg2 + i)) { - const shifted = shiftLeft(p2, i); - addInto(result, shifted); - } - } - return result -}; - -/** - * Computes (p^e mod m). - * - * http://en.wikipedia.org/wiki/Modular_exponentiation - * - * @param {GF2Polynomial} p - * @param {number} e - * @param {GF2Polynomial} m - */ -const modPow = (p, e, m) => { - let result = ONE; - while (true) { - if ((e & 1) === 1) { - result = mod(multiply(result, p), m); - } - e >>>= 1; - if (e === 0) { - return result - } - p = mod(multiply(p, p), m); - } -}; - -/** - * Find the greatest common divisor using Euclid's Algorithm. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -const gcd = (p1, p2) => { - while (p2.degrees.size > 0) { - const modded = mod(p1, p2); - p1 = p2; - p2 = modded; - } - return p1 -}; - -/** - * true iff p1 equals p2 - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -const equals = (p1, p2) => { - if (p1.degrees.size !== p2.degrees.size) return false - for (const d of p1.degrees) { - if (!p2.degrees.has(d)) return false - } - return true -}; - -const X = createFromBytes(new Uint8Array([2])); -const ONE = createFromBytes(new Uint8Array([1])); - -/** - * Computes ( x^(2^p) - x ) mod f - * - * (shamelessly copied from - * https://github.com/opendedup/rabinfingerprint/blob/master/src/org/rabinfingerprint/polynomial/Polynomial.java) - * - * @param {GF2Polynomial} f - * @param {number} p - */ -const reduceExponent = (f, p) => { - // compute (x^q^p mod f) - const q2p = math.pow(2, p); - const x2q2p = modPow(X, q2p, f); - // subtract (x mod f) - return mod(add(x2q2p, X), f) -}; - -/** - * BenOr Reducibility Test - * - * Tests and Constructions of Irreducible Polynomials over Finite Fields - * (1997) Shuhong Gao, Daniel Panario - * - * http://citeseer.ist.psu.edu/cache/papers/cs/27167/http:zSzzSzwww.math.clemson.eduzSzfacultyzSzGaozSzpaperszSzGP97a.pdf/gao97tests.pdf - * - * @param {GF2Polynomial} p - */ -const isIrreducibleBenOr = p => { - const degree = getHighestDegree(p); - for (let i = 1; i < degree / 2; i++) { - const b = reduceExponent(p, i); - const g = gcd(p, b); - if (!equals(g, ONE)) { - return false - } - } - return true -}; - -/** - * @param {number} degree - */ -const createIrreducible = degree => { - while (true) { - const p = createRandom(degree); - if (isIrreducibleBenOr(p)) return p - } -}; - -/** - * Create a fingerprint of buf using the irreducible polynomial m. - * - * @param {Uint8Array} buf - * @param {GF2Polynomial} m - */ -const fingerprint = (buf, m) => toUint8Array(mod(createFromBytes(buf), m), _degreeToMinByteLength(getHighestDegree(m) - 1)); - -class RabinPolynomialEncoder { - /** - * @param {GF2Polynomial} m The irreducible polynomial - */ - constructor (m) { - this.fingerprint = new GF2Polynomial(); - this.m = m; - } - - /** - * @param {number} b - */ - write (b) { - const bp = createFromBytes(new Uint8Array([b])); - const fingerprint = shiftLeft(this.fingerprint, 8); - orInto(fingerprint, bp); - this.fingerprint = mod(fingerprint, this.m); - } - - getFingerprint () { - return toUint8Array(this.fingerprint, _degreeToMinByteLength(getHighestDegree(this.m) - 1)) - } -} - -exports.GF2Polynomial = GF2Polynomial; -exports.RabinPolynomialEncoder = RabinPolynomialEncoder; -exports.add = add; -exports.addDegreeInto = addDegreeInto; -exports.addInto = addInto; -exports.clone = clone; -exports.createFromBytes = createFromBytes; -exports.createFromUint = createFromUint; -exports.createIrreducible = createIrreducible; -exports.createRandom = createRandom; -exports.equals = equals; -exports.fingerprint = fingerprint; -exports.gcd = gcd; -exports.getHighestDegree = getHighestDegree; -exports.isIrreducibleBenOr = isIrreducibleBenOr; -exports.mod = mod; -exports.modPow = modPow; -exports.multiply = multiply; -exports.orInto = orInto; -exports.shiftLeft = shiftLeft; -exports.toUint8Array = toUint8Array; -//# sourceMappingURL=rabin-gf2-polynomial.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-gf2-polynomial.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-gf2-polynomial.cjs.map deleted file mode 100644 index e191771..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-gf2-polynomial.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin-gf2-polynomial.cjs","sources":["../hash/rabin-gf2-polynomial.js"],"sourcesContent":["/**\n * The idea of the Rabin fingerprint algorithm is to represent the binary as a polynomial in a\n * finite field (Galois Field G(2)). The polynomial will then be taken \"modulo\" by an irreducible\n * polynomial of the desired size.\n *\n * This implementation is inefficient and is solely used to verify the actually performant\n * implementation in `./rabin.js`.\n *\n * @module rabin-gf2-polynomial\n */\n\nimport * as math from '../math.js'\nimport * as webcrypto from 'lib0/webcrypto'\nimport * as array from '../array.js'\nimport * as buffer from '../buffer.js'\n\n/**\n * @param {number} degree\n */\nconst _degreeToMinByteLength = degree => math.floor(degree / 8) + 1\n\n/**\n * This is a GF2 Polynomial abstraction that is not meant for production!\n *\n * It is easy to understand and it's correctness is as obvious as possible. It can be used to verify\n * efficient implementations of algorithms on GF2.\n */\nexport class GF2Polynomial {\n constructor () {\n /**\n * @type {Set}\n */\n this.degrees = new Set()\n }\n}\n\n/**\n * From Uint8Array (MSB).\n *\n * @param {Uint8Array} bytes\n */\nexport const createFromBytes = bytes => {\n const p = new GF2Polynomial()\n for (let bsi = bytes.length - 1, currDegree = 0; bsi >= 0; bsi--) {\n const currByte = bytes[bsi]\n for (let i = 0; i < 8; i++) {\n if (((currByte >>> i) & 1) === 1) {\n p.degrees.add(currDegree)\n }\n currDegree++\n }\n }\n return p\n}\n\n/**\n * Transform to Uint8Array (MSB).\n *\n * @param {GF2Polynomial} p\n * @param {number} byteLength\n */\nexport const toUint8Array = (p, byteLength = _degreeToMinByteLength(getHighestDegree(p))) => {\n const buf = buffer.createUint8ArrayFromLen(byteLength)\n /**\n * @param {number} i\n */\n const setBit = i => {\n const bi = math.floor(i / 8)\n buf[buf.length - 1 - bi] |= (1 << (i % 8))\n }\n p.degrees.forEach(setBit)\n return buf\n}\n\n/**\n * Create from unsigned integer (max 32bit uint) - read most-significant-byte first.\n *\n * @param {number} uint\n */\nexport const createFromUint = uint => {\n const buf = new Uint8Array(4)\n for (let i = 0; i < 4; i++) {\n buf[i] = uint >>> 8 * (3 - i)\n }\n return createFromBytes(buf)\n}\n\n/**\n * Create a random polynomial of a specified degree.\n *\n * @param {number} degree\n */\nexport const createRandom = degree => {\n const bs = new Uint8Array(_degreeToMinByteLength(degree))\n webcrypto.getRandomValues(bs)\n // Get first byte and explicitly set the bit of \"degree\" to 1 (the result must have the specified\n // degree).\n const firstByte = bs[0] | 1 << (degree % 8)\n // Find out how many bits of the first byte need to be filled with zeros because they are >degree.\n const zeros = 7 - (degree % 8)\n bs[0] = ((firstByte << zeros) & 0xff) >>> zeros\n return createFromBytes(bs)\n}\n\n/**\n * @param {GF2Polynomial} p\n * @return number\n */\nexport const getHighestDegree = p => array.fold(array.from(p.degrees), 0, math.max)\n\n/**\n * Add (+) p2 int the p1 polynomial.\n *\n * Addition is defined as xor in F2. Substraction is equivalent to addition in F2.\n *\n * @param {GF2Polynomial} p1\n * @param {GF2Polynomial} p2\n */\nexport const addInto = (p1, p2) => {\n p2.degrees.forEach(degree => {\n if (p1.degrees.has(degree)) {\n p1.degrees.delete(degree)\n } else {\n p1.degrees.add(degree)\n }\n })\n}\n\n/**\n * Or (|) p2 into the p1 polynomial.\n *\n * Addition is defined as xor in F2. Substraction is equivalent to addition in F2.\n *\n * @param {GF2Polynomial} p1\n * @param {GF2Polynomial} p2\n */\nexport const orInto = (p1, p2) => {\n p2.degrees.forEach(degree => {\n p1.degrees.add(degree)\n })\n}\n\n/**\n * Add (+) p2 to the p1 polynomial.\n *\n * Addition is defined as xor in F2. Substraction is equivalent to addition in F2.\n *\n * @param {GF2Polynomial} p1\n * @param {GF2Polynomial} p2\n */\nexport const add = (p1, p2) => {\n const result = new GF2Polynomial()\n p2.degrees.forEach(degree => {\n if (!p1.degrees.has(degree)) {\n result.degrees.add(degree)\n }\n })\n p1.degrees.forEach(degree => {\n if (!p2.degrees.has(degree)) {\n result.degrees.add(degree)\n }\n })\n return result\n}\n\n/**\n * Add (+) p2 to the p1 polynomial.\n *\n * Addition is defined as xor in F2. Substraction is equivalent to addition in F2.\n *\n * @param {GF2Polynomial} p\n */\nexport const clone = (p) => {\n const result = new GF2Polynomial()\n p.degrees.forEach(d => result.degrees.add(d))\n return result\n}\n\n/**\n * Add (+) p2 to the p1 polynomial.\n *\n * Addition is defined as xor in F2. Substraction is equivalent to addition in F2.\n *\n * @param {GF2Polynomial} p\n * @param {number} degree\n */\nexport const addDegreeInto = (p, degree) => {\n if (p.degrees.has(degree)) {\n p.degrees.delete(degree)\n } else {\n p.degrees.add(degree)\n }\n}\n\n/**\n * Multiply (•) p1 with p2 and store the result in p1.\n *\n * @param {GF2Polynomial} p1\n * @param {GF2Polynomial} p2\n */\nexport const multiply = (p1, p2) => {\n const result = new GF2Polynomial()\n p1.degrees.forEach(degree1 => {\n p2.degrees.forEach(degree2 => {\n addDegreeInto(result, degree1 + degree2)\n })\n })\n return result\n}\n\n/**\n * Multiply (•) p1 with p2 and store the result in p1.\n *\n * @param {GF2Polynomial} p\n * @param {number} shift\n */\nexport const shiftLeft = (p, shift) => {\n const result = new GF2Polynomial()\n p.degrees.forEach(degree => {\n const r = degree + shift\n r >= 0 && result.degrees.add(r)\n })\n return result\n}\n\n/**\n * Computes p1 % p2. I.e. the remainder of p1/p2.\n *\n * @param {GF2Polynomial} p1\n * @param {GF2Polynomial} p2\n */\nexport const mod = (p1, p2) => {\n const maxDeg1 = getHighestDegree(p1)\n const maxDeg2 = getHighestDegree(p2)\n const result = clone(p1)\n for (let i = maxDeg1 - maxDeg2; i >= 0; i--) {\n if (result.degrees.has(maxDeg2 + i)) {\n const shifted = shiftLeft(p2, i)\n addInto(result, shifted)\n }\n }\n return result\n}\n\n/**\n * Computes (p^e mod m).\n *\n * http://en.wikipedia.org/wiki/Modular_exponentiation\n *\n * @param {GF2Polynomial} p\n * @param {number} e\n * @param {GF2Polynomial} m\n */\nexport const modPow = (p, e, m) => {\n let result = ONE\n while (true) {\n if ((e & 1) === 1) {\n result = mod(multiply(result, p), m)\n }\n e >>>= 1\n if (e === 0) {\n return result\n }\n p = mod(multiply(p, p), m)\n }\n}\n\n/**\n * Find the greatest common divisor using Euclid's Algorithm.\n *\n * @param {GF2Polynomial} p1\n * @param {GF2Polynomial} p2\n */\nexport const gcd = (p1, p2) => {\n while (p2.degrees.size > 0) {\n const modded = mod(p1, p2)\n p1 = p2\n p2 = modded\n }\n return p1\n}\n\n/**\n * true iff p1 equals p2\n *\n * @param {GF2Polynomial} p1\n * @param {GF2Polynomial} p2\n */\nexport const equals = (p1, p2) => {\n if (p1.degrees.size !== p2.degrees.size) return false\n for (const d of p1.degrees) {\n if (!p2.degrees.has(d)) return false\n }\n return true\n}\n\nconst X = createFromBytes(new Uint8Array([2]))\nconst ONE = createFromBytes(new Uint8Array([1]))\n\n/**\n * Computes ( x^(2^p) - x ) mod f\n *\n * (shamelessly copied from\n * https://github.com/opendedup/rabinfingerprint/blob/master/src/org/rabinfingerprint/polynomial/Polynomial.java)\n *\n * @param {GF2Polynomial} f\n * @param {number} p\n */\nconst reduceExponent = (f, p) => {\n // compute (x^q^p mod f)\n const q2p = math.pow(2, p)\n const x2q2p = modPow(X, q2p, f)\n // subtract (x mod f)\n return mod(add(x2q2p, X), f)\n}\n\n/**\n * BenOr Reducibility Test\n *\n * Tests and Constructions of Irreducible Polynomials over Finite Fields\n * (1997) Shuhong Gao, Daniel Panario\n *\n * http://citeseer.ist.psu.edu/cache/papers/cs/27167/http:zSzzSzwww.math.clemson.eduzSzfacultyzSzGaozSzpaperszSzGP97a.pdf/gao97tests.pdf\n *\n * @param {GF2Polynomial} p\n */\nexport const isIrreducibleBenOr = p => {\n const degree = getHighestDegree(p)\n for (let i = 1; i < degree / 2; i++) {\n const b = reduceExponent(p, i)\n const g = gcd(p, b)\n if (!equals(g, ONE)) {\n return false\n }\n }\n return true\n}\n\n/**\n * @param {number} degree\n */\nexport const createIrreducible = degree => {\n while (true) {\n const p = createRandom(degree)\n if (isIrreducibleBenOr(p)) return p\n }\n}\n\n/**\n * Create a fingerprint of buf using the irreducible polynomial m.\n *\n * @param {Uint8Array} buf\n * @param {GF2Polynomial} m\n */\nexport const fingerprint = (buf, m) => toUint8Array(mod(createFromBytes(buf), m), _degreeToMinByteLength(getHighestDegree(m) - 1))\n\nexport class RabinPolynomialEncoder {\n /**\n * @param {GF2Polynomial} m The irreducible polynomial\n */\n constructor (m) {\n this.fingerprint = new GF2Polynomial()\n this.m = m\n }\n\n /**\n * @param {number} b\n */\n write (b) {\n const bp = createFromBytes(new Uint8Array([b]))\n const fingerprint = shiftLeft(this.fingerprint, 8)\n orInto(fingerprint, bp)\n this.fingerprint = mod(fingerprint, this.m)\n }\n\n getFingerprint () {\n return toUint8Array(this.fingerprint, _degreeToMinByteLength(getHighestDegree(this.m) - 1))\n }\n}\n"],"names":["math.floor","buffer.createUint8ArrayFromLen","webcrypto","array.fold","array.from","math.max","math.pow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA,MAAM,sBAAsB,GAAG,MAAM,IAAIA,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,EAAC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,aAAa,CAAC;AAC3B,EAAE,WAAW,CAAC,GAAG;AACjB;AACA;AACA;AACA,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,GAAE;AAC5B,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAG,KAAK,IAAI;AACxC,EAAE,MAAM,CAAC,GAAG,IAAI,aAAa,GAAE;AAC/B,EAAE,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE;AACpE,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,EAAC;AAC/B,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAChC,MAAM,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,IAAI,CAAC,MAAM,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} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-uncached.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-uncached.cjs deleted file mode 100644 index 6232837..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-uncached.cjs +++ /dev/null @@ -1,90 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var math = require('./math-96d5e8c4.cjs'); -var buffer = require('./buffer-3e750729.cjs'); -require('./string-fddc5f8b.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./environment-1c97264d.cjs'); -require('./map-24d263c0.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./encoding-1a745c43.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./decoding-76e75827.cjs'); -require('./error-0c1f634f.cjs'); - -/** - * It is not recommended to use this package. This is the uncached implementation of the rabin - * fingerprint algorithm. However, it can be used to verify the `rabin.js` implementation. - * - * @module rabin-uncached - */ - -class RabinUncachedEncoder { - /** - * @param {Uint8Array} m assert(m[0] === 1) - */ - constructor (m) { - this.m = m; - this.blen = m.byteLength; - this.bs = new Uint8Array(this.blen); - /** - * This describes the position of the most significant byte (starts with 0 and increases with - * shift) - */ - this.bpos = 0; - } - - /** - * Add/Xor/Substract bytes. - * - * Discards bytes that are out of range. - * @todo put this in function or inline - * - * @param {Uint8Array} cs - */ - add (cs) { - const copyLen = math.min(this.blen, cs.byteLength); - // copy from right to left until max is reached - for (let i = 0; i < copyLen; i++) { - this.bs[(this.bpos + this.blen - i - 1) % this.blen] ^= cs[cs.byteLength - i - 1]; - } - } - - /** - * @param {number} byte - */ - write (byte) { - // [0,m1,m2,b] - // x <- bpos - // Shift one byte to the left, add b - this.bs[this.bpos] = byte; - this.bpos = (this.bpos + 1) % this.blen; - // mod - for (let i = 7; i >= 0; i--) { - if (((this.bs[this.bpos] >>> i) & 1) === 1) { - this.add(buffer.shiftNBitsLeft(this.m, i)); - } - } - // if (this.bs[this.bpos] !== 0) { error.unexpectedCase() } - // assert(this.bs[this.bpos] === 0) - } - - getFingerprint () { - const result = new Uint8Array(this.blen - 1); - for (let i = 0; i < result.byteLength; i++) { - result[i] = this.bs[(this.bpos + i + 1) % this.blen]; - } - return result - } -} - -exports.RabinUncachedEncoder = RabinUncachedEncoder; -//# sourceMappingURL=rabin-uncached.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-uncached.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-uncached.cjs.map deleted file mode 100644 index 1734ea3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin-uncached.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin-uncached.cjs","sources":["../hash/rabin-uncached.js"],"sourcesContent":["/**\n * It is not recommended to use this package. This is the uncached implementation of the rabin\n * fingerprint algorithm. However, it can be used to verify the `rabin.js` implementation.\n *\n * @module rabin-uncached\n */\n\nimport * as math from '../math.js'\nimport * as buffer from '../buffer.js'\n\nexport class RabinUncachedEncoder {\n /**\n * @param {Uint8Array} m assert(m[0] === 1)\n */\n constructor (m) {\n this.m = m\n this.blen = m.byteLength\n this.bs = new Uint8Array(this.blen)\n /**\n * This describes the position of the most significant byte (starts with 0 and increases with\n * shift)\n */\n this.bpos = 0\n }\n\n /**\n * Add/Xor/Substract bytes.\n *\n * Discards bytes that are out of range.\n * @todo put this in function or inline\n *\n * @param {Uint8Array} cs\n */\n add (cs) {\n const copyLen = math.min(this.blen, cs.byteLength)\n // copy from right to left until max is reached\n for (let i = 0; i < copyLen; i++) {\n this.bs[(this.bpos + this.blen - i - 1) % this.blen] ^= cs[cs.byteLength - i - 1]\n }\n }\n\n /**\n * @param {number} byte\n */\n write (byte) {\n // [0,m1,m2,b]\n // x <- bpos\n // Shift one byte to the left, add b\n this.bs[this.bpos] = byte\n this.bpos = (this.bpos + 1) % this.blen\n // mod\n for (let i = 7; i >= 0; i--) {\n if (((this.bs[this.bpos] >>> i) & 1) === 1) {\n this.add(buffer.shiftNBitsLeft(this.m, i))\n }\n }\n // if (this.bs[this.bpos] !== 0) { error.unexpectedCase() }\n // assert(this.bs[this.bpos] === 0)\n }\n\n getFingerprint () {\n const result = new Uint8Array(this.blen - 1)\n for (let i = 0; i < result.byteLength; i++) {\n result[i] = this.bs[(this.bpos + i + 1) % this.blen]\n }\n return result\n }\n}\n"],"names":["math.min","buffer.shiftNBitsLeft"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAIA;AACO,MAAM,oBAAoB,CAAC;AAClC;AACA;AACA;AACA,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE;AAClB,IAAI,IAAI,CAAC,CAAC,GAAG,EAAC;AACd,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,WAAU;AAC5B,IAAI,IAAI,CAAC,EAAE,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,EAAC;AACvC;AACA;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,GAAG,EAAC;AACjB,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE;AACX,IAAI,MAAM,OAAO,GAAGA,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,EAAC;AACtD;AACA,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;AACtC,MAAM,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,IA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/node_modules/lib0/dist/rabin.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin.cjs deleted file mode 100644 index b8f2e5b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin.cjs +++ /dev/null @@ -1,128 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var buffer = require('./buffer-3e750729.cjs'); -var map = require('./map-24d263c0.cjs'); -require('./string-fddc5f8b.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./environment-1c97264d.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -require('./object-c0c9435b.cjs'); -require('./equality.cjs'); -require('./math-96d5e8c4.cjs'); -require('./encoding-1a745c43.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./decoding-76e75827.cjs'); -require('./error-0c1f634f.cjs'); - -/** - * @module rabin - * - * Very efficient & versatile fingerprint/hashing algorithm. However, it is not cryptographically - * secure. Well suited for fingerprinting. - */ - -const StandardIrreducible8 = new Uint8Array([1, 221]); -const StandardIrreducible16 = new Uint8Array([1, 244, 157]); -const StandardIrreducible32 = new Uint8Array([1, 149, 183, 205, 191]); -const StandardIrreducible64 = new Uint8Array([1, 133, 250, 114, 193, 250, 28, 193, 231]); -const StandardIrreducible128 = new Uint8Array([1, 94, 109, 166, 228, 6, 222, 102, 239, 27, 128, 184, 13, 50, 112, 169, 199]); - -/** - * Maps from a modulo to the precomputed values. - * - * @type {Map} - */ -const _precomputedFingerprintCache = new Map(); - -/** - * @param {Uint8Array} m - */ -const ensureCache = m => map.setIfUndefined(_precomputedFingerprintCache, buffer.toBase64(m), () => { - const byteLen = m.byteLength; - const cache = new Uint8Array(256 * byteLen); - // Use dynamic computing to compute the cached results. - // Starting values: cache(0) = 0; cache(1) = m - cache.set(m, byteLen); - for (let bit = 1; bit < 8; bit++) { - const mBitShifted = buffer.shiftNBitsLeft(m, bit); - const bitShifted = 1 << bit; - for (let j = 0; j < bitShifted; j++) { - // apply the shifted result (reducing the degree of the polynomial) - const msb = bitShifted | j; - const rest = msb ^ mBitShifted[0]; - for (let i = 0; i < byteLen; i++) { - // rest is already precomputed in the cache - cache[msb * byteLen + i] = cache[rest * byteLen + i] ^ mBitShifted[i]; - } - // if (cache[(bitShifted | j) * byteLen] !== (bitShifted | j)) { error.unexpectedCase() } - } - } - return cache -}); - -class RabinEncoder { - /** - * @param {Uint8Array} m assert(m[0] === 1) - */ - constructor (m) { - this.m = m; - this.blen = m.byteLength; - this.bs = new Uint8Array(this.blen); - this.cache = ensureCache(m); - /** - * This describes the position of the most significant byte (starts with 0 and increases with - * shift) - */ - this.bpos = 0; - } - - /** - * @param {number} byte - */ - write (byte) { - // assert(this.bs[0] === 0) - // Shift one byte to the left, add b - this.bs[this.bpos] = byte; - this.bpos = (this.bpos + 1) % this.blen; - const msb = this.bs[this.bpos]; - for (let i = 0; i < this.blen; i++) { - this.bs[(this.bpos + i) % this.blen] ^= this.cache[msb * this.blen + i]; - } - // assert(this.bs[this.bpos] === 0) - } - - getFingerprint () { - const result = new Uint8Array(this.blen - 1); - for (let i = 0; i < result.byteLength; i++) { - result[i] = this.bs[(this.bpos + i + 1) % this.blen]; - } - return result - } -} - -/** - * @param {Uint8Array} irreducible - * @param {Uint8Array} data - */ -const fingerprint = (irreducible, data) => { - const encoder = new RabinEncoder(irreducible); - for (let i = 0; i < data.length; i++) { - encoder.write(data[i]); - } - return encoder.getFingerprint() -}; - -exports.RabinEncoder = RabinEncoder; -exports.StandardIrreducible128 = StandardIrreducible128; -exports.StandardIrreducible16 = StandardIrreducible16; -exports.StandardIrreducible32 = StandardIrreducible32; -exports.StandardIrreducible64 = StandardIrreducible64; -exports.StandardIrreducible8 = StandardIrreducible8; -exports.fingerprint = fingerprint; -//# sourceMappingURL=rabin.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin.cjs.map deleted file mode 100644 index 89b5fdc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rabin.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin.cjs","sources":["../hash/rabin.js"],"sourcesContent":["/**\n * @module rabin\n *\n * Very efficient & versatile fingerprint/hashing algorithm. However, it is not cryptographically\n * secure. Well suited for fingerprinting.\n */\n\nimport * as buffer from '../buffer.js'\nimport * as map from '../map.js'\n\nexport const StandardIrreducible8 = new Uint8Array([1, 221])\nexport const StandardIrreducible16 = new Uint8Array([1, 244, 157])\nexport const StandardIrreducible32 = new Uint8Array([1, 149, 183, 205, 191])\nexport const StandardIrreducible64 = new Uint8Array([1, 133, 250, 114, 193, 250, 28, 193, 231])\nexport const StandardIrreducible128 = new Uint8Array([1, 94, 109, 166, 228, 6, 222, 102, 239, 27, 128, 184, 13, 50, 112, 169, 199])\n\n/**\n * Maps from a modulo to the precomputed values.\n *\n * @type {Map}\n */\nconst _precomputedFingerprintCache = new Map()\n\n/**\n * @param {Uint8Array} m\n */\nconst ensureCache = m => map.setIfUndefined(_precomputedFingerprintCache, buffer.toBase64(m), () => {\n const byteLen = m.byteLength\n const cache = new Uint8Array(256 * byteLen)\n // Use dynamic computing to compute the cached results.\n // Starting values: cache(0) = 0; cache(1) = m\n cache.set(m, byteLen)\n for (let bit = 1; bit < 8; bit++) {\n const mBitShifted = buffer.shiftNBitsLeft(m, bit)\n const bitShifted = 1 << bit\n for (let j = 0; j < bitShifted; j++) {\n // apply the shifted result (reducing the degree of the polynomial)\n const msb = bitShifted | j\n const rest = msb ^ mBitShifted[0]\n for (let i = 0; i < byteLen; i++) {\n // rest is already precomputed in the cache\n cache[msb * byteLen + i] = cache[rest * byteLen + i] ^ mBitShifted[i]\n }\n // if (cache[(bitShifted | j) * byteLen] !== (bitShifted | j)) { error.unexpectedCase() }\n }\n }\n return cache\n})\n\nexport class RabinEncoder {\n /**\n * @param {Uint8Array} m assert(m[0] === 1)\n */\n constructor (m) {\n this.m = m\n this.blen = m.byteLength\n this.bs = new Uint8Array(this.blen)\n this.cache = ensureCache(m)\n /**\n * This describes the position of the most significant byte (starts with 0 and increases with\n * shift)\n */\n this.bpos = 0\n }\n\n /**\n * @param {number} byte\n */\n write (byte) {\n // assert(this.bs[0] === 0)\n // Shift one byte to the left, add b\n this.bs[this.bpos] = byte\n this.bpos = (this.bpos + 1) % this.blen\n const msb = this.bs[this.bpos]\n for (let i = 0; i < this.blen; i++) {\n this.bs[(this.bpos + i) % this.blen] ^= this.cache[msb * this.blen + i]\n }\n // assert(this.bs[this.bpos] === 0)\n }\n\n getFingerprint () {\n const result = new Uint8Array(this.blen - 1)\n for (let i = 0; i < result.byteLength; i++) {\n result[i] = this.bs[(this.bpos + i + 1) % this.blen]\n }\n return result\n }\n}\n\n/**\n * @param {Uint8Array} irreducible\n * @param {Uint8Array} data\n */\nexport const fingerprint = (irreducible, data) => {\n const encoder = new RabinEncoder(irreducible)\n for (let i = 0; i < data.length; i++) {\n encoder.write(data[i])\n }\n return encoder.getFingerprint()\n}\n"],"names":["map.setIfUndefined","buffer.toBase64","buffer.shiftNBitsLeft"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAIA;AACY,MAAC,oBAAoB,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAC;AAChD,MAAC,qBAAqB,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAC;AACtD,MAAC,qBAAqB,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAC;AAChE,MAAC,qBAAqB,GAAG,IAAI,UAAU,CAAC,CAAC,CAA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,CAAC,IAAI,GAAG,CAAC,EAAC;AAC7E,KAAK;AACL;AACA,GAAG;AACH;AACA,EAAE,cAAc,CAAC,GAAG;AACpB,IAAI,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,EAAC;AAChD,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE;AAChD,MAAM,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,EAAC;AAC1D,KAAK;AACL,IAAI,OAAO,MAAM;AACjB,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,CAAC,WAAW,EAAE,IAAI,KAAK;AAClD,EAAE,MAAM,OAAO,GAAG,IAAI,YAAY,CAAC,WAAW,EAAC;AAC/C,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACxC,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC;AAC1B,GAAG;AACH,EAAE,OAAO,OAAO,CAAC,cAAc,EAAE;AACjC;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.cjs deleted file mode 100644 index b9a6b8e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.cjs +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var math = require('./math-96d5e8c4.cjs'); -var binary = require('./binary-ac8e39e2.cjs'); -var webcrypto = require('lib0/webcrypto'); - -/** - * Isomorphic module for true random numbers / buffers / uuids. - * - * Attention: falls back to Math.random if the browser does not support crypto. - * - * @module random - */ - -const rand = Math.random; - -const uint32 = () => webcrypto.getRandomValues(new Uint32Array(1))[0]; - -const uint53 = () => { - const arr = webcrypto.getRandomValues(new Uint32Array(8)); - return (arr[0] & binary.BITS21) * (binary.BITS32 + 1) + (arr[1] >>> 0) -}; - -/** - * @template T - * @param {Array} arr - * @return {T} - */ -const oneOf = arr => arr[math.floor(rand() * arr.length)]; - -// @ts-ignore -const uuidv4Template = [1e7] + -1e3 + -4e3 + -8e3 + -1e11; - -/** - * @return {string} - */ -const uuidv4 = () => uuidv4Template.replace(/[018]/g, /** @param {number} c */ c => - (c ^ uint32() & 15 >> c / 4).toString(16) -); - -exports.oneOf = oneOf; -exports.rand = rand; -exports.uint32 = uint32; -exports.uint53 = uint53; -exports.uuidv4 = uuidv4; -//# sourceMappingURL=random.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.cjs.map deleted file mode 100644 index b3ca922..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"random.cjs","sources":["../random.js"],"sourcesContent":["/**\n * Isomorphic module for true random numbers / buffers / uuids.\n *\n * Attention: falls back to Math.random if the browser does not support crypto.\n *\n * @module random\n */\n\nimport * as math from './math.js'\nimport * as binary from './binary.js'\nimport { getRandomValues } from 'lib0/webcrypto'\n\nexport const rand = Math.random\n\nexport const uint32 = () => getRandomValues(new Uint32Array(1))[0]\n\nexport const uint53 = () => {\n const arr = getRandomValues(new Uint32Array(8))\n return (arr[0] & binary.BITS21) * (binary.BITS32 + 1) + (arr[1] >>> 0)\n}\n\n/**\n * @template T\n * @param {Array} arr\n * @return {T}\n */\nexport const oneOf = arr => arr[math.floor(rand() * arr.length)]\n\n// @ts-ignore\nconst uuidv4Template = [1e7] + -1e3 + -4e3 + -8e3 + -1e11\n\n/**\n * @return {string}\n */\nexport const uuidv4 = () => uuidv4Template.replace(/[018]/g, /** @param {number} c */ c =>\n (c ^ uint32() & 15 >> c / 4).toString(16)\n)\n"],"names":["getRandomValues","binary.BITS21","binary.BITS32","math.floor"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACY,MAAC,IAAI,GAAG,IAAI,CAAC,OAAM;AAC/B;AACY,MAAC,MAAM,GAAG,MAAMA,yBAAe,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC;AAClE;AACY,MAAC,MAAM,GAAG,MAAM;AAC5B,EAAE,MAAM,GAAG,GAAGA,yBAAe,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,EAAC;AACjD,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAGC,aAAa,KAAKC,aAAa,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACxE,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,KAAK,GAAG,GAAG,IAAI,GAAG,CAACC,UAAU,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,EAAC;AAChE;AACA;AACA,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,KAAI;AACzD;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,QAAQ,2BAA2B,CAAC;AACvF,EAAE,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC;AAC3C;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.d.ts deleted file mode 100644 index f52f7b8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const rand: () => number; -export function uint32(): number; -export function uint53(): number; -export function oneOf(arr: Array): T; -export function uuidv4(): string; -//# sourceMappingURL=random.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.d.ts.map deleted file mode 100644 index 6d879a9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../random.js"],"names":[],"mappings":"AAYA,gCAA+B;AAExB,iCAA2D;AAE3D,iCAGN;AAOM,sBAJM,CAAC,OACH,KAAK,CAAC,CAAC,CAAC,GACP,CAAC,CAEmD;AAQzD,0BAFK,MAAM,CAIjB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.test.d.ts deleted file mode 100644 index d3b2523..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.test.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function testRandom(tc: t.TestCase): void; -export function testUint32(tc: t.TestCase): void; -export function testUint53(tc: t.TestCase): void; -export function testUuidv4(tc: t.TestCase): void; -export function testUuidv4Overlaps(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=random.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.test.d.ts.map deleted file mode 100644 index d117524..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/random.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"random.test.d.ts","sourceRoot":"","sources":["../random.test.js"],"names":[],"mappings":"AASO,+BAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,+BAFI,CAAC,CAAC,QAAQ,QA0BpB;AAKM,+BAFI,CAAC,CAAC,QAAQ,QAyBpB;AAKM,+BAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,uCAFI,CAAC,CAAC,QAAQ,QAiBpB;mBA/FkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rollup.config.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rollup.config.d.ts deleted file mode 100644 index 7192ab2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rollup.config.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare const _default: { - input: string[]; - output: { - dir: string; - format: string; - sourcemap: boolean; - entryFileNames: string; - chunkFileNames: string; - }; - external: string[]; -}[]; -export default _default; -//# sourceMappingURL=rollup.config.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rollup.config.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rollup.config.d.ts.map deleted file mode 100644 index 8ea43ed..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rollup.config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rollup.config.d.ts","sourceRoot":"","sources":["../rollup.config.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rsa-oaep.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rsa-oaep.cjs deleted file mode 100644 index 39f8270..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rsa-oaep.cjs +++ /dev/null @@ -1,112 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var webcrypto = require('lib0/webcrypto'); -var common = require('./common.cjs'); - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var webcrypto__namespace = /*#__PURE__*/_interopNamespace(webcrypto); - -/** - * RSA-OAEP is an asymmetric keypair used for encryption - */ - -/** - * @typedef {Array<'encrypt'|'decrypt'>} Usages - */ - -/** - * @type {Usages} - */ -const defaultUsages = ['encrypt', 'decrypt']; - -/** - * Note that the max data size is limited by the size of the RSA key. - * - * @param {CryptoKey} key - * @param {Uint8Array} data - * @return {PromiseLike>} - */ -const encrypt = (key, data) => - webcrypto__namespace.subtle.encrypt( - { - name: 'RSA-OAEP' - }, - key, - data - ).then(buf => new Uint8Array(buf)); - -/** - * @experimental The API is not final! - * - * Decrypt some data using AES-GCM method. - * - * @param {CryptoKey} key - * @param {Uint8Array} data - * @return {PromiseLike} decrypted buffer - */ -const decrypt = (key, data) => - webcrypto__namespace.subtle.decrypt( - { - name: 'RSA-OAEP' - }, - key, - data - ).then(data => new Uint8Array(data)); - -/** - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - * @return {Promise} - */ -const generateKeyPair = ({ extractable = false, usages = defaultUsages } = {}) => - webcrypto__namespace.subtle.generateKey( - { - name: 'RSA-OAEP', - modulusLength: 4096, - publicExponent: new Uint8Array([1, 0, 1]), - hash: 'SHA-256' - }, - extractable, - usages - ); - -/** - * @param {any} jwk - * @param {Object} opts - * @param {boolean} [opts.extractable] - * @param {Usages} [opts.usages] - */ -const importKeyJwk = (jwk, { extractable = false, usages } = {}) => { - if (usages == null) { - /* c8 ignore next */ - usages = jwk.key_ops || defaultUsages; - } - return webcrypto__namespace.subtle.importKey('jwk', jwk, { name: 'RSA-OAEP', hash: 'SHA-256' }, extractable, /** @type {Usages} */ (usages)) -}; - -exports.exportKeyJwk = common.exportKeyJwk; -exports.decrypt = decrypt; -exports.encrypt = encrypt; -exports.generateKeyPair = generateKeyPair; -exports.importKeyJwk = importKeyJwk; -//# sourceMappingURL=rsa-oaep.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rsa-oaep.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rsa-oaep.cjs.map deleted file mode 100644 index 8e38d85..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/rsa-oaep.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rsa-oaep.cjs","sources":["../crypto/rsa-oaep.js"],"sourcesContent":["/**\n * RSA-OAEP is an asymmetric keypair used for encryption\n */\n\nimport * as webcrypto from 'lib0/webcrypto'\nexport { exportKeyJwk } from './common.js'\n\n/**\n * @typedef {Array<'encrypt'|'decrypt'>} Usages\n */\n\n/**\n * @type {Usages}\n */\nconst defaultUsages = ['encrypt', 'decrypt']\n\n/**\n * Note that the max data size is limited by the size of the RSA key.\n *\n * @param {CryptoKey} key\n * @param {Uint8Array} data\n * @return {PromiseLike>}\n */\nexport const encrypt = (key, data) =>\n webcrypto.subtle.encrypt(\n {\n name: 'RSA-OAEP'\n },\n key,\n data\n ).then(buf => new Uint8Array(buf))\n\n/**\n * @experimental The API is not final!\n *\n * Decrypt some data using AES-GCM method.\n *\n * @param {CryptoKey} key\n * @param {Uint8Array} data\n * @return {PromiseLike} decrypted buffer\n */\nexport const decrypt = (key, data) =>\n webcrypto.subtle.decrypt(\n {\n name: 'RSA-OAEP'\n },\n key,\n data\n ).then(data => new Uint8Array(data))\n\n/**\n * @param {Object} opts\n * @param {boolean} [opts.extractable]\n * @param {Usages} [opts.usages]\n * @return {Promise}\n */\nexport const generateKeyPair = ({ extractable = false, usages = defaultUsages } = {}) =>\n webcrypto.subtle.generateKey(\n {\n name: 'RSA-OAEP',\n modulusLength: 4096,\n publicExponent: new Uint8Array([1, 0, 1]),\n hash: 'SHA-256'\n },\n extractable,\n usages\n )\n\n/**\n * @param {any} jwk\n * @param {Object} opts\n * @param {boolean} [opts.extractable]\n * @param {Usages} [opts.usages]\n */\nexport const importKeyJwk = (jwk, { extractable = false, usages } = {}) => {\n if (usages == null) {\n /* c8 ignore next */\n usages = jwk.key_ops || defaultUsages\n }\n return webcrypto.subtle.importKey('jwk', jwk, { name: 'RSA-OAEP', hash: 'SHA-256' }, extractable, /** @type {Usages} */ (usages))\n}\n"],"names":["webcrypto"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,SAAS,EAAC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI;AACjC,EAAEA,oBAAS,CAAC,MAAM,CAAC,OAAO;AAC1B,IAAI;AACJ,MAAM,IAAI,EAAE,UAAU;AACtB,KAAK;AACL,IAAI,GAAG;AACP,IAAI,IAAI;AACR,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,UAAU,CAAC,GAAG,CAAC,EAAC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI;AACjC,EAAEA,oBAAS,CAAC,MAAM,CAAC,OAAO;AAC1B,IAAI;AACJ,MAAM,IAAI,EAAE,UAAU;AACtB,KAAK;AACL,IAAI,GAAG;AACP,IAAI,IAAI;AACR,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,EAAC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAG,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,GAAG,EAAE;AACpF,EAAEA,oBAAS,CAAC,MAAM,CAAC,WAAW;AAC9B,IAAI;AACJ,MAAM,IAAI,EAAE,UAAU;AACtB,MAAM,aAAa,EAAE,IAAI;AACzB,MAAM,cAAc,EAAE,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/C,MAAM,IAAI,EAAE,SAAS;AACrB,KAAK;AACL,IAAI,WAAW;AACf,IAAI,MAAM;AACV,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,CAAC,GAAG,EAAE,EAAE,WAAW,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK;AAC3E,EAAE,IAAI,MAAM,IAAI,IAAI,EAAE;AACtB;AACA,IAAI,MAAM,GAAG,GAAG,CAAC,OAAO,IAAI,cAAa;AACzC,GAAG;AACH,EAAE,OAAOA,oBAAS,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,WAAW,yBAAyB,MAAM,EAAE;AACnI;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.cjs deleted file mode 100644 index c430c70..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.cjs +++ /dev/null @@ -1,1223 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var object = require('./object-c0c9435b.cjs'); -var array = require('./array-78849c95.cjs'); -var error = require('./error-0c1f634f.cjs'); -var environment = require('./environment-1c97264d.cjs'); -var equality = require('./equality.cjs'); -var _function = require('./function-314580f7.cjs'); -var string = require('./string-fddc5f8b.cjs'); -var prng = require('./prng-37d48618.cjs'); -var number = require('./number-1fb57bba.cjs'); -require('./set-5b47859e.cjs'); -require('./map-24d263c0.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./math-96d5e8c4.cjs'); -require('./buffer-3e750729.cjs'); -require('./encoding-1a745c43.cjs'); -require('./decoding-76e75827.cjs'); - -/** - * @experimental WIP - * - * Simple & efficient schemas for your data. - */ - -/** - * @typedef {string|number|bigint|boolean|null|undefined|symbol} Primitive - */ - -/** - * @typedef {{ [k:string|number|symbol]: any }} AnyObject - */ - -/** - * @template T - * @typedef {T extends Schema ? X : T} Unwrap - */ - -/** - * @template T - * @typedef {T extends Schema ? X : T} TypeOf - */ - -/** - * @template {readonly unknown[]} T - * @typedef {T extends readonly [Schema, ...infer Rest] ? [First, ...UnwrapArray] : [] } UnwrapArray - */ - -/** - * @template T - * @typedef {T extends Schema ? Schema : never} CastToSchema - */ - -/** - * @template {unknown[]} Arr - * @typedef {Arr extends [...unknown[], infer L] ? L : never} TupleLast - */ - -/** - * @template {unknown[]} Arr - * @typedef {Arr extends [...infer Fs, unknown] ? Fs : never} TuplePop - */ - -/** - * @template {readonly unknown[]} T - * @typedef {T extends [] - * ? {} - * : T extends [infer First] - * ? First - * : T extends [infer First, ...infer Rest] - * ? First & Intersect - * : never - * } Intersect - */ - -const schemaSymbol = Symbol('0schema'); - -class ValidationError { - constructor () { - /** - * Reverse errors - * @type {Array<{ path: string?, expected: string, has: string, message: string? }>} - */ - this._rerrs = []; - } - - /** - * @param {string?} path - * @param {string} expected - * @param {string} has - * @param {string?} message - */ - extend (path, expected, has, message = null) { - this._rerrs.push({ path, expected, has, message }); - } - - toString () { - const s = []; - for (let i = this._rerrs.length - 1; i > 0; i--) { - const r = this._rerrs[i]; - /* c8 ignore next */ - s.push(string.repeat(' ', (this._rerrs.length - i) * 2) + `${r.path != null ? `[${r.path}] ` : ''}${r.has} doesn't match ${r.expected}. ${r.message}`); - } - return s.join('\n') - } -} - -/** - * @param {any} a - * @param {any} b - * @return {boolean} - */ -const shapeExtends = (a, b) => { - if (a === b) return true - if (a == null || b == null || a.constructor !== b.constructor) return false - if (a[equality.EqualityTraitSymbol]) return equality.equals(a, b) // last resort: check equality (do this before array and obj check which don't implement the equality trait) - if (array.isArray(a)) { - return array.every(a, aitem => - array.some(b, bitem => shapeExtends(aitem, bitem)) - ) - } else if (object.isObject(a)) { - return object.every(a, (aitem, akey) => - shapeExtends(aitem, b[akey]) - ) - } - /* c8 ignore next */ - return false -}; - -/** - * @template T - * @implements {equalityTraits.EqualityTrait} - */ -class Schema { - // this.shape must not be defined on Schema. Otherwise typecheck on metatypes (e.g. $$object) won't work as expected anymore - /** - * If true, the more things are added to the shape the more objects this schema will accept (e.g. - * union). By default, the more objects are added, the the fewer objects this schema will accept. - * @protected - */ - static _dilutes = false - - /** - * @param {Schema} other - */ - extends (other) { - let [a, b] = [/** @type {any} */(this).shape, /** @type {any} */ (other).shape]; - if (/** @type {typeof Schema} */ (this.constructor)._dilutes) [b, a] = [a, b]; - return shapeExtends(a, b) - } - - /** - * Overwrite this when necessary. By default, we only check the `shape` property which every shape - * should have. - * @param {Schema} other - */ - equals (other) { - // @ts-ignore - return this.constructor === other.constructor && _function.equalityDeep(this.shape, other.shape) - } - - [schemaSymbol] () { return true } - - /** - * @param {object} other - */ - [equality.EqualityTraitSymbol] (other) { - return this.equals(/** @type {any} */ (other)) - } - - /** - * Use `schema.validate(obj)` with a typed parameter that is already of typed to be an instance of - * Schema. Validate will check the structure of the parameter and return true iff the instance - * really is an instance of Schema. - * - * @param {T} o - * @return {boolean} - */ - validate (o) { - return this.check(o) - } - - /* c8 ignore start */ - /** - * Similar to validate, but this method accepts untyped parameters. - * - * @param {any} _o - * @param {ValidationError} [_err] - * @return {_o is T} - */ - check (_o, _err) { - error.methodUnimplemented(); - } - /* c8 ignore stop */ - - /** - * @type {Schema} - */ - get nullable () { - // @ts-ignore - return $union(this, $null) - } - - /** - * @type {$Optional>} - */ - get optional () { - return new $Optional(/** @type {Schema} */ (this)) - } - - /** - * Cast a variable to a specific type. Returns the casted value, or throws an exception otherwise. - * Use this if you know that the type is of a specific type and you just want to convince the type - * system. - * - * **Do not rely on these error messages!** - * Performs an assertion check only if not in a production environment. - * - * @template OO - * @param {OO} o - * @return {Extract extends never ? T : (OO extends Array ? T : Extract)} - */ - cast (o) { - assert(o, this); - return /** @type {any} */ (o) - } - - /** - * EXPECTO PATRONUM!! 🪄 - * This function protects against type errors. Though it may not work in the real world. - * - * "After all this time?" - * "Always." - Snape, talking about type safety - * - * Ensures that a variable is a a specific type. Returns the value, or throws an exception if the assertion check failed. - * Use this if you know that the type is of a specific type and you just want to convince the type - * system. - * - * Can be useful when defining lambdas: `s.lambda(s.$number, s.$void).expect((n) => n + 1)` - * - * **Do not rely on these error messages!** - * Performs an assertion check if not in a production environment. - * - * @param {T} o - * @return {o extends T ? T : never} - */ - expect (o) { - assert(o, this); - return o - } -} - -/** - * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} Constr - * @typedef {Constr extends ((...args:any[]) => infer T) ? T : (Constr extends (new (...args:any[]) => any) ? InstanceType : never)} Instance - */ - -/** - * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} C - * @extends {Schema>} - */ -class $ConstructedBy extends Schema { - /** - * @param {C} c - * @param {((o:Instance)=>boolean)|null} check - */ - constructor (c, check) { - super(); - this.shape = c; - this._c = check; - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is C extends ((...args:any[]) => infer T) ? T : (C extends (new (...args:any[]) => any) ? InstanceType : never)} o - */ - check (o, err = undefined) { - const c = o?.constructor === this.shape && (this._c == null || this._c(o)); - /* c8 ignore next */ - !c && err?.extend(null, this.shape.name, o?.constructor.name, o?.constructor !== this.shape ? 'Constructor match failed' : 'Check failed'); - return c - } -} - -/** - * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} C - * @param {C} c - * @param {((o:Instance) => boolean)|null} check - * @return {CastToSchema<$ConstructedBy>} - */ -const $constructedBy = (c, check = null) => new $ConstructedBy(c, check); -const $$constructedBy = $constructedBy($ConstructedBy); - -/** - * Check custom properties on any object. You may want to overwrite the generated Schema. - * - * @extends {Schema} - */ -class $Custom extends Schema { - /** - * @param {(o:any) => boolean} check - */ - constructor (check) { - super(); - /** - * @type {(o:any) => boolean} - */ - this.shape = check; - } - - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is any} - */ - check (o, err) { - const c = this.shape(o); - /* c8 ignore next */ - !c && err?.extend(null, 'custom prop', o?.constructor.name, 'failed to check custom prop'); - return c - } -} - -/** - * @param {(o:any) => boolean} check - * @return {Schema} - */ -const $custom = (check) => new $Custom(check); -const $$custom = $constructedBy($Custom); - -/** - * @template {Primitive} T - * @extends {Schema} - */ -class $Literal extends Schema { - /** - * @param {Array} literals - */ - constructor (literals) { - super(); - this.shape = literals; - } - - /** - * - * @param {any} o - * @param {ValidationError} [err] - * @return {o is T} - */ - check (o, err) { - const c = this.shape.some(a => a === o); - /* c8 ignore next */ - !c && err?.extend(null, this.shape.join(' | '), o.toString()); - return c - } -} - -/** - * @template {Primitive[]} T - * @param {T} literals - * @return {CastToSchema<$Literal>} - */ -const $literal = (...literals) => new $Literal(literals); -const $$literal = $constructedBy($Literal); - -/** - * @template {Array>} Ts - * @typedef {Ts extends [] ? `` : (Ts extends [infer T] ? (Unwrap extends (string|number) ? Unwrap : never) : (Ts extends [infer T1, ...infer Rest] ? `${Unwrap extends (string|number) ? Unwrap : never}${Rest extends Array> ? CastStringTemplateArgsToTemplate : never}` : never))} CastStringTemplateArgsToTemplate - */ - -/** - * @param {string} str - * @return {string} - */ -const _regexEscape = /** @type {any} */ (RegExp).escape || /** @type {(str:string) => string} */ (str => - str.replace(/[().|&,$^[\]]/g, s => '\\' + s) -); - -/** - * @param {string|Schema} s - * @return {string[]} - */ -const _schemaStringTemplateToRegex = s => { - if ($string.check(s)) { - return [_regexEscape(s)] - } - if ($$literal.check(s)) { - return /** @type {Array} */ (s.shape).map(v => v + '') - } - if ($$number.check(s)) { - return ['[+-]?\\d+.?\\d*'] - } - if ($$string.check(s)) { - return ['.*'] - } - if ($$union.check(s)) { - return s.shape.map(_schemaStringTemplateToRegex).flat(1) - } - /* c8 ignore next 2 */ - // unexpected schema structure (only supports unions and string in literal types) - error.unexpectedCase(); -}; - -/** - * @template {Array>} T - * @extends {Schema>} - */ -class $StringTemplate extends Schema { - /** - * @param {T} shape - */ - constructor (shape) { - super(); - this.shape = shape; - this._r = new RegExp('^' + shape.map(_schemaStringTemplateToRegex).map(opts => `(${opts.join('|')})`).join('') + '$'); - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is CastStringTemplateArgsToTemplate} - */ - check (o, err) { - const c = this._r.exec(o) != null; - /* c8 ignore next */ - !c && err?.extend(null, this._r.toString(), o.toString(), 'String doesn\'t match string template.'); - return c - } -} - -/** - * @template {Array>} T - * @param {T} literals - * @return {CastToSchema<$StringTemplate>} - */ -const $stringTemplate = (...literals) => new $StringTemplate(literals); -const $$stringTemplate = $constructedBy($StringTemplate); - -const isOptionalSymbol = Symbol('optional'); -/** - * @template {Schema} S - * @extends Schema|undefined> - */ -class $Optional extends Schema { - /** - * @param {S} shape - */ - constructor (shape) { - super(); - this.shape = shape; - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is (Unwrap|undefined)} - */ - check (o, err) { - const c = o === undefined || this.shape.check(o); - /* c8 ignore next */ - !c && err?.extend(null, 'undefined (optional)', '()'); - return c - } - - get [isOptionalSymbol] () { return true } -} -const $$optional = $constructedBy($Optional); - -/** - * @extends Schema - */ -class $Never extends Schema { - /** - * @param {any} _o - * @param {ValidationError} [err] - * @return {_o is never} - */ - check (_o, err) { - /* c8 ignore next */ - err?.extend(null, 'never', typeof _o); - return false - } -} - -/** - * @type {Schema} - */ -const $never = new $Never(); -const $$never = $constructedBy($Never); - -/** - * @template {{ [key: string|symbol|number]: Schema }} S - * @typedef {{ [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never }} $ObjectToType - */ - -/** - * @template {{[key:string|symbol|number]: Schema}} S - * @extends {Schema<$ObjectToType>} - */ -class $Object extends Schema { - /** - * @param {S} shape - * @param {boolean} partial - */ - constructor (shape, partial = false) { - super(); - /** - * @type {S} - */ - this.shape = shape; - this._isPartial = partial; - } - - static _dilutes = true - - /** - * @type {Schema>>} - */ - get partial () { - return new $Object(this.shape, true) - } - - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is $ObjectToType} - */ - check (o, err) { - if (o == null) { - /* c8 ignore next */ - err?.extend(null, 'object', 'null'); - return false - } - return object.every(this.shape, (vv, vk) => { - const c = (this._isPartial && !object.hasProperty(o, vk)) || vv.check(o[vk], err); - !c && err?.extend(vk.toString(), vv.toString(), typeof o[vk], 'Object property does not match'); - return c - }) - } -} - -/** - * @template S - * @typedef {Schema<{ [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never }>} _ObjectDefToSchema - */ - -// I used an explicit type annotation instead of $ObjectToType, so that the user doesn't see the -// weird type definitions when inspecting type definions. -/** - * @template {{ [key:string|symbol|number]: Schema }} S - * @param {S} def - * @return {_ObjectDefToSchema extends Schema ? Schema<{ [K in keyof S]: S[K] }> : never} - */ -const $object = def => /** @type {any} */ (new $Object(def)); -const $$object = $constructedBy($Object); -/** - * @type {Schema<{[key:string]: any}>} - */ -const $objectAny = $custom(o => o != null && (o.constructor === Object || o.constructor == null)); - -/** - * @template {Schema} Keys - * @template {Schema} Values - * @extends {Schema<{ [key in Unwrap]: Unwrap }>} - */ -class $Record extends Schema { - /** - * @param {Keys} keys - * @param {Values} values - */ - constructor (keys, values) { - super(); - this.shape = { - keys, values - }; - } - - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is { [key in Unwrap]: Unwrap }} - */ - check (o, err) { - return o != null && object.every(o, (vv, vk) => { - const ck = this.shape.keys.check(vk, err); - /* c8 ignore next */ - !ck && err?.extend(vk + '', 'Record', typeof o, ck ? 'Key doesn\'t match schema' : 'Value doesn\'t match value'); - return ck && this.shape.values.check(vv, err) - }) - } -} - -/** - * @template {Schema} Keys - * @template {Schema} Values - * @param {Keys} keys - * @param {Values} values - * @return {CastToSchema<$Record>} - */ -const $record = (keys, values) => new $Record(keys, values); -const $$record = $constructedBy($Record); - -/** - * @template {Schema[]} S - * @extends {Schema<{ [Key in keyof S]: S[Key] extends Schema ? Type : never }>} - */ -class $Tuple extends Schema { - /** - * @param {S} shape - */ - constructor (shape) { - super(); - this.shape = shape; - } - - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is { [K in keyof S]: S[K] extends Schema ? Type : never }} - */ - check (o, err) { - return o != null && object.every(this.shape, (vv, vk) => { - const c = /** @type {Schema} */ (vv).check(o[vk], err); - /* c8 ignore next */ - !c && err?.extend(vk.toString(), 'Tuple', typeof vv); - return c - }) - } -} - -/** - * @template {Array>} T - * @param {T} def - * @return {CastToSchema<$Tuple>} - */ -const $tuple = (...def) => new $Tuple(def); -const $$tuple = $constructedBy($Tuple); - -/** - * @template {Schema} S - * @extends {Schema ? T : never>>} - */ -class $Array extends Schema { - /** - * @param {Array} v - */ - constructor (v) { - super(); - /** - * @type {Schema ? T : never>} - */ - this.shape = v.length === 1 ? v[0] : new $Union(v); - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is Array ? T : never>} o - */ - check (o, err) { - const c = array.isArray(o) && array.every(o, oi => this.shape.check(oi)); - /* c8 ignore next */ - !c && err?.extend(null, 'Array', ''); - return c - } -} - -/** - * @template {Array>} T - * @param {T} def - * @return {Schema> ? S : never>>} - */ -const $array = (...def) => new $Array(def); -const $$array = $constructedBy($Array); -/** - * @type {Schema>} - */ -const $arrayAny = $custom(o => array.isArray(o)); - -/** - * @template T - * @extends {Schema} - */ -class $InstanceOf extends Schema { - /** - * @param {new (...args:any) => T} constructor - * @param {((o:T) => boolean)|null} check - */ - constructor (constructor, check) { - super(); - this.shape = constructor; - this._c = check; - } - - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is T} - */ - check (o, err) { - const c = o instanceof this.shape && (this._c == null || this._c(o)); - /* c8 ignore next */ - !c && err?.extend(null, this.shape.name, o?.constructor.name); - return c - } -} - -/** - * @template T - * @param {new (...args:any) => T} c - * @param {((o:T) => boolean)|null} check - * @return {Schema} - */ -const $instanceOf = (c, check = null) => new $InstanceOf(c, check); -const $$instanceOf = $constructedBy($InstanceOf); - -const $$schema = $instanceOf(Schema); - -/** - * @template {Schema[]} Args - * @typedef {(...args:UnwrapArray>)=>Unwrap>} _LArgsToLambdaDef - */ - -/** - * @template {Array>} Args - * @extends {Schema<_LArgsToLambdaDef>} - */ -class $Lambda extends Schema { - /** - * @param {Args} args - */ - constructor (args) { - super(); - this.len = args.length - 1; - this.args = $tuple(...args.slice(-1)); - this.res = args[this.len]; - } - - /** - * @param {any} f - * @param {ValidationError} err - * @return {f is _LArgsToLambdaDef} - */ - check (f, err) { - const c = f.constructor === Function && f.length <= this.len; - /* c8 ignore next */ - !c && err?.extend(null, 'function', typeof f); - return c - } -} - -/** - * @template {Schema[]} Args - * @param {Args} args - * @return {Schema<(...args:UnwrapArray>)=>Unwrap>>} - */ -const $lambda = (...args) => new $Lambda(args.length > 0 ? args : [$void]); -const $$lambda = $constructedBy($Lambda); - -/** - * @type {Schema} - */ -const $function = $custom(o => typeof o === 'function'); - -/** - * @template {Array>} T - * @extends {Schema>>} - */ -class $Intersection extends Schema { - /** - * @param {T} v - */ - constructor (v) { - super(); - /** - * @type {T} - */ - this.shape = v; - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is Intersect>} - */ - check (o, err) { - // @ts-ignore - const c = array.every(this.shape, check => check.check(o, err)); - /* c8 ignore next */ - !c && err?.extend(null, 'Intersectinon', typeof o); - return c - } -} - -/** - * @template {Schema[]} T - * @param {T} def - * @return {CastToSchema<$Intersection>} - */ -const $intersect = (...def) => new $Intersection(def); -const $$intersect = $constructedBy($Intersection, o => o.shape.length > 0); // Intersection with length=0 is considered "any" - -/** - * @template S - * @extends {Schema} - */ -class $Union extends Schema { - static _dilutes = true - - /** - * @param {Array>} v - */ - constructor (v) { - super(); - this.shape = v; - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is S} - */ - check (o, err) { - const c = array.some(this.shape, (vv) => vv.check(o, err)); - err?.extend(null, 'Union', typeof o); - return c - } -} - -/** - * @template {Array} T - * @param {T} schemas - * @return {CastToSchema<$Union>>>} - */ -const $union = (...schemas) => schemas.findIndex($s => $$union.check($s)) >= 0 - ? $union(...schemas.map($s => $($s)).map($s => $$union.check($s) ? $s.shape : [$s]).flat(1)) - : (schemas.length === 1 - ? schemas[0] - : new $Union(schemas)); -const $$union = /** @type {Schema<$Union>} */ ($constructedBy($Union)); - -const _t = () => true; -/** - * @type {Schema} - */ -const $any = $custom(_t); -const $$any = /** @type {Schema>} */ ($constructedBy($Custom, o => o.shape === _t)); - -/** - * @type {Schema} - */ -const $bigint = $custom(o => typeof o === 'bigint'); -const $$bigint = /** @type {Schema>} */ ($custom(o => o === $bigint)); - -/** - * @type {Schema} - */ -const $symbol = $custom(o => typeof o === 'symbol'); -const $$symbol = /** @type {Schema>} */ ($custom(o => o === $symbol)); - -/** - * @type {Schema} - */ -const $number = $custom(o => typeof o === 'number'); -const $$number = /** @type {Schema>} */ ($custom(o => o === $number)); - -/** - * @type {Schema} - */ -const $string = $custom(o => typeof o === 'string'); -const $$string = /** @type {Schema>} */ ($custom(o => o === $string)); - -/** - * @type {Schema} - */ -const $boolean = $custom(o => typeof o === 'boolean'); -const $$boolean = /** @type {Schema>} */ ($custom(o => o === $boolean)); - -/** - * @type {Schema} - */ -const $undefined = $literal(undefined); -const $$undefined = /** @type {Schema>} */ ($constructedBy($Literal, o => o.shape.length === 1 && o.shape[0] === undefined)); - -/** - * @type {Schema} - */ -const $void = $literal(undefined); -const $$void = /** @type {Schema>} */ ($$undefined); - -const $null = $literal(null); -const $$null = /** @type {Schema>} */ ($constructedBy($Literal, o => o.shape.length === 1 && o.shape[0] === null)); - -const $uint8Array = $constructedBy(Uint8Array); -const $$uint8Array = /** @type {Schema>} */ ($constructedBy($ConstructedBy, o => o.shape === Uint8Array)); - -/** - * @type {Schema} - */ -const $primitive = $union($number, $string, $null, $undefined, $bigint, $boolean, $symbol); - -/** - * @typedef {JSON[]} JSONArray - */ -/** - * @typedef {Primitive|JSONArray|{ [key:string]:JSON }} JSON - */ -/** - * @type {Schema} - */ -const $json = (() => { - const $jsonArr = /** @type {$Array<$any>} */ ($array($any)); - const $jsonRecord = /** @type {$Record<$string,$any>} */ ($record($string, $any)); - const $json = $union($number, $string, $null, $boolean, $jsonArr, $jsonRecord); - $jsonArr.shape = $json; - $jsonRecord.shape.values = $json; - return $json -})(); - -/** - * @template {any} IN - * @typedef {IN extends Schema ? IN - * : (IN extends string|number|boolean|null ? Schema - * : (IN extends new (...args:any[])=>any ? Schema> - * : (IN extends any[] ? Schema<{ [K in keyof IN]: Unwrap> }[number]> - * : (IN extends object ? (_ObjectDefToSchema<{[K in keyof IN]:ReadSchema}> extends Schema ? Schema<{ [K in keyof S]: S[K] }> : never) - * : never) - * ) - * ) - * ) - * } ReadSchemaOld - */ - -/** - * @template {any} IN - * @typedef {[Extract>,Extract,Extractany>,Extract,Extract|string|number|boolean|null|(new (...args:any[])=>any)|any[]>,object>] extends [infer Schemas, infer Primitives, infer Constructors, infer Arrs, infer Obj] - * ? Schema< - * (Schemas extends Schema ? S : never) - * | Primitives - * | (Constructors extends new (...args:any[])=>any ? InstanceType : never) - * | (Arrs extends any[] ? { [K in keyof Arrs]: Unwrap> }[number] : never) - * | (Obj extends object ? Unwrap<(_ObjectDefToSchema<{[K in keyof Obj]:ReadSchema}> extends Schema ? Schema<{ [K in keyof S]: S[K] }> : never)> : never)> - * : never - * } ReadSchema - */ - -/** - * @typedef {ReadSchema<{x:42}|{y:99}|Schema|[1,2,{}]>} Q - */ - -/** - * @template IN - * @param {IN} o - * @return {ReadSchema} - */ -const $ = o => { - if ($$schema.check(o)) { - return /** @type {any} */ (o) - } else if ($objectAny.check(o)) { - /** - * @type {any} - */ - const o2 = {}; - for (const k in o) { - o2[k] = $(o[k]); - } - return /** @type {any} */ ($object(o2)) - } else if ($arrayAny.check(o)) { - return /** @type {any} */ ($union(...o.map($))) - } else if ($primitive.check(o)) { - return /** @type {any} */ ($literal(o)) - } else if ($function.check(o)) { - return /** @type {any} */ ($constructedBy(/** @type {any} */ (o))) - } - /* c8 ignore next */ - error.unexpectedCase(); -}; - -/* c8 ignore start */ -/** - * Assert that a variable is of this specific type. - * The assertion check is only performed in non-production environments. - * - * @type {(o:any,schema:Schema) => asserts o is T} - */ -const assert = environment.production - ? () => {} - : (o, schema) => { - const err = new ValidationError(); - if (!schema.check(o, err)) { - throw error.create(`Expected value to be of type ${schema.constructor.name}.\n${err.toString()}`) - } - }; -/* c8 ignore end */ - -/** - * @template In - * @template Out - * @typedef {{ if: Schema, h: (o:In,state?:any)=>Out }} Pattern - */ - -/** - * @template {Pattern} P - * @template In - * @typedef {ReturnType>['h']>} PatternMatchResult - */ - -/** - * @todo move this to separate library - * @template {any} [State=undefined] - * @template {Pattern} [Patterns=never] - */ -class PatternMatcher { - /** - * @param {Schema} [$state] - */ - constructor ($state) { - /** - * @type {Array} - */ - this.patterns = []; - this.$state = $state; - } - - /** - * @template P - * @template R - * @param {P} pattern - * @param {(o:NoInfer>>,s:State)=>R} handler - * @return {PatternMatcher>,R>>} - */ - if (pattern, handler) { - // @ts-ignore - this.patterns.push({ if: $(pattern), h: handler }); - // @ts-ignore - return this - } - - /** - * @template R - * @param {(o:any,s:State)=>R} h - */ - else (h) { - return this.if($any, h) - } - - /** - * @return {State extends undefined - * ? >(o:In,state?:undefined)=>PatternMatchResult - * : >(o:In,state:State)=>PatternMatchResult} - */ - done () { - // @ts-ignore - return /** @type {any} */ (o, s) => { - for (let i = 0; i < this.patterns.length; i++) { - const p = this.patterns[i]; - if (p.if.check(o)) { - // @ts-ignore - return p.h(o, s) - } - } - throw error.create('Unhandled pattern') - } - } -} - -/** - * @template [State=undefined] - * @param {State} [state] - * @return {PatternMatcher>>} - */ -const match = state => new PatternMatcher(/** @type {any} */ (state)); - -/** - * Helper function to generate a (non-exhaustive) sample set from a gives schema. - * - * @type {(o:T,gen:prng.PRNG)=>T} - */ -const _random = /** @type {any} */ (match(/** @type {Schema} */ ($any)) - .if($$number, (_o, gen) => prng.int53(gen, number.MIN_SAFE_INTEGER, number.MAX_SAFE_INTEGER)) - .if($$string, (_o, gen) => prng.word(gen)) - .if($$boolean, (_o, gen) => prng.bool(gen)) - .if($$bigint, (_o, gen) => BigInt(prng.int53(gen, number.MIN_SAFE_INTEGER, number.MAX_SAFE_INTEGER))) - .if($$union, (o, gen) => random(gen, prng.oneOf(gen, o.shape))) - .if($$object, (o, gen) => { - /** - * @type {any} - */ - const res = {}; - for (const k in o.shape) { - let prop = o.shape[k]; - if ($$optional.check(prop)) { - if (prng.bool(gen)) { continue } - prop = prop.shape; - } - res[k] = _random(prop, gen); - } - return res - }) - .if($$array, (o, gen) => { - const arr = []; - const n = prng.int32(gen, 0, 42); - for (let i = 0; i < n; i++) { - arr.push(random(gen, o.shape)); - } - return arr - }) - .if($$literal, (o, gen) => { - return prng.oneOf(gen, o.shape) - }) - .if($$null, (o, gen) => { - return null - }) - .if($$lambda, (o, gen) => { - const res = random(gen, o.res); - return () => res - }) - .if($$any, (o, gen) => random(gen, prng.oneOf(gen, [ - $number, $string, $null, $undefined, $bigint, $boolean, - $array($number), - $record($union('a', 'b', 'c'), $number) - ]))) - .if($$record, (o, gen) => { - /** - * @type {any} - */ - const res = {}; - const keysN = prng.int53(gen, 0, 3); - for (let i = 0; i < keysN; i++) { - const key = random(gen, o.shape.keys); - const val = random(gen, o.shape.values); - res[key] = val; - } - return res - }) - .done()); - -/** - * @template S - * @param {prng.PRNG} gen - * @param {S} schema - * @return {Unwrap>} - */ -const random = (gen, schema) => /** @type {any} */ (_random($(schema), gen)); - -exports.$ = $; -exports.$$any = $$any; -exports.$$array = $$array; -exports.$$bigint = $$bigint; -exports.$$boolean = $$boolean; -exports.$$constructedBy = $$constructedBy; -exports.$$custom = $$custom; -exports.$$instanceOf = $$instanceOf; -exports.$$intersect = $$intersect; -exports.$$lambda = $$lambda; -exports.$$literal = $$literal; -exports.$$never = $$never; -exports.$$null = $$null; -exports.$$number = $$number; -exports.$$object = $$object; -exports.$$optional = $$optional; -exports.$$record = $$record; -exports.$$schema = $$schema; -exports.$$string = $$string; -exports.$$stringTemplate = $$stringTemplate; -exports.$$symbol = $$symbol; -exports.$$tuple = $$tuple; -exports.$$uint8Array = $$uint8Array; -exports.$$undefined = $$undefined; -exports.$$union = $$union; -exports.$$void = $$void; -exports.$Array = $Array; -exports.$ConstructedBy = $ConstructedBy; -exports.$Custom = $Custom; -exports.$InstanceOf = $InstanceOf; -exports.$Intersection = $Intersection; -exports.$Lambda = $Lambda; -exports.$Literal = $Literal; -exports.$Object = $Object; -exports.$Record = $Record; -exports.$StringTemplate = $StringTemplate; -exports.$Tuple = $Tuple; -exports.$Union = $Union; -exports.$any = $any; -exports.$array = $array; -exports.$arrayAny = $arrayAny; -exports.$bigint = $bigint; -exports.$boolean = $boolean; -exports.$constructedBy = $constructedBy; -exports.$custom = $custom; -exports.$function = $function; -exports.$instanceOf = $instanceOf; -exports.$intersect = $intersect; -exports.$json = $json; -exports.$lambda = $lambda; -exports.$literal = $literal; -exports.$never = $never; -exports.$null = $null; -exports.$number = $number; -exports.$object = $object; -exports.$objectAny = $objectAny; -exports.$primitive = $primitive; -exports.$record = $record; -exports.$string = $string; -exports.$stringTemplate = $stringTemplate; -exports.$symbol = $symbol; -exports.$tuple = $tuple; -exports.$uint8Array = $uint8Array; -exports.$undefined = $undefined; -exports.$union = $union; -exports.$void = $void; -exports.PatternMatcher = PatternMatcher; -exports.Schema = Schema; -exports.ValidationError = ValidationError; -exports.assert = assert; -exports.match = match; -exports.random = random; -//# sourceMappingURL=schema.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.cjs.map deleted file mode 100644 index 7699c65..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schema.cjs","sources":["../schema.js"],"sourcesContent":["/**\n * @experimental WIP\n *\n * Simple & efficient schemas for your data.\n */\n\nimport * as obj from './object.js'\nimport * as arr from './array.js'\nimport * as error from './error.js'\nimport * as env from './environment.js'\nimport * as equalityTraits from './trait/equality.js'\nimport * as fun from './function.js'\nimport * as string from './string.js'\nimport * as prng from './prng.js'\nimport * as number from './number.js'\n\n/**\n * @typedef {string|number|bigint|boolean|null|undefined|symbol} Primitive\n */\n\n/**\n * @typedef {{ [k:string|number|symbol]: any }} AnyObject\n */\n\n/**\n * @template T\n * @typedef {T extends Schema ? X : T} Unwrap\n */\n\n/**\n * @template T\n * @typedef {T extends Schema ? X : T} TypeOf\n */\n\n/**\n * @template {readonly unknown[]} T\n * @typedef {T extends readonly [Schema, ...infer Rest] ? [First, ...UnwrapArray] : [] } UnwrapArray\n */\n\n/**\n * @template T\n * @typedef {T extends Schema ? Schema : never} CastToSchema\n */\n\n/**\n * @template {unknown[]} Arr\n * @typedef {Arr extends [...unknown[], infer L] ? L : never} TupleLast\n */\n\n/**\n * @template {unknown[]} Arr\n * @typedef {Arr extends [...infer Fs, unknown] ? Fs : never} TuplePop\n */\n\n/**\n * @template {readonly unknown[]} T\n * @typedef {T extends []\n * ? {}\n * : T extends [infer First]\n * ? First\n * : T extends [infer First, ...infer Rest]\n * ? First & Intersect\n * : never\n * } Intersect\n */\n\nconst schemaSymbol = Symbol('0schema')\n\nexport class ValidationError {\n constructor () {\n /**\n * Reverse errors\n * @type {Array<{ path: string?, expected: string, has: string, message: string? }>}\n */\n this._rerrs = []\n }\n\n /**\n * @param {string?} path\n * @param {string} expected\n * @param {string} has\n * @param {string?} message\n */\n extend (path, expected, has, message = null) {\n this._rerrs.push({ path, expected, has, message })\n }\n\n toString () {\n const s = []\n for (let i = this._rerrs.length - 1; i > 0; i--) {\n const r = this._rerrs[i]\n /* c8 ignore next */\n s.push(string.repeat(' ', (this._rerrs.length - i) * 2) + `${r.path != null ? `[${r.path}] ` : ''}${r.has} doesn't match ${r.expected}. ${r.message}`)\n }\n return s.join('\\n')\n }\n}\n\n/**\n * @param {any} a\n * @param {any} b\n * @return {boolean}\n */\nconst shapeExtends = (a, b) => {\n if (a === b) return true\n if (a == null || b == null || a.constructor !== b.constructor) return false\n if (a[equalityTraits.EqualityTraitSymbol]) return equalityTraits.equals(a, b) // last resort: check equality (do this before array and obj check which don't implement the equality trait)\n if (arr.isArray(a)) {\n return arr.every(a, aitem =>\n arr.some(b, bitem => shapeExtends(aitem, bitem))\n )\n } else if (obj.isObject(a)) {\n return obj.every(a, (aitem, akey) =>\n shapeExtends(aitem, b[akey])\n )\n }\n /* c8 ignore next */\n return false\n}\n\n/**\n * @template T\n * @implements {equalityTraits.EqualityTrait}\n */\nexport class Schema {\n // this.shape must not be defined on Schema. Otherwise typecheck on metatypes (e.g. $$object) won't work as expected anymore\n /**\n * If true, the more things are added to the shape the more objects this schema will accept (e.g.\n * union). By default, the more objects are added, the the fewer objects this schema will accept.\n * @protected\n */\n static _dilutes = false\n\n /**\n * @param {Schema} other\n */\n extends (other) {\n let [a, b] = [/** @type {any} */(this).shape, /** @type {any} */ (other).shape]\n if (/** @type {typeof Schema} */ (this.constructor)._dilutes) [b, a] = [a, b]\n return shapeExtends(a, b)\n }\n\n /**\n * Overwrite this when necessary. By default, we only check the `shape` property which every shape\n * should have.\n * @param {Schema} other\n */\n equals (other) {\n // @ts-ignore\n return this.constructor === other.constructor && fun.equalityDeep(this.shape, other.shape)\n }\n\n [schemaSymbol] () { return true }\n\n /**\n * @param {object} other\n */\n [equalityTraits.EqualityTraitSymbol] (other) {\n return this.equals(/** @type {any} */ (other))\n }\n\n /**\n * Use `schema.validate(obj)` with a typed parameter that is already of typed to be an instance of\n * Schema. Validate will check the structure of the parameter and return true iff the instance\n * really is an instance of Schema.\n *\n * @param {T} o\n * @return {boolean}\n */\n validate (o) {\n return this.check(o)\n }\n\n /* c8 ignore start */\n /**\n * Similar to validate, but this method accepts untyped parameters.\n *\n * @param {any} _o\n * @param {ValidationError} [_err]\n * @return {_o is T}\n */\n check (_o, _err) {\n error.methodUnimplemented()\n }\n /* c8 ignore stop */\n\n /**\n * @type {Schema}\n */\n get nullable () {\n // @ts-ignore\n return $union(this, $null)\n }\n\n /**\n * @type {$Optional>}\n */\n get optional () {\n return new $Optional(/** @type {Schema} */ (this))\n }\n\n /**\n * Cast a variable to a specific type. Returns the casted value, or throws an exception otherwise.\n * Use this if you know that the type is of a specific type and you just want to convince the type\n * system.\n *\n * **Do not rely on these error messages!**\n * Performs an assertion check only if not in a production environment.\n *\n * @template OO\n * @param {OO} o\n * @return {Extract extends never ? T : (OO extends Array ? T : Extract)}\n */\n cast (o) {\n assert(o, this)\n return /** @type {any} */ (o)\n }\n\n /**\n * EXPECTO PATRONUM!! 🪄\n * This function protects against type errors. Though it may not work in the real world.\n *\n * \"After all this time?\"\n * \"Always.\" - Snape, talking about type safety\n *\n * Ensures that a variable is a a specific type. Returns the value, or throws an exception if the assertion check failed.\n * Use this if you know that the type is of a specific type and you just want to convince the type\n * system.\n *\n * Can be useful when defining lambdas: `s.lambda(s.$number, s.$void).expect((n) => n + 1)`\n *\n * **Do not rely on these error messages!**\n * Performs an assertion check if not in a production environment.\n *\n * @param {T} o\n * @return {o extends T ? T : never}\n */\n expect (o) {\n assert(o, this)\n return o\n }\n}\n\n/**\n * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} Constr\n * @typedef {Constr extends ((...args:any[]) => infer T) ? T : (Constr extends (new (...args:any[]) => any) ? InstanceType : never)} Instance\n */\n\n/**\n * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} C\n * @extends {Schema>}\n */\nexport class $ConstructedBy extends Schema {\n /**\n * @param {C} c\n * @param {((o:Instance)=>boolean)|null} check\n */\n constructor (c, check) {\n super()\n this.shape = c\n this._c = check\n }\n\n /**\n * @param {any} o\n * @param {ValidationError} [err]\n * @return {o is C extends ((...args:any[]) => infer T) ? T : (C extends (new (...args:any[]) => any) ? InstanceType : never)} o\n */\n check (o, err = undefined) {\n const c = o?.constructor === this.shape && (this._c == null || this._c(o))\n /* c8 ignore next */\n !c && err?.extend(null, this.shape.name, o?.constructor.name, o?.constructor !== this.shape ? 'Constructor match failed' : 'Check failed')\n return c\n }\n}\n\n/**\n * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} C\n * @param {C} c\n * @param {((o:Instance) => boolean)|null} check\n * @return {CastToSchema<$ConstructedBy>}\n */\nexport const $constructedBy = (c, check = null) => new $ConstructedBy(c, check)\nexport const $$constructedBy = $constructedBy($ConstructedBy)\n\n/**\n * Check custom properties on any object. You may want to overwrite the generated Schema.\n *\n * @extends {Schema}\n */\nexport class $Custom extends Schema {\n /**\n * @param {(o:any) => boolean} check\n */\n constructor (check) {\n super()\n /**\n * @type {(o:any) => boolean}\n */\n this.shape = check\n }\n\n /**\n * @param {any} o\n * @param {ValidationError} err\n * @return {o is any}\n */\n check (o, err) {\n const c = this.shape(o)\n /* c8 ignore next */\n !c && err?.extend(null, 'custom prop', o?.constructor.name, 'failed to check custom prop')\n return c\n }\n}\n\n/**\n * @param {(o:any) => boolean} check\n * @return {Schema}\n */\nexport const $custom = (check) => new $Custom(check)\nexport const $$custom = $constructedBy($Custom)\n\n/**\n * @template {Primitive} T\n * @extends {Schema}\n */\nexport class $Literal extends Schema {\n /**\n * @param {Array} literals\n */\n constructor (literals) {\n super()\n this.shape = literals\n }\n\n /**\n *\n * @param {any} o\n * @param {ValidationError} [err]\n * @return {o is T}\n */\n check (o, err) {\n const c = this.shape.some(a => a === o)\n /* c8 ignore next */\n !c && err?.extend(null, this.shape.join(' | '), o.toString())\n return c\n }\n}\n\n/**\n * @template {Primitive[]} T\n * @param {T} literals\n * @return {CastToSchema<$Literal>}\n */\nexport const $literal = (...literals) => new $Literal(literals)\nexport const $$literal = $constructedBy($Literal)\n\n/**\n * @template {Array>} Ts\n * @typedef {Ts extends [] ? `` : (Ts extends [infer T] ? (Unwrap extends (string|number) ? Unwrap : never) : (Ts extends [infer T1, ...infer Rest] ? `${Unwrap extends (string|number) ? Unwrap : never}${Rest extends Array> ? CastStringTemplateArgsToTemplate : never}` : never))} CastStringTemplateArgsToTemplate\n */\n\n/**\n * @param {string} str\n * @return {string}\n */\nconst _regexEscape = /** @type {any} */ (RegExp).escape || /** @type {(str:string) => string} */ (str =>\n str.replace(/[().|&,$^[\\]]/g, s => '\\\\' + s)\n)\n\n/**\n * @param {string|Schema} s\n * @return {string[]}\n */\nconst _schemaStringTemplateToRegex = s => {\n if ($string.check(s)) {\n return [_regexEscape(s)]\n }\n if ($$literal.check(s)) {\n return /** @type {Array} */ (s.shape).map(v => v + '')\n }\n if ($$number.check(s)) {\n return ['[+-]?\\\\d+.?\\\\d*']\n }\n if ($$string.check(s)) {\n return ['.*']\n }\n if ($$union.check(s)) {\n return s.shape.map(_schemaStringTemplateToRegex).flat(1)\n }\n /* c8 ignore next 2 */\n // unexpected schema structure (only supports unions and string in literal types)\n error.unexpectedCase()\n}\n\n/**\n * @template {Array>} T\n * @extends {Schema>}\n */\nexport class $StringTemplate extends Schema {\n /**\n * @param {T} shape\n */\n constructor (shape) {\n super()\n this.shape = shape\n this._r = new RegExp('^' + shape.map(_schemaStringTemplateToRegex).map(opts => `(${opts.join('|')})`).join('') + '$')\n }\n\n /**\n * @param {any} o\n * @param {ValidationError} [err]\n * @return {o is CastStringTemplateArgsToTemplate}\n */\n check (o, err) {\n const c = this._r.exec(o) != null\n /* c8 ignore next */\n !c && err?.extend(null, this._r.toString(), o.toString(), 'String doesn\\'t match string template.')\n return c\n }\n}\n\n/**\n * @template {Array>} T\n * @param {T} literals\n * @return {CastToSchema<$StringTemplate>}\n */\nexport const $stringTemplate = (...literals) => new $StringTemplate(literals)\nexport const $$stringTemplate = $constructedBy($StringTemplate)\n\nconst isOptionalSymbol = Symbol('optional')\n/**\n * @template {Schema} S\n * @extends Schema|undefined>\n */\nclass $Optional extends Schema {\n /**\n * @param {S} shape\n */\n constructor (shape) {\n super()\n this.shape = shape\n }\n\n /**\n * @param {any} o\n * @param {ValidationError} [err]\n * @return {o is (Unwrap|undefined)}\n */\n check (o, err) {\n const c = o === undefined || this.shape.check(o)\n /* c8 ignore next */\n !c && err?.extend(null, 'undefined (optional)', '()')\n return c\n }\n\n get [isOptionalSymbol] () { return true }\n}\nexport const $$optional = $constructedBy($Optional)\n\n/**\n * @extends Schema\n */\nclass $Never extends Schema {\n /**\n * @param {any} _o\n * @param {ValidationError} [err]\n * @return {_o is never}\n */\n check (_o, err) {\n /* c8 ignore next */\n err?.extend(null, 'never', typeof _o)\n return false\n }\n}\n\n/**\n * @type {Schema}\n */\nexport const $never = new $Never()\nexport const $$never = $constructedBy($Never)\n\n/**\n * @template {{ [key: string|symbol|number]: Schema }} S\n * @typedef {{ [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never }} $ObjectToType\n */\n\n/**\n * @template {{[key:string|symbol|number]: Schema}} S\n * @extends {Schema<$ObjectToType>}\n */\nexport class $Object extends Schema {\n /**\n * @param {S} shape\n * @param {boolean} partial\n */\n constructor (shape, partial = false) {\n super()\n /**\n * @type {S}\n */\n this.shape = shape\n this._isPartial = partial\n }\n\n static _dilutes = true\n\n /**\n * @type {Schema>>}\n */\n get partial () {\n return new $Object(this.shape, true)\n }\n\n /**\n * @param {any} o\n * @param {ValidationError} err\n * @return {o is $ObjectToType}\n */\n check (o, err) {\n if (o == null) {\n /* c8 ignore next */\n err?.extend(null, 'object', 'null')\n return false\n }\n return obj.every(this.shape, (vv, vk) => {\n const c = (this._isPartial && !obj.hasProperty(o, vk)) || vv.check(o[vk], err)\n !c && err?.extend(vk.toString(), vv.toString(), typeof o[vk], 'Object property does not match')\n return c\n })\n }\n}\n\n/**\n * @template S\n * @typedef {Schema<{ [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never }>} _ObjectDefToSchema\n */\n\n// I used an explicit type annotation instead of $ObjectToType, so that the user doesn't see the\n// weird type definitions when inspecting type definions.\n/**\n * @template {{ [key:string|symbol|number]: Schema }} S\n * @param {S} def\n * @return {_ObjectDefToSchema extends Schema ? Schema<{ [K in keyof S]: S[K] }> : never}\n */\nexport const $object = def => /** @type {any} */ (new $Object(def))\nexport const $$object = $constructedBy($Object)\n/**\n * @type {Schema<{[key:string]: any}>}\n */\nexport const $objectAny = $custom(o => o != null && (o.constructor === Object || o.constructor == null))\n\n/**\n * @template {Schema} Keys\n * @template {Schema} Values\n * @extends {Schema<{ [key in Unwrap]: Unwrap }>}\n */\nexport class $Record extends Schema {\n /**\n * @param {Keys} keys\n * @param {Values} values\n */\n constructor (keys, values) {\n super()\n this.shape = {\n keys, values\n }\n }\n\n /**\n * @param {any} o\n * @param {ValidationError} err\n * @return {o is { [key in Unwrap]: Unwrap }}\n */\n check (o, err) {\n return o != null && obj.every(o, (vv, vk) => {\n const ck = this.shape.keys.check(vk, err)\n /* c8 ignore next */\n !ck && err?.extend(vk + '', 'Record', typeof o, ck ? 'Key doesn\\'t match schema' : 'Value doesn\\'t match value')\n return ck && this.shape.values.check(vv, err)\n })\n }\n}\n\n/**\n * @template {Schema} Keys\n * @template {Schema} Values\n * @param {Keys} keys\n * @param {Values} values\n * @return {CastToSchema<$Record>}\n */\nexport const $record = (keys, values) => new $Record(keys, values)\nexport const $$record = $constructedBy($Record)\n\n/**\n * @template {Schema[]} S\n * @extends {Schema<{ [Key in keyof S]: S[Key] extends Schema ? Type : never }>}\n */\nexport class $Tuple extends Schema {\n /**\n * @param {S} shape\n */\n constructor (shape) {\n super()\n this.shape = shape\n }\n\n /**\n * @param {any} o\n * @param {ValidationError} err\n * @return {o is { [K in keyof S]: S[K] extends Schema ? Type : never }}\n */\n check (o, err) {\n return o != null && obj.every(this.shape, (vv, vk) => {\n const c = /** @type {Schema} */ (vv).check(o[vk], err)\n /* c8 ignore next */\n !c && err?.extend(vk.toString(), 'Tuple', typeof vv)\n return c\n })\n }\n}\n\n/**\n * @template {Array>} T\n * @param {T} def\n * @return {CastToSchema<$Tuple>}\n */\nexport const $tuple = (...def) => new $Tuple(def)\nexport const $$tuple = $constructedBy($Tuple)\n\n/**\n * @template {Schema} S\n * @extends {Schema ? T : never>>}\n */\nexport class $Array extends Schema {\n /**\n * @param {Array} v\n */\n constructor (v) {\n super()\n /**\n * @type {Schema ? T : never>}\n */\n this.shape = v.length === 1 ? v[0] : new $Union(v)\n }\n\n /**\n * @param {any} o\n * @param {ValidationError} [err]\n * @return {o is Array ? T : never>} o\n */\n check (o, err) {\n const c = arr.isArray(o) && arr.every(o, oi => this.shape.check(oi))\n /* c8 ignore next */\n !c && err?.extend(null, 'Array', '')\n return c\n }\n}\n\n/**\n * @template {Array>} T\n * @param {T} def\n * @return {Schema> ? S : never>>}\n */\nexport const $array = (...def) => new $Array(def)\nexport const $$array = $constructedBy($Array)\n/**\n * @type {Schema>}\n */\nexport const $arrayAny = $custom(o => arr.isArray(o))\n\n/**\n * @template T\n * @extends {Schema}\n */\nexport class $InstanceOf extends Schema {\n /**\n * @param {new (...args:any) => T} constructor\n * @param {((o:T) => boolean)|null} check\n */\n constructor (constructor, check) {\n super()\n this.shape = constructor\n this._c = check\n }\n\n /**\n * @param {any} o\n * @param {ValidationError} err\n * @return {o is T}\n */\n check (o, err) {\n const c = o instanceof this.shape && (this._c == null || this._c(o))\n /* c8 ignore next */\n !c && err?.extend(null, this.shape.name, o?.constructor.name)\n return c\n }\n}\n\n/**\n * @template T\n * @param {new (...args:any) => T} c\n * @param {((o:T) => boolean)|null} check\n * @return {Schema}\n */\nexport const $instanceOf = (c, check = null) => new $InstanceOf(c, check)\nexport const $$instanceOf = $constructedBy($InstanceOf)\n\nexport const $$schema = $instanceOf(Schema)\n\n/**\n * @template {Schema[]} Args\n * @typedef {(...args:UnwrapArray>)=>Unwrap>} _LArgsToLambdaDef\n */\n\n/**\n * @template {Array>} Args\n * @extends {Schema<_LArgsToLambdaDef>}\n */\nexport class $Lambda extends Schema {\n /**\n * @param {Args} args\n */\n constructor (args) {\n super()\n this.len = args.length - 1\n this.args = $tuple(...args.slice(-1))\n this.res = args[this.len]\n }\n\n /**\n * @param {any} f\n * @param {ValidationError} err\n * @return {f is _LArgsToLambdaDef}\n */\n check (f, err) {\n const c = f.constructor === Function && f.length <= this.len\n /* c8 ignore next */\n !c && err?.extend(null, 'function', typeof f)\n return c\n }\n}\n\n/**\n * @template {Schema[]} Args\n * @param {Args} args\n * @return {Schema<(...args:UnwrapArray>)=>Unwrap>>}\n */\nexport const $lambda = (...args) => new $Lambda(args.length > 0 ? args : [$void])\nexport const $$lambda = $constructedBy($Lambda)\n\n/**\n * @type {Schema}\n */\nexport const $function = $custom(o => typeof o === 'function')\n\n/**\n * @template {Array>} T\n * @extends {Schema>>}\n */\nexport class $Intersection extends Schema {\n /**\n * @param {T} v\n */\n constructor (v) {\n super()\n /**\n * @type {T}\n */\n this.shape = v\n }\n\n /**\n * @param {any} o\n * @param {ValidationError} [err]\n * @return {o is Intersect>}\n */\n check (o, err) {\n // @ts-ignore\n const c = arr.every(this.shape, check => check.check(o, err))\n /* c8 ignore next */\n !c && err?.extend(null, 'Intersectinon', typeof o)\n return c\n }\n}\n\n/**\n * @template {Schema[]} T\n * @param {T} def\n * @return {CastToSchema<$Intersection>}\n */\nexport const $intersect = (...def) => new $Intersection(def)\nexport const $$intersect = $constructedBy($Intersection, o => o.shape.length > 0) // Intersection with length=0 is considered \"any\"\n\n/**\n * @template S\n * @extends {Schema}\n */\nexport class $Union extends Schema {\n static _dilutes = true\n\n /**\n * @param {Array>} v\n */\n constructor (v) {\n super()\n this.shape = v\n }\n\n /**\n * @param {any} o\n * @param {ValidationError} [err]\n * @return {o is S}\n */\n check (o, err) {\n const c = arr.some(this.shape, (vv) => vv.check(o, err))\n err?.extend(null, 'Union', typeof o)\n return c\n }\n}\n\n/**\n * @template {Array} T\n * @param {T} schemas\n * @return {CastToSchema<$Union>>>}\n */\nexport const $union = (...schemas) => schemas.findIndex($s => $$union.check($s)) >= 0\n ? $union(...schemas.map($s => $($s)).map($s => $$union.check($s) ? $s.shape : [$s]).flat(1))\n : (schemas.length === 1\n ? schemas[0]\n : new $Union(schemas))\nexport const $$union = /** @type {Schema<$Union>} */ ($constructedBy($Union))\n\nconst _t = () => true\n/**\n * @type {Schema}\n */\nexport const $any = $custom(_t)\nexport const $$any = /** @type {Schema>} */ ($constructedBy($Custom, o => o.shape === _t))\n\n/**\n * @type {Schema}\n */\nexport const $bigint = $custom(o => typeof o === 'bigint')\nexport const $$bigint = /** @type {Schema>} */ ($custom(o => o === $bigint))\n\n/**\n * @type {Schema}\n */\nexport const $symbol = $custom(o => typeof o === 'symbol')\nexport const $$symbol = /** @type {Schema>} */ ($custom(o => o === $symbol))\n\n/**\n * @type {Schema}\n */\nexport const $number = $custom(o => typeof o === 'number')\nexport const $$number = /** @type {Schema>} */ ($custom(o => o === $number))\n\n/**\n * @type {Schema}\n */\nexport const $string = $custom(o => typeof o === 'string')\nexport const $$string = /** @type {Schema>} */ ($custom(o => o === $string))\n\n/**\n * @type {Schema}\n */\nexport const $boolean = $custom(o => typeof o === 'boolean')\nexport const $$boolean = /** @type {Schema>} */ ($custom(o => o === $boolean))\n\n/**\n * @type {Schema}\n */\nexport const $undefined = $literal(undefined)\nexport const $$undefined = /** @type {Schema>} */ ($constructedBy($Literal, o => o.shape.length === 1 && o.shape[0] === undefined))\n\n/**\n * @type {Schema}\n */\nexport const $void = $literal(undefined)\nexport const $$void = /** @type {Schema>} */ ($$undefined)\n\nexport const $null = $literal(null)\nexport const $$null = /** @type {Schema>} */ ($constructedBy($Literal, o => o.shape.length === 1 && o.shape[0] === null))\n\nexport const $uint8Array = $constructedBy(Uint8Array)\nexport const $$uint8Array = /** @type {Schema>} */ ($constructedBy($ConstructedBy, o => o.shape === Uint8Array))\n\n/**\n * @type {Schema}\n */\nexport const $primitive = $union($number, $string, $null, $undefined, $bigint, $boolean, $symbol)\n\n/**\n * @typedef {JSON[]} JSONArray\n */\n/**\n * @typedef {Primitive|JSONArray|{ [key:string]:JSON }} JSON\n */\n/**\n * @type {Schema}\n */\nexport const $json = (() => {\n const $jsonArr = /** @type {$Array<$any>} */ ($array($any))\n const $jsonRecord = /** @type {$Record<$string,$any>} */ ($record($string, $any))\n const $json = $union($number, $string, $null, $boolean, $jsonArr, $jsonRecord)\n $jsonArr.shape = $json\n $jsonRecord.shape.values = $json\n return $json\n})()\n\n/**\n * @template {any} IN\n * @typedef {IN extends Schema ? IN\n * : (IN extends string|number|boolean|null ? Schema\n * : (IN extends new (...args:any[])=>any ? Schema>\n * : (IN extends any[] ? Schema<{ [K in keyof IN]: Unwrap> }[number]>\n * : (IN extends object ? (_ObjectDefToSchema<{[K in keyof IN]:ReadSchema}> extends Schema ? Schema<{ [K in keyof S]: S[K] }> : never)\n * : never)\n * )\n * )\n * )\n * } ReadSchemaOld\n */\n\n/**\n * @template {any} IN\n * @typedef {[Extract>,Extract,Extractany>,Extract,Extract|string|number|boolean|null|(new (...args:any[])=>any)|any[]>,object>] extends [infer Schemas, infer Primitives, infer Constructors, infer Arrs, infer Obj]\n * ? Schema<\n * (Schemas extends Schema ? S : never)\n * | Primitives\n * | (Constructors extends new (...args:any[])=>any ? InstanceType : never)\n * | (Arrs extends any[] ? { [K in keyof Arrs]: Unwrap> }[number] : never)\n * | (Obj extends object ? Unwrap<(_ObjectDefToSchema<{[K in keyof Obj]:ReadSchema}> extends Schema ? Schema<{ [K in keyof S]: S[K] }> : never)> : never)>\n * : never\n * } ReadSchema\n */\n\n/**\n * @typedef {ReadSchema<{x:42}|{y:99}|Schema|[1,2,{}]>} Q\n */\n\n/**\n * @template IN\n * @param {IN} o\n * @return {ReadSchema}\n */\nexport const $ = o => {\n if ($$schema.check(o)) {\n return /** @type {any} */ (o)\n } else if ($objectAny.check(o)) {\n /**\n * @type {any}\n */\n const o2 = {}\n for (const k in o) {\n o2[k] = $(o[k])\n }\n return /** @type {any} */ ($object(o2))\n } else if ($arrayAny.check(o)) {\n return /** @type {any} */ ($union(...o.map($)))\n } else if ($primitive.check(o)) {\n return /** @type {any} */ ($literal(o))\n } else if ($function.check(o)) {\n return /** @type {any} */ ($constructedBy(/** @type {any} */ (o)))\n }\n /* c8 ignore next */\n error.unexpectedCase()\n}\n\n/* c8 ignore start */\n/**\n * Assert that a variable is of this specific type.\n * The assertion check is only performed in non-production environments.\n *\n * @type {(o:any,schema:Schema) => asserts o is T}\n */\nexport const assert = env.production\n ? () => {}\n : (o, schema) => {\n const err = new ValidationError()\n if (!schema.check(o, err)) {\n throw error.create(`Expected value to be of type ${schema.constructor.name}.\\n${err.toString()}`)\n }\n }\n/* c8 ignore end */\n\n/**\n * @template In\n * @template Out\n * @typedef {{ if: Schema, h: (o:In,state?:any)=>Out }} Pattern\n */\n\n/**\n * @template {Pattern} P\n * @template In\n * @typedef {ReturnType>['h']>} PatternMatchResult\n */\n\n/**\n * @todo move this to separate library\n * @template {any} [State=undefined]\n * @template {Pattern} [Patterns=never]\n */\nexport class PatternMatcher {\n /**\n * @param {Schema} [$state]\n */\n constructor ($state) {\n /**\n * @type {Array}\n */\n this.patterns = []\n this.$state = $state\n }\n\n /**\n * @template P\n * @template R\n * @param {P} pattern\n * @param {(o:NoInfer>>,s:State)=>R} handler\n * @return {PatternMatcher>,R>>}\n */\n if (pattern, handler) {\n // @ts-ignore\n this.patterns.push({ if: $(pattern), h: handler })\n // @ts-ignore\n return this\n }\n\n /**\n * @template R\n * @param {(o:any,s:State)=>R} h\n */\n else (h) {\n return this.if($any, h)\n }\n\n /**\n * @return {State extends undefined\n * ? >(o:In,state?:undefined)=>PatternMatchResult\n * : >(o:In,state:State)=>PatternMatchResult}\n */\n done () {\n // @ts-ignore\n return /** @type {any} */ (o, s) => {\n for (let i = 0; i < this.patterns.length; i++) {\n const p = this.patterns[i]\n if (p.if.check(o)) {\n // @ts-ignore\n return p.h(o, s)\n }\n }\n throw error.create('Unhandled pattern')\n }\n }\n}\n\n/**\n * @template [State=undefined]\n * @param {State} [state]\n * @return {PatternMatcher>>}\n */\nexport const match = state => new PatternMatcher(/** @type {any} */ (state))\n\n/**\n * Helper function to generate a (non-exhaustive) sample set from a gives schema.\n *\n * @type {(o:T,gen:prng.PRNG)=>T}\n */\nconst _random = /** @type {any} */ (match(/** @type {Schema} */ ($any))\n .if($$number, (_o, gen) => prng.int53(gen, number.MIN_SAFE_INTEGER, number.MAX_SAFE_INTEGER))\n .if($$string, (_o, gen) => prng.word(gen))\n .if($$boolean, (_o, gen) => prng.bool(gen))\n .if($$bigint, (_o, gen) => BigInt(prng.int53(gen, number.MIN_SAFE_INTEGER, number.MAX_SAFE_INTEGER)))\n .if($$union, (o, gen) => random(gen, prng.oneOf(gen, o.shape)))\n .if($$object, (o, gen) => {\n /**\n * @type {any}\n */\n const res = {}\n for (const k in o.shape) {\n let prop = o.shape[k]\n if ($$optional.check(prop)) {\n if (prng.bool(gen)) { continue }\n prop = prop.shape\n }\n res[k] = _random(prop, gen)\n }\n return res\n })\n .if($$array, (o, gen) => {\n const arr = []\n const n = prng.int32(gen, 0, 42)\n for (let i = 0; i < n; i++) {\n arr.push(random(gen, o.shape))\n }\n return arr\n })\n .if($$literal, (o, gen) => {\n return prng.oneOf(gen, o.shape)\n })\n .if($$null, (o, gen) => {\n return null\n })\n .if($$lambda, (o, gen) => {\n const res = random(gen, o.res)\n return () => res\n })\n .if($$any, (o, gen) => random(gen, prng.oneOf(gen, [\n $number, $string, $null, $undefined, $bigint, $boolean,\n $array($number),\n $record($union('a', 'b', 'c'), $number)\n ])))\n .if($$record, (o, gen) => {\n /**\n * @type {any}\n */\n const res = {}\n const keysN = prng.int53(gen, 0, 3)\n for (let i = 0; i < keysN; i++) {\n const key = random(gen, o.shape.keys)\n const val = random(gen, o.shape.values)\n res[key] = val\n }\n return res\n })\n .done())\n\n/**\n * @template S\n * @param {prng.PRNG} gen\n * @param {S} schema\n * @return {Unwrap>}\n */\nexport const random = (gen, schema) => /** @type {any} */ (_random($(schema), gen))\n"],"names":["string.repeat","equalityTraits.EqualityTraitSymbol","equalityTraits.equals","arr.isArray","arr.every","arr.some","obj.isObject","obj.every","fun.equalityDeep","error.methodUnimplemented","error.unexpectedCase","obj.hasProperty","env.production","error.create","prng.int53","number.MIN_SAFE_INTEGER","number.MAX_SAFE_INTEGER","prng.word","prng.bool","prng.oneOf","prng.int32"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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CAAC,CAAC,KAAK,CAAC,IAAI,EAAC;AAC3C,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,EAAC;AAC7C,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,IAAG;AACpB,KAAK;AACL,IAAI,OAAO,GAAG;AACd,GAAG,CAAC;AACJ,GAAG,IAAI,EAAE,EAAC;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,yBAAyB,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.d.ts deleted file mode 100644 index 27c6fbf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.d.ts +++ /dev/null @@ -1,595 +0,0 @@ -export class ValidationError { - /** - * Reverse errors - * @type {Array<{ path: string?, expected: string, has: string, message: string? }>} - */ - _rerrs: Array<{ - path: string | null; - expected: string; - has: string; - message: string | null; - }>; - /** - * @param {string?} path - * @param {string} expected - * @param {string} has - * @param {string?} message - */ - extend(path: string | null, expected: string, has: string, message?: string | null): void; - toString(): string; -} -/** - * @template T - * @implements {equalityTraits.EqualityTrait} - */ -export class Schema implements equalityTraits.EqualityTrait { - /** - * If true, the more things are added to the shape the more objects this schema will accept (e.g. - * union). By default, the more objects are added, the the fewer objects this schema will accept. - * @protected - */ - protected static _dilutes: boolean; - /** - * @param {Schema} other - */ - extends(other: Schema): boolean; - /** - * Overwrite this when necessary. By default, we only check the `shape` property which every shape - * should have. - * @param {Schema} other - */ - equals(other: Schema): boolean; - /** - * Use `schema.validate(obj)` with a typed parameter that is already of typed to be an instance of - * Schema. Validate will check the structure of the parameter and return true iff the instance - * really is an instance of Schema. - * - * @param {T} o - * @return {boolean} - */ - validate(o: T): boolean; - /** - * Similar to validate, but this method accepts untyped parameters. - * - * @param {any} _o - * @param {ValidationError} [_err] - * @return {_o is T} - */ - check(_o: any, _err?: ValidationError): _o is T; - /** - * @type {Schema} - */ - get nullable(): Schema; - /** - * @type {$Optional>} - */ - get optional(): $Optional>; - /** - * Cast a variable to a specific type. Returns the casted value, or throws an exception otherwise. - * Use this if you know that the type is of a specific type and you just want to convince the type - * system. - * - * **Do not rely on these error messages!** - * Performs an assertion check only if not in a production environment. - * - * @template OO - * @param {OO} o - * @return {Extract extends never ? T : (OO extends Array ? T : Extract)} - */ - cast(o: OO): Extract extends never ? T : (OO extends Array ? T : Extract); - /** - * EXPECTO PATRONUM!! 🪄 - * This function protects against type errors. Though it may not work in the real world. - * - * "After all this time?" - * "Always." - Snape, talking about type safety - * - * Ensures that a variable is a a specific type. Returns the value, or throws an exception if the assertion check failed. - * Use this if you know that the type is of a specific type and you just want to convince the type - * system. - * - * Can be useful when defining lambdas: `s.lambda(s.$number, s.$void).expect((n) => n + 1)` - * - * **Do not rely on these error messages!** - * Performs an assertion check if not in a production environment. - * - * @param {T} o - * @return {o extends T ? T : never} - */ - expect(o: T): T extends T ? T : never; - [schemaSymbol](): boolean; - /** - * @param {object} other - */ - [equalityTraits.EqualityTraitSymbol](other: object): boolean; -} -/** - * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} Constr - * @typedef {Constr extends ((...args:any[]) => infer T) ? T : (Constr extends (new (...args:any[]) => any) ? InstanceType : never)} Instance - */ -/** - * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} C - * @extends {Schema>} - */ -export class $ConstructedBy any) | ((...args: any[]) => any)> extends Schema> { - /** - * @param {C} c - * @param {((o:Instance)=>boolean)|null} check - */ - constructor(c: C, check: ((o: Instance) => boolean) | null); - shape: C; - _c: ((o: Instance) => boolean) | null; - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is C extends ((...args:any[]) => infer T) ? T : (C extends (new (...args:any[]) => any) ? InstanceType : never)} o - */ - check(o: any, err?: ValidationError): o is C extends ((...args: any[]) => infer T) ? T : (C extends (new (...args: any[]) => any) ? InstanceType : never); -} -export function $constructedBy any) | ((...args: any[]) => any)>(c: C, check?: ((o: Instance) => boolean) | null): CastToSchema<$ConstructedBy>; -export const $$constructedBy: Schema<$ConstructedBy<(new (...args: any[]) => any) | ((...args: any[]) => any)>>; -/** - * Check custom properties on any object. You may want to overwrite the generated Schema. - * - * @extends {Schema} - */ -export class $Custom extends Schema { - /** - * @param {(o:any) => boolean} check - */ - constructor(check: (o: any) => boolean); - /** - * @type {(o:any) => boolean} - */ - shape: (o: any) => boolean; - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is any} - */ - check(o: any, err: ValidationError): o is any; -} -export function $custom(check: (o: any) => boolean): Schema; -export const $$custom: Schema<$Custom>; -/** - * @template {Primitive} T - * @extends {Schema} - */ -export class $Literal extends Schema { - /** - * @param {Array} literals - */ - constructor(literals: Array); - shape: T[]; -} -export function $literal(...literals: T): CastToSchema<$Literal>; -export const $$literal: Schema<$Literal>; -/** - * @template {Array>} T - * @extends {Schema>} - */ -export class $StringTemplate>> extends Schema> { - /** - * @param {T} shape - */ - constructor(shape: T); - shape: T; - _r: RegExp; -} -export function $stringTemplate>>(...literals: T): CastToSchema<$StringTemplate>; -export const $$stringTemplate: Schema<$StringTemplate<(string | Schema)[]>>; -export const $$optional: Schema<$Optional>>; -/** - * @type {Schema} - */ -export const $never: Schema; -export const $$never: Schema<$Never>; -/** - * @template {{ [key: string|symbol|number]: Schema }} S - * @typedef {{ [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never }} $ObjectToType - */ -/** - * @template {{[key:string|symbol|number]: Schema}} S - * @extends {Schema<$ObjectToType>} - */ -export class $Object; -}> extends Schema<$ObjectToType> { - /** - * @param {S} shape - * @param {boolean} partial - */ - constructor(shape: S, partial?: boolean); - /** - * @type {S} - */ - shape: S; - _isPartial: boolean; - /** - * @type {Schema>>} - */ - get partial(): Schema>>; - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is $ObjectToType} - */ - check(o: any, err: ValidationError): o is $ObjectToType; -} -export function $object; -}>(def: S): _ObjectDefToSchema extends Schema ? Schema<{ [K in keyof S_1]: S_1[K]; }> : never; -export const $$object: Schema<$Object<{ - [key: string]: Schema; - [key: number]: Schema; - [key: symbol]: Schema; -}>>; -/** - * @type {Schema<{[key:string]: any}>} - */ -export const $objectAny: Schema<{ - [key: string]: any; -}>; -/** - * @template {Schema} Keys - * @template {Schema} Values - * @extends {Schema<{ [key in Unwrap]: Unwrap }>} - */ -export class $Record, Values extends Schema> extends Schema<{ [key in Unwrap]: Unwrap; }> { - /** - * @param {Keys} keys - * @param {Values} values - */ - constructor(keys: Keys, values: Values); - shape: { - keys: Keys; - values: Values; - }; - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is { [key in Unwrap]: Unwrap }} - */ - check(o: any, err: ValidationError): o is { [key_1 in Unwrap]: Unwrap; }; -} -export function $record, Values extends Schema>(keys: Keys, values: Values): CastToSchema<$Record>; -export const $$record: Schema<$Record, Schema>>; -/** - * @template {Schema[]} S - * @extends {Schema<{ [Key in keyof S]: S[Key] extends Schema ? Type : never }>} - */ -export class $Tuple[]> extends Schema<{ [Key in keyof S]: S[Key] extends Schema ? Type : never; }> { - /** - * @param {S} shape - */ - constructor(shape: S); - shape: S; - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is { [K in keyof S]: S[K] extends Schema ? Type : never }} - */ - check(o: any, err: ValidationError): o is { [K in keyof S]: S[K] extends Schema ? Type : never; }; -} -export function $tuple>>(...def: T): CastToSchema<$Tuple>; -export const $$tuple: Schema<$Tuple[]>>; -/** - * @template {Schema} S - * @extends {Schema ? T : never>>} - */ -export class $Array> extends Schema<(S extends Schema ? T : never)[]> { - /** - * @param {Array} v - */ - constructor(v: Array); - /** - * @type {Schema ? T : never>} - */ - shape: Schema ? T_1 : never>; - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is Array ? T : never>} o - */ - check(o: any, err?: ValidationError): o is Array ? T_1 : never>; -} -export function $array>>(...def: T): Schema> ? S : never>>; -export const $$array: Schema<$Array>>; -/** - * @type {Schema>} - */ -export const $arrayAny: Schema>; -/** - * @template T - * @extends {Schema} - */ -export class $InstanceOf extends Schema { - /** - * @param {new (...args:any) => T} constructor - * @param {((o:T) => boolean)|null} check - */ - constructor(constructor: new (...args: any) => T, check: ((o: T) => boolean) | null); - shape: new (...args: any) => T; - _c: ((o: T) => boolean) | null; - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is T} - */ - check(o: any, err: ValidationError): o is T; -} -export function $instanceOf(c: new (...args: any) => T, check?: ((o: T) => boolean) | null): Schema; -export const $$instanceOf: Schema<$InstanceOf>; -export const $$schema: Schema>; -/** - * @template {Schema[]} Args - * @typedef {(...args:UnwrapArray>)=>Unwrap>} _LArgsToLambdaDef - */ -/** - * @template {Array>} Args - * @extends {Schema<_LArgsToLambdaDef>} - */ -export class $Lambda>> extends Schema<_LArgsToLambdaDef> { - /** - * @param {Args} args - */ - constructor(args: Args); - len: number; - args: Schema; - res: Schema; - /** - * @param {any} f - * @param {ValidationError} err - * @return {f is _LArgsToLambdaDef} - */ - check(f: any, err: ValidationError): f is _LArgsToLambdaDef; -} -export function $lambda[]>(...args: Args): Schema<(...args: UnwrapArray>) => Unwrap>>; -export const $$lambda: Schema<$Lambda[]>>; -/** - * @type {Schema} - */ -export const $function: Schema; -/** - * @template {Array>} T - * @extends {Schema>>} - */ -export class $Intersection>> extends Schema>> { - /** - * @param {T} v - */ - constructor(v: T); - /** - * @type {T} - */ - shape: T; -} -export function $intersect[]>(...def: T): CastToSchema<$Intersection>; -export const $$intersect: Schema<$Intersection[]>>; -/** - * @template S - * @extends {Schema} - */ -export class $Union extends Schema { - /** - * @param {Array>} v - */ - constructor(v: Array>); - shape: Schema[]; -} -export function $union>(...schemas: T): CastToSchema<$Union>>>; -export const $$union: Schema<$Union>; -/** - * @type {Schema} - */ -export const $any: Schema; -export const $$any: Schema>; -/** - * @type {Schema} - */ -export const $bigint: Schema; -export const $$bigint: Schema>; -/** - * @type {Schema} - */ -export const $symbol: Schema; -export const $$symbol: Schema>; -/** - * @type {Schema} - */ -export const $number: Schema; -export const $$number: Schema>; -/** - * @type {Schema} - */ -export const $string: Schema; -export const $$string: Schema>; -/** - * @type {Schema} - */ -export const $boolean: Schema; -export const $$boolean: Schema>; -/** - * @type {Schema} - */ -export const $undefined: Schema; -export const $$undefined: Schema>; -/** - * @type {Schema} - */ -export const $void: Schema; -export const $$void: Schema>; -export const $null: Schema; -export const $$null: Schema>; -export const $uint8Array: Schema>; -export const $$uint8Array: Schema>; -/** - * @type {Schema} - */ -export const $primitive: Schema; -/** - * @typedef {JSON[]} JSONArray - */ -/** - * @typedef {Primitive|JSONArray|{ [key:string]:JSON }} JSON - */ -/** - * @type {Schema} - */ -export const $json: Schema; -export function $(o: IN): ReadSchema; -/** - * Assert that a variable is of this specific type. - * The assertion check is only performed in non-production environments. - * - * @type {(o:any,schema:Schema) => asserts o is T} - */ -export const assert: (o: any, schema: Schema) => asserts o is T; -/** - * @template In - * @template Out - * @typedef {{ if: Schema, h: (o:In,state?:any)=>Out }} Pattern - */ -/** - * @template {Pattern} P - * @template In - * @typedef {ReturnType>['h']>} PatternMatchResult - */ -/** - * @todo move this to separate library - * @template {any} [State=undefined] - * @template {Pattern} [Patterns=never] - */ -export class PatternMatcher = never> { - /** - * @param {Schema} [$state] - */ - constructor($state?: Schema); - /** - * @type {Array} - */ - patterns: Array; - $state: Schema | undefined; - /** - * @template P - * @template R - * @param {P} pattern - * @param {(o:NoInfer>>,s:State)=>R} handler - * @return {PatternMatcher>,R>>} - */ - if(pattern: P, handler: (o: NoInfer>>, s: State) => R): PatternMatcher>, R>>; - /** - * @template R - * @param {(o:any,s:State)=>R} h - */ - else(h: (o: any, s: State) => R): PatternMatcher>; - /** - * @return {State extends undefined - * ? >(o:In,state?:undefined)=>PatternMatchResult - * : >(o:In,state:State)=>PatternMatchResult} - */ - done(): State extends undefined ? >(o: In, state?: undefined) => PatternMatchResult : >(o: In, state: State) => PatternMatchResult; -} -export function match(state?: State): PatternMatcher>>; -export function random(gen: prng.PRNG, schema: S): Unwrap>; -export type Primitive = string | number | bigint | boolean | null | undefined | symbol; -export type AnyObject = { - [k: string | number | symbol]: any; -}; -export type Unwrap = T extends Schema ? X : T; -export type TypeOf = T extends Schema ? X : T; -export type UnwrapArray = T extends readonly [Schema, ...infer Rest] ? [First, ...UnwrapArray] : []; -export type CastToSchema = T extends Schema ? Schema : never; -export type TupleLast = Arr extends [...unknown[], infer L] ? L : never; -export type TuplePop = Arr extends [...infer Fs, unknown] ? Fs : never; -export type Intersect = T extends [] ? {} : T extends [infer First] ? First : T extends [infer First, ...infer Rest] ? First & Intersect : never; -export type Instance any) | ((...args: any[]) => any)> = Constr extends ((...args: any[]) => infer T) ? T : (Constr extends (new (...args: any[]) => any) ? InstanceType : never); -export type CastStringTemplateArgsToTemplate>> = Ts extends [] ? `` : (Ts extends [infer T] ? (Unwrap extends (string | number) ? Unwrap : never) : (Ts extends [infer T1, ...infer Rest] ? `${Unwrap extends (string | number) ? Unwrap : never}${Rest extends Array> ? CastStringTemplateArgsToTemplate : never}` : never)); -export type $ObjectToType; -}> = { [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never; } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never; }; -export type _ObjectDefToSchema = Schema<{ [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never; } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never; }>; -export type _LArgsToLambdaDef[]> = (...args: UnwrapArray>) => Unwrap>; -export type JSONArray = JSON[]; -export type JSON = Primitive | JSONArray | { - [key: string]: JSON; -}; -export type ReadSchemaOld = IN extends Schema ? IN : (IN extends string | number | boolean | null ? Schema : (IN extends new (...args: any[]) => any ? Schema> : (IN extends any[] ? Schema<{ [K in keyof IN]: Unwrap>; }[number]> : (IN extends object ? (_ObjectDefToSchema<{ [K in keyof IN]: ReadSchema; }> extends Schema ? Schema<{ [K in keyof S]: S[K]; }> : never) : never)))); -export type ReadSchema = [Extract>, Extract, Extract any>, Extract, Extract | string | number | boolean | null | (new (...args: any[]) => any) | any[]>, object>] extends [infer Schemas, infer Primitives, infer Constructors, infer Arrs, infer Obj] ? Schema<(Schemas extends Schema ? S : never) | Primitives | (Constructors extends new (...args: any[]) => any ? InstanceType : never) | (Arrs extends any[] ? { [K in keyof Arrs]: Unwrap>; }[number] : never) | (Obj extends object ? Unwrap<(_ObjectDefToSchema<{ [K in keyof Obj]: ReadSchema; }> extends Schema ? Schema<{ [K in keyof S]: S[K]; }> : never)> : never)> : never; -export type Q = ReadSchema<{ - x: 42; -} | { - y: 99; -} | Schema | [1, 2, {}]>; -export type Pattern = { - if: Schema; - h: (o: In, state?: any) => Out; -}; -export type PatternMatchResult

, In> = ReturnType>["h"]>; -import * as equalityTraits from './trait/equality.js'; -/** - * @template {Schema} S - * @extends Schema|undefined> - */ -declare class $Optional> extends Schema | undefined> { - /** - * @param {S} shape - */ - constructor(shape: S); - shape: S; - get [isOptionalSymbol](): boolean; -} -/** - * @typedef {string|number|bigint|boolean|null|undefined|symbol} Primitive - */ -/** - * @typedef {{ [k:string|number|symbol]: any }} AnyObject - */ -/** - * @template T - * @typedef {T extends Schema ? X : T} Unwrap - */ -/** - * @template T - * @typedef {T extends Schema ? X : T} TypeOf - */ -/** - * @template {readonly unknown[]} T - * @typedef {T extends readonly [Schema, ...infer Rest] ? [First, ...UnwrapArray] : [] } UnwrapArray - */ -/** - * @template T - * @typedef {T extends Schema ? Schema : never} CastToSchema - */ -/** - * @template {unknown[]} Arr - * @typedef {Arr extends [...unknown[], infer L] ? L : never} TupleLast - */ -/** - * @template {unknown[]} Arr - * @typedef {Arr extends [...infer Fs, unknown] ? Fs : never} TuplePop - */ -/** - * @template {readonly unknown[]} T - * @typedef {T extends [] - * ? {} - * : T extends [infer First] - * ? First - * : T extends [infer First, ...infer Rest] - * ? First & Intersect - * : never - * } Intersect - */ -declare const schemaSymbol: unique symbol; -/** - * @extends Schema - */ -declare class $Never extends Schema { - constructor(); -} -import * as prng from './prng.js'; -declare const isOptionalSymbol: unique symbol; -export {}; -//# sourceMappingURL=schema.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.d.ts.map deleted file mode 100644 index 29d6759..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../schema.js"],"names":[],"mappings":"AAoEA;IAEI;;;OAGG;IACH,QAFU,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,OAAC,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,OAAC,CAAA;KAAE,CAAC,CAEnE;IAGlB;;;;;OAKG;IACH,aALW,MAAM,OAAC,YACP,MAAM,OACN,MAAM,YACN,MAAM,OAAC,QAIjB;IAED,mBAQC;CACF;AAwBD;;;GAGG;AACH,oBAHa,CAAC,aACE,cAAc,CAAC,aAAa;IAI1C;;;;OAIG;IACH,mCAAuB;IAEvB;;OAEG;IACH,eAFW,MAAM,CAAC,GAAG,CAAC,WAMrB;IAED;;;;OAIG;IACH,cAFW,MAAM,CAAC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,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC,EAAE,CAAC,CAAC,EAAC,EAAE,EAAC,KAAK,CAAC,EAAC,GAAG,KAAG,GAAG,CAAA;CAAE;+BAI1B,CAAC,SAAnB,OAAO,CAAC,GAAG,EAAC,GAAG,CAAE,EAClB,EAAE,IACF,UAAU,CAAC,OAAO,CAAC,CAAC,EAAC,OAAO,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,EAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gCA19BpF,qBAAqB;AAqarD;;;GAGG;AACH,wBAH2B,CAAC,SAAd,MAAM,CAAC,GAAG,CAAE;IAIxB;;OAEG;IACH,mBAFW,CAAC,EAKX;IADC,SAAkB;IAepB,kCAAyC;CAC1C;AAzbD;;GAEG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,0CAAsC;AA0YtC;;GAEG;AACH;;CAWC;sBA7cqB,WAAW;AAiajC,8CAA2C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.test.d.ts deleted file mode 100644 index a6d6d4d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.test.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export function testSchemas(_tc: t.TestCase): void; -export function testSchemaExpect(): void; -export function testObjectSchemaOptionals(_tc: t.TestCase): void; -export function testMetaSchemas(_tc: t.TestCase): void; -export function testStringTemplate(_tc: t.TestCase): void; -export function testSchemaExtends(_tc: t.TestCase): void; -export function testSchemaErrors(_tc: t.TestCase): void; -export function testUnionMerging(_tc: t.TestCase): void; -export function testConvenienceHelper(): void; -export function testPatternMatcherBase(): void; -export function testPatternMatcherWithState(): void; -export function testPatternMatcherBenchmark(): void; -export function testRepeatRandomFromSchema(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=schema.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.test.d.ts.map deleted file mode 100644 index 04ac756..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/schema.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schema.test.d.ts","sourceRoot":"","sources":["../schema.test.js"],"names":[],"mappings":"AAQO,iCAFI,CAAC,CAAC,QAAQ,QAqPpB;AAEM,yCAMN;AAKM,+CAFI,CAAC,CAAC,QAAQ,QAiBpB;AAKM,qCAFI,CAAC,CAAC,QAAQ,QA0BpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QAmBpB;AAKM,uCAFI,CAAC,CAAC,QAAQ,QAUpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QASpB;AAMM,sCAFI,CAAC,CAAC,QAAQ,QAcpB;AAEM,8CAqBN;AAEM,+CAmBN;AAEM,oDAuBN;AAEM,oDA8IN;AAKM,+CAFI,CAAC,CAAC,QAAQ,QA4BpB;mBAzmBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set-5b47859e.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set-5b47859e.cjs deleted file mode 100644 index 5126d94..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set-5b47859e.cjs +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -/** - * Utility module to work with sets. - * - * @module set - */ - -const create = () => new Set(); - -/** - * @template T - * @param {Set} set - * @return {Array} - */ -const toArray = set => Array.from(set); - -/** - * @template T - * @param {Set} set - * @return {T|undefined} - */ -const first = set => set.values().next().value; - -/** - * @template T - * @param {Iterable} entries - * @return {Set} - */ -const from = entries => new Set(entries); - -var set = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create, - toArray: toArray, - first: first, - from: from -}); - -exports.create = create; -exports.first = first; -exports.from = from; -exports.set = set; -exports.toArray = toArray; -//# sourceMappingURL=set-5b47859e.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set-5b47859e.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set-5b47859e.cjs.map deleted file mode 100644 index e56cd9d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set-5b47859e.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"set-5b47859e.cjs","sources":["../set.js"],"sourcesContent":["/**\n * Utility module to work with sets.\n *\n * @module set\n */\n\nexport const create = () => new Set()\n\n/**\n * @template T\n * @param {Set} set\n * @return {Array}\n */\nexport const toArray = set => Array.from(set)\n\n/**\n * @template T\n * @param {Set} set\n * @return {T|undefined}\n */\nexport const first = set => set.values().next().value\n\n/**\n * @template T\n * @param {Iterable} entries\n * @return {Set}\n */\nexport const from = entries => new Set(entries)\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,IAAI,GAAG,GAAE;AACrC;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,EAAC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,KAAK,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,MAAK;AACrD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,OAAO,IAAI,IAAI,GAAG,CAAC,OAAO;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.cjs deleted file mode 100644 index 1cbea6d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.cjs +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var set = require('./set-5b47859e.cjs'); - - - -exports.create = set.create; -exports.first = set.first; -exports.from = set.from; -exports.toArray = set.toArray; -//# sourceMappingURL=set.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.cjs.map deleted file mode 100644 index ce54f1a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"set.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.d.ts deleted file mode 100644 index 28aff5d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function create(): Set; -export function toArray(set: Set): Array; -export function first(set: Set): T | undefined; -export function from(entries: Iterable): Set; -//# sourceMappingURL=set.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.d.ts.map deleted file mode 100644 index 74bf751..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../set.js"],"names":[],"mappings":"AAMO,mCAA8B;AAO9B,wBAJM,CAAC,OACH,GAAG,CAAC,CAAC,CAAC,GACL,KAAK,CAAC,CAAC,CAAC,CAEyB;AAOtC,sBAJM,CAAC,OACH,GAAG,CAAC,CAAC,CAAC,GACL,CAAC,GAAC,SAAS,CAE8B;AAO9C,qBAJM,CAAC,WACH,QAAQ,CAAC,CAAC,CAAC,GACV,GAAG,CAAC,CAAC,CAAC,CAE6B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.test.d.ts deleted file mode 100644 index 075f0d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testFirst(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=set.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.test.d.ts.map deleted file mode 100644 index ca0a434..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/set.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"set.test.d.ts","sourceRoot":"","sources":["../set.test.js"],"names":[],"mappings":"AAMO,+BAFI,CAAC,CAAC,QAAQ,QAUpB;mBAdkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.cjs deleted file mode 100644 index da9f76d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.cjs +++ /dev/null @@ -1,183 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var binary = require('./binary-ac8e39e2.cjs'); - -/** - * @module sha256 - * Spec: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf - * Resources: - * - https://web.archive.org/web/20150315061807/http://csrc.nist.gov/groups/STM/cavp/documents/shs/sha256-384-512.pdf - */ - -/** - * @param {number} w - a 32bit uint - * @param {number} shift - */ -const rotr = (w, shift) => (w >>> shift) | (w << (32 - shift)); - -/** - * Helper for SHA-224 & SHA-256. See 4.1.2. - * @param {number} x - */ -const sum0to256 = x => rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22); - -/** - * Helper for SHA-224 & SHA-256. See 4.1.2. - * @param {number} x - */ -const sum1to256 = x => rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25); - -/** - * Helper for SHA-224 & SHA-256. See 4.1.2. - * @param {number} x - */ -const sigma0to256 = x => rotr(x, 7) ^ rotr(x, 18) ^ x >>> 3; - -/** - * Helper for SHA-224 & SHA-256. See 4.1.2. - * @param {number} x - */ -const sigma1to256 = x => rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10; - -// @todo don't init these variables globally - -/** - * See 4.2.2: Constant for sha256 & sha224 - * These words represent the first thirty-two bits of the fractional parts of - * the cube roots of the first sixty-four prime numbers. In hex, these constant words are (from left to - * right) - */ -const K = new Uint32Array([ - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -]); - -/** - * See 5.3.3. Initial hash value. - * - * These words were obtained by taking the first thirty-two bits of the fractional parts of the - * square roots of the first eight prime numbers. - * - * @todo shouldn't be a global variable - */ -const HINIT = new Uint32Array([ - 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 -]); - -// time to beat: (large value < 4.35s) - -class Hasher { - constructor () { - const buf = new ArrayBuffer(64 + 64 * 4); - // Init working variables using a single arraybuffer - this._H = new Uint32Array(buf, 0, 8); - this._H.set(HINIT); - // "Message schedule" - a working variable - this._W = new Uint32Array(buf, 64, 64); - } - - _updateHash () { - const H = this._H; - const W = this._W; - for (let t = 16; t < 64; t++) { - W[t] = sigma1to256(W[t - 2]) + W[t - 7] + sigma0to256(W[t - 15]) + W[t - 16]; - } - let a = H[0]; - let b = H[1]; - let c = H[2]; - let d = H[3]; - let e = H[4]; - let f = H[5]; - let g = H[6]; - let h = H[7]; - for (let tt = 0, T1, T2; tt < 64; tt++) { - T1 = (h + sum1to256(e) + ((e & f) ^ (~e & g)) + K[tt] + W[tt]) >>> 0; - T2 = (sum0to256(a) + ((a & b) ^ (a & c) ^ (b & c))) >>> 0; - h = g; - g = f; - f = e; - e = (d + T1) >>> 0; - d = c; - c = b; - b = a; - a = (T1 + T2) >>> 0; - } - H[0] += a; - H[1] += b; - H[2] += c; - H[3] += d; - H[4] += e; - H[5] += f; - H[6] += g; - H[7] += h; - } - - /** - * Returns a 32-byte hash. - * - * @param {Uint8Array} data - */ - digest (data) { - let i = 0; - for (; i + 56 <= data.length;) { - // write data in big endianess - let j = 0; - for (; j < 16 && i + 3 < data.length; j++) { - this._W[j] = data[i++] << 24 | data[i++] << 16 | data[i++] << 8 | data[i++]; - } - if (i % 64 !== 0) { // there is still room to write partial content and the ending bit. - this._W.fill(0, j, 16); - while (i < data.length) { - this._W[j] |= data[i] << ((3 - (i % 4)) * 8); - i++; - } - this._W[j] |= binary.BIT8 << ((3 - (i % 4)) * 8); - } - this._updateHash(); - } - // same check as earlier - the ending bit has been written - const isPaddedWith1 = i % 64 !== 0; - this._W.fill(0, 0, 16); - let j = 0; - for (; i < data.length; j++) { - for (let ci = 3; ci >= 0 && i < data.length; ci--) { - this._W[j] |= data[i++] << (ci * 8); - } - } - // Write padding of the message. See 5.1.2. - if (!isPaddedWith1) { - this._W[j - (i % 4 === 0 ? 0 : 1)] |= binary.BIT8 << ((3 - (i % 4)) * 8); - } - // write length of message (size in bits) as 64 bit uint - // @todo test that this works correctly - this._W[14] = data.byteLength / binary.BIT30; // same as data.byteLength >>> 30 - but works on floats - this._W[15] = data.byteLength * 8; - this._updateHash(); - // correct H endianness to use big endiannes and return a Uint8Array - const dv = new Uint8Array(32); - for (let i = 0; i < this._H.length; i++) { - for (let ci = 0; ci < 4; ci++) { - dv[i * 4 + ci] = this._H[i] >>> (3 - ci) * 8; - } - } - return dv - } -} - -/** - * Returns a 32-byte hash. - * - * @param {Uint8Array} data - */ -const digest = data => new Hasher().digest(data); - -exports.digest = digest; -//# sourceMappingURL=sha256.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.cjs.map deleted file mode 100644 index 46b7281..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.cjs","sources":["../hash/sha256.js"],"sourcesContent":["/**\n * @module sha256\n * Spec: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\n * Resources:\n * - https://web.archive.org/web/20150315061807/http://csrc.nist.gov/groups/STM/cavp/documents/shs/sha256-384-512.pdf\n */\n\nimport * as binary from '../binary.js'\n\n/**\n * @param {number} w - a 32bit uint\n * @param {number} shift\n */\nconst rotr = (w, shift) => (w >>> shift) | (w << (32 - shift))\n\n/**\n * Helper for SHA-224 & SHA-256. See 4.1.2.\n * @param {number} x\n */\nconst sum0to256 = x => rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22)\n\n/**\n * Helper for SHA-224 & SHA-256. See 4.1.2.\n * @param {number} x\n */\nconst sum1to256 = x => rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25)\n\n/**\n * Helper for SHA-224 & SHA-256. See 4.1.2.\n * @param {number} x\n */\nconst sigma0to256 = x => rotr(x, 7) ^ rotr(x, 18) ^ x >>> 3\n\n/**\n * Helper for SHA-224 & SHA-256. See 4.1.2.\n * @param {number} x\n */\nconst sigma1to256 = x => rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10\n\n// @todo don't init these variables globally\n\n/**\n * See 4.2.2: Constant for sha256 & sha224\n * These words represent the first thirty-two bits of the fractional parts of\n * the cube roots of the first sixty-four prime numbers. In hex, these constant words are (from left to\n * right)\n */\nconst K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n])\n\n/**\n * See 5.3.3. Initial hash value.\n *\n * These words were obtained by taking the first thirty-two bits of the fractional parts of the\n * square roots of the first eight prime numbers.\n *\n * @todo shouldn't be a global variable\n */\nconst HINIT = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n])\n\n// time to beat: (large value < 4.35s)\n\nclass Hasher {\n constructor () {\n const buf = new ArrayBuffer(64 + 64 * 4)\n // Init working variables using a single arraybuffer\n this._H = new Uint32Array(buf, 0, 8)\n this._H.set(HINIT)\n // \"Message schedule\" - a working variable\n this._W = new Uint32Array(buf, 64, 64)\n }\n\n _updateHash () {\n const H = this._H\n const W = this._W\n for (let t = 16; t < 64; t++) {\n W[t] = sigma1to256(W[t - 2]) + W[t - 7] + sigma0to256(W[t - 15]) + W[t - 16]\n }\n let a = H[0]\n let b = H[1]\n let c = H[2]\n let d = H[3]\n let e = H[4]\n let f = H[5]\n let g = H[6]\n let h = H[7]\n for (let tt = 0, T1, T2; tt < 64; tt++) {\n T1 = (h + sum1to256(e) + ((e & f) ^ (~e & g)) + K[tt] + W[tt]) >>> 0\n T2 = (sum0to256(a) + ((a & b) ^ (a & c) ^ (b & c))) >>> 0\n h = g\n g = f\n f = e\n e = (d + T1) >>> 0\n d = c\n c = b\n b = a\n a = (T1 + T2) >>> 0\n }\n H[0] += a\n H[1] += b\n H[2] += c\n H[3] += d\n H[4] += e\n H[5] += f\n H[6] += g\n H[7] += h\n }\n\n /**\n * Returns a 32-byte hash.\n *\n * @param {Uint8Array} data\n */\n digest (data) {\n let i = 0\n for (; i + 56 <= data.length;) {\n // write data in big endianess\n let j = 0\n for (; j < 16 && i + 3 < data.length; j++) {\n this._W[j] = data[i++] << 24 | data[i++] << 16 | data[i++] << 8 | data[i++]\n }\n if (i % 64 !== 0) { // there is still room to write partial content and the ending bit.\n this._W.fill(0, j, 16)\n while (i < data.length) {\n this._W[j] |= data[i] << ((3 - (i % 4)) * 8)\n i++\n }\n this._W[j] |= binary.BIT8 << ((3 - (i % 4)) * 8)\n }\n this._updateHash()\n }\n // same check as earlier - the ending bit has been written\n const isPaddedWith1 = i % 64 !== 0\n this._W.fill(0, 0, 16)\n let j = 0\n for (; i < data.length; j++) {\n for (let ci = 3; ci >= 0 && i < data.length; ci--) {\n this._W[j] |= data[i++] << (ci * 8)\n }\n }\n // Write padding of the message. See 5.1.2.\n if (!isPaddedWith1) {\n this._W[j - (i % 4 === 0 ? 0 : 1)] |= binary.BIT8 << ((3 - (i % 4)) * 8)\n }\n // write length of message (size in bits) as 64 bit uint\n // @todo test that this works correctly\n this._W[14] = data.byteLength / binary.BIT30 // same as data.byteLength >>> 30 - but works on floats\n this._W[15] = data.byteLength * 8\n this._updateHash()\n // correct H endianness to use big endiannes and return a Uint8Array\n const dv = new Uint8Array(32)\n for (let i = 0; i < this._H.length; i++) {\n for (let ci = 0; ci < 4; ci++) {\n dv[i * 4 + ci] = this._H[i] >>> (3 - ci) * 8\n }\n }\n return dv\n }\n}\n\n/**\n * Returns a 32-byte hash.\n *\n * @param {Uint8Array} data\n */\nexport const digest = data => new Hasher().digest(data)\n"],"names":["binary.BIT8","binary.BIT30"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAI,GAAG,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,EAAE,GAAG,KAAK,CAAC,EAAC;AAC9D;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,EAAE,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,EAAE,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,EAAC;AAC3D;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,GAAE;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,CAAC,GAAG,IAAI,WAAW,CAAC;AAC1B,EAAE,UAAU,EAAE,UAAU,EAAE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,IAAI,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.node.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.node.cjs deleted file mode 100644 index be0b3e6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.node.cjs +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var node_crypto = require('node:crypto'); - -/** - * @param {Uint8Array} data - */ -const digest = data => { - const hasher = node_crypto.createHash('sha256'); - hasher.update(data); - return hasher.digest() -}; - -exports.digest = digest; -//# sourceMappingURL=sha256.node.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.node.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.node.cjs.map deleted file mode 100644 index 222e563..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sha256.node.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.node.cjs","sources":["../hash/sha256.node.js"],"sourcesContent":["import { createHash } from 'node:crypto'\n\n/**\n * @param {Uint8Array} data\n */\nexport const digest = data => {\n const hasher = createHash('sha256')\n hasher.update(data)\n return hasher.digest()\n}\n"],"names":["createHash"],"mappings":";;;;;;AAEA;AACA;AACA;AACY,MAAC,MAAM,GAAG,IAAI,IAAI;AAC9B,EAAE,MAAM,MAAM,GAAGA,sBAAU,CAAC,QAAQ,EAAC;AACrC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAC;AACrB,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE;AACxB;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort-812cc211.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort-812cc211.cjs deleted file mode 100644 index c842102..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort-812cc211.cjs +++ /dev/null @@ -1,103 +0,0 @@ -'use strict'; - -var math = require('./math-96d5e8c4.cjs'); - -/** - * Efficient sort implementations. - * - * Note: These sort implementations were created to compare different sorting algorithms in JavaScript. - * Don't use them if you don't know what you are doing. Native Array.sort is almost always a better choice. - * - * @module sort - */ - -/** - * @template T - * @param {Array} arr - * @param {number} lo - * @param {number} hi - * @param {function(T,T):number} compare - */ -const _insertionSort = (arr, lo, hi, compare) => { - for (let i = lo + 1; i <= hi; i++) { - for (let j = i; j > 0 && compare(arr[j - 1], arr[j]) > 0; j--) { - const tmp = arr[j]; - arr[j] = arr[j - 1]; - arr[j - 1] = tmp; - } - } -}; - -/** - * @template T - * @param {Array} arr - * @param {function(T,T):number} compare - * @return {void} - */ -const insertionSort = (arr, compare) => { - _insertionSort(arr, 0, arr.length - 1, compare); -}; - -/** - * @template T - * @param {Array} arr - * @param {number} lo - * @param {number} hi - * @param {function(T,T):number} compare - */ -const _quickSort = (arr, lo, hi, compare) => { - if (hi - lo < 42) { - _insertionSort(arr, lo, hi, compare); - } else { - const pivot = arr[math.floor((lo + hi) / 2)]; - let i = lo; - let j = hi; - while (true) { - while (compare(pivot, arr[i]) > 0) { - i++; - } - while (compare(arr[j], pivot) > 0) { - j--; - } - if (i >= j) { - break - } - // swap arr[i] with arr[j] - // and increment i and j - const arri = arr[i]; - arr[i++] = arr[j]; - arr[j--] = arri; - } - _quickSort(arr, lo, j, compare); - _quickSort(arr, j + 1, hi, compare); - } -}; - -/** - * This algorithm beats Array.prototype.sort in Chrome only with arrays with 10 million entries. - * In most cases [].sort will do just fine. Make sure to performance test your use-case before you - * integrate this algorithm. - * - * Note that Chrome's sort is now a stable algorithm (Timsort). Quicksort is not stable. - * - * @template T - * @param {Array} arr - * @param {function(T,T):number} compare - * @return {void} - */ -const quicksort = (arr, compare) => { - _quickSort(arr, 0, arr.length - 1, compare); -}; - -var sort = /*#__PURE__*/Object.freeze({ - __proto__: null, - _insertionSort: _insertionSort, - insertionSort: insertionSort, - quicksort: quicksort -}); - -exports._insertionSort = _insertionSort; -exports.insertionSort = insertionSort; -exports.quicksort = quicksort; -exports.sort = sort; -//# sourceMappingURL=sort-812cc211.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort-812cc211.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort-812cc211.cjs.map deleted file mode 100644 index a747142..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort-812cc211.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort-812cc211.cjs","sources":["../sort.js"],"sourcesContent":["/**\n * Efficient sort implementations.\n *\n * Note: These sort implementations were created to compare different sorting algorithms in JavaScript.\n * Don't use them if you don't know what you are doing. Native Array.sort is almost always a better choice.\n *\n * @module sort\n */\n\nimport * as math from './math.js'\n\n/**\n * @template T\n * @param {Array} arr\n * @param {number} lo\n * @param {number} hi\n * @param {function(T,T):number} compare\n */\nexport const _insertionSort = (arr, lo, hi, compare) => {\n for (let i = lo + 1; i <= hi; i++) {\n for (let j = i; j > 0 && compare(arr[j - 1], arr[j]) > 0; j--) {\n const tmp = arr[j]\n arr[j] = arr[j - 1]\n arr[j - 1] = tmp\n }\n }\n}\n\n/**\n * @template T\n * @param {Array} arr\n * @param {function(T,T):number} compare\n * @return {void}\n */\nexport const insertionSort = (arr, compare) => {\n _insertionSort(arr, 0, arr.length - 1, compare)\n}\n\n/**\n * @template T\n * @param {Array} arr\n * @param {number} lo\n * @param {number} hi\n * @param {function(T,T):number} compare\n */\nconst _quickSort = (arr, lo, hi, compare) => {\n if (hi - lo < 42) {\n _insertionSort(arr, lo, hi, compare)\n } else {\n const pivot = arr[math.floor((lo + hi) / 2)]\n let i = lo\n let j = hi\n while (true) {\n while (compare(pivot, arr[i]) > 0) {\n i++\n }\n while (compare(arr[j], pivot) > 0) {\n j--\n }\n if (i >= j) {\n break\n }\n // swap arr[i] with arr[j]\n // and increment i and j\n const arri = arr[i]\n arr[i++] = arr[j]\n arr[j--] = arri\n }\n _quickSort(arr, lo, j, compare)\n _quickSort(arr, j + 1, hi, compare)\n }\n}\n\n/**\n * This algorithm beats Array.prototype.sort in Chrome only with arrays with 10 million entries.\n * In most cases [].sort will do just fine. Make sure to performance test your use-case before you\n * integrate this algorithm.\n *\n * Note that Chrome's sort is now a stable algorithm (Timsort). Quicksort is not stable.\n *\n * @template T\n * @param {Array} arr\n * @param {function(T,T):number} compare\n * @return {void}\n */\nexport const quicksort = (arr, compare) => {\n _quickSort(arr, 0, arr.length - 1, compare)\n}\n"],"names":["math.floor"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,cAAc,GAAG,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,KAAK;AACxD,EAAE,KAAK,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE;AACrC,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AACnE,MAAM,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC;AACxB,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,EAAC;AACzB,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAG;AAC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AC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,OAAO,EAAC;AACnC,IAAI,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,OAAO,EAAC;AACvC,GAAG;AACH,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK;AAC3C,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,OAAO,EAAC;AAC7C;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.cjs deleted file mode 100644 index e7203ac..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.cjs +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./math-96d5e8c4.cjs'); -var sort = require('./sort-812cc211.cjs'); - - - -exports._insertionSort = sort._insertionSort; -exports.insertionSort = sort.insertionSort; -exports.quicksort = sort.quicksort; -//# sourceMappingURL=sort.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.cjs.map deleted file mode 100644 index d8561ec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.d.ts deleted file mode 100644 index d364b4a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function _insertionSort(arr: Array, lo: number, hi: number, compare: (arg0: T, arg1: T) => number): void; -export function insertionSort(arr: Array, compare: (arg0: T, arg1: T) => number): void; -export function quicksort(arr: Array, compare: (arg0: T, arg1: T) => number): void; -//# sourceMappingURL=sort.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.d.ts.map deleted file mode 100644 index 6a9b413..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../sort.js"],"names":[],"mappings":"AAkBO,+BANM,CAAC,OACH,KAAK,CAAC,CAAC,CAAC,MACR,MAAM,MACN,MAAM,WACN,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,MAAM,QAU9B;AAQM,8BALM,CAAC,OACH,KAAK,CAAC,CAAC,CAAC,WACR,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,MAAM,GACnB,IAAI,CAIf;AAiDM,0BALM,CAAC,OACH,KAAK,CAAC,CAAC,CAAC,WACR,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,MAAM,GACnB,IAAI,CAIf"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.test.d.ts deleted file mode 100644 index 11344b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.test.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function testSortUint8(tc: t.TestCase): void; -export function testSortUint32(tc: t.TestCase): void; -export function testSortUint16(tc: t.TestCase): void; -export function testSortObjectUint32(tc: t.TestCase): void; -export function testListVsArrayPerformance(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=sort.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.test.d.ts.map deleted file mode 100644 index 009caa7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/sort.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.test.d.ts","sourceRoot":"","sources":["../sort.test.js"],"names":[],"mappings":"AAoEO,kCAFI,CAAC,CAAC,QAAQ,QAoBpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,QAoBpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,QAoBpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,QAoBpB;AAKM,+CAFI,CAAC,CAAC,QAAQ,QA4BpB;mBAzLkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics-65f6114b.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics-65f6114b.cjs deleted file mode 100644 index 079af92..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics-65f6114b.cjs +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -var math = require('./math-96d5e8c4.cjs'); - -/** - * Utility helpers for generating statistics. - * - * @module statistics - */ - -/** - * @param {Array} arr Array of values - * @return {number} Returns null if the array is empty - */ -const median = arr => arr.length === 0 ? NaN : (arr.length % 2 === 1 ? arr[(arr.length - 1) / 2] : (arr[math.floor((arr.length - 1) / 2)] + arr[math.ceil((arr.length - 1) / 2)]) / 2); - -/** - * @param {Array} arr - * @return {number} - */ -const average = arr => arr.reduce(math.add, 0) / arr.length; - -var statistics = /*#__PURE__*/Object.freeze({ - __proto__: null, - median: median, - average: average -}); - -exports.average = average; -exports.median = median; -exports.statistics = statistics; -//# sourceMappingURL=statistics-65f6114b.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics-65f6114b.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics-65f6114b.cjs.map deleted file mode 100644 index 34e30e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics-65f6114b.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"statistics-65f6114b.cjs","sources":["../statistics.js"],"sourcesContent":["/**\n * Utility helpers for generating statistics.\n *\n * @module statistics\n */\n\nimport * as math from './math.js'\n\n/**\n * @param {Array} arr Array of values\n * @return {number} Returns null if the array is empty\n */\nexport const median = arr => arr.length === 0 ? NaN : (arr.length % 2 === 1 ? arr[(arr.length - 1) / 2] : (arr[math.floor((arr.length - 1) / 2)] + arr[math.ceil((arr.length - 1) / 2)]) / 2)\n\n/**\n * @param {Array} arr\n * @return {number}\n */\nexport const average = arr => arr.reduce(math.add, 0) / arr.length\n"],"names":["math.floor","math.ceil","math.add"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAACA,UAAU,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,CAACC,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAC;AAC7L;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAACC,QAAQ,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.cjs deleted file mode 100644 index 148b4c7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.cjs +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./math-96d5e8c4.cjs'); -var statistics = require('./statistics-65f6114b.cjs'); - - - -exports.average = statistics.average; -exports.median = statistics.median; -//# sourceMappingURL=statistics.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.cjs.map deleted file mode 100644 index 01cbd80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"statistics.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.d.ts deleted file mode 100644 index 3033ab6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function median(arr: Array): number; -export function average(arr: Array): number; -//# sourceMappingURL=statistics.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.d.ts.map deleted file mode 100644 index e1128ae..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../statistics.js"],"names":[],"mappings":"AAYO,4BAHI,KAAK,CAAC,MAAM,CAAC,GACZ,MAAM,CAE2K;AAMtL,6BAHI,KAAK,CAAC,MAAM,CAAC,GACZ,MAAM,CAEgD"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.test.d.ts deleted file mode 100644 index 22230d6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testMedian(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=statistics.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.test.d.ts.map deleted file mode 100644 index 423a993..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/statistics.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"statistics.test.d.ts","sourceRoot":"","sources":["../statistics.test.js"],"names":[],"mappings":"AAOO,+BAFI,CAAC,CAAC,QAAQ,QASpB;mBAbkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.cjs deleted file mode 100644 index bed6780..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.cjs +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -/* eslint-env browser */ - -/** - * Isomorphic variable storage. - * - * Uses LocalStorage in the browser and falls back to in-memory storage. - * - * @module storage - */ - -/* c8 ignore start */ -class VarStoragePolyfill { - constructor () { - this.map = new Map(); - } - - /** - * @param {string} key - * @param {any} newValue - */ - setItem (key, newValue) { - this.map.set(key, newValue); - } - - /** - * @param {string} key - */ - getItem (key) { - return this.map.get(key) - } -} -/* c8 ignore stop */ - -/** - * @type {any} - */ -let _localStorage = new VarStoragePolyfill(); -let usePolyfill = true; - -/* c8 ignore start */ -try { - // if the same-origin rule is violated, accessing localStorage might thrown an error - if (typeof localStorage !== 'undefined' && localStorage) { - _localStorage = localStorage; - usePolyfill = false; - } -} catch (e) { } -/* c8 ignore stop */ - -/** - * This is basically localStorage in browser, or a polyfill in nodejs - */ -/* c8 ignore next */ -const varStorage = _localStorage; - -/** - * A polyfill for `addEventListener('storage', event => {..})` that does nothing if the polyfill is being used. - * - * @param {function({ key: string, newValue: string, oldValue: string }): void} eventHandler - * @function - */ -/* c8 ignore next */ -const onChange = eventHandler => usePolyfill || addEventListener('storage', /** @type {any} */ (eventHandler)); - -/** - * A polyfill for `removeEventListener('storage', event => {..})` that does nothing if the polyfill is being used. - * - * @param {function({ key: string, newValue: string, oldValue: string }): void} eventHandler - * @function - */ -/* c8 ignore next */ -const offChange = eventHandler => usePolyfill || removeEventListener('storage', /** @type {any} */ (eventHandler)); - -exports.offChange = offChange; -exports.onChange = onChange; -exports.varStorage = varStorage; -//# sourceMappingURL=storage.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.cjs.map deleted file mode 100644 index c2adf94..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"storage.cjs","sources":["../storage.js"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * Isomorphic variable storage.\n *\n * Uses LocalStorage in the browser and falls back to in-memory storage.\n *\n * @module storage\n */\n\n/* c8 ignore start */\nclass VarStoragePolyfill {\n constructor () {\n this.map = new Map()\n }\n\n /**\n * @param {string} key\n * @param {any} newValue\n */\n setItem (key, newValue) {\n this.map.set(key, newValue)\n }\n\n /**\n * @param {string} key\n */\n getItem (key) {\n return this.map.get(key)\n }\n}\n/* c8 ignore stop */\n\n/**\n * @type {any}\n */\nlet _localStorage = new VarStoragePolyfill()\nlet usePolyfill = true\n\n/* c8 ignore start */\ntry {\n // if the same-origin rule is violated, accessing localStorage might thrown an error\n if (typeof localStorage !== 'undefined' && localStorage) {\n _localStorage = localStorage\n usePolyfill = false\n }\n} catch (e) { }\n/* c8 ignore stop */\n\n/**\n * This is basically localStorage in browser, or a polyfill in nodejs\n */\n/* c8 ignore next */\nexport const varStorage = _localStorage\n\n/**\n * A polyfill for `addEventListener('storage', event => {..})` that does nothing if the polyfill is being used.\n *\n * @param {function({ key: string, newValue: string, oldValue: string }): void} eventHandler\n * @function\n */\n/* c8 ignore next */\nexport const onChange = eventHandler => usePolyfill || addEventListener('storage', /** @type {any} */ (eventHandler))\n\n/**\n * A polyfill for `removeEventListener('storage', event => {..})` that does nothing if the polyfill is being used.\n *\n * @param {function({ key: string, newValue: string, oldValue: string }): void} eventHandler\n * @function\n */\n/* c8 ignore next */\nexport const offChange = eventHandler => usePolyfill || removeEventListener('storage', /** @type {any} */ (eventHandler))\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAkB,CAAC;AACzB,EAAE,WAAW,CAAC,GAAG;AACjB,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,GAAE;AACxB,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE;AAC1B,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAC;AAC/B,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE,OAAO,CAAC,CAAC,GAAG,EAAE;AAChB,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;AAC5B,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,GAAG,IAAI,kBAAkB,GAAE;AAC5C,IAAI,WAAW,GAAG,KAAI;AACtB;AACA;AACA,IAAI;AACJ;AACA,EAAE,IAAI,OAAO,YAAY,KAAK,WAAW,IAAI,YAAY,EAAE;AAC3D,IAAI,aAAa,GAAG,aAAY;AAChC,IAAI,WAAW,GAAG,MAAK;AACvB,GAAG;AACH,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,UAAU,GAAG,cAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,YAAY,IAAI,WAAW,IAAI,gBAAgB,CAAC,SAAS,sBAAsB,YAAY,GAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,YAAY,IAAI,WAAW,IAAI,mBAAmB,CAAC,SAAS,sBAAsB,YAAY;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.d.ts deleted file mode 100644 index 6c69f2e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This is basically localStorage in browser, or a polyfill in nodejs - */ -export const varStorage: any; -export function onChange(eventHandler: (arg0: { - key: string; - newValue: string; - oldValue: string; -}) => void): true | void; -export function offChange(eventHandler: (arg0: { - key: string; - newValue: string; - oldValue: string; -}) => void): true | void; -//# sourceMappingURL=storage.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.d.ts.map deleted file mode 100644 index bc215c1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../storage.js"],"names":[],"mappings":"AAiDA;;GAEG;AAEH,6BAAuC;AAShC,uCAJI,CAAS,IAAmD,EAAnD;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,KAAG,IAAI,eAIuC;AAS9G,wCAJI,CAAS,IAAmD,EAAnD;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,KAAG,IAAI,eAI2C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.test.d.ts deleted file mode 100644 index d87bfa9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testStorageModule(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=storage.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.test.d.ts.map deleted file mode 100644 index 65c5328..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/storage.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"storage.test.d.ts","sourceRoot":"","sources":["../storage.test.js"],"names":[],"mappings":"AAMO,sCAFI,CAAC,CAAC,QAAQ,QAapB;mBAhBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string-fddc5f8b.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string-fddc5f8b.cjs deleted file mode 100644 index 121dc20..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string-fddc5f8b.cjs +++ /dev/null @@ -1,209 +0,0 @@ -'use strict'; - -var array = require('./array-78849c95.cjs'); - -/** - * Utility module to work with strings. - * - * @module string - */ - -const fromCharCode = String.fromCharCode; -const fromCodePoint = String.fromCodePoint; - -/** - * The largest utf16 character. - * Corresponds to Uint8Array([255, 255]) or charcodeof(2x2^8) - */ -const MAX_UTF16_CHARACTER = fromCharCode(65535); - -/** - * @param {string} s - * @return {string} - */ -const toLowerCase = s => s.toLowerCase(); - -const trimLeftRegex = /^\s*/g; - -/** - * @param {string} s - * @return {string} - */ -const trimLeft = s => s.replace(trimLeftRegex, ''); - -const fromCamelCaseRegex = /([A-Z])/g; - -/** - * @param {string} s - * @param {string} separator - * @return {string} - */ -const fromCamelCase = (s, separator) => trimLeft(s.replace(fromCamelCaseRegex, match => `${separator}${toLowerCase(match)}`)); - -/** - * Compute the utf8ByteLength - * @param {string} str - * @return {number} - */ -const utf8ByteLength = str => unescape(encodeURIComponent(str)).length; - -/** - * @param {string} str - * @return {Uint8Array} - */ -const _encodeUtf8Polyfill = str => { - const encodedString = unescape(encodeURIComponent(str)); - const len = encodedString.length; - const buf = new Uint8Array(len); - for (let i = 0; i < len; i++) { - buf[i] = /** @type {number} */ (encodedString.codePointAt(i)); - } - return buf -}; - -/* c8 ignore next */ -const utf8TextEncoder = /** @type {TextEncoder} */ (typeof TextEncoder !== 'undefined' ? new TextEncoder() : null); - -/** - * @param {string} str - * @return {Uint8Array} - */ -const _encodeUtf8Native = str => utf8TextEncoder.encode(str); - -/** - * @param {string} str - * @return {Uint8Array} - */ -/* c8 ignore next */ -const encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill; - -/** - * @param {Uint8Array} buf - * @return {string} - */ -const _decodeUtf8Polyfill = buf => { - let remainingLen = buf.length; - let encodedString = ''; - let bufPos = 0; - while (remainingLen > 0) { - const nextLen = remainingLen < 10000 ? remainingLen : 10000; - const bytes = buf.subarray(bufPos, bufPos + nextLen); - bufPos += nextLen; - // Starting with ES5.1 we can supply a generic array-like object as arguments - encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes)); - remainingLen -= nextLen; - } - return decodeURIComponent(escape(encodedString)) -}; - -/* c8 ignore next */ -exports.utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }); - -/* c8 ignore start */ -if (exports.utf8TextDecoder && exports.utf8TextDecoder.decode(new Uint8Array()).length === 1) { - // Safari doesn't handle BOM correctly. - // This fixes a bug in Safari 13.0.5 where it produces a BOM the first time it is called. - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the first call and - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the second call - // Another issue is that from then on no BOM chars are recognized anymore - /* c8 ignore next */ - exports.utf8TextDecoder = null; -} -/* c8 ignore stop */ - -/** - * @param {Uint8Array} buf - * @return {string} - */ -const _decodeUtf8Native = buf => /** @type {TextDecoder} */ (exports.utf8TextDecoder).decode(buf); - -/** - * @param {Uint8Array} buf - * @return {string} - */ -/* c8 ignore next */ -const decodeUtf8 = exports.utf8TextDecoder ? _decodeUtf8Native : _decodeUtf8Polyfill; - -/** - * @param {string} str The initial string - * @param {number} index Starting position - * @param {number} remove Number of characters to remove - * @param {string} insert New content to insert - */ -const splice = (str, index, remove, insert = '') => str.slice(0, index) + insert + str.slice(index + remove); - -/** - * @param {string} source - * @param {number} n - */ -const repeat = (source, n) => array.unfold(n, () => source).join(''); - -/** - * Escape HTML characters &,<,>,'," to their respective HTML entities &,<,>,'," - * - * @param {string} str - */ -const escapeHTML = str => - str.replace(/[&<>'"]/g, r => /** @type {string} */ ({ - '&': '&', - '<': '<', - '>': '>', - "'": ''', - '"': '"' - }[r])); - -/** - * Reverse of `escapeHTML` - * - * @param {string} str - */ -const unescapeHTML = str => - str.replace(/&|<|>|'|"/g, r => /** @type {string} */ ({ - '&': '&', - '<': '<', - '>': '>', - ''': "'", - '"': '"' - }[r])); - -var string = /*#__PURE__*/Object.freeze({ - __proto__: null, - fromCharCode: fromCharCode, - fromCodePoint: fromCodePoint, - MAX_UTF16_CHARACTER: MAX_UTF16_CHARACTER, - trimLeft: trimLeft, - fromCamelCase: fromCamelCase, - utf8ByteLength: utf8ByteLength, - _encodeUtf8Polyfill: _encodeUtf8Polyfill, - utf8TextEncoder: utf8TextEncoder, - _encodeUtf8Native: _encodeUtf8Native, - encodeUtf8: encodeUtf8, - _decodeUtf8Polyfill: _decodeUtf8Polyfill, - get utf8TextDecoder () { return exports.utf8TextDecoder; }, - _decodeUtf8Native: _decodeUtf8Native, - decodeUtf8: decodeUtf8, - splice: splice, - repeat: repeat, - escapeHTML: escapeHTML, - unescapeHTML: unescapeHTML -}); - -exports.MAX_UTF16_CHARACTER = MAX_UTF16_CHARACTER; -exports._decodeUtf8Native = _decodeUtf8Native; -exports._decodeUtf8Polyfill = _decodeUtf8Polyfill; -exports._encodeUtf8Native = _encodeUtf8Native; -exports._encodeUtf8Polyfill = _encodeUtf8Polyfill; -exports.decodeUtf8 = decodeUtf8; -exports.encodeUtf8 = encodeUtf8; -exports.escapeHTML = escapeHTML; -exports.fromCamelCase = fromCamelCase; -exports.fromCharCode = fromCharCode; -exports.fromCodePoint = fromCodePoint; -exports.repeat = repeat; -exports.splice = splice; -exports.string = string; -exports.trimLeft = trimLeft; -exports.unescapeHTML = unescapeHTML; -exports.utf8ByteLength = utf8ByteLength; -exports.utf8TextEncoder = utf8TextEncoder; -//# sourceMappingURL=string-fddc5f8b.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string-fddc5f8b.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string-fddc5f8b.cjs.map deleted file mode 100644 index e2df8f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string-fddc5f8b.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string-fddc5f8b.cjs","sources":["../string.js"],"sourcesContent":["import * as array from './array.js'\n\n/**\n * Utility module to work with strings.\n *\n * @module string\n */\n\nexport const fromCharCode = String.fromCharCode\nexport const fromCodePoint = String.fromCodePoint\n\n/**\n * The largest utf16 character.\n * Corresponds to Uint8Array([255, 255]) or charcodeof(2x2^8)\n */\nexport const MAX_UTF16_CHARACTER = fromCharCode(65535)\n\n/**\n * @param {string} s\n * @return {string}\n */\nconst toLowerCase = s => s.toLowerCase()\n\nconst trimLeftRegex = /^\\s*/g\n\n/**\n * @param {string} s\n * @return {string}\n */\nexport const trimLeft = s => s.replace(trimLeftRegex, '')\n\nconst fromCamelCaseRegex = /([A-Z])/g\n\n/**\n * @param {string} s\n * @param {string} separator\n * @return {string}\n */\nexport const fromCamelCase = (s, separator) => trimLeft(s.replace(fromCamelCaseRegex, match => `${separator}${toLowerCase(match)}`))\n\n/**\n * Compute the utf8ByteLength\n * @param {string} str\n * @return {number}\n */\nexport const utf8ByteLength = str => unescape(encodeURIComponent(str)).length\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\nexport const _encodeUtf8Polyfill = str => {\n const encodedString = unescape(encodeURIComponent(str))\n const len = encodedString.length\n const buf = new Uint8Array(len)\n for (let i = 0; i < len; i++) {\n buf[i] = /** @type {number} */ (encodedString.codePointAt(i))\n }\n return buf\n}\n\n/* c8 ignore next */\nexport const utf8TextEncoder = /** @type {TextEncoder} */ (typeof TextEncoder !== 'undefined' ? new TextEncoder() : null)\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\nexport const _encodeUtf8Native = str => utf8TextEncoder.encode(str)\n\n/**\n * @param {string} str\n * @return {Uint8Array}\n */\n/* c8 ignore next */\nexport const encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\nexport const _decodeUtf8Polyfill = buf => {\n let remainingLen = buf.length\n let encodedString = ''\n let bufPos = 0\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n const bytes = buf.subarray(bufPos, bufPos + nextLen)\n bufPos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes))\n remainingLen -= nextLen\n }\n return decodeURIComponent(escape(encodedString))\n}\n\n/* c8 ignore next */\nexport let utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8', { fatal: true, ignoreBOM: true })\n\n/* c8 ignore start */\nif (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) {\n // Safari doesn't handle BOM correctly.\n // This fixes a bug in Safari 13.0.5 where it produces a BOM the first time it is called.\n // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the first call and\n // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the second call\n // Another issue is that from then on no BOM chars are recognized anymore\n /* c8 ignore next */\n utf8TextDecoder = null\n}\n/* c8 ignore stop */\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\nexport const _decodeUtf8Native = buf => /** @type {TextDecoder} */ (utf8TextDecoder).decode(buf)\n\n/**\n * @param {Uint8Array} buf\n * @return {string}\n */\n/* c8 ignore next */\nexport const decodeUtf8 = utf8TextDecoder ? _decodeUtf8Native : _decodeUtf8Polyfill\n\n/**\n * @param {string} str The initial string\n * @param {number} index Starting position\n * @param {number} remove Number of characters to remove\n * @param {string} insert New content to insert\n */\nexport const splice = (str, index, remove, insert = '') => str.slice(0, index) + insert + str.slice(index + remove)\n\n/**\n * @param {string} source\n * @param {number} n\n */\nexport const repeat = (source, n) => array.unfold(n, () => source).join('')\n\n/**\n * Escape HTML characters &,<,>,',\" to their respective HTML entities &,<,>,',"\n *\n * @param {string} str\n */\nexport const escapeHTML = str =>\n str.replace(/[&<>'\"]/g, r => /** @type {string} */ ({\n '&': '&',\n '<': '<',\n '>': '>',\n \"'\": ''',\n '\"': '"'\n }[r]))\n\n/**\n * Reverse of `escapeHTML`\n *\n * @param {string} str\n */\nexport const unescapeHTML = str =>\n str.replace(/&|<|>|'|"/g, r => /** @type {string} */ ({\n '&': '&',\n '<': '<',\n '>': '>',\n ''': \"'\",\n '"': '\"'\n }[r]))\n"],"names":["utf8TextDecoder","array.unfold"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,MAAM,CAAC,aAAY;AACnC,MAAC,aAAa,GAAG,MAAM,CAAC,cAAa;AACjD;AACA;AACA;AACA;AACA;AACY,MAAC,mBAAmB,GAAG,YAAY,CAAC,KAAK,EAAC;AACtD;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,CAA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AAG,iBAAiB,GAAG,oBAAmB;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,EAAE,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,EAAC;AACnH;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC,KAAKC,YAAY,CAAC,CAAC,EAAE,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,EAAC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,UAAU,GAAG,GAAG;AAC7B,EAAE,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,2BAA2B;AACtD,IAAI,GAAG,EAAE,OAAO;AAChB,IAAI,GAAG,EAAE,MAAM;AACf,IAAI,GAAG,EAAE,MAAM;AACf,IAAI,GAAG,EAAE,OAAO;AAChB,IAAI,GAAG,EAAE,QAAQ;AACjB,GAAG,CAAC,CAAC,CAAC,CAAC,EAAC;AACR;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,GAAG;AAC/B,EAAE,GAAG,CAAC,OAAO,CAAC,+BAA+B,EAAE,CAAC,2BAA2B;AAC3E,IAAI,OAAO,EAAE,GAAG;AAChB,IAAI,MAAM,EAAE,GAAG;AACf,IAAI,MAAM,EAAE,GAAG;AACf,IAAI,OAAO,EAAE,GAAG;AAChB,IAAI,QAAQ,EAAE,GAAG;AACjB,GAAG,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.cjs deleted file mode 100644 index 9f0ad1a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.cjs +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./array-78849c95.cjs'); -var string = require('./string-fddc5f8b.cjs'); -require('./set-5b47859e.cjs'); - - - -exports.MAX_UTF16_CHARACTER = string.MAX_UTF16_CHARACTER; -exports._decodeUtf8Native = string._decodeUtf8Native; -exports._decodeUtf8Polyfill = string._decodeUtf8Polyfill; -exports._encodeUtf8Native = string._encodeUtf8Native; -exports._encodeUtf8Polyfill = string._encodeUtf8Polyfill; -exports.decodeUtf8 = string.decodeUtf8; -exports.encodeUtf8 = string.encodeUtf8; -exports.escapeHTML = string.escapeHTML; -exports.fromCamelCase = string.fromCamelCase; -exports.fromCharCode = string.fromCharCode; -exports.fromCodePoint = string.fromCodePoint; -exports.repeat = string.repeat; -exports.splice = string.splice; -exports.trimLeft = string.trimLeft; -exports.unescapeHTML = string.unescapeHTML; -exports.utf8ByteLength = string.utf8ByteLength; -Object.defineProperty(exports, 'utf8TextDecoder', { - enumerable: true, - get: function () { return string.utf8TextDecoder; } -}); -exports.utf8TextEncoder = string.utf8TextEncoder; -//# sourceMappingURL=string.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.cjs.map deleted file mode 100644 index 150a5bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.d.ts deleted file mode 100644 index caa0bba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Utility module to work with strings. - * - * @module string - */ -export const fromCharCode: (...codes: number[]) => string; -export const fromCodePoint: (...codePoints: number[]) => string; -/** - * The largest utf16 character. - * Corresponds to Uint8Array([255, 255]) or charcodeof(2x2^8) - */ -export const MAX_UTF16_CHARACTER: string; -export function trimLeft(s: string): string; -export function fromCamelCase(s: string, separator: string): string; -export function utf8ByteLength(str: string): number; -export function _encodeUtf8Polyfill(str: string): Uint8Array; -export const utf8TextEncoder: TextEncoder; -export function _encodeUtf8Native(str: string): Uint8Array; -export function encodeUtf8(str: string): Uint8Array; -export function _decodeUtf8Polyfill(buf: Uint8Array): string; -export let utf8TextDecoder: TextDecoder | null; -export function _decodeUtf8Native(buf: Uint8Array): string; -export function decodeUtf8(buf: Uint8Array): string; -export function splice(str: string, index: number, remove: number, insert?: string): string; -export function repeat(source: string, n: number): string; -export function escapeHTML(str: string): string; -export function unescapeHTML(str: string): string; -//# sourceMappingURL=string.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.d.ts.map deleted file mode 100644 index 497012b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../string.js"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,0DAA+C;AAC/C,gEAAiD;AAEjD;;;GAGG;AACH,yCAAsD;AAc/C,4BAHI,MAAM,GACL,MAAM,CAEuC;AASlD,iCAJI,MAAM,aACN,MAAM,GACL,MAAM,CAEkH;AAO7H,oCAHI,MAAM,GACL,MAAM,CAE2D;AAMtE,yCAHI,MAAM,GACL,UAAU,CAAC,WAAW,CAAC,CAUlC;AAGD,8BAA0C,WAAW,CAAoE;AAMlH,uCAHI,MAAM,GACL,UAAU,CAAC,WAAW,CAAC,CAEgC;AAjB5D,gCAHI,MAAM,GACL,UAAU,CAAC,WAAW,CAAC,CAUlC;AAsBM,yCAHI,UAAU,GACT,MAAM,CAejB;AAGD,+CAAmI;AAkB5H,uCAHI,UAAU,GACT,MAAM,CAE8E;AAlCzF,gCAHI,UAAU,GACT,MAAM,CAejB;AAoCM,4BALI,MAAM,SACN,MAAM,UACN,MAAM,WACN,MAAM,UAEkG;AAM5G,+BAHI,MAAM,KACN,MAAM,UAE0D;AAOpE,gCAFI,MAAM,UAST;AAOD,kCAFI,MAAM,UAST"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.test.d.ts deleted file mode 100644 index 73972bd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.test.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function testUtilities(_tc: t.TestCase): void; -export function testLowercaseTransformation(_tc: t.TestCase): void; -export function testRepeatStringUtf8Encoding(tc: t.TestCase): void; -export function testRepeatStringUtf8Decoding(tc: t.TestCase): void; -export function testBomEncodingDecoding(_tc: t.TestCase): void; -export function testSplice(_tc: t.TestCase): void; -export function testHtmlEscape(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=string.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.test.d.ts.map deleted file mode 100644 index da74f05..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/string.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string.test.d.ts","sourceRoot":"","sources":["../string.test.js"],"names":[],"mappings":"AAOO,mCAFI,CAAC,CAAC,QAAQ,QAMpB;AAKM,iDAFI,CAAC,CAAC,QAAQ,QAOpB;AAKM,iDAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,iDAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,6CAFI,CAAC,CAAC,QAAQ,QAYpB;AAKM,gCAFI,CAAC,CAAC,QAAQ,QAMpB;AAKM,oCAFI,CAAC,CAAC,QAAQ,QAYpB;mBA1FkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol-9c439012.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol-9c439012.cjs deleted file mode 100644 index 1f623d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol-9c439012.cjs +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -/** - * Utility module to work with EcmaScript Symbols. - * - * @module symbol - */ - -/** - * Return fresh symbol. - */ -const create = Symbol; - -/** - * @param {any} s - * @return {boolean} - */ -const isSymbol = s => typeof s === 'symbol'; - -var symbol = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create, - isSymbol: isSymbol -}); - -exports.create = create; -exports.isSymbol = isSymbol; -exports.symbol = symbol; -//# sourceMappingURL=symbol-9c439012.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol-9c439012.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol-9c439012.cjs.map deleted file mode 100644 index 60cbe2e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol-9c439012.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"symbol-9c439012.cjs","sources":["../symbol.js"],"sourcesContent":["/**\n * Utility module to work with EcmaScript Symbols.\n *\n * @module symbol\n */\n\n/**\n * Return fresh symbol.\n */\nexport const create = Symbol\n\n/**\n * @param {any} s\n * @return {boolean}\n */\nexport const isSymbol = s => typeof s === 'symbol'\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,OAAM;AAC5B;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.cjs deleted file mode 100644 index ac6f1b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.cjs +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var symbol = require('./symbol-9c439012.cjs'); - - - -exports.create = symbol.create; -exports.isSymbol = symbol.isSymbol; -//# sourceMappingURL=symbol.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.cjs.map deleted file mode 100644 index 5e1c70e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"symbol.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.d.ts deleted file mode 100644 index 3fce473..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Utility module to work with EcmaScript Symbols. - * - * @module symbol - */ -/** - * Return fresh symbol. - */ -export const create: SymbolConstructor; -export function isSymbol(s: any): boolean; -//# sourceMappingURL=symbol.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.d.ts.map deleted file mode 100644 index e63fffe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../symbol.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,uCAA4B;AAMrB,4BAHI,GAAG,GACF,OAAO,CAE+B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.test.d.ts deleted file mode 100644 index 3a29f01..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testBasicSymbolFeatures(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=symbol.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.test.d.ts.map deleted file mode 100644 index 28b5d73..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/symbol.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"symbol.test.d.ts","sourceRoot":"","sources":["../symbol.test.js"],"names":[],"mappings":"AAMO,6CAFI,CAAC,CAAC,QAAQ,QAQpB;mBAZkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.cjs deleted file mode 100644 index fb22e65..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.cjs +++ /dev/null @@ -1,709 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var log = require('lib0/logging'); -var diff = require('./diff-9d236524.cjs'); -var object = require('./object-c0c9435b.cjs'); -var string = require('./string-fddc5f8b.cjs'); -var math = require('./math-96d5e8c4.cjs'); -var random = require('./random.cjs'); -var prng = require('./prng-37d48618.cjs'); -var statistics = require('./statistics-65f6114b.cjs'); -var array = require('./array-78849c95.cjs'); -var environment = require('./environment-1c97264d.cjs'); -var json = require('./json-092190a1.cjs'); -var time = require('./time-d8438852.cjs'); -var promise = require('./promise-cda7b9bb.cjs'); -var performance = require('lib0/performance'); -var equality = require('./equality.cjs'); -require('./function-314580f7.cjs'); -require('./binary-ac8e39e2.cjs'); -require('lib0/webcrypto'); -require('./buffer-3e750729.cjs'); -require('./encoding-1a745c43.cjs'); -require('./number-1fb57bba.cjs'); -require('./decoding-76e75827.cjs'); -require('./error-0c1f634f.cjs'); -require('./set-5b47859e.cjs'); -require('./map-24d263c0.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./metric.cjs'); - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var log__namespace = /*#__PURE__*/_interopNamespace(log); -var performance__namespace = /*#__PURE__*/_interopNamespace(performance); - -/** - * Testing framework with support for generating tests. - * - * ```js - * // test.js template for creating a test executable - * import { runTests } from 'lib0/testing' - * import * as log from 'lib0/logging' - * import * as mod1 from './mod1.test.js' - * import * as mod2 from './mod2.test.js' - - * import { isBrowser, isNode } from 'lib0/environment.js' - * - * if (isBrowser) { - * // optional: if this is ran in the browser, attach a virtual console to the dom - * log.createVConsole(document.body) - * } - * - * runTests({ - * mod1, - * mod2, - * }).then(success => { - * if (isNode) { - * process.exit(success ? 0 : 1) - * } - * }) - * ``` - * - * ```js - * // mod1.test.js - * /** - * * runTests automatically tests all exported functions that start with "test". - * * The name of the function should be in camelCase and is used for the logging output. - * * - * * @ param {t.TestCase} tc - * *\/ - * export const testMyFirstTest = tc => { - * t.compare({ a: 4 }, { a: 4 }, 'objects are equal') - * } - * ``` - * - * Now you can simply run `node test.js` to run your test or run test.js in the browser. - * - * @module testing - */ -const extensive = environment.hasConf('extensive'); - -/* c8 ignore next */ -const envSeed = environment.hasParam('--seed') ? Number.parseInt(environment.getParam('--seed', '0')) : null; - -class TestCase { - /** - * @param {string} moduleName - * @param {string} testName - */ - constructor (moduleName, testName) { - /** - * @type {string} - */ - this.moduleName = moduleName; - /** - * @type {string} - */ - this.testName = testName; - /** - * This type can store custom information related to the TestCase - * - * @type {Map} - */ - this.meta = new Map(); - this._seed = null; - this._prng = null; - } - - resetSeed () { - this._seed = null; - this._prng = null; - } - - /** - * @type {number} - */ - /* c8 ignore next */ - get seed () { - /* c8 ignore else */ - if (this._seed === null) { - /* c8 ignore next */ - this._seed = envSeed === null ? random.uint32() : envSeed; - } - return this._seed - } - - /** - * A PRNG for this test case. Use only this PRNG for randomness to make the test case reproducible. - * - * @type {prng.PRNG} - */ - get prng () { - /* c8 ignore else */ - if (this._prng === null) { - this._prng = prng.create(this.seed); - } - return this._prng - } -} - -const repetitionTime = Number(environment.getParam('--repetition-time', '50')); -/* c8 ignore next */ -const testFilter = environment.hasParam('--filter') ? environment.getParam('--filter', '') : null; - -/* c8 ignore next */ -const testFilterRegExp = testFilter !== null ? new RegExp(testFilter) : /.*/; - -const repeatTestRegex = /^(repeat|repeating)\s/; - -/** - * @param {string} moduleName - * @param {string} name - * @param {function(TestCase):void|Promise} f - * @param {number} i - * @param {number} numberOfTests - */ -const run = async (moduleName, name, f, i, numberOfTests) => { - const uncamelized = string.fromCamelCase(name.slice(4), ' '); - const filtered = !testFilterRegExp.test(`[${i + 1}/${numberOfTests}] ${moduleName}: ${uncamelized}`); - /* c8 ignore next 3 */ - if (filtered) { - return true - } - const tc = new TestCase(moduleName, name); - const repeat = repeatTestRegex.test(uncamelized); - const groupArgs = [log__namespace.GREY, `[${i + 1}/${numberOfTests}] `, log__namespace.PURPLE, `${moduleName}: `, log__namespace.BLUE, uncamelized]; - /* c8 ignore next 5 */ - if (testFilter === null) { - log__namespace.groupCollapsed(...groupArgs); - } else { - log__namespace.group(...groupArgs); - } - const times = []; - const start = performance__namespace.now(); - let lastTime = start; - /** - * @type {any} - */ - let err = null; - performance__namespace.mark(`${name}-start`); - do { - try { - const p = f(tc); - if (promise.isPromise(p)) { - await p; - } - } catch (_err) { - err = _err; - } - const currTime = performance__namespace.now(); - times.push(currTime - lastTime); - lastTime = currTime; - if (repeat && err === null && (lastTime - start) < repetitionTime) { - tc.resetSeed(); - } else { - break - } - } while (err === null && (lastTime - start) < repetitionTime) - performance__namespace.mark(`${name}-end`); - /* c8 ignore next 3 */ - if (err !== null && err.constructor !== SkipError) { - log__namespace.printError(err); - } - performance__namespace.measure(name, `${name}-start`, `${name}-end`); - log__namespace.groupEnd(); - const duration = lastTime - start; - let success = true; - times.sort((a, b) => a - b); - /* c8 ignore next 3 */ - const againMessage = environment.isBrowser - ? ` - ${window.location.host + window.location.pathname}?filter=\\[${i + 1}/${tc._seed === null ? '' : `&seed=${tc._seed}`}` - : `\nrepeat: npm run test -- --filter "\\[${i + 1}/" ${tc._seed === null ? '' : `--seed ${tc._seed}`}`; - const timeInfo = (repeat && err === null) - ? ` - ${times.length} repetitions in ${time.humanizeDuration(duration)} (best: ${time.humanizeDuration(times[0])}, worst: ${time.humanizeDuration(array.last(times))}, median: ${time.humanizeDuration(statistics.median(times))}, average: ${time.humanizeDuration(statistics.average(times))})` - : ` in ${time.humanizeDuration(duration)}`; - if (err !== null) { - /* c8 ignore start */ - if (err.constructor === SkipError) { - log__namespace.print(log__namespace.GREY, log__namespace.BOLD, 'Skipped: ', log__namespace.UNBOLD, uncamelized); - } else { - success = false; - log__namespace.print(log__namespace.RED, log__namespace.BOLD, 'Failure: ', log__namespace.UNBOLD, log__namespace.UNCOLOR, uncamelized, log__namespace.GREY, timeInfo, againMessage); - } - /* c8 ignore stop */ - } else { - log__namespace.print(log__namespace.GREEN, log__namespace.BOLD, 'Success: ', log__namespace.UNBOLD, log__namespace.UNCOLOR, uncamelized, log__namespace.GREY, timeInfo, againMessage); - } - return success -}; - -/** - * Describe what you are currently testing. The message will be logged. - * - * ```js - * export const testMyFirstTest = tc => { - * t.describe('crunching numbers', 'already crunched 4 numbers!') // the optional second argument can describe the state. - * } - * ``` - * - * @param {string} description - * @param {string} info - */ -const describe = (description, info = '') => log__namespace.print(log__namespace.BLUE, description, ' ', log__namespace.GREY, info); - -/** - * Describe the state of the current computation. - * ```js - * export const testMyFirstTest = tc => { - * t.info(already crunched 4 numbers!') // the optional second argument can describe the state. - * } - * ``` - * - * @param {string} info - */ -const info = info => describe('', info); - -const printDom = log__namespace.printDom; - -const printCanvas = log__namespace.printCanvas; - -/** - * Group outputs in a collapsible category. - * - * ```js - * export const testMyFirstTest = tc => { - * t.group('subtest 1', () => { - * t.describe('this message is part of a collapsible section') - * }) - * await t.groupAsync('subtest async 2', async () => { - * await someaction() - * t.describe('this message is part of a collapsible section') - * }) - * } - * ``` - * - * @param {string} description - * @param {function(...any):void} f - */ -const group = (description, f) => { - log__namespace.group(log__namespace.BLUE, description); - try { - f(); - } finally { - log__namespace.groupEnd(); - } -}; - -/** - * Group outputs in a collapsible category. - * - * ```js - * export const testMyFirstTest = async tc => { - * t.group('subtest 1', () => { - * t.describe('this message is part of a collapsible section') - * }) - * await t.groupAsync('subtest async 2', async () => { - * await someaction() - * t.describe('this message is part of a collapsible section') - * }) - * } - * ``` - * - * @param {string} description - * @param {function(...any):Promise} f - */ -const groupAsync = async (description, f) => { - log__namespace.group(log__namespace.BLUE, description); - try { - await f(); - } finally { - log__namespace.groupEnd(); - } -}; - -/** - * Measure the time that it takes to calculate something. - * - * ```js - * export const testMyFirstTest = async tc => { - * t.measureTime('measurement', () => { - * heavyCalculation() - * }) - * await t.groupAsync('async measurement', async () => { - * await heavyAsyncCalculation() - * }) - * } - * ``` - * - * @param {string} message - * @param {function(...any):void} f - * @return {number} Returns a promise that resolves the measured duration to apply f - */ -const measureTime = (message, f) => { - let duration; - const start = performance__namespace.now(); - try { - f(); - } finally { - duration = performance__namespace.now() - start; - log__namespace.print(log__namespace.PURPLE, message, log__namespace.GREY, ` ${time.humanizeDuration(duration)}`); - } - return duration -}; - -/** - * Measure the time that it takes to calculate something. - * - * ```js - * export const testMyFirstTest = async tc => { - * t.measureTimeAsync('measurement', async () => { - * await heavyCalculation() - * }) - * await t.groupAsync('async measurement', async () => { - * await heavyAsyncCalculation() - * }) - * } - * ``` - * - * @param {string} message - * @param {function(...any):Promise} f - * @return {Promise} Returns a promise that resolves the measured duration to apply f - */ -const measureTimeAsync = async (message, f) => { - let duration; - const start = performance__namespace.now(); - try { - await f(); - } finally { - duration = performance__namespace.now() - start; - log__namespace.print(log__namespace.PURPLE, message, log__namespace.GREY, ` ${time.humanizeDuration(duration)}`); - } - return duration -}; - -/** - * @template T - * @param {Array} as - * @param {Array} bs - * @param {string} [m] - * @return {boolean} - */ -const compareArrays = (as, bs, m = 'Arrays match') => { - if (as.length !== bs.length) { - fail(m); - } - for (let i = 0; i < as.length; i++) { - if (as[i] !== bs[i]) { - fail(m); - } - } - return true -}; - -/** - * @param {string} a - * @param {string} b - * @param {string} [m] - * @throws {TestError} Throws if tests fails - */ -const compareStrings = (a, b, m = 'Strings match') => { - if (a !== b) { - const diff$1 = diff.simpleDiffString(a, b); - log__namespace.print(log__namespace.GREY, a.slice(0, diff$1.index), log__namespace.RED, a.slice(diff$1.index, diff$1.remove), log__namespace.GREEN, diff$1.insert, log__namespace.GREY, a.slice(diff$1.index + diff$1.remove)); - fail(m); - } -}; - -/** - * @template K,V - * @param {Object} a - * @param {Object} b - * @param {string} [m] - * @throws {TestError} Throws if test fails - */ -const compareObjects = (a, b, m = 'Objects match') => { object.equalFlat(a, b) || fail(m); }; - -/** - * @param {any} _constructor - * @param {any} a - * @param {any} b - * @param {string} path - * @throws {TestError} - */ -const compareValues = (_constructor, a, b, path) => { - if (a !== b) { - fail(`Values ${json.stringify(a)} and ${json.stringify(b)} don't match (${path})`); - } - return true -}; - -/** - * @param {string?} message - * @param {string} reason - * @param {string} path - * @throws {TestError} - */ -const _failMessage = (message, reason, path) => fail( - message === null - ? `${reason} ${path}` - : `${message} (${reason}) ${path}` -); - -/** - * @param {any} a - * @param {any} b - * @param {string} path - * @param {string?} message - * @param {function(any,any,any,string,any):boolean} customCompare - */ -const _compare = (a, b, path, message, customCompare) => { - // we don't use assert here because we want to test all branches (istanbul errors if one branch is not tested) - if (a == null || b == null) { - return compareValues(null, a, b, path) - } - if (a[equality.EqualityTraitSymbol] != null) { - if (a[equality.EqualityTraitSymbol](b)) { - return true - } else { - _failMessage(message, 'Not equal by equality trait', path); - } - } - if (a.constructor !== b.constructor) { - _failMessage(message, 'Constructors don\'t match', path); - } - let success = true; - switch (a.constructor) { - case ArrayBuffer: - a = new Uint8Array(a); - b = new Uint8Array(b); - // eslint-disable-next-line no-fallthrough - case Uint8Array: { - if (a.byteLength !== b.byteLength) { - _failMessage(message, 'ArrayBuffer lengths match', path); - } - for (let i = 0; success && i < a.length; i++) { - success = success && a[i] === b[i]; - } - break - } - case Set: { - if (a.size !== b.size) { - _failMessage(message, 'Sets have different number of attributes', path); - } - // @ts-ignore - a.forEach(value => { - if (!b.has(value)) { - _failMessage(message, `b.${path} does have ${value}`, path); - } - }); - break - } - case Map: { - if (a.size !== b.size) { - _failMessage(message, 'Maps have different number of attributes', path); - } - // @ts-ignore - a.forEach((value, key) => { - if (!b.has(key)) { - _failMessage(message, `Property ${path}["${key}"] does not exist on second argument`, path); - } - _compare(value, b.get(key), `${path}["${key}"]`, message, customCompare); - }); - break - } - case undefined: // undefined is often set as a constructor for objects - case Object: - if (object.length(a) !== object.length(b)) { - _failMessage(message, 'Objects have a different number of attributes', path); - } - object.forEach(a, (value, key) => { - if (!object.hasProperty(b, key)) { - _failMessage(message, `Property ${path} does not exist on second argument`, path); - } - _compare(value, b[key], `${path}["${key}"]`, message, customCompare); - }); - break - case Array: - if (a.length !== b.length) { - _failMessage(message, 'Arrays have a different number of attributes', path); - } - // @ts-ignore - a.forEach((value, i) => _compare(value, b[i], `${path}[${i}]`, message, customCompare)); - break - /* c8 ignore next 4 */ - default: - if (!customCompare(a.constructor, a, b, path, compareValues)) { - _failMessage(message, `Values ${json.stringify(a)} and ${json.stringify(b)} don't match`, path); - } - } - assert(success, message); - return true -}; - -/** - * @template T - * @param {T} a - * @param {T} b - * @param {string?} [message] - * @param {function(any,T,T,string,any):boolean} [customCompare] - */ -const compare = (a, b, message = null, customCompare = compareValues) => _compare(a, b, 'obj', message, customCompare); - -/** - * @template T - * @param {T} property - * @param {string?} [message] - * @return {asserts property is NonNullable} - * @throws {TestError} - */ -/* c8 ignore next */ -const assert = (property, message = null) => { property || fail(`Assertion failed${message !== null ? `: ${message}` : ''}`); }; - -/** - * @param {function(...any):Promise} f - */ -const promiseRejected = async f => { - try { - await f(); - } catch (err) { - return - } - fail('Expected promise to fail'); -}; - -/** - * @param {function(...any):void} f - * @throws {TestError} - */ -const fails = f => { - try { - f(); - } catch (_err) { - log__namespace.print(log__namespace.GREEN, '⇖ This Error was expected'); - return - } - fail('Expected this to fail'); -}; - -/** - * @param {function(...any):Promise} f - * @throws {TestError} - */ -const failsAsync = async f => { - try { - await f(); - } catch (_err) { - log__namespace.print(log__namespace.GREEN, '⇖ This Error was expected'); - return - } - fail('Expected this to fail'); -}; - -/** - * @param {Object>>} tests - */ -const runTests = async tests => { - /** - * @param {string} testname - */ - const filterTest = testname => testname.startsWith('test') || testname.startsWith('benchmark'); - const numberOfTests = object.map(tests, mod => object.map(mod, (f, fname) => /* c8 ignore next */ f && filterTest(fname) ? 1 : 0).reduce(math.add, 0)).reduce(math.add, 0); - let successfulTests = 0; - let testnumber = 0; - const start = performance__namespace.now(); - for (const modName in tests) { - const mod = tests[modName]; - for (const fname in mod) { - const f = mod[fname]; - /* c8 ignore else */ - if (f && filterTest(fname)) { - const repeatEachTest = 1; - let success = true; - for (let i = 0; success && i < repeatEachTest; i++) { - success = await run(modName, fname, f, testnumber, numberOfTests); - } - testnumber++; - /* c8 ignore else */ - if (success) { - successfulTests++; - } - } - } - } - const end = performance__namespace.now(); - log__namespace.print(''); - const success = successfulTests === numberOfTests; - /* c8 ignore start */ - if (success) { - log__namespace.print(log__namespace.GREEN, log__namespace.BOLD, 'All tests successful!', log__namespace.GREY, log__namespace.UNBOLD, ` in ${time.humanizeDuration(end - start)}`); - log__namespace.printImgBase64(nyanCatImage, 50); - } else { - const failedTests = numberOfTests - successfulTests; - log__namespace.print(log__namespace.RED, log__namespace.BOLD, `> ${failedTests} test${failedTests > 1 ? 's' : ''} failed`); - } - /* c8 ignore stop */ - return success -}; - -class TestError extends Error {} - -/** - * @param {string} reason - * @throws {TestError} - */ -const fail = reason => { - log__namespace.print(log__namespace.RED, log__namespace.BOLD, 'X ', log__namespace.UNBOLD, reason); - throw new TestError('Test Failed') -}; - -class SkipError extends Error {} - -/** - * @param {boolean} cond If true, this tests will be skipped - * @throws {SkipError} - */ -const skip = (cond = true) => { - if (cond) { -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PDBBZvxSWNSbBMOrghEAR0CZl7RSSclJlkiheawaEwnZeibxchplJxGAyOP3IDJaaCQchbVsPxyFiyjnPLKJruccswlV/MyCjW/jHPJOo/Mcxo+pwy0yTarbHIfnL2ioGvvaGExxrzaJ+wCdvT3ccgE9TzE2GOzTDbZZp/NcjVnD5G22ia3vbbccZ99dBp0iw13yWdD/10aF5BERx899CzwhQTxxHMP4hL0R08GlxQEDjiVqGG5GtRMPnnll1eiOTjUXK7G5+CInrnmoXf+eeqWf8655adPzroanqN+eeyUm7665TNMsQlnUCgh/PDCu1JFD/6ZqPzyvhJgEOxHRH8EGaITIf0R7oh+/RGiV3I99ZdbL332l2/f/fVEVH/962qYf7k76ItOxhEzuABkBhbkr//++aeQyf0ADKDzDBKGArbhgG3wQwEL6AcEtmGBBnQgBMPgQAUusIEInKADHwjBCkIQgwfUoAQ7iEALMtAPa5iEfbTQIT0YgTxGKJAMvfSFDhDoHgT4AgE6hBA/+GEQ2AgiNvy84EMfekGI2BhEEf1QAyQuEYhCJGIRjyhEJRaxiUJ8IhKlaEQkWtGHWAyiFqO4RC/UIIUl2s4H9PAlw+lrBPHQQ4UCtDU7vJEgbsijHvfIxz768Y+ADKQgB0lIQGJjDdvZjkBstJ3EHCSRRLLRHQnCiEoSJAKVrOQcCCKGTDIiApTMpBgIMgdPbnIgncxkQTw5yoGUMpOnFEgqLRnKSrZSIK/U5Ag+kLjEDaSXCQGmQHzJpWIasyV3OaYyl8nMZi7nLsl0ZkagKc1qWvOa2JxLNLPJzW6+ZZvevAhdwrkStJCTI2gZ5zknos51shOc7oynPOdJz3ra857hDAgAOw=='; - -exports.production = environment.production; -exports.TestCase = TestCase; -exports.assert = assert; -exports.compare = compare; -exports.compareArrays = compareArrays; -exports.compareObjects = compareObjects; -exports.compareStrings = compareStrings; -exports.describe = describe; -exports.envSeed = envSeed; -exports.extensive = extensive; -exports.fail = fail; -exports.fails = fails; -exports.failsAsync = failsAsync; -exports.group = group; -exports.groupAsync = groupAsync; -exports.info = info; -exports.measureTime = measureTime; -exports.measureTimeAsync = measureTimeAsync; -exports.printCanvas = printCanvas; -exports.printDom = printDom; -exports.promiseRejected = promiseRejected; -exports.repetitionTime = repetitionTime; -exports.run = run; -exports.runTests = runTests; -exports.skip = skip; -//# sourceMappingURL=testing.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.cjs.map deleted file mode 100644 index 056dd32..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"testing.cjs","sources":["../testing.js"],"sourcesContent":["/**\n * Testing framework with support for generating tests.\n *\n * ```js\n * // test.js template for creating a test executable\n * import { runTests } from 'lib0/testing'\n * import * as log from 'lib0/logging'\n * import * as mod1 from './mod1.test.js'\n * import * as mod2 from './mod2.test.js'\n\n * import { isBrowser, isNode } from 'lib0/environment.js'\n *\n * if (isBrowser) {\n * // optional: if this is ran in the browser, attach a virtual console to the dom\n * log.createVConsole(document.body)\n * }\n *\n * runTests({\n * mod1,\n * mod2,\n * }).then(success => {\n * if (isNode) {\n * process.exit(success ? 0 : 1)\n * }\n * })\n * ```\n *\n * ```js\n * // mod1.test.js\n * /**\n * * runTests automatically tests all exported functions that start with \"test\".\n * * The name of the function should be in camelCase and is used for the logging output.\n * *\n * * @ param {t.TestCase} tc\n * *\\/\n * export const testMyFirstTest = tc => {\n * t.compare({ a: 4 }, { a: 4 }, 'objects are equal')\n * }\n * ```\n *\n * Now you can simply run `node test.js` to run your test or run test.js in the browser.\n *\n * @module testing\n */\n\nimport * as log from 'lib0/logging'\nimport { simpleDiffString } from './diff.js'\nimport * as object from './object.js'\nimport * as string from './string.js'\nimport * as math from './math.js'\nimport * as random from './random.js'\nimport * as prng from './prng.js'\nimport * as statistics from './statistics.js'\nimport * as array from './array.js'\nimport * as env from './environment.js'\nimport * as json from './json.js'\nimport * as time from './time.js'\nimport * as promise from './promise.js'\nimport * as performance from 'lib0/performance'\nimport * as equalityTrait from './trait/equality.js'\n\nexport { production } from './environment.js'\nexport const extensive = env.hasConf('extensive')\n\n/* c8 ignore next */\nexport const envSeed = env.hasParam('--seed') ? Number.parseInt(env.getParam('--seed', '0')) : null\n\nexport class TestCase {\n /**\n * @param {string} moduleName\n * @param {string} testName\n */\n constructor (moduleName, testName) {\n /**\n * @type {string}\n */\n this.moduleName = moduleName\n /**\n * @type {string}\n */\n this.testName = testName\n /**\n * This type can store custom information related to the TestCase\n *\n * @type {Map}\n */\n this.meta = new Map()\n this._seed = null\n this._prng = null\n }\n\n resetSeed () {\n this._seed = null\n this._prng = null\n }\n\n /**\n * @type {number}\n */\n /* c8 ignore next */\n get seed () {\n /* c8 ignore else */\n if (this._seed === null) {\n /* c8 ignore next */\n this._seed = envSeed === null ? random.uint32() : envSeed\n }\n return this._seed\n }\n\n /**\n * A PRNG for this test case. Use only this PRNG for randomness to make the test case reproducible.\n *\n * @type {prng.PRNG}\n */\n get prng () {\n /* c8 ignore else */\n if (this._prng === null) {\n this._prng = prng.create(this.seed)\n }\n return this._prng\n }\n}\n\nexport const repetitionTime = Number(env.getParam('--repetition-time', '50'))\n/* c8 ignore next */\nconst testFilter = env.hasParam('--filter') ? env.getParam('--filter', '') : null\n\n/* c8 ignore next */\nconst testFilterRegExp = testFilter !== null ? new RegExp(testFilter) : /.*/\n\nconst repeatTestRegex = /^(repeat|repeating)\\s/\n\n/**\n * @param {string} moduleName\n * @param {string} name\n * @param {function(TestCase):void|Promise} f\n * @param {number} i\n * @param {number} numberOfTests\n */\nexport const run = async (moduleName, name, f, i, numberOfTests) => {\n const uncamelized = string.fromCamelCase(name.slice(4), ' ')\n const filtered = !testFilterRegExp.test(`[${i + 1}/${numberOfTests}] ${moduleName}: ${uncamelized}`)\n /* c8 ignore next 3 */\n if (filtered) {\n return true\n }\n const tc = new TestCase(moduleName, name)\n const repeat = repeatTestRegex.test(uncamelized)\n const groupArgs = [log.GREY, `[${i + 1}/${numberOfTests}] `, log.PURPLE, `${moduleName}: `, log.BLUE, uncamelized]\n /* c8 ignore next 5 */\n if (testFilter === null) {\n log.groupCollapsed(...groupArgs)\n } else {\n log.group(...groupArgs)\n }\n const times = []\n const start = performance.now()\n let lastTime = start\n /**\n * @type {any}\n */\n let err = null\n performance.mark(`${name}-start`)\n do {\n try {\n const p = f(tc)\n if (promise.isPromise(p)) {\n await p\n }\n } catch (_err) {\n err = _err\n }\n const currTime = performance.now()\n times.push(currTime - lastTime)\n lastTime = currTime\n if (repeat && err === null && (lastTime - start) < repetitionTime) {\n tc.resetSeed()\n } else {\n break\n }\n } while (err === null && (lastTime - start) < repetitionTime)\n performance.mark(`${name}-end`)\n /* c8 ignore next 3 */\n if (err !== null && err.constructor !== SkipError) {\n log.printError(err)\n }\n performance.measure(name, `${name}-start`, `${name}-end`)\n log.groupEnd()\n const duration = lastTime - start\n let success = true\n times.sort((a, b) => a - b)\n /* c8 ignore next 3 */\n const againMessage = env.isBrowser\n ? ` - ${window.location.host + window.location.pathname}?filter=\\\\[${i + 1}/${tc._seed === null ? '' : `&seed=${tc._seed}`}`\n : `\\nrepeat: npm run test -- --filter \"\\\\[${i + 1}/\" ${tc._seed === null ? '' : `--seed ${tc._seed}`}`\n const timeInfo = (repeat && err === null)\n ? ` - ${times.length} repetitions in ${time.humanizeDuration(duration)} (best: ${time.humanizeDuration(times[0])}, worst: ${time.humanizeDuration(array.last(times))}, median: ${time.humanizeDuration(statistics.median(times))}, average: ${time.humanizeDuration(statistics.average(times))})`\n : ` in ${time.humanizeDuration(duration)}`\n if (err !== null) {\n /* c8 ignore start */\n if (err.constructor === SkipError) {\n log.print(log.GREY, log.BOLD, 'Skipped: ', log.UNBOLD, uncamelized)\n } else {\n success = false\n log.print(log.RED, log.BOLD, 'Failure: ', log.UNBOLD, log.UNCOLOR, uncamelized, log.GREY, timeInfo, againMessage)\n }\n /* c8 ignore stop */\n } else {\n log.print(log.GREEN, log.BOLD, 'Success: ', log.UNBOLD, log.UNCOLOR, uncamelized, log.GREY, timeInfo, againMessage)\n }\n return success\n}\n\n/**\n * Describe what you are currently testing. The message will be logged.\n *\n * ```js\n * export const testMyFirstTest = tc => {\n * t.describe('crunching numbers', 'already crunched 4 numbers!') // the optional second argument can describe the state.\n * }\n * ```\n *\n * @param {string} description\n * @param {string} info\n */\nexport const describe = (description, info = '') => log.print(log.BLUE, description, ' ', log.GREY, info)\n\n/**\n * Describe the state of the current computation.\n * ```js\n * export const testMyFirstTest = tc => {\n * t.info(already crunched 4 numbers!') // the optional second argument can describe the state.\n * }\n * ```\n *\n * @param {string} info\n */\nexport const info = info => describe('', info)\n\nexport const printDom = log.printDom\n\nexport const printCanvas = log.printCanvas\n\n/**\n * Group outputs in a collapsible category.\n *\n * ```js\n * export const testMyFirstTest = tc => {\n * t.group('subtest 1', () => {\n * t.describe('this message is part of a collapsible section')\n * })\n * await t.groupAsync('subtest async 2', async () => {\n * await someaction()\n * t.describe('this message is part of a collapsible section')\n * })\n * }\n * ```\n *\n * @param {string} description\n * @param {function(...any):void} f\n */\nexport const group = (description, f) => {\n log.group(log.BLUE, description)\n try {\n f()\n } finally {\n log.groupEnd()\n }\n}\n\n/**\n * Group outputs in a collapsible category.\n *\n * ```js\n * export const testMyFirstTest = async tc => {\n * t.group('subtest 1', () => {\n * t.describe('this message is part of a collapsible section')\n * })\n * await t.groupAsync('subtest async 2', async () => {\n * await someaction()\n * t.describe('this message is part of a collapsible section')\n * })\n * }\n * ```\n *\n * @param {string} description\n * @param {function(...any):Promise} f\n */\nexport const groupAsync = async (description, f) => {\n log.group(log.BLUE, description)\n try {\n await f()\n } finally {\n log.groupEnd()\n }\n}\n\n/**\n * Measure the time that it takes to calculate something.\n *\n * ```js\n * export const testMyFirstTest = async tc => {\n * t.measureTime('measurement', () => {\n * heavyCalculation()\n * })\n * await t.groupAsync('async measurement', async () => {\n * await heavyAsyncCalculation()\n * })\n * }\n * ```\n *\n * @param {string} message\n * @param {function(...any):void} f\n * @return {number} Returns a promise that resolves the measured duration to apply f\n */\nexport const measureTime = (message, f) => {\n let duration\n const start = performance.now()\n try {\n f()\n } finally {\n duration = performance.now() - start\n log.print(log.PURPLE, message, log.GREY, ` ${time.humanizeDuration(duration)}`)\n }\n return duration\n}\n\n/**\n * Measure the time that it takes to calculate something.\n *\n * ```js\n * export const testMyFirstTest = async tc => {\n * t.measureTimeAsync('measurement', async () => {\n * await heavyCalculation()\n * })\n * await t.groupAsync('async measurement', async () => {\n * await heavyAsyncCalculation()\n * })\n * }\n * ```\n *\n * @param {string} message\n * @param {function(...any):Promise} f\n * @return {Promise} Returns a promise that resolves the measured duration to apply f\n */\nexport const measureTimeAsync = async (message, f) => {\n let duration\n const start = performance.now()\n try {\n await f()\n } finally {\n duration = performance.now() - start\n log.print(log.PURPLE, message, log.GREY, ` ${time.humanizeDuration(duration)}`)\n }\n return duration\n}\n\n/**\n * @template T\n * @param {Array} as\n * @param {Array} bs\n * @param {string} [m]\n * @return {boolean}\n */\nexport const compareArrays = (as, bs, m = 'Arrays match') => {\n if (as.length !== bs.length) {\n fail(m)\n }\n for (let i = 0; i < as.length; i++) {\n if (as[i] !== bs[i]) {\n fail(m)\n }\n }\n return true\n}\n\n/**\n * @param {string} a\n * @param {string} b\n * @param {string} [m]\n * @throws {TestError} Throws if tests fails\n */\nexport const compareStrings = (a, b, m = 'Strings match') => {\n if (a !== b) {\n const diff = simpleDiffString(a, b)\n log.print(log.GREY, a.slice(0, diff.index), log.RED, a.slice(diff.index, diff.remove), log.GREEN, diff.insert, log.GREY, a.slice(diff.index + diff.remove))\n fail(m)\n }\n}\n\n/**\n * @template K,V\n * @param {Object} a\n * @param {Object} b\n * @param {string} [m]\n * @throws {TestError} Throws if test fails\n */\nexport const compareObjects = (a, b, m = 'Objects match') => { object.equalFlat(a, b) || fail(m) }\n\n/**\n * @param {any} _constructor\n * @param {any} a\n * @param {any} b\n * @param {string} path\n * @throws {TestError}\n */\nconst compareValues = (_constructor, a, b, path) => {\n if (a !== b) {\n fail(`Values ${json.stringify(a)} and ${json.stringify(b)} don't match (${path})`)\n }\n return true\n}\n\n/**\n * @param {string?} message\n * @param {string} reason\n * @param {string} path\n * @throws {TestError}\n */\nconst _failMessage = (message, reason, path) => fail(\n message === null\n ? `${reason} ${path}`\n : `${message} (${reason}) ${path}`\n)\n\n/**\n * @param {any} a\n * @param {any} b\n * @param {string} path\n * @param {string?} message\n * @param {function(any,any,any,string,any):boolean} customCompare\n */\nconst _compare = (a, b, path, message, customCompare) => {\n // we don't use assert here because we want to test all branches (istanbul errors if one branch is not tested)\n if (a == null || b == null) {\n return compareValues(null, a, b, path)\n }\n if (a[equalityTrait.EqualityTraitSymbol] != null) {\n if (a[equalityTrait.EqualityTraitSymbol](b)) {\n return true\n } else {\n _failMessage(message, 'Not equal by equality trait', path)\n }\n }\n if (a.constructor !== b.constructor) {\n _failMessage(message, 'Constructors don\\'t match', path)\n }\n let success = true\n switch (a.constructor) {\n case ArrayBuffer:\n a = new Uint8Array(a)\n b = new Uint8Array(b)\n // eslint-disable-next-line no-fallthrough\n case Uint8Array: {\n if (a.byteLength !== b.byteLength) {\n _failMessage(message, 'ArrayBuffer lengths match', path)\n }\n for (let i = 0; success && i < a.length; i++) {\n success = success && a[i] === b[i]\n }\n break\n }\n case Set: {\n if (a.size !== b.size) {\n _failMessage(message, 'Sets have different number of attributes', path)\n }\n // @ts-ignore\n a.forEach(value => {\n if (!b.has(value)) {\n _failMessage(message, `b.${path} does have ${value}`, path)\n }\n })\n break\n }\n case Map: {\n if (a.size !== b.size) {\n _failMessage(message, 'Maps have different number of attributes', path)\n }\n // @ts-ignore\n a.forEach((value, key) => {\n if (!b.has(key)) {\n _failMessage(message, `Property ${path}[\"${key}\"] does not exist on second argument`, path)\n }\n _compare(value, b.get(key), `${path}[\"${key}\"]`, message, customCompare)\n })\n break\n }\n case undefined: // undefined is often set as a constructor for objects\n case Object:\n if (object.length(a) !== object.length(b)) {\n _failMessage(message, 'Objects have a different number of attributes', path)\n }\n object.forEach(a, (value, key) => {\n if (!object.hasProperty(b, key)) {\n _failMessage(message, `Property ${path} does not exist on second argument`, path)\n }\n _compare(value, b[key], `${path}[\"${key}\"]`, message, customCompare)\n })\n break\n case Array:\n if (a.length !== b.length) {\n _failMessage(message, 'Arrays have a different number of attributes', path)\n }\n // @ts-ignore\n a.forEach((value, i) => _compare(value, b[i], `${path}[${i}]`, message, customCompare))\n break\n /* c8 ignore next 4 */\n default:\n if (!customCompare(a.constructor, a, b, path, compareValues)) {\n _failMessage(message, `Values ${json.stringify(a)} and ${json.stringify(b)} don't match`, path)\n }\n }\n assert(success, message)\n return true\n}\n\n/**\n * @template T\n * @param {T} a\n * @param {T} b\n * @param {string?} [message]\n * @param {function(any,T,T,string,any):boolean} [customCompare]\n */\nexport const compare = (a, b, message = null, customCompare = compareValues) => _compare(a, b, 'obj', message, customCompare)\n\n/**\n * @template T\n * @param {T} property\n * @param {string?} [message]\n * @return {asserts property is NonNullable}\n * @throws {TestError}\n */\n/* c8 ignore next */\nexport const assert = (property, message = null) => { property || fail(`Assertion failed${message !== null ? `: ${message}` : ''}`) }\n\n/**\n * @param {function(...any):Promise} f\n */\nexport const promiseRejected = async f => {\n try {\n await f()\n } catch (err) {\n return\n }\n fail('Expected promise to fail')\n}\n\n/**\n * @param {function(...any):void} f\n * @throws {TestError}\n */\nexport const fails = f => {\n try {\n f()\n } catch (_err) {\n log.print(log.GREEN, '⇖ This Error was expected')\n return\n }\n fail('Expected this to fail')\n}\n\n/**\n * @param {function(...any):Promise} f\n * @throws {TestError}\n */\nexport const failsAsync = async f => {\n try {\n await f()\n } catch (_err) {\n log.print(log.GREEN, '⇖ This Error was expected')\n return\n }\n fail('Expected this to fail')\n}\n\n/**\n * @param {Object>>} tests\n */\nexport const runTests = async tests => {\n /**\n * @param {string} testname\n */\n const filterTest = testname => testname.startsWith('test') || testname.startsWith('benchmark')\n const numberOfTests = object.map(tests, mod => object.map(mod, (f, fname) => /* c8 ignore next */ f && filterTest(fname) ? 1 : 0).reduce(math.add, 0)).reduce(math.add, 0)\n let successfulTests = 0\n let testnumber = 0\n const start = performance.now()\n for (const modName in tests) {\n const mod = tests[modName]\n for (const fname in mod) {\n const f = mod[fname]\n /* c8 ignore else */\n if (f && filterTest(fname)) {\n const repeatEachTest = 1\n let success = true\n for (let i = 0; success && i < repeatEachTest; i++) {\n success = await run(modName, fname, f, testnumber, numberOfTests)\n }\n testnumber++\n /* c8 ignore else */\n if (success) {\n successfulTests++\n }\n }\n }\n }\n const end = performance.now()\n log.print('')\n const success = successfulTests === numberOfTests\n /* c8 ignore start */\n if (success) {\n log.print(log.GREEN, log.BOLD, 'All tests successful!', log.GREY, log.UNBOLD, ` in ${time.humanizeDuration(end - start)}`)\n log.printImgBase64(nyanCatImage, 50)\n } else {\n const failedTests = numberOfTests - successfulTests\n log.print(log.RED, log.BOLD, `> ${failedTests} test${failedTests > 1 ? 's' : ''} failed`)\n }\n /* c8 ignore stop */\n return success\n}\n\nclass TestError extends Error {}\n\n/**\n * @param {string} reason\n * @throws {TestError}\n */\nexport const fail = reason => {\n log.print(log.RED, log.BOLD, 'X ', log.UNBOLD, reason)\n throw new TestError('Test Failed')\n}\n\nclass SkipError extends Error {}\n\n/**\n * @param {boolean} cond If true, this tests will be skipped\n * @throws {SkipError}\n */\nexport const skip = (cond = true) => {\n if (cond) {\n throw new SkipError('skipping..')\n }\n}\n\n// eslint-disable-next-line\nconst nyanCatImage = 'R0lGODlhjABMAPcAAMiSE0xMTEzMzUKJzjQ0NFsoKPc7//FM/9mH/z9x0HIiIoKCgmBHN+frGSkZLdDQ0LCwsDk71g0KCUzDdrQQEOFz/8yYdelmBdTiHFxcXDU2erR/mLrTHCgoKK5szBQUFNgSCTk6ymfpCB9VZS2Bl+cGBt2N8kWm0uDcGXhZRUvGq94NCFPhDiwsLGVlZTgqIPMDA1g3aEzS5D6xA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PzroanqN+eeyUm7665TNMsQlnUCgh/PDCu1JFD/6ZqPzyvhJgEOxHRH8EGaITIf0R7oh+/RGiV3I99ZdbL332l2/f/fVEVH/962qYf7k76ItOxhEzuABkBhbkr//++aeQyf0ADKDzDBKGArbhgG3wQwEL6AcEtmGBBnQgBMPgQAUusIEInKADHwjBCkIQgwfUoAQ7iEALMtAPa5iEfbTQIT0YgTxGKJAMvfSFDhDoHgT4AgE6hBA/+GEQ2AgiNvy84EMfekGI2BhEEf1QAyQuEYhCJGIRjyhEJRaxiUJ8IhKlaEQkWtGHWAyiFqO4RC/UIIUl2s4H9PAlw+lrBPHQQ4UCtDU7vJEgbsijHvfIxz768Y+ADKQgB0lIQGJjDdvZjkBstJ3EHCSRRLLRHQnCiEoSJAKVrOQcCCKGTDIiApTMpBgIMgdPbnIgncxkQTw5yoGUMpOnFEgqLRnKSrZSIK/U5Ag+kLjEDaSXCQGmQHzJpWIasyV3OaYyl8nMZi7nLsl0ZkagKc1qWvOa2JxLNLPJzW6+ZZvevAhdwrkStJCTI2gZ5zknos51shOc7oynPOdJz3ra857hDAgAOw=='\n"],"names":["env.hasConf","env.hasParam","env.getParam","random.uint32","prng.create","string.fromCamelCase","log","performance","promise.isPromise","env.isBrowser","time.humanizeDuration","array.last","statistics.median","statistics.average","diff","simpleDiffString","object.equalFlat","json.stringify","equalityTrait.EqualityTraitSymbol","object.length","object.forEach","object.hasProperty","object.map","math.add"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAmBY,MAAC,SAAS,GAAGA,mBAAW,CAAC,WAAW,EAAC;AACjD;AAC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AACvD,IAAIA,cAAG,CAAC,KAAK,CAACA,cAAG,CAAC,GAAG,EAAEA,cAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,EAAC;AAC7F,GAAG;AACH;AACA,EAAE,OAAO,OAAO;AAChB,EAAC;AACD;AACA,MAAM,SAAS,SAAS,KAAK,CAAC,EAAE;AAChC;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,MAAM,IAAI;AAC9B,EAAEA,cAAG,CAAC,KAAK,CAACA,cAAG,CAAC,GAAG,EAAEA,cAAG,CAAC,IAAI,EAAE,IAAI,EAAEA,cAAG,CAAC,MAAM,EAAE,MAAM,EAAC;AACxD,EAAE,MAAM,IAAI,SAAS,CAAC,aAAa,CAAC;AACpC,EAAC;AACD;AACA,MAAM,SAAS,SAAS,KAAK,CAAC,EAAE;AAChC;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,IAAI,GAAG,IAAI,KAAK;AACrC,EAAE,IAAI,IAAI,EAAE;AACZ,IAAI,MAAM,IAAI,SAAS,CAAC,YAAY,CAAC;AACrC,GAAG;AACH,EAAC;AACD;AACA;AACA,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.d.ts deleted file mode 100644 index 2ab045a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -export { production } from "./environment.js"; -export const extensive: boolean; -export const envSeed: number | null; -export class TestCase { - /** - * @param {string} moduleName - * @param {string} testName - */ - constructor(moduleName: string, testName: string); - /** - * @type {string} - */ - moduleName: string; - /** - * @type {string} - */ - testName: string; - /** - * This type can store custom information related to the TestCase - * - * @type {Map} - */ - meta: Map; - _seed: number | null; - _prng: prng.PRNG | null; - resetSeed(): void; - /** - * @type {number} - */ - get seed(): number; - /** - * A PRNG for this test case. Use only this PRNG for randomness to make the test case reproducible. - * - * @type {prng.PRNG} - */ - get prng(): prng.PRNG; -} -export const repetitionTime: number; -export function run(moduleName: string, name: string, f: (arg0: TestCase) => void | Promise, i: number, numberOfTests: number): Promise; -export function describe(description: string, info?: string): void; -export function info(info: string): void; -export const printDom: (_createNode: () => Node) => void; -export const printCanvas: (canvas: HTMLCanvasElement, height: number) => void; -export function group(description: string, f: (...args: any[]) => void): void; -export function groupAsync(description: string, f: (...args: any[]) => Promise): Promise; -export function measureTime(message: string, f: (...args: any[]) => void): number; -export function measureTimeAsync(message: string, f: (...args: any[]) => Promise): Promise; -export function compareArrays(as: Array, bs: Array, m?: string): boolean; -export function compareStrings(a: string, b: string, m?: string): void; -export function compareObjects(a: any, b: any, m?: string): void; -export function compare(a: T, b: T, message?: string | null, customCompare?: (arg0: any, arg1: T, arg2: T, arg3: string, arg4: any) => boolean): boolean; -export function assert(property: T, message?: string | null): asserts property is NonNullable; -export function promiseRejected(f: (...args: any[]) => Promise): Promise; -export function fails(f: (...args: any[]) => void): void; -export function failsAsync(f: (...args: any[]) => Promise): Promise; -export function runTests(tests: { - [x: string]: { - [x: string]: (arg0: TestCase) => void | Promise; - }; -}): Promise; -export function fail(reason: string): never; -export function skip(cond?: boolean): void; -import * as prng from './prng.js'; -//# sourceMappingURL=testing.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.d.ts.map deleted file mode 100644 index 556755c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.d.ts.map +++ /dev/null @@ -1 +0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AC,CAAC,sBAGL,MAAM,QAGiF;AA8H3F,wBANM,CAAC,KACH,CAAC,KACD,CAAC,YACD,MAAM,OAAC,kBACP,CAAS,IAAG,EAAH,GAAG,EAAC,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,EAAC,IAAM,EAAN,MAAM,EAAC,IAAG,EAAH,GAAG,KAAE,OAAO,WAE8E;AAUtH,uBAPM,CAAC,YACH,CAAC,YACD,MAAM,OAAC,GACN,QAAQ,QAAQ,IAAI,WAAW,CAAC,CAAC,CAAC,CAIuF;AAK9H,mCAFI,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,OAAO,CAAC,GAAG,CAAC,iBASvC;AAMM,yBAHI,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,IAAI,QAW/B;AAMM,8BAHI,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,OAAO,CAAC,GAAG,CAAC,iBAWvC;AAKM;;4BAF2C,QAAQ,KAAE,IAAI,GAAC,OAAO,CAAC,GAAG,CAAC;;qBA2C5E;AAQM,6BAHI,MAAM,SAMhB;AAQM,4BAHI,OAAO,QAOjB;sBA/kBqB,WAAW"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.test.d.ts deleted file mode 100644 index 9007956..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.test.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function nottestingNotTested(): void; -export function testAssertTyping(): void; -export function testComparing(_tc: t.TestCase): void; -export function testFailing(): Promise; -export function testSkipping(): void; -export function testAsync(): Promise; -export function testRepeatRepetition(): void; -import * as t from './testing.js'; -//# sourceMappingURL=testing.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.test.d.ts.map deleted file mode 100644 index 0d151e2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/testing.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"testing.test.d.ts","sourceRoot":"","sources":["../testing.test.js"],"names":[],"mappings":"AAQO,4CAEN;AAEM,yCAMN;AAKM,mCAFI,CAAC,CAAC,QAAQ,QAqGpB;AAEM,6CAcN;AAEM,qCAMN;AAEM,2CAIN;AAEM,6CAON;mBAjKkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time-d8438852.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time-d8438852.cjs deleted file mode 100644 index 7ad173a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time-d8438852.cjs +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -var metric = require('./metric.cjs'); -var math = require('./math-96d5e8c4.cjs'); - -/** - * Utility module to work with time. - * - * @module time - */ - -/** - * Return current time. - * - * @return {Date} - */ -const getDate = () => new Date(); - -/** - * Return current unix time. - * - * @return {number} - */ -const getUnixTime = Date.now; - -/** - * Transform time (in ms) to a human readable format. E.g. 1100 => 1.1s. 60s => 1min. .001 => 10μs. - * - * @param {number} d duration in milliseconds - * @return {string} humanized approximation of time - */ -const humanizeDuration = d => { - if (d < 60000) { - const p = metric.prefix(d, -1); - return math.round(p.n * 100) / 100 + p.prefix + 's' - } - d = math.floor(d / 1000); - const seconds = d % 60; - const minutes = math.floor(d / 60) % 60; - const hours = math.floor(d / 3600) % 24; - const days = math.floor(d / 86400); - if (days > 0) { - return days + 'd' + ((hours > 0 || minutes > 30) ? ' ' + (minutes > 30 ? hours + 1 : hours) + 'h' : '') - } - if (hours > 0) { - /* c8 ignore next */ - return hours + 'h' + ((minutes > 0 || seconds > 30) ? ' ' + (seconds > 30 ? minutes + 1 : minutes) + 'min' : '') - } - return minutes + 'min' + (seconds > 0 ? ' ' + seconds + 's' : '') -}; - -var time = /*#__PURE__*/Object.freeze({ - __proto__: null, - getDate: getDate, - getUnixTime: getUnixTime, - humanizeDuration: humanizeDuration -}); - -exports.getDate = getDate; -exports.getUnixTime = getUnixTime; -exports.humanizeDuration = humanizeDuration; -exports.time = time; -//# sourceMappingURL=time-d8438852.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time-d8438852.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time-d8438852.cjs.map deleted file mode 100644 index 3709d50..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time-d8438852.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"time-d8438852.cjs","sources":["../time.js"],"sourcesContent":["/**\n * Utility module to work with time.\n *\n * @module time\n */\n\nimport * as metric from './metric.js'\nimport * as math from './math.js'\n\n/**\n * Return current time.\n *\n * @return {Date}\n */\nexport const getDate = () => new Date()\n\n/**\n * Return current unix time.\n *\n * @return {number}\n */\nexport const getUnixTime = Date.now\n\n/**\n * Transform time (in ms) to a human readable format. E.g. 1100 => 1.1s. 60s => 1min. .001 => 10μs.\n *\n * @param {number} d duration in milliseconds\n * @return {string} humanized approximation of time\n */\nexport const humanizeDuration = d => {\n if (d < 60000) {\n const p = metric.prefix(d, -1)\n return math.round(p.n * 100) / 100 + p.prefix + 's'\n }\n d = math.floor(d / 1000)\n const seconds = d % 60\n const minutes = math.floor(d / 60) % 60\n const hours = math.floor(d / 3600) % 24\n const days = math.floor(d / 86400)\n if (days > 0) {\n return days + 'd' + ((hours > 0 || minutes > 30) ? ' ' + (minutes > 30 ? hours + 1 : hours) + 'h' : '')\n }\n if (hours > 0) {\n /* c8 ignore next */\n return hours + 'h' + ((minutes > 0 || seconds > 30) ? ' ' + (seconds > 30 ? minutes + 1 : minutes) + 'min' : '')\n }\n return minutes + 'min' + (seconds > 0 ? ' ' + seconds + 's' : '')\n}\n"],"names":["metric.prefix","math.round","math.floor"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,MAAM,IAAI,IAAI,GAAE;AACvC;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,IAAI,CAAC,IAAG;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,gBAAgB,GAAG,CAAC,IAAI;AACrC,EAAE,IAAI,CAAC,GAAG,KAAK,EAAE;AACjB,IAAI,MAAM,CAAC,GAAGA,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAAC;AAClC,IAAI,OAAOC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,MAAM,GAAG,GAAG;AACvD,GAAG;AACH,EAAE,CAAC,GAAGC,UAAU,CAAC,CAAC,GAAG,IAAI,EAAC;AAC1B,EAAE,MAAM,OAAO,GAAG,CAAC,GAAG,GAAE;AACxB,EAAE,MAAM,OAAO,GAAGA,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,GAAE;AACzC,EAAE,MAAM,KAAK,GAAGA,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,GAAE;AACzC,EAAE,MAAM,IAAI,GAAGA,UAAU,CAAC,CAAC,GAAG,KAAK,EAAC;AACpC,EAAE,IAAI,IAAI,GAAG,CAAC,EAAE;AAChB,IAAI,OAAO,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,OAAO,GAAG,EAAE,IAAI,GAAG,IAAI,OAAO,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AAC3G,GAAG;AACH,EAAE,IAAI,KAAK,GAAG,CAAC,EAAE;AACjB;AACA,IAAI,OAAO,KAAK,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,OAAO,GAAG,EAAE,IAAI,GAAG,IAAI,OAAO,GAAG,EAAE,GAAG,OAAO,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;AACpH,GAAG;AACH,EAAE,OAAO,OAAO,GAAG,KAAK,IAAI,OAAO,GAAG,CAAC,GAAG,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,EAAE,CAAC;AACnE;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.cjs deleted file mode 100644 index b1edb0c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.cjs +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./metric.cjs'); -require('./math-96d5e8c4.cjs'); -var time = require('./time-d8438852.cjs'); - - - -exports.getDate = time.getDate; -exports.getUnixTime = time.getUnixTime; -exports.humanizeDuration = time.humanizeDuration; -//# sourceMappingURL=time.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.cjs.map deleted file mode 100644 index d5d354a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"time.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.d.ts deleted file mode 100644 index 5ee1371..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function getDate(): Date; -/** - * Return current unix time. - * - * @return {number} - */ -export const getUnixTime: () => number; -export function humanizeDuration(d: number): string; -//# sourceMappingURL=time.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.d.ts.map deleted file mode 100644 index 6d25924..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../time.js"],"names":[],"mappings":"AAcO,2BAFK,IAAI,CAEuB;AAEvC;;;;GAIG;AACH,uCAAmC;AAQ5B,oCAHI,MAAM,GACL,MAAM,CAoBjB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.test.d.ts deleted file mode 100644 index 614187b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.test.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function testTime(tc: t.TestCase): void; -export function testHumanDuration(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=time.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.test.d.ts.map deleted file mode 100644 index 78dfcce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/time.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"time.test.d.ts","sourceRoot":"","sources":["../time.test.js"],"names":[],"mappings":"AAOO,6BAFI,CAAC,CAAC,QAAQ,QAMpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAmBpB;mBAhCkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/equality.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/equality.d.ts deleted file mode 100644 index 1848ba1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/equality.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const EqualityTraitSymbol: unique symbol; -export function equals(a: NoInfer, b: T): boolean; -export type EqualityTrait = { - [EqualityTraitSymbol]: (other: EqualityTrait) => boolean; -}; -//# sourceMappingURL=equality.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/equality.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/equality.d.ts.map deleted file mode 100644 index 4977998..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/equality.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"equality.d.ts","sourceRoot":"","sources":["../../trait/equality.js"],"names":[],"mappings":"AAAA,gDAAqD;AAyB9C,uBALsB,CAAC,SAAhB,aAAc,KACjB,OAAO,CAAC,CAAC,CAAC,KACV,CAAC,GACA,OAAO,CAEgE;4BAtBtE;IAAE,CAAC,mBAAmB,CAAC,EAAC,CAAC,KAAK,EAAC,aAAa,KAAG,OAAO,CAAA;CAAE"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/fingerprint.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/fingerprint.d.ts deleted file mode 100644 index 1a31d75..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/fingerprint.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const FingerprintTraitSymbol: unique symbol; -export function fingerprint(a: Fingerprintable): string; -/** - * When implementing this trait, it is recommended to write some sort of "magic number" first to - * ensure that different types of objects don't have the same fingerprint. - * - * The recommended pracice is to generate a random u32 number as your magic number. e.g. using - * `console.log(random.uint32().toString(16))` - */ -export type Fingerprintable = { - [FingerprintTraitSymbol]: () => string; -} | import("../encoding.js").AnyEncodable; -//# sourceMappingURL=fingerprint.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/fingerprint.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/fingerprint.d.ts.map deleted file mode 100644 index 2f03e47..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/fingerprint.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../../trait/fingerprint.js"],"names":[],"mappings":"AAIA,mDAA2D;AAgBpD,+BAHI,eAAe,GACd,MAAM,CAE6P;;;;;;;;8BAPlQ;IAAE,CAAC,sBAAsB,CAAC,EAAC,MAAI,MAAM,CAAA;CAAE,GAAG,OAAO,gBAAgB,EAAE,YAAY"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.d.ts deleted file mode 100644 index e0084f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./equality.js"; -export * from "./fingerprint.js"; -//# sourceMappingURL=traits.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.d.ts.map deleted file mode 100644 index 5a8b838..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traits.d.ts","sourceRoot":"","sources":["../../trait/traits.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.test.d.ts deleted file mode 100644 index ac3f802..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.test.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function testEqualityTrait1(_tc: t.TestCase): void; -export function testEqualityTrait2(_tc: t.TestCase): void; -export function testFingerprintTrait(): void; -import * as t from '../testing.js'; -//# sourceMappingURL=traits.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.test.d.ts.map deleted file mode 100644 index 86451b3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/trait/traits.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traits.test.d.ts","sourceRoot":"","sources":["../../trait/traits.test.js"],"names":[],"mappings":"AAQO,wCAFI,CAAC,CAAC,QAAQ,QAwCpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QA2BpB;AAEM,6CAMN;mBApFkB,eAAe"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/traits.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/traits.cjs deleted file mode 100644 index 8aa7b3d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/traits.cjs +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var equality = require('./equality.cjs'); -var fingerprint = require('./fingerprint.cjs'); -require('./encoding-1a745c43.cjs'); -require('./math-96d5e8c4.cjs'); -require('./number-1fb57bba.cjs'); -require('./binary-ac8e39e2.cjs'); -require('./string-fddc5f8b.cjs'); -require('./array-78849c95.cjs'); -require('./set-5b47859e.cjs'); -require('./rabin.cjs'); -require('./buffer-3e750729.cjs'); -require('./environment-1c97264d.cjs'); -require('./map-24d263c0.cjs'); -require('./conditions-f5c0c102.cjs'); -require('./storage.cjs'); -require('./function-314580f7.cjs'); -require('./object-c0c9435b.cjs'); -require('./decoding-76e75827.cjs'); -require('./error-0c1f634f.cjs'); - - - -exports.EqualityTraitSymbol = equality.EqualityTraitSymbol; -exports.equals = equality.equals; -exports.FingerprintTraitSymbol = fingerprint.FingerprintTraitSymbol; -exports.fingerprint = fingerprint.fingerprint; -//# sourceMappingURL=traits.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/traits.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/traits.cjs.map deleted file mode 100644 index 654b779..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/traits.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traits.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree-9f3c8837.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree-9f3c8837.cjs deleted file mode 100644 index 5a2cfcc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree-9f3c8837.cjs +++ /dev/null @@ -1,557 +0,0 @@ -'use strict'; - -/** - * Red-black-tree implementation. - * - * @module tree - */ -// @ts-nocheck TODO: remove or refactor this file - -const rotate = (tree, parent, newParent, n) => { - if (parent === null) { - tree.root = newParent; - newParent._parent = null; - } else if (parent.left === n) { - parent.left = newParent; - } else if (parent.right === n) { - parent.right = newParent; - } else { - throw new Error('The elements are wrongly connected!') - } -}; - -/** - * @template V - */ -class N { - /** - * A created node is always red! - * - * @param {V} val - */ - constructor (val) { - this.val = val; - this.color = true; - this._left = null; - this._right = null; - this._parent = null; - } - - isRed () { return this.color } - isBlack () { return !this.color } - redden () { this.color = true; return this } - blacken () { this.color = false; return this } - get grandparent () { - return this.parent.parent - } - - get parent () { - return this._parent - } - - get sibling () { - return (this === this.parent.left) - ? this.parent.right - : this.parent.left - } - - get left () { - return this._left - } - - get right () { - return this._right - } - - set left (n) { - if (n !== null) { - n._parent = this; - } - this._left = n; - } - - set right (n) { - if (n !== null) { - n._parent = this; - } - this._right = n; - } - - rotateLeft (tree) { - const parent = this.parent; - const newParent = this.right; - const newRight = this.right.left; - newParent.left = this; - this.right = newRight; - rotate(tree, parent, newParent, this); - } - - next () { - if (this.right !== null) { - // search the most left node in the right tree - let o = this.right; - while (o.left !== null) { - o = o.left; - } - return o - } else { - let p = this; - while (p.parent !== null && p !== p.parent.left) { - p = p.parent; - } - return p.parent - } - } - - prev () { - if (this.left !== null) { - // search the most right node in the left tree - let o = this.left; - while (o.right !== null) { - o = o.right; - } - return o - } else { - let p = this; - while (p.parent !== null && p !== p.parent.right) { - p = p.parent; - } - return p.parent - } - } - - rotateRight (tree) { - const parent = this.parent; - const newParent = this.left; - const newLeft = this.left.right; - newParent.right = this; - this.left = newLeft; - rotate(tree, parent, newParent, this); - } - - getUncle () { - // we can assume that grandparent exists when this is called! - if (this.parent === this.parent.parent.left) { - return this.parent.parent.right - } else { - return this.parent.parent.left - } - } -} - -const isBlack = node => - node !== null ? node.isBlack() : true; - -const isRed = (node) => - node !== null ? node.isRed() : false; - -/** - * This is a Red Black Tree implementation - * - * @template K,V - */ -class Tree { - constructor () { - this.root = null; - this.length = 0; - } - - /** - * @param {K} id - */ - findNext (id) { - const nextID = id.clone(); - nextID.clock += 1; - return this.findWithLowerBound(nextID) - } - - /** - * @param {K} id - */ - findPrev (id) { - const prevID = id.clone(); - prevID.clock -= 1; - return this.findWithUpperBound(prevID) - } - - /** - * @param {K} from - */ - findNodeWithLowerBound (from) { - let o = this.root; - if (o === null) { - return null - } else { - while (true) { - if (from === null || (from.lessThan(o.val._id) && o.left !== null)) { - // o is included in the bound - // try to find an element that is closer to the bound - o = o.left; - } else if (from !== null && o.val._id.lessThan(from)) { - // o is not within the bound, maybe one of the right elements is.. - if (o.right !== null) { - o = o.right; - } else { - // there is no right element. Search for the next bigger element, - // this should be within the bounds - return o.next() - } - } else { - return o - } - } - } - } - - /** - * @param {K} to - */ - findNodeWithUpperBound (to) { - if (to === undefined) { - throw new Error('You must define from!') - } - let o = this.root; - if (o === null) { - return null - } else { - while (true) { - if ((to === null || o.val._id.lessThan(to)) && o.right !== null) { - // o is included in the bound - // try to find an element that is closer to the bound - o = o.right; - } else if (to !== null && to.lessThan(o.val._id)) { - // o is not within the bound, maybe one of the left elements is.. - if (o.left !== null) { - o = o.left; - } else { - // there is no left element. Search for the prev smaller element, - // this should be within the bounds - return o.prev() - } - } else { - return o - } - } - } - } - - /** - * @return {V} - */ - findSmallestNode () { - let o = this.root; - while (o != null && o.left != null) { - o = o.left; - } - return o - } - - /** - * @param {K} from - * @return {V} - */ - findWithLowerBound (from) { - const n = this.findNodeWithLowerBound(from); - return n == null ? null : n.val - } - - /** - * @param {K} to - * @return {V} - */ - findWithUpperBound (to) { - const n = this.findNodeWithUpperBound(to); - return n == null ? null : n.val - } - - /** - * @param {K} from - * @param {V} from - * @param {function(V):void} f - */ - iterate (from, to, f) { - let o; - if (from === null) { - o = this.findSmallestNode(); - } else { - o = this.findNodeWithLowerBound(from); - } - while ( - o !== null && - ( - to === null || // eslint-disable-line no-unmodified-loop-condition - o.val._id.lessThan(to) || - o.val._id.equals(to) - ) - ) { - f(o.val); - o = o.next(); - } - } - - /** - * @param {K} id - * @return {V|null} - */ - find (id) { - const n = this.findNode(id); - if (n !== null) { - return n.val - } else { - return null - } - } - - /** - * @param {K} id - * @return {N|null} - */ - findNode (id) { - let o = this.root; - if (o === null) { - return null - } else { - while (true) { - if (o === null) { - return null - } - if (id.lessThan(o.val._id)) { - o = o.left; - } else if (o.val._id.lessThan(id)) { - o = o.right; - } else { - return o - } - } - } - } - - /** - * @param {K} id - */ - delete (id) { - let d = this.findNode(id); - if (d == null) { - // throw new Error('Element does not exist!') - return - } - this.length--; - if (d.left !== null && d.right !== null) { - // switch d with the greates element in the left subtree. - // o should have at most one child. - let o = d.left; - // find - while (o.right !== null) { - o = o.right; - } - // switch - d.val = o.val; - d = o; - } - // d has at most one child - // let n be the node that replaces d - let isFakeChild; - let child = d.left || d.right; - if (child === null) { - isFakeChild = true; - child = new N(null); - child.blacken(); - d.right = child; - } else { - isFakeChild = false; - } - - if (d.parent === null) { - if (!isFakeChild) { - this.root = child; - child.blacken(); - child._parent = null; - } else { - this.root = null; - } - return - } else if (d.parent.left === d) { - d.parent.left = child; - } else if (d.parent.right === d) { - d.parent.right = child; - } else { - throw new Error('Impossible!') - } - if (d.isBlack()) { - if (child.isRed()) { - child.blacken(); - } else { - this._fixDelete(child); - } - } - this.root.blacken(); - if (isFakeChild) { - if (child.parent.left === child) { - child.parent.left = null; - } else if (child.parent.right === child) { - child.parent.right = null; - } else { - throw new Error('Impossible #3') - } - } - } - - _fixDelete (n) { - if (n.parent === null) { - // this can only be called after the first iteration of fixDelete. - return - } - // d was already replaced by the child - // d is not the root - // d and child are black - let sibling = n.sibling; - if (isRed(sibling)) { - // make sibling the grandfather - n.parent.redden(); - sibling.blacken(); - if (n === n.parent.left) { - n.parent.rotateLeft(this); - } else if (n === n.parent.right) { - n.parent.rotateRight(this); - } else { - throw new Error('Impossible #2') - } - sibling = n.sibling; - } - // parent, sibling, and children of n are black - if (n.parent.isBlack() && - sibling.isBlack() && - isBlack(sibling.left) && - isBlack(sibling.right) - ) { - sibling.redden(); - this._fixDelete(n.parent); - } else if (n.parent.isRed() && - sibling.isBlack() && - isBlack(sibling.left) && - isBlack(sibling.right) - ) { - sibling.redden(); - n.parent.blacken(); - } else { - if (n === n.parent.left && - sibling.isBlack() && - isRed(sibling.left) && - isBlack(sibling.right) - ) { - sibling.redden(); - sibling.left.blacken(); - sibling.rotateRight(this); - sibling = n.sibling; - } else if (n === n.parent.right && - sibling.isBlack() && - isRed(sibling.right) && - isBlack(sibling.left) - ) { - sibling.redden(); - sibling.right.blacken(); - sibling.rotateLeft(this); - sibling = n.sibling; - } - sibling.color = n.parent.color; - n.parent.blacken(); - if (n === n.parent.left) { - sibling.right.blacken(); - n.parent.rotateLeft(this); - } else { - sibling.left.blacken(); - n.parent.rotateRight(this); - } - } - } - - put (v) { - const node = new N(v); - if (this.root !== null) { - let p = this.root; // p abbrev. parent - while (true) { - if (node.val._id.lessThan(p.val._id)) { - if (p.left === null) { - p.left = node; - break - } else { - p = p.left; - } - } else if (p.val._id.lessThan(node.val._id)) { - if (p.right === null) { - p.right = node; - break - } else { - p = p.right; - } - } else { - p.val = node.val; - return p - } - } - this._fixInsert(node); - } else { - this.root = node; - } - this.length++; - this.root.blacken(); - return node - } - - _fixInsert (n) { - if (n.parent === null) { - n.blacken(); - return - } else if (n.parent.isBlack()) { - return - } - const uncle = n.getUncle(); - if (uncle !== null && uncle.isRed()) { - // Note: parent: red, uncle: red - n.parent.blacken(); - uncle.blacken(); - n.grandparent.redden(); - this._fixInsert(n.grandparent); - } else { - // Note: parent: red, uncle: black or null - // Now we transform the tree in such a way that - // either of these holds: - // 1) grandparent.left.isRed - // and grandparent.left.left.isRed - // 2) grandparent.right.isRed - // and grandparent.right.right.isRed - if (n === n.parent.right && n.parent === n.grandparent.left) { - n.parent.rotateLeft(this); - // Since we rotated and want to use the previous - // cases, we need to set n in such a way that - // n.parent.isRed again - n = n.left; - } else if (n === n.parent.left && n.parent === n.grandparent.right) { - n.parent.rotateRight(this); - // see above - n = n.right; - } - // Case 1) or 2) hold from here on. - // Now traverse grandparent, make parent a black node - // on the highest level which holds two red nodes. - n.parent.blacken(); - n.grandparent.redden(); - if (n === n.parent.left) { - // Case 1 - n.grandparent.rotateRight(this); - } else { - // Case 2 - n.grandparent.rotateLeft(this); - } - } - } -} - -var tree = /*#__PURE__*/Object.freeze({ - __proto__: null, - Tree: Tree -}); - -exports.Tree = Tree; -exports.tree = tree; -//# sourceMappingURL=tree-9f3c8837.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree-9f3c8837.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree-9f3c8837.cjs.map deleted file mode 100644 index 04a1538..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree-9f3c8837.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tree-9f3c8837.cjs","sources":["../tree.js"],"sourcesContent":["/**\n * Red-black-tree implementation.\n *\n * @module tree\n */\n// @ts-nocheck TODO: remove or refactor this file\n\nconst rotate = (tree, parent, newParent, n) => {\n if (parent === null) {\n tree.root = newParent\n newParent._parent = null\n } else if (parent.left === n) {\n parent.left = newParent\n } else if (parent.right === n) {\n parent.right = newParent\n } else {\n throw new Error('The elements are wrongly connected!')\n }\n}\n\n/**\n * @template V\n */\nclass N {\n /**\n * A created node is always red!\n *\n * @param {V} val\n */\n constructor (val) {\n this.val = val\n this.color = true\n this._left = null\n this._right = null\n this._parent = null\n }\n\n isRed () { return this.color }\n isBlack () { return !this.color }\n redden () { this.color = true; return this }\n blacken () { this.color = false; return this }\n get grandparent () {\n return this.parent.parent\n }\n\n get parent () {\n return this._parent\n }\n\n get sibling () {\n return (this === this.parent.left)\n ? this.parent.right\n : this.parent.left\n }\n\n get left () {\n return this._left\n }\n\n get right () {\n return this._right\n }\n\n set left (n) {\n if (n !== null) {\n n._parent = this\n }\n this._left = n\n }\n\n set right (n) {\n if (n !== null) {\n n._parent = this\n }\n this._right = n\n }\n\n rotateLeft (tree) {\n const parent = this.parent\n const newParent = this.right\n const newRight = this.right.left\n newParent.left = this\n this.right = newRight\n rotate(tree, parent, newParent, this)\n }\n\n next () {\n if (this.right !== null) {\n // search the most left node in the right tree\n let o = this.right\n while (o.left !== null) {\n o = o.left\n }\n return o\n } else {\n let p = this\n while (p.parent !== null && p !== p.parent.left) {\n p = p.parent\n }\n return p.parent\n }\n }\n\n prev () {\n if (this.left !== null) {\n // search the most right node in the left tree\n let o = this.left\n while (o.right !== null) {\n o = o.right\n }\n return o\n } else {\n let p = this\n while (p.parent !== null && p !== p.parent.right) {\n p = p.parent\n }\n return p.parent\n }\n }\n\n rotateRight (tree) {\n const parent = this.parent\n const newParent = this.left\n const newLeft = this.left.right\n newParent.right = this\n this.left = newLeft\n rotate(tree, parent, newParent, this)\n }\n\n getUncle () {\n // we can assume that grandparent exists when this is called!\n if (this.parent === this.parent.parent.left) {\n return this.parent.parent.right\n } else {\n return this.parent.parent.left\n }\n }\n}\n\nconst isBlack = node =>\n node !== null ? node.isBlack() : true\n\nconst isRed = (node) =>\n node !== null ? node.isRed() : false\n\n/**\n * This is a Red Black Tree implementation\n *\n * @template K,V\n */\nexport class Tree {\n constructor () {\n this.root = null\n this.length = 0\n }\n\n /**\n * @param {K} id\n */\n findNext (id) {\n const nextID = id.clone()\n nextID.clock += 1\n return this.findWithLowerBound(nextID)\n }\n\n /**\n * @param {K} id\n */\n findPrev (id) {\n const prevID = id.clone()\n prevID.clock -= 1\n return this.findWithUpperBound(prevID)\n }\n\n /**\n * @param {K} from\n */\n findNodeWithLowerBound (from) {\n let o = this.root\n if (o === null) {\n return null\n } else {\n while (true) {\n if (from === null || (from.lessThan(o.val._id) && o.left !== null)) {\n // o is included in the bound\n // try to find an element that is closer to the bound\n o = o.left\n } else if (from !== null && o.val._id.lessThan(from)) {\n // o is not within the bound, maybe one of the right elements is..\n if (o.right !== null) {\n o = o.right\n } else {\n // there is no right element. Search for the next bigger element,\n // this should be within the bounds\n return o.next()\n }\n } else {\n return o\n }\n }\n }\n }\n\n /**\n * @param {K} to\n */\n findNodeWithUpperBound (to) {\n if (to === undefined) {\n throw new Error('You must define from!')\n }\n let o = this.root\n if (o === null) {\n return null\n } else {\n while (true) {\n if ((to === null || o.val._id.lessThan(to)) && o.right !== null) {\n // o is included in the bound\n // try to find an element that is closer to the bound\n o = o.right\n } else if (to !== null && to.lessThan(o.val._id)) {\n // o is not within the bound, maybe one of the left elements is..\n if (o.left !== null) {\n o = o.left\n } else {\n // there is no left element. Search for the prev smaller element,\n // this should be within the bounds\n return o.prev()\n }\n } else {\n return o\n }\n }\n }\n }\n\n /**\n * @return {V}\n */\n findSmallestNode () {\n let o = this.root\n while (o != null && o.left != null) {\n o = o.left\n }\n return o\n }\n\n /**\n * @param {K} from\n * @return {V}\n */\n findWithLowerBound (from) {\n const n = this.findNodeWithLowerBound(from)\n return n == null ? null : n.val\n }\n\n /**\n * @param {K} to\n * @return {V}\n */\n findWithUpperBound (to) {\n const n = this.findNodeWithUpperBound(to)\n return n == null ? null : n.val\n }\n\n /**\n * @param {K} from\n * @param {V} from\n * @param {function(V):void} f\n */\n iterate (from, to, f) {\n let o\n if (from === null) {\n o = this.findSmallestNode()\n } else {\n o = this.findNodeWithLowerBound(from)\n }\n while (\n o !== null &&\n (\n to === null || // eslint-disable-line no-unmodified-loop-condition\n o.val._id.lessThan(to) ||\n o.val._id.equals(to)\n )\n ) {\n f(o.val)\n o = o.next()\n }\n }\n\n /**\n * @param {K} id\n * @return {V|null}\n */\n find (id) {\n const n = this.findNode(id)\n if (n !== null) {\n return n.val\n } else {\n return null\n }\n }\n\n /**\n * @param {K} id\n * @return {N|null}\n */\n findNode (id) {\n let o = this.root\n if (o === null) {\n return null\n } else {\n while (true) {\n if (o === null) {\n return null\n }\n if (id.lessThan(o.val._id)) {\n o = o.left\n } else if (o.val._id.lessThan(id)) {\n o = o.right\n } else {\n return o\n }\n }\n }\n }\n\n /**\n * @param {K} id\n */\n delete (id) {\n let d = this.findNode(id)\n if (d == null) {\n // throw new Error('Element does not exist!')\n return\n }\n this.length--\n if (d.left !== null && d.right !== null) {\n // switch d with the greates element in the left subtree.\n // o should have at most one child.\n let o = d.left\n // find\n while (o.right !== null) {\n o = o.right\n }\n // switch\n d.val = o.val\n d = o\n }\n // d has at most one child\n // let n be the node that replaces d\n let isFakeChild\n let child = d.left || d.right\n if (child === null) {\n isFakeChild = true\n child = new N(null)\n child.blacken()\n d.right = child\n } else {\n isFakeChild = false\n }\n\n if (d.parent === null) {\n if (!isFakeChild) {\n this.root = child\n child.blacken()\n child._parent = null\n } else {\n this.root = null\n }\n return\n } else if (d.parent.left === d) {\n d.parent.left = child\n } else if (d.parent.right === d) {\n d.parent.right = child\n } else {\n throw new Error('Impossible!')\n }\n if (d.isBlack()) {\n if (child.isRed()) {\n child.blacken()\n } else {\n this._fixDelete(child)\n }\n }\n this.root.blacken()\n if (isFakeChild) {\n if (child.parent.left === child) {\n child.parent.left = null\n } else if (child.parent.right === child) {\n child.parent.right = null\n } else {\n throw new Error('Impossible #3')\n }\n }\n }\n\n _fixDelete (n) {\n if (n.parent === null) {\n // this can only be called after the first iteration of fixDelete.\n return\n }\n // d was already replaced by the child\n // d is not the root\n // d and child are black\n let sibling = n.sibling\n if (isRed(sibling)) {\n // make sibling the grandfather\n n.parent.redden()\n sibling.blacken()\n if (n === n.parent.left) {\n n.parent.rotateLeft(this)\n } else if (n === n.parent.right) {\n n.parent.rotateRight(this)\n } else {\n throw new Error('Impossible #2')\n }\n sibling = n.sibling\n }\n // parent, sibling, and children of n are black\n if (n.parent.isBlack() &&\n sibling.isBlack() &&\n isBlack(sibling.left) &&\n isBlack(sibling.right)\n ) {\n sibling.redden()\n this._fixDelete(n.parent)\n } else if (n.parent.isRed() &&\n sibling.isBlack() &&\n isBlack(sibling.left) &&\n isBlack(sibling.right)\n ) {\n sibling.redden()\n n.parent.blacken()\n } else {\n if (n === n.parent.left &&\n sibling.isBlack() &&\n isRed(sibling.left) &&\n isBlack(sibling.right)\n ) {\n sibling.redden()\n sibling.left.blacken()\n sibling.rotateRight(this)\n sibling = n.sibling\n } else if (n === n.parent.right &&\n sibling.isBlack() &&\n isRed(sibling.right) &&\n isBlack(sibling.left)\n ) {\n sibling.redden()\n sibling.right.blacken()\n sibling.rotateLeft(this)\n sibling = n.sibling\n }\n sibling.color = n.parent.color\n n.parent.blacken()\n if (n === n.parent.left) {\n sibling.right.blacken()\n n.parent.rotateLeft(this)\n } else {\n sibling.left.blacken()\n n.parent.rotateRight(this)\n }\n }\n }\n\n put (v) {\n const node = new N(v)\n if (this.root !== null) {\n let p = this.root // p abbrev. parent\n while (true) {\n if (node.val._id.lessThan(p.val._id)) {\n if (p.left === null) {\n p.left = node\n break\n } else {\n p = p.left\n }\n } else if (p.val._id.lessThan(node.val._id)) {\n if (p.right === null) {\n p.right = node\n break\n } else {\n p = p.right\n }\n } else {\n p.val = node.val\n return p\n }\n }\n this._fixInsert(node)\n } else {\n this.root = node\n }\n this.length++\n this.root.blacken()\n return node\n }\n\n _fixInsert (n) {\n if (n.parent === null) {\n n.blacken()\n return\n } else if (n.parent.isBlack()) {\n return\n }\n const uncle = n.getUncle()\n if (uncle !== null && uncle.isRed()) {\n // Note: parent: red, uncle: red\n n.parent.blacken()\n uncle.blacken()\n n.grandparent.redden()\n this._fixInsert(n.grandparent)\n } else {\n // Note: parent: red, uncle: black or null\n // Now we transform the tree in such a way that\n // either of these holds:\n // 1) grandparent.left.isRed\n // and grandparent.left.left.isRed\n // 2) grandparent.right.isRed\n // and grandparent.right.right.isRed\n if (n === n.parent.right && n.parent === n.grandparent.left) {\n n.parent.rotateLeft(this)\n // Since we rotated and want to use the previous\n // cases, we need to set n in such a way that\n // n.parent.isRed again\n n = n.left\n } else if (n === n.parent.left && n.parent === n.grandparent.right) {\n n.parent.rotateRight(this)\n // see above\n n = n.right\n }\n // Case 1) or 2) hold from here on.\n // Now traverse grandparent, make parent a black node\n // on the highest level which holds two red nodes.\n n.parent.blacken()\n n.grandparent.redden()\n if (n === n.parent.left) {\n // Case 1\n n.grandparent.rotateRight(this)\n } else {\n // Case 2\n n.grandparent.rotateLeft(this)\n }\n }\n }\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,KAAK;AAC/C,EAAE,IAAI,MAAM,KAAK,IAAI,EAAE;AACvB,IAAI,IAAI,CAAC,IAAI,GAAG,UAAS;AACzB,IAAI,SAAS,CAAC,OAAO,GAAG,KAAI;AAC5B,GAAG,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE;AAChC,IAAI,MAAM,CAAC,IAAI,GAAG,UAAS;AAC3B,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,KAAK,CAAC,EAAE;AACjC,IAAI,MAAM,CAAC,KAAK,GAAG,UAAS;AAC5B,GAAG,MAAM;AACT,IAAI,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC;AAC1D,GAAG;AACH,EAAC;AACD;AACA;AACA;AACA;AACA,MAAM,CAAC,CAAC;AACR;AACA;AACA;AACA;AACA;AACA,EAAE,WAAW,CAAC,CAAC,GAAG,EAAE;AACpB,IAAI,IAAI,CAAC,GAAG,GAAG,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IAAI,EAAC;AACtC,OAAO;AACP,KAAK;AACL,GAAG;AACH;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.cjs deleted file mode 100644 index 5483f42..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.cjs +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var tree = require('./tree-9f3c8837.cjs'); - - - -exports.Tree = tree.Tree; -//# sourceMappingURL=tree.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.cjs.map deleted file mode 100644 index d423c90..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tree.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.d.ts deleted file mode 100644 index 915e4ec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This is a Red Black Tree implementation - * - * @template K,V - */ -export class Tree { - root: any; - length: number; - /** - * @param {K} id - */ - findNext(id: K): V; - /** - * @param {K} id - */ - findPrev(id: K): V; - /** - * @param {K} from - */ - findNodeWithLowerBound(from: K): any; - /** - * @param {K} to - */ - findNodeWithUpperBound(to: K): any; - /** - * @return {V} - */ - findSmallestNode(): V; - /** - * @param {K} from - * @return {V} - */ - findWithLowerBound(from: K): V; - /** - * @param {K} to - * @return {V} - */ - findWithUpperBound(to: K): V; - /** - * @param {K} from - * @param {V} from - * @param {function(V):void} f - */ - iterate(from: K, to: any, f: (arg0: V) => void): void; - /** - * @param {K} id - * @return {V|null} - */ - find(id: K): V | null; - /** - * @param {K} id - * @return {N|null} - */ - findNode(id: K): N | null; - /** - * @param {K} id - */ - delete(id: K): void; - _fixDelete(n: any): void; - put(v: any): any; - _fixInsert(n: any): void; -} -/** - * @template V - */ -declare class N { - /** - * A created node is always red! - * - * @param {V} val - */ - constructor(val: V); - val: V; - color: boolean; - _left: any; - _right: any; - _parent: any; - isRed(): boolean; - isBlack(): boolean; - redden(): this; - blacken(): this; - get grandparent(): any; - get parent(): any; - get sibling(): any; - set left(n: any); - get left(): any; - set right(n: any); - get right(): any; - rotateLeft(tree: any): void; - next(): any; - prev(): any; - rotateRight(tree: any): void; - getUncle(): any; -} -export {}; -//# sourceMappingURL=tree.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.d.ts.map deleted file mode 100644 index 4cbe114..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../tree.js"],"names":[],"mappings":"AAiJA;;;;GAIG;AACH,kBAFa,CAAC,EAAC,CAAC;IAIZ,UAAgB;IAChB,eAAe;IAGjB;;OAEG;IACH,aAFW,CAAC,KAMX;IAED;;OAEG;IACH,aAFW,CAAC,KAMX;IAED;;OAEG;IACH,6BAFW,CAAC,OA0BX;IAED;;OAEG;IACH,2BAFW,CAAC,OA6BX;IAED;;OAEG;IACH,oBAFY,CAAC,CAQZ;IAED;;;OAGG;IACH,yBAHW,CAAC,GACA,CAAC,CAKZ;IAED;;;OAGG;IACH,uBAHW,CAAC,GACA,CAAC,CAKZ;IAED;;;;OAIG;IACH,cAJW,CAAC,cAED,CAAS,IAAC,EAAD,CAAC,KAAE,IAAI,QAoB1B;IAED;;;OAGG;IACH,SAHW,CAAC,GACA,CAAC,GAAC,IAAI,CASjB;IAED;;;OAGG;IACH,aAHW,CAAC,GACA,CAAC,CAAC,CAAC,CAAC,GAAC,IAAI,CAoBpB;IAED;;OAEG;IACH,WAFW,CAAC,QAmEX;IAED,yBAmEC;IAED,iBA+BC;IAED,yBA8CC;CACF;AA7gBD;;GAEG;AACH,gBAFa,CAAC;IAGZ;;;;OAIG;IACH,iBAFW,CAAC,EAQX;IALC,OAAc;IACd,eAAiB;IACjB,WAAiB;IACjB,YAAkB;IAClB,aAAmB;IAGrB,iBAA8B;IAC9B,mBAAiC;IACjC,eAA4C;IAC5C,gBAA8C;IAC9C,uBAEC;IAED,kBAEC;IAED,mBAIC;IAUD,iBAKC;IAbD,gBAEC;IAaD,kBAKC;IAhBD,iBAEC;IAgBD,4BAOC;IAED,YAeC;IAED,YAeC;IAED,6BAOC;IAED,gBAOC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.test.d.ts deleted file mode 100644 index 54a03d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=tree.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.test.d.ts.map deleted file mode 100644 index 193aa86..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/tree.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tree.test.d.ts","sourceRoot":"","sources":["../tree.test.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.cjs deleted file mode 100644 index 1c3eb97..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.cjs +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var object = require('./object-c0c9435b.cjs'); -require('./equality.cjs'); - -/** - * Utility module to work with urls. - * - * @module url - */ - -/** - * Parse query parameters from an url. - * - * @param {string} url - * @return {Object} - */ -const decodeQueryParams = url => { - /** - * @type {Object} - */ - const query = {}; - const urlQuerySplit = url.split('?'); - const pairs = urlQuerySplit[urlQuerySplit.length - 1].split('&'); - for (let i = 0; i < pairs.length; i++) { - const item = pairs[i]; - if (item.length > 0) { - const pair = item.split('='); - query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || ''); - } - } - return query -}; - -/** - * @param {Object} params - * @return {string} - */ -const encodeQueryParams = params => - object.map(params, (val, key) => `${encodeURIComponent(key)}=${encodeURIComponent(val)}`).join('&'); - -exports.decodeQueryParams = decodeQueryParams; -exports.encodeQueryParams = encodeQueryParams; -//# sourceMappingURL=url.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.cjs.map deleted file mode 100644 index 49fa2ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"url.cjs","sources":["../url.js"],"sourcesContent":["/**\n * Utility module to work with urls.\n *\n * @module url\n */\n\nimport * as object from './object.js'\n\n/**\n * Parse query parameters from an url.\n *\n * @param {string} url\n * @return {Object}\n */\nexport const decodeQueryParams = url => {\n /**\n * @type {Object}\n */\n const query = {}\n const urlQuerySplit = url.split('?')\n const pairs = urlQuerySplit[urlQuerySplit.length - 1].split('&')\n for (let i = 0; i < pairs.length; i++) {\n const item = pairs[i]\n if (item.length > 0) {\n const pair = item.split('=')\n query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || '')\n }\n }\n return query\n}\n\n/**\n * @param {Object} params\n * @return {string}\n */\nexport const encodeQueryParams = params =>\n object.map(params, (val, key) => `${encodeURIComponent(key)}=${encodeURIComponent(val)}`).join('&')\n"],"names":["object.map"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,iBAAiB,GAAG,GAAG,IAAI;AACxC;AACA;AACA;AACA,EAAE,MAAM,KAAK,GAAG,GAAE;AAClB,EAAE,MAAM,aAAa,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,EAAC;AACtC,EAAE,MAAM,KAAK,GAAG,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAC;AAClE,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACzC,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,EAAC;AACzB,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;AACzB,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,EAAC;AAClC,MAAM,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAC;AAC5E,KAAK;AACL,GAAG;AACH,EAAE,OAAO,KAAK;AACd,EAAC;AACD;AACA;AACA;AACA;AACA;AACY,MAAC,iBAAiB,GAAG,MAAM;AACvC,EAAEA,UAAU,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.d.ts deleted file mode 100644 index ed2895c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function decodeQueryParams(url: string): { - [x: string]: string; -}; -export function encodeQueryParams(params: { - [x: string]: string; -}): string; -//# sourceMappingURL=url.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.d.ts.map deleted file mode 100644 index 99fc3f6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../url.js"],"names":[],"mappings":"AAcO,uCAHI,MAAM;;EAkBhB;AAMM;;IAFK,MAAM,CAGmF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.test.d.ts deleted file mode 100644 index 027c9ee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testUrlParamQuery(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=url.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.test.d.ts.map deleted file mode 100644 index 6e4b709..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/url.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"url.test.d.ts","sourceRoot":"","sources":["../url.test.js"],"names":[],"mappings":"AAcO,sCAFI,CAAC,CAAC,QAAQ,QAapB;mBAzBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.cjs deleted file mode 100644 index ddbfc29..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.cjs +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -/* eslint-env browser */ - -const subtle = crypto.subtle; -const getRandomValues = crypto.getRandomValues.bind(crypto); - -exports.getRandomValues = getRandomValues; -exports.subtle = subtle; -//# sourceMappingURL=webcrypto.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.cjs.map deleted file mode 100644 index 44e2018..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.cjs","sources":["../webcrypto.js"],"sourcesContent":["/* eslint-env browser */\n\nexport const subtle = crypto.subtle\nexport const getRandomValues = crypto.getRandomValues.bind(crypto)\n"],"names":[],"mappings":";;;;AAAA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,CAAC,OAAM;AACvB,MAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.d.ts deleted file mode 100644 index d9e514e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const subtle: SubtleCrypto; -export const getRandomValues: (array: T) => T; -//# sourceMappingURL=webcrypto.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.d.ts.map deleted file mode 100644 index 4c49c57..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.d.ts","sourceRoot":"","sources":["../webcrypto.js"],"names":[],"mappings":"AAEA,kCAAmC;AACnC,yEAAkE"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.cjs deleted file mode 100644 index 5934e4c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.cjs +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -// eslint-disable-next-line -const subtle = /** @type {any} */ (crypto).subtle; -// eslint-disable-next-line -const getRandomValues = /** @type {any} */ (crypto).getRandomValues.bind(crypto); - -exports.getRandomValues = getRandomValues; -exports.subtle = subtle; -//# sourceMappingURL=webcrypto.deno.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.cjs.map deleted file mode 100644 index 443ac80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.deno.cjs","sources":["../webcrypto.deno.js"],"sourcesContent":["// eslint-disable-next-line\nexport const subtle = /** @type {any} */ (crypto).subtle\n// eslint-disable-next-line\nexport const getRandomValues = /** @type {any} */ (crypto).getRandomValues.bind(crypto)\n"],"names":[],"mappings":";;;;AAAA;AACY,MAAC,MAAM,sBAAsB,CAAC,MAAM,EAAE,OAAM;AACxD;AACY,MAAC,eAAe,sBAAsB,CAAC,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,MAAM;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.d.ts deleted file mode 100644 index ec6b5e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const subtle: any; -export const getRandomValues: any; -//# sourceMappingURL=webcrypto.deno.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.d.ts.map deleted file mode 100644 index 264be7f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.deno.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.deno.d.ts","sourceRoot":"","sources":["../webcrypto.deno.js"],"names":[],"mappings":"AACA,yBAAwD;AAExD,kCAAuF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.cjs deleted file mode 100644 index 378e7f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.cjs +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var node_crypto = require('node:crypto'); - -const subtle = /** @type {any} */ (node_crypto.webcrypto).subtle; -const getRandomValues = /** @type {any} */ (node_crypto.webcrypto).getRandomValues.bind(node_crypto.webcrypto); - -exports.getRandomValues = getRandomValues; -exports.subtle = subtle; -//# sourceMappingURL=webcrypto.node.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.cjs.map deleted file mode 100644 index 558afb3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.node.cjs","sources":["../webcrypto.node.js"],"sourcesContent":["import { webcrypto } from 'node:crypto'\n\nexport const subtle = /** @type {any} */ (webcrypto).subtle\nexport const getRandomValues = /** @type {any} */ (webcrypto).getRandomValues.bind(webcrypto)\n"],"names":["webcrypto"],"mappings":";;;;;;AAEY,MAAC,MAAM,sBAAsB,CAACA,qBAAS,EAAE,OAAM;AAC/C,MAAC,eAAe,sBAAsB,CAACA,qBAAS,EAAE,eAAe,CAAC,IAAI,CAACA,qBAAS;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.d.ts deleted file mode 100644 index 0026211..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const subtle: any; -export const getRandomValues: any; -//# sourceMappingURL=webcrypto.node.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.d.ts.map deleted file mode 100644 index 847c2b9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.node.d.ts","sourceRoot":"","sources":["../webcrypto.node.js"],"names":[],"mappings":"AAEA,yBAA2D;AAC3D,kCAA6F"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.cjs deleted file mode 100644 index 4e6d3c4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.cjs +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var webcrypto = require('isomorphic-webcrypto/src/react-native'); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var webcrypto__default = /*#__PURE__*/_interopDefaultLegacy(webcrypto); - -// @ts-ignore - -webcrypto__default["default"].ensureSecure(); - -const subtle = webcrypto__default["default"].subtle; -const getRandomValues = webcrypto__default["default"].getRandomValues.bind(webcrypto__default["default"]); - -exports.getRandomValues = getRandomValues; -exports.subtle = subtle; -//# sourceMappingURL=webcrypto.react-native.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.cjs.map deleted file mode 100644 index 47d68bd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.react-native.cjs","sources":["../webcrypto.react-native.js"],"sourcesContent":["// @ts-ignore\nimport webcrypto from 'isomorphic-webcrypto/src/react-native'\n\nwebcrypto.ensureSecure()\n\nexport const subtle = webcrypto.subtle\nexport const getRandomValues = webcrypto.getRandomValues.bind(webcrypto)\n"],"names":["webcrypto"],"mappings":";;;;;;;;;;AAAA;AAEA;AACAA,6BAAS,CAAC,YAAY,GAAE;AACxB;AACY,MAAC,MAAM,GAAGA,6BAAS,CAAC,OAAM;AAC1B,MAAC,eAAe,GAAGA,6BAAS,CAAC,eAAe,CAAC,IAAI,CAACA,6BAAS;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.d.ts deleted file mode 100644 index 59dad39..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const subtle: any; -export const getRandomValues: any; -//# sourceMappingURL=webcrypto.react-native.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.d.ts.map deleted file mode 100644 index e09a19e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/webcrypto.react-native.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.react-native.d.ts","sourceRoot":"","sources":["../webcrypto.react-native.js"],"names":[],"mappings":"AAKA,yBAAsC;AACtC,kCAAwE"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket-b073d0fc.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket-b073d0fc.cjs deleted file mode 100644 index 04686db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket-b073d0fc.cjs +++ /dev/null @@ -1,157 +0,0 @@ -'use strict'; - -var observable = require('./observable.cjs'); -var time = require('./time-d8438852.cjs'); -var math = require('./math-96d5e8c4.cjs'); - -/* eslint-env browser */ - -const reconnectTimeoutBase = 1200; -const maxReconnectTimeout = 2500; -// @todo - this should depend on awareness.outdatedTime -const messageReconnectTimeout = 30000; - -/** - * @param {WebsocketClient} wsclient - */ -const setupWS = (wsclient) => { - if (wsclient.shouldConnect && wsclient.ws === null) { - const websocket = new WebSocket(wsclient.url); - const binaryType = wsclient.binaryType; - /** - * @type {any} - */ - let pingTimeout = null; - if (binaryType) { - websocket.binaryType = binaryType; - } - wsclient.ws = websocket; - wsclient.connecting = true; - wsclient.connected = false; - websocket.onmessage = event => { - wsclient.lastMessageReceived = time.getUnixTime(); - const data = event.data; - const message = typeof data === 'string' ? JSON.parse(data) : data; - if (message && message.type === 'pong') { - clearTimeout(pingTimeout); - pingTimeout = setTimeout(sendPing, messageReconnectTimeout / 2); - } - wsclient.emit('message', [message, wsclient]); - }; - /** - * @param {any} error - */ - const onclose = error => { - if (wsclient.ws !== null) { - wsclient.ws = null; - wsclient.connecting = false; - if (wsclient.connected) { - wsclient.connected = false; - wsclient.emit('disconnect', [{ type: 'disconnect', error }, wsclient]); - } else { - wsclient.unsuccessfulReconnects++; - } - // Start with no reconnect timeout and increase timeout by - // log10(wsUnsuccessfulReconnects). - // The idea is to increase reconnect timeout slowly and have no reconnect - // timeout at the beginning (log(1) = 0) - setTimeout(setupWS, math.min(math.log10(wsclient.unsuccessfulReconnects + 1) * reconnectTimeoutBase, maxReconnectTimeout), wsclient); - } - clearTimeout(pingTimeout); - }; - const sendPing = () => { - if (wsclient.ws === websocket) { - wsclient.send({ - type: 'ping' - }); - } - }; - websocket.onclose = () => onclose(null); - websocket.onerror = error => onclose(error); - websocket.onopen = () => { - wsclient.lastMessageReceived = time.getUnixTime(); - wsclient.connecting = false; - wsclient.connected = true; - wsclient.unsuccessfulReconnects = 0; - wsclient.emit('connect', [{ type: 'connect' }, wsclient]); - // set ping - pingTimeout = setTimeout(sendPing, messageReconnectTimeout / 2); - }; - } -}; - -/** - * @deprecated - * @extends Observable - */ -class WebsocketClient extends observable.Observable { - /** - * @param {string} url - * @param {object} opts - * @param {'arraybuffer' | 'blob' | null} [opts.binaryType] Set `ws.binaryType` - */ - constructor (url, { binaryType } = {}) { - super(); - this.url = url; - /** - * @type {WebSocket?} - */ - this.ws = null; - this.binaryType = binaryType || null; - this.connected = false; - this.connecting = false; - this.unsuccessfulReconnects = 0; - this.lastMessageReceived = 0; - /** - * Whether to connect to other peers or not - * @type {boolean} - */ - this.shouldConnect = true; - this._checkInterval = setInterval(() => { - if (this.connected && messageReconnectTimeout < time.getUnixTime() - this.lastMessageReceived) { - // no message received in a long time - not even your own awareness - // updates (which are updated every 15 seconds) - /** @type {WebSocket} */ (this.ws).close(); - } - }, messageReconnectTimeout / 2); - setupWS(this); - } - - /** - * @param {any} message - */ - send (message) { - if (this.ws) { - this.ws.send(JSON.stringify(message)); - } - } - - destroy () { - clearInterval(this._checkInterval); - this.disconnect(); - super.destroy(); - } - - disconnect () { - this.shouldConnect = false; - if (this.ws !== null) { - this.ws.close(); - } - } - - connect () { - this.shouldConnect = true; - if (!this.connected && this.ws === null) { - setupWS(this); - } - } -} - -var websocket = /*#__PURE__*/Object.freeze({ - __proto__: null, - WebsocketClient: WebsocketClient -}); - -exports.WebsocketClient = WebsocketClient; -exports.websocket = websocket; -//# sourceMappingURL=websocket-b073d0fc.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket-b073d0fc.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket-b073d0fc.cjs.map deleted file mode 100644 index baec2bc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket-b073d0fc.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"websocket-b073d0fc.cjs","sources":["../websocket.js"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * Tiny websocket connection handler.\n *\n * Implements exponential backoff reconnects, ping/pong, and a nice event system using [lib0/observable].\n *\n * @module websocket\n */\n\nimport { Observable } from './observable.js'\nimport * as time from './time.js'\nimport * as math from './math.js'\n\nconst reconnectTimeoutBase = 1200\nconst maxReconnectTimeout = 2500\n// @todo - this should depend on awareness.outdatedTime\nconst messageReconnectTimeout = 30000\n\n/**\n * @param {WebsocketClient} wsclient\n */\nconst setupWS = (wsclient) => {\n if (wsclient.shouldConnect && wsclient.ws === null) {\n const websocket = new WebSocket(wsclient.url)\n const binaryType = wsclient.binaryType\n /**\n * @type {any}\n */\n let pingTimeout = null\n if (binaryType) {\n websocket.binaryType = binaryType\n }\n wsclient.ws = websocket\n wsclient.connecting = true\n wsclient.connected = false\n websocket.onmessage = event => {\n wsclient.lastMessageReceived = time.getUnixTime()\n const data = event.data\n const message = typeof data === 'string' ? JSON.parse(data) : data\n if (message && message.type === 'pong') {\n clearTimeout(pingTimeout)\n pingTimeout = setTimeout(sendPing, messageReconnectTimeout / 2)\n }\n wsclient.emit('message', [message, wsclient])\n }\n /**\n * @param {any} error\n */\n const onclose = error => {\n if (wsclient.ws !== null) {\n wsclient.ws = null\n wsclient.connecting = false\n if (wsclient.connected) {\n wsclient.connected = false\n wsclient.emit('disconnect', [{ type: 'disconnect', error }, wsclient])\n } else {\n wsclient.unsuccessfulReconnects++\n }\n // Start with no reconnect timeout and increase timeout by\n // log10(wsUnsuccessfulReconnects).\n // The idea is to increase reconnect timeout slowly and have no reconnect\n // timeout at the beginning (log(1) = 0)\n setTimeout(setupWS, math.min(math.log10(wsclient.unsuccessfulReconnects + 1) * reconnectTimeoutBase, maxReconnectTimeout), wsclient)\n }\n clearTimeout(pingTimeout)\n }\n const sendPing = () => {\n if (wsclient.ws === websocket) {\n wsclient.send({\n type: 'ping'\n })\n }\n }\n websocket.onclose = () => onclose(null)\n websocket.onerror = error => onclose(error)\n websocket.onopen = () => {\n wsclient.lastMessageReceived = time.getUnixTime()\n wsclient.connecting = false\n wsclient.connected = true\n wsclient.unsuccessfulReconnects = 0\n wsclient.emit('connect', [{ type: 'connect' }, wsclient])\n // set ping\n pingTimeout = setTimeout(sendPing, messageReconnectTimeout / 2)\n }\n }\n}\n\n/**\n * @deprecated\n * @extends Observable\n */\nexport class WebsocketClient extends Observable {\n /**\n * @param {string} url\n * @param {object} opts\n * @param {'arraybuffer' | 'blob' | null} [opts.binaryType] Set `ws.binaryType`\n */\n constructor (url, { binaryType } = {}) {\n super()\n this.url = url\n /**\n * @type {WebSocket?}\n */\n this.ws = null\n this.binaryType = binaryType || null\n this.connected = false\n this.connecting = false\n this.unsuccessfulReconnects = 0\n this.lastMessageReceived = 0\n /**\n * Whether to connect to other peers or not\n * @type {boolean}\n */\n this.shouldConnect = true\n this._checkInterval = setInterval(() => {\n if (this.connected && messageReconnectTimeout < time.getUnixTime() - this.lastMessageReceived) {\n // no message received in a long time - not even your own awareness\n // updates (which are updated every 15 seconds)\n /** @type {WebSocket} */ (this.ws).close()\n }\n }, messageReconnectTimeout / 2)\n setupWS(this)\n }\n\n /**\n * @param {any} message\n */\n send (message) {\n if (this.ws) {\n this.ws.send(JSON.stringify(message))\n }\n }\n\n destroy () {\n clearInterval(this._checkInterval)\n this.disconnect()\n super.destroy()\n }\n\n disconnect () {\n this.shouldConnect = false\n if (this.ws !== null) {\n this.ws.close()\n }\n }\n\n connect () {\n this.shouldConnect = true\n if (!this.connected && this.ws === null) {\n setupWS(this)\n }\n }\n}\n"],"names":["time.getUnixTime","math.min","math.log10","Observable"],"mappings":";;;;;;AAAA;AAaA;AACA,MAAM,oBAAoB,GAAG,KAAI;AACjC,MAAM,mBAAmB,GAAG,KAAI;AAChC;AACA,MAAM,uBAAuB,GAAG,MAAK;AACrC;AACA;AACA;AACA;AACA,MAAM,OAAO,GAAG,CAAC,QAAQ,KAAK;AAC9B,EAAE,IAAI,QAAQ,CAAC,aAAa,IAAI,QAAQ,CAAC,EAAE,KAAK,IAAI,EAAE;AACtD,IAAI,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAC;AACjD,IAAI,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAU;AAC1C;AACA;AACA;AACA,IAAI,IAAI,WAAW,GAAG,KAAI;AAC1B,IAAI,IAAI,UAAU,EAAE;AACpB,MAAM,SAAS,CAAC,UAAU,GAAG,WAAU;AACvC,KAAK;AACL,IAAI,QAAQ,CAAC,EAAE,GAAG,UAAS;AAC3B,IAAI,QAAQ,CAAC,UAAU,GAAG,KAAI;AAC9B,IAAI,QAAQ,CAAC,SAAS,GAAG,MAAK;AAC9B,IAAI,SAAS,CAAC,SAAS,GAAG,KAAK,IAAI;AACnC,MAAM,QAAQ,CAAC,mBAAmB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GAAG;AACH;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.cjs b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.cjs deleted file mode 100644 index ad8c2ac..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.cjs +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -require('./observable.cjs'); -require('./time-d8438852.cjs'); -require('./math-96d5e8c4.cjs'); -var websocket = require('./websocket-b073d0fc.cjs'); -require('./map-24d263c0.cjs'); -require('./set-5b47859e.cjs'); -require('./array-78849c95.cjs'); -require('./metric.cjs'); - - - -exports.WebsocketClient = websocket.WebsocketClient; -//# sourceMappingURL=websocket.cjs.map diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.cjs.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.cjs.map deleted file mode 100644 index e970065..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"websocket.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.d.ts deleted file mode 100644 index 7adeac1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @deprecated - * @extends Observable - */ -export class WebsocketClient extends Observable { - /** - * @param {string} url - * @param {object} opts - * @param {'arraybuffer' | 'blob' | null} [opts.binaryType] Set `ws.binaryType` - */ - constructor(url: string, { binaryType }?: { - binaryType?: "arraybuffer" | "blob" | null | undefined; - }); - url: string; - /** - * @type {WebSocket?} - */ - ws: WebSocket | null; - binaryType: "arraybuffer" | "blob" | null; - connected: boolean; - connecting: boolean; - unsuccessfulReconnects: number; - lastMessageReceived: number; - /** - * Whether to connect to other peers or not - * @type {boolean} - */ - shouldConnect: boolean; - _checkInterval: NodeJS.Timeout; - /** - * @param {any} message - */ - send(message: any): void; - disconnect(): void; - connect(): void; -} -import { Observable } from './observable.js'; -//# sourceMappingURL=websocket.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.d.ts.map deleted file mode 100644 index ec5d8de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dist/websocket.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../websocket.js"],"names":[],"mappings":"AAwFA;;;GAGG;AACH;IACE;;;;OAIG;IACH,iBAJW,MAAM,mBAEd;QAA6C,UAAU;KACzD,EA0BA;IAvBC,YAAc;IACd;;OAEG;IACH,IAFU,SAAS,OAAC,CAEN;IACd,0CAAoC;IACpC,mBAAsB;IACtB,oBAAuB;IACvB,+BAA+B;IAC/B,4BAA4B;IAC5B;;;OAGG;IACH,eAFU,OAAO,CAEQ;IACzB,+BAM+B;IAIjC;;OAEG;IACH,cAFW,GAAG,QAMb;IAQD,mBAKC;IAED,gBAKC;CACF;2BA/I0B,iBAAiB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.d.ts deleted file mode 100644 index e71a664..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @type {Document} - */ -export const doc: Document; -export function createElement(name: string): HTMLElement; -export function createDocumentFragment(): DocumentFragment; -/** - * @type {$.Schema} - */ -export const $fragment: $.Schema; -export function createTextNode(text: string): Text; -export const domParser: DOMParser; -export function emitCustomEvent(el: HTMLElement, name: string, opts: Object): boolean; -export function setAttributes(el: Element, attrs: Array>): Element; -export function setAttributesMap(el: Element, attrs: Map): Element; -export function fragment(children: Array | HTMLCollection): DocumentFragment; -export function append(parent: Element, nodes: Array): Element; -export function remove(el: HTMLElement): void; -export function addEventListener(el: EventTarget, name: string, f: EventListener): void; -export function removeEventListener(el: EventTarget, name: string, f: EventListener): void; -export function addEventListeners(node: Node, listeners: Array>): Node; -export function removeEventListeners(node: Node, listeners: Array>): Node; -export function element(name: string, attrs?: Array | pair.Pair>, children?: Array): Element; -/** - * @type {$.Schema} - */ -export const $element: $.Schema; -export function canvas(width: number, height: number): HTMLCanvasElement; -export function text(text: string): Text; -/** - * @type {$.Schema} - */ -export const $text: $.Schema; -export function pairToStyleString(pair: pair.Pair): string; -export function pairsToStyleString(pairs: Array>): string; -export function mapToStyleString(m: Map): string; -export function querySelector(el: HTMLElement | ShadowRoot, query: string): HTMLElement | null; -export function querySelectorAll(el: HTMLElement | ShadowRoot, query: string): NodeListOf; -export function getElementById(id: string): HTMLElement; -export function parseFragment(html: string): DocumentFragment; -export function parseElement(html: string): HTMLElement; -export function replaceWith(oldEl: HTMLElement, newEl: HTMLElement | DocumentFragment): void; -export function insertBefore(parent: HTMLElement, el: HTMLElement, ref: Node | null): HTMLElement; -export function appendChild(parent: Node, child: Node): Node; -export const ELEMENT_NODE: 1; -export const TEXT_NODE: 3; -export const CDATA_SECTION_NODE: 4; -export const COMMENT_NODE: 8; -export const DOCUMENT_NODE: 9; -export const DOCUMENT_TYPE_NODE: 10; -export const DOCUMENT_FRAGMENT_NODE: 11; -/** - * @type {$.Schema} - */ -export const $node: $.Schema; -export function checkNodeType(node: any, type: number): boolean; -export function isParentOf(parent: Node, child: HTMLElement): boolean; -import * as $ from './schema.js'; -import * as pair from './pair.js'; -//# sourceMappingURL=dom.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.d.ts.map deleted file mode 100644 index de9d056..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["dom.js"],"names":[],"mappings":"AAaA;;GAEG;AACH,kBAFU,QAAQ,CAE0E;AAMrF,oCAHI,MAAM,GACL,WAAW,CAEqC;AAKrD,0CAFK,gBAAgB,CAE4C;AAExE;;GAEG;AACH,wBAFU,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAE4C;AAMzE,qCAHI,MAAM,GACL,IAAI,CAE8C;AAE9D,wBAAoC,SAAS,CAAgE;AAOtG,oCAJI,WAAW,QACX,MAAM,QACN,MAAM,WAE+E;AAOzF,kCAJI,OAAO,SACP,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAC,MAAM,GAAC,OAAO,CAAC,CAAC,GACtC,OAAO,CAclB;AAOM,qCAJI,OAAO,SACP,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAClB,OAAO,CAKlB;AAMM,mCAHI,KAAK,CAAC,IAAI,CAAC,GAAC,cAAc,GACzB,gBAAgB,CAQ3B;AAOM,+BAJI,OAAO,SACP,KAAK,CAAC,IAAI,CAAC,GACV,OAAO,CAKlB;AAKM,2BAFI,WAAW,QAEiB;AAOhC,qCAJI,WAAW,QACX,MAAM,KACN,aAAa,QAEqD;AAOtE,wCAJI,WAAW,QACX,MAAM,KACN,aAAa,QAE2D;AAO5E,wCAJI,IAAI,aACJ,KAAK,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sD;AAOtE,oCAJI,IAAI,SACJ,IAAI,GACH,IAAI,CAEuD;AAEvE,6BAA4C;AAC5C,0BAAsC;AACtC,mCAAwD;AACxD,6BAA4C;AAC5C,8BAA8C;AAC9C,oCAAwD;AACxD,wCAAgE;AAEhE;;GAEG;AACH,oBAFU,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAE2C;AAM5D,oCAHI,GAAG,QACH,MAAM,WAEkD;AAM5D,mCAHI,IAAI,SACJ,WAAW,WAQrB;mBAhRkB,aAAa;sBAFV,WAAW"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.js deleted file mode 100644 index bac14b6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/dom.js +++ /dev/null @@ -1,284 +0,0 @@ -/* eslint-env browser */ - -/** - * Utility module to work with the DOM. - * - * @module dom - */ - -import * as pair from './pair.js' -import * as map from './map.js' -import * as $ from './schema.js' - -/* c8 ignore start */ -/** - * @type {Document} - */ -export const doc = /** @type {Document} */ (typeof document !== 'undefined' ? document : {}) - -/** - * @param {string} name - * @return {HTMLElement} - */ -export const createElement = name => doc.createElement(name) - -/** - * @return {DocumentFragment} - */ -export const createDocumentFragment = () => doc.createDocumentFragment() - -/** - * @type {$.Schema} - */ -export const $fragment = $.$custom(el => el.nodeType === DOCUMENT_FRAGMENT_NODE) - -/** - * @param {string} text - * @return {Text} - */ -export const createTextNode = text => doc.createTextNode(text) - -export const domParser = /** @type {DOMParser} */ (typeof DOMParser !== 'undefined' ? new DOMParser() : null) - -/** - * @param {HTMLElement} el - * @param {string} name - * @param {Object} opts - */ -export const emitCustomEvent = (el, name, opts) => el.dispatchEvent(new CustomEvent(name, opts)) - -/** - * @param {Element} el - * @param {Array>} attrs Array of key-value pairs - * @return {Element} - */ -export const setAttributes = (el, attrs) => { - pair.forEach(attrs, (key, value) => { - if (value === false) { - el.removeAttribute(key) - } else if (value === true) { - el.setAttribute(key, '') - } else { - // @ts-ignore - el.setAttribute(key, value) - } - }) - return el -} - -/** - * @param {Element} el - * @param {Map} attrs Array of key-value pairs - * @return {Element} - */ -export const setAttributesMap = (el, attrs) => { - attrs.forEach((value, key) => { el.setAttribute(key, value) }) - return el -} - -/** - * @param {Array|HTMLCollection} children - * @return {DocumentFragment} - */ -export const fragment = children => { - const fragment = createDocumentFragment() - for (let i = 0; i < children.length; i++) { - appendChild(fragment, children[i]) - } - return fragment -} - -/** - * @param {Element} parent - * @param {Array} nodes - * @return {Element} - */ -export const append = (parent, nodes) => { - appendChild(parent, fragment(nodes)) - return parent -} - -/** - * @param {HTMLElement} el - */ -export const remove = el => el.remove() - -/** - * @param {EventTarget} el - * @param {string} name - * @param {EventListener} f - */ -export const addEventListener = (el, name, f) => el.addEventListener(name, f) - -/** - * @param {EventTarget} el - * @param {string} name - * @param {EventListener} f - */ -export const removeEventListener = (el, name, f) => el.removeEventListener(name, f) - -/** - * @param {Node} node - * @param {Array>} listeners - * @return {Node} - */ -export const addEventListeners = (node, listeners) => { - pair.forEach(listeners, (name, f) => addEventListener(node, name, f)) - return node -} - -/** - * @param {Node} node - * @param {Array>} listeners - * @return {Node} - */ -export const removeEventListeners = (node, listeners) => { - pair.forEach(listeners, (name, f) => removeEventListener(node, name, f)) - return node -} - -/** - * @param {string} name - * @param {Array|pair.Pair>} attrs Array of key-value pairs - * @param {Array} children - * @return {Element} - */ -export const element = (name, attrs = [], children = []) => - append(setAttributes(createElement(name), attrs), children) - -/** - * @type {$.Schema} - */ -export const $element = $.$custom(el => el.nodeType === ELEMENT_NODE) - -/** - * @param {number} width - * @param {number} height - */ -export const canvas = (width, height) => { - const c = /** @type {HTMLCanvasElement} */ (createElement('canvas')) - c.height = height - c.width = width - return c -} - -/** - * @param {string} t - * @return {Text} - */ -export const text = createTextNode - -/** - * @type {$.Schema} - */ -export const $text = $.$custom(el => el.nodeType === TEXT_NODE) - -/** - * @param {pair.Pair} pair - */ -export const pairToStyleString = pair => `${pair.left}:${pair.right};` - -/** - * @param {Array>} pairs - * @return {string} - */ -export const pairsToStyleString = pairs => pairs.map(pairToStyleString).join('') - -/** - * @param {Map} m - * @return {string} - */ -export const mapToStyleString = m => map.map(m, (value, key) => `${key}:${value};`).join('') - -/** - * @todo should always query on a dom element - * - * @param {HTMLElement|ShadowRoot} el - * @param {string} query - * @return {HTMLElement | null} - */ -export const querySelector = (el, query) => el.querySelector(query) - -/** - * @param {HTMLElement|ShadowRoot} el - * @param {string} query - * @return {NodeListOf} - */ -export const querySelectorAll = (el, query) => el.querySelectorAll(query) - -/** - * @param {string} id - * @return {HTMLElement} - */ -export const getElementById = id => /** @type {HTMLElement} */ (doc.getElementById(id)) - -/** - * @param {string} html - * @return {HTMLElement} - */ -const _parse = html => domParser.parseFromString(`${html}`, 'text/html').body - -/** - * @param {string} html - * @return {DocumentFragment} - */ -export const parseFragment = html => fragment(/** @type {any} */ (_parse(html).childNodes)) - -/** - * @param {string} html - * @return {HTMLElement} - */ -export const parseElement = html => /** @type HTMLElement */ (_parse(html).firstElementChild) - -/** - * @param {HTMLElement} oldEl - * @param {HTMLElement|DocumentFragment} newEl - */ -export const replaceWith = (oldEl, newEl) => oldEl.replaceWith(newEl) - -/** - * @param {HTMLElement} parent - * @param {HTMLElement} el - * @param {Node|null} ref - * @return {HTMLElement} - */ -export const insertBefore = (parent, el, ref) => parent.insertBefore(el, ref) - -/** - * @param {Node} parent - * @param {Node} child - * @return {Node} - */ -export const appendChild = (parent, child) => parent.appendChild(child) - -export const ELEMENT_NODE = doc.ELEMENT_NODE -export const TEXT_NODE = doc.TEXT_NODE -export const CDATA_SECTION_NODE = doc.CDATA_SECTION_NODE -export const COMMENT_NODE = doc.COMMENT_NODE -export const DOCUMENT_NODE = doc.DOCUMENT_NODE -export const DOCUMENT_TYPE_NODE = doc.DOCUMENT_TYPE_NODE -export const DOCUMENT_FRAGMENT_NODE = doc.DOCUMENT_FRAGMENT_NODE - -/** - * @type {$.Schema} - */ -export const $node = $.$custom(el => el.nodeType === DOCUMENT_NODE) - -/** - * @param {any} node - * @param {number} type - */ -export const checkNodeType = (node, type) => node.nodeType === type - -/** - * @param {Node} parent - * @param {HTMLElement} child - */ -export const isParentOf = (parent, child) => { - let p = child.parentNode - while (p && p !== parent) { - p = p.parentNode - } - return p === parent -} -/* c8 ignore stop */ diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.d.ts deleted file mode 100644 index 574ca97..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.d.ts +++ /dev/null @@ -1,235 +0,0 @@ -/** - * A BinaryEncoder handles the encoding to an Uint8Array. - */ -export class Encoder { - cpos: number; - cbuf: Uint8Array; - /** - * @type {Array} - */ - bufs: Array; -} -export function createEncoder(): Encoder; -export function encode(f: (arg0: Encoder) => void): Uint8Array; -export function length(encoder: Encoder): number; -export function hasContent(encoder: Encoder): boolean; -export function toUint8Array(encoder: Encoder): Uint8Array; -export function verifyLen(encoder: Encoder, len: number): void; -export function write(encoder: Encoder, num: number): void; -export function set(encoder: Encoder, pos: number, num: number): void; -export function writeUint8(encoder: Encoder, num: number): void; -export function setUint8(encoder: Encoder, pos: number, num: number): void; -export function writeUint16(encoder: Encoder, num: number): void; -export function setUint16(encoder: Encoder, pos: number, num: number): void; -export function writeUint32(encoder: Encoder, num: number): void; -export function writeUint32BigEndian(encoder: Encoder, num: number): void; -export function setUint32(encoder: Encoder, pos: number, num: number): void; -export function writeVarUint(encoder: Encoder, num: number): void; -export function writeVarInt(encoder: Encoder, num: number): void; -export function _writeVarStringNative(encoder: Encoder, str: string): void; -export function _writeVarStringPolyfill(encoder: Encoder, str: string): void; -export function writeVarString(encoder: Encoder, str: string): void; -export function writeTerminatedString(encoder: Encoder, str: string): void; -export function writeTerminatedUint8Array(encoder: Encoder, buf: Uint8Array): void; -export function writeBinaryEncoder(encoder: Encoder, append: Encoder): void; -export function writeUint8Array(encoder: Encoder, uint8Array: Uint8Array): void; -export function writeVarUint8Array(encoder: Encoder, uint8Array: Uint8Array): void; -export function writeOnDataView(encoder: Encoder, len: number): DataView; -export function writeFloat32(encoder: Encoder, num: number): void; -export function writeFloat64(encoder: Encoder, num: number): void; -export function writeBigInt64(encoder: Encoder, num: bigint): any; -export function writeBigUint64(encoder: Encoder, num: bigint): any; -export function writeAny(encoder: Encoder, data: AnyEncodable): void; -/** - * Now come a few stateful encoder that have their own classes. - */ -/** - * Basic Run Length Encoder - a basic compression implementation. - * - * Encodes [1,1,1,7] to [1,3,7,1] (3 times 1, 1 time 7). This encoder might do more harm than good if there are a lot of values that are not repeated. - * - * It was originally used for image compression. Cool .. article http://csbruce.com/cbm/transactor/pdfs/trans_v7_i06.pdf - * - * @note T must not be null! - * - * @template T - */ -export class RleEncoder extends Encoder { - /** - * @param {function(Encoder, T):void} writer - */ - constructor(writer: (arg0: Encoder, arg1: T) => void); - /** - * The writer - */ - w: (arg0: Encoder, arg1: T) => void; - /** - * Current state - * @type {T|null} - */ - s: T | null; - count: number; - /** - * @param {T} v - */ - write(v: T): void; -} -/** - * Basic diff decoder using variable length encoding. - * - * Encodes the values [3, 1100, 1101, 1050, 0] to [3, 1097, 1, -51, -1050] using writeVarInt. - */ -export class IntDiffEncoder extends Encoder { - /** - * @param {number} start - */ - constructor(start: number); - /** - * Current state - * @type {number} - */ - s: number; - /** - * @param {number} v - */ - write(v: number): void; -} -/** - * A combination of IntDiffEncoder and RleEncoder. - * - * Basically first writes the IntDiffEncoder and then counts duplicate diffs using RleEncoding. - * - * Encodes the values [1,1,1,2,3,4,5,6] as [1,1,0,2,1,5] (RLE([1,0,0,1,1,1,1,1]) ⇒ RleIntDiff[1,1,0,2,1,5]) - */ -export class RleIntDiffEncoder extends Encoder { - /** - * @param {number} start - */ - constructor(start: number); - /** - * Current state - * @type {number} - */ - s: number; - count: number; - /** - * @param {number} v - */ - write(v: number): void; -} -/** - * Optimized Rle encoder that does not suffer from the mentioned problem of the basic Rle encoder. - * - * Internally uses VarInt encoder to write unsigned integers. If the input occurs multiple times, we write - * write it as a negative number. The UintOptRleDecoder then understands that it needs to read a count. - * - * Encodes [1,2,3,3,3] as [1,2,-3,3] (once 1, once 2, three times 3) - */ -export class UintOptRleEncoder { - encoder: Encoder; - /** - * @type {number} - */ - s: number; - count: number; - /** - * @param {number} v - */ - write(v: number): void; - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array(): Uint8Array; -} -/** - * Increasing Uint Optimized RLE Encoder - * - * The RLE encoder counts the number of same occurences of the same value. - * The IncUintOptRle encoder counts if the value increases. - * I.e. 7, 8, 9, 10 will be encoded as [-7, 4]. 1, 3, 5 will be encoded - * as [1, 3, 5]. - */ -export class IncUintOptRleEncoder { - encoder: Encoder; - /** - * @type {number} - */ - s: number; - count: number; - /** - * @param {number} v - */ - write(v: number): void; - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array(): Uint8Array; -} -/** - * A combination of the IntDiffEncoder and the UintOptRleEncoder. - * - * The count approach is similar to the UintDiffOptRleEncoder, but instead of using the negative bitflag, it encodes - * in the LSB whether a count is to be read. Therefore this Encoder only supports 31 bit integers! - * - * Encodes [1, 2, 3, 2] as [3, 1, 6, -1] (more specifically [(1 << 1) | 1, (3 << 0) | 0, -1]) - * - * Internally uses variable length encoding. Contrary to normal UintVar encoding, the first byte contains: - * * 1 bit that denotes whether the next value is a count (LSB) - * * 1 bit that denotes whether this value is negative (MSB - 1) - * * 1 bit that denotes whether to continue reading the variable length integer (MSB) - * - * Therefore, only five bits remain to encode diff ranges. - * - * Use this Encoder only when appropriate. In most cases, this is probably a bad idea. - */ -export class IntDiffOptRleEncoder { - encoder: Encoder; - /** - * @type {number} - */ - s: number; - count: number; - diff: number; - /** - * @param {number} v - */ - write(v: number): void; - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array(): Uint8Array; -} -/** - * Optimized String Encoder. - * - * Encoding many small strings in a simple Encoder is not very efficient. The function call to decode a string takes some time and creates references that must be eventually deleted. - * In practice, when decoding several million small strings, the GC will kick in more and more often to collect orphaned string objects (or maybe there is another reason?). - * - * This string encoder solves the above problem. All strings are concatenated and written as a single string using a single encoding call. - * - * The lengths are encoded using a UintOptRleEncoder. - */ -export class StringEncoder { - /** - * @type {Array} - */ - sarr: Array; - s: string; - lensE: UintOptRleEncoder; - /** - * @param {string} string - */ - write(string: string): void; - toUint8Array(): Uint8Array; -} -export type AnyEncodableArray = Array; -export type AnyEncodable = undefined | null | number | bigint | boolean | string | { - [k: string]: AnyEncodable; -} | AnyEncodableArray | Uint8Array; -//# sourceMappingURL=encoding.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.d.ts.map deleted file mode 100644 index 184d5c4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["encoding.js"],"names":[],"mappings":"AAkCA;;GAEG;AACH;IAEI,aAAa;IACb,8BAA+B;IAC/B;;OAEG;IACH,MAFU,KAAK,CAAC,UAAU,CAAC,CAEb;CAEjB;AAMM,iCAFK,OAAO,CAE6B;AAKzC,0BAFI,CAAS,IAAO,EAAP,OAAO,KAAE,IAAI,2BAMhC;AASM,gCAHI,OAAO,GACN,MAAM,CAQjB;AASM,oCAHI,OAAO,GACN,OAAO,CAE6D;AASzE,sCAHI,OAAO,GACN,UAAU,CAAC,WAAW,CAAC,CAYlC;AASM,mCAHI,OAAO,OACP,MAAM,QAShB;AASM,+B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AEG;IACH,SAFW,CAAC,QAeX;CACF;AAED;;;;GAIG;AACH;IACE;;OAEG;IACH,mBAFW,MAAM,EAShB;IALC;;;OAGG;IACH,GAFU,MAAM,CAEF;IAGhB;;OAEG;IACH,SAFW,MAAM,QAKhB;CACF;AAED;;;;;;GAMG;AACH;IACE;;OAEG;IACH,mBAFW,MAAM,EAUhB;IANC;;;OAGG;IACH,GAFU,MAAM,CAEF;IACd,cAAc;IAGhB;;OAEG;IACH,SAFW,MAAM,QAehB;CACF;AAiBD;;;;;;;GAOG;AACH;IAEI,iBAA4B;IAC5B;;OAEG;IACH,GAFU,MAAM,CAEN;IACV,cAAc;IAGhB;;OAEG;IACH,SAFW,MAAM,QAUhB;IAED;;;;OAIG;IACH,wCAGC;CACF;AAED;;;;;;;GAOG;AACH;IAEI,iBAA4B;IAC5B;;OAEG;IACH,GAFU,MAAM,CAEN;IACV,cAAc;IAGhB;;OAEG;IACH,SAFW,MAAM,QAUhB;IAED;;;;OAIG;IACH,wCAGC;CACF;AAoBD;;;;;;;;;;;;;;;;GAgBG;AACH;IAEI,iBAA4B;IAC5B;;OAEG;IACH,GAFU,MAAM,CAEN;IACV,cAAc;IACd,aAAa;IAGf;;OAEG;IACH,SAFW,MAAM,QAYhB;IAED;;;;OAIG;IACH,wCAGC;CACF;AAED;;;;;;;;;GASG;AACH;IAEI;;OAEG;IACH,MAFU,KAAK,CAAC,MAAM,CAAC,CAET;IACd,UAAW;IACX,yBAAoC;IAGtC;;OAEG;IACH,cAFW,MAAM,QAShB;IAED,wCAOC;CACF;gCAtbY,KAAK,CAAC,YAAY,CAAC;2BAInB,SAAS,GAAC,IAAI,GAAC,MAAM,GAAC,MAAM,GAAC,OAAO,GAAC,MAAM,GAAC;IAAC,CAAC,CAAC,EAAC,MAAM,GAAE,YAAY,CAAA;CAAC,GAAC,iBAAiB,GAAC,UAAU"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.js deleted file mode 100644 index 9668489..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.js +++ /dev/null @@ -1,938 +0,0 @@ -/** - * Efficient schema-less binary encoding with support for variable length encoding. - * - * Use [lib0/encoding] with [lib0/decoding]. Every encoding function has a corresponding decoding function. - * - * Encodes numbers in little-endian order (least to most significant byte order) - * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/) - * which is also used in Protocol Buffers. - * - * ```js - * // encoding step - * const encoder = encoding.createEncoder() - * encoding.writeVarUint(encoder, 256) - * encoding.writeVarString(encoder, 'Hello world!') - * const buf = encoding.toUint8Array(encoder) - * ``` - * - * ```js - * // decoding step - * const decoder = decoding.createDecoder(buf) - * decoding.readVarUint(decoder) // => 256 - * decoding.readVarString(decoder) // => 'Hello world!' - * decoding.hasContent(decoder) // => false - all data is read - * ``` - * - * @module encoding - */ - -import * as math from './math.js' -import * as number from './number.js' -import * as binary from './binary.js' -import * as string from './string.js' -import * as array from './array.js' - -/** - * A BinaryEncoder handles the encoding to an Uint8Array. - */ -export class Encoder { - constructor () { - this.cpos = 0 - this.cbuf = new Uint8Array(100) - /** - * @type {Array} - */ - this.bufs = [] - } -} - -/** - * @function - * @return {Encoder} - */ -export const createEncoder = () => new Encoder() - -/** - * @param {function(Encoder):void} f - */ -export const encode = (f) => { - const encoder = createEncoder() - f(encoder) - return toUint8Array(encoder) -} - -/** - * The current length of the encoded data. - * - * @function - * @param {Encoder} encoder - * @return {number} - */ -export const length = encoder => { - let len = encoder.cpos - for (let i = 0; i < encoder.bufs.length; i++) { - len += encoder.bufs[i].length - } - return len -} - -/** - * Check whether encoder is empty. - * - * @function - * @param {Encoder} encoder - * @return {boolean} - */ -export const hasContent = encoder => encoder.cpos > 0 || encoder.bufs.length > 0 - -/** - * Transform to Uint8Array. - * - * @function - * @param {Encoder} encoder - * @return {Uint8Array} The created ArrayBuffer. - */ -export const toUint8Array = encoder => { - const uint8arr = new Uint8Array(length(encoder)) - let curPos = 0 - for (let i = 0; i < encoder.bufs.length; i++) { - const d = encoder.bufs[i] - uint8arr.set(d, curPos) - curPos += d.length - } - uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos) - return uint8arr -} - -/** - * Verify that it is possible to write `len` bytes wtihout checking. If - * necessary, a new Buffer with the required length is attached. - * - * @param {Encoder} encoder - * @param {number} len - */ -export const verifyLen = (encoder, len) => { - const bufferLen = encoder.cbuf.length - if (bufferLen - encoder.cpos < len) { - encoder.bufs.push(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos)) - encoder.cbuf = new Uint8Array(math.max(bufferLen, len) * 2) - encoder.cpos = 0 - } -} - -/** - * Write one byte to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {number} num The byte that is to be encoded. - */ -export const write = (encoder, num) => { - const bufferLen = encoder.cbuf.length - if (encoder.cpos === bufferLen) { - encoder.bufs.push(encoder.cbuf) - encoder.cbuf = new Uint8Array(bufferLen * 2) - encoder.cpos = 0 - } - encoder.cbuf[encoder.cpos++] = num -} - -/** - * Write one byte at a specific position. - * Position must already be written (i.e. encoder.length > pos) - * - * @function - * @param {Encoder} encoder - * @param {number} pos Position to which to write data - * @param {number} num Unsigned 8-bit integer - */ -export const set = (encoder, pos, num) => { - let buffer = null - // iterate all buffers and adjust position - for (let i = 0; i < encoder.bufs.length && buffer === null; i++) { - const b = encoder.bufs[i] - if (pos < b.length) { - buffer = b // found buffer - } else { - pos -= b.length - } - } - if (buffer === null) { - // use current buffer - buffer = encoder.cbuf - } - buffer[pos] = num -} - -/** - * Write one byte as an unsigned integer. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -export const writeUint8 = write - -/** - * Write one byte as an unsigned Integer at a specific location. - * - * @function - * @param {Encoder} encoder - * @param {number} pos The location where the data will be written. - * @param {number} num The number that is to be encoded. - */ -export const setUint8 = set - -/** - * Write two bytes as an unsigned integer. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -export const writeUint16 = (encoder, num) => { - write(encoder, num & binary.BITS8) - write(encoder, (num >>> 8) & binary.BITS8) -} -/** - * Write two bytes as an unsigned integer at a specific location. - * - * @function - * @param {Encoder} encoder - * @param {number} pos The location where the data will be written. - * @param {number} num The number that is to be encoded. - */ -export const setUint16 = (encoder, pos, num) => { - set(encoder, pos, num & binary.BITS8) - set(encoder, pos + 1, (num >>> 8) & binary.BITS8) -} - -/** - * Write two bytes as an unsigned integer - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -export const writeUint32 = (encoder, num) => { - for (let i = 0; i < 4; i++) { - write(encoder, num & binary.BITS8) - num >>>= 8 - } -} - -/** - * Write two bytes as an unsigned integer in big endian order. - * (most significant byte first) - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -export const writeUint32BigEndian = (encoder, num) => { - for (let i = 3; i >= 0; i--) { - write(encoder, (num >>> (8 * i)) & binary.BITS8) - } -} - -/** - * Write two bytes as an unsigned integer at a specific location. - * - * @function - * @param {Encoder} encoder - * @param {number} pos The location where the data will be written. - * @param {number} num The number that is to be encoded. - */ -export const setUint32 = (encoder, pos, num) => { - for (let i = 0; i < 4; i++) { - set(encoder, pos + i, num & binary.BITS8) - num >>>= 8 - } -} - -/** - * Write a variable length unsigned integer. Max encodable integer is 2^53. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -export const writeVarUint = (encoder, num) => { - while (num > binary.BITS7) { - write(encoder, binary.BIT8 | (binary.BITS7 & num)) - num = math.floor(num / 128) // shift >>> 7 - } - write(encoder, binary.BITS7 & num) -} - -/** - * Write a variable length integer. - * - * We use the 7th bit instead for signaling that this is a negative number. - * - * @function - * @param {Encoder} encoder - * @param {number} num The number that is to be encoded. - */ -export const writeVarInt = (encoder, num) => { - const isNegative = math.isNegativeZero(num) - if (isNegative) { - num = -num - } - // |- whether to continue reading |- whether is negative |- number - write(encoder, (num > binary.BITS6 ? binary.BIT8 : 0) | (isNegative ? binary.BIT7 : 0) | (binary.BITS6 & num)) - num = math.floor(num / 64) // shift >>> 6 - // We don't need to consider the case of num === 0 so we can use a different - // pattern here than above. - while (num > 0) { - write(encoder, (num > binary.BITS7 ? binary.BIT8 : 0) | (binary.BITS7 & num)) - num = math.floor(num / 128) // shift >>> 7 - } -} - -/** - * A cache to store strings temporarily - */ -const _strBuffer = new Uint8Array(30000) -const _maxStrBSize = _strBuffer.length / 3 - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -export const _writeVarStringNative = (encoder, str) => { - if (str.length < _maxStrBSize) { - // We can encode the string into the existing buffer - /* c8 ignore next */ - const written = string.utf8TextEncoder.encodeInto(str, _strBuffer).written || 0 - writeVarUint(encoder, written) - for (let i = 0; i < written; i++) { - write(encoder, _strBuffer[i]) - } - } else { - writeVarUint8Array(encoder, string.encodeUtf8(str)) - } -} - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -export const _writeVarStringPolyfill = (encoder, str) => { - const encodedString = unescape(encodeURIComponent(str)) - const len = encodedString.length - writeVarUint(encoder, len) - for (let i = 0; i < len; i++) { - write(encoder, /** @type {number} */ (encodedString.codePointAt(i))) - } -} - -/** - * Write a variable length string. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -/* c8 ignore next */ -export const writeVarString = (string.utf8TextEncoder && /** @type {any} */ (string.utf8TextEncoder).encodeInto) ? _writeVarStringNative : _writeVarStringPolyfill - -/** - * Write a string terminated by a special byte sequence. This is not very performant and is - * generally discouraged. However, the resulting byte arrays are lexiographically ordered which - * makes this a nice feature for databases. - * - * The string will be encoded using utf8 and then terminated and escaped using writeTerminatingUint8Array. - * - * @function - * @param {Encoder} encoder - * @param {String} str The string that is to be encoded. - */ -export const writeTerminatedString = (encoder, str) => - writeTerminatedUint8Array(encoder, string.encodeUtf8(str)) - -/** - * Write a terminating Uint8Array. Note that this is not performant and is generally - * discouraged. There are few situations when this is needed. - * - * We use 0x0 as a terminating character. 0x1 serves as an escape character for 0x0 and 0x1. - * - * Example: [0,1,2] is encoded to [1,0,1,1,2,0]. 0x0, and 0x1 needed to be escaped using 0x1. Then - * the result is terminated using the 0x0 character. - * - * This is basically how many systems implement null terminated strings. However, we use an escape - * character 0x1 to avoid issues and potenial attacks on our database (if this is used as a key - * encoder for NoSql databases). - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} buf The string that is to be encoded. - */ -export const writeTerminatedUint8Array = (encoder, buf) => { - for (let i = 0; i < buf.length; i++) { - const b = buf[i] - if (b === 0 || b === 1) { - write(encoder, 1) - } - write(encoder, buf[i]) - } - write(encoder, 0) -} - -/** - * Write the content of another Encoder. - * - * @TODO: can be improved! - * - Note: Should consider that when appending a lot of small Encoders, we should rather clone than referencing the old structure. - * Encoders start with a rather big initial buffer. - * - * @function - * @param {Encoder} encoder The enUint8Arr - * @param {Encoder} append The BinaryEncoder to be written. - */ -export const writeBinaryEncoder = (encoder, append) => writeUint8Array(encoder, toUint8Array(append)) - -/** - * Append fixed-length Uint8Array to the encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -export const writeUint8Array = (encoder, uint8Array) => { - const bufferLen = encoder.cbuf.length - const cpos = encoder.cpos - const leftCopyLen = math.min(bufferLen - cpos, uint8Array.length) - const rightCopyLen = uint8Array.length - leftCopyLen - encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos) - encoder.cpos += leftCopyLen - if (rightCopyLen > 0) { - // Still something to write, write right half.. - // Append new buffer - encoder.bufs.push(encoder.cbuf) - // must have at least size of remaining buffer - encoder.cbuf = new Uint8Array(math.max(bufferLen * 2, rightCopyLen)) - // copy array - encoder.cbuf.set(uint8Array.subarray(leftCopyLen)) - encoder.cpos = rightCopyLen - } -} - -/** - * Append an Uint8Array to Encoder. - * - * @function - * @param {Encoder} encoder - * @param {Uint8Array} uint8Array - */ -export const writeVarUint8Array = (encoder, uint8Array) => { - writeVarUint(encoder, uint8Array.byteLength) - writeUint8Array(encoder, uint8Array) -} - -/** - * Create an DataView of the next `len` bytes. Use it to write data after - * calling this function. - * - * ```js - * // write float32 using DataView - * const dv = writeOnDataView(encoder, 4) - * dv.setFloat32(0, 1.1) - * // read float32 using DataView - * const dv = readFromDataView(encoder, 4) - * dv.getFloat32(0) // => 1.100000023841858 (leaving it to the reader to find out why this is the correct result) - * ``` - * - * @param {Encoder} encoder - * @param {number} len - * @return {DataView} - */ -export const writeOnDataView = (encoder, len) => { - verifyLen(encoder, len) - const dview = new DataView(encoder.cbuf.buffer, encoder.cpos, len) - encoder.cpos += len - return dview -} - -/** - * @param {Encoder} encoder - * @param {number} num - */ -export const writeFloat32 = (encoder, num) => writeOnDataView(encoder, 4).setFloat32(0, num, false) - -/** - * @param {Encoder} encoder - * @param {number} num - */ -export const writeFloat64 = (encoder, num) => writeOnDataView(encoder, 8).setFloat64(0, num, false) - -/** - * @param {Encoder} encoder - * @param {bigint} num - */ -export const writeBigInt64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigInt64(0, num, false) - -/** - * @param {Encoder} encoder - * @param {bigint} num - */ -export const writeBigUint64 = (encoder, num) => /** @type {any} */ (writeOnDataView(encoder, 8)).setBigUint64(0, num, false) - -const floatTestBed = new DataView(new ArrayBuffer(4)) -/** - * Check if a number can be encoded as a 32 bit float. - * - * @param {number} num - * @return {boolean} - */ -const isFloat32 = num => { - floatTestBed.setFloat32(0, num) - return floatTestBed.getFloat32(0) === num -} - -/** - * @typedef {Array} AnyEncodableArray - */ - -/** - * @typedef {undefined|null|number|bigint|boolean|string|{[k:string]:AnyEncodable}|AnyEncodableArray|Uint8Array} AnyEncodable - */ - -/** - * Encode data with efficient binary format. - * - * Differences to JSON: - * • Transforms data to a binary format (not to a string) - * • Encodes undefined, NaN, and ArrayBuffer (these can't be represented in JSON) - * • Numbers are efficiently encoded either as a variable length integer, as a - * 32 bit float, as a 64 bit float, or as a 64 bit bigint. - * - * Encoding table: - * - * | Data Type | Prefix | Encoding Method | Comment | - * | ------------------- | -------- | ------------------ | ------- | - * | undefined | 127 | | Functions, symbol, and everything that cannot be identified is encoded as undefined | - * | null | 126 | | | - * | integer | 125 | writeVarInt | Only encodes 32 bit signed integers | - * | float32 | 124 | writeFloat32 | | - * | float64 | 123 | writeFloat64 | | - * | bigint | 122 | writeBigInt64 | | - * | boolean (false) | 121 | | True and false are different data types so we save the following byte | - * | boolean (true) | 120 | | - 0b01111000 so the last bit determines whether true or false | - * | string | 119 | writeVarString | | - * | object | 118 | custom | Writes {length} then {length} key-value pairs | - * | array | 117 | custom | Writes {length} then {length} json values | - * | Uint8Array | 116 | writeVarUint8Array | We use Uint8Array for any kind of binary data | - * - * Reasons for the decreasing prefix: - * We need the first bit for extendability (later we may want to encode the - * prefix with writeVarUint). The remaining 7 bits are divided as follows: - * [0-30] the beginning of the data range is used for custom purposes - * (defined by the function that uses this library) - * [31-127] the end of the data range is used for data encoding by - * lib0/encoding.js - * - * @param {Encoder} encoder - * @param {AnyEncodable} data - */ -export const writeAny = (encoder, data) => { - switch (typeof data) { - case 'string': - // TYPE 119: STRING - write(encoder, 119) - writeVarString(encoder, data) - break - case 'number': - if (number.isInteger(data) && math.abs(data) <= binary.BITS31) { - // TYPE 125: INTEGER - write(encoder, 125) - writeVarInt(encoder, data) - } else if (isFloat32(data)) { - // TYPE 124: FLOAT32 - write(encoder, 124) - writeFloat32(encoder, data) - } else { - // TYPE 123: FLOAT64 - write(encoder, 123) - writeFloat64(encoder, data) - } - break - case 'bigint': - // TYPE 122: BigInt - write(encoder, 122) - writeBigInt64(encoder, data) - break - case 'object': - if (data === null) { - // TYPE 126: null - write(encoder, 126) - } else if (array.isArray(data)) { - // TYPE 117: Array - write(encoder, 117) - writeVarUint(encoder, data.length) - for (let i = 0; i < data.length; i++) { - writeAny(encoder, data[i]) - } - } else if (data instanceof Uint8Array) { - // TYPE 116: ArrayBuffer - write(encoder, 116) - writeVarUint8Array(encoder, data) - } else { - // TYPE 118: Object - write(encoder, 118) - const keys = Object.keys(data) - writeVarUint(encoder, keys.length) - for (let i = 0; i < keys.length; i++) { - const key = keys[i] - writeVarString(encoder, key) - writeAny(encoder, data[key]) - } - } - break - case 'boolean': - // TYPE 120/121: boolean (true/false) - write(encoder, data ? 120 : 121) - break - default: - // TYPE 127: undefined - write(encoder, 127) - } -} - -/** - * Now come a few stateful encoder that have their own classes. - */ - -/** - * Basic Run Length Encoder - a basic compression implementation. - * - * Encodes [1,1,1,7] to [1,3,7,1] (3 times 1, 1 time 7). This encoder might do more harm than good if there are a lot of values that are not repeated. - * - * It was originally used for image compression. Cool .. article http://csbruce.com/cbm/transactor/pdfs/trans_v7_i06.pdf - * - * @note T must not be null! - * - * @template T - */ -export class RleEncoder extends Encoder { - /** - * @param {function(Encoder, T):void} writer - */ - constructor (writer) { - super() - /** - * The writer - */ - this.w = writer - /** - * Current state - * @type {T|null} - */ - this.s = null - this.count = 0 - } - - /** - * @param {T} v - */ - write (v) { - if (this.s === v) { - this.count++ - } else { - if (this.count > 0) { - // flush counter, unless this is the first value (count = 0) - writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw - } - this.count = 1 - // write first value - this.w(this, v) - this.s = v - } - } -} - -/** - * Basic diff decoder using variable length encoding. - * - * Encodes the values [3, 1100, 1101, 1050, 0] to [3, 1097, 1, -51, -1050] using writeVarInt. - */ -export class IntDiffEncoder extends Encoder { - /** - * @param {number} start - */ - constructor (start) { - super() - /** - * Current state - * @type {number} - */ - this.s = start - } - - /** - * @param {number} v - */ - write (v) { - writeVarInt(this, v - this.s) - this.s = v - } -} - -/** - * A combination of IntDiffEncoder and RleEncoder. - * - * Basically first writes the IntDiffEncoder and then counts duplicate diffs using RleEncoding. - * - * Encodes the values [1,1,1,2,3,4,5,6] as [1,1,0,2,1,5] (RLE([1,0,0,1,1,1,1,1]) ⇒ RleIntDiff[1,1,0,2,1,5]) - */ -export class RleIntDiffEncoder extends Encoder { - /** - * @param {number} start - */ - constructor (start) { - super() - /** - * Current state - * @type {number} - */ - this.s = start - this.count = 0 - } - - /** - * @param {number} v - */ - write (v) { - if (this.s === v && this.count > 0) { - this.count++ - } else { - if (this.count > 0) { - // flush counter, unless this is the first value (count = 0) - writeVarUint(this, this.count - 1) // since count is always > 0, we can decrement by one. non-standard encoding ftw - } - this.count = 1 - // write first value - writeVarInt(this, v - this.s) - this.s = v - } - } -} - -/** - * @param {UintOptRleEncoder} encoder - */ -const flushUintOptRleEncoder = encoder => { - if (encoder.count > 0) { - // flush counter, unless this is the first value (count = 0) - // case 1: just a single value. set sign to positive - // case 2: write several values. set sign to negative to indicate that there is a length coming - writeVarInt(encoder.encoder, encoder.count === 1 ? encoder.s : -encoder.s) - if (encoder.count > 1) { - writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw - } - } -} - -/** - * Optimized Rle encoder that does not suffer from the mentioned problem of the basic Rle encoder. - * - * Internally uses VarInt encoder to write unsigned integers. If the input occurs multiple times, we write - * write it as a negative number. The UintOptRleDecoder then understands that it needs to read a count. - * - * Encodes [1,2,3,3,3] as [1,2,-3,3] (once 1, once 2, three times 3) - */ -export class UintOptRleEncoder { - constructor () { - this.encoder = new Encoder() - /** - * @type {number} - */ - this.s = 0 - this.count = 0 - } - - /** - * @param {number} v - */ - write (v) { - if (this.s === v) { - this.count++ - } else { - flushUintOptRleEncoder(this) - this.count = 1 - this.s = v - } - } - - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array () { - flushUintOptRleEncoder(this) - return toUint8Array(this.encoder) - } -} - -/** - * Increasing Uint Optimized RLE Encoder - * - * The RLE encoder counts the number of same occurences of the same value. - * The IncUintOptRle encoder counts if the value increases. - * I.e. 7, 8, 9, 10 will be encoded as [-7, 4]. 1, 3, 5 will be encoded - * as [1, 3, 5]. - */ -export class IncUintOptRleEncoder { - constructor () { - this.encoder = new Encoder() - /** - * @type {number} - */ - this.s = 0 - this.count = 0 - } - - /** - * @param {number} v - */ - write (v) { - if (this.s + this.count === v) { - this.count++ - } else { - flushUintOptRleEncoder(this) - this.count = 1 - this.s = v - } - } - - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array () { - flushUintOptRleEncoder(this) - return toUint8Array(this.encoder) - } -} - -/** - * @param {IntDiffOptRleEncoder} encoder - */ -const flushIntDiffOptRleEncoder = encoder => { - if (encoder.count > 0) { - // 31 bit making up the diff | wether to write the counter - // const encodedDiff = encoder.diff << 1 | (encoder.count === 1 ? 0 : 1) - const encodedDiff = encoder.diff * 2 + (encoder.count === 1 ? 0 : 1) - // flush counter, unless this is the first value (count = 0) - // case 1: just a single value. set first bit to positive - // case 2: write several values. set first bit to negative to indicate that there is a length coming - writeVarInt(encoder.encoder, encodedDiff) - if (encoder.count > 1) { - writeVarUint(encoder.encoder, encoder.count - 2) // since count is always > 1, we can decrement by one. non-standard encoding ftw - } - } -} - -/** - * A combination of the IntDiffEncoder and the UintOptRleEncoder. - * - * The count approach is similar to the UintDiffOptRleEncoder, but instead of using the negative bitflag, it encodes - * in the LSB whether a count is to be read. Therefore this Encoder only supports 31 bit integers! - * - * Encodes [1, 2, 3, 2] as [3, 1, 6, -1] (more specifically [(1 << 1) | 1, (3 << 0) | 0, -1]) - * - * Internally uses variable length encoding. Contrary to normal UintVar encoding, the first byte contains: - * * 1 bit that denotes whether the next value is a count (LSB) - * * 1 bit that denotes whether this value is negative (MSB - 1) - * * 1 bit that denotes whether to continue reading the variable length integer (MSB) - * - * Therefore, only five bits remain to encode diff ranges. - * - * Use this Encoder only when appropriate. In most cases, this is probably a bad idea. - */ -export class IntDiffOptRleEncoder { - constructor () { - this.encoder = new Encoder() - /** - * @type {number} - */ - this.s = 0 - this.count = 0 - this.diff = 0 - } - - /** - * @param {number} v - */ - write (v) { - if (this.diff === v - this.s) { - this.s = v - this.count++ - } else { - flushIntDiffOptRleEncoder(this) - this.count = 1 - this.diff = v - this.s - this.s = v - } - } - - /** - * Flush the encoded state and transform this to a Uint8Array. - * - * Note that this should only be called once. - */ - toUint8Array () { - flushIntDiffOptRleEncoder(this) - return toUint8Array(this.encoder) - } -} - -/** - * Optimized String Encoder. - * - * Encoding many small strings in a simple Encoder is not very efficient. The function call to decode a string takes some time and creates references that must be eventually deleted. - * In practice, when decoding several million small strings, the GC will kick in more and more often to collect orphaned string objects (or maybe there is another reason?). - * - * This string encoder solves the above problem. All strings are concatenated and written as a single string using a single encoding call. - * - * The lengths are encoded using a UintOptRleEncoder. - */ -export class StringEncoder { - constructor () { - /** - * @type {Array} - */ - this.sarr = [] - this.s = '' - this.lensE = new UintOptRleEncoder() - } - - /** - * @param {string} string - */ - write (string) { - this.s += string - if (this.s.length > 19) { - this.sarr.push(this.s) - this.s = '' - } - this.lensE.write(string.length) - } - - toUint8Array () { - const encoder = new Encoder() - this.sarr.push(this.s) - this.s = '' - writeVarString(encoder, this.sarr.join('')) - writeUint8Array(encoder, this.lensE.toUint8Array()) - return toUint8Array(encoder) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.test.d.ts deleted file mode 100644 index 83f548f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.test.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -export function testGolangBinaryEncodingCompatibility(): void; -export function testVerifyLen(): void; -export function testStringEncodingPerformanceNativeVsPolyfill(): void; -export function testDecodingPerformanceNativeVsPolyfill(): void; -export function testStringDecodingPerformance(): void; -export function testAnyEncodeUnknowns(_tc: t.TestCase): void; -export function testAnyEncodeDate(_tc: t.TestCase): void; -export function testEncodeMax32bitUint(_tc: t.TestCase): void; -export function testVarUintEncoding(_tc: t.TestCase): void; -export function testVarIntEncoding(_tc: t.TestCase): void; -export function testRepeatVarUintEncoding(tc: t.TestCase): void; -export function testRepeatVarUintEncoding53bit(tc: t.TestCase): void; -export function testRepeatVarIntEncoding(tc: t.TestCase): void; -export function testRepeatVarIntEncoding53bit(tc: t.TestCase): void; -export function testRepeanntAnyEncoding(tc: t.TestCase): void; -export function testRepeatPeekVarUintEncoding(tc: t.TestCase): void; -export function testRepeatPeekVarIntEncoding(tc: t.TestCase): void; -export function testAnyVsJsonEncoding(tc: t.TestCase): void; -export function testStringEncoding(_tc: t.TestCase): void; -export function testRepeatStringEncoding(tc: t.TestCase): void; -export function testSetMethods(_tc: t.TestCase): void; -export function testRepeatRandomWrites(tc: t.TestCase): void; -export function testWriteUint8ArrayOverflow(_tc: t.TestCase): void; -export function testSetOnOverflow(_tc: t.TestCase): void; -export function testCloneDecoder(_tc: t.TestCase): void; -export function testWriteBinaryEncoder(_tc: t.TestCase): void; -export function testOverflowStringDecoding(tc: t.TestCase): void; -export function testRleEncoder(_tc: t.TestCase): void; -export function testRleIntDiffEncoder(_tc: t.TestCase): void; -export function testUintOptRleEncoder(_tc: t.TestCase): void; -export function testIncUintOptRleEncoder(_tc: t.TestCase): void; -export function testIntDiffRleEncoder(_tc: t.TestCase): void; -export function testIntEncoders(tc: t.TestCase): void; -export function testIntDiffEncoder(_tc: t.TestCase): void; -export function testStringDecoder(tc: t.TestCase): void; -export function testLargeNumberEncoding(tc: t.TestCase): void; -export function testInvalidVarIntEncoding(_tc: t.TestCase): void; -export function testTerminatedEncodering(_tc: t.TestCase): void; -export type EncodingPair = { - read: (arg0: decoding.Decoder) => any; - write: (arg0: encoding.Encoder, arg1: any) => void; - gen: (arg0: prng.PRNG) => any; - compare: (arg0: any, arg1: any) => boolean; - name: string; -}; -import * as t from './testing.js'; -import * as decoding from './decoding.js'; -import * as encoding from './encoding.js'; -import * as prng from './prng.js'; -//# sourceMappingURL=encoding.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.test.d.ts.map deleted file mode 100644 index e687ec4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encoding.test.d.ts","sourceRoot":"","sources":["encoding.test.js"],"names":[],"mappings":"AA6CO,8DAkCN;AAwCM,sCAQN;AAEM,sEA2CN;AAEM,gEAoDN;AAEM,sDAiDN;AAKM,2CAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,uCAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,4CAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,QASpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QAUpB;AAKM,8CAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,mDAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,6CAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,kDAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,4CAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,kDAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,iDAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,0CAFI,CAAC,CAAC,QAAQ,QAkBpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QAWpB;AAKM,6CAFI,CAAC,CAAC,QAAQ,QAGqB;AAKnC,oCAFI,CAAC,CAAC,QAAQ,QAkBpB;AAyCM,2CAFI,CAAC,CAAC,QAAQ,QAgCpB;AAKM,iDAFI,CAAC,CAAC,QAAQ,QAiBpB;AAKM,uCAFI,CAAC,CAAC,QAAQ,QAuBpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAcpB;AAKM,4CAFI,CAAC,CAAC,QAAQ,QAYpB;AAKM,+CAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,oCAFI,CAAC,CAAC,QAAQ,QAkBpB;AAKM,2CAFI,CAAC,CAAC,QAAQ,QAkBpB;AAKM,2CAFI,CAAC,CAAC,QAAQ,QAkBpB;AAKM,8CAFI,CAAC,CAAC,QAAQ,QAkBpB;AAKM,2CAFI,CAAC,CAAC,QAAQ,QAkBpB;AAKM,oCAFI,CAAC,CAAC,QAAQ,QAqCpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QAYpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAyBpB;AAKM,4CAFI,CAAC,CAAC,QAAQ,QAyBpB;AAKM,+CAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,8CAFI,CAAC,CAAC,QAAQ,QAqBpB;;UAvZa,CAAS,IAAgB,EAAhB,QAAQ,CAAC,OAAO,KAAE,GAAG;WAC9B,CAAS,IAAgB,EAAhB,QAAQ,CAAC,OAAO,EAAC,IAAG,EAAH,GAAG,KAAE,IAAI;SACnC,CAAS,IAAS,EAAT,IAAI,CAAC,IAAI,KAAE,GAAG;aACvB,CAAS,IAAG,EAAH,GAAG,EAAC,IAAG,EAAH,GAAG,KAAE,OAAO;UACzB,MAAM;;mBAhdD,cAAc;0BAFP,eAAe;0BADf,eAAe;sBAEnB,WAAW"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.d.ts deleted file mode 100644 index 9366538..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export const isNode: boolean; -export const isBrowser: boolean; -export const isMac: boolean; -export function hasParam(name: string): boolean; -export function getParam(name: string, defaultVal: string): string; -export function getVariable(name: string): string | null; -export function getConf(name: string): string | null; -export function ensureConf(name: string): string; -export function hasConf(name: string): boolean; -export const production: boolean; -/** - * Color is enabled by default if the terminal supports it. - * - * Explicitly enable color using `--color` parameter - * Disable color using `--no-color` parameter or using `NO_COLOR=1` environment variable. - * `FORCE_COLOR=1` enables color and takes precedence over all. - */ -export const supportsColor: boolean; -//# sourceMappingURL=environment.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.d.ts.map deleted file mode 100644 index cbc6b40..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["environment.js"],"names":[],"mappings":"AAcA,6BAA0N;AAG1N,gCAAoG;AAEpG,4BAES;AAyDF,+BAJI,MAAM,GACL,OAAO,CAGwC;AAQpD,+BALI,MAAM,cACN,MAAM,GACL,MAAM,CAIuB;AAOlC,kCAJI,MAAM,GACL,MAAM,GAAC,IAAI,CAM2C;AAO3D,8BAJI,MAAM,GACL,MAAM,GAAC,IAAI,CAIgC;AAOhD,iCAJI,MAAM,GACL,MAAM,CAOjB;AAOM,8BAJI,MAAM,GACL,OAAO,CAIkC;AAGrD,iCAA+C;AAO/C;;;;;;GAMG;AACH,oCASC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.js deleted file mode 100644 index 5bec300..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.js +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Isomorphic module to work access the environment (query params, env variables). - * - * @module environment - */ - -import * as map from './map.js' -import * as string from './string.js' -import * as conditions from './conditions.js' -import * as storage from './storage.js' -import * as f from './function.js' - -/* c8 ignore next 2 */ -// @ts-ignore -export const isNode = typeof process !== 'undefined' && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]' - -/* c8 ignore next */ -export const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && !isNode -/* c8 ignore next 3 */ -export const isMac = typeof navigator !== 'undefined' - ? /Mac/.test(navigator.platform) - : false - -/** - * @type {Map} - */ -let params -const args = [] - -/* c8 ignore start */ -const computeParams = () => { - if (params === undefined) { - if (isNode) { - params = map.create() - const pargs = process.argv - let currParamName = null - for (let i = 0; i < pargs.length; i++) { - const parg = pargs[i] - if (parg[0] === '-') { - if (currParamName !== null) { - params.set(currParamName, '') - } - currParamName = parg - } else { - if (currParamName !== null) { - params.set(currParamName, parg) - currParamName = null - } else { - args.push(parg) - } - } - } - if (currParamName !== null) { - params.set(currParamName, '') - } - // in ReactNative for example this would not be true (unless connected to the Remote Debugger) - } else if (typeof location === 'object') { - params = map.create(); // eslint-disable-next-line no-undef - (location.search || '?').slice(1).split('&').forEach((kv) => { - if (kv.length !== 0) { - const [key, value] = kv.split('=') - params.set(`--${string.fromCamelCase(key, '-')}`, value) - params.set(`-${string.fromCamelCase(key, '-')}`, value) - } - }) - } else { - params = map.create() - } - } - return params -} -/* c8 ignore stop */ - -/** - * @param {string} name - * @return {boolean} - */ -/* c8 ignore next */ -export const hasParam = (name) => computeParams().has(name) - -/** - * @param {string} name - * @param {string} defaultVal - * @return {string} - */ -/* c8 ignore next 2 */ -export const getParam = (name, defaultVal) => - computeParams().get(name) || defaultVal - -/** - * @param {string} name - * @return {string|null} - */ -/* c8 ignore next 4 */ -export const getVariable = (name) => - isNode - ? conditions.undefinedToNull(process.env[name.toUpperCase().replaceAll('-', '_')]) - : conditions.undefinedToNull(storage.varStorage.getItem(name)) - -/** - * @param {string} name - * @return {string|null} - */ -/* c8 ignore next 2 */ -export const getConf = (name) => - computeParams().get('--' + name) || getVariable(name) - -/** - * @param {string} name - * @return {string} - */ -/* c8 ignore next 5 */ -export const ensureConf = (name) => { - const c = getConf(name) - if (c == null) throw new Error(`Expected configuration "${name.toUpperCase().replaceAll('-', '_')}"`) - return c -} - -/** - * @param {string} name - * @return {boolean} - */ -/* c8 ignore next 2 */ -export const hasConf = (name) => - hasParam('--' + name) || getVariable(name) !== null - -/* c8 ignore next */ -export const production = hasConf('production') - -/* c8 ignore next 2 */ -const forceColor = isNode && - f.isOneOf(process.env.FORCE_COLOR, ['true', '1', '2']) - -/* c8 ignore start */ -/** - * Color is enabled by default if the terminal supports it. - * - * Explicitly enable color using `--color` parameter - * Disable color using `--no-color` parameter or using `NO_COLOR=1` environment variable. - * `FORCE_COLOR=1` enables color and takes precedence over all. - */ -export const supportsColor = forceColor || ( - !hasParam('--no-colors') && // @todo deprecate --no-colors - !hasConf('no-color') && - (!isNode || process.stdout.isTTY) && ( - !isNode || - hasParam('--color') || - getVariable('COLORTERM') !== null || - (getVariable('TERM') || '').includes('color') - ) -) -/* c8 ignore stop */ diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.d.ts deleted file mode 100644 index e60d1b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function create(s: string): Error; -export function methodUnimplemented(): never; -export function unexpectedCase(): never; -export function assert(property: boolean): asserts property is true; -//# sourceMappingURL=error.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.d.ts.map deleted file mode 100644 index 6627e0a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["error.js"],"names":[],"mappings":"AAWO,0BAJI,MAAM,GACL,KAAK,CAGsB;AAOhC,uCAHK,KAAK,CAKhB;AAOM,kCAHK,KAAK,CAKhB;AAMM,iCAHI,OAAO,GACN,QAAQ,QAAQ,IAAI,IAAI,CAE8C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.js deleted file mode 100644 index 2be40e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Error helpers. - * - * @module error - */ - -/** - * @param {string} s - * @return {Error} - */ -/* c8 ignore next */ -export const create = s => new Error(s) - -/** - * @throws {Error} - * @return {never} - */ -/* c8 ignore next 3 */ -export const methodUnimplemented = () => { - throw create('Method unimplemented') -} - -/** - * @throws {Error} - * @return {never} - */ -/* c8 ignore next 3 */ -export const unexpectedCase = () => { - throw create('Unexpected case') -} - -/** - * @param {boolean} property - * @return {asserts property is true} - */ -export const assert = property => { if (!property) throw create('Assert failed') } diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.d.ts deleted file mode 100644 index 73d266a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export function enqueue(f: () => void): void; -export function timeout(timeout: number, callback: Function): TimeoutObject; -export function interval(timeout: number, callback: Function): TimeoutObject; -export const Animation: { - new (timeoutId: number): { - _: number; - destroy(): void; - }; -}; -export function animationFrame(cb: (arg0: number) => void): TimeoutObject; -export function idleCallback(cb: Function): TimeoutObject; -export function createDebouncer(timeout: number, triggerAfter?: number): (cb: ((...args: any) => void) | null) => void; -export type TimeoutObject = { - destroy: Function; -}; -//# sourceMappingURL=eventloop.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.d.ts.map deleted file mode 100644 index a68f4da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventloop.d.ts","sourceRoot":"","sources":["eventloop.js"],"names":[],"mappings":"AAyBO,2BAFI,MAAW,IAAI,QAOzB;AA8BM,iCAJI,MAAM,uBAEL,aAAa,CAE+D;AASjF,kCAJI,MAAM,uBAEL,aAAa,CAEkE;AAG3F;oBA9Ba,MAAM;;;;EA8B0G;AAOtH,mCAJI,CAAS,IAAM,EAAN,MAAM,KAAE,IAAI,GACpB,aAAa,CAGmH;AAcrI,4CAJK,aAAa,CAI2G;AAO7H,yCAJI,MAAM,iBACN,MAAM,IAaR,IAHI,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,KAAG,IAAI,CAAC,OAGxB,UAiBV"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.js deleted file mode 100644 index f2d598f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.js +++ /dev/null @@ -1,128 +0,0 @@ -/* global requestIdleCallback, requestAnimationFrame, cancelIdleCallback, cancelAnimationFrame */ - -import * as time from './time.js' - -/** - * Utility module to work with EcmaScript's event loop. - * - * @module eventloop - */ - -/** - * @type {Array} - */ -let queue = [] - -const _runQueue = () => { - for (let i = 0; i < queue.length; i++) { - queue[i]() - } - queue = [] -} - -/** - * @param {function():void} f - */ -export const enqueue = f => { - queue.push(f) - if (queue.length === 1) { - setTimeout(_runQueue, 0) - } -} - -/** - * @typedef {Object} TimeoutObject - * @property {function} TimeoutObject.destroy - */ - -/** - * @param {function(number):void} clearFunction - */ -const createTimeoutClass = clearFunction => class TT { - /** - * @param {number} timeoutId - */ - constructor (timeoutId) { - this._ = timeoutId - } - - destroy () { - clearFunction(this._) - } -} - -const Timeout = createTimeoutClass(clearTimeout) - -/** - * @param {number} timeout - * @param {function} callback - * @return {TimeoutObject} - */ -export const timeout = (timeout, callback) => new Timeout(setTimeout(callback, timeout)) - -const Interval = createTimeoutClass(clearInterval) - -/** - * @param {number} timeout - * @param {function} callback - * @return {TimeoutObject} - */ -export const interval = (timeout, callback) => new Interval(setInterval(callback, timeout)) - -/* c8 ignore next */ -export const Animation = createTimeoutClass(arg => typeof requestAnimationFrame !== 'undefined' && cancelAnimationFrame(arg)) - -/** - * @param {function(number):void} cb - * @return {TimeoutObject} - */ -/* c8 ignore next */ -export const animationFrame = cb => typeof requestAnimationFrame === 'undefined' ? timeout(0, cb) : new Animation(requestAnimationFrame(cb)) - -/* c8 ignore next */ -// @ts-ignore -const Idle = createTimeoutClass(arg => typeof cancelIdleCallback !== 'undefined' && cancelIdleCallback(arg)) - -/** - * Note: this is experimental and is probably only useful in browsers. - * - * @param {function} cb - * @return {TimeoutObject} - */ -/* c8 ignore next 2 */ -// @ts-ignore -export const idleCallback = cb => typeof requestIdleCallback !== 'undefined' ? new Idle(requestIdleCallback(cb)) : timeout(1000, cb) - -/** - * @param {number} timeout Timeout of the debounce action - * @param {number} triggerAfter Optional. Trigger callback after a certain amount of time - * without waiting for debounce. - */ -export const createDebouncer = (timeout, triggerAfter = -1) => { - let timer = -1 - /** - * @type {number?} - */ - let lastCall = null - /** - * @param {((...args: any)=>void)?} cb function to trigger after debounce. If null, it will reset the - * debounce. - */ - return cb => { - clearTimeout(timer) - if (cb) { - if (triggerAfter >= 0) { - const now = time.getUnixTime() - if (lastCall === null) lastCall = now - if (now - lastCall > triggerAfter) { - lastCall = null - timer = /** @type {any} */ (setTimeout(cb, 0)) - return - } - } - timer = /** @type {any} */ (setTimeout(() => { lastCall = null; cb() }, timeout)) - } else { - lastCall = null - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.test.d.ts deleted file mode 100644 index a5ff2f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.test.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function testEventloopOrder(_tc: t.TestCase): Promise<[void, void]>; -export function testTimeout(_tc: t.TestCase): Promise; -export function testInterval(_tc: t.TestCase): Promise; -export function testAnimationFrame(_tc: t.TestCase): Promise; -export function testIdleCallback(_tc: t.TestCase): Promise; -export function testDebouncer(_tc: t.TestCase): Promise; -export function testDebouncerTriggerAfter(_tc: t.TestCase): Promise; -export function testDebouncerClear(_tc: t.TestCase): Promise; -import * as t from './testing.js'; -//# sourceMappingURL=eventloop.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.test.d.ts.map deleted file mode 100644 index 2c13d32..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/eventloop.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventloop.test.d.ts","sourceRoot":"","sources":["eventloop.test.js"],"names":[],"mappings":"AAOO,wCAFI,CAAC,CAAC,QAAQ,yBAkBpB;AAKM,iCAFI,CAAC,CAAC,QAAQ,iBAYpB;AAKM,kCAFI,CAAC,CAAC,QAAQ,iBAepB;AAKM,wCAFI,CAAC,CAAC,QAAQ,iBAOpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,iBAMpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,iBAcpB;AAKM,+CAFI,CAAC,CAAC,QAAQ,iBAyBpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,iBAyBpB;mBAnJkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.d.ts deleted file mode 100644 index 1bd353e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export function callAll(fs: Array, args: Array, i?: number): void; -export function nop(): void; -export function apply(f: () => T): T; -export function id(a: A): A; -export function equalityStrict(a: T, b: T): boolean; -export function equalityFlat(a: Array | object, b: Array | object): boolean; -export function equalityDeep(a: any, b: any): boolean; -export function isOneOf(value: V, options: Array): boolean; -export const isArray: (arg: any) => arg is any[]; -export function isString(s: any): s is string; -export function isNumber(n: any): n is number; -export function is any>(n: any, T: TYPE): n is InstanceType; -export function isTemplate any>(T: TYPE): ( -/** - * @param {any} n - * @return {n is InstanceType} - **/ -n: any) => n is InstanceType; -//# sourceMappingURL=function.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.d.ts.map deleted file mode 100644 index 419b734..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"function.d.ts","sourceRoot":"","sources":["function.js"],"names":[],"mappings":"AAgBO,4BAHI,KAAK,UAAU,QACf,KAAK,CAAC,GAAG,CAAC,oBAYpB;AAEM,4BAAoB;AAOpB,sBAJM,CAAC,KACH,MAAW,CAAC,GACX,CAAC,CAEgB;AAQtB,mBALM,CAAC,KAEH,CAAC,GACA,CAAC,CAEW;AASjB,+BANM,CAAC,KAEH,CAAC,KACD,CAAC,GACA,OAAO,CAE4B;AASxC,6BANM,CAAC,KAEH,KAAK,CAAC,CAAC,CAAC,GAAC,MAAM,KACf,KAAK,CAAC,CAAC,CAAC,GAAC,MAAM,GACd,OAAO,CAEyN;AASrO,gCAJI,GAAG,KACH,GAAG,GACF,OAAO,CA2ElB;AAUM,wBAPM,CAAC,EACG,IAAI,SAAP,CAAE,SAEL,CAAC,WACD,KAAK,CAAC,IAAI,CAAC,WAG4C;AAGlE,iDAAoC;AAM7B,4BAHI,GAAG,GACF,CAAC,UAAU,CAEqC;AAMrD,4BAHI,GAAG,GACF,CAAC,UAAU,CAE2C;AAQ3D,mBAL2C,IAAI,SAAxC,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,KAAK,GAAI,KACtC,GAAG,KACH,IAAI,GACH,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,CAEiB;AAM7C,2BAH2C,IAAI,SAAxC,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,KAAK,GAAI,KACtC,IAAI;AAGb;;;IAGI;AACJ,GAHW,GAGV,KAFW,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,CAEN"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.js deleted file mode 100644 index 77d4370..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.js +++ /dev/null @@ -1,188 +0,0 @@ -/** - * Common functions and function call helpers. - * - * @module function - */ - -import * as array from './array.js' -import * as object from './object.js' -import * as equalityTrait from './trait/equality.js' - -/** - * Calls all functions in `fs` with args. Only throws after all functions were called. - * - * @param {Array} fs - * @param {Array} args - */ -export const callAll = (fs, args, i = 0) => { - try { - for (; i < fs.length; i++) { - fs[i](...args) - } - } finally { - if (i < fs.length) { - callAll(fs, args, i + 1) - } - } -} - -export const nop = () => {} - -/** - * @template T - * @param {function():T} f - * @return {T} - */ -export const apply = f => f() - -/** - * @template A - * - * @param {A} a - * @return {A} - */ -export const id = a => a - -/** - * @template T - * - * @param {T} a - * @param {T} b - * @return {boolean} - */ -export const equalityStrict = (a, b) => a === b - -/** - * @template T - * - * @param {Array|object} a - * @param {Array|object} b - * @return {boolean} - */ -export const equalityFlat = (a, b) => a === b || (a != null && b != null && a.constructor === b.constructor && ((array.isArray(a) && array.equalFlat(a, /** @type {Array} */ (b))) || (typeof a === 'object' && object.equalFlat(a, b)))) - -/* c8 ignore start */ - -/** - * @param {any} a - * @param {any} b - * @return {boolean} - */ -export const equalityDeep = (a, b) => { - if (a === b) { - return true - } - if (a == null || b == null || (a.constructor !== b.constructor && (a.constructor || Object) !== (b.constructor || Object))) { - return false - } - if (a[equalityTrait.EqualityTraitSymbol] != null) { - return a[equalityTrait.EqualityTraitSymbol](b) - } - switch (a.constructor) { - case ArrayBuffer: - a = new Uint8Array(a) - b = new Uint8Array(b) - // eslint-disable-next-line no-fallthrough - case Uint8Array: { - if (a.byteLength !== b.byteLength) { - return false - } - for (let i = 0; i < a.length; i++) { - if (a[i] !== b[i]) { - return false - } - } - break - } - case Set: { - if (a.size !== b.size) { - return false - } - for (const value of a) { - if (!b.has(value)) { - return false - } - } - break - } - case Map: { - if (a.size !== b.size) { - return false - } - for (const key of a.keys()) { - if (!b.has(key) || !equalityDeep(a.get(key), b.get(key))) { - return false - } - } - break - } - case undefined: - case Object: - if (object.size(a) !== object.size(b)) { - return false - } - for (const key in a) { - if (!object.hasProperty(a, key) || !equalityDeep(a[key], b[key])) { - return false - } - } - break - case Array: - if (a.length !== b.length) { - return false - } - for (let i = 0; i < a.length; i++) { - if (!equalityDeep(a[i], b[i])) { - return false - } - } - break - default: - return false - } - return true -} - -/** - * @template V - * @template {V} OPTS - * - * @param {V} value - * @param {Array} options - */ -// @ts-ignore -export const isOneOf = (value, options) => options.includes(value) -/* c8 ignore stop */ - -export const isArray = array.isArray - -/** - * @param {any} s - * @return {s is String} - */ -export const isString = (s) => s && s.constructor === String - -/** - * @param {any} n - * @return {n is Number} - */ -export const isNumber = n => n != null && n.constructor === Number - -/** - * @template {abstract new (...args: any) => any} TYPE - * @param {any} n - * @param {TYPE} T - * @return {n is InstanceType} - */ -export const is = (n, T) => n && n.constructor === T - -/** - * @template {abstract new (...args: any) => any} TYPE - * @param {TYPE} T - */ -export const isTemplate = (T) => - /** - * @param {any} n - * @return {n is InstanceType} - **/ - n => n && n.constructor === T diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.test.d.ts deleted file mode 100644 index 8d7b277..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.test.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function testBasics(_tc: t.TestCase): void; -export function testCallAll(_tc: t.TestCase): void; -export function testDeepEquality(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=function.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.test.d.ts.map deleted file mode 100644 index 2a1bd5e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"function.test.d.ts","sourceRoot":"","sources":["function.test.js"],"names":[],"mappings":"AAMO,gCAFI,CAAC,CAAC,QAAQ,QA+CpB;AAKM,iCAFI,CAAC,CAAC,QAAQ,QAuBpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAkEpB;mBAjJkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.d.ts deleted file mode 100644 index d6d03d6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a GF2 Polynomial abstraction that is not meant for production! - * - * It is easy to understand and it's correctness is as obvious as possible. It can be used to verify - * efficient implementations of algorithms on GF2. - */ -export class GF2Polynomial { - /** - * @type {Set} - */ - degrees: Set; -} -export function createFromBytes(bytes: Uint8Array): GF2Polynomial; -export function toUint8Array(p: GF2Polynomial, byteLength?: number): Uint8Array; -export function createFromUint(uint: number): GF2Polynomial; -export function createRandom(degree: number): GF2Polynomial; -export function getHighestDegree(p: GF2Polynomial): number; -export function addInto(p1: GF2Polynomial, p2: GF2Polynomial): void; -export function orInto(p1: GF2Polynomial, p2: GF2Polynomial): void; -export function add(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function clone(p: GF2Polynomial): GF2Polynomial; -export function addDegreeInto(p: GF2Polynomial, degree: number): void; -export function multiply(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function shiftLeft(p: GF2Polynomial, shift: number): GF2Polynomial; -export function mod(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function modPow(p: GF2Polynomial, e: number, m: GF2Polynomial): GF2Polynomial; -export function gcd(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function equals(p1: GF2Polynomial, p2: GF2Polynomial): boolean; -export function isIrreducibleBenOr(p: GF2Polynomial): boolean; -export function createIrreducible(degree: number): GF2Polynomial; -export function fingerprint(buf: Uint8Array, m: GF2Polynomial): Uint8Array; -export class RabinPolynomialEncoder { - /** - * @param {GF2Polynomial} m The irreducible polynomial - */ - constructor(m: GF2Polynomial); - fingerprint: GF2Polynomial; - m: GF2Polynomial; - /** - * @param {number} b - */ - write(b: number): void; - getFingerprint(): Uint8Array; -} -//# sourceMappingURL=rabin-gf2-polynomial.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.d.ts.map deleted file mode 100644 index c2aad23..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin-gf2-polynomial.d.ts","sourceRoot":"","sources":["rabin-gf2-polynomial.js"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH;IAEI;;QAEI;IACJ,SAFW,GAAG,CAAC,MAAM,CAAC,CAEE;CAE3B;AAOM,uCAFI,UAAU,iBAcpB;AAQM,gCAHI,aAAa,eACb,MAAM,2BAahB;AAOM,qCAFI,MAAM,iBAQhB;AAOM,qCAFI,MAAM,iBAYhB;AAMM,oCAHI,aAAa,UAG2D;AAU5E,4BAHI,aAAa,MACb,aAAa,QAUvB;AAUM,2BAHI,aAAa,MACb,aAAa,QAMvB;AAUM,wBAHI,aAAa,MACb,aAAa,iBAevB;AASM,yBAFI,aAAa,iBAMvB;AAUM,iCAHI,aAAa,UACb,MAAM,QAQhB;AAQM,6BAHI,aAAa,MACb,aAAa,iBAUvB;AAQM,6BAHI,aAAa,SACb,MAAM,iBAShB;AAQM,wBAHI,aAAa,MACb,aAAa,iBAavB;AAWM,0BAJI,aAAa,KACb,MAAM,KACN,aAAa,iBAcvB;AAQM,wBAHI,aAAa,MACb,aAAa,iBASvB;AAQM,2BAHI,aAAa,MACb,aAAa,WAQvB;AAgCM,sCAFI,aAAa,WAYvB;AAKM,0CAFI,MAAM,iBAOhB;AAQM,iCAHI,UAAU,KACV,aAAa,2BAE0G;AAElI;IACE;;OAEG;IACH,eAFW,aAAa,EAKvB;IAFC,2BAAsC;IACtC,iBAAU;IAGZ;;OAEG;IACH,SAFW,MAAM,QAOhB;IAED,0CAEC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.js deleted file mode 100644 index 6ae87b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-gf2-polynomial.js +++ /dev/null @@ -1,379 +0,0 @@ -/** - * The idea of the Rabin fingerprint algorithm is to represent the binary as a polynomial in a - * finite field (Galois Field G(2)). The polynomial will then be taken "modulo" by an irreducible - * polynomial of the desired size. - * - * This implementation is inefficient and is solely used to verify the actually performant - * implementation in `./rabin.js`. - * - * @module rabin-gf2-polynomial - */ - -import * as math from '../math.js' -import * as webcrypto from 'lib0/webcrypto' -import * as array from '../array.js' -import * as buffer from '../buffer.js' - -/** - * @param {number} degree - */ -const _degreeToMinByteLength = degree => math.floor(degree / 8) + 1 - -/** - * This is a GF2 Polynomial abstraction that is not meant for production! - * - * It is easy to understand and it's correctness is as obvious as possible. It can be used to verify - * efficient implementations of algorithms on GF2. - */ -export class GF2Polynomial { - constructor () { - /** - * @type {Set} - */ - this.degrees = new Set() - } -} - -/** - * From Uint8Array (MSB). - * - * @param {Uint8Array} bytes - */ -export const createFromBytes = bytes => { - const p = new GF2Polynomial() - for (let bsi = bytes.length - 1, currDegree = 0; bsi >= 0; bsi--) { - const currByte = bytes[bsi] - for (let i = 0; i < 8; i++) { - if (((currByte >>> i) & 1) === 1) { - p.degrees.add(currDegree) - } - currDegree++ - } - } - return p -} - -/** - * Transform to Uint8Array (MSB). - * - * @param {GF2Polynomial} p - * @param {number} byteLength - */ -export const toUint8Array = (p, byteLength = _degreeToMinByteLength(getHighestDegree(p))) => { - const buf = buffer.createUint8ArrayFromLen(byteLength) - /** - * @param {number} i - */ - const setBit = i => { - const bi = math.floor(i / 8) - buf[buf.length - 1 - bi] |= (1 << (i % 8)) - } - p.degrees.forEach(setBit) - return buf -} - -/** - * Create from unsigned integer (max 32bit uint) - read most-significant-byte first. - * - * @param {number} uint - */ -export const createFromUint = uint => { - const buf = new Uint8Array(4) - for (let i = 0; i < 4; i++) { - buf[i] = uint >>> 8 * (3 - i) - } - return createFromBytes(buf) -} - -/** - * Create a random polynomial of a specified degree. - * - * @param {number} degree - */ -export const createRandom = degree => { - const bs = new Uint8Array(_degreeToMinByteLength(degree)) - webcrypto.getRandomValues(bs) - // Get first byte and explicitly set the bit of "degree" to 1 (the result must have the specified - // degree). - const firstByte = bs[0] | 1 << (degree % 8) - // Find out how many bits of the first byte need to be filled with zeros because they are >degree. - const zeros = 7 - (degree % 8) - bs[0] = ((firstByte << zeros) & 0xff) >>> zeros - return createFromBytes(bs) -} - -/** - * @param {GF2Polynomial} p - * @return number - */ -export const getHighestDegree = p => array.fold(array.from(p.degrees), 0, math.max) - -/** - * Add (+) p2 int the p1 polynomial. - * - * Addition is defined as xor in F2. Substraction is equivalent to addition in F2. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -export const addInto = (p1, p2) => { - p2.degrees.forEach(degree => { - if (p1.degrees.has(degree)) { - p1.degrees.delete(degree) - } else { - p1.degrees.add(degree) - } - }) -} - -/** - * Or (|) p2 into the p1 polynomial. - * - * Addition is defined as xor in F2. Substraction is equivalent to addition in F2. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -export const orInto = (p1, p2) => { - p2.degrees.forEach(degree => { - p1.degrees.add(degree) - }) -} - -/** - * Add (+) p2 to the p1 polynomial. - * - * Addition is defined as xor in F2. Substraction is equivalent to addition in F2. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -export const add = (p1, p2) => { - const result = new GF2Polynomial() - p2.degrees.forEach(degree => { - if (!p1.degrees.has(degree)) { - result.degrees.add(degree) - } - }) - p1.degrees.forEach(degree => { - if (!p2.degrees.has(degree)) { - result.degrees.add(degree) - } - }) - return result -} - -/** - * Add (+) p2 to the p1 polynomial. - * - * Addition is defined as xor in F2. Substraction is equivalent to addition in F2. - * - * @param {GF2Polynomial} p - */ -export const clone = (p) => { - const result = new GF2Polynomial() - p.degrees.forEach(d => result.degrees.add(d)) - return result -} - -/** - * Add (+) p2 to the p1 polynomial. - * - * Addition is defined as xor in F2. Substraction is equivalent to addition in F2. - * - * @param {GF2Polynomial} p - * @param {number} degree - */ -export const addDegreeInto = (p, degree) => { - if (p.degrees.has(degree)) { - p.degrees.delete(degree) - } else { - p.degrees.add(degree) - } -} - -/** - * Multiply (•) p1 with p2 and store the result in p1. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -export const multiply = (p1, p2) => { - const result = new GF2Polynomial() - p1.degrees.forEach(degree1 => { - p2.degrees.forEach(degree2 => { - addDegreeInto(result, degree1 + degree2) - }) - }) - return result -} - -/** - * Multiply (•) p1 with p2 and store the result in p1. - * - * @param {GF2Polynomial} p - * @param {number} shift - */ -export const shiftLeft = (p, shift) => { - const result = new GF2Polynomial() - p.degrees.forEach(degree => { - const r = degree + shift - r >= 0 && result.degrees.add(r) - }) - return result -} - -/** - * Computes p1 % p2. I.e. the remainder of p1/p2. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -export const mod = (p1, p2) => { - const maxDeg1 = getHighestDegree(p1) - const maxDeg2 = getHighestDegree(p2) - const result = clone(p1) - for (let i = maxDeg1 - maxDeg2; i >= 0; i--) { - if (result.degrees.has(maxDeg2 + i)) { - const shifted = shiftLeft(p2, i) - addInto(result, shifted) - } - } - return result -} - -/** - * Computes (p^e mod m). - * - * http://en.wikipedia.org/wiki/Modular_exponentiation - * - * @param {GF2Polynomial} p - * @param {number} e - * @param {GF2Polynomial} m - */ -export const modPow = (p, e, m) => { - let result = ONE - while (true) { - if ((e & 1) === 1) { - result = mod(multiply(result, p), m) - } - e >>>= 1 - if (e === 0) { - return result - } - p = mod(multiply(p, p), m) - } -} - -/** - * Find the greatest common divisor using Euclid's Algorithm. - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -export const gcd = (p1, p2) => { - while (p2.degrees.size > 0) { - const modded = mod(p1, p2) - p1 = p2 - p2 = modded - } - return p1 -} - -/** - * true iff p1 equals p2 - * - * @param {GF2Polynomial} p1 - * @param {GF2Polynomial} p2 - */ -export const equals = (p1, p2) => { - if (p1.degrees.size !== p2.degrees.size) return false - for (const d of p1.degrees) { - if (!p2.degrees.has(d)) return false - } - return true -} - -const X = createFromBytes(new Uint8Array([2])) -const ONE = createFromBytes(new Uint8Array([1])) - -/** - * Computes ( x^(2^p) - x ) mod f - * - * (shamelessly copied from - * https://github.com/opendedup/rabinfingerprint/blob/master/src/org/rabinfingerprint/polynomial/Polynomial.java) - * - * @param {GF2Polynomial} f - * @param {number} p - */ -const reduceExponent = (f, p) => { - // compute (x^q^p mod f) - const q2p = math.pow(2, p) - const x2q2p = modPow(X, q2p, f) - // subtract (x mod f) - return mod(add(x2q2p, X), f) -} - -/** - * BenOr Reducibility Test - * - * Tests and Constructions of Irreducible Polynomials over Finite Fields - * (1997) Shuhong Gao, Daniel Panario - * - * http://citeseer.ist.psu.edu/cache/papers/cs/27167/http:zSzzSzwww.math.clemson.eduzSzfacultyzSzGaozSzpaperszSzGP97a.pdf/gao97tests.pdf - * - * @param {GF2Polynomial} p - */ -export const isIrreducibleBenOr = p => { - const degree = getHighestDegree(p) - for (let i = 1; i < degree / 2; i++) { - const b = reduceExponent(p, i) - const g = gcd(p, b) - if (!equals(g, ONE)) { - return false - } - } - return true -} - -/** - * @param {number} degree - */ -export const createIrreducible = degree => { - while (true) { - const p = createRandom(degree) - if (isIrreducibleBenOr(p)) return p - } -} - -/** - * Create a fingerprint of buf using the irreducible polynomial m. - * - * @param {Uint8Array} buf - * @param {GF2Polynomial} m - */ -export const fingerprint = (buf, m) => toUint8Array(mod(createFromBytes(buf), m), _degreeToMinByteLength(getHighestDegree(m) - 1)) - -export class RabinPolynomialEncoder { - /** - * @param {GF2Polynomial} m The irreducible polynomial - */ - constructor (m) { - this.fingerprint = new GF2Polynomial() - this.m = m - } - - /** - * @param {number} b - */ - write (b) { - const bp = createFromBytes(new Uint8Array([b])) - const fingerprint = shiftLeft(this.fingerprint, 8) - orInto(fingerprint, bp) - this.fingerprint = mod(fingerprint, this.m) - } - - getFingerprint () { - return toUint8Array(this.fingerprint, _degreeToMinByteLength(getHighestDegree(this.m) - 1)) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.d.ts deleted file mode 100644 index 5adc6e2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export class RabinUncachedEncoder { - /** - * @param {Uint8Array} m assert(m[0] === 1) - */ - constructor(m: Uint8Array); - m: Uint8Array; - blen: number; - bs: Uint8Array; - /** - * This describes the position of the most significant byte (starts with 0 and increases with - * shift) - */ - bpos: number; - /** - * Add/Xor/Substract bytes. - * - * Discards bytes that are out of range. - * @todo put this in function or inline - * - * @param {Uint8Array} cs - */ - add(cs: Uint8Array): void; - /** - * @param {number} byte - */ - write(byte: number): void; - getFingerprint(): Uint8Array; -} -//# sourceMappingURL=rabin-uncached.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.d.ts.map deleted file mode 100644 index 06473af..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin-uncached.d.ts","sourceRoot":"","sources":["rabin-uncached.js"],"names":[],"mappings":"AAUA;IACE;;OAEG;IACH,eAFW,UAAU,EAWpB;IARC,+BAAU;IACV,aAAwB;IACxB,4BAAmC;IACnC;;;OAGG;IACH,aAAa;IAGf;;;;;;;OAOG;IACH,QAFW,UAAU,QAQpB;IAED;;OAEG;IACH,YAFW,MAAM,QAgBhB;IAED,0CAMC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.js deleted file mode 100644 index f40da97..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin-uncached.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * It is not recommended to use this package. This is the uncached implementation of the rabin - * fingerprint algorithm. However, it can be used to verify the `rabin.js` implementation. - * - * @module rabin-uncached - */ - -import * as math from '../math.js' -import * as buffer from '../buffer.js' - -export class RabinUncachedEncoder { - /** - * @param {Uint8Array} m assert(m[0] === 1) - */ - constructor (m) { - this.m = m - this.blen = m.byteLength - this.bs = new Uint8Array(this.blen) - /** - * This describes the position of the most significant byte (starts with 0 and increases with - * shift) - */ - this.bpos = 0 - } - - /** - * Add/Xor/Substract bytes. - * - * Discards bytes that are out of range. - * @todo put this in function or inline - * - * @param {Uint8Array} cs - */ - add (cs) { - const copyLen = math.min(this.blen, cs.byteLength) - // copy from right to left until max is reached - for (let i = 0; i < copyLen; i++) { - this.bs[(this.bpos + this.blen - i - 1) % this.blen] ^= cs[cs.byteLength - i - 1] - } - } - - /** - * @param {number} byte - */ - write (byte) { - // [0,m1,m2,b] - // x <- bpos - // Shift one byte to the left, add b - this.bs[this.bpos] = byte - this.bpos = (this.bpos + 1) % this.blen - // mod - for (let i = 7; i >= 0; i--) { - if (((this.bs[this.bpos] >>> i) & 1) === 1) { - this.add(buffer.shiftNBitsLeft(this.m, i)) - } - } - // if (this.bs[this.bpos] !== 0) { error.unexpectedCase() } - // assert(this.bs[this.bpos] === 0) - } - - getFingerprint () { - const result = new Uint8Array(this.blen - 1) - for (let i = 0; i < result.byteLength; i++) { - result[i] = this.bs[(this.bpos + i + 1) % this.blen] - } - return result - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.d.ts deleted file mode 100644 index cd3061a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export const StandardIrreducible8: Uint8Array; -export const StandardIrreducible16: Uint8Array; -export const StandardIrreducible32: Uint8Array; -export const StandardIrreducible64: Uint8Array; -export const StandardIrreducible128: Uint8Array; -export class RabinEncoder { - /** - * @param {Uint8Array} m assert(m[0] === 1) - */ - constructor(m: Uint8Array); - m: Uint8Array; - blen: number; - bs: Uint8Array; - cache: Uint8Array; - /** - * This describes the position of the most significant byte (starts with 0 and increases with - * shift) - */ - bpos: number; - /** - * @param {number} byte - */ - write(byte: number): void; - getFingerprint(): Uint8Array; -} -export function fingerprint(irreducible: Uint8Array, data: Uint8Array): Uint8Array; -//# sourceMappingURL=rabin.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.d.ts.map deleted file mode 100644 index 108c536..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin.d.ts","sourceRoot":"","sources":["rabin.js"],"names":[],"mappings":"AAUA,2DAA4D;AAC5D,4DAAkE;AAClE,4DAA4E;AAC5E,4DAA+F;AAC/F,6DAAmI;AAmCnI;IACE;;OAEG;IACH,eAFW,UAAU,EAYpB;IATC,+BAAU;IACV,aAAwB;IACxB,4BAAmC;IACnC,+BAA2B;IAC3B;;;OAGG;IACH,aAAa;IAGf;;OAEG;IACH,YAFW,MAAM,QAYhB;IAED,0CAMC;CACF;AAMM,yCAHI,UAAU,QACV,UAAU,2BAQpB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.js deleted file mode 100644 index d5690f1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.js +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @module rabin - * - * Very efficient & versatile fingerprint/hashing algorithm. However, it is not cryptographically - * secure. Well suited for fingerprinting. - */ - -import * as buffer from '../buffer.js' -import * as map from '../map.js' - -export const StandardIrreducible8 = new Uint8Array([1, 221]) -export const StandardIrreducible16 = new Uint8Array([1, 244, 157]) -export const StandardIrreducible32 = new Uint8Array([1, 149, 183, 205, 191]) -export const StandardIrreducible64 = new Uint8Array([1, 133, 250, 114, 193, 250, 28, 193, 231]) -export const StandardIrreducible128 = new Uint8Array([1, 94, 109, 166, 228, 6, 222, 102, 239, 27, 128, 184, 13, 50, 112, 169, 199]) - -/** - * Maps from a modulo to the precomputed values. - * - * @type {Map} - */ -const _precomputedFingerprintCache = new Map() - -/** - * @param {Uint8Array} m - */ -const ensureCache = m => map.setIfUndefined(_precomputedFingerprintCache, buffer.toBase64(m), () => { - const byteLen = m.byteLength - const cache = new Uint8Array(256 * byteLen) - // Use dynamic computing to compute the cached results. - // Starting values: cache(0) = 0; cache(1) = m - cache.set(m, byteLen) - for (let bit = 1; bit < 8; bit++) { - const mBitShifted = buffer.shiftNBitsLeft(m, bit) - const bitShifted = 1 << bit - for (let j = 0; j < bitShifted; j++) { - // apply the shifted result (reducing the degree of the polynomial) - const msb = bitShifted | j - const rest = msb ^ mBitShifted[0] - for (let i = 0; i < byteLen; i++) { - // rest is already precomputed in the cache - cache[msb * byteLen + i] = cache[rest * byteLen + i] ^ mBitShifted[i] - } - // if (cache[(bitShifted | j) * byteLen] !== (bitShifted | j)) { error.unexpectedCase() } - } - } - return cache -}) - -export class RabinEncoder { - /** - * @param {Uint8Array} m assert(m[0] === 1) - */ - constructor (m) { - this.m = m - this.blen = m.byteLength - this.bs = new Uint8Array(this.blen) - this.cache = ensureCache(m) - /** - * This describes the position of the most significant byte (starts with 0 and increases with - * shift) - */ - this.bpos = 0 - } - - /** - * @param {number} byte - */ - write (byte) { - // assert(this.bs[0] === 0) - // Shift one byte to the left, add b - this.bs[this.bpos] = byte - this.bpos = (this.bpos + 1) % this.blen - const msb = this.bs[this.bpos] - for (let i = 0; i < this.blen; i++) { - this.bs[(this.bpos + i) % this.blen] ^= this.cache[msb * this.blen + i] - } - // assert(this.bs[this.bpos] === 0) - } - - getFingerprint () { - const result = new Uint8Array(this.blen - 1) - for (let i = 0; i < result.byteLength; i++) { - result[i] = this.bs[(this.bpos + i + 1) % this.blen] - } - return result - } -} - -/** - * @param {Uint8Array} irreducible - * @param {Uint8Array} data - */ -export const fingerprint = (irreducible, data) => { - const encoder = new RabinEncoder(irreducible) - for (let i = 0; i < data.length; i++) { - encoder.write(data[i]) - } - return encoder.getFingerprint() -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.test.d.ts deleted file mode 100644 index 6ed6dd5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.test.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function testPolynomialBasics(_tc: t.TestCase): void; -export function testIrreducibleInput(_tc: t.TestCase): void; -export function testIrreducibleSpread(_tc: t.TestCase): void; -export function testGenerateIrreducibles(_tc: t.TestCase): void; -export function testFingerprintCompatiblity(tc: t.TestCase): void; -export function testConflicts(tc: t.TestCase): void; -import * as t from '../testing.js'; -//# sourceMappingURL=rabin.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.test.d.ts.map deleted file mode 100644 index ae118d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/rabin.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin.test.d.ts","sourceRoot":"","sources":["rabin.test.js"],"names":[],"mappings":"AAaO,0CAFI,CAAC,CAAC,QAAQ,QASpB;AAKM,0CAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,2CAFI,CAAC,CAAC,QAAQ,QASpB;AAwBM,8CAFI,CAAC,CAAC,QAAQ,QAyBpB;AAmGM,gDAFI,CAAC,CAAC,QAAQ,QAQpB;AAKM,kCAFI,CAAC,CAAC,QAAQ,QA4BpB;mBAvOkB,eAAe"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.d.ts deleted file mode 100644 index b3014a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function digest(data: Uint8Array): Uint8Array; -//# sourceMappingURL=sha256.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.d.ts.map deleted file mode 100644 index 666f53e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.d.ts","sourceRoot":"","sources":["sha256.js"],"names":[],"mappings":"AA+KO,6BAFI,UAAU,2BAEkC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.js deleted file mode 100644 index 170c2bb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.js +++ /dev/null @@ -1,176 +0,0 @@ -/** - * @module sha256 - * Spec: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf - * Resources: - * - https://web.archive.org/web/20150315061807/http://csrc.nist.gov/groups/STM/cavp/documents/shs/sha256-384-512.pdf - */ - -import * as binary from '../binary.js' - -/** - * @param {number} w - a 32bit uint - * @param {number} shift - */ -const rotr = (w, shift) => (w >>> shift) | (w << (32 - shift)) - -/** - * Helper for SHA-224 & SHA-256. See 4.1.2. - * @param {number} x - */ -const sum0to256 = x => rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22) - -/** - * Helper for SHA-224 & SHA-256. See 4.1.2. - * @param {number} x - */ -const sum1to256 = x => rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25) - -/** - * Helper for SHA-224 & SHA-256. See 4.1.2. - * @param {number} x - */ -const sigma0to256 = x => rotr(x, 7) ^ rotr(x, 18) ^ x >>> 3 - -/** - * Helper for SHA-224 & SHA-256. See 4.1.2. - * @param {number} x - */ -const sigma1to256 = x => rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10 - -// @todo don't init these variables globally - -/** - * See 4.2.2: Constant for sha256 & sha224 - * These words represent the first thirty-two bits of the fractional parts of - * the cube roots of the first sixty-four prime numbers. In hex, these constant words are (from left to - * right) - */ -const K = new Uint32Array([ - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -]) - -/** - * See 5.3.3. Initial hash value. - * - * These words were obtained by taking the first thirty-two bits of the fractional parts of the - * square roots of the first eight prime numbers. - * - * @todo shouldn't be a global variable - */ -const HINIT = new Uint32Array([ - 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 -]) - -// time to beat: (large value < 4.35s) - -class Hasher { - constructor () { - const buf = new ArrayBuffer(64 + 64 * 4) - // Init working variables using a single arraybuffer - this._H = new Uint32Array(buf, 0, 8) - this._H.set(HINIT) - // "Message schedule" - a working variable - this._W = new Uint32Array(buf, 64, 64) - } - - _updateHash () { - const H = this._H - const W = this._W - for (let t = 16; t < 64; t++) { - W[t] = sigma1to256(W[t - 2]) + W[t - 7] + sigma0to256(W[t - 15]) + W[t - 16] - } - let a = H[0] - let b = H[1] - let c = H[2] - let d = H[3] - let e = H[4] - let f = H[5] - let g = H[6] - let h = H[7] - for (let tt = 0, T1, T2; tt < 64; tt++) { - T1 = (h + sum1to256(e) + ((e & f) ^ (~e & g)) + K[tt] + W[tt]) >>> 0 - T2 = (sum0to256(a) + ((a & b) ^ (a & c) ^ (b & c))) >>> 0 - h = g - g = f - f = e - e = (d + T1) >>> 0 - d = c - c = b - b = a - a = (T1 + T2) >>> 0 - } - H[0] += a - H[1] += b - H[2] += c - H[3] += d - H[4] += e - H[5] += f - H[6] += g - H[7] += h - } - - /** - * Returns a 32-byte hash. - * - * @param {Uint8Array} data - */ - digest (data) { - let i = 0 - for (; i + 56 <= data.length;) { - // write data in big endianess - let j = 0 - for (; j < 16 && i + 3 < data.length; j++) { - this._W[j] = data[i++] << 24 | data[i++] << 16 | data[i++] << 8 | data[i++] - } - if (i % 64 !== 0) { // there is still room to write partial content and the ending bit. - this._W.fill(0, j, 16) - while (i < data.length) { - this._W[j] |= data[i] << ((3 - (i % 4)) * 8) - i++ - } - this._W[j] |= binary.BIT8 << ((3 - (i % 4)) * 8) - } - this._updateHash() - } - // same check as earlier - the ending bit has been written - const isPaddedWith1 = i % 64 !== 0 - this._W.fill(0, 0, 16) - let j = 0 - for (; i < data.length; j++) { - for (let ci = 3; ci >= 0 && i < data.length; ci--) { - this._W[j] |= data[i++] << (ci * 8) - } - } - // Write padding of the message. See 5.1.2. - if (!isPaddedWith1) { - this._W[j - (i % 4 === 0 ? 0 : 1)] |= binary.BIT8 << ((3 - (i % 4)) * 8) - } - // write length of message (size in bits) as 64 bit uint - // @todo test that this works correctly - this._W[14] = data.byteLength / binary.BIT30 // same as data.byteLength >>> 30 - but works on floats - this._W[15] = data.byteLength * 8 - this._updateHash() - // correct H endianness to use big endiannes and return a Uint8Array - const dv = new Uint8Array(32) - for (let i = 0; i < this._H.length; i++) { - for (let ci = 0; ci < 4; ci++) { - dv[i * 4 + ci] = this._H[i] >>> (3 - ci) * 8 - } - } - return dv - } -} - -/** - * Returns a 32-byte hash. - * - * @param {Uint8Array} data - */ -export const digest = data => new Hasher().digest(data) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.d.ts deleted file mode 100644 index e5e6591..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function digest(data: Uint8Array): Buffer; -//# sourceMappingURL=sha256.node.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.d.ts.map deleted file mode 100644 index 50eeb78..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.node.d.ts","sourceRoot":"","sources":["sha256.node.js"],"names":[],"mappings":"AAKO,6BAFI,UAAU,2BAMpB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.js deleted file mode 100644 index 55c3c77..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.node.js +++ /dev/null @@ -1,10 +0,0 @@ -import { createHash } from 'node:crypto' - -/** - * @param {Uint8Array} data - */ -export const digest = data => { - const hasher = createHash('sha256') - hasher.update(data) - return hasher.digest() -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.test.d.ts deleted file mode 100644 index 39fc538..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.test.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function testSelfReferencingHash(_tc: t.TestCase): void; -export function testSha256Basics(_tc: t.TestCase): Promise; -export function testLargeValue(_tc: t.TestCase): Promise; -export function testRepeatSha256Hashing(tc: t.TestCase): Promise; -export function testBenchmarkSha256(_tc: t.TestCase): Promise; -import * as t from '../testing.js'; -//# sourceMappingURL=sha256.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.test.d.ts.map deleted file mode 100644 index 09f6c9e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/hash/sha256.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.test.d.ts","sourceRoot":"","sources":["sha256.test.js"],"names":[],"mappings":"AAcO,6CAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,iBA2BpB;AAOM,oCAFI,CAAC,CAAC,QAAQ,iBA4BpB;AAKM,4CAFI,CAAC,CAAC,QAAQ,iBAQpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,iBAmDpB;mBAjJkB,eAAe"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.d.ts deleted file mode 100644 index 8aa3ac2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import * as array from './array.js'; -import * as binary from './binary.js'; -import * as broadcastchannel from './broadcastchannel.js'; -import * as buffer from './buffer.js'; -import * as conditions from './conditions.js'; -import * as decoding from './decoding.js'; -import * as diff from './diff.js'; -import * as dom from './dom.js'; -import * as encoding from './encoding.js'; -import * as environment from './environment.js'; -import * as error from './error.js'; -import * as eventloop from './eventloop.js'; -import * as func from './function.js'; -import * as indexeddb from './indexeddb.js'; -import * as iterator from './iterator.js'; -import * as json from './json.js'; -import * as logging from 'lib0/logging'; -import * as map from './map.js'; -import * as math from './math.js'; -import * as mutex from './mutex.js'; -import * as number from './number.js'; -import * as object from './object.js'; -import * as pair from './pair.js'; -import * as prng from './prng.js'; -import * as promise from './promise.js'; -import * as set from './set.js'; -import * as sort from './sort.js'; -import * as statistics from './statistics.js'; -import * as string from './string.js'; -import * as symbol from './symbol.js'; -import * as time from './time.js'; -import * as tree from './tree.js'; -import * as websocket from './websocket.js'; -export { array, binary, broadcastchannel, buffer, conditions, decoding, diff, dom, encoding, environment, error, eventloop, func, indexeddb, iterator, json, logging, map, math, mutex, number, object, pair, prng, promise, set, sort, statistics, string, symbol, time, tree, websocket }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.d.ts.map deleted file mode 100644 index 1e8cb8e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"uBAQuB,YAAY;wBACX,aAAa;kCACH,uBAAuB;wBACjC,aAAa;4BACT,iBAAiB;0BACnB,eAAe;sBACnB,WAAW;qBACZ,UAAU;0BACL,eAAe;6BACZ,kBAAkB;uBACxB,YAAY;2BACR,gBAAgB;sBAErB,eAAe;2BACV,gBAAgB;0BACjB,eAAe;sBACnB,WAAW;yBACR,cAAc;qBAClB,UAAU;sBACT,WAAW;uBACV,YAAY;wBACX,aAAa;wBACb,aAAa;sBACf,WAAW;sBACX,WAAW;yBACR,cAAc;qBAElB,UAAU;sBACT,WAAW;4BACL,iBAAiB;wBACrB,aAAa;wBACb,aAAa;sBAEf,WAAW;sBACX,WAAW;2BACN,gBAAgB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.js deleted file mode 100644 index 1ea2fdd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/index.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Experimental method to import lib0. - * - * Not recommended if the module bundler doesn't support dead code elimination. - * - * @module lib0 - */ - -import * as array from './array.js' -import * as binary from './binary.js' -import * as broadcastchannel from './broadcastchannel.js' -import * as buffer from './buffer.js' -import * as conditions from './conditions.js' -import * as decoding from './decoding.js' -import * as diff from './diff.js' -import * as dom from './dom.js' -import * as encoding from './encoding.js' -import * as environment from './environment.js' -import * as error from './error.js' -import * as eventloop from './eventloop.js' -// @todo rename file to func -import * as func from './function.js' -import * as indexeddb from './indexeddb.js' -import * as iterator from './iterator.js' -import * as json from './json.js' -import * as logging from 'lib0/logging' -import * as map from './map.js' -import * as math from './math.js' -import * as mutex from './mutex.js' -import * as number from './number.js' -import * as object from './object.js' -import * as pair from './pair.js' -import * as prng from './prng.js' -import * as promise from './promise.js' -// import * as random from './random.js' -import * as set from './set.js' -import * as sort from './sort.js' -import * as statistics from './statistics.js' -import * as string from './string.js' -import * as symbol from './symbol.js' -// import * as testing from './testing.js' -import * as time from './time.js' -import * as tree from './tree.js' -import * as websocket from './websocket.js' - -export { - array, - binary, - broadcastchannel, - buffer, - conditions, - decoding, - diff, - dom, - encoding, - environment, - error, - eventloop, - func, - indexeddb, - iterator, - json, - logging, - map, - math, - mutex, - number, - object, - pair, - prng, - promise, - // random, - set, - sort, - statistics, - string, - symbol, - // testing, - time, - tree, - websocket -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.d.ts deleted file mode 100644 index fe7148e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -export function rtop(request: IDBRequest): Promise; -export function openDB(name: string, initDB: (arg0: IDBDatabase) => any): Promise; -export function deleteDB(name: string): Promise; -export function createStores(db: IDBDatabase, definitions: Array | Array>): void; -export function transact(db: IDBDatabase, stores: Array, access?: "readwrite" | "readonly"): Array; -export function count(store: IDBObjectStore, range?: IDBKeyRange): Promise; -export function get(store: IDBObjectStore, key: string | number | ArrayBuffer | Date | Array): Promise>; -export function del(store: IDBObjectStore, key: string | number | ArrayBuffer | Date | IDBKeyRange | Array): Promise; -export function put(store: IDBObjectStore, item: string | number | ArrayBuffer | Date | boolean, key?: string | number | ArrayBuffer | Date | Array): Promise; -export function add(store: IDBObjectStore, item: string | number | ArrayBuffer | Date | boolean, key: string | number | ArrayBuffer | Date | Array): Promise; -export function addAutoKey(store: IDBObjectStore, item: string | number | ArrayBuffer | Date): Promise; -export function getAll(store: IDBObjectStore, range?: IDBKeyRange, limit?: number): Promise>; -export function getAllKeys(store: IDBObjectStore, range?: IDBKeyRange, limit?: number): Promise>; -export function queryFirst(store: IDBObjectStore, query: IDBKeyRange | null, direction: "next" | "prev" | "nextunique" | "prevunique"): Promise; -export function getLastKey(store: IDBObjectStore, range?: IDBKeyRange | null): Promise; -export function getFirstKey(store: IDBObjectStore, range?: IDBKeyRange | null): Promise; -export function getAllKeysValues(store: IDBObjectStore, range?: IDBKeyRange, limit?: number): Promise>; -export function iterate(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any, arg1: any) => void | boolean | Promise, direction?: "next" | "prev" | "nextunique" | "prevunique"): Promise; -export function iterateKeys(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any) => void | boolean | Promise, direction?: "next" | "prev" | "nextunique" | "prevunique"): Promise; -export function getStore(t: IDBTransaction, store: string): IDBObjectStore; -export function createIDBKeyRangeBound(lower: any, upper: any, lowerOpen: boolean, upperOpen: boolean): IDBKeyRange; -export function createIDBKeyRangeUpperBound(upper: any, upperOpen: boolean): IDBKeyRange; -export function createIDBKeyRangeLowerBound(lower: any, lowerOpen: boolean): IDBKeyRange; -export type KeyValuePair = { - /** - * key - */ - k: any; - /** - * Value - */ - v: any; -}; -//# sourceMappingURL=indexeddb.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.d.ts.map deleted file mode 100644 index 85e381e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexeddb.d.ts","sourceRoot":"","sources":["indexeddb.js"],"names":[],"mappings":"AAmBO,8BAHI,UAAU,GACT,OAAO,CAAC,GAAG,CAAC,CAOtB;AAOK,6BAJI,MAAM,UACN,CAAS,IAAW,EAAX,WAAW,KAAE,GAAG,GACxB,OAAO,CAAC,WAAW,CAAC,CAuB9B;AAKK,+BAFI,MAAM,gBAEmD;AAM7D,iCAHI,WAAW,eACX,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,GAAC,KAAK,CAAC,MAAM,GAAC,wBAAwB,GAAC,SAAS,CAAC,CAAC,QAK/E;AAQM,6BALI,WAAW,UACX,KAAK,CAAC,MAAM,CAAC,WACb,WAAW,GAAC,UAAU,GACrB,KAAK,CAAC,cAAc,CAAC,CAKhC;AAOM,6BAJI,cAAc,UACd,WAAW,GACV,OAAO,CAAC,MAAM,CAAC,CAGD;AAOnB,2BAJI,cAAc,OACd,SAAS,MAAM,GAAG,WAAW,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,GAChD,OAAO,CAAC,SAAS,MAAM,GAAG,W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GAAG,EAAC,IAAG,EAAH,GAAG,KAAE,IAAI,GAAC,OAAO,GAAC,OAAO,CAAC,IAAI,GAAC,OAAO,CAAC,cACpD,MAAM,GAAC,MAAM,GAAC,YAAY,GAAC,YAAY,iBAG8C;AAUzF,mCALI,cAAc,YACd,WAAW,GAAC,IAAI,KAChB,CAAS,IAAG,EAAH,GAAG,KAAE,IAAI,GAAC,OAAO,GAAC,OAAO,CAAC,IAAI,GAAC,OAAO,CAAC,cAChD,MAAM,GAAC,MAAM,GAAC,YAAY,GAAC,YAAY,iBAGmC;AAQ9E,4BAJI,cAAc,kBAEZ,cAAc,CAE+B;AAQnD,8CALI,GAAG,SACH,GAAG,aACH,OAAO,aACP,OAAO,eAEiH;AAM5H,mDAHI,GAAG,aACH,OAAO,eAEuF;AAMlG,mDAHI,GAAG,aACH,OAAO,eAEuF;;;;;OAhF3F,GAAG;;;;OACH,GAAG"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.js deleted file mode 100644 index a228868..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.js +++ /dev/null @@ -1,262 +0,0 @@ -/* eslint-env browser */ - -/** - * Helpers to work with IndexedDB. - * - * @module indexeddb - */ - -import * as promise from './promise.js' -import * as error from './error.js' - -/* c8 ignore start */ - -/** - * IDB Request to Promise transformer - * - * @param {IDBRequest} request - * @return {Promise} - */ -export const rtop = request => promise.create((resolve, reject) => { - // @ts-ignore - request.onerror = event => reject(new Error(event.target.error)) - // @ts-ignore - request.onsuccess = event => resolve(event.target.result) -}) - -/** - * @param {string} name - * @param {function(IDBDatabase):any} initDB Called when the database is first created - * @return {Promise} - */ -export const openDB = (name, initDB) => promise.create((resolve, reject) => { - const request = indexedDB.open(name) - /** - * @param {any} event - */ - request.onupgradeneeded = event => initDB(event.target.result) - /** - * @param {any} event - */ - request.onerror = event => reject(error.create(event.target.error)) - /** - * @param {any} event - */ - request.onsuccess = event => { - /** - * @type {IDBDatabase} - */ - const db = event.target.result - db.onversionchange = () => { db.close() } - resolve(db) - } -}) - -/** - * @param {string} name - */ -export const deleteDB = name => rtop(indexedDB.deleteDatabase(name)) - -/** - * @param {IDBDatabase} db - * @param {Array|Array>} definitions - */ -export const createStores = (db, definitions) => definitions.forEach(d => - // @ts-ignore - db.createObjectStore.apply(db, d) -) - -/** - * @param {IDBDatabase} db - * @param {Array} stores - * @param {"readwrite"|"readonly"} [access] - * @return {Array} - */ -export const transact = (db, stores, access = 'readwrite') => { - const transaction = db.transaction(stores, access) - return stores.map(store => getStore(transaction, store)) -} - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange} [range] - * @return {Promise} - */ -export const count = (store, range) => - rtop(store.count(range)) - -/** - * @param {IDBObjectStore} store - * @param {String | number | ArrayBuffer | Date | Array } key - * @return {Promise>} - */ -export const get = (store, key) => - rtop(store.get(key)) - -/** - * @param {IDBObjectStore} store - * @param {String | number | ArrayBuffer | Date | IDBKeyRange | Array } key - */ -export const del = (store, key) => - rtop(store.delete(key)) - -/** - * @param {IDBObjectStore} store - * @param {String | number | ArrayBuffer | Date | boolean} item - * @param {String | number | ArrayBuffer | Date | Array} [key] - */ -export const put = (store, item, key) => - rtop(store.put(item, key)) - -/** - * @param {IDBObjectStore} store - * @param {String | number | ArrayBuffer | Date | boolean} item - * @param {String | number | ArrayBuffer | Date | Array} key - * @return {Promise} - */ -export const add = (store, item, key) => - rtop(store.add(item, key)) - -/** - * @param {IDBObjectStore} store - * @param {String | number | ArrayBuffer | Date} item - * @return {Promise} Returns the generated key - */ -export const addAutoKey = (store, item) => - rtop(store.add(item)) - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange} [range] - * @param {number} [limit] - * @return {Promise>} - */ -export const getAll = (store, range, limit) => - rtop(store.getAll(range, limit)) - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange} [range] - * @param {number} [limit] - * @return {Promise>} - */ -export const getAllKeys = (store, range, limit) => - rtop(store.getAllKeys(range, limit)) - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange|null} query - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - * @return {Promise} - */ -export const queryFirst = (store, query, direction) => { - /** - * @type {any} - */ - let first = null - return iterateKeys(store, query, key => { - first = key - return false - }, direction).then(() => first) -} - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange?} [range] - * @return {Promise} - */ -export const getLastKey = (store, range = null) => queryFirst(store, range, 'prev') - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange?} [range] - * @return {Promise} - */ -export const getFirstKey = (store, range = null) => queryFirst(store, range, 'next') - -/** - * @typedef KeyValuePair - * @type {Object} - * @property {any} k key - * @property {any} v Value - */ - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange} [range] - * @param {number} [limit] - * @return {Promise>} - */ -export const getAllKeysValues = (store, range, limit) => - // @ts-ignore - promise.all([getAllKeys(store, range, limit), getAll(store, range, limit)]).then(([ks, vs]) => ks.map((k, i) => ({ k, v: vs[i] }))) - -/** - * @param {any} request - * @param {function(IDBCursorWithValue):void|boolean|Promise} f - * @return {Promise} - */ -const iterateOnRequest = (request, f) => promise.create((resolve, reject) => { - request.onerror = reject - /** - * @param {any} event - */ - request.onsuccess = async event => { - const cursor = event.target.result - if (cursor === null || (await f(cursor)) === false) { - return resolve() - } - cursor.continue() - } -}) - -/** - * Iterate on keys and values - * @param {IDBObjectStore} store - * @param {IDBKeyRange|null} keyrange - * @param {function(any,any):void|boolean|Promise} f Callback that receives (value, key) - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - */ -export const iterate = (store, keyrange, f, direction = 'next') => - iterateOnRequest(store.openCursor(keyrange, direction), cursor => f(cursor.value, cursor.key)) - -/** - * Iterate on the keys (no values) - * - * @param {IDBObjectStore} store - * @param {IDBKeyRange|null} keyrange - * @param {function(any):void|boolean|Promise} f callback that receives the key - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - */ -export const iterateKeys = (store, keyrange, f, direction = 'next') => - iterateOnRequest(store.openKeyCursor(keyrange, direction), cursor => f(cursor.key)) - -/** - * Open store from transaction - * @param {IDBTransaction} t - * @param {String} store - * @returns {IDBObjectStore} - */ -export const getStore = (t, store) => t.objectStore(store) - -/** - * @param {any} lower - * @param {any} upper - * @param {boolean} lowerOpen - * @param {boolean} upperOpen - */ -export const createIDBKeyRangeBound = (lower, upper, lowerOpen, upperOpen) => IDBKeyRange.bound(lower, upper, lowerOpen, upperOpen) - -/** - * @param {any} upper - * @param {boolean} upperOpen - */ -export const createIDBKeyRangeUpperBound = (upper, upperOpen) => IDBKeyRange.upperBound(upper, upperOpen) - -/** - * @param {any} lower - * @param {boolean} lowerOpen - */ -export const createIDBKeyRangeLowerBound = (lower, lowerOpen) => IDBKeyRange.lowerBound(lower, lowerOpen) - -/* c8 ignore stop */ diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.test.d.ts deleted file mode 100644 index e45d0c9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testRetrieveElements(): Promise; -export function testBlocked(): Promise; -//# sourceMappingURL=indexeddb.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.test.d.ts.map deleted file mode 100644 index 2b53eb3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexeddb.test.d.ts","sourceRoot":"","sources":["indexeddb.test.js"],"names":[],"mappings":"AAyBO,sDAoEN;AAGM,6CAWN"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.d.ts deleted file mode 100644 index 0b104d9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export function bindPledge(p: pledge.PledgeInstance, request: IDBRequest): void; -export function openDB(name: string, initDB: (arg0: IDBDatabase) => any): pledge.PledgeInstance; -export function deleteDB(name: pledge.Pledge): pledge.PledgeInstance; -export function createStores(db: IDBDatabase, definitions: Array | Array>): void; -export function transact(db: pledge.Pledge, stores: pledge.Pledge>, access?: "readwrite" | "readonly"): pledge.Pledge>; -export function count(store: IDBObjectStore, range?: pledge.Pledge): pledge.PledgeInstance; -export function get(store: pledge.Pledge, key: pledge.Pledge>): pledge.PledgeInstance>; -export function del(store: pledge.Pledge, key: string | number | ArrayBuffer | Date | IDBKeyRange | Array): pledge.PledgeInstance; -export function put(store: pledge.Pledge, item: string | number | ArrayBuffer | Date | boolean, key?: string | number | ArrayBuffer | Date | Array): pledge.PledgeInstance; -export function add(store: pledge.Pledge, item: string | number | ArrayBuffer | Date | boolean, key: string | number | ArrayBuffer | Date | Array): pledge.PledgeInstance; -export function addAutoKey(store: pledge.Pledge, item: string | number | ArrayBuffer | Date): pledge.PledgeInstance; -export function getAll(store: pledge.Pledge, range?: IDBKeyRange, limit?: number): pledge.PledgeInstance>; -export function getAllKeys(store: pledge.Pledge, range?: IDBKeyRange, limit?: number): pledge.PledgeInstance>; -export function queryFirst(store: IDBObjectStore, query: IDBKeyRange | null, direction: "next" | "prev" | "nextunique" | "prevunique"): pledge.PledgeInstance; -export function getLastKey(store: IDBObjectStore, range?: IDBKeyRange | null): pledge.PledgeInstance; -export function getFirstKey(store: IDBObjectStore, range?: IDBKeyRange | null): pledge.PledgeInstance; -export function getAllKeysValues(store: pledge.Pledge, range?: pledge.Pledge, limit?: pledge.Pledge): pledge.PledgeInstance>; -export function iterate(store: pledge.Pledge, keyrange: pledge.Pledge, f: (arg0: any, arg1: any) => void | boolean | Promise, direction?: "next" | "prev" | "nextunique" | "prevunique"): pledge.PledgeInstance; -export function iterateKeys(store: pledge.Pledge, keyrange: pledge.Pledge, f: (arg0: any) => void | boolean | Promise, direction?: "next" | "prev" | "nextunique" | "prevunique"): pledge.PledgeInstance; -export function getStore(t: IDBTransaction, store: string): IDBObjectStore; -export function createIDBKeyRangeBound(lower: any, upper: any, lowerOpen: boolean, upperOpen: boolean): IDBKeyRange; -export function createIDBKeyRangeUpperBound(upper: any, upperOpen: boolean): IDBKeyRange; -export function createIDBKeyRangeLowerBound(lower: any, lowerOpen: boolean): IDBKeyRange; -export type KeyValuePair = { - /** - * key - */ - k: any; - /** - * Value - */ - v: any; -}; -import * as pledge from './pledge.js'; -//# sourceMappingURL=indexeddbV2.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.d.ts.map deleted file mode 100644 index ecb142e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexeddbV2.d.ts","sourceRoot":"","sources":["indexeddbV2.js"],"names":[],"mappings":"AAqBO,8BAHI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,WAC1B,UAAU,QAOpB;AAOM,6BAJI,MAAM,UACN,CAAS,IAAW,EAAX,WAAW,KAAE,GAAG,GACxB,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CA4B7C;AAMM,+BAHI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GACpB,M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O,GAAC,OAAO,CAAC,IAAI,GAAC,OAAO,CAAC,cACpD,MAAM,GAAC,MAAM,GAAC,YAAY,GAAC,YAAY,qCAI/B;AAUZ,mCALI,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,YAC7B,MAAM,CAAC,MAAM,CAAC,WAAW,GAAC,IAAI,CAAC,KAC/B,CAAS,IAAG,EAAH,GAAG,KAAE,IAAI,GAAC,OAAO,GAAC,OAAO,CAAC,IAAI,GAAC,OAAO,CAAC,cAChD,MAAM,GAAC,MAAM,GAAC,YAAY,GAAC,YAAY,qCAI/B;AAQZ,4BAJI,cAAc,kBAEZ,cAAc,CAE+B;AAQnD,8CALI,GAAG,SACH,GAAG,aACH,OAAO,aACP,OAAO,eAEiH;AAM5H,mDAHI,GAAG,aACH,OAAO,eAEuF;AAMlG,mDAHI,GAAG,aACH,OAAO,eAEuF;;;;;OAnF3F,GAAG;;;;OACH,GAAG;;wBAzKO,aAAa"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.js deleted file mode 100644 index eb0d75f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.js +++ /dev/null @@ -1,265 +0,0 @@ -/* eslint-env browser */ - -/** - * Helpers to work with IndexedDB. - * This is an experimental implementation using Pledge instead of Promise. - * - * @experimental - * - * @module indexeddbv2 - */ - -import * as pledge from './pledge.js' - -/* c8 ignore start */ - -/** - * IDB Request to Pledge transformer - * - * @param {pledge.PledgeInstance} p - * @param {IDBRequest} request - */ -export const bindPledge = (p, request) => { - // @ts-ignore - request.onerror = event => p.cancel(event.target.error) - // @ts-ignore - request.onsuccess = event => p.resolve(event.target.result) -} - -/** - * @param {string} name - * @param {function(IDBDatabase):any} initDB Called when the database is first created - * @return {pledge.PledgeInstance} - */ -export const openDB = (name, initDB) => { - /** - * @type {pledge.PledgeInstance} - */ - const p = pledge.create() - const request = indexedDB.open(name) - /** - * @param {any} event - */ - request.onupgradeneeded = event => initDB(event.target.result) - /** - * @param {any} event - */ - request.onerror = event => p.cancel(event.target.error) - /** - * @param {any} event - */ - request.onsuccess = event => { - /** - * @type {IDBDatabase} - */ - const db = event.target.result - db.onversionchange = () => { db.close() } - p.resolve(db) - } - return p -} - -/** - * @param {pledge.Pledge} name - * @return {pledge.PledgeInstance} - */ -export const deleteDB = name => pledge.createWithDependencies((p, name) => bindPledge(p, indexedDB.deleteDatabase(name)), name) - -/** - * @param {IDBDatabase} db - * @param {Array|Array>} definitions - */ -export const createStores = (db, definitions) => definitions.forEach(d => - // @ts-ignore - db.createObjectStore.apply(db, d) -) - -/** - * @param {pledge.Pledge} db - * @param {pledge.Pledge>} stores - * @param {"readwrite"|"readonly"} [access] - * @return {pledge.Pledge>} - */ -export const transact = (db, stores, access = 'readwrite') => pledge.createWithDependencies((p, db, stores) => { - const transaction = db.transaction(stores, access) - p.resolve(stores.map(store => getStore(transaction, store))) -}, db, stores) - -/** - * @param {IDBObjectStore} store - * @param {pledge.Pledge} [range] - * @return {pledge.PledgeInstance} - */ -export const count = (store, range) => pledge.createWithDependencies((p, store, range) => bindPledge(p, store.count(range)), store, range) - -/** - * @param {pledge.Pledge} store - * @param {pledge.Pledge>} key - * @return {pledge.PledgeInstance>} - */ -export const get = (store, key) => pledge.createWithDependencies((p, store, key) => bindPledge(p, store.get(key)), store, key) - -/** - * @param {pledge.Pledge} store - * @param {String | number | ArrayBuffer | Date | IDBKeyRange | Array } key - */ -export const del = (store, key) => pledge.createWithDependencies((p, store, key) => bindPledge(p, store.delete(key)), store, key) - -/** - * @param {pledge.Pledge} store - * @param {String | number | ArrayBuffer | Date | boolean} item - * @param {String | number | ArrayBuffer | Date | Array} [key] - */ -export const put = (store, item, key) => pledge.createWithDependencies((p, store, item, key) => bindPledge(p, store.put(item, key)), store, item, key) - -/** - * @param {pledge.Pledge} store - * @param {String | number | ArrayBuffer | Date | boolean} item - * @param {String | number | ArrayBuffer | Date | Array} key - * @return {pledge.PledgeInstance} - */ -export const add = (store, item, key) => pledge.createWithDependencies((p, store, item, key) => bindPledge(p, store.add(item, key)), store, item, key) - -/** - * @param {pledge.Pledge} store - * @param {String | number | ArrayBuffer | Date} item - * @return {pledge.PledgeInstance} Returns the generated key - */ -export const addAutoKey = (store, item) => pledge.createWithDependencies((p, store, item) => bindPledge(p, store.add(item)), store, item) - -/** - * @param {pledge.Pledge} store - * @param {IDBKeyRange} [range] - * @param {number} [limit] - * @return {pledge.PledgeInstance>} - */ -export const getAll = (store, range, limit) => pledge.createWithDependencies((p, store, range, limit) => bindPledge(p, store.getAll(range, limit)), store, range, limit) - -/** - * @param {pledge.Pledge} store - * @param {IDBKeyRange} [range] - * @param {number} [limit] - * @return {pledge.PledgeInstance>} - */ -export const getAllKeys = (store, range, limit) => pledge.createWithDependencies((p, store, range, limit) => bindPledge(p, store.getAllKeys(range, limit)), store, range, limit) - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange|null} query - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - * @return {pledge.PledgeInstance} - */ -export const queryFirst = (store, query, direction) => { - /** - * @type {any} - */ - let first = null - return iterateKeys(store, query, key => { - first = key - return false - }, direction).map(() => first) -} - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange?} [range] - * @return {pledge.PledgeInstance} - */ -export const getLastKey = (store, range = null) => queryFirst(store, range, 'prev') - -/** - * @param {IDBObjectStore} store - * @param {IDBKeyRange?} [range] - * @return {pledge.PledgeInstance} - */ -export const getFirstKey = (store, range = null) => queryFirst(store, range, 'next') - -/** - * @typedef KeyValuePair - * @type {Object} - * @property {any} k key - * @property {any} v Value - */ - -/** - * @param {pledge.Pledge} store - * @param {pledge.Pledge} [range] - * @param {pledge.Pledge} [limit] - * @return {pledge.PledgeInstance>} - */ -export const getAllKeysValues = (store, range, limit) => pledge.createWithDependencies((p, store, range, limit) => { - pledge.all([getAllKeys(store, range, limit), getAll(store, range, limit)]).map(([ks, vs]) => ks.map((k, i) => ({ k, v: vs[i] }))).whenResolved(p.resolve.bind(p)) -}, store, range, limit) - -/** - * @param {pledge.PledgeInstance} p - * @param {any} request - * @param {function(IDBCursorWithValue):void|boolean|Promise} f - */ -const iterateOnRequest = (p, request, f) => { - request.onerror = p.cancel.bind(p) - /** - * @param {any} event - */ - request.onsuccess = async event => { - const cursor = event.target.result - if (cursor === null || (await f(cursor)) === false) { - p.resolve(undefined) - return - } - cursor.continue() - } -} - -/** - * Iterate on keys and values - * @param {pledge.Pledge} store - * @param {pledge.Pledge} keyrange - * @param {function(any,any):void|boolean|Promise} f Callback that receives (value, key) - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - */ -export const iterate = (store, keyrange, f, direction = 'next') => pledge.createWithDependencies((p, store, keyrange) => { - iterateOnRequest(p, store.openCursor(keyrange, direction), cursor => f(cursor.value, cursor.key)) -}, store, keyrange) - -/** - * Iterate on the keys (no values) - * - * @param {pledge.Pledge} store - * @param {pledge.Pledge} keyrange - * @param {function(any):void|boolean|Promise} f callback that receives the key - * @param {'next'|'prev'|'nextunique'|'prevunique'} direction - */ -export const iterateKeys = (store, keyrange, f, direction = 'next') => pledge.createWithDependencies((p, store, keyrange) => { - iterateOnRequest(p, store.openKeyCursor(keyrange, direction), cursor => f(cursor.key)) -}, store, keyrange) - -/** - * Open store from transaction - * @param {IDBTransaction} t - * @param {String} store - * @returns {IDBObjectStore} - */ -export const getStore = (t, store) => t.objectStore(store) - -/** - * @param {any} lower - * @param {any} upper - * @param {boolean} lowerOpen - * @param {boolean} upperOpen - */ -export const createIDBKeyRangeBound = (lower, upper, lowerOpen, upperOpen) => IDBKeyRange.bound(lower, upper, lowerOpen, upperOpen) - -/** - * @param {any} upper - * @param {boolean} upperOpen - */ -export const createIDBKeyRangeUpperBound = (upper, upperOpen) => IDBKeyRange.upperBound(upper, upperOpen) - -/** - * @param {any} lower - * @param {boolean} lowerOpen - */ -export const createIDBKeyRangeLowerBound = (lower, lowerOpen) => IDBKeyRange.lowerBound(lower, lowerOpen) - -/* c8 ignore stop */ diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.test.d.ts deleted file mode 100644 index c61e1a6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testRetrieveElements(): Promise; -export function testBlocked(): Promise; -//# sourceMappingURL=indexeddbV2.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.test.d.ts.map deleted file mode 100644 index 49e4b03..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddbV2.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexeddbV2.test.d.ts","sourceRoot":"","sources":["indexeddbV2.test.js"],"names":[],"mappings":"AA0BO,sDAoEN;AAGM,6CAgBN"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/isomorphic.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/isomorphic.js deleted file mode 100644 index 7d1c5fa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/isomorphic.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Isomorphic library exports from isomorphic.js. - * - * @todo remove this module - * @deprecated - * - * @module isomorphic - */ - -export { performance, cryptoRandomBuffer } from 'isomorphic.js' diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.d.ts deleted file mode 100644 index 91a2024..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function mapIterator(iterator: Iterator, f: (arg0: T) => R): IterableIterator; -export function createIterator(next: () => IteratorResult): IterableIterator; -export function iteratorFilter(iterator: Iterator, filter: (arg0: T) => boolean): IterableIterator; -export function iteratorMap(iterator: Iterator, fmap: (arg0: T) => M): IterableIterator; -//# sourceMappingURL=iterator.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.d.ts.map deleted file mode 100644 index 0c3c7ba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterator.d.ts","sourceRoot":"","sources":["iterator.js"],"names":[],"mappings":"AAYO,4BALM,CAAC,EAAC,CAAC,YACL,QAAQ,CAAC,CAAC,CAAC,KACX,CAAS,IAAC,EAAD,CAAC,KAAE,CAAC,GACZ,gBAAgB,CAAC,CAAC,CAAC,CAW7B;AAOK,+BAJM,CAAC,QACH,MAAW,cAAc,CAAC,CAAC,CAAC,GAC3B,gBAAgB,CAAC,CAAC,CAAC,CAW7B;AAOK,+BAJM,CAAC,YACH,QAAQ,CAAC,CAAC,CAAC,UACX,CAAS,IAAC,EAAD,CAAC,KAAE,OAAO,uBAQ5B;AAOK,4BAJM,CAAC,EAAC,CAAC,YACL,QAAQ,CAAC,CAAC,CAAC,QACX,CAAS,IAAC,EAAD,CAAC,KAAE,CAAC,mCAKtB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.js deleted file mode 100644 index 6ab0e7a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Utility module to create and manipulate Iterators. - * - * @module iterator - */ - -/** - * @template T,R - * @param {Iterator} iterator - * @param {function(T):R} f - * @return {IterableIterator} - */ -export const mapIterator = (iterator, f) => ({ - [Symbol.iterator] () { - return this - }, - // @ts-ignore - next () { - const r = iterator.next() - return { value: r.done ? undefined : f(r.value), done: r.done } - } -}) - -/** - * @template T - * @param {function():IteratorResult} next - * @return {IterableIterator} - */ -export const createIterator = next => ({ - /** - * @return {IterableIterator} - */ - [Symbol.iterator] () { - return this - }, - // @ts-ignore - next -}) - -/** - * @template T - * @param {Iterator} iterator - * @param {function(T):boolean} filter - */ -export const iteratorFilter = (iterator, filter) => createIterator(() => { - let res - do { - res = iterator.next() - } while (!res.done && !filter(res.value)) - return res -}) - -/** - * @template T,M - * @param {Iterator} iterator - * @param {function(T):M} fmap - */ -export const iteratorMap = (iterator, fmap) => createIterator(() => { - const { done, value } = iterator.next() - return { done, value: done ? undefined : fmap(value) } -}) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.d.ts deleted file mode 100644 index 146362c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * JSON utility functions. - * - * @module json - */ -/** - * Transform JavaScript object to JSON. - * - * @param {any} object - * @return {string} - */ -export const stringify: { - (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - (value: any, replacer?: (number | string)[] | null, space?: string | number): string; -}; -/** - * Parse JSON object. - * - * @param {string} json - * @return {any} - */ -export const parse: (text: string, reviver?: (this: any, key: string, value: any) => any) => any; -//# sourceMappingURL=json.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.d.ts.map deleted file mode 100644 index 453eca6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["json.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH;;;EAAuC;AAEvC;;;;;GAKG;AACH,iGAA+B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.js deleted file mode 100644 index 7354089..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/json.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * JSON utility functions. - * - * @module json - */ - -/** - * Transform JavaScript object to JSON. - * - * @param {any} object - * @return {string} - */ -export const stringify = JSON.stringify - -/** - * Parse JSON object. - * - * @param {string} json - * @return {any} - */ -export const parse = JSON.parse diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.d.ts deleted file mode 100644 index bd60710..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -export class ListNode { - /** - * @type {this|null} - */ - next: this | null; - /** - * @type {this|null} - */ - prev: this | null; -} -/** - * @template {ListNode} N - */ -export class List { - /** - * @type {N | null} - */ - start: N | null; - /** - * @type {N | null} - */ - end: N | null; - len: number; - toArray(): N[]; - /** - * @param {function(N):any} f - */ - forEach(f: (arg0: N) => any): void; - /** - * @template M - * @param {function(N):M} f - * @return {Array} - */ - map(f: (arg0: N) => M): Array; - [Symbol.iterator](): Generator; - /** - * @param {List} other - */ - [equalityTrait.EqualityTraitSymbol](other: List): boolean; -} -export function create(): List; -export function isEmpty(queue: List): boolean; -export function remove(list: List, node: N): N; -export function removeNode(list: List, node: N): N; -export function insertBetween(queue: List, left: N | null, right: N | null, node: N): void; -export function replace(queue: List, node: N, newNode: N): void; -export function pushEnd(queue: List, n: N): void; -export function pushFront(queue: List, n: N): void; -export function popFront(list: List): N | null; -export function popEnd(list: List): N | null; -export function map(list: List, f: (arg0: N) => M): Array; -export function toArray(list: List): N[]; -export function forEach(list: List, f: (arg0: N) => any): void; -import * as equalityTrait from './trait/equality.js'; -//# sourceMappingURL=list.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.d.ts.map deleted file mode 100644 index c8d120c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["list.js"],"names":[],"mappings":"AAKA;IAEI;;OAEG;IACH,MAFU,IAAI,GAAC,IAAI,CAEH;IAChB;;OAEG;IACH,MAFU,IAAI,GAAC,IAAI,CAEH;CAEnB;AAED;;GAEG;AACH,kBAFwB,CAAC,SAAX,QAAS;IAInB;;OAEG;IACH,OAFU,CAAC,GAAG,IAAI,CAED;IACjB;;OAEG;IACH,KAFU,CAAC,GAAG,IAAI,CAEH;IACf,YAAY;IAWd,eAEC;IAED;;OAEG;IACH,WAFW,CAAS,IAAC,EAAD,CAAC,KAAE,GAAG,QAIzB;IAED;;;;OAIG;IACH,IAJa,CAAC,KACH,CAAS,IAAC,EAAD,CAAC,KAAE,CAAC,GACZ,KAAK,CAAC,CAAC,CAAC,CAInB;IA1BD,iDAMC;IAsBD;;OAEG;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AAC,KAAE,GAAG,QAQzB;+BAhP8B,qBAAqB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.js deleted file mode 100644 index 3175d44..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.js +++ /dev/null @@ -1,243 +0,0 @@ -import { id } from './function.js' -import * as error from './error.js' -import * as equalityTrait from './trait/equality.js' -import * as f from './function.js' - -export class ListNode { - constructor () { - /** - * @type {this|null} - */ - this.next = null - /** - * @type {this|null} - */ - this.prev = null - } -} - -/** - * @template {ListNode} N - */ -export class List { - constructor () { - /** - * @type {N | null} - */ - this.start = null - /** - * @type {N | null} - */ - this.end = null - this.len = 0 - } - - * [Symbol.iterator] () { - let n = this.start - while (n) { - yield n - n = n.next - } - } - - toArray () { - return map(this, f.id) - } - - /** - * @param {function(N):any} f - */ - forEach (f) { - forEach(this, f) - } - - /** - * @template M - * @param {function(N):M} f - * @return {Array} - */ - map (f) { - return map(this, f) - } - - /** - * @param {List} other - */ - [equalityTrait.EqualityTraitSymbol] (other) { - let n = this.start - let m = other.start - while (n && m) { - if (!equalityTrait.equals(n, m)) return false - n = n.next - m = m.next - } - return n === m // only true iff n == null && m == null - } -} - -/** - * @note The queue implementation is experimental and unfinished. - * Don't use this in production yet. - * - * @template {ListNode} N - * - * @return {List} - */ -export const create = () => new List() - -/** - * @template {ListNode} N - * - * @param {List} queue - */ -export const isEmpty = queue => queue.start === null - -/** - * Remove a single node from the queue. Only works with Queues that operate on Doubly-linked lists of nodes. - * - * @template {ListNode} N - * - * @param {List} list - * @param {N} node - */ -export const remove = (list, node) => { - const prev = node.prev - const next = node.next - if (prev) { - prev.next = next - } else { - list.start = next - } - if (next) { - next.prev = prev - } else { - list.end = prev - } - list.len-- - return node -} - -/** - * @deprecated @todo remove in next major release - */ -export const removeNode = remove - -/** - * @template {ListNode} N - * - * @param {List} queue - * @param {N| null} left - * @param {N| null} right - * @param {N} node - */ -export const insertBetween = (queue, left, right, node) => { - /* c8 ignore start */ - if (left != null && left.next !== right) { - throw error.unexpectedCase() - } - /* c8 ignore stop */ - if (left) { - left.next = node - } else { - queue.start = node - } - if (right) { - right.prev = node - } else { - queue.end = node - } - node.prev = left - node.next = right - queue.len++ -} - -/** - * Remove a single node from the queue. Only works with Queues that operate on Doubly-linked lists of nodes. - * - * @template {ListNode} N - * - * @param {List} queue - * @param {N} node - * @param {N} newNode - */ -export const replace = (queue, node, newNode) => { - insertBetween(queue, node, node.next, newNode) - remove(queue, node) -} - -/** - * @template {ListNode} N - * - * @param {List} queue - * @param {N} n - */ -export const pushEnd = (queue, n) => - insertBetween(queue, queue.end, null, n) - -/** - * @template {ListNode} N - * - * @param {List} queue - * @param {N} n - */ -export const pushFront = (queue, n) => - insertBetween(queue, null, queue.start, n) - -/** - * @template {ListNode} N - * - * @param {List} list - * @return {N| null} - */ -export const popFront = list => - list.start ? removeNode(list, list.start) : null - -/** - * @template {ListNode} N - * - * @param {List} list - * @return {N| null} - */ -export const popEnd = list => - list.end ? removeNode(list, list.end) : null - -/** - * @template {ListNode} N - * @template M - * - * @param {List} list - * @param {function(N):M} f - * @return {Array} - */ -export const map = (list, f) => { - /** - * @type {Array} - */ - const arr = [] - let n = list.start - while (n) { - arr.push(f(n)) - n = n.next - } - return arr -} - -/** - * @template {ListNode} N - * - * @param {List} list - */ -export const toArray = list => map(list, id) - -/** - * @template {ListNode} N - * @param {List} list - * @param {function(N):any} f - */ -export const forEach = (list, f) => { - let n = list.start - while (n) { - f(n) - n = n.next - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.test.d.ts deleted file mode 100644 index 7227113..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testAssignability(_tc: t.TestCase): void; -export function testEnqueueDequeue(_tc: t.TestCase): void; -export function testSelectivePop(_tc: t.TestCase): void; -export function testEquality(): void; -import * as t from './testing.js'; -//# sourceMappingURL=list.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.test.d.ts.map deleted file mode 100644 index 27cbf56..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/list.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"list.test.d.ts","sourceRoot":"","sources":["list.test.js"],"names":[],"mappings":"AA2BO,uCAFI,CAAC,CAAC,QAAQ,QAcpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QA8BpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAiCpB;AAEM,qCAgBN;mBA9HkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.d.ts deleted file mode 100644 index f0489be..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export const BOLD: symbol; -export const UNBOLD: symbol; -export const BLUE: symbol; -export const GREY: symbol; -export const GREEN: symbol; -export const RED: symbol; -export const PURPLE: symbol; -export const ORANGE: symbol; -export const UNCOLOR: symbol; -export function computeNoColorLoggingArgs(args: Array any)>): Array; -export function createModuleLogger(_print: (...args: any[]) => void, moduleName: string): (...args: any[]) => void; -//# sourceMappingURL=logging.common.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.d.ts.map deleted file mode 100644 index 07917e0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logging.common.d.ts","sourceRoot":"","sources":["logging.common.js"],"names":[],"mappings":"AAMA,0BAAmC;AACnC,4BAAqC;AACrC,0BAAmC;AACnC,0BAAmC;AACnC,2BAAoC;AACpC,yBAAkC;AAClC,4BAAqC;AACrC,4BAAqC;AACrC,6BAAsC;AAO/B,gDAHI,KAAK,CAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,IAAC,MAAW,GAAG,CAAA,CAAC,GAC1D,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,SAAS,CAAC,CAgChD;AAaM,2CAJI,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,IAAI,cACrB,MAAM,GACL,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,IAAI,CAyChC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.js deleted file mode 100644 index 8c654ec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.js +++ /dev/null @@ -1,105 +0,0 @@ -import * as symbol from './symbol.js' -import * as time from './time.js' -import * as env from './environment.js' -import * as func from './function.js' -import * as json from './json.js' - -export const BOLD = symbol.create() -export const UNBOLD = symbol.create() -export const BLUE = symbol.create() -export const GREY = symbol.create() -export const GREEN = symbol.create() -export const RED = symbol.create() -export const PURPLE = symbol.create() -export const ORANGE = symbol.create() -export const UNCOLOR = symbol.create() - -/* c8 ignore start */ -/** - * @param {Array} args - * @return {Array} - */ -export const computeNoColorLoggingArgs = args => { - if (args.length === 1 && args[0]?.constructor === Function) { - args = /** @type {Array} */ (/** @type {[function]} */ (args)[0]()) - } - const strBuilder = [] - const logArgs = [] - // try with formatting until we find something unsupported - let i = 0 - for (; i < args.length; i++) { - const arg = args[i] - if (arg === undefined) { - break - } else if (arg.constructor === String || arg.constructor === Number) { - strBuilder.push(arg) - } else if (arg.constructor === Object) { - break - } - } - if (i > 0) { - // create logArgs with what we have so far - logArgs.push(strBuilder.join('')) - } - // append the rest - for (; i < args.length; i++) { - const arg = args[i] - if (!(arg instanceof Symbol)) { - logArgs.push(arg) - } - } - return logArgs -} -/* c8 ignore stop */ - -const loggingColors = [GREEN, PURPLE, ORANGE, BLUE] -let nextColor = 0 -let lastLoggingTime = time.getUnixTime() - -/* c8 ignore start */ -/** - * @param {function(...any):void} _print - * @param {string} moduleName - * @return {function(...any):void} - */ -export const createModuleLogger = (_print, moduleName) => { - const color = loggingColors[nextColor] - const debugRegexVar = env.getVariable('log') - const doLogging = debugRegexVar !== null && - (debugRegexVar === '*' || debugRegexVar === 'true' || - new RegExp(debugRegexVar, 'gi').test(moduleName)) - nextColor = (nextColor + 1) % loggingColors.length - moduleName += ': ' - return !doLogging - ? func.nop - : (...args) => { - if (args.length === 1 && args[0]?.constructor === Function) { - args = args[0]() - } - const timeNow = time.getUnixTime() - const timeDiff = timeNow - lastLoggingTime - lastLoggingTime = timeNow - _print( - color, - moduleName, - UNCOLOR, - ...args.map((arg) => { - if (arg != null && arg.constructor === Uint8Array) { - arg = Array.from(arg) - } - const t = typeof arg - switch (t) { - case 'string': - case 'symbol': - return arg - default: { - return json.stringify(arg) - } - } - }), - color, - ' +' + timeDiff + 'ms' - ) - } -} -/* c8 ignore stop */ diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.d.ts deleted file mode 100644 index a768a17..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -export function print(...args: Array): void; -export function warn(...args: Array): void; -export function printError(err: Error): void; -export function printImg(url: string, height: number): void; -export function printImgBase64(base64: string, height: number): void; -export function group(...args: Array): void; -export function groupCollapsed(...args: Array): void; -export function groupEnd(): void; -export function printDom(createNode: () => Node): void; -export function printCanvas(canvas: HTMLCanvasElement, height: number): void; -export const vconsoles: Set; -export class VConsole { - /** - * @param {Element} dom - */ - constructor(dom: Element); - dom: Element; - /** - * @type {Element} - */ - ccontainer: Element; - depth: number; - /** - * @param {Array} args - * @param {boolean} collapsed - */ - group(args: Array, collapsed?: boolean): void; - /** - * @param {Array} args - */ - groupCollapsed(args: Array): void; - groupEnd(): void; - /** - * @param {Array} args - */ - print(args: Array): void; - /** - * @param {Error} err - */ - printError(err: Error): void; - /** - * @param {string} url - * @param {number} height - */ - printImg(url: string, height: number): void; - /** - * @param {Node} node - */ - printDom(node: Node): void; - destroy(): void; -} -export function createVConsole(dom: Element): VConsole; -export function createModuleLogger(moduleName: string): (...args: any[]) => void; -export { BOLD, UNBOLD, BLUE, GREY, GREEN, RED, PURPLE, ORANGE, UNCOLOR } from "./logging.common.js"; -//# sourceMappingURL=logging.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.d.ts.map deleted file mode 100644 index 1f91f0c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["logging.js"],"names":[],"mappings":"AAmGO,+BAFI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAM5C;AAMM,8BAFI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAM5C;AAOM,gCAHI,KAAK,QAMf;AAQM,8BAJI,MAAM,UACN,MAAM,QAYhB;AAQM,uCAJI,MAAM,UACN,MAAM,QAIoC;AAK9C,+BAFI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAM5C;AAKM,wCAFI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAM5C;AAEM,iCAIN;AAMM,qCAHI,MAAW,IAAI,QAI4B;AAO/C,oCAJI,iBAAiB,UACjB,MAAM,QAIqB;AAEtC,iCAAqC;AAwDrC;IACE;;OAEG;IACH,iBAFW,OAAO,EAUjB;IAPC,aAAc;IACd;;OAEG;IACH,YAFU,OAAO,CAES;IAC1B,cAAc;IAIhB;;;OAGG;IACH,YAHW,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,cAClC,OAAO,QAoCjB;IAED;;OAEG;IACH,qBAFW,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAI5C;IAED,iBAQC;IAED;;OAEG;IACH,YAFW,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAa5C;IAED;;OAEG;IACH,gBAFW,KAAK,QAIf;IAED;;;OAGG;IACH,cAHW,MAAM,UACN,MAAM,QAWhB;IAED;;OAEG;IACH,eAFW,IAAI,QAMd;IAED,gBAIC;CACF;AAOM,oCAHI,OAAO,YAGsC;AAMjD,+CAHI,MAAM,GACL,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,IAAI,CAE6D"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.js deleted file mode 100644 index d6c77c6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.js +++ /dev/null @@ -1,383 +0,0 @@ -/** - * Isomorphic logging module with support for colors! - * - * @module logging - */ - -import * as env from './environment.js' -import * as set from './set.js' -import * as pair from './pair.js' -import * as dom from './dom.js' -import * as json from './json.js' -import * as map from './map.js' -import * as eventloop from './eventloop.js' -import * as math from './math.js' -import * as common from './logging.common.js' - -export { BOLD, UNBOLD, BLUE, GREY, GREEN, RED, PURPLE, ORANGE, UNCOLOR } from './logging.common.js' - -/** - * @type {Object>} - */ -const _browserStyleMap = { - [common.BOLD]: pair.create('font-weight', 'bold'), - [common.UNBOLD]: pair.create('font-weight', 'normal'), - [common.BLUE]: pair.create('color', 'blue'), - [common.GREEN]: pair.create('color', 'green'), - [common.GREY]: pair.create('color', 'grey'), - [common.RED]: pair.create('color', 'red'), - [common.PURPLE]: pair.create('color', 'purple'), - [common.ORANGE]: pair.create('color', 'orange'), // not well supported in chrome when debugging node with inspector - TODO: deprecate - [common.UNCOLOR]: pair.create('color', 'black') -} - -/** - * @param {Array} args - * @return {Array} - */ -/* c8 ignore start */ -const computeBrowserLoggingArgs = (args) => { - if (args.length === 1 && args[0]?.constructor === Function) { - args = /** @type {Array} */ (/** @type {[function]} */ (args)[0]()) - } - const strBuilder = [] - const styles = [] - const currentStyle = map.create() - /** - * @type {Array} - */ - let logArgs = [] - // try with formatting until we find something unsupported - let i = 0 - for (; i < args.length; i++) { - const arg = args[i] - // @ts-ignore - const style = _browserStyleMap[arg] - if (style !== undefined) { - currentStyle.set(style.left, style.right) - } else { - if (arg === undefined) { - break - } - if (arg.constructor === String || arg.constructor === Number) { - const style = dom.mapToStyleString(currentStyle) - if (i > 0 || style.length > 0) { - strBuilder.push('%c' + arg) - styles.push(style) - } else { - strBuilder.push(arg) - } - } else { - break - } - } - } - if (i > 0) { - // create logArgs with what we have so far - logArgs = styles - logArgs.unshift(strBuilder.join('')) - } - // append the rest - for (; i < args.length; i++) { - const arg = args[i] - if (!(arg instanceof Symbol)) { - logArgs.push(arg) - } - } - return logArgs -} -/* c8 ignore stop */ - -/* c8 ignore start */ -const computeLoggingArgs = env.supportsColor - ? computeBrowserLoggingArgs - : common.computeNoColorLoggingArgs -/* c8 ignore stop */ - -/** - * @param {Array} args - */ -export const print = (...args) => { - console.log(...computeLoggingArgs(args)) - /* c8 ignore next */ - vconsoles.forEach((vc) => vc.print(args)) -} - -/* c8 ignore start */ -/** - * @param {Array} args - */ -export const warn = (...args) => { - console.warn(...computeLoggingArgs(args)) - args.unshift(common.ORANGE) - vconsoles.forEach((vc) => vc.print(args)) -} -/* c8 ignore stop */ - -/** - * @param {Error} err - */ -/* c8 ignore start */ -export const printError = (err) => { - console.error(err) - vconsoles.forEach((vc) => vc.printError(err)) -} -/* c8 ignore stop */ - -/** - * @param {string} url image location - * @param {number} height height of the image in pixel - */ -/* c8 ignore start */ -export const printImg = (url, height) => { - if (env.isBrowser) { - console.log( - '%c ', - `font-size: ${height}px; background-size: contain; background-repeat: no-repeat; background-image: url(${url})` - ) - // console.log('%c ', `font-size: ${height}x; background: url(${url}) no-repeat;`) - } - vconsoles.forEach((vc) => vc.printImg(url, height)) -} -/* c8 ignore stop */ - -/** - * @param {string} base64 - * @param {number} height - */ -/* c8 ignore next 2 */ -export const printImgBase64 = (base64, height) => - printImg(`data:image/gif;base64,${base64}`, height) - -/** - * @param {Array} args - */ -export const group = (...args) => { - console.group(...computeLoggingArgs(args)) - /* c8 ignore next */ - vconsoles.forEach((vc) => vc.group(args)) -} - -/** - * @param {Array} args - */ -export const groupCollapsed = (...args) => { - console.groupCollapsed(...computeLoggingArgs(args)) - /* c8 ignore next */ - vconsoles.forEach((vc) => vc.groupCollapsed(args)) -} - -export const groupEnd = () => { - console.groupEnd() - /* c8 ignore next */ - vconsoles.forEach((vc) => vc.groupEnd()) -} - -/** - * @param {function():Node} createNode - */ -/* c8 ignore next 2 */ -export const printDom = (createNode) => - vconsoles.forEach((vc) => vc.printDom(createNode())) - -/** - * @param {HTMLCanvasElement} canvas - * @param {number} height - */ -/* c8 ignore next 2 */ -export const printCanvas = (canvas, height) => - printImg(canvas.toDataURL(), height) - -export const vconsoles = set.create() - -/** - * @param {Array} args - * @return {Array} - */ -/* c8 ignore start */ -const _computeLineSpans = (args) => { - const spans = [] - const currentStyle = new Map() - // try with formatting until we find something unsupported - let i = 0 - for (; i < args.length; i++) { - let arg = args[i] - // @ts-ignore - const style = _browserStyleMap[arg] - if (style !== undefined) { - currentStyle.set(style.left, style.right) - } else { - if (arg === undefined) { - arg = 'undefined ' - } - if (arg.constructor === String || arg.constructor === Number) { - // @ts-ignore - const span = dom.element('span', [ - pair.create('style', dom.mapToStyleString(currentStyle)) - ], [dom.text(arg.toString())]) - if (span.innerHTML === '') { - span.innerHTML = ' ' - } - spans.push(span) - } else { - break - } - } - } - // append the rest - for (; i < args.length; i++) { - let content = args[i] - if (!(content instanceof Symbol)) { - if (content.constructor !== String && content.constructor !== Number) { - content = ' ' + json.stringify(content) + ' ' - } - spans.push( - dom.element('span', [], [dom.text(/** @type {string} */ (content))]) - ) - } - } - return spans -} -/* c8 ignore stop */ - -const lineStyle = - 'font-family:monospace;border-bottom:1px solid #e2e2e2;padding:2px;' - -/* c8 ignore start */ -export class VConsole { - /** - * @param {Element} dom - */ - constructor (dom) { - this.dom = dom - /** - * @type {Element} - */ - this.ccontainer = this.dom - this.depth = 0 - vconsoles.add(this) - } - - /** - * @param {Array} args - * @param {boolean} collapsed - */ - group (args, collapsed = false) { - eventloop.enqueue(() => { - const triangleDown = dom.element('span', [ - pair.create('hidden', collapsed), - pair.create('style', 'color:grey;font-size:120%;') - ], [dom.text('▼')]) - const triangleRight = dom.element('span', [ - pair.create('hidden', !collapsed), - pair.create('style', 'color:grey;font-size:125%;') - ], [dom.text('▶')]) - const content = dom.element( - 'div', - [pair.create( - 'style', - `${lineStyle};padding-left:${this.depth * 10}px` - )], - [triangleDown, triangleRight, dom.text(' ')].concat( - _computeLineSpans(args) - ) - ) - const nextContainer = dom.element('div', [ - pair.create('hidden', collapsed) - ]) - const nextLine = dom.element('div', [], [content, nextContainer]) - dom.append(this.ccontainer, [nextLine]) - this.ccontainer = nextContainer - this.depth++ - // when header is clicked, collapse/uncollapse container - dom.addEventListener(content, 'click', (_event) => { - nextContainer.toggleAttribute('hidden') - triangleDown.toggleAttribute('hidden') - triangleRight.toggleAttribute('hidden') - }) - }) - } - - /** - * @param {Array} args - */ - groupCollapsed (args) { - this.group(args, true) - } - - groupEnd () { - eventloop.enqueue(() => { - if (this.depth > 0) { - this.depth-- - // @ts-ignore - this.ccontainer = this.ccontainer.parentElement.parentElement - } - }) - } - - /** - * @param {Array} args - */ - print (args) { - eventloop.enqueue(() => { - dom.append(this.ccontainer, [ - dom.element('div', [ - pair.create( - 'style', - `${lineStyle};padding-left:${this.depth * 10}px` - ) - ], _computeLineSpans(args)) - ]) - }) - } - - /** - * @param {Error} err - */ - printError (err) { - this.print([common.RED, common.BOLD, err.toString()]) - } - - /** - * @param {string} url - * @param {number} height - */ - printImg (url, height) { - eventloop.enqueue(() => { - dom.append(this.ccontainer, [ - dom.element('img', [ - pair.create('src', url), - pair.create('height', `${math.round(height * 1.5)}px`) - ]) - ]) - }) - } - - /** - * @param {Node} node - */ - printDom (node) { - eventloop.enqueue(() => { - dom.append(this.ccontainer, [node]) - }) - } - - destroy () { - eventloop.enqueue(() => { - vconsoles.delete(this) - }) - } -} -/* c8 ignore stop */ - -/** - * @param {Element} dom - */ -/* c8 ignore next */ -export const createVConsole = (dom) => new VConsole(dom) - -/** - * @param {string} moduleName - * @return {function(...any):void} - */ -export const createModuleLogger = (moduleName) => common.createModuleLogger(print, moduleName) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.d.ts deleted file mode 100644 index 69edeeb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export function print(...args: Array): void; -export function warn(...args: Array): void; -export function printError(err: Error): void; -export function printImg(_url: string, _height: number): void; -export function printImgBase64(base64: string, height: number): void; -export function group(...args: Array): void; -export function groupCollapsed(...args: Array): void; -export function groupEnd(): void; -export function printDom(_createNode: () => Node): void; -export function printCanvas(canvas: HTMLCanvasElement, height: number): void; -export function createVConsole(_dom: Element): void; -export function createModuleLogger(moduleName: string): (...args: any[]) => void; -export { BOLD, UNBOLD, BLUE, GREY, GREEN, RED, PURPLE, ORANGE, UNCOLOR } from "./logging.common.js"; -//# sourceMappingURL=logging.node.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.d.ts.map deleted file mode 100644 index a821eba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logging.node.d.ts","sourceRoot":"","sources":["logging.node.js"],"names":[],"mappings":"AA6EO,+BAFI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,SAAS,CAAC,QAItD;AAMM,8BAFI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAI5C;AAOM,gCAHI,KAAK,QAKf;AAQM,+BAJI,MAAM,WACN,MAAM,QAKhB;AAQM,uCAJI,MAAM,UACN,MAAM,QAIoC;AAM9C,+BAHI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAK5C;AAMM,wCAHI,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,CAAC,QAK5C;AAGM,iCAEN;AAMM,sCAHI,MAAW,IAAI,QAGiB;AAOpC,oCAJI,iBAAiB,UACjB,MAAM,QAIqB;AAM/B,qCAHI,OAAO,QAGwB;AAOnC,+CAJI,MAAM,GACL,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,IAAI,CAG6D"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.js deleted file mode 100644 index 63d41ec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.js +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Isomorphic logging module with support for colors! - * - * @module logging - */ - -import * as env from './environment.js' -import * as common from './logging.common.js' - -export { BOLD, UNBOLD, BLUE, GREY, GREEN, RED, PURPLE, ORANGE, UNCOLOR } from './logging.common.js' - -const _nodeStyleMap = { - [common.BOLD]: '\u001b[1m', - [common.UNBOLD]: '\u001b[2m', - [common.BLUE]: '\x1b[34m', - [common.GREEN]: '\x1b[32m', - [common.GREY]: '\u001b[37m', - [common.RED]: '\x1b[31m', - [common.PURPLE]: '\x1b[35m', - [common.ORANGE]: '\x1b[38;5;208m', - [common.UNCOLOR]: '\x1b[0m' -} - -/* c8 ignore start */ -/** - * @param {Array>} args - * @return {Array} - */ -const computeNodeLoggingArgs = (args) => { - if (args.length === 1 && args[0]?.constructor === Function) { - args = /** @type {Array} */ (/** @type {[function]} */ (args)[0]()) - } - const strBuilder = [] - const logArgs = [] - // try with formatting until we find something unsupported - let i = 0 - for (; i < args.length; i++) { - const arg = args[i] - // @ts-ignore - const style = _nodeStyleMap[arg] - if (style !== undefined) { - strBuilder.push(style) - } else { - if (arg === undefined) { - break - } else if (arg.constructor === String || arg.constructor === Number) { - strBuilder.push(arg) - } else { - break - } - } - } - if (i > 0) { - // create logArgs with what we have so far - strBuilder.push('\x1b[0m') - logArgs.push(strBuilder.join('')) - } - // append the rest - for (; i < args.length; i++) { - const arg = args[i] - if (!(arg instanceof Symbol)) { - logArgs.push(arg) - } - } - return logArgs -} -/* c8 ignore stop */ - -/* c8 ignore start */ -const computeLoggingArgs = env.supportsColor - ? computeNodeLoggingArgs - : common.computeNoColorLoggingArgs -/* c8 ignore stop */ - -/** - * @param {Array} args - */ -export const print = (...args) => { - console.log(...computeLoggingArgs(args)) -} - -/* c8 ignore start */ -/** - * @param {Array} args - */ -export const warn = (...args) => { - console.warn(...computeLoggingArgs(args)) -} -/* c8 ignore stop */ - -/** - * @param {Error} err - */ -/* c8 ignore start */ -export const printError = (err) => { - console.error(err) -} -/* c8 ignore stop */ - -/** - * @param {string} _url image location - * @param {number} _height height of the image in pixel - */ -/* c8 ignore start */ -export const printImg = (_url, _height) => { - // console.log('%c ', `font-size: ${height}x; background: url(${url}) no-repeat;`) -} -/* c8 ignore stop */ - -/** - * @param {string} base64 - * @param {number} height - */ -/* c8 ignore next 2 */ -export const printImgBase64 = (base64, height) => - printImg(`data:image/gif;base64,${base64}`, height) - -/** - * @param {Array} args - */ -/* c8 ignore next 3 */ -export const group = (...args) => { - console.group(...computeLoggingArgs(args)) -} - -/** - * @param {Array} args - */ -/* c8 ignore next 3 */ -export const groupCollapsed = (...args) => { - console.groupCollapsed(...computeLoggingArgs(args)) -} - -/* c8 ignore next 3 */ -export const groupEnd = () => { - console.groupEnd() -} - -/** - * @param {function():Node} _createNode - */ -/* c8 ignore next 2 */ -export const printDom = (_createNode) => {} - -/** - * @param {HTMLCanvasElement} canvas - * @param {number} height - */ -/* c8 ignore next 2 */ -export const printCanvas = (canvas, height) => - printImg(canvas.toDataURL(), height) - -/** - * @param {Element} _dom - */ -/* c8 ignore next */ -export const createVConsole = (_dom) => {} - -/** - * @param {string} moduleName - * @return {function(...any):void} - */ -/* c8 ignore next */ -export const createModuleLogger = (moduleName) => common.createModuleLogger(print, moduleName) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.test.d.ts deleted file mode 100644 index 0bdf329..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testLogging(): void; -export function testModuleLogger(): void; -//# sourceMappingURL=logging.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.test.d.ts.map deleted file mode 100644 index 38b69bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logging.test.d.ts","sourceRoot":"","sources":["logging.test.js"],"names":[],"mappings":"AAEO,oCAgBN;AAEM,yCAON"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.d.ts deleted file mode 100644 index f1f216e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function create(): Map; -export function copy(m: Map): Map; -export function setIfUndefined, CF extends MAP extends Map ? () => V : unknown>(map: MAP, key: MAP extends Map ? K : unknown, createT: CF): ReturnType; -export function map(m: Map, f: (arg0: V, arg1: K) => R): Array; -export function any(m: Map, f: (arg0: V, arg1: K) => boolean): boolean; -export function all(m: Map, f: (arg0: V, arg1: K) => boolean): boolean; -export type GlobalMap = Map; -//# sourceMappingURL=map.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.d.ts.map deleted file mode 100644 index 6ff23cd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["map.js"],"names":[],"mappings":"AAoBO,0BAJK,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAIY;AAU9B,qBAJM,CAAC,EAAC,CAAC,KACL,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,GACP,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAMnB;AAkBM,+BAPsB,GAAG,SAAlB,GAAG,CAAC,GAAG,EAAE,GAAG,CAAE,EACyC,EAAE,SAAzD,GAAG,SAAS,GAAG,CAAC,GAAG,EAAC,MAAM,CAAC,CAAC,GAAG,MAAW,CAAC,GAAG,OAAQ,OACzD,GAAG,OACH,GAAG,SAAS,GAAG,CAAC,MAAM,CAAC,EAAC,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,WAC1C,EAAE,GACD,UAAU,CAAC,EAAE,CAAC,CAQzB;AAaM,oBAPM,CAAC,EACD,CAAC,EACD,CAAC,KACH,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,KACR,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,CAAC,GACd,KAAK,CAAC,CAAC,CAAC,CAQnB;AAcM,oBANM,CAAC,EACD,CAAC,KACH,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,KACR,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,OAAO,GACpB,OAAO,CASlB;AAYM,oBANM,CAAC,EACD,CAAC,KACH,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,KACR,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,OAAO,GACpB,OAAO,CASlB;sBA9GY,CAAC,EACD,CAAC,IACD,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.js deleted file mode 100644 index 3a88f51..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Utility module to work with key-value stores. - * - * @module map - */ - -/** - * @template K - * @template V - * @typedef {Map} GlobalMap - */ - -/** - * Creates a new Map instance. - * - * @function - * @return {Map} - * - * @function - */ -export const create = () => new Map() - -/** - * Copy a Map object into a fresh Map object. - * - * @function - * @template K,V - * @param {Map} m - * @return {Map} - */ -export const copy = m => { - const r = create() - m.forEach((v, k) => { r.set(k, v) }) - return r -} - -/** - * Get map property. Create T if property is undefined and set T on map. - * - * ```js - * const listeners = map.setIfUndefined(events, 'eventName', set.create) - * listeners.add(listener) - * ``` - * - * @function - * @template {Map} MAP - * @template {MAP extends Map ? function():V : unknown} CF - * @param {MAP} map - * @param {MAP extends Map ? K : unknown} key - * @param {CF} createT - * @return {ReturnType} - */ -export const setIfUndefined = (map, key, createT) => { - let set = map.get(key) - if (set === undefined) { - map.set(key, set = createT()) - } - return set -} - -/** - * Creates an Array and populates it with the content of all key-value pairs using the `f(value, key)` function. - * - * @function - * @template K - * @template V - * @template R - * @param {Map} m - * @param {function(V,K):R} f - * @return {Array} - */ -export const map = (m, f) => { - const res = [] - for (const [key, value] of m) { - res.push(f(value, key)) - } - return res -} - -/** - * Tests whether any key-value pairs pass the test implemented by `f(value, key)`. - * - * @todo should rename to some - similarly to Array.some - * - * @function - * @template K - * @template V - * @param {Map} m - * @param {function(V,K):boolean} f - * @return {boolean} - */ -export const any = (m, f) => { - for (const [key, value] of m) { - if (f(value, key)) { - return true - } - } - return false -} - -/** - * Tests whether all key-value pairs pass the test implemented by `f(value, key)`. - * - * @function - * @template K - * @template V - * @param {Map} m - * @param {function(V,K):boolean} f - * @return {boolean} - */ -export const all = (m, f) => { - for (const [key, value] of m) { - if (!f(value, key)) { - return false - } - } - return true -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.test.d.ts deleted file mode 100644 index ca8dbcc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.test.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function testMap(_tc: t.TestCase): void; -export function testTypeDefinitions(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=map.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.test.d.ts.map deleted file mode 100644 index 41f7c5f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.test.d.ts","sourceRoot":"","sources":["map.test.js"],"names":[],"mappings":"AAOO,6BAFI,CAAC,CAAC,QAAQ,QAsBpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,QAwBpB;mBApDkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.d.ts deleted file mode 100644 index 7490f90..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Common Math expressions. - * - * @module math - */ -export const floor: (x: number) => number; -export const ceil: (x: number) => number; -export const abs: (x: number) => number; -export const imul: (x: number, y: number) => number; -export const round: (x: number) => number; -export const log10: (x: number) => number; -export const log2: (x: number) => number; -export const log: (x: number) => number; -export const sqrt: (x: number) => number; -export function add(a: number, b: number): number; -export function min(a: number, b: number): number; -export function max(a: number, b: number): number; -export const isNaN: (number: unknown) => boolean; -export const pow: (x: number, y: number) => number; -export function exp10(exp: number): number; -export const sign: (x: number) => number; -export function isNegativeZero(n: number): boolean; -//# sourceMappingURL=math.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.d.ts.map deleted file mode 100644 index 265d466..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["math.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,0CAA+B;AAC/B,yCAA6B;AAC7B,wCAA2B;AAC3B,oDAA6B;AAC7B,0CAA+B;AAC/B,0CAA+B;AAC/B,yCAA6B;AAC7B,wCAA2B;AAC3B,yCAA6B;AAQtB,uBAJI,MAAM,KACN,MAAM,GACL,MAAM,CAEgB;AAQ3B,uBAJI,MAAM,KACN,MAAM,GACL,MAAM,CAEwB;AAQnC,uBAJI,MAAM,KACN,MAAM,GACL,MAAM,CAEwB;AAE1C,iDAAiC;AAEjC,mDAA2B;AAOpB,2BAHI,MAAM,GACL,MAAM,CAE2B;AAE7C,yCAA6B;AAQtB,kCAHI,MAAM,GACL,OAAO,CAE2C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.js deleted file mode 100644 index 50c0d8d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Common Math expressions. - * - * @module math - */ - -export const floor = Math.floor -export const ceil = Math.ceil -export const abs = Math.abs -export const imul = Math.imul -export const round = Math.round -export const log10 = Math.log10 -export const log2 = Math.log2 -export const log = Math.log -export const sqrt = Math.sqrt - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The sum of a and b - */ -export const add = (a, b) => a + b - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The smaller element of a and b - */ -export const min = (a, b) => a < b ? a : b - -/** - * @function - * @param {number} a - * @param {number} b - * @return {number} The bigger element of a and b - */ -export const max = (a, b) => a > b ? a : b - -export const isNaN = Number.isNaN - -export const pow = Math.pow -/** - * Base 10 exponential function. Returns the value of 10 raised to the power of pow. - * - * @param {number} exp - * @return {number} - */ -export const exp10 = exp => Math.pow(10, exp) - -export const sign = Math.sign - -/** - * Check whether n is negative, while considering the -0 edge case. While `-0 < 0` is false, this - * function returns true for -0,-1,,.. and returns false for 0,1,2,... - * @param {number} n - * @return {boolean} Wether n is negative. This function also distinguishes between -0 and +0 - */ -export const isNegativeZero = n => n !== 0 ? n < 0 : 1 / n < 0 diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.test.d.ts deleted file mode 100644 index ff01d80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testMath(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=math.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.test.d.ts.map deleted file mode 100644 index af9e13f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"math.test.d.ts","sourceRoot":"","sources":["math.test.js"],"names":[],"mappings":"AAOO,6BAFI,CAAC,CAAC,QAAQ,QA0BpB;mBA/BkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.d.ts deleted file mode 100644 index 144f43c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export const yotta: 1e+24; -export const zetta: 1e+21; -export const exa: 1000000000000000000; -export const peta: 1000000000000000; -export const tera: 1000000000000; -export const giga: 1000000000; -export const mega: 1000000; -export const kilo: 1000; -export const hecto: 100; -export const deca: 10; -export const deci: 0.1; -export const centi: 0.01; -export const milli: 0.001; -export const micro: 0.000001; -export const nano: 1e-9; -export const pico: 1e-12; -export const femto: 1e-15; -export const atto: 1e-18; -export const zepto: 1e-21; -export const yocto: 1e-24; -export function prefix(n: number, baseMultiplier?: number): { - n: number; - prefix: string; -}; -//# sourceMappingURL=metric.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.d.ts.map deleted file mode 100644 index f8137af..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metric.d.ts","sourceRoot":"","sources":["metric.js"],"names":[],"mappings":"AAQA,oBAAqB,KAAI,CAAA;AACzB,oBAAqB,KAAI,CAAA;AACzB,kBAAmB,mBAAI,CAAA;AACvB,mBAAoB,gBAAI,CAAA;AACxB,mBAAoB,aAAI,CAAA;AACxB,mBAAoB,UAAG,CAAA;AACvB,mBAAoB,OAAG,CAAA;AACvB,mBAAoB,IAAG,CAAA;AACvB,oBAAqB,GAAG,CAAA;AACxB,mBAAoB,EAAE,CAAA;AACtB,mBAAoB,GAAG,CAAA;AACvB,oBAAqB,IAAI,CAAA;AACzB,oBAAqB,KAAI,CAAA;AACzB,oBAAqB,QAAI,CAAA;AACzB,mBAAoB,IAAI,CAAA;AACxB,mBAAoB,KAAK,CAAA;AACzB,oBAAqB,KAAK,CAAA;AAC1B,mBAAoB,KAAK,CAAA;AACzB,oBAAqB,KAAK,CAAA;AAC1B,oBAAqB,KAAK,CAAA;AAYnB,0BAJI,MAAM,mBACN,MAAM,GACL;IAAC,CAAC,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,MAAM,CAAA;CAAC,CAkBnC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.js deleted file mode 100644 index 6365453..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Utility module to convert metric values. - * - * @module metric - */ - -import * as math from './math.js' - -export const yotta = 1e24 -export const zetta = 1e21 -export const exa = 1e18 -export const peta = 1e15 -export const tera = 1e12 -export const giga = 1e9 -export const mega = 1e6 -export const kilo = 1e3 -export const hecto = 1e2 -export const deca = 10 -export const deci = 0.1 -export const centi = 0.01 -export const milli = 1e-3 -export const micro = 1e-6 -export const nano = 1e-9 -export const pico = 1e-12 -export const femto = 1e-15 -export const atto = 1e-18 -export const zepto = 1e-21 -export const yocto = 1e-24 - -const prefixUp = ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'] -const prefixDown = ['', 'm', 'μ', 'n', 'p', 'f', 'a', 'z', 'y'] - -/** - * Calculate the metric prefix for a number. Assumes E.g. `prefix(1000) = { n: 1, prefix: 'k' }` - * - * @param {number} n - * @param {number} [baseMultiplier] Multiplier of the base (10^(3*baseMultiplier)). E.g. `convert(time, -3)` if time is already in milli seconds - * @return {{n:number,prefix:string}} - */ -export const prefix = (n, baseMultiplier = 0) => { - const nPow = n === 0 ? 0 : math.log10(n) - let mult = 0 - while (nPow < mult * 3 && baseMultiplier > -8) { - baseMultiplier-- - mult-- - } - while (nPow >= 3 + mult * 3 && baseMultiplier < 8) { - baseMultiplier++ - mult++ - } - const prefix = baseMultiplier < 0 ? prefixDown[-baseMultiplier] : prefixUp[baseMultiplier] - return { - n: math.round((mult > 0 ? n / math.exp10(mult * 3) : n * math.exp10(mult * -3)) * 1e12) / 1e12, - prefix - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.test.d.ts deleted file mode 100644 index 3672726..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testMetricPrefix(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=metric.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.test.d.ts.map deleted file mode 100644 index e129d7b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/metric.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metric.test.d.ts","sourceRoot":"","sources":["metric.test.js"],"names":[],"mappings":"AAMO,qCAFI,CAAC,CAAC,QAAQ,QA8BpB;mBAlCkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.d.ts deleted file mode 100644 index 92fd40f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function createMutex(): mutex; -export type mutex = (cb: () => void, elseCb?: (() => void) | undefined) => any; -//# sourceMappingURL=mutex.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.d.ts.map deleted file mode 100644 index c38ab37..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mutex.d.ts","sourceRoot":"","sources":["mutex.js"],"names":[],"mappings":"AA4BO,+BAHK,KAAK,CAiBhB;yBAlCU,MAAW,IAAI,kBACJ,IAAI"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.js deleted file mode 100644 index 41513ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Mutual exclude for JavaScript. - * - * @module mutex - */ - -/** - * @callback mutex - * @param {function():void} cb Only executed when this mutex is not in the current stack - * @param {function():void} [elseCb] Executed when this mutex is in the current stack - */ - -/** - * Creates a mutual exclude function with the following property: - * - * ```js - * const mutex = createMutex() - * mutex(() => { - * // This function is immediately executed - * mutex(() => { - * // This function is not executed, as the mutex is already active. - * }) - * }) - * ``` - * - * @return {mutex} A mutual exclude function - * @public - */ -export const createMutex = () => { - let token = true - return (f, g) => { - if (token) { - token = false - try { - f() - } finally { - token = true - } - } else if (g !== undefined) { - g() - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.test.d.ts deleted file mode 100644 index d58484b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testMutex(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=mutex.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.test.d.ts.map deleted file mode 100644 index 3d0251b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/mutex.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mutex.test.d.ts","sourceRoot":"","sources":["mutex.test.js"],"names":[],"mappings":"AAMO,+BAFI,CAAC,CAAC,QAAQ,QAmBpB;mBAvBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0ecdsa-generate-keypair b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0ecdsa-generate-keypair deleted file mode 100755 index d9dd1e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0ecdsa-generate-keypair +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../bin/0ecdsa-generate-keypair.js" "$@" -else - exec node "$basedir/../../bin/0ecdsa-generate-keypair.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0gentesthtml b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0gentesthtml deleted file mode 100755 index 5cfe0ec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0gentesthtml +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../bin/gentesthtml.js" "$@" -else - exec node "$basedir/../../bin/gentesthtml.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0serve b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0serve deleted file mode 100755 index 5c06302..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules/.bin/0serve +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../bin/0serve.js" "$@" -else - exec node "$basedir/../../bin/0serve.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.d.ts deleted file mode 100644 index 851ba98..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const MAX_SAFE_INTEGER: number; -export const MIN_SAFE_INTEGER: number; -export const LOWEST_INT32: number; -export const HIGHEST_INT32: number; -export const HIGHEST_UINT32: number; -export const isInteger: (number: unknown) => boolean; -export const isNaN: (number: unknown) => boolean; -export const parseInt: (string: string, radix?: number) => number; -export function countBits(n: number): number; -//# sourceMappingURL=number.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.d.ts.map deleted file mode 100644 index 4492025..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["number.js"],"names":[],"mappings":"AASA,sCAAuD;AACvD,sCAAuD;AAEvD,kCAAmC;AACnC,mCAA0C;AAC1C,oCAA2C;AAG3C,qDAAyH;AACzH,iDAAiC;AACjC,kEAAuC;AAShC,6BAFI,MAAM,UAUhB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.js deleted file mode 100644 index bbc297a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Utility helpers for working with numbers. - * - * @module number - */ - -import * as math from './math.js' -import * as binary from './binary.js' - -export const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER -export const MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER - -export const LOWEST_INT32 = 1 << 31 -export const HIGHEST_INT32 = binary.BITS31 -export const HIGHEST_UINT32 = binary.BITS32 - -/* c8 ignore next */ -export const isInteger = Number.isInteger || (num => typeof num === 'number' && isFinite(num) && math.floor(num) === num) -export const isNaN = Number.isNaN -export const parseInt = Number.parseInt - -/** - * Count the number of "1" bits in an unsigned 32bit number. - * - * Super fun bitcount algorithm by Brian Kernighan. - * - * @param {number} n - */ -export const countBits = n => { - n &= binary.BITS32 - let count = 0 - while (n) { - n &= (n - 1) - count++ - } - return count -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.test.d.ts deleted file mode 100644 index 71df185..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.test.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function testNumber(_tc: t.TestCase): void; -export function testShiftVsDivision(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=number.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.test.d.ts.map deleted file mode 100644 index 480fc6c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"number.test.d.ts","sourceRoot":"","sources":["number.test.js"],"names":[],"mappings":"AAQO,gCAFI,CAAC,CAAC,QAAQ,QAiBpB;AAOM,wCAFI,CAAC,CAAC,QAAQ,QA6DpB;mBAzFkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.d.ts deleted file mode 100644 index 59f4dfe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -export function create(): { - [x: string]: any; -}; -export function isObject(o: any): o is { - [k: string]: any; -}; -/** - * Object.assign - */ -export const assign: { - (target: T, source: U): T & U; - (target: T, source1: U, source2: V_1): T & U & V_1; - (target: T, source1: U, source2: V_1, source3: W): T & U & V_1 & W; - (target: object, ...sources: any[]): any; -}; -/** - * @param {Object} obj - */ -export const keys: { - (o: object): string[]; - (o: {}): string[]; -}; -/** - * @template V - * @param {{[key:string]: V}} obj - * @return {Array} - */ -export const values: { - (o: { - [s: string]: T; - } | ArrayLike): T[]; - (o: {}): any[]; -}; -export function forEach(obj: { - [k: string]: V_1; -}, f: (arg0: V_1, arg1: string) => any): void; -export function map(obj: { - [x: string]: any; -}, f: (arg0: any, arg1: string) => R): Array; -export function length(obj: { - [x: string]: any; -}): number; -export function size(obj: { - [x: string]: any; -}): number; -export function some(obj: T, f: (v: T[keyof T], k: keyof T) => boolean): boolean; -export function isEmpty(obj: Object | null | undefined): boolean; -export function every(obj: T, f: (v: T[keyof T], k: keyof T) => boolean): boolean; -export function hasProperty(obj: any, key: string | number | symbol): boolean; -export function equalFlat(a: { - [x: string]: any; -}, b: { - [x: string]: any; -}): boolean; -/** - * Make an object immutable. This hurts performance and is usually not needed if you perform good - * coding practices. - */ -export const freeze: { - (f: T): T; - (o: T): Readonly; - (o: T): Readonly; -}; -export function deepFreeze(o: T): Readonly; -export function setIfUndefined(o: KV, key: K, createT: () => KV[K]): KV[K]; -//# sourceMappingURL=object.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.d.ts.map deleted file mode 100644 index 13fb8cb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["object.js"],"names":[],"mappings":"AAWO;;EAAwC;AAMxC,4BAHI,GAAG,GACF,CAAC,IAAI;IAAE,CAAC,CAAC,EAAC,MAAM,GAAE,GAAG,CAAA;CAAE,CAEe;AAElD;;GAEG;AACH;;;;;EAAmC;AAEnC;;GAEG;AACH;;;EAA+B;AAE/B;;;;GAIG;AACH;;;;;EAAmC;AAO5B,kCAHI;IAAC,CAAC,CAAC,EAAC,MAAM,GAAE,GAAC,CAAA;CAAC,KACd,CAAS,IAAC,EAAD,GAAC,EAAC,IAAM,EAAN,MAAM,KAAE,GAAG,QAMhC;AAUM,oBALM,CAAC;;MAEH,CAAS,IAAG,EAAH,GAAG,EAAC,IAAM,EAAN,MAAM,KAAE,CAAC,GACrB,KAAK,CAAC,CAAC,CAAC,CAQnB;AAOM;;IAFK,MAAM,CAE2B;AAMtC;;IAFK,MAAM,CAEyB;AAQpC,qBAL4C,CAAC,SAAvC;IAAG,CAAC,GAAG,EAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAG,GAAG,CAAA;CAAG,OACvC,CAAC,KACD,CAAC,CAAC,EAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAC,CAAC,EAAC,MAAM,CAAC,KAAG,OAAO,GAChC,OAAO,CASlB;AAKM,6BAFI,MAAM,GAAC,IAAI,GAAC,SAAS,WAQ/B;AAQM,sBAL4C,CAAC,SAAvC;IAAG,CAAC,GAAG,EAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAG,GAAG,CAAA;CAAG,OACvC,CAAC,KACD,CAAC,CAAC,EAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAC,CAAC,EAAC,MAAM,CAAC,KAAG,OAAO,GAChC,OAAO,CASlB;AASM,iCAJI,GAAG,OACH,MAAM,GAAC,MAAM,GAAC,MAAM,GACnB,OAAO,CAEoE;AAOhF;;;;IAFK,OAAO,CAE2J;AAE9K;;;GAGG;AACH;;;;;;EAAmC;AAU5B,2BAJY,CAAC,qBACT,CAAC,GACA,QAAQ,CAAC,CAAC,CAAC,CAUtB;AAaM,+BAPe,EAAE,SAAX,MAAQ,EACI,CAAC,SAAb,MAAO,EAAG,gBACZ,EAAE,OACF,CAAC,WACD,MAAM,EAAE,CAAC,CAAC,CAAC,GACV,EAAE,CAAC,CAAC,CAAC,CAEqF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.js deleted file mode 100644 index f0e52ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.js +++ /dev/null @@ -1,169 +0,0 @@ -import * as equalityTrait from './trait/equality.js' - -/** - * Utility functions for working with EcmaScript objects. - * - * @module object - */ - -/** - * @return {Object} obj - */ -export const create = () => Object.create(null) - -/** - * @param {any} o - * @return {o is { [k:string]:any }} - */ -export const isObject = o => typeof o === 'object' - -/** - * Object.assign - */ -export const assign = Object.assign - -/** - * @param {Object} obj - */ -export const keys = Object.keys - -/** - * @template V - * @param {{[key:string]: V}} obj - * @return {Array} - */ -export const values = Object.values - -/** - * @template V - * @param {{[k:string]:V}} obj - * @param {function(V,string):any} f - */ -export const forEach = (obj, f) => { - for (const key in obj) { - f(obj[key], key) - } -} - -/** - * @todo implement mapToArray & map - * - * @template R - * @param {Object} obj - * @param {function(any,string):R} f - * @return {Array} - */ -export const map = (obj, f) => { - const results = [] - for (const key in obj) { - results.push(f(obj[key], key)) - } - return results -} - -/** - * @deprecated use object.size instead - * @param {Object} obj - * @return {number} - */ -export const length = obj => keys(obj).length - -/** - * @param {Object} obj - * @return {number} - */ -export const size = obj => keys(obj).length - -/** - * @template {{ [key:string|number|symbol]: any }} T - * @param {T} obj - * @param {(v:T[keyof T],k:keyof T)=>boolean} f - * @return {boolean} - */ -export const some = (obj, f) => { - for (const key in obj) { - if (f(obj[key], key)) { - return true - } - } - return false -} - -/** - * @param {Object|null|undefined} obj - */ -export const isEmpty = obj => { - // eslint-disable-next-line no-unreachable-loop - for (const _k in obj) { - return false - } - return true -} - -/** - * @template {{ [key:string|number|symbol]: any }} T - * @param {T} obj - * @param {(v:T[keyof T],k:keyof T)=>boolean} f - * @return {boolean} - */ -export const every = (obj, f) => { - for (const key in obj) { - if (!f(obj[key], key)) { - return false - } - } - return true -} - -/** - * Calls `Object.prototype.hasOwnProperty`. - * - * @param {any} obj - * @param {string|number|symbol} key - * @return {boolean} - */ -export const hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key) - -/** - * @param {Object} a - * @param {Object} b - * @return {boolean} - */ -export const equalFlat = (a, b) => a === b || (size(a) === size(b) && every(a, (val, key) => (val !== undefined || hasProperty(b, key)) && equalityTrait.equals(b[key], val))) - -/** - * Make an object immutable. This hurts performance and is usually not needed if you perform good - * coding practices. - */ -export const freeze = Object.freeze - -/** - * Make an object and all its children immutable. - * This *really* hurts performance and is usually not needed if you perform good coding practices. - * - * @template {any} T - * @param {T} o - * @return {Readonly} - */ -export const deepFreeze = (o) => { - for (const key in o) { - const c = o[key] - if (typeof c === 'object' || typeof c === 'function') { - deepFreeze(o[key]) - } - } - return freeze(o) -} - -/** - * Get object property. Create T if property is undefined and set T on object. - * - * @function - * @template {object} KV - * @template {keyof KV} [K=keyof KV] - * @param {KV} o - * @param {K} key - * @param {() => KV[K]} createT - * @return {KV[K]} - */ -export const setIfUndefined = (o, key, createT) => hasProperty(o, key) ? o[key] : (o[key] = createT()) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.test.d.ts deleted file mode 100644 index 9b50e5f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testEqualFlat(): void; -export function testObject(_tc: t.TestCase): void; -export function testFreeze(_tc: t.TestCase): void; -export function testSetifundefined(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=object.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.test.d.ts.map deleted file mode 100644 index b51e06f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"object.test.d.ts","sourceRoot":"","sources":["object.test.js"],"names":[],"mappings":"AAIO,sCAEN;AAKM,gCAFI,CAAC,CAAC,QAAQ,QA4CpB;AAKM,gCAFI,CAAC,CAAC,QAAQ,QAuBpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QAgBpB;mBAlGkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.d.ts deleted file mode 100644 index 8d83170..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Handles named events. - * @experimental - * - * This is basically a (better typed) duplicate of Observable, which will replace Observable in the - * next release. - * - * @template {{[key in keyof EVENTS]: function(...any):void}} EVENTS - */ -export class ObservableV2 void; }> { - /** - * Some desc. - * @type {Map>} - */ - _observers: Map>; - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - on(name: NAME, f: EVENTS[NAME]): EVENTS[NAME]; - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - once(name: NAME, f: EVENTS[NAME]): void; - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - off(name: NAME, f: EVENTS[NAME]): void; - /** - * Emit a named event. All registered event listeners that listen to the - * specified name will receive the event. - * - * @todo This should catch exceptions - * - * @template {keyof EVENTS & string} NAME - * @param {NAME} name The event name. - * @param {Parameters} args The arguments that are applied to the event listener. - */ - emit(name: NAME, args: Parameters): void; - destroy(): void; -} -/** - * Handles named events. - * - * @deprecated - * @template N - */ -export class Observable { - /** - * Some desc. - * @type {Map} - */ - _observers: Map; - /** - * @param {N} name - * @param {function} f - */ - on(name: N, f: Function): void; - /** - * @param {N} name - * @param {function} f - */ - once(name: N, f: Function): void; - /** - * @param {N} name - * @param {function} f - */ - off(name: N, f: Function): void; - /** - * Emit a named event. All registered event listeners that listen to the - * specified name will receive the event. - * - * @todo This should catch exceptions - * - * @param {N} name The event name. - * @param {Array} args The arguments that are applied to the event listener. - */ - emit(name: N, args: Array): void; - destroy(): void; -} -//# sourceMappingURL=observable.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.d.ts.map deleted file mode 100644 index 00ceb94..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observable.d.ts","sourceRoot":"","sources":["observable.js"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH,0BAF8D,MAAM,SAAvD,GAAG,GAAG,IAAI,MAAM,MAAM,GAAG,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,IAAI,GAAE;IAIzD;;;OAGG;IACH,YAFU,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAED;IAGhC;;;;OAIG;IACH,GAJqC,IAAI,SAA3B,MAAM,MAAM,GAAG,MAAO,QACzB,IAAI,KACJ,MAAM,CAAC,IAAI,CAAC,gBAKtB;IAED;;;;OAIG;IACH,KAJqC,IAAI,SAA3B,MAAM,MAAM,GAAG,MAAO,QACzB,IAAI,KACJ,MAAM,CAAC,IAAI,CAAC,QAWtB;IAED;;;;OAIG;IACH,IAJqC,IAAI,SAA3B,MAAM,MAAM,GAAG,MAAO,QACzB,IAAI,KACJ,MAAM,CAAC,IAAI,CAAC,QAUtB;IAED;;;;;;;;;OASG;IACH,KAJqC,IAAI,SAA3B,MAAM,MAAM,GAAG,MAAO,QACzB,IAAI,QACJ,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAKlC;IAED,gBAEC;CACF;AAGD;;;;;GAKG;AACH,wBAFa,CAAC;IAIV;;;OAGG;IACH,YAFU,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAES;IAGhC;;;OAGG;IACH,SAHW,CAAC,qBAKX;IAED;;;OAGG;IACH,WAHW,CAAC,qBAYX;IAED;;;OAGG;IACH,UAHW,CAAC,qBAWX;IAED;;;;;;;;OAQG;IACH,WAHW,CAAC,QACD,KAAK,CAAC,GAAG,CAAC,QAKpB;IAED,gBAEC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.js deleted file mode 100644 index c1c0ed2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.js +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Observable class prototype. - * - * @module observable - */ - -import * as map from './map.js' -import * as set from './set.js' -import * as array from './array.js' - -/** - * Handles named events. - * @experimental - * - * This is basically a (better typed) duplicate of Observable, which will replace Observable in the - * next release. - * - * @template {{[key in keyof EVENTS]: function(...any):void}} EVENTS - */ -export class ObservableV2 { - constructor () { - /** - * Some desc. - * @type {Map>} - */ - this._observers = map.create() - } - - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - on (name, f) { - map.setIfUndefined(this._observers, /** @type {string} */ (name), set.create).add(f) - return f - } - - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - once (name, f) { - /** - * @param {...any} args - */ - const _f = (...args) => { - this.off(name, /** @type {any} */ (_f)) - f(...args) - } - this.on(name, /** @type {any} */ (_f)) - } - - /** - * @template {keyof EVENTS & string} NAME - * @param {NAME} name - * @param {EVENTS[NAME]} f - */ - off (name, f) { - const observers = this._observers.get(name) - if (observers !== undefined) { - observers.delete(f) - if (observers.size === 0) { - this._observers.delete(name) - } - } - } - - /** - * Emit a named event. All registered event listeners that listen to the - * specified name will receive the event. - * - * @todo This should catch exceptions - * - * @template {keyof EVENTS & string} NAME - * @param {NAME} name The event name. - * @param {Parameters} args The arguments that are applied to the event listener. - */ - emit (name, args) { - // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called. - return array.from((this._observers.get(name) || map.create()).values()).forEach(f => f(...args)) - } - - destroy () { - this._observers = map.create() - } -} - -/* c8 ignore start */ -/** - * Handles named events. - * - * @deprecated - * @template N - */ -export class Observable { - constructor () { - /** - * Some desc. - * @type {Map} - */ - this._observers = map.create() - } - - /** - * @param {N} name - * @param {function} f - */ - on (name, f) { - map.setIfUndefined(this._observers, name, set.create).add(f) - } - - /** - * @param {N} name - * @param {function} f - */ - once (name, f) { - /** - * @param {...any} args - */ - const _f = (...args) => { - this.off(name, _f) - f(...args) - } - this.on(name, _f) - } - - /** - * @param {N} name - * @param {function} f - */ - off (name, f) { - const observers = this._observers.get(name) - if (observers !== undefined) { - observers.delete(f) - if (observers.size === 0) { - this._observers.delete(name) - } - } - } - - /** - * Emit a named event. All registered event listeners that listen to the - * specified name will receive the event. - * - * @todo This should catch exceptions - * - * @param {N} name The event name. - * @param {Array} args The arguments that are applied to the event listener. - */ - emit (name, args) { - // copy all listeners to an array first to make sure that no event is emitted to listeners that are subscribed while the event handler is called. - return array.from((this._observers.get(name) || map.create()).values()).forEach(f => f(...args)) - } - - destroy () { - this._observers = map.create() - } -} -/* c8 ignore end */ diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.test.d.ts deleted file mode 100644 index 895ebfe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testTypedObservable(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=observable.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.test.d.ts.map deleted file mode 100644 index 0335d64..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observable.test.d.ts","sourceRoot":"","sources":["observable.test.js"],"names":[],"mappings":"AAMO,yCAFI,CAAC,CAAC,QAAQ,QA6CpB;mBAjDkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/package.json b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/package.json deleted file mode 100644 index aab330f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/package.json +++ /dev/null @@ -1,556 +0,0 @@ -{ - "name": "lib0", - "version": "0.2.117", - "description": "", - "sideEffects": false, - "type": "module", - "main": "./dist/index.cjs", - "module": "./index.js", - "types": "./index.d.ts", - "funding": { - "type": "GitHub Sponsors ❤", - "url": "https://github.com/sponsors/dmonad" - }, - "bin": { - "0gentesthtml": "./bin/gentesthtml.js", - "0serve": "./bin/0serve.js", - "0ecdsa-generate-keypair": "./bin/0ecdsa-generate-keypair.js" - }, - "exports": { - "./package.json": "./package.json", - ".": { - "types": "./index.d.ts", - "module": "./index.js", - "import": "./index.js", - "require": "./dist/index.cjs" - }, - "./array.js": "./array.js", - "./dist/array.cjs": "./dist/array.cjs", - "./array": { - "types": "./array.d.ts", - "module": "./array.js", - "import": "./array.js", - "require": "./dist/array.cjs" - }, - "./binary.js": "./binary.js", - "./dist/binary.cjs": "./dist/binary.cjs", - "./binary": { - "types": "./binary.d.ts", - "module": "./binary.js", - "import": "./binary.js", - "require": "./dist/binary.cjs" - }, - "./broadcastchannel.js": "./broadcastchannel.js", - "./dist/broadcastchannel.cjs": "./dist/broadcastchannel.cjs", - "./broadcastchannel": { - "types": "./broadcastchannel.d.ts", - "module": "./broadcastchannel.js", - "import": "./broadcastchannel.js", - "require": "./dist/broadcastchannel.cjs" - }, - "./buffer.js": "./buffer.js", - "./dist/buffer.cjs": "./dist/buffer.cjs", - "./buffer": { - "types": "./buffer.d.ts", - "module": "./buffer.js", - "import": "./buffer.js", - "require": "./dist/buffer.cjs" - }, - "./cache.js": "./cache.js", - "./dist/cache.cjs": "./dist/cache.cjs", - "./cache": { - "types": "./cache.d.ts", - "module": "./cache.js", - "import": "./cache.js", - "require": "./dist/cache.cjs" - }, - "./component.js": "./component.js", - "./dist/component.cjs": "./dist/component.cjs", - "./component": { - "types": "./component.d.ts", - "module": "./component.js", - "import": "./component.js", - "require": "./dist/component.cjs" - }, - "./conditions.js": "./conditions.js", - "./dist/conditions.cjs": "./dist/conditions.cjs", - "./conditions": { - "types": "./conditions.d.ts", - "module": "./conditions.js", - "import": "./conditions.js", - "require": "./dist/conditions.cjs" - }, - "./crypto/jwt": { - "types": "./crypto/jwt.d.ts", - "module": "./crypto/jwt.js", - "import": "./crypto/jwt.js", - "require": "./dist/jwt.cjs" - }, - "./crypto/aes-gcm": { - "types": "./crypto/aes-gcm.d.ts", - "module": "./crypto/aes-gcm.js", - "import": "./crypto/aes-gcm.js", - "require": "./dist/aes-gcm.cjs" - }, - "./delta": { - "types": "./delta/delta.d.ts", - "module": "./delta/delta.js", - "import": "./delta/delta.js", - "require": "./dist/delta.cjs" - }, - "./crypto/ecdsa": { - "types": "./crypto/ecdsa.d.ts", - "module": "./crypto/ecdsa.js", - "import": "./crypto/ecdsa.js", - "require": "./dist/ecdsa.cjs" - }, - "./crypto/rsa-oaep": { - "types": "./crypto/rsa-oaep.d.ts", - "module": "./crypto/rsa-oaep.js", - "import": "./crypto/rsa-oaep.js", - "require": "./dist/rsa-oaep.cjs" - }, - "./hash/rabin": { - "types": "./hash/rabin.d.ts", - "module": "./hash/rabin.js", - "import": "./hash/rabin.js", - "require": "./dist/rabin.cjs" - }, - "./hash/sha256": { - "types": "./hash/sha256.d.ts", - "browser": { - "module": "./hash/sha256.js", - "require": "./dist/sha256.cjs", - "default": "./hash/sha256.js" - }, - "node": { - "require": "./dist/sha256.node.cjs", - "default": "./hash/sha256.node.js" - }, - "default": { - "module": "./hash/sha256.js", - "require": "./dist/sha256.cjs", - "default": "./hash/sha256.js" - } - }, - "./decoding.js": "./decoding.js", - "./dist/decoding.cjs": "./dist/decoding.cjs", - "./decoding": { - "types": "./decoding.d.ts", - "module": "./decoding.js", - "import": "./decoding.js", - "require": "./dist/decoding.cjs" - }, - "./diff/patience": { - "types": "./diff/patience.d.ts", - "module": "./diff/patience.js", - "import": "./diff/patience.js", - "require": "./dist/patience.cjs" - }, - "./diff.js": "./diff.js", - "./dist/diff.cjs": "./dist/diff.cjs", - "./diff": { - "types": "./diff.d.ts", - "module": "./diff.js", - "import": "./diff.js", - "require": "./dist/diff.cjs" - }, - "./dom.js": "./dom.js", - "./dist/dom.cjs": "./dist/dom.cjs", - "./dom": { - "types": "./dom.d.ts", - "module": "./dom.js", - "import": "./dom.js", - "require": "./dist/dom.cjs" - }, - "./encoding.js": "./encoding.js", - "./dist/encoding.cjs": "./dist/encoding.cjs", - "./encoding": { - "types": "./encoding.d.ts", - "module": "./encoding.js", - "import": "./encoding.js", - "require": "./dist/encoding.cjs" - }, - "./environment.js": "./environment.js", - "./dist/environment.cjs": "./dist/environment.cjs", - "./environment": { - "types": "./environment.d.ts", - "module": "./environment.js", - "import": "./environment.js", - "require": "./dist/environment.cjs" - }, - "./error.js": "./error.js", - "./dist/error.cjs": "./dist/error.cjs", - "./error": { - "types": "./error.d.ts", - "module": "./error.js", - "import": "./error.js", - "require": "./dist/error.cjs" - }, - "./eventloop.js": "./eventloop.js", - "./dist/eventloop.cjs": "./dist/eventloop.cjs", - "./eventloop": { - "types": "./eventloop.d.ts", - "module": "./eventloop.js", - "import": "./eventloop.js", - "require": "./dist/eventloop.cjs" - }, - "./function.js": "./function.js", - "./dist/function.cjs": "./dist/function.cjs", - "./function": { - "types": "./function.d.ts", - "module": "./function.js", - "import": "./function.js", - "require": "./dist/function.cjs" - }, - "./indexeddb.js": "./indexeddb.js", - "./dist/indexeddb.cjs": "./dist/indexeddb.cjs", - "./indexeddb": { - "types": "./indexeddb.d.ts", - "module": "./indexeddb.js", - "import": "./indexeddb.js", - "require": "./dist/indexeddb.cjs" - }, - "./isomorphic.js": "./isomorphic.js", - "./dist/isomorphic.cjs": "./dist/isomorphic.cjs", - "./isomorphic": { - "types": "./isomorphic.d.ts", - "module": "./isomorphic.js", - "import": "./isomorphic.js", - "require": "./dist/isomorphic.cjs" - }, - "./iterator.js": "./iterator.js", - "./dist/iterator.cjs": "./dist/iterator.cjs", - "./iterator": { - "types": "./iterator.d.ts", - "module": "./iterator.js", - "import": "./iterator.js", - "require": "./dist/iterator.cjs" - }, - "./json.js": "./json.js", - "./dist/json.cjs": "./dist/json.cjs", - "./json": { - "types": "./json.d.ts", - "module": "./json.js", - "import": "./json.js", - "require": "./dist/json.cjs" - }, - "./list.js": "./list.js", - "./dist/list.cjs": "./dist/list.cjs", - "./list": { - "types": "./list.d.ts", - "module": "./list.js", - "import": "./list.js", - "require": "./dist/list.cjs" - }, - "./logging.js": "./logging.js", - "./dist/logging.cjs": "./dist/logging.node.cjs", - "./logging": { - "types": "./logging.node.d.ts", - "deno": "./logging.node.js", - "bun": "./logging.js", - "browser": { - "module": "./logging.js", - "require": "./dist/logging.cjs", - "default": "./logging.js" - }, - "node": { - "module": "./logging.node.js", - "require": "./dist/logging.node.cjs", - "default": "./logging.node.js" - }, - "default": { - "module": "./logging.js", - "require": "./dist/logging.cjs", - "default": "./logging.js" - } - }, - "./map.js": "./map.js", - "./dist/map.cjs": "./dist/map.cjs", - "./map": { - "types": "./map.d.ts", - "module": "./map.js", - "import": "./map.js", - "require": "./dist/map.cjs" - }, - "./math.js": "./math.js", - "./dist/math.cjs": "./dist/math.cjs", - "./math": { - "types": "./math.d.ts", - "module": "./math.js", - "import": "./math.js", - "require": "./dist/math.cjs" - }, - "./metric.js": "./metric.js", - "./dist/metric.cjs": "./dist/metric.cjs", - "./metric": { - "types": "./metric.d.ts", - "module": "./metric.js", - "import": "./metric.js", - "require": "./dist/metric.cjs" - }, - "./mutex.js": "./mutex.js", - "./dist/mutex.cjs": "./dist/mutex.cjs", - "./mutex": { - "types": "./mutex.d.ts", - "module": "./mutex.js", - "import": "./mutex.js", - "require": "./dist/mutex.cjs" - }, - "./number.js": "./number.js", - "./dist/number.cjs": "./dist/number.cjs", - "./number": { - "types": "./number.d.ts", - "module": "./number.js", - "import": "./number.js", - "require": "./dist/number.cjs" - }, - "./object.js": "./object.js", - "./dist/object.cjs": "./dist/object.cjs", - "./object": { - "types": "./object.d.ts", - "module": "./object.js", - "import": "./object.js", - "require": "./dist/object.cjs" - }, - "./observable.js": "./observable.js", - "./dist/observable.cjs": "./dist/observable.cjs", - "./observable": { - "types": "./observable.d.ts", - "module": "./observable.js", - "import": "./observable.js", - "require": "./dist/observable.cjs" - }, - "./pair.js": "./pair.js", - "./dist/pair.cjs": "./dist/pair.cjs", - "./pair": { - "types": "./pair.d.ts", - "module": "./pair.js", - "import": "./pair.js", - "require": "./dist/pair.cjs" - }, - "./prng.js": "./prng.js", - "./dist/prng.cjs": "./dist/prng.cjs", - "./prng": { - "types": "./prng.d.ts", - "module": "./prng.js", - "import": "./prng.js", - "require": "./dist/prng.cjs" - }, - "./promise.js": "./promise.js", - "./dist/promise.cjs": "./dist/promise.cjs", - "./promise": { - "types": "./promise.d.ts", - "module": "./promise.js", - "import": "./promise.js", - "require": "./dist/promise.cjs" - }, - "./queue.js": "./queue.js", - "./dist/queue.cjs": "./dist/queue.cjs", - "./queue": { - "types": "./queue.d.ts", - "module": "./queue.js", - "import": "./queue.js", - "require": "./dist/queue.cjs" - }, - "./random.js": "./random.js", - "./dist/random.cjs": "./dist/random.cjs", - "./random": { - "types": "./random.d.ts", - "module": "./random.js", - "import": "./random.js", - "require": "./dist/random.cjs" - }, - "./set.js": "./set.js", - "./dist/set.cjs": "./dist/set.cjs", - "./set": { - "types": "./set.d.ts", - "module": "./set.js", - "import": "./set.js", - "require": "./dist/set.cjs" - }, - "./sort.js": "./sort.js", - "./dist/sort.cjs": "./dist/sort.cjs", - "./sort": { - "types": "./sort.d.ts", - "module": "./sort.js", - "import": "./sort.js", - "require": "./dist/sort.cjs" - }, - "./statistics.js": "./statistics.js", - "./dist/statistics.cjs": "./dist/statistics.cjs", - "./statistics": { - "types": "./statistics.d.ts", - "module": "./statistics.js", - "import": "./statistics.js", - "require": "./dist/statistics.cjs" - }, - "./storage.js": "./storage.js", - "./dist/storage.cjs": "./dist/storage.cjs", - "./storage": { - "types": "./storage.d.ts", - "module": "./storage.js", - "import": "./storage.js", - "require": "./dist/storage.cjs" - }, - "./string.js": "./string.js", - "./dist/string.cjs": "./dist/string.cjs", - "./string": { - "types": "./string.d.ts", - "module": "./string.js", - "import": "./string.js", - "require": "./dist/string.cjs" - }, - "./symbol.js": "./symbol.js", - "./dist/symbol.cjs": "./dist/symbol.cjs", - "./symbol": { - "types": "./symbol.d.ts", - "module": "./symbol.js", - "import": "./symbol.js", - "require": "./dist/symbol.cjs" - }, - "./traits": { - "types": "./trait/traits.d.ts", - "module": "./trait/traits.js", - "import": "./trait/traits.js", - "require": "./dist/traits.cjs" - }, - "./testing.js": "./testing.js", - "./dist/testing.cjs": "./dist/testing.cjs", - "./testing": { - "types": "./testing.d.ts", - "module": "./testing.js", - "import": "./testing.js", - "require": "./dist/testing.cjs" - }, - "./time.js": "./time.js", - "./dist/time.cjs": "./dist/time.cjs", - "./time": { - "types": "./time.d.ts", - "module": "./time.js", - "import": "./time.js", - "require": "./dist/time.cjs" - }, - "./tree.js": "./tree.js", - "./dist/tree.cjs": "./dist/tree.cjs", - "./tree": { - "types": "./tree.d.ts", - "module": "./tree.js", - "import": "./tree.js", - "require": "./dist/tree.cjs" - }, - "./url.js": "./url.js", - "./dist/url.cjs": "./dist/url.cjs", - "./url": { - "types": "./url.d.ts", - "module": "./url.js", - "import": "./url.js", - "require": "./dist/url.cjs" - }, - "./websocket.js": "./websocket.js", - "./dist/websocket.cjs": "./dist/websocket.cjs", - "./websocket": { - "types": "./websocket.d.ts", - "module": "./websocket.js", - "import": "./websocket.js", - "require": "./dist/websocket.cjs" - }, - "./webcrypto": { - "types": "./webcrypto.d.ts", - "deno": "./webcrypto.deno.js", - "bun": "./webcrypto.js", - "react-native": "./dist/webcrypto.react-native.cjs", - "browser": { - "module": "./webcrypto.js", - "require": "./dist/webcrypto.cjs", - "default": "./webcrypto.js" - }, - "node": { - "module": "./webcrypto.node.js", - "require": "./dist/webcrypto.node.cjs", - "default": "./webcrypto.node.js" - }, - "default": { - "module": "./webcrypto.js", - "require": "./dist/webcrypto.cjs", - "default": "./webcrypto.js" - } - }, - "./performance.js": "./performance.js", - "./dist/performance.cjs": "./dist/performance.node.cjs", - "./performance": { - "types": "./performance.d.ts", - "deno": "./performance.node.js", - "bun": "./performance.node.js", - "browser": { - "module": "./performance.js", - "require": "./dist/performance.cjs", - "default": "./performance.js" - }, - "node": { - "module": "./performance.node.js", - "require": "./dist/performance.node.cjs", - "default": "./performance.node.js" - }, - "default": { - "module": "./performance.js", - "require": "./dist/performance.cjs", - "default": "./performance.js" - } - }, - "./schema": { - "types": "./schema.d.ts", - "module": "./schema.js", - "import": "./schema.js", - "require": "./dist/schema.cjs" - } - }, - "dependencies": { - "isomorphic.js": "^0.2.4" - }, - "devDependencies": { - "@types/node": "^24.0.14", - "c8": "^10.1.3", - "jsdoc-api": "^8.0.0", - "jsdoc-plugin-typescript": "^2.2.1", - "rollup": "^2.42.1", - "standard": "^17.1.0", - "typescript": "^5.9.3" - }, - "scripts": { - "clean": "rm -rf dist *.d.ts */*.d.ts *.d.ts.map */*.d.ts.map", - "types": "tsc --outDir .", - "dist": "rollup -c", - "debug": "npm run gentesthtml && node ./bin/0serve.js -o test.html", - "test": "c8 --check-coverage --lines 100 --branches 100 --functions 100 --statements 100 node --unhandled-rejections=strict ./test.js --repetition-time 50", - "test-inspect": "node --inspect-brk --unhandled-rejections=strict ./test.js --repetition-time 50", - "test-extensive": "c8 --check-coverage --lines 100 --branches 100 --functions 100 --statements 100 node test.js --repetition-time 30000 --extensive", - "trace-deopt": "clear && rollup -c && node --trace-deopt dist/test.cjs", - "trace-opt": "clear && rollup -c && node --trace-opt dist/test.cjs", - "lint": "standard && tsc", - "gendocs": "node ./bin/gendocs.js", - "preversion": "npm run clean && npm run lint && npm run types && npm run dist && git add README.md", - "postpublish": "npm run clean", - "gentesthtml": "node ./bin/gentesthtml.js --script test.js > test.html" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/dmonad/lib0.git" - }, - "author": "Kevin Jahns ", - "license": "MIT", - "bugs": { - "url": "https://github.com/dmonad/lib0/issues" - }, - "homepage": "https://github.com/dmonad/lib0#readme", - "standard": { - "ignore": [ - "/dist", - "/node_modules", - "/docs" - ] - }, - "engines": { - "node": ">=16" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.d.ts deleted file mode 100644 index 08c917d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Working with value pairs. - * - * @module pair - */ -/** - * @template L,R - */ -export class Pair { - /** - * @param {L} left - * @param {R} right - */ - constructor(left: L, right: R); - left: L; - right: R; -} -export function create(left: L, right: R): Pair; -export function createReversed(right: R, left: L): Pair; -export function forEach(arr: Array>, f: (arg0: L, arg1: R) => any): void; -export function map(arr: Array>, f: (arg0: L, arg1: R) => X): Array; -//# sourceMappingURL=pair.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.d.ts.map deleted file mode 100644 index 54c51cc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pair.d.ts","sourceRoot":"","sources":["pair.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,kBAFa,CAAC,EAAC,CAAC;IAGd;;;OAGG;IACH,kBAHW,CAAC,SACD,CAAC,EAKX;IAFC,QAAgB;IAChB,SAAkB;CAErB;AAQM,uBALM,CAAC,EAAC,CAAC,QACL,CAAC,SACD,CAAC,GACA,IAAI,CAAC,CAAC,EAAC,CAAC,CAAC,CAEuC;AAQrD,+BALM,CAAC,EAAC,CAAC,SACL,CAAC,QACD,CAAC,GACA,IAAI,CAAC,CAAC,EAAC,CAAC,CAAC,CAE+C;AAO7D,wBAJM,CAAC,EAAC,CAAC,OACL,KAAK,CAAC,IAAI,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,KAChB,CAAS,IAAC,EAAD,CAAC,EAAE,IAAC,EAAD,CAAC,KAAE,GAAG,QAE0C;AAQhE,oBALM,CAAC,EAAC,CAAC,EAAC,CAAC,OACP,KAAK,CAAC,IAAI,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,KAChB,CAAS,IAAC,EAAD,CAAC,EAAE,IAAC,EAAD,CAAC,KAAE,CAAC,GACf,KAAK,CAAC,CAAC,CAAC,CAE2C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.js deleted file mode 100644 index 8b88e7e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Working with value pairs. - * - * @module pair - */ - -/** - * @template L,R - */ -export class Pair { - /** - * @param {L} left - * @param {R} right - */ - constructor (left, right) { - this.left = left - this.right = right - } -} - -/** - * @template L,R - * @param {L} left - * @param {R} right - * @return {Pair} - */ -export const create = (left, right) => new Pair(left, right) - -/** - * @template L,R - * @param {R} right - * @param {L} left - * @return {Pair} - */ -export const createReversed = (right, left) => new Pair(left, right) - -/** - * @template L,R - * @param {Array>} arr - * @param {function(L, R):any} f - */ -export const forEach = (arr, f) => arr.forEach(p => f(p.left, p.right)) - -/** - * @template L,R,X - * @param {Array>} arr - * @param {function(L, R):X} f - * @return {Array} - */ -export const map = (arr, f) => arr.map(p => f(p.left, p.right)) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.test.d.ts deleted file mode 100644 index ab51b8b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testPair(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=pair.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.test.d.ts.map deleted file mode 100644 index 616364c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pair.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pair.test.d.ts","sourceRoot":"","sources":["pair.test.js"],"names":[],"mappings":"AAOO,6BAFI,CAAC,CAAC,QAAQ,QAepB;mBApBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.d.ts deleted file mode 100644 index 0226088..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const measure: (measureName: string, startOrMeasureOptions?: string | PerformanceMeasureOptions, endMark?: string) => PerformanceMeasure; -export const now: () => DOMHighResTimeStamp; -export const mark: (markName: string, markOptions?: PerformanceMarkOptions) => PerformanceMark; -//# sourceMappingURL=performance.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.d.ts.map deleted file mode 100644 index 93c5c52..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["performance.js"],"names":[],"mappings":"AAEA,gJAA4D;AAC5D,4CAAoD;AACpD,+FAAsD"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.js deleted file mode 100644 index ed151c6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.js +++ /dev/null @@ -1,5 +0,0 @@ -/* eslint-env browser */ - -export const measure = performance.measure.bind(performance) -export const now = performance.now.bind(performance) -export const mark = performance.mark.bind(performance) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.d.ts deleted file mode 100644 index 4458270..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @type {typeof performance.measure} - */ -export const measure: typeof performance.measure; -/** - * @type {typeof performance.now} - */ -export const now: typeof performance.now; -/** - * @type {typeof performance.mark} - */ -export const mark: typeof performance.mark; -import { performance } from 'node:perf_hooks'; -//# sourceMappingURL=performance.node.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.d.ts.map deleted file mode 100644 index 4e8cb24..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"performance.node.d.ts","sourceRoot":"","sources":["performance.node.js"],"names":[],"mappings":"AAIA;;GAEG;AAEH,sBAHU,OAAO,WAAW,CAAC,OAAO,CAGyE;AAE7G;;GAEG;AAEH,kBAHU,OAAO,WAAW,CAAC,GAAG,CAGyD;AAEzF;;GAEG;AAEH,mBAHU,OAAO,WAAW,CAAC,IAAI,CAGmE;4BApBxE,iBAAiB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.js deleted file mode 100644 index 72d08e8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/performance.node.js +++ /dev/null @@ -1,21 +0,0 @@ -import { performance } from 'node:perf_hooks' -import { nop } from './function.js' -import * as time from './time.js' - -/** - * @type {typeof performance.measure} - */ -/* c8 ignore next */ -export const measure = performance.measure ? performance.measure.bind(performance) : /** @type {any} */ (nop) - -/** - * @type {typeof performance.now} - */ -/* c8 ignore next */ -export const now = performance.now ? performance.now.bind(performance) : time.getUnixTime - -/** - * @type {typeof performance.mark} - */ -/* c8 ignore next */ -export const mark = performance.mark ? performance.mark.bind(performance) : /** @type {any} */ (nop) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.d.ts deleted file mode 100644 index c8dcfb7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @template V - * @typedef {V | PledgeInstance} Pledge - */ -/** - * @template {any} Val - * @template {any} [CancelReason=Error] - */ -export class PledgeInstance { - /** - * @type {Val | CancelReason | null} - */ - _v: Val | CancelReason | null; - isResolved: boolean; - /** - * @type {Array | null} - */ - _whenResolved: Array<(arg0: Val) => void> | null; - /** - * @type {Array | null} - */ - _whenCanceled: Array<(arg0: CancelReason) => void> | null; - get isDone(): boolean; - get isCanceled(): boolean; - /** - * @param {Val} v - */ - resolve(v: Val): void; - /** - * @param {CancelReason} reason - */ - cancel(reason: CancelReason): void; - /** - * @template R - * @param {function(Val):Pledge} f - * @return {PledgeInstance} - */ - map(f: (arg0: Val) => Pledge): PledgeInstance; - /** - * @param {function(Val):void} f - */ - whenResolved(f: (arg0: Val) => void): void; - /** - * @param {(reason: CancelReason) => void} f - */ - whenCanceled(f: (reason: CancelReason) => void): void; - /** - * @return {Promise} - */ - promise(): Promise; -} -export function create(): PledgeInstance; -export function createWithDependencies>>(init: (p: PledgeInstance, ...deps: Resolved) => void, ...deps: DEPS): PledgeInstance; -export function whenResolved(p: Pledge, f: (arg0: R) => void): void; -export function whenCanceled

>(p: P, f: P extends PledgeInstance ? (arg0: CancelReason) => void : (arg0: any) => void): void; -export function map(p: Pledge

, f: (r: P) => Q): Pledge; -export function all(ps: PS): PledgeInstance>; -export function coroutine(f: () => Generator | PledgeInstance, Result, any>): PledgeInstance; -export function wait(timeout: number): PledgeInstance; -export type Pledge = V | PledgeInstance; -export type PledgeMap = Array> | { - [x: string]: Pledge; -}; -/** - *

- */ -export type Resolved

| PledgeMap> = P extends PledgeMap ? { [K in keyof P]: P[K] extends Pledge ? V : P[K]; } : (P extends Pledge ? V : never); -//# sourceMappingURL=pledge.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.d.ts.map deleted file mode 100644 index a41d427..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pledge.d.ts","sourceRoot":"","sources":["pledge.js"],"names":[],"mappings":"AA8BA;;;GAGG;AAEH;;;GAGG;AACH,4BAHmB,GAAG,kBACF,YAAY;IAI5B;;OAEG;IACH,IAFU,GAAG,GAAG,YAAY,GAAG,IAAI,CAErB;IACd,oBAAuB;IACvB;;OAEG;IACH,eAFU,KAAK,CAAC,CAAS,IAAG,EAAH,GAAG,KAAE,IAAI,CAAC,GAAG,IAAI,CAEnB;IACvB;;OAEG;IACH,eAFU,KAAK,CAAC,CAAS,IAAY,EAAZ,YAAY,KAAE,IAAI,CAAC,GAAG,IAAI,CAE5B;IAGzB,sBAEC;IAED,0BAEC;IAED;;OAEG;IACH,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AAM,EACA,YAAY,qBACpB,MAAM,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,cAAc,CAAC,YAAY,EAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,GACpF,cAAc,CAAC,MAAM,CAAC,CAwBjC;AAMM,8BAHI,MAAM,GACL,cAAc,CAAC,SAAS,CAAC,CAMpC;mBAlQY,CAAC,IACD,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC;wBA8HrB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG;QAAO,MAAM,GAAC,MAAM,CAAC,OAAO,CAAC;CAAC;;;;qBAIzB,CAAC,SAA9B,MAAM,CAAC,OAAO,CAAC,GAAG,SAAU,IAC7B,CAAC,SAAS,SAAS,GAAG,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAC,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.js deleted file mode 100644 index 07403d9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.js +++ /dev/null @@ -1,292 +0,0 @@ -/** - * @experimental Use of this module is not encouraged! - * This is just an experiment. - * @todo remove `c8 ignore` line once this is moved to "non-experimental" - */ - -import * as queue from './queue.js' -import * as object from './object.js' - -/* c8 ignore start */ - -/** - * @type {queue.Queuevoid>>} - */ -const ctxFs = queue.create() - -/** - * @param {() => void} f - */ -const runInGlobalContext = f => { - const isEmpty = queue.isEmpty(ctxFs) - queue.enqueue(ctxFs, new queue.QueueValue(f)) - if (isEmpty) { - while (!queue.isEmpty(ctxFs)) { - /** @type {queue.QueueValue<()=>{}>} */ (ctxFs.start).v() - queue.dequeue(ctxFs) - } - } -} - -/** - * @template V - * @typedef {V | PledgeInstance} Pledge - */ - -/** - * @template {any} Val - * @template {any} [CancelReason=Error] - */ -export class PledgeInstance { - constructor () { - /** - * @type {Val | CancelReason | null} - */ - this._v = null - this.isResolved = false - /** - * @type {Array | null} - */ - this._whenResolved = [] - /** - * @type {Array | null} - */ - this._whenCanceled = [] - } - - get isDone () { - return this._whenResolved === null - } - - get isCanceled () { - return !this.isResolved && this._whenResolved === null - } - - /** - * @param {Val} v - */ - resolve (v) { - const whenResolved = this._whenResolved - if (whenResolved === null) return - this._v = v - this.isResolved = true - this._whenResolved = null - this._whenCanceled = null - for (let i = 0; i < whenResolved.length; i++) { - whenResolved[i](v) - } - } - - /** - * @param {CancelReason} reason - */ - cancel (reason) { - const whenCanceled = this._whenCanceled - if (whenCanceled === null) return - this._v = reason - this._whenResolved = null - this._whenCanceled = null - for (let i = 0; i < whenCanceled.length; i++) { - whenCanceled[i](reason) - } - } - - /** - * @template R - * @param {function(Val):Pledge} f - * @return {PledgeInstance} - */ - map (f) { - /** - * @type {PledgeInstance} - */ - const p = new PledgeInstance() - this.whenResolved(v => { - const result = f(v) - if (result instanceof PledgeInstance) { - if (result._whenResolved === null) { - result.resolve(/** @type {R} */ (result._v)) - } else { - result._whenResolved.push(p.resolve.bind(p)) - } - } else { - p.resolve(result) - } - }) - return p - } - - /** - * @param {function(Val):void} f - */ - whenResolved (f) { - if (this.isResolved) { - f(/** @type {Val} */ (this._v)) - } else { - this._whenResolved?.push(f) - } - } - - /** - * @param {(reason: CancelReason) => void} f - */ - whenCanceled (f) { - if (this.isCanceled) { - f(/** @type {CancelReason} */ (this._v)) - } else { - this._whenCanceled?.push(f) - } - } - - /** - * @return {Promise} - */ - promise () { - return new Promise((resolve, reject) => { - this.whenResolved(resolve) - this.whenCanceled(reject) - }) - } -} - -/** - * @template T - * @return {PledgeInstance} - */ -export const create = () => new PledgeInstance() - -/** - * @typedef {Array> | Object>} PledgeMap - */ - -/** - * @template {Pledge | PledgeMap} P - * @typedef {P extends PledgeMap ? { [K in keyof P]: P[K] extends Pledge ? V : P[K]} : (P extends Pledge ? V : never)} Resolved

- */ - -/** - * @todo Create a "resolveHelper" that will simplify creating indxeddbv2 functions. Double arguments - * are not necessary. - * - * @template V - * @template {Array>} DEPS - * @param {(p: PledgeInstance, ...deps: Resolved) => void} init - * @param {DEPS} deps - * @return {PledgeInstance} - */ -export const createWithDependencies = (init, ...deps) => { - /** - * @type {PledgeInstance} - */ - const p = new PledgeInstance() - // @ts-ignore @todo remove this - all(deps).whenResolved(ds => init(p, ...ds)) - return p -} - -/** - * @template R - * @param {Pledge} p - * @param {function(R):void} f - */ -export const whenResolved = (p, f) => { - if (p instanceof PledgeInstance) { - return p.whenResolved(f) - } - return f(p) -} - -/** - * @template {Pledge} P - * @param {P} p - * @param {P extends PledgeInstance ? function(CancelReason):void : function(any):void} f - */ -export const whenCanceled = (p, f) => { - if (p instanceof PledgeInstance) { - p.whenCanceled(f) - } -} - -/** - * @template P - * @template Q - * @param {Pledge

} p - * @param {(r: P) => Q} f - * @return {Pledge} - */ -export const map = (p, f) => { - if (p instanceof PledgeInstance) { - return p.map(f) - } - return f(p) -} - -/** - * @template {PledgeMap} PS - * @param {PS} ps - * @return {PledgeInstance>} - */ -export const all = ps => { - /** - * @type {any} - */ - const pall = create() - /** - * @type {any} - */ - const result = ps instanceof Array ? new Array(ps.length) : {} - let waitingPs = ps instanceof Array ? ps.length : object.size(ps) - for (const key in ps) { - const p = ps[key] - whenResolved(p, r => { - result[key] = r - if (--waitingPs === 0) { - // @ts-ignore - pall.resolve(result) - } - }) - } - return pall -} - -/** - * @template Result - * @template {any} YieldResults - * @param {() => Generator | PledgeInstance, Result, any>} f - * @return {PledgeInstance} - */ -export const coroutine = f => { - const p = create() - const gen = f() - /** - * @param {any} [yv] - */ - const handleGen = (yv) => { - const res = gen.next(yv) - if (res.done) { - p.resolve(res.value) - return - } - // @ts-ignore - whenCanceled(res.value, (reason) => { - gen.throw(reason) - }) - runInGlobalContext(() => - whenResolved(res.value, handleGen) - ) - } - handleGen() - return p -} - -/** - * @param {number} timeout - * @return {PledgeInstance} - */ -export const wait = timeout => { - const p = create() - setTimeout(p.resolve.bind(p), timeout) - return p -} - -/* c8 ignore end */ diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.test.d.ts deleted file mode 100644 index 0398e18..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testPledgeCoroutine(_tc: t.TestCase): Promise; -export function testPledgeVsPromisePerformanceTimeout(_tc: t.TestCase): Promise; -export function testPledgeVsPromisePerformanceResolved(_tc: t.TestCase): Promise; -export type MaybePromise = Promise | number; -import * as t from './testing.js'; -//# sourceMappingURL=pledge.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.test.d.ts.map deleted file mode 100644 index a0447e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/pledge.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pledge.test.d.ts","sourceRoot":"","sources":["pledge.test.js"],"names":[],"mappings":"AAOO,yCAFI,CAAC,CAAC,QAAQ,iBAepB;AAKM,2DAFI,CAAC,CAAC,QAAQ,iBAiBpB;AASM,4DAFI,CAAC,CAAC,QAAQ,iBAqCpB;2BAzCY,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM;mBA3ClB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.d.ts deleted file mode 100644 index 77c666d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Description of the function - * @callback generatorNext - * @return {number} A random float in the cange of [0,1) - */ -/** - * A random type generator. - * - * @typedef {Object} PRNG - * @property {generatorNext} next Generate new number - */ -export const DefaultPRNG: typeof Xoroshiro128plus; -export function create(seed: number): PRNG; -export function bool(gen: PRNG): boolean; -export function int53(gen: PRNG, min: number, max: number): number; -export function uint53(gen: PRNG, min: number, max: number): number; -export function int32(gen: PRNG, min: number, max: number): number; -export function uint32(gen: PRNG, min: number, max: number): number; -export function int31(gen: PRNG, min: number, max: number): number; -export function real53(gen: PRNG): number; -export function char(gen: PRNG): string; -export function letter(gen: PRNG): string; -export function word(gen: PRNG, minLen?: number, maxLen?: number): string; -export function utf16Rune(gen: PRNG): string; -export function utf16String(gen: PRNG, maxlen?: number): string; -export function oneOf(gen: PRNG, array: Array): T; -export function uint8Array(gen: PRNG, len: number): Uint8Array; -export function uint16Array(gen: PRNG, len: number): Uint16Array; -export function uint32Array(gen: PRNG, len: number): Uint32Array; -/** - * Description of the function - */ -export type generatorNext = () => number; -/** - * A random type generator. - */ -export type PRNG = { - /** - * Generate new number - */ - next: generatorNext; -}; -import { Xoroshiro128plus } from './prng/Xoroshiro128plus.js'; -//# sourceMappingURL=prng.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.d.ts.map deleted file mode 100644 index 4b06d33..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"prng.d.ts","sourceRoot":"","sources":["prng.js"],"names":[],"mappings":"AAeA;;;;GAIG;AAEH;;;;;GAKG;AACH,kDAA2C;AAUpC,6BAHI,MAAM,GACL,IAAI,CAEmC;AAQ5C,0BAHI,IAAI,WAG+B;AAUvC,2BALI,IAAI,oCAKuE;AAU/E,4BALI,IAAI,oCAKwD;AAUhE,2BALI,IAAI,oCAKuE;AAU/E,4BALI,IAAI,oCAKoD;AAY5D,2BALI,IAAI,oCAK6C;AAQrD,4BAHI,IAAI,UAGwB;AAUhC,0BALI,IAAI,GACH,MAAM,CAI0C;AAMrD,4BAHI,IAAI,GACH,MAAM,CAE4C;AAQvD,0BALI,IAAI,WACJ,MAAM,WACN,MAAM,GACL,MAAM,CASjB;AAQM,+BAHI,IAAI,GACH,MAAM,CAKjB;AAMM,iCAHI,IAAI,WACJ,MAAM,UAShB;AAUM,sBAFM,CAAC,OAHH,IAAI,SACJ,KAAK,CAAC,CAAC,CAAC,GACP,CAAC,CAG8D;AAOpE,gCAJI,IAAI,OACJ,MAAM,GACL,UAAU,CAAC,WAAW,CAAC,CAQlC;AAQM,iCAJI,IAAI,OACJ,MAAM,GACL,WAAW,CAEkE;AAOlF,iCAJI,IAAI,OACJ,MAAM,GACL,WAAW,CAEkE;;;;kCApL5E,MAAM;;;;;;;;UAOL,aAAa;;iCAbM,4BAA4B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.js deleted file mode 100644 index 6e05ba8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.js +++ /dev/null @@ -1,200 +0,0 @@ -/** - * Fast Pseudo Random Number Generators. - * - * Given a seed a PRNG generates a sequence of numbers that cannot be reasonably predicted. - * Two PRNGs must generate the same random sequence of numbers if given the same seed. - * - * @module prng - */ - -import * as binary from './binary.js' -import { fromCharCode, fromCodePoint } from './string.js' -import * as math from './math.js' -import { Xoroshiro128plus } from './prng/Xoroshiro128plus.js' -import * as buffer from './buffer.js' - -/** - * Description of the function - * @callback generatorNext - * @return {number} A random float in the cange of [0,1) - */ - -/** - * A random type generator. - * - * @typedef {Object} PRNG - * @property {generatorNext} next Generate new number - */ -export const DefaultPRNG = Xoroshiro128plus - -/** - * Create a Xoroshiro128plus Pseudo-Random-Number-Generator. - * This is the fastest full-period generator passing BigCrush without systematic failures. - * But there are more PRNGs available in ./PRNG/. - * - * @param {number} seed A positive 32bit integer. Do not use negative numbers. - * @return {PRNG} - */ -export const create = seed => new DefaultPRNG(seed) - -/** - * Generates a single random bool. - * - * @param {PRNG} gen A random number generator. - * @return {Boolean} A random boolean - */ -export const bool = gen => (gen.next() >= 0.5) - -/** - * Generates a random integer with 53 bit resolution. - * - * @param {PRNG} gen A random number generator. - * @param {Number} min The lower bound of the allowed return values (inclusive). - * @param {Number} max The upper bound of the allowed return values (inclusive). - * @return {Number} A random integer on [min, max] - */ -export const int53 = (gen, min, max) => math.floor(gen.next() * (max + 1 - min) + min) - -/** - * Generates a random integer with 53 bit resolution. - * - * @param {PRNG} gen A random number generator. - * @param {Number} min The lower bound of the allowed return values (inclusive). - * @param {Number} max The upper bound of the allowed return values (inclusive). - * @return {Number} A random integer on [min, max] - */ -export const uint53 = (gen, min, max) => math.abs(int53(gen, min, max)) - -/** - * Generates a random integer with 32 bit resolution. - * - * @param {PRNG} gen A random number generator. - * @param {Number} min The lower bound of the allowed return values (inclusive). - * @param {Number} max The upper bound of the allowed return values (inclusive). - * @return {Number} A random integer on [min, max] - */ -export const int32 = (gen, min, max) => math.floor(gen.next() * (max + 1 - min) + min) - -/** - * Generates a random integer with 53 bit resolution. - * - * @param {PRNG} gen A random number generator. - * @param {Number} min The lower bound of the allowed return values (inclusive). - * @param {Number} max The upper bound of the allowed return values (inclusive). - * @return {Number} A random integer on [min, max] - */ -export const uint32 = (gen, min, max) => int32(gen, min, max) >>> 0 - -/** - * @deprecated - * Optimized version of prng.int32. It has the same precision as prng.int32, but should be preferred when - * openaring on smaller ranges. - * - * @param {PRNG} gen A random number generator. - * @param {Number} min The lower bound of the allowed return values (inclusive). - * @param {Number} max The upper bound of the allowed return values (inclusive). The max inclusive number is `binary.BITS31-1` - * @return {Number} A random integer on [min, max] - */ -export const int31 = (gen, min, max) => int32(gen, min, max) - -/** - * Generates a random real on [0, 1) with 53 bit resolution. - * - * @param {PRNG} gen A random number generator. - * @return {Number} A random real number on [0, 1). - */ -export const real53 = gen => gen.next() // (((gen.next() >>> 5) * binary.BIT26) + (gen.next() >>> 6)) / MAX_SAFE_INTEGER - -/** - * Generates a random character from char code 32 - 126. I.e. Characters, Numbers, special characters, and Space: - * - * @param {PRNG} gen A random number generator. - * @return {string} - * - * (Space)!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[/]^_`abcdefghijklmnopqrstuvwxyz{|}~ - */ -export const char = gen => fromCharCode(int31(gen, 32, 126)) - -/** - * @param {PRNG} gen - * @return {string} A single letter (a-z) - */ -export const letter = gen => fromCharCode(int31(gen, 97, 122)) - -/** - * @param {PRNG} gen - * @param {number} [minLen=0] - * @param {number} [maxLen=20] - * @return {string} A random word (0-20 characters) without spaces consisting of letters (a-z) - */ -export const word = (gen, minLen = 0, maxLen = 20) => { - const len = int31(gen, minLen, maxLen) - let str = '' - for (let i = 0; i < len; i++) { - str += letter(gen) - } - return str -} - -/** - * TODO: this function produces invalid runes. Does not cover all of utf16!! - * - * @param {PRNG} gen - * @return {string} - */ -export const utf16Rune = gen => { - const codepoint = int31(gen, 0, 256) - return fromCodePoint(codepoint) -} - -/** - * @param {PRNG} gen - * @param {number} [maxlen = 20] - */ -export const utf16String = (gen, maxlen = 20) => { - const len = int31(gen, 0, maxlen) - let str = '' - for (let i = 0; i < len; i++) { - str += utf16Rune(gen) - } - return str -} - -/** - * Returns one element of a given array. - * - * @param {PRNG} gen A random number generator. - * @param {Array} array Non empty Array of possible values. - * @return {T} One of the values of the supplied Array. - * @template T - */ -export const oneOf = (gen, array) => array[int31(gen, 0, array.length - 1)] - -/** - * @param {PRNG} gen - * @param {number} len - * @return {Uint8Array} - */ -export const uint8Array = (gen, len) => { - const buf = buffer.createUint8ArrayFromLen(len) - for (let i = 0; i < buf.length; i++) { - buf[i] = int32(gen, 0, binary.BITS8) - } - return buf -} - -/* c8 ignore start */ -/** - * @param {PRNG} gen - * @param {number} len - * @return {Uint16Array} - */ -export const uint16Array = (gen, len) => new Uint16Array(uint8Array(gen, len * 2).buffer) - -/** - * @param {PRNG} gen - * @param {number} len - * @return {Uint32Array} - */ -export const uint32Array = (gen, len) => new Uint32Array(uint8Array(gen, len * 4).buffer) -/* c8 ignore stop */ diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.test.d.ts deleted file mode 100644 index dd69f9a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function testGeneratorXoroshiro128plus(tc: t.TestCase): void; -export function testGeneratorXorshift32(tc: t.TestCase): void; -export function testGeneratorMt19937(tc: t.TestCase): void; -export function testNumberDistributions(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=prng.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.test.d.ts.map deleted file mode 100644 index 8fd97fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"prng.test.d.ts","sourceRoot":"","sources":["prng.test.js"],"names":[],"mappings":"AA4LO,kDAFI,CAAC,CAAC,QAAQ,QAE2E;AAKzF,4CAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,QAIpB;AA2BM,4CAFI,CAAC,CAAC,QAAQ,QAOpB;mBAtOkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.d.ts deleted file mode 100644 index 8b499e0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This is a port of Shawn Cokus's implementation of the original Mersenne Twister algorithm (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/MTARCOK/mt19937ar-cok.c). - * MT has a very high period of 2^19937. Though the authors of xorshift describe that a high period is not - * very relevant (http://vigna.di.unimi.it/xorshift/). It is four times slower than xoroshiro128plus and - * needs to recompute its state after generating 624 numbers. - * - * ```js - * const gen = new Mt19937(new Date().getTime()) - * console.log(gen.next()) - * ``` - * - * @public - */ -export class Mt19937 { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor(seed: number); - seed: number; - _state: Uint32Array; - _i: number; - /** - * Generate a random signed integer. - * - * @return {Number} A 32 bit signed integer. - */ - next(): number; -} -//# sourceMappingURL=Mt19937.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.d.ts.map deleted file mode 100644 index 598d30d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Mt19937.d.ts","sourceRoot":"","sources":["Mt19937.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;GAYG;AACH;IACE;;OAEG;IACH,kBAFW,MAAM,EAYhB;IATC,aAAgB;IAMhB,iCAAmB;IACnB,WAAW;IAIb;;;;OAIG;IACH,eAYC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.js deleted file mode 100644 index a0d5643..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Mt19937.js +++ /dev/null @@ -1,78 +0,0 @@ -import * as binary from '../binary.js' -import * as math from '../math.js' - -/** - * @module prng - */ -const N = 624 -const M = 397 - -/** - * @param {number} u - * @param {number} v - */ -const twist = (u, v) => ((((u & 0x80000000) | (v & 0x7fffffff)) >>> 1) ^ ((v & 1) ? 0x9908b0df : 0)) - -/** - * @param {Uint32Array} state - */ -const nextState = state => { - let p = 0 - let j - for (j = N - M + 1; --j; p++) { - state[p] = state[p + M] ^ twist(state[p], state[p + 1]) - } - for (j = M; --j; p++) { - state[p] = state[p + M - N] ^ twist(state[p], state[p + 1]) - } - state[p] = state[p + M - N] ^ twist(state[p], state[0]) -} - -/** - * This is a port of Shawn Cokus's implementation of the original Mersenne Twister algorithm (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/MTARCOK/mt19937ar-cok.c). - * MT has a very high period of 2^19937. Though the authors of xorshift describe that a high period is not - * very relevant (http://vigna.di.unimi.it/xorshift/). It is four times slower than xoroshiro128plus and - * needs to recompute its state after generating 624 numbers. - * - * ```js - * const gen = new Mt19937(new Date().getTime()) - * console.log(gen.next()) - * ``` - * - * @public - */ -export class Mt19937 { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor (seed) { - this.seed = seed - const state = new Uint32Array(N) - state[0] = seed - for (let i = 1; i < N; i++) { - state[i] = (math.imul(1812433253, (state[i - 1] ^ (state[i - 1] >>> 30))) + i) & binary.BITS32 - } - this._state = state - this._i = 0 - nextState(this._state) - } - - /** - * Generate a random signed integer. - * - * @return {Number} A 32 bit signed integer. - */ - next () { - if (this._i === N) { - // need to compute a new state - nextState(this._state) - this._i = 0 - } - let y = this._state[this._i++] - y ^= (y >>> 11) - y ^= (y << 7) & 0x9d2c5680 - y ^= (y << 15) & 0xefc60000 - y ^= (y >>> 18) - return (y >>> 0) / (binary.BITS32 + 1) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.d.ts deleted file mode 100644 index 5f2f9fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This is a variant of xoroshiro128plus - the fastest full-period generator passing BigCrush without systematic failures. - * - * This implementation follows the idea of the original xoroshiro128plus implementation, - * but is optimized for the JavaScript runtime. I.e. - * * The operations are performed on 32bit integers (the original implementation works with 64bit values). - * * The initial 128bit state is computed based on a 32bit seed and Xorshift32. - * * This implementation returns two 32bit values based on the 64bit value that is computed by xoroshiro128plus. - * Caution: The last addition step works slightly different than in the original implementation - the add carry of the - * first 32bit addition is not carried over to the last 32bit. - * - * [Reference implementation](http://vigna.di.unimi.it/xorshift/xoroshiro128plus.c) - */ -export class Xoroshiro128plus { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor(seed: number); - seed: number; - state: Uint32Array; - _fresh: boolean; - /** - * @return {number} Float/Double in [0,1) - */ - next(): number; -} -//# sourceMappingURL=Xoroshiro128plus.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.d.ts.map deleted file mode 100644 index 9331744..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Xoroshiro128plus.d.ts","sourceRoot":"","sources":["Xoroshiro128plus.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;GAYG;AACH;IACE;;OAEG;IACH,kBAFW,MAAM,EAWhB;IARC,aAAgB;IAGhB,gCAA+B;IAI/B,gBAAkB;IAGpB;;OAEG;IACH,QAFY,MAAM,CA4BjB;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.js deleted file mode 100644 index ba9b84a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xoroshiro128plus.js +++ /dev/null @@ -1,111 +0,0 @@ -/** - * @module prng - */ - -import { Xorshift32 } from './Xorshift32.js' -import * as binary from '../binary.js' - -/** - * This is a variant of xoroshiro128plus - the fastest full-period generator passing BigCrush without systematic failures. - * - * This implementation follows the idea of the original xoroshiro128plus implementation, - * but is optimized for the JavaScript runtime. I.e. - * * The operations are performed on 32bit integers (the original implementation works with 64bit values). - * * The initial 128bit state is computed based on a 32bit seed and Xorshift32. - * * This implementation returns two 32bit values based on the 64bit value that is computed by xoroshiro128plus. - * Caution: The last addition step works slightly different than in the original implementation - the add carry of the - * first 32bit addition is not carried over to the last 32bit. - * - * [Reference implementation](http://vigna.di.unimi.it/xorshift/xoroshiro128plus.c) - */ -export class Xoroshiro128plus { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor (seed) { - this.seed = seed - // This is a variant of Xoroshiro128plus to fill the initial state - const xorshift32 = new Xorshift32(seed) - this.state = new Uint32Array(4) - for (let i = 0; i < 4; i++) { - this.state[i] = xorshift32.next() * binary.BITS32 - } - this._fresh = true - } - - /** - * @return {number} Float/Double in [0,1) - */ - next () { - const state = this.state - if (this._fresh) { - this._fresh = false - return ((state[0] + state[2]) >>> 0) / (binary.BITS32 + 1) - } else { - this._fresh = true - const s0 = state[0] - const s1 = state[1] - const s2 = state[2] ^ s0 - const s3 = state[3] ^ s1 - // function js_rotl (x, k) { - // k = k - 32 - // const x1 = x[0] - // const x2 = x[1] - // x[0] = x2 << k | x1 >>> (32 - k) - // x[1] = x1 << k | x2 >>> (32 - k) - // } - // rotl(s0, 55) // k = 23 = 55 - 32; j = 9 = 32 - 23 - state[0] = (s1 << 23 | s0 >>> 9) ^ s2 ^ (s2 << 14 | s3 >>> 18) - state[1] = (s0 << 23 | s1 >>> 9) ^ s3 ^ (s3 << 14) - // rol(s1, 36) // k = 4 = 36 - 32; j = 23 = 32 - 9 - state[2] = s3 << 4 | s2 >>> 28 - state[3] = s2 << 4 | s3 >>> 28 - return (((state[1] + state[3]) >>> 0) / (binary.BITS32 + 1)) - } - } -} - -/* -// Reference implementation -// Source: http://vigna.di.unimi.it/xorshift/xoroshiro128plus.c -// By David Blackman and Sebastiano Vigna -// Who published the reference implementation under Public Domain (CC0) - -#include -#include - -uint64_t s[2]; - -static inline uint64_t rotl(const uint64_t x, int k) { - return (x << k) | (x >> (64 - k)); -} - -uint64_t next(void) { - const uint64_t s0 = s[0]; - uint64_t s1 = s[1]; - s1 ^= s0; - s[0] = rotl(s0, 55) ^ s1 ^ (s1 << 14); // a, b - s[1] = rotl(s1, 36); // c - return (s[0] + s[1]) & 0xFFFFFFFF; -} - -int main(void) -{ - int i; - s[0] = 1111 | (1337ul << 32); - s[1] = 1234 | (9999ul << 32); - - printf("1000 outputs of genrand_int31()\n"); - for (i=0; i<100; i++) { - printf("%10lu ", i); - printf("%10lu ", next()); - printf("- %10lu ", s[0] >> 32); - printf("%10lu ", (s[0] << 32) >> 32); - printf("%10lu ", s[1] >> 32); - printf("%10lu ", (s[1] << 32) >> 32); - printf("\n"); - // if (i%5==4) printf("\n"); - } - return 0; -} -*/ diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.d.ts deleted file mode 100644 index 436b8bc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Xorshift32 is a very simple but elegang PRNG with a period of `2^32-1`. - */ -export class Xorshift32 { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor(seed: number); - seed: number; - /** - * @type {number} - */ - _state: number; - /** - * Generate a random signed integer. - * - * @return {Number} A 32 bit signed integer. - */ - next(): number; -} -//# sourceMappingURL=Xorshift32.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.d.ts.map deleted file mode 100644 index 281c028..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Xorshift32.d.ts","sourceRoot":"","sources":["Xorshift32.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IACE;;OAEG;IACH,kBAFW,MAAM,EAQhB;IALC,aAAgB;IAChB;;OAEG;IACH,QAFU,MAAM,CAEE;IAGpB;;;;OAIG;IACH,eAOC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.js deleted file mode 100644 index 9153504..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/prng/Xorshift32.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @module prng - */ - -import * as binary from '../binary.js' - -/** - * Xorshift32 is a very simple but elegang PRNG with a period of `2^32-1`. - */ -export class Xorshift32 { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor (seed) { - this.seed = seed - /** - * @type {number} - */ - this._state = seed - } - - /** - * Generate a random signed integer. - * - * @return {Number} A 32 bit signed integer. - */ - next () { - let x = this._state - x ^= x << 13 - x ^= x >> 17 - x ^= x << 5 - this._state = x - return (x >>> 0) / (binary.BITS32 + 1) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.d.ts deleted file mode 100644 index ccb4234..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export function create(f: (arg0: PromiseResolve, arg1: (arg0: Error) => void) => any): Promise; -export function createEmpty(f: (arg0: () => void, arg1: (arg0: Error) => void) => void): Promise; -/** - * `Promise.all` wait for all promises in the array to resolve and return the result - * @template {unknown[] | []} PS - * - * @param {PS} ps - * @return {Promise<{ -readonly [P in keyof PS]: Awaited }>} - */ -export const all: { - (values: Iterable>): Promise[]>; - (values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; -}; -export function reject(reason?: Error): Promise; -export function resolve(res: T | void): Promise; -export function resolveWith(res: T): Promise; -export function until(timeout: number, check: () => boolean, intervalResolution?: number): Promise; -export function untilAsync(check: () => Promise | boolean, timeout?: number, intervalResolution?: number): Promise; -export function wait(timeout: number): Promise; -export function isPromise(p: any): boolean; -export type PromiseResolve = (result?: T | PromiseLike | undefined) => any; -//# sourceMappingURL=promise.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.d.ts.map deleted file mode 100644 index 358b809..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["promise.js"],"names":[],"mappings":"AAmBO,uBAJM,CAAC,KACH,CAAS,IAAiB,EAAjB,cAAc,CAAC,CAAC,CAAC,EAAC,IAAoB,EAApB,CAAS,IAAK,EAAL,KAAK,KAAE,IAAI,KAAE,GAAG,GACnD,OAAO,CAAC,CAAC,CAAC,CAE+C;AAM9D,+BAHI,CAAS,IAAe,EAAf,MAAW,IAAI,EAAC,IAAoB,EAApB,CAAS,IAAK,EAAL,KAAK,KAAE,IAAI,KAAE,IAAI,GAClD,OAAO,CAAC,IAAI,CAAC,CAEqB;AAE9C;;;;;;GAMG;AACH;;8DAwCM,CAAC;EAxCqC;AAMrC,gCAHI,KAAK,GACJ,OAAO,CAAC,KAAK,CAAC,CAE4B;AAO/C,wBAJM,CAAC,OACH,CAAC,GAAC,IAAI,GACL,OAAO,CAAC,CAAC,GAAC,IAAI,CAAC,CAEuB;AAO3C,4BAJM,CAAC,OACH,CAAC,GACA,OAAO,CAAC,CAAC,CAAC,CAEgC;AAW/C,+BALI,MAAM,SACN,MAAW,OAAO,uBAClB,MAAM,GACL,OAAO,CAAC,IAAI,CAAC,CAkBvB;AAQK,kCALI,MAAI,OAAO,CAAC,OAAO,CAAC,GAAC,OAAO,YAC5B,MAAM,uBACN,MAAM,GACL,OAAO,CAAC,IAAI,CAAC,CAWxB;AAMM,8BAHI,MAAM,GACL,OAAO,CAAC,SAAS,CAAC,CAE2D;AAWlF,6BAHI,GAAG,GACF,OAAO,CAEwE;2BA1G9E,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.js deleted file mode 100644 index 61eefe8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.js +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Utility helpers to work with promises. - * - * @module promise - */ - -import * as time from './time.js' - -/** - * @template T - * @callback PromiseResolve - * @param {T|PromiseLike} [result] - */ - -/** - * @template T - * @param {function(PromiseResolve,function(Error):void):any} f - * @return {Promise} - */ -export const create = f => /** @type {Promise} */ (new Promise(f)) - -/** - * @param {function(function():void,function(Error):void):void} f - * @return {Promise} - */ -export const createEmpty = f => new Promise(f) - -/** - * `Promise.all` wait for all promises in the array to resolve and return the result - * @template {unknown[] | []} PS - * - * @param {PS} ps - * @return {Promise<{ -readonly [P in keyof PS]: Awaited }>} - */ -export const all = Promise.all.bind(Promise) - -/** - * @param {Error} [reason] - * @return {Promise} - */ -export const reject = reason => Promise.reject(reason) - -/** - * @template T - * @param {T|void} res - * @return {Promise} - */ -export const resolve = res => Promise.resolve(res) - -/** - * @template T - * @param {T} res - * @return {Promise} - */ -export const resolveWith = res => Promise.resolve(res) - -/** - * @todo Next version, reorder parameters: check, [timeout, [intervalResolution]] - * @deprecated use untilAsync instead - * - * @param {number} timeout - * @param {function():boolean} check - * @param {number} [intervalResolution] - * @return {Promise} - */ -export const until = (timeout, check, intervalResolution = 10) => create((resolve, reject) => { - const startTime = time.getUnixTime() - const hasTimeout = timeout > 0 - const untilInterval = () => { - if (check()) { - clearInterval(intervalHandle) - resolve() - } else if (hasTimeout) { - /* c8 ignore else */ - if (time.getUnixTime() - startTime > timeout) { - clearInterval(intervalHandle) - reject(new Error('Timeout')) - } - } - } - const intervalHandle = setInterval(untilInterval, intervalResolution) -}) - -/** - * @param {()=>Promise|boolean} check - * @param {number} timeout - * @param {number} intervalResolution - * @return {Promise} - */ -export const untilAsync = async (check, timeout = 0, intervalResolution = 10) => { - const startTime = time.getUnixTime() - const noTimeout = timeout <= 0 - // eslint-disable-next-line no-unmodified-loop-condition - while (noTimeout || time.getUnixTime() - startTime <= timeout) { - if (await check()) return - await wait(intervalResolution) - } - throw new Error('Timeout') -} - -/** - * @param {number} timeout - * @return {Promise} - */ -export const wait = timeout => create((resolve, _reject) => setTimeout(resolve, timeout)) - -/** - * Checks if an object is a promise using ducktyping. - * - * Promises are often polyfilled, so it makes sense to add some additional guarantees if the user of this - * library has some insane environment where global Promise objects are overwritten. - * - * @param {any} p - * @return {boolean} - */ -export const isPromise = p => p instanceof Promise || (p && p.then && p.catch && p.finally) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.test.d.ts deleted file mode 100644 index aa230e1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.test.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function testRepeatPromise(_tc: t.TestCase): Promise; -export function testispromise(_tc: t.TestCase): void; -export function testTypings(_tc: t.TestCase): Promise; -import * as t from './testing.js'; -//# sourceMappingURL=promise.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.test.d.ts.map deleted file mode 100644 index af058ae..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promise.test.d.ts","sourceRoot":"","sources":["promise.test.js"],"names":[],"mappings":"AA6BO,uCAFI,CAAC,CAAC,QAAQ,iBAmBpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,iCAFI,CAAC,CAAC,QAAQ,iBAapB;mBA7EkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.d.ts deleted file mode 100644 index abba016..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -export class QueueNode { - /** - * @type {QueueNode|null} - */ - next: QueueNode | null; -} -/** - * @template V - */ -export class QueueValue extends QueueNode { - /** - * @param {V} v - */ - constructor(v: V); - v: V; -} -/** - * @template {QueueNode} N - */ -export class Queue { - /** - * @type {N | null} - */ - start: N | null; - /** - * @type {N | null} - */ - end: N | null; -} -export function create(): Queue; -export function isEmpty(queue: Queue): boolean; -export function enqueue>(queue: Q, n: Q extends Queue ? N : never): void; -export function dequeue(queue: Queue): N | null; -//# sourceMappingURL=queue.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.d.ts.map deleted file mode 100644 index 25a9625..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["queue.js"],"names":[],"mappings":"AAAA;IAEI;;OAEG;IACH,MAFU,SAAS,GAAC,IAAI,CAER;CAEnB;AAED;;GAEG;AACH,wBAFa,CAAC;IAGZ;;OAEG;IACH,eAFW,CAAC,EAKX;IADC,KAAU;CAEb;AAED;;GAEG;AACH,mBAFyB,CAAC,SAAZ,SAAU;IAIpB;;OAEG;IACH,OAFU,CAAC,GAAG,IAAI,CAED;IACjB;;OAEG;IACH,KAFU,CAAC,GAAG,IAAI,CAEH;CAElB;AASM,uBAHkB,CAAC,SAAZ,SAAU,KACZ,KAAK,CAAC,CAAC,CAAC,CAEmB;AAKhC,+BAFI,KAAK,CAAC,GAAG,CAAC,WAE+B;AAO7C,wBAJmB,CAAC,SAAb,KAAK,CAAC,GAAG,CAAE,SACd,CAAC,KACD,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,QAU9C;AAOM,wBAJkB,CAAC,SAAZ,SAAU,SACb,KAAK,CAAC,CAAC,CAAC,GACP,CAAC,GAAG,IAAI,CAanB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.js deleted file mode 100644 index 5be7fd4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.js +++ /dev/null @@ -1,84 +0,0 @@ -export class QueueNode { - constructor () { - /** - * @type {QueueNode|null} - */ - this.next = null - } -} - -/** - * @template V - */ -export class QueueValue extends QueueNode { - /** - * @param {V} v - */ - constructor (v) { - super() - this.v = v - } -} - -/** - * @template {QueueNode} N - */ -export class Queue { - constructor () { - /** - * @type {N | null} - */ - this.start = null - /** - * @type {N | null} - */ - this.end = null - } -} - -/** - * @note The queue implementation is experimental and unfinished. - * Don't use this in production yet. - * - * @template {QueueNode} N - * @return {Queue} - */ -export const create = () => new Queue() - -/** - * @param {Queue} queue - */ -export const isEmpty = queue => queue.start === null - -/** - * @template {Queue} Q - * @param {Q} queue - * @param {Q extends Queue ? N : never} n - */ -export const enqueue = (queue, n) => { - if (queue.end !== null) { - queue.end.next = n - queue.end = n - } else { - queue.end = n - queue.start = n - } -} - -/** - * @template {QueueNode} N - * @param {Queue} queue - * @return {N | null} - */ -export const dequeue = queue => { - const n = queue.start - if (n !== null) { - // @ts-ignore - queue.start = n.next - if (queue.start === null) { - queue.end = null - } - return n - } - return null -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.test.d.ts deleted file mode 100644 index 7caa54d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testEnqueueDequeue(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=queue.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.test.d.ts.map deleted file mode 100644 index be0508d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/queue.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queue.test.d.ts","sourceRoot":"","sources":["queue.test.js"],"names":[],"mappings":"AAMO,wCAFI,CAAC,CAAC,QAAQ,QA8BpB;mBAlCkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.d.ts deleted file mode 100644 index f52f7b8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const rand: () => number; -export function uint32(): number; -export function uint53(): number; -export function oneOf(arr: Array): T; -export function uuidv4(): string; -//# sourceMappingURL=random.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.d.ts.map deleted file mode 100644 index e68e2aa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["random.js"],"names":[],"mappings":"AAYA,gCAA+B;AAExB,iCAA2D;AAE3D,iCAGN;AAOM,sBAJM,CAAC,OACH,KAAK,CAAC,CAAC,CAAC,GACP,CAAC,CAEmD;AAQzD,0BAFK,MAAM,CAIjB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.js deleted file mode 100644 index 741e5f1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Isomorphic module for true random numbers / buffers / uuids. - * - * Attention: falls back to Math.random if the browser does not support crypto. - * - * @module random - */ - -import * as math from './math.js' -import * as binary from './binary.js' -import { getRandomValues } from 'lib0/webcrypto' - -export const rand = Math.random - -export const uint32 = () => getRandomValues(new Uint32Array(1))[0] - -export const uint53 = () => { - const arr = getRandomValues(new Uint32Array(8)) - return (arr[0] & binary.BITS21) * (binary.BITS32 + 1) + (arr[1] >>> 0) -} - -/** - * @template T - * @param {Array} arr - * @return {T} - */ -export const oneOf = arr => arr[math.floor(rand() * arr.length)] - -// @ts-ignore -const uuidv4Template = [1e7] + -1e3 + -4e3 + -8e3 + -1e11 - -/** - * @return {string} - */ -export const uuidv4 = () => uuidv4Template.replace(/[018]/g, /** @param {number} c */ c => - (c ^ uint32() & 15 >> c / 4).toString(16) -) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.test.d.ts deleted file mode 100644 index d3b2523..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.test.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function testRandom(tc: t.TestCase): void; -export function testUint32(tc: t.TestCase): void; -export function testUint53(tc: t.TestCase): void; -export function testUuidv4(tc: t.TestCase): void; -export function testUuidv4Overlaps(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=random.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.test.d.ts.map deleted file mode 100644 index 11ee966..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"random.test.d.ts","sourceRoot":"","sources":["random.test.js"],"names":[],"mappings":"AASO,+BAFI,CAAC,CAAC,QAAQ,QAKpB;AAKM,+BAFI,CAAC,CAAC,QAAQ,QA0BpB;AAKM,+BAFI,CAAC,CAAC,QAAQ,QAyBpB;AAKM,+BAFI,CAAC,CAAC,QAAQ,QAIpB;AAKM,uCAFI,CAAC,CAAC,QAAQ,QAiBpB;mBA/FkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/rollup.config.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/rollup.config.d.ts deleted file mode 100644 index 7192ab2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/rollup.config.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare const _default: { - input: string[]; - output: { - dir: string; - format: string; - sourcemap: boolean; - entryFileNames: string; - chunkFileNames: string; - }; - external: string[]; -}[]; -export default _default; -//# sourceMappingURL=rollup.config.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/rollup.config.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/rollup.config.d.ts.map deleted file mode 100644 index 26da1df..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/rollup.config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rollup.config.d.ts","sourceRoot":"","sources":["rollup.config.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.d.ts deleted file mode 100644 index 27c6fbf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.d.ts +++ /dev/null @@ -1,595 +0,0 @@ -export class ValidationError { - /** - * Reverse errors - * @type {Array<{ path: string?, expected: string, has: string, message: string? }>} - */ - _rerrs: Array<{ - path: string | null; - expected: string; - has: string; - message: string | null; - }>; - /** - * @param {string?} path - * @param {string} expected - * @param {string} has - * @param {string?} message - */ - extend(path: string | null, expected: string, has: string, message?: string | null): void; - toString(): string; -} -/** - * @template T - * @implements {equalityTraits.EqualityTrait} - */ -export class Schema implements equalityTraits.EqualityTrait { - /** - * If true, the more things are added to the shape the more objects this schema will accept (e.g. - * union). By default, the more objects are added, the the fewer objects this schema will accept. - * @protected - */ - protected static _dilutes: boolean; - /** - * @param {Schema} other - */ - extends(other: Schema): boolean; - /** - * Overwrite this when necessary. By default, we only check the `shape` property which every shape - * should have. - * @param {Schema} other - */ - equals(other: Schema): boolean; - /** - * Use `schema.validate(obj)` with a typed parameter that is already of typed to be an instance of - * Schema. Validate will check the structure of the parameter and return true iff the instance - * really is an instance of Schema. - * - * @param {T} o - * @return {boolean} - */ - validate(o: T): boolean; - /** - * Similar to validate, but this method accepts untyped parameters. - * - * @param {any} _o - * @param {ValidationError} [_err] - * @return {_o is T} - */ - check(_o: any, _err?: ValidationError): _o is T; - /** - * @type {Schema} - */ - get nullable(): Schema; - /** - * @type {$Optional>} - */ - get optional(): $Optional>; - /** - * Cast a variable to a specific type. Returns the casted value, or throws an exception otherwise. - * Use this if you know that the type is of a specific type and you just want to convince the type - * system. - * - * **Do not rely on these error messages!** - * Performs an assertion check only if not in a production environment. - * - * @template OO - * @param {OO} o - * @return {Extract extends never ? T : (OO extends Array ? T : Extract)} - */ - cast(o: OO): Extract extends never ? T : (OO extends Array ? T : Extract); - /** - * EXPECTO PATRONUM!! 🪄 - * This function protects against type errors. Though it may not work in the real world. - * - * "After all this time?" - * "Always." - Snape, talking about type safety - * - * Ensures that a variable is a a specific type. Returns the value, or throws an exception if the assertion check failed. - * Use this if you know that the type is of a specific type and you just want to convince the type - * system. - * - * Can be useful when defining lambdas: `s.lambda(s.$number, s.$void).expect((n) => n + 1)` - * - * **Do not rely on these error messages!** - * Performs an assertion check if not in a production environment. - * - * @param {T} o - * @return {o extends T ? T : never} - */ - expect(o: T): T extends T ? T : never; - [schemaSymbol](): boolean; - /** - * @param {object} other - */ - [equalityTraits.EqualityTraitSymbol](other: object): boolean; -} -/** - * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} Constr - * @typedef {Constr extends ((...args:any[]) => infer T) ? T : (Constr extends (new (...args:any[]) => any) ? InstanceType : never)} Instance - */ -/** - * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} C - * @extends {Schema>} - */ -export class $ConstructedBy any) | ((...args: any[]) => any)> extends Schema> { - /** - * @param {C} c - * @param {((o:Instance)=>boolean)|null} check - */ - constructor(c: C, check: ((o: Instance) => boolean) | null); - shape: C; - _c: ((o: Instance) => boolean) | null; - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is C extends ((...args:any[]) => infer T) ? T : (C extends (new (...args:any[]) => any) ? InstanceType : never)} o - */ - check(o: any, err?: ValidationError): o is C extends ((...args: any[]) => infer T) ? T : (C extends (new (...args: any[]) => any) ? InstanceType : never); -} -export function $constructedBy any) | ((...args: any[]) => any)>(c: C, check?: ((o: Instance) => boolean) | null): CastToSchema<$ConstructedBy>; -export const $$constructedBy: Schema<$ConstructedBy<(new (...args: any[]) => any) | ((...args: any[]) => any)>>; -/** - * Check custom properties on any object. You may want to overwrite the generated Schema. - * - * @extends {Schema} - */ -export class $Custom extends Schema { - /** - * @param {(o:any) => boolean} check - */ - constructor(check: (o: any) => boolean); - /** - * @type {(o:any) => boolean} - */ - shape: (o: any) => boolean; - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is any} - */ - check(o: any, err: ValidationError): o is any; -} -export function $custom(check: (o: any) => boolean): Schema; -export const $$custom: Schema<$Custom>; -/** - * @template {Primitive} T - * @extends {Schema} - */ -export class $Literal extends Schema { - /** - * @param {Array} literals - */ - constructor(literals: Array); - shape: T[]; -} -export function $literal(...literals: T): CastToSchema<$Literal>; -export const $$literal: Schema<$Literal>; -/** - * @template {Array>} T - * @extends {Schema>} - */ -export class $StringTemplate>> extends Schema> { - /** - * @param {T} shape - */ - constructor(shape: T); - shape: T; - _r: RegExp; -} -export function $stringTemplate>>(...literals: T): CastToSchema<$StringTemplate>; -export const $$stringTemplate: Schema<$StringTemplate<(string | Schema)[]>>; -export const $$optional: Schema<$Optional>>; -/** - * @type {Schema} - */ -export const $never: Schema; -export const $$never: Schema<$Never>; -/** - * @template {{ [key: string|symbol|number]: Schema }} S - * @typedef {{ [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never }} $ObjectToType - */ -/** - * @template {{[key:string|symbol|number]: Schema}} S - * @extends {Schema<$ObjectToType>} - */ -export class $Object; -}> extends Schema<$ObjectToType> { - /** - * @param {S} shape - * @param {boolean} partial - */ - constructor(shape: S, partial?: boolean); - /** - * @type {S} - */ - shape: S; - _isPartial: boolean; - /** - * @type {Schema>>} - */ - get partial(): Schema>>; - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is $ObjectToType} - */ - check(o: any, err: ValidationError): o is $ObjectToType; -} -export function $object; -}>(def: S): _ObjectDefToSchema extends Schema ? Schema<{ [K in keyof S_1]: S_1[K]; }> : never; -export const $$object: Schema<$Object<{ - [key: string]: Schema; - [key: number]: Schema; - [key: symbol]: Schema; -}>>; -/** - * @type {Schema<{[key:string]: any}>} - */ -export const $objectAny: Schema<{ - [key: string]: any; -}>; -/** - * @template {Schema} Keys - * @template {Schema} Values - * @extends {Schema<{ [key in Unwrap]: Unwrap }>} - */ -export class $Record, Values extends Schema> extends Schema<{ [key in Unwrap]: Unwrap; }> { - /** - * @param {Keys} keys - * @param {Values} values - */ - constructor(keys: Keys, values: Values); - shape: { - keys: Keys; - values: Values; - }; - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is { [key in Unwrap]: Unwrap }} - */ - check(o: any, err: ValidationError): o is { [key_1 in Unwrap]: Unwrap; }; -} -export function $record, Values extends Schema>(keys: Keys, values: Values): CastToSchema<$Record>; -export const $$record: Schema<$Record, Schema>>; -/** - * @template {Schema[]} S - * @extends {Schema<{ [Key in keyof S]: S[Key] extends Schema ? Type : never }>} - */ -export class $Tuple[]> extends Schema<{ [Key in keyof S]: S[Key] extends Schema ? Type : never; }> { - /** - * @param {S} shape - */ - constructor(shape: S); - shape: S; - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is { [K in keyof S]: S[K] extends Schema ? Type : never }} - */ - check(o: any, err: ValidationError): o is { [K in keyof S]: S[K] extends Schema ? Type : never; }; -} -export function $tuple>>(...def: T): CastToSchema<$Tuple>; -export const $$tuple: Schema<$Tuple[]>>; -/** - * @template {Schema} S - * @extends {Schema ? T : never>>} - */ -export class $Array> extends Schema<(S extends Schema ? T : never)[]> { - /** - * @param {Array} v - */ - constructor(v: Array); - /** - * @type {Schema ? T : never>} - */ - shape: Schema ? T_1 : never>; - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is Array ? T : never>} o - */ - check(o: any, err?: ValidationError): o is Array ? T_1 : never>; -} -export function $array>>(...def: T): Schema> ? S : never>>; -export const $$array: Schema<$Array>>; -/** - * @type {Schema>} - */ -export const $arrayAny: Schema>; -/** - * @template T - * @extends {Schema} - */ -export class $InstanceOf extends Schema { - /** - * @param {new (...args:any) => T} constructor - * @param {((o:T) => boolean)|null} check - */ - constructor(constructor: new (...args: any) => T, check: ((o: T) => boolean) | null); - shape: new (...args: any) => T; - _c: ((o: T) => boolean) | null; - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is T} - */ - check(o: any, err: ValidationError): o is T; -} -export function $instanceOf(c: new (...args: any) => T, check?: ((o: T) => boolean) | null): Schema; -export const $$instanceOf: Schema<$InstanceOf>; -export const $$schema: Schema>; -/** - * @template {Schema[]} Args - * @typedef {(...args:UnwrapArray>)=>Unwrap>} _LArgsToLambdaDef - */ -/** - * @template {Array>} Args - * @extends {Schema<_LArgsToLambdaDef>} - */ -export class $Lambda>> extends Schema<_LArgsToLambdaDef> { - /** - * @param {Args} args - */ - constructor(args: Args); - len: number; - args: Schema; - res: Schema; - /** - * @param {any} f - * @param {ValidationError} err - * @return {f is _LArgsToLambdaDef} - */ - check(f: any, err: ValidationError): f is _LArgsToLambdaDef; -} -export function $lambda[]>(...args: Args): Schema<(...args: UnwrapArray>) => Unwrap>>; -export const $$lambda: Schema<$Lambda[]>>; -/** - * @type {Schema} - */ -export const $function: Schema; -/** - * @template {Array>} T - * @extends {Schema>>} - */ -export class $Intersection>> extends Schema>> { - /** - * @param {T} v - */ - constructor(v: T); - /** - * @type {T} - */ - shape: T; -} -export function $intersect[]>(...def: T): CastToSchema<$Intersection>; -export const $$intersect: Schema<$Intersection[]>>; -/** - * @template S - * @extends {Schema} - */ -export class $Union extends Schema { - /** - * @param {Array>} v - */ - constructor(v: Array>); - shape: Schema[]; -} -export function $union>(...schemas: T): CastToSchema<$Union>>>; -export const $$union: Schema<$Union>; -/** - * @type {Schema} - */ -export const $any: Schema; -export const $$any: Schema>; -/** - * @type {Schema} - */ -export const $bigint: Schema; -export const $$bigint: Schema>; -/** - * @type {Schema} - */ -export const $symbol: Schema; -export const $$symbol: Schema>; -/** - * @type {Schema} - */ -export const $number: Schema; -export const $$number: Schema>; -/** - * @type {Schema} - */ -export const $string: Schema; -export const $$string: Schema>; -/** - * @type {Schema} - */ -export const $boolean: Schema; -export const $$boolean: Schema>; -/** - * @type {Schema} - */ -export const $undefined: Schema; -export const $$undefined: Schema>; -/** - * @type {Schema} - */ -export const $void: Schema; -export const $$void: Schema>; -export const $null: Schema; -export const $$null: Schema>; -export const $uint8Array: Schema>; -export const $$uint8Array: Schema>; -/** - * @type {Schema} - */ -export const $primitive: Schema; -/** - * @typedef {JSON[]} JSONArray - */ -/** - * @typedef {Primitive|JSONArray|{ [key:string]:JSON }} JSON - */ -/** - * @type {Schema} - */ -export const $json: Schema; -export function $(o: IN): ReadSchema; -/** - * Assert that a variable is of this specific type. - * The assertion check is only performed in non-production environments. - * - * @type {(o:any,schema:Schema) => asserts o is T} - */ -export const assert: (o: any, schema: Schema) => asserts o is T; -/** - * @template In - * @template Out - * @typedef {{ if: Schema, h: (o:In,state?:any)=>Out }} Pattern - */ -/** - * @template {Pattern} P - * @template In - * @typedef {ReturnType>['h']>} PatternMatchResult - */ -/** - * @todo move this to separate library - * @template {any} [State=undefined] - * @template {Pattern} [Patterns=never] - */ -export class PatternMatcher = never> { - /** - * @param {Schema} [$state] - */ - constructor($state?: Schema); - /** - * @type {Array} - */ - patterns: Array; - $state: Schema | undefined; - /** - * @template P - * @template R - * @param {P} pattern - * @param {(o:NoInfer>>,s:State)=>R} handler - * @return {PatternMatcher>,R>>} - */ - if(pattern: P, handler: (o: NoInfer>>, s: State) => R): PatternMatcher>, R>>; - /** - * @template R - * @param {(o:any,s:State)=>R} h - */ - else(h: (o: any, s: State) => R): PatternMatcher>; - /** - * @return {State extends undefined - * ? >(o:In,state?:undefined)=>PatternMatchResult - * : >(o:In,state:State)=>PatternMatchResult} - */ - done(): State extends undefined ? >(o: In, state?: undefined) => PatternMatchResult : >(o: In, state: State) => PatternMatchResult; -} -export function match(state?: State): PatternMatcher>>; -export function random(gen: prng.PRNG, schema: S): Unwrap>; -export type Primitive = string | number | bigint | boolean | null | undefined | symbol; -export type AnyObject = { - [k: string | number | symbol]: any; -}; -export type Unwrap = T extends Schema ? X : T; -export type TypeOf = T extends Schema ? X : T; -export type UnwrapArray = T extends readonly [Schema, ...infer Rest] ? [First, ...UnwrapArray] : []; -export type CastToSchema = T extends Schema ? Schema : never; -export type TupleLast = Arr extends [...unknown[], infer L] ? L : never; -export type TuplePop = Arr extends [...infer Fs, unknown] ? Fs : never; -export type Intersect = T extends [] ? {} : T extends [infer First] ? First : T extends [infer First, ...infer Rest] ? First & Intersect : never; -export type Instance any) | ((...args: any[]) => any)> = Constr extends ((...args: any[]) => infer T) ? T : (Constr extends (new (...args: any[]) => any) ? InstanceType : never); -export type CastStringTemplateArgsToTemplate>> = Ts extends [] ? `` : (Ts extends [infer T] ? (Unwrap extends (string | number) ? Unwrap : never) : (Ts extends [infer T1, ...infer Rest] ? `${Unwrap extends (string | number) ? Unwrap : never}${Rest extends Array> ? CastStringTemplateArgsToTemplate : never}` : never)); -export type $ObjectToType; -}> = { [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never; } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never; }; -export type _ObjectDefToSchema = Schema<{ [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never; } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never; }>; -export type _LArgsToLambdaDef[]> = (...args: UnwrapArray>) => Unwrap>; -export type JSONArray = JSON[]; -export type JSON = Primitive | JSONArray | { - [key: string]: JSON; -}; -export type ReadSchemaOld = IN extends Schema ? IN : (IN extends string | number | boolean | null ? Schema : (IN extends new (...args: any[]) => any ? Schema> : (IN extends any[] ? Schema<{ [K in keyof IN]: Unwrap>; }[number]> : (IN extends object ? (_ObjectDefToSchema<{ [K in keyof IN]: ReadSchema; }> extends Schema ? Schema<{ [K in keyof S]: S[K]; }> : never) : never)))); -export type ReadSchema = [Extract>, Extract, Extract any>, Extract, Extract | string | number | boolean | null | (new (...args: any[]) => any) | any[]>, object>] extends [infer Schemas, infer Primitives, infer Constructors, infer Arrs, infer Obj] ? Schema<(Schemas extends Schema ? S : never) | Primitives | (Constructors extends new (...args: any[]) => any ? InstanceType : never) | (Arrs extends any[] ? { [K in keyof Arrs]: Unwrap>; }[number] : never) | (Obj extends object ? Unwrap<(_ObjectDefToSchema<{ [K in keyof Obj]: ReadSchema; }> extends Schema ? Schema<{ [K in keyof S]: S[K]; }> : never)> : never)> : never; -export type Q = ReadSchema<{ - x: 42; -} | { - y: 99; -} | Schema | [1, 2, {}]>; -export type Pattern = { - if: Schema; - h: (o: In, state?: any) => Out; -}; -export type PatternMatchResult

, In> = ReturnType>["h"]>; -import * as equalityTraits from './trait/equality.js'; -/** - * @template {Schema} S - * @extends Schema|undefined> - */ -declare class $Optional> extends Schema | undefined> { - /** - * @param {S} shape - */ - constructor(shape: S); - shape: S; - get [isOptionalSymbol](): boolean; -} -/** - * @typedef {string|number|bigint|boolean|null|undefined|symbol} Primitive - */ -/** - * @typedef {{ [k:string|number|symbol]: any }} AnyObject - */ -/** - * @template T - * @typedef {T extends Schema ? X : T} Unwrap - */ -/** - * @template T - * @typedef {T extends Schema ? X : T} TypeOf - */ -/** - * @template {readonly unknown[]} T - * @typedef {T extends readonly [Schema, ...infer Rest] ? [First, ...UnwrapArray] : [] } UnwrapArray - */ -/** - * @template T - * @typedef {T extends Schema ? Schema : never} CastToSchema - */ -/** - * @template {unknown[]} Arr - * @typedef {Arr extends [...unknown[], infer L] ? L : never} TupleLast - */ -/** - * @template {unknown[]} Arr - * @typedef {Arr extends [...infer Fs, unknown] ? Fs : never} TuplePop - */ -/** - * @template {readonly unknown[]} T - * @typedef {T extends [] - * ? {} - * : T extends [infer First] - * ? First - * : T extends [infer First, ...infer Rest] - * ? First & Intersect - * : never - * } Intersect - */ -declare const schemaSymbol: unique symbol; -/** - * @extends Schema - */ -declare class $Never extends Schema { - constructor(); -} -import * as prng from './prng.js'; -declare const isOptionalSymbol: unique symbol; -export {}; -//# sourceMappingURL=schema.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.d.ts.map deleted file mode 100644 index 9c01a9c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["schema.js"],"names":[],"mappings":"AAoEA;IAEI;;;OAGG;IACH,QAFU,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,OAAC,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,OAAC,CAAA;KAAE,CAAC,CAEnE;IAGlB;;;;;OAKG;IACH,aALW,MAAM,OAAC,YACP,MAAM,OACN,MAAM,YACN,MAAM,OAAC,QAIjB;IAED,mBAQC;CACF;AAwBD;;;GAGG;AACH,oBAHa,CAAC,aACE,cAAc,CAAC,aAAa;IAI1C;;;;OAIG;IACH,mCAAuB;IAEvB;;OAEG;IACH,eAFW,MAAM,CAAC,GAAG,CAAC,WAMrB;IAED;;;;OAIG;IACH,cAFW,MAAM,CAAC,GAAG,CAAC,WAKrB;IAWD;;;;;;;OAOG;IACH,YAHW,CAAC,GACA,OAAO,CAIlB;IAGD;;;;;;OAMG;IACH,UAJW,GAAG,SACH,eAAe,GACd,EAAE,IAAI,CAAC,CAIlB;IAGD;;OAEG;IACH,gBAFU,MAAM,CAAC,CAAC,OAAC,CAAC,CAKnB;IAED;;OAEG;IACH,gBAFU,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAI7B;IAED;;;;;;;;;;;OAWG;IACH,KAJa,EAAE,KACJ,EAAE,GACD,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,KAAK,GAAG,CAAC,GAAG,CAAC,EAAE,SAAS,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,EAAE,EAAC,CAAC,CAAC,CAAC,CAK3F;IAED;;;;;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IAepB,kCAAyC;CAC1C;AAzbD;;GAEG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,0CAAsC;AA0YtC;;GAEG;AACH;;CAWC;sBA7cqB,WAAW;AAiajC,8CAA2C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.js deleted file mode 100644 index 4f7afa1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.js +++ /dev/null @@ -1,1136 +0,0 @@ -/** - * @experimental WIP - * - * Simple & efficient schemas for your data. - */ - -import * as obj from './object.js' -import * as arr from './array.js' -import * as error from './error.js' -import * as env from './environment.js' -import * as equalityTraits from './trait/equality.js' -import * as fun from './function.js' -import * as string from './string.js' -import * as prng from './prng.js' -import * as number from './number.js' - -/** - * @typedef {string|number|bigint|boolean|null|undefined|symbol} Primitive - */ - -/** - * @typedef {{ [k:string|number|symbol]: any }} AnyObject - */ - -/** - * @template T - * @typedef {T extends Schema ? X : T} Unwrap - */ - -/** - * @template T - * @typedef {T extends Schema ? X : T} TypeOf - */ - -/** - * @template {readonly unknown[]} T - * @typedef {T extends readonly [Schema, ...infer Rest] ? [First, ...UnwrapArray] : [] } UnwrapArray - */ - -/** - * @template T - * @typedef {T extends Schema ? Schema : never} CastToSchema - */ - -/** - * @template {unknown[]} Arr - * @typedef {Arr extends [...unknown[], infer L] ? L : never} TupleLast - */ - -/** - * @template {unknown[]} Arr - * @typedef {Arr extends [...infer Fs, unknown] ? Fs : never} TuplePop - */ - -/** - * @template {readonly unknown[]} T - * @typedef {T extends [] - * ? {} - * : T extends [infer First] - * ? First - * : T extends [infer First, ...infer Rest] - * ? First & Intersect - * : never - * } Intersect - */ - -const schemaSymbol = Symbol('0schema') - -export class ValidationError { - constructor () { - /** - * Reverse errors - * @type {Array<{ path: string?, expected: string, has: string, message: string? }>} - */ - this._rerrs = [] - } - - /** - * @param {string?} path - * @param {string} expected - * @param {string} has - * @param {string?} message - */ - extend (path, expected, has, message = null) { - this._rerrs.push({ path, expected, has, message }) - } - - toString () { - const s = [] - for (let i = this._rerrs.length - 1; i > 0; i--) { - const r = this._rerrs[i] - /* c8 ignore next */ - s.push(string.repeat(' ', (this._rerrs.length - i) * 2) + `${r.path != null ? `[${r.path}] ` : ''}${r.has} doesn't match ${r.expected}. ${r.message}`) - } - return s.join('\n') - } -} - -/** - * @param {any} a - * @param {any} b - * @return {boolean} - */ -const shapeExtends = (a, b) => { - if (a === b) return true - if (a == null || b == null || a.constructor !== b.constructor) return false - if (a[equalityTraits.EqualityTraitSymbol]) return equalityTraits.equals(a, b) // last resort: check equality (do this before array and obj check which don't implement the equality trait) - if (arr.isArray(a)) { - return arr.every(a, aitem => - arr.some(b, bitem => shapeExtends(aitem, bitem)) - ) - } else if (obj.isObject(a)) { - return obj.every(a, (aitem, akey) => - shapeExtends(aitem, b[akey]) - ) - } - /* c8 ignore next */ - return false -} - -/** - * @template T - * @implements {equalityTraits.EqualityTrait} - */ -export class Schema { - // this.shape must not be defined on Schema. Otherwise typecheck on metatypes (e.g. $$object) won't work as expected anymore - /** - * If true, the more things are added to the shape the more objects this schema will accept (e.g. - * union). By default, the more objects are added, the the fewer objects this schema will accept. - * @protected - */ - static _dilutes = false - - /** - * @param {Schema} other - */ - extends (other) { - let [a, b] = [/** @type {any} */(this).shape, /** @type {any} */ (other).shape] - if (/** @type {typeof Schema} */ (this.constructor)._dilutes) [b, a] = [a, b] - return shapeExtends(a, b) - } - - /** - * Overwrite this when necessary. By default, we only check the `shape` property which every shape - * should have. - * @param {Schema} other - */ - equals (other) { - // @ts-ignore - return this.constructor === other.constructor && fun.equalityDeep(this.shape, other.shape) - } - - [schemaSymbol] () { return true } - - /** - * @param {object} other - */ - [equalityTraits.EqualityTraitSymbol] (other) { - return this.equals(/** @type {any} */ (other)) - } - - /** - * Use `schema.validate(obj)` with a typed parameter that is already of typed to be an instance of - * Schema. Validate will check the structure of the parameter and return true iff the instance - * really is an instance of Schema. - * - * @param {T} o - * @return {boolean} - */ - validate (o) { - return this.check(o) - } - - /* c8 ignore start */ - /** - * Similar to validate, but this method accepts untyped parameters. - * - * @param {any} _o - * @param {ValidationError} [_err] - * @return {_o is T} - */ - check (_o, _err) { - error.methodUnimplemented() - } - /* c8 ignore stop */ - - /** - * @type {Schema} - */ - get nullable () { - // @ts-ignore - return $union(this, $null) - } - - /** - * @type {$Optional>} - */ - get optional () { - return new $Optional(/** @type {Schema} */ (this)) - } - - /** - * Cast a variable to a specific type. Returns the casted value, or throws an exception otherwise. - * Use this if you know that the type is of a specific type and you just want to convince the type - * system. - * - * **Do not rely on these error messages!** - * Performs an assertion check only if not in a production environment. - * - * @template OO - * @param {OO} o - * @return {Extract extends never ? T : (OO extends Array ? T : Extract)} - */ - cast (o) { - assert(o, this) - return /** @type {any} */ (o) - } - - /** - * EXPECTO PATRONUM!! 🪄 - * This function protects against type errors. Though it may not work in the real world. - * - * "After all this time?" - * "Always." - Snape, talking about type safety - * - * Ensures that a variable is a a specific type. Returns the value, or throws an exception if the assertion check failed. - * Use this if you know that the type is of a specific type and you just want to convince the type - * system. - * - * Can be useful when defining lambdas: `s.lambda(s.$number, s.$void).expect((n) => n + 1)` - * - * **Do not rely on these error messages!** - * Performs an assertion check if not in a production environment. - * - * @param {T} o - * @return {o extends T ? T : never} - */ - expect (o) { - assert(o, this) - return o - } -} - -/** - * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} Constr - * @typedef {Constr extends ((...args:any[]) => infer T) ? T : (Constr extends (new (...args:any[]) => any) ? InstanceType : never)} Instance - */ - -/** - * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} C - * @extends {Schema>} - */ -export class $ConstructedBy extends Schema { - /** - * @param {C} c - * @param {((o:Instance)=>boolean)|null} check - */ - constructor (c, check) { - super() - this.shape = c - this._c = check - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is C extends ((...args:any[]) => infer T) ? T : (C extends (new (...args:any[]) => any) ? InstanceType : never)} o - */ - check (o, err = undefined) { - const c = o?.constructor === this.shape && (this._c == null || this._c(o)) - /* c8 ignore next */ - !c && err?.extend(null, this.shape.name, o?.constructor.name, o?.constructor !== this.shape ? 'Constructor match failed' : 'Check failed') - return c - } -} - -/** - * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} C - * @param {C} c - * @param {((o:Instance) => boolean)|null} check - * @return {CastToSchema<$ConstructedBy>} - */ -export const $constructedBy = (c, check = null) => new $ConstructedBy(c, check) -export const $$constructedBy = $constructedBy($ConstructedBy) - -/** - * Check custom properties on any object. You may want to overwrite the generated Schema. - * - * @extends {Schema} - */ -export class $Custom extends Schema { - /** - * @param {(o:any) => boolean} check - */ - constructor (check) { - super() - /** - * @type {(o:any) => boolean} - */ - this.shape = check - } - - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is any} - */ - check (o, err) { - const c = this.shape(o) - /* c8 ignore next */ - !c && err?.extend(null, 'custom prop', o?.constructor.name, 'failed to check custom prop') - return c - } -} - -/** - * @param {(o:any) => boolean} check - * @return {Schema} - */ -export const $custom = (check) => new $Custom(check) -export const $$custom = $constructedBy($Custom) - -/** - * @template {Primitive} T - * @extends {Schema} - */ -export class $Literal extends Schema { - /** - * @param {Array} literals - */ - constructor (literals) { - super() - this.shape = literals - } - - /** - * - * @param {any} o - * @param {ValidationError} [err] - * @return {o is T} - */ - check (o, err) { - const c = this.shape.some(a => a === o) - /* c8 ignore next */ - !c && err?.extend(null, this.shape.join(' | '), o.toString()) - return c - } -} - -/** - * @template {Primitive[]} T - * @param {T} literals - * @return {CastToSchema<$Literal>} - */ -export const $literal = (...literals) => new $Literal(literals) -export const $$literal = $constructedBy($Literal) - -/** - * @template {Array>} Ts - * @typedef {Ts extends [] ? `` : (Ts extends [infer T] ? (Unwrap extends (string|number) ? Unwrap : never) : (Ts extends [infer T1, ...infer Rest] ? `${Unwrap extends (string|number) ? Unwrap : never}${Rest extends Array> ? CastStringTemplateArgsToTemplate : never}` : never))} CastStringTemplateArgsToTemplate - */ - -/** - * @param {string} str - * @return {string} - */ -const _regexEscape = /** @type {any} */ (RegExp).escape || /** @type {(str:string) => string} */ (str => - str.replace(/[().|&,$^[\]]/g, s => '\\' + s) -) - -/** - * @param {string|Schema} s - * @return {string[]} - */ -const _schemaStringTemplateToRegex = s => { - if ($string.check(s)) { - return [_regexEscape(s)] - } - if ($$literal.check(s)) { - return /** @type {Array} */ (s.shape).map(v => v + '') - } - if ($$number.check(s)) { - return ['[+-]?\\d+.?\\d*'] - } - if ($$string.check(s)) { - return ['.*'] - } - if ($$union.check(s)) { - return s.shape.map(_schemaStringTemplateToRegex).flat(1) - } - /* c8 ignore next 2 */ - // unexpected schema structure (only supports unions and string in literal types) - error.unexpectedCase() -} - -/** - * @template {Array>} T - * @extends {Schema>} - */ -export class $StringTemplate extends Schema { - /** - * @param {T} shape - */ - constructor (shape) { - super() - this.shape = shape - this._r = new RegExp('^' + shape.map(_schemaStringTemplateToRegex).map(opts => `(${opts.join('|')})`).join('') + '$') - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is CastStringTemplateArgsToTemplate} - */ - check (o, err) { - const c = this._r.exec(o) != null - /* c8 ignore next */ - !c && err?.extend(null, this._r.toString(), o.toString(), 'String doesn\'t match string template.') - return c - } -} - -/** - * @template {Array>} T - * @param {T} literals - * @return {CastToSchema<$StringTemplate>} - */ -export const $stringTemplate = (...literals) => new $StringTemplate(literals) -export const $$stringTemplate = $constructedBy($StringTemplate) - -const isOptionalSymbol = Symbol('optional') -/** - * @template {Schema} S - * @extends Schema|undefined> - */ -class $Optional extends Schema { - /** - * @param {S} shape - */ - constructor (shape) { - super() - this.shape = shape - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is (Unwrap|undefined)} - */ - check (o, err) { - const c = o === undefined || this.shape.check(o) - /* c8 ignore next */ - !c && err?.extend(null, 'undefined (optional)', '()') - return c - } - - get [isOptionalSymbol] () { return true } -} -export const $$optional = $constructedBy($Optional) - -/** - * @extends Schema - */ -class $Never extends Schema { - /** - * @param {any} _o - * @param {ValidationError} [err] - * @return {_o is never} - */ - check (_o, err) { - /* c8 ignore next */ - err?.extend(null, 'never', typeof _o) - return false - } -} - -/** - * @type {Schema} - */ -export const $never = new $Never() -export const $$never = $constructedBy($Never) - -/** - * @template {{ [key: string|symbol|number]: Schema }} S - * @typedef {{ [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never }} $ObjectToType - */ - -/** - * @template {{[key:string|symbol|number]: Schema}} S - * @extends {Schema<$ObjectToType>} - */ -export class $Object extends Schema { - /** - * @param {S} shape - * @param {boolean} partial - */ - constructor (shape, partial = false) { - super() - /** - * @type {S} - */ - this.shape = shape - this._isPartial = partial - } - - static _dilutes = true - - /** - * @type {Schema>>} - */ - get partial () { - return new $Object(this.shape, true) - } - - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is $ObjectToType} - */ - check (o, err) { - if (o == null) { - /* c8 ignore next */ - err?.extend(null, 'object', 'null') - return false - } - return obj.every(this.shape, (vv, vk) => { - const c = (this._isPartial && !obj.hasProperty(o, vk)) || vv.check(o[vk], err) - !c && err?.extend(vk.toString(), vv.toString(), typeof o[vk], 'Object property does not match') - return c - }) - } -} - -/** - * @template S - * @typedef {Schema<{ [Key in keyof S as S[Key] extends $Optional> ? Key : never]?: S[Key] extends $Optional> ? Type : never } & { [Key in keyof S as S[Key] extends $Optional> ? never : Key]: S[Key] extends Schema ? Type : never }>} _ObjectDefToSchema - */ - -// I used an explicit type annotation instead of $ObjectToType, so that the user doesn't see the -// weird type definitions when inspecting type definions. -/** - * @template {{ [key:string|symbol|number]: Schema }} S - * @param {S} def - * @return {_ObjectDefToSchema extends Schema ? Schema<{ [K in keyof S]: S[K] }> : never} - */ -export const $object = def => /** @type {any} */ (new $Object(def)) -export const $$object = $constructedBy($Object) -/** - * @type {Schema<{[key:string]: any}>} - */ -export const $objectAny = $custom(o => o != null && (o.constructor === Object || o.constructor == null)) - -/** - * @template {Schema} Keys - * @template {Schema} Values - * @extends {Schema<{ [key in Unwrap]: Unwrap }>} - */ -export class $Record extends Schema { - /** - * @param {Keys} keys - * @param {Values} values - */ - constructor (keys, values) { - super() - this.shape = { - keys, values - } - } - - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is { [key in Unwrap]: Unwrap }} - */ - check (o, err) { - return o != null && obj.every(o, (vv, vk) => { - const ck = this.shape.keys.check(vk, err) - /* c8 ignore next */ - !ck && err?.extend(vk + '', 'Record', typeof o, ck ? 'Key doesn\'t match schema' : 'Value doesn\'t match value') - return ck && this.shape.values.check(vv, err) - }) - } -} - -/** - * @template {Schema} Keys - * @template {Schema} Values - * @param {Keys} keys - * @param {Values} values - * @return {CastToSchema<$Record>} - */ -export const $record = (keys, values) => new $Record(keys, values) -export const $$record = $constructedBy($Record) - -/** - * @template {Schema[]} S - * @extends {Schema<{ [Key in keyof S]: S[Key] extends Schema ? Type : never }>} - */ -export class $Tuple extends Schema { - /** - * @param {S} shape - */ - constructor (shape) { - super() - this.shape = shape - } - - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is { [K in keyof S]: S[K] extends Schema ? Type : never }} - */ - check (o, err) { - return o != null && obj.every(this.shape, (vv, vk) => { - const c = /** @type {Schema} */ (vv).check(o[vk], err) - /* c8 ignore next */ - !c && err?.extend(vk.toString(), 'Tuple', typeof vv) - return c - }) - } -} - -/** - * @template {Array>} T - * @param {T} def - * @return {CastToSchema<$Tuple>} - */ -export const $tuple = (...def) => new $Tuple(def) -export const $$tuple = $constructedBy($Tuple) - -/** - * @template {Schema} S - * @extends {Schema ? T : never>>} - */ -export class $Array extends Schema { - /** - * @param {Array} v - */ - constructor (v) { - super() - /** - * @type {Schema ? T : never>} - */ - this.shape = v.length === 1 ? v[0] : new $Union(v) - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is Array ? T : never>} o - */ - check (o, err) { - const c = arr.isArray(o) && arr.every(o, oi => this.shape.check(oi)) - /* c8 ignore next */ - !c && err?.extend(null, 'Array', '') - return c - } -} - -/** - * @template {Array>} T - * @param {T} def - * @return {Schema> ? S : never>>} - */ -export const $array = (...def) => new $Array(def) -export const $$array = $constructedBy($Array) -/** - * @type {Schema>} - */ -export const $arrayAny = $custom(o => arr.isArray(o)) - -/** - * @template T - * @extends {Schema} - */ -export class $InstanceOf extends Schema { - /** - * @param {new (...args:any) => T} constructor - * @param {((o:T) => boolean)|null} check - */ - constructor (constructor, check) { - super() - this.shape = constructor - this._c = check - } - - /** - * @param {any} o - * @param {ValidationError} err - * @return {o is T} - */ - check (o, err) { - const c = o instanceof this.shape && (this._c == null || this._c(o)) - /* c8 ignore next */ - !c && err?.extend(null, this.shape.name, o?.constructor.name) - return c - } -} - -/** - * @template T - * @param {new (...args:any) => T} c - * @param {((o:T) => boolean)|null} check - * @return {Schema} - */ -export const $instanceOf = (c, check = null) => new $InstanceOf(c, check) -export const $$instanceOf = $constructedBy($InstanceOf) - -export const $$schema = $instanceOf(Schema) - -/** - * @template {Schema[]} Args - * @typedef {(...args:UnwrapArray>)=>Unwrap>} _LArgsToLambdaDef - */ - -/** - * @template {Array>} Args - * @extends {Schema<_LArgsToLambdaDef>} - */ -export class $Lambda extends Schema { - /** - * @param {Args} args - */ - constructor (args) { - super() - this.len = args.length - 1 - this.args = $tuple(...args.slice(-1)) - this.res = args[this.len] - } - - /** - * @param {any} f - * @param {ValidationError} err - * @return {f is _LArgsToLambdaDef} - */ - check (f, err) { - const c = f.constructor === Function && f.length <= this.len - /* c8 ignore next */ - !c && err?.extend(null, 'function', typeof f) - return c - } -} - -/** - * @template {Schema[]} Args - * @param {Args} args - * @return {Schema<(...args:UnwrapArray>)=>Unwrap>>} - */ -export const $lambda = (...args) => new $Lambda(args.length > 0 ? args : [$void]) -export const $$lambda = $constructedBy($Lambda) - -/** - * @type {Schema} - */ -export const $function = $custom(o => typeof o === 'function') - -/** - * @template {Array>} T - * @extends {Schema>>} - */ -export class $Intersection extends Schema { - /** - * @param {T} v - */ - constructor (v) { - super() - /** - * @type {T} - */ - this.shape = v - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is Intersect>} - */ - check (o, err) { - // @ts-ignore - const c = arr.every(this.shape, check => check.check(o, err)) - /* c8 ignore next */ - !c && err?.extend(null, 'Intersectinon', typeof o) - return c - } -} - -/** - * @template {Schema[]} T - * @param {T} def - * @return {CastToSchema<$Intersection>} - */ -export const $intersect = (...def) => new $Intersection(def) -export const $$intersect = $constructedBy($Intersection, o => o.shape.length > 0) // Intersection with length=0 is considered "any" - -/** - * @template S - * @extends {Schema} - */ -export class $Union extends Schema { - static _dilutes = true - - /** - * @param {Array>} v - */ - constructor (v) { - super() - this.shape = v - } - - /** - * @param {any} o - * @param {ValidationError} [err] - * @return {o is S} - */ - check (o, err) { - const c = arr.some(this.shape, (vv) => vv.check(o, err)) - err?.extend(null, 'Union', typeof o) - return c - } -} - -/** - * @template {Array} T - * @param {T} schemas - * @return {CastToSchema<$Union>>>} - */ -export const $union = (...schemas) => schemas.findIndex($s => $$union.check($s)) >= 0 - ? $union(...schemas.map($s => $($s)).map($s => $$union.check($s) ? $s.shape : [$s]).flat(1)) - : (schemas.length === 1 - ? schemas[0] - : new $Union(schemas)) -export const $$union = /** @type {Schema<$Union>} */ ($constructedBy($Union)) - -const _t = () => true -/** - * @type {Schema} - */ -export const $any = $custom(_t) -export const $$any = /** @type {Schema>} */ ($constructedBy($Custom, o => o.shape === _t)) - -/** - * @type {Schema} - */ -export const $bigint = $custom(o => typeof o === 'bigint') -export const $$bigint = /** @type {Schema>} */ ($custom(o => o === $bigint)) - -/** - * @type {Schema} - */ -export const $symbol = $custom(o => typeof o === 'symbol') -export const $$symbol = /** @type {Schema>} */ ($custom(o => o === $symbol)) - -/** - * @type {Schema} - */ -export const $number = $custom(o => typeof o === 'number') -export const $$number = /** @type {Schema>} */ ($custom(o => o === $number)) - -/** - * @type {Schema} - */ -export const $string = $custom(o => typeof o === 'string') -export const $$string = /** @type {Schema>} */ ($custom(o => o === $string)) - -/** - * @type {Schema} - */ -export const $boolean = $custom(o => typeof o === 'boolean') -export const $$boolean = /** @type {Schema>} */ ($custom(o => o === $boolean)) - -/** - * @type {Schema} - */ -export const $undefined = $literal(undefined) -export const $$undefined = /** @type {Schema>} */ ($constructedBy($Literal, o => o.shape.length === 1 && o.shape[0] === undefined)) - -/** - * @type {Schema} - */ -export const $void = $literal(undefined) -export const $$void = /** @type {Schema>} */ ($$undefined) - -export const $null = $literal(null) -export const $$null = /** @type {Schema>} */ ($constructedBy($Literal, o => o.shape.length === 1 && o.shape[0] === null)) - -export const $uint8Array = $constructedBy(Uint8Array) -export const $$uint8Array = /** @type {Schema>} */ ($constructedBy($ConstructedBy, o => o.shape === Uint8Array)) - -/** - * @type {Schema} - */ -export const $primitive = $union($number, $string, $null, $undefined, $bigint, $boolean, $symbol) - -/** - * @typedef {JSON[]} JSONArray - */ -/** - * @typedef {Primitive|JSONArray|{ [key:string]:JSON }} JSON - */ -/** - * @type {Schema} - */ -export const $json = (() => { - const $jsonArr = /** @type {$Array<$any>} */ ($array($any)) - const $jsonRecord = /** @type {$Record<$string,$any>} */ ($record($string, $any)) - const $json = $union($number, $string, $null, $boolean, $jsonArr, $jsonRecord) - $jsonArr.shape = $json - $jsonRecord.shape.values = $json - return $json -})() - -/** - * @template {any} IN - * @typedef {IN extends Schema ? IN - * : (IN extends string|number|boolean|null ? Schema - * : (IN extends new (...args:any[])=>any ? Schema> - * : (IN extends any[] ? Schema<{ [K in keyof IN]: Unwrap> }[number]> - * : (IN extends object ? (_ObjectDefToSchema<{[K in keyof IN]:ReadSchema}> extends Schema ? Schema<{ [K in keyof S]: S[K] }> : never) - * : never) - * ) - * ) - * ) - * } ReadSchemaOld - */ - -/** - * @template {any} IN - * @typedef {[Extract>,Extract,Extractany>,Extract,Extract|string|number|boolean|null|(new (...args:any[])=>any)|any[]>,object>] extends [infer Schemas, infer Primitives, infer Constructors, infer Arrs, infer Obj] - * ? Schema< - * (Schemas extends Schema ? S : never) - * | Primitives - * | (Constructors extends new (...args:any[])=>any ? InstanceType : never) - * | (Arrs extends any[] ? { [K in keyof Arrs]: Unwrap> }[number] : never) - * | (Obj extends object ? Unwrap<(_ObjectDefToSchema<{[K in keyof Obj]:ReadSchema}> extends Schema ? Schema<{ [K in keyof S]: S[K] }> : never)> : never)> - * : never - * } ReadSchema - */ - -/** - * @typedef {ReadSchema<{x:42}|{y:99}|Schema|[1,2,{}]>} Q - */ - -/** - * @template IN - * @param {IN} o - * @return {ReadSchema} - */ -export const $ = o => { - if ($$schema.check(o)) { - return /** @type {any} */ (o) - } else if ($objectAny.check(o)) { - /** - * @type {any} - */ - const o2 = {} - for (const k in o) { - o2[k] = $(o[k]) - } - return /** @type {any} */ ($object(o2)) - } else if ($arrayAny.check(o)) { - return /** @type {any} */ ($union(...o.map($))) - } else if ($primitive.check(o)) { - return /** @type {any} */ ($literal(o)) - } else if ($function.check(o)) { - return /** @type {any} */ ($constructedBy(/** @type {any} */ (o))) - } - /* c8 ignore next */ - error.unexpectedCase() -} - -/* c8 ignore start */ -/** - * Assert that a variable is of this specific type. - * The assertion check is only performed in non-production environments. - * - * @type {(o:any,schema:Schema) => asserts o is T} - */ -export const assert = env.production - ? () => {} - : (o, schema) => { - const err = new ValidationError() - if (!schema.check(o, err)) { - throw error.create(`Expected value to be of type ${schema.constructor.name}.\n${err.toString()}`) - } - } -/* c8 ignore end */ - -/** - * @template In - * @template Out - * @typedef {{ if: Schema, h: (o:In,state?:any)=>Out }} Pattern - */ - -/** - * @template {Pattern} P - * @template In - * @typedef {ReturnType>['h']>} PatternMatchResult - */ - -/** - * @todo move this to separate library - * @template {any} [State=undefined] - * @template {Pattern} [Patterns=never] - */ -export class PatternMatcher { - /** - * @param {Schema} [$state] - */ - constructor ($state) { - /** - * @type {Array} - */ - this.patterns = [] - this.$state = $state - } - - /** - * @template P - * @template R - * @param {P} pattern - * @param {(o:NoInfer>>,s:State)=>R} handler - * @return {PatternMatcher>,R>>} - */ - if (pattern, handler) { - // @ts-ignore - this.patterns.push({ if: $(pattern), h: handler }) - // @ts-ignore - return this - } - - /** - * @template R - * @param {(o:any,s:State)=>R} h - */ - else (h) { - return this.if($any, h) - } - - /** - * @return {State extends undefined - * ? >(o:In,state?:undefined)=>PatternMatchResult - * : >(o:In,state:State)=>PatternMatchResult} - */ - done () { - // @ts-ignore - return /** @type {any} */ (o, s) => { - for (let i = 0; i < this.patterns.length; i++) { - const p = this.patterns[i] - if (p.if.check(o)) { - // @ts-ignore - return p.h(o, s) - } - } - throw error.create('Unhandled pattern') - } - } -} - -/** - * @template [State=undefined] - * @param {State} [state] - * @return {PatternMatcher>>} - */ -export const match = state => new PatternMatcher(/** @type {any} */ (state)) - -/** - * Helper function to generate a (non-exhaustive) sample set from a gives schema. - * - * @type {(o:T,gen:prng.PRNG)=>T} - */ -const _random = /** @type {any} */ (match(/** @type {Schema} */ ($any)) - .if($$number, (_o, gen) => prng.int53(gen, number.MIN_SAFE_INTEGER, number.MAX_SAFE_INTEGER)) - .if($$string, (_o, gen) => prng.word(gen)) - .if($$boolean, (_o, gen) => prng.bool(gen)) - .if($$bigint, (_o, gen) => BigInt(prng.int53(gen, number.MIN_SAFE_INTEGER, number.MAX_SAFE_INTEGER))) - .if($$union, (o, gen) => random(gen, prng.oneOf(gen, o.shape))) - .if($$object, (o, gen) => { - /** - * @type {any} - */ - const res = {} - for (const k in o.shape) { - let prop = o.shape[k] - if ($$optional.check(prop)) { - if (prng.bool(gen)) { continue } - prop = prop.shape - } - res[k] = _random(prop, gen) - } - return res - }) - .if($$array, (o, gen) => { - const arr = [] - const n = prng.int32(gen, 0, 42) - for (let i = 0; i < n; i++) { - arr.push(random(gen, o.shape)) - } - return arr - }) - .if($$literal, (o, gen) => { - return prng.oneOf(gen, o.shape) - }) - .if($$null, (o, gen) => { - return null - }) - .if($$lambda, (o, gen) => { - const res = random(gen, o.res) - return () => res - }) - .if($$any, (o, gen) => random(gen, prng.oneOf(gen, [ - $number, $string, $null, $undefined, $bigint, $boolean, - $array($number), - $record($union('a', 'b', 'c'), $number) - ]))) - .if($$record, (o, gen) => { - /** - * @type {any} - */ - const res = {} - const keysN = prng.int53(gen, 0, 3) - for (let i = 0; i < keysN; i++) { - const key = random(gen, o.shape.keys) - const val = random(gen, o.shape.values) - res[key] = val - } - return res - }) - .done()) - -/** - * @template S - * @param {prng.PRNG} gen - * @param {S} schema - * @return {Unwrap>} - */ -export const random = (gen, schema) => /** @type {any} */ (_random($(schema), gen)) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.test.d.ts deleted file mode 100644 index a6d6d4d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.test.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export function testSchemas(_tc: t.TestCase): void; -export function testSchemaExpect(): void; -export function testObjectSchemaOptionals(_tc: t.TestCase): void; -export function testMetaSchemas(_tc: t.TestCase): void; -export function testStringTemplate(_tc: t.TestCase): void; -export function testSchemaExtends(_tc: t.TestCase): void; -export function testSchemaErrors(_tc: t.TestCase): void; -export function testUnionMerging(_tc: t.TestCase): void; -export function testConvenienceHelper(): void; -export function testPatternMatcherBase(): void; -export function testPatternMatcherWithState(): void; -export function testPatternMatcherBenchmark(): void; -export function testRepeatRandomFromSchema(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=schema.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.test.d.ts.map deleted file mode 100644 index bc8418d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/schema.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schema.test.d.ts","sourceRoot":"","sources":["schema.test.js"],"names":[],"mappings":"AAQO,iCAFI,CAAC,CAAC,QAAQ,QAqPpB;AAEM,yCAMN;AAKM,+CAFI,CAAC,CAAC,QAAQ,QAiBpB;AAKM,qCAFI,CAAC,CAAC,QAAQ,QA0BpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QAmBpB;AAKM,uCAFI,CAAC,CAAC,QAAQ,QAUpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QASpB;AAMM,sCAFI,CAAC,CAAC,QAAQ,QAcpB;AAEM,8CAqBN;AAEM,+CAmBN;AAEM,oDAuBN;AAEM,oDA8IN;AAKM,+CAFI,CAAC,CAAC,QAAQ,QA4BpB;mBAzmBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.d.ts deleted file mode 100644 index 28aff5d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function create(): Set; -export function toArray(set: Set): Array; -export function first(set: Set): T | undefined; -export function from(entries: Iterable): Set; -//# sourceMappingURL=set.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.d.ts.map deleted file mode 100644 index 2553730..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"set.d.ts","sourceRoot":"","sources":["set.js"],"names":[],"mappings":"AAMO,mCAA8B;AAO9B,wBAJM,CAAC,OACH,GAAG,CAAC,CAAC,CAAC,GACL,KAAK,CAAC,CAAC,CAAC,CAEyB;AAOtC,sBAJM,CAAC,OACH,GAAG,CAAC,CAAC,CAAC,GACL,CAAC,GAAC,SAAS,CAE8B;AAO9C,qBAJM,CAAC,WACH,QAAQ,CAAC,CAAC,CAAC,GACV,GAAG,CAAC,CAAC,CAAC,CAE6B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.js deleted file mode 100644 index 95feb73..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Utility module to work with sets. - * - * @module set - */ - -export const create = () => new Set() - -/** - * @template T - * @param {Set} set - * @return {Array} - */ -export const toArray = set => Array.from(set) - -/** - * @template T - * @param {Set} set - * @return {T|undefined} - */ -export const first = set => set.values().next().value - -/** - * @template T - * @param {Iterable} entries - * @return {Set} - */ -export const from = entries => new Set(entries) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.test.d.ts deleted file mode 100644 index 075f0d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testFirst(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=set.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.test.d.ts.map deleted file mode 100644 index fc3f3e8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"set.test.d.ts","sourceRoot":"","sources":["set.test.js"],"names":[],"mappings":"AAMO,+BAFI,CAAC,CAAC,QAAQ,QAUpB;mBAdkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.d.ts deleted file mode 100644 index d364b4a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function _insertionSort(arr: Array, lo: number, hi: number, compare: (arg0: T, arg1: T) => number): void; -export function insertionSort(arr: Array, compare: (arg0: T, arg1: T) => number): void; -export function quicksort(arr: Array, compare: (arg0: T, arg1: T) => number): void; -//# sourceMappingURL=sort.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.d.ts.map deleted file mode 100644 index ccf5aff..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["sort.js"],"names":[],"mappings":"AAkBO,+BANM,CAAC,OACH,KAAK,CAAC,CAAC,CAAC,MACR,MAAM,MACN,MAAM,WACN,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,MAAM,QAU9B;AAQM,8BALM,CAAC,OACH,KAAK,CAAC,CAAC,CAAC,WACR,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,MAAM,GACnB,IAAI,CAIf;AAiDM,0BALM,CAAC,OACH,KAAK,CAAC,CAAC,CAAC,WACR,CAAS,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,KAAE,MAAM,GACnB,IAAI,CAIf"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.js deleted file mode 100644 index 149e318..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Efficient sort implementations. - * - * Note: These sort implementations were created to compare different sorting algorithms in JavaScript. - * Don't use them if you don't know what you are doing. Native Array.sort is almost always a better choice. - * - * @module sort - */ - -import * as math from './math.js' - -/** - * @template T - * @param {Array} arr - * @param {number} lo - * @param {number} hi - * @param {function(T,T):number} compare - */ -export const _insertionSort = (arr, lo, hi, compare) => { - for (let i = lo + 1; i <= hi; i++) { - for (let j = i; j > 0 && compare(arr[j - 1], arr[j]) > 0; j--) { - const tmp = arr[j] - arr[j] = arr[j - 1] - arr[j - 1] = tmp - } - } -} - -/** - * @template T - * @param {Array} arr - * @param {function(T,T):number} compare - * @return {void} - */ -export const insertionSort = (arr, compare) => { - _insertionSort(arr, 0, arr.length - 1, compare) -} - -/** - * @template T - * @param {Array} arr - * @param {number} lo - * @param {number} hi - * @param {function(T,T):number} compare - */ -const _quickSort = (arr, lo, hi, compare) => { - if (hi - lo < 42) { - _insertionSort(arr, lo, hi, compare) - } else { - const pivot = arr[math.floor((lo + hi) / 2)] - let i = lo - let j = hi - while (true) { - while (compare(pivot, arr[i]) > 0) { - i++ - } - while (compare(arr[j], pivot) > 0) { - j-- - } - if (i >= j) { - break - } - // swap arr[i] with arr[j] - // and increment i and j - const arri = arr[i] - arr[i++] = arr[j] - arr[j--] = arri - } - _quickSort(arr, lo, j, compare) - _quickSort(arr, j + 1, hi, compare) - } -} - -/** - * This algorithm beats Array.prototype.sort in Chrome only with arrays with 10 million entries. - * In most cases [].sort will do just fine. Make sure to performance test your use-case before you - * integrate this algorithm. - * - * Note that Chrome's sort is now a stable algorithm (Timsort). Quicksort is not stable. - * - * @template T - * @param {Array} arr - * @param {function(T,T):number} compare - * @return {void} - */ -export const quicksort = (arr, compare) => { - _quickSort(arr, 0, arr.length - 1, compare) -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.test.d.ts deleted file mode 100644 index 11344b1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.test.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function testSortUint8(tc: t.TestCase): void; -export function testSortUint32(tc: t.TestCase): void; -export function testSortUint16(tc: t.TestCase): void; -export function testSortObjectUint32(tc: t.TestCase): void; -export function testListVsArrayPerformance(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=sort.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.test.d.ts.map deleted file mode 100644 index c1340e4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/sort.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.test.d.ts","sourceRoot":"","sources":["sort.test.js"],"names":[],"mappings":"AAoEO,kCAFI,CAAC,CAAC,QAAQ,QAoBpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,QAoBpB;AAKM,mCAFI,CAAC,CAAC,QAAQ,QAoBpB;AAKM,yCAFI,CAAC,CAAC,QAAQ,QAoBpB;AAKM,+CAFI,CAAC,CAAC,QAAQ,QA4BpB;mBAzLkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.d.ts deleted file mode 100644 index 3033ab6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function median(arr: Array): number; -export function average(arr: Array): number; -//# sourceMappingURL=statistics.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.d.ts.map deleted file mode 100644 index b1f583d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["statistics.js"],"names":[],"mappings":"AAYO,4BAHI,KAAK,CAAC,MAAM,CAAC,GACZ,MAAM,CAE2K;AAMtL,6BAHI,KAAK,CAAC,MAAM,CAAC,GACZ,MAAM,CAEgD"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.js deleted file mode 100644 index 64814ac..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Utility helpers for generating statistics. - * - * @module statistics - */ - -import * as math from './math.js' - -/** - * @param {Array} arr Array of values - * @return {number} Returns null if the array is empty - */ -export const median = arr => arr.length === 0 ? NaN : (arr.length % 2 === 1 ? arr[(arr.length - 1) / 2] : (arr[math.floor((arr.length - 1) / 2)] + arr[math.ceil((arr.length - 1) / 2)]) / 2) - -/** - * @param {Array} arr - * @return {number} - */ -export const average = arr => arr.reduce(math.add, 0) / arr.length diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.test.d.ts deleted file mode 100644 index 22230d6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testMedian(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=statistics.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.test.d.ts.map deleted file mode 100644 index c45e6bc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/statistics.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"statistics.test.d.ts","sourceRoot":"","sources":["statistics.test.js"],"names":[],"mappings":"AAOO,+BAFI,CAAC,CAAC,QAAQ,QASpB;mBAbkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.d.ts deleted file mode 100644 index 6c69f2e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This is basically localStorage in browser, or a polyfill in nodejs - */ -export const varStorage: any; -export function onChange(eventHandler: (arg0: { - key: string; - newValue: string; - oldValue: string; -}) => void): true | void; -export function offChange(eventHandler: (arg0: { - key: string; - newValue: string; - oldValue: string; -}) => void): true | void; -//# sourceMappingURL=storage.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.d.ts.map deleted file mode 100644 index 5a3562e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["storage.js"],"names":[],"mappings":"AAiDA;;GAEG;AAEH,6BAAuC;AAShC,uCAJI,CAAS,IAAmD,EAAnD;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,KAAG,IAAI,eAIuC;AAS9G,wCAJI,CAAS,IAAmD,EAAnD;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,KAAG,IAAI,eAI2C"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.js deleted file mode 100644 index 1920ee4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.js +++ /dev/null @@ -1,72 +0,0 @@ -/* eslint-env browser */ - -/** - * Isomorphic variable storage. - * - * Uses LocalStorage in the browser and falls back to in-memory storage. - * - * @module storage - */ - -/* c8 ignore start */ -class VarStoragePolyfill { - constructor () { - this.map = new Map() - } - - /** - * @param {string} key - * @param {any} newValue - */ - setItem (key, newValue) { - this.map.set(key, newValue) - } - - /** - * @param {string} key - */ - getItem (key) { - return this.map.get(key) - } -} -/* c8 ignore stop */ - -/** - * @type {any} - */ -let _localStorage = new VarStoragePolyfill() -let usePolyfill = true - -/* c8 ignore start */ -try { - // if the same-origin rule is violated, accessing localStorage might thrown an error - if (typeof localStorage !== 'undefined' && localStorage) { - _localStorage = localStorage - usePolyfill = false - } -} catch (e) { } -/* c8 ignore stop */ - -/** - * This is basically localStorage in browser, or a polyfill in nodejs - */ -/* c8 ignore next */ -export const varStorage = _localStorage - -/** - * A polyfill for `addEventListener('storage', event => {..})` that does nothing if the polyfill is being used. - * - * @param {function({ key: string, newValue: string, oldValue: string }): void} eventHandler - * @function - */ -/* c8 ignore next */ -export const onChange = eventHandler => usePolyfill || addEventListener('storage', /** @type {any} */ (eventHandler)) - -/** - * A polyfill for `removeEventListener('storage', event => {..})` that does nothing if the polyfill is being used. - * - * @param {function({ key: string, newValue: string, oldValue: string }): void} eventHandler - * @function - */ -/* c8 ignore next */ -export const offChange = eventHandler => usePolyfill || removeEventListener('storage', /** @type {any} */ (eventHandler)) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.test.d.ts deleted file mode 100644 index d87bfa9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testStorageModule(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=storage.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.test.d.ts.map deleted file mode 100644 index baffb8a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"storage.test.d.ts","sourceRoot":"","sources":["storage.test.js"],"names":[],"mappings":"AAMO,sCAFI,CAAC,CAAC,QAAQ,QAapB;mBAhBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.d.ts deleted file mode 100644 index caa0bba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Utility module to work with strings. - * - * @module string - */ -export const fromCharCode: (...codes: number[]) => string; -export const fromCodePoint: (...codePoints: number[]) => string; -/** - * The largest utf16 character. - * Corresponds to Uint8Array([255, 255]) or charcodeof(2x2^8) - */ -export const MAX_UTF16_CHARACTER: string; -export function trimLeft(s: string): string; -export function fromCamelCase(s: string, separator: string): string; -export function utf8ByteLength(str: string): number; -export function _encodeUtf8Polyfill(str: string): Uint8Array; -export const utf8TextEncoder: TextEncoder; -export function _encodeUtf8Native(str: string): Uint8Array; -export function encodeUtf8(str: string): Uint8Array; -export function _decodeUtf8Polyfill(buf: Uint8Array): string; -export let utf8TextDecoder: TextDecoder | null; -export function _decodeUtf8Native(buf: Uint8Array): string; -export function decodeUtf8(buf: Uint8Array): string; -export function splice(str: string, index: number, remove: number, insert?: string): string; -export function repeat(source: string, n: number): string; -export function escapeHTML(str: string): string; -export function unescapeHTML(str: string): string; -//# sourceMappingURL=string.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.d.ts.map deleted file mode 100644 index 106be33..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["string.js"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,0DAA+C;AAC/C,gEAAiD;AAEjD;;;GAGG;AACH,yCAAsD;AAc/C,4BAHI,MAAM,GACL,MAAM,CAEuC;AASlD,iCAJI,MAAM,aACN,MAAM,GACL,MAAM,CAEkH;AAO7H,oCAHI,MAAM,GACL,MAAM,CAE2D;AAMtE,yCAHI,MAAM,GACL,UAAU,CAAC,WAAW,CAAC,CAUlC;AAGD,8BAA0C,WAAW,CAAoE;AAMlH,uCAHI,MAAM,GACL,UAAU,CAAC,WAAW,CAAC,CAEgC;AAjB5D,gCAHI,MAAM,GACL,UAAU,CAAC,WAAW,CAAC,CAUlC;AAsBM,yCAHI,UAAU,GACT,MAAM,CAejB;AAGD,+CAAmI;AAkB5H,uCAHI,UAAU,GACT,MAAM,CAE8E;AAlCzF,gCAHI,UAAU,GACT,MAAM,CAejB;AAoCM,4BALI,MAAM,SACN,MAAM,UACN,MAAM,WACN,MAAM,UAEkG;AAM5G,+BAHI,MAAM,KACN,MAAM,UAE0D;AAOpE,gCAFI,MAAM,UAST;AAOD,kCAFI,MAAM,UAST"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.js deleted file mode 100644 index 22100e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.js +++ /dev/null @@ -1,165 +0,0 @@ -import * as array from './array.js' - -/** - * Utility module to work with strings. - * - * @module string - */ - -export const fromCharCode = String.fromCharCode -export const fromCodePoint = String.fromCodePoint - -/** - * The largest utf16 character. - * Corresponds to Uint8Array([255, 255]) or charcodeof(2x2^8) - */ -export const MAX_UTF16_CHARACTER = fromCharCode(65535) - -/** - * @param {string} s - * @return {string} - */ -const toLowerCase = s => s.toLowerCase() - -const trimLeftRegex = /^\s*/g - -/** - * @param {string} s - * @return {string} - */ -export const trimLeft = s => s.replace(trimLeftRegex, '') - -const fromCamelCaseRegex = /([A-Z])/g - -/** - * @param {string} s - * @param {string} separator - * @return {string} - */ -export const fromCamelCase = (s, separator) => trimLeft(s.replace(fromCamelCaseRegex, match => `${separator}${toLowerCase(match)}`)) - -/** - * Compute the utf8ByteLength - * @param {string} str - * @return {number} - */ -export const utf8ByteLength = str => unescape(encodeURIComponent(str)).length - -/** - * @param {string} str - * @return {Uint8Array} - */ -export const _encodeUtf8Polyfill = str => { - const encodedString = unescape(encodeURIComponent(str)) - const len = encodedString.length - const buf = new Uint8Array(len) - for (let i = 0; i < len; i++) { - buf[i] = /** @type {number} */ (encodedString.codePointAt(i)) - } - return buf -} - -/* c8 ignore next */ -export const utf8TextEncoder = /** @type {TextEncoder} */ (typeof TextEncoder !== 'undefined' ? new TextEncoder() : null) - -/** - * @param {string} str - * @return {Uint8Array} - */ -export const _encodeUtf8Native = str => utf8TextEncoder.encode(str) - -/** - * @param {string} str - * @return {Uint8Array} - */ -/* c8 ignore next */ -export const encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill - -/** - * @param {Uint8Array} buf - * @return {string} - */ -export const _decodeUtf8Polyfill = buf => { - let remainingLen = buf.length - let encodedString = '' - let bufPos = 0 - while (remainingLen > 0) { - const nextLen = remainingLen < 10000 ? remainingLen : 10000 - const bytes = buf.subarray(bufPos, bufPos + nextLen) - bufPos += nextLen - // Starting with ES5.1 we can supply a generic array-like object as arguments - encodedString += String.fromCodePoint.apply(null, /** @type {any} */ (bytes)) - remainingLen -= nextLen - } - return decodeURIComponent(escape(encodedString)) -} - -/* c8 ignore next */ -export let utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }) - -/* c8 ignore start */ -if (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) { - // Safari doesn't handle BOM correctly. - // This fixes a bug in Safari 13.0.5 where it produces a BOM the first time it is called. - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the first call and - // utf8TextDecoder.decode(new Uint8Array()).length === 1 on the second call - // Another issue is that from then on no BOM chars are recognized anymore - /* c8 ignore next */ - utf8TextDecoder = null -} -/* c8 ignore stop */ - -/** - * @param {Uint8Array} buf - * @return {string} - */ -export const _decodeUtf8Native = buf => /** @type {TextDecoder} */ (utf8TextDecoder).decode(buf) - -/** - * @param {Uint8Array} buf - * @return {string} - */ -/* c8 ignore next */ -export const decodeUtf8 = utf8TextDecoder ? _decodeUtf8Native : _decodeUtf8Polyfill - -/** - * @param {string} str The initial string - * @param {number} index Starting position - * @param {number} remove Number of characters to remove - * @param {string} insert New content to insert - */ -export const splice = (str, index, remove, insert = '') => str.slice(0, index) + insert + str.slice(index + remove) - -/** - * @param {string} source - * @param {number} n - */ -export const repeat = (source, n) => array.unfold(n, () => source).join('') - -/** - * Escape HTML characters &,<,>,'," to their respective HTML entities &,<,>,'," - * - * @param {string} str - */ -export const escapeHTML = str => - str.replace(/[&<>'"]/g, r => /** @type {string} */ ({ - '&': '&', - '<': '<', - '>': '>', - "'": ''', - '"': '"' - }[r])) - -/** - * Reverse of `escapeHTML` - * - * @param {string} str - */ -export const unescapeHTML = str => - str.replace(/&|<|>|'|"/g, r => /** @type {string} */ ({ - '&': '&', - '<': '<', - '>': '>', - ''': "'", - '"': '"' - }[r])) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.test.d.ts deleted file mode 100644 index 73972bd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.test.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function testUtilities(_tc: t.TestCase): void; -export function testLowercaseTransformation(_tc: t.TestCase): void; -export function testRepeatStringUtf8Encoding(tc: t.TestCase): void; -export function testRepeatStringUtf8Decoding(tc: t.TestCase): void; -export function testBomEncodingDecoding(_tc: t.TestCase): void; -export function testSplice(_tc: t.TestCase): void; -export function testHtmlEscape(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=string.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.test.d.ts.map deleted file mode 100644 index ad1986e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string.test.d.ts","sourceRoot":"","sources":["string.test.js"],"names":[],"mappings":"AAOO,mCAFI,CAAC,CAAC,QAAQ,QAMpB;AAKM,iDAFI,CAAC,CAAC,QAAQ,QAOpB;AAKM,iDAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,iDAFI,CAAC,CAAC,QAAQ,QAapB;AAKM,6CAFI,CAAC,CAAC,QAAQ,QAYpB;AAKM,gCAFI,CAAC,CAAC,QAAQ,QAMpB;AAKM,oCAFI,CAAC,CAAC,QAAQ,QAYpB;mBA1FkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.d.ts deleted file mode 100644 index 3fce473..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Utility module to work with EcmaScript Symbols. - * - * @module symbol - */ -/** - * Return fresh symbol. - */ -export const create: SymbolConstructor; -export function isSymbol(s: any): boolean; -//# sourceMappingURL=symbol.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.d.ts.map deleted file mode 100644 index 8b7d9c1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["symbol.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,uCAA4B;AAMrB,4BAHI,GAAG,GACF,OAAO,CAE+B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.js deleted file mode 100644 index 31d2ebe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Utility module to work with EcmaScript Symbols. - * - * @module symbol - */ - -/** - * Return fresh symbol. - */ -export const create = Symbol - -/** - * @param {any} s - * @return {boolean} - */ -export const isSymbol = s => typeof s === 'symbol' diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.test.d.ts deleted file mode 100644 index 3a29f01..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testBasicSymbolFeatures(_tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=symbol.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.test.d.ts.map deleted file mode 100644 index d8ebae5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"symbol.test.d.ts","sourceRoot":"","sources":["symbol.test.js"],"names":[],"mappings":"AAMO,6CAFI,CAAC,CAAC,QAAQ,QAQpB;mBAZkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.d.ts deleted file mode 100644 index 9bcc471..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.d.ts.map deleted file mode 100644 index 5019b82..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["test.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.html b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.html deleted file mode 100644 index cd65bfc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Testing lib0 - - - - - - - diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.js deleted file mode 100644 index 6484735..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/test.js +++ /dev/null @@ -1,104 +0,0 @@ -import { runTests } from './testing.js' -import * as array from './array.test.js' -import * as broadcastchannel from './broadcastchannel.test.js' -import * as crypto from './crypto.test.js' -import * as rabin from './hash/rabin.test.js' -import * as sha256 from './hash/sha256.test.js' -import * as logging from './logging.test.js' -import * as string from './string.test.js' -import * as encoding from './encoding.test.js' -import * as diff from './diff.test.js' -import * as patienceDiff from './diff/patience.test.js' -import * as testing from './testing.test.js' -import * as indexeddb from './indexeddb.test.js' -import * as indexeddbV2 from './indexeddbV2.test.js' -import * as prng from './prng.test.js' -import * as log from 'lib0/logging' -import * as statistics from './statistics.test.js' -import * as binary from './binary.test.js' -import * as random from './random.test.js' -import * as promise from './promise.test.js' -import * as queue from './queue.test.js' -import * as map from './map.test.js' -import * as eventloop from './eventloop.test.js' -import * as time from './time.test.js' -import * as pair from './pair.test.js' -import * as object from './object.test.js' -import * as observable from './observable.test.js' -import * as pledge from './pledge.test.js' -import * as math from './math.test.js' -import * as number from './number.test.js' -import * as buffer from './buffer.test.js' -import * as set from './set.test.js' -import * as sort from './sort.test.js' -import * as url from './url.test.js' -import * as metric from './metric.test.js' -import * as func from './function.test.js' -import * as storage from './storage.test.js' -import * as list from './list.test.js' -import * as cache from './cache.test.js' -import * as symbol from './symbol.test.js' -import * as traits from './trait/traits.test.js' -import * as schema from './schema.test.js' -import * as delta from './delta/delta.test.js' -import * as deltaPitch from './delta/delta-pitch.test.js' -// import * as deltaBinding from './delta/binding.test.js' -import * as mutex from './mutex.test.js' -import { isBrowser, isNode } from './environment.js' - -/* c8 ignore next */ -if (isBrowser) { - log.createVConsole(document.body) -} - -runTests({ - array, - broadcastchannel, - crypto, - rabin, - sha256, - logging, - string, - encoding, - diff, - patienceDiff, - testing, - indexeddb, - indexeddbV2, - prng, - statistics, - binary, - random, - promise, - queue, - map, - eventloop, - time, - pair, - object, - observable, - pledge, - math, - number, - buffer, - set, - sort, - url, - metric, - func, - storage, - list, - cache, - symbol, - traits, - schema, - delta, - deltaPitch, - // deltaBinding, - mutex -}).then(success => { - /* c8 ignore next */ - if (isNode) { - process.exit(success ? 0 : 1) - } -}) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.d.ts deleted file mode 100644 index 2ab045a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -export { production } from "./environment.js"; -export const extensive: boolean; -export const envSeed: number | null; -export class TestCase { - /** - * @param {string} moduleName - * @param {string} testName - */ - constructor(moduleName: string, testName: string); - /** - * @type {string} - */ - moduleName: string; - /** - * @type {string} - */ - testName: string; - /** - * This type can store custom information related to the TestCase - * - * @type {Map} - */ - meta: Map; - _seed: number | null; - _prng: prng.PRNG | null; - resetSeed(): void; - /** - * @type {number} - */ - get seed(): number; - /** - * A PRNG for this test case. Use only this PRNG for randomness to make the test case reproducible. - * - * @type {prng.PRNG} - */ - get prng(): prng.PRNG; -} -export const repetitionTime: number; -export function run(moduleName: string, name: string, f: (arg0: TestCase) => void | Promise, i: number, numberOfTests: number): Promise; -export function describe(description: string, info?: string): void; -export function info(info: string): void; -export const printDom: (_createNode: () => Node) => void; -export const printCanvas: (canvas: HTMLCanvasElement, height: number) => void; -export function group(description: string, f: (...args: any[]) => void): void; -export function groupAsync(description: string, f: (...args: any[]) => Promise): Promise; -export function measureTime(message: string, f: (...args: any[]) => void): number; -export function measureTimeAsync(message: string, f: (...args: any[]) => Promise): Promise; -export function compareArrays(as: Array, bs: Array, m?: string): boolean; -export function compareStrings(a: string, b: string, m?: string): void; -export function compareObjects(a: any, b: any, m?: string): void; -export function compare(a: T, b: T, message?: string | null, customCompare?: (arg0: any, arg1: T, arg2: T, arg3: string, arg4: any) => boolean): boolean; -export function assert(property: T, message?: string | null): asserts property is NonNullable; -export function promiseRejected(f: (...args: any[]) => Promise): Promise; -export function fails(f: (...args: any[]) => void): void; -export function failsAsync(f: (...args: any[]) => Promise): Promise; -export function runTests(tests: { - [x: string]: { - [x: string]: (arg0: TestCase) => void | Promise; - }; -}): Promise; -export function fail(reason: string): never; -export function skip(cond?: boolean): void; -import * as prng from './prng.js'; -//# sourceMappingURL=testing.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.d.ts.map deleted file mode 100644 index a492e9d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/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N,MAAM,QAShB;AASM,+BANM,CAAC,EAAC,CAAC,sBAGL,MAAM,QAGiF;AA8H3F,wBANM,CAAC,KACH,CAAC,KACD,CAAC,YACD,MAAM,OAAC,kBACP,CAAS,IAAG,EAAH,GAAG,EAAC,IAAC,EAAD,CAAC,EAAC,IAAC,EAAD,CAAC,EAAC,IAAM,EAAN,MAAM,EAAC,IAAG,EAAH,GAAG,KAAE,OAAO,WAE8E;AAUtH,uBAPM,CAAC,YACH,CAAC,YACD,MAAM,OAAC,GACN,QAAQ,QAAQ,IAAI,WAAW,CAAC,CAAC,CAAC,CAIuF;AAK9H,mCAFI,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,OAAO,CAAC,GAAG,CAAC,iBASvC;AAMM,yBAHI,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,IAAI,QAW/B;AAMM,8BAHI,IAAS,IAAM,EAAH,GAAG,EAAA,KAAE,OAAO,CAAC,GAAG,CAAC,iBAWvC;AAKM;;4BAF2C,QAAQ,KAAE,IAAI,GAAC,OAAO,CAAC,GAAG,CAAC;;qBA2C5E;AAQM,6BAHI,MAAM,SAMhB;AAQM,4BAHI,OAAO,QAOjB;sBA/kBqB,WAAW"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.js deleted file mode 100644 index 893193c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.js +++ /dev/null @@ -1,646 +0,0 @@ -/** - * Testing framework with support for generating tests. - * - * ```js - * // test.js template for creating a test executable - * import { runTests } from 'lib0/testing' - * import * as log from 'lib0/logging' - * import * as mod1 from './mod1.test.js' - * import * as mod2 from './mod2.test.js' - - * import { isBrowser, isNode } from 'lib0/environment.js' - * - * if (isBrowser) { - * // optional: if this is ran in the browser, attach a virtual console to the dom - * log.createVConsole(document.body) - * } - * - * runTests({ - * mod1, - * mod2, - * }).then(success => { - * if (isNode) { - * process.exit(success ? 0 : 1) - * } - * }) - * ``` - * - * ```js - * // mod1.test.js - * /** - * * runTests automatically tests all exported functions that start with "test". - * * The name of the function should be in camelCase and is used for the logging output. - * * - * * @ param {t.TestCase} tc - * *\/ - * export const testMyFirstTest = tc => { - * t.compare({ a: 4 }, { a: 4 }, 'objects are equal') - * } - * ``` - * - * Now you can simply run `node test.js` to run your test or run test.js in the browser. - * - * @module testing - */ - -import * as log from 'lib0/logging' -import { simpleDiffString } from './diff.js' -import * as object from './object.js' -import * as string from './string.js' -import * as math from './math.js' -import * as random from './random.js' -import * as prng from './prng.js' -import * as statistics from './statistics.js' -import * as array from './array.js' -import * as env from './environment.js' -import * as json from './json.js' -import * as time from './time.js' -import * as promise from './promise.js' -import * as performance from 'lib0/performance' -import * as equalityTrait from './trait/equality.js' - -export { production } from './environment.js' -export const extensive = env.hasConf('extensive') - -/* c8 ignore next */ -export const envSeed = env.hasParam('--seed') ? Number.parseInt(env.getParam('--seed', '0')) : null - -export class TestCase { - /** - * @param {string} moduleName - * @param {string} testName - */ - constructor (moduleName, testName) { - /** - * @type {string} - */ - this.moduleName = moduleName - /** - * @type {string} - */ - this.testName = testName - /** - * This type can store custom information related to the TestCase - * - * @type {Map} - */ - this.meta = new Map() - this._seed = null - this._prng = null - } - - resetSeed () { - this._seed = null - this._prng = null - } - - /** - * @type {number} - */ - /* c8 ignore next */ - get seed () { - /* c8 ignore else */ - if (this._seed === null) { - /* c8 ignore next */ - this._seed = envSeed === null ? random.uint32() : envSeed - } - return this._seed - } - - /** - * A PRNG for this test case. Use only this PRNG for randomness to make the test case reproducible. - * - * @type {prng.PRNG} - */ - get prng () { - /* c8 ignore else */ - if (this._prng === null) { - this._prng = prng.create(this.seed) - } - return this._prng - } -} - -export const repetitionTime = Number(env.getParam('--repetition-time', '50')) -/* c8 ignore next */ -const testFilter = env.hasParam('--filter') ? env.getParam('--filter', '') : null - -/* c8 ignore next */ -const testFilterRegExp = testFilter !== null ? new RegExp(testFilter) : /.*/ - -const repeatTestRegex = /^(repeat|repeating)\s/ - -/** - * @param {string} moduleName - * @param {string} name - * @param {function(TestCase):void|Promise} f - * @param {number} i - * @param {number} numberOfTests - */ -export const run = async (moduleName, name, f, i, numberOfTests) => { - const uncamelized = string.fromCamelCase(name.slice(4), ' ') - const filtered = !testFilterRegExp.test(`[${i + 1}/${numberOfTests}] ${moduleName}: ${uncamelized}`) - /* c8 ignore next 3 */ - if (filtered) { - return true - } - const tc = new TestCase(moduleName, name) - const repeat = repeatTestRegex.test(uncamelized) - const groupArgs = [log.GREY, `[${i + 1}/${numberOfTests}] `, log.PURPLE, `${moduleName}: `, log.BLUE, uncamelized] - /* c8 ignore next 5 */ - if (testFilter === null) { - log.groupCollapsed(...groupArgs) - } else { - log.group(...groupArgs) - } - const times = [] - const start = performance.now() - let lastTime = start - /** - * @type {any} - */ - let err = null - performance.mark(`${name}-start`) - do { - try { - const p = f(tc) - if (promise.isPromise(p)) { - await p - } - } catch (_err) { - err = _err - } - const currTime = performance.now() - times.push(currTime - lastTime) - lastTime = currTime - if (repeat && err === null && (lastTime - start) < repetitionTime) { - tc.resetSeed() - } else { - break - } - } while (err === null && (lastTime - start) < repetitionTime) - performance.mark(`${name}-end`) - /* c8 ignore next 3 */ - if (err !== null && err.constructor !== SkipError) { - log.printError(err) - } - performance.measure(name, `${name}-start`, `${name}-end`) - log.groupEnd() - const duration = lastTime - start - let success = true - times.sort((a, b) => a - b) - /* c8 ignore next 3 */ - const againMessage = env.isBrowser - ? ` - ${window.location.host + window.location.pathname}?filter=\\[${i + 1}/${tc._seed === null ? '' : `&seed=${tc._seed}`}` - : `\nrepeat: npm run test -- --filter "\\[${i + 1}/" ${tc._seed === null ? '' : `--seed ${tc._seed}`}` - const timeInfo = (repeat && err === null) - ? ` - ${times.length} repetitions in ${time.humanizeDuration(duration)} (best: ${time.humanizeDuration(times[0])}, worst: ${time.humanizeDuration(array.last(times))}, median: ${time.humanizeDuration(statistics.median(times))}, average: ${time.humanizeDuration(statistics.average(times))})` - : ` in ${time.humanizeDuration(duration)}` - if (err !== null) { - /* c8 ignore start */ - if (err.constructor === SkipError) { - log.print(log.GREY, log.BOLD, 'Skipped: ', log.UNBOLD, uncamelized) - } else { - success = false - log.print(log.RED, log.BOLD, 'Failure: ', log.UNBOLD, log.UNCOLOR, uncamelized, log.GREY, timeInfo, againMessage) - } - /* c8 ignore stop */ - } else { - log.print(log.GREEN, log.BOLD, 'Success: ', log.UNBOLD, log.UNCOLOR, uncamelized, log.GREY, timeInfo, againMessage) - } - return success -} - -/** - * Describe what you are currently testing. The message will be logged. - * - * ```js - * export const testMyFirstTest = tc => { - * t.describe('crunching numbers', 'already crunched 4 numbers!') // the optional second argument can describe the state. - * } - * ``` - * - * @param {string} description - * @param {string} info - */ -export const describe = (description, info = '') => log.print(log.BLUE, description, ' ', log.GREY, info) - -/** - * Describe the state of the current computation. - * ```js - * export const testMyFirstTest = tc => { - * t.info(already crunched 4 numbers!') // the optional second argument can describe the state. - * } - * ``` - * - * @param {string} info - */ -export const info = info => describe('', info) - -export const printDom = log.printDom - -export const printCanvas = log.printCanvas - -/** - * Group outputs in a collapsible category. - * - * ```js - * export const testMyFirstTest = tc => { - * t.group('subtest 1', () => { - * t.describe('this message is part of a collapsible section') - * }) - * await t.groupAsync('subtest async 2', async () => { - * await someaction() - * t.describe('this message is part of a collapsible section') - * }) - * } - * ``` - * - * @param {string} description - * @param {function(...any):void} f - */ -export const group = (description, f) => { - log.group(log.BLUE, description) - try { - f() - } finally { - log.groupEnd() - } -} - -/** - * Group outputs in a collapsible category. - * - * ```js - * export const testMyFirstTest = async tc => { - * t.group('subtest 1', () => { - * t.describe('this message is part of a collapsible section') - * }) - * await t.groupAsync('subtest async 2', async () => { - * await someaction() - * t.describe('this message is part of a collapsible section') - * }) - * } - * ``` - * - * @param {string} description - * @param {function(...any):Promise} f - */ -export const groupAsync = async (description, f) => { - log.group(log.BLUE, description) - try { - await f() - } finally { - log.groupEnd() - } -} - -/** - * Measure the time that it takes to calculate something. - * - * ```js - * export const testMyFirstTest = async tc => { - * t.measureTime('measurement', () => { - * heavyCalculation() - * }) - * await t.groupAsync('async measurement', async () => { - * await heavyAsyncCalculation() - * }) - * } - * ``` - * - * @param {string} message - * @param {function(...any):void} f - * @return {number} Returns a promise that resolves the measured duration to apply f - */ -export const measureTime = (message, f) => { - let duration - const start = performance.now() - try { - f() - } finally { - duration = performance.now() - start - log.print(log.PURPLE, message, log.GREY, ` ${time.humanizeDuration(duration)}`) - } - return duration -} - -/** - * Measure the time that it takes to calculate something. - * - * ```js - * export const testMyFirstTest = async tc => { - * t.measureTimeAsync('measurement', async () => { - * await heavyCalculation() - * }) - * await t.groupAsync('async measurement', async () => { - * await heavyAsyncCalculation() - * }) - * } - * ``` - * - * @param {string} message - * @param {function(...any):Promise} f - * @return {Promise} Returns a promise that resolves the measured duration to apply f - */ -export const measureTimeAsync = async (message, f) => { - let duration - const start = performance.now() - try { - await f() - } finally { - duration = performance.now() - start - log.print(log.PURPLE, message, log.GREY, ` ${time.humanizeDuration(duration)}`) - } - return duration -} - -/** - * @template T - * @param {Array} as - * @param {Array} bs - * @param {string} [m] - * @return {boolean} - */ -export const compareArrays = (as, bs, m = 'Arrays match') => { - if (as.length !== bs.length) { - fail(m) - } - for (let i = 0; i < as.length; i++) { - if (as[i] !== bs[i]) { - fail(m) - } - } - return true -} - -/** - * @param {string} a - * @param {string} b - * @param {string} [m] - * @throws {TestError} Throws if tests fails - */ -export const compareStrings = (a, b, m = 'Strings match') => { - if (a !== b) { - const diff = simpleDiffString(a, b) - log.print(log.GREY, a.slice(0, diff.index), log.RED, a.slice(diff.index, diff.remove), log.GREEN, diff.insert, log.GREY, a.slice(diff.index + diff.remove)) - fail(m) - } -} - -/** - * @template K,V - * @param {Object} a - * @param {Object} b - * @param {string} [m] - * @throws {TestError} Throws if test fails - */ -export const compareObjects = (a, b, m = 'Objects match') => { object.equalFlat(a, b) || fail(m) } - -/** - * @param {any} _constructor - * @param {any} a - * @param {any} b - * @param {string} path - * @throws {TestError} - */ -const compareValues = (_constructor, a, b, path) => { - if (a !== b) { - fail(`Values ${json.stringify(a)} and ${json.stringify(b)} don't match (${path})`) - } - return true -} - -/** - * @param {string?} message - * @param {string} reason - * @param {string} path - * @throws {TestError} - */ -const _failMessage = (message, reason, path) => fail( - message === null - ? `${reason} ${path}` - : `${message} (${reason}) ${path}` -) - -/** - * @param {any} a - * @param {any} b - * @param {string} path - * @param {string?} message - * @param {function(any,any,any,string,any):boolean} customCompare - */ -const _compare = (a, b, path, message, customCompare) => { - // we don't use assert here because we want to test all branches (istanbul errors if one branch is not tested) - if (a == null || b == null) { - return compareValues(null, a, b, path) - } - if (a[equalityTrait.EqualityTraitSymbol] != null) { - if (a[equalityTrait.EqualityTraitSymbol](b)) { - return true - } else { - _failMessage(message, 'Not equal by equality trait', path) - } - } - if (a.constructor !== b.constructor) { - _failMessage(message, 'Constructors don\'t match', path) - } - let success = true - switch (a.constructor) { - case ArrayBuffer: - a = new Uint8Array(a) - b = new Uint8Array(b) - // eslint-disable-next-line no-fallthrough - case Uint8Array: { - if (a.byteLength !== b.byteLength) { - _failMessage(message, 'ArrayBuffer lengths match', path) - } - for (let i = 0; success && i < a.length; i++) { - success = success && a[i] === b[i] - } - break - } - case Set: { - if (a.size !== b.size) { - _failMessage(message, 'Sets have different number of attributes', path) - } - // @ts-ignore - a.forEach(value => { - if (!b.has(value)) { - _failMessage(message, `b.${path} does have ${value}`, path) - } - }) - break - } - case Map: { - if (a.size !== b.size) { - _failMessage(message, 'Maps have different number of attributes', path) - } - // @ts-ignore - a.forEach((value, key) => { - if (!b.has(key)) { - _failMessage(message, `Property ${path}["${key}"] does not exist on second argument`, path) - } - _compare(value, b.get(key), `${path}["${key}"]`, message, customCompare) - }) - break - } - case undefined: // undefined is often set as a constructor for objects - case Object: - if (object.length(a) !== object.length(b)) { - _failMessage(message, 'Objects have a different number of attributes', path) - } - object.forEach(a, (value, key) => { - if (!object.hasProperty(b, key)) { - _failMessage(message, `Property ${path} does not exist on second argument`, path) - } - _compare(value, b[key], `${path}["${key}"]`, message, customCompare) - }) - break - case Array: - if (a.length !== b.length) { - _failMessage(message, 'Arrays have a different number of attributes', path) - } - // @ts-ignore - a.forEach((value, i) => _compare(value, b[i], `${path}[${i}]`, message, customCompare)) - break - /* c8 ignore next 4 */ - default: - if (!customCompare(a.constructor, a, b, path, compareValues)) { - _failMessage(message, `Values ${json.stringify(a)} and ${json.stringify(b)} don't match`, path) - } - } - assert(success, message) - return true -} - -/** - * @template T - * @param {T} a - * @param {T} b - * @param {string?} [message] - * @param {function(any,T,T,string,any):boolean} [customCompare] - */ -export const compare = (a, b, message = null, customCompare = compareValues) => _compare(a, b, 'obj', message, customCompare) - -/** - * @template T - * @param {T} property - * @param {string?} [message] - * @return {asserts property is NonNullable} - * @throws {TestError} - */ -/* c8 ignore next */ -export const assert = (property, message = null) => { property || fail(`Assertion failed${message !== null ? `: ${message}` : ''}`) } - -/** - * @param {function(...any):Promise} f - */ -export const promiseRejected = async f => { - try { - await f() - } catch (err) { - return - } - fail('Expected promise to fail') -} - -/** - * @param {function(...any):void} f - * @throws {TestError} - */ -export const fails = f => { - try { - f() - } catch (_err) { - log.print(log.GREEN, '⇖ This Error was expected') - return - } - fail('Expected this to fail') -} - -/** - * @param {function(...any):Promise} f - * @throws {TestError} - */ -export const failsAsync = async f => { - try { - await f() - } catch (_err) { - log.print(log.GREEN, '⇖ This Error was expected') - return - } - fail('Expected this to fail') -} - -/** - * @param {Object>>} tests - */ -export const runTests = async tests => { - /** - * @param {string} testname - */ - const filterTest = testname => testname.startsWith('test') || testname.startsWith('benchmark') - const numberOfTests = object.map(tests, mod => object.map(mod, (f, fname) => /* c8 ignore next */ f && filterTest(fname) ? 1 : 0).reduce(math.add, 0)).reduce(math.add, 0) - let successfulTests = 0 - let testnumber = 0 - const start = performance.now() - for (const modName in tests) { - const mod = tests[modName] - for (const fname in mod) { - const f = mod[fname] - /* c8 ignore else */ - if (f && filterTest(fname)) { - const repeatEachTest = 1 - let success = true - for (let i = 0; success && i < repeatEachTest; i++) { - success = await run(modName, fname, f, testnumber, numberOfTests) - } - testnumber++ - /* c8 ignore else */ - if (success) { - successfulTests++ - } - } - } - } - const end = performance.now() - log.print('') - const success = successfulTests === numberOfTests - /* c8 ignore start */ - if (success) { - log.print(log.GREEN, log.BOLD, 'All tests successful!', log.GREY, log.UNBOLD, ` in ${time.humanizeDuration(end - start)}`) - log.printImgBase64(nyanCatImage, 50) - } else { - const failedTests = numberOfTests - successfulTests - log.print(log.RED, log.BOLD, `> ${failedTests} test${failedTests > 1 ? 's' : ''} failed`) - } - /* c8 ignore stop */ - return success -} - -class TestError extends Error {} - -/** - * @param {string} reason - * @throws {TestError} - */ -export const fail = reason => { - log.print(log.RED, log.BOLD, 'X ', log.UNBOLD, reason) - throw new TestError('Test Failed') -} - -class SkipError extends Error {} - -/** - * @param {boolean} cond If true, this tests will be skipped - * @throws {SkipError} - */ -export const skip = (cond = true) => { - if (cond) { - throw new SkipError('skipping..') - } -} - -// eslint-disable-next-line -const nyanCatImage = 'R0lGODlhjABMAPcAAMiSE0xMTEzMzUKJzjQ0NFsoKPc7//FM/9mH/z9x0HIiIoKCgmBHN+frGSkZLdDQ0LCwsDk71g0KCUzDdrQQEOFz/8yYdelmBdTiHFxcXDU2erR/mLrTHCgoKK5szBQUFNgSCTk6ymfpCB9VZS2Bl+cGBt2N8kWm0uDcGXhZRUvGq94NCFPhDiwsLGVlZTgqIPMDA1g3aEzS5D6xAURERDtG9JmBjJsZGWs2AD1W6Hp6eswyDeJ4CFNTU1LcEoJRmTMzSd14CTg5ser2GmDzBd17/xkZGUzMvoSMDiEhIfKruCwNAJaWlvRzA8kNDXDrCfi0pe1U/+GS6SZrAB4eHpZwVhoabsx9oiYmJt/TGHFxcYyMjOid0+Zl/0rF6j09PeRr/0zU9DxO6j+z0lXtBtp8qJhMAEssLGhoaPL/GVn/AAsWJ/9/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4AgE6hBA/+GEQ2AgiNvy84EMfekGI2BhEEf1QAyQuEYhCJGIRjyhEJRaxiUJ8IhKlaEQkWtGHWAyiFqO4RC/UIIUl2s4H9PAlw+lrBPHQQ4UCtDU7vJEgbsijHvfIxz768Y+ADKQgB0lIQGJjDdvZjkBstJ3EHCSRRLLRHQnCiEoSJAKVrOQcCCKGTDIiApTMpBgIMgdPbnIgncxkQTw5yoGUMpOnFEgqLRnKSrZSIK/U5Ag+kLjEDaSXCQGmQHzJpWIasyV3OaYyl8nMZi7nLsl0ZkagKc1qWvOa2JxLNLPJzW6+ZZvevAhdwrkStJCTI2gZ5zknos51shOc7oynPOdJz3ra857hDAgAOw==' diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.test.d.ts deleted file mode 100644 index 9007956..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.test.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function nottestingNotTested(): void; -export function testAssertTyping(): void; -export function testComparing(_tc: t.TestCase): void; -export function testFailing(): Promise; -export function testSkipping(): void; -export function testAsync(): Promise; -export function testRepeatRepetition(): void; -import * as t from './testing.js'; -//# sourceMappingURL=testing.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.test.d.ts.map deleted file mode 100644 index 2840cd3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/testing.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"testing.test.d.ts","sourceRoot":"","sources":["testing.test.js"],"names":[],"mappings":"AAQO,4CAEN;AAEM,yCAMN;AAKM,mCAFI,CAAC,CAAC,QAAQ,QAqGpB;AAEM,6CAcN;AAEM,qCAMN;AAEM,2CAIN;AAEM,6CAON;mBAjKkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.d.ts deleted file mode 100644 index 5ee1371..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function getDate(): Date; -/** - * Return current unix time. - * - * @return {number} - */ -export const getUnixTime: () => number; -export function humanizeDuration(d: number): string; -//# sourceMappingURL=time.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.d.ts.map deleted file mode 100644 index 15c07c2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.js"],"names":[],"mappings":"AAcO,2BAFK,IAAI,CAEuB;AAEvC;;;;GAIG;AACH,uCAAmC;AAQ5B,oCAHI,MAAM,GACL,MAAM,CAoBjB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.js deleted file mode 100644 index 07965c6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Utility module to work with time. - * - * @module time - */ - -import * as metric from './metric.js' -import * as math from './math.js' - -/** - * Return current time. - * - * @return {Date} - */ -export const getDate = () => new Date() - -/** - * Return current unix time. - * - * @return {number} - */ -export const getUnixTime = Date.now - -/** - * Transform time (in ms) to a human readable format. E.g. 1100 => 1.1s. 60s => 1min. .001 => 10μs. - * - * @param {number} d duration in milliseconds - * @return {string} humanized approximation of time - */ -export const humanizeDuration = d => { - if (d < 60000) { - const p = metric.prefix(d, -1) - return math.round(p.n * 100) / 100 + p.prefix + 's' - } - d = math.floor(d / 1000) - const seconds = d % 60 - const minutes = math.floor(d / 60) % 60 - const hours = math.floor(d / 3600) % 24 - const days = math.floor(d / 86400) - if (days > 0) { - return days + 'd' + ((hours > 0 || minutes > 30) ? ' ' + (minutes > 30 ? hours + 1 : hours) + 'h' : '') - } - if (hours > 0) { - /* c8 ignore next */ - return hours + 'h' + ((minutes > 0 || seconds > 30) ? ' ' + (seconds > 30 ? minutes + 1 : minutes) + 'min' : '') - } - return minutes + 'min' + (seconds > 0 ? ' ' + seconds + 's' : '') -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.test.d.ts deleted file mode 100644 index 614187b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.test.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function testTime(tc: t.TestCase): void; -export function testHumanDuration(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=time.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.test.d.ts.map deleted file mode 100644 index 273a868..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"time.test.d.ts","sourceRoot":"","sources":["time.test.js"],"names":[],"mappings":"AAOO,6BAFI,CAAC,CAAC,QAAQ,QAMpB;AAKM,sCAFI,CAAC,CAAC,QAAQ,QAmBpB;mBAhCkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.d.ts deleted file mode 100644 index 1848ba1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const EqualityTraitSymbol: unique symbol; -export function equals(a: NoInfer, b: T): boolean; -export type EqualityTrait = { - [EqualityTraitSymbol]: (other: EqualityTrait) => boolean; -}; -//# sourceMappingURL=equality.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.d.ts.map deleted file mode 100644 index 81b3991..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"equality.d.ts","sourceRoot":"","sources":["equality.js"],"names":[],"mappings":"AAAA,gDAAqD;AAyB9C,uBALsB,CAAC,SAAhB,aAAc,KACjB,OAAO,CAAC,CAAC,CAAC,KACV,CAAC,GACA,OAAO,CAEgE;4BAtBtE;IAAE,CAAC,mBAAmB,CAAC,EAAC,CAAC,KAAK,EAAC,aAAa,KAAG,OAAO,CAAA;CAAE"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.js deleted file mode 100644 index dfe7214..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.js +++ /dev/null @@ -1,26 +0,0 @@ -export const EqualityTraitSymbol = Symbol('Equality') - -/** - * @typedef {{ [EqualityTraitSymbol]:(other:EqualityTrait)=>boolean }} EqualityTrait - */ - -/** - * - * Utility function to compare any two objects. - * - * Note that it is expected that the first parameter is more specific than the latter one. - * - * @example js - * class X { [traits.EqualityTraitSymbol] (other) { return other === this } } - * class X2 { [traits.EqualityTraitSymbol] (other) { return other === this }, x2 () { return 2 } } - * // this is fine - * traits.equals(new X2(), new X()) - * // this is not, because the left type is less specific than the right one - * traits.equals(new X(), new X2()) - * - * @template {EqualityTrait} T - * @param {NoInfer} a - * @param {T} b - * @return {boolean} - */ -export const equals = (a, b) => a === b || !!a?.[EqualityTraitSymbol]?.(b) || false diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.d.ts deleted file mode 100644 index 1a31d75..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const FingerprintTraitSymbol: unique symbol; -export function fingerprint(a: Fingerprintable): string; -/** - * When implementing this trait, it is recommended to write some sort of "magic number" first to - * ensure that different types of objects don't have the same fingerprint. - * - * The recommended pracice is to generate a random u32 number as your magic number. e.g. using - * `console.log(random.uint32().toString(16))` - */ -export type Fingerprintable = { - [FingerprintTraitSymbol]: () => string; -} | import("../encoding.js").AnyEncodable; -//# sourceMappingURL=fingerprint.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.d.ts.map deleted file mode 100644 index a1b6941..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["fingerprint.js"],"names":[],"mappings":"AAIA,mDAA2D;AAgBpD,+BAHI,eAAe,GACd,MAAM,CAE6P;;;;;;;;8BAPlQ;IAAE,CAAC,sBAAsB,CAAC,EAAC,MAAI,MAAM,CAAA;CAAE,GAAG,OAAO,gBAAgB,EAAE,YAAY"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.js deleted file mode 100644 index a12b327..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/fingerprint.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as encoding from '../encoding.js' -import * as rabin from '../hash/rabin.js' -import * as buffer from '../buffer.js' - -export const FingerprintTraitSymbol = Symbol('Fingerprint') - -/** - * When implementing this trait, it is recommended to write some sort of "magic number" first to - * ensure that different types of objects don't have the same fingerprint. - * - * The recommended pracice is to generate a random u32 number as your magic number. e.g. using - * `console.log(random.uint32().toString(16))` - * - * @typedef {{ [FingerprintTraitSymbol]:()=>string } | import('../encoding.js').AnyEncodable} Fingerprintable - */ - -/** - * @param {Fingerprintable} a - * @return {string} - */ -export const fingerprint = a => (a != null && /** @type {any} */ (a)[FingerprintTraitSymbol]?.()) || buffer.toBase64(rabin.fingerprint(rabin.StandardIrreducible128, encoding.encode(encoder => { encoding.writeUint32(encoder, 0x8de1c475); encoding.writeAny(encoder, a) }))) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.d.ts deleted file mode 100644 index e0084f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./equality.js"; -export * from "./fingerprint.js"; -//# sourceMappingURL=traits.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.d.ts.map deleted file mode 100644 index b52843a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traits.d.ts","sourceRoot":"","sources":["traits.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.js deleted file mode 100644 index 67ea73f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from './equality.js' -export * from './fingerprint.js' diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.test.d.ts deleted file mode 100644 index ac3f802..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.test.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function testEqualityTrait1(_tc: t.TestCase): void; -export function testEqualityTrait2(_tc: t.TestCase): void; -export function testFingerprintTrait(): void; -import * as t from '../testing.js'; -//# sourceMappingURL=traits.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.test.d.ts.map deleted file mode 100644 index b342be7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/traits.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traits.test.d.ts","sourceRoot":"","sources":["traits.test.js"],"names":[],"mappings":"AAQO,wCAFI,CAAC,CAAC,QAAQ,QAwCpB;AAKM,wCAFI,CAAC,CAAC,QAAQ,QA2BpB;AAEM,6CAMN;mBApFkB,eAAe"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.d.ts deleted file mode 100644 index 915e4ec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This is a Red Black Tree implementation - * - * @template K,V - */ -export class Tree { - root: any; - length: number; - /** - * @param {K} id - */ - findNext(id: K): V; - /** - * @param {K} id - */ - findPrev(id: K): V; - /** - * @param {K} from - */ - findNodeWithLowerBound(from: K): any; - /** - * @param {K} to - */ - findNodeWithUpperBound(to: K): any; - /** - * @return {V} - */ - findSmallestNode(): V; - /** - * @param {K} from - * @return {V} - */ - findWithLowerBound(from: K): V; - /** - * @param {K} to - * @return {V} - */ - findWithUpperBound(to: K): V; - /** - * @param {K} from - * @param {V} from - * @param {function(V):void} f - */ - iterate(from: K, to: any, f: (arg0: V) => void): void; - /** - * @param {K} id - * @return {V|null} - */ - find(id: K): V | null; - /** - * @param {K} id - * @return {N|null} - */ - findNode(id: K): N | null; - /** - * @param {K} id - */ - delete(id: K): void; - _fixDelete(n: any): void; - put(v: any): any; - _fixInsert(n: any): void; -} -/** - * @template V - */ -declare class N { - /** - * A created node is always red! - * - * @param {V} val - */ - constructor(val: V); - val: V; - color: boolean; - _left: any; - _right: any; - _parent: any; - isRed(): boolean; - isBlack(): boolean; - redden(): this; - blacken(): this; - get grandparent(): any; - get parent(): any; - get sibling(): any; - set left(n: any); - get left(): any; - set right(n: any); - get right(): any; - rotateLeft(tree: any): void; - next(): any; - prev(): any; - rotateRight(tree: any): void; - getUncle(): any; -} -export {}; -//# sourceMappingURL=tree.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.d.ts.map deleted file mode 100644 index cedcef5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["tree.js"],"names":[],"mappings":"AAiJA;;;;GAIG;AACH,kBAFa,CAAC,EAAC,CAAC;IAIZ,UAAgB;IAChB,eAAe;IAGjB;;OAEG;IACH,aAFW,CAAC,KAMX;IAED;;OAEG;IACH,aAFW,CAAC,KAMX;IAED;;OAEG;IACH,6BAFW,CAAC,OA0BX;IAED;;OAEG;IACH,2BAFW,CAAC,OA6BX;IAED;;OAEG;IACH,oBAFY,CAAC,CAQZ;IAED;;;OAGG;IACH,yBAHW,CAAC,GACA,CAAC,CAKZ;IAED;;;OAGG;IACH,uBAHW,CAAC,GACA,CAAC,CAKZ;IAED;;;;OAIG;IACH,cAJW,CAAC,cAED,CAAS,IAAC,EAAD,CAAC,KAAE,IAAI,QAoB1B;IAED;;;OAGG;IACH,SAHW,CAAC,GACA,CAAC,GAAC,IAAI,CASjB;IAED;;;OAGG;IACH,aAHW,CAAC,GACA,CAAC,CAAC,CAAC,CAAC,GAAC,IAAI,CAoBpB;IAED;;OAEG;IACH,WAFW,CAAC,QAmEX;IAED,yBAmEC;IAED,iBA+BC;IAED,yBA8CC;CACF;AA7gBD;;GAEG;AACH,gBAFa,CAAC;IAGZ;;;;OAIG;IACH,iBAFW,CAAC,EAQX;IALC,OAAc;IACd,eAAiB;IACjB,WAAiB;IACjB,YAAkB;IAClB,aAAmB;IAGrB,iBAA8B;IAC9B,mBAAiC;IACjC,eAA4C;IAC5C,gBAA8C;IAC9C,uBAEC;IAED,kBAEC;IAED,mBAIC;IAUD,iBAKC;IAbD,gBAEC;IAaD,kBAKC;IAhBD,iBAEC;IAgBD,4BAOC;IAED,YAeC;IAED,YAeC;IAED,6BAOC;IAED,gBAOC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.js deleted file mode 100644 index 330aada..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.js +++ /dev/null @@ -1,546 +0,0 @@ -/** - * Red-black-tree implementation. - * - * @module tree - */ -// @ts-nocheck TODO: remove or refactor this file - -const rotate = (tree, parent, newParent, n) => { - if (parent === null) { - tree.root = newParent - newParent._parent = null - } else if (parent.left === n) { - parent.left = newParent - } else if (parent.right === n) { - parent.right = newParent - } else { - throw new Error('The elements are wrongly connected!') - } -} - -/** - * @template V - */ -class N { - /** - * A created node is always red! - * - * @param {V} val - */ - constructor (val) { - this.val = val - this.color = true - this._left = null - this._right = null - this._parent = null - } - - isRed () { return this.color } - isBlack () { return !this.color } - redden () { this.color = true; return this } - blacken () { this.color = false; return this } - get grandparent () { - return this.parent.parent - } - - get parent () { - return this._parent - } - - get sibling () { - return (this === this.parent.left) - ? this.parent.right - : this.parent.left - } - - get left () { - return this._left - } - - get right () { - return this._right - } - - set left (n) { - if (n !== null) { - n._parent = this - } - this._left = n - } - - set right (n) { - if (n !== null) { - n._parent = this - } - this._right = n - } - - rotateLeft (tree) { - const parent = this.parent - const newParent = this.right - const newRight = this.right.left - newParent.left = this - this.right = newRight - rotate(tree, parent, newParent, this) - } - - next () { - if (this.right !== null) { - // search the most left node in the right tree - let o = this.right - while (o.left !== null) { - o = o.left - } - return o - } else { - let p = this - while (p.parent !== null && p !== p.parent.left) { - p = p.parent - } - return p.parent - } - } - - prev () { - if (this.left !== null) { - // search the most right node in the left tree - let o = this.left - while (o.right !== null) { - o = o.right - } - return o - } else { - let p = this - while (p.parent !== null && p !== p.parent.right) { - p = p.parent - } - return p.parent - } - } - - rotateRight (tree) { - const parent = this.parent - const newParent = this.left - const newLeft = this.left.right - newParent.right = this - this.left = newLeft - rotate(tree, parent, newParent, this) - } - - getUncle () { - // we can assume that grandparent exists when this is called! - if (this.parent === this.parent.parent.left) { - return this.parent.parent.right - } else { - return this.parent.parent.left - } - } -} - -const isBlack = node => - node !== null ? node.isBlack() : true - -const isRed = (node) => - node !== null ? node.isRed() : false - -/** - * This is a Red Black Tree implementation - * - * @template K,V - */ -export class Tree { - constructor () { - this.root = null - this.length = 0 - } - - /** - * @param {K} id - */ - findNext (id) { - const nextID = id.clone() - nextID.clock += 1 - return this.findWithLowerBound(nextID) - } - - /** - * @param {K} id - */ - findPrev (id) { - const prevID = id.clone() - prevID.clock -= 1 - return this.findWithUpperBound(prevID) - } - - /** - * @param {K} from - */ - findNodeWithLowerBound (from) { - let o = this.root - if (o === null) { - return null - } else { - while (true) { - if (from === null || (from.lessThan(o.val._id) && o.left !== null)) { - // o is included in the bound - // try to find an element that is closer to the bound - o = o.left - } else if (from !== null && o.val._id.lessThan(from)) { - // o is not within the bound, maybe one of the right elements is.. - if (o.right !== null) { - o = o.right - } else { - // there is no right element. Search for the next bigger element, - // this should be within the bounds - return o.next() - } - } else { - return o - } - } - } - } - - /** - * @param {K} to - */ - findNodeWithUpperBound (to) { - if (to === undefined) { - throw new Error('You must define from!') - } - let o = this.root - if (o === null) { - return null - } else { - while (true) { - if ((to === null || o.val._id.lessThan(to)) && o.right !== null) { - // o is included in the bound - // try to find an element that is closer to the bound - o = o.right - } else if (to !== null && to.lessThan(o.val._id)) { - // o is not within the bound, maybe one of the left elements is.. - if (o.left !== null) { - o = o.left - } else { - // there is no left element. Search for the prev smaller element, - // this should be within the bounds - return o.prev() - } - } else { - return o - } - } - } - } - - /** - * @return {V} - */ - findSmallestNode () { - let o = this.root - while (o != null && o.left != null) { - o = o.left - } - return o - } - - /** - * @param {K} from - * @return {V} - */ - findWithLowerBound (from) { - const n = this.findNodeWithLowerBound(from) - return n == null ? null : n.val - } - - /** - * @param {K} to - * @return {V} - */ - findWithUpperBound (to) { - const n = this.findNodeWithUpperBound(to) - return n == null ? null : n.val - } - - /** - * @param {K} from - * @param {V} from - * @param {function(V):void} f - */ - iterate (from, to, f) { - let o - if (from === null) { - o = this.findSmallestNode() - } else { - o = this.findNodeWithLowerBound(from) - } - while ( - o !== null && - ( - to === null || // eslint-disable-line no-unmodified-loop-condition - o.val._id.lessThan(to) || - o.val._id.equals(to) - ) - ) { - f(o.val) - o = o.next() - } - } - - /** - * @param {K} id - * @return {V|null} - */ - find (id) { - const n = this.findNode(id) - if (n !== null) { - return n.val - } else { - return null - } - } - - /** - * @param {K} id - * @return {N|null} - */ - findNode (id) { - let o = this.root - if (o === null) { - return null - } else { - while (true) { - if (o === null) { - return null - } - if (id.lessThan(o.val._id)) { - o = o.left - } else if (o.val._id.lessThan(id)) { - o = o.right - } else { - return o - } - } - } - } - - /** - * @param {K} id - */ - delete (id) { - let d = this.findNode(id) - if (d == null) { - // throw new Error('Element does not exist!') - return - } - this.length-- - if (d.left !== null && d.right !== null) { - // switch d with the greates element in the left subtree. - // o should have at most one child. - let o = d.left - // find - while (o.right !== null) { - o = o.right - } - // switch - d.val = o.val - d = o - } - // d has at most one child - // let n be the node that replaces d - let isFakeChild - let child = d.left || d.right - if (child === null) { - isFakeChild = true - child = new N(null) - child.blacken() - d.right = child - } else { - isFakeChild = false - } - - if (d.parent === null) { - if (!isFakeChild) { - this.root = child - child.blacken() - child._parent = null - } else { - this.root = null - } - return - } else if (d.parent.left === d) { - d.parent.left = child - } else if (d.parent.right === d) { - d.parent.right = child - } else { - throw new Error('Impossible!') - } - if (d.isBlack()) { - if (child.isRed()) { - child.blacken() - } else { - this._fixDelete(child) - } - } - this.root.blacken() - if (isFakeChild) { - if (child.parent.left === child) { - child.parent.left = null - } else if (child.parent.right === child) { - child.parent.right = null - } else { - throw new Error('Impossible #3') - } - } - } - - _fixDelete (n) { - if (n.parent === null) { - // this can only be called after the first iteration of fixDelete. - return - } - // d was already replaced by the child - // d is not the root - // d and child are black - let sibling = n.sibling - if (isRed(sibling)) { - // make sibling the grandfather - n.parent.redden() - sibling.blacken() - if (n === n.parent.left) { - n.parent.rotateLeft(this) - } else if (n === n.parent.right) { - n.parent.rotateRight(this) - } else { - throw new Error('Impossible #2') - } - sibling = n.sibling - } - // parent, sibling, and children of n are black - if (n.parent.isBlack() && - sibling.isBlack() && - isBlack(sibling.left) && - isBlack(sibling.right) - ) { - sibling.redden() - this._fixDelete(n.parent) - } else if (n.parent.isRed() && - sibling.isBlack() && - isBlack(sibling.left) && - isBlack(sibling.right) - ) { - sibling.redden() - n.parent.blacken() - } else { - if (n === n.parent.left && - sibling.isBlack() && - isRed(sibling.left) && - isBlack(sibling.right) - ) { - sibling.redden() - sibling.left.blacken() - sibling.rotateRight(this) - sibling = n.sibling - } else if (n === n.parent.right && - sibling.isBlack() && - isRed(sibling.right) && - isBlack(sibling.left) - ) { - sibling.redden() - sibling.right.blacken() - sibling.rotateLeft(this) - sibling = n.sibling - } - sibling.color = n.parent.color - n.parent.blacken() - if (n === n.parent.left) { - sibling.right.blacken() - n.parent.rotateLeft(this) - } else { - sibling.left.blacken() - n.parent.rotateRight(this) - } - } - } - - put (v) { - const node = new N(v) - if (this.root !== null) { - let p = this.root // p abbrev. parent - while (true) { - if (node.val._id.lessThan(p.val._id)) { - if (p.left === null) { - p.left = node - break - } else { - p = p.left - } - } else if (p.val._id.lessThan(node.val._id)) { - if (p.right === null) { - p.right = node - break - } else { - p = p.right - } - } else { - p.val = node.val - return p - } - } - this._fixInsert(node) - } else { - this.root = node - } - this.length++ - this.root.blacken() - return node - } - - _fixInsert (n) { - if (n.parent === null) { - n.blacken() - return - } else if (n.parent.isBlack()) { - return - } - const uncle = n.getUncle() - if (uncle !== null && uncle.isRed()) { - // Note: parent: red, uncle: red - n.parent.blacken() - uncle.blacken() - n.grandparent.redden() - this._fixInsert(n.grandparent) - } else { - // Note: parent: red, uncle: black or null - // Now we transform the tree in such a way that - // either of these holds: - // 1) grandparent.left.isRed - // and grandparent.left.left.isRed - // 2) grandparent.right.isRed - // and grandparent.right.right.isRed - if (n === n.parent.right && n.parent === n.grandparent.left) { - n.parent.rotateLeft(this) - // Since we rotated and want to use the previous - // cases, we need to set n in such a way that - // n.parent.isRed again - n = n.left - } else if (n === n.parent.left && n.parent === n.grandparent.right) { - n.parent.rotateRight(this) - // see above - n = n.right - } - // Case 1) or 2) hold from here on. - // Now traverse grandparent, make parent a black node - // on the highest level which holds two red nodes. - n.parent.blacken() - n.grandparent.redden() - if (n === n.parent.left) { - // Case 1 - n.grandparent.rotateRight(this) - } else { - // Case 2 - n.grandparent.rotateLeft(this) - } - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.test.d.ts deleted file mode 100644 index 54a03d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=tree.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.test.d.ts.map deleted file mode 100644 index 5fe9668..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/tree.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tree.test.d.ts","sourceRoot":"","sources":["tree.test.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0ecdsa-generate-keypair.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0ecdsa-generate-keypair.d.ts deleted file mode 100644 index 71a08e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0ecdsa-generate-keypair.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=0ecdsa-generate-keypair.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0ecdsa-generate-keypair.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0ecdsa-generate-keypair.d.ts.map deleted file mode 100644 index 08280aa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0ecdsa-generate-keypair.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"0ecdsa-generate-keypair.d.ts","sourceRoot":"","sources":["../../src/bin/0ecdsa-generate-keypair.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0serve.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0serve.d.ts deleted file mode 100644 index 97bafa4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0serve.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=0serve.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0serve.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0serve.d.ts.map deleted file mode 100644 index 8a23ef8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/0serve.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"0serve.d.ts","sourceRoot":"","sources":["../../src/bin/0serve.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gendocs.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gendocs.d.ts deleted file mode 100644 index 422e119..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gendocs.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=gendocs.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gendocs.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gendocs.d.ts.map deleted file mode 100644 index d4f124a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gendocs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gendocs.d.ts","sourceRoot":"","sources":["../../src/bin/gendocs.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gentesthtml.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gentesthtml.d.ts deleted file mode 100644 index 39f067b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gentesthtml.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=gentesthtml.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gentesthtml.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gentesthtml.d.ts.map deleted file mode 100644 index 5f95055..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/bin/gentesthtml.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gentesthtml.d.ts","sourceRoot":"","sources":["../../src/bin/gentesthtml.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/aes-gcm.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/aes-gcm.d.ts deleted file mode 100644 index 2120545..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/aes-gcm.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export function encrypt(key: CryptoKey, data: Uint8Array): Promise>; -export function decrypt(key: CryptoKey, data: Uint8Array): PromiseLike; -export function importKeyJwk(jwk: any, { usages, extractable }?: { - usages?: Usages | undefined; - extractable?: boolean | undefined; -}): Promise; -export function importKeyRaw(raw: Uint8Array, { usages, extractable }?: { - usages?: Usages | undefined; - extractable?: boolean | undefined; -}): Promise; -export function deriveKey(secret: Uint8Array | string, salt: Uint8Array | string, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export type Usages = Array<"encrypt" | "decrypt">; -export { exportKeyJwk, exportKeyRaw } from "./common.js"; -//# sourceMappingURL=aes-gcm.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/aes-gcm.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/aes-gcm.d.ts.map deleted file mode 100644 index ff8d7ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/aes-gcm.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aes-gcm.d.ts","sourceRoot":"","sources":["../../src/crypto/aes-gcm.js"],"names":[],"mappings":"AAuBO,6BAHI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,oCAkBjC;AAWM,6BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,CAclC;AAaM,kCALI,GAAG,4BAEX;IAAsB,MAAM;IACL,WAAW;CAAC,sBAQrC;AAUM,kCALI,UAAU,CAAC,WAAW,CAAC,4BAE/B;IAAsB,MAAM;IACL,WAAW;CAAC,sBAG0D;AAmBzF,kCANI,UAAU,CAAC,WAAW,CAAC,GAAC,MAAM,QAC9B,UAAU,CAAC,WAAW,CAAC,GAAC,MAAM,4BAEtC;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAsB7B;qBAxHU,KAAK,CAAC,SAAS,GAAC,SAAS,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/common.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/common.d.ts deleted file mode 100644 index 75106c9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/common.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function exportKeyJwk(key: CryptoKey): Promise; -export function exportKeyRaw(key: CryptoKey): Promise>; -//# sourceMappingURL=common.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/common.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/common.d.ts.map deleted file mode 100644 index eed2e01..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/common.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/crypto/common.js"],"names":[],"mappings":"AAKO,kCAFI,SAAS,uBAMnB;AAQM,kCAHI,SAAS,GACR,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAG6B"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/ecdsa.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/ecdsa.d.ts deleted file mode 100644 index 5ebdfe1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/ecdsa.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export function sign(key: CryptoKey, data: Uint8Array): PromiseLike>; -export function verify(key: CryptoKey, signature: Uint8Array, data: Uint8Array): PromiseLike; -export function generateKeyPair({ extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export function importKeyJwk(jwk: any, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export function importKeyRaw(raw: any, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export type Usages = Array<"sign" | "verify">; -export { exportKeyJwk, exportKeyRaw } from "./common.js"; -//# sourceMappingURL=ecdsa.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/ecdsa.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/ecdsa.d.ts.map deleted file mode 100644 index bf6482f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/ecdsa.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ecdsa.d.ts","sourceRoot":"","sources":["../../src/crypto/ecdsa.js"],"names":[],"mappings":"AA8BO,0BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAOA;AAYzC,4BALI,SAAS,aACT,UAAU,CAAC,WAAW,CAAC,QACvB,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,OAAO,CAAC,CAQ7B;AAaI,0DAHJ;IAAuB,WAAW;IACZ,MAAM;CAAC,0BAO7B;AAQI,kCALI,GAAG,4BAEX;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAQ/B;AAUM,kCALI,GAAG,4BAEX;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAGkD;qBAxFrE,KAAK,CAAC,MAAM,GAAC,QAAQ,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/jwt.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/jwt.d.ts deleted file mode 100644 index 0447def..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/jwt.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function encodeJwt(privateKey: CryptoKey, payload: Object): PromiseLike; -export function verifyJwt(publicKey: CryptoKey, jwt: string): Promise<{ - header: any; - payload: any; -}>; -export function unsafeDecode(jwt: string): { - header: any; - payload: any; -}; -//# sourceMappingURL=jwt.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/jwt.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/jwt.d.ts.map deleted file mode 100644 index a0db593..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/jwt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../src/crypto/jwt.js"],"names":[],"mappings":"AAqBO,sCAHI,SAAS,WACT,MAAM,uBAgBhB;AAMM,qCAHI,SAAS,OACT,MAAM;;;GAiBhB;AAOM,kCAFI,MAAM;;;EAQhB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/rsa-oaep.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/rsa-oaep.d.ts deleted file mode 100644 index b8bf3e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/rsa-oaep.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export { exportKeyJwk } from "./common.js"; -export function encrypt(key: CryptoKey, data: Uint8Array): PromiseLike>; -export function decrypt(key: CryptoKey, data: Uint8Array): PromiseLike; -export function generateKeyPair({ extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export function importKeyJwk(jwk: any, { extractable, usages }?: { - extractable?: boolean | undefined; - usages?: Usages | undefined; -}): Promise; -export type Usages = Array<"encrypt" | "decrypt">; -//# sourceMappingURL=rsa-oaep.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/rsa-oaep.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/rsa-oaep.d.ts.map deleted file mode 100644 index 1544fc1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/crypto/rsa-oaep.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rsa-oaep.d.ts","sourceRoot":"","sources":["../../src/crypto/rsa-oaep.js"],"names":[],"mappings":";AAuBO,6BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CASZ;AAW7B,6BAJI,SAAS,QACT,UAAU,CAAC,WAAW,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,CASG;AAQ/B,0DAJJ;IAAuB,WAAW;IACZ,MAAM;CAC5B,GAAS,OAAO,CAAC,aAAa,CAAC,CAY/B;AAQI,kCALI,GAAG,4BAEX;IAAuB,WAAW;IACZ,MAAM;CAAC,sBAQ/B;qBAxEY,KAAK,CAAC,SAAS,GAAC,SAAS,CAAC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/binding.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/binding.d.ts deleted file mode 100644 index 5bf528f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/binding.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * @template T - * @typedef {import('../schema.js').Schema} Schema - */ -/** - * @template {delta.AbstractDelta} DeltaA - * @template {delta.AbstractDelta} DeltaB - */ -export class Binding { - /** - * @param {RDT} a - * @param {RDT} b - * @param {dt.Template} template - */ - constructor(a: RDT, b: RDT, template: dt.Template); - /** - * @type {dt.Transformer} - */ - t: dt.Transformer; - a: RDT; - b: RDT; - _mux: mux.mutex; - _achanged: (delta: DeltaA) => void; - _bchanged: (delta: DeltaB) => void; - destroy: () => void; -} -export function bind>(a: RDT, b: RDT ? DeltaB : never>, template: dt.Template): Binding ? DeltaB : never>; -export function deltaRDT($delta: Schema): DeltaRDT; -export const $domDelta: any; -export function domRDT(dom: Element): DomRDT>; -export type Schema = import("../schema.js").Schema; -/** - * Abstract Interface for a delta-based Replicated Data Type. - */ -export type RDT = ObservableV2<{ - "change": (delta: Delta) => void; - "destroy": (rdt: RDT) => void; -}> & { - update: (delta: Delta) => any; - destroy: () => void; -}; -export type DomDelta = delta.RecursiveNode; -import * as delta from './delta.js'; -import * as dt from './t3.test.js'; -import * as mux from '../mutex.js'; -/** - * @template {delta.AbstractDelta} Delta - * @implements RDT - * @extends {ObservableV2<{ change: (delta: Delta) => void, 'destroy': (rdt:DeltaRDT)=>void }>} - */ -declare class DeltaRDT extends ObservableV2<{ - change: (delta: Delta) => void; - destroy: (rdt: DeltaRDT) => void; -}> implements RDT { - /** - * @param {Schema} $delta - */ - constructor($delta: Schema); - $delta: s.Schema; - /** - * @type {Delta?} - */ - state: Delta | null; - _mux: mux.mutex; - /** - * @param {Delta} delta - */ - update: (delta: Delta) => any; -} -/** - * @typedef {delta.RecursiveNode} DomDelta - */ -/** - * @template {DomDelta} [D=DomDelta] - * @implements RDT - * @extends {ObservableV2<{ change: (delta: D)=>void, destroy: (rdt:DomRDT)=>void }>}>} - */ -declare class DomRDT> extends ObservableV2<{ - change: (delta: D) => void; - destroy: (rdt: DomRDT) => void; -}> implements RDT { - /** - * @param {Element} observedNode - */ - constructor(observedNode: Element); - observedNode: Element; - _mux: mux.mutex; - observer: MutationObserver; - /** - * @param {MutationRecord[]} mutations - */ - _mutationHandler: (mutations: MutationRecord[]) => any; - /** - * @param {D} delta - */ - update: (delta: D) => void; -} -import { ObservableV2 } from '../observable.js'; -import * as s from '../schema.js'; -export {}; -//# sourceMappingURL=binding.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/binding.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/binding.d.ts.map deleted file mode 100644 index 965b0c7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/binding.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../../src/delta/binding.js"],"names":[],"mappings":"AAeA;;;GAGG;AAEH;;;GAGG;AACH,qBAHmC,MAAM,SAA3B,KAAK,CAAC,aAAc,EACC,MAAM,SAA3B,KAAK,CAAC,aAAc;IAGhC;;;;OAIG;IACH,eAJW,GAAG,CAAC,MAAM,CAAC,KACX,GAAG,CAAC,MAAM,CAAC,YACX,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAC,MAAM,EAAC,MAAM,CAAC,EA4BxC;IAzBC;;OAEG;IACH,GAFU,EAAE,CAAC,WAAW,CAAC,GAAG,EAAC,MAAM,EAAC,MAAM,CAAC,CAEnB;IACxB,eAAU;IACV,eAAU;IACV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AE,KAAK,KAAK,IAAI;aAAa,CAAC,GAAG,EAAC,QAAQ,CAAC,KAAK,CAAC,KAAG,IAAI;cADnF,GAAG,CAAC,KAAK;IAItB;;OAEG;IACH,oBAFW,MAAM,CAAC,KAAK,CAAC,EAUvB;IANC,wBAAoB;IACpB;;OAEG;IACH,OAFU,KAAK,OAAC,CAEC;IACjB,gBAA6B;IAG/B;;OAEG;IACH,SAAS,OAFE,KAEG,SAOZ;CAMH;AAkMD;;GAEG;AAEH;;;;GAIG;AACH,qBAJyB,CAAC,SAAZ,QAAS;;;YAEa,CAAC,KAAK,EAAE,CAAC,KAAG,IAAI;aAAW,CAAC,GAAG,EAAC,MAAM,CAAC,CAAC,CAAC,KAAG,IAAI;cADrE,GAAG,CAAC,CAAC;IAIlB;;OAEG;IACH,0BAFW,OAAO,EAajB;IATC,sBAAgC;IAChC,gBAA6B;IAC7B,2BAA2D;IAS7D;;OAEG;IACH,mBAAmB,WAFR,cAAc,EAEG,SAGxB;IAEJ;;OAEG;IACH,SAAS,OAFE,CAEG,UAWb;CAOF;6BA1W4B,kBAAkB;mBAS5B,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/delta.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/delta.d.ts deleted file mode 100644 index a4697f6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/delta.d.ts +++ /dev/null @@ -1,1074 +0,0 @@ -/** - * @typedef {{ - * insert?: string[] - * insertAt?: number - * delete?: string[] - * deleteAt?: number - * format?: Record - * formatAt?: number - * }} Attribution - */ -/** - * @type {s.Schema} - */ -export const $attribution: s.Schema; -/** - * @typedef {{ [key: string]: any }} FormattingAttributes - */ -/** - * @typedef {{ - * type: 'delta', - * name?: string, - * attrs?: { [Key in string|number]: DeltaAttrOpJSON }, - * children?: Array - * }} DeltaJSON - */ -/** - * @typedef {{ type: 'insert', insert: string|Array, format?: { [key: string]: any }, attribution?: Attribution } | { delete: number } | { type: 'retain', retain: number, format?: { [key:string]: any }, attribution?: Attribution } | { type: 'modify', value: object }} DeltaListOpJSON - */ -/** - * @typedef {{ type: 'insert', value: any, prevValue?: any, attribution?: Attribution } | { type: 'delete', prevValue?: any, attribution?: Attribution } | { type: 'modify', value: DeltaJSON }} DeltaAttrOpJSON - */ -/** - * @typedef {TextOp|InsertOp|DeleteOp|RetainOp|ModifyOp} ChildrenOpAny - */ -/** - * @typedef {SetAttrOp|DeleteAttrOp|ModifyAttrOp} AttrOpAny - */ -/** - * @typedef {ChildrenOpAny|AttrOpAny} _OpAny - */ -/** - * @type {s.Schema} - */ -export const $deltaMapChangeJson: s.Schema; -export class TextOp extends list.ListNode { - /** - * @param {string} insert - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(insert: string, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {string} - */ - readonly insert: string; - /** - * @readonly - * @type {FormattingAttributes|null} - */ - readonly format: FormattingAttributes | null; - attribution: Attribution | null; - /** - * @type {string?} - */ - _fingerprint: string | null; - get $type(): s.Schema; - /** - * @param {string} newVal - */ - _updateInsert(newVal: string): void; - /** - * @return {'insert'} - */ - get type(): "insert"; - get length(): number; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} offset - * @param {number} len - */ - _splice(offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - /** - * @return {TextOp} - */ - clone(start?: number, end?: number): TextOp; - /** - * @param {TextOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: TextOp): boolean; -} -/** - * @template {any} ArrayContent - */ -export class InsertOp extends list.ListNode { - /** - * @param {Array} insert - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(insert: Array, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {Array} - */ - readonly insert: Array; - /** - * @readonly - * @type {FormattingAttributes?} - */ - readonly format: FormattingAttributes | null; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string?} - */ - _fingerprint: string | null; - get $type(): s.Schema>; - /** - * @param {ArrayContent} newVal - */ - _updateInsert(newVal: ArrayContent): void; - /** - * @return {'insert'} - */ - get type(): "insert"; - get length(): number; - /** - * @param {number} i - * @return {Extract} - */ - _modValue(i: number): Extract; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} offset - * @param {number} len - */ - _splice(offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - /** - * @return {InsertOp} - */ - clone(start?: number, end?: number): InsertOp; - /** - * @param {InsertOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: InsertOp): boolean; -} -/** - * @template {DeltaConf} [DConf={}] - */ -export class DeleteOp extends list.ListNode { - /** - * @param {number} len - */ - constructor(len: number); - delete: number; - /** - * @type {Delta?} - */ - prevValue: Delta | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - get $type(): s.Schema>; - /** - * @return {'delete'} - */ - get type(): "delete"; - get length(): number; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} len - */ - _splice(_offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - /** - * @param {number} start - * @param {number} end - * @return {DeleteOp} - */ - clone(start?: number, end?: number): DeleteOp; - /** - * @param {DeleteOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: DeleteOp): boolean; -} -export class RetainOp extends list.ListNode { - /** - * @param {number} retain - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(retain: number, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {number} - */ - readonly retain: number; - /** - * @readonly - * @type {FormattingAttributes?} - */ - readonly format: FormattingAttributes | null; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - get $type(): s.Schema; - /** - * @return {'retain'} - */ - get type(): "retain"; - get length(): number; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} len - */ - _splice(_offset: number, len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - clone(start?: number, end?: number): RetainOp; - /** - * @param {RetainOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: RetainOp): boolean; -} -/** - * Delta that can be applied on a YType Embed - * - * @template {Delta} [DTypes=DeltaAny] - */ -export class ModifyOp extends list.ListNode { - /** - * @param {DTypes} delta - * @param {FormattingAttributes|null} format - * @param {Attribution?} attribution - */ - constructor(delta: DTypes, format: FormattingAttributes | null, attribution: Attribution | null); - /** - * @readonly - * @type {DTypes} - */ - readonly value: DTypes; - /** - * @readonly - * @type {FormattingAttributes?} - */ - readonly format: FormattingAttributes | null; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - get $type(): s.Schema>; - /** - * @return {'modify'} - */ - get type(): "modify"; - get length(): number; - /** - * @type {DeltaBuilderAny} - */ - get _modValue(): DeltaBuilderAny; - get fingerprint(): string; - /** - * Remove a part of the operation (similar to Array.splice) - * - * @param {number} _offset - * @param {number} _len - */ - _splice(_offset: number, _len: number): this; - /** - * @return {DeltaListOpJSON} - */ - toJSON(): DeltaListOpJSON; - /** - * @return {ModifyOp} - */ - clone(): ModifyOp; - /** - * @param {ModifyOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: ModifyOp): boolean; -} -/** - * @template {any} [V=any] - * @template {string|number} [K=any] - */ -export class SetAttrOp { - /** - * @param {K} key - * @param {V} value - * @param {V|undefined} prevValue - * @param {Attribution?} attribution - */ - constructor(key: K, value: V, prevValue: V | undefined, attribution: Attribution | null); - /** - * @readonly - * @type {K} - */ - readonly key: K; - /** - * @readonly - * @type {V} - */ - readonly value: V; - /** - * @readonly - * @type {V|undefined} - */ - readonly prevValue: V | undefined; - /** - * @readonly - * @type {Attribution?} - */ - readonly attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - get $type(): s.Schema>; - /** - * @return {'insert'} - */ - get type(): "insert"; - /** - * @type {DeltaBuilderAny} - */ - get _modValue(): DeltaBuilderAny; - get fingerprint(): string; - toJSON(): { - type: "insert"; - value: DeltaJSON | V; - } & (({ - attribution: Attribution; - } | { - attribution?: undefined; - }) & ({ - prevValue: V & ({} | null); - } | { - prevValue?: undefined; - })); - /** - * @return {SetAttrOp} - */ - clone(): SetAttrOp; - /** - * @param {SetAttrOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: SetAttrOp): boolean; -} -/** - * @template [V=any] - * @template {string|number} [K=string|number] - */ -export class DeleteAttrOp { - /** - * @param {K} key - * @param {V|undefined} prevValue - * @param {Attribution?} attribution - */ - constructor(key: K, prevValue: V | undefined, attribution: Attribution | null); - /** - * @type {K} - */ - key: K; - /** - * @type {V|undefined} - */ - prevValue: V | undefined; - attribution: Attribution | null; - /** - * @type {string|null} - */ - _fingerprint: string | null; - get $type(): s.Schema>; - /** - * @type {'delete'} - */ - get type(): "delete"; - get value(): undefined; - get fingerprint(): string; - /** - * @return {DeltaAttrOpJSON} - */ - toJSON(): DeltaAttrOpJSON; - clone(): DeleteAttrOp; - /** - * @param {DeleteAttrOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: DeleteAttrOp): boolean; -} -/** - * @template {DeltaAny} [Modifier=DeltaAny] - * @template {string|number} [K=string] - */ -export class ModifyAttrOp { - /** - * @param {K} key - * @param {Modifier} delta - */ - constructor(key: K, delta: Modifier); - /** - * @readonly - * @type {K} - */ - readonly key: K; - /** - * @readonly - * @type {Modifier} - */ - readonly value: Modifier; - /** - * @type {string|null} - */ - _fingerprint: string | null; - get $type(): s.Schema>; - /** - * @type {'modify'} - */ - get type(): "modify"; - get fingerprint(): string; - /** - * @return {DeltaBuilder} - */ - get _modValue(): DeltaBuilder; - /** - * @return {DeltaAttrOpJSON} - */ - toJSON(): DeltaAttrOpJSON; - /** - * @return {ModifyAttrOp} - */ - clone(): ModifyAttrOp; - /** - * @param {ModifyAttrOp} other - */ - [equalityTrait.EqualityTraitSymbol](other: ModifyAttrOp): boolean; -} -export const $insertOp: s.Schema>; -export const $modifyOp: s.Schema; -export const $textOp: s.Schema; -export const $deleteOp: s.Schema>; -export const $retainOp: s.Schema; -export const $anyOp: s.Schema | DeleteOp | ModifyOp>; -export const $setAttrOp: s.Schema>; -export const $modifyAttrOp: s.Schema>; -export const $deleteAttrOp: s.Schema>; -export const $anyAttrOp: s.Schema | DeleteAttrOp | ModifyAttrOp>; -export function $setAttrOpWith($content: s.Schema): s.Schema>; -export function $insertOpWith($content: s.Schema): s.Schema>; -export function $modifyOpWith($content: s.Schema): s.Schema>; -export function $modifyAttrOpWith($content: s.Schema): s.Schema>; -/** - * @template {DeltaConf} [DConf={}] - * @extends {DeltaData< - * DeltaConfGetName, - * DeltaConfGetAttrs, - * DeltaConfGetChildren, - * DConf extends {text:true} ? true : false - * >} - */ -export class Delta extends DeltaData, import("../ts.js").TypeIsAny, DeltaConfGetChildren, DConf extends { - text: true; -} ? true : false> { - /** - * @param {string?} name - * @param {s.Schema>?} $schema - */ - constructor(name: string | null, $schema: s.Schema> | null); - get $type(): s.Schema; - /** - * @type {string} - */ - get fingerprint(): string; - isEmpty(): boolean; - /** - * @return {DeltaJSON} - */ - toJSON(): DeltaJSON; - /** - * @param {Delta} other - * @return {boolean} - */ - equals(other: Delta): boolean; - /** - * Mark this delta as done and perform some cleanup (e.g. remove appended retains without - * formats&attributions). In the future, there might be additional merge operations that can be - * performed to result in smaller deltas. Set `markAsDone=false` to only perform the cleanup. - * - * @return {Delta} - */ - done(markAsDone?: boolean): Delta; - [fingerprintTrait.FingerprintTraitSymbol](): string; - /** - * @param {any} other - * @return {boolean} - */ - [equalityTrait.EqualityTraitSymbol](other: any): boolean; -} -export function slice(d: Delta, start?: number, end?: number, currNode?: ChildrenOpAny | null): DeltaBuilder; -export function clone(d: D): D extends Delta ? DeltaBuilder : never; -/** - * @template {DeltaConf} [DConf={}] - * @extends {Delta} - */ -export class DeltaBuilder extends Delta { - /** - * @param {string?} name - * @param {s.Schema>?} $schema - */ - constructor(name: string | null, $schema: s.Schema> | null); - /** - * @type {FormattingAttributes?} - */ - usedAttributes: FormattingAttributes | null; - /** - * @type {Attribution?} - */ - usedAttribution: Attribution | null; - /** - * @param {Attribution?} attribution - */ - useAttribution(attribution: Attribution | null): this; - /** - * @param {FormattingAttributes?} attributes - * @return {this} - */ - useAttributes(attributes: FormattingAttributes | null): this; - /** - * @param {string} name - * @param {any} value - */ - updateUsedAttributes(name: string, value: any): this; - /** - * @template {keyof Attribution} NAME - * @param {NAME} name - * @param {Attribution[NAME]?} value - */ - updateUsedAttribution(name: NAME, value: Attribution[NAME] | null): this; - /** - * @template {(DConf extends {fixed:true} ? never : (Array|string)) | (DeltaConfGetChildren extends infer Children ? (Children extends never ? never : Array) : never) | DeltaConfGetText} NewContent - * @param {NewContent} insert - * @param {FormattingAttributes?} [formatting] - * @param {Attribution?} [attribution] - * @return {DeltaBuilder extends never ? {} : { - * children: Exclude[number]|DeltaConfGetChildren - * }) & (Extract extends never ? {} : { text: true })>>} - */ - insert | string)) | (DeltaConfGetChildren extends infer Children_1 ? (Children_1 extends never ? never : Array) : never) | DeltaConfGetText>(insert: NewContent, formatting?: FormattingAttributes | null, attribution?: Attribution | null): DeltaBuilder extends never ? {} : { - children: Exclude[number] | DeltaConfGetChildren; - }) & (Extract extends never ? {} : { - text: true; - })>>; - /** - * @template {Extract,Delta>} NewContent - * @param {NewContent} modify - * @param {FormattingAttributes?} formatting - * @param {Attribution?} attribution - * @return {DeltaBuilder|NewContent}>>} - */ - modify, Delta>>(modify: NewContent, formatting?: FormattingAttributes | null, attribution?: Attribution | null): DeltaBuilder | NewContent; - }>>; - /** - * @param {number} len - * @param {FormattingAttributes?} [format] - * @param {Attribution?} [attribution] - */ - retain(len: number, format?: FormattingAttributes | null, attribution?: Attribution | null): this; - /** - * @param {number} len - */ - delete(len: number): this; - /** - * @template {keyof DeltaConfGetAllowedAttrs} Key - * @template {DeltaConfGetAllowedAttrs[Key]} Val - * @param {Key} key - * @param {Val} val - * @param {Attribution?} attribution - * @param {Val|undefined} [prevValue] - * @return {DeltaBuilder,Key,Val>}>>} - */ - setAttr, Val extends DeltaConfGetAllowedAttrs[Key]>(key: Key, val: Val, attribution?: Attribution | null, prevValue?: Val | undefined): DeltaBuilder, Key, Val>; - }>>; - /** - * @template {DeltaConfGetAllowedAttrs} NewAttrs - * @param {NewAttrs} attrs - * @param {Attribution?} attribution - * @return {DeltaBuilder,NewAttrs> } - * >> - * } - */ - setAttrs>(attrs: NewAttrs, attribution?: Attribution | null): DeltaBuilder, NewAttrs>; - }>>; - /** - * @template {keyof DeltaConfGetAllowedAttrs} Key - * @param {Key} key - * @param {Attribution?} attribution - * @param {any} [prevValue] - * @return {DeltaBuilder,Key,never> - * }>>} - */ - deleteAttr>(key: Key, attribution?: Attribution | null, prevValue?: any): DeltaBuilder, Key, never>; - }>>; - /** - * @template {DeltaConfGetAllowedAttrs extends infer As ? { [K in keyof As]: Extract extends never ? never : K }[keyof As] : never} Key - * @template {Extract[Key],DeltaAny>} D - * @param {Key} key - * @param {D} modify - * @return {DeltaBuilder,Key,D>}>>} - */ - modifyAttr extends infer As ? { [K in keyof As]: Extract extends never ? never : K; }[keyof As] : never, D extends Extract[Key], DeltaAny>>(key: Key, modify: D): DeltaBuilder, Key, D>; - }>>; - /** - * @param {Delta} other - */ - apply(other: Delta): this; - /** - * @param {DeltaAny} other - * @param {boolean} priority - */ - rebase(other: DeltaAny, priority: boolean): this; - /** - * Same as doing `delta.rebase(other.inverse())`, without creating a temporary delta. - * - * @param {DeltaAny} other - * @param {boolean} priority - */ - rebaseOnInverse(other: DeltaAny, priority: boolean): this; - /** - * Append child ops from one op to the other. - * - * delta.create().insert('a').append(delta.create().insert('b')) // => insert "ab" - * - * @todo on fixed deltas this should not extend - * - * @template {DeltaConf} OtherDeltaConf - * @param {Delta} other - * @return {DeltaBuilder extends never ? {} : { children: DeltaConfGetChildren | DeltaConfGetChildren }) - * & (DeltaConfGetText extends string ? { text: true } : never) - * >>} - */ - append(other: Delta): DeltaBuilder extends never ? {} : { - children: DeltaConfGetChildren | DeltaConfGetChildren; - }) & (DeltaConfGetText extends string ? { - text: true; - } : never)>>; -} -/** - * @template {DeltaConf} DConf - * @extends {s.Schema>} - */ -export class $Delta extends s.Schema> { - /** - * @param {s.Schema} $name - * @param {s.Schema} $attrs - * @param {s.Schema} $children - * @param {any} hasText - * @param {any} recursiveChildren - * @param {s.Schema<{[K:string]:any}>} $formats - */ - constructor($name: s.Schema, $attrs: s.Schema, $children: s.Schema, hasText: any, recursiveChildren: any, $formats: s.Schema<{ - [K: string]: any; - }>); - /** - * @type {{ - * $name: s.Schema>, - * $attrs: s.Schema>, - * $children: s.Schema>, - * hasText: DeltaConfGetText - * recursiveChildren: DeltaConfGetRecursiveChildren, - * $formats: s.Schema<{[K:string]:any}> - * }} - */ - shape: { - $name: s.Schema>; - $attrs: s.Schema>; - $children: s.Schema>; - hasText: DeltaConfGetText; - recursiveChildren: DeltaConfGetRecursiveChildren; - $formats: s.Schema<{ - [K: string]: any; - }>; - }; -} -export function $delta | string | Array = s.Schema, AttrsSchema extends s.Schema<{ - [key: string | number]: any; -}> | { - [key: string | number]: any; -} = s.Schema<{}>, ChildrenSchema extends unknown = s.Schema, HasText extends boolean = false, RecursiveChildren extends boolean = false, Formats extends { - [k: string]: any; -} = { - [k: string]: any; -}>({ name, attrs, children, text, formats, recursiveChildren: recursive }: { - name?: NodeNameSchema | null | undefined; - attrs?: AttrsSchema | null | undefined; - children?: ChildrenSchema | null | undefined; - text?: HasText | undefined; - formats?: Formats | undefined; - recursiveChildren?: RecursiveChildren | undefined; -}): [s.Unwrap>, s.Unwrap>, s.Unwrap>] extends [infer NodeName_1, infer Attrs_1, infer Children_1] ? s.Schema> : never; -export const $$delta: s.Schema<$Delta>; -export function _$delta | string | Array = s.Schema, AttrsSchema extends s.Schema<{ - [key: string | number]: any; -}> | { - [key: string | number]: any; -} = s.Schema<{}>, ChildrenSchema extends unknown = s.Schema, HasText extends boolean = false, Recursive extends boolean = false>({ name, attrs, children, text, recursive }: { - name?: NodeNameSchema | null | undefined; - attrs?: AttrsSchema | null | undefined; - children?: ChildrenSchema | null | undefined; - text?: HasText | undefined; - recursive?: Recursive | undefined; -}): [s.Unwrap>, s.Unwrap>, s.Unwrap>] extends [infer NodeName_1, infer Attrs_1, infer Children_1] ? s.Schema : never), HasText extends true ? string : never>> : never; -export const $deltaAny: s.Schema; -export const $deltaBuilderAny: s.Schema; -export function mergeAttrs(a: T | null, b: T | null): T | null; -export function mergeDeltas(a: D, b: D): D; -export function random(gen: prng.PRNG, $d: s.Schema>): DeltaBuilder; -/** - * @overload - * @return {DeltaBuilder<{}>} - */ -export function create(): DeltaBuilder<{}>; -/** - * @template {string} NodeName - * @overload - * @param {NodeName} nodeName - * @return {DeltaBuilder<{ name: NodeName }>} - */ -export function create(nodeName: NodeName): DeltaBuilder<{ - name: NodeName; -}>; -/** - * @template {string} NodeName - * @template {s.Schema} Schema - * @overload - * @param {NodeName} nodeName - * @param {Schema} schema - * @return {Schema extends s.Schema> ? DeltaBuilder> : never} - */ -export function create>(nodeName: NodeName, schema: Schema): Schema extends s.Schema> ? DeltaBuilder> : never; -/** - * @template {s.Schema} Schema - * @overload - * @param {Schema} schema - * @return {Schema extends s.Schema> ? DeltaBuilder> : never} - */ -export function create>(schema: Schema): Schema extends s.Schema> ? DeltaBuilder> : never; -/** - * @template {string|null} NodeName - * @template {{[k:string|number]:any}|null} Attrs - * @template {Array|string} [Children=never] - * @overload - * @param {NodeName} nodeName - * @param {Attrs} attrs - * @param {Children} [children] - * @return {DeltaBuilder<{ - * name: NodeName, - * attrs: Attrs extends null ? {} : Attrs, - * children: Extract> extends Array ? (unknown extends Ac ? never : Ac) : never, - * text: Extract extends never ? false : true - * }>} - */ -export function create | string = never>(nodeName: NodeName, attrs: Attrs, children?: Children | undefined): DeltaBuilder<{ - name: NodeName; - attrs: Attrs extends null ? {} : Attrs; - children: Extract> extends Array ? (unknown extends Ac ? never : Ac) : never; - text: Extract extends never ? false : true; -}>; -export function diff(d1: Delta, d2: NoInfer>): DeltaBuilder; -export type Attribution = { - insert?: string[]; - insertAt?: number; - delete?: string[]; - deleteAt?: number; - format?: Record; - formatAt?: number; -}; -export type FormattingAttributes = { - [key: string]: any; -}; -export type DeltaJSON = { - type: "delta"; - name?: string; - attrs?: { [Key in string | number]: DeltaAttrOpJSON; }; - children?: Array; -}; -export type DeltaListOpJSON = { - type: "insert"; - insert: string | Array; - format?: { - [key: string]: any; - }; - attribution?: Attribution; -} | { - delete: number; -} | { - type: "retain"; - retain: number; - format?: { - [key: string]: any; - }; - attribution?: Attribution; -} | { - type: "modify"; - value: object; -}; -export type DeltaAttrOpJSON = { - type: "insert"; - value: any; - prevValue?: any; - attribution?: Attribution; -} | { - type: "delete"; - prevValue?: any; - attribution?: Attribution; -} | { - type: "modify"; - value: DeltaJSON; -}; -export type ChildrenOpAny = TextOp | InsertOp | DeleteOp | RetainOp | ModifyOp; -export type AttrOpAny = SetAttrOp | DeleteAttrOp | ModifyAttrOp; -export type _OpAny = ChildrenOpAny | AttrOpAny; -export type AddToAttrs = { [K in (Key | keyof Attrs_1)]: (unknown extends Attrs_1[K] ? never : Attrs_1[K]) | (Key extends K ? Val : never); }; -export type MergeAttrs = { [K in (keyof NewAttrs | keyof Attrs_1)]: (unknown extends Attrs_1[K] ? never : Attrs_1[K]) | (unknown extends NewAttrs[K] ? never : NewAttrs[K]); }; -export type DeltaAny = Delta; -export type DeltaBuilderAny = DeltaBuilder; -export type DeltaConf = { - name?: string | undefined; - children?: fingerprintTrait.Fingerprintable; - text?: boolean | undefined; - attrs?: { - [K: string]: fingerprintTrait.Fingerprintable; - [K: number]: fingerprintTrait.Fingerprintable; - } | undefined; - fixed?: boolean | undefined; - recursiveChildren?: boolean | undefined; - recursiveAttrs?: boolean | undefined; -}; -export type DeltaConfGetName = DConf extends { - name: infer Name; -} ? (unknown extends Name ? any : (Exclude)) : any; -export type DeltaConfGetChildren = (DConf extends { - children: infer Children_1; -} ? (unknown extends Children_1 ? any : Children_1) : never) | (DConf extends { - recursiveChildren: true; -} ? Delta : never); -export type DeltaConfGetAllowedChildren = DConf extends { - fixed: true; -} ? DeltaConfGetChildren : any; -export type DeltaConfGetText = 0 extends (1 & DConf) ? string : (DConf extends { - text: true; -} ? string : never); -export type DeltaConfGetAttrs = import("../ts.js").TypeIsAny; -export type DeltaConfGetAllowedAttrs = DConf extends { - fixed: true; -} ? DeltaConfGetAttrs : { - [K: string | number]: any; -}; -export type DeltaConfGetFixed = 0 extends (1 & DConf) ? true : (DConf extends { - fixed: true; -} ? true : false); -export type DeltaConfGetRecursiveChildren = DConf extends { - recursiveChildren: true; -} ? true : false; -export type DeltaConfigGetRecursiveAttrs = DConf extends { - recursiveAttrs: true; -} ? true : false; -/** - * Transform Delta(Builder) to a normal delta. - */ -export type _SanifyDelta = V extends never ? never : (import("../ts.js").TypeIsAny ? Delta : V>); -export type PrettifyDeltaConf = import("../ts.js").Prettify<{ [K in keyof DConf]: K extends "attrs" ? import("../ts.js").Prettify<{ [KA in keyof DConf[K]]: _SanifyDelta; }, 1> : (K extends "children" ? _SanifyDelta : DConf[K]); }, 1>; -export type DeltaConfOverwrite = import("../ts.js").TypeIsAny>; -export type qq = string extends never ? true : false; -import * as s from '../schema.js'; -import * as list from '../list.js'; -import * as equalityTrait from '../trait/equality.js'; -import * as fingerprintTrait from '../trait/fingerprint.js'; -/** - * @template {{[Key in string|number]: any}} Attrs - * @template {string|number} Key - * @template {any} Val - * @typedef {{ [K in (Key | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (Key extends K ? Val : never) }} AddToAttrs - */ -/** - * @template {{[Key in string|number|symbol]: any}} Attrs - * @template {{[Key in string|number|symbol]: any}} NewAttrs - * @typedef {{ [K in (keyof NewAttrs | keyof Attrs)]: (unknown extends Attrs[K] ? never : Attrs[K]) | (unknown extends NewAttrs[K] ? never : NewAttrs[K]) }} MergeAttrs - */ -/** - * @typedef {Delta} DeltaAny - */ -/** - * @typedef {DeltaBuilder} DeltaBuilderAny - */ -/** - * @typedef {object} DeltaConf - * @property {string} [DeltaConf.name] - * @property {fingerprintTrait.Fingerprintable} [DeltaConf.children=never] - * @property {boolean} [DeltaConf.text=never] - * @property {{[K:string|number]:fingerprintTrait.Fingerprintable}} [DeltaConf.attrs={}] - * @property {boolean} [DeltaConf.fixed=never] - * @property {boolean} [DeltaConf.recursiveChildren=false] - * @property {boolean} [DeltaConf.recursiveAttrs=false] - */ -/** - * @template {DeltaConf} DConf - * @typedef {DConf extends {name:infer Name} ? (unknown extends Name ? any : (Exclude)) : any} DeltaConfGetName - */ -/** - * @template {DeltaConf} DConf - * @typedef {(DConf extends {children:infer Children} ? (unknown extends Children ? any : Children) : never) | (DConf extends {recursiveChildren:true} ? Delta : never)} DeltaConfGetChildren - */ -/** - * @template {DeltaConf} DConf - * @typedef {DConf extends {fixed:true} ? DeltaConfGetChildren : any } DeltaConfGetAllowedChildren - */ -/** - * @template {DeltaConf} DConf - * @typedef {0 extends (1 & DConf) ? string : (DConf extends {text:true} ? string : never)} DeltaConfGetText - */ -/** - * @template {DeltaConf} DConf - * @typedef {import('../ts.js').TypeIsAny} DeltaConfGetAttrs - */ -/** - * @template {DeltaConf} DConf - * @typedef {DConf extends {fixed:true} ? DeltaConfGetAttrs : {[K:string|number]:any}} DeltaConfGetAllowedAttrs - */ -/** - * @template {DeltaConf} DConf - * @typedef {0 extends (1 & DConf) ? true : (DConf extends { fixed: true } ? true : false)} DeltaConfGetFixed - */ -/** - * @template {DeltaConf} DConf - * @typedef {DConf extends {recursiveChildren:true} ? true : false} DeltaConfGetRecursiveChildren - */ -/** - * @template {DeltaConf} DConf - * @typedef {DConf extends {recursiveAttrs:true} ? true : false} DeltaConfigGetRecursiveAttrs - */ -/** - * Transform Delta(Builder) to a normal delta. - * - * @template V - * @typedef {V extends never ? never : (import('../ts.js').TypeIsAny ? Delta : V>)} _SanifyDelta - */ -/** - * @template {DeltaConf} DConf - * @typedef {import('../ts.js').Prettify<{[K in keyof DConf]: K extends 'attrs' ? import('../ts.js').Prettify<{ [KA in keyof DConf[K]]: _SanifyDelta },1> : (K extends 'children' ? _SanifyDelta : DConf[K]) }, 1>} PrettifyDeltaConf - */ -/** - * @template {DeltaConf} D1 - * @template {DeltaConf} D2 - * @typedef {import('../ts.js').TypeIsAny>} DeltaConfOverwrite - */ -/** - * @template {string} Name - * @template {{[K in string|number]:any}} Attrs - * @template Children - * @template {boolean} Text - */ -declare class DeltaData { - /** - * @param {string?} name - * @param {s.Schema>?} $schema - */ - constructor(name: string | null, $schema: s.Schema> | null); - name: Name; - $schema: s.Schema> | null; - /** - * @type {{ [K in keyof Attrs]?: K extends string|number ? (SetAttrOp|DeleteAttrOp|(Attrs[K] extends never ? never : (Attrs[K] extends Delta ? ModifyAttrOp,K> : never))) : never } - * & { [Symbol.iterator]: () => Iterator<{ [K in keyof Attrs]: K extends string|number ? (SetAttrOp|DeleteAttrOp|(Attrs[K] extends never ? never : (Delta extends Attrs[K] ? ModifyAttrOp,K> : never))) : never }[keyof Attrs]> } - * } - */ - attrs: { [K in keyof Attrs]?: K extends string | number ? (SetAttrOp | DeleteAttrOp | (Attrs[K] extends never ? never : (Attrs[K] extends Delta ? ModifyAttrOp, K> : never))) : never; } & { - [Symbol.iterator]: () => Iterator<{ [K in keyof Attrs]: K extends string | number ? (SetAttrOp | DeleteAttrOp | (Attrs[K] extends never ? never : (Delta extends Attrs[K] ? ModifyAttrOp, K> : never))) : never; }[keyof Attrs]>; - }; - /** - * @type {list.List< - * | (Text extends true ? (RetainOp|TextOp|DeleteOp) : never) - * | (RetainOp|InsertOp|DeleteOp|(Delta extends Children ? ModifyOp> : never)) - * >} - */ - children: list.List<(Text extends true ? (RetainOp | TextOp | DeleteOp) : never) | (RetainOp | InsertOp | DeleteOp | (Delta extends Children ? ModifyOp> : never))>; - childCnt: number; - /** - * @type {any} - */ - origin: any; - /** - * @type {string|null} - */ - _fingerprint: string | null; - isDone: boolean; -} -import * as prng from '../prng.js'; -export {}; -//# sourceMappingURL=delta.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/delta.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/delta.d.ts.map deleted file mode 100644 index 15c7fbc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/delta.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delta.d.ts","sourceRoot":"","sources":["../../src/delta/delta.js"],"names":[],"mappings":"AAyBA;;;;;;;;;GASG;AAEH;;GAEG;AACH,2BAFU,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAS1B;AAEL;;GAEG;AAEH;;;;;;;GAOG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AACH,kCAFU,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAM/B;AAeJ;IACE;;;;OAIG;IACH,oBAJW,MAAM,UACN,oBAAoB,GAAC,IAAI,eACzB,WAAW,OAAC,EAoBtB;IAfC;;;OAGG;IACH,iBAFU,MAAM,CAEI;IACpB;;;OAGG;IACH,iBAFU,oBAAoB,GAAC,IAAI,CAEf;IACpB,gCAA8B;IAC9B;;OAEG;IACH,cAFU,MAAM,OAAC,CAEO;IAG1B,8BAEC;IAED;;OAEG;IACH,sBAFW,MAAM,QAMhB;IAED;;OAEG;IACH,YAFY,QAAQ,CAInB;IAED,qBAEC;IAED,0BAMC;IAED;;;;;OAKG;IACH,gBAHW,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;IACjB;;OAEG;IACH,QAFU,GAAG,CAEK;IAClB;;OAEG;IACH,cAFU,MAAM,GAAC,IAAI,CAEG;IACxB,gBAAmB;CAEtB;sBAn+BqB,YAAY"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/t3.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/t3.test.d.ts deleted file mode 100644 index b449d55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/t3.test.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export function transformResult(a: DeltaA, b: DeltaB): TransformResult; -export const transformResultEmpty: TransformResult; -export type TransformResult = { - a: DeltaA | null; - b: DeltaB | null; -}; -export type DeltaTransformer = (t: { - a: DeltaA | null; - b: DeltaB | null; -}) => ({ - a: DeltaA | null; - b: DeltaB | null; -}); -export type Transform = { - applyA: (da: DeltaA) => TransformResult; - applyB: (db: DeltaB) => TransformResult; -}; -import * as delta from './delta.js'; -//# sourceMappingURL=t3.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/t3.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/t3.test.d.ts.map deleted file mode 100644 index 3c79a75..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/delta/t3.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"t3.test.d.ts","sourceRoot":"","sources":["../../src/delta/t3.test.js"],"names":[],"mappings":"AAoBO,gCAN4B,MAAM,SAA3B,KAAK,CAAC,YAAY,OAAE,EACC,MAAM,SAA3B,KAAK,CAAC,YAAY,OAAE,KACvB,MAAM,KACN,MAAM,GACL,eAAe,CAAC,MAAM,OAAC,EAAC,MAAM,OAAC,CAAC,CAEO;AACnD,+DAA+D;4BAbnC,MAAM,SAApB,KAAK,CAAC,KAAK,OAAE,EACC,MAAM,SAApB,KAAK,CAAC,KAAK,OAAE,IACd;IAAE,CAAC,EAAE,MAAM,OAAC,CAAC;IAAC,CAAC,EAAE,MAAM,OAAC,CAAA;CAAE;6BAiBT,MAAM,SAAtB,KAAK,CAAC,QAAS,EACC,MAAM,SAAtB,KAAK,CAAC,QAAS,IAChB,CAAC,CAAC,EAAC;IAAC,CAAC,EAAC,MAAM,OAAC,CAAC;IAAA,CAAC,EAAC,MAAM,OAAC,CAAA;CAAC,KAAG,CAAC;IAAC,CAAC,EAAC,MAAM,OAAC,CAAC;IAAA,CAAC,EAAC,MAAM,OAAC,CAAA;CAAC,CAAC;sBA2GpC,MAAM,SAAnB,KAAK,CAAC,KAAM,EACC,MAAM,SAAnB,KAAK,CAAC,KAAM,IACb;IAAE,MAAM,EAAE,CAAC,EAAE,EAAC,MAAM,KAAG,eAAe,CAAC,MAAM,EAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,CAAC,EAAE,EAAC,MAAM,KAAG,eAAe,CAAC,MAAM,EAAC,MAAM,CAAC,CAAA;CAAE;uBAvIlG,YAAY"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/diff/patience.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/diff/patience.d.ts deleted file mode 100644 index bb84468..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/diff/patience.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export function diff(as: Array, bs: Array): Array<{ - index: number; - remove: Array; - insert: Array; -}>; -export function diffSplitBy(a: string, b: string, _regexp: RegExp | string): { - index: number; - remove: string; - insert: string; -}[]; -export function diffAuto(a: string, b: string): { - insert: string; - remove: string; - index: number; -}[]; -//# sourceMappingURL=patience.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/diff/patience.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/diff/patience.d.ts.map deleted file mode 100644 index 1ce1063..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/diff/patience.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patience.d.ts","sourceRoot":"","sources":["../../src/diff/patience.js"],"names":[],"mappings":"AAoBO,yBAJI,KAAK,CAAC,MAAM,CAAC,MACb,KAAK,CAAC,MAAM,CAAC,GACZ,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAC,CAAC,CAShF;AAOM,+BAJI,MAAM,KACN,MAAM,WACN,MAAM,GAAC,MAAM;;;;IAqBvB;AAWM,4BAHI,MAAM,KACN,MAAM;;;;IASP"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-gf2-polynomial.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-gf2-polynomial.d.ts deleted file mode 100644 index d6d03d6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-gf2-polynomial.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a GF2 Polynomial abstraction that is not meant for production! - * - * It is easy to understand and it's correctness is as obvious as possible. It can be used to verify - * efficient implementations of algorithms on GF2. - */ -export class GF2Polynomial { - /** - * @type {Set} - */ - degrees: Set; -} -export function createFromBytes(bytes: Uint8Array): GF2Polynomial; -export function toUint8Array(p: GF2Polynomial, byteLength?: number): Uint8Array; -export function createFromUint(uint: number): GF2Polynomial; -export function createRandom(degree: number): GF2Polynomial; -export function getHighestDegree(p: GF2Polynomial): number; -export function addInto(p1: GF2Polynomial, p2: GF2Polynomial): void; -export function orInto(p1: GF2Polynomial, p2: GF2Polynomial): void; -export function add(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function clone(p: GF2Polynomial): GF2Polynomial; -export function addDegreeInto(p: GF2Polynomial, degree: number): void; -export function multiply(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function shiftLeft(p: GF2Polynomial, shift: number): GF2Polynomial; -export function mod(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function modPow(p: GF2Polynomial, e: number, m: GF2Polynomial): GF2Polynomial; -export function gcd(p1: GF2Polynomial, p2: GF2Polynomial): GF2Polynomial; -export function equals(p1: GF2Polynomial, p2: GF2Polynomial): boolean; -export function isIrreducibleBenOr(p: GF2Polynomial): boolean; -export function createIrreducible(degree: number): GF2Polynomial; -export function fingerprint(buf: Uint8Array, m: GF2Polynomial): Uint8Array; -export class RabinPolynomialEncoder { - /** - * @param {GF2Polynomial} m The irreducible polynomial - */ - constructor(m: GF2Polynomial); - fingerprint: GF2Polynomial; - m: GF2Polynomial; - /** - * @param {number} b - */ - write(b: number): void; - getFingerprint(): Uint8Array; -} -//# sourceMappingURL=rabin-gf2-polynomial.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-gf2-polynomial.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-gf2-polynomial.d.ts.map deleted file mode 100644 index 1a74de3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-gf2-polynomial.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin-gf2-polynomial.d.ts","sourceRoot":"","sources":["../../src/hash/rabin-gf2-polynomial.js"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH;IAEI;;QAEI;IACJ,SAFW,GAAG,CAAC,MAAM,CAAC,CAEE;CAE3B;AAOM,uCAFI,UAAU,iBAcpB;AAQM,gCAHI,aAAa,eACb,MAAM,2BAahB;AAOM,qCAFI,MAAM,iBAQhB;AAOM,qCAFI,MAAM,iBAYhB;AAMM,oCAHI,aAAa,UAG2D;AAU5E,4BAHI,aAAa,MACb,aAAa,QAUvB;AAUM,2BAHI,aAAa,MACb,aAAa,QAMvB;AAUM,wBAHI,aAAa,MACb,aAAa,iBAevB;AASM,yBAFI,aAAa,iBAMvB;AAUM,iCAHI,aAAa,UACb,MAAM,QAQhB;AAQM,6BAHI,aAAa,MACb,aAAa,iBAUvB;AAQM,6BAHI,aAAa,SACb,MAAM,iBAShB;AAQM,wBAHI,aAAa,MACb,aAAa,iBAavB;AAWM,0BAJI,aAAa,KACb,MAAM,KACN,aAAa,iBAcvB;AAQM,wBAHI,aAAa,MACb,aAAa,iBASvB;AAQM,2BAHI,aAAa,MACb,aAAa,WAQvB;AAgCM,sCAFI,aAAa,WAYvB;AAKM,0CAFI,MAAM,iBAOhB;AAQM,iCAHI,UAAU,KACV,aAAa,2BAE0G;AAElI;IACE;;OAEG;IACH,eAFW,aAAa,EAKvB;IAFC,2BAAsC;IACtC,iBAAU;IAGZ;;OAEG;IACH,SAFW,MAAM,QAOhB;IAED,0CAEC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-uncached.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-uncached.d.ts deleted file mode 100644 index 5adc6e2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-uncached.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export class RabinUncachedEncoder { - /** - * @param {Uint8Array} m assert(m[0] === 1) - */ - constructor(m: Uint8Array); - m: Uint8Array; - blen: number; - bs: Uint8Array; - /** - * This describes the position of the most significant byte (starts with 0 and increases with - * shift) - */ - bpos: number; - /** - * Add/Xor/Substract bytes. - * - * Discards bytes that are out of range. - * @todo put this in function or inline - * - * @param {Uint8Array} cs - */ - add(cs: Uint8Array): void; - /** - * @param {number} byte - */ - write(byte: number): void; - getFingerprint(): Uint8Array; -} -//# sourceMappingURL=rabin-uncached.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-uncached.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-uncached.d.ts.map deleted file mode 100644 index 0bee7a3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin-uncached.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin-uncached.d.ts","sourceRoot":"","sources":["../../src/hash/rabin-uncached.js"],"names":[],"mappings":"AAUA;IACE;;OAEG;IACH,eAFW,UAAU,EAWpB;IARC,+BAAU;IACV,aAAwB;IACxB,4BAAmC;IACnC;;;OAGG;IACH,aAAa;IAGf;;;;;;;OAOG;IACH,QAFW,UAAU,QAQpB;IAED;;OAEG;IACH,YAFW,MAAM,QAgBhB;IAED,0CAMC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin.d.ts deleted file mode 100644 index cd3061a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export const StandardIrreducible8: Uint8Array; -export const StandardIrreducible16: Uint8Array; -export const StandardIrreducible32: Uint8Array; -export const StandardIrreducible64: Uint8Array; -export const StandardIrreducible128: Uint8Array; -export class RabinEncoder { - /** - * @param {Uint8Array} m assert(m[0] === 1) - */ - constructor(m: Uint8Array); - m: Uint8Array; - blen: number; - bs: Uint8Array; - cache: Uint8Array; - /** - * This describes the position of the most significant byte (starts with 0 and increases with - * shift) - */ - bpos: number; - /** - * @param {number} byte - */ - write(byte: number): void; - getFingerprint(): Uint8Array; -} -export function fingerprint(irreducible: Uint8Array, data: Uint8Array): Uint8Array; -//# sourceMappingURL=rabin.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin.d.ts.map deleted file mode 100644 index 18504b6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/rabin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rabin.d.ts","sourceRoot":"","sources":["../../src/hash/rabin.js"],"names":[],"mappings":"AAUA,2DAA2E;AAC3E,4DAAiF;AACjF,4DAA2F;AAC3F,4DAA8G;AAC9G,6DAAkJ;AAmClJ;IACE;;OAEG;IACH,eAFW,UAAU,EAYpB;IATC,+BAAU;IACV,aAAwB;IACxB,4BAAmC;IACnC,+BAA2B;IAC3B;;;OAGG;IACH,aAAa;IAGf;;OAEG;IACH,YAFW,MAAM,QAYhB;IAED,0CAMC;CACF;AAMM,yCAHI,UAAU,QACV,UAAU,2BAQpB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.d.ts deleted file mode 100644 index b3014a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function digest(data: Uint8Array): Uint8Array; -//# sourceMappingURL=sha256.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.d.ts.map deleted file mode 100644 index 0d76cff..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.d.ts","sourceRoot":"","sources":["../../src/hash/sha256.js"],"names":[],"mappings":"AA+KO,6BAFI,UAAU,2BAEkC"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.node.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.node.d.ts deleted file mode 100644 index e5e6591..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.node.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function digest(data: Uint8Array): Buffer; -//# sourceMappingURL=sha256.node.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.node.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.node.d.ts.map deleted file mode 100644 index 9643cc2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/hash/sha256.node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.node.d.ts","sourceRoot":"","sources":["../../src/hash/sha256.node.js"],"names":[],"mappings":"AAKO,6BAFI,UAAU,2BAMpB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Mt19937.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Mt19937.d.ts deleted file mode 100644 index 8b499e0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Mt19937.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This is a port of Shawn Cokus's implementation of the original Mersenne Twister algorithm (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/MTARCOK/mt19937ar-cok.c). - * MT has a very high period of 2^19937. Though the authors of xorshift describe that a high period is not - * very relevant (http://vigna.di.unimi.it/xorshift/). It is four times slower than xoroshiro128plus and - * needs to recompute its state after generating 624 numbers. - * - * ```js - * const gen = new Mt19937(new Date().getTime()) - * console.log(gen.next()) - * ``` - * - * @public - */ -export class Mt19937 { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor(seed: number); - seed: number; - _state: Uint32Array; - _i: number; - /** - * Generate a random signed integer. - * - * @return {Number} A 32 bit signed integer. - */ - next(): number; -} -//# sourceMappingURL=Mt19937.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Mt19937.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Mt19937.d.ts.map deleted file mode 100644 index a44f8a8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Mt19937.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Mt19937.d.ts","sourceRoot":"","sources":["../../src/prng/Mt19937.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;GAYG;AACH;IACE;;OAEG;IACH,kBAFW,MAAM,EAYhB;IATC,aAAgB;IAMhB,iCAAmB;IACnB,WAAW;IAIb;;;;OAIG;IACH,eAYC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xoroshiro128plus.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xoroshiro128plus.d.ts deleted file mode 100644 index 5f2f9fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xoroshiro128plus.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This is a variant of xoroshiro128plus - the fastest full-period generator passing BigCrush without systematic failures. - * - * This implementation follows the idea of the original xoroshiro128plus implementation, - * but is optimized for the JavaScript runtime. I.e. - * * The operations are performed on 32bit integers (the original implementation works with 64bit values). - * * The initial 128bit state is computed based on a 32bit seed and Xorshift32. - * * This implementation returns two 32bit values based on the 64bit value that is computed by xoroshiro128plus. - * Caution: The last addition step works slightly different than in the original implementation - the add carry of the - * first 32bit addition is not carried over to the last 32bit. - * - * [Reference implementation](http://vigna.di.unimi.it/xorshift/xoroshiro128plus.c) - */ -export class Xoroshiro128plus { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor(seed: number); - seed: number; - state: Uint32Array; - _fresh: boolean; - /** - * @return {number} Float/Double in [0,1) - */ - next(): number; -} -//# sourceMappingURL=Xoroshiro128plus.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xoroshiro128plus.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xoroshiro128plus.d.ts.map deleted file mode 100644 index acbed76..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xoroshiro128plus.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Xoroshiro128plus.d.ts","sourceRoot":"","sources":["../../src/prng/Xoroshiro128plus.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;GAYG;AACH;IACE;;OAEG;IACH,kBAFW,MAAM,EAWhB;IARC,aAAgB;IAGhB,gCAA+B;IAI/B,gBAAkB;IAGpB;;OAEG;IACH,QAFY,MAAM,CA4BjB;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xorshift32.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xorshift32.d.ts deleted file mode 100644 index 436b8bc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xorshift32.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Xorshift32 is a very simple but elegang PRNG with a period of `2^32-1`. - */ -export class Xorshift32 { - /** - * @param {number} seed Unsigned 32 bit number - */ - constructor(seed: number); - seed: number; - /** - * @type {number} - */ - _state: number; - /** - * Generate a random signed integer. - * - * @return {Number} A 32 bit signed integer. - */ - next(): number; -} -//# sourceMappingURL=Xorshift32.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xorshift32.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xorshift32.d.ts.map deleted file mode 100644 index 46ec4e1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/prng/Xorshift32.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Xorshift32.d.ts","sourceRoot":"","sources":["../../src/prng/Xorshift32.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IACE;;OAEG;IACH,kBAFW,MAAM,EAQhB;IALC,aAAgB;IAChB;;OAEG;IACH,QAFU,MAAM,CAEE;IAGpB;;;;OAIG;IACH,eAOC;CACF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/equality.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/equality.d.ts deleted file mode 100644 index 1848ba1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/equality.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const EqualityTraitSymbol: unique symbol; -export function equals(a: NoInfer, b: T): boolean; -export type EqualityTrait = { - [EqualityTraitSymbol]: (other: EqualityTrait) => boolean; -}; -//# sourceMappingURL=equality.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/equality.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/equality.d.ts.map deleted file mode 100644 index cbe1640..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/equality.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"equality.d.ts","sourceRoot":"","sources":["../../src/trait/equality.js"],"names":[],"mappings":"AAAA,gDAAqD;AAyB9C,uBALsB,CAAC,SAAhB,aAAc,KACjB,OAAO,CAAC,CAAC,CAAC,KACV,CAAC,GACA,OAAO,CAEgE;4BAtBtE;IAAE,CAAC,mBAAmB,CAAC,EAAC,CAAC,KAAK,EAAC,aAAa,KAAG,OAAO,CAAA;CAAE"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/fingerprint.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/fingerprint.d.ts deleted file mode 100644 index 1a31d75..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/fingerprint.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const FingerprintTraitSymbol: unique symbol; -export function fingerprint(a: Fingerprintable): string; -/** - * When implementing this trait, it is recommended to write some sort of "magic number" first to - * ensure that different types of objects don't have the same fingerprint. - * - * The recommended pracice is to generate a random u32 number as your magic number. e.g. using - * `console.log(random.uint32().toString(16))` - */ -export type Fingerprintable = { - [FingerprintTraitSymbol]: () => string; -} | import("../encoding.js").AnyEncodable; -//# sourceMappingURL=fingerprint.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/fingerprint.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/fingerprint.d.ts.map deleted file mode 100644 index 12a26f3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/fingerprint.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../../src/trait/fingerprint.js"],"names":[],"mappings":"AAIA,mDAA2D;AAgBpD,+BAHI,eAAe,GACd,MAAM,CAE6P;;;;;;;;8BAPlQ;IAAE,CAAC,sBAAsB,CAAC,EAAC,MAAI,MAAM,CAAA;CAAE,GAAG,OAAO,gBAAgB,EAAE,YAAY"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/traits.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/traits.d.ts deleted file mode 100644 index e0084f2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/traits.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./equality.js"; -export * from "./fingerprint.js"; -//# sourceMappingURL=traits.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/traits.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/traits.d.ts.map deleted file mode 100644 index 78ca7d7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/types/trait/traits.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traits.d.ts","sourceRoot":"","sources":["../../src/trait/traits.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.d.ts deleted file mode 100644 index ed2895c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function decodeQueryParams(url: string): { - [x: string]: string; -}; -export function encodeQueryParams(params: { - [x: string]: string; -}): string; -//# sourceMappingURL=url.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.d.ts.map deleted file mode 100644 index 4339550..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["url.js"],"names":[],"mappings":"AAcO,uCAHI,MAAM;;EAkBhB;AAMM;;IAFK,MAAM,CAGmF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.js deleted file mode 100644 index 4419820..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Utility module to work with urls. - * - * @module url - */ - -import * as object from './object.js' - -/** - * Parse query parameters from an url. - * - * @param {string} url - * @return {Object} - */ -export const decodeQueryParams = url => { - /** - * @type {Object} - */ - const query = {} - const urlQuerySplit = url.split('?') - const pairs = urlQuerySplit[urlQuerySplit.length - 1].split('&') - for (let i = 0; i < pairs.length; i++) { - const item = pairs[i] - if (item.length > 0) { - const pair = item.split('=') - query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || '') - } - } - return query -} - -/** - * @param {Object} params - * @return {string} - */ -export const encodeQueryParams = params => - object.map(params, (val, key) => `${encodeURIComponent(key)}=${encodeURIComponent(val)}`).join('&') diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.test.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.test.d.ts deleted file mode 100644 index 027c9ee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.test.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function testUrlParamQuery(tc: t.TestCase): void; -import * as t from './testing.js'; -//# sourceMappingURL=url.test.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.test.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.test.d.ts.map deleted file mode 100644 index f3c3ee3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"url.test.d.ts","sourceRoot":"","sources":["url.test.js"],"names":[],"mappings":"AAcO,sCAFI,CAAC,CAAC,QAAQ,QAapB;mBAzBkB,cAAc"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.d.ts deleted file mode 100644 index d9e514e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const subtle: SubtleCrypto; -export const getRandomValues: (array: T) => T; -//# sourceMappingURL=webcrypto.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.d.ts.map deleted file mode 100644 index b0b4611..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.d.ts","sourceRoot":"","sources":["webcrypto.js"],"names":[],"mappings":"AAEA,kCAAmC;AACnC,yEAAkE"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.d.ts deleted file mode 100644 index ec6b5e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const subtle: any; -export const getRandomValues: any; -//# sourceMappingURL=webcrypto.deno.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.d.ts.map deleted file mode 100644 index 73ccad2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.deno.d.ts","sourceRoot":"","sources":["webcrypto.deno.js"],"names":[],"mappings":"AACA,yBAAwD;AAExD,kCAAuF"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.js deleted file mode 100644 index f94cdac..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.deno.js +++ /dev/null @@ -1,4 +0,0 @@ -// eslint-disable-next-line -export const subtle = /** @type {any} */ (crypto).subtle -// eslint-disable-next-line -export const getRandomValues = /** @type {any} */ (crypto).getRandomValues.bind(crypto) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.js deleted file mode 100644 index 3849bf4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.js +++ /dev/null @@ -1,4 +0,0 @@ -/* eslint-env browser */ - -export const subtle = crypto.subtle -export const getRandomValues = crypto.getRandomValues.bind(crypto) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.d.ts deleted file mode 100644 index 0026211..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const subtle: any; -export const getRandomValues: any; -//# sourceMappingURL=webcrypto.node.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.d.ts.map deleted file mode 100644 index 5e9eb92..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.node.d.ts","sourceRoot":"","sources":["webcrypto.node.js"],"names":[],"mappings":"AAEA,yBAA2D;AAC3D,kCAA6F"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.js deleted file mode 100644 index f37a100..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.js +++ /dev/null @@ -1,4 +0,0 @@ -import { webcrypto } from 'node:crypto' - -export const subtle = /** @type {any} */ (webcrypto).subtle -export const getRandomValues = /** @type {any} */ (webcrypto).getRandomValues.bind(webcrypto) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.d.ts deleted file mode 100644 index 59dad39..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const subtle: any; -export const getRandomValues: any; -//# sourceMappingURL=webcrypto.react-native.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.d.ts.map deleted file mode 100644 index ae97c73..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webcrypto.react-native.d.ts","sourceRoot":"","sources":["webcrypto.react-native.js"],"names":[],"mappings":"AAKA,yBAAsC;AACtC,kCAAwE"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.js deleted file mode 100644 index b16091a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.react-native.js +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-ignore -import webcrypto from 'isomorphic-webcrypto/src/react-native' - -webcrypto.ensureSecure() - -export const subtle = webcrypto.subtle -export const getRandomValues = webcrypto.getRandomValues.bind(webcrypto) diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.d.ts b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.d.ts deleted file mode 100644 index 7adeac1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @deprecated - * @extends Observable - */ -export class WebsocketClient extends Observable { - /** - * @param {string} url - * @param {object} opts - * @param {'arraybuffer' | 'blob' | null} [opts.binaryType] Set `ws.binaryType` - */ - constructor(url: string, { binaryType }?: { - binaryType?: "arraybuffer" | "blob" | null | undefined; - }); - url: string; - /** - * @type {WebSocket?} - */ - ws: WebSocket | null; - binaryType: "arraybuffer" | "blob" | null; - connected: boolean; - connecting: boolean; - unsuccessfulReconnects: number; - lastMessageReceived: number; - /** - * Whether to connect to other peers or not - * @type {boolean} - */ - shouldConnect: boolean; - _checkInterval: NodeJS.Timeout; - /** - * @param {any} message - */ - send(message: any): void; - disconnect(): void; - connect(): void; -} -import { Observable } from './observable.js'; -//# sourceMappingURL=websocket.d.ts.map \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.d.ts.map b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.d.ts.map deleted file mode 100644 index 7c2fce6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["websocket.js"],"names":[],"mappings":"AAwFA;;;GAGG;AACH;IACE;;;;OAIG;IACH,iBAJW,MAAM,mBAEd;QAA6C,UAAU;KACzD,EA0BA;IAvBC,YAAc;IACd;;OAEG;IACH,IAFU,SAAS,OAAC,CAEN;IACd,0CAAoC;IACpC,mBAAsB;IACtB,oBAAuB;IACvB,+BAA+B;IAC/B,4BAA4B;IAC5B;;;OAGG;IACH,eAFU,OAAO,CAEQ;IACzB,+BAM+B;IAIjC;;OAEG;IACH,cAFW,GAAG,QAMb;IAQD,mBAKC;IAED,gBAKC;CACF;2BA/I0B,iBAAiB"} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.js b/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.js deleted file mode 100644 index 8ce1e8f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/websocket.js +++ /dev/null @@ -1,154 +0,0 @@ -/* eslint-env browser */ - -/** - * Tiny websocket connection handler. - * - * Implements exponential backoff reconnects, ping/pong, and a nice event system using [lib0/observable]. - * - * @module websocket - */ - -import { Observable } from './observable.js' -import * as time from './time.js' -import * as math from './math.js' - -const reconnectTimeoutBase = 1200 -const maxReconnectTimeout = 2500 -// @todo - this should depend on awareness.outdatedTime -const messageReconnectTimeout = 30000 - -/** - * @param {WebsocketClient} wsclient - */ -const setupWS = (wsclient) => { - if (wsclient.shouldConnect && wsclient.ws === null) { - const websocket = new WebSocket(wsclient.url) - const binaryType = wsclient.binaryType - /** - * @type {any} - */ - let pingTimeout = null - if (binaryType) { - websocket.binaryType = binaryType - } - wsclient.ws = websocket - wsclient.connecting = true - wsclient.connected = false - websocket.onmessage = event => { - wsclient.lastMessageReceived = time.getUnixTime() - const data = event.data - const message = typeof data === 'string' ? JSON.parse(data) : data - if (message && message.type === 'pong') { - clearTimeout(pingTimeout) - pingTimeout = setTimeout(sendPing, messageReconnectTimeout / 2) - } - wsclient.emit('message', [message, wsclient]) - } - /** - * @param {any} error - */ - const onclose = error => { - if (wsclient.ws !== null) { - wsclient.ws = null - wsclient.connecting = false - if (wsclient.connected) { - wsclient.connected = false - wsclient.emit('disconnect', [{ type: 'disconnect', error }, wsclient]) - } else { - wsclient.unsuccessfulReconnects++ - } - // Start with no reconnect timeout and increase timeout by - // log10(wsUnsuccessfulReconnects). - // The idea is to increase reconnect timeout slowly and have no reconnect - // timeout at the beginning (log(1) = 0) - setTimeout(setupWS, math.min(math.log10(wsclient.unsuccessfulReconnects + 1) * reconnectTimeoutBase, maxReconnectTimeout), wsclient) - } - clearTimeout(pingTimeout) - } - const sendPing = () => { - if (wsclient.ws === websocket) { - wsclient.send({ - type: 'ping' - }) - } - } - websocket.onclose = () => onclose(null) - websocket.onerror = error => onclose(error) - websocket.onopen = () => { - wsclient.lastMessageReceived = time.getUnixTime() - wsclient.connecting = false - wsclient.connected = true - wsclient.unsuccessfulReconnects = 0 - wsclient.emit('connect', [{ type: 'connect' }, wsclient]) - // set ping - pingTimeout = setTimeout(sendPing, messageReconnectTimeout / 2) - } - } -} - -/** - * @deprecated - * @extends Observable - */ -export class WebsocketClient extends Observable { - /** - * @param {string} url - * @param {object} opts - * @param {'arraybuffer' | 'blob' | null} [opts.binaryType] Set `ws.binaryType` - */ - constructor (url, { binaryType } = {}) { - super() - this.url = url - /** - * @type {WebSocket?} - */ - this.ws = null - this.binaryType = binaryType || null - this.connected = false - this.connecting = false - this.unsuccessfulReconnects = 0 - this.lastMessageReceived = 0 - /** - * Whether to connect to other peers or not - * @type {boolean} - */ - this.shouldConnect = true - this._checkInterval = setInterval(() => { - if (this.connected && messageReconnectTimeout < time.getUnixTime() - this.lastMessageReceived) { - // no message received in a long time - not even your own awareness - // updates (which are updated every 15 seconds) - /** @type {WebSocket} */ (this.ws).close() - } - }, messageReconnectTimeout / 2) - setupWS(this) - } - - /** - * @param {any} message - */ - send (message) { - if (this.ws) { - this.ws.send(JSON.stringify(message)) - } - } - - destroy () { - clearInterval(this._checkInterval) - this.disconnect() - super.destroy() - } - - disconnect () { - this.shouldConnect = false - if (this.ws !== null) { - this.ws.close() - } - } - - connect () { - this.shouldConnect = true - if (!this.connected && this.ws === null) { - setupWS(this) - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/LICENSE b/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/LICENSE deleted file mode 100644 index da1dff9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2024 Nick Frasser - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/README.md b/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/README.md deleted file mode 100644 index a61576b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# linkifyjs - -[![npm version](https://badge.fury.io/js/linkifyjs.svg)](https://www.npmjs.com/package/linkifyjs) - -Core [Linkify](https://linkify.js.org/) JavaScript library. Use Linkify and its -related packages to detect URLs, email addresses and more in plain-text strings and convert them to HTML `` anchor tags. - -## Installation - -Install from the command line with NPM - -``` -npm install linkifyjs -``` - -Import into your JavaScript with `require` - -```js -const linkify = require('linkifyjs'); -``` - -or with ES modules - -```js -import * as linkify from 'linkifyjs'; -``` - -Separate packages are available for each of the following features: - -- [HTML strings](../linkify-html) -- [React component](../linkify-react) -- [jQuery plugin](../linkify-jquery) -- [DOM Elements](../linkify-element) -- [Plain-text](../linkify-string) -- [#hashtag plugin](../linkify-plugin-hashtag) -- [@mention plugin](../linkify-plugin-mention) -- [#ticket plugin](../linkify-plugin-ticket) -- [IP address plugin](../linkify-plugin-ip) -- [Keyword plugin](../linkify-plugin-keyword) - -## Usage - -[Read the full documentation](https://linkify.js.org/docs/linkifyjs.html). - -## License - -MIT diff --git a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.cjs b/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.cjs deleted file mode 100644 index 4d4f847..0000000 --- a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.cjs +++ /dev/null @@ -1,1854 +0,0 @@ -'use strict'; - -// THIS FILE IS AUTOMATICALLY GENERATED DO NOT EDIT DIRECTLY -// See update-tlds.js for encoding/decoding format -// https://data.iana.org/TLD/tlds-alpha-by-domain.txt -const encodedTlds = 'aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2'; -// Internationalized domain names containing non-ASCII -const encodedUtlds = 'ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2'; - -/** - * Finite State Machine generation utilities - */ - -/** - * @template T - * @typedef {{ [group: string]: T[] }} Collections - */ - -/** - * @typedef {{ [group: string]: true }} Flags - */ - -// Keys in scanner Collections instances -const numeric = 'numeric'; -const ascii = 'ascii'; -const alpha = 'alpha'; -const asciinumeric = 'asciinumeric'; -const alphanumeric = 'alphanumeric'; -const domain = 'domain'; -const emoji = 'emoji'; -const scheme = 'scheme'; -const slashscheme = 'slashscheme'; -const whitespace = 'whitespace'; - -/** - * @template T - * @param {string} name - * @param {Collections} groups to register in - * @returns {T[]} Current list of tokens in the given collection - */ -function registerGroup(name, groups) { - if (!(name in groups)) { - groups[name] = []; - } - return groups[name]; -} - -/** - * @template T - * @param {T} t token to add - * @param {Collections} groups - * @param {Flags} flags - */ -function addToGroups(t, flags, groups) { - if (flags[numeric]) { - flags[asciinumeric] = true; - flags[alphanumeric] = true; - } - if (flags[ascii]) { - flags[asciinumeric] = true; - flags[alpha] = true; - } - if (flags[asciinumeric]) { - flags[alphanumeric] = true; - } - if (flags[alpha]) { - flags[alphanumeric] = true; - } - if (flags[alphanumeric]) { - flags[domain] = true; - } - if (flags[emoji]) { - flags[domain] = true; - } - for (const k in flags) { - const group = registerGroup(k, groups); - if (group.indexOf(t) < 0) { - group.push(t); - } - } -} - -/** - * @template T - * @param {T} t token to check - * @param {Collections} groups - * @returns {Flags} group flags that contain this token - */ -function flagsForToken(t, groups) { - const result = {}; - for (const c in groups) { - if (groups[c].indexOf(t) >= 0) { - result[c] = true; - } - } - return result; -} - -/** - * @template T - * @typedef {null | T } Transition - */ - -/** - * Define a basic state machine state. j is the list of character transitions, - * jr is the list of regex-match transitions, jd is the default state to - * transition to t is the accepting token type, if any. If this is the terminal - * state, then it does not emit a token. - * - * The template type T represents the type of the token this state accepts. This - * should be a string (such as of the token exports in `text.js`) or a - * MultiToken subclass (from `multi.js`) - * - * @template T - * @param {T} [token] Token that this state emits - */ -function State(token = null) { - // this.n = null; // DEBUG: State name - /** @type {{ [input: string]: State }} j */ - this.j = {}; // IMPLEMENTATION 1 - // this.j = []; // IMPLEMENTATION 2 - /** @type {[RegExp, State][]} jr */ - this.jr = []; - /** @type {?State} jd */ - this.jd = null; - /** @type {?T} t */ - this.t = token; -} - -/** - * Scanner token groups - * @type Collections - */ -State.groups = {}; -State.prototype = { - accepts() { - return !!this.t; - }, - /** - * Follow an existing transition from the given input to the next state. - * Does not mutate. - * @param {string} input character or token type to transition on - * @returns {?State} the next state, if any - */ - go(input) { - const state = this; - const nextState = state.j[input]; - if (nextState) { - return nextState; - } - for (let i = 0; i < state.jr.length; i++) { - const regex = state.jr[i][0]; - const nextState = state.jr[i][1]; // note: might be empty to prevent default jump - if (nextState && regex.test(input)) { - return nextState; - } - } - // Nowhere left to jump! Return default, if any - return state.jd; - }, - /** - * Whether the state has a transition for the given input. Set the second - * argument to true to only look for an exact match (and not a default or - * regular-expression-based transition) - * @param {string} input - * @param {boolean} exactOnly - */ - has(input, exactOnly = false) { - return exactOnly ? input in this.j : !!this.go(input); - }, - /** - * Short for "transition all"; create a transition from the array of items - * in the given list to the same final resulting state. - * @param {string | string[]} inputs Group of inputs to transition on - * @param {Transition | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - */ - ta(inputs, next, flags, groups) { - for (let i = 0; i < inputs.length; i++) { - this.tt(inputs[i], next, flags, groups); - } - }, - /** - * Short for "take regexp transition"; defines a transition for this state - * when it encounters a token which matches the given regular expression - * @param {RegExp} regexp Regular expression transition (populate first) - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - tr(regexp, next, flags, groups) { - groups = groups || State.groups; - let nextState; - if (next && next.j) { - nextState = next; - } else { - // Token with maybe token groups - nextState = new State(next); - if (flags && groups) { - addToGroups(next, flags, groups); - } - } - this.jr.push([regexp, nextState]); - return nextState; - }, - /** - * Short for "take transitions", will take as many sequential transitions as - * the length of the given input and returns the - * resulting final state. - * @param {string | string[]} input - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - ts(input, next, flags, groups) { - let state = this; - const len = input.length; - if (!len) { - return state; - } - for (let i = 0; i < len - 1; i++) { - state = state.tt(input[i]); - } - return state.tt(input[len - 1], next, flags, groups); - }, - /** - * Short for "take transition", this is a method for building/working with - * state machines. - * - * If a state already exists for the given input, returns it. - * - * If a token is specified, that state will emit that token when reached by - * the linkify engine. - * - * If no state exists, it will be initialized with some default transitions - * that resemble existing default transitions. - * - * If a state is given for the second argument, that state will be - * transitioned to on the given input regardless of what that input - * previously did. - * - * Specify a token group flags to define groups that this token belongs to. - * The token will be added to corresponding entires in the given groups - * object. - * - * @param {string} input character, token type to transition on - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of groups - * @returns {State} taken after the given input - */ - tt(input, next, flags, groups) { - groups = groups || State.groups; - const state = this; - - // Check if existing state given, just a basic transition - if (next && next.j) { - state.j[input] = next; - return next; - } - const t = next; - - // Take the transition with the usual default mechanisms and use that as - // a template for creating the next state - let nextState, - templateState = state.go(input); - if (templateState) { - nextState = new State(); - Object.assign(nextState.j, templateState.j); - nextState.jr.push.apply(nextState.jr, templateState.jr); - nextState.jd = templateState.jd; - nextState.t = templateState.t; - } else { - nextState = new State(); - } - if (t) { - // Ensure newly token is in the same groups as the old token - if (groups) { - if (nextState.t && typeof nextState.t === 'string') { - const allFlags = Object.assign(flagsForToken(nextState.t, groups), flags); - addToGroups(t, allFlags, groups); - } else if (flags) { - addToGroups(t, flags, groups); - } - } - nextState.t = t; // overwrite anything that was previously there - } - state.j[input] = nextState; - return nextState; - } -}; - -// Helper functions to improve minification (not exported outside linkifyjs module) - -/** - * @template T - * @param {State} state - * @param {string | string[]} input - * @param {Flags} [flags] - * @param {Collections} [groups] - */ -const ta = (state, input, next, flags, groups) => state.ta(input, next, flags, groups); - -/** - * @template T - * @param {State} state - * @param {RegExp} regexp - * @param {T | State} [next] - * @param {Flags} [flags] - * @param {Collections} [groups] - */ -const tr = (state, regexp, next, flags, groups) => state.tr(regexp, next, flags, groups); - -/** - * @template T - * @param {State} state - * @param {string | string[]} input - * @param {T | State} [next] - * @param {Flags} [flags] - * @param {Collections} [groups] - */ -const ts = (state, input, next, flags, groups) => state.ts(input, next, flags, groups); - -/** - * @template T - * @param {State} state - * @param {string} input - * @param {T | State} [next] - * @param {Collections} [groups] - * @param {Flags} [flags] - */ -const tt = (state, input, next, flags, groups) => state.tt(input, next, flags, groups); - -/****************************************************************************** -Text Tokens -Identifiers for token outputs from the regexp scanner -******************************************************************************/ - -// A valid web domain token -const WORD = 'WORD'; // only contains a-z -const UWORD = 'UWORD'; // contains letters other than a-z, used for IDN -const ASCIINUMERICAL = 'ASCIINUMERICAL'; // contains a-z, 0-9 -const ALPHANUMERICAL = 'ALPHANUMERICAL'; // contains numbers and letters other than a-z, used for IDN - -// Special case of word -const LOCALHOST = 'LOCALHOST'; - -// Valid top-level domain, special case of WORD (see tlds.js) -const TLD = 'TLD'; - -// Valid IDN TLD, special case of UWORD (see tlds.js) -const UTLD = 'UTLD'; - -// The scheme portion of a web URI protocol. Supported types include: `mailto`, -// `file`, and user-defined custom protocols. Limited to schemes that contain -// only letters -const SCHEME = 'SCHEME'; - -// Similar to SCHEME, except makes distinction for schemes that must always be -// followed by `://`, not just `:`. Supported types include `http`, `https`, -// `ftp`, `ftps` -const SLASH_SCHEME = 'SLASH_SCHEME'; - -// Any sequence of digits 0-9 -const NUM = 'NUM'; - -// Any number of consecutive whitespace characters that are not newline -const WS = 'WS'; - -// New line (unix style) -const NL = 'NL'; // \n - -// Opening/closing bracket classes -// TODO: Rename OPEN -> LEFT and CLOSE -> RIGHT in v5 to fit with Unicode names -// Also rename angle brackes to LESSTHAN and GREATER THAN -const OPENBRACE = 'OPENBRACE'; // { -const CLOSEBRACE = 'CLOSEBRACE'; // } -const OPENBRACKET = 'OPENBRACKET'; // [ -const CLOSEBRACKET = 'CLOSEBRACKET'; // ] -const OPENPAREN = 'OPENPAREN'; // ( -const CLOSEPAREN = 'CLOSEPAREN'; // ) -const OPENANGLEBRACKET = 'OPENANGLEBRACKET'; // < -const CLOSEANGLEBRACKET = 'CLOSEANGLEBRACKET'; // > -const FULLWIDTHLEFTPAREN = 'FULLWIDTHLEFTPAREN'; // ( -const FULLWIDTHRIGHTPAREN = 'FULLWIDTHRIGHTPAREN'; // ) -const LEFTCORNERBRACKET = 'LEFTCORNERBRACKET'; // 「 -const RIGHTCORNERBRACKET = 'RIGHTCORNERBRACKET'; // 」 -const LEFTWHITECORNERBRACKET = 'LEFTWHITECORNERBRACKET'; // 『 -const RIGHTWHITECORNERBRACKET = 'RIGHTWHITECORNERBRACKET'; // 』 -const FULLWIDTHLESSTHAN = 'FULLWIDTHLESSTHAN'; // < -const FULLWIDTHGREATERTHAN = 'FULLWIDTHGREATERTHAN'; // > - -// Various symbols -const AMPERSAND = 'AMPERSAND'; // & -const APOSTROPHE = 'APOSTROPHE'; // ' -const ASTERISK = 'ASTERISK'; // * -const AT = 'AT'; // @ -const BACKSLASH = 'BACKSLASH'; // \ -const BACKTICK = 'BACKTICK'; // ` -const CARET = 'CARET'; // ^ -const COLON = 'COLON'; // : -const COMMA = 'COMMA'; // , -const DOLLAR = 'DOLLAR'; // $ -const DOT = 'DOT'; // . -const EQUALS = 'EQUALS'; // = -const EXCLAMATION = 'EXCLAMATION'; // ! -const HYPHEN = 'HYPHEN'; // - -const PERCENT = 'PERCENT'; // % -const PIPE = 'PIPE'; // | -const PLUS = 'PLUS'; // + -const POUND = 'POUND'; // # -const QUERY = 'QUERY'; // ? -const QUOTE = 'QUOTE'; // " -const FULLWIDTHMIDDLEDOT = 'FULLWIDTHMIDDLEDOT'; // ・ - -const SEMI = 'SEMI'; // ; -const SLASH = 'SLASH'; // / -const TILDE = 'TILDE'; // ~ -const UNDERSCORE = 'UNDERSCORE'; // _ - -// Emoji symbol -const EMOJI$1 = 'EMOJI'; - -// Default token - anything that is not one of the above -const SYM = 'SYM'; - -var tk = /*#__PURE__*/Object.freeze({ - __proto__: null, - ALPHANUMERICAL: ALPHANUMERICAL, - AMPERSAND: AMPERSAND, - APOSTROPHE: APOSTROPHE, - ASCIINUMERICAL: ASCIINUMERICAL, - ASTERISK: ASTERISK, - AT: AT, - BACKSLASH: BACKSLASH, - BACKTICK: BACKTICK, - CARET: CARET, - CLOSEANGLEBRACKET: CLOSEANGLEBRACKET, - CLOSEBRACE: CLOSEBRACE, - CLOSEBRACKET: CLOSEBRACKET, - CLOSEPAREN: CLOSEPAREN, - COLON: COLON, - COMMA: COMMA, - DOLLAR: DOLLAR, - DOT: DOT, - EMOJI: EMOJI$1, - EQUALS: EQUALS, - EXCLAMATION: EXCLAMATION, - FULLWIDTHGREATERTHAN: FULLWIDTHGREATERTHAN, - FULLWIDTHLEFTPAREN: FULLWIDTHLEFTPAREN, - FULLWIDTHLESSTHAN: FULLWIDTHLESSTHAN, - FULLWIDTHMIDDLEDOT: FULLWIDTHMIDDLEDOT, - FULLWIDTHRIGHTPAREN: FULLWIDTHRIGHTPAREN, - HYPHEN: HYPHEN, - LEFTCORNERBRACKET: LEFTCORNERBRACKET, - LEFTWHITECORNERBRACKET: LEFTWHITECORNERBRACKET, - LOCALHOST: LOCALHOST, - NL: NL, - NUM: NUM, - OPENANGLEBRACKET: OPENANGLEBRACKET, - OPENBRACE: OPENBRACE, - OPENBRACKET: OPENBRACKET, - OPENPAREN: OPENPAREN, - PERCENT: PERCENT, - PIPE: PIPE, - PLUS: PLUS, - POUND: POUND, - QUERY: QUERY, - QUOTE: QUOTE, - RIGHTCORNERBRACKET: RIGHTCORNERBRACKET, - RIGHTWHITECORNERBRACKET: RIGHTWHITECORNERBRACKET, - SCHEME: SCHEME, - SEMI: SEMI, - SLASH: SLASH, - SLASH_SCHEME: SLASH_SCHEME, - SYM: SYM, - TILDE: TILDE, - TLD: TLD, - UNDERSCORE: UNDERSCORE, - UTLD: UTLD, - UWORD: UWORD, - WORD: WORD, - WS: WS -}); - -// Note that these two Unicode ones expand into a really big one with Babel -const ASCII_LETTER = /[a-z]/; -const LETTER = /\p{L}/u; // Any Unicode character with letter data type -const EMOJI = /\p{Emoji}/u; // Any Unicode emoji character -const EMOJI_VARIATION$1 = /\ufe0f/; -const DIGIT = /\d/; -const SPACE = /\s/; - -var regexp = /*#__PURE__*/Object.freeze({ - __proto__: null, - ASCII_LETTER: ASCII_LETTER, - DIGIT: DIGIT, - EMOJI: EMOJI, - EMOJI_VARIATION: EMOJI_VARIATION$1, - LETTER: LETTER, - SPACE: SPACE -}); - -/** - The scanner provides an interface that takes a string of text as input, and - outputs an array of tokens instances that can be used for easy URL parsing. -*/ - -const CR = '\r'; // carriage-return character -const LF = '\n'; // line-feed character -const EMOJI_VARIATION = '\ufe0f'; // Variation selector, follows heart and others -const EMOJI_JOINER = '\u200d'; // zero-width joiner -const OBJECT_REPLACEMENT = '\ufffc'; // whitespace placeholder that sometimes appears in rich text editors - -let tlds = null, - utlds = null; // don't change so only have to be computed once - -/** - * Scanner output token: - * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD') - * - `v` is the value of the token (e.g., '123', '❤️', 'com') - * - `s` is the start index of the token in the original string - * - `e` is the end index of the token in the original string - * @typedef {{t: string, v: string, s: number, e: number}} Token - */ - -/** - * @template T - * @typedef {{ [collection: string]: T[] }} Collections - */ - -/** - * Initialize the scanner character-based state machine for the given start - * state - * @param {[string, boolean][]} customSchemes List of custom schemes, where each - * item is a length-2 tuple with the first element set to the string scheme, and - * the second element set to `true` if the `://` after the scheme is optional - */ -function init$2(customSchemes = []) { - // Frequently used states (name argument removed during minification) - /** @type Collections */ - const groups = {}; // of tokens - State.groups = groups; - /** @type State */ - const Start = new State(); - if (tlds == null) { - tlds = decodeTlds(encodedTlds); - } - if (utlds == null) { - utlds = decodeTlds(encodedUtlds); - } - - // States for special URL symbols that accept immediately after start - tt(Start, "'", APOSTROPHE); - tt(Start, '{', OPENBRACE); - tt(Start, '}', CLOSEBRACE); - tt(Start, '[', OPENBRACKET); - tt(Start, ']', CLOSEBRACKET); - tt(Start, '(', OPENPAREN); - tt(Start, ')', CLOSEPAREN); - tt(Start, '<', OPENANGLEBRACKET); - tt(Start, '>', CLOSEANGLEBRACKET); - tt(Start, '(', FULLWIDTHLEFTPAREN); - tt(Start, ')', FULLWIDTHRIGHTPAREN); - tt(Start, '「', LEFTCORNERBRACKET); - tt(Start, '」', RIGHTCORNERBRACKET); - tt(Start, '『', LEFTWHITECORNERBRACKET); - tt(Start, '』', RIGHTWHITECORNERBRACKET); - tt(Start, '<', FULLWIDTHLESSTHAN); - tt(Start, '>', FULLWIDTHGREATERTHAN); - tt(Start, '&', AMPERSAND); - tt(Start, '*', ASTERISK); - tt(Start, '@', AT); - tt(Start, '`', BACKTICK); - tt(Start, '^', CARET); - tt(Start, ':', COLON); - tt(Start, ',', COMMA); - tt(Start, '$', DOLLAR); - tt(Start, '.', DOT); - tt(Start, '=', EQUALS); - tt(Start, '!', EXCLAMATION); - tt(Start, '-', HYPHEN); - tt(Start, '%', PERCENT); - tt(Start, '|', PIPE); - tt(Start, '+', PLUS); - tt(Start, '#', POUND); - tt(Start, '?', QUERY); - tt(Start, '"', QUOTE); - tt(Start, '/', SLASH); - tt(Start, ';', SEMI); - tt(Start, '~', TILDE); - tt(Start, '_', UNDERSCORE); - tt(Start, '\\', BACKSLASH); - tt(Start, '・', FULLWIDTHMIDDLEDOT); - const Num = tr(Start, DIGIT, NUM, { - [numeric]: true - }); - tr(Num, DIGIT, Num); - const Asciinumeric = tr(Num, ASCII_LETTER, ASCIINUMERICAL, { - [asciinumeric]: true - }); - const Alphanumeric = tr(Num, LETTER, ALPHANUMERICAL, { - [alphanumeric]: true - }); - - // State which emits a word token - const Word = tr(Start, ASCII_LETTER, WORD, { - [ascii]: true - }); - tr(Word, DIGIT, Asciinumeric); - tr(Word, ASCII_LETTER, Word); - tr(Asciinumeric, DIGIT, Asciinumeric); - tr(Asciinumeric, ASCII_LETTER, Asciinumeric); - - // Same as previous, but specific to non-fsm.ascii alphabet words - const UWord = tr(Start, LETTER, UWORD, { - [alpha]: true - }); - tr(UWord, ASCII_LETTER); // Non-accepting - tr(UWord, DIGIT, Alphanumeric); - tr(UWord, LETTER, UWord); - tr(Alphanumeric, DIGIT, Alphanumeric); - tr(Alphanumeric, ASCII_LETTER); // Non-accepting - tr(Alphanumeric, LETTER, Alphanumeric); // Non-accepting - - // Whitespace jumps - // Tokens of only non-newline whitespace are arbitrarily long - // If any whitespace except newline, more whitespace! - const Nl = tt(Start, LF, NL, { - [whitespace]: true - }); - const Cr = tt(Start, CR, WS, { - [whitespace]: true - }); - const Ws = tr(Start, SPACE, WS, { - [whitespace]: true - }); - tt(Start, OBJECT_REPLACEMENT, Ws); - tt(Cr, LF, Nl); // \r\n - tt(Cr, OBJECT_REPLACEMENT, Ws); - tr(Cr, SPACE, Ws); - tt(Ws, CR); // non-accepting state to avoid mixing whitespaces - tt(Ws, LF); // non-accepting state to avoid mixing whitespaces - tr(Ws, SPACE, Ws); - tt(Ws, OBJECT_REPLACEMENT, Ws); - - // Emoji tokens. They are not grouped by the scanner except in cases where a - // zero-width joiner is present - const Emoji = tr(Start, EMOJI, EMOJI$1, { - [emoji]: true - }); - tt(Emoji, '#'); // no transition, emoji regex seems to match # - tr(Emoji, EMOJI, Emoji); - tt(Emoji, EMOJI_VARIATION, Emoji); - // tt(Start, EMOJI_VARIATION, Emoji); // This one is sketchy - - const EmojiJoiner = tt(Emoji, EMOJI_JOINER); - tt(EmojiJoiner, '#'); - tr(EmojiJoiner, EMOJI, Emoji); - // tt(EmojiJoiner, EMOJI_VARIATION, Emoji); // also sketchy - - // Generates states for top-level domains - // Note that this is most accurate when tlds are in alphabetical order - const wordjr = [[ASCII_LETTER, Word], [DIGIT, Asciinumeric]]; - const uwordjr = [[ASCII_LETTER, null], [LETTER, UWord], [DIGIT, Alphanumeric]]; - for (let i = 0; i < tlds.length; i++) { - fastts(Start, tlds[i], TLD, WORD, wordjr); - } - for (let i = 0; i < utlds.length; i++) { - fastts(Start, utlds[i], UTLD, UWORD, uwordjr); - } - addToGroups(TLD, { - tld: true, - ascii: true - }, groups); - addToGroups(UTLD, { - utld: true, - alpha: true - }, groups); - - // Collect the states generated by different protocols. NOTE: If any new TLDs - // get added that are also protocols, set the token to be the same as the - // protocol to ensure parsing works as expected. - fastts(Start, 'file', SCHEME, WORD, wordjr); - fastts(Start, 'mailto', SCHEME, WORD, wordjr); - fastts(Start, 'http', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'https', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'ftp', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'ftps', SLASH_SCHEME, WORD, wordjr); - addToGroups(SCHEME, { - scheme: true, - ascii: true - }, groups); - addToGroups(SLASH_SCHEME, { - slashscheme: true, - ascii: true - }, groups); - - // Register custom schemes. Assumes each scheme is asciinumeric with hyphens - customSchemes = customSchemes.sort((a, b) => a[0] > b[0] ? 1 : -1); - for (let i = 0; i < customSchemes.length; i++) { - const sch = customSchemes[i][0]; - const optionalSlashSlash = customSchemes[i][1]; - const flags = optionalSlashSlash ? { - [scheme]: true - } : { - [slashscheme]: true - }; - if (sch.indexOf('-') >= 0) { - flags[domain] = true; - } else if (!ASCII_LETTER.test(sch)) { - flags[numeric] = true; // numbers only - } else if (DIGIT.test(sch)) { - flags[asciinumeric] = true; - } else { - flags[ascii] = true; - } - ts(Start, sch, sch, flags); - } - - // Localhost token - ts(Start, 'localhost', LOCALHOST, { - ascii: true - }); - - // Set default transition for start state (some symbol) - Start.jd = new State(SYM); - return { - start: Start, - tokens: Object.assign({ - groups - }, tk) - }; -} - -/** - Given a string, returns an array of TOKEN instances representing the - composition of that string. - - @method run - @param {State} start scanner starting state - @param {string} str input string to scan - @return {Token[]} list of tokens, each with a type and value -*/ -function run$1(start, str) { - // State machine is not case sensitive, so input is tokenized in lowercased - // form (still returns regular case). Uses selective `toLowerCase` because - // lowercasing the entire string causes the length and character position to - // vary in some non-English strings with V8-based runtimes. - const iterable = stringToArray(str.replace(/[A-Z]/g, c => c.toLowerCase())); - const charCount = iterable.length; // <= len if there are emojis, etc - const tokens = []; // return value - - // cursor through the string itself, accounting for characters that have - // width with length 2 such as emojis - let cursor = 0; - - // Cursor through the array-representation of the string - let charCursor = 0; - - // Tokenize the string - while (charCursor < charCount) { - let state = start; - let nextState = null; - let tokenLength = 0; - let latestAccepting = null; - let sinceAccepts = -1; - let charsSinceAccepts = -1; - while (charCursor < charCount && (nextState = state.go(iterable[charCursor]))) { - state = nextState; - - // Keep track of the latest accepting state - if (state.accepts()) { - sinceAccepts = 0; - charsSinceAccepts = 0; - latestAccepting = state; - } else if (sinceAccepts >= 0) { - sinceAccepts += iterable[charCursor].length; - charsSinceAccepts++; - } - tokenLength += iterable[charCursor].length; - cursor += iterable[charCursor].length; - charCursor++; - } - - // Roll back to the latest accepting state - cursor -= sinceAccepts; - charCursor -= charsSinceAccepts; - tokenLength -= sinceAccepts; - - // No more jumps, just make a new token from the last accepting one - tokens.push({ - t: latestAccepting.t, - // token type/name - v: str.slice(cursor - tokenLength, cursor), - // string value - s: cursor - tokenLength, - // start index - e: cursor // end index (excluding) - }); - } - return tokens; -} - -/** - * Convert a String to an Array of characters, taking into account that some - * characters like emojis take up two string indexes. - * - * Adapted from core-js (MIT license) - * https://github.com/zloirock/core-js/blob/2d69cf5f99ab3ea3463c395df81e5a15b68f49d9/packages/core-js/internals/string-multibyte.js - * - * @function stringToArray - * @param {string} str - * @returns {string[]} - */ -function stringToArray(str) { - const result = []; - const len = str.length; - let index = 0; - while (index < len) { - let first = str.charCodeAt(index); - let second; - let char = first < 0xd800 || first > 0xdbff || index + 1 === len || (second = str.charCodeAt(index + 1)) < 0xdc00 || second > 0xdfff ? str[index] // single character - : str.slice(index, index + 2); // two-index characters - result.push(char); - index += char.length; - } - return result; -} - -/** - * Fast version of ts function for when transition defaults are well known - * @param {State} state - * @param {string} input - * @param {string} t - * @param {string} defaultt - * @param {[RegExp, State][]} jr - * @returns {State} - */ -function fastts(state, input, t, defaultt, jr) { - let next; - const len = input.length; - for (let i = 0; i < len - 1; i++) { - const char = input[i]; - if (state.j[char]) { - next = state.j[char]; - } else { - next = new State(defaultt); - next.jr = jr.slice(); - state.j[char] = next; - } - state = next; - } - next = new State(t); - next.jr = jr.slice(); - state.j[input[len - 1]] = next; - return next; -} - -/** - * Converts a string of Top-Level Domain names encoded in update-tlds.js back - * into a list of strings. - * @param {str} encoded encoded TLDs string - * @returns {str[]} original TLDs list - */ -function decodeTlds(encoded) { - const words = []; - const stack = []; - let i = 0; - let digits = '0123456789'; - while (i < encoded.length) { - let popDigitCount = 0; - while (digits.indexOf(encoded[i + popDigitCount]) >= 0) { - popDigitCount++; // encountered some digits, have to pop to go one level up trie - } - if (popDigitCount > 0) { - words.push(stack.join('')); // whatever preceded the pop digits must be a word - for (let popCount = parseInt(encoded.substring(i, i + popDigitCount), 10); popCount > 0; popCount--) { - stack.pop(); - } - i += popDigitCount; - } else { - stack.push(encoded[i]); // drop down a level into the trie - i++; - } - } - return words; -} - -/** - * An object where each key is a valid DOM Event Name such as `click` or `focus` - * and each value is an event handler function. - * - * https://developer.mozilla.org/en-US/docs/Web/API/Element#events - * @typedef {?{ [event: string]: Function }} EventListeners - */ - -/** - * All formatted properties required to render a link, including `tagName`, - * `attributes`, `content` and `eventListeners`. - * @typedef {{ tagName: any, attributes: {[attr: string]: any}, content: string, - * eventListeners: EventListeners }} IntermediateRepresentation - */ - -/** - * Specify either an object described by the template type `O` or a function. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `O` - * @template O - * @typedef {O | ((value: string, type: string, token: MultiToken) => O)} OptObj - */ - -/** - * Specify either a function described by template type `F` or an object. - * - * Each key in the object should be a link type (`'url'`, `'hashtag`', etc.). Each - * value should be a function with template type `F` that is called when the - * corresponding link type is encountered. - * @template F - * @typedef {F | { [type: string]: F}} OptFn - */ - -/** - * Specify either a value with template type `V`, a function that returns `V` or - * an object where each value resolves to `V`. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `V` - * - * For the object, each key should be a link type (`'url'`, `'hashtag`', etc.). - * Each value should either have type `V` or a function that returns V. This - * function similarly takes a string value and a token. - * - * Example valid types for `Opt`: - * - * ```js - * 'hello' - * (value, type, token) => 'world' - * { url: 'hello', email: (value, token) => 'world'} - * ``` - * @template V - * @typedef {V | ((value: string, type: string, token: MultiToken) => V) | { [type: string]: V | ((value: string, token: MultiToken) => V) }} Opt - */ - -/** - * See available options: https://linkify.js.org/docs/options.html - * @typedef {{ - * defaultProtocol?: string, - * events?: OptObj, - * format?: Opt, - * formatHref?: Opt, - * nl2br?: boolean, - * tagName?: Opt, - * target?: Opt, - * rel?: Opt, - * validate?: Opt, - * truncate?: Opt, - * className?: Opt, - * attributes?: OptObj<({ [attr: string]: any })>, - * ignoreTags?: string[], - * render?: OptFn<((ir: IntermediateRepresentation) => any)> - * }} Opts - */ - -/** - * @type Required - */ -const defaults = { - defaultProtocol: 'http', - events: null, - format: noop, - formatHref: noop, - nl2br: false, - tagName: 'a', - target: null, - rel: null, - validate: true, - truncate: Infinity, - className: null, - attributes: null, - ignoreTags: [], - render: null -}; - -/** - * Utility class for linkify interfaces to apply specified - * {@link Opts formatting and rendering options}. - * - * @param {Opts | Options} [opts] Option value overrides. - * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For - * internal use) default render function that determines how to generate an - * HTML element based on a link token's derived tagName, attributes and HTML. - * Similar to render option - */ -function Options(opts, defaultRender = null) { - let o = Object.assign({}, defaults); - if (opts) { - o = Object.assign(o, opts instanceof Options ? opts.o : opts); - } - - // Ensure all ignored tags are uppercase - const ignoredTags = o.ignoreTags; - const uppercaseIgnoredTags = []; - for (let i = 0; i < ignoredTags.length; i++) { - uppercaseIgnoredTags.push(ignoredTags[i].toUpperCase()); - } - /** @protected */ - this.o = o; - if (defaultRender) { - this.defaultRender = defaultRender; - } - this.ignoreTags = uppercaseIgnoredTags; -} -Options.prototype = { - o: defaults, - /** - * @type string[] - */ - ignoreTags: [], - /** - * @param {IntermediateRepresentation} ir - * @returns {any} - */ - defaultRender(ir) { - return ir; - }, - /** - * Returns true or false based on whether a token should be displayed as a - * link based on the user options. - * @param {MultiToken} token - * @returns {boolean} - */ - check(token) { - return this.get('validate', token.toString(), token); - }, - // Private methods - - /** - * Resolve an option's value based on the value of the option and the given - * params. If operator and token are specified and the target option is - * callable, automatically calls the function with the given argument. - * @template {keyof Opts} K - * @param {K} key Name of option to use - * @param {string} [operator] will be passed to the target option if it's a - * function. If not specified, RAW function value gets returned - * @param {MultiToken} [token] The token from linkify.tokenize - * @returns {Opts[K] | any} - */ - get(key, operator, token) { - const isCallable = operator != null; - let option = this.o[key]; - if (!option) { - return option; - } - if (typeof option === 'object') { - option = token.t in option ? option[token.t] : defaults[key]; - if (typeof option === 'function' && isCallable) { - option = option(operator, token); - } - } else if (typeof option === 'function' && isCallable) { - option = option(operator, token.t, token); - } - return option; - }, - /** - * @template {keyof Opts} L - * @param {L} key Name of options object to use - * @param {string} [operator] - * @param {MultiToken} [token] - * @returns {Opts[L] | any} - */ - getObj(key, operator, token) { - let obj = this.o[key]; - if (typeof obj === 'function' && operator != null) { - obj = obj(operator, token.t, token); - } - return obj; - }, - /** - * Convert the given token to a rendered element that may be added to the - * calling-interface's DOM - * @param {MultiToken} token Token to render to an HTML element - * @returns {any} Render result; e.g., HTML string, DOM element, React - * Component, etc. - */ - render(token) { - const ir = token.render(this); // intermediate representation - const renderFn = this.get('render', null, token) || this.defaultRender; - return renderFn(ir, token.t, token); - } -}; -function noop(val) { - return val; -} - -var options = /*#__PURE__*/Object.freeze({ - __proto__: null, - Options: Options, - defaults: defaults -}); - -/****************************************************************************** - Multi-Tokens - Tokens composed of arrays of TextTokens -******************************************************************************/ - -/** - * @param {string} value - * @param {Token[]} tokens - */ -function MultiToken(value, tokens) { - this.t = 'token'; - this.v = value; - this.tk = tokens; -} - -/** - * Abstract class used for manufacturing tokens of text tokens. That is rather - * than the value for a token being a small string of text, it's value an array - * of text tokens. - * - * Used for grouping together URLs, emails, hashtags, and other potential - * creations. - * @class MultiToken - * @property {string} t - * @property {string} v - * @property {Token[]} tk - * @abstract - */ -MultiToken.prototype = { - isLink: false, - /** - * Return the string this token represents. - * @return {string} - */ - toString() { - return this.v; - }, - /** - * What should the value for this token be in the `href` HTML attribute? - * Returns the `.toString` value by default. - * @param {string} [scheme] - * @return {string} - */ - toHref(scheme) { - return this.toString(); - }, - /** - * @param {Options} options Formatting options - * @returns {string} - */ - toFormattedString(options) { - const val = this.toString(); - const truncate = options.get('truncate', val, this); - const formatted = options.get('format', val, this); - return truncate && formatted.length > truncate ? formatted.substring(0, truncate) + '…' : formatted; - }, - /** - * - * @param {Options} options - * @returns {string} - */ - toFormattedHref(options) { - return options.get('formatHref', this.toHref(options.get('defaultProtocol')), this); - }, - /** - * The start index of this token in the original input string - * @returns {number} - */ - startIndex() { - return this.tk[0].s; - }, - /** - * The end index of this token in the original input string (up to this - * index but not including it) - * @returns {number} - */ - endIndex() { - return this.tk[this.tk.length - 1].e; - }, - /** - Returns an object of relevant values for this token, which includes keys - * type - Kind of token ('url', 'email', etc.) - * value - Original text - * href - The value that should be added to the anchor tag's href - attribute - @method toObject - @param {string} [protocol] `'http'` by default - */ - toObject(protocol = defaults.defaultProtocol) { - return { - type: this.t, - value: this.toString(), - isLink: this.isLink, - href: this.toHref(protocol), - start: this.startIndex(), - end: this.endIndex() - }; - }, - /** - * - * @param {Options} options Formatting option - */ - toFormattedObject(options) { - return { - type: this.t, - value: this.toFormattedString(options), - isLink: this.isLink, - href: this.toFormattedHref(options), - start: this.startIndex(), - end: this.endIndex() - }; - }, - /** - * Whether this token should be rendered as a link according to the given options - * @param {Options} options - * @returns {boolean} - */ - validate(options) { - return options.get('validate', this.toString(), this); - }, - /** - * Return an object that represents how this link should be rendered. - * @param {Options} options Formattinng options - */ - render(options) { - const token = this; - const href = this.toHref(options.get('defaultProtocol')); - const formattedHref = options.get('formatHref', href, this); - const tagName = options.get('tagName', href, token); - const content = this.toFormattedString(options); - const attributes = {}; - const className = options.get('className', href, token); - const target = options.get('target', href, token); - const rel = options.get('rel', href, token); - const attrs = options.getObj('attributes', href, token); - const eventListeners = options.getObj('events', href, token); - attributes.href = formattedHref; - if (className) { - attributes.class = className; - } - if (target) { - attributes.target = target; - } - if (rel) { - attributes.rel = rel; - } - if (attrs) { - Object.assign(attributes, attrs); - } - return { - tagName, - attributes, - content, - eventListeners - }; - } -}; - -/** - * Create a new token that can be emitted by the parser state machine - * @param {string} type readable type of the token - * @param {object} props properties to assign or override, including isLink = true or false - * @returns {new (value: string, tokens: Token[]) => MultiToken} new token class - */ -function createTokenClass(type, props) { - class Token extends MultiToken { - constructor(value, tokens) { - super(value, tokens); - this.t = type; - } - } - for (const p in props) { - Token.prototype[p] = props[p]; - } - Token.t = type; - return Token; -} - -/** - Represents a list of tokens making up a valid email address -*/ -const Email = createTokenClass('email', { - isLink: true, - toHref() { - return 'mailto:' + this.toString(); - } -}); - -/** - Represents some plain text -*/ -const Text = createTokenClass('text'); - -/** - Multi-linebreak token - represents a line break - @class Nl -*/ -const Nl = createTokenClass('nl'); - -/** - Represents a list of text tokens making up a valid URL - @class Url -*/ -const Url = createTokenClass('url', { - isLink: true, - /** - Lowercases relevant parts of the domain and adds the protocol if - required. Note that this will not escape unsafe HTML characters in the - URL. - @param {string} [scheme] default scheme (e.g., 'https') - @return {string} the full href - */ - toHref(scheme = defaults.defaultProtocol) { - // Check if already has a prefix scheme - return this.hasProtocol() ? this.v : `${scheme}://${this.v}`; - }, - /** - * Check whether this URL token has a protocol - * @return {boolean} - */ - hasProtocol() { - const tokens = this.tk; - return tokens.length >= 2 && tokens[0].t !== LOCALHOST && tokens[1].t === COLON; - } -}); - -var multi = /*#__PURE__*/Object.freeze({ - __proto__: null, - Base: MultiToken, - Email: Email, - MultiToken: MultiToken, - Nl: Nl, - Text: Text, - Url: Url, - createTokenClass: createTokenClass -}); - -/** - Not exactly parser, more like the second-stage scanner (although we can - theoretically hotswap the code here with a real parser in the future... but - for a little URL-finding utility abstract syntax trees may be a little - overkill). - - URL format: http://en.wikipedia.org/wiki/URI_scheme - Email format: http://en.wikipedia.org/wiki/EmailAddress (links to RFC in - reference) - - @module linkify - @submodule parser - @main run -*/ - -const makeState = arg => new State(arg); - -/** - * Generate the parser multi token-based state machine - * @param {{ groups: Collections }} tokens - */ -function init$1({ - groups -}) { - // Types of characters the URL can definitely end in - const qsAccepting = groups.domain.concat([AMPERSAND, ASTERISK, AT, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, NUM, PERCENT, PIPE, PLUS, POUND, SLASH, SYM, TILDE, UNDERSCORE]); - - // Types of tokens that can follow a URL and be part of the query string - // but cannot be the very last characters - // Characters that cannot appear in the URL at all should be excluded - const qsNonAccepting = [APOSTROPHE, COLON, COMMA, DOT, EXCLAMATION, PERCENT, QUERY, QUOTE, SEMI, OPENANGLEBRACKET, CLOSEANGLEBRACKET, OPENBRACE, CLOSEBRACE, CLOSEBRACKET, OPENBRACKET, OPENPAREN, CLOSEPAREN, FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN, LEFTCORNERBRACKET, RIGHTCORNERBRACKET, LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET, FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN]; - - // For addresses without the mailto prefix - // Tokens allowed in the localpart of the email - const localpartAccepting = [AMPERSAND, APOSTROPHE, ASTERISK, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, OPENBRACE, CLOSEBRACE, PERCENT, PIPE, PLUS, POUND, QUERY, SLASH, SYM, TILDE, UNDERSCORE]; - - // The universal starting state. - /** - * @type State - */ - const Start = makeState(); - const Localpart = tt(Start, TILDE); // Local part of the email address - ta(Localpart, localpartAccepting, Localpart); - ta(Localpart, groups.domain, Localpart); - const Domain = makeState(), - Scheme = makeState(), - SlashScheme = makeState(); - ta(Start, groups.domain, Domain); // parsed string ends with a potential domain name (A) - ta(Start, groups.scheme, Scheme); // e.g., 'mailto' - ta(Start, groups.slashscheme, SlashScheme); // e.g., 'http' - - ta(Domain, localpartAccepting, Localpart); - ta(Domain, groups.domain, Domain); - const LocalpartAt = tt(Domain, AT); // Local part of the email address plus @ - - tt(Localpart, AT, LocalpartAt); // close to an email address now - - // Local part of an email address can be e.g. 'http' or 'mailto' - tt(Scheme, AT, LocalpartAt); - tt(SlashScheme, AT, LocalpartAt); - const LocalpartDot = tt(Localpart, DOT); // Local part of the email address plus '.' (localpart cannot end in .) - ta(LocalpartDot, localpartAccepting, Localpart); - ta(LocalpartDot, groups.domain, Localpart); - const EmailDomain = makeState(); - ta(LocalpartAt, groups.domain, EmailDomain); // parsed string starts with local email info + @ with a potential domain name - ta(EmailDomain, groups.domain, EmailDomain); - const EmailDomainDot = tt(EmailDomain, DOT); // domain followed by DOT - ta(EmailDomainDot, groups.domain, EmailDomain); - const Email$1 = makeState(Email); // Possible email address (could have more tlds) - ta(EmailDomainDot, groups.tld, Email$1); - ta(EmailDomainDot, groups.utld, Email$1); - tt(LocalpartAt, LOCALHOST, Email$1); - - // Hyphen can jump back to a domain name - const EmailDomainHyphen = tt(EmailDomain, HYPHEN); // parsed string starts with local email info + @ with a potential domain name - tt(EmailDomainHyphen, HYPHEN, EmailDomainHyphen); - ta(EmailDomainHyphen, groups.domain, EmailDomain); - ta(Email$1, groups.domain, EmailDomain); - tt(Email$1, DOT, EmailDomainDot); - tt(Email$1, HYPHEN, EmailDomainHyphen); - - // Account for dots and hyphens. Hyphens are usually parts of domain names - // (but not TLDs) - const DomainHyphen = tt(Domain, HYPHEN); // domain followed by hyphen - const DomainDot = tt(Domain, DOT); // domain followed by DOT - tt(DomainHyphen, HYPHEN, DomainHyphen); - ta(DomainHyphen, groups.domain, Domain); - ta(DomainDot, localpartAccepting, Localpart); - ta(DomainDot, groups.domain, Domain); - const DomainDotTld = makeState(Url); // Simplest possible URL with no query string - ta(DomainDot, groups.tld, DomainDotTld); - ta(DomainDot, groups.utld, DomainDotTld); - ta(DomainDotTld, groups.domain, Domain); - ta(DomainDotTld, localpartAccepting, Localpart); - tt(DomainDotTld, DOT, DomainDot); - tt(DomainDotTld, HYPHEN, DomainHyphen); - tt(DomainDotTld, AT, LocalpartAt); - const DomainDotTldColon = tt(DomainDotTld, COLON); // URL followed by colon (potential port number here) - const DomainDotTldColonPort = makeState(Url); // TLD followed by a port number - ta(DomainDotTldColon, groups.numeric, DomainDotTldColonPort); - - // Long URL with optional port and maybe query string - const Url$1 = makeState(Url); - - // URL with extra symbols at the end, followed by an opening bracket - const UrlNonaccept = makeState(); // URL followed by some symbols (will not be part of the final URL) - - // Query strings - ta(Url$1, qsAccepting, Url$1); - ta(Url$1, qsNonAccepting, UrlNonaccept); - ta(UrlNonaccept, qsAccepting, Url$1); - ta(UrlNonaccept, qsNonAccepting, UrlNonaccept); - - // Become real URLs after `SLASH` or `COLON NUM SLASH` - // Here works with or without scheme:// prefix - tt(DomainDotTld, SLASH, Url$1); - tt(DomainDotTldColonPort, SLASH, Url$1); - - // Note that domains that begin with schemes are treated slighly differently - const SchemeColon = tt(Scheme, COLON); // e.g., 'mailto:' - const SlashSchemeColon = tt(SlashScheme, COLON); // e.g., 'http:' - const SlashSchemeColonSlash = tt(SlashSchemeColon, SLASH); // e.g., 'http:/' - - const UriPrefix = tt(SlashSchemeColonSlash, SLASH); // e.g., 'http://' - - // Scheme states can transition to domain states - ta(Scheme, groups.domain, Domain); - tt(Scheme, DOT, DomainDot); - tt(Scheme, HYPHEN, DomainHyphen); - ta(SlashScheme, groups.domain, Domain); - tt(SlashScheme, DOT, DomainDot); - tt(SlashScheme, HYPHEN, DomainHyphen); - - // Force URL with scheme prefix followed by anything sane - ta(SchemeColon, groups.domain, Url$1); - tt(SchemeColon, SLASH, Url$1); - tt(SchemeColon, QUERY, Url$1); - ta(UriPrefix, groups.domain, Url$1); - ta(UriPrefix, qsAccepting, Url$1); - tt(UriPrefix, SLASH, Url$1); - const bracketPairs = [[OPENBRACE, CLOSEBRACE], - // {} - [OPENBRACKET, CLOSEBRACKET], - // [] - [OPENPAREN, CLOSEPAREN], - // () - [OPENANGLEBRACKET, CLOSEANGLEBRACKET], - // <> - [FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN], - // () - [LEFTCORNERBRACKET, RIGHTCORNERBRACKET], - // 「」 - [LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET], - // 『』 - [FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN] // <> - ]; - for (let i = 0; i < bracketPairs.length; i++) { - const [OPEN, CLOSE] = bracketPairs[i]; - const UrlOpen = tt(Url$1, OPEN); // URL followed by open bracket - - // Continue not accepting for open brackets - tt(UrlNonaccept, OPEN, UrlOpen); - - // URL that begins with an opening bracket, followed by a symbols. - // Note that the final state can still be `UrlOpen` (if the URL has a - // single opening bracket for some reason). - const UrlOpenQ = makeState(Url); - ta(UrlOpen, qsAccepting, UrlOpenQ); - const UrlOpenSyms = makeState(); // UrlOpen followed by some symbols it cannot end it - ta(UrlOpen, qsNonAccepting, UrlOpenSyms); - - // Closing bracket component. This character WILL be included in the URL. - // Must come after qsNonAccepting (which includes all close-bracket tokens) - // so that CLOSE -> Url wins over CLOSE -> UrlOpenSyms. - tt(UrlOpen, CLOSE, Url$1); - - // URL that begins with an opening bracket, followed by some symbols - ta(UrlOpenQ, qsAccepting, UrlOpenQ); - ta(UrlOpenQ, qsNonAccepting, UrlOpenSyms); - ta(UrlOpenSyms, qsAccepting, UrlOpenQ); - ta(UrlOpenSyms, qsNonAccepting, UrlOpenSyms); - - // Close brace/bracket to become regular URL - tt(UrlOpenQ, CLOSE, Url$1); - tt(UrlOpenSyms, CLOSE, Url$1); - } - tt(Start, LOCALHOST, DomainDotTld); // localhost is a valid URL state - tt(Start, NL, Nl); // single new line - - return { - start: Start, - tokens: tk - }; -} - -/** - * Run the parser state machine on a list of scanned string-based tokens to - * create a list of multi tokens, each of which represents a URL, email address, - * plain text, etc. - * - * @param {State} start parser start state - * @param {string} input the original input used to generate the given tokens - * @param {Token[]} tokens list of scanned tokens - * @returns {MultiToken[]} - */ -function run(start, input, tokens) { - let len = tokens.length; - let cursor = 0; - let multis = []; - let textTokens = []; - while (cursor < len) { - let state = start; - let secondState = null; - let nextState = null; - let multiLength = 0; - let latestAccepting = null; - let sinceAccepts = -1; - while (cursor < len && !(secondState = state.go(tokens[cursor].t))) { - // Starting tokens with nowhere to jump to. - // Consider these to be just plain text - textTokens.push(tokens[cursor++]); - } - while (cursor < len && (nextState = secondState || state.go(tokens[cursor].t))) { - // Get the next state - secondState = null; - state = nextState; - - // Keep track of the latest accepting state - if (state.accepts()) { - sinceAccepts = 0; - latestAccepting = state; - } else if (sinceAccepts >= 0) { - sinceAccepts++; - } - cursor++; - multiLength++; - } - if (sinceAccepts < 0) { - // No accepting state was found, part of a regular text token add - // the first text token to the text tokens array and try again from - // the next - cursor -= multiLength; - if (cursor < len) { - textTokens.push(tokens[cursor]); - cursor++; - } - } else { - // Accepting state! - // First close off the textTokens (if available) - if (textTokens.length > 0) { - multis.push(initMultiToken(Text, input, textTokens)); - textTokens = []; - } - - // Roll back to the latest accepting state - cursor -= sinceAccepts; - multiLength -= sinceAccepts; - - // Create a new multitoken - const Multi = latestAccepting.t; - const subtokens = tokens.slice(cursor - multiLength, cursor); - multis.push(initMultiToken(Multi, input, subtokens)); - } - } - - // Finally close off the textTokens (if available) - if (textTokens.length > 0) { - multis.push(initMultiToken(Text, input, textTokens)); - } - return multis; -} - -/** - * Utility function for instantiating a new multitoken with all the relevant - * fields during parsing. - * @param {new (value: string, tokens: Token[]) => MultiToken} Multi class to instantiate - * @param {string} input original input string - * @param {Token[]} tokens consecutive tokens scanned from input string - * @returns {MultiToken} - */ -function initMultiToken(Multi, input, tokens) { - const startIdx = tokens[0].s; - const endIdx = tokens[tokens.length - 1].e; - const value = input.slice(startIdx, endIdx); - return new Multi(value, tokens); -} - -const warn = typeof console !== 'undefined' && console && console.warn || (() => {}); -const warnAdvice = 'until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.'; - -// Side-effect initialization state -const INIT = { - scanner: null, - parser: null, - tokenQueue: [], - pluginQueue: [], - customSchemes: [], - initialized: false -}; - -/** - * @typedef {{ - * start: State, - * tokens: { groups: Collections } & typeof tk - * }} ScannerInit - */ - -/** - * @typedef {{ - * start: State, - * tokens: typeof multi - * }} ParserInit - */ - -/** - * @typedef {(arg: { scanner: ScannerInit }) => void} TokenPlugin - */ - -/** - * @typedef {(arg: { scanner: ScannerInit, parser: ParserInit }) => void} Plugin - */ - -/** - * De-register all plugins and reset the internal state-machine. Used for - * testing; not required in practice. - * @private - */ -function reset() { - State.groups = {}; - INIT.scanner = null; - INIT.parser = null; - INIT.tokenQueue = []; - INIT.pluginQueue = []; - INIT.customSchemes = []; - INIT.initialized = false; - return INIT; -} - -/** - * Register a token plugin to allow the scanner to recognize additional token - * types before the parser state machine is constructed from the results. - * @param {string} name of plugin to register - * @param {TokenPlugin} plugin function that accepts the scanner state machine - * and available scanner tokens and collections and extends the state machine to - * recognize additional tokens or groups. - */ -function registerTokenPlugin(name, plugin) { - if (typeof plugin !== 'function') { - throw new Error(`linkifyjs: Invalid token plugin ${plugin} (expects function)`); - } - for (let i = 0; i < INIT.tokenQueue.length; i++) { - if (name === INIT.tokenQueue[i][0]) { - warn(`linkifyjs: token plugin "${name}" already registered - will be overwritten`); - INIT.tokenQueue[i] = [name, plugin]; - return; - } - } - INIT.tokenQueue.push([name, plugin]); - if (INIT.initialized) { - warn(`linkifyjs: already initialized - will not register token plugin "${name}" ${warnAdvice}`); - } -} - -/** - * Register a linkify plugin - * @param {string} name of plugin to register - * @param {Plugin} plugin function that accepts the parser state machine and - * extends the parser to recognize additional link types - */ -function registerPlugin(name, plugin) { - if (typeof plugin !== 'function') { - throw new Error(`linkifyjs: Invalid plugin ${plugin} (expects function)`); - } - for (let i = 0; i < INIT.pluginQueue.length; i++) { - if (name === INIT.pluginQueue[i][0]) { - warn(`linkifyjs: plugin "${name}" already registered - will be overwritten`); - INIT.pluginQueue[i] = [name, plugin]; - return; - } - } - INIT.pluginQueue.push([name, plugin]); - if (INIT.initialized) { - warn(`linkifyjs: already initialized - will not register plugin "${name}" ${warnAdvice}`); - } -} - -/** - * Detect URLs with the following additional protocol. Anything with format - * "protocol://..." will be considered a link. If `optionalSlashSlash` is set to - * `true`, anything with format "protocol:..." will be considered a link. - * @param {string} scheme - * @param {boolean} [optionalSlashSlash] - */ -function registerCustomProtocol(scheme, optionalSlashSlash = false) { - if (INIT.initialized) { - warn(`linkifyjs: already initialized - will not register custom scheme "${scheme}" ${warnAdvice}`); - } - if (!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(scheme)) { - throw new Error(`linkifyjs: incorrect scheme format. -1. Must only contain digits, lowercase ASCII letters or "-" -2. Cannot start or end with "-" -3. "-" cannot repeat`); - } - INIT.customSchemes.push([scheme, optionalSlashSlash]); -} - -/** - * Initialize the linkify state machine. Called automatically the first time - * linkify is called on a string, but may be called manually as well. - */ -function init() { - // Initialize scanner state machine and plugins - INIT.scanner = init$2(INIT.customSchemes); - for (let i = 0; i < INIT.tokenQueue.length; i++) { - INIT.tokenQueue[i][1]({ - scanner: INIT.scanner - }); - } - - // Initialize parser state machine and plugins - INIT.parser = init$1(INIT.scanner.tokens); - for (let i = 0; i < INIT.pluginQueue.length; i++) { - INIT.pluginQueue[i][1]({ - scanner: INIT.scanner, - parser: INIT.parser - }); - } - INIT.initialized = true; - return INIT; -} - -/** - * Parse a string into tokens that represent linkable and non-linkable sub-components - * @param {string} str - * @return {MultiToken[]} tokens - */ -function tokenize(str) { - if (!INIT.initialized) { - init(); - } - return run(INIT.parser.start, str, run$1(INIT.scanner.start, str)); -} -tokenize.scan = run$1; // for testing - -/** - * Find a list of linkable items in the given string. - * @param {string} str string to find links in - * @param {string | Opts} [type] either formatting options or specific type of - * links to find, e.g., 'url' or 'email' - * @param {Opts} [opts] formatting options for final output. Cannot be specified - * if opts already provided in `type` argument - */ -function find(str, type = null, opts = null) { - if (type && typeof type === 'object') { - if (opts) { - throw Error(`linkifyjs: Invalid link type ${type}; must be a string`); - } - opts = type; - type = null; - } - const options = new Options(opts); - const tokens = tokenize(str); - const filtered = []; - for (let i = 0; i < tokens.length; i++) { - const token = tokens[i]; - if (token.isLink && (!type || token.t === type) && options.check(token)) { - filtered.push(token.toFormattedObject(options)); - } - } - return filtered; -} - -/** - * Is the given string valid linkable text of some sort. Note that this does not - * trim the text for you. - * - * Optionally pass in a second `type` param, which is the type of link to test - * for. - * - * For example, - * - * linkify.test(str, 'email'); - * - * Returns `true` if str is a valid email. - * @param {string} str string to test for links - * @param {string} [type] optional specific link type to look for - * @returns boolean true/false - */ -function test(str, type = null) { - const tokens = tokenize(str); - return tokens.length === 1 && tokens[0].isLink && (!type || tokens[0].t === type); -} - -exports.MultiToken = MultiToken; -exports.Options = Options; -exports.State = State; -exports.createTokenClass = createTokenClass; -exports.find = find; -exports.init = init; -exports.multi = multi; -exports.options = options; -exports.regexp = regexp; -exports.registerCustomProtocol = registerCustomProtocol; -exports.registerPlugin = registerPlugin; -exports.registerTokenPlugin = registerTokenPlugin; -exports.reset = reset; -exports.stringToArray = stringToArray; -exports.test = test; -exports.text = multi; -exports.tokenize = tokenize; diff --git a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.d.cts b/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.d.cts deleted file mode 100644 index 8ab5687..0000000 --- a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.d.cts +++ /dev/null @@ -1,637 +0,0 @@ -export type Transition = null | T; -/** - * Scanner output token: - * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD') - * - `v` is the value of the token (e.g., '123', '❤️', 'com') - * - `s` is the start index of the token in the original string - * - `e` is the end index of the token in the original string - */ -export type Token = { - t: string; - v: string; - s: number; - e: number; -}; -export type Collections = { - [collection: string]: T[]; -}; -export type ScannerInit = { - start: State; - tokens: { - groups: Collections; - } & typeof tk; -}; -export type ParserInit = { - start: State; - tokens: typeof multi; -}; -export type TokenPlugin = (arg: { - scanner: ScannerInit; -}) => void; -export type Plugin = (arg: { - scanner: ScannerInit; - parser: ParserInit; -}) => void; -export type Flags = { - [group: string]: true; -}; -/** - * An object where each key is a valid DOM Event Name such as `click` or `focus` - * and each value is an event handler function. - * - * https://developer.mozilla.org/en-US/docs/Web/API/Element#events - */ -export type EventListeners = { - [event: string]: Function; -} | null; -/** - * All formatted properties required to render a link, including `tagName`, - * `attributes`, `content` and `eventListeners`. - */ -export type IntermediateRepresentation = { - tagName: any; - attributes: { - [attr: string]: any; - }; - content: string; - eventListeners: EventListeners; -}; -/** - * Specify either an object described by the template type `O` or a function. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `O` - */ -export type OptObj = O | ((value: string, type: string, token: MultiToken) => O); -/** - * Specify either a function described by template type `F` or an object. - * - * Each key in the object should be a link type (`'url'`, `'hashtag`', etc.). Each - * value should be a function with template type `F` that is called when the - * corresponding link type is encountered. - */ -export type OptFn = F | { - [type: string]: F; -}; -/** - * Specify either a value with template type `V`, a function that returns `V` or - * an object where each value resolves to `V`. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `V` - * - * For the object, each key should be a link type (`'url'`, `'hashtag`', etc.). - * Each value should either have type `V` or a function that returns V. This - * function similarly takes a string value and a token. - * - * Example valid types for `Opt`: - * - * ```js - * 'hello' - * (value, type, token) => 'world' - * { url: 'hello', email: (value, token) => 'world'} - * ``` - */ -export type Opt = V | ((value: string, type: string, token: MultiToken) => V) | { - [type: string]: V | ((value: string, token: MultiToken) => V); -}; -/** - * See available options: https://linkify.js.org/docs/options.html - */ -export type Opts = { - defaultProtocol?: string; - events?: OptObj; - format?: Opt; - formatHref?: Opt; - nl2br?: boolean; - tagName?: Opt; - target?: Opt; - rel?: Opt; - validate?: Opt; - truncate?: Opt; - className?: Opt; - attributes?: OptObj<({ - [attr: string]: any; - })>; - ignoreTags?: string[]; - render?: OptFn<((ir: IntermediateRepresentation) => any)>; -}; -/****************************************************************************** - Multi-Tokens - Tokens composed of arrays of TextTokens -******************************************************************************/ -/** - * @param {string} value - * @param {Token[]} tokens - */ -export function MultiToken(value: string, tokens: Token[]): void; -export class MultiToken { - /****************************************************************************** - Multi-Tokens - Tokens composed of arrays of TextTokens - ******************************************************************************/ - /** - * @param {string} value - * @param {Token[]} tokens - */ - constructor(value: string, tokens: Token[]); - t: string; - v: string; - tk: Token[]; - isLink: boolean; - /** - * Return the string this token represents. - * @return {string} - */ - toString(): string; - /** - * What should the value for this token be in the `href` HTML attribute? - * Returns the `.toString` value by default. - * @param {string} [scheme] - * @return {string} - */ - toHref(scheme?: string): string; - /** - * @param {Options} options Formatting options - * @returns {string} - */ - toFormattedString(options: Options): string; - /** - * - * @param {Options} options - * @returns {string} - */ - toFormattedHref(options: Options): string; - /** - * The start index of this token in the original input string - * @returns {number} - */ - startIndex(): number; - /** - * The end index of this token in the original input string (up to this - * index but not including it) - * @returns {number} - */ - endIndex(): number; - /** - Returns an object of relevant values for this token, which includes keys - * type - Kind of token ('url', 'email', etc.) - * value - Original text - * href - The value that should be added to the anchor tag's href - attribute - @method toObject - @param {string} [protocol] `'http'` by default - */ - toObject(protocol?: string): { - type: string; - value: string; - isLink: boolean; - href: string; - start: number; - end: number; - }; - /** - * - * @param {Options} options Formatting option - */ - toFormattedObject(options: Options): { - type: string; - value: string; - isLink: boolean; - href: string; - start: number; - end: number; - }; - /** - * Whether this token should be rendered as a link according to the given options - * @param {Options} options - * @returns {boolean} - */ - validate(options: Options): boolean; - /** - * Return an object that represents how this link should be rendered. - * @param {Options} options Formattinng options - */ - render(options: Options): { - tagName: any; - attributes: { - href: any; - class: any; - target: any; - rel: any; - }; - content: string; - eventListeners: any; - }; -} -/** - * Utility class for linkify interfaces to apply specified - * {@link Opts formatting and rendering options}. - * - * @param {Opts | Options} [opts] Option value overrides. - * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For - * internal use) default render function that determines how to generate an - * HTML element based on a link token's derived tagName, attributes and HTML. - * Similar to render option - */ -export function Options(opts?: Opts | Options, defaultRender?: (ir: IntermediateRepresentation) => any): void; -export class Options { - /** - * Utility class for linkify interfaces to apply specified - * {@link Opts formatting and rendering options}. - * - * @param {Opts | Options} [opts] Option value overrides. - * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For - * internal use) default render function that determines how to generate an - * HTML element based on a link token's derived tagName, attributes and HTML. - * Similar to render option - */ - constructor(opts?: Opts | Options, defaultRender?: (ir: IntermediateRepresentation) => any); - /** @protected */ - o: Required; - defaultRender: any; - ignoreTags: string[]; - /** - * Returns true or false based on whether a token should be displayed as a - * link based on the user options. - * @param {MultiToken} token - * @returns {boolean} - */ - check(token: MultiToken): boolean; - /** - * Resolve an option's value based on the value of the option and the given - * params. If operator and token are specified and the target option is - * callable, automatically calls the function with the given argument. - * @template {keyof Opts} K - * @param {K} key Name of option to use - * @param {string} [operator] will be passed to the target option if it's a - * function. If not specified, RAW function value gets returned - * @param {MultiToken} [token] The token from linkify.tokenize - * @returns {Opts[K] | any} - */ - get(key: K, operator?: string, token?: MultiToken): Opts[K] | any; - /** - * @template {keyof Opts} L - * @param {L} key Name of options object to use - * @param {string} [operator] - * @param {MultiToken} [token] - * @returns {Opts[L] | any} - */ - getObj(key: L, operator?: string, token?: MultiToken): Opts[L] | any; - /** - * Convert the given token to a rendered element that may be added to the - * calling-interface's DOM - * @param {MultiToken} token Token to render to an HTML element - * @returns {any} Render result; e.g., HTML string, DOM element, React - * Component, etc. - */ - render(token: MultiToken): any; -} -/** - * @template T - * @typedef {null | T } Transition - */ -/** - * Define a basic state machine state. j is the list of character transitions, - * jr is the list of regex-match transitions, jd is the default state to - * transition to t is the accepting token type, if any. If this is the terminal - * state, then it does not emit a token. - * - * The template type T represents the type of the token this state accepts. This - * should be a string (such as of the token exports in `text.js`) or a - * MultiToken subclass (from `multi.js`) - * - * @template T - * @param {T} [token] Token that this state emits - */ -export function State(token?: T): void; -export class State { - /** - * @template T - * @typedef {null | T } Transition - */ - /** - * Define a basic state machine state. j is the list of character transitions, - * jr is the list of regex-match transitions, jd is the default state to - * transition to t is the accepting token type, if any. If this is the terminal - * state, then it does not emit a token. - * - * The template type T represents the type of the token this state accepts. This - * should be a string (such as of the token exports in `text.js`) or a - * MultiToken subclass (from `multi.js`) - * - * @template T - * @param {T} [token] Token that this state emits - */ - constructor(token?: T); - /** @type {{ [input: string]: State }} j */ - j: { - [input: string]: State; - }; - /** @type {[RegExp, State][]} jr */ - jr: [RegExp, State][]; - /** @type {?State} jd */ - jd: State | null; - /** @type {?T} t */ - t: T | null; - accepts(): boolean; - /** - * Follow an existing transition from the given input to the next state. - * Does not mutate. - * @param {string} input character or token type to transition on - * @returns {?State} the next state, if any - */ - go(input: string): State | null; - /** - * Whether the state has a transition for the given input. Set the second - * argument to true to only look for an exact match (and not a default or - * regular-expression-based transition) - * @param {string} input - * @param {boolean} exactOnly - */ - has(input: string, exactOnly?: boolean): boolean; - /** - * Short for "transition all"; create a transition from the array of items - * in the given list to the same final resulting state. - * @param {string | string[]} inputs Group of inputs to transition on - * @param {Transition | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - */ - ta(inputs: string | string[], next?: Transition | State, flags?: Flags, groups?: Collections): void; - /** - * Short for "take regexp transition"; defines a transition for this state - * when it encounters a token which matches the given regular expression - * @param {RegExp} regexp Regular expression transition (populate first) - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - tr(regexp: RegExp, next?: T | State, flags?: Flags, groups?: Collections): State; - /** - * Short for "take transitions", will take as many sequential transitions as - * the length of the given input and returns the - * resulting final state. - * @param {string | string[]} input - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - ts(input: string | string[], next?: T | State, flags?: Flags, groups?: Collections): State; - /** - * Short for "take transition", this is a method for building/working with - * state machines. - * - * If a state already exists for the given input, returns it. - * - * If a token is specified, that state will emit that token when reached by - * the linkify engine. - * - * If no state exists, it will be initialized with some default transitions - * that resemble existing default transitions. - * - * If a state is given for the second argument, that state will be - * transitioned to on the given input regardless of what that input - * previously did. - * - * Specify a token group flags to define groups that this token belongs to. - * The token will be added to corresponding entires in the given groups - * object. - * - * @param {string} input character, token type to transition on - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of groups - * @returns {State} taken after the given input - */ - tt(input: string, next?: T | State, flags?: Flags, groups?: Collections): State; -} -export namespace State { - export { groups }; -} -/** - * Create a new token that can be emitted by the parser state machine - * @param {string} type readable type of the token - * @param {object} props properties to assign or override, including isLink = true or false - * @returns {new (value: string, tokens: Token[]) => MultiToken} new token class - */ -export function createTokenClass(type: string, props: object): new (value: string, tokens: Token[]) => MultiToken; -/** - * Find a list of linkable items in the given string. - * @param {string} str string to find links in - * @param {string | Opts} [type] either formatting options or specific type of - * links to find, e.g., 'url' or 'email' - * @param {Opts} [opts] formatting options for final output. Cannot be specified - * if opts already provided in `type` argument - */ -export function find(str: string, type?: string | Opts, opts?: Opts): { - type: string; - value: string; - isLink: boolean; - href: string; - start: number; - end: number; -}[]; -/** - * Initialize the linkify state machine. Called automatically the first time - * linkify is called on a string, but may be called manually as well. - */ -export function init(): { - scanner: null; - parser: null; - tokenQueue: never[]; - pluginQueue: never[]; - customSchemes: never[]; - initialized: boolean; -}; -export var multi: Readonly<{ - __proto__: null; - Base: typeof MultiToken; - Email: new (value: string, tokens: Token[]) => MultiToken; - MultiToken: typeof MultiToken; - Nl: new (value: string, tokens: Token[]) => MultiToken; - Text: new (value: string, tokens: Token[]) => MultiToken; - Url: new (value: string, tokens: Token[]) => MultiToken; - createTokenClass: typeof createTokenClass; -}>; -export var options: Readonly<{ - __proto__: null; - Options: typeof Options; - defaults: Required; -}>; -export var regexp: Readonly<{ - __proto__: null; - ASCII_LETTER: RegExp; - DIGIT: RegExp; - EMOJI: RegExp; - EMOJI_VARIATION: RegExp; - LETTER: RegExp; - SPACE: RegExp; -}>; -/** - * Detect URLs with the following additional protocol. Anything with format - * "protocol://..." will be considered a link. If `optionalSlashSlash` is set to - * `true`, anything with format "protocol:..." will be considered a link. - * @param {string} scheme - * @param {boolean} [optionalSlashSlash] - */ -export function registerCustomProtocol(scheme: string, optionalSlashSlash?: boolean): void; -/** - * Register a linkify plugin - * @param {string} name of plugin to register - * @param {Plugin} plugin function that accepts the parser state machine and - * extends the parser to recognize additional link types - */ -export function registerPlugin(name: string, plugin: Plugin): void; -/** - * Register a token plugin to allow the scanner to recognize additional token - * types before the parser state machine is constructed from the results. - * @param {string} name of plugin to register - * @param {TokenPlugin} plugin function that accepts the scanner state machine - * and available scanner tokens and collections and extends the state machine to - * recognize additional tokens or groups. - */ -export function registerTokenPlugin(name: string, plugin: TokenPlugin): void; -/** - * @typedef {{ - * start: State, - * tokens: { groups: Collections } & typeof tk - * }} ScannerInit - */ -/** - * @typedef {{ - * start: State, - * tokens: typeof multi - * }} ParserInit - */ -/** - * @typedef {(arg: { scanner: ScannerInit }) => void} TokenPlugin - */ -/** - * @typedef {(arg: { scanner: ScannerInit, parser: ParserInit }) => void} Plugin - */ -/** - * De-register all plugins and reset the internal state-machine. Used for - * testing; not required in practice. - * @private - */ -export function reset(): { - scanner: null; - parser: null; - tokenQueue: never[]; - pluginQueue: never[]; - customSchemes: never[]; - initialized: boolean; -}; -/** - * Convert a String to an Array of characters, taking into account that some - * characters like emojis take up two string indexes. - * - * Adapted from core-js (MIT license) - * https://github.com/zloirock/core-js/blob/2d69cf5f99ab3ea3463c395df81e5a15b68f49d9/packages/core-js/internals/string-multibyte.js - * - * @function stringToArray - * @param {string} str - * @returns {string[]} - */ -export function stringToArray(str: string): string[]; -/** - * Is the given string valid linkable text of some sort. Note that this does not - * trim the text for you. - * - * Optionally pass in a second `type` param, which is the type of link to test - * for. - * - * For example, - * - * linkify.test(str, 'email'); - * - * Returns `true` if str is a valid email. - * @param {string} str string to test for links - * @param {string} [type] optional specific link type to look for - * @returns boolean true/false - */ -export function test(str: string, type?: string): boolean; -/** - * Parse a string into tokens that represent linkable and non-linkable sub-components - * @param {string} str - * @return {MultiToken[]} tokens - */ -export function tokenize(str: string): MultiToken[]; -export namespace tokenize { - export { run$1 as scan }; -} -declare var tk: Readonly<{ - __proto__: null; - ALPHANUMERICAL: "ALPHANUMERICAL"; - AMPERSAND: "AMPERSAND"; - APOSTROPHE: "APOSTROPHE"; - ASCIINUMERICAL: "ASCIINUMERICAL"; - ASTERISK: "ASTERISK"; - AT: "AT"; - BACKSLASH: "BACKSLASH"; - BACKTICK: "BACKTICK"; - CARET: "CARET"; - CLOSEANGLEBRACKET: "CLOSEANGLEBRACKET"; - CLOSEBRACE: "CLOSEBRACE"; - CLOSEBRACKET: "CLOSEBRACKET"; - CLOSEPAREN: "CLOSEPAREN"; - COLON: "COLON"; - COMMA: "COMMA"; - DOLLAR: "DOLLAR"; - DOT: "DOT"; - EMOJI: "EMOJI"; - EQUALS: "EQUALS"; - EXCLAMATION: "EXCLAMATION"; - FULLWIDTHGREATERTHAN: "FULLWIDTHGREATERTHAN"; - FULLWIDTHLEFTPAREN: "FULLWIDTHLEFTPAREN"; - FULLWIDTHLESSTHAN: "FULLWIDTHLESSTHAN"; - FULLWIDTHMIDDLEDOT: "FULLWIDTHMIDDLEDOT"; - FULLWIDTHRIGHTPAREN: "FULLWIDTHRIGHTPAREN"; - HYPHEN: "HYPHEN"; - LEFTCORNERBRACKET: "LEFTCORNERBRACKET"; - LEFTWHITECORNERBRACKET: "LEFTWHITECORNERBRACKET"; - LOCALHOST: "LOCALHOST"; - NL: "NL"; - NUM: "NUM"; - OPENANGLEBRACKET: "OPENANGLEBRACKET"; - OPENBRACE: "OPENBRACE"; - OPENBRACKET: "OPENBRACKET"; - OPENPAREN: "OPENPAREN"; - PERCENT: "PERCENT"; - PIPE: "PIPE"; - PLUS: "PLUS"; - POUND: "POUND"; - QUERY: "QUERY"; - QUOTE: "QUOTE"; - RIGHTCORNERBRACKET: "RIGHTCORNERBRACKET"; - RIGHTWHITECORNERBRACKET: "RIGHTWHITECORNERBRACKET"; - SCHEME: "SCHEME"; - SEMI: "SEMI"; - SLASH: "SLASH"; - SLASH_SCHEME: "SLASH_SCHEME"; - SYM: "SYM"; - TILDE: "TILDE"; - TLD: "TLD"; - UNDERSCORE: "UNDERSCORE"; - UTLD: "UTLD"; - UWORD: "UWORD"; - WORD: "WORD"; - WS: "WS"; -}>; -declare var groups: Collections; -/** - Given a string, returns an array of TOKEN instances representing the - composition of that string. - - @method run - @param {State} start scanner starting state - @param {string} str input string to scan - @return {Token[]} list of tokens, each with a type and value -*/ -declare function run$1(start: State, str: string): Token[]; -export { multi as text }; diff --git a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.d.mts b/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.d.mts deleted file mode 100644 index 8ab5687..0000000 --- a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.d.mts +++ /dev/null @@ -1,637 +0,0 @@ -export type Transition = null | T; -/** - * Scanner output token: - * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD') - * - `v` is the value of the token (e.g., '123', '❤️', 'com') - * - `s` is the start index of the token in the original string - * - `e` is the end index of the token in the original string - */ -export type Token = { - t: string; - v: string; - s: number; - e: number; -}; -export type Collections = { - [collection: string]: T[]; -}; -export type ScannerInit = { - start: State; - tokens: { - groups: Collections; - } & typeof tk; -}; -export type ParserInit = { - start: State; - tokens: typeof multi; -}; -export type TokenPlugin = (arg: { - scanner: ScannerInit; -}) => void; -export type Plugin = (arg: { - scanner: ScannerInit; - parser: ParserInit; -}) => void; -export type Flags = { - [group: string]: true; -}; -/** - * An object where each key is a valid DOM Event Name such as `click` or `focus` - * and each value is an event handler function. - * - * https://developer.mozilla.org/en-US/docs/Web/API/Element#events - */ -export type EventListeners = { - [event: string]: Function; -} | null; -/** - * All formatted properties required to render a link, including `tagName`, - * `attributes`, `content` and `eventListeners`. - */ -export type IntermediateRepresentation = { - tagName: any; - attributes: { - [attr: string]: any; - }; - content: string; - eventListeners: EventListeners; -}; -/** - * Specify either an object described by the template type `O` or a function. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `O` - */ -export type OptObj = O | ((value: string, type: string, token: MultiToken) => O); -/** - * Specify either a function described by template type `F` or an object. - * - * Each key in the object should be a link type (`'url'`, `'hashtag`', etc.). Each - * value should be a function with template type `F` that is called when the - * corresponding link type is encountered. - */ -export type OptFn = F | { - [type: string]: F; -}; -/** - * Specify either a value with template type `V`, a function that returns `V` or - * an object where each value resolves to `V`. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `V` - * - * For the object, each key should be a link type (`'url'`, `'hashtag`', etc.). - * Each value should either have type `V` or a function that returns V. This - * function similarly takes a string value and a token. - * - * Example valid types for `Opt`: - * - * ```js - * 'hello' - * (value, type, token) => 'world' - * { url: 'hello', email: (value, token) => 'world'} - * ``` - */ -export type Opt = V | ((value: string, type: string, token: MultiToken) => V) | { - [type: string]: V | ((value: string, token: MultiToken) => V); -}; -/** - * See available options: https://linkify.js.org/docs/options.html - */ -export type Opts = { - defaultProtocol?: string; - events?: OptObj; - format?: Opt; - formatHref?: Opt; - nl2br?: boolean; - tagName?: Opt; - target?: Opt; - rel?: Opt; - validate?: Opt; - truncate?: Opt; - className?: Opt; - attributes?: OptObj<({ - [attr: string]: any; - })>; - ignoreTags?: string[]; - render?: OptFn<((ir: IntermediateRepresentation) => any)>; -}; -/****************************************************************************** - Multi-Tokens - Tokens composed of arrays of TextTokens -******************************************************************************/ -/** - * @param {string} value - * @param {Token[]} tokens - */ -export function MultiToken(value: string, tokens: Token[]): void; -export class MultiToken { - /****************************************************************************** - Multi-Tokens - Tokens composed of arrays of TextTokens - ******************************************************************************/ - /** - * @param {string} value - * @param {Token[]} tokens - */ - constructor(value: string, tokens: Token[]); - t: string; - v: string; - tk: Token[]; - isLink: boolean; - /** - * Return the string this token represents. - * @return {string} - */ - toString(): string; - /** - * What should the value for this token be in the `href` HTML attribute? - * Returns the `.toString` value by default. - * @param {string} [scheme] - * @return {string} - */ - toHref(scheme?: string): string; - /** - * @param {Options} options Formatting options - * @returns {string} - */ - toFormattedString(options: Options): string; - /** - * - * @param {Options} options - * @returns {string} - */ - toFormattedHref(options: Options): string; - /** - * The start index of this token in the original input string - * @returns {number} - */ - startIndex(): number; - /** - * The end index of this token in the original input string (up to this - * index but not including it) - * @returns {number} - */ - endIndex(): number; - /** - Returns an object of relevant values for this token, which includes keys - * type - Kind of token ('url', 'email', etc.) - * value - Original text - * href - The value that should be added to the anchor tag's href - attribute - @method toObject - @param {string} [protocol] `'http'` by default - */ - toObject(protocol?: string): { - type: string; - value: string; - isLink: boolean; - href: string; - start: number; - end: number; - }; - /** - * - * @param {Options} options Formatting option - */ - toFormattedObject(options: Options): { - type: string; - value: string; - isLink: boolean; - href: string; - start: number; - end: number; - }; - /** - * Whether this token should be rendered as a link according to the given options - * @param {Options} options - * @returns {boolean} - */ - validate(options: Options): boolean; - /** - * Return an object that represents how this link should be rendered. - * @param {Options} options Formattinng options - */ - render(options: Options): { - tagName: any; - attributes: { - href: any; - class: any; - target: any; - rel: any; - }; - content: string; - eventListeners: any; - }; -} -/** - * Utility class for linkify interfaces to apply specified - * {@link Opts formatting and rendering options}. - * - * @param {Opts | Options} [opts] Option value overrides. - * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For - * internal use) default render function that determines how to generate an - * HTML element based on a link token's derived tagName, attributes and HTML. - * Similar to render option - */ -export function Options(opts?: Opts | Options, defaultRender?: (ir: IntermediateRepresentation) => any): void; -export class Options { - /** - * Utility class for linkify interfaces to apply specified - * {@link Opts formatting and rendering options}. - * - * @param {Opts | Options} [opts] Option value overrides. - * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For - * internal use) default render function that determines how to generate an - * HTML element based on a link token's derived tagName, attributes and HTML. - * Similar to render option - */ - constructor(opts?: Opts | Options, defaultRender?: (ir: IntermediateRepresentation) => any); - /** @protected */ - o: Required; - defaultRender: any; - ignoreTags: string[]; - /** - * Returns true or false based on whether a token should be displayed as a - * link based on the user options. - * @param {MultiToken} token - * @returns {boolean} - */ - check(token: MultiToken): boolean; - /** - * Resolve an option's value based on the value of the option and the given - * params. If operator and token are specified and the target option is - * callable, automatically calls the function with the given argument. - * @template {keyof Opts} K - * @param {K} key Name of option to use - * @param {string} [operator] will be passed to the target option if it's a - * function. If not specified, RAW function value gets returned - * @param {MultiToken} [token] The token from linkify.tokenize - * @returns {Opts[K] | any} - */ - get(key: K, operator?: string, token?: MultiToken): Opts[K] | any; - /** - * @template {keyof Opts} L - * @param {L} key Name of options object to use - * @param {string} [operator] - * @param {MultiToken} [token] - * @returns {Opts[L] | any} - */ - getObj(key: L, operator?: string, token?: MultiToken): Opts[L] | any; - /** - * Convert the given token to a rendered element that may be added to the - * calling-interface's DOM - * @param {MultiToken} token Token to render to an HTML element - * @returns {any} Render result; e.g., HTML string, DOM element, React - * Component, etc. - */ - render(token: MultiToken): any; -} -/** - * @template T - * @typedef {null | T } Transition - */ -/** - * Define a basic state machine state. j is the list of character transitions, - * jr is the list of regex-match transitions, jd is the default state to - * transition to t is the accepting token type, if any. If this is the terminal - * state, then it does not emit a token. - * - * The template type T represents the type of the token this state accepts. This - * should be a string (such as of the token exports in `text.js`) or a - * MultiToken subclass (from `multi.js`) - * - * @template T - * @param {T} [token] Token that this state emits - */ -export function State(token?: T): void; -export class State { - /** - * @template T - * @typedef {null | T } Transition - */ - /** - * Define a basic state machine state. j is the list of character transitions, - * jr is the list of regex-match transitions, jd is the default state to - * transition to t is the accepting token type, if any. If this is the terminal - * state, then it does not emit a token. - * - * The template type T represents the type of the token this state accepts. This - * should be a string (such as of the token exports in `text.js`) or a - * MultiToken subclass (from `multi.js`) - * - * @template T - * @param {T} [token] Token that this state emits - */ - constructor(token?: T); - /** @type {{ [input: string]: State }} j */ - j: { - [input: string]: State; - }; - /** @type {[RegExp, State][]} jr */ - jr: [RegExp, State][]; - /** @type {?State} jd */ - jd: State | null; - /** @type {?T} t */ - t: T | null; - accepts(): boolean; - /** - * Follow an existing transition from the given input to the next state. - * Does not mutate. - * @param {string} input character or token type to transition on - * @returns {?State} the next state, if any - */ - go(input: string): State | null; - /** - * Whether the state has a transition for the given input. Set the second - * argument to true to only look for an exact match (and not a default or - * regular-expression-based transition) - * @param {string} input - * @param {boolean} exactOnly - */ - has(input: string, exactOnly?: boolean): boolean; - /** - * Short for "transition all"; create a transition from the array of items - * in the given list to the same final resulting state. - * @param {string | string[]} inputs Group of inputs to transition on - * @param {Transition | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - */ - ta(inputs: string | string[], next?: Transition | State, flags?: Flags, groups?: Collections): void; - /** - * Short for "take regexp transition"; defines a transition for this state - * when it encounters a token which matches the given regular expression - * @param {RegExp} regexp Regular expression transition (populate first) - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - tr(regexp: RegExp, next?: T | State, flags?: Flags, groups?: Collections): State; - /** - * Short for "take transitions", will take as many sequential transitions as - * the length of the given input and returns the - * resulting final state. - * @param {string | string[]} input - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - ts(input: string | string[], next?: T | State, flags?: Flags, groups?: Collections): State; - /** - * Short for "take transition", this is a method for building/working with - * state machines. - * - * If a state already exists for the given input, returns it. - * - * If a token is specified, that state will emit that token when reached by - * the linkify engine. - * - * If no state exists, it will be initialized with some default transitions - * that resemble existing default transitions. - * - * If a state is given for the second argument, that state will be - * transitioned to on the given input regardless of what that input - * previously did. - * - * Specify a token group flags to define groups that this token belongs to. - * The token will be added to corresponding entires in the given groups - * object. - * - * @param {string} input character, token type to transition on - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of groups - * @returns {State} taken after the given input - */ - tt(input: string, next?: T | State, flags?: Flags, groups?: Collections): State; -} -export namespace State { - export { groups }; -} -/** - * Create a new token that can be emitted by the parser state machine - * @param {string} type readable type of the token - * @param {object} props properties to assign or override, including isLink = true or false - * @returns {new (value: string, tokens: Token[]) => MultiToken} new token class - */ -export function createTokenClass(type: string, props: object): new (value: string, tokens: Token[]) => MultiToken; -/** - * Find a list of linkable items in the given string. - * @param {string} str string to find links in - * @param {string | Opts} [type] either formatting options or specific type of - * links to find, e.g., 'url' or 'email' - * @param {Opts} [opts] formatting options for final output. Cannot be specified - * if opts already provided in `type` argument - */ -export function find(str: string, type?: string | Opts, opts?: Opts): { - type: string; - value: string; - isLink: boolean; - href: string; - start: number; - end: number; -}[]; -/** - * Initialize the linkify state machine. Called automatically the first time - * linkify is called on a string, but may be called manually as well. - */ -export function init(): { - scanner: null; - parser: null; - tokenQueue: never[]; - pluginQueue: never[]; - customSchemes: never[]; - initialized: boolean; -}; -export var multi: Readonly<{ - __proto__: null; - Base: typeof MultiToken; - Email: new (value: string, tokens: Token[]) => MultiToken; - MultiToken: typeof MultiToken; - Nl: new (value: string, tokens: Token[]) => MultiToken; - Text: new (value: string, tokens: Token[]) => MultiToken; - Url: new (value: string, tokens: Token[]) => MultiToken; - createTokenClass: typeof createTokenClass; -}>; -export var options: Readonly<{ - __proto__: null; - Options: typeof Options; - defaults: Required; -}>; -export var regexp: Readonly<{ - __proto__: null; - ASCII_LETTER: RegExp; - DIGIT: RegExp; - EMOJI: RegExp; - EMOJI_VARIATION: RegExp; - LETTER: RegExp; - SPACE: RegExp; -}>; -/** - * Detect URLs with the following additional protocol. Anything with format - * "protocol://..." will be considered a link. If `optionalSlashSlash` is set to - * `true`, anything with format "protocol:..." will be considered a link. - * @param {string} scheme - * @param {boolean} [optionalSlashSlash] - */ -export function registerCustomProtocol(scheme: string, optionalSlashSlash?: boolean): void; -/** - * Register a linkify plugin - * @param {string} name of plugin to register - * @param {Plugin} plugin function that accepts the parser state machine and - * extends the parser to recognize additional link types - */ -export function registerPlugin(name: string, plugin: Plugin): void; -/** - * Register a token plugin to allow the scanner to recognize additional token - * types before the parser state machine is constructed from the results. - * @param {string} name of plugin to register - * @param {TokenPlugin} plugin function that accepts the scanner state machine - * and available scanner tokens and collections and extends the state machine to - * recognize additional tokens or groups. - */ -export function registerTokenPlugin(name: string, plugin: TokenPlugin): void; -/** - * @typedef {{ - * start: State, - * tokens: { groups: Collections } & typeof tk - * }} ScannerInit - */ -/** - * @typedef {{ - * start: State, - * tokens: typeof multi - * }} ParserInit - */ -/** - * @typedef {(arg: { scanner: ScannerInit }) => void} TokenPlugin - */ -/** - * @typedef {(arg: { scanner: ScannerInit, parser: ParserInit }) => void} Plugin - */ -/** - * De-register all plugins and reset the internal state-machine. Used for - * testing; not required in practice. - * @private - */ -export function reset(): { - scanner: null; - parser: null; - tokenQueue: never[]; - pluginQueue: never[]; - customSchemes: never[]; - initialized: boolean; -}; -/** - * Convert a String to an Array of characters, taking into account that some - * characters like emojis take up two string indexes. - * - * Adapted from core-js (MIT license) - * https://github.com/zloirock/core-js/blob/2d69cf5f99ab3ea3463c395df81e5a15b68f49d9/packages/core-js/internals/string-multibyte.js - * - * @function stringToArray - * @param {string} str - * @returns {string[]} - */ -export function stringToArray(str: string): string[]; -/** - * Is the given string valid linkable text of some sort. Note that this does not - * trim the text for you. - * - * Optionally pass in a second `type` param, which is the type of link to test - * for. - * - * For example, - * - * linkify.test(str, 'email'); - * - * Returns `true` if str is a valid email. - * @param {string} str string to test for links - * @param {string} [type] optional specific link type to look for - * @returns boolean true/false - */ -export function test(str: string, type?: string): boolean; -/** - * Parse a string into tokens that represent linkable and non-linkable sub-components - * @param {string} str - * @return {MultiToken[]} tokens - */ -export function tokenize(str: string): MultiToken[]; -export namespace tokenize { - export { run$1 as scan }; -} -declare var tk: Readonly<{ - __proto__: null; - ALPHANUMERICAL: "ALPHANUMERICAL"; - AMPERSAND: "AMPERSAND"; - APOSTROPHE: "APOSTROPHE"; - ASCIINUMERICAL: "ASCIINUMERICAL"; - ASTERISK: "ASTERISK"; - AT: "AT"; - BACKSLASH: "BACKSLASH"; - BACKTICK: "BACKTICK"; - CARET: "CARET"; - CLOSEANGLEBRACKET: "CLOSEANGLEBRACKET"; - CLOSEBRACE: "CLOSEBRACE"; - CLOSEBRACKET: "CLOSEBRACKET"; - CLOSEPAREN: "CLOSEPAREN"; - COLON: "COLON"; - COMMA: "COMMA"; - DOLLAR: "DOLLAR"; - DOT: "DOT"; - EMOJI: "EMOJI"; - EQUALS: "EQUALS"; - EXCLAMATION: "EXCLAMATION"; - FULLWIDTHGREATERTHAN: "FULLWIDTHGREATERTHAN"; - FULLWIDTHLEFTPAREN: "FULLWIDTHLEFTPAREN"; - FULLWIDTHLESSTHAN: "FULLWIDTHLESSTHAN"; - FULLWIDTHMIDDLEDOT: "FULLWIDTHMIDDLEDOT"; - FULLWIDTHRIGHTPAREN: "FULLWIDTHRIGHTPAREN"; - HYPHEN: "HYPHEN"; - LEFTCORNERBRACKET: "LEFTCORNERBRACKET"; - LEFTWHITECORNERBRACKET: "LEFTWHITECORNERBRACKET"; - LOCALHOST: "LOCALHOST"; - NL: "NL"; - NUM: "NUM"; - OPENANGLEBRACKET: "OPENANGLEBRACKET"; - OPENBRACE: "OPENBRACE"; - OPENBRACKET: "OPENBRACKET"; - OPENPAREN: "OPENPAREN"; - PERCENT: "PERCENT"; - PIPE: "PIPE"; - PLUS: "PLUS"; - POUND: "POUND"; - QUERY: "QUERY"; - QUOTE: "QUOTE"; - RIGHTCORNERBRACKET: "RIGHTCORNERBRACKET"; - RIGHTWHITECORNERBRACKET: "RIGHTWHITECORNERBRACKET"; - SCHEME: "SCHEME"; - SEMI: "SEMI"; - SLASH: "SLASH"; - SLASH_SCHEME: "SLASH_SCHEME"; - SYM: "SYM"; - TILDE: "TILDE"; - TLD: "TLD"; - UNDERSCORE: "UNDERSCORE"; - UTLD: "UTLD"; - UWORD: "UWORD"; - WORD: "WORD"; - WS: "WS"; -}>; -declare var groups: Collections; -/** - Given a string, returns an array of TOKEN instances representing the - composition of that string. - - @method run - @param {State} start scanner starting state - @param {string} str input string to scan - @return {Token[]} list of tokens, each with a type and value -*/ -declare function run$1(start: State, str: string): Token[]; -export { multi as text }; diff --git a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.js b/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.js deleted file mode 100644 index 5b0926d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.js +++ /dev/null @@ -1,1859 +0,0 @@ -var linkify = (function (exports) { - 'use strict'; - - // THIS FILE IS AUTOMATICALLY GENERATED DO NOT EDIT DIRECTLY - // See update-tlds.js for encoding/decoding format - // https://data.iana.org/TLD/tlds-alpha-by-domain.txt - const encodedTlds = 'aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2'; - // Internationalized domain names containing non-ASCII - const encodedUtlds = 'ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2'; - - /** - * Finite State Machine generation utilities - */ - - /** - * @template T - * @typedef {{ [group: string]: T[] }} Collections - */ - - /** - * @typedef {{ [group: string]: true }} Flags - */ - - // Keys in scanner Collections instances - const numeric = 'numeric'; - const ascii = 'ascii'; - const alpha = 'alpha'; - const asciinumeric = 'asciinumeric'; - const alphanumeric = 'alphanumeric'; - const domain = 'domain'; - const emoji = 'emoji'; - const scheme = 'scheme'; - const slashscheme = 'slashscheme'; - const whitespace = 'whitespace'; - - /** - * @template T - * @param {string} name - * @param {Collections} groups to register in - * @returns {T[]} Current list of tokens in the given collection - */ - function registerGroup(name, groups) { - if (!(name in groups)) { - groups[name] = []; - } - return groups[name]; - } - - /** - * @template T - * @param {T} t token to add - * @param {Collections} groups - * @param {Flags} flags - */ - function addToGroups(t, flags, groups) { - if (flags[numeric]) { - flags[asciinumeric] = true; - flags[alphanumeric] = true; - } - if (flags[ascii]) { - flags[asciinumeric] = true; - flags[alpha] = true; - } - if (flags[asciinumeric]) { - flags[alphanumeric] = true; - } - if (flags[alpha]) { - flags[alphanumeric] = true; - } - if (flags[alphanumeric]) { - flags[domain] = true; - } - if (flags[emoji]) { - flags[domain] = true; - } - for (const k in flags) { - const group = registerGroup(k, groups); - if (group.indexOf(t) < 0) { - group.push(t); - } - } - } - - /** - * @template T - * @param {T} t token to check - * @param {Collections} groups - * @returns {Flags} group flags that contain this token - */ - function flagsForToken(t, groups) { - const result = {}; - for (const c in groups) { - if (groups[c].indexOf(t) >= 0) { - result[c] = true; - } - } - return result; - } - - /** - * @template T - * @typedef {null | T } Transition - */ - - /** - * Define a basic state machine state. j is the list of character transitions, - * jr is the list of regex-match transitions, jd is the default state to - * transition to t is the accepting token type, if any. If this is the terminal - * state, then it does not emit a token. - * - * The template type T represents the type of the token this state accepts. This - * should be a string (such as of the token exports in `text.js`) or a - * MultiToken subclass (from `multi.js`) - * - * @template T - * @param {T} [token] Token that this state emits - */ - function State(token = null) { - // this.n = null; // DEBUG: State name - /** @type {{ [input: string]: State }} j */ - this.j = {}; // IMPLEMENTATION 1 - // this.j = []; // IMPLEMENTATION 2 - /** @type {[RegExp, State][]} jr */ - this.jr = []; - /** @type {?State} jd */ - this.jd = null; - /** @type {?T} t */ - this.t = token; - } - - /** - * Scanner token groups - * @type Collections - */ - State.groups = {}; - State.prototype = { - accepts() { - return !!this.t; - }, - /** - * Follow an existing transition from the given input to the next state. - * Does not mutate. - * @param {string} input character or token type to transition on - * @returns {?State} the next state, if any - */ - go(input) { - const state = this; - const nextState = state.j[input]; - if (nextState) { - return nextState; - } - for (let i = 0; i < state.jr.length; i++) { - const regex = state.jr[i][0]; - const nextState = state.jr[i][1]; // note: might be empty to prevent default jump - if (nextState && regex.test(input)) { - return nextState; - } - } - // Nowhere left to jump! Return default, if any - return state.jd; - }, - /** - * Whether the state has a transition for the given input. Set the second - * argument to true to only look for an exact match (and not a default or - * regular-expression-based transition) - * @param {string} input - * @param {boolean} exactOnly - */ - has(input, exactOnly = false) { - return exactOnly ? input in this.j : !!this.go(input); - }, - /** - * Short for "transition all"; create a transition from the array of items - * in the given list to the same final resulting state. - * @param {string | string[]} inputs Group of inputs to transition on - * @param {Transition | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - */ - ta(inputs, next, flags, groups) { - for (let i = 0; i < inputs.length; i++) { - this.tt(inputs[i], next, flags, groups); - } - }, - /** - * Short for "take regexp transition"; defines a transition for this state - * when it encounters a token which matches the given regular expression - * @param {RegExp} regexp Regular expression transition (populate first) - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - tr(regexp, next, flags, groups) { - groups = groups || State.groups; - let nextState; - if (next && next.j) { - nextState = next; - } else { - // Token with maybe token groups - nextState = new State(next); - if (flags && groups) { - addToGroups(next, flags, groups); - } - } - this.jr.push([regexp, nextState]); - return nextState; - }, - /** - * Short for "take transitions", will take as many sequential transitions as - * the length of the given input and returns the - * resulting final state. - * @param {string | string[]} input - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - ts(input, next, flags, groups) { - let state = this; - const len = input.length; - if (!len) { - return state; - } - for (let i = 0; i < len - 1; i++) { - state = state.tt(input[i]); - } - return state.tt(input[len - 1], next, flags, groups); - }, - /** - * Short for "take transition", this is a method for building/working with - * state machines. - * - * If a state already exists for the given input, returns it. - * - * If a token is specified, that state will emit that token when reached by - * the linkify engine. - * - * If no state exists, it will be initialized with some default transitions - * that resemble existing default transitions. - * - * If a state is given for the second argument, that state will be - * transitioned to on the given input regardless of what that input - * previously did. - * - * Specify a token group flags to define groups that this token belongs to. - * The token will be added to corresponding entires in the given groups - * object. - * - * @param {string} input character, token type to transition on - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of groups - * @returns {State} taken after the given input - */ - tt(input, next, flags, groups) { - groups = groups || State.groups; - const state = this; - - // Check if existing state given, just a basic transition - if (next && next.j) { - state.j[input] = next; - return next; - } - const t = next; - - // Take the transition with the usual default mechanisms and use that as - // a template for creating the next state - let nextState, - templateState = state.go(input); - if (templateState) { - nextState = new State(); - Object.assign(nextState.j, templateState.j); - nextState.jr.push.apply(nextState.jr, templateState.jr); - nextState.jd = templateState.jd; - nextState.t = templateState.t; - } else { - nextState = new State(); - } - if (t) { - // Ensure newly token is in the same groups as the old token - if (groups) { - if (nextState.t && typeof nextState.t === 'string') { - const allFlags = Object.assign(flagsForToken(nextState.t, groups), flags); - addToGroups(t, allFlags, groups); - } else if (flags) { - addToGroups(t, flags, groups); - } - } - nextState.t = t; // overwrite anything that was previously there - } - state.j[input] = nextState; - return nextState; - } - }; - - // Helper functions to improve minification (not exported outside linkifyjs module) - - /** - * @template T - * @param {State} state - * @param {string | string[]} input - * @param {Flags} [flags] - * @param {Collections} [groups] - */ - const ta = (state, input, next, flags, groups) => state.ta(input, next, flags, groups); - - /** - * @template T - * @param {State} state - * @param {RegExp} regexp - * @param {T | State} [next] - * @param {Flags} [flags] - * @param {Collections} [groups] - */ - const tr = (state, regexp, next, flags, groups) => state.tr(regexp, next, flags, groups); - - /** - * @template T - * @param {State} state - * @param {string | string[]} input - * @param {T | State} [next] - * @param {Flags} [flags] - * @param {Collections} [groups] - */ - const ts = (state, input, next, flags, groups) => state.ts(input, next, flags, groups); - - /** - * @template T - * @param {State} state - * @param {string} input - * @param {T | State} [next] - * @param {Collections} [groups] - * @param {Flags} [flags] - */ - const tt = (state, input, next, flags, groups) => state.tt(input, next, flags, groups); - - /****************************************************************************** - Text Tokens - Identifiers for token outputs from the regexp scanner - ******************************************************************************/ - - // A valid web domain token - const WORD = 'WORD'; // only contains a-z - const UWORD = 'UWORD'; // contains letters other than a-z, used for IDN - const ASCIINUMERICAL = 'ASCIINUMERICAL'; // contains a-z, 0-9 - const ALPHANUMERICAL = 'ALPHANUMERICAL'; // contains numbers and letters other than a-z, used for IDN - - // Special case of word - const LOCALHOST = 'LOCALHOST'; - - // Valid top-level domain, special case of WORD (see tlds.js) - const TLD = 'TLD'; - - // Valid IDN TLD, special case of UWORD (see tlds.js) - const UTLD = 'UTLD'; - - // The scheme portion of a web URI protocol. Supported types include: `mailto`, - // `file`, and user-defined custom protocols. Limited to schemes that contain - // only letters - const SCHEME = 'SCHEME'; - - // Similar to SCHEME, except makes distinction for schemes that must always be - // followed by `://`, not just `:`. Supported types include `http`, `https`, - // `ftp`, `ftps` - const SLASH_SCHEME = 'SLASH_SCHEME'; - - // Any sequence of digits 0-9 - const NUM = 'NUM'; - - // Any number of consecutive whitespace characters that are not newline - const WS = 'WS'; - - // New line (unix style) - const NL = 'NL'; // \n - - // Opening/closing bracket classes - // TODO: Rename OPEN -> LEFT and CLOSE -> RIGHT in v5 to fit with Unicode names - // Also rename angle brackes to LESSTHAN and GREATER THAN - const OPENBRACE = 'OPENBRACE'; // { - const CLOSEBRACE = 'CLOSEBRACE'; // } - const OPENBRACKET = 'OPENBRACKET'; // [ - const CLOSEBRACKET = 'CLOSEBRACKET'; // ] - const OPENPAREN = 'OPENPAREN'; // ( - const CLOSEPAREN = 'CLOSEPAREN'; // ) - const OPENANGLEBRACKET = 'OPENANGLEBRACKET'; // < - const CLOSEANGLEBRACKET = 'CLOSEANGLEBRACKET'; // > - const FULLWIDTHLEFTPAREN = 'FULLWIDTHLEFTPAREN'; // ( - const FULLWIDTHRIGHTPAREN = 'FULLWIDTHRIGHTPAREN'; // ) - const LEFTCORNERBRACKET = 'LEFTCORNERBRACKET'; // 「 - const RIGHTCORNERBRACKET = 'RIGHTCORNERBRACKET'; // 」 - const LEFTWHITECORNERBRACKET = 'LEFTWHITECORNERBRACKET'; // 『 - const RIGHTWHITECORNERBRACKET = 'RIGHTWHITECORNERBRACKET'; // 』 - const FULLWIDTHLESSTHAN = 'FULLWIDTHLESSTHAN'; // < - const FULLWIDTHGREATERTHAN = 'FULLWIDTHGREATERTHAN'; // > - - // Various symbols - const AMPERSAND = 'AMPERSAND'; // & - const APOSTROPHE = 'APOSTROPHE'; // ' - const ASTERISK = 'ASTERISK'; // * - const AT = 'AT'; // @ - const BACKSLASH = 'BACKSLASH'; // \ - const BACKTICK = 'BACKTICK'; // ` - const CARET = 'CARET'; // ^ - const COLON = 'COLON'; // : - const COMMA = 'COMMA'; // , - const DOLLAR = 'DOLLAR'; // $ - const DOT = 'DOT'; // . - const EQUALS = 'EQUALS'; // = - const EXCLAMATION = 'EXCLAMATION'; // ! - const HYPHEN = 'HYPHEN'; // - - const PERCENT = 'PERCENT'; // % - const PIPE = 'PIPE'; // | - const PLUS = 'PLUS'; // + - const POUND = 'POUND'; // # - const QUERY = 'QUERY'; // ? - const QUOTE = 'QUOTE'; // " - const FULLWIDTHMIDDLEDOT = 'FULLWIDTHMIDDLEDOT'; // ・ - - const SEMI = 'SEMI'; // ; - const SLASH = 'SLASH'; // / - const TILDE = 'TILDE'; // ~ - const UNDERSCORE = 'UNDERSCORE'; // _ - - // Emoji symbol - const EMOJI$1 = 'EMOJI'; - - // Default token - anything that is not one of the above - const SYM = 'SYM'; - - var tk = /*#__PURE__*/Object.freeze({ - __proto__: null, - ALPHANUMERICAL: ALPHANUMERICAL, - AMPERSAND: AMPERSAND, - APOSTROPHE: APOSTROPHE, - ASCIINUMERICAL: ASCIINUMERICAL, - ASTERISK: ASTERISK, - AT: AT, - BACKSLASH: BACKSLASH, - BACKTICK: BACKTICK, - CARET: CARET, - CLOSEANGLEBRACKET: CLOSEANGLEBRACKET, - CLOSEBRACE: CLOSEBRACE, - CLOSEBRACKET: CLOSEBRACKET, - CLOSEPAREN: CLOSEPAREN, - COLON: COLON, - COMMA: COMMA, - DOLLAR: DOLLAR, - DOT: DOT, - EMOJI: EMOJI$1, - EQUALS: EQUALS, - EXCLAMATION: EXCLAMATION, - FULLWIDTHGREATERTHAN: FULLWIDTHGREATERTHAN, - FULLWIDTHLEFTPAREN: FULLWIDTHLEFTPAREN, - FULLWIDTHLESSTHAN: FULLWIDTHLESSTHAN, - FULLWIDTHMIDDLEDOT: FULLWIDTHMIDDLEDOT, - FULLWIDTHRIGHTPAREN: FULLWIDTHRIGHTPAREN, - HYPHEN: HYPHEN, - LEFTCORNERBRACKET: LEFTCORNERBRACKET, - LEFTWHITECORNERBRACKET: LEFTWHITECORNERBRACKET, - LOCALHOST: LOCALHOST, - NL: NL, - NUM: NUM, - OPENANGLEBRACKET: OPENANGLEBRACKET, - OPENBRACE: OPENBRACE, - OPENBRACKET: OPENBRACKET, - OPENPAREN: OPENPAREN, - PERCENT: PERCENT, - PIPE: PIPE, - PLUS: PLUS, - POUND: POUND, - QUERY: QUERY, - QUOTE: QUOTE, - RIGHTCORNERBRACKET: RIGHTCORNERBRACKET, - RIGHTWHITECORNERBRACKET: RIGHTWHITECORNERBRACKET, - SCHEME: SCHEME, - SEMI: SEMI, - SLASH: SLASH, - SLASH_SCHEME: SLASH_SCHEME, - SYM: SYM, - TILDE: TILDE, - TLD: TLD, - UNDERSCORE: UNDERSCORE, - UTLD: UTLD, - UWORD: UWORD, - WORD: WORD, - WS: WS - }); - - // Note that these two Unicode ones expand into a really big one with Babel - const ASCII_LETTER = /[a-z]/; - const LETTER = /\p{L}/u; // Any Unicode character with letter data type - const EMOJI = /\p{Emoji}/u; // Any Unicode emoji character - const EMOJI_VARIATION$1 = /\ufe0f/; - const DIGIT = /\d/; - const SPACE = /\s/; - - var regexp = /*#__PURE__*/Object.freeze({ - __proto__: null, - ASCII_LETTER: ASCII_LETTER, - DIGIT: DIGIT, - EMOJI: EMOJI, - EMOJI_VARIATION: EMOJI_VARIATION$1, - LETTER: LETTER, - SPACE: SPACE - }); - - /** - The scanner provides an interface that takes a string of text as input, and - outputs an array of tokens instances that can be used for easy URL parsing. - */ - - const CR = '\r'; // carriage-return character - const LF = '\n'; // line-feed character - const EMOJI_VARIATION = '\ufe0f'; // Variation selector, follows heart and others - const EMOJI_JOINER = '\u200d'; // zero-width joiner - const OBJECT_REPLACEMENT = '\ufffc'; // whitespace placeholder that sometimes appears in rich text editors - - let tlds = null, - utlds = null; // don't change so only have to be computed once - - /** - * Scanner output token: - * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD') - * - `v` is the value of the token (e.g., '123', '❤️', 'com') - * - `s` is the start index of the token in the original string - * - `e` is the end index of the token in the original string - * @typedef {{t: string, v: string, s: number, e: number}} Token - */ - - /** - * @template T - * @typedef {{ [collection: string]: T[] }} Collections - */ - - /** - * Initialize the scanner character-based state machine for the given start - * state - * @param {[string, boolean][]} customSchemes List of custom schemes, where each - * item is a length-2 tuple with the first element set to the string scheme, and - * the second element set to `true` if the `://` after the scheme is optional - */ - function init$2(customSchemes = []) { - // Frequently used states (name argument removed during minification) - /** @type Collections */ - const groups = {}; // of tokens - State.groups = groups; - /** @type State */ - const Start = new State(); - if (tlds == null) { - tlds = decodeTlds(encodedTlds); - } - if (utlds == null) { - utlds = decodeTlds(encodedUtlds); - } - - // States for special URL symbols that accept immediately after start - tt(Start, "'", APOSTROPHE); - tt(Start, '{', OPENBRACE); - tt(Start, '}', CLOSEBRACE); - tt(Start, '[', OPENBRACKET); - tt(Start, ']', CLOSEBRACKET); - tt(Start, '(', OPENPAREN); - tt(Start, ')', CLOSEPAREN); - tt(Start, '<', OPENANGLEBRACKET); - tt(Start, '>', CLOSEANGLEBRACKET); - tt(Start, '(', FULLWIDTHLEFTPAREN); - tt(Start, ')', FULLWIDTHRIGHTPAREN); - tt(Start, '「', LEFTCORNERBRACKET); - tt(Start, '」', RIGHTCORNERBRACKET); - tt(Start, '『', LEFTWHITECORNERBRACKET); - tt(Start, '』', RIGHTWHITECORNERBRACKET); - tt(Start, '<', FULLWIDTHLESSTHAN); - tt(Start, '>', FULLWIDTHGREATERTHAN); - tt(Start, '&', AMPERSAND); - tt(Start, '*', ASTERISK); - tt(Start, '@', AT); - tt(Start, '`', BACKTICK); - tt(Start, '^', CARET); - tt(Start, ':', COLON); - tt(Start, ',', COMMA); - tt(Start, '$', DOLLAR); - tt(Start, '.', DOT); - tt(Start, '=', EQUALS); - tt(Start, '!', EXCLAMATION); - tt(Start, '-', HYPHEN); - tt(Start, '%', PERCENT); - tt(Start, '|', PIPE); - tt(Start, '+', PLUS); - tt(Start, '#', POUND); - tt(Start, '?', QUERY); - tt(Start, '"', QUOTE); - tt(Start, '/', SLASH); - tt(Start, ';', SEMI); - tt(Start, '~', TILDE); - tt(Start, '_', UNDERSCORE); - tt(Start, '\\', BACKSLASH); - tt(Start, '・', FULLWIDTHMIDDLEDOT); - const Num = tr(Start, DIGIT, NUM, { - [numeric]: true - }); - tr(Num, DIGIT, Num); - const Asciinumeric = tr(Num, ASCII_LETTER, ASCIINUMERICAL, { - [asciinumeric]: true - }); - const Alphanumeric = tr(Num, LETTER, ALPHANUMERICAL, { - [alphanumeric]: true - }); - - // State which emits a word token - const Word = tr(Start, ASCII_LETTER, WORD, { - [ascii]: true - }); - tr(Word, DIGIT, Asciinumeric); - tr(Word, ASCII_LETTER, Word); - tr(Asciinumeric, DIGIT, Asciinumeric); - tr(Asciinumeric, ASCII_LETTER, Asciinumeric); - - // Same as previous, but specific to non-fsm.ascii alphabet words - const UWord = tr(Start, LETTER, UWORD, { - [alpha]: true - }); - tr(UWord, ASCII_LETTER); // Non-accepting - tr(UWord, DIGIT, Alphanumeric); - tr(UWord, LETTER, UWord); - tr(Alphanumeric, DIGIT, Alphanumeric); - tr(Alphanumeric, ASCII_LETTER); // Non-accepting - tr(Alphanumeric, LETTER, Alphanumeric); // Non-accepting - - // Whitespace jumps - // Tokens of only non-newline whitespace are arbitrarily long - // If any whitespace except newline, more whitespace! - const Nl = tt(Start, LF, NL, { - [whitespace]: true - }); - const Cr = tt(Start, CR, WS, { - [whitespace]: true - }); - const Ws = tr(Start, SPACE, WS, { - [whitespace]: true - }); - tt(Start, OBJECT_REPLACEMENT, Ws); - tt(Cr, LF, Nl); // \r\n - tt(Cr, OBJECT_REPLACEMENT, Ws); - tr(Cr, SPACE, Ws); - tt(Ws, CR); // non-accepting state to avoid mixing whitespaces - tt(Ws, LF); // non-accepting state to avoid mixing whitespaces - tr(Ws, SPACE, Ws); - tt(Ws, OBJECT_REPLACEMENT, Ws); - - // Emoji tokens. They are not grouped by the scanner except in cases where a - // zero-width joiner is present - const Emoji = tr(Start, EMOJI, EMOJI$1, { - [emoji]: true - }); - tt(Emoji, '#'); // no transition, emoji regex seems to match # - tr(Emoji, EMOJI, Emoji); - tt(Emoji, EMOJI_VARIATION, Emoji); - // tt(Start, EMOJI_VARIATION, Emoji); // This one is sketchy - - const EmojiJoiner = tt(Emoji, EMOJI_JOINER); - tt(EmojiJoiner, '#'); - tr(EmojiJoiner, EMOJI, Emoji); - // tt(EmojiJoiner, EMOJI_VARIATION, Emoji); // also sketchy - - // Generates states for top-level domains - // Note that this is most accurate when tlds are in alphabetical order - const wordjr = [[ASCII_LETTER, Word], [DIGIT, Asciinumeric]]; - const uwordjr = [[ASCII_LETTER, null], [LETTER, UWord], [DIGIT, Alphanumeric]]; - for (let i = 0; i < tlds.length; i++) { - fastts(Start, tlds[i], TLD, WORD, wordjr); - } - for (let i = 0; i < utlds.length; i++) { - fastts(Start, utlds[i], UTLD, UWORD, uwordjr); - } - addToGroups(TLD, { - tld: true, - ascii: true - }, groups); - addToGroups(UTLD, { - utld: true, - alpha: true - }, groups); - - // Collect the states generated by different protocols. NOTE: If any new TLDs - // get added that are also protocols, set the token to be the same as the - // protocol to ensure parsing works as expected. - fastts(Start, 'file', SCHEME, WORD, wordjr); - fastts(Start, 'mailto', SCHEME, WORD, wordjr); - fastts(Start, 'http', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'https', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'ftp', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'ftps', SLASH_SCHEME, WORD, wordjr); - addToGroups(SCHEME, { - scheme: true, - ascii: true - }, groups); - addToGroups(SLASH_SCHEME, { - slashscheme: true, - ascii: true - }, groups); - - // Register custom schemes. Assumes each scheme is asciinumeric with hyphens - customSchemes = customSchemes.sort((a, b) => a[0] > b[0] ? 1 : -1); - for (let i = 0; i < customSchemes.length; i++) { - const sch = customSchemes[i][0]; - const optionalSlashSlash = customSchemes[i][1]; - const flags = optionalSlashSlash ? { - [scheme]: true - } : { - [slashscheme]: true - }; - if (sch.indexOf('-') >= 0) { - flags[domain] = true; - } else if (!ASCII_LETTER.test(sch)) { - flags[numeric] = true; // numbers only - } else if (DIGIT.test(sch)) { - flags[asciinumeric] = true; - } else { - flags[ascii] = true; - } - ts(Start, sch, sch, flags); - } - - // Localhost token - ts(Start, 'localhost', LOCALHOST, { - ascii: true - }); - - // Set default transition for start state (some symbol) - Start.jd = new State(SYM); - return { - start: Start, - tokens: Object.assign({ - groups - }, tk) - }; - } - - /** - Given a string, returns an array of TOKEN instances representing the - composition of that string. - - @method run - @param {State} start scanner starting state - @param {string} str input string to scan - @return {Token[]} list of tokens, each with a type and value - */ - function run$1(start, str) { - // State machine is not case sensitive, so input is tokenized in lowercased - // form (still returns regular case). Uses selective `toLowerCase` because - // lowercasing the entire string causes the length and character position to - // vary in some non-English strings with V8-based runtimes. - const iterable = stringToArray(str.replace(/[A-Z]/g, c => c.toLowerCase())); - const charCount = iterable.length; // <= len if there are emojis, etc - const tokens = []; // return value - - // cursor through the string itself, accounting for characters that have - // width with length 2 such as emojis - let cursor = 0; - - // Cursor through the array-representation of the string - let charCursor = 0; - - // Tokenize the string - while (charCursor < charCount) { - let state = start; - let nextState = null; - let tokenLength = 0; - let latestAccepting = null; - let sinceAccepts = -1; - let charsSinceAccepts = -1; - while (charCursor < charCount && (nextState = state.go(iterable[charCursor]))) { - state = nextState; - - // Keep track of the latest accepting state - if (state.accepts()) { - sinceAccepts = 0; - charsSinceAccepts = 0; - latestAccepting = state; - } else if (sinceAccepts >= 0) { - sinceAccepts += iterable[charCursor].length; - charsSinceAccepts++; - } - tokenLength += iterable[charCursor].length; - cursor += iterable[charCursor].length; - charCursor++; - } - - // Roll back to the latest accepting state - cursor -= sinceAccepts; - charCursor -= charsSinceAccepts; - tokenLength -= sinceAccepts; - - // No more jumps, just make a new token from the last accepting one - tokens.push({ - t: latestAccepting.t, - // token type/name - v: str.slice(cursor - tokenLength, cursor), - // string value - s: cursor - tokenLength, - // start index - e: cursor // end index (excluding) - }); - } - return tokens; - } - - /** - * Convert a String to an Array of characters, taking into account that some - * characters like emojis take up two string indexes. - * - * Adapted from core-js (MIT license) - * https://github.com/zloirock/core-js/blob/2d69cf5f99ab3ea3463c395df81e5a15b68f49d9/packages/core-js/internals/string-multibyte.js - * - * @function stringToArray - * @param {string} str - * @returns {string[]} - */ - function stringToArray(str) { - const result = []; - const len = str.length; - let index = 0; - while (index < len) { - let first = str.charCodeAt(index); - let second; - let char = first < 0xd800 || first > 0xdbff || index + 1 === len || (second = str.charCodeAt(index + 1)) < 0xdc00 || second > 0xdfff ? str[index] // single character - : str.slice(index, index + 2); // two-index characters - result.push(char); - index += char.length; - } - return result; - } - - /** - * Fast version of ts function for when transition defaults are well known - * @param {State} state - * @param {string} input - * @param {string} t - * @param {string} defaultt - * @param {[RegExp, State][]} jr - * @returns {State} - */ - function fastts(state, input, t, defaultt, jr) { - let next; - const len = input.length; - for (let i = 0; i < len - 1; i++) { - const char = input[i]; - if (state.j[char]) { - next = state.j[char]; - } else { - next = new State(defaultt); - next.jr = jr.slice(); - state.j[char] = next; - } - state = next; - } - next = new State(t); - next.jr = jr.slice(); - state.j[input[len - 1]] = next; - return next; - } - - /** - * Converts a string of Top-Level Domain names encoded in update-tlds.js back - * into a list of strings. - * @param {str} encoded encoded TLDs string - * @returns {str[]} original TLDs list - */ - function decodeTlds(encoded) { - const words = []; - const stack = []; - let i = 0; - let digits = '0123456789'; - while (i < encoded.length) { - let popDigitCount = 0; - while (digits.indexOf(encoded[i + popDigitCount]) >= 0) { - popDigitCount++; // encountered some digits, have to pop to go one level up trie - } - if (popDigitCount > 0) { - words.push(stack.join('')); // whatever preceded the pop digits must be a word - for (let popCount = parseInt(encoded.substring(i, i + popDigitCount), 10); popCount > 0; popCount--) { - stack.pop(); - } - i += popDigitCount; - } else { - stack.push(encoded[i]); // drop down a level into the trie - i++; - } - } - return words; - } - - /** - * An object where each key is a valid DOM Event Name such as `click` or `focus` - * and each value is an event handler function. - * - * https://developer.mozilla.org/en-US/docs/Web/API/Element#events - * @typedef {?{ [event: string]: Function }} EventListeners - */ - - /** - * All formatted properties required to render a link, including `tagName`, - * `attributes`, `content` and `eventListeners`. - * @typedef {{ tagName: any, attributes: {[attr: string]: any}, content: string, - * eventListeners: EventListeners }} IntermediateRepresentation - */ - - /** - * Specify either an object described by the template type `O` or a function. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `O` - * @template O - * @typedef {O | ((value: string, type: string, token: MultiToken) => O)} OptObj - */ - - /** - * Specify either a function described by template type `F` or an object. - * - * Each key in the object should be a link type (`'url'`, `'hashtag`', etc.). Each - * value should be a function with template type `F` that is called when the - * corresponding link type is encountered. - * @template F - * @typedef {F | { [type: string]: F}} OptFn - */ - - /** - * Specify either a value with template type `V`, a function that returns `V` or - * an object where each value resolves to `V`. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `V` - * - * For the object, each key should be a link type (`'url'`, `'hashtag`', etc.). - * Each value should either have type `V` or a function that returns V. This - * function similarly takes a string value and a token. - * - * Example valid types for `Opt`: - * - * ```js - * 'hello' - * (value, type, token) => 'world' - * { url: 'hello', email: (value, token) => 'world'} - * ``` - * @template V - * @typedef {V | ((value: string, type: string, token: MultiToken) => V) | { [type: string]: V | ((value: string, token: MultiToken) => V) }} Opt - */ - - /** - * See available options: https://linkify.js.org/docs/options.html - * @typedef {{ - * defaultProtocol?: string, - * events?: OptObj, - * format?: Opt, - * formatHref?: Opt, - * nl2br?: boolean, - * tagName?: Opt, - * target?: Opt, - * rel?: Opt, - * validate?: Opt, - * truncate?: Opt, - * className?: Opt, - * attributes?: OptObj<({ [attr: string]: any })>, - * ignoreTags?: string[], - * render?: OptFn<((ir: IntermediateRepresentation) => any)> - * }} Opts - */ - - /** - * @type Required - */ - const defaults = { - defaultProtocol: 'http', - events: null, - format: noop, - formatHref: noop, - nl2br: false, - tagName: 'a', - target: null, - rel: null, - validate: true, - truncate: Infinity, - className: null, - attributes: null, - ignoreTags: [], - render: null - }; - - /** - * Utility class for linkify interfaces to apply specified - * {@link Opts formatting and rendering options}. - * - * @param {Opts | Options} [opts] Option value overrides. - * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For - * internal use) default render function that determines how to generate an - * HTML element based on a link token's derived tagName, attributes and HTML. - * Similar to render option - */ - function Options(opts, defaultRender = null) { - let o = Object.assign({}, defaults); - if (opts) { - o = Object.assign(o, opts instanceof Options ? opts.o : opts); - } - - // Ensure all ignored tags are uppercase - const ignoredTags = o.ignoreTags; - const uppercaseIgnoredTags = []; - for (let i = 0; i < ignoredTags.length; i++) { - uppercaseIgnoredTags.push(ignoredTags[i].toUpperCase()); - } - /** @protected */ - this.o = o; - if (defaultRender) { - this.defaultRender = defaultRender; - } - this.ignoreTags = uppercaseIgnoredTags; - } - Options.prototype = { - o: defaults, - /** - * @type string[] - */ - ignoreTags: [], - /** - * @param {IntermediateRepresentation} ir - * @returns {any} - */ - defaultRender(ir) { - return ir; - }, - /** - * Returns true or false based on whether a token should be displayed as a - * link based on the user options. - * @param {MultiToken} token - * @returns {boolean} - */ - check(token) { - return this.get('validate', token.toString(), token); - }, - // Private methods - - /** - * Resolve an option's value based on the value of the option and the given - * params. If operator and token are specified and the target option is - * callable, automatically calls the function with the given argument. - * @template {keyof Opts} K - * @param {K} key Name of option to use - * @param {string} [operator] will be passed to the target option if it's a - * function. If not specified, RAW function value gets returned - * @param {MultiToken} [token] The token from linkify.tokenize - * @returns {Opts[K] | any} - */ - get(key, operator, token) { - const isCallable = operator != null; - let option = this.o[key]; - if (!option) { - return option; - } - if (typeof option === 'object') { - option = token.t in option ? option[token.t] : defaults[key]; - if (typeof option === 'function' && isCallable) { - option = option(operator, token); - } - } else if (typeof option === 'function' && isCallable) { - option = option(operator, token.t, token); - } - return option; - }, - /** - * @template {keyof Opts} L - * @param {L} key Name of options object to use - * @param {string} [operator] - * @param {MultiToken} [token] - * @returns {Opts[L] | any} - */ - getObj(key, operator, token) { - let obj = this.o[key]; - if (typeof obj === 'function' && operator != null) { - obj = obj(operator, token.t, token); - } - return obj; - }, - /** - * Convert the given token to a rendered element that may be added to the - * calling-interface's DOM - * @param {MultiToken} token Token to render to an HTML element - * @returns {any} Render result; e.g., HTML string, DOM element, React - * Component, etc. - */ - render(token) { - const ir = token.render(this); // intermediate representation - const renderFn = this.get('render', null, token) || this.defaultRender; - return renderFn(ir, token.t, token); - } - }; - function noop(val) { - return val; - } - - var options = /*#__PURE__*/Object.freeze({ - __proto__: null, - Options: Options, - defaults: defaults - }); - - /****************************************************************************** - Multi-Tokens - Tokens composed of arrays of TextTokens - ******************************************************************************/ - - /** - * @param {string} value - * @param {Token[]} tokens - */ - function MultiToken(value, tokens) { - this.t = 'token'; - this.v = value; - this.tk = tokens; - } - - /** - * Abstract class used for manufacturing tokens of text tokens. That is rather - * than the value for a token being a small string of text, it's value an array - * of text tokens. - * - * Used for grouping together URLs, emails, hashtags, and other potential - * creations. - * @class MultiToken - * @property {string} t - * @property {string} v - * @property {Token[]} tk - * @abstract - */ - MultiToken.prototype = { - isLink: false, - /** - * Return the string this token represents. - * @return {string} - */ - toString() { - return this.v; - }, - /** - * What should the value for this token be in the `href` HTML attribute? - * Returns the `.toString` value by default. - * @param {string} [scheme] - * @return {string} - */ - toHref(scheme) { - return this.toString(); - }, - /** - * @param {Options} options Formatting options - * @returns {string} - */ - toFormattedString(options) { - const val = this.toString(); - const truncate = options.get('truncate', val, this); - const formatted = options.get('format', val, this); - return truncate && formatted.length > truncate ? formatted.substring(0, truncate) + '…' : formatted; - }, - /** - * - * @param {Options} options - * @returns {string} - */ - toFormattedHref(options) { - return options.get('formatHref', this.toHref(options.get('defaultProtocol')), this); - }, - /** - * The start index of this token in the original input string - * @returns {number} - */ - startIndex() { - return this.tk[0].s; - }, - /** - * The end index of this token in the original input string (up to this - * index but not including it) - * @returns {number} - */ - endIndex() { - return this.tk[this.tk.length - 1].e; - }, - /** - Returns an object of relevant values for this token, which includes keys - * type - Kind of token ('url', 'email', etc.) - * value - Original text - * href - The value that should be added to the anchor tag's href - attribute - @method toObject - @param {string} [protocol] `'http'` by default - */ - toObject(protocol = defaults.defaultProtocol) { - return { - type: this.t, - value: this.toString(), - isLink: this.isLink, - href: this.toHref(protocol), - start: this.startIndex(), - end: this.endIndex() - }; - }, - /** - * - * @param {Options} options Formatting option - */ - toFormattedObject(options) { - return { - type: this.t, - value: this.toFormattedString(options), - isLink: this.isLink, - href: this.toFormattedHref(options), - start: this.startIndex(), - end: this.endIndex() - }; - }, - /** - * Whether this token should be rendered as a link according to the given options - * @param {Options} options - * @returns {boolean} - */ - validate(options) { - return options.get('validate', this.toString(), this); - }, - /** - * Return an object that represents how this link should be rendered. - * @param {Options} options Formattinng options - */ - render(options) { - const token = this; - const href = this.toHref(options.get('defaultProtocol')); - const formattedHref = options.get('formatHref', href, this); - const tagName = options.get('tagName', href, token); - const content = this.toFormattedString(options); - const attributes = {}; - const className = options.get('className', href, token); - const target = options.get('target', href, token); - const rel = options.get('rel', href, token); - const attrs = options.getObj('attributes', href, token); - const eventListeners = options.getObj('events', href, token); - attributes.href = formattedHref; - if (className) { - attributes.class = className; - } - if (target) { - attributes.target = target; - } - if (rel) { - attributes.rel = rel; - } - if (attrs) { - Object.assign(attributes, attrs); - } - return { - tagName, - attributes, - content, - eventListeners - }; - } - }; - - /** - * Create a new token that can be emitted by the parser state machine - * @param {string} type readable type of the token - * @param {object} props properties to assign or override, including isLink = true or false - * @returns {new (value: string, tokens: Token[]) => MultiToken} new token class - */ - function createTokenClass(type, props) { - class Token extends MultiToken { - constructor(value, tokens) { - super(value, tokens); - this.t = type; - } - } - for (const p in props) { - Token.prototype[p] = props[p]; - } - Token.t = type; - return Token; - } - - /** - Represents a list of tokens making up a valid email address - */ - const Email = createTokenClass('email', { - isLink: true, - toHref() { - return 'mailto:' + this.toString(); - } - }); - - /** - Represents some plain text - */ - const Text = createTokenClass('text'); - - /** - Multi-linebreak token - represents a line break - @class Nl - */ - const Nl = createTokenClass('nl'); - - /** - Represents a list of text tokens making up a valid URL - @class Url - */ - const Url = createTokenClass('url', { - isLink: true, - /** - Lowercases relevant parts of the domain and adds the protocol if - required. Note that this will not escape unsafe HTML characters in the - URL. - @param {string} [scheme] default scheme (e.g., 'https') - @return {string} the full href - */ - toHref(scheme = defaults.defaultProtocol) { - // Check if already has a prefix scheme - return this.hasProtocol() ? this.v : `${scheme}://${this.v}`; - }, - /** - * Check whether this URL token has a protocol - * @return {boolean} - */ - hasProtocol() { - const tokens = this.tk; - return tokens.length >= 2 && tokens[0].t !== LOCALHOST && tokens[1].t === COLON; - } - }); - - var multi = /*#__PURE__*/Object.freeze({ - __proto__: null, - Base: MultiToken, - Email: Email, - MultiToken: MultiToken, - Nl: Nl, - Text: Text, - Url: Url, - createTokenClass: createTokenClass - }); - - /** - Not exactly parser, more like the second-stage scanner (although we can - theoretically hotswap the code here with a real parser in the future... but - for a little URL-finding utility abstract syntax trees may be a little - overkill). - - URL format: http://en.wikipedia.org/wiki/URI_scheme - Email format: http://en.wikipedia.org/wiki/EmailAddress (links to RFC in - reference) - - @module linkify - @submodule parser - @main run - */ - - const makeState = arg => new State(arg); - - /** - * Generate the parser multi token-based state machine - * @param {{ groups: Collections }} tokens - */ - function init$1({ - groups - }) { - // Types of characters the URL can definitely end in - const qsAccepting = groups.domain.concat([AMPERSAND, ASTERISK, AT, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, NUM, PERCENT, PIPE, PLUS, POUND, SLASH, SYM, TILDE, UNDERSCORE]); - - // Types of tokens that can follow a URL and be part of the query string - // but cannot be the very last characters - // Characters that cannot appear in the URL at all should be excluded - const qsNonAccepting = [APOSTROPHE, COLON, COMMA, DOT, EXCLAMATION, PERCENT, QUERY, QUOTE, SEMI, OPENANGLEBRACKET, CLOSEANGLEBRACKET, OPENBRACE, CLOSEBRACE, CLOSEBRACKET, OPENBRACKET, OPENPAREN, CLOSEPAREN, FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN, LEFTCORNERBRACKET, RIGHTCORNERBRACKET, LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET, FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN]; - - // For addresses without the mailto prefix - // Tokens allowed in the localpart of the email - const localpartAccepting = [AMPERSAND, APOSTROPHE, ASTERISK, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, OPENBRACE, CLOSEBRACE, PERCENT, PIPE, PLUS, POUND, QUERY, SLASH, SYM, TILDE, UNDERSCORE]; - - // The universal starting state. - /** - * @type State - */ - const Start = makeState(); - const Localpart = tt(Start, TILDE); // Local part of the email address - ta(Localpart, localpartAccepting, Localpart); - ta(Localpart, groups.domain, Localpart); - const Domain = makeState(), - Scheme = makeState(), - SlashScheme = makeState(); - ta(Start, groups.domain, Domain); // parsed string ends with a potential domain name (A) - ta(Start, groups.scheme, Scheme); // e.g., 'mailto' - ta(Start, groups.slashscheme, SlashScheme); // e.g., 'http' - - ta(Domain, localpartAccepting, Localpart); - ta(Domain, groups.domain, Domain); - const LocalpartAt = tt(Domain, AT); // Local part of the email address plus @ - - tt(Localpart, AT, LocalpartAt); // close to an email address now - - // Local part of an email address can be e.g. 'http' or 'mailto' - tt(Scheme, AT, LocalpartAt); - tt(SlashScheme, AT, LocalpartAt); - const LocalpartDot = tt(Localpart, DOT); // Local part of the email address plus '.' (localpart cannot end in .) - ta(LocalpartDot, localpartAccepting, Localpart); - ta(LocalpartDot, groups.domain, Localpart); - const EmailDomain = makeState(); - ta(LocalpartAt, groups.domain, EmailDomain); // parsed string starts with local email info + @ with a potential domain name - ta(EmailDomain, groups.domain, EmailDomain); - const EmailDomainDot = tt(EmailDomain, DOT); // domain followed by DOT - ta(EmailDomainDot, groups.domain, EmailDomain); - const Email$1 = makeState(Email); // Possible email address (could have more tlds) - ta(EmailDomainDot, groups.tld, Email$1); - ta(EmailDomainDot, groups.utld, Email$1); - tt(LocalpartAt, LOCALHOST, Email$1); - - // Hyphen can jump back to a domain name - const EmailDomainHyphen = tt(EmailDomain, HYPHEN); // parsed string starts with local email info + @ with a potential domain name - tt(EmailDomainHyphen, HYPHEN, EmailDomainHyphen); - ta(EmailDomainHyphen, groups.domain, EmailDomain); - ta(Email$1, groups.domain, EmailDomain); - tt(Email$1, DOT, EmailDomainDot); - tt(Email$1, HYPHEN, EmailDomainHyphen); - - // Account for dots and hyphens. Hyphens are usually parts of domain names - // (but not TLDs) - const DomainHyphen = tt(Domain, HYPHEN); // domain followed by hyphen - const DomainDot = tt(Domain, DOT); // domain followed by DOT - tt(DomainHyphen, HYPHEN, DomainHyphen); - ta(DomainHyphen, groups.domain, Domain); - ta(DomainDot, localpartAccepting, Localpart); - ta(DomainDot, groups.domain, Domain); - const DomainDotTld = makeState(Url); // Simplest possible URL with no query string - ta(DomainDot, groups.tld, DomainDotTld); - ta(DomainDot, groups.utld, DomainDotTld); - ta(DomainDotTld, groups.domain, Domain); - ta(DomainDotTld, localpartAccepting, Localpart); - tt(DomainDotTld, DOT, DomainDot); - tt(DomainDotTld, HYPHEN, DomainHyphen); - tt(DomainDotTld, AT, LocalpartAt); - const DomainDotTldColon = tt(DomainDotTld, COLON); // URL followed by colon (potential port number here) - const DomainDotTldColonPort = makeState(Url); // TLD followed by a port number - ta(DomainDotTldColon, groups.numeric, DomainDotTldColonPort); - - // Long URL with optional port and maybe query string - const Url$1 = makeState(Url); - - // URL with extra symbols at the end, followed by an opening bracket - const UrlNonaccept = makeState(); // URL followed by some symbols (will not be part of the final URL) - - // Query strings - ta(Url$1, qsAccepting, Url$1); - ta(Url$1, qsNonAccepting, UrlNonaccept); - ta(UrlNonaccept, qsAccepting, Url$1); - ta(UrlNonaccept, qsNonAccepting, UrlNonaccept); - - // Become real URLs after `SLASH` or `COLON NUM SLASH` - // Here works with or without scheme:// prefix - tt(DomainDotTld, SLASH, Url$1); - tt(DomainDotTldColonPort, SLASH, Url$1); - - // Note that domains that begin with schemes are treated slighly differently - const SchemeColon = tt(Scheme, COLON); // e.g., 'mailto:' - const SlashSchemeColon = tt(SlashScheme, COLON); // e.g., 'http:' - const SlashSchemeColonSlash = tt(SlashSchemeColon, SLASH); // e.g., 'http:/' - - const UriPrefix = tt(SlashSchemeColonSlash, SLASH); // e.g., 'http://' - - // Scheme states can transition to domain states - ta(Scheme, groups.domain, Domain); - tt(Scheme, DOT, DomainDot); - tt(Scheme, HYPHEN, DomainHyphen); - ta(SlashScheme, groups.domain, Domain); - tt(SlashScheme, DOT, DomainDot); - tt(SlashScheme, HYPHEN, DomainHyphen); - - // Force URL with scheme prefix followed by anything sane - ta(SchemeColon, groups.domain, Url$1); - tt(SchemeColon, SLASH, Url$1); - tt(SchemeColon, QUERY, Url$1); - ta(UriPrefix, groups.domain, Url$1); - ta(UriPrefix, qsAccepting, Url$1); - tt(UriPrefix, SLASH, Url$1); - const bracketPairs = [[OPENBRACE, CLOSEBRACE], - // {} - [OPENBRACKET, CLOSEBRACKET], - // [] - [OPENPAREN, CLOSEPAREN], - // () - [OPENANGLEBRACKET, CLOSEANGLEBRACKET], - // <> - [FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN], - // () - [LEFTCORNERBRACKET, RIGHTCORNERBRACKET], - // 「」 - [LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET], - // 『』 - [FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN] // <> - ]; - for (let i = 0; i < bracketPairs.length; i++) { - const [OPEN, CLOSE] = bracketPairs[i]; - const UrlOpen = tt(Url$1, OPEN); // URL followed by open bracket - - // Continue not accepting for open brackets - tt(UrlNonaccept, OPEN, UrlOpen); - - // URL that begins with an opening bracket, followed by a symbols. - // Note that the final state can still be `UrlOpen` (if the URL has a - // single opening bracket for some reason). - const UrlOpenQ = makeState(Url); - ta(UrlOpen, qsAccepting, UrlOpenQ); - const UrlOpenSyms = makeState(); // UrlOpen followed by some symbols it cannot end it - ta(UrlOpen, qsNonAccepting, UrlOpenSyms); - - // Closing bracket component. This character WILL be included in the URL. - // Must come after qsNonAccepting (which includes all close-bracket tokens) - // so that CLOSE -> Url wins over CLOSE -> UrlOpenSyms. - tt(UrlOpen, CLOSE, Url$1); - - // URL that begins with an opening bracket, followed by some symbols - ta(UrlOpenQ, qsAccepting, UrlOpenQ); - ta(UrlOpenQ, qsNonAccepting, UrlOpenSyms); - ta(UrlOpenSyms, qsAccepting, UrlOpenQ); - ta(UrlOpenSyms, qsNonAccepting, UrlOpenSyms); - - // Close brace/bracket to become regular URL - tt(UrlOpenQ, CLOSE, Url$1); - tt(UrlOpenSyms, CLOSE, Url$1); - } - tt(Start, LOCALHOST, DomainDotTld); // localhost is a valid URL state - tt(Start, NL, Nl); // single new line - - return { - start: Start, - tokens: tk - }; - } - - /** - * Run the parser state machine on a list of scanned string-based tokens to - * create a list of multi tokens, each of which represents a URL, email address, - * plain text, etc. - * - * @param {State} start parser start state - * @param {string} input the original input used to generate the given tokens - * @param {Token[]} tokens list of scanned tokens - * @returns {MultiToken[]} - */ - function run(start, input, tokens) { - let len = tokens.length; - let cursor = 0; - let multis = []; - let textTokens = []; - while (cursor < len) { - let state = start; - let secondState = null; - let nextState = null; - let multiLength = 0; - let latestAccepting = null; - let sinceAccepts = -1; - while (cursor < len && !(secondState = state.go(tokens[cursor].t))) { - // Starting tokens with nowhere to jump to. - // Consider these to be just plain text - textTokens.push(tokens[cursor++]); - } - while (cursor < len && (nextState = secondState || state.go(tokens[cursor].t))) { - // Get the next state - secondState = null; - state = nextState; - - // Keep track of the latest accepting state - if (state.accepts()) { - sinceAccepts = 0; - latestAccepting = state; - } else if (sinceAccepts >= 0) { - sinceAccepts++; - } - cursor++; - multiLength++; - } - if (sinceAccepts < 0) { - // No accepting state was found, part of a regular text token add - // the first text token to the text tokens array and try again from - // the next - cursor -= multiLength; - if (cursor < len) { - textTokens.push(tokens[cursor]); - cursor++; - } - } else { - // Accepting state! - // First close off the textTokens (if available) - if (textTokens.length > 0) { - multis.push(initMultiToken(Text, input, textTokens)); - textTokens = []; - } - - // Roll back to the latest accepting state - cursor -= sinceAccepts; - multiLength -= sinceAccepts; - - // Create a new multitoken - const Multi = latestAccepting.t; - const subtokens = tokens.slice(cursor - multiLength, cursor); - multis.push(initMultiToken(Multi, input, subtokens)); - } - } - - // Finally close off the textTokens (if available) - if (textTokens.length > 0) { - multis.push(initMultiToken(Text, input, textTokens)); - } - return multis; - } - - /** - * Utility function for instantiating a new multitoken with all the relevant - * fields during parsing. - * @param {new (value: string, tokens: Token[]) => MultiToken} Multi class to instantiate - * @param {string} input original input string - * @param {Token[]} tokens consecutive tokens scanned from input string - * @returns {MultiToken} - */ - function initMultiToken(Multi, input, tokens) { - const startIdx = tokens[0].s; - const endIdx = tokens[tokens.length - 1].e; - const value = input.slice(startIdx, endIdx); - return new Multi(value, tokens); - } - - const warn = typeof console !== 'undefined' && console && console.warn || (() => {}); - const warnAdvice = 'until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.'; - - // Side-effect initialization state - const INIT = { - scanner: null, - parser: null, - tokenQueue: [], - pluginQueue: [], - customSchemes: [], - initialized: false - }; - - /** - * @typedef {{ - * start: State, - * tokens: { groups: Collections } & typeof tk - * }} ScannerInit - */ - - /** - * @typedef {{ - * start: State, - * tokens: typeof multi - * }} ParserInit - */ - - /** - * @typedef {(arg: { scanner: ScannerInit }) => void} TokenPlugin - */ - - /** - * @typedef {(arg: { scanner: ScannerInit, parser: ParserInit }) => void} Plugin - */ - - /** - * De-register all plugins and reset the internal state-machine. Used for - * testing; not required in practice. - * @private - */ - function reset() { - State.groups = {}; - INIT.scanner = null; - INIT.parser = null; - INIT.tokenQueue = []; - INIT.pluginQueue = []; - INIT.customSchemes = []; - INIT.initialized = false; - return INIT; - } - - /** - * Register a token plugin to allow the scanner to recognize additional token - * types before the parser state machine is constructed from the results. - * @param {string} name of plugin to register - * @param {TokenPlugin} plugin function that accepts the scanner state machine - * and available scanner tokens and collections and extends the state machine to - * recognize additional tokens or groups. - */ - function registerTokenPlugin(name, plugin) { - if (typeof plugin !== 'function') { - throw new Error(`linkifyjs: Invalid token plugin ${plugin} (expects function)`); - } - for (let i = 0; i < INIT.tokenQueue.length; i++) { - if (name === INIT.tokenQueue[i][0]) { - warn(`linkifyjs: token plugin "${name}" already registered - will be overwritten`); - INIT.tokenQueue[i] = [name, plugin]; - return; - } - } - INIT.tokenQueue.push([name, plugin]); - if (INIT.initialized) { - warn(`linkifyjs: already initialized - will not register token plugin "${name}" ${warnAdvice}`); - } - } - - /** - * Register a linkify plugin - * @param {string} name of plugin to register - * @param {Plugin} plugin function that accepts the parser state machine and - * extends the parser to recognize additional link types - */ - function registerPlugin(name, plugin) { - if (typeof plugin !== 'function') { - throw new Error(`linkifyjs: Invalid plugin ${plugin} (expects function)`); - } - for (let i = 0; i < INIT.pluginQueue.length; i++) { - if (name === INIT.pluginQueue[i][0]) { - warn(`linkifyjs: plugin "${name}" already registered - will be overwritten`); - INIT.pluginQueue[i] = [name, plugin]; - return; - } - } - INIT.pluginQueue.push([name, plugin]); - if (INIT.initialized) { - warn(`linkifyjs: already initialized - will not register plugin "${name}" ${warnAdvice}`); - } - } - - /** - * Detect URLs with the following additional protocol. Anything with format - * "protocol://..." will be considered a link. If `optionalSlashSlash` is set to - * `true`, anything with format "protocol:..." will be considered a link. - * @param {string} scheme - * @param {boolean} [optionalSlashSlash] - */ - function registerCustomProtocol(scheme, optionalSlashSlash = false) { - if (INIT.initialized) { - warn(`linkifyjs: already initialized - will not register custom scheme "${scheme}" ${warnAdvice}`); - } - if (!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(scheme)) { - throw new Error(`linkifyjs: incorrect scheme format. -1. Must only contain digits, lowercase ASCII letters or "-" -2. Cannot start or end with "-" -3. "-" cannot repeat`); - } - INIT.customSchemes.push([scheme, optionalSlashSlash]); - } - - /** - * Initialize the linkify state machine. Called automatically the first time - * linkify is called on a string, but may be called manually as well. - */ - function init() { - // Initialize scanner state machine and plugins - INIT.scanner = init$2(INIT.customSchemes); - for (let i = 0; i < INIT.tokenQueue.length; i++) { - INIT.tokenQueue[i][1]({ - scanner: INIT.scanner - }); - } - - // Initialize parser state machine and plugins - INIT.parser = init$1(INIT.scanner.tokens); - for (let i = 0; i < INIT.pluginQueue.length; i++) { - INIT.pluginQueue[i][1]({ - scanner: INIT.scanner, - parser: INIT.parser - }); - } - INIT.initialized = true; - return INIT; - } - - /** - * Parse a string into tokens that represent linkable and non-linkable sub-components - * @param {string} str - * @return {MultiToken[]} tokens - */ - function tokenize(str) { - if (!INIT.initialized) { - init(); - } - return run(INIT.parser.start, str, run$1(INIT.scanner.start, str)); - } - tokenize.scan = run$1; // for testing - - /** - * Find a list of linkable items in the given string. - * @param {string} str string to find links in - * @param {string | Opts} [type] either formatting options or specific type of - * links to find, e.g., 'url' or 'email' - * @param {Opts} [opts] formatting options for final output. Cannot be specified - * if opts already provided in `type` argument - */ - function find(str, type = null, opts = null) { - if (type && typeof type === 'object') { - if (opts) { - throw Error(`linkifyjs: Invalid link type ${type}; must be a string`); - } - opts = type; - type = null; - } - const options = new Options(opts); - const tokens = tokenize(str); - const filtered = []; - for (let i = 0; i < tokens.length; i++) { - const token = tokens[i]; - if (token.isLink && (!type || token.t === type) && options.check(token)) { - filtered.push(token.toFormattedObject(options)); - } - } - return filtered; - } - - /** - * Is the given string valid linkable text of some sort. Note that this does not - * trim the text for you. - * - * Optionally pass in a second `type` param, which is the type of link to test - * for. - * - * For example, - * - * linkify.test(str, 'email'); - * - * Returns `true` if str is a valid email. - * @param {string} str string to test for links - * @param {string} [type] optional specific link type to look for - * @returns boolean true/false - */ - function test(str, type = null) { - const tokens = tokenize(str); - return tokens.length === 1 && tokens[0].isLink && (!type || tokens[0].t === type); - } - - exports.MultiToken = MultiToken; - exports.Options = Options; - exports.State = State; - exports.createTokenClass = createTokenClass; - exports.find = find; - exports.init = init; - exports.multi = multi; - exports.options = options; - exports.regexp = regexp; - exports.registerCustomProtocol = registerCustomProtocol; - exports.registerPlugin = registerPlugin; - exports.registerTokenPlugin = registerTokenPlugin; - exports.reset = reset; - exports.stringToArray = stringToArray; - exports.test = test; - exports.text = multi; - exports.tokenize = tokenize; - - return exports; - -})({}); diff --git a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.min.js b/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.min.js deleted file mode 100644 index 0f15ec2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.min.js +++ /dev/null @@ -1 +0,0 @@ -var linkify=function(t){"use strict";const e="numeric",n="ascii",i="alpha",s="asciinumeric",r="alphanumeric",o="domain",a="emoji",l="scheme",u="slashscheme",c="whitespace";function g(t,e){return t in e||(e[t]=[]),e[t]}function h(t,l,u){l[e]&&(l[s]=!0,l[r]=!0),l[n]&&(l[s]=!0,l[i]=!0),l[s]&&(l[r]=!0),l[i]&&(l[r]=!0),l[r]&&(l[o]=!0),l[a]&&(l[o]=!0);for(const e in l){const n=g(e,u);n.indexOf(t)<0&&n.push(t)}}function d(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}d.groups={},d.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let n=0;n=0&&(n[i]=!0);return n}(o.t,i),n);h(r,t,i)}else n&&h(r,n,i);o.t=r}return s.j[t]=o,o}};const f=(t,e,n,i,s)=>t.ta(e,n,i,s),p=(t,e,n,i,s)=>t.tr(e,n,i,s),m=(t,e,n,i,s)=>t.ts(e,n,i,s),E=(t,e,n,i,s)=>t.tt(e,n,i,s),k="WORD",y="UWORD",b="ASCIINUMERICAL",T="ALPHANUMERICAL",L="LOCALHOST",A="TLD",R="UTLD",O="SCHEME",C="SLASH_SCHEME",v="NUM",S="WS",j="NL",w="OPENBRACE",I="CLOSEBRACE",N="OPENBRACKET",H="CLOSEBRACKET",x="OPENPAREN",P="CLOSEPAREN",z="OPENANGLEBRACKET",D="CLOSEANGLEBRACKET",U="FULLWIDTHLEFTPAREN",M="FULLWIDTHRIGHTPAREN",B="LEFTCORNERBRACKET",K="RIGHTCORNERBRACKET",F="LEFTWHITECORNERBRACKET",Q="RIGHTWHITECORNERBRACKET",_="FULLWIDTHLESSTHAN",W="FULLWIDTHGREATERTHAN",$="AMPERSAND",G="APOSTROPHE",q="ASTERISK",Y="AT",J="BACKSLASH",X="BACKTICK",V="CARET",Z="COLON",tt="COMMA",et="DOLLAR",nt="DOT",it="EQUALS",st="EXCLAMATION",rt="HYPHEN",ot="PERCENT",at="PIPE",lt="PLUS",ut="POUND",ct="QUERY",gt="QUOTE",ht="FULLWIDTHMIDDLEDOT",dt="SEMI",ft="SLASH",pt="TILDE",mt="UNDERSCORE",Et="EMOJI",kt="SYM";var yt=Object.freeze({__proto__:null,ALPHANUMERICAL:T,AMPERSAND:$,APOSTROPHE:G,ASCIINUMERICAL:b,ASTERISK:q,AT:Y,BACKSLASH:J,BACKTICK:X,CARET:V,CLOSEANGLEBRACKET:D,CLOSEBRACE:I,CLOSEBRACKET:H,CLOSEPAREN:P,COLON:Z,COMMA:tt,DOLLAR:et,DOT:nt,EMOJI:Et,EQUALS:it,EXCLAMATION:st,FULLWIDTHGREATERTHAN:W,FULLWIDTHLEFTPAREN:U,FULLWIDTHLESSTHAN:_,FULLWIDTHMIDDLEDOT:ht,FULLWIDTHRIGHTPAREN:M,HYPHEN:rt,LEFTCORNERBRACKET:B,LEFTWHITECORNERBRACKET:F,LOCALHOST:L,NL:j,NUM:v,OPENANGLEBRACKET:z,OPENBRACE:w,OPENBRACKET:N,OPENPAREN:x,PERCENT:ot,PIPE:at,PLUS:lt,POUND:ut,QUERY:ct,QUOTE:gt,RIGHTCORNERBRACKET:K,RIGHTWHITECORNERBRACKET:Q,SCHEME:O,SEMI:dt,SLASH:ft,SLASH_SCHEME:C,SYM:kt,TILDE:pt,TLD:A,UNDERSCORE:mt,UTLD:R,UWORD:y,WORD:k,WS:S});const bt=/[a-z]/,Tt=/\p{L}/u,Lt=/\p{Emoji}/u,At=/\d/,Rt=/\s/;var Ot=Object.freeze({__proto__:null,ASCII_LETTER:bt,DIGIT:At,EMOJI:Lt,EMOJI_VARIATION:/\ufe0f/,LETTER:Tt,SPACE:Rt});let Ct=null,vt=null;function St(t,e){const n=jt(e.replace(/[A-Z]/g,t=>t.toLowerCase())),i=n.length,s=[];let r=0,o=0;for(;o=0&&(g+=n[o].length,h++),u+=n[o].length,r+=n[o].length,o++;r-=g,o-=h,u-=g,s.push({t:c.t,v:e.slice(r-u,r),s:r-u,e:r})}return s}function jt(t){const e=[],n=t.length;let i=0;for(;i56319||i+1===n||(s=t.charCodeAt(i+1))<56320||s>57343?t[i]:t.slice(i,i+2);e.push(o),i+=o.length}return e}function wt(t,e,n,i,s){let r;const o=e.length;for(let n=0;n=0;)s++;if(s>0){e.push(n.join(""));for(let e=parseInt(t.substring(i,i+s),10);e>0;e--)n.pop();i+=s}else n.push(t[i]),i++}return e}const Nt={defaultProtocol:"http",events:null,format:xt,formatHref:xt,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ht(t,e=null){let n=Object.assign({},Nt);t&&(n=Object.assign(n,t instanceof Ht?t.o:t));const i=n.ignoreTags,s=[];for(let t=0;tt,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const i=null!=e;let s=this.o[t];return s?("object"==typeof s?(s=n.t in s?s[n.t]:Nt[t],"function"==typeof s&&i&&(s=s(e,n))):"function"==typeof s&&i&&(s=s(e,n.t,n)),s):s},getObj(t,e,n){let i=this.o[t];return"function"==typeof i&&null!=e&&(i=i(e,n.t,n)),i},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};var Pt=Object.freeze({__proto__:null,Options:Ht,defaults:Nt});function zt(t,e){this.t="token",this.v=t,this.tk=e}function Dt(t,e){class n extends zt{constructor(e,n){super(e,n),this.t=t}}for(const t in e)n.prototype[t]=e[t];return n.t=t,n}zt.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),i=t.get("format",e,this);return n&&i.length>n?i.substring(0,n)+"…":i},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Nt.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),i=t.get("formatHref",n,this),s=t.get("tagName",n,e),r=this.toFormattedString(t),o={},a=t.get("className",n,e),l=t.get("target",n,e),u=t.get("rel",n,e),c=t.getObj("attributes",n,e),g=t.getObj("events",n,e);return o.href=i,a&&(o.class=a),l&&(o.target=l),u&&(o.rel=u),c&&Object.assign(o,c),{tagName:s,attributes:o,content:r,eventListeners:g}}};const Ut=Dt("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Mt=Dt("text"),Bt=Dt("nl"),Kt=Dt("url",{isLink:!0,toHref(t=Nt.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==L&&t[1].t===Z}});var Ft=Object.freeze({__proto__:null,Base:zt,Email:Ut,MultiToken:zt,Nl:Bt,Text:Mt,Url:Kt,createTokenClass:Dt});const Qt=t=>new d(t);function _t(t,e,n){const i=n[0].s,s=n[n.length-1].e;return new t(e.slice(i,s),n)}const Wt="undefined"!=typeof console&&console&&console.warn||(()=>{}),$t="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Gt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function qt(){Gt.scanner=function(t=[]){const g={};d.groups=g;const f=new d;null==Ct&&(Ct=It("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==vt&&(vt=It("ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2")),E(f,"'",G),E(f,"{",w),E(f,"}",I),E(f,"[",N),E(f,"]",H),E(f,"(",x),E(f,")",P),E(f,"<",z),E(f,">",D),E(f,"(",U),E(f,")",M),E(f,"「",B),E(f,"」",K),E(f,"『",F),E(f,"』",Q),E(f,"<",_),E(f,">",W),E(f,"&",$),E(f,"*",q),E(f,"@",Y),E(f,"`",X),E(f,"^",V),E(f,":",Z),E(f,",",tt),E(f,"$",et),E(f,".",nt),E(f,"=",it),E(f,"!",st),E(f,"-",rt),E(f,"%",ot),E(f,"|",at),E(f,"+",lt),E(f,"#",ut),E(f,"?",ct),E(f,'"',gt),E(f,"/",ft),E(f,";",dt),E(f,"~",pt),E(f,"_",mt),E(f,"\\",J),E(f,"・",ht);const Ot=p(f,At,v,{[e]:!0});p(Ot,At,Ot);const St=p(Ot,bt,b,{[s]:!0}),jt=p(Ot,Tt,T,{[r]:!0}),Nt=p(f,bt,k,{[n]:!0});p(Nt,At,St),p(Nt,bt,Nt),p(St,At,St),p(St,bt,St);const Ht=p(f,Tt,y,{[i]:!0});p(Ht,bt),p(Ht,At,jt),p(Ht,Tt,Ht),p(jt,At,jt),p(jt,bt),p(jt,Tt,jt);const xt=E(f,"\n",j,{[c]:!0}),Pt=E(f,"\r",S,{[c]:!0}),zt=p(f,Rt,S,{[c]:!0});E(f,"",zt),E(Pt,"\n",xt),E(Pt,"",zt),p(Pt,Rt,zt),E(zt,"\r"),E(zt,"\n"),p(zt,Rt,zt),E(zt,"",zt);const Dt=p(f,Lt,Et,{[a]:!0});E(Dt,"#"),p(Dt,Lt,Dt),E(Dt,"️",Dt);const Ut=E(Dt,"‍");E(Ut,"#"),p(Ut,Lt,Dt);const Mt=[[bt,Nt],[At,St]],Bt=[[bt,null],[Tt,Ht],[At,jt]];for(let t=0;tt[0]>e[0]?1:-1);for(let i=0;i=0?a[o]=!0:bt.test(r)?At.test(r)?a[s]=!0:a[n]=!0:a[e]=!0,m(f,r,r,a)}return m(f,"localhost",L,{ascii:!0}),f.jd=new d(kt),{start:f,tokens:Object.assign({groups:g},yt)}}(Gt.customSchemes);for(let t=0;t=0&&h++,s++,c++;if(h<0)s-=c,s0&&(r.push(_t(Mt,e,o)),o=[]),s-=h,c-=h;const t=g.t,i=n.slice(s-c,s);r.push(_t(t,e,i))}}return o.length>0&&r.push(_t(Mt,e,o)),r}(Gt.parser.start,t,St(Gt.scanner.start,t))}return Yt.scan=St,t.MultiToken=zt,t.Options=Ht,t.State=d,t.createTokenClass=Dt,t.find=function(t,e=null,n=null){if(e&&"object"==typeof e){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const i=new Ht(n),s=Yt(t),r=[];for(let t=0;t} groups to register in - * @returns {T[]} Current list of tokens in the given collection - */ -function registerGroup(name, groups) { - if (!(name in groups)) { - groups[name] = []; - } - return groups[name]; -} - -/** - * @template T - * @param {T} t token to add - * @param {Collections} groups - * @param {Flags} flags - */ -function addToGroups(t, flags, groups) { - if (flags[numeric]) { - flags[asciinumeric] = true; - flags[alphanumeric] = true; - } - if (flags[ascii]) { - flags[asciinumeric] = true; - flags[alpha] = true; - } - if (flags[asciinumeric]) { - flags[alphanumeric] = true; - } - if (flags[alpha]) { - flags[alphanumeric] = true; - } - if (flags[alphanumeric]) { - flags[domain] = true; - } - if (flags[emoji]) { - flags[domain] = true; - } - for (const k in flags) { - const group = registerGroup(k, groups); - if (group.indexOf(t) < 0) { - group.push(t); - } - } -} - -/** - * @template T - * @param {T} t token to check - * @param {Collections} groups - * @returns {Flags} group flags that contain this token - */ -function flagsForToken(t, groups) { - const result = {}; - for (const c in groups) { - if (groups[c].indexOf(t) >= 0) { - result[c] = true; - } - } - return result; -} - -/** - * @template T - * @typedef {null | T } Transition - */ - -/** - * Define a basic state machine state. j is the list of character transitions, - * jr is the list of regex-match transitions, jd is the default state to - * transition to t is the accepting token type, if any. If this is the terminal - * state, then it does not emit a token. - * - * The template type T represents the type of the token this state accepts. This - * should be a string (such as of the token exports in `text.js`) or a - * MultiToken subclass (from `multi.js`) - * - * @template T - * @param {T} [token] Token that this state emits - */ -function State(token = null) { - // this.n = null; // DEBUG: State name - /** @type {{ [input: string]: State }} j */ - this.j = {}; // IMPLEMENTATION 1 - // this.j = []; // IMPLEMENTATION 2 - /** @type {[RegExp, State][]} jr */ - this.jr = []; - /** @type {?State} jd */ - this.jd = null; - /** @type {?T} t */ - this.t = token; -} - -/** - * Scanner token groups - * @type Collections - */ -State.groups = {}; -State.prototype = { - accepts() { - return !!this.t; - }, - /** - * Follow an existing transition from the given input to the next state. - * Does not mutate. - * @param {string} input character or token type to transition on - * @returns {?State} the next state, if any - */ - go(input) { - const state = this; - const nextState = state.j[input]; - if (nextState) { - return nextState; - } - for (let i = 0; i < state.jr.length; i++) { - const regex = state.jr[i][0]; - const nextState = state.jr[i][1]; // note: might be empty to prevent default jump - if (nextState && regex.test(input)) { - return nextState; - } - } - // Nowhere left to jump! Return default, if any - return state.jd; - }, - /** - * Whether the state has a transition for the given input. Set the second - * argument to true to only look for an exact match (and not a default or - * regular-expression-based transition) - * @param {string} input - * @param {boolean} exactOnly - */ - has(input, exactOnly = false) { - return exactOnly ? input in this.j : !!this.go(input); - }, - /** - * Short for "transition all"; create a transition from the array of items - * in the given list to the same final resulting state. - * @param {string | string[]} inputs Group of inputs to transition on - * @param {Transition | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - */ - ta(inputs, next, flags, groups) { - for (let i = 0; i < inputs.length; i++) { - this.tt(inputs[i], next, flags, groups); - } - }, - /** - * Short for "take regexp transition"; defines a transition for this state - * when it encounters a token which matches the given regular expression - * @param {RegExp} regexp Regular expression transition (populate first) - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - tr(regexp, next, flags, groups) { - groups = groups || State.groups; - let nextState; - if (next && next.j) { - nextState = next; - } else { - // Token with maybe token groups - nextState = new State(next); - if (flags && groups) { - addToGroups(next, flags, groups); - } - } - this.jr.push([regexp, nextState]); - return nextState; - }, - /** - * Short for "take transitions", will take as many sequential transitions as - * the length of the given input and returns the - * resulting final state. - * @param {string | string[]} input - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of token groups - * @returns {State} taken after the given input - */ - ts(input, next, flags, groups) { - let state = this; - const len = input.length; - if (!len) { - return state; - } - for (let i = 0; i < len - 1; i++) { - state = state.tt(input[i]); - } - return state.tt(input[len - 1], next, flags, groups); - }, - /** - * Short for "take transition", this is a method for building/working with - * state machines. - * - * If a state already exists for the given input, returns it. - * - * If a token is specified, that state will emit that token when reached by - * the linkify engine. - * - * If no state exists, it will be initialized with some default transitions - * that resemble existing default transitions. - * - * If a state is given for the second argument, that state will be - * transitioned to on the given input regardless of what that input - * previously did. - * - * Specify a token group flags to define groups that this token belongs to. - * The token will be added to corresponding entires in the given groups - * object. - * - * @param {string} input character, token type to transition on - * @param {T | State} [next] Transition options - * @param {Flags} [flags] Collections flags to add token to - * @param {Collections} [groups] Master list of groups - * @returns {State} taken after the given input - */ - tt(input, next, flags, groups) { - groups = groups || State.groups; - const state = this; - - // Check if existing state given, just a basic transition - if (next && next.j) { - state.j[input] = next; - return next; - } - const t = next; - - // Take the transition with the usual default mechanisms and use that as - // a template for creating the next state - let nextState, - templateState = state.go(input); - if (templateState) { - nextState = new State(); - Object.assign(nextState.j, templateState.j); - nextState.jr.push.apply(nextState.jr, templateState.jr); - nextState.jd = templateState.jd; - nextState.t = templateState.t; - } else { - nextState = new State(); - } - if (t) { - // Ensure newly token is in the same groups as the old token - if (groups) { - if (nextState.t && typeof nextState.t === 'string') { - const allFlags = Object.assign(flagsForToken(nextState.t, groups), flags); - addToGroups(t, allFlags, groups); - } else if (flags) { - addToGroups(t, flags, groups); - } - } - nextState.t = t; // overwrite anything that was previously there - } - state.j[input] = nextState; - return nextState; - } -}; - -// Helper functions to improve minification (not exported outside linkifyjs module) - -/** - * @template T - * @param {State} state - * @param {string | string[]} input - * @param {Flags} [flags] - * @param {Collections} [groups] - */ -const ta = (state, input, next, flags, groups) => state.ta(input, next, flags, groups); - -/** - * @template T - * @param {State} state - * @param {RegExp} regexp - * @param {T | State} [next] - * @param {Flags} [flags] - * @param {Collections} [groups] - */ -const tr = (state, regexp, next, flags, groups) => state.tr(regexp, next, flags, groups); - -/** - * @template T - * @param {State} state - * @param {string | string[]} input - * @param {T | State} [next] - * @param {Flags} [flags] - * @param {Collections} [groups] - */ -const ts = (state, input, next, flags, groups) => state.ts(input, next, flags, groups); - -/** - * @template T - * @param {State} state - * @param {string} input - * @param {T | State} [next] - * @param {Collections} [groups] - * @param {Flags} [flags] - */ -const tt = (state, input, next, flags, groups) => state.tt(input, next, flags, groups); - -/****************************************************************************** -Text Tokens -Identifiers for token outputs from the regexp scanner -******************************************************************************/ - -// A valid web domain token -const WORD = 'WORD'; // only contains a-z -const UWORD = 'UWORD'; // contains letters other than a-z, used for IDN -const ASCIINUMERICAL = 'ASCIINUMERICAL'; // contains a-z, 0-9 -const ALPHANUMERICAL = 'ALPHANUMERICAL'; // contains numbers and letters other than a-z, used for IDN - -// Special case of word -const LOCALHOST = 'LOCALHOST'; - -// Valid top-level domain, special case of WORD (see tlds.js) -const TLD = 'TLD'; - -// Valid IDN TLD, special case of UWORD (see tlds.js) -const UTLD = 'UTLD'; - -// The scheme portion of a web URI protocol. Supported types include: `mailto`, -// `file`, and user-defined custom protocols. Limited to schemes that contain -// only letters -const SCHEME = 'SCHEME'; - -// Similar to SCHEME, except makes distinction for schemes that must always be -// followed by `://`, not just `:`. Supported types include `http`, `https`, -// `ftp`, `ftps` -const SLASH_SCHEME = 'SLASH_SCHEME'; - -// Any sequence of digits 0-9 -const NUM = 'NUM'; - -// Any number of consecutive whitespace characters that are not newline -const WS = 'WS'; - -// New line (unix style) -const NL = 'NL'; // \n - -// Opening/closing bracket classes -// TODO: Rename OPEN -> LEFT and CLOSE -> RIGHT in v5 to fit with Unicode names -// Also rename angle brackes to LESSTHAN and GREATER THAN -const OPENBRACE = 'OPENBRACE'; // { -const CLOSEBRACE = 'CLOSEBRACE'; // } -const OPENBRACKET = 'OPENBRACKET'; // [ -const CLOSEBRACKET = 'CLOSEBRACKET'; // ] -const OPENPAREN = 'OPENPAREN'; // ( -const CLOSEPAREN = 'CLOSEPAREN'; // ) -const OPENANGLEBRACKET = 'OPENANGLEBRACKET'; // < -const CLOSEANGLEBRACKET = 'CLOSEANGLEBRACKET'; // > -const FULLWIDTHLEFTPAREN = 'FULLWIDTHLEFTPAREN'; // ( -const FULLWIDTHRIGHTPAREN = 'FULLWIDTHRIGHTPAREN'; // ) -const LEFTCORNERBRACKET = 'LEFTCORNERBRACKET'; // 「 -const RIGHTCORNERBRACKET = 'RIGHTCORNERBRACKET'; // 」 -const LEFTWHITECORNERBRACKET = 'LEFTWHITECORNERBRACKET'; // 『 -const RIGHTWHITECORNERBRACKET = 'RIGHTWHITECORNERBRACKET'; // 』 -const FULLWIDTHLESSTHAN = 'FULLWIDTHLESSTHAN'; // < -const FULLWIDTHGREATERTHAN = 'FULLWIDTHGREATERTHAN'; // > - -// Various symbols -const AMPERSAND = 'AMPERSAND'; // & -const APOSTROPHE = 'APOSTROPHE'; // ' -const ASTERISK = 'ASTERISK'; // * -const AT = 'AT'; // @ -const BACKSLASH = 'BACKSLASH'; // \ -const BACKTICK = 'BACKTICK'; // ` -const CARET = 'CARET'; // ^ -const COLON = 'COLON'; // : -const COMMA = 'COMMA'; // , -const DOLLAR = 'DOLLAR'; // $ -const DOT = 'DOT'; // . -const EQUALS = 'EQUALS'; // = -const EXCLAMATION = 'EXCLAMATION'; // ! -const HYPHEN = 'HYPHEN'; // - -const PERCENT = 'PERCENT'; // % -const PIPE = 'PIPE'; // | -const PLUS = 'PLUS'; // + -const POUND = 'POUND'; // # -const QUERY = 'QUERY'; // ? -const QUOTE = 'QUOTE'; // " -const FULLWIDTHMIDDLEDOT = 'FULLWIDTHMIDDLEDOT'; // ・ - -const SEMI = 'SEMI'; // ; -const SLASH = 'SLASH'; // / -const TILDE = 'TILDE'; // ~ -const UNDERSCORE = 'UNDERSCORE'; // _ - -// Emoji symbol -const EMOJI$1 = 'EMOJI'; - -// Default token - anything that is not one of the above -const SYM = 'SYM'; - -var tk = /*#__PURE__*/Object.freeze({ - __proto__: null, - ALPHANUMERICAL: ALPHANUMERICAL, - AMPERSAND: AMPERSAND, - APOSTROPHE: APOSTROPHE, - ASCIINUMERICAL: ASCIINUMERICAL, - ASTERISK: ASTERISK, - AT: AT, - BACKSLASH: BACKSLASH, - BACKTICK: BACKTICK, - CARET: CARET, - CLOSEANGLEBRACKET: CLOSEANGLEBRACKET, - CLOSEBRACE: CLOSEBRACE, - CLOSEBRACKET: CLOSEBRACKET, - CLOSEPAREN: CLOSEPAREN, - COLON: COLON, - COMMA: COMMA, - DOLLAR: DOLLAR, - DOT: DOT, - EMOJI: EMOJI$1, - EQUALS: EQUALS, - EXCLAMATION: EXCLAMATION, - FULLWIDTHGREATERTHAN: FULLWIDTHGREATERTHAN, - FULLWIDTHLEFTPAREN: FULLWIDTHLEFTPAREN, - FULLWIDTHLESSTHAN: FULLWIDTHLESSTHAN, - FULLWIDTHMIDDLEDOT: FULLWIDTHMIDDLEDOT, - FULLWIDTHRIGHTPAREN: FULLWIDTHRIGHTPAREN, - HYPHEN: HYPHEN, - LEFTCORNERBRACKET: LEFTCORNERBRACKET, - LEFTWHITECORNERBRACKET: LEFTWHITECORNERBRACKET, - LOCALHOST: LOCALHOST, - NL: NL, - NUM: NUM, - OPENANGLEBRACKET: OPENANGLEBRACKET, - OPENBRACE: OPENBRACE, - OPENBRACKET: OPENBRACKET, - OPENPAREN: OPENPAREN, - PERCENT: PERCENT, - PIPE: PIPE, - PLUS: PLUS, - POUND: POUND, - QUERY: QUERY, - QUOTE: QUOTE, - RIGHTCORNERBRACKET: RIGHTCORNERBRACKET, - RIGHTWHITECORNERBRACKET: RIGHTWHITECORNERBRACKET, - SCHEME: SCHEME, - SEMI: SEMI, - SLASH: SLASH, - SLASH_SCHEME: SLASH_SCHEME, - SYM: SYM, - TILDE: TILDE, - TLD: TLD, - UNDERSCORE: UNDERSCORE, - UTLD: UTLD, - UWORD: UWORD, - WORD: WORD, - WS: WS -}); - -// Note that these two Unicode ones expand into a really big one with Babel -const ASCII_LETTER = /[a-z]/; -const LETTER = /\p{L}/u; // Any Unicode character with letter data type -const EMOJI = /\p{Emoji}/u; // Any Unicode emoji character -const EMOJI_VARIATION$1 = /\ufe0f/; -const DIGIT = /\d/; -const SPACE = /\s/; - -var regexp = /*#__PURE__*/Object.freeze({ - __proto__: null, - ASCII_LETTER: ASCII_LETTER, - DIGIT: DIGIT, - EMOJI: EMOJI, - EMOJI_VARIATION: EMOJI_VARIATION$1, - LETTER: LETTER, - SPACE: SPACE -}); - -/** - The scanner provides an interface that takes a string of text as input, and - outputs an array of tokens instances that can be used for easy URL parsing. -*/ - -const CR = '\r'; // carriage-return character -const LF = '\n'; // line-feed character -const EMOJI_VARIATION = '\ufe0f'; // Variation selector, follows heart and others -const EMOJI_JOINER = '\u200d'; // zero-width joiner -const OBJECT_REPLACEMENT = '\ufffc'; // whitespace placeholder that sometimes appears in rich text editors - -let tlds = null, - utlds = null; // don't change so only have to be computed once - -/** - * Scanner output token: - * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD') - * - `v` is the value of the token (e.g., '123', '❤️', 'com') - * - `s` is the start index of the token in the original string - * - `e` is the end index of the token in the original string - * @typedef {{t: string, v: string, s: number, e: number}} Token - */ - -/** - * @template T - * @typedef {{ [collection: string]: T[] }} Collections - */ - -/** - * Initialize the scanner character-based state machine for the given start - * state - * @param {[string, boolean][]} customSchemes List of custom schemes, where each - * item is a length-2 tuple with the first element set to the string scheme, and - * the second element set to `true` if the `://` after the scheme is optional - */ -function init$2(customSchemes = []) { - // Frequently used states (name argument removed during minification) - /** @type Collections */ - const groups = {}; // of tokens - State.groups = groups; - /** @type State */ - const Start = new State(); - if (tlds == null) { - tlds = decodeTlds(encodedTlds); - } - if (utlds == null) { - utlds = decodeTlds(encodedUtlds); - } - - // States for special URL symbols that accept immediately after start - tt(Start, "'", APOSTROPHE); - tt(Start, '{', OPENBRACE); - tt(Start, '}', CLOSEBRACE); - tt(Start, '[', OPENBRACKET); - tt(Start, ']', CLOSEBRACKET); - tt(Start, '(', OPENPAREN); - tt(Start, ')', CLOSEPAREN); - tt(Start, '<', OPENANGLEBRACKET); - tt(Start, '>', CLOSEANGLEBRACKET); - tt(Start, '(', FULLWIDTHLEFTPAREN); - tt(Start, ')', FULLWIDTHRIGHTPAREN); - tt(Start, '「', LEFTCORNERBRACKET); - tt(Start, '」', RIGHTCORNERBRACKET); - tt(Start, '『', LEFTWHITECORNERBRACKET); - tt(Start, '』', RIGHTWHITECORNERBRACKET); - tt(Start, '<', FULLWIDTHLESSTHAN); - tt(Start, '>', FULLWIDTHGREATERTHAN); - tt(Start, '&', AMPERSAND); - tt(Start, '*', ASTERISK); - tt(Start, '@', AT); - tt(Start, '`', BACKTICK); - tt(Start, '^', CARET); - tt(Start, ':', COLON); - tt(Start, ',', COMMA); - tt(Start, '$', DOLLAR); - tt(Start, '.', DOT); - tt(Start, '=', EQUALS); - tt(Start, '!', EXCLAMATION); - tt(Start, '-', HYPHEN); - tt(Start, '%', PERCENT); - tt(Start, '|', PIPE); - tt(Start, '+', PLUS); - tt(Start, '#', POUND); - tt(Start, '?', QUERY); - tt(Start, '"', QUOTE); - tt(Start, '/', SLASH); - tt(Start, ';', SEMI); - tt(Start, '~', TILDE); - tt(Start, '_', UNDERSCORE); - tt(Start, '\\', BACKSLASH); - tt(Start, '・', FULLWIDTHMIDDLEDOT); - const Num = tr(Start, DIGIT, NUM, { - [numeric]: true - }); - tr(Num, DIGIT, Num); - const Asciinumeric = tr(Num, ASCII_LETTER, ASCIINUMERICAL, { - [asciinumeric]: true - }); - const Alphanumeric = tr(Num, LETTER, ALPHANUMERICAL, { - [alphanumeric]: true - }); - - // State which emits a word token - const Word = tr(Start, ASCII_LETTER, WORD, { - [ascii]: true - }); - tr(Word, DIGIT, Asciinumeric); - tr(Word, ASCII_LETTER, Word); - tr(Asciinumeric, DIGIT, Asciinumeric); - tr(Asciinumeric, ASCII_LETTER, Asciinumeric); - - // Same as previous, but specific to non-fsm.ascii alphabet words - const UWord = tr(Start, LETTER, UWORD, { - [alpha]: true - }); - tr(UWord, ASCII_LETTER); // Non-accepting - tr(UWord, DIGIT, Alphanumeric); - tr(UWord, LETTER, UWord); - tr(Alphanumeric, DIGIT, Alphanumeric); - tr(Alphanumeric, ASCII_LETTER); // Non-accepting - tr(Alphanumeric, LETTER, Alphanumeric); // Non-accepting - - // Whitespace jumps - // Tokens of only non-newline whitespace are arbitrarily long - // If any whitespace except newline, more whitespace! - const Nl = tt(Start, LF, NL, { - [whitespace]: true - }); - const Cr = tt(Start, CR, WS, { - [whitespace]: true - }); - const Ws = tr(Start, SPACE, WS, { - [whitespace]: true - }); - tt(Start, OBJECT_REPLACEMENT, Ws); - tt(Cr, LF, Nl); // \r\n - tt(Cr, OBJECT_REPLACEMENT, Ws); - tr(Cr, SPACE, Ws); - tt(Ws, CR); // non-accepting state to avoid mixing whitespaces - tt(Ws, LF); // non-accepting state to avoid mixing whitespaces - tr(Ws, SPACE, Ws); - tt(Ws, OBJECT_REPLACEMENT, Ws); - - // Emoji tokens. They are not grouped by the scanner except in cases where a - // zero-width joiner is present - const Emoji = tr(Start, EMOJI, EMOJI$1, { - [emoji]: true - }); - tt(Emoji, '#'); // no transition, emoji regex seems to match # - tr(Emoji, EMOJI, Emoji); - tt(Emoji, EMOJI_VARIATION, Emoji); - // tt(Start, EMOJI_VARIATION, Emoji); // This one is sketchy - - const EmojiJoiner = tt(Emoji, EMOJI_JOINER); - tt(EmojiJoiner, '#'); - tr(EmojiJoiner, EMOJI, Emoji); - // tt(EmojiJoiner, EMOJI_VARIATION, Emoji); // also sketchy - - // Generates states for top-level domains - // Note that this is most accurate when tlds are in alphabetical order - const wordjr = [[ASCII_LETTER, Word], [DIGIT, Asciinumeric]]; - const uwordjr = [[ASCII_LETTER, null], [LETTER, UWord], [DIGIT, Alphanumeric]]; - for (let i = 0; i < tlds.length; i++) { - fastts(Start, tlds[i], TLD, WORD, wordjr); - } - for (let i = 0; i < utlds.length; i++) { - fastts(Start, utlds[i], UTLD, UWORD, uwordjr); - } - addToGroups(TLD, { - tld: true, - ascii: true - }, groups); - addToGroups(UTLD, { - utld: true, - alpha: true - }, groups); - - // Collect the states generated by different protocols. NOTE: If any new TLDs - // get added that are also protocols, set the token to be the same as the - // protocol to ensure parsing works as expected. - fastts(Start, 'file', SCHEME, WORD, wordjr); - fastts(Start, 'mailto', SCHEME, WORD, wordjr); - fastts(Start, 'http', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'https', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'ftp', SLASH_SCHEME, WORD, wordjr); - fastts(Start, 'ftps', SLASH_SCHEME, WORD, wordjr); - addToGroups(SCHEME, { - scheme: true, - ascii: true - }, groups); - addToGroups(SLASH_SCHEME, { - slashscheme: true, - ascii: true - }, groups); - - // Register custom schemes. Assumes each scheme is asciinumeric with hyphens - customSchemes = customSchemes.sort((a, b) => a[0] > b[0] ? 1 : -1); - for (let i = 0; i < customSchemes.length; i++) { - const sch = customSchemes[i][0]; - const optionalSlashSlash = customSchemes[i][1]; - const flags = optionalSlashSlash ? { - [scheme]: true - } : { - [slashscheme]: true - }; - if (sch.indexOf('-') >= 0) { - flags[domain] = true; - } else if (!ASCII_LETTER.test(sch)) { - flags[numeric] = true; // numbers only - } else if (DIGIT.test(sch)) { - flags[asciinumeric] = true; - } else { - flags[ascii] = true; - } - ts(Start, sch, sch, flags); - } - - // Localhost token - ts(Start, 'localhost', LOCALHOST, { - ascii: true - }); - - // Set default transition for start state (some symbol) - Start.jd = new State(SYM); - return { - start: Start, - tokens: Object.assign({ - groups - }, tk) - }; -} - -/** - Given a string, returns an array of TOKEN instances representing the - composition of that string. - - @method run - @param {State} start scanner starting state - @param {string} str input string to scan - @return {Token[]} list of tokens, each with a type and value -*/ -function run$1(start, str) { - // State machine is not case sensitive, so input is tokenized in lowercased - // form (still returns regular case). Uses selective `toLowerCase` because - // lowercasing the entire string causes the length and character position to - // vary in some non-English strings with V8-based runtimes. - const iterable = stringToArray(str.replace(/[A-Z]/g, c => c.toLowerCase())); - const charCount = iterable.length; // <= len if there are emojis, etc - const tokens = []; // return value - - // cursor through the string itself, accounting for characters that have - // width with length 2 such as emojis - let cursor = 0; - - // Cursor through the array-representation of the string - let charCursor = 0; - - // Tokenize the string - while (charCursor < charCount) { - let state = start; - let nextState = null; - let tokenLength = 0; - let latestAccepting = null; - let sinceAccepts = -1; - let charsSinceAccepts = -1; - while (charCursor < charCount && (nextState = state.go(iterable[charCursor]))) { - state = nextState; - - // Keep track of the latest accepting state - if (state.accepts()) { - sinceAccepts = 0; - charsSinceAccepts = 0; - latestAccepting = state; - } else if (sinceAccepts >= 0) { - sinceAccepts += iterable[charCursor].length; - charsSinceAccepts++; - } - tokenLength += iterable[charCursor].length; - cursor += iterable[charCursor].length; - charCursor++; - } - - // Roll back to the latest accepting state - cursor -= sinceAccepts; - charCursor -= charsSinceAccepts; - tokenLength -= sinceAccepts; - - // No more jumps, just make a new token from the last accepting one - tokens.push({ - t: latestAccepting.t, - // token type/name - v: str.slice(cursor - tokenLength, cursor), - // string value - s: cursor - tokenLength, - // start index - e: cursor // end index (excluding) - }); - } - return tokens; -} - -/** - * Convert a String to an Array of characters, taking into account that some - * characters like emojis take up two string indexes. - * - * Adapted from core-js (MIT license) - * https://github.com/zloirock/core-js/blob/2d69cf5f99ab3ea3463c395df81e5a15b68f49d9/packages/core-js/internals/string-multibyte.js - * - * @function stringToArray - * @param {string} str - * @returns {string[]} - */ -function stringToArray(str) { - const result = []; - const len = str.length; - let index = 0; - while (index < len) { - let first = str.charCodeAt(index); - let second; - let char = first < 0xd800 || first > 0xdbff || index + 1 === len || (second = str.charCodeAt(index + 1)) < 0xdc00 || second > 0xdfff ? str[index] // single character - : str.slice(index, index + 2); // two-index characters - result.push(char); - index += char.length; - } - return result; -} - -/** - * Fast version of ts function for when transition defaults are well known - * @param {State} state - * @param {string} input - * @param {string} t - * @param {string} defaultt - * @param {[RegExp, State][]} jr - * @returns {State} - */ -function fastts(state, input, t, defaultt, jr) { - let next; - const len = input.length; - for (let i = 0; i < len - 1; i++) { - const char = input[i]; - if (state.j[char]) { - next = state.j[char]; - } else { - next = new State(defaultt); - next.jr = jr.slice(); - state.j[char] = next; - } - state = next; - } - next = new State(t); - next.jr = jr.slice(); - state.j[input[len - 1]] = next; - return next; -} - -/** - * Converts a string of Top-Level Domain names encoded in update-tlds.js back - * into a list of strings. - * @param {str} encoded encoded TLDs string - * @returns {str[]} original TLDs list - */ -function decodeTlds(encoded) { - const words = []; - const stack = []; - let i = 0; - let digits = '0123456789'; - while (i < encoded.length) { - let popDigitCount = 0; - while (digits.indexOf(encoded[i + popDigitCount]) >= 0) { - popDigitCount++; // encountered some digits, have to pop to go one level up trie - } - if (popDigitCount > 0) { - words.push(stack.join('')); // whatever preceded the pop digits must be a word - for (let popCount = parseInt(encoded.substring(i, i + popDigitCount), 10); popCount > 0; popCount--) { - stack.pop(); - } - i += popDigitCount; - } else { - stack.push(encoded[i]); // drop down a level into the trie - i++; - } - } - return words; -} - -/** - * An object where each key is a valid DOM Event Name such as `click` or `focus` - * and each value is an event handler function. - * - * https://developer.mozilla.org/en-US/docs/Web/API/Element#events - * @typedef {?{ [event: string]: Function }} EventListeners - */ - -/** - * All formatted properties required to render a link, including `tagName`, - * `attributes`, `content` and `eventListeners`. - * @typedef {{ tagName: any, attributes: {[attr: string]: any}, content: string, - * eventListeners: EventListeners }} IntermediateRepresentation - */ - -/** - * Specify either an object described by the template type `O` or a function. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `O` - * @template O - * @typedef {O | ((value: string, type: string, token: MultiToken) => O)} OptObj - */ - -/** - * Specify either a function described by template type `F` or an object. - * - * Each key in the object should be a link type (`'url'`, `'hashtag`', etc.). Each - * value should be a function with template type `F` that is called when the - * corresponding link type is encountered. - * @template F - * @typedef {F | { [type: string]: F}} OptFn - */ - -/** - * Specify either a value with template type `V`, a function that returns `V` or - * an object where each value resolves to `V`. - * - * The function takes a string value (usually the link's href attribute), the - * link type (`'url'`, `'hashtag`', etc.) and an internal token representation - * of the link. It should return an object of the template type `V` - * - * For the object, each key should be a link type (`'url'`, `'hashtag`', etc.). - * Each value should either have type `V` or a function that returns V. This - * function similarly takes a string value and a token. - * - * Example valid types for `Opt`: - * - * ```js - * 'hello' - * (value, type, token) => 'world' - * { url: 'hello', email: (value, token) => 'world'} - * ``` - * @template V - * @typedef {V | ((value: string, type: string, token: MultiToken) => V) | { [type: string]: V | ((value: string, token: MultiToken) => V) }} Opt - */ - -/** - * See available options: https://linkify.js.org/docs/options.html - * @typedef {{ - * defaultProtocol?: string, - * events?: OptObj, - * format?: Opt, - * formatHref?: Opt, - * nl2br?: boolean, - * tagName?: Opt, - * target?: Opt, - * rel?: Opt, - * validate?: Opt, - * truncate?: Opt, - * className?: Opt, - * attributes?: OptObj<({ [attr: string]: any })>, - * ignoreTags?: string[], - * render?: OptFn<((ir: IntermediateRepresentation) => any)> - * }} Opts - */ - -/** - * @type Required - */ -const defaults = { - defaultProtocol: 'http', - events: null, - format: noop, - formatHref: noop, - nl2br: false, - tagName: 'a', - target: null, - rel: null, - validate: true, - truncate: Infinity, - className: null, - attributes: null, - ignoreTags: [], - render: null -}; - -/** - * Utility class for linkify interfaces to apply specified - * {@link Opts formatting and rendering options}. - * - * @param {Opts | Options} [opts] Option value overrides. - * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For - * internal use) default render function that determines how to generate an - * HTML element based on a link token's derived tagName, attributes and HTML. - * Similar to render option - */ -function Options(opts, defaultRender = null) { - let o = Object.assign({}, defaults); - if (opts) { - o = Object.assign(o, opts instanceof Options ? opts.o : opts); - } - - // Ensure all ignored tags are uppercase - const ignoredTags = o.ignoreTags; - const uppercaseIgnoredTags = []; - for (let i = 0; i < ignoredTags.length; i++) { - uppercaseIgnoredTags.push(ignoredTags[i].toUpperCase()); - } - /** @protected */ - this.o = o; - if (defaultRender) { - this.defaultRender = defaultRender; - } - this.ignoreTags = uppercaseIgnoredTags; -} -Options.prototype = { - o: defaults, - /** - * @type string[] - */ - ignoreTags: [], - /** - * @param {IntermediateRepresentation} ir - * @returns {any} - */ - defaultRender(ir) { - return ir; - }, - /** - * Returns true or false based on whether a token should be displayed as a - * link based on the user options. - * @param {MultiToken} token - * @returns {boolean} - */ - check(token) { - return this.get('validate', token.toString(), token); - }, - // Private methods - - /** - * Resolve an option's value based on the value of the option and the given - * params. If operator and token are specified and the target option is - * callable, automatically calls the function with the given argument. - * @template {keyof Opts} K - * @param {K} key Name of option to use - * @param {string} [operator] will be passed to the target option if it's a - * function. If not specified, RAW function value gets returned - * @param {MultiToken} [token] The token from linkify.tokenize - * @returns {Opts[K] | any} - */ - get(key, operator, token) { - const isCallable = operator != null; - let option = this.o[key]; - if (!option) { - return option; - } - if (typeof option === 'object') { - option = token.t in option ? option[token.t] : defaults[key]; - if (typeof option === 'function' && isCallable) { - option = option(operator, token); - } - } else if (typeof option === 'function' && isCallable) { - option = option(operator, token.t, token); - } - return option; - }, - /** - * @template {keyof Opts} L - * @param {L} key Name of options object to use - * @param {string} [operator] - * @param {MultiToken} [token] - * @returns {Opts[L] | any} - */ - getObj(key, operator, token) { - let obj = this.o[key]; - if (typeof obj === 'function' && operator != null) { - obj = obj(operator, token.t, token); - } - return obj; - }, - /** - * Convert the given token to a rendered element that may be added to the - * calling-interface's DOM - * @param {MultiToken} token Token to render to an HTML element - * @returns {any} Render result; e.g., HTML string, DOM element, React - * Component, etc. - */ - render(token) { - const ir = token.render(this); // intermediate representation - const renderFn = this.get('render', null, token) || this.defaultRender; - return renderFn(ir, token.t, token); - } -}; -function noop(val) { - return val; -} - -var options = /*#__PURE__*/Object.freeze({ - __proto__: null, - Options: Options, - defaults: defaults -}); - -/****************************************************************************** - Multi-Tokens - Tokens composed of arrays of TextTokens -******************************************************************************/ - -/** - * @param {string} value - * @param {Token[]} tokens - */ -function MultiToken(value, tokens) { - this.t = 'token'; - this.v = value; - this.tk = tokens; -} - -/** - * Abstract class used for manufacturing tokens of text tokens. That is rather - * than the value for a token being a small string of text, it's value an array - * of text tokens. - * - * Used for grouping together URLs, emails, hashtags, and other potential - * creations. - * @class MultiToken - * @property {string} t - * @property {string} v - * @property {Token[]} tk - * @abstract - */ -MultiToken.prototype = { - isLink: false, - /** - * Return the string this token represents. - * @return {string} - */ - toString() { - return this.v; - }, - /** - * What should the value for this token be in the `href` HTML attribute? - * Returns the `.toString` value by default. - * @param {string} [scheme] - * @return {string} - */ - toHref(scheme) { - return this.toString(); - }, - /** - * @param {Options} options Formatting options - * @returns {string} - */ - toFormattedString(options) { - const val = this.toString(); - const truncate = options.get('truncate', val, this); - const formatted = options.get('format', val, this); - return truncate && formatted.length > truncate ? formatted.substring(0, truncate) + '…' : formatted; - }, - /** - * - * @param {Options} options - * @returns {string} - */ - toFormattedHref(options) { - return options.get('formatHref', this.toHref(options.get('defaultProtocol')), this); - }, - /** - * The start index of this token in the original input string - * @returns {number} - */ - startIndex() { - return this.tk[0].s; - }, - /** - * The end index of this token in the original input string (up to this - * index but not including it) - * @returns {number} - */ - endIndex() { - return this.tk[this.tk.length - 1].e; - }, - /** - Returns an object of relevant values for this token, which includes keys - * type - Kind of token ('url', 'email', etc.) - * value - Original text - * href - The value that should be added to the anchor tag's href - attribute - @method toObject - @param {string} [protocol] `'http'` by default - */ - toObject(protocol = defaults.defaultProtocol) { - return { - type: this.t, - value: this.toString(), - isLink: this.isLink, - href: this.toHref(protocol), - start: this.startIndex(), - end: this.endIndex() - }; - }, - /** - * - * @param {Options} options Formatting option - */ - toFormattedObject(options) { - return { - type: this.t, - value: this.toFormattedString(options), - isLink: this.isLink, - href: this.toFormattedHref(options), - start: this.startIndex(), - end: this.endIndex() - }; - }, - /** - * Whether this token should be rendered as a link according to the given options - * @param {Options} options - * @returns {boolean} - */ - validate(options) { - return options.get('validate', this.toString(), this); - }, - /** - * Return an object that represents how this link should be rendered. - * @param {Options} options Formattinng options - */ - render(options) { - const token = this; - const href = this.toHref(options.get('defaultProtocol')); - const formattedHref = options.get('formatHref', href, this); - const tagName = options.get('tagName', href, token); - const content = this.toFormattedString(options); - const attributes = {}; - const className = options.get('className', href, token); - const target = options.get('target', href, token); - const rel = options.get('rel', href, token); - const attrs = options.getObj('attributes', href, token); - const eventListeners = options.getObj('events', href, token); - attributes.href = formattedHref; - if (className) { - attributes.class = className; - } - if (target) { - attributes.target = target; - } - if (rel) { - attributes.rel = rel; - } - if (attrs) { - Object.assign(attributes, attrs); - } - return { - tagName, - attributes, - content, - eventListeners - }; - } -}; - -/** - * Create a new token that can be emitted by the parser state machine - * @param {string} type readable type of the token - * @param {object} props properties to assign or override, including isLink = true or false - * @returns {new (value: string, tokens: Token[]) => MultiToken} new token class - */ -function createTokenClass(type, props) { - class Token extends MultiToken { - constructor(value, tokens) { - super(value, tokens); - this.t = type; - } - } - for (const p in props) { - Token.prototype[p] = props[p]; - } - Token.t = type; - return Token; -} - -/** - Represents a list of tokens making up a valid email address -*/ -const Email = createTokenClass('email', { - isLink: true, - toHref() { - return 'mailto:' + this.toString(); - } -}); - -/** - Represents some plain text -*/ -const Text = createTokenClass('text'); - -/** - Multi-linebreak token - represents a line break - @class Nl -*/ -const Nl = createTokenClass('nl'); - -/** - Represents a list of text tokens making up a valid URL - @class Url -*/ -const Url = createTokenClass('url', { - isLink: true, - /** - Lowercases relevant parts of the domain and adds the protocol if - required. Note that this will not escape unsafe HTML characters in the - URL. - @param {string} [scheme] default scheme (e.g., 'https') - @return {string} the full href - */ - toHref(scheme = defaults.defaultProtocol) { - // Check if already has a prefix scheme - return this.hasProtocol() ? this.v : `${scheme}://${this.v}`; - }, - /** - * Check whether this URL token has a protocol - * @return {boolean} - */ - hasProtocol() { - const tokens = this.tk; - return tokens.length >= 2 && tokens[0].t !== LOCALHOST && tokens[1].t === COLON; - } -}); - -var multi = /*#__PURE__*/Object.freeze({ - __proto__: null, - Base: MultiToken, - Email: Email, - MultiToken: MultiToken, - Nl: Nl, - Text: Text, - Url: Url, - createTokenClass: createTokenClass -}); - -/** - Not exactly parser, more like the second-stage scanner (although we can - theoretically hotswap the code here with a real parser in the future... but - for a little URL-finding utility abstract syntax trees may be a little - overkill). - - URL format: http://en.wikipedia.org/wiki/URI_scheme - Email format: http://en.wikipedia.org/wiki/EmailAddress (links to RFC in - reference) - - @module linkify - @submodule parser - @main run -*/ - -const makeState = arg => new State(arg); - -/** - * Generate the parser multi token-based state machine - * @param {{ groups: Collections }} tokens - */ -function init$1({ - groups -}) { - // Types of characters the URL can definitely end in - const qsAccepting = groups.domain.concat([AMPERSAND, ASTERISK, AT, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, NUM, PERCENT, PIPE, PLUS, POUND, SLASH, SYM, TILDE, UNDERSCORE]); - - // Types of tokens that can follow a URL and be part of the query string - // but cannot be the very last characters - // Characters that cannot appear in the URL at all should be excluded - const qsNonAccepting = [APOSTROPHE, COLON, COMMA, DOT, EXCLAMATION, PERCENT, QUERY, QUOTE, SEMI, OPENANGLEBRACKET, CLOSEANGLEBRACKET, OPENBRACE, CLOSEBRACE, CLOSEBRACKET, OPENBRACKET, OPENPAREN, CLOSEPAREN, FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN, LEFTCORNERBRACKET, RIGHTCORNERBRACKET, LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET, FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN]; - - // For addresses without the mailto prefix - // Tokens allowed in the localpart of the email - const localpartAccepting = [AMPERSAND, APOSTROPHE, ASTERISK, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, OPENBRACE, CLOSEBRACE, PERCENT, PIPE, PLUS, POUND, QUERY, SLASH, SYM, TILDE, UNDERSCORE]; - - // The universal starting state. - /** - * @type State - */ - const Start = makeState(); - const Localpart = tt(Start, TILDE); // Local part of the email address - ta(Localpart, localpartAccepting, Localpart); - ta(Localpart, groups.domain, Localpart); - const Domain = makeState(), - Scheme = makeState(), - SlashScheme = makeState(); - ta(Start, groups.domain, Domain); // parsed string ends with a potential domain name (A) - ta(Start, groups.scheme, Scheme); // e.g., 'mailto' - ta(Start, groups.slashscheme, SlashScheme); // e.g., 'http' - - ta(Domain, localpartAccepting, Localpart); - ta(Domain, groups.domain, Domain); - const LocalpartAt = tt(Domain, AT); // Local part of the email address plus @ - - tt(Localpart, AT, LocalpartAt); // close to an email address now - - // Local part of an email address can be e.g. 'http' or 'mailto' - tt(Scheme, AT, LocalpartAt); - tt(SlashScheme, AT, LocalpartAt); - const LocalpartDot = tt(Localpart, DOT); // Local part of the email address plus '.' (localpart cannot end in .) - ta(LocalpartDot, localpartAccepting, Localpart); - ta(LocalpartDot, groups.domain, Localpart); - const EmailDomain = makeState(); - ta(LocalpartAt, groups.domain, EmailDomain); // parsed string starts with local email info + @ with a potential domain name - ta(EmailDomain, groups.domain, EmailDomain); - const EmailDomainDot = tt(EmailDomain, DOT); // domain followed by DOT - ta(EmailDomainDot, groups.domain, EmailDomain); - const Email$1 = makeState(Email); // Possible email address (could have more tlds) - ta(EmailDomainDot, groups.tld, Email$1); - ta(EmailDomainDot, groups.utld, Email$1); - tt(LocalpartAt, LOCALHOST, Email$1); - - // Hyphen can jump back to a domain name - const EmailDomainHyphen = tt(EmailDomain, HYPHEN); // parsed string starts with local email info + @ with a potential domain name - tt(EmailDomainHyphen, HYPHEN, EmailDomainHyphen); - ta(EmailDomainHyphen, groups.domain, EmailDomain); - ta(Email$1, groups.domain, EmailDomain); - tt(Email$1, DOT, EmailDomainDot); - tt(Email$1, HYPHEN, EmailDomainHyphen); - - // Account for dots and hyphens. Hyphens are usually parts of domain names - // (but not TLDs) - const DomainHyphen = tt(Domain, HYPHEN); // domain followed by hyphen - const DomainDot = tt(Domain, DOT); // domain followed by DOT - tt(DomainHyphen, HYPHEN, DomainHyphen); - ta(DomainHyphen, groups.domain, Domain); - ta(DomainDot, localpartAccepting, Localpart); - ta(DomainDot, groups.domain, Domain); - const DomainDotTld = makeState(Url); // Simplest possible URL with no query string - ta(DomainDot, groups.tld, DomainDotTld); - ta(DomainDot, groups.utld, DomainDotTld); - ta(DomainDotTld, groups.domain, Domain); - ta(DomainDotTld, localpartAccepting, Localpart); - tt(DomainDotTld, DOT, DomainDot); - tt(DomainDotTld, HYPHEN, DomainHyphen); - tt(DomainDotTld, AT, LocalpartAt); - const DomainDotTldColon = tt(DomainDotTld, COLON); // URL followed by colon (potential port number here) - const DomainDotTldColonPort = makeState(Url); // TLD followed by a port number - ta(DomainDotTldColon, groups.numeric, DomainDotTldColonPort); - - // Long URL with optional port and maybe query string - const Url$1 = makeState(Url); - - // URL with extra symbols at the end, followed by an opening bracket - const UrlNonaccept = makeState(); // URL followed by some symbols (will not be part of the final URL) - - // Query strings - ta(Url$1, qsAccepting, Url$1); - ta(Url$1, qsNonAccepting, UrlNonaccept); - ta(UrlNonaccept, qsAccepting, Url$1); - ta(UrlNonaccept, qsNonAccepting, UrlNonaccept); - - // Become real URLs after `SLASH` or `COLON NUM SLASH` - // Here works with or without scheme:// prefix - tt(DomainDotTld, SLASH, Url$1); - tt(DomainDotTldColonPort, SLASH, Url$1); - - // Note that domains that begin with schemes are treated slighly differently - const SchemeColon = tt(Scheme, COLON); // e.g., 'mailto:' - const SlashSchemeColon = tt(SlashScheme, COLON); // e.g., 'http:' - const SlashSchemeColonSlash = tt(SlashSchemeColon, SLASH); // e.g., 'http:/' - - const UriPrefix = tt(SlashSchemeColonSlash, SLASH); // e.g., 'http://' - - // Scheme states can transition to domain states - ta(Scheme, groups.domain, Domain); - tt(Scheme, DOT, DomainDot); - tt(Scheme, HYPHEN, DomainHyphen); - ta(SlashScheme, groups.domain, Domain); - tt(SlashScheme, DOT, DomainDot); - tt(SlashScheme, HYPHEN, DomainHyphen); - - // Force URL with scheme prefix followed by anything sane - ta(SchemeColon, groups.domain, Url$1); - tt(SchemeColon, SLASH, Url$1); - tt(SchemeColon, QUERY, Url$1); - ta(UriPrefix, groups.domain, Url$1); - ta(UriPrefix, qsAccepting, Url$1); - tt(UriPrefix, SLASH, Url$1); - const bracketPairs = [[OPENBRACE, CLOSEBRACE], - // {} - [OPENBRACKET, CLOSEBRACKET], - // [] - [OPENPAREN, CLOSEPAREN], - // () - [OPENANGLEBRACKET, CLOSEANGLEBRACKET], - // <> - [FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN], - // () - [LEFTCORNERBRACKET, RIGHTCORNERBRACKET], - // 「」 - [LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET], - // 『』 - [FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN] // <> - ]; - for (let i = 0; i < bracketPairs.length; i++) { - const [OPEN, CLOSE] = bracketPairs[i]; - const UrlOpen = tt(Url$1, OPEN); // URL followed by open bracket - - // Continue not accepting for open brackets - tt(UrlNonaccept, OPEN, UrlOpen); - - // URL that begins with an opening bracket, followed by a symbols. - // Note that the final state can still be `UrlOpen` (if the URL has a - // single opening bracket for some reason). - const UrlOpenQ = makeState(Url); - ta(UrlOpen, qsAccepting, UrlOpenQ); - const UrlOpenSyms = makeState(); // UrlOpen followed by some symbols it cannot end it - ta(UrlOpen, qsNonAccepting, UrlOpenSyms); - - // Closing bracket component. This character WILL be included in the URL. - // Must come after qsNonAccepting (which includes all close-bracket tokens) - // so that CLOSE -> Url wins over CLOSE -> UrlOpenSyms. - tt(UrlOpen, CLOSE, Url$1); - - // URL that begins with an opening bracket, followed by some symbols - ta(UrlOpenQ, qsAccepting, UrlOpenQ); - ta(UrlOpenQ, qsNonAccepting, UrlOpenSyms); - ta(UrlOpenSyms, qsAccepting, UrlOpenQ); - ta(UrlOpenSyms, qsNonAccepting, UrlOpenSyms); - - // Close brace/bracket to become regular URL - tt(UrlOpenQ, CLOSE, Url$1); - tt(UrlOpenSyms, CLOSE, Url$1); - } - tt(Start, LOCALHOST, DomainDotTld); // localhost is a valid URL state - tt(Start, NL, Nl); // single new line - - return { - start: Start, - tokens: tk - }; -} - -/** - * Run the parser state machine on a list of scanned string-based tokens to - * create a list of multi tokens, each of which represents a URL, email address, - * plain text, etc. - * - * @param {State} start parser start state - * @param {string} input the original input used to generate the given tokens - * @param {Token[]} tokens list of scanned tokens - * @returns {MultiToken[]} - */ -function run(start, input, tokens) { - let len = tokens.length; - let cursor = 0; - let multis = []; - let textTokens = []; - while (cursor < len) { - let state = start; - let secondState = null; - let nextState = null; - let multiLength = 0; - let latestAccepting = null; - let sinceAccepts = -1; - while (cursor < len && !(secondState = state.go(tokens[cursor].t))) { - // Starting tokens with nowhere to jump to. - // Consider these to be just plain text - textTokens.push(tokens[cursor++]); - } - while (cursor < len && (nextState = secondState || state.go(tokens[cursor].t))) { - // Get the next state - secondState = null; - state = nextState; - - // Keep track of the latest accepting state - if (state.accepts()) { - sinceAccepts = 0; - latestAccepting = state; - } else if (sinceAccepts >= 0) { - sinceAccepts++; - } - cursor++; - multiLength++; - } - if (sinceAccepts < 0) { - // No accepting state was found, part of a regular text token add - // the first text token to the text tokens array and try again from - // the next - cursor -= multiLength; - if (cursor < len) { - textTokens.push(tokens[cursor]); - cursor++; - } - } else { - // Accepting state! - // First close off the textTokens (if available) - if (textTokens.length > 0) { - multis.push(initMultiToken(Text, input, textTokens)); - textTokens = []; - } - - // Roll back to the latest accepting state - cursor -= sinceAccepts; - multiLength -= sinceAccepts; - - // Create a new multitoken - const Multi = latestAccepting.t; - const subtokens = tokens.slice(cursor - multiLength, cursor); - multis.push(initMultiToken(Multi, input, subtokens)); - } - } - - // Finally close off the textTokens (if available) - if (textTokens.length > 0) { - multis.push(initMultiToken(Text, input, textTokens)); - } - return multis; -} - -/** - * Utility function for instantiating a new multitoken with all the relevant - * fields during parsing. - * @param {new (value: string, tokens: Token[]) => MultiToken} Multi class to instantiate - * @param {string} input original input string - * @param {Token[]} tokens consecutive tokens scanned from input string - * @returns {MultiToken} - */ -function initMultiToken(Multi, input, tokens) { - const startIdx = tokens[0].s; - const endIdx = tokens[tokens.length - 1].e; - const value = input.slice(startIdx, endIdx); - return new Multi(value, tokens); -} - -const warn = typeof console !== 'undefined' && console && console.warn || (() => {}); -const warnAdvice = 'until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.'; - -// Side-effect initialization state -const INIT = { - scanner: null, - parser: null, - tokenQueue: [], - pluginQueue: [], - customSchemes: [], - initialized: false -}; - -/** - * @typedef {{ - * start: State, - * tokens: { groups: Collections } & typeof tk - * }} ScannerInit - */ - -/** - * @typedef {{ - * start: State, - * tokens: typeof multi - * }} ParserInit - */ - -/** - * @typedef {(arg: { scanner: ScannerInit }) => void} TokenPlugin - */ - -/** - * @typedef {(arg: { scanner: ScannerInit, parser: ParserInit }) => void} Plugin - */ - -/** - * De-register all plugins and reset the internal state-machine. Used for - * testing; not required in practice. - * @private - */ -function reset() { - State.groups = {}; - INIT.scanner = null; - INIT.parser = null; - INIT.tokenQueue = []; - INIT.pluginQueue = []; - INIT.customSchemes = []; - INIT.initialized = false; - return INIT; -} - -/** - * Register a token plugin to allow the scanner to recognize additional token - * types before the parser state machine is constructed from the results. - * @param {string} name of plugin to register - * @param {TokenPlugin} plugin function that accepts the scanner state machine - * and available scanner tokens and collections and extends the state machine to - * recognize additional tokens or groups. - */ -function registerTokenPlugin(name, plugin) { - if (typeof plugin !== 'function') { - throw new Error(`linkifyjs: Invalid token plugin ${plugin} (expects function)`); - } - for (let i = 0; i < INIT.tokenQueue.length; i++) { - if (name === INIT.tokenQueue[i][0]) { - warn(`linkifyjs: token plugin "${name}" already registered - will be overwritten`); - INIT.tokenQueue[i] = [name, plugin]; - return; - } - } - INIT.tokenQueue.push([name, plugin]); - if (INIT.initialized) { - warn(`linkifyjs: already initialized - will not register token plugin "${name}" ${warnAdvice}`); - } -} - -/** - * Register a linkify plugin - * @param {string} name of plugin to register - * @param {Plugin} plugin function that accepts the parser state machine and - * extends the parser to recognize additional link types - */ -function registerPlugin(name, plugin) { - if (typeof plugin !== 'function') { - throw new Error(`linkifyjs: Invalid plugin ${plugin} (expects function)`); - } - for (let i = 0; i < INIT.pluginQueue.length; i++) { - if (name === INIT.pluginQueue[i][0]) { - warn(`linkifyjs: plugin "${name}" already registered - will be overwritten`); - INIT.pluginQueue[i] = [name, plugin]; - return; - } - } - INIT.pluginQueue.push([name, plugin]); - if (INIT.initialized) { - warn(`linkifyjs: already initialized - will not register plugin "${name}" ${warnAdvice}`); - } -} - -/** - * Detect URLs with the following additional protocol. Anything with format - * "protocol://..." will be considered a link. If `optionalSlashSlash` is set to - * `true`, anything with format "protocol:..." will be considered a link. - * @param {string} scheme - * @param {boolean} [optionalSlashSlash] - */ -function registerCustomProtocol(scheme, optionalSlashSlash = false) { - if (INIT.initialized) { - warn(`linkifyjs: already initialized - will not register custom scheme "${scheme}" ${warnAdvice}`); - } - if (!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(scheme)) { - throw new Error(`linkifyjs: incorrect scheme format. -1. Must only contain digits, lowercase ASCII letters or "-" -2. Cannot start or end with "-" -3. "-" cannot repeat`); - } - INIT.customSchemes.push([scheme, optionalSlashSlash]); -} - -/** - * Initialize the linkify state machine. Called automatically the first time - * linkify is called on a string, but may be called manually as well. - */ -function init() { - // Initialize scanner state machine and plugins - INIT.scanner = init$2(INIT.customSchemes); - for (let i = 0; i < INIT.tokenQueue.length; i++) { - INIT.tokenQueue[i][1]({ - scanner: INIT.scanner - }); - } - - // Initialize parser state machine and plugins - INIT.parser = init$1(INIT.scanner.tokens); - for (let i = 0; i < INIT.pluginQueue.length; i++) { - INIT.pluginQueue[i][1]({ - scanner: INIT.scanner, - parser: INIT.parser - }); - } - INIT.initialized = true; - return INIT; -} - -/** - * Parse a string into tokens that represent linkable and non-linkable sub-components - * @param {string} str - * @return {MultiToken[]} tokens - */ -function tokenize(str) { - if (!INIT.initialized) { - init(); - } - return run(INIT.parser.start, str, run$1(INIT.scanner.start, str)); -} -tokenize.scan = run$1; // for testing - -/** - * Find a list of linkable items in the given string. - * @param {string} str string to find links in - * @param {string | Opts} [type] either formatting options or specific type of - * links to find, e.g., 'url' or 'email' - * @param {Opts} [opts] formatting options for final output. Cannot be specified - * if opts already provided in `type` argument - */ -function find(str, type = null, opts = null) { - if (type && typeof type === 'object') { - if (opts) { - throw Error(`linkifyjs: Invalid link type ${type}; must be a string`); - } - opts = type; - type = null; - } - const options = new Options(opts); - const tokens = tokenize(str); - const filtered = []; - for (let i = 0; i < tokens.length; i++) { - const token = tokens[i]; - if (token.isLink && (!type || token.t === type) && options.check(token)) { - filtered.push(token.toFormattedObject(options)); - } - } - return filtered; -} - -/** - * Is the given string valid linkable text of some sort. Note that this does not - * trim the text for you. - * - * Optionally pass in a second `type` param, which is the type of link to test - * for. - * - * For example, - * - * linkify.test(str, 'email'); - * - * Returns `true` if str is a valid email. - * @param {string} str string to test for links - * @param {string} [type] optional specific link type to look for - * @returns boolean true/false - */ -function test(str, type = null) { - const tokens = tokenize(str); - return tokens.length === 1 && tokens[0].isLink && (!type || tokens[0].t === type); -} - -export { MultiToken, Options, State, createTokenClass, find, init, multi, options, regexp, registerCustomProtocol, registerPlugin, registerTokenPlugin, reset, stringToArray, test, multi as text, tokenize }; diff --git a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/package.json b/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/package.json deleted file mode 100644 index b192019..0000000 --- a/services/hocuspocus/node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "linkifyjs", - "type": "module", - "version": "4.3.3", - "description": "Find URLs, email addresses, #hashtags and @mentions in plain-text strings, then convert them into HTML links.", - "main": "dist/linkify.cjs", - "module": "dist/linkify.mjs", - "scripts": { - "build": "rollup -c rollup.config.js", - "clean": "rm -rf lib dist *.tgz *.d.ts", - "prepack": "run-s clean build tsc", - "tsc": "tsc", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/nfrasser/linkifyjs.git", - "directory": "packages/linkifyjs" - }, - "keywords": [ - "autolink", - "email", - "hashtag", - "html", - "jquery", - "link", - "mention", - "react", - "twitter", - "url" - ], - "author": "Nick Frasser (https://nfrasser.com)", - "license": "MIT", - "bugs": { - "url": "https://github.com/nfrasser/linkifyjs/issues" - }, - "homepage": "https://linkify.js.org" -} diff --git a/services/hocuspocus/node_modules/.pnpm/lock.yaml b/services/hocuspocus/node_modules/.pnpm/lock.yaml deleted file mode 100644 index 96c9f61..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lock.yaml +++ /dev/null @@ -1,548 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - dependencies: - '@hocuspocus/server': - specifier: ^4.1.0 - version: 4.1.0(y-protocols@1.0.7(yjs@13.6.31))(yjs@13.6.31) - '@hocuspocus/transformer': - specifier: ^4.1.0 - version: 4.1.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)(y-prosemirror@1.3.7(prosemirror-model@1.25.7)(prosemirror-state@1.4.4)(prosemirror-view@1.41.8)(y-protocols@1.0.7(yjs@13.6.31))(yjs@13.6.31))(yjs@13.6.31) - '@tiptap/starter-kit': - specifier: ^3.23.2 - version: 3.26.0 - yjs: - specifier: ^13.6.27 - version: 13.6.31 - -packages: - - '@hocuspocus/common@4.1.0': - resolution: {integrity: sha512-SOBbu0GcBMbLo7IYRDZC6gvEcoATbEFIC5KqzvLanC6dZZLkv91pYEBli+Exs/G71ELL3iUjSwnaf+gksxcjFA==} - - '@hocuspocus/server@4.1.0': - resolution: {integrity: sha512-mp0Of76kRkK/u+9pKXPLNV4NI2Cyjql/jVnudVb0z6xAd/i7mBDTK88p1I1sNoX9yvCvhY7lQlrvVx6sMcl8Xw==} - engines: {node: '>=22'} - peerDependencies: - y-protocols: ^1.0.6 - yjs: ^13.6.8 - - '@hocuspocus/transformer@4.1.0': - resolution: {integrity: sha512-zjobRWsSipRM0hQvAZ65zPR0jrDcXgVHSFyuePtaNIZTBBeUbn1y6cLyBVQTIazE96UsuNwsZsBsMyFM7WdMUQ==} - peerDependencies: - '@tiptap/core': ^3.0.1 - '@tiptap/pm': ^3.0.1 - y-prosemirror: ^1.2.1 - yjs: ^13.6.8 - - '@tiptap/core@3.26.0': - resolution: {integrity: sha512-7jTed/RirIVsp+lLdLvGzGqF3EBGpnGHGYKOwz6t28V2BIJLAFdUhfEVdWie7xPxQNWK0TP+fPlsqZS0vxfHBg==} - peerDependencies: - '@tiptap/pm': 3.26.0 - - '@tiptap/extension-blockquote@3.26.0': - resolution: {integrity: sha512-57accpka9affjiJRjP2LMNCDJDTMjTvO23RJCxtP43sp9cTIZ7YZnyDfRxCINTRBNK0X4o4w2+emOLyRwsk3CA==} - peerDependencies: - '@tiptap/core': 3.26.0 - - '@tiptap/extension-bold@3.26.0': - resolution: {integrity: sha512-j6CzTMofcGJ5iMoUgDRQpM0FkG00jBID3aKqs+UBbgtzLgtG/CI/91tMFv0XPC30LeFA895qYgvGZtHdejZhiQ==} - peerDependencies: - '@tiptap/core': 3.26.0 - - '@tiptap/extension-bullet-list@3.26.0': - resolution: {integrity: sha512-Jv7BX+kBB2wUIvO/NhuUjv+T3kAed2Tjr664fgQ2zKT6X69jKIkYuCCedrIHuOyaOQ+SBDuH9h51wYv/E97QgQ==} - peerDependencies: - '@tiptap/extension-list': 3.26.0 - - '@tiptap/extension-code-block@3.26.0': - resolution: {integrity: sha512-WPN9iZ3UjeDD2ckDzSs9tleibXv0cLj7j575NxuvjhwZTehYGNeYDSUTi+6DQUG6bKbhGg9Wcei5H0131vvJHg==} - peerDependencies: - '@tiptap/core': 3.26.0 - '@tiptap/pm': 3.26.0 - - '@tiptap/extension-code@3.26.0': - resolution: {integrity: sha512-VJYcV6rvjnENRTroOi9tDcHWW6G0pmCoRETwatlbgfDzuCmkTOwVwQjeJCXOVMMLNPzNiXZzibsRCUt+Azq/jw==} - peerDependencies: - '@tiptap/core': 3.26.0 - - '@tiptap/extension-document@3.26.0': - resolution: {integrity: sha512-Xhd6DCjaxCN4otQNvV6qra+XuoIjk6Vyjm87E5xn5Y/BMw7UGAG7LTkk3C2IEvxKrVZwJjalfxEqdHOgXQzVfw==} - peerDependencies: - '@tiptap/core': 3.26.0 - - '@tiptap/extension-dropcursor@3.26.0': - resolution: {integrity: sha512-rhAtp5J/YVDUCUIc5T7b0XY9dLeuI72JgOr53w0QQc0VA0uwbfTn7sx0LI9PDCE9uwmDH8H3snVRZRnAvlM8oA==} - peerDependencies: - '@tiptap/extensions': 3.26.0 - - '@tiptap/extension-gapcursor@3.26.0': - resolution: {integrity: sha512-SIe68SDwx2fozt/XKG0FhCwzz/yRN6Bvo4D5TqvfDg6NK3PQb1DS4GN9PilmJqbY+kXryuiWEEJOWi7HpO8SuQ==} - peerDependencies: - '@tiptap/extensions': 3.26.0 - - '@tiptap/extension-hard-break@3.26.0': - resolution: {integrity: sha512-baXvv/rtOTVd2Axjb7Zbb41Y9Qmy3U2fP7EHqLuhViqGxVX8LwQtP0PHUXEZkPokbBpRez10+dmOlvvsYFKAZQ==} - peerDependencies: - '@tiptap/core': 3.26.0 - - '@tiptap/extension-heading@3.26.0': - resolution: {integrity: sha512-qenEQEgzE5FjQay/H6iKOnwIt6DPO27cS+v0mGhXmrL1MjrNER4X0ZkATJbVd0WA6ffsAGaP44NKYDworGeidw==} - peerDependencies: - '@tiptap/core': 3.26.0 - - '@tiptap/extension-horizontal-rule@3.26.0': - resolution: {integrity: sha512-a+N/C4wkQV+/8x4ShdoiC2JdTW3Tw84C5cAloYLFMeaWmRa2me9ACSI+zo0SO9bbH9RJwsoRp7eaxBbk27eF1Q==} - peerDependencies: - '@tiptap/core': 3.26.0 - '@tiptap/pm': 3.26.0 - - '@tiptap/extension-italic@3.26.0': - resolution: {integrity: sha512-s8oFpH+0xmhvY19f452/2dExO3p1tjxh761g6cg4irwEUNUEAJKF2VLcjiaeOhNJ+pmnQYxb+VSkwkXvO+7vHQ==} - peerDependencies: - '@tiptap/core': 3.26.0 - - '@tiptap/extension-link@3.26.0': - resolution: {integrity: sha512-FA/d157aBxyvZFvsdc5eSu46tmHWXebAsqOQSvivOMyw+deBb00VlMsf+iD2J8+sekjbMYwx/hvbsu+xUoX43Q==} - peerDependencies: - '@tiptap/core': 3.26.0 - '@tiptap/pm': 3.26.0 - - '@tiptap/extension-list-item@3.26.0': - resolution: {integrity: sha512-MccGyj9HY4fkl04eIiFoTCkr8067Jku/VVdJNtRWW104Spx43C/7V2zpbxPvpcDhq3dW384fDxYXfpnb186xLg==} - peerDependencies: - '@tiptap/extension-list': 3.26.0 - - '@tiptap/extension-list-keymap@3.26.0': - resolution: {integrity: sha512-oBcj6qaNrRHQ+N0+pDuOVAQa4Nx9r8Cm5ANvyM2lTpoy60sOLOizuVvcvw1andVxbSrsZ1N/Sk+RZWyv1uoWyQ==} - peerDependencies: - '@tiptap/extension-list': 3.26.0 - - '@tiptap/extension-list@3.26.0': - resolution: {integrity: sha512-EM8woyHDNKLEQ+lWUEoDtA4KrwP6fei/mYX1NxseMzKHHo7LFecx7wk6sovAXZrUvdML/yFBihgiMiO5VIsfkg==} - peerDependencies: - '@tiptap/core': 3.26.0 - '@tiptap/pm': 3.26.0 - - '@tiptap/extension-ordered-list@3.26.0': - resolution: {integrity: sha512-ItLdFlcMsJz2vhbs1PcUfcN7nzVqGBOwPeCrrWxjrgscp+K3JoOGD+HhVVpBACOMwivUrlh8Ry5Ohvues2nOeA==} - peerDependencies: - '@tiptap/extension-list': 3.26.0 - - '@tiptap/extension-paragraph@3.26.0': - resolution: {integrity: sha512-h8fYLikg4qN39IghQ1y9g+zzUsgxBpDi5YS3IZbWoxWYYx1YqLL8nAvOiPr7Us14aQ0TjA2/xY7zqmyf29rX1A==} - peerDependencies: - '@tiptap/core': 3.26.0 - - '@tiptap/extension-strike@3.26.0': - resolution: {integrity: sha512-jUll3Pqhq7u1JKvO0B6USW/bmVmUsO6sRcxo/d5tXqLhS0tWAobOGoGU2IgwXnQDSjf+vF73RYD5tRGDLkRC9Q==} - peerDependencies: - '@tiptap/core': 3.26.0 - - '@tiptap/extension-text@3.26.0': - resolution: {integrity: sha512-yZXdevp3/8omGbb40Z52VfvID+tsRNhPQ1GNUToD56XSr2BjdJyAzAb9rWGgDKgVMUPLgJ26yT0O278RFqOKhA==} - peerDependencies: - '@tiptap/core': 3.26.0 - - '@tiptap/extension-underline@3.26.0': - resolution: {integrity: sha512-LlVkivH5cBwov/EMD8BL7ZRcU6YcadiSVIffLW1hyalw9YfhaFzoLxjtWhL7jiU/n2Kg+9dXSZxmV2hTeTwyrQ==} - peerDependencies: - '@tiptap/core': 3.26.0 - - '@tiptap/extensions@3.26.0': - resolution: {integrity: sha512-4wajuqnO2X0+LVvsBjW/xk3/tmdb16bNL939QhicAay4YYqXITeV2v3XJsryzmG4L5GkK1yLxvRGk4aLoxWrnA==} - peerDependencies: - '@tiptap/core': 3.26.0 - '@tiptap/pm': 3.26.0 - - '@tiptap/pm@3.26.0': - resolution: {integrity: sha512-q4RDeWwVrhOL0jJCGRgGxLSdjOYwzQ4h2InURZVhC66433ipcHd6f3bqSOhcXZ4r0sFmMNsuF7aZmUntjWLc7w==} - - '@tiptap/starter-kit@3.26.0': - resolution: {integrity: sha512-o34EtMfqtBaljdmeElZsRG/067oGx9Zcq+j2GWo71KlZe22ga/ALexeTf1c+ETsjCxSTKR6eyQ4RZvz/2JpYfg==} - - async-mutex@0.5.0: - resolution: {integrity: sha512-1A94B18jkJ3DYq284ohPxoXbfTA5HsQ7/Mf4DEhcyLx3Bz27Rh59iScbB6EPiP+B+joue6YCxcMXSbFC1tZKwA==} - - crossws@0.4.5: - resolution: {integrity: sha512-wUR89x/Rw7/8t+vn0CmGDYM9TD6VtARGb0LD5jq2wjtMy1vCP4M+sm6N6TigWeTYvnA8MoW29NqqXD0ep0rfBA==} - peerDependencies: - srvx: '>=0.11.5' - peerDependenciesMeta: - srvx: - optional: true - - isomorphic.js@0.2.5: - resolution: {integrity: sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw==} - - kleur@4.1.5: - resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} - engines: {node: '>=6'} - - lib0@0.2.117: - resolution: {integrity: sha512-DeXj9X5xDCjgKLU/7RR+/HQEVzuuEUiwldwOGsHK/sfAfELGWEyTcf0x+uOvCvK3O2zPmZePXWL85vtia6GyZw==} - engines: {node: '>=16'} - hasBin: true - - linkifyjs@4.3.3: - resolution: {integrity: sha512-P8aEP5U/D1/IlTY2OeYsErdwh9bGuLE30NcXtKEjgdHcahveQoQwM2yZNsioQHsWFz0P7KKudisbrzCgR0sDHg==} - - orderedmap@2.1.1: - resolution: {integrity: sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==} - - prosemirror-changeset@2.4.1: - resolution: {integrity: sha512-96WBLhOaYhJ+kPhLg3uW359Tz6I/MfcrQfL4EGv4SrcqKEMC1gmoGrXHecPE8eOwTVCJ4IwgfzM8fFad25wNfw==} - - prosemirror-commands@1.7.1: - resolution: {integrity: sha512-rT7qZnQtx5c0/y/KlYaGvtG411S97UaL6gdp6RIZ23DLHanMYLyfGBV5DtSnZdthQql7W+lEVbpSfwtO8T+L2w==} - - prosemirror-dropcursor@1.8.2: - resolution: {integrity: sha512-CCk6Gyx9+Tt2sbYk5NK0nB1ukHi2ryaRgadV/LvyNuO3ena1payM2z6Cg0vO1ebK8cxbzo41ku2DE5Axj1Zuiw==} - - prosemirror-gapcursor@1.4.1: - resolution: {integrity: sha512-pMdYaEnjNMSwl11yjEGtgTmLkR08m/Vl+Jj443167p9eB3HVQKhYCc4gmHVDsLPODfZfjr/MmirsdyZziXbQKw==} - - prosemirror-history@1.5.0: - resolution: {integrity: sha512-zlzTiH01eKA55UAf1MEjtssJeHnGxO0j4K4Dpx+gnmX9n+SHNlDqI2oO1Kv1iPN5B1dm5fsljCfqKF9nFL6HRg==} - - prosemirror-inputrules@1.5.1: - resolution: {integrity: sha512-7wj4uMjKaXWAQ1CDgxNzNtR9AlsuwzHfdFH1ygEHA2KHF2DOEaXl1CJfNPAKCg9qNEh4rum975QLaCiQPyY6Fw==} - - prosemirror-keymap@1.2.3: - resolution: {integrity: sha512-4HucRlpiLd1IPQQXNqeo81BGtkY8Ai5smHhKW9jjPKRc2wQIxksg7Hl1tTI2IfT2B/LgX6bfYvXxEpJl7aKYKw==} - - prosemirror-model@1.25.7: - resolution: {integrity: sha512-A79aN8QEFUwI6cax8Yq4Rpcx1TJZ3Kagn+ii7qLo4/V8H3mMiHrhFyhTyHHvpSnOgMPpWiDGSwM3etwrxE50ug==} - - prosemirror-schema-list@1.5.1: - resolution: {integrity: sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==} - - prosemirror-state@1.4.4: - resolution: {integrity: sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==} - - prosemirror-tables@1.8.5: - resolution: {integrity: sha512-V/0cDCsHKHe/tfWkeCmthNUcEp1IVO3p6vwN8XtwE9PZQLAZJigbw3QoraAdfJPir4NKJtNvOB8oYGKRl+t0Dw==} - - prosemirror-transform@1.12.0: - resolution: {integrity: sha512-GxboyN4AMIsoHNtz5uf2r2Ru551i5hWeCMD6E2Ib4Eogqoub0NflniaBPVQ4MrGE5yZ8JV9tUHg9qcZTTrcN4w==} - - prosemirror-view@1.41.8: - resolution: {integrity: sha512-TnKDdohEatgyZNGCDWIdccOHXhYloJwbwU+phw/a23KBvJIR9lWQWW7WHHK3vBdOLDNuF7TaX98GObUZOWkOnA==} - - rope-sequence@1.3.4: - resolution: {integrity: sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==} - - tslib@2.8.1: - resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - - w3c-keyname@2.2.8: - resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} - - y-prosemirror@1.3.7: - resolution: {integrity: sha512-NpM99WSdD4Fx4if5xOMDpPtU3oAmTSjlzh5U4353ABbRHl1HtAFUx6HlebLZfyFxXN9jzKMDkVbcRjqOZVkYQg==} - engines: {node: '>=16.0.0', npm: '>=8.0.0'} - peerDependencies: - prosemirror-model: ^1.7.1 - prosemirror-state: ^1.2.3 - prosemirror-view: ^1.9.10 - y-protocols: ^1.0.1 - yjs: ^13.5.38 - - y-protocols@1.0.7: - resolution: {integrity: sha512-YSVsLoXxO67J6eE/nV4AtFtT3QEotZf5sK5BHxFBXso7VDUT3Tx07IfA6hsu5Q5OmBdMkQVmFZ9QOA7fikWvnw==} - engines: {node: '>=16.0.0', npm: '>=8.0.0'} - peerDependencies: - yjs: ^13.0.0 - - yjs@13.6.31: - resolution: {integrity: sha512-Eq+5BRfbeGyqGVrTJL3bEcr8gKkxPuyuoHmAwpk52fDb8kOVMrfVSTRPd6yiGgX5Fskb96qCRjzjbRjrL4YEnw==} - engines: {node: '>=16.0.0', npm: '>=8.0.0'} - -snapshots: - - '@hocuspocus/common@4.1.0': - dependencies: - lib0: 0.2.117 - - '@hocuspocus/server@4.1.0(y-protocols@1.0.7(yjs@13.6.31))(yjs@13.6.31)': - dependencies: - '@hocuspocus/common': 4.1.0 - async-mutex: 0.5.0 - crossws: 0.4.5 - kleur: 4.1.5 - lib0: 0.2.117 - y-protocols: 1.0.7(yjs@13.6.31) - yjs: 13.6.31 - transitivePeerDependencies: - - srvx - - '@hocuspocus/transformer@4.1.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)(y-prosemirror@1.3.7(prosemirror-model@1.25.7)(prosemirror-state@1.4.4)(prosemirror-view@1.41.8)(y-protocols@1.0.7(yjs@13.6.31))(yjs@13.6.31))(yjs@13.6.31)': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - '@tiptap/pm': 3.26.0 - '@tiptap/starter-kit': 3.26.0 - y-prosemirror: 1.3.7(prosemirror-model@1.25.7)(prosemirror-state@1.4.4)(prosemirror-view@1.41.8)(y-protocols@1.0.7(yjs@13.6.31))(yjs@13.6.31) - yjs: 13.6.31 - - '@tiptap/core@3.26.0(@tiptap/pm@3.26.0)': - dependencies: - '@tiptap/pm': 3.26.0 - - '@tiptap/extension-blockquote@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - - '@tiptap/extension-bold@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - - '@tiptap/extension-bullet-list@3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/extension-list': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0) - - '@tiptap/extension-code-block@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - '@tiptap/pm': 3.26.0 - - '@tiptap/extension-code@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - - '@tiptap/extension-document@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - - '@tiptap/extension-dropcursor@3.26.0(@tiptap/extensions@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/extensions': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0) - - '@tiptap/extension-gapcursor@3.26.0(@tiptap/extensions@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/extensions': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0) - - '@tiptap/extension-hard-break@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - - '@tiptap/extension-heading@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - - '@tiptap/extension-horizontal-rule@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - '@tiptap/pm': 3.26.0 - - '@tiptap/extension-italic@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - - '@tiptap/extension-link@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - '@tiptap/pm': 3.26.0 - linkifyjs: 4.3.3 - - '@tiptap/extension-list-item@3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/extension-list': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0) - - '@tiptap/extension-list-keymap@3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/extension-list': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0) - - '@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - '@tiptap/pm': 3.26.0 - - '@tiptap/extension-ordered-list@3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/extension-list': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0) - - '@tiptap/extension-paragraph@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - - '@tiptap/extension-strike@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - - '@tiptap/extension-text@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - - '@tiptap/extension-underline@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - - '@tiptap/extensions@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - '@tiptap/pm': 3.26.0 - - '@tiptap/pm@3.26.0': - dependencies: - prosemirror-changeset: 2.4.1 - prosemirror-commands: 1.7.1 - prosemirror-dropcursor: 1.8.2 - prosemirror-gapcursor: 1.4.1 - prosemirror-history: 1.5.0 - prosemirror-inputrules: 1.5.1 - prosemirror-keymap: 1.2.3 - prosemirror-model: 1.25.7 - prosemirror-schema-list: 1.5.1 - prosemirror-state: 1.4.4 - prosemirror-tables: 1.8.5 - prosemirror-transform: 1.12.0 - prosemirror-view: 1.41.8 - - '@tiptap/starter-kit@3.26.0': - dependencies: - '@tiptap/core': 3.26.0(@tiptap/pm@3.26.0) - '@tiptap/extension-blockquote': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0)) - '@tiptap/extension-bold': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0)) - '@tiptap/extension-bullet-list': 3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)) - '@tiptap/extension-code': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0)) - '@tiptap/extension-code-block': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0) - '@tiptap/extension-document': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0)) - '@tiptap/extension-dropcursor': 3.26.0(@tiptap/extensions@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)) - '@tiptap/extension-gapcursor': 3.26.0(@tiptap/extensions@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)) - '@tiptap/extension-hard-break': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0)) - '@tiptap/extension-heading': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0)) - '@tiptap/extension-horizontal-rule': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0) - '@tiptap/extension-italic': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0)) - '@tiptap/extension-link': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0) - '@tiptap/extension-list': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0) - '@tiptap/extension-list-item': 3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)) - '@tiptap/extension-list-keymap': 3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)) - '@tiptap/extension-ordered-list': 3.26.0(@tiptap/extension-list@3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0)) - '@tiptap/extension-paragraph': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0)) - '@tiptap/extension-strike': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0)) - '@tiptap/extension-text': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0)) - '@tiptap/extension-underline': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0)) - '@tiptap/extensions': 3.26.0(@tiptap/core@3.26.0(@tiptap/pm@3.26.0))(@tiptap/pm@3.26.0) - '@tiptap/pm': 3.26.0 - - async-mutex@0.5.0: - dependencies: - tslib: 2.8.1 - - crossws@0.4.5: {} - - isomorphic.js@0.2.5: {} - - kleur@4.1.5: {} - - lib0@0.2.117: - dependencies: - isomorphic.js: 0.2.5 - - linkifyjs@4.3.3: {} - - orderedmap@2.1.1: {} - - prosemirror-changeset@2.4.1: - dependencies: - prosemirror-transform: 1.12.0 - - prosemirror-commands@1.7.1: - dependencies: - prosemirror-model: 1.25.7 - prosemirror-state: 1.4.4 - prosemirror-transform: 1.12.0 - - prosemirror-dropcursor@1.8.2: - dependencies: - prosemirror-state: 1.4.4 - prosemirror-transform: 1.12.0 - prosemirror-view: 1.41.8 - - prosemirror-gapcursor@1.4.1: - dependencies: - prosemirror-keymap: 1.2.3 - prosemirror-model: 1.25.7 - prosemirror-state: 1.4.4 - prosemirror-view: 1.41.8 - - prosemirror-history@1.5.0: - dependencies: - prosemirror-state: 1.4.4 - prosemirror-transform: 1.12.0 - prosemirror-view: 1.41.8 - rope-sequence: 1.3.4 - - prosemirror-inputrules@1.5.1: - dependencies: - prosemirror-state: 1.4.4 - prosemirror-transform: 1.12.0 - - prosemirror-keymap@1.2.3: - dependencies: - prosemirror-state: 1.4.4 - w3c-keyname: 2.2.8 - - prosemirror-model@1.25.7: - dependencies: - orderedmap: 2.1.1 - - prosemirror-schema-list@1.5.1: - dependencies: - prosemirror-model: 1.25.7 - prosemirror-state: 1.4.4 - prosemirror-transform: 1.12.0 - - prosemirror-state@1.4.4: - dependencies: - prosemirror-model: 1.25.7 - prosemirror-transform: 1.12.0 - prosemirror-view: 1.41.8 - - prosemirror-tables@1.8.5: - dependencies: - prosemirror-keymap: 1.2.3 - prosemirror-model: 1.25.7 - prosemirror-state: 1.4.4 - prosemirror-transform: 1.12.0 - prosemirror-view: 1.41.8 - - prosemirror-transform@1.12.0: - dependencies: - prosemirror-model: 1.25.7 - - prosemirror-view@1.41.8: - dependencies: - prosemirror-model: 1.25.7 - prosemirror-state: 1.4.4 - prosemirror-transform: 1.12.0 - - rope-sequence@1.3.4: {} - - tslib@2.8.1: {} - - w3c-keyname@2.2.8: {} - - y-prosemirror@1.3.7(prosemirror-model@1.25.7)(prosemirror-state@1.4.4)(prosemirror-view@1.41.8)(y-protocols@1.0.7(yjs@13.6.31))(yjs@13.6.31): - dependencies: - lib0: 0.2.117 - prosemirror-model: 1.25.7 - prosemirror-state: 1.4.4 - prosemirror-view: 1.41.8 - y-protocols: 1.0.7(yjs@13.6.31) - yjs: 13.6.31 - - y-protocols@1.0.7(yjs@13.6.31): - dependencies: - lib0: 0.2.117 - yjs: 13.6.31 - - yjs@13.6.31: - dependencies: - lib0: 0.2.117 diff --git a/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/LICENSE b/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/README.md b/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/README.md deleted file mode 100644 index 435dfeb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) - -## Installation: - -```javascript -npm install lru-cache --save -``` - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n, key) { return n * 2 + key.length } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = new LRU(options) - , otherCache = new LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -// non-string keys ARE fully supported -// but note that it must be THE SAME object, not -// just a JSON-equivalent object. -var someObject = { a: 1 } -cache.set(someObject, 'a value') -// Object keys are not toString()-ed -cache.set('[object Object]', 'a different value') -assert.equal(cache.get(someObject), 'a value') -// A similar object with same keys/values won't work, -// because it's a different object identity -assert.equal(cache.get({ a: 1 }), undefined) - -cache.reset() // empty the cache -``` - -If you put more stuff in it, then items will fall out. - -If you try to put an oversized thing in it, then it'll fall out right -away. - -## Options - -* `max` The maximum size of the cache, checked by applying the length - function to all values in the cache. Not setting this is kind of - silly, since that's the whole purpose of this lib, but it defaults - to `Infinity`. Setting it to a non-number or negative number will - throw a `TypeError`. Setting it to 0 makes it be `Infinity`. -* `maxAge` Maximum age in ms. Items are not pro-actively pruned out - as they age, but if you try to get an item that is too old, it'll - drop it and return undefined instead of giving it to you. - Setting this to a negative value will make everything seem old! - Setting it to a non-number will throw a `TypeError`. -* `length` Function that is used to calculate the length of stored - items. If you're storing strings or buffers, then you probably want - to do something like `function(n, key){return n.length}`. The default is - `function(){return 1}`, which is fine if you want to store `max` - like-sized things. The item is passed as the first argument, and - the key is passed as the second argumnet. -* `dispose` Function that is called on items when they are dropped - from the cache. This can be handy if you want to close file - descriptors or do other cleanup tasks when items are no longer - accessible. Called with `key, value`. It's called *before* - actually removing the item from the internal cache, so if you want - to immediately put it back in, you'll have to do that in a - `nextTick` or `setTimeout` callback or it won't do anything. -* `stale` By default, if you set a `maxAge`, it'll only actually pull - stale items out of the cache when you `get(key)`. (That is, it's - not pre-emptively doing a `setTimeout` or anything.) If you set - `stale:true`, it'll return the stale value before deleting it. If - you don't set this, then it'll return `undefined` when you try to - get a stale entry, as if it had already been deleted. -* `noDisposeOnSet` By default, if you set a `dispose()` method, then - it'll be called whenever a `set()` operation overwrites an existing - key. If you set this option, `dispose()` will only be called when a - key falls out of the cache, not when it is overwritten. -* `updateAgeOnGet` When using time-expiring entries with `maxAge`, - setting this to `true` will make each item's effective time update - to the current time whenever it is retrieved from cache, causing it - to not expire. (It can still fall out of cache based on recency of - use, of course.) - -## API - -* `set(key, value, maxAge)` -* `get(key) => value` - - Both of these will update the "recently used"-ness of the key. - They do what you think. `maxAge` is optional and overrides the - cache `maxAge` option if provided. - - If the key is not found, `get()` will return `undefined`. - - The key and val can be any value. - -* `peek(key)` - - Returns the key value (or `undefined` if not found) without - updating the "recently used"-ness of the key. - - (If you find yourself using this a lot, you *might* be using the - wrong sort of data structure, but there are some use cases where - it's handy.) - -* `del(key)` - - Deletes a key out of the cache. - -* `reset()` - - Clear the cache entirely, throwing away all values. - -* `has(key)` - - Check if a key is in the cache, without updating the recent-ness - or deleting it for being stale. - -* `forEach(function(value,key,cache), [thisp])` - - Just like `Array.prototype.forEach`. Iterates over all the keys - in the cache, in order of recent-ness. (Ie, more recently used - items are iterated over first.) - -* `rforEach(function(value,key,cache), [thisp])` - - The same as `cache.forEach(...)` but items are iterated over in - reverse order. (ie, less recently used items are iterated over - first.) - -* `keys()` - - Return an array of the keys in the cache. - -* `values()` - - Return an array of the values in the cache. - -* `length` - - Return total length of objects in cache taking into account - `length` options function. - -* `itemCount` - - Return total quantity of objects currently in cache. Note, that - `stale` (see options) items are returned as part of this item - count. - -* `dump()` - - Return an array of the cache entries ready for serialization and usage - with 'destinationCache.load(arr)`. - -* `load(cacheEntriesArray)` - - Loads another cache entries array, obtained with `sourceCache.dump()`, - into the cache. The destination cache is reset before loading new entries - -* `prune()` - - Manually iterates over the entire cache proactively pruning old entries diff --git a/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js b/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js deleted file mode 100644 index 573b6b8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js +++ /dev/null @@ -1,334 +0,0 @@ -'use strict' - -// A linked list to keep track of recently-used-ness -const Yallist = require('yallist') - -const MAX = Symbol('max') -const LENGTH = Symbol('length') -const LENGTH_CALCULATOR = Symbol('lengthCalculator') -const ALLOW_STALE = Symbol('allowStale') -const MAX_AGE = Symbol('maxAge') -const DISPOSE = Symbol('dispose') -const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') -const LRU_LIST = Symbol('lruList') -const CACHE = Symbol('cache') -const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') - -const naiveLength = () => 1 - -// lruList is a yallist where the head is the youngest -// item, and the tail is the oldest. the list contains the Hit -// objects as the entries. -// Each Hit object has a reference to its Yallist.Node. This -// never changes. -// -// cache is a Map (or PseudoMap) that matches the keys to -// the Yallist.Node object. -class LRUCache { - constructor (options) { - if (typeof options === 'number') - options = { max: options } - - if (!options) - options = {} - - if (options.max && (typeof options.max !== 'number' || options.max < 0)) - throw new TypeError('max must be a non-negative number') - // Kind of weird to have a default max of Infinity, but oh well. - const max = this[MAX] = options.max || Infinity - - const lc = options.length || naiveLength - this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc - this[ALLOW_STALE] = options.stale || false - if (options.maxAge && typeof options.maxAge !== 'number') - throw new TypeError('maxAge must be a number') - this[MAX_AGE] = options.maxAge || 0 - this[DISPOSE] = options.dispose - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false - this.reset() - } - - // resize the cache when the max changes. - set max (mL) { - if (typeof mL !== 'number' || mL < 0) - throw new TypeError('max must be a non-negative number') - - this[MAX] = mL || Infinity - trim(this) - } - get max () { - return this[MAX] - } - - set allowStale (allowStale) { - this[ALLOW_STALE] = !!allowStale - } - get allowStale () { - return this[ALLOW_STALE] - } - - set maxAge (mA) { - if (typeof mA !== 'number') - throw new TypeError('maxAge must be a non-negative number') - - this[MAX_AGE] = mA - trim(this) - } - get maxAge () { - return this[MAX_AGE] - } - - // resize the cache when the lengthCalculator changes. - set lengthCalculator (lC) { - if (typeof lC !== 'function') - lC = naiveLength - - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC - this[LENGTH] = 0 - this[LRU_LIST].forEach(hit => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) - this[LENGTH] += hit.length - }) - } - trim(this) - } - get lengthCalculator () { return this[LENGTH_CALCULATOR] } - - get length () { return this[LENGTH] } - get itemCount () { return this[LRU_LIST].length } - - rforEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].tail; walker !== null;) { - const prev = walker.prev - forEachStep(this, fn, walker, thisp) - walker = prev - } - } - - forEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].head; walker !== null;) { - const next = walker.next - forEachStep(this, fn, walker, thisp) - walker = next - } - } - - keys () { - return this[LRU_LIST].toArray().map(k => k.key) - } - - values () { - return this[LRU_LIST].toArray().map(k => k.value) - } - - reset () { - if (this[DISPOSE] && - this[LRU_LIST] && - this[LRU_LIST].length) { - this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) - } - - this[CACHE] = new Map() // hash of items by key - this[LRU_LIST] = new Yallist() // list of items in order of use recency - this[LENGTH] = 0 // length of items in the list - } - - dump () { - return this[LRU_LIST].map(hit => - isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter(h => h) - } - - dumpLru () { - return this[LRU_LIST] - } - - set (key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE] - - if (maxAge && typeof maxAge !== 'number') - throw new TypeError('maxAge must be a number') - - const now = maxAge ? Date.now() : 0 - const len = this[LENGTH_CALCULATOR](value, key) - - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)) - return false - } - - const node = this[CACHE].get(key) - const item = node.value - - // dispose of the old one before overwriting - // split out into 2 ifs for better coverage tracking - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value) - } - - item.now = now - item.maxAge = maxAge - item.value = value - this[LENGTH] += len - item.length - item.length = len - this.get(key) - trim(this) - return true - } - - const hit = new Entry(key, value, len, now, maxAge) - - // oversized objects fall out of cache automatically. - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value) - - return false - } - - this[LENGTH] += hit.length - this[LRU_LIST].unshift(hit) - this[CACHE].set(key, this[LRU_LIST].head) - trim(this) - return true - } - - has (key) { - if (!this[CACHE].has(key)) return false - const hit = this[CACHE].get(key).value - return !isStale(this, hit) - } - - get (key) { - return get(this, key, true) - } - - peek (key) { - return get(this, key, false) - } - - pop () { - const node = this[LRU_LIST].tail - if (!node) - return null - - del(this, node) - return node.value - } - - del (key) { - del(this, this[CACHE].get(key)) - } - - load (arr) { - // reset the cache - this.reset() - - const now = Date.now() - // A previous serialized cache has the most recent items first - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l] - const expiresAt = hit.e || 0 - if (expiresAt === 0) - // the item was created without expiration in a non aged cache - this.set(hit.k, hit.v) - else { - const maxAge = expiresAt - now - // dont add already expired items - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge) - } - } - } - } - - prune () { - this[CACHE].forEach((value, key) => get(this, key, false)) - } -} - -const get = (self, key, doUse) => { - const node = self[CACHE].get(key) - if (node) { - const hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - return undefined - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now() - self[LRU_LIST].unshiftNode(node) - } - } - return hit.value - } -} - -const isStale = (self, hit) => { - if (!hit || (!hit.maxAge && !self[MAX_AGE])) - return false - - const diff = Date.now() - hit.now - return hit.maxAge ? diff > hit.maxAge - : self[MAX_AGE] && (diff > self[MAX_AGE]) -} - -const trim = self => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; - self[LENGTH] > self[MAX] && walker !== null;) { - // We know that we're about to delete this one, and also - // what the next least recently used key will be, so just - // go ahead and set it now. - const prev = walker.prev - del(self, walker) - walker = prev - } - } -} - -const del = (self, node) => { - if (node) { - const hit = node.value - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value) - - self[LENGTH] -= hit.length - self[CACHE].delete(hit.key) - self[LRU_LIST].removeNode(node) - } -} - -class Entry { - constructor (key, value, length, now, maxAge) { - this.key = key - this.value = value - this.length = length - this.now = now - this.maxAge = maxAge || 0 - } -} - -const forEachStep = (self, fn, node, thisp) => { - let hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - hit = undefined - } - if (hit) - fn.call(thisp, hit.value, hit.key, self) -} - -module.exports = LRUCache diff --git a/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/package.json b/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/package.json deleted file mode 100644 index 43b7502..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "6.0.0", - "author": "Isaac Z. Schlueter ", - "keywords": [ - "mru", - "lru", - "cache" - ], - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "main": "index.js", - "repository": "git://github.com/isaacs/node-lru-cache.git", - "devDependencies": { - "benchmark": "^2.1.4", - "tap": "^14.10.7" - }, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "files": [ - "index.js" - ], - "engines": { - "node": ">=10" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/yallist b/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/yallist deleted file mode 120000 index 026812a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/lru-cache@6.0.0/node_modules/yallist +++ /dev/null @@ -1 +0,0 @@ -../../yallist@4.0.0/node_modules/yallist \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/agentkeepalive b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/agentkeepalive deleted file mode 120000 index 976010f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/agentkeepalive +++ /dev/null @@ -1 +0,0 @@ -../../agentkeepalive@4.6.0/node_modules/agentkeepalive \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/cacache b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/cacache deleted file mode 120000 index 7e86867..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/cacache +++ /dev/null @@ -1 +0,0 @@ -../../cacache@15.3.0/node_modules/cacache \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/http-cache-semantics b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/http-cache-semantics deleted file mode 120000 index 950317f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/http-cache-semantics +++ /dev/null @@ -1 +0,0 @@ -../../http-cache-semantics@4.2.0/node_modules/http-cache-semantics \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/http-proxy-agent b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/http-proxy-agent deleted file mode 120000 index 0e7527d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/http-proxy-agent +++ /dev/null @@ -1 +0,0 @@ -../../http-proxy-agent@4.0.1/node_modules/http-proxy-agent \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/https-proxy-agent b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/https-proxy-agent deleted file mode 120000 index a748426..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/https-proxy-agent +++ /dev/null @@ -1 +0,0 @@ -../../https-proxy-agent@5.0.1/node_modules/https-proxy-agent \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/is-lambda b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/is-lambda deleted file mode 120000 index d1b64c5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/is-lambda +++ /dev/null @@ -1 +0,0 @@ -../../is-lambda@1.0.1/node_modules/is-lambda \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/lru-cache b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/lru-cache deleted file mode 120000 index 4e6ca5d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/lru-cache +++ /dev/null @@ -1 +0,0 @@ -../../lru-cache@6.0.0/node_modules/lru-cache \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/LICENSE b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/LICENSE deleted file mode 100644 index 8d28acf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for -any purpose with or without fee is hereby granted, provided that the -above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS -ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/README.md b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/README.md deleted file mode 100644 index 87659c9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/README.md +++ /dev/null @@ -1,395 +0,0 @@ -# make-fetch-happen -[![npm version](https://img.shields.io/npm/v/make-fetch-happen.svg)](https://npm.im/make-fetch-happen) [![license](https://img.shields.io/npm/l/make-fetch-happen.svg)](https://npm.im/make-fetch-happen) [![Travis](https://img.shields.io/travis/npm/make-fetch-happen.svg)](https://travis-ci.org/npm/make-fetch-happen) [![Coverage Status](https://coveralls.io/repos/github/npm/make-fetch-happen/badge.svg?branch=latest)](https://coveralls.io/github/npm/make-fetch-happen?branch=latest) - -[`make-fetch-happen`](https://github.com/npm/make-fetch-happen) is a Node.js -library that wraps [`minipass-fetch`](https://github.com/npm/minipass-fetch) with additional -features [`minipass-fetch`](https://github.com/npm/minipass-fetch) doesn't intend to include, including HTTP Cache support, request -pooling, proxies, retries, [and more](#features)! - -## Install - -`$ npm install --save make-fetch-happen` - -## Table of Contents - -* [Example](#example) -* [Features](#features) -* [Contributing](#contributing) -* [API](#api) - * [`fetch`](#fetch) - * [`fetch.defaults`](#fetch-defaults) - * [`minipass-fetch` options](#minipass-fetch-options) - * [`make-fetch-happen` options](#extra-options) - * [`opts.cachePath`](#opts-cache-path) - * [`opts.cache`](#opts-cache) - * [`opts.proxy`](#opts-proxy) - * [`opts.noProxy`](#opts-no-proxy) - * [`opts.ca, opts.cert, opts.key`](#https-opts) - * [`opts.maxSockets`](#opts-max-sockets) - * [`opts.retry`](#opts-retry) - * [`opts.onRetry`](#opts-onretry) - * [`opts.integrity`](#opts-integrity) -* [Message From Our Sponsors](#wow) - -### Example - -```javascript -const fetch = require('make-fetch-happen').defaults({ - cachePath: './my-cache' // path where cache will be written (and read) -}) - -fetch('https://registry.npmjs.org/make-fetch-happen').then(res => { - return res.json() // download the body as JSON -}).then(body => { - console.log(`got ${body.name} from web`) - return fetch('https://registry.npmjs.org/make-fetch-happen', { - cache: 'no-cache' // forces a conditional request - }) -}).then(res => { - console.log(res.status) // 304! cache validated! - return res.json().then(body => { - console.log(`got ${body.name} from cache`) - }) -}) -``` - -### Features - -* Builds around [`minipass-fetch`](https://npm.im/minipass-fetch) for the core [`fetch` API](https://fetch.spec.whatwg.org) implementation -* Request pooling out of the box -* Quite fast, really -* Automatic HTTP-semantics-aware request retries -* Cache-fallback automatic "offline mode" -* Proxy support (http, https, socks, socks4, socks5) -* Built-in request caching following full HTTP caching rules (`Cache-Control`, `ETag`, `304`s, cache fallback on error, etc). -* Customize cache storage with any [Cache API](https://developer.mozilla.org/en-US/docs/Web/API/Cache)-compliant `Cache` instance. Cache to Redis! -* Node.js Stream support -* Transparent gzip and deflate support -* [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) support -* Literally punches nazis -* (PENDING) Range request caching and resuming - -### Contributing - -The make-fetch-happen team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md) outlines the process for community interaction and contribution. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear. - -All participants and maintainers in this project are expected to follow the [npm Code of Conduct](https://www.npmjs.com/policies/conduct), and just generally be excellent to each other. - -Please refer to the [Changelog](CHANGELOG.md) for project history details, too. - -Happy hacking! - -### API - -#### `> fetch(uriOrRequest, [opts]) -> Promise` - -This function implements most of the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch): given a `uri` string or a `Request` instance, it will fire off an http request and return a Promise containing the relevant response. - -If `opts` is provided, the [`minipass-fetch`-specific options](#minipass-fetch-options) will be passed to that library. There are also [additional options](#extra-options) specific to make-fetch-happen that add various features, such as HTTP caching, integrity verification, proxy support, and more. - -##### Example - -```javascript -fetch('https://google.com').then(res => res.buffer()) -``` - -#### `> fetch.defaults([defaultUrl], [defaultOpts])` - -Returns a new `fetch` function that will call `make-fetch-happen` using `defaultUrl` and `defaultOpts` as default values to any calls. - -A defaulted `fetch` will also have a `.defaults()` method, so they can be chained. - -##### Example - -```javascript -const fetch = require('make-fetch-happen').defaults({ - cachePath: './my-local-cache' -}) - -fetch('https://registry.npmjs.org/make-fetch-happen') // will always use the cache -``` - -#### `> minipass-fetch options` - -The following options for `minipass-fetch` are used as-is: - -* method -* body -* redirect -* follow -* timeout -* compress -* size - -These other options are modified or augmented by make-fetch-happen: - -* headers - Default `User-Agent` set to make-fetch happen. `Connection` is set to `keep-alive` or `close` automatically depending on `opts.agent`. -* agent - * If agent is null, an http or https Agent will be automatically used. By default, these will be `http.globalAgent` and `https.globalAgent`. - * If [`opts.proxy`](#opts-proxy) is provided and `opts.agent` is null, the agent will be set to an appropriate proxy-handling agent. - * If `opts.agent` is an object, it will be used as the request-pooling agent argument for this request. - * If `opts.agent` is `false`, it will be passed as-is to the underlying request library. This causes a new Agent to be spawned for every request. - -For more details, see [the documentation for `minipass-fetch` itself](https://github.com/npm/minipass-fetch#options). - -#### `> make-fetch-happen options` - -make-fetch-happen augments the `minipass-fetch` API with additional features available through extra options. The following extra options are available: - -* [`opts.cachePath`](#opts-cache-path) - Cache target to read/write -* [`opts.cache`](#opts-cache) - `fetch` cache mode. Controls cache *behavior*. -* [`opts.proxy`](#opts-proxy) - Proxy agent -* [`opts.noProxy`](#opts-no-proxy) - Domain segments to disable proxying for. -* [`opts.ca, opts.cert, opts.key, opts.strictSSL`](#https-opts) -* [`opts.localAddress`](#opts-local-address) -* [`opts.maxSockets`](#opts-max-sockets) -* [`opts.retry`](#opts-retry) - Request retry settings -* [`opts.onRetry`](#opts-onretry) - a function called whenever a retry is attempted -* [`opts.integrity`](#opts-integrity) - [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) metadata. - -#### `> opts.cachePath` - -A string `Path` to be used as the cache root for [`cacache`](https://npm.im/cacache). - -**NOTE**: Requests will not be cached unless their response bodies are consumed. You will need to use one of the `res.json()`, `res.buffer()`, etc methods on the response, or drain the `res.body` stream, in order for it to be written. - -The default cache manager also adds the following headers to cached responses: - -* `X-Local-Cache`: Path to the cache the content was found in -* `X-Local-Cache-Key`: Unique cache entry key for this response -* `X-Local-Cache-Mode`: Either `stream` or `buffer` to indicate how the response was read from cacache -* `X-Local-Cache-Hash`: Specific integrity hash for the cached entry -* `X-Local-Cache-Status`: One of `miss`, `hit`, `stale`, `revalidated`, `updated`, or `skip` to signal how the response was created -* `X-Local-Cache-Time`: UTCString of the cache insertion time for the entry - -Using [`cacache`](https://npm.im/cacache), a call like this may be used to -manually fetch the cached entry: - -```javascript -const h = response.headers -cacache.get(h.get('x-local-cache'), h.get('x-local-cache-key')) - -// grab content only, directly: -cacache.get.byDigest(h.get('x-local-cache'), h.get('x-local-cache-hash')) -``` - -##### Example - -```javascript -fetch('https://registry.npmjs.org/make-fetch-happen', { - cachePath: './my-local-cache' -}) // -> 200-level response will be written to disk -``` - -A possible (minimal) implementation for `MyCustomRedisCache`: - -```javascript -const bluebird = require('bluebird') -const redis = require("redis") -bluebird.promisifyAll(redis.RedisClient.prototype) -class MyCustomRedisCache { - constructor (opts) { - this.redis = redis.createClient(opts) - } - match (req) { - return this.redis.getAsync(req.url).then(res => { - if (res) { - const parsed = JSON.parse(res) - return new fetch.Response(parsed.body, { - url: req.url, - headers: parsed.headers, - status: 200 - }) - } - }) - } - put (req, res) { - return res.buffer().then(body => { - return this.redis.setAsync(req.url, JSON.stringify({ - body: body, - headers: res.headers.raw() - })) - }).then(() => { - // return the response itself - return res - }) - } - 'delete' (req) { - return this.redis.unlinkAsync(req.url) - } -} -``` - -#### `> opts.cache` - -This option follows the standard `fetch` API cache option. This option will do nothing if [`opts.cachePath`](#opts-cache-path) is null. The following values are accepted (as strings): - -* `default` - Fetch will inspect the HTTP cache on the way to the network. If there is a fresh response it will be used. If there is a stale response a conditional request will be created, and a normal request otherwise. It then updates the HTTP cache with the response. If the revalidation request fails (for example, on a 500 or if you're offline), the stale response will be returned. -* `no-store` - Fetch behaves as if there is no HTTP cache at all. -* `reload` - Fetch behaves as if there is no HTTP cache on the way to the network. Ergo, it creates a normal request and updates the HTTP cache with the response. -* `no-cache` - Fetch creates a conditional request if there is a response in the HTTP cache and a normal request otherwise. It then updates the HTTP cache with the response. -* `force-cache` - Fetch uses any response in the HTTP cache matching the request, not paying attention to staleness. If there was no response, it creates a normal request and updates the HTTP cache with the response. -* `only-if-cached` - Fetch uses any response in the HTTP cache matching the request, not paying attention to staleness. If there was no response, it returns a network error. (Can only be used when request’s mode is "same-origin". Any cached redirects will be followed assuming request’s redirect mode is "follow" and the redirects do not violate request’s mode.) - -(Note: option descriptions are taken from https://fetch.spec.whatwg.org/#http-network-or-cache-fetch) - -##### Example - -```javascript -const fetch = require('make-fetch-happen').defaults({ - cachePath: './my-cache' -}) - -// Will error with ENOTCACHED if we haven't already cached this url -fetch('https://registry.npmjs.org/make-fetch-happen', { - cache: 'only-if-cached' -}) - -// Will refresh any local content and cache the new response -fetch('https://registry.npmjs.org/make-fetch-happen', { - cache: 'reload' -}) - -// Will use any local data, even if stale. Otherwise, will hit network. -fetch('https://registry.npmjs.org/make-fetch-happen', { - cache: 'force-cache' -}) -``` - -#### `> opts.proxy` - -A string or `new url.URL()`-d URI to proxy through. Different Proxy handlers will be -used depending on the proxy's protocol. - -Additionally, `process.env.HTTP_PROXY`, `process.env.HTTPS_PROXY`, and -`process.env.PROXY` are used if present and no `opts.proxy` value is provided. - -(Pending) `process.env.NO_PROXY` may also be configured to skip proxying requests for all, or specific domains. - -##### Example - -```javascript -fetch('https://registry.npmjs.org/make-fetch-happen', { - proxy: 'https://corporate.yourcompany.proxy:4445' -}) - -fetch('https://registry.npmjs.org/make-fetch-happen', { - proxy: { - protocol: 'https:', - hostname: 'corporate.yourcompany.proxy', - port: 4445 - } -}) -``` - -#### `> opts.noProxy` - -If present, should be a comma-separated string or an array of domain extensions -that a proxy should _not_ be used for. - -This option may also be provided through `process.env.NO_PROXY`. - -#### `> opts.ca, opts.cert, opts.key, opts.strictSSL` - -These values are passed in directly to the HTTPS agent and will be used for both -proxied and unproxied outgoing HTTPS requests. They mostly correspond to the -same options the `https` module accepts, which will be themselves passed to -`tls.connect()`. `opts.strictSSL` corresponds to `rejectUnauthorized`. - -#### `> opts.localAddress` - -Passed directly to `http` and `https` request calls. Determines the local -address to bind to. - -#### `> opts.maxSockets` - -Default: 15 - -Maximum number of active concurrent sockets to use for the underlying -Http/Https/Proxy agents. This setting applies once per spawned agent. - -15 is probably a _pretty good value_ for most use-cases, and balances speed -with, uh, not knocking out people's routers. 🤓 - -#### `> opts.retry` - -An object that can be used to tune request retry settings. Retries will only be attempted on the following conditions: - -* Request method is NOT `POST` AND -* Request status is one of: `408`, `420`, `429`, or any status in the 500-range. OR -* Request errored with `ECONNRESET`, `ECONNREFUSED`, `EADDRINUSE`, `ETIMEDOUT`, or the `fetch` error `request-timeout`. - -The following are worth noting as explicitly not retried: - -* `getaddrinfo ENOTFOUND` and will be assumed to be either an unreachable domain or the user will be assumed offline. If a response is cached, it will be returned immediately. - -If `opts.retry` is `false`, it is equivalent to `{retries: 0}` - -If `opts.retry` is a number, it is equivalent to `{retries: num}` - -The following retry options are available if you want more control over it: - -* retries -* factor -* minTimeout -* maxTimeout -* randomize - -For details on what each of these do, refer to the [`retry`](https://npm.im/retry) documentation. - -##### Example - -```javascript -fetch('https://flaky.site.com', { - retry: { - retries: 10, - randomize: true - } -}) - -fetch('http://reliable.site.com', { - retry: false -}) - -fetch('http://one-more.site.com', { - retry: 3 -}) -``` - -#### `> opts.onRetry` - -A function called whenever a retry is attempted. - -##### Example - -```javascript -fetch('https://flaky.site.com', { - onRetry() { - console.log('we will retry!') - } -}) -``` - -#### `> opts.integrity` - -Matches the response body against the given [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) metadata. If verification fails, the request will fail with an `EINTEGRITY` error. - -`integrity` may either be a string or an [`ssri`](https://npm.im/ssri) `Integrity`-like. - -##### Example - -```javascript -fetch('https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-1.0.0.tgz', { - integrity: 'sha1-o47j7zAYnedYFn1dF/fR9OV3z8Q=' -}) // -> ok - -fetch('https://malicious-registry.org/make-fetch-happen/-/make-fetch-happen-1.0.0.tgz', { - integrity: 'sha1-o47j7zAYnedYFn1dF/fR9OV3z8Q=' -}) // Error: EINTEGRITY -``` - -### Message From Our Sponsors - -![](stop.gif) - -![](happening.gif) diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/agent.js b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/agent.js deleted file mode 100644 index 3675dd8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/agent.js +++ /dev/null @@ -1,194 +0,0 @@ -'use strict' -const LRU = require('lru-cache') -const url = require('url') -const isLambda = require('is-lambda') - -const AGENT_CACHE = new LRU({ max: 50 }) -const HttpAgent = require('agentkeepalive') -const HttpsAgent = HttpAgent.HttpsAgent - -module.exports = getAgent - -const getAgentTimeout = timeout => - typeof timeout !== 'number' || !timeout ? 0 : timeout + 1 - -const getMaxSockets = maxSockets => maxSockets || 15 - -function getAgent (uri, opts) { - const parsedUri = new url.URL(typeof uri === 'string' ? uri : uri.url) - const isHttps = parsedUri.protocol === 'https:' - const pxuri = getProxyUri(parsedUri.href, opts) - - // If opts.timeout is zero, set the agentTimeout to zero as well. A timeout - // of zero disables the timeout behavior (OS limits still apply). Else, if - // opts.timeout is a non-zero value, set it to timeout + 1, to ensure that - // the node-fetch-npm timeout will always fire first, giving us more - // consistent errors. - const agentTimeout = getAgentTimeout(opts.timeout) - const agentMaxSockets = getMaxSockets(opts.maxSockets) - - const key = [ - `https:${isHttps}`, - pxuri - ? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}` - : '>no-proxy<', - `local-address:${opts.localAddress || '>no-local-address<'}`, - `strict-ssl:${isHttps ? opts.rejectUnauthorized : '>no-strict-ssl<'}`, - `ca:${(isHttps && opts.ca) || '>no-ca<'}`, - `cert:${(isHttps && opts.cert) || '>no-cert<'}`, - `key:${(isHttps && opts.key) || '>no-key<'}`, - `timeout:${agentTimeout}`, - `maxSockets:${agentMaxSockets}`, - ].join(':') - - if (opts.agent != null) { // `agent: false` has special behavior! - return opts.agent - } - - // keep alive in AWS lambda makes no sense - const lambdaAgent = !isLambda ? null - : isHttps ? require('https').globalAgent - : require('http').globalAgent - - if (isLambda && !pxuri) - return lambdaAgent - - if (AGENT_CACHE.peek(key)) - return AGENT_CACHE.get(key) - - if (pxuri) { - const pxopts = isLambda ? { - ...opts, - agent: lambdaAgent, - } : opts - const proxy = getProxy(pxuri, pxopts, isHttps) - AGENT_CACHE.set(key, proxy) - return proxy - } - - const agent = isHttps ? new HttpsAgent({ - maxSockets: agentMaxSockets, - ca: opts.ca, - cert: opts.cert, - key: opts.key, - localAddress: opts.localAddress, - rejectUnauthorized: opts.rejectUnauthorized, - timeout: agentTimeout, - }) : new HttpAgent({ - maxSockets: agentMaxSockets, - localAddress: opts.localAddress, - timeout: agentTimeout, - }) - AGENT_CACHE.set(key, agent) - return agent -} - -function checkNoProxy (uri, opts) { - const host = new url.URL(uri).hostname.split('.').reverse() - let noproxy = (opts.noProxy || getProcessEnv('no_proxy')) - if (typeof noproxy === 'string') - noproxy = noproxy.split(/\s*,\s*/g) - - return noproxy && noproxy.some(no => { - const noParts = no.split('.').filter(x => x).reverse() - if (!noParts.length) - return false - for (let i = 0; i < noParts.length; i++) { - if (host[i] !== noParts[i]) - return false - } - return true - }) -} - -module.exports.getProcessEnv = getProcessEnv - -function getProcessEnv (env) { - if (!env) - return - - let value - - if (Array.isArray(env)) { - for (const e of env) { - value = process.env[e] || - process.env[e.toUpperCase()] || - process.env[e.toLowerCase()] - if (typeof value !== 'undefined') - break - } - } - - if (typeof env === 'string') { - value = process.env[env] || - process.env[env.toUpperCase()] || - process.env[env.toLowerCase()] - } - - return value -} - -module.exports.getProxyUri = getProxyUri -function getProxyUri (uri, opts) { - const protocol = new url.URL(uri).protocol - - const proxy = opts.proxy || - ( - protocol === 'https:' && - getProcessEnv('https_proxy') - ) || - ( - protocol === 'http:' && - getProcessEnv(['https_proxy', 'http_proxy', 'proxy']) - ) - if (!proxy) - return null - - const parsedProxy = (typeof proxy === 'string') ? new url.URL(proxy) : proxy - - return !checkNoProxy(uri, opts) && parsedProxy -} - -const getAuth = u => - u.username && u.password ? decodeURIComponent(`${u.username}:${u.password}`) - : u.username ? decodeURIComponent(u.username) - : null - -const getPath = u => u.pathname + u.search + u.hash - -const HttpProxyAgent = require('http-proxy-agent') -const HttpsProxyAgent = require('https-proxy-agent') -const SocksProxyAgent = require('socks-proxy-agent') -module.exports.getProxy = getProxy -function getProxy (proxyUrl, opts, isHttps) { - const popts = { - host: proxyUrl.hostname, - port: proxyUrl.port, - protocol: proxyUrl.protocol, - path: getPath(proxyUrl), - auth: getAuth(proxyUrl), - ca: opts.ca, - cert: opts.cert, - key: opts.key, - timeout: getAgentTimeout(opts.timeout), - localAddress: opts.localAddress, - maxSockets: getMaxSockets(opts.maxSockets), - rejectUnauthorized: opts.rejectUnauthorized, - } - - if (proxyUrl.protocol === 'http:' || proxyUrl.protocol === 'https:') { - if (!isHttps) - return new HttpProxyAgent(popts) - else - return new HttpsProxyAgent(popts) - } else if (proxyUrl.protocol.startsWith('socks')) - return new SocksProxyAgent(popts) - else { - throw Object.assign( - new Error(`unsupported proxy protocol: '${proxyUrl.protocol}'`), - { - url: proxyUrl.href, - } - ) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/entry.js b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/entry.js deleted file mode 100644 index a2acea1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/entry.js +++ /dev/null @@ -1,460 +0,0 @@ -const { Request, Response } = require('minipass-fetch') -const Minipass = require('minipass') -const MinipassCollect = require('minipass-collect') -const MinipassFlush = require('minipass-flush') -const MinipassPipeline = require('minipass-pipeline') -const cacache = require('cacache') -const url = require('url') - -const CachePolicy = require('./policy.js') -const cacheKey = require('./key.js') -const remote = require('../remote.js') - -const hasOwnProperty = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) - -// maximum amount of data we will buffer into memory -// if we'll exceed this, we switch to streaming -const MAX_MEM_SIZE = 5 * 1024 * 1024 // 5MB - -// allow list for request headers that will be written to the cache index -// note: we will also store any request headers -// that are named in a response's vary header -const KEEP_REQUEST_HEADERS = [ - 'accept-charset', - 'accept-encoding', - 'accept-language', - 'accept', - 'cache-control', -] - -// allow list for response headers that will be written to the cache index -// note: we must not store the real response's age header, or when we load -// a cache policy based on the metadata it will think the cached response -// is always stale -const KEEP_RESPONSE_HEADERS = [ - 'cache-control', - 'content-encoding', - 'content-language', - 'content-type', - 'date', - 'etag', - 'expires', - 'last-modified', - 'location', - 'pragma', - 'vary', -] - -// return an object containing all metadata to be written to the index -const getMetadata = (request, response, options) => { - const metadata = { - time: Date.now(), - url: request.url, - reqHeaders: {}, - resHeaders: {}, - } - - // only save the status if it's not a 200 or 304 - if (response.status !== 200 && response.status !== 304) - metadata.status = response.status - - for (const name of KEEP_REQUEST_HEADERS) { - if (request.headers.has(name)) - metadata.reqHeaders[name] = request.headers.get(name) - } - - // if the request's host header differs from the host in the url - // we need to keep it, otherwise it's just noise and we ignore it - const host = request.headers.get('host') - const parsedUrl = new url.URL(request.url) - if (host && parsedUrl.host !== host) - metadata.reqHeaders.host = host - - // if the response has a vary header, make sure - // we store the relevant request headers too - if (response.headers.has('vary')) { - const vary = response.headers.get('vary') - // a vary of "*" means every header causes a different response. - // in that scenario, we do not include any additional headers - // as the freshness check will always fail anyway and we don't - // want to bloat the cache indexes - if (vary !== '*') { - // copy any other request headers that will vary the response - const varyHeaders = vary.trim().toLowerCase().split(/\s*,\s*/) - for (const name of varyHeaders) { - // explicitly ignore accept-encoding here - if (name !== 'accept-encoding' && request.headers.has(name)) - metadata.reqHeaders[name] = request.headers.get(name) - } - } - } - - for (const name of KEEP_RESPONSE_HEADERS) { - if (response.headers.has(name)) - metadata.resHeaders[name] = response.headers.get(name) - } - - // we only store accept-encoding and content-encoding if the user - // has disabled automatic compression and decompression in minipass-fetch - // since if it's enabled (the default) then the content will have - // already been decompressed making the header a lie - if (options.compress === false) { - metadata.reqHeaders['accept-encoding'] = request.headers.get('accept-encoding') - metadata.resHeaders['content-encoding'] = response.headers.get('content-encoding') - } - - return metadata -} - -// symbols used to hide objects that may be lazily evaluated in a getter -const _request = Symbol('request') -const _response = Symbol('response') -const _policy = Symbol('policy') - -class CacheEntry { - constructor ({ entry, request, response, options }) { - if (entry) { - this.key = entry.key - this.entry = entry - // previous versions of this module didn't write an explicit timestamp in - // the metadata, so fall back to the entry's timestamp. we can't use the - // entry timestamp to determine staleness because cacache will update it - // when it verifies its data - this.entry.metadata.time = this.entry.metadata.time || this.entry.time - } else - this.key = cacheKey(request) - - this.options = options - - // these properties are behind getters that lazily evaluate - this[_request] = request - this[_response] = response - this[_policy] = null - } - - // returns a CacheEntry instance that satisfies the given request - // or undefined if no existing entry satisfies - static async find (request, options) { - try { - // compacts the index and returns an array of unique entries - var matches = await cacache.index.compact(options.cachePath, cacheKey(request), (A, B) => { - const entryA = new CacheEntry({ entry: A, options }) - const entryB = new CacheEntry({ entry: B, options }) - return entryA.policy.satisfies(entryB.request) - }, { - validateEntry: (entry) => { - // if an integrity is null, it needs to have a status specified - if (entry.integrity === null) - return !!(entry.metadata && entry.metadata.status) - - return true - }, - }) - } catch (err) { - // if the compact request fails, ignore the error and return - return - } - - // a cache mode of 'reload' means to behave as though we have no cache - // on the way to the network. return undefined to allow cacheFetch to - // create a brand new request no matter what. - if (options.cache === 'reload') - return - - // find the specific entry that satisfies the request - let match - for (const entry of matches) { - const _entry = new CacheEntry({ - entry, - options, - }) - - if (_entry.policy.satisfies(request)) { - match = _entry - break - } - } - - return match - } - - // if the user made a PUT/POST/PATCH then we invalidate our - // cache for the same url by deleting the index entirely - static async invalidate (request, options) { - const key = cacheKey(request) - try { - await cacache.rm.entry(options.cachePath, key, { removeFully: true }) - } catch (err) { - // ignore errors - } - } - - get request () { - if (!this[_request]) { - this[_request] = new Request(this.entry.metadata.url, { - method: 'GET', - headers: this.entry.metadata.reqHeaders, - }) - } - - return this[_request] - } - - get response () { - if (!this[_response]) { - this[_response] = new Response(null, { - url: this.entry.metadata.url, - counter: this.options.counter, - status: this.entry.metadata.status || 200, - headers: { - ...this.entry.metadata.resHeaders, - 'content-length': this.entry.size, - }, - }) - } - - return this[_response] - } - - get policy () { - if (!this[_policy]) { - this[_policy] = new CachePolicy({ - entry: this.entry, - request: this.request, - response: this.response, - options: this.options, - }) - } - - return this[_policy] - } - - // wraps the response in a pipeline that stores the data - // in the cache while the user consumes it - async store (status) { - // if we got a status other than 200, 301, or 308, - // or the CachePolicy forbid storage, append the - // cache status header and return it untouched - if (this.request.method !== 'GET' || ![200, 301, 308].includes(this.response.status) || !this.policy.storable()) { - this.response.headers.set('x-local-cache-status', 'skip') - return this.response - } - - const size = this.response.headers.get('content-length') - const fitsInMemory = !!size && Number(size) < MAX_MEM_SIZE - const shouldBuffer = this.options.memoize !== false && fitsInMemory - const cacheOpts = { - algorithms: this.options.algorithms, - metadata: getMetadata(this.request, this.response, this.options), - size, - memoize: fitsInMemory && this.options.memoize, - } - - let body = null - // we only set a body if the status is a 200, redirects are - // stored as metadata only - if (this.response.status === 200) { - let cacheWriteResolve, cacheWriteReject - const cacheWritePromise = new Promise((resolve, reject) => { - cacheWriteResolve = resolve - cacheWriteReject = reject - }) - - body = new MinipassPipeline(new MinipassFlush({ - flush () { - return cacheWritePromise - }, - })) - - let abortStream, onResume - if (shouldBuffer) { - // if the result fits in memory, use a collect stream to gather - // the response and write it to cacache while also passing it through - // to the user - onResume = () => { - const collector = new MinipassCollect.PassThrough() - abortStream = collector - collector.on('collect', (data) => { - // TODO if the cache write fails, log a warning but return the response anyway - cacache.put(this.options.cachePath, this.key, data, cacheOpts).then(cacheWriteResolve, cacheWriteReject) - }) - body.unshift(collector) - body.unshift(this.response.body) - } - } else { - // if it does not fit in memory, create a tee stream and use - // that to pipe to both the cache and the user simultaneously - onResume = () => { - const tee = new Minipass() - const cacheStream = cacache.put.stream(this.options.cachePath, this.key, cacheOpts) - abortStream = cacheStream - tee.pipe(cacheStream) - // TODO if the cache write fails, log a warning but return the response anyway - cacheStream.promise().then(cacheWriteResolve, cacheWriteReject) - body.unshift(tee) - body.unshift(this.response.body) - } - } - - body.once('resume', onResume) - body.once('end', () => body.removeListener('resume', onResume)) - this.response.body.on('error', (err) => { - // the abortStream will either be a MinipassCollect if we buffer - // or a cacache write stream, either way be sure to listen for - // errors from the actual response and avoid writing data that we - // know to be invalid to the cache - abortStream.destroy(err) - }) - } else - await cacache.index.insert(this.options.cachePath, this.key, null, cacheOpts) - - // note: we do not set the x-local-cache-hash header because we do not know - // the hash value until after the write to the cache completes, which doesn't - // happen until after the response has been sent and it's too late to write - // the header anyway - this.response.headers.set('x-local-cache', encodeURIComponent(this.options.cachePath)) - this.response.headers.set('x-local-cache-key', encodeURIComponent(this.key)) - this.response.headers.set('x-local-cache-mode', shouldBuffer ? 'buffer' : 'stream') - this.response.headers.set('x-local-cache-status', status) - this.response.headers.set('x-local-cache-time', new Date().toISOString()) - const newResponse = new Response(body, { - url: this.response.url, - status: this.response.status, - headers: this.response.headers, - counter: this.options.counter, - }) - return newResponse - } - - // use the cached data to create a response and return it - async respond (method, options, status) { - let response - const size = Number(this.response.headers.get('content-length')) - const fitsInMemory = !!size && size < MAX_MEM_SIZE - const shouldBuffer = this.options.memoize !== false && fitsInMemory - if (method === 'HEAD' || [301, 308].includes(this.response.status)) { - // if the request is a HEAD, or the response is a redirect, - // then the metadata in the entry already includes everything - // we need to build a response - response = this.response - } else { - // we're responding with a full cached response, so create a body - // that reads from cacache and attach it to a new Response - const body = new Minipass() - const removeOnResume = () => body.removeListener('resume', onResume) - let onResume - if (shouldBuffer) { - onResume = async () => { - removeOnResume() - try { - const content = await cacache.get.byDigest(this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize }) - body.end(content) - } catch (err) { - if (err.code === 'EINTEGRITY') - await cacache.rm.content(this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize }) - if (err.code === 'ENOENT' || err.code === 'EINTEGRITY') - await CacheEntry.invalidate(this.request, this.options) - body.emit('error', err) - } - } - } else { - onResume = () => { - const cacheStream = cacache.get.stream.byDigest(this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize }) - cacheStream.on('error', async (err) => { - cacheStream.pause() - if (err.code === 'EINTEGRITY') - await cacache.rm.content(this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize }) - if (err.code === 'ENOENT' || err.code === 'EINTEGRITY') - await CacheEntry.invalidate(this.request, this.options) - body.emit('error', err) - cacheStream.resume() - }) - cacheStream.pipe(body) - } - } - - body.once('resume', onResume) - body.once('end', removeOnResume) - response = new Response(body, { - url: this.entry.metadata.url, - counter: options.counter, - status: 200, - headers: { - ...this.policy.responseHeaders(), - }, - }) - } - - response.headers.set('x-local-cache', encodeURIComponent(this.options.cachePath)) - response.headers.set('x-local-cache-hash', encodeURIComponent(this.entry.integrity)) - response.headers.set('x-local-cache-key', encodeURIComponent(this.key)) - response.headers.set('x-local-cache-mode', shouldBuffer ? 'buffer' : 'stream') - response.headers.set('x-local-cache-status', status) - response.headers.set('x-local-cache-time', new Date(this.entry.metadata.time).toUTCString()) - return response - } - - // use the provided request along with this cache entry to - // revalidate the stored response. returns a response, either - // from the cache or from the update - async revalidate (request, options) { - const revalidateRequest = new Request(request, { - headers: this.policy.revalidationHeaders(request), - }) - - try { - // NOTE: be sure to remove the headers property from the - // user supplied options, since we have already defined - // them on the new request object. if they're still in the - // options then those will overwrite the ones from the policy - var response = await remote(revalidateRequest, { - ...options, - headers: undefined, - }) - } catch (err) { - // if the network fetch fails, return the stale - // cached response unless it has a cache-control - // of 'must-revalidate' - if (!this.policy.mustRevalidate) - return this.respond(request.method, options, 'stale') - - throw err - } - - if (this.policy.revalidated(revalidateRequest, response)) { - // we got a 304, write a new index to the cache and respond from cache - const metadata = getMetadata(request, response, options) - // 304 responses do not include headers that are specific to the response data - // since they do not include a body, so we copy values for headers that were - // in the old cache entry to the new one, if the new metadata does not already - // include that header - for (const name of KEEP_RESPONSE_HEADERS) { - if (!hasOwnProperty(metadata.resHeaders, name) && hasOwnProperty(this.entry.metadata.resHeaders, name)) - metadata.resHeaders[name] = this.entry.metadata.resHeaders[name] - } - - try { - await cacache.index.insert(options.cachePath, this.key, this.entry.integrity, { - size: this.entry.size, - metadata, - }) - } catch (err) { - // if updating the cache index fails, we ignore it and - // respond anyway - } - return this.respond(request.method, options, 'revalidated') - } - - // if we got a modified response, create a new entry based on it - const newEntry = new CacheEntry({ - request, - response, - options, - }) - - // respond with the new entry while writing it to the cache - return newEntry.store('updated') - } -} - -module.exports = CacheEntry diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/errors.js b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/errors.js deleted file mode 100644 index 31e97c4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/errors.js +++ /dev/null @@ -1,10 +0,0 @@ -class NotCachedError extends Error { - constructor (url) { - super(`request to ${url} failed: cache mode is 'only-if-cached' but no cached response is available.`) - this.code = 'ENOTCACHED' - } -} - -module.exports = { - NotCachedError, -} diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/index.js b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/index.js deleted file mode 100644 index cca93d9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/index.js +++ /dev/null @@ -1,45 +0,0 @@ -const { NotCachedError } = require('./errors.js') -const CacheEntry = require('./entry.js') -const remote = require('../remote.js') - -// do whatever is necessary to get a Response and return it -const cacheFetch = async (request, options) => { - // try to find a cached entry that satisfies this request - const entry = await CacheEntry.find(request, options) - if (!entry) { - // no cached result, if the cache mode is 'only-if-cached' that's a failure - if (options.cache === 'only-if-cached') - throw new NotCachedError(request.url) - - // otherwise, we make a request, store it and return it - const response = await remote(request, options) - const entry = new CacheEntry({ request, response, options }) - return entry.store('miss') - } - - // we have a cached response that satisfies this request, however if the cache - // mode is 'no-cache' then we send the revalidation request no matter what - if (options.cache === 'no-cache') - return entry.revalidate(request, options) - - // if the cached entry is not stale, or if the cache mode is 'force-cache' or - // 'only-if-cached' we can respond with the cached entry. set the status - // based on the result of needsRevalidation and respond - const _needsRevalidation = entry.policy.needsRevalidation(request) - if (options.cache === 'force-cache' || - options.cache === 'only-if-cached' || - !_needsRevalidation) - return entry.respond(request.method, options, _needsRevalidation ? 'stale' : 'hit') - - // if we got here, the cache entry is stale so revalidate it - return entry.revalidate(request, options) -} - -cacheFetch.invalidate = async (request, options) => { - if (!options.cachePath) - return - - return CacheEntry.invalidate(request, options) -} - -module.exports = cacheFetch diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/key.js b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/key.js deleted file mode 100644 index f7684d5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/key.js +++ /dev/null @@ -1,17 +0,0 @@ -const { URL, format } = require('url') - -// options passed to url.format() when generating a key -const formatOptions = { - auth: false, - fragment: false, - search: true, - unicode: false, -} - -// returns a string to be used as the cache key for the Request -const cacheKey = (request) => { - const parsed = new URL(request.url) - return `make-fetch-happen:request-cache:${format(parsed, formatOptions)}` -} - -module.exports = cacheKey diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/policy.js b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/policy.js deleted file mode 100644 index e0959f6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/cache/policy.js +++ /dev/null @@ -1,161 +0,0 @@ -const CacheSemantics = require('http-cache-semantics') -const Negotiator = require('negotiator') -const ssri = require('ssri') - -// HACK: negotiator lazy loads several of its own modules -// as a micro optimization. we need to be sure that they're -// in memory as soon as possible at startup so that we do -// not try to lazy load them after the directory has been -// retired during a self update of the npm CLI, we do this -// by calling all of the methods that trigger a lazy load -// on a fake instance. -const preloadNegotiator = new Negotiator({ headers: {} }) -preloadNegotiator.charsets() -preloadNegotiator.encodings() -preloadNegotiator.languages() -preloadNegotiator.mediaTypes() - -// options passed to http-cache-semantics constructor -const policyOptions = { - shared: false, - ignoreCargoCult: true, -} - -// a fake empty response, used when only testing the -// request for storability -const emptyResponse = { status: 200, headers: {} } - -// returns a plain object representation of the Request -const requestObject = (request) => { - const _obj = { - method: request.method, - url: request.url, - headers: {}, - } - - request.headers.forEach((value, key) => { - _obj.headers[key] = value - }) - - return _obj -} - -// returns a plain object representation of the Response -const responseObject = (response) => { - const _obj = { - status: response.status, - headers: {}, - } - - response.headers.forEach((value, key) => { - _obj.headers[key] = value - }) - - return _obj -} - -class CachePolicy { - constructor ({ entry, request, response, options }) { - this.entry = entry - this.request = requestObject(request) - this.response = responseObject(response) - this.options = options - this.policy = new CacheSemantics(this.request, this.response, policyOptions) - - if (this.entry) { - // if we have an entry, copy the timestamp to the _responseTime - // this is necessary because the CacheSemantics constructor forces - // the value to Date.now() which means a policy created from a - // cache entry is likely to always identify itself as stale - this.policy._responseTime = this.entry.metadata.time - } - } - - // static method to quickly determine if a request alone is storable - static storable (request, options) { - // no cachePath means no caching - if (!options.cachePath) - return false - - // user explicitly asked not to cache - if (options.cache === 'no-store') - return false - - // we only cache GET and HEAD requests - if (!['GET', 'HEAD'].includes(request.method)) - return false - - // otherwise, let http-cache-semantics make the decision - // based on the request's headers - const policy = new CacheSemantics(requestObject(request), emptyResponse, policyOptions) - return policy.storable() - } - - // returns true if the policy satisfies the request - satisfies (request) { - const _req = requestObject(request) - if (this.request.headers.host !== _req.headers.host) - return false - - const negotiatorA = new Negotiator(this.request) - const negotiatorB = new Negotiator(_req) - - if (JSON.stringify(negotiatorA.mediaTypes()) !== JSON.stringify(negotiatorB.mediaTypes())) - return false - - if (JSON.stringify(negotiatorA.languages()) !== JSON.stringify(negotiatorB.languages())) - return false - - if (JSON.stringify(negotiatorA.encodings()) !== JSON.stringify(negotiatorB.encodings())) - return false - - if (this.options.integrity) - return ssri.parse(this.options.integrity).match(this.entry.integrity) - - return true - } - - // returns true if the request and response allow caching - storable () { - return this.policy.storable() - } - - // NOTE: this is a hack to avoid parsing the cache-control - // header ourselves, it returns true if the response's - // cache-control contains must-revalidate - get mustRevalidate () { - return !!this.policy._rescc['must-revalidate'] - } - - // returns true if the cached response requires revalidation - // for the given request - needsRevalidation (request) { - const _req = requestObject(request) - // force method to GET because we only cache GETs - // but can serve a HEAD from a cached GET - _req.method = 'GET' - return !this.policy.satisfiesWithoutRevalidation(_req) - } - - responseHeaders () { - return this.policy.responseHeaders() - } - - // returns a new object containing the appropriate headers - // to send a revalidation request - revalidationHeaders (request) { - const _req = requestObject(request) - return this.policy.revalidationHeaders(_req) - } - - // returns true if the request/response was revalidated - // successfully. returns false if a new response was received - revalidated (request, response) { - const _req = requestObject(request) - const _res = responseObject(response) - const policy = this.policy.revalidatedPolicy(_req, _res) - return !policy.modified - } -} - -module.exports = CachePolicy diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/fetch.js b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/fetch.js deleted file mode 100644 index dfded79..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/fetch.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict' - -const { FetchError, Request, isRedirect } = require('minipass-fetch') -const url = require('url') - -const CachePolicy = require('./cache/policy.js') -const cache = require('./cache/index.js') -const remote = require('./remote.js') - -// given a Request, a Response and user options -// return true if the response is a redirect that -// can be followed. we throw errors that will result -// in the fetch being rejected if the redirect is -// possible but invalid for some reason -const canFollowRedirect = (request, response, options) => { - if (!isRedirect(response.status)) - return false - - if (options.redirect === 'manual') - return false - - if (options.redirect === 'error') - throw new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect', { code: 'ENOREDIRECT' }) - - if (!response.headers.has('location')) - throw new FetchError(`redirect location header missing for: ${request.url}`, 'no-location', { code: 'EINVALIDREDIRECT' }) - - if (request.counter >= request.follow) - throw new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect', { code: 'EMAXREDIRECT' }) - - return true -} - -// given a Request, a Response, and the user's options return an object -// with a new Request and a new options object that will be used for -// following the redirect -const getRedirect = (request, response, options) => { - const _opts = { ...options } - const location = response.headers.get('location') - const redirectUrl = new url.URL(location, /^https?:/.test(location) ? undefined : request.url) - // Comment below is used under the following license: - // Copyright (c) 2010-2012 Mikeal Rogers - // Licensed under the Apache License, Version 2.0 (the "License"); - // you may not use this file except in compliance with the License. - // You may obtain a copy of the License at - // http://www.apache.org/licenses/LICENSE-2.0 - // Unless required by applicable law or agreed to in writing, - // software distributed under the License is distributed on an "AS - // IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - // express or implied. See the License for the specific language - // governing permissions and limitations under the License. - - // Remove authorization if changing hostnames (but not if just - // changing ports or protocols). This matches the behavior of request: - // https://github.com/request/request/blob/b12a6245/lib/redirect.js#L134-L138 - if (new url.URL(request.url).hostname !== redirectUrl.hostname) - request.headers.delete('authorization') - - // for POST request with 301/302 response, or any request with 303 response, - // use GET when following redirect - if (response.status === 303 || (request.method === 'POST' && [301, 302].includes(response.status))) { - _opts.method = 'GET' - _opts.body = null - request.headers.delete('content-length') - } - - _opts.headers = {} - request.headers.forEach((value, key) => { - _opts.headers[key] = value - }) - - _opts.counter = ++request.counter - const redirectReq = new Request(url.format(redirectUrl), _opts) - return { - request: redirectReq, - options: _opts, - } -} - -const fetch = async (request, options) => { - const response = CachePolicy.storable(request, options) - ? await cache(request, options) - : await remote(request, options) - - // if the request wasn't a GET or HEAD, and the response - // status is between 200 and 399 inclusive, invalidate the - // request url - if (!['GET', 'HEAD'].includes(request.method) && - response.status >= 200 && - response.status <= 399) - await cache.invalidate(request, options) - - if (!canFollowRedirect(request, response, options)) - return response - - const redirect = getRedirect(request, response, options) - return fetch(redirect.request, redirect.options) -} - -module.exports = fetch diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/index.js b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/index.js deleted file mode 100644 index 6028bc0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/index.js +++ /dev/null @@ -1,40 +0,0 @@ -const { FetchError, Headers, Request, Response } = require('minipass-fetch') - -const configureOptions = require('./options.js') -const fetch = require('./fetch.js') - -const makeFetchHappen = (url, opts) => { - const options = configureOptions(opts) - - const request = new Request(url, options) - return fetch(request, options) -} - -makeFetchHappen.defaults = (defaultUrl, defaultOptions = {}) => { - if (typeof defaultUrl === 'object') { - defaultOptions = defaultUrl - defaultUrl = null - } - - const defaultedFetch = (url, options = {}) => { - const finalUrl = url || defaultUrl - const finalOptions = { - ...defaultOptions, - ...options, - headers: { - ...defaultOptions.headers, - ...options.headers, - }, - } - return makeFetchHappen(finalUrl, finalOptions) - } - - defaultedFetch.defaults = makeFetchHappen.defaults - return defaultedFetch -} - -module.exports = makeFetchHappen -module.exports.FetchError = FetchError -module.exports.Headers = Headers -module.exports.Request = Request -module.exports.Response = Response diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/options.js b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/options.js deleted file mode 100644 index f6138e6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/options.js +++ /dev/null @@ -1,44 +0,0 @@ -const conditionalHeaders = [ - 'if-modified-since', - 'if-none-match', - 'if-unmodified-since', - 'if-match', - 'if-range', -] - -const configureOptions = (opts) => { - const {strictSSL, ...options} = { ...opts } - options.method = options.method ? options.method.toUpperCase() : 'GET' - options.rejectUnauthorized = strictSSL !== false - - if (!options.retry) - options.retry = { retries: 0 } - else if (typeof options.retry === 'string') { - const retries = parseInt(options.retry, 10) - if (isFinite(retries)) - options.retry = { retries } - else - options.retry = { retries: 0 } - } else if (typeof options.retry === 'number') - options.retry = { retries: options.retry } - else - options.retry = { retries: 0, ...options.retry } - - options.cache = options.cache || 'default' - if (options.cache === 'default') { - const hasConditionalHeader = Object.keys(options.headers || {}).some((name) => { - return conditionalHeaders.includes(name.toLowerCase()) - }) - if (hasConditionalHeader) - options.cache = 'no-store' - } - - // cacheManager is deprecated, but if it's set and - // cachePath is not we should copy it to the new field - if (options.cacheManager && !options.cachePath) - options.cachePath = options.cacheManager - - return options -} - -module.exports = configureOptions diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/remote.js b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/remote.js deleted file mode 100644 index 7e4ed24..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/lib/remote.js +++ /dev/null @@ -1,102 +0,0 @@ -const Minipass = require('minipass') -const MinipassPipeline = require('minipass-pipeline') -const fetch = require('minipass-fetch') -const promiseRetry = require('promise-retry') -const ssri = require('ssri') - -const getAgent = require('./agent.js') -const pkg = require('../package.json') - -const USER_AGENT = `${pkg.name}/${pkg.version} (+https://npm.im/${pkg.name})` - -const RETRY_ERRORS = [ - 'ECONNRESET', // remote socket closed on us - 'ECONNREFUSED', // remote host refused to open connection - 'EADDRINUSE', // failed to bind to a local port (proxy?) - 'ETIMEDOUT', // someone in the transaction is WAY TOO SLOW - 'ERR_SOCKET_TIMEOUT', // same as above, but this one comes from agentkeepalive - // Known codes we do NOT retry on: - // ENOTFOUND (getaddrinfo failure. Either bad hostname, or offline) -] - -const RETRY_TYPES = [ - 'request-timeout', -] - -// make a request directly to the remote source, -// retrying certain classes of errors as well as -// following redirects (through the cache if necessary) -// and verifying response integrity -const remoteFetch = (request, options) => { - const agent = getAgent(request.url, options) - if (!request.headers.has('connection')) - request.headers.set('connection', agent ? 'keep-alive' : 'close') - - if (!request.headers.has('user-agent')) - request.headers.set('user-agent', USER_AGENT) - - // keep our own options since we're overriding the agent - // and the redirect mode - const _opts = { - ...options, - agent, - redirect: 'manual', - } - - return promiseRetry(async (retryHandler, attemptNum) => { - const req = new fetch.Request(request, _opts) - try { - let res = await fetch(req, _opts) - if (_opts.integrity && res.status === 200) { - // we got a 200 response and the user has specified an expected - // integrity value, so wrap the response in an ssri stream to verify it - const integrityStream = ssri.integrityStream({ integrity: _opts.integrity }) - res = new fetch.Response(new MinipassPipeline(res.body, integrityStream), res) - } - - res.headers.set('x-fetch-attempts', attemptNum) - - // do not retry POST requests, or requests with a streaming body - // do retry requests with a 408, 420, 429 or 500+ status in the response - const isStream = Minipass.isStream(req.body) - const isRetriable = req.method !== 'POST' && - !isStream && - ([408, 420, 429].includes(res.status) || res.status >= 500) - - if (isRetriable) { - if (typeof options.onRetry === 'function') - options.onRetry(res) - - return retryHandler(res) - } - - return res - } catch (err) { - const code = (err.code === 'EPROMISERETRY') - ? err.retried.code - : err.code - - // err.retried will be the thing that was thrown from above - // if it's a response, we just got a bad status code and we - // can re-throw to allow the retry - const isRetryError = err.retried instanceof fetch.Response || - (RETRY_ERRORS.includes(code) && RETRY_TYPES.includes(err.type)) - - if (req.method === 'POST' || isRetryError) - throw err - - if (typeof options.onRetry === 'function') - options.onRetry(err) - - return retryHandler(err) - } - }, options.retry).catch((err) => { - // don't reject for http errors, just return them - if (err.status >= 400 && err.type !== 'system') - return err - - throw err - }) -} - -module.exports = remoteFetch diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/package.json b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/package.json deleted file mode 100644 index dae7b37..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/make-fetch-happen/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "make-fetch-happen", - "version": "9.1.0", - "description": "Opinionated, caching, retrying fetch client", - "main": "lib/index.js", - "files": [ - "lib" - ], - "scripts": { - "preversion": "npm t", - "postversion": "npm publish", - "prepublishOnly": "git push --follow-tags", - "test": "tap", - "posttest": "npm run lint", - "eslint": "eslint", - "lint": "npm run eslint -- lib test", - "lintfix": "npm run lint -- --fix" - }, - "repository": "https://github.com/npm/make-fetch-happen", - "keywords": [ - "http", - "request", - "fetch", - "mean girls", - "caching", - "cache", - "subresource integrity" - ], - "author": { - "name": "Kat Marchán", - "email": "kzm@zkat.tech", - "twitter": "maybekatz" - }, - "license": "ISC", - "dependencies": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - }, - "devDependencies": { - "eslint": "^7.26.0", - "eslint-plugin-import": "^2.23.2", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^5.1.0", - "eslint-plugin-standard": "^5.0.0", - "mkdirp": "^1.0.4", - "nock": "^13.0.11", - "npmlog": "^5.0.0", - "require-inject": "^1.4.2", - "rimraf": "^3.0.2", - "safe-buffer": "^5.2.1", - "standard-version": "^9.3.0", - "tap": "^15.0.9" - }, - "engines": { - "node": ">= 10" - }, - "tap": { - "color": 1, - "files": "test/*.js", - "check-coverage": true - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass deleted file mode 120000 index 7c1951b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass +++ /dev/null @@ -1 +0,0 @@ -../../minipass@3.3.6/node_modules/minipass \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-collect b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-collect deleted file mode 120000 index 29e4c6b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-collect +++ /dev/null @@ -1 +0,0 @@ -../../minipass-collect@1.0.2/node_modules/minipass-collect \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-fetch b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-fetch deleted file mode 120000 index ccb48e1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-fetch +++ /dev/null @@ -1 +0,0 @@ -../../minipass-fetch@1.4.1/node_modules/minipass-fetch \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-flush b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-flush deleted file mode 120000 index 14aeee7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-flush +++ /dev/null @@ -1 +0,0 @@ -../../minipass-flush@1.0.7/node_modules/minipass-flush \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-pipeline b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-pipeline deleted file mode 120000 index acc150d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/minipass-pipeline +++ /dev/null @@ -1 +0,0 @@ -../../minipass-pipeline@1.2.4/node_modules/minipass-pipeline \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/negotiator b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/negotiator deleted file mode 120000 index e54a823..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/negotiator +++ /dev/null @@ -1 +0,0 @@ -../../negotiator@0.6.4/node_modules/negotiator \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/promise-retry b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/promise-retry deleted file mode 120000 index a055418..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/promise-retry +++ /dev/null @@ -1 +0,0 @@ -../../promise-retry@2.0.1/node_modules/promise-retry \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/socks-proxy-agent b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/socks-proxy-agent deleted file mode 120000 index 966a9f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/socks-proxy-agent +++ /dev/null @@ -1 +0,0 @@ -../../socks-proxy-agent@6.2.1/node_modules/socks-proxy-agent \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/ssri b/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/ssri deleted file mode 120000 index f9d9ad2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/make-fetch-happen@9.1.0/node_modules/ssri +++ /dev/null @@ -1 +0,0 @@ -../../ssri@8.0.1/node_modules/ssri \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/index.d.ts b/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/index.d.ts deleted file mode 100644 index 65a51e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {IncomingMessage} from 'http'; - -/** -Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -Makes `toStream` include the properties from `fromStream`. - -@param fromStream - The stream to copy the properties from. -@param toStream - The stream to copy the properties to. -@return The same object as `toStream`. -*/ -declare function mimicResponse( - fromStream: IncomingMessage, // eslint-disable-line @typescript-eslint/prefer-readonly-parameter-types - toStream: T, -): T & IncomingMessage; - -export = mimicResponse; diff --git a/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/index.js b/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/index.js deleted file mode 100644 index 404e111..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/index.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; - -// We define these manually to ensure they're always copied -// even if they would move up the prototype chain -// https://nodejs.org/api/http.html#http_class_http_incomingmessage -const knownProperties = [ - 'aborted', - 'complete', - 'headers', - 'httpVersion', - 'httpVersionMinor', - 'httpVersionMajor', - 'method', - 'rawHeaders', - 'rawTrailers', - 'setTimeout', - 'socket', - 'statusCode', - 'statusMessage', - 'trailers', - 'url' -]; - -module.exports = (fromStream, toStream) => { - if (toStream._readableState.autoDestroy) { - throw new Error('The second stream must have the `autoDestroy` option set to `false`'); - } - - const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties)); - - const properties = {}; - - for (const property of fromProperties) { - // Don't overwrite existing properties. - if (property in toStream) { - continue; - } - - properties[property] = { - get() { - const value = fromStream[property]; - const isFunction = typeof value === 'function'; - - return isFunction ? value.bind(fromStream) : value; - }, - set(value) { - fromStream[property] = value; - }, - enumerable: true, - configurable: false - }; - } - - Object.defineProperties(toStream, properties); - - fromStream.once('aborted', () => { - toStream.destroy(); - - toStream.emit('aborted'); - }); - - fromStream.once('close', () => { - if (fromStream.complete) { - if (toStream.readable) { - toStream.once('end', () => { - toStream.emit('close'); - }); - } else { - toStream.emit('close'); - } - } else { - toStream.emit('close'); - } - }); - - return toStream; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/license b/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/license deleted file mode 100644 index fa7ceba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/package.json b/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/package.json deleted file mode 100644 index d478b0f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "mimic-response", - "version": "3.1.0", - "description": "Mimic a Node.js HTTP response stream", - "license": "MIT", - "repository": "sindresorhus/mimic-response", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.d.ts", - "index.js" - ], - "keywords": [ - "mimic", - "response", - "stream", - "http", - "https", - "request", - "get", - "core" - ], - "devDependencies": { - "@types/node": "^14.0.1", - "ava": "^2.4.0", - "create-test-server": "^2.4.0", - "p-event": "^4.1.0", - "pify": "^5.0.0", - "tsd": "^0.11.0", - "xo": "^0.30.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/readme.md b/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/readme.md deleted file mode 100644 index e968620..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/readme.md +++ /dev/null @@ -1,78 +0,0 @@ -# mimic-response [![Build Status](https://travis-ci.com/sindresorhus/mimic-response.svg?branch=master)](https://travis-ci.com/sindresorhus/mimic-response) - -> Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -## Install - -``` -$ npm install mimic-response -``` - -## Usage - -```js -const stream = require('stream'); -const mimicResponse = require('mimic-response'); - -const responseStream = getHttpResponseStream(); -const myStream = new stream.PassThrough(); - -mimicResponse(responseStream, myStream); - -console.log(myStream.statusCode); -//=> 200 -``` - -## API - -### mimicResponse(from, to) - -**Note #1:** The `from.destroy(error)` function is not proxied. You have to call it manually: - -```js -const stream = require('stream'); -const mimicResponse = require('mimic-response'); - -const responseStream = getHttpResponseStream(); - -const myStream = new stream.PassThrough({ - destroy(error, callback) { - responseStream.destroy(); - - callback(error); - } -}); - -myStream.destroy(); -``` - -Please note that `myStream` and `responseStream` never throws. The error is passed to the request instead. - -#### from - -Type: `Stream` - -[Node.js HTTP response stream.](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -#### to - -Type: `Stream` - -Any stream. - -## Related - -- [mimic-fn](https://github.com/sindresorhus/mimic-fn) - Make a function mimic another one -- [clone-response](https://github.com/lukechilds/clone-response) - Clone a Node.js response stream - ---- - -

- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/brace-expansion b/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/brace-expansion deleted file mode 120000 index d5ff93a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/brace-expansion +++ /dev/null @@ -1 +0,0 @@ -../../brace-expansion@1.1.15/node_modules/brace-expansion \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/LICENSE b/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/README.md b/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/README.md deleted file mode 100644 index 60d8850..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/README.md +++ /dev/null @@ -1,267 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Important Security Consideration! - -> [!WARNING] -> This library uses JavaScript regular expressions. Please read -> the following warning carefully, and be thoughtful about what -> you provide to this library in production systems. - -_Any_ library in JavaScript that deals with matching string -patterns using regular expressions will be subject to -[ReDoS](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS) -if the pattern is generated using untrusted input. - -Efforts have been made to mitigate risk as much as is feasible in -such a library, providing maximum recursion depths and so forth, -but these measures can only ultimately protect against accidents, -not malice. A dedicated attacker can _always_ find patterns that -cannot be defended against by a bash-compatible glob pattern -matching system that uses JavaScript regular expressions. - -To be extremely clear: - -> [!WARNING] -> **If you create a system where you take user input, and use -> that input as the source of a Regular Expression pattern, in -> this or any extant glob matcher in JavaScript, you will be -> pwned.** - -A future version of this library _may_ use a different matching -algorithm which does not exhibit backtracking problems. If and -when that happens, it will likely be a sweeping change, and those -improvements will **not** be backported to legacy versions. - -In the near term, it is not reasonable to continue to play -whack-a-mole with security advisories, and so any future ReDoS -reports will be considered "working as intended", and resolved -entirely by this warning. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instantiating the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself if this option is set. When not set, an empty list -is returned if there are no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - -### partial - -Compare a partial path to a pattern. As long as the parts of the path that -are present are not contradicted by the pattern, it will be treated as a -match. This is useful in applications where you're walking through a -folder structure, and don't yet have the full path, but want to ensure that -you do not walk down paths that can never be a match. - -For example, - -```js -minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d -minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d -minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a -``` - -### allowWindowsEscape - -Windows path separator `\` is by default converted to `/`, which -prohibits the usage of `\` as a escape character. This flag skips that -behavior and allows using the escape character. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/minimatch.js b/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/minimatch.js deleted file mode 100644 index 2e4a058..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,1005 +0,0 @@ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = (function () { try { return require('path') } catch (e) {}}()) || { - sep: '/' -} -minimatch.sep = path.sep - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') - -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - b = b || {} - var t = {} - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return minimatch - } - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - m.Minimatch.defaults = function defaults (options) { - return orig.defaults(ext(def, options)).Minimatch - } - - m.filter = function filter (pattern, options) { - return orig.filter(pattern, ext(def, options)) - } - - m.defaults = function defaults (options) { - return orig.defaults(ext(def, options)) - } - - m.makeRe = function makeRe (pattern, options) { - return orig.makeRe(pattern, ext(def, options)) - } - - m.braceExpand = function braceExpand (pattern, options) { - return orig.braceExpand(pattern, ext(def, options)) - } - - m.match = function (list, pattern, options) { - return orig.match(list, pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - assertValidPattern(pattern) - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - assertValidPattern(pattern) - - if (!options) options = {} - - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (!options.allowWindowsEscape && path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.maxGlobstarRecursion = options.maxGlobstarRecursion !== undefined - ? options.maxGlobstarRecursion : 200 - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - this.partial = !!options.partial - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - assertValidPattern(pattern) - - // Thanks to Yeting Li for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -var MAX_PATTERN_LENGTH = 1024 * 64 -var assertValidPattern = function (pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern') - } - - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long') - } -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - assertValidPattern(pattern) - - var options = this.options - - // shortcuts - if (pattern === '**') { - if (!options.noglobstar) - return GLOBSTAR - else - pattern = '*' - } - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - /* istanbul ignore next */ - case '/': { - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - } - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // coalesce consecutive non-globstar * characters - if (c === '*' && stateChar === '*') continue - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '[': case '.': case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) /* istanbul ignore next - should be impossible */ { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) /* istanbul ignore next - should be impossible */ { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = function match (f, partial) { - if (typeof partial === 'undefined') partial = this.partial - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - if (pattern.indexOf(GLOBSTAR) !== -1) { - return this._matchGlobstar(file, pattern, partial, 0, 0) - } - return this._matchOne(file, pattern, partial, 0, 0) -} - -Minimatch.prototype._matchGlobstar = function (file, pattern, partial, fileIndex, patternIndex) { - var i - - // find first globstar from patternIndex - var firstgs = -1 - for (i = patternIndex; i < pattern.length; i++) { - if (pattern[i] === GLOBSTAR) { firstgs = i; break } - } - - // find last globstar - var lastgs = -1 - for (i = pattern.length - 1; i >= 0; i--) { - if (pattern[i] === GLOBSTAR) { lastgs = i; break } - } - - var head = pattern.slice(patternIndex, firstgs) - var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs) - var tail = partial ? [] : pattern.slice(lastgs + 1) - - // check the head - if (head.length) { - var fileHead = file.slice(fileIndex, fileIndex + head.length) - if (!this._matchOne(fileHead, head, partial, 0, 0)) { - return false - } - fileIndex += head.length - } - - // check the tail - var fileTailMatch = 0 - if (tail.length) { - if (tail.length + fileIndex > file.length) return false - - var tailStart = file.length - tail.length - if (this._matchOne(file, tail, partial, tailStart, 0)) { - fileTailMatch = tail.length - } else { - // affordance for stuff like a/**/* matching a/b/ - if (file[file.length - 1] !== '' || - fileIndex + tail.length === file.length) { - return false - } - tailStart-- - if (!this._matchOne(file, tail, partial, tailStart, 0)) { - return false - } - fileTailMatch = tail.length + 1 - } - } - - // if body is empty (single ** between head and tail) - if (!body.length) { - var sawSome = !!fileTailMatch - for (i = fileIndex; i < file.length - fileTailMatch; i++) { - var f = String(file[i]) - sawSome = true - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - } - return partial || sawSome - } - - // split body into segments at each GLOBSTAR - var bodySegments = [[[], 0]] - var currentBody = bodySegments[0] - var nonGsParts = 0 - var nonGsPartsSums = [0] - for (var bi = 0; bi < body.length; bi++) { - var b = body[bi] - if (b === GLOBSTAR) { - nonGsPartsSums.push(nonGsParts) - currentBody = [[], 0] - bodySegments.push(currentBody) - } else { - currentBody[0].push(b) - nonGsParts++ - } - } - - var idx = bodySegments.length - 1 - var fileLength = file.length - fileTailMatch - for (var si = 0; si < bodySegments.length; si++) { - bodySegments[si][1] = fileLength - - (nonGsPartsSums[idx--] + bodySegments[si][0].length) - } - - return !!this._matchGlobStarBodySections( - file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch - ) -} - -// return false for "nope, not matching" -// return null for "not matching, cannot keep trying" -Minimatch.prototype._matchGlobStarBodySections = function ( - file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail -) { - var bs = bodySegments[bodyIndex] - if (!bs) { - // just make sure there are no bad dots - for (var i = fileIndex; i < file.length; i++) { - sawTail = true - var f = file[i] - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - } - return sawTail - } - - var body = bs[0] - var after = bs[1] - while (fileIndex <= after) { - var m = this._matchOne( - file.slice(0, fileIndex + body.length), - body, - partial, - fileIndex, - 0 - ) - // if limit exceeded, no match. intentional false negative, - // acceptable break in correctness for security. - if (m && globStarDepth < this.maxGlobstarRecursion) { - var sub = this._matchGlobStarBodySections( - file, bodySegments, - fileIndex + body.length, bodyIndex + 1, - partial, globStarDepth + 1, sawTail - ) - if (sub !== false) { - return sub - } - } - var f = file[fileIndex] - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - fileIndex++ - } - return partial || null -} - -Minimatch.prototype._matchOne = function (file, pattern, partial, fileIndex, patternIndex) { - var fi, pi, fl, pl - for ( - fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++ - ) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - /* istanbul ignore if */ - if (p === false || p === GLOBSTAR) return false - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - hit = f === p - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else /* istanbul ignore else */ if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - return (fi === fl - 1) && (file[fi] === '') - } - - // should be unreachable. - /* istanbul ignore next */ - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} diff --git a/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/package.json b/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/package.json deleted file mode 100644 index 563d218..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (http://blog.izs.me)", - "name": "minimatch", - "description": "a glob matcher in javascript", - "version": "3.1.5", - "publishConfig": { - "tag": "legacy-v3" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "main": "minimatch.js", - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "devDependencies": { - "tap": "^15.1.6" - }, - "license": "ISC", - "files": [ - "minimatch.js" - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.eslintrc b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.eslintrc deleted file mode 100644 index bd1a5e0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.eslintrc +++ /dev/null @@ -1,29 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb/eslint-config/node/0.4", - - "rules": { - "array-element-newline": 0, - "complexity": 0, - "func-style": [2, "declaration"], - "max-lines-per-function": 0, - "max-nested-callbacks": 1, - "max-statements-per-line": 1, - "max-statements": 0, - "multiline-comment-style": 0, - "no-continue": 1, - "no-param-reassign": 1, - "no-restricted-syntax": 1, - "object-curly-newline": 0, - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "camelcase": 0, - }, - }, - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.github/FUNDING.yml b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.github/FUNDING.yml deleted file mode 100644 index a936622..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/minimist -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.nycrc b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.nycrc deleted file mode 100644 index 55c3d29..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/.nycrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "example", - "test" - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/CHANGELOG.md deleted file mode 100644 index c9a1e15..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/CHANGELOG.md +++ /dev/null @@ -1,298 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.2.8](https://github.com/minimistjs/minimist/compare/v1.2.7...v1.2.8) - 2023-02-09 - -### Merged - -- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17) -- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12) -- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10) - -### Fixed - -- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] Fix long option followed by single dash [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9) -- [Fix] Fix handling of short option with non-trivial equals [`#5`](https://github.com/minimistjs/minimist/issues/5) -- [Tests] Remove duplicate test [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] opt.string works with multiple aliases [`#9`](https://github.com/minimistjs/minimist/issues/9) - -### Commits - -- Merge tag 'v0.2.3' [`a026794`](https://github.com/minimistjs/minimist/commit/a0267947c7870fc5847cf2d437fbe33f392767da) -- [eslint] fix indentation and whitespace [`5368ca4`](https://github.com/minimistjs/minimist/commit/5368ca4147e974138a54cc0dc4cea8f756546b70) -- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7) -- [eslint] more cleanup [`62fde7d`](https://github.com/minimistjs/minimist/commit/62fde7d935f83417fb046741531a9e2346a36976) -- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1) -- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c) -- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91) -- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4) -- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982) -- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0) -- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07) -- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b) -- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa) -- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e) -- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf) -- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`3124ed3`](https://github.com/minimistjs/minimist/commit/3124ed3e46306301ebb3c834874ce0241555c2c4) -- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6) -- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c) -- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a) -- [actions] Avoid 0.6 tests due to build failures [`ba92fe6`](https://github.com/minimistjs/minimist/commit/ba92fe6ebbdc0431cca9a2ea8f27beb492f5e4ec) -- [Dev Deps] update `tape` [`950eaa7`](https://github.com/minimistjs/minimist/commit/950eaa74f112e04d23e9c606c67472c46739b473) -- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b) -- Merge tag 'v0.2.2' [`980d7ac`](https://github.com/minimistjs/minimist/commit/980d7ac61a0b4bd552711251ac107d506b23e41f) - -## [v1.2.7](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.7) - 2022-10-10 - -### Commits - -- [meta] add `auto-changelog` [`0ebf4eb`](https://github.com/minimistjs/minimist/commit/0ebf4ebcd5f7787a5524d31a849ef41316b83c3c) -- [actions] add reusable workflows [`e115b63`](https://github.com/minimistjs/minimist/commit/e115b63fa9d3909f33b00a2db647ff79068388de) -- [eslint] add eslint; rules to enable later are warnings [`f58745b`](https://github.com/minimistjs/minimist/commit/f58745b9bb84348e1be72af7dbba5840c7c13013) -- [Dev Deps] switch from `covert` to `nyc` [`ab03356`](https://github.com/minimistjs/minimist/commit/ab033567b9c8b31117cb026dc7f1e592ce455c65) -- [readme] rename and add badges [`236f4a0`](https://github.com/minimistjs/minimist/commit/236f4a07e4ebe5ee44f1496ec6974991ab293ffd) -- [meta] create FUNDING.yml; add `funding` in package.json [`783a49b`](https://github.com/minimistjs/minimist/commit/783a49bfd47e8335d3098a8cac75662cf71eb32a) -- [meta] use `npmignore` to autogenerate an npmignore file [`f81ece6`](https://github.com/minimistjs/minimist/commit/f81ece6aaec2fa14e69ff4f1e0407a8c4e2635a2) -- Only apps should have lockfiles [`56cad44`](https://github.com/minimistjs/minimist/commit/56cad44c7f879b9bb5ec18fcc349308024a89bfc) -- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`49c5f9f`](https://github.com/minimistjs/minimist/commit/49c5f9fb7e6a92db9eb340cc679de92fb3aacded) -- [Tests] add `aud` in `posttest` [`228ae93`](https://github.com/minimistjs/minimist/commit/228ae938f3cd9db9dfd8bd7458b076a7b2aef280) -- [meta] add `safe-publish-latest` [`01fc23f`](https://github.com/minimistjs/minimist/commit/01fc23f5104f85c75059972e01dd33796ab529ff) -- [meta] update repo URLs [`6b164c7`](https://github.com/minimistjs/minimist/commit/6b164c7d68e0b6bf32f894699effdfb7c63041dd) - -## [v1.2.6](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.6) - 2022-03-21 - -### Commits - -- test from prototype pollution PR [`bc8ecee`](https://github.com/minimistjs/minimist/commit/bc8ecee43875261f4f17eb20b1243d3ed15e70eb) -- isConstructorOrProto adapted from PR [`c2b9819`](https://github.com/minimistjs/minimist/commit/c2b981977fa834b223b408cfb860f933c9811e4d) -- security notice for additional prototype pollution issue [`ef88b93`](https://github.com/minimistjs/minimist/commit/ef88b9325f77b5ee643ccfc97e2ebda577e4c4e2) - -## [v1.2.5](https://github.com/minimistjs/minimist/compare/v1.2.4...v1.2.5) - 2020-03-12 - -## [v1.2.4](https://github.com/minimistjs/minimist/compare/v1.2.3...v1.2.4) - 2020-03-11 - -### Commits - -- security notice [`4cf1354`](https://github.com/minimistjs/minimist/commit/4cf1354839cb972e38496d35e12f806eea92c11f) -- additional test for constructor prototype pollution [`1043d21`](https://github.com/minimistjs/minimist/commit/1043d212c3caaf871966e710f52cfdf02f9eea4b) - -## [v1.2.3](https://github.com/minimistjs/minimist/compare/v1.2.2...v1.2.3) - 2020-03-10 - -### Commits - -- more failing proto pollution tests [`13c01a5`](https://github.com/minimistjs/minimist/commit/13c01a5327736903704984b7f65616b8476850cc) -- even more aggressive checks for protocol pollution [`38a4d1c`](https://github.com/minimistjs/minimist/commit/38a4d1caead72ef99e824bb420a2528eec03d9ab) - -## [v1.2.2](https://github.com/minimistjs/minimist/compare/v1.2.1...v1.2.2) - 2020-03-10 - -### Commits - -- failing test for protocol pollution [`0efed03`](https://github.com/minimistjs/minimist/commit/0efed0340ec8433638758f7ca0c77cb20a0bfbab) -- cleanup [`67d3722`](https://github.com/minimistjs/minimist/commit/67d3722413448d00a62963d2d30c34656a92d7e2) -- console.dir -> console.log [`47acf72`](https://github.com/minimistjs/minimist/commit/47acf72c715a630bf9ea013867f47f1dd69dfc54) -- don't assign onto __proto__ [`63e7ed0`](https://github.com/minimistjs/minimist/commit/63e7ed05aa4b1889ec2f3b196426db4500cbda94) - -## [v1.2.1](https://github.com/minimistjs/minimist/compare/v1.2.0...v1.2.1) - 2020-03-10 - -### Merged - -- move the `opts['--']` example back where it belongs [`#63`](https://github.com/minimistjs/minimist/pull/63) - -### Commits - -- add test [`6be5dae`](https://github.com/minimistjs/minimist/commit/6be5dae35a32a987bcf4137fcd6c19c5200ee909) -- fix bad boolean regexp [`ac3fc79`](https://github.com/minimistjs/minimist/commit/ac3fc796e63b95128fdbdf67ea7fad71bd59aa76) - -## [v1.2.0](https://github.com/minimistjs/minimist/compare/v1.1.3...v1.2.0) - 2015-08-24 - -### Commits - -- failing -k=v short test [`63416b8`](https://github.com/minimistjs/minimist/commit/63416b8cd1d0d70e4714564cce465a36e4dd26d7) -- kv short fix [`6bbe145`](https://github.com/minimistjs/minimist/commit/6bbe14529166245e86424f220a2321442fe88dc3) -- failing kv short test [`f72ab7f`](https://github.com/minimistjs/minimist/commit/f72ab7f4572adc52902c9b6873cc969192f01b10) -- fixed kv test [`f5a48c3`](https://github.com/minimistjs/minimist/commit/f5a48c3e50e40ca54f00c8e84de4b4d6e9897fa8) -- enforce space between arg key and value [`86b321a`](https://github.com/minimistjs/minimist/commit/86b321affe648a8e016c095a4f0efa9d9074f502) - -## [v1.1.3](https://github.com/minimistjs/minimist/compare/v1.1.2...v1.1.3) - 2015-08-06 - -### Commits - -- add failing test - boolean alias array [`0fa3c5b`](https://github.com/minimistjs/minimist/commit/0fa3c5b3dd98551ddecf5392831b4c21211743fc) -- fix boolean values with multiple aliases [`9c0a6e7`](https://github.com/minimistjs/minimist/commit/9c0a6e7de25a273b11bbf9a7464f0bd833779795) - -## [v1.1.2](https://github.com/minimistjs/minimist/compare/v1.1.1...v1.1.2) - 2015-07-22 - -### Commits - -- Convert boolean arguments to boolean values [`8f3dc27`](https://github.com/minimistjs/minimist/commit/8f3dc27cf833f1d54671b6d0bcb55c2fe19672a9) -- use non-ancient npm, node 0.12 and iojs [`61ed1d0`](https://github.com/minimistjs/minimist/commit/61ed1d034b9ec7282764ce76f3992b1a0b4906ae) -- an older npm for 0.8 [`25cf778`](https://github.com/minimistjs/minimist/commit/25cf778b1220e7838a526832ad6972f75244054f) - -## [v1.1.1](https://github.com/minimistjs/minimist/compare/v1.1.0...v1.1.1) - 2015-03-10 - -### Commits - -- check that they type of a value is a boolean, not just that it is currently set to a boolean [`6863198`](https://github.com/minimistjs/minimist/commit/6863198e36139830ff1f20ffdceaddd93f2c1db9) -- upgrade tape, fix type issues from old tape version [`806712d`](https://github.com/minimistjs/minimist/commit/806712df91604ed02b8e39aa372b84aea659ee34) -- test for setting a boolean to a null default [`8c444fe`](https://github.com/minimistjs/minimist/commit/8c444fe89384ded7d441c120915ea60620b01dd3) -- if the previous value was a boolean, without an default (or with an alias) don't make an array either [`e5f419a`](https://github.com/minimistjs/minimist/commit/e5f419a3b5b3bc3f9e5ac71b7040621af70ed2dd) - -## [v1.1.0](https://github.com/minimistjs/minimist/compare/v1.0.0...v1.1.0) - 2014-08-10 - -### Commits - -- add support for handling "unknown" options not registered with the parser. [`6f3cc5d`](https://github.com/minimistjs/minimist/commit/6f3cc5d4e84524932a6ef2ce3592acc67cdd4383) -- reformat package.json [`02ed371`](https://github.com/minimistjs/minimist/commit/02ed37115194d3697ff358e8e25e5e66bab1d9f8) -- coverage script [`e5531ba`](https://github.com/minimistjs/minimist/commit/e5531ba0479da3b8138d3d8cac545d84ccb1c8df) -- extra fn to get 100% coverage again [`a6972da`](https://github.com/minimistjs/minimist/commit/a6972da89e56bf77642f8ec05a13b6558db93498) - -## [v1.0.0](https://github.com/minimistjs/minimist/compare/v0.2.3...v1.0.0) - 2014-08-10 - -### Commits - -- added stopEarly option [`471c7e4`](https://github.com/minimistjs/minimist/commit/471c7e4a7e910fc7ad8f9df850a186daf32c64e9) -- fix list [`fef6ae7`](https://github.com/minimistjs/minimist/commit/fef6ae79c38b9dc1c49569abb7cd04eb965eac5e) - -## [v0.2.3](https://github.com/minimistjs/minimist/compare/v0.2.2...v0.2.3) - 2023-02-09 - -### Merged - -- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17) -- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12) -- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10) - -### Fixed - -- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9) - -### Commits - -- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7) -- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1) -- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982) -- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79) -- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b) - -## [v0.2.2](https://github.com/minimistjs/minimist/compare/v0.2.1...v0.2.2) - 2022-10-10 - -### Commits - -- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c) -- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91) -- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4) -- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0) -- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07) -- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b) -- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa) -- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e) -- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf) -- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6) -- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c) -- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a) - -## [v0.2.1](https://github.com/minimistjs/minimist/compare/v0.2.0...v0.2.1) - 2020-03-12 - -## [v0.2.0](https://github.com/minimistjs/minimist/compare/v0.1.0...v0.2.0) - 2014-06-19 - -### Commits - -- support all-boolean mode [`450a97f`](https://github.com/minimistjs/minimist/commit/450a97f6e2bc85c7a4a13185c19a818d9a5ebe69) - -## [v0.1.0](https://github.com/minimistjs/minimist/compare/v0.0.10...v0.1.0) - 2014-05-12 - -### Commits - -- Provide a mechanism to segregate -- arguments [`ce4a1e6`](https://github.com/minimistjs/minimist/commit/ce4a1e63a7e8d5ab88d2a3768adefa6af98a445a) -- documented argv['--'] [`14db0e6`](https://github.com/minimistjs/minimist/commit/14db0e6dbc6d2b9e472adaa54dad7004b364634f) -- Adding a test-case for notFlags segregation [`715c1e3`](https://github.com/minimistjs/minimist/commit/715c1e3714be223f998f6c537af6b505f0236c16) - -## [v0.0.10](https://github.com/minimistjs/minimist/compare/v0.0.9...v0.0.10) - 2014-05-11 - -### Commits - -- dedicated boolean test [`46e448f`](https://github.com/minimistjs/minimist/commit/46e448f9f513cfeb2bcc8b688b9b47ba1e515c2b) -- dedicated num test [`9bf2d36`](https://github.com/minimistjs/minimist/commit/9bf2d36f1d3b8795be90b8f7de0a937f098aa394) -- aliased values treated as strings [`1ab743b`](https://github.com/minimistjs/minimist/commit/1ab743bad4484d69f1259bed42f9531de01119de) -- cover the case of already numbers, at 100% coverage [`b2bb044`](https://github.com/minimistjs/minimist/commit/b2bb04436599d77a2ce029e8e555e25b3aa55d13) -- another test for higher coverage [`3662624`](https://github.com/minimistjs/minimist/commit/3662624be976d5489d486a856849c048d13be903) - -## [v0.0.9](https://github.com/minimistjs/minimist/compare/v0.0.8...v0.0.9) - 2014-05-08 - -### Commits - -- Eliminate `longest` fn. [`824f642`](https://github.com/minimistjs/minimist/commit/824f642038d1b02ede68b6261d1d65163390929a) - -## [v0.0.8](https://github.com/minimistjs/minimist/compare/v0.0.7...v0.0.8) - 2014-02-20 - -### Commits - -- return '' if flag is string and empty [`fa63ed4`](https://github.com/minimistjs/minimist/commit/fa63ed4651a4ef4eefddce34188e0d98d745a263) -- handle joined single letters [`66c248f`](https://github.com/minimistjs/minimist/commit/66c248f0241d4d421d193b022e9e365f11178534) - -## [v0.0.7](https://github.com/minimistjs/minimist/compare/v0.0.6...v0.0.7) - 2014-02-08 - -### Commits - -- another swap of .test for .match [`d1da408`](https://github.com/minimistjs/minimist/commit/d1da40819acbe846d89a5c02721211e3c1260dde) - -## [v0.0.6](https://github.com/minimistjs/minimist/compare/v0.0.5...v0.0.6) - 2014-02-08 - -### Commits - -- use .test() instead of .match() to not crash on non-string values in the arguments array [`7e0d1ad`](https://github.com/minimistjs/minimist/commit/7e0d1add8c9e5b9b20a4d3d0f9a94d824c578da1) - -## [v0.0.5](https://github.com/minimistjs/minimist/compare/v0.0.4...v0.0.5) - 2013-09-18 - -### Commits - -- Improve '--' handling. [`b11822c`](https://github.com/minimistjs/minimist/commit/b11822c09cc9d2460f30384d12afc0b953c037a4) - -## [v0.0.4](https://github.com/minimistjs/minimist/compare/v0.0.3...v0.0.4) - 2013-09-17 - -## [v0.0.3](https://github.com/minimistjs/minimist/compare/v0.0.2...v0.0.3) - 2013-09-12 - -### Commits - -- failing test for single dash preceeding a double dash [`b465514`](https://github.com/minimistjs/minimist/commit/b465514b82c9ae28972d714facd951deb2ad762b) -- fix for the dot test [`6a095f1`](https://github.com/minimistjs/minimist/commit/6a095f1d364c8fab2d6753d2291a0649315d297a) - -## [v0.0.2](https://github.com/minimistjs/minimist/compare/v0.0.1...v0.0.2) - 2013-08-28 - -### Commits - -- allow dotted aliases & defaults [`321c33e`](https://github.com/minimistjs/minimist/commit/321c33e755485faaeb44eeb1c05d33b2e0a5a7c4) -- use a better version of ff [`e40f611`](https://github.com/minimistjs/minimist/commit/e40f61114cf7be6f7947f7b3eed345853a67dbbb) - -## [v0.0.1](https://github.com/minimistjs/minimist/compare/v0.0.0...v0.0.1) - 2013-06-25 - -### Commits - -- remove trailing commas [`6ff0fa0`](https://github.com/minimistjs/minimist/commit/6ff0fa055064f15dbe06d50b89d5173a6796e1db) - -## v0.0.0 - 2013-06-25 - -### Commits - -- half of the parse test ported [`3079326`](https://github.com/minimistjs/minimist/commit/307932601325087de6cf94188eb798ffc4f3088a) -- stripped down code and a passing test from optimist [`7cced88`](https://github.com/minimistjs/minimist/commit/7cced88d82e399d1a03ed23eb667f04d3f320d10) -- ported parse tests completely over [`9448754`](https://github.com/minimistjs/minimist/commit/944875452e0820df6830b1408c26a0f7d3e1db04) -- docs, package.json [`a5bf46a`](https://github.com/minimistjs/minimist/commit/a5bf46ac9bb3bd114a9c340276c62c1091e538d5) -- move more short tests into short.js [`503edb5`](https://github.com/minimistjs/minimist/commit/503edb5c41d89c0d40831ee517154fc13b0f18b9) -- default bool test was wrong, not the code [`1b9f5db`](https://github.com/minimistjs/minimist/commit/1b9f5db4741b49962846081b68518de824992097) -- passing long tests ripped out of parse.js [`7972c4a`](https://github.com/minimistjs/minimist/commit/7972c4aff1f4803079e1668006658e2a761a0428) -- badges [`84c0370`](https://github.com/minimistjs/minimist/commit/84c037063664d42878aace715fe6572ce01b6f3b) -- all the tests now ported, some failures [`64239ed`](https://github.com/minimistjs/minimist/commit/64239edfe92c711c4eb0da254fcdfad2a5fdb605) -- failing short test [`f8a5341`](https://github.com/minimistjs/minimist/commit/f8a534112dd1138d2fad722def56a848480c446f) -- fixed the numeric test [`6b034f3`](https://github.com/minimistjs/minimist/commit/6b034f37c79342c60083ed97fd222e16928aac51) diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/LICENSE b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/README.md b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/README.md deleted file mode 100644 index 74da323..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# minimist [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.log(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ - _: ['foo', 'bar', 'baz'], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' -} -``` - -# security - -Previous versions had a prototype pollution bug that could cause privilege -escalation in some circumstances when handling untrusted user input. - -Please use version 1.2.6 or later: - -* https://security.snyk.io/vuln/SNYK-JS-MINIMIST-2429795 (version <=1.2.5) -* https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 (version <=1.2.3) - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a boolean, string or array of strings to always treat as -booleans. if `true` will treat all double hyphenated arguments without equal signs -as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values -* `opts.stopEarly` - when true, populate `argv._` with everything after the -first non-option -* `opts['--']` - when true, populate `argv._` with everything before the `--` -and `argv['--']` with everything after the `--`. Here's an example: - - ``` - > require('./')('one two three -- four five --six'.split(' '), { '--': true }) - { - _: ['one', 'two', 'three'], - '--': ['four', 'five', '--six'] - } - ``` - - Note that with `opts['--']` set, parsing for arguments still stops after the - `--`. - -* `opts.unknown` - a function which is invoked with a command line parameter not -defined in the `opts` configuration object. If the function returns `false`, the -unknown option is not added to `argv`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT - -[package-url]: https://npmjs.org/package/minimist -[npm-version-svg]: https://versionbadg.es/minimistjs/minimist.svg -[npm-badge-png]: https://nodei.co/npm/minimist.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/minimist.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/minimist.svg -[downloads-url]: https://npm-stat.com/charts.html?package=minimist -[codecov-image]: https://codecov.io/gh/minimistjs/minimist/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/minimistjs/minimist/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/minimistjs/minimist -[actions-url]: https://github.com/minimistjs/minimist/actions diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/example/parse.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/example/parse.js deleted file mode 100644 index 9d90ffb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -var argv = require('../')(process.argv.slice(2)); -console.log(argv); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js deleted file mode 100644 index f020f39..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js +++ /dev/null @@ -1,263 +0,0 @@ -'use strict'; - -function hasKey(obj, keys) { - var o = obj; - keys.slice(0, -1).forEach(function (key) { - o = o[key] || {}; - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function isNumber(x) { - if (typeof x === 'number') { return true; } - if ((/^0x[0-9a-f]+$/i).test(x)) { return true; } - return (/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/).test(x); -} - -function isConstructorOrProto(obj, key) { - return (key === 'constructor' && typeof obj[key] === 'function') || key === '__proto__'; -} - -module.exports = function (args, opts) { - if (!opts) { opts = {}; } - - var flags = { - bools: {}, - strings: {}, - unknownFn: null, - }; - - if (typeof opts.unknown === 'function') { - flags.unknownFn = opts.unknown; - } - - if (typeof opts.boolean === 'boolean' && opts.boolean) { - flags.allBools = true; - } else { - [].concat(opts.boolean).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - } - - var aliases = {}; - - function aliasIsBoolean(key) { - return aliases[key].some(function (x) { - return flags.bools[x]; - }); - } - - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - [].concat(aliases[key]).forEach(function (k) { - flags.strings[k] = true; - }); - } - }); - - var defaults = opts.default || {}; - - var argv = { _: [] }; - - function argDefined(key, arg) { - return (flags.allBools && (/^--[^=]+$/).test(arg)) - || flags.strings[key] - || flags.bools[key] - || aliases[key]; - } - - function setKey(obj, keys, value) { - var o = obj; - for (var i = 0; i < keys.length - 1; i++) { - var key = keys[i]; - if (isConstructorOrProto(o, key)) { return; } - if (o[key] === undefined) { o[key] = {}; } - if ( - o[key] === Object.prototype - || o[key] === Number.prototype - || o[key] === String.prototype - ) { - o[key] = {}; - } - if (o[key] === Array.prototype) { o[key] = []; } - o = o[key]; - } - - var lastKey = keys[keys.length - 1]; - if (isConstructorOrProto(o, lastKey)) { return; } - if ( - o === Object.prototype - || o === Number.prototype - || o === String.prototype - ) { - o = {}; - } - if (o === Array.prototype) { o = []; } - if (o[lastKey] === undefined || flags.bools[lastKey] || typeof o[lastKey] === 'boolean') { - o[lastKey] = value; - } else if (Array.isArray(o[lastKey])) { - o[lastKey].push(value); - } else { - o[lastKey] = [o[lastKey], value]; - } - } - - function setArg(key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) { return; } - } - - var value = !flags.strings[key] && isNumber(val) - ? Number(val) - : val; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--') + 1); - args = args.slice(0, args.indexOf('--')); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - var key; - var next; - - if ((/^--.+=/).test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - key = m[1]; - var value = m[2]; - if (flags.bools[key]) { - value = value !== 'false'; - } - setArg(key, value, arg); - } else if ((/^--no-.+/).test(arg)) { - key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); - } else if ((/^--.+/).test(arg)) { - key = arg.match(/^--(.+)/)[1]; - next = args[i + 1]; - if ( - next !== undefined - && !(/^(-|--)[^-]/).test(next) - && !flags.bools[key] - && !flags.allBools - && (aliases[key] ? !aliasIsBoolean(key) : true) - ) { - setArg(key, next, arg); - i += 1; - } else if ((/^(true|false)$/).test(next)) { - setArg(key, next === 'true', arg); - i += 1; - } else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } else if ((/^-[^-]+/).test(arg)) { - var letters = arg.slice(1, -1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - - if (next === '-') { - setArg(letters[j], next, arg); - continue; - } - - if ((/[A-Za-z]/).test(letters[j]) && next[0] === '=') { - setArg(letters[j], next.slice(1), arg); - broken = true; - break; - } - - if ( - (/[A-Za-z]/).test(letters[j]) - && (/-?\d+(\.\d*)?(e-?\d+)?$/).test(next) - ) { - setArg(letters[j], next, arg); - broken = true; - break; - } - - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], arg.slice(j + 2), arg); - broken = true; - break; - } else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); - } - } - - key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if ( - args[i + 1] - && !(/^(-|--)[^-]/).test(args[i + 1]) - && !flags.bools[key] - && (aliases[key] ? !aliasIsBoolean(key) : true) - ) { - setArg(key, args[i + 1], arg); - i += 1; - } else if (args[i + 1] && (/^(true|false)$/).test(args[i + 1])) { - setArg(key, args[i + 1] === 'true', arg); - i += 1; - } else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - } else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg)); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } - } - } - - Object.keys(defaults).forEach(function (k) { - if (!hasKey(argv, k.split('.'))) { - setKey(argv, k.split('.'), defaults[k]); - - (aliases[k] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[k]); - }); - } - }); - - if (opts['--']) { - argv['--'] = notFlags.slice(); - } else { - notFlags.forEach(function (k) { - argv._.push(k); - }); - } - - return argv; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/package.json b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/package.json deleted file mode 100644 index c10a334..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "minimist", - "version": "1.2.8", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "@ljharb/eslint-config": "^21.0.1", - "aud": "^2.0.2", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.6.3" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=auto", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "lint": "eslint --ext=js,mjs .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/minimistjs/minimist.git" - }, - "homepage": "https://github.com/minimistjs/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/all_bool.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/all_bool.js deleted file mode 100644 index befa0c9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/all_bool.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('flag boolean true (default all --args to boolean)', function (t) { - var argv = parse(['moo', '--honk', 'cow'], { - boolean: true, - }); - - t.deepEqual(argv, { - honk: true, - _: ['moo', 'cow'], - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); - -test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { - var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { - boolean: true, - }); - - t.deepEqual(argv, { - honk: true, - tacos: 'good', - p: 55, - _: ['moo', 'cow'], - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/bool.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/bool.js deleted file mode 100644 index e58d47e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/bool.js +++ /dev/null @@ -1,177 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false }, - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'], - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse(['-x', '-z', 'one', 'two', 'three'], { - boolean: ['x', 'y', 'z'], - }); - - t.deepEqual(argv, { - x: true, - y: false, - z: true, - _: ['one', 'two', 'three'], - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); -test('boolean and alias with chainable api', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' }, - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' }, - }); - var expected = { - herp: true, - h: true, - _: ['derp'], - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var opts = { - alias: { h: 'herp' }, - boolean: 'herp', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - _: ['derp'], - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias array with options hash', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var alt = ['--harp', 'derp']; - var opts = { - alias: { h: ['herp', 'harp'] }, - boolean: 'h', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var altPropertyArgv = parse(alt, opts); - var expected = { - harp: true, - herp: true, - h: true, - _: ['derp'], - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.same(altPropertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = ['-h', 'true']; - var regular = ['--herp', 'true']; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - _: [], - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function (t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool', - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool', - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); - -test('boolean --boool=true', function (t) { - var parsed = parse(['--boool=true'], { - default: { - boool: false, - }, - boolean: ['boool'], - }); - - t.same(parsed.boool, true); - t.end(); -}); - -test('boolean --boool=false', function (t) { - var parsed = parse(['--boool=false'], { - default: { - boool: true, - }, - boolean: ['boool'], - }); - - t.same(parsed.boool, false); - t.end(); -}); - -test('boolean using something similar to true', function (t) { - var opts = { boolean: 'h' }; - var result = parse(['-h', 'true.txt'], opts); - var expected = { - h: true, - _: ['true.txt'], - }; - - t.same(result, expected); - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/dash.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/dash.js deleted file mode 100644 index 7078817..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(6); - t.deepEqual(parse(['-n', '-']), { n: '-', _: [] }); - t.deepEqual(parse(['--nnn', '-']), { nnn: '-', _: [] }); - t.deepEqual(parse(['-']), { _: ['-'] }); - t.deepEqual(parse(['-f-']), { f: '-', _: [] }); - t.deepEqual( - parse(['-b', '-'], { boolean: 'b' }), - { b: true, _: ['-'] } - ); - t.deepEqual( - parse(['-s', '-'], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(2); - t.deepEqual(parse(['-a', '--', 'b']), { a: true, _: ['b'] }); - t.deepEqual(parse(['--a', '--', 'b']), { a: true, _: ['b'] }); -}); - -test('move arguments after the -- into their own `--` array', function (t) { - t.plan(1); - t.deepEqual( - parse(['--name', 'John', 'before', '--', 'after'], { '--': true }), - { name: 'John', _: ['before'], '--': ['after'] } - ); -}); - -test('--- option value', function (t) { - // A multi-dash value is largely an edge case, but check the behaviour is as expected, - // and in particular the same for short option and long option (as made consistent in Jan 2023). - t.plan(2); - t.deepEqual(parse(['-n', '---']), { n: '---', _: [] }); - t.deepEqual(parse(['--nnn', '---']), { nnn: '---', _: [] }); -}); - diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/default_bool.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/default_bool.js deleted file mode 100644 index 4e9f625..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true }, - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false }, - }); - t.equal(argv.somefalse, false); - t.end(); -}); - -test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null }, - }); - t.equal(argv.maybe, null); - - var argvLong = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null }, - }); - t.equal(argvLong.maybe, true); - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/dotted.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/dotted.js deleted file mode 100644 index 126ff03..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } }); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } }); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); - -test('dotted default with no alias', function (t) { - var argv = parse('', { default: { 'a.b': 11 } }); - t.equal(argv.a.b, 11); - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/kv_short.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/kv_short.js deleted file mode 100644 index 6d1b53a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/kv_short.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('short -k=v', function (t) { - t.plan(1); - - var argv = parse(['-b=123']); - t.deepEqual(argv, { b: 123, _: [] }); -}); - -test('multi short -k=v', function (t) { - t.plan(1); - - var argv = parse(['-a=whatever', '-b=robots']); - t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); -}); - -test('short with embedded equals -k=a=b', function (t) { - t.plan(1); - - var argv = parse(['-k=a=b']); - t.deepEqual(argv, { k: 'a=b', _: [] }); -}); - -test('short with later equals like -ab=c', function (t) { - t.plan(1); - - var argv = parse(['-ab=c']); - t.deepEqual(argv, { a: true, b: 'c', _: [] }); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/long.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/long.js deleted file mode 100644 index 9fef51f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/long.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse(['--bool']), - { bool: true, _: [] }, - 'long boolean' - ); - t.deepEqual( - parse(['--pow', 'xixxle']), - { pow: 'xixxle', _: [] }, - 'long capture sp' - ); - t.deepEqual( - parse(['--pow=xixxle']), - { pow: 'xixxle', _: [] }, - 'long capture eq' - ); - t.deepEqual( - parse(['--host', 'localhost', '--port', '555']), - { host: 'localhost', port: 555, _: [] }, - 'long captures sp' - ); - t.deepEqual( - parse(['--host=localhost', '--port=555']), - { host: 'localhost', port: 555, _: [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/num.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/num.js deleted file mode 100644 index 074393e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/num.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789', - ]); - t.deepEqual(argv, { - x: 1234, - y: 5.67, - z: 1e7, - w: '10f', - hex: 0xdeadbeef, - _: [789], - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('already a number', function (t) { - var argv = parse(['-x', 1234, 789]); - t.deepEqual(argv, { x: 1234, _: [789] }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/parse.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/parse.js deleted file mode 100644 index 65d9d90..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,209 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse(['--no-moo']), - { moo: false, _: [] }, - 'no' - ); - t.deepEqual( - parse(['-v', 'a', '-v', 'b', '-v', 'c']), - { v: ['a', 'b', 'c'], _: [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek', - ]), - { - c: true, - a: true, - t: true, - s: 'woo', - h: 'awesome', - b: true, - bool: true, - key: 'value', - multi: ['quux', 'baz'], - meep: false, - name: 'meowmers', - _: ['bare', '--not-a-flag', 'eek'], - } - ); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse(['-t', 'moo'], { boolean: 't' }); - t.deepEqual(argv, { t: true, _: ['moo'] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: ['t', 'verbose'], - default: { verbose: true }, - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'], - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('newlines in params', function (t) { - var args = parse(['-s', 'X\nX']); - t.deepEqual(args, { _: [], s: 'X\nX' }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse(['--s=X\nX']); - t.deepEqual(args, { _: [], s: 'X\nX' }); - t.end(); -}); - -test('strings', function (t) { - var s = parse(['-s', '0001234'], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse(['-x', '56'], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([' ', ' '], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function (t) { - var s = parse(['-s'], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse(['--str'], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse(['-art'], { - string: ['a', 't'], - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - -test('string and alias', function (t) { - var x = parse(['--str', '000123'], { - string: 's', - alias: { s: 'str' }, - }); - - t.equal(x.str, '000123'); - t.equal(typeof x.str, 'string'); - t.equal(x.s, '000123'); - t.equal(typeof x.s, 'string'); - - var y = parse(['-s', '000123'], { - string: 'str', - alias: { str: 's' }, - }); - - t.equal(y.str, '000123'); - t.equal(typeof y.str, 'string'); - t.equal(y.s, '000123'); - t.equal(typeof y.s, 'string'); - - var z = parse(['-s123'], { - alias: { str: ['s', 'S'] }, - string: ['str'], - }); - - t.deepEqual( - z, - { _: [], s: '123', S: '123', str: '123' }, - 'opt.string works with multiple aliases' - ); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse(['-I/foo/bar/baz']), - { I: '/foo/bar/baz', _: [] } - ); - t.same( - parse(['-xyz/foo/bar/baz']), - { x: true, y: true, z: '/foo/bar/baz', _: [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse(['-f', '11', '--zoom', '55'], { - alias: { z: 'zoom' }, - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse(['-f', '11', '--zoom', '55'], { - alias: { z: ['zm', 'zoom'] }, - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop', - ]); - - t.same(argv.foo, { - bar: 3, - baz: 4, - quux: { - quibble: 5, - o_O: true, - }, - }); - t.same(argv.beep, { boop: true }); - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/parse_modified.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 32965d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions', function (t) { - t.plan(1); - - var argv = parse(['-b', '123'], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: [123] }); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/proto.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/proto.js deleted file mode 100644 index 6e629dd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/proto.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -/* eslint no-proto: 0 */ - -var parse = require('../'); -var test = require('tape'); - -test('proto pollution', function (t) { - var argv = parse(['--__proto__.x', '123']); - t.equal({}.x, undefined); - t.equal(argv.__proto__.x, undefined); - t.equal(argv.x, undefined); - t.end(); -}); - -test('proto pollution (array)', function (t) { - var argv = parse(['--x', '4', '--x', '5', '--x.__proto__.z', '789']); - t.equal({}.z, undefined); - t.deepEqual(argv.x, [4, 5]); - t.equal(argv.x.z, undefined); - t.equal(argv.x.__proto__.z, undefined); - t.end(); -}); - -test('proto pollution (number)', function (t) { - var argv = parse(['--x', '5', '--x.__proto__.z', '100']); - t.equal({}.z, undefined); - t.equal((4).z, undefined); - t.equal(argv.x, 5); - t.equal(argv.x.z, undefined); - t.end(); -}); - -test('proto pollution (string)', function (t) { - var argv = parse(['--x', 'abc', '--x.__proto__.z', 'def']); - t.equal({}.z, undefined); - t.equal('...'.z, undefined); - t.equal(argv.x, 'abc'); - t.equal(argv.x.z, undefined); - t.end(); -}); - -test('proto pollution (constructor)', function (t) { - var argv = parse(['--constructor.prototype.y', '123']); - t.equal({}.y, undefined); - t.equal(argv.y, undefined); - t.end(); -}); - -test('proto pollution (constructor function)', function (t) { - var argv = parse(['--_.concat.constructor.prototype.y', '123']); - function fnToBeTested() {} - t.equal(fnToBeTested.y, undefined); - t.equal(argv.y, undefined); - t.end(); -}); - -// powered by snyk - https://github.com/backstage/backstage/issues/10343 -test('proto pollution (constructor function) snyk', function (t) { - var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' ')); - t.equal(function () {}.foo, undefined); - t.equal(argv.y, undefined); - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/short.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/short.js deleted file mode 100644 index 4a7b843..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/short.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse(['-n123']), { n: 123, _: [] }); - t.deepEqual( - parse(['-123', '456']), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse(['-b']), - { b: true, _: [] }, - 'short boolean' - ); - t.deepEqual( - parse(['foo', 'bar', 'baz']), - { _: ['foo', 'bar', 'baz'] }, - 'bare' - ); - t.deepEqual( - parse(['-cats']), - { c: true, a: true, t: true, s: true, _: [] }, - 'group' - ); - t.deepEqual( - parse(['-cats', 'meow']), - { c: true, a: true, t: true, s: 'meow', _: [] }, - 'short group next' - ); - t.deepEqual( - parse(['-h', 'localhost']), - { h: 'localhost', _: [] }, - 'short capture' - ); - t.deepEqual( - parse(['-h', 'localhost', '-p', '555']), - { h: 'localhost', p: 555, _: [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse(['-h', 'localhost', '-fp', '555', 'script.js']), - { - f: true, p: 555, h: 'localhost', - _: ['script.js'], - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse(['-h', 'localhost', '-fp', '555', 'script.js']), - { - f: true, p: 555, h: 'localhost', - _: ['script.js'], - } - ); - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/stop_early.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/stop_early.js deleted file mode 100644 index 52a6a91..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/stop_early.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('stops parsing on the first non-option when stopEarly is set', function (t) { - var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { - stopEarly: true, - }); - - t.deepEqual(argv, { - aaa: 'bbb', - _: ['ccc', '--ddd'], - }); - - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/unknown.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/unknown.js deleted file mode 100644 index 4f2e0ca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/unknown.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('boolean and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'true', '--derp', 'true']; - var regular = ['--herp', 'true', '-d', 'true']; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('flag boolean true any double hyphen argument is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { - boolean: true, - unknown: unknownFn, - }); - t.same(unknown, ['--tacos=good', 'cow', '-p']); - t.same(argv, { - honk: true, - _: [], - }); - t.end(); -}); - -test('string and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'hello', '--derp', 'goodbye']; - var regular = ['--herp', 'hello', '-d', 'moon']; - var opts = { - alias: { h: 'herp' }, - string: 'h', - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('default and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'hello']; - var regular = ['--herp', 'hello']; - var opts = { - default: { h: 'bar' }, - alias: { h: 'herp' }, - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); - - t.same(unknown, []); - t.end(); - unknownFn(); // exercise fn for 100% coverage -}); - -test('value following -- is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['--bad', '--', 'good', 'arg']; - var opts = { - '--': true, - unknown: unknownFn, - }; - var argv = parse(aliased, opts); - - t.same(unknown, ['--bad']); - t.same(argv, { - '--': ['good', 'arg'], - _: [], - }); - t.end(); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/whitespace.js b/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 4fdaf1d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace', function (t) { - t.plan(1); - var x = parse(['-x', '\t']).x; - t.equal(x, '\t'); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass b/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass deleted file mode 120000 index 7c1951b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass +++ /dev/null @@ -1 +0,0 @@ -../../minipass@3.3.6/node_modules/minipass \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/LICENSE b/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/README.md b/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/README.md deleted file mode 100644 index ae1c3da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# minipass-collect - -A Minipass stream that collects all the data into a single chunk - -Note that this buffers ALL data written to it, so it's only good for -situations where you are sure the entire stream fits in memory. - -Note: this is primarily useful for the `Collect.PassThrough` class, since -Minipass streams already have a `.collect()` method which returns a promise -that resolves to the array of chunks, and a `.concat()` method that returns -the data concatenated into a single Buffer or String. - -## USAGE - -```js -const Collect = require('minipass-collect') - -const collector = new Collect() -collector.on('data', allTheData => { - console.log('all the data!', allTheData) -}) - -someSourceOfData.pipe(collector) - -// note that you can also simply do: -someSourceOfData.pipe(new Minipass()).concat().then(data => ...) -// or even, if someSourceOfData is a Minipass: -someSourceOfData.concat().then(data => ...) -// but you might prefer to have it stream-shaped rather than -// Promise-shaped in some scenarios. -``` - -If you want to collect the data, but _also_ act as a passthrough stream, -then use `Collect.PassThrough` instead (for example to memoize streaming -responses), and listen on the `collect` event. - -```js -const Collect = require('minipass-collect') - -const collector = new Collect.PassThrough() -collector.on('collect', allTheData => { - console.log('all the data!', allTheData) -}) - -someSourceOfData.pipe(collector).pipe(someOtherStream) -``` - -All [minipass options](http://npm.im/minipass) are supported. diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/index.js b/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/index.js deleted file mode 100644 index 2fe68c0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/index.js +++ /dev/null @@ -1,71 +0,0 @@ -const Minipass = require('minipass') -const _data = Symbol('_data') -const _length = Symbol('_length') -class Collect extends Minipass { - constructor (options) { - super(options) - this[_data] = [] - this[_length] = 0 - } - write (chunk, encoding, cb) { - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - - if (!encoding) - encoding = 'utf8' - - const c = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding) - this[_data].push(c) - this[_length] += c.length - if (cb) - cb() - return true - } - end (chunk, encoding, cb) { - if (typeof chunk === 'function') - cb = chunk, chunk = null - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - if (chunk) - this.write(chunk, encoding) - const result = Buffer.concat(this[_data], this[_length]) - super.write(result) - return super.end(cb) - } -} -module.exports = Collect - -// it would be possible to DRY this a bit by doing something like -// this.collector = new Collect() and listening on its data event, -// but it's not much code, and we may as well save the extra obj -class CollectPassThrough extends Minipass { - constructor (options) { - super(options) - this[_data] = [] - this[_length] = 0 - } - write (chunk, encoding, cb) { - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - - if (!encoding) - encoding = 'utf8' - - const c = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding) - this[_data].push(c) - this[_length] += c.length - return super.write(chunk, encoding, cb) - } - end (chunk, encoding, cb) { - if (typeof chunk === 'function') - cb = chunk, chunk = null - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - if (chunk) - this.write(chunk, encoding) - const result = Buffer.concat(this[_data], this[_length]) - this.emit('collect', result) - return super.end(cb) - } -} -module.exports.PassThrough = CollectPassThrough diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/package.json b/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/package.json deleted file mode 100644 index 54d87ac..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-collect@1.0.2/node_modules/minipass-collect/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "minipass-collect", - "version": "1.0.2", - "description": "A Minipass stream that collects all the data into a single chunk", - "author": "Isaac Z. Schlueter (https://izs.me)", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "tap": { - "check-coverage": true - }, - "devDependencies": { - "tap": "^14.6.9" - }, - "dependencies": { - "minipass": "^3.0.0" - }, - "files": [ - "index.js" - ], - "engines": { - "node": ">= 8" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/encoding b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/encoding deleted file mode 120000 index 1bd4143..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/encoding +++ /dev/null @@ -1 +0,0 @@ -../../encoding@0.1.13/node_modules/encoding \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass deleted file mode 120000 index 7c1951b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass +++ /dev/null @@ -1 +0,0 @@ -../../minipass@3.3.6/node_modules/minipass \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/LICENSE b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/LICENSE deleted file mode 100644 index 3c3410c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Isaac Z. Schlueter and Contributors -Copyright (c) 2016 David Frank - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---- - -Note: This is a derivative work based on "node-fetch" by David Frank, -modified and distributed under the terms of the MIT license above. -https://github.com/bitinn/node-fetch diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/README.md b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/README.md deleted file mode 100644 index 925e6be..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# minipass-fetch - -An implementation of window.fetch in Node.js using Minipass streams - -This is a fork (or more precisely, a reimplementation) of -[node-fetch](http://npm.im/node-fetch). All streams have been replaced -with [minipass streams](http://npm.im/minipass). - -The goal of this module is to stay in sync with the API presented by -`node-fetch`, with the exception of the streaming interface provided. - -## Why - -Minipass streams are faster and more deterministic in their timing contract -than node-core streams, making them a better fit for many server-side use -cases. - -## API - -See [node-fetch](http://npm.im/node-fetch) - -Differences from `node-fetch` (and, by extension, from the WhatWG Fetch -specification): - -- Returns [minipass](http://npm.im/minipass) streams instead of node-core - streams. -- Supports the full set of [TLS Options that may be provided to - `https.request()`](https://nodejs.org/api/https.html#https_https_request_options_callback) - when making `https` requests. diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/index.js b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/index.js deleted file mode 100644 index 07efc17..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/index.js') diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/abort-error.js b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/abort-error.js deleted file mode 100644 index b18f643..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/abort-error.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict' -class AbortError extends Error { - constructor (message) { - super(message) - this.code = 'FETCH_ABORTED' - this.type = 'aborted' - Error.captureStackTrace(this, this.constructor) - } - - get name () { - return 'AbortError' - } - - // don't allow name to be overridden, but don't throw either - set name (s) {} -} -module.exports = AbortError diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/blob.js b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/blob.js deleted file mode 100644 index 9225db6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/blob.js +++ /dev/null @@ -1,97 +0,0 @@ -'use strict' -const Minipass = require('minipass') -const TYPE = Symbol('type') -const BUFFER = Symbol('buffer') - -class Blob { - constructor (blobParts, options) { - this[TYPE] = '' - - const buffers = [] - let size = 0 - - if (blobParts) { - const a = blobParts - const length = Number(a.length) - for (let i = 0; i < length; i++) { - const element = a[i] - const buffer = element instanceof Buffer ? element - : ArrayBuffer.isView(element) - ? Buffer.from(element.buffer, element.byteOffset, element.byteLength) - : element instanceof ArrayBuffer ? Buffer.from(element) - : element instanceof Blob ? element[BUFFER] - : typeof element === 'string' ? Buffer.from(element) - : Buffer.from(String(element)) - size += buffer.length - buffers.push(buffer) - } - } - - this[BUFFER] = Buffer.concat(buffers, size) - - const type = options && options.type !== undefined - && String(options.type).toLowerCase() - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type - } - } - - get size () { - return this[BUFFER].length - } - - get type () { - return this[TYPE] - } - - text () { - return Promise.resolve(this[BUFFER].toString()) - } - - arrayBuffer () { - const buf = this[BUFFER] - const off = buf.byteOffset - const len = buf.byteLength - const ab = buf.buffer.slice(off, off + len) - return Promise.resolve(ab) - } - - stream () { - return new Minipass().end(this[BUFFER]) - } - - slice (start, end, type) { - const size = this.size - const relativeStart = start === undefined ? 0 - : start < 0 ? Math.max(size + start, 0) - : Math.min(start, size) - const relativeEnd = end === undefined ? size - : end < 0 ? Math.max(size + end, 0) - : Math.min(end, size) - const span = Math.max(relativeEnd - relativeStart, 0) - - const buffer = this[BUFFER] - const slicedBuffer = buffer.slice( - relativeStart, - relativeStart + span - ) - const blob = new Blob([], { type }) - blob[BUFFER] = slicedBuffer - return blob - } - - get [Symbol.toStringTag] () { - return 'Blob' - } - - static get BUFFER () { - return BUFFER - } -} - -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, -}) - -module.exports = Blob diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/body.js b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/body.js deleted file mode 100644 index fb7ffc3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/body.js +++ /dev/null @@ -1,334 +0,0 @@ -'use strict' -const Minipass = require('minipass') -const MinipassSized = require('minipass-sized') - -const Blob = require('./blob.js') -const {BUFFER} = Blob -const FetchError = require('./fetch-error.js') - -// optional dependency on 'encoding' -let convert -try { - convert = require('encoding').convert -} catch (e) {} - -const INTERNALS = Symbol('Body internals') -const CONSUME_BODY = Symbol('consumeBody') - -class Body { - constructor (bodyArg, options = {}) { - const { size = 0, timeout = 0 } = options - const body = bodyArg === undefined || bodyArg === null ? null - : isURLSearchParams(bodyArg) ? Buffer.from(bodyArg.toString()) - : isBlob(bodyArg) ? bodyArg - : Buffer.isBuffer(bodyArg) ? bodyArg - : Object.prototype.toString.call(bodyArg) === '[object ArrayBuffer]' - ? Buffer.from(bodyArg) - : ArrayBuffer.isView(bodyArg) - ? Buffer.from(bodyArg.buffer, bodyArg.byteOffset, bodyArg.byteLength) - : Minipass.isStream(bodyArg) ? bodyArg - : Buffer.from(String(bodyArg)) - - this[INTERNALS] = { - body, - disturbed: false, - error: null, - } - - this.size = size - this.timeout = timeout - - if (Minipass.isStream(body)) { - body.on('error', er => { - const error = er.name === 'AbortError' ? er - : new FetchError(`Invalid response while trying to fetch ${ - this.url}: ${er.message}`, 'system', er) - this[INTERNALS].error = error - }) - } - } - - get body () { - return this[INTERNALS].body - } - - get bodyUsed () { - return this[INTERNALS].disturbed - } - - arrayBuffer () { - return this[CONSUME_BODY]().then(buf => - buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength)) - } - - blob () { - const ct = this.headers && this.headers.get('content-type') || '' - return this[CONSUME_BODY]().then(buf => Object.assign( - new Blob([], { type: ct.toLowerCase() }), - { [BUFFER]: buf } - )) - } - - json () { - return this[CONSUME_BODY]().then(buf => { - try { - return JSON.parse(buf.toString()) - } catch (er) { - return Promise.reject(new FetchError( - `invalid json response body at ${ - this.url} reason: ${er.message}`, 'invalid-json')) - } - }) - } - - text () { - return this[CONSUME_BODY]().then(buf => buf.toString()) - } - - buffer () { - return this[CONSUME_BODY]() - } - - textConverted () { - return this[CONSUME_BODY]().then(buf => convertBody(buf, this.headers)) - } - - [CONSUME_BODY] () { - if (this[INTERNALS].disturbed) - return Promise.reject(new TypeError(`body used already for: ${ - this.url}`)) - - this[INTERNALS].disturbed = true - - if (this[INTERNALS].error) - return Promise.reject(this[INTERNALS].error) - - // body is null - if (this.body === null) { - return Promise.resolve(Buffer.alloc(0)) - } - - if (Buffer.isBuffer(this.body)) - return Promise.resolve(this.body) - - const upstream = isBlob(this.body) ? this.body.stream() : this.body - - /* istanbul ignore if: should never happen */ - if (!Minipass.isStream(upstream)) - return Promise.resolve(Buffer.alloc(0)) - - const stream = this.size && upstream instanceof MinipassSized ? upstream - : !this.size && upstream instanceof Minipass && - !(upstream instanceof MinipassSized) ? upstream - : this.size ? new MinipassSized({ size: this.size }) - : new Minipass() - - // allow timeout on slow response body - const resTimeout = this.timeout ? setTimeout(() => { - stream.emit('error', new FetchError( - `Response timeout while trying to fetch ${ - this.url} (over ${this.timeout}ms)`, 'body-timeout')) - }, this.timeout) : null - - // do not keep the process open just for this timeout, even - // though we expect it'll get cleared eventually. - if (resTimeout) { - resTimeout.unref() - } - - // do the pipe in the promise, because the pipe() can send too much - // data through right away and upset the MP Sized object - return new Promise((resolve, reject) => { - // if the stream is some other kind of stream, then pipe through a MP - // so we can collect it more easily. - if (stream !== upstream) { - upstream.on('error', er => stream.emit('error', er)) - upstream.pipe(stream) - } - resolve() - }).then(() => stream.concat()).then(buf => { - clearTimeout(resTimeout) - return buf - }).catch(er => { - clearTimeout(resTimeout) - // request was aborted, reject with this Error - if (er.name === 'AbortError' || er.name === 'FetchError') - throw er - else if (er.name === 'RangeError') - throw new FetchError(`Could not create Buffer from response body for ${ - this.url}: ${er.message}`, 'system', er) - else - // other errors, such as incorrect content-encoding or content-length - throw new FetchError(`Invalid response body while trying to fetch ${ - this.url}: ${er.message}`, 'system', er) - }) - } - - static clone (instance) { - if (instance.bodyUsed) - throw new Error('cannot clone body after it is used') - - const body = instance.body - - // check that body is a stream and not form-data object - // NB: can't clone the form-data object without having it as a dependency - if (Minipass.isStream(body) && typeof body.getBoundary !== 'function') { - // create a dedicated tee stream so that we don't lose data - // potentially sitting in the body stream's buffer by writing it - // immediately to p1 and not having it for p2. - const tee = new Minipass() - const p1 = new Minipass() - const p2 = new Minipass() - tee.on('error', er => { - p1.emit('error', er) - p2.emit('error', er) - }) - body.on('error', er => tee.emit('error', er)) - tee.pipe(p1) - tee.pipe(p2) - body.pipe(tee) - // set instance body to one fork, return the other - instance[INTERNALS].body = p1 - return p2 - } else - return instance.body - } - - static extractContentType (body) { - return body === null || body === undefined ? null - : typeof body === 'string' ? 'text/plain;charset=UTF-8' - : isURLSearchParams(body) - ? 'application/x-www-form-urlencoded;charset=UTF-8' - : isBlob(body) ? body.type || null - : Buffer.isBuffer(body) ? null - : Object.prototype.toString.call(body) === '[object ArrayBuffer]' ? null - : ArrayBuffer.isView(body) ? null - : typeof body.getBoundary === 'function' - ? `multipart/form-data;boundary=${body.getBoundary()}` - : Minipass.isStream(body) ? null - : 'text/plain;charset=UTF-8' - } - - static getTotalBytes (instance) { - const {body} = instance - return (body === null || body === undefined) ? 0 - : isBlob(body) ? body.size - : Buffer.isBuffer(body) ? body.length - : body && typeof body.getLengthSync === 'function' && ( - // detect form data input from form-data module - body._lengthRetrievers && - /* istanbul ignore next */ body._lengthRetrievers.length == 0 || // 1.x - body.hasKnownLength && body.hasKnownLength()) // 2.x - ? body.getLengthSync() - : null - } - - static writeToStream (dest, instance) { - const {body} = instance - - if (body === null || body === undefined) - dest.end() - else if (Buffer.isBuffer(body) || typeof body === 'string') - dest.end(body) - else { - // body is stream or blob - const stream = isBlob(body) ? body.stream() : body - stream.on('error', er => dest.emit('error', er)).pipe(dest) - } - - return dest - } -} - -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}) - - -const isURLSearchParams = obj => - // Duck-typing as a necessary condition. - (typeof obj !== 'object' || - typeof obj.append !== 'function' || - typeof obj.delete !== 'function' || - typeof obj.get !== 'function' || - typeof obj.getAll !== 'function' || - typeof obj.has !== 'function' || - typeof obj.set !== 'function') ? false - // Brand-checking and more duck-typing as optional condition. - : obj.constructor.name === 'URLSearchParams' || - Object.prototype.toString.call(obj) === '[object URLSearchParams]' || - typeof obj.sort === 'function' - -const isBlob = obj => - typeof obj === 'object' && - typeof obj.arrayBuffer === 'function' && - typeof obj.type === 'string' && - typeof obj.stream === 'function' && - typeof obj.constructor === 'function' && - typeof obj.constructor.name === 'string' && - /^(Blob|File)$/.test(obj.constructor.name) && - /^(Blob|File)$/.test(obj[Symbol.toStringTag]) - - -const convertBody = (buffer, headers) => { - /* istanbul ignore if */ - if (typeof convert !== 'function') - throw new Error('The package `encoding` must be installed to use the textConverted() function') - - const ct = headers && headers.get('content-type') - let charset = 'utf-8' - let res, str - - // header - if (ct) - res = /charset=([^;]*)/i.exec(ct) - - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString() - - // html5 - if (!res && str) - res = / this.expect - ? 'max-size' : type - this.message = message - Error.captureStackTrace(this, this.constructor) - } - - get name () { - return 'FetchError' - } - - // don't allow name to be overwritten - set name (n) {} - - get [Symbol.toStringTag] () { - return 'FetchError' - } -} -module.exports = FetchError diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/headers.js b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/headers.js deleted file mode 100644 index 233675f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/headers.js +++ /dev/null @@ -1,250 +0,0 @@ -'use strict' -const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/ -const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/ - -const validateName = name => { - name = `${name}` - if (invalidTokenRegex.test(name) || name === '') - throw new TypeError(`${name} is not a legal HTTP header name`) -} - -const validateValue = value => { - value = `${value}` - if (invalidHeaderCharRegex.test(value)) - throw new TypeError(`${value} is not a legal HTTP header value`) -} - -const find = (map, name) => { - name = name.toLowerCase() - for (const key in map) { - if (key.toLowerCase() === name) - return key - } - return undefined -} - -const MAP = Symbol('map') -class Headers { - constructor (init = undefined) { - this[MAP] = Object.create(null) - if (init instanceof Headers) { - const rawHeaders = init.raw() - const headerNames = Object.keys(rawHeaders) - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value) - } - } - return - } - - // no-op - if (init === undefined || init === null) - return - - if (typeof init === 'object') { - const method = init[Symbol.iterator] - if (method !== null && method !== undefined) { - if (typeof method !== 'function') - throw new TypeError('Header pairs must be iterable') - - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = [] - for (const pair of init) { - if (typeof pair !== 'object' || - typeof pair[Symbol.iterator] !== 'function') - throw new TypeError('Each header pair must be iterable') - const arrPair = Array.from(pair) - if (arrPair.length !== 2) - throw new TypeError('Each header pair must be a name/value tuple') - pairs.push(arrPair) - } - - for (const pair of pairs) { - this.append(pair[0], pair[1]) - } - } else { - // record - for (const key of Object.keys(init)) { - this.append(key, init[key]) - } - } - } else - throw new TypeError('Provided initializer must be an object') - } - - get (name) { - name = `${name}` - validateName(name) - const key = find(this[MAP], name) - if (key === undefined) - return null - - return this[MAP][key].join(', ') - } - - forEach (callback, thisArg = undefined) { - let pairs = getHeaders(this) - for (let i = 0; i < pairs.length; i++) { - const [name, value] = pairs[i] - callback.call(thisArg, value, name, this) - // refresh in case the callback added more headers - pairs = getHeaders(this) - } - } - - set (name, value) { - name = `${name}` - value = `${value}` - validateName(name) - validateValue(value) - const key = find(this[MAP], name) - this[MAP][key !== undefined ? key : name] = [value] - } - - append (name, value) { - name = `${name}` - value = `${value}` - validateName(name) - validateValue(value) - const key = find(this[MAP], name) - if (key !== undefined) - this[MAP][key].push(value) - else - this[MAP][name] = [value] - } - - has (name) { - name = `${name}` - validateName(name) - return find(this[MAP], name) !== undefined - } - - delete (name) { - name = `${name}` - validateName(name) - const key = find(this[MAP], name) - if (key !== undefined) - delete this[MAP][key] - } - - raw () { - return this[MAP] - } - - keys () { - return new HeadersIterator(this, 'key') - } - - values () { - return new HeadersIterator(this, 'value') - } - - [Symbol.iterator]() { - return new HeadersIterator(this, 'key+value') - } - - entries () { - return new HeadersIterator(this, 'key+value') - } - - get [Symbol.toStringTag] () { - return 'Headers' - } - - static exportNodeCompatibleHeaders (headers) { - const obj = Object.assign(Object.create(null), headers[MAP]) - - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host') - if (hostHeaderKey !== undefined) - obj[hostHeaderKey] = obj[hostHeaderKey][0] - - return obj - } - - static createHeadersLenient (obj) { - const headers = new Headers() - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) - continue - - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) - continue - - if (headers[MAP][name] === undefined) - headers[MAP][name] = [val] - else - headers[MAP][name].push(val) - } - } else if (!invalidHeaderCharRegex.test(obj[name])) - headers[MAP][name] = [obj[name]] - } - return headers - } -} - -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true }, -}) - -const getHeaders = (headers, kind = 'key+value') => - Object.keys(headers[MAP]).sort().map( - kind === 'key' ? k => k.toLowerCase() - : kind === 'value' ? k => headers[MAP][k].join(', ') - : k => [k.toLowerCase(), headers[MAP][k].join(', ')] - ) - -const INTERNAL = Symbol('internal') - -class HeadersIterator { - constructor (target, kind) { - this[INTERNAL] = { - target, - kind, - index: 0, - } - } - - get [Symbol.toStringTag] () { - return 'HeadersIterator' - } - - next () { - /* istanbul ignore if: should be impossible */ - if (!this || Object.getPrototypeOf(this) !== HeadersIterator.prototype) - throw new TypeError('Value of `this` is not a HeadersIterator') - - const { target, kind, index } = this[INTERNAL] - const values = getHeaders(target, kind) - const len = values.length - if (index >= len) { - return { - value: undefined, - done: true, - } - } - - this[INTERNAL].index++ - - return { value: values[index], done: false } - } -} - -// manually extend because 'extends' requires a ctor -Object.setPrototypeOf(HeadersIterator.prototype, - Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))) - -module.exports = Headers diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/index.js b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/index.js deleted file mode 100644 index 2ffcba8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/index.js +++ /dev/null @@ -1,341 +0,0 @@ -'use strict' -const Url = require('url') -const http = require('http') -const https = require('https') -const zlib = require('minizlib') -const Minipass = require('minipass') - -const Body = require('./body.js') -const { writeToStream, getTotalBytes } = Body -const Response = require('./response.js') -const Headers = require('./headers.js') -const { createHeadersLenient } = Headers -const Request = require('./request.js') -const { getNodeRequestOptions } = Request -const FetchError = require('./fetch-error.js') -const AbortError = require('./abort-error.js') - -const resolveUrl = Url.resolve - -const fetch = (url, opts) => { - if (/^data:/.test(url)) { - const request = new Request(url, opts) - try { - const split = url.split(',') - const data = Buffer.from(split[1], 'base64') - const type = split[0].match(/^data:(.*);base64$/)[1] - return Promise.resolve(new Response(data, { - headers: { - 'Content-Type': type, - 'Content-Length': data.length, - } - })) - } catch (er) { - return Promise.reject(new FetchError(`[${request.method}] ${ - request.url} invalid URL, ${er.message}`, 'system', er)) - } - } - - return new Promise((resolve, reject) => { - // build request object - const request = new Request(url, opts) - let options - try { - options = getNodeRequestOptions(request) - } catch (er) { - return reject(er) - } - - const send = (options.protocol === 'https:' ? https : http).request - const { signal } = request - let response = null - const abort = () => { - const error = new AbortError('The user aborted a request.') - reject(error) - if (Minipass.isStream(request.body) && - typeof request.body.destroy === 'function') { - request.body.destroy(error) - } - if (response && response.body) { - response.body.emit('error', error) - } - } - - if (signal && signal.aborted) - return abort() - - const abortAndFinalize = () => { - abort() - finalize() - } - - const finalize = () => { - req.abort() - if (signal) - signal.removeEventListener('abort', abortAndFinalize) - clearTimeout(reqTimeout) - } - - // send request - const req = send(options) - - if (signal) - signal.addEventListener('abort', abortAndFinalize) - - let reqTimeout = null - if (request.timeout) { - req.once('socket', socket => { - reqTimeout = setTimeout(() => { - reject(new FetchError(`network timeout at: ${ - request.url}`, 'request-timeout')) - finalize() - }, request.timeout) - }) - } - - req.on('error', er => { - // if a 'response' event is emitted before the 'error' event, then by the - // time this handler is run it's too late to reject the Promise for the - // response. instead, we forward the error event to the response stream - // so that the error will surface to the user when they try to consume - // the body. this is done as a side effect of aborting the request except - // for in windows, where we must forward the event manually, otherwise - // there is no longer a ref'd socket attached to the request and the - // stream never ends so the event loop runs out of work and the process - // exits without warning. - // coverage skipped here due to the difficulty in testing - // istanbul ignore next - if (req.res) - req.res.emit('error', er) - reject(new FetchError(`request to ${request.url} failed, reason: ${ - er.message}`, 'system', er)) - finalize() - }) - - req.on('response', res => { - clearTimeout(reqTimeout) - - const headers = createHeadersLenient(res.headers) - - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location') - - // HTTP fetch step 5.3 - const locationURL = location === null ? null - : resolveUrl(request.url, location) - - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${ - request.url}`, 'no-redirect')) - finalize() - return - - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to - // use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL) - } catch (err) { - /* istanbul ignore next: nodejs server prevent invalid - response headers, we can't test this through normal - request */ - reject(err) - } - } - break - - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break - } - - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${ - request.url}`, 'max-redirect')) - finalize() - return - } - - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && - request.body && - getTotalBytes(request) === null) { - reject(new FetchError( - 'Cannot follow redirect with body being a readable stream', - 'unsupported-redirect' - )) - finalize() - return - } - - // Update host due to redirection - request.headers.set('host', Url.parse(locationURL).host) - - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - } - - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || ( - (res.statusCode === 301 || res.statusCode === 302) && - request.method === 'POST' - )) { - requestOpts.method = 'GET' - requestOpts.body = undefined - requestOpts.headers.delete('content-length') - } - - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))) - finalize() - return - } - } // end if(isRedirect) - - - // prepare response - res.once('end', () => - signal && signal.removeEventListener('abort', abortAndFinalize)) - - const body = new Minipass() - // exceedingly rare that the stream would have an error, - // but just in case we proxy it to the stream in use. - res.on('error', /* istanbul ignore next */ er => body.emit('error', er)) - res.on('data', (chunk) => body.write(chunk)) - res.on('end', () => body.end()) - - const responseOptions = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter, - trailer: new Promise(resolve => - res.on('end', () => resolve(createHeadersLenient(res.trailers)))) - } - - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding') - - // HTTP-network fetch step 12.1.1.4: handle content codings - - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || - request.method === 'HEAD' || - codings === null || - res.statusCode === 204 || - res.statusCode === 304) { - response = new Response(body, responseOptions) - resolve(response) - return - } - - - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH, - } - - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - const unzip = new zlib.Gunzip(zlibOptions) - response = new Response( - // exceedingly rare that the stream would have an error, - // but just in case we proxy it to the stream in use. - body.on('error', /* istanbul ignore next */ er => unzip.emit('error', er)).pipe(unzip), - responseOptions - ) - resolve(response) - return - } - - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new Minipass()) - raw.once('data', chunk => { - // see http://stackoverflow.com/questions/37519828 - const decoder = (chunk[0] & 0x0F) === 0x08 - ? new zlib.Inflate() - : new zlib.InflateRaw() - // exceedingly rare that the stream would have an error, - // but just in case we proxy it to the stream in use. - body.on('error', /* istanbul ignore next */ er => decoder.emit('error', er)).pipe(decoder) - response = new Response(decoder, responseOptions) - resolve(response) - }) - return - } - - - // for br - if (codings == 'br') { - // ignoring coverage so tests don't have to fake support (or lack of) for brotli - // istanbul ignore next - try { - var decoder = new zlib.BrotliDecompress() - } catch (err) { - reject(err) - finalize() - return - } - // exceedingly rare that the stream would have an error, - // but just in case we proxy it to the stream in use. - body.on('error', /* istanbul ignore next */ er => decoder.emit('error', er)).pipe(decoder) - response = new Response(decoder, responseOptions) - resolve(response) - return - } - - // otherwise, use response as-is - response = new Response(body, responseOptions) - resolve(response) - }) - - writeToStream(req, request) - }) -} - -module.exports = fetch - -fetch.isRedirect = code => - code === 301 || - code === 302 || - code === 303 || - code === 307 || - code === 308 - -fetch.Headers = Headers -fetch.Request = Request -fetch.Response = Response -fetch.FetchError = FetchError diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/request.js b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/request.js deleted file mode 100644 index 278b278..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/request.js +++ /dev/null @@ -1,263 +0,0 @@ -'use strict' -const Url = require('url') -const Minipass = require('minipass') -const Headers = require('./headers.js') -const { exportNodeCompatibleHeaders } = Headers -const Body = require('./body.js') -const { clone, extractContentType, getTotalBytes } = Body - -const version = require('../package.json').version -const defaultUserAgent = - `minipass-fetch/${version} (+https://github.com/isaacs/minipass-fetch)` - -const INTERNALS = Symbol('Request internals') - -const { parse: parseUrl, format: formatUrl } = Url - -const isRequest = input => - typeof input === 'object' && typeof input[INTERNALS] === 'object' - -const isAbortSignal = signal => { - const proto = ( - signal - && typeof signal === 'object' - && Object.getPrototypeOf(signal) - ) - return !!(proto && proto.constructor.name === 'AbortSignal') -} - -class Request extends Body { - constructor (input, init = {}) { - const parsedURL = isRequest(input) ? Url.parse(input.url) - : input && input.href ? Url.parse(input.href) - : Url.parse(`${input}`) - - if (isRequest(input)) - init = { ...input[INTERNALS], ...init } - else if (!input || typeof input === 'string') - input = {} - - const method = (init.method || input.method || 'GET').toUpperCase() - const isGETHEAD = method === 'GET' || method === 'HEAD' - - if ((init.body !== null && init.body !== undefined || - isRequest(input) && input.body !== null) && isGETHEAD) - throw new TypeError('Request with GET/HEAD method cannot have body') - - const inputBody = init.body !== null && init.body !== undefined ? init.body - : isRequest(input) && input.body !== null ? clone(input) - : null - - super(inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0, - }) - - const headers = new Headers(init.headers || input.headers || {}) - - if (inputBody !== null && inputBody !== undefined && - !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody) - if (contentType) - headers.append('Content-Type', contentType) - } - - const signal = 'signal' in init ? init.signal - : null - - if (signal !== null && signal !== undefined && !isAbortSignal(signal)) - throw new TypeError('Expected signal must be an instanceof AbortSignal') - - // TLS specific options that are handled by node - const { - ca, - cert, - ciphers, - clientCertEngine, - crl, - dhparam, - ecdhCurve, - family, - honorCipherOrder, - key, - passphrase, - pfx, - rejectUnauthorized = process.env.NODE_TLS_REJECT_UNAUTHORIZED !== '0', - secureOptions, - secureProtocol, - servername, - sessionIdContext, - } = init - - this[INTERNALS] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal, - ca, - cert, - ciphers, - clientCertEngine, - crl, - dhparam, - ecdhCurve, - family, - honorCipherOrder, - key, - passphrase, - pfx, - rejectUnauthorized, - secureOptions, - secureProtocol, - servername, - sessionIdContext, - } - - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow - : input.follow !== undefined ? input.follow - : 20 - this.compress = init.compress !== undefined ? init.compress - : input.compress !== undefined ? input.compress - : true - this.counter = init.counter || input.counter || 0 - this.agent = init.agent || input.agent - } - - get method() { - return this[INTERNALS].method - } - - get url() { - return formatUrl(this[INTERNALS].parsedURL) - } - - get headers() { - return this[INTERNALS].headers - } - - get redirect() { - return this[INTERNALS].redirect - } - - get signal() { - return this[INTERNALS].signal - } - - clone () { - return new Request(this) - } - - get [Symbol.toStringTag] () { - return 'Request' - } - - static getNodeRequestOptions (request) { - const parsedURL = request[INTERNALS].parsedURL - const headers = new Headers(request[INTERNALS].headers) - - // fetch step 1.3 - if (!headers.has('Accept')) - headers.set('Accept', '*/*') - - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) - throw new TypeError('Only absolute URLs are supported') - - if (!/^https?:$/.test(parsedURL.protocol)) - throw new TypeError('Only HTTP(S) protocols are supported') - - if (request.signal && - Minipass.isStream(request.body) && - typeof request.body.destroy !== 'function') { - throw new Error( - 'Cancellation of streamed requests with AbortSignal is not supported') - } - - // HTTP-network-or-cache fetch steps 2.4-2.7 - const contentLengthValue = - (request.body === null || request.body === undefined) && - /^(POST|PUT)$/i.test(request.method) ? '0' - : request.body !== null && request.body !== undefined - ? getTotalBytes(request) - : null - - if (contentLengthValue) - headers.set('Content-Length', contentLengthValue + '') - - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) - headers.set('User-Agent', defaultUserAgent) - - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) - headers.set('Accept-Encoding', 'gzip,deflate') - - const agent = typeof request.agent === 'function' - ? request.agent(parsedURL) - : request.agent - - if (!headers.has('Connection') && !agent) - headers.set('Connection', 'close') - - // TLS specific options that are handled by node - const { - ca, - cert, - ciphers, - clientCertEngine, - crl, - dhparam, - ecdhCurve, - family, - honorCipherOrder, - key, - passphrase, - pfx, - rejectUnauthorized, - secureOptions, - secureProtocol, - servername, - sessionIdContext, - } = request[INTERNALS] - - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js - - return { - ...parsedURL, - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent, - ca, - cert, - ciphers, - clientCertEngine, - crl, - dhparam, - ecdhCurve, - family, - honorCipherOrder, - key, - passphrase, - pfx, - rejectUnauthorized, - secureOptions, - secureProtocol, - servername, - sessionIdContext, - } - } -} - -module.exports = Request - -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/response.js b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/response.js deleted file mode 100644 index 854f789..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/lib/response.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict' -const http = require('http') -const { STATUS_CODES } = http - -const Headers = require('./headers.js') -const Body = require('./body.js') -const { clone, extractContentType } = Body - -const INTERNALS = Symbol('Response internals') - -class Response extends Body { - constructor (body = null, opts = {}) { - super(body, opts) - - const status = opts.status || 200 - const headers = new Headers(opts.headers) - - if (body !== null && body !== undefined && !headers.has('Content-Type')) { - const contentType = extractContentType(body) - if (contentType) - headers.append('Content-Type', contentType) - } - - this[INTERNALS] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter, - trailer: Promise.resolve(opts.trailer || new Headers()), - } - } - - get trailer () { - return this[INTERNALS].trailer - } - - get url () { - return this[INTERNALS].url || '' - } - - get status () { - return this[INTERNALS].status - } - - get ok () { - return this[INTERNALS].status >= 200 && this[INTERNALS].status < 300 - } - - get redirected () { - return this[INTERNALS].counter > 0 - } - - get statusText () { - return this[INTERNALS].statusText - } - - get headers () { - return this[INTERNALS].headers - } - - clone () { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected, - trailer: this.trailer, - }) - } - - get [Symbol.toStringTag] () { - return 'Response' - } -} - -module.exports = Response - -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true }, -}) diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/package.json b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/package.json deleted file mode 100644 index 1d7d9e4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-fetch/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "minipass-fetch", - "version": "1.4.1", - "description": "An implementation of window.fetch in Node.js using Minipass streams", - "license": "MIT", - "main": "lib/index.js", - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "tap": { - "coverage-map": "map.js", - "check-coverage": true - }, - "devDependencies": { - "@ungap/url-search-params": "^0.1.2", - "abort-controller": "^3.0.0", - "abortcontroller-polyfill": "~1.3.0", - "form-data": "^2.5.1", - "parted": "^0.1.1", - "string-to-arraybuffer": "^1.0.2", - "tap": "^15.0.9", - "whatwg-url": "^7.0.0" - }, - "dependencies": { - "minipass": "^3.1.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" - }, - "optionalDependencies": { - "encoding": "^0.1.12" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/npm/minipass-fetch.git" - }, - "keywords": [ - "fetch", - "minipass", - "node-fetch", - "window.fetch" - ], - "files": [ - "index.js", - "lib/*.js" - ], - "engines": { - "node": ">=8" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-sized b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-sized deleted file mode 120000 index 96242b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minipass-sized +++ /dev/null @@ -1 +0,0 @@ -../../minipass-sized@1.0.3/node_modules/minipass-sized \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minizlib b/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minizlib deleted file mode 120000 index 6912a96..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-fetch@1.4.1/node_modules/minizlib +++ /dev/null @@ -1 +0,0 @@ -../../minizlib@2.1.2/node_modules/minizlib \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass b/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass deleted file mode 120000 index 7c1951b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass +++ /dev/null @@ -1 +0,0 @@ -../../minipass@3.3.6/node_modules/minipass \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/LICENSE.md deleted file mode 100644 index c5402b9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/LICENSE.md +++ /dev/null @@ -1,55 +0,0 @@ -# Blue Oak Model License - -Version 1.0.0 - -## Purpose - -This license gives everyone as much permission to work with -this software as possible, while protecting contributors -from liability. - -## Acceptance - -In order to receive this license, you must agree to its -rules. The rules of this license are both obligations -under that agreement and conditions to your license. -You must not do anything with this software that triggers -a rule that you cannot or will not follow. - -## Copyright - -Each contributor licenses you to do everything with this -software that would otherwise infringe that contributor's -copyright in it. - -## Notices - -You must ensure that everyone who gets a copy of -any part of this software from you, with or without -changes, also gets the text of this license or a link to -. - -## Excuse - -If anyone notifies you in writing that you have not -complied with [Notices](#notices), you can keep your -license by taking all practical steps to comply within 30 -days after the notice. If you do not do so, your license -ends immediately. - -## Patent - -Each contributor licenses you to do everything with this -software that would otherwise infringe any patent claims -they can license or become able to license. - -## Reliability - -No contributor can revoke this license. - -## No Liability - -***As far as the law allows, this software comes as is, -without any warranty or condition, and no contributor -will be liable to anyone for any damages related to this -software or this license, under any kind of legal claim.*** diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/README.md b/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/README.md deleted file mode 100644 index d2ed7e0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# minipass-flush - -A Minipass stream that calls a flush function before emitting 'end' - -## USAGE - -```js -const Flush = require('minipass-flush') -const f = new Flush({ - flush (cb) { - // call the cb when done, or return a promise - // the 'end' event will wait for it, along with - // close, finish, and prefinish. - // call the cb with an error, or return a rejecting - // promise to emit 'error' instead of doing the 'end' - return rerouteAllEncryptions().then(() => clearAllChannels()) - }, - // all other minipass options accepted as well -}) - -someDataSource.pipe(f).on('end', () => { - // proper flushing has been accomplished -}) - -// Or as a subclass implementing a 'flush' method: -class MyFlush extends Flush { - flush (cb) { - // old fashioned callback style! - rerouteAllEncryptions(er => { - if (er) - return cb(er) - clearAllChannels(er => { - if (er) - cb(er) - cb() - }) - }) - } -} -``` - -That's about it. - -If your `flush` method doesn't have to do anything asynchronous, then it's -better to call the callback right away in this tick, rather than returning -`Promise.resolve()`, so that the `end` event can happen as soon as -possible. diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/index.js b/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/index.js deleted file mode 100644 index cb2537f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/index.js +++ /dev/null @@ -1,39 +0,0 @@ -const Minipass = require('minipass') -const _flush = Symbol('_flush') -const _flushed = Symbol('_flushed') -const _flushing = Symbol('_flushing') -class Flush extends Minipass { - constructor (opt = {}) { - if (typeof opt === 'function') - opt = { flush: opt } - - super(opt) - - // or extend this class and provide a 'flush' method in your subclass - if (typeof opt.flush !== 'function' && typeof this.flush !== 'function') - throw new TypeError('must provide flush function in options') - - this[_flush] = opt.flush || this.flush - } - - emit (ev, ...data) { - if ((ev !== 'end' && ev !== 'finish') || this[_flushed]) - return super.emit(ev, ...data) - - if (this[_flushing]) - return - - this[_flushing] = true - - const afterFlush = er => { - this[_flushed] = true - er ? super.emit('error', er) : super.emit('end') - } - - const ret = this[_flush](afterFlush) - if (ret && ret.then) - ret.then(() => afterFlush(), er => afterFlush(er)) - } -} - -module.exports = Flush diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/package.json b/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/package.json deleted file mode 100644 index 2a2fa55..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-flush@1.0.7/node_modules/minipass-flush/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "minipass-flush", - "version": "1.0.7", - "publishConfig": { - "tag": "v1-legacy" - }, - "description": "A Minipass stream that calls a flush function before emitting 'end'", - "author": "Isaac Z. Schlueter (https://izs.me)", - "license": "BlueOak-1.0.0", - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "tap": { - "check-coverage": true - }, - "devDependencies": { - "tap": "^15.1.6" - }, - "dependencies": { - "minipass": "^3.0.0" - }, - "files": [ - "index.js" - ], - "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/minipass-flush.git" - }, - "keywords": [ - "minipass", - "flush", - "stream" - ], - "engines": { - "node": ">= 8" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass b/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass deleted file mode 120000 index 7c1951b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass +++ /dev/null @@ -1 +0,0 @@ -../../minipass@3.3.6/node_modules/minipass \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/LICENSE b/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/README.md b/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/README.md deleted file mode 100644 index 12daa99..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# minipass-pipeline - -Create a pipeline of streams using Minipass. - -Calls `.pipe()` on all the streams in the list. Returns a stream where -writes got to the first pipe in the chain, and reads are from the last. - -Errors are proxied along the chain and emitted on the Pipeline stream. - -## USAGE - -```js -const Pipeline = require('minipass-pipeline') - -// the list of streams to pipeline together, -// a bit like `input | transform | output` in bash -const p = new Pipeline(input, transform, output) - -p.write('foo') // writes to input -p.on('data', chunk => doSomething()) // reads from output stream - -// less contrived example (but still pretty contrived)... -const decode = new bunzipDecoder() -const unpack = tar.extract({ cwd: 'target-dir' }) -const tbz = new Pipeline(decode, unpack) - -fs.createReadStream('archive.tbz').pipe(tbz) - -// specify any minipass options if you like, as the first argument -// it'll only try to pipeline event emitters with a .pipe() method -const p = new Pipeline({ objectMode: true }, input, transform, output) - -// If you don't know the things to pipe in right away, that's fine. -// use p.push(stream) to add to the end, or p.unshift(stream) to the front -const databaseDecoderStreamDoohickey = (connectionInfo) => { - const p = new Pipeline() - logIntoDatabase(connectionInfo).then(connection => { - initializeDecoderRing(connectionInfo).then(decoderRing => { - p.push(connection, decoderRing) - getUpstreamSource(upstream => { - p.unshift(upstream) - }) - }) - }) - // return to caller right away - // emitted data will be upstream -> connection -> decoderRing pipeline - return p -} -``` - -Pipeline is a [minipass](http://npm.im/minipass) stream, so it's as -synchronous as the streams it wraps. It will buffer data until there is a -reader, but no longer, so make sure to attach your listeners before you -pipe it somewhere else. - -## `new Pipeline(opts = {}, ...streams)` - -Create a new Pipeline with the specified Minipass options and any streams -provided. - -## `pipeline.push(stream, ...)` - -Attach one or more streams to the pipeline at the end (read) side of the -pipe chain. - -## `pipeline.unshift(stream, ...)` - -Attach one or more streams to the pipeline at the start (write) side of the -pipe chain. diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/index.js b/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/index.js deleted file mode 100644 index b94ea14..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/index.js +++ /dev/null @@ -1,128 +0,0 @@ -const Minipass = require('minipass') -const EE = require('events') -const isStream = s => s && s instanceof EE && ( - typeof s.pipe === 'function' || // readable - (typeof s.write === 'function' && typeof s.end === 'function') // writable -) - -const _head = Symbol('_head') -const _tail = Symbol('_tail') -const _linkStreams = Symbol('_linkStreams') -const _setHead = Symbol('_setHead') -const _setTail = Symbol('_setTail') -const _onError = Symbol('_onError') -const _onData = Symbol('_onData') -const _onEnd = Symbol('_onEnd') -const _onDrain = Symbol('_onDrain') -const _streams = Symbol('_streams') -class Pipeline extends Minipass { - constructor (opts, ...streams) { - if (isStream(opts)) { - streams.unshift(opts) - opts = {} - } - - super(opts) - this[_streams] = [] - if (streams.length) - this.push(...streams) - } - - [_linkStreams] (streams) { - // reduce takes (left,right), and we return right to make it the - // new left value. - return streams.reduce((src, dest) => { - src.on('error', er => dest.emit('error', er)) - src.pipe(dest) - return dest - }) - } - - push (...streams) { - this[_streams].push(...streams) - if (this[_tail]) - streams.unshift(this[_tail]) - - const linkRet = this[_linkStreams](streams) - - this[_setTail](linkRet) - if (!this[_head]) - this[_setHead](streams[0]) - } - - unshift (...streams) { - this[_streams].unshift(...streams) - if (this[_head]) - streams.push(this[_head]) - - const linkRet = this[_linkStreams](streams) - this[_setHead](streams[0]) - if (!this[_tail]) - this[_setTail](linkRet) - } - - destroy (er) { - // set fire to the whole thing. - this[_streams].forEach(s => - typeof s.destroy === 'function' && s.destroy()) - return super.destroy(er) - } - - // readable interface -> tail - [_setTail] (stream) { - this[_tail] = stream - stream.on('error', er => this[_onError](stream, er)) - stream.on('data', chunk => this[_onData](stream, chunk)) - stream.on('end', () => this[_onEnd](stream)) - stream.on('finish', () => this[_onEnd](stream)) - } - - // errors proxied down the pipeline - // they're considered part of the "read" interface - [_onError] (stream, er) { - if (stream === this[_tail]) - this.emit('error', er) - } - [_onData] (stream, chunk) { - if (stream === this[_tail]) - super.write(chunk) - } - [_onEnd] (stream) { - if (stream === this[_tail]) - super.end() - } - pause () { - super.pause() - return this[_tail] && this[_tail].pause && this[_tail].pause() - } - - // NB: Minipass calls its internal private [RESUME] method during - // pipe drains, to avoid hazards where stream.resume() is overridden. - // Thus, we need to listen to the resume *event*, not override the - // resume() method, and proxy *that* to the tail. - emit (ev, ...args) { - if (ev === 'resume' && this[_tail] && this[_tail].resume) - this[_tail].resume() - return super.emit(ev, ...args) - } - - // writable interface -> head - [_setHead] (stream) { - this[_head] = stream - stream.on('drain', () => this[_onDrain](stream)) - } - [_onDrain] (stream) { - if (stream === this[_head]) - this.emit('drain') - } - write (chunk, enc, cb) { - return this[_head].write(chunk, enc, cb) && - (this.flowing || this.buffer.length === 0) - } - end (chunk, enc, cb) { - this[_head].end(chunk, enc, cb) - return this - } -} - -module.exports = Pipeline diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/package.json b/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/package.json deleted file mode 100644 index d608dc6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-pipeline@1.2.4/node_modules/minipass-pipeline/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "minipass-pipeline", - "version": "1.2.4", - "description": "create a pipeline of streams using Minipass", - "author": "Isaac Z. Schlueter (https://izs.me)", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "tap": { - "check-coverage": true - }, - "devDependencies": { - "tap": "^14.6.9" - }, - "dependencies": { - "minipass": "^3.0.0" - }, - "files": [ - "index.js" - ], - "engines": { - "node": ">=8" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass b/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass deleted file mode 120000 index 7c1951b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass +++ /dev/null @@ -1 +0,0 @@ -../../minipass@3.3.6/node_modules/minipass \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/.gitignore b/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/.gitignore deleted file mode 100644 index 2bec044..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# ignore most things, include some others -/* -/.* - -!bin/ -!lib/ -!docs/ -!package.json -!package-lock.json -!README.md -!CONTRIBUTING.md -!LICENSE -!CHANGELOG.md -!example/ -!scripts/ -!tap-snapshots/ -!test/ -!.travis.yml -!.gitignore -!.gitattributes -!coverage-map.js -!index.js diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/LICENSE b/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/README.md b/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/README.md deleted file mode 100644 index 6da403e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# minipass-sized - -A Minipass stream that raises an error if you get a different number of -bytes than expected. - -## USAGE - -Use just like any old [minipass](http://npm.im/minipass) stream, but -provide a `size` option to the constructor. - -The `size` option must be a positive integer, smaller than -`Number.MAX_SAFE_INTEGER`. - -```js -const MinipassSized = require('minipass-sized') -// figure out how much data you expect to get -const expectedSize = +headers['content-length'] -const stream = new MinipassSized({ size: expectedSize }) -stream.on('error', er => { - // if it's the wrong size, then this will raise an error with - // { found: , expect: , code: 'EBADSIZE' } -}) -response.pipe(stream) -``` - -Caveats: this does not work with `objectMode` streams, and will throw a -`TypeError` from the constructor if the size argument is missing or -invalid. diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/index.js b/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/index.js deleted file mode 100644 index a0c8acd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/index.js +++ /dev/null @@ -1,67 +0,0 @@ -const Minipass = require('minipass') - -class SizeError extends Error { - constructor (found, expect) { - super(`Bad data size: expected ${expect} bytes, but got ${found}`) - this.expect = expect - this.found = found - this.code = 'EBADSIZE' - Error.captureStackTrace(this, this.constructor) - } - get name () { - return 'SizeError' - } -} - -class MinipassSized extends Minipass { - constructor (options = {}) { - super(options) - - if (options.objectMode) - throw new TypeError(`${ - this.constructor.name - } streams only work with string and buffer data`) - - this.found = 0 - this.expect = options.size - if (typeof this.expect !== 'number' || - this.expect > Number.MAX_SAFE_INTEGER || - isNaN(this.expect) || - this.expect < 0 || - !isFinite(this.expect) || - this.expect !== Math.floor(this.expect)) - throw new Error('invalid expected size: ' + this.expect) - } - - write (chunk, encoding, cb) { - const buffer = Buffer.isBuffer(chunk) ? chunk - : typeof chunk === 'string' ? - Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8') - : chunk - - if (!Buffer.isBuffer(buffer)) { - this.emit('error', new TypeError(`${ - this.constructor.name - } streams only work with string and buffer data`)) - return false - } - - this.found += buffer.length - if (this.found > this.expect) - this.emit('error', new SizeError(this.found, this.expect)) - - return super.write(chunk, encoding, cb) - } - - emit (ev, ...data) { - if (ev === 'end') { - if (this.found !== this.expect) - this.emit('error', new SizeError(this.found, this.expect)) - } - return super.emit(ev, ...data) - } -} - -MinipassSized.SizeError = SizeError - -module.exports = MinipassSized diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/package-lock.json b/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/package-lock.json deleted file mode 100644 index 944b285..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/package-lock.json +++ /dev/null @@ -1,3464 +0,0 @@ -{ - "name": "minipass-sized", - "version": "1.0.3", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/generator": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.0.tgz", - "integrity": "sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA==", - "dev": true, - "requires": { - "@babel/types": "^7.6.0", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", - "dev": true, - "requires": { - "@babel/types": "^7.4.4" - } - }, - "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz", - "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==", - "dev": true - }, - "@babel/runtime": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.0.tgz", - "integrity": "sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.2" - } - }, - "@babel/template": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", - "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.6.0", - "@babel/types": "^7.6.0" - } - }, - "@babel/traverse": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.0.tgz", - "integrity": "sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.6.0", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.6.0", - "@babel/types": "^7.6.0", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" - } - }, - "@babel/types": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", - "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - }, - "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.0.tgz", - "integrity": "sha512-Ozz7l4ixzI7Oxj2+cw+p0tVUt27BpaJ+1+q1TCeANWxHpvyn2+Un+YamBdfKu0uh8xLodGhoa1v7595NhKDAuA==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", - "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "arg": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz", - "integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "async-hook-domain": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/async-hook-domain/-/async-hook-domain-1.1.0.tgz", - "integrity": "sha512-NH7V97d1yCbIanu2oDLyPT2GFNct0esPeJyRfkk8J5hTztHVSQp4UiNfL2O42sCA9XZPU8OgHvzOmt9ewBhVqA==", - "dev": true, - "requires": { - "source-map-support": "^0.5.11" - } - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "binary-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", - "dev": true - }, - "bind-obj-methods": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-2.0.0.tgz", - "integrity": "sha512-3/qRXczDi2Cdbz6jE+W3IflJOutRVica8frpBn14de1mBOkzDo+6tY33kNhvkw54Kn3PzRRD2VnGbGPcTAk4sw==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "caching-transform": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", - "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", - "dev": true, - "requires": { - "hasha": "^3.0.0", - "make-dir": "^2.0.0", - "package-hash": "^3.0.0", - "write-file-atomic": "^2.4.2" - }, - "dependencies": { - "write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - } - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "capture-stack-trace": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", - "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chokidar": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.1.1.tgz", - "integrity": "sha512-df4o16uZmMHzVQwECZRHwfguOt5ixpuQVaZHjYMvYisgKhE+JXwcj/Tcr3+3bu/XeOJQ9ycYmzu7Mv8XrGxJDQ==", - "dev": true, - "requires": { - "anymatch": "^3.1.0", - "braces": "^3.0.2", - "fsevents": "^2.0.6", - "glob-parent": "^5.0.0", - "is-binary-path": "^2.1.0", - "is-glob": "^4.0.1", - "normalize-path": "^3.0.0", - "readdirp": "^3.1.1" - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true, - "optional": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "coveralls": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.6.tgz", - "integrity": "sha512-Pgh4v3gCI4T/9VijVrm8Ym5v0OgjvGLKj3zTUwkvsCiwqae/p6VLzpsFNjQS2i6ewV7ef+DjFJ5TSKxYt/mCrA==", - "dev": true, - "requires": { - "growl": "~> 1.10.0", - "js-yaml": "^3.13.1", - "lcov-parse": "^0.0.10", - "log-driver": "^1.2.7", - "minimist": "^1.2.0", - "request": "^2.86.0" - } - }, - "cp-file": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", - "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "make-dir": "^2.0.0", - "nested-error-stacks": "^2.0.0", - "pify": "^4.0.1", - "safe-buffer": "^5.0.1" - } - }, - "cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", - "dev": true, - "requires": { - "strip-bom": "^3.0.0" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "diff": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", - "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esm": { - "version": "3.2.25", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", - "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", - "dev": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "events-to-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", - "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=", - "dev": true - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "findit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findit/-/findit-2.0.0.tgz", - "integrity": "sha1-ZQnwEmr0wXhVHPqZOU4DLhOk1W4=", - "dev": true - }, - "flow-parser": { - "version": "0.108.0", - "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.108.0.tgz", - "integrity": "sha512-Ug8VuwlyDIZq5Xgrf+T7XLpKydhqYyNd8lmFtf7PZbu90T5LL+FeHjWzxyrBn35RCCZMw7pXrjCrHOSs+2zXyg==", - "dev": true - }, - "flow-remove-types": { - "version": "2.108.0", - "resolved": "https://registry.npmjs.org/flow-remove-types/-/flow-remove-types-2.108.0.tgz", - "integrity": "sha512-cbYe0AijNVlc6V1Xx99fNqQtRMJ+xbQwG5rQtcheFQiBPO6b6VwvhMs/OelJvpO+YUTz49IhFKzoZGj5xm74PA==", - "dev": true, - "requires": { - "flow-parser": "^0.108.0", - "pirates": "^3.0.2", - "vlq": "^0.2.1" - } - }, - "foreground-child": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", - "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs-exists-cached": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz", - "integrity": "sha1-zyVVTKBQ3EmuZla0HeQiWJidy84=", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.0.7.tgz", - "integrity": "sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ==", - "dev": true, - "optional": true - }, - "function-loop": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-1.0.2.tgz", - "integrity": "sha512-Iw4MzMfS3udk/rqxTiDDCllhGwlOrsr50zViTOO/W6lS/9y6B1J0BD2VZzrnWUYBJsl3aeqjgR5v7bWWhZSYbA==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz", - "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "graceful-fs": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", - "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "handlebars": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.2.1.tgz", - "integrity": "sha512-bqPIlDk06UWbVEIFoYj+LVo42WhK96J+b25l7hbFDpxrOXMphFM3fNIm+cluwg4Pk2jiLjWU5nHQY7igGE75NQ==", - "dev": true, - "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "dev": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "hasha": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", - "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", - "dev": true, - "requires": { - "is-stream": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.4.tgz", - "integrity": "sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ==", - "dev": true - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", - "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", - "dev": true, - "requires": { - "append-transform": "^1.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", - "dev": true, - "requires": { - "@babel/generator": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "istanbul-lib-coverage": "^2.0.5", - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "istanbul-lib-processinfo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-1.0.0.tgz", - "integrity": "sha512-FY0cPmWa4WoQNlvB8VOcafiRoB5nB+l2Pz2xGuXHRSy1KM8QFOYfz/rN+bGMCAeejrY3mrpF5oJHcN0s/garCg==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "cross-spawn": "^6.0.5", - "istanbul-lib-coverage": "^2.0.3", - "rimraf": "^2.6.3", - "uuid": "^3.3.2" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "istanbul-lib-report": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", - "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "supports-color": "^6.1.0" - }, - "dependencies": { - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", - "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", - "source-map": "^0.6.1" - } - }, - "istanbul-reports": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", - "dev": true, - "requires": { - "handlebars": "^4.1.2" - } - }, - "jackspeak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-1.4.0.tgz", - "integrity": "sha512-VDcSunT+wcccoG46FtzuBAyQKlzhHjli4q31e1fIHGOsRspqNUFjVzGb+7eIFDlTvqLygxapDHPHS0ouT2o/tw==", - "dev": true, - "requires": { - "cliui": "^4.1.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "lcov-parse": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", - "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", - "dev": true - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", - "dev": true - }, - "merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - } - }, - "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", - "dev": true - }, - "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", - "dev": true, - "requires": { - "mime-db": "1.40.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "minipass": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.0.0.tgz", - "integrity": "sha512-FKNU4XrAPDX0+ynwns7njVu4RolyG1mUKSlT6n6GwGXLtYSYh2Znc0S83Rl6zEr1zgFfXvAzIBabnmItm+n19g==", - "requires": { - "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, - "nested-error-stacks": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz", - "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "nyc": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", - "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "caching-transform": "^3.0.2", - "convert-source-map": "^1.6.0", - "cp-file": "^6.2.0", - "find-cache-dir": "^2.1.0", - "find-up": "^3.0.0", - "foreground-child": "^1.5.6", - "glob": "^7.1.3", - "istanbul-lib-coverage": "^2.0.5", - "istanbul-lib-hook": "^2.0.7", - "istanbul-lib-instrument": "^3.3.0", - "istanbul-lib-report": "^2.0.8", - "istanbul-lib-source-maps": "^3.0.6", - "istanbul-reports": "^2.2.4", - "js-yaml": "^3.13.1", - "make-dir": "^2.1.0", - "merge-source-map": "^1.1.0", - "resolve-from": "^4.0.0", - "rimraf": "^2.6.3", - "signal-exit": "^3.0.2", - "spawn-wrap": "^1.4.2", - "test-exclude": "^5.2.3", - "uuid": "^3.3.2", - "yargs": "^13.2.2", - "yargs-parser": "^13.0.0" - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "opener": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", - "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", - "dev": true - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - } - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "own-or": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz", - "integrity": "sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw=", - "dev": true - }, - "own-or-env": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.1.tgz", - "integrity": "sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw==", - "dev": true, - "requires": { - "own-or": "^1.0.0" - } - }, - "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "package-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", - "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^3.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "picomatch": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz", - "integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "pirates": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-3.0.2.tgz", - "integrity": "sha512-c5CgUJq6H2k6MJz72Ak1F5sN9n9wlSlJyEnwvpm9/y3WB4E3pHBDT2c6PEiS1vyJvq2bUxUAIu0EGf8Cx4Ic7Q==", - "dev": true, - "requires": { - "node-modules-regexp": "^1.0.0" - } - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true, - "optional": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz", - "integrity": "sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==", - "dev": true - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "optional": true - } - } - }, - "readdirp": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.1.2.tgz", - "integrity": "sha512-8rhl0xs2cxfVsqzreYCvs8EwBfn/DhVdqtoLmw19uI3SC5avYX9teCurlErfpPXGmYtMHReGaP2RsLnFvz/lnw==", - "dev": true, - "requires": { - "picomatch": "^2.0.4" - } - }, - "regenerator-runtime": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", - "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==", - "dev": true - }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "resolve": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", - "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "spawn-wrap": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.3.tgz", - "integrity": "sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==", - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stack-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz", - "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "optional": true - } - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "tap": { - "version": "14.6.4", - "resolved": "https://registry.npmjs.org/tap/-/tap-14.6.4.tgz", - "integrity": "sha512-qYO/ZlQumbYzibH+wCVfkrNAomtBhKcKvMHWAMaucHrTBzZGHCmLR/WmRhb1khOKN5gzxMbCpEct3GQIKYXRlw==", - "dev": true, - "requires": { - "async-hook-domain": "^1.1.0", - "bind-obj-methods": "^2.0.0", - "browser-process-hrtime": "^1.0.0", - "capture-stack-trace": "^1.0.0", - "chokidar": "^3.0.2", - "color-support": "^1.1.0", - "coveralls": "^3.0.6", - "diff": "^4.0.1", - "esm": "^3.2.25", - "findit": "^2.0.0", - "flow-remove-types": "^2.107.0", - "foreground-child": "^1.3.3", - "fs-exists-cached": "^1.0.0", - "function-loop": "^1.0.2", - "glob": "^7.1.4", - "import-jsx": "^2.0.0", - "ink": "^2.3.0", - "isexe": "^2.0.0", - "istanbul-lib-processinfo": "^1.0.0", - "jackspeak": "^1.4.0", - "minipass": "^2.5.1", - "mkdirp": "^0.5.1", - "nyc": "^14.1.1", - "opener": "^1.5.1", - "own-or": "^1.0.0", - "own-or-env": "^1.0.1", - "react": "^16.9.0", - "rimraf": "^2.7.1", - "signal-exit": "^3.0.0", - "source-map-support": "^0.5.13", - "stack-utils": "^1.0.2", - "tap-mocha-reporter": "^4.0.1", - "tap-parser": "^9.3.3", - "tap-yaml": "^1.0.0", - "tcompare": "^2.3.0", - "treport": "^0.4.0", - "trivial-deferred": "^1.0.1", - "ts-node": "^8.3.0", - "typescript": "^3.6.3", - "which": "^1.3.1", - "write-file-atomic": "^3.0.0", - "yaml": "^1.6.0", - "yapool": "^1.0.0" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.4.5", - "bundled": true, - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.2" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.13.2", - "bundled": true, - "dev": true - } - } - }, - "@types/prop-types": { - "version": "15.7.1", - "bundled": true, - "dev": true - }, - "@types/react": { - "version": "16.8.22", - "bundled": true, - "dev": true, - "requires": { - "@types/prop-types": "*", - "csstype": "^2.2.0" - } - }, - "ansi-escapes": { - "version": "3.2.0", - "bundled": true, - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "bundled": true, - "dev": true - }, - "ansicolors": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "astral-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "auto-bind": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "@types/react": "^16.8.12" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "babel-core": { - "version": "6.26.3", - "bundled": true, - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true - } - } - }, - "babel-generator": { - "version": "6.26.1", - "bundled": true, - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true - } - } - }, - "babel-helper-builder-react-jsx": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "esutils": "^2.0.2" - } - }, - "babel-helpers": { - "version": "6.24.1", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-syntax-jsx": { - "version": "6.18.0", - "bundled": true, - "dev": true - }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.13.0", - "bundled": true, - "dev": true - }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-object-rest-spread": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-plugin-syntax-object-rest-spread": "^6.8.0", - "babel-runtime": "^6.26.0" - } - }, - "babel-plugin-transform-react-jsx": { - "version": "6.24.1", - "bundled": true, - "dev": true, - "requires": { - "babel-helper-builder-react-jsx": "^6.24.1", - "babel-plugin-syntax-jsx": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-register": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true - }, - "source-map-support": { - "version": "0.4.18", - "bundled": true, - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - } - } - }, - "babel-runtime": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "bundled": true, - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "caller-callsite": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "cardinal": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "ansicolors": "~0.3.2", - "redeyed": "~2.1.0" - } - }, - "chalk": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "ci-info": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-truncate": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "slice-ansi": "^1.0.0", - "string-width": "^2.0.0" - } - }, - "color-convert": { - "version": "1.9.3", - "bundled": true, - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "core-js": { - "version": "2.6.5", - "bundled": true, - "dev": true - }, - "csstype": { - "version": "2.6.5", - "bundled": true, - "dev": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "detect-indent": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "bundled": true, - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "esprima": { - "version": "4.0.1", - "bundled": true, - "dev": true - }, - "esutils": { - "version": "2.0.2", - "bundled": true, - "dev": true - }, - "events-to-array": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, - "globals": { - "version": "9.18.0", - "bundled": true, - "dev": true - }, - "has-ansi": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "home-or-tmp": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, - "import-jsx": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "babel-core": "^6.25.0", - "babel-plugin-transform-es2015-destructuring": "^6.23.0", - "babel-plugin-transform-object-rest-spread": "^6.23.0", - "babel-plugin-transform-react-jsx": "^6.24.1", - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "ink": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "requires": { - "@types/react": "^16.8.6", - "arrify": "^1.0.1", - "auto-bind": "^2.0.0", - "chalk": "^2.4.1", - "cli-cursor": "^2.1.0", - "cli-truncate": "^1.1.0", - "is-ci": "^2.0.0", - "lodash.throttle": "^4.1.1", - "log-update": "^3.0.0", - "prop-types": "^15.6.2", - "react-reconciler": "^0.20.0", - "scheduler": "^0.13.2", - "signal-exit": "^3.0.2", - "slice-ansi": "^1.0.0", - "string-length": "^2.0.0", - "widest-line": "^2.0.0", - "wrap-ansi": "^5.0.0", - "yoga-layout-prebuilt": "^1.9.3" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "bundled": true, - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "string-width": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "supports-color": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - } - } - }, - "invariant": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "is-ci": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } - }, - "is-finite": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "js-tokens": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "jsesc": { - "version": "1.3.0", - "bundled": true, - "dev": true - }, - "json5": { - "version": "0.5.1", - "bundled": true, - "dev": true - }, - "lodash": { - "version": "4.17.14", - "bundled": true, - "dev": true - }, - "lodash.throttle": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "log-update": { - "version": "3.2.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-escapes": "^3.2.0", - "cli-cursor": "^2.1.0", - "wrap-ansi": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "bundled": true, - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "string-width": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - } - } - }, - "loose-envify": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minipass": { - "version": "2.5.1", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - }, - "dependencies": { - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true - } - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - } - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "onetime": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "1.2.0", - "bundled": true, - "dev": true - } - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "private": { - "version": "0.1.8", - "bundled": true, - "dev": true - }, - "prop-types": { - "version": "15.7.2", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, - "punycode": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "react": { - "version": "16.9.0", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - } - }, - "react-is": { - "version": "16.8.6", - "bundled": true, - "dev": true - }, - "react-reconciler": { - "version": "0.20.4", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.13.6" - } - }, - "redeyed": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "esprima": "~4.0.0" - } - }, - "regenerator-runtime": { - "version": "0.11.1", - "bundled": true, - "dev": true - }, - "repeating": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true - }, - "scheduler": { - "version": "0.13.6", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "slash": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "slice-ansi": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0" - } - }, - "string-length": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "astral-regex": "^1.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "tap-parser": { - "version": "9.3.3", - "bundled": true, - "dev": true, - "requires": { - "events-to-array": "^1.0.1", - "minipass": "^2.2.0", - "tap-yaml": "^1.0.0" - } - }, - "tap-yaml": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "yaml": "^1.5.0" - } - }, - "to-fast-properties": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "treport": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "requires": { - "cardinal": "^2.1.1", - "chalk": "^2.4.2", - "import-jsx": "^2.0.0", - "ink": "^2.1.1", - "ms": "^2.1.1", - "react": "^16.8.6", - "string-length": "^2.0.0", - "tap-parser": "^9.3.2", - "unicode-length": "^2.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "bundled": true, - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true, - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "unicode-length": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "punycode": "^2.0.0", - "strip-ansi": "^3.0.1" - } - } - } - }, - "trim-right": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "widest-line": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1" - } - }, - "yaml": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "requires": { - "@babel/runtime": "^7.4.5" - } - }, - "yoga-layout-prebuilt": { - "version": "1.9.3", - "bundled": true, - "dev": true - } - } - }, - "tap-mocha-reporter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-4.0.1.tgz", - "integrity": "sha512-/KfXaaYeSPn8qBi5Be8WSIP3iKV83s2uj2vzImJAXmjNu22kzqZ+1Dv1riYWa53sPCiyo1R1w1jbJrftF8SpcQ==", - "dev": true, - "requires": { - "color-support": "^1.1.0", - "debug": "^2.1.3", - "diff": "^1.3.2", - "escape-string-regexp": "^1.0.3", - "glob": "^7.0.5", - "readable-stream": "^2.1.5", - "tap-parser": "^8.0.0", - "tap-yaml": "0 || 1", - "unicode-length": "^1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "diff": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", - "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "tap-parser": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-8.1.0.tgz", - "integrity": "sha512-GgOzgDwThYLxhVR83RbS1JUR1TxcT+jfZsrETgPAvFdr12lUOnuvrHOBaUQgpkAp6ZyeW6r2Nwd91t88M0ru3w==", - "dev": true, - "requires": { - "events-to-array": "^1.0.1", - "minipass": "^2.2.0", - "tap-yaml": "0 || 1" - }, - "dependencies": { - "minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - } - } - }, - "tap-yaml": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-1.0.0.tgz", - "integrity": "sha512-Rxbx4EnrWkYk0/ztcm5u3/VznbyFJpyXO12dDBHKWiDVxy7O2Qw6MRrwO5H6Ww0U5YhRY/4C/VzWmFPhBQc4qQ==", - "dev": true, - "requires": { - "yaml": "^1.5.0" - } - }, - "tcompare": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-2.3.0.tgz", - "integrity": "sha512-fAfA73uFtFGybWGt4+IYT6UPLYVZQ4NfsP+IXEZGY0vh8e2IF7LVKafcQNMRBLqP0wzEA65LM9Tqj+FSmO8GLw==", - "dev": true - }, - "test-exclude": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", - "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", - "dev": true, - "requires": { - "glob": "^7.1.3", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^2.0.0" - } - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "trivial-deferred": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz", - "integrity": "sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM=", - "dev": true - }, - "ts-node": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz", - "integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==", - "dev": true, - "requires": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.6", - "yn": "^3.0.0" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "typescript": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.3.tgz", - "integrity": "sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw==", - "dev": true - }, - "uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", - "dev": true, - "optional": true, - "requires": { - "commander": "~2.20.0", - "source-map": "~0.6.1" - } - }, - "unicode-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-1.0.3.tgz", - "integrity": "sha1-Wtp6f+1RhBpBijKM8UlHisg1irs=", - "dev": true, - "requires": { - "punycode": "^1.3.2", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true, - "optional": true - }, - "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vlq": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write-file-atomic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.0.tgz", - "integrity": "sha512-EIgkf60l2oWsffja2Sf2AL384dx328c0B+cIYPTQq5q2rOYuDV00/iPFBOUiDKKwKMOhkymH8AidPaRvzfxY+Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yaml": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.6.0.tgz", - "integrity": "sha512-iZfse3lwrJRoSlfs/9KQ9iIXxs9++RvBFVzAqbbBiFT+giYtyanevreF9r61ZTbGMgWQBxAua3FzJiniiJXWWw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.4.5" - } - }, - "yapool": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yapool/-/yapool-1.0.0.tgz", - "integrity": "sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o=", - "dev": true - }, - "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - } - } - }, - "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/package.json b/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/package.json deleted file mode 100644 index a3257fd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "minipass-sized", - "version": "1.0.3", - "description": "A Minipass stream that raises an error if you get a different number of bytes than expected", - "author": "Isaac Z. Schlueter (https://izs.me)", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "tap": { - "check-coverage": true - }, - "devDependencies": { - "tap": "^14.6.4" - }, - "dependencies": { - "minipass": "^3.0.0" - }, - "main": "index.js", - "keywords": [ - "minipass", - "size", - "length" - ], - "directories": { - "test": "test" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/minipass-sized.git" - }, - "engines": { - "node": ">=8" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/test/basic.js b/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/test/basic.js deleted file mode 100644 index bbdcada..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/test/basic.js +++ /dev/null @@ -1,83 +0,0 @@ -const t = require('tap') -const MPS = require('../') - -t.test('ok if size checks out', t => { - const mps = new MPS({ size: 4 }) - - mps.write(Buffer.from('a').toString('hex'), 'hex') - mps.write(Buffer.from('sd')) - mps.end('f') - return mps.concat().then(data => t.equal(data.toString(), 'asdf')) -}) - -t.test('error if size exceeded', t => { - const mps = new MPS({ size: 1 }) - mps.on('error', er => { - t.match(er, { - message: 'Bad data size: expected 1 bytes, but got 4', - found: 4, - expect: 1, - code: 'EBADSIZE', - name: 'SizeError', - }) - t.end() - }) - mps.write('asdf') -}) - -t.test('error if size is not met', t => { - const mps = new MPS({ size: 999 }) - t.throws(() => mps.end(), { - message: 'Bad data size: expected 999 bytes, but got 0', - found: 0, - name: 'SizeError', - expect: 999, - code: 'EBADSIZE', - }) - t.end() -}) - -t.test('error if non-string/buffer is written', t => { - const mps = new MPS({size:1}) - mps.on('error', er => { - t.match(er, { - message: 'MinipassSized streams only work with string and buffer data' - }) - t.end() - }) - mps.write({some:'object'}) -}) - -t.test('projectiles', t => { - t.throws(() => new MPS(), { - message: 'invalid expected size: undefined' - }, 'size is required') - t.throws(() => new MPS({size: true}), { - message: 'invalid expected size: true' - }, 'size must be number') - t.throws(() => new MPS({size: NaN}), { - message: 'invalid expected size: NaN' - }, 'size must not be NaN') - t.throws(() => new MPS({size:1.2}), { - message: 'invalid expected size: 1.2' - }, 'size must be integer') - t.throws(() => new MPS({size: Infinity}), { - message: 'invalid expected size: Infinity' - }, 'size must be finite') - t.throws(() => new MPS({size: -1}), { - message: 'invalid expected size: -1' - }, 'size must be positive') - t.throws(() => new MPS({objectMode: true}), { - message: 'MinipassSized streams only work with string and buffer data' - }, 'no objectMode') - t.throws(() => new MPS({size: Number.MAX_SAFE_INTEGER + 1000000}), { - message: 'invalid expected size: 9007199255740992' - }) - t.end() -}) - -t.test('exports SizeError class', t => { - t.isa(MPS.SizeError, 'function') - t.isa(MPS.SizeError.prototype, Error) - t.end() -}) diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/LICENSE b/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/LICENSE deleted file mode 100644 index bf1dece..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/README.md b/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/README.md deleted file mode 100644 index 2cde46c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/README.md +++ /dev/null @@ -1,728 +0,0 @@ -# minipass - -A _very_ minimal implementation of a [PassThrough -stream](https://nodejs.org/api/stream.html#stream_class_stream_passthrough) - -[It's very -fast](https://docs.google.com/spreadsheets/d/1oObKSrVwLX_7Ut4Z6g3fZW-AX1j1-k6w-cDsrkaSbHM/edit#gid=0) -for objects, strings, and buffers. - -Supports `pipe()`ing (including multi-`pipe()` and backpressure transmission), -buffering data until either a `data` event handler or `pipe()` is added (so -you don't lose the first chunk), and most other cases where PassThrough is -a good idea. - -There is a `read()` method, but it's much more efficient to consume data -from this stream via `'data'` events or by calling `pipe()` into some other -stream. Calling `read()` requires the buffer to be flattened in some -cases, which requires copying memory. - -If you set `objectMode: true` in the options, then whatever is written will -be emitted. Otherwise, it'll do a minimal amount of Buffer copying to -ensure proper Streams semantics when `read(n)` is called. - -`objectMode` can also be set by doing `stream.objectMode = true`, or by -writing any non-string/non-buffer data. `objectMode` cannot be set to -false once it is set. - -This is not a `through` or `through2` stream. It doesn't transform the -data, it just passes it right through. If you want to transform the data, -extend the class, and override the `write()` method. Once you're done -transforming the data however you want, call `super.write()` with the -transform output. - -For some examples of streams that extend Minipass in various ways, check -out: - -- [minizlib](http://npm.im/minizlib) -- [fs-minipass](http://npm.im/fs-minipass) -- [tar](http://npm.im/tar) -- [minipass-collect](http://npm.im/minipass-collect) -- [minipass-flush](http://npm.im/minipass-flush) -- [minipass-pipeline](http://npm.im/minipass-pipeline) -- [tap](http://npm.im/tap) -- [tap-parser](http://npm.im/tap-parser) -- [treport](http://npm.im/treport) -- [minipass-fetch](http://npm.im/minipass-fetch) -- [pacote](http://npm.im/pacote) -- [make-fetch-happen](http://npm.im/make-fetch-happen) -- [cacache](http://npm.im/cacache) -- [ssri](http://npm.im/ssri) -- [npm-registry-fetch](http://npm.im/npm-registry-fetch) -- [minipass-json-stream](http://npm.im/minipass-json-stream) -- [minipass-sized](http://npm.im/minipass-sized) - -## Differences from Node.js Streams - -There are several things that make Minipass streams different from (and in -some ways superior to) Node.js core streams. - -Please read these caveats if you are familiar with node-core streams and -intend to use Minipass streams in your programs. - -You can avoid most of these differences entirely (for a very -small performance penalty) by setting `{async: true}` in the -constructor options. - -### Timing - -Minipass streams are designed to support synchronous use-cases. Thus, data -is emitted as soon as it is available, always. It is buffered until read, -but no longer. Another way to look at it is that Minipass streams are -exactly as synchronous as the logic that writes into them. - -This can be surprising if your code relies on `PassThrough.write()` always -providing data on the next tick rather than the current one, or being able -to call `resume()` and not have the entire buffer disappear immediately. - -However, without this synchronicity guarantee, there would be no way for -Minipass to achieve the speeds it does, or support the synchronous use -cases that it does. Simply put, waiting takes time. - -This non-deferring approach makes Minipass streams much easier to reason -about, especially in the context of Promises and other flow-control -mechanisms. - -Example: - -```js -const Minipass = require('minipass') -const stream = new Minipass({ async: true }) -stream.on('data', () => console.log('data event')) -console.log('before write') -stream.write('hello') -console.log('after write') -// output: -// before write -// data event -// after write -``` - -### Exception: Async Opt-In - -If you wish to have a Minipass stream with behavior that more -closely mimics Node.js core streams, you can set the stream in -async mode either by setting `async: true` in the constructor -options, or by setting `stream.async = true` later on. - -```js -const Minipass = require('minipass') -const asyncStream = new Minipass({ async: true }) -asyncStream.on('data', () => console.log('data event')) -console.log('before write') -asyncStream.write('hello') -console.log('after write') -// output: -// before write -// after write -// data event <-- this is deferred until the next tick -``` - -Switching _out_ of async mode is unsafe, as it could cause data -corruption, and so is not enabled. Example: - -```js -const Minipass = require('minipass') -const stream = new Minipass({ encoding: 'utf8' }) -stream.on('data', chunk => console.log(chunk)) -stream.async = true -console.log('before writes') -stream.write('hello') -setStreamSyncAgainSomehow(stream) // <-- this doesn't actually exist! -stream.write('world') -console.log('after writes') -// hypothetical output would be: -// before writes -// world -// after writes -// hello -// NOT GOOD! -``` - -To avoid this problem, once set into async mode, any attempt to -make the stream sync again will be ignored. - -```js -const Minipass = require('minipass') -const stream = new Minipass({ encoding: 'utf8' }) -stream.on('data', chunk => console.log(chunk)) -stream.async = true -console.log('before writes') -stream.write('hello') -stream.async = false // <-- no-op, stream already async -stream.write('world') -console.log('after writes') -// actual output: -// before writes -// after writes -// hello -// world -``` - -### No High/Low Water Marks - -Node.js core streams will optimistically fill up a buffer, returning `true` -on all writes until the limit is hit, even if the data has nowhere to go. -Then, they will not attempt to draw more data in until the buffer size dips -below a minimum value. - -Minipass streams are much simpler. The `write()` method will return `true` -if the data has somewhere to go (which is to say, given the timing -guarantees, that the data is already there by the time `write()` returns). - -If the data has nowhere to go, then `write()` returns false, and the data -sits in a buffer, to be drained out immediately as soon as anyone consumes -it. - -Since nothing is ever buffered unnecessarily, there is much less -copying data, and less bookkeeping about buffer capacity levels. - -### Hazards of Buffering (or: Why Minipass Is So Fast) - -Since data written to a Minipass stream is immediately written all the way -through the pipeline, and `write()` always returns true/false based on -whether the data was fully flushed, backpressure is communicated -immediately to the upstream caller. This minimizes buffering. - -Consider this case: - -```js -const {PassThrough} = require('stream') -const p1 = new PassThrough({ highWaterMark: 1024 }) -const p2 = new PassThrough({ highWaterMark: 1024 }) -const p3 = new PassThrough({ highWaterMark: 1024 }) -const p4 = new PassThrough({ highWaterMark: 1024 }) - -p1.pipe(p2).pipe(p3).pipe(p4) -p4.on('data', () => console.log('made it through')) - -// this returns false and buffers, then writes to p2 on next tick (1) -// p2 returns false and buffers, pausing p1, then writes to p3 on next tick (2) -// p3 returns false and buffers, pausing p2, then writes to p4 on next tick (3) -// p4 returns false and buffers, pausing p3, then emits 'data' and 'drain' -// on next tick (4) -// p3 sees p4's 'drain' event, and calls resume(), emitting 'resume' and -// 'drain' on next tick (5) -// p2 sees p3's 'drain', calls resume(), emits 'resume' and 'drain' on next tick (6) -// p1 sees p2's 'drain', calls resume(), emits 'resume' and 'drain' on next -// tick (7) - -p1.write(Buffer.alloc(2048)) // returns false -``` - -Along the way, the data was buffered and deferred at each stage, and -multiple event deferrals happened, for an unblocked pipeline where it was -perfectly safe to write all the way through! - -Furthermore, setting a `highWaterMark` of `1024` might lead someone reading -the code to think an advisory maximum of 1KiB is being set for the -pipeline. However, the actual advisory buffering level is the _sum_ of -`highWaterMark` values, since each one has its own bucket. - -Consider the Minipass case: - -```js -const m1 = new Minipass() -const m2 = new Minipass() -const m3 = new Minipass() -const m4 = new Minipass() - -m1.pipe(m2).pipe(m3).pipe(m4) -m4.on('data', () => console.log('made it through')) - -// m1 is flowing, so it writes the data to m2 immediately -// m2 is flowing, so it writes the data to m3 immediately -// m3 is flowing, so it writes the data to m4 immediately -// m4 is flowing, so it fires the 'data' event immediately, returns true -// m4's write returned true, so m3 is still flowing, returns true -// m3's write returned true, so m2 is still flowing, returns true -// m2's write returned true, so m1 is still flowing, returns true -// No event deferrals or buffering along the way! - -m1.write(Buffer.alloc(2048)) // returns true -``` - -It is extremely unlikely that you _don't_ want to buffer any data written, -or _ever_ buffer data that can be flushed all the way through. Neither -node-core streams nor Minipass ever fail to buffer written data, but -node-core streams do a lot of unnecessary buffering and pausing. - -As always, the faster implementation is the one that does less stuff and -waits less time to do it. - -### Immediately emit `end` for empty streams (when not paused) - -If a stream is not paused, and `end()` is called before writing any data -into it, then it will emit `end` immediately. - -If you have logic that occurs on the `end` event which you don't want to -potentially happen immediately (for example, closing file descriptors, -moving on to the next entry in an archive parse stream, etc.) then be sure -to call `stream.pause()` on creation, and then `stream.resume()` once you -are ready to respond to the `end` event. - -However, this is _usually_ not a problem because: - -### Emit `end` When Asked - -One hazard of immediately emitting `'end'` is that you may not yet have had -a chance to add a listener. In order to avoid this hazard, Minipass -streams safely re-emit the `'end'` event if a new listener is added after -`'end'` has been emitted. - -Ie, if you do `stream.on('end', someFunction)`, and the stream has already -emitted `end`, then it will call the handler right away. (You can think of -this somewhat like attaching a new `.then(fn)` to a previously-resolved -Promise.) - -To prevent calling handlers multiple times who would not expect multiple -ends to occur, all listeners are removed from the `'end'` event whenever it -is emitted. - -### Emit `error` When Asked - -The most recent error object passed to the `'error'` event is -stored on the stream. If a new `'error'` event handler is added, -and an error was previously emitted, then the event handler will -be called immediately (or on `process.nextTick` in the case of -async streams). - -This makes it much more difficult to end up trying to interact -with a broken stream, if the error handler is added after an -error was previously emitted. - -### Impact of "immediate flow" on Tee-streams - -A "tee stream" is a stream piping to multiple destinations: - -```js -const tee = new Minipass() -t.pipe(dest1) -t.pipe(dest2) -t.write('foo') // goes to both destinations -``` - -Since Minipass streams _immediately_ process any pending data through the -pipeline when a new pipe destination is added, this can have surprising -effects, especially when a stream comes in from some other function and may -or may not have data in its buffer. - -```js -// WARNING! WILL LOSE DATA! -const src = new Minipass() -src.write('foo') -src.pipe(dest1) // 'foo' chunk flows to dest1 immediately, and is gone -src.pipe(dest2) // gets nothing! -``` - -One solution is to create a dedicated tee-stream junction that pipes to -both locations, and then pipe to _that_ instead. - -```js -// Safe example: tee to both places -const src = new Minipass() -src.write('foo') -const tee = new Minipass() -tee.pipe(dest1) -tee.pipe(dest2) -src.pipe(tee) // tee gets 'foo', pipes to both locations -``` - -The same caveat applies to `on('data')` event listeners. The first one -added will _immediately_ receive all of the data, leaving nothing for the -second: - -```js -// WARNING! WILL LOSE DATA! -const src = new Minipass() -src.write('foo') -src.on('data', handler1) // receives 'foo' right away -src.on('data', handler2) // nothing to see here! -``` - -Using a dedicated tee-stream can be used in this case as well: - -```js -// Safe example: tee to both data handlers -const src = new Minipass() -src.write('foo') -const tee = new Minipass() -tee.on('data', handler1) -tee.on('data', handler2) -src.pipe(tee) -``` - -All of the hazards in this section are avoided by setting `{ -async: true }` in the Minipass constructor, or by setting -`stream.async = true` afterwards. Note that this does add some -overhead, so should only be done in cases where you are willing -to lose a bit of performance in order to avoid having to refactor -program logic. - -## USAGE - -It's a stream! Use it like a stream and it'll most likely do what you -want. - -```js -const Minipass = require('minipass') -const mp = new Minipass(options) // optional: { encoding, objectMode } -mp.write('foo') -mp.pipe(someOtherStream) -mp.end('bar') -``` - -### OPTIONS - -* `encoding` How would you like the data coming _out_ of the stream to be - encoded? Accepts any values that can be passed to `Buffer.toString()`. -* `objectMode` Emit data exactly as it comes in. This will be flipped on - by default if you write() something other than a string or Buffer at any - point. Setting `objectMode: true` will prevent setting any encoding - value. -* `async` Defaults to `false`. Set to `true` to defer data - emission until next tick. This reduces performance slightly, - but makes Minipass streams use timing behavior closer to Node - core streams. See [Timing](#timing) for more details. - -### API - -Implements the user-facing portions of Node.js's `Readable` and `Writable` -streams. - -### Methods - -* `write(chunk, [encoding], [callback])` - Put data in. (Note that, in the - base Minipass class, the same data will come out.) Returns `false` if - the stream will buffer the next write, or true if it's still in "flowing" - mode. -* `end([chunk, [encoding]], [callback])` - Signal that you have no more - data to write. This will queue an `end` event to be fired when all the - data has been consumed. -* `setEncoding(encoding)` - Set the encoding for data coming of the stream. - This can only be done once. -* `pause()` - No more data for a while, please. This also prevents `end` - from being emitted for empty streams until the stream is resumed. -* `resume()` - Resume the stream. If there's data in the buffer, it is all - discarded. Any buffered events are immediately emitted. -* `pipe(dest)` - Send all output to the stream provided. When - data is emitted, it is immediately written to any and all pipe - destinations. (Or written on next tick in `async` mode.) -* `unpipe(dest)` - Stop piping to the destination stream. This - is immediate, meaning that any asynchronously queued data will - _not_ make it to the destination when running in `async` mode. - * `options.end` - Boolean, end the destination stream when - the source stream ends. Default `true`. - * `options.proxyErrors` - Boolean, proxy `error` events from - the source stream to the destination stream. Note that - errors are _not_ proxied after the pipeline terminates, - either due to the source emitting `'end'` or manually - unpiping with `src.unpipe(dest)`. Default `false`. -* `on(ev, fn)`, `emit(ev, fn)` - Minipass streams are EventEmitters. Some - events are given special treatment, however. (See below under "events".) -* `promise()` - Returns a Promise that resolves when the stream emits - `end`, or rejects if the stream emits `error`. -* `collect()` - Return a Promise that resolves on `end` with an array - containing each chunk of data that was emitted, or rejects if the stream - emits `error`. Note that this consumes the stream data. -* `concat()` - Same as `collect()`, but concatenates the data into a single - Buffer object. Will reject the returned promise if the stream is in - objectMode, or if it goes into objectMode by the end of the data. -* `read(n)` - Consume `n` bytes of data out of the buffer. If `n` is not - provided, then consume all of it. If `n` bytes are not available, then - it returns null. **Note** consuming streams in this way is less - efficient, and can lead to unnecessary Buffer copying. -* `destroy([er])` - Destroy the stream. If an error is provided, then an - `'error'` event is emitted. If the stream has a `close()` method, and - has not emitted a `'close'` event yet, then `stream.close()` will be - called. Any Promises returned by `.promise()`, `.collect()` or - `.concat()` will be rejected. After being destroyed, writing to the - stream will emit an error. No more data will be emitted if the stream is - destroyed, even if it was previously buffered. - -### Properties - -* `bufferLength` Read-only. Total number of bytes buffered, or in the case - of objectMode, the total number of objects. -* `encoding` The encoding that has been set. (Setting this is equivalent - to calling `setEncoding(enc)` and has the same prohibition against - setting multiple times.) -* `flowing` Read-only. Boolean indicating whether a chunk written to the - stream will be immediately emitted. -* `emittedEnd` Read-only. Boolean indicating whether the end-ish events - (ie, `end`, `prefinish`, `finish`) have been emitted. Note that - listening on any end-ish event will immediateyl re-emit it if it has - already been emitted. -* `writable` Whether the stream is writable. Default `true`. Set to - `false` when `end()` -* `readable` Whether the stream is readable. Default `true`. -* `buffer` A [yallist](http://npm.im/yallist) linked list of chunks written - to the stream that have not yet been emitted. (It's probably a bad idea - to mess with this.) -* `pipes` A [yallist](http://npm.im/yallist) linked list of streams that - this stream is piping into. (It's probably a bad idea to mess with - this.) -* `destroyed` A getter that indicates whether the stream was destroyed. -* `paused` True if the stream has been explicitly paused, otherwise false. -* `objectMode` Indicates whether the stream is in `objectMode`. Once set - to `true`, it cannot be set to `false`. - -### Events - -* `data` Emitted when there's data to read. Argument is the data to read. - This is never emitted while not flowing. If a listener is attached, that - will resume the stream. -* `end` Emitted when there's no more data to read. This will be emitted - immediately for empty streams when `end()` is called. If a listener is - attached, and `end` was already emitted, then it will be emitted again. - All listeners are removed when `end` is emitted. -* `prefinish` An end-ish event that follows the same logic as `end` and is - emitted in the same conditions where `end` is emitted. Emitted after - `'end'`. -* `finish` An end-ish event that follows the same logic as `end` and is - emitted in the same conditions where `end` is emitted. Emitted after - `'prefinish'`. -* `close` An indication that an underlying resource has been released. - Minipass does not emit this event, but will defer it until after `end` - has been emitted, since it throws off some stream libraries otherwise. -* `drain` Emitted when the internal buffer empties, and it is again - suitable to `write()` into the stream. -* `readable` Emitted when data is buffered and ready to be read by a - consumer. -* `resume` Emitted when stream changes state from buffering to flowing - mode. (Ie, when `resume` is called, `pipe` is called, or a `data` event - listener is added.) - -### Static Methods - -* `Minipass.isStream(stream)` Returns `true` if the argument is a stream, - and false otherwise. To be considered a stream, the object must be - either an instance of Minipass, or an EventEmitter that has either a - `pipe()` method, or both `write()` and `end()` methods. (Pretty much any - stream in node-land will return `true` for this.) - -## EXAMPLES - -Here are some examples of things you can do with Minipass streams. - -### simple "are you done yet" promise - -```js -mp.promise().then(() => { - // stream is finished -}, er => { - // stream emitted an error -}) -``` - -### collecting - -```js -mp.collect().then(all => { - // all is an array of all the data emitted - // encoding is supported in this case, so - // so the result will be a collection of strings if - // an encoding is specified, or buffers/objects if not. - // - // In an async function, you may do - // const data = await stream.collect() -}) -``` - -### collecting into a single blob - -This is a bit slower because it concatenates the data into one chunk for -you, but if you're going to do it yourself anyway, it's convenient this -way: - -```js -mp.concat().then(onebigchunk => { - // onebigchunk is a string if the stream - // had an encoding set, or a buffer otherwise. -}) -``` - -### iteration - -You can iterate over streams synchronously or asynchronously in platforms -that support it. - -Synchronous iteration will end when the currently available data is -consumed, even if the `end` event has not been reached. In string and -buffer mode, the data is concatenated, so unless multiple writes are -occurring in the same tick as the `read()`, sync iteration loops will -generally only have a single iteration. - -To consume chunks in this way exactly as they have been written, with no -flattening, create the stream with the `{ objectMode: true }` option. - -```js -const mp = new Minipass({ objectMode: true }) -mp.write('a') -mp.write('b') -for (let letter of mp) { - console.log(letter) // a, b -} -mp.write('c') -mp.write('d') -for (let letter of mp) { - console.log(letter) // c, d -} -mp.write('e') -mp.end() -for (let letter of mp) { - console.log(letter) // e -} -for (let letter of mp) { - console.log(letter) // nothing -} -``` - -Asynchronous iteration will continue until the end event is reached, -consuming all of the data. - -```js -const mp = new Minipass({ encoding: 'utf8' }) - -// some source of some data -let i = 5 -const inter = setInterval(() => { - if (i-- > 0) - mp.write(Buffer.from('foo\n', 'utf8')) - else { - mp.end() - clearInterval(inter) - } -}, 100) - -// consume the data with asynchronous iteration -async function consume () { - for await (let chunk of mp) { - console.log(chunk) - } - return 'ok' -} - -consume().then(res => console.log(res)) -// logs `foo\n` 5 times, and then `ok` -``` - -### subclass that `console.log()`s everything written into it - -```js -class Logger extends Minipass { - write (chunk, encoding, callback) { - console.log('WRITE', chunk, encoding) - return super.write(chunk, encoding, callback) - } - end (chunk, encoding, callback) { - console.log('END', chunk, encoding) - return super.end(chunk, encoding, callback) - } -} - -someSource.pipe(new Logger()).pipe(someDest) -``` - -### same thing, but using an inline anonymous class - -```js -// js classes are fun -someSource - .pipe(new (class extends Minipass { - emit (ev, ...data) { - // let's also log events, because debugging some weird thing - console.log('EMIT', ev) - return super.emit(ev, ...data) - } - write (chunk, encoding, callback) { - console.log('WRITE', chunk, encoding) - return super.write(chunk, encoding, callback) - } - end (chunk, encoding, callback) { - console.log('END', chunk, encoding) - return super.end(chunk, encoding, callback) - } - })) - .pipe(someDest) -``` - -### subclass that defers 'end' for some reason - -```js -class SlowEnd extends Minipass { - emit (ev, ...args) { - if (ev === 'end') { - console.log('going to end, hold on a sec') - setTimeout(() => { - console.log('ok, ready to end now') - super.emit('end', ...args) - }, 100) - } else { - return super.emit(ev, ...args) - } - } -} -``` - -### transform that creates newline-delimited JSON - -```js -class NDJSONEncode extends Minipass { - write (obj, cb) { - try { - // JSON.stringify can throw, emit an error on that - return super.write(JSON.stringify(obj) + '\n', 'utf8', cb) - } catch (er) { - this.emit('error', er) - } - } - end (obj, cb) { - if (typeof obj === 'function') { - cb = obj - obj = undefined - } - if (obj !== undefined) { - this.write(obj) - } - return super.end(cb) - } -} -``` - -### transform that parses newline-delimited JSON - -```js -class NDJSONDecode extends Minipass { - constructor (options) { - // always be in object mode, as far as Minipass is concerned - super({ objectMode: true }) - this._jsonBuffer = '' - } - write (chunk, encoding, cb) { - if (typeof chunk === 'string' && - typeof encoding === 'string' && - encoding !== 'utf8') { - chunk = Buffer.from(chunk, encoding).toString() - } else if (Buffer.isBuffer(chunk)) - chunk = chunk.toString() - } - if (typeof encoding === 'function') { - cb = encoding - } - const jsonData = (this._jsonBuffer + chunk).split('\n') - this._jsonBuffer = jsonData.pop() - for (let i = 0; i < jsonData.length; i++) { - try { - // JSON.parse can throw, emit an error on that - super.write(JSON.parse(jsonData[i])) - } catch (er) { - this.emit('error', er) - continue - } - } - if (cb) - cb() - } -} -``` diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/index.d.ts b/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/index.d.ts deleted file mode 100644 index 65faf63..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/index.d.ts +++ /dev/null @@ -1,155 +0,0 @@ -/// -import { EventEmitter } from 'events' -import { Stream } from 'stream' - -declare namespace Minipass { - type Encoding = BufferEncoding | 'buffer' | null - - interface Writable extends EventEmitter { - end(): any - write(chunk: any, ...args: any[]): any - } - - interface Readable extends EventEmitter { - pause(): any - resume(): any - pipe(): any - } - - interface Pipe { - src: Minipass - dest: Writable - opts: PipeOptions - } - - type DualIterable = Iterable & AsyncIterable - - type ContiguousData = Buffer | ArrayBufferLike | ArrayBufferView | string - - type BufferOrString = Buffer | string - - interface StringOptions { - encoding: BufferEncoding - objectMode?: boolean - async?: boolean - } - - interface BufferOptions { - encoding?: null | 'buffer' - objectMode?: boolean - async?: boolean - } - - interface ObjectModeOptions { - objectMode: true - async?: boolean - } - - interface PipeOptions { - end?: boolean - proxyErrors?: boolean - } - - type Options = T extends string - ? StringOptions - : T extends Buffer - ? BufferOptions - : ObjectModeOptions -} - -declare class Minipass< - RType extends any = Buffer, - WType extends any = RType extends Minipass.BufferOrString - ? Minipass.ContiguousData - : RType - > - extends Stream - implements Minipass.DualIterable -{ - static isStream(stream: any): stream is Minipass.Readable | Minipass.Writable - - readonly bufferLength: number - readonly flowing: boolean - readonly writable: boolean - readonly readable: boolean - readonly paused: boolean - readonly emittedEnd: boolean - readonly destroyed: boolean - - /** - * Not technically private or readonly, but not safe to mutate. - */ - private readonly buffer: RType[] - private readonly pipes: Minipass.Pipe[] - - /** - * Technically writable, but mutating it can change the type, - * so is not safe to do in TypeScript. - */ - readonly objectMode: boolean - async: boolean - - /** - * Note: encoding is not actually read-only, and setEncoding(enc) - * exists. However, this type definition will insist that TypeScript - * programs declare the type of a Minipass stream up front, and if - * that type is string, then an encoding MUST be set in the ctor. If - * the type is Buffer, then the encoding must be missing, or set to - * 'buffer' or null. If the type is anything else, then objectMode - * must be set in the constructor options. So there is effectively - * no allowed way that a TS program can set the encoding after - * construction, as doing so will destroy any hope of type safety. - * TypeScript does not provide many options for changing the type of - * an object at run-time, which is what changing the encoding does. - */ - readonly encoding: Minipass.Encoding - // setEncoding(encoding: Encoding): void - - // Options required if not reading buffers - constructor( - ...args: RType extends Buffer - ? [] | [Minipass.Options] - : [Minipass.Options] - ) - - write(chunk: WType, cb?: () => void): boolean - write(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): boolean - read(size?: number): RType - end(cb?: () => void): this - end(chunk: any, cb?: () => void): this - end(chunk: any, encoding?: Minipass.Encoding, cb?: () => void): this - pause(): void - resume(): void - promise(): Promise - collect(): Promise - - concat(): RType extends Minipass.BufferOrString ? Promise : never - destroy(er?: any): void - pipe(dest: W, opts?: Minipass.PipeOptions): W - unpipe(dest: W): void - - /** - * alias for on() - */ - addEventHandler(event: string, listener: (...args: any[]) => any): this - - on(event: string, listener: (...args: any[]) => any): this - on(event: 'data', listener: (chunk: RType) => any): this - on(event: 'error', listener: (error: any) => any): this - on( - event: - | 'readable' - | 'drain' - | 'resume' - | 'end' - | 'prefinish' - | 'finish' - | 'close', - listener: () => any - ): this - - [Symbol.iterator](): Iterator - [Symbol.asyncIterator](): AsyncIterator -} - -export = Minipass diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/index.js b/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/index.js deleted file mode 100644 index e8797aa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/index.js +++ /dev/null @@ -1,649 +0,0 @@ -'use strict' -const proc = typeof process === 'object' && process ? process : { - stdout: null, - stderr: null, -} -const EE = require('events') -const Stream = require('stream') -const SD = require('string_decoder').StringDecoder - -const EOF = Symbol('EOF') -const MAYBE_EMIT_END = Symbol('maybeEmitEnd') -const EMITTED_END = Symbol('emittedEnd') -const EMITTING_END = Symbol('emittingEnd') -const EMITTED_ERROR = Symbol('emittedError') -const CLOSED = Symbol('closed') -const READ = Symbol('read') -const FLUSH = Symbol('flush') -const FLUSHCHUNK = Symbol('flushChunk') -const ENCODING = Symbol('encoding') -const DECODER = Symbol('decoder') -const FLOWING = Symbol('flowing') -const PAUSED = Symbol('paused') -const RESUME = Symbol('resume') -const BUFFERLENGTH = Symbol('bufferLength') -const BUFFERPUSH = Symbol('bufferPush') -const BUFFERSHIFT = Symbol('bufferShift') -const OBJECTMODE = Symbol('objectMode') -const DESTROYED = Symbol('destroyed') -const EMITDATA = Symbol('emitData') -const EMITEND = Symbol('emitEnd') -const EMITEND2 = Symbol('emitEnd2') -const ASYNC = Symbol('async') - -const defer = fn => Promise.resolve().then(fn) - -// TODO remove when Node v8 support drops -const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' -const ASYNCITERATOR = doIter && Symbol.asyncIterator - || Symbol('asyncIterator not implemented') -const ITERATOR = doIter && Symbol.iterator - || Symbol('iterator not implemented') - -// events that mean 'the stream is over' -// these are treated specially, and re-emitted -// if they are listened for after emitting. -const isEndish = ev => - ev === 'end' || - ev === 'finish' || - ev === 'prefinish' - -const isArrayBuffer = b => b instanceof ArrayBuffer || - typeof b === 'object' && - b.constructor && - b.constructor.name === 'ArrayBuffer' && - b.byteLength >= 0 - -const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) - -class Pipe { - constructor (src, dest, opts) { - this.src = src - this.dest = dest - this.opts = opts - this.ondrain = () => src[RESUME]() - dest.on('drain', this.ondrain) - } - unpipe () { - this.dest.removeListener('drain', this.ondrain) - } - // istanbul ignore next - only here for the prototype - proxyErrors () {} - end () { - this.unpipe() - if (this.opts.end) - this.dest.end() - } -} - -class PipeProxyErrors extends Pipe { - unpipe () { - this.src.removeListener('error', this.proxyErrors) - super.unpipe() - } - constructor (src, dest, opts) { - super(src, dest, opts) - this.proxyErrors = er => dest.emit('error', er) - src.on('error', this.proxyErrors) - } -} - -module.exports = class Minipass extends Stream { - constructor (options) { - super() - this[FLOWING] = false - // whether we're explicitly paused - this[PAUSED] = false - this.pipes = [] - this.buffer = [] - this[OBJECTMODE] = options && options.objectMode || false - if (this[OBJECTMODE]) - this[ENCODING] = null - else - this[ENCODING] = options && options.encoding || null - if (this[ENCODING] === 'buffer') - this[ENCODING] = null - this[ASYNC] = options && !!options.async || false - this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null - this[EOF] = false - this[EMITTED_END] = false - this[EMITTING_END] = false - this[CLOSED] = false - this[EMITTED_ERROR] = null - this.writable = true - this.readable = true - this[BUFFERLENGTH] = 0 - this[DESTROYED] = false - } - - get bufferLength () { return this[BUFFERLENGTH] } - - get encoding () { return this[ENCODING] } - set encoding (enc) { - if (this[OBJECTMODE]) - throw new Error('cannot set encoding in objectMode') - - if (this[ENCODING] && enc !== this[ENCODING] && - (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) - throw new Error('cannot change encoding') - - if (this[ENCODING] !== enc) { - this[DECODER] = enc ? new SD(enc) : null - if (this.buffer.length) - this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk)) - } - - this[ENCODING] = enc - } - - setEncoding (enc) { - this.encoding = enc - } - - get objectMode () { return this[OBJECTMODE] } - set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om } - - get ['async'] () { return this[ASYNC] } - set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a } - - write (chunk, encoding, cb) { - if (this[EOF]) - throw new Error('write after end') - - if (this[DESTROYED]) { - this.emit('error', Object.assign( - new Error('Cannot call write after a stream was destroyed'), - { code: 'ERR_STREAM_DESTROYED' } - )) - return true - } - - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - - if (!encoding) - encoding = 'utf8' - - const fn = this[ASYNC] ? defer : f => f() - - // convert array buffers and typed array views into buffers - // at some point in the future, we may want to do the opposite! - // leave strings and buffers as-is - // anything else switches us into object mode - if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { - if (isArrayBufferView(chunk)) - chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) - else if (isArrayBuffer(chunk)) - chunk = Buffer.from(chunk) - else if (typeof chunk !== 'string') - // use the setter so we throw if we have encoding set - this.objectMode = true - } - - // handle object mode up front, since it's simpler - // this yields better performance, fewer checks later. - if (this[OBJECTMODE]) { - /* istanbul ignore if - maybe impossible? */ - if (this.flowing && this[BUFFERLENGTH] !== 0) - this[FLUSH](true) - - if (this.flowing) - this.emit('data', chunk) - else - this[BUFFERPUSH](chunk) - - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') - - if (cb) - fn(cb) - - return this.flowing - } - - // at this point the chunk is a buffer or string - // don't buffer it up or send it to the decoder - if (!chunk.length) { - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') - if (cb) - fn(cb) - return this.flowing - } - - // fast-path writing strings of same encoding to a stream with - // an empty buffer, skipping the buffer/decoder dance - if (typeof chunk === 'string' && - // unless it is a string already ready for us to use - !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { - chunk = Buffer.from(chunk, encoding) - } - - if (Buffer.isBuffer(chunk) && this[ENCODING]) - chunk = this[DECODER].write(chunk) - - // Note: flushing CAN potentially switch us into not-flowing mode - if (this.flowing && this[BUFFERLENGTH] !== 0) - this[FLUSH](true) - - if (this.flowing) - this.emit('data', chunk) - else - this[BUFFERPUSH](chunk) - - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') - - if (cb) - fn(cb) - - return this.flowing - } - - read (n) { - if (this[DESTROYED]) - return null - - if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) { - this[MAYBE_EMIT_END]() - return null - } - - if (this[OBJECTMODE]) - n = null - - if (this.buffer.length > 1 && !this[OBJECTMODE]) { - if (this.encoding) - this.buffer = [this.buffer.join('')] - else - this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])] - } - - const ret = this[READ](n || null, this.buffer[0]) - this[MAYBE_EMIT_END]() - return ret - } - - [READ] (n, chunk) { - if (n === chunk.length || n === null) - this[BUFFERSHIFT]() - else { - this.buffer[0] = chunk.slice(n) - chunk = chunk.slice(0, n) - this[BUFFERLENGTH] -= n - } - - this.emit('data', chunk) - - if (!this.buffer.length && !this[EOF]) - this.emit('drain') - - return chunk - } - - end (chunk, encoding, cb) { - if (typeof chunk === 'function') - cb = chunk, chunk = null - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - if (chunk) - this.write(chunk, encoding) - if (cb) - this.once('end', cb) - this[EOF] = true - this.writable = false - - // if we haven't written anything, then go ahead and emit, - // even if we're not reading. - // we'll re-emit if a new 'end' listener is added anyway. - // This makes MP more suitable to write-only use cases. - if (this.flowing || !this[PAUSED]) - this[MAYBE_EMIT_END]() - return this - } - - // don't let the internal resume be overwritten - [RESUME] () { - if (this[DESTROYED]) - return - - this[PAUSED] = false - this[FLOWING] = true - this.emit('resume') - if (this.buffer.length) - this[FLUSH]() - else if (this[EOF]) - this[MAYBE_EMIT_END]() - else - this.emit('drain') - } - - resume () { - return this[RESUME]() - } - - pause () { - this[FLOWING] = false - this[PAUSED] = true - } - - get destroyed () { - return this[DESTROYED] - } - - get flowing () { - return this[FLOWING] - } - - get paused () { - return this[PAUSED] - } - - [BUFFERPUSH] (chunk) { - if (this[OBJECTMODE]) - this[BUFFERLENGTH] += 1 - else - this[BUFFERLENGTH] += chunk.length - this.buffer.push(chunk) - } - - [BUFFERSHIFT] () { - if (this.buffer.length) { - if (this[OBJECTMODE]) - this[BUFFERLENGTH] -= 1 - else - this[BUFFERLENGTH] -= this.buffer[0].length - } - return this.buffer.shift() - } - - [FLUSH] (noDrain) { - do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]())) - - if (!noDrain && !this.buffer.length && !this[EOF]) - this.emit('drain') - } - - [FLUSHCHUNK] (chunk) { - return chunk ? (this.emit('data', chunk), this.flowing) : false - } - - pipe (dest, opts) { - if (this[DESTROYED]) - return - - const ended = this[EMITTED_END] - opts = opts || {} - if (dest === proc.stdout || dest === proc.stderr) - opts.end = false - else - opts.end = opts.end !== false - opts.proxyErrors = !!opts.proxyErrors - - // piping an ended stream ends immediately - if (ended) { - if (opts.end) - dest.end() - } else { - this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts) - : new PipeProxyErrors(this, dest, opts)) - if (this[ASYNC]) - defer(() => this[RESUME]()) - else - this[RESUME]() - } - - return dest - } - - unpipe (dest) { - const p = this.pipes.find(p => p.dest === dest) - if (p) { - this.pipes.splice(this.pipes.indexOf(p), 1) - p.unpipe() - } - } - - addListener (ev, fn) { - return this.on(ev, fn) - } - - on (ev, fn) { - const ret = super.on(ev, fn) - if (ev === 'data' && !this.pipes.length && !this.flowing) - this[RESUME]() - else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) - super.emit('readable') - else if (isEndish(ev) && this[EMITTED_END]) { - super.emit(ev) - this.removeAllListeners(ev) - } else if (ev === 'error' && this[EMITTED_ERROR]) { - if (this[ASYNC]) - defer(() => fn.call(this, this[EMITTED_ERROR])) - else - fn.call(this, this[EMITTED_ERROR]) - } - return ret - } - - get emittedEnd () { - return this[EMITTED_END] - } - - [MAYBE_EMIT_END] () { - if (!this[EMITTING_END] && - !this[EMITTED_END] && - !this[DESTROYED] && - this.buffer.length === 0 && - this[EOF]) { - this[EMITTING_END] = true - this.emit('end') - this.emit('prefinish') - this.emit('finish') - if (this[CLOSED]) - this.emit('close') - this[EMITTING_END] = false - } - } - - emit (ev, data, ...extra) { - // error and close are only events allowed after calling destroy() - if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) - return - else if (ev === 'data') { - return !data ? false - : this[ASYNC] ? defer(() => this[EMITDATA](data)) - : this[EMITDATA](data) - } else if (ev === 'end') { - return this[EMITEND]() - } else if (ev === 'close') { - this[CLOSED] = true - // don't emit close before 'end' and 'finish' - if (!this[EMITTED_END] && !this[DESTROYED]) - return - const ret = super.emit('close') - this.removeAllListeners('close') - return ret - } else if (ev === 'error') { - this[EMITTED_ERROR] = data - const ret = super.emit('error', data) - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'resume') { - const ret = super.emit('resume') - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'finish' || ev === 'prefinish') { - const ret = super.emit(ev) - this.removeAllListeners(ev) - return ret - } - - // Some other unknown event - const ret = super.emit(ev, data, ...extra) - this[MAYBE_EMIT_END]() - return ret - } - - [EMITDATA] (data) { - for (const p of this.pipes) { - if (p.dest.write(data) === false) - this.pause() - } - const ret = super.emit('data', data) - this[MAYBE_EMIT_END]() - return ret - } - - [EMITEND] () { - if (this[EMITTED_END]) - return - - this[EMITTED_END] = true - this.readable = false - if (this[ASYNC]) - defer(() => this[EMITEND2]()) - else - this[EMITEND2]() - } - - [EMITEND2] () { - if (this[DECODER]) { - const data = this[DECODER].end() - if (data) { - for (const p of this.pipes) { - p.dest.write(data) - } - super.emit('data', data) - } - } - - for (const p of this.pipes) { - p.end() - } - const ret = super.emit('end') - this.removeAllListeners('end') - return ret - } - - // const all = await stream.collect() - collect () { - const buf = [] - if (!this[OBJECTMODE]) - buf.dataLength = 0 - // set the promise first, in case an error is raised - // by triggering the flow here. - const p = this.promise() - this.on('data', c => { - buf.push(c) - if (!this[OBJECTMODE]) - buf.dataLength += c.length - }) - return p.then(() => buf) - } - - // const data = await stream.concat() - concat () { - return this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this.collect().then(buf => - this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength)) - } - - // stream.promise().then(() => done, er => emitted error) - promise () { - return new Promise((resolve, reject) => { - this.on(DESTROYED, () => reject(new Error('stream destroyed'))) - this.on('error', er => reject(er)) - this.on('end', () => resolve()) - }) - } - - // for await (let chunk of stream) - [ASYNCITERATOR] () { - const next = () => { - const res = this.read() - if (res !== null) - return Promise.resolve({ done: false, value: res }) - - if (this[EOF]) - return Promise.resolve({ done: true }) - - let resolve = null - let reject = null - const onerr = er => { - this.removeListener('data', ondata) - this.removeListener('end', onend) - reject(er) - } - const ondata = value => { - this.removeListener('error', onerr) - this.removeListener('end', onend) - this.pause() - resolve({ value: value, done: !!this[EOF] }) - } - const onend = () => { - this.removeListener('error', onerr) - this.removeListener('data', ondata) - resolve({ done: true }) - } - const ondestroy = () => onerr(new Error('stream destroyed')) - return new Promise((res, rej) => { - reject = rej - resolve = res - this.once(DESTROYED, ondestroy) - this.once('error', onerr) - this.once('end', onend) - this.once('data', ondata) - }) - } - - return { next } - } - - // for (let chunk of stream) - [ITERATOR] () { - const next = () => { - const value = this.read() - const done = value === null - return { value, done } - } - return { next } - } - - destroy (er) { - if (this[DESTROYED]) { - if (er) - this.emit('error', er) - else - this.emit(DESTROYED) - return this - } - - this[DESTROYED] = true - - // throw away all buffered data, it's never coming out - this.buffer.length = 0 - this[BUFFERLENGTH] = 0 - - if (typeof this.close === 'function' && !this[CLOSED]) - this.close() - - if (er) - this.emit('error', er) - else // if no error to emit, still reject pending promises - this.emit(DESTROYED) - - return this - } - - static isStream (s) { - return !!s && (s instanceof Minipass || s instanceof Stream || - s instanceof EE && ( - typeof s.pipe === 'function' || // readable - (typeof s.write === 'function' && typeof s.end === 'function') // writable - )) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/package.json b/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/package.json deleted file mode 100644 index 548d03f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "minipass", - "version": "3.3.6", - "description": "minimal implementation of a PassThrough stream", - "main": "index.js", - "types": "index.d.ts", - "dependencies": { - "yallist": "^4.0.0" - }, - "devDependencies": { - "@types/node": "^17.0.41", - "end-of-stream": "^1.4.0", - "prettier": "^2.6.2", - "tap": "^16.2.0", - "through2": "^2.0.3", - "ts-node": "^10.8.1", - "typescript": "^4.7.3" - }, - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/minipass.git" - }, - "keywords": [ - "passthrough", - "stream" - ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "files": [ - "index.d.ts", - "index.js" - ], - "tap": { - "check-coverage": true - }, - "engines": { - "node": ">=8" - }, - "prettier": { - "semi": false, - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/yallist b/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/yallist deleted file mode 120000 index 026812a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@3.3.6/node_modules/yallist +++ /dev/null @@ -1 +0,0 @@ -../../yallist@4.0.0/node_modules/yallist \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/LICENSE b/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/LICENSE deleted file mode 100644 index 97f8e32..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/README.md b/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/README.md deleted file mode 100644 index 6108809..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/README.md +++ /dev/null @@ -1,769 +0,0 @@ -# minipass - -A _very_ minimal implementation of a [PassThrough -stream](https://nodejs.org/api/stream.html#stream_class_stream_passthrough) - -[It's very -fast](https://docs.google.com/spreadsheets/d/1K_HR5oh3r80b8WVMWCPPjfuWXUgfkmhlX7FGI6JJ8tY/edit?usp=sharing) -for objects, strings, and buffers. - -Supports `pipe()`ing (including multi-`pipe()` and backpressure -transmission), buffering data until either a `data` event handler -or `pipe()` is added (so you don't lose the first chunk), and -most other cases where PassThrough is a good idea. - -There is a `read()` method, but it's much more efficient to -consume data from this stream via `'data'` events or by calling -`pipe()` into some other stream. Calling `read()` requires the -buffer to be flattened in some cases, which requires copying -memory. - -If you set `objectMode: true` in the options, then whatever is -written will be emitted. Otherwise, it'll do a minimal amount of -Buffer copying to ensure proper Streams semantics when `read(n)` -is called. - -`objectMode` can also be set by doing `stream.objectMode = true`, -or by writing any non-string/non-buffer data. `objectMode` cannot -be set to false once it is set. - -This is not a `through` or `through2` stream. It doesn't -transform the data, it just passes it right through. If you want -to transform the data, extend the class, and override the -`write()` method. Once you're done transforming the data however -you want, call `super.write()` with the transform output. - -For some examples of streams that extend Minipass in various -ways, check out: - -- [minizlib](http://npm.im/minizlib) -- [fs-minipass](http://npm.im/fs-minipass) -- [tar](http://npm.im/tar) -- [minipass-collect](http://npm.im/minipass-collect) -- [minipass-flush](http://npm.im/minipass-flush) -- [minipass-pipeline](http://npm.im/minipass-pipeline) -- [tap](http://npm.im/tap) -- [tap-parser](http://npm.im/tap-parser) -- [treport](http://npm.im/treport) -- [minipass-fetch](http://npm.im/minipass-fetch) -- [pacote](http://npm.im/pacote) -- [make-fetch-happen](http://npm.im/make-fetch-happen) -- [cacache](http://npm.im/cacache) -- [ssri](http://npm.im/ssri) -- [npm-registry-fetch](http://npm.im/npm-registry-fetch) -- [minipass-json-stream](http://npm.im/minipass-json-stream) -- [minipass-sized](http://npm.im/minipass-sized) - -## Differences from Node.js Streams - -There are several things that make Minipass streams different -from (and in some ways superior to) Node.js core streams. - -Please read these caveats if you are familiar with node-core -streams and intend to use Minipass streams in your programs. - -You can avoid most of these differences entirely (for a very -small performance penalty) by setting `{async: true}` in the -constructor options. - -### Timing - -Minipass streams are designed to support synchronous use-cases. -Thus, data is emitted as soon as it is available, always. It is -buffered until read, but no longer. Another way to look at it is -that Minipass streams are exactly as synchronous as the logic -that writes into them. - -This can be surprising if your code relies on -`PassThrough.write()` always providing data on the next tick -rather than the current one, or being able to call `resume()` and -not have the entire buffer disappear immediately. - -However, without this synchronicity guarantee, there would be no -way for Minipass to achieve the speeds it does, or support the -synchronous use cases that it does. Simply put, waiting takes -time. - -This non-deferring approach makes Minipass streams much easier to -reason about, especially in the context of Promises and other -flow-control mechanisms. - -Example: - -```js -// hybrid module, either works -import { Minipass } from 'minipass' -// or: -const { Minipass } = require('minipass') - -const stream = new Minipass() -stream.on('data', () => console.log('data event')) -console.log('before write') -stream.write('hello') -console.log('after write') -// output: -// before write -// data event -// after write -``` - -### Exception: Async Opt-In - -If you wish to have a Minipass stream with behavior that more -closely mimics Node.js core streams, you can set the stream in -async mode either by setting `async: true` in the constructor -options, or by setting `stream.async = true` later on. - -```js -// hybrid module, either works -import { Minipass } from 'minipass' -// or: -const { Minipass } = require('minipass') - -const asyncStream = new Minipass({ async: true }) -asyncStream.on('data', () => console.log('data event')) -console.log('before write') -asyncStream.write('hello') -console.log('after write') -// output: -// before write -// after write -// data event <-- this is deferred until the next tick -``` - -Switching _out_ of async mode is unsafe, as it could cause data -corruption, and so is not enabled. Example: - -```js -import { Minipass } from 'minipass' -const stream = new Minipass({ encoding: 'utf8' }) -stream.on('data', chunk => console.log(chunk)) -stream.async = true -console.log('before writes') -stream.write('hello') -setStreamSyncAgainSomehow(stream) // <-- this doesn't actually exist! -stream.write('world') -console.log('after writes') -// hypothetical output would be: -// before writes -// world -// after writes -// hello -// NOT GOOD! -``` - -To avoid this problem, once set into async mode, any attempt to -make the stream sync again will be ignored. - -```js -const { Minipass } = require('minipass') -const stream = new Minipass({ encoding: 'utf8' }) -stream.on('data', chunk => console.log(chunk)) -stream.async = true -console.log('before writes') -stream.write('hello') -stream.async = false // <-- no-op, stream already async -stream.write('world') -console.log('after writes') -// actual output: -// before writes -// after writes -// hello -// world -``` - -### No High/Low Water Marks - -Node.js core streams will optimistically fill up a buffer, -returning `true` on all writes until the limit is hit, even if -the data has nowhere to go. Then, they will not attempt to draw -more data in until the buffer size dips below a minimum value. - -Minipass streams are much simpler. The `write()` method will -return `true` if the data has somewhere to go (which is to say, -given the timing guarantees, that the data is already there by -the time `write()` returns). - -If the data has nowhere to go, then `write()` returns false, and -the data sits in a buffer, to be drained out immediately as soon -as anyone consumes it. - -Since nothing is ever buffered unnecessarily, there is much less -copying data, and less bookkeeping about buffer capacity levels. - -### Hazards of Buffering (or: Why Minipass Is So Fast) - -Since data written to a Minipass stream is immediately written -all the way through the pipeline, and `write()` always returns -true/false based on whether the data was fully flushed, -backpressure is communicated immediately to the upstream caller. -This minimizes buffering. - -Consider this case: - -```js -const { PassThrough } = require('stream') -const p1 = new PassThrough({ highWaterMark: 1024 }) -const p2 = new PassThrough({ highWaterMark: 1024 }) -const p3 = new PassThrough({ highWaterMark: 1024 }) -const p4 = new PassThrough({ highWaterMark: 1024 }) - -p1.pipe(p2).pipe(p3).pipe(p4) -p4.on('data', () => console.log('made it through')) - -// this returns false and buffers, then writes to p2 on next tick (1) -// p2 returns false and buffers, pausing p1, then writes to p3 on next tick (2) -// p3 returns false and buffers, pausing p2, then writes to p4 on next tick (3) -// p4 returns false and buffers, pausing p3, then emits 'data' and 'drain' -// on next tick (4) -// p3 sees p4's 'drain' event, and calls resume(), emitting 'resume' and -// 'drain' on next tick (5) -// p2 sees p3's 'drain', calls resume(), emits 'resume' and 'drain' on next tick (6) -// p1 sees p2's 'drain', calls resume(), emits 'resume' and 'drain' on next -// tick (7) - -p1.write(Buffer.alloc(2048)) // returns false -``` - -Along the way, the data was buffered and deferred at each stage, -and multiple event deferrals happened, for an unblocked pipeline -where it was perfectly safe to write all the way through! - -Furthermore, setting a `highWaterMark` of `1024` might lead -someone reading the code to think an advisory maximum of 1KiB is -being set for the pipeline. However, the actual advisory -buffering level is the _sum_ of `highWaterMark` values, since -each one has its own bucket. - -Consider the Minipass case: - -```js -const m1 = new Minipass() -const m2 = new Minipass() -const m3 = new Minipass() -const m4 = new Minipass() - -m1.pipe(m2).pipe(m3).pipe(m4) -m4.on('data', () => console.log('made it through')) - -// m1 is flowing, so it writes the data to m2 immediately -// m2 is flowing, so it writes the data to m3 immediately -// m3 is flowing, so it writes the data to m4 immediately -// m4 is flowing, so it fires the 'data' event immediately, returns true -// m4's write returned true, so m3 is still flowing, returns true -// m3's write returned true, so m2 is still flowing, returns true -// m2's write returned true, so m1 is still flowing, returns true -// No event deferrals or buffering along the way! - -m1.write(Buffer.alloc(2048)) // returns true -``` - -It is extremely unlikely that you _don't_ want to buffer any data -written, or _ever_ buffer data that can be flushed all the way -through. Neither node-core streams nor Minipass ever fail to -buffer written data, but node-core streams do a lot of -unnecessary buffering and pausing. - -As always, the faster implementation is the one that does less -stuff and waits less time to do it. - -### Immediately emit `end` for empty streams (when not paused) - -If a stream is not paused, and `end()` is called before writing -any data into it, then it will emit `end` immediately. - -If you have logic that occurs on the `end` event which you don't -want to potentially happen immediately (for example, closing file -descriptors, moving on to the next entry in an archive parse -stream, etc.) then be sure to call `stream.pause()` on creation, -and then `stream.resume()` once you are ready to respond to the -`end` event. - -However, this is _usually_ not a problem because: - -### Emit `end` When Asked - -One hazard of immediately emitting `'end'` is that you may not -yet have had a chance to add a listener. In order to avoid this -hazard, Minipass streams safely re-emit the `'end'` event if a -new listener is added after `'end'` has been emitted. - -Ie, if you do `stream.on('end', someFunction)`, and the stream -has already emitted `end`, then it will call the handler right -away. (You can think of this somewhat like attaching a new -`.then(fn)` to a previously-resolved Promise.) - -To prevent calling handlers multiple times who would not expect -multiple ends to occur, all listeners are removed from the -`'end'` event whenever it is emitted. - -### Emit `error` When Asked - -The most recent error object passed to the `'error'` event is -stored on the stream. If a new `'error'` event handler is added, -and an error was previously emitted, then the event handler will -be called immediately (or on `process.nextTick` in the case of -async streams). - -This makes it much more difficult to end up trying to interact -with a broken stream, if the error handler is added after an -error was previously emitted. - -### Impact of "immediate flow" on Tee-streams - -A "tee stream" is a stream piping to multiple destinations: - -```js -const tee = new Minipass() -t.pipe(dest1) -t.pipe(dest2) -t.write('foo') // goes to both destinations -``` - -Since Minipass streams _immediately_ process any pending data -through the pipeline when a new pipe destination is added, this -can have surprising effects, especially when a stream comes in -from some other function and may or may not have data in its -buffer. - -```js -// WARNING! WILL LOSE DATA! -const src = new Minipass() -src.write('foo') -src.pipe(dest1) // 'foo' chunk flows to dest1 immediately, and is gone -src.pipe(dest2) // gets nothing! -``` - -One solution is to create a dedicated tee-stream junction that -pipes to both locations, and then pipe to _that_ instead. - -```js -// Safe example: tee to both places -const src = new Minipass() -src.write('foo') -const tee = new Minipass() -tee.pipe(dest1) -tee.pipe(dest2) -src.pipe(tee) // tee gets 'foo', pipes to both locations -``` - -The same caveat applies to `on('data')` event listeners. The -first one added will _immediately_ receive all of the data, -leaving nothing for the second: - -```js -// WARNING! WILL LOSE DATA! -const src = new Minipass() -src.write('foo') -src.on('data', handler1) // receives 'foo' right away -src.on('data', handler2) // nothing to see here! -``` - -Using a dedicated tee-stream can be used in this case as well: - -```js -// Safe example: tee to both data handlers -const src = new Minipass() -src.write('foo') -const tee = new Minipass() -tee.on('data', handler1) -tee.on('data', handler2) -src.pipe(tee) -``` - -All of the hazards in this section are avoided by setting `{ -async: true }` in the Minipass constructor, or by setting -`stream.async = true` afterwards. Note that this does add some -overhead, so should only be done in cases where you are willing -to lose a bit of performance in order to avoid having to refactor -program logic. - -## USAGE - -It's a stream! Use it like a stream and it'll most likely do what -you want. - -```js -import { Minipass } from 'minipass' -const mp = new Minipass(options) // optional: { encoding, objectMode } -mp.write('foo') -mp.pipe(someOtherStream) -mp.end('bar') -``` - -### OPTIONS - -- `encoding` How would you like the data coming _out_ of the - stream to be encoded? Accepts any values that can be passed to - `Buffer.toString()`. -- `objectMode` Emit data exactly as it comes in. This will be - flipped on by default if you write() something other than a - string or Buffer at any point. Setting `objectMode: true` will - prevent setting any encoding value. -- `async` Defaults to `false`. Set to `true` to defer data - emission until next tick. This reduces performance slightly, - but makes Minipass streams use timing behavior closer to Node - core streams. See [Timing](#timing) for more details. -- `signal` An `AbortSignal` that will cause the stream to unhook - itself from everything and become as inert as possible. Note - that providing a `signal` parameter will make `'error'` events - no longer throw if they are unhandled, but they will still be - emitted to handlers if any are attached. - -### API - -Implements the user-facing portions of Node.js's `Readable` and -`Writable` streams. - -### Methods - -- `write(chunk, [encoding], [callback])` - Put data in. (Note - that, in the base Minipass class, the same data will come out.) - Returns `false` if the stream will buffer the next write, or - true if it's still in "flowing" mode. -- `end([chunk, [encoding]], [callback])` - Signal that you have - no more data to write. This will queue an `end` event to be - fired when all the data has been consumed. -- `setEncoding(encoding)` - Set the encoding for data coming of - the stream. This can only be done once. -- `pause()` - No more data for a while, please. This also - prevents `end` from being emitted for empty streams until the - stream is resumed. -- `resume()` - Resume the stream. If there's data in the buffer, - it is all discarded. Any buffered events are immediately - emitted. -- `pipe(dest)` - Send all output to the stream provided. When - data is emitted, it is immediately written to any and all pipe - destinations. (Or written on next tick in `async` mode.) -- `unpipe(dest)` - Stop piping to the destination stream. This is - immediate, meaning that any asynchronously queued data will - _not_ make it to the destination when running in `async` mode. - - `options.end` - Boolean, end the destination stream when the - source stream ends. Default `true`. - - `options.proxyErrors` - Boolean, proxy `error` events from - the source stream to the destination stream. Note that errors - are _not_ proxied after the pipeline terminates, either due - to the source emitting `'end'` or manually unpiping with - `src.unpipe(dest)`. Default `false`. -- `on(ev, fn)`, `emit(ev, fn)` - Minipass streams are - EventEmitters. Some events are given special treatment, - however. (See below under "events".) -- `promise()` - Returns a Promise that resolves when the stream - emits `end`, or rejects if the stream emits `error`. -- `collect()` - Return a Promise that resolves on `end` with an - array containing each chunk of data that was emitted, or - rejects if the stream emits `error`. Note that this consumes - the stream data. -- `concat()` - Same as `collect()`, but concatenates the data - into a single Buffer object. Will reject the returned promise - if the stream is in objectMode, or if it goes into objectMode - by the end of the data. -- `read(n)` - Consume `n` bytes of data out of the buffer. If `n` - is not provided, then consume all of it. If `n` bytes are not - available, then it returns null. **Note** consuming streams in - this way is less efficient, and can lead to unnecessary Buffer - copying. -- `destroy([er])` - Destroy the stream. If an error is provided, - then an `'error'` event is emitted. If the stream has a - `close()` method, and has not emitted a `'close'` event yet, - then `stream.close()` will be called. Any Promises returned by - `.promise()`, `.collect()` or `.concat()` will be rejected. - After being destroyed, writing to the stream will emit an - error. No more data will be emitted if the stream is destroyed, - even if it was previously buffered. - -### Properties - -- `bufferLength` Read-only. Total number of bytes buffered, or in - the case of objectMode, the total number of objects. -- `encoding` The encoding that has been set. (Setting this is - equivalent to calling `setEncoding(enc)` and has the same - prohibition against setting multiple times.) -- `flowing` Read-only. Boolean indicating whether a chunk written - to the stream will be immediately emitted. -- `emittedEnd` Read-only. Boolean indicating whether the end-ish - events (ie, `end`, `prefinish`, `finish`) have been emitted. - Note that listening on any end-ish event will immediateyl - re-emit it if it has already been emitted. -- `writable` Whether the stream is writable. Default `true`. Set - to `false` when `end()` -- `readable` Whether the stream is readable. Default `true`. -- `pipes` An array of Pipe objects referencing streams that this - stream is piping into. -- `destroyed` A getter that indicates whether the stream was - destroyed. -- `paused` True if the stream has been explicitly paused, - otherwise false. -- `objectMode` Indicates whether the stream is in `objectMode`. - Once set to `true`, it cannot be set to `false`. -- `aborted` Readonly property set when the `AbortSignal` - dispatches an `abort` event. - -### Events - -- `data` Emitted when there's data to read. Argument is the data - to read. This is never emitted while not flowing. If a listener - is attached, that will resume the stream. -- `end` Emitted when there's no more data to read. This will be - emitted immediately for empty streams when `end()` is called. - If a listener is attached, and `end` was already emitted, then - it will be emitted again. All listeners are removed when `end` - is emitted. -- `prefinish` An end-ish event that follows the same logic as - `end` and is emitted in the same conditions where `end` is - emitted. Emitted after `'end'`. -- `finish` An end-ish event that follows the same logic as `end` - and is emitted in the same conditions where `end` is emitted. - Emitted after `'prefinish'`. -- `close` An indication that an underlying resource has been - released. Minipass does not emit this event, but will defer it - until after `end` has been emitted, since it throws off some - stream libraries otherwise. -- `drain` Emitted when the internal buffer empties, and it is - again suitable to `write()` into the stream. -- `readable` Emitted when data is buffered and ready to be read - by a consumer. -- `resume` Emitted when stream changes state from buffering to - flowing mode. (Ie, when `resume` is called, `pipe` is called, - or a `data` event listener is added.) - -### Static Methods - -- `Minipass.isStream(stream)` Returns `true` if the argument is a - stream, and false otherwise. To be considered a stream, the - object must be either an instance of Minipass, or an - EventEmitter that has either a `pipe()` method, or both - `write()` and `end()` methods. (Pretty much any stream in - node-land will return `true` for this.) - -## EXAMPLES - -Here are some examples of things you can do with Minipass -streams. - -### simple "are you done yet" promise - -```js -mp.promise().then( - () => { - // stream is finished - }, - er => { - // stream emitted an error - } -) -``` - -### collecting - -```js -mp.collect().then(all => { - // all is an array of all the data emitted - // encoding is supported in this case, so - // so the result will be a collection of strings if - // an encoding is specified, or buffers/objects if not. - // - // In an async function, you may do - // const data = await stream.collect() -}) -``` - -### collecting into a single blob - -This is a bit slower because it concatenates the data into one -chunk for you, but if you're going to do it yourself anyway, it's -convenient this way: - -```js -mp.concat().then(onebigchunk => { - // onebigchunk is a string if the stream - // had an encoding set, or a buffer otherwise. -}) -``` - -### iteration - -You can iterate over streams synchronously or asynchronously in -platforms that support it. - -Synchronous iteration will end when the currently available data -is consumed, even if the `end` event has not been reached. In -string and buffer mode, the data is concatenated, so unless -multiple writes are occurring in the same tick as the `read()`, -sync iteration loops will generally only have a single iteration. - -To consume chunks in this way exactly as they have been written, -with no flattening, create the stream with the `{ objectMode: -true }` option. - -```js -const mp = new Minipass({ objectMode: true }) -mp.write('a') -mp.write('b') -for (let letter of mp) { - console.log(letter) // a, b -} -mp.write('c') -mp.write('d') -for (let letter of mp) { - console.log(letter) // c, d -} -mp.write('e') -mp.end() -for (let letter of mp) { - console.log(letter) // e -} -for (let letter of mp) { - console.log(letter) // nothing -} -``` - -Asynchronous iteration will continue until the end event is reached, -consuming all of the data. - -```js -const mp = new Minipass({ encoding: 'utf8' }) - -// some source of some data -let i = 5 -const inter = setInterval(() => { - if (i-- > 0) mp.write(Buffer.from('foo\n', 'utf8')) - else { - mp.end() - clearInterval(inter) - } -}, 100) - -// consume the data with asynchronous iteration -async function consume() { - for await (let chunk of mp) { - console.log(chunk) - } - return 'ok' -} - -consume().then(res => console.log(res)) -// logs `foo\n` 5 times, and then `ok` -``` - -### subclass that `console.log()`s everything written into it - -```js -class Logger extends Minipass { - write(chunk, encoding, callback) { - console.log('WRITE', chunk, encoding) - return super.write(chunk, encoding, callback) - } - end(chunk, encoding, callback) { - console.log('END', chunk, encoding) - return super.end(chunk, encoding, callback) - } -} - -someSource.pipe(new Logger()).pipe(someDest) -``` - -### same thing, but using an inline anonymous class - -```js -// js classes are fun -someSource - .pipe( - new (class extends Minipass { - emit(ev, ...data) { - // let's also log events, because debugging some weird thing - console.log('EMIT', ev) - return super.emit(ev, ...data) - } - write(chunk, encoding, callback) { - console.log('WRITE', chunk, encoding) - return super.write(chunk, encoding, callback) - } - end(chunk, encoding, callback) { - console.log('END', chunk, encoding) - return super.end(chunk, encoding, callback) - } - })() - ) - .pipe(someDest) -``` - -### subclass that defers 'end' for some reason - -```js -class SlowEnd extends Minipass { - emit(ev, ...args) { - if (ev === 'end') { - console.log('going to end, hold on a sec') - setTimeout(() => { - console.log('ok, ready to end now') - super.emit('end', ...args) - }, 100) - } else { - return super.emit(ev, ...args) - } - } -} -``` - -### transform that creates newline-delimited JSON - -```js -class NDJSONEncode extends Minipass { - write(obj, cb) { - try { - // JSON.stringify can throw, emit an error on that - return super.write(JSON.stringify(obj) + '\n', 'utf8', cb) - } catch (er) { - this.emit('error', er) - } - } - end(obj, cb) { - if (typeof obj === 'function') { - cb = obj - obj = undefined - } - if (obj !== undefined) { - this.write(obj) - } - return super.end(cb) - } -} -``` - -### transform that parses newline-delimited JSON - -```js -class NDJSONDecode extends Minipass { - constructor (options) { - // always be in object mode, as far as Minipass is concerned - super({ objectMode: true }) - this._jsonBuffer = '' - } - write (chunk, encoding, cb) { - if (typeof chunk === 'string' && - typeof encoding === 'string' && - encoding !== 'utf8') { - chunk = Buffer.from(chunk, encoding).toString() - } else if (Buffer.isBuffer(chunk)) { - chunk = chunk.toString() - } - if (typeof encoding === 'function') { - cb = encoding - } - const jsonData = (this._jsonBuffer + chunk).split('\n') - this._jsonBuffer = jsonData.pop() - for (let i = 0; i < jsonData.length; i++) { - try { - // JSON.parse can throw, emit an error on that - super.write(JSON.parse(jsonData[i])) - } catch (er) { - this.emit('error', er) - continue - } - } - if (cb) - cb() - } -} -``` diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.d.ts b/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.d.ts deleted file mode 100644 index 86851f9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -/// - -// Note: marking anything protected or private in the exported -// class will limit Minipass's ability to be used as the base -// for mixin classes. -import { EventEmitter } from 'events' -import { Stream } from 'stream' - -export namespace Minipass { - export type Encoding = BufferEncoding | 'buffer' | null - - export interface Writable extends EventEmitter { - end(): any - write(chunk: any, ...args: any[]): any - } - - export interface Readable extends EventEmitter { - pause(): any - resume(): any - pipe(): any - } - - export type DualIterable = Iterable & AsyncIterable - - export type ContiguousData = - | Buffer - | ArrayBufferLike - | ArrayBufferView - | string - - export type BufferOrString = Buffer | string - - export interface SharedOptions { - async?: boolean - signal?: AbortSignal - } - - export interface StringOptions extends SharedOptions { - encoding: BufferEncoding - objectMode?: boolean - } - - export interface BufferOptions extends SharedOptions { - encoding?: null | 'buffer' - objectMode?: boolean - } - - export interface ObjectModeOptions extends SharedOptions { - objectMode: true - } - - export interface PipeOptions { - end?: boolean - proxyErrors?: boolean - } - - export type Options = T extends string - ? StringOptions - : T extends Buffer - ? BufferOptions - : ObjectModeOptions -} - -export class Minipass< - RType extends any = Buffer, - WType extends any = RType extends Minipass.BufferOrString - ? Minipass.ContiguousData - : RType - > - extends Stream - implements Minipass.DualIterable -{ - static isStream(stream: any): stream is Minipass.Readable | Minipass.Writable - - readonly bufferLength: number - readonly flowing: boolean - readonly writable: boolean - readonly readable: boolean - readonly aborted: boolean - readonly paused: boolean - readonly emittedEnd: boolean - readonly destroyed: boolean - - /** - * Technically writable, but mutating it can change the type, - * so is not safe to do in TypeScript. - */ - readonly objectMode: boolean - async: boolean - - /** - * Note: encoding is not actually read-only, and setEncoding(enc) - * exists. However, this type definition will insist that TypeScript - * programs declare the type of a Minipass stream up front, and if - * that type is string, then an encoding MUST be set in the ctor. If - * the type is Buffer, then the encoding must be missing, or set to - * 'buffer' or null. If the type is anything else, then objectMode - * must be set in the constructor options. So there is effectively - * no allowed way that a TS program can set the encoding after - * construction, as doing so will destroy any hope of type safety. - * TypeScript does not provide many options for changing the type of - * an object at run-time, which is what changing the encoding does. - */ - readonly encoding: Minipass.Encoding - // setEncoding(encoding: Encoding): void - - // Options required if not reading buffers - constructor( - ...args: RType extends Buffer - ? [] | [Minipass.Options] - : [Minipass.Options] - ) - - write(chunk: WType, cb?: () => void): boolean - write(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): boolean - read(size?: number): RType - end(cb?: () => void): this - end(chunk: any, cb?: () => void): this - end(chunk: any, encoding?: Minipass.Encoding, cb?: () => void): this - pause(): void - resume(): void - promise(): Promise - collect(): Promise - - concat(): RType extends Minipass.BufferOrString ? Promise : never - destroy(er?: any): void - pipe(dest: W, opts?: Minipass.PipeOptions): W - unpipe(dest: W): void - - /** - * alias for on() - */ - addEventHandler(event: string, listener: (...args: any[]) => any): this - - on(event: string, listener: (...args: any[]) => any): this - on(event: 'data', listener: (chunk: RType) => any): this - on(event: 'error', listener: (error: any) => any): this - on( - event: - | 'readable' - | 'drain' - | 'resume' - | 'end' - | 'prefinish' - | 'finish' - | 'close', - listener: () => any - ): this - - [Symbol.iterator](): Generator - [Symbol.asyncIterator](): AsyncGenerator -} diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.js b/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.js deleted file mode 100644 index ed07c17..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.js +++ /dev/null @@ -1,702 +0,0 @@ -'use strict' -const proc = - typeof process === 'object' && process - ? process - : { - stdout: null, - stderr: null, - } -const EE = require('events') -const Stream = require('stream') -const stringdecoder = require('string_decoder') -const SD = stringdecoder.StringDecoder - -const EOF = Symbol('EOF') -const MAYBE_EMIT_END = Symbol('maybeEmitEnd') -const EMITTED_END = Symbol('emittedEnd') -const EMITTING_END = Symbol('emittingEnd') -const EMITTED_ERROR = Symbol('emittedError') -const CLOSED = Symbol('closed') -const READ = Symbol('read') -const FLUSH = Symbol('flush') -const FLUSHCHUNK = Symbol('flushChunk') -const ENCODING = Symbol('encoding') -const DECODER = Symbol('decoder') -const FLOWING = Symbol('flowing') -const PAUSED = Symbol('paused') -const RESUME = Symbol('resume') -const BUFFER = Symbol('buffer') -const PIPES = Symbol('pipes') -const BUFFERLENGTH = Symbol('bufferLength') -const BUFFERPUSH = Symbol('bufferPush') -const BUFFERSHIFT = Symbol('bufferShift') -const OBJECTMODE = Symbol('objectMode') -// internal event when stream is destroyed -const DESTROYED = Symbol('destroyed') -// internal event when stream has an error -const ERROR = Symbol('error') -const EMITDATA = Symbol('emitData') -const EMITEND = Symbol('emitEnd') -const EMITEND2 = Symbol('emitEnd2') -const ASYNC = Symbol('async') -const ABORT = Symbol('abort') -const ABORTED = Symbol('aborted') -const SIGNAL = Symbol('signal') - -const defer = fn => Promise.resolve().then(fn) - -// TODO remove when Node v8 support drops -const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' -const ASYNCITERATOR = - (doIter && Symbol.asyncIterator) || Symbol('asyncIterator not implemented') -const ITERATOR = - (doIter && Symbol.iterator) || Symbol('iterator not implemented') - -// events that mean 'the stream is over' -// these are treated specially, and re-emitted -// if they are listened for after emitting. -const isEndish = ev => ev === 'end' || ev === 'finish' || ev === 'prefinish' - -const isArrayBuffer = b => - b instanceof ArrayBuffer || - (typeof b === 'object' && - b.constructor && - b.constructor.name === 'ArrayBuffer' && - b.byteLength >= 0) - -const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) - -class Pipe { - constructor(src, dest, opts) { - this.src = src - this.dest = dest - this.opts = opts - this.ondrain = () => src[RESUME]() - dest.on('drain', this.ondrain) - } - unpipe() { - this.dest.removeListener('drain', this.ondrain) - } - // istanbul ignore next - only here for the prototype - proxyErrors() {} - end() { - this.unpipe() - if (this.opts.end) this.dest.end() - } -} - -class PipeProxyErrors extends Pipe { - unpipe() { - this.src.removeListener('error', this.proxyErrors) - super.unpipe() - } - constructor(src, dest, opts) { - super(src, dest, opts) - this.proxyErrors = er => dest.emit('error', er) - src.on('error', this.proxyErrors) - } -} - -class Minipass extends Stream { - constructor(options) { - super() - this[FLOWING] = false - // whether we're explicitly paused - this[PAUSED] = false - this[PIPES] = [] - this[BUFFER] = [] - this[OBJECTMODE] = (options && options.objectMode) || false - if (this[OBJECTMODE]) this[ENCODING] = null - else this[ENCODING] = (options && options.encoding) || null - if (this[ENCODING] === 'buffer') this[ENCODING] = null - this[ASYNC] = (options && !!options.async) || false - this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null - this[EOF] = false - this[EMITTED_END] = false - this[EMITTING_END] = false - this[CLOSED] = false - this[EMITTED_ERROR] = null - this.writable = true - this.readable = true - this[BUFFERLENGTH] = 0 - this[DESTROYED] = false - if (options && options.debugExposeBuffer === true) { - Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] }) - } - if (options && options.debugExposePipes === true) { - Object.defineProperty(this, 'pipes', { get: () => this[PIPES] }) - } - this[SIGNAL] = options && options.signal - this[ABORTED] = false - if (this[SIGNAL]) { - this[SIGNAL].addEventListener('abort', () => this[ABORT]()) - if (this[SIGNAL].aborted) { - this[ABORT]() - } - } - } - - get bufferLength() { - return this[BUFFERLENGTH] - } - - get encoding() { - return this[ENCODING] - } - set encoding(enc) { - if (this[OBJECTMODE]) throw new Error('cannot set encoding in objectMode') - - if ( - this[ENCODING] && - enc !== this[ENCODING] && - ((this[DECODER] && this[DECODER].lastNeed) || this[BUFFERLENGTH]) - ) - throw new Error('cannot change encoding') - - if (this[ENCODING] !== enc) { - this[DECODER] = enc ? new SD(enc) : null - if (this[BUFFER].length) - this[BUFFER] = this[BUFFER].map(chunk => this[DECODER].write(chunk)) - } - - this[ENCODING] = enc - } - - setEncoding(enc) { - this.encoding = enc - } - - get objectMode() { - return this[OBJECTMODE] - } - set objectMode(om) { - this[OBJECTMODE] = this[OBJECTMODE] || !!om - } - - get ['async']() { - return this[ASYNC] - } - set ['async'](a) { - this[ASYNC] = this[ASYNC] || !!a - } - - // drop everything and get out of the flow completely - [ABORT]() { - this[ABORTED] = true - this.emit('abort', this[SIGNAL].reason) - this.destroy(this[SIGNAL].reason) - } - - get aborted() { - return this[ABORTED] - } - set aborted(_) {} - - write(chunk, encoding, cb) { - if (this[ABORTED]) return false - if (this[EOF]) throw new Error('write after end') - - if (this[DESTROYED]) { - this.emit( - 'error', - Object.assign( - new Error('Cannot call write after a stream was destroyed'), - { code: 'ERR_STREAM_DESTROYED' } - ) - ) - return true - } - - if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') - - if (!encoding) encoding = 'utf8' - - const fn = this[ASYNC] ? defer : f => f() - - // convert array buffers and typed array views into buffers - // at some point in the future, we may want to do the opposite! - // leave strings and buffers as-is - // anything else switches us into object mode - if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { - if (isArrayBufferView(chunk)) - chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) - else if (isArrayBuffer(chunk)) chunk = Buffer.from(chunk) - else if (typeof chunk !== 'string') - // use the setter so we throw if we have encoding set - this.objectMode = true - } - - // handle object mode up front, since it's simpler - // this yields better performance, fewer checks later. - if (this[OBJECTMODE]) { - /* istanbul ignore if - maybe impossible? */ - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) - - if (this.flowing) this.emit('data', chunk) - else this[BUFFERPUSH](chunk) - - if (this[BUFFERLENGTH] !== 0) this.emit('readable') - - if (cb) fn(cb) - - return this.flowing - } - - // at this point the chunk is a buffer or string - // don't buffer it up or send it to the decoder - if (!chunk.length) { - if (this[BUFFERLENGTH] !== 0) this.emit('readable') - if (cb) fn(cb) - return this.flowing - } - - // fast-path writing strings of same encoding to a stream with - // an empty buffer, skipping the buffer/decoder dance - if ( - typeof chunk === 'string' && - // unless it is a string already ready for us to use - !(encoding === this[ENCODING] && !this[DECODER].lastNeed) - ) { - chunk = Buffer.from(chunk, encoding) - } - - if (Buffer.isBuffer(chunk) && this[ENCODING]) - chunk = this[DECODER].write(chunk) - - // Note: flushing CAN potentially switch us into not-flowing mode - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) - - if (this.flowing) this.emit('data', chunk) - else this[BUFFERPUSH](chunk) - - if (this[BUFFERLENGTH] !== 0) this.emit('readable') - - if (cb) fn(cb) - - return this.flowing - } - - read(n) { - if (this[DESTROYED]) return null - - if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) { - this[MAYBE_EMIT_END]() - return null - } - - if (this[OBJECTMODE]) n = null - - if (this[BUFFER].length > 1 && !this[OBJECTMODE]) { - if (this.encoding) this[BUFFER] = [this[BUFFER].join('')] - else this[BUFFER] = [Buffer.concat(this[BUFFER], this[BUFFERLENGTH])] - } - - const ret = this[READ](n || null, this[BUFFER][0]) - this[MAYBE_EMIT_END]() - return ret - } - - [READ](n, chunk) { - if (n === chunk.length || n === null) this[BUFFERSHIFT]() - else { - this[BUFFER][0] = chunk.slice(n) - chunk = chunk.slice(0, n) - this[BUFFERLENGTH] -= n - } - - this.emit('data', chunk) - - if (!this[BUFFER].length && !this[EOF]) this.emit('drain') - - return chunk - } - - end(chunk, encoding, cb) { - if (typeof chunk === 'function') (cb = chunk), (chunk = null) - if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') - if (chunk) this.write(chunk, encoding) - if (cb) this.once('end', cb) - this[EOF] = true - this.writable = false - - // if we haven't written anything, then go ahead and emit, - // even if we're not reading. - // we'll re-emit if a new 'end' listener is added anyway. - // This makes MP more suitable to write-only use cases. - if (this.flowing || !this[PAUSED]) this[MAYBE_EMIT_END]() - return this - } - - // don't let the internal resume be overwritten - [RESUME]() { - if (this[DESTROYED]) return - - this[PAUSED] = false - this[FLOWING] = true - this.emit('resume') - if (this[BUFFER].length) this[FLUSH]() - else if (this[EOF]) this[MAYBE_EMIT_END]() - else this.emit('drain') - } - - resume() { - return this[RESUME]() - } - - pause() { - this[FLOWING] = false - this[PAUSED] = true - } - - get destroyed() { - return this[DESTROYED] - } - - get flowing() { - return this[FLOWING] - } - - get paused() { - return this[PAUSED] - } - - [BUFFERPUSH](chunk) { - if (this[OBJECTMODE]) this[BUFFERLENGTH] += 1 - else this[BUFFERLENGTH] += chunk.length - this[BUFFER].push(chunk) - } - - [BUFFERSHIFT]() { - if (this[OBJECTMODE]) this[BUFFERLENGTH] -= 1 - else this[BUFFERLENGTH] -= this[BUFFER][0].length - return this[BUFFER].shift() - } - - [FLUSH](noDrain) { - do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length) - - if (!noDrain && !this[BUFFER].length && !this[EOF]) this.emit('drain') - } - - [FLUSHCHUNK](chunk) { - this.emit('data', chunk) - return this.flowing - } - - pipe(dest, opts) { - if (this[DESTROYED]) return - - const ended = this[EMITTED_END] - opts = opts || {} - if (dest === proc.stdout || dest === proc.stderr) opts.end = false - else opts.end = opts.end !== false - opts.proxyErrors = !!opts.proxyErrors - - // piping an ended stream ends immediately - if (ended) { - if (opts.end) dest.end() - } else { - this[PIPES].push( - !opts.proxyErrors - ? new Pipe(this, dest, opts) - : new PipeProxyErrors(this, dest, opts) - ) - if (this[ASYNC]) defer(() => this[RESUME]()) - else this[RESUME]() - } - - return dest - } - - unpipe(dest) { - const p = this[PIPES].find(p => p.dest === dest) - if (p) { - this[PIPES].splice(this[PIPES].indexOf(p), 1) - p.unpipe() - } - } - - addListener(ev, fn) { - return this.on(ev, fn) - } - - on(ev, fn) { - const ret = super.on(ev, fn) - if (ev === 'data' && !this[PIPES].length && !this.flowing) this[RESUME]() - else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) - super.emit('readable') - else if (isEndish(ev) && this[EMITTED_END]) { - super.emit(ev) - this.removeAllListeners(ev) - } else if (ev === 'error' && this[EMITTED_ERROR]) { - if (this[ASYNC]) defer(() => fn.call(this, this[EMITTED_ERROR])) - else fn.call(this, this[EMITTED_ERROR]) - } - return ret - } - - get emittedEnd() { - return this[EMITTED_END] - } - - [MAYBE_EMIT_END]() { - if ( - !this[EMITTING_END] && - !this[EMITTED_END] && - !this[DESTROYED] && - this[BUFFER].length === 0 && - this[EOF] - ) { - this[EMITTING_END] = true - this.emit('end') - this.emit('prefinish') - this.emit('finish') - if (this[CLOSED]) this.emit('close') - this[EMITTING_END] = false - } - } - - emit(ev, data, ...extra) { - // error and close are only events allowed after calling destroy() - if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) - return - else if (ev === 'data') { - return !this[OBJECTMODE] && !data - ? false - : this[ASYNC] - ? defer(() => this[EMITDATA](data)) - : this[EMITDATA](data) - } else if (ev === 'end') { - return this[EMITEND]() - } else if (ev === 'close') { - this[CLOSED] = true - // don't emit close before 'end' and 'finish' - if (!this[EMITTED_END] && !this[DESTROYED]) return - const ret = super.emit('close') - this.removeAllListeners('close') - return ret - } else if (ev === 'error') { - this[EMITTED_ERROR] = data - super.emit(ERROR, data) - const ret = - !this[SIGNAL] || this.listeners('error').length - ? super.emit('error', data) - : false - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'resume') { - const ret = super.emit('resume') - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'finish' || ev === 'prefinish') { - const ret = super.emit(ev) - this.removeAllListeners(ev) - return ret - } - - // Some other unknown event - const ret = super.emit(ev, data, ...extra) - this[MAYBE_EMIT_END]() - return ret - } - - [EMITDATA](data) { - for (const p of this[PIPES]) { - if (p.dest.write(data) === false) this.pause() - } - const ret = super.emit('data', data) - this[MAYBE_EMIT_END]() - return ret - } - - [EMITEND]() { - if (this[EMITTED_END]) return - - this[EMITTED_END] = true - this.readable = false - if (this[ASYNC]) defer(() => this[EMITEND2]()) - else this[EMITEND2]() - } - - [EMITEND2]() { - if (this[DECODER]) { - const data = this[DECODER].end() - if (data) { - for (const p of this[PIPES]) { - p.dest.write(data) - } - super.emit('data', data) - } - } - - for (const p of this[PIPES]) { - p.end() - } - const ret = super.emit('end') - this.removeAllListeners('end') - return ret - } - - // const all = await stream.collect() - collect() { - const buf = [] - if (!this[OBJECTMODE]) buf.dataLength = 0 - // set the promise first, in case an error is raised - // by triggering the flow here. - const p = this.promise() - this.on('data', c => { - buf.push(c) - if (!this[OBJECTMODE]) buf.dataLength += c.length - }) - return p.then(() => buf) - } - - // const data = await stream.concat() - concat() { - return this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this.collect().then(buf => - this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this[ENCODING] - ? buf.join('') - : Buffer.concat(buf, buf.dataLength) - ) - } - - // stream.promise().then(() => done, er => emitted error) - promise() { - return new Promise((resolve, reject) => { - this.on(DESTROYED, () => reject(new Error('stream destroyed'))) - this.on('error', er => reject(er)) - this.on('end', () => resolve()) - }) - } - - // for await (let chunk of stream) - [ASYNCITERATOR]() { - let stopped = false - const stop = () => { - this.pause() - stopped = true - return Promise.resolve({ done: true }) - } - const next = () => { - if (stopped) return stop() - const res = this.read() - if (res !== null) return Promise.resolve({ done: false, value: res }) - - if (this[EOF]) return stop() - - let resolve = null - let reject = null - const onerr = er => { - this.removeListener('data', ondata) - this.removeListener('end', onend) - this.removeListener(DESTROYED, ondestroy) - stop() - reject(er) - } - const ondata = value => { - this.removeListener('error', onerr) - this.removeListener('end', onend) - this.removeListener(DESTROYED, ondestroy) - this.pause() - resolve({ value: value, done: !!this[EOF] }) - } - const onend = () => { - this.removeListener('error', onerr) - this.removeListener('data', ondata) - this.removeListener(DESTROYED, ondestroy) - stop() - resolve({ done: true }) - } - const ondestroy = () => onerr(new Error('stream destroyed')) - return new Promise((res, rej) => { - reject = rej - resolve = res - this.once(DESTROYED, ondestroy) - this.once('error', onerr) - this.once('end', onend) - this.once('data', ondata) - }) - } - - return { - next, - throw: stop, - return: stop, - [ASYNCITERATOR]() { - return this - }, - } - } - - // for (let chunk of stream) - [ITERATOR]() { - let stopped = false - const stop = () => { - this.pause() - this.removeListener(ERROR, stop) - this.removeListener(DESTROYED, stop) - this.removeListener('end', stop) - stopped = true - return { done: true } - } - - const next = () => { - if (stopped) return stop() - const value = this.read() - return value === null ? stop() : { value } - } - this.once('end', stop) - this.once(ERROR, stop) - this.once(DESTROYED, stop) - - return { - next, - throw: stop, - return: stop, - [ITERATOR]() { - return this - }, - } - } - - destroy(er) { - if (this[DESTROYED]) { - if (er) this.emit('error', er) - else this.emit(DESTROYED) - return this - } - - this[DESTROYED] = true - - // throw away all buffered data, it's never coming out - this[BUFFER].length = 0 - this[BUFFERLENGTH] = 0 - - if (typeof this.close === 'function' && !this[CLOSED]) this.close() - - if (er) this.emit('error', er) - // if no error to emit, still reject pending promises - else this.emit(DESTROYED) - - return this - } - - static isStream(s) { - return ( - !!s && - (s instanceof Minipass || - s instanceof Stream || - (s instanceof EE && - // readable - (typeof s.pipe === 'function' || - // writable - (typeof s.write === 'function' && typeof s.end === 'function')))) - ) - } -} - -exports.Minipass = Minipass diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.mjs b/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.mjs deleted file mode 100644 index 6ef6cd8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.mjs +++ /dev/null @@ -1,702 +0,0 @@ -'use strict' -const proc = - typeof process === 'object' && process - ? process - : { - stdout: null, - stderr: null, - } -import EE from 'events' -import Stream from 'stream' -import stringdecoder from 'string_decoder' -const SD = stringdecoder.StringDecoder - -const EOF = Symbol('EOF') -const MAYBE_EMIT_END = Symbol('maybeEmitEnd') -const EMITTED_END = Symbol('emittedEnd') -const EMITTING_END = Symbol('emittingEnd') -const EMITTED_ERROR = Symbol('emittedError') -const CLOSED = Symbol('closed') -const READ = Symbol('read') -const FLUSH = Symbol('flush') -const FLUSHCHUNK = Symbol('flushChunk') -const ENCODING = Symbol('encoding') -const DECODER = Symbol('decoder') -const FLOWING = Symbol('flowing') -const PAUSED = Symbol('paused') -const RESUME = Symbol('resume') -const BUFFER = Symbol('buffer') -const PIPES = Symbol('pipes') -const BUFFERLENGTH = Symbol('bufferLength') -const BUFFERPUSH = Symbol('bufferPush') -const BUFFERSHIFT = Symbol('bufferShift') -const OBJECTMODE = Symbol('objectMode') -// internal event when stream is destroyed -const DESTROYED = Symbol('destroyed') -// internal event when stream has an error -const ERROR = Symbol('error') -const EMITDATA = Symbol('emitData') -const EMITEND = Symbol('emitEnd') -const EMITEND2 = Symbol('emitEnd2') -const ASYNC = Symbol('async') -const ABORT = Symbol('abort') -const ABORTED = Symbol('aborted') -const SIGNAL = Symbol('signal') - -const defer = fn => Promise.resolve().then(fn) - -// TODO remove when Node v8 support drops -const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' -const ASYNCITERATOR = - (doIter && Symbol.asyncIterator) || Symbol('asyncIterator not implemented') -const ITERATOR = - (doIter && Symbol.iterator) || Symbol('iterator not implemented') - -// events that mean 'the stream is over' -// these are treated specially, and re-emitted -// if they are listened for after emitting. -const isEndish = ev => ev === 'end' || ev === 'finish' || ev === 'prefinish' - -const isArrayBuffer = b => - b instanceof ArrayBuffer || - (typeof b === 'object' && - b.constructor && - b.constructor.name === 'ArrayBuffer' && - b.byteLength >= 0) - -const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) - -class Pipe { - constructor(src, dest, opts) { - this.src = src - this.dest = dest - this.opts = opts - this.ondrain = () => src[RESUME]() - dest.on('drain', this.ondrain) - } - unpipe() { - this.dest.removeListener('drain', this.ondrain) - } - // istanbul ignore next - only here for the prototype - proxyErrors() {} - end() { - this.unpipe() - if (this.opts.end) this.dest.end() - } -} - -class PipeProxyErrors extends Pipe { - unpipe() { - this.src.removeListener('error', this.proxyErrors) - super.unpipe() - } - constructor(src, dest, opts) { - super(src, dest, opts) - this.proxyErrors = er => dest.emit('error', er) - src.on('error', this.proxyErrors) - } -} - -export class Minipass extends Stream { - constructor(options) { - super() - this[FLOWING] = false - // whether we're explicitly paused - this[PAUSED] = false - this[PIPES] = [] - this[BUFFER] = [] - this[OBJECTMODE] = (options && options.objectMode) || false - if (this[OBJECTMODE]) this[ENCODING] = null - else this[ENCODING] = (options && options.encoding) || null - if (this[ENCODING] === 'buffer') this[ENCODING] = null - this[ASYNC] = (options && !!options.async) || false - this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null - this[EOF] = false - this[EMITTED_END] = false - this[EMITTING_END] = false - this[CLOSED] = false - this[EMITTED_ERROR] = null - this.writable = true - this.readable = true - this[BUFFERLENGTH] = 0 - this[DESTROYED] = false - if (options && options.debugExposeBuffer === true) { - Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] }) - } - if (options && options.debugExposePipes === true) { - Object.defineProperty(this, 'pipes', { get: () => this[PIPES] }) - } - this[SIGNAL] = options && options.signal - this[ABORTED] = false - if (this[SIGNAL]) { - this[SIGNAL].addEventListener('abort', () => this[ABORT]()) - if (this[SIGNAL].aborted) { - this[ABORT]() - } - } - } - - get bufferLength() { - return this[BUFFERLENGTH] - } - - get encoding() { - return this[ENCODING] - } - set encoding(enc) { - if (this[OBJECTMODE]) throw new Error('cannot set encoding in objectMode') - - if ( - this[ENCODING] && - enc !== this[ENCODING] && - ((this[DECODER] && this[DECODER].lastNeed) || this[BUFFERLENGTH]) - ) - throw new Error('cannot change encoding') - - if (this[ENCODING] !== enc) { - this[DECODER] = enc ? new SD(enc) : null - if (this[BUFFER].length) - this[BUFFER] = this[BUFFER].map(chunk => this[DECODER].write(chunk)) - } - - this[ENCODING] = enc - } - - setEncoding(enc) { - this.encoding = enc - } - - get objectMode() { - return this[OBJECTMODE] - } - set objectMode(om) { - this[OBJECTMODE] = this[OBJECTMODE] || !!om - } - - get ['async']() { - return this[ASYNC] - } - set ['async'](a) { - this[ASYNC] = this[ASYNC] || !!a - } - - // drop everything and get out of the flow completely - [ABORT]() { - this[ABORTED] = true - this.emit('abort', this[SIGNAL].reason) - this.destroy(this[SIGNAL].reason) - } - - get aborted() { - return this[ABORTED] - } - set aborted(_) {} - - write(chunk, encoding, cb) { - if (this[ABORTED]) return false - if (this[EOF]) throw new Error('write after end') - - if (this[DESTROYED]) { - this.emit( - 'error', - Object.assign( - new Error('Cannot call write after a stream was destroyed'), - { code: 'ERR_STREAM_DESTROYED' } - ) - ) - return true - } - - if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') - - if (!encoding) encoding = 'utf8' - - const fn = this[ASYNC] ? defer : f => f() - - // convert array buffers and typed array views into buffers - // at some point in the future, we may want to do the opposite! - // leave strings and buffers as-is - // anything else switches us into object mode - if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { - if (isArrayBufferView(chunk)) - chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) - else if (isArrayBuffer(chunk)) chunk = Buffer.from(chunk) - else if (typeof chunk !== 'string') - // use the setter so we throw if we have encoding set - this.objectMode = true - } - - // handle object mode up front, since it's simpler - // this yields better performance, fewer checks later. - if (this[OBJECTMODE]) { - /* istanbul ignore if - maybe impossible? */ - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) - - if (this.flowing) this.emit('data', chunk) - else this[BUFFERPUSH](chunk) - - if (this[BUFFERLENGTH] !== 0) this.emit('readable') - - if (cb) fn(cb) - - return this.flowing - } - - // at this point the chunk is a buffer or string - // don't buffer it up or send it to the decoder - if (!chunk.length) { - if (this[BUFFERLENGTH] !== 0) this.emit('readable') - if (cb) fn(cb) - return this.flowing - } - - // fast-path writing strings of same encoding to a stream with - // an empty buffer, skipping the buffer/decoder dance - if ( - typeof chunk === 'string' && - // unless it is a string already ready for us to use - !(encoding === this[ENCODING] && !this[DECODER].lastNeed) - ) { - chunk = Buffer.from(chunk, encoding) - } - - if (Buffer.isBuffer(chunk) && this[ENCODING]) - chunk = this[DECODER].write(chunk) - - // Note: flushing CAN potentially switch us into not-flowing mode - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) - - if (this.flowing) this.emit('data', chunk) - else this[BUFFERPUSH](chunk) - - if (this[BUFFERLENGTH] !== 0) this.emit('readable') - - if (cb) fn(cb) - - return this.flowing - } - - read(n) { - if (this[DESTROYED]) return null - - if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) { - this[MAYBE_EMIT_END]() - return null - } - - if (this[OBJECTMODE]) n = null - - if (this[BUFFER].length > 1 && !this[OBJECTMODE]) { - if (this.encoding) this[BUFFER] = [this[BUFFER].join('')] - else this[BUFFER] = [Buffer.concat(this[BUFFER], this[BUFFERLENGTH])] - } - - const ret = this[READ](n || null, this[BUFFER][0]) - this[MAYBE_EMIT_END]() - return ret - } - - [READ](n, chunk) { - if (n === chunk.length || n === null) this[BUFFERSHIFT]() - else { - this[BUFFER][0] = chunk.slice(n) - chunk = chunk.slice(0, n) - this[BUFFERLENGTH] -= n - } - - this.emit('data', chunk) - - if (!this[BUFFER].length && !this[EOF]) this.emit('drain') - - return chunk - } - - end(chunk, encoding, cb) { - if (typeof chunk === 'function') (cb = chunk), (chunk = null) - if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') - if (chunk) this.write(chunk, encoding) - if (cb) this.once('end', cb) - this[EOF] = true - this.writable = false - - // if we haven't written anything, then go ahead and emit, - // even if we're not reading. - // we'll re-emit if a new 'end' listener is added anyway. - // This makes MP more suitable to write-only use cases. - if (this.flowing || !this[PAUSED]) this[MAYBE_EMIT_END]() - return this - } - - // don't let the internal resume be overwritten - [RESUME]() { - if (this[DESTROYED]) return - - this[PAUSED] = false - this[FLOWING] = true - this.emit('resume') - if (this[BUFFER].length) this[FLUSH]() - else if (this[EOF]) this[MAYBE_EMIT_END]() - else this.emit('drain') - } - - resume() { - return this[RESUME]() - } - - pause() { - this[FLOWING] = false - this[PAUSED] = true - } - - get destroyed() { - return this[DESTROYED] - } - - get flowing() { - return this[FLOWING] - } - - get paused() { - return this[PAUSED] - } - - [BUFFERPUSH](chunk) { - if (this[OBJECTMODE]) this[BUFFERLENGTH] += 1 - else this[BUFFERLENGTH] += chunk.length - this[BUFFER].push(chunk) - } - - [BUFFERSHIFT]() { - if (this[OBJECTMODE]) this[BUFFERLENGTH] -= 1 - else this[BUFFERLENGTH] -= this[BUFFER][0].length - return this[BUFFER].shift() - } - - [FLUSH](noDrain) { - do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length) - - if (!noDrain && !this[BUFFER].length && !this[EOF]) this.emit('drain') - } - - [FLUSHCHUNK](chunk) { - this.emit('data', chunk) - return this.flowing - } - - pipe(dest, opts) { - if (this[DESTROYED]) return - - const ended = this[EMITTED_END] - opts = opts || {} - if (dest === proc.stdout || dest === proc.stderr) opts.end = false - else opts.end = opts.end !== false - opts.proxyErrors = !!opts.proxyErrors - - // piping an ended stream ends immediately - if (ended) { - if (opts.end) dest.end() - } else { - this[PIPES].push( - !opts.proxyErrors - ? new Pipe(this, dest, opts) - : new PipeProxyErrors(this, dest, opts) - ) - if (this[ASYNC]) defer(() => this[RESUME]()) - else this[RESUME]() - } - - return dest - } - - unpipe(dest) { - const p = this[PIPES].find(p => p.dest === dest) - if (p) { - this[PIPES].splice(this[PIPES].indexOf(p), 1) - p.unpipe() - } - } - - addListener(ev, fn) { - return this.on(ev, fn) - } - - on(ev, fn) { - const ret = super.on(ev, fn) - if (ev === 'data' && !this[PIPES].length && !this.flowing) this[RESUME]() - else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) - super.emit('readable') - else if (isEndish(ev) && this[EMITTED_END]) { - super.emit(ev) - this.removeAllListeners(ev) - } else if (ev === 'error' && this[EMITTED_ERROR]) { - if (this[ASYNC]) defer(() => fn.call(this, this[EMITTED_ERROR])) - else fn.call(this, this[EMITTED_ERROR]) - } - return ret - } - - get emittedEnd() { - return this[EMITTED_END] - } - - [MAYBE_EMIT_END]() { - if ( - !this[EMITTING_END] && - !this[EMITTED_END] && - !this[DESTROYED] && - this[BUFFER].length === 0 && - this[EOF] - ) { - this[EMITTING_END] = true - this.emit('end') - this.emit('prefinish') - this.emit('finish') - if (this[CLOSED]) this.emit('close') - this[EMITTING_END] = false - } - } - - emit(ev, data, ...extra) { - // error and close are only events allowed after calling destroy() - if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) - return - else if (ev === 'data') { - return !this[OBJECTMODE] && !data - ? false - : this[ASYNC] - ? defer(() => this[EMITDATA](data)) - : this[EMITDATA](data) - } else if (ev === 'end') { - return this[EMITEND]() - } else if (ev === 'close') { - this[CLOSED] = true - // don't emit close before 'end' and 'finish' - if (!this[EMITTED_END] && !this[DESTROYED]) return - const ret = super.emit('close') - this.removeAllListeners('close') - return ret - } else if (ev === 'error') { - this[EMITTED_ERROR] = data - super.emit(ERROR, data) - const ret = - !this[SIGNAL] || this.listeners('error').length - ? super.emit('error', data) - : false - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'resume') { - const ret = super.emit('resume') - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'finish' || ev === 'prefinish') { - const ret = super.emit(ev) - this.removeAllListeners(ev) - return ret - } - - // Some other unknown event - const ret = super.emit(ev, data, ...extra) - this[MAYBE_EMIT_END]() - return ret - } - - [EMITDATA](data) { - for (const p of this[PIPES]) { - if (p.dest.write(data) === false) this.pause() - } - const ret = super.emit('data', data) - this[MAYBE_EMIT_END]() - return ret - } - - [EMITEND]() { - if (this[EMITTED_END]) return - - this[EMITTED_END] = true - this.readable = false - if (this[ASYNC]) defer(() => this[EMITEND2]()) - else this[EMITEND2]() - } - - [EMITEND2]() { - if (this[DECODER]) { - const data = this[DECODER].end() - if (data) { - for (const p of this[PIPES]) { - p.dest.write(data) - } - super.emit('data', data) - } - } - - for (const p of this[PIPES]) { - p.end() - } - const ret = super.emit('end') - this.removeAllListeners('end') - return ret - } - - // const all = await stream.collect() - collect() { - const buf = [] - if (!this[OBJECTMODE]) buf.dataLength = 0 - // set the promise first, in case an error is raised - // by triggering the flow here. - const p = this.promise() - this.on('data', c => { - buf.push(c) - if (!this[OBJECTMODE]) buf.dataLength += c.length - }) - return p.then(() => buf) - } - - // const data = await stream.concat() - concat() { - return this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this.collect().then(buf => - this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this[ENCODING] - ? buf.join('') - : Buffer.concat(buf, buf.dataLength) - ) - } - - // stream.promise().then(() => done, er => emitted error) - promise() { - return new Promise((resolve, reject) => { - this.on(DESTROYED, () => reject(new Error('stream destroyed'))) - this.on('error', er => reject(er)) - this.on('end', () => resolve()) - }) - } - - // for await (let chunk of stream) - [ASYNCITERATOR]() { - let stopped = false - const stop = () => { - this.pause() - stopped = true - return Promise.resolve({ done: true }) - } - const next = () => { - if (stopped) return stop() - const res = this.read() - if (res !== null) return Promise.resolve({ done: false, value: res }) - - if (this[EOF]) return stop() - - let resolve = null - let reject = null - const onerr = er => { - this.removeListener('data', ondata) - this.removeListener('end', onend) - this.removeListener(DESTROYED, ondestroy) - stop() - reject(er) - } - const ondata = value => { - this.removeListener('error', onerr) - this.removeListener('end', onend) - this.removeListener(DESTROYED, ondestroy) - this.pause() - resolve({ value: value, done: !!this[EOF] }) - } - const onend = () => { - this.removeListener('error', onerr) - this.removeListener('data', ondata) - this.removeListener(DESTROYED, ondestroy) - stop() - resolve({ done: true }) - } - const ondestroy = () => onerr(new Error('stream destroyed')) - return new Promise((res, rej) => { - reject = rej - resolve = res - this.once(DESTROYED, ondestroy) - this.once('error', onerr) - this.once('end', onend) - this.once('data', ondata) - }) - } - - return { - next, - throw: stop, - return: stop, - [ASYNCITERATOR]() { - return this - }, - } - } - - // for (let chunk of stream) - [ITERATOR]() { - let stopped = false - const stop = () => { - this.pause() - this.removeListener(ERROR, stop) - this.removeListener(DESTROYED, stop) - this.removeListener('end', stop) - stopped = true - return { done: true } - } - - const next = () => { - if (stopped) return stop() - const value = this.read() - return value === null ? stop() : { value } - } - this.once('end', stop) - this.once(ERROR, stop) - this.once(DESTROYED, stop) - - return { - next, - throw: stop, - return: stop, - [ITERATOR]() { - return this - }, - } - } - - destroy(er) { - if (this[DESTROYED]) { - if (er) this.emit('error', er) - else this.emit(DESTROYED) - return this - } - - this[DESTROYED] = true - - // throw away all buffered data, it's never coming out - this[BUFFER].length = 0 - this[BUFFERLENGTH] = 0 - - if (typeof this.close === 'function' && !this[CLOSED]) this.close() - - if (er) this.emit('error', er) - // if no error to emit, still reject pending promises - else this.emit(DESTROYED) - - return this - } - - static isStream(s) { - return ( - !!s && - (s instanceof Minipass || - s instanceof Stream || - (s instanceof EE && - // readable - (typeof s.pipe === 'function' || - // writable - (typeof s.write === 'function' && typeof s.end === 'function')))) - ) - } -} - - diff --git a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/package.json b/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/package.json deleted file mode 100644 index 0e20e98..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "minipass", - "version": "5.0.0", - "description": "minimal implementation of a PassThrough stream", - "main": "./index.js", - "module": "./index.mjs", - "types": "./index.d.ts", - "exports": { - ".": { - "import": { - "types": "./index.d.ts", - "default": "./index.mjs" - }, - "require": { - "types": "./index.d.ts", - "default": "./index.js" - } - }, - "./package.json": "./package.json" - }, - "devDependencies": { - "@types/node": "^17.0.41", - "end-of-stream": "^1.4.0", - "node-abort-controller": "^3.1.1", - "prettier": "^2.6.2", - "tap": "^16.2.0", - "through2": "^2.0.3", - "ts-node": "^10.8.1", - "typedoc": "^0.23.24", - "typescript": "^4.7.3" - }, - "scripts": { - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "prepare": "node ./scripts/transpile-to-esm.js", - "snap": "tap", - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", - "typedoc": "typedoc ./index.d.ts", - "format": "prettier --write . --loglevel warn" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/minipass.git" - }, - "keywords": [ - "passthrough", - "stream" - ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "files": [ - "index.d.ts", - "index.js", - "index.mjs" - ], - "tap": { - "check-coverage": true - }, - "engines": { - "node": ">=8" - }, - "prettier": { - "semi": false, - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minipass b/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minipass deleted file mode 120000 index 7c1951b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minipass +++ /dev/null @@ -1 +0,0 @@ -../../minipass@3.3.6/node_modules/minipass \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/LICENSE b/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/LICENSE deleted file mode 100644 index ffce738..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Minizlib was created by Isaac Z. Schlueter. -It is a derivative work of the Node.js project. - -""" -Copyright Isaac Z. Schlueter and Contributors -Copyright Node.js contributors. All rights reserved. -Copyright Joyent, Inc. and other Node contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -""" diff --git a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/README.md b/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/README.md deleted file mode 100644 index 80e067a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# minizlib - -A fast zlib stream built on [minipass](http://npm.im/minipass) and -Node.js's zlib binding. - -This module was created to serve the needs of -[node-tar](http://npm.im/tar) and -[minipass-fetch](http://npm.im/minipass-fetch). - -Brotli is supported in versions of node with a Brotli binding. - -## How does this differ from the streams in `require('zlib')`? - -First, there are no convenience methods to compress or decompress a -buffer. If you want those, use the built-in `zlib` module. This is -only streams. That being said, Minipass streams to make it fairly easy to -use as one-liners: `new zlib.Deflate().end(data).read()` will return the -deflate compressed result. - -This module compresses and decompresses the data as fast as you feed -it in. It is synchronous, and runs on the main process thread. Zlib -and Brotli operations can be high CPU, but they're very fast, and doing it -this way means much less bookkeeping and artificial deferral. - -Node's built in zlib streams are built on top of `stream.Transform`. -They do the maximally safe thing with respect to consistent -asynchrony, buffering, and backpressure. - -See [Minipass](http://npm.im/minipass) for more on the differences between -Node.js core streams and Minipass streams, and the convenience methods -provided by that class. - -## Classes - -- Deflate -- Inflate -- Gzip -- Gunzip -- DeflateRaw -- InflateRaw -- Unzip -- BrotliCompress (Node v10 and higher) -- BrotliDecompress (Node v10 and higher) - -## USAGE - -```js -const zlib = require('minizlib') -const input = sourceOfCompressedData() -const decode = new zlib.BrotliDecompress() -const output = whereToWriteTheDecodedData() -input.pipe(decode).pipe(output) -``` - -## REPRODUCIBLE BUILDS - -To create reproducible gzip compressed files across different operating -systems, set `portable: true` in the options. This causes minizlib to set -the `OS` indicator in byte 9 of the extended gzip header to `0xFF` for -'unknown'. diff --git a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/constants.js b/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/constants.js deleted file mode 100644 index 641ebc7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/constants.js +++ /dev/null @@ -1,115 +0,0 @@ -// Update with any zlib constants that are added or changed in the future. -// Node v6 didn't export this, so we just hard code the version and rely -// on all the other hard-coded values from zlib v4736. When node v6 -// support drops, we can just export the realZlibConstants object. -const realZlibConstants = require('zlib').constants || - /* istanbul ignore next */ { ZLIB_VERNUM: 4736 } - -module.exports = Object.freeze(Object.assign(Object.create(null), { - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - Z_VERSION_ERROR: -6, - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - DEFLATE: 1, - INFLATE: 2, - GZIP: 3, - GUNZIP: 4, - DEFLATERAW: 5, - INFLATERAW: 6, - UNZIP: 7, - BROTLI_DECODE: 8, - BROTLI_ENCODE: 9, - Z_MIN_WINDOWBITS: 8, - Z_MAX_WINDOWBITS: 15, - Z_DEFAULT_WINDOWBITS: 15, - Z_MIN_CHUNK: 64, - Z_MAX_CHUNK: Infinity, - Z_DEFAULT_CHUNK: 16384, - Z_MIN_MEMLEVEL: 1, - Z_MAX_MEMLEVEL: 9, - Z_DEFAULT_MEMLEVEL: 8, - Z_MIN_LEVEL: -1, - Z_MAX_LEVEL: 9, - Z_DEFAULT_LEVEL: -1, - BROTLI_OPERATION_PROCESS: 0, - BROTLI_OPERATION_FLUSH: 1, - BROTLI_OPERATION_FINISH: 2, - BROTLI_OPERATION_EMIT_METADATA: 3, - BROTLI_MODE_GENERIC: 0, - BROTLI_MODE_TEXT: 1, - BROTLI_MODE_FONT: 2, - BROTLI_DEFAULT_MODE: 0, - BROTLI_MIN_QUALITY: 0, - BROTLI_MAX_QUALITY: 11, - BROTLI_DEFAULT_QUALITY: 11, - BROTLI_MIN_WINDOW_BITS: 10, - BROTLI_MAX_WINDOW_BITS: 24, - BROTLI_LARGE_MAX_WINDOW_BITS: 30, - BROTLI_DEFAULT_WINDOW: 22, - BROTLI_MIN_INPUT_BLOCK_BITS: 16, - BROTLI_MAX_INPUT_BLOCK_BITS: 24, - BROTLI_PARAM_MODE: 0, - BROTLI_PARAM_QUALITY: 1, - BROTLI_PARAM_LGWIN: 2, - BROTLI_PARAM_LGBLOCK: 3, - BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, - BROTLI_PARAM_SIZE_HINT: 5, - BROTLI_PARAM_LARGE_WINDOW: 6, - BROTLI_PARAM_NPOSTFIX: 7, - BROTLI_PARAM_NDIRECT: 8, - BROTLI_DECODER_RESULT_ERROR: 0, - BROTLI_DECODER_RESULT_SUCCESS: 1, - BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, - BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, - BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, - BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, - BROTLI_DECODER_NO_ERROR: 0, - BROTLI_DECODER_SUCCESS: 1, - BROTLI_DECODER_NEEDS_MORE_INPUT: 2, - BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, - BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, - BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, - BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, - BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, - BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, - BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, - BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, - BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, - BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, - BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, - BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, - BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, - BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, - BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, - BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, - BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, - BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, - BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, - BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, - BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, - BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, - BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, - BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, - BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, - BROTLI_DECODER_ERROR_UNREACHABLE: -31, -}, realZlibConstants)) diff --git a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/index.js b/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/index.js deleted file mode 100644 index fbaf69e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/index.js +++ /dev/null @@ -1,348 +0,0 @@ -'use strict' - -const assert = require('assert') -const Buffer = require('buffer').Buffer -const realZlib = require('zlib') - -const constants = exports.constants = require('./constants.js') -const Minipass = require('minipass') - -const OriginalBufferConcat = Buffer.concat - -const _superWrite = Symbol('_superWrite') -class ZlibError extends Error { - constructor (err) { - super('zlib: ' + err.message) - this.code = err.code - this.errno = err.errno - /* istanbul ignore if */ - if (!this.code) - this.code = 'ZLIB_ERROR' - - this.message = 'zlib: ' + err.message - Error.captureStackTrace(this, this.constructor) - } - - get name () { - return 'ZlibError' - } -} - -// the Zlib class they all inherit from -// This thing manages the queue of requests, and returns -// true or false if there is anything in the queue when -// you call the .write() method. -const _opts = Symbol('opts') -const _flushFlag = Symbol('flushFlag') -const _finishFlushFlag = Symbol('finishFlushFlag') -const _fullFlushFlag = Symbol('fullFlushFlag') -const _handle = Symbol('handle') -const _onError = Symbol('onError') -const _sawError = Symbol('sawError') -const _level = Symbol('level') -const _strategy = Symbol('strategy') -const _ended = Symbol('ended') -const _defaultFullFlush = Symbol('_defaultFullFlush') - -class ZlibBase extends Minipass { - constructor (opts, mode) { - if (!opts || typeof opts !== 'object') - throw new TypeError('invalid options for ZlibBase constructor') - - super(opts) - this[_sawError] = false - this[_ended] = false - this[_opts] = opts - - this[_flushFlag] = opts.flush - this[_finishFlushFlag] = opts.finishFlush - // this will throw if any options are invalid for the class selected - try { - this[_handle] = new realZlib[mode](opts) - } catch (er) { - // make sure that all errors get decorated properly - throw new ZlibError(er) - } - - this[_onError] = (err) => { - // no sense raising multiple errors, since we abort on the first one. - if (this[_sawError]) - return - - this[_sawError] = true - - // there is no way to cleanly recover. - // continuing only obscures problems. - this.close() - this.emit('error', err) - } - - this[_handle].on('error', er => this[_onError](new ZlibError(er))) - this.once('end', () => this.close) - } - - close () { - if (this[_handle]) { - this[_handle].close() - this[_handle] = null - this.emit('close') - } - } - - reset () { - if (!this[_sawError]) { - assert(this[_handle], 'zlib binding closed') - return this[_handle].reset() - } - } - - flush (flushFlag) { - if (this.ended) - return - - if (typeof flushFlag !== 'number') - flushFlag = this[_fullFlushFlag] - this.write(Object.assign(Buffer.alloc(0), { [_flushFlag]: flushFlag })) - } - - end (chunk, encoding, cb) { - if (chunk) - this.write(chunk, encoding) - this.flush(this[_finishFlushFlag]) - this[_ended] = true - return super.end(null, null, cb) - } - - get ended () { - return this[_ended] - } - - write (chunk, encoding, cb) { - // process the chunk using the sync process - // then super.write() all the outputted chunks - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - - if (typeof chunk === 'string') - chunk = Buffer.from(chunk, encoding) - - if (this[_sawError]) - return - assert(this[_handle], 'zlib binding closed') - - // _processChunk tries to .close() the native handle after it's done, so we - // intercept that by temporarily making it a no-op. - const nativeHandle = this[_handle]._handle - const originalNativeClose = nativeHandle.close - nativeHandle.close = () => {} - const originalClose = this[_handle].close - this[_handle].close = () => {} - // It also calls `Buffer.concat()` at the end, which may be convenient - // for some, but which we are not interested in as it slows us down. - Buffer.concat = (args) => args - let result - try { - const flushFlag = typeof chunk[_flushFlag] === 'number' - ? chunk[_flushFlag] : this[_flushFlag] - result = this[_handle]._processChunk(chunk, flushFlag) - // if we don't throw, reset it back how it was - Buffer.concat = OriginalBufferConcat - } catch (err) { - // or if we do, put Buffer.concat() back before we emit error - // Error events call into user code, which may call Buffer.concat() - Buffer.concat = OriginalBufferConcat - this[_onError](new ZlibError(err)) - } finally { - if (this[_handle]) { - // Core zlib resets `_handle` to null after attempting to close the - // native handle. Our no-op handler prevented actual closure, but we - // need to restore the `._handle` property. - this[_handle]._handle = nativeHandle - nativeHandle.close = originalNativeClose - this[_handle].close = originalClose - // `_processChunk()` adds an 'error' listener. If we don't remove it - // after each call, these handlers start piling up. - this[_handle].removeAllListeners('error') - // make sure OUR error listener is still attached tho - } - } - - if (this[_handle]) - this[_handle].on('error', er => this[_onError](new ZlibError(er))) - - let writeReturn - if (result) { - if (Array.isArray(result) && result.length > 0) { - // The first buffer is always `handle._outBuffer`, which would be - // re-used for later invocations; so, we always have to copy that one. - writeReturn = this[_superWrite](Buffer.from(result[0])) - for (let i = 1; i < result.length; i++) { - writeReturn = this[_superWrite](result[i]) - } - } else { - writeReturn = this[_superWrite](Buffer.from(result)) - } - } - - if (cb) - cb() - return writeReturn - } - - [_superWrite] (data) { - return super.write(data) - } -} - -class Zlib extends ZlibBase { - constructor (opts, mode) { - opts = opts || {} - - opts.flush = opts.flush || constants.Z_NO_FLUSH - opts.finishFlush = opts.finishFlush || constants.Z_FINISH - super(opts, mode) - - this[_fullFlushFlag] = constants.Z_FULL_FLUSH - this[_level] = opts.level - this[_strategy] = opts.strategy - } - - params (level, strategy) { - if (this[_sawError]) - return - - if (!this[_handle]) - throw new Error('cannot switch params when binding is closed') - - // no way to test this without also not supporting params at all - /* istanbul ignore if */ - if (!this[_handle].params) - throw new Error('not supported in this implementation') - - if (this[_level] !== level || this[_strategy] !== strategy) { - this.flush(constants.Z_SYNC_FLUSH) - assert(this[_handle], 'zlib binding closed') - // .params() calls .flush(), but the latter is always async in the - // core zlib. We override .flush() temporarily to intercept that and - // flush synchronously. - const origFlush = this[_handle].flush - this[_handle].flush = (flushFlag, cb) => { - this.flush(flushFlag) - cb() - } - try { - this[_handle].params(level, strategy) - } finally { - this[_handle].flush = origFlush - } - /* istanbul ignore else */ - if (this[_handle]) { - this[_level] = level - this[_strategy] = strategy - } - } - } -} - -// minimal 2-byte header -class Deflate extends Zlib { - constructor (opts) { - super(opts, 'Deflate') - } -} - -class Inflate extends Zlib { - constructor (opts) { - super(opts, 'Inflate') - } -} - -// gzip - bigger header, same deflate compression -const _portable = Symbol('_portable') -class Gzip extends Zlib { - constructor (opts) { - super(opts, 'Gzip') - this[_portable] = opts && !!opts.portable - } - - [_superWrite] (data) { - if (!this[_portable]) - return super[_superWrite](data) - - // we'll always get the header emitted in one first chunk - // overwrite the OS indicator byte with 0xFF - this[_portable] = false - data[9] = 255 - return super[_superWrite](data) - } -} - -class Gunzip extends Zlib { - constructor (opts) { - super(opts, 'Gunzip') - } -} - -// raw - no header -class DeflateRaw extends Zlib { - constructor (opts) { - super(opts, 'DeflateRaw') - } -} - -class InflateRaw extends Zlib { - constructor (opts) { - super(opts, 'InflateRaw') - } -} - -// auto-detect header. -class Unzip extends Zlib { - constructor (opts) { - super(opts, 'Unzip') - } -} - -class Brotli extends ZlibBase { - constructor (opts, mode) { - opts = opts || {} - - opts.flush = opts.flush || constants.BROTLI_OPERATION_PROCESS - opts.finishFlush = opts.finishFlush || constants.BROTLI_OPERATION_FINISH - - super(opts, mode) - - this[_fullFlushFlag] = constants.BROTLI_OPERATION_FLUSH - } -} - -class BrotliCompress extends Brotli { - constructor (opts) { - super(opts, 'BrotliCompress') - } -} - -class BrotliDecompress extends Brotli { - constructor (opts) { - super(opts, 'BrotliDecompress') - } -} - -exports.Deflate = Deflate -exports.Inflate = Inflate -exports.Gzip = Gzip -exports.Gunzip = Gunzip -exports.DeflateRaw = DeflateRaw -exports.InflateRaw = InflateRaw -exports.Unzip = Unzip -/* istanbul ignore else */ -if (typeof realZlib.BrotliCompress === 'function') { - exports.BrotliCompress = BrotliCompress - exports.BrotliDecompress = BrotliDecompress -} else { - exports.BrotliCompress = exports.BrotliDecompress = class { - constructor () { - throw new Error('Brotli is not supported in this version of Node.js') - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/package.json b/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/package.json deleted file mode 100644 index 98825a5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "minizlib", - "version": "2.1.2", - "description": "A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.", - "main": "index.js", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "scripts": { - "test": "tap test/*.js --100 -J", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/minizlib.git" - }, - "keywords": [ - "zlib", - "gzip", - "gunzip", - "deflate", - "inflate", - "compression", - "zip", - "unzip" - ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "MIT", - "devDependencies": { - "tap": "^14.6.9" - }, - "files": [ - "index.js", - "constants.js" - ], - "engines": { - "node": ">= 8" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/yallist b/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/yallist deleted file mode 120000 index 026812a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/minizlib@2.1.2/node_modules/yallist +++ /dev/null @@ -1 +0,0 @@ -../../yallist@4.0.0/node_modules/yallist \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/LICENSE b/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/LICENSE deleted file mode 100644 index f6b3a0d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 James Halliday (mail@substack.net) and Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/README.md b/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/README.md deleted file mode 100644 index be5ac93..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# mkdirp-classic - -Just a non-deprecated mirror of [mkdirp 0.5.2](https://github.com/substack/node-mkdirp/tree/0.5.1) -for use in modules where we depend on the non promise interface. - -``` -npm install mkdirp-classic -``` - -## Usage - -``` js -// See the above link -``` - -## License - -MIT diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/index.js b/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/index.js deleted file mode 100644 index 6ce241b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/index.js +++ /dev/null @@ -1,98 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var _0777 = parseInt('0777', 8); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, opts, f, made) { - if (typeof opts === 'function') { - f = opts; - opts = {}; - } - else if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - p = path.resolve(p); - - xfs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), opts, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, opts, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - p = path.resolve(p); - - try { - xfs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), opts, made); - sync(p, opts, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = xfs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/package.json b/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/package.json deleted file mode 100644 index c8b5407..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "mkdirp-classic", - "version": "0.5.3", - "description": "Mirror of mkdirp 0.5.2", - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "repository": { - "type": "git", - "url": "https://github.com/mafintosh/mkdirp-classic.git" - }, - "author": "Mathias Buus (@mafintosh)", - "license": "MIT", - "bugs": { - "url": "https://github.com/mafintosh/mkdirp-classic/issues" - }, - "homepage": "https://github.com/mafintosh/mkdirp-classic" -} diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/CHANGELOG.md deleted file mode 100644 index 8145838..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# Changers Lorgs! - -## 1.0 - -Full rewrite. Essentially a brand new module. - -- Return a promise instead of taking a callback. -- Use native `fs.mkdir(path, { recursive: true })` when available. -- Drop support for outdated Node.js versions. (Technically still works on - Node.js v8, but only 10 and above are officially supported.) - -## 0.x - -Original and most widely used recursive directory creation implementation -in JavaScript, dating back to 2010. diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/LICENSE b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/LICENSE deleted file mode 100644 index 13fcd15..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me) - -This project is free software released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/bin/cmd.js b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/bin/cmd.js deleted file mode 100755 index 6e0aa8d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/bin/cmd.js +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env node - -const usage = () => ` -usage: mkdirp [DIR1,DIR2..] {OPTIONS} - - Create each supplied directory including any necessary parent directories - that don't yet exist. - - If the directory already exists, do nothing. - -OPTIONS are: - - -m If a directory needs to be created, set the mode as an octal - --mode= permission string. - - -v --version Print the mkdirp version number - - -h --help Print this helpful banner - - -p --print Print the first directories created for each path provided - - --manual Use manual implementation, even if native is available -` - -const dirs = [] -const opts = {} -let print = false -let dashdash = false -let manual = false -for (const arg of process.argv.slice(2)) { - if (dashdash) - dirs.push(arg) - else if (arg === '--') - dashdash = true - else if (arg === '--manual') - manual = true - else if (/^-h/.test(arg) || /^--help/.test(arg)) { - console.log(usage()) - process.exit(0) - } else if (arg === '-v' || arg === '--version') { - console.log(require('../package.json').version) - process.exit(0) - } else if (arg === '-p' || arg === '--print') { - print = true - } else if (/^-m/.test(arg) || /^--mode=/.test(arg)) { - const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8) - if (isNaN(mode)) { - console.error(`invalid mode argument: ${arg}\nMust be an octal number.`) - process.exit(1) - } - opts.mode = mode - } else - dirs.push(arg) -} - -const mkdirp = require('../') -const impl = manual ? mkdirp.manual : mkdirp -if (dirs.length === 0) - console.error(usage()) - -Promise.all(dirs.map(dir => impl(dir, opts))) - .then(made => print ? made.forEach(m => m && console.log(m)) : null) - .catch(er => { - console.error(er.message) - if (er.code) - console.error(' code: ' + er.code) - process.exit(1) - }) diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/index.js b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/index.js deleted file mode 100644 index ad7a16c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/index.js +++ /dev/null @@ -1,31 +0,0 @@ -const optsArg = require('./lib/opts-arg.js') -const pathArg = require('./lib/path-arg.js') - -const {mkdirpNative, mkdirpNativeSync} = require('./lib/mkdirp-native.js') -const {mkdirpManual, mkdirpManualSync} = require('./lib/mkdirp-manual.js') -const {useNative, useNativeSync} = require('./lib/use-native.js') - - -const mkdirp = (path, opts) => { - path = pathArg(path) - opts = optsArg(opts) - return useNative(opts) - ? mkdirpNative(path, opts) - : mkdirpManual(path, opts) -} - -const mkdirpSync = (path, opts) => { - path = pathArg(path) - opts = optsArg(opts) - return useNativeSync(opts) - ? mkdirpNativeSync(path, opts) - : mkdirpManualSync(path, opts) -} - -mkdirp.sync = mkdirpSync -mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts)) -mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts)) -mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts)) -mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts)) - -module.exports = mkdirp diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/find-made.js b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/find-made.js deleted file mode 100644 index 022e492..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/find-made.js +++ /dev/null @@ -1,29 +0,0 @@ -const {dirname} = require('path') - -const findMade = (opts, parent, path = undefined) => { - // we never want the 'made' return value to be a root directory - if (path === parent) - return Promise.resolve() - - return opts.statAsync(parent).then( - st => st.isDirectory() ? path : undefined, // will fail later - er => er.code === 'ENOENT' - ? findMade(opts, dirname(parent), parent) - : undefined - ) -} - -const findMadeSync = (opts, parent, path = undefined) => { - if (path === parent) - return undefined - - try { - return opts.statSync(parent).isDirectory() ? path : undefined - } catch (er) { - return er.code === 'ENOENT' - ? findMadeSync(opts, dirname(parent), parent) - : undefined - } -} - -module.exports = {findMade, findMadeSync} diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-manual.js b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-manual.js deleted file mode 100644 index 2eb18cd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-manual.js +++ /dev/null @@ -1,64 +0,0 @@ -const {dirname} = require('path') - -const mkdirpManual = (path, opts, made) => { - opts.recursive = false - const parent = dirname(path) - if (parent === path) { - return opts.mkdirAsync(path, opts).catch(er => { - // swallowed by recursive implementation on posix systems - // any other error is a failure - if (er.code !== 'EISDIR') - throw er - }) - } - - return opts.mkdirAsync(path, opts).then(() => made || path, er => { - if (er.code === 'ENOENT') - return mkdirpManual(parent, opts) - .then(made => mkdirpManual(path, opts, made)) - if (er.code !== 'EEXIST' && er.code !== 'EROFS') - throw er - return opts.statAsync(path).then(st => { - if (st.isDirectory()) - return made - else - throw er - }, () => { throw er }) - }) -} - -const mkdirpManualSync = (path, opts, made) => { - const parent = dirname(path) - opts.recursive = false - - if (parent === path) { - try { - return opts.mkdirSync(path, opts) - } catch (er) { - // swallowed by recursive implementation on posix systems - // any other error is a failure - if (er.code !== 'EISDIR') - throw er - else - return - } - } - - try { - opts.mkdirSync(path, opts) - return made || path - } catch (er) { - if (er.code === 'ENOENT') - return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made)) - if (er.code !== 'EEXIST' && er.code !== 'EROFS') - throw er - try { - if (!opts.statSync(path).isDirectory()) - throw er - } catch (_) { - throw er - } - } -} - -module.exports = {mkdirpManual, mkdirpManualSync} diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-native.js b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-native.js deleted file mode 100644 index c7a6b69..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-native.js +++ /dev/null @@ -1,39 +0,0 @@ -const {dirname} = require('path') -const {findMade, findMadeSync} = require('./find-made.js') -const {mkdirpManual, mkdirpManualSync} = require('./mkdirp-manual.js') - -const mkdirpNative = (path, opts) => { - opts.recursive = true - const parent = dirname(path) - if (parent === path) - return opts.mkdirAsync(path, opts) - - return findMade(opts, path).then(made => - opts.mkdirAsync(path, opts).then(() => made) - .catch(er => { - if (er.code === 'ENOENT') - return mkdirpManual(path, opts) - else - throw er - })) -} - -const mkdirpNativeSync = (path, opts) => { - opts.recursive = true - const parent = dirname(path) - if (parent === path) - return opts.mkdirSync(path, opts) - - const made = findMadeSync(opts, path) - try { - opts.mkdirSync(path, opts) - return made - } catch (er) { - if (er.code === 'ENOENT') - return mkdirpManualSync(path, opts) - else - throw er - } -} - -module.exports = {mkdirpNative, mkdirpNativeSync} diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/opts-arg.js b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/opts-arg.js deleted file mode 100644 index 2fa4833..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/opts-arg.js +++ /dev/null @@ -1,23 +0,0 @@ -const { promisify } = require('util') -const fs = require('fs') -const optsArg = opts => { - if (!opts) - opts = { mode: 0o777, fs } - else if (typeof opts === 'object') - opts = { mode: 0o777, fs, ...opts } - else if (typeof opts === 'number') - opts = { mode: opts, fs } - else if (typeof opts === 'string') - opts = { mode: parseInt(opts, 8), fs } - else - throw new TypeError('invalid options argument') - - opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir - opts.mkdirAsync = promisify(opts.mkdir) - opts.stat = opts.stat || opts.fs.stat || fs.stat - opts.statAsync = promisify(opts.stat) - opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync - opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync - return opts -} -module.exports = optsArg diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/path-arg.js b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/path-arg.js deleted file mode 100644 index cc07de5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/path-arg.js +++ /dev/null @@ -1,29 +0,0 @@ -const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform -const { resolve, parse } = require('path') -const pathArg = path => { - if (/\0/.test(path)) { - // simulate same failure that node raises - throw Object.assign( - new TypeError('path must be a string without null bytes'), - { - path, - code: 'ERR_INVALID_ARG_VALUE', - } - ) - } - - path = resolve(path) - if (platform === 'win32') { - const badWinChars = /[*|"<>?:]/ - const {root} = parse(path) - if (badWinChars.test(path.substr(root.length))) { - throw Object.assign(new Error('Illegal characters in path.'), { - path, - code: 'EINVAL', - }) - } - } - - return path -} -module.exports = pathArg diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/use-native.js b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/use-native.js deleted file mode 100644 index 079361d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/use-native.js +++ /dev/null @@ -1,10 +0,0 @@ -const fs = require('fs') - -const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version -const versArr = version.replace(/^v/, '').split('.') -const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12 - -const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir -const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync - -module.exports = {useNative, useNativeSync} diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/node_modules/.bin/mkdirp b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/node_modules/.bin/mkdirp deleted file mode 100755 index 01ad2b9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/node_modules/.bin/mkdirp +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../bin/cmd.js" "$@" -else - exec node "$basedir/../../bin/cmd.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/package.json b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/package.json deleted file mode 100644 index 2913ed0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "1.0.4", - "main": "index.js", - "keywords": [ - "mkdir", - "directory", - "make dir", - "make", - "dir", - "recursive", - "native" - ], - "repository": { - "type": "git", - "url": "https://github.com/isaacs/node-mkdirp.git" - }, - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "tap": { - "check-coverage": true, - "coverage-map": "map.js" - }, - "devDependencies": { - "require-inject": "^1.4.4", - "tap": "^14.10.7" - }, - "bin": "bin/cmd.js", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "files": [ - "bin", - "lib", - "index.js" - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/readme.markdown b/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/readme.markdown deleted file mode 100644 index 827de59..0000000 --- a/services/hocuspocus/node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,266 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in Node.js! - -Now with a modern API and no\* bugs! - -\* may contain some bugs - -# example - -## pow.js - -```js -const mkdirp = require('mkdirp') - -// return value is a Promise resolving to the first directory created -mkdirp('/tmp/foo/bar/baz').then(made => - console.log(`made directories, starting with ${made}`)) -``` - -Output (where `/tmp/foo` already exists) - -``` -made directories, starting with /tmp/foo/bar -``` - -Or, if you don't have time to wait around for promises: - -```js -const mkdirp = require('mkdirp') - -// return value is the first directory created -const made = mkdirp.sync('/tmp/foo/bar/baz') -console.log(`made directories, starting with ${made}`) -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -const mkdirp = require('mkdirp') -``` - -## mkdirp(dir, [opts]) -> Promise - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `opts.mode`. If `opts` is a string or number, it will be -treated as the `opts.mode`. - -If `opts.mode` isn't specified, it defaults to `0o777 & -(~process.umask())`. - -Promise resolves to first directory `made` that had to be created, or -`undefined` if everything already exists. Promise rejects if any errors -are encountered. Note that, in the case of promise rejection, some -directories _may_ have been created, as recursive directory creation is not -an atomic operation. - -You can optionally pass in an alternate `fs` implementation by passing in -`opts.fs`. Your implementation should have `opts.fs.mkdir(path, opts, cb)` -and `opts.fs.stat(path, cb)`. - -You can also override just one or the other of `mkdir` and `stat` by -passing in `opts.stat` or `opts.mkdir`, or providing an `fs` option that -only overrides one of these. - -## mkdirp.sync(dir, opts) -> String|null - -Synchronously create a new directory and any necessary subdirectories at -`dir` with octal permission string `opts.mode`. If `opts` is a string or -number, it will be treated as the `opts.mode`. - -If `opts.mode` isn't specified, it defaults to `0o777 & -(~process.umask())`. - -Returns the first directory that had to be created, or undefined if -everything already exists. - -You can optionally pass in an alternate `fs` implementation by passing in -`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` -and `opts.fs.statSync(path)`. - -You can also override just one or the other of `mkdirSync` and `statSync` -by passing in `opts.statSync` or `opts.mkdirSync`, or providing an `fs` -option that only overrides one of these. - -## mkdirp.manual, mkdirp.manualSync - -Use the manual implementation (not the native one). This is the default -when the native implementation is not available or the stat/mkdir -implementation is overridden. - -## mkdirp.native, mkdirp.nativeSync - -Use the native implementation (not the manual one). This is the default -when the native implementation is available and stat/mkdir are not -overridden. - -# implementation - -On Node.js v10.12.0 and above, use the native `fs.mkdir(p, -{recursive:true})` option, unless `fs.mkdir`/`fs.mkdirSync` has been -overridden by an option. - -## native implementation - -- If the path is a root directory, then pass it to the underlying - implementation and return the result/error. (In this case, it'll either - succeed or fail, but we aren't actually creating any dirs.) -- Walk up the path statting each directory, to find the first path that - will be created, `made`. -- Call `fs.mkdir(path, { recursive: true })` (or `fs.mkdirSync`) -- If error, raise it to the caller. -- Return `made`. - -## manual implementation - -- Call underlying `fs.mkdir` implementation, with `recursive: false` -- If error: - - If path is a root directory, raise to the caller and do not handle it - - If ENOENT, mkdirp parent dir, store result as `made` - - stat(path) - - If error, raise original `mkdir` error - - If directory, return `made` - - Else, raise original `mkdir` error -- else - - return `undefined` if a root dir, or `made` if set, or `path` - -## windows vs unix caveat - -On Windows file systems, attempts to create a root directory (ie, a drive -letter or root UNC path) will fail. If the root directory exists, then it -will fail with `EPERM`. If the root directory does not exist, then it will -fail with `ENOENT`. - -On posix file systems, attempts to create a root directory (in recursive -mode) will succeed silently, as it is treated like just another directory -that already exists. (In non-recursive mode, of course, it fails with -`EEXIST`.) - -In order to preserve this system-specific behavior (and because it's not as -if we can create the parent of a root directory anyway), attempts to create -a root directory are passed directly to the `fs` implementation, and any -errors encountered are not handled. - -## native error caveat - -The native implementation (as of at least Node.js v13.4.0) does not provide -appropriate errors in some cases (see -[nodejs/node#31481](https://github.com/nodejs/node/issues/31481) and -[nodejs/node#28015](https://github.com/nodejs/node/issues/28015)). - -In order to work around this issue, the native implementation will fall -back to the manual implementation if an `ENOENT` error is encountered. - -# choosing a recursive mkdir implementation - -There are a few to choose from! Use the one that suits your needs best :D - -## use `fs.mkdir(path, {recursive: true}, cb)` if: - -- You wish to optimize performance even at the expense of other factors. -- You don't need to know the first dir created. -- You are ok with getting `ENOENT` as the error when some other problem is - the actual cause. -- You can limit your platforms to Node.js v10.12 and above. -- You're ok with using callbacks instead of promises. -- You don't need/want a CLI. -- You don't need to override the `fs` methods in use. - -## use this module (mkdirp 1.x) if: - -- You need to know the first directory that was created. -- You wish to use the native implementation if available, but fall back - when it's not. -- You prefer promise-returning APIs to callback-taking APIs. -- You want more useful error messages than the native recursive mkdir - provides (at least as of Node.js v13.4), and are ok with re-trying on - `ENOENT` to achieve this. -- You need (or at least, are ok with) a CLI. -- You need to override the `fs` methods in use. - -## use [`make-dir`](http://npm.im/make-dir) if: - -- You do not need to know the first dir created (and wish to save a few - `stat` calls when using the native implementation for this reason). -- You wish to use the native implementation if available, but fall back - when it's not. -- You prefer promise-returning APIs to callback-taking APIs. -- You are ok with occasionally getting `ENOENT` errors for failures that - are actually related to something other than a missing file system entry. -- You don't need/want a CLI. -- You need to override the `fs` methods in use. - -## use mkdirp 0.x if: - -- You need to know the first directory that was created. -- You need (or at least, are ok with) a CLI. -- You need to override the `fs` methods in use. -- You're ok with using callbacks instead of promises. -- You are not running on Windows, where the root-level ENOENT errors can - lead to infinite regress. -- You think vinyl just sounds warmer and richer for some weird reason. -- You are supporting truly ancient Node.js versions, before even the advent - of a `Promise` language primitive. (Please don't. You deserve better.) - -# cli - -This package also ships with a `mkdirp` command. - -``` -$ mkdirp -h - -usage: mkdirp [DIR1,DIR2..] {OPTIONS} - - Create each supplied directory including any necessary parent directories - that don't yet exist. - - If the directory already exists, do nothing. - -OPTIONS are: - - -m If a directory needs to be created, set the mode as an octal - --mode= permission string. - - -v --version Print the mkdirp version number - - -h --help Print this helpful banner - - -p --print Print the first directories created for each path provided - - --manual Use manual implementation, even if native is available -``` - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -to get the library locally, or - -``` -npm install -g mkdirp -``` - -to get the command everywhere, or - -``` -npx mkdirp ... -``` - -to run the command without installing it globally. - -# platform support - -This module works on node v8, but only v10 and above are officially -supported, as Node v8 reached its LTS end of life 2020-01-01, which is in -the past, as of this writing. - -# license - -MIT diff --git a/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js b/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js deleted file mode 100644 index ea734fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function (val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} diff --git a/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/license.md b/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/license.md deleted file mode 100644 index fa5d39b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Vercel, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/package.json b/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/package.json deleted file mode 100644 index 4997189..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "ms", - "version": "2.1.3", - "description": "Tiny millisecond conversion utility", - "repository": "vercel/ms", - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "4.18.2", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1", - "prettier": "2.0.5" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/readme.md b/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/readme.md deleted file mode 100644 index 0fc1abb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/ms@2.1.3/node_modules/ms/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -# ms - -![CI](https://github.com/vercel/ms/workflows/CI/badge.svg) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -ms('-3 days') // -259200000 -ms('-1h') // -3600000 -ms('-200') // -200 -``` - -### Convert from Milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(-3 * 60000) // "-3m" -ms(ms('10 hours')) // "10h" -``` - -### Time Format Written-Out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(-3 * 60000, { long: true }) // "-3 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [Node.js](https://nodejs.org) and in the browser -- If a number is supplied to `ms`, a string with a unit is returned -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) -- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned - -## Related Packages - -- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. - -## Caught a Bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml b/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml deleted file mode 100644 index 3298868..0000000 --- a/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Run npm Tests - -on: - workflow_dispatch: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - test: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [22, 23] - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: npm install - - - name: Run tests - run: npm test \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/LICENSE b/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/LICENSE deleted file mode 100644 index 8e0248a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 inspiredware - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/README.md b/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/README.md deleted file mode 100644 index 7c29b68..0000000 --- a/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# napi-build-utils - -[![npm](https://img.shields.io/npm/v/napi-build-utils.svg)](https://www.npmjs.com/package/napi-build-utils) -![Node version](https://img.shields.io/node/v/prebuild.svg) -![Build Status](https://github.com/inspiredware/napi-build-utils/actions/workflows/run-npm-tests.yml/badge.svg) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) - -A set of utilities to assist developers of tools that build [Node-API](https://nodejs.org/api/n-api.html#n_api_n_api) native add-ons. - -## Background - -This module is targeted to developers creating tools that build Node-API native add-ons. - -It implements a set of functions that aid in determining the Node-API version supported by the currently running Node instance and the set of Node-API versions against which the Node-API native add-on is designed to be built. Other functions determine whether a particular Node-API version can be built and can issue console warnings for unsupported Node-API versions. - -Unlike the modules this code is designed to facilitate building, this module is written entirely in JavaScript. - -## Quick start - -```bash -npm install napi-build-utils -``` - -The module exports a set of functions documented [here](./index.md). For example: - -```javascript -var napiBuildUtils = require('napi-build-utils'); -var napiVersion = napiBuildUtils.getNapiVersion(); // Node-API version supported by Node, or undefined. -``` - -## Declaring supported Node-API versions - -Native modules that are designed to work with [Node-API](https://nodejs.org/api/n-api.html#n_api_n_api) must explicitly declare the Node-API version(s) against which they are coded to build. This is accomplished by including a `binary.napi_versions` property in the module's `package.json` file. For example: - -```json -"binary": { - "napi_versions": [2,3] -} -``` - -In the absence of a need to compile against a specific Node-API version, the value `3` is a good choice as this is the Node-API version that was supported when Node-API left experimental status. - -Modules that are built against a specific Node-API version will continue to operate indefinitely, even as later versions of Node-API are introduced. - -## History - -**v2.0.0** This version was introduced to address a limitation when the Node-API version reached `10` in NodeJS `v23.6.0`. There was no change in the API, but a SemVer bump to `2.0.0` was made out of an abundance of caution. - -## Support - -If you run into problems or limitations, please file an issue and we'll take a look. Pull requests are also welcome. diff --git a/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/index.js b/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/index.js deleted file mode 100644 index d143d5d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/index.js +++ /dev/null @@ -1,214 +0,0 @@ -'use strict' -// Copyright (c) 2018 inspiredware - -var path = require('path') -var pkg = require(path.resolve('package.json')) - -var versionArray = process.version - .substr(1) - .replace(/-.*$/, '') - .split('.') - .map(function (item) { - return +item - }) - -/** - * - * A set of utilities to assist developers of tools that build - * [N-API](https://nodejs.org/api/n-api.html#n_api_n_api) native add-ons. - * - * The main repository can be found - * [here](https://github.com/inspiredware/napi-build-utils#napi-build-utils). - * - * @module napi-build-utils - */ - -/** - * Implements a consistent name of `napi` for N-API runtimes. - * - * @param {string} runtime The runtime string. - * @returns {boolean} - */ -exports.isNapiRuntime = function (runtime) { - return runtime === 'napi' -} - -/** - * Determines whether the specified N-API version is supported - * by both the currently running Node instance and the package. - * - * @param {string} napiVersion The N-API version to check. - * @returns {boolean} - */ -exports.isSupportedVersion = function (napiVersion) { - var version = parseInt(napiVersion, 10) - return version <= exports.getNapiVersion() && exports.packageSupportsVersion(version) -} - -/** - * Determines whether the specified N-API version is supported by the package. - * The N-API version must be present in the `package.json` - * `binary.napi_versions` array. - * - * @param {number} napiVersion The N-API version to check. - * @returns {boolean} - * @private - */ -exports.packageSupportsVersion = function (napiVersion) { - if (pkg.binary && pkg.binary.napi_versions && - pkg.binary.napi_versions instanceof Array) { // integer array - for (var i = 0; i < pkg.binary.napi_versions.length; i++) { - if (pkg.binary.napi_versions[i] === napiVersion) return true - }; - }; - return false -} - -/** - * Issues a warning to the supplied log if the N-API version is not supported - * by the current Node instance or if the N-API version is not supported - * by the package. - * - * @param {string} napiVersion The N-API version to check. - * @param {Object} log The log object to which the warnings are to be issued. - * Must implement the `warn` method. - */ -exports.logUnsupportedVersion = function (napiVersion, log) { - if (!exports.isSupportedVersion(napiVersion)) { - if (exports.packageSupportsVersion(napiVersion)) { - log.warn('This Node instance does not support N-API version ' + napiVersion) - } else { - log.warn('This package does not support N-API version ' + napiVersion) - } - } -} - -/** - * Issues warnings to the supplied log for those N-API versions not supported - * by the N-API runtime or the package. - * - * Note that this function is specific to the - * [`prebuild`](https://github.com/prebuild/prebuild#prebuild) package. - * - * `target` is the list of targets to be built and is determined in one of - * three ways from the command line arguments: - * (1) `--target` specifies a specific target to build. - * (2) `--all` specifies all N-API versions supported by the package. - * (3) Neither of these specifies to build the single "best version available." - * - * `prebuild` is an array of objects in the form `{runtime: 'napi', target: '2'}`. - * The array contains the list of N-API versions that are supported by both the - * package being built and the currently running Node instance. - * - * The objective of this function is to issue a warning for those items that appear - * in the `target` argument but not in the `prebuild` argument. - * If a specific target is supported by the package (`packageSupportsVersion`) but - * but note in `prebuild`, the assumption is that the target is not supported by - * Node. - * - * @param {(Array|string)} target The N-API version(s) to check. Target is - * @param {Array} prebuild A config object created by the `prebuild` package. - * @param {Object} log The log object to which the warnings are to be issued. - * Must implement the `warn` method. - * @private - */ -exports.logMissingNapiVersions = function (target, prebuild, log) { - if (exports.getNapiBuildVersions()) { - var targets = [].concat(target) - targets.forEach(function (napiVersion) { - if (!prebuildExists(prebuild, napiVersion)) { - if (exports.packageSupportsVersion(parseInt(napiVersion, 10))) { - log.warn('This Node instance does not support N-API version ' + napiVersion) - } else { - log.warn('This package does not support N-API version ' + napiVersion) - } - } - }) - } else { - log.error('Builds with runtime \'napi\' require a binary.napi_versions ' + - 'property on the package.json file') - } -} - -/** - * Determines whether the specified N-API version exists in the prebuild - * configuration object. - * - * Note that this function is specific to the `prebuild` and `prebuild-install` - * packages. - * - * @param {Object} prebuild A config object created by the `prebuild` package. - * @param {string} napiVersion The N-APi version to be checked. - * @return {boolean} - * @private - */ -var prebuildExists = function (prebuild, napiVersion) { - if (prebuild) { - for (var i = 0; i < prebuild.length; i++) { - if (prebuild[i].target === napiVersion) return true - } - } - return false -} - -/** - * Returns the best N-API version to build given the highest N-API - * version supported by the current Node instance and the N-API versions - * supported by the package, or undefined if a suitable N-API version - * cannot be determined. - * - * The best build version is the greatest N-API version supported by - * the package that is less than or equal to the highest N-API version - * supported by the current Node instance. - * - * @returns {number|undefined} - */ -exports.getBestNapiBuildVersion = function () { - var bestNapiBuildVersion = 0 - var napiBuildVersions = exports.getNapiBuildVersions(pkg) // array of integer strings - if (napiBuildVersions) { - var ourNapiVersion = exports.getNapiVersion() - napiBuildVersions.forEach(function (napiBuildVersionStr) { - var napiBuildVersion = parseInt(napiBuildVersionStr, 10) - if (napiBuildVersion > bestNapiBuildVersion && - napiBuildVersion <= ourNapiVersion) { - bestNapiBuildVersion = napiBuildVersion - } - }) - } - return bestNapiBuildVersion === 0 ? undefined : bestNapiBuildVersion -} - -/** - * Returns an array of N-API versions supported by the package. - * - * @returns {Array|undefined} - */ -exports.getNapiBuildVersions = function () { - var napiBuildVersions = [] - // remove duplicates, convert to text - if (pkg.binary && pkg.binary.napi_versions) { - pkg.binary.napi_versions.forEach(function (napiVersion) { - var duplicated = napiBuildVersions.indexOf('' + napiVersion) !== -1 - if (!duplicated) { - napiBuildVersions.push('' + napiVersion) - } - }) - } - return napiBuildVersions.length ? napiBuildVersions : undefined -} - -/** - * Returns the highest N-API version supported by the current node instance - * or undefined if N-API is not supported. - * - * @returns {string|undefined} - */ -exports.getNapiVersion = function () { - var version = process.versions.napi // integer string, can be undefined - if (!version) { // this code should never need to be updated - if (versionArray[0] === 9 && versionArray[1] >= 3) version = '2' // 9.3.0+ - else if (versionArray[0] === 8) version = '1' // 8.0.0+ - } - return version -} diff --git a/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/index.md b/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/index.md deleted file mode 100644 index e69de29..0000000 diff --git a/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/package.json b/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/package.json deleted file mode 100644 index ad15183..0000000 --- a/services/hocuspocus/node_modules/.pnpm/napi-build-utils@2.0.0/node_modules/napi-build-utils/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "napi-build-utils", - "version": "2.0.0", - "description": "A set of utilities to assist developers of tools that build N-API native add-ons", - "main": "index.js", - "scripts": { - "doc": "jsdoc2md index.js >index.md", - "test": "mocha test/ && npm run lint", - "lint": "standard", - "prepublishOnly": "npm run test" - }, - "keywords": [ - "n-api", - "prebuild", - "prebuild-install" - ], - "author": "Jim Schlight", - "license": "MIT", - "homepage": "https://github.com/inspiredware/napi-build-utils#readme", - "repository": { - "type": "git", - "url": "git+https://github.com/inspiredware/napi-build-utils.git" - }, - "bugs": { - "url": "https://github.com/inspiredware/napi-build-utils/issues" - }, - "devDependencies": { - "chai": "^4.1.2", - "jsdoc-to-markdown": "^4.0.1", - "mocha": "^5.2.0", - "standard": "^12.0.1" - }, - "binary": { - "note": "napi-build-tools is not an N-API module. This entry is for unit testing.", - "napi_versions": [ - 2, - 2, - 3, - 10 - ] - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/HISTORY.md b/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/HISTORY.md deleted file mode 100644 index e1929ab..0000000 --- a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/HISTORY.md +++ /dev/null @@ -1,113 +0,0 @@ -unreleased -================== - - * Added an option preferred encodings array #59 - -0.6.3 / 2022-01-22 -================== - - * Revert "Lazy-load modules from main entry point" - -0.6.2 / 2019-04-29 -================== - - * Fix sorting charset, encoding, and language with extra parameters - -0.6.1 / 2016-05-02 -================== - - * perf: improve `Accept` parsing speed - * perf: improve `Accept-Charset` parsing speed - * perf: improve `Accept-Encoding` parsing speed - * perf: improve `Accept-Language` parsing speed - -0.6.0 / 2015-09-29 -================== - - * Fix including type extensions in parameters in `Accept` parsing - * Fix parsing `Accept` parameters with quoted equals - * Fix parsing `Accept` parameters with quoted semicolons - * Lazy-load modules from main entry point - * perf: delay type concatenation until needed - * perf: enable strict mode - * perf: hoist regular expressions - * perf: remove closures getting spec properties - * perf: remove a closure from media type parsing - * perf: remove property delete from media type parsing - -0.5.3 / 2015-05-10 -================== - - * Fix media type parameter matching to be case-insensitive - -0.5.2 / 2015-05-06 -================== - - * Fix comparing media types with quoted values - * Fix splitting media types with quoted commas - -0.5.1 / 2015-02-14 -================== - - * Fix preference sorting to be stable for long acceptable lists - -0.5.0 / 2014-12-18 -================== - - * Fix list return order when large accepted list - * Fix missing identity encoding when q=0 exists - * Remove dynamic building of Negotiator class - -0.4.9 / 2014-10-14 -================== - - * Fix error when media type has invalid parameter - -0.4.8 / 2014-09-28 -================== - - * Fix all negotiations to be case-insensitive - * Stable sort preferences of same quality according to client order - * Support Node.js 0.6 - -0.4.7 / 2014-06-24 -================== - - * Handle invalid provided languages - * Handle invalid provided media types - -0.4.6 / 2014-06-11 -================== - - * Order by specificity when quality is the same - -0.4.5 / 2014-05-29 -================== - - * Fix regression in empty header handling - -0.4.4 / 2014-05-29 -================== - - * Fix behaviors when headers are not present - -0.4.3 / 2014-04-16 -================== - - * Handle slashes on media params correctly - -0.4.2 / 2014-02-28 -================== - - * Fix media type sorting - * Handle media types params strictly - -0.4.1 / 2014-01-16 -================== - - * Use most specific matches - -0.4.0 / 2014-01-09 -================== - - * Remove preferred prefix from methods diff --git a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/LICENSE b/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/LICENSE deleted file mode 100644 index ea6b9e2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2014 Federico Romero -Copyright (c) 2012-2014 Isaac Z. Schlueter -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/README.md b/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/README.md deleted file mode 100644 index c5c60b3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/README.md +++ /dev/null @@ -1,212 +0,0 @@ -# negotiator - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -An HTTP content negotiator for Node.js - -## Installation - -```sh -$ npm install negotiator -``` - -## API - -```js -var Negotiator = require('negotiator') -``` - -### Accept Negotiation - -```js -availableMediaTypes = ['text/html', 'text/plain', 'application/json'] - -// The negotiator constructor receives a request object -negotiator = new Negotiator(request) - -// Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8' - -negotiator.mediaTypes() -// -> ['text/html', 'image/jpeg', 'application/*'] - -negotiator.mediaTypes(availableMediaTypes) -// -> ['text/html', 'application/json'] - -negotiator.mediaType(availableMediaTypes) -// -> 'text/html' -``` - -You can check a working example at `examples/accept.js`. - -#### Methods - -##### mediaType() - -Returns the most preferred media type from the client. - -##### mediaType(availableMediaType) - -Returns the most preferred media type from a list of available media types. - -##### mediaTypes() - -Returns an array of preferred media types ordered by the client preference. - -##### mediaTypes(availableMediaTypes) - -Returns an array of preferred media types ordered by priority from a list of -available media types. - -### Accept-Language Negotiation - -```js -negotiator = new Negotiator(request) - -availableLanguages = ['en', 'es', 'fr'] - -// Let's say Accept-Language header is 'en;q=0.8, es, pt' - -negotiator.languages() -// -> ['es', 'pt', 'en'] - -negotiator.languages(availableLanguages) -// -> ['es', 'en'] - -language = negotiator.language(availableLanguages) -// -> 'es' -``` - -You can check a working example at `examples/language.js`. - -#### Methods - -##### language() - -Returns the most preferred language from the client. - -##### language(availableLanguages) - -Returns the most preferred language from a list of available languages. - -##### languages() - -Returns an array of preferred languages ordered by the client preference. - -##### languages(availableLanguages) - -Returns an array of preferred languages ordered by priority from a list of -available languages. - -### Accept-Charset Negotiation - -```js -availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5'] - -negotiator = new Negotiator(request) - -// Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2' - -negotiator.charsets() -// -> ['utf-8', 'iso-8859-1', 'utf-7'] - -negotiator.charsets(availableCharsets) -// -> ['utf-8', 'iso-8859-1'] - -negotiator.charset(availableCharsets) -// -> 'utf-8' -``` - -You can check a working example at `examples/charset.js`. - -#### Methods - -##### charset() - -Returns the most preferred charset from the client. - -##### charset(availableCharsets) - -Returns the most preferred charset from a list of available charsets. - -##### charsets() - -Returns an array of preferred charsets ordered by the client preference. - -##### charsets(availableCharsets) - -Returns an array of preferred charsets ordered by priority from a list of -available charsets. - -### Accept-Encoding Negotiation - -```js -availableEncodings = ['identity', 'gzip'] - -negotiator = new Negotiator(request) - -// Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5' - -negotiator.encodings() -// -> ['gzip', 'identity', 'compress'] - -negotiator.encodings(availableEncodings) -// -> ['gzip', 'identity'] - -negotiator.encoding(availableEncodings) -// -> 'gzip' -``` - -You can check a working example at `examples/encoding.js`. - -#### Methods - -##### encoding() - -Returns the most preferred encoding from the client. - -##### encoding(availableEncodings) - -Returns the most preferred encoding from a list of available encodings. - -##### encoding(availableEncodings, preferred) - -Returns the most preferred encoding from a list of available encodings, while prioritizing based on `preferred` array between same-quality encodings. - -##### encodings() - -Returns an array of preferred encodings ordered by the client preference. - -##### encodings(availableEncodings) - -Returns an array of preferred encodings ordered by priority from a list of -available encodings. - -##### encodings(availableEncodings, preferred) - -Returns an array of preferred encodings ordered by priority from a list of -available encodings, while prioritizing based on `preferred` array between same-quality encodings. - -## See Also - -The [accepts](https://npmjs.org/package/accepts#readme) module builds on -this module and provides an alternative interface, mime type validation, -and more. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/negotiator.svg -[npm-url]: https://npmjs.org/package/negotiator -[node-version-image]: https://img.shields.io/node/v/negotiator.svg -[node-version-url]: https://nodejs.org/en/download/ -[coveralls-image]: https://img.shields.io/coveralls/jshttp/negotiator/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/negotiator?branch=master -[downloads-image]: https://img.shields.io/npm/dm/negotiator.svg -[downloads-url]: https://npmjs.org/package/negotiator -[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/negotiator/ci/master?label=ci -[github-actions-ci-url]: https://github.com/jshttp/negotiator/actions/workflows/ci.yml diff --git a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/index.js b/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/index.js deleted file mode 100644 index 7df0b0a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/index.js +++ /dev/null @@ -1,82 +0,0 @@ -/*! - * negotiator - * Copyright(c) 2012 Federico Romero - * Copyright(c) 2012-2014 Isaac Z. Schlueter - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -var preferredCharsets = require('./lib/charset') -var preferredEncodings = require('./lib/encoding') -var preferredLanguages = require('./lib/language') -var preferredMediaTypes = require('./lib/mediaType') - -/** - * Module exports. - * @public - */ - -module.exports = Negotiator; -module.exports.Negotiator = Negotiator; - -/** - * Create a Negotiator instance from a request. - * @param {object} request - * @public - */ - -function Negotiator(request) { - if (!(this instanceof Negotiator)) { - return new Negotiator(request); - } - - this.request = request; -} - -Negotiator.prototype.charset = function charset(available) { - var set = this.charsets(available); - return set && set[0]; -}; - -Negotiator.prototype.charsets = function charsets(available) { - return preferredCharsets(this.request.headers['accept-charset'], available); -}; - -Negotiator.prototype.encoding = function encoding(available, preferred) { - var set = this.encodings(available, preferred); - return set && set[0]; -}; - -Negotiator.prototype.encodings = function encodings(available, preferred) { - return preferredEncodings(this.request.headers['accept-encoding'], available, preferred); -}; - -Negotiator.prototype.language = function language(available) { - var set = this.languages(available); - return set && set[0]; -}; - -Negotiator.prototype.languages = function languages(available) { - return preferredLanguages(this.request.headers['accept-language'], available); -}; - -Negotiator.prototype.mediaType = function mediaType(available) { - var set = this.mediaTypes(available); - return set && set[0]; -}; - -Negotiator.prototype.mediaTypes = function mediaTypes(available) { - return preferredMediaTypes(this.request.headers.accept, available); -}; - -// Backwards compatibility -Negotiator.prototype.preferredCharset = Negotiator.prototype.charset; -Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets; -Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding; -Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings; -Negotiator.prototype.preferredLanguage = Negotiator.prototype.language; -Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages; -Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType; -Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes; diff --git a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/charset.js b/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/charset.js deleted file mode 100644 index cdd0148..0000000 --- a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/charset.js +++ /dev/null @@ -1,169 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredCharsets; -module.exports.preferredCharsets = preferredCharsets; - -/** - * Module variables. - * @private - */ - -var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; - -/** - * Parse the Accept-Charset header. - * @private - */ - -function parseAcceptCharset(accept) { - var accepts = accept.split(','); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var charset = parseCharset(accepts[i].trim(), i); - - if (charset) { - accepts[j++] = charset; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse a charset from the Accept-Charset header. - * @private - */ - -function parseCharset(str, i) { - var match = simpleCharsetRegExp.exec(str); - if (!match) return null; - - var charset = match[1]; - var q = 1; - if (match[2]) { - var params = match[2].split(';') - for (var j = 0; j < params.length; j++) { - var p = params[j].trim().split('='); - if (p[0] === 'q') { - q = parseFloat(p[1]); - break; - } - } - } - - return { - charset: charset, - q: q, - i: i - }; -} - -/** - * Get the priority of a charset. - * @private - */ - -function getCharsetPriority(charset, accepted, index) { - var priority = {o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(charset, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the charset. - * @private - */ - -function specify(charset, spec, index) { - var s = 0; - if(spec.charset.toLowerCase() === charset.toLowerCase()){ - s |= 1; - } else if (spec.charset !== '*' ) { - return null - } - - return { - i: index, - o: spec.i, - q: spec.q, - s: s - } -} - -/** - * Get the preferred charsets from an Accept-Charset header. - * @public - */ - -function preferredCharsets(accept, provided) { - // RFC 2616 sec 14.2: no header = * - var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || ''); - - if (!provided) { - // sorted list of all charsets - return accepts - .filter(isQuality) - .sort(compareSpecs) - .map(getFullCharset); - } - - var priorities = provided.map(function getPriority(type, index) { - return getCharsetPriority(type, accepts, index); - }); - - // sorted list of accepted charsets - return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; -} - -/** - * Get full charset string. - * @private - */ - -function getFullCharset(spec) { - return spec.charset; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/encoding.js b/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/encoding.js deleted file mode 100644 index 9ebb633..0000000 --- a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/encoding.js +++ /dev/null @@ -1,205 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredEncodings; -module.exports.preferredEncodings = preferredEncodings; - -/** - * Module variables. - * @private - */ - -var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; - -/** - * Parse the Accept-Encoding header. - * @private - */ - -function parseAcceptEncoding(accept) { - var accepts = accept.split(','); - var hasIdentity = false; - var minQuality = 1; - - for (var i = 0, j = 0; i < accepts.length; i++) { - var encoding = parseEncoding(accepts[i].trim(), i); - - if (encoding) { - accepts[j++] = encoding; - hasIdentity = hasIdentity || specify('identity', encoding); - minQuality = Math.min(minQuality, encoding.q || 1); - } - } - - if (!hasIdentity) { - /* - * If identity doesn't explicitly appear in the accept-encoding header, - * it's added to the list of acceptable encoding with the lowest q - */ - accepts[j++] = { - encoding: 'identity', - q: minQuality, - i: i - }; - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse an encoding from the Accept-Encoding header. - * @private - */ - -function parseEncoding(str, i) { - var match = simpleEncodingRegExp.exec(str); - if (!match) return null; - - var encoding = match[1]; - var q = 1; - if (match[2]) { - var params = match[2].split(';'); - for (var j = 0; j < params.length; j++) { - var p = params[j].trim().split('='); - if (p[0] === 'q') { - q = parseFloat(p[1]); - break; - } - } - } - - return { - encoding: encoding, - q: q, - i: i - }; -} - -/** - * Get the priority of an encoding. - * @private - */ - -function getEncodingPriority(encoding, accepted, index) { - var priority = {encoding: encoding, o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(encoding, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the encoding. - * @private - */ - -function specify(encoding, spec, index) { - var s = 0; - if(spec.encoding.toLowerCase() === encoding.toLowerCase()){ - s |= 1; - } else if (spec.encoding !== '*' ) { - return null - } - - return { - encoding: encoding, - i: index, - o: spec.i, - q: spec.q, - s: s - } -}; - -/** - * Get the preferred encodings from an Accept-Encoding header. - * @public - */ - -function preferredEncodings(accept, provided, preferred) { - var accepts = parseAcceptEncoding(accept || ''); - - var comparator = preferred ? function comparator (a, b) { - if (a.q !== b.q) { - return b.q - a.q // higher quality first - } - - var aPreferred = preferred.indexOf(a.encoding) - var bPreferred = preferred.indexOf(b.encoding) - - if (aPreferred === -1 && bPreferred === -1) { - // consider the original specifity/order - return (b.s - a.s) || (a.o - b.o) || (a.i - b.i) - } - - if (aPreferred !== -1 && bPreferred !== -1) { - return aPreferred - bPreferred // consider the preferred order - } - - return aPreferred === -1 ? 1 : -1 // preferred first - } : compareSpecs; - - if (!provided) { - // sorted list of all encodings - return accepts - .filter(isQuality) - .sort(comparator) - .map(getFullEncoding); - } - - var priorities = provided.map(function getPriority(type, index) { - return getEncodingPriority(type, accepts, index); - }); - - // sorted list of accepted encodings - return priorities.filter(isQuality).sort(comparator).map(function getEncoding(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i); -} - -/** - * Get full encoding string. - * @private - */ - -function getFullEncoding(spec) { - return spec.encoding; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/language.js b/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/language.js deleted file mode 100644 index a231672..0000000 --- a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/language.js +++ /dev/null @@ -1,179 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredLanguages; -module.exports.preferredLanguages = preferredLanguages; - -/** - * Module variables. - * @private - */ - -var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/; - -/** - * Parse the Accept-Language header. - * @private - */ - -function parseAcceptLanguage(accept) { - var accepts = accept.split(','); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var language = parseLanguage(accepts[i].trim(), i); - - if (language) { - accepts[j++] = language; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse a language from the Accept-Language header. - * @private - */ - -function parseLanguage(str, i) { - var match = simpleLanguageRegExp.exec(str); - if (!match) return null; - - var prefix = match[1] - var suffix = match[2] - var full = prefix - - if (suffix) full += "-" + suffix; - - var q = 1; - if (match[3]) { - var params = match[3].split(';') - for (var j = 0; j < params.length; j++) { - var p = params[j].split('='); - if (p[0] === 'q') q = parseFloat(p[1]); - } - } - - return { - prefix: prefix, - suffix: suffix, - q: q, - i: i, - full: full - }; -} - -/** - * Get the priority of a language. - * @private - */ - -function getLanguagePriority(language, accepted, index) { - var priority = {o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(language, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the language. - * @private - */ - -function specify(language, spec, index) { - var p = parseLanguage(language) - if (!p) return null; - var s = 0; - if(spec.full.toLowerCase() === p.full.toLowerCase()){ - s |= 4; - } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) { - s |= 2; - } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) { - s |= 1; - } else if (spec.full !== '*' ) { - return null - } - - return { - i: index, - o: spec.i, - q: spec.q, - s: s - } -}; - -/** - * Get the preferred languages from an Accept-Language header. - * @public - */ - -function preferredLanguages(accept, provided) { - // RFC 2616 sec 14.4: no header = * - var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || ''); - - if (!provided) { - // sorted list of all languages - return accepts - .filter(isQuality) - .sort(compareSpecs) - .map(getFullLanguage); - } - - var priorities = provided.map(function getPriority(type, index) { - return getLanguagePriority(type, accepts, index); - }); - - // sorted list of accepted languages - return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; -} - -/** - * Get full language string. - * @private - */ - -function getFullLanguage(spec) { - return spec.full; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/mediaType.js b/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/mediaType.js deleted file mode 100644 index 8e402ea..0000000 --- a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/lib/mediaType.js +++ /dev/null @@ -1,294 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredMediaTypes; -module.exports.preferredMediaTypes = preferredMediaTypes; - -/** - * Module variables. - * @private - */ - -var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/; - -/** - * Parse the Accept header. - * @private - */ - -function parseAccept(accept) { - var accepts = splitMediaTypes(accept); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var mediaType = parseMediaType(accepts[i].trim(), i); - - if (mediaType) { - accepts[j++] = mediaType; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse a media type from the Accept header. - * @private - */ - -function parseMediaType(str, i) { - var match = simpleMediaTypeRegExp.exec(str); - if (!match) return null; - - var params = Object.create(null); - var q = 1; - var subtype = match[2]; - var type = match[1]; - - if (match[3]) { - var kvps = splitParameters(match[3]).map(splitKeyValuePair); - - for (var j = 0; j < kvps.length; j++) { - var pair = kvps[j]; - var key = pair[0].toLowerCase(); - var val = pair[1]; - - // get the value, unwrapping quotes - var value = val && val[0] === '"' && val[val.length - 1] === '"' - ? val.slice(1, -1) - : val; - - if (key === 'q') { - q = parseFloat(value); - break; - } - - // store parameter - params[key] = value; - } - } - - return { - type: type, - subtype: subtype, - params: params, - q: q, - i: i - }; -} - -/** - * Get the priority of a media type. - * @private - */ - -function getMediaTypePriority(type, accepted, index) { - var priority = {o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(type, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the media type. - * @private - */ - -function specify(type, spec, index) { - var p = parseMediaType(type); - var s = 0; - - if (!p) { - return null; - } - - if(spec.type.toLowerCase() == p.type.toLowerCase()) { - s |= 4 - } else if(spec.type != '*') { - return null; - } - - if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) { - s |= 2 - } else if(spec.subtype != '*') { - return null; - } - - var keys = Object.keys(spec.params); - if (keys.length > 0) { - if (keys.every(function (k) { - return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase(); - })) { - s |= 1 - } else { - return null - } - } - - return { - i: index, - o: spec.i, - q: spec.q, - s: s, - } -} - -/** - * Get the preferred media types from an Accept header. - * @public - */ - -function preferredMediaTypes(accept, provided) { - // RFC 2616 sec 14.2: no header = */* - var accepts = parseAccept(accept === undefined ? '*/*' : accept || ''); - - if (!provided) { - // sorted list of all types - return accepts - .filter(isQuality) - .sort(compareSpecs) - .map(getFullType); - } - - var priorities = provided.map(function getPriority(type, index) { - return getMediaTypePriority(type, accepts, index); - }); - - // sorted list of accepted types - return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; -} - -/** - * Get full type string. - * @private - */ - -function getFullType(spec) { - return spec.type + '/' + spec.subtype; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} - -/** - * Count the number of quotes in a string. - * @private - */ - -function quoteCount(string) { - var count = 0; - var index = 0; - - while ((index = string.indexOf('"', index)) !== -1) { - count++; - index++; - } - - return count; -} - -/** - * Split a key value pair. - * @private - */ - -function splitKeyValuePair(str) { - var index = str.indexOf('='); - var key; - var val; - - if (index === -1) { - key = str; - } else { - key = str.slice(0, index); - val = str.slice(index + 1); - } - - return [key, val]; -} - -/** - * Split an Accept header into media types. - * @private - */ - -function splitMediaTypes(accept) { - var accepts = accept.split(','); - - for (var i = 1, j = 0; i < accepts.length; i++) { - if (quoteCount(accepts[j]) % 2 == 0) { - accepts[++j] = accepts[i]; - } else { - accepts[j] += ',' + accepts[i]; - } - } - - // trim accepts - accepts.length = j + 1; - - return accepts; -} - -/** - * Split a string of parameters. - * @private - */ - -function splitParameters(str) { - var parameters = str.split(';'); - - for (var i = 1, j = 0; i < parameters.length; i++) { - if (quoteCount(parameters[j]) % 2 == 0) { - parameters[++j] = parameters[i]; - } else { - parameters[j] += ';' + parameters[i]; - } - } - - // trim parameters - parameters.length = j + 1; - - for (var i = 0; i < parameters.length; i++) { - parameters[i] = parameters[i].trim(); - } - - return parameters; -} diff --git a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/package.json b/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/package.json deleted file mode 100644 index 19b0a8a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/negotiator@0.6.4/node_modules/negotiator/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "negotiator", - "description": "HTTP content negotiation", - "version": "0.6.4", - "contributors": [ - "Douglas Christopher Wilson ", - "Federico Romero ", - "Isaac Z. Schlueter (http://blog.izs.me/)" - ], - "license": "MIT", - "keywords": [ - "http", - "content negotiation", - "accept", - "accept-language", - "accept-encoding", - "accept-charset" - ], - "repository": "jshttp/negotiator", - "devDependencies": { - "eslint": "7.32.0", - "eslint-plugin-markdown": "2.2.1", - "mocha": "9.1.3", - "nyc": "15.1.0" - }, - "files": [ - "lib/", - "HISTORY.md", - "LICENSE", - "index.js", - "README.md" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/LICENSE b/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/LICENSE deleted file mode 100644 index 5513de0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Lukas Geiger - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/README.md b/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/README.md deleted file mode 100644 index 680a0d0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# Node.js ABI - -[![Build Status](https://github.com/electron/node-abi/actions/workflows/test.yml/badge.svg)](https://github.com/electron/node-abi/actions/workflows/test.yml) -[![Auto-update ABI JSON file](https://github.com/electron/node-abi/actions/workflows/update-abi.yml/badge.svg)](https://github.com/electron/node-abi/actions/workflows/update-abi.yml) -[![Snyk badge](https://snyk.io/test/github/electron/node-abi/badge.svg)](https://snyk.io/test/github/electron/node-abi) -[![npm version](http://img.shields.io/npm/v/node-abi.svg)](https://npmjs.org/package/node-abi) - -Get the Node ABI (application binary interface) for a given target and runtime, and vice versa. - -## Installation - -```shell -npm install node-abi -``` - -## Usage - -```javascript -const nodeAbi = require('node-abi') - -nodeAbi.getAbi('7.2.0', 'node') -// '51' -nodeAbi.getAbi('1.4.10', 'electron') -// '50' -nodeAbi.getTarget('51', 'node') -// '7.2.0' -nodeAbi.getTarget('50', 'electron') -// '1.4.15' - -nodeAbi.allTargets -// [ -// { runtime: 'node', target: '0.10.48', abi: '11', lts: false }, -// { runtime: 'node', target: '0.12.17', abi: '14', lts: false }, -// { runtime: 'node', target: '4.6.1', abi: '46', lts: true }, -// { runtime: 'node', target: '5.12.0', abi: '47', lts: false }, -// { runtime: 'node', target: '6.9.4', abi: '48', lts: true }, -// { runtime: 'node', target: '7.4.0', abi: '51', lts: false }, -// { runtime: 'electron', target: '1.0.2', abi: '47', lts: false }, -// { runtime: 'electron', target: '1.2.8', abi: '48', lts: false }, -// { runtime: 'electron', target: '1.3.13', abi: '49', lts: false }, -// { runtime: 'electron', target: '1.4.15', abi: '50', lts: false } -// ] -nodeAbi.deprecatedTargets -nodeAbi.supportedTargets -nodeAbi.additionalTargets -nodeAbi.futureTargets -// ... -``` - -## References - -- https://github.com/lgeiger/electron-abi -- https://nodejs.org/en/download/releases/ -- https://github.com/nodejs/Release diff --git a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/abi_registry.json b/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/abi_registry.json deleted file mode 100644 index 32288e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/abi_registry.json +++ /dev/null @@ -1,446 +0,0 @@ -[ - { - "runtime": "node", - "target": "11.0.0", - "lts": false, - "future": false, - "abi": "67" - }, - { - "runtime": "node", - "target": "12.0.0", - "lts": [ - "2019-10-21", - "2020-11-30" - ], - "future": false, - "abi": "72" - }, - { - "runtime": "node", - "target": "13.0.0", - "lts": false, - "future": false, - "abi": "79" - }, - { - "runtime": "node", - "target": "14.0.0", - "lts": [ - "2020-10-27", - "2021-10-19" - ], - "future": false, - "abi": "83" - }, - { - "runtime": "node", - "target": "15.0.0", - "lts": false, - "future": false, - "abi": "88" - }, - { - "runtime": "node", - "target": "16.0.0", - "lts": [ - "2021-10-26", - "2022-10-18" - ], - "future": false, - "abi": "93" - }, - { - "runtime": "node", - "target": "17.0.0", - "lts": false, - "future": false, - "abi": "102" - }, - { - "runtime": "node", - "target": "18.0.0", - "lts": [ - "2022-10-25", - "2023-10-18" - ], - "future": false, - "abi": "108" - }, - { - "runtime": "node", - "target": "19.0.0", - "lts": false, - "future": false, - "abi": "111" - }, - { - "runtime": "node", - "target": "20.0.0", - "lts": [ - "2023-10-24", - "2024-10-22" - ], - "future": false, - "abi": "115" - }, - { - "runtime": "node", - "target": "21.0.0", - "lts": false, - "future": false, - "abi": "120" - }, - { - "runtime": "node", - "target": "22.0.0", - "lts": [ - "2024-10-29", - "2025-10-21" - ], - "future": false, - "abi": "127" - }, - { - "runtime": "node", - "target": "23.0.0", - "lts": false, - "future": false, - "abi": "131" - }, - { - "runtime": "node", - "target": "24.0.0", - "lts": [ - "2025-10-28", - "2026-10-20" - ], - "future": false, - "abi": "137" - }, - { - "runtime": "node", - "target": "25.0.0", - "lts": false, - "future": false, - "abi": "141" - }, - { - "runtime": "node", - "target": "26.0.0", - "lts": [ - "2026-10-28", - "2027-10-20" - ], - "future": false, - "abi": "147" - }, - { - "abi": "70", - "future": false, - "lts": false, - "runtime": "electron", - "target": "5.0.0-beta.9" - }, - { - "abi": "73", - "future": false, - "lts": false, - "runtime": "electron", - "target": "6.0.0-beta.1" - }, - { - "abi": "75", - "future": false, - "lts": false, - "runtime": "electron", - "target": "7.0.0-beta.1" - }, - { - "abi": "76", - "future": false, - "lts": false, - "runtime": "electron", - "target": "9.0.0-beta.1" - }, - { - "abi": "76", - "future": false, - "lts": false, - "runtime": "electron", - "target": "8.0.0-beta.1" - }, - { - "abi": "80", - "future": false, - "lts": false, - "runtime": "electron", - "target": "9.0.0-beta.2" - }, - { - "abi": "82", - "future": false, - "lts": false, - "runtime": "electron", - "target": "11.0.0-beta.1" - }, - { - "abi": "82", - "future": false, - "lts": false, - "runtime": "electron", - "target": "10.0.0-beta.1" - }, - { - "abi": "85", - "future": false, - "lts": false, - "runtime": "electron", - "target": "11.0.0-beta.11" - }, - { - "abi": "87", - "future": false, - "lts": false, - "runtime": "electron", - "target": "12.0.0-beta.1" - }, - { - "abi": "89", - "future": false, - "lts": false, - "runtime": "electron", - "target": "15.0.0-alpha.1" - }, - { - "abi": "89", - "future": false, - "lts": false, - "runtime": "electron", - "target": "14.0.0-beta.1" - }, - { - "abi": "89", - "future": false, - "lts": false, - "runtime": "electron", - "target": "13.0.0-beta.2" - }, - { - "abi": "97", - "future": false, - "lts": false, - "runtime": "electron", - "target": "14.0.2" - }, - { - "abi": "98", - "future": false, - "lts": false, - "runtime": "electron", - "target": "15.0.0-beta.7" - }, - { - "abi": "99", - "future": false, - "lts": false, - "runtime": "electron", - "target": "16.0.0-alpha.1" - }, - { - "abi": "101", - "future": false, - "lts": false, - "runtime": "electron", - "target": "17.0.0-alpha.1" - }, - { - "abi": "103", - "future": false, - "lts": false, - "runtime": "electron", - "target": "18.0.0-alpha.1" - }, - { - "abi": "106", - "future": false, - "lts": false, - "runtime": "electron", - "target": "19.0.0-alpha.1" - }, - { - "abi": "107", - "future": false, - "lts": false, - "runtime": "electron", - "target": "20.0.0-alpha.1" - }, - { - "abi": "109", - "future": false, - "lts": false, - "runtime": "electron", - "target": "21.0.0-alpha.1" - }, - { - "abi": "110", - "future": false, - "lts": false, - "runtime": "electron", - "target": "22.0.0-alpha.1" - }, - { - "abi": "113", - "future": false, - "lts": false, - "runtime": "electron", - "target": "23.0.0-alpha.1" - }, - { - "abi": "114", - "future": false, - "lts": false, - "runtime": "electron", - "target": "24.0.0-alpha.1" - }, - { - "abi": "116", - "future": false, - "lts": false, - "runtime": "electron", - "target": "26.0.0-alpha.1" - }, - { - "abi": "116", - "future": false, - "lts": false, - "runtime": "electron", - "target": "25.0.0-alpha.1" - }, - { - "abi": "118", - "future": false, - "lts": false, - "runtime": "electron", - "target": "27.0.0-alpha.1" - }, - { - "abi": "119", - "future": false, - "lts": false, - "runtime": "electron", - "target": "28.0.0-alpha.1" - }, - { - "abi": "121", - "future": false, - "lts": false, - "runtime": "electron", - "target": "29.0.0-alpha.1" - }, - { - "abi": "123", - "future": false, - "lts": false, - "runtime": "electron", - "target": "31.0.0-alpha.1" - }, - { - "abi": "123", - "future": false, - "lts": false, - "runtime": "electron", - "target": "30.0.0-alpha.1" - }, - { - "abi": "125", - "future": false, - "lts": false, - "runtime": "electron", - "target": "31.0.0-beta.7" - }, - { - "abi": "128", - "future": false, - "lts": false, - "runtime": "electron", - "target": "32.0.0-alpha.1" - }, - { - "abi": "130", - "future": false, - "lts": false, - "runtime": "electron", - "target": "33.0.0-alpha.1" - }, - { - "abi": "132", - "future": false, - "lts": false, - "runtime": "electron", - "target": "34.0.0-alpha.1" - }, - { - "abi": "133", - "future": false, - "lts": false, - "runtime": "electron", - "target": "35.0.0-alpha.1" - }, - { - "abi": "135", - "future": false, - "lts": false, - "runtime": "electron", - "target": "36.0.0-alpha.1" - }, - { - "abi": "136", - "future": false, - "lts": false, - "runtime": "electron", - "target": "37.0.0-alpha.1" - }, - { - "abi": "139", - "future": false, - "lts": false, - "runtime": "electron", - "target": "38.0.0-alpha.1" - }, - { - "abi": "140", - "future": false, - "lts": false, - "runtime": "electron", - "target": "39.0.0-alpha.1" - }, - { - "abi": "143", - "future": false, - "lts": false, - "runtime": "electron", - "target": "40.0.0-alpha.2" - }, - { - "abi": "145", - "future": false, - "lts": false, - "runtime": "electron", - "target": "41.0.0-alpha.1" - }, - { - "abi": "146", - "future": false, - "lts": false, - "runtime": "electron", - "target": "42.0.0-alpha.1" - }, - { - "abi": "148", - "future": true, - "lts": false, - "runtime": "electron", - "target": "43.0.0-alpha.1" - } -] \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/index.js b/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/index.js deleted file mode 100644 index f656135..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/index.js +++ /dev/null @@ -1,179 +0,0 @@ -var semver = require('semver') - -function getNextTarget (runtime, targets) { - if (targets == null) targets = allTargets - var latest = targets.filter(function (t) { return t.runtime === runtime }).slice(-1)[0] - var increment = runtime === 'electron' ? 'minor' : 'major' - var next = semver.inc(latest.target, increment) - // Electron releases appear in the registry in their beta form, sometimes there is - // no active beta line. During this time we need to double bump - if (runtime === 'electron' && semver.parse(latest.target).prerelease.length) { - next = semver.inc(next, 'major') - } - return next -} - -function getAbi (target, runtime) { - if (target === String(Number(target))) return target - if (target) target = target.replace(/^v/, '') - if (!runtime) runtime = 'node' - - if (runtime === 'node') { - if (!target) return process.versions.modules - if (target === process.versions.node) return process.versions.modules - } - - var abi - var lastTarget - - for (var i = 0; i < allTargets.length; i++) { - var t = allTargets[i] - if (t.runtime !== runtime) continue - if (semver.lte(t.target, target) && (!lastTarget || semver.gte(t.target, lastTarget))) { - abi = t.abi - lastTarget = t.target - } - } - - if (abi && semver.lt(target, getNextTarget(runtime))) return abi - throw new Error('Could not detect abi for version ' + target + ' and runtime ' + runtime + '. Updating "node-abi" might help solve this issue if it is a new release of ' + runtime) -} - -function getTarget (abi, runtime) { - if (abi && abi !== String(Number(abi))) return abi - if (!runtime) runtime = 'node' - - if (runtime === 'node' && !abi) return process.versions.node - - var match = allTargets - .filter(function (t) { - return t.abi === abi && t.runtime === runtime - }) - .map(function (t) { - return t.target - }) - if (match.length) { - var betaSeparatorIndex = match[0].indexOf("-") - return betaSeparatorIndex > -1 - ? match[0].substring(0, betaSeparatorIndex) - : match[0] - } - - throw new Error('Could not detect target for abi ' + abi + ' and runtime ' + runtime) -} - -function sortByTargetFn (a, b) { - var abiComp = Number(a.abi) - Number(b.abi) - if (abiComp !== 0) return abiComp - if (a.target < b.target) return -1 - if (a.target > b.target) return 1 - return 0 -} - -function loadGeneratedTargets () { - var registry = require('./abi_registry.json') - var targets = { - supported: [], - additional: [], - future: [] - } - - registry.forEach(function (item) { - var target = { - runtime: item.runtime, - target: item.target, - abi: item.abi - } - if (item.lts) { - var startDate = new Date(Date.parse(item.lts[0])) - var endDate = new Date(Date.parse(item.lts[1])) - var currentDate = new Date() - target.lts = startDate < currentDate && currentDate < endDate - } else { - target.lts = false - } - - if (target.runtime === 'node-webkit') { - targets.additional.push(target) - } else if (item.future) { - targets.future.push(target) - } else { - targets.supported.push(target) - } - }) - - targets.supported.sort(sortByTargetFn) - targets.additional.sort(sortByTargetFn) - targets.future.sort(sortByTargetFn) - - return targets -} - -var generatedTargets = loadGeneratedTargets() - -var supportedTargets = [ - {runtime: 'node', target: '5.0.0', abi: '47', lts: false}, - {runtime: 'node', target: '6.0.0', abi: '48', lts: false}, - {runtime: 'node', target: '7.0.0', abi: '51', lts: false}, - {runtime: 'node', target: '8.0.0', abi: '57', lts: false}, - {runtime: 'node', target: '9.0.0', abi: '59', lts: false}, - {runtime: 'node', target: '10.0.0', abi: '64', lts: new Date(2018, 10, 1) < new Date() && new Date() < new Date(2020, 4, 31)}, - {runtime: 'electron', target: '0.36.0', abi: '47', lts: false}, - {runtime: 'electron', target: '1.1.0', abi: '48', lts: false}, - {runtime: 'electron', target: '1.3.0', abi: '49', lts: false}, - {runtime: 'electron', target: '1.4.0', abi: '50', lts: false}, - {runtime: 'electron', target: '1.5.0', abi: '51', lts: false}, - {runtime: 'electron', target: '1.6.0', abi: '53', lts: false}, - {runtime: 'electron', target: '1.7.0', abi: '54', lts: false}, - {runtime: 'electron', target: '1.8.0', abi: '57', lts: false}, - {runtime: 'electron', target: '2.0.0', abi: '57', lts: false}, - {runtime: 'electron', target: '3.0.0', abi: '64', lts: false}, - {runtime: 'electron', target: '4.0.0', abi: '64', lts: false}, - {runtime: 'electron', target: '4.0.4', abi: '69', lts: false} -] - -supportedTargets.push.apply(supportedTargets, generatedTargets.supported) - -var additionalTargets = [ - {runtime: 'node-webkit', target: '0.13.0', abi: '47', lts: false}, - {runtime: 'node-webkit', target: '0.15.0', abi: '48', lts: false}, - {runtime: 'node-webkit', target: '0.18.3', abi: '51', lts: false}, - {runtime: 'node-webkit', target: '0.23.0', abi: '57', lts: false}, - {runtime: 'node-webkit', target: '0.26.5', abi: '59', lts: false} -] - -additionalTargets.push.apply(additionalTargets, generatedTargets.additional) - -var deprecatedTargets = [ - {runtime: 'node', target: '0.2.0', abi: '1', lts: false}, - {runtime: 'node', target: '0.9.1', abi: '0x000A', lts: false}, - {runtime: 'node', target: '0.9.9', abi: '0x000B', lts: false}, - {runtime: 'node', target: '0.10.4', abi: '11', lts: false}, - {runtime: 'node', target: '0.11.0', abi: '0x000C', lts: false}, - {runtime: 'node', target: '0.11.8', abi: '13', lts: false}, - {runtime: 'node', target: '0.11.11', abi: '14', lts: false}, - {runtime: 'node', target: '1.0.0', abi: '42', lts: false}, - {runtime: 'node', target: '1.1.0', abi: '43', lts: false}, - {runtime: 'node', target: '2.0.0', abi: '44', lts: false}, - {runtime: 'node', target: '3.0.0', abi: '45', lts: false}, - {runtime: 'node', target: '4.0.0', abi: '46', lts: false}, - {runtime: 'electron', target: '0.30.0', abi: '44', lts: false}, - {runtime: 'electron', target: '0.31.0', abi: '45', lts: false}, - {runtime: 'electron', target: '0.33.0', abi: '46', lts: false} -] - -var futureTargets = generatedTargets.future - -var allTargets = deprecatedTargets - .concat(supportedTargets) - .concat(additionalTargets) - .concat(futureTargets) - -exports.getAbi = getAbi -exports.getTarget = getTarget -exports.deprecatedTargets = deprecatedTargets -exports.supportedTargets = supportedTargets -exports.additionalTargets = additionalTargets -exports.futureTargets = futureTargets -exports.allTargets = allTargets -exports._getNextTarget = getNextTarget diff --git a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/node_modules/.bin/semver b/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/node_modules/.bin/semver deleted file mode 100755 index c989c0e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/node_modules/.bin/semver +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../semver@7.8.3/node_modules/semver/bin/semver.js" "$@" -else - exec node "$basedir/../../../../../semver@7.8.3/node_modules/semver/bin/semver.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/package.json b/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/package.json deleted file mode 100644 index 0ad58de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/node-abi/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "node-abi", - "version": "3.92.0", - "description": "Get the Node ABI for a given target and runtime, and vice versa.", - "main": "index.js", - "scripts": { - "test": "tape test/index.js", - "update-abi-registry": "node --unhandled-rejections=strict scripts/update-abi-registry.js" - }, - "files": [ - "abi_registry.json" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/electron/node-abi.git" - }, - "keywords": [ - "node", - "electron", - "node_module_version", - "abi", - "v8" - ], - "author": "Lukas Geiger", - "license": "MIT", - "bugs": { - "url": "https://github.com/electron/node-abi/issues" - }, - "homepage": "https://github.com/electron/node-abi#readme", - "devDependencies": { - "@semantic-release/npm": "13.0.0-alpha.15", - "semantic-release": "^24.2.7", - "tape": "^5.3.1" - }, - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - }, - "publishConfig": { - "provenance": true - }, - "packageManager": "yarn@4.10.3+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f" -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/semver b/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/semver deleted file mode 120000 index 81ddfca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-abi@3.92.0/node_modules/semver +++ /dev/null @@ -1 +0,0 @@ -../../semver@7.8.3/node_modules/semver \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/LICENSE.md deleted file mode 100644 index 819d91a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 [Node.js API collaborators](https://github.com/nodejs/node-addon-api#collaborators) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/README.md b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/README.md deleted file mode 100644 index e90eb7c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/README.md +++ /dev/null @@ -1,319 +0,0 @@ -NOTE: The default branch has been renamed! -master is now named main - -If you have a local clone, you can update it by running: - -```shell -git branch -m master main -git fetch origin -git branch -u origin/main main -``` - -# **node-addon-api module** -This module contains **header-only C++ wrapper classes** which simplify -the use of the C based [Node-API](https://nodejs.org/dist/latest/docs/api/n-api.html) -provided by Node.js when using C++. It provides a C++ object model -and exception handling semantics with low overhead. - -There are three options for implementing addons: Node-API, nan, or direct -use of internal V8, libuv, and Node.js libraries. Unless there is a need for -direct access to functionality that is not exposed by Node-API as outlined -in [C/C++ addons](https://nodejs.org/dist/latest/docs/api/addons.html) -in Node.js core, use Node-API. Refer to -[C/C++ addons with Node-API](https://nodejs.org/dist/latest/docs/api/n-api.html) -for more information on Node-API. - -Node-API is an ABI stable C interface provided by Node.js for building native -addons. It is independent of the underlying JavaScript runtime (e.g. V8 or ChakraCore) -and is maintained as part of Node.js itself. It is intended to insulate -native addons from changes in the underlying JavaScript engine and allow -modules compiled for one version to run on later versions of Node.js without -recompilation. - -The `node-addon-api` module, which is not part of Node.js, preserves the benefits -of the Node-API as it consists only of inline code that depends only on the stable API -provided by Node-API. As such, modules built against one version of Node.js -using node-addon-api should run without having to be rebuilt with newer versions -of Node.js. - -It is important to remember that *other* Node.js interfaces such as -`libuv` (included in a project via `#include `) are not ABI-stable across -Node.js major versions. Thus, an addon must use Node-API and/or `node-addon-api` -exclusively and build against a version of Node.js that includes an -implementation of Node-API (meaning an active LTS version of Node.js) in -order to benefit from ABI stability across Node.js major versions. Node.js -provides an [ABI stability guide][] containing a detailed explanation of ABI -stability in general, and the Node-API ABI stability guarantee in particular. - -As new APIs are added to Node-API, node-addon-api must be updated to provide -wrappers for those new APIs. For this reason, node-addon-api provides -methods that allow callers to obtain the underlying Node-API handles so -direct calls to Node-API and the use of the objects/methods provided by -node-addon-api can be used together. For example, in order to be able -to use an API for which the node-addon-api does not yet provide a wrapper. - -APIs exposed by node-addon-api are generally used to create and -manipulate JavaScript values. Concepts and operations generally map -to ideas specified in the **ECMA262 Language Specification**. - -The [Node-API Resource](https://nodejs.github.io/node-addon-examples/) offers an -excellent orientation and tips for developers just getting started with Node-API -and node-addon-api. - -- **[Setup](#setup)** -- **[API Documentation](#api)** -- **[Examples](#examples)** -- **[Tests](#tests)** -- **[More resource and info about native Addons](#resources)** -- **[Badges](#badges)** -- **[Code of Conduct](CODE_OF_CONDUCT.md)** -- **[Contributors](#contributors)** -- **[License](#license)** - -## **Current version: 7.1.1** - -(See [CHANGELOG.md](CHANGELOG.md) for complete Changelog) - -[![NPM](https://nodei.co/npm/node-addon-api.png?downloads=true&downloadRank=true)](https://nodei.co/npm/node-addon-api/) [![NPM](https://nodei.co/npm-dl/node-addon-api.png?months=6&height=1)](https://nodei.co/npm/node-addon-api/) - - - -node-addon-api is based on [Node-API](https://nodejs.org/api/n-api.html) and supports using different Node-API versions. -This allows addons built with it to run with Node.js versions which support the targeted Node-API version. -**However** the node-addon-api support model is to support only the active LTS Node.js versions. This means that -every year there will be a new major which drops support for the Node.js LTS version which has gone out of service. - -The oldest Node.js version supported by the current version of node-addon-api is Node.js 16.x. - -## Setup - - [Installation and usage](doc/setup.md) - - [node-gyp](doc/node-gyp.md) - - [cmake-js](doc/cmake-js.md) - - [Conversion tool](doc/conversion-tool.md) - - [Checker tool](doc/checker-tool.md) - - [Generator](doc/generator.md) - - [Prebuild tools](doc/prebuild_tools.md) - - - -### **API Documentation** - -The following is the documentation for node-addon-api. - - - [Full Class Hierarchy](doc/hierarchy.md) - - [Addon Structure](doc/addon.md) - - Data Types: - - [Env](doc/env.md) - - [CallbackInfo](doc/callbackinfo.md) - - [Reference](doc/reference.md) - - [Value](doc/value.md) - - [Name](doc/name.md) - - [Symbol](doc/symbol.md) - - [String](doc/string.md) - - [Number](doc/number.md) - - [Date](doc/date.md) - - [BigInt](doc/bigint.md) - - [Boolean](doc/boolean.md) - - [External](doc/external.md) - - [Object](doc/object.md) - - [Array](doc/array.md) - - [ObjectReference](doc/object_reference.md) - - [PropertyDescriptor](doc/property_descriptor.md) - - [Function](doc/function.md) - - [FunctionReference](doc/function_reference.md) - - [ObjectWrap](doc/object_wrap.md) - - [ClassPropertyDescriptor](doc/class_property_descriptor.md) - - [Buffer](doc/buffer.md) - - [ArrayBuffer](doc/array_buffer.md) - - [TypedArray](doc/typed_array.md) - - [TypedArrayOf](doc/typed_array_of.md) - - [DataView](doc/dataview.md) - - [Error Handling](doc/error_handling.md) - - [Error](doc/error.md) - - [TypeError](doc/type_error.md) - - [RangeError](doc/range_error.md) - - [SyntaxError](doc/syntax_error.md) - - [Object Lifetime Management](doc/object_lifetime_management.md) - - [HandleScope](doc/handle_scope.md) - - [EscapableHandleScope](doc/escapable_handle_scope.md) - - [Memory Management](doc/memory_management.md) - - [Async Operations](doc/async_operations.md) - - [AsyncWorker](doc/async_worker.md) - - [AsyncContext](doc/async_context.md) - - [AsyncWorker Variants](doc/async_worker_variants.md) - - [Thread-safe Functions](doc/threadsafe.md) - - [ThreadSafeFunction](doc/threadsafe_function.md) - - [TypedThreadSafeFunction](doc/typed_threadsafe_function.md) - - [Promises](doc/promises.md) - - [Version management](doc/version_management.md) - - - -### **Examples** - -Are you new to **node-addon-api**? Take a look at our **[examples](https://github.com/nodejs/node-addon-examples)** - -- **[Hello World](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/1_hello_world)** -- **[Pass arguments to a function](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/2_function_arguments/node-addon-api)** -- **[Callbacks](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/3_callbacks/node-addon-api)** -- **[Object factory](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/4_object_factory/node-addon-api)** -- **[Function factory](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/5_function_factory/node-addon-api)** -- **[Wrapping C++ Object](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/6_object_wrap/node-addon-api)** -- **[Factory of wrapped object](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/7_factory_wrap/node-addon-api)** -- **[Passing wrapped object around](https://github.com/nodejs/node-addon-examples/tree/main/src/2-js-to-native-conversion/8_passing_wrapped/node-addon-api)** - - - -### **Tests** - -To run the **node-addon-api** tests do: - -``` -npm install -npm test -``` - -To avoid testing the deprecated portions of the API run -``` -npm install -npm test --disable-deprecated -``` - -To run the tests targeting a specific version of Node-API run -``` -npm install -export NAPI_VERSION=X -npm test --NAPI_VERSION=X -``` - -where X is the version of Node-API you want to target. - -To run a specific unit test, filter conditions are available - -**Example:** - compile and run only tests on objectwrap.cc and objectwrap.js - ``` - npm run unit --filter=objectwrap - ``` - -Multiple unit tests cane be selected with wildcards - -**Example:** -compile and run all test files ending with "reference" -> function_reference.cc, object_reference.cc, reference.cc - ``` - npm run unit --filter=*reference - ``` - -Multiple filter conditions can be joined to broaden the test selection - -**Example:** - compile and run all tests under folders threadsafe_function and typed_threadsafe_function and also the objectwrap.cc file - npm run unit --filter='*function objectwrap' - -### **Debug** - -To run the **node-addon-api** tests with `--debug` option: - -``` -npm run-script dev -``` - -If you want a faster build, you might use the following option: - -``` -npm run-script dev:incremental -``` - -Take a look and get inspired by our **[test suite](https://github.com/nodejs/node-addon-api/tree/HEAD/test)** - -### **Benchmarks** - -You can run the available benchmarks using the following command: - -``` -npm run-script benchmark -``` - -See [benchmark/README.md](benchmark/README.md) for more details about running and adding benchmarks. - - - -### **More resource and info about native Addons** -- **[C++ Addons](https://nodejs.org/dist/latest/docs/api/addons.html)** -- **[Node-API](https://nodejs.org/dist/latest/docs/api/n-api.html)** -- **[Node-API - Next Generation Node API for Native Modules](https://youtu.be/-Oniup60Afs)** -- **[How We Migrated Realm JavaScript From NAN to Node-API](https://developer.mongodb.com/article/realm-javascript-nan-to-n-api)** - -As node-addon-api's core mission is to expose the plain C Node-API as C++ -wrappers, tools that facilitate n-api/node-addon-api providing more -convenient patterns for developing a Node.js add-on with n-api/node-addon-api -can be published to NPM as standalone packages. It is also recommended to tag -such packages with `node-addon-api` to provide more visibility to the community. - -Quick links to NPM searches: [keywords:node-addon-api](https://www.npmjs.com/search?q=keywords%3Anode-addon-api). - - - -### **Other bindings** - -- **[napi-rs](https://napi.rs)** - (`Rust`) - - - -### **Badges** - -The use of badges is recommended to indicate the minimum version of Node-API -required for the module. This helps to determine which Node.js major versions are -supported. Addon maintainers can consult the [Node-API support matrix][] to determine -which Node.js versions provide a given Node-API version. The following badges are -available: - -![Node-API v1 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v1%20Badge.svg) -![Node-API v2 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v2%20Badge.svg) -![Node-API v3 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v3%20Badge.svg) -![Node-API v4 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v4%20Badge.svg) -![Node-API v5 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v5%20Badge.svg) -![Node-API v6 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v6%20Badge.svg) -![Node-API v7 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v7%20Badge.svg) -![Node-API v8 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v8%20Badge.svg) -![Node-API v9 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v9%20Badge.svg) -![Node-API Experimental Version Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20Experimental%20Version%20Badge.svg) - -## **Contributing** - -We love contributions from the community to **node-addon-api**! -See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on our philosophy around extending this module. - - - -## Team members - -### Active -| Name | GitHub Link | -| ------------------- | ----------------------------------------------------- | -| Anna Henningsen | [addaleax](https://github.com/addaleax) | -| Chengzhong Wu | [legendecas](https://github.com/legendecas) | -| Jack Xia | [JckXia](https://github.com/JckXia) | -| Kevin Eady | [KevinEady](https://github.com/KevinEady) | -| Michael Dawson | [mhdawson](https://github.com/mhdawson) | -| Nicola Del Gobbo | [NickNaso](https://github.com/NickNaso) | -| Vladimir Morozov | [vmoroz](https://github.com/vmoroz) | - -### Emeritus -| Name | GitHub Link | -| ------------------- | ----------------------------------------------------- | -| Arunesh Chandra | [aruneshchandra](https://github.com/aruneshchandra) | -| Benjamin Byholm | [kkoopa](https://github.com/kkoopa) | -| Gabriel Schulhof | [gabrielschulhof](https://github.com/gabrielschulhof) | -| Hitesh Kanwathirtha | [digitalinfinity](https://github.com/digitalinfinity) | -| Jason Ginchereau | [jasongin](https://github.com/jasongin) | -| Jim Schlight | [jschlight](https://github.com/jschlight) | -| Sampson Gao | [sampsongao](https://github.com/sampsongao) | -| Taylor Woll | [boingoing](https://github.com/boingoing) | - - - -Licensed under [MIT](./LICENSE.md) - -[ABI stability guide]: https://nodejs.org/en/docs/guides/abi-stability/ -[Node-API support matrix]: https://nodejs.org/dist/latest/docs/api/n-api.html#n_api_n_api_version_matrix diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/common.gypi b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/common.gypi deleted file mode 100644 index 06c0176..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/common.gypi +++ /dev/null @@ -1,20 +0,0 @@ -{ - 'variables': { - 'NAPI_VERSION%': " -inline PropertyDescriptor PropertyDescriptor::Accessor( - const char* utf8name, - Getter getter, - napi_property_attributes attributes, - void* /*data*/) { - using CbData = details::CallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({getter, nullptr}); - - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - CbData::Wrapper, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - const std::string& utf8name, - Getter getter, - napi_property_attributes attributes, - void* data) { - return Accessor(utf8name.c_str(), getter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - napi_value name, - Getter getter, - napi_property_attributes attributes, - void* /*data*/) { - using CbData = details::CallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({getter, nullptr}); - - return PropertyDescriptor({nullptr, - name, - nullptr, - CbData::Wrapper, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Name name, Getter getter, napi_property_attributes attributes, void* data) { - napi_value nameValue = name; - return PropertyDescriptor::Accessor(nameValue, getter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - const char* utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* /*data*/) { - using CbData = details::AccessorCallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({getter, setter, nullptr}); - - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - CbData::GetterWrapper, - CbData::SetterWrapper, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - const std::string& utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* data) { - return Accessor(utf8name.c_str(), getter, setter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - napi_value name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* /*data*/) { - using CbData = details::AccessorCallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({getter, setter, nullptr}); - - return PropertyDescriptor({nullptr, - name, - nullptr, - CbData::GetterWrapper, - CbData::SetterWrapper, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Name name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* data) { - napi_value nameValue = name; - return PropertyDescriptor::Accessor( - nameValue, getter, setter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - const char* utf8name, - Callable cb, - napi_property_attributes attributes, - void* /*data*/) { - using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr))); - using CbData = details::CallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({cb, nullptr}); - - return PropertyDescriptor({utf8name, - nullptr, - CbData::Wrapper, - nullptr, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - const std::string& utf8name, - Callable cb, - napi_property_attributes attributes, - void* data) { - return Function(utf8name.c_str(), cb, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - napi_value name, - Callable cb, - napi_property_attributes attributes, - void* /*data*/) { - using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr))); - using CbData = details::CallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({cb, nullptr}); - - return PropertyDescriptor({nullptr, - name, - CbData::Wrapper, - nullptr, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - Name name, Callable cb, napi_property_attributes attributes, void* data) { - napi_value nameValue = name; - return PropertyDescriptor::Function(nameValue, cb, attributes, data); -} - -#endif // !SRC_NAPI_INL_DEPRECATED_H_ diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/napi-inl.h b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/napi-inl.h deleted file mode 100644 index a5ae7af..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/napi-inl.h +++ /dev/null @@ -1,6607 +0,0 @@ -#ifndef SRC_NAPI_INL_H_ -#define SRC_NAPI_INL_H_ - -//////////////////////////////////////////////////////////////////////////////// -// Node-API C++ Wrapper Classes -// -// Inline header-only implementations for "Node-API" ABI-stable C APIs for -// Node.js. -//////////////////////////////////////////////////////////////////////////////// - -// Note: Do not include this file directly! Include "napi.h" instead. - -#include -#include -#if NAPI_HAS_THREADS -#include -#endif // NAPI_HAS_THREADS -#include -#include - -namespace Napi { - -#ifdef NAPI_CPP_CUSTOM_NAMESPACE -namespace NAPI_CPP_CUSTOM_NAMESPACE { -#endif - -// Helpers to handle functions exposed from C++ and internal constants. -namespace details { - -// New napi_status constants not yet available in all supported versions of -// Node.js releases. Only necessary when they are used in napi.h and napi-inl.h. -constexpr int napi_no_external_buffers_allowed = 22; - -template -inline void default_finalizer(napi_env /*env*/, void* data, void* /*hint*/) { - delete static_cast(data); -} - -// Attach a data item to an object and delete it when the object gets -// garbage-collected. -// TODO: Replace this code with `napi_add_finalizer()` whenever it becomes -// available on all supported versions of Node.js. -template > -inline napi_status AttachData(napi_env env, - napi_value obj, - FreeType* data, - void* hint = nullptr) { - napi_status status; -#if (NAPI_VERSION < 5) - napi_value symbol, external; - status = napi_create_symbol(env, nullptr, &symbol); - if (status == napi_ok) { - status = napi_create_external(env, data, finalizer, hint, &external); - if (status == napi_ok) { - napi_property_descriptor desc = {nullptr, - symbol, - nullptr, - nullptr, - nullptr, - external, - napi_default, - nullptr}; - status = napi_define_properties(env, obj, 1, &desc); - } - } -#else // NAPI_VERSION >= 5 - status = napi_add_finalizer(env, obj, data, finalizer, hint, nullptr); -#endif - return status; -} - -// For use in JS to C++ callback wrappers to catch any Napi::Error exceptions -// and rethrow them as JavaScript exceptions before returning from the callback. -template -inline napi_value WrapCallback(Callable callback) { -#ifdef NAPI_CPP_EXCEPTIONS - try { - return callback(); - } catch (const Error& e) { - e.ThrowAsJavaScriptException(); - return nullptr; - } -#else // NAPI_CPP_EXCEPTIONS - // When C++ exceptions are disabled, errors are immediately thrown as JS - // exceptions, so there is no need to catch and rethrow them here. - return callback(); -#endif // NAPI_CPP_EXCEPTIONS -} - -// For use in JS to C++ void callback wrappers to catch any Napi::Error -// exceptions and rethrow them as JavaScript exceptions before returning from -// the callback. -template -inline void WrapVoidCallback(Callable callback) { -#ifdef NAPI_CPP_EXCEPTIONS - try { - callback(); - } catch (const Error& e) { - e.ThrowAsJavaScriptException(); - } -#else // NAPI_CPP_EXCEPTIONS - // When C++ exceptions are disabled, errors are immediately thrown as JS - // exceptions, so there is no need to catch and rethrow them here. - callback(); -#endif // NAPI_CPP_EXCEPTIONS -} - -template -struct CallbackData { - static inline napi_value Wrapper(napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - CallbackData* callbackData = - static_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - return callbackData->callback(callbackInfo); - }); - } - - Callable callback; - void* data; -}; - -template -struct CallbackData { - static inline napi_value Wrapper(napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - CallbackData* callbackData = - static_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - callbackData->callback(callbackInfo); - return nullptr; - }); - } - - Callable callback; - void* data; -}; - -template -napi_value TemplatedVoidCallback(napi_env env, - napi_callback_info info) NAPI_NOEXCEPT { - return details::WrapCallback([&] { - CallbackInfo cbInfo(env, info); - Callback(cbInfo); - return nullptr; - }); -} - -template -napi_value TemplatedCallback(napi_env env, - napi_callback_info info) NAPI_NOEXCEPT { - return details::WrapCallback([&] { - CallbackInfo cbInfo(env, info); - return Callback(cbInfo); - }); -} - -template -napi_value TemplatedInstanceCallback(napi_env env, - napi_callback_info info) NAPI_NOEXCEPT { - return details::WrapCallback([&] { - CallbackInfo cbInfo(env, info); - T* instance = T::Unwrap(cbInfo.This().As()); - return instance ? (instance->*UnwrapCallback)(cbInfo) : Napi::Value(); - }); -} - -template -napi_value TemplatedInstanceVoidCallback(napi_env env, napi_callback_info info) - NAPI_NOEXCEPT { - return details::WrapCallback([&] { - CallbackInfo cbInfo(env, info); - T* instance = T::Unwrap(cbInfo.This().As()); - if (instance) (instance->*UnwrapCallback)(cbInfo); - return nullptr; - }); -} - -template -struct FinalizeData { - static inline void Wrapper(napi_env env, - void* data, - void* finalizeHint) NAPI_NOEXCEPT { - WrapVoidCallback([&] { - FinalizeData* finalizeData = static_cast(finalizeHint); - finalizeData->callback(Env(env), static_cast(data)); - delete finalizeData; - }); - } - - static inline void WrapperWithHint(napi_env env, - void* data, - void* finalizeHint) NAPI_NOEXCEPT { - WrapVoidCallback([&] { - FinalizeData* finalizeData = static_cast(finalizeHint); - finalizeData->callback( - Env(env), static_cast(data), finalizeData->hint); - delete finalizeData; - }); - } - - Finalizer callback; - Hint* hint; -}; - -#if (NAPI_VERSION > 3 && NAPI_HAS_THREADS) -template , - typename FinalizerDataType = void> -struct ThreadSafeFinalize { - static inline void Wrapper(napi_env env, - void* rawFinalizeData, - void* /* rawContext */) { - if (rawFinalizeData == nullptr) return; - - ThreadSafeFinalize* finalizeData = - static_cast(rawFinalizeData); - finalizeData->callback(Env(env)); - delete finalizeData; - } - - static inline void FinalizeWrapperWithData(napi_env env, - void* rawFinalizeData, - void* /* rawContext */) { - if (rawFinalizeData == nullptr) return; - - ThreadSafeFinalize* finalizeData = - static_cast(rawFinalizeData); - finalizeData->callback(Env(env), finalizeData->data); - delete finalizeData; - } - - static inline void FinalizeWrapperWithContext(napi_env env, - void* rawFinalizeData, - void* rawContext) { - if (rawFinalizeData == nullptr) return; - - ThreadSafeFinalize* finalizeData = - static_cast(rawFinalizeData); - finalizeData->callback(Env(env), static_cast(rawContext)); - delete finalizeData; - } - - static inline void FinalizeFinalizeWrapperWithDataAndContext( - napi_env env, void* rawFinalizeData, void* rawContext) { - if (rawFinalizeData == nullptr) return; - - ThreadSafeFinalize* finalizeData = - static_cast(rawFinalizeData); - finalizeData->callback( - Env(env), finalizeData->data, static_cast(rawContext)); - delete finalizeData; - } - - FinalizerDataType* data; - Finalizer callback; -}; - -template -inline typename std::enable_if(nullptr)>::type -CallJsWrapper(napi_env env, napi_value jsCallback, void* context, void* data) { - details::WrapVoidCallback([&]() { - call(env, - Function(env, jsCallback), - static_cast(context), - static_cast(data)); - }); -} - -template -inline typename std::enable_if(nullptr)>::type -CallJsWrapper(napi_env env, - napi_value jsCallback, - void* /*context*/, - void* /*data*/) { - details::WrapVoidCallback([&]() { - if (jsCallback != nullptr) { - Function(env, jsCallback).Call(0, nullptr); - } - }); -} - -#if NAPI_VERSION > 4 - -template -napi_value DefaultCallbackWrapper(napi_env /*env*/, std::nullptr_t /*cb*/) { - return nullptr; -} - -template -napi_value DefaultCallbackWrapper(napi_env /*env*/, Napi::Function cb) { - return cb; -} - -#else -template -napi_value DefaultCallbackWrapper(napi_env env, Napi::Function cb) { - if (cb.IsEmpty()) { - return TSFN::EmptyFunctionFactory(env); - } - return cb; -} -#endif // NAPI_VERSION > 4 -#endif // NAPI_VERSION > 3 && NAPI_HAS_THREADS - -template -struct AccessorCallbackData { - static inline napi_value GetterWrapper(napi_env env, - napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - AccessorCallbackData* callbackData = - static_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - return callbackData->getterCallback(callbackInfo); - }); - } - - static inline napi_value SetterWrapper(napi_env env, - napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - AccessorCallbackData* callbackData = - static_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - callbackData->setterCallback(callbackInfo); - return nullptr; - }); - } - - Getter getterCallback; - Setter setterCallback; - void* data; -}; - -} // namespace details - -#ifndef NODE_ADDON_API_DISABLE_DEPRECATED -#include "napi-inl.deprecated.h" -#endif // !NODE_ADDON_API_DISABLE_DEPRECATED - -//////////////////////////////////////////////////////////////////////////////// -// Module registration -//////////////////////////////////////////////////////////////////////////////// - -// Register an add-on based on an initializer function. -#define NODE_API_MODULE(modname, regfunc) \ - static napi_value __napi_##regfunc(napi_env env, napi_value exports) { \ - return Napi::RegisterModule(env, exports, regfunc); \ - } \ - NAPI_MODULE(modname, __napi_##regfunc) - -// Register an add-on based on a subclass of `Addon` with a custom Node.js -// module name. -#define NODE_API_NAMED_ADDON(modname, classname) \ - static napi_value __napi_##classname(napi_env env, napi_value exports) { \ - return Napi::RegisterModule(env, exports, &classname::Init); \ - } \ - NAPI_MODULE(modname, __napi_##classname) - -// Register an add-on based on a subclass of `Addon` with the Node.js module -// name given by node-gyp from the `target_name` in binding.gyp. -#define NODE_API_ADDON(classname) \ - NODE_API_NAMED_ADDON(NODE_GYP_MODULE_NAME, classname) - -// Adapt the NAPI_MODULE registration function: -// - Wrap the arguments in NAPI wrappers. -// - Catch any NAPI errors and rethrow as JS exceptions. -inline napi_value RegisterModule(napi_env env, - napi_value exports, - ModuleRegisterCallback registerCallback) { - return details::WrapCallback([&] { - return napi_value( - registerCallback(Napi::Env(env), Napi::Object(env, exports))); - }); -} - -//////////////////////////////////////////////////////////////////////////////// -// Maybe class -//////////////////////////////////////////////////////////////////////////////// - -template -bool Maybe::IsNothing() const { - return !_has_value; -} - -template -bool Maybe::IsJust() const { - return _has_value; -} - -template -void Maybe::Check() const { - NAPI_CHECK(IsJust(), "Napi::Maybe::Check", "Maybe value is Nothing."); -} - -template -T Maybe::Unwrap() const { - NAPI_CHECK(IsJust(), "Napi::Maybe::Unwrap", "Maybe value is Nothing."); - return _value; -} - -template -T Maybe::UnwrapOr(const T& default_value) const { - return _has_value ? _value : default_value; -} - -template -bool Maybe::UnwrapTo(T* out) const { - if (IsJust()) { - *out = _value; - return true; - }; - return false; -} - -template -bool Maybe::operator==(const Maybe& other) const { - return (IsJust() == other.IsJust()) && - (!IsJust() || Unwrap() == other.Unwrap()); -} - -template -bool Maybe::operator!=(const Maybe& other) const { - return !operator==(other); -} - -template -Maybe::Maybe() : _has_value(false) {} - -template -Maybe::Maybe(const T& t) : _has_value(true), _value(t) {} - -template -inline Maybe Nothing() { - return Maybe(); -} - -template -inline Maybe Just(const T& t) { - return Maybe(t); -} - -//////////////////////////////////////////////////////////////////////////////// -// Env class -//////////////////////////////////////////////////////////////////////////////// - -inline Env::Env(napi_env env) : _env(env) {} - -inline Env::operator napi_env() const { - return _env; -} - -inline Object Env::Global() const { - napi_value value; - napi_status status = napi_get_global(*this, &value); - NAPI_THROW_IF_FAILED(*this, status, Object()); - return Object(*this, value); -} - -inline Value Env::Undefined() const { - napi_value value; - napi_status status = napi_get_undefined(*this, &value); - NAPI_THROW_IF_FAILED(*this, status, Value()); - return Value(*this, value); -} - -inline Value Env::Null() const { - napi_value value; - napi_status status = napi_get_null(*this, &value); - NAPI_THROW_IF_FAILED(*this, status, Value()); - return Value(*this, value); -} - -inline bool Env::IsExceptionPending() const { - bool result; - napi_status status = napi_is_exception_pending(_env, &result); - if (status != napi_ok) - result = false; // Checking for a pending exception shouldn't throw. - return result; -} - -inline Error Env::GetAndClearPendingException() const { - napi_value value; - napi_status status = napi_get_and_clear_last_exception(_env, &value); - if (status != napi_ok) { - // Don't throw another exception when failing to get the exception! - return Error(); - } - return Error(_env, value); -} - -inline MaybeOrValue Env::RunScript(const char* utf8script) const { - String script = String::New(_env, utf8script); - return RunScript(script); -} - -inline MaybeOrValue Env::RunScript(const std::string& utf8script) const { - return RunScript(utf8script.c_str()); -} - -inline MaybeOrValue Env::RunScript(String script) const { - napi_value result; - napi_status status = napi_run_script(_env, script, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Value(_env, result), Napi::Value); -} - -#if NAPI_VERSION > 2 -template -void Env::CleanupHook::Wrapper(void* data) NAPI_NOEXCEPT { - auto* cleanupData = - static_cast::CleanupData*>( - data); - cleanupData->hook(); - delete cleanupData; -} - -template -void Env::CleanupHook::WrapperWithArg(void* data) NAPI_NOEXCEPT { - auto* cleanupData = - static_cast::CleanupData*>( - data); - cleanupData->hook(static_cast(cleanupData->arg)); - delete cleanupData; -} -#endif // NAPI_VERSION > 2 - -#if NAPI_VERSION > 5 -template fini> -inline void Env::SetInstanceData(T* data) const { - napi_status status = napi_set_instance_data( - _env, - data, - [](napi_env env, void* data, void*) { fini(env, static_cast(data)); }, - nullptr); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -template fini> -inline void Env::SetInstanceData(DataType* data, HintType* hint) const { - napi_status status = napi_set_instance_data( - _env, - data, - [](napi_env env, void* data, void* hint) { - fini(env, static_cast(data), static_cast(hint)); - }, - hint); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -template -inline T* Env::GetInstanceData() const { - void* data = nullptr; - - napi_status status = napi_get_instance_data(_env, &data); - NAPI_THROW_IF_FAILED(_env, status, nullptr); - - return static_cast(data); -} - -template -void Env::DefaultFini(Env, T* data) { - delete data; -} - -template -void Env::DefaultFiniWithHint(Env, DataType* data, HintType*) { - delete data; -} -#endif // NAPI_VERSION > 5 - -#if NAPI_VERSION > 8 -inline const char* Env::GetModuleFileName() const { - const char* result; - napi_status status = node_api_get_module_file_name(_env, &result); - NAPI_THROW_IF_FAILED(*this, status, nullptr); - return result; -} -#endif // NAPI_VERSION > 8 -//////////////////////////////////////////////////////////////////////////////// -// Value class -//////////////////////////////////////////////////////////////////////////////// - -inline Value::Value() : _env(nullptr), _value(nullptr) {} - -inline Value::Value(napi_env env, napi_value value) - : _env(env), _value(value) {} - -inline Value::operator napi_value() const { - return _value; -} - -inline bool Value::operator==(const Value& other) const { - return StrictEquals(other); -} - -inline bool Value::operator!=(const Value& other) const { - return !this->operator==(other); -} - -inline bool Value::StrictEquals(const Value& other) const { - bool result; - napi_status status = napi_strict_equals(_env, *this, other, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline Napi::Env Value::Env() const { - return Napi::Env(_env); -} - -inline bool Value::IsEmpty() const { - return _value == nullptr; -} - -inline napi_valuetype Value::Type() const { - if (IsEmpty()) { - return napi_undefined; - } - - napi_valuetype type; - napi_status status = napi_typeof(_env, _value, &type); - NAPI_THROW_IF_FAILED(_env, status, napi_undefined); - return type; -} - -inline bool Value::IsUndefined() const { - return Type() == napi_undefined; -} - -inline bool Value::IsNull() const { - return Type() == napi_null; -} - -inline bool Value::IsBoolean() const { - return Type() == napi_boolean; -} - -inline bool Value::IsNumber() const { - return Type() == napi_number; -} - -#if NAPI_VERSION > 5 -inline bool Value::IsBigInt() const { - return Type() == napi_bigint; -} -#endif // NAPI_VERSION > 5 - -#if (NAPI_VERSION > 4) -inline bool Value::IsDate() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_date(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} -#endif - -inline bool Value::IsString() const { - return Type() == napi_string; -} - -inline bool Value::IsSymbol() const { - return Type() == napi_symbol; -} - -inline bool Value::IsArray() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_array(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsArrayBuffer() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_arraybuffer(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsTypedArray() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_typedarray(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsObject() const { - return Type() == napi_object || IsFunction(); -} - -inline bool Value::IsFunction() const { - return Type() == napi_function; -} - -inline bool Value::IsPromise() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_promise(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsDataView() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_dataview(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsBuffer() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_buffer(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsExternal() const { - return Type() == napi_external; -} - -template -inline T Value::As() const { -#ifdef NODE_ADDON_API_ENABLE_TYPE_CHECK_ON_AS - T::CheckCast(_env, _value); -#endif - return T(_env, _value); -} - -inline MaybeOrValue Value::ToBoolean() const { - napi_value result; - napi_status status = napi_coerce_to_bool(_env, _value, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Boolean(_env, result), Napi::Boolean); -} - -inline MaybeOrValue Value::ToNumber() const { - napi_value result; - napi_status status = napi_coerce_to_number(_env, _value, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Number(_env, result), Napi::Number); -} - -inline MaybeOrValue Value::ToString() const { - napi_value result; - napi_status status = napi_coerce_to_string(_env, _value, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::String(_env, result), Napi::String); -} - -inline MaybeOrValue Value::ToObject() const { - napi_value result; - napi_status status = napi_coerce_to_object(_env, _value, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Object(_env, result), Napi::Object); -} - -//////////////////////////////////////////////////////////////////////////////// -// Boolean class -//////////////////////////////////////////////////////////////////////////////// - -inline Boolean Boolean::New(napi_env env, bool val) { - napi_value value; - napi_status status = napi_get_boolean(env, val, &value); - NAPI_THROW_IF_FAILED(env, status, Boolean()); - return Boolean(env, value); -} - -inline void Boolean::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Boolean::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Boolean::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_boolean, "Boolean::CheckCast", "value is not napi_boolean"); -} - -inline Boolean::Boolean() : Napi::Value() {} - -inline Boolean::Boolean(napi_env env, napi_value value) - : Napi::Value(env, value) {} - -inline Boolean::operator bool() const { - return Value(); -} - -inline bool Boolean::Value() const { - bool result; - napi_status status = napi_get_value_bool(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -//////////////////////////////////////////////////////////////////////////////// -// Number class -//////////////////////////////////////////////////////////////////////////////// - -inline Number Number::New(napi_env env, double val) { - napi_value value; - napi_status status = napi_create_double(env, val, &value); - NAPI_THROW_IF_FAILED(env, status, Number()); - return Number(env, value); -} - -inline void Number::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Number::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Number::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_number, "Number::CheckCast", "value is not napi_number"); -} - -inline Number::Number() : Value() {} - -inline Number::Number(napi_env env, napi_value value) : Value(env, value) {} - -inline Number::operator int32_t() const { - return Int32Value(); -} - -inline Number::operator uint32_t() const { - return Uint32Value(); -} - -inline Number::operator int64_t() const { - return Int64Value(); -} - -inline Number::operator float() const { - return FloatValue(); -} - -inline Number::operator double() const { - return DoubleValue(); -} - -inline int32_t Number::Int32Value() const { - int32_t result; - napi_status status = napi_get_value_int32(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -inline uint32_t Number::Uint32Value() const { - uint32_t result; - napi_status status = napi_get_value_uint32(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -inline int64_t Number::Int64Value() const { - int64_t result; - napi_status status = napi_get_value_int64(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -inline float Number::FloatValue() const { - return static_cast(DoubleValue()); -} - -inline double Number::DoubleValue() const { - double result; - napi_status status = napi_get_value_double(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -#if NAPI_VERSION > 5 -//////////////////////////////////////////////////////////////////////////////// -// BigInt Class -//////////////////////////////////////////////////////////////////////////////// - -inline BigInt BigInt::New(napi_env env, int64_t val) { - napi_value value; - napi_status status = napi_create_bigint_int64(env, val, &value); - NAPI_THROW_IF_FAILED(env, status, BigInt()); - return BigInt(env, value); -} - -inline BigInt BigInt::New(napi_env env, uint64_t val) { - napi_value value; - napi_status status = napi_create_bigint_uint64(env, val, &value); - NAPI_THROW_IF_FAILED(env, status, BigInt()); - return BigInt(env, value); -} - -inline BigInt BigInt::New(napi_env env, - int sign_bit, - size_t word_count, - const uint64_t* words) { - napi_value value; - napi_status status = - napi_create_bigint_words(env, sign_bit, word_count, words, &value); - NAPI_THROW_IF_FAILED(env, status, BigInt()); - return BigInt(env, value); -} - -inline void BigInt::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "BigInt::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "BigInt::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_bigint, "BigInt::CheckCast", "value is not napi_bigint"); -} - -inline BigInt::BigInt() : Value() {} - -inline BigInt::BigInt(napi_env env, napi_value value) : Value(env, value) {} - -inline int64_t BigInt::Int64Value(bool* lossless) const { - int64_t result; - napi_status status = - napi_get_value_bigint_int64(_env, _value, &result, lossless); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -inline uint64_t BigInt::Uint64Value(bool* lossless) const { - uint64_t result; - napi_status status = - napi_get_value_bigint_uint64(_env, _value, &result, lossless); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -inline size_t BigInt::WordCount() const { - size_t word_count; - napi_status status = - napi_get_value_bigint_words(_env, _value, nullptr, &word_count, nullptr); - NAPI_THROW_IF_FAILED(_env, status, 0); - return word_count; -} - -inline void BigInt::ToWords(int* sign_bit, - size_t* word_count, - uint64_t* words) { - napi_status status = - napi_get_value_bigint_words(_env, _value, sign_bit, word_count, words); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} -#endif // NAPI_VERSION > 5 - -#if (NAPI_VERSION > 4) -//////////////////////////////////////////////////////////////////////////////// -// Date Class -//////////////////////////////////////////////////////////////////////////////// - -inline Date Date::New(napi_env env, double val) { - napi_value value; - napi_status status = napi_create_date(env, val, &value); - NAPI_THROW_IF_FAILED(env, status, Date()); - return Date(env, value); -} - -inline void Date::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Date::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_date(env, value, &result); - NAPI_CHECK(status == napi_ok, "Date::CheckCast", "napi_is_date failed"); - NAPI_CHECK(result, "Date::CheckCast", "value is not date"); -} - -inline Date::Date() : Value() {} - -inline Date::Date(napi_env env, napi_value value) : Value(env, value) {} - -inline Date::operator double() const { - return ValueOf(); -} - -inline double Date::ValueOf() const { - double result; - napi_status status = napi_get_date_value(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Name class -//////////////////////////////////////////////////////////////////////////////// -inline void Name::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Name::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Name::CheckCast", "napi_typeof failed"); - NAPI_CHECK(type == napi_string || type == napi_symbol, - "Name::CheckCast", - "value is not napi_string or napi_symbol"); -} - -inline Name::Name() : Value() {} - -inline Name::Name(napi_env env, napi_value value) : Value(env, value) {} - -//////////////////////////////////////////////////////////////////////////////// -// String class -//////////////////////////////////////////////////////////////////////////////// - -inline String String::New(napi_env env, const std::string& val) { - return String::New(env, val.c_str(), val.size()); -} - -inline String String::New(napi_env env, const std::u16string& val) { - return String::New(env, val.c_str(), val.size()); -} - -inline String String::New(napi_env env, const char* val) { - // TODO(@gabrielschulhof) Remove if-statement when core's error handling is - // available in all supported versions. - if (val == nullptr) { - // Throw an error that looks like it came from core. - NAPI_THROW_IF_FAILED(env, napi_invalid_arg, String()); - } - napi_value value; - napi_status status = - napi_create_string_utf8(env, val, std::strlen(val), &value); - NAPI_THROW_IF_FAILED(env, status, String()); - return String(env, value); -} - -inline String String::New(napi_env env, const char16_t* val) { - napi_value value; - // TODO(@gabrielschulhof) Remove if-statement when core's error handling is - // available in all supported versions. - if (val == nullptr) { - // Throw an error that looks like it came from core. - NAPI_THROW_IF_FAILED(env, napi_invalid_arg, String()); - } - napi_status status = - napi_create_string_utf16(env, val, std::u16string(val).size(), &value); - NAPI_THROW_IF_FAILED(env, status, String()); - return String(env, value); -} - -inline String String::New(napi_env env, const char* val, size_t length) { - napi_value value; - napi_status status = napi_create_string_utf8(env, val, length, &value); - NAPI_THROW_IF_FAILED(env, status, String()); - return String(env, value); -} - -inline String String::New(napi_env env, const char16_t* val, size_t length) { - napi_value value; - napi_status status = napi_create_string_utf16(env, val, length, &value); - NAPI_THROW_IF_FAILED(env, status, String()); - return String(env, value); -} - -inline void String::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "String::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "String::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_string, "String::CheckCast", "value is not napi_string"); -} - -inline String::String() : Name() {} - -inline String::String(napi_env env, napi_value value) : Name(env, value) {} - -inline String::operator std::string() const { - return Utf8Value(); -} - -inline String::operator std::u16string() const { - return Utf16Value(); -} - -inline std::string String::Utf8Value() const { - size_t length; - napi_status status = - napi_get_value_string_utf8(_env, _value, nullptr, 0, &length); - NAPI_THROW_IF_FAILED(_env, status, ""); - - std::string value; - value.reserve(length + 1); - value.resize(length); - status = napi_get_value_string_utf8( - _env, _value, &value[0], value.capacity(), nullptr); - NAPI_THROW_IF_FAILED(_env, status, ""); - return value; -} - -inline std::u16string String::Utf16Value() const { - size_t length; - napi_status status = - napi_get_value_string_utf16(_env, _value, nullptr, 0, &length); - NAPI_THROW_IF_FAILED(_env, status, NAPI_WIDE_TEXT("")); - - std::u16string value; - value.reserve(length + 1); - value.resize(length); - status = napi_get_value_string_utf16( - _env, _value, &value[0], value.capacity(), nullptr); - NAPI_THROW_IF_FAILED(_env, status, NAPI_WIDE_TEXT("")); - return value; -} - -//////////////////////////////////////////////////////////////////////////////// -// Symbol class -//////////////////////////////////////////////////////////////////////////////// - -inline Symbol Symbol::New(napi_env env, const char* description) { - napi_value descriptionValue = description != nullptr - ? String::New(env, description) - : static_cast(nullptr); - return Symbol::New(env, descriptionValue); -} - -inline Symbol Symbol::New(napi_env env, const std::string& description) { - napi_value descriptionValue = String::New(env, description); - return Symbol::New(env, descriptionValue); -} - -inline Symbol Symbol::New(napi_env env, String description) { - napi_value descriptionValue = description; - return Symbol::New(env, descriptionValue); -} - -inline Symbol Symbol::New(napi_env env, napi_value description) { - napi_value value; - napi_status status = napi_create_symbol(env, description, &value); - NAPI_THROW_IF_FAILED(env, status, Symbol()); - return Symbol(env, value); -} - -inline MaybeOrValue Symbol::WellKnown(napi_env env, - const std::string& name) { -#if defined(NODE_ADDON_API_ENABLE_MAYBE) - Value symbol_obj; - Value symbol_value; - if (Napi::Env(env).Global().Get("Symbol").UnwrapTo(&symbol_obj) && - symbol_obj.As().Get(name).UnwrapTo(&symbol_value)) { - return Just(symbol_value.As()); - } - return Nothing(); -#else - return Napi::Env(env) - .Global() - .Get("Symbol") - .As() - .Get(name) - .As(); -#endif -} - -inline MaybeOrValue Symbol::For(napi_env env, - const std::string& description) { - napi_value descriptionValue = String::New(env, description); - return Symbol::For(env, descriptionValue); -} - -inline MaybeOrValue Symbol::For(napi_env env, const char* description) { - napi_value descriptionValue = String::New(env, description); - return Symbol::For(env, descriptionValue); -} - -inline MaybeOrValue Symbol::For(napi_env env, String description) { - return Symbol::For(env, static_cast(description)); -} - -inline MaybeOrValue Symbol::For(napi_env env, napi_value description) { -#if defined(NODE_ADDON_API_ENABLE_MAYBE) - Value symbol_obj; - Value symbol_for_value; - Value symbol_value; - if (Napi::Env(env).Global().Get("Symbol").UnwrapTo(&symbol_obj) && - symbol_obj.As().Get("for").UnwrapTo(&symbol_for_value) && - symbol_for_value.As() - .Call(symbol_obj, {description}) - .UnwrapTo(&symbol_value)) { - return Just(symbol_value.As()); - } - return Nothing(); -#else - Object symbol_obj = Napi::Env(env).Global().Get("Symbol").As(); - return symbol_obj.Get("for") - .As() - .Call(symbol_obj, {description}) - .As(); -#endif -} - -inline void Symbol::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Symbol::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Symbol::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_symbol, "Symbol::CheckCast", "value is not napi_symbol"); -} - -inline Symbol::Symbol() : Name() {} - -inline Symbol::Symbol(napi_env env, napi_value value) : Name(env, value) {} - -//////////////////////////////////////////////////////////////////////////////// -// Automagic value creation -//////////////////////////////////////////////////////////////////////////////// - -namespace details { -template -struct vf_number { - static Number From(napi_env env, T value) { - return Number::New(env, static_cast(value)); - } -}; - -template <> -struct vf_number { - static Boolean From(napi_env env, bool value) { - return Boolean::New(env, value); - } -}; - -struct vf_utf8_charp { - static String From(napi_env env, const char* value) { - return String::New(env, value); - } -}; - -struct vf_utf16_charp { - static String From(napi_env env, const char16_t* value) { - return String::New(env, value); - } -}; -struct vf_utf8_string { - static String From(napi_env env, const std::string& value) { - return String::New(env, value); - } -}; - -struct vf_utf16_string { - static String From(napi_env env, const std::u16string& value) { - return String::New(env, value); - } -}; - -template -struct vf_fallback { - static Value From(napi_env env, const T& value) { return Value(env, value); } -}; - -template -struct disjunction : std::false_type {}; -template -struct disjunction : B {}; -template -struct disjunction - : std::conditional>::type {}; - -template -struct can_make_string - : disjunction::type, - typename std::is_convertible::type, - typename std::is_convertible::type, - typename std::is_convertible::type> {}; -} // namespace details - -template -Value Value::From(napi_env env, const T& value) { - using Helper = typename std::conditional< - std::is_integral::value || std::is_floating_point::value, - details::vf_number, - typename std::conditional::value, - String, - details::vf_fallback>::type>::type; - return Helper::From(env, value); -} - -template -String String::From(napi_env env, const T& value) { - struct Dummy {}; - using Helper = typename std::conditional< - std::is_convertible::value, - details::vf_utf8_charp, - typename std::conditional< - std::is_convertible::value, - details::vf_utf16_charp, - typename std::conditional< - std::is_convertible::value, - details::vf_utf8_string, - typename std::conditional< - std::is_convertible::value, - details::vf_utf16_string, - Dummy>::type>::type>::type>::type; - return Helper::From(env, value); -} - -//////////////////////////////////////////////////////////////////////////////// -// TypeTaggable class -//////////////////////////////////////////////////////////////////////////////// - -inline TypeTaggable::TypeTaggable() : Value() {} - -inline TypeTaggable::TypeTaggable(napi_env _env, napi_value _value) - : Value(_env, _value) {} - -#if NAPI_VERSION >= 8 - -inline void TypeTaggable::TypeTag(const napi_type_tag* type_tag) const { - napi_status status = napi_type_tag_object(_env, _value, type_tag); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline bool TypeTaggable::CheckTypeTag(const napi_type_tag* type_tag) const { - bool result; - napi_status status = - napi_check_object_type_tag(_env, _value, type_tag, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -#endif // NAPI_VERSION >= 8 - -//////////////////////////////////////////////////////////////////////////////// -// Object class -//////////////////////////////////////////////////////////////////////////////// - -template -inline Object::PropertyLValue::operator Value() const { - MaybeOrValue val = Object(_env, _object).Get(_key); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - return val.Unwrap(); -#else - return val; -#endif -} - -template -template -inline Object::PropertyLValue& Object::PropertyLValue::operator=( - ValueType value) { -#ifdef NODE_ADDON_API_ENABLE_MAYBE - MaybeOrValue result = -#endif - Object(_env, _object).Set(_key, value); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - result.Unwrap(); -#endif - return *this; -} - -template -inline Object::PropertyLValue::PropertyLValue(Object object, Key key) - : _env(object.Env()), _object(object), _key(key) {} - -inline Object Object::New(napi_env env) { - napi_value value; - napi_status status = napi_create_object(env, &value); - NAPI_THROW_IF_FAILED(env, status, Object()); - return Object(env, value); -} - -inline void Object::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Object::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Object::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_object, "Object::CheckCast", "value is not napi_object"); -} - -inline Object::Object() : TypeTaggable() {} - -inline Object::Object(napi_env env, napi_value value) - : TypeTaggable(env, value) {} - -inline Object::PropertyLValue Object::operator[]( - const char* utf8name) { - return PropertyLValue(*this, utf8name); -} - -inline Object::PropertyLValue Object::operator[]( - const std::string& utf8name) { - return PropertyLValue(*this, utf8name); -} - -inline Object::PropertyLValue Object::operator[](uint32_t index) { - return PropertyLValue(*this, index); -} - -inline Object::PropertyLValue Object::operator[](Value index) const { - return PropertyLValue(*this, index); -} - -inline MaybeOrValue Object::operator[](const char* utf8name) const { - return Get(utf8name); -} - -inline MaybeOrValue Object::operator[]( - const std::string& utf8name) const { - return Get(utf8name); -} - -inline MaybeOrValue Object::operator[](uint32_t index) const { - return Get(index); -} - -inline MaybeOrValue Object::Has(napi_value key) const { - bool result; - napi_status status = napi_has_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Has(Value key) const { - bool result; - napi_status status = napi_has_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Has(const char* utf8name) const { - bool result; - napi_status status = napi_has_named_property(_env, _value, utf8name, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Has(const std::string& utf8name) const { - return Has(utf8name.c_str()); -} - -inline MaybeOrValue Object::HasOwnProperty(napi_value key) const { - bool result; - napi_status status = napi_has_own_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::HasOwnProperty(Value key) const { - bool result; - napi_status status = napi_has_own_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::HasOwnProperty(const char* utf8name) const { - napi_value key; - napi_status status = - napi_create_string_utf8(_env, utf8name, std::strlen(utf8name), &key); - NAPI_MAYBE_THROW_IF_FAILED(_env, status, bool); - return HasOwnProperty(key); -} - -inline MaybeOrValue Object::HasOwnProperty( - const std::string& utf8name) const { - return HasOwnProperty(utf8name.c_str()); -} - -inline MaybeOrValue Object::Get(napi_value key) const { - napi_value result; - napi_status status = napi_get_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, Value(_env, result), Value); -} - -inline MaybeOrValue Object::Get(Value key) const { - napi_value result; - napi_status status = napi_get_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, Value(_env, result), Value); -} - -inline MaybeOrValue Object::Get(const char* utf8name) const { - napi_value result; - napi_status status = napi_get_named_property(_env, _value, utf8name, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, Value(_env, result), Value); -} - -inline MaybeOrValue Object::Get(const std::string& utf8name) const { - return Get(utf8name.c_str()); -} - -template -inline MaybeOrValue Object::Set(napi_value key, - const ValueType& value) const { - napi_status status = - napi_set_property(_env, _value, key, Value::From(_env, value)); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -template -inline MaybeOrValue Object::Set(Value key, const ValueType& value) const { - napi_status status = - napi_set_property(_env, _value, key, Value::From(_env, value)); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -template -inline MaybeOrValue Object::Set(const char* utf8name, - const ValueType& value) const { - napi_status status = - napi_set_named_property(_env, _value, utf8name, Value::From(_env, value)); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -template -inline MaybeOrValue Object::Set(const std::string& utf8name, - const ValueType& value) const { - return Set(utf8name.c_str(), value); -} - -inline MaybeOrValue Object::Delete(napi_value key) const { - bool result; - napi_status status = napi_delete_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Delete(Value key) const { - bool result; - napi_status status = napi_delete_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Delete(const char* utf8name) const { - return Delete(String::New(_env, utf8name)); -} - -inline MaybeOrValue Object::Delete(const std::string& utf8name) const { - return Delete(String::New(_env, utf8name)); -} - -inline MaybeOrValue Object::Has(uint32_t index) const { - bool result; - napi_status status = napi_has_element(_env, _value, index, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Get(uint32_t index) const { - napi_value value; - napi_status status = napi_get_element(_env, _value, index, &value); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, Value(_env, value), Value); -} - -template -inline MaybeOrValue Object::Set(uint32_t index, - const ValueType& value) const { - napi_status status = - napi_set_element(_env, _value, index, Value::From(_env, value)); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -inline MaybeOrValue Object::Delete(uint32_t index) const { - bool result; - napi_status status = napi_delete_element(_env, _value, index, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::GetPropertyNames() const { - napi_value result; - napi_status status = napi_get_property_names(_env, _value, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, Array(_env, result), Array); -} - -inline MaybeOrValue Object::DefineProperty( - const PropertyDescriptor& property) const { - napi_status status = napi_define_properties( - _env, - _value, - 1, - reinterpret_cast(&property)); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -inline MaybeOrValue Object::DefineProperties( - const std::initializer_list& properties) const { - napi_status status = napi_define_properties( - _env, - _value, - properties.size(), - reinterpret_cast(properties.begin())); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -inline MaybeOrValue Object::DefineProperties( - const std::vector& properties) const { - napi_status status = napi_define_properties( - _env, - _value, - properties.size(), - reinterpret_cast(properties.data())); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -inline MaybeOrValue Object::InstanceOf( - const Function& constructor) const { - bool result; - napi_status status = napi_instanceof(_env, _value, constructor, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -template -inline void Object::AddFinalizer(Finalizer finalizeCallback, T* data) const { - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), nullptr}); - napi_status status = - details::AttachData::Wrapper>( - _env, *this, data, finalizeData); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED_VOID(_env, status); - } -} - -template -inline void Object::AddFinalizer(Finalizer finalizeCallback, - T* data, - Hint* finalizeHint) const { - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), finalizeHint}); - napi_status status = details:: - AttachData::WrapperWithHint>( - _env, *this, data, finalizeData); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED_VOID(_env, status); - } -} - -#ifdef NAPI_CPP_EXCEPTIONS -inline Object::const_iterator::const_iterator(const Object* object, - const Type type) { - _object = object; - _keys = object->GetPropertyNames(); - _index = type == Type::BEGIN ? 0 : _keys.Length(); -} - -inline Object::const_iterator Napi::Object::begin() const { - const_iterator it(this, Object::const_iterator::Type::BEGIN); - return it; -} - -inline Object::const_iterator Napi::Object::end() const { - const_iterator it(this, Object::const_iterator::Type::END); - return it; -} - -inline Object::const_iterator& Object::const_iterator::operator++() { - ++_index; - return *this; -} - -inline bool Object::const_iterator::operator==( - const const_iterator& other) const { - return _index == other._index; -} - -inline bool Object::const_iterator::operator!=( - const const_iterator& other) const { - return _index != other._index; -} - -inline const std::pair> -Object::const_iterator::operator*() const { - const Value key = _keys[_index]; - const PropertyLValue value = (*_object)[key]; - return {key, value}; -} - -inline Object::iterator::iterator(Object* object, const Type type) { - _object = object; - _keys = object->GetPropertyNames(); - _index = type == Type::BEGIN ? 0 : _keys.Length(); -} - -inline Object::iterator Napi::Object::begin() { - iterator it(this, Object::iterator::Type::BEGIN); - return it; -} - -inline Object::iterator Napi::Object::end() { - iterator it(this, Object::iterator::Type::END); - return it; -} - -inline Object::iterator& Object::iterator::operator++() { - ++_index; - return *this; -} - -inline bool Object::iterator::operator==(const iterator& other) const { - return _index == other._index; -} - -inline bool Object::iterator::operator!=(const iterator& other) const { - return _index != other._index; -} - -inline std::pair> -Object::iterator::operator*() { - Value key = _keys[_index]; - PropertyLValue value = (*_object)[key]; - return {key, value}; -} -#endif // NAPI_CPP_EXCEPTIONS - -#if NAPI_VERSION >= 8 -inline MaybeOrValue Object::Freeze() const { - napi_status status = napi_object_freeze(_env, _value); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -inline MaybeOrValue Object::Seal() const { - napi_status status = napi_object_seal(_env, _value); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} -#endif // NAPI_VERSION >= 8 - -//////////////////////////////////////////////////////////////////////////////// -// External class -//////////////////////////////////////////////////////////////////////////////// - -template -inline External External::New(napi_env env, T* data) { - napi_value value; - napi_status status = - napi_create_external(env, data, nullptr, nullptr, &value); - NAPI_THROW_IF_FAILED(env, status, External()); - return External(env, value); -} - -template -template -inline External External::New(napi_env env, - T* data, - Finalizer finalizeCallback) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), nullptr}); - napi_status status = - napi_create_external(env, - data, - details::FinalizeData::Wrapper, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, External()); - } - return External(env, value); -} - -template -template -inline External External::New(napi_env env, - T* data, - Finalizer finalizeCallback, - Hint* finalizeHint) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), finalizeHint}); - napi_status status = napi_create_external( - env, - data, - details::FinalizeData::WrapperWithHint, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, External()); - } - return External(env, value); -} - -template -inline void External::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "External::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "External::CheckCast", "napi_typeof failed"); - NAPI_CHECK(type == napi_external, - "External::CheckCast", - "value is not napi_external"); -} - -template -inline External::External() : TypeTaggable() {} - -template -inline External::External(napi_env env, napi_value value) - : TypeTaggable(env, value) {} - -template -inline T* External::Data() const { - void* data; - napi_status status = napi_get_value_external(_env, _value, &data); - NAPI_THROW_IF_FAILED(_env, status, nullptr); - return reinterpret_cast(data); -} - -//////////////////////////////////////////////////////////////////////////////// -// Array class -//////////////////////////////////////////////////////////////////////////////// - -inline Array Array::New(napi_env env) { - napi_value value; - napi_status status = napi_create_array(env, &value); - NAPI_THROW_IF_FAILED(env, status, Array()); - return Array(env, value); -} - -inline Array Array::New(napi_env env, size_t length) { - napi_value value; - napi_status status = napi_create_array_with_length(env, length, &value); - NAPI_THROW_IF_FAILED(env, status, Array()); - return Array(env, value); -} - -inline void Array::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Array::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_array(env, value, &result); - NAPI_CHECK(status == napi_ok, "Array::CheckCast", "napi_is_array failed"); - NAPI_CHECK(result, "Array::CheckCast", "value is not array"); -} - -inline Array::Array() : Object() {} - -inline Array::Array(napi_env env, napi_value value) : Object(env, value) {} - -inline uint32_t Array::Length() const { - uint32_t result; - napi_status status = napi_get_array_length(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -//////////////////////////////////////////////////////////////////////////////// -// ArrayBuffer class -//////////////////////////////////////////////////////////////////////////////// - -inline ArrayBuffer ArrayBuffer::New(napi_env env, size_t byteLength) { - napi_value value; - void* data; - napi_status status = napi_create_arraybuffer(env, byteLength, &data, &value); - NAPI_THROW_IF_FAILED(env, status, ArrayBuffer()); - - return ArrayBuffer(env, value); -} - -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED -inline ArrayBuffer ArrayBuffer::New(napi_env env, - void* externalData, - size_t byteLength) { - napi_value value; - napi_status status = napi_create_external_arraybuffer( - env, externalData, byteLength, nullptr, nullptr, &value); - NAPI_THROW_IF_FAILED(env, status, ArrayBuffer()); - - return ArrayBuffer(env, value); -} - -template -inline ArrayBuffer ArrayBuffer::New(napi_env env, - void* externalData, - size_t byteLength, - Finalizer finalizeCallback) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), nullptr}); - napi_status status = napi_create_external_arraybuffer( - env, - externalData, - byteLength, - details::FinalizeData::Wrapper, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, ArrayBuffer()); - } - - return ArrayBuffer(env, value); -} - -template -inline ArrayBuffer ArrayBuffer::New(napi_env env, - void* externalData, - size_t byteLength, - Finalizer finalizeCallback, - Hint* finalizeHint) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), finalizeHint}); - napi_status status = napi_create_external_arraybuffer( - env, - externalData, - byteLength, - details::FinalizeData::WrapperWithHint, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, ArrayBuffer()); - } - - return ArrayBuffer(env, value); -} -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - -inline void ArrayBuffer::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "ArrayBuffer::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_arraybuffer(env, value, &result); - NAPI_CHECK(status == napi_ok, - "ArrayBuffer::CheckCast", - "napi_is_arraybuffer failed"); - NAPI_CHECK(result, "ArrayBuffer::CheckCast", "value is not arraybuffer"); -} - -inline ArrayBuffer::ArrayBuffer() : Object() {} - -inline ArrayBuffer::ArrayBuffer(napi_env env, napi_value value) - : Object(env, value) {} - -inline void* ArrayBuffer::Data() { - void* data; - napi_status status = napi_get_arraybuffer_info(_env, _value, &data, nullptr); - NAPI_THROW_IF_FAILED(_env, status, nullptr); - return data; -} - -inline size_t ArrayBuffer::ByteLength() { - size_t length; - napi_status status = - napi_get_arraybuffer_info(_env, _value, nullptr, &length); - NAPI_THROW_IF_FAILED(_env, status, 0); - return length; -} - -#if NAPI_VERSION >= 7 -inline bool ArrayBuffer::IsDetached() const { - bool detached; - napi_status status = napi_is_detached_arraybuffer(_env, _value, &detached); - NAPI_THROW_IF_FAILED(_env, status, false); - return detached; -} - -inline void ArrayBuffer::Detach() { - napi_status status = napi_detach_arraybuffer(_env, _value); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} -#endif // NAPI_VERSION >= 7 - -//////////////////////////////////////////////////////////////////////////////// -// DataView class -//////////////////////////////////////////////////////////////////////////////// -inline DataView DataView::New(napi_env env, Napi::ArrayBuffer arrayBuffer) { - return New(env, arrayBuffer, 0, arrayBuffer.ByteLength()); -} - -inline DataView DataView::New(napi_env env, - Napi::ArrayBuffer arrayBuffer, - size_t byteOffset) { - if (byteOffset > arrayBuffer.ByteLength()) { - NAPI_THROW(RangeError::New( - env, "Start offset is outside the bounds of the buffer"), - DataView()); - } - return New( - env, arrayBuffer, byteOffset, arrayBuffer.ByteLength() - byteOffset); -} - -inline DataView DataView::New(napi_env env, - Napi::ArrayBuffer arrayBuffer, - size_t byteOffset, - size_t byteLength) { - if (byteOffset + byteLength > arrayBuffer.ByteLength()) { - NAPI_THROW(RangeError::New(env, "Invalid DataView length"), DataView()); - } - napi_value value; - napi_status status = - napi_create_dataview(env, byteLength, arrayBuffer, byteOffset, &value); - NAPI_THROW_IF_FAILED(env, status, DataView()); - return DataView(env, value); -} - -inline void DataView::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "DataView::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_dataview(env, value, &result); - NAPI_CHECK( - status == napi_ok, "DataView::CheckCast", "napi_is_dataview failed"); - NAPI_CHECK(result, "DataView::CheckCast", "value is not dataview"); -} - -inline DataView::DataView() : Object() {} - -inline DataView::DataView(napi_env env, napi_value value) : Object(env, value) { - napi_status status = napi_get_dataview_info(_env, - _value /* dataView */, - &_length /* byteLength */, - &_data /* data */, - nullptr /* arrayBuffer */, - nullptr /* byteOffset */); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline Napi::ArrayBuffer DataView::ArrayBuffer() const { - napi_value arrayBuffer; - napi_status status = napi_get_dataview_info(_env, - _value /* dataView */, - nullptr /* byteLength */, - nullptr /* data */, - &arrayBuffer /* arrayBuffer */, - nullptr /* byteOffset */); - NAPI_THROW_IF_FAILED(_env, status, Napi::ArrayBuffer()); - return Napi::ArrayBuffer(_env, arrayBuffer); -} - -inline size_t DataView::ByteOffset() const { - size_t byteOffset; - napi_status status = napi_get_dataview_info(_env, - _value /* dataView */, - nullptr /* byteLength */, - nullptr /* data */, - nullptr /* arrayBuffer */, - &byteOffset /* byteOffset */); - NAPI_THROW_IF_FAILED(_env, status, 0); - return byteOffset; -} - -inline size_t DataView::ByteLength() const { - return _length; -} - -inline void* DataView::Data() const { - return _data; -} - -inline float DataView::GetFloat32(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline double DataView::GetFloat64(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline int8_t DataView::GetInt8(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline int16_t DataView::GetInt16(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline int32_t DataView::GetInt32(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline uint8_t DataView::GetUint8(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline uint16_t DataView::GetUint16(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline uint32_t DataView::GetUint32(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline void DataView::SetFloat32(size_t byteOffset, float value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetFloat64(size_t byteOffset, double value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetInt8(size_t byteOffset, int8_t value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetInt16(size_t byteOffset, int16_t value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetInt32(size_t byteOffset, int32_t value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetUint8(size_t byteOffset, uint8_t value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetUint16(size_t byteOffset, uint16_t value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetUint32(size_t byteOffset, uint32_t value) const { - WriteData(byteOffset, value); -} - -template -inline T DataView::ReadData(size_t byteOffset) const { - if (byteOffset + sizeof(T) > _length || - byteOffset + sizeof(T) < byteOffset) { // overflow - NAPI_THROW( - RangeError::New(_env, "Offset is outside the bounds of the DataView"), - 0); - } - - return *reinterpret_cast(static_cast(_data) + byteOffset); -} - -template -inline void DataView::WriteData(size_t byteOffset, T value) const { - if (byteOffset + sizeof(T) > _length || - byteOffset + sizeof(T) < byteOffset) { // overflow - NAPI_THROW_VOID( - RangeError::New(_env, "Offset is outside the bounds of the DataView")); - } - - *reinterpret_cast(static_cast(_data) + byteOffset) = value; -} - -//////////////////////////////////////////////////////////////////////////////// -// TypedArray class -//////////////////////////////////////////////////////////////////////////////// -inline void TypedArray::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "TypedArray::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_typedarray(env, value, &result); - NAPI_CHECK( - status == napi_ok, "TypedArray::CheckCast", "napi_is_typedarray failed"); - NAPI_CHECK(result, "TypedArray::CheckCast", "value is not typedarray"); -} - -inline TypedArray::TypedArray() - : Object(), _type(napi_typedarray_type::napi_int8_array), _length(0) {} - -inline TypedArray::TypedArray(napi_env env, napi_value value) - : Object(env, value), - _type(napi_typedarray_type::napi_int8_array), - _length(0) { - if (value != nullptr) { - napi_status status = - napi_get_typedarray_info(_env, - _value, - &const_cast(this)->_type, - &const_cast(this)->_length, - nullptr, - nullptr, - nullptr); - NAPI_THROW_IF_FAILED_VOID(_env, status); - } -} - -inline TypedArray::TypedArray(napi_env env, - napi_value value, - napi_typedarray_type type, - size_t length) - : Object(env, value), _type(type), _length(length) {} - -inline napi_typedarray_type TypedArray::TypedArrayType() const { - return _type; -} - -inline uint8_t TypedArray::ElementSize() const { - switch (_type) { - case napi_int8_array: - case napi_uint8_array: - case napi_uint8_clamped_array: - return 1; - case napi_int16_array: - case napi_uint16_array: - return 2; - case napi_int32_array: - case napi_uint32_array: - case napi_float32_array: - return 4; - case napi_float64_array: -#if (NAPI_VERSION > 5) - case napi_bigint64_array: - case napi_biguint64_array: -#endif // (NAPI_VERSION > 5) - return 8; - default: - return 0; - } -} - -inline size_t TypedArray::ElementLength() const { - return _length; -} - -inline size_t TypedArray::ByteOffset() const { - size_t byteOffset; - napi_status status = napi_get_typedarray_info( - _env, _value, nullptr, nullptr, nullptr, nullptr, &byteOffset); - NAPI_THROW_IF_FAILED(_env, status, 0); - return byteOffset; -} - -inline size_t TypedArray::ByteLength() const { - return ElementSize() * ElementLength(); -} - -inline Napi::ArrayBuffer TypedArray::ArrayBuffer() const { - napi_value arrayBuffer; - napi_status status = napi_get_typedarray_info( - _env, _value, nullptr, nullptr, nullptr, &arrayBuffer, nullptr); - NAPI_THROW_IF_FAILED(_env, status, Napi::ArrayBuffer()); - return Napi::ArrayBuffer(_env, arrayBuffer); -} - -//////////////////////////////////////////////////////////////////////////////// -// TypedArrayOf class -//////////////////////////////////////////////////////////////////////////////// -template -inline void TypedArrayOf::CheckCast(napi_env env, napi_value value) { - TypedArray::CheckCast(env, value); - napi_typedarray_type type; - napi_status status = napi_get_typedarray_info( - env, value, &type, nullptr, nullptr, nullptr, nullptr); - NAPI_CHECK(status == napi_ok, - "TypedArrayOf::CheckCast", - "napi_is_typedarray failed"); - - NAPI_CHECK( - (type == TypedArrayTypeForPrimitiveType() || - (type == napi_uint8_clamped_array && std::is_same::value)), - "TypedArrayOf::CheckCast", - "Array type must match the template parameter. (Uint8 arrays may " - "optionally have the \"clamped\" array type.)"); -} - -template -inline TypedArrayOf TypedArrayOf::New(napi_env env, - size_t elementLength, - napi_typedarray_type type) { - Napi::ArrayBuffer arrayBuffer = - Napi::ArrayBuffer::New(env, elementLength * sizeof(T)); - return New(env, elementLength, arrayBuffer, 0, type); -} - -template -inline TypedArrayOf TypedArrayOf::New(napi_env env, - size_t elementLength, - Napi::ArrayBuffer arrayBuffer, - size_t bufferOffset, - napi_typedarray_type type) { - napi_value value; - napi_status status = napi_create_typedarray( - env, type, elementLength, arrayBuffer, bufferOffset, &value); - NAPI_THROW_IF_FAILED(env, status, TypedArrayOf()); - - return TypedArrayOf( - env, - value, - type, - elementLength, - reinterpret_cast(reinterpret_cast(arrayBuffer.Data()) + - bufferOffset)); -} - -template -inline TypedArrayOf::TypedArrayOf() : TypedArray(), _data(nullptr) {} - -template -inline TypedArrayOf::TypedArrayOf(napi_env env, napi_value value) - : TypedArray(env, value), _data(nullptr) { - napi_status status = napi_ok; - if (value != nullptr) { - void* data = nullptr; - status = napi_get_typedarray_info( - _env, _value, &_type, &_length, &data, nullptr, nullptr); - _data = static_cast(data); - } else { - _type = TypedArrayTypeForPrimitiveType(); - _length = 0; - } - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -template -inline TypedArrayOf::TypedArrayOf(napi_env env, - napi_value value, - napi_typedarray_type type, - size_t length, - T* data) - : TypedArray(env, value, type, length), _data(data) { - if (!(type == TypedArrayTypeForPrimitiveType() || - (type == napi_uint8_clamped_array && - std::is_same::value))) { - NAPI_THROW_VOID(TypeError::New( - env, - "Array type must match the template parameter. " - "(Uint8 arrays may optionally have the \"clamped\" array type.)")); - } -} - -template -inline T& TypedArrayOf::operator[](size_t index) { - return _data[index]; -} - -template -inline const T& TypedArrayOf::operator[](size_t index) const { - return _data[index]; -} - -template -inline T* TypedArrayOf::Data() { - return _data; -} - -template -inline const T* TypedArrayOf::Data() const { - return _data; -} - -//////////////////////////////////////////////////////////////////////////////// -// Function class -//////////////////////////////////////////////////////////////////////////////// - -template -inline napi_status CreateFunction(napi_env env, - const char* utf8name, - napi_callback cb, - CbData* data, - napi_value* result) { - napi_status status = - napi_create_function(env, utf8name, NAPI_AUTO_LENGTH, cb, data, result); - if (status == napi_ok) { - status = Napi::details::AttachData(env, *result, data); - } - - return status; -} - -template -inline Function Function::New(napi_env env, const char* utf8name, void* data) { - napi_value result = nullptr; - napi_status status = napi_create_function(env, - utf8name, - NAPI_AUTO_LENGTH, - details::TemplatedVoidCallback, - data, - &result); - NAPI_THROW_IF_FAILED(env, status, Function()); - return Function(env, result); -} - -template -inline Function Function::New(napi_env env, const char* utf8name, void* data) { - napi_value result = nullptr; - napi_status status = napi_create_function(env, - utf8name, - NAPI_AUTO_LENGTH, - details::TemplatedCallback, - data, - &result); - NAPI_THROW_IF_FAILED(env, status, Function()); - return Function(env, result); -} - -template -inline Function Function::New(napi_env env, - const std::string& utf8name, - void* data) { - return Function::New(env, utf8name.c_str(), data); -} - -template -inline Function Function::New(napi_env env, - const std::string& utf8name, - void* data) { - return Function::New(env, utf8name.c_str(), data); -} - -template -inline Function Function::New(napi_env env, - Callable cb, - const char* utf8name, - void* data) { - using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr))); - using CbData = details::CallbackData; - auto callbackData = new CbData{std::move(cb), data}; - - napi_value value; - napi_status status = - CreateFunction(env, utf8name, CbData::Wrapper, callbackData, &value); - if (status != napi_ok) { - delete callbackData; - NAPI_THROW_IF_FAILED(env, status, Function()); - } - - return Function(env, value); -} - -template -inline Function Function::New(napi_env env, - Callable cb, - const std::string& utf8name, - void* data) { - return New(env, cb, utf8name.c_str(), data); -} - -inline void Function::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Function::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Function::CheckCast", "napi_typeof failed"); - NAPI_CHECK(type == napi_function, - "Function::CheckCast", - "value is not napi_function"); -} - -inline Function::Function() : Object() {} - -inline Function::Function(napi_env env, napi_value value) - : Object(env, value) {} - -inline MaybeOrValue Function::operator()( - const std::initializer_list& args) const { - return Call(Env().Undefined(), args); -} - -inline MaybeOrValue Function::Call( - const std::initializer_list& args) const { - return Call(Env().Undefined(), args); -} - -inline MaybeOrValue Function::Call( - const std::vector& args) const { - return Call(Env().Undefined(), args); -} - -inline MaybeOrValue Function::Call( - const std::vector& args) const { - return Call(Env().Undefined(), args); -} - -inline MaybeOrValue Function::Call(size_t argc, - const napi_value* args) const { - return Call(Env().Undefined(), argc, args); -} - -inline MaybeOrValue Function::Call( - napi_value recv, const std::initializer_list& args) const { - return Call(recv, args.size(), args.begin()); -} - -inline MaybeOrValue Function::Call( - napi_value recv, const std::vector& args) const { - return Call(recv, args.size(), args.data()); -} - -inline MaybeOrValue Function::Call( - napi_value recv, const std::vector& args) const { - const size_t argc = args.size(); - const size_t stackArgsCount = 6; - napi_value stackArgs[stackArgsCount]; - std::vector heapArgs; - napi_value* argv; - if (argc <= stackArgsCount) { - argv = stackArgs; - } else { - heapArgs.resize(argc); - argv = heapArgs.data(); - } - - for (size_t index = 0; index < argc; index++) { - argv[index] = static_cast(args[index]); - } - - return Call(recv, argc, argv); -} - -inline MaybeOrValue Function::Call(napi_value recv, - size_t argc, - const napi_value* args) const { - napi_value result; - napi_status status = - napi_call_function(_env, recv, _value, argc, args, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Value(_env, result), Napi::Value); -} - -inline MaybeOrValue Function::MakeCallback( - napi_value recv, - const std::initializer_list& args, - napi_async_context context) const { - return MakeCallback(recv, args.size(), args.begin(), context); -} - -inline MaybeOrValue Function::MakeCallback( - napi_value recv, - const std::vector& args, - napi_async_context context) const { - return MakeCallback(recv, args.size(), args.data(), context); -} - -inline MaybeOrValue Function::MakeCallback( - napi_value recv, - size_t argc, - const napi_value* args, - napi_async_context context) const { - napi_value result; - napi_status status = - napi_make_callback(_env, context, recv, _value, argc, args, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Value(_env, result), Napi::Value); -} - -inline MaybeOrValue Function::New( - const std::initializer_list& args) const { - return New(args.size(), args.begin()); -} - -inline MaybeOrValue Function::New( - const std::vector& args) const { - return New(args.size(), args.data()); -} - -inline MaybeOrValue Function::New(size_t argc, - const napi_value* args) const { - napi_value result; - napi_status status = napi_new_instance(_env, _value, argc, args, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Object(_env, result), Napi::Object); -} - -//////////////////////////////////////////////////////////////////////////////// -// Promise class -//////////////////////////////////////////////////////////////////////////////// - -inline Promise::Deferred Promise::Deferred::New(napi_env env) { - return Promise::Deferred(env); -} - -inline Promise::Deferred::Deferred(napi_env env) : _env(env) { - napi_status status = napi_create_promise(_env, &_deferred, &_promise); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline Promise Promise::Deferred::Promise() const { - return Napi::Promise(_env, _promise); -} - -inline Napi::Env Promise::Deferred::Env() const { - return Napi::Env(_env); -} - -inline void Promise::Deferred::Resolve(napi_value value) const { - napi_status status = napi_resolve_deferred(_env, _deferred, value); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline void Promise::Deferred::Reject(napi_value value) const { - napi_status status = napi_reject_deferred(_env, _deferred, value); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline void Promise::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Promise::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_promise(env, value, &result); - NAPI_CHECK(status == napi_ok, "Promise::CheckCast", "napi_is_promise failed"); - NAPI_CHECK(result, "Promise::CheckCast", "value is not promise"); -} - -inline Promise::Promise(napi_env env, napi_value value) : Object(env, value) {} - -//////////////////////////////////////////////////////////////////////////////// -// Buffer class -//////////////////////////////////////////////////////////////////////////////// - -template -inline Buffer Buffer::New(napi_env env, size_t length) { - napi_value value; - void* data; - napi_status status = - napi_create_buffer(env, length * sizeof(T), &data, &value); - NAPI_THROW_IF_FAILED(env, status, Buffer()); - return Buffer(env, value); -} - -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED -template -inline Buffer Buffer::New(napi_env env, T* data, size_t length) { - napi_value value; - napi_status status = napi_create_external_buffer( - env, length * sizeof(T), data, nullptr, nullptr, &value); - NAPI_THROW_IF_FAILED(env, status, Buffer()); - return Buffer(env, value); -} - -template -template -inline Buffer Buffer::New(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), nullptr}); - napi_status status = - napi_create_external_buffer(env, - length * sizeof(T), - data, - details::FinalizeData::Wrapper, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, Buffer()); - } - return Buffer(env, value); -} - -template -template -inline Buffer Buffer::New(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback, - Hint* finalizeHint) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), finalizeHint}); - napi_status status = napi_create_external_buffer( - env, - length * sizeof(T), - data, - details::FinalizeData::WrapperWithHint, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, Buffer()); - } - return Buffer(env, value); -} -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - -template -inline Buffer Buffer::NewOrCopy(napi_env env, T* data, size_t length) { -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - napi_value value; - napi_status status = napi_create_external_buffer( - env, length * sizeof(T), data, nullptr, nullptr, &value); - if (status == details::napi_no_external_buffers_allowed) { -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - // If we can't create an external buffer, we'll just copy the data. - return Buffer::Copy(env, data, length); -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - } - NAPI_THROW_IF_FAILED(env, status, Buffer()); - return Buffer(env, value); -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED -} - -template -template -inline Buffer Buffer::NewOrCopy(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback) { - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), nullptr}); -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - napi_value value; - napi_status status = - napi_create_external_buffer(env, - length * sizeof(T), - data, - details::FinalizeData::Wrapper, - finalizeData, - &value); - if (status == details::napi_no_external_buffers_allowed) { -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - // If we can't create an external buffer, we'll just copy the data. - Buffer ret = Buffer::Copy(env, data, length); - details::FinalizeData::Wrapper(env, data, finalizeData); - return ret; -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - } - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, Buffer()); - } - return Buffer(env, value); -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED -} - -template -template -inline Buffer Buffer::NewOrCopy(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback, - Hint* finalizeHint) { - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), finalizeHint}); -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - napi_value value; - napi_status status = napi_create_external_buffer( - env, - length * sizeof(T), - data, - details::FinalizeData::WrapperWithHint, - finalizeData, - &value); - if (status == details::napi_no_external_buffers_allowed) { -#endif - // If we can't create an external buffer, we'll just copy the data. - Buffer ret = Buffer::Copy(env, data, length); - details::FinalizeData::WrapperWithHint( - env, data, finalizeData); - return ret; -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - } - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, Buffer()); - } - return Buffer(env, value); -#endif -} - -template -inline Buffer Buffer::Copy(napi_env env, const T* data, size_t length) { - napi_value value; - napi_status status = - napi_create_buffer_copy(env, length * sizeof(T), data, nullptr, &value); - NAPI_THROW_IF_FAILED(env, status, Buffer()); - return Buffer(env, value); -} - -template -inline void Buffer::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Buffer::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_buffer(env, value, &result); - NAPI_CHECK(status == napi_ok, "Buffer::CheckCast", "napi_is_buffer failed"); - NAPI_CHECK(result, "Buffer::CheckCast", "value is not buffer"); -} - -template -inline Buffer::Buffer() : Uint8Array() {} - -template -inline Buffer::Buffer(napi_env env, napi_value value) - : Uint8Array(env, value) {} - -template -inline size_t Buffer::Length() const { - return ByteLength() / sizeof(T); -} - -template -inline T* Buffer::Data() const { - return reinterpret_cast(const_cast(Uint8Array::Data())); -} - -//////////////////////////////////////////////////////////////////////////////// -// Error class -//////////////////////////////////////////////////////////////////////////////// - -inline Error Error::New(napi_env env) { - napi_status status; - napi_value error = nullptr; - bool is_exception_pending; - napi_extended_error_info last_error_info_copy; - - { - // We must retrieve the last error info before doing anything else because - // doing anything else will replace the last error info. - const napi_extended_error_info* last_error_info; - status = napi_get_last_error_info(env, &last_error_info); - NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_get_last_error_info"); - - // All fields of the `napi_extended_error_info` structure gets reset in - // subsequent Node-API function calls on the same `env`. This includes a - // call to `napi_is_exception_pending()`. So here it is necessary to make a - // copy of the information as the `error_code` field is used later on. - memcpy(&last_error_info_copy, - last_error_info, - sizeof(napi_extended_error_info)); - } - - status = napi_is_exception_pending(env, &is_exception_pending); - NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_is_exception_pending"); - - // A pending exception takes precedence over any internal error status. - if (is_exception_pending) { - status = napi_get_and_clear_last_exception(env, &error); - NAPI_FATAL_IF_FAILED( - status, "Error::New", "napi_get_and_clear_last_exception"); - } else { - const char* error_message = last_error_info_copy.error_message != nullptr - ? last_error_info_copy.error_message - : "Error in native callback"; - - napi_value message; - status = napi_create_string_utf8( - env, error_message, std::strlen(error_message), &message); - NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_create_string_utf8"); - - switch (last_error_info_copy.error_code) { - case napi_object_expected: - case napi_string_expected: - case napi_boolean_expected: - case napi_number_expected: - status = napi_create_type_error(env, nullptr, message, &error); - break; - default: - status = napi_create_error(env, nullptr, message, &error); - break; - } - NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_create_error"); - } - - return Error(env, error); -} - -inline Error Error::New(napi_env env, const char* message) { - return Error::New( - env, message, std::strlen(message), napi_create_error); -} - -inline Error Error::New(napi_env env, const std::string& message) { - return Error::New( - env, message.c_str(), message.size(), napi_create_error); -} - -inline NAPI_NO_RETURN void Error::Fatal(const char* location, - const char* message) { - napi_fatal_error(location, NAPI_AUTO_LENGTH, message, NAPI_AUTO_LENGTH); -} - -inline Error::Error() : ObjectReference() {} - -inline Error::Error(napi_env env, napi_value value) - : ObjectReference(env, nullptr) { - if (value != nullptr) { - // Attempting to create a reference on the error object. - // If it's not a Object/Function/Symbol, this call will return an error - // status. - napi_status status = napi_create_reference(env, value, 1, &_ref); - - if (status != napi_ok) { - napi_value wrappedErrorObj; - - // Create an error object - status = napi_create_object(env, &wrappedErrorObj); - NAPI_FATAL_IF_FAILED(status, "Error::Error", "napi_create_object"); - - // property flag that we attach to show the error object is wrapped - napi_property_descriptor wrapObjFlag = { - ERROR_WRAP_VALUE(), // Unique GUID identifier since Symbol isn't a - // viable option - nullptr, - nullptr, - nullptr, - nullptr, - Value::From(env, value), - napi_enumerable, - nullptr}; - - status = napi_define_properties(env, wrappedErrorObj, 1, &wrapObjFlag); -#ifdef NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS - if (status == napi_pending_exception) { - // Test if the pending exception was reported because the environment is - // shutting down. We assume that a status of napi_pending_exception - // coupled with the absence of an actual pending exception means that - // the environment is shutting down. If so, we replace the - // napi_pending_exception status with napi_ok. - bool is_exception_pending = false; - status = napi_is_exception_pending(env, &is_exception_pending); - if (status == napi_ok && !is_exception_pending) { - status = napi_ok; - } else { - status = napi_pending_exception; - } - } -#endif // NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS - NAPI_FATAL_IF_FAILED(status, "Error::Error", "napi_define_properties"); - - // Create a reference on the newly wrapped object - status = napi_create_reference(env, wrappedErrorObj, 1, &_ref); - } - - // Avoid infinite recursion in the failure case. - NAPI_FATAL_IF_FAILED(status, "Error::Error", "napi_create_reference"); - } -} - -inline Object Error::Value() const { - if (_ref == nullptr) { - return Object(_env, nullptr); - } - - napi_value refValue; - napi_status status = napi_get_reference_value(_env, _ref, &refValue); - NAPI_THROW_IF_FAILED(_env, status, Object()); - - napi_valuetype type; - status = napi_typeof(_env, refValue, &type); - NAPI_THROW_IF_FAILED(_env, status, Object()); - - // If refValue isn't a symbol, then we proceed to whether the refValue has the - // wrapped error flag - if (type != napi_symbol) { - // We are checking if the object is wrapped - bool isWrappedObject = false; - - status = napi_has_property(_env, - refValue, - String::From(_env, ERROR_WRAP_VALUE()), - &isWrappedObject); - - // Don't care about status - if (isWrappedObject) { - napi_value unwrappedValue; - status = napi_get_property(_env, - refValue, - String::From(_env, ERROR_WRAP_VALUE()), - &unwrappedValue); - NAPI_THROW_IF_FAILED(_env, status, Object()); - - return Object(_env, unwrappedValue); - } - } - - return Object(_env, refValue); -} - -inline Error::Error(Error&& other) : ObjectReference(std::move(other)) {} - -inline Error& Error::operator=(Error&& other) { - static_cast*>(this)->operator=(std::move(other)); - return *this; -} - -inline Error::Error(const Error& other) : ObjectReference(other) {} - -inline Error& Error::operator=(const Error& other) { - Reset(); - - _env = other.Env(); - HandleScope scope(_env); - - napi_value value = other.Value(); - if (value != nullptr) { - napi_status status = napi_create_reference(_env, value, 1, &_ref); - NAPI_THROW_IF_FAILED(_env, status, *this); - } - - return *this; -} - -inline const std::string& Error::Message() const NAPI_NOEXCEPT { - if (_message.size() == 0 && _env != nullptr) { -#ifdef NAPI_CPP_EXCEPTIONS - try { - _message = Get("message").As(); - } catch (...) { - // Catch all errors here, to include e.g. a std::bad_alloc from - // the std::string::operator=, because this method may not throw. - } -#else // NAPI_CPP_EXCEPTIONS -#if defined(NODE_ADDON_API_ENABLE_MAYBE) - Napi::Value message_val; - if (Get("message").UnwrapTo(&message_val)) { - _message = message_val.As(); - } -#else - _message = Get("message").As(); -#endif -#endif // NAPI_CPP_EXCEPTIONS - } - return _message; -} - -// we created an object on the &_ref -inline void Error::ThrowAsJavaScriptException() const { - HandleScope scope(_env); - if (!IsEmpty()) { -#ifdef NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS - bool pendingException = false; - - // check if there is already a pending exception. If so don't try to throw a - // new one as that is not allowed/possible - napi_status status = napi_is_exception_pending(_env, &pendingException); - - if ((status != napi_ok) || - ((status == napi_ok) && (pendingException == false))) { - // We intentionally don't use `NAPI_THROW_*` macros here to ensure - // that there is no possible recursion as `ThrowAsJavaScriptException` - // is part of `NAPI_THROW_*` macro definition for noexcept. - - status = napi_throw(_env, Value()); - - if (status == napi_pending_exception) { - // The environment must be terminating as we checked earlier and there - // was no pending exception. In this case continuing will result - // in a fatal error and there is nothing the author has done incorrectly - // in their code that is worth flagging through a fatal error - return; - } - } else { - status = napi_pending_exception; - } -#else - // We intentionally don't use `NAPI_THROW_*` macros here to ensure - // that there is no possible recursion as `ThrowAsJavaScriptException` - // is part of `NAPI_THROW_*` macro definition for noexcept. - - napi_status status = napi_throw(_env, Value()); -#endif - -#ifdef NAPI_CPP_EXCEPTIONS - if (status != napi_ok) { - throw Error::New(_env); - } -#else // NAPI_CPP_EXCEPTIONS - NAPI_FATAL_IF_FAILED( - status, "Error::ThrowAsJavaScriptException", "napi_throw"); -#endif // NAPI_CPP_EXCEPTIONS - } -} - -#ifdef NAPI_CPP_EXCEPTIONS - -inline const char* Error::what() const NAPI_NOEXCEPT { - return Message().c_str(); -} - -#endif // NAPI_CPP_EXCEPTIONS - -inline const char* Error::ERROR_WRAP_VALUE() NAPI_NOEXCEPT { - return "4bda9e7e-4913-4dbc-95de-891cbf66598e-errorVal"; -} - -template -inline TError Error::New(napi_env env, - const char* message, - size_t length, - create_error_fn create_error) { - napi_value str; - napi_status status = napi_create_string_utf8(env, message, length, &str); - NAPI_THROW_IF_FAILED(env, status, TError()); - - napi_value error; - status = create_error(env, nullptr, str, &error); - NAPI_THROW_IF_FAILED(env, status, TError()); - - return TError(env, error); -} - -inline TypeError TypeError::New(napi_env env, const char* message) { - return Error::New( - env, message, std::strlen(message), napi_create_type_error); -} - -inline TypeError TypeError::New(napi_env env, const std::string& message) { - return Error::New( - env, message.c_str(), message.size(), napi_create_type_error); -} - -inline TypeError::TypeError() : Error() {} - -inline TypeError::TypeError(napi_env env, napi_value value) - : Error(env, value) {} - -inline RangeError RangeError::New(napi_env env, const char* message) { - return Error::New( - env, message, std::strlen(message), napi_create_range_error); -} - -inline RangeError RangeError::New(napi_env env, const std::string& message) { - return Error::New( - env, message.c_str(), message.size(), napi_create_range_error); -} - -inline RangeError::RangeError() : Error() {} - -inline RangeError::RangeError(napi_env env, napi_value value) - : Error(env, value) {} - -#if NAPI_VERSION > 8 -inline SyntaxError SyntaxError::New(napi_env env, const char* message) { - return Error::New( - env, message, std::strlen(message), node_api_create_syntax_error); -} - -inline SyntaxError SyntaxError::New(napi_env env, const std::string& message) { - return Error::New( - env, message.c_str(), message.size(), node_api_create_syntax_error); -} - -inline SyntaxError::SyntaxError() : Error() {} - -inline SyntaxError::SyntaxError(napi_env env, napi_value value) - : Error(env, value) {} -#endif // NAPI_VERSION > 8 - -//////////////////////////////////////////////////////////////////////////////// -// Reference class -//////////////////////////////////////////////////////////////////////////////// - -template -inline Reference Reference::New(const T& value, - uint32_t initialRefcount) { - napi_env env = value.Env(); - napi_value val = value; - - if (val == nullptr) { - return Reference(env, nullptr); - } - - napi_ref ref; - napi_status status = napi_create_reference(env, value, initialRefcount, &ref); - NAPI_THROW_IF_FAILED(env, status, Reference()); - - return Reference(env, ref); -} - -template -inline Reference::Reference() - : _env(nullptr), _ref(nullptr), _suppressDestruct(false) {} - -template -inline Reference::Reference(napi_env env, napi_ref ref) - : _env(env), _ref(ref), _suppressDestruct(false) {} - -template -inline Reference::~Reference() { - if (_ref != nullptr) { - if (!_suppressDestruct) { - napi_delete_reference(_env, _ref); - } - - _ref = nullptr; - } -} - -template -inline Reference::Reference(Reference&& other) - : _env(other._env), - _ref(other._ref), - _suppressDestruct(other._suppressDestruct) { - other._env = nullptr; - other._ref = nullptr; - other._suppressDestruct = false; -} - -template -inline Reference& Reference::operator=(Reference&& other) { - Reset(); - _env = other._env; - _ref = other._ref; - _suppressDestruct = other._suppressDestruct; - other._env = nullptr; - other._ref = nullptr; - other._suppressDestruct = false; - return *this; -} - -template -inline Reference::Reference(const Reference& other) - : _env(other._env), _ref(nullptr), _suppressDestruct(false) { - HandleScope scope(_env); - - napi_value value = other.Value(); - if (value != nullptr) { - // Copying is a limited scenario (currently only used for Error object) and - // always creates a strong reference to the given value even if the incoming - // reference is weak. - napi_status status = napi_create_reference(_env, value, 1, &_ref); - NAPI_FATAL_IF_FAILED( - status, "Reference::Reference", "napi_create_reference"); - } -} - -template -inline Reference::operator napi_ref() const { - return _ref; -} - -template -inline bool Reference::operator==(const Reference& other) const { - HandleScope scope(_env); - return this->Value().StrictEquals(other.Value()); -} - -template -inline bool Reference::operator!=(const Reference& other) const { - return !this->operator==(other); -} - -template -inline Napi::Env Reference::Env() const { - return Napi::Env(_env); -} - -template -inline bool Reference::IsEmpty() const { - return _ref == nullptr; -} - -template -inline T Reference::Value() const { - if (_ref == nullptr) { - return T(_env, nullptr); - } - - napi_value value; - napi_status status = napi_get_reference_value(_env, _ref, &value); - NAPI_THROW_IF_FAILED(_env, status, T()); - return T(_env, value); -} - -template -inline uint32_t Reference::Ref() const { - uint32_t result; - napi_status status = napi_reference_ref(_env, _ref, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -template -inline uint32_t Reference::Unref() const { - uint32_t result; - napi_status status = napi_reference_unref(_env, _ref, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -template -inline void Reference::Reset() { - if (_ref != nullptr) { - napi_status status = napi_delete_reference(_env, _ref); - NAPI_THROW_IF_FAILED_VOID(_env, status); - _ref = nullptr; - } -} - -template -inline void Reference::Reset(const T& value, uint32_t refcount) { - Reset(); - _env = value.Env(); - - napi_value val = value; - if (val != nullptr) { - napi_status status = napi_create_reference(_env, value, refcount, &_ref); - NAPI_THROW_IF_FAILED_VOID(_env, status); - } -} - -template -inline void Reference::SuppressDestruct() { - _suppressDestruct = true; -} - -template -inline Reference Weak(T value) { - return Reference::New(value, 0); -} - -inline ObjectReference Weak(Object value) { - return Reference::New(value, 0); -} - -inline FunctionReference Weak(Function value) { - return Reference::New(value, 0); -} - -template -inline Reference Persistent(T value) { - return Reference::New(value, 1); -} - -inline ObjectReference Persistent(Object value) { - return Reference::New(value, 1); -} - -inline FunctionReference Persistent(Function value) { - return Reference::New(value, 1); -} - -//////////////////////////////////////////////////////////////////////////////// -// ObjectReference class -//////////////////////////////////////////////////////////////////////////////// - -inline ObjectReference::ObjectReference() : Reference() {} - -inline ObjectReference::ObjectReference(napi_env env, napi_ref ref) - : Reference(env, ref) {} - -inline ObjectReference::ObjectReference(Reference&& other) - : Reference(std::move(other)) {} - -inline ObjectReference& ObjectReference::operator=(Reference&& other) { - static_cast*>(this)->operator=(std::move(other)); - return *this; -} - -inline ObjectReference::ObjectReference(ObjectReference&& other) - : Reference(std::move(other)) {} - -inline ObjectReference& ObjectReference::operator=(ObjectReference&& other) { - static_cast*>(this)->operator=(std::move(other)); - return *this; -} - -inline ObjectReference::ObjectReference(const ObjectReference& other) - : Reference(other) {} - -inline MaybeOrValue ObjectReference::Get( - const char* utf8name) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Get(utf8name); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue ObjectReference::Get( - const std::string& utf8name) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Get(utf8name); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue ObjectReference::Set(const char* utf8name, - napi_value value) const { - HandleScope scope(_env); - return Value().Set(utf8name, value); -} - -inline MaybeOrValue ObjectReference::Set(const char* utf8name, - Napi::Value value) const { - HandleScope scope(_env); - return Value().Set(utf8name, value); -} - -inline MaybeOrValue ObjectReference::Set(const char* utf8name, - const char* utf8value) const { - HandleScope scope(_env); - return Value().Set(utf8name, utf8value); -} - -inline MaybeOrValue ObjectReference::Set(const char* utf8name, - bool boolValue) const { - HandleScope scope(_env); - return Value().Set(utf8name, boolValue); -} - -inline MaybeOrValue ObjectReference::Set(const char* utf8name, - double numberValue) const { - HandleScope scope(_env); - return Value().Set(utf8name, numberValue); -} - -inline MaybeOrValue ObjectReference::Set(const std::string& utf8name, - napi_value value) const { - HandleScope scope(_env); - return Value().Set(utf8name, value); -} - -inline MaybeOrValue ObjectReference::Set(const std::string& utf8name, - Napi::Value value) const { - HandleScope scope(_env); - return Value().Set(utf8name, value); -} - -inline MaybeOrValue ObjectReference::Set(const std::string& utf8name, - std::string& utf8value) const { - HandleScope scope(_env); - return Value().Set(utf8name, utf8value); -} - -inline MaybeOrValue ObjectReference::Set(const std::string& utf8name, - bool boolValue) const { - HandleScope scope(_env); - return Value().Set(utf8name, boolValue); -} - -inline MaybeOrValue ObjectReference::Set(const std::string& utf8name, - double numberValue) const { - HandleScope scope(_env); - return Value().Set(utf8name, numberValue); -} - -inline MaybeOrValue ObjectReference::Get(uint32_t index) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Get(index); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue ObjectReference::Set(uint32_t index, - napi_value value) const { - HandleScope scope(_env); - return Value().Set(index, value); -} - -inline MaybeOrValue ObjectReference::Set(uint32_t index, - Napi::Value value) const { - HandleScope scope(_env); - return Value().Set(index, value); -} - -inline MaybeOrValue ObjectReference::Set(uint32_t index, - const char* utf8value) const { - HandleScope scope(_env); - return Value().Set(index, utf8value); -} - -inline MaybeOrValue ObjectReference::Set( - uint32_t index, const std::string& utf8value) const { - HandleScope scope(_env); - return Value().Set(index, utf8value); -} - -inline MaybeOrValue ObjectReference::Set(uint32_t index, - bool boolValue) const { - HandleScope scope(_env); - return Value().Set(index, boolValue); -} - -inline MaybeOrValue ObjectReference::Set(uint32_t index, - double numberValue) const { - HandleScope scope(_env); - return Value().Set(index, numberValue); -} - -//////////////////////////////////////////////////////////////////////////////// -// FunctionReference class -//////////////////////////////////////////////////////////////////////////////// - -inline FunctionReference::FunctionReference() : Reference() {} - -inline FunctionReference::FunctionReference(napi_env env, napi_ref ref) - : Reference(env, ref) {} - -inline FunctionReference::FunctionReference(Reference&& other) - : Reference(std::move(other)) {} - -inline FunctionReference& FunctionReference::operator=( - Reference&& other) { - static_cast*>(this)->operator=(std::move(other)); - return *this; -} - -inline FunctionReference::FunctionReference(FunctionReference&& other) - : Reference(std::move(other)) {} - -inline FunctionReference& FunctionReference::operator=( - FunctionReference&& other) { - static_cast*>(this)->operator=(std::move(other)); - return *this; -} - -inline MaybeOrValue FunctionReference::operator()( - const std::initializer_list& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value()(args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::Call( - const std::initializer_list& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Call(args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::Call( - const std::vector& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Call(args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::Call( - napi_value recv, const std::initializer_list& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Call(recv, args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::Call( - napi_value recv, const std::vector& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Call(recv, args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::Call( - napi_value recv, size_t argc, const napi_value* args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Call(recv, argc, args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::MakeCallback( - napi_value recv, - const std::initializer_list& args, - napi_async_context context) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().MakeCallback(recv, args, context); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::MakeCallback( - napi_value recv, - const std::vector& args, - napi_async_context context) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().MakeCallback(recv, args, context); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::MakeCallback( - napi_value recv, - size_t argc, - const napi_value* args, - napi_async_context context) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = - Value().MakeCallback(recv, argc, args, context); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::New( - const std::initializer_list& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().New(args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap()).As()); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Object(); - } - return scope.Escape(result).As(); -#endif -} - -inline MaybeOrValue FunctionReference::New( - const std::vector& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().New(args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap()).As()); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Object(); - } - return scope.Escape(result).As(); -#endif -} - -//////////////////////////////////////////////////////////////////////////////// -// CallbackInfo class -//////////////////////////////////////////////////////////////////////////////// - -inline CallbackInfo::CallbackInfo(napi_env env, napi_callback_info info) - : _env(env), - _info(info), - _this(nullptr), - _dynamicArgs(nullptr), - _data(nullptr) { - _argc = _staticArgCount; - _argv = _staticArgs; - napi_status status = - napi_get_cb_info(env, info, &_argc, _argv, &_this, &_data); - NAPI_THROW_IF_FAILED_VOID(_env, status); - - if (_argc > _staticArgCount) { - // Use either a fixed-size array (on the stack) or a dynamically-allocated - // array (on the heap) depending on the number of args. - _dynamicArgs = new napi_value[_argc]; - _argv = _dynamicArgs; - - status = napi_get_cb_info(env, info, &_argc, _argv, nullptr, nullptr); - NAPI_THROW_IF_FAILED_VOID(_env, status); - } -} - -inline CallbackInfo::~CallbackInfo() { - if (_dynamicArgs != nullptr) { - delete[] _dynamicArgs; - } -} - -inline CallbackInfo::operator napi_callback_info() const { - return _info; -} - -inline Value CallbackInfo::NewTarget() const { - napi_value newTarget; - napi_status status = napi_get_new_target(_env, _info, &newTarget); - NAPI_THROW_IF_FAILED(_env, status, Value()); - return Value(_env, newTarget); -} - -inline bool CallbackInfo::IsConstructCall() const { - return !NewTarget().IsEmpty(); -} - -inline Napi::Env CallbackInfo::Env() const { - return Napi::Env(_env); -} - -inline size_t CallbackInfo::Length() const { - return _argc; -} - -inline const Value CallbackInfo::operator[](size_t index) const { - return index < _argc ? Value(_env, _argv[index]) : Env().Undefined(); -} - -inline Value CallbackInfo::This() const { - if (_this == nullptr) { - return Env().Undefined(); - } - return Object(_env, _this); -} - -inline void* CallbackInfo::Data() const { - return _data; -} - -inline void CallbackInfo::SetData(void* data) { - _data = data; -} - -//////////////////////////////////////////////////////////////////////////////// -// PropertyDescriptor class -//////////////////////////////////////////////////////////////////////////////// - -template -PropertyDescriptor PropertyDescriptor::Accessor( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - - desc.utf8name = utf8name; - desc.getter = details::TemplatedCallback; - desc.attributes = attributes; - desc.data = data; - - return desc; -} - -template -PropertyDescriptor PropertyDescriptor::Accessor( - const std::string& utf8name, - napi_property_attributes attributes, - void* data) { - return Accessor(utf8name.c_str(), attributes, data); -} - -template -PropertyDescriptor PropertyDescriptor::Accessor( - Name name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - - desc.name = name; - desc.getter = details::TemplatedCallback; - desc.attributes = attributes; - desc.data = data; - - return desc; -} - -template -PropertyDescriptor PropertyDescriptor::Accessor( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - - desc.utf8name = utf8name; - desc.getter = details::TemplatedCallback; - desc.setter = details::TemplatedVoidCallback; - desc.attributes = attributes; - desc.data = data; - - return desc; -} - -template -PropertyDescriptor PropertyDescriptor::Accessor( - const std::string& utf8name, - napi_property_attributes attributes, - void* data) { - return Accessor(utf8name.c_str(), attributes, data); -} - -template -PropertyDescriptor PropertyDescriptor::Accessor( - Name name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - - desc.name = name; - desc.getter = details::TemplatedCallback; - desc.setter = details::TemplatedVoidCallback; - desc.attributes = attributes; - desc.data = data; - - return desc; -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - const char* utf8name, - Getter getter, - napi_property_attributes attributes, - void* data) { - using CbData = details::CallbackData; - auto callbackData = new CbData({getter, data}); - - napi_status status = AttachData(env, object, callbackData); - if (status != napi_ok) { - delete callbackData; - NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor()); - } - - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - CbData::Wrapper, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Getter getter, - napi_property_attributes attributes, - void* data) { - return Accessor(env, object, utf8name.c_str(), getter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - Name name, - Getter getter, - napi_property_attributes attributes, - void* data) { - using CbData = details::CallbackData; - auto callbackData = new CbData({getter, data}); - - napi_status status = AttachData(env, object, callbackData); - if (status != napi_ok) { - delete callbackData; - NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor()); - } - - return PropertyDescriptor({nullptr, - name, - nullptr, - CbData::Wrapper, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - const char* utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* data) { - using CbData = details::AccessorCallbackData; - auto callbackData = new CbData({getter, setter, data}); - - napi_status status = AttachData(env, object, callbackData); - if (status != napi_ok) { - delete callbackData; - NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor()); - } - - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - CbData::GetterWrapper, - CbData::SetterWrapper, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* data) { - return Accessor( - env, object, utf8name.c_str(), getter, setter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - Name name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* data) { - using CbData = details::AccessorCallbackData; - auto callbackData = new CbData({getter, setter, data}); - - napi_status status = AttachData(env, object, callbackData); - if (status != napi_ok) { - delete callbackData; - NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor()); - } - - return PropertyDescriptor({nullptr, - name, - nullptr, - CbData::GetterWrapper, - CbData::SetterWrapper, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - Napi::Env env, - Napi::Object /*object*/, - const char* utf8name, - Callable cb, - napi_property_attributes attributes, - void* data) { - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - nullptr, - nullptr, - Napi::Function::New(env, cb, utf8name, data), - attributes, - nullptr}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Callable cb, - napi_property_attributes attributes, - void* data) { - return Function(env, object, utf8name.c_str(), cb, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - Napi::Env env, - Napi::Object /*object*/, - Name name, - Callable cb, - napi_property_attributes attributes, - void* data) { - return PropertyDescriptor({nullptr, - name, - nullptr, - nullptr, - nullptr, - Napi::Function::New(env, cb, nullptr, data), - attributes, - nullptr}); -} - -inline PropertyDescriptor PropertyDescriptor::Value( - const char* utf8name, - napi_value value, - napi_property_attributes attributes) { - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - nullptr, - nullptr, - value, - attributes, - nullptr}); -} - -inline PropertyDescriptor PropertyDescriptor::Value( - const std::string& utf8name, - napi_value value, - napi_property_attributes attributes) { - return Value(utf8name.c_str(), value, attributes); -} - -inline PropertyDescriptor PropertyDescriptor::Value( - napi_value name, napi_value value, napi_property_attributes attributes) { - return PropertyDescriptor( - {nullptr, name, nullptr, nullptr, nullptr, value, attributes, nullptr}); -} - -inline PropertyDescriptor PropertyDescriptor::Value( - Name name, Napi::Value value, napi_property_attributes attributes) { - napi_value nameValue = name; - napi_value valueValue = value; - return PropertyDescriptor::Value(nameValue, valueValue, attributes); -} - -inline PropertyDescriptor::PropertyDescriptor(napi_property_descriptor desc) - : _desc(desc) {} - -inline PropertyDescriptor::operator napi_property_descriptor&() { - return _desc; -} - -inline PropertyDescriptor::operator const napi_property_descriptor&() const { - return _desc; -} - -//////////////////////////////////////////////////////////////////////////////// -// InstanceWrap class -//////////////////////////////////////////////////////////////////////////////// - -template -inline void InstanceWrap::AttachPropData( - napi_env env, napi_value value, const napi_property_descriptor* prop) { - napi_status status; - if (!(prop->attributes & napi_static)) { - if (prop->method == T::InstanceVoidMethodCallbackWrapper) { - status = Napi::details::AttachData( - env, value, static_cast(prop->data)); - NAPI_THROW_IF_FAILED_VOID(env, status); - } else if (prop->method == T::InstanceMethodCallbackWrapper) { - status = Napi::details::AttachData( - env, value, static_cast(prop->data)); - NAPI_THROW_IF_FAILED_VOID(env, status); - } else if (prop->getter == T::InstanceGetterCallbackWrapper || - prop->setter == T::InstanceSetterCallbackWrapper) { - status = Napi::details::AttachData( - env, value, static_cast(prop->data)); - NAPI_THROW_IF_FAILED_VOID(env, status); - } - } -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - const char* utf8name, - InstanceVoidMethodCallback method, - napi_property_attributes attributes, - void* data) { - InstanceVoidMethodCallbackData* callbackData = - new InstanceVoidMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = T::InstanceVoidMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - const char* utf8name, - InstanceMethodCallback method, - napi_property_attributes attributes, - void* data) { - InstanceMethodCallbackData* callbackData = - new InstanceMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = T::InstanceMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - Symbol name, - InstanceVoidMethodCallback method, - napi_property_attributes attributes, - void* data) { - InstanceVoidMethodCallbackData* callbackData = - new InstanceVoidMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = T::InstanceVoidMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - Symbol name, - InstanceMethodCallback method, - napi_property_attributes attributes, - void* data) { - InstanceMethodCallbackData* callbackData = - new InstanceMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = T::InstanceMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceVoidMethodCallback method> -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = details::TemplatedInstanceVoidCallback; - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceMethodCallback method> -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = details::TemplatedInstanceCallback; - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceVoidMethodCallback method> -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = details::TemplatedInstanceVoidCallback; - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceMethodCallback method> -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = details::TemplatedInstanceCallback; - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceAccessor( - const char* utf8name, - InstanceGetterCallback getter, - InstanceSetterCallback setter, - napi_property_attributes attributes, - void* data) { - InstanceAccessorCallbackData* callbackData = - new InstanceAccessorCallbackData({getter, setter, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.getter = getter != nullptr ? T::InstanceGetterCallbackWrapper : nullptr; - desc.setter = setter != nullptr ? T::InstanceSetterCallbackWrapper : nullptr; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceAccessor( - Symbol name, - InstanceGetterCallback getter, - InstanceSetterCallback setter, - napi_property_attributes attributes, - void* data) { - InstanceAccessorCallbackData* callbackData = - new InstanceAccessorCallbackData({getter, setter, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.getter = getter != nullptr ? T::InstanceGetterCallbackWrapper : nullptr; - desc.setter = setter != nullptr ? T::InstanceSetterCallbackWrapper : nullptr; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceGetterCallback getter, - typename InstanceWrap::InstanceSetterCallback setter> -inline ClassPropertyDescriptor InstanceWrap::InstanceAccessor( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.getter = details::TemplatedInstanceCallback; - desc.setter = This::WrapSetter(This::SetterTag()); - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceGetterCallback getter, - typename InstanceWrap::InstanceSetterCallback setter> -inline ClassPropertyDescriptor InstanceWrap::InstanceAccessor( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.getter = details::TemplatedInstanceCallback; - desc.setter = This::WrapSetter(This::SetterTag()); - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceValue( - const char* utf8name, - Napi::Value value, - napi_property_attributes attributes) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.value = value; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceValue( - Symbol name, Napi::Value value, napi_property_attributes attributes) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.value = value; - desc.attributes = attributes; - return desc; -} - -template -inline napi_value InstanceWrap::InstanceVoidMethodCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - InstanceVoidMethodCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - T* instance = T::Unwrap(callbackInfo.This().As()); - auto cb = callbackData->callback; - if (instance) (instance->*cb)(callbackInfo); - return nullptr; - }); -} - -template -inline napi_value InstanceWrap::InstanceMethodCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - InstanceMethodCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - T* instance = T::Unwrap(callbackInfo.This().As()); - auto cb = callbackData->callback; - return instance ? (instance->*cb)(callbackInfo) : Napi::Value(); - }); -} - -template -inline napi_value InstanceWrap::InstanceGetterCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - InstanceAccessorCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - T* instance = T::Unwrap(callbackInfo.This().As()); - auto cb = callbackData->getterCallback; - return instance ? (instance->*cb)(callbackInfo) : Napi::Value(); - }); -} - -template -inline napi_value InstanceWrap::InstanceSetterCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - InstanceAccessorCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - T* instance = T::Unwrap(callbackInfo.This().As()); - auto cb = callbackData->setterCallback; - if (instance) (instance->*cb)(callbackInfo, callbackInfo[0]); - return nullptr; - }); -} - -template -template ::InstanceSetterCallback method> -inline napi_value InstanceWrap::WrappedMethod( - napi_env env, napi_callback_info info) NAPI_NOEXCEPT { - return details::WrapCallback([&] { - const CallbackInfo cbInfo(env, info); - T* instance = T::Unwrap(cbInfo.This().As()); - if (instance) (instance->*method)(cbInfo, cbInfo[0]); - return nullptr; - }); -} - -//////////////////////////////////////////////////////////////////////////////// -// ObjectWrap class -//////////////////////////////////////////////////////////////////////////////// - -template -inline ObjectWrap::ObjectWrap(const Napi::CallbackInfo& callbackInfo) { - napi_env env = callbackInfo.Env(); - napi_value wrapper = callbackInfo.This(); - napi_status status; - napi_ref ref; - T* instance = static_cast(this); - status = napi_wrap(env, wrapper, instance, FinalizeCallback, nullptr, &ref); - NAPI_THROW_IF_FAILED_VOID(env, status); - - Reference* instanceRef = instance; - *instanceRef = Reference(env, ref); -} - -template -inline ObjectWrap::~ObjectWrap() { - // If the JS object still exists at this point, remove the finalizer added - // through `napi_wrap()`. - if (!IsEmpty()) { - Object object = Value(); - // It is not valid to call `napi_remove_wrap()` with an empty `object`. - // This happens e.g. during garbage collection. - if (!object.IsEmpty() && _construction_failed) { - napi_remove_wrap(Env(), object, nullptr); - } - } -} - -template -inline T* ObjectWrap::Unwrap(Object wrapper) { - void* unwrapped; - napi_status status = napi_unwrap(wrapper.Env(), wrapper, &unwrapped); - NAPI_THROW_IF_FAILED(wrapper.Env(), status, nullptr); - return static_cast(unwrapped); -} - -template -inline Function ObjectWrap::DefineClass( - Napi::Env env, - const char* utf8name, - const size_t props_count, - const napi_property_descriptor* descriptors, - void* data) { - napi_status status; - std::vector props(props_count); - - // We copy the descriptors to a local array because before defining the class - // we must replace static method property descriptors with value property - // descriptors such that the value is a function-valued `napi_value` created - // with `CreateFunction()`. - // - // This replacement could be made for instance methods as well, but V8 aborts - // if we do that, because it expects methods defined on the prototype template - // to have `FunctionTemplate`s. - for (size_t index = 0; index < props_count; index++) { - props[index] = descriptors[index]; - napi_property_descriptor* prop = &props[index]; - if (prop->method == T::StaticMethodCallbackWrapper) { - status = - CreateFunction(env, - utf8name, - prop->method, - static_cast(prop->data), - &(prop->value)); - NAPI_THROW_IF_FAILED(env, status, Function()); - prop->method = nullptr; - prop->data = nullptr; - } else if (prop->method == T::StaticVoidMethodCallbackWrapper) { - status = - CreateFunction(env, - utf8name, - prop->method, - static_cast(prop->data), - &(prop->value)); - NAPI_THROW_IF_FAILED(env, status, Function()); - prop->method = nullptr; - prop->data = nullptr; - } - } - - napi_value value; - status = napi_define_class(env, - utf8name, - NAPI_AUTO_LENGTH, - T::ConstructorCallbackWrapper, - data, - props_count, - props.data(), - &value); - NAPI_THROW_IF_FAILED(env, status, Function()); - - // After defining the class we iterate once more over the property descriptors - // and attach the data associated with accessors and instance methods to the - // newly created JavaScript class. - for (size_t idx = 0; idx < props_count; idx++) { - const napi_property_descriptor* prop = &props[idx]; - - if (prop->getter == T::StaticGetterCallbackWrapper || - prop->setter == T::StaticSetterCallbackWrapper) { - status = Napi::details::AttachData( - env, value, static_cast(prop->data)); - NAPI_THROW_IF_FAILED(env, status, Function()); - } else { - // InstanceWrap::AttachPropData is responsible for attaching the data - // of instance methods and accessors. - T::AttachPropData(env, value, prop); - } - } - - return Function(env, value); -} - -template -inline Function ObjectWrap::DefineClass( - Napi::Env env, - const char* utf8name, - const std::initializer_list>& properties, - void* data) { - return DefineClass( - env, - utf8name, - properties.size(), - reinterpret_cast(properties.begin()), - data); -} - -template -inline Function ObjectWrap::DefineClass( - Napi::Env env, - const char* utf8name, - const std::vector>& properties, - void* data) { - return DefineClass( - env, - utf8name, - properties.size(), - reinterpret_cast(properties.data()), - data); -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - const char* utf8name, - StaticVoidMethodCallback method, - napi_property_attributes attributes, - void* data) { - StaticVoidMethodCallbackData* callbackData = - new StaticVoidMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = T::StaticVoidMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - const char* utf8name, - StaticMethodCallback method, - napi_property_attributes attributes, - void* data) { - StaticMethodCallbackData* callbackData = - new StaticMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = T::StaticMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - Symbol name, - StaticVoidMethodCallback method, - napi_property_attributes attributes, - void* data) { - StaticVoidMethodCallbackData* callbackData = - new StaticVoidMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = T::StaticVoidMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - Symbol name, - StaticMethodCallback method, - napi_property_attributes attributes, - void* data) { - StaticMethodCallbackData* callbackData = - new StaticMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = T::StaticMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticVoidMethodCallback method> -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = details::TemplatedVoidCallback; - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticVoidMethodCallback method> -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = details::TemplatedVoidCallback; - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticMethodCallback method> -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = details::TemplatedCallback; - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticMethodCallback method> -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = details::TemplatedCallback; - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticAccessor( - const char* utf8name, - StaticGetterCallback getter, - StaticSetterCallback setter, - napi_property_attributes attributes, - void* data) { - StaticAccessorCallbackData* callbackData = - new StaticAccessorCallbackData({getter, setter, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.getter = getter != nullptr ? T::StaticGetterCallbackWrapper : nullptr; - desc.setter = setter != nullptr ? T::StaticSetterCallbackWrapper : nullptr; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticAccessor( - Symbol name, - StaticGetterCallback getter, - StaticSetterCallback setter, - napi_property_attributes attributes, - void* data) { - StaticAccessorCallbackData* callbackData = - new StaticAccessorCallbackData({getter, setter, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.getter = getter != nullptr ? T::StaticGetterCallbackWrapper : nullptr; - desc.setter = setter != nullptr ? T::StaticSetterCallbackWrapper : nullptr; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticGetterCallback getter, - typename ObjectWrap::StaticSetterCallback setter> -inline ClassPropertyDescriptor ObjectWrap::StaticAccessor( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.getter = details::TemplatedCallback; - desc.setter = This::WrapStaticSetter(This::StaticSetterTag()); - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticGetterCallback getter, - typename ObjectWrap::StaticSetterCallback setter> -inline ClassPropertyDescriptor ObjectWrap::StaticAccessor( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.getter = details::TemplatedCallback; - desc.setter = This::WrapStaticSetter(This::StaticSetterTag()); - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticValue( - const char* utf8name, - Napi::Value value, - napi_property_attributes attributes) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.value = value; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticValue( - Symbol name, Napi::Value value, napi_property_attributes attributes) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.value = value; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline Value ObjectWrap::OnCalledAsFunction( - const Napi::CallbackInfo& callbackInfo) { - NAPI_THROW( - TypeError::New(callbackInfo.Env(), - "Class constructors cannot be invoked without 'new'"), - Napi::Value()); -} - -template -inline void ObjectWrap::Finalize(Napi::Env /*env*/) {} - -template -inline napi_value ObjectWrap::ConstructorCallbackWrapper( - napi_env env, napi_callback_info info) { - napi_value new_target; - napi_status status = napi_get_new_target(env, info, &new_target); - if (status != napi_ok) return nullptr; - - bool isConstructCall = (new_target != nullptr); - if (!isConstructCall) { - return details::WrapCallback( - [&] { return T::OnCalledAsFunction(CallbackInfo(env, info)); }); - } - - napi_value wrapper = details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - T* instance = new T(callbackInfo); -#ifdef NAPI_CPP_EXCEPTIONS - instance->_construction_failed = false; -#else - if (callbackInfo.Env().IsExceptionPending()) { - // We need to clear the exception so that removing the wrap might work. - Error e = callbackInfo.Env().GetAndClearPendingException(); - delete instance; - e.ThrowAsJavaScriptException(); - } else { - instance->_construction_failed = false; - } -#endif // NAPI_CPP_EXCEPTIONS - return callbackInfo.This(); - }); - - return wrapper; -} - -template -inline napi_value ObjectWrap::StaticVoidMethodCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - StaticVoidMethodCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - callbackData->callback(callbackInfo); - return nullptr; - }); -} - -template -inline napi_value ObjectWrap::StaticMethodCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - StaticMethodCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - return callbackData->callback(callbackInfo); - }); -} - -template -inline napi_value ObjectWrap::StaticGetterCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - StaticAccessorCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - return callbackData->getterCallback(callbackInfo); - }); -} - -template -inline napi_value ObjectWrap::StaticSetterCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - StaticAccessorCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - callbackData->setterCallback(callbackInfo, callbackInfo[0]); - return nullptr; - }); -} - -template -inline void ObjectWrap::FinalizeCallback(napi_env env, - void* data, - void* /*hint*/) { - HandleScope scope(env); - T* instance = static_cast(data); - instance->Finalize(Napi::Env(env)); - delete instance; -} - -template -template ::StaticSetterCallback method> -inline napi_value ObjectWrap::WrappedMethod( - napi_env env, napi_callback_info info) NAPI_NOEXCEPT { - return details::WrapCallback([&] { - const CallbackInfo cbInfo(env, info); - method(cbInfo, cbInfo[0]); - return nullptr; - }); -} - -//////////////////////////////////////////////////////////////////////////////// -// HandleScope class -//////////////////////////////////////////////////////////////////////////////// - -inline HandleScope::HandleScope(napi_env env, napi_handle_scope scope) - : _env(env), _scope(scope) {} - -inline HandleScope::HandleScope(Napi::Env env) : _env(env) { - napi_status status = napi_open_handle_scope(_env, &_scope); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline HandleScope::~HandleScope() { - napi_status status = napi_close_handle_scope(_env, _scope); - NAPI_FATAL_IF_FAILED( - status, "HandleScope::~HandleScope", "napi_close_handle_scope"); -} - -inline HandleScope::operator napi_handle_scope() const { - return _scope; -} - -inline Napi::Env HandleScope::Env() const { - return Napi::Env(_env); -} - -//////////////////////////////////////////////////////////////////////////////// -// EscapableHandleScope class -//////////////////////////////////////////////////////////////////////////////// - -inline EscapableHandleScope::EscapableHandleScope( - napi_env env, napi_escapable_handle_scope scope) - : _env(env), _scope(scope) {} - -inline EscapableHandleScope::EscapableHandleScope(Napi::Env env) : _env(env) { - napi_status status = napi_open_escapable_handle_scope(_env, &_scope); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline EscapableHandleScope::~EscapableHandleScope() { - napi_status status = napi_close_escapable_handle_scope(_env, _scope); - NAPI_FATAL_IF_FAILED(status, - "EscapableHandleScope::~EscapableHandleScope", - "napi_close_escapable_handle_scope"); -} - -inline EscapableHandleScope::operator napi_escapable_handle_scope() const { - return _scope; -} - -inline Napi::Env EscapableHandleScope::Env() const { - return Napi::Env(_env); -} - -inline Value EscapableHandleScope::Escape(napi_value escapee) { - napi_value result; - napi_status status = napi_escape_handle(_env, _scope, escapee, &result); - NAPI_THROW_IF_FAILED(_env, status, Value()); - return Value(_env, result); -} - -#if (NAPI_VERSION > 2) -//////////////////////////////////////////////////////////////////////////////// -// CallbackScope class -//////////////////////////////////////////////////////////////////////////////// - -inline CallbackScope::CallbackScope(napi_env env, napi_callback_scope scope) - : _env(env), _scope(scope) {} - -inline CallbackScope::CallbackScope(napi_env env, napi_async_context context) - : _env(env) { - napi_status status = - napi_open_callback_scope(_env, Object::New(env), context, &_scope); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline CallbackScope::~CallbackScope() { - napi_status status = napi_close_callback_scope(_env, _scope); - NAPI_FATAL_IF_FAILED( - status, "CallbackScope::~CallbackScope", "napi_close_callback_scope"); -} - -inline CallbackScope::operator napi_callback_scope() const { - return _scope; -} - -inline Napi::Env CallbackScope::Env() const { - return Napi::Env(_env); -} -#endif - -//////////////////////////////////////////////////////////////////////////////// -// AsyncContext class -//////////////////////////////////////////////////////////////////////////////// - -inline AsyncContext::AsyncContext(napi_env env, const char* resource_name) - : AsyncContext(env, resource_name, Object::New(env)) {} - -inline AsyncContext::AsyncContext(napi_env env, - const char* resource_name, - const Object& resource) - : _env(env), _context(nullptr) { - napi_value resource_id; - napi_status status = napi_create_string_utf8( - _env, resource_name, NAPI_AUTO_LENGTH, &resource_id); - NAPI_THROW_IF_FAILED_VOID(_env, status); - - status = napi_async_init(_env, resource, resource_id, &_context); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline AsyncContext::~AsyncContext() { - if (_context != nullptr) { - napi_async_destroy(_env, _context); - _context = nullptr; - } -} - -inline AsyncContext::AsyncContext(AsyncContext&& other) { - _env = other._env; - other._env = nullptr; - _context = other._context; - other._context = nullptr; -} - -inline AsyncContext& AsyncContext::operator=(AsyncContext&& other) { - _env = other._env; - other._env = nullptr; - _context = other._context; - other._context = nullptr; - return *this; -} - -inline AsyncContext::operator napi_async_context() const { - return _context; -} - -inline Napi::Env AsyncContext::Env() const { - return Napi::Env(_env); -} - -//////////////////////////////////////////////////////////////////////////////// -// AsyncWorker class -//////////////////////////////////////////////////////////////////////////////// - -#if NAPI_HAS_THREADS - -inline AsyncWorker::AsyncWorker(const Function& callback) - : AsyncWorker(callback, "generic") {} - -inline AsyncWorker::AsyncWorker(const Function& callback, - const char* resource_name) - : AsyncWorker(callback, resource_name, Object::New(callback.Env())) {} - -inline AsyncWorker::AsyncWorker(const Function& callback, - const char* resource_name, - const Object& resource) - : AsyncWorker( - Object::New(callback.Env()), callback, resource_name, resource) {} - -inline AsyncWorker::AsyncWorker(const Object& receiver, - const Function& callback) - : AsyncWorker(receiver, callback, "generic") {} - -inline AsyncWorker::AsyncWorker(const Object& receiver, - const Function& callback, - const char* resource_name) - : AsyncWorker( - receiver, callback, resource_name, Object::New(callback.Env())) {} - -inline AsyncWorker::AsyncWorker(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource) - : _env(callback.Env()), - _receiver(Napi::Persistent(receiver)), - _callback(Napi::Persistent(callback)), - _suppress_destruct(false) { - napi_value resource_id; - napi_status status = napi_create_string_latin1( - _env, resource_name, NAPI_AUTO_LENGTH, &resource_id); - NAPI_THROW_IF_FAILED_VOID(_env, status); - - status = napi_create_async_work(_env, - resource, - resource_id, - OnAsyncWorkExecute, - OnAsyncWorkComplete, - this, - &_work); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline AsyncWorker::AsyncWorker(Napi::Env env) : AsyncWorker(env, "generic") {} - -inline AsyncWorker::AsyncWorker(Napi::Env env, const char* resource_name) - : AsyncWorker(env, resource_name, Object::New(env)) {} - -inline AsyncWorker::AsyncWorker(Napi::Env env, - const char* resource_name, - const Object& resource) - : _env(env), _receiver(), _callback(), _suppress_destruct(false) { - napi_value resource_id; - napi_status status = napi_create_string_latin1( - _env, resource_name, NAPI_AUTO_LENGTH, &resource_id); - NAPI_THROW_IF_FAILED_VOID(_env, status); - - status = napi_create_async_work(_env, - resource, - resource_id, - OnAsyncWorkExecute, - OnAsyncWorkComplete, - this, - &_work); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline AsyncWorker::~AsyncWorker() { - if (_work != nullptr) { - napi_delete_async_work(_env, _work); - _work = nullptr; - } -} - -inline void AsyncWorker::Destroy() { - delete this; -} - -inline AsyncWorker::operator napi_async_work() const { - return _work; -} - -inline Napi::Env AsyncWorker::Env() const { - return Napi::Env(_env); -} - -inline void AsyncWorker::Queue() { - napi_status status = napi_queue_async_work(_env, _work); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline void AsyncWorker::Cancel() { - napi_status status = napi_cancel_async_work(_env, _work); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline ObjectReference& AsyncWorker::Receiver() { - return _receiver; -} - -inline FunctionReference& AsyncWorker::Callback() { - return _callback; -} - -inline void AsyncWorker::SuppressDestruct() { - _suppress_destruct = true; -} - -inline void AsyncWorker::OnOK() { - if (!_callback.IsEmpty()) { - _callback.Call(_receiver.Value(), GetResult(_callback.Env())); - } -} - -inline void AsyncWorker::OnError(const Error& e) { - if (!_callback.IsEmpty()) { - _callback.Call(_receiver.Value(), - std::initializer_list{e.Value()}); - } -} - -inline void AsyncWorker::SetError(const std::string& error) { - _error = error; -} - -inline std::vector AsyncWorker::GetResult(Napi::Env /*env*/) { - return {}; -} -// The OnAsyncWorkExecute method receives an napi_env argument. However, do NOT -// use it within this method, as it does not run on the JavaScript thread and -// must not run any method that would cause JavaScript to run. In practice, -// this means that almost any use of napi_env will be incorrect. -inline void AsyncWorker::OnAsyncWorkExecute(napi_env env, void* asyncworker) { - AsyncWorker* self = static_cast(asyncworker); - self->OnExecute(env); -} -// The OnExecute method receives an napi_env argument. However, do NOT -// use it within this method, as it does not run on the JavaScript thread and -// must not run any method that would cause JavaScript to run. In practice, -// this means that almost any use of napi_env will be incorrect. -inline void AsyncWorker::OnExecute(Napi::Env /*DO_NOT_USE*/) { -#ifdef NAPI_CPP_EXCEPTIONS - try { - Execute(); - } catch (const std::exception& e) { - SetError(e.what()); - } -#else // NAPI_CPP_EXCEPTIONS - Execute(); -#endif // NAPI_CPP_EXCEPTIONS -} - -inline void AsyncWorker::OnAsyncWorkComplete(napi_env env, - napi_status status, - void* asyncworker) { - AsyncWorker* self = static_cast(asyncworker); - self->OnWorkComplete(env, status); -} -inline void AsyncWorker::OnWorkComplete(Napi::Env /*env*/, napi_status status) { - if (status != napi_cancelled) { - HandleScope scope(_env); - details::WrapCallback([&] { - if (_error.size() == 0) { - OnOK(); - } else { - OnError(Error::New(_env, _error)); - } - return nullptr; - }); - } - if (!_suppress_destruct) { - Destroy(); - } -} - -#endif // NAPI_HAS_THREADS - -#if (NAPI_VERSION > 3 && NAPI_HAS_THREADS) -//////////////////////////////////////////////////////////////////////////////// -// TypedThreadSafeFunction class -//////////////////////////////////////////////////////////////////////////////// - -// Starting with NAPI 5, the JavaScript function `func` parameter of -// `napi_create_threadsafe_function` is optional. -#if NAPI_VERSION > 4 -// static, with Callback [missing] Resource [missing] Finalizer [missing] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - TypedThreadSafeFunction tsfn; - - napi_status status = - napi_create_threadsafe_function(env, - nullptr, - nullptr, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - nullptr, - nullptr, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with Callback [missing] Resource [passed] Finalizer [missing] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - TypedThreadSafeFunction tsfn; - - napi_status status = - napi_create_threadsafe_function(env, - nullptr, - resource, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - nullptr, - nullptr, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with Callback [missing] Resource [missing] Finalizer [passed] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - TypedThreadSafeFunction tsfn; - - auto* finalizeData = new details:: - ThreadSafeFinalize( - {data, finalizeCallback}); - napi_status status = napi_create_threadsafe_function( - env, - nullptr, - nullptr, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - finalizeData, - details::ThreadSafeFinalize:: - FinalizeFinalizeWrapperWithDataAndContext, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with Callback [missing] Resource [passed] Finalizer [passed] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - TypedThreadSafeFunction tsfn; - - auto* finalizeData = new details:: - ThreadSafeFinalize( - {data, finalizeCallback}); - napi_status status = napi_create_threadsafe_function( - env, - nullptr, - resource, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - finalizeData, - details::ThreadSafeFinalize:: - FinalizeFinalizeWrapperWithDataAndContext, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} -#endif - -// static, with Callback [passed] Resource [missing] Finalizer [missing] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - TypedThreadSafeFunction tsfn; - - napi_status status = - napi_create_threadsafe_function(env, - callback, - nullptr, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - nullptr, - nullptr, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with Callback [passed] Resource [passed] Finalizer [missing] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - TypedThreadSafeFunction tsfn; - - napi_status status = - napi_create_threadsafe_function(env, - callback, - resource, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - nullptr, - nullptr, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with Callback [passed] Resource [missing] Finalizer [passed] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - TypedThreadSafeFunction tsfn; - - auto* finalizeData = new details:: - ThreadSafeFinalize( - {data, finalizeCallback}); - napi_status status = napi_create_threadsafe_function( - env, - callback, - nullptr, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - finalizeData, - details::ThreadSafeFinalize:: - FinalizeFinalizeWrapperWithDataAndContext, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with: Callback [passed] Resource [passed] Finalizer [passed] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - CallbackType callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - TypedThreadSafeFunction tsfn; - - auto* finalizeData = new details:: - ThreadSafeFinalize( - {data, finalizeCallback}); - napi_status status = napi_create_threadsafe_function( - env, - details::DefaultCallbackWrapper< - CallbackType, - TypedThreadSafeFunction>(env, - callback), - resource, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - finalizeData, - details::ThreadSafeFinalize:: - FinalizeFinalizeWrapperWithDataAndContext, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -template -inline TypedThreadSafeFunction:: - TypedThreadSafeFunction() - : _tsfn() {} - -template -inline TypedThreadSafeFunction:: - TypedThreadSafeFunction(napi_threadsafe_function tsfn) - : _tsfn(tsfn) {} - -template -inline TypedThreadSafeFunction:: -operator napi_threadsafe_function() const { - return _tsfn; -} - -template -inline napi_status -TypedThreadSafeFunction::BlockingCall( - DataType* data) const { - return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_blocking); -} - -template -inline napi_status -TypedThreadSafeFunction::NonBlockingCall( - DataType* data) const { - return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_nonblocking); -} - -template -inline void TypedThreadSafeFunction::Ref( - napi_env env) const { - if (_tsfn != nullptr) { - napi_status status = napi_ref_threadsafe_function(env, _tsfn); - NAPI_THROW_IF_FAILED_VOID(env, status); - } -} - -template -inline void TypedThreadSafeFunction::Unref( - napi_env env) const { - if (_tsfn != nullptr) { - napi_status status = napi_unref_threadsafe_function(env, _tsfn); - NAPI_THROW_IF_FAILED_VOID(env, status); - } -} - -template -inline napi_status -TypedThreadSafeFunction::Acquire() const { - return napi_acquire_threadsafe_function(_tsfn); -} - -template -inline napi_status -TypedThreadSafeFunction::Release() const { - return napi_release_threadsafe_function(_tsfn, napi_tsfn_release); -} - -template -inline napi_status -TypedThreadSafeFunction::Abort() const { - return napi_release_threadsafe_function(_tsfn, napi_tsfn_abort); -} - -template -inline ContextType* -TypedThreadSafeFunction::GetContext() const { - void* context; - napi_status status = napi_get_threadsafe_function_context(_tsfn, &context); - NAPI_FATAL_IF_FAILED(status, - "TypedThreadSafeFunction::GetContext", - "napi_get_threadsafe_function_context"); - return static_cast(context); -} - -// static -template -void TypedThreadSafeFunction::CallJsInternal( - napi_env env, napi_value jsCallback, void* context, void* data) { - details::CallJsWrapper( - env, jsCallback, context, data); -} - -#if NAPI_VERSION == 4 -// static -template -Napi::Function -TypedThreadSafeFunction::EmptyFunctionFactory( - Napi::Env env) { - return Napi::Function::New(env, [](const CallbackInfo& cb) {}); -} - -// static -template -Napi::Function -TypedThreadSafeFunction::FunctionOrEmpty( - Napi::Env env, Napi::Function& callback) { - if (callback.IsEmpty()) { - return EmptyFunctionFactory(env); - } - return callback; -} - -#else -// static -template -std::nullptr_t -TypedThreadSafeFunction::EmptyFunctionFactory( - Napi::Env /*env*/) { - return nullptr; -} - -// static -template -Napi::Function -TypedThreadSafeFunction::FunctionOrEmpty( - Napi::Env /*env*/, Napi::Function& callback) { - return callback; -} - -#endif - -//////////////////////////////////////////////////////////////////////////////// -// ThreadSafeFunction class -//////////////////////////////////////////////////////////////////////////////// - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount) { - return New( - env, callback, Object(), resourceName, maxQueueSize, initialThreadCount); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - return New(env, - callback, - Object(), - resourceName, - maxQueueSize, - initialThreadCount, - context); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback) { - return New(env, - callback, - Object(), - resourceName, - maxQueueSize, - initialThreadCount, - finalizeCallback); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback, - FinalizerDataType* data) { - return New(env, - callback, - Object(), - resourceName, - maxQueueSize, - initialThreadCount, - finalizeCallback, - data); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback) { - return New(env, - callback, - Object(), - resourceName, - maxQueueSize, - initialThreadCount, - context, - finalizeCallback); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - return New(env, - callback, - Object(), - resourceName, - maxQueueSize, - initialThreadCount, - context, - finalizeCallback, - data); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount) { - return New(env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - static_cast(nullptr) /* context */); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - return New(env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - context, - [](Env, ContextType*) {} /* empty finalizer */); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback) { - return New(env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - static_cast(nullptr) /* context */, - finalizeCallback, - static_cast(nullptr) /* data */, - details::ThreadSafeFinalize::Wrapper); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback, - FinalizerDataType* data) { - return New(env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - static_cast(nullptr) /* context */, - finalizeCallback, - data, - details::ThreadSafeFinalize:: - FinalizeWrapperWithData); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback) { - return New( - env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - context, - finalizeCallback, - static_cast(nullptr) /* data */, - details::ThreadSafeFinalize::FinalizeWrapperWithContext); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - return New( - env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - context, - finalizeCallback, - data, - details::ThreadSafeFinalize:: - FinalizeFinalizeWrapperWithDataAndContext); -} - -inline ThreadSafeFunction::ThreadSafeFunction() : _tsfn() {} - -inline ThreadSafeFunction::ThreadSafeFunction(napi_threadsafe_function tsfn) - : _tsfn(tsfn) {} - -inline ThreadSafeFunction::operator napi_threadsafe_function() const { - return _tsfn; -} - -inline napi_status ThreadSafeFunction::BlockingCall() const { - return CallInternal(nullptr, napi_tsfn_blocking); -} - -template <> -inline napi_status ThreadSafeFunction::BlockingCall(void* data) const { - return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_blocking); -} - -template -inline napi_status ThreadSafeFunction::BlockingCall(Callback callback) const { - return CallInternal(new CallbackWrapper(callback), napi_tsfn_blocking); -} - -template -inline napi_status ThreadSafeFunction::BlockingCall(DataType* data, - Callback callback) const { - auto wrapper = [data, callback](Env env, Function jsCallback) { - callback(env, jsCallback, data); - }; - return CallInternal(new CallbackWrapper(wrapper), napi_tsfn_blocking); -} - -inline napi_status ThreadSafeFunction::NonBlockingCall() const { - return CallInternal(nullptr, napi_tsfn_nonblocking); -} - -template <> -inline napi_status ThreadSafeFunction::NonBlockingCall(void* data) const { - return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_nonblocking); -} - -template -inline napi_status ThreadSafeFunction::NonBlockingCall( - Callback callback) const { - return CallInternal(new CallbackWrapper(callback), napi_tsfn_nonblocking); -} - -template -inline napi_status ThreadSafeFunction::NonBlockingCall( - DataType* data, Callback callback) const { - auto wrapper = [data, callback](Env env, Function jsCallback) { - callback(env, jsCallback, data); - }; - return CallInternal(new CallbackWrapper(wrapper), napi_tsfn_nonblocking); -} - -inline void ThreadSafeFunction::Ref(napi_env env) const { - if (_tsfn != nullptr) { - napi_status status = napi_ref_threadsafe_function(env, _tsfn); - NAPI_THROW_IF_FAILED_VOID(env, status); - } -} - -inline void ThreadSafeFunction::Unref(napi_env env) const { - if (_tsfn != nullptr) { - napi_status status = napi_unref_threadsafe_function(env, _tsfn); - NAPI_THROW_IF_FAILED_VOID(env, status); - } -} - -inline napi_status ThreadSafeFunction::Acquire() const { - return napi_acquire_threadsafe_function(_tsfn); -} - -inline napi_status ThreadSafeFunction::Release() const { - return napi_release_threadsafe_function(_tsfn, napi_tsfn_release); -} - -inline napi_status ThreadSafeFunction::Abort() const { - return napi_release_threadsafe_function(_tsfn, napi_tsfn_abort); -} - -inline ThreadSafeFunction::ConvertibleContext ThreadSafeFunction::GetContext() - const { - void* context; - napi_status status = napi_get_threadsafe_function_context(_tsfn, &context); - NAPI_FATAL_IF_FAILED(status, - "ThreadSafeFunction::GetContext", - "napi_get_threadsafe_function_context"); - return ConvertibleContext({context}); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data, - napi_finalize wrapper) { - static_assert(details::can_make_string::value || - std::is_convertible::value, - "Resource name should be convertible to the string type"); - - ThreadSafeFunction tsfn; - auto* finalizeData = new details:: - ThreadSafeFinalize( - {data, finalizeCallback}); - napi_status status = - napi_create_threadsafe_function(env, - callback, - resource, - Value::From(env, resourceName), - maxQueueSize, - initialThreadCount, - finalizeData, - wrapper, - context, - CallJS, - &tsfn._tsfn); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, ThreadSafeFunction()); - } - - return tsfn; -} - -inline napi_status ThreadSafeFunction::CallInternal( - CallbackWrapper* callbackWrapper, - napi_threadsafe_function_call_mode mode) const { - napi_status status = - napi_call_threadsafe_function(_tsfn, callbackWrapper, mode); - if (status != napi_ok && callbackWrapper != nullptr) { - delete callbackWrapper; - } - - return status; -} - -// static -inline void ThreadSafeFunction::CallJS(napi_env env, - napi_value jsCallback, - void* /* context */, - void* data) { - if (env == nullptr && jsCallback == nullptr) { - return; - } - - details::WrapVoidCallback([&]() { - if (data != nullptr) { - auto* callbackWrapper = static_cast(data); - (*callbackWrapper)(env, Function(env, jsCallback)); - delete callbackWrapper; - } else if (jsCallback != nullptr) { - Function(env, jsCallback).Call({}); - } - }); -} - -//////////////////////////////////////////////////////////////////////////////// -// Async Progress Worker Base class -//////////////////////////////////////////////////////////////////////////////// -template -inline AsyncProgressWorkerBase::AsyncProgressWorkerBase( - const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource, - size_t queue_size) - : AsyncWorker(receiver, callback, resource_name, resource) { - // Fill all possible arguments to work around ambiguous - // ThreadSafeFunction::New signatures. - _tsfn = ThreadSafeFunction::New(callback.Env(), - callback, - resource, - resource_name, - queue_size, - /** initialThreadCount */ 1, - /** context */ this, - OnThreadSafeFunctionFinalize, - /** finalizeData */ this); -} - -#if NAPI_VERSION > 4 -template -inline AsyncProgressWorkerBase::AsyncProgressWorkerBase( - Napi::Env env, - const char* resource_name, - const Object& resource, - size_t queue_size) - : AsyncWorker(env, resource_name, resource) { - // TODO: Once the changes to make the callback optional for threadsafe - // functions are available on all versions we can remove the dummy Function - // here. - Function callback; - // Fill all possible arguments to work around ambiguous - // ThreadSafeFunction::New signatures. - _tsfn = ThreadSafeFunction::New(env, - callback, - resource, - resource_name, - queue_size, - /** initialThreadCount */ 1, - /** context */ this, - OnThreadSafeFunctionFinalize, - /** finalizeData */ this); -} -#endif - -template -inline AsyncProgressWorkerBase::~AsyncProgressWorkerBase() { - // Abort pending tsfn call. - // Don't send progress events after we've already completed. - // It's ok to call ThreadSafeFunction::Abort and ThreadSafeFunction::Release - // duplicated. - _tsfn.Abort(); -} - -template -inline void AsyncProgressWorkerBase::OnAsyncWorkProgress( - Napi::Env /* env */, Napi::Function /* jsCallback */, void* data) { - ThreadSafeData* tsd = static_cast(data); - tsd->asyncprogressworker()->OnWorkProgress(tsd->data()); - delete tsd; -} - -template -inline napi_status AsyncProgressWorkerBase::NonBlockingCall( - DataType* data) { - auto tsd = new AsyncProgressWorkerBase::ThreadSafeData(this, data); - auto ret = _tsfn.NonBlockingCall(tsd, OnAsyncWorkProgress); - if (ret != napi_ok) { - delete tsd; - } - return ret; -} - -template -inline void AsyncProgressWorkerBase::OnWorkComplete( - Napi::Env /* env */, napi_status status) { - _work_completed = true; - _complete_status = status; - _tsfn.Release(); -} - -template -inline void AsyncProgressWorkerBase::OnThreadSafeFunctionFinalize( - Napi::Env env, void* /* data */, AsyncProgressWorkerBase* context) { - if (context->_work_completed) { - context->AsyncWorker::OnWorkComplete(env, context->_complete_status); - } -} - -//////////////////////////////////////////////////////////////////////////////// -// Async Progress Worker class -//////////////////////////////////////////////////////////////////////////////// -template -inline AsyncProgressWorker::AsyncProgressWorker(const Function& callback) - : AsyncProgressWorker(callback, "generic") {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(const Function& callback, - const char* resource_name) - : AsyncProgressWorker( - callback, resource_name, Object::New(callback.Env())) {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(const Function& callback, - const char* resource_name, - const Object& resource) - : AsyncProgressWorker( - Object::New(callback.Env()), callback, resource_name, resource) {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(const Object& receiver, - const Function& callback) - : AsyncProgressWorker(receiver, callback, "generic") {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(const Object& receiver, - const Function& callback, - const char* resource_name) - : AsyncProgressWorker( - receiver, callback, resource_name, Object::New(callback.Env())) {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource) - : AsyncProgressWorkerBase(receiver, callback, resource_name, resource), - _asyncdata(nullptr), - _asyncsize(0), - _signaled(false) {} - -#if NAPI_VERSION > 4 -template -inline AsyncProgressWorker::AsyncProgressWorker(Napi::Env env) - : AsyncProgressWorker(env, "generic") {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(Napi::Env env, - const char* resource_name) - : AsyncProgressWorker(env, resource_name, Object::New(env)) {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(Napi::Env env, - const char* resource_name, - const Object& resource) - : AsyncProgressWorkerBase(env, resource_name, resource), - _asyncdata(nullptr), - _asyncsize(0) {} -#endif - -template -inline AsyncProgressWorker::~AsyncProgressWorker() { - { - std::lock_guard lock(this->_mutex); - _asyncdata = nullptr; - _asyncsize = 0; - } -} - -template -inline void AsyncProgressWorker::Execute() { - ExecutionProgress progress(this); - Execute(progress); -} - -template -inline void AsyncProgressWorker::OnWorkProgress(void*) { - T* data; - size_t size; - bool signaled; - { - std::lock_guard lock(this->_mutex); - data = this->_asyncdata; - size = this->_asyncsize; - signaled = this->_signaled; - this->_asyncdata = nullptr; - this->_asyncsize = 0; - this->_signaled = false; - } - - /** - * The callback of ThreadSafeFunction is not been invoked immediately on the - * callback of uv_async_t (uv io poll), rather the callback of TSFN is - * invoked on the right next uv idle callback. There are chances that during - * the deferring the signal of uv_async_t is been sent again, i.e. potential - * not coalesced two calls of the TSFN callback. - */ - if (data == nullptr && !signaled) { - return; - } - - this->OnProgress(data, size); - delete[] data; -} - -template -inline void AsyncProgressWorker::SendProgress_(const T* data, size_t count) { - T* new_data = new T[count]; - std::copy(data, data + count, new_data); - - T* old_data; - { - std::lock_guard lock(this->_mutex); - old_data = _asyncdata; - _asyncdata = new_data; - _asyncsize = count; - _signaled = false; - } - this->NonBlockingCall(nullptr); - - delete[] old_data; -} - -template -inline void AsyncProgressWorker::Signal() { - { - std::lock_guard lock(this->_mutex); - _signaled = true; - } - this->NonBlockingCall(static_cast(nullptr)); -} - -template -inline void AsyncProgressWorker::ExecutionProgress::Signal() const { - this->_worker->Signal(); -} - -template -inline void AsyncProgressWorker::ExecutionProgress::Send( - const T* data, size_t count) const { - _worker->SendProgress_(data, count); -} - -//////////////////////////////////////////////////////////////////////////////// -// Async Progress Queue Worker class -//////////////////////////////////////////////////////////////////////////////// -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Function& callback) - : AsyncProgressQueueWorker(callback, "generic") {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Function& callback, const char* resource_name) - : AsyncProgressQueueWorker( - callback, resource_name, Object::New(callback.Env())) {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Function& callback, const char* resource_name, const Object& resource) - : AsyncProgressQueueWorker( - Object::New(callback.Env()), callback, resource_name, resource) {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Object& receiver, const Function& callback) - : AsyncProgressQueueWorker(receiver, callback, "generic") {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Object& receiver, const Function& callback, const char* resource_name) - : AsyncProgressQueueWorker( - receiver, callback, resource_name, Object::New(callback.Env())) {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource) - : AsyncProgressWorkerBase>( - receiver, - callback, - resource_name, - resource, - /** unlimited queue size */ 0) {} - -#if NAPI_VERSION > 4 -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker(Napi::Env env) - : AsyncProgressQueueWorker(env, "generic") {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - Napi::Env env, const char* resource_name) - : AsyncProgressQueueWorker(env, resource_name, Object::New(env)) {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - Napi::Env env, const char* resource_name, const Object& resource) - : AsyncProgressWorkerBase>( - env, resource_name, resource, /** unlimited queue size */ 0) {} -#endif - -template -inline void AsyncProgressQueueWorker::Execute() { - ExecutionProgress progress(this); - Execute(progress); -} - -template -inline void AsyncProgressQueueWorker::OnWorkProgress( - std::pair* datapair) { - if (datapair == nullptr) { - return; - } - - T* data = datapair->first; - size_t size = datapair->second; - - this->OnProgress(data, size); - delete datapair; - delete[] data; -} - -template -inline void AsyncProgressQueueWorker::SendProgress_(const T* data, - size_t count) { - T* new_data = new T[count]; - std::copy(data, data + count, new_data); - - auto pair = new std::pair(new_data, count); - this->NonBlockingCall(pair); -} - -template -inline void AsyncProgressQueueWorker::Signal() const { - this->SendProgress_(static_cast(nullptr), 0); -} - -template -inline void AsyncProgressQueueWorker::OnWorkComplete(Napi::Env env, - napi_status status) { - // Draining queued items in TSFN. - AsyncProgressWorkerBase>::OnWorkComplete(env, status); -} - -template -inline void AsyncProgressQueueWorker::ExecutionProgress::Signal() const { - _worker->SendProgress_(static_cast(nullptr), 0); -} - -template -inline void AsyncProgressQueueWorker::ExecutionProgress::Send( - const T* data, size_t count) const { - _worker->SendProgress_(data, count); -} -#endif // NAPI_VERSION > 3 && NAPI_HAS_THREADS - -//////////////////////////////////////////////////////////////////////////////// -// Memory Management class -//////////////////////////////////////////////////////////////////////////////// - -inline int64_t MemoryManagement::AdjustExternalMemory(Env env, - int64_t change_in_bytes) { - int64_t result; - napi_status status = - napi_adjust_external_memory(env, change_in_bytes, &result); - NAPI_THROW_IF_FAILED(env, status, 0); - return result; -} - -//////////////////////////////////////////////////////////////////////////////// -// Version Management class -//////////////////////////////////////////////////////////////////////////////// - -inline uint32_t VersionManagement::GetNapiVersion(Env env) { - uint32_t result; - napi_status status = napi_get_version(env, &result); - NAPI_THROW_IF_FAILED(env, status, 0); - return result; -} - -inline const napi_node_version* VersionManagement::GetNodeVersion(Env env) { - const napi_node_version* result; - napi_status status = napi_get_node_version(env, &result); - NAPI_THROW_IF_FAILED(env, status, 0); - return result; -} - -#if NAPI_VERSION > 5 -//////////////////////////////////////////////////////////////////////////////// -// Addon class -//////////////////////////////////////////////////////////////////////////////// - -template -inline Object Addon::Init(Env env, Object exports) { - T* addon = new T(env, exports); - env.SetInstanceData(addon); - return addon->entry_point_; -} - -template -inline T* Addon::Unwrap(Object wrapper) { - return wrapper.Env().GetInstanceData(); -} - -template -inline void Addon::DefineAddon( - Object exports, const std::initializer_list& props) { - DefineProperties(exports, props); - entry_point_ = exports; -} - -template -inline Napi::Object Addon::DefineProperties( - Object object, const std::initializer_list& props) { - const napi_property_descriptor* properties = - reinterpret_cast(props.begin()); - size_t size = props.size(); - napi_status status = - napi_define_properties(object.Env(), object, size, properties); - NAPI_THROW_IF_FAILED(object.Env(), status, object); - for (size_t idx = 0; idx < size; idx++) - T::AttachPropData(object.Env(), object, &properties[idx]); - return object; -} -#endif // NAPI_VERSION > 5 - -#if NAPI_VERSION > 2 -template -Env::CleanupHook Env::AddCleanupHook(Hook hook, Arg* arg) { - return CleanupHook(*this, hook, arg); -} - -template -Env::CleanupHook Env::AddCleanupHook(Hook hook) { - return CleanupHook(*this, hook); -} - -template -Env::CleanupHook::CleanupHook() { - data = nullptr; -} - -template -Env::CleanupHook::CleanupHook(Napi::Env env, Hook hook) - : wrapper(Env::CleanupHook::Wrapper) { - data = new CleanupData{std::move(hook), nullptr}; - napi_status status = napi_add_env_cleanup_hook(env, wrapper, data); - if (status != napi_ok) { - delete data; - data = nullptr; - } -} - -template -Env::CleanupHook::CleanupHook(Napi::Env env, Hook hook, Arg* arg) - : wrapper(Env::CleanupHook::WrapperWithArg) { - data = new CleanupData{std::move(hook), arg}; - napi_status status = napi_add_env_cleanup_hook(env, wrapper, data); - if (status != napi_ok) { - delete data; - data = nullptr; - } -} - -template -bool Env::CleanupHook::Remove(Env env) { - napi_status status = napi_remove_env_cleanup_hook(env, wrapper, data); - delete data; - data = nullptr; - return status == napi_ok; -} - -template -bool Env::CleanupHook::IsEmpty() const { - return data == nullptr; -} -#endif // NAPI_VERSION > 2 - -#ifdef NAPI_CPP_CUSTOM_NAMESPACE -} // namespace NAPI_CPP_CUSTOM_NAMESPACE -#endif - -} // namespace Napi - -#endif // SRC_NAPI_INL_H_ diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/napi.h b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/napi.h deleted file mode 100644 index 9f20cb8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/napi.h +++ /dev/null @@ -1,3201 +0,0 @@ -#ifndef SRC_NAPI_H_ -#define SRC_NAPI_H_ - -#ifndef NAPI_HAS_THREADS -#if !defined(__wasm__) || (defined(__EMSCRIPTEN_PTHREADS__) || \ - (defined(__wasi__) && defined(_REENTRANT))) -#define NAPI_HAS_THREADS 1 -#else -#define NAPI_HAS_THREADS 0 -#endif -#endif - -#include -#include -#include -#include -#if NAPI_HAS_THREADS -#include -#endif // NAPI_HAS_THREADS -#include -#include - -// VS2015 RTM has bugs with constexpr, so require min of VS2015 Update 3 (known -// good version) -#if !defined(_MSC_VER) || _MSC_FULL_VER >= 190024210 -#define NAPI_HAS_CONSTEXPR 1 -#endif - -// VS2013 does not support char16_t literal strings, so we'll work around it -// using wchar_t strings and casting them. This is safe as long as the character -// sizes are the same. -#if defined(_MSC_VER) && _MSC_VER <= 1800 -static_assert(sizeof(char16_t) == sizeof(wchar_t), - "Size mismatch between char16_t and wchar_t"); -#define NAPI_WIDE_TEXT(x) reinterpret_cast(L##x) -#else -#define NAPI_WIDE_TEXT(x) u##x -#endif - -// If C++ exceptions are not explicitly enabled or disabled, enable them -// if exceptions were enabled in the compiler settings. -#if !defined(NAPI_CPP_EXCEPTIONS) && !defined(NAPI_DISABLE_CPP_EXCEPTIONS) -#if defined(_CPPUNWIND) || defined(__EXCEPTIONS) -#define NAPI_CPP_EXCEPTIONS -#else -#error Exception support not detected. \ - Define either NAPI_CPP_EXCEPTIONS or NAPI_DISABLE_CPP_EXCEPTIONS. -#endif -#endif - -// If C++ NAPI_CPP_EXCEPTIONS are enabled, NODE_ADDON_API_ENABLE_MAYBE should -// not be set -#if defined(NAPI_CPP_EXCEPTIONS) && defined(NODE_ADDON_API_ENABLE_MAYBE) -#error NODE_ADDON_API_ENABLE_MAYBE should not be set when \ - NAPI_CPP_EXCEPTIONS is defined. -#endif - -#ifdef _NOEXCEPT -#define NAPI_NOEXCEPT _NOEXCEPT -#else -#define NAPI_NOEXCEPT noexcept -#endif - -#ifdef NAPI_CPP_EXCEPTIONS - -// When C++ exceptions are enabled, Errors are thrown directly. There is no need -// to return anything after the throw statements. The variadic parameter is an -// optional return value that is ignored. -// We need _VOID versions of the macros to avoid warnings resulting from -// leaving the NAPI_THROW_* `...` argument empty. - -#define NAPI_THROW(e, ...) throw e -#define NAPI_THROW_VOID(e) throw e - -#define NAPI_THROW_IF_FAILED(env, status, ...) \ - if ((status) != napi_ok) throw Napi::Error::New(env); - -#define NAPI_THROW_IF_FAILED_VOID(env, status) \ - if ((status) != napi_ok) throw Napi::Error::New(env); - -#else // NAPI_CPP_EXCEPTIONS - -// When C++ exceptions are disabled, Errors are thrown as JavaScript exceptions, -// which are pending until the callback returns to JS. The variadic parameter -// is an optional return value; usually it is an empty result. -// We need _VOID versions of the macros to avoid warnings resulting from -// leaving the NAPI_THROW_* `...` argument empty. - -#define NAPI_THROW(e, ...) \ - do { \ - (e).ThrowAsJavaScriptException(); \ - return __VA_ARGS__; \ - } while (0) - -#define NAPI_THROW_VOID(e) \ - do { \ - (e).ThrowAsJavaScriptException(); \ - return; \ - } while (0) - -#define NAPI_THROW_IF_FAILED(env, status, ...) \ - if ((status) != napi_ok) { \ - Napi::Error::New(env).ThrowAsJavaScriptException(); \ - return __VA_ARGS__; \ - } - -#define NAPI_THROW_IF_FAILED_VOID(env, status) \ - if ((status) != napi_ok) { \ - Napi::Error::New(env).ThrowAsJavaScriptException(); \ - return; \ - } - -#endif // NAPI_CPP_EXCEPTIONS - -#ifdef NODE_ADDON_API_ENABLE_MAYBE -#define NAPI_MAYBE_THROW_IF_FAILED(env, status, type) \ - NAPI_THROW_IF_FAILED(env, status, Napi::Nothing()) - -#define NAPI_RETURN_OR_THROW_IF_FAILED(env, status, result, type) \ - NAPI_MAYBE_THROW_IF_FAILED(env, status, type); \ - return Napi::Just(result); -#else -#define NAPI_MAYBE_THROW_IF_FAILED(env, status, type) \ - NAPI_THROW_IF_FAILED(env, status, type()) - -#define NAPI_RETURN_OR_THROW_IF_FAILED(env, status, result, type) \ - NAPI_MAYBE_THROW_IF_FAILED(env, status, type); \ - return result; -#endif - -#define NAPI_DISALLOW_ASSIGN(CLASS) void operator=(const CLASS&) = delete; -#define NAPI_DISALLOW_COPY(CLASS) CLASS(const CLASS&) = delete; - -#define NAPI_DISALLOW_ASSIGN_COPY(CLASS) \ - NAPI_DISALLOW_ASSIGN(CLASS) \ - NAPI_DISALLOW_COPY(CLASS) - -#define NAPI_CHECK(condition, location, message) \ - do { \ - if (!(condition)) { \ - Napi::Error::Fatal((location), (message)); \ - } \ - } while (0) - -#define NAPI_FATAL_IF_FAILED(status, location, message) \ - NAPI_CHECK((status) == napi_ok, location, message) - -//////////////////////////////////////////////////////////////////////////////// -/// Node-API C++ Wrapper Classes -/// -/// These classes wrap the "Node-API" ABI-stable C APIs for Node.js, providing a -/// C++ object model and C++ exception-handling semantics with low overhead. -/// The wrappers are all header-only so that they do not affect the ABI. -//////////////////////////////////////////////////////////////////////////////// -namespace Napi { - -#ifdef NAPI_CPP_CUSTOM_NAMESPACE -// NAPI_CPP_CUSTOM_NAMESPACE can be #define'd per-addon to avoid symbol -// conflicts between different instances of node-addon-api - -// First dummy definition of the namespace to make sure that Napi::(name) still -// refers to the right things inside this file. -namespace NAPI_CPP_CUSTOM_NAMESPACE {} -using namespace NAPI_CPP_CUSTOM_NAMESPACE; - -namespace NAPI_CPP_CUSTOM_NAMESPACE { -#endif - -// Forward declarations -class Env; -class Value; -class Boolean; -class Number; -#if NAPI_VERSION > 5 -class BigInt; -#endif // NAPI_VERSION > 5 -#if (NAPI_VERSION > 4) -class Date; -#endif -class String; -class Object; -class Array; -class ArrayBuffer; -class Function; -class Error; -class PropertyDescriptor; -class CallbackInfo; -class TypedArray; -template -class TypedArrayOf; - -using Int8Array = - TypedArrayOf; ///< Typed-array of signed 8-bit integers -using Uint8Array = - TypedArrayOf; ///< Typed-array of unsigned 8-bit integers -using Int16Array = - TypedArrayOf; ///< Typed-array of signed 16-bit integers -using Uint16Array = - TypedArrayOf; ///< Typed-array of unsigned 16-bit integers -using Int32Array = - TypedArrayOf; ///< Typed-array of signed 32-bit integers -using Uint32Array = - TypedArrayOf; ///< Typed-array of unsigned 32-bit integers -using Float32Array = - TypedArrayOf; ///< Typed-array of 32-bit floating-point values -using Float64Array = - TypedArrayOf; ///< Typed-array of 64-bit floating-point values -#if NAPI_VERSION > 5 -using BigInt64Array = - TypedArrayOf; ///< Typed array of signed 64-bit integers -using BigUint64Array = - TypedArrayOf; ///< Typed array of unsigned 64-bit integers -#endif // NAPI_VERSION > 5 - -/// Defines the signature of a Node-API C++ module's registration callback -/// (init) function. -using ModuleRegisterCallback = Object (*)(Env env, Object exports); - -class MemoryManagement; - -/// A simple Maybe type, representing an object which may or may not have a -/// value. -/// -/// If an API method returns a Maybe<>, the API method can potentially fail -/// either because an exception is thrown, or because an exception is pending, -/// e.g. because a previous API call threw an exception that hasn't been -/// caught yet. In that case, a "Nothing" value is returned. -template -class Maybe { - public: - bool IsNothing() const; - bool IsJust() const; - - /// Short-hand for Unwrap(), which doesn't return a value. Could be used - /// where the actual value of the Maybe is not needed like Object::Set. - /// If this Maybe is nothing (empty), node-addon-api will crash the - /// process. - void Check() const; - - /// Return the value of type T contained in the Maybe. If this Maybe is - /// nothing (empty), node-addon-api will crash the process. - T Unwrap() const; - - /// Return the value of type T contained in the Maybe, or using a default - /// value if this Maybe is nothing (empty). - T UnwrapOr(const T& default_value) const; - - /// Converts this Maybe to a value of type T in the out. If this Maybe is - /// nothing (empty), `false` is returned and `out` is left untouched. - bool UnwrapTo(T* out) const; - - bool operator==(const Maybe& other) const; - bool operator!=(const Maybe& other) const; - - private: - Maybe(); - explicit Maybe(const T& t); - - bool _has_value; - T _value; - - template - friend Maybe Nothing(); - template - friend Maybe Just(const U& u); -}; - -template -inline Maybe Nothing(); - -template -inline Maybe Just(const T& t); - -#if defined(NODE_ADDON_API_ENABLE_MAYBE) -template -using MaybeOrValue = Maybe; -#else -template -using MaybeOrValue = T; -#endif - -/// Environment for Node-API values and operations. -/// -/// All Node-API values and operations must be associated with an environment. -/// An environment instance is always provided to callback functions; that -/// environment must then be used for any creation of Node-API values or other -/// Node-API operations within the callback. (Many methods infer the -/// environment from the `this` instance that the method is called on.) -/// -/// In the future, multiple environments per process may be supported, -/// although current implementations only support one environment per process. -/// -/// In the V8 JavaScript engine, a Node-API environment approximately -/// corresponds to an Isolate. -class Env { - private: - napi_env _env; -#if NAPI_VERSION > 5 - template - static void DefaultFini(Env, T* data); - template - static void DefaultFiniWithHint(Env, DataType* data, HintType* hint); -#endif // NAPI_VERSION > 5 - public: - Env(napi_env env); - - operator napi_env() const; - - Object Global() const; - Value Undefined() const; - Value Null() const; - - bool IsExceptionPending() const; - Error GetAndClearPendingException() const; - - MaybeOrValue RunScript(const char* utf8script) const; - MaybeOrValue RunScript(const std::string& utf8script) const; - MaybeOrValue RunScript(String script) const; - -#if NAPI_VERSION > 2 - template - class CleanupHook; - - template - CleanupHook AddCleanupHook(Hook hook); - - template - CleanupHook AddCleanupHook(Hook hook, Arg* arg); -#endif // NAPI_VERSION > 2 - -#if NAPI_VERSION > 5 - template - T* GetInstanceData() const; - - template - using Finalizer = void (*)(Env, T*); - template fini = Env::DefaultFini> - void SetInstanceData(T* data) const; - - template - using FinalizerWithHint = void (*)(Env, DataType*, HintType*); - template fini = - Env::DefaultFiniWithHint> - void SetInstanceData(DataType* data, HintType* hint) const; -#endif // NAPI_VERSION > 5 - -#if NAPI_VERSION > 2 - template - class CleanupHook { - public: - CleanupHook(); - CleanupHook(Env env, Hook hook, Arg* arg); - CleanupHook(Env env, Hook hook); - bool Remove(Env env); - bool IsEmpty() const; - - private: - static inline void Wrapper(void* data) NAPI_NOEXCEPT; - static inline void WrapperWithArg(void* data) NAPI_NOEXCEPT; - - void (*wrapper)(void* arg); - struct CleanupData { - Hook hook; - Arg* arg; - } * data; - }; -#endif // NAPI_VERSION > 2 - -#if NAPI_VERSION > 8 - const char* GetModuleFileName() const; -#endif // NAPI_VERSION > 8 -}; - -/// A JavaScript value of unknown type. -/// -/// For type-specific operations, convert to one of the Value subclasses using a -/// `To*` or `As()` method. The `To*` methods do type coercion; the `As()` -/// method does not. -/// -/// Napi::Value value = ... -/// if (!value.IsString()) throw Napi::TypeError::New(env, "Invalid -/// arg..."); Napi::String str = value.As(); // Cast to a -/// string value -/// -/// Napi::Value anotherValue = ... -/// bool isTruthy = anotherValue.ToBoolean(); // Coerce to a boolean value -class Value { - public: - Value(); ///< Creates a new _empty_ Value instance. - Value(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - /// Creates a JS value from a C++ primitive. - /// - /// `value` may be any of: - /// - bool - /// - Any integer type - /// - Any floating point type - /// - const char* (encoded using UTF-8, null-terminated) - /// - const char16_t* (encoded using UTF-16-LE, null-terminated) - /// - std::string (encoded using UTF-8) - /// - std::u16string - /// - napi::Value - /// - napi_value - template - static Value From(napi_env env, const T& value); - - /// Converts to a Node-API value primitive. - /// - /// If the instance is _empty_, this returns `nullptr`. - operator napi_value() const; - - /// Tests if this value strictly equals another value. - bool operator==(const Value& other) const; - - /// Tests if this value does not strictly equal another value. - bool operator!=(const Value& other) const; - - /// Tests if this value strictly equals another value. - bool StrictEquals(const Value& other) const; - - /// Gets the environment the value is associated with. - Napi::Env Env() const; - - /// Checks if the value is empty (uninitialized). - /// - /// An empty value is invalid, and most attempts to perform an operation on an - /// empty value will result in an exception. Note an empty value is distinct - /// from JavaScript `null` or `undefined`, which are valid values. - /// - /// When C++ exceptions are disabled at compile time, a method with a `Value` - /// return type may return an empty value to indicate a pending exception. So - /// when not using C++ exceptions, callers should check whether the value is - /// empty before attempting to use it. - bool IsEmpty() const; - - napi_valuetype Type() const; ///< Gets the type of the value. - - bool IsUndefined() - const; ///< Tests if a value is an undefined JavaScript value. - bool IsNull() const; ///< Tests if a value is a null JavaScript value. - bool IsBoolean() const; ///< Tests if a value is a JavaScript boolean. - bool IsNumber() const; ///< Tests if a value is a JavaScript number. -#if NAPI_VERSION > 5 - bool IsBigInt() const; ///< Tests if a value is a JavaScript bigint. -#endif // NAPI_VERSION > 5 -#if (NAPI_VERSION > 4) - bool IsDate() const; ///< Tests if a value is a JavaScript date. -#endif - bool IsString() const; ///< Tests if a value is a JavaScript string. - bool IsSymbol() const; ///< Tests if a value is a JavaScript symbol. - bool IsArray() const; ///< Tests if a value is a JavaScript array. - bool IsArrayBuffer() - const; ///< Tests if a value is a JavaScript array buffer. - bool IsTypedArray() const; ///< Tests if a value is a JavaScript typed array. - bool IsObject() const; ///< Tests if a value is a JavaScript object. - bool IsFunction() const; ///< Tests if a value is a JavaScript function. - bool IsPromise() const; ///< Tests if a value is a JavaScript promise. - bool IsDataView() const; ///< Tests if a value is a JavaScript data view. - bool IsBuffer() const; ///< Tests if a value is a Node buffer. - bool IsExternal() const; ///< Tests if a value is a pointer to external data. - - /// Casts to another type of `Napi::Value`, when the actual type is known or - /// assumed. - /// - /// This conversion does NOT coerce the type. Calling any methods - /// inappropriate for the actual value type will throw `Napi::Error`. - /// - /// If `NODE_ADDON_API_ENABLE_TYPE_CHECK_ON_AS` is defined, this method - /// asserts that the actual type is the expected type. - template - T As() const; - - MaybeOrValue ToBoolean() - const; ///< Coerces a value to a JavaScript boolean. - MaybeOrValue ToNumber() - const; ///< Coerces a value to a JavaScript number. - MaybeOrValue ToString() - const; ///< Coerces a value to a JavaScript string. - MaybeOrValue ToObject() - const; ///< Coerces a value to a JavaScript object. - - protected: - /// !cond INTERNAL - napi_env _env; - napi_value _value; - /// !endcond -}; - -/// A JavaScript boolean value. -class Boolean : public Value { - public: - static Boolean New(napi_env env, ///< Node-API environment - bool value ///< Boolean value - ); - - static void CheckCast(napi_env env, napi_value value); - - Boolean(); ///< Creates a new _empty_ Boolean instance. - Boolean(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - operator bool() const; ///< Converts a Boolean value to a boolean primitive. - bool Value() const; ///< Converts a Boolean value to a boolean primitive. -}; - -/// A JavaScript number value. -class Number : public Value { - public: - static Number New(napi_env env, ///< Node-API environment - double value ///< Number value - ); - - static void CheckCast(napi_env env, napi_value value); - - Number(); ///< Creates a new _empty_ Number instance. - Number(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - operator int32_t() - const; ///< Converts a Number value to a 32-bit signed integer value. - operator uint32_t() - const; ///< Converts a Number value to a 32-bit unsigned integer value. - operator int64_t() - const; ///< Converts a Number value to a 64-bit signed integer value. - operator float() - const; ///< Converts a Number value to a 32-bit floating-point value. - operator double() - const; ///< Converts a Number value to a 64-bit floating-point value. - - int32_t Int32Value() - const; ///< Converts a Number value to a 32-bit signed integer value. - uint32_t Uint32Value() - const; ///< Converts a Number value to a 32-bit unsigned integer value. - int64_t Int64Value() - const; ///< Converts a Number value to a 64-bit signed integer value. - float FloatValue() - const; ///< Converts a Number value to a 32-bit floating-point value. - double DoubleValue() - const; ///< Converts a Number value to a 64-bit floating-point value. -}; - -#if NAPI_VERSION > 5 -/// A JavaScript bigint value. -class BigInt : public Value { - public: - static BigInt New(napi_env env, ///< Node-API environment - int64_t value ///< Number value - ); - static BigInt New(napi_env env, ///< Node-API environment - uint64_t value ///< Number value - ); - - /// Creates a new BigInt object using a specified sign bit and a - /// specified list of digits/words. - /// The resulting number is calculated as: - /// (-1)^sign_bit * (words[0] * (2^64)^0 + words[1] * (2^64)^1 + ...) - static BigInt New(napi_env env, ///< Node-API environment - int sign_bit, ///< Sign bit. 1 if negative. - size_t word_count, ///< Number of words in array - const uint64_t* words ///< Array of words - ); - - static void CheckCast(napi_env env, napi_value value); - - BigInt(); ///< Creates a new _empty_ BigInt instance. - BigInt(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - int64_t Int64Value(bool* lossless) - const; ///< Converts a BigInt value to a 64-bit signed integer value. - uint64_t Uint64Value(bool* lossless) - const; ///< Converts a BigInt value to a 64-bit unsigned integer value. - - size_t WordCount() const; ///< The number of 64-bit words needed to store - ///< the result of ToWords(). - - /// Writes the contents of this BigInt to a specified memory location. - /// `sign_bit` must be provided and will be set to 1 if this BigInt is - /// negative. - /// `*word_count` has to be initialized to the length of the `words` array. - /// Upon return, it will be set to the actual number of words that would - /// be needed to store this BigInt (i.e. the return value of `WordCount()`). - void ToWords(int* sign_bit, size_t* word_count, uint64_t* words); -}; -#endif // NAPI_VERSION > 5 - -#if (NAPI_VERSION > 4) -/// A JavaScript date value. -class Date : public Value { - public: - /// Creates a new Date value from a double primitive. - static Date New(napi_env env, ///< Node-API environment - double value ///< Number value - ); - - static void CheckCast(napi_env env, napi_value value); - - Date(); ///< Creates a new _empty_ Date instance. - Date(napi_env env, napi_value value); ///< Wraps a Node-API value primitive. - operator double() const; ///< Converts a Date value to double primitive - - double ValueOf() const; ///< Converts a Date value to a double primitive. -}; -#endif - -/// A JavaScript string or symbol value (that can be used as a property name). -class Name : public Value { - public: - static void CheckCast(napi_env env, napi_value value); - - Name(); ///< Creates a new _empty_ Name instance. - Name(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. -}; - -/// A JavaScript string value. -class String : public Name { - public: - /// Creates a new String value from a UTF-8 encoded C++ string. - static String New(napi_env env, ///< Node-API environment - const std::string& value ///< UTF-8 encoded C++ string - ); - - /// Creates a new String value from a UTF-16 encoded C++ string. - static String New(napi_env env, ///< Node-API environment - const std::u16string& value ///< UTF-16 encoded C++ string - ); - - /// Creates a new String value from a UTF-8 encoded C string. - static String New( - napi_env env, ///< Node-API environment - const char* value ///< UTF-8 encoded null-terminated C string - ); - - /// Creates a new String value from a UTF-16 encoded C string. - static String New( - napi_env env, ///< Node-API environment - const char16_t* value ///< UTF-16 encoded null-terminated C string - ); - - /// Creates a new String value from a UTF-8 encoded C string with specified - /// length. - static String New(napi_env env, ///< Node-API environment - const char* value, ///< UTF-8 encoded C string (not - ///< necessarily null-terminated) - size_t length ///< length of the string in bytes - ); - - /// Creates a new String value from a UTF-16 encoded C string with specified - /// length. - static String New( - napi_env env, ///< Node-API environment - const char16_t* value, ///< UTF-16 encoded C string (not necessarily - ///< null-terminated) - size_t length ///< Length of the string in 2-byte code units - ); - - /// Creates a new String based on the original object's type. - /// - /// `value` may be any of: - /// - const char* (encoded using UTF-8, null-terminated) - /// - const char16_t* (encoded using UTF-16-LE, null-terminated) - /// - std::string (encoded using UTF-8) - /// - std::u16string - template - static String From(napi_env env, const T& value); - - static void CheckCast(napi_env env, napi_value value); - - String(); ///< Creates a new _empty_ String instance. - String(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - operator std::string() - const; ///< Converts a String value to a UTF-8 encoded C++ string. - operator std::u16string() - const; ///< Converts a String value to a UTF-16 encoded C++ string. - std::string Utf8Value() - const; ///< Converts a String value to a UTF-8 encoded C++ string. - std::u16string Utf16Value() - const; ///< Converts a String value to a UTF-16 encoded C++ string. -}; - -/// A JavaScript symbol value. -class Symbol : public Name { - public: - /// Creates a new Symbol value with an optional description. - static Symbol New( - napi_env env, ///< Node-API environment - const char* description = - nullptr ///< Optional UTF-8 encoded null-terminated C string - /// describing the symbol - ); - - /// Creates a new Symbol value with a description. - static Symbol New( - napi_env env, ///< Node-API environment - const std::string& - description ///< UTF-8 encoded C++ string describing the symbol - ); - - /// Creates a new Symbol value with a description. - static Symbol New(napi_env env, ///< Node-API environment - String description ///< String value describing the symbol - ); - - /// Creates a new Symbol value with a description. - static Symbol New( - napi_env env, ///< Node-API environment - napi_value description ///< String value describing the symbol - ); - - /// Get a public Symbol (e.g. Symbol.iterator). - static MaybeOrValue WellKnown(napi_env, const std::string& name); - - // Create a symbol in the global registry, UTF-8 Encoded cpp string - static MaybeOrValue For(napi_env env, const std::string& description); - - // Create a symbol in the global registry, C style string (null terminated) - static MaybeOrValue For(napi_env env, const char* description); - - // Create a symbol in the global registry, String value describing the symbol - static MaybeOrValue For(napi_env env, String description); - - // Create a symbol in the global registry, napi_value describing the symbol - static MaybeOrValue For(napi_env env, napi_value description); - - static void CheckCast(napi_env env, napi_value value); - - Symbol(); ///< Creates a new _empty_ Symbol instance. - Symbol(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. -}; - -class TypeTaggable : public Value { - public: -#if NAPI_VERSION >= 8 - void TypeTag(const napi_type_tag* type_tag) const; - bool CheckTypeTag(const napi_type_tag* type_tag) const; -#endif // NAPI_VERSION >= 8 - protected: - TypeTaggable(); - TypeTaggable(napi_env env, napi_value value); -}; - -/// A JavaScript object value. -class Object : public TypeTaggable { - public: - /// Enables property and element assignments using indexing syntax. - /// - /// This is a convenient helper to get and set object properties. As - /// getting and setting object properties may throw with JavaScript - /// exceptions, it is notable that these operations may fail. - /// When NODE_ADDON_API_ENABLE_MAYBE is defined, the process will abort - /// on JavaScript exceptions. - /// - /// Example: - /// - /// Napi::Value propertyValue = object1['A']; - /// object2['A'] = propertyValue; - /// Napi::Value elementValue = array[0]; - /// array[1] = elementValue; - template - class PropertyLValue { - public: - /// Converts an L-value to a value. - operator Value() const; - - /// Assigns a value to the property. The type of value can be - /// anything supported by `Object::Set`. - template - PropertyLValue& operator=(ValueType value); - - private: - PropertyLValue() = delete; - PropertyLValue(Object object, Key key); - napi_env _env; - napi_value _object; - Key _key; - - friend class Napi::Object; - }; - - /// Creates a new Object value. - static Object New(napi_env env ///< Node-API environment - ); - - static void CheckCast(napi_env env, napi_value value); - - Object(); ///< Creates a new _empty_ Object instance. - Object(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - /// Gets or sets a named property. - PropertyLValue operator[]( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ); - - /// Gets or sets a named property. - PropertyLValue operator[]( - const std::string& utf8name ///< UTF-8 encoded property name - ); - - /// Gets or sets an indexed property or array element. - PropertyLValue operator[]( - uint32_t index /// Property / element index - ); - - /// Gets or sets an indexed property or array element. - PropertyLValue operator[](Value index /// Property / element index - ) const; - - /// Gets a named property. - MaybeOrValue operator[]( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ) const; - - /// Gets a named property. - MaybeOrValue operator[]( - const std::string& utf8name ///< UTF-8 encoded property name - ) const; - - /// Gets an indexed property or array element. - MaybeOrValue operator[](uint32_t index ///< Property / element index - ) const; - - /// Checks whether a property is present. - MaybeOrValue Has(napi_value key ///< Property key primitive - ) const; - - /// Checks whether a property is present. - MaybeOrValue Has(Value key ///< Property key - ) const; - - /// Checks whether a named property is present. - MaybeOrValue Has( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ) const; - - /// Checks whether a named property is present. - MaybeOrValue Has( - const std::string& utf8name ///< UTF-8 encoded property name - ) const; - - /// Checks whether a own property is present. - MaybeOrValue HasOwnProperty(napi_value key ///< Property key primitive - ) const; - - /// Checks whether a own property is present. - MaybeOrValue HasOwnProperty(Value key ///< Property key - ) const; - - /// Checks whether a own property is present. - MaybeOrValue HasOwnProperty( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ) const; - - /// Checks whether a own property is present. - MaybeOrValue HasOwnProperty( - const std::string& utf8name ///< UTF-8 encoded property name - ) const; - - /// Gets a property. - MaybeOrValue Get(napi_value key ///< Property key primitive - ) const; - - /// Gets a property. - MaybeOrValue Get(Value key ///< Property key - ) const; - - /// Gets a named property. - MaybeOrValue Get( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ) const; - - /// Gets a named property. - MaybeOrValue Get( - const std::string& utf8name ///< UTF-8 encoded property name - ) const; - - /// Sets a property. - template - MaybeOrValue Set(napi_value key, ///< Property key primitive - const ValueType& value ///< Property value primitive - ) const; - - /// Sets a property. - template - MaybeOrValue Set(Value key, ///< Property key - const ValueType& value ///< Property value - ) const; - - /// Sets a named property. - template - MaybeOrValue Set( - const char* utf8name, ///< UTF-8 encoded null-terminated property name - const ValueType& value) const; - - /// Sets a named property. - template - MaybeOrValue Set( - const std::string& utf8name, ///< UTF-8 encoded property name - const ValueType& value ///< Property value primitive - ) const; - - /// Delete property. - MaybeOrValue Delete(napi_value key ///< Property key primitive - ) const; - - /// Delete property. - MaybeOrValue Delete(Value key ///< Property key - ) const; - - /// Delete property. - MaybeOrValue Delete( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ) const; - - /// Delete property. - MaybeOrValue Delete( - const std::string& utf8name ///< UTF-8 encoded property name - ) const; - - /// Checks whether an indexed property is present. - MaybeOrValue Has(uint32_t index ///< Property / element index - ) const; - - /// Gets an indexed property or array element. - MaybeOrValue Get(uint32_t index ///< Property / element index - ) const; - - /// Sets an indexed property or array element. - template - MaybeOrValue Set(uint32_t index, ///< Property / element index - const ValueType& value ///< Property value primitive - ) const; - - /// Deletes an indexed property or array element. - MaybeOrValue Delete(uint32_t index ///< Property / element index - ) const; - - /// This operation can fail in case of Proxy.[[OwnPropertyKeys]] and - /// Proxy.[[GetOwnProperty]] calling into JavaScript. See: - /// - - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys - /// - - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getownproperty-p - MaybeOrValue GetPropertyNames() const; ///< Get all property names - - /// Defines a property on the object. - /// - /// This operation can fail in case of Proxy.[[DefineOwnProperty]] calling - /// into JavaScript. See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc - MaybeOrValue DefineProperty( - const PropertyDescriptor& - property ///< Descriptor for the property to be defined - ) const; - - /// Defines properties on the object. - /// - /// This operation can fail in case of Proxy.[[DefineOwnProperty]] calling - /// into JavaScript. See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc - MaybeOrValue DefineProperties( - const std::initializer_list& properties - ///< List of descriptors for the properties to be defined - ) const; - - /// Defines properties on the object. - /// - /// This operation can fail in case of Proxy.[[DefineOwnProperty]] calling - /// into JavaScript. See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc - MaybeOrValue DefineProperties( - const std::vector& properties - ///< Vector of descriptors for the properties to be defined - ) const; - - /// Checks if an object is an instance created by a constructor function. - /// - /// This is equivalent to the JavaScript `instanceof` operator. - /// - /// This operation can fail in case of Proxy.[[GetPrototypeOf]] calling into - /// JavaScript. - /// See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof - MaybeOrValue InstanceOf( - const Function& constructor ///< Constructor function - ) const; - - template - inline void AddFinalizer(Finalizer finalizeCallback, T* data) const; - - template - inline void AddFinalizer(Finalizer finalizeCallback, - T* data, - Hint* finalizeHint) const; - -#ifdef NAPI_CPP_EXCEPTIONS - class const_iterator; - - inline const_iterator begin() const; - - inline const_iterator end() const; - - class iterator; - - inline iterator begin(); - - inline iterator end(); -#endif // NAPI_CPP_EXCEPTIONS - -#if NAPI_VERSION >= 8 - /// This operation can fail in case of Proxy.[[GetPrototypeOf]] calling into - /// JavaScript. - /// See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof - MaybeOrValue Freeze() const; - /// This operation can fail in case of Proxy.[[GetPrototypeOf]] calling into - /// JavaScript. - /// See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof - MaybeOrValue Seal() const; -#endif // NAPI_VERSION >= 8 -}; - -template -class External : public TypeTaggable { - public: - static External New(napi_env env, T* data); - - // Finalizer must implement `void operator()(Env env, T* data)`. - template - static External New(napi_env env, T* data, Finalizer finalizeCallback); - // Finalizer must implement `void operator()(Env env, T* data, Hint* hint)`. - template - static External New(napi_env env, - T* data, - Finalizer finalizeCallback, - Hint* finalizeHint); - - static void CheckCast(napi_env env, napi_value value); - - External(); - External(napi_env env, napi_value value); - - T* Data() const; -}; - -class Array : public Object { - public: - static Array New(napi_env env); - static Array New(napi_env env, size_t length); - - static void CheckCast(napi_env env, napi_value value); - - Array(); - Array(napi_env env, napi_value value); - - uint32_t Length() const; -}; - -#ifdef NAPI_CPP_EXCEPTIONS -class Object::const_iterator { - private: - enum class Type { BEGIN, END }; - - inline const_iterator(const Object* object, const Type type); - - public: - inline const_iterator& operator++(); - - inline bool operator==(const const_iterator& other) const; - - inline bool operator!=(const const_iterator& other) const; - - inline const std::pair> operator*() - const; - - private: - const Napi::Object* _object; - Array _keys; - uint32_t _index; - - friend class Object; -}; - -class Object::iterator { - private: - enum class Type { BEGIN, END }; - - inline iterator(Object* object, const Type type); - - public: - inline iterator& operator++(); - - inline bool operator==(const iterator& other) const; - - inline bool operator!=(const iterator& other) const; - - inline std::pair> operator*(); - - private: - Napi::Object* _object; - Array _keys; - uint32_t _index; - - friend class Object; -}; -#endif // NAPI_CPP_EXCEPTIONS - -/// A JavaScript array buffer value. -class ArrayBuffer : public Object { - public: - /// Creates a new ArrayBuffer instance over a new automatically-allocated - /// buffer. - static ArrayBuffer New( - napi_env env, ///< Node-API environment - size_t byteLength ///< Length of the buffer to be allocated, in bytes - ); - -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - /// Creates a new ArrayBuffer instance, using an external buffer with - /// specified byte length. - static ArrayBuffer New( - napi_env env, ///< Node-API environment - void* externalData, ///< Pointer to the external buffer to be used by - ///< the array - size_t byteLength ///< Length of the external buffer to be used by the - ///< array, in bytes - ); - - /// Creates a new ArrayBuffer instance, using an external buffer with - /// specified byte length. - template - static ArrayBuffer New( - napi_env env, ///< Node-API environment - void* externalData, ///< Pointer to the external buffer to be used by - ///< the array - size_t byteLength, ///< Length of the external buffer to be used by the - ///< array, - /// in bytes - Finalizer finalizeCallback ///< Function to be called when the array - ///< buffer is destroyed; - /// must implement `void operator()(Env env, - /// void* externalData)` - ); - - /// Creates a new ArrayBuffer instance, using an external buffer with - /// specified byte length. - template - static ArrayBuffer New( - napi_env env, ///< Node-API environment - void* externalData, ///< Pointer to the external buffer to be used by - ///< the array - size_t byteLength, ///< Length of the external buffer to be used by the - ///< array, - /// in bytes - Finalizer finalizeCallback, ///< Function to be called when the array - ///< buffer is destroyed; - /// must implement `void operator()(Env - /// env, void* externalData, Hint* hint)` - Hint* finalizeHint ///< Hint (second parameter) to be passed to the - ///< finalize callback - ); -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - - static void CheckCast(napi_env env, napi_value value); - - ArrayBuffer(); ///< Creates a new _empty_ ArrayBuffer instance. - ArrayBuffer(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - void* Data(); ///< Gets a pointer to the data buffer. - size_t ByteLength(); ///< Gets the length of the array buffer in bytes. - -#if NAPI_VERSION >= 7 - bool IsDetached() const; - void Detach(); -#endif // NAPI_VERSION >= 7 -}; - -/// A JavaScript typed-array value with unknown array type. -/// -/// For type-specific operations, cast to a `TypedArrayOf` instance using the -/// `As()` method: -/// -/// Napi::TypedArray array = ... -/// if (t.TypedArrayType() == napi_int32_array) { -/// Napi::Int32Array int32Array = t.As(); -/// } -class TypedArray : public Object { - public: - static void CheckCast(napi_env env, napi_value value); - - TypedArray(); ///< Creates a new _empty_ TypedArray instance. - TypedArray(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - napi_typedarray_type TypedArrayType() - const; ///< Gets the type of this typed-array. - Napi::ArrayBuffer ArrayBuffer() const; ///< Gets the backing array buffer. - - uint8_t ElementSize() - const; ///< Gets the size in bytes of one element in the array. - size_t ElementLength() const; ///< Gets the number of elements in the array. - size_t ByteOffset() - const; ///< Gets the offset into the buffer where the array starts. - size_t ByteLength() const; ///< Gets the length of the array in bytes. - - protected: - /// !cond INTERNAL - napi_typedarray_type _type; - size_t _length; - - TypedArray(napi_env env, - napi_value value, - napi_typedarray_type type, - size_t length); - - template - static -#if defined(NAPI_HAS_CONSTEXPR) - constexpr -#endif - napi_typedarray_type - TypedArrayTypeForPrimitiveType() { - return std::is_same::value ? napi_int8_array - : std::is_same::value ? napi_uint8_array - : std::is_same::value ? napi_int16_array - : std::is_same::value ? napi_uint16_array - : std::is_same::value ? napi_int32_array - : std::is_same::value ? napi_uint32_array - : std::is_same::value ? napi_float32_array - : std::is_same::value ? napi_float64_array -#if NAPI_VERSION > 5 - : std::is_same::value ? napi_bigint64_array - : std::is_same::value ? napi_biguint64_array -#endif // NAPI_VERSION > 5 - : napi_int8_array; - } - /// !endcond -}; - -/// A JavaScript typed-array value with known array type. -/// -/// Note while it is possible to create and access Uint8 "clamped" arrays using -/// this class, the _clamping_ behavior is only applied in JavaScript. -template -class TypedArrayOf : public TypedArray { - public: - /// Creates a new TypedArray instance over a new automatically-allocated array - /// buffer. - /// - /// The array type parameter can normally be omitted (because it is inferred - /// from the template parameter T), except when creating a "clamped" array: - /// - /// Uint8Array::New(env, length, napi_uint8_clamped_array) - static TypedArrayOf New( - napi_env env, ///< Node-API environment - size_t elementLength, ///< Length of the created array, as a number of - ///< elements -#if defined(NAPI_HAS_CONSTEXPR) - napi_typedarray_type type = - TypedArray::TypedArrayTypeForPrimitiveType() -#else - napi_typedarray_type type -#endif - ///< Type of array, if different from the default array type for the - ///< template parameter T. - ); - - /// Creates a new TypedArray instance over a provided array buffer. - /// - /// The array type parameter can normally be omitted (because it is inferred - /// from the template parameter T), except when creating a "clamped" array: - /// - /// Uint8Array::New(env, length, buffer, 0, napi_uint8_clamped_array) - static TypedArrayOf New( - napi_env env, ///< Node-API environment - size_t elementLength, ///< Length of the created array, as a number of - ///< elements - Napi::ArrayBuffer arrayBuffer, ///< Backing array buffer instance to use - size_t bufferOffset, ///< Offset into the array buffer where the - ///< typed-array starts -#if defined(NAPI_HAS_CONSTEXPR) - napi_typedarray_type type = - TypedArray::TypedArrayTypeForPrimitiveType() -#else - napi_typedarray_type type -#endif - ///< Type of array, if different from the default array type for the - ///< template parameter T. - ); - - static void CheckCast(napi_env env, napi_value value); - - TypedArrayOf(); ///< Creates a new _empty_ TypedArrayOf instance. - TypedArrayOf(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - T& operator[](size_t index); ///< Gets or sets an element in the array. - const T& operator[](size_t index) const; ///< Gets an element in the array. - - /// Gets a pointer to the array's backing buffer. - /// - /// This is not necessarily the same as the `ArrayBuffer::Data()` pointer, - /// because the typed-array may have a non-zero `ByteOffset()` into the - /// `ArrayBuffer`. - T* Data(); - - /// Gets a pointer to the array's backing buffer. - /// - /// This is not necessarily the same as the `ArrayBuffer::Data()` pointer, - /// because the typed-array may have a non-zero `ByteOffset()` into the - /// `ArrayBuffer`. - const T* Data() const; - - private: - T* _data; - - TypedArrayOf(napi_env env, - napi_value value, - napi_typedarray_type type, - size_t length, - T* data); -}; - -/// The DataView provides a low-level interface for reading/writing multiple -/// number types in an ArrayBuffer irrespective of the platform's endianness. -class DataView : public Object { - public: - static DataView New(napi_env env, Napi::ArrayBuffer arrayBuffer); - static DataView New(napi_env env, - Napi::ArrayBuffer arrayBuffer, - size_t byteOffset); - static DataView New(napi_env env, - Napi::ArrayBuffer arrayBuffer, - size_t byteOffset, - size_t byteLength); - - static void CheckCast(napi_env env, napi_value value); - - DataView(); ///< Creates a new _empty_ DataView instance. - DataView(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - Napi::ArrayBuffer ArrayBuffer() const; ///< Gets the backing array buffer. - size_t ByteOffset() - const; ///< Gets the offset into the buffer where the array starts. - size_t ByteLength() const; ///< Gets the length of the array in bytes. - - void* Data() const; - - float GetFloat32(size_t byteOffset) const; - double GetFloat64(size_t byteOffset) const; - int8_t GetInt8(size_t byteOffset) const; - int16_t GetInt16(size_t byteOffset) const; - int32_t GetInt32(size_t byteOffset) const; - uint8_t GetUint8(size_t byteOffset) const; - uint16_t GetUint16(size_t byteOffset) const; - uint32_t GetUint32(size_t byteOffset) const; - - void SetFloat32(size_t byteOffset, float value) const; - void SetFloat64(size_t byteOffset, double value) const; - void SetInt8(size_t byteOffset, int8_t value) const; - void SetInt16(size_t byteOffset, int16_t value) const; - void SetInt32(size_t byteOffset, int32_t value) const; - void SetUint8(size_t byteOffset, uint8_t value) const; - void SetUint16(size_t byteOffset, uint16_t value) const; - void SetUint32(size_t byteOffset, uint32_t value) const; - - private: - template - T ReadData(size_t byteOffset) const; - - template - void WriteData(size_t byteOffset, T value) const; - - void* _data; - size_t _length; -}; - -class Function : public Object { - public: - using VoidCallback = void (*)(const CallbackInfo& info); - using Callback = Value (*)(const CallbackInfo& info); - - template - static Function New(napi_env env, - const char* utf8name = nullptr, - void* data = nullptr); - - template - static Function New(napi_env env, - const char* utf8name = nullptr, - void* data = nullptr); - - template - static Function New(napi_env env, - const std::string& utf8name, - void* data = nullptr); - - template - static Function New(napi_env env, - const std::string& utf8name, - void* data = nullptr); - - /// Callable must implement operator() accepting a const CallbackInfo& - /// and return either void or Value. - template - static Function New(napi_env env, - Callable cb, - const char* utf8name = nullptr, - void* data = nullptr); - /// Callable must implement operator() accepting a const CallbackInfo& - /// and return either void or Value. - template - static Function New(napi_env env, - Callable cb, - const std::string& utf8name, - void* data = nullptr); - - static void CheckCast(napi_env env, napi_value value); - - Function(); - Function(napi_env env, napi_value value); - - MaybeOrValue operator()( - const std::initializer_list& args) const; - - MaybeOrValue Call(const std::initializer_list& args) const; - MaybeOrValue Call(const std::vector& args) const; - MaybeOrValue Call(const std::vector& args) const; - MaybeOrValue Call(size_t argc, const napi_value* args) const; - MaybeOrValue Call(napi_value recv, - const std::initializer_list& args) const; - MaybeOrValue Call(napi_value recv, - const std::vector& args) const; - MaybeOrValue Call(napi_value recv, - const std::vector& args) const; - MaybeOrValue Call(napi_value recv, - size_t argc, - const napi_value* args) const; - - MaybeOrValue MakeCallback( - napi_value recv, - const std::initializer_list& args, - napi_async_context context = nullptr) const; - MaybeOrValue MakeCallback(napi_value recv, - const std::vector& args, - napi_async_context context = nullptr) const; - MaybeOrValue MakeCallback(napi_value recv, - size_t argc, - const napi_value* args, - napi_async_context context = nullptr) const; - - MaybeOrValue New(const std::initializer_list& args) const; - MaybeOrValue New(const std::vector& args) const; - MaybeOrValue New(size_t argc, const napi_value* args) const; -}; - -class Promise : public Object { - public: - class Deferred { - public: - static Deferred New(napi_env env); - Deferred(napi_env env); - - Napi::Promise Promise() const; - Napi::Env Env() const; - - void Resolve(napi_value value) const; - void Reject(napi_value value) const; - - private: - napi_env _env; - napi_deferred _deferred; - napi_value _promise; - }; - - static void CheckCast(napi_env env, napi_value value); - - Promise(napi_env env, napi_value value); -}; - -template -class Buffer : public Uint8Array { - public: - static Buffer New(napi_env env, size_t length); -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - static Buffer New(napi_env env, T* data, size_t length); - - // Finalizer must implement `void operator()(Env env, T* data)`. - template - static Buffer New(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback); - // Finalizer must implement `void operator()(Env env, T* data, Hint* hint)`. - template - static Buffer New(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback, - Hint* finalizeHint); -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - - static Buffer NewOrCopy(napi_env env, T* data, size_t length); - // Finalizer must implement `void operator()(Env env, T* data)`. - template - static Buffer NewOrCopy(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback); - // Finalizer must implement `void operator()(Env env, T* data, Hint* hint)`. - template - static Buffer NewOrCopy(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback, - Hint* finalizeHint); - - static Buffer Copy(napi_env env, const T* data, size_t length); - - static void CheckCast(napi_env env, napi_value value); - - Buffer(); - Buffer(napi_env env, napi_value value); - size_t Length() const; - T* Data() const; - - private: -}; - -/// Holds a counted reference to a value; initially a weak reference unless -/// otherwise specified, may be changed to/from a strong reference by adjusting -/// the refcount. -/// -/// The referenced value is not immediately destroyed when the reference count -/// is zero; it is merely then eligible for garbage-collection if there are no -/// other references to the value. -template -class Reference { - public: - static Reference New(const T& value, uint32_t initialRefcount = 0); - - Reference(); - Reference(napi_env env, napi_ref ref); - ~Reference(); - - // A reference can be moved but cannot be copied. - Reference(Reference&& other); - Reference& operator=(Reference&& other); - NAPI_DISALLOW_ASSIGN(Reference) - - operator napi_ref() const; - bool operator==(const Reference& other) const; - bool operator!=(const Reference& other) const; - - Napi::Env Env() const; - bool IsEmpty() const; - - // Note when getting the value of a Reference it is usually correct to do so - // within a HandleScope so that the value handle gets cleaned up efficiently. - T Value() const; - - uint32_t Ref() const; - uint32_t Unref() const; - void Reset(); - void Reset(const T& value, uint32_t refcount = 0); - - // Call this on a reference that is declared as static data, to prevent its - // destructor from running at program shutdown time, which would attempt to - // reset the reference when the environment is no longer valid. Avoid using - // this if at all possible. If you do need to use static data, MAKE SURE to - // warn your users that your addon is NOT threadsafe. - void SuppressDestruct(); - - protected: - Reference(const Reference&); - - /// !cond INTERNAL - napi_env _env; - napi_ref _ref; - /// !endcond - - private: - bool _suppressDestruct; -}; - -class ObjectReference : public Reference { - public: - ObjectReference(); - ObjectReference(napi_env env, napi_ref ref); - - // A reference can be moved but cannot be copied. - ObjectReference(Reference&& other); - ObjectReference& operator=(Reference&& other); - ObjectReference(ObjectReference&& other); - ObjectReference& operator=(ObjectReference&& other); - NAPI_DISALLOW_ASSIGN(ObjectReference) - - MaybeOrValue Get(const char* utf8name) const; - MaybeOrValue Get(const std::string& utf8name) const; - MaybeOrValue Set(const char* utf8name, napi_value value) const; - MaybeOrValue Set(const char* utf8name, Napi::Value value) const; - MaybeOrValue Set(const char* utf8name, const char* utf8value) const; - MaybeOrValue Set(const char* utf8name, bool boolValue) const; - MaybeOrValue Set(const char* utf8name, double numberValue) const; - MaybeOrValue Set(const std::string& utf8name, napi_value value) const; - MaybeOrValue Set(const std::string& utf8name, Napi::Value value) const; - MaybeOrValue Set(const std::string& utf8name, - std::string& utf8value) const; - MaybeOrValue Set(const std::string& utf8name, bool boolValue) const; - MaybeOrValue Set(const std::string& utf8name, double numberValue) const; - - MaybeOrValue Get(uint32_t index) const; - MaybeOrValue Set(uint32_t index, const napi_value value) const; - MaybeOrValue Set(uint32_t index, const Napi::Value value) const; - MaybeOrValue Set(uint32_t index, const char* utf8value) const; - MaybeOrValue Set(uint32_t index, const std::string& utf8value) const; - MaybeOrValue Set(uint32_t index, bool boolValue) const; - MaybeOrValue Set(uint32_t index, double numberValue) const; - - protected: - ObjectReference(const ObjectReference&); -}; - -class FunctionReference : public Reference { - public: - FunctionReference(); - FunctionReference(napi_env env, napi_ref ref); - - // A reference can be moved but cannot be copied. - FunctionReference(Reference&& other); - FunctionReference& operator=(Reference&& other); - FunctionReference(FunctionReference&& other); - FunctionReference& operator=(FunctionReference&& other); - NAPI_DISALLOW_ASSIGN_COPY(FunctionReference) - - MaybeOrValue operator()( - const std::initializer_list& args) const; - - MaybeOrValue Call( - const std::initializer_list& args) const; - MaybeOrValue Call(const std::vector& args) const; - MaybeOrValue Call( - napi_value recv, const std::initializer_list& args) const; - MaybeOrValue Call(napi_value recv, - const std::vector& args) const; - MaybeOrValue Call(napi_value recv, - size_t argc, - const napi_value* args) const; - - MaybeOrValue MakeCallback( - napi_value recv, - const std::initializer_list& args, - napi_async_context context = nullptr) const; - MaybeOrValue MakeCallback( - napi_value recv, - const std::vector& args, - napi_async_context context = nullptr) const; - MaybeOrValue MakeCallback( - napi_value recv, - size_t argc, - const napi_value* args, - napi_async_context context = nullptr) const; - - MaybeOrValue New(const std::initializer_list& args) const; - MaybeOrValue New(const std::vector& args) const; -}; - -// Shortcuts to creating a new reference with inferred type and refcount = 0. -template -Reference Weak(T value); -ObjectReference Weak(Object value); -FunctionReference Weak(Function value); - -// Shortcuts to creating a new reference with inferred type and refcount = 1. -template -Reference Persistent(T value); -ObjectReference Persistent(Object value); -FunctionReference Persistent(Function value); - -/// A persistent reference to a JavaScript error object. Use of this class -/// depends somewhat on whether C++ exceptions are enabled at compile time. -/// -/// ### Handling Errors With C++ Exceptions -/// -/// If C++ exceptions are enabled, then the `Error` class extends -/// `std::exception` and enables integrated error-handling for C++ exceptions -/// and JavaScript exceptions. -/// -/// If a Node-API call fails without executing any JavaScript code (for -/// example due to an invalid argument), then the Node-API wrapper -/// automatically converts and throws the error as a C++ exception of type -/// `Napi::Error`. Or if a JavaScript function called by C++ code via Node-API -/// throws a JavaScript exception, then the Node-API wrapper automatically -/// converts and throws it as a C++ exception of type `Napi::Error`. -/// -/// If a C++ exception of type `Napi::Error` escapes from a Node-API C++ -/// callback, then the Node-API wrapper automatically converts and throws it -/// as a JavaScript exception. Therefore, catching a C++ exception of type -/// `Napi::Error` prevents a JavaScript exception from being thrown. -/// -/// #### Example 1A - Throwing a C++ exception: -/// -/// Napi::Env env = ... -/// throw Napi::Error::New(env, "Example exception"); -/// -/// Following C++ statements will not be executed. The exception will bubble -/// up as a C++ exception of type `Napi::Error`, until it is either caught -/// while still in C++, or else automatically propataged as a JavaScript -/// exception when the callback returns to JavaScript. -/// -/// #### Example 2A - Propagating a Node-API C++ exception: -/// -/// Napi::Function jsFunctionThatThrows = someObj.As(); -/// Napi::Value result = jsFunctionThatThrows({ arg1, arg2 }); -/// -/// Following C++ statements will not be executed. The exception will bubble -/// up as a C++ exception of type `Napi::Error`, until it is either caught -/// while still in C++, or else automatically propagated as a JavaScript -/// exception when the callback returns to JavaScript. -/// -/// #### Example 3A - Handling a Node-API C++ exception: -/// -/// Napi::Function jsFunctionThatThrows = someObj.As(); -/// Napi::Value result; -/// try { -/// result = jsFunctionThatThrows({ arg1, arg2 }); -/// } catch (const Napi::Error& e) { -/// cerr << "Caught JavaScript exception: " + e.what(); -/// } -/// -/// Since the exception was caught here, it will not be propagated as a -/// JavaScript exception. -/// -/// ### Handling Errors Without C++ Exceptions -/// -/// If C++ exceptions are disabled (by defining `NAPI_DISABLE_CPP_EXCEPTIONS`) -/// then this class does not extend `std::exception`, and APIs in the `Napi` -/// namespace do not throw C++ exceptions when they fail. Instead, they raise -/// _pending_ JavaScript exceptions and return _empty_ `Value`s. Calling code -/// should check `Value::IsEmpty()` before attempting to use a returned value, -/// and may use methods on the `Env` class to check for, get, and clear a -/// pending JavaScript exception. If the pending exception is not cleared, it -/// will be thrown when the native callback returns to JavaScript. -/// -/// #### Example 1B - Throwing a JS exception -/// -/// Napi::Env env = ... -/// Napi::Error::New(env, "Example -/// exception").ThrowAsJavaScriptException(); return; -/// -/// After throwing a JS exception, the code should generally return -/// immediately from the native callback, after performing any necessary -/// cleanup. -/// -/// #### Example 2B - Propagating a Node-API JS exception: -/// -/// Napi::Function jsFunctionThatThrows = someObj.As(); -/// Napi::Value result = jsFunctionThatThrows({ arg1, arg2 }); -/// if (result.IsEmpty()) return; -/// -/// An empty value result from a Node-API call indicates an error occurred, -/// and a JavaScript exception is pending. To let the exception propagate, the -/// code should generally return immediately from the native callback, after -/// performing any necessary cleanup. -/// -/// #### Example 3B - Handling a Node-API JS exception: -/// -/// Napi::Function jsFunctionThatThrows = someObj.As(); -/// Napi::Value result = jsFunctionThatThrows({ arg1, arg2 }); -/// if (result.IsEmpty()) { -/// Napi::Error e = env.GetAndClearPendingException(); -/// cerr << "Caught JavaScript exception: " + e.Message(); -/// } -/// -/// Since the exception was cleared here, it will not be propagated as a -/// JavaScript exception after the native callback returns. -class Error : public ObjectReference -#ifdef NAPI_CPP_EXCEPTIONS - , - public std::exception -#endif // NAPI_CPP_EXCEPTIONS -{ - public: - static Error New(napi_env env); - static Error New(napi_env env, const char* message); - static Error New(napi_env env, const std::string& message); - - static NAPI_NO_RETURN void Fatal(const char* location, const char* message); - - Error(); - Error(napi_env env, napi_value value); - - // An error can be moved or copied. - Error(Error&& other); - Error& operator=(Error&& other); - Error(const Error&); - Error& operator=(const Error&); - - const std::string& Message() const NAPI_NOEXCEPT; - void ThrowAsJavaScriptException() const; - - Object Value() const; - -#ifdef NAPI_CPP_EXCEPTIONS - const char* what() const NAPI_NOEXCEPT override; -#endif // NAPI_CPP_EXCEPTIONS - - protected: - /// !cond INTERNAL - using create_error_fn = napi_status (*)(napi_env envb, - napi_value code, - napi_value msg, - napi_value* result); - - template - static TError New(napi_env env, - const char* message, - size_t length, - create_error_fn create_error); - /// !endcond - - private: - static inline const char* ERROR_WRAP_VALUE() NAPI_NOEXCEPT; - mutable std::string _message; -}; - -class TypeError : public Error { - public: - static TypeError New(napi_env env, const char* message); - static TypeError New(napi_env env, const std::string& message); - - TypeError(); - TypeError(napi_env env, napi_value value); -}; - -class RangeError : public Error { - public: - static RangeError New(napi_env env, const char* message); - static RangeError New(napi_env env, const std::string& message); - - RangeError(); - RangeError(napi_env env, napi_value value); -}; - -#if NAPI_VERSION > 8 -class SyntaxError : public Error { - public: - static SyntaxError New(napi_env env, const char* message); - static SyntaxError New(napi_env env, const std::string& message); - - SyntaxError(); - SyntaxError(napi_env env, napi_value value); -}; -#endif // NAPI_VERSION > 8 - -class CallbackInfo { - public: - CallbackInfo(napi_env env, napi_callback_info info); - ~CallbackInfo(); - - // Disallow copying to prevent multiple free of _dynamicArgs - NAPI_DISALLOW_ASSIGN_COPY(CallbackInfo) - - Napi::Env Env() const; - Value NewTarget() const; - bool IsConstructCall() const; - size_t Length() const; - const Value operator[](size_t index) const; - Value This() const; - void* Data() const; - void SetData(void* data); - explicit operator napi_callback_info() const; - - private: - const size_t _staticArgCount = 6; - napi_env _env; - napi_callback_info _info; - napi_value _this; - size_t _argc; - napi_value* _argv; - napi_value _staticArgs[6]; - napi_value* _dynamicArgs; - void* _data; -}; - -class PropertyDescriptor { - public: - using GetterCallback = Napi::Value (*)(const Napi::CallbackInfo& info); - using SetterCallback = void (*)(const Napi::CallbackInfo& info); - -#ifndef NODE_ADDON_API_DISABLE_DEPRECATED - template - static PropertyDescriptor Accessor( - const char* utf8name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - const std::string& utf8name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - napi_value name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Name name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - const char* utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - const std::string& utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - napi_value name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Name name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - const char* utf8name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - const std::string& utf8name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - napi_value name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - Name name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); -#endif // !NODE_ADDON_API_DISABLE_DEPRECATED - - template - static PropertyDescriptor Accessor( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - const std::string& utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - Name name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - const std::string& utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - Name name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - const char* utf8name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - Name name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - const char* utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - Name name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - Napi::Env env, - Napi::Object object, - const char* utf8name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - Napi::Env env, - Napi::Object object, - Name name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor Value( - const char* utf8name, - napi_value value, - napi_property_attributes attributes = napi_default); - static PropertyDescriptor Value( - const std::string& utf8name, - napi_value value, - napi_property_attributes attributes = napi_default); - static PropertyDescriptor Value( - napi_value name, - napi_value value, - napi_property_attributes attributes = napi_default); - static PropertyDescriptor Value( - Name name, - Napi::Value value, - napi_property_attributes attributes = napi_default); - - PropertyDescriptor(napi_property_descriptor desc); - - operator napi_property_descriptor&(); - operator const napi_property_descriptor&() const; - - private: - napi_property_descriptor _desc; -}; - -/// Property descriptor for use with `ObjectWrap::DefineClass()`. -/// -/// This is different from the standalone `PropertyDescriptor` because it is -/// specific to each `ObjectWrap` subclass. This prevents using descriptors -/// from a different class when defining a new class (preventing the callbacks -/// from having incorrect `this` pointers). -template -class ClassPropertyDescriptor { - public: - ClassPropertyDescriptor(napi_property_descriptor desc) : _desc(desc) {} - - operator napi_property_descriptor&() { return _desc; } - operator const napi_property_descriptor&() const { return _desc; } - - private: - napi_property_descriptor _desc; -}; - -template -struct MethodCallbackData { - TCallback callback; - void* data; -}; - -template -struct AccessorCallbackData { - TGetterCallback getterCallback; - TSetterCallback setterCallback; - void* data; -}; - -template -class InstanceWrap { - public: - using InstanceVoidMethodCallback = void (T::*)(const CallbackInfo& info); - using InstanceMethodCallback = Napi::Value (T::*)(const CallbackInfo& info); - using InstanceGetterCallback = Napi::Value (T::*)(const CallbackInfo& info); - using InstanceSetterCallback = void (T::*)(const CallbackInfo& info, - const Napi::Value& value); - - using PropertyDescriptor = ClassPropertyDescriptor; - - static PropertyDescriptor InstanceMethod( - const char* utf8name, - InstanceVoidMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceMethod( - const char* utf8name, - InstanceMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceMethod( - Symbol name, - InstanceVoidMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceMethod( - Symbol name, - InstanceMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceMethod( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceMethod( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceMethod( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceMethod( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceAccessor( - const char* utf8name, - InstanceGetterCallback getter, - InstanceSetterCallback setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceAccessor( - Symbol name, - InstanceGetterCallback getter, - InstanceSetterCallback setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceAccessor( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceAccessor( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceValue( - const char* utf8name, - Napi::Value value, - napi_property_attributes attributes = napi_default); - static PropertyDescriptor InstanceValue( - Symbol name, - Napi::Value value, - napi_property_attributes attributes = napi_default); - - protected: - static void AttachPropData(napi_env env, - napi_value value, - const napi_property_descriptor* prop); - - private: - using This = InstanceWrap; - - using InstanceVoidMethodCallbackData = - MethodCallbackData; - using InstanceMethodCallbackData = - MethodCallbackData; - using InstanceAccessorCallbackData = - AccessorCallbackData; - - static napi_value InstanceVoidMethodCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value InstanceMethodCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value InstanceGetterCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value InstanceSetterCallbackWrapper(napi_env env, - napi_callback_info info); - - template - static napi_value WrappedMethod(napi_env env, - napi_callback_info info) NAPI_NOEXCEPT; - - template - struct SetterTag {}; - - template - static napi_callback WrapSetter(SetterTag) NAPI_NOEXCEPT { - return &This::WrappedMethod; - } - static napi_callback WrapSetter(SetterTag) NAPI_NOEXCEPT { - return nullptr; - } -}; - -/// Base class to be extended by C++ classes exposed to JavaScript; each C++ -/// class instance gets "wrapped" by a JavaScript object that is managed by this -/// class. -/// -/// At initialization time, the `DefineClass()` method must be used to -/// hook up the accessor and method callbacks. It takes a list of -/// property descriptors, which can be constructed via the various -/// static methods on the base class. -/// -/// #### Example: -/// -/// class Example: public Napi::ObjectWrap { -/// public: -/// static void Initialize(Napi::Env& env, Napi::Object& target) { -/// Napi::Function constructor = DefineClass(env, "Example", { -/// InstanceAccessor<&Example::GetSomething, -/// &Example::SetSomething>("value"), -/// InstanceMethod<&Example::DoSomething>("doSomething"), -/// }); -/// target.Set("Example", constructor); -/// } -/// -/// Example(const Napi::CallbackInfo& info); // Constructor -/// Napi::Value GetSomething(const Napi::CallbackInfo& info); -/// void SetSomething(const Napi::CallbackInfo& info, const Napi::Value& -/// value); Napi::Value DoSomething(const Napi::CallbackInfo& info); -/// } -template -class ObjectWrap : public InstanceWrap, public Reference { - public: - ObjectWrap(const CallbackInfo& callbackInfo); - virtual ~ObjectWrap(); - - static T* Unwrap(Object wrapper); - - // Methods exposed to JavaScript must conform to one of these callback - // signatures. - using StaticVoidMethodCallback = void (*)(const CallbackInfo& info); - using StaticMethodCallback = Napi::Value (*)(const CallbackInfo& info); - using StaticGetterCallback = Napi::Value (*)(const CallbackInfo& info); - using StaticSetterCallback = void (*)(const CallbackInfo& info, - const Napi::Value& value); - - using PropertyDescriptor = ClassPropertyDescriptor; - - static Function DefineClass( - Napi::Env env, - const char* utf8name, - const std::initializer_list& properties, - void* data = nullptr); - static Function DefineClass(Napi::Env env, - const char* utf8name, - const std::vector& properties, - void* data = nullptr); - static PropertyDescriptor StaticMethod( - const char* utf8name, - StaticVoidMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticMethod( - const char* utf8name, - StaticMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticMethod( - Symbol name, - StaticVoidMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticMethod( - Symbol name, - StaticMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticMethod( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticMethod( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticMethod( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticMethod( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticAccessor( - const char* utf8name, - StaticGetterCallback getter, - StaticSetterCallback setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticAccessor( - Symbol name, - StaticGetterCallback getter, - StaticSetterCallback setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticAccessor( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticAccessor( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticValue( - const char* utf8name, - Napi::Value value, - napi_property_attributes attributes = napi_default); - static PropertyDescriptor StaticValue( - Symbol name, - Napi::Value value, - napi_property_attributes attributes = napi_default); - static Napi::Value OnCalledAsFunction(const Napi::CallbackInfo& callbackInfo); - virtual void Finalize(Napi::Env env); - - private: - using This = ObjectWrap; - - static napi_value ConstructorCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value StaticVoidMethodCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value StaticMethodCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value StaticGetterCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value StaticSetterCallbackWrapper(napi_env env, - napi_callback_info info); - static void FinalizeCallback(napi_env env, void* data, void* hint); - static Function DefineClass(Napi::Env env, - const char* utf8name, - const size_t props_count, - const napi_property_descriptor* props, - void* data = nullptr); - - using StaticVoidMethodCallbackData = - MethodCallbackData; - using StaticMethodCallbackData = MethodCallbackData; - - using StaticAccessorCallbackData = - AccessorCallbackData; - - template - static napi_value WrappedMethod(napi_env env, - napi_callback_info info) NAPI_NOEXCEPT; - - template - struct StaticSetterTag {}; - - template - static napi_callback WrapStaticSetter(StaticSetterTag) NAPI_NOEXCEPT { - return &This::WrappedMethod; - } - static napi_callback WrapStaticSetter(StaticSetterTag) - NAPI_NOEXCEPT { - return nullptr; - } - - bool _construction_failed = true; -}; - -class HandleScope { - public: - HandleScope(napi_env env, napi_handle_scope scope); - explicit HandleScope(Napi::Env env); - ~HandleScope(); - - // Disallow copying to prevent double close of napi_handle_scope - NAPI_DISALLOW_ASSIGN_COPY(HandleScope) - - operator napi_handle_scope() const; - - Napi::Env Env() const; - - private: - napi_env _env; - napi_handle_scope _scope; -}; - -class EscapableHandleScope { - public: - EscapableHandleScope(napi_env env, napi_escapable_handle_scope scope); - explicit EscapableHandleScope(Napi::Env env); - ~EscapableHandleScope(); - - // Disallow copying to prevent double close of napi_escapable_handle_scope - NAPI_DISALLOW_ASSIGN_COPY(EscapableHandleScope) - - operator napi_escapable_handle_scope() const; - - Napi::Env Env() const; - Value Escape(napi_value escapee); - - private: - napi_env _env; - napi_escapable_handle_scope _scope; -}; - -#if (NAPI_VERSION > 2) -class CallbackScope { - public: - CallbackScope(napi_env env, napi_callback_scope scope); - CallbackScope(napi_env env, napi_async_context context); - virtual ~CallbackScope(); - - // Disallow copying to prevent double close of napi_callback_scope - NAPI_DISALLOW_ASSIGN_COPY(CallbackScope) - - operator napi_callback_scope() const; - - Napi::Env Env() const; - - private: - napi_env _env; - napi_callback_scope _scope; -}; -#endif - -class AsyncContext { - public: - explicit AsyncContext(napi_env env, const char* resource_name); - explicit AsyncContext(napi_env env, - const char* resource_name, - const Object& resource); - virtual ~AsyncContext(); - - AsyncContext(AsyncContext&& other); - AsyncContext& operator=(AsyncContext&& other); - NAPI_DISALLOW_ASSIGN_COPY(AsyncContext) - - operator napi_async_context() const; - - Napi::Env Env() const; - - private: - napi_env _env; - napi_async_context _context; -}; - -#if NAPI_HAS_THREADS -class AsyncWorker { - public: - virtual ~AsyncWorker(); - - NAPI_DISALLOW_ASSIGN_COPY(AsyncWorker) - - operator napi_async_work() const; - - Napi::Env Env() const; - - void Queue(); - void Cancel(); - void SuppressDestruct(); - - ObjectReference& Receiver(); - FunctionReference& Callback(); - - virtual void OnExecute(Napi::Env env); - virtual void OnWorkComplete(Napi::Env env, napi_status status); - - protected: - explicit AsyncWorker(const Function& callback); - explicit AsyncWorker(const Function& callback, const char* resource_name); - explicit AsyncWorker(const Function& callback, - const char* resource_name, - const Object& resource); - explicit AsyncWorker(const Object& receiver, const Function& callback); - explicit AsyncWorker(const Object& receiver, - const Function& callback, - const char* resource_name); - explicit AsyncWorker(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource); - - explicit AsyncWorker(Napi::Env env); - explicit AsyncWorker(Napi::Env env, const char* resource_name); - explicit AsyncWorker(Napi::Env env, - const char* resource_name, - const Object& resource); - - virtual void Execute() = 0; - virtual void OnOK(); - virtual void OnError(const Error& e); - virtual void Destroy(); - virtual std::vector GetResult(Napi::Env env); - - void SetError(const std::string& error); - - private: - static inline void OnAsyncWorkExecute(napi_env env, void* asyncworker); - static inline void OnAsyncWorkComplete(napi_env env, - napi_status status, - void* asyncworker); - - napi_env _env; - napi_async_work _work; - ObjectReference _receiver; - FunctionReference _callback; - std::string _error; - bool _suppress_destruct; -}; -#endif // NAPI_HAS_THREADS - -#if (NAPI_VERSION > 3 && NAPI_HAS_THREADS) -class ThreadSafeFunction { - public: - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback, - FinalizerDataType* data); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback, - FinalizerDataType* data); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data); - - ThreadSafeFunction(); - ThreadSafeFunction(napi_threadsafe_function tsFunctionValue); - - operator napi_threadsafe_function() const; - - // This API may be called from any thread. - napi_status BlockingCall() const; - - // This API may be called from any thread. - template - napi_status BlockingCall(Callback callback) const; - - // This API may be called from any thread. - template - napi_status BlockingCall(DataType* data, Callback callback) const; - - // This API may be called from any thread. - napi_status NonBlockingCall() const; - - // This API may be called from any thread. - template - napi_status NonBlockingCall(Callback callback) const; - - // This API may be called from any thread. - template - napi_status NonBlockingCall(DataType* data, Callback callback) const; - - // This API may only be called from the main thread. - void Ref(napi_env env) const; - - // This API may only be called from the main thread. - void Unref(napi_env env) const; - - // This API may be called from any thread. - napi_status Acquire() const; - - // This API may be called from any thread. - napi_status Release() const; - - // This API may be called from any thread. - napi_status Abort() const; - - struct ConvertibleContext { - template - operator T*() { - return static_cast(context); - } - void* context; - }; - - // This API may be called from any thread. - ConvertibleContext GetContext() const; - - private: - using CallbackWrapper = std::function; - - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data, - napi_finalize wrapper); - - napi_status CallInternal(CallbackWrapper* callbackWrapper, - napi_threadsafe_function_call_mode mode) const; - - static void CallJS(napi_env env, - napi_value jsCallback, - void* context, - void* data); - - napi_threadsafe_function _tsfn; -}; - -// A TypedThreadSafeFunction by default has no context (nullptr) and can -// accept any type (void) to its CallJs. -template -class TypedThreadSafeFunction { - public: - // This API may only be called from the main thread. - // Helper function that returns nullptr if running Node-API 5+, otherwise a - // non-empty, no-op Function. This provides the ability to specify at - // compile-time a callback parameter to `New` that safely does no action - // when targeting _any_ Node-API version. -#if NAPI_VERSION > 4 - static std::nullptr_t EmptyFunctionFactory(Napi::Env env); -#else - static Napi::Function EmptyFunctionFactory(Napi::Env env); -#endif - static Napi::Function FunctionOrEmpty(Napi::Env env, - Napi::Function& callback); - -#if NAPI_VERSION > 4 - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [missing] Resource [missing] Finalizer [missing] - template - static TypedThreadSafeFunction New( - napi_env env, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [missing] Resource [passed] Finalizer [missing] - template - static TypedThreadSafeFunction New( - napi_env env, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [missing] Resource [missing] Finalizer [passed] - template - static TypedThreadSafeFunction New( - napi_env env, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [missing] Resource [passed] Finalizer [passed] - template - static TypedThreadSafeFunction New( - napi_env env, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data = nullptr); -#endif - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [passed] Resource [missing] Finalizer [missing] - template - static TypedThreadSafeFunction New( - napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [passed] Resource [passed] Finalizer [missing] - template - static TypedThreadSafeFunction New( - napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [passed] Resource [missing] Finalizer [passed] - template - static TypedThreadSafeFunction New( - napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [passed] Resource [passed] Finalizer [passed] - template - static TypedThreadSafeFunction New( - napi_env env, - CallbackType callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data = nullptr); - - TypedThreadSafeFunction(); - TypedThreadSafeFunction(napi_threadsafe_function tsFunctionValue); - - operator napi_threadsafe_function() const; - - // This API may be called from any thread. - napi_status BlockingCall(DataType* data = nullptr) const; - - // This API may be called from any thread. - napi_status NonBlockingCall(DataType* data = nullptr) const; - - // This API may only be called from the main thread. - void Ref(napi_env env) const; - - // This API may only be called from the main thread. - void Unref(napi_env env) const; - - // This API may be called from any thread. - napi_status Acquire() const; - - // This API may be called from any thread. - napi_status Release() const; - - // This API may be called from any thread. - napi_status Abort() const; - - // This API may be called from any thread. - ContextType* GetContext() const; - - private: - template - static TypedThreadSafeFunction New( - napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data, - napi_finalize wrapper); - - static void CallJsInternal(napi_env env, - napi_value jsCallback, - void* context, - void* data); - - protected: - napi_threadsafe_function _tsfn; -}; -template -class AsyncProgressWorkerBase : public AsyncWorker { - public: - virtual void OnWorkProgress(DataType* data) = 0; - class ThreadSafeData { - public: - ThreadSafeData(AsyncProgressWorkerBase* asyncprogressworker, DataType* data) - : _asyncprogressworker(asyncprogressworker), _data(data) {} - - AsyncProgressWorkerBase* asyncprogressworker() { - return _asyncprogressworker; - }; - DataType* data() { return _data; }; - - private: - AsyncProgressWorkerBase* _asyncprogressworker; - DataType* _data; - }; - void OnWorkComplete(Napi::Env env, napi_status status) override; - - protected: - explicit AsyncProgressWorkerBase(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource, - size_t queue_size = 1); - virtual ~AsyncProgressWorkerBase(); - -// Optional callback of Napi::ThreadSafeFunction only available after -// NAPI_VERSION 4. Refs: https://github.com/nodejs/node/pull/27791 -#if NAPI_VERSION > 4 - explicit AsyncProgressWorkerBase(Napi::Env env, - const char* resource_name, - const Object& resource, - size_t queue_size = 1); -#endif - - static inline void OnAsyncWorkProgress(Napi::Env env, - Napi::Function jsCallback, - void* data); - - napi_status NonBlockingCall(DataType* data); - - private: - ThreadSafeFunction _tsfn; - bool _work_completed = false; - napi_status _complete_status; - static inline void OnThreadSafeFunctionFinalize( - Napi::Env env, void* data, AsyncProgressWorkerBase* context); -}; - -template -class AsyncProgressWorker : public AsyncProgressWorkerBase { - public: - virtual ~AsyncProgressWorker(); - - class ExecutionProgress { - friend class AsyncProgressWorker; - - public: - void Signal() const; - void Send(const T* data, size_t count) const; - - private: - explicit ExecutionProgress(AsyncProgressWorker* worker) : _worker(worker) {} - AsyncProgressWorker* const _worker; - }; - - void OnWorkProgress(void*) override; - - protected: - explicit AsyncProgressWorker(const Function& callback); - explicit AsyncProgressWorker(const Function& callback, - const char* resource_name); - explicit AsyncProgressWorker(const Function& callback, - const char* resource_name, - const Object& resource); - explicit AsyncProgressWorker(const Object& receiver, - const Function& callback); - explicit AsyncProgressWorker(const Object& receiver, - const Function& callback, - const char* resource_name); - explicit AsyncProgressWorker(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource); - -// Optional callback of Napi::ThreadSafeFunction only available after -// NAPI_VERSION 4. Refs: https://github.com/nodejs/node/pull/27791 -#if NAPI_VERSION > 4 - explicit AsyncProgressWorker(Napi::Env env); - explicit AsyncProgressWorker(Napi::Env env, const char* resource_name); - explicit AsyncProgressWorker(Napi::Env env, - const char* resource_name, - const Object& resource); -#endif - virtual void Execute(const ExecutionProgress& progress) = 0; - virtual void OnProgress(const T* data, size_t count) = 0; - - private: - void Execute() override; - void Signal(); - void SendProgress_(const T* data, size_t count); - - std::mutex _mutex; - T* _asyncdata; - size_t _asyncsize; - bool _signaled; -}; - -template -class AsyncProgressQueueWorker - : public AsyncProgressWorkerBase> { - public: - virtual ~AsyncProgressQueueWorker(){}; - - class ExecutionProgress { - friend class AsyncProgressQueueWorker; - - public: - void Signal() const; - void Send(const T* data, size_t count) const; - - private: - explicit ExecutionProgress(AsyncProgressQueueWorker* worker) - : _worker(worker) {} - AsyncProgressQueueWorker* const _worker; - }; - - void OnWorkComplete(Napi::Env env, napi_status status) override; - void OnWorkProgress(std::pair*) override; - - protected: - explicit AsyncProgressQueueWorker(const Function& callback); - explicit AsyncProgressQueueWorker(const Function& callback, - const char* resource_name); - explicit AsyncProgressQueueWorker(const Function& callback, - const char* resource_name, - const Object& resource); - explicit AsyncProgressQueueWorker(const Object& receiver, - const Function& callback); - explicit AsyncProgressQueueWorker(const Object& receiver, - const Function& callback, - const char* resource_name); - explicit AsyncProgressQueueWorker(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource); - -// Optional callback of Napi::ThreadSafeFunction only available after -// NAPI_VERSION 4. Refs: https://github.com/nodejs/node/pull/27791 -#if NAPI_VERSION > 4 - explicit AsyncProgressQueueWorker(Napi::Env env); - explicit AsyncProgressQueueWorker(Napi::Env env, const char* resource_name); - explicit AsyncProgressQueueWorker(Napi::Env env, - const char* resource_name, - const Object& resource); -#endif - virtual void Execute(const ExecutionProgress& progress) = 0; - virtual void OnProgress(const T* data, size_t count) = 0; - - private: - void Execute() override; - void Signal() const; - void SendProgress_(const T* data, size_t count); -}; -#endif // NAPI_VERSION > 3 && NAPI_HAS_THREADS - -// Memory management. -class MemoryManagement { - public: - static int64_t AdjustExternalMemory(Env env, int64_t change_in_bytes); -}; - -// Version management -class VersionManagement { - public: - static uint32_t GetNapiVersion(Env env); - static const napi_node_version* GetNodeVersion(Env env); -}; - -#if NAPI_VERSION > 5 -template -class Addon : public InstanceWrap { - public: - static inline Object Init(Env env, Object exports); - static T* Unwrap(Object wrapper); - - protected: - using AddonProp = ClassPropertyDescriptor; - void DefineAddon(Object exports, - const std::initializer_list& props); - Napi::Object DefineProperties(Object object, - const std::initializer_list& props); - - private: - Object entry_point_; -}; -#endif // NAPI_VERSION > 5 - -#ifdef NAPI_CPP_CUSTOM_NAMESPACE -} // namespace NAPI_CPP_CUSTOM_NAMESPACE -#endif - -} // namespace Napi - -// Inline implementations of all the above class methods are included here. -#include "napi-inl.h" - -#endif // SRC_NAPI_H_ diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/node_addon_api.gyp b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/node_addon_api.gyp deleted file mode 100644 index 29905ed..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/node_addon_api.gyp +++ /dev/null @@ -1,32 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'node_addon_api', - 'type': 'none', - 'sources': [ 'napi.h', 'napi-inl.h' ], - 'direct_dependent_settings': { - 'include_dirs': [ '.' ], - 'includes': ['noexcept.gypi'], - } - }, - { - 'target_name': 'node_addon_api_except', - 'type': 'none', - 'sources': [ 'napi.h', 'napi-inl.h' ], - 'direct_dependent_settings': { - 'include_dirs': [ '.' ], - 'includes': ['except.gypi'], - } - }, - { - 'target_name': 'node_addon_api_maybe', - 'type': 'none', - 'sources': [ 'napi.h', 'napi-inl.h' ], - 'direct_dependent_settings': { - 'include_dirs': [ '.' ], - 'includes': ['noexcept.gypi'], - 'defines': ['NODE_ADDON_API_ENABLE_MAYBE'] - } - }, - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/node_api.gyp b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/node_api.gyp deleted file mode 100644 index 4ff0ae7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/node_api.gyp +++ /dev/null @@ -1,9 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'nothing', - 'type': 'static_library', - 'sources': [ 'nothing.c' ] - } - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/noexcept.gypi b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/noexcept.gypi deleted file mode 100644 index 404a05f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/noexcept.gypi +++ /dev/null @@ -1,26 +0,0 @@ -{ - 'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ], - 'cflags': [ '-fno-exceptions' ], - 'cflags_cc': [ '-fno-exceptions' ], - 'conditions': [ - ["OS=='win'", { - # _HAS_EXCEPTIONS is already defined and set to 0 in common.gypi - #"defines": [ - # "_HAS_EXCEPTIONS=0" - #], - "msvs_settings": { - "VCCLCompilerTool": { - 'ExceptionHandling': 0, - 'EnablePREfast': 'true', - }, - }, - }], - ["OS=='mac'", { - 'xcode_settings': { - 'CLANG_CXX_LIBRARY': 'libc++', - 'MACOSX_DEPLOYMENT_TARGET': '10.7', - 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', - }, - }], - ], -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/nothing.c b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/nothing.c deleted file mode 100644 index e69de29..0000000 diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/package-support.json b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/package-support.json deleted file mode 100644 index 10d3607..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/package-support.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "versions": [ - { - "version": "*", - "target": { - "node": "active" - }, - "response": { - "type": "time-permitting", - "paid": false, - "contact": { - "name": "node-addon-api team", - "url": "https://github.com/nodejs/node-addon-api/issues" - } - }, - "backing": [ { "project": "https://github.com/nodejs" }, - { "foundation": "https://openjsf.org/" } - ] - } - ] -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/package.json b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/package.json deleted file mode 100644 index d772ddc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/package.json +++ /dev/null @@ -1,480 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/nodejs/node-addon-api/issues" - }, - "contributors": [ - { - "name": "Abhishek Kumar Singh", - "url": "https://github.com/abhi11210646" - }, - { - "name": "Alba Mendez", - "url": "https://github.com/jmendeth" - }, - { - "name": "Alexander Floh", - "url": "https://github.com/alexanderfloh" - }, - { - "name": "Ammar Faizi", - "url": "https://github.com/ammarfaizi2" - }, - { - "name": "András Timár, Dr", - "url": "https://github.com/timarandras" - }, - { - "name": "Andrew Petersen", - "url": "https://github.com/kirbysayshi" - }, - { - "name": "Anisha Rohra", - "url": "https://github.com/anisha-rohra" - }, - { - "name": "Anna Henningsen", - "url": "https://github.com/addaleax" - }, - { - "name": "Arnaud Botella", - "url": "https://github.com/BotellaA" - }, - { - "name": "Arunesh Chandra", - "url": "https://github.com/aruneshchandra" - }, - { - "name": "Azlan Mukhtar", - "url": "https://github.com/azlan" - }, - { - "name": "Ben Berman", - "url": "https://github.com/rivertam" - }, - { - "name": "Benjamin Byholm", - "url": "https://github.com/kkoopa" - }, - { - "name": "Bill Gallafent", - "url": "https://github.com/gallafent" - }, - { - "name": "blagoev", - "url": "https://github.com/blagoev" - }, - { - "name": "Bruce A. MacNaughton", - "url": "https://github.com/bmacnaughton" - }, - { - "name": "Cory Mickelson", - "url": "https://github.com/corymickelson" - }, - { - "name": "Daniel Bevenius", - "url": "https://github.com/danbev" - }, - { - "name": "Dante Calderón", - "url": "https://github.com/dantehemerson" - }, - { - "name": "Darshan Sen", - "url": "https://github.com/RaisinTen" - }, - { - "name": "David Halls", - "url": "https://github.com/davedoesdev" - }, - { - "name": "Deepak Rajamohan", - "url": "https://github.com/deepakrkris" - }, - { - "name": "Dmitry Ashkadov", - "url": "https://github.com/dmitryash" - }, - { - "name": "Dongjin Na", - "url": "https://github.com/nadongguri" - }, - { - "name": "Doni Rubiagatra", - "url": "https://github.com/rubiagatra" - }, - { - "name": "Eric Bickle", - "url": "https://github.com/ebickle" - }, - { - "name": "extremeheat", - "url": "https://github.com/extremeheat" - }, - { - "name": "Feng Yu", - "url": "https://github.com/F3n67u" - }, - { - "name": "Ferdinand Holzer", - "url": "https://github.com/fholzer" - }, - { - "name": "Gabriel Schulhof", - "url": "https://github.com/gabrielschulhof" - }, - { - "name": "Guenter Sandner", - "url": "https://github.com/gms1" - }, - { - "name": "Gus Caplan", - "url": "https://github.com/devsnek" - }, - { - "name": "Helio Frota", - "url": "https://github.com/helio-frota" - }, - { - "name": "Hitesh Kanwathirtha", - "url": "https://github.com/digitalinfinity" - }, - { - "name": "ikokostya", - "url": "https://github.com/ikokostya" - }, - { - "name": "Jack Xia", - "url": "https://github.com/JckXia" - }, - { - "name": "Jake Barnes", - "url": "https://github.com/DuBistKomisch" - }, - { - "name": "Jake Yoon", - "url": "https://github.com/yjaeseok" - }, - { - "name": "Jason Ginchereau", - "url": "https://github.com/jasongin" - }, - { - "name": "Jenny", - "url": "https://github.com/egg-bread" - }, - { - "name": "Jeroen Janssen", - "url": "https://github.com/japj" - }, - { - "name": "Jim Schlight", - "url": "https://github.com/jschlight" - }, - { - "name": "Jinho Bang", - "url": "https://github.com/romandev" - }, - { - "name": "José Expósito", - "url": "https://github.com/JoseExposito" - }, - { - "name": "joshgarde", - "url": "https://github.com/joshgarde" - }, - { - "name": "Julian Mesa", - "url": "https://github.com/julianmesa-gitkraken" - }, - { - "name": "Kasumi Hanazuki", - "url": "https://github.com/hanazuki" - }, - { - "name": "Kelvin", - "url": "https://github.com/kelvinhammond" - }, - { - "name": "Kevin Eady", - "url": "https://github.com/KevinEady" - }, - { - "name": "Kévin VOYER", - "url": "https://github.com/kecsou" - }, - { - "name": "kidneysolo", - "url": "https://github.com/kidneysolo" - }, - { - "name": "Koki Nishihara", - "url": "https://github.com/Nishikoh" - }, - { - "name": "Konstantin Tarkus", - "url": "https://github.com/koistya" - }, - { - "name": "Kyle Farnung", - "url": "https://github.com/kfarnung" - }, - { - "name": "Kyle Kovacs", - "url": "https://github.com/nullromo" - }, - { - "name": "legendecas", - "url": "https://github.com/legendecas" - }, - { - "name": "LongYinan", - "url": "https://github.com/Brooooooklyn" - }, - { - "name": "Lovell Fuller", - "url": "https://github.com/lovell" - }, - { - "name": "Luciano Martorella", - "url": "https://github.com/lmartorella" - }, - { - "name": "mastergberry", - "url": "https://github.com/mastergberry" - }, - { - "name": "Mathias Küsel", - "url": "https://github.com/mathiask88" - }, - { - "name": "Mathias Stearn", - "url": "https://github.com/RedBeard0531" - }, - { - "name": "Matteo Collina", - "url": "https://github.com/mcollina" - }, - { - "name": "Michael Dawson", - "url": "https://github.com/mhdawson" - }, - { - "name": "Michael Price", - "url": "https://github.com/mikepricedev" - }, - { - "name": "Michele Campus", - "url": "https://github.com/kYroL01" - }, - { - "name": "Mikhail Cheshkov", - "url": "https://github.com/mcheshkov" - }, - { - "name": "nempoBu4", - "url": "https://github.com/nempoBu4" - }, - { - "name": "Nicola Del Gobbo", - "url": "https://github.com/NickNaso" - }, - { - "name": "Nick Soggin", - "url": "https://github.com/iSkore" - }, - { - "name": "Nikolai Vavilov", - "url": "https://github.com/seishun" - }, - { - "name": "Nurbol Alpysbayev", - "url": "https://github.com/anurbol" - }, - { - "name": "pacop", - "url": "https://github.com/pacop" - }, - { - "name": "Peter Šándor", - "url": "https://github.com/petersandor" - }, - { - "name": "Philipp Renoth", - "url": "https://github.com/DaAitch" - }, - { - "name": "rgerd", - "url": "https://github.com/rgerd" - }, - { - "name": "Richard Lau", - "url": "https://github.com/richardlau" - }, - { - "name": "Rolf Timmermans", - "url": "https://github.com/rolftimmermans" - }, - { - "name": "Ross Weir", - "url": "https://github.com/ross-weir" - }, - { - "name": "Ryuichi Okumura", - "url": "https://github.com/okuryu" - }, - { - "name": "Saint Gabriel", - "url": "https://github.com/chineduG" - }, - { - "name": "Sampson Gao", - "url": "https://github.com/sampsongao" - }, - { - "name": "Sam Roberts", - "url": "https://github.com/sam-github" - }, - { - "name": "strager", - "url": "https://github.com/strager" - }, - { - "name": "Taylor Woll", - "url": "https://github.com/boingoing" - }, - { - "name": "Thomas Gentilhomme", - "url": "https://github.com/fraxken" - }, - { - "name": "Tim Rach", - "url": "https://github.com/timrach" - }, - { - "name": "Tobias Nießen", - "url": "https://github.com/tniessen" - }, - { - "name": "todoroff", - "url": "https://github.com/todoroff" - }, - { - "name": "Toyo Li", - "url": "https://github.com/toyobayashi" - }, - { - "name": "Tux3", - "url": "https://github.com/tux3" - }, - { - "name": "Vlad Velmisov", - "url": "https://github.com/Velmisov" - }, - { - "name": "Vladimir Morozov", - "url": "https://github.com/vmoroz" - - }, - { - "name": "WenheLI", - "url": "https://github.com/WenheLI" - }, - { - "name": "Xuguang Mei", - "url": "https://github.com/meixg" - }, - { - "name": "Yohei Kishimoto", - "url": "https://github.com/morokosi" - }, - { - "name": "Yulong Wang", - "url": "https://github.com/fs-eire" - }, - { - "name": "Ziqiu Zhao", - "url": "https://github.com/ZzqiZQute" - }, - { - "name": "Feng Yu", - "url": "https://github.com/F3n67u" - }, - { - "name": "wanlu wang", - "url": "https://github.com/wanlu" - }, - { - "name": "Caleb Hearon", - "url": "https://github.com/chearon" - }, - { - "name": "Marx", - "url": "https://github.com/MarxJiao" - }, - { - "name": "Ömer AKGÜL", - "url": "https://github.com/tuhalf" - } - ], - "description": "Node.js API (Node-API)", - "devDependencies": { - "benchmark": "^2.1.4", - "bindings": "^1.5.0", - "clang-format": "^1.4.0", - "eslint": "^7.32.0", - "eslint-config-semistandard": "^16.0.0", - "eslint-config-standard": "^16.0.3", - "eslint-plugin-import": "^2.24.2", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^5.1.0", - "fs-extra": "^11.1.1", - "path": "^0.12.7", - "pre-commit": "^1.2.2", - "safe-buffer": "^5.1.1" - }, - "directories": {}, - "gypfile": false, - "homepage": "https://github.com/nodejs/node-addon-api", - "keywords": [ - "n-api", - "napi", - "addon", - "native", - "bindings", - "c", - "c++", - "nan", - "node-addon-api" - ], - "license": "MIT", - "main": "index.js", - "name": "node-addon-api", - "readme": "README.md", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/node-addon-api.git" - }, - "files": [ - "*.{c,h,gyp,gypi}", - "package-support.json", - "tools/" - ], - "scripts": { - "prebenchmark": "node-gyp rebuild -C benchmark", - "benchmark": "node benchmark", - "pretest": "node-gyp rebuild -C test", - "test": "node test", - "test:debug": "node-gyp rebuild -C test --debug && NODE_API_BUILD_CONFIG=Debug node ./test/index.js", - "predev": "node-gyp rebuild -C test --debug", - "dev": "node test", - "predev:incremental": "node-gyp configure build -C test --debug", - "dev:incremental": "node test", - "doc": "doxygen doc/Doxyfile", - "lint": "node tools/eslint-format && node tools/clang-format", - "lint:fix": "node tools/clang-format --fix && node tools/eslint-format --fix" - }, - "pre-commit": "lint", - "version": "7.1.1", - "support": true -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/README.md b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/README.md deleted file mode 100644 index 6b80e94..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# Tools - -## clang-format - -The clang-format checking tools is designed to check changed lines of code compared to given git-refs. - -## Migration Script - -The migration tool is designed to reduce repetitive work in the migration process. However, the script is not aiming to convert every thing for you. There are usually some small fixes and major reconstruction required. - -### How To Use - -To run the conversion script, first make sure you have the latest `node-addon-api` in your `node_modules` directory. -``` -npm install node-addon-api -``` - -Then run the script passing your project directory -``` -node ./node_modules/node-addon-api/tools/conversion.js ./ -``` - -After finish, recompile and debug things that are missed by the script. - - -### Quick Fixes -Here is the list of things that can be fixed easily. - 1. Change your methods' return value to void if it doesn't return value to JavaScript. - 2. Use `.` to access attribute or to invoke member function in Napi::Object instead of `->`. - 3. `Napi::New(env, value);` to `Napi::[Type]::New(env, value); - - -### Major Reconstructions -The implementation of `Napi::ObjectWrap` is significantly different from NAN's. `Napi::ObjectWrap` takes a pointer to the wrapped object and creates a reference to the wrapped object inside ObjectWrap constructor. `Napi::ObjectWrap` also associates wrapped object's instance methods to Javascript module instead of static methods like NAN. - -So if you use Nan::ObjectWrap in your module, you will need to execute the following steps. - - 1. Convert your [ClassName]::New function to a constructor function that takes a `Napi::CallbackInfo`. Declare it as -``` -[ClassName](const Napi::CallbackInfo& info); -``` -and define it as -``` -[ClassName]::[ClassName](const Napi::CallbackInfo& info) : Napi::ObjectWrap<[ClassName]>(info){ - ... -} -``` -This way, the `Napi::ObjectWrap` constructor will be invoked after the object has been instantiated and `Napi::ObjectWrap` can use the `this` pointer to create a reference to the wrapped object. - - 2. Move your original constructor code into the new constructor. Delete your original constructor. - 3. In your class initialization function, associate native methods in the following way. -``` -Napi::FunctionReference constructor; - -void [ClassName]::Init(Napi::Env env, Napi::Object exports, Napi::Object module) { - Napi::HandleScope scope(env); - Napi::Function ctor = DefineClass(env, "Canvas", { - InstanceMethod<&[ClassName]::Func1>("Func1"), - InstanceMethod<&[ClassName]::Func2>("Func2"), - InstanceAccessor<&[ClassName]::ValueGetter>("Value"), - StaticMethod<&[ClassName]::StaticMethod>("MethodName"), - InstanceValue("Value", Napi::[Type]::New(env, value)), - }); - - constructor = Napi::Persistent(ctor); - constructor .SuppressDestruct(); - exports.Set("[ClassName]", ctor); -} -``` - 4. In function where you need to Unwrap the ObjectWrap in NAN like `[ClassName]* native = Nan::ObjectWrap::Unwrap<[ClassName]>(info.This());`, use `this` pointer directly as the unwrapped object as each ObjectWrap instance is associated with a unique object instance. - - -If you still find issues after following this guide, please leave us an issue describing your problem and we will try to resolve it. diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/check-napi.js b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/check-napi.js deleted file mode 100644 index 9199af3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/check-napi.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict'; -// Descend into a directory structure and, for each file matching *.node, output -// based on the imports found in the file whether it's an N-API module or not. - -const fs = require('fs'); -const path = require('path'); - -// Read the output of the command, break it into lines, and use the reducer to -// decide whether the file is an N-API module or not. -function checkFile (file, command, argv, reducer) { - const child = require('child_process').spawn(command, argv, { - stdio: ['inherit', 'pipe', 'inherit'] - }); - let leftover = ''; - let isNapi; - child.stdout.on('data', (chunk) => { - if (isNapi === undefined) { - chunk = (leftover + chunk.toString()).split(/[\r\n]+/); - leftover = chunk.pop(); - isNapi = chunk.reduce(reducer, isNapi); - if (isNapi !== undefined) { - child.kill(); - } - } - }); - child.on('close', (code, signal) => { - if ((code === null && signal !== null) || (code !== 0)) { - console.log( - command + ' exited with code: ' + code + ' and signal: ' + signal); - } else { - // Green if it's a N-API module, red otherwise. - console.log( - '\x1b[' + (isNapi ? '42' : '41') + 'm' + - (isNapi ? ' N-API' : 'Not N-API') + - '\x1b[0m: ' + file); - } - }); -} - -// Use nm -a to list symbols. -function checkFileUNIX (file) { - checkFile(file, 'nm', ['-a', file], (soFar, line) => { - if (soFar === undefined) { - line = line.match(/([0-9a-f]*)? ([a-zA-Z]) (.*$)/); - if (line[2] === 'U') { - if (/^napi/.test(line[3])) { - soFar = true; - } - } - } - return soFar; - }); -} - -// Use dumpbin /imports to list symbols. -function checkFileWin32 (file) { - checkFile(file, 'dumpbin', ['/imports', file], (soFar, line) => { - if (soFar === undefined) { - line = line.match(/([0-9a-f]*)? +([a-zA-Z0-9]) (.*$)/); - if (line && /^napi/.test(line[line.length - 1])) { - soFar = true; - } - } - return soFar; - }); -} - -// Descend into a directory structure and pass each file ending in '.node' to -// one of the above checks, depending on the OS. -function recurse (top) { - fs.readdir(top, (error, items) => { - if (error) { - throw new Error('error reading directory ' + top + ': ' + error); - } - items.forEach((item) => { - item = path.join(top, item); - fs.stat(item, ((item) => (error, stats) => { - if (error) { - throw new Error('error about ' + item + ': ' + error); - } - if (stats.isDirectory()) { - recurse(item); - } else if (/[.]node$/.test(item) && - // Explicitly ignore files called 'nothing.node' because they are - // artefacts of node-addon-api having identified a version of - // Node.js that ships with a correct implementation of N-API. - path.basename(item) !== 'nothing.node') { - process.platform === 'win32' - ? checkFileWin32(item) - : checkFileUNIX(item); - } - })(item)); - }); - }); -} - -// Start with the directory given on the command line or the current directory -// if nothing was given. -recurse(process.argv.length > 3 ? process.argv[2] : '.'); diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/clang-format.js b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/clang-format.js deleted file mode 100644 index e4bb4f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/clang-format.js +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env node - -const spawn = require('child_process').spawnSync; -const path = require('path'); - -const filesToCheck = ['*.h', '*.cc']; -const FORMAT_START = process.env.FORMAT_START || 'main'; - -function main (args) { - let fix = false; - while (args.length > 0) { - switch (args[0]) { - case '-f': - case '--fix': - fix = true; - break; - default: - } - args.shift(); - } - - const clangFormatPath = path.dirname(require.resolve('clang-format')); - const binary = process.platform === 'win32' - ? 'node_modules\\.bin\\clang-format.cmd' - : 'node_modules/.bin/clang-format'; - const options = ['--binary=' + binary, '--style=file']; - if (fix) { - options.push(FORMAT_START); - } else { - options.push('--diff', FORMAT_START); - } - - const gitClangFormatPath = path.join(clangFormatPath, 'bin/git-clang-format'); - const result = spawn( - 'python', - [gitClangFormatPath, ...options, '--', ...filesToCheck], - { encoding: 'utf-8' } - ); - - if (result.stderr) { - console.error('Error running git-clang-format:', result.stderr); - return 2; - } - - const clangFormatOutput = result.stdout.trim(); - // Bail fast if in fix mode. - if (fix) { - console.log(clangFormatOutput); - return 0; - } - // Detect if there is any complains from clang-format - if ( - clangFormatOutput !== '' && - clangFormatOutput !== 'no modified files to format' && - clangFormatOutput !== 'clang-format did not modify any files' - ) { - console.error(clangFormatOutput); - const fixCmd = 'npm run lint:fix'; - console.error(` - ERROR: please run "${fixCmd}" to format changes in your commit - Note that when running the command locally, please keep your local - main branch and working branch up to date with nodejs/node-addon-api - to exclude un-related complains. - Or you can run "env FORMAT_START=upstream/main ${fixCmd}".`); - return 1; - } -} - -if (require.main === module) { - process.exitCode = main(process.argv.slice(2)); -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/conversion.js b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/conversion.js deleted file mode 100755 index f89245a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/conversion.js +++ /dev/null @@ -1,301 +0,0 @@ -#! /usr/bin/env node - -'use strict'; - -const fs = require('fs'); -const path = require('path'); - -const args = process.argv.slice(2); -const dir = args[0]; -if (!dir) { - console.log('Usage: node ' + path.basename(__filename) + ' '); - process.exit(1); -} - -const NodeApiVersion = require('../package.json').version; - -const disable = args[1]; -let ConfigFileOperations; -if (disable !== '--disable' && dir !== '--disable') { - ConfigFileOperations = { - 'package.json': [ - [/([ ]*)"dependencies": {/g, '$1"dependencies": {\n$1 "node-addon-api": "' + NodeApiVersion + '",'], - [/[ ]*"nan": *"[^"]+"(,|)[\n\r]/g, ''] - ], - 'binding.gyp': [ - [/([ ]*)'include_dirs': \[/g, '$1\'include_dirs\': [\n$1 \'\s+(\w+)\s*=\s*Nan::New\([\w\d:]+\);(?:\w+->Reset\(\1\))?\s+\1->SetClassName\(Nan::String::New\("(\w+)"\)\);/g, 'Napi::Function $1 = DefineClass(env, "$2", {'], - [/Local\s+(\w+)\s*=\s*Nan::New\([\w\d:]+\);\s+(\w+)\.Reset\((\1)\);\s+\1->SetClassName\((Nan::String::New|Nan::New<(v8::)*String>)\("(.+?)"\)\);/g, 'Napi::Function $1 = DefineClass(env, "$6", {'], - [/Local\s+(\w+)\s*=\s*Nan::New\([\w\d:]+\);(?:\w+->Reset\(\1\))?\s+\1->SetClassName\(Nan::String::New\("(\w+)"\)\);/g, 'Napi::Function $1 = DefineClass(env, "$2", {'], - [/Nan::New\(([\w\d:]+)\)->GetFunction\(\)/g, 'Napi::Function::New(env, $1)'], - [/Nan::New\(([\w\d:]+)\)->GetFunction()/g, 'Napi::Function::New(env, $1);'], - [/Nan::New\(([\w\d:]+)\)/g, 'Napi::Function::New(env, $1)'], - [/Nan::New\(([\w\d:]+)\)/g, 'Napi::Function::New(env, $1)'], - - // FunctionTemplate to FunctionReference - [/Nan::Persistent<(v8::)*FunctionTemplate>/g, 'Napi::FunctionReference'], - [/Nan::Persistent<(v8::)*Function>/g, 'Napi::FunctionReference'], - [/v8::Local/g, 'Napi::FunctionReference'], - [/Local/g, 'Napi::FunctionReference'], - [/v8::FunctionTemplate/g, 'Napi::FunctionReference'], - [/FunctionTemplate/g, 'Napi::FunctionReference'], - - [/([ ]*)Nan::SetPrototypeMethod\(\w+, "(\w+)", (\w+)\);/g, '$1InstanceMethod("$2", &$3),'], - [/([ ]*)(?:\w+\.Reset\(\w+\);\s+)?\(target\)\.Set\("(\w+)",\s*Nan::GetFunction\((\w+)\)\);/gm, - '});\n\n' + - '$1constructor = Napi::Persistent($3);\n' + - '$1constructor.SuppressDestruct();\n' + - '$1target.Set("$2", $3);'], - - // TODO: Other attribute combinations - [/static_cast\(ReadOnly\s*\|\s*DontDelete\)/gm, - 'static_cast(napi_enumerable | napi_configurable)'], - - [/([\w\d:<>]+?)::Cast\((.+?)\)/g, '$2.As<$1>()'], - - [/\*Nan::Utf8String\(([^)]+)\)/g, '$1->As().Utf8Value().c_str()'], - [/Nan::Utf8String +(\w+)\(([^)]+)\)/g, 'std::string $1 = $2.As()'], - [/Nan::Utf8String/g, 'std::string'], - - [/v8::String::Utf8Value (.+?)\((.+?)\)/g, 'Napi::String $1(env, $2)'], - [/String::Utf8Value (.+?)\((.+?)\)/g, 'Napi::String $1(env, $2)'], - [/\.length\(\)/g, '.Length()'], - - [/Nan::MakeCallback\(([^,]+),[\s\\]+([^,]+),/gm, '$2.MakeCallback($1,'], - - [/class\s+(\w+)\s*:\s*public\s+Nan::ObjectWrap/g, 'class $1 : public Napi::ObjectWrap<$1>'], - [/(\w+)\(([^)]*)\)\s*:\s*Nan::ObjectWrap\(\)\s*(,)?/gm, '$1($2) : Napi::ObjectWrap<$1>()$3'], - - // HandleOKCallback to OnOK - [/HandleOKCallback/g, 'OnOK'], - // HandleErrorCallback to OnError - [/HandleErrorCallback/g, 'OnError'], - - // ex. .As() to .As() - [/\.As\(\)/g, '.As()'], - [/\.As<(Value|Boolean|String|Number|Object|Array|Symbol|External|Function)>\(\)/g, '.As()'], - - // ex. Nan::New(info[0]) to Napi::Number::New(info[0]) - [/Nan::New<(v8::)*Integer>\((.+?)\)/g, 'Napi::Number::New(env, $2)'], - [/Nan::New\(([0-9.]+)\)/g, 'Napi::Number::New(env, $1)'], - [/Nan::New<(v8::)*String>\("(.+?)"\)/g, 'Napi::String::New(env, "$2")'], - [/Nan::New\("(.+?)"\)/g, 'Napi::String::New(env, "$1")'], - [/Nan::New<(v8::)*(.+?)>\(\)/g, 'Napi::$2::New(env)'], - [/Nan::New<(.+?)>\(\)/g, 'Napi::$1::New(env)'], - [/Nan::New<(v8::)*(.+?)>\(/g, 'Napi::$2::New(env, '], - [/Nan::New<(.+?)>\(/g, 'Napi::$1::New(env, '], - [/Nan::NewBuffer\(/g, 'Napi::Buffer::New(env, '], - // TODO: Properly handle this - [/Nan::New\(/g, 'Napi::New(env, '], - - [/\.IsInt32\(\)/g, '.IsNumber()'], - [/->IsInt32\(\)/g, '.IsNumber()'], - - [/(.+?)->BooleanValue\(\)/g, '$1.As().Value()'], - [/(.+?)->Int32Value\(\)/g, '$1.As().Int32Value()'], - [/(.+?)->Uint32Value\(\)/g, '$1.As().Uint32Value()'], - [/(.+?)->IntegerValue\(\)/g, '$1.As().Int64Value()'], - [/(.+?)->NumberValue\(\)/g, '$1.As().DoubleValue()'], - - // ex. Nan::To(info[0]) to info[0].Value() - [/Nan::To\((.+?)\)/g, '$2.To()'], - [/Nan::To<(Boolean|String|Number|Object|Array|Symbol|Function)>\((.+?)\)/g, '$2.To()'], - // ex. Nan::To(info[0]) to info[0].As().Value() - [/Nan::To\((.+?)\)/g, '$1.As().Value()'], - // ex. Nan::To(info[0]) to info[0].As().Int32Value() - [/Nan::To\((.+?)\)/g, '$1.As().Int32Value()'], - // ex. Nan::To(info[0]) to info[0].As().Int32Value() - [/Nan::To\((.+?)\)/g, '$1.As().Int32Value()'], - // ex. Nan::To(info[0]) to info[0].As().Uint32Value() - [/Nan::To\((.+?)\)/g, '$1.As().Uint32Value()'], - // ex. Nan::To(info[0]) to info[0].As().Int64Value() - [/Nan::To\((.+?)\)/g, '$1.As().Int64Value()'], - // ex. Nan::To(info[0]) to info[0].As().FloatValue() - [/Nan::To\((.+?)\)/g, '$1.As().FloatValue()'], - // ex. Nan::To(info[0]) to info[0].As().DoubleValue() - [/Nan::To\((.+?)\)/g, '$1.As().DoubleValue()'], - - [/Nan::New\((\w+)\)->HasInstance\((\w+)\)/g, '$2.InstanceOf($1.Value())'], - - [/Nan::Has\(([^,]+),\s*/gm, '($1).Has('], - [/\.Has\([\s|\\]*Nan::New<(v8::)*String>\(([^)]+)\)\)/gm, '.Has($1)'], - [/\.Has\([\s|\\]*Nan::New\(([^)]+)\)\)/gm, '.Has($1)'], - - [/Nan::Get\(([^,]+),\s*/gm, '($1).Get('], - [/\.Get\([\s|\\]*Nan::New<(v8::)*String>\(([^)]+)\)\)/gm, '.Get($1)'], - [/\.Get\([\s|\\]*Nan::New\(([^)]+)\)\)/gm, '.Get($1)'], - - [/Nan::Set\(([^,]+),\s*/gm, '($1).Set('], - [/\.Set\([\s|\\]*Nan::New<(v8::)*String>\(([^)]+)\)\s*,/gm, '.Set($1,'], - [/\.Set\([\s|\\]*Nan::New\(([^)]+)\)\s*,/gm, '.Set($1,'], - - // ex. node::Buffer::HasInstance(info[0]) to info[0].IsBuffer() - [/node::Buffer::HasInstance\((.+?)\)/g, '$1.IsBuffer()'], - // ex. node::Buffer::Length(info[0]) to info[0].Length() - [/node::Buffer::Length\((.+?)\)/g, '$1.As>().Length()'], - // ex. node::Buffer::Data(info[0]) to info[0].Data() - [/node::Buffer::Data\((.+?)\)/g, '$1.As>().Data()'], - [/Nan::CopyBuffer\(/g, 'Napi::Buffer::Copy(env, '], - - // Nan::AsyncQueueWorker(worker) - [/Nan::AsyncQueueWorker\((.+)\);/g, '$1.Queue();'], - [/Nan::(Undefined|Null|True|False)\(\)/g, 'env.$1()'], - - // Nan::ThrowError(error) to Napi::Error::New(env, error).ThrowAsJavaScriptException() - [/([ ]*)return Nan::Throw(\w*?)Error\((.+?)\);/g, '$1Napi::$2Error::New(env, $3).ThrowAsJavaScriptException();\n$1return env.Null();'], - [/Nan::Throw(\w*?)Error\((.+?)\);\n(\s*)return;/g, 'Napi::$1Error::New(env, $2).ThrowAsJavaScriptException();\n$3return env.Null();'], - [/Nan::Throw(\w*?)Error\((.+?)\);/g, 'Napi::$1Error::New(env, $2).ThrowAsJavaScriptException();\n'], - // Nan::RangeError(error) to Napi::RangeError::New(env, error) - [/Nan::(\w*?)Error\((.+)\)/g, 'Napi::$1Error::New(env, $2)'], - - [/Nan::Set\((.+?),\n* *(.+?),\n* *(.+?),\n* *(.+?)\)/g, '$1.Set($2, $3, $4)'], - - [/Nan::(Escapable)?HandleScope\s+(\w+)\s*;/g, 'Napi::$1HandleScope $2(env);'], - [/Nan::(Escapable)?HandleScope/g, 'Napi::$1HandleScope'], - [/Nan::ForceSet\(([^,]+), ?/g, '$1->DefineProperty('], - [/\.ForceSet\(Napi::String::New\(env, "(\w+)"\),\s*?/g, '.DefineProperty("$1", '], - // [ /Nan::GetPropertyNames\(([^,]+)\)/, '$1->GetPropertyNames()' ], - [/Nan::Equals\(([^,]+),/g, '$1.StrictEquals('], - - [/(.+)->Set\(/g, '$1.Set('], - - [/Nan::Callback/g, 'Napi::FunctionReference'], - - [/Nan::Persistent/g, 'Napi::ObjectReference'], - [/Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target/g, 'Napi::Env& env, Napi::Object& target'], - - [/(\w+)\*\s+(\w+)\s*=\s*Nan::ObjectWrap::Unwrap<\w+>\(info\.This\(\)\);/g, '$1* $2 = this;'], - [/Nan::ObjectWrap::Unwrap<(\w+)>\((.*)\);/g, '$2.Unwrap<$1>();'], - - [/Nan::NAN_METHOD_RETURN_TYPE/g, 'void'], - [/NAN_INLINE/g, 'inline'], - - [/Nan::NAN_METHOD_ARGS_TYPE/g, 'const Napi::CallbackInfo&'], - [/NAN_METHOD\(([\w\d:]+?)\)/g, 'Napi::Value $1(const Napi::CallbackInfo& info)'], - [/static\s*NAN_GETTER\(([\w\d:]+?)\)/g, 'Napi::Value $1(const Napi::CallbackInfo& info)'], - [/NAN_GETTER\(([\w\d:]+?)\)/g, 'Napi::Value $1(const Napi::CallbackInfo& info)'], - [/static\s*NAN_SETTER\(([\w\d:]+?)\)/g, 'void $1(const Napi::CallbackInfo& info, const Napi::Value& value)'], - [/NAN_SETTER\(([\w\d:]+?)\)/g, 'void $1(const Napi::CallbackInfo& info, const Napi::Value& value)'], - [/void Init\((v8::)*Local<(v8::)*Object> exports\)/g, 'Napi::Object Init(Napi::Env env, Napi::Object exports)'], - [/NAN_MODULE_INIT\(([\w\d:]+?)\);/g, 'Napi::Object $1(Napi::Env env, Napi::Object exports);'], - [/NAN_MODULE_INIT\(([\w\d:]+?)\)/g, 'Napi::Object $1(Napi::Env env, Napi::Object exports)'], - - [/::(Init(?:ialize)?)\(target\)/g, '::$1(env, target, module)'], - [/constructor_template/g, 'constructor'], - - [/Nan::FunctionCallbackInfo<(v8::)?Value>[ ]*& [ ]*info\)[ ]*{\n*([ ]*)/gm, 'Napi::CallbackInfo& info) {\n$2Napi::Env env = info.Env();\n$2'], - [/Nan::FunctionCallbackInfo<(v8::)*Value>\s*&\s*info\);/g, 'Napi::CallbackInfo& info);'], - [/Nan::FunctionCallbackInfo<(v8::)*Value>\s*&/g, 'Napi::CallbackInfo&'], - - [/Buffer::HasInstance\(([^)]+)\)/g, '$1.IsBuffer()'], - - [/info\[(\d+)\]->/g, 'info[$1].'], - [/info\[([\w\d]+)\]->/g, 'info[$1].'], - [/info\.This\(\)->/g, 'info.This().'], - [/->Is(Object|String|Int32|Number)\(\)/g, '.Is$1()'], - [/info.GetReturnValue\(\).SetUndefined\(\)/g, 'return env.Undefined()'], - [/info\.GetReturnValue\(\)\.Set\(((\n|.)+?)\);/g, 'return $1;'], - - // ex. Local to Napi::Value - [/v8::Local/g, 'Napi::$1'], - [/Local<(Value|Boolean|String|Number|Object|Array|Symbol|External|Function)>/g, 'Napi::$1'], - - // Declare an env in helper functions that take a Napi::Value - [/(\w+)\(Napi::Value (\w+)(,\s*[^()]+)?\)\s*{\n*([ ]*)/gm, '$1(Napi::Value $2$3) {\n$4Napi::Env env = $2.Env();\n$4'], - - // delete #include and/or - [/#include +(<|")(?:node|nan).h("|>)/g, '#include $1napi.h$2\n#include $1uv.h$2'], - // NODE_MODULE to NODE_API_MODULE - [/NODE_MODULE/g, 'NODE_API_MODULE'], - [/Nan::/g, 'Napi::'], - [/nan.h/g, 'napi.h'], - - // delete .FromJust() - [/\.FromJust\(\)/g, ''], - // delete .ToLocalCheck() - [/\.ToLocalChecked\(\)/g, ''], - [/^.*->SetInternalFieldCount\(.*$/gm, ''], - - // replace using node; and/or using v8; to using Napi; - [/using (node|v8);/g, 'using Napi;'], - [/using namespace (node|Nan|v8);/g, 'using namespace Napi;'], - // delete using v8::Local; - [/using v8::Local;\n/g, ''], - // replace using v8::XXX; with using Napi::XXX - [/using v8::([A-Za-z]+);/g, 'using Napi::$1;'] - -]; - -const paths = listFiles(dir); -paths.forEach(function (dirEntry) { - const filename = dirEntry.split('\\').pop().split('/').pop(); - - // Check whether the file is a source file or a config file - // then execute function accordingly - const sourcePattern = /.+\.h|.+\.cc|.+\.cpp/; - if (sourcePattern.test(filename)) { - convertFile(dirEntry, SourceFileOperations); - } else if (ConfigFileOperations[filename] != null) { - convertFile(dirEntry, ConfigFileOperations[filename]); - } -}); - -function listFiles (dir, filelist) { - const files = fs.readdirSync(dir); - filelist = filelist || []; - files.forEach(function (file) { - if (file === 'node_modules') { - return; - } - - if (fs.statSync(path.join(dir, file)).isDirectory()) { - filelist = listFiles(path.join(dir, file), filelist); - } else { - filelist.push(path.join(dir, file)); - } - }); - return filelist; -} - -function convert (content, operations) { - for (let i = 0; i < operations.length; i++) { - const operation = operations[i]; - content = content.replace(operation[0], operation[1]); - } - return content; -} - -function convertFile (fileName, operations) { - fs.readFile(fileName, 'utf-8', function (err, file) { - if (err) throw err; - - file = convert(file, operations); - - fs.writeFile(fileName, file, function (err) { - if (err) throw err; - }); - }); -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/eslint-format.js b/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/eslint-format.js deleted file mode 100644 index 6923ab7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/tools/eslint-format.js +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env node - -const spawn = require('child_process').spawnSync; - -const filesToCheck = '*.js'; -const FORMAT_START = process.env.FORMAT_START || 'main'; -const IS_WIN = process.platform === 'win32'; -const ESLINT_PATH = IS_WIN ? 'node_modules\\.bin\\eslint.cmd' : 'node_modules/.bin/eslint'; - -function main (args) { - let fix = false; - while (args.length > 0) { - switch (args[0]) { - case '-f': - case '--fix': - fix = true; - break; - default: - } - args.shift(); - } - - // Check js files that change on unstaged file - const fileUnStaged = spawn( - 'git', - ['diff', '--name-only', '--diff-filter=d', FORMAT_START, filesToCheck], - { - encoding: 'utf-8' - } - ); - - // Check js files that change on staged file - const fileStaged = spawn( - 'git', - ['diff', '--name-only', '--cached', '--diff-filter=d', FORMAT_START, filesToCheck], - { - encoding: 'utf-8' - } - ); - - const options = [ - ...fileStaged.stdout.split('\n').filter((f) => f !== ''), - ...fileUnStaged.stdout.split('\n').filter((f) => f !== '') - ]; - - if (fix) { - options.push('--fix'); - } - - const result = spawn(ESLINT_PATH, [...options], { - encoding: 'utf-8' - }); - - if (result.error && result.error.errno === 'ENOENT') { - console.error('Eslint not found! Eslint is supposed to be found at ', ESLINT_PATH); - return 2; - } - - if (result.status === 1) { - console.error('Eslint error:', result.stdout); - const fixCmd = 'npm run lint:fix'; - console.error(`ERROR: please run "${fixCmd}" to format changes in your commit - Note that when running the command locally, please keep your local - main branch and working branch up to date with nodejs/node-addon-api - to exclude un-related complains. - Or you can run "env FORMAT_START=upstream/main ${fixCmd}". - Also fix JS files by yourself if necessary.`); - return 1; - } - - if (result.stderr) { - console.error('Error running eslint:', result.stderr); - return 2; - } -} - -if (require.main === module) { - process.exitCode = main(process.argv.slice(2)); -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/env-paths b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/env-paths deleted file mode 120000 index 6071c92..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/env-paths +++ /dev/null @@ -1 +0,0 @@ -../../env-paths@2.2.1/node_modules/env-paths \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/glob b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/glob deleted file mode 120000 index e88081c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/glob +++ /dev/null @@ -1 +0,0 @@ -../../glob@7.2.3/node_modules/glob \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/graceful-fs b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/graceful-fs deleted file mode 120000 index c0373b9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/graceful-fs +++ /dev/null @@ -1 +0,0 @@ -../../graceful-fs@4.2.11/node_modules/graceful-fs \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/make-fetch-happen b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/make-fetch-happen deleted file mode 120000 index a4d2d2b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/make-fetch-happen +++ /dev/null @@ -1 +0,0 @@ -../../make-fetch-happen@9.1.0/node_modules/make-fetch-happen \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index c6b213d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,52 +0,0 @@ - - -Please look thru your error log for the string `gyp info using node-gyp@` and if the version number is less than the [current release of node-gyp](https://github.com/nodejs/node-gyp/releases) then __please upgrade__ using the instructions at https://github.com/nodejs/node-gyp/blob/master/docs/Updating-npm-bundled-node-gyp.md and try your command again. - -Requests for help with [`node-sass` are very common](https://github.com/nodejs/node-gyp/issues?q=label%3A%22Node+Sass+--%3E+Dart+Sass%22). Please be aware that this package is deprecated, you should seek alternatives and avoid opening new issues about it here. - -* **Node Version**: -* **Platform**: -* **Compiler**: -* **Module**: - -
Verbose output (from npm or node-gyp): - -``` -Paste your log here, between the backticks. It can be: - - npm --verbose output, - - or contents of npm-debug.log, - - or output of node-gyp rebuild --verbose. -Include the command you were trying to run. - -This should look like this: - ->npm --verbose -npm info it worked if it ends with ok -npm verb cli [ -npm verb cli 'C:\\...\\node\\13.9.0\\x64\\node.exe', -npm verb cli 'C:\\...\\node\\13.9.0\\x64\\node_modules\\npm\\bin\\npm-cli.js', -npm verb cli '--verbose' -npm verb cli ] -npm info using npm@6.13.7 -npm info using node@v13.9.0 - -Usage: npm -(...) -``` - -
- - diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bcc4bb1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,17 +0,0 @@ - - -##### Checklist - - -- [ ] `npm install && npm test` passes -- [ ] tests are included -- [ ] documentation is changed or added -- [ ] commit message follows [commit guidelines](https://github.com/googleapis/release-please#how-should-i-write-my-commits) - -##### Description of change - - diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/release-please.yml b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/release-please.yml deleted file mode 100644 index 7d3cf9d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/release-please.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: release-please - -on: - push: - branches: - - master - -jobs: - release-please: - runs-on: ubuntu-latest - steps: - - uses: google-github-actions/release-please-action@v2 - id: release - with: - package-name: node-gyp - release-type: node - changelog-types: > - [{"type":"feat","section":"Features","hidden":false}, - {"type":"fix","section":"Bug Fixes","hidden":false}, - {"type":"bin","section":"Core","hidden":false}, - {"type":"gyp","section":"Core","hidden":false}, - {"type":"lib","section":"Core","hidden":false}, - {"type":"src","section":"Core","hidden":false}, - {"type":"test","section":"Tests","hidden":false}, - {"type":"build","section":"Core","hidden":false}, - {"type":"clean","section":"Core","hidden":false}, - {"type":"configure","section":"Core","hidden":false}, - {"type":"install","section":"Core","hidden":false}, - {"type":"list","section":"Core","hidden":false}, - {"type":"rebuild","section":"Core","hidden":false}, - {"type":"remove","section":"Core","hidden":false}, - {"type":"deps","section":"Core","hidden":false}, - {"type":"python","section":"Core","hidden":false}, - {"type":"lin","section":"Core","hidden":false}, - {"type":"linux","section":"Core","hidden":false}, - {"type":"mac","section":"Core","hidden":false}, - {"type":"macos","section":"Core","hidden":false}, - {"type":"win","section":"Core","hidden":false}, - {"type":"windows","section":"Core","hidden":false}, - {"type":"zos","section":"Core","hidden":false}, - {"type":"doc","section":"Doc","hidden":false}, - {"type":"docs","section":"Doc","hidden":false}, - {"type":"readme","section":"Doc","hidden":false}, - {"type":"chore","section":"Miscellaneous","hidden":false}, - {"type":"refactor","section":"Miscellaneous","hidden":false}, - {"type":"ci","section":"Miscellaneous","hidden":false}, - {"type":"meta","section":"Miscellaneous","hidden":false}] - - # Standard Conventional Commits: `feat` and `fix` - # node-gyp subdirectories: `bin`, `gyp`, `lib`, `src`, `test` - # node-gyp subcommands: `build`, `clean`, `configure`, `install`, `list`, `rebuild`, `remove` - # Core abstract category: `deps` - # Languages/platforms: `python`, `lin`, `linux`, `mac`, `macos`, `win`, `window`, `zos` - # Documentation: `doc`, `docs`, `readme` - # Standard Conventional Commits: `chore` (under "Miscellaneous") - # Miscellaneous abstract categories: `refactor`, `ci`, `meta` diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/tests.yml b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/tests.yml deleted file mode 100644 index f7c9b97..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/tests.yml +++ /dev/null @@ -1,45 +0,0 @@ -# TODO: Line 43, enable pytest --doctest-modules - -name: Tests -on: [push, pull_request] -jobs: - Tests: - strategy: - fail-fast: false - max-parallel: 15 - matrix: - node: [12.x, 14.x, 16.x] - python: ["3.6", "3.8", "3.10"] - os: [macos-latest, ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node }} - - name: Use Python ${{ matrix.python }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - env: - PYTHON_VERSION: ${{ matrix.python }} - - name: Install Dependencies - run: | - npm install --no-progress - pip install flake8 pytest - - name: Set Windows environment - if: matrix.os == 'windows-latest' - run: | - echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV - echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV - - name: Lint Python - if: matrix.os == 'ubuntu-latest' - run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics - - name: Run Python tests - run: python -m pytest - # - name: Run doctests with pytest - # run: python -m pytest --doctest-modules - - name: Run Node tests - run: npm test diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/visual-studio.yml b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/visual-studio.yml deleted file mode 100644 index 6bb4574..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/.github/workflows/visual-studio.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Tests on Windows -on: [push, pull_request] -jobs: - Tests: - strategy: - fail-fast: false - max-parallel: 15 - matrix: - os: [windows-2022] - runs-on: ${{ matrix.os }} - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - name: Install Dependencies - run: | - npm install --no-progress - - name: Set Windows environment - if: matrix.os == 'windows-latest' - run: | - echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV - echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV - - name: Environment Information - run: npx envinfo - - name: Run Node tests - run: npm test diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/CHANGELOG.md deleted file mode 100644 index 1e54fd6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/CHANGELOG.md +++ /dev/null @@ -1,687 +0,0 @@ -# Changelog - -### [8.4.1](https://www.github.com/nodejs/node-gyp/compare/v8.4.0...v8.4.1) (2021-11-19) - - -### Bug Fixes - -* windows command missing space ([#2553](https://www.github.com/nodejs/node-gyp/issues/2553)) ([cc37b88](https://www.github.com/nodejs/node-gyp/commit/cc37b880690706d3c5d04d5a68c76c392a0a23ed)) - - -### Doc - -* fix typo in powershell node-gyp update ([787cf7f](https://www.github.com/nodejs/node-gyp/commit/787cf7f8e5ddd5039e02b64ace6b7b15e06fe0a4)) - - -### Core - -* npmlog@6.0.0 ([8083f6b](https://www.github.com/nodejs/node-gyp/commit/8083f6b855bd7f3326af04c5f5269fc28d7f2508)) - -## [8.4.0](https://www.github.com/nodejs/node-gyp/compare/v8.3.0...v8.4.0) (2021-11-05) - - -### Features - -* build with config.gypi from node headers ([a27dc08](https://www.github.com/nodejs/node-gyp/commit/a27dc08696911c6d81e76cc228697243069103c1)) -* support vs2022 ([#2533](https://www.github.com/nodejs/node-gyp/issues/2533)) ([5a00387](https://www.github.com/nodejs/node-gyp/commit/5a00387e5f8018264a1822f6c4d5dbf425f21cf6)) - -## [8.3.0](https://www.github.com/nodejs/node-gyp/compare/v8.2.0...v8.3.0) (2021-10-11) - - -### Features - -* **gyp:** update gyp to v0.10.0 ([#2521](https://www.github.com/nodejs/node-gyp/issues/2521)) ([5585792](https://www.github.com/nodejs/node-gyp/commit/5585792922a97f0629f143c560efd74470eae87f)) - - -### Tests - -* Python 3.10 was release on Oct. 4th ([#2504](https://www.github.com/nodejs/node-gyp/issues/2504)) ([0a67dcd](https://www.github.com/nodejs/node-gyp/commit/0a67dcd1307f3560495219253241eafcbf4e2a69)) - - -### Miscellaneous - -* **deps:** bump make-fetch-happen from 8.0.14 to 9.1.0 ([b05b4fe](https://www.github.com/nodejs/node-gyp/commit/b05b4fe9891f718f40edf547e9b50e982826d48a)) -* refactor the creation of config.gypi file ([f2ad87f](https://www.github.com/nodejs/node-gyp/commit/f2ad87ff65f98ad66daa7225ad59d99b759a2b07)) - -## [8.2.0](https://www.github.com/nodejs/node-gyp/compare/v8.1.0...v8.2.0) (2021-08-23) - - -### Features - -* **gyp:** update gyp to v0.9.6 ([#2481](https://www.github.com/nodejs/node-gyp/issues/2481)) ([ed9a9ed](https://www.github.com/nodejs/node-gyp/commit/ed9a9ed653a17c84afa3c327161992d0da7d0cea)) - - -### Bug Fixes - -* add error arg back into catch block for older Node.js users ([5cde818](https://www.github.com/nodejs/node-gyp/commit/5cde818aac715477e9e9747966bb6b4c4ed070a8)) -* change default gyp update message ([#2420](https://www.github.com/nodejs/node-gyp/issues/2420)) ([cfd12ff](https://www.github.com/nodejs/node-gyp/commit/cfd12ff3bb0eb4525173413ef6a94b3cd8398cad)) -* doc how to update node-gyp independently from npm ([c8c0af7](https://www.github.com/nodejs/node-gyp/commit/c8c0af72e78141a02b5da4cd4d704838333a90bd)) -* missing spaces ([f0882b1](https://www.github.com/nodejs/node-gyp/commit/f0882b1264b2fa701adbc81a3be0b3cba80e333d)) - - -### Core - -* deep-copy process.config during configure ([#2368](https://www.github.com/nodejs/node-gyp/issues/2368)) ([5f1a06c](https://www.github.com/nodejs/node-gyp/commit/5f1a06c50f3b0c3d292f64948f85a004cfcc5c87)) - - -### Miscellaneous - -* **deps:** bump tar from 6.1.0 to 6.1.2 ([#2474](https://www.github.com/nodejs/node-gyp/issues/2474)) ([ec15a3e](https://www.github.com/nodejs/node-gyp/commit/ec15a3e5012004172713c11eebcc9d852d32d380)) -* fix typos discovered by codespell ([#2442](https://www.github.com/nodejs/node-gyp/issues/2442)) ([2d0ce55](https://www.github.com/nodejs/node-gyp/commit/2d0ce5595e232a3fc7c562cdf39efb77e2312cc1)) -* GitHub Actions Test on node: [12.x, 14.x, 16.x] ([#2439](https://www.github.com/nodejs/node-gyp/issues/2439)) ([b7bccdb](https://www.github.com/nodejs/node-gyp/commit/b7bccdb527d93b0bb0ce99713f083ce2985fe85c)) - - -### Doc - -* correct link to "binding.gyp files out in the wild" ([#2483](https://www.github.com/nodejs/node-gyp/issues/2483)) ([660dd7b](https://www.github.com/nodejs/node-gyp/commit/660dd7b2a822c184be8027b300e68be67b366772)) -* **wiki:** Add a link to the node-midi binding.gyp file. ([b354711](https://www.github.com/nodejs/node-gyp/commit/b3547115f6e356358138310e857c7f1ec627a8a7)) -* **wiki:** add bcrypt ([e199cfa](https://www.github.com/nodejs/node-gyp/commit/e199cfa8fc6161492d2a6ade2190510d0ebf7c0f)) -* **wiki:** Add helpful information ([4eda827](https://www.github.com/nodejs/node-gyp/commit/4eda8275c03dae6d2f5c40f3c1dbe930d84b0f2b)) -* **wiki:** Add node-canvas ([13a9553](https://www.github.com/nodejs/node-gyp/commit/13a955317b39caf98fd1f412d8d3f41599e979fd)) -* **wiki:** Add node-openvg-canvas and node-openvg. ([61f709e](https://www.github.com/nodejs/node-gyp/commit/61f709ec4d9f256a6467e9ff84430a48eeb629d1)) -* **wiki:** add one more example ([77f3632](https://www.github.com/nodejs/node-gyp/commit/77f363272930d3d4d24fd3973be22e6237128fcc)) -* **wiki:** add topcube, node-osmium, and node-osrm ([1a75d2b](https://www.github.com/nodejs/node-gyp/commit/1a75d2bf2f562ba50846893a516e111cfbb50885)) -* **wiki:** Added details for properly fixing ([3d4d9d5](https://www.github.com/nodejs/node-gyp/commit/3d4d9d52d6b5b49de06bb0bb5b68e2686d2b7ebd)) -* **wiki:** Added Ghostscript4JS ([bf4bed1](https://www.github.com/nodejs/node-gyp/commit/bf4bed1b96a7d22fba6f97f4552ad09f32ac3737)) -* **wiki:** added levelup ([1575bce](https://www.github.com/nodejs/node-gyp/commit/1575bce3a53db628bfb023fd6f3258fdf98c3195)) -* **wiki:** Added nk-mysql (nodamysql) ([5b4f2d0](https://www.github.com/nodejs/node-gyp/commit/5b4f2d0e1d5d3eadfd03aaf9c1668340f76c4bea)) -* **wiki:** Added nk-xrm-installer .gyp references, including .py scripts for providing complete reference to examples of fetching source via http, extracting, and moving files (as opposed to copying) ([ceb3088](https://www.github.com/nodejs/node-gyp/commit/ceb30885b74f6789374ef52267b84767be93ebe4)) -* **wiki:** Added tip about resolving frustrating LNK1181 error ([e64798d](https://www.github.com/nodejs/node-gyp/commit/e64798de8cac6031ad598a86d7599e81b4d20b17)) -* **wiki:** ADDED: Node.js binding to OpenCV ([e2dc777](https://www.github.com/nodejs/node-gyp/commit/e2dc77730b09d7ee8682d7713a7603a2d7aacabd)) -* **wiki:** Adding link to node-cryptopp's gyp file ([875adbe](https://www.github.com/nodejs/node-gyp/commit/875adbe2a4669fa5f2be0250ffbf98fb55e800fd)) -* **wiki:** Adding the sharp library to the list ([9dce0e4](https://www.github.com/nodejs/node-gyp/commit/9dce0e41650c3fa973e6135a79632d022c662a1d)) -* **wiki:** Adds node-fann ([23e3d48](https://www.github.com/nodejs/node-gyp/commit/23e3d485ed894ba7c631e9c062f5e366b50c416c)) -* **wiki:** Adds node-inotify and v8-profiler ([b6e542f](https://www.github.com/nodejs/node-gyp/commit/b6e542f644dbbfe22b88524ec500696e06ee4af7)) -* **wiki:** Bumping Python version from 2.3 to 2.7 as per the node-gyp readme ([55ebd6e](https://www.github.com/nodejs/node-gyp/commit/55ebd6ebacde975bf84f7bf4d8c66e64cc7cd0da)) -* **wiki:** C++ build tools version upgraded ([5b899b7](https://www.github.com/nodejs/node-gyp/commit/5b899b70db729c392ced7c98e8e17590c6499fc3)) -* **wiki:** change bcrypt url to binding.gyp file ([e11bdd8](https://www.github.com/nodejs/node-gyp/commit/e11bdd84de6144492d3eb327d67cbf2d62da1a76)) -* **wiki:** Clarification + direct link to VS2010 ([531c724](https://www.github.com/nodejs/node-gyp/commit/531c724561d947b5d870de8d52dd8c3c51c5ec2d)) -* **wiki:** Correcting the link to node-osmium ([fae7516](https://www.github.com/nodejs/node-gyp/commit/fae7516a1d2829b6e234eaded74fb112ebd79a05)) -* **wiki:** Created "binding.gyp" files out in the wild (markdown) ([d4fd143](https://www.github.com/nodejs/node-gyp/commit/d4fd14355bbe57f229f082f47bb2b3670868203f)) -* **wiki:** Created Common issues (markdown) ([a38299e](https://www.github.com/nodejs/node-gyp/commit/a38299ea340ceb0e732c6dc6a1b4760257644839)) -* **wiki:** Created Error: "pre" versions of node cannot be installed (markdown) ([98bc80d](https://www.github.com/nodejs/node-gyp/commit/98bc80d7a62ba70c881f3c39d94f804322e57852)) -* **wiki:** Created Linking to OpenSSL (markdown) ([c46d00d](https://www.github.com/nodejs/node-gyp/commit/c46d00d83bac5173dea8bbbb175a1a7de74fdaca)) -* **wiki:** Created Updating npm's bundled node gyp (markdown) ([e0ac8d1](https://www.github.com/nodejs/node-gyp/commit/e0ac8d15af46aadd1c220599e63199b154a514e6)) -* **wiki:** Created use of undeclared identifier 'TypedArray' (markdown) ([65ba711](https://www.github.com/nodejs/node-gyp/commit/65ba71139e9b7f64ac823e575ee9dbf17d937ce4)) -* **wiki:** Created Visual Studio 2010 Setup (markdown) ([5b80e83](https://www.github.com/nodejs/node-gyp/commit/5b80e834c8f79dda9fb2770a876ff3cf649c06f3)) -* **wiki:** Created Visual studio 2012 setup (markdown) ([becef31](https://www.github.com/nodejs/node-gyp/commit/becef316b6c46a33e783667720ee074a0141d1a5)) -* **wiki:** Destroyed Visual Studio 2010 Setup (markdown) ([93423b4](https://www.github.com/nodejs/node-gyp/commit/93423b43606de9664aeb79635825f5e9941ec9bc)) -* **wiki:** Destroyed Visual studio 2012 setup (markdown) ([3601508](https://www.github.com/nodejs/node-gyp/commit/3601508bb10fa05da0ddc7e70d57e4b4dd679657)) -* **wiki:** Different commands for Windows npm v6 vs. v7 ([0fce46b](https://www.github.com/nodejs/node-gyp/commit/0fce46b53340c85e8091cde347d5ed23a443c82f)) -* **wiki:** Drop in favor of ([9285ff6](https://www.github.com/nodejs/node-gyp/commit/9285ff6e451c52c070a05f05f0a9602621d91d53)) -* **wiki:** Explicit link to Visual C++ 2010 Express ([378c363](https://www.github.com/nodejs/node-gyp/commit/378c3632f02c096ed819ec8f2611c65bef0c0554)) -* **wiki:** fix link to gyp file used to build libsqlite3 ([54db8d7](https://www.github.com/nodejs/node-gyp/commit/54db8d7ac33e3f98220960b5d86cfa18a75b53cb)) -* **wiki:** Fix link to node-zipfile ([92e49a8](https://www.github.com/nodejs/node-gyp/commit/92e49a858ed69cb4847a26a5676ab56ef5e2de33)) -* **wiki:** fixed node-serialport link ([954ee53](https://www.github.com/nodejs/node-gyp/commit/954ee530b3972d1db591fce32368e4e31b5a25d8)) -* **wiki:** I highly missing it in common issue as every windows biggner face that issue ([d617fae](https://www.github.com/nodejs/node-gyp/commit/d617faee29c40871ca5c8f93efd0ce929a40d541)) -* **wiki:** if ouns that the -h did not help. I founs on github that there was support for visual studio 2015, while i couldn't install node-red beacuse it kept telling me the key 2015 was missing. looking in he gyp python code i found the local file was bot up t dat with the github repo. updating took several efforts before i tried to drop the -g option. ([408b72f](https://www.github.com/nodejs/node-gyp/commit/408b72f561329408daeb17834436e381406efcc8)) -* **wiki:** If permissions error, please try and then the command. ([ee8e1c1](https://www.github.com/nodejs/node-gyp/commit/ee8e1c1e5334096d58e0d6bca6c006f2ee9c88cb)) -* **wiki:** Improve Unix instructions ([c3e5487](https://www.github.com/nodejs/node-gyp/commit/c3e548736645b535ea5bce613d74ca3e98598243)) -* **wiki:** link to docs/ from README ([b52e487](https://www.github.com/nodejs/node-gyp/commit/b52e487eac1eb421573d1e67114a242eeff45a00)) -* **wiki:** Lower case L ([3aa2c6b](https://www.github.com/nodejs/node-gyp/commit/3aa2c6bdb07971b87505e32e32548d75264bd19f)) -* **wiki:** Make changes discussed in https://github.com/nodejs/node-gyp/issues/2416 ([1dcad87](https://www.github.com/nodejs/node-gyp/commit/1dcad873539027511a5f0243baf770ea90f6f4e2)) -* **wiki:** move wiki docs into doc/ ([f0a4835](https://www.github.com/nodejs/node-gyp/commit/f0a48355d86534ec3bdabcdb3ce3340fa2e17f39)) -* **wiki:** node-sass in the wild ([d310a73](https://www.github.com/nodejs/node-gyp/commit/d310a73d64d0065050377baac7047472f7424a1b)) -* **wiki:** node-srs was a 404 ([bbca21a](https://www.github.com/nodejs/node-gyp/commit/bbca21a1e1ede4c473aff365ca71989a5bda7b57)) -* **wiki:** Note: VS2010 seems to be no longer available! VS2013 or nothing! ([7b5dcaf](https://www.github.com/nodejs/node-gyp/commit/7b5dcafafccdceae4b8f2b53ac9081a694b6ade8)) -* **wiki:** safer doc names, remove unnecessary TypedArray doc ([161c235](https://www.github.com/nodejs/node-gyp/commit/161c2353ef5b562f4acfb2fd77608fcbd0800fc0)) -* **wiki:** sorry, forgot to mention a specific windows version. ([d69dffc](https://www.github.com/nodejs/node-gyp/commit/d69dffc16c2b1e3c60dcb5d1c35a49270ba22a35)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([7444b47](https://www.github.com/nodejs/node-gyp/commit/7444b47a7caac1e14d1da474a7fcfcf88d328017)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([d766b74](https://www.github.com/nodejs/node-gyp/commit/d766b7427851e6c2edc02e2504a7be9be7e330c0)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([d319b0e](https://www.github.com/nodejs/node-gyp/commit/d319b0e98c7085de8e51bc5595eba4264b99a7d5)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([3c6692d](https://www.github.com/nodejs/node-gyp/commit/3c6692d538f0ce973869aa237118b7d2483feccd)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([93392d5](https://www.github.com/nodejs/node-gyp/commit/93392d559ce6f250b9c7fe8177e6c88603809dc1)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([8841158](https://www.github.com/nodejs/node-gyp/commit/88411588f300e9b7c00fe516ecd977a1feeeb15c)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([81bfa1f](https://www.github.com/nodejs/node-gyp/commit/81bfa1f1b63d522a9f8a9ae9ca0c7ae90fe75140)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([d1cd237](https://www.github.com/nodejs/node-gyp/commit/d1cd237bad06fa507adb354b9e2181a14dc63d24)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([3de9e17](https://www.github.com/nodejs/node-gyp/commit/3de9e17e0b8a387eafe7bd18d0ec1e3191d118e8)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([a9b7096](https://www.github.com/nodejs/node-gyp/commit/a9b70968fb956eab3b95672048b94350e1565ca3)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([3236069](https://www.github.com/nodejs/node-gyp/commit/3236069689e7e0eb15b324fce74ab58158956f98)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([1462755](https://www.github.com/nodejs/node-gyp/commit/14627556966e5d513bdb8e5208f0e1300f68991f)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([7ab1337](https://www.github.com/nodejs/node-gyp/commit/7ab133752a6c402bb96dcd3d671d73e03e9487ad)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([640895d](https://www.github.com/nodejs/node-gyp/commit/640895d36b7448c646a3b850c1e159106f83c724)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([ced8c96](https://www.github.com/nodejs/node-gyp/commit/ced8c968457f285ab8989c291d28173d7730833c)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([27b883a](https://www.github.com/nodejs/node-gyp/commit/27b883a350ad0db6b9130d7b996f35855ec34c7a)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([d29fb13](https://www.github.com/nodejs/node-gyp/commit/d29fb134f1c4b9dd729ba95f2979e69e0934809f)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([2765891](https://www.github.com/nodejs/node-gyp/commit/27658913e6220cf0371b4b73e25a0e4ab11108a1)) -* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([dc97766](https://www.github.com/nodejs/node-gyp/commit/dc9776648d432bca6775c176641f16da14522d4c)) -* **wiki:** Updated Error: "pre" versions of node cannot be installed (markdown) ([e9f8b33](https://www.github.com/nodejs/node-gyp/commit/e9f8b33d1f87d04f22cb09a814d7c55d0fa38446)) -* **wiki:** Updated Home (markdown) ([3407109](https://www.github.com/nodejs/node-gyp/commit/3407109325cf7ba1e925656b9eb75feffab0557c)) -* **wiki:** Updated Home (markdown) ([6e392bc](https://www.github.com/nodejs/node-gyp/commit/6e392bcdd3dd1691773e6e16e1dffc35931b81e0)) -* **wiki:** Updated Home (markdown) ([65efe32](https://www.github.com/nodejs/node-gyp/commit/65efe32ccb8d446ce569453364f922dd9d27c945)) -* **wiki:** Updated Home (markdown) ([ea28f09](https://www.github.com/nodejs/node-gyp/commit/ea28f0947af91fa638be355143f5df89d2e431c8)) -* **wiki:** Updated Home (markdown) ([0e37ff4](https://www.github.com/nodejs/node-gyp/commit/0e37ff48b306c12149661b375895741d3d710da7)) -* **wiki:** Updated Home (markdown) ([b398ef4](https://www.github.com/nodejs/node-gyp/commit/b398ef46f660d2b1506508550dadfb4c35639e4b)) -* **wiki:** Updated Linking to OpenSSL (markdown) ([8919028](https://www.github.com/nodejs/node-gyp/commit/8919028921fd304f08044098434f0dc6071fb7cf)) -* **wiki:** Updated Linking to OpenSSL (markdown) ([c00eb77](https://www.github.com/nodejs/node-gyp/commit/c00eb778fc7dc27e4dab3a9219035ea20458b33b)) -* **wiki:** Updated node-levelup to node-leveldown (broken links) ([59668bb](https://www.github.com/nodejs/node-gyp/commit/59668bb0b904feccf3c09afa2fd37378c77af967)) -* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([d314854](https://www.github.com/nodejs/node-gyp/commit/d31485415ef69d46effa6090c95698341965de1b)) -* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([11858b0](https://www.github.com/nodejs/node-gyp/commit/11858b0655d1eee00c62ad628e719d4378803d14)) -* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([33561e9](https://www.github.com/nodejs/node-gyp/commit/33561e9cbf5f4eb46111318503c77df2c6eb484a)) -* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([4a7f2d0](https://www.github.com/nodejs/node-gyp/commit/4a7f2d0d869a65c99a78504976567017edadf657)) -* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([979a706](https://www.github.com/nodejs/node-gyp/commit/979a7063b950c088a7f4896fc3a48e1d00dfd231)) -* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([e50e04d](https://www.github.com/nodejs/node-gyp/commit/e50e04d7b6a3754ea0aa11fe8cef491b3bc5bdd4)) - -## [8.1.0](https://www.github.com/nodejs/node-gyp/compare/v8.0.0...v8.1.0) (2021-05-28) - - -### Features - -* **gyp:** update gyp to v0.9.1 ([#2402](https://www.github.com/nodejs/node-gyp/issues/2402)) ([814b1b0](https://www.github.com/nodejs/node-gyp/commit/814b1b0eda102afb9fc87e81638a9cf5b650bb10)) - - -### Miscellaneous - -* add `release-please-action` for automated releases ([#2395](https://www.github.com/nodejs/node-gyp/issues/2395)) ([07e9d7c](https://www.github.com/nodejs/node-gyp/commit/07e9d7c7ee80ba119ea760c635f72fd8e7efe198)) - - -### Core - -* fail gracefully if we can't find the username ([#2375](https://www.github.com/nodejs/node-gyp/issues/2375)) ([fca4795](https://www.github.com/nodejs/node-gyp/commit/fca4795512c67dc8420aaa0d913b5b89a4b147f3)) -* log as yes/no whether build dir was created ([#2370](https://www.github.com/nodejs/node-gyp/issues/2370)) ([245dee5](https://www.github.com/nodejs/node-gyp/commit/245dee5b62581309946872ae253226ea3a42c0e3)) - - -### Doc - -* fix v8.0.0 release date ([4b83c3d](https://www.github.com/nodejs/node-gyp/commit/4b83c3de7300457919d53f26d96ea9ad6f6bedd8)) -* remove redundant version info ([#2403](https://www.github.com/nodejs/node-gyp/issues/2403)) ([1423670](https://www.github.com/nodejs/node-gyp/commit/14236709de64b100a424396b91a5115639daa0ef)) -* Update README.md Visual Studio Community page polski to auto ([#2371](https://www.github.com/nodejs/node-gyp/issues/2371)) ([1b4697a](https://www.github.com/nodejs/node-gyp/commit/1b4697abf69ef574a48faf832a7098f4c6c224a5)) - -## v8.0.0 2021-04-03 - -* [[`0d8a6f1b19`](https://github.com/nodejs/node-gyp/commit/0d8a6f1b19)] - **ci**: update actions/setup-node to v2 (#2302) (Sora Morimoto) [#2302](https://github.com/nodejs/node-gyp/pull/2302) -* [[`15a5c7d45b`](https://github.com/nodejs/node-gyp/commit/15a5c7d45b)] - **ci**: migrate deprecated grammar (#2285) (Jiawen Geng) [#2285](https://github.com/nodejs/node-gyp/pull/2285) -* [[`06ddde27f9`](https://github.com/nodejs/node-gyp/commit/06ddde27f9)] - **deps**: sync mutual dependencies with npm (DeeDeeG) [#2348](https://github.com/nodejs/node-gyp/pull/2348) -* [[`a5fd1f41e3`](https://github.com/nodejs/node-gyp/commit/a5fd1f41e3)] - **doc**: add downloads badge (#2352) (Jiawen Geng) [#2352](https://github.com/nodejs/node-gyp/pull/2352) -* [[`cc1cbce056`](https://github.com/nodejs/node-gyp/commit/cc1cbce056)] - **doc**: update macOS\_Catalina.md (#2293) (iMrLopez) [#2293](https://github.com/nodejs/node-gyp/pull/2293) -* [[`6287118fc4`](https://github.com/nodejs/node-gyp/commit/6287118fc4)] - **doc**: updated README.md to copy easily (#2281) (மனோஜ்குமார் பழனிச்சாமி) [#2281](https://github.com/nodejs/node-gyp/pull/2281) -* [[`66c0f04467`](https://github.com/nodejs/node-gyp/commit/66c0f04467)] - **doc**: add missing `sudo` to Catalina doc (Karl Horky) [#2244](https://github.com/nodejs/node-gyp/pull/2244) -* [[`0da2e0140d`](https://github.com/nodejs/node-gyp/commit/0da2e0140d)] - **gyp**: update gyp to v0.8.1 (#2355) (DeeDeeG) [#2355](https://github.com/nodejs/node-gyp/pull/2355) -* [[`0093ec8646`](https://github.com/nodejs/node-gyp/commit/0093ec8646)] - **gyp**: Improve our flake8 linting tests (Christian Clauss) [#2356](https://github.com/nodejs/node-gyp/pull/2356) -* [[`a78b584236`](https://github.com/nodejs/node-gyp/commit/a78b584236)] - **(SEMVER-MAJOR)** **gyp**: remove support for Python 2 (#2300) (Christian Clauss) [#2300](https://github.com/nodejs/node-gyp/pull/2300) -* [[`c3c510d89e`](https://github.com/nodejs/node-gyp/commit/c3c510d89e)] - **gyp**: update gyp to v0.8.0 (#2318) (Christian Clauss) [#2318](https://github.com/nodejs/node-gyp/pull/2318) -* [[`9e1397c52e`](https://github.com/nodejs/node-gyp/commit/9e1397c52e)] - **(SEMVER-MAJOR)** **gyp**: update gyp to v0.7.0 (#2284) (Jiawen Geng) [#2284](https://github.com/nodejs/node-gyp/pull/2284) -* [[`1bd18f3e77`](https://github.com/nodejs/node-gyp/commit/1bd18f3e77)] - **(SEMVER-MAJOR)** **lib**: drop Python 2 support in find-python.js (#2333) (DeeDeeG) [#2333](https://github.com/nodejs/node-gyp/pull/2333) -* [[`e81602ef55`](https://github.com/nodejs/node-gyp/commit/e81602ef55)] - **(SEMVER-MAJOR)** **lib**: migrate requests to fetch (#2220) (Matias Lopez) [#2220](https://github.com/nodejs/node-gyp/pull/2220) -* [[`392b7760b4`](https://github.com/nodejs/node-gyp/commit/392b7760b4)] - **lib**: avoid changing process.config (#2322) (Michaël Zasso) [#2322](https://github.com/nodejs/node-gyp/pull/2322) - -## v7.1.2 2020-10-17 - -* [[`096e3aded5`](https://github.com/nodejs/node-gyp/commit/096e3aded5)] - **gyp**: update gyp to 0.6.2 (Myles Borins) [#2241](https://github.com/nodejs/node-gyp/pull/2241) -* [[`54f97cd243`](https://github.com/nodejs/node-gyp/commit/54f97cd243)] - **doc**: add cmd to reset `xcode-select` to initial state (Valera Rozuvan) [#2235](https://github.com/nodejs/node-gyp/pull/2235) - -## v7.1.1 2020-10-15 - -This release restores the location of shared library builds to the pre-v7 -location. In v7.0.0 until this release, shared library outputs were placed -in a lib.target subdirectory inside the build/{Release,Debug} directory for -builds using `make` (Linux, etc.). This is inconsistent with macOS (Xcode) -behavior and previous node-gyp behavior so has been reverted. -We consider this a bug-fix rather than semver-major change. - -* [[`18bf2d1d38`](https://github.com/nodejs/node-gyp/commit/18bf2d1d38)] - **deps**: update deps to match npm@7 (Rod Vagg) [#2240](https://github.com/nodejs/node-gyp/pull/2240) -* [[`ee6a837cb7`](https://github.com/nodejs/node-gyp/commit/ee6a837cb7)] - **gyp**: update gyp to 0.6.1 (Rod Vagg) [#2238](https://github.com/nodejs/node-gyp/pull/2238) -* [[`3e7f8ccafc`](https://github.com/nodejs/node-gyp/commit/3e7f8ccafc)] - **lib**: better log message when ps fails (Martin Midtgaard) [#2229](https://github.com/nodejs/node-gyp/pull/2229) -* [[`7fb314339f`](https://github.com/nodejs/node-gyp/commit/7fb314339f)] - **test**: GitHub Actions: Test on Python 3.9 (Christian Clauss) [#2230](https://github.com/nodejs/node-gyp/pull/2230) -* [[`754996b9ec`](https://github.com/nodejs/node-gyp/commit/754996b9ec)] - **doc**: replace status badges with new Actions badge (Rod Vagg) [#2218](https://github.com/nodejs/node-gyp/pull/2218) -* [[`2317dc400c`](https://github.com/nodejs/node-gyp/commit/2317dc400c)] - **ci**: switch to GitHub Actions (Shelley Vohr) [#2210](https://github.com/nodejs/node-gyp/pull/2210) -* [[`2cca9b74f7`](https://github.com/nodejs/node-gyp/commit/2cca9b74f7)] - **doc**: drop the --production flag for installing windows-build-tools (DeeDeeG) [#2206](https://github.com/nodejs/node-gyp/pull/2206) - -## v7.1.0 2020-08-12 - -* [[`aaf33c3029`](https://github.com/nodejs/node-gyp/commit/aaf33c3029)] - **build**: add update-gyp script (Samuel Attard) [#2167](https://github.com/nodejs/node-gyp/pull/2167) -* * [[`3baa4e4172`](https://github.com/nodejs/node-gyp/commit/3baa4e4172)] - **(SEMVER-MINOR)** **gyp**: update gyp to 0.4.0 (Samuel Attard) [#2165](https://github.com/nodejs/node-gyp/pull/2165) -* * [[`f461d56c53`](https://github.com/nodejs/node-gyp/commit/f461d56c53)] - **(SEMVER-MINOR)** **build**: support apple silicon (arm64 darwin) builds (Samuel Attard) [#2165](https://github.com/nodejs/node-gyp/pull/2165) -* * [[`ee6fa7d3bc`](https://github.com/nodejs/node-gyp/commit/ee6fa7d3bc)] - **docs**: note that node-gyp@7 should solve Catalina CLT issues (Rod Vagg) [#2156](https://github.com/nodejs/node-gyp/pull/2156) -* * [[`4fc8ff179d`](https://github.com/nodejs/node-gyp/commit/4fc8ff179d)] - **doc**: silence curl for macOS Catalina acid test (Chia Wei Ong) [#2150](https://github.com/nodejs/node-gyp/pull/2150) -* * [[`7857cb2eb1`](https://github.com/nodejs/node-gyp/commit/7857cb2eb1)] - **deps**: increase "engines" to "node" : "\>= 10.12.0" (DeeDeeG) [#2153](https://github.com/nodejs/node-gyp/pull/2153) - -## v7.0.0 2020-06-03 - -* [[`e18a61afc1`](https://github.com/nodejs/node-gyp/commit/e18a61afc1)] - **build**: shrink bloated addon binaries on windows (Shelley Vohr) [#2060](https://github.com/nodejs/node-gyp/pull/2060) -* [[`4937722cf5`](https://github.com/nodejs/node-gyp/commit/4937722cf5)] - **(SEMVER-MAJOR)** **deps**: replace mkdirp with {recursive} mkdir (Rod Vagg) [#2123](https://github.com/nodejs/node-gyp/pull/2123) -* [[`d45438a047`](https://github.com/nodejs/node-gyp/commit/d45438a047)] - **(SEMVER-MAJOR)** **deps**: update deps, match to npm@7 (Rod Vagg) [#2126](https://github.com/nodejs/node-gyp/pull/2126) -* [[`ba4f34b7d6`](https://github.com/nodejs/node-gyp/commit/ba4f34b7d6)] - **doc**: update catalina xcode clt download link (Dario Vladovic) [#2133](https://github.com/nodejs/node-gyp/pull/2133) -* [[`f7bfce96ed`](https://github.com/nodejs/node-gyp/commit/f7bfce96ed)] - **doc**: update acid test and introduce curl|bash test script (Dario Vladovic) [#2105](https://github.com/nodejs/node-gyp/pull/2105) -* [[`e529f3309d`](https://github.com/nodejs/node-gyp/commit/e529f3309d)] - **doc**: update README to reflect upgrade to gyp-next (Ujjwal Sharma) [#2092](https://github.com/nodejs/node-gyp/pull/2092) -* [[`9aed6286a3`](https://github.com/nodejs/node-gyp/commit/9aed6286a3)] - **doc**: give more attention to Catalina issues doc (Matheus Marchini) [#2134](https://github.com/nodejs/node-gyp/pull/2134) -* [[`963f2a7b48`](https://github.com/nodejs/node-gyp/commit/963f2a7b48)] - **doc**: improve Catalina discoverability for search engines (Matheus Marchini) [#2135](https://github.com/nodejs/node-gyp/pull/2135) -* [[`7b75af349b`](https://github.com/nodejs/node-gyp/commit/7b75af349b)] - **doc**: add macOS Catalina software update info (Karl Horky) [#2078](https://github.com/nodejs/node-gyp/pull/2078) -* [[`4f23c7bee2`](https://github.com/nodejs/node-gyp/commit/4f23c7bee2)] - **doc**: update link to the code of conduct (#2073) (Michaël Zasso) [#2073](https://github.com/nodejs/node-gyp/pull/2073) -* [[`473cfa283f`](https://github.com/nodejs/node-gyp/commit/473cfa283f)] - **doc**: note in README that Python 3.8 is supported (#2072) (Michaël Zasso) [#2072](https://github.com/nodejs/node-gyp/pull/2072) -* [[`e7402b4a7c`](https://github.com/nodejs/node-gyp/commit/e7402b4a7c)] - **doc**: update catalina xcode cli tools download link (#2044) (Dario Vladović) [#2044](https://github.com/nodejs/node-gyp/pull/2044) -* [[`35de45984f`](https://github.com/nodejs/node-gyp/commit/35de45984f)] - **doc**: update catalina xcode cli tools download link; formatting (Jonathan Hult) [#2034](https://github.com/nodejs/node-gyp/pull/2034) -* [[`48642191f5`](https://github.com/nodejs/node-gyp/commit/48642191f5)] - **doc**: add download link for Command Line Tools for Xcode (Przemysław Bitkowski) [#2029](https://github.com/nodejs/node-gyp/pull/2029) -* [[`ae5b150051`](https://github.com/nodejs/node-gyp/commit/ae5b150051)] - **doc**: Catalina suggestion: remove /Library/Developer/CommandLineTools (Christian Clauss) [#2022](https://github.com/nodejs/node-gyp/pull/2022) -* [[`d1dea13fe4`](https://github.com/nodejs/node-gyp/commit/d1dea13fe4)] - **doc**: fix changelog 6.1.0 release year to be 2020 (Quentin Vernot) [#2021](https://github.com/nodejs/node-gyp/pull/2021) -* [[`6356117b08`](https://github.com/nodejs/node-gyp/commit/6356117b08)] - **doc, bin**: stop suggesting opening node-gyp issues (Bartosz Sosnowski) [#2096](https://github.com/nodejs/node-gyp/pull/2096) -* [[`a6b76a8b48`](https://github.com/nodejs/node-gyp/commit/a6b76a8b48)] - **gyp**: update gyp to 0.2.1 (Ujjwal Sharma) [#2092](https://github.com/nodejs/node-gyp/pull/2092) -* [[`ebc34ec823`](https://github.com/nodejs/node-gyp/commit/ebc34ec823)] - **gyp**: update gyp to 0.2.0 (Ujjwal Sharma) [#2092](https://github.com/nodejs/node-gyp/pull/2092) -* [[`972780bde7`](https://github.com/nodejs/node-gyp/commit/972780bde7)] - **(SEMVER-MAJOR)** **gyp**: sync code base with nodejs repo (#1975) (Michaël Zasso) [#1975](https://github.com/nodejs/node-gyp/pull/1975) -* [[`c255ffbf6a`](https://github.com/nodejs/node-gyp/commit/c255ffbf6a)] - **lib**: drop "-2" flag for "py.exe" launcher (DeeDeeG) [#2131](https://github.com/nodejs/node-gyp/pull/2131) -* [[`1f7e1e93b5`](https://github.com/nodejs/node-gyp/commit/1f7e1e93b5)] - **lib**: ignore VS instances that cause COMExceptions (Andrew Casey) [#2018](https://github.com/nodejs/node-gyp/pull/2018) -* [[`741ab096d5`](https://github.com/nodejs/node-gyp/commit/741ab096d5)] - **test**: remove support for EOL versions of Node.js (Shelley Vohr) -* [[`ca86ef2539`](https://github.com/nodejs/node-gyp/commit/ca86ef2539)] - **test**: bump actions/checkout from v1 to v2 (BSKY) [#2063](https://github.com/nodejs/node-gyp/pull/2063) - -## v6.1.0 2020-01-08 - -* [[`9a7dd16b76`](https://github.com/nodejs/node-gyp/commit/9a7dd16b76)] - **doc**: remove backticks from Python version list (Rod Vagg) [#2011](https://github.com/nodejs/node-gyp/pull/2011) -* [[`26cd6eaea6`](https://github.com/nodejs/node-gyp/commit/26cd6eaea6)] - **doc**: add GitHub Actions badge (#1994) (Rod Vagg) [#1994](https://github.com/nodejs/node-gyp/pull/1994) -* [[`312c12ef4f`](https://github.com/nodejs/node-gyp/commit/312c12ef4f)] - **doc**: update macOS\_Catalina.md (#1992) (James Home) [#1992](https://github.com/nodejs/node-gyp/pull/1992) -* [[`f7b6b6b77b`](https://github.com/nodejs/node-gyp/commit/f7b6b6b77b)] - **doc**: fix typo in README.md (#1985) (Suraneti Rodsuwan) [#1985](https://github.com/nodejs/node-gyp/pull/1985) -* [[`6b8f2652dd`](https://github.com/nodejs/node-gyp/commit/6b8f2652dd)] - **doc**: add travis badge (Rod Vagg) [#1971](https://github.com/nodejs/node-gyp/pull/1971) -* [[`20aa0b44f7`](https://github.com/nodejs/node-gyp/commit/20aa0b44f7)] - **doc**: macOS Catalina add two commands (Christian Clauss) [#1962](https://github.com/nodejs/node-gyp/pull/1962) -* [[`14f2a07a39`](https://github.com/nodejs/node-gyp/commit/14f2a07a39)] - **gyp**: list(dict) so we can del dict(key) while iterating (Christian Clauss) [#2009](https://github.com/nodejs/node-gyp/pull/2009) -* [[`f242ce4d2c`](https://github.com/nodejs/node-gyp/commit/f242ce4d2c)] - **lib**: compatibility with semver ≥ 7 (`new` for semver.Range) (Xavier Guimard) [#2006](https://github.com/nodejs/node-gyp/pull/2006) -* [[`3bcba2a01a`](https://github.com/nodejs/node-gyp/commit/3bcba2a01a)] - **(SEMVER-MINOR)** **lib**: noproxy support, match proxy detection to `request` (Matias Lopez) [#1978](https://github.com/nodejs/node-gyp/pull/1978) -* [[`470cc2178e`](https://github.com/nodejs/node-gyp/commit/470cc2178e)] - **test**: remove old docker test harness (#1993) (Rod Vagg) [#1993](https://github.com/nodejs/node-gyp/pull/1993) -* [[`31ecc8421d`](https://github.com/nodejs/node-gyp/commit/31ecc8421d)] - **test**: add Windows to GitHub Actions testing (#1996) (Christian Clauss) [#1996](https://github.com/nodejs/node-gyp/pull/1996) -* [[`5a729e86ee`](https://github.com/nodejs/node-gyp/commit/5a729e86ee)] - **test**: fix typo in header download test (#2001) (Richard Lau) [#2001](https://github.com/nodejs/node-gyp/pull/2001) -* [[`345c70e56d`](https://github.com/nodejs/node-gyp/commit/345c70e56d)] - **test**: direct python invocation & simpler pyenv (Matias Lopez) [#1979](https://github.com/nodejs/node-gyp/pull/1979) -* [[`d6a7e0e1fb`](https://github.com/nodejs/node-gyp/commit/d6a7e0e1fb)] - **test**: fix macOS Travis on Python 2.7 & 3.7 (Christian Clauss) [#1979](https://github.com/nodejs/node-gyp/pull/1979) -* [[`5a64e9bd32`](https://github.com/nodejs/node-gyp/commit/5a64e9bd32)] - **test**: initial Github Actions with Ubuntu & macOS (Christian Clauss) [#1985](https://github.com/nodejs/node-gyp/pull/1985) -* [[`04da736d38`](https://github.com/nodejs/node-gyp/commit/04da736d38)] - **test**: fix Python unittests (cclauss) [#1961](https://github.com/nodejs/node-gyp/pull/1961) -* [[`0670e5189d`](https://github.com/nodejs/node-gyp/commit/0670e5189d)] - **test**: add header download test (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796) -* [[`c506a6a150`](https://github.com/nodejs/node-gyp/commit/c506a6a150)] - **test**: configure proper devDir for invoking configure() (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796) - -## v6.0.1 2019-11-01 - -* [[`8ec2e681d5`](https://github.com/nodejs/node-gyp/commit/8ec2e681d5)] - **doc**: add macOS\_Catalina.md document (cclauss) [#1940](https://github.com/nodejs/node-gyp/pull/1940) -* [[`1b11be63cc`](https://github.com/nodejs/node-gyp/commit/1b11be63cc)] - **gyp**: python3 fixes: utf8 decode, use of 'None' in eval (Wilfried Goesgens) [#1925](https://github.com/nodejs/node-gyp/pull/1925) -* [[`c0282daa48`](https://github.com/nodejs/node-gyp/commit/c0282daa48)] - **gyp**: iteritems() -\> items() in compile\_commands\_json.py (cclauss) [#1947](https://github.com/nodejs/node-gyp/pull/1947) -* [[`d8e09a1b6a`](https://github.com/nodejs/node-gyp/commit/d8e09a1b6a)] - **gyp**: make cmake python3 compatible (gengjiawen) [#1944](https://github.com/nodejs/node-gyp/pull/1944) -* [[`9c0f3404f0`](https://github.com/nodejs/node-gyp/commit/9c0f3404f0)] - **gyp**: fix TypeError in XcodeVersion() (Christian Clauss) [#1939](https://github.com/nodejs/node-gyp/pull/1939) -* [[`bb2eb72a3f`](https://github.com/nodejs/node-gyp/commit/bb2eb72a3f)] - **gyp**: finish decode stdout on Python 3 (Christian Clauss) [#1937](https://github.com/nodejs/node-gyp/pull/1937) -* [[`f0693413d9`](https://github.com/nodejs/node-gyp/commit/f0693413d9)] - **src,win**: allow 403 errors for arm64 node.lib (Richard Lau) [#1934](https://github.com/nodejs/node-gyp/pull/1934) -* [[`c60c22de58`](https://github.com/nodejs/node-gyp/commit/c60c22de58)] - **deps**: update deps to roughly match current npm@6 (Rod Vagg) [#1920](https://github.com/nodejs/node-gyp/pull/1920) -* [[`b91718eefc`](https://github.com/nodejs/node-gyp/commit/b91718eefc)] - **test**: upgrade Linux Travis CI to Python 3.8 (Christian Clauss) [#1923](https://github.com/nodejs/node-gyp/pull/1923) -* [[`3538a317b6`](https://github.com/nodejs/node-gyp/commit/3538a317b6)] - **doc**: adjustments to the README.md for new users (Dan Pike) [#1919](https://github.com/nodejs/node-gyp/pull/1919) -* [[`4fff8458c0`](https://github.com/nodejs/node-gyp/commit/4fff8458c0)] - **travis**: ignore failed `brew upgrade npm`, update xcode (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932) -* [[`60e4488f08`](https://github.com/nodejs/node-gyp/commit/60e4488f08)] - **build**: avoid bare exceptions in xcode\_emulation.py (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932) -* [[`032db2a2d0`](https://github.com/nodejs/node-gyp/commit/032db2a2d0)] - **lib,install**: always download SHA sums on Windows (Sam Hughes) [#1926](https://github.com/nodejs/node-gyp/pull/1926) -* [[`5a83630c33`](https://github.com/nodejs/node-gyp/commit/5a83630c33)] - **travis**: add Windows + Python 3.8 to the mix (Rod Vagg) [#1921](https://github.com/nodejs/node-gyp/pull/1921) - -## v6.0.0 2019-10-04 - -* [[`dd0e97ef0b`](https://github.com/nodejs/node-gyp/commit/dd0e97ef0b)] - **(SEMVER-MAJOR)** **lib**: try to find `python` after `python3` (Sam Roberts) [#1907](https://github.com/nodejs/node-gyp/pull/1907) -* [[`f60ed47d14`](https://github.com/nodejs/node-gyp/commit/f60ed47d14)] - **travis**: add Python 3.5 and 3.6 tests on Linux (Christian Clauss) [#1903](https://github.com/nodejs/node-gyp/pull/1903) -* [[`c763ca1838`](https://github.com/nodejs/node-gyp/commit/c763ca1838)] - **(SEMVER-MAJOR)** **doc**: Declare that node-gyp is Python 3 compatible (cclauss) [#1811](https://github.com/nodejs/node-gyp/pull/1811) -* [[`3d1c60ab81`](https://github.com/nodejs/node-gyp/commit/3d1c60ab81)] - **(SEMVER-MAJOR)** **lib**: accept Python 3 by default (João Reis) [#1844](https://github.com/nodejs/node-gyp/pull/1844) -* [[`c6e3b65a23`](https://github.com/nodejs/node-gyp/commit/c6e3b65a23)] - **(SEMVER-MAJOR)** **lib**: raise the minimum Python version from 2.6 to 2.7 (cclauss) [#1818](https://github.com/nodejs/node-gyp/pull/1818) - -## v5.1.1 2020-05-25 - -* [[`bdd3a79abe`](https://github.com/nodejs/node-gyp/commit/bdd3a79abe)] - **build**: shrink bloated addon binaries on windows (Shelley Vohr) [#2060](https://github.com/nodejs/node-gyp/pull/2060) -* [[`1f2ba75bc0`](https://github.com/nodejs/node-gyp/commit/1f2ba75bc0)] - **doc**: add macOS Catalina software update info (Karl Horky) [#2078](https://github.com/nodejs/node-gyp/pull/2078) -* [[`c106d915f5`](https://github.com/nodejs/node-gyp/commit/c106d915f5)] - **doc**: update catalina xcode cli tools download link (#2044) (Dario Vladović) [#2044](https://github.com/nodejs/node-gyp/pull/2044) -* [[`9a6fea92e2`](https://github.com/nodejs/node-gyp/commit/9a6fea92e2)] - **doc**: update catalina xcode cli tools download link; formatting (Jonathan Hult) [#2034](https://github.com/nodejs/node-gyp/pull/2034) -* [[`59b0b1add8`](https://github.com/nodejs/node-gyp/commit/59b0b1add8)] - **doc**: add download link for Command Line Tools for Xcode (Przemysław Bitkowski) [#2029](https://github.com/nodejs/node-gyp/pull/2029) -* [[`bb8d0e7b10`](https://github.com/nodejs/node-gyp/commit/bb8d0e7b10)] - **doc**: Catalina suggestion: remove /Library/Developer/CommandLineTools (Christian Clauss) [#2022](https://github.com/nodejs/node-gyp/pull/2022) -* [[`fb2e80d4e3`](https://github.com/nodejs/node-gyp/commit/fb2e80d4e3)] - **doc**: update link to the code of conduct (#2073) (Michaël Zasso) [#2073](https://github.com/nodejs/node-gyp/pull/2073) -* [[`251d9c885c`](https://github.com/nodejs/node-gyp/commit/251d9c885c)] - **doc**: note in README that Python 3.8 is supported (#2072) (Michaël Zasso) [#2072](https://github.com/nodejs/node-gyp/pull/2072) -* [[`2b6fc3c8d6`](https://github.com/nodejs/node-gyp/commit/2b6fc3c8d6)] - **doc, bin**: stop suggesting opening node-gyp issues (Bartosz Sosnowski) [#2096](https://github.com/nodejs/node-gyp/pull/2096) -* [[`a876ae58ad`](https://github.com/nodejs/node-gyp/commit/a876ae58ad)] - **test**: bump actions/checkout from v1 to v2 (BSKY) [#2063](https://github.com/nodejs/node-gyp/pull/2063) - -## v5.1.0 2020-02-05 - -* [[`f37a8b40d0`](https://github.com/nodejs/node-gyp/commit/f37a8b40d0)] - **doc**: add GitHub Actions badge (#1994) (Rod Vagg) [#1994](https://github.com/nodejs/node-gyp/pull/1994) -* [[`cb3f6aae5e`](https://github.com/nodejs/node-gyp/commit/cb3f6aae5e)] - **doc**: update macOS\_Catalina.md (#1992) (James Home) [#1992](https://github.com/nodejs/node-gyp/pull/1992) -* [[`0607596a4c`](https://github.com/nodejs/node-gyp/commit/0607596a4c)] - **doc**: fix typo in README.md (#1985) (Suraneti Rodsuwan) [#1985](https://github.com/nodejs/node-gyp/pull/1985) -* [[`0d5a415a14`](https://github.com/nodejs/node-gyp/commit/0d5a415a14)] - **doc**: add travis badge (Rod Vagg) [#1971](https://github.com/nodejs/node-gyp/pull/1971) -* [[`103740cd95`](https://github.com/nodejs/node-gyp/commit/103740cd95)] - **gyp**: list(dict) so we can del dict(key) while iterating (Christian Clauss) [#2009](https://github.com/nodejs/node-gyp/pull/2009) -* [[`278dcddbdd`](https://github.com/nodejs/node-gyp/commit/278dcddbdd)] - **lib**: ignore VS instances that cause COMExceptions (Andrew Casey) [#2018](https://github.com/nodejs/node-gyp/pull/2018) -* [[`1694907bbf`](https://github.com/nodejs/node-gyp/commit/1694907bbf)] - **lib**: compatibility with semver ≥ 7 (`new` for semver.Range) (Xavier Guimard) [#2006](https://github.com/nodejs/node-gyp/pull/2006) -* [[`a3f1143514`](https://github.com/nodejs/node-gyp/commit/a3f1143514)] - **(SEMVER-MINOR)** **lib**: noproxy support, match proxy detection to `request` (Matias Lopez) [#1978](https://github.com/nodejs/node-gyp/pull/1978) -* [[`52365819c7`](https://github.com/nodejs/node-gyp/commit/52365819c7)] - **test**: remove old docker test harness (#1993) (Rod Vagg) [#1993](https://github.com/nodejs/node-gyp/pull/1993) -* [[`bc509c511d`](https://github.com/nodejs/node-gyp/commit/bc509c511d)] - **test**: add Windows to GitHub Actions testing (#1996) (Christian Clauss) [#1996](https://github.com/nodejs/node-gyp/pull/1996) -* [[`91ee26dd48`](https://github.com/nodejs/node-gyp/commit/91ee26dd48)] - **test**: fix typo in header download test (#2001) (Richard Lau) [#2001](https://github.com/nodejs/node-gyp/pull/2001) -* [[`0923f344c9`](https://github.com/nodejs/node-gyp/commit/0923f344c9)] - **test**: direct python invocation & simpler pyenv (Matias Lopez) [#1979](https://github.com/nodejs/node-gyp/pull/1979) -* [[`32c8744b34`](https://github.com/nodejs/node-gyp/commit/32c8744b34)] - **test**: fix macOS Travis on Python 2.7 & 3.7 (Christian Clauss) [#1979](https://github.com/nodejs/node-gyp/pull/1979) -* [[`fd4b1351e4`](https://github.com/nodejs/node-gyp/commit/fd4b1351e4)] - **test**: initial Github Actions with Ubuntu & macOS (Christian Clauss) [#1985](https://github.com/nodejs/node-gyp/pull/1985) - -## v5.0.7 2019-12-16 - -Republish of v5.0.6 with unnecessary tarball removed from pack file. - -## v5.0.6 2019-12-16 - -* [[`cdec00286f`](https://github.com/nodejs/node-gyp/commit/cdec00286f)] - **doc**: adjustments to the README.md for new users (Dan Pike) [#1919](https://github.com/nodejs/node-gyp/pull/1919) -* [[`b7c8233ef2`](https://github.com/nodejs/node-gyp/commit/b7c8233ef2)] - **test**: fix Python unittests (cclauss) [#1961](https://github.com/nodejs/node-gyp/pull/1961) -* [[`e12b00ab0a`](https://github.com/nodejs/node-gyp/commit/e12b00ab0a)] - **doc**: macOS Catalina add two commands (Christian Clauss) [#1962](https://github.com/nodejs/node-gyp/pull/1962) -* [[`70b9890c0d`](https://github.com/nodejs/node-gyp/commit/70b9890c0d)] - **test**: add header download test (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796) -* [[`4029fa8629`](https://github.com/nodejs/node-gyp/commit/4029fa8629)] - **test**: configure proper devDir for invoking configure() (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796) -* [[`fe8b02cc8b`](https://github.com/nodejs/node-gyp/commit/fe8b02cc8b)] - **doc**: add macOS\_Catalina.md document (cclauss) [#1940](https://github.com/nodejs/node-gyp/pull/1940) -* [[`8ea47ce365`](https://github.com/nodejs/node-gyp/commit/8ea47ce365)] - **gyp**: python3 fixes: utf8 decode, use of 'None' in eval (Wilfried Goesgens) [#1925](https://github.com/nodejs/node-gyp/pull/1925) -* [[`c7229716ba`](https://github.com/nodejs/node-gyp/commit/c7229716ba)] - **gyp**: iteritems() -\> items() in compile\_commands\_json.py (cclauss) [#1947](https://github.com/nodejs/node-gyp/pull/1947) -* [[`2a18b2a0f8`](https://github.com/nodejs/node-gyp/commit/2a18b2a0f8)] - **gyp**: make cmake python3 compatible (gengjiawen) [#1944](https://github.com/nodejs/node-gyp/pull/1944) -* [[`70f391e844`](https://github.com/nodejs/node-gyp/commit/70f391e844)] - **gyp**: fix TypeError in XcodeVersion() (Christian Clauss) [#1939](https://github.com/nodejs/node-gyp/pull/1939) -* [[`9f4f0fa34e`](https://github.com/nodejs/node-gyp/commit/9f4f0fa34e)] - **gyp**: finish decode stdout on Python 3 (Christian Clauss) [#1937](https://github.com/nodejs/node-gyp/pull/1937) -* [[`7cf507906d`](https://github.com/nodejs/node-gyp/commit/7cf507906d)] - **src,win**: allow 403 errors for arm64 node.lib (Richard Lau) [#1934](https://github.com/nodejs/node-gyp/pull/1934) -* [[`ad0d182c01`](https://github.com/nodejs/node-gyp/commit/ad0d182c01)] - **deps**: update deps to roughly match current npm@6 (Rod Vagg) [#1920](https://github.com/nodejs/node-gyp/pull/1920) -* [[`1553081ed6`](https://github.com/nodejs/node-gyp/commit/1553081ed6)] - **test**: upgrade Linux Travis CI to Python 3.8 (Christian Clauss) [#1923](https://github.com/nodejs/node-gyp/pull/1923) -* [[`0705cae9aa`](https://github.com/nodejs/node-gyp/commit/0705cae9aa)] - **travis**: ignore failed `brew upgrade npm`, update xcode (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932) -* [[`7bfdb6f5bf`](https://github.com/nodejs/node-gyp/commit/7bfdb6f5bf)] - **build**: avoid bare exceptions in xcode\_emulation.py (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932) -* [[`7edf7658fa`](https://github.com/nodejs/node-gyp/commit/7edf7658fa)] - **lib,install**: always download SHA sums on Windows (Sam Hughes) [#1926](https://github.com/nodejs/node-gyp/pull/1926) -* [[`69056d04fe`](https://github.com/nodejs/node-gyp/commit/69056d04fe)] - **travis**: add Windows + Python 3.8 to the mix (Rod Vagg) [#1921](https://github.com/nodejs/node-gyp/pull/1921) - -## v5.0.5 2019-10-04 - -* [[`3891391746`](https://github.com/nodejs/node-gyp/commit/3891391746)] - **doc**: reconcile README with Python 3 compat changes (Rod Vagg) [#1911](https://github.com/nodejs/node-gyp/pull/1911) -* [[`07f81f1920`](https://github.com/nodejs/node-gyp/commit/07f81f1920)] - **lib**: accept Python 3 after Python 2 (Sam Roberts) [#1910](https://github.com/nodejs/node-gyp/pull/1910) -* [[`04ce59f4a2`](https://github.com/nodejs/node-gyp/commit/04ce59f4a2)] - **doc**: clarify Python configuration, etc (Sam Roberts) [#1908](https://github.com/nodejs/node-gyp/pull/1908) -* [[`01c46ee3df`](https://github.com/nodejs/node-gyp/commit/01c46ee3df)] - **gyp**: add \_\_lt\_\_ to MSVSSolutionEntry (João Reis) [#1904](https://github.com/nodejs/node-gyp/pull/1904) -* [[`735d961b99`](https://github.com/nodejs/node-gyp/commit/735d961b99)] - **win**: support VS 2017 Desktop Express (João Reis) [#1902](https://github.com/nodejs/node-gyp/pull/1902) -* [[`3834156a92`](https://github.com/nodejs/node-gyp/commit/3834156a92)] - **test**: add Python 3.5 and 3.6 tests on Linux (cclauss) [#1909](https://github.com/nodejs/node-gyp/pull/1909) -* [[`1196e990d8`](https://github.com/nodejs/node-gyp/commit/1196e990d8)] - **src**: update to standard@14 (Rod Vagg) [#1899](https://github.com/nodejs/node-gyp/pull/1899) -* [[`53ee7dfe89`](https://github.com/nodejs/node-gyp/commit/53ee7dfe89)] - **gyp**: fix undefined name: cflags --\> ldflags (Christian Clauss) [#1901](https://github.com/nodejs/node-gyp/pull/1901) -* [[`5871dcf6c9`](https://github.com/nodejs/node-gyp/commit/5871dcf6c9)] - **src,win**: add support for fetching arm64 node.lib (Richard Townsend) [#1875](https://github.com/nodejs/node-gyp/pull/1875) - -## v5.0.4 2019-09-27 - -* [[`1236869ffc`](https://github.com/nodejs/node-gyp/commit/1236869ffc)] - **gyp**: modify XcodeVersion() to convert "4.2" to "0420" and "10.0" to "1000" (Christian Clauss) [#1895](https://github.com/nodejs/node-gyp/pull/1895) -* [[`36638afe48`](https://github.com/nodejs/node-gyp/commit/36638afe48)] - **gyp**: more decode stdout on Python 3 (cclauss) [#1894](https://github.com/nodejs/node-gyp/pull/1894) -* [[`f753c167c5`](https://github.com/nodejs/node-gyp/commit/f753c167c5)] - **gyp**: decode stdout on Python 3 (cclauss) [#1890](https://github.com/nodejs/node-gyp/pull/1890) -* [[`60a4083523`](https://github.com/nodejs/node-gyp/commit/60a4083523)] - **doc**: update xcode install instructions to match Node's BUILDING (Nhan Khong) [#1884](https://github.com/nodejs/node-gyp/pull/1884) -* [[`19dbc9ac32`](https://github.com/nodejs/node-gyp/commit/19dbc9ac32)] - **deps**: update tar to 4.4.12 (Matheus Marchini) [#1889](https://github.com/nodejs/node-gyp/pull/1889) -* [[`5f3ed92181`](https://github.com/nodejs/node-gyp/commit/5f3ed92181)] - **bin**: fix the usage instructions (Halit Ogunc) [#1888](https://github.com/nodejs/node-gyp/pull/1888) -* [[`aab118edf1`](https://github.com/nodejs/node-gyp/commit/aab118edf1)] - **lib**: adding keep-alive header to download requests (Milad Farazmand) [#1863](https://github.com/nodejs/node-gyp/pull/1863) -* [[`1186e89326`](https://github.com/nodejs/node-gyp/commit/1186e89326)] - **lib**: ignore non-critical os.userInfo() failures (Rod Vagg) [#1835](https://github.com/nodejs/node-gyp/pull/1835) -* [[`785e527c3d`](https://github.com/nodejs/node-gyp/commit/785e527c3d)] - **doc**: fix missing argument for setting python path (lagorsse) [#1802](https://github.com/nodejs/node-gyp/pull/1802) -* [[`a97615196c`](https://github.com/nodejs/node-gyp/commit/a97615196c)] - **gyp**: rm semicolons (Python != JavaScript) (MattIPv4) [#1858](https://github.com/nodejs/node-gyp/pull/1858) -* [[`06019bac24`](https://github.com/nodejs/node-gyp/commit/06019bac24)] - **gyp**: assorted typo fixes (XhmikosR) [#1853](https://github.com/nodejs/node-gyp/pull/1853) -* [[`3f4972c1ca`](https://github.com/nodejs/node-gyp/commit/3f4972c1ca)] - **gyp**: use "is" when comparing to None (Vladyslav Burzakovskyy) [#1860](https://github.com/nodejs/node-gyp/pull/1860) -* [[`1cb4708073`](https://github.com/nodejs/node-gyp/commit/1cb4708073)] - **src,win**: improve unmanaged handling (Peter Sabath) [#1852](https://github.com/nodejs/node-gyp/pull/1852) -* [[`5553cd910e`](https://github.com/nodejs/node-gyp/commit/5553cd910e)] - **gyp**: improve Windows+Cygwin compatibility (Jose Quijada) [#1817](https://github.com/nodejs/node-gyp/pull/1817) -* [[`8bcb1fbb43`](https://github.com/nodejs/node-gyp/commit/8bcb1fbb43)] - **gyp**: Python 3 Windows fixes (João Reis) [#1843](https://github.com/nodejs/node-gyp/pull/1843) -* [[`2e24d0a326`](https://github.com/nodejs/node-gyp/commit/2e24d0a326)] - **test**: accept Python 3 in test-find-python.js (João Reis) [#1843](https://github.com/nodejs/node-gyp/pull/1843) -* [[`1267b4dc1c`](https://github.com/nodejs/node-gyp/commit/1267b4dc1c)] - **build**: add test run Python 3.7 on macOS (Christian Clauss) [#1843](https://github.com/nodejs/node-gyp/pull/1843) -* [[`da1b031aa3`](https://github.com/nodejs/node-gyp/commit/da1b031aa3)] - **build**: import StringIO on Python 2 and Python 3 (Christian Clauss) [#1836](https://github.com/nodejs/node-gyp/pull/1836) -* [[`fa0ed4aa42`](https://github.com/nodejs/node-gyp/commit/fa0ed4aa42)] - **build**: more Python 3 compat, replace compile with ast (cclauss) [#1820](https://github.com/nodejs/node-gyp/pull/1820) -* [[`18d5c7c9d0`](https://github.com/nodejs/node-gyp/commit/18d5c7c9d0)] - **win,src**: update win\_delay\_load\_hook.cc to work with /clr (Ivan Petrovic) [#1819](https://github.com/nodejs/node-gyp/pull/1819) - -## v5.0.3 2019-07-17 - -* [[`66ad305775`](https://github.com/nodejs/node-gyp/commit/66ad305775)] - **python**: accept Python 3 conditionally (João Reis) [#1815](https://github.com/nodejs/node-gyp/pull/1815) -* [[`7e7fce3fed`](https://github.com/nodejs/node-gyp/commit/7e7fce3fed)] - **python**: move Python detection to its own file (João Reis) [#1815](https://github.com/nodejs/node-gyp/pull/1815) -* [[`e40c99e283`](https://github.com/nodejs/node-gyp/commit/e40c99e283)] - **src**: implement standard.js linting (Rod Vagg) [#1794](https://github.com/nodejs/node-gyp/pull/1794) -* [[`bb92c761a9`](https://github.com/nodejs/node-gyp/commit/bb92c761a9)] - **test**: add Node.js 6 on Windows to Travis CI (João Reis) [#1812](https://github.com/nodejs/node-gyp/pull/1812) -* [[`7fd924079f`](https://github.com/nodejs/node-gyp/commit/7fd924079f)] - **test**: increase tap timeout (João Reis) [#1812](https://github.com/nodejs/node-gyp/pull/1812) -* [[`7e8127068f`](https://github.com/nodejs/node-gyp/commit/7e8127068f)] - **test**: cover supported node versions with travis (Rod Vagg) [#1809](https://github.com/nodejs/node-gyp/pull/1809) -* [[`24109148df`](https://github.com/nodejs/node-gyp/commit/24109148df)] - **test**: downgrade to tap@^12 for continued Node 6 support (Rod Vagg) [#1808](https://github.com/nodejs/node-gyp/pull/1808) -* [[`656117cc4a`](https://github.com/nodejs/node-gyp/commit/656117cc4a)] - **win**: make VS path match case-insensitive (João Reis) [#1806](https://github.com/nodejs/node-gyp/pull/1806) - -## v5.0.2 2019-06-27 - -* [[`2761afbf73`](https://github.com/nodejs/node-gyp/commit/2761afbf73)] - **build,test**: add duplicate symbol test (Gabriel Schulhof) [#1689](https://github.com/nodejs/node-gyp/pull/1689) -* [[`82f129d6de`](https://github.com/nodejs/node-gyp/commit/82f129d6de)] - **gyp**: replace optparse to argparse (KiYugadgeter) [#1591](https://github.com/nodejs/node-gyp/pull/1591) -* [[`afaaa29c61`](https://github.com/nodejs/node-gyp/commit/afaaa29c61)] - **gyp**: remove from \_\_future\_\_ import with\_statement (cclauss) [#1799](https://github.com/nodejs/node-gyp/pull/1799) -* [[`a991f633d6`](https://github.com/nodejs/node-gyp/commit/a991f633d6)] - **gyp**: fix the remaining Python 3 issues (cclauss) [#1793](https://github.com/nodejs/node-gyp/pull/1793) -* [[`f952b08f84`](https://github.com/nodejs/node-gyp/commit/f952b08f84)] - **gyp**: move from \_\_future\_\_ import to the top of the file (cclauss) [#1789](https://github.com/nodejs/node-gyp/pull/1789) -* [[`4f4a677dfa`](https://github.com/nodejs/node-gyp/commit/4f4a677dfa)] - **gyp**: use different default compiler for z/OS (Shuowang (Wayne) Zhang) [#1768](https://github.com/nodejs/node-gyp/pull/1768) -* [[`03683f09d6`](https://github.com/nodejs/node-gyp/commit/03683f09d6)] - **lib**: code de-duplication (Pavel Medvedev) [#965](https://github.com/nodejs/node-gyp/pull/965) -* [[`611bc3c89f`](https://github.com/nodejs/node-gyp/commit/611bc3c89f)] - **lib**: add .json suffix for explicit require (Rod Vagg) [#1787](https://github.com/nodejs/node-gyp/pull/1787) -* [[`d3478d7b0b`](https://github.com/nodejs/node-gyp/commit/d3478d7b0b)] - **meta**: add to .gitignore (Refael Ackermann) [#1573](https://github.com/nodejs/node-gyp/pull/1573) -* [[`7a9a038e9e`](https://github.com/nodejs/node-gyp/commit/7a9a038e9e)] - **test**: add parallel test runs on macOS and Windows (cclauss) [#1800](https://github.com/nodejs/node-gyp/pull/1800) -* [[`7dd7f2b2a2`](https://github.com/nodejs/node-gyp/commit/7dd7f2b2a2)] - **test**: fix Python syntax error in test-adding.js (cclauss) [#1793](https://github.com/nodejs/node-gyp/pull/1793) -* [[`395f843de0`](https://github.com/nodejs/node-gyp/commit/395f843de0)] - **test**: replace self-signed cert with 'localhost' (Rod Vagg) [#1795](https://github.com/nodejs/node-gyp/pull/1795) -* [[`a52c6eb9e8`](https://github.com/nodejs/node-gyp/commit/a52c6eb9e8)] - **test**: migrate from tape to tap (Rod Vagg) [#1795](https://github.com/nodejs/node-gyp/pull/1795) -* [[`ec2eb44a30`](https://github.com/nodejs/node-gyp/commit/ec2eb44a30)] - **test**: use Nan in duplicate\_symbols (Gabriel Schulhof) [#1689](https://github.com/nodejs/node-gyp/pull/1689) -* [[`1597c84aad`](https://github.com/nodejs/node-gyp/commit/1597c84aad)] - **test**: use Travis CI to run tests on every pull request (cclauss) [#1752](https://github.com/nodejs/node-gyp/pull/1752) -* [[`dd9bf929ac`](https://github.com/nodejs/node-gyp/commit/dd9bf929ac)] - **zos**: update compiler options (Shuowang (Wayne) Zhang) [#1768](https://github.com/nodejs/node-gyp/pull/1768) - -## v5.0.1 2019-06-20 - -* [[`e3861722ed`](https://github.com/nodejs/node-gyp/commit/e3861722ed)] - **doc**: document --jobs max (David Sanders) [#1770](https://github.com/nodejs/node-gyp/pull/1770) -* [[`1cfdb28886`](https://github.com/nodejs/node-gyp/commit/1cfdb28886)] - **lib**: reintroduce support for iojs file naming for releases \>= 1 && \< 4 (Samuel Attard) [#1777](https://github.com/nodejs/node-gyp/pull/1777) - -## v5.0.0 2019-06-13 - -* [[`8a83972743`](https://github.com/nodejs/node-gyp/commit/8a83972743)] - **(SEMVER-MAJOR)** **bin**: follow XDG OS conventions for storing data (Selwyn) [#1570](https://github.com/nodejs/node-gyp/pull/1570) -* [[`9e46872ea3`](https://github.com/nodejs/node-gyp/commit/9e46872ea3)] - **bin,lib**: remove extra comments/lines/spaces (Jon Moss) [#1508](https://github.com/nodejs/node-gyp/pull/1508) -* [[`8098ebdeb4`](https://github.com/nodejs/node-gyp/commit/8098ebdeb4)] - **deps**: replace `osenv` dependency with native `os` (Selwyn) -* [[`f83b457e03`](https://github.com/nodejs/node-gyp/commit/f83b457e03)] - **deps**: bump request to 2.8.7, fixes heok/hawk issues (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492) -* [[`323cee7323`](https://github.com/nodejs/node-gyp/commit/323cee7323)] - **deps**: pin `request` version range (Refael Ackermann) [#1300](https://github.com/nodejs/node-gyp/pull/1300) -* [[`c515912d08`](https://github.com/nodejs/node-gyp/commit/c515912d08)] - **doc**: improve issue template (Bartosz Sosnowski) [#1618](https://github.com/nodejs/node-gyp/pull/1618) -* [[`cca2d66727`](https://github.com/nodejs/node-gyp/commit/cca2d66727)] - **doc**: python info needs own header (Taylor D. Lee) [#1245](https://github.com/nodejs/node-gyp/pull/1245) -* [[`3e64c780f5`](https://github.com/nodejs/node-gyp/commit/3e64c780f5)] - **doc**: lint README.md (Jon Moss) [#1498](https://github.com/nodejs/node-gyp/pull/1498) -* [[`a20faedc91`](https://github.com/nodejs/node-gyp/commit/a20faedc91)] - **(SEMVER-MAJOR)** **gyp**: enable MARMASM items only on new VS versions (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762) -* [[`721eb691cf`](https://github.com/nodejs/node-gyp/commit/721eb691cf)] - **gyp**: teach MSVS generator about MARMASM Items (Jon Kunkee) [#1679](https://github.com/nodejs/node-gyp/pull/1679) -* [[`91744bfecc`](https://github.com/nodejs/node-gyp/commit/91744bfecc)] - **gyp**: add support for Windows on Arm (Richard Townsend) [#1739](https://github.com/nodejs/node-gyp/pull/1739) -* [[`a6e0a6c7ed`](https://github.com/nodejs/node-gyp/commit/a6e0a6c7ed)] - **gyp**: move compile\_commands\_json (Paul Maréchal) [#1661](https://github.com/nodejs/node-gyp/pull/1661) -* [[`92e8b52cee`](https://github.com/nodejs/node-gyp/commit/92e8b52cee)] - **gyp**: fix target --\> self.target (cclauss) -* [[`febdfa2137`](https://github.com/nodejs/node-gyp/commit/febdfa2137)] - **gyp**: fix sntex error (cclauss) [#1333](https://github.com/nodejs/node-gyp/pull/1333) -* [[`588d333c14`](https://github.com/nodejs/node-gyp/commit/588d333c14)] - **gyp**: \_winreg module was renamed to winreg in Python 3. (Craig Rodrigues) -* [[`98226d198c`](https://github.com/nodejs/node-gyp/commit/98226d198c)] - **gyp**: replace basestring with str, but only on Python 3. (Craig Rodrigues) -* [[`7535e4478e`](https://github.com/nodejs/node-gyp/commit/7535e4478e)] - **gyp**: replace deprecated functions (Craig Rodrigues) -* [[`2040cd21cc`](https://github.com/nodejs/node-gyp/commit/2040cd21cc)] - **gyp**: use print as a function, as specified in PEP 3105. (Craig Rodrigues) -* [[`abef93ded5`](https://github.com/nodejs/node-gyp/commit/abef93ded5)] - **gyp**: get ready for python 3 (cclauss) -* [[`43031fadcb`](https://github.com/nodejs/node-gyp/commit/43031fadcb)] - **python**: clean-up detection (João Reis) [#1582](https://github.com/nodejs/node-gyp/pull/1582) -* [[`49ab79d221`](https://github.com/nodejs/node-gyp/commit/49ab79d221)] - **python**: more informative error (Refael Ackermann) [#1269](https://github.com/nodejs/node-gyp/pull/1269) -* [[`997bc3c748`](https://github.com/nodejs/node-gyp/commit/997bc3c748)] - **readme**: add ARM64 info to MSVC setup instructions (Jon Kunkee) [#1655](https://github.com/nodejs/node-gyp/pull/1655) -* [[`788e767179`](https://github.com/nodejs/node-gyp/commit/788e767179)] - **test**: remove unused variable (João Reis) -* [[`6f5a408934`](https://github.com/nodejs/node-gyp/commit/6f5a408934)] - **tools**: fix usage of inherited -fPIC and -fPIE (Jens) [#1340](https://github.com/nodejs/node-gyp/pull/1340) -* [[`0efb8fb34b`](https://github.com/nodejs/node-gyp/commit/0efb8fb34b)] - **(SEMVER-MAJOR)** **win**: support running in VS Command Prompt (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762) -* [[`360ddbdf3a`](https://github.com/nodejs/node-gyp/commit/360ddbdf3a)] - **(SEMVER-MAJOR)** **win**: add support for Visual Studio 2019 (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762) -* [[`8f43f68275`](https://github.com/nodejs/node-gyp/commit/8f43f68275)] - **(SEMVER-MAJOR)** **win**: detect all VS versions in node-gyp (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762) -* [[`7fe4095974`](https://github.com/nodejs/node-gyp/commit/7fe4095974)] - **(SEMVER-MAJOR)** **win**: generic Visual Studio 2017 detection (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762) -* [[`7a71d68bce`](https://github.com/nodejs/node-gyp/commit/7a71d68bce)] - **win**: use msbuild from the configure stage (Bartosz Sosnowski) [#1654](https://github.com/nodejs/node-gyp/pull/1654) -* [[`d3b21220a0`](https://github.com/nodejs/node-gyp/commit/d3b21220a0)] - **win**: fix delay-load hook for electron 4 (Andy Dill) -* [[`81f3a92338`](https://github.com/nodejs/node-gyp/commit/81f3a92338)] - Update list of Node.js versions to test against. (Ben Noordhuis) [#1670](https://github.com/nodejs/node-gyp/pull/1670) -* [[`4748f6ab75`](https://github.com/nodejs/node-gyp/commit/4748f6ab75)] - Remove deprecated compatibility code. (Ben Noordhuis) [#1670](https://github.com/nodejs/node-gyp/pull/1670) -* [[`45e3221fd4`](https://github.com/nodejs/node-gyp/commit/45e3221fd4)] - Remove an outdated workaround for Python 2.4 (cclauss) [#1650](https://github.com/nodejs/node-gyp/pull/1650) -* [[`721dc7d314`](https://github.com/nodejs/node-gyp/commit/721dc7d314)] - Add ARM64 to MSBuild /Platform logic (Jon Kunkee) [#1655](https://github.com/nodejs/node-gyp/pull/1655) -* [[`a5b7410497`](https://github.com/nodejs/node-gyp/commit/a5b7410497)] - Add ESLint no-unused-vars rule (Jon Moss) [#1497](https://github.com/nodejs/node-gyp/pull/1497) - -## v4.0.0 2019-04-24 - -* [[`ceed5cbe10`](https://github.com/nodejs/node-gyp/commit/ceed5cbe10)] - **deps**: updated tar package version to 4.4.8 (Pobegaylo Maksim) [#1713](https://github.com/nodejs/node-gyp/pull/1713) -* [[`374519e066`](https://github.com/nodejs/node-gyp/commit/374519e066)] - **(SEMVER-MAJOR)** Upgrade to tar v3 (isaacs) [#1212](https://github.com/nodejs/node-gyp/pull/1212) -* [[`e6699d13cd`](https://github.com/nodejs/node-gyp/commit/e6699d13cd)] - **test**: fix addon test for Node.js 12 and V8 7.4 (Richard Lau) [#1705](https://github.com/nodejs/node-gyp/pull/1705) -* [[`0c6bf530a0`](https://github.com/nodejs/node-gyp/commit/0c6bf530a0)] - **lib**: use print() for python version detection (GreenAddress) [#1534](https://github.com/nodejs/node-gyp/pull/1534) - -## v3.8.0 2018-08-09 - -* [[`c5929cb4fe`](https://github.com/nodejs/node-gyp/commit/c5929cb4fe)] - **doc**: update Xcode preferences tab name. (Ivan Daniluk) [#1330](https://github.com/nodejs/node-gyp/pull/1330) -* [[`8b488da8b9`](https://github.com/nodejs/node-gyp/commit/8b488da8b9)] - **doc**: update link to commit guidelines (Jonas Hermsmeier) [#1456](https://github.com/nodejs/node-gyp/pull/1456) -* [[`b4fe8c16f9`](https://github.com/nodejs/node-gyp/commit/b4fe8c16f9)] - **doc**: fix visual studio links (Bartosz Sosnowski) [#1490](https://github.com/nodejs/node-gyp/pull/1490) -* [[`536759c7e9`](https://github.com/nodejs/node-gyp/commit/536759c7e9)] - **configure**: use sys.version\_info to get python version (Yang Guo) [#1504](https://github.com/nodejs/node-gyp/pull/1504) -* [[`94c39c604e`](https://github.com/nodejs/node-gyp/commit/94c39c604e)] - **gyp**: fix ninja build failure (GYP patch) (Daniel Bevenius) [nodejs/node#12484](https://github.com/nodejs/node/pull/12484) -* [[`e8ea74e0fa`](https://github.com/nodejs/node-gyp/commit/e8ea74e0fa)] - **tools**: patch gyp to avoid xcrun errors (Ujjwal Sharma) [nodejs/node#21520](https://github.com/nodejs/node/pull/21520) -* [[`ea9aff44f2`](https://github.com/nodejs/node-gyp/commit/ea9aff44f2)] - **tools**: fix "the the" typos in comments (Masashi Hirano) [nodejs/node#20716](https://github.com/nodejs/node/pull/20716) -* [[`207e5aa4fd`](https://github.com/nodejs/node-gyp/commit/207e5aa4fd)] - **gyp**: implement LD/LDXX for ninja and FIPS (Sam Roberts) -* [[`b416c5f4b7`](https://github.com/nodejs/node-gyp/commit/b416c5f4b7)] - **gyp**: enable cctest to use objects (gyp part) (Daniel Bevenius) [nodejs/node#12450](https://github.com/nodejs/node/pull/12450) -* [[`40692d016b`](https://github.com/nodejs/node-gyp/commit/40692d016b)] - **gyp**: add compile\_commands.json gyp generator (Ben Noordhuis) [nodejs/node#12450](https://github.com/nodejs/node/pull/12450) -* [[`fc3c4e2b10`](https://github.com/nodejs/node-gyp/commit/fc3c4e2b10)] - **gyp**: float gyp patch for long filenames (Anna Henningsen) [nodejs/node#7963](https://github.com/nodejs/node/pull/7963) -* [[`8aedbfdef6`](https://github.com/nodejs/node-gyp/commit/8aedbfdef6)] - **gyp**: backport GYP fix to fix AIX shared suffix (Stewart Addison) -* [[`6cd84b84fc`](https://github.com/nodejs/node-gyp/commit/6cd84b84fc)] - **test**: formatting and minor fixes for execFileSync replacement (Rod Vagg) [#1521](https://github.com/nodejs/node-gyp/pull/1521) -* [[`60e421363f`](https://github.com/nodejs/node-gyp/commit/60e421363f)] - **test**: added test/processExecSync.js for when execFileSync is not available. (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492) -* [[`969447c5bd`](https://github.com/nodejs/node-gyp/commit/969447c5bd)] - **deps**: bump request to 2.8.7, fixes heok/hawk issues (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492) -* [[`340403ccfe`](https://github.com/nodejs/node-gyp/commit/340403ccfe)] - **win**: improve parsing of SDK version (Alessandro Vergani) [#1516](https://github.com/nodejs/node-gyp/pull/1516) - -## v3.7.0 2018-06-08 - -* [[`84cea7b30d`](https://github.com/nodejs/node-gyp/commit/84cea7b30d)] - Remove unused gyp test scripts. (Ben Noordhuis) [#1458](https://github.com/nodejs/node-gyp/pull/1458) -* [[`0540e4ec63`](https://github.com/nodejs/node-gyp/commit/0540e4ec63)] - **gyp**: escape spaces in filenames in make generator (Jeff Senn) [#1436](https://github.com/nodejs/node-gyp/pull/1436) -* [[`88fc6fa0ec`](https://github.com/nodejs/node-gyp/commit/88fc6fa0ec)] - Drop dependency on minimatch. (Brian Woodward) [#1158](https://github.com/nodejs/node-gyp/pull/1158) -* [[`1e203c5148`](https://github.com/nodejs/node-gyp/commit/1e203c5148)] - Fix include path when pointing to Node.js source (Richard Lau) [#1055](https://github.com/nodejs/node-gyp/pull/1055) -* [[`53d8cb967c`](https://github.com/nodejs/node-gyp/commit/53d8cb967c)] - Prefix build targets with /t: on Windows (Natalie Wolfe) [#1164](https://github.com/nodejs/node-gyp/pull/1164) -* [[`53a5f8ff38`](https://github.com/nodejs/node-gyp/commit/53a5f8ff38)] - **gyp**: add support for .mm files to msvs generator (Julien Racle) [#1167](https://github.com/nodejs/node-gyp/pull/1167) -* [[`dd8561e528`](https://github.com/nodejs/node-gyp/commit/dd8561e528)] - **zos**: don't use universal-new-lines mode (John Barboza) [#1451](https://github.com/nodejs/node-gyp/pull/1451) -* [[`e5a69010ed`](https://github.com/nodejs/node-gyp/commit/e5a69010ed)] - **zos**: add search locations for libnode.x (John Barboza) [#1451](https://github.com/nodejs/node-gyp/pull/1451) -* [[`79febace53`](https://github.com/nodejs/node-gyp/commit/79febace53)] - **doc**: update macOS information in README (Josh Parnham) [#1323](https://github.com/nodejs/node-gyp/pull/1323) -* [[`9425448945`](https://github.com/nodejs/node-gyp/commit/9425448945)] - **gyp**: don't print xcodebuild not found errors (Gibson Fahnestock) [#1370](https://github.com/nodejs/node-gyp/pull/1370) -* [[`6f1286f5b2`](https://github.com/nodejs/node-gyp/commit/6f1286f5b2)] - Fix infinite install loop. (Ben Noordhuis) [#1384](https://github.com/nodejs/node-gyp/pull/1384) -* [[`2580b9139e`](https://github.com/nodejs/node-gyp/commit/2580b9139e)] - Update `--nodedir` description in README. (Ben Noordhuis) [#1372](https://github.com/nodejs/node-gyp/pull/1372) -* [[`a61360391a`](https://github.com/nodejs/node-gyp/commit/a61360391a)] - Update README with another way to install on windows (JeffAtDeere) [#1352](https://github.com/nodejs/node-gyp/pull/1352) -* [[`47496bf6dc`](https://github.com/nodejs/node-gyp/commit/47496bf6dc)] - Fix IndexError when parsing GYP files. (Ben Noordhuis) [#1267](https://github.com/nodejs/node-gyp/pull/1267) -* [[`b2024dee7b`](https://github.com/nodejs/node-gyp/commit/b2024dee7b)] - **zos**: support platform (John Barboza) [#1276](https://github.com/nodejs/node-gyp/pull/1276) -* [[`90d86512f4`](https://github.com/nodejs/node-gyp/commit/90d86512f4)] - **win**: run PS with `-NoProfile` (Refael Ackermann) [#1292](https://github.com/nodejs/node-gyp/pull/1292) -* [[`2da5f86ef7`](https://github.com/nodejs/node-gyp/commit/2da5f86ef7)] - **doc**: add github PR and Issue templates (Gibson Fahnestock) [#1228](https://github.com/nodejs/node-gyp/pull/1228) -* [[`a46a770d68`](https://github.com/nodejs/node-gyp/commit/a46a770d68)] - **doc**: update proposed DCO and CoC (Mikeal Rogers) [#1229](https://github.com/nodejs/node-gyp/pull/1229) -* [[`7e803d58e0`](https://github.com/nodejs/node-gyp/commit/7e803d58e0)] - **doc**: headerify the Install instructions (Nick Schonning) [#1225](https://github.com/nodejs/node-gyp/pull/1225) -* [[`f27599193a`](https://github.com/nodejs/node-gyp/commit/f27599193a)] - **gyp**: update xml string encoding conversion (Liu Chao) [#1203](https://github.com/nodejs/node-gyp/pull/1203) -* [[`0a07e481f7`](https://github.com/nodejs/node-gyp/commit/0a07e481f7)] - **configure**: don't set ensure if tarball is set (Gibson Fahnestock) [#1220](https://github.com/nodejs/node-gyp/pull/1220) - -## v3.6.3 2018-06-08 - -* [[`90cd2e8da9`](https://github.com/nodejs/node-gyp/commit/90cd2e8da9)] - **gyp**: fix regex to match multi-digit versions (Jonas Hermsmeier) [#1455](https://github.com/nodejs/node-gyp/pull/1455) -* [[`7900122337`](https://github.com/nodejs/node-gyp/commit/7900122337)] - deps: pin `request` version range (Refael Ackerman) [#1300](https://github.com/nodejs/node-gyp/pull/1300) - -## v3.6.2 2017-06-01 - -* [[`72afdd62cd`](https://github.com/nodejs/node-gyp/commit/72afdd62cd)] - **build**: rename copyNodeLib() to doBuild() (Liu Chao) [#1206](https://github.com/nodejs/node-gyp/pull/1206) -* [[`bad903ac70`](https://github.com/nodejs/node-gyp/commit/bad903ac70)] - **win**: more robust parsing of SDK version (Refael Ackermann) [#1198](https://github.com/nodejs/node-gyp/pull/1198) -* [[`241752f381`](https://github.com/nodejs/node-gyp/commit/241752f381)] - Log dist-url. (Ben Noordhuis) [#1170](https://github.com/nodejs/node-gyp/pull/1170) -* [[`386746c7d1`](https://github.com/nodejs/node-gyp/commit/386746c7d1)] - **configure**: use full path in node_lib_file GYP var (Pavel Medvedev) [#964](https://github.com/nodejs/node-gyp/pull/964) -* [[`0913b2dd99`](https://github.com/nodejs/node-gyp/commit/0913b2dd99)] - **build, win**: use target_arch to link with node.lib (Pavel Medvedev) [#964](https://github.com/nodejs/node-gyp/pull/964) -* [[`c307b302f7`](https://github.com/nodejs/node-gyp/commit/c307b302f7)] - **doc**: blorb about setting `npm_config_OPTION_NAME` (Refael Ackermann) [#1185](https://github.com/nodejs/node-gyp/pull/1185) - -## v3.6.1 2017-04-30 - -* [[`49801716c2`](https://github.com/nodejs/node-gyp/commit/49801716c2)] - **test**: fix test-find-python on v0.10.x buildbot. (Ben Noordhuis) [#1172](https://github.com/nodejs/node-gyp/pull/1172) -* [[`a83a3801fc`](https://github.com/nodejs/node-gyp/commit/a83a3801fc)] - **test**: fix test/test-configure-python on AIX (Richard Lau) [#1131](https://github.com/nodejs/node-gyp/pull/1131) -* [[`8a767145c9`](https://github.com/nodejs/node-gyp/commit/8a767145c9)] - **gyp**: Revert quote_cmd workaround (Kunal Pathak) [#1153](https://github.com/nodejs/node-gyp/pull/1153) -* [[`c09cf7671e`](https://github.com/nodejs/node-gyp/commit/c09cf7671e)] - **doc**: add a note for using `configure` on Windows (Vse Mozhet Byt) [#1152](https://github.com/nodejs/node-gyp/pull/1152) -* [[`da9cb5f411`](https://github.com/nodejs/node-gyp/commit/da9cb5f411)] - Delete superfluous .patch files. (Ben Noordhuis) [#1122](https://github.com/nodejs/node-gyp/pull/1122) - -## v3.6.0 2017-03-16 - -* [[`ae141e1906`](https://github.com/nodejs/node-gyp/commit/ae141e1906)] - **win**: find and setup for VS2017 (Refael Ackermann) [#1130](https://github.com/nodejs/node-gyp/pull/1130) -* [[`ec5fc36a80`](https://github.com/nodejs/node-gyp/commit/ec5fc36a80)] - Add support to build node.js with chakracore for ARM. (Kunal Pathak) [#873](https://github.com/nodejs/node-gyp/pull/873) -* [[`a04ea3051a`](https://github.com/nodejs/node-gyp/commit/a04ea3051a)] - Add support to build node.js with chakracore. (Kunal Pathak) [#873](https://github.com/nodejs/node-gyp/pull/873) -* [[`93d7fa83c8`](https://github.com/nodejs/node-gyp/commit/93d7fa83c8)] - Upgrade semver dependency. (Ben Noordhuis) [#1107](https://github.com/nodejs/node-gyp/pull/1107) -* [[`ff9a6fadfd`](https://github.com/nodejs/node-gyp/commit/ff9a6fadfd)] - Update link of gyp as Google code is shutting down (Peter Dave Hello) [#1061](https://github.com/nodejs/node-gyp/pull/1061) - -## v3.5.0 2017-01-10 - -* [[`762d19a39e`](https://github.com/nodejs/node-gyp/commit/762d19a39e)] - \[doc\] merge History.md and CHANGELOG.md (Rod Vagg) -* [[`80fc5c3d31`](https://github.com/nodejs/node-gyp/commit/80fc5c3d31)] - Fix deprecated dependency warning (Simone Primarosa) [#1069](https://github.com/nodejs/node-gyp/pull/1069) -* [[`05c44944fd`](https://github.com/nodejs/node-gyp/commit/05c44944fd)] - Open the build file with universal-newlines mode (Guy Margalit) [#1053](https://github.com/nodejs/node-gyp/pull/1053) -* [[`37ae7be114`](https://github.com/nodejs/node-gyp/commit/37ae7be114)] - Try python launcher when stock python is python 3. (Ben Noordhuis) [#992](https://github.com/nodejs/node-gyp/pull/992) -* [[`e3778d9907`](https://github.com/nodejs/node-gyp/commit/e3778d9907)] - Add lots of findPython() tests. (Ben Noordhuis) [#992](https://github.com/nodejs/node-gyp/pull/992) -* [[`afc766adf6`](https://github.com/nodejs/node-gyp/commit/afc766adf6)] - Unset executable bit for .bat files (Pavel Medvedev) [#969](https://github.com/nodejs/node-gyp/pull/969) -* [[`ddac348991`](https://github.com/nodejs/node-gyp/commit/ddac348991)] - Use push on PYTHONPATH and add tests (Michael Hart) [#990](https://github.com/nodejs/node-gyp/pull/990) -* [[`b182a19042`](https://github.com/nodejs/node-gyp/commit/b182a19042)] - ***Revert*** "add "path-array" dep" (Michael Hart) [#990](https://github.com/nodejs/node-gyp/pull/990) -* [[`7c08b85c5a`](https://github.com/nodejs/node-gyp/commit/7c08b85c5a)] - ***Revert*** "**configure**: use "path-array" for PYTHONPATH" (Michael Hart) [#990](https://github.com/nodejs/node-gyp/pull/990) -* [[`9c8d275526`](https://github.com/nodejs/node-gyp/commit/9c8d275526)] - Add --devdir flag. (Ben Noordhuis) [#916](https://github.com/nodejs/node-gyp/pull/916) -* [[`f6eab1f9e4`](https://github.com/nodejs/node-gyp/commit/f6eab1f9e4)] - **doc**: add windows-build-tools to readme (Felix Rieseberg) [#970](https://github.com/nodejs/node-gyp/pull/970) - -## v3.4.0 2016-06-28 - -* [[`ce5fd04e94`](https://github.com/nodejs/node-gyp/commit/ce5fd04e94)] - **deps**: update minimatch version (delphiactual) [#961](https://github.com/nodejs/node-gyp/pull/961) -* [[`77383ddd85`](https://github.com/nodejs/node-gyp/commit/77383ddd85)] - Replace fs.accessSync call to fs.statSync (Richard Lau) [#955](https://github.com/nodejs/node-gyp/pull/955) -* [[`0dba4bda57`](https://github.com/nodejs/node-gyp/commit/0dba4bda57)] - **test**: add simple addon test (Richard Lau) [#955](https://github.com/nodejs/node-gyp/pull/955) -* [[`c4344b3889`](https://github.com/nodejs/node-gyp/commit/c4344b3889)] - **doc**: add --target option to README (Gibson Fahnestock) [#958](https://github.com/nodejs/node-gyp/pull/958) -* [[`cc778e9215`](https://github.com/nodejs/node-gyp/commit/cc778e9215)] - Override BUILDING_UV_SHARED, BUILDING_V8_SHARED. (Ben Noordhuis) [#915](https://github.com/nodejs/node-gyp/pull/915) -* [[`af35b2ad32`](https://github.com/nodejs/node-gyp/commit/af35b2ad32)] - Move VC++ Build Tools to Build Tools landing page. (Andrew Pardoe) [#953](https://github.com/nodejs/node-gyp/pull/953) -* [[`f31482e226`](https://github.com/nodejs/node-gyp/commit/f31482e226)] - **win**: work around __pfnDliNotifyHook2 type change (Alexis Campailla) [#952](https://github.com/nodejs/node-gyp/pull/952) -* [[`3df8222fa5`](https://github.com/nodejs/node-gyp/commit/3df8222fa5)] - Allow for npmlog@3.x (Rebecca Turner) [#950](https://github.com/nodejs/node-gyp/pull/950) -* [[`a4fa07b390`](https://github.com/nodejs/node-gyp/commit/a4fa07b390)] - More verbose error on locating msbuild.exe failure. (Mateusz Jaworski) [#930](https://github.com/nodejs/node-gyp/pull/930) -* [[`4ee31329e0`](https://github.com/nodejs/node-gyp/commit/4ee31329e0)] - **doc**: add command options to README.md (Gibson Fahnestock) [#937](https://github.com/nodejs/node-gyp/pull/937) -* [[`c8c7ca86b9`](https://github.com/nodejs/node-gyp/commit/c8c7ca86b9)] - Add --silent option for zero output. (Gibson Fahnestock) [#937](https://github.com/nodejs/node-gyp/pull/937) -* [[`ac29d23a7c`](https://github.com/nodejs/node-gyp/commit/ac29d23a7c)] - Upgrade to glob@7.0.3. (Ben Noordhuis) [#943](https://github.com/nodejs/node-gyp/pull/943) -* [[`15fd56be3d`](https://github.com/nodejs/node-gyp/commit/15fd56be3d)] - Enable V8 deprecation warnings for native modules (Matt Loring) [#920](https://github.com/nodejs/node-gyp/pull/920) -* [[`7f1c1b960c`](https://github.com/nodejs/node-gyp/commit/7f1c1b960c)] - **gyp**: improvements for android generator (Robert Chiras) [#935](https://github.com/nodejs/node-gyp/pull/935) -* [[`088082766c`](https://github.com/nodejs/node-gyp/commit/088082766c)] - Update Windows install instructions (Sara Itani) [#867](https://github.com/nodejs/node-gyp/pull/867) -* [[`625c1515f9`](https://github.com/nodejs/node-gyp/commit/625c1515f9)] - **gyp**: inherit CC/CXX for CC/CXX.host (Johan Bergström) [#908](https://github.com/nodejs/node-gyp/pull/908) -* [[`3bcb1720e4`](https://github.com/nodejs/node-gyp/commit/3bcb1720e4)] - Add support for the Python launcher on Windows (Patrick Westerhoff) [#894](https://github.com/nodejs/node-gyp/pull/894 - -## v3.3.1 2016-03-04 - -* [[`a981ef847a`](https://github.com/nodejs/node-gyp/commit/a981ef847a)] - **gyp**: fix android generator (Robert Chiras) [#889](https://github.com/nodejs/node-gyp/pull/889) - -## v3.3.0 2016-02-16 - -* [[`818d854a4d`](https://github.com/nodejs/node-gyp/commit/818d854a4d)] - Introduce NODEJS_ORG_MIRROR and IOJS_ORG_MIRROR (Rod Vagg) [#878](https://github.com/nodejs/node-gyp/pull/878) -* [[`d1e4cc4b62`](https://github.com/nodejs/node-gyp/commit/d1e4cc4b62)] - **(SEMVER-MINOR)** Download headers tarball for ~0.12.10 || ~0.10.42 (Rod Vagg) [#877](https://github.com/nodejs/node-gyp/pull/877) -* [[`6e28ad1bea`](https://github.com/nodejs/node-gyp/commit/6e28ad1bea)] - Allow for npmlog@2.x (Rebecca Turner) [#861](https://github.com/nodejs/node-gyp/pull/861) -* [[`07371e5812`](https://github.com/nodejs/node-gyp/commit/07371e5812)] - Use -fPIC for NetBSD. (Marcin Cieślak) [#856](https://github.com/nodejs/node-gyp/pull/856) -* [[`8c4b0ffa50`](https://github.com/nodejs/node-gyp/commit/8c4b0ffa50)] - **(SEMVER-MINOR)** Add --cafile command line option. (Ben Noordhuis) [#837](https://github.com/nodejs/node-gyp/pull/837) -* [[`b3ad43498e`](https://github.com/nodejs/node-gyp/commit/b3ad43498e)] - **(SEMVER-MINOR)** Make download() function testable. (Ben Noordhuis) [#837](https://github.com/nodejs/node-gyp/pull/837) - -## v3.2.1 2015-12-03 - -* [[`ab89b477c4`](https://github.com/nodejs/node-gyp/commit/ab89b477c4)] - Upgrade gyp to b3cef02. (Ben Noordhuis) [#831](https://github.com/nodejs/node-gyp/pull/831) -* [[`90078ecb17`](https://github.com/nodejs/node-gyp/commit/90078ecb17)] - Define WIN32_LEAN_AND_MEAN conditionally. (Ben Noordhuis) [#824](https://github.com/nodejs/node-gyp/pull/824) - -## v3.2.0 2015-11-25 - -* [[`268f1ca4c7`](https://github.com/nodejs/node-gyp/commit/268f1ca4c7)] - Use result of `which` when searching for python. (Refael Ackermann) [#668](https://github.com/nodejs/node-gyp/pull/668) -* [[`817ed9bd78`](https://github.com/nodejs/node-gyp/commit/817ed9bd78)] - Add test for python executable search logic. (Ben Noordhuis) [#756](https://github.com/nodejs/node-gyp/pull/756) -* [[`0e2dfda1f3`](https://github.com/nodejs/node-gyp/commit/0e2dfda1f3)] - Fix test/test-options when run through `npm test`. (Ben Noordhuis) [#755](https://github.com/nodejs/node-gyp/pull/755) -* [[`9bfa0876b4`](https://github.com/nodejs/node-gyp/commit/9bfa0876b4)] - Add support for AIX (Michael Dawson) [#753](https://github.com/nodejs/node-gyp/pull/753) -* [[`a8d441a0a2`](https://github.com/nodejs/node-gyp/commit/a8d441a0a2)] - Update README for Windows 10 support. (Jason Williams) [#766](https://github.com/nodejs/node-gyp/pull/766) -* [[`d1d6015276`](https://github.com/nodejs/node-gyp/commit/d1d6015276)] - Update broken links and switch to HTTPS. (andrew morton) - -## v3.1.0 2015-11-14 - -* [[`9049241f91`](https://github.com/nodejs/node-gyp/commit/9049241f91)] - **gyp**: don't use links at all, just copy the files instead (Nathan Zadoks) -* [[`8ef90348d1`](https://github.com/nodejs/node-gyp/commit/8ef90348d1)] - **gyp**: apply https://codereview.chromium.org/11361103/ (Nathan Rajlich) -* [[`a2ed0df84e`](https://github.com/nodejs/node-gyp/commit/a2ed0df84e)] - **gyp**: always install into $PRODUCT_DIR (Nathan Rajlich) -* [[`cc8b2fa83e`](https://github.com/nodejs/node-gyp/commit/cc8b2fa83e)] - Update gyp to b3cef02. (Imran Iqbal) [#781](https://github.com/nodejs/node-gyp/pull/781) -* [[`f5d86eb84e`](https://github.com/nodejs/node-gyp/commit/f5d86eb84e)] - Update to tar@2.0.0. (Edgar Muentes) [#797](https://github.com/nodejs/node-gyp/pull/797) -* [[`2ac7de02c4`](https://github.com/nodejs/node-gyp/commit/2ac7de02c4)] - Fix infinite loop with zero-length options. (Ben Noordhuis) [#745](https://github.com/nodejs/node-gyp/pull/745) -* [[`101bed639b`](https://github.com/nodejs/node-gyp/commit/101bed639b)] - This platform value came from debian package, and now the value (Jérémy Lal) [#738](https://github.com/nodejs/node-gyp/pull/738) - -## v3.0.3 2015-09-14 - -* [[`ad827cda30`](https://github.com/nodejs/node-gyp/commit/ad827cda30)] - tarballUrl global and && when checking for iojs (Lars-Magnus Skog) [#729](https://github.com/nodejs/node-gyp/pull/729) - -## v3.0.2 2015-09-12 - -* [[`6e8c3bf3c6`](https://github.com/nodejs/node-gyp/commit/6e8c3bf3c6)] - add back support for passing additional cmdline args (Rod Vagg) [#723](https://github.com/nodejs/node-gyp/pull/723) -* [[`ff82f2f3b9`](https://github.com/nodejs/node-gyp/commit/ff82f2f3b9)] - fixed broken link in docs to Visual Studio 2013 download (simon-p-r) [#722](https://github.com/nodejs/node-gyp/pull/722) - -## v3.0.1 2015-09-08 - -* [[`846337e36b`](https://github.com/nodejs/node-gyp/commit/846337e36b)] - normalise versions for target == this comparison (Rod Vagg) [#716](https://github.com/nodejs/node-gyp/pull/716) - -## v3.0.0 2015-09-08 - -* [[`9720d0373c`](https://github.com/nodejs/node-gyp/commit/9720d0373c)] - remove node_modules from tree (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) -* [[`6dcf220db7`](https://github.com/nodejs/node-gyp/commit/6dcf220db7)] - test version major directly, don't use semver.satisfies() (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) -* [[`938dd18d1c`](https://github.com/nodejs/node-gyp/commit/938dd18d1c)] - refactor for clarity, fix dist-url, add env var dist-url functionality (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) -* [[`9e9df66a06`](https://github.com/nodejs/node-gyp/commit/9e9df66a06)] - use process.release, make aware of io.js & node v4 differences (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) -* [[`1ea7ed01f4`](https://github.com/nodejs/node-gyp/commit/1ea7ed01f4)] - **deps**: update graceful-fs dependency to the latest (Sakthipriyan Vairamani) [#714](https://github.com/nodejs/node-gyp/pull/714) -* [[`0fbc387b35`](https://github.com/nodejs/node-gyp/commit/0fbc387b35)] - Update repository URLs. (Ben Noordhuis) [#715](https://github.com/nodejs/node-gyp/pull/715) -* [[`bbedb8868b`](https://github.com/nodejs/node-gyp/commit/bbedb8868b)] - **(SEMVER-MAJOR)** **win**: enable delay-load hook by default (Jeremiah Senkpiel) [#708](https://github.com/nodejs/node-gyp/pull/708) -* [[`85ed107565`](https://github.com/nodejs/node-gyp/commit/85ed107565)] - Merge pull request #664 from othiym23/othiym23/allow-semver-5 (Nathan Rajlich) -* [[`0c720d234c`](https://github.com/nodejs/node-gyp/commit/0c720d234c)] - allow semver@5 (Forrest L Norvell) - -## 2.0.2 / 2015-07-14 - - * Use HTTPS for dist url (#656, @SonicHedgehog) - * Merge pull request #648 from nevosegal/master - * Merge pull request #650 from magic890/patch-1 - * Updated Installation section on README - * Updated link to gyp user documentation - * Fix download error message spelling (#643, @tomxtobin) - * Merge pull request #637 from lygstate/master - * Set NODE_GYP_DIR for addon.gypi to setting absolute path for - src/win_delay_load_hook.c, and fixes of the long relative path issue on Win32. - Fixes #636 (#637, @lygstate). - -## 2.0.1 / 2015-05-28 - - * configure: try/catch the semver range.test() call - * README: update for visual studio 2013 (#510, @samccone) - -## 2.0.0 / 2015-05-24 - - * configure: check for python2 executable by default, fallback to python - * configure: don't clobber existing $PYTHONPATH - * configure: use "path-array" for PYTHONPATH - * gyp: fix for non-acsii userprofile name on Windows - * gyp: always install into $PRODUCT_DIR - * gyp: apply https://codereview.chromium.org/11361103/ - * gyp: don't use links at all, just copy the files instead - * gyp: update gyp to e1c8fcf7 - * Updated README.md with updated Windows build info - * Show URL when a download fails - * package: add a "license" field - * move HMODULE m declaration to top - * Only add "-undefined dynamic_lookup" to loadable_module targets - * win: optionally allow node.exe/iojs.exe to be renamed - * Avoid downloading shasums if using tarPath - * Add target name preprocessor define: `NODE_GYP_MODULE_NAME` - * Show better error message in case of bad network settings diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/CONTRIBUTING.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/CONTRIBUTING.md deleted file mode 100644 index c1c50ea..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/CONTRIBUTING.md +++ /dev/null @@ -1,34 +0,0 @@ -# Contributing to node-gyp - -## Code of Conduct - -Please read the -[Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md) -which explains the minimum behavior expectations for node-gyp contributors. - - -## Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/LICENSE b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/LICENSE deleted file mode 100644 index 2ea4dc5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/README.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/README.md deleted file mode 100644 index 71eea0a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/README.md +++ /dev/null @@ -1,256 +0,0 @@ -# `node-gyp` - Node.js native addon build tool - -[![Build Status](https://github.com/nodejs/node-gyp/workflows/Tests/badge.svg?branch=master)](https://github.com/nodejs/node-gyp/actions?query=workflow%3ATests+branch%3Amaster) -![npm](https://img.shields.io/npm/dm/node-gyp) - -`node-gyp` is a cross-platform command-line tool written in Node.js for -compiling native addon modules for Node.js. It contains a vendored copy of the -[gyp-next](https://github.com/nodejs/gyp-next) project that was previously used -by the Chromium team, extended to support the development of Node.js native addons. - -Note that `node-gyp` is _not_ used to build Node.js itself. - -Multiple target versions of Node.js are supported (i.e. `0.8`, ..., `4`, `5`, `6`, -etc.), regardless of what version of Node.js is actually installed on your system -(`node-gyp` downloads the necessary development files or headers for the target version). - -## Features - - * The same build commands work on any of the supported platforms - * Supports the targeting of different versions of Node.js - -## Installation - -You can install `node-gyp` using `npm`: - -``` bash -npm install -g node-gyp -``` - -Depending on your operating system, you will need to install: - -### On Unix - - * Python v3.6, v3.7, v3.8, or v3.9 - * `make` - * A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org) - -### On macOS - -**ATTENTION**: If your Mac has been _upgraded_ to macOS Catalina (10.15), please read [macOS_Catalina.md](macOS_Catalina.md). - - * Python v3.6, v3.7, v3.8, or v3.9 - * [Xcode](https://developer.apple.com/xcode/download/) - * You also need to install the `XCode Command Line Tools` by running `xcode-select --install`. Alternatively, if you already have the full Xcode installed, you can find them under the menu `Xcode -> Open Developer Tool -> More Developer Tools...`. This step will install `clang`, `clang++`, and `make`. - -### On Windows - -Install the current version of Python from the [Microsoft Store package](https://docs.python.org/3/using/windows.html#the-microsoft-store-package). - -Install tools and configuration manually: - * Install Visual C++ Build Environment: [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools) - (using "Visual C++ build tools" workload) or [Visual Studio Community](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community) - (using the "Desktop development with C++" workload) - * Launch cmd, `npm config set msvs_version 2017` - - If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips. - - To target native ARM64 Node.js on Windows 10 on ARM, add the components "Visual C++ compilers and libraries for ARM64" and "Visual C++ ATL for ARM64". - -### Configuring Python Dependency - -`node-gyp` requires that you have installed a compatible version of Python, one of: v3.6, v3.7, -v3.8, or v3.9. If you have multiple Python versions installed, you can identify which Python -version `node-gyp` should use in one of the following ways: - -1. by setting the `--python` command-line option, e.g.: - -``` bash -node-gyp --python /path/to/executable/python -``` - -2. If `node-gyp` is called by way of `npm`, *and* you have multiple versions of -Python installed, then you can set `npm`'s 'python' config key to the appropriate -value: - -``` bash -npm config set python /path/to/executable/python -``` - -3. If the `PYTHON` environment variable is set to the path of a Python executable, -then that version will be used, if it is a compatible version. - -4. If the `NODE_GYP_FORCE_PYTHON` environment variable is set to the path of a -Python executable, it will be used instead of any of the other configured or -builtin Python search paths. If it's not a compatible version, no further -searching will be done. - -### Build for Third Party Node.js Runtimes - -When building modules for thid party Node.js runtimes like Electron, which have -different build configurations from the official Node.js distribution, you -should use `--dist-url` or `--nodedir` flags to specify the headers of the -runtime to build for. - -Also when `--dist-url` or `--nodedir` flags are passed, node-gyp will use the -`config.gypi` shipped in the headers distribution to generate build -configurations, which is different from the default mode that would use the -`process.config` object of the running Node.js instance. - -Some old versions of Electron shipped malformed `config.gypi` in their headers -distributions, and you might need to pass `--force-process-config` to node-gyp -to work around configuration errors. - -## How to Use - -To compile your native addon, first go to its root directory: - -``` bash -cd my_node_addon -``` - -The next step is to generate the appropriate project build files for the current -platform. Use `configure` for that: - -``` bash -node-gyp configure -``` - -Auto-detection fails for Visual C++ Build Tools 2015, so `--msvs_version=2015` -needs to be added (not needed when run by npm as configured above): -``` bash -node-gyp configure --msvs_version=2015 -``` - -__Note__: The `configure` step looks for a `binding.gyp` file in the current -directory to process. See below for instructions on creating a `binding.gyp` file. - -Now you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file -(on Windows) in the `build/` directory. Next, invoke the `build` command: - -``` bash -node-gyp build -``` - -Now you have your compiled `.node` bindings file! The compiled bindings end up -in `build/Debug/` or `build/Release/`, depending on the build mode. At this point, -you can require the `.node` file with Node.js and run your tests! - -__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or -`-d`) switch when running either the `configure`, `build` or `rebuild` commands. - -## The `binding.gyp` file - -A `binding.gyp` file describes the configuration to build your module, in a -JSON-like format. This file gets placed in the root of your package, alongside -`package.json`. - -A barebones `gyp` file appropriate for building a Node.js addon could look like: - -```python -{ - "targets": [ - { - "target_name": "binding", - "sources": [ "src/binding.cc" ] - } - ] -} -``` - -## Further reading - -The **[docs](./docs/)** directory contains additional documentation on specific node-gyp topics that may be useful if you are experiencing problems installing or building addons using node-gyp. - -Some additional resources for Node.js native addons and writing `gyp` configuration files: - - * ["Going Native" a nodeschool.io tutorial](http://nodeschool.io/#goingnative) - * ["Hello World" node addon example](https://github.com/nodejs/node/tree/master/test/addons/hello-world) - * [gyp user documentation](https://gyp.gsrc.io/docs/UserDocumentation.md) - * [gyp input format reference](https://gyp.gsrc.io/docs/InputFormatReference.md) - * [*"binding.gyp" files out in the wild* wiki page](./docs/binding.gyp-files-in-the-wild.md) - -## Commands - -`node-gyp` responds to the following commands: - -| **Command** | **Description** -|:--------------|:--------------------------------------------------------------- -| `help` | Shows the help dialog -| `build` | Invokes `make`/`msbuild.exe` and builds the native addon -| `clean` | Removes the `build` directory if it exists -| `configure` | Generates project build files for the current platform -| `rebuild` | Runs `clean`, `configure` and `build` all in a row -| `install` | Installs Node.js header files for the given version -| `list` | Lists the currently installed Node.js header versions -| `remove` | Removes the Node.js header files for the given version - - -## Command Options - -`node-gyp` accepts the following command options: - -| **Command** | **Description** -|:----------------------------------|:------------------------------------------ -| `-j n`, `--jobs n` | Run `make` in parallel. The value `max` will use all available CPU cores -| `--target=v6.2.1` | Node.js version to build for (default is `process.version`) -| `--silly`, `--loglevel=silly` | Log all progress to console -| `--verbose`, `--loglevel=verbose` | Log most progress to console -| `--silent`, `--loglevel=silent` | Don't log anything to console -| `debug`, `--debug` | Make Debug build (default is `Release`) -| `--release`, `--no-debug` | Make Release build -| `-C $dir`, `--directory=$dir` | Run command in different directory -| `--make=$make` | Override `make` command (e.g. `gmake`) -| `--thin=yes` | Enable thin static libraries -| `--arch=$arch` | Set target architecture (e.g. ia32) -| `--tarball=$path` | Get headers from a local tarball -| `--devdir=$path` | SDK download directory (default is OS cache directory) -| `--ensure` | Don't reinstall headers if already present -| `--dist-url=$url` | Download header tarball from custom URL -| `--proxy=$url` | Set HTTP(S) proxy for downloading header tarball -| `--noproxy=$urls` | Set urls to ignore proxies when downloading header tarball -| `--cafile=$cafile` | Override default CA chain (to download tarball) -| `--nodedir=$path` | Set the path to the node source code -| `--python=$path` | Set path to the Python binary -| `--msvs_version=$version` | Set Visual Studio version (Windows only) -| `--solution=$solution` | Set Visual Studio Solution version (Windows only) -| `--force-process-config` | Force using runtime's `process.config` object to generate `config.gypi` file - -## Configuration - -### Environment variables - -Use the form `npm_config_OPTION_NAME` for any of the command options listed -above (dashes in option names should be replaced by underscores). - -For example, to set `devdir` equal to `/tmp/.gyp`, you would: - -Run this on Unix: - -```bash -export npm_config_devdir=/tmp/.gyp -``` - -Or this on Windows: - -```console -set npm_config_devdir=c:\temp\.gyp -``` - -### `npm` configuration - -Use the form `OPTION_NAME` for any of the command options listed above. - -For example, to set `devdir` equal to `/tmp/.gyp`, you would run: - -```bash -npm config set [--global] devdir /tmp/.gyp -``` - -**Note:** Configuration set via `npm` will only be used when `node-gyp` -is run via `npm`, not when `node-gyp` is run directly. - -## License - -`node-gyp` is available under the MIT license. See the [LICENSE -file](LICENSE) for details. diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/addon.gypi b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/addon.gypi deleted file mode 100644 index 9327b0d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/addon.gypi +++ /dev/null @@ -1,185 +0,0 @@ -{ - 'variables' : { - 'node_engine_include_dir%': 'deps/v8/include', - 'node_host_binary%': 'node', - 'node_with_ltcg%': 'true', - }, - 'target_defaults': { - 'type': 'loadable_module', - 'win_delay_load_hook': 'true', - 'product_prefix': '', - - 'conditions': [ - [ 'node_engine=="chakracore"', { - 'variables': { - 'node_engine_include_dir%': 'deps/chakrashim/include' - }, - }] - ], - - 'include_dirs': [ - '<(node_root_dir)/include/node', - '<(node_root_dir)/src', - '<(node_root_dir)/deps/openssl/config', - '<(node_root_dir)/deps/openssl/openssl/include', - '<(node_root_dir)/deps/uv/include', - '<(node_root_dir)/deps/zlib', - '<(node_root_dir)/<(node_engine_include_dir)' - ], - 'defines!': [ - 'BUILDING_UV_SHARED=1', # Inherited from common.gypi. - 'BUILDING_V8_SHARED=1', # Inherited from common.gypi. - ], - 'defines': [ - 'NODE_GYP_MODULE_NAME=>(_target_name)', - 'USING_UV_SHARED=1', - 'USING_V8_SHARED=1', - # Warn when using deprecated V8 APIs. - 'V8_DEPRECATION_WARNINGS=1' - ], - - 'target_conditions': [ - ['_type=="loadable_module"', { - 'product_extension': 'node', - 'defines': [ - 'BUILDING_NODE_EXTENSION' - ], - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - '-undefined dynamic_lookup' - ], - }, - }], - - ['_type=="static_library"', { - # set to `1` to *disable* the -T thin archive 'ld' flag. - # older linkers don't support this flag. - 'standalone_static_library': '<(standalone_static_library)' - }], - - ['_type!="executable"', { - 'conditions': [ - [ 'OS=="android"', { - 'cflags!': [ '-fPIE' ], - }] - ] - }], - - ['_win_delay_load_hook=="true"', { - # If the addon specifies `'win_delay_load_hook': 'true'` in its - # binding.gyp, link a delay-load hook into the DLL. This hook ensures - # that the addon will work regardless of whether the node/iojs binary - # is named node.exe, iojs.exe, or something else. - 'conditions': [ - [ 'OS=="win"', { - 'defines': [ 'HOST_BINARY=\"<(node_host_binary)<(EXECUTABLE_SUFFIX)\"', ], - 'sources': [ - '<(node_gyp_dir)/src/win_delay_load_hook.cc', - ], - 'msvs_settings': { - 'VCLinkerTool': { - 'DelayLoadDLLs': [ '<(node_host_binary)<(EXECUTABLE_SUFFIX)' ], - # Don't print a linker warning when no imports from either .exe - # are used. - 'AdditionalOptions': [ '/ignore:4199' ], - }, - }, - }], - ], - }], - ], - - 'conditions': [ - [ 'OS=="mac"', { - 'defines': [ - '_DARWIN_USE_64_BIT_INODE=1' - ], - 'xcode_settings': { - 'DYLIB_INSTALL_NAME_BASE': '@rpath' - }, - }], - [ 'OS=="aix"', { - 'ldflags': [ - '-Wl,-bimport:<(node_exp_file)' - ], - }], - [ 'OS=="zos"', { - 'cflags': [ - '-q64', - '-Wc,DLL', - '-qlonglong', - '-qenum=int', - '-qxclang=-fexec-charset=ISO8859-1' - ], - 'defines': [ - '_ALL_SOURCE=1', - 'MAP_FAILED=-1', - '_UNIX03_SOURCE=1' - ], - 'ldflags': [ - '-q64', - '<(node_exp_file)' - ], - }], - [ 'OS=="win"', { - 'conditions': [ - ['node_engine=="chakracore"', { - 'library_dirs': [ '<(node_root_dir)/$(ConfigurationName)' ], - 'libraries': [ '<@(node_engine_libs)' ], - }], - ['node_with_ltcg=="true"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'WholeProgramOptimization': 'true' # /GL, whole program optimization, needed for LTCG - }, - 'VCLibrarianTool': { - 'AdditionalOptions': [ - '/LTCG:INCREMENTAL', # incremental link-time code generation - ] - }, - 'VCLinkerTool': { - 'OptimizeReferences': 2, # /OPT:REF - 'EnableCOMDATFolding': 2, # /OPT:ICF - 'LinkIncremental': 1, # disable incremental linking - 'AdditionalOptions': [ - '/LTCG:INCREMENTAL', # incremental link-time code generation - ] - } - } - }] - ], - 'libraries': [ - '-lkernel32.lib', - '-luser32.lib', - '-lgdi32.lib', - '-lwinspool.lib', - '-lcomdlg32.lib', - '-ladvapi32.lib', - '-lshell32.lib', - '-lole32.lib', - '-loleaut32.lib', - '-luuid.lib', - '-lodbc32.lib', - '-lDelayImp.lib', - '-l"<(node_lib_file)"' - ], - 'msvs_disabled_warnings': [ - # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent' - # needs to have dll-interface to be used by - # clients of class 'node::ObjectWrap' - 4251 - ], - }, { - # OS!="win" - 'defines': [ - '_LARGEFILE_SOURCE', - '_FILE_OFFSET_BITS=64' - ], - }], - [ 'OS in "freebsd openbsd netbsd solaris android" or \ - (OS=="linux" and target_arch!="ia32")', { - 'cflags': [ '-fPIC' ], - }], - ] - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/bin/node-gyp.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/bin/node-gyp.js deleted file mode 100755 index 8652ea2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/bin/node-gyp.js +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/env node - -'use strict' - -process.title = 'node-gyp' - -const envPaths = require('env-paths') -const gyp = require('../') -const log = require('npmlog') -const os = require('os') - -/** - * Process and execute the selected commands. - */ - -const prog = gyp() -var completed = false -prog.parseArgv(process.argv) -prog.devDir = prog.opts.devdir - -var homeDir = os.homedir() -if (prog.devDir) { - prog.devDir = prog.devDir.replace(/^~/, homeDir) -} else if (homeDir) { - prog.devDir = envPaths('node-gyp', { suffix: '' }).cache -} else { - throw new Error( - "node-gyp requires that the user's home directory is specified " + - 'in either of the environmental variables HOME or USERPROFILE. ' + - 'Overide with: --devdir /path/to/.node-gyp') -} - -if (prog.todo.length === 0) { - if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) { - console.log('v%s', prog.version) - } else { - console.log('%s', prog.usage()) - } - process.exit(0) -} - -log.info('it worked if it ends with', 'ok') -log.verbose('cli', process.argv) -log.info('using', 'node-gyp@%s', prog.version) -log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch) - -/** - * Change dir if -C/--directory was passed. - */ - -var dir = prog.opts.directory -if (dir) { - var fs = require('fs') - try { - var stat = fs.statSync(dir) - if (stat.isDirectory()) { - log.info('chdir', dir) - process.chdir(dir) - } else { - log.warn('chdir', dir + ' is not a directory') - } - } catch (e) { - if (e.code === 'ENOENT') { - log.warn('chdir', dir + ' is not a directory') - } else { - log.warn('chdir', 'error during chdir() "%s"', e.message) - } - } -} - -function run () { - var command = prog.todo.shift() - if (!command) { - // done! - completed = true - log.info('ok') - return - } - - prog.commands[command.name](command.args, function (err) { - if (err) { - log.error(command.name + ' error') - log.error('stack', err.stack) - errorMessage() - log.error('not ok') - return process.exit(1) - } - if (command.name === 'list') { - var versions = arguments[1] - if (versions.length > 0) { - versions.forEach(function (version) { - console.log(version) - }) - } else { - console.log('No node development files installed. Use `node-gyp install` to install a version.') - } - } else if (arguments.length >= 2) { - console.log.apply(console, [].slice.call(arguments, 1)) - } - - // now run the next command in the queue - process.nextTick(run) - }) -} - -process.on('exit', function (code) { - if (!completed && !code) { - log.error('Completion callback never invoked!') - issueMessage() - process.exit(6) - } -}) - -process.on('uncaughtException', function (err) { - log.error('UNCAUGHT EXCEPTION') - log.error('stack', err.stack) - issueMessage() - process.exit(7) -}) - -function errorMessage () { - // copied from npm's lib/utils/error-handler.js - var os = require('os') - log.error('System', os.type() + ' ' + os.release()) - log.error('command', process.argv - .map(JSON.stringify).join(' ')) - log.error('cwd', process.cwd()) - log.error('node -v', process.version) - log.error('node-gyp -v', 'v' + prog.package.version) -} - -function issueMessage () { - errorMessage() - log.error('', ['Node-gyp failed to build your package.', - 'Try to update npm and/or node-gyp and if it does not help file an issue with the package author.' - ].join('\n')) -} - -// start running the given commands! -run() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Common-issues.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Common-issues.md deleted file mode 100644 index ae05fe3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Common-issues.md +++ /dev/null @@ -1,14 +0,0 @@ -## Python Issues OSX - -Make sure you are using the native Python version in OSX. If you use a MacPorts of HomeBrew version, you may run into problems. - -If you have issues with `execvp`, be sure to check your `$PYTHON` environment variable. If it is not set to the native version, unset it and try again. - -Notes: https://gist.github.com/erichocean/5177582 - -## npm ERR! `node-gyp rebuild`(Windows) -* just install the build tools from [here](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools) -Please note the version as is required in below command e.g **2017** -* Launch cmd, run `npm config set msvs_version 2017` -* close and open new CMD/terminal and all is well :100: - diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Error-pre-versions-of-node-cannot-be-installed.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Error-pre-versions-of-node-cannot-be-installed.md deleted file mode 100644 index c1e1158..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Error-pre-versions-of-node-cannot-be-installed.md +++ /dev/null @@ -1,94 +0,0 @@ -When using `node-gyp` you might see an error like this when attempting to compile/install a node.js native addon: - -``` -$ npm install bcrypt -npm http GET https://registry.npmjs.org/bcrypt/0.7.5 -npm http 304 https://registry.npmjs.org/bcrypt/0.7.5 -npm http GET https://registry.npmjs.org/bindings/1.0.0 -npm http 304 https://registry.npmjs.org/bindings/1.0.0 - -> bcrypt@0.7.5 install /home/ubuntu/public/song-swap/node_modules/bcrypt -> node-gyp rebuild - -gyp ERR! configure error -gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead -gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:69:16) -gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:56:37) -gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:219:20) -gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:105:9 -gyp ERR! stack at ChildProcess.exithandler (child_process.js:630:7) -gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17) -gyp ERR! stack at maybeClose (child_process.js:730:16) -gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:5) -gyp ERR! System Linux 3.5.0-21-generic -gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" -gyp ERR! cwd /home/ubuntu/public/song-swap/node_modules/bcrypt -gyp ERR! node -v v0.11.2-pre -gyp ERR! node-gyp -v v0.9.5 -gyp ERR! not ok -npm ERR! bcrypt@0.7.5 install: `node-gyp rebuild` -npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1 -npm ERR! -npm ERR! Failed at the bcrypt@0.7.5 install script. -npm ERR! This is most likely a problem with the bcrypt package, -npm ERR! not with npm itself. -npm ERR! Tell the author that this fails on your system: -npm ERR! node-gyp rebuild -npm ERR! You can get their info via: -npm ERR! npm owner ls bcrypt -npm ERR! There is likely additional logging output above. - -npm ERR! System Linux 3.5.0-21-generic -npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bcrypt" -npm ERR! cwd /home/ubuntu/public/song-swap -npm ERR! node -v v0.11.2-pre -npm ERR! npm -v 1.2.18 -npm ERR! code ELIFECYCLE -npm ERR! -npm ERR! Additional logging details can be found in: -npm ERR! /home/ubuntu/public/song-swap/npm-debug.log -npm ERR! not ok code 0 -``` - -The main error here is: - -``` -Error: "pre" versions of node cannot be installed, use the --nodedir flag instead -``` - -This error is caused when you attempt to compile a native addon using a version of node.js with `-pre` at the end of the version number: - -``` bash -$ node -v -v0.10.4-pre -``` - -## How to avoid (the short answer) - -To avoid this error completely just use a stable release of node.js. i.e. `v0.10.4`, and __not__ `v0.10.4-pre`. - -## How to fix (the long answer) - -This error happens because `node-gyp` does not know what header files were used to compile your "pre" version of node, and therefore it needs you to specify the node source code directory path using the `--nodedir` flag. - -For example, if I compiled my development ("pre") version of node.js using the source code in `/Users/nrajlich/node`, then I could invoke `node-gyp` like: - -``` bash -$ node-gyp rebuild --nodedir=/Users/nrajlich/node -``` - -Or install an native addon through `npm` like: - -``` bash -$ npm install bcrypt --nodedir=/Users/nrajlich/node -``` - -### Always use `--nodedir` - -__Note:__ This is for advanced users who use `-pre` versions of node more often than tagged releases. - -If you're invoking `node-gyp` through `npm`, then you can leverage `npm`'s configuration system and not have to specify the `--nodedir` flag all the time: - -``` bash -$ npm config set nodedir /Users/nrajlich/node -``` \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Home.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Home.md deleted file mode 100644 index fe09986..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Home.md +++ /dev/null @@ -1,7 +0,0 @@ -Welcome to the node-gyp wiki! - - * [["binding.gyp" files out in the wild]] - * [[Linking to OpenSSL]] - * [[Common Issues]] - * [[Updating npm's bundled node-gyp]] - * [[Error: "pre" versions of node cannot be installed]] diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Linking-to-OpenSSL.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Linking-to-OpenSSL.md deleted file mode 100644 index ec80929..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Linking-to-OpenSSL.md +++ /dev/null @@ -1,86 +0,0 @@ -A handful of native addons require linking to OpenSSL in one way or another. This introduces a small challenge since node will sometimes bundle OpenSSL statically (the default for node >= v0.8.x), or sometimes dynamically link to the system OpenSSL (default for node <= v0.6.x). - -Good native addons should account for both scenarios. It's recommended that you use the `binding.gyp` file provided below as a starting-point for any addon that needs to use OpenSSL: - -``` python -{ - 'variables': { - # node v0.6.x doesn't give us its build variables, - # but on Unix it was only possible to use the system OpenSSL library, - # so default the variable to "true", v0.8.x node and up will overwrite it. - 'node_shared_openssl%': 'true' - }, - 'targets': [ - { - 'target_name': 'binding', - 'sources': [ - 'src/binding.cc' - ], - 'conditions': [ - ['node_shared_openssl=="false"', { - # so when "node_shared_openssl" is "false", then OpenSSL has been - # bundled into the node executable. So we need to include the same - # header files that were used when building node. - 'include_dirs': [ - '<(node_root_dir)/deps/openssl/openssl/include' - ], - "conditions" : [ - ["target_arch=='ia32'", { - "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ] - }], - ["target_arch=='x64'", { - "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ] - }], - ["target_arch=='arm'", { - "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ] - }] - ] - }] - ] - } - ] -} -``` - -This ensures that when OpenSSL is statically linked into `node` then, the bundled OpenSSL headers are included, but when the system OpenSSL is in use, then only those headers will be used. - -## Windows? - -As you can see this baseline `binding.gyp` file only accounts for the Unix scenario. Currently on Windows the situation is a little less ideal. On Windows, OpenSSL is _always_ statically compiled into the `node` executable, so ideally it would be possible to use that copy of OpenSSL when building native addons. - -Unfortunately it doesn't seem like that is possible at the moment, as there would need to be tweaks made to the generated `node.lib` file to include the openssl glue functions, or a new `openssl.lib` file would need to be created during the node build. I'm not sure which is the easiest/most feasible. - -In the meantime, one possible solution is using another copy of OpenSSL, which is what [`node-bcrypt`](https://github.com/ncb000gt/node.bcrypt.js) currently does. Adding something like this to your `binding.gyp` file's `"conditions"` block would enable this: - -``` python - [ 'OS=="win"', { - 'conditions': [ - # "openssl_root" is the directory on Windows of the OpenSSL files. - # Check the "target_arch" variable to set good default values for - # both 64-bit and 32-bit builds of the module. - ['target_arch=="x64"', { - 'variables': { - 'openssl_root%': 'C:/OpenSSL-Win64' - }, - }, { - 'variables': { - 'openssl_root%': 'C:/OpenSSL-Win32' - }, - }], - ], - 'libraries': [ - '-l<(openssl_root)/lib/libeay32.lib', - ], - 'include_dirs': [ - '<(openssl_root)/include', - ], - }] -``` - -Now you can direct your users to install OpenSSL on Windows from here (be sure to tell them to install the 64-bit version if they're compiling against a 64-bit version of node): http://slproweb.com/products/Win32OpenSSL.html - -Also note that both `node-gyp` and `npm` allow you to overwrite that default `openssl_root` variable on the command line: - -``` bash -$ node-gyp rebuild --openssl-root="C:\Users\Nathan\Desktop\openssl" -``` \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Updating-npm-bundled-node-gyp.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Updating-npm-bundled-node-gyp.md deleted file mode 100644 index 0777687..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/Updating-npm-bundled-node-gyp.md +++ /dev/null @@ -1,45 +0,0 @@ -# Updating the npm-bundled version of node-gyp - -[Many issues](https://github.com/nodejs/node-gyp/labels/ERR%21%20node-gyp%20-v%20%3C%3D%20v5.1.0) are opened by users who are -not running a [current version of node-gyp](https://github.com/nodejs/node-gyp/releases). - -`npm` bundles its own, internal, copy of `node-gyp`. This internal copy is independent of any globally installed copy of node-gyp that -may have been installed via `npm install -g node-gyp`. - -Generally, npm's library files are installed inside your global "node_modules", where npm is installed (run `npm prefix` and add `lib/node_modules`, or just `node_modules` for Windows). There are some exceptions to this. Inside this global `node_modules/` there will be an `npm/` directory and inside this you'll find a `node_modules/node-gyp/` directory. So it may look something like `/usr/local/lib/node_modules/npm/node_modules/node-gyp/`. This is the version of node-gyp that ships with npm. - -When you install a _new_ version of node-gyp outside of npm, it'll go into your global node_modules, but not under the `npm/node_modules`. So that may look like `/usr/local/lib/node_modules/node-gyp/`. It'll have the `node-gyp` executable linked into your `PATH` so running `node-gyp` will use this version. - -The catch is that npm won't use this version unless you tell it to, it'll keep on using the one you have installed. You need to instruct it to by setting the `node_gyp` config variable (which goes into your `~/.npmrc`). You do this by running the `npm config set` command as below. Then npm will use the command in the path you supply whenever it needs to build a native addon. - -**Important**: You also need to remember to unset this when you upgrade npm with a newer version of node-gyp, or you have to manually keep your globally installed node-gyp to date. See "Undo" below. - -## Linux and macOS -``` -npm install --global node-gyp@latest -npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js -``` - -`sudo` may be required for the first command if you get a permission error. - -## Windows - -### Windows Command Prompt -``` -npm install --global node-gyp@latest -for /f "delims=" %P in ('npm prefix -g') do npm config set node_gyp "%P\node_modules\node-gyp\bin\node-gyp.js" -``` - -### Powershell -``` -npm install --global node-gyp@latest -npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} -``` - -## Undo -**Beware** if you don't unset the `node_gyp` config option, npm will continue to use the globally installed version of node-gyp rather than the one it ships with, which may end up being newer. - -``` -npm config delete node_gyp -npm uninstall --global node-gyp -``` diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/binding.gyp-files-in-the-wild.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/binding.gyp-files-in-the-wild.md deleted file mode 100644 index c4603dd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/docs/binding.gyp-files-in-the-wild.md +++ /dev/null @@ -1,48 +0,0 @@ -This page contains links to some examples of existing `binding.gyp` files that other node modules are using. Take a look at them for inspiration. - -To add to this page, just add the link to the project's `binding.gyp` file below: - - * [ons](https://github.com/XadillaX/aliyun-ons/blob/master/binding.gyp) - * [thmclrx](https://github.com/XadillaX/thmclrx/blob/master/binding.gyp) - * [libxmljs](https://github.com/polotek/libxmljs/blob/master/binding.gyp) - * [node-buffertools](https://github.com/bnoordhuis/node-buffertools/blob/master/binding.gyp) - * [node-canvas](https://github.com/LearnBoost/node-canvas/blob/master/binding.gyp) - * [node-ffi](https://github.com/rbranson/node-ffi/blob/master/binding.gyp) + [libffi](https://github.com/rbranson/node-ffi/blob/master/deps/libffi/libffi.gyp) - * [node-time](https://github.com/TooTallNate/node-time/blob/master/binding.gyp) - * [node-sass](https://github.com/sass/node-sass/blob/master/binding.gyp) + [libsass](https://github.com/sass/node-sass/blob/master/src/libsass.gyp) - * [node-serialport](https://github.com/voodootikigod/node-serialport/blob/master/binding.gyp) - * [node-weak](https://github.com/TooTallNate/node-weak/blob/master/binding.gyp) - * [pty.js](https://github.com/chjj/pty.js/blob/master/binding.gyp) - * [ref](https://github.com/TooTallNate/ref/blob/master/binding.gyp) - * [appjs](https://github.com/milani/appjs/blob/master/binding.gyp) - * [nwm](https://github.com/mixu/nwm/blob/master/binding.gyp) - * [bcrypt](https://github.com/ncb000gt/node.bcrypt.js/blob/master/binding.gyp) - * [nk-mysql](https://github.com/mmod/nodamysql/blob/master/binding.gyp) - * [nk-xrm-installer](https://github.com/mmod/nk-xrm-installer/blob/master/binding.gyp) + [includable.gypi](https://github.com/mmod/nk-xrm-installer/blob/master/includable.gypi) + [unpack.py](https://github.com/mmod/nk-xrm-installer/blob/master/unpack.py) + [disburse.py](https://github.com/mmod/nk-xrm-installer/blob/master/disburse.py) - .py files above provide complete reference for examples of fetching source via http, extracting, and moving files. - * [node-memwatch](https://github.com/lloyd/node-memwatch/blob/master/binding.gyp) - * [node-ip2location](https://github.com/bolgovr/node-ip2location/blob/master/binding.gyp) - * [node-midi](https://github.com/justinlatimer/node-midi/blob/master/binding.gyp) - * [node-sqlite3](https://github.com/developmentseed/node-sqlite3/blob/master/binding.gyp) + [libsqlite3](https://github.com/developmentseed/node-sqlite3/blob/master/deps/sqlite3.gyp) - * [node-zipfile](https://github.com/mapbox/node-zipfile/blob/master/binding.gyp) - * [node-mapnik](https://github.com/mapnik/node-mapnik/blob/master/binding.gyp) - * [node-inotify](https://github.com/c4milo/node-inotify/blob/master/binding.gyp) - * [v8-profiler](https://github.com/c4milo/v8-profiler/blob/master/binding.gyp) - * [airtunes](https://github.com/radioline/node_airtunes/blob/master/binding.gyp) - * [node-fann](https://github.com/c4milo/node-fann/blob/master/binding.gyp) - * [node-talib](https://github.com/oransel/node-talib/blob/master/binding.gyp) - * [node-leveldown](https://github.com/rvagg/node-leveldown/blob/master/binding.gyp) + [leveldb.gyp](https://github.com/rvagg/node-leveldown/blob/master/deps/leveldb/leveldb.gyp) + [snappy.gyp](https://github.com/rvagg/node-leveldown/blob/master/deps/snappy/snappy.gyp) - * [node-expat](https://github.com/astro/node-expat/blob/master/binding.gyp) + [libexpat](https://github.com/astro/node-expat/blob/master/deps/libexpat/libexpat.gyp) - * [node-openvg-canvas](https://github.com/luismreis/node-openvg-canvas/blob/master/binding.gyp) + [node-openvg](https://github.com/luismreis/node-openvg/blob/master/binding.gyp) - * [node-cryptopp](https://github.com/BatikhSouri/node-cryptopp/blob/master/binding.gyp) - * [topcube](https://github.com/creationix/topcube/blob/master/binding.gyp) - * [node-osmium](https://github.com/osmcode/node-osmium/blob/master/binding.gyp) - * [node-osrm](https://github.com/DennisOSRM/node-osrm) - * [node-oracle](https://github.com/joeferner/node-oracle/blob/master/binding.gyp) - * [node-process-list](https://github.com/ReklatsMasters/node-process-list/blob/master/binding.gyp) - * [node-nanomsg](https://github.com/nickdesaulniers/node-nanomsg/blob/master/binding.gyp) - * [Ghostscript4JS](https://github.com/NickNaso/ghostscript4js/blob/master/binding.gyp) - * [nodecv](https://github.com/xudafeng/nodecv/blob/master/binding.gyp) - * [magick-cli](https://github.com/NickNaso/magick-cli/blob/master/binding.gyp) - * [sharp](https://github.com/lovell/sharp/blob/master/binding.gyp) - * [krb5](https://github.com/adaltas/node-krb5/blob/master/binding.gyp) \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.flake8 b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.flake8 deleted file mode 100644 index ea0c768..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.flake8 +++ /dev/null @@ -1,4 +0,0 @@ -[flake8] -max-complexity = 101 -max-line-length = 88 -extend-ignore = E203 # whitespace before ':' to agree with psf/black diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/Python_tests.yml b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/Python_tests.yml deleted file mode 100644 index 92303b6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/Python_tests.yml +++ /dev/null @@ -1,30 +0,0 @@ -# TODO: Enable os: windows-latest -# TODO: Enable pytest --doctest-modules - -name: Python_tests -on: [push, pull_request] -jobs: - Python_tests: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - max-parallel: 8 - matrix: - os: [macos-latest, ubuntu-latest] # , windows-latest] - python-version: [3.6, 3.7, 3.8, 3.9] - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements_dev.txt - - name: Lint with flake8 - run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics - - name: Test with pytest - run: pytest - # - name: Run doctests with pytest - # run: pytest --doctest-modules diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/node-gyp.yml b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/node-gyp.yml deleted file mode 100644 index bd7c85f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/node-gyp.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: node-gyp integration - -on: [push, pull_request] - -jobs: - test: - strategy: - fail-fast: false - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - python: [3.6, 3.9] - - runs-on: ${{ matrix.os }} - steps: - - name: Clone gyp-next - uses: actions/checkout@v2 - with: - path: gyp-next - - name: Clone nodejs/node-gyp - uses: actions/checkout@v2 - with: - repository: nodejs/node-gyp - path: node-gyp - - uses: actions/setup-node@v2 - with: - node-version: 14.x - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Install dependencies - run: | - cd node-gyp - npm install --no-progress - - name: Replace gyp in node-gyp - shell: bash - run: | - rm -rf node-gyp/gyp - cp -r gyp-next node-gyp/gyp - - name: Run tests - run: | - cd node-gyp - npm test diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/nodejs-windows.yml b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/nodejs-windows.yml deleted file mode 100644 index fffe96e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/nodejs-windows.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Node.js Windows integration - -on: [push, pull_request] - -jobs: - build-windows: - runs-on: windows-latest - steps: - - name: Clone gyp-next - uses: actions/checkout@v2 - with: - path: gyp-next - - name: Clone nodejs/node - uses: actions/checkout@v2 - with: - repository: nodejs/node - path: node - - name: Install deps - run: choco install nasm - - name: Replace gyp in Node.js - run: | - rm -Recurse node/tools/gyp - cp -Recurse gyp-next node/tools/gyp - - name: Build Node.js - run: | - cd node - ./vcbuild.bat diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/release-please.yml b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/release-please.yml deleted file mode 100644 index 288afdb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/.github/workflows/release-please.yml +++ /dev/null @@ -1,16 +0,0 @@ -on: - push: - branches: - - main - -name: release-please -jobs: - release-please: - runs-on: ubuntu-latest - steps: - - uses: GoogleCloudPlatform/release-please-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - release-type: python - package-name: gyp-next - bump-minor-pre-major: Yes diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/AUTHORS b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/AUTHORS deleted file mode 100644 index f49a357..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/AUTHORS +++ /dev/null @@ -1,16 +0,0 @@ -# Names should be added to this file like so: -# Name or Organization - -Google Inc. <*@google.com> -Bloomberg Finance L.P. <*@bloomberg.net> -IBM Inc. <*@*.ibm.com> -Yandex LLC <*@yandex-team.ru> - -Steven Knight -Ryan Norton -David J. Sankel -Eric N. Vander Weele -Tom Freudenberg -Julien Brianceau -Refael Ackermann -Ujjwal Sharma diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CHANGELOG.md deleted file mode 100644 index b7d55ed..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CHANGELOG.md +++ /dev/null @@ -1,177 +0,0 @@ -# Changelog - -## [0.10.0](https://www.github.com/nodejs/gyp-next/compare/v0.9.6...v0.10.0) (2021-08-26) - - -### Features - -* **msvs:** add support for Visual Studio 2022 ([#124](https://www.github.com/nodejs/gyp-next/issues/124)) ([4bd9215](https://www.github.com/nodejs/gyp-next/commit/4bd9215c44d300f06e916aec1d6327c22b78272d)) - -### [0.9.6](https://www.github.com/nodejs/gyp-next/compare/v0.9.5...v0.9.6) (2021-08-23) - - -### Bug Fixes - -* align flake8 test ([#122](https://www.github.com/nodejs/gyp-next/issues/122)) ([f1faa8d](https://www.github.com/nodejs/gyp-next/commit/f1faa8d3081e1a47e917ff910892f00dff16cf8a)) -* **msvs:** fix paths again in action command arguments ([#121](https://www.github.com/nodejs/gyp-next/issues/121)) ([7159dfb](https://www.github.com/nodejs/gyp-next/commit/7159dfbc5758c9ec717e215f2c36daf482c846a1)) - -### [0.9.5](https://www.github.com/nodejs/gyp-next/compare/v0.9.4...v0.9.5) (2021-08-18) - - -### Bug Fixes - -* add python 3.6 to node-gyp integration test ([3462d4c](https://www.github.com/nodejs/gyp-next/commit/3462d4ce3c31cce747513dc7ca9760c81d57c60e)) -* revert for windows compatibility ([d078e7d](https://www.github.com/nodejs/gyp-next/commit/d078e7d7ae080ddae243188f6415f940376a7368)) -* support msvs_quote_cmd in ninja generator ([#117](https://www.github.com/nodejs/gyp-next/issues/117)) ([46486ac](https://www.github.com/nodejs/gyp-next/commit/46486ac6e9329529d51061e006a5b39631e46729)) - -### [0.9.4](https://www.github.com/nodejs/gyp-next/compare/v0.9.3...v0.9.4) (2021-08-09) - - -### Bug Fixes - -* .S is an extension for asm file on Windows ([#115](https://www.github.com/nodejs/gyp-next/issues/115)) ([d2fad44](https://www.github.com/nodejs/gyp-next/commit/d2fad44ef3a79ca8900f1307060153ded57053fc)) - -### [0.9.3](https://www.github.com/nodejs/gyp-next/compare/v0.9.2...v0.9.3) (2021-07-07) - - -### Bug Fixes - -* build failure with ninja and Python 3 on Windows ([#113](https://www.github.com/nodejs/gyp-next/issues/113)) ([c172d10](https://www.github.com/nodejs/gyp-next/commit/c172d105deff5db4244e583942215918fa80dd3c)) - -### [0.9.2](https://www.github.com/nodejs/gyp-next/compare/v0.9.1...v0.9.2) (2021-05-21) - - -### Bug Fixes - -* add support of utf8 encoding ([#105](https://www.github.com/nodejs/gyp-next/issues/105)) ([4d0f93c](https://www.github.com/nodejs/gyp-next/commit/4d0f93c249286d1f0c0f665f5fe7346119f98cf1)) - -### [0.9.1](https://www.github.com/nodejs/gyp-next/compare/v0.9.0...v0.9.1) (2021-05-14) - - -### Bug Fixes - -* py lint ([3b6a8ee](https://www.github.com/nodejs/gyp-next/commit/3b6a8ee7a66193a8a6867eba9e1d2b70bdf04402)) - -## [0.9.0](https://www.github.com/nodejs/gyp-next/compare/v0.8.1...v0.9.0) (2021-05-13) - - -### Features - -* use LDFLAGS_host for host toolset ([#98](https://www.github.com/nodejs/gyp-next/issues/98)) ([bea5c7b](https://www.github.com/nodejs/gyp-next/commit/bea5c7bd67d6ad32acbdce79767a5481c70675a2)) - - -### Bug Fixes - -* msvs.py: remove overindentation ([#102](https://www.github.com/nodejs/gyp-next/issues/102)) ([3f83e99](https://www.github.com/nodejs/gyp-next/commit/3f83e99056d004d9579ceb786e06b624ddc36529)) -* update gyp.el to change case to cl-case ([#93](https://www.github.com/nodejs/gyp-next/issues/93)) ([13d5b66](https://www.github.com/nodejs/gyp-next/commit/13d5b66aab35985af9c2fb1174fdc6e1c1407ecc)) - -### [0.8.1](https://www.github.com/nodejs/gyp-next/compare/v0.8.0...v0.8.1) (2021-02-18) - - -### Bug Fixes - -* update shebang lines from python to python3 ([#94](https://www.github.com/nodejs/gyp-next/issues/94)) ([a1b0d41](https://www.github.com/nodejs/gyp-next/commit/a1b0d4171a8049a4ab7a614202063dec332f2df4)) - -## [0.8.0](https://www.github.com/nodejs/gyp-next/compare/v0.7.0...v0.8.0) (2021-01-15) - - -### ⚠ BREAKING CHANGES - -* remove support for Python 2 - -### Bug Fixes - -* revert posix build job ([#86](https://www.github.com/nodejs/gyp-next/issues/86)) ([39dc34f](https://www.github.com/nodejs/gyp-next/commit/39dc34f0799c074624005fb9bbccf6e028607f9d)) - - -### gyp - -* Remove support for Python 2 ([#88](https://www.github.com/nodejs/gyp-next/issues/88)) ([22e4654](https://www.github.com/nodejs/gyp-next/commit/22e465426fd892403c95534229af819a99c3f8dc)) - -## [0.7.0](https://www.github.com/nodejs/gyp-next/compare/v0.6.2...v0.7.0) (2020-12-17) - - -### ⚠ BREAKING CHANGES - -* **msvs:** On Windows, arguments passed to the "action" commands are no longer transformed to replace slashes with backslashes. - -### Features - -* **xcode:** --cross-compiling overrides arch-specific settings ([973bae0](https://www.github.com/nodejs/gyp-next/commit/973bae0b7b08be7b680ecae9565fbd04b3e0787d)) - - -### Bug Fixes - -* **msvs:** do not fix paths in action command arguments ([fc22f83](https://www.github.com/nodejs/gyp-next/commit/fc22f8335e2016da4aae4f4233074bd651d2faea)) -* cmake on python 3 ([fd61f5f](https://www.github.com/nodejs/gyp-next/commit/fd61f5faa5275ec8fc98e3c7868c0dd46f109540)) -* ValueError: invalid mode: 'rU' while trying to load binding.gyp ([d0504e6](https://www.github.com/nodejs/gyp-next/commit/d0504e6700ce48f44957a4d5891b142a60be946f)) -* xcode cmake parsing ([eefe8d1](https://www.github.com/nodejs/gyp-next/commit/eefe8d10e99863bc4ac7e2ed32facd608d400d4b)) - -### [0.6.2](https://www.github.com/nodejs/gyp-next/compare/v0.6.1...v0.6.2) (2020-10-16) - - -### Bug Fixes - -* do not rewrite absolute paths to avoid long paths ([#74](https://www.github.com/nodejs/gyp-next/issues/74)) ([c2ccc1a](https://www.github.com/nodejs/gyp-next/commit/c2ccc1a81f7f94433a94f4d01a2e820db4c4331a)) -* only include MARMASM when toolset is target ([5a2794a](https://www.github.com/nodejs/gyp-next/commit/5a2794aefb58f0c00404ff042b61740bc8b8d5cd)) - -### [0.6.1](https://github.com/nodejs/gyp-next/compare/v0.6.0...v0.6.1) (2020-10-14) - - -### Bug Fixes - -* Correctly rename object files for absolute paths in MSVS generator. - -## [0.6.0](https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0) (2020-10-13) - - -### Features - -* The Makefile generator will now output shared libraries directly to the product directory on all platforms (previously only macOS). - -## [0.5.0](https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0) (2020-09-30) - - -### Features - -* Extended compile_commands_json generator to consider more file extensions than just `c` and `cc`. `cpp` and `cxx` are now supported. -* Source files with duplicate basenames are now supported. - -### Removed - -* The `--no-duplicate-basename-check` option was removed. -* The `msvs_enable_marmasm` configuration option was removed in favor of auto-inclusion of the "marmasm" sections for Windows on ARM. - -## [0.4.0](https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0) (2020-07-14) - - -### Features - -* Added support for passing arbitrary architectures to Xcode builds, enables `arm64` builds. - -### Bug Fixes - -* Fixed a bug on Solaris where copying archives failed. - -## [0.3.0](https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0) (2020-06-06) - - -### Features - -* Added support for MSVC cross-compilation. This allows compilation on x64 for a Windows ARM target. - -### Bug Fixes - -* Fixed XCode CLT version detection on macOS Catalina. - -### [0.2.1](https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1) (2020-05-05) - - -### Bug Fixes - -* Relicensed to Node.js contributors. -* Fixed Windows bug introduced in v0.2.0. - -## [0.2.0](https://github.com/nodejs/gyp-next/releases/tag/v0.2.0) (2020-04-06) - -This is the first release of this project, based on https://chromium.googlesource.com/external/gyp with changes made over the years in Node.js and node-gyp. diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CODE_OF_CONDUCT.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CODE_OF_CONDUCT.md deleted file mode 100644 index d724027..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,4 +0,0 @@ -# Code of Conduct - -* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md) -* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/HEAD/Moderation-Policy.md) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CONTRIBUTING.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CONTRIBUTING.md deleted file mode 100644 index 1a0bcde..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing to gyp-next - -## Code of Conduct - -This project is bound to the [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md). - - -## Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/LICENSE b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/LICENSE deleted file mode 100644 index c6944c5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2020 Node.js contributors. All rights reserved. -Copyright (c) 2009 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/README.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/README.md deleted file mode 100644 index 9ffc2b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/README.md +++ /dev/null @@ -1,7 +0,0 @@ -GYP can Generate Your Projects. -=================================== - -Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline. - -__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command: -* `python3 -m pip install gyp-next` diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc deleted file mode 100644 index 8bca510..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file is used to generate an empty .pdb -- with a 4KB pagesize -- that is -// then used during the final link for modules that have large PDBs. Otherwise, -// the linker will generate a pdb with a page size of 1KB, which imposes a limit -// of 1GB on the .pdb. By generating an initial empty .pdb with the compiler -// (rather than the linker), this limit is avoided. With this in place PDBs may -// grow to 2GB. -// -// This file is referenced by the msvs_large_pdb mechanism in MSVSUtil.py. diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp deleted file mode 100755 index 1b8b9bd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# Copyright 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -set -e -base=$(dirname "$0") -exec python "${base}/gyp_main.py" "$@" diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp.bat b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp.bat deleted file mode 100755 index c0b4ca2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp.bat +++ /dev/null @@ -1,5 +0,0 @@ -@rem Copyright (c) 2009 Google Inc. All rights reserved. -@rem Use of this source code is governed by a BSD-style license that can be -@rem found in the LICENSE file. - -@python "%~dp0gyp_main.py" %* diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp_main.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp_main.py deleted file mode 100755 index f23dcdf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/gyp_main.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import os -import sys -import subprocess - - -def IsCygwin(): - # Function copied from pylib/gyp/common.py - try: - out = subprocess.Popen( - "uname", stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - stdout, _ = out.communicate() - return "CYGWIN" in stdout.decode("utf-8") - except Exception: - return False - - -def UnixifyPath(path): - try: - if not IsCygwin(): - return path - out = subprocess.Popen( - ["cygpath", "-u", path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - stdout, _ = out.communicate() - return stdout.decode("utf-8") - except Exception: - return path - - -# Make sure we're using the version of pylib in this repo, not one installed -# elsewhere on the system. Also convert to Unix style path on Cygwin systems, -# else the 'gyp' library will not be found -path = UnixifyPath(sys.argv[0]) -sys.path.insert(0, os.path.join(os.path.dirname(path), "pylib")) -import gyp # noqa: E402 - -if __name__ == "__main__": - sys.exit(gyp.script_main()) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py deleted file mode 100644 index d6b1897..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +++ /dev/null @@ -1,367 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""New implementation of Visual Studio project generation.""" - -import hashlib -import os -import random -from operator import attrgetter - -import gyp.common - - -def cmp(x, y): - return (x > y) - (x < y) - - -# Initialize random number generator -random.seed() - -# GUIDs for project types -ENTRY_TYPE_GUIDS = { - "project": "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}", - "folder": "{2150E333-8FDC-42A3-9474-1A3956D46DE8}", -} - -# ------------------------------------------------------------------------------ -# Helper functions - - -def MakeGuid(name, seed="msvs_new"): - """Returns a GUID for the specified target name. - - Args: - name: Target name. - seed: Seed for MD5 hash. - Returns: - A GUID-line string calculated from the name and seed. - - This generates something which looks like a GUID, but depends only on the - name and seed. This means the same name/seed will always generate the same - GUID, so that projects and solutions which refer to each other can explicitly - determine the GUID to refer to explicitly. It also means that the GUID will - not change when the project for a target is rebuilt. - """ - # Calculate a MD5 signature for the seed and name. - d = hashlib.md5((str(seed) + str(name)).encode("utf-8")).hexdigest().upper() - # Convert most of the signature to GUID form (discard the rest) - guid = ( - "{" - + d[:8] - + "-" - + d[8:12] - + "-" - + d[12:16] - + "-" - + d[16:20] - + "-" - + d[20:32] - + "}" - ) - return guid - - -# ------------------------------------------------------------------------------ - - -class MSVSSolutionEntry: - def __cmp__(self, other): - # Sort by name then guid (so things are in order on vs2008). - return cmp((self.name, self.get_guid()), (other.name, other.get_guid())) - - -class MSVSFolder(MSVSSolutionEntry): - """Folder in a Visual Studio project or solution.""" - - def __init__(self, path, name=None, entries=None, guid=None, items=None): - """Initializes the folder. - - Args: - path: Full path to the folder. - name: Name of the folder. - entries: List of folder entries to nest inside this folder. May contain - Folder or Project objects. May be None, if the folder is empty. - guid: GUID to use for folder, if not None. - items: List of solution items to include in the folder project. May be - None, if the folder does not directly contain items. - """ - if name: - self.name = name - else: - # Use last layer. - self.name = os.path.basename(path) - - self.path = path - self.guid = guid - - # Copy passed lists (or set to empty lists) - self.entries = sorted(entries or [], key=attrgetter("path")) - self.items = list(items or []) - - self.entry_type_guid = ENTRY_TYPE_GUIDS["folder"] - - def get_guid(self): - if self.guid is None: - # Use consistent guids for folders (so things don't regenerate). - self.guid = MakeGuid(self.path, seed="msvs_folder") - return self.guid - - -# ------------------------------------------------------------------------------ - - -class MSVSProject(MSVSSolutionEntry): - """Visual Studio project.""" - - def __init__( - self, - path, - name=None, - dependencies=None, - guid=None, - spec=None, - build_file=None, - config_platform_overrides=None, - fixpath_prefix=None, - ): - """Initializes the project. - - Args: - path: Absolute path to the project file. - name: Name of project. If None, the name will be the same as the base - name of the project file. - dependencies: List of other Project objects this project is dependent - upon, if not None. - guid: GUID to use for project, if not None. - spec: Dictionary specifying how to build this project. - build_file: Filename of the .gyp file that the vcproj file comes from. - config_platform_overrides: optional dict of configuration platforms to - used in place of the default for this target. - fixpath_prefix: the path used to adjust the behavior of _fixpath - """ - self.path = path - self.guid = guid - self.spec = spec - self.build_file = build_file - # Use project filename if name not specified - self.name = name or os.path.splitext(os.path.basename(path))[0] - - # Copy passed lists (or set to empty lists) - self.dependencies = list(dependencies or []) - - self.entry_type_guid = ENTRY_TYPE_GUIDS["project"] - - if config_platform_overrides: - self.config_platform_overrides = config_platform_overrides - else: - self.config_platform_overrides = {} - self.fixpath_prefix = fixpath_prefix - self.msbuild_toolset = None - - def set_dependencies(self, dependencies): - self.dependencies = list(dependencies or []) - - def get_guid(self): - if self.guid is None: - # Set GUID from path - # TODO(rspangler): This is fragile. - # 1. We can't just use the project filename sans path, since there could - # be multiple projects with the same base name (for example, - # foo/unittest.vcproj and bar/unittest.vcproj). - # 2. The path needs to be relative to $SOURCE_ROOT, so that the project - # GUID is the same whether it's included from base/base.sln or - # foo/bar/baz/baz.sln. - # 3. The GUID needs to be the same each time this builder is invoked, so - # that we don't need to rebuild the solution when the project changes. - # 4. We should be able to handle pre-built project files by reading the - # GUID from the files. - self.guid = MakeGuid(self.name) - return self.guid - - def set_msbuild_toolset(self, msbuild_toolset): - self.msbuild_toolset = msbuild_toolset - - -# ------------------------------------------------------------------------------ - - -class MSVSSolution: - """Visual Studio solution.""" - - def __init__( - self, path, version, entries=None, variants=None, websiteProperties=True - ): - """Initializes the solution. - - Args: - path: Path to solution file. - version: Format version to emit. - entries: List of entries in solution. May contain Folder or Project - objects. May be None, if the folder is empty. - variants: List of build variant strings. If none, a default list will - be used. - websiteProperties: Flag to decide if the website properties section - is generated. - """ - self.path = path - self.websiteProperties = websiteProperties - self.version = version - - # Copy passed lists (or set to empty lists) - self.entries = list(entries or []) - - if variants: - # Copy passed list - self.variants = variants[:] - else: - # Use default - self.variants = ["Debug|Win32", "Release|Win32"] - # TODO(rspangler): Need to be able to handle a mapping of solution config - # to project config. Should we be able to handle variants being a dict, - # or add a separate variant_map variable? If it's a dict, we can't - # guarantee the order of variants since dict keys aren't ordered. - - # TODO(rspangler): Automatically write to disk for now; should delay until - # node-evaluation time. - self.Write() - - def Write(self, writer=gyp.common.WriteOnDiff): - """Writes the solution file to disk. - - Raises: - IndexError: An entry appears multiple times. - """ - # Walk the entry tree and collect all the folders and projects. - all_entries = set() - entries_to_check = self.entries[:] - while entries_to_check: - e = entries_to_check.pop(0) - - # If this entry has been visited, nothing to do. - if e in all_entries: - continue - - all_entries.add(e) - - # If this is a folder, check its entries too. - if isinstance(e, MSVSFolder): - entries_to_check += e.entries - - all_entries = sorted(all_entries, key=attrgetter("path")) - - # Open file and print header - f = writer(self.path) - f.write( - "Microsoft Visual Studio Solution File, " - "Format Version %s\r\n" % self.version.SolutionVersion() - ) - f.write("# %s\r\n" % self.version.Description()) - - # Project entries - sln_root = os.path.split(self.path)[0] - for e in all_entries: - relative_path = gyp.common.RelativePath(e.path, sln_root) - # msbuild does not accept an empty folder_name. - # use '.' in case relative_path is empty. - folder_name = relative_path.replace("/", "\\") or "." - f.write( - 'Project("%s") = "%s", "%s", "%s"\r\n' - % ( - e.entry_type_guid, # Entry type GUID - e.name, # Folder name - folder_name, # Folder name (again) - e.get_guid(), # Entry GUID - ) - ) - - # TODO(rspangler): Need a way to configure this stuff - if self.websiteProperties: - f.write( - "\tProjectSection(WebsiteProperties) = preProject\r\n" - '\t\tDebug.AspNetCompiler.Debug = "True"\r\n' - '\t\tRelease.AspNetCompiler.Debug = "False"\r\n' - "\tEndProjectSection\r\n" - ) - - if isinstance(e, MSVSFolder): - if e.items: - f.write("\tProjectSection(SolutionItems) = preProject\r\n") - for i in e.items: - f.write(f"\t\t{i} = {i}\r\n") - f.write("\tEndProjectSection\r\n") - - if isinstance(e, MSVSProject): - if e.dependencies: - f.write("\tProjectSection(ProjectDependencies) = postProject\r\n") - for d in e.dependencies: - f.write(f"\t\t{d.get_guid()} = {d.get_guid()}\r\n") - f.write("\tEndProjectSection\r\n") - - f.write("EndProject\r\n") - - # Global section - f.write("Global\r\n") - - # Configurations (variants) - f.write("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n") - for v in self.variants: - f.write(f"\t\t{v} = {v}\r\n") - f.write("\tEndGlobalSection\r\n") - - # Sort config guids for easier diffing of solution changes. - config_guids = [] - config_guids_overrides = {} - for e in all_entries: - if isinstance(e, MSVSProject): - config_guids.append(e.get_guid()) - config_guids_overrides[e.get_guid()] = e.config_platform_overrides - config_guids.sort() - - f.write("\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n") - for g in config_guids: - for v in self.variants: - nv = config_guids_overrides[g].get(v, v) - # Pick which project configuration to build for this solution - # configuration. - f.write( - "\t\t%s.%s.ActiveCfg = %s\r\n" - % ( - g, # Project GUID - v, # Solution build configuration - nv, # Project build config for that solution config - ) - ) - - # Enable project in this solution configuration. - f.write( - "\t\t%s.%s.Build.0 = %s\r\n" - % ( - g, # Project GUID - v, # Solution build configuration - nv, # Project build config for that solution config - ) - ) - f.write("\tEndGlobalSection\r\n") - - # TODO(rspangler): Should be able to configure this stuff too (though I've - # never seen this be any different) - f.write("\tGlobalSection(SolutionProperties) = preSolution\r\n") - f.write("\t\tHideSolutionNode = FALSE\r\n") - f.write("\tEndGlobalSection\r\n") - - # Folder mappings - # Omit this section if there are no folders - if any([e.entries for e in all_entries if isinstance(e, MSVSFolder)]): - f.write("\tGlobalSection(NestedProjects) = preSolution\r\n") - for e in all_entries: - if not isinstance(e, MSVSFolder): - continue # Does not apply to projects, only folders - for subentry in e.entries: - f.write(f"\t\t{subentry.get_guid()} = {e.get_guid()}\r\n") - f.write("\tEndGlobalSection\r\n") - - f.write("EndGlobal\r\n") - - f.close() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py deleted file mode 100644 index f0cfabe..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +++ /dev/null @@ -1,206 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Visual Studio project reader/writer.""" - -import gyp.easy_xml as easy_xml - -# ------------------------------------------------------------------------------ - - -class Tool: - """Visual Studio tool.""" - - def __init__(self, name, attrs=None): - """Initializes the tool. - - Args: - name: Tool name. - attrs: Dict of tool attributes; may be None. - """ - self._attrs = attrs or {} - self._attrs["Name"] = name - - def _GetSpecification(self): - """Creates an element for the tool. - - Returns: - A new xml.dom.Element for the tool. - """ - return ["Tool", self._attrs] - - -class Filter: - """Visual Studio filter - that is, a virtual folder.""" - - def __init__(self, name, contents=None): - """Initializes the folder. - - Args: - name: Filter (folder) name. - contents: List of filenames and/or Filter objects contained. - """ - self.name = name - self.contents = list(contents or []) - - -# ------------------------------------------------------------------------------ - - -class Writer: - """Visual Studio XML project writer.""" - - def __init__(self, project_path, version, name, guid=None, platforms=None): - """Initializes the project. - - Args: - project_path: Path to the project file. - version: Format version to emit. - name: Name of the project. - guid: GUID to use for project, if not None. - platforms: Array of string, the supported platforms. If null, ['Win32'] - """ - self.project_path = project_path - self.version = version - self.name = name - self.guid = guid - - # Default to Win32 for platforms. - if not platforms: - platforms = ["Win32"] - - # Initialize the specifications of the various sections. - self.platform_section = ["Platforms"] - for platform in platforms: - self.platform_section.append(["Platform", {"Name": platform}]) - self.tool_files_section = ["ToolFiles"] - self.configurations_section = ["Configurations"] - self.files_section = ["Files"] - - # Keep a dict keyed on filename to speed up access. - self.files_dict = dict() - - def AddToolFile(self, path): - """Adds a tool file to the project. - - Args: - path: Relative path from project to tool file. - """ - self.tool_files_section.append(["ToolFile", {"RelativePath": path}]) - - def _GetSpecForConfiguration(self, config_type, config_name, attrs, tools): - """Returns the specification for a configuration. - - Args: - config_type: Type of configuration node. - config_name: Configuration name. - attrs: Dict of configuration attributes; may be None. - tools: List of tools (strings or Tool objects); may be None. - Returns: - """ - # Handle defaults - if not attrs: - attrs = {} - if not tools: - tools = [] - - # Add configuration node and its attributes - node_attrs = attrs.copy() - node_attrs["Name"] = config_name - specification = [config_type, node_attrs] - - # Add tool nodes and their attributes - if tools: - for t in tools: - if isinstance(t, Tool): - specification.append(t._GetSpecification()) - else: - specification.append(Tool(t)._GetSpecification()) - return specification - - def AddConfig(self, name, attrs=None, tools=None): - """Adds a configuration to the project. - - Args: - name: Configuration name. - attrs: Dict of configuration attributes; may be None. - tools: List of tools (strings or Tool objects); may be None. - """ - spec = self._GetSpecForConfiguration("Configuration", name, attrs, tools) - self.configurations_section.append(spec) - - def _AddFilesToNode(self, parent, files): - """Adds files and/or filters to the parent node. - - Args: - parent: Destination node - files: A list of Filter objects and/or relative paths to files. - - Will call itself recursively, if the files list contains Filter objects. - """ - for f in files: - if isinstance(f, Filter): - node = ["Filter", {"Name": f.name}] - self._AddFilesToNode(node, f.contents) - else: - node = ["File", {"RelativePath": f}] - self.files_dict[f] = node - parent.append(node) - - def AddFiles(self, files): - """Adds files to the project. - - Args: - files: A list of Filter objects and/or relative paths to files. - - This makes a copy of the file/filter tree at the time of this call. If you - later add files to a Filter object which was passed into a previous call - to AddFiles(), it will not be reflected in this project. - """ - self._AddFilesToNode(self.files_section, files) - # TODO(rspangler) This also doesn't handle adding files to an existing - # filter. That is, it doesn't merge the trees. - - def AddFileConfig(self, path, config, attrs=None, tools=None): - """Adds a configuration to a file. - - Args: - path: Relative path to the file. - config: Name of configuration to add. - attrs: Dict of configuration attributes; may be None. - tools: List of tools (strings or Tool objects); may be None. - - Raises: - ValueError: Relative path does not match any file added via AddFiles(). - """ - # Find the file node with the right relative path - parent = self.files_dict.get(path) - if not parent: - raise ValueError('AddFileConfig: file "%s" not in project.' % path) - - # Add the config to the file node - spec = self._GetSpecForConfiguration("FileConfiguration", config, attrs, tools) - parent.append(spec) - - def WriteIfChanged(self): - """Writes the project file.""" - # First create XML content definition - content = [ - "VisualStudioProject", - { - "ProjectType": "Visual C++", - "Version": self.version.ProjectVersion(), - "Name": self.name, - "ProjectGUID": self.guid, - "RootNamespace": self.name, - "Keyword": "Win32Proj", - }, - self.platform_section, - self.tool_files_section, - self.configurations_section, - ["References"], # empty section - self.files_section, - ["Globals"], # empty section - ] - easy_xml.WriteXmlIfChanged(content, self.project_path, encoding="Windows-1252") diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py deleted file mode 100644 index e89a971..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +++ /dev/null @@ -1,1270 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -r"""Code to validate and convert settings of the Microsoft build tools. - -This file contains code to validate and convert settings of the Microsoft -build tools. The function ConvertToMSBuildSettings(), ValidateMSVSSettings(), -and ValidateMSBuildSettings() are the entry points. - -This file was created by comparing the projects created by Visual Studio 2008 -and Visual Studio 2010 for all available settings through the user interface. -The MSBuild schemas were also considered. They are typically found in the -MSBuild install directory, e.g. c:\Program Files (x86)\MSBuild -""" - -import re -import sys - -# Dictionaries of settings validators. The key is the tool name, the value is -# a dictionary mapping setting names to validation functions. -_msvs_validators = {} -_msbuild_validators = {} - - -# A dictionary of settings converters. The key is the tool name, the value is -# a dictionary mapping setting names to conversion functions. -_msvs_to_msbuild_converters = {} - - -# Tool name mapping from MSVS to MSBuild. -_msbuild_name_of_tool = {} - - -class _Tool: - """Represents a tool used by MSVS or MSBuild. - - Attributes: - msvs_name: The name of the tool in MSVS. - msbuild_name: The name of the tool in MSBuild. - """ - - def __init__(self, msvs_name, msbuild_name): - self.msvs_name = msvs_name - self.msbuild_name = msbuild_name - - -def _AddTool(tool): - """Adds a tool to the four dictionaries used to process settings. - - This only defines the tool. Each setting also needs to be added. - - Args: - tool: The _Tool object to be added. - """ - _msvs_validators[tool.msvs_name] = {} - _msbuild_validators[tool.msbuild_name] = {} - _msvs_to_msbuild_converters[tool.msvs_name] = {} - _msbuild_name_of_tool[tool.msvs_name] = tool.msbuild_name - - -def _GetMSBuildToolSettings(msbuild_settings, tool): - """Returns an MSBuild tool dictionary. Creates it if needed.""" - return msbuild_settings.setdefault(tool.msbuild_name, {}) - - -class _Type: - """Type of settings (Base class).""" - - def ValidateMSVS(self, value): - """Verifies that the value is legal for MSVS. - - Args: - value: the value to check for this type. - - Raises: - ValueError if value is not valid for MSVS. - """ - - def ValidateMSBuild(self, value): - """Verifies that the value is legal for MSBuild. - - Args: - value: the value to check for this type. - - Raises: - ValueError if value is not valid for MSBuild. - """ - - def ConvertToMSBuild(self, value): - """Returns the MSBuild equivalent of the MSVS value given. - - Args: - value: the MSVS value to convert. - - Returns: - the MSBuild equivalent. - - Raises: - ValueError if value is not valid. - """ - return value - - -class _String(_Type): - """A setting that's just a string.""" - - def ValidateMSVS(self, value): - if not isinstance(value, str): - raise ValueError("expected string; got %r" % value) - - def ValidateMSBuild(self, value): - if not isinstance(value, str): - raise ValueError("expected string; got %r" % value) - - def ConvertToMSBuild(self, value): - # Convert the macros - return ConvertVCMacrosToMSBuild(value) - - -class _StringList(_Type): - """A settings that's a list of strings.""" - - def ValidateMSVS(self, value): - if not isinstance(value, (list, str)): - raise ValueError("expected string list; got %r" % value) - - def ValidateMSBuild(self, value): - if not isinstance(value, (list, str)): - raise ValueError("expected string list; got %r" % value) - - def ConvertToMSBuild(self, value): - # Convert the macros - if isinstance(value, list): - return [ConvertVCMacrosToMSBuild(i) for i in value] - else: - return ConvertVCMacrosToMSBuild(value) - - -class _Boolean(_Type): - """Boolean settings, can have the values 'false' or 'true'.""" - - def _Validate(self, value): - if value != "true" and value != "false": - raise ValueError("expected bool; got %r" % value) - - def ValidateMSVS(self, value): - self._Validate(value) - - def ValidateMSBuild(self, value): - self._Validate(value) - - def ConvertToMSBuild(self, value): - self._Validate(value) - return value - - -class _Integer(_Type): - """Integer settings.""" - - def __init__(self, msbuild_base=10): - _Type.__init__(self) - self._msbuild_base = msbuild_base - - def ValidateMSVS(self, value): - # Try to convert, this will raise ValueError if invalid. - self.ConvertToMSBuild(value) - - def ValidateMSBuild(self, value): - # Try to convert, this will raise ValueError if invalid. - int(value, self._msbuild_base) - - def ConvertToMSBuild(self, value): - msbuild_format = (self._msbuild_base == 10) and "%d" or "0x%04x" - return msbuild_format % int(value) - - -class _Enumeration(_Type): - """Type of settings that is an enumeration. - - In MSVS, the values are indexes like '0', '1', and '2'. - MSBuild uses text labels that are more representative, like 'Win32'. - - Constructor args: - label_list: an array of MSBuild labels that correspond to the MSVS index. - In the rare cases where MSVS has skipped an index value, None is - used in the array to indicate the unused spot. - new: an array of labels that are new to MSBuild. - """ - - def __init__(self, label_list, new=None): - _Type.__init__(self) - self._label_list = label_list - self._msbuild_values = {value for value in label_list if value is not None} - if new is not None: - self._msbuild_values.update(new) - - def ValidateMSVS(self, value): - # Try to convert. It will raise an exception if not valid. - self.ConvertToMSBuild(value) - - def ValidateMSBuild(self, value): - if value not in self._msbuild_values: - raise ValueError("unrecognized enumerated value %s" % value) - - def ConvertToMSBuild(self, value): - index = int(value) - if index < 0 or index >= len(self._label_list): - raise ValueError( - "index value (%d) not in expected range [0, %d)" - % (index, len(self._label_list)) - ) - label = self._label_list[index] - if label is None: - raise ValueError("converted value for %s not specified." % value) - return label - - -# Instantiate the various generic types. -_boolean = _Boolean() -_integer = _Integer() -# For now, we don't do any special validation on these types: -_string = _String() -_file_name = _String() -_folder_name = _String() -_file_list = _StringList() -_folder_list = _StringList() -_string_list = _StringList() -# Some boolean settings went from numerical values to boolean. The -# mapping is 0: default, 1: false, 2: true. -_newly_boolean = _Enumeration(["", "false", "true"]) - - -def _Same(tool, name, setting_type): - """Defines a setting that has the same name in MSVS and MSBuild. - - Args: - tool: a dictionary that gives the names of the tool for MSVS and MSBuild. - name: the name of the setting. - setting_type: the type of this setting. - """ - _Renamed(tool, name, name, setting_type) - - -def _Renamed(tool, msvs_name, msbuild_name, setting_type): - """Defines a setting for which the name has changed. - - Args: - tool: a dictionary that gives the names of the tool for MSVS and MSBuild. - msvs_name: the name of the MSVS setting. - msbuild_name: the name of the MSBuild setting. - setting_type: the type of this setting. - """ - - def _Translate(value, msbuild_settings): - msbuild_tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool) - msbuild_tool_settings[msbuild_name] = setting_type.ConvertToMSBuild(value) - - _msvs_validators[tool.msvs_name][msvs_name] = setting_type.ValidateMSVS - _msbuild_validators[tool.msbuild_name][msbuild_name] = setting_type.ValidateMSBuild - _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate - - -def _Moved(tool, settings_name, msbuild_tool_name, setting_type): - _MovedAndRenamed( - tool, settings_name, msbuild_tool_name, settings_name, setting_type - ) - - -def _MovedAndRenamed( - tool, msvs_settings_name, msbuild_tool_name, msbuild_settings_name, setting_type -): - """Defines a setting that may have moved to a new section. - - Args: - tool: a dictionary that gives the names of the tool for MSVS and MSBuild. - msvs_settings_name: the MSVS name of the setting. - msbuild_tool_name: the name of the MSBuild tool to place the setting under. - msbuild_settings_name: the MSBuild name of the setting. - setting_type: the type of this setting. - """ - - def _Translate(value, msbuild_settings): - tool_settings = msbuild_settings.setdefault(msbuild_tool_name, {}) - tool_settings[msbuild_settings_name] = setting_type.ConvertToMSBuild(value) - - _msvs_validators[tool.msvs_name][msvs_settings_name] = setting_type.ValidateMSVS - validator = setting_type.ValidateMSBuild - _msbuild_validators[msbuild_tool_name][msbuild_settings_name] = validator - _msvs_to_msbuild_converters[tool.msvs_name][msvs_settings_name] = _Translate - - -def _MSVSOnly(tool, name, setting_type): - """Defines a setting that is only found in MSVS. - - Args: - tool: a dictionary that gives the names of the tool for MSVS and MSBuild. - name: the name of the setting. - setting_type: the type of this setting. - """ - - def _Translate(unused_value, unused_msbuild_settings): - # Since this is for MSVS only settings, no translation will happen. - pass - - _msvs_validators[tool.msvs_name][name] = setting_type.ValidateMSVS - _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate - - -def _MSBuildOnly(tool, name, setting_type): - """Defines a setting that is only found in MSBuild. - - Args: - tool: a dictionary that gives the names of the tool for MSVS and MSBuild. - name: the name of the setting. - setting_type: the type of this setting. - """ - - def _Translate(value, msbuild_settings): - # Let msbuild-only properties get translated as-is from msvs_settings. - tool_settings = msbuild_settings.setdefault(tool.msbuild_name, {}) - tool_settings[name] = value - - _msbuild_validators[tool.msbuild_name][name] = setting_type.ValidateMSBuild - _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate - - -def _ConvertedToAdditionalOption(tool, msvs_name, flag): - """Defines a setting that's handled via a command line option in MSBuild. - - Args: - tool: a dictionary that gives the names of the tool for MSVS and MSBuild. - msvs_name: the name of the MSVS setting that if 'true' becomes a flag - flag: the flag to insert at the end of the AdditionalOptions - """ - - def _Translate(value, msbuild_settings): - if value == "true": - tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool) - if "AdditionalOptions" in tool_settings: - new_flags = "{} {}".format(tool_settings["AdditionalOptions"], flag) - else: - new_flags = flag - tool_settings["AdditionalOptions"] = new_flags - - _msvs_validators[tool.msvs_name][msvs_name] = _boolean.ValidateMSVS - _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate - - -def _CustomGeneratePreprocessedFile(tool, msvs_name): - def _Translate(value, msbuild_settings): - tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool) - if value == "0": - tool_settings["PreprocessToFile"] = "false" - tool_settings["PreprocessSuppressLineNumbers"] = "false" - elif value == "1": # /P - tool_settings["PreprocessToFile"] = "true" - tool_settings["PreprocessSuppressLineNumbers"] = "false" - elif value == "2": # /EP /P - tool_settings["PreprocessToFile"] = "true" - tool_settings["PreprocessSuppressLineNumbers"] = "true" - else: - raise ValueError("value must be one of [0, 1, 2]; got %s" % value) - - # Create a bogus validator that looks for '0', '1', or '2' - msvs_validator = _Enumeration(["a", "b", "c"]).ValidateMSVS - _msvs_validators[tool.msvs_name][msvs_name] = msvs_validator - msbuild_validator = _boolean.ValidateMSBuild - msbuild_tool_validators = _msbuild_validators[tool.msbuild_name] - msbuild_tool_validators["PreprocessToFile"] = msbuild_validator - msbuild_tool_validators["PreprocessSuppressLineNumbers"] = msbuild_validator - _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate - - -fix_vc_macro_slashes_regex_list = ("IntDir", "OutDir") -fix_vc_macro_slashes_regex = re.compile( - r"(\$\((?:%s)\))(?:[\\/]+)" % "|".join(fix_vc_macro_slashes_regex_list) -) - -# Regular expression to detect keys that were generated by exclusion lists -_EXCLUDED_SUFFIX_RE = re.compile("^(.*)_excluded$") - - -def _ValidateExclusionSetting(setting, settings, error_msg, stderr=sys.stderr): - """Verify that 'setting' is valid if it is generated from an exclusion list. - - If the setting appears to be generated from an exclusion list, the root name - is checked. - - Args: - setting: A string that is the setting name to validate - settings: A dictionary where the keys are valid settings - error_msg: The message to emit in the event of error - stderr: The stream receiving the error messages. - """ - # This may be unrecognized because it's an exclusion list. If the - # setting name has the _excluded suffix, then check the root name. - unrecognized = True - m = re.match(_EXCLUDED_SUFFIX_RE, setting) - if m: - root_setting = m.group(1) - unrecognized = root_setting not in settings - - if unrecognized: - # We don't know this setting. Give a warning. - print(error_msg, file=stderr) - - -def FixVCMacroSlashes(s): - """Replace macros which have excessive following slashes. - - These macros are known to have a built-in trailing slash. Furthermore, many - scripts hiccup on processing paths with extra slashes in the middle. - - This list is probably not exhaustive. Add as needed. - """ - if "$" in s: - s = fix_vc_macro_slashes_regex.sub(r"\1", s) - return s - - -def ConvertVCMacrosToMSBuild(s): - """Convert the MSVS macros found in the string to the MSBuild equivalent. - - This list is probably not exhaustive. Add as needed. - """ - if "$" in s: - replace_map = { - "$(ConfigurationName)": "$(Configuration)", - "$(InputDir)": "%(RelativeDir)", - "$(InputExt)": "%(Extension)", - "$(InputFileName)": "%(Filename)%(Extension)", - "$(InputName)": "%(Filename)", - "$(InputPath)": "%(Identity)", - "$(ParentName)": "$(ProjectFileName)", - "$(PlatformName)": "$(Platform)", - "$(SafeInputName)": "%(Filename)", - } - for old, new in replace_map.items(): - s = s.replace(old, new) - s = FixVCMacroSlashes(s) - return s - - -def ConvertToMSBuildSettings(msvs_settings, stderr=sys.stderr): - """Converts MSVS settings (VS2008 and earlier) to MSBuild settings (VS2010+). - - Args: - msvs_settings: A dictionary. The key is the tool name. The values are - themselves dictionaries of settings and their values. - stderr: The stream receiving the error messages. - - Returns: - A dictionary of MSBuild settings. The key is either the MSBuild tool name - or the empty string (for the global settings). The values are themselves - dictionaries of settings and their values. - """ - msbuild_settings = {} - for msvs_tool_name, msvs_tool_settings in msvs_settings.items(): - if msvs_tool_name in _msvs_to_msbuild_converters: - msvs_tool = _msvs_to_msbuild_converters[msvs_tool_name] - for msvs_setting, msvs_value in msvs_tool_settings.items(): - if msvs_setting in msvs_tool: - # Invoke the translation function. - try: - msvs_tool[msvs_setting](msvs_value, msbuild_settings) - except ValueError as e: - print( - "Warning: while converting %s/%s to MSBuild, " - "%s" % (msvs_tool_name, msvs_setting, e), - file=stderr, - ) - else: - _ValidateExclusionSetting( - msvs_setting, - msvs_tool, - ( - "Warning: unrecognized setting %s/%s " - "while converting to MSBuild." - % (msvs_tool_name, msvs_setting) - ), - stderr, - ) - else: - print( - "Warning: unrecognized tool %s while converting to " - "MSBuild." % msvs_tool_name, - file=stderr, - ) - return msbuild_settings - - -def ValidateMSVSSettings(settings, stderr=sys.stderr): - """Validates that the names of the settings are valid for MSVS. - - Args: - settings: A dictionary. The key is the tool name. The values are - themselves dictionaries of settings and their values. - stderr: The stream receiving the error messages. - """ - _ValidateSettings(_msvs_validators, settings, stderr) - - -def ValidateMSBuildSettings(settings, stderr=sys.stderr): - """Validates that the names of the settings are valid for MSBuild. - - Args: - settings: A dictionary. The key is the tool name. The values are - themselves dictionaries of settings and their values. - stderr: The stream receiving the error messages. - """ - _ValidateSettings(_msbuild_validators, settings, stderr) - - -def _ValidateSettings(validators, settings, stderr): - """Validates that the settings are valid for MSBuild or MSVS. - - We currently only validate the names of the settings, not their values. - - Args: - validators: A dictionary of tools and their validators. - settings: A dictionary. The key is the tool name. The values are - themselves dictionaries of settings and their values. - stderr: The stream receiving the error messages. - """ - for tool_name in settings: - if tool_name in validators: - tool_validators = validators[tool_name] - for setting, value in settings[tool_name].items(): - if setting in tool_validators: - try: - tool_validators[setting](value) - except ValueError as e: - print( - f"Warning: for {tool_name}/{setting}, {e}", - file=stderr, - ) - else: - _ValidateExclusionSetting( - setting, - tool_validators, - (f"Warning: unrecognized setting {tool_name}/{setting}"), - stderr, - ) - - else: - print("Warning: unrecognized tool %s" % (tool_name), file=stderr) - - -# MSVS and MBuild names of the tools. -_compile = _Tool("VCCLCompilerTool", "ClCompile") -_link = _Tool("VCLinkerTool", "Link") -_midl = _Tool("VCMIDLTool", "Midl") -_rc = _Tool("VCResourceCompilerTool", "ResourceCompile") -_lib = _Tool("VCLibrarianTool", "Lib") -_manifest = _Tool("VCManifestTool", "Manifest") -_masm = _Tool("MASM", "MASM") -_armasm = _Tool("ARMASM", "ARMASM") - - -_AddTool(_compile) -_AddTool(_link) -_AddTool(_midl) -_AddTool(_rc) -_AddTool(_lib) -_AddTool(_manifest) -_AddTool(_masm) -_AddTool(_armasm) -# Add sections only found in the MSBuild settings. -_msbuild_validators[""] = {} -_msbuild_validators["ProjectReference"] = {} -_msbuild_validators["ManifestResourceCompile"] = {} - -# Descriptions of the compiler options, i.e. VCCLCompilerTool in MSVS and -# ClCompile in MSBuild. -# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\cl.xml" for -# the schema of the MSBuild ClCompile settings. - -# Options that have the same name in MSVS and MSBuild -_Same(_compile, "AdditionalIncludeDirectories", _folder_list) # /I -_Same(_compile, "AdditionalOptions", _string_list) -_Same(_compile, "AdditionalUsingDirectories", _folder_list) # /AI -_Same(_compile, "AssemblerListingLocation", _file_name) # /Fa -_Same(_compile, "BrowseInformationFile", _file_name) -_Same(_compile, "BufferSecurityCheck", _boolean) # /GS -_Same(_compile, "DisableLanguageExtensions", _boolean) # /Za -_Same(_compile, "DisableSpecificWarnings", _string_list) # /wd -_Same(_compile, "EnableFiberSafeOptimizations", _boolean) # /GT -_Same(_compile, "EnablePREfast", _boolean) # /analyze Visible='false' -_Same(_compile, "ExpandAttributedSource", _boolean) # /Fx -_Same(_compile, "FloatingPointExceptions", _boolean) # /fp:except -_Same(_compile, "ForceConformanceInForLoopScope", _boolean) # /Zc:forScope -_Same(_compile, "ForcedIncludeFiles", _file_list) # /FI -_Same(_compile, "ForcedUsingFiles", _file_list) # /FU -_Same(_compile, "GenerateXMLDocumentationFiles", _boolean) # /doc -_Same(_compile, "IgnoreStandardIncludePath", _boolean) # /X -_Same(_compile, "MinimalRebuild", _boolean) # /Gm -_Same(_compile, "OmitDefaultLibName", _boolean) # /Zl -_Same(_compile, "OmitFramePointers", _boolean) # /Oy -_Same(_compile, "PreprocessorDefinitions", _string_list) # /D -_Same(_compile, "ProgramDataBaseFileName", _file_name) # /Fd -_Same(_compile, "RuntimeTypeInfo", _boolean) # /GR -_Same(_compile, "ShowIncludes", _boolean) # /showIncludes -_Same(_compile, "SmallerTypeCheck", _boolean) # /RTCc -_Same(_compile, "StringPooling", _boolean) # /GF -_Same(_compile, "SuppressStartupBanner", _boolean) # /nologo -_Same(_compile, "TreatWChar_tAsBuiltInType", _boolean) # /Zc:wchar_t -_Same(_compile, "UndefineAllPreprocessorDefinitions", _boolean) # /u -_Same(_compile, "UndefinePreprocessorDefinitions", _string_list) # /U -_Same(_compile, "UseFullPaths", _boolean) # /FC -_Same(_compile, "WholeProgramOptimization", _boolean) # /GL -_Same(_compile, "XMLDocumentationFileName", _file_name) -_Same(_compile, "CompileAsWinRT", _boolean) # /ZW - -_Same( - _compile, - "AssemblerOutput", - _Enumeration( - [ - "NoListing", - "AssemblyCode", # /FA - "All", # /FAcs - "AssemblyAndMachineCode", # /FAc - "AssemblyAndSourceCode", - ] - ), -) # /FAs -_Same( - _compile, - "BasicRuntimeChecks", - _Enumeration( - [ - "Default", - "StackFrameRuntimeCheck", # /RTCs - "UninitializedLocalUsageCheck", # /RTCu - "EnableFastChecks", - ] - ), -) # /RTC1 -_Same( - _compile, "BrowseInformation", _Enumeration(["false", "true", "true"]) # /FR -) # /Fr -_Same( - _compile, - "CallingConvention", - _Enumeration(["Cdecl", "FastCall", "StdCall", "VectorCall"]), # /Gd # /Gr # /Gz -) # /Gv -_Same( - _compile, - "CompileAs", - _Enumeration(["Default", "CompileAsC", "CompileAsCpp"]), # /TC -) # /TP -_Same( - _compile, - "DebugInformationFormat", - _Enumeration( - [ - "", # Disabled - "OldStyle", # /Z7 - None, - "ProgramDatabase", # /Zi - "EditAndContinue", - ] - ), -) # /ZI -_Same( - _compile, - "EnableEnhancedInstructionSet", - _Enumeration( - [ - "NotSet", - "StreamingSIMDExtensions", # /arch:SSE - "StreamingSIMDExtensions2", # /arch:SSE2 - "AdvancedVectorExtensions", # /arch:AVX (vs2012+) - "NoExtensions", # /arch:IA32 (vs2012+) - # This one only exists in the new msbuild format. - "AdvancedVectorExtensions2", # /arch:AVX2 (vs2013r2+) - ] - ), -) -_Same( - _compile, - "ErrorReporting", - _Enumeration( - [ - "None", # /errorReport:none - "Prompt", # /errorReport:prompt - "Queue", - ], # /errorReport:queue - new=["Send"], - ), -) # /errorReport:send" -_Same( - _compile, - "ExceptionHandling", - _Enumeration(["false", "Sync", "Async"], new=["SyncCThrow"]), # /EHsc # /EHa -) # /EHs -_Same( - _compile, "FavorSizeOrSpeed", _Enumeration(["Neither", "Speed", "Size"]) # /Ot -) # /Os -_Same( - _compile, - "FloatingPointModel", - _Enumeration(["Precise", "Strict", "Fast"]), # /fp:precise # /fp:strict -) # /fp:fast -_Same( - _compile, - "InlineFunctionExpansion", - _Enumeration( - ["Default", "OnlyExplicitInline", "AnySuitable"], # /Ob1 # /Ob2 - new=["Disabled"], - ), -) # /Ob0 -_Same( - _compile, - "Optimization", - _Enumeration(["Disabled", "MinSpace", "MaxSpeed", "Full"]), # /Od # /O1 # /O2 -) # /Ox -_Same( - _compile, - "RuntimeLibrary", - _Enumeration( - [ - "MultiThreaded", # /MT - "MultiThreadedDebug", # /MTd - "MultiThreadedDLL", # /MD - "MultiThreadedDebugDLL", - ] - ), -) # /MDd -_Same( - _compile, - "StructMemberAlignment", - _Enumeration( - [ - "Default", - "1Byte", # /Zp1 - "2Bytes", # /Zp2 - "4Bytes", # /Zp4 - "8Bytes", # /Zp8 - "16Bytes", - ] - ), -) # /Zp16 -_Same( - _compile, - "WarningLevel", - _Enumeration( - [ - "TurnOffAllWarnings", # /W0 - "Level1", # /W1 - "Level2", # /W2 - "Level3", # /W3 - "Level4", - ], # /W4 - new=["EnableAllWarnings"], - ), -) # /Wall - -# Options found in MSVS that have been renamed in MSBuild. -_Renamed( - _compile, "EnableFunctionLevelLinking", "FunctionLevelLinking", _boolean -) # /Gy -_Renamed(_compile, "EnableIntrinsicFunctions", "IntrinsicFunctions", _boolean) # /Oi -_Renamed(_compile, "KeepComments", "PreprocessKeepComments", _boolean) # /C -_Renamed(_compile, "ObjectFile", "ObjectFileName", _file_name) # /Fo -_Renamed(_compile, "OpenMP", "OpenMPSupport", _boolean) # /openmp -_Renamed( - _compile, "PrecompiledHeaderThrough", "PrecompiledHeaderFile", _file_name -) # Used with /Yc and /Yu -_Renamed( - _compile, "PrecompiledHeaderFile", "PrecompiledHeaderOutputFile", _file_name -) # /Fp -_Renamed( - _compile, - "UsePrecompiledHeader", - "PrecompiledHeader", - _Enumeration( - ["NotUsing", "Create", "Use"] # VS recognized '' for this value too. # /Yc - ), -) # /Yu -_Renamed(_compile, "WarnAsError", "TreatWarningAsError", _boolean) # /WX - -_ConvertedToAdditionalOption(_compile, "DefaultCharIsUnsigned", "/J") - -# MSVS options not found in MSBuild. -_MSVSOnly(_compile, "Detect64BitPortabilityProblems", _boolean) -_MSVSOnly(_compile, "UseUnicodeResponseFiles", _boolean) - -# MSBuild options not found in MSVS. -_MSBuildOnly(_compile, "BuildingInIDE", _boolean) -_MSBuildOnly( - _compile, "CompileAsManaged", _Enumeration([], new=["false", "true"]) -) # /clr -_MSBuildOnly(_compile, "CreateHotpatchableImage", _boolean) # /hotpatch -_MSBuildOnly(_compile, "MultiProcessorCompilation", _boolean) # /MP -_MSBuildOnly(_compile, "PreprocessOutputPath", _string) # /Fi -_MSBuildOnly(_compile, "ProcessorNumber", _integer) # the number of processors -_MSBuildOnly(_compile, "TrackerLogDirectory", _folder_name) -_MSBuildOnly(_compile, "TreatSpecificWarningsAsErrors", _string_list) # /we -_MSBuildOnly(_compile, "UseUnicodeForAssemblerListing", _boolean) # /FAu - -# Defines a setting that needs very customized processing -_CustomGeneratePreprocessedFile(_compile, "GeneratePreprocessedFile") - - -# Directives for converting MSVS VCLinkerTool to MSBuild Link. -# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\link.xml" for -# the schema of the MSBuild Link settings. - -# Options that have the same name in MSVS and MSBuild -_Same(_link, "AdditionalDependencies", _file_list) -_Same(_link, "AdditionalLibraryDirectories", _folder_list) # /LIBPATH -# /MANIFESTDEPENDENCY: -_Same(_link, "AdditionalManifestDependencies", _file_list) -_Same(_link, "AdditionalOptions", _string_list) -_Same(_link, "AddModuleNamesToAssembly", _file_list) # /ASSEMBLYMODULE -_Same(_link, "AllowIsolation", _boolean) # /ALLOWISOLATION -_Same(_link, "AssemblyLinkResource", _file_list) # /ASSEMBLYLINKRESOURCE -_Same(_link, "BaseAddress", _string) # /BASE -_Same(_link, "CLRUnmanagedCodeCheck", _boolean) # /CLRUNMANAGEDCODECHECK -_Same(_link, "DelayLoadDLLs", _file_list) # /DELAYLOAD -_Same(_link, "DelaySign", _boolean) # /DELAYSIGN -_Same(_link, "EmbedManagedResourceFile", _file_list) # /ASSEMBLYRESOURCE -_Same(_link, "EnableUAC", _boolean) # /MANIFESTUAC -_Same(_link, "EntryPointSymbol", _string) # /ENTRY -_Same(_link, "ForceSymbolReferences", _file_list) # /INCLUDE -_Same(_link, "FunctionOrder", _file_name) # /ORDER -_Same(_link, "GenerateDebugInformation", _boolean) # /DEBUG -_Same(_link, "GenerateMapFile", _boolean) # /MAP -_Same(_link, "HeapCommitSize", _string) -_Same(_link, "HeapReserveSize", _string) # /HEAP -_Same(_link, "IgnoreAllDefaultLibraries", _boolean) # /NODEFAULTLIB -_Same(_link, "IgnoreEmbeddedIDL", _boolean) # /IGNOREIDL -_Same(_link, "ImportLibrary", _file_name) # /IMPLIB -_Same(_link, "KeyContainer", _file_name) # /KEYCONTAINER -_Same(_link, "KeyFile", _file_name) # /KEYFILE -_Same(_link, "ManifestFile", _file_name) # /ManifestFile -_Same(_link, "MapExports", _boolean) # /MAPINFO:EXPORTS -_Same(_link, "MapFileName", _file_name) -_Same(_link, "MergedIDLBaseFileName", _file_name) # /IDLOUT -_Same(_link, "MergeSections", _string) # /MERGE -_Same(_link, "MidlCommandFile", _file_name) # /MIDL -_Same(_link, "ModuleDefinitionFile", _file_name) # /DEF -_Same(_link, "OutputFile", _file_name) # /OUT -_Same(_link, "PerUserRedirection", _boolean) -_Same(_link, "Profile", _boolean) # /PROFILE -_Same(_link, "ProfileGuidedDatabase", _file_name) # /PGD -_Same(_link, "ProgramDatabaseFile", _file_name) # /PDB -_Same(_link, "RegisterOutput", _boolean) -_Same(_link, "SetChecksum", _boolean) # /RELEASE -_Same(_link, "StackCommitSize", _string) -_Same(_link, "StackReserveSize", _string) # /STACK -_Same(_link, "StripPrivateSymbols", _file_name) # /PDBSTRIPPED -_Same(_link, "SupportUnloadOfDelayLoadedDLL", _boolean) # /DELAY:UNLOAD -_Same(_link, "SuppressStartupBanner", _boolean) # /NOLOGO -_Same(_link, "SwapRunFromCD", _boolean) # /SWAPRUN:CD -_Same(_link, "TurnOffAssemblyGeneration", _boolean) # /NOASSEMBLY -_Same(_link, "TypeLibraryFile", _file_name) # /TLBOUT -_Same(_link, "TypeLibraryResourceID", _integer) # /TLBID -_Same(_link, "UACUIAccess", _boolean) # /uiAccess='true' -_Same(_link, "Version", _string) # /VERSION - -_Same(_link, "EnableCOMDATFolding", _newly_boolean) # /OPT:ICF -_Same(_link, "FixedBaseAddress", _newly_boolean) # /FIXED -_Same(_link, "LargeAddressAware", _newly_boolean) # /LARGEADDRESSAWARE -_Same(_link, "OptimizeReferences", _newly_boolean) # /OPT:REF -_Same(_link, "RandomizedBaseAddress", _newly_boolean) # /DYNAMICBASE -_Same(_link, "TerminalServerAware", _newly_boolean) # /TSAWARE - -_subsystem_enumeration = _Enumeration( - [ - "NotSet", - "Console", # /SUBSYSTEM:CONSOLE - "Windows", # /SUBSYSTEM:WINDOWS - "Native", # /SUBSYSTEM:NATIVE - "EFI Application", # /SUBSYSTEM:EFI_APPLICATION - "EFI Boot Service Driver", # /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER - "EFI ROM", # /SUBSYSTEM:EFI_ROM - "EFI Runtime", # /SUBSYSTEM:EFI_RUNTIME_DRIVER - "WindowsCE", - ], # /SUBSYSTEM:WINDOWSCE - new=["POSIX"], -) # /SUBSYSTEM:POSIX - -_target_machine_enumeration = _Enumeration( - [ - "NotSet", - "MachineX86", # /MACHINE:X86 - None, - "MachineARM", # /MACHINE:ARM - "MachineEBC", # /MACHINE:EBC - "MachineIA64", # /MACHINE:IA64 - None, - "MachineMIPS", # /MACHINE:MIPS - "MachineMIPS16", # /MACHINE:MIPS16 - "MachineMIPSFPU", # /MACHINE:MIPSFPU - "MachineMIPSFPU16", # /MACHINE:MIPSFPU16 - None, - None, - None, - "MachineSH4", # /MACHINE:SH4 - None, - "MachineTHUMB", # /MACHINE:THUMB - "MachineX64", - ] -) # /MACHINE:X64 - -_Same( - _link, "AssemblyDebug", _Enumeration(["", "true", "false"]) # /ASSEMBLYDEBUG -) # /ASSEMBLYDEBUG:DISABLE -_Same( - _link, - "CLRImageType", - _Enumeration( - [ - "Default", - "ForceIJWImage", # /CLRIMAGETYPE:IJW - "ForcePureILImage", # /Switch="CLRIMAGETYPE:PURE - "ForceSafeILImage", - ] - ), -) # /Switch="CLRIMAGETYPE:SAFE -_Same( - _link, - "CLRThreadAttribute", - _Enumeration( - [ - "DefaultThreadingAttribute", # /CLRTHREADATTRIBUTE:NONE - "MTAThreadingAttribute", # /CLRTHREADATTRIBUTE:MTA - "STAThreadingAttribute", - ] - ), -) # /CLRTHREADATTRIBUTE:STA -_Same( - _link, - "DataExecutionPrevention", - _Enumeration(["", "false", "true"]), # /NXCOMPAT:NO -) # /NXCOMPAT -_Same( - _link, - "Driver", - _Enumeration(["NotSet", "Driver", "UpOnly", "WDM"]), # /Driver # /DRIVER:UPONLY -) # /DRIVER:WDM -_Same( - _link, - "LinkTimeCodeGeneration", - _Enumeration( - [ - "Default", - "UseLinkTimeCodeGeneration", # /LTCG - "PGInstrument", # /LTCG:PGInstrument - "PGOptimization", # /LTCG:PGOptimize - "PGUpdate", - ] - ), -) # /LTCG:PGUpdate -_Same( - _link, - "ShowProgress", - _Enumeration( - ["NotSet", "LinkVerbose", "LinkVerboseLib"], # /VERBOSE # /VERBOSE:Lib - new=[ - "LinkVerboseICF", # /VERBOSE:ICF - "LinkVerboseREF", # /VERBOSE:REF - "LinkVerboseSAFESEH", # /VERBOSE:SAFESEH - "LinkVerboseCLR", - ], - ), -) # /VERBOSE:CLR -_Same(_link, "SubSystem", _subsystem_enumeration) -_Same(_link, "TargetMachine", _target_machine_enumeration) -_Same( - _link, - "UACExecutionLevel", - _Enumeration( - [ - "AsInvoker", # /level='asInvoker' - "HighestAvailable", # /level='highestAvailable' - "RequireAdministrator", - ] - ), -) # /level='requireAdministrator' -_Same(_link, "MinimumRequiredVersion", _string) -_Same(_link, "TreatLinkerWarningAsErrors", _boolean) # /WX - - -# Options found in MSVS that have been renamed in MSBuild. -_Renamed( - _link, - "ErrorReporting", - "LinkErrorReporting", - _Enumeration( - [ - "NoErrorReport", # /ERRORREPORT:NONE - "PromptImmediately", # /ERRORREPORT:PROMPT - "QueueForNextLogin", - ], # /ERRORREPORT:QUEUE - new=["SendErrorReport"], - ), -) # /ERRORREPORT:SEND -_Renamed( - _link, "IgnoreDefaultLibraryNames", "IgnoreSpecificDefaultLibraries", _file_list -) # /NODEFAULTLIB -_Renamed(_link, "ResourceOnlyDLL", "NoEntryPoint", _boolean) # /NOENTRY -_Renamed(_link, "SwapRunFromNet", "SwapRunFromNET", _boolean) # /SWAPRUN:NET - -_Moved(_link, "GenerateManifest", "", _boolean) -_Moved(_link, "IgnoreImportLibrary", "", _boolean) -_Moved(_link, "LinkIncremental", "", _newly_boolean) -_Moved(_link, "LinkLibraryDependencies", "ProjectReference", _boolean) -_Moved(_link, "UseLibraryDependencyInputs", "ProjectReference", _boolean) - -# MSVS options not found in MSBuild. -_MSVSOnly(_link, "OptimizeForWindows98", _newly_boolean) -_MSVSOnly(_link, "UseUnicodeResponseFiles", _boolean) - -# MSBuild options not found in MSVS. -_MSBuildOnly(_link, "BuildingInIDE", _boolean) -_MSBuildOnly(_link, "ImageHasSafeExceptionHandlers", _boolean) # /SAFESEH -_MSBuildOnly(_link, "LinkDLL", _boolean) # /DLL Visible='false' -_MSBuildOnly(_link, "LinkStatus", _boolean) # /LTCG:STATUS -_MSBuildOnly(_link, "PreventDllBinding", _boolean) # /ALLOWBIND -_MSBuildOnly(_link, "SupportNobindOfDelayLoadedDLL", _boolean) # /DELAY:NOBIND -_MSBuildOnly(_link, "TrackerLogDirectory", _folder_name) -_MSBuildOnly(_link, "MSDOSStubFileName", _file_name) # /STUB Visible='false' -_MSBuildOnly(_link, "SectionAlignment", _integer) # /ALIGN -_MSBuildOnly(_link, "SpecifySectionAttributes", _string) # /SECTION -_MSBuildOnly( - _link, - "ForceFileOutput", - _Enumeration( - [], - new=[ - "Enabled", # /FORCE - # /FORCE:MULTIPLE - "MultiplyDefinedSymbolOnly", - "UndefinedSymbolOnly", - ], - ), -) # /FORCE:UNRESOLVED -_MSBuildOnly( - _link, - "CreateHotPatchableImage", - _Enumeration( - [], - new=[ - "Enabled", # /FUNCTIONPADMIN - "X86Image", # /FUNCTIONPADMIN:5 - "X64Image", # /FUNCTIONPADMIN:6 - "ItaniumImage", - ], - ), -) # /FUNCTIONPADMIN:16 -_MSBuildOnly( - _link, - "CLRSupportLastError", - _Enumeration( - [], - new=[ - "Enabled", # /CLRSupportLastError - "Disabled", # /CLRSupportLastError:NO - # /CLRSupportLastError:SYSTEMDLL - "SystemDlls", - ], - ), -) - - -# Directives for converting VCResourceCompilerTool to ResourceCompile. -# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\rc.xml" for -# the schema of the MSBuild ResourceCompile settings. - -_Same(_rc, "AdditionalOptions", _string_list) -_Same(_rc, "AdditionalIncludeDirectories", _folder_list) # /I -_Same(_rc, "Culture", _Integer(msbuild_base=16)) -_Same(_rc, "IgnoreStandardIncludePath", _boolean) # /X -_Same(_rc, "PreprocessorDefinitions", _string_list) # /D -_Same(_rc, "ResourceOutputFileName", _string) # /fo -_Same(_rc, "ShowProgress", _boolean) # /v -# There is no UI in VisualStudio 2008 to set the following properties. -# However they are found in CL and other tools. Include them here for -# completeness, as they are very likely to have the same usage pattern. -_Same(_rc, "SuppressStartupBanner", _boolean) # /nologo -_Same(_rc, "UndefinePreprocessorDefinitions", _string_list) # /u - -# MSBuild options not found in MSVS. -_MSBuildOnly(_rc, "NullTerminateStrings", _boolean) # /n -_MSBuildOnly(_rc, "TrackerLogDirectory", _folder_name) - - -# Directives for converting VCMIDLTool to Midl. -# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\midl.xml" for -# the schema of the MSBuild Midl settings. - -_Same(_midl, "AdditionalIncludeDirectories", _folder_list) # /I -_Same(_midl, "AdditionalOptions", _string_list) -_Same(_midl, "CPreprocessOptions", _string) # /cpp_opt -_Same(_midl, "ErrorCheckAllocations", _boolean) # /error allocation -_Same(_midl, "ErrorCheckBounds", _boolean) # /error bounds_check -_Same(_midl, "ErrorCheckEnumRange", _boolean) # /error enum -_Same(_midl, "ErrorCheckRefPointers", _boolean) # /error ref -_Same(_midl, "ErrorCheckStubData", _boolean) # /error stub_data -_Same(_midl, "GenerateStublessProxies", _boolean) # /Oicf -_Same(_midl, "GenerateTypeLibrary", _boolean) -_Same(_midl, "HeaderFileName", _file_name) # /h -_Same(_midl, "IgnoreStandardIncludePath", _boolean) # /no_def_idir -_Same(_midl, "InterfaceIdentifierFileName", _file_name) # /iid -_Same(_midl, "MkTypLibCompatible", _boolean) # /mktyplib203 -_Same(_midl, "OutputDirectory", _string) # /out -_Same(_midl, "PreprocessorDefinitions", _string_list) # /D -_Same(_midl, "ProxyFileName", _file_name) # /proxy -_Same(_midl, "RedirectOutputAndErrors", _file_name) # /o -_Same(_midl, "SuppressStartupBanner", _boolean) # /nologo -_Same(_midl, "TypeLibraryName", _file_name) # /tlb -_Same(_midl, "UndefinePreprocessorDefinitions", _string_list) # /U -_Same(_midl, "WarnAsError", _boolean) # /WX - -_Same( - _midl, - "DefaultCharType", - _Enumeration(["Unsigned", "Signed", "Ascii"]), # /char unsigned # /char signed -) # /char ascii7 -_Same( - _midl, - "TargetEnvironment", - _Enumeration( - [ - "NotSet", - "Win32", # /env win32 - "Itanium", # /env ia64 - "X64", # /env x64 - "ARM64", # /env arm64 - ] - ), -) -_Same( - _midl, - "EnableErrorChecks", - _Enumeration(["EnableCustom", "None", "All"]), # /error none -) # /error all -_Same( - _midl, - "StructMemberAlignment", - _Enumeration(["NotSet", "1", "2", "4", "8"]), # Zp1 # Zp2 # Zp4 -) # Zp8 -_Same( - _midl, - "WarningLevel", - _Enumeration(["0", "1", "2", "3", "4"]), # /W0 # /W1 # /W2 # /W3 -) # /W4 - -_Renamed(_midl, "DLLDataFileName", "DllDataFileName", _file_name) # /dlldata -_Renamed(_midl, "ValidateParameters", "ValidateAllParameters", _boolean) # /robust - -# MSBuild options not found in MSVS. -_MSBuildOnly(_midl, "ApplicationConfigurationMode", _boolean) # /app_config -_MSBuildOnly(_midl, "ClientStubFile", _file_name) # /cstub -_MSBuildOnly( - _midl, "GenerateClientFiles", _Enumeration([], new=["Stub", "None"]) # /client stub -) # /client none -_MSBuildOnly( - _midl, "GenerateServerFiles", _Enumeration([], new=["Stub", "None"]) # /client stub -) # /client none -_MSBuildOnly(_midl, "LocaleID", _integer) # /lcid DECIMAL -_MSBuildOnly(_midl, "ServerStubFile", _file_name) # /sstub -_MSBuildOnly(_midl, "SuppressCompilerWarnings", _boolean) # /no_warn -_MSBuildOnly(_midl, "TrackerLogDirectory", _folder_name) -_MSBuildOnly( - _midl, "TypeLibFormat", _Enumeration([], new=["NewFormat", "OldFormat"]) # /newtlb -) # /oldtlb - - -# Directives for converting VCLibrarianTool to Lib. -# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\lib.xml" for -# the schema of the MSBuild Lib settings. - -_Same(_lib, "AdditionalDependencies", _file_list) -_Same(_lib, "AdditionalLibraryDirectories", _folder_list) # /LIBPATH -_Same(_lib, "AdditionalOptions", _string_list) -_Same(_lib, "ExportNamedFunctions", _string_list) # /EXPORT -_Same(_lib, "ForceSymbolReferences", _string) # /INCLUDE -_Same(_lib, "IgnoreAllDefaultLibraries", _boolean) # /NODEFAULTLIB -_Same(_lib, "IgnoreSpecificDefaultLibraries", _file_list) # /NODEFAULTLIB -_Same(_lib, "ModuleDefinitionFile", _file_name) # /DEF -_Same(_lib, "OutputFile", _file_name) # /OUT -_Same(_lib, "SuppressStartupBanner", _boolean) # /NOLOGO -_Same(_lib, "UseUnicodeResponseFiles", _boolean) -_Same(_lib, "LinkTimeCodeGeneration", _boolean) # /LTCG -_Same(_lib, "TargetMachine", _target_machine_enumeration) - -# TODO(jeanluc) _link defines the same value that gets moved to -# ProjectReference. We may want to validate that they are consistent. -_Moved(_lib, "LinkLibraryDependencies", "ProjectReference", _boolean) - -_MSBuildOnly(_lib, "DisplayLibrary", _string) # /LIST Visible='false' -_MSBuildOnly( - _lib, - "ErrorReporting", - _Enumeration( - [], - new=[ - "PromptImmediately", # /ERRORREPORT:PROMPT - "QueueForNextLogin", # /ERRORREPORT:QUEUE - "SendErrorReport", # /ERRORREPORT:SEND - "NoErrorReport", - ], - ), -) # /ERRORREPORT:NONE -_MSBuildOnly(_lib, "MinimumRequiredVersion", _string) -_MSBuildOnly(_lib, "Name", _file_name) # /NAME -_MSBuildOnly(_lib, "RemoveObjects", _file_list) # /REMOVE -_MSBuildOnly(_lib, "SubSystem", _subsystem_enumeration) -_MSBuildOnly(_lib, "TrackerLogDirectory", _folder_name) -_MSBuildOnly(_lib, "TreatLibWarningAsErrors", _boolean) # /WX -_MSBuildOnly(_lib, "Verbose", _boolean) - - -# Directives for converting VCManifestTool to Mt. -# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\mt.xml" for -# the schema of the MSBuild Lib settings. - -# Options that have the same name in MSVS and MSBuild -_Same(_manifest, "AdditionalManifestFiles", _file_list) # /manifest -_Same(_manifest, "AdditionalOptions", _string_list) -_Same(_manifest, "AssemblyIdentity", _string) # /identity: -_Same(_manifest, "ComponentFileName", _file_name) # /dll -_Same(_manifest, "GenerateCatalogFiles", _boolean) # /makecdfs -_Same(_manifest, "InputResourceManifests", _string) # /inputresource -_Same(_manifest, "OutputManifestFile", _file_name) # /out -_Same(_manifest, "RegistrarScriptFile", _file_name) # /rgs -_Same(_manifest, "ReplacementsFile", _file_name) # /replacements -_Same(_manifest, "SuppressStartupBanner", _boolean) # /nologo -_Same(_manifest, "TypeLibraryFile", _file_name) # /tlb: -_Same(_manifest, "UpdateFileHashes", _boolean) # /hashupdate -_Same(_manifest, "UpdateFileHashesSearchPath", _file_name) -_Same(_manifest, "VerboseOutput", _boolean) # /verbose - -# Options that have moved location. -_MovedAndRenamed( - _manifest, - "ManifestResourceFile", - "ManifestResourceCompile", - "ResourceOutputFileName", - _file_name, -) -_Moved(_manifest, "EmbedManifest", "", _boolean) - -# MSVS options not found in MSBuild. -_MSVSOnly(_manifest, "DependencyInformationFile", _file_name) -_MSVSOnly(_manifest, "UseFAT32Workaround", _boolean) -_MSVSOnly(_manifest, "UseUnicodeResponseFiles", _boolean) - -# MSBuild options not found in MSVS. -_MSBuildOnly(_manifest, "EnableDPIAwareness", _boolean) -_MSBuildOnly(_manifest, "GenerateCategoryTags", _boolean) # /category -_MSBuildOnly( - _manifest, "ManifestFromManagedAssembly", _file_name -) # /managedassemblyname -_MSBuildOnly(_manifest, "OutputResourceManifests", _string) # /outputresource -_MSBuildOnly(_manifest, "SuppressDependencyElement", _boolean) # /nodependency -_MSBuildOnly(_manifest, "TrackerLogDirectory", _folder_name) - - -# Directives for MASM. -# See "$(VCTargetsPath)\BuildCustomizations\masm.xml" for the schema of the -# MSBuild MASM settings. - -# Options that have the same name in MSVS and MSBuild. -_Same(_masm, "UseSafeExceptionHandlers", _boolean) # /safeseh diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py deleted file mode 100755 index 6ca0968..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +++ /dev/null @@ -1,1547 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Unit tests for the MSVSSettings.py file.""" - -import unittest -import gyp.MSVSSettings as MSVSSettings - -from io import StringIO - - -class TestSequenceFunctions(unittest.TestCase): - def setUp(self): - self.stderr = StringIO() - - def _ExpectedWarnings(self, expected): - """Compares recorded lines to expected warnings.""" - self.stderr.seek(0) - actual = self.stderr.read().split("\n") - actual = [line for line in actual if line] - self.assertEqual(sorted(expected), sorted(actual)) - - def testValidateMSVSSettings_tool_names(self): - """Tests that only MSVS tool names are allowed.""" - MSVSSettings.ValidateMSVSSettings( - { - "VCCLCompilerTool": {}, - "VCLinkerTool": {}, - "VCMIDLTool": {}, - "foo": {}, - "VCResourceCompilerTool": {}, - "VCLibrarianTool": {}, - "VCManifestTool": {}, - "ClCompile": {}, - }, - self.stderr, - ) - self._ExpectedWarnings( - ["Warning: unrecognized tool foo", "Warning: unrecognized tool ClCompile"] - ) - - def testValidateMSVSSettings_settings(self): - """Tests that for invalid MSVS settings.""" - MSVSSettings.ValidateMSVSSettings( - { - "VCCLCompilerTool": { - "AdditionalIncludeDirectories": "folder1;folder2", - "AdditionalOptions": ["string1", "string2"], - "AdditionalUsingDirectories": "folder1;folder2", - "AssemblerListingLocation": "a_file_name", - "AssemblerOutput": "0", - "BasicRuntimeChecks": "5", - "BrowseInformation": "fdkslj", - "BrowseInformationFile": "a_file_name", - "BufferSecurityCheck": "true", - "CallingConvention": "-1", - "CompileAs": "1", - "DebugInformationFormat": "2", - "DefaultCharIsUnsigned": "true", - "Detect64BitPortabilityProblems": "true", - "DisableLanguageExtensions": "true", - "DisableSpecificWarnings": "string1;string2", - "EnableEnhancedInstructionSet": "1", - "EnableFiberSafeOptimizations": "true", - "EnableFunctionLevelLinking": "true", - "EnableIntrinsicFunctions": "true", - "EnablePREfast": "true", - "Enableprefast": "bogus", - "ErrorReporting": "1", - "ExceptionHandling": "1", - "ExpandAttributedSource": "true", - "FavorSizeOrSpeed": "1", - "FloatingPointExceptions": "true", - "FloatingPointModel": "1", - "ForceConformanceInForLoopScope": "true", - "ForcedIncludeFiles": "file1;file2", - "ForcedUsingFiles": "file1;file2", - "GeneratePreprocessedFile": "1", - "GenerateXMLDocumentationFiles": "true", - "IgnoreStandardIncludePath": "true", - "InlineFunctionExpansion": "1", - "KeepComments": "true", - "MinimalRebuild": "true", - "ObjectFile": "a_file_name", - "OmitDefaultLibName": "true", - "OmitFramePointers": "true", - "OpenMP": "true", - "Optimization": "1", - "PrecompiledHeaderFile": "a_file_name", - "PrecompiledHeaderThrough": "a_file_name", - "PreprocessorDefinitions": "string1;string2", - "ProgramDataBaseFileName": "a_file_name", - "RuntimeLibrary": "1", - "RuntimeTypeInfo": "true", - "ShowIncludes": "true", - "SmallerTypeCheck": "true", - "StringPooling": "true", - "StructMemberAlignment": "1", - "SuppressStartupBanner": "true", - "TreatWChar_tAsBuiltInType": "true", - "UndefineAllPreprocessorDefinitions": "true", - "UndefinePreprocessorDefinitions": "string1;string2", - "UseFullPaths": "true", - "UsePrecompiledHeader": "1", - "UseUnicodeResponseFiles": "true", - "WarnAsError": "true", - "WarningLevel": "1", - "WholeProgramOptimization": "true", - "XMLDocumentationFileName": "a_file_name", - "ZZXYZ": "bogus", - }, - "VCLinkerTool": { - "AdditionalDependencies": "file1;file2", - "AdditionalDependencies_excluded": "file3", - "AdditionalLibraryDirectories": "folder1;folder2", - "AdditionalManifestDependencies": "file1;file2", - "AdditionalOptions": "a string1", - "AddModuleNamesToAssembly": "file1;file2", - "AllowIsolation": "true", - "AssemblyDebug": "2", - "AssemblyLinkResource": "file1;file2", - "BaseAddress": "a string1", - "CLRImageType": "2", - "CLRThreadAttribute": "2", - "CLRUnmanagedCodeCheck": "true", - "DataExecutionPrevention": "2", - "DelayLoadDLLs": "file1;file2", - "DelaySign": "true", - "Driver": "2", - "EmbedManagedResourceFile": "file1;file2", - "EnableCOMDATFolding": "2", - "EnableUAC": "true", - "EntryPointSymbol": "a string1", - "ErrorReporting": "2", - "FixedBaseAddress": "2", - "ForceSymbolReferences": "file1;file2", - "FunctionOrder": "a_file_name", - "GenerateDebugInformation": "true", - "GenerateManifest": "true", - "GenerateMapFile": "true", - "HeapCommitSize": "a string1", - "HeapReserveSize": "a string1", - "IgnoreAllDefaultLibraries": "true", - "IgnoreDefaultLibraryNames": "file1;file2", - "IgnoreEmbeddedIDL": "true", - "IgnoreImportLibrary": "true", - "ImportLibrary": "a_file_name", - "KeyContainer": "a_file_name", - "KeyFile": "a_file_name", - "LargeAddressAware": "2", - "LinkIncremental": "2", - "LinkLibraryDependencies": "true", - "LinkTimeCodeGeneration": "2", - "ManifestFile": "a_file_name", - "MapExports": "true", - "MapFileName": "a_file_name", - "MergedIDLBaseFileName": "a_file_name", - "MergeSections": "a string1", - "MidlCommandFile": "a_file_name", - "ModuleDefinitionFile": "a_file_name", - "OptimizeForWindows98": "1", - "OptimizeReferences": "2", - "OutputFile": "a_file_name", - "PerUserRedirection": "true", - "Profile": "true", - "ProfileGuidedDatabase": "a_file_name", - "ProgramDatabaseFile": "a_file_name", - "RandomizedBaseAddress": "2", - "RegisterOutput": "true", - "ResourceOnlyDLL": "true", - "SetChecksum": "true", - "ShowProgress": "2", - "StackCommitSize": "a string1", - "StackReserveSize": "a string1", - "StripPrivateSymbols": "a_file_name", - "SubSystem": "2", - "SupportUnloadOfDelayLoadedDLL": "true", - "SuppressStartupBanner": "true", - "SwapRunFromCD": "true", - "SwapRunFromNet": "true", - "TargetMachine": "2", - "TerminalServerAware": "2", - "TurnOffAssemblyGeneration": "true", - "TypeLibraryFile": "a_file_name", - "TypeLibraryResourceID": "33", - "UACExecutionLevel": "2", - "UACUIAccess": "true", - "UseLibraryDependencyInputs": "true", - "UseUnicodeResponseFiles": "true", - "Version": "a string1", - }, - "VCMIDLTool": { - "AdditionalIncludeDirectories": "folder1;folder2", - "AdditionalOptions": "a string1", - "CPreprocessOptions": "a string1", - "DefaultCharType": "1", - "DLLDataFileName": "a_file_name", - "EnableErrorChecks": "1", - "ErrorCheckAllocations": "true", - "ErrorCheckBounds": "true", - "ErrorCheckEnumRange": "true", - "ErrorCheckRefPointers": "true", - "ErrorCheckStubData": "true", - "GenerateStublessProxies": "true", - "GenerateTypeLibrary": "true", - "HeaderFileName": "a_file_name", - "IgnoreStandardIncludePath": "true", - "InterfaceIdentifierFileName": "a_file_name", - "MkTypLibCompatible": "true", - "notgood": "bogus", - "OutputDirectory": "a string1", - "PreprocessorDefinitions": "string1;string2", - "ProxyFileName": "a_file_name", - "RedirectOutputAndErrors": "a_file_name", - "StructMemberAlignment": "1", - "SuppressStartupBanner": "true", - "TargetEnvironment": "1", - "TypeLibraryName": "a_file_name", - "UndefinePreprocessorDefinitions": "string1;string2", - "ValidateParameters": "true", - "WarnAsError": "true", - "WarningLevel": "1", - }, - "VCResourceCompilerTool": { - "AdditionalOptions": "a string1", - "AdditionalIncludeDirectories": "folder1;folder2", - "Culture": "1003", - "IgnoreStandardIncludePath": "true", - "notgood2": "bogus", - "PreprocessorDefinitions": "string1;string2", - "ResourceOutputFileName": "a string1", - "ShowProgress": "true", - "SuppressStartupBanner": "true", - "UndefinePreprocessorDefinitions": "string1;string2", - }, - "VCLibrarianTool": { - "AdditionalDependencies": "file1;file2", - "AdditionalLibraryDirectories": "folder1;folder2", - "AdditionalOptions": "a string1", - "ExportNamedFunctions": "string1;string2", - "ForceSymbolReferences": "a string1", - "IgnoreAllDefaultLibraries": "true", - "IgnoreSpecificDefaultLibraries": "file1;file2", - "LinkLibraryDependencies": "true", - "ModuleDefinitionFile": "a_file_name", - "OutputFile": "a_file_name", - "SuppressStartupBanner": "true", - "UseUnicodeResponseFiles": "true", - }, - "VCManifestTool": { - "AdditionalManifestFiles": "file1;file2", - "AdditionalOptions": "a string1", - "AssemblyIdentity": "a string1", - "ComponentFileName": "a_file_name", - "DependencyInformationFile": "a_file_name", - "GenerateCatalogFiles": "true", - "InputResourceManifests": "a string1", - "ManifestResourceFile": "a_file_name", - "OutputManifestFile": "a_file_name", - "RegistrarScriptFile": "a_file_name", - "ReplacementsFile": "a_file_name", - "SuppressStartupBanner": "true", - "TypeLibraryFile": "a_file_name", - "UpdateFileHashes": "truel", - "UpdateFileHashesSearchPath": "a_file_name", - "UseFAT32Workaround": "true", - "UseUnicodeResponseFiles": "true", - "VerboseOutput": "true", - }, - }, - self.stderr, - ) - self._ExpectedWarnings( - [ - "Warning: for VCCLCompilerTool/BasicRuntimeChecks, " - "index value (5) not in expected range [0, 4)", - "Warning: for VCCLCompilerTool/BrowseInformation, " - "invalid literal for int() with base 10: 'fdkslj'", - "Warning: for VCCLCompilerTool/CallingConvention, " - "index value (-1) not in expected range [0, 4)", - "Warning: for VCCLCompilerTool/DebugInformationFormat, " - "converted value for 2 not specified.", - "Warning: unrecognized setting VCCLCompilerTool/Enableprefast", - "Warning: unrecognized setting VCCLCompilerTool/ZZXYZ", - "Warning: for VCLinkerTool/TargetMachine, " - "converted value for 2 not specified.", - "Warning: unrecognized setting VCMIDLTool/notgood", - "Warning: unrecognized setting VCResourceCompilerTool/notgood2", - "Warning: for VCManifestTool/UpdateFileHashes, " - "expected bool; got 'truel'" - "", - ] - ) - - def testValidateMSBuildSettings_settings(self): - """Tests that for invalid MSBuild settings.""" - MSVSSettings.ValidateMSBuildSettings( - { - "ClCompile": { - "AdditionalIncludeDirectories": "folder1;folder2", - "AdditionalOptions": ["string1", "string2"], - "AdditionalUsingDirectories": "folder1;folder2", - "AssemblerListingLocation": "a_file_name", - "AssemblerOutput": "NoListing", - "BasicRuntimeChecks": "StackFrameRuntimeCheck", - "BrowseInformation": "false", - "BrowseInformationFile": "a_file_name", - "BufferSecurityCheck": "true", - "BuildingInIDE": "true", - "CallingConvention": "Cdecl", - "CompileAs": "CompileAsC", - "CompileAsManaged": "true", - "CreateHotpatchableImage": "true", - "DebugInformationFormat": "ProgramDatabase", - "DisableLanguageExtensions": "true", - "DisableSpecificWarnings": "string1;string2", - "EnableEnhancedInstructionSet": "StreamingSIMDExtensions", - "EnableFiberSafeOptimizations": "true", - "EnablePREfast": "true", - "Enableprefast": "bogus", - "ErrorReporting": "Prompt", - "ExceptionHandling": "SyncCThrow", - "ExpandAttributedSource": "true", - "FavorSizeOrSpeed": "Neither", - "FloatingPointExceptions": "true", - "FloatingPointModel": "Precise", - "ForceConformanceInForLoopScope": "true", - "ForcedIncludeFiles": "file1;file2", - "ForcedUsingFiles": "file1;file2", - "FunctionLevelLinking": "false", - "GenerateXMLDocumentationFiles": "true", - "IgnoreStandardIncludePath": "true", - "InlineFunctionExpansion": "OnlyExplicitInline", - "IntrinsicFunctions": "false", - "MinimalRebuild": "true", - "MultiProcessorCompilation": "true", - "ObjectFileName": "a_file_name", - "OmitDefaultLibName": "true", - "OmitFramePointers": "true", - "OpenMPSupport": "true", - "Optimization": "Disabled", - "PrecompiledHeader": "NotUsing", - "PrecompiledHeaderFile": "a_file_name", - "PrecompiledHeaderOutputFile": "a_file_name", - "PreprocessKeepComments": "true", - "PreprocessorDefinitions": "string1;string2", - "PreprocessOutputPath": "a string1", - "PreprocessSuppressLineNumbers": "false", - "PreprocessToFile": "false", - "ProcessorNumber": "33", - "ProgramDataBaseFileName": "a_file_name", - "RuntimeLibrary": "MultiThreaded", - "RuntimeTypeInfo": "true", - "ShowIncludes": "true", - "SmallerTypeCheck": "true", - "StringPooling": "true", - "StructMemberAlignment": "1Byte", - "SuppressStartupBanner": "true", - "TrackerLogDirectory": "a_folder", - "TreatSpecificWarningsAsErrors": "string1;string2", - "TreatWarningAsError": "true", - "TreatWChar_tAsBuiltInType": "true", - "UndefineAllPreprocessorDefinitions": "true", - "UndefinePreprocessorDefinitions": "string1;string2", - "UseFullPaths": "true", - "UseUnicodeForAssemblerListing": "true", - "WarningLevel": "TurnOffAllWarnings", - "WholeProgramOptimization": "true", - "XMLDocumentationFileName": "a_file_name", - "ZZXYZ": "bogus", - }, - "Link": { - "AdditionalDependencies": "file1;file2", - "AdditionalLibraryDirectories": "folder1;folder2", - "AdditionalManifestDependencies": "file1;file2", - "AdditionalOptions": "a string1", - "AddModuleNamesToAssembly": "file1;file2", - "AllowIsolation": "true", - "AssemblyDebug": "", - "AssemblyLinkResource": "file1;file2", - "BaseAddress": "a string1", - "BuildingInIDE": "true", - "CLRImageType": "ForceIJWImage", - "CLRSupportLastError": "Enabled", - "CLRThreadAttribute": "MTAThreadingAttribute", - "CLRUnmanagedCodeCheck": "true", - "CreateHotPatchableImage": "X86Image", - "DataExecutionPrevention": "false", - "DelayLoadDLLs": "file1;file2", - "DelaySign": "true", - "Driver": "NotSet", - "EmbedManagedResourceFile": "file1;file2", - "EnableCOMDATFolding": "false", - "EnableUAC": "true", - "EntryPointSymbol": "a string1", - "FixedBaseAddress": "false", - "ForceFileOutput": "Enabled", - "ForceSymbolReferences": "file1;file2", - "FunctionOrder": "a_file_name", - "GenerateDebugInformation": "true", - "GenerateMapFile": "true", - "HeapCommitSize": "a string1", - "HeapReserveSize": "a string1", - "IgnoreAllDefaultLibraries": "true", - "IgnoreEmbeddedIDL": "true", - "IgnoreSpecificDefaultLibraries": "a_file_list", - "ImageHasSafeExceptionHandlers": "true", - "ImportLibrary": "a_file_name", - "KeyContainer": "a_file_name", - "KeyFile": "a_file_name", - "LargeAddressAware": "false", - "LinkDLL": "true", - "LinkErrorReporting": "SendErrorReport", - "LinkStatus": "true", - "LinkTimeCodeGeneration": "UseLinkTimeCodeGeneration", - "ManifestFile": "a_file_name", - "MapExports": "true", - "MapFileName": "a_file_name", - "MergedIDLBaseFileName": "a_file_name", - "MergeSections": "a string1", - "MidlCommandFile": "a_file_name", - "MinimumRequiredVersion": "a string1", - "ModuleDefinitionFile": "a_file_name", - "MSDOSStubFileName": "a_file_name", - "NoEntryPoint": "true", - "OptimizeReferences": "false", - "OutputFile": "a_file_name", - "PerUserRedirection": "true", - "PreventDllBinding": "true", - "Profile": "true", - "ProfileGuidedDatabase": "a_file_name", - "ProgramDatabaseFile": "a_file_name", - "RandomizedBaseAddress": "false", - "RegisterOutput": "true", - "SectionAlignment": "33", - "SetChecksum": "true", - "ShowProgress": "LinkVerboseREF", - "SpecifySectionAttributes": "a string1", - "StackCommitSize": "a string1", - "StackReserveSize": "a string1", - "StripPrivateSymbols": "a_file_name", - "SubSystem": "Console", - "SupportNobindOfDelayLoadedDLL": "true", - "SupportUnloadOfDelayLoadedDLL": "true", - "SuppressStartupBanner": "true", - "SwapRunFromCD": "true", - "SwapRunFromNET": "true", - "TargetMachine": "MachineX86", - "TerminalServerAware": "false", - "TrackerLogDirectory": "a_folder", - "TreatLinkerWarningAsErrors": "true", - "TurnOffAssemblyGeneration": "true", - "TypeLibraryFile": "a_file_name", - "TypeLibraryResourceID": "33", - "UACExecutionLevel": "AsInvoker", - "UACUIAccess": "true", - "Version": "a string1", - }, - "ResourceCompile": { - "AdditionalIncludeDirectories": "folder1;folder2", - "AdditionalOptions": "a string1", - "Culture": "0x236", - "IgnoreStandardIncludePath": "true", - "NullTerminateStrings": "true", - "PreprocessorDefinitions": "string1;string2", - "ResourceOutputFileName": "a string1", - "ShowProgress": "true", - "SuppressStartupBanner": "true", - "TrackerLogDirectory": "a_folder", - "UndefinePreprocessorDefinitions": "string1;string2", - }, - "Midl": { - "AdditionalIncludeDirectories": "folder1;folder2", - "AdditionalOptions": "a string1", - "ApplicationConfigurationMode": "true", - "ClientStubFile": "a_file_name", - "CPreprocessOptions": "a string1", - "DefaultCharType": "Signed", - "DllDataFileName": "a_file_name", - "EnableErrorChecks": "EnableCustom", - "ErrorCheckAllocations": "true", - "ErrorCheckBounds": "true", - "ErrorCheckEnumRange": "true", - "ErrorCheckRefPointers": "true", - "ErrorCheckStubData": "true", - "GenerateClientFiles": "Stub", - "GenerateServerFiles": "None", - "GenerateStublessProxies": "true", - "GenerateTypeLibrary": "true", - "HeaderFileName": "a_file_name", - "IgnoreStandardIncludePath": "true", - "InterfaceIdentifierFileName": "a_file_name", - "LocaleID": "33", - "MkTypLibCompatible": "true", - "OutputDirectory": "a string1", - "PreprocessorDefinitions": "string1;string2", - "ProxyFileName": "a_file_name", - "RedirectOutputAndErrors": "a_file_name", - "ServerStubFile": "a_file_name", - "StructMemberAlignment": "NotSet", - "SuppressCompilerWarnings": "true", - "SuppressStartupBanner": "true", - "TargetEnvironment": "Itanium", - "TrackerLogDirectory": "a_folder", - "TypeLibFormat": "NewFormat", - "TypeLibraryName": "a_file_name", - "UndefinePreprocessorDefinitions": "string1;string2", - "ValidateAllParameters": "true", - "WarnAsError": "true", - "WarningLevel": "1", - }, - "Lib": { - "AdditionalDependencies": "file1;file2", - "AdditionalLibraryDirectories": "folder1;folder2", - "AdditionalOptions": "a string1", - "DisplayLibrary": "a string1", - "ErrorReporting": "PromptImmediately", - "ExportNamedFunctions": "string1;string2", - "ForceSymbolReferences": "a string1", - "IgnoreAllDefaultLibraries": "true", - "IgnoreSpecificDefaultLibraries": "file1;file2", - "LinkTimeCodeGeneration": "true", - "MinimumRequiredVersion": "a string1", - "ModuleDefinitionFile": "a_file_name", - "Name": "a_file_name", - "OutputFile": "a_file_name", - "RemoveObjects": "file1;file2", - "SubSystem": "Console", - "SuppressStartupBanner": "true", - "TargetMachine": "MachineX86i", - "TrackerLogDirectory": "a_folder", - "TreatLibWarningAsErrors": "true", - "UseUnicodeResponseFiles": "true", - "Verbose": "true", - }, - "Manifest": { - "AdditionalManifestFiles": "file1;file2", - "AdditionalOptions": "a string1", - "AssemblyIdentity": "a string1", - "ComponentFileName": "a_file_name", - "EnableDPIAwareness": "fal", - "GenerateCatalogFiles": "truel", - "GenerateCategoryTags": "true", - "InputResourceManifests": "a string1", - "ManifestFromManagedAssembly": "a_file_name", - "notgood3": "bogus", - "OutputManifestFile": "a_file_name", - "OutputResourceManifests": "a string1", - "RegistrarScriptFile": "a_file_name", - "ReplacementsFile": "a_file_name", - "SuppressDependencyElement": "true", - "SuppressStartupBanner": "true", - "TrackerLogDirectory": "a_folder", - "TypeLibraryFile": "a_file_name", - "UpdateFileHashes": "true", - "UpdateFileHashesSearchPath": "a_file_name", - "VerboseOutput": "true", - }, - "ProjectReference": { - "LinkLibraryDependencies": "true", - "UseLibraryDependencyInputs": "true", - }, - "ManifestResourceCompile": {"ResourceOutputFileName": "a_file_name"}, - "": { - "EmbedManifest": "true", - "GenerateManifest": "true", - "IgnoreImportLibrary": "true", - "LinkIncremental": "false", - }, - }, - self.stderr, - ) - self._ExpectedWarnings( - [ - "Warning: unrecognized setting ClCompile/Enableprefast", - "Warning: unrecognized setting ClCompile/ZZXYZ", - "Warning: unrecognized setting Manifest/notgood3", - "Warning: for Manifest/GenerateCatalogFiles, " - "expected bool; got 'truel'", - "Warning: for Lib/TargetMachine, unrecognized enumerated value " - "MachineX86i", - "Warning: for Manifest/EnableDPIAwareness, expected bool; got 'fal'", - ] - ) - - def testConvertToMSBuildSettings_empty(self): - """Tests an empty conversion.""" - msvs_settings = {} - expected_msbuild_settings = {} - actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings( - msvs_settings, self.stderr - ) - self.assertEqual(expected_msbuild_settings, actual_msbuild_settings) - self._ExpectedWarnings([]) - - def testConvertToMSBuildSettings_minimal(self): - """Tests a minimal conversion.""" - msvs_settings = { - "VCCLCompilerTool": { - "AdditionalIncludeDirectories": "dir1", - "AdditionalOptions": "/foo", - "BasicRuntimeChecks": "0", - }, - "VCLinkerTool": { - "LinkTimeCodeGeneration": "1", - "ErrorReporting": "1", - "DataExecutionPrevention": "2", - }, - } - expected_msbuild_settings = { - "ClCompile": { - "AdditionalIncludeDirectories": "dir1", - "AdditionalOptions": "/foo", - "BasicRuntimeChecks": "Default", - }, - "Link": { - "LinkTimeCodeGeneration": "UseLinkTimeCodeGeneration", - "LinkErrorReporting": "PromptImmediately", - "DataExecutionPrevention": "true", - }, - } - actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings( - msvs_settings, self.stderr - ) - self.assertEqual(expected_msbuild_settings, actual_msbuild_settings) - self._ExpectedWarnings([]) - - def testConvertToMSBuildSettings_warnings(self): - """Tests conversion that generates warnings.""" - msvs_settings = { - "VCCLCompilerTool": { - "AdditionalIncludeDirectories": "1", - "AdditionalOptions": "2", - # These are incorrect values: - "BasicRuntimeChecks": "12", - "BrowseInformation": "21", - "UsePrecompiledHeader": "13", - "GeneratePreprocessedFile": "14", - }, - "VCLinkerTool": { - # These are incorrect values: - "Driver": "10", - "LinkTimeCodeGeneration": "31", - "ErrorReporting": "21", - "FixedBaseAddress": "6", - }, - "VCResourceCompilerTool": { - # Custom - "Culture": "1003" - }, - } - expected_msbuild_settings = { - "ClCompile": { - "AdditionalIncludeDirectories": "1", - "AdditionalOptions": "2", - }, - "Link": {}, - "ResourceCompile": { - # Custom - "Culture": "0x03eb" - }, - } - actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings( - msvs_settings, self.stderr - ) - self.assertEqual(expected_msbuild_settings, actual_msbuild_settings) - self._ExpectedWarnings( - [ - "Warning: while converting VCCLCompilerTool/BasicRuntimeChecks to " - "MSBuild, index value (12) not in expected range [0, 4)", - "Warning: while converting VCCLCompilerTool/BrowseInformation to " - "MSBuild, index value (21) not in expected range [0, 3)", - "Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to " - "MSBuild, index value (13) not in expected range [0, 3)", - "Warning: while converting " - "VCCLCompilerTool/GeneratePreprocessedFile to " - "MSBuild, value must be one of [0, 1, 2]; got 14", - "Warning: while converting VCLinkerTool/Driver to " - "MSBuild, index value (10) not in expected range [0, 4)", - "Warning: while converting VCLinkerTool/LinkTimeCodeGeneration to " - "MSBuild, index value (31) not in expected range [0, 5)", - "Warning: while converting VCLinkerTool/ErrorReporting to " - "MSBuild, index value (21) not in expected range [0, 3)", - "Warning: while converting VCLinkerTool/FixedBaseAddress to " - "MSBuild, index value (6) not in expected range [0, 3)", - ] - ) - - def testConvertToMSBuildSettings_full_synthetic(self): - """Tests conversion of all the MSBuild settings.""" - msvs_settings = { - "VCCLCompilerTool": { - "AdditionalIncludeDirectories": "folder1;folder2;folder3", - "AdditionalOptions": "a_string", - "AdditionalUsingDirectories": "folder1;folder2;folder3", - "AssemblerListingLocation": "a_file_name", - "AssemblerOutput": "0", - "BasicRuntimeChecks": "1", - "BrowseInformation": "2", - "BrowseInformationFile": "a_file_name", - "BufferSecurityCheck": "true", - "CallingConvention": "0", - "CompileAs": "1", - "DebugInformationFormat": "4", - "DefaultCharIsUnsigned": "true", - "Detect64BitPortabilityProblems": "true", - "DisableLanguageExtensions": "true", - "DisableSpecificWarnings": "d1;d2;d3", - "EnableEnhancedInstructionSet": "0", - "EnableFiberSafeOptimizations": "true", - "EnableFunctionLevelLinking": "true", - "EnableIntrinsicFunctions": "true", - "EnablePREfast": "true", - "ErrorReporting": "1", - "ExceptionHandling": "2", - "ExpandAttributedSource": "true", - "FavorSizeOrSpeed": "0", - "FloatingPointExceptions": "true", - "FloatingPointModel": "1", - "ForceConformanceInForLoopScope": "true", - "ForcedIncludeFiles": "file1;file2;file3", - "ForcedUsingFiles": "file1;file2;file3", - "GeneratePreprocessedFile": "1", - "GenerateXMLDocumentationFiles": "true", - "IgnoreStandardIncludePath": "true", - "InlineFunctionExpansion": "2", - "KeepComments": "true", - "MinimalRebuild": "true", - "ObjectFile": "a_file_name", - "OmitDefaultLibName": "true", - "OmitFramePointers": "true", - "OpenMP": "true", - "Optimization": "3", - "PrecompiledHeaderFile": "a_file_name", - "PrecompiledHeaderThrough": "a_file_name", - "PreprocessorDefinitions": "d1;d2;d3", - "ProgramDataBaseFileName": "a_file_name", - "RuntimeLibrary": "0", - "RuntimeTypeInfo": "true", - "ShowIncludes": "true", - "SmallerTypeCheck": "true", - "StringPooling": "true", - "StructMemberAlignment": "1", - "SuppressStartupBanner": "true", - "TreatWChar_tAsBuiltInType": "true", - "UndefineAllPreprocessorDefinitions": "true", - "UndefinePreprocessorDefinitions": "d1;d2;d3", - "UseFullPaths": "true", - "UsePrecompiledHeader": "1", - "UseUnicodeResponseFiles": "true", - "WarnAsError": "true", - "WarningLevel": "2", - "WholeProgramOptimization": "true", - "XMLDocumentationFileName": "a_file_name", - }, - "VCLinkerTool": { - "AdditionalDependencies": "file1;file2;file3", - "AdditionalLibraryDirectories": "folder1;folder2;folder3", - "AdditionalLibraryDirectories_excluded": "folder1;folder2;folder3", - "AdditionalManifestDependencies": "file1;file2;file3", - "AdditionalOptions": "a_string", - "AddModuleNamesToAssembly": "file1;file2;file3", - "AllowIsolation": "true", - "AssemblyDebug": "0", - "AssemblyLinkResource": "file1;file2;file3", - "BaseAddress": "a_string", - "CLRImageType": "1", - "CLRThreadAttribute": "2", - "CLRUnmanagedCodeCheck": "true", - "DataExecutionPrevention": "0", - "DelayLoadDLLs": "file1;file2;file3", - "DelaySign": "true", - "Driver": "1", - "EmbedManagedResourceFile": "file1;file2;file3", - "EnableCOMDATFolding": "0", - "EnableUAC": "true", - "EntryPointSymbol": "a_string", - "ErrorReporting": "0", - "FixedBaseAddress": "1", - "ForceSymbolReferences": "file1;file2;file3", - "FunctionOrder": "a_file_name", - "GenerateDebugInformation": "true", - "GenerateManifest": "true", - "GenerateMapFile": "true", - "HeapCommitSize": "a_string", - "HeapReserveSize": "a_string", - "IgnoreAllDefaultLibraries": "true", - "IgnoreDefaultLibraryNames": "file1;file2;file3", - "IgnoreEmbeddedIDL": "true", - "IgnoreImportLibrary": "true", - "ImportLibrary": "a_file_name", - "KeyContainer": "a_file_name", - "KeyFile": "a_file_name", - "LargeAddressAware": "2", - "LinkIncremental": "1", - "LinkLibraryDependencies": "true", - "LinkTimeCodeGeneration": "2", - "ManifestFile": "a_file_name", - "MapExports": "true", - "MapFileName": "a_file_name", - "MergedIDLBaseFileName": "a_file_name", - "MergeSections": "a_string", - "MidlCommandFile": "a_file_name", - "ModuleDefinitionFile": "a_file_name", - "OptimizeForWindows98": "1", - "OptimizeReferences": "0", - "OutputFile": "a_file_name", - "PerUserRedirection": "true", - "Profile": "true", - "ProfileGuidedDatabase": "a_file_name", - "ProgramDatabaseFile": "a_file_name", - "RandomizedBaseAddress": "1", - "RegisterOutput": "true", - "ResourceOnlyDLL": "true", - "SetChecksum": "true", - "ShowProgress": "0", - "StackCommitSize": "a_string", - "StackReserveSize": "a_string", - "StripPrivateSymbols": "a_file_name", - "SubSystem": "2", - "SupportUnloadOfDelayLoadedDLL": "true", - "SuppressStartupBanner": "true", - "SwapRunFromCD": "true", - "SwapRunFromNet": "true", - "TargetMachine": "3", - "TerminalServerAware": "2", - "TurnOffAssemblyGeneration": "true", - "TypeLibraryFile": "a_file_name", - "TypeLibraryResourceID": "33", - "UACExecutionLevel": "1", - "UACUIAccess": "true", - "UseLibraryDependencyInputs": "false", - "UseUnicodeResponseFiles": "true", - "Version": "a_string", - }, - "VCResourceCompilerTool": { - "AdditionalIncludeDirectories": "folder1;folder2;folder3", - "AdditionalOptions": "a_string", - "Culture": "1003", - "IgnoreStandardIncludePath": "true", - "PreprocessorDefinitions": "d1;d2;d3", - "ResourceOutputFileName": "a_string", - "ShowProgress": "true", - "SuppressStartupBanner": "true", - "UndefinePreprocessorDefinitions": "d1;d2;d3", - }, - "VCMIDLTool": { - "AdditionalIncludeDirectories": "folder1;folder2;folder3", - "AdditionalOptions": "a_string", - "CPreprocessOptions": "a_string", - "DefaultCharType": "0", - "DLLDataFileName": "a_file_name", - "EnableErrorChecks": "2", - "ErrorCheckAllocations": "true", - "ErrorCheckBounds": "true", - "ErrorCheckEnumRange": "true", - "ErrorCheckRefPointers": "true", - "ErrorCheckStubData": "true", - "GenerateStublessProxies": "true", - "GenerateTypeLibrary": "true", - "HeaderFileName": "a_file_name", - "IgnoreStandardIncludePath": "true", - "InterfaceIdentifierFileName": "a_file_name", - "MkTypLibCompatible": "true", - "OutputDirectory": "a_string", - "PreprocessorDefinitions": "d1;d2;d3", - "ProxyFileName": "a_file_name", - "RedirectOutputAndErrors": "a_file_name", - "StructMemberAlignment": "3", - "SuppressStartupBanner": "true", - "TargetEnvironment": "1", - "TypeLibraryName": "a_file_name", - "UndefinePreprocessorDefinitions": "d1;d2;d3", - "ValidateParameters": "true", - "WarnAsError": "true", - "WarningLevel": "4", - }, - "VCLibrarianTool": { - "AdditionalDependencies": "file1;file2;file3", - "AdditionalLibraryDirectories": "folder1;folder2;folder3", - "AdditionalLibraryDirectories_excluded": "folder1;folder2;folder3", - "AdditionalOptions": "a_string", - "ExportNamedFunctions": "d1;d2;d3", - "ForceSymbolReferences": "a_string", - "IgnoreAllDefaultLibraries": "true", - "IgnoreSpecificDefaultLibraries": "file1;file2;file3", - "LinkLibraryDependencies": "true", - "ModuleDefinitionFile": "a_file_name", - "OutputFile": "a_file_name", - "SuppressStartupBanner": "true", - "UseUnicodeResponseFiles": "true", - }, - "VCManifestTool": { - "AdditionalManifestFiles": "file1;file2;file3", - "AdditionalOptions": "a_string", - "AssemblyIdentity": "a_string", - "ComponentFileName": "a_file_name", - "DependencyInformationFile": "a_file_name", - "EmbedManifest": "true", - "GenerateCatalogFiles": "true", - "InputResourceManifests": "a_string", - "ManifestResourceFile": "my_name", - "OutputManifestFile": "a_file_name", - "RegistrarScriptFile": "a_file_name", - "ReplacementsFile": "a_file_name", - "SuppressStartupBanner": "true", - "TypeLibraryFile": "a_file_name", - "UpdateFileHashes": "true", - "UpdateFileHashesSearchPath": "a_file_name", - "UseFAT32Workaround": "true", - "UseUnicodeResponseFiles": "true", - "VerboseOutput": "true", - }, - } - expected_msbuild_settings = { - "ClCompile": { - "AdditionalIncludeDirectories": "folder1;folder2;folder3", - "AdditionalOptions": "a_string /J", - "AdditionalUsingDirectories": "folder1;folder2;folder3", - "AssemblerListingLocation": "a_file_name", - "AssemblerOutput": "NoListing", - "BasicRuntimeChecks": "StackFrameRuntimeCheck", - "BrowseInformation": "true", - "BrowseInformationFile": "a_file_name", - "BufferSecurityCheck": "true", - "CallingConvention": "Cdecl", - "CompileAs": "CompileAsC", - "DebugInformationFormat": "EditAndContinue", - "DisableLanguageExtensions": "true", - "DisableSpecificWarnings": "d1;d2;d3", - "EnableEnhancedInstructionSet": "NotSet", - "EnableFiberSafeOptimizations": "true", - "EnablePREfast": "true", - "ErrorReporting": "Prompt", - "ExceptionHandling": "Async", - "ExpandAttributedSource": "true", - "FavorSizeOrSpeed": "Neither", - "FloatingPointExceptions": "true", - "FloatingPointModel": "Strict", - "ForceConformanceInForLoopScope": "true", - "ForcedIncludeFiles": "file1;file2;file3", - "ForcedUsingFiles": "file1;file2;file3", - "FunctionLevelLinking": "true", - "GenerateXMLDocumentationFiles": "true", - "IgnoreStandardIncludePath": "true", - "InlineFunctionExpansion": "AnySuitable", - "IntrinsicFunctions": "true", - "MinimalRebuild": "true", - "ObjectFileName": "a_file_name", - "OmitDefaultLibName": "true", - "OmitFramePointers": "true", - "OpenMPSupport": "true", - "Optimization": "Full", - "PrecompiledHeader": "Create", - "PrecompiledHeaderFile": "a_file_name", - "PrecompiledHeaderOutputFile": "a_file_name", - "PreprocessKeepComments": "true", - "PreprocessorDefinitions": "d1;d2;d3", - "PreprocessSuppressLineNumbers": "false", - "PreprocessToFile": "true", - "ProgramDataBaseFileName": "a_file_name", - "RuntimeLibrary": "MultiThreaded", - "RuntimeTypeInfo": "true", - "ShowIncludes": "true", - "SmallerTypeCheck": "true", - "StringPooling": "true", - "StructMemberAlignment": "1Byte", - "SuppressStartupBanner": "true", - "TreatWarningAsError": "true", - "TreatWChar_tAsBuiltInType": "true", - "UndefineAllPreprocessorDefinitions": "true", - "UndefinePreprocessorDefinitions": "d1;d2;d3", - "UseFullPaths": "true", - "WarningLevel": "Level2", - "WholeProgramOptimization": "true", - "XMLDocumentationFileName": "a_file_name", - }, - "Link": { - "AdditionalDependencies": "file1;file2;file3", - "AdditionalLibraryDirectories": "folder1;folder2;folder3", - "AdditionalManifestDependencies": "file1;file2;file3", - "AdditionalOptions": "a_string", - "AddModuleNamesToAssembly": "file1;file2;file3", - "AllowIsolation": "true", - "AssemblyDebug": "", - "AssemblyLinkResource": "file1;file2;file3", - "BaseAddress": "a_string", - "CLRImageType": "ForceIJWImage", - "CLRThreadAttribute": "STAThreadingAttribute", - "CLRUnmanagedCodeCheck": "true", - "DataExecutionPrevention": "", - "DelayLoadDLLs": "file1;file2;file3", - "DelaySign": "true", - "Driver": "Driver", - "EmbedManagedResourceFile": "file1;file2;file3", - "EnableCOMDATFolding": "", - "EnableUAC": "true", - "EntryPointSymbol": "a_string", - "FixedBaseAddress": "false", - "ForceSymbolReferences": "file1;file2;file3", - "FunctionOrder": "a_file_name", - "GenerateDebugInformation": "true", - "GenerateMapFile": "true", - "HeapCommitSize": "a_string", - "HeapReserveSize": "a_string", - "IgnoreAllDefaultLibraries": "true", - "IgnoreEmbeddedIDL": "true", - "IgnoreSpecificDefaultLibraries": "file1;file2;file3", - "ImportLibrary": "a_file_name", - "KeyContainer": "a_file_name", - "KeyFile": "a_file_name", - "LargeAddressAware": "true", - "LinkErrorReporting": "NoErrorReport", - "LinkTimeCodeGeneration": "PGInstrument", - "ManifestFile": "a_file_name", - "MapExports": "true", - "MapFileName": "a_file_name", - "MergedIDLBaseFileName": "a_file_name", - "MergeSections": "a_string", - "MidlCommandFile": "a_file_name", - "ModuleDefinitionFile": "a_file_name", - "NoEntryPoint": "true", - "OptimizeReferences": "", - "OutputFile": "a_file_name", - "PerUserRedirection": "true", - "Profile": "true", - "ProfileGuidedDatabase": "a_file_name", - "ProgramDatabaseFile": "a_file_name", - "RandomizedBaseAddress": "false", - "RegisterOutput": "true", - "SetChecksum": "true", - "ShowProgress": "NotSet", - "StackCommitSize": "a_string", - "StackReserveSize": "a_string", - "StripPrivateSymbols": "a_file_name", - "SubSystem": "Windows", - "SupportUnloadOfDelayLoadedDLL": "true", - "SuppressStartupBanner": "true", - "SwapRunFromCD": "true", - "SwapRunFromNET": "true", - "TargetMachine": "MachineARM", - "TerminalServerAware": "true", - "TurnOffAssemblyGeneration": "true", - "TypeLibraryFile": "a_file_name", - "TypeLibraryResourceID": "33", - "UACExecutionLevel": "HighestAvailable", - "UACUIAccess": "true", - "Version": "a_string", - }, - "ResourceCompile": { - "AdditionalIncludeDirectories": "folder1;folder2;folder3", - "AdditionalOptions": "a_string", - "Culture": "0x03eb", - "IgnoreStandardIncludePath": "true", - "PreprocessorDefinitions": "d1;d2;d3", - "ResourceOutputFileName": "a_string", - "ShowProgress": "true", - "SuppressStartupBanner": "true", - "UndefinePreprocessorDefinitions": "d1;d2;d3", - }, - "Midl": { - "AdditionalIncludeDirectories": "folder1;folder2;folder3", - "AdditionalOptions": "a_string", - "CPreprocessOptions": "a_string", - "DefaultCharType": "Unsigned", - "DllDataFileName": "a_file_name", - "EnableErrorChecks": "All", - "ErrorCheckAllocations": "true", - "ErrorCheckBounds": "true", - "ErrorCheckEnumRange": "true", - "ErrorCheckRefPointers": "true", - "ErrorCheckStubData": "true", - "GenerateStublessProxies": "true", - "GenerateTypeLibrary": "true", - "HeaderFileName": "a_file_name", - "IgnoreStandardIncludePath": "true", - "InterfaceIdentifierFileName": "a_file_name", - "MkTypLibCompatible": "true", - "OutputDirectory": "a_string", - "PreprocessorDefinitions": "d1;d2;d3", - "ProxyFileName": "a_file_name", - "RedirectOutputAndErrors": "a_file_name", - "StructMemberAlignment": "4", - "SuppressStartupBanner": "true", - "TargetEnvironment": "Win32", - "TypeLibraryName": "a_file_name", - "UndefinePreprocessorDefinitions": "d1;d2;d3", - "ValidateAllParameters": "true", - "WarnAsError": "true", - "WarningLevel": "4", - }, - "Lib": { - "AdditionalDependencies": "file1;file2;file3", - "AdditionalLibraryDirectories": "folder1;folder2;folder3", - "AdditionalOptions": "a_string", - "ExportNamedFunctions": "d1;d2;d3", - "ForceSymbolReferences": "a_string", - "IgnoreAllDefaultLibraries": "true", - "IgnoreSpecificDefaultLibraries": "file1;file2;file3", - "ModuleDefinitionFile": "a_file_name", - "OutputFile": "a_file_name", - "SuppressStartupBanner": "true", - "UseUnicodeResponseFiles": "true", - }, - "Manifest": { - "AdditionalManifestFiles": "file1;file2;file3", - "AdditionalOptions": "a_string", - "AssemblyIdentity": "a_string", - "ComponentFileName": "a_file_name", - "GenerateCatalogFiles": "true", - "InputResourceManifests": "a_string", - "OutputManifestFile": "a_file_name", - "RegistrarScriptFile": "a_file_name", - "ReplacementsFile": "a_file_name", - "SuppressStartupBanner": "true", - "TypeLibraryFile": "a_file_name", - "UpdateFileHashes": "true", - "UpdateFileHashesSearchPath": "a_file_name", - "VerboseOutput": "true", - }, - "ManifestResourceCompile": {"ResourceOutputFileName": "my_name"}, - "ProjectReference": { - "LinkLibraryDependencies": "true", - "UseLibraryDependencyInputs": "false", - }, - "": { - "EmbedManifest": "true", - "GenerateManifest": "true", - "IgnoreImportLibrary": "true", - "LinkIncremental": "false", - }, - } - self.maxDiff = 9999 # on failure display a long diff - actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings( - msvs_settings, self.stderr - ) - self.assertEqual(expected_msbuild_settings, actual_msbuild_settings) - self._ExpectedWarnings([]) - - def testConvertToMSBuildSettings_actual(self): - """Tests the conversion of an actual project. - - A VS2008 project with most of the options defined was created through the - VS2008 IDE. It was then converted to VS2010. The tool settings found in - the .vcproj and .vcxproj files were converted to the two dictionaries - msvs_settings and expected_msbuild_settings. - - Note that for many settings, the VS2010 converter adds macros like - %(AdditionalIncludeDirectories) to make sure than inherited values are - included. Since the Gyp projects we generate do not use inheritance, - we removed these macros. They were: - ClCompile: - AdditionalIncludeDirectories: ';%(AdditionalIncludeDirectories)' - AdditionalOptions: ' %(AdditionalOptions)' - AdditionalUsingDirectories: ';%(AdditionalUsingDirectories)' - DisableSpecificWarnings: ';%(DisableSpecificWarnings)', - ForcedIncludeFiles: ';%(ForcedIncludeFiles)', - ForcedUsingFiles: ';%(ForcedUsingFiles)', - PreprocessorDefinitions: ';%(PreprocessorDefinitions)', - UndefinePreprocessorDefinitions: - ';%(UndefinePreprocessorDefinitions)', - Link: - AdditionalDependencies: ';%(AdditionalDependencies)', - AdditionalLibraryDirectories: ';%(AdditionalLibraryDirectories)', - AdditionalManifestDependencies: - ';%(AdditionalManifestDependencies)', - AdditionalOptions: ' %(AdditionalOptions)', - AddModuleNamesToAssembly: ';%(AddModuleNamesToAssembly)', - AssemblyLinkResource: ';%(AssemblyLinkResource)', - DelayLoadDLLs: ';%(DelayLoadDLLs)', - EmbedManagedResourceFile: ';%(EmbedManagedResourceFile)', - ForceSymbolReferences: ';%(ForceSymbolReferences)', - IgnoreSpecificDefaultLibraries: - ';%(IgnoreSpecificDefaultLibraries)', - ResourceCompile: - AdditionalIncludeDirectories: ';%(AdditionalIncludeDirectories)', - AdditionalOptions: ' %(AdditionalOptions)', - PreprocessorDefinitions: ';%(PreprocessorDefinitions)', - Manifest: - AdditionalManifestFiles: ';%(AdditionalManifestFiles)', - AdditionalOptions: ' %(AdditionalOptions)', - InputResourceManifests: ';%(InputResourceManifests)', - """ - msvs_settings = { - "VCCLCompilerTool": { - "AdditionalIncludeDirectories": "dir1", - "AdditionalOptions": "/more", - "AdditionalUsingDirectories": "test", - "AssemblerListingLocation": "$(IntDir)\\a", - "AssemblerOutput": "1", - "BasicRuntimeChecks": "3", - "BrowseInformation": "1", - "BrowseInformationFile": "$(IntDir)\\e", - "BufferSecurityCheck": "false", - "CallingConvention": "1", - "CompileAs": "1", - "DebugInformationFormat": "4", - "DefaultCharIsUnsigned": "true", - "Detect64BitPortabilityProblems": "true", - "DisableLanguageExtensions": "true", - "DisableSpecificWarnings": "abc", - "EnableEnhancedInstructionSet": "1", - "EnableFiberSafeOptimizations": "true", - "EnableFunctionLevelLinking": "true", - "EnableIntrinsicFunctions": "true", - "EnablePREfast": "true", - "ErrorReporting": "2", - "ExceptionHandling": "2", - "ExpandAttributedSource": "true", - "FavorSizeOrSpeed": "2", - "FloatingPointExceptions": "true", - "FloatingPointModel": "1", - "ForceConformanceInForLoopScope": "false", - "ForcedIncludeFiles": "def", - "ForcedUsingFiles": "ge", - "GeneratePreprocessedFile": "2", - "GenerateXMLDocumentationFiles": "true", - "IgnoreStandardIncludePath": "true", - "InlineFunctionExpansion": "1", - "KeepComments": "true", - "MinimalRebuild": "true", - "ObjectFile": "$(IntDir)\\b", - "OmitDefaultLibName": "true", - "OmitFramePointers": "true", - "OpenMP": "true", - "Optimization": "3", - "PrecompiledHeaderFile": "$(IntDir)\\$(TargetName).pche", - "PrecompiledHeaderThrough": "StdAfx.hd", - "PreprocessorDefinitions": "WIN32;_DEBUG;_CONSOLE", - "ProgramDataBaseFileName": "$(IntDir)\\vc90b.pdb", - "RuntimeLibrary": "3", - "RuntimeTypeInfo": "false", - "ShowIncludes": "true", - "SmallerTypeCheck": "true", - "StringPooling": "true", - "StructMemberAlignment": "3", - "SuppressStartupBanner": "false", - "TreatWChar_tAsBuiltInType": "false", - "UndefineAllPreprocessorDefinitions": "true", - "UndefinePreprocessorDefinitions": "wer", - "UseFullPaths": "true", - "UsePrecompiledHeader": "0", - "UseUnicodeResponseFiles": "false", - "WarnAsError": "true", - "WarningLevel": "3", - "WholeProgramOptimization": "true", - "XMLDocumentationFileName": "$(IntDir)\\c", - }, - "VCLinkerTool": { - "AdditionalDependencies": "zx", - "AdditionalLibraryDirectories": "asd", - "AdditionalManifestDependencies": "s2", - "AdditionalOptions": "/mor2", - "AddModuleNamesToAssembly": "d1", - "AllowIsolation": "false", - "AssemblyDebug": "1", - "AssemblyLinkResource": "d5", - "BaseAddress": "23423", - "CLRImageType": "3", - "CLRThreadAttribute": "1", - "CLRUnmanagedCodeCheck": "true", - "DataExecutionPrevention": "0", - "DelayLoadDLLs": "d4", - "DelaySign": "true", - "Driver": "2", - "EmbedManagedResourceFile": "d2", - "EnableCOMDATFolding": "1", - "EnableUAC": "false", - "EntryPointSymbol": "f5", - "ErrorReporting": "2", - "FixedBaseAddress": "1", - "ForceSymbolReferences": "d3", - "FunctionOrder": "fssdfsd", - "GenerateDebugInformation": "true", - "GenerateManifest": "false", - "GenerateMapFile": "true", - "HeapCommitSize": "13", - "HeapReserveSize": "12", - "IgnoreAllDefaultLibraries": "true", - "IgnoreDefaultLibraryNames": "flob;flok", - "IgnoreEmbeddedIDL": "true", - "IgnoreImportLibrary": "true", - "ImportLibrary": "f4", - "KeyContainer": "f7", - "KeyFile": "f6", - "LargeAddressAware": "2", - "LinkIncremental": "0", - "LinkLibraryDependencies": "false", - "LinkTimeCodeGeneration": "1", - "ManifestFile": "$(IntDir)\\$(TargetFileName).2intermediate.manifest", - "MapExports": "true", - "MapFileName": "d5", - "MergedIDLBaseFileName": "f2", - "MergeSections": "f5", - "MidlCommandFile": "f1", - "ModuleDefinitionFile": "sdsd", - "OptimizeForWindows98": "2", - "OptimizeReferences": "2", - "OutputFile": "$(OutDir)\\$(ProjectName)2.exe", - "PerUserRedirection": "true", - "Profile": "true", - "ProfileGuidedDatabase": "$(TargetDir)$(TargetName).pgdd", - "ProgramDatabaseFile": "Flob.pdb", - "RandomizedBaseAddress": "1", - "RegisterOutput": "true", - "ResourceOnlyDLL": "true", - "SetChecksum": "false", - "ShowProgress": "1", - "StackCommitSize": "15", - "StackReserveSize": "14", - "StripPrivateSymbols": "d3", - "SubSystem": "1", - "SupportUnloadOfDelayLoadedDLL": "true", - "SuppressStartupBanner": "false", - "SwapRunFromCD": "true", - "SwapRunFromNet": "true", - "TargetMachine": "1", - "TerminalServerAware": "1", - "TurnOffAssemblyGeneration": "true", - "TypeLibraryFile": "f3", - "TypeLibraryResourceID": "12", - "UACExecutionLevel": "2", - "UACUIAccess": "true", - "UseLibraryDependencyInputs": "true", - "UseUnicodeResponseFiles": "false", - "Version": "333", - }, - "VCResourceCompilerTool": { - "AdditionalIncludeDirectories": "f3", - "AdditionalOptions": "/more3", - "Culture": "3084", - "IgnoreStandardIncludePath": "true", - "PreprocessorDefinitions": "_UNICODE;UNICODE2", - "ResourceOutputFileName": "$(IntDir)/$(InputName)3.res", - "ShowProgress": "true", - }, - "VCManifestTool": { - "AdditionalManifestFiles": "sfsdfsd", - "AdditionalOptions": "afdsdafsd", - "AssemblyIdentity": "sddfdsadfsa", - "ComponentFileName": "fsdfds", - "DependencyInformationFile": "$(IntDir)\\mt.depdfd", - "EmbedManifest": "false", - "GenerateCatalogFiles": "true", - "InputResourceManifests": "asfsfdafs", - "ManifestResourceFile": - "$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf", - "OutputManifestFile": "$(TargetPath).manifestdfs", - "RegistrarScriptFile": "sdfsfd", - "ReplacementsFile": "sdffsd", - "SuppressStartupBanner": "false", - "TypeLibraryFile": "sfsd", - "UpdateFileHashes": "true", - "UpdateFileHashesSearchPath": "sfsd", - "UseFAT32Workaround": "true", - "UseUnicodeResponseFiles": "false", - "VerboseOutput": "true", - }, - } - expected_msbuild_settings = { - "ClCompile": { - "AdditionalIncludeDirectories": "dir1", - "AdditionalOptions": "/more /J", - "AdditionalUsingDirectories": "test", - "AssemblerListingLocation": "$(IntDir)a", - "AssemblerOutput": "AssemblyCode", - "BasicRuntimeChecks": "EnableFastChecks", - "BrowseInformation": "true", - "BrowseInformationFile": "$(IntDir)e", - "BufferSecurityCheck": "false", - "CallingConvention": "FastCall", - "CompileAs": "CompileAsC", - "DebugInformationFormat": "EditAndContinue", - "DisableLanguageExtensions": "true", - "DisableSpecificWarnings": "abc", - "EnableEnhancedInstructionSet": "StreamingSIMDExtensions", - "EnableFiberSafeOptimizations": "true", - "EnablePREfast": "true", - "ErrorReporting": "Queue", - "ExceptionHandling": "Async", - "ExpandAttributedSource": "true", - "FavorSizeOrSpeed": "Size", - "FloatingPointExceptions": "true", - "FloatingPointModel": "Strict", - "ForceConformanceInForLoopScope": "false", - "ForcedIncludeFiles": "def", - "ForcedUsingFiles": "ge", - "FunctionLevelLinking": "true", - "GenerateXMLDocumentationFiles": "true", - "IgnoreStandardIncludePath": "true", - "InlineFunctionExpansion": "OnlyExplicitInline", - "IntrinsicFunctions": "true", - "MinimalRebuild": "true", - "ObjectFileName": "$(IntDir)b", - "OmitDefaultLibName": "true", - "OmitFramePointers": "true", - "OpenMPSupport": "true", - "Optimization": "Full", - "PrecompiledHeader": "NotUsing", # Actual conversion gives '' - "PrecompiledHeaderFile": "StdAfx.hd", - "PrecompiledHeaderOutputFile": "$(IntDir)$(TargetName).pche", - "PreprocessKeepComments": "true", - "PreprocessorDefinitions": "WIN32;_DEBUG;_CONSOLE", - "PreprocessSuppressLineNumbers": "true", - "PreprocessToFile": "true", - "ProgramDataBaseFileName": "$(IntDir)vc90b.pdb", - "RuntimeLibrary": "MultiThreadedDebugDLL", - "RuntimeTypeInfo": "false", - "ShowIncludes": "true", - "SmallerTypeCheck": "true", - "StringPooling": "true", - "StructMemberAlignment": "4Bytes", - "SuppressStartupBanner": "false", - "TreatWarningAsError": "true", - "TreatWChar_tAsBuiltInType": "false", - "UndefineAllPreprocessorDefinitions": "true", - "UndefinePreprocessorDefinitions": "wer", - "UseFullPaths": "true", - "WarningLevel": "Level3", - "WholeProgramOptimization": "true", - "XMLDocumentationFileName": "$(IntDir)c", - }, - "Link": { - "AdditionalDependencies": "zx", - "AdditionalLibraryDirectories": "asd", - "AdditionalManifestDependencies": "s2", - "AdditionalOptions": "/mor2", - "AddModuleNamesToAssembly": "d1", - "AllowIsolation": "false", - "AssemblyDebug": "true", - "AssemblyLinkResource": "d5", - "BaseAddress": "23423", - "CLRImageType": "ForceSafeILImage", - "CLRThreadAttribute": "MTAThreadingAttribute", - "CLRUnmanagedCodeCheck": "true", - "DataExecutionPrevention": "", - "DelayLoadDLLs": "d4", - "DelaySign": "true", - "Driver": "UpOnly", - "EmbedManagedResourceFile": "d2", - "EnableCOMDATFolding": "false", - "EnableUAC": "false", - "EntryPointSymbol": "f5", - "FixedBaseAddress": "false", - "ForceSymbolReferences": "d3", - "FunctionOrder": "fssdfsd", - "GenerateDebugInformation": "true", - "GenerateMapFile": "true", - "HeapCommitSize": "13", - "HeapReserveSize": "12", - "IgnoreAllDefaultLibraries": "true", - "IgnoreEmbeddedIDL": "true", - "IgnoreSpecificDefaultLibraries": "flob;flok", - "ImportLibrary": "f4", - "KeyContainer": "f7", - "KeyFile": "f6", - "LargeAddressAware": "true", - "LinkErrorReporting": "QueueForNextLogin", - "LinkTimeCodeGeneration": "UseLinkTimeCodeGeneration", - "ManifestFile": "$(IntDir)$(TargetFileName).2intermediate.manifest", - "MapExports": "true", - "MapFileName": "d5", - "MergedIDLBaseFileName": "f2", - "MergeSections": "f5", - "MidlCommandFile": "f1", - "ModuleDefinitionFile": "sdsd", - "NoEntryPoint": "true", - "OptimizeReferences": "true", - "OutputFile": "$(OutDir)$(ProjectName)2.exe", - "PerUserRedirection": "true", - "Profile": "true", - "ProfileGuidedDatabase": "$(TargetDir)$(TargetName).pgdd", - "ProgramDatabaseFile": "Flob.pdb", - "RandomizedBaseAddress": "false", - "RegisterOutput": "true", - "SetChecksum": "false", - "ShowProgress": "LinkVerbose", - "StackCommitSize": "15", - "StackReserveSize": "14", - "StripPrivateSymbols": "d3", - "SubSystem": "Console", - "SupportUnloadOfDelayLoadedDLL": "true", - "SuppressStartupBanner": "false", - "SwapRunFromCD": "true", - "SwapRunFromNET": "true", - "TargetMachine": "MachineX86", - "TerminalServerAware": "false", - "TurnOffAssemblyGeneration": "true", - "TypeLibraryFile": "f3", - "TypeLibraryResourceID": "12", - "UACExecutionLevel": "RequireAdministrator", - "UACUIAccess": "true", - "Version": "333", - }, - "ResourceCompile": { - "AdditionalIncludeDirectories": "f3", - "AdditionalOptions": "/more3", - "Culture": "0x0c0c", - "IgnoreStandardIncludePath": "true", - "PreprocessorDefinitions": "_UNICODE;UNICODE2", - "ResourceOutputFileName": "$(IntDir)%(Filename)3.res", - "ShowProgress": "true", - }, - "Manifest": { - "AdditionalManifestFiles": "sfsdfsd", - "AdditionalOptions": "afdsdafsd", - "AssemblyIdentity": "sddfdsadfsa", - "ComponentFileName": "fsdfds", - "GenerateCatalogFiles": "true", - "InputResourceManifests": "asfsfdafs", - "OutputManifestFile": "$(TargetPath).manifestdfs", - "RegistrarScriptFile": "sdfsfd", - "ReplacementsFile": "sdffsd", - "SuppressStartupBanner": "false", - "TypeLibraryFile": "sfsd", - "UpdateFileHashes": "true", - "UpdateFileHashesSearchPath": "sfsd", - "VerboseOutput": "true", - }, - "ProjectReference": { - "LinkLibraryDependencies": "false", - "UseLibraryDependencyInputs": "true", - }, - "": { - "EmbedManifest": "false", - "GenerateManifest": "false", - "IgnoreImportLibrary": "true", - "LinkIncremental": "", - }, - "ManifestResourceCompile": { - "ResourceOutputFileName": - "$(IntDir)$(TargetFileName).embed.manifest.resfdsf" - }, - } - self.maxDiff = 9999 # on failure display a long diff - actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings( - msvs_settings, self.stderr - ) - self.assertEqual(expected_msbuild_settings, actual_msbuild_settings) - self._ExpectedWarnings([]) - - -if __name__ == "__main__": - unittest.main() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py deleted file mode 100644 index 2e5c811..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Visual Studio project reader/writer.""" - -import gyp.easy_xml as easy_xml - - -class Writer: - """Visual Studio XML tool file writer.""" - - def __init__(self, tool_file_path, name): - """Initializes the tool file. - - Args: - tool_file_path: Path to the tool file. - name: Name of the tool file. - """ - self.tool_file_path = tool_file_path - self.name = name - self.rules_section = ["Rules"] - - def AddCustomBuildRule( - self, name, cmd, description, additional_dependencies, outputs, extensions - ): - """Adds a rule to the tool file. - - Args: - name: Name of the rule. - description: Description of the rule. - cmd: Command line of the rule. - additional_dependencies: other files which may trigger the rule. - outputs: outputs of the rule. - extensions: extensions handled by the rule. - """ - rule = [ - "CustomBuildRule", - { - "Name": name, - "ExecutionDescription": description, - "CommandLine": cmd, - "Outputs": ";".join(outputs), - "FileExtensions": ";".join(extensions), - "AdditionalDependencies": ";".join(additional_dependencies), - }, - ] - self.rules_section.append(rule) - - def WriteIfChanged(self): - """Writes the tool file.""" - content = [ - "VisualStudioToolFile", - {"Version": "8.00", "Name": self.name}, - self.rules_section, - ] - easy_xml.WriteXmlIfChanged( - content, self.tool_file_path, encoding="Windows-1252" - ) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py deleted file mode 100644 index e580c00..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Visual Studio user preferences file writer.""" - -import os -import re -import socket # for gethostname - -import gyp.easy_xml as easy_xml - - -# ------------------------------------------------------------------------------ - - -def _FindCommandInPath(command): - """If there are no slashes in the command given, this function - searches the PATH env to find the given command, and converts it - to an absolute path. We have to do this because MSVS is looking - for an actual file to launch a debugger on, not just a command - line. Note that this happens at GYP time, so anything needing to - be built needs to have a full path.""" - if "/" in command or "\\" in command: - # If the command already has path elements (either relative or - # absolute), then assume it is constructed properly. - return command - else: - # Search through the path list and find an existing file that - # we can access. - paths = os.environ.get("PATH", "").split(os.pathsep) - for path in paths: - item = os.path.join(path, command) - if os.path.isfile(item) and os.access(item, os.X_OK): - return item - return command - - -def _QuoteWin32CommandLineArgs(args): - new_args = [] - for arg in args: - # Replace all double-quotes with double-double-quotes to escape - # them for cmd shell, and then quote the whole thing if there - # are any. - if arg.find('"') != -1: - arg = '""'.join(arg.split('"')) - arg = '"%s"' % arg - - # Otherwise, if there are any spaces, quote the whole arg. - elif re.search(r"[ \t\n]", arg): - arg = '"%s"' % arg - new_args.append(arg) - return new_args - - -class Writer: - """Visual Studio XML user user file writer.""" - - def __init__(self, user_file_path, version, name): - """Initializes the user file. - - Args: - user_file_path: Path to the user file. - version: Version info. - name: Name of the user file. - """ - self.user_file_path = user_file_path - self.version = version - self.name = name - self.configurations = {} - - def AddConfig(self, name): - """Adds a configuration to the project. - - Args: - name: Configuration name. - """ - self.configurations[name] = ["Configuration", {"Name": name}] - - def AddDebugSettings( - self, config_name, command, environment={}, working_directory="" - ): - """Adds a DebugSettings node to the user file for a particular config. - - Args: - command: command line to run. First element in the list is the - executable. All elements of the command will be quoted if - necessary. - working_directory: other files which may trigger the rule. (optional) - """ - command = _QuoteWin32CommandLineArgs(command) - - abs_command = _FindCommandInPath(command[0]) - - if environment and isinstance(environment, dict): - env_list = [f'{key}="{val}"' for (key, val) in environment.items()] - environment = " ".join(env_list) - else: - environment = "" - - n_cmd = [ - "DebugSettings", - { - "Command": abs_command, - "WorkingDirectory": working_directory, - "CommandArguments": " ".join(command[1:]), - "RemoteMachine": socket.gethostname(), - "Environment": environment, - "EnvironmentMerge": "true", - # Currently these are all "dummy" values that we're just setting - # in the default manner that MSVS does it. We could use some of - # these to add additional capabilities, I suppose, but they might - # not have parity with other platforms then. - "Attach": "false", - "DebuggerType": "3", # 'auto' debugger - "Remote": "1", - "RemoteCommand": "", - "HttpUrl": "", - "PDBPath": "", - "SQLDebugging": "", - "DebuggerFlavor": "0", - "MPIRunCommand": "", - "MPIRunArguments": "", - "MPIRunWorkingDirectory": "", - "ApplicationCommand": "", - "ApplicationArguments": "", - "ShimCommand": "", - "MPIAcceptMode": "", - "MPIAcceptFilter": "", - }, - ] - - # Find the config, and add it if it doesn't exist. - if config_name not in self.configurations: - self.AddConfig(config_name) - - # Add the DebugSettings onto the appropriate config. - self.configurations[config_name].append(n_cmd) - - def WriteIfChanged(self): - """Writes the user file.""" - configs = ["Configurations"] - for config, spec in sorted(self.configurations.items()): - configs.append(spec) - - content = [ - "VisualStudioUserFile", - {"Version": self.version.ProjectVersion(), "Name": self.name}, - configs, - ] - easy_xml.WriteXmlIfChanged( - content, self.user_file_path, encoding="Windows-1252" - ) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py deleted file mode 100644 index 36bb782..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +++ /dev/null @@ -1,271 +0,0 @@ -# Copyright (c) 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Utility functions shared amongst the Windows generators.""" - -import copy -import os - - -# A dictionary mapping supported target types to extensions. -TARGET_TYPE_EXT = { - "executable": "exe", - "loadable_module": "dll", - "shared_library": "dll", - "static_library": "lib", - "windows_driver": "sys", -} - - -def _GetLargePdbShimCcPath(): - """Returns the path of the large_pdb_shim.cc file.""" - this_dir = os.path.abspath(os.path.dirname(__file__)) - src_dir = os.path.abspath(os.path.join(this_dir, "..", "..")) - win_data_dir = os.path.join(src_dir, "data", "win") - large_pdb_shim_cc = os.path.join(win_data_dir, "large-pdb-shim.cc") - return large_pdb_shim_cc - - -def _DeepCopySomeKeys(in_dict, keys): - """Performs a partial deep-copy on |in_dict|, only copying the keys in |keys|. - - Arguments: - in_dict: The dictionary to copy. - keys: The keys to be copied. If a key is in this list and doesn't exist in - |in_dict| this is not an error. - Returns: - The partially deep-copied dictionary. - """ - d = {} - for key in keys: - if key not in in_dict: - continue - d[key] = copy.deepcopy(in_dict[key]) - return d - - -def _SuffixName(name, suffix): - """Add a suffix to the end of a target. - - Arguments: - name: name of the target (foo#target) - suffix: the suffix to be added - Returns: - Target name with suffix added (foo_suffix#target) - """ - parts = name.rsplit("#", 1) - parts[0] = f"{parts[0]}_{suffix}" - return "#".join(parts) - - -def _ShardName(name, number): - """Add a shard number to the end of a target. - - Arguments: - name: name of the target (foo#target) - number: shard number - Returns: - Target name with shard added (foo_1#target) - """ - return _SuffixName(name, str(number)) - - -def ShardTargets(target_list, target_dicts): - """Shard some targets apart to work around the linkers limits. - - Arguments: - target_list: List of target pairs: 'base/base.gyp:base'. - target_dicts: Dict of target properties keyed on target pair. - Returns: - Tuple of the new sharded versions of the inputs. - """ - # Gather the targets to shard, and how many pieces. - targets_to_shard = {} - for t in target_dicts: - shards = int(target_dicts[t].get("msvs_shard", 0)) - if shards: - targets_to_shard[t] = shards - # Shard target_list. - new_target_list = [] - for t in target_list: - if t in targets_to_shard: - for i in range(targets_to_shard[t]): - new_target_list.append(_ShardName(t, i)) - else: - new_target_list.append(t) - # Shard target_dict. - new_target_dicts = {} - for t in target_dicts: - if t in targets_to_shard: - for i in range(targets_to_shard[t]): - name = _ShardName(t, i) - new_target_dicts[name] = copy.copy(target_dicts[t]) - new_target_dicts[name]["target_name"] = _ShardName( - new_target_dicts[name]["target_name"], i - ) - sources = new_target_dicts[name].get("sources", []) - new_sources = [] - for pos in range(i, len(sources), targets_to_shard[t]): - new_sources.append(sources[pos]) - new_target_dicts[name]["sources"] = new_sources - else: - new_target_dicts[t] = target_dicts[t] - # Shard dependencies. - for t in sorted(new_target_dicts): - for deptype in ("dependencies", "dependencies_original"): - dependencies = copy.copy(new_target_dicts[t].get(deptype, [])) - new_dependencies = [] - for d in dependencies: - if d in targets_to_shard: - for i in range(targets_to_shard[d]): - new_dependencies.append(_ShardName(d, i)) - else: - new_dependencies.append(d) - new_target_dicts[t][deptype] = new_dependencies - - return (new_target_list, new_target_dicts) - - -def _GetPdbPath(target_dict, config_name, vars): - """Returns the path to the PDB file that will be generated by a given - configuration. - - The lookup proceeds as follows: - - Look for an explicit path in the VCLinkerTool configuration block. - - Look for an 'msvs_large_pdb_path' variable. - - Use '<(PRODUCT_DIR)/<(product_name).(exe|dll).pdb' if 'product_name' is - specified. - - Use '<(PRODUCT_DIR)/<(target_name).(exe|dll).pdb'. - - Arguments: - target_dict: The target dictionary to be searched. - config_name: The name of the configuration of interest. - vars: A dictionary of common GYP variables with generator-specific values. - Returns: - The path of the corresponding PDB file. - """ - config = target_dict["configurations"][config_name] - msvs = config.setdefault("msvs_settings", {}) - - linker = msvs.get("VCLinkerTool", {}) - - pdb_path = linker.get("ProgramDatabaseFile") - if pdb_path: - return pdb_path - - variables = target_dict.get("variables", {}) - pdb_path = variables.get("msvs_large_pdb_path", None) - if pdb_path: - return pdb_path - - pdb_base = target_dict.get("product_name", target_dict["target_name"]) - pdb_base = "{}.{}.pdb".format(pdb_base, TARGET_TYPE_EXT[target_dict["type"]]) - pdb_path = vars["PRODUCT_DIR"] + "/" + pdb_base - - return pdb_path - - -def InsertLargePdbShims(target_list, target_dicts, vars): - """Insert a shim target that forces the linker to use 4KB pagesize PDBs. - - This is a workaround for targets with PDBs greater than 1GB in size, the - limit for the 1KB pagesize PDBs created by the linker by default. - - Arguments: - target_list: List of target pairs: 'base/base.gyp:base'. - target_dicts: Dict of target properties keyed on target pair. - vars: A dictionary of common GYP variables with generator-specific values. - Returns: - Tuple of the shimmed version of the inputs. - """ - # Determine which targets need shimming. - targets_to_shim = [] - for t in target_dicts: - target_dict = target_dicts[t] - - # We only want to shim targets that have msvs_large_pdb enabled. - if not int(target_dict.get("msvs_large_pdb", 0)): - continue - # This is intended for executable, shared_library and loadable_module - # targets where every configuration is set up to produce a PDB output. - # If any of these conditions is not true then the shim logic will fail - # below. - targets_to_shim.append(t) - - large_pdb_shim_cc = _GetLargePdbShimCcPath() - - for t in targets_to_shim: - target_dict = target_dicts[t] - target_name = target_dict.get("target_name") - - base_dict = _DeepCopySomeKeys( - target_dict, ["configurations", "default_configuration", "toolset"] - ) - - # This is the dict for copying the source file (part of the GYP tree) - # to the intermediate directory of the project. This is necessary because - # we can't always build a relative path to the shim source file (on Windows - # GYP and the project may be on different drives), and Ninja hates absolute - # paths (it ends up generating the .obj and .obj.d alongside the source - # file, polluting GYPs tree). - copy_suffix = "large_pdb_copy" - copy_target_name = target_name + "_" + copy_suffix - full_copy_target_name = _SuffixName(t, copy_suffix) - shim_cc_basename = os.path.basename(large_pdb_shim_cc) - shim_cc_dir = vars["SHARED_INTERMEDIATE_DIR"] + "/" + copy_target_name - shim_cc_path = shim_cc_dir + "/" + shim_cc_basename - copy_dict = copy.deepcopy(base_dict) - copy_dict["target_name"] = copy_target_name - copy_dict["type"] = "none" - copy_dict["sources"] = [large_pdb_shim_cc] - copy_dict["copies"] = [ - {"destination": shim_cc_dir, "files": [large_pdb_shim_cc]} - ] - - # This is the dict for the PDB generating shim target. It depends on the - # copy target. - shim_suffix = "large_pdb_shim" - shim_target_name = target_name + "_" + shim_suffix - full_shim_target_name = _SuffixName(t, shim_suffix) - shim_dict = copy.deepcopy(base_dict) - shim_dict["target_name"] = shim_target_name - shim_dict["type"] = "static_library" - shim_dict["sources"] = [shim_cc_path] - shim_dict["dependencies"] = [full_copy_target_name] - - # Set up the shim to output its PDB to the same location as the final linker - # target. - for config_name, config in shim_dict.get("configurations").items(): - pdb_path = _GetPdbPath(target_dict, config_name, vars) - - # A few keys that we don't want to propagate. - for key in ["msvs_precompiled_header", "msvs_precompiled_source", "test"]: - config.pop(key, None) - - msvs = config.setdefault("msvs_settings", {}) - - # Update the compiler directives in the shim target. - compiler = msvs.setdefault("VCCLCompilerTool", {}) - compiler["DebugInformationFormat"] = "3" - compiler["ProgramDataBaseFileName"] = pdb_path - - # Set the explicit PDB path in the appropriate configuration of the - # original target. - config = target_dict["configurations"][config_name] - msvs = config.setdefault("msvs_settings", {}) - linker = msvs.setdefault("VCLinkerTool", {}) - linker["GenerateDebugInformation"] = "true" - linker["ProgramDatabaseFile"] = pdb_path - - # Add the new targets. They must go to the beginning of the list so that - # the dependency generation works as expected in ninja. - target_list.insert(0, full_copy_target_name) - target_list.insert(0, full_shim_target_name) - target_dicts[full_copy_target_name] = copy_dict - target_dicts[full_shim_target_name] = shim_dict - - # Update the original target to depend on the shim target. - target_dict.setdefault("dependencies", []).append(full_shim_target_name) - - return (target_list, target_dicts) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py deleted file mode 100644 index 8d7f21e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +++ /dev/null @@ -1,574 +0,0 @@ -# Copyright (c) 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Handle version information related to Visual Stuio.""" - -import errno -import os -import re -import subprocess -import sys -import glob - - -def JoinPath(*args): - return os.path.normpath(os.path.join(*args)) - - -class VisualStudioVersion: - """Information regarding a version of Visual Studio.""" - - def __init__( - self, - short_name, - description, - solution_version, - project_version, - flat_sln, - uses_vcxproj, - path, - sdk_based, - default_toolset=None, - compatible_sdks=None, - ): - self.short_name = short_name - self.description = description - self.solution_version = solution_version - self.project_version = project_version - self.flat_sln = flat_sln - self.uses_vcxproj = uses_vcxproj - self.path = path - self.sdk_based = sdk_based - self.default_toolset = default_toolset - compatible_sdks = compatible_sdks or [] - compatible_sdks.sort(key=lambda v: float(v.replace("v", "")), reverse=True) - self.compatible_sdks = compatible_sdks - - def ShortName(self): - return self.short_name - - def Description(self): - """Get the full description of the version.""" - return self.description - - def SolutionVersion(self): - """Get the version number of the sln files.""" - return self.solution_version - - def ProjectVersion(self): - """Get the version number of the vcproj or vcxproj files.""" - return self.project_version - - def FlatSolution(self): - return self.flat_sln - - def UsesVcxproj(self): - """Returns true if this version uses a vcxproj file.""" - return self.uses_vcxproj - - def ProjectExtension(self): - """Returns the file extension for the project.""" - return self.uses_vcxproj and ".vcxproj" or ".vcproj" - - def Path(self): - """Returns the path to Visual Studio installation.""" - return self.path - - def ToolPath(self, tool): - """Returns the path to a given compiler tool. """ - return os.path.normpath(os.path.join(self.path, "VC/bin", tool)) - - def DefaultToolset(self): - """Returns the msbuild toolset version that will be used in the absence - of a user override.""" - return self.default_toolset - - def _SetupScriptInternal(self, target_arch): - """Returns a command (with arguments) to be used to set up the - environment.""" - assert target_arch in ("x86", "x64"), "target_arch not supported" - # If WindowsSDKDir is set and SetEnv.Cmd exists then we are using the - # depot_tools build tools and should run SetEnv.Cmd to set up the - # environment. The check for WindowsSDKDir alone is not sufficient because - # this is set by running vcvarsall.bat. - sdk_dir = os.environ.get("WindowsSDKDir", "") - setup_path = JoinPath(sdk_dir, "Bin", "SetEnv.Cmd") - if self.sdk_based and sdk_dir and os.path.exists(setup_path): - return [setup_path, "/" + target_arch] - - is_host_arch_x64 = ( - os.environ.get("PROCESSOR_ARCHITECTURE") == "AMD64" - or os.environ.get("PROCESSOR_ARCHITEW6432") == "AMD64" - ) - - # For VS2017 (and newer) it's fairly easy - if self.short_name >= "2017": - script_path = JoinPath( - self.path, "VC", "Auxiliary", "Build", "vcvarsall.bat" - ) - - # Always use a native executable, cross-compiling if necessary. - host_arch = "amd64" if is_host_arch_x64 else "x86" - msvc_target_arch = "amd64" if target_arch == "x64" else "x86" - arg = host_arch - if host_arch != msvc_target_arch: - arg += "_" + msvc_target_arch - - return [script_path, arg] - - # We try to find the best version of the env setup batch. - vcvarsall = JoinPath(self.path, "VC", "vcvarsall.bat") - if target_arch == "x86": - if ( - self.short_name >= "2013" - and self.short_name[-1] != "e" - and is_host_arch_x64 - ): - # VS2013 and later, non-Express have a x64-x86 cross that we want - # to prefer. - return [vcvarsall, "amd64_x86"] - else: - # Otherwise, the standard x86 compiler. We don't use VC/vcvarsall.bat - # for x86 because vcvarsall calls vcvars32, which it can only find if - # VS??COMNTOOLS is set, which isn't guaranteed. - return [JoinPath(self.path, "Common7", "Tools", "vsvars32.bat")] - elif target_arch == "x64": - arg = "x86_amd64" - # Use the 64-on-64 compiler if we're not using an express edition and - # we're running on a 64bit OS. - if self.short_name[-1] != "e" and is_host_arch_x64: - arg = "amd64" - return [vcvarsall, arg] - - def SetupScript(self, target_arch): - script_data = self._SetupScriptInternal(target_arch) - script_path = script_data[0] - if not os.path.exists(script_path): - raise Exception( - "%s is missing - make sure VC++ tools are installed." % script_path - ) - return script_data - - -def _RegistryQueryBase(sysdir, key, value): - """Use reg.exe to read a particular key. - - While ideally we might use the win32 module, we would like gyp to be - python neutral, so for instance cygwin python lacks this module. - - Arguments: - sysdir: The system subdirectory to attempt to launch reg.exe from. - key: The registry key to read from. - value: The particular value to read. - Return: - stdout from reg.exe, or None for failure. - """ - # Skip if not on Windows or Python Win32 setup issue - if sys.platform not in ("win32", "cygwin"): - return None - # Setup params to pass to and attempt to launch reg.exe - cmd = [os.path.join(os.environ.get("WINDIR", ""), sysdir, "reg.exe"), "query", key] - if value: - cmd.extend(["/v", value]) - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - # Obtain the stdout from reg.exe, reading to the end so p.returncode is valid - # Note that the error text may be in [1] in some cases - text = p.communicate()[0].decode("utf-8") - # Check return code from reg.exe; officially 0==success and 1==error - if p.returncode: - return None - return text - - -def _RegistryQuery(key, value=None): - r"""Use reg.exe to read a particular key through _RegistryQueryBase. - - First tries to launch from %WinDir%\Sysnative to avoid WoW64 redirection. If - that fails, it falls back to System32. Sysnative is available on Vista and - up and available on Windows Server 2003 and XP through KB patch 942589. Note - that Sysnative will always fail if using 64-bit python due to it being a - virtual directory and System32 will work correctly in the first place. - - KB 942589 - http://support.microsoft.com/kb/942589/en-us. - - Arguments: - key: The registry key. - value: The particular registry value to read (optional). - Return: - stdout from reg.exe, or None for failure. - """ - text = None - try: - text = _RegistryQueryBase("Sysnative", key, value) - except OSError as e: - if e.errno == errno.ENOENT: - text = _RegistryQueryBase("System32", key, value) - else: - raise - return text - - -def _RegistryGetValueUsingWinReg(key, value): - """Use the _winreg module to obtain the value of a registry key. - - Args: - key: The registry key. - value: The particular registry value to read. - Return: - contents of the registry key's value, or None on failure. Throws - ImportError if winreg is unavailable. - """ - from winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx - try: - root, subkey = key.split("\\", 1) - assert root == "HKLM" # Only need HKLM for now. - with OpenKey(HKEY_LOCAL_MACHINE, subkey) as hkey: - return QueryValueEx(hkey, value)[0] - except OSError: - return None - - -def _RegistryGetValue(key, value): - """Use _winreg or reg.exe to obtain the value of a registry key. - - Using _winreg is preferable because it solves an issue on some corporate - environments where access to reg.exe is locked down. However, we still need - to fallback to reg.exe for the case where the _winreg module is not available - (for example in cygwin python). - - Args: - key: The registry key. - value: The particular registry value to read. - Return: - contents of the registry key's value, or None on failure. - """ - try: - return _RegistryGetValueUsingWinReg(key, value) - except ImportError: - pass - - # Fallback to reg.exe if we fail to import _winreg. - text = _RegistryQuery(key, value) - if not text: - return None - # Extract value. - match = re.search(r"REG_\w+\s+([^\r]+)\r\n", text) - if not match: - return None - return match.group(1) - - -def _CreateVersion(name, path, sdk_based=False): - """Sets up MSVS project generation. - - Setup is based off the GYP_MSVS_VERSION environment variable or whatever is - autodetected if GYP_MSVS_VERSION is not explicitly specified. If a version is - passed in that doesn't match a value in versions python will throw a error. - """ - if path: - path = os.path.normpath(path) - versions = { - "2022": VisualStudioVersion( - "2022", - "Visual Studio 2022", - solution_version="12.00", - project_version="17.0", - flat_sln=False, - uses_vcxproj=True, - path=path, - sdk_based=sdk_based, - default_toolset="v143", - compatible_sdks=["v8.1", "v10.0"], - ), - "2019": VisualStudioVersion( - "2019", - "Visual Studio 2019", - solution_version="12.00", - project_version="16.0", - flat_sln=False, - uses_vcxproj=True, - path=path, - sdk_based=sdk_based, - default_toolset="v142", - compatible_sdks=["v8.1", "v10.0"], - ), - "2017": VisualStudioVersion( - "2017", - "Visual Studio 2017", - solution_version="12.00", - project_version="15.0", - flat_sln=False, - uses_vcxproj=True, - path=path, - sdk_based=sdk_based, - default_toolset="v141", - compatible_sdks=["v8.1", "v10.0"], - ), - "2015": VisualStudioVersion( - "2015", - "Visual Studio 2015", - solution_version="12.00", - project_version="14.0", - flat_sln=False, - uses_vcxproj=True, - path=path, - sdk_based=sdk_based, - default_toolset="v140", - ), - "2013": VisualStudioVersion( - "2013", - "Visual Studio 2013", - solution_version="13.00", - project_version="12.0", - flat_sln=False, - uses_vcxproj=True, - path=path, - sdk_based=sdk_based, - default_toolset="v120", - ), - "2013e": VisualStudioVersion( - "2013e", - "Visual Studio 2013", - solution_version="13.00", - project_version="12.0", - flat_sln=True, - uses_vcxproj=True, - path=path, - sdk_based=sdk_based, - default_toolset="v120", - ), - "2012": VisualStudioVersion( - "2012", - "Visual Studio 2012", - solution_version="12.00", - project_version="4.0", - flat_sln=False, - uses_vcxproj=True, - path=path, - sdk_based=sdk_based, - default_toolset="v110", - ), - "2012e": VisualStudioVersion( - "2012e", - "Visual Studio 2012", - solution_version="12.00", - project_version="4.0", - flat_sln=True, - uses_vcxproj=True, - path=path, - sdk_based=sdk_based, - default_toolset="v110", - ), - "2010": VisualStudioVersion( - "2010", - "Visual Studio 2010", - solution_version="11.00", - project_version="4.0", - flat_sln=False, - uses_vcxproj=True, - path=path, - sdk_based=sdk_based, - ), - "2010e": VisualStudioVersion( - "2010e", - "Visual C++ Express 2010", - solution_version="11.00", - project_version="4.0", - flat_sln=True, - uses_vcxproj=True, - path=path, - sdk_based=sdk_based, - ), - "2008": VisualStudioVersion( - "2008", - "Visual Studio 2008", - solution_version="10.00", - project_version="9.00", - flat_sln=False, - uses_vcxproj=False, - path=path, - sdk_based=sdk_based, - ), - "2008e": VisualStudioVersion( - "2008e", - "Visual Studio 2008", - solution_version="10.00", - project_version="9.00", - flat_sln=True, - uses_vcxproj=False, - path=path, - sdk_based=sdk_based, - ), - "2005": VisualStudioVersion( - "2005", - "Visual Studio 2005", - solution_version="9.00", - project_version="8.00", - flat_sln=False, - uses_vcxproj=False, - path=path, - sdk_based=sdk_based, - ), - "2005e": VisualStudioVersion( - "2005e", - "Visual Studio 2005", - solution_version="9.00", - project_version="8.00", - flat_sln=True, - uses_vcxproj=False, - path=path, - sdk_based=sdk_based, - ), - } - return versions[str(name)] - - -def _ConvertToCygpath(path): - """Convert to cygwin path if we are using cygwin.""" - if sys.platform == "cygwin": - p = subprocess.Popen(["cygpath", path], stdout=subprocess.PIPE) - path = p.communicate()[0].decode("utf-8").strip() - return path - - -def _DetectVisualStudioVersions(versions_to_check, force_express): - """Collect the list of installed visual studio versions. - - Returns: - A list of visual studio versions installed in descending order of - usage preference. - Base this on the registry and a quick check if devenv.exe exists. - Possibilities are: - 2005(e) - Visual Studio 2005 (8) - 2008(e) - Visual Studio 2008 (9) - 2010(e) - Visual Studio 2010 (10) - 2012(e) - Visual Studio 2012 (11) - 2013(e) - Visual Studio 2013 (12) - 2015 - Visual Studio 2015 (14) - 2017 - Visual Studio 2017 (15) - 2019 - Visual Studio 2019 (16) - 2022 - Visual Studio 2022 (17) - Where (e) is e for express editions of MSVS and blank otherwise. - """ - version_to_year = { - "8.0": "2005", - "9.0": "2008", - "10.0": "2010", - "11.0": "2012", - "12.0": "2013", - "14.0": "2015", - "15.0": "2017", - "16.0": "2019", - "17.0": "2022", - } - versions = [] - for version in versions_to_check: - # Old method of searching for which VS version is installed - # We don't use the 2010-encouraged-way because we also want to get the - # path to the binaries, which it doesn't offer. - keys = [ - r"HKLM\Software\Microsoft\VisualStudio\%s" % version, - r"HKLM\Software\Wow6432Node\Microsoft\VisualStudio\%s" % version, - r"HKLM\Software\Microsoft\VCExpress\%s" % version, - r"HKLM\Software\Wow6432Node\Microsoft\VCExpress\%s" % version, - ] - for index in range(len(keys)): - path = _RegistryGetValue(keys[index], "InstallDir") - if not path: - continue - path = _ConvertToCygpath(path) - # Check for full. - full_path = os.path.join(path, "devenv.exe") - express_path = os.path.join(path, "*express.exe") - if not force_express and os.path.exists(full_path): - # Add this one. - versions.append( - _CreateVersion( - version_to_year[version], os.path.join(path, "..", "..") - ) - ) - # Check for express. - elif glob.glob(express_path): - # Add this one. - versions.append( - _CreateVersion( - version_to_year[version] + "e", os.path.join(path, "..", "..") - ) - ) - - # The old method above does not work when only SDK is installed. - keys = [ - r"HKLM\Software\Microsoft\VisualStudio\SxS\VC7", - r"HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VC7", - r"HKLM\Software\Microsoft\VisualStudio\SxS\VS7", - r"HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VS7", - ] - for index in range(len(keys)): - path = _RegistryGetValue(keys[index], version) - if not path: - continue - path = _ConvertToCygpath(path) - if version == "15.0": - if os.path.exists(path): - versions.append(_CreateVersion("2017", path)) - elif version != "14.0": # There is no Express edition for 2015. - versions.append( - _CreateVersion( - version_to_year[version] + "e", - os.path.join(path, ".."), - sdk_based=True, - ) - ) - - return versions - - -def SelectVisualStudioVersion(version="auto", allow_fallback=True): - """Select which version of Visual Studio projects to generate. - - Arguments: - version: Hook to allow caller to force a particular version (vs auto). - Returns: - An object representing a visual studio project format version. - """ - # In auto mode, check environment variable for override. - if version == "auto": - version = os.environ.get("GYP_MSVS_VERSION", "auto") - version_map = { - "auto": ("17.0", "16.0", "15.0", "14.0", "12.0", "10.0", "9.0", "8.0", "11.0"), - "2005": ("8.0",), - "2005e": ("8.0",), - "2008": ("9.0",), - "2008e": ("9.0",), - "2010": ("10.0",), - "2010e": ("10.0",), - "2012": ("11.0",), - "2012e": ("11.0",), - "2013": ("12.0",), - "2013e": ("12.0",), - "2015": ("14.0",), - "2017": ("15.0",), - "2019": ("16.0",), - "2022": ("17.0",), - } - override_path = os.environ.get("GYP_MSVS_OVERRIDE_PATH") - if override_path: - msvs_version = os.environ.get("GYP_MSVS_VERSION") - if not msvs_version: - raise ValueError( - "GYP_MSVS_OVERRIDE_PATH requires GYP_MSVS_VERSION to be " - "set to a particular version (e.g. 2010e)." - ) - return _CreateVersion(msvs_version, override_path, sdk_based=True) - version = str(version) - versions = _DetectVisualStudioVersions(version_map[version], "e" in version) - if not versions: - if not allow_fallback: - raise ValueError("Could not locate Visual Studio installation.") - if version == "auto": - # Default to 2005 if we couldn't find anything - return _CreateVersion("2005", None) - else: - return _CreateVersion(version, None) - return versions[0] diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/__init__.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/__init__.py deleted file mode 100755 index 6790ef9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +++ /dev/null @@ -1,666 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -import copy -import gyp.input -import argparse -import os.path -import re -import shlex -import sys -import traceback -from gyp.common import GypError - -# Default debug modes for GYP -debug = {} - -# List of "official" debug modes, but you can use anything you like. -DEBUG_GENERAL = "general" -DEBUG_VARIABLES = "variables" -DEBUG_INCLUDES = "includes" - - -def DebugOutput(mode, message, *args): - if "all" in gyp.debug or mode in gyp.debug: - ctx = ("unknown", 0, "unknown") - try: - f = traceback.extract_stack(limit=2) - if f: - ctx = f[0][:3] - except Exception: - pass - if args: - message %= args - print( - "%s:%s:%d:%s %s" - % (mode.upper(), os.path.basename(ctx[0]), ctx[1], ctx[2], message) - ) - - -def FindBuildFiles(): - extension = ".gyp" - files = os.listdir(os.getcwd()) - build_files = [] - for file in files: - if file.endswith(extension): - build_files.append(file) - return build_files - - -def Load( - build_files, - format, - default_variables={}, - includes=[], - depth=".", - params=None, - check=False, - circular_check=True, -): - """ - Loads one or more specified build files. - default_variables and includes will be copied before use. - Returns the generator for the specified format and the - data returned by loading the specified build files. - """ - if params is None: - params = {} - - if "-" in format: - format, params["flavor"] = format.split("-", 1) - - default_variables = copy.copy(default_variables) - - # Default variables provided by this program and its modules should be - # named WITH_CAPITAL_LETTERS to provide a distinct "best practice" namespace, - # avoiding collisions with user and automatic variables. - default_variables["GENERATOR"] = format - default_variables["GENERATOR_FLAVOR"] = params.get("flavor", "") - - # Format can be a custom python file, or by default the name of a module - # within gyp.generator. - if format.endswith(".py"): - generator_name = os.path.splitext(format)[0] - path, generator_name = os.path.split(generator_name) - - # Make sure the path to the custom generator is in sys.path - # Don't worry about removing it once we are done. Keeping the path - # to each generator that is used in sys.path is likely harmless and - # arguably a good idea. - path = os.path.abspath(path) - if path not in sys.path: - sys.path.insert(0, path) - else: - generator_name = "gyp.generator." + format - - # These parameters are passed in order (as opposed to by key) - # because ActivePython cannot handle key parameters to __import__. - generator = __import__(generator_name, globals(), locals(), generator_name) - for (key, val) in generator.generator_default_variables.items(): - default_variables.setdefault(key, val) - - # Give the generator the opportunity to set additional variables based on - # the params it will receive in the output phase. - if getattr(generator, "CalculateVariables", None): - generator.CalculateVariables(default_variables, params) - - # Give the generator the opportunity to set generator_input_info based on - # the params it will receive in the output phase. - if getattr(generator, "CalculateGeneratorInputInfo", None): - generator.CalculateGeneratorInputInfo(params) - - # Fetch the generator specific info that gets fed to input, we use getattr - # so we can default things and the generators only have to provide what - # they need. - generator_input_info = { - "non_configuration_keys": getattr( - generator, "generator_additional_non_configuration_keys", [] - ), - "path_sections": getattr(generator, "generator_additional_path_sections", []), - "extra_sources_for_rules": getattr( - generator, "generator_extra_sources_for_rules", [] - ), - "generator_supports_multiple_toolsets": getattr( - generator, "generator_supports_multiple_toolsets", False - ), - "generator_wants_static_library_dependencies_adjusted": getattr( - generator, "generator_wants_static_library_dependencies_adjusted", True - ), - "generator_wants_sorted_dependencies": getattr( - generator, "generator_wants_sorted_dependencies", False - ), - "generator_filelist_paths": getattr( - generator, "generator_filelist_paths", None - ), - } - - # Process the input specific to this generator. - result = gyp.input.Load( - build_files, - default_variables, - includes[:], - depth, - generator_input_info, - check, - circular_check, - params["parallel"], - params["root_targets"], - ) - return [generator] + result - - -def NameValueListToDict(name_value_list): - """ - Takes an array of strings of the form 'NAME=VALUE' and creates a dictionary - of the pairs. If a string is simply NAME, then the value in the dictionary - is set to True. If VALUE can be converted to an integer, it is. - """ - result = {} - for item in name_value_list: - tokens = item.split("=", 1) - if len(tokens) == 2: - # If we can make it an int, use that, otherwise, use the string. - try: - token_value = int(tokens[1]) - except ValueError: - token_value = tokens[1] - # Set the variable to the supplied value. - result[tokens[0]] = token_value - else: - # No value supplied, treat it as a boolean and set it. - result[tokens[0]] = True - return result - - -def ShlexEnv(env_name): - flags = os.environ.get(env_name, []) - if flags: - flags = shlex.split(flags) - return flags - - -def FormatOpt(opt, value): - if opt.startswith("--"): - return f"{opt}={value}" - return opt + value - - -def RegenerateAppendFlag(flag, values, predicate, env_name, options): - """Regenerate a list of command line flags, for an option of action='append'. - - The |env_name|, if given, is checked in the environment and used to generate - an initial list of options, then the options that were specified on the - command line (given in |values|) are appended. This matches the handling of - environment variables and command line flags where command line flags override - the environment, while not requiring the environment to be set when the flags - are used again. - """ - flags = [] - if options.use_environment and env_name: - for flag_value in ShlexEnv(env_name): - value = FormatOpt(flag, predicate(flag_value)) - if value in flags: - flags.remove(value) - flags.append(value) - if values: - for flag_value in values: - flags.append(FormatOpt(flag, predicate(flag_value))) - return flags - - -def RegenerateFlags(options): - """Given a parsed options object, and taking the environment variables into - account, returns a list of flags that should regenerate an equivalent options - object (even in the absence of the environment variables.) - - Any path options will be normalized relative to depth. - - The format flag is not included, as it is assumed the calling generator will - set that as appropriate. - """ - - def FixPath(path): - path = gyp.common.FixIfRelativePath(path, options.depth) - if not path: - return os.path.curdir - return path - - def Noop(value): - return value - - # We always want to ignore the environment when regenerating, to avoid - # duplicate or changed flags in the environment at the time of regeneration. - flags = ["--ignore-environment"] - for name, metadata in options._regeneration_metadata.items(): - opt = metadata["opt"] - value = getattr(options, name) - value_predicate = metadata["type"] == "path" and FixPath or Noop - action = metadata["action"] - env_name = metadata["env_name"] - if action == "append": - flags.extend( - RegenerateAppendFlag(opt, value, value_predicate, env_name, options) - ) - elif action in ("store", None): # None is a synonym for 'store'. - if value: - flags.append(FormatOpt(opt, value_predicate(value))) - elif options.use_environment and env_name and os.environ.get(env_name): - flags.append(FormatOpt(opt, value_predicate(os.environ.get(env_name)))) - elif action in ("store_true", "store_false"): - if (action == "store_true" and value) or ( - action == "store_false" and not value - ): - flags.append(opt) - elif options.use_environment and env_name: - print( - "Warning: environment regeneration unimplemented " - "for %s flag %r env_name %r" % (action, opt, env_name), - file=sys.stderr, - ) - else: - print( - "Warning: regeneration unimplemented for action %r " - "flag %r" % (action, opt), - file=sys.stderr, - ) - - return flags - - -class RegeneratableOptionParser(argparse.ArgumentParser): - def __init__(self, usage): - self.__regeneratable_options = {} - argparse.ArgumentParser.__init__(self, usage=usage) - - def add_argument(self, *args, **kw): - """Add an option to the parser. - - This accepts the same arguments as ArgumentParser.add_argument, plus the - following: - regenerate: can be set to False to prevent this option from being included - in regeneration. - env_name: name of environment variable that additional values for this - option come from. - type: adds type='path', to tell the regenerator that the values of - this option need to be made relative to options.depth - """ - env_name = kw.pop("env_name", None) - if "dest" in kw and kw.pop("regenerate", True): - dest = kw["dest"] - - # The path type is needed for regenerating, for optparse we can just treat - # it as a string. - type = kw.get("type") - if type == "path": - kw["type"] = str - - self.__regeneratable_options[dest] = { - "action": kw.get("action"), - "type": type, - "env_name": env_name, - "opt": args[0], - } - - argparse.ArgumentParser.add_argument(self, *args, **kw) - - def parse_args(self, *args): - values, args = argparse.ArgumentParser.parse_known_args(self, *args) - values._regeneration_metadata = self.__regeneratable_options - return values, args - - -def gyp_main(args): - my_name = os.path.basename(sys.argv[0]) - usage = "usage: %(prog)s [options ...] [build_file ...]" - - parser = RegeneratableOptionParser(usage=usage.replace("%s", "%(prog)s")) - parser.add_argument( - "--build", - dest="configs", - action="append", - help="configuration for build after project generation", - ) - parser.add_argument( - "--check", dest="check", action="store_true", help="check format of gyp files" - ) - parser.add_argument( - "--config-dir", - dest="config_dir", - action="store", - env_name="GYP_CONFIG_DIR", - default=None, - help="The location for configuration files like " "include.gypi.", - ) - parser.add_argument( - "-d", - "--debug", - dest="debug", - metavar="DEBUGMODE", - action="append", - default=[], - help="turn on a debugging " - 'mode for debugging GYP. Supported modes are "variables", ' - '"includes" and "general" or "all" for all of them.', - ) - parser.add_argument( - "-D", - dest="defines", - action="append", - metavar="VAR=VAL", - env_name="GYP_DEFINES", - help="sets variable VAR to value VAL", - ) - parser.add_argument( - "--depth", - dest="depth", - metavar="PATH", - type="path", - help="set DEPTH gyp variable to a relative path to PATH", - ) - parser.add_argument( - "-f", - "--format", - dest="formats", - action="append", - env_name="GYP_GENERATORS", - regenerate=False, - help="output formats to generate", - ) - parser.add_argument( - "-G", - dest="generator_flags", - action="append", - default=[], - metavar="FLAG=VAL", - env_name="GYP_GENERATOR_FLAGS", - help="sets generator flag FLAG to VAL", - ) - parser.add_argument( - "--generator-output", - dest="generator_output", - action="store", - default=None, - metavar="DIR", - type="path", - env_name="GYP_GENERATOR_OUTPUT", - help="puts generated build files under DIR", - ) - parser.add_argument( - "--ignore-environment", - dest="use_environment", - action="store_false", - default=True, - regenerate=False, - help="do not read options from environment variables", - ) - parser.add_argument( - "-I", - "--include", - dest="includes", - action="append", - metavar="INCLUDE", - type="path", - help="files to include in all loaded .gyp files", - ) - # --no-circular-check disables the check for circular relationships between - # .gyp files. These relationships should not exist, but they've only been - # observed to be harmful with the Xcode generator. Chromium's .gyp files - # currently have some circular relationships on non-Mac platforms, so this - # option allows the strict behavior to be used on Macs and the lenient - # behavior to be used elsewhere. - # TODO(mark): Remove this option when http://crbug.com/35878 is fixed. - parser.add_argument( - "--no-circular-check", - dest="circular_check", - action="store_false", - default=True, - regenerate=False, - help="don't check for circular relationships between files", - ) - parser.add_argument( - "--no-parallel", - action="store_true", - default=False, - help="Disable multiprocessing", - ) - parser.add_argument( - "-S", - "--suffix", - dest="suffix", - default="", - help="suffix to add to generated files", - ) - parser.add_argument( - "--toplevel-dir", - dest="toplevel_dir", - action="store", - default=None, - metavar="DIR", - type="path", - help="directory to use as the root of the source tree", - ) - parser.add_argument( - "-R", - "--root-target", - dest="root_targets", - action="append", - metavar="TARGET", - help="include only TARGET and its deep dependencies", - ) - - options, build_files_arg = parser.parse_args(args) - build_files = build_files_arg - - # Set up the configuration directory (defaults to ~/.gyp) - if not options.config_dir: - home = None - home_dot_gyp = None - if options.use_environment: - home_dot_gyp = os.environ.get("GYP_CONFIG_DIR", None) - if home_dot_gyp: - home_dot_gyp = os.path.expanduser(home_dot_gyp) - - if not home_dot_gyp: - home_vars = ["HOME"] - if sys.platform in ("cygwin", "win32"): - home_vars.append("USERPROFILE") - for home_var in home_vars: - home = os.getenv(home_var) - if home: - home_dot_gyp = os.path.join(home, ".gyp") - if not os.path.exists(home_dot_gyp): - home_dot_gyp = None - else: - break - else: - home_dot_gyp = os.path.expanduser(options.config_dir) - - if home_dot_gyp and not os.path.exists(home_dot_gyp): - home_dot_gyp = None - - if not options.formats: - # If no format was given on the command line, then check the env variable. - generate_formats = [] - if options.use_environment: - generate_formats = os.environ.get("GYP_GENERATORS", []) - if generate_formats: - generate_formats = re.split(r"[\s,]", generate_formats) - if generate_formats: - options.formats = generate_formats - else: - # Nothing in the variable, default based on platform. - if sys.platform == "darwin": - options.formats = ["xcode"] - elif sys.platform in ("win32", "cygwin"): - options.formats = ["msvs"] - else: - options.formats = ["make"] - - if not options.generator_output and options.use_environment: - g_o = os.environ.get("GYP_GENERATOR_OUTPUT") - if g_o: - options.generator_output = g_o - - options.parallel = not options.no_parallel - - for mode in options.debug: - gyp.debug[mode] = 1 - - # Do an extra check to avoid work when we're not debugging. - if DEBUG_GENERAL in gyp.debug: - DebugOutput(DEBUG_GENERAL, "running with these options:") - for option, value in sorted(options.__dict__.items()): - if option[0] == "_": - continue - if isinstance(value, str): - DebugOutput(DEBUG_GENERAL, " %s: '%s'", option, value) - else: - DebugOutput(DEBUG_GENERAL, " %s: %s", option, value) - - if not build_files: - build_files = FindBuildFiles() - if not build_files: - raise GypError((usage + "\n\n%s: error: no build_file") % (my_name, my_name)) - - # TODO(mark): Chromium-specific hack! - # For Chromium, the gyp "depth" variable should always be a relative path - # to Chromium's top-level "src" directory. If no depth variable was set - # on the command line, try to find a "src" directory by looking at the - # absolute path to each build file's directory. The first "src" component - # found will be treated as though it were the path used for --depth. - if not options.depth: - for build_file in build_files: - build_file_dir = os.path.abspath(os.path.dirname(build_file)) - build_file_dir_components = build_file_dir.split(os.path.sep) - components_len = len(build_file_dir_components) - for index in range(components_len - 1, -1, -1): - if build_file_dir_components[index] == "src": - options.depth = os.path.sep.join(build_file_dir_components) - break - del build_file_dir_components[index] - - # If the inner loop found something, break without advancing to another - # build file. - if options.depth: - break - - if not options.depth: - raise GypError( - "Could not automatically locate src directory. This is" - "a temporary Chromium feature that will be removed. Use" - "--depth as a workaround." - ) - - # If toplevel-dir is not set, we assume that depth is the root of our source - # tree. - if not options.toplevel_dir: - options.toplevel_dir = options.depth - - # -D on the command line sets variable defaults - D isn't just for define, - # it's for default. Perhaps there should be a way to force (-F?) a - # variable's value so that it can't be overridden by anything else. - cmdline_default_variables = {} - defines = [] - if options.use_environment: - defines += ShlexEnv("GYP_DEFINES") - if options.defines: - defines += options.defines - cmdline_default_variables = NameValueListToDict(defines) - if DEBUG_GENERAL in gyp.debug: - DebugOutput( - DEBUG_GENERAL, "cmdline_default_variables: %s", cmdline_default_variables - ) - - # Set up includes. - includes = [] - - # If ~/.gyp/include.gypi exists, it'll be forcibly included into every - # .gyp file that's loaded, before anything else is included. - if home_dot_gyp: - default_include = os.path.join(home_dot_gyp, "include.gypi") - if os.path.exists(default_include): - print("Using overrides found in " + default_include) - includes.append(default_include) - - # Command-line --include files come after the default include. - if options.includes: - includes.extend(options.includes) - - # Generator flags should be prefixed with the target generator since they - # are global across all generator runs. - gen_flags = [] - if options.use_environment: - gen_flags += ShlexEnv("GYP_GENERATOR_FLAGS") - if options.generator_flags: - gen_flags += options.generator_flags - generator_flags = NameValueListToDict(gen_flags) - if DEBUG_GENERAL in gyp.debug.keys(): - DebugOutput(DEBUG_GENERAL, "generator_flags: %s", generator_flags) - - # Generate all requested formats (use a set in case we got one format request - # twice) - for format in set(options.formats): - params = { - "options": options, - "build_files": build_files, - "generator_flags": generator_flags, - "cwd": os.getcwd(), - "build_files_arg": build_files_arg, - "gyp_binary": sys.argv[0], - "home_dot_gyp": home_dot_gyp, - "parallel": options.parallel, - "root_targets": options.root_targets, - "target_arch": cmdline_default_variables.get("target_arch", ""), - } - - # Start with the default variables from the command line. - [generator, flat_list, targets, data] = Load( - build_files, - format, - cmdline_default_variables, - includes, - options.depth, - params, - options.check, - options.circular_check, - ) - - # TODO(mark): Pass |data| for now because the generator needs a list of - # build files that came in. In the future, maybe it should just accept - # a list, and not the whole data dict. - # NOTE: flat_list is the flattened dependency graph specifying the order - # that targets may be built. Build systems that operate serially or that - # need to have dependencies defined before dependents reference them should - # generate targets in the order specified in flat_list. - generator.GenerateOutput(flat_list, targets, data, params) - - if options.configs: - valid_configs = targets[flat_list[0]]["configurations"] - for conf in options.configs: - if conf not in valid_configs: - raise GypError("Invalid config specified via --build: %s" % conf) - generator.PerformBuild(data, options.configs, params) - - # Done - return 0 - - -def main(args): - try: - return gyp_main(args) - except GypError as e: - sys.stderr.write("gyp: %s\n" % e) - return 1 - - -# NOTE: setuptools generated console_scripts calls function with no arguments -def script_main(): - return main(sys.argv[1:]) - - -if __name__ == "__main__": - sys.exit(script_main()) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/common.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/common.py deleted file mode 100644 index 9213fcc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/common.py +++ /dev/null @@ -1,654 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import errno -import filecmp -import os.path -import re -import tempfile -import sys -import subprocess - -from collections.abc import MutableSet - - -# A minimal memoizing decorator. It'll blow up if the args aren't immutable, -# among other "problems". -class memoize: - def __init__(self, func): - self.func = func - self.cache = {} - - def __call__(self, *args): - try: - return self.cache[args] - except KeyError: - result = self.func(*args) - self.cache[args] = result - return result - - -class GypError(Exception): - """Error class representing an error, which is to be presented - to the user. The main entry point will catch and display this. - """ - - pass - - -def ExceptionAppend(e, msg): - """Append a message to the given exception's message.""" - if not e.args: - e.args = (msg,) - elif len(e.args) == 1: - e.args = (str(e.args[0]) + " " + msg,) - else: - e.args = (str(e.args[0]) + " " + msg,) + e.args[1:] - - -def FindQualifiedTargets(target, qualified_list): - """ - Given a list of qualified targets, return the qualified targets for the - specified |target|. - """ - return [t for t in qualified_list if ParseQualifiedTarget(t)[1] == target] - - -def ParseQualifiedTarget(target): - # Splits a qualified target into a build file, target name and toolset. - - # NOTE: rsplit is used to disambiguate the Windows drive letter separator. - target_split = target.rsplit(":", 1) - if len(target_split) == 2: - [build_file, target] = target_split - else: - build_file = None - - target_split = target.rsplit("#", 1) - if len(target_split) == 2: - [target, toolset] = target_split - else: - toolset = None - - return [build_file, target, toolset] - - -def ResolveTarget(build_file, target, toolset): - # This function resolves a target into a canonical form: - # - a fully defined build file, either absolute or relative to the current - # directory - # - a target name - # - a toolset - # - # build_file is the file relative to which 'target' is defined. - # target is the qualified target. - # toolset is the default toolset for that target. - [parsed_build_file, target, parsed_toolset] = ParseQualifiedTarget(target) - - if parsed_build_file: - if build_file: - # If a relative path, parsed_build_file is relative to the directory - # containing build_file. If build_file is not in the current directory, - # parsed_build_file is not a usable path as-is. Resolve it by - # interpreting it as relative to build_file. If parsed_build_file is - # absolute, it is usable as a path regardless of the current directory, - # and os.path.join will return it as-is. - build_file = os.path.normpath( - os.path.join(os.path.dirname(build_file), parsed_build_file) - ) - # Further (to handle cases like ../cwd), make it relative to cwd) - if not os.path.isabs(build_file): - build_file = RelativePath(build_file, ".") - else: - build_file = parsed_build_file - - if parsed_toolset: - toolset = parsed_toolset - - return [build_file, target, toolset] - - -def BuildFile(fully_qualified_target): - # Extracts the build file from the fully qualified target. - return ParseQualifiedTarget(fully_qualified_target)[0] - - -def GetEnvironFallback(var_list, default): - """Look up a key in the environment, with fallback to secondary keys - and finally falling back to a default value.""" - for var in var_list: - if var in os.environ: - return os.environ[var] - return default - - -def QualifiedTarget(build_file, target, toolset): - # "Qualified" means the file that a target was defined in and the target - # name, separated by a colon, suffixed by a # and the toolset name: - # /path/to/file.gyp:target_name#toolset - fully_qualified = build_file + ":" + target - if toolset: - fully_qualified = fully_qualified + "#" + toolset - return fully_qualified - - -@memoize -def RelativePath(path, relative_to, follow_path_symlink=True): - # Assuming both |path| and |relative_to| are relative to the current - # directory, returns a relative path that identifies path relative to - # relative_to. - # If |follow_symlink_path| is true (default) and |path| is a symlink, then - # this method returns a path to the real file represented by |path|. If it is - # false, this method returns a path to the symlink. If |path| is not a - # symlink, this option has no effect. - - # Convert to normalized (and therefore absolute paths). - if follow_path_symlink: - path = os.path.realpath(path) - else: - path = os.path.abspath(path) - relative_to = os.path.realpath(relative_to) - - # On Windows, we can't create a relative path to a different drive, so just - # use the absolute path. - if sys.platform == "win32": - if ( - os.path.splitdrive(path)[0].lower() - != os.path.splitdrive(relative_to)[0].lower() - ): - return path - - # Split the paths into components. - path_split = path.split(os.path.sep) - relative_to_split = relative_to.split(os.path.sep) - - # Determine how much of the prefix the two paths share. - prefix_len = len(os.path.commonprefix([path_split, relative_to_split])) - - # Put enough ".." components to back up out of relative_to to the common - # prefix, and then append the part of path_split after the common prefix. - relative_split = [os.path.pardir] * ( - len(relative_to_split) - prefix_len - ) + path_split[prefix_len:] - - if len(relative_split) == 0: - # The paths were the same. - return "" - - # Turn it back into a string and we're done. - return os.path.join(*relative_split) - - -@memoize -def InvertRelativePath(path, toplevel_dir=None): - """Given a path like foo/bar that is relative to toplevel_dir, return - the inverse relative path back to the toplevel_dir. - - E.g. os.path.normpath(os.path.join(path, InvertRelativePath(path))) - should always produce the empty string, unless the path contains symlinks. - """ - if not path: - return path - toplevel_dir = "." if toplevel_dir is None else toplevel_dir - return RelativePath(toplevel_dir, os.path.join(toplevel_dir, path)) - - -def FixIfRelativePath(path, relative_to): - # Like RelativePath but returns |path| unchanged if it is absolute. - if os.path.isabs(path): - return path - return RelativePath(path, relative_to) - - -def UnrelativePath(path, relative_to): - # Assuming that |relative_to| is relative to the current directory, and |path| - # is a path relative to the dirname of |relative_to|, returns a path that - # identifies |path| relative to the current directory. - rel_dir = os.path.dirname(relative_to) - return os.path.normpath(os.path.join(rel_dir, path)) - - -# re objects used by EncodePOSIXShellArgument. See IEEE 1003.1 XCU.2.2 at -# http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_02 -# and the documentation for various shells. - -# _quote is a pattern that should match any argument that needs to be quoted -# with double-quotes by EncodePOSIXShellArgument. It matches the following -# characters appearing anywhere in an argument: -# \t, \n, space parameter separators -# # comments -# $ expansions (quoted to always expand within one argument) -# % called out by IEEE 1003.1 XCU.2.2 -# & job control -# ' quoting -# (, ) subshell execution -# *, ?, [ pathname expansion -# ; command delimiter -# <, >, | redirection -# = assignment -# {, } brace expansion (bash) -# ~ tilde expansion -# It also matches the empty string, because "" (or '') is the only way to -# represent an empty string literal argument to a POSIX shell. -# -# This does not match the characters in _escape, because those need to be -# backslash-escaped regardless of whether they appear in a double-quoted -# string. -_quote = re.compile("[\t\n #$%&'()*;<=>?[{|}~]|^$") - -# _escape is a pattern that should match any character that needs to be -# escaped with a backslash, whether or not the argument matched the _quote -# pattern. _escape is used with re.sub to backslash anything in _escape's -# first match group, hence the (parentheses) in the regular expression. -# -# _escape matches the following characters appearing anywhere in an argument: -# " to prevent POSIX shells from interpreting this character for quoting -# \ to prevent POSIX shells from interpreting this character for escaping -# ` to prevent POSIX shells from interpreting this character for command -# substitution -# Missing from this list is $, because the desired behavior of -# EncodePOSIXShellArgument is to permit parameter (variable) expansion. -# -# Also missing from this list is !, which bash will interpret as the history -# expansion character when history is enabled. bash does not enable history -# by default in non-interactive shells, so this is not thought to be a problem. -# ! was omitted from this list because bash interprets "\!" as a literal string -# including the backslash character (avoiding history expansion but retaining -# the backslash), which would not be correct for argument encoding. Handling -# this case properly would also be problematic because bash allows the history -# character to be changed with the histchars shell variable. Fortunately, -# as history is not enabled in non-interactive shells and -# EncodePOSIXShellArgument is only expected to encode for non-interactive -# shells, there is no room for error here by ignoring !. -_escape = re.compile(r'(["\\`])') - - -def EncodePOSIXShellArgument(argument): - """Encodes |argument| suitably for consumption by POSIX shells. - - argument may be quoted and escaped as necessary to ensure that POSIX shells - treat the returned value as a literal representing the argument passed to - this function. Parameter (variable) expansions beginning with $ are allowed - to remain intact without escaping the $, to allow the argument to contain - references to variables to be expanded by the shell. - """ - - if not isinstance(argument, str): - argument = str(argument) - - if _quote.search(argument): - quote = '"' - else: - quote = "" - - encoded = quote + re.sub(_escape, r"\\\1", argument) + quote - - return encoded - - -def EncodePOSIXShellList(list): - """Encodes |list| suitably for consumption by POSIX shells. - - Returns EncodePOSIXShellArgument for each item in list, and joins them - together using the space character as an argument separator. - """ - - encoded_arguments = [] - for argument in list: - encoded_arguments.append(EncodePOSIXShellArgument(argument)) - return " ".join(encoded_arguments) - - -def DeepDependencyTargets(target_dicts, roots): - """Returns the recursive list of target dependencies.""" - dependencies = set() - pending = set(roots) - while pending: - # Pluck out one. - r = pending.pop() - # Skip if visited already. - if r in dependencies: - continue - # Add it. - dependencies.add(r) - # Add its children. - spec = target_dicts[r] - pending.update(set(spec.get("dependencies", []))) - pending.update(set(spec.get("dependencies_original", []))) - return list(dependencies - set(roots)) - - -def BuildFileTargets(target_list, build_file): - """From a target_list, returns the subset from the specified build_file. - """ - return [p for p in target_list if BuildFile(p) == build_file] - - -def AllTargets(target_list, target_dicts, build_file): - """Returns all targets (direct and dependencies) for the specified build_file. - """ - bftargets = BuildFileTargets(target_list, build_file) - deptargets = DeepDependencyTargets(target_dicts, bftargets) - return bftargets + deptargets - - -def WriteOnDiff(filename): - """Write to a file only if the new contents differ. - - Arguments: - filename: name of the file to potentially write to. - Returns: - A file like object which will write to temporary file and only overwrite - the target if it differs (on close). - """ - - class Writer: - """Wrapper around file which only covers the target if it differs.""" - - def __init__(self): - # On Cygwin remove the "dir" argument - # `C:` prefixed paths are treated as relative, - # consequently ending up with current dir "/cygdrive/c/..." - # being prefixed to those, which was - # obviously a non-existent path, - # for example: "/cygdrive/c//C:\". - # For more details see: - # https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp - base_temp_dir = "" if IsCygwin() else os.path.dirname(filename) - # Pick temporary file. - tmp_fd, self.tmp_path = tempfile.mkstemp( - suffix=".tmp", - prefix=os.path.split(filename)[1] + ".gyp.", - dir=base_temp_dir, - ) - try: - self.tmp_file = os.fdopen(tmp_fd, "wb") - except Exception: - # Don't leave turds behind. - os.unlink(self.tmp_path) - raise - - def __getattr__(self, attrname): - # Delegate everything else to self.tmp_file - return getattr(self.tmp_file, attrname) - - def close(self): - try: - # Close tmp file. - self.tmp_file.close() - # Determine if different. - same = False - try: - same = filecmp.cmp(self.tmp_path, filename, False) - except OSError as e: - if e.errno != errno.ENOENT: - raise - - if same: - # The new file is identical to the old one, just get rid of the new - # one. - os.unlink(self.tmp_path) - else: - # The new file is different from the old one, - # or there is no old one. - # Rename the new file to the permanent name. - # - # tempfile.mkstemp uses an overly restrictive mode, resulting in a - # file that can only be read by the owner, regardless of the umask. - # There's no reason to not respect the umask here, - # which means that an extra hoop is required - # to fetch it and reset the new file's mode. - # - # No way to get the umask without setting a new one? Set a safe one - # and then set it back to the old value. - umask = os.umask(0o77) - os.umask(umask) - os.chmod(self.tmp_path, 0o666 & ~umask) - if sys.platform == "win32" and os.path.exists(filename): - # NOTE: on windows (but not cygwin) rename will not replace an - # existing file, so it must be preceded with a remove. - # Sadly there is no way to make the switch atomic. - os.remove(filename) - os.rename(self.tmp_path, filename) - except Exception: - # Don't leave turds behind. - os.unlink(self.tmp_path) - raise - - def write(self, s): - self.tmp_file.write(s.encode("utf-8")) - - return Writer() - - -def EnsureDirExists(path): - """Make sure the directory for |path| exists.""" - try: - os.makedirs(os.path.dirname(path)) - except OSError: - pass - - -def GetFlavor(params): - """Returns |params.flavor| if it's set, the system's default flavor else.""" - flavors = { - "cygwin": "win", - "win32": "win", - "darwin": "mac", - } - - if "flavor" in params: - return params["flavor"] - if sys.platform in flavors: - return flavors[sys.platform] - if sys.platform.startswith("sunos"): - return "solaris" - if sys.platform.startswith(("dragonfly", "freebsd")): - return "freebsd" - if sys.platform.startswith("openbsd"): - return "openbsd" - if sys.platform.startswith("netbsd"): - return "netbsd" - if sys.platform.startswith("aix"): - return "aix" - if sys.platform.startswith(("os390", "zos")): - return "zos" - - return "linux" - - -def CopyTool(flavor, out_path, generator_flags={}): - """Finds (flock|mac|win)_tool.gyp in the gyp directory and copies it - to |out_path|.""" - # aix and solaris just need flock emulation. mac and win use more complicated - # support scripts. - prefix = {"aix": "flock", "solaris": "flock", "mac": "mac", "win": "win"}.get( - flavor, None - ) - if not prefix: - return - - # Slurp input file. - source_path = os.path.join( - os.path.dirname(os.path.abspath(__file__)), "%s_tool.py" % prefix - ) - with open(source_path) as source_file: - source = source_file.readlines() - - # Set custom header flags. - header = "# Generated by gyp. Do not edit.\n" - mac_toolchain_dir = generator_flags.get("mac_toolchain_dir", None) - if flavor == "mac" and mac_toolchain_dir: - header += "import os;\nos.environ['DEVELOPER_DIR']='%s'\n" % mac_toolchain_dir - - # Add header and write it out. - tool_path = os.path.join(out_path, "gyp-%s-tool" % prefix) - with open(tool_path, "w") as tool_file: - tool_file.write("".join([source[0], header] + source[1:])) - - # Make file executable. - os.chmod(tool_path, 0o755) - - -# From Alex Martelli, -# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52560 -# ASPN: Python Cookbook: Remove duplicates from a sequence -# First comment, dated 2001/10/13. -# (Also in the printed Python Cookbook.) - - -def uniquer(seq, idfun=lambda x: x): - seen = {} - result = [] - for item in seq: - marker = idfun(item) - if marker in seen: - continue - seen[marker] = 1 - result.append(item) - return result - - -# Based on http://code.activestate.com/recipes/576694/. -class OrderedSet(MutableSet): - def __init__(self, iterable=None): - self.end = end = [] - end += [None, end, end] # sentinel node for doubly linked list - self.map = {} # key --> [key, prev, next] - if iterable is not None: - self |= iterable - - def __len__(self): - return len(self.map) - - def __contains__(self, key): - return key in self.map - - def add(self, key): - if key not in self.map: - end = self.end - curr = end[1] - curr[2] = end[1] = self.map[key] = [key, curr, end] - - def discard(self, key): - if key in self.map: - key, prev_item, next_item = self.map.pop(key) - prev_item[2] = next_item - next_item[1] = prev_item - - def __iter__(self): - end = self.end - curr = end[2] - while curr is not end: - yield curr[0] - curr = curr[2] - - def __reversed__(self): - end = self.end - curr = end[1] - while curr is not end: - yield curr[0] - curr = curr[1] - - # The second argument is an addition that causes a pylint warning. - def pop(self, last=True): # pylint: disable=W0221 - if not self: - raise KeyError("set is empty") - key = self.end[1][0] if last else self.end[2][0] - self.discard(key) - return key - - def __repr__(self): - if not self: - return f"{self.__class__.__name__}()" - return f"{self.__class__.__name__}({list(self)!r})" - - def __eq__(self, other): - if isinstance(other, OrderedSet): - return len(self) == len(other) and list(self) == list(other) - return set(self) == set(other) - - # Extensions to the recipe. - def update(self, iterable): - for i in iterable: - if i not in self: - self.add(i) - - -class CycleError(Exception): - """An exception raised when an unexpected cycle is detected.""" - - def __init__(self, nodes): - self.nodes = nodes - - def __str__(self): - return "CycleError: cycle involving: " + str(self.nodes) - - -def TopologicallySorted(graph, get_edges): - r"""Topologically sort based on a user provided edge definition. - - Args: - graph: A list of node names. - get_edges: A function mapping from node name to a hashable collection - of node names which this node has outgoing edges to. - Returns: - A list containing all of the node in graph in topological order. - It is assumed that calling get_edges once for each node and caching is - cheaper than repeatedly calling get_edges. - Raises: - CycleError in the event of a cycle. - Example: - graph = {'a': '$(b) $(c)', 'b': 'hi', 'c': '$(b)'} - def GetEdges(node): - return re.findall(r'\$\(([^))]\)', graph[node]) - print TopologicallySorted(graph.keys(), GetEdges) - ==> - ['a', 'c', b'] - """ - get_edges = memoize(get_edges) - visited = set() - visiting = set() - ordered_nodes = [] - - def Visit(node): - if node in visiting: - raise CycleError(visiting) - if node in visited: - return - visited.add(node) - visiting.add(node) - for neighbor in get_edges(node): - Visit(neighbor) - visiting.remove(node) - ordered_nodes.insert(0, node) - - for node in sorted(graph): - Visit(node) - return ordered_nodes - - -def CrossCompileRequested(): - # TODO: figure out how to not build extra host objects in the - # non-cross-compile case when this is enabled, and enable unconditionally. - return ( - os.environ.get("GYP_CROSSCOMPILE") - or os.environ.get("AR_host") - or os.environ.get("CC_host") - or os.environ.get("CXX_host") - or os.environ.get("AR_target") - or os.environ.get("CC_target") - or os.environ.get("CXX_target") - ) - - -def IsCygwin(): - try: - out = subprocess.Popen( - "uname", stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - stdout = out.communicate()[0].decode("utf-8") - return "CYGWIN" in str(stdout) - except Exception: - return False diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/common_test.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/common_test.py deleted file mode 100755 index 0534408..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Unit tests for the common.py file.""" - -import gyp.common -import unittest -import sys - - -class TestTopologicallySorted(unittest.TestCase): - def test_Valid(self): - """Test that sorting works on a valid graph with one possible order.""" - graph = { - "a": ["b", "c"], - "b": [], - "c": ["d"], - "d": ["b"], - } - - def GetEdge(node): - return tuple(graph[node]) - - self.assertEqual( - gyp.common.TopologicallySorted(graph.keys(), GetEdge), ["a", "c", "d", "b"] - ) - - def test_Cycle(self): - """Test that an exception is thrown on a cyclic graph.""" - graph = { - "a": ["b"], - "b": ["c"], - "c": ["d"], - "d": ["a"], - } - - def GetEdge(node): - return tuple(graph[node]) - - self.assertRaises( - gyp.common.CycleError, gyp.common.TopologicallySorted, graph.keys(), GetEdge - ) - - -class TestGetFlavor(unittest.TestCase): - """Test that gyp.common.GetFlavor works as intended""" - - original_platform = "" - - def setUp(self): - self.original_platform = sys.platform - - def tearDown(self): - sys.platform = self.original_platform - - def assertFlavor(self, expected, argument, param): - sys.platform = argument - self.assertEqual(expected, gyp.common.GetFlavor(param)) - - def test_platform_default(self): - self.assertFlavor("freebsd", "freebsd9", {}) - self.assertFlavor("freebsd", "freebsd10", {}) - self.assertFlavor("openbsd", "openbsd5", {}) - self.assertFlavor("solaris", "sunos5", {}) - self.assertFlavor("solaris", "sunos", {}) - self.assertFlavor("linux", "linux2", {}) - self.assertFlavor("linux", "linux3", {}) - self.assertFlavor("linux", "linux", {}) - - def test_param(self): - self.assertFlavor("foobar", "linux2", {"flavor": "foobar"}) - - -if __name__ == "__main__": - unittest.main() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py deleted file mode 100644 index bda1a47..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +++ /dev/null @@ -1,165 +0,0 @@ -# Copyright (c) 2011 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys -import re -import os -import locale -from functools import reduce - - -def XmlToString(content, encoding="utf-8", pretty=False): - """ Writes the XML content to disk, touching the file only if it has changed. - - Visual Studio files have a lot of pre-defined structures. This function makes - it easy to represent these structures as Python data structures, instead of - having to create a lot of function calls. - - Each XML element of the content is represented as a list composed of: - 1. The name of the element, a string, - 2. The attributes of the element, a dictionary (optional), and - 3+. The content of the element, if any. Strings are simple text nodes and - lists are child elements. - - Example 1: - - becomes - ['test'] - - Example 2: - - This is - it! - - - becomes - ['myelement', {'a':'value1', 'b':'value2'}, - ['childtype', 'This is'], - ['childtype', 'it!'], - ] - - Args: - content: The structured content to be converted. - encoding: The encoding to report on the first XML line. - pretty: True if we want pretty printing with indents and new lines. - - Returns: - The XML content as a string. - """ - # We create a huge list of all the elements of the file. - xml_parts = ['' % encoding] - if pretty: - xml_parts.append("\n") - _ConstructContentList(xml_parts, content, pretty) - - # Convert it to a string - return "".join(xml_parts) - - -def _ConstructContentList(xml_parts, specification, pretty, level=0): - """ Appends the XML parts corresponding to the specification. - - Args: - xml_parts: A list of XML parts to be appended to. - specification: The specification of the element. See EasyXml docs. - pretty: True if we want pretty printing with indents and new lines. - level: Indentation level. - """ - # The first item in a specification is the name of the element. - if pretty: - indentation = " " * level - new_line = "\n" - else: - indentation = "" - new_line = "" - name = specification[0] - if not isinstance(name, str): - raise Exception( - "The first item of an EasyXml specification should be " - "a string. Specification was " + str(specification) - ) - xml_parts.append(indentation + "<" + name) - - # Optionally in second position is a dictionary of the attributes. - rest = specification[1:] - if rest and isinstance(rest[0], dict): - for at, val in sorted(rest[0].items()): - xml_parts.append(f' {at}="{_XmlEscape(val, attr=True)}"') - rest = rest[1:] - if rest: - xml_parts.append(">") - all_strings = reduce(lambda x, y: x and isinstance(y, str), rest, True) - multi_line = not all_strings - if multi_line and new_line: - xml_parts.append(new_line) - for child_spec in rest: - # If it's a string, append a text node. - # Otherwise recurse over that child definition - if isinstance(child_spec, str): - xml_parts.append(_XmlEscape(child_spec)) - else: - _ConstructContentList(xml_parts, child_spec, pretty, level + 1) - if multi_line and indentation: - xml_parts.append(indentation) - xml_parts.append(f"{new_line}") - else: - xml_parts.append("/>%s" % new_line) - - -def WriteXmlIfChanged(content, path, encoding="utf-8", pretty=False, - win32=(sys.platform == "win32")): - """ Writes the XML content to disk, touching the file only if it has changed. - - Args: - content: The structured content to be written. - path: Location of the file. - encoding: The encoding to report on the first line of the XML file. - pretty: True if we want pretty printing with indents and new lines. - """ - xml_string = XmlToString(content, encoding, pretty) - if win32 and os.linesep != "\r\n": - xml_string = xml_string.replace("\n", "\r\n") - - default_encoding = locale.getdefaultlocale()[1] - if default_encoding and default_encoding.upper() != encoding.upper(): - xml_string = xml_string.encode(encoding) - - # Get the old content - try: - with open(path) as file: - existing = file.read() - except OSError: - existing = None - - # It has changed, write it - if existing != xml_string: - with open(path, "wb") as file: - file.write(xml_string) - - -_xml_escape_map = { - '"': """, - "'": "'", - "<": "<", - ">": ">", - "&": "&", - "\n": " ", - "\r": " ", -} - - -_xml_escape_re = re.compile("(%s)" % "|".join(map(re.escape, _xml_escape_map.keys()))) - - -def _XmlEscape(value, attr=False): - """ Escape a string for inclusion in XML.""" - - def replace(match): - m = match.string[match.start() : match.end()] - # don't replace single quotes in attrs - if attr and m == "'": - return m - return _xml_escape_map[m] - - return _xml_escape_re.sub(replace, value) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py deleted file mode 100755 index 342f693..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2011 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" Unit tests for the easy_xml.py file. """ - -import gyp.easy_xml as easy_xml -import unittest - -from io import StringIO - - -class TestSequenceFunctions(unittest.TestCase): - def setUp(self): - self.stderr = StringIO() - - def test_EasyXml_simple(self): - self.assertEqual( - easy_xml.XmlToString(["test"]), - '', - ) - - self.assertEqual( - easy_xml.XmlToString(["test"], encoding="Windows-1252"), - '', - ) - - def test_EasyXml_simple_with_attributes(self): - self.assertEqual( - easy_xml.XmlToString(["test2", {"a": "value1", "b": "value2"}]), - '', - ) - - def test_EasyXml_escaping(self): - original = "'\"\r&\nfoo" - converted = "<test>'" & foo" - converted_apos = converted.replace("'", "'") - self.assertEqual( - easy_xml.XmlToString(["test3", {"a": original}, original]), - '%s' - % (converted, converted_apos), - ) - - def test_EasyXml_pretty(self): - self.assertEqual( - easy_xml.XmlToString( - ["test3", ["GrandParent", ["Parent1", ["Child"]], ["Parent2"]]], - pretty=True, - ), - '\n' - "\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "\n", - ) - - def test_EasyXml_complex(self): - # We want to create: - target = ( - '' - "" - '' - "{D2250C20-3A94-4FB9-AF73-11BC5B73884B}" - "Win32Proj" - "automated_ui_tests" - "" - '' - "' - "Application" - "Unicode" - "" - "" - ) - - xml = easy_xml.XmlToString( - [ - "Project", - [ - "PropertyGroup", - {"Label": "Globals"}, - ["ProjectGuid", "{D2250C20-3A94-4FB9-AF73-11BC5B73884B}"], - ["Keyword", "Win32Proj"], - ["RootNamespace", "automated_ui_tests"], - ], - ["Import", {"Project": "$(VCTargetsPath)\\Microsoft.Cpp.props"}], - [ - "PropertyGroup", - { - "Condition": "'$(Configuration)|$(Platform)'=='Debug|Win32'", - "Label": "Configuration", - }, - ["ConfigurationType", "Application"], - ["CharacterSet", "Unicode"], - ], - ] - ) - self.assertEqual(xml, target) - - -if __name__ == "__main__": - unittest.main() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py deleted file mode 100755 index 1cb9815..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2011 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""These functions are executed via gyp-flock-tool when using the Makefile -generator. Used on systems that don't have a built-in flock.""" - -import fcntl -import os -import struct -import subprocess -import sys - - -def main(args): - executor = FlockTool() - executor.Dispatch(args) - - -class FlockTool: - """This class emulates the 'flock' command.""" - - def Dispatch(self, args): - """Dispatches a string command to a method.""" - if len(args) < 1: - raise Exception("Not enough arguments") - - method = "Exec%s" % self._CommandifyName(args[0]) - getattr(self, method)(*args[1:]) - - def _CommandifyName(self, name_string): - """Transforms a tool name like copy-info-plist to CopyInfoPlist""" - return name_string.title().replace("-", "") - - def ExecFlock(self, lockfile, *cmd_list): - """Emulates the most basic behavior of Linux's flock(1).""" - # Rely on exception handling to report errors. - # Note that the stock python on SunOS has a bug - # where fcntl.flock(fd, LOCK_EX) always fails - # with EBADF, that's why we use this F_SETLK - # hack instead. - fd = os.open(lockfile, os.O_WRONLY | os.O_NOCTTY | os.O_CREAT, 0o666) - if sys.platform.startswith("aix"): - # Python on AIX is compiled with LARGEFILE support, which changes the - # struct size. - op = struct.pack("hhIllqq", fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0) - else: - op = struct.pack("hhllhhl", fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0) - fcntl.fcntl(fd, fcntl.F_SETLK, op) - return subprocess.call(cmd_list) - - -if __name__ == "__main__": - sys.exit(main(sys.argv[1:])) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py deleted file mode 100644 index f15df00..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +++ /dev/null @@ -1,808 +0,0 @@ -# Copyright (c) 2014 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -This script is intended for use as a GYP_GENERATOR. It takes as input (by way of -the generator flag config_path) the path of a json file that dictates the files -and targets to search for. The following keys are supported: -files: list of paths (relative) of the files to search for. -test_targets: unqualified target names to search for. Any target in this list -that depends upon a file in |files| is output regardless of the type of target -or chain of dependencies. -additional_compile_targets: Unqualified targets to search for in addition to -test_targets. Targets in the combined list that depend upon a file in |files| -are not necessarily output. For example, if the target is of type none then the -target is not output (but one of the descendants of the target will be). - -The following is output: -error: only supplied if there is an error. -compile_targets: minimal set of targets that directly or indirectly (for - targets of type none) depend on the files in |files| and is one of the - supplied targets or a target that one of the supplied targets depends on. - The expectation is this set of targets is passed into a build step. This list - always contains the output of test_targets as well. -test_targets: set of targets from the supplied |test_targets| that either - directly or indirectly depend upon a file in |files|. This list if useful - if additional processing needs to be done for certain targets after the - build, such as running tests. -status: outputs one of three values: none of the supplied files were found, - one of the include files changed so that it should be assumed everything - changed (in this case test_targets and compile_targets are not output) or at - least one file was found. -invalid_targets: list of supplied targets that were not found. - -Example: -Consider a graph like the following: - A D - / \ -B C -A depends upon both B and C, A is of type none and B and C are executables. -D is an executable, has no dependencies and nothing depends on it. -If |additional_compile_targets| = ["A"], |test_targets| = ["B", "C"] and -files = ["b.cc", "d.cc"] (B depends upon b.cc and D depends upon d.cc), then -the following is output: -|compile_targets| = ["B"] B must built as it depends upon the changed file b.cc -and the supplied target A depends upon it. A is not output as a build_target -as it is of type none with no rules and actions. -|test_targets| = ["B"] B directly depends upon the change file b.cc. - -Even though the file d.cc, which D depends upon, has changed D is not output -as it was not supplied by way of |additional_compile_targets| or |test_targets|. - -If the generator flag analyzer_output_path is specified, output is written -there. Otherwise output is written to stdout. - -In Gyp the "all" target is shorthand for the root targets in the files passed -to gyp. For example, if file "a.gyp" contains targets "a1" and -"a2", and file "b.gyp" contains targets "b1" and "b2" and "a2" has a dependency -on "b2" and gyp is supplied "a.gyp" then "all" consists of "a1" and "a2". -Notice that "b1" and "b2" are not in the "all" target as "b.gyp" was not -directly supplied to gyp. OTOH if both "a.gyp" and "b.gyp" are supplied to gyp -then the "all" target includes "b1" and "b2". -""" - - -import gyp.common -import json -import os -import posixpath - -debug = False - -found_dependency_string = "Found dependency" -no_dependency_string = "No dependencies" -# Status when it should be assumed that everything has changed. -all_changed_string = "Found dependency (all)" - -# MatchStatus is used indicate if and how a target depends upon the supplied -# sources. -# The target's sources contain one of the supplied paths. -MATCH_STATUS_MATCHES = 1 -# The target has a dependency on another target that contains one of the -# supplied paths. -MATCH_STATUS_MATCHES_BY_DEPENDENCY = 2 -# The target's sources weren't in the supplied paths and none of the target's -# dependencies depend upon a target that matched. -MATCH_STATUS_DOESNT_MATCH = 3 -# The target doesn't contain the source, but the dependent targets have not yet -# been visited to determine a more specific status yet. -MATCH_STATUS_TBD = 4 - -generator_supports_multiple_toolsets = gyp.common.CrossCompileRequested() - -generator_wants_static_library_dependencies_adjusted = False - -generator_default_variables = {} -for dirname in [ - "INTERMEDIATE_DIR", - "SHARED_INTERMEDIATE_DIR", - "PRODUCT_DIR", - "LIB_DIR", - "SHARED_LIB_DIR", -]: - generator_default_variables[dirname] = "!!!" - -for unused in [ - "RULE_INPUT_PATH", - "RULE_INPUT_ROOT", - "RULE_INPUT_NAME", - "RULE_INPUT_DIRNAME", - "RULE_INPUT_EXT", - "EXECUTABLE_PREFIX", - "EXECUTABLE_SUFFIX", - "STATIC_LIB_PREFIX", - "STATIC_LIB_SUFFIX", - "SHARED_LIB_PREFIX", - "SHARED_LIB_SUFFIX", - "CONFIGURATION_NAME", -]: - generator_default_variables[unused] = "" - - -def _ToGypPath(path): - """Converts a path to the format used by gyp.""" - if os.sep == "\\" and os.altsep == "/": - return path.replace("\\", "/") - return path - - -def _ResolveParent(path, base_path_components): - """Resolves |path|, which starts with at least one '../'. Returns an empty - string if the path shouldn't be considered. See _AddSources() for a - description of |base_path_components|.""" - depth = 0 - while path.startswith("../"): - depth += 1 - path = path[3:] - # Relative includes may go outside the source tree. For example, an action may - # have inputs in /usr/include, which are not in the source tree. - if depth > len(base_path_components): - return "" - if depth == len(base_path_components): - return path - return ( - "/".join(base_path_components[0 : len(base_path_components) - depth]) - + "/" - + path - ) - - -def _AddSources(sources, base_path, base_path_components, result): - """Extracts valid sources from |sources| and adds them to |result|. Each - source file is relative to |base_path|, but may contain '..'. To make - resolving '..' easier |base_path_components| contains each of the - directories in |base_path|. Additionally each source may contain variables. - Such sources are ignored as it is assumed dependencies on them are expressed - and tracked in some other means.""" - # NOTE: gyp paths are always posix style. - for source in sources: - if not len(source) or source.startswith("!!!") or source.startswith("$"): - continue - # variable expansion may lead to //. - org_source = source - source = source[0] + source[1:].replace("//", "/") - if source.startswith("../"): - source = _ResolveParent(source, base_path_components) - if len(source): - result.append(source) - continue - result.append(base_path + source) - if debug: - print("AddSource", org_source, result[len(result) - 1]) - - -def _ExtractSourcesFromAction(action, base_path, base_path_components, results): - if "inputs" in action: - _AddSources(action["inputs"], base_path, base_path_components, results) - - -def _ToLocalPath(toplevel_dir, path): - """Converts |path| to a path relative to |toplevel_dir|.""" - if path == toplevel_dir: - return "" - if path.startswith(toplevel_dir + "/"): - return path[len(toplevel_dir) + len("/") :] - return path - - -def _ExtractSources(target, target_dict, toplevel_dir): - # |target| is either absolute or relative and in the format of the OS. Gyp - # source paths are always posix. Convert |target| to a posix path relative to - # |toplevel_dir_|. This is done to make it easy to build source paths. - base_path = posixpath.dirname(_ToLocalPath(toplevel_dir, _ToGypPath(target))) - base_path_components = base_path.split("/") - - # Add a trailing '/' so that _AddSources() can easily build paths. - if len(base_path): - base_path += "/" - - if debug: - print("ExtractSources", target, base_path) - - results = [] - if "sources" in target_dict: - _AddSources(target_dict["sources"], base_path, base_path_components, results) - # Include the inputs from any actions. Any changes to these affect the - # resulting output. - if "actions" in target_dict: - for action in target_dict["actions"]: - _ExtractSourcesFromAction(action, base_path, base_path_components, results) - if "rules" in target_dict: - for rule in target_dict["rules"]: - _ExtractSourcesFromAction(rule, base_path, base_path_components, results) - - return results - - -class Target: - """Holds information about a particular target: - deps: set of Targets this Target depends upon. This is not recursive, only the - direct dependent Targets. - match_status: one of the MatchStatus values. - back_deps: set of Targets that have a dependency on this Target. - visited: used during iteration to indicate whether we've visited this target. - This is used for two iterations, once in building the set of Targets and - again in _GetBuildTargets(). - name: fully qualified name of the target. - requires_build: True if the target type is such that it needs to be built. - See _DoesTargetTypeRequireBuild for details. - added_to_compile_targets: used when determining if the target was added to the - set of targets that needs to be built. - in_roots: true if this target is a descendant of one of the root nodes. - is_executable: true if the type of target is executable. - is_static_library: true if the type of target is static_library. - is_or_has_linked_ancestor: true if the target does a link (eg executable), or - if there is a target in back_deps that does a link.""" - - def __init__(self, name): - self.deps = set() - self.match_status = MATCH_STATUS_TBD - self.back_deps = set() - self.name = name - # TODO(sky): I don't like hanging this off Target. This state is specific - # to certain functions and should be isolated there. - self.visited = False - self.requires_build = False - self.added_to_compile_targets = False - self.in_roots = False - self.is_executable = False - self.is_static_library = False - self.is_or_has_linked_ancestor = False - - -class Config: - """Details what we're looking for - files: set of files to search for - targets: see file description for details.""" - - def __init__(self): - self.files = [] - self.targets = set() - self.additional_compile_target_names = set() - self.test_target_names = set() - - def Init(self, params): - """Initializes Config. This is a separate method as it raises an exception - if there is a parse error.""" - generator_flags = params.get("generator_flags", {}) - config_path = generator_flags.get("config_path", None) - if not config_path: - return - try: - f = open(config_path) - config = json.load(f) - f.close() - except OSError: - raise Exception("Unable to open file " + config_path) - except ValueError as e: - raise Exception("Unable to parse config file " + config_path + str(e)) - if not isinstance(config, dict): - raise Exception("config_path must be a JSON file containing a dictionary") - self.files = config.get("files", []) - self.additional_compile_target_names = set( - config.get("additional_compile_targets", []) - ) - self.test_target_names = set(config.get("test_targets", [])) - - -def _WasBuildFileModified(build_file, data, files, toplevel_dir): - """Returns true if the build file |build_file| is either in |files| or - one of the files included by |build_file| is in |files|. |toplevel_dir| is - the root of the source tree.""" - if _ToLocalPath(toplevel_dir, _ToGypPath(build_file)) in files: - if debug: - print("gyp file modified", build_file) - return True - - # First element of included_files is the file itself. - if len(data[build_file]["included_files"]) <= 1: - return False - - for include_file in data[build_file]["included_files"][1:]: - # |included_files| are relative to the directory of the |build_file|. - rel_include_file = _ToGypPath( - gyp.common.UnrelativePath(include_file, build_file) - ) - if _ToLocalPath(toplevel_dir, rel_include_file) in files: - if debug: - print( - "included gyp file modified, gyp_file=", - build_file, - "included file=", - rel_include_file, - ) - return True - return False - - -def _GetOrCreateTargetByName(targets, target_name): - """Creates or returns the Target at targets[target_name]. If there is no - Target for |target_name| one is created. Returns a tuple of whether a new - Target was created and the Target.""" - if target_name in targets: - return False, targets[target_name] - target = Target(target_name) - targets[target_name] = target - return True, target - - -def _DoesTargetTypeRequireBuild(target_dict): - """Returns true if the target type is such that it needs to be built.""" - # If a 'none' target has rules or actions we assume it requires a build. - return bool( - target_dict["type"] != "none" - or target_dict.get("actions") - or target_dict.get("rules") - ) - - -def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, build_files): - """Returns a tuple of the following: - . A dictionary mapping from fully qualified name to Target. - . A list of the targets that have a source file in |files|. - . Targets that constitute the 'all' target. See description at top of file - for details on the 'all' target. - This sets the |match_status| of the targets that contain any of the source - files in |files| to MATCH_STATUS_MATCHES. - |toplevel_dir| is the root of the source tree.""" - # Maps from target name to Target. - name_to_target = {} - - # Targets that matched. - matching_targets = [] - - # Queue of targets to visit. - targets_to_visit = target_list[:] - - # Maps from build file to a boolean indicating whether the build file is in - # |files|. - build_file_in_files = {} - - # Root targets across all files. - roots = set() - - # Set of Targets in |build_files|. - build_file_targets = set() - - while len(targets_to_visit) > 0: - target_name = targets_to_visit.pop() - created_target, target = _GetOrCreateTargetByName(name_to_target, target_name) - if created_target: - roots.add(target) - elif target.visited: - continue - - target.visited = True - target.requires_build = _DoesTargetTypeRequireBuild(target_dicts[target_name]) - target_type = target_dicts[target_name]["type"] - target.is_executable = target_type == "executable" - target.is_static_library = target_type == "static_library" - target.is_or_has_linked_ancestor = ( - target_type == "executable" or target_type == "shared_library" - ) - - build_file = gyp.common.ParseQualifiedTarget(target_name)[0] - if build_file not in build_file_in_files: - build_file_in_files[build_file] = _WasBuildFileModified( - build_file, data, files, toplevel_dir - ) - - if build_file in build_files: - build_file_targets.add(target) - - # If a build file (or any of its included files) is modified we assume all - # targets in the file are modified. - if build_file_in_files[build_file]: - print("matching target from modified build file", target_name) - target.match_status = MATCH_STATUS_MATCHES - matching_targets.append(target) - else: - sources = _ExtractSources( - target_name, target_dicts[target_name], toplevel_dir - ) - for source in sources: - if _ToGypPath(os.path.normpath(source)) in files: - print("target", target_name, "matches", source) - target.match_status = MATCH_STATUS_MATCHES - matching_targets.append(target) - break - - # Add dependencies to visit as well as updating back pointers for deps. - for dep in target_dicts[target_name].get("dependencies", []): - targets_to_visit.append(dep) - - created_dep_target, dep_target = _GetOrCreateTargetByName( - name_to_target, dep - ) - if not created_dep_target: - roots.discard(dep_target) - - target.deps.add(dep_target) - dep_target.back_deps.add(target) - - return name_to_target, matching_targets, roots & build_file_targets - - -def _GetUnqualifiedToTargetMapping(all_targets, to_find): - """Returns a tuple of the following: - . mapping (dictionary) from unqualified name to Target for all the - Targets in |to_find|. - . any target names not found. If this is empty all targets were found.""" - result = {} - if not to_find: - return {}, [] - to_find = set(to_find) - for target_name in all_targets.keys(): - extracted = gyp.common.ParseQualifiedTarget(target_name) - if len(extracted) > 1 and extracted[1] in to_find: - to_find.remove(extracted[1]) - result[extracted[1]] = all_targets[target_name] - if not to_find: - return result, [] - return result, [x for x in to_find] - - -def _DoesTargetDependOnMatchingTargets(target): - """Returns true if |target| or any of its dependencies is one of the - targets containing the files supplied as input to analyzer. This updates - |matches| of the Targets as it recurses. - target: the Target to look for.""" - if target.match_status == MATCH_STATUS_DOESNT_MATCH: - return False - if ( - target.match_status == MATCH_STATUS_MATCHES - or target.match_status == MATCH_STATUS_MATCHES_BY_DEPENDENCY - ): - return True - for dep in target.deps: - if _DoesTargetDependOnMatchingTargets(dep): - target.match_status = MATCH_STATUS_MATCHES_BY_DEPENDENCY - print("\t", target.name, "matches by dep", dep.name) - return True - target.match_status = MATCH_STATUS_DOESNT_MATCH - return False - - -def _GetTargetsDependingOnMatchingTargets(possible_targets): - """Returns the list of Targets in |possible_targets| that depend (either - directly on indirectly) on at least one of the targets containing the files - supplied as input to analyzer. - possible_targets: targets to search from.""" - found = [] - print("Targets that matched by dependency:") - for target in possible_targets: - if _DoesTargetDependOnMatchingTargets(target): - found.append(target) - return found - - -def _AddCompileTargets(target, roots, add_if_no_ancestor, result): - """Recurses through all targets that depend on |target|, adding all targets - that need to be built (and are in |roots|) to |result|. - roots: set of root targets. - add_if_no_ancestor: If true and there are no ancestors of |target| then add - |target| to |result|. |target| must still be in |roots|. - result: targets that need to be built are added here.""" - if target.visited: - return - - target.visited = True - target.in_roots = target in roots - - for back_dep_target in target.back_deps: - _AddCompileTargets(back_dep_target, roots, False, result) - target.added_to_compile_targets |= back_dep_target.added_to_compile_targets - target.in_roots |= back_dep_target.in_roots - target.is_or_has_linked_ancestor |= back_dep_target.is_or_has_linked_ancestor - - # Always add 'executable' targets. Even though they may be built by other - # targets that depend upon them it makes detection of what is going to be - # built easier. - # And always add static_libraries that have no dependencies on them from - # linkables. This is necessary as the other dependencies on them may be - # static libraries themselves, which are not compile time dependencies. - if target.in_roots and ( - target.is_executable - or ( - not target.added_to_compile_targets - and (add_if_no_ancestor or target.requires_build) - ) - or ( - target.is_static_library - and add_if_no_ancestor - and not target.is_or_has_linked_ancestor - ) - ): - print( - "\t\tadding to compile targets", - target.name, - "executable", - target.is_executable, - "added_to_compile_targets", - target.added_to_compile_targets, - "add_if_no_ancestor", - add_if_no_ancestor, - "requires_build", - target.requires_build, - "is_static_library", - target.is_static_library, - "is_or_has_linked_ancestor", - target.is_or_has_linked_ancestor, - ) - result.add(target) - target.added_to_compile_targets = True - - -def _GetCompileTargets(matching_targets, supplied_targets): - """Returns the set of Targets that require a build. - matching_targets: targets that changed and need to be built. - supplied_targets: set of targets supplied to analyzer to search from.""" - result = set() - for target in matching_targets: - print("finding compile targets for match", target.name) - _AddCompileTargets(target, supplied_targets, True, result) - return result - - -def _WriteOutput(params, **values): - """Writes the output, either to stdout or a file is specified.""" - if "error" in values: - print("Error:", values["error"]) - if "status" in values: - print(values["status"]) - if "targets" in values: - values["targets"].sort() - print("Supplied targets that depend on changed files:") - for target in values["targets"]: - print("\t", target) - if "invalid_targets" in values: - values["invalid_targets"].sort() - print("The following targets were not found:") - for target in values["invalid_targets"]: - print("\t", target) - if "build_targets" in values: - values["build_targets"].sort() - print("Targets that require a build:") - for target in values["build_targets"]: - print("\t", target) - if "compile_targets" in values: - values["compile_targets"].sort() - print("Targets that need to be built:") - for target in values["compile_targets"]: - print("\t", target) - if "test_targets" in values: - values["test_targets"].sort() - print("Test targets:") - for target in values["test_targets"]: - print("\t", target) - - output_path = params.get("generator_flags", {}).get("analyzer_output_path", None) - if not output_path: - print(json.dumps(values)) - return - try: - f = open(output_path, "w") - f.write(json.dumps(values) + "\n") - f.close() - except OSError as e: - print("Error writing to output file", output_path, str(e)) - - -def _WasGypIncludeFileModified(params, files): - """Returns true if one of the files in |files| is in the set of included - files.""" - if params["options"].includes: - for include in params["options"].includes: - if _ToGypPath(os.path.normpath(include)) in files: - print("Include file modified, assuming all changed", include) - return True - return False - - -def _NamesNotIn(names, mapping): - """Returns a list of the values in |names| that are not in |mapping|.""" - return [name for name in names if name not in mapping] - - -def _LookupTargets(names, mapping): - """Returns a list of the mapping[name] for each value in |names| that is in - |mapping|.""" - return [mapping[name] for name in names if name in mapping] - - -def CalculateVariables(default_variables, params): - """Calculate additional variables for use in the build (called by gyp).""" - flavor = gyp.common.GetFlavor(params) - if flavor == "mac": - default_variables.setdefault("OS", "mac") - elif flavor == "win": - default_variables.setdefault("OS", "win") - gyp.msvs_emulation.CalculateCommonVariables(default_variables, params) - else: - operating_system = flavor - if flavor == "android": - operating_system = "linux" # Keep this legacy behavior for now. - default_variables.setdefault("OS", operating_system) - - -class TargetCalculator: - """Calculates the matching test_targets and matching compile_targets.""" - - def __init__( - self, - files, - additional_compile_target_names, - test_target_names, - data, - target_list, - target_dicts, - toplevel_dir, - build_files, - ): - self._additional_compile_target_names = set(additional_compile_target_names) - self._test_target_names = set(test_target_names) - ( - self._name_to_target, - self._changed_targets, - self._root_targets, - ) = _GenerateTargets( - data, target_list, target_dicts, toplevel_dir, frozenset(files), build_files - ) - ( - self._unqualified_mapping, - self.invalid_targets, - ) = _GetUnqualifiedToTargetMapping( - self._name_to_target, self._supplied_target_names_no_all() - ) - - def _supplied_target_names(self): - return self._additional_compile_target_names | self._test_target_names - - def _supplied_target_names_no_all(self): - """Returns the supplied test targets without 'all'.""" - result = self._supplied_target_names() - result.discard("all") - return result - - def is_build_impacted(self): - """Returns true if the supplied files impact the build at all.""" - return self._changed_targets - - def find_matching_test_target_names(self): - """Returns the set of output test targets.""" - assert self.is_build_impacted() - # Find the test targets first. 'all' is special cased to mean all the - # root targets. To deal with all the supplied |test_targets| are expanded - # to include the root targets during lookup. If any of the root targets - # match, we remove it and replace it with 'all'. - test_target_names_no_all = set(self._test_target_names) - test_target_names_no_all.discard("all") - test_targets_no_all = _LookupTargets( - test_target_names_no_all, self._unqualified_mapping - ) - test_target_names_contains_all = "all" in self._test_target_names - if test_target_names_contains_all: - test_targets = [ - x for x in (set(test_targets_no_all) | set(self._root_targets)) - ] - else: - test_targets = [x for x in test_targets_no_all] - print("supplied test_targets") - for target_name in self._test_target_names: - print("\t", target_name) - print("found test_targets") - for target in test_targets: - print("\t", target.name) - print("searching for matching test targets") - matching_test_targets = _GetTargetsDependingOnMatchingTargets(test_targets) - matching_test_targets_contains_all = test_target_names_contains_all and set( - matching_test_targets - ) & set(self._root_targets) - if matching_test_targets_contains_all: - # Remove any of the targets for all that were not explicitly supplied, - # 'all' is subsequentely added to the matching names below. - matching_test_targets = [ - x for x in (set(matching_test_targets) & set(test_targets_no_all)) - ] - print("matched test_targets") - for target in matching_test_targets: - print("\t", target.name) - matching_target_names = [ - gyp.common.ParseQualifiedTarget(target.name)[1] - for target in matching_test_targets - ] - if matching_test_targets_contains_all: - matching_target_names.append("all") - print("\tall") - return matching_target_names - - def find_matching_compile_target_names(self): - """Returns the set of output compile targets.""" - assert self.is_build_impacted() - # Compile targets are found by searching up from changed targets. - # Reset the visited status for _GetBuildTargets. - for target in self._name_to_target.values(): - target.visited = False - - supplied_targets = _LookupTargets( - self._supplied_target_names_no_all(), self._unqualified_mapping - ) - if "all" in self._supplied_target_names(): - supplied_targets = [ - x for x in (set(supplied_targets) | set(self._root_targets)) - ] - print("Supplied test_targets & compile_targets") - for target in supplied_targets: - print("\t", target.name) - print("Finding compile targets") - compile_targets = _GetCompileTargets(self._changed_targets, supplied_targets) - return [ - gyp.common.ParseQualifiedTarget(target.name)[1] - for target in compile_targets - ] - - -def GenerateOutput(target_list, target_dicts, data, params): - """Called by gyp as the final stage. Outputs results.""" - config = Config() - try: - config.Init(params) - - if not config.files: - raise Exception( - "Must specify files to analyze via config_path generator " "flag" - ) - - toplevel_dir = _ToGypPath(os.path.abspath(params["options"].toplevel_dir)) - if debug: - print("toplevel_dir", toplevel_dir) - - if _WasGypIncludeFileModified(params, config.files): - result_dict = { - "status": all_changed_string, - "test_targets": list(config.test_target_names), - "compile_targets": list( - config.additional_compile_target_names | config.test_target_names - ), - } - _WriteOutput(params, **result_dict) - return - - calculator = TargetCalculator( - config.files, - config.additional_compile_target_names, - config.test_target_names, - data, - target_list, - target_dicts, - toplevel_dir, - params["build_files"], - ) - if not calculator.is_build_impacted(): - result_dict = { - "status": no_dependency_string, - "test_targets": [], - "compile_targets": [], - } - if calculator.invalid_targets: - result_dict["invalid_targets"] = calculator.invalid_targets - _WriteOutput(params, **result_dict) - return - - test_target_names = calculator.find_matching_test_target_names() - compile_target_names = calculator.find_matching_compile_target_names() - found_at_least_one_target = compile_target_names or test_target_names - result_dict = { - "test_targets": test_target_names, - "status": found_dependency_string - if found_at_least_one_target - else no_dependency_string, - "compile_targets": list(set(compile_target_names) | set(test_target_names)), - } - if calculator.invalid_targets: - result_dict["invalid_targets"] = calculator.invalid_targets - _WriteOutput(params, **result_dict) - - except Exception as e: - _WriteOutput(params, error=str(e)) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py deleted file mode 100644 index cdf1a48..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +++ /dev/null @@ -1,1173 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# Notes: -# -# This generates makefiles suitable for inclusion into the Android build system -# via an Android.mk file. It is based on make.py, the standard makefile -# generator. -# -# The code below generates a separate .mk file for each target, but -# all are sourced by the top-level GypAndroid.mk. This means that all -# variables in .mk-files clobber one another, and furthermore that any -# variables set potentially clash with other Android build system variables. -# Try to avoid setting global variables where possible. - - -import gyp -import gyp.common -import gyp.generator.make as make # Reuse global functions from make backend. -import os -import re -import subprocess - -generator_default_variables = { - "OS": "android", - "EXECUTABLE_PREFIX": "", - "EXECUTABLE_SUFFIX": "", - "STATIC_LIB_PREFIX": "lib", - "SHARED_LIB_PREFIX": "lib", - "STATIC_LIB_SUFFIX": ".a", - "SHARED_LIB_SUFFIX": ".so", - "INTERMEDIATE_DIR": "$(gyp_intermediate_dir)", - "SHARED_INTERMEDIATE_DIR": "$(gyp_shared_intermediate_dir)", - "PRODUCT_DIR": "$(gyp_shared_intermediate_dir)", - "SHARED_LIB_DIR": "$(builddir)/lib.$(TOOLSET)", - "LIB_DIR": "$(obj).$(TOOLSET)", - "RULE_INPUT_ROOT": "%(INPUT_ROOT)s", # This gets expanded by Python. - "RULE_INPUT_DIRNAME": "%(INPUT_DIRNAME)s", # This gets expanded by Python. - "RULE_INPUT_PATH": "$(RULE_SOURCES)", - "RULE_INPUT_EXT": "$(suffix $<)", - "RULE_INPUT_NAME": "$(notdir $<)", - "CONFIGURATION_NAME": "$(GYP_CONFIGURATION)", -} - -# Make supports multiple toolsets -generator_supports_multiple_toolsets = True - - -# Generator-specific gyp specs. -generator_additional_non_configuration_keys = [ - # Boolean to declare that this target does not want its name mangled. - "android_unmangled_name", - # Map of android build system variables to set. - "aosp_build_settings", -] -generator_additional_path_sections = [] -generator_extra_sources_for_rules = [] - - -ALL_MODULES_FOOTER = """\ -# "gyp_all_modules" is a concatenation of the "gyp_all_modules" targets from -# all the included sub-makefiles. This is just here to clarify. -gyp_all_modules: -""" - -header = """\ -# This file is generated by gyp; do not edit. - -""" - -# Map gyp target types to Android module classes. -MODULE_CLASSES = { - "static_library": "STATIC_LIBRARIES", - "shared_library": "SHARED_LIBRARIES", - "executable": "EXECUTABLES", -} - - -def IsCPPExtension(ext): - return make.COMPILABLE_EXTENSIONS.get(ext) == "cxx" - - -def Sourceify(path): - """Convert a path to its source directory form. The Android backend does not - support options.generator_output, so this function is a noop.""" - return path - - -# Map from qualified target to path to output. -# For Android, the target of these maps is a tuple ('static', 'modulename'), -# ('dynamic', 'modulename'), or ('path', 'some/path') instead of a string, -# since we link by module. -target_outputs = {} -# Map from qualified target to any linkable output. A subset -# of target_outputs. E.g. when mybinary depends on liba, we want to -# include liba in the linker line; when otherbinary depends on -# mybinary, we just want to build mybinary first. -target_link_deps = {} - - -class AndroidMkWriter: - """AndroidMkWriter packages up the writing of one target-specific Android.mk. - - Its only real entry point is Write(), and is mostly used for namespacing. - """ - - def __init__(self, android_top_dir): - self.android_top_dir = android_top_dir - - def Write( - self, - qualified_target, - relative_target, - base_path, - output_filename, - spec, - configs, - part_of_all, - write_alias_target, - sdk_version, - ): - """The main entry point: writes a .mk file for a single target. - - Arguments: - qualified_target: target we're generating - relative_target: qualified target name relative to the root - base_path: path relative to source root we're building in, used to resolve - target-relative paths - output_filename: output .mk file name to write - spec, configs: gyp info - part_of_all: flag indicating this target is part of 'all' - write_alias_target: flag indicating whether to create short aliases for - this target - sdk_version: what to emit for LOCAL_SDK_VERSION in output - """ - gyp.common.EnsureDirExists(output_filename) - - self.fp = open(output_filename, "w") - - self.fp.write(header) - - self.qualified_target = qualified_target - self.relative_target = relative_target - self.path = base_path - self.target = spec["target_name"] - self.type = spec["type"] - self.toolset = spec["toolset"] - - deps, link_deps = self.ComputeDeps(spec) - - # Some of the generation below can add extra output, sources, or - # link dependencies. All of the out params of the functions that - # follow use names like extra_foo. - extra_outputs = [] - extra_sources = [] - - self.android_class = MODULE_CLASSES.get(self.type, "GYP") - self.android_module = self.ComputeAndroidModule(spec) - (self.android_stem, self.android_suffix) = self.ComputeOutputParts(spec) - self.output = self.output_binary = self.ComputeOutput(spec) - - # Standard header. - self.WriteLn("include $(CLEAR_VARS)\n") - - # Module class and name. - self.WriteLn("LOCAL_MODULE_CLASS := " + self.android_class) - self.WriteLn("LOCAL_MODULE := " + self.android_module) - # Only emit LOCAL_MODULE_STEM if it's different to LOCAL_MODULE. - # The library module classes fail if the stem is set. ComputeOutputParts - # makes sure that stem == modulename in these cases. - if self.android_stem != self.android_module: - self.WriteLn("LOCAL_MODULE_STEM := " + self.android_stem) - self.WriteLn("LOCAL_MODULE_SUFFIX := " + self.android_suffix) - if self.toolset == "host": - self.WriteLn("LOCAL_IS_HOST_MODULE := true") - self.WriteLn("LOCAL_MULTILIB := $(GYP_HOST_MULTILIB)") - elif sdk_version > 0: - self.WriteLn( - "LOCAL_MODULE_TARGET_ARCH := " "$(TARGET_$(GYP_VAR_PREFIX)ARCH)" - ) - self.WriteLn("LOCAL_SDK_VERSION := %s" % sdk_version) - - # Grab output directories; needed for Actions and Rules. - if self.toolset == "host": - self.WriteLn( - "gyp_intermediate_dir := " - "$(call local-intermediates-dir,,$(GYP_HOST_VAR_PREFIX))" - ) - else: - self.WriteLn( - "gyp_intermediate_dir := " - "$(call local-intermediates-dir,,$(GYP_VAR_PREFIX))" - ) - self.WriteLn( - "gyp_shared_intermediate_dir := " - "$(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))" - ) - self.WriteLn() - - # List files this target depends on so that actions/rules/copies/sources - # can depend on the list. - # TODO: doesn't pull in things through transitive link deps; needed? - target_dependencies = [x[1] for x in deps if x[0] == "path"] - self.WriteLn("# Make sure our deps are built first.") - self.WriteList( - target_dependencies, "GYP_TARGET_DEPENDENCIES", local_pathify=True - ) - - # Actions must come first, since they can generate more OBJs for use below. - if "actions" in spec: - self.WriteActions(spec["actions"], extra_sources, extra_outputs) - - # Rules must be early like actions. - if "rules" in spec: - self.WriteRules(spec["rules"], extra_sources, extra_outputs) - - if "copies" in spec: - self.WriteCopies(spec["copies"], extra_outputs) - - # GYP generated outputs. - self.WriteList(extra_outputs, "GYP_GENERATED_OUTPUTS", local_pathify=True) - - # Set LOCAL_ADDITIONAL_DEPENDENCIES so that Android's build rules depend - # on both our dependency targets and our generated files. - self.WriteLn("# Make sure our deps and generated files are built first.") - self.WriteLn( - "LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) " - "$(GYP_GENERATED_OUTPUTS)" - ) - self.WriteLn() - - # Sources. - if spec.get("sources", []) or extra_sources: - self.WriteSources(spec, configs, extra_sources) - - self.WriteTarget( - spec, configs, deps, link_deps, part_of_all, write_alias_target - ) - - # Update global list of target outputs, used in dependency tracking. - target_outputs[qualified_target] = ("path", self.output_binary) - - # Update global list of link dependencies. - if self.type == "static_library": - target_link_deps[qualified_target] = ("static", self.android_module) - elif self.type == "shared_library": - target_link_deps[qualified_target] = ("shared", self.android_module) - - self.fp.close() - return self.android_module - - def WriteActions(self, actions, extra_sources, extra_outputs): - """Write Makefile code for any 'actions' from the gyp input. - - extra_sources: a list that will be filled in with newly generated source - files, if any - extra_outputs: a list that will be filled in with any outputs of these - actions (used to make other pieces dependent on these - actions) - """ - for action in actions: - name = make.StringToMakefileVariable( - "{}_{}".format(self.relative_target, action["action_name"]) - ) - self.WriteLn('### Rules for action "%s":' % action["action_name"]) - inputs = action["inputs"] - outputs = action["outputs"] - - # Build up a list of outputs. - # Collect the output dirs we'll need. - dirs = set() - for out in outputs: - if not out.startswith("$"): - print( - 'WARNING: Action for target "%s" writes output to local path ' - '"%s".' % (self.target, out) - ) - dir = os.path.split(out)[0] - if dir: - dirs.add(dir) - if int(action.get("process_outputs_as_sources", False)): - extra_sources += outputs - - # Prepare the actual command. - command = gyp.common.EncodePOSIXShellList(action["action"]) - if "message" in action: - quiet_cmd = "Gyp action: %s ($@)" % action["message"] - else: - quiet_cmd = "Gyp action: %s ($@)" % name - if len(dirs) > 0: - command = "mkdir -p %s" % " ".join(dirs) + "; " + command - - cd_action = "cd $(gyp_local_path)/%s; " % self.path - command = cd_action + command - - # The makefile rules are all relative to the top dir, but the gyp actions - # are defined relative to their containing dir. This replaces the gyp_* - # variables for the action rule with an absolute version so that the - # output goes in the right place. - # Only write the gyp_* rules for the "primary" output (:1); - # it's superfluous for the "extra outputs", and this avoids accidentally - # writing duplicate dummy rules for those outputs. - main_output = make.QuoteSpaces(self.LocalPathify(outputs[0])) - self.WriteLn("%s: gyp_local_path := $(LOCAL_PATH)" % main_output) - self.WriteLn("%s: gyp_var_prefix := $(GYP_VAR_PREFIX)" % main_output) - self.WriteLn( - "%s: gyp_intermediate_dir := " - "$(abspath $(gyp_intermediate_dir))" % main_output - ) - self.WriteLn( - "%s: gyp_shared_intermediate_dir := " - "$(abspath $(gyp_shared_intermediate_dir))" % main_output - ) - - # Android's envsetup.sh adds a number of directories to the path including - # the built host binary directory. This causes actions/rules invoked by - # gyp to sometimes use these instead of system versions, e.g. bison. - # The built host binaries may not be suitable, and can cause errors. - # So, we remove them from the PATH using the ANDROID_BUILD_PATHS variable - # set by envsetup. - self.WriteLn( - "%s: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))" - % main_output - ) - - # Don't allow spaces in input/output filenames, but make an exception for - # filenames which start with '$(' since it's okay for there to be spaces - # inside of make function/macro invocations. - for input in inputs: - if not input.startswith("$(") and " " in input: - raise gyp.common.GypError( - 'Action input filename "%s" in target %s contains a space' - % (input, self.target) - ) - for output in outputs: - if not output.startswith("$(") and " " in output: - raise gyp.common.GypError( - 'Action output filename "%s" in target %s contains a space' - % (output, self.target) - ) - - self.WriteLn( - "%s: %s $(GYP_TARGET_DEPENDENCIES)" - % (main_output, " ".join(map(self.LocalPathify, inputs))) - ) - self.WriteLn('\t@echo "%s"' % quiet_cmd) - self.WriteLn("\t$(hide)%s\n" % command) - for output in outputs[1:]: - # Make each output depend on the main output, with an empty command - # to force make to notice that the mtime has changed. - self.WriteLn(f"{self.LocalPathify(output)}: {main_output} ;") - - extra_outputs += outputs - self.WriteLn() - - self.WriteLn() - - def WriteRules(self, rules, extra_sources, extra_outputs): - """Write Makefile code for any 'rules' from the gyp input. - - extra_sources: a list that will be filled in with newly generated source - files, if any - extra_outputs: a list that will be filled in with any outputs of these - rules (used to make other pieces dependent on these rules) - """ - if len(rules) == 0: - return - - for rule in rules: - if len(rule.get("rule_sources", [])) == 0: - continue - name = make.StringToMakefileVariable( - "{}_{}".format(self.relative_target, rule["rule_name"]) - ) - self.WriteLn('\n### Generated for rule "%s":' % name) - self.WriteLn('# "%s":' % rule) - - inputs = rule.get("inputs") - for rule_source in rule.get("rule_sources", []): - (rule_source_dirname, rule_source_basename) = os.path.split(rule_source) - (rule_source_root, rule_source_ext) = os.path.splitext( - rule_source_basename - ) - - outputs = [ - self.ExpandInputRoot(out, rule_source_root, rule_source_dirname) - for out in rule["outputs"] - ] - - dirs = set() - for out in outputs: - if not out.startswith("$"): - print( - "WARNING: Rule for target %s writes output to local path %s" - % (self.target, out) - ) - dir = os.path.dirname(out) - if dir: - dirs.add(dir) - extra_outputs += outputs - if int(rule.get("process_outputs_as_sources", False)): - extra_sources.extend(outputs) - - components = [] - for component in rule["action"]: - component = self.ExpandInputRoot( - component, rule_source_root, rule_source_dirname - ) - if "$(RULE_SOURCES)" in component: - component = component.replace("$(RULE_SOURCES)", rule_source) - components.append(component) - - command = gyp.common.EncodePOSIXShellList(components) - cd_action = "cd $(gyp_local_path)/%s; " % self.path - command = cd_action + command - if dirs: - command = "mkdir -p %s" % " ".join(dirs) + "; " + command - - # We set up a rule to build the first output, and then set up - # a rule for each additional output to depend on the first. - outputs = map(self.LocalPathify, outputs) - main_output = outputs[0] - self.WriteLn("%s: gyp_local_path := $(LOCAL_PATH)" % main_output) - self.WriteLn("%s: gyp_var_prefix := $(GYP_VAR_PREFIX)" % main_output) - self.WriteLn( - "%s: gyp_intermediate_dir := " - "$(abspath $(gyp_intermediate_dir))" % main_output - ) - self.WriteLn( - "%s: gyp_shared_intermediate_dir := " - "$(abspath $(gyp_shared_intermediate_dir))" % main_output - ) - - # See explanation in WriteActions. - self.WriteLn( - "%s: export PATH := " - "$(subst $(ANDROID_BUILD_PATHS),,$(PATH))" % main_output - ) - - main_output_deps = self.LocalPathify(rule_source) - if inputs: - main_output_deps += " " - main_output_deps += " ".join([self.LocalPathify(f) for f in inputs]) - - self.WriteLn( - "%s: %s $(GYP_TARGET_DEPENDENCIES)" - % (main_output, main_output_deps) - ) - self.WriteLn("\t%s\n" % command) - for output in outputs[1:]: - # Make each output depend on the main output, with an empty command - # to force make to notice that the mtime has changed. - self.WriteLn(f"{output}: {main_output} ;") - self.WriteLn() - - self.WriteLn() - - def WriteCopies(self, copies, extra_outputs): - """Write Makefile code for any 'copies' from the gyp input. - - extra_outputs: a list that will be filled in with any outputs of this action - (used to make other pieces dependent on this action) - """ - self.WriteLn("### Generated for copy rule.") - - variable = make.StringToMakefileVariable(self.relative_target + "_copies") - outputs = [] - for copy in copies: - for path in copy["files"]: - # The Android build system does not allow generation of files into the - # source tree. The destination should start with a variable, which will - # typically be $(gyp_intermediate_dir) or - # $(gyp_shared_intermediate_dir). Note that we can't use an assertion - # because some of the gyp tests depend on this. - if not copy["destination"].startswith("$"): - print( - "WARNING: Copy rule for target %s writes output to " - "local path %s" % (self.target, copy["destination"]) - ) - - # LocalPathify() calls normpath, stripping trailing slashes. - path = Sourceify(self.LocalPathify(path)) - filename = os.path.split(path)[1] - output = Sourceify( - self.LocalPathify(os.path.join(copy["destination"], filename)) - ) - - self.WriteLn(f"{output}: {path} $(GYP_TARGET_DEPENDENCIES) | $(ACP)") - self.WriteLn("\t@echo Copying: $@") - self.WriteLn("\t$(hide) mkdir -p $(dir $@)") - self.WriteLn("\t$(hide) $(ACP) -rpf $< $@") - self.WriteLn() - outputs.append(output) - self.WriteLn( - "{} = {}".format(variable, " ".join(map(make.QuoteSpaces, outputs))) - ) - extra_outputs.append("$(%s)" % variable) - self.WriteLn() - - def WriteSourceFlags(self, spec, configs): - """Write out the flags and include paths used to compile source files for - the current target. - - Args: - spec, configs: input from gyp. - """ - for configname, config in sorted(configs.items()): - extracted_includes = [] - - self.WriteLn("\n# Flags passed to both C and C++ files.") - cflags, includes_from_cflags = self.ExtractIncludesFromCFlags( - config.get("cflags", []) + config.get("cflags_c", []) - ) - extracted_includes.extend(includes_from_cflags) - self.WriteList(cflags, "MY_CFLAGS_%s" % configname) - - self.WriteList( - config.get("defines"), - "MY_DEFS_%s" % configname, - prefix="-D", - quoter=make.EscapeCppDefine, - ) - - self.WriteLn("\n# Include paths placed before CFLAGS/CPPFLAGS") - includes = list(config.get("include_dirs", [])) - includes.extend(extracted_includes) - includes = map(Sourceify, map(self.LocalPathify, includes)) - includes = self.NormalizeIncludePaths(includes) - self.WriteList(includes, "LOCAL_C_INCLUDES_%s" % configname) - - self.WriteLn("\n# Flags passed to only C++ (and not C) files.") - self.WriteList(config.get("cflags_cc"), "LOCAL_CPPFLAGS_%s" % configname) - - self.WriteLn( - "\nLOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) " - "$(MY_DEFS_$(GYP_CONFIGURATION))" - ) - # Undefine ANDROID for host modules - # TODO: the source code should not use macro ANDROID to tell if it's host - # or target module. - if self.toolset == "host": - self.WriteLn("# Undefine ANDROID for host modules") - self.WriteLn("LOCAL_CFLAGS += -UANDROID") - self.WriteLn( - "LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) " - "$(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))" - ) - self.WriteLn("LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))") - # Android uses separate flags for assembly file invocations, but gyp expects - # the same CFLAGS to be applied: - self.WriteLn("LOCAL_ASFLAGS := $(LOCAL_CFLAGS)") - - def WriteSources(self, spec, configs, extra_sources): - """Write Makefile code for any 'sources' from the gyp input. - These are source files necessary to build the current target. - We need to handle shared_intermediate directory source files as - a special case by copying them to the intermediate directory and - treating them as a generated sources. Otherwise the Android build - rules won't pick them up. - - Args: - spec, configs: input from gyp. - extra_sources: Sources generated from Actions or Rules. - """ - sources = filter(make.Compilable, spec.get("sources", [])) - generated_not_sources = [x for x in extra_sources if not make.Compilable(x)] - extra_sources = filter(make.Compilable, extra_sources) - - # Determine and output the C++ extension used by these sources. - # We simply find the first C++ file and use that extension. - all_sources = sources + extra_sources - local_cpp_extension = ".cpp" - for source in all_sources: - (root, ext) = os.path.splitext(source) - if IsCPPExtension(ext): - local_cpp_extension = ext - break - if local_cpp_extension != ".cpp": - self.WriteLn("LOCAL_CPP_EXTENSION := %s" % local_cpp_extension) - - # We need to move any non-generated sources that are coming from the - # shared intermediate directory out of LOCAL_SRC_FILES and put them - # into LOCAL_GENERATED_SOURCES. We also need to move over any C++ files - # that don't match our local_cpp_extension, since Android will only - # generate Makefile rules for a single LOCAL_CPP_EXTENSION. - local_files = [] - for source in sources: - (root, ext) = os.path.splitext(source) - if "$(gyp_shared_intermediate_dir)" in source: - extra_sources.append(source) - elif "$(gyp_intermediate_dir)" in source: - extra_sources.append(source) - elif IsCPPExtension(ext) and ext != local_cpp_extension: - extra_sources.append(source) - else: - local_files.append(os.path.normpath(os.path.join(self.path, source))) - - # For any generated source, if it is coming from the shared intermediate - # directory then we add a Make rule to copy them to the local intermediate - # directory first. This is because the Android LOCAL_GENERATED_SOURCES - # must be in the local module intermediate directory for the compile rules - # to work properly. If the file has the wrong C++ extension, then we add - # a rule to copy that to intermediates and use the new version. - final_generated_sources = [] - # If a source file gets copied, we still need to add the original source - # directory as header search path, for GCC searches headers in the - # directory that contains the source file by default. - origin_src_dirs = [] - for source in extra_sources: - local_file = source - if "$(gyp_intermediate_dir)/" not in local_file: - basename = os.path.basename(local_file) - local_file = "$(gyp_intermediate_dir)/" + basename - (root, ext) = os.path.splitext(local_file) - if IsCPPExtension(ext) and ext != local_cpp_extension: - local_file = root + local_cpp_extension - if local_file != source: - self.WriteLn(f"{local_file}: {self.LocalPathify(source)}") - self.WriteLn("\tmkdir -p $(@D); cp $< $@") - origin_src_dirs.append(os.path.dirname(source)) - final_generated_sources.append(local_file) - - # We add back in all of the non-compilable stuff to make sure that the - # make rules have dependencies on them. - final_generated_sources.extend(generated_not_sources) - self.WriteList(final_generated_sources, "LOCAL_GENERATED_SOURCES") - - origin_src_dirs = gyp.common.uniquer(origin_src_dirs) - origin_src_dirs = map(Sourceify, map(self.LocalPathify, origin_src_dirs)) - self.WriteList(origin_src_dirs, "GYP_COPIED_SOURCE_ORIGIN_DIRS") - - self.WriteList(local_files, "LOCAL_SRC_FILES") - - # Write out the flags used to compile the source; this must be done last - # so that GYP_COPIED_SOURCE_ORIGIN_DIRS can be used as an include path. - self.WriteSourceFlags(spec, configs) - - def ComputeAndroidModule(self, spec): - """Return the Android module name used for a gyp spec. - - We use the complete qualified target name to avoid collisions between - duplicate targets in different directories. We also add a suffix to - distinguish gyp-generated module names. - """ - - if int(spec.get("android_unmangled_name", 0)): - assert self.type != "shared_library" or self.target.startswith("lib") - return self.target - - if self.type == "shared_library": - # For reasons of convention, the Android build system requires that all - # shared library modules are named 'libfoo' when generating -l flags. - prefix = "lib_" - else: - prefix = "" - - if spec["toolset"] == "host": - suffix = "_$(TARGET_$(GYP_VAR_PREFIX)ARCH)_host_gyp" - else: - suffix = "_gyp" - - if self.path: - middle = make.StringToMakefileVariable(f"{self.path}_{self.target}") - else: - middle = make.StringToMakefileVariable(self.target) - - return "".join([prefix, middle, suffix]) - - def ComputeOutputParts(self, spec): - """Return the 'output basename' of a gyp spec, split into filename + ext. - - Android libraries must be named the same thing as their module name, - otherwise the linker can't find them, so product_name and so on must be - ignored if we are building a library, and the "lib" prepending is - not done for Android. - """ - assert self.type != "loadable_module" # TODO: not supported? - - target = spec["target_name"] - target_prefix = "" - target_ext = "" - if self.type == "static_library": - target = self.ComputeAndroidModule(spec) - target_ext = ".a" - elif self.type == "shared_library": - target = self.ComputeAndroidModule(spec) - target_ext = ".so" - elif self.type == "none": - target_ext = ".stamp" - elif self.type != "executable": - print( - "ERROR: What output file should be generated?", - "type", - self.type, - "target", - target, - ) - - if self.type != "static_library" and self.type != "shared_library": - target_prefix = spec.get("product_prefix", target_prefix) - target = spec.get("product_name", target) - product_ext = spec.get("product_extension") - if product_ext: - target_ext = "." + product_ext - - target_stem = target_prefix + target - return (target_stem, target_ext) - - def ComputeOutputBasename(self, spec): - """Return the 'output basename' of a gyp spec. - - E.g., the loadable module 'foobar' in directory 'baz' will produce - 'libfoobar.so' - """ - return "".join(self.ComputeOutputParts(spec)) - - def ComputeOutput(self, spec): - """Return the 'output' (full output path) of a gyp spec. - - E.g., the loadable module 'foobar' in directory 'baz' will produce - '$(obj)/baz/libfoobar.so' - """ - if self.type == "executable": - # We install host executables into shared_intermediate_dir so they can be - # run by gyp rules that refer to PRODUCT_DIR. - path = "$(gyp_shared_intermediate_dir)" - elif self.type == "shared_library": - if self.toolset == "host": - path = "$($(GYP_HOST_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES)" - else: - path = "$($(GYP_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES)" - else: - # Other targets just get built into their intermediate dir. - if self.toolset == "host": - path = ( - "$(call intermediates-dir-for,%s,%s,true,," - "$(GYP_HOST_VAR_PREFIX))" - % (self.android_class, self.android_module) - ) - else: - path = "$(call intermediates-dir-for,{},{},,,$(GYP_VAR_PREFIX))".format( - self.android_class, - self.android_module, - ) - - assert spec.get("product_dir") is None # TODO: not supported? - return os.path.join(path, self.ComputeOutputBasename(spec)) - - def NormalizeIncludePaths(self, include_paths): - """Normalize include_paths. - Convert absolute paths to relative to the Android top directory. - - Args: - include_paths: A list of unprocessed include paths. - Returns: - A list of normalized include paths. - """ - normalized = [] - for path in include_paths: - if path[0] == "/": - path = gyp.common.RelativePath(path, self.android_top_dir) - normalized.append(path) - return normalized - - def ExtractIncludesFromCFlags(self, cflags): - """Extract includes "-I..." out from cflags - - Args: - cflags: A list of compiler flags, which may be mixed with "-I.." - Returns: - A tuple of lists: (clean_clfags, include_paths). "-I.." is trimmed. - """ - clean_cflags = [] - include_paths = [] - for flag in cflags: - if flag.startswith("-I"): - include_paths.append(flag[2:]) - else: - clean_cflags.append(flag) - - return (clean_cflags, include_paths) - - def FilterLibraries(self, libraries): - """Filter the 'libraries' key to separate things that shouldn't be ldflags. - - Library entries that look like filenames should be converted to android - module names instead of being passed to the linker as flags. - - Args: - libraries: the value of spec.get('libraries') - Returns: - A tuple (static_lib_modules, dynamic_lib_modules, ldflags) - """ - static_lib_modules = [] - dynamic_lib_modules = [] - ldflags = [] - for libs in libraries: - # Libs can have multiple words. - for lib in libs.split(): - # Filter the system libraries, which are added by default by the Android - # build system. - if ( - lib == "-lc" - or lib == "-lstdc++" - or lib == "-lm" - or lib.endswith("libgcc.a") - ): - continue - match = re.search(r"([^/]+)\.a$", lib) - if match: - static_lib_modules.append(match.group(1)) - continue - match = re.search(r"([^/]+)\.so$", lib) - if match: - dynamic_lib_modules.append(match.group(1)) - continue - if lib.startswith("-l"): - ldflags.append(lib) - return (static_lib_modules, dynamic_lib_modules, ldflags) - - def ComputeDeps(self, spec): - """Compute the dependencies of a gyp spec. - - Returns a tuple (deps, link_deps), where each is a list of - filenames that will need to be put in front of make for either - building (deps) or linking (link_deps). - """ - deps = [] - link_deps = [] - if "dependencies" in spec: - deps.extend( - [ - target_outputs[dep] - for dep in spec["dependencies"] - if target_outputs[dep] - ] - ) - for dep in spec["dependencies"]: - if dep in target_link_deps: - link_deps.append(target_link_deps[dep]) - deps.extend(link_deps) - return (gyp.common.uniquer(deps), gyp.common.uniquer(link_deps)) - - def WriteTargetFlags(self, spec, configs, link_deps): - """Write Makefile code to specify the link flags and library dependencies. - - spec, configs: input from gyp. - link_deps: link dependency list; see ComputeDeps() - """ - # Libraries (i.e. -lfoo) - # These must be included even for static libraries as some of them provide - # implicit include paths through the build system. - libraries = gyp.common.uniquer(spec.get("libraries", [])) - static_libs, dynamic_libs, ldflags_libs = self.FilterLibraries(libraries) - - if self.type != "static_library": - for configname, config in sorted(configs.items()): - ldflags = list(config.get("ldflags", [])) - self.WriteLn("") - self.WriteList(ldflags, "LOCAL_LDFLAGS_%s" % configname) - self.WriteList(ldflags_libs, "LOCAL_GYP_LIBS") - self.WriteLn( - "LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) " - "$(LOCAL_GYP_LIBS)" - ) - - # Link dependencies (i.e. other gyp targets this target depends on) - # These need not be included for static libraries as within the gyp build - # we do not use the implicit include path mechanism. - if self.type != "static_library": - static_link_deps = [x[1] for x in link_deps if x[0] == "static"] - shared_link_deps = [x[1] for x in link_deps if x[0] == "shared"] - else: - static_link_deps = [] - shared_link_deps = [] - - # Only write the lists if they are non-empty. - if static_libs or static_link_deps: - self.WriteLn("") - self.WriteList(static_libs + static_link_deps, "LOCAL_STATIC_LIBRARIES") - self.WriteLn("# Enable grouping to fix circular references") - self.WriteLn("LOCAL_GROUP_STATIC_LIBRARIES := true") - if dynamic_libs or shared_link_deps: - self.WriteLn("") - self.WriteList(dynamic_libs + shared_link_deps, "LOCAL_SHARED_LIBRARIES") - - def WriteTarget( - self, spec, configs, deps, link_deps, part_of_all, write_alias_target - ): - """Write Makefile code to produce the final target of the gyp spec. - - spec, configs: input from gyp. - deps, link_deps: dependency lists; see ComputeDeps() - part_of_all: flag indicating this target is part of 'all' - write_alias_target: flag indicating whether to create short aliases for this - target - """ - self.WriteLn("### Rules for final target.") - - if self.type != "none": - self.WriteTargetFlags(spec, configs, link_deps) - - settings = spec.get("aosp_build_settings", {}) - if settings: - self.WriteLn("### Set directly by aosp_build_settings.") - for k, v in settings.items(): - if isinstance(v, list): - self.WriteList(v, k) - else: - self.WriteLn(f"{k} := {make.QuoteIfNecessary(v)}") - self.WriteLn("") - - # Add to the set of targets which represent the gyp 'all' target. We use the - # name 'gyp_all_modules' as the Android build system doesn't allow the use - # of the Make target 'all' and because 'all_modules' is the equivalent of - # the Make target 'all' on Android. - if part_of_all and write_alias_target: - self.WriteLn('# Add target alias to "gyp_all_modules" target.') - self.WriteLn(".PHONY: gyp_all_modules") - self.WriteLn("gyp_all_modules: %s" % self.android_module) - self.WriteLn("") - - # Add an alias from the gyp target name to the Android module name. This - # simplifies manual builds of the target, and is required by the test - # framework. - if self.target != self.android_module and write_alias_target: - self.WriteLn("# Alias gyp target name.") - self.WriteLn(".PHONY: %s" % self.target) - self.WriteLn(f"{self.target}: {self.android_module}") - self.WriteLn("") - - # Add the command to trigger build of the target type depending - # on the toolset. Ex: BUILD_STATIC_LIBRARY vs. BUILD_HOST_STATIC_LIBRARY - # NOTE: This has to come last! - modifier = "" - if self.toolset == "host": - modifier = "HOST_" - if self.type == "static_library": - self.WriteLn("include $(BUILD_%sSTATIC_LIBRARY)" % modifier) - elif self.type == "shared_library": - self.WriteLn("LOCAL_PRELINK_MODULE := false") - self.WriteLn("include $(BUILD_%sSHARED_LIBRARY)" % modifier) - elif self.type == "executable": - self.WriteLn("LOCAL_CXX_STL := libc++_static") - # Executables are for build and test purposes only, so they're installed - # to a directory that doesn't get included in the system image. - self.WriteLn("LOCAL_MODULE_PATH := $(gyp_shared_intermediate_dir)") - self.WriteLn("include $(BUILD_%sEXECUTABLE)" % modifier) - else: - self.WriteLn("LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp") - self.WriteLn("LOCAL_UNINSTALLABLE_MODULE := true") - if self.toolset == "target": - self.WriteLn("LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)") - else: - self.WriteLn("LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_HOST_VAR_PREFIX)") - self.WriteLn() - self.WriteLn("include $(BUILD_SYSTEM)/base_rules.mk") - self.WriteLn() - self.WriteLn("$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)") - self.WriteLn('\t$(hide) echo "Gyp timestamp: $@"') - self.WriteLn("\t$(hide) mkdir -p $(dir $@)") - self.WriteLn("\t$(hide) touch $@") - self.WriteLn() - self.WriteLn("LOCAL_2ND_ARCH_VAR_PREFIX :=") - - def WriteList( - self, - value_list, - variable=None, - prefix="", - quoter=make.QuoteIfNecessary, - local_pathify=False, - ): - """Write a variable definition that is a list of values. - - E.g. WriteList(['a','b'], 'foo', prefix='blah') writes out - foo = blaha blahb - but in a pretty-printed style. - """ - values = "" - if value_list: - value_list = [quoter(prefix + value) for value in value_list] - if local_pathify: - value_list = [self.LocalPathify(value) for value in value_list] - values = " \\\n\t" + " \\\n\t".join(value_list) - self.fp.write(f"{variable} :={values}\n\n") - - def WriteLn(self, text=""): - self.fp.write(text + "\n") - - def LocalPathify(self, path): - """Convert a subdirectory-relative path into a normalized path which starts - with the make variable $(LOCAL_PATH) (i.e. the top of the project tree). - Absolute paths, or paths that contain variables, are just normalized.""" - if "$(" in path or os.path.isabs(path): - # path is not a file in the project tree in this case, but calling - # normpath is still important for trimming trailing slashes. - return os.path.normpath(path) - local_path = os.path.join("$(LOCAL_PATH)", self.path, path) - local_path = os.path.normpath(local_path) - # Check that normalizing the path didn't ../ itself out of $(LOCAL_PATH) - # - i.e. that the resulting path is still inside the project tree. The - # path may legitimately have ended up containing just $(LOCAL_PATH), though, - # so we don't look for a slash. - assert local_path.startswith( - "$(LOCAL_PATH)" - ), f"Path {path} attempts to escape from gyp path {self.path} !)" - return local_path - - def ExpandInputRoot(self, template, expansion, dirname): - if "%(INPUT_ROOT)s" not in template and "%(INPUT_DIRNAME)s" not in template: - return template - path = template % { - "INPUT_ROOT": expansion, - "INPUT_DIRNAME": dirname, - } - return os.path.normpath(path) - - -def PerformBuild(data, configurations, params): - # The android backend only supports the default configuration. - options = params["options"] - makefile = os.path.abspath(os.path.join(options.toplevel_dir, "GypAndroid.mk")) - env = dict(os.environ) - env["ONE_SHOT_MAKEFILE"] = makefile - arguments = ["make", "-C", os.environ["ANDROID_BUILD_TOP"], "gyp_all_modules"] - print("Building: %s" % arguments) - subprocess.check_call(arguments, env=env) - - -def GenerateOutput(target_list, target_dicts, data, params): - options = params["options"] - generator_flags = params.get("generator_flags", {}) - limit_to_target_all = generator_flags.get("limit_to_target_all", False) - write_alias_targets = generator_flags.get("write_alias_targets", True) - sdk_version = generator_flags.get("aosp_sdk_version", 0) - android_top_dir = os.environ.get("ANDROID_BUILD_TOP") - assert android_top_dir, "$ANDROID_BUILD_TOP not set; you need to run lunch." - - def CalculateMakefilePath(build_file, base_name): - """Determine where to write a Makefile for a given gyp file.""" - # Paths in gyp files are relative to the .gyp file, but we want - # paths relative to the source root for the master makefile. Grab - # the path of the .gyp file as the base to relativize against. - # E.g. "foo/bar" when we're constructing targets for "foo/bar/baz.gyp". - base_path = gyp.common.RelativePath(os.path.dirname(build_file), options.depth) - # We write the file in the base_path directory. - output_file = os.path.join(options.depth, base_path, base_name) - assert ( - not options.generator_output - ), "The Android backend does not support options.generator_output." - base_path = gyp.common.RelativePath( - os.path.dirname(build_file), options.toplevel_dir - ) - return base_path, output_file - - # TODO: search for the first non-'Default' target. This can go - # away when we add verification that all targets have the - # necessary configurations. - default_configuration = None - for target in target_list: - spec = target_dicts[target] - if spec["default_configuration"] != "Default": - default_configuration = spec["default_configuration"] - break - if not default_configuration: - default_configuration = "Default" - - makefile_name = "GypAndroid" + options.suffix + ".mk" - makefile_path = os.path.join(options.toplevel_dir, makefile_name) - assert ( - not options.generator_output - ), "The Android backend does not support options.generator_output." - gyp.common.EnsureDirExists(makefile_path) - root_makefile = open(makefile_path, "w") - - root_makefile.write(header) - - # We set LOCAL_PATH just once, here, to the top of the project tree. This - # allows all the other paths we use to be relative to the Android.mk file, - # as the Android build system expects. - root_makefile.write("\nLOCAL_PATH := $(call my-dir)\n") - - # Find the list of targets that derive from the gyp file(s) being built. - needed_targets = set() - for build_file in params["build_files"]: - for target in gyp.common.AllTargets(target_list, target_dicts, build_file): - needed_targets.add(target) - - build_files = set() - include_list = set() - android_modules = {} - for qualified_target in target_list: - build_file, target, toolset = gyp.common.ParseQualifiedTarget(qualified_target) - relative_build_file = gyp.common.RelativePath(build_file, options.toplevel_dir) - build_files.add(relative_build_file) - included_files = data[build_file]["included_files"] - for included_file in included_files: - # The included_files entries are relative to the dir of the build file - # that included them, so we have to undo that and then make them relative - # to the root dir. - relative_include_file = gyp.common.RelativePath( - gyp.common.UnrelativePath(included_file, build_file), - options.toplevel_dir, - ) - abs_include_file = os.path.abspath(relative_include_file) - # If the include file is from the ~/.gyp dir, we should use absolute path - # so that relocating the src dir doesn't break the path. - if params["home_dot_gyp"] and abs_include_file.startswith( - params["home_dot_gyp"] - ): - build_files.add(abs_include_file) - else: - build_files.add(relative_include_file) - - base_path, output_file = CalculateMakefilePath( - build_file, target + "." + toolset + options.suffix + ".mk" - ) - - spec = target_dicts[qualified_target] - configs = spec["configurations"] - - part_of_all = qualified_target in needed_targets - if limit_to_target_all and not part_of_all: - continue - - relative_target = gyp.common.QualifiedTarget( - relative_build_file, target, toolset - ) - writer = AndroidMkWriter(android_top_dir) - android_module = writer.Write( - qualified_target, - relative_target, - base_path, - output_file, - spec, - configs, - part_of_all=part_of_all, - write_alias_target=write_alias_targets, - sdk_version=sdk_version, - ) - if android_module in android_modules: - print( - "ERROR: Android module names must be unique. The following " - "targets both generate Android module name %s.\n %s\n %s" - % (android_module, android_modules[android_module], qualified_target) - ) - return - android_modules[android_module] = qualified_target - - # Our root_makefile lives at the source root. Compute the relative path - # from there to the output_file for including. - mkfile_rel_path = gyp.common.RelativePath( - output_file, os.path.dirname(makefile_path) - ) - include_list.add(mkfile_rel_path) - - root_makefile.write("GYP_CONFIGURATION ?= %s\n" % default_configuration) - root_makefile.write("GYP_VAR_PREFIX ?=\n") - root_makefile.write("GYP_HOST_VAR_PREFIX ?=\n") - root_makefile.write("GYP_HOST_MULTILIB ?= first\n") - - # Write out the sorted list of includes. - root_makefile.write("\n") - for include_file in sorted(include_list): - root_makefile.write("include $(LOCAL_PATH)/" + include_file + "\n") - root_makefile.write("\n") - - if write_alias_targets: - root_makefile.write(ALL_MODULES_FOOTER) - - root_makefile.close() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py deleted file mode 100644 index c95d184..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +++ /dev/null @@ -1,1321 +0,0 @@ -# Copyright (c) 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""cmake output module - -This module is under development and should be considered experimental. - -This module produces cmake (2.8.8+) input as its output. One CMakeLists.txt is -created for each configuration. - -This module's original purpose was to support editing in IDEs like KDevelop -which use CMake for project management. It is also possible to use CMake to -generate projects for other IDEs such as eclipse cdt and code::blocks. QtCreator -will convert the CMakeLists.txt to a code::blocks cbp for the editor to read, -but build using CMake. As a result QtCreator editor is unaware of compiler -defines. The generated CMakeLists.txt can also be used to build on Linux. There -is currently no support for building on platforms other than Linux. - -The generated CMakeLists.txt should properly compile all projects. However, -there is a mismatch between gyp and cmake with regard to linking. All attempts -are made to work around this, but CMake sometimes sees -Wl,--start-group as a -library and incorrectly repeats it. As a result the output of this generator -should not be relied on for building. - -When using with kdevelop, use version 4.4+. Previous versions of kdevelop will -not be able to find the header file directories described in the generated -CMakeLists.txt file. -""" - - -import multiprocessing -import os -import signal -import subprocess -import gyp.common -import gyp.xcode_emulation - -_maketrans = str.maketrans - -generator_default_variables = { - "EXECUTABLE_PREFIX": "", - "EXECUTABLE_SUFFIX": "", - "STATIC_LIB_PREFIX": "lib", - "STATIC_LIB_SUFFIX": ".a", - "SHARED_LIB_PREFIX": "lib", - "SHARED_LIB_SUFFIX": ".so", - "SHARED_LIB_DIR": "${builddir}/lib.${TOOLSET}", - "LIB_DIR": "${obj}.${TOOLSET}", - "INTERMEDIATE_DIR": "${obj}.${TOOLSET}/${TARGET}/geni", - "SHARED_INTERMEDIATE_DIR": "${obj}/gen", - "PRODUCT_DIR": "${builddir}", - "RULE_INPUT_PATH": "${RULE_INPUT_PATH}", - "RULE_INPUT_DIRNAME": "${RULE_INPUT_DIRNAME}", - "RULE_INPUT_NAME": "${RULE_INPUT_NAME}", - "RULE_INPUT_ROOT": "${RULE_INPUT_ROOT}", - "RULE_INPUT_EXT": "${RULE_INPUT_EXT}", - "CONFIGURATION_NAME": "${configuration}", -} - -FULL_PATH_VARS = ("${CMAKE_CURRENT_LIST_DIR}", "${builddir}", "${obj}") - -generator_supports_multiple_toolsets = True -generator_wants_static_library_dependencies_adjusted = True - -COMPILABLE_EXTENSIONS = { - ".c": "cc", - ".cc": "cxx", - ".cpp": "cxx", - ".cxx": "cxx", - ".s": "s", # cc - ".S": "s", # cc -} - - -def RemovePrefix(a, prefix): - """Returns 'a' without 'prefix' if it starts with 'prefix'.""" - return a[len(prefix) :] if a.startswith(prefix) else a - - -def CalculateVariables(default_variables, params): - """Calculate additional variables for use in the build (called by gyp).""" - default_variables.setdefault("OS", gyp.common.GetFlavor(params)) - - -def Compilable(filename): - """Return true if the file is compilable (should be in OBJS).""" - return any(filename.endswith(e) for e in COMPILABLE_EXTENSIONS) - - -def Linkable(filename): - """Return true if the file is linkable (should be on the link line).""" - return filename.endswith(".o") - - -def NormjoinPathForceCMakeSource(base_path, rel_path): - """Resolves rel_path against base_path and returns the result. - - If rel_path is an absolute path it is returned unchanged. - Otherwise it is resolved against base_path and normalized. - If the result is a relative path, it is forced to be relative to the - CMakeLists.txt. - """ - if os.path.isabs(rel_path): - return rel_path - if any([rel_path.startswith(var) for var in FULL_PATH_VARS]): - return rel_path - # TODO: do we need to check base_path for absolute variables as well? - return os.path.join( - "${CMAKE_CURRENT_LIST_DIR}", os.path.normpath(os.path.join(base_path, rel_path)) - ) - - -def NormjoinPath(base_path, rel_path): - """Resolves rel_path against base_path and returns the result. - TODO: what is this really used for? - If rel_path begins with '$' it is returned unchanged. - Otherwise it is resolved against base_path if relative, then normalized. - """ - if rel_path.startswith("$") and not rel_path.startswith("${configuration}"): - return rel_path - return os.path.normpath(os.path.join(base_path, rel_path)) - - -def CMakeStringEscape(a): - """Escapes the string 'a' for use inside a CMake string. - - This means escaping - '\' otherwise it may be seen as modifying the next character - '"' otherwise it will end the string - ';' otherwise the string becomes a list - - The following do not need to be escaped - '#' when the lexer is in string state, this does not start a comment - - The following are yet unknown - '$' generator variables (like ${obj}) must not be escaped, - but text $ should be escaped - what is wanted is to know which $ come from generator variables - """ - return a.replace("\\", "\\\\").replace(";", "\\;").replace('"', '\\"') - - -def SetFileProperty(output, source_name, property_name, values, sep): - """Given a set of source file, sets the given property on them.""" - output.write("set_source_files_properties(") - output.write(source_name) - output.write(" PROPERTIES ") - output.write(property_name) - output.write(' "') - for value in values: - output.write(CMakeStringEscape(value)) - output.write(sep) - output.write('")\n') - - -def SetFilesProperty(output, variable, property_name, values, sep): - """Given a set of source files, sets the given property on them.""" - output.write("set_source_files_properties(") - WriteVariable(output, variable) - output.write(" PROPERTIES ") - output.write(property_name) - output.write(' "') - for value in values: - output.write(CMakeStringEscape(value)) - output.write(sep) - output.write('")\n') - - -def SetTargetProperty(output, target_name, property_name, values, sep=""): - """Given a target, sets the given property.""" - output.write("set_target_properties(") - output.write(target_name) - output.write(" PROPERTIES ") - output.write(property_name) - output.write(' "') - for value in values: - output.write(CMakeStringEscape(value)) - output.write(sep) - output.write('")\n') - - -def SetVariable(output, variable_name, value): - """Sets a CMake variable.""" - output.write("set(") - output.write(variable_name) - output.write(' "') - output.write(CMakeStringEscape(value)) - output.write('")\n') - - -def SetVariableList(output, variable_name, values): - """Sets a CMake variable to a list.""" - if not values: - return SetVariable(output, variable_name, "") - if len(values) == 1: - return SetVariable(output, variable_name, values[0]) - output.write("list(APPEND ") - output.write(variable_name) - output.write('\n "') - output.write('"\n "'.join([CMakeStringEscape(value) for value in values])) - output.write('")\n') - - -def UnsetVariable(output, variable_name): - """Unsets a CMake variable.""" - output.write("unset(") - output.write(variable_name) - output.write(")\n") - - -def WriteVariable(output, variable_name, prepend=None): - if prepend: - output.write(prepend) - output.write("${") - output.write(variable_name) - output.write("}") - - -class CMakeTargetType: - def __init__(self, command, modifier, property_modifier): - self.command = command - self.modifier = modifier - self.property_modifier = property_modifier - - -cmake_target_type_from_gyp_target_type = { - "executable": CMakeTargetType("add_executable", None, "RUNTIME"), - "static_library": CMakeTargetType("add_library", "STATIC", "ARCHIVE"), - "shared_library": CMakeTargetType("add_library", "SHARED", "LIBRARY"), - "loadable_module": CMakeTargetType("add_library", "MODULE", "LIBRARY"), - "none": CMakeTargetType("add_custom_target", "SOURCES", None), -} - - -def StringToCMakeTargetName(a): - """Converts the given string 'a' to a valid CMake target name. - - All invalid characters are replaced by '_'. - Invalid for cmake: ' ', '/', '(', ')', '"' - Invalid for make: ':' - Invalid for unknown reasons but cause failures: '.' - """ - return a.translate(_maketrans(' /():."', "_______")) - - -def WriteActions(target_name, actions, extra_sources, extra_deps, path_to_gyp, output): - """Write CMake for the 'actions' in the target. - - Args: - target_name: the name of the CMake target being generated. - actions: the Gyp 'actions' dict for this target. - extra_sources: [(, )] to append with generated source files. - extra_deps: [] to append with generated targets. - path_to_gyp: relative path from CMakeLists.txt being generated to - the Gyp file in which the target being generated is defined. - """ - for action in actions: - action_name = StringToCMakeTargetName(action["action_name"]) - action_target_name = f"{target_name}__{action_name}" - - inputs = action["inputs"] - inputs_name = action_target_name + "__input" - SetVariableList( - output, - inputs_name, - [NormjoinPathForceCMakeSource(path_to_gyp, dep) for dep in inputs], - ) - - outputs = action["outputs"] - cmake_outputs = [ - NormjoinPathForceCMakeSource(path_to_gyp, out) for out in outputs - ] - outputs_name = action_target_name + "__output" - SetVariableList(output, outputs_name, cmake_outputs) - - # Build up a list of outputs. - # Collect the output dirs we'll need. - dirs = {dir for dir in (os.path.dirname(o) for o in outputs) if dir} - - if int(action.get("process_outputs_as_sources", False)): - extra_sources.extend(zip(cmake_outputs, outputs)) - - # add_custom_command - output.write("add_custom_command(OUTPUT ") - WriteVariable(output, outputs_name) - output.write("\n") - - if len(dirs) > 0: - for directory in dirs: - output.write(" COMMAND ${CMAKE_COMMAND} -E make_directory ") - output.write(directory) - output.write("\n") - - output.write(" COMMAND ") - output.write(gyp.common.EncodePOSIXShellList(action["action"])) - output.write("\n") - - output.write(" DEPENDS ") - WriteVariable(output, inputs_name) - output.write("\n") - - output.write(" WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/") - output.write(path_to_gyp) - output.write("\n") - - output.write(" COMMENT ") - if "message" in action: - output.write(action["message"]) - else: - output.write(action_target_name) - output.write("\n") - - output.write(" VERBATIM\n") - output.write(")\n") - - # add_custom_target - output.write("add_custom_target(") - output.write(action_target_name) - output.write("\n DEPENDS ") - WriteVariable(output, outputs_name) - output.write("\n SOURCES ") - WriteVariable(output, inputs_name) - output.write("\n)\n") - - extra_deps.append(action_target_name) - - -def NormjoinRulePathForceCMakeSource(base_path, rel_path, rule_source): - if rel_path.startswith(("${RULE_INPUT_PATH}", "${RULE_INPUT_DIRNAME}")): - if any([rule_source.startswith(var) for var in FULL_PATH_VARS]): - return rel_path - return NormjoinPathForceCMakeSource(base_path, rel_path) - - -def WriteRules(target_name, rules, extra_sources, extra_deps, path_to_gyp, output): - """Write CMake for the 'rules' in the target. - - Args: - target_name: the name of the CMake target being generated. - actions: the Gyp 'actions' dict for this target. - extra_sources: [(, )] to append with generated source files. - extra_deps: [] to append with generated targets. - path_to_gyp: relative path from CMakeLists.txt being generated to - the Gyp file in which the target being generated is defined. - """ - for rule in rules: - rule_name = StringToCMakeTargetName(target_name + "__" + rule["rule_name"]) - - inputs = rule.get("inputs", []) - inputs_name = rule_name + "__input" - SetVariableList( - output, - inputs_name, - [NormjoinPathForceCMakeSource(path_to_gyp, dep) for dep in inputs], - ) - outputs = rule["outputs"] - var_outputs = [] - - for count, rule_source in enumerate(rule.get("rule_sources", [])): - action_name = rule_name + "_" + str(count) - - rule_source_dirname, rule_source_basename = os.path.split(rule_source) - rule_source_root, rule_source_ext = os.path.splitext(rule_source_basename) - - SetVariable(output, "RULE_INPUT_PATH", rule_source) - SetVariable(output, "RULE_INPUT_DIRNAME", rule_source_dirname) - SetVariable(output, "RULE_INPUT_NAME", rule_source_basename) - SetVariable(output, "RULE_INPUT_ROOT", rule_source_root) - SetVariable(output, "RULE_INPUT_EXT", rule_source_ext) - - # Build up a list of outputs. - # Collect the output dirs we'll need. - dirs = {dir for dir in (os.path.dirname(o) for o in outputs) if dir} - - # Create variables for the output, as 'local' variable will be unset. - these_outputs = [] - for output_index, out in enumerate(outputs): - output_name = action_name + "_" + str(output_index) - SetVariable( - output, - output_name, - NormjoinRulePathForceCMakeSource(path_to_gyp, out, rule_source), - ) - if int(rule.get("process_outputs_as_sources", False)): - extra_sources.append(("${" + output_name + "}", out)) - these_outputs.append("${" + output_name + "}") - var_outputs.append("${" + output_name + "}") - - # add_custom_command - output.write("add_custom_command(OUTPUT\n") - for out in these_outputs: - output.write(" ") - output.write(out) - output.write("\n") - - for directory in dirs: - output.write(" COMMAND ${CMAKE_COMMAND} -E make_directory ") - output.write(directory) - output.write("\n") - - output.write(" COMMAND ") - output.write(gyp.common.EncodePOSIXShellList(rule["action"])) - output.write("\n") - - output.write(" DEPENDS ") - WriteVariable(output, inputs_name) - output.write(" ") - output.write(NormjoinPath(path_to_gyp, rule_source)) - output.write("\n") - - # CMAKE_CURRENT_LIST_DIR is where the CMakeLists.txt lives. - # The cwd is the current build directory. - output.write(" WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/") - output.write(path_to_gyp) - output.write("\n") - - output.write(" COMMENT ") - if "message" in rule: - output.write(rule["message"]) - else: - output.write(action_name) - output.write("\n") - - output.write(" VERBATIM\n") - output.write(")\n") - - UnsetVariable(output, "RULE_INPUT_PATH") - UnsetVariable(output, "RULE_INPUT_DIRNAME") - UnsetVariable(output, "RULE_INPUT_NAME") - UnsetVariable(output, "RULE_INPUT_ROOT") - UnsetVariable(output, "RULE_INPUT_EXT") - - # add_custom_target - output.write("add_custom_target(") - output.write(rule_name) - output.write(" DEPENDS\n") - for out in var_outputs: - output.write(" ") - output.write(out) - output.write("\n") - output.write("SOURCES ") - WriteVariable(output, inputs_name) - output.write("\n") - for rule_source in rule.get("rule_sources", []): - output.write(" ") - output.write(NormjoinPath(path_to_gyp, rule_source)) - output.write("\n") - output.write(")\n") - - extra_deps.append(rule_name) - - -def WriteCopies(target_name, copies, extra_deps, path_to_gyp, output): - """Write CMake for the 'copies' in the target. - - Args: - target_name: the name of the CMake target being generated. - actions: the Gyp 'actions' dict for this target. - extra_deps: [] to append with generated targets. - path_to_gyp: relative path from CMakeLists.txt being generated to - the Gyp file in which the target being generated is defined. - """ - copy_name = target_name + "__copies" - - # CMake gets upset with custom targets with OUTPUT which specify no output. - have_copies = any(copy["files"] for copy in copies) - if not have_copies: - output.write("add_custom_target(") - output.write(copy_name) - output.write(")\n") - extra_deps.append(copy_name) - return - - class Copy: - def __init__(self, ext, command): - self.cmake_inputs = [] - self.cmake_outputs = [] - self.gyp_inputs = [] - self.gyp_outputs = [] - self.ext = ext - self.inputs_name = None - self.outputs_name = None - self.command = command - - file_copy = Copy("", "copy") - dir_copy = Copy("_dirs", "copy_directory") - - for copy in copies: - files = copy["files"] - destination = copy["destination"] - for src in files: - path = os.path.normpath(src) - basename = os.path.split(path)[1] - dst = os.path.join(destination, basename) - - copy = file_copy if os.path.basename(src) else dir_copy - - copy.cmake_inputs.append(NormjoinPathForceCMakeSource(path_to_gyp, src)) - copy.cmake_outputs.append(NormjoinPathForceCMakeSource(path_to_gyp, dst)) - copy.gyp_inputs.append(src) - copy.gyp_outputs.append(dst) - - for copy in (file_copy, dir_copy): - if copy.cmake_inputs: - copy.inputs_name = copy_name + "__input" + copy.ext - SetVariableList(output, copy.inputs_name, copy.cmake_inputs) - - copy.outputs_name = copy_name + "__output" + copy.ext - SetVariableList(output, copy.outputs_name, copy.cmake_outputs) - - # add_custom_command - output.write("add_custom_command(\n") - - output.write("OUTPUT") - for copy in (file_copy, dir_copy): - if copy.outputs_name: - WriteVariable(output, copy.outputs_name, " ") - output.write("\n") - - for copy in (file_copy, dir_copy): - for src, dst in zip(copy.gyp_inputs, copy.gyp_outputs): - # 'cmake -E copy src dst' will create the 'dst' directory if needed. - output.write("COMMAND ${CMAKE_COMMAND} -E %s " % copy.command) - output.write(src) - output.write(" ") - output.write(dst) - output.write("\n") - - output.write("DEPENDS") - for copy in (file_copy, dir_copy): - if copy.inputs_name: - WriteVariable(output, copy.inputs_name, " ") - output.write("\n") - - output.write("WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/") - output.write(path_to_gyp) - output.write("\n") - - output.write("COMMENT Copying for ") - output.write(target_name) - output.write("\n") - - output.write("VERBATIM\n") - output.write(")\n") - - # add_custom_target - output.write("add_custom_target(") - output.write(copy_name) - output.write("\n DEPENDS") - for copy in (file_copy, dir_copy): - if copy.outputs_name: - WriteVariable(output, copy.outputs_name, " ") - output.write("\n SOURCES") - if file_copy.inputs_name: - WriteVariable(output, file_copy.inputs_name, " ") - output.write("\n)\n") - - extra_deps.append(copy_name) - - -def CreateCMakeTargetBaseName(qualified_target): - """This is the name we would like the target to have.""" - _, gyp_target_name, gyp_target_toolset = gyp.common.ParseQualifiedTarget( - qualified_target - ) - cmake_target_base_name = gyp_target_name - if gyp_target_toolset and gyp_target_toolset != "target": - cmake_target_base_name += "_" + gyp_target_toolset - return StringToCMakeTargetName(cmake_target_base_name) - - -def CreateCMakeTargetFullName(qualified_target): - """An unambiguous name for the target.""" - gyp_file, gyp_target_name, gyp_target_toolset = gyp.common.ParseQualifiedTarget( - qualified_target - ) - cmake_target_full_name = gyp_file + ":" + gyp_target_name - if gyp_target_toolset and gyp_target_toolset != "target": - cmake_target_full_name += "_" + gyp_target_toolset - return StringToCMakeTargetName(cmake_target_full_name) - - -class CMakeNamer: - """Converts Gyp target names into CMake target names. - - CMake requires that target names be globally unique. One way to ensure - this is to fully qualify the names of the targets. Unfortunately, this - ends up with all targets looking like "chrome_chrome_gyp_chrome" instead - of just "chrome". If this generator were only interested in building, it - would be possible to fully qualify all target names, then create - unqualified target names which depend on all qualified targets which - should have had that name. This is more or less what the 'make' generator - does with aliases. However, one goal of this generator is to create CMake - files for use with IDEs, and fully qualified names are not as user - friendly. - - Since target name collision is rare, we do the above only when required. - - Toolset variants are always qualified from the base, as this is required for - building. However, it also makes sense for an IDE, as it is possible for - defines to be different. - """ - - def __init__(self, target_list): - self.cmake_target_base_names_conficting = set() - - cmake_target_base_names_seen = set() - for qualified_target in target_list: - cmake_target_base_name = CreateCMakeTargetBaseName(qualified_target) - - if cmake_target_base_name not in cmake_target_base_names_seen: - cmake_target_base_names_seen.add(cmake_target_base_name) - else: - self.cmake_target_base_names_conficting.add(cmake_target_base_name) - - def CreateCMakeTargetName(self, qualified_target): - base_name = CreateCMakeTargetBaseName(qualified_target) - if base_name in self.cmake_target_base_names_conficting: - return CreateCMakeTargetFullName(qualified_target) - return base_name - - -def WriteTarget( - namer, - qualified_target, - target_dicts, - build_dir, - config_to_use, - options, - generator_flags, - all_qualified_targets, - flavor, - output, -): - # The make generator does this always. - # TODO: It would be nice to be able to tell CMake all dependencies. - circular_libs = generator_flags.get("circular", True) - - if not generator_flags.get("standalone", False): - output.write("\n#") - output.write(qualified_target) - output.write("\n") - - gyp_file, _, _ = gyp.common.ParseQualifiedTarget(qualified_target) - rel_gyp_file = gyp.common.RelativePath(gyp_file, options.toplevel_dir) - rel_gyp_dir = os.path.dirname(rel_gyp_file) - - # Relative path from build dir to top dir. - build_to_top = gyp.common.InvertRelativePath(build_dir, options.toplevel_dir) - # Relative path from build dir to gyp dir. - build_to_gyp = os.path.join(build_to_top, rel_gyp_dir) - - path_from_cmakelists_to_gyp = build_to_gyp - - spec = target_dicts.get(qualified_target, {}) - config = spec.get("configurations", {}).get(config_to_use, {}) - - xcode_settings = None - if flavor == "mac": - xcode_settings = gyp.xcode_emulation.XcodeSettings(spec) - - target_name = spec.get("target_name", "") - target_type = spec.get("type", "") - target_toolset = spec.get("toolset") - - cmake_target_type = cmake_target_type_from_gyp_target_type.get(target_type) - if cmake_target_type is None: - print( - "Target %s has unknown target type %s, skipping." - % (target_name, target_type) - ) - return - - SetVariable(output, "TARGET", target_name) - SetVariable(output, "TOOLSET", target_toolset) - - cmake_target_name = namer.CreateCMakeTargetName(qualified_target) - - extra_sources = [] - extra_deps = [] - - # Actions must come first, since they can generate more OBJs for use below. - if "actions" in spec: - WriteActions( - cmake_target_name, - spec["actions"], - extra_sources, - extra_deps, - path_from_cmakelists_to_gyp, - output, - ) - - # Rules must be early like actions. - if "rules" in spec: - WriteRules( - cmake_target_name, - spec["rules"], - extra_sources, - extra_deps, - path_from_cmakelists_to_gyp, - output, - ) - - # Copies - if "copies" in spec: - WriteCopies( - cmake_target_name, - spec["copies"], - extra_deps, - path_from_cmakelists_to_gyp, - output, - ) - - # Target and sources - srcs = spec.get("sources", []) - - # Gyp separates the sheep from the goats based on file extensions. - # A full separation is done here because of flag handing (see below). - s_sources = [] - c_sources = [] - cxx_sources = [] - linkable_sources = [] - other_sources = [] - for src in srcs: - _, ext = os.path.splitext(src) - src_type = COMPILABLE_EXTENSIONS.get(ext, None) - src_norm_path = NormjoinPath(path_from_cmakelists_to_gyp, src) - - if src_type == "s": - s_sources.append(src_norm_path) - elif src_type == "cc": - c_sources.append(src_norm_path) - elif src_type == "cxx": - cxx_sources.append(src_norm_path) - elif Linkable(ext): - linkable_sources.append(src_norm_path) - else: - other_sources.append(src_norm_path) - - for extra_source in extra_sources: - src, real_source = extra_source - _, ext = os.path.splitext(real_source) - src_type = COMPILABLE_EXTENSIONS.get(ext, None) - - if src_type == "s": - s_sources.append(src) - elif src_type == "cc": - c_sources.append(src) - elif src_type == "cxx": - cxx_sources.append(src) - elif Linkable(ext): - linkable_sources.append(src) - else: - other_sources.append(src) - - s_sources_name = None - if s_sources: - s_sources_name = cmake_target_name + "__asm_srcs" - SetVariableList(output, s_sources_name, s_sources) - - c_sources_name = None - if c_sources: - c_sources_name = cmake_target_name + "__c_srcs" - SetVariableList(output, c_sources_name, c_sources) - - cxx_sources_name = None - if cxx_sources: - cxx_sources_name = cmake_target_name + "__cxx_srcs" - SetVariableList(output, cxx_sources_name, cxx_sources) - - linkable_sources_name = None - if linkable_sources: - linkable_sources_name = cmake_target_name + "__linkable_srcs" - SetVariableList(output, linkable_sources_name, linkable_sources) - - other_sources_name = None - if other_sources: - other_sources_name = cmake_target_name + "__other_srcs" - SetVariableList(output, other_sources_name, other_sources) - - # CMake gets upset when executable targets provide no sources. - # http://www.cmake.org/pipermail/cmake/2010-July/038461.html - dummy_sources_name = None - has_sources = ( - s_sources_name - or c_sources_name - or cxx_sources_name - or linkable_sources_name - or other_sources_name - ) - if target_type == "executable" and not has_sources: - dummy_sources_name = cmake_target_name + "__dummy_srcs" - SetVariable( - output, dummy_sources_name, "${obj}.${TOOLSET}/${TARGET}/genc/dummy.c" - ) - output.write('if(NOT EXISTS "') - WriteVariable(output, dummy_sources_name) - output.write('")\n') - output.write(' file(WRITE "') - WriteVariable(output, dummy_sources_name) - output.write('" "")\n') - output.write("endif()\n") - - # CMake is opposed to setting linker directories and considers the practice - # of setting linker directories dangerous. Instead, it favors the use of - # find_library and passing absolute paths to target_link_libraries. - # However, CMake does provide the command link_directories, which adds - # link directories to targets defined after it is called. - # As a result, link_directories must come before the target definition. - # CMake unfortunately has no means of removing entries from LINK_DIRECTORIES. - library_dirs = config.get("library_dirs") - if library_dirs is not None: - output.write("link_directories(") - for library_dir in library_dirs: - output.write(" ") - output.write(NormjoinPath(path_from_cmakelists_to_gyp, library_dir)) - output.write("\n") - output.write(")\n") - - output.write(cmake_target_type.command) - output.write("(") - output.write(cmake_target_name) - - if cmake_target_type.modifier is not None: - output.write(" ") - output.write(cmake_target_type.modifier) - - if s_sources_name: - WriteVariable(output, s_sources_name, " ") - if c_sources_name: - WriteVariable(output, c_sources_name, " ") - if cxx_sources_name: - WriteVariable(output, cxx_sources_name, " ") - if linkable_sources_name: - WriteVariable(output, linkable_sources_name, " ") - if other_sources_name: - WriteVariable(output, other_sources_name, " ") - if dummy_sources_name: - WriteVariable(output, dummy_sources_name, " ") - - output.write(")\n") - - # Let CMake know if the 'all' target should depend on this target. - exclude_from_all = ( - "TRUE" if qualified_target not in all_qualified_targets else "FALSE" - ) - SetTargetProperty(output, cmake_target_name, "EXCLUDE_FROM_ALL", exclude_from_all) - for extra_target_name in extra_deps: - SetTargetProperty( - output, extra_target_name, "EXCLUDE_FROM_ALL", exclude_from_all - ) - - # Output name and location. - if target_type != "none": - # Link as 'C' if there are no other files - if not c_sources and not cxx_sources: - SetTargetProperty(output, cmake_target_name, "LINKER_LANGUAGE", ["C"]) - - # Mark uncompiled sources as uncompiled. - if other_sources_name: - output.write("set_source_files_properties(") - WriteVariable(output, other_sources_name, "") - output.write(' PROPERTIES HEADER_FILE_ONLY "TRUE")\n') - - # Mark object sources as linkable. - if linkable_sources_name: - output.write("set_source_files_properties(") - WriteVariable(output, other_sources_name, "") - output.write(' PROPERTIES EXTERNAL_OBJECT "TRUE")\n') - - # Output directory - target_output_directory = spec.get("product_dir") - if target_output_directory is None: - if target_type in ("executable", "loadable_module"): - target_output_directory = generator_default_variables["PRODUCT_DIR"] - elif target_type == "shared_library": - target_output_directory = "${builddir}/lib.${TOOLSET}" - elif spec.get("standalone_static_library", False): - target_output_directory = generator_default_variables["PRODUCT_DIR"] - else: - base_path = gyp.common.RelativePath( - os.path.dirname(gyp_file), options.toplevel_dir - ) - target_output_directory = "${obj}.${TOOLSET}" - target_output_directory = os.path.join( - target_output_directory, base_path - ) - - cmake_target_output_directory = NormjoinPathForceCMakeSource( - path_from_cmakelists_to_gyp, target_output_directory - ) - SetTargetProperty( - output, - cmake_target_name, - cmake_target_type.property_modifier + "_OUTPUT_DIRECTORY", - cmake_target_output_directory, - ) - - # Output name - default_product_prefix = "" - default_product_name = target_name - default_product_ext = "" - if target_type == "static_library": - static_library_prefix = generator_default_variables["STATIC_LIB_PREFIX"] - default_product_name = RemovePrefix( - default_product_name, static_library_prefix - ) - default_product_prefix = static_library_prefix - default_product_ext = generator_default_variables["STATIC_LIB_SUFFIX"] - - elif target_type in ("loadable_module", "shared_library"): - shared_library_prefix = generator_default_variables["SHARED_LIB_PREFIX"] - default_product_name = RemovePrefix( - default_product_name, shared_library_prefix - ) - default_product_prefix = shared_library_prefix - default_product_ext = generator_default_variables["SHARED_LIB_SUFFIX"] - - elif target_type != "executable": - print( - "ERROR: What output file should be generated?", - "type", - target_type, - "target", - target_name, - ) - - product_prefix = spec.get("product_prefix", default_product_prefix) - product_name = spec.get("product_name", default_product_name) - product_ext = spec.get("product_extension") - if product_ext: - product_ext = "." + product_ext - else: - product_ext = default_product_ext - - SetTargetProperty(output, cmake_target_name, "PREFIX", product_prefix) - SetTargetProperty( - output, - cmake_target_name, - cmake_target_type.property_modifier + "_OUTPUT_NAME", - product_name, - ) - SetTargetProperty(output, cmake_target_name, "SUFFIX", product_ext) - - # Make the output of this target referenceable as a source. - cmake_target_output_basename = product_prefix + product_name + product_ext - cmake_target_output = os.path.join( - cmake_target_output_directory, cmake_target_output_basename - ) - SetFileProperty(output, cmake_target_output, "GENERATED", ["TRUE"], "") - - # Includes - includes = config.get("include_dirs") - if includes: - # This (target include directories) is what requires CMake 2.8.8 - includes_name = cmake_target_name + "__include_dirs" - SetVariableList( - output, - includes_name, - [ - NormjoinPathForceCMakeSource(path_from_cmakelists_to_gyp, include) - for include in includes - ], - ) - output.write("set_property(TARGET ") - output.write(cmake_target_name) - output.write(" APPEND PROPERTY INCLUDE_DIRECTORIES ") - WriteVariable(output, includes_name, "") - output.write(")\n") - - # Defines - defines = config.get("defines") - if defines is not None: - SetTargetProperty( - output, cmake_target_name, "COMPILE_DEFINITIONS", defines, ";" - ) - - # Compile Flags - http://www.cmake.org/Bug/view.php?id=6493 - # CMake currently does not have target C and CXX flags. - # So, instead of doing... - - # cflags_c = config.get('cflags_c') - # if cflags_c is not None: - # SetTargetProperty(output, cmake_target_name, - # 'C_COMPILE_FLAGS', cflags_c, ' ') - - # cflags_cc = config.get('cflags_cc') - # if cflags_cc is not None: - # SetTargetProperty(output, cmake_target_name, - # 'CXX_COMPILE_FLAGS', cflags_cc, ' ') - - # Instead we must... - cflags = config.get("cflags", []) - cflags_c = config.get("cflags_c", []) - cflags_cxx = config.get("cflags_cc", []) - if xcode_settings: - cflags = xcode_settings.GetCflags(config_to_use) - cflags_c = xcode_settings.GetCflagsC(config_to_use) - cflags_cxx = xcode_settings.GetCflagsCC(config_to_use) - # cflags_objc = xcode_settings.GetCflagsObjC(config_to_use) - # cflags_objcc = xcode_settings.GetCflagsObjCC(config_to_use) - - if (not cflags_c or not c_sources) and (not cflags_cxx or not cxx_sources): - SetTargetProperty(output, cmake_target_name, "COMPILE_FLAGS", cflags, " ") - - elif c_sources and not (s_sources or cxx_sources): - flags = [] - flags.extend(cflags) - flags.extend(cflags_c) - SetTargetProperty(output, cmake_target_name, "COMPILE_FLAGS", flags, " ") - - elif cxx_sources and not (s_sources or c_sources): - flags = [] - flags.extend(cflags) - flags.extend(cflags_cxx) - SetTargetProperty(output, cmake_target_name, "COMPILE_FLAGS", flags, " ") - - else: - # TODO: This is broken, one cannot generally set properties on files, - # as other targets may require different properties on the same files. - if s_sources and cflags: - SetFilesProperty(output, s_sources_name, "COMPILE_FLAGS", cflags, " ") - - if c_sources and (cflags or cflags_c): - flags = [] - flags.extend(cflags) - flags.extend(cflags_c) - SetFilesProperty(output, c_sources_name, "COMPILE_FLAGS", flags, " ") - - if cxx_sources and (cflags or cflags_cxx): - flags = [] - flags.extend(cflags) - flags.extend(cflags_cxx) - SetFilesProperty(output, cxx_sources_name, "COMPILE_FLAGS", flags, " ") - - # Linker flags - ldflags = config.get("ldflags") - if ldflags is not None: - SetTargetProperty(output, cmake_target_name, "LINK_FLAGS", ldflags, " ") - - # XCode settings - xcode_settings = config.get("xcode_settings", {}) - for xcode_setting, xcode_value in xcode_settings.items(): - SetTargetProperty( - output, - cmake_target_name, - "XCODE_ATTRIBUTE_%s" % xcode_setting, - xcode_value, - "" if isinstance(xcode_value, str) else " ", - ) - - # Note on Dependencies and Libraries: - # CMake wants to handle link order, resolving the link line up front. - # Gyp does not retain or enforce specifying enough information to do so. - # So do as other gyp generators and use --start-group and --end-group. - # Give CMake as little information as possible so that it doesn't mess it up. - - # Dependencies - rawDeps = spec.get("dependencies", []) - - static_deps = [] - shared_deps = [] - other_deps = [] - for rawDep in rawDeps: - dep_cmake_name = namer.CreateCMakeTargetName(rawDep) - dep_spec = target_dicts.get(rawDep, {}) - dep_target_type = dep_spec.get("type", None) - - if dep_target_type == "static_library": - static_deps.append(dep_cmake_name) - elif dep_target_type == "shared_library": - shared_deps.append(dep_cmake_name) - else: - other_deps.append(dep_cmake_name) - - # ensure all external dependencies are complete before internal dependencies - # extra_deps currently only depend on their own deps, so otherwise run early - if static_deps or shared_deps or other_deps: - for extra_dep in extra_deps: - output.write("add_dependencies(") - output.write(extra_dep) - output.write("\n") - for deps in (static_deps, shared_deps, other_deps): - for dep in gyp.common.uniquer(deps): - output.write(" ") - output.write(dep) - output.write("\n") - output.write(")\n") - - linkable = target_type in ("executable", "loadable_module", "shared_library") - other_deps.extend(extra_deps) - if other_deps or (not linkable and (static_deps or shared_deps)): - output.write("add_dependencies(") - output.write(cmake_target_name) - output.write("\n") - for dep in gyp.common.uniquer(other_deps): - output.write(" ") - output.write(dep) - output.write("\n") - if not linkable: - for deps in (static_deps, shared_deps): - for lib_dep in gyp.common.uniquer(deps): - output.write(" ") - output.write(lib_dep) - output.write("\n") - output.write(")\n") - - # Libraries - if linkable: - external_libs = [lib for lib in spec.get("libraries", []) if len(lib) > 0] - if external_libs or static_deps or shared_deps: - output.write("target_link_libraries(") - output.write(cmake_target_name) - output.write("\n") - if static_deps: - write_group = circular_libs and len(static_deps) > 1 and flavor != "mac" - if write_group: - output.write("-Wl,--start-group\n") - for dep in gyp.common.uniquer(static_deps): - output.write(" ") - output.write(dep) - output.write("\n") - if write_group: - output.write("-Wl,--end-group\n") - if shared_deps: - for dep in gyp.common.uniquer(shared_deps): - output.write(" ") - output.write(dep) - output.write("\n") - if external_libs: - for lib in gyp.common.uniquer(external_libs): - output.write(' "') - output.write(RemovePrefix(lib, "$(SDKROOT)")) - output.write('"\n') - - output.write(")\n") - - UnsetVariable(output, "TOOLSET") - UnsetVariable(output, "TARGET") - - -def GenerateOutputForConfig(target_list, target_dicts, data, params, config_to_use): - options = params["options"] - generator_flags = params["generator_flags"] - flavor = gyp.common.GetFlavor(params) - - # generator_dir: relative path from pwd to where make puts build files. - # Makes migrating from make to cmake easier, cmake doesn't put anything here. - # Each Gyp configuration creates a different CMakeLists.txt file - # to avoid incompatibilities between Gyp and CMake configurations. - generator_dir = os.path.relpath(options.generator_output or ".") - - # output_dir: relative path from generator_dir to the build directory. - output_dir = generator_flags.get("output_dir", "out") - - # build_dir: relative path from source root to our output files. - # e.g. "out/Debug" - build_dir = os.path.normpath(os.path.join(generator_dir, output_dir, config_to_use)) - - toplevel_build = os.path.join(options.toplevel_dir, build_dir) - - output_file = os.path.join(toplevel_build, "CMakeLists.txt") - gyp.common.EnsureDirExists(output_file) - - output = open(output_file, "w") - output.write("cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)\n") - output.write("cmake_policy(VERSION 2.8.8)\n") - - gyp_file, project_target, _ = gyp.common.ParseQualifiedTarget(target_list[-1]) - output.write("project(") - output.write(project_target) - output.write(")\n") - - SetVariable(output, "configuration", config_to_use) - - ar = None - cc = None - cxx = None - - make_global_settings = data[gyp_file].get("make_global_settings", []) - build_to_top = gyp.common.InvertRelativePath(build_dir, options.toplevel_dir) - for key, value in make_global_settings: - if key == "AR": - ar = os.path.join(build_to_top, value) - if key == "CC": - cc = os.path.join(build_to_top, value) - if key == "CXX": - cxx = os.path.join(build_to_top, value) - - ar = gyp.common.GetEnvironFallback(["AR_target", "AR"], ar) - cc = gyp.common.GetEnvironFallback(["CC_target", "CC"], cc) - cxx = gyp.common.GetEnvironFallback(["CXX_target", "CXX"], cxx) - - if ar: - SetVariable(output, "CMAKE_AR", ar) - if cc: - SetVariable(output, "CMAKE_C_COMPILER", cc) - if cxx: - SetVariable(output, "CMAKE_CXX_COMPILER", cxx) - - # The following appears to be as-yet undocumented. - # http://public.kitware.com/Bug/view.php?id=8392 - output.write("enable_language(ASM)\n") - # ASM-ATT does not support .S files. - # output.write('enable_language(ASM-ATT)\n') - - if cc: - SetVariable(output, "CMAKE_ASM_COMPILER", cc) - - SetVariable(output, "builddir", "${CMAKE_CURRENT_BINARY_DIR}") - SetVariable(output, "obj", "${builddir}/obj") - output.write("\n") - - # TODO: Undocumented/unsupported (the CMake Java generator depends on it). - # CMake by default names the object resulting from foo.c to be foo.c.o. - # Gyp traditionally names the object resulting from foo.c foo.o. - # This should be irrelevant, but some targets extract .o files from .a - # and depend on the name of the extracted .o files. - output.write("set(CMAKE_C_OUTPUT_EXTENSION_REPLACE 1)\n") - output.write("set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)\n") - output.write("\n") - - # Force ninja to use rsp files. Otherwise link and ar lines can get too long, - # resulting in 'Argument list too long' errors. - # However, rsp files don't work correctly on Mac. - if flavor != "mac": - output.write("set(CMAKE_NINJA_FORCE_RESPONSE_FILE 1)\n") - output.write("\n") - - namer = CMakeNamer(target_list) - - # The list of targets upon which the 'all' target should depend. - # CMake has it's own implicit 'all' target, one is not created explicitly. - all_qualified_targets = set() - for build_file in params["build_files"]: - for qualified_target in gyp.common.AllTargets( - target_list, target_dicts, os.path.normpath(build_file) - ): - all_qualified_targets.add(qualified_target) - - for qualified_target in target_list: - if flavor == "mac": - gyp_file, _, _ = gyp.common.ParseQualifiedTarget(qualified_target) - spec = target_dicts[qualified_target] - gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[gyp_file], spec) - - WriteTarget( - namer, - qualified_target, - target_dicts, - build_dir, - config_to_use, - options, - generator_flags, - all_qualified_targets, - flavor, - output, - ) - - output.close() - - -def PerformBuild(data, configurations, params): - options = params["options"] - generator_flags = params["generator_flags"] - - # generator_dir: relative path from pwd to where make puts build files. - # Makes migrating from make to cmake easier, cmake doesn't put anything here. - generator_dir = os.path.relpath(options.generator_output or ".") - - # output_dir: relative path from generator_dir to the build directory. - output_dir = generator_flags.get("output_dir", "out") - - for config_name in configurations: - # build_dir: relative path from source root to our output files. - # e.g. "out/Debug" - build_dir = os.path.normpath( - os.path.join(generator_dir, output_dir, config_name) - ) - arguments = ["cmake", "-G", "Ninja"] - print(f"Generating [{config_name}]: {arguments}") - subprocess.check_call(arguments, cwd=build_dir) - - arguments = ["ninja", "-C", build_dir] - print(f"Building [{config_name}]: {arguments}") - subprocess.check_call(arguments) - - -def CallGenerateOutputForConfig(arglist): - # Ignore the interrupt signal so that the parent process catches it and - # kills all multiprocessing children. - signal.signal(signal.SIGINT, signal.SIG_IGN) - - target_list, target_dicts, data, params, config_name = arglist - GenerateOutputForConfig(target_list, target_dicts, data, params, config_name) - - -def GenerateOutput(target_list, target_dicts, data, params): - user_config = params.get("generator_flags", {}).get("config", None) - if user_config: - GenerateOutputForConfig(target_list, target_dicts, data, params, user_config) - else: - config_names = target_dicts[target_list[0]]["configurations"] - if params["parallel"]: - try: - pool = multiprocessing.Pool(len(config_names)) - arglists = [] - for config_name in config_names: - arglists.append( - (target_list, target_dicts, data, params, config_name) - ) - pool.map(CallGenerateOutputForConfig, arglists) - except KeyboardInterrupt as e: - pool.terminate() - raise e - else: - for config_name in config_names: - GenerateOutputForConfig( - target_list, target_dicts, data, params, config_name - ) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py deleted file mode 100644 index f330a04..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright (c) 2016 Ben Noordhuis . All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import gyp.common -import gyp.xcode_emulation -import json -import os - -generator_additional_non_configuration_keys = [] -generator_additional_path_sections = [] -generator_extra_sources_for_rules = [] -generator_filelist_paths = None -generator_supports_multiple_toolsets = True -generator_wants_sorted_dependencies = False - -# Lifted from make.py. The actual values don't matter much. -generator_default_variables = { - "CONFIGURATION_NAME": "$(BUILDTYPE)", - "EXECUTABLE_PREFIX": "", - "EXECUTABLE_SUFFIX": "", - "INTERMEDIATE_DIR": "$(obj).$(TOOLSET)/$(TARGET)/geni", - "PRODUCT_DIR": "$(builddir)", - "RULE_INPUT_DIRNAME": "%(INPUT_DIRNAME)s", - "RULE_INPUT_EXT": "$(suffix $<)", - "RULE_INPUT_NAME": "$(notdir $<)", - "RULE_INPUT_PATH": "$(abspath $<)", - "RULE_INPUT_ROOT": "%(INPUT_ROOT)s", - "SHARED_INTERMEDIATE_DIR": "$(obj)/gen", - "SHARED_LIB_PREFIX": "lib", - "STATIC_LIB_PREFIX": "lib", - "STATIC_LIB_SUFFIX": ".a", -} - - -def IsMac(params): - return "mac" == gyp.common.GetFlavor(params) - - -def CalculateVariables(default_variables, params): - default_variables.setdefault("OS", gyp.common.GetFlavor(params)) - - -def AddCommandsForTarget(cwd, target, params, per_config_commands): - output_dir = params["generator_flags"].get("output_dir", "out") - for configuration_name, configuration in target["configurations"].items(): - if IsMac(params): - xcode_settings = gyp.xcode_emulation.XcodeSettings(target) - cflags = xcode_settings.GetCflags(configuration_name) - cflags_c = xcode_settings.GetCflagsC(configuration_name) - cflags_cc = xcode_settings.GetCflagsCC(configuration_name) - else: - cflags = configuration.get("cflags", []) - cflags_c = configuration.get("cflags_c", []) - cflags_cc = configuration.get("cflags_cc", []) - - cflags_c = cflags + cflags_c - cflags_cc = cflags + cflags_cc - - defines = configuration.get("defines", []) - defines = ["-D" + s for s in defines] - - # TODO(bnoordhuis) Handle generated source files. - extensions = (".c", ".cc", ".cpp", ".cxx") - sources = [s for s in target.get("sources", []) if s.endswith(extensions)] - - def resolve(filename): - return os.path.abspath(os.path.join(cwd, filename)) - - # TODO(bnoordhuis) Handle generated header files. - include_dirs = configuration.get("include_dirs", []) - include_dirs = [s for s in include_dirs if not s.startswith("$(obj)")] - includes = ["-I" + resolve(s) for s in include_dirs] - - defines = gyp.common.EncodePOSIXShellList(defines) - includes = gyp.common.EncodePOSIXShellList(includes) - cflags_c = gyp.common.EncodePOSIXShellList(cflags_c) - cflags_cc = gyp.common.EncodePOSIXShellList(cflags_cc) - - commands = per_config_commands.setdefault(configuration_name, []) - for source in sources: - file = resolve(source) - isc = source.endswith(".c") - cc = "cc" if isc else "c++" - cflags = cflags_c if isc else cflags_cc - command = " ".join( - ( - cc, - defines, - includes, - cflags, - "-c", - gyp.common.EncodePOSIXShellArgument(file), - ) - ) - commands.append(dict(command=command, directory=output_dir, file=file)) - - -def GenerateOutput(target_list, target_dicts, data, params): - per_config_commands = {} - for qualified_target, target in target_dicts.items(): - build_file, target_name, toolset = gyp.common.ParseQualifiedTarget( - qualified_target - ) - if IsMac(params): - settings = data[build_file] - gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(settings, target) - cwd = os.path.dirname(build_file) - AddCommandsForTarget(cwd, target, params, per_config_commands) - - output_dir = params["generator_flags"].get("output_dir", "out") - for configuration_name, commands in per_config_commands.items(): - filename = os.path.join(output_dir, configuration_name, "compile_commands.json") - gyp.common.EnsureDirExists(filename) - fp = open(filename, "w") - json.dump(commands, fp=fp, indent=0, check_circular=False) - - -def PerformBuild(data, configurations, params): - pass diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py deleted file mode 100644 index 99d5c1f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -import os -import gyp -import gyp.common -import gyp.msvs_emulation -import json - -generator_supports_multiple_toolsets = True - -generator_wants_static_library_dependencies_adjusted = False - -generator_filelist_paths = {} - -generator_default_variables = {} -for dirname in [ - "INTERMEDIATE_DIR", - "SHARED_INTERMEDIATE_DIR", - "PRODUCT_DIR", - "LIB_DIR", - "SHARED_LIB_DIR", -]: - # Some gyp steps fail if these are empty(!). - generator_default_variables[dirname] = "dir" -for unused in [ - "RULE_INPUT_PATH", - "RULE_INPUT_ROOT", - "RULE_INPUT_NAME", - "RULE_INPUT_DIRNAME", - "RULE_INPUT_EXT", - "EXECUTABLE_PREFIX", - "EXECUTABLE_SUFFIX", - "STATIC_LIB_PREFIX", - "STATIC_LIB_SUFFIX", - "SHARED_LIB_PREFIX", - "SHARED_LIB_SUFFIX", - "CONFIGURATION_NAME", -]: - generator_default_variables[unused] = "" - - -def CalculateVariables(default_variables, params): - generator_flags = params.get("generator_flags", {}) - for key, val in generator_flags.items(): - default_variables.setdefault(key, val) - default_variables.setdefault("OS", gyp.common.GetFlavor(params)) - - flavor = gyp.common.GetFlavor(params) - if flavor == "win": - gyp.msvs_emulation.CalculateCommonVariables(default_variables, params) - - -def CalculateGeneratorInputInfo(params): - """Calculate the generator specific info that gets fed to input (called by - gyp).""" - generator_flags = params.get("generator_flags", {}) - if generator_flags.get("adjust_static_libraries", False): - global generator_wants_static_library_dependencies_adjusted - generator_wants_static_library_dependencies_adjusted = True - - toplevel = params["options"].toplevel_dir - generator_dir = os.path.relpath(params["options"].generator_output or ".") - # output_dir: relative path from generator_dir to the build directory. - output_dir = generator_flags.get("output_dir", "out") - qualified_out_dir = os.path.normpath( - os.path.join(toplevel, generator_dir, output_dir, "gypfiles") - ) - global generator_filelist_paths - generator_filelist_paths = { - "toplevel": toplevel, - "qualified_out_dir": qualified_out_dir, - } - - -def GenerateOutput(target_list, target_dicts, data, params): - # Map of target -> list of targets it depends on. - edges = {} - - # Queue of targets to visit. - targets_to_visit = target_list[:] - - while len(targets_to_visit) > 0: - target = targets_to_visit.pop() - if target in edges: - continue - edges[target] = [] - - for dep in target_dicts[target].get("dependencies", []): - edges[target].append(dep) - targets_to_visit.append(dep) - - try: - filepath = params["generator_flags"]["output_dir"] - except KeyError: - filepath = "." - filename = os.path.join(filepath, "dump.json") - f = open(filename, "w") - json.dump(edges, f) - f.close() - print("Wrote json to %s." % filename) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py deleted file mode 100644 index 1ff0dc8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +++ /dev/null @@ -1,464 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""GYP backend that generates Eclipse CDT settings files. - -This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML -files that can be imported into an Eclipse CDT project. The XML file contains a -list of include paths and symbols (i.e. defines). - -Because a full .cproject definition is not created by this generator, it's not -possible to properly define the include dirs and symbols for each file -individually. Instead, one set of includes/symbols is generated for the entire -project. This works fairly well (and is a vast improvement in general), but may -still result in a few indexer issues here and there. - -This generator has no automated tests, so expect it to be broken. -""" - -from xml.sax.saxutils import escape -import os.path -import subprocess -import gyp -import gyp.common -import gyp.msvs_emulation -import shlex -import xml.etree.cElementTree as ET - -generator_wants_static_library_dependencies_adjusted = False - -generator_default_variables = {} - -for dirname in ["INTERMEDIATE_DIR", "PRODUCT_DIR", "LIB_DIR", "SHARED_LIB_DIR"]: - # Some gyp steps fail if these are empty(!), so we convert them to variables - generator_default_variables[dirname] = "$" + dirname - -for unused in [ - "RULE_INPUT_PATH", - "RULE_INPUT_ROOT", - "RULE_INPUT_NAME", - "RULE_INPUT_DIRNAME", - "RULE_INPUT_EXT", - "EXECUTABLE_PREFIX", - "EXECUTABLE_SUFFIX", - "STATIC_LIB_PREFIX", - "STATIC_LIB_SUFFIX", - "SHARED_LIB_PREFIX", - "SHARED_LIB_SUFFIX", - "CONFIGURATION_NAME", -]: - generator_default_variables[unused] = "" - -# Include dirs will occasionally use the SHARED_INTERMEDIATE_DIR variable as -# part of the path when dealing with generated headers. This value will be -# replaced dynamically for each configuration. -generator_default_variables["SHARED_INTERMEDIATE_DIR"] = "$SHARED_INTERMEDIATE_DIR" - - -def CalculateVariables(default_variables, params): - generator_flags = params.get("generator_flags", {}) - for key, val in generator_flags.items(): - default_variables.setdefault(key, val) - flavor = gyp.common.GetFlavor(params) - default_variables.setdefault("OS", flavor) - if flavor == "win": - gyp.msvs_emulation.CalculateCommonVariables(default_variables, params) - - -def CalculateGeneratorInputInfo(params): - """Calculate the generator specific info that gets fed to input (called by - gyp).""" - generator_flags = params.get("generator_flags", {}) - if generator_flags.get("adjust_static_libraries", False): - global generator_wants_static_library_dependencies_adjusted - generator_wants_static_library_dependencies_adjusted = True - - -def GetAllIncludeDirectories( - target_list, - target_dicts, - shared_intermediate_dirs, - config_name, - params, - compiler_path, -): - """Calculate the set of include directories to be used. - - Returns: - A list including all the include_dir's specified for every target followed - by any include directories that were added as cflag compiler options. - """ - - gyp_includes_set = set() - compiler_includes_list = [] - - # Find compiler's default include dirs. - if compiler_path: - command = shlex.split(compiler_path) - command.extend(["-E", "-xc++", "-v", "-"]) - proc = subprocess.Popen( - args=command, - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - ) - output = proc.communicate()[1].decode("utf-8") - # Extract the list of include dirs from the output, which has this format: - # ... - # #include "..." search starts here: - # #include <...> search starts here: - # /usr/include/c++/4.6 - # /usr/local/include - # End of search list. - # ... - in_include_list = False - for line in output.splitlines(): - if line.startswith("#include"): - in_include_list = True - continue - if line.startswith("End of search list."): - break - if in_include_list: - include_dir = line.strip() - if include_dir not in compiler_includes_list: - compiler_includes_list.append(include_dir) - - flavor = gyp.common.GetFlavor(params) - if flavor == "win": - generator_flags = params.get("generator_flags", {}) - for target_name in target_list: - target = target_dicts[target_name] - if config_name in target["configurations"]: - config = target["configurations"][config_name] - - # Look for any include dirs that were explicitly added via cflags. This - # may be done in gyp files to force certain includes to come at the end. - # TODO(jgreenwald): Change the gyp files to not abuse cflags for this, and - # remove this. - if flavor == "win": - msvs_settings = gyp.msvs_emulation.MsvsSettings(target, generator_flags) - cflags = msvs_settings.GetCflags(config_name) - else: - cflags = config["cflags"] - for cflag in cflags: - if cflag.startswith("-I"): - include_dir = cflag[2:] - if include_dir not in compiler_includes_list: - compiler_includes_list.append(include_dir) - - # Find standard gyp include dirs. - if "include_dirs" in config: - include_dirs = config["include_dirs"] - for shared_intermediate_dir in shared_intermediate_dirs: - for include_dir in include_dirs: - include_dir = include_dir.replace( - "$SHARED_INTERMEDIATE_DIR", shared_intermediate_dir - ) - if not os.path.isabs(include_dir): - base_dir = os.path.dirname(target_name) - - include_dir = base_dir + "/" + include_dir - include_dir = os.path.abspath(include_dir) - - gyp_includes_set.add(include_dir) - - # Generate a list that has all the include dirs. - all_includes_list = list(gyp_includes_set) - all_includes_list.sort() - for compiler_include in compiler_includes_list: - if compiler_include not in gyp_includes_set: - all_includes_list.append(compiler_include) - - # All done. - return all_includes_list - - -def GetCompilerPath(target_list, data, options): - """Determine a command that can be used to invoke the compiler. - - Returns: - If this is a gyp project that has explicit make settings, try to determine - the compiler from that. Otherwise, see if a compiler was specified via the - CC_target environment variable. - """ - # First, see if the compiler is configured in make's settings. - build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) - make_global_settings_dict = data[build_file].get("make_global_settings", {}) - for key, value in make_global_settings_dict: - if key in ["CC", "CXX"]: - return os.path.join(options.toplevel_dir, value) - - # Check to see if the compiler was specified as an environment variable. - for key in ["CC_target", "CC", "CXX"]: - compiler = os.environ.get(key) - if compiler: - return compiler - - return "gcc" - - -def GetAllDefines(target_list, target_dicts, data, config_name, params, compiler_path): - """Calculate the defines for a project. - - Returns: - A dict that includes explicit defines declared in gyp files along with all - of the default defines that the compiler uses. - """ - - # Get defines declared in the gyp files. - all_defines = {} - flavor = gyp.common.GetFlavor(params) - if flavor == "win": - generator_flags = params.get("generator_flags", {}) - for target_name in target_list: - target = target_dicts[target_name] - - if flavor == "win": - msvs_settings = gyp.msvs_emulation.MsvsSettings(target, generator_flags) - extra_defines = msvs_settings.GetComputedDefines(config_name) - else: - extra_defines = [] - if config_name in target["configurations"]: - config = target["configurations"][config_name] - target_defines = config["defines"] - else: - target_defines = [] - for define in target_defines + extra_defines: - split_define = define.split("=", 1) - if len(split_define) == 1: - split_define.append("1") - if split_define[0].strip() in all_defines: - # Already defined - continue - all_defines[split_define[0].strip()] = split_define[1].strip() - # Get default compiler defines (if possible). - if flavor == "win": - return all_defines # Default defines already processed in the loop above. - if compiler_path: - command = shlex.split(compiler_path) - command.extend(["-E", "-dM", "-"]) - cpp_proc = subprocess.Popen( - args=command, cwd=".", stdin=subprocess.PIPE, stdout=subprocess.PIPE - ) - cpp_output = cpp_proc.communicate()[0].decode("utf-8") - cpp_lines = cpp_output.split("\n") - for cpp_line in cpp_lines: - if not cpp_line.strip(): - continue - cpp_line_parts = cpp_line.split(" ", 2) - key = cpp_line_parts[1] - if len(cpp_line_parts) >= 3: - val = cpp_line_parts[2] - else: - val = "1" - all_defines[key] = val - - return all_defines - - -def WriteIncludePaths(out, eclipse_langs, include_dirs): - """Write the includes section of a CDT settings export file.""" - - out.write( - '
\n' - ) - out.write(' \n') - for lang in eclipse_langs: - out.write(' \n' % lang) - for include_dir in include_dirs: - out.write( - ' %s\n' - % include_dir - ) - out.write(" \n") - out.write("
\n") - - -def WriteMacros(out, eclipse_langs, defines): - """Write the macros section of a CDT settings export file.""" - - out.write( - '
\n' - ) - out.write(' \n') - for lang in eclipse_langs: - out.write(' \n' % lang) - for key in sorted(defines): - out.write( - " %s%s\n" - % (escape(key), escape(defines[key])) - ) - out.write(" \n") - out.write("
\n") - - -def GenerateOutputForConfig(target_list, target_dicts, data, params, config_name): - options = params["options"] - generator_flags = params.get("generator_flags", {}) - - # build_dir: relative path from source root to our output files. - # e.g. "out/Debug" - build_dir = os.path.join(generator_flags.get("output_dir", "out"), config_name) - - toplevel_build = os.path.join(options.toplevel_dir, build_dir) - # Ninja uses out/Debug/gen while make uses out/Debug/obj/gen as the - # SHARED_INTERMEDIATE_DIR. Include both possible locations. - shared_intermediate_dirs = [ - os.path.join(toplevel_build, "obj", "gen"), - os.path.join(toplevel_build, "gen"), - ] - - GenerateCdtSettingsFile( - target_list, - target_dicts, - data, - params, - config_name, - os.path.join(toplevel_build, "eclipse-cdt-settings.xml"), - options, - shared_intermediate_dirs, - ) - GenerateClasspathFile( - target_list, - target_dicts, - options.toplevel_dir, - toplevel_build, - os.path.join(toplevel_build, "eclipse-classpath.xml"), - ) - - -def GenerateCdtSettingsFile( - target_list, - target_dicts, - data, - params, - config_name, - out_name, - options, - shared_intermediate_dirs, -): - gyp.common.EnsureDirExists(out_name) - with open(out_name, "w") as out: - out.write('\n') - out.write("\n") - - eclipse_langs = [ - "C++ Source File", - "C Source File", - "Assembly Source File", - "GNU C++", - "GNU C", - "Assembly", - ] - compiler_path = GetCompilerPath(target_list, data, options) - include_dirs = GetAllIncludeDirectories( - target_list, - target_dicts, - shared_intermediate_dirs, - config_name, - params, - compiler_path, - ) - WriteIncludePaths(out, eclipse_langs, include_dirs) - defines = GetAllDefines( - target_list, target_dicts, data, config_name, params, compiler_path - ) - WriteMacros(out, eclipse_langs, defines) - - out.write("\n") - - -def GenerateClasspathFile( - target_list, target_dicts, toplevel_dir, toplevel_build, out_name -): - """Generates a classpath file suitable for symbol navigation and code - completion of Java code (such as in Android projects) by finding all - .java and .jar files used as action inputs.""" - gyp.common.EnsureDirExists(out_name) - result = ET.Element("classpath") - - def AddElements(kind, paths): - # First, we need to normalize the paths so they are all relative to the - # toplevel dir. - rel_paths = set() - for path in paths: - if os.path.isabs(path): - rel_paths.add(os.path.relpath(path, toplevel_dir)) - else: - rel_paths.add(path) - - for path in sorted(rel_paths): - entry_element = ET.SubElement(result, "classpathentry") - entry_element.set("kind", kind) - entry_element.set("path", path) - - AddElements("lib", GetJavaJars(target_list, target_dicts, toplevel_dir)) - AddElements("src", GetJavaSourceDirs(target_list, target_dicts, toplevel_dir)) - # Include the standard JRE container and a dummy out folder - AddElements("con", ["org.eclipse.jdt.launching.JRE_CONTAINER"]) - # Include a dummy out folder so that Eclipse doesn't use the default /bin - # folder in the root of the project. - AddElements("output", [os.path.join(toplevel_build, ".eclipse-java-build")]) - - ET.ElementTree(result).write(out_name) - - -def GetJavaJars(target_list, target_dicts, toplevel_dir): - """Generates a sequence of all .jars used as inputs.""" - for target_name in target_list: - target = target_dicts[target_name] - for action in target.get("actions", []): - for input_ in action["inputs"]: - if os.path.splitext(input_)[1] == ".jar" and not input_.startswith("$"): - if os.path.isabs(input_): - yield input_ - else: - yield os.path.join(os.path.dirname(target_name), input_) - - -def GetJavaSourceDirs(target_list, target_dicts, toplevel_dir): - """Generates a sequence of all likely java package root directories.""" - for target_name in target_list: - target = target_dicts[target_name] - for action in target.get("actions", []): - for input_ in action["inputs"]: - if os.path.splitext(input_)[1] == ".java" and not input_.startswith( - "$" - ): - dir_ = os.path.dirname( - os.path.join(os.path.dirname(target_name), input_) - ) - # If there is a parent 'src' or 'java' folder, navigate up to it - - # these are canonical package root names in Chromium. This will - # break if 'src' or 'java' exists in the package structure. This - # could be further improved by inspecting the java file for the - # package name if this proves to be too fragile in practice. - parent_search = dir_ - while os.path.basename(parent_search) not in ["src", "java"]: - parent_search, _ = os.path.split(parent_search) - if not parent_search or parent_search == toplevel_dir: - # Didn't find a known root, just return the original path - yield dir_ - break - else: - yield parent_search - - -def GenerateOutput(target_list, target_dicts, data, params): - """Generate an XML settings file that can be imported into a CDT project.""" - - if params["options"].generator_output: - raise NotImplementedError("--generator_output not implemented for eclipse") - - user_config = params.get("generator_flags", {}).get("config", None) - if user_config: - GenerateOutputForConfig(target_list, target_dicts, data, params, user_config) - else: - config_names = target_dicts[target_list[0]]["configurations"] - for config_name in config_names: - GenerateOutputForConfig( - target_list, target_dicts, data, params, config_name - ) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py deleted file mode 100644 index 4171704..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (c) 2011 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""gypd output module - -This module produces gyp input as its output. Output files are given the -.gypd extension to avoid overwriting the .gyp files that they are generated -from. Internal references to .gyp files (such as those found in -"dependencies" sections) are not adjusted to point to .gypd files instead; -unlike other paths, which are relative to the .gyp or .gypd file, such paths -are relative to the directory from which gyp was run to create the .gypd file. - -This generator module is intended to be a sample and a debugging aid, hence -the "d" for "debug" in .gypd. It is useful to inspect the results of the -various merges, expansions, and conditional evaluations performed by gyp -and to see a representation of what would be fed to a generator module. - -It's not advisable to rename .gypd files produced by this module to .gyp, -because they will have all merges, expansions, and evaluations already -performed and the relevant constructs not present in the output; paths to -dependencies may be wrong; and various sections that do not belong in .gyp -files such as such as "included_files" and "*_excluded" will be present. -Output will also be stripped of comments. This is not intended to be a -general-purpose gyp pretty-printer; for that, you probably just want to -run "pprint.pprint(eval(open('source.gyp').read()))", which will still strip -comments but won't do all of the other things done to this module's output. - -The specific formatting of the output generated by this module is subject -to change. -""" - - -import gyp.common -import pprint - - -# These variables should just be spit back out as variable references. -_generator_identity_variables = [ - "CONFIGURATION_NAME", - "EXECUTABLE_PREFIX", - "EXECUTABLE_SUFFIX", - "INTERMEDIATE_DIR", - "LIB_DIR", - "PRODUCT_DIR", - "RULE_INPUT_ROOT", - "RULE_INPUT_DIRNAME", - "RULE_INPUT_EXT", - "RULE_INPUT_NAME", - "RULE_INPUT_PATH", - "SHARED_INTERMEDIATE_DIR", - "SHARED_LIB_DIR", - "SHARED_LIB_PREFIX", - "SHARED_LIB_SUFFIX", - "STATIC_LIB_PREFIX", - "STATIC_LIB_SUFFIX", -] - -# gypd doesn't define a default value for OS like many other generator -# modules. Specify "-D OS=whatever" on the command line to provide a value. -generator_default_variables = {} - -# gypd supports multiple toolsets -generator_supports_multiple_toolsets = True - -# TODO(mark): This always uses <, which isn't right. The input module should -# notify the generator to tell it which phase it is operating in, and this -# module should use < for the early phase and then switch to > for the late -# phase. Bonus points for carrying @ back into the output too. -for v in _generator_identity_variables: - generator_default_variables[v] = "<(%s)" % v - - -def GenerateOutput(target_list, target_dicts, data, params): - output_files = {} - for qualified_target in target_list: - [input_file, target] = gyp.common.ParseQualifiedTarget(qualified_target)[0:2] - - if input_file[-4:] != ".gyp": - continue - input_file_stem = input_file[:-4] - output_file = input_file_stem + params["options"].suffix + ".gypd" - - output_files[output_file] = output_files.get(output_file, input_file) - - for output_file, input_file in output_files.items(): - output = open(output_file, "w") - pprint.pprint(data[input_file], output) - output.close() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py deleted file mode 100644 index 82a07dd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2011 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""gypsh output module - -gypsh is a GYP shell. It's not really a generator per se. All it does is -fire up an interactive Python session with a few local variables set to the -variables passed to the generator. Like gypd, it's intended as a debugging -aid, to facilitate the exploration of .gyp structures after being processed -by the input module. - -The expected usage is "gyp -f gypsh -D OS=desired_os". -""" - - -import code -import sys - - -# All of this stuff about generator variables was lovingly ripped from gypd.py. -# That module has a much better description of what's going on and why. -_generator_identity_variables = [ - "EXECUTABLE_PREFIX", - "EXECUTABLE_SUFFIX", - "INTERMEDIATE_DIR", - "PRODUCT_DIR", - "RULE_INPUT_ROOT", - "RULE_INPUT_DIRNAME", - "RULE_INPUT_EXT", - "RULE_INPUT_NAME", - "RULE_INPUT_PATH", - "SHARED_INTERMEDIATE_DIR", -] - -generator_default_variables = {} - -for v in _generator_identity_variables: - generator_default_variables[v] = "<(%s)" % v - - -def GenerateOutput(target_list, target_dicts, data, params): - locals = { - "target_list": target_list, - "target_dicts": target_dicts, - "data": data, - } - - # Use a banner that looks like the stock Python one and like what - # code.interact uses by default, but tack on something to indicate what - # locals are available, and identify gypsh. - banner = "Python {} on {}\nlocals.keys() = {}\ngypsh".format( - sys.version, - sys.platform, - repr(sorted(locals.keys())), - ) - - code.interact(banner, local=locals) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py deleted file mode 100644 index c595f20..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +++ /dev/null @@ -1,2518 +0,0 @@ -# Copyright (c) 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# Notes: -# -# This is all roughly based on the Makefile system used by the Linux -# kernel, but is a non-recursive make -- we put the entire dependency -# graph in front of make and let it figure it out. -# -# The code below generates a separate .mk file for each target, but -# all are sourced by the top-level Makefile. This means that all -# variables in .mk-files clobber one another. Be careful to use := -# where appropriate for immediate evaluation, and similarly to watch -# that you're not relying on a variable value to last between different -# .mk files. -# -# TODOs: -# -# Global settings and utility functions are currently stuffed in the -# toplevel Makefile. It may make sense to generate some .mk files on -# the side to keep the files readable. - - -import os -import re -import subprocess -import gyp -import gyp.common -import gyp.xcode_emulation -from gyp.common import GetEnvironFallback - -import hashlib - -generator_default_variables = { - "EXECUTABLE_PREFIX": "", - "EXECUTABLE_SUFFIX": "", - "STATIC_LIB_PREFIX": "lib", - "SHARED_LIB_PREFIX": "lib", - "STATIC_LIB_SUFFIX": ".a", - "INTERMEDIATE_DIR": "$(obj).$(TOOLSET)/$(TARGET)/geni", - "SHARED_INTERMEDIATE_DIR": "$(obj)/gen", - "PRODUCT_DIR": "$(builddir)", - "RULE_INPUT_ROOT": "%(INPUT_ROOT)s", # This gets expanded by Python. - "RULE_INPUT_DIRNAME": "%(INPUT_DIRNAME)s", # This gets expanded by Python. - "RULE_INPUT_PATH": "$(abspath $<)", - "RULE_INPUT_EXT": "$(suffix $<)", - "RULE_INPUT_NAME": "$(notdir $<)", - "CONFIGURATION_NAME": "$(BUILDTYPE)", -} - -# Make supports multiple toolsets -generator_supports_multiple_toolsets = True - -# Request sorted dependencies in the order from dependents to dependencies. -generator_wants_sorted_dependencies = False - -# Placates pylint. -generator_additional_non_configuration_keys = [] -generator_additional_path_sections = [] -generator_extra_sources_for_rules = [] -generator_filelist_paths = None - - -def CalculateVariables(default_variables, params): - """Calculate additional variables for use in the build (called by gyp).""" - flavor = gyp.common.GetFlavor(params) - if flavor == "mac": - default_variables.setdefault("OS", "mac") - default_variables.setdefault("SHARED_LIB_SUFFIX", ".dylib") - default_variables.setdefault( - "SHARED_LIB_DIR", generator_default_variables["PRODUCT_DIR"] - ) - default_variables.setdefault( - "LIB_DIR", generator_default_variables["PRODUCT_DIR"] - ) - - # Copy additional generator configuration data from Xcode, which is shared - # by the Mac Make generator. - import gyp.generator.xcode as xcode_generator - - global generator_additional_non_configuration_keys - generator_additional_non_configuration_keys = getattr( - xcode_generator, "generator_additional_non_configuration_keys", [] - ) - global generator_additional_path_sections - generator_additional_path_sections = getattr( - xcode_generator, "generator_additional_path_sections", [] - ) - global generator_extra_sources_for_rules - generator_extra_sources_for_rules = getattr( - xcode_generator, "generator_extra_sources_for_rules", [] - ) - COMPILABLE_EXTENSIONS.update({".m": "objc", ".mm": "objcxx"}) - else: - operating_system = flavor - if flavor == "android": - operating_system = "linux" # Keep this legacy behavior for now. - default_variables.setdefault("OS", operating_system) - if flavor == "aix": - default_variables.setdefault("SHARED_LIB_SUFFIX", ".a") - else: - default_variables.setdefault("SHARED_LIB_SUFFIX", ".so") - default_variables.setdefault("SHARED_LIB_DIR", "$(builddir)/lib.$(TOOLSET)") - default_variables.setdefault("LIB_DIR", "$(obj).$(TOOLSET)") - - -def CalculateGeneratorInputInfo(params): - """Calculate the generator specific info that gets fed to input (called by - gyp).""" - generator_flags = params.get("generator_flags", {}) - android_ndk_version = generator_flags.get("android_ndk_version", None) - # Android NDK requires a strict link order. - if android_ndk_version: - global generator_wants_sorted_dependencies - generator_wants_sorted_dependencies = True - - output_dir = params["options"].generator_output or params["options"].toplevel_dir - builddir_name = generator_flags.get("output_dir", "out") - qualified_out_dir = os.path.normpath( - os.path.join(output_dir, builddir_name, "gypfiles") - ) - - global generator_filelist_paths - generator_filelist_paths = { - "toplevel": params["options"].toplevel_dir, - "qualified_out_dir": qualified_out_dir, - } - - -# The .d checking code below uses these functions: -# wildcard, sort, foreach, shell, wordlist -# wildcard can handle spaces, the rest can't. -# Since I could find no way to make foreach work with spaces in filenames -# correctly, the .d files have spaces replaced with another character. The .d -# file for -# Chromium\ Framework.framework/foo -# is for example -# out/Release/.deps/out/Release/Chromium?Framework.framework/foo -# This is the replacement character. -SPACE_REPLACEMENT = "?" - - -LINK_COMMANDS_LINUX = """\ -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) - -# Due to circular dependencies between libraries :(, we wrap the -# special "figure out circular dependencies" flags around the entire -# input list during linking. -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group - -# We support two kinds of shared objects (.so): -# 1) shared_library, which is just bundling together many dependent libraries -# into a link line. -# 2) loadable_module, which is generating a module intended for dlopen(). -# -# They differ only slightly: -# In the former case, we want to package all dependent code into the .so. -# In the latter case, we want to package just the API exposed by the -# outermost module. -# This means shared_library uses --whole-archive, while loadable_module doesn't. -# (Note that --whole-archive is incompatible with the --start-group used in -# normal linking.) - -# Other shared-object link notes: -# - Set SONAME to the library filename so our binaries don't reference -# the local, absolute paths used on the link command-line. -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS) -""" # noqa: E501 - -LINK_COMMANDS_MAC = """\ -quiet_cmd_alink = LIBTOOL-STATIC $@ -cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^) - -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -""" # noqa: E501 - -LINK_COMMANDS_ANDROID = """\ -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) - -# Due to circular dependencies between libraries :(, we wrap the -# special "figure out circular dependencies" flags around the entire -# input list during linking. -quiet_cmd_link = LINK($(TOOLSET)) $@ -quiet_cmd_link_host = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) -cmd_link_host = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) - -# Other shared-object link notes: -# - Set SONAME to the library filename so our binaries don't reference -# the local, absolute paths used on the link command-line. -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS) -quiet_cmd_solink_module_host = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module_host = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -""" # noqa: E501 - - -LINK_COMMANDS_AIX = """\ -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) -X32_64 crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) -X32_64 crs $@ $(filter %.o,$^) - -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -""" # noqa: E501 - - -LINK_COMMANDS_OS390 = """\ -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) - -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) -Wl,DLL - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -Wl,DLL -""" # noqa: E501 - - -# Header of toplevel Makefile. -# This should go into the build tree, but it's easier to keep it here for now. -SHARED_HEADER = ( - """\ -# We borrow heavily from the kernel build setup, though we are simpler since -# we don't have Kconfig tweaking settings on us. - -# The implicit make rules have it looking for RCS files, among other things. -# We instead explicitly write all the rules we care about. -# It's even quicker (saves ~200ms) to pass -r on the command line. -MAKEFLAGS=-r - -# The source directory tree. -srcdir := %(srcdir)s -abs_srcdir := $(abspath $(srcdir)) - -# The name of the builddir. -builddir_name ?= %(builddir)s - -# The V=1 flag on command line makes us verbosely print command lines. -ifdef V - quiet= -else - quiet=quiet_ -endif - -# Specify BUILDTYPE=Release on the command line for a release build. -BUILDTYPE ?= %(default_configuration)s - -# Directory all our build output goes into. -# Note that this must be two directories beneath src/ for unit tests to pass, -# as they reach into the src/ directory for data with relative paths. -builddir ?= $(builddir_name)/$(BUILDTYPE) -abs_builddir := $(abspath $(builddir)) -depsdir := $(builddir)/.deps - -# Object output directory. -obj := $(builddir)/obj -abs_obj := $(abspath $(obj)) - -# We build up a list of every single one of the targets so we can slurp in the -# generated dependency rule Makefiles in one pass. -all_deps := - -%(make_global_settings)s - -CC.target ?= %(CC.target)s -CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS) -CXX.target ?= %(CXX.target)s -CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS) -LINK.target ?= %(LINK.target)s -LDFLAGS.target ?= $(LDFLAGS) -AR.target ?= $(AR) - -# C++ apps need to be linked with g++. -LINK ?= $(CXX.target) - -# TODO(evan): move all cross-compilation logic to gyp-time so we don't need -# to replicate this environment fallback in make as well. -CC.host ?= %(CC.host)s -CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host) -CXX.host ?= %(CXX.host)s -CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host) -LINK.host ?= %(LINK.host)s -LDFLAGS.host ?= $(LDFLAGS_host) -AR.host ?= %(AR.host)s - -# Define a dir function that can handle spaces. -# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions -# "leading spaces cannot appear in the text of the first argument as written. -# These characters can be put into the argument value by variable substitution." -empty := -space := $(empty) $(empty) - -# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces -replace_spaces = $(subst $(space),""" - + SPACE_REPLACEMENT - + """,$1) -unreplace_spaces = $(subst """ - + SPACE_REPLACEMENT - + """,$(space),$1) -dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1))) - -# Flags to make gcc output dependency info. Note that you need to be -# careful here to use the flags that ccache and distcc can understand. -# We write to a dep file on the side first and then rename at the end -# so we can't end up with a broken dep file. -depfile = $(depsdir)/$(call replace_spaces,$@).d -DEPFLAGS = %(makedep_args)s -MF $(depfile).raw - -# We have to fixup the deps output in a few ways. -# (1) the file output should mention the proper .o file. -# ccache or distcc lose the path to the target, so we convert a rule of -# the form: -# foobar.o: DEP1 DEP2 -# into -# path/to/foobar.o: DEP1 DEP2 -# (2) we want missing files not to cause us to fail to build. -# We want to rewrite -# foobar.o: DEP1 DEP2 \\ -# DEP3 -# to -# DEP1: -# DEP2: -# DEP3: -# so if the files are missing, they're just considered phony rules. -# We have to do some pretty insane escaping to get those backslashes -# and dollar signs past make, the shell, and sed at the same time. -# Doesn't work with spaces, but that's fine: .d files have spaces in -# their names replaced with other characters.""" - r""" -define fixup_dep -# The depfile may not exist if the input file didn't have any #includes. -touch $(depfile).raw -# Fixup path as in (1). -sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile) -# Add extra rules as in (2). -# We remove slashes and replace spaces with new lines; -# remove blank lines; -# delete the first line and append a colon to the remaining lines. -sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ - grep -v '^$$' |\ - sed -e 1d -e 's|$$|:|' \ - >> $(depfile) -rm $(depfile).raw -endef -""" - """ -# Command definitions: -# - cmd_foo is the actual command to run; -# - quiet_cmd_foo is the brief-output summary of the command. - -quiet_cmd_cc = CC($(TOOLSET)) $@ -cmd_cc = $(CC.$(TOOLSET)) -o $@ $< $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c - -quiet_cmd_cxx = CXX($(TOOLSET)) $@ -cmd_cxx = $(CXX.$(TOOLSET)) -o $@ $< $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -%(extra_commands)s -quiet_cmd_touch = TOUCH $@ -cmd_touch = touch $@ - -quiet_cmd_copy = COPY $@ -# send stderr to /dev/null to ignore messages when linking directories. -cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp %(copy_archive_args)s "$<" "$@") - -%(link_commands)s -""" # noqa: E501 - r""" -# Define an escape_quotes function to escape single quotes. -# This allows us to handle quotes properly as long as we always use -# use single quotes and escape_quotes. -escape_quotes = $(subst ','\'',$(1)) -# This comment is here just to include a ' to unconfuse syntax highlighting. -# Define an escape_vars function to escape '$' variable syntax. -# This allows us to read/write command lines with shell variables (e.g. -# $LD_LIBRARY_PATH), without triggering make substitution. -escape_vars = $(subst $$,$$$$,$(1)) -# Helper that expands to a shell command to echo a string exactly as it is in -# make. This uses printf instead of echo because printf's behaviour with respect -# to escape sequences is more portable than echo's across different shells -# (e.g., dash, bash). -exact_echo = printf '%%s\n' '$(call escape_quotes,$(1))' -""" - """ -# Helper to compare the command we're about to run against the command -# we logged the last time we ran the command. Produces an empty -# string (false) when the commands match. -# Tricky point: Make has no string-equality test function. -# The kernel uses the following, but it seems like it would have false -# positives, where one string reordered its arguments. -# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \\ -# $(filter-out $(cmd_$@), $(cmd_$(1)))) -# We instead substitute each for the empty string into the other, and -# say they're equal if both substitutions produce the empty string. -# .d files contain """ - + SPACE_REPLACEMENT - + """ instead of spaces, take that into account. -command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\\ - $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) - -# Helper that is non-empty when a prerequisite changes. -# Normally make does this implicitly, but we force rules to always run -# so we can check their command lines. -# $? -- new prerequisites -# $| -- order-only dependencies -prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) - -# Helper that executes all postbuilds until one fails. -define do_postbuilds - @E=0;\\ - for p in $(POSTBUILDS); do\\ - eval $$p;\\ - E=$$?;\\ - if [ $$E -ne 0 ]; then\\ - break;\\ - fi;\\ - done;\\ - if [ $$E -ne 0 ]; then\\ - rm -rf "$@";\\ - exit $$E;\\ - fi -endef - -# do_cmd: run a command via the above cmd_foo names, if necessary. -# Should always run for a given target to handle command-line changes. -# Second argument, if non-zero, makes it do asm/C/C++ dependency munging. -# Third argument, if non-zero, makes it do POSTBUILDS processing. -# Note: We intentionally do NOT call dirx for depfile, since it contains """ - + SPACE_REPLACEMENT - + """ for -# spaces already and dirx strips the """ - + SPACE_REPLACEMENT - + """ characters. -define do_cmd -$(if $(or $(command_changed),$(prereq_changed)), - @$(call exact_echo, $($(quiet)cmd_$(1))) - @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" - $(if $(findstring flock,$(word %(flock_index)d,$(cmd_$1))), - @$(cmd_$(1)) - @echo " $(quiet_cmd_$(1)): Finished", - @$(cmd_$(1)) - ) - @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) - @$(if $(2),$(fixup_dep)) - $(if $(and $(3), $(POSTBUILDS)), - $(call do_postbuilds) - ) -) -endef - -# Declare the "%(default_target)s" target first so it is the default, -# even though we don't have the deps yet. -.PHONY: %(default_target)s -%(default_target)s: - -# make looks for ways to re-generate included makefiles, but in our case, we -# don't have a direct way. Explicitly telling make that it has nothing to do -# for them makes it go faster. -%%.d: ; - -# Use FORCE_DO_CMD to force a target to run. Should be coupled with -# do_cmd. -.PHONY: FORCE_DO_CMD -FORCE_DO_CMD: - -""" # noqa: E501 -) - -SHARED_HEADER_MAC_COMMANDS = """ -quiet_cmd_objc = CXX($(TOOLSET)) $@ -cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< - -quiet_cmd_objcxx = CXX($(TOOLSET)) $@ -cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< - -# Commands for precompiled header files. -quiet_cmd_pch_c = CXX($(TOOLSET)) $@ -cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< -quiet_cmd_pch_cc = CXX($(TOOLSET)) $@ -cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< -quiet_cmd_pch_m = CXX($(TOOLSET)) $@ -cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< -quiet_cmd_pch_mm = CXX($(TOOLSET)) $@ -cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< - -# gyp-mac-tool is written next to the root Makefile by gyp. -# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd -# already. -quiet_cmd_mac_tool = MACTOOL $(4) $< -cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@" - -quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@ -cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4) - -quiet_cmd_infoplist = INFOPLIST $@ -cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@" -""" # noqa: E501 - - -def WriteRootHeaderSuffixRules(writer): - extensions = sorted(COMPILABLE_EXTENSIONS.keys(), key=str.lower) - - writer.write("# Suffix rules, putting all outputs into $(obj).\n") - for ext in extensions: - writer.write("$(obj).$(TOOLSET)/%%.o: $(srcdir)/%%%s FORCE_DO_CMD\n" % ext) - writer.write("\t@$(call do_cmd,%s,1)\n" % COMPILABLE_EXTENSIONS[ext]) - - writer.write("\n# Try building from generated source, too.\n") - for ext in extensions: - writer.write( - "$(obj).$(TOOLSET)/%%.o: $(obj).$(TOOLSET)/%%%s FORCE_DO_CMD\n" % ext - ) - writer.write("\t@$(call do_cmd,%s,1)\n" % COMPILABLE_EXTENSIONS[ext]) - writer.write("\n") - for ext in extensions: - writer.write("$(obj).$(TOOLSET)/%%.o: $(obj)/%%%s FORCE_DO_CMD\n" % ext) - writer.write("\t@$(call do_cmd,%s,1)\n" % COMPILABLE_EXTENSIONS[ext]) - writer.write("\n") - - -SHARED_HEADER_SUFFIX_RULES_COMMENT1 = """\ -# Suffix rules, putting all outputs into $(obj). -""" - - -SHARED_HEADER_SUFFIX_RULES_COMMENT2 = """\ -# Try building from generated source, too. -""" - - -SHARED_FOOTER = """\ -# "all" is a concatenation of the "all" targets from all the included -# sub-makefiles. This is just here to clarify. -all: - -# Add in dependency-tracking rules. $(all_deps) is the list of every single -# target in our tree. Only consider the ones with .d (dependency) info: -d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) -ifneq ($(d_files),) - include $(d_files) -endif -""" - -header = """\ -# This file is generated by gyp; do not edit. - -""" - -# Maps every compilable file extension to the do_cmd that compiles it. -COMPILABLE_EXTENSIONS = { - ".c": "cc", - ".cc": "cxx", - ".cpp": "cxx", - ".cxx": "cxx", - ".s": "cc", - ".S": "cc", -} - - -def Compilable(filename): - """Return true if the file is compilable (should be in OBJS).""" - for res in (filename.endswith(e) for e in COMPILABLE_EXTENSIONS): - if res: - return True - return False - - -def Linkable(filename): - """Return true if the file is linkable (should be on the link line).""" - return filename.endswith(".o") - - -def Target(filename): - """Translate a compilable filename to its .o target.""" - return os.path.splitext(filename)[0] + ".o" - - -def EscapeShellArgument(s): - """Quotes an argument so that it will be interpreted literally by a POSIX - shell. Taken from - http://stackoverflow.com/questions/35817/whats-the-best-way-to-escape-ossystem-calls-in-python - """ - return "'" + s.replace("'", "'\\''") + "'" - - -def EscapeMakeVariableExpansion(s): - """Make has its own variable expansion syntax using $. We must escape it for - string to be interpreted literally.""" - return s.replace("$", "$$") - - -def EscapeCppDefine(s): - """Escapes a CPP define so that it will reach the compiler unaltered.""" - s = EscapeShellArgument(s) - s = EscapeMakeVariableExpansion(s) - # '#' characters must be escaped even embedded in a string, else Make will - # treat it as the start of a comment. - return s.replace("#", r"\#") - - -def QuoteIfNecessary(string): - """TODO: Should this ideally be replaced with one or more of the above - functions?""" - if '"' in string: - string = '"' + string.replace('"', '\\"') + '"' - return string - - -def StringToMakefileVariable(string): - """Convert a string to a value that is acceptable as a make variable name.""" - return re.sub("[^a-zA-Z0-9_]", "_", string) - - -srcdir_prefix = "" - - -def Sourceify(path): - """Convert a path to its source directory form.""" - if "$(" in path: - return path - if os.path.isabs(path): - return path - return srcdir_prefix + path - - -def QuoteSpaces(s, quote=r"\ "): - return s.replace(" ", quote) - - -def SourceifyAndQuoteSpaces(path): - """Convert a path to its source directory form and quote spaces.""" - return QuoteSpaces(Sourceify(path)) - - -# Map from qualified target to path to output. -target_outputs = {} -# Map from qualified target to any linkable output. A subset -# of target_outputs. E.g. when mybinary depends on liba, we want to -# include liba in the linker line; when otherbinary depends on -# mybinary, we just want to build mybinary first. -target_link_deps = {} - - -class MakefileWriter: - """MakefileWriter packages up the writing of one target-specific foobar.mk. - - Its only real entry point is Write(), and is mostly used for namespacing. - """ - - def __init__(self, generator_flags, flavor): - self.generator_flags = generator_flags - self.flavor = flavor - - self.suffix_rules_srcdir = {} - self.suffix_rules_objdir1 = {} - self.suffix_rules_objdir2 = {} - - # Generate suffix rules for all compilable extensions. - for ext in COMPILABLE_EXTENSIONS.keys(): - # Suffix rules for source folder. - self.suffix_rules_srcdir.update( - { - ext: ( - """\ -$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(srcdir)/%%%s FORCE_DO_CMD -\t@$(call do_cmd,%s,1) -""" - % (ext, COMPILABLE_EXTENSIONS[ext]) - ) - } - ) - - # Suffix rules for generated source files. - self.suffix_rules_objdir1.update( - { - ext: ( - """\ -$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj).$(TOOLSET)/%%%s FORCE_DO_CMD -\t@$(call do_cmd,%s,1) -""" - % (ext, COMPILABLE_EXTENSIONS[ext]) - ) - } - ) - self.suffix_rules_objdir2.update( - { - ext: ( - """\ -$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD -\t@$(call do_cmd,%s,1) -""" - % (ext, COMPILABLE_EXTENSIONS[ext]) - ) - } - ) - - def Write( - self, qualified_target, base_path, output_filename, spec, configs, part_of_all - ): - """The main entry point: writes a .mk file for a single target. - - Arguments: - qualified_target: target we're generating - base_path: path relative to source root we're building in, used to resolve - target-relative paths - output_filename: output .mk file name to write - spec, configs: gyp info - part_of_all: flag indicating this target is part of 'all' - """ - gyp.common.EnsureDirExists(output_filename) - - self.fp = open(output_filename, "w") - - self.fp.write(header) - - self.qualified_target = qualified_target - self.path = base_path - self.target = spec["target_name"] - self.type = spec["type"] - self.toolset = spec["toolset"] - - self.is_mac_bundle = gyp.xcode_emulation.IsMacBundle(self.flavor, spec) - if self.flavor == "mac": - self.xcode_settings = gyp.xcode_emulation.XcodeSettings(spec) - else: - self.xcode_settings = None - - deps, link_deps = self.ComputeDeps(spec) - - # Some of the generation below can add extra output, sources, or - # link dependencies. All of the out params of the functions that - # follow use names like extra_foo. - extra_outputs = [] - extra_sources = [] - extra_link_deps = [] - extra_mac_bundle_resources = [] - mac_bundle_deps = [] - - if self.is_mac_bundle: - self.output = self.ComputeMacBundleOutput(spec) - self.output_binary = self.ComputeMacBundleBinaryOutput(spec) - else: - self.output = self.output_binary = self.ComputeOutput(spec) - - self.is_standalone_static_library = bool( - spec.get("standalone_static_library", 0) - ) - self._INSTALLABLE_TARGETS = ("executable", "loadable_module", "shared_library") - if self.is_standalone_static_library or self.type in self._INSTALLABLE_TARGETS: - self.alias = os.path.basename(self.output) - install_path = self._InstallableTargetInstallPath() - else: - self.alias = self.output - install_path = self.output - - self.WriteLn("TOOLSET := " + self.toolset) - self.WriteLn("TARGET := " + self.target) - - # Actions must come first, since they can generate more OBJs for use below. - if "actions" in spec: - self.WriteActions( - spec["actions"], - extra_sources, - extra_outputs, - extra_mac_bundle_resources, - part_of_all, - ) - - # Rules must be early like actions. - if "rules" in spec: - self.WriteRules( - spec["rules"], - extra_sources, - extra_outputs, - extra_mac_bundle_resources, - part_of_all, - ) - - if "copies" in spec: - self.WriteCopies(spec["copies"], extra_outputs, part_of_all) - - # Bundle resources. - if self.is_mac_bundle: - all_mac_bundle_resources = ( - spec.get("mac_bundle_resources", []) + extra_mac_bundle_resources - ) - self.WriteMacBundleResources(all_mac_bundle_resources, mac_bundle_deps) - self.WriteMacInfoPlist(mac_bundle_deps) - - # Sources. - all_sources = spec.get("sources", []) + extra_sources - if all_sources: - self.WriteSources( - configs, - deps, - all_sources, - extra_outputs, - extra_link_deps, - part_of_all, - gyp.xcode_emulation.MacPrefixHeader( - self.xcode_settings, - lambda p: Sourceify(self.Absolutify(p)), - self.Pchify, - ), - ) - sources = [x for x in all_sources if Compilable(x)] - if sources: - self.WriteLn(SHARED_HEADER_SUFFIX_RULES_COMMENT1) - extensions = {os.path.splitext(s)[1] for s in sources} - for ext in extensions: - if ext in self.suffix_rules_srcdir: - self.WriteLn(self.suffix_rules_srcdir[ext]) - self.WriteLn(SHARED_HEADER_SUFFIX_RULES_COMMENT2) - for ext in extensions: - if ext in self.suffix_rules_objdir1: - self.WriteLn(self.suffix_rules_objdir1[ext]) - for ext in extensions: - if ext in self.suffix_rules_objdir2: - self.WriteLn(self.suffix_rules_objdir2[ext]) - self.WriteLn("# End of this set of suffix rules") - - # Add dependency from bundle to bundle binary. - if self.is_mac_bundle: - mac_bundle_deps.append(self.output_binary) - - self.WriteTarget( - spec, - configs, - deps, - extra_link_deps + link_deps, - mac_bundle_deps, - extra_outputs, - part_of_all, - ) - - # Update global list of target outputs, used in dependency tracking. - target_outputs[qualified_target] = install_path - - # Update global list of link dependencies. - if self.type in ("static_library", "shared_library"): - target_link_deps[qualified_target] = self.output_binary - - # Currently any versions have the same effect, but in future the behavior - # could be different. - if self.generator_flags.get("android_ndk_version", None): - self.WriteAndroidNdkModuleRule(self.target, all_sources, link_deps) - - self.fp.close() - - def WriteSubMake(self, output_filename, makefile_path, targets, build_dir): - """Write a "sub-project" Makefile. - - This is a small, wrapper Makefile that calls the top-level Makefile to build - the targets from a single gyp file (i.e. a sub-project). - - Arguments: - output_filename: sub-project Makefile name to write - makefile_path: path to the top-level Makefile - targets: list of "all" targets for this sub-project - build_dir: build output directory, relative to the sub-project - """ - gyp.common.EnsureDirExists(output_filename) - self.fp = open(output_filename, "w") - self.fp.write(header) - # For consistency with other builders, put sub-project build output in the - # sub-project dir (see test/subdirectory/gyptest-subdir-all.py). - self.WriteLn( - "export builddir_name ?= %s" - % os.path.join(os.path.dirname(output_filename), build_dir) - ) - self.WriteLn(".PHONY: all") - self.WriteLn("all:") - if makefile_path: - makefile_path = " -C " + makefile_path - self.WriteLn("\t$(MAKE){} {}".format(makefile_path, " ".join(targets))) - self.fp.close() - - def WriteActions( - self, - actions, - extra_sources, - extra_outputs, - extra_mac_bundle_resources, - part_of_all, - ): - """Write Makefile code for any 'actions' from the gyp input. - - extra_sources: a list that will be filled in with newly generated source - files, if any - extra_outputs: a list that will be filled in with any outputs of these - actions (used to make other pieces dependent on these - actions) - part_of_all: flag indicating this target is part of 'all' - """ - env = self.GetSortedXcodeEnv() - for action in actions: - name = StringToMakefileVariable( - "{}_{}".format(self.qualified_target, action["action_name"]) - ) - self.WriteLn('### Rules for action "%s":' % action["action_name"]) - inputs = action["inputs"] - outputs = action["outputs"] - - # Build up a list of outputs. - # Collect the output dirs we'll need. - dirs = set() - for out in outputs: - dir = os.path.split(out)[0] - if dir: - dirs.add(dir) - if int(action.get("process_outputs_as_sources", False)): - extra_sources += outputs - if int(action.get("process_outputs_as_mac_bundle_resources", False)): - extra_mac_bundle_resources += outputs - - # Write the actual command. - action_commands = action["action"] - if self.flavor == "mac": - action_commands = [ - gyp.xcode_emulation.ExpandEnvVars(command, env) - for command in action_commands - ] - command = gyp.common.EncodePOSIXShellList(action_commands) - if "message" in action: - self.WriteLn( - "quiet_cmd_{} = ACTION {} $@".format(name, action["message"]) - ) - else: - self.WriteLn(f"quiet_cmd_{name} = ACTION {name} $@") - if len(dirs) > 0: - command = "mkdir -p %s" % " ".join(dirs) + "; " + command - - cd_action = "cd %s; " % Sourceify(self.path or ".") - - # command and cd_action get written to a toplevel variable called - # cmd_foo. Toplevel variables can't handle things that change per - # makefile like $(TARGET), so hardcode the target. - command = command.replace("$(TARGET)", self.target) - cd_action = cd_action.replace("$(TARGET)", self.target) - - # Set LD_LIBRARY_PATH in case the action runs an executable from this - # build which links to shared libs from this build. - # actions run on the host, so they should in theory only use host - # libraries, but until everything is made cross-compile safe, also use - # target libraries. - # TODO(piman): when everything is cross-compile safe, remove lib.target - self.WriteLn( - "cmd_%s = LD_LIBRARY_PATH=$(builddir)/lib.host:" - "$(builddir)/lib.target:$$LD_LIBRARY_PATH; " - "export LD_LIBRARY_PATH; " - "%s%s" % (name, cd_action, command) - ) - self.WriteLn() - outputs = [self.Absolutify(o) for o in outputs] - # The makefile rules are all relative to the top dir, but the gyp actions - # are defined relative to their containing dir. This replaces the obj - # variable for the action rule with an absolute version so that the output - # goes in the right place. - # Only write the 'obj' and 'builddir' rules for the "primary" output (:1); - # it's superfluous for the "extra outputs", and this avoids accidentally - # writing duplicate dummy rules for those outputs. - # Same for environment. - self.WriteLn("%s: obj := $(abs_obj)" % QuoteSpaces(outputs[0])) - self.WriteLn("%s: builddir := $(abs_builddir)" % QuoteSpaces(outputs[0])) - self.WriteSortedXcodeEnv(outputs[0], self.GetSortedXcodeEnv()) - - for input in inputs: - assert " " not in input, ( - "Spaces in action input filenames not supported (%s)" % input - ) - for output in outputs: - assert " " not in output, ( - "Spaces in action output filenames not supported (%s)" % output - ) - - # See the comment in WriteCopies about expanding env vars. - outputs = [gyp.xcode_emulation.ExpandEnvVars(o, env) for o in outputs] - inputs = [gyp.xcode_emulation.ExpandEnvVars(i, env) for i in inputs] - - self.WriteDoCmd( - outputs, - [Sourceify(self.Absolutify(i)) for i in inputs], - part_of_all=part_of_all, - command=name, - ) - - # Stuff the outputs in a variable so we can refer to them later. - outputs_variable = "action_%s_outputs" % name - self.WriteLn("{} := {}".format(outputs_variable, " ".join(outputs))) - extra_outputs.append("$(%s)" % outputs_variable) - self.WriteLn() - - self.WriteLn() - - def WriteRules( - self, - rules, - extra_sources, - extra_outputs, - extra_mac_bundle_resources, - part_of_all, - ): - """Write Makefile code for any 'rules' from the gyp input. - - extra_sources: a list that will be filled in with newly generated source - files, if any - extra_outputs: a list that will be filled in with any outputs of these - rules (used to make other pieces dependent on these rules) - part_of_all: flag indicating this target is part of 'all' - """ - env = self.GetSortedXcodeEnv() - for rule in rules: - name = StringToMakefileVariable( - "{}_{}".format(self.qualified_target, rule["rule_name"]) - ) - count = 0 - self.WriteLn("### Generated for rule %s:" % name) - - all_outputs = [] - - for rule_source in rule.get("rule_sources", []): - dirs = set() - (rule_source_dirname, rule_source_basename) = os.path.split(rule_source) - (rule_source_root, rule_source_ext) = os.path.splitext( - rule_source_basename - ) - - outputs = [ - self.ExpandInputRoot(out, rule_source_root, rule_source_dirname) - for out in rule["outputs"] - ] - - for out in outputs: - dir = os.path.dirname(out) - if dir: - dirs.add(dir) - if int(rule.get("process_outputs_as_sources", False)): - extra_sources += outputs - if int(rule.get("process_outputs_as_mac_bundle_resources", False)): - extra_mac_bundle_resources += outputs - inputs = [ - Sourceify(self.Absolutify(i)) - for i in [rule_source] + rule.get("inputs", []) - ] - actions = ["$(call do_cmd,%s_%d)" % (name, count)] - - if name == "resources_grit": - # HACK: This is ugly. Grit intentionally doesn't touch the - # timestamp of its output file when the file doesn't change, - # which is fine in hash-based dependency systems like scons - # and forge, but not kosher in the make world. After some - # discussion, hacking around it here seems like the least - # amount of pain. - actions += ["@touch --no-create $@"] - - # See the comment in WriteCopies about expanding env vars. - outputs = [gyp.xcode_emulation.ExpandEnvVars(o, env) for o in outputs] - inputs = [gyp.xcode_emulation.ExpandEnvVars(i, env) for i in inputs] - - outputs = [self.Absolutify(o) for o in outputs] - all_outputs += outputs - # Only write the 'obj' and 'builddir' rules for the "primary" output - # (:1); it's superfluous for the "extra outputs", and this avoids - # accidentally writing duplicate dummy rules for those outputs. - self.WriteLn("%s: obj := $(abs_obj)" % outputs[0]) - self.WriteLn("%s: builddir := $(abs_builddir)" % outputs[0]) - self.WriteMakeRule( - outputs, inputs, actions, command="%s_%d" % (name, count) - ) - # Spaces in rule filenames are not supported, but rule variables have - # spaces in them (e.g. RULE_INPUT_PATH expands to '$(abspath $<)'). - # The spaces within the variables are valid, so remove the variables - # before checking. - variables_with_spaces = re.compile(r"\$\([^ ]* \$<\)") - for output in outputs: - output = re.sub(variables_with_spaces, "", output) - assert " " not in output, ( - "Spaces in rule filenames not yet supported (%s)" % output - ) - self.WriteLn("all_deps += %s" % " ".join(outputs)) - - action = [ - self.ExpandInputRoot(ac, rule_source_root, rule_source_dirname) - for ac in rule["action"] - ] - mkdirs = "" - if len(dirs) > 0: - mkdirs = "mkdir -p %s; " % " ".join(dirs) - cd_action = "cd %s; " % Sourceify(self.path or ".") - - # action, cd_action, and mkdirs get written to a toplevel variable - # called cmd_foo. Toplevel variables can't handle things that change - # per makefile like $(TARGET), so hardcode the target. - if self.flavor == "mac": - action = [ - gyp.xcode_emulation.ExpandEnvVars(command, env) - for command in action - ] - action = gyp.common.EncodePOSIXShellList(action) - action = action.replace("$(TARGET)", self.target) - cd_action = cd_action.replace("$(TARGET)", self.target) - mkdirs = mkdirs.replace("$(TARGET)", self.target) - - # Set LD_LIBRARY_PATH in case the rule runs an executable from this - # build which links to shared libs from this build. - # rules run on the host, so they should in theory only use host - # libraries, but until everything is made cross-compile safe, also use - # target libraries. - # TODO(piman): when everything is cross-compile safe, remove lib.target - self.WriteLn( - "cmd_%(name)s_%(count)d = LD_LIBRARY_PATH=" - "$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; " - "export LD_LIBRARY_PATH; " - "%(cd_action)s%(mkdirs)s%(action)s" - % { - "action": action, - "cd_action": cd_action, - "count": count, - "mkdirs": mkdirs, - "name": name, - } - ) - self.WriteLn( - "quiet_cmd_%(name)s_%(count)d = RULE %(name)s_%(count)d $@" - % {"count": count, "name": name} - ) - self.WriteLn() - count += 1 - - outputs_variable = "rule_%s_outputs" % name - self.WriteList(all_outputs, outputs_variable) - extra_outputs.append("$(%s)" % outputs_variable) - - self.WriteLn("### Finished generating for rule: %s" % name) - self.WriteLn() - self.WriteLn("### Finished generating for all rules") - self.WriteLn("") - - def WriteCopies(self, copies, extra_outputs, part_of_all): - """Write Makefile code for any 'copies' from the gyp input. - - extra_outputs: a list that will be filled in with any outputs of this action - (used to make other pieces dependent on this action) - part_of_all: flag indicating this target is part of 'all' - """ - self.WriteLn("### Generated for copy rule.") - - variable = StringToMakefileVariable(self.qualified_target + "_copies") - outputs = [] - for copy in copies: - for path in copy["files"]: - # Absolutify() may call normpath, and will strip trailing slashes. - path = Sourceify(self.Absolutify(path)) - filename = os.path.split(path)[1] - output = Sourceify( - self.Absolutify(os.path.join(copy["destination"], filename)) - ) - - # If the output path has variables in it, which happens in practice for - # 'copies', writing the environment as target-local doesn't work, - # because the variables are already needed for the target name. - # Copying the environment variables into global make variables doesn't - # work either, because then the .d files will potentially contain spaces - # after variable expansion, and .d file handling cannot handle spaces. - # As a workaround, manually expand variables at gyp time. Since 'copies' - # can't run scripts, there's no need to write the env then. - # WriteDoCmd() will escape spaces for .d files. - env = self.GetSortedXcodeEnv() - output = gyp.xcode_emulation.ExpandEnvVars(output, env) - path = gyp.xcode_emulation.ExpandEnvVars(path, env) - self.WriteDoCmd([output], [path], "copy", part_of_all) - outputs.append(output) - self.WriteLn( - "{} = {}".format(variable, " ".join(QuoteSpaces(o) for o in outputs)) - ) - extra_outputs.append("$(%s)" % variable) - self.WriteLn() - - def WriteMacBundleResources(self, resources, bundle_deps): - """Writes Makefile code for 'mac_bundle_resources'.""" - self.WriteLn("### Generated for mac_bundle_resources") - - for output, res in gyp.xcode_emulation.GetMacBundleResources( - generator_default_variables["PRODUCT_DIR"], - self.xcode_settings, - [Sourceify(self.Absolutify(r)) for r in resources], - ): - _, ext = os.path.splitext(output) - if ext != ".xcassets": - # Make does not supports '.xcassets' emulation. - self.WriteDoCmd( - [output], [res], "mac_tool,,,copy-bundle-resource", part_of_all=True - ) - bundle_deps.append(output) - - def WriteMacInfoPlist(self, bundle_deps): - """Write Makefile code for bundle Info.plist files.""" - info_plist, out, defines, extra_env = gyp.xcode_emulation.GetMacInfoPlist( - generator_default_variables["PRODUCT_DIR"], - self.xcode_settings, - lambda p: Sourceify(self.Absolutify(p)), - ) - if not info_plist: - return - if defines: - # Create an intermediate file to store preprocessed results. - intermediate_plist = "$(obj).$(TOOLSET)/$(TARGET)/" + os.path.basename( - info_plist - ) - self.WriteList( - defines, - intermediate_plist + ": INFOPLIST_DEFINES", - "-D", - quoter=EscapeCppDefine, - ) - self.WriteMakeRule( - [intermediate_plist], - [info_plist], - [ - "$(call do_cmd,infoplist)", - # "Convert" the plist so that any weird whitespace changes from the - # preprocessor do not affect the XML parser in mac_tool. - "@plutil -convert xml1 $@ $@", - ], - ) - info_plist = intermediate_plist - # plists can contain envvars and substitute them into the file. - self.WriteSortedXcodeEnv( - out, self.GetSortedXcodeEnv(additional_settings=extra_env) - ) - self.WriteDoCmd( - [out], [info_plist], "mac_tool,,,copy-info-plist", part_of_all=True - ) - bundle_deps.append(out) - - def WriteSources( - self, - configs, - deps, - sources, - extra_outputs, - extra_link_deps, - part_of_all, - precompiled_header, - ): - """Write Makefile code for any 'sources' from the gyp input. - These are source files necessary to build the current target. - - configs, deps, sources: input from gyp. - extra_outputs: a list of extra outputs this action should be dependent on; - used to serialize action/rules before compilation - extra_link_deps: a list that will be filled in with any outputs of - compilation (to be used in link lines) - part_of_all: flag indicating this target is part of 'all' - """ - - # Write configuration-specific variables for CFLAGS, etc. - for configname in sorted(configs.keys()): - config = configs[configname] - self.WriteList( - config.get("defines"), - "DEFS_%s" % configname, - prefix="-D", - quoter=EscapeCppDefine, - ) - - if self.flavor == "mac": - cflags = self.xcode_settings.GetCflags( - configname, arch=config.get("xcode_configuration_platform") - ) - cflags_c = self.xcode_settings.GetCflagsC(configname) - cflags_cc = self.xcode_settings.GetCflagsCC(configname) - cflags_objc = self.xcode_settings.GetCflagsObjC(configname) - cflags_objcc = self.xcode_settings.GetCflagsObjCC(configname) - else: - cflags = config.get("cflags") - cflags_c = config.get("cflags_c") - cflags_cc = config.get("cflags_cc") - - self.WriteLn("# Flags passed to all source files.") - self.WriteList(cflags, "CFLAGS_%s" % configname) - self.WriteLn("# Flags passed to only C files.") - self.WriteList(cflags_c, "CFLAGS_C_%s" % configname) - self.WriteLn("# Flags passed to only C++ files.") - self.WriteList(cflags_cc, "CFLAGS_CC_%s" % configname) - if self.flavor == "mac": - self.WriteLn("# Flags passed to only ObjC files.") - self.WriteList(cflags_objc, "CFLAGS_OBJC_%s" % configname) - self.WriteLn("# Flags passed to only ObjC++ files.") - self.WriteList(cflags_objcc, "CFLAGS_OBJCC_%s" % configname) - includes = config.get("include_dirs") - if includes: - includes = [Sourceify(self.Absolutify(i)) for i in includes] - self.WriteList(includes, "INCS_%s" % configname, prefix="-I") - - compilable = list(filter(Compilable, sources)) - objs = [self.Objectify(self.Absolutify(Target(c))) for c in compilable] - self.WriteList(objs, "OBJS") - - for obj in objs: - assert " " not in obj, "Spaces in object filenames not supported (%s)" % obj - self.WriteLn( - "# Add to the list of files we specially track " "dependencies for." - ) - self.WriteLn("all_deps += $(OBJS)") - self.WriteLn() - - # Make sure our dependencies are built first. - if deps: - self.WriteMakeRule( - ["$(OBJS)"], - deps, - comment="Make sure our dependencies are built " "before any of us.", - order_only=True, - ) - - # Make sure the actions and rules run first. - # If they generate any extra headers etc., the per-.o file dep tracking - # will catch the proper rebuilds, so order only is still ok here. - if extra_outputs: - self.WriteMakeRule( - ["$(OBJS)"], - extra_outputs, - comment="Make sure our actions/rules run " "before any of us.", - order_only=True, - ) - - pchdeps = precompiled_header.GetObjDependencies(compilable, objs) - if pchdeps: - self.WriteLn("# Dependencies from obj files to their precompiled headers") - for source, obj, gch in pchdeps: - self.WriteLn(f"{obj}: {gch}") - self.WriteLn("# End precompiled header dependencies") - - if objs: - extra_link_deps.append("$(OBJS)") - self.WriteLn( - """\ -# CFLAGS et al overrides must be target-local. -# See "Target-specific Variable Values" in the GNU Make manual.""" - ) - self.WriteLn("$(OBJS): TOOLSET := $(TOOLSET)") - self.WriteLn( - "$(OBJS): GYP_CFLAGS := " - "$(DEFS_$(BUILDTYPE)) " - "$(INCS_$(BUILDTYPE)) " - "%s " % precompiled_header.GetInclude("c") + "$(CFLAGS_$(BUILDTYPE)) " - "$(CFLAGS_C_$(BUILDTYPE))" - ) - self.WriteLn( - "$(OBJS): GYP_CXXFLAGS := " - "$(DEFS_$(BUILDTYPE)) " - "$(INCS_$(BUILDTYPE)) " - "%s " % precompiled_header.GetInclude("cc") + "$(CFLAGS_$(BUILDTYPE)) " - "$(CFLAGS_CC_$(BUILDTYPE))" - ) - if self.flavor == "mac": - self.WriteLn( - "$(OBJS): GYP_OBJCFLAGS := " - "$(DEFS_$(BUILDTYPE)) " - "$(INCS_$(BUILDTYPE)) " - "%s " % precompiled_header.GetInclude("m") - + "$(CFLAGS_$(BUILDTYPE)) " - "$(CFLAGS_C_$(BUILDTYPE)) " - "$(CFLAGS_OBJC_$(BUILDTYPE))" - ) - self.WriteLn( - "$(OBJS): GYP_OBJCXXFLAGS := " - "$(DEFS_$(BUILDTYPE)) " - "$(INCS_$(BUILDTYPE)) " - "%s " % precompiled_header.GetInclude("mm") - + "$(CFLAGS_$(BUILDTYPE)) " - "$(CFLAGS_CC_$(BUILDTYPE)) " - "$(CFLAGS_OBJCC_$(BUILDTYPE))" - ) - - self.WritePchTargets(precompiled_header.GetPchBuildCommands()) - - # If there are any object files in our input file list, link them into our - # output. - extra_link_deps += [source for source in sources if Linkable(source)] - - self.WriteLn() - - def WritePchTargets(self, pch_commands): - """Writes make rules to compile prefix headers.""" - if not pch_commands: - return - - for gch, lang_flag, lang, input in pch_commands: - extra_flags = { - "c": "$(CFLAGS_C_$(BUILDTYPE))", - "cc": "$(CFLAGS_CC_$(BUILDTYPE))", - "m": "$(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))", - "mm": "$(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))", - }[lang] - var_name = { - "c": "GYP_PCH_CFLAGS", - "cc": "GYP_PCH_CXXFLAGS", - "m": "GYP_PCH_OBJCFLAGS", - "mm": "GYP_PCH_OBJCXXFLAGS", - }[lang] - self.WriteLn( - f"{gch}: {var_name} := {lang_flag} " + "$(DEFS_$(BUILDTYPE)) " - "$(INCS_$(BUILDTYPE)) " - "$(CFLAGS_$(BUILDTYPE)) " + extra_flags - ) - - self.WriteLn(f"{gch}: {input} FORCE_DO_CMD") - self.WriteLn("\t@$(call do_cmd,pch_%s,1)" % lang) - self.WriteLn("") - assert " " not in gch, "Spaces in gch filenames not supported (%s)" % gch - self.WriteLn("all_deps += %s" % gch) - self.WriteLn("") - - def ComputeOutputBasename(self, spec): - """Return the 'output basename' of a gyp spec. - - E.g., the loadable module 'foobar' in directory 'baz' will produce - 'libfoobar.so' - """ - assert not self.is_mac_bundle - - if self.flavor == "mac" and self.type in ( - "static_library", - "executable", - "shared_library", - "loadable_module", - ): - return self.xcode_settings.GetExecutablePath() - - target = spec["target_name"] - target_prefix = "" - target_ext = "" - if self.type == "static_library": - if target[:3] == "lib": - target = target[3:] - target_prefix = "lib" - target_ext = ".a" - elif self.type in ("loadable_module", "shared_library"): - if target[:3] == "lib": - target = target[3:] - target_prefix = "lib" - if self.flavor == "aix": - target_ext = ".a" - else: - target_ext = ".so" - elif self.type == "none": - target = "%s.stamp" % target - elif self.type != "executable": - print( - "ERROR: What output file should be generated?", - "type", - self.type, - "target", - target, - ) - - target_prefix = spec.get("product_prefix", target_prefix) - target = spec.get("product_name", target) - product_ext = spec.get("product_extension") - if product_ext: - target_ext = "." + product_ext - - return target_prefix + target + target_ext - - def _InstallImmediately(self): - return ( - self.toolset == "target" - and self.flavor == "mac" - and self.type - in ("static_library", "executable", "shared_library", "loadable_module") - ) - - def ComputeOutput(self, spec): - """Return the 'output' (full output path) of a gyp spec. - - E.g., the loadable module 'foobar' in directory 'baz' will produce - '$(obj)/baz/libfoobar.so' - """ - assert not self.is_mac_bundle - - path = os.path.join("$(obj)." + self.toolset, self.path) - if self.type == "executable" or self._InstallImmediately(): - path = "$(builddir)" - path = spec.get("product_dir", path) - return os.path.join(path, self.ComputeOutputBasename(spec)) - - def ComputeMacBundleOutput(self, spec): - """Return the 'output' (full output path) to a bundle output directory.""" - assert self.is_mac_bundle - path = generator_default_variables["PRODUCT_DIR"] - return os.path.join(path, self.xcode_settings.GetWrapperName()) - - def ComputeMacBundleBinaryOutput(self, spec): - """Return the 'output' (full output path) to the binary in a bundle.""" - path = generator_default_variables["PRODUCT_DIR"] - return os.path.join(path, self.xcode_settings.GetExecutablePath()) - - def ComputeDeps(self, spec): - """Compute the dependencies of a gyp spec. - - Returns a tuple (deps, link_deps), where each is a list of - filenames that will need to be put in front of make for either - building (deps) or linking (link_deps). - """ - deps = [] - link_deps = [] - if "dependencies" in spec: - deps.extend( - [ - target_outputs[dep] - for dep in spec["dependencies"] - if target_outputs[dep] - ] - ) - for dep in spec["dependencies"]: - if dep in target_link_deps: - link_deps.append(target_link_deps[dep]) - deps.extend(link_deps) - # TODO: It seems we need to transitively link in libraries (e.g. -lfoo)? - # This hack makes it work: - # link_deps.extend(spec.get('libraries', [])) - return (gyp.common.uniquer(deps), gyp.common.uniquer(link_deps)) - - def WriteDependencyOnExtraOutputs(self, target, extra_outputs): - self.WriteMakeRule( - [self.output_binary], - extra_outputs, - comment="Build our special outputs first.", - order_only=True, - ) - - def WriteTarget( - self, spec, configs, deps, link_deps, bundle_deps, extra_outputs, part_of_all - ): - """Write Makefile code to produce the final target of the gyp spec. - - spec, configs: input from gyp. - deps, link_deps: dependency lists; see ComputeDeps() - extra_outputs: any extra outputs that our target should depend on - part_of_all: flag indicating this target is part of 'all' - """ - - self.WriteLn("### Rules for final target.") - - if extra_outputs: - self.WriteDependencyOnExtraOutputs(self.output_binary, extra_outputs) - self.WriteMakeRule( - extra_outputs, - deps, - comment=("Preserve order dependency of " "special output on deps."), - order_only=True, - ) - - target_postbuilds = {} - if self.type != "none": - for configname in sorted(configs.keys()): - config = configs[configname] - if self.flavor == "mac": - ldflags = self.xcode_settings.GetLdflags( - configname, - generator_default_variables["PRODUCT_DIR"], - lambda p: Sourceify(self.Absolutify(p)), - arch=config.get("xcode_configuration_platform"), - ) - - # TARGET_POSTBUILDS_$(BUILDTYPE) is added to postbuilds later on. - gyp_to_build = gyp.common.InvertRelativePath(self.path) - target_postbuild = self.xcode_settings.AddImplicitPostbuilds( - configname, - QuoteSpaces( - os.path.normpath(os.path.join(gyp_to_build, self.output)) - ), - QuoteSpaces( - os.path.normpath( - os.path.join(gyp_to_build, self.output_binary) - ) - ), - ) - if target_postbuild: - target_postbuilds[configname] = target_postbuild - else: - ldflags = config.get("ldflags", []) - # Compute an rpath for this output if needed. - if any(dep.endswith(".so") or ".so." in dep for dep in deps): - # We want to get the literal string "$ORIGIN" - # into the link command, so we need lots of escaping. - ldflags.append(r"-Wl,-rpath=\$$ORIGIN/") - ldflags.append(r"-Wl,-rpath-link=\$(builddir)/") - library_dirs = config.get("library_dirs", []) - ldflags += [("-L%s" % library_dir) for library_dir in library_dirs] - self.WriteList(ldflags, "LDFLAGS_%s" % configname) - if self.flavor == "mac": - self.WriteList( - self.xcode_settings.GetLibtoolflags(configname), - "LIBTOOLFLAGS_%s" % configname, - ) - libraries = spec.get("libraries") - if libraries: - # Remove duplicate entries - libraries = gyp.common.uniquer(libraries) - if self.flavor == "mac": - libraries = self.xcode_settings.AdjustLibraries(libraries) - self.WriteList(libraries, "LIBS") - self.WriteLn( - "%s: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))" - % QuoteSpaces(self.output_binary) - ) - self.WriteLn("%s: LIBS := $(LIBS)" % QuoteSpaces(self.output_binary)) - - if self.flavor == "mac": - self.WriteLn( - "%s: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))" - % QuoteSpaces(self.output_binary) - ) - - # Postbuild actions. Like actions, but implicitly depend on the target's - # output. - postbuilds = [] - if self.flavor == "mac": - if target_postbuilds: - postbuilds.append("$(TARGET_POSTBUILDS_$(BUILDTYPE))") - postbuilds.extend(gyp.xcode_emulation.GetSpecPostbuildCommands(spec)) - - if postbuilds: - # Envvars may be referenced by TARGET_POSTBUILDS_$(BUILDTYPE), - # so we must output its definition first, since we declare variables - # using ":=". - self.WriteSortedXcodeEnv(self.output, self.GetSortedXcodePostbuildEnv()) - - for configname in target_postbuilds: - self.WriteLn( - "%s: TARGET_POSTBUILDS_%s := %s" - % ( - QuoteSpaces(self.output), - configname, - gyp.common.EncodePOSIXShellList(target_postbuilds[configname]), - ) - ) - - # Postbuilds expect to be run in the gyp file's directory, so insert an - # implicit postbuild to cd to there. - postbuilds.insert(0, gyp.common.EncodePOSIXShellList(["cd", self.path])) - for i, postbuild in enumerate(postbuilds): - if not postbuild.startswith("$"): - postbuilds[i] = EscapeShellArgument(postbuild) - self.WriteLn("%s: builddir := $(abs_builddir)" % QuoteSpaces(self.output)) - self.WriteLn( - "%s: POSTBUILDS := %s" - % (QuoteSpaces(self.output), " ".join(postbuilds)) - ) - - # A bundle directory depends on its dependencies such as bundle resources - # and bundle binary. When all dependencies have been built, the bundle - # needs to be packaged. - if self.is_mac_bundle: - # If the framework doesn't contain a binary, then nothing depends - # on the actions -- make the framework depend on them directly too. - self.WriteDependencyOnExtraOutputs(self.output, extra_outputs) - - # Bundle dependencies. Note that the code below adds actions to this - # target, so if you move these two lines, move the lines below as well. - self.WriteList([QuoteSpaces(dep) for dep in bundle_deps], "BUNDLE_DEPS") - self.WriteLn("%s: $(BUNDLE_DEPS)" % QuoteSpaces(self.output)) - - # After the framework is built, package it. Needs to happen before - # postbuilds, since postbuilds depend on this. - if self.type in ("shared_library", "loadable_module"): - self.WriteLn( - "\t@$(call do_cmd,mac_package_framework,,,%s)" - % self.xcode_settings.GetFrameworkVersion() - ) - - # Bundle postbuilds can depend on the whole bundle, so run them after - # the bundle is packaged, not already after the bundle binary is done. - if postbuilds: - self.WriteLn("\t@$(call do_postbuilds)") - postbuilds = [] # Don't write postbuilds for target's output. - - # Needed by test/mac/gyptest-rebuild.py. - self.WriteLn("\t@true # No-op, used by tests") - - # Since this target depends on binary and resources which are in - # nested subfolders, the framework directory will be older than - # its dependencies usually. To prevent this rule from executing - # on every build (expensive, especially with postbuilds), expliclity - # update the time on the framework directory. - self.WriteLn("\t@touch -c %s" % QuoteSpaces(self.output)) - - if postbuilds: - assert not self.is_mac_bundle, ( - "Postbuilds for bundles should be done " - "on the bundle, not the binary (target '%s')" % self.target - ) - assert "product_dir" not in spec, ( - "Postbuilds do not work with " "custom product_dir" - ) - - if self.type == "executable": - self.WriteLn( - "%s: LD_INPUTS := %s" - % ( - QuoteSpaces(self.output_binary), - " ".join(QuoteSpaces(dep) for dep in link_deps), - ) - ) - if self.toolset == "host" and self.flavor == "android": - self.WriteDoCmd( - [self.output_binary], - link_deps, - "link_host", - part_of_all, - postbuilds=postbuilds, - ) - else: - self.WriteDoCmd( - [self.output_binary], - link_deps, - "link", - part_of_all, - postbuilds=postbuilds, - ) - - elif self.type == "static_library": - for link_dep in link_deps: - assert " " not in link_dep, ( - "Spaces in alink input filenames not supported (%s)" % link_dep - ) - if ( - self.flavor not in ("mac", "openbsd", "netbsd", "win") - and not self.is_standalone_static_library - ): - self.WriteDoCmd( - [self.output_binary], - link_deps, - "alink_thin", - part_of_all, - postbuilds=postbuilds, - ) - else: - self.WriteDoCmd( - [self.output_binary], - link_deps, - "alink", - part_of_all, - postbuilds=postbuilds, - ) - elif self.type == "shared_library": - self.WriteLn( - "%s: LD_INPUTS := %s" - % ( - QuoteSpaces(self.output_binary), - " ".join(QuoteSpaces(dep) for dep in link_deps), - ) - ) - self.WriteDoCmd( - [self.output_binary], - link_deps, - "solink", - part_of_all, - postbuilds=postbuilds, - ) - elif self.type == "loadable_module": - for link_dep in link_deps: - assert " " not in link_dep, ( - "Spaces in module input filenames not supported (%s)" % link_dep - ) - if self.toolset == "host" and self.flavor == "android": - self.WriteDoCmd( - [self.output_binary], - link_deps, - "solink_module_host", - part_of_all, - postbuilds=postbuilds, - ) - else: - self.WriteDoCmd( - [self.output_binary], - link_deps, - "solink_module", - part_of_all, - postbuilds=postbuilds, - ) - elif self.type == "none": - # Write a stamp line. - self.WriteDoCmd( - [self.output_binary], deps, "touch", part_of_all, postbuilds=postbuilds - ) - else: - print("WARNING: no output for", self.type, self.target) - - # Add an alias for each target (if there are any outputs). - # Installable target aliases are created below. - if (self.output and self.output != self.target) and ( - self.type not in self._INSTALLABLE_TARGETS - ): - self.WriteMakeRule( - [self.target], [self.output], comment="Add target alias", phony=True - ) - if part_of_all: - self.WriteMakeRule( - ["all"], - [self.target], - comment='Add target alias to "all" target.', - phony=True, - ) - - # Add special-case rules for our installable targets. - # 1) They need to install to the build dir or "product" dir. - # 2) They get shortcuts for building (e.g. "make chrome"). - # 3) They are part of "make all". - if self.type in self._INSTALLABLE_TARGETS or self.is_standalone_static_library: - if self.type == "shared_library": - file_desc = "shared library" - elif self.type == "static_library": - file_desc = "static library" - else: - file_desc = "executable" - install_path = self._InstallableTargetInstallPath() - installable_deps = [self.output] - if ( - self.flavor == "mac" - and "product_dir" not in spec - and self.toolset == "target" - ): - # On mac, products are created in install_path immediately. - assert install_path == self.output, "{} != {}".format( - install_path, - self.output, - ) - - # Point the target alias to the final binary output. - self.WriteMakeRule( - [self.target], [install_path], comment="Add target alias", phony=True - ) - if install_path != self.output: - assert not self.is_mac_bundle # See comment a few lines above. - self.WriteDoCmd( - [install_path], - [self.output], - "copy", - comment="Copy this to the %s output path." % file_desc, - part_of_all=part_of_all, - ) - installable_deps.append(install_path) - if self.output != self.alias and self.alias != self.target: - self.WriteMakeRule( - [self.alias], - installable_deps, - comment="Short alias for building this %s." % file_desc, - phony=True, - ) - if part_of_all: - self.WriteMakeRule( - ["all"], - [install_path], - comment='Add %s to "all" target.' % file_desc, - phony=True, - ) - - def WriteList(self, value_list, variable=None, prefix="", quoter=QuoteIfNecessary): - """Write a variable definition that is a list of values. - - E.g. WriteList(['a','b'], 'foo', prefix='blah') writes out - foo = blaha blahb - but in a pretty-printed style. - """ - values = "" - if value_list: - value_list = [quoter(prefix + value) for value in value_list] - values = " \\\n\t" + " \\\n\t".join(value_list) - self.fp.write(f"{variable} :={values}\n\n") - - def WriteDoCmd( - self, outputs, inputs, command, part_of_all, comment=None, postbuilds=False - ): - """Write a Makefile rule that uses do_cmd. - - This makes the outputs dependent on the command line that was run, - as well as support the V= make command line flag. - """ - suffix = "" - if postbuilds: - assert "," not in command - suffix = ",,1" # Tell do_cmd to honor $POSTBUILDS - self.WriteMakeRule( - outputs, - inputs, - actions=[f"$(call do_cmd,{command}{suffix})"], - comment=comment, - command=command, - force=True, - ) - # Add our outputs to the list of targets we read depfiles from. - # all_deps is only used for deps file reading, and for deps files we replace - # spaces with ? because escaping doesn't work with make's $(sort) and - # other functions. - outputs = [QuoteSpaces(o, SPACE_REPLACEMENT) for o in outputs] - self.WriteLn("all_deps += %s" % " ".join(outputs)) - - def WriteMakeRule( - self, - outputs, - inputs, - actions=None, - comment=None, - order_only=False, - force=False, - phony=False, - command=None, - ): - """Write a Makefile rule, with some extra tricks. - - outputs: a list of outputs for the rule (note: this is not directly - supported by make; see comments below) - inputs: a list of inputs for the rule - actions: a list of shell commands to run for the rule - comment: a comment to put in the Makefile above the rule (also useful - for making this Python script's code self-documenting) - order_only: if true, makes the dependency order-only - force: if true, include FORCE_DO_CMD as an order-only dep - phony: if true, the rule does not actually generate the named output, the - output is just a name to run the rule - command: (optional) command name to generate unambiguous labels - """ - outputs = [QuoteSpaces(o) for o in outputs] - inputs = [QuoteSpaces(i) for i in inputs] - - if comment: - self.WriteLn("# " + comment) - if phony: - self.WriteLn(".PHONY: " + " ".join(outputs)) - if actions: - self.WriteLn("%s: TOOLSET := $(TOOLSET)" % outputs[0]) - force_append = " FORCE_DO_CMD" if force else "" - - if order_only: - # Order only rule: Just write a simple rule. - # TODO(evanm): just make order_only a list of deps instead of this hack. - self.WriteLn( - "{}: | {}{}".format(" ".join(outputs), " ".join(inputs), force_append) - ) - elif len(outputs) == 1: - # Regular rule, one output: Just write a simple rule. - self.WriteLn("{}: {}{}".format(outputs[0], " ".join(inputs), force_append)) - else: - # Regular rule, more than one output: Multiple outputs are tricky in - # make. We will write three rules: - # - All outputs depend on an intermediate file. - # - Make .INTERMEDIATE depend on the intermediate. - # - The intermediate file depends on the inputs and executes the - # actual command. - # - The intermediate recipe will 'touch' the intermediate file. - # - The multi-output rule will have an do-nothing recipe. - - # Hash the target name to avoid generating overlong filenames. - cmddigest = hashlib.sha1( - (command or self.target).encode("utf-8") - ).hexdigest() - intermediate = "%s.intermediate" % cmddigest - self.WriteLn("{}: {}".format(" ".join(outputs), intermediate)) - self.WriteLn("\t%s" % "@:") - self.WriteLn("{}: {}".format(".INTERMEDIATE", intermediate)) - self.WriteLn( - "{}: {}{}".format(intermediate, " ".join(inputs), force_append) - ) - actions.insert(0, "$(call do_cmd,touch)") - - if actions: - for action in actions: - self.WriteLn("\t%s" % action) - self.WriteLn() - - def WriteAndroidNdkModuleRule(self, module_name, all_sources, link_deps): - """Write a set of LOCAL_XXX definitions for Android NDK. - - These variable definitions will be used by Android NDK but do nothing for - non-Android applications. - - Arguments: - module_name: Android NDK module name, which must be unique among all - module names. - all_sources: A list of source files (will be filtered by Compilable). - link_deps: A list of link dependencies, which must be sorted in - the order from dependencies to dependents. - """ - if self.type not in ("executable", "shared_library", "static_library"): - return - - self.WriteLn("# Variable definitions for Android applications") - self.WriteLn("include $(CLEAR_VARS)") - self.WriteLn("LOCAL_MODULE := " + module_name) - self.WriteLn( - "LOCAL_CFLAGS := $(CFLAGS_$(BUILDTYPE)) " - "$(DEFS_$(BUILDTYPE)) " - # LOCAL_CFLAGS is applied to both of C and C++. There is - # no way to specify $(CFLAGS_C_$(BUILDTYPE)) only for C - # sources. - "$(CFLAGS_C_$(BUILDTYPE)) " - # $(INCS_$(BUILDTYPE)) includes the prefix '-I' while - # LOCAL_C_INCLUDES does not expect it. So put it in - # LOCAL_CFLAGS. - "$(INCS_$(BUILDTYPE))" - ) - # LOCAL_CXXFLAGS is obsolete and LOCAL_CPPFLAGS is preferred. - self.WriteLn("LOCAL_CPPFLAGS := $(CFLAGS_CC_$(BUILDTYPE))") - self.WriteLn("LOCAL_C_INCLUDES :=") - self.WriteLn("LOCAL_LDLIBS := $(LDFLAGS_$(BUILDTYPE)) $(LIBS)") - - # Detect the C++ extension. - cpp_ext = {".cc": 0, ".cpp": 0, ".cxx": 0} - default_cpp_ext = ".cpp" - for filename in all_sources: - ext = os.path.splitext(filename)[1] - if ext in cpp_ext: - cpp_ext[ext] += 1 - if cpp_ext[ext] > cpp_ext[default_cpp_ext]: - default_cpp_ext = ext - self.WriteLn("LOCAL_CPP_EXTENSION := " + default_cpp_ext) - - self.WriteList( - list(map(self.Absolutify, filter(Compilable, all_sources))), - "LOCAL_SRC_FILES", - ) - - # Filter out those which do not match prefix and suffix and produce - # the resulting list without prefix and suffix. - def DepsToModules(deps, prefix, suffix): - modules = [] - for filepath in deps: - filename = os.path.basename(filepath) - if filename.startswith(prefix) and filename.endswith(suffix): - modules.append(filename[len(prefix) : -len(suffix)]) - return modules - - # Retrieve the default value of 'SHARED_LIB_SUFFIX' - params = {"flavor": "linux"} - default_variables = {} - CalculateVariables(default_variables, params) - - self.WriteList( - DepsToModules( - link_deps, - generator_default_variables["SHARED_LIB_PREFIX"], - default_variables["SHARED_LIB_SUFFIX"], - ), - "LOCAL_SHARED_LIBRARIES", - ) - self.WriteList( - DepsToModules( - link_deps, - generator_default_variables["STATIC_LIB_PREFIX"], - generator_default_variables["STATIC_LIB_SUFFIX"], - ), - "LOCAL_STATIC_LIBRARIES", - ) - - if self.type == "executable": - self.WriteLn("include $(BUILD_EXECUTABLE)") - elif self.type == "shared_library": - self.WriteLn("include $(BUILD_SHARED_LIBRARY)") - elif self.type == "static_library": - self.WriteLn("include $(BUILD_STATIC_LIBRARY)") - self.WriteLn() - - def WriteLn(self, text=""): - self.fp.write(text + "\n") - - def GetSortedXcodeEnv(self, additional_settings=None): - return gyp.xcode_emulation.GetSortedXcodeEnv( - self.xcode_settings, - "$(abs_builddir)", - os.path.join("$(abs_srcdir)", self.path), - "$(BUILDTYPE)", - additional_settings, - ) - - def GetSortedXcodePostbuildEnv(self): - # CHROMIUM_STRIP_SAVE_FILE is a chromium-specific hack. - # TODO(thakis): It would be nice to have some general mechanism instead. - strip_save_file = self.xcode_settings.GetPerTargetSetting( - "CHROMIUM_STRIP_SAVE_FILE", "" - ) - # Even if strip_save_file is empty, explicitly write it. Else a postbuild - # might pick up an export from an earlier target. - return self.GetSortedXcodeEnv( - additional_settings={"CHROMIUM_STRIP_SAVE_FILE": strip_save_file} - ) - - def WriteSortedXcodeEnv(self, target, env): - for k, v in env: - # For - # foo := a\ b - # the escaped space does the right thing. For - # export foo := a\ b - # it does not -- the backslash is written to the env as literal character. - # So don't escape spaces in |env[k]|. - self.WriteLn(f"{QuoteSpaces(target)}: export {k} := {v}") - - def Objectify(self, path): - """Convert a path to its output directory form.""" - if "$(" in path: - path = path.replace("$(obj)/", "$(obj).%s/$(TARGET)/" % self.toolset) - if "$(obj)" not in path: - path = f"$(obj).{self.toolset}/$(TARGET)/{path}" - return path - - def Pchify(self, path, lang): - """Convert a prefix header path to its output directory form.""" - path = self.Absolutify(path) - if "$(" in path: - path = path.replace( - "$(obj)/", f"$(obj).{self.toolset}/$(TARGET)/pch-{lang}" - ) - return path - return f"$(obj).{self.toolset}/$(TARGET)/pch-{lang}/{path}" - - def Absolutify(self, path): - """Convert a subdirectory-relative path into a base-relative path. - Skips over paths that contain variables.""" - if "$(" in path: - # Don't call normpath in this case, as it might collapse the - # path too aggressively if it features '..'. However it's still - # important to strip trailing slashes. - return path.rstrip("/") - return os.path.normpath(os.path.join(self.path, path)) - - def ExpandInputRoot(self, template, expansion, dirname): - if "%(INPUT_ROOT)s" not in template and "%(INPUT_DIRNAME)s" not in template: - return template - path = template % { - "INPUT_ROOT": expansion, - "INPUT_DIRNAME": dirname, - } - return path - - def _InstallableTargetInstallPath(self): - """Returns the location of the final output for an installable target.""" - # Functionality removed for all platforms to match Xcode and hoist - # shared libraries into PRODUCT_DIR for users: - # Xcode puts shared_library results into PRODUCT_DIR, and some gyp files - # rely on this. Emulate this behavior for mac. - # if self.type == "shared_library" and ( - # self.flavor != "mac" or self.toolset != "target" - # ): - # # Install all shared libs into a common directory (per toolset) for - # # convenient access with LD_LIBRARY_PATH. - # return "$(builddir)/lib.%s/%s" % (self.toolset, self.alias) - return "$(builddir)/" + self.alias - - -def WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files): - """Write the target to regenerate the Makefile.""" - options = params["options"] - build_files_args = [ - gyp.common.RelativePath(filename, options.toplevel_dir) - for filename in params["build_files_arg"] - ] - - gyp_binary = gyp.common.FixIfRelativePath( - params["gyp_binary"], options.toplevel_dir - ) - if not gyp_binary.startswith(os.sep): - gyp_binary = os.path.join(".", gyp_binary) - - root_makefile.write( - "quiet_cmd_regen_makefile = ACTION Regenerating $@\n" - "cmd_regen_makefile = cd $(srcdir); %(cmd)s\n" - "%(makefile_name)s: %(deps)s\n" - "\t$(call do_cmd,regen_makefile)\n\n" - % { - "makefile_name": makefile_name, - "deps": " ".join(SourceifyAndQuoteSpaces(bf) for bf in build_files), - "cmd": gyp.common.EncodePOSIXShellList( - [gyp_binary, "-fmake"] + gyp.RegenerateFlags(options) + build_files_args - ), - } - ) - - -def PerformBuild(data, configurations, params): - options = params["options"] - for config in configurations: - arguments = ["make"] - if options.toplevel_dir and options.toplevel_dir != ".": - arguments += "-C", options.toplevel_dir - arguments.append("BUILDTYPE=" + config) - print(f"Building [{config}]: {arguments}") - subprocess.check_call(arguments) - - -def GenerateOutput(target_list, target_dicts, data, params): - options = params["options"] - flavor = gyp.common.GetFlavor(params) - generator_flags = params.get("generator_flags", {}) - builddir_name = generator_flags.get("output_dir", "out") - android_ndk_version = generator_flags.get("android_ndk_version", None) - default_target = generator_flags.get("default_target", "all") - - def CalculateMakefilePath(build_file, base_name): - """Determine where to write a Makefile for a given gyp file.""" - # Paths in gyp files are relative to the .gyp file, but we want - # paths relative to the source root for the master makefile. Grab - # the path of the .gyp file as the base to relativize against. - # E.g. "foo/bar" when we're constructing targets for "foo/bar/baz.gyp". - base_path = gyp.common.RelativePath(os.path.dirname(build_file), options.depth) - # We write the file in the base_path directory. - output_file = os.path.join(options.depth, base_path, base_name) - if options.generator_output: - output_file = os.path.join( - options.depth, options.generator_output, base_path, base_name - ) - base_path = gyp.common.RelativePath( - os.path.dirname(build_file), options.toplevel_dir - ) - return base_path, output_file - - # TODO: search for the first non-'Default' target. This can go - # away when we add verification that all targets have the - # necessary configurations. - default_configuration = None - toolsets = {target_dicts[target]["toolset"] for target in target_list} - for target in target_list: - spec = target_dicts[target] - if spec["default_configuration"] != "Default": - default_configuration = spec["default_configuration"] - break - if not default_configuration: - default_configuration = "Default" - - srcdir = "." - makefile_name = "Makefile" + options.suffix - makefile_path = os.path.join(options.toplevel_dir, makefile_name) - if options.generator_output: - global srcdir_prefix - makefile_path = os.path.join( - options.toplevel_dir, options.generator_output, makefile_name - ) - srcdir = gyp.common.RelativePath(srcdir, options.generator_output) - srcdir_prefix = "$(srcdir)/" - - flock_command = "flock" - copy_archive_arguments = "-af" - makedep_arguments = "-MMD" - header_params = { - "default_target": default_target, - "builddir": builddir_name, - "default_configuration": default_configuration, - "flock": flock_command, - "flock_index": 1, - "link_commands": LINK_COMMANDS_LINUX, - "extra_commands": "", - "srcdir": srcdir, - "copy_archive_args": copy_archive_arguments, - "makedep_args": makedep_arguments, - "CC.target": GetEnvironFallback(("CC_target", "CC"), "$(CC)"), - "AR.target": GetEnvironFallback(("AR_target", "AR"), "$(AR)"), - "CXX.target": GetEnvironFallback(("CXX_target", "CXX"), "$(CXX)"), - "LINK.target": GetEnvironFallback(("LINK_target", "LINK"), "$(LINK)"), - "CC.host": GetEnvironFallback(("CC_host", "CC"), "gcc"), - "AR.host": GetEnvironFallback(("AR_host", "AR"), "ar"), - "CXX.host": GetEnvironFallback(("CXX_host", "CXX"), "g++"), - "LINK.host": GetEnvironFallback(("LINK_host", "LINK"), "$(CXX.host)"), - } - if flavor == "mac": - flock_command = "./gyp-mac-tool flock" - header_params.update( - { - "flock": flock_command, - "flock_index": 2, - "link_commands": LINK_COMMANDS_MAC, - "extra_commands": SHARED_HEADER_MAC_COMMANDS, - } - ) - elif flavor == "android": - header_params.update({"link_commands": LINK_COMMANDS_ANDROID}) - elif flavor == "zos": - copy_archive_arguments = "-fPR" - makedep_arguments = "-qmakedep=gcc" - header_params.update( - { - "copy_archive_args": copy_archive_arguments, - "makedep_args": makedep_arguments, - "link_commands": LINK_COMMANDS_OS390, - "CC.target": GetEnvironFallback(("CC_target", "CC"), "njsc"), - "CXX.target": GetEnvironFallback(("CXX_target", "CXX"), "njsc++"), - "CC.host": GetEnvironFallback(("CC_host", "CC"), "njsc"), - "CXX.host": GetEnvironFallback(("CXX_host", "CXX"), "njsc++"), - } - ) - elif flavor == "solaris": - copy_archive_arguments = "-pPRf@" - header_params.update( - { - "copy_archive_args": copy_archive_arguments, - "flock": "./gyp-flock-tool flock", - "flock_index": 2, - } - ) - elif flavor == "freebsd": - # Note: OpenBSD has sysutils/flock. lockf seems to be FreeBSD specific. - header_params.update({"flock": "lockf"}) - elif flavor == "openbsd": - copy_archive_arguments = "-pPRf" - header_params.update({"copy_archive_args": copy_archive_arguments}) - elif flavor == "aix": - copy_archive_arguments = "-pPRf" - header_params.update( - { - "copy_archive_args": copy_archive_arguments, - "link_commands": LINK_COMMANDS_AIX, - "flock": "./gyp-flock-tool flock", - "flock_index": 2, - } - ) - - build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) - make_global_settings_array = data[build_file].get("make_global_settings", []) - wrappers = {} - for key, value in make_global_settings_array: - if key.endswith("_wrapper"): - wrappers[key[: -len("_wrapper")]] = "$(abspath %s)" % value - make_global_settings = "" - for key, value in make_global_settings_array: - if re.match(".*_wrapper", key): - continue - if value[0] != "$": - value = "$(abspath %s)" % value - wrapper = wrappers.get(key) - if wrapper: - value = f"{wrapper} {value}" - del wrappers[key] - if key in ("CC", "CC.host", "CXX", "CXX.host"): - make_global_settings += ( - "ifneq (,$(filter $(origin %s), undefined default))\n" % key - ) - # Let gyp-time envvars win over global settings. - env_key = key.replace(".", "_") # CC.host -> CC_host - if env_key in os.environ: - value = os.environ[env_key] - make_global_settings += f" {key} = {value}\n" - make_global_settings += "endif\n" - else: - make_global_settings += f"{key} ?= {value}\n" - # TODO(ukai): define cmd when only wrapper is specified in - # make_global_settings. - - header_params["make_global_settings"] = make_global_settings - - gyp.common.EnsureDirExists(makefile_path) - root_makefile = open(makefile_path, "w") - root_makefile.write(SHARED_HEADER % header_params) - # Currently any versions have the same effect, but in future the behavior - # could be different. - if android_ndk_version: - root_makefile.write( - "# Define LOCAL_PATH for build of Android applications.\n" - "LOCAL_PATH := $(call my-dir)\n" - "\n" - ) - for toolset in toolsets: - root_makefile.write("TOOLSET := %s\n" % toolset) - WriteRootHeaderSuffixRules(root_makefile) - - # Put build-time support tools next to the root Makefile. - dest_path = os.path.dirname(makefile_path) - gyp.common.CopyTool(flavor, dest_path) - - # Find the list of targets that derive from the gyp file(s) being built. - needed_targets = set() - for build_file in params["build_files"]: - for target in gyp.common.AllTargets(target_list, target_dicts, build_file): - needed_targets.add(target) - - build_files = set() - include_list = set() - for qualified_target in target_list: - build_file, target, toolset = gyp.common.ParseQualifiedTarget(qualified_target) - - this_make_global_settings = data[build_file].get("make_global_settings", []) - assert make_global_settings_array == this_make_global_settings, ( - "make_global_settings needs to be the same for all targets " - f"{this_make_global_settings} vs. {make_global_settings}" - ) - - build_files.add(gyp.common.RelativePath(build_file, options.toplevel_dir)) - included_files = data[build_file]["included_files"] - for included_file in included_files: - # The included_files entries are relative to the dir of the build file - # that included them, so we have to undo that and then make them relative - # to the root dir. - relative_include_file = gyp.common.RelativePath( - gyp.common.UnrelativePath(included_file, build_file), - options.toplevel_dir, - ) - abs_include_file = os.path.abspath(relative_include_file) - # If the include file is from the ~/.gyp dir, we should use absolute path - # so that relocating the src dir doesn't break the path. - if params["home_dot_gyp"] and abs_include_file.startswith( - params["home_dot_gyp"] - ): - build_files.add(abs_include_file) - else: - build_files.add(relative_include_file) - - base_path, output_file = CalculateMakefilePath( - build_file, target + "." + toolset + options.suffix + ".mk" - ) - - spec = target_dicts[qualified_target] - configs = spec["configurations"] - - if flavor == "mac": - gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec) - - writer = MakefileWriter(generator_flags, flavor) - writer.Write( - qualified_target, - base_path, - output_file, - spec, - configs, - part_of_all=qualified_target in needed_targets, - ) - - # Our root_makefile lives at the source root. Compute the relative path - # from there to the output_file for including. - mkfile_rel_path = gyp.common.RelativePath( - output_file, os.path.dirname(makefile_path) - ) - include_list.add(mkfile_rel_path) - - # Write out per-gyp (sub-project) Makefiles. - depth_rel_path = gyp.common.RelativePath(options.depth, os.getcwd()) - for build_file in build_files: - # The paths in build_files were relativized above, so undo that before - # testing against the non-relativized items in target_list and before - # calculating the Makefile path. - build_file = os.path.join(depth_rel_path, build_file) - gyp_targets = [ - target_dicts[qualified_target]["target_name"] - for qualified_target in target_list - if qualified_target.startswith(build_file) - and qualified_target in needed_targets - ] - # Only generate Makefiles for gyp files with targets. - if not gyp_targets: - continue - base_path, output_file = CalculateMakefilePath( - build_file, os.path.splitext(os.path.basename(build_file))[0] + ".Makefile" - ) - makefile_rel_path = gyp.common.RelativePath( - os.path.dirname(makefile_path), os.path.dirname(output_file) - ) - writer.WriteSubMake(output_file, makefile_rel_path, gyp_targets, builddir_name) - - # Write out the sorted list of includes. - root_makefile.write("\n") - for include_file in sorted(include_list): - # We wrap each .mk include in an if statement so users can tell make to - # not load a file by setting NO_LOAD. The below make code says, only - # load the .mk file if the .mk filename doesn't start with a token in - # NO_LOAD. - root_makefile.write( - "ifeq ($(strip $(foreach prefix,$(NO_LOAD),\\\n" - " $(findstring $(join ^,$(prefix)),\\\n" - " $(join ^," + include_file + ")))),)\n" - ) - root_makefile.write(" include " + include_file + "\n") - root_makefile.write("endif\n") - root_makefile.write("\n") - - if not generator_flags.get("standalone") and generator_flags.get( - "auto_regeneration", True - ): - WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) - - root_makefile.write(SHARED_FOOTER) - - root_makefile.close() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py deleted file mode 100644 index 8308fa8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +++ /dev/null @@ -1,3978 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -import ntpath -import os -import posixpath -import re -import subprocess -import sys - -from collections import OrderedDict - -import gyp.common -import gyp.easy_xml as easy_xml -import gyp.generator.ninja as ninja_generator -import gyp.MSVSNew as MSVSNew -import gyp.MSVSProject as MSVSProject -import gyp.MSVSSettings as MSVSSettings -import gyp.MSVSToolFile as MSVSToolFile -import gyp.MSVSUserFile as MSVSUserFile -import gyp.MSVSUtil as MSVSUtil -import gyp.MSVSVersion as MSVSVersion -from gyp.common import GypError -from gyp.common import OrderedSet - - -# Regular expression for validating Visual Studio GUIDs. If the GUID -# contains lowercase hex letters, MSVS will be fine. However, -# IncrediBuild BuildConsole will parse the solution file, but then -# silently skip building the target causing hard to track down errors. -# Note that this only happens with the BuildConsole, and does not occur -# if IncrediBuild is executed from inside Visual Studio. This regex -# validates that the string looks like a GUID with all uppercase hex -# letters. -VALID_MSVS_GUID_CHARS = re.compile(r"^[A-F0-9\-]+$") - -generator_supports_multiple_toolsets = gyp.common.CrossCompileRequested() - -generator_default_variables = { - "DRIVER_PREFIX": "", - "DRIVER_SUFFIX": ".sys", - "EXECUTABLE_PREFIX": "", - "EXECUTABLE_SUFFIX": ".exe", - "STATIC_LIB_PREFIX": "", - "SHARED_LIB_PREFIX": "", - "STATIC_LIB_SUFFIX": ".lib", - "SHARED_LIB_SUFFIX": ".dll", - "INTERMEDIATE_DIR": "$(IntDir)", - "SHARED_INTERMEDIATE_DIR": "$(OutDir)/obj/global_intermediate", - "OS": "win", - "PRODUCT_DIR": "$(OutDir)", - "LIB_DIR": "$(OutDir)lib", - "RULE_INPUT_ROOT": "$(InputName)", - "RULE_INPUT_DIRNAME": "$(InputDir)", - "RULE_INPUT_EXT": "$(InputExt)", - "RULE_INPUT_NAME": "$(InputFileName)", - "RULE_INPUT_PATH": "$(InputPath)", - "CONFIGURATION_NAME": "$(ConfigurationName)", -} - - -# The msvs specific sections that hold paths -generator_additional_path_sections = [ - "msvs_cygwin_dirs", - "msvs_props", -] - - -generator_additional_non_configuration_keys = [ - "msvs_cygwin_dirs", - "msvs_cygwin_shell", - "msvs_large_pdb", - "msvs_shard", - "msvs_external_builder", - "msvs_external_builder_out_dir", - "msvs_external_builder_build_cmd", - "msvs_external_builder_clean_cmd", - "msvs_external_builder_clcompile_cmd", - "msvs_enable_winrt", - "msvs_requires_importlibrary", - "msvs_enable_winphone", - "msvs_application_type_revision", - "msvs_target_platform_version", - "msvs_target_platform_minversion", -] - -generator_filelist_paths = None - -# List of precompiled header related keys. -precomp_keys = [ - "msvs_precompiled_header", - "msvs_precompiled_source", -] - - -cached_username = None - - -cached_domain = None - - -# TODO(gspencer): Switch the os.environ calls to be -# win32api.GetDomainName() and win32api.GetUserName() once the -# python version in depot_tools has been updated to work on Vista -# 64-bit. -def _GetDomainAndUserName(): - if sys.platform not in ("win32", "cygwin"): - return ("DOMAIN", "USERNAME") - global cached_username - global cached_domain - if not cached_domain or not cached_username: - domain = os.environ.get("USERDOMAIN") - username = os.environ.get("USERNAME") - if not domain or not username: - call = subprocess.Popen( - ["net", "config", "Workstation"], stdout=subprocess.PIPE - ) - config = call.communicate()[0].decode("utf-8") - username_re = re.compile(r"^User name\s+(\S+)", re.MULTILINE) - username_match = username_re.search(config) - if username_match: - username = username_match.group(1) - domain_re = re.compile(r"^Logon domain\s+(\S+)", re.MULTILINE) - domain_match = domain_re.search(config) - if domain_match: - domain = domain_match.group(1) - cached_domain = domain - cached_username = username - return (cached_domain, cached_username) - - -fixpath_prefix = None - - -def _NormalizedSource(source): - """Normalize the path. - - But not if that gets rid of a variable, as this may expand to something - larger than one directory. - - Arguments: - source: The path to be normalize.d - - Returns: - The normalized path. - """ - normalized = os.path.normpath(source) - if source.count("$") == normalized.count("$"): - source = normalized - return source - - -def _FixPath(path, separator="\\"): - """Convert paths to a form that will make sense in a vcproj file. - - Arguments: - path: The path to convert, may contain / etc. - Returns: - The path with all slashes made into backslashes. - """ - if ( - fixpath_prefix - and path - and not os.path.isabs(path) - and not path[0] == "$" - and not _IsWindowsAbsPath(path) - ): - path = os.path.join(fixpath_prefix, path) - if separator == "\\": - path = path.replace("/", "\\") - path = _NormalizedSource(path) - if separator == "/": - path = path.replace("\\", "/") - if path and path[-1] == separator: - path = path[:-1] - return path - - -def _IsWindowsAbsPath(path): - """ - On Cygwin systems Python needs a little help determining if a path - is an absolute Windows path or not, so that - it does not treat those as relative, which results in bad paths like: - '..\\C:\\\\some_source_code_file.cc' - """ - return path.startswith("c:") or path.startswith("C:") - - -def _FixPaths(paths, separator="\\"): - """Fix each of the paths of the list.""" - return [_FixPath(i, separator) for i in paths] - - -def _ConvertSourcesToFilterHierarchy( - sources, prefix=None, excluded=None, list_excluded=True, msvs_version=None -): - """Converts a list split source file paths into a vcproj folder hierarchy. - - Arguments: - sources: A list of source file paths split. - prefix: A list of source file path layers meant to apply to each of sources. - excluded: A set of excluded files. - msvs_version: A MSVSVersion object. - - Returns: - A hierarchy of filenames and MSVSProject.Filter objects that matches the - layout of the source tree. - For example: - _ConvertSourcesToFilterHierarchy([['a', 'bob1.c'], ['b', 'bob2.c']], - prefix=['joe']) - --> - [MSVSProject.Filter('a', contents=['joe\\a\\bob1.c']), - MSVSProject.Filter('b', contents=['joe\\b\\bob2.c'])] - """ - if not prefix: - prefix = [] - result = [] - excluded_result = [] - folders = OrderedDict() - # Gather files into the final result, excluded, or folders. - for s in sources: - if len(s) == 1: - filename = _NormalizedSource("\\".join(prefix + s)) - if filename in excluded: - excluded_result.append(filename) - else: - result.append(filename) - elif msvs_version and not msvs_version.UsesVcxproj(): - # For MSVS 2008 and earlier, we need to process all files before walking - # the sub folders. - if not folders.get(s[0]): - folders[s[0]] = [] - folders[s[0]].append(s[1:]) - else: - contents = _ConvertSourcesToFilterHierarchy( - [s[1:]], - prefix + [s[0]], - excluded=excluded, - list_excluded=list_excluded, - msvs_version=msvs_version, - ) - contents = MSVSProject.Filter(s[0], contents=contents) - result.append(contents) - # Add a folder for excluded files. - if excluded_result and list_excluded: - excluded_folder = MSVSProject.Filter( - "_excluded_files", contents=excluded_result - ) - result.append(excluded_folder) - - if msvs_version and msvs_version.UsesVcxproj(): - return result - - # Populate all the folders. - for f in folders: - contents = _ConvertSourcesToFilterHierarchy( - folders[f], - prefix=prefix + [f], - excluded=excluded, - list_excluded=list_excluded, - msvs_version=msvs_version, - ) - contents = MSVSProject.Filter(f, contents=contents) - result.append(contents) - return result - - -def _ToolAppend(tools, tool_name, setting, value, only_if_unset=False): - if not value: - return - _ToolSetOrAppend(tools, tool_name, setting, value, only_if_unset) - - -def _ToolSetOrAppend(tools, tool_name, setting, value, only_if_unset=False): - # TODO(bradnelson): ugly hack, fix this more generally!!! - if "Directories" in setting or "Dependencies" in setting: - if type(value) == str: - value = value.replace("/", "\\") - else: - value = [i.replace("/", "\\") for i in value] - if not tools.get(tool_name): - tools[tool_name] = dict() - tool = tools[tool_name] - if "CompileAsWinRT" == setting: - return - if tool.get(setting): - if only_if_unset: - return - if type(tool[setting]) == list and type(value) == list: - tool[setting] += value - else: - raise TypeError( - 'Appending "%s" to a non-list setting "%s" for tool "%s" is ' - "not allowed, previous value: %s" - % (value, setting, tool_name, str(tool[setting])) - ) - else: - tool[setting] = value - - -def _ConfigTargetVersion(config_data): - return config_data.get("msvs_target_version", "Windows7") - - -def _ConfigPlatform(config_data): - return config_data.get("msvs_configuration_platform", "Win32") - - -def _ConfigBaseName(config_name, platform_name): - if config_name.endswith("_" + platform_name): - return config_name[0 : -len(platform_name) - 1] - else: - return config_name - - -def _ConfigFullName(config_name, config_data): - platform_name = _ConfigPlatform(config_data) - return f"{_ConfigBaseName(config_name, platform_name)}|{platform_name}" - - -def _ConfigWindowsTargetPlatformVersion(config_data, version): - target_ver = config_data.get("msvs_windows_target_platform_version") - if target_ver and re.match(r"^\d+", target_ver): - return target_ver - config_ver = config_data.get("msvs_windows_sdk_version") - vers = [config_ver] if config_ver else version.compatible_sdks - for ver in vers: - for key in [ - r"HKLM\Software\Microsoft\Microsoft SDKs\Windows\%s", - r"HKLM\Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows\%s", - ]: - sdk_dir = MSVSVersion._RegistryGetValue(key % ver, "InstallationFolder") - if not sdk_dir: - continue - version = MSVSVersion._RegistryGetValue(key % ver, "ProductVersion") or "" - # Find a matching entry in sdk_dir\include. - expected_sdk_dir = r"%s\include" % sdk_dir - names = sorted( - ( - x - for x in ( - os.listdir(expected_sdk_dir) - if os.path.isdir(expected_sdk_dir) - else [] - ) - if x.startswith(version) - ), - reverse=True, - ) - if names: - return names[0] - else: - print( - "Warning: No include files found for detected " - "Windows SDK version %s" % (version), - file=sys.stdout, - ) - - -def _BuildCommandLineForRuleRaw( - spec, cmd, cygwin_shell, has_input_path, quote_cmd, do_setup_env -): - - if [x for x in cmd if "$(InputDir)" in x]: - input_dir_preamble = ( - "set INPUTDIR=$(InputDir)\n" - "if NOT DEFINED INPUTDIR set INPUTDIR=.\\\n" - "set INPUTDIR=%INPUTDIR:~0,-1%\n" - ) - else: - input_dir_preamble = "" - - if cygwin_shell: - # Find path to cygwin. - cygwin_dir = _FixPath(spec.get("msvs_cygwin_dirs", ["."])[0]) - # Prepare command. - direct_cmd = cmd - direct_cmd = [ - i.replace("$(IntDir)", '`cygpath -m "${INTDIR}"`') for i in direct_cmd - ] - direct_cmd = [ - i.replace("$(OutDir)", '`cygpath -m "${OUTDIR}"`') for i in direct_cmd - ] - direct_cmd = [ - i.replace("$(InputDir)", '`cygpath -m "${INPUTDIR}"`') for i in direct_cmd - ] - if has_input_path: - direct_cmd = [ - i.replace("$(InputPath)", '`cygpath -m "${INPUTPATH}"`') - for i in direct_cmd - ] - direct_cmd = ['\\"%s\\"' % i.replace('"', '\\\\\\"') for i in direct_cmd] - # direct_cmd = gyp.common.EncodePOSIXShellList(direct_cmd) - direct_cmd = " ".join(direct_cmd) - # TODO(quote): regularize quoting path names throughout the module - cmd = "" - if do_setup_env: - cmd += 'call "$(ProjectDir)%(cygwin_dir)s\\setup_env.bat" && ' - cmd += "set CYGWIN=nontsec&& " - if direct_cmd.find("NUMBER_OF_PROCESSORS") >= 0: - cmd += "set /a NUMBER_OF_PROCESSORS_PLUS_1=%%NUMBER_OF_PROCESSORS%%+1&& " - if direct_cmd.find("INTDIR") >= 0: - cmd += "set INTDIR=$(IntDir)&& " - if direct_cmd.find("OUTDIR") >= 0: - cmd += "set OUTDIR=$(OutDir)&& " - if has_input_path and direct_cmd.find("INPUTPATH") >= 0: - cmd += "set INPUTPATH=$(InputPath) && " - cmd += 'bash -c "%(cmd)s"' - cmd = cmd % {"cygwin_dir": cygwin_dir, "cmd": direct_cmd} - return input_dir_preamble + cmd - else: - # Convert cat --> type to mimic unix. - if cmd[0] == "cat": - command = ["type"] - else: - command = [cmd[0].replace("/", "\\")] - # Add call before command to ensure that commands can be tied together one - # after the other without aborting in Incredibuild, since IB makes a bat - # file out of the raw command string, and some commands (like python) are - # actually batch files themselves. - command.insert(0, "call") - # Fix the paths - # TODO(quote): This is a really ugly heuristic, and will miss path fixing - # for arguments like "--arg=path" or "/opt:path". - # If the argument starts with a slash or dash, it's probably a command line - # switch - # Return the path with forward slashes because the command using it might - # not support backslashes. - arguments = [i if (i[:1] in "/-") else _FixPath(i, "/") for i in cmd[1:]] - arguments = [i.replace("$(InputDir)", "%INPUTDIR%") for i in arguments] - arguments = [MSVSSettings.FixVCMacroSlashes(i) for i in arguments] - if quote_cmd: - # Support a mode for using cmd directly. - # Convert any paths to native form (first element is used directly). - # TODO(quote): regularize quoting path names throughout the module - arguments = ['"%s"' % i for i in arguments] - # Collapse into a single command. - return input_dir_preamble + " ".join(command + arguments) - - -def _BuildCommandLineForRule(spec, rule, has_input_path, do_setup_env): - # Currently this weird argument munging is used to duplicate the way a - # python script would need to be run as part of the chrome tree. - # Eventually we should add some sort of rule_default option to set this - # per project. For now the behavior chrome needs is the default. - mcs = rule.get("msvs_cygwin_shell") - if mcs is None: - mcs = int(spec.get("msvs_cygwin_shell", 1)) - elif isinstance(mcs, str): - mcs = int(mcs) - quote_cmd = int(rule.get("msvs_quote_cmd", 1)) - return _BuildCommandLineForRuleRaw( - spec, rule["action"], mcs, has_input_path, quote_cmd, do_setup_env=do_setup_env - ) - - -def _AddActionStep(actions_dict, inputs, outputs, description, command): - """Merge action into an existing list of actions. - - Care must be taken so that actions which have overlapping inputs either don't - get assigned to the same input, or get collapsed into one. - - Arguments: - actions_dict: dictionary keyed on input name, which maps to a list of - dicts describing the actions attached to that input file. - inputs: list of inputs - outputs: list of outputs - description: description of the action - command: command line to execute - """ - # Require there to be at least one input (call sites will ensure this). - assert inputs - - action = { - "inputs": inputs, - "outputs": outputs, - "description": description, - "command": command, - } - - # Pick where to stick this action. - # While less than optimal in terms of build time, attach them to the first - # input for now. - chosen_input = inputs[0] - - # Add it there. - if chosen_input not in actions_dict: - actions_dict[chosen_input] = [] - actions_dict[chosen_input].append(action) - - -def _AddCustomBuildToolForMSVS( - p, spec, primary_input, inputs, outputs, description, cmd -): - """Add a custom build tool to execute something. - - Arguments: - p: the target project - spec: the target project dict - primary_input: input file to attach the build tool to - inputs: list of inputs - outputs: list of outputs - description: description of the action - cmd: command line to execute - """ - inputs = _FixPaths(inputs) - outputs = _FixPaths(outputs) - tool = MSVSProject.Tool( - "VCCustomBuildTool", - { - "Description": description, - "AdditionalDependencies": ";".join(inputs), - "Outputs": ";".join(outputs), - "CommandLine": cmd, - }, - ) - # Add to the properties of primary input for each config. - for config_name, c_data in spec["configurations"].items(): - p.AddFileConfig( - _FixPath(primary_input), _ConfigFullName(config_name, c_data), tools=[tool] - ) - - -def _AddAccumulatedActionsToMSVS(p, spec, actions_dict): - """Add actions accumulated into an actions_dict, merging as needed. - - Arguments: - p: the target project - spec: the target project dict - actions_dict: dictionary keyed on input name, which maps to a list of - dicts describing the actions attached to that input file. - """ - for primary_input in actions_dict: - inputs = OrderedSet() - outputs = OrderedSet() - descriptions = [] - commands = [] - for action in actions_dict[primary_input]: - inputs.update(OrderedSet(action["inputs"])) - outputs.update(OrderedSet(action["outputs"])) - descriptions.append(action["description"]) - commands.append(action["command"]) - # Add the custom build step for one input file. - description = ", and also ".join(descriptions) - command = "\r\n".join(commands) - _AddCustomBuildToolForMSVS( - p, - spec, - primary_input=primary_input, - inputs=inputs, - outputs=outputs, - description=description, - cmd=command, - ) - - -def _RuleExpandPath(path, input_file): - """Given the input file to which a rule applied, string substitute a path. - - Arguments: - path: a path to string expand - input_file: the file to which the rule applied. - Returns: - The string substituted path. - """ - path = path.replace( - "$(InputName)", os.path.splitext(os.path.split(input_file)[1])[0] - ) - path = path.replace("$(InputDir)", os.path.dirname(input_file)) - path = path.replace( - "$(InputExt)", os.path.splitext(os.path.split(input_file)[1])[1] - ) - path = path.replace("$(InputFileName)", os.path.split(input_file)[1]) - path = path.replace("$(InputPath)", input_file) - return path - - -def _FindRuleTriggerFiles(rule, sources): - """Find the list of files which a particular rule applies to. - - Arguments: - rule: the rule in question - sources: the set of all known source files for this project - Returns: - The list of sources that trigger a particular rule. - """ - return rule.get("rule_sources", []) - - -def _RuleInputsAndOutputs(rule, trigger_file): - """Find the inputs and outputs generated by a rule. - - Arguments: - rule: the rule in question. - trigger_file: the main trigger for this rule. - Returns: - The pair of (inputs, outputs) involved in this rule. - """ - raw_inputs = _FixPaths(rule.get("inputs", [])) - raw_outputs = _FixPaths(rule.get("outputs", [])) - inputs = OrderedSet() - outputs = OrderedSet() - inputs.add(trigger_file) - for i in raw_inputs: - inputs.add(_RuleExpandPath(i, trigger_file)) - for o in raw_outputs: - outputs.add(_RuleExpandPath(o, trigger_file)) - return (inputs, outputs) - - -def _GenerateNativeRulesForMSVS(p, rules, output_dir, spec, options): - """Generate a native rules file. - - Arguments: - p: the target project - rules: the set of rules to include - output_dir: the directory in which the project/gyp resides - spec: the project dict - options: global generator options - """ - rules_filename = "{}{}.rules".format(spec["target_name"], options.suffix) - rules_file = MSVSToolFile.Writer( - os.path.join(output_dir, rules_filename), spec["target_name"] - ) - # Add each rule. - for r in rules: - rule_name = r["rule_name"] - rule_ext = r["extension"] - inputs = _FixPaths(r.get("inputs", [])) - outputs = _FixPaths(r.get("outputs", [])) - # Skip a rule with no action and no inputs. - if "action" not in r and not r.get("rule_sources", []): - continue - cmd = _BuildCommandLineForRule(spec, r, has_input_path=True, do_setup_env=True) - rules_file.AddCustomBuildRule( - name=rule_name, - description=r.get("message", rule_name), - extensions=[rule_ext], - additional_dependencies=inputs, - outputs=outputs, - cmd=cmd, - ) - # Write out rules file. - rules_file.WriteIfChanged() - - # Add rules file to project. - p.AddToolFile(rules_filename) - - -def _Cygwinify(path): - path = path.replace("$(OutDir)", "$(OutDirCygwin)") - path = path.replace("$(IntDir)", "$(IntDirCygwin)") - return path - - -def _GenerateExternalRules(rules, output_dir, spec, sources, options, actions_to_add): - """Generate an external makefile to do a set of rules. - - Arguments: - rules: the list of rules to include - output_dir: path containing project and gyp files - spec: project specification data - sources: set of sources known - options: global generator options - actions_to_add: The list of actions we will add to. - """ - filename = "{}_rules{}.mk".format(spec["target_name"], options.suffix) - mk_file = gyp.common.WriteOnDiff(os.path.join(output_dir, filename)) - # Find cygwin style versions of some paths. - mk_file.write('OutDirCygwin:=$(shell cygpath -u "$(OutDir)")\n') - mk_file.write('IntDirCygwin:=$(shell cygpath -u "$(IntDir)")\n') - # Gather stuff needed to emit all: target. - all_inputs = OrderedSet() - all_outputs = OrderedSet() - all_output_dirs = OrderedSet() - first_outputs = [] - for rule in rules: - trigger_files = _FindRuleTriggerFiles(rule, sources) - for tf in trigger_files: - inputs, outputs = _RuleInputsAndOutputs(rule, tf) - all_inputs.update(OrderedSet(inputs)) - all_outputs.update(OrderedSet(outputs)) - # Only use one target from each rule as the dependency for - # 'all' so we don't try to build each rule multiple times. - first_outputs.append(list(outputs)[0]) - # Get the unique output directories for this rule. - output_dirs = [os.path.split(i)[0] for i in outputs] - for od in output_dirs: - all_output_dirs.add(od) - first_outputs_cyg = [_Cygwinify(i) for i in first_outputs] - # Write out all: target, including mkdir for each output directory. - mk_file.write("all: %s\n" % " ".join(first_outputs_cyg)) - for od in all_output_dirs: - if od: - mk_file.write('\tmkdir -p `cygpath -u "%s"`\n' % od) - mk_file.write("\n") - # Define how each output is generated. - for rule in rules: - trigger_files = _FindRuleTriggerFiles(rule, sources) - for tf in trigger_files: - # Get all the inputs and outputs for this rule for this trigger file. - inputs, outputs = _RuleInputsAndOutputs(rule, tf) - inputs = [_Cygwinify(i) for i in inputs] - outputs = [_Cygwinify(i) for i in outputs] - # Prepare the command line for this rule. - cmd = [_RuleExpandPath(c, tf) for c in rule["action"]] - cmd = ['"%s"' % i for i in cmd] - cmd = " ".join(cmd) - # Add it to the makefile. - mk_file.write("{}: {}\n".format(" ".join(outputs), " ".join(inputs))) - mk_file.write("\t%s\n\n" % cmd) - # Close up the file. - mk_file.close() - - # Add makefile to list of sources. - sources.add(filename) - # Add a build action to call makefile. - cmd = [ - "make", - "OutDir=$(OutDir)", - "IntDir=$(IntDir)", - "-j", - "${NUMBER_OF_PROCESSORS_PLUS_1}", - "-f", - filename, - ] - cmd = _BuildCommandLineForRuleRaw(spec, cmd, True, False, True, True) - # Insert makefile as 0'th input, so it gets the action attached there, - # as this is easier to understand from in the IDE. - all_inputs = list(all_inputs) - all_inputs.insert(0, filename) - _AddActionStep( - actions_to_add, - inputs=_FixPaths(all_inputs), - outputs=_FixPaths(all_outputs), - description="Running external rules for %s" % spec["target_name"], - command=cmd, - ) - - -def _EscapeEnvironmentVariableExpansion(s): - """Escapes % characters. - - Escapes any % characters so that Windows-style environment variable - expansions will leave them alone. - See http://connect.microsoft.com/VisualStudio/feedback/details/106127/cl-d-name-text-containing-percentage-characters-doesnt-compile - to understand why we have to do this. - - Args: - s: The string to be escaped. - - Returns: - The escaped string. - """ # noqa: E731,E123,E501 - s = s.replace("%", "%%") - return s - - -quote_replacer_regex = re.compile(r'(\\*)"') - - -def _EscapeCommandLineArgumentForMSVS(s): - """Escapes a Windows command-line argument. - - So that the Win32 CommandLineToArgv function will turn the escaped result back - into the original string. - See http://msdn.microsoft.com/en-us/library/17w5ykft.aspx - ("Parsing C++ Command-Line Arguments") to understand why we have to do - this. - - Args: - s: the string to be escaped. - Returns: - the escaped string. - """ - - def _Replace(match): - # For a literal quote, CommandLineToArgv requires an odd number of - # backslashes preceding it, and it produces half as many literal backslashes - # (rounded down). So we need to produce 2n+1 backslashes. - return 2 * match.group(1) + '\\"' - - # Escape all quotes so that they are interpreted literally. - s = quote_replacer_regex.sub(_Replace, s) - # Now add unescaped quotes so that any whitespace is interpreted literally. - s = '"' + s + '"' - return s - - -delimiters_replacer_regex = re.compile(r"(\\*)([,;]+)") - - -def _EscapeVCProjCommandLineArgListItem(s): - """Escapes command line arguments for MSVS. - - The VCProj format stores string lists in a single string using commas and - semi-colons as separators, which must be quoted if they are to be - interpreted literally. However, command-line arguments may already have - quotes, and the VCProj parser is ignorant of the backslash escaping - convention used by CommandLineToArgv, so the command-line quotes and the - VCProj quotes may not be the same quotes. So to store a general - command-line argument in a VCProj list, we need to parse the existing - quoting according to VCProj's convention and quote any delimiters that are - not already quoted by that convention. The quotes that we add will also be - seen by CommandLineToArgv, so if backslashes precede them then we also have - to escape those backslashes according to the CommandLineToArgv - convention. - - Args: - s: the string to be escaped. - Returns: - the escaped string. - """ - - def _Replace(match): - # For a non-literal quote, CommandLineToArgv requires an even number of - # backslashes preceding it, and it produces half as many literal - # backslashes. So we need to produce 2n backslashes. - return 2 * match.group(1) + '"' + match.group(2) + '"' - - segments = s.split('"') - # The unquoted segments are at the even-numbered indices. - for i in range(0, len(segments), 2): - segments[i] = delimiters_replacer_regex.sub(_Replace, segments[i]) - # Concatenate back into a single string - s = '"'.join(segments) - if len(segments) % 2 == 0: - # String ends while still quoted according to VCProj's convention. This - # means the delimiter and the next list item that follow this one in the - # .vcproj file will be misinterpreted as part of this item. There is nothing - # we can do about this. Adding an extra quote would correct the problem in - # the VCProj but cause the same problem on the final command-line. Moving - # the item to the end of the list does works, but that's only possible if - # there's only one such item. Let's just warn the user. - print( - "Warning: MSVS may misinterpret the odd number of " + "quotes in " + s, - file=sys.stderr, - ) - return s - - -def _EscapeCppDefineForMSVS(s): - """Escapes a CPP define so that it will reach the compiler unaltered.""" - s = _EscapeEnvironmentVariableExpansion(s) - s = _EscapeCommandLineArgumentForMSVS(s) - s = _EscapeVCProjCommandLineArgListItem(s) - # cl.exe replaces literal # characters with = in preprocessor definitions for - # some reason. Octal-encode to work around that. - s = s.replace("#", "\\%03o" % ord("#")) - return s - - -quote_replacer_regex2 = re.compile(r'(\\+)"') - - -def _EscapeCommandLineArgumentForMSBuild(s): - """Escapes a Windows command-line argument for use by MSBuild.""" - - def _Replace(match): - return (len(match.group(1)) / 2 * 4) * "\\" + '\\"' - - # Escape all quotes so that they are interpreted literally. - s = quote_replacer_regex2.sub(_Replace, s) - return s - - -def _EscapeMSBuildSpecialCharacters(s): - escape_dictionary = { - "%": "%25", - "$": "%24", - "@": "%40", - "'": "%27", - ";": "%3B", - "?": "%3F", - "*": "%2A", - } - result = "".join([escape_dictionary.get(c, c) for c in s]) - return result - - -def _EscapeCppDefineForMSBuild(s): - """Escapes a CPP define so that it will reach the compiler unaltered.""" - s = _EscapeEnvironmentVariableExpansion(s) - s = _EscapeCommandLineArgumentForMSBuild(s) - s = _EscapeMSBuildSpecialCharacters(s) - # cl.exe replaces literal # characters with = in preprocessor definitions for - # some reason. Octal-encode to work around that. - s = s.replace("#", "\\%03o" % ord("#")) - return s - - -def _GenerateRulesForMSVS( - p, output_dir, options, spec, sources, excluded_sources, actions_to_add -): - """Generate all the rules for a particular project. - - Arguments: - p: the project - output_dir: directory to emit rules to - options: global options passed to the generator - spec: the specification for this project - sources: the set of all known source files in this project - excluded_sources: the set of sources excluded from normal processing - actions_to_add: deferred list of actions to add in - """ - rules = spec.get("rules", []) - rules_native = [r for r in rules if not int(r.get("msvs_external_rule", 0))] - rules_external = [r for r in rules if int(r.get("msvs_external_rule", 0))] - - # Handle rules that use a native rules file. - if rules_native: - _GenerateNativeRulesForMSVS(p, rules_native, output_dir, spec, options) - - # Handle external rules (non-native rules). - if rules_external: - _GenerateExternalRules( - rules_external, output_dir, spec, sources, options, actions_to_add - ) - _AdjustSourcesForRules(rules, sources, excluded_sources, False) - - -def _AdjustSourcesForRules(rules, sources, excluded_sources, is_msbuild): - # Add outputs generated by each rule (if applicable). - for rule in rules: - # Add in the outputs from this rule. - trigger_files = _FindRuleTriggerFiles(rule, sources) - for trigger_file in trigger_files: - # Remove trigger_file from excluded_sources to let the rule be triggered - # (e.g. rule trigger ax_enums.idl is added to excluded_sources - # because it's also in an action's inputs in the same project) - excluded_sources.discard(_FixPath(trigger_file)) - # Done if not processing outputs as sources. - if int(rule.get("process_outputs_as_sources", False)): - inputs, outputs = _RuleInputsAndOutputs(rule, trigger_file) - inputs = OrderedSet(_FixPaths(inputs)) - outputs = OrderedSet(_FixPaths(outputs)) - inputs.remove(_FixPath(trigger_file)) - sources.update(inputs) - if not is_msbuild: - excluded_sources.update(inputs) - sources.update(outputs) - - -def _FilterActionsFromExcluded(excluded_sources, actions_to_add): - """Take inputs with actions attached out of the list of exclusions. - - Arguments: - excluded_sources: list of source files not to be built. - actions_to_add: dict of actions keyed on source file they're attached to. - Returns: - excluded_sources with files that have actions attached removed. - """ - must_keep = OrderedSet(_FixPaths(actions_to_add.keys())) - return [s for s in excluded_sources if s not in must_keep] - - -def _GetDefaultConfiguration(spec): - return spec["configurations"][spec["default_configuration"]] - - -def _GetGuidOfProject(proj_path, spec): - """Get the guid for the project. - - Arguments: - proj_path: Path of the vcproj or vcxproj file to generate. - spec: The target dictionary containing the properties of the target. - Returns: - the guid. - Raises: - ValueError: if the specified GUID is invalid. - """ - # Pluck out the default configuration. - default_config = _GetDefaultConfiguration(spec) - # Decide the guid of the project. - guid = default_config.get("msvs_guid") - if guid: - if VALID_MSVS_GUID_CHARS.match(guid) is None: - raise ValueError( - 'Invalid MSVS guid: "%s". Must match regex: "%s".' - % (guid, VALID_MSVS_GUID_CHARS.pattern) - ) - guid = "{%s}" % guid - guid = guid or MSVSNew.MakeGuid(proj_path) - return guid - - -def _GetMsbuildToolsetOfProject(proj_path, spec, version): - """Get the platform toolset for the project. - - Arguments: - proj_path: Path of the vcproj or vcxproj file to generate. - spec: The target dictionary containing the properties of the target. - version: The MSVSVersion object. - Returns: - the platform toolset string or None. - """ - # Pluck out the default configuration. - default_config = _GetDefaultConfiguration(spec) - toolset = default_config.get("msbuild_toolset") - if not toolset and version.DefaultToolset(): - toolset = version.DefaultToolset() - if spec["type"] == "windows_driver": - toolset = "WindowsKernelModeDriver10.0" - return toolset - - -def _GenerateProject(project, options, version, generator_flags, spec): - """Generates a vcproj file. - - Arguments: - project: the MSVSProject object. - options: global generator options. - version: the MSVSVersion object. - generator_flags: dict of generator-specific flags. - Returns: - A list of source files that cannot be found on disk. - """ - default_config = _GetDefaultConfiguration(project.spec) - - # Skip emitting anything if told to with msvs_existing_vcproj option. - if default_config.get("msvs_existing_vcproj"): - return [] - - if version.UsesVcxproj(): - return _GenerateMSBuildProject(project, options, version, generator_flags, spec) - else: - return _GenerateMSVSProject(project, options, version, generator_flags) - - -def _GenerateMSVSProject(project, options, version, generator_flags): - """Generates a .vcproj file. It may create .rules and .user files too. - - Arguments: - project: The project object we will generate the file for. - options: Global options passed to the generator. - version: The VisualStudioVersion object. - generator_flags: dict of generator-specific flags. - """ - spec = project.spec - gyp.common.EnsureDirExists(project.path) - - platforms = _GetUniquePlatforms(spec) - p = MSVSProject.Writer( - project.path, version, spec["target_name"], project.guid, platforms - ) - - # Get directory project file is in. - project_dir = os.path.split(project.path)[0] - gyp_path = _NormalizedSource(project.build_file) - relative_path_of_gyp_file = gyp.common.RelativePath(gyp_path, project_dir) - - config_type = _GetMSVSConfigurationType(spec, project.build_file) - for config_name, config in spec["configurations"].items(): - _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config) - - # Prepare list of sources and excluded sources. - gyp_file = os.path.split(project.build_file)[1] - sources, excluded_sources = _PrepareListOfSources(spec, generator_flags, gyp_file) - - # Add rules. - actions_to_add = {} - _GenerateRulesForMSVS( - p, project_dir, options, spec, sources, excluded_sources, actions_to_add - ) - list_excluded = generator_flags.get("msvs_list_excluded_files", True) - sources, excluded_sources, excluded_idl = _AdjustSourcesAndConvertToFilterHierarchy( - spec, options, project_dir, sources, excluded_sources, list_excluded, version - ) - - # Add in files. - missing_sources = _VerifySourcesExist(sources, project_dir) - p.AddFiles(sources) - - _AddToolFilesToMSVS(p, spec) - _HandlePreCompiledHeaders(p, sources, spec) - _AddActions(actions_to_add, spec, relative_path_of_gyp_file) - _AddCopies(actions_to_add, spec) - _WriteMSVSUserFile(project.path, version, spec) - - # NOTE: this stanza must appear after all actions have been decided. - # Don't excluded sources with actions attached, or they won't run. - excluded_sources = _FilterActionsFromExcluded(excluded_sources, actions_to_add) - _ExcludeFilesFromBeingBuilt(p, spec, excluded_sources, excluded_idl, list_excluded) - _AddAccumulatedActionsToMSVS(p, spec, actions_to_add) - - # Write it out. - p.WriteIfChanged() - - return missing_sources - - -def _GetUniquePlatforms(spec): - """Returns the list of unique platforms for this spec, e.g ['win32', ...]. - - Arguments: - spec: The target dictionary containing the properties of the target. - Returns: - The MSVSUserFile object created. - """ - # Gather list of unique platforms. - platforms = OrderedSet() - for configuration in spec["configurations"]: - platforms.add(_ConfigPlatform(spec["configurations"][configuration])) - platforms = list(platforms) - return platforms - - -def _CreateMSVSUserFile(proj_path, version, spec): - """Generates a .user file for the user running this Gyp program. - - Arguments: - proj_path: The path of the project file being created. The .user file - shares the same path (with an appropriate suffix). - version: The VisualStudioVersion object. - spec: The target dictionary containing the properties of the target. - Returns: - The MSVSUserFile object created. - """ - (domain, username) = _GetDomainAndUserName() - vcuser_filename = ".".join([proj_path, domain, username, "user"]) - user_file = MSVSUserFile.Writer(vcuser_filename, version, spec["target_name"]) - return user_file - - -def _GetMSVSConfigurationType(spec, build_file): - """Returns the configuration type for this project. - - It's a number defined by Microsoft. May raise an exception. - - Args: - spec: The target dictionary containing the properties of the target. - build_file: The path of the gyp file. - Returns: - An integer, the configuration type. - """ - try: - config_type = { - "executable": "1", # .exe - "shared_library": "2", # .dll - "loadable_module": "2", # .dll - "static_library": "4", # .lib - "windows_driver": "5", # .sys - "none": "10", # Utility type - }[spec["type"]] - except KeyError: - if spec.get("type"): - raise GypError( - "Target type %s is not a valid target type for " - "target %s in %s." % (spec["type"], spec["target_name"], build_file) - ) - else: - raise GypError( - "Missing type field for target %s in %s." - % (spec["target_name"], build_file) - ) - return config_type - - -def _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config): - """Adds a configuration to the MSVS project. - - Many settings in a vcproj file are specific to a configuration. This - function the main part of the vcproj file that's configuration specific. - - Arguments: - p: The target project being generated. - spec: The target dictionary containing the properties of the target. - config_type: The configuration type, a number as defined by Microsoft. - config_name: The name of the configuration. - config: The dictionary that defines the special processing to be done - for this configuration. - """ - # Get the information for this configuration - include_dirs, midl_include_dirs, resource_include_dirs = _GetIncludeDirs(config) - libraries = _GetLibraries(spec) - library_dirs = _GetLibraryDirs(config) - out_file, vc_tool, _ = _GetOutputFilePathAndTool(spec, msbuild=False) - defines = _GetDefines(config) - defines = [_EscapeCppDefineForMSVS(d) for d in defines] - disabled_warnings = _GetDisabledWarnings(config) - prebuild = config.get("msvs_prebuild") - postbuild = config.get("msvs_postbuild") - def_file = _GetModuleDefinition(spec) - precompiled_header = config.get("msvs_precompiled_header") - - # Prepare the list of tools as a dictionary. - tools = dict() - # Add in user specified msvs_settings. - msvs_settings = config.get("msvs_settings", {}) - MSVSSettings.ValidateMSVSSettings(msvs_settings) - - # Prevent default library inheritance from the environment. - _ToolAppend(tools, "VCLinkerTool", "AdditionalDependencies", ["$(NOINHERIT)"]) - - for tool in msvs_settings: - settings = config["msvs_settings"][tool] - for setting in settings: - _ToolAppend(tools, tool, setting, settings[setting]) - # Add the information to the appropriate tool - _ToolAppend(tools, "VCCLCompilerTool", "AdditionalIncludeDirectories", include_dirs) - _ToolAppend(tools, "VCMIDLTool", "AdditionalIncludeDirectories", midl_include_dirs) - _ToolAppend( - tools, - "VCResourceCompilerTool", - "AdditionalIncludeDirectories", - resource_include_dirs, - ) - # Add in libraries. - _ToolAppend(tools, "VCLinkerTool", "AdditionalDependencies", libraries) - _ToolAppend(tools, "VCLinkerTool", "AdditionalLibraryDirectories", library_dirs) - if out_file: - _ToolAppend(tools, vc_tool, "OutputFile", out_file, only_if_unset=True) - # Add defines. - _ToolAppend(tools, "VCCLCompilerTool", "PreprocessorDefinitions", defines) - _ToolAppend(tools, "VCResourceCompilerTool", "PreprocessorDefinitions", defines) - # Change program database directory to prevent collisions. - _ToolAppend( - tools, - "VCCLCompilerTool", - "ProgramDataBaseFileName", - "$(IntDir)$(ProjectName)\\vc80.pdb", - only_if_unset=True, - ) - # Add disabled warnings. - _ToolAppend(tools, "VCCLCompilerTool", "DisableSpecificWarnings", disabled_warnings) - # Add Pre-build. - _ToolAppend(tools, "VCPreBuildEventTool", "CommandLine", prebuild) - # Add Post-build. - _ToolAppend(tools, "VCPostBuildEventTool", "CommandLine", postbuild) - # Turn on precompiled headers if appropriate. - if precompiled_header: - precompiled_header = os.path.split(precompiled_header)[1] - _ToolAppend(tools, "VCCLCompilerTool", "UsePrecompiledHeader", "2") - _ToolAppend( - tools, "VCCLCompilerTool", "PrecompiledHeaderThrough", precompiled_header - ) - _ToolAppend(tools, "VCCLCompilerTool", "ForcedIncludeFiles", precompiled_header) - # Loadable modules don't generate import libraries; - # tell dependent projects to not expect one. - if spec["type"] == "loadable_module": - _ToolAppend(tools, "VCLinkerTool", "IgnoreImportLibrary", "true") - # Set the module definition file if any. - if def_file: - _ToolAppend(tools, "VCLinkerTool", "ModuleDefinitionFile", def_file) - - _AddConfigurationToMSVS(p, spec, tools, config, config_type, config_name) - - -def _GetIncludeDirs(config): - """Returns the list of directories to be used for #include directives. - - Arguments: - config: The dictionary that defines the special processing to be done - for this configuration. - Returns: - The list of directory paths. - """ - # TODO(bradnelson): include_dirs should really be flexible enough not to - # require this sort of thing. - include_dirs = config.get("include_dirs", []) + config.get( - "msvs_system_include_dirs", [] - ) - midl_include_dirs = config.get("midl_include_dirs", []) + config.get( - "msvs_system_include_dirs", [] - ) - resource_include_dirs = config.get("resource_include_dirs", include_dirs) - include_dirs = _FixPaths(include_dirs) - midl_include_dirs = _FixPaths(midl_include_dirs) - resource_include_dirs = _FixPaths(resource_include_dirs) - return include_dirs, midl_include_dirs, resource_include_dirs - - -def _GetLibraryDirs(config): - """Returns the list of directories to be used for library search paths. - - Arguments: - config: The dictionary that defines the special processing to be done - for this configuration. - Returns: - The list of directory paths. - """ - - library_dirs = config.get("library_dirs", []) - library_dirs = _FixPaths(library_dirs) - return library_dirs - - -def _GetLibraries(spec): - """Returns the list of libraries for this configuration. - - Arguments: - spec: The target dictionary containing the properties of the target. - Returns: - The list of directory paths. - """ - libraries = spec.get("libraries", []) - # Strip out -l, as it is not used on windows (but is needed so we can pass - # in libraries that are assumed to be in the default library path). - # Also remove duplicate entries, leaving only the last duplicate, while - # preserving order. - found = OrderedSet() - unique_libraries_list = [] - for entry in reversed(libraries): - library = re.sub(r"^\-l", "", entry) - if not os.path.splitext(library)[1]: - library += ".lib" - if library not in found: - found.add(library) - unique_libraries_list.append(library) - unique_libraries_list.reverse() - return unique_libraries_list - - -def _GetOutputFilePathAndTool(spec, msbuild): - """Returns the path and tool to use for this target. - - Figures out the path of the file this spec will create and the name of - the VC tool that will create it. - - Arguments: - spec: The target dictionary containing the properties of the target. - Returns: - A triple of (file path, name of the vc tool, name of the msbuild tool) - """ - # Select a name for the output file. - out_file = "" - vc_tool = "" - msbuild_tool = "" - output_file_map = { - "executable": ("VCLinkerTool", "Link", "$(OutDir)", ".exe"), - "shared_library": ("VCLinkerTool", "Link", "$(OutDir)", ".dll"), - "loadable_module": ("VCLinkerTool", "Link", "$(OutDir)", ".dll"), - "windows_driver": ("VCLinkerTool", "Link", "$(OutDir)", ".sys"), - "static_library": ("VCLibrarianTool", "Lib", "$(OutDir)lib\\", ".lib"), - } - output_file_props = output_file_map.get(spec["type"]) - if output_file_props and int(spec.get("msvs_auto_output_file", 1)): - vc_tool, msbuild_tool, out_dir, suffix = output_file_props - if spec.get("standalone_static_library", 0): - out_dir = "$(OutDir)" - out_dir = spec.get("product_dir", out_dir) - product_extension = spec.get("product_extension") - if product_extension: - suffix = "." + product_extension - elif msbuild: - suffix = "$(TargetExt)" - prefix = spec.get("product_prefix", "") - product_name = spec.get("product_name", "$(ProjectName)") - out_file = ntpath.join(out_dir, prefix + product_name + suffix) - return out_file, vc_tool, msbuild_tool - - -def _GetOutputTargetExt(spec): - """Returns the extension for this target, including the dot - - If product_extension is specified, set target_extension to this to avoid - MSB8012, returns None otherwise. Ignores any target_extension settings in - the input files. - - Arguments: - spec: The target dictionary containing the properties of the target. - Returns: - A string with the extension, or None - """ - target_extension = spec.get("product_extension") - if target_extension: - return "." + target_extension - return None - - -def _GetDefines(config): - """Returns the list of preprocessor definitions for this configuration. - - Arguments: - config: The dictionary that defines the special processing to be done - for this configuration. - Returns: - The list of preprocessor definitions. - """ - defines = [] - for d in config.get("defines", []): - if type(d) == list: - fd = "=".join([str(dpart) for dpart in d]) - else: - fd = str(d) - defines.append(fd) - return defines - - -def _GetDisabledWarnings(config): - return [str(i) for i in config.get("msvs_disabled_warnings", [])] - - -def _GetModuleDefinition(spec): - def_file = "" - if spec["type"] in [ - "shared_library", - "loadable_module", - "executable", - "windows_driver", - ]: - def_files = [s for s in spec.get("sources", []) if s.endswith(".def")] - if len(def_files) == 1: - def_file = _FixPath(def_files[0]) - elif def_files: - raise ValueError( - "Multiple module definition files in one target, target %s lists " - "multiple .def files: %s" % (spec["target_name"], " ".join(def_files)) - ) - return def_file - - -def _ConvertToolsToExpectedForm(tools): - """Convert tools to a form expected by Visual Studio. - - Arguments: - tools: A dictionary of settings; the tool name is the key. - Returns: - A list of Tool objects. - """ - tool_list = [] - for tool, settings in tools.items(): - # Collapse settings with lists. - settings_fixed = {} - for setting, value in settings.items(): - if type(value) == list: - if ( - tool == "VCLinkerTool" and setting == "AdditionalDependencies" - ) or setting == "AdditionalOptions": - settings_fixed[setting] = " ".join(value) - else: - settings_fixed[setting] = ";".join(value) - else: - settings_fixed[setting] = value - # Add in this tool. - tool_list.append(MSVSProject.Tool(tool, settings_fixed)) - return tool_list - - -def _AddConfigurationToMSVS(p, spec, tools, config, config_type, config_name): - """Add to the project file the configuration specified by config. - - Arguments: - p: The target project being generated. - spec: the target project dict. - tools: A dictionary of settings; the tool name is the key. - config: The dictionary that defines the special processing to be done - for this configuration. - config_type: The configuration type, a number as defined by Microsoft. - config_name: The name of the configuration. - """ - attributes = _GetMSVSAttributes(spec, config, config_type) - # Add in this configuration. - tool_list = _ConvertToolsToExpectedForm(tools) - p.AddConfig(_ConfigFullName(config_name, config), attrs=attributes, tools=tool_list) - - -def _GetMSVSAttributes(spec, config, config_type): - # Prepare configuration attributes. - prepared_attrs = {} - source_attrs = config.get("msvs_configuration_attributes", {}) - for a in source_attrs: - prepared_attrs[a] = source_attrs[a] - # Add props files. - vsprops_dirs = config.get("msvs_props", []) - vsprops_dirs = _FixPaths(vsprops_dirs) - if vsprops_dirs: - prepared_attrs["InheritedPropertySheets"] = ";".join(vsprops_dirs) - # Set configuration type. - prepared_attrs["ConfigurationType"] = config_type - output_dir = prepared_attrs.get( - "OutputDirectory", "$(SolutionDir)$(ConfigurationName)" - ) - prepared_attrs["OutputDirectory"] = _FixPath(output_dir) + "\\" - if "IntermediateDirectory" not in prepared_attrs: - intermediate = "$(ConfigurationName)\\obj\\$(ProjectName)" - prepared_attrs["IntermediateDirectory"] = _FixPath(intermediate) + "\\" - else: - intermediate = _FixPath(prepared_attrs["IntermediateDirectory"]) + "\\" - intermediate = MSVSSettings.FixVCMacroSlashes(intermediate) - prepared_attrs["IntermediateDirectory"] = intermediate - return prepared_attrs - - -def _AddNormalizedSources(sources_set, sources_array): - sources_set.update(_NormalizedSource(s) for s in sources_array) - - -def _PrepareListOfSources(spec, generator_flags, gyp_file): - """Prepare list of sources and excluded sources. - - Besides the sources specified directly in the spec, adds the gyp file so - that a change to it will cause a re-compile. Also adds appropriate sources - for actions and copies. Assumes later stage will un-exclude files which - have custom build steps attached. - - Arguments: - spec: The target dictionary containing the properties of the target. - gyp_file: The name of the gyp file. - Returns: - A pair of (list of sources, list of excluded sources). - The sources will be relative to the gyp file. - """ - sources = OrderedSet() - _AddNormalizedSources(sources, spec.get("sources", [])) - excluded_sources = OrderedSet() - # Add in the gyp file. - if not generator_flags.get("standalone"): - sources.add(gyp_file) - - # Add in 'action' inputs and outputs. - for a in spec.get("actions", []): - inputs = a["inputs"] - inputs = [_NormalizedSource(i) for i in inputs] - # Add all inputs to sources and excluded sources. - inputs = OrderedSet(inputs) - sources.update(inputs) - if not spec.get("msvs_external_builder"): - excluded_sources.update(inputs) - if int(a.get("process_outputs_as_sources", False)): - _AddNormalizedSources(sources, a.get("outputs", [])) - # Add in 'copies' inputs and outputs. - for cpy in spec.get("copies", []): - _AddNormalizedSources(sources, cpy.get("files", [])) - return (sources, excluded_sources) - - -def _AdjustSourcesAndConvertToFilterHierarchy( - spec, options, gyp_dir, sources, excluded_sources, list_excluded, version -): - """Adjusts the list of sources and excluded sources. - - Also converts the sets to lists. - - Arguments: - spec: The target dictionary containing the properties of the target. - options: Global generator options. - gyp_dir: The path to the gyp file being processed. - sources: A set of sources to be included for this project. - excluded_sources: A set of sources to be excluded for this project. - version: A MSVSVersion object. - Returns: - A trio of (list of sources, list of excluded sources, - path of excluded IDL file) - """ - # Exclude excluded sources coming into the generator. - excluded_sources.update(OrderedSet(spec.get("sources_excluded", []))) - # Add excluded sources into sources for good measure. - sources.update(excluded_sources) - # Convert to proper windows form. - # NOTE: sources goes from being a set to a list here. - # NOTE: excluded_sources goes from being a set to a list here. - sources = _FixPaths(sources) - # Convert to proper windows form. - excluded_sources = _FixPaths(excluded_sources) - - excluded_idl = _IdlFilesHandledNonNatively(spec, sources) - - precompiled_related = _GetPrecompileRelatedFiles(spec) - # Find the excluded ones, minus the precompiled header related ones. - fully_excluded = [i for i in excluded_sources if i not in precompiled_related] - - # Convert to folders and the right slashes. - sources = [i.split("\\") for i in sources] - sources = _ConvertSourcesToFilterHierarchy( - sources, - excluded=fully_excluded, - list_excluded=list_excluded, - msvs_version=version, - ) - - # Prune filters with a single child to flatten ugly directory structures - # such as ../../src/modules/module1 etc. - if version.UsesVcxproj(): - while ( - all([isinstance(s, MSVSProject.Filter) for s in sources]) - and len({s.name for s in sources}) == 1 - ): - assert all([len(s.contents) == 1 for s in sources]) - sources = [s.contents[0] for s in sources] - else: - while len(sources) == 1 and isinstance(sources[0], MSVSProject.Filter): - sources = sources[0].contents - - return sources, excluded_sources, excluded_idl - - -def _IdlFilesHandledNonNatively(spec, sources): - # If any non-native rules use 'idl' as an extension exclude idl files. - # Gather a list here to use later. - using_idl = False - for rule in spec.get("rules", []): - if rule["extension"] == "idl" and int(rule.get("msvs_external_rule", 0)): - using_idl = True - break - if using_idl: - excluded_idl = [i for i in sources if i.endswith(".idl")] - else: - excluded_idl = [] - return excluded_idl - - -def _GetPrecompileRelatedFiles(spec): - # Gather a list of precompiled header related sources. - precompiled_related = [] - for _, config in spec["configurations"].items(): - for k in precomp_keys: - f = config.get(k) - if f: - precompiled_related.append(_FixPath(f)) - return precompiled_related - - -def _ExcludeFilesFromBeingBuilt(p, spec, excluded_sources, excluded_idl, list_excluded): - exclusions = _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl) - for file_name, excluded_configs in exclusions.items(): - if not list_excluded and len(excluded_configs) == len(spec["configurations"]): - # If we're not listing excluded files, then they won't appear in the - # project, so don't try to configure them to be excluded. - pass - else: - for config_name, config in excluded_configs: - p.AddFileConfig( - file_name, - _ConfigFullName(config_name, config), - {"ExcludedFromBuild": "true"}, - ) - - -def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl): - exclusions = {} - # Exclude excluded sources from being built. - for f in excluded_sources: - excluded_configs = [] - for config_name, config in spec["configurations"].items(): - precomped = [_FixPath(config.get(i, "")) for i in precomp_keys] - # Don't do this for ones that are precompiled header related. - if f not in precomped: - excluded_configs.append((config_name, config)) - exclusions[f] = excluded_configs - # If any non-native rules use 'idl' as an extension exclude idl files. - # Exclude them now. - for f in excluded_idl: - excluded_configs = [] - for config_name, config in spec["configurations"].items(): - excluded_configs.append((config_name, config)) - exclusions[f] = excluded_configs - return exclusions - - -def _AddToolFilesToMSVS(p, spec): - # Add in tool files (rules). - tool_files = OrderedSet() - for _, config in spec["configurations"].items(): - for f in config.get("msvs_tool_files", []): - tool_files.add(f) - for f in tool_files: - p.AddToolFile(f) - - -def _HandlePreCompiledHeaders(p, sources, spec): - # Pre-compiled header source stubs need a different compiler flag - # (generate precompiled header) and any source file not of the same - # kind (i.e. C vs. C++) as the precompiled header source stub needs - # to have use of precompiled headers disabled. - extensions_excluded_from_precompile = [] - for config_name, config in spec["configurations"].items(): - source = config.get("msvs_precompiled_source") - if source: - source = _FixPath(source) - # UsePrecompiledHeader=1 for if using precompiled headers. - tool = MSVSProject.Tool("VCCLCompilerTool", {"UsePrecompiledHeader": "1"}) - p.AddFileConfig( - source, _ConfigFullName(config_name, config), {}, tools=[tool] - ) - basename, extension = os.path.splitext(source) - if extension == ".c": - extensions_excluded_from_precompile = [".cc", ".cpp", ".cxx"] - else: - extensions_excluded_from_precompile = [".c"] - - def DisableForSourceTree(source_tree): - for source in source_tree: - if isinstance(source, MSVSProject.Filter): - DisableForSourceTree(source.contents) - else: - basename, extension = os.path.splitext(source) - if extension in extensions_excluded_from_precompile: - for config_name, config in spec["configurations"].items(): - tool = MSVSProject.Tool( - "VCCLCompilerTool", - { - "UsePrecompiledHeader": "0", - "ForcedIncludeFiles": "$(NOINHERIT)", - }, - ) - p.AddFileConfig( - _FixPath(source), - _ConfigFullName(config_name, config), - {}, - tools=[tool], - ) - - # Do nothing if there was no precompiled source. - if extensions_excluded_from_precompile: - DisableForSourceTree(sources) - - -def _AddActions(actions_to_add, spec, relative_path_of_gyp_file): - # Add actions. - actions = spec.get("actions", []) - # Don't setup_env every time. When all the actions are run together in one - # batch file in VS, the PATH will grow too long. - # Membership in this set means that the cygwin environment has been set up, - # and does not need to be set up again. - have_setup_env = set() - for a in actions: - # Attach actions to the gyp file if nothing else is there. - inputs = a.get("inputs") or [relative_path_of_gyp_file] - attached_to = inputs[0] - need_setup_env = attached_to not in have_setup_env - cmd = _BuildCommandLineForRule( - spec, a, has_input_path=False, do_setup_env=need_setup_env - ) - have_setup_env.add(attached_to) - # Add the action. - _AddActionStep( - actions_to_add, - inputs=inputs, - outputs=a.get("outputs", []), - description=a.get("message", a["action_name"]), - command=cmd, - ) - - -def _WriteMSVSUserFile(project_path, version, spec): - # Add run_as and test targets. - if "run_as" in spec: - run_as = spec["run_as"] - action = run_as.get("action", []) - environment = run_as.get("environment", []) - working_directory = run_as.get("working_directory", ".") - elif int(spec.get("test", 0)): - action = ["$(TargetPath)", "--gtest_print_time"] - environment = [] - working_directory = "." - else: - return # Nothing to add - # Write out the user file. - user_file = _CreateMSVSUserFile(project_path, version, spec) - for config_name, c_data in spec["configurations"].items(): - user_file.AddDebugSettings( - _ConfigFullName(config_name, c_data), action, environment, working_directory - ) - user_file.WriteIfChanged() - - -def _AddCopies(actions_to_add, spec): - copies = _GetCopies(spec) - for inputs, outputs, cmd, description in copies: - _AddActionStep( - actions_to_add, - inputs=inputs, - outputs=outputs, - description=description, - command=cmd, - ) - - -def _GetCopies(spec): - copies = [] - # Add copies. - for cpy in spec.get("copies", []): - for src in cpy.get("files", []): - dst = os.path.join(cpy["destination"], os.path.basename(src)) - # _AddCustomBuildToolForMSVS() will call _FixPath() on the inputs and - # outputs, so do the same for our generated command line. - if src.endswith("/"): - src_bare = src[:-1] - base_dir = posixpath.split(src_bare)[0] - outer_dir = posixpath.split(src_bare)[1] - fixed_dst = _FixPath(dst) - full_dst = f'"{fixed_dst}\\{outer_dir}\\"' - cmd = 'mkdir {} 2>nul & cd "{}" && xcopy /e /f /y "{}" {}'.format( - full_dst, - _FixPath(base_dir), - outer_dir, - full_dst, - ) - copies.append( - ( - [src], - ["dummy_copies", dst], - cmd, - f"Copying {src} to {fixed_dst}", - ) - ) - else: - fix_dst = _FixPath(cpy["destination"]) - cmd = 'mkdir "{}" 2>nul & set ERRORLEVEL=0 & copy /Y "{}" "{}"'.format( - fix_dst, - _FixPath(src), - _FixPath(dst), - ) - copies.append(([src], [dst], cmd, f"Copying {src} to {fix_dst}")) - return copies - - -def _GetPathDict(root, path): - # |path| will eventually be empty (in the recursive calls) if it was initially - # relative; otherwise it will eventually end up as '\', 'D:\', etc. - if not path or path.endswith(os.sep): - return root - parent, folder = os.path.split(path) - parent_dict = _GetPathDict(root, parent) - if folder not in parent_dict: - parent_dict[folder] = dict() - return parent_dict[folder] - - -def _DictsToFolders(base_path, bucket, flat): - # Convert to folders recursively. - children = [] - for folder, contents in bucket.items(): - if type(contents) == dict: - folder_children = _DictsToFolders( - os.path.join(base_path, folder), contents, flat - ) - if flat: - children += folder_children - else: - folder_children = MSVSNew.MSVSFolder( - os.path.join(base_path, folder), - name="(" + folder + ")", - entries=folder_children, - ) - children.append(folder_children) - else: - children.append(contents) - return children - - -def _CollapseSingles(parent, node): - # Recursively explorer the tree of dicts looking for projects which are - # the sole item in a folder which has the same name as the project. Bring - # such projects up one level. - if type(node) == dict and len(node) == 1 and next(iter(node)) == parent + ".vcproj": - return node[next(iter(node))] - if type(node) != dict: - return node - for child in node: - node[child] = _CollapseSingles(child, node[child]) - return node - - -def _GatherSolutionFolders(sln_projects, project_objects, flat): - root = {} - # Convert into a tree of dicts on path. - for p in sln_projects: - gyp_file, target = gyp.common.ParseQualifiedTarget(p)[0:2] - if p.endswith("#host"): - target += "_host" - gyp_dir = os.path.dirname(gyp_file) - path_dict = _GetPathDict(root, gyp_dir) - path_dict[target + ".vcproj"] = project_objects[p] - # Walk down from the top until we hit a folder that has more than one entry. - # In practice, this strips the top-level "src/" dir from the hierarchy in - # the solution. - while len(root) == 1 and type(root[next(iter(root))]) == dict: - root = root[next(iter(root))] - # Collapse singles. - root = _CollapseSingles("", root) - # Merge buckets until everything is a root entry. - return _DictsToFolders("", root, flat) - - -def _GetPathOfProject(qualified_target, spec, options, msvs_version): - default_config = _GetDefaultConfiguration(spec) - proj_filename = default_config.get("msvs_existing_vcproj") - if not proj_filename: - proj_filename = spec["target_name"] - if spec["toolset"] == "host": - proj_filename += "_host" - proj_filename = proj_filename + options.suffix + msvs_version.ProjectExtension() - - build_file = gyp.common.BuildFile(qualified_target) - proj_path = os.path.join(os.path.dirname(build_file), proj_filename) - fix_prefix = None - if options.generator_output: - project_dir_path = os.path.dirname(os.path.abspath(proj_path)) - proj_path = os.path.join(options.generator_output, proj_path) - fix_prefix = gyp.common.RelativePath( - project_dir_path, os.path.dirname(proj_path) - ) - return proj_path, fix_prefix - - -def _GetPlatformOverridesOfProject(spec): - # Prepare a dict indicating which project configurations are used for which - # solution configurations for this target. - config_platform_overrides = {} - for config_name, c in spec["configurations"].items(): - config_fullname = _ConfigFullName(config_name, c) - platform = c.get("msvs_target_platform", _ConfigPlatform(c)) - fixed_config_fullname = "{}|{}".format( - _ConfigBaseName(config_name, _ConfigPlatform(c)), - platform, - ) - if spec["toolset"] == "host" and generator_supports_multiple_toolsets: - fixed_config_fullname = f"{config_name}|x64" - config_platform_overrides[config_fullname] = fixed_config_fullname - return config_platform_overrides - - -def _CreateProjectObjects(target_list, target_dicts, options, msvs_version): - """Create a MSVSProject object for the targets found in target list. - - Arguments: - target_list: the list of targets to generate project objects for. - target_dicts: the dictionary of specifications. - options: global generator options. - msvs_version: the MSVSVersion object. - Returns: - A set of created projects, keyed by target. - """ - global fixpath_prefix - # Generate each project. - projects = {} - for qualified_target in target_list: - spec = target_dicts[qualified_target] - proj_path, fixpath_prefix = _GetPathOfProject( - qualified_target, spec, options, msvs_version - ) - guid = _GetGuidOfProject(proj_path, spec) - overrides = _GetPlatformOverridesOfProject(spec) - build_file = gyp.common.BuildFile(qualified_target) - # Create object for this project. - target_name = spec["target_name"] - if spec["toolset"] == "host": - target_name += "_host" - obj = MSVSNew.MSVSProject( - proj_path, - name=target_name, - guid=guid, - spec=spec, - build_file=build_file, - config_platform_overrides=overrides, - fixpath_prefix=fixpath_prefix, - ) - # Set project toolset if any (MS build only) - if msvs_version.UsesVcxproj(): - obj.set_msbuild_toolset( - _GetMsbuildToolsetOfProject(proj_path, spec, msvs_version) - ) - projects[qualified_target] = obj - # Set all the dependencies, but not if we are using an external builder like - # ninja - for project in projects.values(): - if not project.spec.get("msvs_external_builder"): - deps = project.spec.get("dependencies", []) - deps = [projects[d] for d in deps] - project.set_dependencies(deps) - return projects - - -def _InitNinjaFlavor(params, target_list, target_dicts): - """Initialize targets for the ninja flavor. - - This sets up the necessary variables in the targets to generate msvs projects - that use ninja as an external builder. The variables in the spec are only set - if they have not been set. This allows individual specs to override the - default values initialized here. - Arguments: - params: Params provided to the generator. - target_list: List of target pairs: 'base/base.gyp:base'. - target_dicts: Dict of target properties keyed on target pair. - """ - for qualified_target in target_list: - spec = target_dicts[qualified_target] - if spec.get("msvs_external_builder"): - # The spec explicitly defined an external builder, so don't change it. - continue - - path_to_ninja = spec.get("msvs_path_to_ninja", "ninja.exe") - - spec["msvs_external_builder"] = "ninja" - if not spec.get("msvs_external_builder_out_dir"): - gyp_file, _, _ = gyp.common.ParseQualifiedTarget(qualified_target) - gyp_dir = os.path.dirname(gyp_file) - configuration = "$(Configuration)" - if params.get("target_arch") == "x64": - configuration += "_x64" - if params.get("target_arch") == "arm64": - configuration += "_arm64" - spec["msvs_external_builder_out_dir"] = os.path.join( - gyp.common.RelativePath(params["options"].toplevel_dir, gyp_dir), - ninja_generator.ComputeOutputDir(params), - configuration, - ) - if not spec.get("msvs_external_builder_build_cmd"): - spec["msvs_external_builder_build_cmd"] = [ - path_to_ninja, - "-C", - "$(OutDir)", - "$(ProjectName)", - ] - if not spec.get("msvs_external_builder_clean_cmd"): - spec["msvs_external_builder_clean_cmd"] = [ - path_to_ninja, - "-C", - "$(OutDir)", - "-tclean", - "$(ProjectName)", - ] - - -def CalculateVariables(default_variables, params): - """Generated variables that require params to be known.""" - - generator_flags = params.get("generator_flags", {}) - - # Select project file format version (if unset, default to auto detecting). - msvs_version = MSVSVersion.SelectVisualStudioVersion( - generator_flags.get("msvs_version", "auto") - ) - # Stash msvs_version for later (so we don't have to probe the system twice). - params["msvs_version"] = msvs_version - - # Set a variable so conditions can be based on msvs_version. - default_variables["MSVS_VERSION"] = msvs_version.ShortName() - - # To determine processor word size on Windows, in addition to checking - # PROCESSOR_ARCHITECTURE (which reflects the word size of the current - # process), it is also necessary to check PROCESSOR_ARCITEW6432 (which - # contains the actual word size of the system when running thru WOW64). - if ( - os.environ.get("PROCESSOR_ARCHITECTURE", "").find("64") >= 0 - or os.environ.get("PROCESSOR_ARCHITEW6432", "").find("64") >= 0 - ): - default_variables["MSVS_OS_BITS"] = 64 - else: - default_variables["MSVS_OS_BITS"] = 32 - - if gyp.common.GetFlavor(params) == "ninja": - default_variables["SHARED_INTERMEDIATE_DIR"] = "$(OutDir)gen" - - -def PerformBuild(data, configurations, params): - options = params["options"] - msvs_version = params["msvs_version"] - devenv = os.path.join(msvs_version.path, "Common7", "IDE", "devenv.com") - - for build_file, build_file_dict in data.items(): - (build_file_root, build_file_ext) = os.path.splitext(build_file) - if build_file_ext != ".gyp": - continue - sln_path = build_file_root + options.suffix + ".sln" - if options.generator_output: - sln_path = os.path.join(options.generator_output, sln_path) - - for config in configurations: - arguments = [devenv, sln_path, "/Build", config] - print(f"Building [{config}]: {arguments}") - subprocess.check_call(arguments) - - -def CalculateGeneratorInputInfo(params): - if params.get("flavor") == "ninja": - toplevel = params["options"].toplevel_dir - qualified_out_dir = os.path.normpath( - os.path.join( - toplevel, - ninja_generator.ComputeOutputDir(params), - "gypfiles-msvs-ninja", - ) - ) - - global generator_filelist_paths - generator_filelist_paths = { - "toplevel": toplevel, - "qualified_out_dir": qualified_out_dir, - } - - -def GenerateOutput(target_list, target_dicts, data, params): - """Generate .sln and .vcproj files. - - This is the entry point for this generator. - Arguments: - target_list: List of target pairs: 'base/base.gyp:base'. - target_dicts: Dict of target properties keyed on target pair. - data: Dictionary containing per .gyp data. - """ - global fixpath_prefix - - options = params["options"] - - # Get the project file format version back out of where we stashed it in - # GeneratorCalculatedVariables. - msvs_version = params["msvs_version"] - - generator_flags = params.get("generator_flags", {}) - - # Optionally shard targets marked with 'msvs_shard': SHARD_COUNT. - (target_list, target_dicts) = MSVSUtil.ShardTargets(target_list, target_dicts) - - # Optionally use the large PDB workaround for targets marked with - # 'msvs_large_pdb': 1. - (target_list, target_dicts) = MSVSUtil.InsertLargePdbShims( - target_list, target_dicts, generator_default_variables - ) - - # Optionally configure each spec to use ninja as the external builder. - if params.get("flavor") == "ninja": - _InitNinjaFlavor(params, target_list, target_dicts) - - # Prepare the set of configurations. - configs = set() - for qualified_target in target_list: - spec = target_dicts[qualified_target] - for config_name, config in spec["configurations"].items(): - config_name = _ConfigFullName(config_name, config) - configs.add(config_name) - if config_name == "Release|arm64": - configs.add("Release|x64") - configs = list(configs) - - # Figure out all the projects that will be generated and their guids - project_objects = _CreateProjectObjects( - target_list, target_dicts, options, msvs_version - ) - - # Generate each project. - missing_sources = [] - for project in project_objects.values(): - fixpath_prefix = project.fixpath_prefix - missing_sources.extend( - _GenerateProject(project, options, msvs_version, generator_flags, spec) - ) - fixpath_prefix = None - - for build_file in data: - # Validate build_file extension - target_only_configs = configs - if generator_supports_multiple_toolsets: - target_only_configs = [i for i in configs if i.endswith("arm64")] - if not build_file.endswith(".gyp"): - continue - sln_path = os.path.splitext(build_file)[0] + options.suffix + ".sln" - if options.generator_output: - sln_path = os.path.join(options.generator_output, sln_path) - # Get projects in the solution, and their dependents. - sln_projects = gyp.common.BuildFileTargets(target_list, build_file) - sln_projects += gyp.common.DeepDependencyTargets(target_dicts, sln_projects) - # Create folder hierarchy. - root_entries = _GatherSolutionFolders( - sln_projects, project_objects, flat=msvs_version.FlatSolution() - ) - # Create solution. - sln = MSVSNew.MSVSSolution( - sln_path, - entries=root_entries, - variants=target_only_configs, - websiteProperties=False, - version=msvs_version, - ) - sln.Write() - - if missing_sources: - error_message = "Missing input files:\n" + "\n".join(set(missing_sources)) - if generator_flags.get("msvs_error_on_missing_sources", False): - raise GypError(error_message) - else: - print("Warning: " + error_message, file=sys.stdout) - - -def _GenerateMSBuildFiltersFile( - filters_path, - source_files, - rule_dependencies, - extension_to_rule_name, - platforms, - toolset, -): - """Generate the filters file. - - This file is used by Visual Studio to organize the presentation of source - files into folders. - - Arguments: - filters_path: The path of the file to be created. - source_files: The hierarchical structure of all the sources. - extension_to_rule_name: A dictionary mapping file extensions to rules. - """ - filter_group = [] - source_group = [] - _AppendFiltersForMSBuild( - "", - source_files, - rule_dependencies, - extension_to_rule_name, - platforms, - toolset, - filter_group, - source_group, - ) - if filter_group: - content = [ - "Project", - { - "ToolsVersion": "4.0", - "xmlns": "http://schemas.microsoft.com/developer/msbuild/2003", - }, - ["ItemGroup"] + filter_group, - ["ItemGroup"] + source_group, - ] - easy_xml.WriteXmlIfChanged(content, filters_path, pretty=True, win32=True) - elif os.path.exists(filters_path): - # We don't need this filter anymore. Delete the old filter file. - os.unlink(filters_path) - - -def _AppendFiltersForMSBuild( - parent_filter_name, - sources, - rule_dependencies, - extension_to_rule_name, - platforms, - toolset, - filter_group, - source_group, -): - """Creates the list of filters and sources to be added in the filter file. - - Args: - parent_filter_name: The name of the filter under which the sources are - found. - sources: The hierarchy of filters and sources to process. - extension_to_rule_name: A dictionary mapping file extensions to rules. - filter_group: The list to which filter entries will be appended. - source_group: The list to which source entries will be appended. - """ - for source in sources: - if isinstance(source, MSVSProject.Filter): - # We have a sub-filter. Create the name of that sub-filter. - if not parent_filter_name: - filter_name = source.name - else: - filter_name = f"{parent_filter_name}\\{source.name}" - # Add the filter to the group. - filter_group.append( - [ - "Filter", - {"Include": filter_name}, - ["UniqueIdentifier", MSVSNew.MakeGuid(source.name)], - ] - ) - # Recurse and add its dependents. - _AppendFiltersForMSBuild( - filter_name, - source.contents, - rule_dependencies, - extension_to_rule_name, - platforms, - toolset, - filter_group, - source_group, - ) - else: - # It's a source. Create a source entry. - _, element = _MapFileToMsBuildSourceType( - source, rule_dependencies, extension_to_rule_name, platforms, toolset - ) - source_entry = [element, {"Include": source}] - # Specify the filter it is part of, if any. - if parent_filter_name: - source_entry.append(["Filter", parent_filter_name]) - source_group.append(source_entry) - - -def _MapFileToMsBuildSourceType( - source, rule_dependencies, extension_to_rule_name, platforms, toolset -): - """Returns the group and element type of the source file. - - Arguments: - source: The source file name. - extension_to_rule_name: A dictionary mapping file extensions to rules. - - Returns: - A pair of (group this file should be part of, the label of element) - """ - _, ext = os.path.splitext(source) - ext = ext.lower() - if ext in extension_to_rule_name: - group = "rule" - element = extension_to_rule_name[ext] - elif ext in [".cc", ".cpp", ".c", ".cxx", ".mm"]: - group = "compile" - element = "ClCompile" - elif ext in [".h", ".hxx"]: - group = "include" - element = "ClInclude" - elif ext == ".rc": - group = "resource" - element = "ResourceCompile" - elif ext in [".s", ".asm"]: - group = "masm" - element = "MASM" - if "arm64" in platforms and toolset == "target": - element = "MARMASM" - elif ext == ".idl": - group = "midl" - element = "Midl" - elif source in rule_dependencies: - group = "rule_dependency" - element = "CustomBuild" - else: - group = "none" - element = "None" - return (group, element) - - -def _GenerateRulesForMSBuild( - output_dir, - options, - spec, - sources, - excluded_sources, - props_files_of_rules, - targets_files_of_rules, - actions_to_add, - rule_dependencies, - extension_to_rule_name, -): - # MSBuild rules are implemented using three files: an XML file, a .targets - # file and a .props file. - # For more details see: - # https://devblogs.microsoft.com/cppblog/quick-help-on-vs2010-custom-build-rule/ - rules = spec.get("rules", []) - rules_native = [r for r in rules if not int(r.get("msvs_external_rule", 0))] - rules_external = [r for r in rules if int(r.get("msvs_external_rule", 0))] - - msbuild_rules = [] - for rule in rules_native: - # Skip a rule with no action and no inputs. - if "action" not in rule and not rule.get("rule_sources", []): - continue - msbuild_rule = MSBuildRule(rule, spec) - msbuild_rules.append(msbuild_rule) - rule_dependencies.update(msbuild_rule.additional_dependencies.split(";")) - extension_to_rule_name[msbuild_rule.extension] = msbuild_rule.rule_name - if msbuild_rules: - base = spec["target_name"] + options.suffix - props_name = base + ".props" - targets_name = base + ".targets" - xml_name = base + ".xml" - - props_files_of_rules.add(props_name) - targets_files_of_rules.add(targets_name) - - props_path = os.path.join(output_dir, props_name) - targets_path = os.path.join(output_dir, targets_name) - xml_path = os.path.join(output_dir, xml_name) - - _GenerateMSBuildRulePropsFile(props_path, msbuild_rules) - _GenerateMSBuildRuleTargetsFile(targets_path, msbuild_rules) - _GenerateMSBuildRuleXmlFile(xml_path, msbuild_rules) - - if rules_external: - _GenerateExternalRules( - rules_external, output_dir, spec, sources, options, actions_to_add - ) - _AdjustSourcesForRules(rules, sources, excluded_sources, True) - - -class MSBuildRule: - """Used to store information used to generate an MSBuild rule. - - Attributes: - rule_name: The rule name, sanitized to use in XML. - target_name: The name of the target. - after_targets: The name of the AfterTargets element. - before_targets: The name of the BeforeTargets element. - depends_on: The name of the DependsOn element. - compute_output: The name of the ComputeOutput element. - dirs_to_make: The name of the DirsToMake element. - inputs: The name of the _inputs element. - tlog: The name of the _tlog element. - extension: The extension this rule applies to. - description: The message displayed when this rule is invoked. - additional_dependencies: A string listing additional dependencies. - outputs: The outputs of this rule. - command: The command used to run the rule. - """ - - def __init__(self, rule, spec): - self.display_name = rule["rule_name"] - # Assure that the rule name is only characters and numbers - self.rule_name = re.sub(r"\W", "_", self.display_name) - # Create the various element names, following the example set by the - # Visual Studio 2008 to 2010 conversion. I don't know if VS2010 - # is sensitive to the exact names. - self.target_name = "_" + self.rule_name - self.after_targets = self.rule_name + "AfterTargets" - self.before_targets = self.rule_name + "BeforeTargets" - self.depends_on = self.rule_name + "DependsOn" - self.compute_output = "Compute%sOutput" % self.rule_name - self.dirs_to_make = self.rule_name + "DirsToMake" - self.inputs = self.rule_name + "_inputs" - self.tlog = self.rule_name + "_tlog" - self.extension = rule["extension"] - if not self.extension.startswith("."): - self.extension = "." + self.extension - - self.description = MSVSSettings.ConvertVCMacrosToMSBuild( - rule.get("message", self.rule_name) - ) - old_additional_dependencies = _FixPaths(rule.get("inputs", [])) - self.additional_dependencies = ";".join( - [ - MSVSSettings.ConvertVCMacrosToMSBuild(i) - for i in old_additional_dependencies - ] - ) - old_outputs = _FixPaths(rule.get("outputs", [])) - self.outputs = ";".join( - [MSVSSettings.ConvertVCMacrosToMSBuild(i) for i in old_outputs] - ) - old_command = _BuildCommandLineForRule( - spec, rule, has_input_path=True, do_setup_env=True - ) - self.command = MSVSSettings.ConvertVCMacrosToMSBuild(old_command) - - -def _GenerateMSBuildRulePropsFile(props_path, msbuild_rules): - """Generate the .props file.""" - content = [ - "Project", - {"xmlns": "http://schemas.microsoft.com/developer/msbuild/2003"}, - ] - for rule in msbuild_rules: - content.extend( - [ - [ - "PropertyGroup", - { - "Condition": "'$(%s)' == '' and '$(%s)' == '' and " - "'$(ConfigurationType)' != 'Makefile'" - % (rule.before_targets, rule.after_targets) - }, - [rule.before_targets, "Midl"], - [rule.after_targets, "CustomBuild"], - ], - [ - "PropertyGroup", - [ - rule.depends_on, - {"Condition": "'$(ConfigurationType)' != 'Makefile'"}, - "_SelectedFiles;$(%s)" % rule.depends_on, - ], - ], - [ - "ItemDefinitionGroup", - [ - rule.rule_name, - ["CommandLineTemplate", rule.command], - ["Outputs", rule.outputs], - ["ExecutionDescription", rule.description], - ["AdditionalDependencies", rule.additional_dependencies], - ], - ], - ] - ) - easy_xml.WriteXmlIfChanged(content, props_path, pretty=True, win32=True) - - -def _GenerateMSBuildRuleTargetsFile(targets_path, msbuild_rules): - """Generate the .targets file.""" - content = [ - "Project", - {"xmlns": "http://schemas.microsoft.com/developer/msbuild/2003"}, - ] - item_group = [ - "ItemGroup", - [ - "PropertyPageSchema", - {"Include": "$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml"}, - ], - ] - for rule in msbuild_rules: - item_group.append( - [ - "AvailableItemName", - {"Include": rule.rule_name}, - ["Targets", rule.target_name], - ] - ) - content.append(item_group) - - for rule in msbuild_rules: - content.append( - [ - "UsingTask", - { - "TaskName": rule.rule_name, - "TaskFactory": "XamlTaskFactory", - "AssemblyName": "Microsoft.Build.Tasks.v4.0", - }, - ["Task", "$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml"], - ] - ) - for rule in msbuild_rules: - rule_name = rule.rule_name - target_outputs = "%%(%s.Outputs)" % rule_name - target_inputs = ( - "%%(%s.Identity);%%(%s.AdditionalDependencies);" "$(MSBuildProjectFile)" - ) % (rule_name, rule_name) - rule_inputs = "%%(%s.Identity)" % rule_name - extension_condition = ( - "'%(Extension)'=='.obj' or " - "'%(Extension)'=='.res' or " - "'%(Extension)'=='.rsc' or " - "'%(Extension)'=='.lib'" - ) - remove_section = [ - "ItemGroup", - {"Condition": "'@(SelectedFiles)' != ''"}, - [ - rule_name, - { - "Remove": "@(%s)" % rule_name, - "Condition": "'%(Identity)' != '@(SelectedFiles)'", - }, - ], - ] - inputs_section = [ - "ItemGroup", - [rule.inputs, {"Include": "%%(%s.AdditionalDependencies)" % rule_name}], - ] - logging_section = [ - "ItemGroup", - [ - rule.tlog, - { - "Include": "%%(%s.Outputs)" % rule_name, - "Condition": ( - "'%%(%s.Outputs)' != '' and " - "'%%(%s.ExcludedFromBuild)' != 'true'" % (rule_name, rule_name) - ), - }, - ["Source", "@(%s, '|')" % rule_name], - ["Inputs", "@(%s -> '%%(Fullpath)', ';')" % rule.inputs], - ], - ] - message_section = [ - "Message", - {"Importance": "High", "Text": "%%(%s.ExecutionDescription)" % rule_name}, - ] - write_tlog_section = [ - "WriteLinesToFile", - { - "Condition": "'@(%s)' != '' and '%%(%s.ExcludedFromBuild)' != " - "'true'" % (rule.tlog, rule.tlog), - "File": "$(IntDir)$(ProjectName).write.1.tlog", - "Lines": "^%%(%s.Source);@(%s->'%%(Fullpath)')" - % (rule.tlog, rule.tlog), - }, - ] - read_tlog_section = [ - "WriteLinesToFile", - { - "Condition": "'@(%s)' != '' and '%%(%s.ExcludedFromBuild)' != " - "'true'" % (rule.tlog, rule.tlog), - "File": "$(IntDir)$(ProjectName).read.1.tlog", - "Lines": f"^%({rule.tlog}.Source);%({rule.tlog}.Inputs)", - }, - ] - command_and_input_section = [ - rule_name, - { - "Condition": "'@(%s)' != '' and '%%(%s.ExcludedFromBuild)' != " - "'true'" % (rule_name, rule_name), - "EchoOff": "true", - "StandardOutputImportance": "High", - "StandardErrorImportance": "High", - "CommandLineTemplate": "%%(%s.CommandLineTemplate)" % rule_name, - "AdditionalOptions": "%%(%s.AdditionalOptions)" % rule_name, - "Inputs": rule_inputs, - }, - ] - content.extend( - [ - [ - "Target", - { - "Name": rule.target_name, - "BeforeTargets": "$(%s)" % rule.before_targets, - "AfterTargets": "$(%s)" % rule.after_targets, - "Condition": "'@(%s)' != ''" % rule_name, - "DependsOnTargets": "$(%s);%s" - % (rule.depends_on, rule.compute_output), - "Outputs": target_outputs, - "Inputs": target_inputs, - }, - remove_section, - inputs_section, - logging_section, - message_section, - write_tlog_section, - read_tlog_section, - command_and_input_section, - ], - [ - "PropertyGroup", - [ - "ComputeLinkInputsTargets", - "$(ComputeLinkInputsTargets);", - "%s;" % rule.compute_output, - ], - [ - "ComputeLibInputsTargets", - "$(ComputeLibInputsTargets);", - "%s;" % rule.compute_output, - ], - ], - [ - "Target", - { - "Name": rule.compute_output, - "Condition": "'@(%s)' != ''" % rule_name, - }, - [ - "ItemGroup", - [ - rule.dirs_to_make, - { - "Condition": "'@(%s)' != '' and " - "'%%(%s.ExcludedFromBuild)' != 'true'" - % (rule_name, rule_name), - "Include": "%%(%s.Outputs)" % rule_name, - }, - ], - [ - "Link", - { - "Include": "%%(%s.Identity)" % rule.dirs_to_make, - "Condition": extension_condition, - }, - ], - [ - "Lib", - { - "Include": "%%(%s.Identity)" % rule.dirs_to_make, - "Condition": extension_condition, - }, - ], - [ - "ImpLib", - { - "Include": "%%(%s.Identity)" % rule.dirs_to_make, - "Condition": extension_condition, - }, - ], - ], - [ - "MakeDir", - { - "Directories": ( - "@(%s->'%%(RootDir)%%(Directory)')" % rule.dirs_to_make - ) - }, - ], - ], - ] - ) - easy_xml.WriteXmlIfChanged(content, targets_path, pretty=True, win32=True) - - -def _GenerateMSBuildRuleXmlFile(xml_path, msbuild_rules): - # Generate the .xml file - content = [ - "ProjectSchemaDefinitions", - { - "xmlns": ( - "clr-namespace:Microsoft.Build.Framework.XamlTypes;" - "assembly=Microsoft.Build.Framework" - ), - "xmlns:x": "http://schemas.microsoft.com/winfx/2006/xaml", - "xmlns:sys": "clr-namespace:System;assembly=mscorlib", - "xmlns:transformCallback": "Microsoft.Cpp.Dev10.ConvertPropertyCallback", - }, - ] - for rule in msbuild_rules: - content.extend( - [ - [ - "Rule", - { - "Name": rule.rule_name, - "PageTemplate": "tool", - "DisplayName": rule.display_name, - "Order": "200", - }, - [ - "Rule.DataSource", - [ - "DataSource", - {"Persistence": "ProjectFile", "ItemType": rule.rule_name}, - ], - ], - [ - "Rule.Categories", - [ - "Category", - {"Name": "General"}, - ["Category.DisplayName", ["sys:String", "General"]], - ], - [ - "Category", - {"Name": "Command Line", "Subtype": "CommandLine"}, - ["Category.DisplayName", ["sys:String", "Command Line"]], - ], - ], - [ - "StringListProperty", - { - "Name": "Inputs", - "Category": "Command Line", - "IsRequired": "true", - "Switch": " ", - }, - [ - "StringListProperty.DataSource", - [ - "DataSource", - { - "Persistence": "ProjectFile", - "ItemType": rule.rule_name, - "SourceType": "Item", - }, - ], - ], - ], - [ - "StringProperty", - { - "Name": "CommandLineTemplate", - "DisplayName": "Command Line", - "Visible": "False", - "IncludeInCommandLine": "False", - }, - ], - [ - "DynamicEnumProperty", - { - "Name": rule.before_targets, - "Category": "General", - "EnumProvider": "Targets", - "IncludeInCommandLine": "False", - }, - [ - "DynamicEnumProperty.DisplayName", - ["sys:String", "Execute Before"], - ], - [ - "DynamicEnumProperty.Description", - [ - "sys:String", - "Specifies the targets for the build customization" - " to run before.", - ], - ], - [ - "DynamicEnumProperty.ProviderSettings", - [ - "NameValuePair", - { - "Name": "Exclude", - "Value": "^%s|^Compute" % rule.before_targets, - }, - ], - ], - [ - "DynamicEnumProperty.DataSource", - [ - "DataSource", - { - "Persistence": "ProjectFile", - "HasConfigurationCondition": "true", - }, - ], - ], - ], - [ - "DynamicEnumProperty", - { - "Name": rule.after_targets, - "Category": "General", - "EnumProvider": "Targets", - "IncludeInCommandLine": "False", - }, - [ - "DynamicEnumProperty.DisplayName", - ["sys:String", "Execute After"], - ], - [ - "DynamicEnumProperty.Description", - [ - "sys:String", - ( - "Specifies the targets for the build customization" - " to run after." - ), - ], - ], - [ - "DynamicEnumProperty.ProviderSettings", - [ - "NameValuePair", - { - "Name": "Exclude", - "Value": "^%s|^Compute" % rule.after_targets, - }, - ], - ], - [ - "DynamicEnumProperty.DataSource", - [ - "DataSource", - { - "Persistence": "ProjectFile", - "ItemType": "", - "HasConfigurationCondition": "true", - }, - ], - ], - ], - [ - "StringListProperty", - { - "Name": "Outputs", - "DisplayName": "Outputs", - "Visible": "False", - "IncludeInCommandLine": "False", - }, - ], - [ - "StringProperty", - { - "Name": "ExecutionDescription", - "DisplayName": "Execution Description", - "Visible": "False", - "IncludeInCommandLine": "False", - }, - ], - [ - "StringListProperty", - { - "Name": "AdditionalDependencies", - "DisplayName": "Additional Dependencies", - "IncludeInCommandLine": "False", - "Visible": "false", - }, - ], - [ - "StringProperty", - { - "Subtype": "AdditionalOptions", - "Name": "AdditionalOptions", - "Category": "Command Line", - }, - [ - "StringProperty.DisplayName", - ["sys:String", "Additional Options"], - ], - [ - "StringProperty.Description", - ["sys:String", "Additional Options"], - ], - ], - ], - [ - "ItemType", - {"Name": rule.rule_name, "DisplayName": rule.display_name}, - ], - [ - "FileExtension", - {"Name": "*" + rule.extension, "ContentType": rule.rule_name}, - ], - [ - "ContentType", - { - "Name": rule.rule_name, - "DisplayName": "", - "ItemType": rule.rule_name, - }, - ], - ] - ) - easy_xml.WriteXmlIfChanged(content, xml_path, pretty=True, win32=True) - - -def _GetConfigurationAndPlatform(name, settings, spec): - configuration = name.rsplit("_", 1)[0] - platform = settings.get("msvs_configuration_platform", "Win32") - if spec["toolset"] == "host" and platform == "arm64": - platform = "x64" # Host-only tools are always built for x64 - return (configuration, platform) - - -def _GetConfigurationCondition(name, settings, spec): - return r"'$(Configuration)|$(Platform)'=='%s|%s'" % _GetConfigurationAndPlatform( - name, settings, spec - ) - - -def _GetMSBuildProjectConfigurations(configurations, spec): - group = ["ItemGroup", {"Label": "ProjectConfigurations"}] - for (name, settings) in sorted(configurations.items()): - configuration, platform = _GetConfigurationAndPlatform(name, settings, spec) - designation = f"{configuration}|{platform}" - group.append( - [ - "ProjectConfiguration", - {"Include": designation}, - ["Configuration", configuration], - ["Platform", platform], - ] - ) - return [group] - - -def _GetMSBuildGlobalProperties(spec, version, guid, gyp_file_name): - namespace = os.path.splitext(gyp_file_name)[0] - properties = [ - [ - "PropertyGroup", - {"Label": "Globals"}, - ["ProjectGuid", guid], - ["Keyword", "Win32Proj"], - ["RootNamespace", namespace], - ["IgnoreWarnCompileDuplicatedFilename", "true"], - ] - ] - - if ( - os.environ.get("PROCESSOR_ARCHITECTURE") == "AMD64" - or os.environ.get("PROCESSOR_ARCHITEW6432") == "AMD64" - ): - properties[0].append(["PreferredToolArchitecture", "x64"]) - - if spec.get("msvs_target_platform_version"): - target_platform_version = spec.get("msvs_target_platform_version") - properties[0].append(["WindowsTargetPlatformVersion", target_platform_version]) - if spec.get("msvs_target_platform_minversion"): - target_platform_minversion = spec.get("msvs_target_platform_minversion") - properties[0].append( - ["WindowsTargetPlatformMinVersion", target_platform_minversion] - ) - else: - properties[0].append( - ["WindowsTargetPlatformMinVersion", target_platform_version] - ) - - if spec.get("msvs_enable_winrt"): - properties[0].append(["DefaultLanguage", "en-US"]) - properties[0].append(["AppContainerApplication", "true"]) - if spec.get("msvs_application_type_revision"): - app_type_revision = spec.get("msvs_application_type_revision") - properties[0].append(["ApplicationTypeRevision", app_type_revision]) - else: - properties[0].append(["ApplicationTypeRevision", "8.1"]) - if spec.get("msvs_enable_winphone"): - properties[0].append(["ApplicationType", "Windows Phone"]) - else: - properties[0].append(["ApplicationType", "Windows Store"]) - - platform_name = None - msvs_windows_sdk_version = None - for configuration in spec["configurations"].values(): - platform_name = platform_name or _ConfigPlatform(configuration) - msvs_windows_sdk_version = ( - msvs_windows_sdk_version - or _ConfigWindowsTargetPlatformVersion(configuration, version) - ) - if platform_name and msvs_windows_sdk_version: - break - if msvs_windows_sdk_version: - properties[0].append( - ["WindowsTargetPlatformVersion", str(msvs_windows_sdk_version)] - ) - elif version.compatible_sdks: - raise GypError( - "%s requires any SDK of %s version, but none were found" - % (version.description, version.compatible_sdks) - ) - - if platform_name == "ARM": - properties[0].append(["WindowsSDKDesktopARMSupport", "true"]) - - return properties - - -def _GetMSBuildConfigurationDetails(spec, build_file): - properties = {} - for name, settings in spec["configurations"].items(): - msbuild_attributes = _GetMSBuildAttributes(spec, settings, build_file) - condition = _GetConfigurationCondition(name, settings, spec) - character_set = msbuild_attributes.get("CharacterSet") - config_type = msbuild_attributes.get("ConfigurationType") - _AddConditionalProperty(properties, condition, "ConfigurationType", config_type) - if config_type == "Driver": - _AddConditionalProperty(properties, condition, "DriverType", "WDM") - _AddConditionalProperty( - properties, condition, "TargetVersion", _ConfigTargetVersion(settings) - ) - if character_set: - if "msvs_enable_winrt" not in spec: - _AddConditionalProperty( - properties, condition, "CharacterSet", character_set - ) - return _GetMSBuildPropertyGroup(spec, "Configuration", properties) - - -def _GetMSBuildLocalProperties(msbuild_toolset): - # Currently the only local property we support is PlatformToolset - properties = {} - if msbuild_toolset: - properties = [ - [ - "PropertyGroup", - {"Label": "Locals"}, - ["PlatformToolset", msbuild_toolset], - ] - ] - return properties - - -def _GetMSBuildPropertySheets(configurations, spec): - user_props = r"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" - additional_props = {} - props_specified = False - for name, settings in sorted(configurations.items()): - configuration = _GetConfigurationCondition(name, settings, spec) - if "msbuild_props" in settings: - additional_props[configuration] = _FixPaths(settings["msbuild_props"]) - props_specified = True - else: - additional_props[configuration] = "" - - if not props_specified: - return [ - [ - "ImportGroup", - {"Label": "PropertySheets"}, - [ - "Import", - { - "Project": user_props, - "Condition": "exists('%s')" % user_props, - "Label": "LocalAppDataPlatform", - }, - ], - ] - ] - else: - sheets = [] - for condition, props in additional_props.items(): - import_group = [ - "ImportGroup", - {"Label": "PropertySheets", "Condition": condition}, - [ - "Import", - { - "Project": user_props, - "Condition": "exists('%s')" % user_props, - "Label": "LocalAppDataPlatform", - }, - ], - ] - for props_file in props: - import_group.append(["Import", {"Project": props_file}]) - sheets.append(import_group) - return sheets - - -def _ConvertMSVSBuildAttributes(spec, config, build_file): - config_type = _GetMSVSConfigurationType(spec, build_file) - msvs_attributes = _GetMSVSAttributes(spec, config, config_type) - msbuild_attributes = {} - for a in msvs_attributes: - if a in ["IntermediateDirectory", "OutputDirectory"]: - directory = MSVSSettings.ConvertVCMacrosToMSBuild(msvs_attributes[a]) - if not directory.endswith("\\"): - directory += "\\" - msbuild_attributes[a] = directory - elif a == "CharacterSet": - msbuild_attributes[a] = _ConvertMSVSCharacterSet(msvs_attributes[a]) - elif a == "ConfigurationType": - msbuild_attributes[a] = _ConvertMSVSConfigurationType(msvs_attributes[a]) - else: - print("Warning: Do not know how to convert MSVS attribute " + a) - return msbuild_attributes - - -def _ConvertMSVSCharacterSet(char_set): - if char_set.isdigit(): - char_set = {"0": "MultiByte", "1": "Unicode", "2": "MultiByte"}[char_set] - return char_set - - -def _ConvertMSVSConfigurationType(config_type): - if config_type.isdigit(): - config_type = { - "1": "Application", - "2": "DynamicLibrary", - "4": "StaticLibrary", - "5": "Driver", - "10": "Utility", - }[config_type] - return config_type - - -def _GetMSBuildAttributes(spec, config, build_file): - if "msbuild_configuration_attributes" not in config: - msbuild_attributes = _ConvertMSVSBuildAttributes(spec, config, build_file) - - else: - config_type = _GetMSVSConfigurationType(spec, build_file) - config_type = _ConvertMSVSConfigurationType(config_type) - msbuild_attributes = config.get("msbuild_configuration_attributes", {}) - msbuild_attributes.setdefault("ConfigurationType", config_type) - output_dir = msbuild_attributes.get( - "OutputDirectory", "$(SolutionDir)$(Configuration)" - ) - msbuild_attributes["OutputDirectory"] = _FixPath(output_dir) + "\\" - if "IntermediateDirectory" not in msbuild_attributes: - intermediate = _FixPath("$(Configuration)") + "\\" - msbuild_attributes["IntermediateDirectory"] = intermediate - if "CharacterSet" in msbuild_attributes: - msbuild_attributes["CharacterSet"] = _ConvertMSVSCharacterSet( - msbuild_attributes["CharacterSet"] - ) - if "TargetName" not in msbuild_attributes: - prefix = spec.get("product_prefix", "") - product_name = spec.get("product_name", "$(ProjectName)") - target_name = prefix + product_name - msbuild_attributes["TargetName"] = target_name - if "TargetExt" not in msbuild_attributes and "product_extension" in spec: - ext = spec.get("product_extension") - msbuild_attributes["TargetExt"] = "." + ext - - if spec.get("msvs_external_builder"): - external_out_dir = spec.get("msvs_external_builder_out_dir", ".") - msbuild_attributes["OutputDirectory"] = _FixPath(external_out_dir) + "\\" - - # Make sure that 'TargetPath' matches 'Lib.OutputFile' or 'Link.OutputFile' - # (depending on the tool used) to avoid MSB8012 warning. - msbuild_tool_map = { - "executable": "Link", - "shared_library": "Link", - "loadable_module": "Link", - "windows_driver": "Link", - "static_library": "Lib", - } - msbuild_tool = msbuild_tool_map.get(spec["type"]) - if msbuild_tool: - msbuild_settings = config["finalized_msbuild_settings"] - out_file = msbuild_settings[msbuild_tool].get("OutputFile") - if out_file: - msbuild_attributes["TargetPath"] = _FixPath(out_file) - target_ext = msbuild_settings[msbuild_tool].get("TargetExt") - if target_ext: - msbuild_attributes["TargetExt"] = target_ext - - return msbuild_attributes - - -def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file): - # TODO(jeanluc) We could optimize out the following and do it only if - # there are actions. - # TODO(jeanluc) Handle the equivalent of setting 'CYGWIN=nontsec'. - new_paths = [] - cygwin_dirs = spec.get("msvs_cygwin_dirs", ["."])[0] - if cygwin_dirs: - cyg_path = "$(MSBuildProjectDirectory)\\%s\\bin\\" % _FixPath(cygwin_dirs) - new_paths.append(cyg_path) - # TODO(jeanluc) Change the convention to have both a cygwin_dir and a - # python_dir. - python_path = cyg_path.replace("cygwin\\bin", "python_26") - new_paths.append(python_path) - if new_paths: - new_paths = "$(ExecutablePath);" + ";".join(new_paths) - - properties = {} - for (name, configuration) in sorted(configurations.items()): - condition = _GetConfigurationCondition(name, configuration, spec) - attributes = _GetMSBuildAttributes(spec, configuration, build_file) - msbuild_settings = configuration["finalized_msbuild_settings"] - _AddConditionalProperty( - properties, condition, "IntDir", attributes["IntermediateDirectory"] - ) - _AddConditionalProperty( - properties, condition, "OutDir", attributes["OutputDirectory"] - ) - _AddConditionalProperty( - properties, condition, "TargetName", attributes["TargetName"] - ) - if "TargetExt" in attributes: - _AddConditionalProperty( - properties, condition, "TargetExt", attributes["TargetExt"] - ) - - if attributes.get("TargetPath"): - _AddConditionalProperty( - properties, condition, "TargetPath", attributes["TargetPath"] - ) - if attributes.get("TargetExt"): - _AddConditionalProperty( - properties, condition, "TargetExt", attributes["TargetExt"] - ) - - if new_paths: - _AddConditionalProperty(properties, condition, "ExecutablePath", new_paths) - tool_settings = msbuild_settings.get("", {}) - for name, value in sorted(tool_settings.items()): - formatted_value = _GetValueFormattedForMSBuild("", name, value) - _AddConditionalProperty(properties, condition, name, formatted_value) - return _GetMSBuildPropertyGroup(spec, None, properties) - - -def _AddConditionalProperty(properties, condition, name, value): - """Adds a property / conditional value pair to a dictionary. - - Arguments: - properties: The dictionary to be modified. The key is the name of the - property. The value is itself a dictionary; its key is the value and - the value a list of condition for which this value is true. - condition: The condition under which the named property has the value. - name: The name of the property. - value: The value of the property. - """ - if name not in properties: - properties[name] = {} - values = properties[name] - if value not in values: - values[value] = [] - conditions = values[value] - conditions.append(condition) - - -# Regex for msvs variable references ( i.e. $(FOO) ). -MSVS_VARIABLE_REFERENCE = re.compile(r"\$\(([a-zA-Z_][a-zA-Z0-9_]*)\)") - - -def _GetMSBuildPropertyGroup(spec, label, properties): - """Returns a PropertyGroup definition for the specified properties. - - Arguments: - spec: The target project dict. - label: An optional label for the PropertyGroup. - properties: The dictionary to be converted. The key is the name of the - property. The value is itself a dictionary; its key is the value and - the value a list of condition for which this value is true. - """ - group = ["PropertyGroup"] - if label: - group.append({"Label": label}) - num_configurations = len(spec["configurations"]) - - def GetEdges(node): - # Use a definition of edges such that user_of_variable -> used_varible. - # This happens to be easier in this case, since a variable's - # definition contains all variables it references in a single string. - edges = set() - for value in sorted(properties[node].keys()): - # Add to edges all $(...) references to variables. - # - # Variable references that refer to names not in properties are excluded - # These can exist for instance to refer built in definitions like - # $(SolutionDir). - # - # Self references are ignored. Self reference is used in a few places to - # append to the default value. I.e. PATH=$(PATH);other_path - edges.update( - { - v - for v in MSVS_VARIABLE_REFERENCE.findall(value) - if v in properties and v != node - } - ) - return edges - - properties_ordered = gyp.common.TopologicallySorted(properties.keys(), GetEdges) - # Walk properties in the reverse of a topological sort on - # user_of_variable -> used_variable as this ensures variables are - # defined before they are used. - # NOTE: reverse(topsort(DAG)) = topsort(reverse_edges(DAG)) - for name in reversed(properties_ordered): - values = properties[name] - for value, conditions in sorted(values.items()): - if len(conditions) == num_configurations: - # If the value is the same all configurations, - # just add one unconditional entry. - group.append([name, value]) - else: - for condition in conditions: - group.append([name, {"Condition": condition}, value]) - return [group] - - -def _GetMSBuildToolSettingsSections(spec, configurations): - groups = [] - for (name, configuration) in sorted(configurations.items()): - msbuild_settings = configuration["finalized_msbuild_settings"] - group = [ - "ItemDefinitionGroup", - {"Condition": _GetConfigurationCondition(name, configuration, spec)}, - ] - for tool_name, tool_settings in sorted(msbuild_settings.items()): - # Skip the tool named '' which is a holder of global settings handled - # by _GetMSBuildConfigurationGlobalProperties. - if tool_name: - if tool_settings: - tool = [tool_name] - for name, value in sorted(tool_settings.items()): - formatted_value = _GetValueFormattedForMSBuild( - tool_name, name, value - ) - tool.append([name, formatted_value]) - group.append(tool) - groups.append(group) - return groups - - -def _FinalizeMSBuildSettings(spec, configuration): - if "msbuild_settings" in configuration: - converted = False - msbuild_settings = configuration["msbuild_settings"] - MSVSSettings.ValidateMSBuildSettings(msbuild_settings) - else: - converted = True - msvs_settings = configuration.get("msvs_settings", {}) - msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(msvs_settings) - include_dirs, midl_include_dirs, resource_include_dirs = _GetIncludeDirs( - configuration - ) - libraries = _GetLibraries(spec) - library_dirs = _GetLibraryDirs(configuration) - out_file, _, msbuild_tool = _GetOutputFilePathAndTool(spec, msbuild=True) - target_ext = _GetOutputTargetExt(spec) - defines = _GetDefines(configuration) - if converted: - # Visual Studio 2010 has TR1 - defines = [d for d in defines if d != "_HAS_TR1=0"] - # Warn of ignored settings - ignored_settings = ["msvs_tool_files"] - for ignored_setting in ignored_settings: - value = configuration.get(ignored_setting) - if value: - print( - "Warning: The automatic conversion to MSBuild does not handle " - "%s. Ignoring setting of %s" % (ignored_setting, str(value)) - ) - - defines = [_EscapeCppDefineForMSBuild(d) for d in defines] - disabled_warnings = _GetDisabledWarnings(configuration) - prebuild = configuration.get("msvs_prebuild") - postbuild = configuration.get("msvs_postbuild") - def_file = _GetModuleDefinition(spec) - precompiled_header = configuration.get("msvs_precompiled_header") - - # Add the information to the appropriate tool - # TODO(jeanluc) We could optimize and generate these settings only if - # the corresponding files are found, e.g. don't generate ResourceCompile - # if you don't have any resources. - _ToolAppend( - msbuild_settings, "ClCompile", "AdditionalIncludeDirectories", include_dirs - ) - _ToolAppend( - msbuild_settings, "Midl", "AdditionalIncludeDirectories", midl_include_dirs - ) - _ToolAppend( - msbuild_settings, - "ResourceCompile", - "AdditionalIncludeDirectories", - resource_include_dirs, - ) - # Add in libraries, note that even for empty libraries, we want this - # set, to prevent inheriting default libraries from the environment. - _ToolSetOrAppend(msbuild_settings, "Link", "AdditionalDependencies", libraries) - _ToolAppend(msbuild_settings, "Link", "AdditionalLibraryDirectories", library_dirs) - if out_file: - _ToolAppend( - msbuild_settings, msbuild_tool, "OutputFile", out_file, only_if_unset=True - ) - if target_ext: - _ToolAppend( - msbuild_settings, msbuild_tool, "TargetExt", target_ext, only_if_unset=True - ) - # Add defines. - _ToolAppend(msbuild_settings, "ClCompile", "PreprocessorDefinitions", defines) - _ToolAppend(msbuild_settings, "ResourceCompile", "PreprocessorDefinitions", defines) - # Add disabled warnings. - _ToolAppend( - msbuild_settings, "ClCompile", "DisableSpecificWarnings", disabled_warnings - ) - # Turn on precompiled headers if appropriate. - if precompiled_header: - precompiled_header = os.path.split(precompiled_header)[1] - _ToolAppend(msbuild_settings, "ClCompile", "PrecompiledHeader", "Use") - _ToolAppend( - msbuild_settings, "ClCompile", "PrecompiledHeaderFile", precompiled_header - ) - _ToolAppend( - msbuild_settings, "ClCompile", "ForcedIncludeFiles", [precompiled_header] - ) - else: - _ToolAppend(msbuild_settings, "ClCompile", "PrecompiledHeader", "NotUsing") - # Turn off WinRT compilation - _ToolAppend(msbuild_settings, "ClCompile", "CompileAsWinRT", "false") - # Turn on import libraries if appropriate - if spec.get("msvs_requires_importlibrary"): - _ToolAppend(msbuild_settings, "", "IgnoreImportLibrary", "false") - # Loadable modules don't generate import libraries; - # tell dependent projects to not expect one. - if spec["type"] == "loadable_module": - _ToolAppend(msbuild_settings, "", "IgnoreImportLibrary", "true") - # Set the module definition file if any. - if def_file: - _ToolAppend(msbuild_settings, "Link", "ModuleDefinitionFile", def_file) - configuration["finalized_msbuild_settings"] = msbuild_settings - if prebuild: - _ToolAppend(msbuild_settings, "PreBuildEvent", "Command", prebuild) - if postbuild: - _ToolAppend(msbuild_settings, "PostBuildEvent", "Command", postbuild) - - -def _GetValueFormattedForMSBuild(tool_name, name, value): - if type(value) == list: - # For some settings, VS2010 does not automatically extends the settings - # TODO(jeanluc) Is this what we want? - if name in [ - "AdditionalIncludeDirectories", - "AdditionalLibraryDirectories", - "AdditionalOptions", - "DelayLoadDLLs", - "DisableSpecificWarnings", - "PreprocessorDefinitions", - ]: - value.append("%%(%s)" % name) - # For most tools, entries in a list should be separated with ';' but some - # settings use a space. Check for those first. - exceptions = { - "ClCompile": ["AdditionalOptions"], - "Link": ["AdditionalOptions"], - "Lib": ["AdditionalOptions"], - } - if tool_name in exceptions and name in exceptions[tool_name]: - char = " " - else: - char = ";" - formatted_value = char.join( - [MSVSSettings.ConvertVCMacrosToMSBuild(i) for i in value] - ) - else: - formatted_value = MSVSSettings.ConvertVCMacrosToMSBuild(value) - return formatted_value - - -def _VerifySourcesExist(sources, root_dir): - """Verifies that all source files exist on disk. - - Checks that all regular source files, i.e. not created at run time, - exist on disk. Missing files cause needless recompilation but no otherwise - visible errors. - - Arguments: - sources: A recursive list of Filter/file names. - root_dir: The root directory for the relative path names. - Returns: - A list of source files that cannot be found on disk. - """ - missing_sources = [] - for source in sources: - if isinstance(source, MSVSProject.Filter): - missing_sources.extend(_VerifySourcesExist(source.contents, root_dir)) - else: - if "$" not in source: - full_path = os.path.join(root_dir, source) - if not os.path.exists(full_path): - missing_sources.append(full_path) - return missing_sources - - -def _GetMSBuildSources( - spec, - sources, - exclusions, - rule_dependencies, - extension_to_rule_name, - actions_spec, - sources_handled_by_action, - list_excluded, -): - groups = [ - "none", - "masm", - "midl", - "include", - "compile", - "resource", - "rule", - "rule_dependency", - ] - grouped_sources = {} - for g in groups: - grouped_sources[g] = [] - - _AddSources2( - spec, - sources, - exclusions, - grouped_sources, - rule_dependencies, - extension_to_rule_name, - sources_handled_by_action, - list_excluded, - ) - sources = [] - for g in groups: - if grouped_sources[g]: - sources.append(["ItemGroup"] + grouped_sources[g]) - if actions_spec: - sources.append(["ItemGroup"] + actions_spec) - return sources - - -def _AddSources2( - spec, - sources, - exclusions, - grouped_sources, - rule_dependencies, - extension_to_rule_name, - sources_handled_by_action, - list_excluded, -): - extensions_excluded_from_precompile = [] - for source in sources: - if isinstance(source, MSVSProject.Filter): - _AddSources2( - spec, - source.contents, - exclusions, - grouped_sources, - rule_dependencies, - extension_to_rule_name, - sources_handled_by_action, - list_excluded, - ) - else: - if source not in sources_handled_by_action: - detail = [] - excluded_configurations = exclusions.get(source, []) - if len(excluded_configurations) == len(spec["configurations"]): - detail.append(["ExcludedFromBuild", "true"]) - else: - for config_name, configuration in sorted(excluded_configurations): - condition = _GetConfigurationCondition( - config_name, configuration - ) - detail.append( - ["ExcludedFromBuild", {"Condition": condition}, "true"] - ) - # Add precompile if needed - for config_name, configuration in spec["configurations"].items(): - precompiled_source = configuration.get( - "msvs_precompiled_source", "" - ) - if precompiled_source != "": - precompiled_source = _FixPath(precompiled_source) - if not extensions_excluded_from_precompile: - # If the precompiled header is generated by a C source, - # we must not try to use it for C++ sources, - # and vice versa. - basename, extension = os.path.splitext(precompiled_source) - if extension == ".c": - extensions_excluded_from_precompile = [ - ".cc", - ".cpp", - ".cxx", - ] - else: - extensions_excluded_from_precompile = [".c"] - - if precompiled_source == source: - condition = _GetConfigurationCondition( - config_name, configuration, spec - ) - detail.append( - ["PrecompiledHeader", {"Condition": condition}, "Create"] - ) - else: - # Turn off precompiled header usage for source files of a - # different type than the file that generated the - # precompiled header. - for extension in extensions_excluded_from_precompile: - if source.endswith(extension): - detail.append(["PrecompiledHeader", ""]) - detail.append(["ForcedIncludeFiles", ""]) - - group, element = _MapFileToMsBuildSourceType( - source, - rule_dependencies, - extension_to_rule_name, - _GetUniquePlatforms(spec), - spec["toolset"], - ) - if group == "compile" and not os.path.isabs(source): - # Add an value to support duplicate source - # file basenames, except for absolute paths to avoid paths - # with more than 260 characters. - file_name = os.path.splitext(source)[0] + ".obj" - if file_name.startswith("..\\"): - file_name = re.sub(r"^(\.\.\\)+", "", file_name) - elif file_name.startswith("$("): - file_name = re.sub(r"^\$\([^)]+\)\\", "", file_name) - detail.append(["ObjectFileName", "$(IntDir)\\" + file_name]) - grouped_sources[group].append([element, {"Include": source}] + detail) - - -def _GetMSBuildProjectReferences(project): - references = [] - if project.dependencies: - group = ["ItemGroup"] - added_dependency_set = set() - for dependency in project.dependencies: - dependency_spec = dependency.spec - should_skip_dep = False - if project.spec["toolset"] == "target": - if dependency_spec["toolset"] == "host": - if dependency_spec["type"] == "static_library": - should_skip_dep = True - if dependency.name.startswith("run_"): - should_skip_dep = False - if should_skip_dep: - continue - - canonical_name = dependency.name.replace("_host", "") - added_dependency_set.add(canonical_name) - guid = dependency.guid - project_dir = os.path.split(project.path)[0] - relative_path = gyp.common.RelativePath(dependency.path, project_dir) - project_ref = [ - "ProjectReference", - {"Include": relative_path}, - ["Project", guid], - ["ReferenceOutputAssembly", "false"], - ] - for config in dependency.spec.get("configurations", {}).values(): - if config.get("msvs_use_library_dependency_inputs", 0): - project_ref.append(["UseLibraryDependencyInputs", "true"]) - break - # If it's disabled in any config, turn it off in the reference. - if config.get("msvs_2010_disable_uldi_when_referenced", 0): - project_ref.append(["UseLibraryDependencyInputs", "false"]) - break - group.append(project_ref) - references.append(group) - return references - - -def _GenerateMSBuildProject(project, options, version, generator_flags, spec): - spec = project.spec - configurations = spec["configurations"] - toolset = spec["toolset"] - project_dir, project_file_name = os.path.split(project.path) - gyp.common.EnsureDirExists(project.path) - # Prepare list of sources and excluded sources. - - gyp_file = os.path.split(project.build_file)[1] - sources, excluded_sources = _PrepareListOfSources(spec, generator_flags, gyp_file) - # Add rules. - actions_to_add = {} - props_files_of_rules = set() - targets_files_of_rules = set() - rule_dependencies = set() - extension_to_rule_name = {} - list_excluded = generator_flags.get("msvs_list_excluded_files", True) - platforms = _GetUniquePlatforms(spec) - - # Don't generate rules if we are using an external builder like ninja. - if not spec.get("msvs_external_builder"): - _GenerateRulesForMSBuild( - project_dir, - options, - spec, - sources, - excluded_sources, - props_files_of_rules, - targets_files_of_rules, - actions_to_add, - rule_dependencies, - extension_to_rule_name, - ) - else: - rules = spec.get("rules", []) - _AdjustSourcesForRules(rules, sources, excluded_sources, True) - - sources, excluded_sources, excluded_idl = _AdjustSourcesAndConvertToFilterHierarchy( - spec, options, project_dir, sources, excluded_sources, list_excluded, version - ) - - # Don't add actions if we are using an external builder like ninja. - if not spec.get("msvs_external_builder"): - _AddActions(actions_to_add, spec, project.build_file) - _AddCopies(actions_to_add, spec) - - # NOTE: this stanza must appear after all actions have been decided. - # Don't excluded sources with actions attached, or they won't run. - excluded_sources = _FilterActionsFromExcluded(excluded_sources, actions_to_add) - - exclusions = _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl) - actions_spec, sources_handled_by_action = _GenerateActionsForMSBuild( - spec, actions_to_add - ) - - _GenerateMSBuildFiltersFile( - project.path + ".filters", - sources, - rule_dependencies, - extension_to_rule_name, - platforms, - toolset, - ) - missing_sources = _VerifySourcesExist(sources, project_dir) - - for configuration in configurations.values(): - _FinalizeMSBuildSettings(spec, configuration) - - # Add attributes to root element - - import_default_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\Microsoft.Cpp.Default.props"}] - ] - import_cpp_props_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\Microsoft.Cpp.props"}] - ] - import_cpp_targets_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\Microsoft.Cpp.targets"}] - ] - import_masm_props_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\BuildCustomizations\masm.props"}] - ] - import_masm_targets_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\BuildCustomizations\masm.targets"}] - ] - import_marmasm_props_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\BuildCustomizations\marmasm.props"}] - ] - import_marmasm_targets_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\BuildCustomizations\marmasm.targets"}] - ] - macro_section = [["PropertyGroup", {"Label": "UserMacros"}]] - - content = [ - "Project", - { - "xmlns": "http://schemas.microsoft.com/developer/msbuild/2003", - "ToolsVersion": version.ProjectVersion(), - "DefaultTargets": "Build", - }, - ] - - content += _GetMSBuildProjectConfigurations(configurations, spec) - content += _GetMSBuildGlobalProperties( - spec, version, project.guid, project_file_name - ) - content += import_default_section - content += _GetMSBuildConfigurationDetails(spec, project.build_file) - if spec.get("msvs_enable_winphone"): - content += _GetMSBuildLocalProperties("v120_wp81") - else: - content += _GetMSBuildLocalProperties(project.msbuild_toolset) - content += import_cpp_props_section - content += import_masm_props_section - if "arm64" in platforms and toolset == "target": - content += import_marmasm_props_section - content += _GetMSBuildExtensions(props_files_of_rules) - content += _GetMSBuildPropertySheets(configurations, spec) - content += macro_section - content += _GetMSBuildConfigurationGlobalProperties( - spec, configurations, project.build_file - ) - content += _GetMSBuildToolSettingsSections(spec, configurations) - content += _GetMSBuildSources( - spec, - sources, - exclusions, - rule_dependencies, - extension_to_rule_name, - actions_spec, - sources_handled_by_action, - list_excluded, - ) - content += _GetMSBuildProjectReferences(project) - content += import_cpp_targets_section - content += import_masm_targets_section - if "arm64" in platforms and toolset == "target": - content += import_marmasm_targets_section - content += _GetMSBuildExtensionTargets(targets_files_of_rules) - - if spec.get("msvs_external_builder"): - content += _GetMSBuildExternalBuilderTargets(spec) - - # TODO(jeanluc) File a bug to get rid of runas. We had in MSVS: - # has_run_as = _WriteMSVSUserFile(project.path, version, spec) - - easy_xml.WriteXmlIfChanged(content, project.path, pretty=True, win32=True) - - return missing_sources - - -def _GetMSBuildExternalBuilderTargets(spec): - """Return a list of MSBuild targets for external builders. - - The "Build" and "Clean" targets are always generated. If the spec contains - 'msvs_external_builder_clcompile_cmd', then the "ClCompile" target will also - be generated, to support building selected C/C++ files. - - Arguments: - spec: The gyp target spec. - Returns: - List of MSBuild 'Target' specs. - """ - build_cmd = _BuildCommandLineForRuleRaw( - spec, spec["msvs_external_builder_build_cmd"], False, False, False, False - ) - build_target = ["Target", {"Name": "Build"}] - build_target.append(["Exec", {"Command": build_cmd}]) - - clean_cmd = _BuildCommandLineForRuleRaw( - spec, spec["msvs_external_builder_clean_cmd"], False, False, False, False - ) - clean_target = ["Target", {"Name": "Clean"}] - clean_target.append(["Exec", {"Command": clean_cmd}]) - - targets = [build_target, clean_target] - - if spec.get("msvs_external_builder_clcompile_cmd"): - clcompile_cmd = _BuildCommandLineForRuleRaw( - spec, - spec["msvs_external_builder_clcompile_cmd"], - False, - False, - False, - False, - ) - clcompile_target = ["Target", {"Name": "ClCompile"}] - clcompile_target.append(["Exec", {"Command": clcompile_cmd}]) - targets.append(clcompile_target) - - return targets - - -def _GetMSBuildExtensions(props_files_of_rules): - extensions = ["ImportGroup", {"Label": "ExtensionSettings"}] - for props_file in props_files_of_rules: - extensions.append(["Import", {"Project": props_file}]) - return [extensions] - - -def _GetMSBuildExtensionTargets(targets_files_of_rules): - targets_node = ["ImportGroup", {"Label": "ExtensionTargets"}] - for targets_file in sorted(targets_files_of_rules): - targets_node.append(["Import", {"Project": targets_file}]) - return [targets_node] - - -def _GenerateActionsForMSBuild(spec, actions_to_add): - """Add actions accumulated into an actions_to_add, merging as needed. - - Arguments: - spec: the target project dict - actions_to_add: dictionary keyed on input name, which maps to a list of - dicts describing the actions attached to that input file. - - Returns: - A pair of (action specification, the sources handled by this action). - """ - sources_handled_by_action = OrderedSet() - actions_spec = [] - for primary_input, actions in actions_to_add.items(): - if generator_supports_multiple_toolsets: - primary_input = primary_input.replace(".exe", "_host.exe") - inputs = OrderedSet() - outputs = OrderedSet() - descriptions = [] - commands = [] - for action in actions: - - def fixup_host_exe(i): - if "$(OutDir)" in i: - i = i.replace(".exe", "_host.exe") - return i - - if generator_supports_multiple_toolsets: - action["inputs"] = [fixup_host_exe(i) for i in action["inputs"]] - inputs.update(OrderedSet(action["inputs"])) - outputs.update(OrderedSet(action["outputs"])) - descriptions.append(action["description"]) - cmd = action["command"] - if generator_supports_multiple_toolsets: - cmd = cmd.replace(".exe", "_host.exe") - # For most actions, add 'call' so that actions that invoke batch files - # return and continue executing. msbuild_use_call provides a way to - # disable this but I have not seen any adverse effect from doing that - # for everything. - if action.get("msbuild_use_call", True): - cmd = "call " + cmd - commands.append(cmd) - # Add the custom build action for one input file. - description = ", and also ".join(descriptions) - - # We can't join the commands simply with && because the command line will - # get too long. See also _AddActions: cygwin's setup_env mustn't be called - # for every invocation or the command that sets the PATH will grow too - # long. - command = "\r\n".join( - [c + "\r\nif %errorlevel% neq 0 exit /b %errorlevel%" for c in commands] - ) - _AddMSBuildAction( - spec, - primary_input, - inputs, - outputs, - command, - description, - sources_handled_by_action, - actions_spec, - ) - return actions_spec, sources_handled_by_action - - -def _AddMSBuildAction( - spec, - primary_input, - inputs, - outputs, - cmd, - description, - sources_handled_by_action, - actions_spec, -): - command = MSVSSettings.ConvertVCMacrosToMSBuild(cmd) - primary_input = _FixPath(primary_input) - inputs_array = _FixPaths(inputs) - outputs_array = _FixPaths(outputs) - additional_inputs = ";".join([i for i in inputs_array if i != primary_input]) - outputs = ";".join(outputs_array) - sources_handled_by_action.add(primary_input) - action_spec = ["CustomBuild", {"Include": primary_input}] - action_spec.extend( - # TODO(jeanluc) 'Document' for all or just if as_sources? - [ - ["FileType", "Document"], - ["Command", command], - ["Message", description], - ["Outputs", outputs], - ] - ) - if additional_inputs: - action_spec.append(["AdditionalInputs", additional_inputs]) - actions_spec.append(action_spec) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py deleted file mode 100755 index e80b57f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" Unit tests for the msvs.py file. """ - -import gyp.generator.msvs as msvs -import unittest - -from io import StringIO - - -class TestSequenceFunctions(unittest.TestCase): - def setUp(self): - self.stderr = StringIO() - - def test_GetLibraries(self): - self.assertEqual(msvs._GetLibraries({}), []) - self.assertEqual(msvs._GetLibraries({"libraries": []}), []) - self.assertEqual( - msvs._GetLibraries({"other": "foo", "libraries": ["a.lib"]}), ["a.lib"] - ) - self.assertEqual(msvs._GetLibraries({"libraries": ["-la"]}), ["a.lib"]) - self.assertEqual( - msvs._GetLibraries( - { - "libraries": [ - "a.lib", - "b.lib", - "c.lib", - "-lb.lib", - "-lb.lib", - "d.lib", - "a.lib", - ] - } - ), - ["c.lib", "b.lib", "d.lib", "a.lib"], - ) - - -if __name__ == "__main__": - unittest.main() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py deleted file mode 100644 index d173bf2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +++ /dev/null @@ -1,2936 +0,0 @@ -# Copyright (c) 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -import collections -import copy -import hashlib -import json -import multiprocessing -import os.path -import re -import signal -import subprocess -import sys -import gyp -import gyp.common -import gyp.msvs_emulation -import gyp.MSVSUtil as MSVSUtil -import gyp.xcode_emulation - -from io import StringIO - -from gyp.common import GetEnvironFallback -import gyp.ninja_syntax as ninja_syntax - -generator_default_variables = { - "EXECUTABLE_PREFIX": "", - "EXECUTABLE_SUFFIX": "", - "STATIC_LIB_PREFIX": "lib", - "STATIC_LIB_SUFFIX": ".a", - "SHARED_LIB_PREFIX": "lib", - # Gyp expects the following variables to be expandable by the build - # system to the appropriate locations. Ninja prefers paths to be - # known at gyp time. To resolve this, introduce special - # variables starting with $! and $| (which begin with a $ so gyp knows it - # should be treated specially, but is otherwise an invalid - # ninja/shell variable) that are passed to gyp here but expanded - # before writing out into the target .ninja files; see - # ExpandSpecial. - # $! is used for variables that represent a path and that can only appear at - # the start of a string, while $| is used for variables that can appear - # anywhere in a string. - "INTERMEDIATE_DIR": "$!INTERMEDIATE_DIR", - "SHARED_INTERMEDIATE_DIR": "$!PRODUCT_DIR/gen", - "PRODUCT_DIR": "$!PRODUCT_DIR", - "CONFIGURATION_NAME": "$|CONFIGURATION_NAME", - # Special variables that may be used by gyp 'rule' targets. - # We generate definitions for these variables on the fly when processing a - # rule. - "RULE_INPUT_ROOT": "${root}", - "RULE_INPUT_DIRNAME": "${dirname}", - "RULE_INPUT_PATH": "${source}", - "RULE_INPUT_EXT": "${ext}", - "RULE_INPUT_NAME": "${name}", -} - -# Placates pylint. -generator_additional_non_configuration_keys = [] -generator_additional_path_sections = [] -generator_extra_sources_for_rules = [] -generator_filelist_paths = None - -generator_supports_multiple_toolsets = gyp.common.CrossCompileRequested() - - -def StripPrefix(arg, prefix): - if arg.startswith(prefix): - return arg[len(prefix) :] - return arg - - -def QuoteShellArgument(arg, flavor): - """Quote a string such that it will be interpreted as a single argument - by the shell.""" - # Rather than attempting to enumerate the bad shell characters, just - # allow common OK ones and quote anything else. - if re.match(r"^[a-zA-Z0-9_=.\\/-]+$", arg): - return arg # No quoting necessary. - if flavor == "win": - return gyp.msvs_emulation.QuoteForRspFile(arg) - return "'" + arg.replace("'", "'" + '"\'"' + "'") + "'" - - -def Define(d, flavor): - """Takes a preprocessor define and returns a -D parameter that's ninja- and - shell-escaped.""" - if flavor == "win": - # cl.exe replaces literal # characters with = in preprocessor definitions for - # some reason. Octal-encode to work around that. - d = d.replace("#", "\\%03o" % ord("#")) - return QuoteShellArgument(ninja_syntax.escape("-D" + d), flavor) - - -def AddArch(output, arch): - """Adds an arch string to an output path.""" - output, extension = os.path.splitext(output) - return f"{output}.{arch}{extension}" - - -class Target: - """Target represents the paths used within a single gyp target. - - Conceptually, building a single target A is a series of steps: - - 1) actions/rules/copies generates source/resources/etc. - 2) compiles generates .o files - 3) link generates a binary (library/executable) - 4) bundle merges the above in a mac bundle - - (Any of these steps can be optional.) - - From a build ordering perspective, a dependent target B could just - depend on the last output of this series of steps. - - But some dependent commands sometimes need to reach inside the box. - For example, when linking B it needs to get the path to the static - library generated by A. - - This object stores those paths. To keep things simple, member - variables only store concrete paths to single files, while methods - compute derived values like "the last output of the target". - """ - - def __init__(self, type): - # Gyp type ("static_library", etc.) of this target. - self.type = type - # File representing whether any input dependencies necessary for - # dependent actions have completed. - self.preaction_stamp = None - # File representing whether any input dependencies necessary for - # dependent compiles have completed. - self.precompile_stamp = None - # File representing the completion of actions/rules/copies, if any. - self.actions_stamp = None - # Path to the output of the link step, if any. - self.binary = None - # Path to the file representing the completion of building the bundle, - # if any. - self.bundle = None - # On Windows, incremental linking requires linking against all the .objs - # that compose a .lib (rather than the .lib itself). That list is stored - # here. In this case, we also need to save the compile_deps for the target, - # so that the target that directly depends on the .objs can also depend - # on those. - self.component_objs = None - self.compile_deps = None - # Windows only. The import .lib is the output of a build step, but - # because dependents only link against the lib (not both the lib and the - # dll) we keep track of the import library here. - self.import_lib = None - # Track if this target contains any C++ files, to decide if gcc or g++ - # should be used for linking. - self.uses_cpp = False - - def Linkable(self): - """Return true if this is a target that can be linked against.""" - return self.type in ("static_library", "shared_library") - - def UsesToc(self, flavor): - """Return true if the target should produce a restat rule based on a TOC - file.""" - # For bundles, the .TOC should be produced for the binary, not for - # FinalOutput(). But the naive approach would put the TOC file into the - # bundle, so don't do this for bundles for now. - if flavor == "win" or self.bundle: - return False - return self.type in ("shared_library", "loadable_module") - - def PreActionInput(self, flavor): - """Return the path, if any, that should be used as a dependency of - any dependent action step.""" - if self.UsesToc(flavor): - return self.FinalOutput() + ".TOC" - return self.FinalOutput() or self.preaction_stamp - - def PreCompileInput(self): - """Return the path, if any, that should be used as a dependency of - any dependent compile step.""" - return self.actions_stamp or self.precompile_stamp - - def FinalOutput(self): - """Return the last output of the target, which depends on all prior - steps.""" - return self.bundle or self.binary or self.actions_stamp - - -# A small discourse on paths as used within the Ninja build: -# All files we produce (both at gyp and at build time) appear in the -# build directory (e.g. out/Debug). -# -# Paths within a given .gyp file are always relative to the directory -# containing the .gyp file. Call these "gyp paths". This includes -# sources as well as the starting directory a given gyp rule/action -# expects to be run from. We call the path from the source root to -# the gyp file the "base directory" within the per-.gyp-file -# NinjaWriter code. -# -# All paths as written into the .ninja files are relative to the build -# directory. Call these paths "ninja paths". -# -# We translate between these two notions of paths with two helper -# functions: -# -# - GypPathToNinja translates a gyp path (i.e. relative to the .gyp file) -# into the equivalent ninja path. -# -# - GypPathToUniqueOutput translates a gyp path into a ninja path to write -# an output file; the result can be namespaced such that it is unique -# to the input file name as well as the output target name. - - -class NinjaWriter: - def __init__( - self, - hash_for_rules, - target_outputs, - base_dir, - build_dir, - output_file, - toplevel_build, - output_file_name, - flavor, - toplevel_dir=None, - ): - """ - base_dir: path from source root to directory containing this gyp file, - by gyp semantics, all input paths are relative to this - build_dir: path from source root to build output - toplevel_dir: path to the toplevel directory - """ - - self.hash_for_rules = hash_for_rules - self.target_outputs = target_outputs - self.base_dir = base_dir - self.build_dir = build_dir - self.ninja = ninja_syntax.Writer(output_file) - self.toplevel_build = toplevel_build - self.output_file_name = output_file_name - - self.flavor = flavor - self.abs_build_dir = None - if toplevel_dir is not None: - self.abs_build_dir = os.path.abspath(os.path.join(toplevel_dir, build_dir)) - self.obj_ext = ".obj" if flavor == "win" else ".o" - if flavor == "win": - # See docstring of msvs_emulation.GenerateEnvironmentFiles(). - self.win_env = {} - for arch in ("x86", "x64"): - self.win_env[arch] = "environment." + arch - - # Relative path from build output dir to base dir. - build_to_top = gyp.common.InvertRelativePath(build_dir, toplevel_dir) - self.build_to_base = os.path.join(build_to_top, base_dir) - # Relative path from base dir to build dir. - base_to_top = gyp.common.InvertRelativePath(base_dir, toplevel_dir) - self.base_to_build = os.path.join(base_to_top, build_dir) - - def ExpandSpecial(self, path, product_dir=None): - """Expand specials like $!PRODUCT_DIR in |path|. - - If |product_dir| is None, assumes the cwd is already the product - dir. Otherwise, |product_dir| is the relative path to the product - dir. - """ - - PRODUCT_DIR = "$!PRODUCT_DIR" - if PRODUCT_DIR in path: - if product_dir: - path = path.replace(PRODUCT_DIR, product_dir) - else: - path = path.replace(PRODUCT_DIR + "/", "") - path = path.replace(PRODUCT_DIR + "\\", "") - path = path.replace(PRODUCT_DIR, ".") - - INTERMEDIATE_DIR = "$!INTERMEDIATE_DIR" - if INTERMEDIATE_DIR in path: - int_dir = self.GypPathToUniqueOutput("gen") - # GypPathToUniqueOutput generates a path relative to the product dir, - # so insert product_dir in front if it is provided. - path = path.replace( - INTERMEDIATE_DIR, os.path.join(product_dir or "", int_dir) - ) - - CONFIGURATION_NAME = "$|CONFIGURATION_NAME" - path = path.replace(CONFIGURATION_NAME, self.config_name) - - return path - - def ExpandRuleVariables(self, path, root, dirname, source, ext, name): - if self.flavor == "win": - path = self.msvs_settings.ConvertVSMacros(path, config=self.config_name) - path = path.replace(generator_default_variables["RULE_INPUT_ROOT"], root) - path = path.replace(generator_default_variables["RULE_INPUT_DIRNAME"], dirname) - path = path.replace(generator_default_variables["RULE_INPUT_PATH"], source) - path = path.replace(generator_default_variables["RULE_INPUT_EXT"], ext) - path = path.replace(generator_default_variables["RULE_INPUT_NAME"], name) - return path - - def GypPathToNinja(self, path, env=None): - """Translate a gyp path to a ninja path, optionally expanding environment - variable references in |path| with |env|. - - See the above discourse on path conversions.""" - if env: - if self.flavor == "mac": - path = gyp.xcode_emulation.ExpandEnvVars(path, env) - elif self.flavor == "win": - path = gyp.msvs_emulation.ExpandMacros(path, env) - if path.startswith("$!"): - expanded = self.ExpandSpecial(path) - if self.flavor == "win": - expanded = os.path.normpath(expanded) - return expanded - if "$|" in path: - path = self.ExpandSpecial(path) - assert "$" not in path, path - return os.path.normpath(os.path.join(self.build_to_base, path)) - - def GypPathToUniqueOutput(self, path, qualified=True): - """Translate a gyp path to a ninja path for writing output. - - If qualified is True, qualify the resulting filename with the name - of the target. This is necessary when e.g. compiling the same - path twice for two separate output targets. - - See the above discourse on path conversions.""" - - path = self.ExpandSpecial(path) - assert not path.startswith("$"), path - - # Translate the path following this scheme: - # Input: foo/bar.gyp, target targ, references baz/out.o - # Output: obj/foo/baz/targ.out.o (if qualified) - # obj/foo/baz/out.o (otherwise) - # (and obj.host instead of obj for cross-compiles) - # - # Why this scheme and not some other one? - # 1) for a given input, you can compute all derived outputs by matching - # its path, even if the input is brought via a gyp file with '..'. - # 2) simple files like libraries and stamps have a simple filename. - - obj = "obj" - if self.toolset != "target": - obj += "." + self.toolset - - path_dir, path_basename = os.path.split(path) - assert not os.path.isabs(path_dir), ( - "'%s' can not be absolute path (see crbug.com/462153)." % path_dir - ) - - if qualified: - path_basename = self.name + "." + path_basename - return os.path.normpath( - os.path.join(obj, self.base_dir, path_dir, path_basename) - ) - - def WriteCollapsedDependencies(self, name, targets, order_only=None): - """Given a list of targets, return a path for a single file - representing the result of building all the targets or None. - - Uses a stamp file if necessary.""" - - assert targets == [item for item in targets if item], targets - if len(targets) == 0: - assert not order_only - return None - if len(targets) > 1 or order_only: - stamp = self.GypPathToUniqueOutput(name + ".stamp") - targets = self.ninja.build(stamp, "stamp", targets, order_only=order_only) - self.ninja.newline() - return targets[0] - - def _SubninjaNameForArch(self, arch): - output_file_base = os.path.splitext(self.output_file_name)[0] - return f"{output_file_base}.{arch}.ninja" - - def WriteSpec(self, spec, config_name, generator_flags): - """The main entry point for NinjaWriter: write the build rules for a spec. - - Returns a Target object, which represents the output paths for this spec. - Returns None if there are no outputs (e.g. a settings-only 'none' type - target).""" - - self.config_name = config_name - self.name = spec["target_name"] - self.toolset = spec["toolset"] - config = spec["configurations"][config_name] - self.target = Target(spec["type"]) - self.is_standalone_static_library = bool( - spec.get("standalone_static_library", 0) - ) - - self.target_rpath = generator_flags.get("target_rpath", r"\$$ORIGIN/lib/") - - self.is_mac_bundle = gyp.xcode_emulation.IsMacBundle(self.flavor, spec) - self.xcode_settings = self.msvs_settings = None - if self.flavor == "mac": - self.xcode_settings = gyp.xcode_emulation.XcodeSettings(spec) - mac_toolchain_dir = generator_flags.get("mac_toolchain_dir", None) - if mac_toolchain_dir: - self.xcode_settings.mac_toolchain_dir = mac_toolchain_dir - - if self.flavor == "win": - self.msvs_settings = gyp.msvs_emulation.MsvsSettings(spec, generator_flags) - arch = self.msvs_settings.GetArch(config_name) - self.ninja.variable("arch", self.win_env[arch]) - self.ninja.variable("cc", "$cl_" + arch) - self.ninja.variable("cxx", "$cl_" + arch) - self.ninja.variable("cc_host", "$cl_" + arch) - self.ninja.variable("cxx_host", "$cl_" + arch) - self.ninja.variable("asm", "$ml_" + arch) - - if self.flavor == "mac": - self.archs = self.xcode_settings.GetActiveArchs(config_name) - if len(self.archs) > 1: - self.arch_subninjas = { - arch: ninja_syntax.Writer( - OpenOutput( - os.path.join( - self.toplevel_build, self._SubninjaNameForArch(arch) - ), - "w", - ) - ) - for arch in self.archs - } - - # Compute predepends for all rules. - # actions_depends is the dependencies this target depends on before running - # any of its action/rule/copy steps. - # compile_depends is the dependencies this target depends on before running - # any of its compile steps. - actions_depends = [] - compile_depends = [] - # TODO(evan): it is rather confusing which things are lists and which - # are strings. Fix these. - if "dependencies" in spec: - for dep in spec["dependencies"]: - if dep in self.target_outputs: - target = self.target_outputs[dep] - actions_depends.append(target.PreActionInput(self.flavor)) - compile_depends.append(target.PreCompileInput()) - if target.uses_cpp: - self.target.uses_cpp = True - actions_depends = [item for item in actions_depends if item] - compile_depends = [item for item in compile_depends if item] - actions_depends = self.WriteCollapsedDependencies( - "actions_depends", actions_depends - ) - compile_depends = self.WriteCollapsedDependencies( - "compile_depends", compile_depends - ) - self.target.preaction_stamp = actions_depends - self.target.precompile_stamp = compile_depends - - # Write out actions, rules, and copies. These must happen before we - # compile any sources, so compute a list of predependencies for sources - # while we do it. - extra_sources = [] - mac_bundle_depends = [] - self.target.actions_stamp = self.WriteActionsRulesCopies( - spec, extra_sources, actions_depends, mac_bundle_depends - ) - - # If we have actions/rules/copies, we depend directly on those, but - # otherwise we depend on dependent target's actions/rules/copies etc. - # We never need to explicitly depend on previous target's link steps, - # because no compile ever depends on them. - compile_depends_stamp = self.target.actions_stamp or compile_depends - - # Write out the compilation steps, if any. - link_deps = [] - try: - sources = extra_sources + spec.get("sources", []) - except TypeError: - print("extra_sources: ", str(extra_sources)) - print('spec.get("sources"): ', str(spec.get("sources"))) - raise - if sources: - if self.flavor == "mac" and len(self.archs) > 1: - # Write subninja file containing compile and link commands scoped to - # a single arch if a fat binary is being built. - for arch in self.archs: - self.ninja.subninja(self._SubninjaNameForArch(arch)) - - pch = None - if self.flavor == "win": - gyp.msvs_emulation.VerifyMissingSources( - sources, self.abs_build_dir, generator_flags, self.GypPathToNinja - ) - pch = gyp.msvs_emulation.PrecompiledHeader( - self.msvs_settings, - config_name, - self.GypPathToNinja, - self.GypPathToUniqueOutput, - self.obj_ext, - ) - else: - pch = gyp.xcode_emulation.MacPrefixHeader( - self.xcode_settings, - self.GypPathToNinja, - lambda path, lang: self.GypPathToUniqueOutput(path + "-" + lang), - ) - link_deps = self.WriteSources( - self.ninja, - config_name, - config, - sources, - compile_depends_stamp, - pch, - spec, - ) - # Some actions/rules output 'sources' that are already object files. - obj_outputs = [f for f in sources if f.endswith(self.obj_ext)] - if obj_outputs: - if self.flavor != "mac" or len(self.archs) == 1: - link_deps += [self.GypPathToNinja(o) for o in obj_outputs] - else: - print( - "Warning: Actions/rules writing object files don't work with " - "multiarch targets, dropping. (target %s)" % spec["target_name"] - ) - elif self.flavor == "mac" and len(self.archs) > 1: - link_deps = collections.defaultdict(list) - - compile_deps = self.target.actions_stamp or actions_depends - if self.flavor == "win" and self.target.type == "static_library": - self.target.component_objs = link_deps - self.target.compile_deps = compile_deps - - # Write out a link step, if needed. - output = None - is_empty_bundle = not link_deps and not mac_bundle_depends - if link_deps or self.target.actions_stamp or actions_depends: - output = self.WriteTarget( - spec, config_name, config, link_deps, compile_deps - ) - if self.is_mac_bundle: - mac_bundle_depends.append(output) - - # Bundle all of the above together, if needed. - if self.is_mac_bundle: - output = self.WriteMacBundle(spec, mac_bundle_depends, is_empty_bundle) - - if not output: - return None - - assert self.target.FinalOutput(), output - return self.target - - def _WinIdlRule(self, source, prebuild, outputs): - """Handle the implicit VS .idl rule for one source file. Fills |outputs| - with files that are generated.""" - outdir, output, vars, flags = self.msvs_settings.GetIdlBuildData( - source, self.config_name - ) - outdir = self.GypPathToNinja(outdir) - - def fix_path(path, rel=None): - path = os.path.join(outdir, path) - dirname, basename = os.path.split(source) - root, ext = os.path.splitext(basename) - path = self.ExpandRuleVariables(path, root, dirname, source, ext, basename) - if rel: - path = os.path.relpath(path, rel) - return path - - vars = [(name, fix_path(value, outdir)) for name, value in vars] - output = [fix_path(p) for p in output] - vars.append(("outdir", outdir)) - vars.append(("idlflags", flags)) - input = self.GypPathToNinja(source) - self.ninja.build(output, "idl", input, variables=vars, order_only=prebuild) - outputs.extend(output) - - def WriteWinIdlFiles(self, spec, prebuild): - """Writes rules to match MSVS's implicit idl handling.""" - assert self.flavor == "win" - if self.msvs_settings.HasExplicitIdlRulesOrActions(spec): - return [] - outputs = [] - for source in filter(lambda x: x.endswith(".idl"), spec["sources"]): - self._WinIdlRule(source, prebuild, outputs) - return outputs - - def WriteActionsRulesCopies( - self, spec, extra_sources, prebuild, mac_bundle_depends - ): - """Write out the Actions, Rules, and Copies steps. Return a path - representing the outputs of these steps.""" - outputs = [] - if self.is_mac_bundle: - mac_bundle_resources = spec.get("mac_bundle_resources", [])[:] - else: - mac_bundle_resources = [] - extra_mac_bundle_resources = [] - - if "actions" in spec: - outputs += self.WriteActions( - spec["actions"], extra_sources, prebuild, extra_mac_bundle_resources - ) - if "rules" in spec: - outputs += self.WriteRules( - spec["rules"], - extra_sources, - prebuild, - mac_bundle_resources, - extra_mac_bundle_resources, - ) - if "copies" in spec: - outputs += self.WriteCopies(spec["copies"], prebuild, mac_bundle_depends) - - if "sources" in spec and self.flavor == "win": - outputs += self.WriteWinIdlFiles(spec, prebuild) - - if self.xcode_settings and self.xcode_settings.IsIosFramework(): - self.WriteiOSFrameworkHeaders(spec, outputs, prebuild) - - stamp = self.WriteCollapsedDependencies("actions_rules_copies", outputs) - - if self.is_mac_bundle: - xcassets = self.WriteMacBundleResources( - extra_mac_bundle_resources + mac_bundle_resources, mac_bundle_depends - ) - partial_info_plist = self.WriteMacXCassets(xcassets, mac_bundle_depends) - self.WriteMacInfoPlist(partial_info_plist, mac_bundle_depends) - - return stamp - - def GenerateDescription(self, verb, message, fallback): - """Generate and return a description of a build step. - - |verb| is the short summary, e.g. ACTION or RULE. - |message| is a hand-written description, or None if not available. - |fallback| is the gyp-level name of the step, usable as a fallback. - """ - if self.toolset != "target": - verb += "(%s)" % self.toolset - if message: - return f"{verb} {self.ExpandSpecial(message)}" - else: - return f"{verb} {self.name}: {fallback}" - - def WriteActions( - self, actions, extra_sources, prebuild, extra_mac_bundle_resources - ): - # Actions cd into the base directory. - env = self.GetToolchainEnv() - all_outputs = [] - for action in actions: - # First write out a rule for the action. - name = "{}_{}".format(action["action_name"], self.hash_for_rules) - description = self.GenerateDescription( - "ACTION", action.get("message", None), name - ) - win_shell_flags = ( - self.msvs_settings.GetRuleShellFlags(action) - if self.flavor == "win" - else None - ) - args = action["action"] - depfile = action.get("depfile", None) - if depfile: - depfile = self.ExpandSpecial(depfile, self.base_to_build) - pool = "console" if int(action.get("ninja_use_console", 0)) else None - rule_name, _ = self.WriteNewNinjaRule( - name, args, description, win_shell_flags, env, pool, depfile=depfile - ) - - inputs = [self.GypPathToNinja(i, env) for i in action["inputs"]] - if int(action.get("process_outputs_as_sources", False)): - extra_sources += action["outputs"] - if int(action.get("process_outputs_as_mac_bundle_resources", False)): - extra_mac_bundle_resources += action["outputs"] - outputs = [self.GypPathToNinja(o, env) for o in action["outputs"]] - - # Then write out an edge using the rule. - self.ninja.build(outputs, rule_name, inputs, order_only=prebuild) - all_outputs += outputs - - self.ninja.newline() - - return all_outputs - - def WriteRules( - self, - rules, - extra_sources, - prebuild, - mac_bundle_resources, - extra_mac_bundle_resources, - ): - env = self.GetToolchainEnv() - all_outputs = [] - for rule in rules: - # Skip a rule with no action and no inputs. - if "action" not in rule and not rule.get("rule_sources", []): - continue - - # First write out a rule for the rule action. - name = "{}_{}".format(rule["rule_name"], self.hash_for_rules) - - args = rule["action"] - description = self.GenerateDescription( - "RULE", - rule.get("message", None), - ("%s " + generator_default_variables["RULE_INPUT_PATH"]) % name, - ) - win_shell_flags = ( - self.msvs_settings.GetRuleShellFlags(rule) - if self.flavor == "win" - else None - ) - pool = "console" if int(rule.get("ninja_use_console", 0)) else None - rule_name, args = self.WriteNewNinjaRule( - name, args, description, win_shell_flags, env, pool - ) - - # TODO: if the command references the outputs directly, we should - # simplify it to just use $out. - - # Rules can potentially make use of some special variables which - # must vary per source file. - # Compute the list of variables we'll need to provide. - special_locals = ("source", "root", "dirname", "ext", "name") - needed_variables = {"source"} - for argument in args: - for var in special_locals: - if "${%s}" % var in argument: - needed_variables.add(var) - needed_variables = sorted(needed_variables) - - def cygwin_munge(path): - # pylint: disable=cell-var-from-loop - if win_shell_flags and win_shell_flags.cygwin: - return path.replace("\\", "/") - return path - - inputs = [self.GypPathToNinja(i, env) for i in rule.get("inputs", [])] - - # If there are n source files matching the rule, and m additional rule - # inputs, then adding 'inputs' to each build edge written below will - # write m * n inputs. Collapsing reduces this to m + n. - sources = rule.get("rule_sources", []) - num_inputs = len(inputs) - if prebuild: - num_inputs += 1 - if num_inputs > 2 and len(sources) > 2: - inputs = [ - self.WriteCollapsedDependencies( - rule["rule_name"], inputs, order_only=prebuild - ) - ] - prebuild = [] - - # For each source file, write an edge that generates all the outputs. - for source in sources: - source = os.path.normpath(source) - dirname, basename = os.path.split(source) - root, ext = os.path.splitext(basename) - - # Gather the list of inputs and outputs, expanding $vars if possible. - outputs = [ - self.ExpandRuleVariables(o, root, dirname, source, ext, basename) - for o in rule["outputs"] - ] - - if int(rule.get("process_outputs_as_sources", False)): - extra_sources += outputs - - was_mac_bundle_resource = source in mac_bundle_resources - if was_mac_bundle_resource or int( - rule.get("process_outputs_as_mac_bundle_resources", False) - ): - extra_mac_bundle_resources += outputs - # Note: This is n_resources * n_outputs_in_rule. - # Put to-be-removed items in a set and - # remove them all in a single pass - # if this becomes a performance issue. - if was_mac_bundle_resource: - mac_bundle_resources.remove(source) - - extra_bindings = [] - for var in needed_variables: - if var == "root": - extra_bindings.append(("root", cygwin_munge(root))) - elif var == "dirname": - # '$dirname' is a parameter to the rule action, which means - # it shouldn't be converted to a Ninja path. But we don't - # want $!PRODUCT_DIR in there either. - dirname_expanded = self.ExpandSpecial( - dirname, self.base_to_build - ) - extra_bindings.append( - ("dirname", cygwin_munge(dirname_expanded)) - ) - elif var == "source": - # '$source' is a parameter to the rule action, which means - # it shouldn't be converted to a Ninja path. But we don't - # want $!PRODUCT_DIR in there either. - source_expanded = self.ExpandSpecial(source, self.base_to_build) - extra_bindings.append(("source", cygwin_munge(source_expanded))) - elif var == "ext": - extra_bindings.append(("ext", ext)) - elif var == "name": - extra_bindings.append(("name", cygwin_munge(basename))) - else: - assert var is None, repr(var) - - outputs = [self.GypPathToNinja(o, env) for o in outputs] - if self.flavor == "win": - # WriteNewNinjaRule uses unique_name to create a rsp file on win. - extra_bindings.append( - ("unique_name", hashlib.md5(outputs[0]).hexdigest()) - ) - - self.ninja.build( - outputs, - rule_name, - self.GypPathToNinja(source), - implicit=inputs, - order_only=prebuild, - variables=extra_bindings, - ) - - all_outputs.extend(outputs) - - return all_outputs - - def WriteCopies(self, copies, prebuild, mac_bundle_depends): - outputs = [] - if self.xcode_settings: - extra_env = self.xcode_settings.GetPerTargetSettings() - env = self.GetToolchainEnv(additional_settings=extra_env) - else: - env = self.GetToolchainEnv() - for to_copy in copies: - for path in to_copy["files"]: - # Normalize the path so trailing slashes don't confuse us. - path = os.path.normpath(path) - basename = os.path.split(path)[1] - src = self.GypPathToNinja(path, env) - dst = self.GypPathToNinja( - os.path.join(to_copy["destination"], basename), env - ) - outputs += self.ninja.build(dst, "copy", src, order_only=prebuild) - if self.is_mac_bundle: - # gyp has mac_bundle_resources to copy things into a bundle's - # Resources folder, but there's no built-in way to copy files - # to other places in the bundle. - # Hence, some targets use copies for this. - # Check if this file is copied into the current bundle, - # and if so add it to the bundle depends so - # that dependent targets get rebuilt if the copy input changes. - if dst.startswith( - self.xcode_settings.GetBundleContentsFolderPath() - ): - mac_bundle_depends.append(dst) - - return outputs - - def WriteiOSFrameworkHeaders(self, spec, outputs, prebuild): - """Prebuild steps to generate hmap files and copy headers to destination.""" - framework = self.ComputeMacBundleOutput() - all_sources = spec["sources"] - copy_headers = spec["mac_framework_headers"] - output = self.GypPathToUniqueOutput("headers.hmap") - self.xcode_settings.header_map_path = output - all_headers = map( - self.GypPathToNinja, filter(lambda x: x.endswith(".h"), all_sources) - ) - variables = [ - ("framework", framework), - ("copy_headers", map(self.GypPathToNinja, copy_headers)), - ] - outputs.extend( - self.ninja.build( - output, - "compile_ios_framework_headers", - all_headers, - variables=variables, - order_only=prebuild, - ) - ) - - def WriteMacBundleResources(self, resources, bundle_depends): - """Writes ninja edges for 'mac_bundle_resources'.""" - xcassets = [] - - extra_env = self.xcode_settings.GetPerTargetSettings() - env = self.GetSortedXcodeEnv(additional_settings=extra_env) - env = self.ComputeExportEnvString(env) - isBinary = self.xcode_settings.IsBinaryOutputFormat(self.config_name) - - for output, res in gyp.xcode_emulation.GetMacBundleResources( - generator_default_variables["PRODUCT_DIR"], - self.xcode_settings, - map(self.GypPathToNinja, resources), - ): - output = self.ExpandSpecial(output) - if os.path.splitext(output)[-1] != ".xcassets": - self.ninja.build( - output, - "mac_tool", - res, - variables=[ - ("mactool_cmd", "copy-bundle-resource"), - ("env", env), - ("binary", isBinary), - ], - ) - bundle_depends.append(output) - else: - xcassets.append(res) - return xcassets - - def WriteMacXCassets(self, xcassets, bundle_depends): - """Writes ninja edges for 'mac_bundle_resources' .xcassets files. - - This add an invocation of 'actool' via the 'mac_tool.py' helper script. - It assumes that the assets catalogs define at least one imageset and - thus an Assets.car file will be generated in the application resources - directory. If this is not the case, then the build will probably be done - at each invocation of ninja.""" - if not xcassets: - return - - extra_arguments = {} - settings_to_arg = { - "XCASSETS_APP_ICON": "app-icon", - "XCASSETS_LAUNCH_IMAGE": "launch-image", - } - settings = self.xcode_settings.xcode_settings[self.config_name] - for settings_key, arg_name in settings_to_arg.items(): - value = settings.get(settings_key) - if value: - extra_arguments[arg_name] = value - - partial_info_plist = None - if extra_arguments: - partial_info_plist = self.GypPathToUniqueOutput( - "assetcatalog_generated_info.plist" - ) - extra_arguments["output-partial-info-plist"] = partial_info_plist - - outputs = [] - outputs.append( - os.path.join(self.xcode_settings.GetBundleResourceFolder(), "Assets.car") - ) - if partial_info_plist: - outputs.append(partial_info_plist) - - keys = QuoteShellArgument(json.dumps(extra_arguments), self.flavor) - extra_env = self.xcode_settings.GetPerTargetSettings() - env = self.GetSortedXcodeEnv(additional_settings=extra_env) - env = self.ComputeExportEnvString(env) - - bundle_depends.extend( - self.ninja.build( - outputs, - "compile_xcassets", - xcassets, - variables=[("env", env), ("keys", keys)], - ) - ) - return partial_info_plist - - def WriteMacInfoPlist(self, partial_info_plist, bundle_depends): - """Write build rules for bundle Info.plist files.""" - info_plist, out, defines, extra_env = gyp.xcode_emulation.GetMacInfoPlist( - generator_default_variables["PRODUCT_DIR"], - self.xcode_settings, - self.GypPathToNinja, - ) - if not info_plist: - return - out = self.ExpandSpecial(out) - if defines: - # Create an intermediate file to store preprocessed results. - intermediate_plist = self.GypPathToUniqueOutput( - os.path.basename(info_plist) - ) - defines = " ".join([Define(d, self.flavor) for d in defines]) - info_plist = self.ninja.build( - intermediate_plist, - "preprocess_infoplist", - info_plist, - variables=[("defines", defines)], - ) - - env = self.GetSortedXcodeEnv(additional_settings=extra_env) - env = self.ComputeExportEnvString(env) - - if partial_info_plist: - intermediate_plist = self.GypPathToUniqueOutput("merged_info.plist") - info_plist = self.ninja.build( - intermediate_plist, "merge_infoplist", [partial_info_plist, info_plist] - ) - - keys = self.xcode_settings.GetExtraPlistItems(self.config_name) - keys = QuoteShellArgument(json.dumps(keys), self.flavor) - isBinary = self.xcode_settings.IsBinaryOutputFormat(self.config_name) - self.ninja.build( - out, - "copy_infoplist", - info_plist, - variables=[("env", env), ("keys", keys), ("binary", isBinary)], - ) - bundle_depends.append(out) - - def WriteSources( - self, - ninja_file, - config_name, - config, - sources, - predepends, - precompiled_header, - spec, - ): - """Write build rules to compile all of |sources|.""" - if self.toolset == "host": - self.ninja.variable("ar", "$ar_host") - self.ninja.variable("cc", "$cc_host") - self.ninja.variable("cxx", "$cxx_host") - self.ninja.variable("ld", "$ld_host") - self.ninja.variable("ldxx", "$ldxx_host") - self.ninja.variable("nm", "$nm_host") - self.ninja.variable("readelf", "$readelf_host") - - if self.flavor != "mac" or len(self.archs) == 1: - return self.WriteSourcesForArch( - self.ninja, - config_name, - config, - sources, - predepends, - precompiled_header, - spec, - ) - else: - return { - arch: self.WriteSourcesForArch( - self.arch_subninjas[arch], - config_name, - config, - sources, - predepends, - precompiled_header, - spec, - arch=arch, - ) - for arch in self.archs - } - - def WriteSourcesForArch( - self, - ninja_file, - config_name, - config, - sources, - predepends, - precompiled_header, - spec, - arch=None, - ): - """Write build rules to compile all of |sources|.""" - - extra_defines = [] - if self.flavor == "mac": - cflags = self.xcode_settings.GetCflags(config_name, arch=arch) - cflags_c = self.xcode_settings.GetCflagsC(config_name) - cflags_cc = self.xcode_settings.GetCflagsCC(config_name) - cflags_objc = ["$cflags_c"] + self.xcode_settings.GetCflagsObjC(config_name) - cflags_objcc = ["$cflags_cc"] + self.xcode_settings.GetCflagsObjCC( - config_name - ) - elif self.flavor == "win": - asmflags = self.msvs_settings.GetAsmflags(config_name) - cflags = self.msvs_settings.GetCflags(config_name) - cflags_c = self.msvs_settings.GetCflagsC(config_name) - cflags_cc = self.msvs_settings.GetCflagsCC(config_name) - extra_defines = self.msvs_settings.GetComputedDefines(config_name) - # See comment at cc_command for why there's two .pdb files. - pdbpath_c = pdbpath_cc = self.msvs_settings.GetCompilerPdbName( - config_name, self.ExpandSpecial - ) - if not pdbpath_c: - obj = "obj" - if self.toolset != "target": - obj += "." + self.toolset - pdbpath = os.path.normpath(os.path.join(obj, self.base_dir, self.name)) - pdbpath_c = pdbpath + ".c.pdb" - pdbpath_cc = pdbpath + ".cc.pdb" - self.WriteVariableList(ninja_file, "pdbname_c", [pdbpath_c]) - self.WriteVariableList(ninja_file, "pdbname_cc", [pdbpath_cc]) - self.WriteVariableList(ninja_file, "pchprefix", [self.name]) - else: - cflags = config.get("cflags", []) - cflags_c = config.get("cflags_c", []) - cflags_cc = config.get("cflags_cc", []) - - # Respect environment variables related to build, but target-specific - # flags can still override them. - if self.toolset == "target": - cflags_c = ( - os.environ.get("CPPFLAGS", "").split() - + os.environ.get("CFLAGS", "").split() - + cflags_c - ) - cflags_cc = ( - os.environ.get("CPPFLAGS", "").split() - + os.environ.get("CXXFLAGS", "").split() - + cflags_cc - ) - elif self.toolset == "host": - cflags_c = ( - os.environ.get("CPPFLAGS_host", "").split() - + os.environ.get("CFLAGS_host", "").split() - + cflags_c - ) - cflags_cc = ( - os.environ.get("CPPFLAGS_host", "").split() - + os.environ.get("CXXFLAGS_host", "").split() - + cflags_cc - ) - - defines = config.get("defines", []) + extra_defines - self.WriteVariableList( - ninja_file, "defines", [Define(d, self.flavor) for d in defines] - ) - if self.flavor == "win": - self.WriteVariableList( - ninja_file, "asmflags", map(self.ExpandSpecial, asmflags) - ) - self.WriteVariableList( - ninja_file, - "rcflags", - [ - QuoteShellArgument(self.ExpandSpecial(f), self.flavor) - for f in self.msvs_settings.GetRcflags( - config_name, self.GypPathToNinja - ) - ], - ) - - include_dirs = config.get("include_dirs", []) - - env = self.GetToolchainEnv() - if self.flavor == "win": - include_dirs = self.msvs_settings.AdjustIncludeDirs( - include_dirs, config_name - ) - self.WriteVariableList( - ninja_file, - "includes", - [ - QuoteShellArgument("-I" + self.GypPathToNinja(i, env), self.flavor) - for i in include_dirs - ], - ) - - if self.flavor == "win": - midl_include_dirs = config.get("midl_include_dirs", []) - midl_include_dirs = self.msvs_settings.AdjustMidlIncludeDirs( - midl_include_dirs, config_name - ) - self.WriteVariableList( - ninja_file, - "midl_includes", - [ - QuoteShellArgument("-I" + self.GypPathToNinja(i, env), self.flavor) - for i in midl_include_dirs - ], - ) - - pch_commands = precompiled_header.GetPchBuildCommands(arch) - if self.flavor == "mac": - # Most targets use no precompiled headers, so only write these if needed. - for ext, var in [ - ("c", "cflags_pch_c"), - ("cc", "cflags_pch_cc"), - ("m", "cflags_pch_objc"), - ("mm", "cflags_pch_objcc"), - ]: - include = precompiled_header.GetInclude(ext, arch) - if include: - ninja_file.variable(var, include) - - arflags = config.get("arflags", []) - - self.WriteVariableList(ninja_file, "cflags", map(self.ExpandSpecial, cflags)) - self.WriteVariableList( - ninja_file, "cflags_c", map(self.ExpandSpecial, cflags_c) - ) - self.WriteVariableList( - ninja_file, "cflags_cc", map(self.ExpandSpecial, cflags_cc) - ) - if self.flavor == "mac": - self.WriteVariableList( - ninja_file, "cflags_objc", map(self.ExpandSpecial, cflags_objc) - ) - self.WriteVariableList( - ninja_file, "cflags_objcc", map(self.ExpandSpecial, cflags_objcc) - ) - self.WriteVariableList(ninja_file, "arflags", map(self.ExpandSpecial, arflags)) - ninja_file.newline() - outputs = [] - has_rc_source = False - for source in sources: - filename, ext = os.path.splitext(source) - ext = ext[1:] - obj_ext = self.obj_ext - if ext in ("cc", "cpp", "cxx"): - command = "cxx" - self.target.uses_cpp = True - elif ext == "c" or (ext == "S" and self.flavor != "win"): - command = "cc" - elif ext == "s" and self.flavor != "win": # Doesn't generate .o.d files. - command = "cc_s" - elif ( - self.flavor == "win" - and ext in ("asm", "S") - and not self.msvs_settings.HasExplicitAsmRules(spec) - ): - command = "asm" - # Add the _asm suffix as msvs is capable of handling .cc and - # .asm files of the same name without collision. - obj_ext = "_asm.obj" - elif self.flavor == "mac" and ext == "m": - command = "objc" - elif self.flavor == "mac" and ext == "mm": - command = "objcxx" - self.target.uses_cpp = True - elif self.flavor == "win" and ext == "rc": - command = "rc" - obj_ext = ".res" - has_rc_source = True - else: - # Ignore unhandled extensions. - continue - input = self.GypPathToNinja(source) - output = self.GypPathToUniqueOutput(filename + obj_ext) - if arch is not None: - output = AddArch(output, arch) - implicit = precompiled_header.GetObjDependencies([input], [output], arch) - variables = [] - if self.flavor == "win": - variables, output, implicit = precompiled_header.GetFlagsModifications( - input, - output, - implicit, - command, - cflags_c, - cflags_cc, - self.ExpandSpecial, - ) - ninja_file.build( - output, - command, - input, - implicit=[gch for _, _, gch in implicit], - order_only=predepends, - variables=variables, - ) - outputs.append(output) - - if has_rc_source: - resource_include_dirs = config.get("resource_include_dirs", include_dirs) - self.WriteVariableList( - ninja_file, - "resource_includes", - [ - QuoteShellArgument("-I" + self.GypPathToNinja(i, env), self.flavor) - for i in resource_include_dirs - ], - ) - - self.WritePchTargets(ninja_file, pch_commands) - - ninja_file.newline() - return outputs - - def WritePchTargets(self, ninja_file, pch_commands): - """Writes ninja rules to compile prefix headers.""" - if not pch_commands: - return - - for gch, lang_flag, lang, input in pch_commands: - var_name = { - "c": "cflags_pch_c", - "cc": "cflags_pch_cc", - "m": "cflags_pch_objc", - "mm": "cflags_pch_objcc", - }[lang] - - map = { - "c": "cc", - "cc": "cxx", - "m": "objc", - "mm": "objcxx", - } - cmd = map.get(lang) - ninja_file.build(gch, cmd, input, variables=[(var_name, lang_flag)]) - - def WriteLink(self, spec, config_name, config, link_deps, compile_deps): - """Write out a link step. Fills out target.binary. """ - if self.flavor != "mac" or len(self.archs) == 1: - return self.WriteLinkForArch( - self.ninja, spec, config_name, config, link_deps, compile_deps - ) - else: - output = self.ComputeOutput(spec) - inputs = [ - self.WriteLinkForArch( - self.arch_subninjas[arch], - spec, - config_name, - config, - link_deps[arch], - compile_deps, - arch=arch, - ) - for arch in self.archs - ] - extra_bindings = [] - build_output = output - if not self.is_mac_bundle: - self.AppendPostbuildVariable(extra_bindings, spec, output, output) - - # TODO(yyanagisawa): more work needed to fix: - # https://code.google.com/p/gyp/issues/detail?id=411 - if ( - spec["type"] in ("shared_library", "loadable_module") - and not self.is_mac_bundle - ): - extra_bindings.append(("lib", output)) - self.ninja.build( - [output, output + ".TOC"], - "solipo", - inputs, - variables=extra_bindings, - ) - else: - self.ninja.build(build_output, "lipo", inputs, variables=extra_bindings) - return output - - def WriteLinkForArch( - self, ninja_file, spec, config_name, config, link_deps, compile_deps, arch=None - ): - """Write out a link step. Fills out target.binary. """ - command = { - "executable": "link", - "loadable_module": "solink_module", - "shared_library": "solink", - }[spec["type"]] - command_suffix = "" - - implicit_deps = set() - solibs = set() - order_deps = set() - - if compile_deps: - # Normally, the compiles of the target already depend on compile_deps, - # but a shared_library target might have no sources and only link together - # a few static_library deps, so the link step also needs to depend - # on compile_deps to make sure actions in the shared_library target - # get run before the link. - order_deps.add(compile_deps) - - if "dependencies" in spec: - # Two kinds of dependencies: - # - Linkable dependencies (like a .a or a .so): add them to the link line. - # - Non-linkable dependencies (like a rule that generates a file - # and writes a stamp file): add them to implicit_deps - extra_link_deps = set() - for dep in spec["dependencies"]: - target = self.target_outputs.get(dep) - if not target: - continue - linkable = target.Linkable() - if linkable: - new_deps = [] - if ( - self.flavor == "win" - and target.component_objs - and self.msvs_settings.IsUseLibraryDependencyInputs(config_name) - ): - new_deps = target.component_objs - if target.compile_deps: - order_deps.add(target.compile_deps) - elif self.flavor == "win" and target.import_lib: - new_deps = [target.import_lib] - elif target.UsesToc(self.flavor): - solibs.add(target.binary) - implicit_deps.add(target.binary + ".TOC") - else: - new_deps = [target.binary] - for new_dep in new_deps: - if new_dep not in extra_link_deps: - extra_link_deps.add(new_dep) - link_deps.append(new_dep) - - final_output = target.FinalOutput() - if not linkable or final_output != target.binary: - implicit_deps.add(final_output) - - extra_bindings = [] - if self.target.uses_cpp and self.flavor != "win": - extra_bindings.append(("ld", "$ldxx")) - - output = self.ComputeOutput(spec, arch) - if arch is None and not self.is_mac_bundle: - self.AppendPostbuildVariable(extra_bindings, spec, output, output) - - is_executable = spec["type"] == "executable" - # The ldflags config key is not used on mac or win. On those platforms - # linker flags are set via xcode_settings and msvs_settings, respectively. - if self.toolset == "target": - env_ldflags = os.environ.get("LDFLAGS", "").split() - elif self.toolset == "host": - env_ldflags = os.environ.get("LDFLAGS_host", "").split() - - if self.flavor == "mac": - ldflags = self.xcode_settings.GetLdflags( - config_name, - self.ExpandSpecial(generator_default_variables["PRODUCT_DIR"]), - self.GypPathToNinja, - arch, - ) - ldflags = env_ldflags + ldflags - elif self.flavor == "win": - manifest_base_name = self.GypPathToUniqueOutput( - self.ComputeOutputFileName(spec) - ) - ( - ldflags, - intermediate_manifest, - manifest_files, - ) = self.msvs_settings.GetLdflags( - config_name, - self.GypPathToNinja, - self.ExpandSpecial, - manifest_base_name, - output, - is_executable, - self.toplevel_build, - ) - ldflags = env_ldflags + ldflags - self.WriteVariableList(ninja_file, "manifests", manifest_files) - implicit_deps = implicit_deps.union(manifest_files) - if intermediate_manifest: - self.WriteVariableList( - ninja_file, "intermediatemanifest", [intermediate_manifest] - ) - command_suffix = _GetWinLinkRuleNameSuffix( - self.msvs_settings.IsEmbedManifest(config_name) - ) - def_file = self.msvs_settings.GetDefFile(self.GypPathToNinja) - if def_file: - implicit_deps.add(def_file) - else: - # Respect environment variables related to build, but target-specific - # flags can still override them. - ldflags = env_ldflags + config.get("ldflags", []) - if is_executable and len(solibs): - rpath = "lib/" - if self.toolset != "target": - rpath += self.toolset - ldflags.append(r"-Wl,-rpath=\$$ORIGIN/%s" % rpath) - else: - ldflags.append("-Wl,-rpath=%s" % self.target_rpath) - ldflags.append("-Wl,-rpath-link=%s" % rpath) - self.WriteVariableList(ninja_file, "ldflags", map(self.ExpandSpecial, ldflags)) - - library_dirs = config.get("library_dirs", []) - if self.flavor == "win": - library_dirs = [ - self.msvs_settings.ConvertVSMacros(library_dir, config_name) - for library_dir in library_dirs - ] - library_dirs = [ - "/LIBPATH:" - + QuoteShellArgument(self.GypPathToNinja(library_dir), self.flavor) - for library_dir in library_dirs - ] - else: - library_dirs = [ - QuoteShellArgument("-L" + self.GypPathToNinja(library_dir), self.flavor) - for library_dir in library_dirs - ] - - libraries = gyp.common.uniquer( - map(self.ExpandSpecial, spec.get("libraries", [])) - ) - if self.flavor == "mac": - libraries = self.xcode_settings.AdjustLibraries(libraries, config_name) - elif self.flavor == "win": - libraries = self.msvs_settings.AdjustLibraries(libraries) - - self.WriteVariableList(ninja_file, "libs", library_dirs + libraries) - - linked_binary = output - - if command in ("solink", "solink_module"): - extra_bindings.append(("soname", os.path.split(output)[1])) - extra_bindings.append(("lib", gyp.common.EncodePOSIXShellArgument(output))) - if self.flavor != "win": - link_file_list = output - if self.is_mac_bundle: - # 'Dependency Framework.framework/Versions/A/Dependency Framework' - # -> 'Dependency Framework.framework.rsp' - link_file_list = self.xcode_settings.GetWrapperName() - if arch: - link_file_list += "." + arch - link_file_list += ".rsp" - # If an rspfile contains spaces, ninja surrounds the filename with - # quotes around it and then passes it to open(), creating a file with - # quotes in its name (and when looking for the rsp file, the name - # makes it through bash which strips the quotes) :-/ - link_file_list = link_file_list.replace(" ", "_") - extra_bindings.append( - ( - "link_file_list", - gyp.common.EncodePOSIXShellArgument(link_file_list), - ) - ) - if self.flavor == "win": - extra_bindings.append(("binary", output)) - if ( - "/NOENTRY" not in ldflags - and not self.msvs_settings.GetNoImportLibrary(config_name) - ): - self.target.import_lib = output + ".lib" - extra_bindings.append( - ("implibflag", "/IMPLIB:%s" % self.target.import_lib) - ) - pdbname = self.msvs_settings.GetPDBName( - config_name, self.ExpandSpecial, output + ".pdb" - ) - output = [output, self.target.import_lib] - if pdbname: - output.append(pdbname) - elif not self.is_mac_bundle: - output = [output, output + ".TOC"] - else: - command = command + "_notoc" - elif self.flavor == "win": - extra_bindings.append(("binary", output)) - pdbname = self.msvs_settings.GetPDBName( - config_name, self.ExpandSpecial, output + ".pdb" - ) - if pdbname: - output = [output, pdbname] - - if len(solibs): - extra_bindings.append( - ("solibs", gyp.common.EncodePOSIXShellList(sorted(solibs))) - ) - - ninja_file.build( - output, - command + command_suffix, - link_deps, - implicit=sorted(implicit_deps), - order_only=list(order_deps), - variables=extra_bindings, - ) - return linked_binary - - def WriteTarget(self, spec, config_name, config, link_deps, compile_deps): - extra_link_deps = any( - self.target_outputs.get(dep).Linkable() - for dep in spec.get("dependencies", []) - if dep in self.target_outputs - ) - if spec["type"] == "none" or (not link_deps and not extra_link_deps): - # TODO(evan): don't call this function for 'none' target types, as - # it doesn't do anything, and we fake out a 'binary' with a stamp file. - self.target.binary = compile_deps - self.target.type = "none" - elif spec["type"] == "static_library": - self.target.binary = self.ComputeOutput(spec) - if ( - self.flavor not in ("mac", "openbsd", "netbsd", "win") - and not self.is_standalone_static_library - ): - self.ninja.build( - self.target.binary, "alink_thin", link_deps, order_only=compile_deps - ) - else: - variables = [] - if self.xcode_settings: - libtool_flags = self.xcode_settings.GetLibtoolflags(config_name) - if libtool_flags: - variables.append(("libtool_flags", libtool_flags)) - if self.msvs_settings: - libflags = self.msvs_settings.GetLibFlags( - config_name, self.GypPathToNinja - ) - variables.append(("libflags", libflags)) - - if self.flavor != "mac" or len(self.archs) == 1: - self.AppendPostbuildVariable( - variables, spec, self.target.binary, self.target.binary - ) - self.ninja.build( - self.target.binary, - "alink", - link_deps, - order_only=compile_deps, - variables=variables, - ) - else: - inputs = [] - for arch in self.archs: - output = self.ComputeOutput(spec, arch) - self.arch_subninjas[arch].build( - output, - "alink", - link_deps[arch], - order_only=compile_deps, - variables=variables, - ) - inputs.append(output) - # TODO: It's not clear if - # libtool_flags should be passed to the alink - # call that combines single-arch .a files into a fat .a file. - self.AppendPostbuildVariable( - variables, spec, self.target.binary, self.target.binary - ) - self.ninja.build( - self.target.binary, - "alink", - inputs, - # FIXME: test proving order_only=compile_deps isn't - # needed. - variables=variables, - ) - else: - self.target.binary = self.WriteLink( - spec, config_name, config, link_deps, compile_deps - ) - return self.target.binary - - def WriteMacBundle(self, spec, mac_bundle_depends, is_empty): - assert self.is_mac_bundle - package_framework = spec["type"] in ("shared_library", "loadable_module") - output = self.ComputeMacBundleOutput() - if is_empty: - output += ".stamp" - variables = [] - self.AppendPostbuildVariable( - variables, - spec, - output, - self.target.binary, - is_command_start=not package_framework, - ) - if package_framework and not is_empty: - if spec["type"] == "shared_library" and self.xcode_settings.isIOS: - self.ninja.build( - output, - "package_ios_framework", - mac_bundle_depends, - variables=variables, - ) - else: - variables.append(("version", self.xcode_settings.GetFrameworkVersion())) - self.ninja.build( - output, "package_framework", mac_bundle_depends, variables=variables - ) - else: - self.ninja.build(output, "stamp", mac_bundle_depends, variables=variables) - self.target.bundle = output - return output - - def GetToolchainEnv(self, additional_settings=None): - """Returns the variables toolchain would set for build steps.""" - env = self.GetSortedXcodeEnv(additional_settings=additional_settings) - if self.flavor == "win": - env = self.GetMsvsToolchainEnv(additional_settings=additional_settings) - return env - - def GetMsvsToolchainEnv(self, additional_settings=None): - """Returns the variables Visual Studio would set for build steps.""" - return self.msvs_settings.GetVSMacroEnv( - "$!PRODUCT_DIR", config=self.config_name - ) - - def GetSortedXcodeEnv(self, additional_settings=None): - """Returns the variables Xcode would set for build steps.""" - assert self.abs_build_dir - abs_build_dir = self.abs_build_dir - return gyp.xcode_emulation.GetSortedXcodeEnv( - self.xcode_settings, - abs_build_dir, - os.path.join(abs_build_dir, self.build_to_base), - self.config_name, - additional_settings, - ) - - def GetSortedXcodePostbuildEnv(self): - """Returns the variables Xcode would set for postbuild steps.""" - postbuild_settings = {} - # CHROMIUM_STRIP_SAVE_FILE is a chromium-specific hack. - # TODO(thakis): It would be nice to have some general mechanism instead. - strip_save_file = self.xcode_settings.GetPerTargetSetting( - "CHROMIUM_STRIP_SAVE_FILE" - ) - if strip_save_file: - postbuild_settings["CHROMIUM_STRIP_SAVE_FILE"] = strip_save_file - return self.GetSortedXcodeEnv(additional_settings=postbuild_settings) - - def AppendPostbuildVariable( - self, variables, spec, output, binary, is_command_start=False - ): - """Adds a 'postbuild' variable if there is a postbuild for |output|.""" - postbuild = self.GetPostbuildCommand(spec, output, binary, is_command_start) - if postbuild: - variables.append(("postbuilds", postbuild)) - - def GetPostbuildCommand(self, spec, output, output_binary, is_command_start): - """Returns a shell command that runs all the postbuilds, and removes - |output| if any of them fails. If |is_command_start| is False, then the - returned string will start with ' && '.""" - if not self.xcode_settings or spec["type"] == "none" or not output: - return "" - output = QuoteShellArgument(output, self.flavor) - postbuilds = gyp.xcode_emulation.GetSpecPostbuildCommands(spec, quiet=True) - if output_binary is not None: - postbuilds = self.xcode_settings.AddImplicitPostbuilds( - self.config_name, - os.path.normpath(os.path.join(self.base_to_build, output)), - QuoteShellArgument( - os.path.normpath(os.path.join(self.base_to_build, output_binary)), - self.flavor, - ), - postbuilds, - quiet=True, - ) - - if not postbuilds: - return "" - # Postbuilds expect to be run in the gyp file's directory, so insert an - # implicit postbuild to cd to there. - postbuilds.insert( - 0, gyp.common.EncodePOSIXShellList(["cd", self.build_to_base]) - ) - env = self.ComputeExportEnvString(self.GetSortedXcodePostbuildEnv()) - # G will be non-null if any postbuild fails. Run all postbuilds in a - # subshell. - commands = ( - env - + " (" - + " && ".join([ninja_syntax.escape(command) for command in postbuilds]) - ) - command_string = ( - commands - + "); G=$$?; " - # Remove the final output if any postbuild failed. - "((exit $$G) || rm -rf %s) " % output - + "&& exit $$G)" - ) - if is_command_start: - return "(" + command_string + " && " - else: - return "$ && (" + command_string - - def ComputeExportEnvString(self, env): - """Given an environment, returns a string looking like - 'export FOO=foo; export BAR="${FOO} bar;' - that exports |env| to the shell.""" - export_str = [] - for k, v in env: - export_str.append( - "export %s=%s;" - % (k, ninja_syntax.escape(gyp.common.EncodePOSIXShellArgument(v))) - ) - return " ".join(export_str) - - def ComputeMacBundleOutput(self): - """Return the 'output' (full output path) to a bundle output directory.""" - assert self.is_mac_bundle - path = generator_default_variables["PRODUCT_DIR"] - return self.ExpandSpecial( - os.path.join(path, self.xcode_settings.GetWrapperName()) - ) - - def ComputeOutputFileName(self, spec, type=None): - """Compute the filename of the final output for the current target.""" - if not type: - type = spec["type"] - - default_variables = copy.copy(generator_default_variables) - CalculateVariables(default_variables, {"flavor": self.flavor}) - - # Compute filename prefix: the product prefix, or a default for - # the product type. - DEFAULT_PREFIX = { - "loadable_module": default_variables["SHARED_LIB_PREFIX"], - "shared_library": default_variables["SHARED_LIB_PREFIX"], - "static_library": default_variables["STATIC_LIB_PREFIX"], - "executable": default_variables["EXECUTABLE_PREFIX"], - } - prefix = spec.get("product_prefix", DEFAULT_PREFIX.get(type, "")) - - # Compute filename extension: the product extension, or a default - # for the product type. - DEFAULT_EXTENSION = { - "loadable_module": default_variables["SHARED_LIB_SUFFIX"], - "shared_library": default_variables["SHARED_LIB_SUFFIX"], - "static_library": default_variables["STATIC_LIB_SUFFIX"], - "executable": default_variables["EXECUTABLE_SUFFIX"], - } - extension = spec.get("product_extension") - if extension: - extension = "." + extension - else: - extension = DEFAULT_EXTENSION.get(type, "") - - if "product_name" in spec: - # If we were given an explicit name, use that. - target = spec["product_name"] - else: - # Otherwise, derive a name from the target name. - target = spec["target_name"] - if prefix == "lib": - # Snip out an extra 'lib' from libs if appropriate. - target = StripPrefix(target, "lib") - - if type in ( - "static_library", - "loadable_module", - "shared_library", - "executable", - ): - return f"{prefix}{target}{extension}" - elif type == "none": - return "%s.stamp" % target - else: - raise Exception("Unhandled output type %s" % type) - - def ComputeOutput(self, spec, arch=None): - """Compute the path for the final output of the spec.""" - type = spec["type"] - - if self.flavor == "win": - override = self.msvs_settings.GetOutputName( - self.config_name, self.ExpandSpecial - ) - if override: - return override - - if ( - arch is None - and self.flavor == "mac" - and type - in ("static_library", "executable", "shared_library", "loadable_module") - ): - filename = self.xcode_settings.GetExecutablePath() - else: - filename = self.ComputeOutputFileName(spec, type) - - if arch is None and "product_dir" in spec: - path = os.path.join(spec["product_dir"], filename) - return self.ExpandSpecial(path) - - # Some products go into the output root, libraries go into shared library - # dir, and everything else goes into the normal place. - type_in_output_root = ["executable", "loadable_module"] - if self.flavor == "mac" and self.toolset == "target": - type_in_output_root += ["shared_library", "static_library"] - elif self.flavor == "win" and self.toolset == "target": - type_in_output_root += ["shared_library"] - - if arch is not None: - # Make sure partial executables don't end up in a bundle or the regular - # output directory. - archdir = "arch" - if self.toolset != "target": - archdir = os.path.join("arch", "%s" % self.toolset) - return os.path.join(archdir, AddArch(filename, arch)) - elif type in type_in_output_root or self.is_standalone_static_library: - return filename - elif type == "shared_library": - libdir = "lib" - if self.toolset != "target": - libdir = os.path.join("lib", "%s" % self.toolset) - return os.path.join(libdir, filename) - else: - return self.GypPathToUniqueOutput(filename, qualified=False) - - def WriteVariableList(self, ninja_file, var, values): - assert not isinstance(values, str) - if values is None: - values = [] - ninja_file.variable(var, " ".join(values)) - - def WriteNewNinjaRule( - self, name, args, description, win_shell_flags, env, pool, depfile=None - ): - """Write out a new ninja "rule" statement for a given command. - - Returns the name of the new rule, and a copy of |args| with variables - expanded.""" - - if self.flavor == "win": - args = [ - self.msvs_settings.ConvertVSMacros( - arg, self.base_to_build, config=self.config_name - ) - for arg in args - ] - description = self.msvs_settings.ConvertVSMacros( - description, config=self.config_name - ) - elif self.flavor == "mac": - # |env| is an empty list on non-mac. - args = [gyp.xcode_emulation.ExpandEnvVars(arg, env) for arg in args] - description = gyp.xcode_emulation.ExpandEnvVars(description, env) - - # TODO: we shouldn't need to qualify names; we do it because - # currently the ninja rule namespace is global, but it really - # should be scoped to the subninja. - rule_name = self.name - if self.toolset == "target": - rule_name += "." + self.toolset - rule_name += "." + name - rule_name = re.sub("[^a-zA-Z0-9_]", "_", rule_name) - - # Remove variable references, but not if they refer to the magic rule - # variables. This is not quite right, as it also protects these for - # actions, not just for rules where they are valid. Good enough. - protect = ["${root}", "${dirname}", "${source}", "${ext}", "${name}"] - protect = "(?!" + "|".join(map(re.escape, protect)) + ")" - description = re.sub(protect + r"\$", "_", description) - - # gyp dictates that commands are run from the base directory. - # cd into the directory before running, and adjust paths in - # the arguments to point to the proper locations. - rspfile = None - rspfile_content = None - args = [self.ExpandSpecial(arg, self.base_to_build) for arg in args] - if self.flavor == "win": - rspfile = rule_name + ".$unique_name.rsp" - # The cygwin case handles this inside the bash sub-shell. - run_in = "" if win_shell_flags.cygwin else " " + self.build_to_base - if win_shell_flags.cygwin: - rspfile_content = self.msvs_settings.BuildCygwinBashCommandLine( - args, self.build_to_base - ) - else: - rspfile_content = gyp.msvs_emulation.EncodeRspFileList( - args, win_shell_flags.quote) - command = ( - "%s gyp-win-tool action-wrapper $arch " % sys.executable - + rspfile - + run_in - ) - else: - env = self.ComputeExportEnvString(env) - command = gyp.common.EncodePOSIXShellList(args) - command = "cd %s; " % self.build_to_base + env + command - - # GYP rules/actions express being no-ops by not touching their outputs. - # Avoid executing downstream dependencies in this case by specifying - # restat=1 to ninja. - self.ninja.rule( - rule_name, - command, - description, - depfile=depfile, - restat=True, - pool=pool, - rspfile=rspfile, - rspfile_content=rspfile_content, - ) - self.ninja.newline() - - return rule_name, args - - -def CalculateVariables(default_variables, params): - """Calculate additional variables for use in the build (called by gyp).""" - global generator_additional_non_configuration_keys - global generator_additional_path_sections - flavor = gyp.common.GetFlavor(params) - if flavor == "mac": - default_variables.setdefault("OS", "mac") - default_variables.setdefault("SHARED_LIB_SUFFIX", ".dylib") - default_variables.setdefault( - "SHARED_LIB_DIR", generator_default_variables["PRODUCT_DIR"] - ) - default_variables.setdefault( - "LIB_DIR", generator_default_variables["PRODUCT_DIR"] - ) - - # Copy additional generator configuration data from Xcode, which is shared - # by the Mac Ninja generator. - import gyp.generator.xcode as xcode_generator - - generator_additional_non_configuration_keys = getattr( - xcode_generator, "generator_additional_non_configuration_keys", [] - ) - generator_additional_path_sections = getattr( - xcode_generator, "generator_additional_path_sections", [] - ) - global generator_extra_sources_for_rules - generator_extra_sources_for_rules = getattr( - xcode_generator, "generator_extra_sources_for_rules", [] - ) - elif flavor == "win": - exts = gyp.MSVSUtil.TARGET_TYPE_EXT - default_variables.setdefault("OS", "win") - default_variables["EXECUTABLE_SUFFIX"] = "." + exts["executable"] - default_variables["STATIC_LIB_PREFIX"] = "" - default_variables["STATIC_LIB_SUFFIX"] = "." + exts["static_library"] - default_variables["SHARED_LIB_PREFIX"] = "" - default_variables["SHARED_LIB_SUFFIX"] = "." + exts["shared_library"] - - # Copy additional generator configuration data from VS, which is shared - # by the Windows Ninja generator. - import gyp.generator.msvs as msvs_generator - - generator_additional_non_configuration_keys = getattr( - msvs_generator, "generator_additional_non_configuration_keys", [] - ) - generator_additional_path_sections = getattr( - msvs_generator, "generator_additional_path_sections", [] - ) - - gyp.msvs_emulation.CalculateCommonVariables(default_variables, params) - else: - operating_system = flavor - if flavor == "android": - operating_system = "linux" # Keep this legacy behavior for now. - default_variables.setdefault("OS", operating_system) - default_variables.setdefault("SHARED_LIB_SUFFIX", ".so") - default_variables.setdefault( - "SHARED_LIB_DIR", os.path.join("$!PRODUCT_DIR", "lib") - ) - default_variables.setdefault("LIB_DIR", os.path.join("$!PRODUCT_DIR", "obj")) - - -def ComputeOutputDir(params): - """Returns the path from the toplevel_dir to the build output directory.""" - # generator_dir: relative path from pwd to where make puts build files. - # Makes migrating from make to ninja easier, ninja doesn't put anything here. - generator_dir = os.path.relpath(params["options"].generator_output or ".") - - # output_dir: relative path from generator_dir to the build directory. - output_dir = params.get("generator_flags", {}).get("output_dir", "out") - - # Relative path from source root to our output files. e.g. "out" - return os.path.normpath(os.path.join(generator_dir, output_dir)) - - -def CalculateGeneratorInputInfo(params): - """Called by __init__ to initialize generator values based on params.""" - # E.g. "out/gypfiles" - toplevel = params["options"].toplevel_dir - qualified_out_dir = os.path.normpath( - os.path.join(toplevel, ComputeOutputDir(params), "gypfiles") - ) - - global generator_filelist_paths - generator_filelist_paths = { - "toplevel": toplevel, - "qualified_out_dir": qualified_out_dir, - } - - -def OpenOutput(path, mode="w"): - """Open |path| for writing, creating directories if necessary.""" - gyp.common.EnsureDirExists(path) - return open(path, mode) - - -def CommandWithWrapper(cmd, wrappers, prog): - wrapper = wrappers.get(cmd, "") - if wrapper: - return wrapper + " " + prog - return prog - - -def GetDefaultConcurrentLinks(): - """Returns a best-guess for a number of concurrent links.""" - pool_size = int(os.environ.get("GYP_LINK_CONCURRENCY", 0)) - if pool_size: - return pool_size - - if sys.platform in ("win32", "cygwin"): - import ctypes - - class MEMORYSTATUSEX(ctypes.Structure): - _fields_ = [ - ("dwLength", ctypes.c_ulong), - ("dwMemoryLoad", ctypes.c_ulong), - ("ullTotalPhys", ctypes.c_ulonglong), - ("ullAvailPhys", ctypes.c_ulonglong), - ("ullTotalPageFile", ctypes.c_ulonglong), - ("ullAvailPageFile", ctypes.c_ulonglong), - ("ullTotalVirtual", ctypes.c_ulonglong), - ("ullAvailVirtual", ctypes.c_ulonglong), - ("sullAvailExtendedVirtual", ctypes.c_ulonglong), - ] - - stat = MEMORYSTATUSEX() - stat.dwLength = ctypes.sizeof(stat) - ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(stat)) - - # VS 2015 uses 20% more working set than VS 2013 and can consume all RAM - # on a 64 GB machine. - mem_limit = max(1, stat.ullTotalPhys // (5 * (2 ** 30))) # total / 5GB - hard_cap = max(1, int(os.environ.get("GYP_LINK_CONCURRENCY_MAX", 2 ** 32))) - return min(mem_limit, hard_cap) - elif sys.platform.startswith("linux"): - if os.path.exists("/proc/meminfo"): - with open("/proc/meminfo") as meminfo: - memtotal_re = re.compile(r"^MemTotal:\s*(\d*)\s*kB") - for line in meminfo: - match = memtotal_re.match(line) - if not match: - continue - # Allow 8Gb per link on Linux because Gold is quite memory hungry - return max(1, int(match.group(1)) // (8 * (2 ** 20))) - return 1 - elif sys.platform == "darwin": - try: - avail_bytes = int(subprocess.check_output(["sysctl", "-n", "hw.memsize"])) - # A static library debug build of Chromium's unit_tests takes ~2.7GB, so - # 4GB per ld process allows for some more bloat. - return max(1, avail_bytes // (4 * (2 ** 30))) # total / 4GB - except subprocess.CalledProcessError: - return 1 - else: - # TODO(scottmg): Implement this for other platforms. - return 1 - - -def _GetWinLinkRuleNameSuffix(embed_manifest): - """Returns the suffix used to select an appropriate linking rule depending on - whether the manifest embedding is enabled.""" - return "_embed" if embed_manifest else "" - - -def _AddWinLinkRules(master_ninja, embed_manifest): - """Adds link rules for Windows platform to |master_ninja|.""" - - def FullLinkCommand(ldcmd, out, binary_type): - resource_name = {"exe": "1", "dll": "2"}[binary_type] - return ( - "%(python)s gyp-win-tool link-with-manifests $arch %(embed)s " - '%(out)s "%(ldcmd)s" %(resname)s $mt $rc "$intermediatemanifest" ' - "$manifests" - % { - "python": sys.executable, - "out": out, - "ldcmd": ldcmd, - "resname": resource_name, - "embed": embed_manifest, - } - ) - - rule_name_suffix = _GetWinLinkRuleNameSuffix(embed_manifest) - use_separate_mspdbsrv = int(os.environ.get("GYP_USE_SEPARATE_MSPDBSRV", "0")) != 0 - dlldesc = "LINK%s(DLL) $binary" % rule_name_suffix.upper() - dllcmd = ( - "%s gyp-win-tool link-wrapper $arch %s " - "$ld /nologo $implibflag /DLL /OUT:$binary " - "@$binary.rsp" % (sys.executable, use_separate_mspdbsrv) - ) - dllcmd = FullLinkCommand(dllcmd, "$binary", "dll") - master_ninja.rule( - "solink" + rule_name_suffix, - description=dlldesc, - command=dllcmd, - rspfile="$binary.rsp", - rspfile_content="$libs $in_newline $ldflags", - restat=True, - pool="link_pool", - ) - master_ninja.rule( - "solink_module" + rule_name_suffix, - description=dlldesc, - command=dllcmd, - rspfile="$binary.rsp", - rspfile_content="$libs $in_newline $ldflags", - restat=True, - pool="link_pool", - ) - # Note that ldflags goes at the end so that it has the option of - # overriding default settings earlier in the command line. - exe_cmd = ( - "%s gyp-win-tool link-wrapper $arch %s " - "$ld /nologo /OUT:$binary @$binary.rsp" - % (sys.executable, use_separate_mspdbsrv) - ) - exe_cmd = FullLinkCommand(exe_cmd, "$binary", "exe") - master_ninja.rule( - "link" + rule_name_suffix, - description="LINK%s $binary" % rule_name_suffix.upper(), - command=exe_cmd, - rspfile="$binary.rsp", - rspfile_content="$in_newline $libs $ldflags", - pool="link_pool", - ) - - -def GenerateOutputForConfig(target_list, target_dicts, data, params, config_name): - options = params["options"] - flavor = gyp.common.GetFlavor(params) - generator_flags = params.get("generator_flags", {}) - - # build_dir: relative path from source root to our output files. - # e.g. "out/Debug" - build_dir = os.path.normpath(os.path.join(ComputeOutputDir(params), config_name)) - - toplevel_build = os.path.join(options.toplevel_dir, build_dir) - - master_ninja_file = OpenOutput(os.path.join(toplevel_build, "build.ninja")) - master_ninja = ninja_syntax.Writer(master_ninja_file, width=120) - - # Put build-time support tools in out/{config_name}. - gyp.common.CopyTool(flavor, toplevel_build, generator_flags) - - # Grab make settings for CC/CXX. - # The rules are - # - The priority from low to high is gcc/g++, the 'make_global_settings' in - # gyp, the environment variable. - # - If there is no 'make_global_settings' for CC.host/CXX.host or - # 'CC_host'/'CXX_host' environment variable, cc_host/cxx_host should be set - # to cc/cxx. - if flavor == "win": - ar = "lib.exe" - # cc and cxx must be set to the correct architecture by overriding with one - # of cl_x86 or cl_x64 below. - cc = "UNSET" - cxx = "UNSET" - ld = "link.exe" - ld_host = "$ld" - else: - ar = "ar" - cc = "cc" - cxx = "c++" - ld = "$cc" - ldxx = "$cxx" - ld_host = "$cc_host" - ldxx_host = "$cxx_host" - - ar_host = ar - cc_host = None - cxx_host = None - cc_host_global_setting = None - cxx_host_global_setting = None - clang_cl = None - nm = "nm" - nm_host = "nm" - readelf = "readelf" - readelf_host = "readelf" - - build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) - make_global_settings = data[build_file].get("make_global_settings", []) - build_to_root = gyp.common.InvertRelativePath(build_dir, options.toplevel_dir) - wrappers = {} - for key, value in make_global_settings: - if key == "AR": - ar = os.path.join(build_to_root, value) - if key == "AR.host": - ar_host = os.path.join(build_to_root, value) - if key == "CC": - cc = os.path.join(build_to_root, value) - if cc.endswith("clang-cl"): - clang_cl = cc - if key == "CXX": - cxx = os.path.join(build_to_root, value) - if key == "CC.host": - cc_host = os.path.join(build_to_root, value) - cc_host_global_setting = value - if key == "CXX.host": - cxx_host = os.path.join(build_to_root, value) - cxx_host_global_setting = value - if key == "LD": - ld = os.path.join(build_to_root, value) - if key == "LD.host": - ld_host = os.path.join(build_to_root, value) - if key == "LDXX": - ldxx = os.path.join(build_to_root, value) - if key == "LDXX.host": - ldxx_host = os.path.join(build_to_root, value) - if key == "NM": - nm = os.path.join(build_to_root, value) - if key == "NM.host": - nm_host = os.path.join(build_to_root, value) - if key == "READELF": - readelf = os.path.join(build_to_root, value) - if key == "READELF.host": - readelf_host = os.path.join(build_to_root, value) - if key.endswith("_wrapper"): - wrappers[key[: -len("_wrapper")]] = os.path.join(build_to_root, value) - - # Support wrappers from environment variables too. - for key, value in os.environ.items(): - if key.lower().endswith("_wrapper"): - key_prefix = key[: -len("_wrapper")] - key_prefix = re.sub(r"\.HOST$", ".host", key_prefix) - wrappers[key_prefix] = os.path.join(build_to_root, value) - - mac_toolchain_dir = generator_flags.get("mac_toolchain_dir", None) - if mac_toolchain_dir: - wrappers["LINK"] = "export DEVELOPER_DIR='%s' &&" % mac_toolchain_dir - - if flavor == "win": - configs = [ - target_dicts[qualified_target]["configurations"][config_name] - for qualified_target in target_list - ] - shared_system_includes = None - if not generator_flags.get("ninja_use_custom_environment_files", 0): - shared_system_includes = gyp.msvs_emulation.ExtractSharedMSVSSystemIncludes( - configs, generator_flags - ) - cl_paths = gyp.msvs_emulation.GenerateEnvironmentFiles( - toplevel_build, generator_flags, shared_system_includes, OpenOutput - ) - for arch, path in sorted(cl_paths.items()): - if clang_cl: - # If we have selected clang-cl, use that instead. - path = clang_cl - command = CommandWithWrapper( - "CC", wrappers, QuoteShellArgument(path, "win") - ) - if clang_cl: - # Use clang-cl to cross-compile for x86 or x86_64. - command += " -m32" if arch == "x86" else " -m64" - master_ninja.variable("cl_" + arch, command) - - cc = GetEnvironFallback(["CC_target", "CC"], cc) - master_ninja.variable("cc", CommandWithWrapper("CC", wrappers, cc)) - cxx = GetEnvironFallback(["CXX_target", "CXX"], cxx) - master_ninja.variable("cxx", CommandWithWrapper("CXX", wrappers, cxx)) - - if flavor == "win": - master_ninja.variable("ld", ld) - master_ninja.variable("idl", "midl.exe") - master_ninja.variable("ar", ar) - master_ninja.variable("rc", "rc.exe") - master_ninja.variable("ml_x86", "ml.exe") - master_ninja.variable("ml_x64", "ml64.exe") - master_ninja.variable("mt", "mt.exe") - else: - master_ninja.variable("ld", CommandWithWrapper("LINK", wrappers, ld)) - master_ninja.variable("ldxx", CommandWithWrapper("LINK", wrappers, ldxx)) - master_ninja.variable("ar", GetEnvironFallback(["AR_target", "AR"], ar)) - if flavor != "mac": - # Mac does not use readelf/nm for .TOC generation, so avoiding polluting - # the master ninja with extra unused variables. - master_ninja.variable("nm", GetEnvironFallback(["NM_target", "NM"], nm)) - master_ninja.variable( - "readelf", GetEnvironFallback(["READELF_target", "READELF"], readelf) - ) - - if generator_supports_multiple_toolsets: - if not cc_host: - cc_host = cc - if not cxx_host: - cxx_host = cxx - - master_ninja.variable("ar_host", GetEnvironFallback(["AR_host"], ar_host)) - master_ninja.variable("nm_host", GetEnvironFallback(["NM_host"], nm_host)) - master_ninja.variable( - "readelf_host", GetEnvironFallback(["READELF_host"], readelf_host) - ) - cc_host = GetEnvironFallback(["CC_host"], cc_host) - cxx_host = GetEnvironFallback(["CXX_host"], cxx_host) - - # The environment variable could be used in 'make_global_settings', like - # ['CC.host', '$(CC)'] or ['CXX.host', '$(CXX)'], transform them here. - if "$(CC)" in cc_host and cc_host_global_setting: - cc_host = cc_host_global_setting.replace("$(CC)", cc) - if "$(CXX)" in cxx_host and cxx_host_global_setting: - cxx_host = cxx_host_global_setting.replace("$(CXX)", cxx) - master_ninja.variable( - "cc_host", CommandWithWrapper("CC.host", wrappers, cc_host) - ) - master_ninja.variable( - "cxx_host", CommandWithWrapper("CXX.host", wrappers, cxx_host) - ) - if flavor == "win": - master_ninja.variable("ld_host", ld_host) - else: - master_ninja.variable( - "ld_host", CommandWithWrapper("LINK", wrappers, ld_host) - ) - master_ninja.variable( - "ldxx_host", CommandWithWrapper("LINK", wrappers, ldxx_host) - ) - - master_ninja.newline() - - master_ninja.pool("link_pool", depth=GetDefaultConcurrentLinks()) - master_ninja.newline() - - deps = "msvc" if flavor == "win" else "gcc" - - if flavor != "win": - master_ninja.rule( - "cc", - description="CC $out", - command=( - "$cc -MMD -MF $out.d $defines $includes $cflags $cflags_c " - "$cflags_pch_c -c $in -o $out" - ), - depfile="$out.d", - deps=deps, - ) - master_ninja.rule( - "cc_s", - description="CC $out", - command=( - "$cc $defines $includes $cflags $cflags_c " - "$cflags_pch_c -c $in -o $out" - ), - ) - master_ninja.rule( - "cxx", - description="CXX $out", - command=( - "$cxx -MMD -MF $out.d $defines $includes $cflags $cflags_cc " - "$cflags_pch_cc -c $in -o $out" - ), - depfile="$out.d", - deps=deps, - ) - else: - # TODO(scottmg) Separate pdb names is a test to see if it works around - # http://crbug.com/142362. It seems there's a race between the creation of - # the .pdb by the precompiled header step for .cc and the compilation of - # .c files. This should be handled by mspdbsrv, but rarely errors out with - # c1xx : fatal error C1033: cannot open program database - # By making the rules target separate pdb files this might be avoided. - cc_command = ( - "ninja -t msvc -e $arch " + "-- " - "$cc /nologo /showIncludes /FC " - "@$out.rsp /c $in /Fo$out /Fd$pdbname_c " - ) - cxx_command = ( - "ninja -t msvc -e $arch " + "-- " - "$cxx /nologo /showIncludes /FC " - "@$out.rsp /c $in /Fo$out /Fd$pdbname_cc " - ) - master_ninja.rule( - "cc", - description="CC $out", - command=cc_command, - rspfile="$out.rsp", - rspfile_content="$defines $includes $cflags $cflags_c", - deps=deps, - ) - master_ninja.rule( - "cxx", - description="CXX $out", - command=cxx_command, - rspfile="$out.rsp", - rspfile_content="$defines $includes $cflags $cflags_cc", - deps=deps, - ) - master_ninja.rule( - "idl", - description="IDL $in", - command=( - "%s gyp-win-tool midl-wrapper $arch $outdir " - "$tlb $h $dlldata $iid $proxy $in " - "$midl_includes $idlflags" % sys.executable - ), - ) - master_ninja.rule( - "rc", - description="RC $in", - # Note: $in must be last otherwise rc.exe complains. - command=( - "%s gyp-win-tool rc-wrapper " - "$arch $rc $defines $resource_includes $rcflags /fo$out $in" - % sys.executable - ), - ) - master_ninja.rule( - "asm", - description="ASM $out", - command=( - "%s gyp-win-tool asm-wrapper " - "$arch $asm $defines $includes $asmflags /c /Fo $out $in" - % sys.executable - ), - ) - - if flavor != "mac" and flavor != "win": - master_ninja.rule( - "alink", - description="AR $out", - command="rm -f $out && $ar rcs $arflags $out $in", - ) - master_ninja.rule( - "alink_thin", - description="AR $out", - command="rm -f $out && $ar rcsT $arflags $out $in", - ) - - # This allows targets that only need to depend on $lib's API to declare an - # order-only dependency on $lib.TOC and avoid relinking such downstream - # dependencies when $lib changes only in non-public ways. - # The resulting string leaves an uninterpolated %{suffix} which - # is used in the final substitution below. - mtime_preserving_solink_base = ( - "if [ ! -e $lib -o ! -e $lib.TOC ]; then " - "%(solink)s && %(extract_toc)s > $lib.TOC; else " - "%(solink)s && %(extract_toc)s > $lib.tmp && " - "if ! cmp -s $lib.tmp $lib.TOC; then mv $lib.tmp $lib.TOC ; " - "fi; fi" - % { - "solink": "$ld -shared $ldflags -o $lib -Wl,-soname=$soname %(suffix)s", - "extract_toc": ( - "{ $readelf -d $lib | grep SONAME ; " - "$nm -gD -f p $lib | cut -f1-2 -d' '; }" - ), - } - ) - - master_ninja.rule( - "solink", - description="SOLINK $lib", - restat=True, - command=mtime_preserving_solink_base - % {"suffix": "@$link_file_list"}, # noqa: E501 - rspfile="$link_file_list", - rspfile_content=( - "-Wl,--whole-archive $in $solibs -Wl," "--no-whole-archive $libs" - ), - pool="link_pool", - ) - master_ninja.rule( - "solink_module", - description="SOLINK(module) $lib", - restat=True, - command=mtime_preserving_solink_base % {"suffix": "@$link_file_list"}, - rspfile="$link_file_list", - rspfile_content="-Wl,--start-group $in $solibs $libs -Wl,--end-group", - pool="link_pool", - ) - master_ninja.rule( - "link", - description="LINK $out", - command=( - "$ld $ldflags -o $out " - "-Wl,--start-group $in $solibs $libs -Wl,--end-group" - ), - pool="link_pool", - ) - elif flavor == "win": - master_ninja.rule( - "alink", - description="LIB $out", - command=( - "%s gyp-win-tool link-wrapper $arch False " - "$ar /nologo /ignore:4221 /OUT:$out @$out.rsp" % sys.executable - ), - rspfile="$out.rsp", - rspfile_content="$in_newline $libflags", - ) - _AddWinLinkRules(master_ninja, embed_manifest=True) - _AddWinLinkRules(master_ninja, embed_manifest=False) - else: - master_ninja.rule( - "objc", - description="OBJC $out", - command=( - "$cc -MMD -MF $out.d $defines $includes $cflags $cflags_objc " - "$cflags_pch_objc -c $in -o $out" - ), - depfile="$out.d", - deps=deps, - ) - master_ninja.rule( - "objcxx", - description="OBJCXX $out", - command=( - "$cxx -MMD -MF $out.d $defines $includes $cflags $cflags_objcc " - "$cflags_pch_objcc -c $in -o $out" - ), - depfile="$out.d", - deps=deps, - ) - master_ninja.rule( - "alink", - description="LIBTOOL-STATIC $out, POSTBUILDS", - command="rm -f $out && " - "./gyp-mac-tool filter-libtool libtool $libtool_flags " - "-static -o $out $in" - "$postbuilds", - ) - master_ninja.rule( - "lipo", - description="LIPO $out, POSTBUILDS", - command="rm -f $out && lipo -create $in -output $out$postbuilds", - ) - master_ninja.rule( - "solipo", - description="SOLIPO $out, POSTBUILDS", - command=( - "rm -f $lib $lib.TOC && lipo -create $in -output $lib$postbuilds &&" - "%(extract_toc)s > $lib.TOC" - % { - "extract_toc": "{ otool -l $lib | grep LC_ID_DYLIB -A 5; " - "nm -gP $lib | cut -f1-2 -d' ' | grep -v U$$; true; }" - } - ), - ) - - # Record the public interface of $lib in $lib.TOC. See the corresponding - # comment in the posix section above for details. - solink_base = "$ld %(type)s $ldflags -o $lib %(suffix)s" - mtime_preserving_solink_base = ( - "if [ ! -e $lib -o ! -e $lib.TOC ] || " - # Always force dependent targets to relink if this library - # reexports something. Handling this correctly would require - # recursive TOC dumping but this is rare in practice, so punt. - "otool -l $lib | grep -q LC_REEXPORT_DYLIB ; then " - "%(solink)s && %(extract_toc)s > $lib.TOC; " - "else " - "%(solink)s && %(extract_toc)s > $lib.tmp && " - "if ! cmp -s $lib.tmp $lib.TOC; then " - "mv $lib.tmp $lib.TOC ; " - "fi; " - "fi" - % { - "solink": solink_base, - "extract_toc": "{ otool -l $lib | grep LC_ID_DYLIB -A 5; " - "nm -gP $lib | cut -f1-2 -d' ' | grep -v U$$; true; }", - } - ) - - solink_suffix = "@$link_file_list$postbuilds" - master_ninja.rule( - "solink", - description="SOLINK $lib, POSTBUILDS", - restat=True, - command=mtime_preserving_solink_base - % {"suffix": solink_suffix, "type": "-shared"}, - rspfile="$link_file_list", - rspfile_content="$in $solibs $libs", - pool="link_pool", - ) - master_ninja.rule( - "solink_notoc", - description="SOLINK $lib, POSTBUILDS", - restat=True, - command=solink_base % {"suffix": solink_suffix, "type": "-shared"}, - rspfile="$link_file_list", - rspfile_content="$in $solibs $libs", - pool="link_pool", - ) - - master_ninja.rule( - "solink_module", - description="SOLINK(module) $lib, POSTBUILDS", - restat=True, - command=mtime_preserving_solink_base - % {"suffix": solink_suffix, "type": "-bundle"}, - rspfile="$link_file_list", - rspfile_content="$in $solibs $libs", - pool="link_pool", - ) - master_ninja.rule( - "solink_module_notoc", - description="SOLINK(module) $lib, POSTBUILDS", - restat=True, - command=solink_base % {"suffix": solink_suffix, "type": "-bundle"}, - rspfile="$link_file_list", - rspfile_content="$in $solibs $libs", - pool="link_pool", - ) - - master_ninja.rule( - "link", - description="LINK $out, POSTBUILDS", - command=("$ld $ldflags -o $out " "$in $solibs $libs$postbuilds"), - pool="link_pool", - ) - master_ninja.rule( - "preprocess_infoplist", - description="PREPROCESS INFOPLIST $out", - command=( - "$cc -E -P -Wno-trigraphs -x c $defines $in -o $out && " - "plutil -convert xml1 $out $out" - ), - ) - master_ninja.rule( - "copy_infoplist", - description="COPY INFOPLIST $in", - command="$env ./gyp-mac-tool copy-info-plist $in $out $binary $keys", - ) - master_ninja.rule( - "merge_infoplist", - description="MERGE INFOPLISTS $in", - command="$env ./gyp-mac-tool merge-info-plist $out $in", - ) - master_ninja.rule( - "compile_xcassets", - description="COMPILE XCASSETS $in", - command="$env ./gyp-mac-tool compile-xcassets $keys $in", - ) - master_ninja.rule( - "compile_ios_framework_headers", - description="COMPILE HEADER MAPS AND COPY FRAMEWORK HEADERS $in", - command="$env ./gyp-mac-tool compile-ios-framework-header-map $out " - "$framework $in && $env ./gyp-mac-tool " - "copy-ios-framework-headers $framework $copy_headers", - ) - master_ninja.rule( - "mac_tool", - description="MACTOOL $mactool_cmd $in", - command="$env ./gyp-mac-tool $mactool_cmd $in $out $binary", - ) - master_ninja.rule( - "package_framework", - description="PACKAGE FRAMEWORK $out, POSTBUILDS", - command="./gyp-mac-tool package-framework $out $version$postbuilds " - "&& touch $out", - ) - master_ninja.rule( - "package_ios_framework", - description="PACKAGE IOS FRAMEWORK $out, POSTBUILDS", - command="./gyp-mac-tool package-ios-framework $out $postbuilds " - "&& touch $out", - ) - if flavor == "win": - master_ninja.rule( - "stamp", - description="STAMP $out", - command="%s gyp-win-tool stamp $out" % sys.executable, - ) - else: - master_ninja.rule( - "stamp", description="STAMP $out", command="${postbuilds}touch $out" - ) - if flavor == "win": - master_ninja.rule( - "copy", - description="COPY $in $out", - command="%s gyp-win-tool recursive-mirror $in $out" % sys.executable, - ) - elif flavor == "zos": - master_ninja.rule( - "copy", - description="COPY $in $out", - command="rm -rf $out && cp -fRP $in $out", - ) - else: - master_ninja.rule( - "copy", - description="COPY $in $out", - command="ln -f $in $out 2>/dev/null || (rm -rf $out && cp -af $in $out)", - ) - master_ninja.newline() - - all_targets = set() - for build_file in params["build_files"]: - for target in gyp.common.AllTargets( - target_list, target_dicts, os.path.normpath(build_file) - ): - all_targets.add(target) - all_outputs = set() - - # target_outputs is a map from qualified target name to a Target object. - target_outputs = {} - # target_short_names is a map from target short name to a list of Target - # objects. - target_short_names = {} - - # short name of targets that were skipped because they didn't contain anything - # interesting. - # NOTE: there may be overlap between this an non_empty_target_names. - empty_target_names = set() - - # Set of non-empty short target names. - # NOTE: there may be overlap between this an empty_target_names. - non_empty_target_names = set() - - for qualified_target in target_list: - # qualified_target is like: third_party/icu/icu.gyp:icui18n#target - build_file, name, toolset = gyp.common.ParseQualifiedTarget(qualified_target) - - this_make_global_settings = data[build_file].get("make_global_settings", []) - assert make_global_settings == this_make_global_settings, ( - "make_global_settings needs to be the same for all targets. " - f"{this_make_global_settings} vs. {make_global_settings}" - ) - - spec = target_dicts[qualified_target] - if flavor == "mac": - gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec) - - # If build_file is a symlink, we must not follow it because there's a chance - # it could point to a path above toplevel_dir, and we cannot correctly deal - # with that case at the moment. - build_file = gyp.common.RelativePath(build_file, options.toplevel_dir, False) - - qualified_target_for_hash = gyp.common.QualifiedTarget( - build_file, name, toolset - ) - qualified_target_for_hash = qualified_target_for_hash.encode("utf-8") - hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest() - - base_path = os.path.dirname(build_file) - obj = "obj" - if toolset != "target": - obj += "." + toolset - output_file = os.path.join(obj, base_path, name + ".ninja") - - ninja_output = StringIO() - writer = NinjaWriter( - hash_for_rules, - target_outputs, - base_path, - build_dir, - ninja_output, - toplevel_build, - output_file, - flavor, - toplevel_dir=options.toplevel_dir, - ) - - target = writer.WriteSpec(spec, config_name, generator_flags) - - if ninja_output.tell() > 0: - # Only create files for ninja files that actually have contents. - with OpenOutput(os.path.join(toplevel_build, output_file)) as ninja_file: - ninja_file.write(ninja_output.getvalue()) - ninja_output.close() - master_ninja.subninja(output_file) - - if target: - if name != target.FinalOutput() and spec["toolset"] == "target": - target_short_names.setdefault(name, []).append(target) - target_outputs[qualified_target] = target - if qualified_target in all_targets: - all_outputs.add(target.FinalOutput()) - non_empty_target_names.add(name) - else: - empty_target_names.add(name) - - if target_short_names: - # Write a short name to build this target. This benefits both the - # "build chrome" case as well as the gyp tests, which expect to be - # able to run actions and build libraries by their short name. - master_ninja.newline() - master_ninja.comment("Short names for targets.") - for short_name in sorted(target_short_names): - master_ninja.build( - short_name, - "phony", - [x.FinalOutput() for x in target_short_names[short_name]], - ) - - # Write phony targets for any empty targets that weren't written yet. As - # short names are not necessarily unique only do this for short names that - # haven't already been output for another target. - empty_target_names = empty_target_names - non_empty_target_names - if empty_target_names: - master_ninja.newline() - master_ninja.comment("Empty targets (output for completeness).") - for name in sorted(empty_target_names): - master_ninja.build(name, "phony") - - if all_outputs: - master_ninja.newline() - master_ninja.build("all", "phony", sorted(all_outputs)) - master_ninja.default(generator_flags.get("default_target", "all")) - - master_ninja_file.close() - - -def PerformBuild(data, configurations, params): - options = params["options"] - for config in configurations: - builddir = os.path.join(options.toplevel_dir, "out", config) - arguments = ["ninja", "-C", builddir] - print(f"Building [{config}]: {arguments}") - subprocess.check_call(arguments) - - -def CallGenerateOutputForConfig(arglist): - # Ignore the interrupt signal so that the parent process catches it and - # kills all multiprocessing children. - signal.signal(signal.SIGINT, signal.SIG_IGN) - - (target_list, target_dicts, data, params, config_name) = arglist - GenerateOutputForConfig(target_list, target_dicts, data, params, config_name) - - -def GenerateOutput(target_list, target_dicts, data, params): - # Update target_dicts for iOS device builds. - target_dicts = gyp.xcode_emulation.CloneConfigurationForDeviceAndEmulator( - target_dicts - ) - - user_config = params.get("generator_flags", {}).get("config", None) - if gyp.common.GetFlavor(params) == "win": - target_list, target_dicts = MSVSUtil.ShardTargets(target_list, target_dicts) - target_list, target_dicts = MSVSUtil.InsertLargePdbShims( - target_list, target_dicts, generator_default_variables - ) - - if user_config: - GenerateOutputForConfig(target_list, target_dicts, data, params, user_config) - else: - config_names = target_dicts[target_list[0]]["configurations"] - if params["parallel"]: - try: - pool = multiprocessing.Pool(len(config_names)) - arglists = [] - for config_name in config_names: - arglists.append( - (target_list, target_dicts, data, params, config_name) - ) - pool.map(CallGenerateOutputForConfig, arglists) - except KeyboardInterrupt as e: - pool.terminate() - raise e - else: - for config_name in config_names: - GenerateOutputForConfig( - target_list, target_dicts, data, params, config_name - ) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py deleted file mode 100644 index 7d18068..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" Unit tests for the ninja.py file. """ - -import sys -import unittest - -import gyp.generator.ninja as ninja - - -class TestPrefixesAndSuffixes(unittest.TestCase): - def test_BinaryNamesWindows(self): - # These cannot run on non-Windows as they require a VS installation to - # correctly handle variable expansion. - if sys.platform.startswith("win"): - writer = ninja.NinjaWriter( - "foo", "wee", ".", ".", "build.ninja", ".", "build.ninja", "win" - ) - spec = {"target_name": "wee"} - self.assertTrue( - writer.ComputeOutputFileName(spec, "executable").endswith(".exe") - ) - self.assertTrue( - writer.ComputeOutputFileName(spec, "shared_library").endswith(".dll") - ) - self.assertTrue( - writer.ComputeOutputFileName(spec, "static_library").endswith(".lib") - ) - - def test_BinaryNamesLinux(self): - writer = ninja.NinjaWriter( - "foo", "wee", ".", ".", "build.ninja", ".", "build.ninja", "linux" - ) - spec = {"target_name": "wee"} - self.assertTrue("." not in writer.ComputeOutputFileName(spec, "executable")) - self.assertTrue( - writer.ComputeOutputFileName(spec, "shared_library").startswith("lib") - ) - self.assertTrue( - writer.ComputeOutputFileName(spec, "static_library").startswith("lib") - ) - self.assertTrue( - writer.ComputeOutputFileName(spec, "shared_library").endswith(".so") - ) - self.assertTrue( - writer.ComputeOutputFileName(spec, "static_library").endswith(".a") - ) - - -if __name__ == "__main__": - unittest.main() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py deleted file mode 100644 index 2f4d17e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +++ /dev/null @@ -1,1394 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -import filecmp -import gyp.common -import gyp.xcodeproj_file -import gyp.xcode_ninja -import errno -import os -import sys -import posixpath -import re -import shutil -import subprocess -import tempfile - - -# Project files generated by this module will use _intermediate_var as a -# custom Xcode setting whose value is a DerivedSources-like directory that's -# project-specific and configuration-specific. The normal choice, -# DERIVED_FILE_DIR, is target-specific, which is thought to be too restrictive -# as it is likely that multiple targets within a single project file will want -# to access the same set of generated files. The other option, -# PROJECT_DERIVED_FILE_DIR, is unsuitable because while it is project-specific, -# it is not configuration-specific. INTERMEDIATE_DIR is defined as -# $(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION). -_intermediate_var = "INTERMEDIATE_DIR" - -# SHARED_INTERMEDIATE_DIR is the same, except that it is shared among all -# targets that share the same BUILT_PRODUCTS_DIR. -_shared_intermediate_var = "SHARED_INTERMEDIATE_DIR" - -_library_search_paths_var = "LIBRARY_SEARCH_PATHS" - -generator_default_variables = { - "EXECUTABLE_PREFIX": "", - "EXECUTABLE_SUFFIX": "", - "STATIC_LIB_PREFIX": "lib", - "SHARED_LIB_PREFIX": "lib", - "STATIC_LIB_SUFFIX": ".a", - "SHARED_LIB_SUFFIX": ".dylib", - # INTERMEDIATE_DIR is a place for targets to build up intermediate products. - # It is specific to each build environment. It is only guaranteed to exist - # and be constant within the context of a project, corresponding to a single - # input file. Some build environments may allow their intermediate directory - # to be shared on a wider scale, but this is not guaranteed. - "INTERMEDIATE_DIR": "$(%s)" % _intermediate_var, - "OS": "mac", - "PRODUCT_DIR": "$(BUILT_PRODUCTS_DIR)", - "LIB_DIR": "$(BUILT_PRODUCTS_DIR)", - "RULE_INPUT_ROOT": "$(INPUT_FILE_BASE)", - "RULE_INPUT_EXT": "$(INPUT_FILE_SUFFIX)", - "RULE_INPUT_NAME": "$(INPUT_FILE_NAME)", - "RULE_INPUT_PATH": "$(INPUT_FILE_PATH)", - "RULE_INPUT_DIRNAME": "$(INPUT_FILE_DIRNAME)", - "SHARED_INTERMEDIATE_DIR": "$(%s)" % _shared_intermediate_var, - "CONFIGURATION_NAME": "$(CONFIGURATION)", -} - -# The Xcode-specific sections that hold paths. -generator_additional_path_sections = [ - "mac_bundle_resources", - "mac_framework_headers", - "mac_framework_private_headers", - # 'mac_framework_dirs', input already handles _dirs endings. -] - -# The Xcode-specific keys that exist on targets and aren't moved down to -# configurations. -generator_additional_non_configuration_keys = [ - "ios_app_extension", - "ios_watch_app", - "ios_watchkit_extension", - "mac_bundle", - "mac_bundle_resources", - "mac_framework_headers", - "mac_framework_private_headers", - "mac_xctest_bundle", - "mac_xcuitest_bundle", - "xcode_create_dependents_test_runner", -] - -# We want to let any rules apply to files that are resources also. -generator_extra_sources_for_rules = [ - "mac_bundle_resources", - "mac_framework_headers", - "mac_framework_private_headers", -] - -generator_filelist_paths = None - -# Xcode's standard set of library directories, which don't need to be duplicated -# in LIBRARY_SEARCH_PATHS. This list is not exhaustive, but that's okay. -xcode_standard_library_dirs = frozenset( - ["$(SDKROOT)/usr/lib", "$(SDKROOT)/usr/local/lib"] -) - - -def CreateXCConfigurationList(configuration_names): - xccl = gyp.xcodeproj_file.XCConfigurationList({"buildConfigurations": []}) - if len(configuration_names) == 0: - configuration_names = ["Default"] - for configuration_name in configuration_names: - xcbc = gyp.xcodeproj_file.XCBuildConfiguration({"name": configuration_name}) - xccl.AppendProperty("buildConfigurations", xcbc) - xccl.SetProperty("defaultConfigurationName", configuration_names[0]) - return xccl - - -class XcodeProject: - def __init__(self, gyp_path, path, build_file_dict): - self.gyp_path = gyp_path - self.path = path - self.project = gyp.xcodeproj_file.PBXProject(path=path) - projectDirPath = gyp.common.RelativePath( - os.path.dirname(os.path.abspath(self.gyp_path)), - os.path.dirname(path) or ".", - ) - self.project.SetProperty("projectDirPath", projectDirPath) - self.project_file = gyp.xcodeproj_file.XCProjectFile( - {"rootObject": self.project} - ) - self.build_file_dict = build_file_dict - - # TODO(mark): add destructor that cleans up self.path if created_dir is - # True and things didn't complete successfully. Or do something even - # better with "try"? - self.created_dir = False - try: - os.makedirs(self.path) - self.created_dir = True - except OSError as e: - if e.errno != errno.EEXIST: - raise - - def Finalize1(self, xcode_targets, serialize_all_tests): - # Collect a list of all of the build configuration names used by the - # various targets in the file. It is very heavily advised to keep each - # target in an entire project (even across multiple project files) using - # the same set of configuration names. - configurations = [] - for xct in self.project.GetProperty("targets"): - xccl = xct.GetProperty("buildConfigurationList") - xcbcs = xccl.GetProperty("buildConfigurations") - for xcbc in xcbcs: - name = xcbc.GetProperty("name") - if name not in configurations: - configurations.append(name) - - # Replace the XCConfigurationList attached to the PBXProject object with - # a new one specifying all of the configuration names used by the various - # targets. - try: - xccl = CreateXCConfigurationList(configurations) - self.project.SetProperty("buildConfigurationList", xccl) - except Exception: - sys.stderr.write("Problem with gyp file %s\n" % self.gyp_path) - raise - - # The need for this setting is explained above where _intermediate_var is - # defined. The comments below about wanting to avoid project-wide build - # settings apply here too, but this needs to be set on a project-wide basis - # so that files relative to the _intermediate_var setting can be displayed - # properly in the Xcode UI. - # - # Note that for configuration-relative files such as anything relative to - # _intermediate_var, for the purposes of UI tree view display, Xcode will - # only resolve the configuration name once, when the project file is - # opened. If the active build configuration is changed, the project file - # must be closed and reopened if it is desired for the tree view to update. - # This is filed as Apple radar 6588391. - xccl.SetBuildSetting( - _intermediate_var, "$(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION)" - ) - xccl.SetBuildSetting( - _shared_intermediate_var, "$(SYMROOT)/DerivedSources/$(CONFIGURATION)" - ) - - # Set user-specified project-wide build settings and config files. This - # is intended to be used very sparingly. Really, almost everything should - # go into target-specific build settings sections. The project-wide - # settings are only intended to be used in cases where Xcode attempts to - # resolve variable references in a project context as opposed to a target - # context, such as when resolving sourceTree references while building up - # the tree tree view for UI display. - # Any values set globally are applied to all configurations, then any - # per-configuration values are applied. - for xck, xcv in self.build_file_dict.get("xcode_settings", {}).items(): - xccl.SetBuildSetting(xck, xcv) - if "xcode_config_file" in self.build_file_dict: - config_ref = self.project.AddOrGetFileInRootGroup( - self.build_file_dict["xcode_config_file"] - ) - xccl.SetBaseConfiguration(config_ref) - build_file_configurations = self.build_file_dict.get("configurations", {}) - if build_file_configurations: - for config_name in configurations: - build_file_configuration_named = build_file_configurations.get( - config_name, {} - ) - if build_file_configuration_named: - xcc = xccl.ConfigurationNamed(config_name) - for xck, xcv in build_file_configuration_named.get( - "xcode_settings", {} - ).items(): - xcc.SetBuildSetting(xck, xcv) - if "xcode_config_file" in build_file_configuration_named: - config_ref = self.project.AddOrGetFileInRootGroup( - build_file_configurations[config_name]["xcode_config_file"] - ) - xcc.SetBaseConfiguration(config_ref) - - # Sort the targets based on how they appeared in the input. - # TODO(mark): Like a lot of other things here, this assumes internal - # knowledge of PBXProject - in this case, of its "targets" property. - - # ordinary_targets are ordinary targets that are already in the project - # file. run_test_targets are the targets that run unittests and should be - # used for the Run All Tests target. support_targets are the action/rule - # targets used by GYP file targets, just kept for the assert check. - ordinary_targets = [] - run_test_targets = [] - support_targets = [] - - # targets is full list of targets in the project. - targets = [] - - # does the it define it's own "all"? - has_custom_all = False - - # targets_for_all is the list of ordinary_targets that should be listed - # in this project's "All" target. It includes each non_runtest_target - # that does not have suppress_wildcard set. - targets_for_all = [] - - for target in self.build_file_dict["targets"]: - target_name = target["target_name"] - toolset = target["toolset"] - qualified_target = gyp.common.QualifiedTarget( - self.gyp_path, target_name, toolset - ) - xcode_target = xcode_targets[qualified_target] - # Make sure that the target being added to the sorted list is already in - # the unsorted list. - assert xcode_target in self.project._properties["targets"] - targets.append(xcode_target) - ordinary_targets.append(xcode_target) - if xcode_target.support_target: - support_targets.append(xcode_target.support_target) - targets.append(xcode_target.support_target) - - if not int(target.get("suppress_wildcard", False)): - targets_for_all.append(xcode_target) - - if target_name.lower() == "all": - has_custom_all = True - - # If this target has a 'run_as' attribute, add its target to the - # targets, and add it to the test targets. - if target.get("run_as"): - # Make a target to run something. It should have one - # dependency, the parent xcode target. - xccl = CreateXCConfigurationList(configurations) - run_target = gyp.xcodeproj_file.PBXAggregateTarget( - { - "name": "Run " + target_name, - "productName": xcode_target.GetProperty("productName"), - "buildConfigurationList": xccl, - }, - parent=self.project, - ) - run_target.AddDependency(xcode_target) - - command = target["run_as"] - script = "" - if command.get("working_directory"): - script = ( - script - + 'cd "%s"\n' - % gyp.xcodeproj_file.ConvertVariablesToShellSyntax( - command.get("working_directory") - ) - ) - - if command.get("environment"): - script = ( - script - + "\n".join( - [ - 'export %s="%s"' - % ( - key, - gyp.xcodeproj_file.ConvertVariablesToShellSyntax( - val - ), - ) - for (key, val) in command.get("environment").items() - ] - ) - + "\n" - ) - - # Some test end up using sockets, files on disk, etc. and can get - # confused if more then one test runs at a time. The generator - # flag 'xcode_serialize_all_test_runs' controls the forcing of all - # tests serially. It defaults to True. To get serial runs this - # little bit of python does the same as the linux flock utility to - # make sure only one runs at a time. - command_prefix = "" - if serialize_all_tests: - command_prefix = """python -c "import fcntl, subprocess, sys -file = open('$TMPDIR/GYP_serialize_test_runs', 'a') -fcntl.flock(file.fileno(), fcntl.LOCK_EX) -sys.exit(subprocess.call(sys.argv[1:]))" """ - - # If we were unable to exec for some reason, we want to exit - # with an error, and fixup variable references to be shell - # syntax instead of xcode syntax. - script = ( - script - + "exec " - + command_prefix - + "%s\nexit 1\n" - % gyp.xcodeproj_file.ConvertVariablesToShellSyntax( - gyp.common.EncodePOSIXShellList(command.get("action")) - ) - ) - - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase( - {"shellScript": script, "showEnvVarsInLog": 0} - ) - run_target.AppendProperty("buildPhases", ssbp) - - # Add the run target to the project file. - targets.append(run_target) - run_test_targets.append(run_target) - xcode_target.test_runner = run_target - - # Make sure that the list of targets being replaced is the same length as - # the one replacing it, but allow for the added test runner targets. - assert len(self.project._properties["targets"]) == len(ordinary_targets) + len( - support_targets - ) - - self.project._properties["targets"] = targets - - # Get rid of unnecessary levels of depth in groups like the Source group. - self.project.RootGroupsTakeOverOnlyChildren(True) - - # Sort the groups nicely. Do this after sorting the targets, because the - # Products group is sorted based on the order of the targets. - self.project.SortGroups() - - # Create an "All" target if there's more than one target in this project - # file and the project didn't define its own "All" target. Put a generated - # "All" target first so that people opening up the project for the first - # time will build everything by default. - if len(targets_for_all) > 1 and not has_custom_all: - xccl = CreateXCConfigurationList(configurations) - all_target = gyp.xcodeproj_file.PBXAggregateTarget( - {"buildConfigurationList": xccl, "name": "All"}, parent=self.project - ) - - for target in targets_for_all: - all_target.AddDependency(target) - - # TODO(mark): This is evil because it relies on internal knowledge of - # PBXProject._properties. It's important to get the "All" target first, - # though. - self.project._properties["targets"].insert(0, all_target) - - # The same, but for run_test_targets. - if len(run_test_targets) > 1: - xccl = CreateXCConfigurationList(configurations) - run_all_tests_target = gyp.xcodeproj_file.PBXAggregateTarget( - {"buildConfigurationList": xccl, "name": "Run All Tests"}, - parent=self.project, - ) - for run_test_target in run_test_targets: - run_all_tests_target.AddDependency(run_test_target) - - # Insert after the "All" target, which must exist if there is more than - # one run_test_target. - self.project._properties["targets"].insert(1, run_all_tests_target) - - def Finalize2(self, xcode_targets, xcode_target_to_target_dict): - # Finalize2 needs to happen in a separate step because the process of - # updating references to other projects depends on the ordering of targets - # within remote project files. Finalize1 is responsible for sorting duty, - # and once all project files are sorted, Finalize2 can come in and update - # these references. - - # To support making a "test runner" target that will run all the tests - # that are direct dependents of any given target, we look for - # xcode_create_dependents_test_runner being set on an Aggregate target, - # and generate a second target that will run the tests runners found under - # the marked target. - for bf_tgt in self.build_file_dict["targets"]: - if int(bf_tgt.get("xcode_create_dependents_test_runner", 0)): - tgt_name = bf_tgt["target_name"] - toolset = bf_tgt["toolset"] - qualified_target = gyp.common.QualifiedTarget( - self.gyp_path, tgt_name, toolset - ) - xcode_target = xcode_targets[qualified_target] - if isinstance(xcode_target, gyp.xcodeproj_file.PBXAggregateTarget): - # Collect all the run test targets. - all_run_tests = [] - pbxtds = xcode_target.GetProperty("dependencies") - for pbxtd in pbxtds: - pbxcip = pbxtd.GetProperty("targetProxy") - dependency_xct = pbxcip.GetProperty("remoteGlobalIDString") - if hasattr(dependency_xct, "test_runner"): - all_run_tests.append(dependency_xct.test_runner) - - # Directly depend on all the runners as they depend on the target - # that builds them. - if len(all_run_tests) > 0: - run_all_target = gyp.xcodeproj_file.PBXAggregateTarget( - { - "name": "Run %s Tests" % tgt_name, - "productName": tgt_name, - }, - parent=self.project, - ) - for run_test_target in all_run_tests: - run_all_target.AddDependency(run_test_target) - - # Insert the test runner after the related target. - idx = self.project._properties["targets"].index(xcode_target) - self.project._properties["targets"].insert( - idx + 1, run_all_target - ) - - # Update all references to other projects, to make sure that the lists of - # remote products are complete. Otherwise, Xcode will fill them in when - # it opens the project file, which will result in unnecessary diffs. - # TODO(mark): This is evil because it relies on internal knowledge of - # PBXProject._other_pbxprojects. - for other_pbxproject in self.project._other_pbxprojects.keys(): - self.project.AddOrGetProjectReference(other_pbxproject) - - self.project.SortRemoteProductReferences() - - # Give everything an ID. - self.project_file.ComputeIDs() - - # Make sure that no two objects in the project file have the same ID. If - # multiple objects wind up with the same ID, upon loading the file, Xcode - # will only recognize one object (the last one in the file?) and the - # results are unpredictable. - self.project_file.EnsureNoIDCollisions() - - def Write(self): - # Write the project file to a temporary location first. Xcode watches for - # changes to the project file and presents a UI sheet offering to reload - # the project when it does change. However, in some cases, especially when - # multiple projects are open or when Xcode is busy, things don't work so - # seamlessly. Sometimes, Xcode is able to detect that a project file has - # changed but can't unload it because something else is referencing it. - # To mitigate this problem, and to avoid even having Xcode present the UI - # sheet when an open project is rewritten for inconsequential changes, the - # project file is written to a temporary file in the xcodeproj directory - # first. The new temporary file is then compared to the existing project - # file, if any. If they differ, the new file replaces the old; otherwise, - # the new project file is simply deleted. Xcode properly detects a file - # being renamed over an open project file as a change and so it remains - # able to present the "project file changed" sheet under this system. - # Writing to a temporary file first also avoids the possible problem of - # Xcode rereading an incomplete project file. - (output_fd, new_pbxproj_path) = tempfile.mkstemp( - suffix=".tmp", prefix="project.pbxproj.gyp.", dir=self.path - ) - - try: - output_file = os.fdopen(output_fd, "w") - - self.project_file.Print(output_file) - output_file.close() - - pbxproj_path = os.path.join(self.path, "project.pbxproj") - - same = False - try: - same = filecmp.cmp(pbxproj_path, new_pbxproj_path, False) - except OSError as e: - if e.errno != errno.ENOENT: - raise - - if same: - # The new file is identical to the old one, just get rid of the new - # one. - os.unlink(new_pbxproj_path) - else: - # The new file is different from the old one, or there is no old one. - # Rename the new file to the permanent name. - # - # tempfile.mkstemp uses an overly restrictive mode, resulting in a - # file that can only be read by the owner, regardless of the umask. - # There's no reason to not respect the umask here, which means that - # an extra hoop is required to fetch it and reset the new file's mode. - # - # No way to get the umask without setting a new one? Set a safe one - # and then set it back to the old value. - umask = os.umask(0o77) - os.umask(umask) - - os.chmod(new_pbxproj_path, 0o666 & ~umask) - os.rename(new_pbxproj_path, pbxproj_path) - - except Exception: - # Don't leave turds behind. In fact, if this code was responsible for - # creating the xcodeproj directory, get rid of that too. - os.unlink(new_pbxproj_path) - if self.created_dir: - shutil.rmtree(self.path, True) - raise - - -def AddSourceToTarget(source, type, pbxp, xct): - # TODO(mark): Perhaps source_extensions and library_extensions can be made a - # little bit fancier. - source_extensions = ["c", "cc", "cpp", "cxx", "m", "mm", "s", "swift"] - - # .o is conceptually more of a "source" than a "library," but Xcode thinks - # of "sources" as things to compile and "libraries" (or "frameworks") as - # things to link with. Adding an object file to an Xcode target's frameworks - # phase works properly. - library_extensions = ["a", "dylib", "framework", "o"] - - basename = posixpath.basename(source) - (root, ext) = posixpath.splitext(basename) - if ext: - ext = ext[1:].lower() - - if ext in source_extensions and type != "none": - xct.SourcesPhase().AddFile(source) - elif ext in library_extensions and type != "none": - xct.FrameworksPhase().AddFile(source) - else: - # Files that aren't added to a sources or frameworks build phase can still - # go into the project file, just not as part of a build phase. - pbxp.AddOrGetFileInRootGroup(source) - - -def AddResourceToTarget(resource, pbxp, xct): - # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call - # where it's used. - xct.ResourcesPhase().AddFile(resource) - - -def AddHeaderToTarget(header, pbxp, xct, is_public): - # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call - # where it's used. - settings = "{ATTRIBUTES = (%s, ); }" % ("Private", "Public")[is_public] - xct.HeadersPhase().AddFile(header, settings) - - -_xcode_variable_re = re.compile(r"(\$\((.*?)\))") - - -def ExpandXcodeVariables(string, expansions): - """Expands Xcode-style $(VARIABLES) in string per the expansions dict. - - In some rare cases, it is appropriate to expand Xcode variables when a - project file is generated. For any substring $(VAR) in string, if VAR is a - key in the expansions dict, $(VAR) will be replaced with expansions[VAR]. - Any $(VAR) substring in string for which VAR is not a key in the expansions - dict will remain in the returned string. - """ - - matches = _xcode_variable_re.findall(string) - if matches is None: - return string - - matches.reverse() - for match in matches: - (to_replace, variable) = match - if variable not in expansions: - continue - - replacement = expansions[variable] - string = re.sub(re.escape(to_replace), replacement, string) - - return string - - -_xcode_define_re = re.compile(r"([\\\"\' ])") - - -def EscapeXcodeDefine(s): - """We must escape the defines that we give to XCode so that it knows not to - split on spaces and to respect backslash and quote literals. However, we - must not quote the define, or Xcode will incorrectly interpret variables - especially $(inherited).""" - return re.sub(_xcode_define_re, r"\\\1", s) - - -def PerformBuild(data, configurations, params): - options = params["options"] - - for build_file, build_file_dict in data.items(): - (build_file_root, build_file_ext) = os.path.splitext(build_file) - if build_file_ext != ".gyp": - continue - xcodeproj_path = build_file_root + options.suffix + ".xcodeproj" - if options.generator_output: - xcodeproj_path = os.path.join(options.generator_output, xcodeproj_path) - - for config in configurations: - arguments = ["xcodebuild", "-project", xcodeproj_path] - arguments += ["-configuration", config] - print(f"Building [{config}]: {arguments}") - subprocess.check_call(arguments) - - -def CalculateGeneratorInputInfo(params): - toplevel = params["options"].toplevel_dir - if params.get("flavor") == "ninja": - generator_dir = os.path.relpath(params["options"].generator_output or ".") - output_dir = params.get("generator_flags", {}).get("output_dir", "out") - output_dir = os.path.normpath(os.path.join(generator_dir, output_dir)) - qualified_out_dir = os.path.normpath( - os.path.join(toplevel, output_dir, "gypfiles-xcode-ninja") - ) - else: - output_dir = os.path.normpath(os.path.join(toplevel, "xcodebuild")) - qualified_out_dir = os.path.normpath( - os.path.join(toplevel, output_dir, "gypfiles") - ) - - global generator_filelist_paths - generator_filelist_paths = { - "toplevel": toplevel, - "qualified_out_dir": qualified_out_dir, - } - - -def GenerateOutput(target_list, target_dicts, data, params): - # Optionally configure each spec to use ninja as the external builder. - ninja_wrapper = params.get("flavor") == "ninja" - if ninja_wrapper: - (target_list, target_dicts, data) = gyp.xcode_ninja.CreateWrapper( - target_list, target_dicts, data, params - ) - - options = params["options"] - generator_flags = params.get("generator_flags", {}) - parallel_builds = generator_flags.get("xcode_parallel_builds", True) - serialize_all_tests = generator_flags.get("xcode_serialize_all_test_runs", True) - upgrade_check_project_version = generator_flags.get( - "xcode_upgrade_check_project_version", None - ) - - # Format upgrade_check_project_version with leading zeros as needed. - if upgrade_check_project_version: - upgrade_check_project_version = str(upgrade_check_project_version) - while len(upgrade_check_project_version) < 4: - upgrade_check_project_version = "0" + upgrade_check_project_version - - skip_excluded_files = not generator_flags.get("xcode_list_excluded_files", True) - xcode_projects = {} - for build_file, build_file_dict in data.items(): - (build_file_root, build_file_ext) = os.path.splitext(build_file) - if build_file_ext != ".gyp": - continue - xcodeproj_path = build_file_root + options.suffix + ".xcodeproj" - if options.generator_output: - xcodeproj_path = os.path.join(options.generator_output, xcodeproj_path) - xcp = XcodeProject(build_file, xcodeproj_path, build_file_dict) - xcode_projects[build_file] = xcp - pbxp = xcp.project - - # Set project-level attributes from multiple options - project_attributes = {} - if parallel_builds: - project_attributes["BuildIndependentTargetsInParallel"] = "YES" - if upgrade_check_project_version: - project_attributes["LastUpgradeCheck"] = upgrade_check_project_version - project_attributes[ - "LastTestingUpgradeCheck" - ] = upgrade_check_project_version - project_attributes["LastSwiftUpdateCheck"] = upgrade_check_project_version - pbxp.SetProperty("attributes", project_attributes) - - # Add gyp/gypi files to project - if not generator_flags.get("standalone"): - main_group = pbxp.GetProperty("mainGroup") - build_group = gyp.xcodeproj_file.PBXGroup({"name": "Build"}) - main_group.AppendChild(build_group) - for included_file in build_file_dict["included_files"]: - build_group.AddOrGetFileByPath(included_file, False) - - xcode_targets = {} - xcode_target_to_target_dict = {} - for qualified_target in target_list: - [build_file, target_name, toolset] = gyp.common.ParseQualifiedTarget( - qualified_target - ) - - spec = target_dicts[qualified_target] - if spec["toolset"] != "target": - raise Exception( - "Multiple toolsets not supported in xcode build (target %s)" - % qualified_target - ) - configuration_names = [spec["default_configuration"]] - for configuration_name in sorted(spec["configurations"].keys()): - if configuration_name not in configuration_names: - configuration_names.append(configuration_name) - xcp = xcode_projects[build_file] - pbxp = xcp.project - - # Set up the configurations for the target according to the list of names - # supplied. - xccl = CreateXCConfigurationList(configuration_names) - - # Create an XCTarget subclass object for the target. The type with - # "+bundle" appended will be used if the target has "mac_bundle" set. - # loadable_modules not in a mac_bundle are mapped to - # com.googlecode.gyp.xcode.bundle, a pseudo-type that xcode.py interprets - # to create a single-file mh_bundle. - _types = { - "executable": "com.apple.product-type.tool", - "loadable_module": "com.googlecode.gyp.xcode.bundle", - "shared_library": "com.apple.product-type.library.dynamic", - "static_library": "com.apple.product-type.library.static", - "mac_kernel_extension": "com.apple.product-type.kernel-extension", - "executable+bundle": "com.apple.product-type.application", - "loadable_module+bundle": "com.apple.product-type.bundle", - "loadable_module+xctest": "com.apple.product-type.bundle.unit-test", - "loadable_module+xcuitest": "com.apple.product-type.bundle.ui-testing", - "shared_library+bundle": "com.apple.product-type.framework", - "executable+extension+bundle": "com.apple.product-type.app-extension", - "executable+watch+extension+bundle": - "com.apple.product-type.watchkit-extension", - "executable+watch+bundle": "com.apple.product-type.application.watchapp", - "mac_kernel_extension+bundle": "com.apple.product-type.kernel-extension", - } - - target_properties = { - "buildConfigurationList": xccl, - "name": target_name, - } - - type = spec["type"] - is_xctest = int(spec.get("mac_xctest_bundle", 0)) - is_xcuitest = int(spec.get("mac_xcuitest_bundle", 0)) - is_bundle = int(spec.get("mac_bundle", 0)) or is_xctest - is_app_extension = int(spec.get("ios_app_extension", 0)) - is_watchkit_extension = int(spec.get("ios_watchkit_extension", 0)) - is_watch_app = int(spec.get("ios_watch_app", 0)) - if type != "none": - type_bundle_key = type - if is_xcuitest: - type_bundle_key += "+xcuitest" - assert type == "loadable_module", ( - "mac_xcuitest_bundle targets must have type loadable_module " - "(target %s)" % target_name - ) - elif is_xctest: - type_bundle_key += "+xctest" - assert type == "loadable_module", ( - "mac_xctest_bundle targets must have type loadable_module " - "(target %s)" % target_name - ) - elif is_app_extension: - assert is_bundle, ( - "ios_app_extension flag requires mac_bundle " - "(target %s)" % target_name - ) - type_bundle_key += "+extension+bundle" - elif is_watchkit_extension: - assert is_bundle, ( - "ios_watchkit_extension flag requires mac_bundle " - "(target %s)" % target_name - ) - type_bundle_key += "+watch+extension+bundle" - elif is_watch_app: - assert is_bundle, ( - "ios_watch_app flag requires mac_bundle " - "(target %s)" % target_name - ) - type_bundle_key += "+watch+bundle" - elif is_bundle: - type_bundle_key += "+bundle" - - xctarget_type = gyp.xcodeproj_file.PBXNativeTarget - try: - target_properties["productType"] = _types[type_bundle_key] - except KeyError as e: - gyp.common.ExceptionAppend( - e, - "-- unknown product type while " "writing target %s" % target_name, - ) - raise - else: - xctarget_type = gyp.xcodeproj_file.PBXAggregateTarget - assert not is_bundle, ( - 'mac_bundle targets cannot have type none (target "%s")' % target_name - ) - assert not is_xcuitest, ( - 'mac_xcuitest_bundle targets cannot have type none (target "%s")' - % target_name - ) - assert not is_xctest, ( - 'mac_xctest_bundle targets cannot have type none (target "%s")' - % target_name - ) - - target_product_name = spec.get("product_name") - if target_product_name is not None: - target_properties["productName"] = target_product_name - - xct = xctarget_type( - target_properties, - parent=pbxp, - force_outdir=spec.get("product_dir"), - force_prefix=spec.get("product_prefix"), - force_extension=spec.get("product_extension"), - ) - pbxp.AppendProperty("targets", xct) - xcode_targets[qualified_target] = xct - xcode_target_to_target_dict[xct] = spec - - spec_actions = spec.get("actions", []) - spec_rules = spec.get("rules", []) - - # Xcode has some "issues" with checking dependencies for the "Compile - # sources" step with any source files/headers generated by actions/rules. - # To work around this, if a target is building anything directly (not - # type "none"), then a second target is used to run the GYP actions/rules - # and is made a dependency of this target. This way the work is done - # before the dependency checks for what should be recompiled. - support_xct = None - # The Xcode "issues" don't affect xcode-ninja builds, since the dependency - # logic all happens in ninja. Don't bother creating the extra targets in - # that case. - if type != "none" and (spec_actions or spec_rules) and not ninja_wrapper: - support_xccl = CreateXCConfigurationList(configuration_names) - support_target_suffix = generator_flags.get( - "support_target_suffix", " Support" - ) - support_target_properties = { - "buildConfigurationList": support_xccl, - "name": target_name + support_target_suffix, - } - if target_product_name: - support_target_properties["productName"] = ( - target_product_name + " Support" - ) - support_xct = gyp.xcodeproj_file.PBXAggregateTarget( - support_target_properties, parent=pbxp - ) - pbxp.AppendProperty("targets", support_xct) - xct.AddDependency(support_xct) - # Hang the support target off the main target so it can be tested/found - # by the generator during Finalize. - xct.support_target = support_xct - - prebuild_index = 0 - - # Add custom shell script phases for "actions" sections. - for action in spec_actions: - # There's no need to write anything into the script to ensure that the - # output directories already exist, because Xcode will look at the - # declared outputs and automatically ensure that they exist for us. - - # Do we have a message to print when this action runs? - message = action.get("message") - if message: - message = "echo note: " + gyp.common.EncodePOSIXShellArgument(message) - else: - message = "" - - # Turn the list into a string that can be passed to a shell. - action_string = gyp.common.EncodePOSIXShellList(action["action"]) - - # Convert Xcode-type variable references to sh-compatible environment - # variable references. - message_sh = gyp.xcodeproj_file.ConvertVariablesToShellSyntax(message) - action_string_sh = gyp.xcodeproj_file.ConvertVariablesToShellSyntax( - action_string - ) - - script = "" - # Include the optional message - if message_sh: - script += message_sh + "\n" - # Be sure the script runs in exec, and that if exec fails, the script - # exits signalling an error. - script += "exec " + action_string_sh + "\nexit 1\n" - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase( - { - "inputPaths": action["inputs"], - "name": 'Action "' + action["action_name"] + '"', - "outputPaths": action["outputs"], - "shellScript": script, - "showEnvVarsInLog": 0, - } - ) - - if support_xct: - support_xct.AppendProperty("buildPhases", ssbp) - else: - # TODO(mark): this assumes too much knowledge of the internals of - # xcodeproj_file; some of these smarts should move into xcodeproj_file - # itself. - xct._properties["buildPhases"].insert(prebuild_index, ssbp) - prebuild_index = prebuild_index + 1 - - # TODO(mark): Should verify that at most one of these is specified. - if int(action.get("process_outputs_as_sources", False)): - for output in action["outputs"]: - AddSourceToTarget(output, type, pbxp, xct) - - if int(action.get("process_outputs_as_mac_bundle_resources", False)): - for output in action["outputs"]: - AddResourceToTarget(output, pbxp, xct) - - # tgt_mac_bundle_resources holds the list of bundle resources so - # the rule processing can check against it. - if is_bundle: - tgt_mac_bundle_resources = spec.get("mac_bundle_resources", []) - else: - tgt_mac_bundle_resources = [] - - # Add custom shell script phases driving "make" for "rules" sections. - # - # Xcode's built-in rule support is almost powerful enough to use directly, - # but there are a few significant deficiencies that render them unusable. - # There are workarounds for some of its inadequacies, but in aggregate, - # the workarounds added complexity to the generator, and some workarounds - # actually require input files to be crafted more carefully than I'd like. - # Consequently, until Xcode rules are made more capable, "rules" input - # sections will be handled in Xcode output by shell script build phases - # performed prior to the compilation phase. - # - # The following problems with Xcode rules were found. The numbers are - # Apple radar IDs. I hope that these shortcomings are addressed, I really - # liked having the rules handled directly in Xcode during the period that - # I was prototyping this. - # - # 6588600 Xcode compiles custom script rule outputs too soon, compilation - # fails. This occurs when rule outputs from distinct inputs are - # interdependent. The only workaround is to put rules and their - # inputs in a separate target from the one that compiles the rule - # outputs. This requires input file cooperation and it means that - # process_outputs_as_sources is unusable. - # 6584932 Need to declare that custom rule outputs should be excluded from - # compilation. A possible workaround is to lie to Xcode about a - # rule's output, giving it a dummy file it doesn't know how to - # compile. The rule action script would need to touch the dummy. - # 6584839 I need a way to declare additional inputs to a custom rule. - # A possible workaround is a shell script phase prior to - # compilation that touches a rule's primary input files if any - # would-be additional inputs are newer than the output. Modifying - # the source tree - even just modification times - feels dirty. - # 6564240 Xcode "custom script" build rules always dump all environment - # variables. This is a low-prioroty problem and is not a - # show-stopper. - rules_by_ext = {} - for rule in spec_rules: - rules_by_ext[rule["extension"]] = rule - - # First, some definitions: - # - # A "rule source" is a file that was listed in a target's "sources" - # list and will have a rule applied to it on the basis of matching the - # rule's "extensions" attribute. Rule sources are direct inputs to - # rules. - # - # Rule definitions may specify additional inputs in their "inputs" - # attribute. These additional inputs are used for dependency tracking - # purposes. - # - # A "concrete output" is a rule output with input-dependent variables - # resolved. For example, given a rule with: - # 'extension': 'ext', 'outputs': ['$(INPUT_FILE_BASE).cc'], - # if the target's "sources" list contained "one.ext" and "two.ext", - # the "concrete output" for rule input "two.ext" would be "two.cc". If - # a rule specifies multiple outputs, each input file that the rule is - # applied to will have the same number of concrete outputs. - # - # If any concrete outputs are outdated or missing relative to their - # corresponding rule_source or to any specified additional input, the - # rule action must be performed to generate the concrete outputs. - - # concrete_outputs_by_rule_source will have an item at the same index - # as the rule['rule_sources'] that it corresponds to. Each item is a - # list of all of the concrete outputs for the rule_source. - concrete_outputs_by_rule_source = [] - - # concrete_outputs_all is a flat list of all concrete outputs that this - # rule is able to produce, given the known set of input files - # (rule_sources) that apply to it. - concrete_outputs_all = [] - - # messages & actions are keyed by the same indices as rule['rule_sources'] - # and concrete_outputs_by_rule_source. They contain the message and - # action to perform after resolving input-dependent variables. The - # message is optional, in which case None is stored for each rule source. - messages = [] - actions = [] - - for rule_source in rule.get("rule_sources", []): - rule_source_dirname, rule_source_basename = posixpath.split(rule_source) - (rule_source_root, rule_source_ext) = posixpath.splitext( - rule_source_basename - ) - - # These are the same variable names that Xcode uses for its own native - # rule support. Because Xcode's rule engine is not being used, they - # need to be expanded as they are written to the makefile. - rule_input_dict = { - "INPUT_FILE_BASE": rule_source_root, - "INPUT_FILE_SUFFIX": rule_source_ext, - "INPUT_FILE_NAME": rule_source_basename, - "INPUT_FILE_PATH": rule_source, - "INPUT_FILE_DIRNAME": rule_source_dirname, - } - - concrete_outputs_for_this_rule_source = [] - for output in rule.get("outputs", []): - # Fortunately, Xcode and make both use $(VAR) format for their - # variables, so the expansion is the only transformation necessary. - # Any remaining $(VAR)-type variables in the string can be given - # directly to make, which will pick up the correct settings from - # what Xcode puts into the environment. - concrete_output = ExpandXcodeVariables(output, rule_input_dict) - concrete_outputs_for_this_rule_source.append(concrete_output) - - # Add all concrete outputs to the project. - pbxp.AddOrGetFileInRootGroup(concrete_output) - - concrete_outputs_by_rule_source.append( - concrete_outputs_for_this_rule_source - ) - concrete_outputs_all.extend(concrete_outputs_for_this_rule_source) - - # TODO(mark): Should verify that at most one of these is specified. - if int(rule.get("process_outputs_as_sources", False)): - for output in concrete_outputs_for_this_rule_source: - AddSourceToTarget(output, type, pbxp, xct) - - # If the file came from the mac_bundle_resources list or if the rule - # is marked to process outputs as bundle resource, do so. - was_mac_bundle_resource = rule_source in tgt_mac_bundle_resources - if was_mac_bundle_resource or int( - rule.get("process_outputs_as_mac_bundle_resources", False) - ): - for output in concrete_outputs_for_this_rule_source: - AddResourceToTarget(output, pbxp, xct) - - # Do we have a message to print when this rule runs? - message = rule.get("message") - if message: - message = gyp.common.EncodePOSIXShellArgument(message) - message = ExpandXcodeVariables(message, rule_input_dict) - messages.append(message) - - # Turn the list into a string that can be passed to a shell. - action_string = gyp.common.EncodePOSIXShellList(rule["action"]) - - action = ExpandXcodeVariables(action_string, rule_input_dict) - actions.append(action) - - if len(concrete_outputs_all) > 0: - # TODO(mark): There's a possibility for collision here. Consider - # target "t" rule "A_r" and target "t_A" rule "r". - makefile_name = "%s.make" % re.sub( - "[^a-zA-Z0-9_]", "_", "{}_{}".format(target_name, rule["rule_name"]) - ) - makefile_path = os.path.join( - xcode_projects[build_file].path, makefile_name - ) - # TODO(mark): try/close? Write to a temporary file and swap it only - # if it's got changes? - makefile = open(makefile_path, "w") - - # make will build the first target in the makefile by default. By - # convention, it's called "all". List all (or at least one) - # concrete output for each rule source as a prerequisite of the "all" - # target. - makefile.write("all: \\\n") - for concrete_output_index, concrete_output_by_rule_source in enumerate( - concrete_outputs_by_rule_source - ): - # Only list the first (index [0]) concrete output of each input - # in the "all" target. Otherwise, a parallel make (-j > 1) would - # attempt to process each input multiple times simultaneously. - # Otherwise, "all" could just contain the entire list of - # concrete_outputs_all. - concrete_output = concrete_output_by_rule_source[0] - if ( - concrete_output_index - == len(concrete_outputs_by_rule_source) - 1 - ): - eol = "" - else: - eol = " \\" - makefile.write(f" {concrete_output}{eol}\n") - - for (rule_source, concrete_outputs, message, action) in zip( - rule["rule_sources"], - concrete_outputs_by_rule_source, - messages, - actions, - ): - makefile.write("\n") - - # Add a rule that declares it can build each concrete output of a - # rule source. Collect the names of the directories that are - # required. - concrete_output_dirs = [] - for concrete_output_index, concrete_output in enumerate( - concrete_outputs - ): - if concrete_output_index == 0: - bol = "" - else: - bol = " " - makefile.write(f"{bol}{concrete_output} \\\n") - - concrete_output_dir = posixpath.dirname(concrete_output) - if ( - concrete_output_dir - and concrete_output_dir not in concrete_output_dirs - ): - concrete_output_dirs.append(concrete_output_dir) - - makefile.write(" : \\\n") - - # The prerequisites for this rule are the rule source itself and - # the set of additional rule inputs, if any. - prerequisites = [rule_source] - prerequisites.extend(rule.get("inputs", [])) - for prerequisite_index, prerequisite in enumerate(prerequisites): - if prerequisite_index == len(prerequisites) - 1: - eol = "" - else: - eol = " \\" - makefile.write(f" {prerequisite}{eol}\n") - - # Make sure that output directories exist before executing the rule - # action. - if len(concrete_output_dirs) > 0: - makefile.write( - '\t@mkdir -p "%s"\n' % '" "'.join(concrete_output_dirs) - ) - - # The rule message and action have already had - # the necessary variable substitutions performed. - if message: - # Mark it with note: so Xcode picks it up in build output. - makefile.write("\t@echo note: %s\n" % message) - makefile.write("\t%s\n" % action) - - makefile.close() - - # It might be nice to ensure that needed output directories exist - # here rather than in each target in the Makefile, but that wouldn't - # work if there ever was a concrete output that had an input-dependent - # variable anywhere other than in the leaf position. - - # Don't declare any inputPaths or outputPaths. If they're present, - # Xcode will provide a slight optimization by only running the script - # phase if any output is missing or outdated relative to any input. - # Unfortunately, it will also assume that all outputs are touched by - # the script, and if the outputs serve as files in a compilation - # phase, they will be unconditionally rebuilt. Since make might not - # rebuild everything that could be declared here as an output, this - # extra compilation activity is unnecessary. With inputPaths and - # outputPaths not supplied, make will always be called, but it knows - # enough to not do anything when everything is up-to-date. - - # To help speed things up, pass -j COUNT to make so it does some work - # in parallel. Don't use ncpus because Xcode will build ncpus targets - # in parallel and if each target happens to have a rules step, there - # would be ncpus^2 things going. With a machine that has 2 quad-core - # Xeons, a build can quickly run out of processes based on - # scheduling/other tasks, and randomly failing builds are no good. - script = ( - """JOB_COUNT="$(/usr/sbin/sysctl -n hw.ncpu)" -if [ "${JOB_COUNT}" -gt 4 ]; then - JOB_COUNT=4 -fi -exec xcrun make -f "${PROJECT_FILE_PATH}/%s" -j "${JOB_COUNT}" -exit 1 -""" - % makefile_name - ) - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase( - { - "name": 'Rule "' + rule["rule_name"] + '"', - "shellScript": script, - "showEnvVarsInLog": 0, - } - ) - - if support_xct: - support_xct.AppendProperty("buildPhases", ssbp) - else: - # TODO(mark): this assumes too much knowledge of the internals of - # xcodeproj_file; some of these smarts should move - # into xcodeproj_file itself. - xct._properties["buildPhases"].insert(prebuild_index, ssbp) - prebuild_index = prebuild_index + 1 - - # Extra rule inputs also go into the project file. Concrete outputs were - # already added when they were computed. - groups = ["inputs", "inputs_excluded"] - if skip_excluded_files: - groups = [x for x in groups if not x.endswith("_excluded")] - for group in groups: - for item in rule.get(group, []): - pbxp.AddOrGetFileInRootGroup(item) - - # Add "sources". - for source in spec.get("sources", []): - (source_root, source_extension) = posixpath.splitext(source) - if source_extension[1:] not in rules_by_ext: - # AddSourceToTarget will add the file to a root group if it's not - # already there. - AddSourceToTarget(source, type, pbxp, xct) - else: - pbxp.AddOrGetFileInRootGroup(source) - - # Add "mac_bundle_resources" and "mac_framework_private_headers" if - # it's a bundle of any type. - if is_bundle: - for resource in tgt_mac_bundle_resources: - (resource_root, resource_extension) = posixpath.splitext(resource) - if resource_extension[1:] not in rules_by_ext: - AddResourceToTarget(resource, pbxp, xct) - else: - pbxp.AddOrGetFileInRootGroup(resource) - - for header in spec.get("mac_framework_private_headers", []): - AddHeaderToTarget(header, pbxp, xct, False) - - # Add "mac_framework_headers". These can be valid for both frameworks - # and static libraries. - if is_bundle or type == "static_library": - for header in spec.get("mac_framework_headers", []): - AddHeaderToTarget(header, pbxp, xct, True) - - # Add "copies". - pbxcp_dict = {} - for copy_group in spec.get("copies", []): - dest = copy_group["destination"] - if dest[0] not in ("/", "$"): - # Relative paths are relative to $(SRCROOT). - dest = "$(SRCROOT)/" + dest - - code_sign = int(copy_group.get("xcode_code_sign", 0)) - settings = (None, "{ATTRIBUTES = (CodeSignOnCopy, ); }")[code_sign] - - # Coalesce multiple "copies" sections in the same target with the same - # "destination" property into the same PBXCopyFilesBuildPhase, otherwise - # they'll wind up with ID collisions. - pbxcp = pbxcp_dict.get(dest, None) - if pbxcp is None: - pbxcp = gyp.xcodeproj_file.PBXCopyFilesBuildPhase( - {"name": "Copy to " + copy_group["destination"]}, parent=xct - ) - pbxcp.SetDestination(dest) - - # TODO(mark): The usual comment about this knowing too much about - # gyp.xcodeproj_file internals applies. - xct._properties["buildPhases"].insert(prebuild_index, pbxcp) - - pbxcp_dict[dest] = pbxcp - - for file in copy_group["files"]: - pbxcp.AddFile(file, settings) - - # Excluded files can also go into the project file. - if not skip_excluded_files: - for key in [ - "sources", - "mac_bundle_resources", - "mac_framework_headers", - "mac_framework_private_headers", - ]: - excluded_key = key + "_excluded" - for item in spec.get(excluded_key, []): - pbxp.AddOrGetFileInRootGroup(item) - - # So can "inputs" and "outputs" sections of "actions" groups. - groups = ["inputs", "inputs_excluded", "outputs", "outputs_excluded"] - if skip_excluded_files: - groups = [x for x in groups if not x.endswith("_excluded")] - for action in spec.get("actions", []): - for group in groups: - for item in action.get(group, []): - # Exclude anything in BUILT_PRODUCTS_DIR. They're products, not - # sources. - if not item.startswith("$(BUILT_PRODUCTS_DIR)/"): - pbxp.AddOrGetFileInRootGroup(item) - - for postbuild in spec.get("postbuilds", []): - action_string_sh = gyp.common.EncodePOSIXShellList(postbuild["action"]) - script = "exec " + action_string_sh + "\nexit 1\n" - - # Make the postbuild step depend on the output of ld or ar from this - # target. Apparently putting the script step after the link step isn't - # sufficient to ensure proper ordering in all cases. With an input - # declared but no outputs, the script step should run every time, as - # desired. - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase( - { - "inputPaths": ["$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)"], - "name": 'Postbuild "' + postbuild["postbuild_name"] + '"', - "shellScript": script, - "showEnvVarsInLog": 0, - } - ) - xct.AppendProperty("buildPhases", ssbp) - - # Add dependencies before libraries, because adding a dependency may imply - # adding a library. It's preferable to keep dependencies listed first - # during a link phase so that they can override symbols that would - # otherwise be provided by libraries, which will usually include system - # libraries. On some systems, ld is finicky and even requires the - # libraries to be ordered in such a way that unresolved symbols in - # earlier-listed libraries may only be resolved by later-listed libraries. - # The Mac linker doesn't work that way, but other platforms do, and so - # their linker invocations need to be constructed in this way. There's - # no compelling reason for Xcode's linker invocations to differ. - - if "dependencies" in spec: - for dependency in spec["dependencies"]: - xct.AddDependency(xcode_targets[dependency]) - # The support project also gets the dependencies (in case they are - # needed for the actions/rules to work). - if support_xct: - support_xct.AddDependency(xcode_targets[dependency]) - - if "libraries" in spec: - for library in spec["libraries"]: - xct.FrameworksPhase().AddFile(library) - # Add the library's directory to LIBRARY_SEARCH_PATHS if necessary. - # I wish Xcode handled this automatically. - library_dir = posixpath.dirname(library) - if library_dir not in xcode_standard_library_dirs and ( - not xct.HasBuildSetting(_library_search_paths_var) - or library_dir not in xct.GetBuildSetting(_library_search_paths_var) - ): - xct.AppendBuildSetting(_library_search_paths_var, library_dir) - - for configuration_name in configuration_names: - configuration = spec["configurations"][configuration_name] - xcbc = xct.ConfigurationNamed(configuration_name) - for include_dir in configuration.get("mac_framework_dirs", []): - xcbc.AppendBuildSetting("FRAMEWORK_SEARCH_PATHS", include_dir) - for include_dir in configuration.get("include_dirs", []): - xcbc.AppendBuildSetting("HEADER_SEARCH_PATHS", include_dir) - for library_dir in configuration.get("library_dirs", []): - if library_dir not in xcode_standard_library_dirs and ( - not xcbc.HasBuildSetting(_library_search_paths_var) - or library_dir - not in xcbc.GetBuildSetting(_library_search_paths_var) - ): - xcbc.AppendBuildSetting(_library_search_paths_var, library_dir) - - if "defines" in configuration: - for define in configuration["defines"]: - set_define = EscapeXcodeDefine(define) - xcbc.AppendBuildSetting("GCC_PREPROCESSOR_DEFINITIONS", set_define) - if "xcode_settings" in configuration: - for xck, xcv in configuration["xcode_settings"].items(): - xcbc.SetBuildSetting(xck, xcv) - if "xcode_config_file" in configuration: - config_ref = pbxp.AddOrGetFileInRootGroup( - configuration["xcode_config_file"] - ) - xcbc.SetBaseConfiguration(config_ref) - - build_files = [] - for build_file, build_file_dict in data.items(): - if build_file.endswith(".gyp"): - build_files.append(build_file) - - for build_file in build_files: - xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) - - for build_file in build_files: - xcode_projects[build_file].Finalize2(xcode_targets, xcode_target_to_target_dict) - - for build_file in build_files: - xcode_projects[build_file].Write() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py deleted file mode 100644 index 49772d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" Unit tests for the xcode.py file. """ - -import gyp.generator.xcode as xcode -import unittest -import sys - - -class TestEscapeXcodeDefine(unittest.TestCase): - if sys.platform == "darwin": - - def test_InheritedRemainsUnescaped(self): - self.assertEqual(xcode.EscapeXcodeDefine("$(inherited)"), "$(inherited)") - - def test_Escaping(self): - self.assertEqual(xcode.EscapeXcodeDefine('a b"c\\'), 'a\\ b\\"c\\\\') - - -if __name__ == "__main__": - unittest.main() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/input.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/input.py deleted file mode 100644 index 354958b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/input.py +++ /dev/null @@ -1,3137 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -import ast - -import gyp.common -import gyp.simple_copy -import multiprocessing -import os.path -import re -import shlex -import signal -import subprocess -import sys -import threading -import traceback -from distutils.version import StrictVersion -from gyp.common import GypError -from gyp.common import OrderedSet - -# A list of types that are treated as linkable. -linkable_types = [ - "executable", - "shared_library", - "loadable_module", - "mac_kernel_extension", - "windows_driver", -] - -# A list of sections that contain links to other targets. -dependency_sections = ["dependencies", "export_dependent_settings"] - -# base_path_sections is a list of sections defined by GYP that contain -# pathnames. The generators can provide more keys, the two lists are merged -# into path_sections, but you should call IsPathSection instead of using either -# list directly. -base_path_sections = [ - "destination", - "files", - "include_dirs", - "inputs", - "libraries", - "outputs", - "sources", -] -path_sections = set() - -# These per-process dictionaries are used to cache build file data when loading -# in parallel mode. -per_process_data = {} -per_process_aux_data = {} - - -def IsPathSection(section): - # If section ends in one of the '=+?!' characters, it's applied to a section - # without the trailing characters. '/' is notably absent from this list, - # because there's no way for a regular expression to be treated as a path. - while section and section[-1:] in "=+?!": - section = section[:-1] - - if section in path_sections: - return True - - # Sections matching the regexp '_(dir|file|path)s?$' are also - # considered PathSections. Using manual string matching since that - # is much faster than the regexp and this can be called hundreds of - # thousands of times so micro performance matters. - if "_" in section: - tail = section[-6:] - if tail[-1] == "s": - tail = tail[:-1] - if tail[-5:] in ("_file", "_path"): - return True - return tail[-4:] == "_dir" - - return False - - -# base_non_configuration_keys is a list of key names that belong in the target -# itself and should not be propagated into its configurations. It is merged -# with a list that can come from the generator to -# create non_configuration_keys. -base_non_configuration_keys = [ - # Sections that must exist inside targets and not configurations. - "actions", - "configurations", - "copies", - "default_configuration", - "dependencies", - "dependencies_original", - "libraries", - "postbuilds", - "product_dir", - "product_extension", - "product_name", - "product_prefix", - "rules", - "run_as", - "sources", - "standalone_static_library", - "suppress_wildcard", - "target_name", - "toolset", - "toolsets", - "type", - # Sections that can be found inside targets or configurations, but that - # should not be propagated from targets into their configurations. - "variables", -] -non_configuration_keys = [] - -# Keys that do not belong inside a configuration dictionary. -invalid_configuration_keys = [ - "actions", - "all_dependent_settings", - "configurations", - "dependencies", - "direct_dependent_settings", - "libraries", - "link_settings", - "sources", - "standalone_static_library", - "target_name", - "type", -] - -# Controls whether or not the generator supports multiple toolsets. -multiple_toolsets = False - -# Paths for converting filelist paths to output paths: { -# toplevel, -# qualified_output_dir, -# } -generator_filelist_paths = None - - -def GetIncludedBuildFiles(build_file_path, aux_data, included=None): - """Return a list of all build files included into build_file_path. - - The returned list will contain build_file_path as well as all other files - that it included, either directly or indirectly. Note that the list may - contain files that were included into a conditional section that evaluated - to false and was not merged into build_file_path's dict. - - aux_data is a dict containing a key for each build file or included build - file. Those keys provide access to dicts whose "included" keys contain - lists of all other files included by the build file. - - included should be left at its default None value by external callers. It - is used for recursion. - - The returned list will not contain any duplicate entries. Each build file - in the list will be relative to the current directory. - """ - - if included is None: - included = [] - - if build_file_path in included: - return included - - included.append(build_file_path) - - for included_build_file in aux_data[build_file_path].get("included", []): - GetIncludedBuildFiles(included_build_file, aux_data, included) - - return included - - -def CheckedEval(file_contents): - """Return the eval of a gyp file. - The gyp file is restricted to dictionaries and lists only, and - repeated keys are not allowed. - Note that this is slower than eval() is. - """ - - syntax_tree = ast.parse(file_contents) - assert isinstance(syntax_tree, ast.Module) - c1 = syntax_tree.body - assert len(c1) == 1 - c2 = c1[0] - assert isinstance(c2, ast.Expr) - return CheckNode(c2.value, []) - - -def CheckNode(node, keypath): - if isinstance(node, ast.Dict): - dict = {} - for key, value in zip(node.keys, node.values): - assert isinstance(key, ast.Str) - key = key.s - if key in dict: - raise GypError( - "Key '" - + key - + "' repeated at level " - + repr(len(keypath) + 1) - + " with key path '" - + ".".join(keypath) - + "'" - ) - kp = list(keypath) # Make a copy of the list for descending this node. - kp.append(key) - dict[key] = CheckNode(value, kp) - return dict - elif isinstance(node, ast.List): - children = [] - for index, child in enumerate(node.elts): - kp = list(keypath) # Copy list. - kp.append(repr(index)) - children.append(CheckNode(child, kp)) - return children - elif isinstance(node, ast.Str): - return node.s - else: - raise TypeError( - "Unknown AST node at key path '" + ".".join(keypath) + "': " + repr(node) - ) - - -def LoadOneBuildFile(build_file_path, data, aux_data, includes, is_target, check): - if build_file_path in data: - return data[build_file_path] - - if os.path.exists(build_file_path): - build_file_contents = open(build_file_path, encoding='utf-8').read() - else: - raise GypError(f"{build_file_path} not found (cwd: {os.getcwd()})") - - build_file_data = None - try: - if check: - build_file_data = CheckedEval(build_file_contents) - else: - build_file_data = eval(build_file_contents, {"__builtins__": {}}, None) - except SyntaxError as e: - e.filename = build_file_path - raise - except Exception as e: - gyp.common.ExceptionAppend(e, "while reading " + build_file_path) - raise - - if type(build_file_data) is not dict: - raise GypError("%s does not evaluate to a dictionary." % build_file_path) - - data[build_file_path] = build_file_data - aux_data[build_file_path] = {} - - # Scan for includes and merge them in. - if "skip_includes" not in build_file_data or not build_file_data["skip_includes"]: - try: - if is_target: - LoadBuildFileIncludesIntoDict( - build_file_data, build_file_path, data, aux_data, includes, check - ) - else: - LoadBuildFileIncludesIntoDict( - build_file_data, build_file_path, data, aux_data, None, check - ) - except Exception as e: - gyp.common.ExceptionAppend( - e, "while reading includes of " + build_file_path - ) - raise - - return build_file_data - - -def LoadBuildFileIncludesIntoDict( - subdict, subdict_path, data, aux_data, includes, check -): - includes_list = [] - if includes is not None: - includes_list.extend(includes) - if "includes" in subdict: - for include in subdict["includes"]: - # "include" is specified relative to subdict_path, so compute the real - # path to include by appending the provided "include" to the directory - # in which subdict_path resides. - relative_include = os.path.normpath( - os.path.join(os.path.dirname(subdict_path), include) - ) - includes_list.append(relative_include) - # Unhook the includes list, it's no longer needed. - del subdict["includes"] - - # Merge in the included files. - for include in includes_list: - if "included" not in aux_data[subdict_path]: - aux_data[subdict_path]["included"] = [] - aux_data[subdict_path]["included"].append(include) - - gyp.DebugOutput(gyp.DEBUG_INCLUDES, "Loading Included File: '%s'", include) - - MergeDicts( - subdict, - LoadOneBuildFile(include, data, aux_data, None, False, check), - subdict_path, - include, - ) - - # Recurse into subdictionaries. - for k, v in subdict.items(): - if type(v) is dict: - LoadBuildFileIncludesIntoDict(v, subdict_path, data, aux_data, None, check) - elif type(v) is list: - LoadBuildFileIncludesIntoList(v, subdict_path, data, aux_data, check) - - -# This recurses into lists so that it can look for dicts. -def LoadBuildFileIncludesIntoList(sublist, sublist_path, data, aux_data, check): - for item in sublist: - if type(item) is dict: - LoadBuildFileIncludesIntoDict( - item, sublist_path, data, aux_data, None, check - ) - elif type(item) is list: - LoadBuildFileIncludesIntoList(item, sublist_path, data, aux_data, check) - - -# Processes toolsets in all the targets. This recurses into condition entries -# since they can contain toolsets as well. -def ProcessToolsetsInDict(data): - if "targets" in data: - target_list = data["targets"] - new_target_list = [] - for target in target_list: - # If this target already has an explicit 'toolset', and no 'toolsets' - # list, don't modify it further. - if "toolset" in target and "toolsets" not in target: - new_target_list.append(target) - continue - if multiple_toolsets: - toolsets = target.get("toolsets", ["target"]) - else: - toolsets = ["target"] - # Make sure this 'toolsets' definition is only processed once. - if "toolsets" in target: - del target["toolsets"] - if len(toolsets) > 0: - # Optimization: only do copies if more than one toolset is specified. - for build in toolsets[1:]: - new_target = gyp.simple_copy.deepcopy(target) - new_target["toolset"] = build - new_target_list.append(new_target) - target["toolset"] = toolsets[0] - new_target_list.append(target) - data["targets"] = new_target_list - if "conditions" in data: - for condition in data["conditions"]: - if type(condition) is list: - for condition_dict in condition[1:]: - if type(condition_dict) is dict: - ProcessToolsetsInDict(condition_dict) - - -# TODO(mark): I don't love this name. It just means that it's going to load -# a build file that contains targets and is expected to provide a targets dict -# that contains the targets... -def LoadTargetBuildFile( - build_file_path, - data, - aux_data, - variables, - includes, - depth, - check, - load_dependencies, -): - # If depth is set, predefine the DEPTH variable to be a relative path from - # this build file's directory to the directory identified by depth. - if depth: - # TODO(dglazkov) The backslash/forward-slash replacement at the end is a - # temporary measure. This should really be addressed by keeping all paths - # in POSIX until actual project generation. - d = gyp.common.RelativePath(depth, os.path.dirname(build_file_path)) - if d == "": - variables["DEPTH"] = "." - else: - variables["DEPTH"] = d.replace("\\", "/") - - # The 'target_build_files' key is only set when loading target build files in - # the non-parallel code path, where LoadTargetBuildFile is called - # recursively. In the parallel code path, we don't need to check whether the - # |build_file_path| has already been loaded, because the 'scheduled' set in - # ParallelState guarantees that we never load the same |build_file_path| - # twice. - if "target_build_files" in data: - if build_file_path in data["target_build_files"]: - # Already loaded. - return False - data["target_build_files"].add(build_file_path) - - gyp.DebugOutput( - gyp.DEBUG_INCLUDES, "Loading Target Build File '%s'", build_file_path - ) - - build_file_data = LoadOneBuildFile( - build_file_path, data, aux_data, includes, True, check - ) - - # Store DEPTH for later use in generators. - build_file_data["_DEPTH"] = depth - - # Set up the included_files key indicating which .gyp files contributed to - # this target dict. - if "included_files" in build_file_data: - raise GypError(build_file_path + " must not contain included_files key") - - included = GetIncludedBuildFiles(build_file_path, aux_data) - build_file_data["included_files"] = [] - for included_file in included: - # included_file is relative to the current directory, but it needs to - # be made relative to build_file_path's directory. - included_relative = gyp.common.RelativePath( - included_file, os.path.dirname(build_file_path) - ) - build_file_data["included_files"].append(included_relative) - - # Do a first round of toolsets expansion so that conditions can be defined - # per toolset. - ProcessToolsetsInDict(build_file_data) - - # Apply "pre"/"early" variable expansions and condition evaluations. - ProcessVariablesAndConditionsInDict( - build_file_data, PHASE_EARLY, variables, build_file_path - ) - - # Since some toolsets might have been defined conditionally, perform - # a second round of toolsets expansion now. - ProcessToolsetsInDict(build_file_data) - - # Look at each project's target_defaults dict, and merge settings into - # targets. - if "target_defaults" in build_file_data: - if "targets" not in build_file_data: - raise GypError("Unable to find targets in build file %s" % build_file_path) - - index = 0 - while index < len(build_file_data["targets"]): - # This procedure needs to give the impression that target_defaults is - # used as defaults, and the individual targets inherit from that. - # The individual targets need to be merged into the defaults. Make - # a deep copy of the defaults for each target, merge the target dict - # as found in the input file into that copy, and then hook up the - # copy with the target-specific data merged into it as the replacement - # target dict. - old_target_dict = build_file_data["targets"][index] - new_target_dict = gyp.simple_copy.deepcopy( - build_file_data["target_defaults"] - ) - MergeDicts( - new_target_dict, old_target_dict, build_file_path, build_file_path - ) - build_file_data["targets"][index] = new_target_dict - index += 1 - - # No longer needed. - del build_file_data["target_defaults"] - - # Look for dependencies. This means that dependency resolution occurs - # after "pre" conditionals and variable expansion, but before "post" - - # in other words, you can't put a "dependencies" section inside a "post" - # conditional within a target. - - dependencies = [] - if "targets" in build_file_data: - for target_dict in build_file_data["targets"]: - if "dependencies" not in target_dict: - continue - for dependency in target_dict["dependencies"]: - dependencies.append( - gyp.common.ResolveTarget(build_file_path, dependency, None)[0] - ) - - if load_dependencies: - for dependency in dependencies: - try: - LoadTargetBuildFile( - dependency, - data, - aux_data, - variables, - includes, - depth, - check, - load_dependencies, - ) - except Exception as e: - gyp.common.ExceptionAppend( - e, "while loading dependencies of %s" % build_file_path - ) - raise - else: - return (build_file_path, dependencies) - - -def CallLoadTargetBuildFile( - global_flags, - build_file_path, - variables, - includes, - depth, - check, - generator_input_info, -): - """Wrapper around LoadTargetBuildFile for parallel processing. - - This wrapper is used when LoadTargetBuildFile is executed in - a worker process. - """ - - try: - signal.signal(signal.SIGINT, signal.SIG_IGN) - - # Apply globals so that the worker process behaves the same. - for key, value in global_flags.items(): - globals()[key] = value - - SetGeneratorGlobals(generator_input_info) - result = LoadTargetBuildFile( - build_file_path, - per_process_data, - per_process_aux_data, - variables, - includes, - depth, - check, - False, - ) - if not result: - return result - - (build_file_path, dependencies) = result - - # We can safely pop the build_file_data from per_process_data because it - # will never be referenced by this process again, so we don't need to keep - # it in the cache. - build_file_data = per_process_data.pop(build_file_path) - - # This gets serialized and sent back to the main process via a pipe. - # It's handled in LoadTargetBuildFileCallback. - return (build_file_path, build_file_data, dependencies) - except GypError as e: - sys.stderr.write("gyp: %s\n" % e) - return None - except Exception as e: - print("Exception:", e, file=sys.stderr) - print(traceback.format_exc(), file=sys.stderr) - return None - - -class ParallelProcessingError(Exception): - pass - - -class ParallelState: - """Class to keep track of state when processing input files in parallel. - - If build files are loaded in parallel, use this to keep track of - state during farming out and processing parallel jobs. It's stored - in a global so that the callback function can have access to it. - """ - - def __init__(self): - # The multiprocessing pool. - self.pool = None - # The condition variable used to protect this object and notify - # the main loop when there might be more data to process. - self.condition = None - # The "data" dict that was passed to LoadTargetBuildFileParallel - self.data = None - # The number of parallel calls outstanding; decremented when a response - # was received. - self.pending = 0 - # The set of all build files that have been scheduled, so we don't - # schedule the same one twice. - self.scheduled = set() - # A list of dependency build file paths that haven't been scheduled yet. - self.dependencies = [] - # Flag to indicate if there was an error in a child process. - self.error = False - - def LoadTargetBuildFileCallback(self, result): - """Handle the results of running LoadTargetBuildFile in another process. - """ - self.condition.acquire() - if not result: - self.error = True - self.condition.notify() - self.condition.release() - return - (build_file_path0, build_file_data0, dependencies0) = result - self.data[build_file_path0] = build_file_data0 - self.data["target_build_files"].add(build_file_path0) - for new_dependency in dependencies0: - if new_dependency not in self.scheduled: - self.scheduled.add(new_dependency) - self.dependencies.append(new_dependency) - self.pending -= 1 - self.condition.notify() - self.condition.release() - - -def LoadTargetBuildFilesParallel( - build_files, data, variables, includes, depth, check, generator_input_info -): - parallel_state = ParallelState() - parallel_state.condition = threading.Condition() - # Make copies of the build_files argument that we can modify while working. - parallel_state.dependencies = list(build_files) - parallel_state.scheduled = set(build_files) - parallel_state.pending = 0 - parallel_state.data = data - - try: - parallel_state.condition.acquire() - while parallel_state.dependencies or parallel_state.pending: - if parallel_state.error: - break - if not parallel_state.dependencies: - parallel_state.condition.wait() - continue - - dependency = parallel_state.dependencies.pop() - - parallel_state.pending += 1 - global_flags = { - "path_sections": globals()["path_sections"], - "non_configuration_keys": globals()["non_configuration_keys"], - "multiple_toolsets": globals()["multiple_toolsets"], - } - - if not parallel_state.pool: - parallel_state.pool = multiprocessing.Pool(multiprocessing.cpu_count()) - parallel_state.pool.apply_async( - CallLoadTargetBuildFile, - args=( - global_flags, - dependency, - variables, - includes, - depth, - check, - generator_input_info, - ), - callback=parallel_state.LoadTargetBuildFileCallback, - ) - except KeyboardInterrupt as e: - parallel_state.pool.terminate() - raise e - - parallel_state.condition.release() - - parallel_state.pool.close() - parallel_state.pool.join() - parallel_state.pool = None - - if parallel_state.error: - sys.exit(1) - - -# Look for the bracket that matches the first bracket seen in a -# string, and return the start and end as a tuple. For example, if -# the input is something like "<(foo <(bar)) blah", then it would -# return (1, 13), indicating the entire string except for the leading -# "<" and trailing " blah". -LBRACKETS = set("{[(") -BRACKETS = {"}": "{", "]": "[", ")": "("} - - -def FindEnclosingBracketGroup(input_str): - stack = [] - start = -1 - for index, char in enumerate(input_str): - if char in LBRACKETS: - stack.append(char) - if start == -1: - start = index - elif char in BRACKETS: - if not stack: - return (-1, -1) - if stack.pop() != BRACKETS[char]: - return (-1, -1) - if not stack: - return (start, index + 1) - return (-1, -1) - - -def IsStrCanonicalInt(string): - """Returns True if |string| is in its canonical integer form. - - The canonical form is such that str(int(string)) == string. - """ - if type(string) is str: - # This function is called a lot so for maximum performance, avoid - # involving regexps which would otherwise make the code much - # shorter. Regexps would need twice the time of this function. - if string: - if string == "0": - return True - if string[0] == "-": - string = string[1:] - if not string: - return False - if "1" <= string[0] <= "9": - return string.isdigit() - - return False - - -# This matches things like "<(asdf)", "(?P<(?:(?:!?@?)|\|)?)" - r"(?P[-a-zA-Z0-9_.]+)?" - r"\((?P\s*\[?)" - r"(?P.*?)(\]?)\))" -) - -# This matches the same as early_variable_re, but with '>' instead of '<'. -late_variable_re = re.compile( - r"(?P(?P>(?:(?:!?@?)|\|)?)" - r"(?P[-a-zA-Z0-9_.]+)?" - r"\((?P\s*\[?)" - r"(?P.*?)(\]?)\))" -) - -# This matches the same as early_variable_re, but with '^' instead of '<'. -latelate_variable_re = re.compile( - r"(?P(?P[\^](?:(?:!?@?)|\|)?)" - r"(?P[-a-zA-Z0-9_.]+)?" - r"\((?P\s*\[?)" - r"(?P.*?)(\]?)\))" -) - -# Global cache of results from running commands so they don't have to be run -# more then once. -cached_command_results = {} - - -def FixupPlatformCommand(cmd): - if sys.platform == "win32": - if type(cmd) is list: - cmd = [re.sub("^cat ", "type ", cmd[0])] + cmd[1:] - else: - cmd = re.sub("^cat ", "type ", cmd) - return cmd - - -PHASE_EARLY = 0 -PHASE_LATE = 1 -PHASE_LATELATE = 2 - - -def ExpandVariables(input, phase, variables, build_file): - # Look for the pattern that gets expanded into variables - if phase == PHASE_EARLY: - variable_re = early_variable_re - expansion_symbol = "<" - elif phase == PHASE_LATE: - variable_re = late_variable_re - expansion_symbol = ">" - elif phase == PHASE_LATELATE: - variable_re = latelate_variable_re - expansion_symbol = "^" - else: - assert False - - input_str = str(input) - if IsStrCanonicalInt(input_str): - return int(input_str) - - # Do a quick scan to determine if an expensive regex search is warranted. - if expansion_symbol not in input_str: - return input_str - - # Get the entire list of matches as a list of MatchObject instances. - # (using findall here would return strings instead of MatchObjects). - matches = list(variable_re.finditer(input_str)) - if not matches: - return input_str - - output = input_str - # Reverse the list of matches so that replacements are done right-to-left. - # That ensures that earlier replacements won't mess up the string in a - # way that causes later calls to find the earlier substituted text instead - # of what's intended for replacement. - matches.reverse() - for match_group in matches: - match = match_group.groupdict() - gyp.DebugOutput(gyp.DEBUG_VARIABLES, "Matches: %r", match) - # match['replace'] is the substring to look for, match['type'] - # is the character code for the replacement type (< > ! <| >| <@ - # >@ !@), match['is_array'] contains a '[' for command - # arrays, and match['content'] is the name of the variable (< >) - # or command to run (!). match['command_string'] is an optional - # command string. Currently, only 'pymod_do_main' is supported. - - # run_command is true if a ! variant is used. - run_command = "!" in match["type"] - command_string = match["command_string"] - - # file_list is true if a | variant is used. - file_list = "|" in match["type"] - - # Capture these now so we can adjust them later. - replace_start = match_group.start("replace") - replace_end = match_group.end("replace") - - # Find the ending paren, and re-evaluate the contained string. - (c_start, c_end) = FindEnclosingBracketGroup(input_str[replace_start:]) - - # Adjust the replacement range to match the entire command - # found by FindEnclosingBracketGroup (since the variable_re - # probably doesn't match the entire command if it contained - # nested variables). - replace_end = replace_start + c_end - - # Find the "real" replacement, matching the appropriate closing - # paren, and adjust the replacement start and end. - replacement = input_str[replace_start:replace_end] - - # Figure out what the contents of the variable parens are. - contents_start = replace_start + c_start + 1 - contents_end = replace_end - 1 - contents = input_str[contents_start:contents_end] - - # Do filter substitution now for <|(). - # Admittedly, this is different than the evaluation order in other - # contexts. However, since filtration has no chance to run on <|(), - # this seems like the only obvious way to give them access to filters. - if file_list: - processed_variables = gyp.simple_copy.deepcopy(variables) - ProcessListFiltersInDict(contents, processed_variables) - # Recurse to expand variables in the contents - contents = ExpandVariables(contents, phase, processed_variables, build_file) - else: - # Recurse to expand variables in the contents - contents = ExpandVariables(contents, phase, variables, build_file) - - # Strip off leading/trailing whitespace so that variable matches are - # simpler below (and because they are rarely needed). - contents = contents.strip() - - # expand_to_list is true if an @ variant is used. In that case, - # the expansion should result in a list. Note that the caller - # is to be expecting a list in return, and not all callers do - # because not all are working in list context. Also, for list - # expansions, there can be no other text besides the variable - # expansion in the input string. - expand_to_list = "@" in match["type"] and input_str == replacement - - if run_command or file_list: - # Find the build file's directory, so commands can be run or file lists - # generated relative to it. - build_file_dir = os.path.dirname(build_file) - if build_file_dir == "" and not file_list: - # If build_file is just a leaf filename indicating a file in the - # current directory, build_file_dir might be an empty string. Set - # it to None to signal to subprocess.Popen that it should run the - # command in the current directory. - build_file_dir = None - - # Support <|(listfile.txt ...) which generates a file - # containing items from a gyp list, generated at gyp time. - # This works around actions/rules which have more inputs than will - # fit on the command line. - if file_list: - if type(contents) is list: - contents_list = contents - else: - contents_list = contents.split(" ") - replacement = contents_list[0] - if os.path.isabs(replacement): - raise GypError('| cannot handle absolute paths, got "%s"' % replacement) - - if not generator_filelist_paths: - path = os.path.join(build_file_dir, replacement) - else: - if os.path.isabs(build_file_dir): - toplevel = generator_filelist_paths["toplevel"] - rel_build_file_dir = gyp.common.RelativePath( - build_file_dir, toplevel - ) - else: - rel_build_file_dir = build_file_dir - qualified_out_dir = generator_filelist_paths["qualified_out_dir"] - path = os.path.join(qualified_out_dir, rel_build_file_dir, replacement) - gyp.common.EnsureDirExists(path) - - replacement = gyp.common.RelativePath(path, build_file_dir) - f = gyp.common.WriteOnDiff(path) - for i in contents_list[1:]: - f.write("%s\n" % i) - f.close() - - elif run_command: - use_shell = True - if match["is_array"]: - contents = eval(contents) - use_shell = False - - # Check for a cached value to avoid executing commands, or generating - # file lists more than once. The cache key contains the command to be - # run as well as the directory to run it from, to account for commands - # that depend on their current directory. - # TODO(http://code.google.com/p/gyp/issues/detail?id=111): In theory, - # someone could author a set of GYP files where each time the command - # is invoked it produces different output by design. When the need - # arises, the syntax should be extended to support no caching off a - # command's output so it is run every time. - cache_key = (str(contents), build_file_dir) - cached_value = cached_command_results.get(cache_key, None) - if cached_value is None: - gyp.DebugOutput( - gyp.DEBUG_VARIABLES, - "Executing command '%s' in directory '%s'", - contents, - build_file_dir, - ) - - replacement = "" - - if command_string == "pymod_do_main": - # (sources/) etc. to resolve to - # and empty list if undefined. This allows actions to: - # 'action!': [ - # '>@(_sources!)', - # ], - # 'action/': [ - # '>@(_sources/)', - # ], - replacement = [] - else: - raise GypError( - "Undefined variable " + contents + " in " + build_file - ) - else: - replacement = variables[contents] - - if isinstance(replacement, bytes) and not isinstance(replacement, str): - replacement = replacement.decode("utf-8") # done on Python 3 only - if type(replacement) is list: - for item in replacement: - if isinstance(item, bytes) and not isinstance(item, str): - item = item.decode("utf-8") # done on Python 3 only - if not contents[-1] == "/" and type(item) not in (str, int): - raise GypError( - "Variable " - + contents - + " must expand to a string or list of strings; " - + "list contains a " - + item.__class__.__name__ - ) - # Run through the list and handle variable expansions in it. Since - # the list is guaranteed not to contain dicts, this won't do anything - # with conditions sections. - ProcessVariablesAndConditionsInList( - replacement, phase, variables, build_file - ) - elif type(replacement) not in (str, int): - raise GypError( - "Variable " - + contents - + " must expand to a string or list of strings; " - + "found a " - + replacement.__class__.__name__ - ) - - if expand_to_list: - # Expanding in list context. It's guaranteed that there's only one - # replacement to do in |input_str| and that it's this replacement. See - # above. - if type(replacement) is list: - # If it's already a list, make a copy. - output = replacement[:] - else: - # Split it the same way sh would split arguments. - output = shlex.split(str(replacement)) - else: - # Expanding in string context. - encoded_replacement = "" - if type(replacement) is list: - # When expanding a list into string context, turn the list items - # into a string in a way that will work with a subprocess call. - # - # TODO(mark): This isn't completely correct. This should - # call a generator-provided function that observes the - # proper list-to-argument quoting rules on a specific - # platform instead of just calling the POSIX encoding - # routine. - encoded_replacement = gyp.common.EncodePOSIXShellList(replacement) - else: - encoded_replacement = replacement - - output = ( - output[:replace_start] + str(encoded_replacement) + output[replace_end:] - ) - # Prepare for the next match iteration. - input_str = output - - if output == input: - gyp.DebugOutput( - gyp.DEBUG_VARIABLES, - "Found only identity matches on %r, avoiding infinite " "recursion.", - output, - ) - else: - # Look for more matches now that we've replaced some, to deal with - # expanding local variables (variables defined in the same - # variables block as this one). - gyp.DebugOutput(gyp.DEBUG_VARIABLES, "Found output %r, recursing.", output) - if type(output) is list: - if output and type(output[0]) is list: - # Leave output alone if it's a list of lists. - # We don't want such lists to be stringified. - pass - else: - new_output = [] - for item in output: - new_output.append( - ExpandVariables(item, phase, variables, build_file) - ) - output = new_output - else: - output = ExpandVariables(output, phase, variables, build_file) - - # Convert all strings that are canonically-represented integers into integers. - if type(output) is list: - for index, outstr in enumerate(output): - if IsStrCanonicalInt(outstr): - output[index] = int(outstr) - elif IsStrCanonicalInt(output): - output = int(output) - - return output - - -# The same condition is often evaluated over and over again so it -# makes sense to cache as much as possible between evaluations. -cached_conditions_asts = {} - - -def EvalCondition(condition, conditions_key, phase, variables, build_file): - """Returns the dict that should be used or None if the result was - that nothing should be used.""" - if type(condition) is not list: - raise GypError(conditions_key + " must be a list") - if len(condition) < 2: - # It's possible that condition[0] won't work in which case this - # attempt will raise its own IndexError. That's probably fine. - raise GypError( - conditions_key - + " " - + condition[0] - + " must be at least length 2, not " - + str(len(condition)) - ) - - i = 0 - result = None - while i < len(condition): - cond_expr = condition[i] - true_dict = condition[i + 1] - if type(true_dict) is not dict: - raise GypError( - "{} {} must be followed by a dictionary, not {}".format( - conditions_key, cond_expr, type(true_dict) - ) - ) - if len(condition) > i + 2 and type(condition[i + 2]) is dict: - false_dict = condition[i + 2] - i = i + 3 - if i != len(condition): - raise GypError( - "{} {} has {} unexpected trailing items".format( - conditions_key, cond_expr, len(condition) - i - ) - ) - else: - false_dict = None - i = i + 2 - if result is None: - result = EvalSingleCondition( - cond_expr, true_dict, false_dict, phase, variables, build_file - ) - - return result - - -def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, build_file): - """Returns true_dict if cond_expr evaluates to true, and false_dict - otherwise.""" - # Do expansions on the condition itself. Since the condition can naturally - # contain variable references without needing to resort to GYP expansion - # syntax, this is of dubious value for variables, but someone might want to - # use a command expansion directly inside a condition. - cond_expr_expanded = ExpandVariables(cond_expr, phase, variables, build_file) - if type(cond_expr_expanded) not in (str, int): - raise ValueError( - "Variable expansion in this context permits str and int " - + "only, found " - + cond_expr_expanded.__class__.__name__ - ) - - try: - if cond_expr_expanded in cached_conditions_asts: - ast_code = cached_conditions_asts[cond_expr_expanded] - else: - ast_code = compile(cond_expr_expanded, "", "eval") - cached_conditions_asts[cond_expr_expanded] = ast_code - env = {"__builtins__": {}, "v": StrictVersion} - if eval(ast_code, env, variables): - return true_dict - return false_dict - except SyntaxError as e: - syntax_error = SyntaxError( - "%s while evaluating condition '%s' in %s " - "at character %d." % (str(e.args[0]), e.text, build_file, e.offset), - e.filename, - e.lineno, - e.offset, - e.text, - ) - raise syntax_error - except NameError as e: - gyp.common.ExceptionAppend( - e, - f"while evaluating condition '{cond_expr_expanded}' in {build_file}", - ) - raise GypError(e) - - -def ProcessConditionsInDict(the_dict, phase, variables, build_file): - # Process a 'conditions' or 'target_conditions' section in the_dict, - # depending on phase. - # early -> conditions - # late -> target_conditions - # latelate -> no conditions - # - # Each item in a conditions list consists of cond_expr, a string expression - # evaluated as the condition, and true_dict, a dict that will be merged into - # the_dict if cond_expr evaluates to true. Optionally, a third item, - # false_dict, may be present. false_dict is merged into the_dict if - # cond_expr evaluates to false. - # - # Any dict merged into the_dict will be recursively processed for nested - # conditionals and other expansions, also according to phase, immediately - # prior to being merged. - - if phase == PHASE_EARLY: - conditions_key = "conditions" - elif phase == PHASE_LATE: - conditions_key = "target_conditions" - elif phase == PHASE_LATELATE: - return - else: - assert False - - if conditions_key not in the_dict: - return - - conditions_list = the_dict[conditions_key] - # Unhook the conditions list, it's no longer needed. - del the_dict[conditions_key] - - for condition in conditions_list: - merge_dict = EvalCondition( - condition, conditions_key, phase, variables, build_file - ) - - if merge_dict is not None: - # Expand variables and nested conditinals in the merge_dict before - # merging it. - ProcessVariablesAndConditionsInDict( - merge_dict, phase, variables, build_file - ) - - MergeDicts(the_dict, merge_dict, build_file, build_file) - - -def LoadAutomaticVariablesFromDict(variables, the_dict): - # Any keys with plain string values in the_dict become automatic variables. - # The variable name is the key name with a "_" character prepended. - for key, value in the_dict.items(): - if type(value) in (str, int, list): - variables["_" + key] = value - - -def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key): - # Any keys in the_dict's "variables" dict, if it has one, becomes a - # variable. The variable name is the key name in the "variables" dict. - # Variables that end with the % character are set only if they are unset in - # the variables dict. the_dict_key is the name of the key that accesses - # the_dict in the_dict's parent dict. If the_dict's parent is not a dict - # (it could be a list or it could be parentless because it is a root dict), - # the_dict_key will be None. - for key, value in the_dict.get("variables", {}).items(): - if type(value) not in (str, int, list): - continue - - if key.endswith("%"): - variable_name = key[:-1] - if variable_name in variables: - # If the variable is already set, don't set it. - continue - if the_dict_key == "variables" and variable_name in the_dict: - # If the variable is set without a % in the_dict, and the_dict is a - # variables dict (making |variables| a variables sub-dict of a - # variables dict), use the_dict's definition. - value = the_dict[variable_name] - else: - variable_name = key - - variables[variable_name] = value - - -def ProcessVariablesAndConditionsInDict( - the_dict, phase, variables_in, build_file, the_dict_key=None -): - """Handle all variable and command expansion and conditional evaluation. - - This function is the public entry point for all variable expansions and - conditional evaluations. The variables_in dictionary will not be modified - by this function. - """ - - # Make a copy of the variables_in dict that can be modified during the - # loading of automatics and the loading of the variables dict. - variables = variables_in.copy() - LoadAutomaticVariablesFromDict(variables, the_dict) - - if "variables" in the_dict: - # Make sure all the local variables are added to the variables - # list before we process them so that you can reference one - # variable from another. They will be fully expanded by recursion - # in ExpandVariables. - for key, value in the_dict["variables"].items(): - variables[key] = value - - # Handle the associated variables dict first, so that any variable - # references within can be resolved prior to using them as variables. - # Pass a copy of the variables dict to avoid having it be tainted. - # Otherwise, it would have extra automatics added for everything that - # should just be an ordinary variable in this scope. - ProcessVariablesAndConditionsInDict( - the_dict["variables"], phase, variables, build_file, "variables" - ) - - LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) - - for key, value in the_dict.items(): - # Skip "variables", which was already processed if present. - if key != "variables" and type(value) is str: - expanded = ExpandVariables(value, phase, variables, build_file) - if type(expanded) not in (str, int): - raise ValueError( - "Variable expansion in this context permits str and int " - + "only, found " - + expanded.__class__.__name__ - + " for " - + key - ) - the_dict[key] = expanded - - # Variable expansion may have resulted in changes to automatics. Reload. - # TODO(mark): Optimization: only reload if no changes were made. - variables = variables_in.copy() - LoadAutomaticVariablesFromDict(variables, the_dict) - LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) - - # Process conditions in this dict. This is done after variable expansion - # so that conditions may take advantage of expanded variables. For example, - # if the_dict contains: - # {'type': '<(library_type)', - # 'conditions': [['_type=="static_library"', { ... }]]}, - # _type, as used in the condition, will only be set to the value of - # library_type if variable expansion is performed before condition - # processing. However, condition processing should occur prior to recursion - # so that variables (both automatic and "variables" dict type) may be - # adjusted by conditions sections, merged into the_dict, and have the - # intended impact on contained dicts. - # - # This arrangement means that a "conditions" section containing a "variables" - # section will only have those variables effective in subdicts, not in - # the_dict. The workaround is to put a "conditions" section within a - # "variables" section. For example: - # {'conditions': [['os=="mac"', {'variables': {'define': 'IS_MAC'}}]], - # 'defines': ['<(define)'], - # 'my_subdict': {'defines': ['<(define)']}}, - # will not result in "IS_MAC" being appended to the "defines" list in the - # current scope but would result in it being appended to the "defines" list - # within "my_subdict". By comparison: - # {'variables': {'conditions': [['os=="mac"', {'define': 'IS_MAC'}]]}, - # 'defines': ['<(define)'], - # 'my_subdict': {'defines': ['<(define)']}}, - # will append "IS_MAC" to both "defines" lists. - - # Evaluate conditions sections, allowing variable expansions within them - # as well as nested conditionals. This will process a 'conditions' or - # 'target_conditions' section, perform appropriate merging and recursive - # conditional and variable processing, and then remove the conditions section - # from the_dict if it is present. - ProcessConditionsInDict(the_dict, phase, variables, build_file) - - # Conditional processing may have resulted in changes to automatics or the - # variables dict. Reload. - variables = variables_in.copy() - LoadAutomaticVariablesFromDict(variables, the_dict) - LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) - - # Recurse into child dicts, or process child lists which may result in - # further recursion into descendant dicts. - for key, value in the_dict.items(): - # Skip "variables" and string values, which were already processed if - # present. - if key == "variables" or type(value) is str: - continue - if type(value) is dict: - # Pass a copy of the variables dict so that subdicts can't influence - # parents. - ProcessVariablesAndConditionsInDict( - value, phase, variables, build_file, key - ) - elif type(value) is list: - # The list itself can't influence the variables dict, and - # ProcessVariablesAndConditionsInList will make copies of the variables - # dict if it needs to pass it to something that can influence it. No - # copy is necessary here. - ProcessVariablesAndConditionsInList(value, phase, variables, build_file) - elif type(value) is not int: - raise TypeError("Unknown type " + value.__class__.__name__ + " for " + key) - - -def ProcessVariablesAndConditionsInList(the_list, phase, variables, build_file): - # Iterate using an index so that new values can be assigned into the_list. - index = 0 - while index < len(the_list): - item = the_list[index] - if type(item) is dict: - # Make a copy of the variables dict so that it won't influence anything - # outside of its own scope. - ProcessVariablesAndConditionsInDict(item, phase, variables, build_file) - elif type(item) is list: - ProcessVariablesAndConditionsInList(item, phase, variables, build_file) - elif type(item) is str: - expanded = ExpandVariables(item, phase, variables, build_file) - if type(expanded) in (str, int): - the_list[index] = expanded - elif type(expanded) is list: - the_list[index : index + 1] = expanded - index += len(expanded) - - # index now identifies the next item to examine. Continue right now - # without falling into the index increment below. - continue - else: - raise ValueError( - "Variable expansion in this context permits strings and " - + "lists only, found " - + expanded.__class__.__name__ - + " at " - + index - ) - elif type(item) is not int: - raise TypeError( - "Unknown type " + item.__class__.__name__ + " at index " + index - ) - index = index + 1 - - -def BuildTargetsDict(data): - """Builds a dict mapping fully-qualified target names to their target dicts. - - |data| is a dict mapping loaded build files by pathname relative to the - current directory. Values in |data| are build file contents. For each - |data| value with a "targets" key, the value of the "targets" key is taken - as a list containing target dicts. Each target's fully-qualified name is - constructed from the pathname of the build file (|data| key) and its - "target_name" property. These fully-qualified names are used as the keys - in the returned dict. These keys provide access to the target dicts, - the dicts in the "targets" lists. - """ - - targets = {} - for build_file in data["target_build_files"]: - for target in data[build_file].get("targets", []): - target_name = gyp.common.QualifiedTarget( - build_file, target["target_name"], target["toolset"] - ) - if target_name in targets: - raise GypError("Duplicate target definitions for " + target_name) - targets[target_name] = target - - return targets - - -def QualifyDependencies(targets): - """Make dependency links fully-qualified relative to the current directory. - - |targets| is a dict mapping fully-qualified target names to their target - dicts. For each target in this dict, keys known to contain dependency - links are examined, and any dependencies referenced will be rewritten - so that they are fully-qualified and relative to the current directory. - All rewritten dependencies are suitable for use as keys to |targets| or a - similar dict. - """ - - all_dependency_sections = [ - dep + op for dep in dependency_sections for op in ("", "!", "/") - ] - - for target, target_dict in targets.items(): - target_build_file = gyp.common.BuildFile(target) - toolset = target_dict["toolset"] - for dependency_key in all_dependency_sections: - dependencies = target_dict.get(dependency_key, []) - for index, dep in enumerate(dependencies): - dep_file, dep_target, dep_toolset = gyp.common.ResolveTarget( - target_build_file, dep, toolset - ) - if not multiple_toolsets: - # Ignore toolset specification in the dependency if it is specified. - dep_toolset = toolset - dependency = gyp.common.QualifiedTarget( - dep_file, dep_target, dep_toolset - ) - dependencies[index] = dependency - - # Make sure anything appearing in a list other than "dependencies" also - # appears in the "dependencies" list. - if ( - dependency_key != "dependencies" - and dependency not in target_dict["dependencies"] - ): - raise GypError( - "Found " - + dependency - + " in " - + dependency_key - + " of " - + target - + ", but not in dependencies" - ) - - -def ExpandWildcardDependencies(targets, data): - """Expands dependencies specified as build_file:*. - - For each target in |targets|, examines sections containing links to other - targets. If any such section contains a link of the form build_file:*, it - is taken as a wildcard link, and is expanded to list each target in - build_file. The |data| dict provides access to build file dicts. - - Any target that does not wish to be included by wildcard can provide an - optional "suppress_wildcard" key in its target dict. When present and - true, a wildcard dependency link will not include such targets. - - All dependency names, including the keys to |targets| and the values in each - dependency list, must be qualified when this function is called. - """ - - for target, target_dict in targets.items(): - target_build_file = gyp.common.BuildFile(target) - for dependency_key in dependency_sections: - dependencies = target_dict.get(dependency_key, []) - - # Loop this way instead of "for dependency in" or "for index in range" - # because the dependencies list will be modified within the loop body. - index = 0 - while index < len(dependencies): - ( - dependency_build_file, - dependency_target, - dependency_toolset, - ) = gyp.common.ParseQualifiedTarget(dependencies[index]) - if dependency_target != "*" and dependency_toolset != "*": - # Not a wildcard. Keep it moving. - index = index + 1 - continue - - if dependency_build_file == target_build_file: - # It's an error for a target to depend on all other targets in - # the same file, because a target cannot depend on itself. - raise GypError( - "Found wildcard in " - + dependency_key - + " of " - + target - + " referring to same build file" - ) - - # Take the wildcard out and adjust the index so that the next - # dependency in the list will be processed the next time through the - # loop. - del dependencies[index] - index = index - 1 - - # Loop through the targets in the other build file, adding them to - # this target's list of dependencies in place of the removed - # wildcard. - dependency_target_dicts = data[dependency_build_file]["targets"] - for dependency_target_dict in dependency_target_dicts: - if int(dependency_target_dict.get("suppress_wildcard", False)): - continue - dependency_target_name = dependency_target_dict["target_name"] - if ( - dependency_target != "*" - and dependency_target != dependency_target_name - ): - continue - dependency_target_toolset = dependency_target_dict["toolset"] - if ( - dependency_toolset != "*" - and dependency_toolset != dependency_target_toolset - ): - continue - dependency = gyp.common.QualifiedTarget( - dependency_build_file, - dependency_target_name, - dependency_target_toolset, - ) - index = index + 1 - dependencies.insert(index, dependency) - - index = index + 1 - - -def Unify(items): - """Removes duplicate elements from items, keeping the first element.""" - seen = {} - return [seen.setdefault(e, e) for e in items if e not in seen] - - -def RemoveDuplicateDependencies(targets): - """Makes sure every dependency appears only once in all targets's dependency - lists.""" - for target_name, target_dict in targets.items(): - for dependency_key in dependency_sections: - dependencies = target_dict.get(dependency_key, []) - if dependencies: - target_dict[dependency_key] = Unify(dependencies) - - -def Filter(items, item): - """Removes item from items.""" - res = {} - return [res.setdefault(e, e) for e in items if e != item] - - -def RemoveSelfDependencies(targets): - """Remove self dependencies from targets that have the prune_self_dependency - variable set.""" - for target_name, target_dict in targets.items(): - for dependency_key in dependency_sections: - dependencies = target_dict.get(dependency_key, []) - if dependencies: - for t in dependencies: - if t == target_name: - if ( - targets[t] - .get("variables", {}) - .get("prune_self_dependency", 0) - ): - target_dict[dependency_key] = Filter( - dependencies, target_name - ) - - -def RemoveLinkDependenciesFromNoneTargets(targets): - """Remove dependencies having the 'link_dependency' attribute from the 'none' - targets.""" - for target_name, target_dict in targets.items(): - for dependency_key in dependency_sections: - dependencies = target_dict.get(dependency_key, []) - if dependencies: - for t in dependencies: - if target_dict.get("type", None) == "none": - if targets[t].get("variables", {}).get("link_dependency", 0): - target_dict[dependency_key] = Filter( - target_dict[dependency_key], t - ) - - -class DependencyGraphNode: - """ - - Attributes: - ref: A reference to an object that this DependencyGraphNode represents. - dependencies: List of DependencyGraphNodes on which this one depends. - dependents: List of DependencyGraphNodes that depend on this one. - """ - - class CircularException(GypError): - pass - - def __init__(self, ref): - self.ref = ref - self.dependencies = [] - self.dependents = [] - - def __repr__(self): - return "" % self.ref - - def FlattenToList(self): - # flat_list is the sorted list of dependencies - actually, the list items - # are the "ref" attributes of DependencyGraphNodes. Every target will - # appear in flat_list after all of its dependencies, and before all of its - # dependents. - flat_list = OrderedSet() - - def ExtractNodeRef(node): - """Extracts the object that the node represents from the given node.""" - return node.ref - - # in_degree_zeros is the list of DependencyGraphNodes that have no - # dependencies not in flat_list. Initially, it is a copy of the children - # of this node, because when the graph was built, nodes with no - # dependencies were made implicit dependents of the root node. - in_degree_zeros = sorted(self.dependents[:], key=ExtractNodeRef) - - while in_degree_zeros: - # Nodes in in_degree_zeros have no dependencies not in flat_list, so they - # can be appended to flat_list. Take these nodes out of in_degree_zeros - # as work progresses, so that the next node to process from the list can - # always be accessed at a consistent position. - node = in_degree_zeros.pop() - flat_list.add(node.ref) - - # Look at dependents of the node just added to flat_list. Some of them - # may now belong in in_degree_zeros. - for node_dependent in sorted(node.dependents, key=ExtractNodeRef): - is_in_degree_zero = True - # TODO: We want to check through the - # node_dependent.dependencies list but if it's long and we - # always start at the beginning, then we get O(n^2) behaviour. - for node_dependent_dependency in sorted( - node_dependent.dependencies, key=ExtractNodeRef - ): - if node_dependent_dependency.ref not in flat_list: - # The dependent one or more dependencies not in flat_list. - # There will be more chances to add it to flat_list - # when examining it again as a dependent of those other - # dependencies, provided that there are no cycles. - is_in_degree_zero = False - break - - if is_in_degree_zero: - # All of the dependent's dependencies are already in flat_list. Add - # it to in_degree_zeros where it will be processed in a future - # iteration of the outer loop. - in_degree_zeros += [node_dependent] - - return list(flat_list) - - def FindCycles(self): - """ - Returns a list of cycles in the graph, where each cycle is its own list. - """ - results = [] - visited = set() - - def Visit(node, path): - for child in node.dependents: - if child in path: - results.append([child] + path[: path.index(child) + 1]) - elif child not in visited: - visited.add(child) - Visit(child, [child] + path) - - visited.add(self) - Visit(self, [self]) - - return results - - def DirectDependencies(self, dependencies=None): - """Returns a list of just direct dependencies.""" - if dependencies is None: - dependencies = [] - - for dependency in self.dependencies: - # Check for None, corresponding to the root node. - if dependency.ref and dependency.ref not in dependencies: - dependencies.append(dependency.ref) - - return dependencies - - def _AddImportedDependencies(self, targets, dependencies=None): - """Given a list of direct dependencies, adds indirect dependencies that - other dependencies have declared to export their settings. - - This method does not operate on self. Rather, it operates on the list - of dependencies in the |dependencies| argument. For each dependency in - that list, if any declares that it exports the settings of one of its - own dependencies, those dependencies whose settings are "passed through" - are added to the list. As new items are added to the list, they too will - be processed, so it is possible to import settings through multiple levels - of dependencies. - - This method is not terribly useful on its own, it depends on being - "primed" with a list of direct dependencies such as one provided by - DirectDependencies. DirectAndImportedDependencies is intended to be the - public entry point. - """ - - if dependencies is None: - dependencies = [] - - index = 0 - while index < len(dependencies): - dependency = dependencies[index] - dependency_dict = targets[dependency] - # Add any dependencies whose settings should be imported to the list - # if not already present. Newly-added items will be checked for - # their own imports when the list iteration reaches them. - # Rather than simply appending new items, insert them after the - # dependency that exported them. This is done to more closely match - # the depth-first method used by DeepDependencies. - add_index = 1 - for imported_dependency in dependency_dict.get( - "export_dependent_settings", [] - ): - if imported_dependency not in dependencies: - dependencies.insert(index + add_index, imported_dependency) - add_index = add_index + 1 - index = index + 1 - - return dependencies - - def DirectAndImportedDependencies(self, targets, dependencies=None): - """Returns a list of a target's direct dependencies and all indirect - dependencies that a dependency has advertised settings should be exported - through the dependency for. - """ - - dependencies = self.DirectDependencies(dependencies) - return self._AddImportedDependencies(targets, dependencies) - - def DeepDependencies(self, dependencies=None): - """Returns an OrderedSet of all of a target's dependencies, recursively.""" - if dependencies is None: - # Using a list to get ordered output and a set to do fast "is it - # already added" checks. - dependencies = OrderedSet() - - for dependency in self.dependencies: - # Check for None, corresponding to the root node. - if dependency.ref is None: - continue - if dependency.ref not in dependencies: - dependency.DeepDependencies(dependencies) - dependencies.add(dependency.ref) - - return dependencies - - def _LinkDependenciesInternal( - self, targets, include_shared_libraries, dependencies=None, initial=True - ): - """Returns an OrderedSet of dependency targets that are linked - into this target. - - This function has a split personality, depending on the setting of - |initial|. Outside callers should always leave |initial| at its default - setting. - - When adding a target to the list of dependencies, this function will - recurse into itself with |initial| set to False, to collect dependencies - that are linked into the linkable target for which the list is being built. - - If |include_shared_libraries| is False, the resulting dependencies will not - include shared_library targets that are linked into this target. - """ - if dependencies is None: - # Using a list to get ordered output and a set to do fast "is it - # already added" checks. - dependencies = OrderedSet() - - # Check for None, corresponding to the root node. - if self.ref is None: - return dependencies - - # It's kind of sucky that |targets| has to be passed into this function, - # but that's presently the easiest way to access the target dicts so that - # this function can find target types. - - if "target_name" not in targets[self.ref]: - raise GypError("Missing 'target_name' field in target.") - - if "type" not in targets[self.ref]: - raise GypError( - "Missing 'type' field in target %s" % targets[self.ref]["target_name"] - ) - - target_type = targets[self.ref]["type"] - - is_linkable = target_type in linkable_types - - if initial and not is_linkable: - # If this is the first target being examined and it's not linkable, - # return an empty list of link dependencies, because the link - # dependencies are intended to apply to the target itself (initial is - # True) and this target won't be linked. - return dependencies - - # Don't traverse 'none' targets if explicitly excluded. - if target_type == "none" and not targets[self.ref].get( - "dependencies_traverse", True - ): - dependencies.add(self.ref) - return dependencies - - # Executables, mac kernel extensions, windows drivers and loadable modules - # are already fully and finally linked. Nothing else can be a link - # dependency of them, there can only be dependencies in the sense that a - # dependent target might run an executable or load the loadable_module. - if not initial and target_type in ( - "executable", - "loadable_module", - "mac_kernel_extension", - "windows_driver", - ): - return dependencies - - # Shared libraries are already fully linked. They should only be included - # in |dependencies| when adjusting static library dependencies (in order to - # link against the shared_library's import lib), but should not be included - # in |dependencies| when propagating link_settings. - # The |include_shared_libraries| flag controls which of these two cases we - # are handling. - if ( - not initial - and target_type == "shared_library" - and not include_shared_libraries - ): - return dependencies - - # The target is linkable, add it to the list of link dependencies. - if self.ref not in dependencies: - dependencies.add(self.ref) - if initial or not is_linkable: - # If this is a subsequent target and it's linkable, don't look any - # further for linkable dependencies, as they'll already be linked into - # this target linkable. Always look at dependencies of the initial - # target, and always look at dependencies of non-linkables. - for dependency in self.dependencies: - dependency._LinkDependenciesInternal( - targets, include_shared_libraries, dependencies, False - ) - - return dependencies - - def DependenciesForLinkSettings(self, targets): - """ - Returns a list of dependency targets whose link_settings should be merged - into this target. - """ - - # TODO(sbaig) Currently, chrome depends on the bug that shared libraries' - # link_settings are propagated. So for now, we will allow it, unless the - # 'allow_sharedlib_linksettings_propagation' flag is explicitly set to - # False. Once chrome is fixed, we can remove this flag. - include_shared_libraries = targets[self.ref].get( - "allow_sharedlib_linksettings_propagation", True - ) - return self._LinkDependenciesInternal(targets, include_shared_libraries) - - def DependenciesToLinkAgainst(self, targets): - """ - Returns a list of dependency targets that are linked into this target. - """ - return self._LinkDependenciesInternal(targets, True) - - -def BuildDependencyList(targets): - # Create a DependencyGraphNode for each target. Put it into a dict for easy - # access. - dependency_nodes = {} - for target, spec in targets.items(): - if target not in dependency_nodes: - dependency_nodes[target] = DependencyGraphNode(target) - - # Set up the dependency links. Targets that have no dependencies are treated - # as dependent on root_node. - root_node = DependencyGraphNode(None) - for target, spec in targets.items(): - target_node = dependency_nodes[target] - dependencies = spec.get("dependencies") - if not dependencies: - target_node.dependencies = [root_node] - root_node.dependents.append(target_node) - else: - for dependency in dependencies: - dependency_node = dependency_nodes.get(dependency) - if not dependency_node: - raise GypError( - "Dependency '%s' not found while " - "trying to load target %s" % (dependency, target) - ) - target_node.dependencies.append(dependency_node) - dependency_node.dependents.append(target_node) - - flat_list = root_node.FlattenToList() - - # If there's anything left unvisited, there must be a circular dependency - # (cycle). - if len(flat_list) != len(targets): - if not root_node.dependents: - # If all targets have dependencies, add the first target as a dependent - # of root_node so that the cycle can be discovered from root_node. - target = next(iter(targets)) - target_node = dependency_nodes[target] - target_node.dependencies.append(root_node) - root_node.dependents.append(target_node) - - cycles = [] - for cycle in root_node.FindCycles(): - paths = [node.ref for node in cycle] - cycles.append("Cycle: %s" % " -> ".join(paths)) - raise DependencyGraphNode.CircularException( - "Cycles in dependency graph detected:\n" + "\n".join(cycles) - ) - - return [dependency_nodes, flat_list] - - -def VerifyNoGYPFileCircularDependencies(targets): - # Create a DependencyGraphNode for each gyp file containing a target. Put - # it into a dict for easy access. - dependency_nodes = {} - for target in targets: - build_file = gyp.common.BuildFile(target) - if build_file not in dependency_nodes: - dependency_nodes[build_file] = DependencyGraphNode(build_file) - - # Set up the dependency links. - for target, spec in targets.items(): - build_file = gyp.common.BuildFile(target) - build_file_node = dependency_nodes[build_file] - target_dependencies = spec.get("dependencies", []) - for dependency in target_dependencies: - try: - dependency_build_file = gyp.common.BuildFile(dependency) - except GypError as e: - gyp.common.ExceptionAppend( - e, "while computing dependencies of .gyp file %s" % build_file - ) - raise - - if dependency_build_file == build_file: - # A .gyp file is allowed to refer back to itself. - continue - dependency_node = dependency_nodes.get(dependency_build_file) - if not dependency_node: - raise GypError("Dependency '%s' not found" % dependency_build_file) - if dependency_node not in build_file_node.dependencies: - build_file_node.dependencies.append(dependency_node) - dependency_node.dependents.append(build_file_node) - - # Files that have no dependencies are treated as dependent on root_node. - root_node = DependencyGraphNode(None) - for build_file_node in dependency_nodes.values(): - if len(build_file_node.dependencies) == 0: - build_file_node.dependencies.append(root_node) - root_node.dependents.append(build_file_node) - - flat_list = root_node.FlattenToList() - - # If there's anything left unvisited, there must be a circular dependency - # (cycle). - if len(flat_list) != len(dependency_nodes): - if not root_node.dependents: - # If all files have dependencies, add the first file as a dependent - # of root_node so that the cycle can be discovered from root_node. - file_node = next(iter(dependency_nodes.values())) - file_node.dependencies.append(root_node) - root_node.dependents.append(file_node) - cycles = [] - for cycle in root_node.FindCycles(): - paths = [node.ref for node in cycle] - cycles.append("Cycle: %s" % " -> ".join(paths)) - raise DependencyGraphNode.CircularException( - "Cycles in .gyp file dependency graph detected:\n" + "\n".join(cycles) - ) - - -def DoDependentSettings(key, flat_list, targets, dependency_nodes): - # key should be one of all_dependent_settings, direct_dependent_settings, - # or link_settings. - - for target in flat_list: - target_dict = targets[target] - build_file = gyp.common.BuildFile(target) - - if key == "all_dependent_settings": - dependencies = dependency_nodes[target].DeepDependencies() - elif key == "direct_dependent_settings": - dependencies = dependency_nodes[target].DirectAndImportedDependencies( - targets - ) - elif key == "link_settings": - dependencies = dependency_nodes[target].DependenciesForLinkSettings(targets) - else: - raise GypError( - "DoDependentSettings doesn't know how to determine " - "dependencies for " + key - ) - - for dependency in dependencies: - dependency_dict = targets[dependency] - if key not in dependency_dict: - continue - dependency_build_file = gyp.common.BuildFile(dependency) - MergeDicts( - target_dict, dependency_dict[key], build_file, dependency_build_file - ) - - -def AdjustStaticLibraryDependencies( - flat_list, targets, dependency_nodes, sort_dependencies -): - # Recompute target "dependencies" properties. For each static library - # target, remove "dependencies" entries referring to other static libraries, - # unless the dependency has the "hard_dependency" attribute set. For each - # linkable target, add a "dependencies" entry referring to all of the - # target's computed list of link dependencies (including static libraries - # if no such entry is already present. - for target in flat_list: - target_dict = targets[target] - target_type = target_dict["type"] - - if target_type == "static_library": - if "dependencies" not in target_dict: - continue - - target_dict["dependencies_original"] = target_dict.get("dependencies", [])[ - : - ] - - # A static library should not depend on another static library unless - # the dependency relationship is "hard," which should only be done when - # a dependent relies on some side effect other than just the build - # product, like a rule or action output. Further, if a target has a - # non-hard dependency, but that dependency exports a hard dependency, - # the non-hard dependency can safely be removed, but the exported hard - # dependency must be added to the target to keep the same dependency - # ordering. - dependencies = dependency_nodes[target].DirectAndImportedDependencies( - targets - ) - index = 0 - while index < len(dependencies): - dependency = dependencies[index] - dependency_dict = targets[dependency] - - # Remove every non-hard static library dependency and remove every - # non-static library dependency that isn't a direct dependency. - if ( - dependency_dict["type"] == "static_library" - and not dependency_dict.get("hard_dependency", False) - ) or ( - dependency_dict["type"] != "static_library" - and dependency not in target_dict["dependencies"] - ): - # Take the dependency out of the list, and don't increment index - # because the next dependency to analyze will shift into the index - # formerly occupied by the one being removed. - del dependencies[index] - else: - index = index + 1 - - # Update the dependencies. If the dependencies list is empty, it's not - # needed, so unhook it. - if len(dependencies) > 0: - target_dict["dependencies"] = dependencies - else: - del target_dict["dependencies"] - - elif target_type in linkable_types: - # Get a list of dependency targets that should be linked into this - # target. Add them to the dependencies list if they're not already - # present. - - link_dependencies = dependency_nodes[target].DependenciesToLinkAgainst( - targets - ) - for dependency in link_dependencies: - if dependency == target: - continue - if "dependencies" not in target_dict: - target_dict["dependencies"] = [] - if dependency not in target_dict["dependencies"]: - target_dict["dependencies"].append(dependency) - # Sort the dependencies list in the order from dependents to dependencies. - # e.g. If A and B depend on C and C depends on D, sort them in A, B, C, D. - # Note: flat_list is already sorted in the order from dependencies to - # dependents. - if sort_dependencies and "dependencies" in target_dict: - target_dict["dependencies"] = [ - dep - for dep in reversed(flat_list) - if dep in target_dict["dependencies"] - ] - - -# Initialize this here to speed up MakePathRelative. -exception_re = re.compile(r"""["']?[-/$<>^]""") - - -def MakePathRelative(to_file, fro_file, item): - # If item is a relative path, it's relative to the build file dict that it's - # coming from. Fix it up to make it relative to the build file dict that - # it's going into. - # Exception: any |item| that begins with these special characters is - # returned without modification. - # / Used when a path is already absolute (shortcut optimization; - # such paths would be returned as absolute anyway) - # $ Used for build environment variables - # - Used for some build environment flags (such as -lapr-1 in a - # "libraries" section) - # < Used for our own variable and command expansions (see ExpandVariables) - # > Used for our own variable and command expansions (see ExpandVariables) - # ^ Used for our own variable and command expansions (see ExpandVariables) - # - # "/' Used when a value is quoted. If these are present, then we - # check the second character instead. - # - if to_file == fro_file or exception_re.match(item): - return item - else: - # TODO(dglazkov) The backslash/forward-slash replacement at the end is a - # temporary measure. This should really be addressed by keeping all paths - # in POSIX until actual project generation. - ret = os.path.normpath( - os.path.join( - gyp.common.RelativePath( - os.path.dirname(fro_file), os.path.dirname(to_file) - ), - item, - ) - ).replace("\\", "/") - if item.endswith("/"): - ret += "/" - return ret - - -def MergeLists(to, fro, to_file, fro_file, is_paths=False, append=True): - # Python documentation recommends objects which do not support hash - # set this value to None. Python library objects follow this rule. - def is_hashable(val): - return val.__hash__ - - # If x is hashable, returns whether x is in s. Else returns whether x is in items. - def is_in_set_or_list(x, s, items): - if is_hashable(x): - return x in s - return x in items - - prepend_index = 0 - - # Make membership testing of hashables in |to| (in particular, strings) - # faster. - hashable_to_set = {x for x in to if is_hashable(x)} - for item in fro: - singleton = False - if type(item) in (str, int): - # The cheap and easy case. - if is_paths: - to_item = MakePathRelative(to_file, fro_file, item) - else: - to_item = item - - if not (type(item) is str and item.startswith("-")): - # Any string that doesn't begin with a "-" is a singleton - it can - # only appear once in a list, to be enforced by the list merge append - # or prepend. - singleton = True - elif type(item) is dict: - # Make a copy of the dictionary, continuing to look for paths to fix. - # The other intelligent aspects of merge processing won't apply because - # item is being merged into an empty dict. - to_item = {} - MergeDicts(to_item, item, to_file, fro_file) - elif type(item) is list: - # Recurse, making a copy of the list. If the list contains any - # descendant dicts, path fixing will occur. Note that here, custom - # values for is_paths and append are dropped; those are only to be - # applied to |to| and |fro|, not sublists of |fro|. append shouldn't - # matter anyway because the new |to_item| list is empty. - to_item = [] - MergeLists(to_item, item, to_file, fro_file) - else: - raise TypeError( - "Attempt to merge list item of unsupported type " - + item.__class__.__name__ - ) - - if append: - # If appending a singleton that's already in the list, don't append. - # This ensures that the earliest occurrence of the item will stay put. - if not singleton or not is_in_set_or_list(to_item, hashable_to_set, to): - to.append(to_item) - if is_hashable(to_item): - hashable_to_set.add(to_item) - else: - # If prepending a singleton that's already in the list, remove the - # existing instance and proceed with the prepend. This ensures that the - # item appears at the earliest possible position in the list. - while singleton and to_item in to: - to.remove(to_item) - - # Don't just insert everything at index 0. That would prepend the new - # items to the list in reverse order, which would be an unwelcome - # surprise. - to.insert(prepend_index, to_item) - if is_hashable(to_item): - hashable_to_set.add(to_item) - prepend_index = prepend_index + 1 - - -def MergeDicts(to, fro, to_file, fro_file): - # I wanted to name the parameter "from" but it's a Python keyword... - for k, v in fro.items(): - # It would be nice to do "if not k in to: to[k] = v" but that wouldn't give - # copy semantics. Something else may want to merge from the |fro| dict - # later, and having the same dict ref pointed to twice in the tree isn't - # what anyone wants considering that the dicts may subsequently be - # modified. - if k in to: - bad_merge = False - if type(v) in (str, int): - if type(to[k]) not in (str, int): - bad_merge = True - elif not isinstance(v, type(to[k])): - bad_merge = True - - if bad_merge: - raise TypeError( - "Attempt to merge dict value of type " - + v.__class__.__name__ - + " into incompatible type " - + to[k].__class__.__name__ - + " for key " - + k - ) - if type(v) in (str, int): - # Overwrite the existing value, if any. Cheap and easy. - is_path = IsPathSection(k) - if is_path: - to[k] = MakePathRelative(to_file, fro_file, v) - else: - to[k] = v - elif type(v) is dict: - # Recurse, guaranteeing copies will be made of objects that require it. - if k not in to: - to[k] = {} - MergeDicts(to[k], v, to_file, fro_file) - elif type(v) is list: - # Lists in dicts can be merged with different policies, depending on - # how the key in the "from" dict (k, the from-key) is written. - # - # If the from-key has ...the to-list will have this action - # this character appended:... applied when receiving the from-list: - # = replace - # + prepend - # ? set, only if to-list does not yet exist - # (none) append - # - # This logic is list-specific, but since it relies on the associated - # dict key, it's checked in this dict-oriented function. - ext = k[-1] - append = True - if ext == "=": - list_base = k[:-1] - lists_incompatible = [list_base, list_base + "?"] - to[list_base] = [] - elif ext == "+": - list_base = k[:-1] - lists_incompatible = [list_base + "=", list_base + "?"] - append = False - elif ext == "?": - list_base = k[:-1] - lists_incompatible = [list_base, list_base + "=", list_base + "+"] - else: - list_base = k - lists_incompatible = [list_base + "=", list_base + "?"] - - # Some combinations of merge policies appearing together are meaningless. - # It's stupid to replace and append simultaneously, for example. Append - # and prepend are the only policies that can coexist. - for list_incompatible in lists_incompatible: - if list_incompatible in fro: - raise GypError( - "Incompatible list policies " + k + " and " + list_incompatible - ) - - if list_base in to: - if ext == "?": - # If the key ends in "?", the list will only be merged if it doesn't - # already exist. - continue - elif type(to[list_base]) is not list: - # This may not have been checked above if merging in a list with an - # extension character. - raise TypeError( - "Attempt to merge dict value of type " - + v.__class__.__name__ - + " into incompatible type " - + to[list_base].__class__.__name__ - + " for key " - + list_base - + "(" - + k - + ")" - ) - else: - to[list_base] = [] - - # Call MergeLists, which will make copies of objects that require it. - # MergeLists can recurse back into MergeDicts, although this will be - # to make copies of dicts (with paths fixed), there will be no - # subsequent dict "merging" once entering a list because lists are - # always replaced, appended to, or prepended to. - is_paths = IsPathSection(list_base) - MergeLists(to[list_base], v, to_file, fro_file, is_paths, append) - else: - raise TypeError( - "Attempt to merge dict value of unsupported type " - + v.__class__.__name__ - + " for key " - + k - ) - - -def MergeConfigWithInheritance( - new_configuration_dict, build_file, target_dict, configuration, visited -): - # Skip if previously visited. - if configuration in visited: - return - - # Look at this configuration. - configuration_dict = target_dict["configurations"][configuration] - - # Merge in parents. - for parent in configuration_dict.get("inherit_from", []): - MergeConfigWithInheritance( - new_configuration_dict, - build_file, - target_dict, - parent, - visited + [configuration], - ) - - # Merge it into the new config. - MergeDicts(new_configuration_dict, configuration_dict, build_file, build_file) - - # Drop abstract. - if "abstract" in new_configuration_dict: - del new_configuration_dict["abstract"] - - -def SetUpConfigurations(target, target_dict): - # key_suffixes is a list of key suffixes that might appear on key names. - # These suffixes are handled in conditional evaluations (for =, +, and ?) - # and rules/exclude processing (for ! and /). Keys with these suffixes - # should be treated the same as keys without. - key_suffixes = ["=", "+", "?", "!", "/"] - - build_file = gyp.common.BuildFile(target) - - # Provide a single configuration by default if none exists. - # TODO(mark): Signal an error if default_configurations exists but - # configurations does not. - if "configurations" not in target_dict: - target_dict["configurations"] = {"Default": {}} - if "default_configuration" not in target_dict: - concrete = [ - i - for (i, config) in target_dict["configurations"].items() - if not config.get("abstract") - ] - target_dict["default_configuration"] = sorted(concrete)[0] - - merged_configurations = {} - configs = target_dict["configurations"] - for (configuration, old_configuration_dict) in configs.items(): - # Skip abstract configurations (saves work only). - if old_configuration_dict.get("abstract"): - continue - # Configurations inherit (most) settings from the enclosing target scope. - # Get the inheritance relationship right by making a copy of the target - # dict. - new_configuration_dict = {} - for (key, target_val) in target_dict.items(): - key_ext = key[-1:] - if key_ext in key_suffixes: - key_base = key[:-1] - else: - key_base = key - if key_base not in non_configuration_keys: - new_configuration_dict[key] = gyp.simple_copy.deepcopy(target_val) - - # Merge in configuration (with all its parents first). - MergeConfigWithInheritance( - new_configuration_dict, build_file, target_dict, configuration, [] - ) - - merged_configurations[configuration] = new_configuration_dict - - # Put the new configurations back into the target dict as a configuration. - for configuration in merged_configurations.keys(): - target_dict["configurations"][configuration] = merged_configurations[ - configuration - ] - - # Now drop all the abstract ones. - configs = target_dict["configurations"] - target_dict["configurations"] = { - k: v for k, v in configs.items() if not v.get("abstract") - } - - # Now that all of the target's configurations have been built, go through - # the target dict's keys and remove everything that's been moved into a - # "configurations" section. - delete_keys = [] - for key in target_dict: - key_ext = key[-1:] - if key_ext in key_suffixes: - key_base = key[:-1] - else: - key_base = key - if key_base not in non_configuration_keys: - delete_keys.append(key) - for key in delete_keys: - del target_dict[key] - - # Check the configurations to see if they contain invalid keys. - for configuration in target_dict["configurations"].keys(): - configuration_dict = target_dict["configurations"][configuration] - for key in configuration_dict.keys(): - if key in invalid_configuration_keys: - raise GypError( - "%s not allowed in the %s configuration, found in " - "target %s" % (key, configuration, target) - ) - - -def ProcessListFiltersInDict(name, the_dict): - """Process regular expression and exclusion-based filters on lists. - - An exclusion list is in a dict key named with a trailing "!", like - "sources!". Every item in such a list is removed from the associated - main list, which in this example, would be "sources". Removed items are - placed into a "sources_excluded" list in the dict. - - Regular expression (regex) filters are contained in dict keys named with a - trailing "/", such as "sources/" to operate on the "sources" list. Regex - filters in a dict take the form: - 'sources/': [ ['exclude', '_(linux|mac|win)\\.cc$'], - ['include', '_mac\\.cc$'] ], - The first filter says to exclude all files ending in _linux.cc, _mac.cc, and - _win.cc. The second filter then includes all files ending in _mac.cc that - are now or were once in the "sources" list. Items matching an "exclude" - filter are subject to the same processing as would occur if they were listed - by name in an exclusion list (ending in "!"). Items matching an "include" - filter are brought back into the main list if previously excluded by an - exclusion list or exclusion regex filter. Subsequent matching "exclude" - patterns can still cause items to be excluded after matching an "include". - """ - - # Look through the dictionary for any lists whose keys end in "!" or "/". - # These are lists that will be treated as exclude lists and regular - # expression-based exclude/include lists. Collect the lists that are - # needed first, looking for the lists that they operate on, and assemble - # then into |lists|. This is done in a separate loop up front, because - # the _included and _excluded keys need to be added to the_dict, and that - # can't be done while iterating through it. - - lists = [] - del_lists = [] - for key, value in the_dict.items(): - operation = key[-1] - if operation != "!" and operation != "/": - continue - - if type(value) is not list: - raise ValueError( - name + " key " + key + " must be list, not " + value.__class__.__name__ - ) - - list_key = key[:-1] - if list_key not in the_dict: - # This happens when there's a list like "sources!" but no corresponding - # "sources" list. Since there's nothing for it to operate on, queue up - # the "sources!" list for deletion now. - del_lists.append(key) - continue - - if type(the_dict[list_key]) is not list: - value = the_dict[list_key] - raise ValueError( - name - + " key " - + list_key - + " must be list, not " - + value.__class__.__name__ - + " when applying " - + {"!": "exclusion", "/": "regex"}[operation] - ) - - if list_key not in lists: - lists.append(list_key) - - # Delete the lists that are known to be unneeded at this point. - for del_list in del_lists: - del the_dict[del_list] - - for list_key in lists: - the_list = the_dict[list_key] - - # Initialize the list_actions list, which is parallel to the_list. Each - # item in list_actions identifies whether the corresponding item in - # the_list should be excluded, unconditionally preserved (included), or - # whether no exclusion or inclusion has been applied. Items for which - # no exclusion or inclusion has been applied (yet) have value -1, items - # excluded have value 0, and items included have value 1. Includes and - # excludes override previous actions. All items in list_actions are - # initialized to -1 because no excludes or includes have been processed - # yet. - list_actions = list((-1,) * len(the_list)) - - exclude_key = list_key + "!" - if exclude_key in the_dict: - for exclude_item in the_dict[exclude_key]: - for index, list_item in enumerate(the_list): - if exclude_item == list_item: - # This item matches the exclude_item, so set its action to 0 - # (exclude). - list_actions[index] = 0 - - # The "whatever!" list is no longer needed, dump it. - del the_dict[exclude_key] - - regex_key = list_key + "/" - if regex_key in the_dict: - for regex_item in the_dict[regex_key]: - [action, pattern] = regex_item - pattern_re = re.compile(pattern) - - if action == "exclude": - # This item matches an exclude regex, set its value to 0 (exclude). - action_value = 0 - elif action == "include": - # This item matches an include regex, set its value to 1 (include). - action_value = 1 - else: - # This is an action that doesn't make any sense. - raise ValueError( - "Unrecognized action " - + action - + " in " - + name - + " key " - + regex_key - ) - - for index, list_item in enumerate(the_list): - if list_actions[index] == action_value: - # Even if the regex matches, nothing will change so continue - # (regex searches are expensive). - continue - if pattern_re.search(list_item): - # Regular expression match. - list_actions[index] = action_value - - # The "whatever/" list is no longer needed, dump it. - del the_dict[regex_key] - - # Add excluded items to the excluded list. - # - # Note that exclude_key ("sources!") is different from excluded_key - # ("sources_excluded"). The exclude_key list is input and it was already - # processed and deleted; the excluded_key list is output and it's about - # to be created. - excluded_key = list_key + "_excluded" - if excluded_key in the_dict: - raise GypError( - name + " key " + excluded_key + " must not be present prior " - " to applying exclusion/regex filters for " + list_key - ) - - excluded_list = [] - - # Go backwards through the list_actions list so that as items are deleted, - # the indices of items that haven't been seen yet don't shift. That means - # that things need to be prepended to excluded_list to maintain them in the - # same order that they existed in the_list. - for index in range(len(list_actions) - 1, -1, -1): - if list_actions[index] == 0: - # Dump anything with action 0 (exclude). Keep anything with action 1 - # (include) or -1 (no include or exclude seen for the item). - excluded_list.insert(0, the_list[index]) - del the_list[index] - - # If anything was excluded, put the excluded list into the_dict at - # excluded_key. - if len(excluded_list) > 0: - the_dict[excluded_key] = excluded_list - - # Now recurse into subdicts and lists that may contain dicts. - for key, value in the_dict.items(): - if type(value) is dict: - ProcessListFiltersInDict(key, value) - elif type(value) is list: - ProcessListFiltersInList(key, value) - - -def ProcessListFiltersInList(name, the_list): - for item in the_list: - if type(item) is dict: - ProcessListFiltersInDict(name, item) - elif type(item) is list: - ProcessListFiltersInList(name, item) - - -def ValidateTargetType(target, target_dict): - """Ensures the 'type' field on the target is one of the known types. - - Arguments: - target: string, name of target. - target_dict: dict, target spec. - - Raises an exception on error. - """ - VALID_TARGET_TYPES = ( - "executable", - "loadable_module", - "static_library", - "shared_library", - "mac_kernel_extension", - "none", - "windows_driver", - ) - target_type = target_dict.get("type", None) - if target_type not in VALID_TARGET_TYPES: - raise GypError( - "Target %s has an invalid target type '%s'. " - "Must be one of %s." % (target, target_type, "/".join(VALID_TARGET_TYPES)) - ) - if ( - target_dict.get("standalone_static_library", 0) - and not target_type == "static_library" - ): - raise GypError( - "Target %s has type %s but standalone_static_library flag is" - " only valid for static_library type." % (target, target_type) - ) - - -def ValidateRulesInTarget(target, target_dict, extra_sources_for_rules): - """Ensures that the rules sections in target_dict are valid and consistent, - and determines which sources they apply to. - - Arguments: - target: string, name of target. - target_dict: dict, target spec containing "rules" and "sources" lists. - extra_sources_for_rules: a list of keys to scan for rule matches in - addition to 'sources'. - """ - - # Dicts to map between values found in rules' 'rule_name' and 'extension' - # keys and the rule dicts themselves. - rule_names = {} - rule_extensions = {} - - rules = target_dict.get("rules", []) - for rule in rules: - # Make sure that there's no conflict among rule names and extensions. - rule_name = rule["rule_name"] - if rule_name in rule_names: - raise GypError( - f"rule {rule_name} exists in duplicate, target {target}" - ) - rule_names[rule_name] = rule - - rule_extension = rule["extension"] - if rule_extension.startswith("."): - rule_extension = rule_extension[1:] - if rule_extension in rule_extensions: - raise GypError( - ( - "extension %s associated with multiple rules, " - + "target %s rules %s and %s" - ) - % ( - rule_extension, - target, - rule_extensions[rule_extension]["rule_name"], - rule_name, - ) - ) - rule_extensions[rule_extension] = rule - - # Make sure rule_sources isn't already there. It's going to be - # created below if needed. - if "rule_sources" in rule: - raise GypError( - "rule_sources must not exist in input, target %s rule %s" - % (target, rule_name) - ) - - rule_sources = [] - source_keys = ["sources"] - source_keys.extend(extra_sources_for_rules) - for source_key in source_keys: - for source in target_dict.get(source_key, []): - (source_root, source_extension) = os.path.splitext(source) - if source_extension.startswith("."): - source_extension = source_extension[1:] - if source_extension == rule_extension: - rule_sources.append(source) - - if len(rule_sources) > 0: - rule["rule_sources"] = rule_sources - - -def ValidateRunAsInTarget(target, target_dict, build_file): - target_name = target_dict.get("target_name") - run_as = target_dict.get("run_as") - if not run_as: - return - if type(run_as) is not dict: - raise GypError( - "The 'run_as' in target %s from file %s should be a " - "dictionary." % (target_name, build_file) - ) - action = run_as.get("action") - if not action: - raise GypError( - "The 'run_as' in target %s from file %s must have an " - "'action' section." % (target_name, build_file) - ) - if type(action) is not list: - raise GypError( - "The 'action' for 'run_as' in target %s from file %s " - "must be a list." % (target_name, build_file) - ) - working_directory = run_as.get("working_directory") - if working_directory and type(working_directory) is not str: - raise GypError( - "The 'working_directory' for 'run_as' in target %s " - "in file %s should be a string." % (target_name, build_file) - ) - environment = run_as.get("environment") - if environment and type(environment) is not dict: - raise GypError( - "The 'environment' for 'run_as' in target %s " - "in file %s should be a dictionary." % (target_name, build_file) - ) - - -def ValidateActionsInTarget(target, target_dict, build_file): - """Validates the inputs to the actions in a target.""" - target_name = target_dict.get("target_name") - actions = target_dict.get("actions", []) - for action in actions: - action_name = action.get("action_name") - if not action_name: - raise GypError( - "Anonymous action in target %s. " - "An action must have an 'action_name' field." % target_name - ) - inputs = action.get("inputs", None) - if inputs is None: - raise GypError("Action in target %s has no inputs." % target_name) - action_command = action.get("action") - if action_command and not action_command[0]: - raise GypError("Empty action as command in target %s." % target_name) - - -def TurnIntIntoStrInDict(the_dict): - """Given dict the_dict, recursively converts all integers into strings. - """ - # Use items instead of iteritems because there's no need to try to look at - # reinserted keys and their associated values. - for k, v in the_dict.items(): - if type(v) is int: - v = str(v) - the_dict[k] = v - elif type(v) is dict: - TurnIntIntoStrInDict(v) - elif type(v) is list: - TurnIntIntoStrInList(v) - - if type(k) is int: - del the_dict[k] - the_dict[str(k)] = v - - -def TurnIntIntoStrInList(the_list): - """Given list the_list, recursively converts all integers into strings. - """ - for index, item in enumerate(the_list): - if type(item) is int: - the_list[index] = str(item) - elif type(item) is dict: - TurnIntIntoStrInDict(item) - elif type(item) is list: - TurnIntIntoStrInList(item) - - -def PruneUnwantedTargets(targets, flat_list, dependency_nodes, root_targets, data): - """Return only the targets that are deep dependencies of |root_targets|.""" - qualified_root_targets = [] - for target in root_targets: - target = target.strip() - qualified_targets = gyp.common.FindQualifiedTargets(target, flat_list) - if not qualified_targets: - raise GypError("Could not find target %s" % target) - qualified_root_targets.extend(qualified_targets) - - wanted_targets = {} - for target in qualified_root_targets: - wanted_targets[target] = targets[target] - for dependency in dependency_nodes[target].DeepDependencies(): - wanted_targets[dependency] = targets[dependency] - - wanted_flat_list = [t for t in flat_list if t in wanted_targets] - - # Prune unwanted targets from each build_file's data dict. - for build_file in data["target_build_files"]: - if "targets" not in data[build_file]: - continue - new_targets = [] - for target in data[build_file]["targets"]: - qualified_name = gyp.common.QualifiedTarget( - build_file, target["target_name"], target["toolset"] - ) - if qualified_name in wanted_targets: - new_targets.append(target) - data[build_file]["targets"] = new_targets - - return wanted_targets, wanted_flat_list - - -def VerifyNoCollidingTargets(targets): - """Verify that no two targets in the same directory share the same name. - - Arguments: - targets: A list of targets in the form 'path/to/file.gyp:target_name'. - """ - # Keep a dict going from 'subdirectory:target_name' to 'foo.gyp'. - used = {} - for target in targets: - # Separate out 'path/to/file.gyp, 'target_name' from - # 'path/to/file.gyp:target_name'. - path, name = target.rsplit(":", 1) - # Separate out 'path/to', 'file.gyp' from 'path/to/file.gyp'. - subdir, gyp = os.path.split(path) - # Use '.' for the current directory '', so that the error messages make - # more sense. - if not subdir: - subdir = "." - # Prepare a key like 'path/to:target_name'. - key = subdir + ":" + name - if key in used: - # Complain if this target is already used. - raise GypError( - 'Duplicate target name "%s" in directory "%s" used both ' - 'in "%s" and "%s".' % (name, subdir, gyp, used[key]) - ) - used[key] = gyp - - -def SetGeneratorGlobals(generator_input_info): - # Set up path_sections and non_configuration_keys with the default data plus - # the generator-specific data. - global path_sections - path_sections = set(base_path_sections) - path_sections.update(generator_input_info["path_sections"]) - - global non_configuration_keys - non_configuration_keys = base_non_configuration_keys[:] - non_configuration_keys.extend(generator_input_info["non_configuration_keys"]) - - global multiple_toolsets - multiple_toolsets = generator_input_info["generator_supports_multiple_toolsets"] - - global generator_filelist_paths - generator_filelist_paths = generator_input_info["generator_filelist_paths"] - - -def Load( - build_files, - variables, - includes, - depth, - generator_input_info, - check, - circular_check, - parallel, - root_targets, -): - SetGeneratorGlobals(generator_input_info) - # A generator can have other lists (in addition to sources) be processed - # for rules. - extra_sources_for_rules = generator_input_info["extra_sources_for_rules"] - - # Load build files. This loads every target-containing build file into - # the |data| dictionary such that the keys to |data| are build file names, - # and the values are the entire build file contents after "early" or "pre" - # processing has been done and includes have been resolved. - # NOTE: data contains both "target" files (.gyp) and "includes" (.gypi), as - # well as meta-data (e.g. 'included_files' key). 'target_build_files' keeps - # track of the keys corresponding to "target" files. - data = {"target_build_files": set()} - # Normalize paths everywhere. This is important because paths will be - # used as keys to the data dict and for references between input files. - build_files = set(map(os.path.normpath, build_files)) - if parallel: - LoadTargetBuildFilesParallel( - build_files, data, variables, includes, depth, check, generator_input_info - ) - else: - aux_data = {} - for build_file in build_files: - try: - LoadTargetBuildFile( - build_file, data, aux_data, variables, includes, depth, check, True - ) - except Exception as e: - gyp.common.ExceptionAppend(e, "while trying to load %s" % build_file) - raise - - # Build a dict to access each target's subdict by qualified name. - targets = BuildTargetsDict(data) - - # Fully qualify all dependency links. - QualifyDependencies(targets) - - # Remove self-dependencies from targets that have 'prune_self_dependencies' - # set to 1. - RemoveSelfDependencies(targets) - - # Expand dependencies specified as build_file:*. - ExpandWildcardDependencies(targets, data) - - # Remove all dependencies marked as 'link_dependency' from the targets of - # type 'none'. - RemoveLinkDependenciesFromNoneTargets(targets) - - # Apply exclude (!) and regex (/) list filters only for dependency_sections. - for target_name, target_dict in targets.items(): - tmp_dict = {} - for key_base in dependency_sections: - for op in ("", "!", "/"): - key = key_base + op - if key in target_dict: - tmp_dict[key] = target_dict[key] - del target_dict[key] - ProcessListFiltersInDict(target_name, tmp_dict) - # Write the results back to |target_dict|. - for key in tmp_dict: - target_dict[key] = tmp_dict[key] - - # Make sure every dependency appears at most once. - RemoveDuplicateDependencies(targets) - - if circular_check: - # Make sure that any targets in a.gyp don't contain dependencies in other - # .gyp files that further depend on a.gyp. - VerifyNoGYPFileCircularDependencies(targets) - - [dependency_nodes, flat_list] = BuildDependencyList(targets) - - if root_targets: - # Remove, from |targets| and |flat_list|, the targets that are not deep - # dependencies of the targets specified in |root_targets|. - targets, flat_list = PruneUnwantedTargets( - targets, flat_list, dependency_nodes, root_targets, data - ) - - # Check that no two targets in the same directory have the same name. - VerifyNoCollidingTargets(flat_list) - - # Handle dependent settings of various types. - for settings_type in [ - "all_dependent_settings", - "direct_dependent_settings", - "link_settings", - ]: - DoDependentSettings(settings_type, flat_list, targets, dependency_nodes) - - # Take out the dependent settings now that they've been published to all - # of the targets that require them. - for target in flat_list: - if settings_type in targets[target]: - del targets[target][settings_type] - - # Make sure static libraries don't declare dependencies on other static - # libraries, but that linkables depend on all unlinked static libraries - # that they need so that their link steps will be correct. - gii = generator_input_info - if gii["generator_wants_static_library_dependencies_adjusted"]: - AdjustStaticLibraryDependencies( - flat_list, - targets, - dependency_nodes, - gii["generator_wants_sorted_dependencies"], - ) - - # Apply "post"/"late"/"target" variable expansions and condition evaluations. - for target in flat_list: - target_dict = targets[target] - build_file = gyp.common.BuildFile(target) - ProcessVariablesAndConditionsInDict( - target_dict, PHASE_LATE, variables, build_file - ) - - # Move everything that can go into a "configurations" section into one. - for target in flat_list: - target_dict = targets[target] - SetUpConfigurations(target, target_dict) - - # Apply exclude (!) and regex (/) list filters. - for target in flat_list: - target_dict = targets[target] - ProcessListFiltersInDict(target, target_dict) - - # Apply "latelate" variable expansions and condition evaluations. - for target in flat_list: - target_dict = targets[target] - build_file = gyp.common.BuildFile(target) - ProcessVariablesAndConditionsInDict( - target_dict, PHASE_LATELATE, variables, build_file - ) - - # Make sure that the rules make sense, and build up rule_sources lists as - # needed. Not all generators will need to use the rule_sources lists, but - # some may, and it seems best to build the list in a common spot. - # Also validate actions and run_as elements in targets. - for target in flat_list: - target_dict = targets[target] - build_file = gyp.common.BuildFile(target) - ValidateTargetType(target, target_dict) - ValidateRulesInTarget(target, target_dict, extra_sources_for_rules) - ValidateRunAsInTarget(target, target_dict, build_file) - ValidateActionsInTarget(target, target_dict, build_file) - - # Generators might not expect ints. Turn them into strs. - TurnIntIntoStrInDict(data) - - # TODO(mark): Return |data| for now because the generator needs a list of - # build files that came in. In the future, maybe it should just accept - # a list, and not the whole data dict. - return [flat_list, targets, data] diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/input_test.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/input_test.py deleted file mode 100755 index a18f72e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Unit tests for the input.py file.""" - -import gyp.input -import unittest - - -class TestFindCycles(unittest.TestCase): - def setUp(self): - self.nodes = {} - for x in ("a", "b", "c", "d", "e"): - self.nodes[x] = gyp.input.DependencyGraphNode(x) - - def _create_dependency(self, dependent, dependency): - dependent.dependencies.append(dependency) - dependency.dependents.append(dependent) - - def test_no_cycle_empty_graph(self): - for label, node in self.nodes.items(): - self.assertEqual([], node.FindCycles()) - - def test_no_cycle_line(self): - self._create_dependency(self.nodes["a"], self.nodes["b"]) - self._create_dependency(self.nodes["b"], self.nodes["c"]) - self._create_dependency(self.nodes["c"], self.nodes["d"]) - - for label, node in self.nodes.items(): - self.assertEqual([], node.FindCycles()) - - def test_no_cycle_dag(self): - self._create_dependency(self.nodes["a"], self.nodes["b"]) - self._create_dependency(self.nodes["a"], self.nodes["c"]) - self._create_dependency(self.nodes["b"], self.nodes["c"]) - - for label, node in self.nodes.items(): - self.assertEqual([], node.FindCycles()) - - def test_cycle_self_reference(self): - self._create_dependency(self.nodes["a"], self.nodes["a"]) - - self.assertEqual( - [[self.nodes["a"], self.nodes["a"]]], self.nodes["a"].FindCycles() - ) - - def test_cycle_two_nodes(self): - self._create_dependency(self.nodes["a"], self.nodes["b"]) - self._create_dependency(self.nodes["b"], self.nodes["a"]) - - self.assertEqual( - [[self.nodes["a"], self.nodes["b"], self.nodes["a"]]], - self.nodes["a"].FindCycles(), - ) - self.assertEqual( - [[self.nodes["b"], self.nodes["a"], self.nodes["b"]]], - self.nodes["b"].FindCycles(), - ) - - def test_two_cycles(self): - self._create_dependency(self.nodes["a"], self.nodes["b"]) - self._create_dependency(self.nodes["b"], self.nodes["a"]) - - self._create_dependency(self.nodes["b"], self.nodes["c"]) - self._create_dependency(self.nodes["c"], self.nodes["b"]) - - cycles = self.nodes["a"].FindCycles() - self.assertTrue([self.nodes["a"], self.nodes["b"], self.nodes["a"]] in cycles) - self.assertTrue([self.nodes["b"], self.nodes["c"], self.nodes["b"]] in cycles) - self.assertEqual(2, len(cycles)) - - def test_big_cycle(self): - self._create_dependency(self.nodes["a"], self.nodes["b"]) - self._create_dependency(self.nodes["b"], self.nodes["c"]) - self._create_dependency(self.nodes["c"], self.nodes["d"]) - self._create_dependency(self.nodes["d"], self.nodes["e"]) - self._create_dependency(self.nodes["e"], self.nodes["a"]) - - self.assertEqual( - [ - [ - self.nodes["a"], - self.nodes["b"], - self.nodes["c"], - self.nodes["d"], - self.nodes["e"], - self.nodes["a"], - ] - ], - self.nodes["a"].FindCycles(), - ) - - -if __name__ == "__main__": - unittest.main() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py deleted file mode 100755 index 59647c9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +++ /dev/null @@ -1,771 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Utility functions to perform Xcode-style build steps. - -These functions are executed via gyp-mac-tool when using the Makefile generator. -""" - - -import fcntl -import fnmatch -import glob -import json -import os -import plistlib -import re -import shutil -import struct -import subprocess -import sys -import tempfile - - -def main(args): - executor = MacTool() - exit_code = executor.Dispatch(args) - if exit_code is not None: - sys.exit(exit_code) - - -class MacTool: - """This class performs all the Mac tooling steps. The methods can either be - executed directly, or dispatched from an argument list.""" - - def Dispatch(self, args): - """Dispatches a string command to a method.""" - if len(args) < 1: - raise Exception("Not enough arguments") - - method = "Exec%s" % self._CommandifyName(args[0]) - return getattr(self, method)(*args[1:]) - - def _CommandifyName(self, name_string): - """Transforms a tool name like copy-info-plist to CopyInfoPlist""" - return name_string.title().replace("-", "") - - def ExecCopyBundleResource(self, source, dest, convert_to_binary): - """Copies a resource file to the bundle/Resources directory, performing any - necessary compilation on each resource.""" - convert_to_binary = convert_to_binary == "True" - extension = os.path.splitext(source)[1].lower() - if os.path.isdir(source): - # Copy tree. - # TODO(thakis): This copies file attributes like mtime, while the - # single-file branch below doesn't. This should probably be changed to - # be consistent with the single-file branch. - if os.path.exists(dest): - shutil.rmtree(dest) - shutil.copytree(source, dest) - elif extension == ".xib": - return self._CopyXIBFile(source, dest) - elif extension == ".storyboard": - return self._CopyXIBFile(source, dest) - elif extension == ".strings" and not convert_to_binary: - self._CopyStringsFile(source, dest) - else: - if os.path.exists(dest): - os.unlink(dest) - shutil.copy(source, dest) - - if convert_to_binary and extension in (".plist", ".strings"): - self._ConvertToBinary(dest) - - def _CopyXIBFile(self, source, dest): - """Compiles a XIB file with ibtool into a binary plist in the bundle.""" - - # ibtool sometimes crashes with relative paths. See crbug.com/314728. - base = os.path.dirname(os.path.realpath(__file__)) - if os.path.relpath(source): - source = os.path.join(base, source) - if os.path.relpath(dest): - dest = os.path.join(base, dest) - - args = ["xcrun", "ibtool", "--errors", "--warnings", "--notices"] - - if os.environ["XCODE_VERSION_ACTUAL"] > "0700": - args.extend(["--auto-activate-custom-fonts"]) - if "IPHONEOS_DEPLOYMENT_TARGET" in os.environ: - args.extend( - [ - "--target-device", - "iphone", - "--target-device", - "ipad", - "--minimum-deployment-target", - os.environ["IPHONEOS_DEPLOYMENT_TARGET"], - ] - ) - else: - args.extend( - [ - "--target-device", - "mac", - "--minimum-deployment-target", - os.environ["MACOSX_DEPLOYMENT_TARGET"], - ] - ) - - args.extend( - ["--output-format", "human-readable-text", "--compile", dest, source] - ) - - ibtool_section_re = re.compile(r"/\*.*\*/") - ibtool_re = re.compile(r".*note:.*is clipping its content") - try: - stdout = subprocess.check_output(args) - except subprocess.CalledProcessError as e: - print(e.output) - raise - current_section_header = None - for line in stdout.splitlines(): - if ibtool_section_re.match(line): - current_section_header = line - elif not ibtool_re.match(line): - if current_section_header: - print(current_section_header) - current_section_header = None - print(line) - return 0 - - def _ConvertToBinary(self, dest): - subprocess.check_call( - ["xcrun", "plutil", "-convert", "binary1", "-o", dest, dest] - ) - - def _CopyStringsFile(self, source, dest): - """Copies a .strings file using iconv to reconvert the input into UTF-16.""" - input_code = self._DetectInputEncoding(source) or "UTF-8" - - # Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call - # CFPropertyListCreateFromXMLData() behind the scenes; at least it prints - # CFPropertyListCreateFromXMLData(): Old-style plist parser: missing - # semicolon in dictionary. - # on invalid files. Do the same kind of validation. - import CoreFoundation - - with open(source, "rb") as in_file: - s = in_file.read() - d = CoreFoundation.CFDataCreate(None, s, len(s)) - _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None) - if error: - return - - with open(dest, "wb") as fp: - fp.write(s.decode(input_code).encode("UTF-16")) - - def _DetectInputEncoding(self, file_name): - """Reads the first few bytes from file_name and tries to guess the text - encoding. Returns None as a guess if it can't detect it.""" - with open(file_name, "rb") as fp: - try: - header = fp.read(3) - except Exception: - return None - if header.startswith(b"\xFE\xFF"): - return "UTF-16" - elif header.startswith(b"\xFF\xFE"): - return "UTF-16" - elif header.startswith(b"\xEF\xBB\xBF"): - return "UTF-8" - else: - return None - - def ExecCopyInfoPlist(self, source, dest, convert_to_binary, *keys): - """Copies the |source| Info.plist to the destination directory |dest|.""" - # Read the source Info.plist into memory. - with open(source) as fd: - lines = fd.read() - - # Insert synthesized key/value pairs (e.g. BuildMachineOSBuild). - plist = plistlib.readPlistFromString(lines) - if keys: - plist.update(json.loads(keys[0])) - lines = plistlib.writePlistToString(plist) - - # Go through all the environment variables and replace them as variables in - # the file. - IDENT_RE = re.compile(r"[_/\s]") - for key in os.environ: - if key.startswith("_"): - continue - evar = "${%s}" % key - evalue = os.environ[key] - lines = lines.replace(lines, evar, evalue) - - # Xcode supports various suffices on environment variables, which are - # all undocumented. :rfc1034identifier is used in the standard project - # template these days, and :identifier was used earlier. They are used to - # convert non-url characters into things that look like valid urls -- - # except that the replacement character for :identifier, '_' isn't valid - # in a URL either -- oops, hence :rfc1034identifier was born. - evar = "${%s:identifier}" % key - evalue = IDENT_RE.sub("_", os.environ[key]) - lines = lines.replace(lines, evar, evalue) - - evar = "${%s:rfc1034identifier}" % key - evalue = IDENT_RE.sub("-", os.environ[key]) - lines = lines.replace(lines, evar, evalue) - - # Remove any keys with values that haven't been replaced. - lines = lines.splitlines() - for i in range(len(lines)): - if lines[i].strip().startswith("${"): - lines[i] = None - lines[i - 1] = None - lines = "\n".join(line for line in lines if line is not None) - - # Write out the file with variables replaced. - with open(dest, "w") as fd: - fd.write(lines) - - # Now write out PkgInfo file now that the Info.plist file has been - # "compiled". - self._WritePkgInfo(dest) - - if convert_to_binary == "True": - self._ConvertToBinary(dest) - - def _WritePkgInfo(self, info_plist): - """This writes the PkgInfo file from the data stored in Info.plist.""" - plist = plistlib.readPlist(info_plist) - if not plist: - return - - # Only create PkgInfo for executable types. - package_type = plist["CFBundlePackageType"] - if package_type != "APPL": - return - - # The format of PkgInfo is eight characters, representing the bundle type - # and bundle signature, each four characters. If that is missing, four - # '?' characters are used instead. - signature_code = plist.get("CFBundleSignature", "????") - if len(signature_code) != 4: # Wrong length resets everything, too. - signature_code = "?" * 4 - - dest = os.path.join(os.path.dirname(info_plist), "PkgInfo") - with open(dest, "w") as fp: - fp.write(f"{package_type}{signature_code}") - - def ExecFlock(self, lockfile, *cmd_list): - """Emulates the most basic behavior of Linux's flock(1).""" - # Rely on exception handling to report errors. - fd = os.open(lockfile, os.O_RDONLY | os.O_NOCTTY | os.O_CREAT, 0o666) - fcntl.flock(fd, fcntl.LOCK_EX) - return subprocess.call(cmd_list) - - def ExecFilterLibtool(self, *cmd_list): - """Calls libtool and filters out '/path/to/libtool: file: foo.o has no - symbols'.""" - libtool_re = re.compile( - r"^.*libtool: (?:for architecture: \S* )?" r"file: .* has no symbols$" - ) - libtool_re5 = re.compile( - r"^.*libtool: warning for library: " - + r".* the table of contents is empty " - + r"\(no object file members in the library define global symbols\)$" - ) - env = os.environ.copy() - # Ref: - # http://www.opensource.apple.com/source/cctools/cctools-809/misc/libtool.c - # The problem with this flag is that it resets the file mtime on the file to - # epoch=0, e.g. 1970-1-1 or 1969-12-31 depending on timezone. - env["ZERO_AR_DATE"] = "1" - libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE, env=env) - err = libtoolout.communicate()[1].decode("utf-8") - for line in err.splitlines(): - if not libtool_re.match(line) and not libtool_re5.match(line): - print(line, file=sys.stderr) - # Unconditionally touch the output .a file on the command line if present - # and the command succeeded. A bit hacky. - if not libtoolout.returncode: - for i in range(len(cmd_list) - 1): - if cmd_list[i] == "-o" and cmd_list[i + 1].endswith(".a"): - os.utime(cmd_list[i + 1], None) - break - return libtoolout.returncode - - def ExecPackageIosFramework(self, framework): - # Find the name of the binary based on the part before the ".framework". - binary = os.path.basename(framework).split(".")[0] - module_path = os.path.join(framework, "Modules") - if not os.path.exists(module_path): - os.mkdir(module_path) - module_template = ( - "framework module %s {\n" - ' umbrella header "%s.h"\n' - "\n" - " export *\n" - " module * { export * }\n" - "}\n" % (binary, binary) - ) - - with open(os.path.join(module_path, "module.modulemap"), "w") as module_file: - module_file.write(module_template) - - def ExecPackageFramework(self, framework, version): - """Takes a path to Something.framework and the Current version of that and - sets up all the symlinks.""" - # Find the name of the binary based on the part before the ".framework". - binary = os.path.basename(framework).split(".")[0] - - CURRENT = "Current" - RESOURCES = "Resources" - VERSIONS = "Versions" - - if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)): - # Binary-less frameworks don't seem to contain symlinks (see e.g. - # chromium's out/Debug/org.chromium.Chromium.manifest/ bundle). - return - - # Move into the framework directory to set the symlinks correctly. - pwd = os.getcwd() - os.chdir(framework) - - # Set up the Current version. - self._Relink(version, os.path.join(VERSIONS, CURRENT)) - - # Set up the root symlinks. - self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary) - self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES) - - # Back to where we were before! - os.chdir(pwd) - - def _Relink(self, dest, link): - """Creates a symlink to |dest| named |link|. If |link| already exists, - it is overwritten.""" - if os.path.lexists(link): - os.remove(link) - os.symlink(dest, link) - - def ExecCompileIosFrameworkHeaderMap(self, out, framework, *all_headers): - framework_name = os.path.basename(framework).split(".")[0] - all_headers = [os.path.abspath(header) for header in all_headers] - filelist = {} - for header in all_headers: - filename = os.path.basename(header) - filelist[filename] = header - filelist[os.path.join(framework_name, filename)] = header - WriteHmap(out, filelist) - - def ExecCopyIosFrameworkHeaders(self, framework, *copy_headers): - header_path = os.path.join(framework, "Headers") - if not os.path.exists(header_path): - os.makedirs(header_path) - for header in copy_headers: - shutil.copy(header, os.path.join(header_path, os.path.basename(header))) - - def ExecCompileXcassets(self, keys, *inputs): - """Compiles multiple .xcassets files into a single .car file. - - This invokes 'actool' to compile all the inputs .xcassets files. The - |keys| arguments is a json-encoded dictionary of extra arguments to - pass to 'actool' when the asset catalogs contains an application icon - or a launch image. - - Note that 'actool' does not create the Assets.car file if the asset - catalogs does not contains imageset. - """ - command_line = [ - "xcrun", - "actool", - "--output-format", - "human-readable-text", - "--compress-pngs", - "--notices", - "--warnings", - "--errors", - ] - is_iphone_target = "IPHONEOS_DEPLOYMENT_TARGET" in os.environ - if is_iphone_target: - platform = os.environ["CONFIGURATION"].split("-")[-1] - if platform not in ("iphoneos", "iphonesimulator"): - platform = "iphonesimulator" - command_line.extend( - [ - "--platform", - platform, - "--target-device", - "iphone", - "--target-device", - "ipad", - "--minimum-deployment-target", - os.environ["IPHONEOS_DEPLOYMENT_TARGET"], - "--compile", - os.path.abspath(os.environ["CONTENTS_FOLDER_PATH"]), - ] - ) - else: - command_line.extend( - [ - "--platform", - "macosx", - "--target-device", - "mac", - "--minimum-deployment-target", - os.environ["MACOSX_DEPLOYMENT_TARGET"], - "--compile", - os.path.abspath(os.environ["UNLOCALIZED_RESOURCES_FOLDER_PATH"]), - ] - ) - if keys: - keys = json.loads(keys) - for key, value in keys.items(): - arg_name = "--" + key - if isinstance(value, bool): - if value: - command_line.append(arg_name) - elif isinstance(value, list): - for v in value: - command_line.append(arg_name) - command_line.append(str(v)) - else: - command_line.append(arg_name) - command_line.append(str(value)) - # Note: actool crashes if inputs path are relative, so use os.path.abspath - # to get absolute path name for inputs. - command_line.extend(map(os.path.abspath, inputs)) - subprocess.check_call(command_line) - - def ExecMergeInfoPlist(self, output, *inputs): - """Merge multiple .plist files into a single .plist file.""" - merged_plist = {} - for path in inputs: - plist = self._LoadPlistMaybeBinary(path) - self._MergePlist(merged_plist, plist) - plistlib.writePlist(merged_plist, output) - - def ExecCodeSignBundle(self, key, entitlements, provisioning, path, preserve): - """Code sign a bundle. - - This function tries to code sign an iOS bundle, following the same - algorithm as Xcode: - 1. pick the provisioning profile that best match the bundle identifier, - and copy it into the bundle as embedded.mobileprovision, - 2. copy Entitlements.plist from user or SDK next to the bundle, - 3. code sign the bundle. - """ - substitutions, overrides = self._InstallProvisioningProfile( - provisioning, self._GetCFBundleIdentifier() - ) - entitlements_path = self._InstallEntitlements( - entitlements, substitutions, overrides - ) - - args = ["codesign", "--force", "--sign", key] - if preserve == "True": - args.extend(["--deep", "--preserve-metadata=identifier,entitlements"]) - else: - args.extend(["--entitlements", entitlements_path]) - args.extend(["--timestamp=none", path]) - subprocess.check_call(args) - - def _InstallProvisioningProfile(self, profile, bundle_identifier): - """Installs embedded.mobileprovision into the bundle. - - Args: - profile: string, optional, short name of the .mobileprovision file - to use, if empty or the file is missing, the best file installed - will be used - bundle_identifier: string, value of CFBundleIdentifier from Info.plist - - Returns: - A tuple containing two dictionary: variables substitutions and values - to overrides when generating the entitlements file. - """ - source_path, provisioning_data, team_id = self._FindProvisioningProfile( - profile, bundle_identifier - ) - target_path = os.path.join( - os.environ["BUILT_PRODUCTS_DIR"], - os.environ["CONTENTS_FOLDER_PATH"], - "embedded.mobileprovision", - ) - shutil.copy2(source_path, target_path) - substitutions = self._GetSubstitutions(bundle_identifier, team_id + ".") - return substitutions, provisioning_data["Entitlements"] - - def _FindProvisioningProfile(self, profile, bundle_identifier): - """Finds the .mobileprovision file to use for signing the bundle. - - Checks all the installed provisioning profiles (or if the user specified - the PROVISIONING_PROFILE variable, only consult it) and select the most - specific that correspond to the bundle identifier. - - Args: - profile: string, optional, short name of the .mobileprovision file - to use, if empty or the file is missing, the best file installed - will be used - bundle_identifier: string, value of CFBundleIdentifier from Info.plist - - Returns: - A tuple of the path to the selected provisioning profile, the data of - the embedded plist in the provisioning profile and the team identifier - to use for code signing. - - Raises: - SystemExit: if no .mobileprovision can be used to sign the bundle. - """ - profiles_dir = os.path.join( - os.environ["HOME"], "Library", "MobileDevice", "Provisioning Profiles" - ) - if not os.path.isdir(profiles_dir): - print( - "cannot find mobile provisioning for %s" % (bundle_identifier), - file=sys.stderr, - ) - sys.exit(1) - provisioning_profiles = None - if profile: - profile_path = os.path.join(profiles_dir, profile + ".mobileprovision") - if os.path.exists(profile_path): - provisioning_profiles = [profile_path] - if not provisioning_profiles: - provisioning_profiles = glob.glob( - os.path.join(profiles_dir, "*.mobileprovision") - ) - valid_provisioning_profiles = {} - for profile_path in provisioning_profiles: - profile_data = self._LoadProvisioningProfile(profile_path) - app_id_pattern = profile_data.get("Entitlements", {}).get( - "application-identifier", "" - ) - for team_identifier in profile_data.get("TeamIdentifier", []): - app_id = f"{team_identifier}.{bundle_identifier}" - if fnmatch.fnmatch(app_id, app_id_pattern): - valid_provisioning_profiles[app_id_pattern] = ( - profile_path, - profile_data, - team_identifier, - ) - if not valid_provisioning_profiles: - print( - "cannot find mobile provisioning for %s" % (bundle_identifier), - file=sys.stderr, - ) - sys.exit(1) - # If the user has multiple provisioning profiles installed that can be - # used for ${bundle_identifier}, pick the most specific one (ie. the - # provisioning profile whose pattern is the longest). - selected_key = max(valid_provisioning_profiles, key=lambda v: len(v)) - return valid_provisioning_profiles[selected_key] - - def _LoadProvisioningProfile(self, profile_path): - """Extracts the plist embedded in a provisioning profile. - - Args: - profile_path: string, path to the .mobileprovision file - - Returns: - Content of the plist embedded in the provisioning profile as a dictionary. - """ - with tempfile.NamedTemporaryFile() as temp: - subprocess.check_call( - ["security", "cms", "-D", "-i", profile_path, "-o", temp.name] - ) - return self._LoadPlistMaybeBinary(temp.name) - - def _MergePlist(self, merged_plist, plist): - """Merge |plist| into |merged_plist|.""" - for key, value in plist.items(): - if isinstance(value, dict): - merged_value = merged_plist.get(key, {}) - if isinstance(merged_value, dict): - self._MergePlist(merged_value, value) - merged_plist[key] = merged_value - else: - merged_plist[key] = value - else: - merged_plist[key] = value - - def _LoadPlistMaybeBinary(self, plist_path): - """Loads into a memory a plist possibly encoded in binary format. - - This is a wrapper around plistlib.readPlist that tries to convert the - plist to the XML format if it can't be parsed (assuming that it is in - the binary format). - - Args: - plist_path: string, path to a plist file, in XML or binary format - - Returns: - Content of the plist as a dictionary. - """ - try: - # First, try to read the file using plistlib that only supports XML, - # and if an exception is raised, convert a temporary copy to XML and - # load that copy. - return plistlib.readPlist(plist_path) - except Exception: - pass - with tempfile.NamedTemporaryFile() as temp: - shutil.copy2(plist_path, temp.name) - subprocess.check_call(["plutil", "-convert", "xml1", temp.name]) - return plistlib.readPlist(temp.name) - - def _GetSubstitutions(self, bundle_identifier, app_identifier_prefix): - """Constructs a dictionary of variable substitutions for Entitlements.plist. - - Args: - bundle_identifier: string, value of CFBundleIdentifier from Info.plist - app_identifier_prefix: string, value for AppIdentifierPrefix - - Returns: - Dictionary of substitutions to apply when generating Entitlements.plist. - """ - return { - "CFBundleIdentifier": bundle_identifier, - "AppIdentifierPrefix": app_identifier_prefix, - } - - def _GetCFBundleIdentifier(self): - """Extracts CFBundleIdentifier value from Info.plist in the bundle. - - Returns: - Value of CFBundleIdentifier in the Info.plist located in the bundle. - """ - info_plist_path = os.path.join( - os.environ["TARGET_BUILD_DIR"], os.environ["INFOPLIST_PATH"] - ) - info_plist_data = self._LoadPlistMaybeBinary(info_plist_path) - return info_plist_data["CFBundleIdentifier"] - - def _InstallEntitlements(self, entitlements, substitutions, overrides): - """Generates and install the ${BundleName}.xcent entitlements file. - - Expands variables "$(variable)" pattern in the source entitlements file, - add extra entitlements defined in the .mobileprovision file and the copy - the generated plist to "${BundlePath}.xcent". - - Args: - entitlements: string, optional, path to the Entitlements.plist template - to use, defaults to "${SDKROOT}/Entitlements.plist" - substitutions: dictionary, variable substitutions - overrides: dictionary, values to add to the entitlements - - Returns: - Path to the generated entitlements file. - """ - source_path = entitlements - target_path = os.path.join( - os.environ["BUILT_PRODUCTS_DIR"], os.environ["PRODUCT_NAME"] + ".xcent" - ) - if not source_path: - source_path = os.path.join(os.environ["SDKROOT"], "Entitlements.plist") - shutil.copy2(source_path, target_path) - data = self._LoadPlistMaybeBinary(target_path) - data = self._ExpandVariables(data, substitutions) - if overrides: - for key in overrides: - if key not in data: - data[key] = overrides[key] - plistlib.writePlist(data, target_path) - return target_path - - def _ExpandVariables(self, data, substitutions): - """Expands variables "$(variable)" in data. - - Args: - data: object, can be either string, list or dictionary - substitutions: dictionary, variable substitutions to perform - - Returns: - Copy of data where each references to "$(variable)" has been replaced - by the corresponding value found in substitutions, or left intact if - the key was not found. - """ - if isinstance(data, str): - for key, value in substitutions.items(): - data = data.replace("$(%s)" % key, value) - return data - if isinstance(data, list): - return [self._ExpandVariables(v, substitutions) for v in data] - if isinstance(data, dict): - return {k: self._ExpandVariables(data[k], substitutions) for k in data} - return data - - -def NextGreaterPowerOf2(x): - return 2 ** (x).bit_length() - - -def WriteHmap(output_name, filelist): - """Generates a header map based on |filelist|. - - Per Mark Mentovai: - A header map is structured essentially as a hash table, keyed by names used - in #includes, and providing pathnames to the actual files. - - The implementation below and the comment above comes from inspecting: - http://www.opensource.apple.com/source/distcc/distcc-2503/distcc_dist/include_server/headermap.py?txt - while also looking at the implementation in clang in: - https://llvm.org/svn/llvm-project/cfe/trunk/lib/Lex/HeaderMap.cpp - """ - magic = 1751998832 - version = 1 - _reserved = 0 - count = len(filelist) - capacity = NextGreaterPowerOf2(count) - strings_offset = 24 + (12 * capacity) - max_value_length = max(len(value) for value in filelist.values()) - - out = open(output_name, "wb") - out.write( - struct.pack( - " 0 or arg.count("/") > 1: - arg = os.path.normpath(arg) - - # For a literal quote, CommandLineToArgvW requires 2n+1 backslashes - # preceding it, and results in n backslashes + the quote. So we substitute - # in 2* what we match, +1 more, plus the quote. - if quote_cmd: - arg = windows_quoter_regex.sub(lambda mo: 2 * mo.group(1) + '\\"', arg) - - # %'s also need to be doubled otherwise they're interpreted as batch - # positional arguments. Also make sure to escape the % so that they're - # passed literally through escaping so they can be singled to just the - # original %. Otherwise, trying to pass the literal representation that - # looks like an environment variable to the shell (e.g. %PATH%) would fail. - arg = arg.replace("%", "%%") - - # These commands are used in rsp files, so no escaping for the shell (via ^) - # is necessary. - - # As a workaround for programs that don't use CommandLineToArgvW, gyp - # supports msvs_quote_cmd=0, which simply disables all quoting. - if quote_cmd: - # Finally, wrap the whole thing in quotes so that the above quote rule - # applies and whitespace isn't a word break. - return f'"{arg}"' - - return arg - - -def EncodeRspFileList(args, quote_cmd): - """Process a list of arguments using QuoteCmdExeArgument.""" - # Note that the first argument is assumed to be the command. Don't add - # quotes around it because then built-ins like 'echo', etc. won't work. - # Take care to normpath only the path in the case of 'call ../x.bat' because - # otherwise the whole thing is incorrectly interpreted as a path and not - # normalized correctly. - if not args: - return "" - if args[0].startswith("call "): - call, program = args[0].split(" ", 1) - program = call + " " + os.path.normpath(program) - else: - program = os.path.normpath(args[0]) - return (program + " " - + " ".join(QuoteForRspFile(arg, quote_cmd) for arg in args[1:])) - - -def _GenericRetrieve(root, default, path): - """Given a list of dictionary keys |path| and a tree of dicts |root|, find - value at path, or return |default| if any of the path doesn't exist.""" - if not root: - return default - if not path: - return root - return _GenericRetrieve(root.get(path[0]), default, path[1:]) - - -def _AddPrefix(element, prefix): - """Add |prefix| to |element| or each subelement if element is iterable.""" - if element is None: - return element - # Note, not Iterable because we don't want to handle strings like that. - if isinstance(element, list) or isinstance(element, tuple): - return [prefix + e for e in element] - else: - return prefix + element - - -def _DoRemapping(element, map): - """If |element| then remap it through |map|. If |element| is iterable then - each item will be remapped. Any elements not found will be removed.""" - if map is not None and element is not None: - if not callable(map): - map = map.get # Assume it's a dict, otherwise a callable to do the remap. - if isinstance(element, list) or isinstance(element, tuple): - element = filter(None, [map(elem) for elem in element]) - else: - element = map(element) - return element - - -def _AppendOrReturn(append, element): - """If |append| is None, simply return |element|. If |append| is not None, - then add |element| to it, adding each item in |element| if it's a list or - tuple.""" - if append is not None and element is not None: - if isinstance(element, list) or isinstance(element, tuple): - append.extend(element) - else: - append.append(element) - else: - return element - - -def _FindDirectXInstallation(): - """Try to find an installation location for the DirectX SDK. Check for the - standard environment variable, and if that doesn't exist, try to find - via the registry. May return None if not found in either location.""" - # Return previously calculated value, if there is one - if hasattr(_FindDirectXInstallation, "dxsdk_dir"): - return _FindDirectXInstallation.dxsdk_dir - - dxsdk_dir = os.environ.get("DXSDK_DIR") - if not dxsdk_dir: - # Setup params to pass to and attempt to launch reg.exe. - cmd = ["reg.exe", "query", r"HKLM\Software\Microsoft\DirectX", "/s"] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout = p.communicate()[0].decode("utf-8") - for line in stdout.splitlines(): - if "InstallPath" in line: - dxsdk_dir = line.split(" ")[3] + "\\" - - # Cache return value - _FindDirectXInstallation.dxsdk_dir = dxsdk_dir - return dxsdk_dir - - -def GetGlobalVSMacroEnv(vs_version): - """Get a dict of variables mapping internal VS macro names to their gyp - equivalents. Returns all variables that are independent of the target.""" - env = {} - # '$(VSInstallDir)' and '$(VCInstallDir)' are available when and only when - # Visual Studio is actually installed. - if vs_version.Path(): - env["$(VSInstallDir)"] = vs_version.Path() - env["$(VCInstallDir)"] = os.path.join(vs_version.Path(), "VC") + "\\" - # Chromium uses DXSDK_DIR in include/lib paths, but it may or may not be - # set. This happens when the SDK is sync'd via src-internal, rather than - # by typical end-user installation of the SDK. If it's not set, we don't - # want to leave the unexpanded variable in the path, so simply strip it. - dxsdk_dir = _FindDirectXInstallation() - env["$(DXSDK_DIR)"] = dxsdk_dir if dxsdk_dir else "" - # Try to find an installation location for the Windows DDK by checking - # the WDK_DIR environment variable, may be None. - env["$(WDK_DIR)"] = os.environ.get("WDK_DIR", "") - return env - - -def ExtractSharedMSVSSystemIncludes(configs, generator_flags): - """Finds msvs_system_include_dirs that are common to all targets, removes - them from all targets, and returns an OrderedSet containing them.""" - all_system_includes = OrderedSet(configs[0].get("msvs_system_include_dirs", [])) - for config in configs[1:]: - system_includes = config.get("msvs_system_include_dirs", []) - all_system_includes = all_system_includes & OrderedSet(system_includes) - if not all_system_includes: - return None - # Expand macros in all_system_includes. - env = GetGlobalVSMacroEnv(GetVSVersion(generator_flags)) - expanded_system_includes = OrderedSet( - [ExpandMacros(include, env) for include in all_system_includes] - ) - if any(["$" in include for include in expanded_system_includes]): - # Some path relies on target-specific variables, bail. - return None - - # Remove system includes shared by all targets from the targets. - for config in configs: - includes = config.get("msvs_system_include_dirs", []) - if includes: # Don't insert a msvs_system_include_dirs key if not needed. - # This must check the unexpanded includes list: - new_includes = [i for i in includes if i not in all_system_includes] - config["msvs_system_include_dirs"] = new_includes - return expanded_system_includes - - -class MsvsSettings: - """A class that understands the gyp 'msvs_...' values (especially the - msvs_settings field). They largely correpond to the VS2008 IDE DOM. This - class helps map those settings to command line options.""" - - def __init__(self, spec, generator_flags): - self.spec = spec - self.vs_version = GetVSVersion(generator_flags) - - supported_fields = [ - ("msvs_configuration_attributes", dict), - ("msvs_settings", dict), - ("msvs_system_include_dirs", list), - ("msvs_disabled_warnings", list), - ("msvs_precompiled_header", str), - ("msvs_precompiled_source", str), - ("msvs_configuration_platform", str), - ("msvs_target_platform", str), - ] - configs = spec["configurations"] - for field, default in supported_fields: - setattr(self, field, {}) - for configname, config in configs.items(): - getattr(self, field)[configname] = config.get(field, default()) - - self.msvs_cygwin_dirs = spec.get("msvs_cygwin_dirs", ["."]) - - unsupported_fields = [ - "msvs_prebuild", - "msvs_postbuild", - ] - unsupported = [] - for field in unsupported_fields: - for config in configs.values(): - if field in config: - unsupported += [ - "{} not supported (target {}).".format( - field, spec["target_name"] - ) - ] - if unsupported: - raise Exception("\n".join(unsupported)) - - def GetExtension(self): - """Returns the extension for the target, with no leading dot. - - Uses 'product_extension' if specified, otherwise uses MSVS defaults based on - the target type. - """ - ext = self.spec.get("product_extension", None) - if ext: - return ext - return gyp.MSVSUtil.TARGET_TYPE_EXT.get(self.spec["type"], "") - - def GetVSMacroEnv(self, base_to_build=None, config=None): - """Get a dict of variables mapping internal VS macro names to their gyp - equivalents.""" - target_arch = self.GetArch(config) - if target_arch == "x86": - target_platform = "Win32" - else: - target_platform = target_arch - target_name = self.spec.get("product_prefix", "") + self.spec.get( - "product_name", self.spec["target_name"] - ) - target_dir = base_to_build + "\\" if base_to_build else "" - target_ext = "." + self.GetExtension() - target_file_name = target_name + target_ext - - replacements = { - "$(InputName)": "${root}", - "$(InputPath)": "${source}", - "$(IntDir)": "$!INTERMEDIATE_DIR", - "$(OutDir)\\": target_dir, - "$(PlatformName)": target_platform, - "$(ProjectDir)\\": "", - "$(ProjectName)": self.spec["target_name"], - "$(TargetDir)\\": target_dir, - "$(TargetExt)": target_ext, - "$(TargetFileName)": target_file_name, - "$(TargetName)": target_name, - "$(TargetPath)": os.path.join(target_dir, target_file_name), - } - replacements.update(GetGlobalVSMacroEnv(self.vs_version)) - return replacements - - def ConvertVSMacros(self, s, base_to_build=None, config=None): - """Convert from VS macro names to something equivalent.""" - env = self.GetVSMacroEnv(base_to_build, config=config) - return ExpandMacros(s, env) - - def AdjustLibraries(self, libraries): - """Strip -l from library if it's specified with that.""" - libs = [lib[2:] if lib.startswith("-l") else lib for lib in libraries] - return [ - lib + ".lib" - if not lib.lower().endswith(".lib") and not lib.lower().endswith(".obj") - else lib - for lib in libs - ] - - def _GetAndMunge(self, field, path, default, prefix, append, map): - """Retrieve a value from |field| at |path| or return |default|. If - |append| is specified, and the item is found, it will be appended to that - object instead of returned. If |map| is specified, results will be - remapped through |map| before being returned or appended.""" - result = _GenericRetrieve(field, default, path) - result = _DoRemapping(result, map) - result = _AddPrefix(result, prefix) - return _AppendOrReturn(append, result) - - class _GetWrapper: - def __init__(self, parent, field, base_path, append=None): - self.parent = parent - self.field = field - self.base_path = [base_path] - self.append = append - - def __call__(self, name, map=None, prefix="", default=None): - return self.parent._GetAndMunge( - self.field, - self.base_path + [name], - default=default, - prefix=prefix, - append=self.append, - map=map, - ) - - def GetArch(self, config): - """Get architecture based on msvs_configuration_platform and - msvs_target_platform. Returns either 'x86' or 'x64'.""" - configuration_platform = self.msvs_configuration_platform.get(config, "") - platform = self.msvs_target_platform.get(config, "") - if not platform: # If no specific override, use the configuration's. - platform = configuration_platform - # Map from platform to architecture. - return {"Win32": "x86", "x64": "x64", "ARM64": "arm64"}.get(platform, "x86") - - def _TargetConfig(self, config): - """Returns the target-specific configuration.""" - # There's two levels of architecture/platform specification in VS. The - # first level is globally for the configuration (this is what we consider - # "the" config at the gyp level, which will be something like 'Debug' or - # 'Release'), VS2015 and later only use this level - if int(self.vs_version.short_name) >= 2015: - return config - # and a second target-specific configuration, which is an - # override for the global one. |config| is remapped here to take into - # account the local target-specific overrides to the global configuration. - arch = self.GetArch(config) - if arch == "x64" and not config.endswith("_x64"): - config += "_x64" - if arch == "x86" and config.endswith("_x64"): - config = config.rsplit("_", 1)[0] - return config - - def _Setting(self, path, config, default=None, prefix="", append=None, map=None): - """_GetAndMunge for msvs_settings.""" - return self._GetAndMunge( - self.msvs_settings[config], path, default, prefix, append, map - ) - - def _ConfigAttrib( - self, path, config, default=None, prefix="", append=None, map=None - ): - """_GetAndMunge for msvs_configuration_attributes.""" - return self._GetAndMunge( - self.msvs_configuration_attributes[config], - path, - default, - prefix, - append, - map, - ) - - def AdjustIncludeDirs(self, include_dirs, config): - """Updates include_dirs to expand VS specific paths, and adds the system - include dirs used for platform SDK and similar.""" - config = self._TargetConfig(config) - includes = include_dirs + self.msvs_system_include_dirs[config] - includes.extend( - self._Setting( - ("VCCLCompilerTool", "AdditionalIncludeDirectories"), config, default=[] - ) - ) - return [self.ConvertVSMacros(p, config=config) for p in includes] - - def AdjustMidlIncludeDirs(self, midl_include_dirs, config): - """Updates midl_include_dirs to expand VS specific paths, and adds the - system include dirs used for platform SDK and similar.""" - config = self._TargetConfig(config) - includes = midl_include_dirs + self.msvs_system_include_dirs[config] - includes.extend( - self._Setting( - ("VCMIDLTool", "AdditionalIncludeDirectories"), config, default=[] - ) - ) - return [self.ConvertVSMacros(p, config=config) for p in includes] - - def GetComputedDefines(self, config): - """Returns the set of defines that are injected to the defines list based - on other VS settings.""" - config = self._TargetConfig(config) - defines = [] - if self._ConfigAttrib(["CharacterSet"], config) == "1": - defines.extend(("_UNICODE", "UNICODE")) - if self._ConfigAttrib(["CharacterSet"], config) == "2": - defines.append("_MBCS") - defines.extend( - self._Setting( - ("VCCLCompilerTool", "PreprocessorDefinitions"), config, default=[] - ) - ) - return defines - - def GetCompilerPdbName(self, config, expand_special): - """Get the pdb file name that should be used for compiler invocations, or - None if there's no explicit name specified.""" - config = self._TargetConfig(config) - pdbname = self._Setting(("VCCLCompilerTool", "ProgramDataBaseFileName"), config) - if pdbname: - pdbname = expand_special(self.ConvertVSMacros(pdbname)) - return pdbname - - def GetMapFileName(self, config, expand_special): - """Gets the explicitly overridden map file name for a target or returns None - if it's not set.""" - config = self._TargetConfig(config) - map_file = self._Setting(("VCLinkerTool", "MapFileName"), config) - if map_file: - map_file = expand_special(self.ConvertVSMacros(map_file, config=config)) - return map_file - - def GetOutputName(self, config, expand_special): - """Gets the explicitly overridden output name for a target or returns None - if it's not overridden.""" - config = self._TargetConfig(config) - type = self.spec["type"] - root = "VCLibrarianTool" if type == "static_library" else "VCLinkerTool" - # TODO(scottmg): Handle OutputDirectory without OutputFile. - output_file = self._Setting((root, "OutputFile"), config) - if output_file: - output_file = expand_special( - self.ConvertVSMacros(output_file, config=config) - ) - return output_file - - def GetPDBName(self, config, expand_special, default): - """Gets the explicitly overridden pdb name for a target or returns - default if it's not overridden, or if no pdb will be generated.""" - config = self._TargetConfig(config) - output_file = self._Setting(("VCLinkerTool", "ProgramDatabaseFile"), config) - generate_debug_info = self._Setting( - ("VCLinkerTool", "GenerateDebugInformation"), config - ) - if generate_debug_info == "true": - if output_file: - return expand_special(self.ConvertVSMacros(output_file, config=config)) - else: - return default - else: - return None - - def GetNoImportLibrary(self, config): - """If NoImportLibrary: true, ninja will not expect the output to include - an import library.""" - config = self._TargetConfig(config) - noimplib = self._Setting(("NoImportLibrary",), config) - return noimplib == "true" - - def GetAsmflags(self, config): - """Returns the flags that need to be added to ml invocations.""" - config = self._TargetConfig(config) - asmflags = [] - safeseh = self._Setting(("MASM", "UseSafeExceptionHandlers"), config) - if safeseh == "true": - asmflags.append("/safeseh") - return asmflags - - def GetCflags(self, config): - """Returns the flags that need to be added to .c and .cc compilations.""" - config = self._TargetConfig(config) - cflags = [] - cflags.extend(["/wd" + w for w in self.msvs_disabled_warnings[config]]) - cl = self._GetWrapper( - self, self.msvs_settings[config], "VCCLCompilerTool", append=cflags - ) - cl( - "Optimization", - map={"0": "d", "1": "1", "2": "2", "3": "x"}, - prefix="/O", - default="2", - ) - cl("InlineFunctionExpansion", prefix="/Ob") - cl("DisableSpecificWarnings", prefix="/wd") - cl("StringPooling", map={"true": "/GF"}) - cl("EnableFiberSafeOptimizations", map={"true": "/GT"}) - cl("OmitFramePointers", map={"false": "-", "true": ""}, prefix="/Oy") - cl("EnableIntrinsicFunctions", map={"false": "-", "true": ""}, prefix="/Oi") - cl("FavorSizeOrSpeed", map={"1": "t", "2": "s"}, prefix="/O") - cl( - "FloatingPointModel", - map={"0": "precise", "1": "strict", "2": "fast"}, - prefix="/fp:", - default="0", - ) - cl("CompileAsManaged", map={"false": "", "true": "/clr"}) - cl("WholeProgramOptimization", map={"true": "/GL"}) - cl("WarningLevel", prefix="/W") - cl("WarnAsError", map={"true": "/WX"}) - cl( - "CallingConvention", - map={"0": "d", "1": "r", "2": "z", "3": "v"}, - prefix="/G", - ) - cl("DebugInformationFormat", map={"1": "7", "3": "i", "4": "I"}, prefix="/Z") - cl("RuntimeTypeInfo", map={"true": "/GR", "false": "/GR-"}) - cl("EnableFunctionLevelLinking", map={"true": "/Gy", "false": "/Gy-"}) - cl("MinimalRebuild", map={"true": "/Gm"}) - cl("BufferSecurityCheck", map={"true": "/GS", "false": "/GS-"}) - cl("BasicRuntimeChecks", map={"1": "s", "2": "u", "3": "1"}, prefix="/RTC") - cl( - "RuntimeLibrary", - map={"0": "T", "1": "Td", "2": "D", "3": "Dd"}, - prefix="/M", - ) - cl("ExceptionHandling", map={"1": "sc", "2": "a"}, prefix="/EH") - cl("DefaultCharIsUnsigned", map={"true": "/J"}) - cl( - "TreatWChar_tAsBuiltInType", - map={"false": "-", "true": ""}, - prefix="/Zc:wchar_t", - ) - cl("EnablePREfast", map={"true": "/analyze"}) - cl("AdditionalOptions", prefix="") - cl( - "EnableEnhancedInstructionSet", - map={"1": "SSE", "2": "SSE2", "3": "AVX", "4": "IA32", "5": "AVX2"}, - prefix="/arch:", - ) - cflags.extend( - [ - "/FI" + f - for f in self._Setting( - ("VCCLCompilerTool", "ForcedIncludeFiles"), config, default=[] - ) - ] - ) - if float(self.vs_version.project_version) >= 12.0: - # New flag introduced in VS2013 (project version 12.0) Forces writes to - # the program database (PDB) to be serialized through MSPDBSRV.EXE. - # https://msdn.microsoft.com/en-us/library/dn502518.aspx - cflags.append("/FS") - # ninja handles parallelism by itself, don't have the compiler do it too. - cflags = [x for x in cflags if not x.startswith("/MP")] - return cflags - - def _GetPchFlags(self, config, extension): - """Get the flags to be added to the cflags for precompiled header support.""" - config = self._TargetConfig(config) - # The PCH is only built once by a particular source file. Usage of PCH must - # only be for the same language (i.e. C vs. C++), so only include the pch - # flags when the language matches. - if self.msvs_precompiled_header[config]: - source_ext = os.path.splitext(self.msvs_precompiled_source[config])[1] - if _LanguageMatchesForPch(source_ext, extension): - pch = self.msvs_precompiled_header[config] - pchbase = os.path.split(pch)[1] - return ["/Yu" + pch, "/FI" + pch, "/Fp${pchprefix}." + pchbase + ".pch"] - return [] - - def GetCflagsC(self, config): - """Returns the flags that need to be added to .c compilations.""" - config = self._TargetConfig(config) - return self._GetPchFlags(config, ".c") - - def GetCflagsCC(self, config): - """Returns the flags that need to be added to .cc compilations.""" - config = self._TargetConfig(config) - return ["/TP"] + self._GetPchFlags(config, ".cc") - - def _GetAdditionalLibraryDirectories(self, root, config, gyp_to_build_path): - """Get and normalize the list of paths in AdditionalLibraryDirectories - setting.""" - config = self._TargetConfig(config) - libpaths = self._Setting( - (root, "AdditionalLibraryDirectories"), config, default=[] - ) - libpaths = [ - os.path.normpath(gyp_to_build_path(self.ConvertVSMacros(p, config=config))) - for p in libpaths - ] - return ['/LIBPATH:"' + p + '"' for p in libpaths] - - def GetLibFlags(self, config, gyp_to_build_path): - """Returns the flags that need to be added to lib commands.""" - config = self._TargetConfig(config) - libflags = [] - lib = self._GetWrapper( - self, self.msvs_settings[config], "VCLibrarianTool", append=libflags - ) - libflags.extend( - self._GetAdditionalLibraryDirectories( - "VCLibrarianTool", config, gyp_to_build_path - ) - ) - lib("LinkTimeCodeGeneration", map={"true": "/LTCG"}) - lib( - "TargetMachine", - map={"1": "X86", "17": "X64", "3": "ARM"}, - prefix="/MACHINE:", - ) - lib("AdditionalOptions") - return libflags - - def GetDefFile(self, gyp_to_build_path): - """Returns the .def file from sources, if any. Otherwise returns None.""" - spec = self.spec - if spec["type"] in ("shared_library", "loadable_module", "executable"): - def_files = [ - s for s in spec.get("sources", []) if s.lower().endswith(".def") - ] - if len(def_files) == 1: - return gyp_to_build_path(def_files[0]) - elif len(def_files) > 1: - raise Exception("Multiple .def files") - return None - - def _GetDefFileAsLdflags(self, ldflags, gyp_to_build_path): - """.def files get implicitly converted to a ModuleDefinitionFile for the - linker in the VS generator. Emulate that behaviour here.""" - def_file = self.GetDefFile(gyp_to_build_path) - if def_file: - ldflags.append('/DEF:"%s"' % def_file) - - def GetPGDName(self, config, expand_special): - """Gets the explicitly overridden pgd name for a target or returns None - if it's not overridden.""" - config = self._TargetConfig(config) - output_file = self._Setting(("VCLinkerTool", "ProfileGuidedDatabase"), config) - if output_file: - output_file = expand_special( - self.ConvertVSMacros(output_file, config=config) - ) - return output_file - - def GetLdflags( - self, - config, - gyp_to_build_path, - expand_special, - manifest_base_name, - output_name, - is_executable, - build_dir, - ): - """Returns the flags that need to be added to link commands, and the - manifest files.""" - config = self._TargetConfig(config) - ldflags = [] - ld = self._GetWrapper( - self, self.msvs_settings[config], "VCLinkerTool", append=ldflags - ) - self._GetDefFileAsLdflags(ldflags, gyp_to_build_path) - ld("GenerateDebugInformation", map={"true": "/DEBUG"}) - # TODO: These 'map' values come from machineTypeOption enum, - # and does not have an official value for ARM64 in VS2017 (yet). - # It needs to verify the ARM64 value when machineTypeOption is updated. - ld( - "TargetMachine", - map={"1": "X86", "17": "X64", "3": "ARM", "18": "ARM64"}, - prefix="/MACHINE:", - ) - ldflags.extend( - self._GetAdditionalLibraryDirectories( - "VCLinkerTool", config, gyp_to_build_path - ) - ) - ld("DelayLoadDLLs", prefix="/DELAYLOAD:") - ld("TreatLinkerWarningAsErrors", prefix="/WX", map={"true": "", "false": ":NO"}) - out = self.GetOutputName(config, expand_special) - if out: - ldflags.append("/OUT:" + out) - pdb = self.GetPDBName(config, expand_special, output_name + ".pdb") - if pdb: - ldflags.append("/PDB:" + pdb) - pgd = self.GetPGDName(config, expand_special) - if pgd: - ldflags.append("/PGD:" + pgd) - map_file = self.GetMapFileName(config, expand_special) - ld("GenerateMapFile", map={"true": "/MAP:" + map_file if map_file else "/MAP"}) - ld("MapExports", map={"true": "/MAPINFO:EXPORTS"}) - ld("AdditionalOptions", prefix="") - - minimum_required_version = self._Setting( - ("VCLinkerTool", "MinimumRequiredVersion"), config, default="" - ) - if minimum_required_version: - minimum_required_version = "," + minimum_required_version - ld( - "SubSystem", - map={ - "1": "CONSOLE%s" % minimum_required_version, - "2": "WINDOWS%s" % minimum_required_version, - }, - prefix="/SUBSYSTEM:", - ) - - stack_reserve_size = self._Setting( - ("VCLinkerTool", "StackReserveSize"), config, default="" - ) - if stack_reserve_size: - stack_commit_size = self._Setting( - ("VCLinkerTool", "StackCommitSize"), config, default="" - ) - if stack_commit_size: - stack_commit_size = "," + stack_commit_size - ldflags.append(f"/STACK:{stack_reserve_size}{stack_commit_size}") - - ld("TerminalServerAware", map={"1": ":NO", "2": ""}, prefix="/TSAWARE") - ld("LinkIncremental", map={"1": ":NO", "2": ""}, prefix="/INCREMENTAL") - ld("BaseAddress", prefix="/BASE:") - ld("FixedBaseAddress", map={"1": ":NO", "2": ""}, prefix="/FIXED") - ld("RandomizedBaseAddress", map={"1": ":NO", "2": ""}, prefix="/DYNAMICBASE") - ld("DataExecutionPrevention", map={"1": ":NO", "2": ""}, prefix="/NXCOMPAT") - ld("OptimizeReferences", map={"1": "NOREF", "2": "REF"}, prefix="/OPT:") - ld("ForceSymbolReferences", prefix="/INCLUDE:") - ld("EnableCOMDATFolding", map={"1": "NOICF", "2": "ICF"}, prefix="/OPT:") - ld( - "LinkTimeCodeGeneration", - map={"1": "", "2": ":PGINSTRUMENT", "3": ":PGOPTIMIZE", "4": ":PGUPDATE"}, - prefix="/LTCG", - ) - ld("IgnoreDefaultLibraryNames", prefix="/NODEFAULTLIB:") - ld("ResourceOnlyDLL", map={"true": "/NOENTRY"}) - ld("EntryPointSymbol", prefix="/ENTRY:") - ld("Profile", map={"true": "/PROFILE"}) - ld("LargeAddressAware", map={"1": ":NO", "2": ""}, prefix="/LARGEADDRESSAWARE") - # TODO(scottmg): This should sort of be somewhere else (not really a flag). - ld("AdditionalDependencies", prefix="") - - if self.GetArch(config) == "x86": - safeseh_default = "true" - else: - safeseh_default = None - ld( - "ImageHasSafeExceptionHandlers", - map={"false": ":NO", "true": ""}, - prefix="/SAFESEH", - default=safeseh_default, - ) - - # If the base address is not specifically controlled, DYNAMICBASE should - # be on by default. - if not any("DYNAMICBASE" in flag or flag == "/FIXED" for flag in ldflags): - ldflags.append("/DYNAMICBASE") - - # If the NXCOMPAT flag has not been specified, default to on. Despite the - # documentation that says this only defaults to on when the subsystem is - # Vista or greater (which applies to the linker), the IDE defaults it on - # unless it's explicitly off. - if not any("NXCOMPAT" in flag for flag in ldflags): - ldflags.append("/NXCOMPAT") - - have_def_file = any(flag.startswith("/DEF:") for flag in ldflags) - ( - manifest_flags, - intermediate_manifest, - manifest_files, - ) = self._GetLdManifestFlags( - config, - manifest_base_name, - gyp_to_build_path, - is_executable and not have_def_file, - build_dir, - ) - ldflags.extend(manifest_flags) - return ldflags, intermediate_manifest, manifest_files - - def _GetLdManifestFlags( - self, config, name, gyp_to_build_path, allow_isolation, build_dir - ): - """Returns a 3-tuple: - - the set of flags that need to be added to the link to generate - a default manifest - - the intermediate manifest that the linker will generate that should be - used to assert it doesn't add anything to the merged one. - - the list of all the manifest files to be merged by the manifest tool and - included into the link.""" - generate_manifest = self._Setting( - ("VCLinkerTool", "GenerateManifest"), config, default="true" - ) - if generate_manifest != "true": - # This means not only that the linker should not generate the intermediate - # manifest but also that the manifest tool should do nothing even when - # additional manifests are specified. - return ["/MANIFEST:NO"], [], [] - - output_name = name + ".intermediate.manifest" - flags = [ - "/MANIFEST", - "/ManifestFile:" + output_name, - ] - - # Instead of using the MANIFESTUAC flags, we generate a .manifest to - # include into the list of manifests. This allows us to avoid the need to - # do two passes during linking. The /MANIFEST flag and /ManifestFile are - # still used, and the intermediate manifest is used to assert that the - # final manifest we get from merging all the additional manifest files - # (plus the one we generate here) isn't modified by merging the - # intermediate into it. - - # Always NO, because we generate a manifest file that has what we want. - flags.append("/MANIFESTUAC:NO") - - config = self._TargetConfig(config) - enable_uac = self._Setting( - ("VCLinkerTool", "EnableUAC"), config, default="true" - ) - manifest_files = [] - generated_manifest_outer = ( - "" - "" - "%s" - ) - if enable_uac == "true": - execution_level = self._Setting( - ("VCLinkerTool", "UACExecutionLevel"), config, default="0" - ) - execution_level_map = { - "0": "asInvoker", - "1": "highestAvailable", - "2": "requireAdministrator", - } - - ui_access = self._Setting( - ("VCLinkerTool", "UACUIAccess"), config, default="false" - ) - - inner = """ - - - - - - -""".format( - execution_level_map[execution_level], - ui_access, - ) - else: - inner = "" - - generated_manifest_contents = generated_manifest_outer % inner - generated_name = name + ".generated.manifest" - # Need to join with the build_dir here as we're writing it during - # generation time, but we return the un-joined version because the build - # will occur in that directory. We only write the file if the contents - # have changed so that simply regenerating the project files doesn't - # cause a relink. - build_dir_generated_name = os.path.join(build_dir, generated_name) - gyp.common.EnsureDirExists(build_dir_generated_name) - f = gyp.common.WriteOnDiff(build_dir_generated_name) - f.write(generated_manifest_contents) - f.close() - manifest_files = [generated_name] - - if allow_isolation: - flags.append("/ALLOWISOLATION") - - manifest_files += self._GetAdditionalManifestFiles(config, gyp_to_build_path) - return flags, output_name, manifest_files - - def _GetAdditionalManifestFiles(self, config, gyp_to_build_path): - """Gets additional manifest files that are added to the default one - generated by the linker.""" - files = self._Setting( - ("VCManifestTool", "AdditionalManifestFiles"), config, default=[] - ) - if isinstance(files, str): - files = files.split(";") - return [ - os.path.normpath(gyp_to_build_path(self.ConvertVSMacros(f, config=config))) - for f in files - ] - - def IsUseLibraryDependencyInputs(self, config): - """Returns whether the target should be linked via Use Library Dependency - Inputs (using component .objs of a given .lib).""" - config = self._TargetConfig(config) - uldi = self._Setting(("VCLinkerTool", "UseLibraryDependencyInputs"), config) - return uldi == "true" - - def IsEmbedManifest(self, config): - """Returns whether manifest should be linked into binary.""" - config = self._TargetConfig(config) - embed = self._Setting( - ("VCManifestTool", "EmbedManifest"), config, default="true" - ) - return embed == "true" - - def IsLinkIncremental(self, config): - """Returns whether the target should be linked incrementally.""" - config = self._TargetConfig(config) - link_inc = self._Setting(("VCLinkerTool", "LinkIncremental"), config) - return link_inc != "1" - - def GetRcflags(self, config, gyp_to_ninja_path): - """Returns the flags that need to be added to invocations of the resource - compiler.""" - config = self._TargetConfig(config) - rcflags = [] - rc = self._GetWrapper( - self, self.msvs_settings[config], "VCResourceCompilerTool", append=rcflags - ) - rc("AdditionalIncludeDirectories", map=gyp_to_ninja_path, prefix="/I") - rcflags.append("/I" + gyp_to_ninja_path(".")) - rc("PreprocessorDefinitions", prefix="/d") - # /l arg must be in hex without leading '0x' - rc("Culture", prefix="/l", map=lambda x: hex(int(x))[2:]) - return rcflags - - def BuildCygwinBashCommandLine(self, args, path_to_base): - """Build a command line that runs args via cygwin bash. We assume that all - incoming paths are in Windows normpath'd form, so they need to be - converted to posix style for the part of the command line that's passed to - bash. We also have to do some Visual Studio macro emulation here because - various rules use magic VS names for things. Also note that rules that - contain ninja variables cannot be fixed here (for example ${source}), so - the outer generator needs to make sure that the paths that are written out - are in posix style, if the command line will be used here.""" - cygwin_dir = os.path.normpath( - os.path.join(path_to_base, self.msvs_cygwin_dirs[0]) - ) - cd = ("cd %s" % path_to_base).replace("\\", "/") - args = [a.replace("\\", "/").replace('"', '\\"') for a in args] - args = ["'%s'" % a.replace("'", "'\\''") for a in args] - bash_cmd = " ".join(args) - cmd = ( - 'call "%s\\setup_env.bat" && set CYGWIN=nontsec && ' % cygwin_dir - + f'bash -c "{cd} ; {bash_cmd}"' - ) - return cmd - - RuleShellFlags = collections.namedtuple("RuleShellFlags", ["cygwin", "quote"]) - - def GetRuleShellFlags(self, rule): - """Return RuleShellFlags about how the given rule should be run. This - includes whether it should run under cygwin (msvs_cygwin_shell), and - whether the commands should be quoted (msvs_quote_cmd).""" - # If the variable is unset, or set to 1 we use cygwin - cygwin = int(rule.get("msvs_cygwin_shell", - self.spec.get("msvs_cygwin_shell", 1))) != 0 - # Default to quoting. There's only a few special instances where the - # target command uses non-standard command line parsing and handle quotes - # and quote escaping differently. - quote_cmd = int(rule.get("msvs_quote_cmd", 1)) - assert quote_cmd != 0 or cygwin != 1, \ - "msvs_quote_cmd=0 only applicable for msvs_cygwin_shell=0" - return MsvsSettings.RuleShellFlags(cygwin, quote_cmd) - - def _HasExplicitRuleForExtension(self, spec, extension): - """Determine if there's an explicit rule for a particular extension.""" - for rule in spec.get("rules", []): - if rule["extension"] == extension: - return True - return False - - def _HasExplicitIdlActions(self, spec): - """Determine if an action should not run midl for .idl files.""" - return any( - [action.get("explicit_idl_action", 0) for action in spec.get("actions", [])] - ) - - def HasExplicitIdlRulesOrActions(self, spec): - """Determine if there's an explicit rule or action for idl files. When - there isn't we need to generate implicit rules to build MIDL .idl files.""" - return self._HasExplicitRuleForExtension( - spec, "idl" - ) or self._HasExplicitIdlActions(spec) - - def HasExplicitAsmRules(self, spec): - """Determine if there's an explicit rule for asm files. When there isn't we - need to generate implicit rules to assemble .asm files.""" - return self._HasExplicitRuleForExtension(spec, "asm") - - def GetIdlBuildData(self, source, config): - """Determine the implicit outputs for an idl file. Returns output - directory, outputs, and variables and flags that are required.""" - config = self._TargetConfig(config) - midl_get = self._GetWrapper(self, self.msvs_settings[config], "VCMIDLTool") - - def midl(name, default=None): - return self.ConvertVSMacros(midl_get(name, default=default), config=config) - - tlb = midl("TypeLibraryName", default="${root}.tlb") - header = midl("HeaderFileName", default="${root}.h") - dlldata = midl("DLLDataFileName", default="dlldata.c") - iid = midl("InterfaceIdentifierFileName", default="${root}_i.c") - proxy = midl("ProxyFileName", default="${root}_p.c") - # Note that .tlb is not included in the outputs as it is not always - # generated depending on the content of the input idl file. - outdir = midl("OutputDirectory", default="") - output = [header, dlldata, iid, proxy] - variables = [ - ("tlb", tlb), - ("h", header), - ("dlldata", dlldata), - ("iid", iid), - ("proxy", proxy), - ] - # TODO(scottmg): Are there configuration settings to set these flags? - target_platform = self.GetArch(config) - if target_platform == "x86": - target_platform = "win32" - flags = ["/char", "signed", "/env", target_platform, "/Oicf"] - return outdir, output, variables, flags - - -def _LanguageMatchesForPch(source_ext, pch_source_ext): - c_exts = (".c",) - cc_exts = (".cc", ".cxx", ".cpp") - return (source_ext in c_exts and pch_source_ext in c_exts) or ( - source_ext in cc_exts and pch_source_ext in cc_exts - ) - - -class PrecompiledHeader: - """Helper to generate dependencies and build rules to handle generation of - precompiled headers. Interface matches the GCH handler in xcode_emulation.py. - """ - - def __init__( - self, settings, config, gyp_to_build_path, gyp_to_unique_output, obj_ext - ): - self.settings = settings - self.config = config - pch_source = self.settings.msvs_precompiled_source[self.config] - self.pch_source = gyp_to_build_path(pch_source) - filename, _ = os.path.splitext(pch_source) - self.output_obj = gyp_to_unique_output(filename + obj_ext).lower() - - def _PchHeader(self): - """Get the header that will appear in an #include line for all source - files.""" - return self.settings.msvs_precompiled_header[self.config] - - def GetObjDependencies(self, sources, objs, arch): - """Given a list of sources files and the corresponding object files, - returns a list of the pch files that should be depended upon. The - additional wrapping in the return value is for interface compatibility - with make.py on Mac, and xcode_emulation.py.""" - assert arch is None - if not self._PchHeader(): - return [] - pch_ext = os.path.splitext(self.pch_source)[1] - for source in sources: - if _LanguageMatchesForPch(os.path.splitext(source)[1], pch_ext): - return [(None, None, self.output_obj)] - return [] - - def GetPchBuildCommands(self, arch): - """Not used on Windows as there are no additional build steps required - (instead, existing steps are modified in GetFlagsModifications below).""" - return [] - - def GetFlagsModifications( - self, input, output, implicit, command, cflags_c, cflags_cc, expand_special - ): - """Get the modified cflags and implicit dependencies that should be used - for the pch compilation step.""" - if input == self.pch_source: - pch_output = ["/Yc" + self._PchHeader()] - if command == "cxx": - return ( - [("cflags_cc", map(expand_special, cflags_cc + pch_output))], - self.output_obj, - [], - ) - elif command == "cc": - return ( - [("cflags_c", map(expand_special, cflags_c + pch_output))], - self.output_obj, - [], - ) - return [], output, implicit - - -vs_version = None - - -def GetVSVersion(generator_flags): - global vs_version - if not vs_version: - vs_version = gyp.MSVSVersion.SelectVisualStudioVersion( - generator_flags.get("msvs_version", "auto"), allow_fallback=False - ) - return vs_version - - -def _GetVsvarsSetupArgs(generator_flags, arch): - vs = GetVSVersion(generator_flags) - return vs.SetupScript() - - -def ExpandMacros(string, expansions): - """Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv - for the canonical way to retrieve a suitable dict.""" - if "$" in string: - for old, new in expansions.items(): - assert "$(" not in new, new - string = string.replace(old, new) - return string - - -def _ExtractImportantEnvironment(output_of_set): - """Extracts environment variables required for the toolchain to run from - a textual dump output by the cmd.exe 'set' command.""" - envvars_to_save = ( - "goma_.*", # TODO(scottmg): This is ugly, but needed for goma. - "include", - "lib", - "libpath", - "path", - "pathext", - "systemroot", - "temp", - "tmp", - ) - env = {} - # This occasionally happens and leads to misleading SYSTEMROOT error messages - # if not caught here. - if output_of_set.count("=") == 0: - raise Exception("Invalid output_of_set. Value is:\n%s" % output_of_set) - for line in output_of_set.splitlines(): - for envvar in envvars_to_save: - if re.match(envvar + "=", line.lower()): - var, setting = line.split("=", 1) - if envvar == "path": - # Our own rules (for running gyp-win-tool) and other actions in - # Chromium rely on python being in the path. Add the path to this - # python here so that if it's not in the path when ninja is run - # later, python will still be found. - setting = os.path.dirname(sys.executable) + os.pathsep + setting - env[var.upper()] = setting - break - for required in ("SYSTEMROOT", "TEMP", "TMP"): - if required not in env: - raise Exception( - 'Environment variable "%s" ' - "required to be set to valid path" % required - ) - return env - - -def _FormatAsEnvironmentBlock(envvar_dict): - """Format as an 'environment block' directly suitable for CreateProcess. - Briefly this is a list of key=value\0, terminated by an additional \0. See - CreateProcess documentation for more details.""" - block = "" - nul = "\0" - for key, value in envvar_dict.items(): - block += key + "=" + value + nul - block += nul - return block - - -def _ExtractCLPath(output_of_where): - """Gets the path to cl.exe based on the output of calling the environment - setup batch file, followed by the equivalent of `where`.""" - # Take the first line, as that's the first found in the PATH. - for line in output_of_where.strip().splitlines(): - if line.startswith("LOC:"): - return line[len("LOC:") :].strip() - - -def GenerateEnvironmentFiles( - toplevel_build_dir, generator_flags, system_includes, open_out -): - """It's not sufficient to have the absolute path to the compiler, linker, - etc. on Windows, as those tools rely on .dlls being in the PATH. We also - need to support both x86 and x64 compilers within the same build (to support - msvs_target_platform hackery). Different architectures require a different - compiler binary, and different supporting environment variables (INCLUDE, - LIB, LIBPATH). So, we extract the environment here, wrap all invocations - of compiler tools (cl, link, lib, rc, midl, etc.) via win_tool.py which - sets up the environment, and then we do not prefix the compiler with - an absolute path, instead preferring something like "cl.exe" in the rule - which will then run whichever the environment setup has put in the path. - When the following procedure to generate environment files does not - meet your requirement (e.g. for custom toolchains), you can pass - "-G ninja_use_custom_environment_files" to the gyp to suppress file - generation and use custom environment files prepared by yourself.""" - archs = ("x86", "x64") - if generator_flags.get("ninja_use_custom_environment_files", 0): - cl_paths = {} - for arch in archs: - cl_paths[arch] = "cl.exe" - return cl_paths - vs = GetVSVersion(generator_flags) - cl_paths = {} - for arch in archs: - # Extract environment variables for subprocesses. - args = vs.SetupScript(arch) - args.extend(("&&", "set")) - popen = subprocess.Popen( - args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - variables = popen.communicate()[0].decode("utf-8") - if popen.returncode != 0: - raise Exception('"%s" failed with error %d' % (args, popen.returncode)) - env = _ExtractImportantEnvironment(variables) - - # Inject system includes from gyp files into INCLUDE. - if system_includes: - system_includes = system_includes | OrderedSet( - env.get("INCLUDE", "").split(";") - ) - env["INCLUDE"] = ";".join(system_includes) - - env_block = _FormatAsEnvironmentBlock(env) - f = open_out(os.path.join(toplevel_build_dir, "environment." + arch), "w") - f.write(env_block) - f.close() - - # Find cl.exe location for this architecture. - args = vs.SetupScript(arch) - args.extend( - ("&&", "for", "%i", "in", "(cl.exe)", "do", "@echo", "LOC:%~$PATH:i") - ) - popen = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE) - output = popen.communicate()[0].decode("utf-8") - cl_paths[arch] = _ExtractCLPath(output) - return cl_paths - - -def VerifyMissingSources(sources, build_dir, generator_flags, gyp_to_ninja): - """Emulate behavior of msvs_error_on_missing_sources present in the msvs - generator: Check that all regular source files, i.e. not created at run time, - exist on disk. Missing files cause needless recompilation when building via - VS, and we want this check to match for people/bots that build using ninja, - so they're not surprised when the VS build fails.""" - if int(generator_flags.get("msvs_error_on_missing_sources", 0)): - no_specials = filter(lambda x: "$" not in x, sources) - relative = [os.path.join(build_dir, gyp_to_ninja(s)) for s in no_specials] - missing = [x for x in relative if not os.path.exists(x)] - if missing: - # They'll look like out\Release\..\..\stuff\things.cc, so normalize the - # path for a slightly less crazy looking output. - cleaned_up = [os.path.normpath(x) for x in missing] - raise Exception("Missing input files:\n%s" % "\n".join(cleaned_up)) - - -# Sets some values in default_variables, which are required for many -# generators, run on Windows. -def CalculateCommonVariables(default_variables, params): - generator_flags = params.get("generator_flags", {}) - - # Set a variable so conditions can be based on msvs_version. - msvs_version = gyp.msvs_emulation.GetVSVersion(generator_flags) - default_variables["MSVS_VERSION"] = msvs_version.ShortName() - - # To determine processor word size on Windows, in addition to checking - # PROCESSOR_ARCHITECTURE (which reflects the word size of the current - # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which - # contains the actual word size of the system when running thru WOW64). - if "64" in os.environ.get("PROCESSOR_ARCHITECTURE", "") or "64" in os.environ.get( - "PROCESSOR_ARCHITEW6432", "" - ): - default_variables["MSVS_OS_BITS"] = 64 - else: - default_variables["MSVS_OS_BITS"] = 32 diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py deleted file mode 100644 index 0e3e86c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +++ /dev/null @@ -1,174 +0,0 @@ -# This file comes from -# https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py -# Do not edit! Edit the upstream one instead. - -"""Python module for generating .ninja files. - -Note that this is emphatically not a required piece of Ninja; it's -just a helpful utility for build-file-generation systems that already -use Python. -""" - -import textwrap - - -def escape_path(word): - return word.replace("$ ", "$$ ").replace(" ", "$ ").replace(":", "$:") - - -class Writer: - def __init__(self, output, width=78): - self.output = output - self.width = width - - def newline(self): - self.output.write("\n") - - def comment(self, text): - for line in textwrap.wrap(text, self.width - 2): - self.output.write("# " + line + "\n") - - def variable(self, key, value, indent=0): - if value is None: - return - if isinstance(value, list): - value = " ".join(filter(None, value)) # Filter out empty strings. - self._line(f"{key} = {value}", indent) - - def pool(self, name, depth): - self._line("pool %s" % name) - self.variable("depth", depth, indent=1) - - def rule( - self, - name, - command, - description=None, - depfile=None, - generator=False, - pool=None, - restat=False, - rspfile=None, - rspfile_content=None, - deps=None, - ): - self._line("rule %s" % name) - self.variable("command", command, indent=1) - if description: - self.variable("description", description, indent=1) - if depfile: - self.variable("depfile", depfile, indent=1) - if generator: - self.variable("generator", "1", indent=1) - if pool: - self.variable("pool", pool, indent=1) - if restat: - self.variable("restat", "1", indent=1) - if rspfile: - self.variable("rspfile", rspfile, indent=1) - if rspfile_content: - self.variable("rspfile_content", rspfile_content, indent=1) - if deps: - self.variable("deps", deps, indent=1) - - def build( - self, outputs, rule, inputs=None, implicit=None, order_only=None, variables=None - ): - outputs = self._as_list(outputs) - all_inputs = self._as_list(inputs)[:] - out_outputs = list(map(escape_path, outputs)) - all_inputs = list(map(escape_path, all_inputs)) - - if implicit: - implicit = map(escape_path, self._as_list(implicit)) - all_inputs.append("|") - all_inputs.extend(implicit) - if order_only: - order_only = map(escape_path, self._as_list(order_only)) - all_inputs.append("||") - all_inputs.extend(order_only) - - self._line( - "build {}: {}".format(" ".join(out_outputs), " ".join([rule] + all_inputs)) - ) - - if variables: - if isinstance(variables, dict): - iterator = iter(variables.items()) - else: - iterator = iter(variables) - - for key, val in iterator: - self.variable(key, val, indent=1) - - return outputs - - def include(self, path): - self._line("include %s" % path) - - def subninja(self, path): - self._line("subninja %s" % path) - - def default(self, paths): - self._line("default %s" % " ".join(self._as_list(paths))) - - def _count_dollars_before_index(self, s, i): - """Returns the number of '$' characters right in front of s[i].""" - dollar_count = 0 - dollar_index = i - 1 - while dollar_index > 0 and s[dollar_index] == "$": - dollar_count += 1 - dollar_index -= 1 - return dollar_count - - def _line(self, text, indent=0): - """Write 'text' word-wrapped at self.width characters.""" - leading_space = " " * indent - while len(leading_space) + len(text) > self.width: - # The text is too wide; wrap if possible. - - # Find the rightmost space that would obey our width constraint and - # that's not an escaped space. - available_space = self.width - len(leading_space) - len(" $") - space = available_space - while True: - space = text.rfind(" ", 0, space) - if space < 0 or self._count_dollars_before_index(text, space) % 2 == 0: - break - - if space < 0: - # No such space; just use the first unescaped space we can find. - space = available_space - 1 - while True: - space = text.find(" ", space + 1) - if ( - space < 0 - or self._count_dollars_before_index(text, space) % 2 == 0 - ): - break - if space < 0: - # Give up on breaking. - break - - self.output.write(leading_space + text[0:space] + " $\n") - text = text[space + 1 :] - - # Subsequent lines are continuations, so indent them. - leading_space = " " * (indent + 2) - - self.output.write(leading_space + text + "\n") - - def _as_list(self, input): - if input is None: - return [] - if isinstance(input, list): - return input - return [input] - - -def escape(string): - """Escape a string such that it can be embedded into a Ninja file without - further interpretation.""" - assert "\n" not in string, "Ninja syntax does not allow newlines" - # We only have one special metacharacter: '$'. - return string.replace("$", "$$") diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py deleted file mode 100644 index 729cec0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2014 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""A clone of the default copy.deepcopy that doesn't handle cyclic -structures or complex types except for dicts and lists. This is -because gyp copies so large structure that small copy overhead ends up -taking seconds in a project the size of Chromium.""" - - -class Error(Exception): - pass - - -__all__ = ["Error", "deepcopy"] - - -def deepcopy(x): - """Deep copy operation on gyp objects such as strings, ints, dicts - and lists. More than twice as fast as copy.deepcopy but much less - generic.""" - - try: - return _deepcopy_dispatch[type(x)](x) - except KeyError: - raise Error( - "Unsupported type %s for deepcopy. Use copy.deepcopy " - + "or expand simple_copy support." % type(x) - ) - - -_deepcopy_dispatch = d = {} - - -def _deepcopy_atomic(x): - return x - - -types = bool, float, int, str, type, type(None) - -for x in types: - d[x] = _deepcopy_atomic - - -def _deepcopy_list(x): - return [deepcopy(a) for a in x] - - -d[list] = _deepcopy_list - - -def _deepcopy_dict(x): - y = {} - for key, value in x.items(): - y[deepcopy(key)] = deepcopy(value) - return y - - -d[dict] = _deepcopy_dict - -del d diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py deleted file mode 100755 index 638eee4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +++ /dev/null @@ -1,374 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Utility functions for Windows builds. - -These functions are executed via gyp-win-tool when using the ninja generator. -""" - - -import os -import re -import shutil -import subprocess -import stat -import string -import sys - -BASE_DIR = os.path.dirname(os.path.abspath(__file__)) - -# A regex matching an argument corresponding to the output filename passed to -# link.exe. -_LINK_EXE_OUT_ARG = re.compile("/OUT:(?P.+)$", re.IGNORECASE) - - -def main(args): - executor = WinTool() - exit_code = executor.Dispatch(args) - if exit_code is not None: - sys.exit(exit_code) - - -class WinTool: - """This class performs all the Windows tooling steps. The methods can either - be executed directly, or dispatched from an argument list.""" - - def _UseSeparateMspdbsrv(self, env, args): - """Allows to use a unique instance of mspdbsrv.exe per linker instead of a - shared one.""" - if len(args) < 1: - raise Exception("Not enough arguments") - - if args[0] != "link.exe": - return - - # Use the output filename passed to the linker to generate an endpoint name - # for mspdbsrv.exe. - endpoint_name = None - for arg in args: - m = _LINK_EXE_OUT_ARG.match(arg) - if m: - endpoint_name = re.sub( - r"\W+", "", "%s_%d" % (m.group("out"), os.getpid()) - ) - break - - if endpoint_name is None: - return - - # Adds the appropriate environment variable. This will be read by link.exe - # to know which instance of mspdbsrv.exe it should connect to (if it's - # not set then the default endpoint is used). - env["_MSPDBSRV_ENDPOINT_"] = endpoint_name - - def Dispatch(self, args): - """Dispatches a string command to a method.""" - if len(args) < 1: - raise Exception("Not enough arguments") - - method = "Exec%s" % self._CommandifyName(args[0]) - return getattr(self, method)(*args[1:]) - - def _CommandifyName(self, name_string): - """Transforms a tool name like recursive-mirror to RecursiveMirror.""" - return name_string.title().replace("-", "") - - def _GetEnv(self, arch): - """Gets the saved environment from a file for a given architecture.""" - # The environment is saved as an "environment block" (see CreateProcess - # and msvs_emulation for details). We convert to a dict here. - # Drop last 2 NULs, one for list terminator, one for trailing vs. separator. - pairs = open(arch).read()[:-2].split("\0") - kvs = [item.split("=", 1) for item in pairs] - return dict(kvs) - - def ExecStamp(self, path): - """Simple stamp command.""" - open(path, "w").close() - - def ExecRecursiveMirror(self, source, dest): - """Emulation of rm -rf out && cp -af in out.""" - if os.path.exists(dest): - if os.path.isdir(dest): - - def _on_error(fn, path, excinfo): - # The operation failed, possibly because the file is set to - # read-only. If that's why, make it writable and try the op again. - if not os.access(path, os.W_OK): - os.chmod(path, stat.S_IWRITE) - fn(path) - - shutil.rmtree(dest, onerror=_on_error) - else: - if not os.access(dest, os.W_OK): - # Attempt to make the file writable before deleting it. - os.chmod(dest, stat.S_IWRITE) - os.unlink(dest) - - if os.path.isdir(source): - shutil.copytree(source, dest) - else: - shutil.copy2(source, dest) - - def ExecLinkWrapper(self, arch, use_separate_mspdbsrv, *args): - """Filter diagnostic output from link that looks like: - ' Creating library ui.dll.lib and object ui.dll.exp' - This happens when there are exports from the dll or exe. - """ - env = self._GetEnv(arch) - if use_separate_mspdbsrv == "True": - self._UseSeparateMspdbsrv(env, args) - if sys.platform == "win32": - args = list(args) # *args is a tuple by default, which is read-only. - args[0] = args[0].replace("/", "\\") - # https://docs.python.org/2/library/subprocess.html: - # "On Unix with shell=True [...] if args is a sequence, the first item - # specifies the command string, and any additional items will be treated as - # additional arguments to the shell itself. That is to say, Popen does the - # equivalent of: - # Popen(['/bin/sh', '-c', args[0], args[1], ...])" - # For that reason, since going through the shell doesn't seem necessary on - # non-Windows don't do that there. - link = subprocess.Popen( - args, - shell=sys.platform == "win32", - env=env, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - ) - out = link.communicate()[0].decode("utf-8") - for line in out.splitlines(): - if ( - not line.startswith(" Creating library ") - and not line.startswith("Generating code") - and not line.startswith("Finished generating code") - ): - print(line) - return link.returncode - - def ExecLinkWithManifests( - self, - arch, - embed_manifest, - out, - ldcmd, - resname, - mt, - rc, - intermediate_manifest, - *manifests - ): - """A wrapper for handling creating a manifest resource and then executing - a link command.""" - # The 'normal' way to do manifests is to have link generate a manifest - # based on gathering dependencies from the object files, then merge that - # manifest with other manifests supplied as sources, convert the merged - # manifest to a resource, and then *relink*, including the compiled - # version of the manifest resource. This breaks incremental linking, and - # is generally overly complicated. Instead, we merge all the manifests - # provided (along with one that includes what would normally be in the - # linker-generated one, see msvs_emulation.py), and include that into the - # first and only link. We still tell link to generate a manifest, but we - # only use that to assert that our simpler process did not miss anything. - variables = { - "python": sys.executable, - "arch": arch, - "out": out, - "ldcmd": ldcmd, - "resname": resname, - "mt": mt, - "rc": rc, - "intermediate_manifest": intermediate_manifest, - "manifests": " ".join(manifests), - } - add_to_ld = "" - if manifests: - subprocess.check_call( - "%(python)s gyp-win-tool manifest-wrapper %(arch)s %(mt)s -nologo " - "-manifest %(manifests)s -out:%(out)s.manifest" % variables - ) - if embed_manifest == "True": - subprocess.check_call( - "%(python)s gyp-win-tool manifest-to-rc %(arch)s %(out)s.manifest" - " %(out)s.manifest.rc %(resname)s" % variables - ) - subprocess.check_call( - "%(python)s gyp-win-tool rc-wrapper %(arch)s %(rc)s " - "%(out)s.manifest.rc" % variables - ) - add_to_ld = " %(out)s.manifest.res" % variables - subprocess.check_call(ldcmd + add_to_ld) - - # Run mt.exe on the theoretically complete manifest we generated, merging - # it with the one the linker generated to confirm that the linker - # generated one does not add anything. This is strictly unnecessary for - # correctness, it's only to verify that e.g. /MANIFESTDEPENDENCY was not - # used in a #pragma comment. - if manifests: - # Merge the intermediate one with ours to .assert.manifest, then check - # that .assert.manifest is identical to ours. - subprocess.check_call( - "%(python)s gyp-win-tool manifest-wrapper %(arch)s %(mt)s -nologo " - "-manifest %(out)s.manifest %(intermediate_manifest)s " - "-out:%(out)s.assert.manifest" % variables - ) - assert_manifest = "%(out)s.assert.manifest" % variables - our_manifest = "%(out)s.manifest" % variables - # Load and normalize the manifests. mt.exe sometimes removes whitespace, - # and sometimes doesn't unfortunately. - with open(our_manifest) as our_f: - with open(assert_manifest) as assert_f: - translator = str.maketrans('', '', string.whitespace) - our_data = our_f.read().translate(translator) - assert_data = assert_f.read().translate(translator) - if our_data != assert_data: - os.unlink(out) - - def dump(filename): - print(filename, file=sys.stderr) - print("-----", file=sys.stderr) - with open(filename) as f: - print(f.read(), file=sys.stderr) - print("-----", file=sys.stderr) - - dump(intermediate_manifest) - dump(our_manifest) - dump(assert_manifest) - sys.stderr.write( - 'Linker generated manifest "%s" added to final manifest "%s" ' - '(result in "%s"). ' - "Were /MANIFEST switches used in #pragma statements? " - % (intermediate_manifest, our_manifest, assert_manifest) - ) - return 1 - - def ExecManifestWrapper(self, arch, *args): - """Run manifest tool with environment set. Strip out undesirable warning - (some XML blocks are recognized by the OS loader, but not the manifest - tool).""" - env = self._GetEnv(arch) - popen = subprocess.Popen( - args, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - out = popen.communicate()[0].decode("utf-8") - for line in out.splitlines(): - if line and "manifest authoring warning 81010002" not in line: - print(line) - return popen.returncode - - def ExecManifestToRc(self, arch, *args): - """Creates a resource file pointing a SxS assembly manifest. - |args| is tuple containing path to resource file, path to manifest file - and resource name which can be "1" (for executables) or "2" (for DLLs).""" - manifest_path, resource_path, resource_name = args - with open(resource_path, "w") as output: - output.write( - '#include \n%s RT_MANIFEST "%s"' - % (resource_name, os.path.abspath(manifest_path).replace("\\", "/")) - ) - - def ExecMidlWrapper(self, arch, outdir, tlb, h, dlldata, iid, proxy, idl, *flags): - """Filter noisy filenames output from MIDL compile step that isn't - quietable via command line flags. - """ - args = ( - ["midl", "/nologo"] - + list(flags) - + [ - "/out", - outdir, - "/tlb", - tlb, - "/h", - h, - "/dlldata", - dlldata, - "/iid", - iid, - "/proxy", - proxy, - idl, - ] - ) - env = self._GetEnv(arch) - popen = subprocess.Popen( - args, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - out = popen.communicate()[0].decode("utf-8") - # Filter junk out of stdout, and write filtered versions. Output we want - # to filter is pairs of lines that look like this: - # Processing C:\Program Files (x86)\Microsoft SDKs\...\include\objidl.idl - # objidl.idl - lines = out.splitlines() - prefixes = ("Processing ", "64 bit Processing ") - processing = {os.path.basename(x) for x in lines if x.startswith(prefixes)} - for line in lines: - if not line.startswith(prefixes) and line not in processing: - print(line) - return popen.returncode - - def ExecAsmWrapper(self, arch, *args): - """Filter logo banner from invocations of asm.exe.""" - env = self._GetEnv(arch) - popen = subprocess.Popen( - args, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - out = popen.communicate()[0].decode("utf-8") - for line in out.splitlines(): - if ( - not line.startswith("Copyright (C) Microsoft Corporation") - and not line.startswith("Microsoft (R) Macro Assembler") - and not line.startswith(" Assembling: ") - and line - ): - print(line) - return popen.returncode - - def ExecRcWrapper(self, arch, *args): - """Filter logo banner from invocations of rc.exe. Older versions of RC - don't support the /nologo flag.""" - env = self._GetEnv(arch) - popen = subprocess.Popen( - args, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - out = popen.communicate()[0].decode("utf-8") - for line in out.splitlines(): - if ( - not line.startswith("Microsoft (R) Windows (R) Resource Compiler") - and not line.startswith("Copyright (C) Microsoft Corporation") - and line - ): - print(line) - return popen.returncode - - def ExecActionWrapper(self, arch, rspfile, *dir): - """Runs an action command line from a response file using the environment - for |arch|. If |dir| is supplied, use that as the working directory.""" - env = self._GetEnv(arch) - # TODO(scottmg): This is a temporary hack to get some specific variables - # through to actions that are set after gyp-time. http://crbug.com/333738. - for k, v in os.environ.items(): - if k not in env: - env[k] = v - args = open(rspfile).read() - dir = dir[0] if dir else None - return subprocess.call(args, shell=True, env=env, cwd=dir) - - def ExecClCompile(self, project_dir, selected_files): - """Executed by msvs-ninja projects when the 'ClCompile' target is used to - build selected C/C++ files.""" - project_dir = os.path.relpath(project_dir, BASE_DIR) - selected_files = selected_files.split(";") - ninja_targets = [ - os.path.join(project_dir, filename) + "^^" for filename in selected_files - ] - cmd = ["ninja.exe"] - cmd.extend(ninja_targets) - return subprocess.call(cmd, shell=True, cwd=BASE_DIR) - - -if __name__ == "__main__": - sys.exit(main(sys.argv[1:])) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py deleted file mode 100644 index a75d8ee..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +++ /dev/null @@ -1,1939 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -This module contains classes that help to emulate xcodebuild behavior on top of -other build systems, such as make and ninja. -""" - - -import copy -import gyp.common -import os -import os.path -import re -import shlex -import subprocess -import sys -from gyp.common import GypError - -# Populated lazily by XcodeVersion, for efficiency, and to fix an issue when -# "xcodebuild" is called too quickly (it has been found to return incorrect -# version number). -XCODE_VERSION_CACHE = None - -# Populated lazily by GetXcodeArchsDefault, to an |XcodeArchsDefault| instance -# corresponding to the installed version of Xcode. -XCODE_ARCHS_DEFAULT_CACHE = None - - -def XcodeArchsVariableMapping(archs, archs_including_64_bit=None): - """Constructs a dictionary with expansion for $(ARCHS_STANDARD) variable, - and optionally for $(ARCHS_STANDARD_INCLUDING_64_BIT).""" - mapping = {"$(ARCHS_STANDARD)": archs} - if archs_including_64_bit: - mapping["$(ARCHS_STANDARD_INCLUDING_64_BIT)"] = archs_including_64_bit - return mapping - - -class XcodeArchsDefault: - """A class to resolve ARCHS variable from xcode_settings, resolving Xcode - macros and implementing filtering by VALID_ARCHS. The expansion of macros - depends on the SDKROOT used ("macosx", "iphoneos", "iphonesimulator") and - on the version of Xcode. - """ - - # Match variable like $(ARCHS_STANDARD). - variable_pattern = re.compile(r"\$\([a-zA-Z_][a-zA-Z0-9_]*\)$") - - def __init__(self, default, mac, iphonesimulator, iphoneos): - self._default = (default,) - self._archs = {"mac": mac, "ios": iphoneos, "iossim": iphonesimulator} - - def _VariableMapping(self, sdkroot): - """Returns the dictionary of variable mapping depending on the SDKROOT.""" - sdkroot = sdkroot.lower() - if "iphoneos" in sdkroot: - return self._archs["ios"] - elif "iphonesimulator" in sdkroot: - return self._archs["iossim"] - else: - return self._archs["mac"] - - def _ExpandArchs(self, archs, sdkroot): - """Expands variables references in ARCHS, and remove duplicates.""" - variable_mapping = self._VariableMapping(sdkroot) - expanded_archs = [] - for arch in archs: - if self.variable_pattern.match(arch): - variable = arch - try: - variable_expansion = variable_mapping[variable] - for arch in variable_expansion: - if arch not in expanded_archs: - expanded_archs.append(arch) - except KeyError: - print('Warning: Ignoring unsupported variable "%s".' % variable) - elif arch not in expanded_archs: - expanded_archs.append(arch) - return expanded_archs - - def ActiveArchs(self, archs, valid_archs, sdkroot): - """Expands variables references in ARCHS, and filter by VALID_ARCHS if it - is defined (if not set, Xcode accept any value in ARCHS, otherwise, only - values present in VALID_ARCHS are kept).""" - expanded_archs = self._ExpandArchs(archs or self._default, sdkroot or "") - if valid_archs: - filtered_archs = [] - for arch in expanded_archs: - if arch in valid_archs: - filtered_archs.append(arch) - expanded_archs = filtered_archs - return expanded_archs - - -def GetXcodeArchsDefault(): - """Returns the |XcodeArchsDefault| object to use to expand ARCHS for the - installed version of Xcode. The default values used by Xcode for ARCHS - and the expansion of the variables depends on the version of Xcode used. - - For all version anterior to Xcode 5.0 or posterior to Xcode 5.1 included - uses $(ARCHS_STANDARD) if ARCHS is unset, while Xcode 5.0 to 5.0.2 uses - $(ARCHS_STANDARD_INCLUDING_64_BIT). This variable was added to Xcode 5.0 - and deprecated with Xcode 5.1. - - For "macosx" SDKROOT, all version starting with Xcode 5.0 includes 64-bit - architecture as part of $(ARCHS_STANDARD) and default to only building it. - - For "iphoneos" and "iphonesimulator" SDKROOT, 64-bit architectures are part - of $(ARCHS_STANDARD_INCLUDING_64_BIT) from Xcode 5.0. From Xcode 5.1, they - are also part of $(ARCHS_STANDARD). - - All these rules are coded in the construction of the |XcodeArchsDefault| - object to use depending on the version of Xcode detected. The object is - for performance reason.""" - global XCODE_ARCHS_DEFAULT_CACHE - if XCODE_ARCHS_DEFAULT_CACHE: - return XCODE_ARCHS_DEFAULT_CACHE - xcode_version, _ = XcodeVersion() - if xcode_version < "0500": - XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault( - "$(ARCHS_STANDARD)", - XcodeArchsVariableMapping(["i386"]), - XcodeArchsVariableMapping(["i386"]), - XcodeArchsVariableMapping(["armv7"]), - ) - elif xcode_version < "0510": - XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault( - "$(ARCHS_STANDARD_INCLUDING_64_BIT)", - XcodeArchsVariableMapping(["x86_64"], ["x86_64"]), - XcodeArchsVariableMapping(["i386"], ["i386", "x86_64"]), - XcodeArchsVariableMapping( - ["armv7", "armv7s"], ["armv7", "armv7s", "arm64"] - ), - ) - else: - XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault( - "$(ARCHS_STANDARD)", - XcodeArchsVariableMapping(["x86_64"], ["x86_64"]), - XcodeArchsVariableMapping(["i386", "x86_64"], ["i386", "x86_64"]), - XcodeArchsVariableMapping( - ["armv7", "armv7s", "arm64"], ["armv7", "armv7s", "arm64"] - ), - ) - return XCODE_ARCHS_DEFAULT_CACHE - - -class XcodeSettings: - """A class that understands the gyp 'xcode_settings' object.""" - - # Populated lazily by _SdkPath(). Shared by all XcodeSettings, so cached - # at class-level for efficiency. - _sdk_path_cache = {} - _platform_path_cache = {} - _sdk_root_cache = {} - - # Populated lazily by GetExtraPlistItems(). Shared by all XcodeSettings, so - # cached at class-level for efficiency. - _plist_cache = {} - - # Populated lazily by GetIOSPostbuilds. Shared by all XcodeSettings, so - # cached at class-level for efficiency. - _codesigning_key_cache = {} - - def __init__(self, spec): - self.spec = spec - - self.isIOS = False - self.mac_toolchain_dir = None - self.header_map_path = None - - # Per-target 'xcode_settings' are pushed down into configs earlier by gyp. - # This means self.xcode_settings[config] always contains all settings - # for that config -- the per-target settings as well. Settings that are - # the same for all configs are implicitly per-target settings. - self.xcode_settings = {} - configs = spec["configurations"] - for configname, config in configs.items(): - self.xcode_settings[configname] = config.get("xcode_settings", {}) - self._ConvertConditionalKeys(configname) - if self.xcode_settings[configname].get("IPHONEOS_DEPLOYMENT_TARGET", None): - self.isIOS = True - - # This is only non-None temporarily during the execution of some methods. - self.configname = None - - # Used by _AdjustLibrary to match .a and .dylib entries in libraries. - self.library_re = re.compile(r"^lib([^/]+)\.(a|dylib)$") - - def _ConvertConditionalKeys(self, configname): - """Converts or warns on conditional keys. Xcode supports conditional keys, - such as CODE_SIGN_IDENTITY[sdk=iphoneos*]. This is a partial implementation - with some keys converted while the rest force a warning.""" - settings = self.xcode_settings[configname] - conditional_keys = [key for key in settings if key.endswith("]")] - for key in conditional_keys: - # If you need more, speak up at http://crbug.com/122592 - if key.endswith("[sdk=iphoneos*]"): - if configname.endswith("iphoneos"): - new_key = key.split("[")[0] - settings[new_key] = settings[key] - else: - print( - "Warning: Conditional keys not implemented, ignoring:", - " ".join(conditional_keys), - ) - del settings[key] - - def _Settings(self): - assert self.configname - return self.xcode_settings[self.configname] - - def _Test(self, test_key, cond_key, default): - return self._Settings().get(test_key, default) == cond_key - - def _Appendf(self, lst, test_key, format_str, default=None): - if test_key in self._Settings(): - lst.append(format_str % str(self._Settings()[test_key])) - elif default: - lst.append(format_str % str(default)) - - def _WarnUnimplemented(self, test_key): - if test_key in self._Settings(): - print('Warning: Ignoring not yet implemented key "%s".' % test_key) - - def IsBinaryOutputFormat(self, configname): - default = "binary" if self.isIOS else "xml" - format = self.xcode_settings[configname].get("INFOPLIST_OUTPUT_FORMAT", default) - return format == "binary" - - def IsIosFramework(self): - return self.spec["type"] == "shared_library" and self._IsBundle() and self.isIOS - - def _IsBundle(self): - return ( - int(self.spec.get("mac_bundle", 0)) != 0 - or self._IsXCTest() - or self._IsXCUiTest() - ) - - def _IsXCTest(self): - return int(self.spec.get("mac_xctest_bundle", 0)) != 0 - - def _IsXCUiTest(self): - return int(self.spec.get("mac_xcuitest_bundle", 0)) != 0 - - def _IsIosAppExtension(self): - return int(self.spec.get("ios_app_extension", 0)) != 0 - - def _IsIosWatchKitExtension(self): - return int(self.spec.get("ios_watchkit_extension", 0)) != 0 - - def _IsIosWatchApp(self): - return int(self.spec.get("ios_watch_app", 0)) != 0 - - def GetFrameworkVersion(self): - """Returns the framework version of the current target. Only valid for - bundles.""" - assert self._IsBundle() - return self.GetPerTargetSetting("FRAMEWORK_VERSION", default="A") - - def GetWrapperExtension(self): - """Returns the bundle extension (.app, .framework, .plugin, etc). Only - valid for bundles.""" - assert self._IsBundle() - if self.spec["type"] in ("loadable_module", "shared_library"): - default_wrapper_extension = { - "loadable_module": "bundle", - "shared_library": "framework", - }[self.spec["type"]] - wrapper_extension = self.GetPerTargetSetting( - "WRAPPER_EXTENSION", default=default_wrapper_extension - ) - return "." + self.spec.get("product_extension", wrapper_extension) - elif self.spec["type"] == "executable": - if self._IsIosAppExtension() or self._IsIosWatchKitExtension(): - return "." + self.spec.get("product_extension", "appex") - else: - return "." + self.spec.get("product_extension", "app") - else: - assert False, "Don't know extension for '{}', target '{}'".format( - self.spec["type"], - self.spec["target_name"], - ) - - def GetProductName(self): - """Returns PRODUCT_NAME.""" - return self.spec.get("product_name", self.spec["target_name"]) - - def GetFullProductName(self): - """Returns FULL_PRODUCT_NAME.""" - if self._IsBundle(): - return self.GetWrapperName() - else: - return self._GetStandaloneBinaryPath() - - def GetWrapperName(self): - """Returns the directory name of the bundle represented by this target. - Only valid for bundles.""" - assert self._IsBundle() - return self.GetProductName() + self.GetWrapperExtension() - - def GetBundleContentsFolderPath(self): - """Returns the qualified path to the bundle's contents folder. E.g. - Chromium.app/Contents or Foo.bundle/Versions/A. Only valid for bundles.""" - if self.isIOS: - return self.GetWrapperName() - assert self._IsBundle() - if self.spec["type"] == "shared_library": - return os.path.join( - self.GetWrapperName(), "Versions", self.GetFrameworkVersion() - ) - else: - # loadable_modules have a 'Contents' folder like executables. - return os.path.join(self.GetWrapperName(), "Contents") - - def GetBundleResourceFolder(self): - """Returns the qualified path to the bundle's resource folder. E.g. - Chromium.app/Contents/Resources. Only valid for bundles.""" - assert self._IsBundle() - if self.isIOS: - return self.GetBundleContentsFolderPath() - return os.path.join(self.GetBundleContentsFolderPath(), "Resources") - - def GetBundleExecutableFolderPath(self): - """Returns the qualified path to the bundle's executables folder. E.g. - Chromium.app/Contents/MacOS. Only valid for bundles.""" - assert self._IsBundle() - if self.spec["type"] in ("shared_library") or self.isIOS: - return self.GetBundleContentsFolderPath() - elif self.spec["type"] in ("executable", "loadable_module"): - return os.path.join(self.GetBundleContentsFolderPath(), "MacOS") - - def GetBundleJavaFolderPath(self): - """Returns the qualified path to the bundle's Java resource folder. - E.g. Chromium.app/Contents/Resources/Java. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join(self.GetBundleResourceFolder(), "Java") - - def GetBundleFrameworksFolderPath(self): - """Returns the qualified path to the bundle's frameworks folder. E.g, - Chromium.app/Contents/Frameworks. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join(self.GetBundleContentsFolderPath(), "Frameworks") - - def GetBundleSharedFrameworksFolderPath(self): - """Returns the qualified path to the bundle's frameworks folder. E.g, - Chromium.app/Contents/SharedFrameworks. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join(self.GetBundleContentsFolderPath(), "SharedFrameworks") - - def GetBundleSharedSupportFolderPath(self): - """Returns the qualified path to the bundle's shared support folder. E.g, - Chromium.app/Contents/SharedSupport. Only valid for bundles.""" - assert self._IsBundle() - if self.spec["type"] == "shared_library": - return self.GetBundleResourceFolder() - else: - return os.path.join(self.GetBundleContentsFolderPath(), "SharedSupport") - - def GetBundlePlugInsFolderPath(self): - """Returns the qualified path to the bundle's plugins folder. E.g, - Chromium.app/Contents/PlugIns. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join(self.GetBundleContentsFolderPath(), "PlugIns") - - def GetBundleXPCServicesFolderPath(self): - """Returns the qualified path to the bundle's XPC services folder. E.g, - Chromium.app/Contents/XPCServices. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join(self.GetBundleContentsFolderPath(), "XPCServices") - - def GetBundlePlistPath(self): - """Returns the qualified path to the bundle's plist file. E.g. - Chromium.app/Contents/Info.plist. Only valid for bundles.""" - assert self._IsBundle() - if ( - self.spec["type"] in ("executable", "loadable_module") - or self.IsIosFramework() - ): - return os.path.join(self.GetBundleContentsFolderPath(), "Info.plist") - else: - return os.path.join( - self.GetBundleContentsFolderPath(), "Resources", "Info.plist" - ) - - def GetProductType(self): - """Returns the PRODUCT_TYPE of this target.""" - if self._IsIosAppExtension(): - assert self._IsBundle(), ( - "ios_app_extension flag requires mac_bundle " - "(target %s)" % self.spec["target_name"] - ) - return "com.apple.product-type.app-extension" - if self._IsIosWatchKitExtension(): - assert self._IsBundle(), ( - "ios_watchkit_extension flag requires " - "mac_bundle (target %s)" % self.spec["target_name"] - ) - return "com.apple.product-type.watchkit-extension" - if self._IsIosWatchApp(): - assert self._IsBundle(), ( - "ios_watch_app flag requires mac_bundle " - "(target %s)" % self.spec["target_name"] - ) - return "com.apple.product-type.application.watchapp" - if self._IsXCUiTest(): - assert self._IsBundle(), ( - "mac_xcuitest_bundle flag requires mac_bundle " - "(target %s)" % self.spec["target_name"] - ) - return "com.apple.product-type.bundle.ui-testing" - if self._IsBundle(): - return { - "executable": "com.apple.product-type.application", - "loadable_module": "com.apple.product-type.bundle", - "shared_library": "com.apple.product-type.framework", - }[self.spec["type"]] - else: - return { - "executable": "com.apple.product-type.tool", - "loadable_module": "com.apple.product-type.library.dynamic", - "shared_library": "com.apple.product-type.library.dynamic", - "static_library": "com.apple.product-type.library.static", - }[self.spec["type"]] - - def GetMachOType(self): - """Returns the MACH_O_TYPE of this target.""" - # Weird, but matches Xcode. - if not self._IsBundle() and self.spec["type"] == "executable": - return "" - return { - "executable": "mh_execute", - "static_library": "staticlib", - "shared_library": "mh_dylib", - "loadable_module": "mh_bundle", - }[self.spec["type"]] - - def _GetBundleBinaryPath(self): - """Returns the name of the bundle binary of by this target. - E.g. Chromium.app/Contents/MacOS/Chromium. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join( - self.GetBundleExecutableFolderPath(), self.GetExecutableName() - ) - - def _GetStandaloneExecutableSuffix(self): - if "product_extension" in self.spec: - return "." + self.spec["product_extension"] - return { - "executable": "", - "static_library": ".a", - "shared_library": ".dylib", - "loadable_module": ".so", - }[self.spec["type"]] - - def _GetStandaloneExecutablePrefix(self): - return self.spec.get( - "product_prefix", - { - "executable": "", - "static_library": "lib", - "shared_library": "lib", - # Non-bundled loadable_modules are called foo.so for some reason - # (that is, .so and no prefix) with the xcode build -- match that. - "loadable_module": "", - }[self.spec["type"]], - ) - - def _GetStandaloneBinaryPath(self): - """Returns the name of the non-bundle binary represented by this target. - E.g. hello_world. Only valid for non-bundles.""" - assert not self._IsBundle() - assert self.spec["type"] in ( - "executable", - "shared_library", - "static_library", - "loadable_module", - ), ("Unexpected type %s" % self.spec["type"]) - target = self.spec["target_name"] - if self.spec["type"] == "static_library": - if target[:3] == "lib": - target = target[3:] - elif self.spec["type"] in ("loadable_module", "shared_library"): - if target[:3] == "lib": - target = target[3:] - - target_prefix = self._GetStandaloneExecutablePrefix() - target = self.spec.get("product_name", target) - target_ext = self._GetStandaloneExecutableSuffix() - return target_prefix + target + target_ext - - def GetExecutableName(self): - """Returns the executable name of the bundle represented by this target. - E.g. Chromium.""" - if self._IsBundle(): - return self.spec.get("product_name", self.spec["target_name"]) - else: - return self._GetStandaloneBinaryPath() - - def GetExecutablePath(self): - """Returns the qualified path to the primary executable of the bundle - represented by this target. E.g. Chromium.app/Contents/MacOS/Chromium.""" - if self._IsBundle(): - return self._GetBundleBinaryPath() - else: - return self._GetStandaloneBinaryPath() - - def GetActiveArchs(self, configname): - """Returns the architectures this target should be built for.""" - config_settings = self.xcode_settings[configname] - xcode_archs_default = GetXcodeArchsDefault() - return xcode_archs_default.ActiveArchs( - config_settings.get("ARCHS"), - config_settings.get("VALID_ARCHS"), - config_settings.get("SDKROOT"), - ) - - def _GetSdkVersionInfoItem(self, sdk, infoitem): - # xcodebuild requires Xcode and can't run on Command Line Tools-only - # systems from 10.7 onward. - # Since the CLT has no SDK paths anyway, returning None is the - # most sensible route and should still do the right thing. - try: - return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem]) - except GypError: - pass - - def _SdkRoot(self, configname): - if configname is None: - configname = self.configname - return self.GetPerConfigSetting("SDKROOT", configname, default="") - - def _XcodePlatformPath(self, configname=None): - sdk_root = self._SdkRoot(configname) - if sdk_root not in XcodeSettings._platform_path_cache: - platform_path = self._GetSdkVersionInfoItem( - sdk_root, "--show-sdk-platform-path" - ) - XcodeSettings._platform_path_cache[sdk_root] = platform_path - return XcodeSettings._platform_path_cache[sdk_root] - - def _SdkPath(self, configname=None): - sdk_root = self._SdkRoot(configname) - if sdk_root.startswith("/"): - return sdk_root - return self._XcodeSdkPath(sdk_root) - - def _XcodeSdkPath(self, sdk_root): - if sdk_root not in XcodeSettings._sdk_path_cache: - sdk_path = self._GetSdkVersionInfoItem(sdk_root, "--show-sdk-path") - XcodeSettings._sdk_path_cache[sdk_root] = sdk_path - if sdk_root: - XcodeSettings._sdk_root_cache[sdk_path] = sdk_root - return XcodeSettings._sdk_path_cache[sdk_root] - - def _AppendPlatformVersionMinFlags(self, lst): - self._Appendf(lst, "MACOSX_DEPLOYMENT_TARGET", "-mmacosx-version-min=%s") - if "IPHONEOS_DEPLOYMENT_TARGET" in self._Settings(): - # TODO: Implement this better? - sdk_path_basename = os.path.basename(self._SdkPath()) - if sdk_path_basename.lower().startswith("iphonesimulator"): - self._Appendf( - lst, "IPHONEOS_DEPLOYMENT_TARGET", "-mios-simulator-version-min=%s" - ) - else: - self._Appendf( - lst, "IPHONEOS_DEPLOYMENT_TARGET", "-miphoneos-version-min=%s" - ) - - def GetCflags(self, configname, arch=None): - """Returns flags that need to be added to .c, .cc, .m, and .mm - compilations.""" - # This functions (and the similar ones below) do not offer complete - # emulation of all xcode_settings keys. They're implemented on demand. - - self.configname = configname - cflags = [] - - sdk_root = self._SdkPath() - if "SDKROOT" in self._Settings() and sdk_root: - cflags.append("-isysroot %s" % sdk_root) - - if self.header_map_path: - cflags.append("-I%s" % self.header_map_path) - - if self._Test("CLANG_WARN_CONSTANT_CONVERSION", "YES", default="NO"): - cflags.append("-Wconstant-conversion") - - if self._Test("GCC_CHAR_IS_UNSIGNED_CHAR", "YES", default="NO"): - cflags.append("-funsigned-char") - - if self._Test("GCC_CW_ASM_SYNTAX", "YES", default="YES"): - cflags.append("-fasm-blocks") - - if "GCC_DYNAMIC_NO_PIC" in self._Settings(): - if self._Settings()["GCC_DYNAMIC_NO_PIC"] == "YES": - cflags.append("-mdynamic-no-pic") - else: - pass - # TODO: In this case, it depends on the target. xcode passes - # mdynamic-no-pic by default for executable and possibly static lib - # according to mento - - if self._Test("GCC_ENABLE_PASCAL_STRINGS", "YES", default="YES"): - cflags.append("-mpascal-strings") - - self._Appendf(cflags, "GCC_OPTIMIZATION_LEVEL", "-O%s", default="s") - - if self._Test("GCC_GENERATE_DEBUGGING_SYMBOLS", "YES", default="YES"): - dbg_format = self._Settings().get("DEBUG_INFORMATION_FORMAT", "dwarf") - if dbg_format == "dwarf": - cflags.append("-gdwarf-2") - elif dbg_format == "stabs": - raise NotImplementedError("stabs debug format is not supported yet.") - elif dbg_format == "dwarf-with-dsym": - cflags.append("-gdwarf-2") - else: - raise NotImplementedError("Unknown debug format %s" % dbg_format) - - if self._Settings().get("GCC_STRICT_ALIASING") == "YES": - cflags.append("-fstrict-aliasing") - elif self._Settings().get("GCC_STRICT_ALIASING") == "NO": - cflags.append("-fno-strict-aliasing") - - if self._Test("GCC_SYMBOLS_PRIVATE_EXTERN", "YES", default="NO"): - cflags.append("-fvisibility=hidden") - - if self._Test("GCC_TREAT_WARNINGS_AS_ERRORS", "YES", default="NO"): - cflags.append("-Werror") - - if self._Test("GCC_WARN_ABOUT_MISSING_NEWLINE", "YES", default="NO"): - cflags.append("-Wnewline-eof") - - # In Xcode, this is only activated when GCC_COMPILER_VERSION is clang or - # llvm-gcc. It also requires a fairly recent libtool, and - # if the system clang isn't used, DYLD_LIBRARY_PATH needs to contain the - # path to the libLTO.dylib that matches the used clang. - if self._Test("LLVM_LTO", "YES", default="NO"): - cflags.append("-flto") - - self._AppendPlatformVersionMinFlags(cflags) - - # TODO: - if self._Test("COPY_PHASE_STRIP", "YES", default="NO"): - self._WarnUnimplemented("COPY_PHASE_STRIP") - self._WarnUnimplemented("GCC_DEBUGGING_SYMBOLS") - self._WarnUnimplemented("GCC_ENABLE_OBJC_EXCEPTIONS") - - # TODO: This is exported correctly, but assigning to it is not supported. - self._WarnUnimplemented("MACH_O_TYPE") - self._WarnUnimplemented("PRODUCT_TYPE") - - # If GYP_CROSSCOMPILE (--cross-compiling), disable architecture-specific - # additions and assume these will be provided as required via CC_host, - # CXX_host, CC_target and CXX_target. - if not gyp.common.CrossCompileRequested(): - if arch is not None: - archs = [arch] - else: - assert self.configname - archs = self.GetActiveArchs(self.configname) - if len(archs) != 1: - # TODO: Supporting fat binaries will be annoying. - self._WarnUnimplemented("ARCHS") - archs = ["i386"] - cflags.append("-arch " + archs[0]) - - if archs[0] in ("i386", "x86_64"): - if self._Test("GCC_ENABLE_SSE3_EXTENSIONS", "YES", default="NO"): - cflags.append("-msse3") - if self._Test( - "GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS", "YES", default="NO" - ): - cflags.append("-mssse3") # Note 3rd 's'. - if self._Test("GCC_ENABLE_SSE41_EXTENSIONS", "YES", default="NO"): - cflags.append("-msse4.1") - if self._Test("GCC_ENABLE_SSE42_EXTENSIONS", "YES", default="NO"): - cflags.append("-msse4.2") - - cflags += self._Settings().get("WARNING_CFLAGS", []) - - if self._IsXCTest(): - platform_root = self._XcodePlatformPath(configname) - if platform_root: - cflags.append("-F" + platform_root + "/Developer/Library/Frameworks/") - - if sdk_root: - framework_root = sdk_root - else: - framework_root = "" - config = self.spec["configurations"][self.configname] - framework_dirs = config.get("mac_framework_dirs", []) - for directory in framework_dirs: - cflags.append("-F" + directory.replace("$(SDKROOT)", framework_root)) - - self.configname = None - return cflags - - def GetCflagsC(self, configname): - """Returns flags that need to be added to .c, and .m compilations.""" - self.configname = configname - cflags_c = [] - if self._Settings().get("GCC_C_LANGUAGE_STANDARD", "") == "ansi": - cflags_c.append("-ansi") - else: - self._Appendf(cflags_c, "GCC_C_LANGUAGE_STANDARD", "-std=%s") - cflags_c += self._Settings().get("OTHER_CFLAGS", []) - self.configname = None - return cflags_c - - def GetCflagsCC(self, configname): - """Returns flags that need to be added to .cc, and .mm compilations.""" - self.configname = configname - cflags_cc = [] - - clang_cxx_language_standard = self._Settings().get( - "CLANG_CXX_LANGUAGE_STANDARD" - ) - # Note: Don't make c++0x to c++11 so that c++0x can be used with older - # clangs that don't understand c++11 yet (like Xcode 4.2's). - if clang_cxx_language_standard: - cflags_cc.append("-std=%s" % clang_cxx_language_standard) - - self._Appendf(cflags_cc, "CLANG_CXX_LIBRARY", "-stdlib=%s") - - if self._Test("GCC_ENABLE_CPP_RTTI", "NO", default="YES"): - cflags_cc.append("-fno-rtti") - if self._Test("GCC_ENABLE_CPP_EXCEPTIONS", "NO", default="YES"): - cflags_cc.append("-fno-exceptions") - if self._Test("GCC_INLINES_ARE_PRIVATE_EXTERN", "YES", default="NO"): - cflags_cc.append("-fvisibility-inlines-hidden") - if self._Test("GCC_THREADSAFE_STATICS", "NO", default="YES"): - cflags_cc.append("-fno-threadsafe-statics") - # Note: This flag is a no-op for clang, it only has an effect for gcc. - if self._Test("GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO", "NO", default="YES"): - cflags_cc.append("-Wno-invalid-offsetof") - - other_ccflags = [] - - for flag in self._Settings().get("OTHER_CPLUSPLUSFLAGS", ["$(inherited)"]): - # TODO: More general variable expansion. Missing in many other places too. - if flag in ("$inherited", "$(inherited)", "${inherited}"): - flag = "$OTHER_CFLAGS" - if flag in ("$OTHER_CFLAGS", "$(OTHER_CFLAGS)", "${OTHER_CFLAGS}"): - other_ccflags += self._Settings().get("OTHER_CFLAGS", []) - else: - other_ccflags.append(flag) - cflags_cc += other_ccflags - - self.configname = None - return cflags_cc - - def _AddObjectiveCGarbageCollectionFlags(self, flags): - gc_policy = self._Settings().get("GCC_ENABLE_OBJC_GC", "unsupported") - if gc_policy == "supported": - flags.append("-fobjc-gc") - elif gc_policy == "required": - flags.append("-fobjc-gc-only") - - def _AddObjectiveCARCFlags(self, flags): - if self._Test("CLANG_ENABLE_OBJC_ARC", "YES", default="NO"): - flags.append("-fobjc-arc") - - def _AddObjectiveCMissingPropertySynthesisFlags(self, flags): - if self._Test( - "CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS", "YES", default="NO" - ): - flags.append("-Wobjc-missing-property-synthesis") - - def GetCflagsObjC(self, configname): - """Returns flags that need to be added to .m compilations.""" - self.configname = configname - cflags_objc = [] - self._AddObjectiveCGarbageCollectionFlags(cflags_objc) - self._AddObjectiveCARCFlags(cflags_objc) - self._AddObjectiveCMissingPropertySynthesisFlags(cflags_objc) - self.configname = None - return cflags_objc - - def GetCflagsObjCC(self, configname): - """Returns flags that need to be added to .mm compilations.""" - self.configname = configname - cflags_objcc = [] - self._AddObjectiveCGarbageCollectionFlags(cflags_objcc) - self._AddObjectiveCARCFlags(cflags_objcc) - self._AddObjectiveCMissingPropertySynthesisFlags(cflags_objcc) - if self._Test("GCC_OBJC_CALL_CXX_CDTORS", "YES", default="NO"): - cflags_objcc.append("-fobjc-call-cxx-cdtors") - self.configname = None - return cflags_objcc - - def GetInstallNameBase(self): - """Return DYLIB_INSTALL_NAME_BASE for this target.""" - # Xcode sets this for shared_libraries, and for nonbundled loadable_modules. - if self.spec["type"] != "shared_library" and ( - self.spec["type"] != "loadable_module" or self._IsBundle() - ): - return None - install_base = self.GetPerTargetSetting( - "DYLIB_INSTALL_NAME_BASE", - default="/Library/Frameworks" if self._IsBundle() else "/usr/local/lib", - ) - return install_base - - def _StandardizePath(self, path): - """Do :standardizepath processing for path.""" - # I'm not quite sure what :standardizepath does. Just call normpath(), - # but don't let @executable_path/../foo collapse to foo. - if "/" in path: - prefix, rest = "", path - if path.startswith("@"): - prefix, rest = path.split("/", 1) - rest = os.path.normpath(rest) # :standardizepath - path = os.path.join(prefix, rest) - return path - - def GetInstallName(self): - """Return LD_DYLIB_INSTALL_NAME for this target.""" - # Xcode sets this for shared_libraries, and for nonbundled loadable_modules. - if self.spec["type"] != "shared_library" and ( - self.spec["type"] != "loadable_module" or self._IsBundle() - ): - return None - - default_install_name = ( - "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)" - ) - install_name = self.GetPerTargetSetting( - "LD_DYLIB_INSTALL_NAME", default=default_install_name - ) - - # Hardcode support for the variables used in chromium for now, to - # unblock people using the make build. - if "$" in install_name: - assert install_name in ( - "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/" - "$(WRAPPER_NAME)/$(PRODUCT_NAME)", - default_install_name, - ), ( - "Variables in LD_DYLIB_INSTALL_NAME are not generally supported " - "yet in target '%s' (got '%s')" - % (self.spec["target_name"], install_name) - ) - - install_name = install_name.replace( - "$(DYLIB_INSTALL_NAME_BASE:standardizepath)", - self._StandardizePath(self.GetInstallNameBase()), - ) - if self._IsBundle(): - # These are only valid for bundles, hence the |if|. - install_name = install_name.replace( - "$(WRAPPER_NAME)", self.GetWrapperName() - ) - install_name = install_name.replace( - "$(PRODUCT_NAME)", self.GetProductName() - ) - else: - assert "$(WRAPPER_NAME)" not in install_name - assert "$(PRODUCT_NAME)" not in install_name - - install_name = install_name.replace( - "$(EXECUTABLE_PATH)", self.GetExecutablePath() - ) - return install_name - - def _MapLinkerFlagFilename(self, ldflag, gyp_to_build_path): - """Checks if ldflag contains a filename and if so remaps it from - gyp-directory-relative to build-directory-relative.""" - # This list is expanded on demand. - # They get matched as: - # -exported_symbols_list file - # -Wl,exported_symbols_list file - # -Wl,exported_symbols_list,file - LINKER_FILE = r"(\S+)" - WORD = r"\S+" - linker_flags = [ - ["-exported_symbols_list", LINKER_FILE], # Needed for NaCl. - ["-unexported_symbols_list", LINKER_FILE], - ["-reexported_symbols_list", LINKER_FILE], - ["-sectcreate", WORD, WORD, LINKER_FILE], # Needed for remoting. - ] - for flag_pattern in linker_flags: - regex = re.compile("(?:-Wl,)?" + "[ ,]".join(flag_pattern)) - m = regex.match(ldflag) - if m: - ldflag = ( - ldflag[: m.start(1)] - + gyp_to_build_path(m.group(1)) - + ldflag[m.end(1) :] - ) - # Required for ffmpeg (no idea why they don't use LIBRARY_SEARCH_PATHS, - # TODO(thakis): Update ffmpeg.gyp): - if ldflag.startswith("-L"): - ldflag = "-L" + gyp_to_build_path(ldflag[len("-L") :]) - return ldflag - - def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None): - """Returns flags that need to be passed to the linker. - - Args: - configname: The name of the configuration to get ld flags for. - product_dir: The directory where products such static and dynamic - libraries are placed. This is added to the library search path. - gyp_to_build_path: A function that converts paths relative to the - current gyp file to paths relative to the build directory. - """ - self.configname = configname - ldflags = [] - - # The xcode build is relative to a gyp file's directory, and OTHER_LDFLAGS - # can contain entries that depend on this. Explicitly absolutify these. - for ldflag in self._Settings().get("OTHER_LDFLAGS", []): - ldflags.append(self._MapLinkerFlagFilename(ldflag, gyp_to_build_path)) - - if self._Test("DEAD_CODE_STRIPPING", "YES", default="NO"): - ldflags.append("-Wl,-dead_strip") - - if self._Test("PREBINDING", "YES", default="NO"): - ldflags.append("-Wl,-prebind") - - self._Appendf( - ldflags, "DYLIB_COMPATIBILITY_VERSION", "-compatibility_version %s" - ) - self._Appendf(ldflags, "DYLIB_CURRENT_VERSION", "-current_version %s") - - self._AppendPlatformVersionMinFlags(ldflags) - - if "SDKROOT" in self._Settings() and self._SdkPath(): - ldflags.append("-isysroot " + self._SdkPath()) - - for library_path in self._Settings().get("LIBRARY_SEARCH_PATHS", []): - ldflags.append("-L" + gyp_to_build_path(library_path)) - - if "ORDER_FILE" in self._Settings(): - ldflags.append( - "-Wl,-order_file " - + "-Wl," - + gyp_to_build_path(self._Settings()["ORDER_FILE"]) - ) - - if not gyp.common.CrossCompileRequested(): - if arch is not None: - archs = [arch] - else: - assert self.configname - archs = self.GetActiveArchs(self.configname) - if len(archs) != 1: - # TODO: Supporting fat binaries will be annoying. - self._WarnUnimplemented("ARCHS") - archs = ["i386"] - ldflags.append("-arch " + archs[0]) - - # Xcode adds the product directory by default. - # Rewrite -L. to -L./ to work around http://www.openradar.me/25313838 - ldflags.append("-L" + (product_dir if product_dir != "." else "./")) - - install_name = self.GetInstallName() - if install_name and self.spec["type"] != "loadable_module": - ldflags.append("-install_name " + install_name.replace(" ", r"\ ")) - - for rpath in self._Settings().get("LD_RUNPATH_SEARCH_PATHS", []): - ldflags.append("-Wl,-rpath," + rpath) - - sdk_root = self._SdkPath() - if not sdk_root: - sdk_root = "" - config = self.spec["configurations"][self.configname] - framework_dirs = config.get("mac_framework_dirs", []) - for directory in framework_dirs: - ldflags.append("-F" + directory.replace("$(SDKROOT)", sdk_root)) - - if self._IsXCTest(): - platform_root = self._XcodePlatformPath(configname) - if sdk_root and platform_root: - ldflags.append("-F" + platform_root + "/Developer/Library/Frameworks/") - ldflags.append("-framework XCTest") - - is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension() - if sdk_root and is_extension: - # Adds the link flags for extensions. These flags are common for all - # extensions and provide loader and main function. - # These flags reflect the compilation options used by xcode to compile - # extensions. - xcode_version, _ = XcodeVersion() - if xcode_version < "0900": - ldflags.append("-lpkstart") - ldflags.append( - sdk_root - + "/System/Library/PrivateFrameworks/PlugInKit.framework/PlugInKit" - ) - else: - ldflags.append("-e _NSExtensionMain") - ldflags.append("-fapplication-extension") - - self._Appendf(ldflags, "CLANG_CXX_LIBRARY", "-stdlib=%s") - - self.configname = None - return ldflags - - def GetLibtoolflags(self, configname): - """Returns flags that need to be passed to the static linker. - - Args: - configname: The name of the configuration to get ld flags for. - """ - self.configname = configname - libtoolflags = [] - - for libtoolflag in self._Settings().get("OTHER_LDFLAGS", []): - libtoolflags.append(libtoolflag) - # TODO(thakis): ARCHS? - - self.configname = None - return libtoolflags - - def GetPerTargetSettings(self): - """Gets a list of all the per-target settings. This will only fetch keys - whose values are the same across all configurations.""" - first_pass = True - result = {} - for configname in sorted(self.xcode_settings.keys()): - if first_pass: - result = dict(self.xcode_settings[configname]) - first_pass = False - else: - for key, value in self.xcode_settings[configname].items(): - if key not in result: - continue - elif result[key] != value: - del result[key] - return result - - def GetPerConfigSetting(self, setting, configname, default=None): - if configname in self.xcode_settings: - return self.xcode_settings[configname].get(setting, default) - else: - return self.GetPerTargetSetting(setting, default) - - def GetPerTargetSetting(self, setting, default=None): - """Tries to get xcode_settings.setting from spec. Assumes that the setting - has the same value in all configurations and throws otherwise.""" - is_first_pass = True - result = None - for configname in sorted(self.xcode_settings.keys()): - if is_first_pass: - result = self.xcode_settings[configname].get(setting, None) - is_first_pass = False - else: - assert result == self.xcode_settings[configname].get(setting, None), ( - "Expected per-target setting for '%s', got per-config setting " - "(target %s)" % (setting, self.spec["target_name"]) - ) - if result is None: - return default - return result - - def _GetStripPostbuilds(self, configname, output_binary, quiet): - """Returns a list of shell commands that contain the shell commands - necessary to strip this target's binary. These should be run as postbuilds - before the actual postbuilds run.""" - self.configname = configname - - result = [] - if self._Test("DEPLOYMENT_POSTPROCESSING", "YES", default="NO") and self._Test( - "STRIP_INSTALLED_PRODUCT", "YES", default="NO" - ): - - default_strip_style = "debugging" - if ( - self.spec["type"] == "loadable_module" or self._IsIosAppExtension() - ) and self._IsBundle(): - default_strip_style = "non-global" - elif self.spec["type"] == "executable": - default_strip_style = "all" - - strip_style = self._Settings().get("STRIP_STYLE", default_strip_style) - strip_flags = {"all": "", "non-global": "-x", "debugging": "-S"}[ - strip_style - ] - - explicit_strip_flags = self._Settings().get("STRIPFLAGS", "") - if explicit_strip_flags: - strip_flags += " " + _NormalizeEnvVarReferences(explicit_strip_flags) - - if not quiet: - result.append("echo STRIP\\(%s\\)" % self.spec["target_name"]) - result.append(f"strip {strip_flags} {output_binary}") - - self.configname = None - return result - - def _GetDebugInfoPostbuilds(self, configname, output, output_binary, quiet): - """Returns a list of shell commands that contain the shell commands - necessary to massage this target's debug information. These should be run - as postbuilds before the actual postbuilds run.""" - self.configname = configname - - # For static libraries, no dSYMs are created. - result = [] - if ( - self._Test("GCC_GENERATE_DEBUGGING_SYMBOLS", "YES", default="YES") - and self._Test( - "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym", default="dwarf" - ) - and self.spec["type"] != "static_library" - ): - if not quiet: - result.append("echo DSYMUTIL\\(%s\\)" % self.spec["target_name"]) - result.append("dsymutil {} -o {}".format(output_binary, output + ".dSYM")) - - self.configname = None - return result - - def _GetTargetPostbuilds(self, configname, output, output_binary, quiet=False): - """Returns a list of shell commands that contain the shell commands - to run as postbuilds for this target, before the actual postbuilds.""" - # dSYMs need to build before stripping happens. - return self._GetDebugInfoPostbuilds( - configname, output, output_binary, quiet - ) + self._GetStripPostbuilds(configname, output_binary, quiet) - - def _GetIOSPostbuilds(self, configname, output_binary): - """Return a shell command to codesign the iOS output binary so it can - be deployed to a device. This should be run as the very last step of the - build.""" - if not ( - self.isIOS - and (self.spec["type"] == "executable" or self._IsXCTest()) - or self.IsIosFramework() - ): - return [] - - postbuilds = [] - product_name = self.GetFullProductName() - settings = self.xcode_settings[configname] - - # Xcode expects XCTests to be copied into the TEST_HOST dir. - if self._IsXCTest(): - source = os.path.join("${BUILT_PRODUCTS_DIR}", product_name) - test_host = os.path.dirname(settings.get("TEST_HOST")) - xctest_destination = os.path.join(test_host, "PlugIns", product_name) - postbuilds.extend([f"ditto {source} {xctest_destination}"]) - - key = self._GetIOSCodeSignIdentityKey(settings) - if not key: - return postbuilds - - # Warn for any unimplemented signing xcode keys. - unimpl = ["OTHER_CODE_SIGN_FLAGS"] - unimpl = set(unimpl) & set(self.xcode_settings[configname].keys()) - if unimpl: - print( - "Warning: Some codesign keys not implemented, ignoring: %s" - % ", ".join(sorted(unimpl)) - ) - - if self._IsXCTest(): - # For device xctests, Xcode copies two extra frameworks into $TEST_HOST. - test_host = os.path.dirname(settings.get("TEST_HOST")) - frameworks_dir = os.path.join(test_host, "Frameworks") - platform_root = self._XcodePlatformPath(configname) - frameworks = [ - "Developer/Library/PrivateFrameworks/IDEBundleInjection.framework", - "Developer/Library/Frameworks/XCTest.framework", - ] - for framework in frameworks: - source = os.path.join(platform_root, framework) - destination = os.path.join(frameworks_dir, os.path.basename(framework)) - postbuilds.extend([f"ditto {source} {destination}"]) - - # Then re-sign everything with 'preserve=True' - postbuilds.extend( - [ - '%s code-sign-bundle "%s" "%s" "%s" "%s" %s' - % ( - os.path.join("${TARGET_BUILD_DIR}", "gyp-mac-tool"), - key, - settings.get("CODE_SIGN_ENTITLEMENTS", ""), - settings.get("PROVISIONING_PROFILE", ""), - destination, - True, - ) - ] - ) - plugin_dir = os.path.join(test_host, "PlugIns") - targets = [os.path.join(plugin_dir, product_name), test_host] - for target in targets: - postbuilds.extend( - [ - '%s code-sign-bundle "%s" "%s" "%s" "%s" %s' - % ( - os.path.join("${TARGET_BUILD_DIR}", "gyp-mac-tool"), - key, - settings.get("CODE_SIGN_ENTITLEMENTS", ""), - settings.get("PROVISIONING_PROFILE", ""), - target, - True, - ) - ] - ) - - postbuilds.extend( - [ - '%s code-sign-bundle "%s" "%s" "%s" "%s" %s' - % ( - os.path.join("${TARGET_BUILD_DIR}", "gyp-mac-tool"), - key, - settings.get("CODE_SIGN_ENTITLEMENTS", ""), - settings.get("PROVISIONING_PROFILE", ""), - os.path.join("${BUILT_PRODUCTS_DIR}", product_name), - False, - ) - ] - ) - return postbuilds - - def _GetIOSCodeSignIdentityKey(self, settings): - identity = settings.get("CODE_SIGN_IDENTITY") - if not identity: - return None - if identity not in XcodeSettings._codesigning_key_cache: - output = subprocess.check_output( - ["security", "find-identity", "-p", "codesigning", "-v"] - ) - for line in output.splitlines(): - if identity in line: - fingerprint = line.split()[1] - cache = XcodeSettings._codesigning_key_cache - assert identity not in cache or fingerprint == cache[identity], ( - "Multiple codesigning fingerprints for identity: %s" % identity - ) - XcodeSettings._codesigning_key_cache[identity] = fingerprint - return XcodeSettings._codesigning_key_cache.get(identity, "") - - def AddImplicitPostbuilds( - self, configname, output, output_binary, postbuilds=[], quiet=False - ): - """Returns a list of shell commands that should run before and after - |postbuilds|.""" - assert output_binary is not None - pre = self._GetTargetPostbuilds(configname, output, output_binary, quiet) - post = self._GetIOSPostbuilds(configname, output_binary) - return pre + postbuilds + post - - def _AdjustLibrary(self, library, config_name=None): - if library.endswith(".framework"): - l_flag = "-framework " + os.path.splitext(os.path.basename(library))[0] - else: - m = self.library_re.match(library) - if m: - l_flag = "-l" + m.group(1) - else: - l_flag = library - - sdk_root = self._SdkPath(config_name) - if not sdk_root: - sdk_root = "" - # Xcode 7 started shipping with ".tbd" (text based stubs) files instead of - # ".dylib" without providing a real support for them. What it does, for - # "/usr/lib" libraries, is do "-L/usr/lib -lname" which is dependent on the - # library order and cause collision when building Chrome. - # - # Instead substitute ".tbd" to ".dylib" in the generated project when the - # following conditions are both true: - # - library is referenced in the gyp file as "$(SDKROOT)/**/*.dylib", - # - the ".dylib" file does not exists but a ".tbd" file do. - library = l_flag.replace("$(SDKROOT)", sdk_root) - if l_flag.startswith("$(SDKROOT)"): - basename, ext = os.path.splitext(library) - if ext == ".dylib" and not os.path.exists(library): - tbd_library = basename + ".tbd" - if os.path.exists(tbd_library): - library = tbd_library - return library - - def AdjustLibraries(self, libraries, config_name=None): - """Transforms entries like 'Cocoa.framework' in libraries into entries like - '-framework Cocoa', 'libcrypto.dylib' into '-lcrypto', etc. - """ - libraries = [self._AdjustLibrary(library, config_name) for library in libraries] - return libraries - - def _BuildMachineOSBuild(self): - return GetStdout(["sw_vers", "-buildVersion"]) - - def _XcodeIOSDeviceFamily(self, configname): - family = self.xcode_settings[configname].get("TARGETED_DEVICE_FAMILY", "1") - return [int(x) for x in family.split(",")] - - def GetExtraPlistItems(self, configname=None): - """Returns a dictionary with extra items to insert into Info.plist.""" - if configname not in XcodeSettings._plist_cache: - cache = {} - cache["BuildMachineOSBuild"] = self._BuildMachineOSBuild() - - xcode_version, xcode_build = XcodeVersion() - cache["DTXcode"] = xcode_version - cache["DTXcodeBuild"] = xcode_build - compiler = self.xcode_settings[configname].get("GCC_VERSION") - if compiler is not None: - cache["DTCompiler"] = compiler - - sdk_root = self._SdkRoot(configname) - if not sdk_root: - sdk_root = self._DefaultSdkRoot() - sdk_version = self._GetSdkVersionInfoItem(sdk_root, "--show-sdk-version") - cache["DTSDKName"] = sdk_root + (sdk_version or "") - if xcode_version >= "0720": - cache["DTSDKBuild"] = self._GetSdkVersionInfoItem( - sdk_root, "--show-sdk-build-version" - ) - elif xcode_version >= "0430": - cache["DTSDKBuild"] = sdk_version - else: - cache["DTSDKBuild"] = cache["BuildMachineOSBuild"] - - if self.isIOS: - cache["MinimumOSVersion"] = self.xcode_settings[configname].get( - "IPHONEOS_DEPLOYMENT_TARGET" - ) - cache["DTPlatformName"] = sdk_root - cache["DTPlatformVersion"] = sdk_version - - if configname.endswith("iphoneos"): - cache["CFBundleSupportedPlatforms"] = ["iPhoneOS"] - cache["DTPlatformBuild"] = cache["DTSDKBuild"] - else: - cache["CFBundleSupportedPlatforms"] = ["iPhoneSimulator"] - # This is weird, but Xcode sets DTPlatformBuild to an empty field - # for simulator builds. - cache["DTPlatformBuild"] = "" - XcodeSettings._plist_cache[configname] = cache - - # Include extra plist items that are per-target, not per global - # XcodeSettings. - items = dict(XcodeSettings._plist_cache[configname]) - if self.isIOS: - items["UIDeviceFamily"] = self._XcodeIOSDeviceFamily(configname) - return items - - def _DefaultSdkRoot(self): - """Returns the default SDKROOT to use. - - Prior to version 5.0.0, if SDKROOT was not explicitly set in the Xcode - project, then the environment variable was empty. Starting with this - version, Xcode uses the name of the newest SDK installed. - """ - xcode_version, _ = XcodeVersion() - if xcode_version < "0500": - return "" - default_sdk_path = self._XcodeSdkPath("") - default_sdk_root = XcodeSettings._sdk_root_cache.get(default_sdk_path) - if default_sdk_root: - return default_sdk_root - try: - all_sdks = GetStdout(["xcodebuild", "-showsdks"]) - except GypError: - # If xcodebuild fails, there will be no valid SDKs - return "" - for line in all_sdks.splitlines(): - items = line.split() - if len(items) >= 3 and items[-2] == "-sdk": - sdk_root = items[-1] - sdk_path = self._XcodeSdkPath(sdk_root) - if sdk_path == default_sdk_path: - return sdk_root - return "" - - -class MacPrefixHeader: - """A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature. - - This feature consists of several pieces: - * If GCC_PREFIX_HEADER is present, all compilations in that project get an - additional |-include path_to_prefix_header| cflag. - * If GCC_PRECOMPILE_PREFIX_HEADER is present too, then the prefix header is - instead compiled, and all other compilations in the project get an - additional |-include path_to_compiled_header| instead. - + Compiled prefix headers have the extension gch. There is one gch file for - every language used in the project (c, cc, m, mm), since gch files for - different languages aren't compatible. - + gch files themselves are built with the target's normal cflags, but they - obviously don't get the |-include| flag. Instead, they need a -x flag that - describes their language. - + All o files in the target need to depend on the gch file, to make sure - it's built before any o file is built. - - This class helps with some of these tasks, but it needs help from the build - system for writing dependencies to the gch files, for writing build commands - for the gch files, and for figuring out the location of the gch files. - """ - - def __init__( - self, xcode_settings, gyp_path_to_build_path, gyp_path_to_build_output - ): - """If xcode_settings is None, all methods on this class are no-ops. - - Args: - gyp_path_to_build_path: A function that takes a gyp-relative path, - and returns a path relative to the build directory. - gyp_path_to_build_output: A function that takes a gyp-relative path and - a language code ('c', 'cc', 'm', or 'mm'), and that returns a path - to where the output of precompiling that path for that language - should be placed (without the trailing '.gch'). - """ - # This doesn't support per-configuration prefix headers. Good enough - # for now. - self.header = None - self.compile_headers = False - if xcode_settings: - self.header = xcode_settings.GetPerTargetSetting("GCC_PREFIX_HEADER") - self.compile_headers = ( - xcode_settings.GetPerTargetSetting( - "GCC_PRECOMPILE_PREFIX_HEADER", default="NO" - ) - != "NO" - ) - self.compiled_headers = {} - if self.header: - if self.compile_headers: - for lang in ["c", "cc", "m", "mm"]: - self.compiled_headers[lang] = gyp_path_to_build_output( - self.header, lang - ) - self.header = gyp_path_to_build_path(self.header) - - def _CompiledHeader(self, lang, arch): - assert self.compile_headers - h = self.compiled_headers[lang] - if arch: - h += "." + arch - return h - - def GetInclude(self, lang, arch=None): - """Gets the cflags to include the prefix header for language |lang|.""" - if self.compile_headers and lang in self.compiled_headers: - return "-include %s" % self._CompiledHeader(lang, arch) - elif self.header: - return "-include %s" % self.header - else: - return "" - - def _Gch(self, lang, arch): - """Returns the actual file name of the prefix header for language |lang|.""" - assert self.compile_headers - return self._CompiledHeader(lang, arch) + ".gch" - - def GetObjDependencies(self, sources, objs, arch=None): - """Given a list of source files and the corresponding object files, returns - a list of (source, object, gch) tuples, where |gch| is the build-directory - relative path to the gch file each object file depends on. |compilable[i]| - has to be the source file belonging to |objs[i]|.""" - if not self.header or not self.compile_headers: - return [] - - result = [] - for source, obj in zip(sources, objs): - ext = os.path.splitext(source)[1] - lang = { - ".c": "c", - ".cpp": "cc", - ".cc": "cc", - ".cxx": "cc", - ".m": "m", - ".mm": "mm", - }.get(ext, None) - if lang: - result.append((source, obj, self._Gch(lang, arch))) - return result - - def GetPchBuildCommands(self, arch=None): - """Returns [(path_to_gch, language_flag, language, header)]. - |path_to_gch| and |header| are relative to the build directory. - """ - if not self.header or not self.compile_headers: - return [] - return [ - (self._Gch("c", arch), "-x c-header", "c", self.header), - (self._Gch("cc", arch), "-x c++-header", "cc", self.header), - (self._Gch("m", arch), "-x objective-c-header", "m", self.header), - (self._Gch("mm", arch), "-x objective-c++-header", "mm", self.header), - ] - - -def XcodeVersion(): - """Returns a tuple of version and build version of installed Xcode.""" - # `xcodebuild -version` output looks like - # Xcode 4.6.3 - # Build version 4H1503 - # or like - # Xcode 3.2.6 - # Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0 - # BuildVersion: 10M2518 - # Convert that to ('0463', '4H1503') or ('0326', '10M2518'). - global XCODE_VERSION_CACHE - if XCODE_VERSION_CACHE: - return XCODE_VERSION_CACHE - version = "" - build = "" - try: - version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines() - # In some circumstances xcodebuild exits 0 but doesn't return - # the right results; for example, a user on 10.7 or 10.8 with - # a bogus path set via xcode-select - # In that case this may be a CLT-only install so fall back to - # checking that version. - if len(version_list) < 2: - raise GypError("xcodebuild returned unexpected results") - version = version_list[0].split()[-1] # Last word on first line - build = version_list[-1].split()[-1] # Last word on last line - except GypError: # Xcode not installed so look for XCode Command Line Tools - version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322 - if not version: - raise GypError("No Xcode or CLT version detected!") - # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100": - version = version.split(".")[:3] # Just major, minor, micro - version[0] = version[0].zfill(2) # Add a leading zero if major is one digit - version = ("".join(version) + "00")[:4] # Limit to exactly four characters - XCODE_VERSION_CACHE = (version, build) - return XCODE_VERSION_CACHE - - -# This function ported from the logic in Homebrew's CLT version check -def CLTVersion(): - """Returns the version of command-line tools from pkgutil.""" - # pkgutil output looks like - # package-id: com.apple.pkg.CLTools_Executables - # version: 5.0.1.0.1.1382131676 - # volume: / - # location: / - # install-time: 1382544035 - # groups: com.apple.FindSystemFiles.pkg-group - # com.apple.DevToolsBoth.pkg-group - # com.apple.DevToolsNonRelocatableShared.pkg-group - STANDALONE_PKG_ID = "com.apple.pkg.DeveloperToolsCLILeo" - FROM_XCODE_PKG_ID = "com.apple.pkg.DeveloperToolsCLI" - MAVERICKS_PKG_ID = "com.apple.pkg.CLTools_Executables" - - regex = re.compile("version: (?P.+)") - for key in [MAVERICKS_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID]: - try: - output = GetStdout(["/usr/sbin/pkgutil", "--pkg-info", key]) - return re.search(regex, output).groupdict()["version"] - except GypError: - continue - - regex = re.compile(r'Command Line Tools for Xcode\s+(?P\S+)') - try: - output = GetStdout(["/usr/sbin/softwareupdate", "--history"]) - return re.search(regex, output).groupdict()["version"] - except GypError: - return None - - -def GetStdoutQuiet(cmdlist): - """Returns the content of standard output returned by invoking |cmdlist|. - Ignores the stderr. - Raises |GypError| if the command return with a non-zero return code.""" - job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out = job.communicate()[0].decode("utf-8") - if job.returncode != 0: - raise GypError("Error %d running %s" % (job.returncode, cmdlist[0])) - return out.rstrip("\n") - - -def GetStdout(cmdlist): - """Returns the content of standard output returned by invoking |cmdlist|. - Raises |GypError| if the command return with a non-zero return code.""" - job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE) - out = job.communicate()[0].decode("utf-8") - if job.returncode != 0: - sys.stderr.write(out + "\n") - raise GypError("Error %d running %s" % (job.returncode, cmdlist[0])) - return out.rstrip("\n") - - -def MergeGlobalXcodeSettingsToSpec(global_dict, spec): - """Merges the global xcode_settings dictionary into each configuration of the - target represented by spec. For keys that are both in the global and the local - xcode_settings dict, the local key gets precedence. - """ - # The xcode generator special-cases global xcode_settings and does something - # that amounts to merging in the global xcode_settings into each local - # xcode_settings dict. - global_xcode_settings = global_dict.get("xcode_settings", {}) - for config in spec["configurations"].values(): - if "xcode_settings" in config: - new_settings = global_xcode_settings.copy() - new_settings.update(config["xcode_settings"]) - config["xcode_settings"] = new_settings - - -def IsMacBundle(flavor, spec): - """Returns if |spec| should be treated as a bundle. - - Bundles are directories with a certain subdirectory structure, instead of - just a single file. Bundle rules do not produce a binary but also package - resources into that directory.""" - is_mac_bundle = ( - int(spec.get("mac_xctest_bundle", 0)) != 0 - or int(spec.get("mac_xcuitest_bundle", 0)) != 0 - or (int(spec.get("mac_bundle", 0)) != 0 and flavor == "mac") - ) - - if is_mac_bundle: - assert spec["type"] != "none", ( - 'mac_bundle targets cannot have type none (target "%s")' - % spec["target_name"] - ) - return is_mac_bundle - - -def GetMacBundleResources(product_dir, xcode_settings, resources): - """Yields (output, resource) pairs for every resource in |resources|. - Only call this for mac bundle targets. - - Args: - product_dir: Path to the directory containing the output bundle, - relative to the build directory. - xcode_settings: The XcodeSettings of the current target. - resources: A list of bundle resources, relative to the build directory. - """ - dest = os.path.join(product_dir, xcode_settings.GetBundleResourceFolder()) - for res in resources: - output = dest - - # The make generator doesn't support it, so forbid it everywhere - # to keep the generators more interchangeable. - assert " " not in res, "Spaces in resource filenames not supported (%s)" % res - - # Split into (path,file). - res_parts = os.path.split(res) - - # Now split the path into (prefix,maybe.lproj). - lproj_parts = os.path.split(res_parts[0]) - # If the resource lives in a .lproj bundle, add that to the destination. - if lproj_parts[1].endswith(".lproj"): - output = os.path.join(output, lproj_parts[1]) - - output = os.path.join(output, res_parts[1]) - # Compiled XIB files are referred to by .nib. - if output.endswith(".xib"): - output = os.path.splitext(output)[0] + ".nib" - # Compiled storyboard files are referred to by .storyboardc. - if output.endswith(".storyboard"): - output = os.path.splitext(output)[0] + ".storyboardc" - - yield output, res - - -def GetMacInfoPlist(product_dir, xcode_settings, gyp_path_to_build_path): - """Returns (info_plist, dest_plist, defines, extra_env), where: - * |info_plist| is the source plist path, relative to the - build directory, - * |dest_plist| is the destination plist path, relative to the - build directory, - * |defines| is a list of preprocessor defines (empty if the plist - shouldn't be preprocessed, - * |extra_env| is a dict of env variables that should be exported when - invoking |mac_tool copy-info-plist|. - - Only call this for mac bundle targets. - - Args: - product_dir: Path to the directory containing the output bundle, - relative to the build directory. - xcode_settings: The XcodeSettings of the current target. - gyp_to_build_path: A function that converts paths relative to the - current gyp file to paths relative to the build directory. - """ - info_plist = xcode_settings.GetPerTargetSetting("INFOPLIST_FILE") - if not info_plist: - return None, None, [], {} - - # The make generator doesn't support it, so forbid it everywhere - # to keep the generators more interchangeable. - assert " " not in info_plist, ( - "Spaces in Info.plist filenames not supported (%s)" % info_plist - ) - - info_plist = gyp_path_to_build_path(info_plist) - - # If explicitly set to preprocess the plist, invoke the C preprocessor and - # specify any defines as -D flags. - if ( - xcode_settings.GetPerTargetSetting("INFOPLIST_PREPROCESS", default="NO") - == "YES" - ): - # Create an intermediate file based on the path. - defines = shlex.split( - xcode_settings.GetPerTargetSetting( - "INFOPLIST_PREPROCESSOR_DEFINITIONS", default="" - ) - ) - else: - defines = [] - - dest_plist = os.path.join(product_dir, xcode_settings.GetBundlePlistPath()) - extra_env = xcode_settings.GetPerTargetSettings() - - return info_plist, dest_plist, defines, extra_env - - -def _GetXcodeEnv( - xcode_settings, built_products_dir, srcroot, configuration, additional_settings=None -): - """Return the environment variables that Xcode would set. See - http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW153 - for a full list. - - Args: - xcode_settings: An XcodeSettings object. If this is None, this function - returns an empty dict. - built_products_dir: Absolute path to the built products dir. - srcroot: Absolute path to the source root. - configuration: The build configuration name. - additional_settings: An optional dict with more values to add to the - result. - """ - - if not xcode_settings: - return {} - - # This function is considered a friend of XcodeSettings, so let it reach into - # its implementation details. - spec = xcode_settings.spec - - # These are filled in on an as-needed basis. - env = { - "BUILT_FRAMEWORKS_DIR": built_products_dir, - "BUILT_PRODUCTS_DIR": built_products_dir, - "CONFIGURATION": configuration, - "PRODUCT_NAME": xcode_settings.GetProductName(), - # For FULL_PRODUCT_NAME see: - # /Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/MacOSX\ Product\ Types.xcspec # noqa: E501 - "SRCROOT": srcroot, - "SOURCE_ROOT": "${SRCROOT}", - # This is not true for static libraries, but currently the env is only - # written for bundles: - "TARGET_BUILD_DIR": built_products_dir, - "TEMP_DIR": "${TMPDIR}", - "XCODE_VERSION_ACTUAL": XcodeVersion()[0], - } - if xcode_settings.GetPerConfigSetting("SDKROOT", configuration): - env["SDKROOT"] = xcode_settings._SdkPath(configuration) - else: - env["SDKROOT"] = "" - - if xcode_settings.mac_toolchain_dir: - env["DEVELOPER_DIR"] = xcode_settings.mac_toolchain_dir - - if spec["type"] in ( - "executable", - "static_library", - "shared_library", - "loadable_module", - ): - env["EXECUTABLE_NAME"] = xcode_settings.GetExecutableName() - env["EXECUTABLE_PATH"] = xcode_settings.GetExecutablePath() - env["FULL_PRODUCT_NAME"] = xcode_settings.GetFullProductName() - mach_o_type = xcode_settings.GetMachOType() - if mach_o_type: - env["MACH_O_TYPE"] = mach_o_type - env["PRODUCT_TYPE"] = xcode_settings.GetProductType() - if xcode_settings._IsBundle(): - # xcodeproj_file.py sets the same Xcode subfolder value for this as for - # FRAMEWORKS_FOLDER_PATH so Xcode builds will actually use FFP's value. - env["BUILT_FRAMEWORKS_DIR"] = os.path.join( - built_products_dir + os.sep + xcode_settings.GetBundleFrameworksFolderPath() - ) - env["CONTENTS_FOLDER_PATH"] = xcode_settings.GetBundleContentsFolderPath() - env["EXECUTABLE_FOLDER_PATH"] = xcode_settings.GetBundleExecutableFolderPath() - env[ - "UNLOCALIZED_RESOURCES_FOLDER_PATH" - ] = xcode_settings.GetBundleResourceFolder() - env["JAVA_FOLDER_PATH"] = xcode_settings.GetBundleJavaFolderPath() - env["FRAMEWORKS_FOLDER_PATH"] = xcode_settings.GetBundleFrameworksFolderPath() - env[ - "SHARED_FRAMEWORKS_FOLDER_PATH" - ] = xcode_settings.GetBundleSharedFrameworksFolderPath() - env[ - "SHARED_SUPPORT_FOLDER_PATH" - ] = xcode_settings.GetBundleSharedSupportFolderPath() - env["PLUGINS_FOLDER_PATH"] = xcode_settings.GetBundlePlugInsFolderPath() - env["XPCSERVICES_FOLDER_PATH"] = xcode_settings.GetBundleXPCServicesFolderPath() - env["INFOPLIST_PATH"] = xcode_settings.GetBundlePlistPath() - env["WRAPPER_NAME"] = xcode_settings.GetWrapperName() - - install_name = xcode_settings.GetInstallName() - if install_name: - env["LD_DYLIB_INSTALL_NAME"] = install_name - install_name_base = xcode_settings.GetInstallNameBase() - if install_name_base: - env["DYLIB_INSTALL_NAME_BASE"] = install_name_base - xcode_version, _ = XcodeVersion() - if xcode_version >= "0500" and not env.get("SDKROOT"): - sdk_root = xcode_settings._SdkRoot(configuration) - if not sdk_root: - sdk_root = xcode_settings._XcodeSdkPath("") - if sdk_root is None: - sdk_root = "" - env["SDKROOT"] = sdk_root - - if not additional_settings: - additional_settings = {} - else: - # Flatten lists to strings. - for k in additional_settings: - if not isinstance(additional_settings[k], str): - additional_settings[k] = " ".join(additional_settings[k]) - additional_settings.update(env) - - for k in additional_settings: - additional_settings[k] = _NormalizeEnvVarReferences(additional_settings[k]) - - return additional_settings - - -def _NormalizeEnvVarReferences(str): - """Takes a string containing variable references in the form ${FOO}, $(FOO), - or $FOO, and returns a string with all variable references in the form ${FOO}. - """ - # $FOO -> ${FOO} - str = re.sub(r"\$([a-zA-Z_][a-zA-Z0-9_]*)", r"${\1}", str) - - # $(FOO) -> ${FOO} - matches = re.findall(r"(\$\(([a-zA-Z0-9\-_]+)\))", str) - for match in matches: - to_replace, variable = match - assert "$(" not in match, "$($(FOO)) variables not supported: " + match - str = str.replace(to_replace, "${" + variable + "}") - - return str - - -def ExpandEnvVars(string, expansions): - """Expands ${VARIABLES}, $(VARIABLES), and $VARIABLES in string per the - expansions list. If the variable expands to something that references - another variable, this variable is expanded as well if it's in env -- - until no variables present in env are left.""" - for k, v in reversed(expansions): - string = string.replace("${" + k + "}", v) - string = string.replace("$(" + k + ")", v) - string = string.replace("$" + k, v) - return string - - -def _TopologicallySortedEnvVarKeys(env): - """Takes a dict |env| whose values are strings that can refer to other keys, - for example env['foo'] = '$(bar) and $(baz)'. Returns a list L of all keys of - env such that key2 is after key1 in L if env[key2] refers to env[key1]. - - Throws an Exception in case of dependency cycles. - """ - # Since environment variables can refer to other variables, the evaluation - # order is important. Below is the logic to compute the dependency graph - # and sort it. - regex = re.compile(r"\$\{([a-zA-Z0-9\-_]+)\}") - - def GetEdges(node): - # Use a definition of edges such that user_of_variable -> used_varible. - # This happens to be easier in this case, since a variable's - # definition contains all variables it references in a single string. - # We can then reverse the result of the topological sort at the end. - # Since: reverse(topsort(DAG)) = topsort(reverse_edges(DAG)) - matches = {v for v in regex.findall(env[node]) if v in env} - for dependee in matches: - assert "${" not in dependee, "Nested variables not supported: " + dependee - return matches - - try: - # Topologically sort, and then reverse, because we used an edge definition - # that's inverted from the expected result of this function (see comment - # above). - order = gyp.common.TopologicallySorted(env.keys(), GetEdges) - order.reverse() - return order - except gyp.common.CycleError as e: - raise GypError( - "Xcode environment variables are cyclically dependent: " + str(e.nodes) - ) - - -def GetSortedXcodeEnv( - xcode_settings, built_products_dir, srcroot, configuration, additional_settings=None -): - env = _GetXcodeEnv( - xcode_settings, built_products_dir, srcroot, configuration, additional_settings - ) - return [(key, env[key]) for key in _TopologicallySortedEnvVarKeys(env)] - - -def GetSpecPostbuildCommands(spec, quiet=False): - """Returns the list of postbuilds explicitly defined on |spec|, in a form - executable by a shell.""" - postbuilds = [] - for postbuild in spec.get("postbuilds", []): - if not quiet: - postbuilds.append( - "echo POSTBUILD\\(%s\\) %s" - % (spec["target_name"], postbuild["postbuild_name"]) - ) - postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild["action"])) - return postbuilds - - -def _HasIOSTarget(targets): - """Returns true if any target contains the iOS specific key - IPHONEOS_DEPLOYMENT_TARGET.""" - for target_dict in targets.values(): - for config in target_dict["configurations"].values(): - if config.get("xcode_settings", {}).get("IPHONEOS_DEPLOYMENT_TARGET"): - return True - return False - - -def _AddIOSDeviceConfigurations(targets): - """Clone all targets and append -iphoneos to the name. Configure these targets - to build for iOS devices and use correct architectures for those builds.""" - for target_dict in targets.values(): - toolset = target_dict["toolset"] - configs = target_dict["configurations"] - for config_name, simulator_config_dict in dict(configs).items(): - iphoneos_config_dict = copy.deepcopy(simulator_config_dict) - configs[config_name + "-iphoneos"] = iphoneos_config_dict - configs[config_name + "-iphonesimulator"] = simulator_config_dict - if toolset == "target": - simulator_config_dict["xcode_settings"]["SDKROOT"] = "iphonesimulator" - iphoneos_config_dict["xcode_settings"]["SDKROOT"] = "iphoneos" - return targets - - -def CloneConfigurationForDeviceAndEmulator(target_dicts): - """If |target_dicts| contains any iOS targets, automatically create -iphoneos - targets for iOS device builds.""" - if _HasIOSTarget(target_dicts): - return _AddIOSDeviceConfigurations(target_dicts) - return target_dicts diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py deleted file mode 100644 index bb74eac..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +++ /dev/null @@ -1,302 +0,0 @@ -# Copyright (c) 2014 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Xcode-ninja wrapper project file generator. - -This updates the data structures passed to the Xcode gyp generator to build -with ninja instead. The Xcode project itself is transformed into a list of -executable targets, each with a build step to build with ninja, and a target -with every source and resource file. This appears to sidestep some of the -major performance headaches experienced using complex projects and large number -of targets within Xcode. -""" - -import errno -import gyp.generator.ninja -import os -import re -import xml.sax.saxutils - - -def _WriteWorkspace(main_gyp, sources_gyp, params): - """ Create a workspace to wrap main and sources gyp paths. """ - (build_file_root, build_file_ext) = os.path.splitext(main_gyp) - workspace_path = build_file_root + ".xcworkspace" - options = params["options"] - if options.generator_output: - workspace_path = os.path.join(options.generator_output, workspace_path) - try: - os.makedirs(workspace_path) - except OSError as e: - if e.errno != errno.EEXIST: - raise - output_string = ( - '\n' + '\n' - ) - for gyp_name in [main_gyp, sources_gyp]: - name = os.path.splitext(os.path.basename(gyp_name))[0] + ".xcodeproj" - name = xml.sax.saxutils.quoteattr("group:" + name) - output_string += " \n" % name - output_string += "\n" - - workspace_file = os.path.join(workspace_path, "contents.xcworkspacedata") - - try: - with open(workspace_file) as input_file: - input_string = input_file.read() - if input_string == output_string: - return - except OSError: - # Ignore errors if the file doesn't exist. - pass - - with open(workspace_file, "w") as output_file: - output_file.write(output_string) - - -def _TargetFromSpec(old_spec, params): - """ Create fake target for xcode-ninja wrapper. """ - # Determine ninja top level build dir (e.g. /path/to/out). - ninja_toplevel = None - jobs = 0 - if params: - options = params["options"] - ninja_toplevel = os.path.join( - options.toplevel_dir, gyp.generator.ninja.ComputeOutputDir(params) - ) - jobs = params.get("generator_flags", {}).get("xcode_ninja_jobs", 0) - - target_name = old_spec.get("target_name") - product_name = old_spec.get("product_name", target_name) - product_extension = old_spec.get("product_extension") - - ninja_target = {} - ninja_target["target_name"] = target_name - ninja_target["product_name"] = product_name - if product_extension: - ninja_target["product_extension"] = product_extension - ninja_target["toolset"] = old_spec.get("toolset") - ninja_target["default_configuration"] = old_spec.get("default_configuration") - ninja_target["configurations"] = {} - - # Tell Xcode to look in |ninja_toplevel| for build products. - new_xcode_settings = {} - if ninja_toplevel: - new_xcode_settings["CONFIGURATION_BUILD_DIR"] = ( - "%s/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" % ninja_toplevel - ) - - if "configurations" in old_spec: - for config in old_spec["configurations"]: - old_xcode_settings = old_spec["configurations"][config].get( - "xcode_settings", {} - ) - if "IPHONEOS_DEPLOYMENT_TARGET" in old_xcode_settings: - new_xcode_settings["CODE_SIGNING_REQUIRED"] = "NO" - new_xcode_settings["IPHONEOS_DEPLOYMENT_TARGET"] = old_xcode_settings[ - "IPHONEOS_DEPLOYMENT_TARGET" - ] - for key in ["BUNDLE_LOADER", "TEST_HOST"]: - if key in old_xcode_settings: - new_xcode_settings[key] = old_xcode_settings[key] - - ninja_target["configurations"][config] = {} - ninja_target["configurations"][config][ - "xcode_settings" - ] = new_xcode_settings - - ninja_target["mac_bundle"] = old_spec.get("mac_bundle", 0) - ninja_target["mac_xctest_bundle"] = old_spec.get("mac_xctest_bundle", 0) - ninja_target["ios_app_extension"] = old_spec.get("ios_app_extension", 0) - ninja_target["ios_watchkit_extension"] = old_spec.get("ios_watchkit_extension", 0) - ninja_target["ios_watchkit_app"] = old_spec.get("ios_watchkit_app", 0) - ninja_target["type"] = old_spec["type"] - if ninja_toplevel: - ninja_target["actions"] = [ - { - "action_name": "Compile and copy %s via ninja" % target_name, - "inputs": [], - "outputs": [], - "action": [ - "env", - "PATH=%s" % os.environ["PATH"], - "ninja", - "-C", - new_xcode_settings["CONFIGURATION_BUILD_DIR"], - target_name, - ], - "message": "Compile and copy %s via ninja" % target_name, - }, - ] - if jobs > 0: - ninja_target["actions"][0]["action"].extend(("-j", jobs)) - return ninja_target - - -def IsValidTargetForWrapper(target_extras, executable_target_pattern, spec): - """Limit targets for Xcode wrapper. - - Xcode sometimes performs poorly with too many targets, so only include - proper executable targets, with filters to customize. - Arguments: - target_extras: Regular expression to always add, matching any target. - executable_target_pattern: Regular expression limiting executable targets. - spec: Specifications for target. - """ - target_name = spec.get("target_name") - # Always include targets matching target_extras. - if target_extras is not None and re.search(target_extras, target_name): - return True - - # Otherwise just show executable targets and xc_tests. - if int(spec.get("mac_xctest_bundle", 0)) != 0 or ( - spec.get("type", "") == "executable" - and spec.get("product_extension", "") != "bundle" - ): - - # If there is a filter and the target does not match, exclude the target. - if executable_target_pattern is not None: - if not re.search(executable_target_pattern, target_name): - return False - return True - return False - - -def CreateWrapper(target_list, target_dicts, data, params): - """Initialize targets for the ninja wrapper. - - This sets up the necessary variables in the targets to generate Xcode projects - that use ninja as an external builder. - Arguments: - target_list: List of target pairs: 'base/base.gyp:base'. - target_dicts: Dict of target properties keyed on target pair. - data: Dict of flattened build files keyed on gyp path. - params: Dict of global options for gyp. - """ - orig_gyp = params["build_files"][0] - for gyp_name, gyp_dict in data.items(): - if gyp_name == orig_gyp: - depth = gyp_dict["_DEPTH"] - - # Check for custom main gyp name, otherwise use the default CHROMIUM_GYP_FILE - # and prepend .ninja before the .gyp extension. - generator_flags = params.get("generator_flags", {}) - main_gyp = generator_flags.get("xcode_ninja_main_gyp", None) - if main_gyp is None: - (build_file_root, build_file_ext) = os.path.splitext(orig_gyp) - main_gyp = build_file_root + ".ninja" + build_file_ext - - # Create new |target_list|, |target_dicts| and |data| data structures. - new_target_list = [] - new_target_dicts = {} - new_data = {} - - # Set base keys needed for |data|. - new_data[main_gyp] = {} - new_data[main_gyp]["included_files"] = [] - new_data[main_gyp]["targets"] = [] - new_data[main_gyp]["xcode_settings"] = data[orig_gyp].get("xcode_settings", {}) - - # Normally the xcode-ninja generator includes only valid executable targets. - # If |xcode_ninja_executable_target_pattern| is set, that list is reduced to - # executable targets that match the pattern. (Default all) - executable_target_pattern = generator_flags.get( - "xcode_ninja_executable_target_pattern", None - ) - - # For including other non-executable targets, add the matching target name - # to the |xcode_ninja_target_pattern| regular expression. (Default none) - target_extras = generator_flags.get("xcode_ninja_target_pattern", None) - - for old_qualified_target in target_list: - spec = target_dicts[old_qualified_target] - if IsValidTargetForWrapper(target_extras, executable_target_pattern, spec): - # Add to new_target_list. - target_name = spec.get("target_name") - new_target_name = f"{main_gyp}:{target_name}#target" - new_target_list.append(new_target_name) - - # Add to new_target_dicts. - new_target_dicts[new_target_name] = _TargetFromSpec(spec, params) - - # Add to new_data. - for old_target in data[old_qualified_target.split(":")[0]]["targets"]: - if old_target["target_name"] == target_name: - new_data_target = {} - new_data_target["target_name"] = old_target["target_name"] - new_data_target["toolset"] = old_target["toolset"] - new_data[main_gyp]["targets"].append(new_data_target) - - # Create sources target. - sources_target_name = "sources_for_indexing" - sources_target = _TargetFromSpec( - { - "target_name": sources_target_name, - "toolset": "target", - "default_configuration": "Default", - "mac_bundle": "0", - "type": "executable", - }, - None, - ) - - # Tell Xcode to look everywhere for headers. - sources_target["configurations"] = {"Default": {"include_dirs": [depth]}} - - # Put excluded files into the sources target so they can be opened in Xcode. - skip_excluded_files = not generator_flags.get( - "xcode_ninja_list_excluded_files", True - ) - - sources = [] - for target, target_dict in target_dicts.items(): - base = os.path.dirname(target) - files = target_dict.get("sources", []) + target_dict.get( - "mac_bundle_resources", [] - ) - - if not skip_excluded_files: - files.extend( - target_dict.get("sources_excluded", []) - + target_dict.get("mac_bundle_resources_excluded", []) - ) - - for action in target_dict.get("actions", []): - files.extend(action.get("inputs", [])) - - if not skip_excluded_files: - files.extend(action.get("inputs_excluded", [])) - - # Remove files starting with $. These are mostly intermediate files for the - # build system. - files = [file for file in files if not file.startswith("$")] - - # Make sources relative to root build file. - relative_path = os.path.dirname(main_gyp) - sources += [ - os.path.relpath(os.path.join(base, file), relative_path) for file in files - ] - - sources_target["sources"] = sorted(set(sources)) - - # Put sources_to_index in it's own gyp. - sources_gyp = os.path.join(os.path.dirname(main_gyp), sources_target_name + ".gyp") - fully_qualified_target_name = f"{sources_gyp}:{sources_target_name}#target" - - # Add to new_target_list, new_target_dicts and new_data. - new_target_list.append(fully_qualified_target_name) - new_target_dicts[fully_qualified_target_name] = sources_target - new_data_target = {} - new_data_target["target_name"] = sources_target["target_name"] - new_data_target["_DEPTH"] = depth - new_data_target["toolset"] = "target" - new_data[sources_gyp] = {} - new_data[sources_gyp]["targets"] = [] - new_data[sources_gyp]["included_files"] = [] - new_data[sources_gyp]["xcode_settings"] = data[orig_gyp].get("xcode_settings", {}) - new_data[sources_gyp]["targets"].append(new_data_target) - - # Write workspace to file. - _WriteWorkspace(main_gyp, sources_gyp, params) - return (new_target_list, new_target_dicts, new_data) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py deleted file mode 100644 index 076eea3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +++ /dev/null @@ -1,3197 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Xcode project file generator. - -This module is both an Xcode project file generator and a documentation of the -Xcode project file format. Knowledge of the project file format was gained -based on extensive experience with Xcode, and by making changes to projects in -Xcode.app and observing the resultant changes in the associated project files. - -XCODE PROJECT FILES - -The generator targets the file format as written by Xcode 3.2 (specifically, -3.2.6), but past experience has taught that the format has not changed -significantly in the past several years, and future versions of Xcode are able -to read older project files. - -Xcode project files are "bundled": the project "file" from an end-user's -perspective is actually a directory with an ".xcodeproj" extension. The -project file from this module's perspective is actually a file inside this -directory, always named "project.pbxproj". This file contains a complete -description of the project and is all that is needed to use the xcodeproj. -Other files contained in the xcodeproj directory are simply used to store -per-user settings, such as the state of various UI elements in the Xcode -application. - -The project.pbxproj file is a property list, stored in a format almost -identical to the NeXTstep property list format. The file is able to carry -Unicode data, and is encoded in UTF-8. The root element in the property list -is a dictionary that contains several properties of minimal interest, and two -properties of immense interest. The most important property is a dictionary -named "objects". The entire structure of the project is represented by the -children of this property. The objects dictionary is keyed by unique 96-bit -values represented by 24 uppercase hexadecimal characters. Each value in the -objects dictionary is itself a dictionary, describing an individual object. - -Each object in the dictionary is a member of a class, which is identified by -the "isa" property of each object. A variety of classes are represented in a -project file. Objects can refer to other objects by ID, using the 24-character -hexadecimal object key. A project's objects form a tree, with a root object -of class PBXProject at the root. As an example, the PBXProject object serves -as parent to an XCConfigurationList object defining the build configurations -used in the project, a PBXGroup object serving as a container for all files -referenced in the project, and a list of target objects, each of which defines -a target in the project. There are several different types of target object, -such as PBXNativeTarget and PBXAggregateTarget. In this module, this -relationship is expressed by having each target type derive from an abstract -base named XCTarget. - -The project.pbxproj file's root dictionary also contains a property, sibling to -the "objects" dictionary, named "rootObject". The value of rootObject is a -24-character object key referring to the root PBXProject object in the -objects dictionary. - -In Xcode, every file used as input to a target or produced as a final product -of a target must appear somewhere in the hierarchy rooted at the PBXGroup -object referenced by the PBXProject's mainGroup property. A PBXGroup is -generally represented as a folder in the Xcode application. PBXGroups can -contain other PBXGroups as well as PBXFileReferences, which are pointers to -actual files. - -Each XCTarget contains a list of build phases, represented in this module by -the abstract base XCBuildPhase. Examples of concrete XCBuildPhase derivations -are PBXSourcesBuildPhase and PBXFrameworksBuildPhase, which correspond to the -"Compile Sources" and "Link Binary With Libraries" phases displayed in the -Xcode application. Files used as input to these phases (for example, source -files in the former case and libraries and frameworks in the latter) are -represented by PBXBuildFile objects, referenced by elements of "files" lists -in XCTarget objects. Each PBXBuildFile object refers to a PBXBuildFile -object as a "weak" reference: it does not "own" the PBXBuildFile, which is -owned by the root object's mainGroup or a descendant group. In most cases, the -layer of indirection between an XCBuildPhase and a PBXFileReference via a -PBXBuildFile appears extraneous, but there's actually one reason for this: -file-specific compiler flags are added to the PBXBuildFile object so as to -allow a single file to be a member of multiple targets while having distinct -compiler flags for each. These flags can be modified in the Xcode applciation -in the "Build" tab of a File Info window. - -When a project is open in the Xcode application, Xcode will rewrite it. As -such, this module is careful to adhere to the formatting used by Xcode, to -avoid insignificant changes appearing in the file when it is used in the -Xcode application. This will keep version control repositories happy, and -makes it possible to compare a project file used in Xcode to one generated by -this module to determine if any significant changes were made in the -application. - -Xcode has its own way of assigning 24-character identifiers to each object, -which is not duplicated here. Because the identifier only is only generated -once, when an object is created, and is then left unchanged, there is no need -to attempt to duplicate Xcode's behavior in this area. The generator is free -to select any identifier, even at random, to refer to the objects it creates, -and Xcode will retain those identifiers and use them when subsequently -rewriting the project file. However, the generator would choose new random -identifiers each time the project files are generated, leading to difficulties -comparing "used" project files to "pristine" ones produced by this module, -and causing the appearance of changes as every object identifier is changed -when updated projects are checked in to a version control repository. To -mitigate this problem, this module chooses identifiers in a more deterministic -way, by hashing a description of each object as well as its parent and ancestor -objects. This strategy should result in minimal "shift" in IDs as successive -generations of project files are produced. - -THIS MODULE - -This module introduces several classes, all derived from the XCObject class. -Nearly all of the "brains" are built into the XCObject class, which understands -how to create and modify objects, maintain the proper tree structure, compute -identifiers, and print objects. For the most part, classes derived from -XCObject need only provide a _schema class object, a dictionary that -expresses what properties objects of the class may contain. - -Given this structure, it's possible to build a minimal project file by creating -objects of the appropriate types and making the proper connections: - - config_list = XCConfigurationList() - group = PBXGroup() - project = PBXProject({'buildConfigurationList': config_list, - 'mainGroup': group}) - -With the project object set up, it can be added to an XCProjectFile object. -XCProjectFile is a pseudo-class in the sense that it is a concrete XCObject -subclass that does not actually correspond to a class type found in a project -file. Rather, it is used to represent the project file's root dictionary. -Printing an XCProjectFile will print the entire project file, including the -full "objects" dictionary. - - project_file = XCProjectFile({'rootObject': project}) - project_file.ComputeIDs() - project_file.Print() - -Xcode project files are always encoded in UTF-8. This module will accept -strings of either the str class or the unicode class. Strings of class str -are assumed to already be encoded in UTF-8. Obviously, if you're just using -ASCII, you won't encounter difficulties because ASCII is a UTF-8 subset. -Strings of class unicode are handled properly and encoded in UTF-8 when -a project file is output. -""" - -import gyp.common -from functools import cmp_to_key -import hashlib -from operator import attrgetter -import posixpath -import re -import struct -import sys - - -def cmp(x, y): - return (x > y) - (x < y) - - -# See XCObject._EncodeString. This pattern is used to determine when a string -# can be printed unquoted. Strings that match this pattern may be printed -# unquoted. Strings that do not match must be quoted and may be further -# transformed to be properly encoded. Note that this expression matches the -# characters listed with "+", for 1 or more occurrences: if a string is empty, -# it must not match this pattern, because it needs to be encoded as "". -_unquoted = re.compile("^[A-Za-z0-9$./_]+$") - -# Strings that match this pattern are quoted regardless of what _unquoted says. -# Oddly, Xcode will quote any string with a run of three or more underscores. -_quoted = re.compile("___") - -# This pattern should match any character that needs to be escaped by -# XCObject._EncodeString. See that function. -_escaped = re.compile('[\\\\"]|[\x00-\x1f]') - - -# Used by SourceTreeAndPathFromPath -_path_leading_variable = re.compile(r"^\$\((.*?)\)(/(.*))?$") - - -def SourceTreeAndPathFromPath(input_path): - """Given input_path, returns a tuple with sourceTree and path values. - - Examples: - input_path (source_tree, output_path) - '$(VAR)/path' ('VAR', 'path') - '$(VAR)' ('VAR', None) - 'path' (None, 'path') - """ - - source_group_match = _path_leading_variable.match(input_path) - if source_group_match: - source_tree = source_group_match.group(1) - output_path = source_group_match.group(3) # This may be None. - else: - source_tree = None - output_path = input_path - - return (source_tree, output_path) - - -def ConvertVariablesToShellSyntax(input_string): - return re.sub(r"\$\((.*?)\)", "${\\1}", input_string) - - -class XCObject: - """The abstract base of all class types used in Xcode project files. - - Class variables: - _schema: A dictionary defining the properties of this class. The keys to - _schema are string property keys as used in project files. Values - are a list of four or five elements: - [ is_list, property_type, is_strong, is_required, default ] - is_list: True if the property described is a list, as opposed - to a single element. - property_type: The type to use as the value of the property, - or if is_list is True, the type to use for each - element of the value's list. property_type must - be an XCObject subclass, or one of the built-in - types str, int, or dict. - is_strong: If property_type is an XCObject subclass, is_strong - is True to assert that this class "owns," or serves - as parent, to the property value (or, if is_list is - True, values). is_strong must be False if - property_type is not an XCObject subclass. - is_required: True if the property is required for the class. - Note that is_required being True does not preclude - an empty string ("", in the case of property_type - str) or list ([], in the case of is_list True) from - being set for the property. - default: Optional. If is_required is True, default may be set - to provide a default value for objects that do not supply - their own value. If is_required is True and default - is not provided, users of the class must supply their own - value for the property. - Note that although the values of the array are expressed in - boolean terms, subclasses provide values as integers to conserve - horizontal space. - _should_print_single_line: False in XCObject. Subclasses whose objects - should be written to the project file in the - alternate single-line format, such as - PBXFileReference and PBXBuildFile, should - set this to True. - _encode_transforms: Used by _EncodeString to encode unprintable characters. - The index into this list is the ordinal of the - character to transform; each value is a string - used to represent the character in the output. XCObject - provides an _encode_transforms list suitable for most - XCObject subclasses. - _alternate_encode_transforms: Provided for subclasses that wish to use - the alternate encoding rules. Xcode seems - to use these rules when printing objects in - single-line format. Subclasses that desire - this behavior should set _encode_transforms - to _alternate_encode_transforms. - _hashables: A list of XCObject subclasses that can be hashed by ComputeIDs - to construct this object's ID. Most classes that need custom - hashing behavior should do it by overriding Hashables, - but in some cases an object's parent may wish to push a - hashable value into its child, and it can do so by appending - to _hashables. - Attributes: - id: The object's identifier, a 24-character uppercase hexadecimal string. - Usually, objects being created should not set id until the entire - project file structure is built. At that point, UpdateIDs() should - be called on the root object to assign deterministic values for id to - each object in the tree. - parent: The object's parent. This is set by a parent XCObject when a child - object is added to it. - _properties: The object's property dictionary. An object's properties are - described by its class' _schema variable. - """ - - _schema = {} - _should_print_single_line = False - - # See _EncodeString. - _encode_transforms = [] - i = 0 - while i < ord(" "): - _encode_transforms.append("\\U%04x" % i) - i = i + 1 - _encode_transforms[7] = "\\a" - _encode_transforms[8] = "\\b" - _encode_transforms[9] = "\\t" - _encode_transforms[10] = "\\n" - _encode_transforms[11] = "\\v" - _encode_transforms[12] = "\\f" - _encode_transforms[13] = "\\n" - - _alternate_encode_transforms = list(_encode_transforms) - _alternate_encode_transforms[9] = chr(9) - _alternate_encode_transforms[10] = chr(10) - _alternate_encode_transforms[11] = chr(11) - - def __init__(self, properties=None, id=None, parent=None): - self.id = id - self.parent = parent - self._properties = {} - self._hashables = [] - self._SetDefaultsFromSchema() - self.UpdateProperties(properties) - - def __repr__(self): - try: - name = self.Name() - except NotImplementedError: - return f"<{self.__class__.__name__} at 0x{id(self):x}>" - return f"<{self.__class__.__name__} {name!r} at 0x{id(self):x}>" - - def Copy(self): - """Make a copy of this object. - - The new object will have its own copy of lists and dicts. Any XCObject - objects owned by this object (marked "strong") will be copied in the - new object, even those found in lists. If this object has any weak - references to other XCObjects, the same references are added to the new - object without making a copy. - """ - - that = self.__class__(id=self.id, parent=self.parent) - for key, value in self._properties.items(): - is_strong = self._schema[key][2] - - if isinstance(value, XCObject): - if is_strong: - new_value = value.Copy() - new_value.parent = that - that._properties[key] = new_value - else: - that._properties[key] = value - elif isinstance(value, (str, int)): - that._properties[key] = value - elif isinstance(value, list): - if is_strong: - # If is_strong is True, each element is an XCObject, so it's safe to - # call Copy. - that._properties[key] = [] - for item in value: - new_item = item.Copy() - new_item.parent = that - that._properties[key].append(new_item) - else: - that._properties[key] = value[:] - elif isinstance(value, dict): - # dicts are never strong. - if is_strong: - raise TypeError( - "Strong dict for key " + key + " in " + self.__class__.__name__ - ) - else: - that._properties[key] = value.copy() - else: - raise TypeError( - "Unexpected type " - + value.__class__.__name__ - + " for key " - + key - + " in " - + self.__class__.__name__ - ) - - return that - - def Name(self): - """Return the name corresponding to an object. - - Not all objects necessarily need to be nameable, and not all that do have - a "name" property. Override as needed. - """ - - # If the schema indicates that "name" is required, try to access the - # property even if it doesn't exist. This will result in a KeyError - # being raised for the property that should be present, which seems more - # appropriate than NotImplementedError in this case. - if "name" in self._properties or ( - "name" in self._schema and self._schema["name"][3] - ): - return self._properties["name"] - - raise NotImplementedError(self.__class__.__name__ + " must implement Name") - - def Comment(self): - """Return a comment string for the object. - - Most objects just use their name as the comment, but PBXProject uses - different values. - - The returned comment is not escaped and does not have any comment marker - strings applied to it. - """ - - return self.Name() - - def Hashables(self): - hashables = [self.__class__.__name__] - - name = self.Name() - if name is not None: - hashables.append(name) - - hashables.extend(self._hashables) - - return hashables - - def HashablesForChild(self): - return None - - def ComputeIDs(self, recursive=True, overwrite=True, seed_hash=None): - """Set "id" properties deterministically. - - An object's "id" property is set based on a hash of its class type and - name, as well as the class type and name of all ancestor objects. As - such, it is only advisable to call ComputeIDs once an entire project file - tree is built. - - If recursive is True, recurse into all descendant objects and update their - hashes. - - If overwrite is True, any existing value set in the "id" property will be - replaced. - """ - - def _HashUpdate(hash, data): - """Update hash with data's length and contents. - - If the hash were updated only with the value of data, it would be - possible for clowns to induce collisions by manipulating the names of - their objects. By adding the length, it's exceedingly less likely that - ID collisions will be encountered, intentionally or not. - """ - - hash.update(struct.pack(">i", len(data))) - if isinstance(data, str): - data = data.encode("utf-8") - hash.update(data) - - if seed_hash is None: - seed_hash = hashlib.sha1() - - hash = seed_hash.copy() - - hashables = self.Hashables() - assert len(hashables) > 0 - for hashable in hashables: - _HashUpdate(hash, hashable) - - if recursive: - hashables_for_child = self.HashablesForChild() - if hashables_for_child is None: - child_hash = hash - else: - assert len(hashables_for_child) > 0 - child_hash = seed_hash.copy() - for hashable in hashables_for_child: - _HashUpdate(child_hash, hashable) - - for child in self.Children(): - child.ComputeIDs(recursive, overwrite, child_hash) - - if overwrite or self.id is None: - # Xcode IDs are only 96 bits (24 hex characters), but a SHA-1 digest is - # is 160 bits. Instead of throwing out 64 bits of the digest, xor them - # into the portion that gets used. - assert hash.digest_size % 4 == 0 - digest_int_count = hash.digest_size // 4 - digest_ints = struct.unpack(">" + "I" * digest_int_count, hash.digest()) - id_ints = [0, 0, 0] - for index in range(0, digest_int_count): - id_ints[index % 3] ^= digest_ints[index] - self.id = "%08X%08X%08X" % tuple(id_ints) - - def EnsureNoIDCollisions(self): - """Verifies that no two objects have the same ID. Checks all descendants. - """ - - ids = {} - descendants = self.Descendants() - for descendant in descendants: - if descendant.id in ids: - other = ids[descendant.id] - raise KeyError( - 'Duplicate ID %s, objects "%s" and "%s" in "%s"' - % ( - descendant.id, - str(descendant._properties), - str(other._properties), - self._properties["rootObject"].Name(), - ) - ) - ids[descendant.id] = descendant - - def Children(self): - """Returns a list of all of this object's owned (strong) children.""" - - children = [] - for property, attributes in self._schema.items(): - (is_list, property_type, is_strong) = attributes[0:3] - if is_strong and property in self._properties: - if not is_list: - children.append(self._properties[property]) - else: - children.extend(self._properties[property]) - return children - - def Descendants(self): - """Returns a list of all of this object's descendants, including this - object. - """ - - children = self.Children() - descendants = [self] - for child in children: - descendants.extend(child.Descendants()) - return descendants - - def PBXProjectAncestor(self): - # The base case for recursion is defined at PBXProject.PBXProjectAncestor. - if self.parent: - return self.parent.PBXProjectAncestor() - return None - - def _EncodeComment(self, comment): - """Encodes a comment to be placed in the project file output, mimicking - Xcode behavior. - """ - - # This mimics Xcode behavior by wrapping the comment in "/*" and "*/". If - # the string already contains a "*/", it is turned into "(*)/". This keeps - # the file writer from outputting something that would be treated as the - # end of a comment in the middle of something intended to be entirely a - # comment. - - return "/* " + comment.replace("*/", "(*)/") + " */" - - def _EncodeTransform(self, match): - # This function works closely with _EncodeString. It will only be called - # by re.sub with match.group(0) containing a character matched by the - # the _escaped expression. - char = match.group(0) - - # Backslashes (\) and quotation marks (") are always replaced with a - # backslash-escaped version of the same. Everything else gets its - # replacement from the class' _encode_transforms array. - if char == "\\": - return "\\\\" - if char == '"': - return '\\"' - return self._encode_transforms[ord(char)] - - def _EncodeString(self, value): - """Encodes a string to be placed in the project file output, mimicking - Xcode behavior. - """ - - # Use quotation marks when any character outside of the range A-Z, a-z, 0-9, - # $ (dollar sign), . (period), and _ (underscore) is present. Also use - # quotation marks to represent empty strings. - # - # Escape " (double-quote) and \ (backslash) by preceding them with a - # backslash. - # - # Some characters below the printable ASCII range are encoded specially: - # 7 ^G BEL is encoded as "\a" - # 8 ^H BS is encoded as "\b" - # 11 ^K VT is encoded as "\v" - # 12 ^L NP is encoded as "\f" - # 127 ^? DEL is passed through as-is without escaping - # - In PBXFileReference and PBXBuildFile objects: - # 9 ^I HT is passed through as-is without escaping - # 10 ^J NL is passed through as-is without escaping - # 13 ^M CR is passed through as-is without escaping - # - In other objects: - # 9 ^I HT is encoded as "\t" - # 10 ^J NL is encoded as "\n" - # 13 ^M CR is encoded as "\n" rendering it indistinguishable from - # 10 ^J NL - # All other characters within the ASCII control character range (0 through - # 31 inclusive) are encoded as "\U001f" referring to the Unicode code point - # in hexadecimal. For example, character 14 (^N SO) is encoded as "\U000e". - # Characters above the ASCII range are passed through to the output encoded - # as UTF-8 without any escaping. These mappings are contained in the - # class' _encode_transforms list. - - if _unquoted.search(value) and not _quoted.search(value): - return value - - return '"' + _escaped.sub(self._EncodeTransform, value) + '"' - - def _XCPrint(self, file, tabs, line): - file.write("\t" * tabs + line) - - def _XCPrintableValue(self, tabs, value, flatten_list=False): - """Returns a representation of value that may be printed in a project file, - mimicking Xcode's behavior. - - _XCPrintableValue can handle str and int values, XCObjects (which are - made printable by returning their id property), and list and dict objects - composed of any of the above types. When printing a list or dict, and - _should_print_single_line is False, the tabs parameter is used to determine - how much to indent the lines corresponding to the items in the list or - dict. - - If flatten_list is True, single-element lists will be transformed into - strings. - """ - - printable = "" - comment = None - - if self._should_print_single_line: - sep = " " - element_tabs = "" - end_tabs = "" - else: - sep = "\n" - element_tabs = "\t" * (tabs + 1) - end_tabs = "\t" * tabs - - if isinstance(value, XCObject): - printable += value.id - comment = value.Comment() - elif isinstance(value, str): - printable += self._EncodeString(value) - elif isinstance(value, str): - printable += self._EncodeString(value.encode("utf-8")) - elif isinstance(value, int): - printable += str(value) - elif isinstance(value, list): - if flatten_list and len(value) <= 1: - if len(value) == 0: - printable += self._EncodeString("") - else: - printable += self._EncodeString(value[0]) - else: - printable = "(" + sep - for item in value: - printable += ( - element_tabs - + self._XCPrintableValue(tabs + 1, item, flatten_list) - + "," - + sep - ) - printable += end_tabs + ")" - elif isinstance(value, dict): - printable = "{" + sep - for item_key, item_value in sorted(value.items()): - printable += ( - element_tabs - + self._XCPrintableValue(tabs + 1, item_key, flatten_list) - + " = " - + self._XCPrintableValue(tabs + 1, item_value, flatten_list) - + ";" - + sep - ) - printable += end_tabs + "}" - else: - raise TypeError("Can't make " + value.__class__.__name__ + " printable") - - if comment: - printable += " " + self._EncodeComment(comment) - - return printable - - def _XCKVPrint(self, file, tabs, key, value): - """Prints a key and value, members of an XCObject's _properties dictionary, - to file. - - tabs is an int identifying the indentation level. If the class' - _should_print_single_line variable is True, tabs is ignored and the - key-value pair will be followed by a space insead of a newline. - """ - - if self._should_print_single_line: - printable = "" - after_kv = " " - else: - printable = "\t" * tabs - after_kv = "\n" - - # Xcode usually prints remoteGlobalIDString values in PBXContainerItemProxy - # objects without comments. Sometimes it prints them with comments, but - # the majority of the time, it doesn't. To avoid unnecessary changes to - # the project file after Xcode opens it, don't write comments for - # remoteGlobalIDString. This is a sucky hack and it would certainly be - # cleaner to extend the schema to indicate whether or not a comment should - # be printed, but since this is the only case where the problem occurs and - # Xcode itself can't seem to make up its mind, the hack will suffice. - # - # Also see PBXContainerItemProxy._schema['remoteGlobalIDString']. - if key == "remoteGlobalIDString" and isinstance(self, PBXContainerItemProxy): - value_to_print = value.id - else: - value_to_print = value - - # PBXBuildFile's settings property is represented in the output as a dict, - # but a hack here has it represented as a string. Arrange to strip off the - # quotes so that it shows up in the output as expected. - if key == "settings" and isinstance(self, PBXBuildFile): - strip_value_quotes = True - else: - strip_value_quotes = False - - # In another one-off, let's set flatten_list on buildSettings properties - # of XCBuildConfiguration objects, because that's how Xcode treats them. - if key == "buildSettings" and isinstance(self, XCBuildConfiguration): - flatten_list = True - else: - flatten_list = False - - try: - printable_key = self._XCPrintableValue(tabs, key, flatten_list) - printable_value = self._XCPrintableValue(tabs, value_to_print, flatten_list) - if ( - strip_value_quotes - and len(printable_value) > 1 - and printable_value[0] == '"' - and printable_value[-1] == '"' - ): - printable_value = printable_value[1:-1] - printable += printable_key + " = " + printable_value + ";" + after_kv - except TypeError as e: - gyp.common.ExceptionAppend(e, 'while printing key "%s"' % key) - raise - - self._XCPrint(file, 0, printable) - - def Print(self, file=sys.stdout): - """Prints a reprentation of this object to file, adhering to Xcode output - formatting. - """ - - self.VerifyHasRequiredProperties() - - if self._should_print_single_line: - # When printing an object in a single line, Xcode doesn't put any space - # between the beginning of a dictionary (or presumably a list) and the - # first contained item, so you wind up with snippets like - # ...CDEF = {isa = PBXFileReference; fileRef = 0123... - # If it were me, I would have put a space in there after the opening - # curly, but I guess this is just another one of those inconsistencies - # between how Xcode prints PBXFileReference and PBXBuildFile objects as - # compared to other objects. Mimic Xcode's behavior here by using an - # empty string for sep. - sep = "" - end_tabs = 0 - else: - sep = "\n" - end_tabs = 2 - - # Start the object. For example, '\t\tPBXProject = {\n'. - self._XCPrint(file, 2, self._XCPrintableValue(2, self) + " = {" + sep) - - # "isa" isn't in the _properties dictionary, it's an intrinsic property - # of the class which the object belongs to. Xcode always outputs "isa" - # as the first element of an object dictionary. - self._XCKVPrint(file, 3, "isa", self.__class__.__name__) - - # The remaining elements of an object dictionary are sorted alphabetically. - for property, value in sorted(self._properties.items()): - self._XCKVPrint(file, 3, property, value) - - # End the object. - self._XCPrint(file, end_tabs, "};\n") - - def UpdateProperties(self, properties, do_copy=False): - """Merge the supplied properties into the _properties dictionary. - - The input properties must adhere to the class schema or a KeyError or - TypeError exception will be raised. If adding an object of an XCObject - subclass and the schema indicates a strong relationship, the object's - parent will be set to this object. - - If do_copy is True, then lists, dicts, strong-owned XCObjects, and - strong-owned XCObjects in lists will be copied instead of having their - references added. - """ - - if properties is None: - return - - for property, value in properties.items(): - # Make sure the property is in the schema. - if property not in self._schema: - raise KeyError(property + " not in " + self.__class__.__name__) - - # Make sure the property conforms to the schema. - (is_list, property_type, is_strong) = self._schema[property][0:3] - if is_list: - if value.__class__ != list: - raise TypeError( - property - + " of " - + self.__class__.__name__ - + " must be list, not " - + value.__class__.__name__ - ) - for item in value: - if not isinstance(item, property_type) and not ( - isinstance(item, str) and property_type == str - ): - # Accept unicode where str is specified. str is treated as - # UTF-8-encoded. - raise TypeError( - "item of " - + property - + " of " - + self.__class__.__name__ - + " must be " - + property_type.__name__ - + ", not " - + item.__class__.__name__ - ) - elif not isinstance(value, property_type) and not ( - isinstance(value, str) and property_type == str - ): - # Accept unicode where str is specified. str is treated as - # UTF-8-encoded. - raise TypeError( - property - + " of " - + self.__class__.__name__ - + " must be " - + property_type.__name__ - + ", not " - + value.__class__.__name__ - ) - - # Checks passed, perform the assignment. - if do_copy: - if isinstance(value, XCObject): - if is_strong: - self._properties[property] = value.Copy() - else: - self._properties[property] = value - elif isinstance(value, (str, int)): - self._properties[property] = value - elif isinstance(value, list): - if is_strong: - # If is_strong is True, each element is an XCObject, - # so it's safe to call Copy. - self._properties[property] = [] - for item in value: - self._properties[property].append(item.Copy()) - else: - self._properties[property] = value[:] - elif isinstance(value, dict): - self._properties[property] = value.copy() - else: - raise TypeError( - "Don't know how to copy a " - + value.__class__.__name__ - + " object for " - + property - + " in " - + self.__class__.__name__ - ) - else: - self._properties[property] = value - - # Set up the child's back-reference to this object. Don't use |value| - # any more because it may not be right if do_copy is true. - if is_strong: - if not is_list: - self._properties[property].parent = self - else: - for item in self._properties[property]: - item.parent = self - - def HasProperty(self, key): - return key in self._properties - - def GetProperty(self, key): - return self._properties[key] - - def SetProperty(self, key, value): - self.UpdateProperties({key: value}) - - def DelProperty(self, key): - if key in self._properties: - del self._properties[key] - - def AppendProperty(self, key, value): - # TODO(mark): Support ExtendProperty too (and make this call that)? - - # Schema validation. - if key not in self._schema: - raise KeyError(key + " not in " + self.__class__.__name__) - - (is_list, property_type, is_strong) = self._schema[key][0:3] - if not is_list: - raise TypeError(key + " of " + self.__class__.__name__ + " must be list") - if not isinstance(value, property_type): - raise TypeError( - "item of " - + key - + " of " - + self.__class__.__name__ - + " must be " - + property_type.__name__ - + ", not " - + value.__class__.__name__ - ) - - # If the property doesn't exist yet, create a new empty list to receive the - # item. - self._properties[key] = self._properties.get(key, []) - - # Set up the ownership link. - if is_strong: - value.parent = self - - # Store the item. - self._properties[key].append(value) - - def VerifyHasRequiredProperties(self): - """Ensure that all properties identified as required by the schema are - set. - """ - - # TODO(mark): A stronger verification mechanism is needed. Some - # subclasses need to perform validation beyond what the schema can enforce. - for property, attributes in self._schema.items(): - (is_list, property_type, is_strong, is_required) = attributes[0:4] - if is_required and property not in self._properties: - raise KeyError(self.__class__.__name__ + " requires " + property) - - def _SetDefaultsFromSchema(self): - """Assign object default values according to the schema. This will not - overwrite properties that have already been set.""" - - defaults = {} - for property, attributes in self._schema.items(): - (is_list, property_type, is_strong, is_required) = attributes[0:4] - if ( - is_required - and len(attributes) >= 5 - and property not in self._properties - ): - default = attributes[4] - - defaults[property] = default - - if len(defaults) > 0: - # Use do_copy=True so that each new object gets its own copy of strong - # objects, lists, and dicts. - self.UpdateProperties(defaults, do_copy=True) - - -class XCHierarchicalElement(XCObject): - """Abstract base for PBXGroup and PBXFileReference. Not represented in a - project file.""" - - # TODO(mark): Do name and path belong here? Probably so. - # If path is set and name is not, name may have a default value. Name will - # be set to the basename of path, if the basename of path is different from - # the full value of path. If path is already just a leaf name, name will - # not be set. - _schema = XCObject._schema.copy() - _schema.update( - { - "comments": [0, str, 0, 0], - "fileEncoding": [0, str, 0, 0], - "includeInIndex": [0, int, 0, 0], - "indentWidth": [0, int, 0, 0], - "lineEnding": [0, int, 0, 0], - "sourceTree": [0, str, 0, 1, ""], - "tabWidth": [0, int, 0, 0], - "usesTabs": [0, int, 0, 0], - "wrapsLines": [0, int, 0, 0], - } - ) - - def __init__(self, properties=None, id=None, parent=None): - # super - XCObject.__init__(self, properties, id, parent) - if "path" in self._properties and "name" not in self._properties: - path = self._properties["path"] - name = posixpath.basename(path) - if name != "" and path != name: - self.SetProperty("name", name) - - if "path" in self._properties and ( - "sourceTree" not in self._properties - or self._properties["sourceTree"] == "" - ): - # If the pathname begins with an Xcode variable like "$(SDKROOT)/", take - # the variable out and make the path be relative to that variable by - # assigning the variable name as the sourceTree. - (source_tree, path) = SourceTreeAndPathFromPath(self._properties["path"]) - if source_tree is not None: - self._properties["sourceTree"] = source_tree - if path is not None: - self._properties["path"] = path - if ( - source_tree is not None - and path is None - and "name" not in self._properties - ): - # The path was of the form "$(SDKROOT)" with no path following it. - # This object is now relative to that variable, so it has no path - # attribute of its own. It does, however, keep a name. - del self._properties["path"] - self._properties["name"] = source_tree - - def Name(self): - if "name" in self._properties: - return self._properties["name"] - elif "path" in self._properties: - return self._properties["path"] - else: - # This happens in the case of the root PBXGroup. - return None - - def Hashables(self): - """Custom hashables for XCHierarchicalElements. - - XCHierarchicalElements are special. Generally, their hashes shouldn't - change if the paths don't change. The normal XCObject implementation of - Hashables adds a hashable for each object, which means that if - the hierarchical structure changes (possibly due to changes caused when - TakeOverOnlyChild runs and encounters slight changes in the hierarchy), - the hashes will change. For example, if a project file initially contains - a/b/f1 and a/b becomes collapsed into a/b, f1 will have a single parent - a/b. If someone later adds a/f2 to the project file, a/b can no longer be - collapsed, and f1 winds up with parent b and grandparent a. That would - be sufficient to change f1's hash. - - To counteract this problem, hashables for all XCHierarchicalElements except - for the main group (which has neither a name nor a path) are taken to be - just the set of path components. Because hashables are inherited from - parents, this provides assurance that a/b/f1 has the same set of hashables - whether its parent is b or a/b. - - The main group is a special case. As it is permitted to have no name or - path, it is permitted to use the standard XCObject hash mechanism. This - is not considered a problem because there can be only one main group. - """ - - if self == self.PBXProjectAncestor()._properties["mainGroup"]: - # super - return XCObject.Hashables(self) - - hashables = [] - - # Put the name in first, ensuring that if TakeOverOnlyChild collapses - # children into a top-level group like "Source", the name always goes - # into the list of hashables without interfering with path components. - if "name" in self._properties: - # Make it less likely for people to manipulate hashes by following the - # pattern of always pushing an object type value onto the list first. - hashables.append(self.__class__.__name__ + ".name") - hashables.append(self._properties["name"]) - - # NOTE: This still has the problem that if an absolute path is encountered, - # including paths with a sourceTree, they'll still inherit their parents' - # hashables, even though the paths aren't relative to their parents. This - # is not expected to be much of a problem in practice. - path = self.PathFromSourceTreeAndPath() - if path is not None: - components = path.split(posixpath.sep) - for component in components: - hashables.append(self.__class__.__name__ + ".path") - hashables.append(component) - - hashables.extend(self._hashables) - - return hashables - - def Compare(self, other): - # Allow comparison of these types. PBXGroup has the highest sort rank; - # PBXVariantGroup is treated as equal to PBXFileReference. - valid_class_types = { - PBXFileReference: "file", - PBXGroup: "group", - PBXVariantGroup: "file", - } - self_type = valid_class_types[self.__class__] - other_type = valid_class_types[other.__class__] - - if self_type == other_type: - # If the two objects are of the same sort rank, compare their names. - return cmp(self.Name(), other.Name()) - - # Otherwise, sort groups before everything else. - if self_type == "group": - return -1 - return 1 - - def CompareRootGroup(self, other): - # This function should be used only to compare direct children of the - # containing PBXProject's mainGroup. These groups should appear in the - # listed order. - # TODO(mark): "Build" is used by gyp.generator.xcode, perhaps the - # generator should have a way of influencing this list rather than having - # to hardcode for the generator here. - order = [ - "Source", - "Intermediates", - "Projects", - "Frameworks", - "Products", - "Build", - ] - - # If the groups aren't in the listed order, do a name comparison. - # Otherwise, groups in the listed order should come before those that - # aren't. - self_name = self.Name() - other_name = other.Name() - self_in = isinstance(self, PBXGroup) and self_name in order - other_in = isinstance(self, PBXGroup) and other_name in order - if not self_in and not other_in: - return self.Compare(other) - if self_name in order and other_name not in order: - return -1 - if other_name in order and self_name not in order: - return 1 - - # If both groups are in the listed order, go by the defined order. - self_index = order.index(self_name) - other_index = order.index(other_name) - if self_index < other_index: - return -1 - if self_index > other_index: - return 1 - return 0 - - def PathFromSourceTreeAndPath(self): - # Turn the object's sourceTree and path properties into a single flat - # string of a form comparable to the path parameter. If there's a - # sourceTree property other than "", wrap it in $(...) for the - # comparison. - components = [] - if self._properties["sourceTree"] != "": - components.append("$(" + self._properties["sourceTree"] + ")") - if "path" in self._properties: - components.append(self._properties["path"]) - - if len(components) > 0: - return posixpath.join(*components) - - return None - - def FullPath(self): - # Returns a full path to self relative to the project file, or relative - # to some other source tree. Start with self, and walk up the chain of - # parents prepending their paths, if any, until no more parents are - # available (project-relative path) or until a path relative to some - # source tree is found. - xche = self - path = None - while isinstance(xche, XCHierarchicalElement) and ( - path is None or (not path.startswith("/") and not path.startswith("$")) - ): - this_path = xche.PathFromSourceTreeAndPath() - if this_path is not None and path is not None: - path = posixpath.join(this_path, path) - elif this_path is not None: - path = this_path - xche = xche.parent - - return path - - -class PBXGroup(XCHierarchicalElement): - """ - Attributes: - _children_by_path: Maps pathnames of children of this PBXGroup to the - actual child XCHierarchicalElement objects. - _variant_children_by_name_and_path: Maps (name, path) tuples of - PBXVariantGroup children to the actual child PBXVariantGroup objects. - """ - - _schema = XCHierarchicalElement._schema.copy() - _schema.update( - { - "children": [1, XCHierarchicalElement, 1, 1, []], - "name": [0, str, 0, 0], - "path": [0, str, 0, 0], - } - ) - - def __init__(self, properties=None, id=None, parent=None): - # super - XCHierarchicalElement.__init__(self, properties, id, parent) - self._children_by_path = {} - self._variant_children_by_name_and_path = {} - for child in self._properties.get("children", []): - self._AddChildToDicts(child) - - def Hashables(self): - # super - hashables = XCHierarchicalElement.Hashables(self) - - # It is not sufficient to just rely on name and parent to build a unique - # hashable : a node could have two child PBXGroup sharing a common name. - # To add entropy the hashable is enhanced with the names of all its - # children. - for child in self._properties.get("children", []): - child_name = child.Name() - if child_name is not None: - hashables.append(child_name) - - return hashables - - def HashablesForChild(self): - # To avoid a circular reference the hashables used to compute a child id do - # not include the child names. - return XCHierarchicalElement.Hashables(self) - - def _AddChildToDicts(self, child): - # Sets up this PBXGroup object's dicts to reference the child properly. - child_path = child.PathFromSourceTreeAndPath() - if child_path: - if child_path in self._children_by_path: - raise ValueError("Found multiple children with path " + child_path) - self._children_by_path[child_path] = child - - if isinstance(child, PBXVariantGroup): - child_name = child._properties.get("name", None) - key = (child_name, child_path) - if key in self._variant_children_by_name_and_path: - raise ValueError( - "Found multiple PBXVariantGroup children with " - + "name " - + str(child_name) - + " and path " - + str(child_path) - ) - self._variant_children_by_name_and_path[key] = child - - def AppendChild(self, child): - # Callers should use this instead of calling - # AppendProperty('children', child) directly because this function - # maintains the group's dicts. - self.AppendProperty("children", child) - self._AddChildToDicts(child) - - def GetChildByName(self, name): - # This is not currently optimized with a dict as GetChildByPath is because - # it has few callers. Most callers probably want GetChildByPath. This - # function is only useful to get children that have names but no paths, - # which is rare. The children of the main group ("Source", "Products", - # etc.) is pretty much the only case where this likely to come up. - # - # TODO(mark): Maybe this should raise an error if more than one child is - # present with the same name. - if "children" not in self._properties: - return None - - for child in self._properties["children"]: - if child.Name() == name: - return child - - return None - - def GetChildByPath(self, path): - if not path: - return None - - if path in self._children_by_path: - return self._children_by_path[path] - - return None - - def GetChildByRemoteObject(self, remote_object): - # This method is a little bit esoteric. Given a remote_object, which - # should be a PBXFileReference in another project file, this method will - # return this group's PBXReferenceProxy object serving as a local proxy - # for the remote PBXFileReference. - # - # This function might benefit from a dict optimization as GetChildByPath - # for some workloads, but profiling shows that it's not currently a - # problem. - if "children" not in self._properties: - return None - - for child in self._properties["children"]: - if not isinstance(child, PBXReferenceProxy): - continue - - container_proxy = child._properties["remoteRef"] - if container_proxy._properties["remoteGlobalIDString"] == remote_object: - return child - - return None - - def AddOrGetFileByPath(self, path, hierarchical): - """Returns an existing or new file reference corresponding to path. - - If hierarchical is True, this method will create or use the necessary - hierarchical group structure corresponding to path. Otherwise, it will - look in and create an item in the current group only. - - If an existing matching reference is found, it is returned, otherwise, a - new one will be created, added to the correct group, and returned. - - If path identifies a directory by virtue of carrying a trailing slash, - this method returns a PBXFileReference of "folder" type. If path - identifies a variant, by virtue of it identifying a file inside a directory - with an ".lproj" extension, this method returns a PBXVariantGroup - containing the variant named by path, and possibly other variants. For - all other paths, a "normal" PBXFileReference will be returned. - """ - - # Adding or getting a directory? Directories end with a trailing slash. - is_dir = False - if path.endswith("/"): - is_dir = True - path = posixpath.normpath(path) - if is_dir: - path = path + "/" - - # Adding or getting a variant? Variants are files inside directories - # with an ".lproj" extension. Xcode uses variants for localization. For - # a variant path/to/Language.lproj/MainMenu.nib, put a variant group named - # MainMenu.nib inside path/to, and give it a variant named Language. In - # this example, grandparent would be set to path/to and parent_root would - # be set to Language. - variant_name = None - parent = posixpath.dirname(path) - grandparent = posixpath.dirname(parent) - parent_basename = posixpath.basename(parent) - (parent_root, parent_ext) = posixpath.splitext(parent_basename) - if parent_ext == ".lproj": - variant_name = parent_root - if grandparent == "": - grandparent = None - - # Putting a directory inside a variant group is not currently supported. - assert not is_dir or variant_name is None - - path_split = path.split(posixpath.sep) - if ( - len(path_split) == 1 - or ((is_dir or variant_name is not None) and len(path_split) == 2) - or not hierarchical - ): - # The PBXFileReference or PBXVariantGroup will be added to or gotten from - # this PBXGroup, no recursion necessary. - if variant_name is None: - # Add or get a PBXFileReference. - file_ref = self.GetChildByPath(path) - if file_ref is not None: - assert file_ref.__class__ == PBXFileReference - else: - file_ref = PBXFileReference({"path": path}) - self.AppendChild(file_ref) - else: - # Add or get a PBXVariantGroup. The variant group name is the same - # as the basename (MainMenu.nib in the example above). grandparent - # specifies the path to the variant group itself, and path_split[-2:] - # is the path of the specific variant relative to its group. - variant_group_name = posixpath.basename(path) - variant_group_ref = self.AddOrGetVariantGroupByNameAndPath( - variant_group_name, grandparent - ) - variant_path = posixpath.sep.join(path_split[-2:]) - variant_ref = variant_group_ref.GetChildByPath(variant_path) - if variant_ref is not None: - assert variant_ref.__class__ == PBXFileReference - else: - variant_ref = PBXFileReference( - {"name": variant_name, "path": variant_path} - ) - variant_group_ref.AppendChild(variant_ref) - # The caller is interested in the variant group, not the specific - # variant file. - file_ref = variant_group_ref - return file_ref - else: - # Hierarchical recursion. Add or get a PBXGroup corresponding to the - # outermost path component, and then recurse into it, chopping off that - # path component. - next_dir = path_split[0] - group_ref = self.GetChildByPath(next_dir) - if group_ref is not None: - assert group_ref.__class__ == PBXGroup - else: - group_ref = PBXGroup({"path": next_dir}) - self.AppendChild(group_ref) - return group_ref.AddOrGetFileByPath( - posixpath.sep.join(path_split[1:]), hierarchical - ) - - def AddOrGetVariantGroupByNameAndPath(self, name, path): - """Returns an existing or new PBXVariantGroup for name and path. - - If a PBXVariantGroup identified by the name and path arguments is already - present as a child of this object, it is returned. Otherwise, a new - PBXVariantGroup with the correct properties is created, added as a child, - and returned. - - This method will generally be called by AddOrGetFileByPath, which knows - when to create a variant group based on the structure of the pathnames - passed to it. - """ - - key = (name, path) - if key in self._variant_children_by_name_and_path: - variant_group_ref = self._variant_children_by_name_and_path[key] - assert variant_group_ref.__class__ == PBXVariantGroup - return variant_group_ref - - variant_group_properties = {"name": name} - if path is not None: - variant_group_properties["path"] = path - variant_group_ref = PBXVariantGroup(variant_group_properties) - self.AppendChild(variant_group_ref) - - return variant_group_ref - - def TakeOverOnlyChild(self, recurse=False): - """If this PBXGroup has only one child and it's also a PBXGroup, take - it over by making all of its children this object's children. - - This function will continue to take over only children when those children - are groups. If there are three PBXGroups representing a, b, and c, with - c inside b and b inside a, and a and b have no other children, this will - result in a taking over both b and c, forming a PBXGroup for a/b/c. - - If recurse is True, this function will recurse into children and ask them - to collapse themselves by taking over only children as well. Assuming - an example hierarchy with files at a/b/c/d1, a/b/c/d2, and a/b/c/d3/e/f - (d1, d2, and f are files, the rest are groups), recursion will result in - a group for a/b/c containing a group for d3/e. - """ - - # At this stage, check that child class types are PBXGroup exactly, - # instead of using isinstance. The only subclass of PBXGroup, - # PBXVariantGroup, should not participate in reparenting in the same way: - # reparenting by merging different object types would be wrong. - while ( - len(self._properties["children"]) == 1 - and self._properties["children"][0].__class__ == PBXGroup - ): - # Loop to take over the innermost only-child group possible. - - child = self._properties["children"][0] - - # Assume the child's properties, including its children. Save a copy - # of this object's old properties, because they'll still be needed. - # This object retains its existing id and parent attributes. - old_properties = self._properties - self._properties = child._properties - self._children_by_path = child._children_by_path - - if ( - "sourceTree" not in self._properties - or self._properties["sourceTree"] == "" - ): - # The child was relative to its parent. Fix up the path. Note that - # children with a sourceTree other than "" are not relative to - # their parents, so no path fix-up is needed in that case. - if "path" in old_properties: - if "path" in self._properties: - # Both the original parent and child have paths set. - self._properties["path"] = posixpath.join( - old_properties["path"], self._properties["path"] - ) - else: - # Only the original parent has a path, use it. - self._properties["path"] = old_properties["path"] - if "sourceTree" in old_properties: - # The original parent had a sourceTree set, use it. - self._properties["sourceTree"] = old_properties["sourceTree"] - - # If the original parent had a name set, keep using it. If the original - # parent didn't have a name but the child did, let the child's name - # live on. If the name attribute seems unnecessary now, get rid of it. - if "name" in old_properties and old_properties["name"] not in ( - None, - self.Name(), - ): - self._properties["name"] = old_properties["name"] - if ( - "name" in self._properties - and "path" in self._properties - and self._properties["name"] == self._properties["path"] - ): - del self._properties["name"] - - # Notify all children of their new parent. - for child in self._properties["children"]: - child.parent = self - - # If asked to recurse, recurse. - if recurse: - for child in self._properties["children"]: - if child.__class__ == PBXGroup: - child.TakeOverOnlyChild(recurse) - - def SortGroup(self): - self._properties["children"] = sorted( - self._properties["children"], key=cmp_to_key(lambda x, y: x.Compare(y)) - ) - - # Recurse. - for child in self._properties["children"]: - if isinstance(child, PBXGroup): - child.SortGroup() - - -class XCFileLikeElement(XCHierarchicalElement): - # Abstract base for objects that can be used as the fileRef property of - # PBXBuildFile. - - def PathHashables(self): - # A PBXBuildFile that refers to this object will call this method to - # obtain additional hashables specific to this XCFileLikeElement. Don't - # just use this object's hashables, they're not specific and unique enough - # on their own (without access to the parent hashables.) Instead, provide - # hashables that identify this object by path by getting its hashables as - # well as the hashables of ancestor XCHierarchicalElement objects. - - hashables = [] - xche = self - while isinstance(xche, XCHierarchicalElement): - xche_hashables = xche.Hashables() - for index, xche_hashable in enumerate(xche_hashables): - hashables.insert(index, xche_hashable) - xche = xche.parent - return hashables - - -class XCContainerPortal(XCObject): - # Abstract base for objects that can be used as the containerPortal property - # of PBXContainerItemProxy. - pass - - -class XCRemoteObject(XCObject): - # Abstract base for objects that can be used as the remoteGlobalIDString - # property of PBXContainerItemProxy. - pass - - -class PBXFileReference(XCFileLikeElement, XCContainerPortal, XCRemoteObject): - _schema = XCFileLikeElement._schema.copy() - _schema.update( - { - "explicitFileType": [0, str, 0, 0], - "lastKnownFileType": [0, str, 0, 0], - "name": [0, str, 0, 0], - "path": [0, str, 0, 1], - } - ) - - # Weird output rules for PBXFileReference. - _should_print_single_line = True - # super - _encode_transforms = XCFileLikeElement._alternate_encode_transforms - - def __init__(self, properties=None, id=None, parent=None): - # super - XCFileLikeElement.__init__(self, properties, id, parent) - if "path" in self._properties and self._properties["path"].endswith("/"): - self._properties["path"] = self._properties["path"][:-1] - is_dir = True - else: - is_dir = False - - if ( - "path" in self._properties - and "lastKnownFileType" not in self._properties - and "explicitFileType" not in self._properties - ): - # TODO(mark): This is the replacement for a replacement for a quick hack. - # It is no longer incredibly sucky, but this list needs to be extended. - extension_map = { - "a": "archive.ar", - "app": "wrapper.application", - "bdic": "file", - "bundle": "wrapper.cfbundle", - "c": "sourcecode.c.c", - "cc": "sourcecode.cpp.cpp", - "cpp": "sourcecode.cpp.cpp", - "css": "text.css", - "cxx": "sourcecode.cpp.cpp", - "dart": "sourcecode", - "dylib": "compiled.mach-o.dylib", - "framework": "wrapper.framework", - "gyp": "sourcecode", - "gypi": "sourcecode", - "h": "sourcecode.c.h", - "hxx": "sourcecode.cpp.h", - "icns": "image.icns", - "java": "sourcecode.java", - "js": "sourcecode.javascript", - "kext": "wrapper.kext", - "m": "sourcecode.c.objc", - "mm": "sourcecode.cpp.objcpp", - "nib": "wrapper.nib", - "o": "compiled.mach-o.objfile", - "pdf": "image.pdf", - "pl": "text.script.perl", - "plist": "text.plist.xml", - "pm": "text.script.perl", - "png": "image.png", - "py": "text.script.python", - "r": "sourcecode.rez", - "rez": "sourcecode.rez", - "s": "sourcecode.asm", - "storyboard": "file.storyboard", - "strings": "text.plist.strings", - "swift": "sourcecode.swift", - "ttf": "file", - "xcassets": "folder.assetcatalog", - "xcconfig": "text.xcconfig", - "xcdatamodel": "wrapper.xcdatamodel", - "xcdatamodeld": "wrapper.xcdatamodeld", - "xib": "file.xib", - "y": "sourcecode.yacc", - } - - prop_map = { - "dart": "explicitFileType", - "gyp": "explicitFileType", - "gypi": "explicitFileType", - } - - if is_dir: - file_type = "folder" - prop_name = "lastKnownFileType" - else: - basename = posixpath.basename(self._properties["path"]) - (root, ext) = posixpath.splitext(basename) - # Check the map using a lowercase extension. - # TODO(mark): Maybe it should try with the original case first and fall - # back to lowercase, in case there are any instances where case - # matters. There currently aren't. - if ext != "": - ext = ext[1:].lower() - - # TODO(mark): "text" is the default value, but "file" is appropriate - # for unrecognized files not containing text. Xcode seems to choose - # based on content. - file_type = extension_map.get(ext, "text") - prop_name = prop_map.get(ext, "lastKnownFileType") - - self._properties[prop_name] = file_type - - -class PBXVariantGroup(PBXGroup, XCFileLikeElement): - """PBXVariantGroup is used by Xcode to represent localizations.""" - - # No additions to the schema relative to PBXGroup. - pass - - -# PBXReferenceProxy is also an XCFileLikeElement subclass. It is defined below -# because it uses PBXContainerItemProxy, defined below. - - -class XCBuildConfiguration(XCObject): - _schema = XCObject._schema.copy() - _schema.update( - { - "baseConfigurationReference": [0, PBXFileReference, 0, 0], - "buildSettings": [0, dict, 0, 1, {}], - "name": [0, str, 0, 1], - } - ) - - def HasBuildSetting(self, key): - return key in self._properties["buildSettings"] - - def GetBuildSetting(self, key): - return self._properties["buildSettings"][key] - - def SetBuildSetting(self, key, value): - # TODO(mark): If a list, copy? - self._properties["buildSettings"][key] = value - - def AppendBuildSetting(self, key, value): - if key not in self._properties["buildSettings"]: - self._properties["buildSettings"][key] = [] - self._properties["buildSettings"][key].append(value) - - def DelBuildSetting(self, key): - if key in self._properties["buildSettings"]: - del self._properties["buildSettings"][key] - - def SetBaseConfiguration(self, value): - self._properties["baseConfigurationReference"] = value - - -class XCConfigurationList(XCObject): - # _configs is the default list of configurations. - _configs = [ - XCBuildConfiguration({"name": "Debug"}), - XCBuildConfiguration({"name": "Release"}), - ] - - _schema = XCObject._schema.copy() - _schema.update( - { - "buildConfigurations": [1, XCBuildConfiguration, 1, 1, _configs], - "defaultConfigurationIsVisible": [0, int, 0, 1, 1], - "defaultConfigurationName": [0, str, 0, 1, "Release"], - } - ) - - def Name(self): - return ( - "Build configuration list for " - + self.parent.__class__.__name__ - + ' "' - + self.parent.Name() - + '"' - ) - - def ConfigurationNamed(self, name): - """Convenience accessor to obtain an XCBuildConfiguration by name.""" - for configuration in self._properties["buildConfigurations"]: - if configuration._properties["name"] == name: - return configuration - - raise KeyError(name) - - def DefaultConfiguration(self): - """Convenience accessor to obtain the default XCBuildConfiguration.""" - return self.ConfigurationNamed(self._properties["defaultConfigurationName"]) - - def HasBuildSetting(self, key): - """Determines the state of a build setting in all XCBuildConfiguration - child objects. - - If all child objects have key in their build settings, and the value is the - same in all child objects, returns 1. - - If no child objects have the key in their build settings, returns 0. - - If some, but not all, child objects have the key in their build settings, - or if any children have different values for the key, returns -1. - """ - - has = None - value = None - for configuration in self._properties["buildConfigurations"]: - configuration_has = configuration.HasBuildSetting(key) - if has is None: - has = configuration_has - elif has != configuration_has: - return -1 - - if configuration_has: - configuration_value = configuration.GetBuildSetting(key) - if value is None: - value = configuration_value - elif value != configuration_value: - return -1 - - if not has: - return 0 - - return 1 - - def GetBuildSetting(self, key): - """Gets the build setting for key. - - All child XCConfiguration objects must have the same value set for the - setting, or a ValueError will be raised. - """ - - # TODO(mark): This is wrong for build settings that are lists. The list - # contents should be compared (and a list copy returned?) - - value = None - for configuration in self._properties["buildConfigurations"]: - configuration_value = configuration.GetBuildSetting(key) - if value is None: - value = configuration_value - else: - if value != configuration_value: - raise ValueError("Variant values for " + key) - - return value - - def SetBuildSetting(self, key, value): - """Sets the build setting for key to value in all child - XCBuildConfiguration objects. - """ - - for configuration in self._properties["buildConfigurations"]: - configuration.SetBuildSetting(key, value) - - def AppendBuildSetting(self, key, value): - """Appends value to the build setting for key, which is treated as a list, - in all child XCBuildConfiguration objects. - """ - - for configuration in self._properties["buildConfigurations"]: - configuration.AppendBuildSetting(key, value) - - def DelBuildSetting(self, key): - """Deletes the build setting key from all child XCBuildConfiguration - objects. - """ - - for configuration in self._properties["buildConfigurations"]: - configuration.DelBuildSetting(key) - - def SetBaseConfiguration(self, value): - """Sets the build configuration in all child XCBuildConfiguration objects. - """ - - for configuration in self._properties["buildConfigurations"]: - configuration.SetBaseConfiguration(value) - - -class PBXBuildFile(XCObject): - _schema = XCObject._schema.copy() - _schema.update( - { - "fileRef": [0, XCFileLikeElement, 0, 1], - "settings": [0, str, 0, 0], # hack, it's a dict - } - ) - - # Weird output rules for PBXBuildFile. - _should_print_single_line = True - _encode_transforms = XCObject._alternate_encode_transforms - - def Name(self): - # Example: "main.cc in Sources" - return self._properties["fileRef"].Name() + " in " + self.parent.Name() - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # It is not sufficient to just rely on Name() to get the - # XCFileLikeElement's name, because that is not a complete pathname. - # PathHashables returns hashables unique enough that no two - # PBXBuildFiles should wind up with the same set of hashables, unless - # someone adds the same file multiple times to the same target. That - # would be considered invalid anyway. - hashables.extend(self._properties["fileRef"].PathHashables()) - - return hashables - - -class XCBuildPhase(XCObject): - """Abstract base for build phase classes. Not represented in a project - file. - - Attributes: - _files_by_path: A dict mapping each path of a child in the files list by - path (keys) to the corresponding PBXBuildFile children (values). - _files_by_xcfilelikeelement: A dict mapping each XCFileLikeElement (keys) - to the corresponding PBXBuildFile children (values). - """ - - # TODO(mark): Some build phase types, like PBXShellScriptBuildPhase, don't - # actually have a "files" list. XCBuildPhase should not have "files" but - # another abstract subclass of it should provide this, and concrete build - # phase types that do have "files" lists should be derived from that new - # abstract subclass. XCBuildPhase should only provide buildActionMask and - # runOnlyForDeploymentPostprocessing, and not files or the various - # file-related methods and attributes. - - _schema = XCObject._schema.copy() - _schema.update( - { - "buildActionMask": [0, int, 0, 1, 0x7FFFFFFF], - "files": [1, PBXBuildFile, 1, 1, []], - "runOnlyForDeploymentPostprocessing": [0, int, 0, 1, 0], - } - ) - - def __init__(self, properties=None, id=None, parent=None): - # super - XCObject.__init__(self, properties, id, parent) - - self._files_by_path = {} - self._files_by_xcfilelikeelement = {} - for pbxbuildfile in self._properties.get("files", []): - self._AddBuildFileToDicts(pbxbuildfile) - - def FileGroup(self, path): - # Subclasses must override this by returning a two-element tuple. The - # first item in the tuple should be the PBXGroup to which "path" should be - # added, either as a child or deeper descendant. The second item should - # be a boolean indicating whether files should be added into hierarchical - # groups or one single flat group. - raise NotImplementedError(self.__class__.__name__ + " must implement FileGroup") - - def _AddPathToDict(self, pbxbuildfile, path): - """Adds path to the dict tracking paths belonging to this build phase. - - If the path is already a member of this build phase, raises an exception. - """ - - if path in self._files_by_path: - raise ValueError("Found multiple build files with path " + path) - self._files_by_path[path] = pbxbuildfile - - def _AddBuildFileToDicts(self, pbxbuildfile, path=None): - """Maintains the _files_by_path and _files_by_xcfilelikeelement dicts. - - If path is specified, then it is the path that is being added to the - phase, and pbxbuildfile must contain either a PBXFileReference directly - referencing that path, or it must contain a PBXVariantGroup that itself - contains a PBXFileReference referencing the path. - - If path is not specified, either the PBXFileReference's path or the paths - of all children of the PBXVariantGroup are taken as being added to the - phase. - - If the path is already present in the phase, raises an exception. - - If the PBXFileReference or PBXVariantGroup referenced by pbxbuildfile - are already present in the phase, referenced by a different PBXBuildFile - object, raises an exception. This does not raise an exception when - a PBXFileReference or PBXVariantGroup reappear and are referenced by the - same PBXBuildFile that has already introduced them, because in the case - of PBXVariantGroup objects, they may correspond to multiple paths that are - not all added simultaneously. When this situation occurs, the path needs - to be added to _files_by_path, but nothing needs to change in - _files_by_xcfilelikeelement, and the caller should have avoided adding - the PBXBuildFile if it is already present in the list of children. - """ - - xcfilelikeelement = pbxbuildfile._properties["fileRef"] - - paths = [] - if path is not None: - # It's best when the caller provides the path. - if isinstance(xcfilelikeelement, PBXVariantGroup): - paths.append(path) - else: - # If the caller didn't provide a path, there can be either multiple - # paths (PBXVariantGroup) or one. - if isinstance(xcfilelikeelement, PBXVariantGroup): - for variant in xcfilelikeelement._properties["children"]: - paths.append(variant.FullPath()) - else: - paths.append(xcfilelikeelement.FullPath()) - - # Add the paths first, because if something's going to raise, the - # messages provided by _AddPathToDict are more useful owing to its - # having access to a real pathname and not just an object's Name(). - for a_path in paths: - self._AddPathToDict(pbxbuildfile, a_path) - - # If another PBXBuildFile references this XCFileLikeElement, there's a - # problem. - if ( - xcfilelikeelement in self._files_by_xcfilelikeelement - and self._files_by_xcfilelikeelement[xcfilelikeelement] != pbxbuildfile - ): - raise ValueError( - "Found multiple build files for " + xcfilelikeelement.Name() - ) - self._files_by_xcfilelikeelement[xcfilelikeelement] = pbxbuildfile - - def AppendBuildFile(self, pbxbuildfile, path=None): - # Callers should use this instead of calling - # AppendProperty('files', pbxbuildfile) directly because this function - # maintains the object's dicts. Better yet, callers can just call AddFile - # with a pathname and not worry about building their own PBXBuildFile - # objects. - self.AppendProperty("files", pbxbuildfile) - self._AddBuildFileToDicts(pbxbuildfile, path) - - def AddFile(self, path, settings=None): - (file_group, hierarchical) = self.FileGroup(path) - file_ref = file_group.AddOrGetFileByPath(path, hierarchical) - - if file_ref in self._files_by_xcfilelikeelement and isinstance( - file_ref, PBXVariantGroup - ): - # There's already a PBXBuildFile in this phase corresponding to the - # PBXVariantGroup. path just provides a new variant that belongs to - # the group. Add the path to the dict. - pbxbuildfile = self._files_by_xcfilelikeelement[file_ref] - self._AddBuildFileToDicts(pbxbuildfile, path) - else: - # Add a new PBXBuildFile to get file_ref into the phase. - if settings is None: - pbxbuildfile = PBXBuildFile({"fileRef": file_ref}) - else: - pbxbuildfile = PBXBuildFile({"fileRef": file_ref, "settings": settings}) - self.AppendBuildFile(pbxbuildfile, path) - - -class PBXHeadersBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return "Headers" - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - -class PBXResourcesBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return "Resources" - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - -class PBXSourcesBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return "Sources" - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - -class PBXFrameworksBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return "Frameworks" - - def FileGroup(self, path): - (root, ext) = posixpath.splitext(path) - if ext != "": - ext = ext[1:].lower() - if ext == "o": - # .o files are added to Xcode Frameworks phases, but conceptually aren't - # frameworks, they're more like sources or intermediates. Redirect them - # to show up in one of those other groups. - return self.PBXProjectAncestor().RootGroupForPath(path) - else: - return (self.PBXProjectAncestor().FrameworksGroup(), False) - - -class PBXShellScriptBuildPhase(XCBuildPhase): - _schema = XCBuildPhase._schema.copy() - _schema.update( - { - "inputPaths": [1, str, 0, 1, []], - "name": [0, str, 0, 0], - "outputPaths": [1, str, 0, 1, []], - "shellPath": [0, str, 0, 1, "/bin/sh"], - "shellScript": [0, str, 0, 1], - "showEnvVarsInLog": [0, int, 0, 0], - } - ) - - def Name(self): - if "name" in self._properties: - return self._properties["name"] - - return "ShellScript" - - -class PBXCopyFilesBuildPhase(XCBuildPhase): - _schema = XCBuildPhase._schema.copy() - _schema.update( - { - "dstPath": [0, str, 0, 1], - "dstSubfolderSpec": [0, int, 0, 1], - "name": [0, str, 0, 0], - } - ) - - # path_tree_re matches "$(DIR)/path", "$(DIR)/$(DIR2)/path" or just "$(DIR)". - # Match group 1 is "DIR", group 3 is "path" or "$(DIR2") or "$(DIR2)/path" - # or None. If group 3 is "path", group 4 will be None otherwise group 4 is - # "DIR2" and group 6 is "path". - path_tree_re = re.compile(r"^\$\((.*?)\)(/(\$\((.*?)\)(/(.*)|)|(.*)|)|)$") - - # path_tree_{first,second}_to_subfolder map names of Xcode variables to the - # associated dstSubfolderSpec property value used in a PBXCopyFilesBuildPhase - # object. - path_tree_first_to_subfolder = { - # Types that can be chosen via the Xcode UI. - "BUILT_PRODUCTS_DIR": 16, # Products Directory - "BUILT_FRAMEWORKS_DIR": 10, # Not an official Xcode macro. - # Existed before support for the - # names below was added. Maps to - # "Frameworks". - } - - path_tree_second_to_subfolder = { - "WRAPPER_NAME": 1, # Wrapper - # Although Xcode's friendly name is "Executables", the destination - # is demonstrably the value of the build setting - # EXECUTABLE_FOLDER_PATH not EXECUTABLES_FOLDER_PATH. - "EXECUTABLE_FOLDER_PATH": 6, # Executables. - "UNLOCALIZED_RESOURCES_FOLDER_PATH": 7, # Resources - "JAVA_FOLDER_PATH": 15, # Java Resources - "FRAMEWORKS_FOLDER_PATH": 10, # Frameworks - "SHARED_FRAMEWORKS_FOLDER_PATH": 11, # Shared Frameworks - "SHARED_SUPPORT_FOLDER_PATH": 12, # Shared Support - "PLUGINS_FOLDER_PATH": 13, # PlugIns - # For XPC Services, Xcode sets both dstPath and dstSubfolderSpec. - # Note that it re-uses the BUILT_PRODUCTS_DIR value for - # dstSubfolderSpec. dstPath is set below. - "XPCSERVICES_FOLDER_PATH": 16, # XPC Services. - } - - def Name(self): - if "name" in self._properties: - return self._properties["name"] - - return "CopyFiles" - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - def SetDestination(self, path): - """Set the dstSubfolderSpec and dstPath properties from path. - - path may be specified in the same notation used for XCHierarchicalElements, - specifically, "$(DIR)/path". - """ - - path_tree_match = self.path_tree_re.search(path) - if path_tree_match: - path_tree = path_tree_match.group(1) - if path_tree in self.path_tree_first_to_subfolder: - subfolder = self.path_tree_first_to_subfolder[path_tree] - relative_path = path_tree_match.group(3) - if relative_path is None: - relative_path = "" - - if subfolder == 16 and path_tree_match.group(4) is not None: - # BUILT_PRODUCTS_DIR (16) is the first element in a path whose - # second element is possibly one of the variable names in - # path_tree_second_to_subfolder. Xcode sets the values of all these - # variables to relative paths so .gyp files must prefix them with - # BUILT_PRODUCTS_DIR, e.g. - # $(BUILT_PRODUCTS_DIR)/$(PLUGINS_FOLDER_PATH). Then - # xcode_emulation.py can export these variables with the same values - # as Xcode yet make & ninja files can determine the absolute path - # to the target. Xcode uses the dstSubfolderSpec value set here - # to determine the full path. - # - # An alternative of xcode_emulation.py setting the values to - # absolute paths when exporting these variables has been - # ruled out because then the values would be different - # depending on the build tool. - # - # Another alternative is to invent new names for the variables used - # to match to the subfolder indices in the second table. .gyp files - # then will not need to prepend $(BUILT_PRODUCTS_DIR) because - # xcode_emulation.py can set the values of those variables to - # the absolute paths when exporting. This is possibly the thinking - # behind BUILT_FRAMEWORKS_DIR which is used in exactly this manner. - # - # Requiring prepending BUILT_PRODUCTS_DIR has been chosen because - # this same way could be used to specify destinations in .gyp files - # that pre-date this addition to GYP. However they would only work - # with the Xcode generator. - # The previous version of xcode_emulation.py - # does not export these variables. Such files will get the benefit - # of the Xcode UI showing the proper destination name simply by - # regenerating the projects with this version of GYP. - path_tree = path_tree_match.group(4) - relative_path = path_tree_match.group(6) - separator = "/" - - if path_tree in self.path_tree_second_to_subfolder: - subfolder = self.path_tree_second_to_subfolder[path_tree] - if relative_path is None: - relative_path = "" - separator = "" - if path_tree == "XPCSERVICES_FOLDER_PATH": - relative_path = ( - "$(CONTENTS_FOLDER_PATH)/XPCServices" - + separator - + relative_path - ) - else: - # subfolder = 16 from above - # The second element of the path is an unrecognized variable. - # Include it and any remaining elements in relative_path. - relative_path = path_tree_match.group(3) - - else: - # The path starts with an unrecognized Xcode variable - # name like $(SRCROOT). Xcode will still handle this - # as an "absolute path" that starts with the variable. - subfolder = 0 - relative_path = path - elif path.startswith("/"): - # Special case. Absolute paths are in dstSubfolderSpec 0. - subfolder = 0 - relative_path = path[1:] - else: - raise ValueError( - f"Can't use path {path} in a {self.__class__.__name__}" - ) - - self._properties["dstPath"] = relative_path - self._properties["dstSubfolderSpec"] = subfolder - - -class PBXBuildRule(XCObject): - _schema = XCObject._schema.copy() - _schema.update( - { - "compilerSpec": [0, str, 0, 1], - "filePatterns": [0, str, 0, 0], - "fileType": [0, str, 0, 1], - "isEditable": [0, int, 0, 1, 1], - "outputFiles": [1, str, 0, 1, []], - "script": [0, str, 0, 0], - } - ) - - def Name(self): - # Not very inspired, but it's what Xcode uses. - return self.__class__.__name__ - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # Use the hashables of the weak objects that this object refers to. - hashables.append(self._properties["fileType"]) - if "filePatterns" in self._properties: - hashables.append(self._properties["filePatterns"]) - return hashables - - -class PBXContainerItemProxy(XCObject): - # When referencing an item in this project file, containerPortal is the - # PBXProject root object of this project file. When referencing an item in - # another project file, containerPortal is a PBXFileReference identifying - # the other project file. - # - # When serving as a proxy to an XCTarget (in this project file or another), - # proxyType is 1. When serving as a proxy to a PBXFileReference (in another - # project file), proxyType is 2. Type 2 is used for references to the - # producs of the other project file's targets. - # - # Xcode is weird about remoteGlobalIDString. Usually, it's printed without - # a comment, indicating that it's tracked internally simply as a string, but - # sometimes it's printed with a comment (usually when the object is initially - # created), indicating that it's tracked as a project file object at least - # sometimes. This module always tracks it as an object, but contains a hack - # to prevent it from printing the comment in the project file output. See - # _XCKVPrint. - _schema = XCObject._schema.copy() - _schema.update( - { - "containerPortal": [0, XCContainerPortal, 0, 1], - "proxyType": [0, int, 0, 1], - "remoteGlobalIDString": [0, XCRemoteObject, 0, 1], - "remoteInfo": [0, str, 0, 1], - } - ) - - def __repr__(self): - props = self._properties - name = "{}.gyp:{}".format(props["containerPortal"].Name(), props["remoteInfo"]) - return f"<{self.__class__.__name__} {name!r} at 0x{id(self):x}>" - - def Name(self): - # Admittedly not the best name, but it's what Xcode uses. - return self.__class__.__name__ - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # Use the hashables of the weak objects that this object refers to. - hashables.extend(self._properties["containerPortal"].Hashables()) - hashables.extend(self._properties["remoteGlobalIDString"].Hashables()) - return hashables - - -class PBXTargetDependency(XCObject): - # The "target" property accepts an XCTarget object, and obviously not - # NoneType. But XCTarget is defined below, so it can't be put into the - # schema yet. The definition of PBXTargetDependency can't be moved below - # XCTarget because XCTarget's own schema references PBXTargetDependency. - # Python doesn't deal well with this circular relationship, and doesn't have - # a real way to do forward declarations. To work around, the type of - # the "target" property is reset below, after XCTarget is defined. - # - # At least one of "name" and "target" is required. - _schema = XCObject._schema.copy() - _schema.update( - { - "name": [0, str, 0, 0], - "target": [0, None.__class__, 0, 0], - "targetProxy": [0, PBXContainerItemProxy, 1, 1], - } - ) - - def __repr__(self): - name = self._properties.get("name") or self._properties["target"].Name() - return f"<{self.__class__.__name__} {name!r} at 0x{id(self):x}>" - - def Name(self): - # Admittedly not the best name, but it's what Xcode uses. - return self.__class__.__name__ - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # Use the hashables of the weak objects that this object refers to. - hashables.extend(self._properties["targetProxy"].Hashables()) - return hashables - - -class PBXReferenceProxy(XCFileLikeElement): - _schema = XCFileLikeElement._schema.copy() - _schema.update( - { - "fileType": [0, str, 0, 1], - "path": [0, str, 0, 1], - "remoteRef": [0, PBXContainerItemProxy, 1, 1], - } - ) - - -class XCTarget(XCRemoteObject): - # An XCTarget is really just an XCObject, the XCRemoteObject thing is just - # to allow PBXProject to be used in the remoteGlobalIDString property of - # PBXContainerItemProxy. - # - # Setting a "name" property at instantiation may also affect "productName", - # which may in turn affect the "PRODUCT_NAME" build setting in children of - # "buildConfigurationList". See __init__ below. - _schema = XCRemoteObject._schema.copy() - _schema.update( - { - "buildConfigurationList": [ - 0, - XCConfigurationList, - 1, - 1, - XCConfigurationList(), - ], - "buildPhases": [1, XCBuildPhase, 1, 1, []], - "dependencies": [1, PBXTargetDependency, 1, 1, []], - "name": [0, str, 0, 1], - "productName": [0, str, 0, 1], - } - ) - - def __init__( - self, - properties=None, - id=None, - parent=None, - force_outdir=None, - force_prefix=None, - force_extension=None, - ): - # super - XCRemoteObject.__init__(self, properties, id, parent) - - # Set up additional defaults not expressed in the schema. If a "name" - # property was supplied, set "productName" if it is not present. Also set - # the "PRODUCT_NAME" build setting in each configuration, but only if - # the setting is not present in any build configuration. - if "name" in self._properties: - if "productName" not in self._properties: - self.SetProperty("productName", self._properties["name"]) - - if "productName" in self._properties: - if "buildConfigurationList" in self._properties: - configs = self._properties["buildConfigurationList"] - if configs.HasBuildSetting("PRODUCT_NAME") == 0: - configs.SetBuildSetting( - "PRODUCT_NAME", self._properties["productName"] - ) - - def AddDependency(self, other): - pbxproject = self.PBXProjectAncestor() - other_pbxproject = other.PBXProjectAncestor() - if pbxproject == other_pbxproject: - # Add a dependency to another target in the same project file. - container = PBXContainerItemProxy( - { - "containerPortal": pbxproject, - "proxyType": 1, - "remoteGlobalIDString": other, - "remoteInfo": other.Name(), - } - ) - dependency = PBXTargetDependency( - {"target": other, "targetProxy": container} - ) - self.AppendProperty("dependencies", dependency) - else: - # Add a dependency to a target in a different project file. - other_project_ref = pbxproject.AddOrGetProjectReference(other_pbxproject)[1] - container = PBXContainerItemProxy( - { - "containerPortal": other_project_ref, - "proxyType": 1, - "remoteGlobalIDString": other, - "remoteInfo": other.Name(), - } - ) - dependency = PBXTargetDependency( - {"name": other.Name(), "targetProxy": container} - ) - self.AppendProperty("dependencies", dependency) - - # Proxy all of these through to the build configuration list. - - def ConfigurationNamed(self, name): - return self._properties["buildConfigurationList"].ConfigurationNamed(name) - - def DefaultConfiguration(self): - return self._properties["buildConfigurationList"].DefaultConfiguration() - - def HasBuildSetting(self, key): - return self._properties["buildConfigurationList"].HasBuildSetting(key) - - def GetBuildSetting(self, key): - return self._properties["buildConfigurationList"].GetBuildSetting(key) - - def SetBuildSetting(self, key, value): - return self._properties["buildConfigurationList"].SetBuildSetting(key, value) - - def AppendBuildSetting(self, key, value): - return self._properties["buildConfigurationList"].AppendBuildSetting(key, value) - - def DelBuildSetting(self, key): - return self._properties["buildConfigurationList"].DelBuildSetting(key) - - -# Redefine the type of the "target" property. See PBXTargetDependency._schema -# above. -PBXTargetDependency._schema["target"][1] = XCTarget - - -class PBXNativeTarget(XCTarget): - # buildPhases is overridden in the schema to be able to set defaults. - # - # NOTE: Contrary to most objects, it is advisable to set parent when - # constructing PBXNativeTarget. A parent of an XCTarget must be a PBXProject - # object. A parent reference is required for a PBXNativeTarget during - # construction to be able to set up the target defaults for productReference, - # because a PBXBuildFile object must be created for the target and it must - # be added to the PBXProject's mainGroup hierarchy. - _schema = XCTarget._schema.copy() - _schema.update( - { - "buildPhases": [ - 1, - XCBuildPhase, - 1, - 1, - [PBXSourcesBuildPhase(), PBXFrameworksBuildPhase()], - ], - "buildRules": [1, PBXBuildRule, 1, 1, []], - "productReference": [0, PBXFileReference, 0, 1], - "productType": [0, str, 0, 1], - } - ) - - # Mapping from Xcode product-types to settings. The settings are: - # filetype : used for explicitFileType in the project file - # prefix : the prefix for the file name - # suffix : the suffix for the file name - _product_filetypes = { - "com.apple.product-type.application": ["wrapper.application", "", ".app"], - "com.apple.product-type.application.watchapp": [ - "wrapper.application", - "", - ".app", - ], - "com.apple.product-type.watchkit-extension": [ - "wrapper.app-extension", - "", - ".appex", - ], - "com.apple.product-type.app-extension": ["wrapper.app-extension", "", ".appex"], - "com.apple.product-type.bundle": ["wrapper.cfbundle", "", ".bundle"], - "com.apple.product-type.framework": ["wrapper.framework", "", ".framework"], - "com.apple.product-type.library.dynamic": [ - "compiled.mach-o.dylib", - "lib", - ".dylib", - ], - "com.apple.product-type.library.static": ["archive.ar", "lib", ".a"], - "com.apple.product-type.tool": ["compiled.mach-o.executable", "", ""], - "com.apple.product-type.bundle.unit-test": ["wrapper.cfbundle", "", ".xctest"], - "com.apple.product-type.bundle.ui-testing": ["wrapper.cfbundle", "", ".xctest"], - "com.googlecode.gyp.xcode.bundle": ["compiled.mach-o.dylib", "", ".so"], - "com.apple.product-type.kernel-extension": ["wrapper.kext", "", ".kext"], - } - - def __init__( - self, - properties=None, - id=None, - parent=None, - force_outdir=None, - force_prefix=None, - force_extension=None, - ): - # super - XCTarget.__init__(self, properties, id, parent) - - if ( - "productName" in self._properties - and "productType" in self._properties - and "productReference" not in self._properties - and self._properties["productType"] in self._product_filetypes - ): - products_group = None - pbxproject = self.PBXProjectAncestor() - if pbxproject is not None: - products_group = pbxproject.ProductsGroup() - - if products_group is not None: - (filetype, prefix, suffix) = self._product_filetypes[ - self._properties["productType"] - ] - # Xcode does not have a distinct type for loadable modules that are - # pure BSD targets (not in a bundle wrapper). GYP allows such modules - # to be specified by setting a target type to loadable_module without - # having mac_bundle set. These are mapped to the pseudo-product type - # com.googlecode.gyp.xcode.bundle. - # - # By picking up this special type and converting it to a dynamic - # library (com.apple.product-type.library.dynamic) with fix-ups, - # single-file loadable modules can be produced. - # - # MACH_O_TYPE is changed to mh_bundle to produce the proper file type - # (as opposed to mh_dylib). In order for linking to succeed, - # DYLIB_CURRENT_VERSION and DYLIB_COMPATIBILITY_VERSION must be - # cleared. They are meaningless for type mh_bundle. - # - # Finally, the .so extension is forcibly applied over the default - # (.dylib), unless another forced extension is already selected. - # .dylib is plainly wrong, and .bundle is used by loadable_modules in - # bundle wrappers (com.apple.product-type.bundle). .so seems an odd - # choice because it's used as the extension on many other systems that - # don't distinguish between linkable shared libraries and non-linkable - # loadable modules, but there's precedent: Python loadable modules on - # Mac OS X use an .so extension. - if self._properties["productType"] == "com.googlecode.gyp.xcode.bundle": - self._properties[ - "productType" - ] = "com.apple.product-type.library.dynamic" - self.SetBuildSetting("MACH_O_TYPE", "mh_bundle") - self.SetBuildSetting("DYLIB_CURRENT_VERSION", "") - self.SetBuildSetting("DYLIB_COMPATIBILITY_VERSION", "") - if force_extension is None: - force_extension = suffix[1:] - - if ( - self._properties["productType"] - == "com.apple.product-type-bundle.unit.test" - or self._properties["productType"] - == "com.apple.product-type-bundle.ui-testing" - ): - if force_extension is None: - force_extension = suffix[1:] - - if force_extension is not None: - # If it's a wrapper (bundle), set WRAPPER_EXTENSION. - # Extension override. - suffix = "." + force_extension - if filetype.startswith("wrapper."): - self.SetBuildSetting("WRAPPER_EXTENSION", force_extension) - else: - self.SetBuildSetting("EXECUTABLE_EXTENSION", force_extension) - - if filetype.startswith("compiled.mach-o.executable"): - product_name = self._properties["productName"] - product_name += suffix - suffix = "" - self.SetProperty("productName", product_name) - self.SetBuildSetting("PRODUCT_NAME", product_name) - - # Xcode handles most prefixes based on the target type, however there - # are exceptions. If a "BSD Dynamic Library" target is added in the - # Xcode UI, Xcode sets EXECUTABLE_PREFIX. This check duplicates that - # behavior. - if force_prefix is not None: - prefix = force_prefix - if filetype.startswith("wrapper."): - self.SetBuildSetting("WRAPPER_PREFIX", prefix) - else: - self.SetBuildSetting("EXECUTABLE_PREFIX", prefix) - - if force_outdir is not None: - self.SetBuildSetting("TARGET_BUILD_DIR", force_outdir) - - # TODO(tvl): Remove the below hack. - # http://code.google.com/p/gyp/issues/detail?id=122 - - # Some targets include the prefix in the target_name. These targets - # really should just add a product_name setting that doesn't include - # the prefix. For example: - # target_name = 'libevent', product_name = 'event' - # This check cleans up for them. - product_name = self._properties["productName"] - prefix_len = len(prefix) - if prefix_len and (product_name[:prefix_len] == prefix): - product_name = product_name[prefix_len:] - self.SetProperty("productName", product_name) - self.SetBuildSetting("PRODUCT_NAME", product_name) - - ref_props = { - "explicitFileType": filetype, - "includeInIndex": 0, - "path": prefix + product_name + suffix, - "sourceTree": "BUILT_PRODUCTS_DIR", - } - file_ref = PBXFileReference(ref_props) - products_group.AppendChild(file_ref) - self.SetProperty("productReference", file_ref) - - def GetBuildPhaseByType(self, type): - if "buildPhases" not in self._properties: - return None - - the_phase = None - for phase in self._properties["buildPhases"]: - if isinstance(phase, type): - # Some phases may be present in multiples in a well-formed project file, - # but phases like PBXSourcesBuildPhase may only be present singly, and - # this function is intended as an aid to GetBuildPhaseByType. Loop - # over the entire list of phases and assert if more than one of the - # desired type is found. - assert the_phase is None - the_phase = phase - - return the_phase - - def HeadersPhase(self): - headers_phase = self.GetBuildPhaseByType(PBXHeadersBuildPhase) - if headers_phase is None: - headers_phase = PBXHeadersBuildPhase() - - # The headers phase should come before the resources, sources, and - # frameworks phases, if any. - insert_at = len(self._properties["buildPhases"]) - for index, phase in enumerate(self._properties["buildPhases"]): - if ( - isinstance(phase, PBXResourcesBuildPhase) - or isinstance(phase, PBXSourcesBuildPhase) - or isinstance(phase, PBXFrameworksBuildPhase) - ): - insert_at = index - break - - self._properties["buildPhases"].insert(insert_at, headers_phase) - headers_phase.parent = self - - return headers_phase - - def ResourcesPhase(self): - resources_phase = self.GetBuildPhaseByType(PBXResourcesBuildPhase) - if resources_phase is None: - resources_phase = PBXResourcesBuildPhase() - - # The resources phase should come before the sources and frameworks - # phases, if any. - insert_at = len(self._properties["buildPhases"]) - for index, phase in enumerate(self._properties["buildPhases"]): - if isinstance(phase, PBXSourcesBuildPhase) or isinstance( - phase, PBXFrameworksBuildPhase - ): - insert_at = index - break - - self._properties["buildPhases"].insert(insert_at, resources_phase) - resources_phase.parent = self - - return resources_phase - - def SourcesPhase(self): - sources_phase = self.GetBuildPhaseByType(PBXSourcesBuildPhase) - if sources_phase is None: - sources_phase = PBXSourcesBuildPhase() - self.AppendProperty("buildPhases", sources_phase) - - return sources_phase - - def FrameworksPhase(self): - frameworks_phase = self.GetBuildPhaseByType(PBXFrameworksBuildPhase) - if frameworks_phase is None: - frameworks_phase = PBXFrameworksBuildPhase() - self.AppendProperty("buildPhases", frameworks_phase) - - return frameworks_phase - - def AddDependency(self, other): - # super - XCTarget.AddDependency(self, other) - - static_library_type = "com.apple.product-type.library.static" - shared_library_type = "com.apple.product-type.library.dynamic" - framework_type = "com.apple.product-type.framework" - if ( - isinstance(other, PBXNativeTarget) - and "productType" in self._properties - and self._properties["productType"] != static_library_type - and "productType" in other._properties - and ( - other._properties["productType"] == static_library_type - or ( - ( - other._properties["productType"] == shared_library_type - or other._properties["productType"] == framework_type - ) - and ( - (not other.HasBuildSetting("MACH_O_TYPE")) - or other.GetBuildSetting("MACH_O_TYPE") != "mh_bundle" - ) - ) - ) - ): - - file_ref = other.GetProperty("productReference") - - pbxproject = self.PBXProjectAncestor() - other_pbxproject = other.PBXProjectAncestor() - if pbxproject != other_pbxproject: - other_project_product_group = pbxproject.AddOrGetProjectReference( - other_pbxproject - )[0] - file_ref = other_project_product_group.GetChildByRemoteObject(file_ref) - - self.FrameworksPhase().AppendProperty( - "files", PBXBuildFile({"fileRef": file_ref}) - ) - - -class PBXAggregateTarget(XCTarget): - pass - - -class PBXProject(XCContainerPortal): - # A PBXProject is really just an XCObject, the XCContainerPortal thing is - # just to allow PBXProject to be used in the containerPortal property of - # PBXContainerItemProxy. - """ - - Attributes: - path: "sample.xcodeproj". TODO(mark) Document me! - _other_pbxprojects: A dictionary, keyed by other PBXProject objects. Each - value is a reference to the dict in the - projectReferences list associated with the keyed - PBXProject. - """ - - _schema = XCContainerPortal._schema.copy() - _schema.update( - { - "attributes": [0, dict, 0, 0], - "buildConfigurationList": [ - 0, - XCConfigurationList, - 1, - 1, - XCConfigurationList(), - ], - "compatibilityVersion": [0, str, 0, 1, "Xcode 3.2"], - "hasScannedForEncodings": [0, int, 0, 1, 1], - "mainGroup": [0, PBXGroup, 1, 1, PBXGroup()], - "projectDirPath": [0, str, 0, 1, ""], - "projectReferences": [1, dict, 0, 0], - "projectRoot": [0, str, 0, 1, ""], - "targets": [1, XCTarget, 1, 1, []], - } - ) - - def __init__(self, properties=None, id=None, parent=None, path=None): - self.path = path - self._other_pbxprojects = {} - # super - return XCContainerPortal.__init__(self, properties, id, parent) - - def Name(self): - name = self.path - if name[-10:] == ".xcodeproj": - name = name[:-10] - return posixpath.basename(name) - - def Path(self): - return self.path - - def Comment(self): - return "Project object" - - def Children(self): - # super - children = XCContainerPortal.Children(self) - - # Add children that the schema doesn't know about. Maybe there's a more - # elegant way around this, but this is the only case where we need to own - # objects in a dictionary (that is itself in a list), and three lines for - # a one-off isn't that big a deal. - if "projectReferences" in self._properties: - for reference in self._properties["projectReferences"]: - children.append(reference["ProductGroup"]) - - return children - - def PBXProjectAncestor(self): - return self - - def _GroupByName(self, name): - if "mainGroup" not in self._properties: - self.SetProperty("mainGroup", PBXGroup()) - - main_group = self._properties["mainGroup"] - group = main_group.GetChildByName(name) - if group is None: - group = PBXGroup({"name": name}) - main_group.AppendChild(group) - - return group - - # SourceGroup and ProductsGroup are created by default in Xcode's own - # templates. - def SourceGroup(self): - return self._GroupByName("Source") - - def ProductsGroup(self): - return self._GroupByName("Products") - - # IntermediatesGroup is used to collect source-like files that are generated - # by rules or script phases and are placed in intermediate directories such - # as DerivedSources. - def IntermediatesGroup(self): - return self._GroupByName("Intermediates") - - # FrameworksGroup and ProjectsGroup are top-level groups used to collect - # frameworks and projects. - def FrameworksGroup(self): - return self._GroupByName("Frameworks") - - def ProjectsGroup(self): - return self._GroupByName("Projects") - - def RootGroupForPath(self, path): - """Returns a PBXGroup child of this object to which path should be added. - - This method is intended to choose between SourceGroup and - IntermediatesGroup on the basis of whether path is present in a source - directory or an intermediates directory. For the purposes of this - determination, any path located within a derived file directory such as - PROJECT_DERIVED_FILE_DIR is treated as being in an intermediates - directory. - - The returned value is a two-element tuple. The first element is the - PBXGroup, and the second element specifies whether that group should be - organized hierarchically (True) or as a single flat list (False). - """ - - # TODO(mark): make this a class variable and bind to self on call? - # Also, this list is nowhere near exhaustive. - # INTERMEDIATE_DIR and SHARED_INTERMEDIATE_DIR are used by - # gyp.generator.xcode. There should probably be some way for that module - # to push the names in, rather than having to hard-code them here. - source_tree_groups = { - "DERIVED_FILE_DIR": (self.IntermediatesGroup, True), - "INTERMEDIATE_DIR": (self.IntermediatesGroup, True), - "PROJECT_DERIVED_FILE_DIR": (self.IntermediatesGroup, True), - "SHARED_INTERMEDIATE_DIR": (self.IntermediatesGroup, True), - } - - (source_tree, path) = SourceTreeAndPathFromPath(path) - if source_tree is not None and source_tree in source_tree_groups: - (group_func, hierarchical) = source_tree_groups[source_tree] - group = group_func() - return (group, hierarchical) - - # TODO(mark): make additional choices based on file extension. - - return (self.SourceGroup(), True) - - def AddOrGetFileInRootGroup(self, path): - """Returns a PBXFileReference corresponding to path in the correct group - according to RootGroupForPath's heuristics. - - If an existing PBXFileReference for path exists, it will be returned. - Otherwise, one will be created and returned. - """ - - (group, hierarchical) = self.RootGroupForPath(path) - return group.AddOrGetFileByPath(path, hierarchical) - - def RootGroupsTakeOverOnlyChildren(self, recurse=False): - """Calls TakeOverOnlyChild for all groups in the main group.""" - - for group in self._properties["mainGroup"]._properties["children"]: - if isinstance(group, PBXGroup): - group.TakeOverOnlyChild(recurse) - - def SortGroups(self): - # Sort the children of the mainGroup (like "Source" and "Products") - # according to their defined order. - self._properties["mainGroup"]._properties["children"] = sorted( - self._properties["mainGroup"]._properties["children"], - key=cmp_to_key(lambda x, y: x.CompareRootGroup(y)), - ) - - # Sort everything else by putting group before files, and going - # alphabetically by name within sections of groups and files. SortGroup - # is recursive. - for group in self._properties["mainGroup"]._properties["children"]: - if not isinstance(group, PBXGroup): - continue - - if group.Name() == "Products": - # The Products group is a special case. Instead of sorting - # alphabetically, sort things in the order of the targets that - # produce the products. To do this, just build up a new list of - # products based on the targets. - products = [] - for target in self._properties["targets"]: - if not isinstance(target, PBXNativeTarget): - continue - product = target._properties["productReference"] - # Make sure that the product is already in the products group. - assert product in group._properties["children"] - products.append(product) - - # Make sure that this process doesn't miss anything that was already - # in the products group. - assert len(products) == len(group._properties["children"]) - group._properties["children"] = products - else: - group.SortGroup() - - def AddOrGetProjectReference(self, other_pbxproject): - """Add a reference to another project file (via PBXProject object) to this - one. - - Returns [ProductGroup, ProjectRef]. ProductGroup is a PBXGroup object in - this project file that contains a PBXReferenceProxy object for each - product of each PBXNativeTarget in the other project file. ProjectRef is - a PBXFileReference to the other project file. - - If this project file already references the other project file, the - existing ProductGroup and ProjectRef are returned. The ProductGroup will - still be updated if necessary. - """ - - if "projectReferences" not in self._properties: - self._properties["projectReferences"] = [] - - product_group = None - project_ref = None - - if other_pbxproject not in self._other_pbxprojects: - # This project file isn't yet linked to the other one. Establish the - # link. - product_group = PBXGroup({"name": "Products"}) - - # ProductGroup is strong. - product_group.parent = self - - # There's nothing unique about this PBXGroup, and if left alone, it will - # wind up with the same set of hashables as all other PBXGroup objects - # owned by the projectReferences list. Add the hashables of the - # remote PBXProject that it's related to. - product_group._hashables.extend(other_pbxproject.Hashables()) - - # The other project reports its path as relative to the same directory - # that this project's path is relative to. The other project's path - # is not necessarily already relative to this project. Figure out the - # pathname that this project needs to use to refer to the other one. - this_path = posixpath.dirname(self.Path()) - projectDirPath = self.GetProperty("projectDirPath") - if projectDirPath: - if posixpath.isabs(projectDirPath[0]): - this_path = projectDirPath - else: - this_path = posixpath.join(this_path, projectDirPath) - other_path = gyp.common.RelativePath(other_pbxproject.Path(), this_path) - - # ProjectRef is weak (it's owned by the mainGroup hierarchy). - project_ref = PBXFileReference( - { - "lastKnownFileType": "wrapper.pb-project", - "path": other_path, - "sourceTree": "SOURCE_ROOT", - } - ) - self.ProjectsGroup().AppendChild(project_ref) - - ref_dict = {"ProductGroup": product_group, "ProjectRef": project_ref} - self._other_pbxprojects[other_pbxproject] = ref_dict - self.AppendProperty("projectReferences", ref_dict) - - # Xcode seems to sort this list case-insensitively - self._properties["projectReferences"] = sorted( - self._properties["projectReferences"], - key=lambda x: x["ProjectRef"].Name().lower - ) - else: - # The link already exists. Pull out the relevnt data. - project_ref_dict = self._other_pbxprojects[other_pbxproject] - product_group = project_ref_dict["ProductGroup"] - project_ref = project_ref_dict["ProjectRef"] - - self._SetUpProductReferences(other_pbxproject, product_group, project_ref) - - inherit_unique_symroot = self._AllSymrootsUnique(other_pbxproject, False) - targets = other_pbxproject.GetProperty("targets") - if all(self._AllSymrootsUnique(t, inherit_unique_symroot) for t in targets): - dir_path = project_ref._properties["path"] - product_group._hashables.extend(dir_path) - - return [product_group, project_ref] - - def _AllSymrootsUnique(self, target, inherit_unique_symroot): - # Returns True if all configurations have a unique 'SYMROOT' attribute. - # The value of inherit_unique_symroot decides, if a configuration is assumed - # to inherit a unique 'SYMROOT' attribute from its parent, if it doesn't - # define an explicit value for 'SYMROOT'. - symroots = self._DefinedSymroots(target) - for s in self._DefinedSymroots(target): - if ( - s is not None - and not self._IsUniqueSymrootForTarget(s) - or s is None - and not inherit_unique_symroot - ): - return False - return True if symroots else inherit_unique_symroot - - def _DefinedSymroots(self, target): - # Returns all values for the 'SYMROOT' attribute defined in all - # configurations for this target. If any configuration doesn't define the - # 'SYMROOT' attribute, None is added to the returned set. If all - # configurations don't define the 'SYMROOT' attribute, an empty set is - # returned. - config_list = target.GetProperty("buildConfigurationList") - symroots = set() - for config in config_list.GetProperty("buildConfigurations"): - setting = config.GetProperty("buildSettings") - if "SYMROOT" in setting: - symroots.add(setting["SYMROOT"]) - else: - symroots.add(None) - if len(symroots) == 1 and None in symroots: - return set() - return symroots - - def _IsUniqueSymrootForTarget(self, symroot): - # This method returns True if all configurations in target contain a - # 'SYMROOT' attribute that is unique for the given target. A value is - # unique, if the Xcode macro '$SRCROOT' appears in it in any form. - uniquifier = ["$SRCROOT", "$(SRCROOT)"] - if any(x in symroot for x in uniquifier): - return True - return False - - def _SetUpProductReferences(self, other_pbxproject, product_group, project_ref): - # TODO(mark): This only adds references to products in other_pbxproject - # when they don't exist in this pbxproject. Perhaps it should also - # remove references from this pbxproject that are no longer present in - # other_pbxproject. Perhaps it should update various properties if they - # change. - for target in other_pbxproject._properties["targets"]: - if not isinstance(target, PBXNativeTarget): - continue - - other_fileref = target._properties["productReference"] - if product_group.GetChildByRemoteObject(other_fileref) is None: - # Xcode sets remoteInfo to the name of the target and not the name - # of its product, despite this proxy being a reference to the product. - container_item = PBXContainerItemProxy( - { - "containerPortal": project_ref, - "proxyType": 2, - "remoteGlobalIDString": other_fileref, - "remoteInfo": target.Name(), - } - ) - # TODO(mark): Does sourceTree get copied straight over from the other - # project? Can the other project ever have lastKnownFileType here - # instead of explicitFileType? (Use it if so?) Can path ever be - # unset? (I don't think so.) Can other_fileref have name set, and - # does it impact the PBXReferenceProxy if so? These are the questions - # that perhaps will be answered one day. - reference_proxy = PBXReferenceProxy( - { - "fileType": other_fileref._properties["explicitFileType"], - "path": other_fileref._properties["path"], - "sourceTree": other_fileref._properties["sourceTree"], - "remoteRef": container_item, - } - ) - - product_group.AppendChild(reference_proxy) - - def SortRemoteProductReferences(self): - # For each remote project file, sort the associated ProductGroup in the - # same order that the targets are sorted in the remote project file. This - # is the sort order used by Xcode. - - def CompareProducts(x, y, remote_products): - # x and y are PBXReferenceProxy objects. Go through their associated - # PBXContainerItem to get the remote PBXFileReference, which will be - # present in the remote_products list. - x_remote = x._properties["remoteRef"]._properties["remoteGlobalIDString"] - y_remote = y._properties["remoteRef"]._properties["remoteGlobalIDString"] - x_index = remote_products.index(x_remote) - y_index = remote_products.index(y_remote) - - # Use the order of each remote PBXFileReference in remote_products to - # determine the sort order. - return cmp(x_index, y_index) - - for other_pbxproject, ref_dict in self._other_pbxprojects.items(): - # Build up a list of products in the remote project file, ordered the - # same as the targets that produce them. - remote_products = [] - for target in other_pbxproject._properties["targets"]: - if not isinstance(target, PBXNativeTarget): - continue - remote_products.append(target._properties["productReference"]) - - # Sort the PBXReferenceProxy children according to the list of remote - # products. - product_group = ref_dict["ProductGroup"] - product_group._properties["children"] = sorted( - product_group._properties["children"], - key=cmp_to_key( - lambda x, y, rp=remote_products: CompareProducts(x, y, rp)), - ) - - -class XCProjectFile(XCObject): - _schema = XCObject._schema.copy() - _schema.update( - { - "archiveVersion": [0, int, 0, 1, 1], - "classes": [0, dict, 0, 1, {}], - "objectVersion": [0, int, 0, 1, 46], - "rootObject": [0, PBXProject, 1, 1], - } - ) - - def ComputeIDs(self, recursive=True, overwrite=True, hash=None): - # Although XCProjectFile is implemented here as an XCObject, it's not a - # proper object in the Xcode sense, and it certainly doesn't have its own - # ID. Pass through an attempt to update IDs to the real root object. - if recursive: - self._properties["rootObject"].ComputeIDs(recursive, overwrite, hash) - - def Print(self, file=sys.stdout): - self.VerifyHasRequiredProperties() - - # Add the special "objects" property, which will be caught and handled - # separately during printing. This structure allows a fairly standard - # loop do the normal printing. - self._properties["objects"] = {} - self._XCPrint(file, 0, "// !$*UTF8*$!\n") - if self._should_print_single_line: - self._XCPrint(file, 0, "{ ") - else: - self._XCPrint(file, 0, "{\n") - for property, value in sorted( - self._properties.items() - ): - if property == "objects": - self._PrintObjects(file) - else: - self._XCKVPrint(file, 1, property, value) - self._XCPrint(file, 0, "}\n") - del self._properties["objects"] - - def _PrintObjects(self, file): - if self._should_print_single_line: - self._XCPrint(file, 0, "objects = {") - else: - self._XCPrint(file, 1, "objects = {\n") - - objects_by_class = {} - for object in self.Descendants(): - if object == self: - continue - class_name = object.__class__.__name__ - if class_name not in objects_by_class: - objects_by_class[class_name] = [] - objects_by_class[class_name].append(object) - - for class_name in sorted(objects_by_class): - self._XCPrint(file, 0, "\n") - self._XCPrint(file, 0, "/* Begin " + class_name + " section */\n") - for object in sorted( - objects_by_class[class_name], key=attrgetter("id") - ): - object.Print(file) - self._XCPrint(file, 0, "/* End " + class_name + " section */\n") - - if self._should_print_single_line: - self._XCPrint(file, 0, "}; ") - else: - self._XCPrint(file, 1, "};\n") diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py deleted file mode 100644 index 5301963..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (c) 2011 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Applies a fix to CR LF TAB handling in xml.dom. - -Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293 -Working around this: http://bugs.python.org/issue5752 -TODO(bradnelson): Consider dropping this when we drop XP support. -""" - - -import xml.dom.minidom - - -def _Replacement_write_data(writer, data, is_attrib=False): - """Writes datachars to writer.""" - data = data.replace("&", "&").replace("<", "<") - data = data.replace('"', """).replace(">", ">") - if is_attrib: - data = data.replace("\r", " ").replace("\n", " ").replace("\t", " ") - writer.write(data) - - -def _Replacement_writexml(self, writer, indent="", addindent="", newl=""): - # indent = current indentation - # addindent = indentation to add to higher levels - # newl = newline string - writer.write(indent + "<" + self.tagName) - - attrs = self._get_attributes() - a_names = sorted(attrs.keys()) - - for a_name in a_names: - writer.write(' %s="' % a_name) - _Replacement_write_data(writer, attrs[a_name].value, is_attrib=True) - writer.write('"') - if self.childNodes: - writer.write(">%s" % newl) - for node in self.childNodes: - node.writexml(writer, indent + addindent, addindent, newl) - writer.write(f"{indent}{newl}") - else: - writer.write("/>%s" % newl) - - -class XmlFix: - """Object to manage temporary patching of xml.dom.minidom.""" - - def __init__(self): - # Preserve current xml.dom.minidom functions. - self.write_data = xml.dom.minidom._write_data - self.writexml = xml.dom.minidom.Element.writexml - # Inject replacement versions of a function and a method. - xml.dom.minidom._write_data = _Replacement_write_data - xml.dom.minidom.Element.writexml = _Replacement_writexml - - def Cleanup(self): - if self.write_data: - xml.dom.minidom._write_data = self.write_data - xml.dom.minidom.Element.writexml = self.writexml - self.write_data = None - - def __del__(self): - self.Cleanup() diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/requirements_dev.txt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/requirements_dev.txt deleted file mode 100644 index 28ecaca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/requirements_dev.txt +++ /dev/null @@ -1,2 +0,0 @@ -flake8 -pytest diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/setup.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/setup.py deleted file mode 100644 index cf9d7d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from os import path - -from setuptools import setup - -here = path.abspath(path.dirname(__file__)) -# Get the long description from the README file -with open(path.join(here, "README.md")) as in_file: - long_description = in_file.read() - -setup( - name="gyp-next", - version="0.10.0", - description="A fork of the GYP build system for use in the Node.js projects", - long_description=long_description, - long_description_content_type="text/markdown", - author="Node.js contributors", - author_email="ryzokuken@disroot.org", - url="https://github.com/nodejs/gyp-next", - package_dir={"": "pylib"}, - packages=["gyp", "gyp.generator"], - entry_points={"console_scripts": ["gyp=gyp:script_main"]}, - python_requires=">=3.6", - classifiers=[ - "Development Status :: 3 - Alpha", - "Environment :: Console", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - ], -) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/test_gyp.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/test_gyp.py deleted file mode 100755 index 9ba2641..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/test_gyp.py +++ /dev/null @@ -1,260 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""gyptest.py -- test runner for GYP tests.""" - - -import argparse -import os -import platform -import subprocess -import sys -import time - - -def is_test_name(f): - return f.startswith("gyptest") and f.endswith(".py") - - -def find_all_gyptest_files(directory): - result = [] - for root, dirs, files in os.walk(directory): - result.extend([os.path.join(root, f) for f in files if is_test_name(f)]) - result.sort() - return result - - -def main(argv=None): - if argv is None: - argv = sys.argv - - parser = argparse.ArgumentParser() - parser.add_argument("-a", "--all", action="store_true", help="run all tests") - parser.add_argument("-C", "--chdir", action="store", help="change to directory") - parser.add_argument( - "-f", - "--format", - action="store", - default="", - help="run tests with the specified formats", - ) - parser.add_argument( - "-G", - "--gyp_option", - action="append", - default=[], - help="Add -G options to the gyp command line", - ) - parser.add_argument( - "-l", "--list", action="store_true", help="list available tests and exit" - ) - parser.add_argument( - "-n", - "--no-exec", - action="store_true", - help="no execute, just print the command line", - ) - parser.add_argument( - "--path", action="append", default=[], help="additional $PATH directory" - ) - parser.add_argument( - "-q", - "--quiet", - action="store_true", - help="quiet, don't print anything unless there are failures", - ) - parser.add_argument( - "-v", - "--verbose", - action="store_true", - help="print configuration info and test results.", - ) - parser.add_argument("tests", nargs="*") - args = parser.parse_args(argv[1:]) - - if args.chdir: - os.chdir(args.chdir) - - if args.path: - extra_path = [os.path.abspath(p) for p in args.path] - extra_path = os.pathsep.join(extra_path) - os.environ["PATH"] = extra_path + os.pathsep + os.environ["PATH"] - - if not args.tests: - if not args.all: - sys.stderr.write("Specify -a to get all tests.\n") - return 1 - args.tests = ["test"] - - tests = [] - for arg in args.tests: - if os.path.isdir(arg): - tests.extend(find_all_gyptest_files(os.path.normpath(arg))) - else: - if not is_test_name(os.path.basename(arg)): - print(arg, "is not a valid gyp test name.", file=sys.stderr) - sys.exit(1) - tests.append(arg) - - if args.list: - for test in tests: - print(test) - sys.exit(0) - - os.environ["PYTHONPATH"] = os.path.abspath("test/lib") - - if args.verbose: - print_configuration_info() - - if args.gyp_option and not args.quiet: - print("Extra Gyp options: %s\n" % args.gyp_option) - - if args.format: - format_list = args.format.split(",") - else: - format_list = { - "aix5": ["make"], - "freebsd7": ["make"], - "freebsd8": ["make"], - "openbsd5": ["make"], - "cygwin": ["msvs"], - "win32": ["msvs", "ninja"], - "linux": ["make", "ninja"], - "linux2": ["make", "ninja"], - "linux3": ["make", "ninja"], - # TODO: Re-enable xcode-ninja. - # https://bugs.chromium.org/p/gyp/issues/detail?id=530 - # 'darwin': ['make', 'ninja', 'xcode', 'xcode-ninja'], - "darwin": ["make", "ninja", "xcode"], - }[sys.platform] - - gyp_options = [] - for option in args.gyp_option: - gyp_options += ["-G", option] - - runner = Runner(format_list, tests, gyp_options, args.verbose) - runner.run() - - if not args.quiet: - runner.print_results() - - return 1 if runner.failures else 0 - - -def print_configuration_info(): - print("Test configuration:") - if sys.platform == "darwin": - sys.path.append(os.path.abspath("test/lib")) - import TestMac - - print(f" Mac {platform.mac_ver()[0]} {platform.mac_ver()[2]}") - print(f" Xcode {TestMac.Xcode.Version()}") - elif sys.platform == "win32": - sys.path.append(os.path.abspath("pylib")) - import gyp.MSVSVersion - - print(" Win %s %s\n" % platform.win32_ver()[0:2]) - print(" MSVS %s" % gyp.MSVSVersion.SelectVisualStudioVersion().Description()) - elif sys.platform in ("linux", "linux2"): - print(" Linux %s" % " ".join(platform.linux_distribution())) - print(f" Python {platform.python_version()}") - print(f" PYTHONPATH={os.environ['PYTHONPATH']}") - print() - - -class Runner: - def __init__(self, formats, tests, gyp_options, verbose): - self.formats = formats - self.tests = tests - self.verbose = verbose - self.gyp_options = gyp_options - self.failures = [] - self.num_tests = len(formats) * len(tests) - num_digits = len(str(self.num_tests)) - self.fmt_str = "[%%%dd/%%%dd] (%%s) %%s" % (num_digits, num_digits) - self.isatty = sys.stdout.isatty() and not self.verbose - self.env = os.environ.copy() - self.hpos = 0 - - def run(self): - run_start = time.time() - - i = 1 - for fmt in self.formats: - for test in self.tests: - self.run_test(test, fmt, i) - i += 1 - - if self.isatty: - self.erase_current_line() - - self.took = time.time() - run_start - - def run_test(self, test, fmt, i): - if self.isatty: - self.erase_current_line() - - msg = self.fmt_str % (i, self.num_tests, fmt, test) - self.print_(msg) - - start = time.time() - cmd = [sys.executable, test] + self.gyp_options - self.env["TESTGYP_FORMAT"] = fmt - proc = subprocess.Popen( - cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=self.env - ) - proc.wait() - took = time.time() - start - - stdout = proc.stdout.read().decode("utf8") - if proc.returncode == 2: - res = "skipped" - elif proc.returncode: - res = "failed" - self.failures.append(f"({test}) {fmt}") - else: - res = "passed" - res_msg = f" {res} {took:.3f}s" - self.print_(res_msg) - - if stdout and not stdout.endswith(("PASSED\n", "NO RESULT\n")): - print() - print("\n".join(f" {line}" for line in stdout.splitlines())) - elif not self.isatty: - print() - - def print_(self, msg): - print(msg, end="") - index = msg.rfind("\n") - if index == -1: - self.hpos += len(msg) - else: - self.hpos = len(msg) - index - sys.stdout.flush() - - def erase_current_line(self): - print("\b" * self.hpos + " " * self.hpos + "\b" * self.hpos, end="") - sys.stdout.flush() - self.hpos = 0 - - def print_results(self): - num_failures = len(self.failures) - if num_failures: - print() - if num_failures == 1: - print("Failed the following test:") - else: - print("Failed the following %d tests:" % num_failures) - print("\t" + "\n\t".join(sorted(self.failures))) - print() - print( - "Ran %d tests in %.3fs, %d failed." - % (self.num_tests, self.took, num_failures) - ) - print() - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/README b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/README deleted file mode 100644 index 84a73d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/README +++ /dev/null @@ -1,15 +0,0 @@ -pretty_vcproj: - Usage: pretty_vcproj.py "c:\path\to\vcproj.vcproj" [key1=value1] [key2=value2] - - They key/value pair are used to resolve vsprops name. - - For example, if I want to diff the base.vcproj project: - - pretty_vcproj.py z:\dev\src-chrome\src\base\build\base.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > original.txt - pretty_vcproj.py z:\dev\src-chrome\src\base\base_gyp.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > gyp.txt - - And you can use your favorite diff tool to see the changes. - - Note: In the case of base.vcproj, the original vcproj is one level up the generated one. - I suggest you do a search and replace for '"..\' and replace it with '"' in original.txt - before you perform the diff. \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/README b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/README deleted file mode 100644 index 2492a2c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/README +++ /dev/null @@ -1,5 +0,0 @@ -Specifications contains syntax formatters for Xcode 3. These do not appear to be supported yet on Xcode 4. To use these with Xcode 3 please install both the gyp.pbfilespec and gyp.xclangspec files in - -~/Library/Application Support/Developer/Shared/Xcode/Specifications/ - -and restart Xcode. \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec deleted file mode 100644 index 85e2e26..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec +++ /dev/null @@ -1,27 +0,0 @@ -/* - gyp.pbfilespec - GYP source file spec for Xcode 3 - - There is not much documentation available regarding the format - of .pbfilespec files. As a starting point, see for instance the - outdated documentation at: - http://maxao.free.fr/xcode-plugin-interface/specifications.html - and the files in: - /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/ - - Place this file in directory: - ~/Library/Application Support/Developer/Shared/Xcode/Specifications/ -*/ - -( - { - Identifier = sourcecode.gyp; - BasedOn = sourcecode; - Name = "GYP Files"; - Extensions = ("gyp", "gypi"); - MIMETypes = ("text/gyp"); - Language = "xcode.lang.gyp"; - IsTextFile = YES; - IsSourceFile = YES; - } -) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec deleted file mode 100644 index 3b3506d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec +++ /dev/null @@ -1,226 +0,0 @@ -/* - Copyright (c) 2011 Google Inc. All rights reserved. - Use of this source code is governed by a BSD-style license that can be - found in the LICENSE file. - - gyp.xclangspec - GYP language specification for Xcode 3 - - There is not much documentation available regarding the format - of .xclangspec files. As a starting point, see for instance the - outdated documentation at: - http://maxao.free.fr/xcode-plugin-interface/specifications.html - and the files in: - /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/ - - Place this file in directory: - ~/Library/Application Support/Developer/Shared/Xcode/Specifications/ -*/ - -( - - { - Identifier = "xcode.lang.gyp.keyword"; - Syntax = { - Words = ( - "and", - "or", - " (caar gyp-parse-history) target-point) - (setq gyp-parse-history (cdr gyp-parse-history)))) - -(defun gyp-parse-point () - "The point of the last parse state added by gyp-parse-to." - (caar gyp-parse-history)) - -(defun gyp-parse-sections () - "A list of section symbols holding at the last parse state point." - (cdar gyp-parse-history)) - -(defun gyp-inside-dictionary-p () - "Predicate returning true if the parser is inside a dictionary." - (not (eq (cadar gyp-parse-history) 'list))) - -(defun gyp-add-parse-history (point sections) - "Add parse state SECTIONS to the parse history at POINT so that parsing can be - resumed instantly." - (while (>= (caar gyp-parse-history) point) - (setq gyp-parse-history (cdr gyp-parse-history))) - (setq gyp-parse-history (cons (cons point sections) gyp-parse-history))) - -(defun gyp-parse-to (target-point) - "Parses from (point) to TARGET-POINT adding the parse state information to - gyp-parse-state-history. Parsing stops if TARGET-POINT is reached or if a - string literal has been parsed. Returns nil if no further parsing can be - done, otherwise returns the position of the start of a parsed string, leaving - the point at the end of the string." - (let ((parsing t) - string-start) - (while parsing - (setq string-start nil) - ;; Parse up to a character that starts a sexp, or if the nesting - ;; level decreases. - (let ((state (parse-partial-sexp (gyp-parse-point) - target-point - -1 - t)) - (sections (gyp-parse-sections))) - (if (= (nth 0 state) -1) - (setq sections (cdr sections)) ; pop out a level - (cond ((looking-at-p "['\"]") ; a string - (setq string-start (point)) - (goto-char (scan-sexps (point) 1)) - (if (gyp-inside-dictionary-p) - ;; Look for sections inside a dictionary - (let ((section (gyp-section-name - (buffer-substring-no-properties - (+ 1 string-start) - (- (point) 1))))) - (setq sections (cons section (cdr sections))))) - ;; Stop after the string so it can be fontified. - (setq target-point (point))) - ((looking-at-p "{") - ;; Inside a dictionary. Increase nesting. - (forward-char 1) - (setq sections (cons 'unknown sections))) - ((looking-at-p "\\[") - ;; Inside a list. Increase nesting - (forward-char 1) - (setq sections (cons 'list sections))) - ((not (eobp)) - ;; other - (forward-char 1)))) - (gyp-add-parse-history (point) sections) - (setq parsing (< (point) target-point)))) - string-start)) - -(defun gyp-section-at-point () - "Transform the last parse state, which is a list of nested sections and return - the section symbol that should be used to determine font-lock information for - the string. Can return nil indicating the string should not have any attached - section." - (let ((sections (gyp-parse-sections))) - (cond - ((eq (car sections) 'conditions) - ;; conditions can occur in a variables section, but we still want to - ;; highlight it as a keyword. - nil) - ((and (eq (car sections) 'list) - (eq (cadr sections) 'list)) - ;; conditions and sources can have items in [[ ]] - (caddr sections)) - (t (cadr sections))))) - -(defun gyp-section-match (limit) - "Parse from (point) to LIMIT returning by means of match data what was - matched. The group of the match indicates what style font-lock should apply. - See also `gyp-add-font-lock-keywords'." - (gyp-invalidate-parse-states-after (point)) - (let ((group nil) - (string-start t)) - (while (and (< (point) limit) - (not group) - string-start) - (setq string-start (gyp-parse-to limit)) - (if string-start - (setq group (cl-case (gyp-section-at-point) - ('dependencies 1) - ('variables 2) - ('conditions 2) - ('sources 3) - ('defines 4) - (nil nil))))) - (if group - (progn - ;; Set the match data to indicate to the font-lock mechanism the - ;; highlighting to be performed. - (set-match-data (append (list string-start (point)) - (make-list (* (1- group) 2) nil) - (list (1+ string-start) (1- (point))))) - t)))) - -;;; Please see http://code.google.com/p/gyp/wiki/GypLanguageSpecification for -;;; canonical list of keywords. -(defun gyp-add-font-lock-keywords () - "Add gyp-mode keywords to font-lock mechanism." - ;; TODO(jknotten): Move all the keyword highlighting into gyp-section-match - ;; so that we can do the font-locking in a single font-lock pass. - (font-lock-add-keywords - nil - (list - ;; Top-level keywords - (list (concat "['\"]\\(" - (regexp-opt (list "action" "action_name" "actions" "cflags" - "cflags_cc" "conditions" "configurations" - "copies" "defines" "dependencies" "destination" - "direct_dependent_settings" - "export_dependent_settings" "extension" "files" - "include_dirs" "includes" "inputs" "ldflags" "libraries" - "link_settings" "mac_bundle" "message" - "msvs_external_rule" "outputs" "product_name" - "process_outputs_as_sources" "rules" "rule_name" - "sources" "suppress_wildcard" - "target_conditions" "target_defaults" - "target_defines" "target_name" "toolsets" - "targets" "type" "variables" "xcode_settings")) - "[!/+=]?\\)") 1 'font-lock-keyword-face t) - ;; Type of target - (list (concat "['\"]\\(" - (regexp-opt (list "loadable_module" "static_library" - "shared_library" "executable" "none")) - "\\)") 1 'font-lock-type-face t) - (list "\\(?:target\\|action\\)_name['\"]\\s-*:\\s-*['\"]\\([^ '\"]*\\)" 1 - 'font-lock-function-name-face t) - (list 'gyp-section-match - (list 1 'font-lock-function-name-face t t) ; dependencies - (list 2 'font-lock-variable-name-face t t) ; variables, conditions - (list 3 'font-lock-constant-face t t) ; sources - (list 4 'font-lock-preprocessor-face t t)) ; preprocessor - ;; Variable expansion - (list "<@?(\\([^\n )]+\\))" 1 'font-lock-variable-name-face t) - ;; Command expansion - (list " "{dst}"') - - print("}") - - -def main(): - if len(sys.argv) < 2: - print(__doc__, file=sys.stderr) - print(file=sys.stderr) - print("usage: %s target1 target2..." % (sys.argv[0]), file=sys.stderr) - return 1 - - edges = LoadEdges("dump.json", sys.argv[1:]) - - WriteGraph(edges) - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_gyp.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_gyp.py deleted file mode 100755 index 4ffa444..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_gyp.py +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Pretty-prints the contents of a GYP file.""" - - -import sys -import re - - -# Regex to remove comments when we're counting braces. -COMMENT_RE = re.compile(r"\s*#.*") - -# Regex to remove quoted strings when we're counting braces. -# It takes into account quoted quotes, and makes sure that the quotes match. -# NOTE: It does not handle quotes that span more than one line, or -# cases where an escaped quote is preceded by an escaped backslash. -QUOTE_RE_STR = r'(?P[\'"])(.*?)(? 0: - after = True - - # This catches the special case of a closing brace having something - # other than just whitespace ahead of it -- we don't want to - # unindent that until after this line is printed so it stays with - # the previous indentation level. - if cnt < 0 and closing_prefix_re.match(stripline): - after = True - return (cnt, after) - - -def prettyprint_input(lines): - """Does the main work of indenting the input based on the brace counts.""" - indent = 0 - basic_offset = 2 - for line in lines: - if COMMENT_RE.match(line): - print(line) - else: - line = line.strip("\r\n\t ") # Otherwise doesn't strip \r on Unix. - if len(line) > 0: - (brace_diff, after) = count_braces(line) - if brace_diff != 0: - if after: - print(" " * (basic_offset * indent) + line) - indent += brace_diff - else: - indent += brace_diff - print(" " * (basic_offset * indent) + line) - else: - print(" " * (basic_offset * indent) + line) - else: - print("") - - -def main(): - if len(sys.argv) > 1: - data = open(sys.argv[1]).read().splitlines() - else: - data = sys.stdin.read().splitlines() - # Split up the double braces. - lines = split_double_braces(data) - - # Indent and print the output. - prettyprint_input(lines) - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_sln.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_sln.py deleted file mode 100755 index 6ca0cd1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_sln.py +++ /dev/null @@ -1,181 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Prints the information in a sln file in a diffable way. - - It first outputs each projects in alphabetical order with their - dependencies. - - Then it outputs a possible build order. -""" - - -import os -import re -import sys -import pretty_vcproj - -__author__ = "nsylvain (Nicolas Sylvain)" - - -def BuildProject(project, built, projects, deps): - # if all dependencies are done, we can build it, otherwise we try to build the - # dependency. - # This is not infinite-recursion proof. - for dep in deps[project]: - if dep not in built: - BuildProject(dep, built, projects, deps) - print(project) - built.append(project) - - -def ParseSolution(solution_file): - # All projects, their clsid and paths. - projects = dict() - - # A list of dependencies associated with a project. - dependencies = dict() - - # Regular expressions that matches the SLN format. - # The first line of a project definition. - begin_project = re.compile( - r'^Project\("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942' - r'}"\) = "(.*)", "(.*)", "(.*)"$' - ) - # The last line of a project definition. - end_project = re.compile("^EndProject$") - # The first line of a dependency list. - begin_dep = re.compile(r"ProjectSection\(ProjectDependencies\) = postProject$") - # The last line of a dependency list. - end_dep = re.compile("EndProjectSection$") - # A line describing a dependency. - dep_line = re.compile(" *({.*}) = ({.*})$") - - in_deps = False - solution = open(solution_file) - for line in solution: - results = begin_project.search(line) - if results: - # Hack to remove icu because the diff is too different. - if results.group(1).find("icu") != -1: - continue - # We remove "_gyp" from the names because it helps to diff them. - current_project = results.group(1).replace("_gyp", "") - projects[current_project] = [ - results.group(2).replace("_gyp", ""), - results.group(3), - results.group(2), - ] - dependencies[current_project] = [] - continue - - results = end_project.search(line) - if results: - current_project = None - continue - - results = begin_dep.search(line) - if results: - in_deps = True - continue - - results = end_dep.search(line) - if results: - in_deps = False - continue - - results = dep_line.search(line) - if results and in_deps and current_project: - dependencies[current_project].append(results.group(1)) - continue - - # Change all dependencies clsid to name instead. - for project in dependencies: - # For each dependencies in this project - new_dep_array = [] - for dep in dependencies[project]: - # Look for the project name matching this cldis - for project_info in projects: - if projects[project_info][1] == dep: - new_dep_array.append(project_info) - dependencies[project] = sorted(new_dep_array) - - return (projects, dependencies) - - -def PrintDependencies(projects, deps): - print("---------------------------------------") - print("Dependencies for all projects") - print("---------------------------------------") - print("-- --") - - for (project, dep_list) in sorted(deps.items()): - print("Project : %s" % project) - print("Path : %s" % projects[project][0]) - if dep_list: - for dep in dep_list: - print(" - %s" % dep) - print("") - - print("-- --") - - -def PrintBuildOrder(projects, deps): - print("---------------------------------------") - print("Build order ") - print("---------------------------------------") - print("-- --") - - built = [] - for (project, _) in sorted(deps.items()): - if project not in built: - BuildProject(project, built, projects, deps) - - print("-- --") - - -def PrintVCProj(projects): - - for project in projects: - print("-------------------------------------") - print("-------------------------------------") - print(project) - print(project) - print(project) - print("-------------------------------------") - print("-------------------------------------") - - project_path = os.path.abspath( - os.path.join(os.path.dirname(sys.argv[1]), projects[project][2]) - ) - - pretty = pretty_vcproj - argv = [ - "", - project_path, - "$(SolutionDir)=%s\\" % os.path.dirname(sys.argv[1]), - ] - argv.extend(sys.argv[3:]) - pretty.main(argv) - - -def main(): - # check if we have exactly 1 parameter. - if len(sys.argv) < 2: - print('Usage: %s "c:\\path\\to\\project.sln"' % sys.argv[0]) - return 1 - - (projects, deps) = ParseSolution(sys.argv[1]) - PrintDependencies(projects, deps) - PrintBuildOrder(projects, deps) - - if "--recursive" in sys.argv: - PrintVCProj(projects) - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_vcproj.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_vcproj.py deleted file mode 100755 index 00d32de..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +++ /dev/null @@ -1,339 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Make the format of a vcproj really pretty. - - This script normalize and sort an xml. It also fetches all the properties - inside linked vsprops and include them explicitly in the vcproj. - - It outputs the resulting xml to stdout. -""" - - -import os -import sys - -from xml.dom.minidom import parse -from xml.dom.minidom import Node - -__author__ = "nsylvain (Nicolas Sylvain)" -ARGUMENTS = None -REPLACEMENTS = dict() - - -def cmp(x, y): - return (x > y) - (x < y) - - -class CmpTuple: - """Compare function between 2 tuple.""" - - def __call__(self, x, y): - return cmp(x[0], y[0]) - - -class CmpNode: - """Compare function between 2 xml nodes.""" - - def __call__(self, x, y): - def get_string(node): - node_string = "node" - node_string += node.nodeName - if node.nodeValue: - node_string += node.nodeValue - - if node.attributes: - # We first sort by name, if present. - node_string += node.getAttribute("Name") - - all_nodes = [] - for (name, value) in node.attributes.items(): - all_nodes.append((name, value)) - - all_nodes.sort(CmpTuple()) - for (name, value) in all_nodes: - node_string += name - node_string += value - - return node_string - - return cmp(get_string(x), get_string(y)) - - -def PrettyPrintNode(node, indent=0): - if node.nodeType == Node.TEXT_NODE: - if node.data.strip(): - print("{}{}".format(" " * indent, node.data.strip())) - return - - if node.childNodes: - node.normalize() - # Get the number of attributes - attr_count = 0 - if node.attributes: - attr_count = node.attributes.length - - # Print the main tag - if attr_count == 0: - print("{}<{}>".format(" " * indent, node.nodeName)) - else: - print("{}<{}".format(" " * indent, node.nodeName)) - - all_attributes = [] - for (name, value) in node.attributes.items(): - all_attributes.append((name, value)) - all_attributes.sort(CmpTuple()) - for (name, value) in all_attributes: - print('{} {}="{}"'.format(" " * indent, name, value)) - print("%s>" % (" " * indent)) - if node.nodeValue: - print("{} {}".format(" " * indent, node.nodeValue)) - - for sub_node in node.childNodes: - PrettyPrintNode(sub_node, indent=indent + 2) - print("{}".format(" " * indent, node.nodeName)) - - -def FlattenFilter(node): - """Returns a list of all the node and sub nodes.""" - node_list = [] - - if node.attributes and node.getAttribute("Name") == "_excluded_files": - # We don't add the "_excluded_files" filter. - return [] - - for current in node.childNodes: - if current.nodeName == "Filter": - node_list.extend(FlattenFilter(current)) - else: - node_list.append(current) - - return node_list - - -def FixFilenames(filenames, current_directory): - new_list = [] - for filename in filenames: - if filename: - for key in REPLACEMENTS: - filename = filename.replace(key, REPLACEMENTS[key]) - os.chdir(current_directory) - filename = filename.strip("\"' ") - if filename.startswith("$"): - new_list.append(filename) - else: - new_list.append(os.path.abspath(filename)) - return new_list - - -def AbsoluteNode(node): - """Makes all the properties we know about in this node absolute.""" - if node.attributes: - for (name, value) in node.attributes.items(): - if name in [ - "InheritedPropertySheets", - "RelativePath", - "AdditionalIncludeDirectories", - "IntermediateDirectory", - "OutputDirectory", - "AdditionalLibraryDirectories", - ]: - # We want to fix up these paths - path_list = value.split(";") - new_list = FixFilenames(path_list, os.path.dirname(ARGUMENTS[1])) - node.setAttribute(name, ";".join(new_list)) - if not value: - node.removeAttribute(name) - - -def CleanupVcproj(node): - """For each sub node, we call recursively this function.""" - for sub_node in node.childNodes: - AbsoluteNode(sub_node) - CleanupVcproj(sub_node) - - # Normalize the node, and remove all extraneous whitespaces. - for sub_node in node.childNodes: - if sub_node.nodeType == Node.TEXT_NODE: - sub_node.data = sub_node.data.replace("\r", "") - sub_node.data = sub_node.data.replace("\n", "") - sub_node.data = sub_node.data.rstrip() - - # Fix all the semicolon separated attributes to be sorted, and we also - # remove the dups. - if node.attributes: - for (name, value) in node.attributes.items(): - sorted_list = sorted(value.split(";")) - unique_list = [] - for i in sorted_list: - if not unique_list.count(i): - unique_list.append(i) - node.setAttribute(name, ";".join(unique_list)) - if not value: - node.removeAttribute(name) - - if node.childNodes: - node.normalize() - - # For each node, take a copy, and remove it from the list. - node_array = [] - while node.childNodes and node.childNodes[0]: - # Take a copy of the node and remove it from the list. - current = node.childNodes[0] - node.removeChild(current) - - # If the child is a filter, we want to append all its children - # to this same list. - if current.nodeName == "Filter": - node_array.extend(FlattenFilter(current)) - else: - node_array.append(current) - - # Sort the list. - node_array.sort(CmpNode()) - - # Insert the nodes in the correct order. - for new_node in node_array: - # But don't append empty tool node. - if new_node.nodeName == "Tool": - if new_node.attributes and new_node.attributes.length == 1: - # This one was empty. - continue - if new_node.nodeName == "UserMacro": - continue - node.appendChild(new_node) - - -def GetConfiguationNodes(vcproj): - # TODO(nsylvain): Find a better way to navigate the xml. - nodes = [] - for node in vcproj.childNodes: - if node.nodeName == "Configurations": - for sub_node in node.childNodes: - if sub_node.nodeName == "Configuration": - nodes.append(sub_node) - - return nodes - - -def GetChildrenVsprops(filename): - dom = parse(filename) - if dom.documentElement.attributes: - vsprops = dom.documentElement.getAttribute("InheritedPropertySheets") - return FixFilenames(vsprops.split(";"), os.path.dirname(filename)) - return [] - - -def SeekToNode(node1, child2): - # A text node does not have properties. - if child2.nodeType == Node.TEXT_NODE: - return None - - # Get the name of the current node. - current_name = child2.getAttribute("Name") - if not current_name: - # There is no name. We don't know how to merge. - return None - - # Look through all the nodes to find a match. - for sub_node in node1.childNodes: - if sub_node.nodeName == child2.nodeName: - name = sub_node.getAttribute("Name") - if name == current_name: - return sub_node - - # No match. We give up. - return None - - -def MergeAttributes(node1, node2): - # No attributes to merge? - if not node2.attributes: - return - - for (name, value2) in node2.attributes.items(): - # Don't merge the 'Name' attribute. - if name == "Name": - continue - value1 = node1.getAttribute(name) - if value1: - # The attribute exist in the main node. If it's equal, we leave it - # untouched, otherwise we concatenate it. - if value1 != value2: - node1.setAttribute(name, ";".join([value1, value2])) - else: - # The attribute does not exist in the main node. We append this one. - node1.setAttribute(name, value2) - - # If the attribute was a property sheet attributes, we remove it, since - # they are useless. - if name == "InheritedPropertySheets": - node1.removeAttribute(name) - - -def MergeProperties(node1, node2): - MergeAttributes(node1, node2) - for child2 in node2.childNodes: - child1 = SeekToNode(node1, child2) - if child1: - MergeProperties(child1, child2) - else: - node1.appendChild(child2.cloneNode(True)) - - -def main(argv): - """Main function of this vcproj prettifier.""" - global ARGUMENTS - ARGUMENTS = argv - - # check if we have exactly 1 parameter. - if len(argv) < 2: - print( - 'Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] ' - "[key2=value2]" % argv[0] - ) - return 1 - - # Parse the keys - for i in range(2, len(argv)): - (key, value) = argv[i].split("=") - REPLACEMENTS[key] = value - - # Open the vcproj and parse the xml. - dom = parse(argv[1]) - - # First thing we need to do is find the Configuration Node and merge them - # with the vsprops they include. - for configuration_node in GetConfiguationNodes(dom.documentElement): - # Get the property sheets associated with this configuration. - vsprops = configuration_node.getAttribute("InheritedPropertySheets") - - # Fix the filenames to be absolute. - vsprops_list = FixFilenames( - vsprops.strip().split(";"), os.path.dirname(argv[1]) - ) - - # Extend the list of vsprops with all vsprops contained in the current - # vsprops. - for current_vsprops in vsprops_list: - vsprops_list.extend(GetChildrenVsprops(current_vsprops)) - - # Now that we have all the vsprops, we need to merge them. - for current_vsprops in vsprops_list: - MergeProperties(configuration_node, parse(current_vsprops).documentElement) - - # Now that everything is merged, we need to cleanup the xml. - CleanupVcproj(dom.documentElement) - - # Finally, we use the prett xml function to print the vcproj back to the - # user. - # print dom.toprettyxml(newl="\n") - PrettyPrintNode(dom.documentElement) - return 0 - - -if __name__ == "__main__": - sys.exit(main(sys.argv)) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/Find-VisualStudio.cs b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/Find-VisualStudio.cs deleted file mode 100644 index d2e45a7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/Find-VisualStudio.cs +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright 2017 - Refael Ackermann -// Distributed under MIT style license -// See accompanying file LICENSE at https://github.com/node4good/windows-autoconf - -// Usage: -// powershell -ExecutionPolicy Unrestricted -Command "Add-Type -Path Find-VisualStudio.cs; [VisualStudioConfiguration.Main]::PrintJson()" -// This script needs to be compatible with PowerShell v2 to run on Windows 2008R2 and Windows 7. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using System.Collections.Generic; - -namespace VisualStudioConfiguration -{ - [Flags] - public enum InstanceState : uint - { - None = 0, - Local = 1, - Registered = 2, - NoRebootRequired = 4, - NoErrors = 8, - Complete = 4294967295, - } - - [Guid("6380BCFF-41D3-4B2E-8B2E-BF8A6810C848")] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - [ComImport] - public interface IEnumSetupInstances - { - - void Next([MarshalAs(UnmanagedType.U4), In] int celt, - [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Interface), Out] ISetupInstance[] rgelt, - [MarshalAs(UnmanagedType.U4)] out int pceltFetched); - - void Skip([MarshalAs(UnmanagedType.U4), In] int celt); - - void Reset(); - - [return: MarshalAs(UnmanagedType.Interface)] - IEnumSetupInstances Clone(); - } - - [Guid("42843719-DB4C-46C2-8E7C-64F1816EFD5B")] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - [ComImport] - public interface ISetupConfiguration - { - } - - [Guid("26AAB78C-4A60-49D6-AF3B-3C35BC93365D")] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - [ComImport] - public interface ISetupConfiguration2 : ISetupConfiguration - { - - [return: MarshalAs(UnmanagedType.Interface)] - IEnumSetupInstances EnumInstances(); - - [return: MarshalAs(UnmanagedType.Interface)] - ISetupInstance GetInstanceForCurrentProcess(); - - [return: MarshalAs(UnmanagedType.Interface)] - ISetupInstance GetInstanceForPath([MarshalAs(UnmanagedType.LPWStr), In] string path); - - [return: MarshalAs(UnmanagedType.Interface)] - IEnumSetupInstances EnumAllInstances(); - } - - [Guid("B41463C3-8866-43B5-BC33-2B0676F7F42E")] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - [ComImport] - public interface ISetupInstance - { - } - - [Guid("89143C9A-05AF-49B0-B717-72E218A2185C")] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - [ComImport] - public interface ISetupInstance2 : ISetupInstance - { - [return: MarshalAs(UnmanagedType.BStr)] - string GetInstanceId(); - - [return: MarshalAs(UnmanagedType.Struct)] - System.Runtime.InteropServices.ComTypes.FILETIME GetInstallDate(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetInstallationName(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetInstallationPath(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetInstallationVersion(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetDisplayName([MarshalAs(UnmanagedType.U4), In] int lcid); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetDescription([MarshalAs(UnmanagedType.U4), In] int lcid); - - [return: MarshalAs(UnmanagedType.BStr)] - string ResolvePath([MarshalAs(UnmanagedType.LPWStr), In] string pwszRelativePath); - - [return: MarshalAs(UnmanagedType.U4)] - InstanceState GetState(); - - [return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_UNKNOWN)] - ISetupPackageReference[] GetPackages(); - - ISetupPackageReference GetProduct(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetProductPath(); - - [return: MarshalAs(UnmanagedType.VariantBool)] - bool IsLaunchable(); - - [return: MarshalAs(UnmanagedType.VariantBool)] - bool IsComplete(); - - [return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_UNKNOWN)] - ISetupPropertyStore GetProperties(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetEnginePath(); - } - - [Guid("DA8D8A16-B2B6-4487-A2F1-594CCCCD6BF5")] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - [ComImport] - public interface ISetupPackageReference - { - - [return: MarshalAs(UnmanagedType.BStr)] - string GetId(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetVersion(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetChip(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetLanguage(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetBranch(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetType(); - - [return: MarshalAs(UnmanagedType.BStr)] - string GetUniqueId(); - - [return: MarshalAs(UnmanagedType.VariantBool)] - bool GetIsExtension(); - } - - [Guid("c601c175-a3be-44bc-91f6-4568d230fc83")] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - [ComImport] - public interface ISetupPropertyStore - { - - [return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] - string[] GetNames(); - - object GetValue([MarshalAs(UnmanagedType.LPWStr), In] string pwszName); - } - - [Guid("42843719-DB4C-46C2-8E7C-64F1816EFD5B")] - [CoClass(typeof(SetupConfigurationClass))] - [ComImport] - public interface SetupConfiguration : ISetupConfiguration2, ISetupConfiguration - { - } - - [Guid("177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D")] - [ClassInterface(ClassInterfaceType.None)] - [ComImport] - public class SetupConfigurationClass - { - } - - public static class Main - { - public static void PrintJson() - { - ISetupConfiguration query = new SetupConfiguration(); - ISetupConfiguration2 query2 = (ISetupConfiguration2)query; - IEnumSetupInstances e = query2.EnumAllInstances(); - - int pceltFetched; - ISetupInstance2[] rgelt = new ISetupInstance2[1]; - List instances = new List(); - while (true) - { - e.Next(1, rgelt, out pceltFetched); - if (pceltFetched <= 0) - { - Console.WriteLine(String.Format("[{0}]", string.Join(",", instances.ToArray()))); - return; - } - - try - { - instances.Add(InstanceJson(rgelt[0])); - } - catch (COMException) - { - // Ignore instances that can't be queried. - } - } - } - - private static string JsonString(string s) - { - return "\"" + s.Replace("\\", "\\\\").Replace("\"", "\\\"") + "\""; - } - - private static string InstanceJson(ISetupInstance2 setupInstance2) - { - // Visual Studio component directory: - // https://docs.microsoft.com/en-us/visualstudio/install/workload-and-component-ids - - StringBuilder json = new StringBuilder(); - json.Append("{"); - - string path = JsonString(setupInstance2.GetInstallationPath()); - json.Append(String.Format("\"path\":{0},", path)); - - string version = JsonString(setupInstance2.GetInstallationVersion()); - json.Append(String.Format("\"version\":{0},", version)); - - List packages = new List(); - foreach (ISetupPackageReference package in setupInstance2.GetPackages()) - { - string id = JsonString(package.GetId()); - packages.Add(id); - } - json.Append(String.Format("\"packages\":[{0}]", string.Join(",", packages.ToArray()))); - - json.Append("}"); - return json.ToString(); - } - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/build.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/build.js deleted file mode 100644 index c2388fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/build.js +++ /dev/null @@ -1,204 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const path = require('path') -const glob = require('glob') -const log = require('npmlog') -const which = require('which') -const win = process.platform === 'win32' - -function build (gyp, argv, callback) { - var platformMake = 'make' - if (process.platform === 'aix') { - platformMake = 'gmake' - } else if (process.platform.indexOf('bsd') !== -1) { - platformMake = 'gmake' - } else if (win && argv.length > 0) { - argv = argv.map(function (target) { - return '/t:' + target - }) - } - - var makeCommand = gyp.opts.make || process.env.MAKE || platformMake - var command = win ? 'msbuild' : makeCommand - var jobs = gyp.opts.jobs || process.env.JOBS - var buildType - var config - var arch - var nodeDir - var guessedSolution - - loadConfigGypi() - - /** - * Load the "config.gypi" file that was generated during "configure". - */ - - function loadConfigGypi () { - var configPath = path.resolve('build', 'config.gypi') - - fs.readFile(configPath, 'utf8', function (err, data) { - if (err) { - if (err.code === 'ENOENT') { - callback(new Error('You must run `node-gyp configure` first!')) - } else { - callback(err) - } - return - } - config = JSON.parse(data.replace(/#.+\n/, '')) - - // get the 'arch', 'buildType', and 'nodeDir' vars from the config - buildType = config.target_defaults.default_configuration - arch = config.variables.target_arch - nodeDir = config.variables.nodedir - - if ('debug' in gyp.opts) { - buildType = gyp.opts.debug ? 'Debug' : 'Release' - } - if (!buildType) { - buildType = 'Release' - } - - log.verbose('build type', buildType) - log.verbose('architecture', arch) - log.verbose('node dev dir', nodeDir) - - if (win) { - findSolutionFile() - } else { - doWhich() - } - }) - } - - /** - * On Windows, find the first build/*.sln file. - */ - - function findSolutionFile () { - glob('build/*.sln', function (err, files) { - if (err) { - return callback(err) - } - if (files.length === 0) { - return callback(new Error('Could not find *.sln file. Did you run "configure"?')) - } - guessedSolution = files[0] - log.verbose('found first Solution file', guessedSolution) - doWhich() - }) - } - - /** - * Uses node-which to locate the msbuild / make executable. - */ - - function doWhich () { - // On Windows use msbuild provided by node-gyp configure - if (win) { - if (!config.variables.msbuild_path) { - return callback(new Error( - 'MSBuild is not set, please run `node-gyp configure`.')) - } - command = config.variables.msbuild_path - log.verbose('using MSBuild:', command) - doBuild() - return - } - // First make sure we have the build command in the PATH - which(command, function (err, execPath) { - if (err) { - // Some other error or 'make' not found on Unix, report that to the user - callback(err) - return - } - log.verbose('`which` succeeded for `' + command + '`', execPath) - doBuild() - }) - } - - /** - * Actually spawn the process and compile the module. - */ - - function doBuild () { - // Enable Verbose build - var verbose = log.levels[log.level] <= log.levels.verbose - var j - - if (!win && verbose) { - argv.push('V=1') - } - - if (win && !verbose) { - argv.push('/clp:Verbosity=minimal') - } - - if (win) { - // Turn off the Microsoft logo on Windows - argv.push('/nologo') - } - - // Specify the build type, Release by default - if (win) { - // Convert .gypi config target_arch to MSBuild /Platform - // Since there are many ways to state '32-bit Intel', default to it. - // N.B. msbuild's Condition string equality tests are case-insensitive. - var archLower = arch.toLowerCase() - var p = archLower === 'x64' ? 'x64' - : (archLower === 'arm' ? 'ARM' - : (archLower === 'arm64' ? 'ARM64' : 'Win32')) - argv.push('/p:Configuration=' + buildType + ';Platform=' + p) - if (jobs) { - j = parseInt(jobs, 10) - if (!isNaN(j) && j > 0) { - argv.push('/m:' + j) - } else if (jobs.toUpperCase() === 'MAX') { - argv.push('/m:' + require('os').cpus().length) - } - } - } else { - argv.push('BUILDTYPE=' + buildType) - // Invoke the Makefile in the 'build' dir. - argv.push('-C') - argv.push('build') - if (jobs) { - j = parseInt(jobs, 10) - if (!isNaN(j) && j > 0) { - argv.push('--jobs') - argv.push(j) - } else if (jobs.toUpperCase() === 'MAX') { - argv.push('--jobs') - argv.push(require('os').cpus().length) - } - } - } - - if (win) { - // did the user specify their own .sln file? - var hasSln = argv.some(function (arg) { - return path.extname(arg) === '.sln' - }) - if (!hasSln) { - argv.unshift(gyp.opts.solution || guessedSolution) - } - } - - var proc = gyp.spawn(command, argv) - proc.on('exit', onExit) - } - - function onExit (code, signal) { - if (code !== 0) { - return callback(new Error('`' + command + '` failed with exit code: ' + code)) - } - if (signal) { - return callback(new Error('`' + command + '` got signal: ' + signal)) - } - callback() - } -} - -module.exports = build -module.exports.usage = 'Invokes `' + (win ? 'msbuild' : 'make') + '` and builds the module' diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/clean.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/clean.js deleted file mode 100644 index dbfa4db..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/clean.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict' - -const rm = require('rimraf') -const log = require('npmlog') - -function clean (gyp, argv, callback) { - // Remove the 'build' dir - var buildDir = 'build' - - log.verbose('clean', 'removing "%s" directory', buildDir) - rm(buildDir, callback) -} - -module.exports = clean -module.exports.usage = 'Removes any generated build files and the "out" dir' diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/configure.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/configure.js deleted file mode 100644 index d9b8fe3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/configure.js +++ /dev/null @@ -1,294 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const path = require('path') -const log = require('npmlog') -const os = require('os') -const processRelease = require('./process-release') -const win = process.platform === 'win32' -const findNodeDirectory = require('./find-node-directory') -const createConfigGypi = require('./create-config-gypi') -const msgFormat = require('util').format -var findPython = require('./find-python') -if (win) { - var findVisualStudio = require('./find-visualstudio') -} - -function configure (gyp, argv, callback) { - var python - var buildDir = path.resolve('build') - var configNames = ['config.gypi', 'common.gypi'] - var configs = [] - var nodeDir - var release = processRelease(argv, gyp, process.version, process.release) - - findPython(gyp.opts.python, function (err, found) { - if (err) { - callback(err) - } else { - python = found - getNodeDir() - } - }) - - function getNodeDir () { - // 'python' should be set by now - process.env.PYTHON = python - - if (gyp.opts.nodedir) { - // --nodedir was specified. use that for the dev files - nodeDir = gyp.opts.nodedir.replace(/^~/, os.homedir()) - - log.verbose('get node dir', 'compiling against specified --nodedir dev files: %s', nodeDir) - createBuildDir() - } else { - // if no --nodedir specified, ensure node dependencies are installed - if ('v' + release.version !== process.version) { - // if --target was given, then determine a target version to compile for - log.verbose('get node dir', 'compiling against --target node version: %s', release.version) - } else { - // if no --target was specified then use the current host node version - log.verbose('get node dir', 'no --target version specified, falling back to host node version: %s', release.version) - } - - if (!release.semver) { - // could not parse the version string with semver - return callback(new Error('Invalid version number: ' + release.version)) - } - - // If the tarball option is set, always remove and reinstall the headers - // into devdir. Otherwise only install if they're not already there. - gyp.opts.ensure = !gyp.opts.tarball - - gyp.commands.install([release.version], function (err) { - if (err) { - return callback(err) - } - log.verbose('get node dir', 'target node version installed:', release.versionDir) - nodeDir = path.resolve(gyp.devDir, release.versionDir) - createBuildDir() - }) - } - } - - function createBuildDir () { - log.verbose('build dir', 'attempting to create "build" dir: %s', buildDir) - fs.mkdir(buildDir, { recursive: true }, function (err, isNew) { - if (err) { - return callback(err) - } - log.verbose( - 'build dir', '"build" dir needed to be created?', isNew ? 'Yes' : 'No' - ) - if (win) { - findVisualStudio(release.semver, gyp.opts.msvs_version, - createConfigFile) - } else { - createConfigFile() - } - }) - } - - function createConfigFile (err, vsInfo) { - if (err) { - return callback(err) - } - if (process.platform === 'win32') { - process.env.GYP_MSVS_VERSION = Math.min(vsInfo.versionYear, 2015) - process.env.GYP_MSVS_OVERRIDE_PATH = vsInfo.path - } - createConfigGypi({ gyp, buildDir, nodeDir, vsInfo }).then(configPath => { - configs.push(configPath) - findConfigs() - }).catch(err => { - callback(err) - }) - } - - function findConfigs () { - var name = configNames.shift() - if (!name) { - return runGyp() - } - var fullPath = path.resolve(name) - - log.verbose(name, 'checking for gypi file: %s', fullPath) - fs.stat(fullPath, function (err) { - if (err) { - if (err.code === 'ENOENT') { - findConfigs() // check next gypi filename - } else { - callback(err) - } - } else { - log.verbose(name, 'found gypi file') - configs.push(fullPath) - findConfigs() - } - }) - } - - function runGyp (err) { - if (err) { - return callback(err) - } - - if (!~argv.indexOf('-f') && !~argv.indexOf('--format')) { - if (win) { - log.verbose('gyp', 'gyp format was not specified; forcing "msvs"') - // force the 'make' target for non-Windows - argv.push('-f', 'msvs') - } else { - log.verbose('gyp', 'gyp format was not specified; forcing "make"') - // force the 'make' target for non-Windows - argv.push('-f', 'make') - } - } - - // include all the ".gypi" files that were found - configs.forEach(function (config) { - argv.push('-I', config) - }) - - // For AIX and z/OS we need to set up the path to the exports file - // which contains the symbols needed for linking. - var nodeExpFile - if (process.platform === 'aix' || process.platform === 'os390') { - var ext = process.platform === 'aix' ? 'exp' : 'x' - var nodeRootDir = findNodeDirectory() - var candidates - - if (process.platform === 'aix') { - candidates = [ - 'include/node/node', - 'out/Release/node', - 'out/Debug/node', - 'node' - ].map(function (file) { - return file + '.' + ext - }) - } else { - candidates = [ - 'out/Release/obj.target/libnode', - 'out/Debug/obj.target/libnode', - 'lib/libnode' - ].map(function (file) { - return file + '.' + ext - }) - } - - var logprefix = 'find exports file' - nodeExpFile = findAccessibleSync(logprefix, nodeRootDir, candidates) - if (nodeExpFile !== undefined) { - log.verbose(logprefix, 'Found exports file: %s', nodeExpFile) - } else { - var msg = msgFormat('Could not find node.%s file in %s', ext, nodeRootDir) - log.error(logprefix, 'Could not find exports file') - return callback(new Error(msg)) - } - } - - // this logic ported from the old `gyp_addon` python file - var gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py') - var addonGypi = path.resolve(__dirname, '..', 'addon.gypi') - var commonGypi = path.resolve(nodeDir, 'include/node/common.gypi') - fs.stat(commonGypi, function (err) { - if (err) { - commonGypi = path.resolve(nodeDir, 'common.gypi') - } - - var outputDir = 'build' - if (win) { - // Windows expects an absolute path - outputDir = buildDir - } - var nodeGypDir = path.resolve(__dirname, '..') - - var nodeLibFile = path.join(nodeDir, - !gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)', - release.name + '.lib') - - argv.push('-I', addonGypi) - argv.push('-I', commonGypi) - argv.push('-Dlibrary=shared_library') - argv.push('-Dvisibility=default') - argv.push('-Dnode_root_dir=' + nodeDir) - if (process.platform === 'aix' || process.platform === 'os390') { - argv.push('-Dnode_exp_file=' + nodeExpFile) - } - argv.push('-Dnode_gyp_dir=' + nodeGypDir) - - // Do this to keep Cygwin environments happy, else the unescaped '\' gets eaten up, - // resulting in bad paths, Ex c:parentFolderfolderanotherFolder instead of c:\parentFolder\folder\anotherFolder - if (win) { - nodeLibFile = nodeLibFile.replace(/\\/g, '\\\\') - } - argv.push('-Dnode_lib_file=' + nodeLibFile) - argv.push('-Dmodule_root_dir=' + process.cwd()) - argv.push('-Dnode_engine=' + - (gyp.opts.node_engine || process.jsEngine || 'v8')) - argv.push('--depth=.') - argv.push('--no-parallel') - - // tell gyp to write the Makefile/Solution files into output_dir - argv.push('--generator-output', outputDir) - - // tell make to write its output into the same dir - argv.push('-Goutput_dir=.') - - // enforce use of the "binding.gyp" file - argv.unshift('binding.gyp') - - // execute `gyp` from the current target nodedir - argv.unshift(gypScript) - - // make sure python uses files that came with this particular node package - var pypath = [path.join(__dirname, '..', 'gyp', 'pylib')] - if (process.env.PYTHONPATH) { - pypath.push(process.env.PYTHONPATH) - } - process.env.PYTHONPATH = pypath.join(win ? ';' : ':') - - var cp = gyp.spawn(python, argv) - cp.on('exit', onCpExit) - }) - } - - function onCpExit (code) { - if (code !== 0) { - callback(new Error('`gyp` failed with exit code: ' + code)) - } else { - // we're done - callback() - } - } -} - -/** - * Returns the first file or directory from an array of candidates that is - * readable by the current user, or undefined if none of the candidates are - * readable. - */ -function findAccessibleSync (logprefix, dir, candidates) { - for (var next = 0; next < candidates.length; next++) { - var candidate = path.resolve(dir, candidates[next]) - try { - var fd = fs.openSync(candidate, 'r') - } catch (e) { - // this candidate was not found or not readable, do nothing - log.silly(logprefix, 'Could not open %s: %s', candidate, e.message) - continue - } - fs.closeSync(fd) - log.silly(logprefix, 'Found readable %s', candidate) - return candidate - } - - return undefined -} - -module.exports = configure -module.exports.test = { - findAccessibleSync: findAccessibleSync -} -module.exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module' diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/create-config-gypi.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/create-config-gypi.js deleted file mode 100644 index dbcb8b4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/create-config-gypi.js +++ /dev/null @@ -1,146 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const log = require('npmlog') -const path = require('path') - -function parseConfigGypi (config) { - // translated from tools/js2c.py of Node.js - // 1. string comments - config = config.replace(/#.*/g, '') - // 2. join multiline strings - config = config.replace(/'$\s+'/mg, '') - // 3. normalize string literals from ' into " - config = config.replace(/'/g, '"') - return JSON.parse(config) -} - -async function getBaseConfigGypi ({ gyp, nodeDir }) { - // try reading $nodeDir/include/node/config.gypi first when: - // 1. --dist-url or --nodedir is specified - // 2. and --force-process-config is not specified - const shouldReadConfigGypi = (gyp.opts.nodedir || gyp.opts['dist-url']) && !gyp.opts['force-process-config'] - if (shouldReadConfigGypi && nodeDir) { - try { - const baseConfigGypiPath = path.resolve(nodeDir, 'include/node/config.gypi') - const baseConfigGypi = await fs.promises.readFile(baseConfigGypiPath) - return parseConfigGypi(baseConfigGypi.toString()) - } catch (err) { - log.warn('read config.gypi', err.message) - } - } - - // fallback to process.config if it is invalid - return JSON.parse(JSON.stringify(process.config)) -} - -async function getCurrentConfigGypi ({ gyp, nodeDir, vsInfo }) { - const config = await getBaseConfigGypi({ gyp, nodeDir }) - if (!config.target_defaults) { - config.target_defaults = {} - } - if (!config.variables) { - config.variables = {} - } - - const defaults = config.target_defaults - const variables = config.variables - - // don't inherit the "defaults" from the base config.gypi. - // doing so could cause problems in cases where the `node` executable was - // compiled on a different machine (with different lib/include paths) than - // the machine where the addon is being built to - defaults.cflags = [] - defaults.defines = [] - defaults.include_dirs = [] - defaults.libraries = [] - - // set the default_configuration prop - if ('debug' in gyp.opts) { - defaults.default_configuration = gyp.opts.debug ? 'Debug' : 'Release' - } - - if (!defaults.default_configuration) { - defaults.default_configuration = 'Release' - } - - // set the target_arch variable - variables.target_arch = gyp.opts.arch || process.arch || 'ia32' - if (variables.target_arch === 'arm64') { - defaults.msvs_configuration_platform = 'ARM64' - defaults.xcode_configuration_platform = 'arm64' - } - - // set the node development directory - variables.nodedir = nodeDir - - // disable -T "thin" static archives by default - variables.standalone_static_library = gyp.opts.thin ? 0 : 1 - - if (process.platform === 'win32') { - defaults.msbuild_toolset = vsInfo.toolset - if (vsInfo.sdk) { - defaults.msvs_windows_target_platform_version = vsInfo.sdk - } - if (variables.target_arch === 'arm64') { - if (vsInfo.versionMajor > 15 || - (vsInfo.versionMajor === 15 && vsInfo.versionMajor >= 9)) { - defaults.msvs_enable_marmasm = 1 - } else { - log.warn('Compiling ARM64 assembly is only available in\n' + - 'Visual Studio 2017 version 15.9 and above') - } - } - variables.msbuild_path = vsInfo.msBuild - } - - // loop through the rest of the opts and add the unknown ones as variables. - // this allows for module-specific configure flags like: - // - // $ node-gyp configure --shared-libxml2 - Object.keys(gyp.opts).forEach(function (opt) { - if (opt === 'argv') { - return - } - if (opt in gyp.configDefs) { - return - } - variables[opt.replace(/-/g, '_')] = gyp.opts[opt] - }) - - return config -} - -async function createConfigGypi ({ gyp, buildDir, nodeDir, vsInfo }) { - const configFilename = 'config.gypi' - const configPath = path.resolve(buildDir, configFilename) - - log.verbose('build/' + configFilename, 'creating config file') - - const config = await getCurrentConfigGypi({ gyp, nodeDir, vsInfo }) - - // ensures that any boolean values in config.gypi get stringified - function boolsToString (k, v) { - if (typeof v === 'boolean') { - return String(v) - } - return v - } - - log.silly('build/' + configFilename, config) - - // now write out the config.gypi file to the build/ dir - const prefix = '# Do not edit. File was generated by node-gyp\'s "configure" step' - - const json = JSON.stringify(config, boolsToString, 2) - log.verbose('build/' + configFilename, 'writing out config file: %s', configPath) - await fs.promises.writeFile(configPath, [prefix, json, ''].join('\n')) - - return configPath -} - -module.exports = createConfigGypi -module.exports.test = { - parseConfigGypi: parseConfigGypi, - getCurrentConfigGypi: getCurrentConfigGypi -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-node-directory.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-node-directory.js deleted file mode 100644 index 0dd781a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-node-directory.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict' - -const path = require('path') -const log = require('npmlog') - -function findNodeDirectory (scriptLocation, processObj) { - // set dirname and process if not passed in - // this facilitates regression tests - if (scriptLocation === undefined) { - scriptLocation = __dirname - } - if (processObj === undefined) { - processObj = process - } - - // Have a look to see what is above us, to try and work out where we are - var npmParentDirectory = path.join(scriptLocation, '../../../..') - log.verbose('node-gyp root', 'npm_parent_directory is ' + - path.basename(npmParentDirectory)) - var nodeRootDir = '' - - log.verbose('node-gyp root', 'Finding node root directory') - if (path.basename(npmParentDirectory) === 'deps') { - // We are in a build directory where this script lives in - // deps/npm/node_modules/node-gyp/lib - nodeRootDir = path.join(npmParentDirectory, '..') - log.verbose('node-gyp root', 'in build directory, root = ' + - nodeRootDir) - } else if (path.basename(npmParentDirectory) === 'node_modules') { - // We are in a node install directory where this script lives in - // lib/node_modules/npm/node_modules/node-gyp/lib or - // node_modules/npm/node_modules/node-gyp/lib depending on the - // platform - if (processObj.platform === 'win32') { - nodeRootDir = path.join(npmParentDirectory, '..') - } else { - nodeRootDir = path.join(npmParentDirectory, '../..') - } - log.verbose('node-gyp root', 'in install directory, root = ' + - nodeRootDir) - } else { - // We don't know where we are, try working it out from the location - // of the node binary - var nodeDir = path.dirname(processObj.execPath) - var directoryUp = path.basename(nodeDir) - if (directoryUp === 'bin') { - nodeRootDir = path.join(nodeDir, '..') - } else if (directoryUp === 'Release' || directoryUp === 'Debug') { - // If we are a recently built node, and the directory structure - // is that of a repository. If we are on Windows then we only need - // to go one level up, everything else, two - if (processObj.platform === 'win32') { - nodeRootDir = path.join(nodeDir, '..') - } else { - nodeRootDir = path.join(nodeDir, '../..') - } - } - // Else return the default blank, "". - } - return nodeRootDir -} - -module.exports = findNodeDirectory diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-python.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-python.js deleted file mode 100644 index a445e82..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-python.js +++ /dev/null @@ -1,344 +0,0 @@ -'use strict' - -const log = require('npmlog') -const semver = require('semver') -const cp = require('child_process') -const extend = require('util')._extend // eslint-disable-line -const win = process.platform === 'win32' -const logWithPrefix = require('./util').logWithPrefix - -const systemDrive = process.env.SystemDrive || 'C:' -const username = process.env.USERNAME || process.env.USER || getOsUserInfo() -const localAppData = process.env.LOCALAPPDATA || `${systemDrive}\\${username}\\AppData\\Local` -const foundLocalAppData = process.env.LOCALAPPDATA || username -const programFiles = process.env.ProgramW6432 || process.env.ProgramFiles || `${systemDrive}\\Program Files` -const programFilesX86 = process.env['ProgramFiles(x86)'] || `${programFiles} (x86)` - -const winDefaultLocationsArray = [] -for (const majorMinor of ['39', '38', '37', '36']) { - if (foundLocalAppData) { - winDefaultLocationsArray.push( - `${localAppData}\\Programs\\Python\\Python${majorMinor}\\python.exe`, - `${programFiles}\\Python${majorMinor}\\python.exe`, - `${localAppData}\\Programs\\Python\\Python${majorMinor}-32\\python.exe`, - `${programFiles}\\Python${majorMinor}-32\\python.exe`, - `${programFilesX86}\\Python${majorMinor}-32\\python.exe` - ) - } else { - winDefaultLocationsArray.push( - `${programFiles}\\Python${majorMinor}\\python.exe`, - `${programFiles}\\Python${majorMinor}-32\\python.exe`, - `${programFilesX86}\\Python${majorMinor}-32\\python.exe` - ) - } -} - -function getOsUserInfo () { - try { - return require('os').userInfo().username - } catch (e) {} -} - -function PythonFinder (configPython, callback) { - this.callback = callback - this.configPython = configPython - this.errorLog = [] -} - -PythonFinder.prototype = { - log: logWithPrefix(log, 'find Python'), - argsExecutable: ['-c', 'import sys; print(sys.executable);'], - argsVersion: ['-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);'], - semverRange: '>=3.6.0', - - // These can be overridden for testing: - execFile: cp.execFile, - env: process.env, - win: win, - pyLauncher: 'py.exe', - winDefaultLocations: winDefaultLocationsArray, - - // Logs a message at verbose level, but also saves it to be displayed later - // at error level if an error occurs. This should help diagnose the problem. - addLog: function addLog (message) { - this.log.verbose(message) - this.errorLog.push(message) - }, - - // Find Python by trying a sequence of possibilities. - // Ignore errors, keep trying until Python is found. - findPython: function findPython () { - const SKIP = 0; const FAIL = 1 - var toCheck = getChecks.apply(this) - - function getChecks () { - if (this.env.NODE_GYP_FORCE_PYTHON) { - return [{ - before: () => { - this.addLog( - 'checking Python explicitly set from NODE_GYP_FORCE_PYTHON') - this.addLog('- process.env.NODE_GYP_FORCE_PYTHON is ' + - `"${this.env.NODE_GYP_FORCE_PYTHON}"`) - }, - check: this.checkCommand, - arg: this.env.NODE_GYP_FORCE_PYTHON - }] - } - - var checks = [ - { - before: () => { - if (!this.configPython) { - this.addLog( - 'Python is not set from command line or npm configuration') - return SKIP - } - this.addLog('checking Python explicitly set from command line or ' + - 'npm configuration') - this.addLog('- "--python=" or "npm config get python" is ' + - `"${this.configPython}"`) - }, - check: this.checkCommand, - arg: this.configPython - }, - { - before: () => { - if (!this.env.PYTHON) { - this.addLog('Python is not set from environment variable ' + - 'PYTHON') - return SKIP - } - this.addLog('checking Python explicitly set from environment ' + - 'variable PYTHON') - this.addLog(`- process.env.PYTHON is "${this.env.PYTHON}"`) - }, - check: this.checkCommand, - arg: this.env.PYTHON - }, - { - before: () => { this.addLog('checking if "python3" can be used') }, - check: this.checkCommand, - arg: 'python3' - }, - { - before: () => { this.addLog('checking if "python" can be used') }, - check: this.checkCommand, - arg: 'python' - } - ] - - if (this.win) { - for (var i = 0; i < this.winDefaultLocations.length; ++i) { - const location = this.winDefaultLocations[i] - checks.push({ - before: () => { - this.addLog('checking if Python is ' + - `${location}`) - }, - check: this.checkExecPath, - arg: location - }) - } - checks.push({ - before: () => { - this.addLog( - 'checking if the py launcher can be used to find Python 3') - }, - check: this.checkPyLauncher - }) - } - - return checks - } - - function runChecks (err) { - this.log.silly('runChecks: err = %j', (err && err.stack) || err) - - const check = toCheck.shift() - if (!check) { - return this.fail() - } - - const before = check.before.apply(this) - if (before === SKIP) { - return runChecks.apply(this) - } - if (before === FAIL) { - return this.fail() - } - - const args = [runChecks.bind(this)] - if (check.arg) { - args.unshift(check.arg) - } - check.check.apply(this, args) - } - - runChecks.apply(this) - }, - - // Check if command is a valid Python to use. - // Will exit the Python finder on success. - // If on Windows, run in a CMD shell to support BAT/CMD launchers. - checkCommand: function checkCommand (command, errorCallback) { - var exec = command - var args = this.argsExecutable - var shell = false - if (this.win) { - // Arguments have to be manually quoted - exec = `"${exec}"` - args = args.map(a => `"${a}"`) - shell = true - } - - this.log.verbose(`- executing "${command}" to get executable path`) - this.run(exec, args, shell, function (err, execPath) { - // Possible outcomes: - // - Error: not in PATH, not executable or execution fails - // - Gibberish: the next command to check version will fail - // - Absolute path to executable - if (err) { - this.addLog(`- "${command}" is not in PATH or produced an error`) - return errorCallback(err) - } - this.addLog(`- executable path is "${execPath}"`) - this.checkExecPath(execPath, errorCallback) - }.bind(this)) - }, - - // Check if the py launcher can find a valid Python to use. - // Will exit the Python finder on success. - // Distributions of Python on Windows by default install with the "py.exe" - // Python launcher which is more likely to exist than the Python executable - // being in the $PATH. - // Because the Python launcher supports Python 2 and Python 3, we should - // explicitly request a Python 3 version. This is done by supplying "-3" as - // the first command line argument. Since "py.exe -3" would be an invalid - // executable for "execFile", we have to use the launcher to figure out - // where the actual "python.exe" executable is located. - checkPyLauncher: function checkPyLauncher (errorCallback) { - this.log.verbose( - `- executing "${this.pyLauncher}" to get Python 3 executable path`) - this.run(this.pyLauncher, ['-3', ...this.argsExecutable], false, - function (err, execPath) { - // Possible outcomes: same as checkCommand - if (err) { - this.addLog( - `- "${this.pyLauncher}" is not in PATH or produced an error`) - return errorCallback(err) - } - this.addLog(`- executable path is "${execPath}"`) - this.checkExecPath(execPath, errorCallback) - }.bind(this)) - }, - - // Check if a Python executable is the correct version to use. - // Will exit the Python finder on success. - checkExecPath: function checkExecPath (execPath, errorCallback) { - this.log.verbose(`- executing "${execPath}" to get version`) - this.run(execPath, this.argsVersion, false, function (err, version) { - // Possible outcomes: - // - Error: executable can not be run (likely meaning the command wasn't - // a Python executable and the previous command produced gibberish) - // - Gibberish: somehow the last command produced an executable path, - // this will fail when verifying the version - // - Version of the Python executable - if (err) { - this.addLog(`- "${execPath}" could not be run`) - return errorCallback(err) - } - this.addLog(`- version is "${version}"`) - - const range = new semver.Range(this.semverRange) - var valid = false - try { - valid = range.test(version) - } catch (err) { - this.log.silly('range.test() threw:\n%s', err.stack) - this.addLog(`- "${execPath}" does not have a valid version`) - this.addLog('- is it a Python executable?') - return errorCallback(err) - } - - if (!valid) { - this.addLog(`- version is ${version} - should be ${this.semverRange}`) - this.addLog('- THIS VERSION OF PYTHON IS NOT SUPPORTED') - return errorCallback(new Error( - `Found unsupported Python version ${version}`)) - } - this.succeed(execPath, version) - }.bind(this)) - }, - - // Run an executable or shell command, trimming the output. - run: function run (exec, args, shell, callback) { - var env = extend({}, this.env) - env.TERM = 'dumb' - const opts = { env: env, shell: shell } - - this.log.silly('execFile: exec = %j', exec) - this.log.silly('execFile: args = %j', args) - this.log.silly('execFile: opts = %j', opts) - try { - this.execFile(exec, args, opts, execFileCallback.bind(this)) - } catch (err) { - this.log.silly('execFile: threw:\n%s', err.stack) - return callback(err) - } - - function execFileCallback (err, stdout, stderr) { - this.log.silly('execFile result: err = %j', (err && err.stack) || err) - this.log.silly('execFile result: stdout = %j', stdout) - this.log.silly('execFile result: stderr = %j', stderr) - if (err) { - return callback(err) - } - const execPath = stdout.trim() - callback(null, execPath) - } - }, - - succeed: function succeed (execPath, version) { - this.log.info(`using Python version ${version} found at "${execPath}"`) - process.nextTick(this.callback.bind(null, null, execPath)) - }, - - fail: function fail () { - const errorLog = this.errorLog.join('\n') - - const pathExample = this.win ? 'C:\\Path\\To\\python.exe' - : '/path/to/pythonexecutable' - // For Windows 80 col console, use up to the column before the one marked - // with X (total 79 chars including logger prefix, 58 chars usable here): - // X - const info = [ - '**********************************************************', - 'You need to install the latest version of Python.', - 'Node-gyp should be able to find and use Python. If not,', - 'you can try one of the following options:', - `- Use the switch --python="${pathExample}"`, - ' (accepted by both node-gyp and npm)', - '- Set the environment variable PYTHON', - '- Set the npm configuration variable python:', - ` npm config set python "${pathExample}"`, - 'For more information consult the documentation at:', - 'https://github.com/nodejs/node-gyp#installation', - '**********************************************************' - ].join('\n') - - this.log.error(`\n${errorLog}\n\n${info}\n`) - process.nextTick(this.callback.bind(null, new Error( - 'Could not find any Python installation to use'))) - } -} - -function findPython (configPython, callback) { - var finder = new PythonFinder(configPython, callback) - finder.findPython() -} - -module.exports = findPython -module.exports.test = { - PythonFinder: PythonFinder, - findPython: findPython -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-visualstudio.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-visualstudio.js deleted file mode 100644 index 64af7be..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/find-visualstudio.js +++ /dev/null @@ -1,446 +0,0 @@ -'use strict' - -const log = require('npmlog') -const execFile = require('child_process').execFile -const fs = require('fs') -const path = require('path').win32 -const logWithPrefix = require('./util').logWithPrefix -const regSearchKeys = require('./util').regSearchKeys - -function findVisualStudio (nodeSemver, configMsvsVersion, callback) { - const finder = new VisualStudioFinder(nodeSemver, configMsvsVersion, - callback) - finder.findVisualStudio() -} - -function VisualStudioFinder (nodeSemver, configMsvsVersion, callback) { - this.nodeSemver = nodeSemver - this.configMsvsVersion = configMsvsVersion - this.callback = callback - this.errorLog = [] - this.validVersions = [] -} - -VisualStudioFinder.prototype = { - log: logWithPrefix(log, 'find VS'), - - regSearchKeys: regSearchKeys, - - // Logs a message at verbose level, but also saves it to be displayed later - // at error level if an error occurs. This should help diagnose the problem. - addLog: function addLog (message) { - this.log.verbose(message) - this.errorLog.push(message) - }, - - findVisualStudio: function findVisualStudio () { - this.configVersionYear = null - this.configPath = null - if (this.configMsvsVersion) { - this.addLog('msvs_version was set from command line or npm config') - if (this.configMsvsVersion.match(/^\d{4}$/)) { - this.configVersionYear = parseInt(this.configMsvsVersion, 10) - this.addLog( - `- looking for Visual Studio version ${this.configVersionYear}`) - } else { - this.configPath = path.resolve(this.configMsvsVersion) - this.addLog( - `- looking for Visual Studio installed in "${this.configPath}"`) - } - } else { - this.addLog('msvs_version not set from command line or npm config') - } - - if (process.env.VCINSTALLDIR) { - this.envVcInstallDir = - path.resolve(process.env.VCINSTALLDIR, '..') - this.addLog('running in VS Command Prompt, installation path is:\n' + - `"${this.envVcInstallDir}"\n- will only use this version`) - } else { - this.addLog('VCINSTALLDIR not set, not running in VS Command Prompt') - } - - this.findVisualStudio2017OrNewer((info) => { - if (info) { - return this.succeed(info) - } - this.findVisualStudio2015((info) => { - if (info) { - return this.succeed(info) - } - this.findVisualStudio2013((info) => { - if (info) { - return this.succeed(info) - } - this.fail() - }) - }) - }) - }, - - succeed: function succeed (info) { - this.log.info(`using VS${info.versionYear} (${info.version}) found at:` + - `\n"${info.path}"` + - '\nrun with --verbose for detailed information') - process.nextTick(this.callback.bind(null, null, info)) - }, - - fail: function fail () { - if (this.configMsvsVersion && this.envVcInstallDir) { - this.errorLog.push( - 'msvs_version does not match this VS Command Prompt or the', - 'installation cannot be used.') - } else if (this.configMsvsVersion) { - // If msvs_version was specified but finding VS failed, print what would - // have been accepted - this.errorLog.push('') - if (this.validVersions) { - this.errorLog.push('valid versions for msvs_version:') - this.validVersions.forEach((version) => { - this.errorLog.push(`- "${version}"`) - }) - } else { - this.errorLog.push('no valid versions for msvs_version were found') - } - } - - const errorLog = this.errorLog.join('\n') - - // For Windows 80 col console, use up to the column before the one marked - // with X (total 79 chars including logger prefix, 62 chars usable here): - // X - const infoLog = [ - '**************************************************************', - 'You need to install the latest version of Visual Studio', - 'including the "Desktop development with C++" workload.', - 'For more information consult the documentation at:', - 'https://github.com/nodejs/node-gyp#on-windows', - '**************************************************************' - ].join('\n') - - this.log.error(`\n${errorLog}\n\n${infoLog}\n`) - process.nextTick(this.callback.bind(null, new Error( - 'Could not find any Visual Studio installation to use'))) - }, - - // Invoke the PowerShell script to get information about Visual Studio 2017 - // or newer installations - findVisualStudio2017OrNewer: function findVisualStudio2017OrNewer (cb) { - var ps = path.join(process.env.SystemRoot, 'System32', - 'WindowsPowerShell', 'v1.0', 'powershell.exe') - var csFile = path.join(__dirname, 'Find-VisualStudio.cs') - var psArgs = [ - '-ExecutionPolicy', - 'Unrestricted', - '-NoProfile', - '-Command', - '&{Add-Type -Path \'' + csFile + '\';' + '[VisualStudioConfiguration.Main]::PrintJson()}' - ] - - this.log.silly('Running', ps, psArgs) - var child = execFile(ps, psArgs, { encoding: 'utf8' }, - (err, stdout, stderr) => { - this.parseData(err, stdout, stderr, cb) - }) - child.stdin.end() - }, - - // Parse the output of the PowerShell script and look for an installation - // of Visual Studio 2017 or newer to use - parseData: function parseData (err, stdout, stderr, cb) { - this.log.silly('PS stderr = %j', stderr) - - const failPowershell = () => { - this.addLog( - 'could not use PowerShell to find Visual Studio 2017 or newer, try re-running with \'--loglevel silly\' for more details') - cb(null) - } - - if (err) { - this.log.silly('PS err = %j', err && (err.stack || err)) - return failPowershell() - } - - var vsInfo - try { - vsInfo = JSON.parse(stdout) - } catch (e) { - this.log.silly('PS stdout = %j', stdout) - this.log.silly(e) - return failPowershell() - } - - if (!Array.isArray(vsInfo)) { - this.log.silly('PS stdout = %j', stdout) - return failPowershell() - } - - vsInfo = vsInfo.map((info) => { - this.log.silly(`processing installation: "${info.path}"`) - info.path = path.resolve(info.path) - var ret = this.getVersionInfo(info) - ret.path = info.path - ret.msBuild = this.getMSBuild(info, ret.versionYear) - ret.toolset = this.getToolset(info, ret.versionYear) - ret.sdk = this.getSDK(info) - return ret - }) - this.log.silly('vsInfo:', vsInfo) - - // Remove future versions or errors parsing version number - vsInfo = vsInfo.filter((info) => { - if (info.versionYear) { - return true - } - this.addLog(`unknown version "${info.version}" found at "${info.path}"`) - return false - }) - - // Sort to place newer versions first - vsInfo.sort((a, b) => b.versionYear - a.versionYear) - - for (var i = 0; i < vsInfo.length; ++i) { - const info = vsInfo[i] - this.addLog(`checking VS${info.versionYear} (${info.version}) found ` + - `at:\n"${info.path}"`) - - if (info.msBuild) { - this.addLog('- found "Visual Studio C++ core features"') - } else { - this.addLog('- "Visual Studio C++ core features" missing') - continue - } - - if (info.toolset) { - this.addLog(`- found VC++ toolset: ${info.toolset}`) - } else { - this.addLog('- missing any VC++ toolset') - continue - } - - if (info.sdk) { - this.addLog(`- found Windows SDK: ${info.sdk}`) - } else { - this.addLog('- missing any Windows SDK') - continue - } - - if (!this.checkConfigVersion(info.versionYear, info.path)) { - continue - } - - return cb(info) - } - - this.addLog( - 'could not find a version of Visual Studio 2017 or newer to use') - cb(null) - }, - - // Helper - process version information - getVersionInfo: function getVersionInfo (info) { - const match = /^(\d+)\.(\d+)\..*/.exec(info.version) - if (!match) { - this.log.silly('- failed to parse version:', info.version) - return {} - } - this.log.silly('- version match = %j', match) - var ret = { - version: info.version, - versionMajor: parseInt(match[1], 10), - versionMinor: parseInt(match[2], 10) - } - if (ret.versionMajor === 15) { - ret.versionYear = 2017 - return ret - } - if (ret.versionMajor === 16) { - ret.versionYear = 2019 - return ret - } - if (ret.versionMajor === 17) { - ret.versionYear = 2022 - return ret - } - this.log.silly('- unsupported version:', ret.versionMajor) - return {} - }, - - // Helper - process MSBuild information - getMSBuild: function getMSBuild (info, versionYear) { - const pkg = 'Microsoft.VisualStudio.VC.MSBuild.Base' - const msbuildPath = path.join(info.path, 'MSBuild', 'Current', 'Bin', 'MSBuild.exe') - if (info.packages.indexOf(pkg) !== -1) { - this.log.silly('- found VC.MSBuild.Base') - if (versionYear === 2017) { - return path.join(info.path, 'MSBuild', '15.0', 'Bin', 'MSBuild.exe') - } - if (versionYear === 2019) { - return msbuildPath - } - } - // visual studio 2022 don't has msbuild pkg - if (fs.existsSync(msbuildPath)) { - return msbuildPath - } - return null - }, - - // Helper - process toolset information - getToolset: function getToolset (info, versionYear) { - const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' - const express = 'Microsoft.VisualStudio.WDExpress' - - if (info.packages.indexOf(pkg) !== -1) { - this.log.silly('- found VC.Tools.x86.x64') - } else if (info.packages.indexOf(express) !== -1) { - this.log.silly('- found Visual Studio Express (looking for toolset)') - } else { - return null - } - - if (versionYear === 2017) { - return 'v141' - } else if (versionYear === 2019) { - return 'v142' - } else if (versionYear === 2022) { - return 'v143' - } - this.log.silly('- invalid versionYear:', versionYear) - return null - }, - - // Helper - process Windows SDK information - getSDK: function getSDK (info) { - const win8SDK = 'Microsoft.VisualStudio.Component.Windows81SDK' - const win10SDKPrefix = 'Microsoft.VisualStudio.Component.Windows10SDK.' - - var Win10SDKVer = 0 - info.packages.forEach((pkg) => { - if (!pkg.startsWith(win10SDKPrefix)) { - return - } - const parts = pkg.split('.') - if (parts.length > 5 && parts[5] !== 'Desktop') { - this.log.silly('- ignoring non-Desktop Win10SDK:', pkg) - return - } - const foundSdkVer = parseInt(parts[4], 10) - if (isNaN(foundSdkVer)) { - // Microsoft.VisualStudio.Component.Windows10SDK.IpOverUsb - this.log.silly('- failed to parse Win10SDK number:', pkg) - return - } - this.log.silly('- found Win10SDK:', foundSdkVer) - Win10SDKVer = Math.max(Win10SDKVer, foundSdkVer) - }) - - if (Win10SDKVer !== 0) { - return `10.0.${Win10SDKVer}.0` - } else if (info.packages.indexOf(win8SDK) !== -1) { - this.log.silly('- found Win8SDK') - return '8.1' - } - return null - }, - - // Find an installation of Visual Studio 2015 to use - findVisualStudio2015: function findVisualStudio2015 (cb) { - return this.findOldVS({ - version: '14.0', - versionMajor: 14, - versionMinor: 0, - versionYear: 2015, - toolset: 'v140' - }, cb) - }, - - // Find an installation of Visual Studio 2013 to use - findVisualStudio2013: function findVisualStudio2013 (cb) { - if (this.nodeSemver.major >= 9) { - this.addLog( - 'not looking for VS2013 as it is only supported up to Node.js 8') - return cb(null) - } - return this.findOldVS({ - version: '12.0', - versionMajor: 12, - versionMinor: 0, - versionYear: 2013, - toolset: 'v120' - }, cb) - }, - - // Helper - common code for VS2013 and VS2015 - findOldVS: function findOldVS (info, cb) { - const regVC7 = ['HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7', - 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7'] - const regMSBuild = 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions' - - this.addLog(`looking for Visual Studio ${info.versionYear}`) - this.regSearchKeys(regVC7, info.version, [], (err, res) => { - if (err) { - this.addLog('- not found') - return cb(null) - } - - const vsPath = path.resolve(res, '..') - this.addLog(`- found in "${vsPath}"`) - - const msBuildRegOpts = process.arch === 'ia32' ? [] : ['/reg:32'] - this.regSearchKeys([`${regMSBuild}\\${info.version}`], - 'MSBuildToolsPath', msBuildRegOpts, (err, res) => { - if (err) { - this.addLog( - '- could not find MSBuild in registry for this version') - return cb(null) - } - - const msBuild = path.join(res, 'MSBuild.exe') - this.addLog(`- MSBuild in "${msBuild}"`) - - if (!this.checkConfigVersion(info.versionYear, vsPath)) { - return cb(null) - } - - info.path = vsPath - info.msBuild = msBuild - info.sdk = null - cb(info) - }) - }) - }, - - // After finding a usable version of Visual Studio: - // - add it to validVersions to be displayed at the end if a specific - // version was requested and not found; - // - check if this is the version that was requested. - // - check if this matches the Visual Studio Command Prompt - checkConfigVersion: function checkConfigVersion (versionYear, vsPath) { - this.validVersions.push(versionYear) - this.validVersions.push(vsPath) - - if (this.configVersionYear && this.configVersionYear !== versionYear) { - this.addLog('- msvs_version does not match this version') - return false - } - if (this.configPath && - path.relative(this.configPath, vsPath) !== '') { - this.addLog('- msvs_version does not point to this installation') - return false - } - if (this.envVcInstallDir && - path.relative(this.envVcInstallDir, vsPath) !== '') { - this.addLog('- does not match this Visual Studio Command Prompt') - return false - } - - return true - } -} - -module.exports = findVisualStudio -module.exports.test = { - VisualStudioFinder: VisualStudioFinder, - findVisualStudio: findVisualStudio -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/install.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/install.js deleted file mode 100644 index 99f6d85..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/install.js +++ /dev/null @@ -1,376 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const os = require('os') -const tar = require('tar') -const path = require('path') -const util = require('util') -const stream = require('stream') -const crypto = require('crypto') -const log = require('npmlog') -const semver = require('semver') -const fetch = require('make-fetch-happen') -const processRelease = require('./process-release') -const win = process.platform === 'win32' -const streamPipeline = util.promisify(stream.pipeline) - -/** - * @param {typeof import('graceful-fs')} fs - */ - -async function install (fs, gyp, argv) { - const release = processRelease(argv, gyp, process.version, process.release) - - // Determine which node dev files version we are installing - log.verbose('install', 'input version string %j', release.version) - - if (!release.semver) { - // could not parse the version string with semver - throw new Error('Invalid version number: ' + release.version) - } - - if (semver.lt(release.version, '0.8.0')) { - throw new Error('Minimum target version is `0.8.0` or greater. Got: ' + release.version) - } - - // 0.x.y-pre versions are not published yet and cannot be installed. Bail. - if (release.semver.prerelease[0] === 'pre') { - log.verbose('detected "pre" node version', release.version) - if (!gyp.opts.nodedir) { - throw new Error('"pre" versions of node cannot be installed, use the --nodedir flag instead') - } - log.verbose('--nodedir flag was passed; skipping install', gyp.opts.nodedir) - return - } - - // flatten version into String - log.verbose('install', 'installing version: %s', release.versionDir) - - // the directory where the dev files will be installed - const devDir = path.resolve(gyp.devDir, release.versionDir) - - // If '--ensure' was passed, then don't *always* install the version; - // check if it is already installed, and only install when needed - if (gyp.opts.ensure) { - log.verbose('install', '--ensure was passed, so won\'t reinstall if already installed') - try { - await fs.promises.stat(devDir) - } catch (err) { - if (err.code === 'ENOENT') { - log.verbose('install', 'version not already installed, continuing with install', release.version) - try { - return await go() - } catch (err) { - return rollback(err) - } - } else if (err.code === 'EACCES') { - return eaccesFallback(err) - } - throw err - } - log.verbose('install', 'version is already installed, need to check "installVersion"') - const installVersionFile = path.resolve(devDir, 'installVersion') - let installVersion = 0 - try { - const ver = await fs.promises.readFile(installVersionFile, 'ascii') - installVersion = parseInt(ver, 10) || 0 - } catch (err) { - if (err.code !== 'ENOENT') { - throw err - } - } - log.verbose('got "installVersion"', installVersion) - log.verbose('needs "installVersion"', gyp.package.installVersion) - if (installVersion < gyp.package.installVersion) { - log.verbose('install', 'version is no good; reinstalling') - try { - return await go() - } catch (err) { - return rollback(err) - } - } - log.verbose('install', 'version is good') - } else { - try { - return await go() - } catch (err) { - return rollback(err) - } - } - - async function go () { - log.verbose('ensuring nodedir is created', devDir) - - // first create the dir for the node dev files - try { - const created = await fs.promises.mkdir(devDir, { recursive: true }) - - if (created) { - log.verbose('created nodedir', created) - } - } catch (err) { - if (err.code === 'EACCES') { - return eaccesFallback(err) - } - - throw err - } - - // now download the node tarball - const tarPath = gyp.opts.tarball - let extractCount = 0 - const contentShasums = {} - const expectShasums = {} - - // checks if a file to be extracted from the tarball is valid. - // only .h header files and the gyp files get extracted - function isValid (path) { - const isValid = valid(path) - if (isValid) { - log.verbose('extracted file from tarball', path) - extractCount++ - } else { - // invalid - log.silly('ignoring from tarball', path) - } - return isValid - } - - // download the tarball and extract! - - if (tarPath) { - await tar.extract({ - file: tarPath, - strip: 1, - filter: isValid, - cwd: devDir - }) - } else { - try { - const res = await download(gyp, release.tarballUrl) - - if (res.status !== 200) { - throw new Error(`${res.status} response downloading ${release.tarballUrl}`) - } - - await streamPipeline( - res.body, - // content checksum - new ShaSum((_, checksum) => { - const filename = path.basename(release.tarballUrl).trim() - contentShasums[filename] = checksum - log.verbose('content checksum', filename, checksum) - }), - tar.extract({ - strip: 1, - cwd: devDir, - filter: isValid - }) - ) - } catch (err) { - // something went wrong downloading the tarball? - if (err.code === 'ENOTFOUND') { - throw new Error('This is most likely not a problem with node-gyp or the package itself and\n' + - 'is related to network connectivity. In most cases you are behind a proxy or have bad \n' + - 'network settings.') - } - throw err - } - } - - // invoked after the tarball has finished being extracted - if (extractCount === 0) { - throw new Error('There was a fatal problem while downloading/extracting the tarball') - } - - log.verbose('tarball', 'done parsing tarball') - - const installVersionPath = path.resolve(devDir, 'installVersion') - await Promise.all([ - // need to download node.lib - ...(win ? downloadNodeLib() : []), - // write the "installVersion" file - fs.promises.writeFile(installVersionPath, gyp.package.installVersion + '\n'), - // Only download SHASUMS.txt if we downloaded something in need of SHA verification - ...(!tarPath || win ? [downloadShasums()] : []) - ]) - - log.verbose('download contents checksum', JSON.stringify(contentShasums)) - // check content shasums - for (const k in contentShasums) { - log.verbose('validating download checksum for ' + k, '(%s == %s)', contentShasums[k], expectShasums[k]) - if (contentShasums[k] !== expectShasums[k]) { - throw new Error(k + ' local checksum ' + contentShasums[k] + ' not match remote ' + expectShasums[k]) - } - } - - async function downloadShasums () { - log.verbose('check download content checksum, need to download `SHASUMS256.txt`...') - log.verbose('checksum url', release.shasumsUrl) - - const res = await download(gyp, release.shasumsUrl) - - if (res.status !== 200) { - throw new Error(`${res.status} status code downloading checksum`) - } - - for (const line of (await res.text()).trim().split('\n')) { - const items = line.trim().split(/\s+/) - if (items.length !== 2) { - return - } - - // 0035d18e2dcf9aad669b1c7c07319e17abfe3762 ./node-v0.11.4.tar.gz - const name = items[1].replace(/^\.\//, '') - expectShasums[name] = items[0] - } - - log.verbose('checksum data', JSON.stringify(expectShasums)) - } - - function downloadNodeLib () { - log.verbose('on Windows; need to download `' + release.name + '.lib`...') - const archs = ['ia32', 'x64', 'arm64'] - return archs.map(async (arch) => { - const dir = path.resolve(devDir, arch) - const targetLibPath = path.resolve(dir, release.name + '.lib') - const { libUrl, libPath } = release[arch] - const name = `${arch} ${release.name}.lib` - log.verbose(name, 'dir', dir) - log.verbose(name, 'url', libUrl) - - await fs.promises.mkdir(dir, { recursive: true }) - log.verbose('streaming', name, 'to:', targetLibPath) - - const res = await download(gyp, libUrl) - - if (res.status === 403 || res.status === 404) { - if (arch === 'arm64') { - // Arm64 is a newer platform on Windows and not all node distributions provide it. - log.verbose(`${name} was not found in ${libUrl}`) - } else { - log.warn(`${name} was not found in ${libUrl}`) - } - return - } else if (res.status !== 200) { - throw new Error(`${res.status} status code downloading ${name}`) - } - - return streamPipeline( - res.body, - new ShaSum((_, checksum) => { - contentShasums[libPath] = checksum - log.verbose('content checksum', libPath, checksum) - }), - fs.createWriteStream(targetLibPath) - ) - }) - } // downloadNodeLib() - } // go() - - /** - * Checks if a given filename is "valid" for this installation. - */ - - function valid (file) { - // header files - const extname = path.extname(file) - return extname === '.h' || extname === '.gypi' - } - - async function rollback (err) { - log.warn('install', 'got an error, rolling back install') - // roll-back the install if anything went wrong - await util.promisify(gyp.commands.remove)([release.versionDir]) - throw err - } - - /** - * The EACCES fallback is a workaround for npm's `sudo` behavior, where - * it drops the permissions before invoking any child processes (like - * node-gyp). So what happens is the "nobody" user doesn't have - * permission to create the dev dir. As a fallback, make the tmpdir() be - * the dev dir for this installation. This is not ideal, but at least - * the compilation will succeed... - */ - - async function eaccesFallback (err) { - const noretry = '--node_gyp_internal_noretry' - if (argv.indexOf(noretry) !== -1) { - throw err - } - const tmpdir = os.tmpdir() - gyp.devDir = path.resolve(tmpdir, '.node-gyp') - let userString = '' - try { - // os.userInfo can fail on some systems, it's not critical here - userString = ` ("${os.userInfo().username}")` - } catch (e) {} - log.warn('EACCES', 'current user%s does not have permission to access the dev dir "%s"', userString, devDir) - log.warn('EACCES', 'attempting to reinstall using temporary dev dir "%s"', gyp.devDir) - if (process.cwd() === tmpdir) { - log.verbose('tmpdir == cwd', 'automatically will remove dev files after to save disk space') - gyp.todo.push({ name: 'remove', args: argv }) - } - return util.promisify(gyp.commands.install)([noretry].concat(argv)) - } -} - -class ShaSum extends stream.Transform { - constructor (callback) { - super() - this._callback = callback - this._digester = crypto.createHash('sha256') - } - - _transform (chunk, _, callback) { - this._digester.update(chunk) - callback(null, chunk) - } - - _flush (callback) { - this._callback(null, this._digester.digest('hex')) - callback() - } -} - -async function download (gyp, url) { - log.http('GET', url) - - const requestOpts = { - headers: { - 'User-Agent': `node-gyp v${gyp.version} (node ${process.version})`, - Connection: 'keep-alive' - }, - proxy: gyp.opts.proxy, - noProxy: gyp.opts.noproxy - } - - const cafile = gyp.opts.cafile - if (cafile) { - requestOpts.ca = await readCAFile(cafile) - } - - const res = await fetch(url, requestOpts) - log.http(res.status, res.url) - - return res -} - -async function readCAFile (filename) { - // The CA file can contain multiple certificates so split on certificate - // boundaries. [\S\s]*? is used to match everything including newlines. - const ca = await fs.promises.readFile(filename, 'utf8') - const re = /(-----BEGIN CERTIFICATE-----[\S\s]*?-----END CERTIFICATE-----)/g - return ca.match(re) -} - -module.exports = function (gyp, argv, callback) { - install(fs, gyp, argv).then(callback.bind(undefined, null), callback) -} -module.exports.test = { - download, - install, - readCAFile -} -module.exports.usage = 'Install node development files for the specified node version.' diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/list.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/list.js deleted file mode 100644 index 405ebc0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/list.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const log = require('npmlog') - -function list (gyp, args, callback) { - var devDir = gyp.devDir - log.verbose('list', 'using node-gyp dir:', devDir) - - fs.readdir(devDir, onreaddir) - - function onreaddir (err, versions) { - if (err && err.code !== 'ENOENT') { - return callback(err) - } - - if (Array.isArray(versions)) { - versions = versions.filter(function (v) { return v !== 'current' }) - } else { - versions = [] - } - callback(null, versions) - } -} - -module.exports = list -module.exports.usage = 'Prints a listing of the currently installed node development files' diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/node-gyp.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/node-gyp.js deleted file mode 100644 index 0f11185..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/node-gyp.js +++ /dev/null @@ -1,211 +0,0 @@ -'use strict' - -const path = require('path') -const nopt = require('nopt') -const log = require('npmlog') -const childProcess = require('child_process') -const EE = require('events').EventEmitter -const inherits = require('util').inherits -const commands = [ - // Module build commands - 'build', - 'clean', - 'configure', - 'rebuild', - // Development Header File management commands - 'install', - 'list', - 'remove' -] -const aliases = { - ls: 'list', - rm: 'remove' -} - -// differentiate node-gyp's logs from npm's -log.heading = 'gyp' - -function gyp () { - return new Gyp() -} - -function Gyp () { - var self = this - - this.devDir = '' - this.commands = {} - - commands.forEach(function (command) { - self.commands[command] = function (argv, callback) { - log.verbose('command', command, argv) - return require('./' + command)(self, argv, callback) - } - }) -} -inherits(Gyp, EE) -exports.Gyp = Gyp -var proto = Gyp.prototype - -/** - * Export the contents of the package.json. - */ - -proto.package = require('../package.json') - -/** - * nopt configuration definitions - */ - -proto.configDefs = { - help: Boolean, // everywhere - arch: String, // 'configure' - cafile: String, // 'install' - debug: Boolean, // 'build' - directory: String, // bin - make: String, // 'build' - msvs_version: String, // 'configure' - ensure: Boolean, // 'install' - solution: String, // 'build' (windows only) - proxy: String, // 'install' - noproxy: String, // 'install' - devdir: String, // everywhere - nodedir: String, // 'configure' - loglevel: String, // everywhere - python: String, // 'configure' - 'dist-url': String, // 'install' - tarball: String, // 'install' - jobs: String, // 'build' - thin: String, // 'configure' - 'force-process-config': Boolean // 'configure' -} - -/** - * nopt shorthands - */ - -proto.shorthands = { - release: '--no-debug', - C: '--directory', - debug: '--debug', - j: '--jobs', - silly: '--loglevel=silly', - verbose: '--loglevel=verbose', - silent: '--loglevel=silent' -} - -/** - * expose the command aliases for the bin file to use. - */ - -proto.aliases = aliases - -/** - * Parses the given argv array and sets the 'opts', - * 'argv' and 'command' properties. - */ - -proto.parseArgv = function parseOpts (argv) { - this.opts = nopt(this.configDefs, this.shorthands, argv) - this.argv = this.opts.argv.remain.slice() - - var commands = this.todo = [] - - // create a copy of the argv array with aliases mapped - argv = this.argv.map(function (arg) { - // is this an alias? - if (arg in this.aliases) { - arg = this.aliases[arg] - } - return arg - }, this) - - // process the mapped args into "command" objects ("name" and "args" props) - argv.slice().forEach(function (arg) { - if (arg in this.commands) { - var args = argv.splice(0, argv.indexOf(arg)) - argv.shift() - if (commands.length > 0) { - commands[commands.length - 1].args = args - } - commands.push({ name: arg, args: [] }) - } - }, this) - if (commands.length > 0) { - commands[commands.length - 1].args = argv.splice(0) - } - - // support for inheriting config env variables from npm - var npmConfigPrefix = 'npm_config_' - Object.keys(process.env).forEach(function (name) { - if (name.indexOf(npmConfigPrefix) !== 0) { - return - } - var val = process.env[name] - if (name === npmConfigPrefix + 'loglevel') { - log.level = val - } else { - // add the user-defined options to the config - name = name.substring(npmConfigPrefix.length) - // gyp@741b7f1 enters an infinite loop when it encounters - // zero-length options so ensure those don't get through. - if (name) { - this.opts[name] = val - } - } - }, this) - - if (this.opts.loglevel) { - log.level = this.opts.loglevel - } - log.resume() -} - -/** - * Spawns a child process and emits a 'spawn' event. - */ - -proto.spawn = function spawn (command, args, opts) { - if (!opts) { - opts = {} - } - if (!opts.silent && !opts.stdio) { - opts.stdio = [0, 1, 2] - } - var cp = childProcess.spawn(command, args, opts) - log.info('spawn', command) - log.info('spawn args', args) - return cp -} - -/** - * Returns the usage instructions for node-gyp. - */ - -proto.usage = function usage () { - var str = [ - '', - ' Usage: node-gyp [options]', - '', - ' where is one of:', - commands.map(function (c) { - return ' - ' + c + ' - ' + require('./' + c).usage - }).join('\n'), - '', - 'node-gyp@' + this.version + ' ' + path.resolve(__dirname, '..'), - 'node@' + process.versions.node - ].join('\n') - return str -} - -/** - * Version number getter. - */ - -Object.defineProperty(proto, 'version', { - get: function () { - return this.package.version - }, - enumerable: true -}) - -module.exports = exports = gyp diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/process-release.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/process-release.js deleted file mode 100644 index 95b55e4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/process-release.js +++ /dev/null @@ -1,147 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ - -'use strict' - -const semver = require('semver') -const url = require('url') -const path = require('path') -const log = require('npmlog') - -// versions where -headers.tar.gz started shipping -const headersTarballRange = '>= 3.0.0 || ~0.12.10 || ~0.10.42' -const bitsre = /\/win-(x86|x64|arm64)\// -const bitsreV3 = /\/win-(x86|ia32|x64)\// // io.js v3.x.x shipped with "ia32" but should -// have been "x86" - -// Captures all the logic required to determine download URLs, local directory and -// file names. Inputs come from command-line switches (--target, --dist-url), -// `process.version` and `process.release` where it exists. -function processRelease (argv, gyp, defaultVersion, defaultRelease) { - var version = (semver.valid(argv[0]) && argv[0]) || gyp.opts.target || defaultVersion - var versionSemver = semver.parse(version) - var overrideDistUrl = gyp.opts['dist-url'] || gyp.opts.disturl - var isDefaultVersion - var isNamedForLegacyIojs - var name - var distBaseUrl - var baseUrl - var libUrl32 - var libUrl64 - var libUrlArm64 - var tarballUrl - var canGetHeaders - - if (!versionSemver) { - // not a valid semver string, nothing we can do - return { version: version } - } - // flatten version into String - version = versionSemver.version - - // defaultVersion should come from process.version so ought to be valid semver - isDefaultVersion = version === semver.parse(defaultVersion).version - - // can't use process.release if we're using --target=x.y.z - if (!isDefaultVersion) { - defaultRelease = null - } - - if (defaultRelease) { - // v3 onward, has process.release - name = defaultRelease.name.replace(/io\.js/, 'iojs') // remove the '.' for directory naming purposes - } else { - // old node or alternative --target= - // semver.satisfies() doesn't like prerelease tags so test major directly - isNamedForLegacyIojs = versionSemver.major >= 1 && versionSemver.major < 4 - // isNamedForLegacyIojs is required to support Electron < 4 (in particular Electron 3) - // as previously this logic was used to ensure "iojs" was used to download iojs releases - // and "node" for node releases. Unfortunately the logic was broad enough that electron@3 - // published release assets as "iojs" so that the node-gyp logic worked. Once Electron@3 has - // been EOL for a while (late 2019) we should remove this hack. - name = isNamedForLegacyIojs ? 'iojs' : 'node' - } - - // check for the nvm.sh standard mirror env variables - if (!overrideDistUrl && process.env.NODEJS_ORG_MIRROR) { - overrideDistUrl = process.env.NODEJS_ORG_MIRROR - } - - if (overrideDistUrl) { - log.verbose('download', 'using dist-url', overrideDistUrl) - } - - if (overrideDistUrl) { - distBaseUrl = overrideDistUrl.replace(/\/+$/, '') - } else { - distBaseUrl = 'https://nodejs.org/dist' - } - distBaseUrl += '/v' + version + '/' - - // new style, based on process.release so we have a lot of the data we need - if (defaultRelease && defaultRelease.headersUrl && !overrideDistUrl) { - baseUrl = url.resolve(defaultRelease.headersUrl, './') - libUrl32 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x86', versionSemver.major) - libUrl64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x64', versionSemver.major) - libUrlArm64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'arm64', versionSemver.major) - tarballUrl = defaultRelease.headersUrl - } else { - // older versions without process.release are captured here and we have to make - // a lot of assumptions, additionally if you --target=x.y.z then we can't use the - // current process.release - baseUrl = distBaseUrl - libUrl32 = resolveLibUrl(name, baseUrl, 'x86', versionSemver.major) - libUrl64 = resolveLibUrl(name, baseUrl, 'x64', versionSemver.major) - libUrlArm64 = resolveLibUrl(name, baseUrl, 'arm64', versionSemver.major) - - // making the bold assumption that anything with a version number >3.0.0 will - // have a *-headers.tar.gz file in its dist location, even some frankenstein - // custom version - canGetHeaders = semver.satisfies(versionSemver, headersTarballRange) - tarballUrl = url.resolve(baseUrl, name + '-v' + version + (canGetHeaders ? '-headers' : '') + '.tar.gz') - } - - return { - version: version, - semver: versionSemver, - name: name, - baseUrl: baseUrl, - tarballUrl: tarballUrl, - shasumsUrl: url.resolve(baseUrl, 'SHASUMS256.txt'), - versionDir: (name !== 'node' ? name + '-' : '') + version, - ia32: { - libUrl: libUrl32, - libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl32).path)) - }, - x64: { - libUrl: libUrl64, - libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl64).path)) - }, - arm64: { - libUrl: libUrlArm64, - libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrlArm64).path)) - } - } -} - -function normalizePath (p) { - return path.normalize(p).replace(/\\/g, '/') -} - -function resolveLibUrl (name, defaultUrl, arch, versionMajor) { - var base = url.resolve(defaultUrl, './') - var hasLibUrl = bitsre.test(defaultUrl) || (versionMajor === 3 && bitsreV3.test(defaultUrl)) - - if (!hasLibUrl) { - // let's assume it's a baseUrl then - if (versionMajor >= 1) { - return url.resolve(base, 'win-' + arch + '/' + name + '.lib') - } - // prior to io.js@1.0.0 32-bit node.lib lives in /, 64-bit lives in /x64/ - return url.resolve(base, (arch === 'x86' ? '' : arch + '/') + name + '.lib') - } - - // else we have a proper url to a .lib, just make sure it's the right arch - return defaultUrl.replace(versionMajor === 3 ? bitsreV3 : bitsre, '/win-' + arch + '/') -} - -module.exports = processRelease diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/rebuild.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/rebuild.js deleted file mode 100644 index a1c5b27..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/rebuild.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -function rebuild (gyp, argv, callback) { - gyp.todo.push( - { name: 'clean', args: [] } - , { name: 'configure', args: argv } - , { name: 'build', args: [] } - ) - process.nextTick(callback) -} - -module.exports = rebuild -module.exports.usage = 'Runs "clean", "configure" and "build" all at once' diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/remove.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/remove.js deleted file mode 100644 index 8c945e5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/remove.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict' - -const fs = require('fs') -const rm = require('rimraf') -const path = require('path') -const log = require('npmlog') -const semver = require('semver') - -function remove (gyp, argv, callback) { - var devDir = gyp.devDir - log.verbose('remove', 'using node-gyp dir:', devDir) - - // get the user-specified version to remove - var version = argv[0] || gyp.opts.target - log.verbose('remove', 'removing target version:', version) - - if (!version) { - return callback(new Error('You must specify a version number to remove. Ex: "' + process.version + '"')) - } - - var versionSemver = semver.parse(version) - if (versionSemver) { - // flatten the version Array into a String - version = versionSemver.version - } - - var versionPath = path.resolve(gyp.devDir, version) - log.verbose('remove', 'removing development files for version:', version) - - // first check if its even installed - fs.stat(versionPath, function (err) { - if (err) { - if (err.code === 'ENOENT') { - callback(null, 'version was already uninstalled: ' + version) - } else { - callback(err) - } - return - } - // Go ahead and delete the dir - rm(versionPath, callback) - }) -} - -module.exports = exports = remove -module.exports.usage = 'Removes the node development files for the specified version' diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/util.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/util.js deleted file mode 100644 index 3e23c62..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/lib/util.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict' - -const log = require('npmlog') -const execFile = require('child_process').execFile -const path = require('path') - -function logWithPrefix (log, prefix) { - function setPrefix (logFunction) { - return (...args) => logFunction.apply(null, [ prefix, ...args ]) // eslint-disable-line - } - return { - silly: setPrefix(log.silly), - verbose: setPrefix(log.verbose), - info: setPrefix(log.info), - warn: setPrefix(log.warn), - error: setPrefix(log.error) - } -} - -function regGetValue (key, value, addOpts, cb) { - const outReValue = value.replace(/\W/g, '.') - const outRe = new RegExp(`^\\s+${outReValue}\\s+REG_\\w+\\s+(\\S.*)$`, 'im') - const reg = path.join(process.env.SystemRoot, 'System32', 'reg.exe') - const regArgs = ['query', key, '/v', value].concat(addOpts) - - log.silly('reg', 'running', reg, regArgs) - const child = execFile(reg, regArgs, { encoding: 'utf8' }, - function (err, stdout, stderr) { - log.silly('reg', 'reg.exe stdout = %j', stdout) - if (err || stderr.trim() !== '') { - log.silly('reg', 'reg.exe err = %j', err && (err.stack || err)) - log.silly('reg', 'reg.exe stderr = %j', stderr) - return cb(err, stderr) - } - - const result = outRe.exec(stdout) - if (!result) { - log.silly('reg', 'error parsing stdout') - return cb(new Error('Could not parse output of reg.exe')) - } - log.silly('reg', 'found: %j', result[1]) - cb(null, result[1]) - }) - child.stdin.end() -} - -function regSearchKeys (keys, value, addOpts, cb) { - var i = 0 - const search = () => { - log.silly('reg-search', 'looking for %j in %j', value, keys[i]) - regGetValue(keys[i], value, addOpts, (err, res) => { - ++i - if (err && i < keys.length) { return search() } - cb(err, res) - }) - } - search() -} - -module.exports = { - logWithPrefix: logWithPrefix, - regGetValue: regGetValue, - regSearchKeys: regSearchKeys -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/macOS_Catalina.md b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/macOS_Catalina.md deleted file mode 100644 index 4fe0f29..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/macOS_Catalina.md +++ /dev/null @@ -1,104 +0,0 @@ -# Installation notes for macOS Catalina (v10.15) - -_This document specifically refers to upgrades from previous versions of macOS to Catalina (10.15). It should be removed from the source repository when Catalina ceases to be the latest macOS version or when future Catalina versions no longer raise these issues._ - -**Both upgrading to macOS Catalina and running a Software Update in Catalina may cause normal `node-gyp` installations to fail. This might manifest as the following error during `npm install`:** - -```console -gyp: No Xcode or CLT version detected! -``` - -## node-gyp v7 - -The newest release of `node-gyp` should solve this problem. If you are using `node-gyp` directly then you should be able to install v7 and use it as-is. - -If you need to use `node-gyp` from within `npm` (e.g. through `npm install`), you will have to install `node-gyp` (either globally with `-g` or to a predictable location) and tell `npm` where the new version is. Either use: - -* `npm config set node_gyp `; or -* run `npm` with an environment variable prefix: `npm_config_node_gyp= npm install` - -Where "path to node-gyp" is to the `node-gyp` executable which may be a symlink in your global bin directory (e.g. `/usr/local/bin/node-gyp`), or a path to the `node-gyp` installation directory and the `bin/node-gyp.js` file within it (e.g. `/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js`). - -**If you use `npm config set` to change your global `node_gyp` you are responsible for keeping it up to date and can't rely on `npm` to give you a newer version when available.** Use `npm config delete node_gyp` to unset this configuration option. - -## Fixing Catalina for older versions of `node-gyp` - -### Is my Mac running macOS Catalina? -Let's first make sure that your Mac is running Catalina: -``` -% sw_vers - ProductName: Mac OS X - ProductVersion: 10.15 - BuildVersion: 19A602 -``` -If `ProductVersion` is less then `10.15` then this document is not for you. Normal install docs for `node-gyp` on macOS can be found at https://github.com/nodejs/node-gyp#on-macos - - -### The acid test -To see if `Xcode Command Line Tools` is installed in a way that will work with `node-gyp`, run: -``` -curl -sL https://github.com/nodejs/node-gyp/raw/master/macOS_Catalina_acid_test.sh | bash -``` - -If test succeeded, _you are done_! You should be ready to [install](https://github.com/nodejs/node-gyp#installation) `node-gyp`. - -If test failed, there is a problem with your Xcode Command Line Tools installation. [Continue to Solutions](#Solutions). - -### Solutions -There are three ways to install the Xcode libraries `node-gyp` needs on macOS. People running Catalina have had success with some but not others in a way that has been unpredictable. - -1. With the full Xcode (~7.6 GB download) from the `App Store` app. -2. With the _much_ smaller Xcode Command Line Tools via `xcode-select --install` -3. With the _much_ smaller Xcode Command Line Tools via manual download. **For people running the latest version of Catalina (10.15.2 at the time of this writing), this has worked when the other two solutions haven't.** - -### Installing `node-gyp` using the full Xcode -1. `xcodebuild -version` should show `Xcode 11.1` or later. - * If not, then install/upgrade Xcode from the App Store app. -2. Open the Xcode app and... - * Under __Preferences > Locations__ select the tools if their location is empty. - * Allow Xcode app to do an essential install of the most recent compiler tools. -3. Once all installations are _complete_, quit out of Xcode. -4. `sudo xcodebuild -license accept` # If you agree with the licensing terms. -5. `softwareupdate -l` # No listing is a good sign. - * If Xcode or Tools upgrades are listed, use "Software Upgrade" to install them. -6. `xcode-select -version` # Should return `xcode-select version 2370` or later. -7. `xcode-select -print-path` # Should return `/Applications/Xcode.app/Contents/Developer` -8. Try the [_acid test_ steps above](#The-acid-test) to see if your Mac is ready. -9. If the _acid test_ does _not_ pass then... -10. `sudo xcode-select --reset` # Enter root password. No output is normal. -11. Repeat step 7 above. Is the path different this time? Repeat the _acid test_. - -### Installing `node-gyp` using the Xcode Command Line Tools via `xcode-select --install` -1. If the _acid test_ has not succeeded, then try `xcode-select --install` -2. If the installation command returns `xcode-select: error: command line tools are already installed, use "Software Update" to install updates`, continue to [remove and reinstall](#i-did-all-that-and-the-acid-test-still-does-not-pass--) -3. Wait until the install process is _complete_. -4. `softwareupdate -l` # No listing is a good sign. - * If Xcode or Tools upgrades are listed, use "Software Update" to install them. -5. `xcode-select -version` # Should return `xcode-select version 2370` or later. -6. `xcode-select -print-path` # Should return `/Library/Developer/CommandLineTools` -7. Try the [_acid test_ steps above](#The-acid-test) to see if your Mac is ready. -8. If the _acid test_ does _not_ pass then... -9. `sudo xcode-select --reset` # Enter root password. No output is normal. -10. Repeat step 5 above. Is the path different this time? Repeat the _acid test_. - -### Installing `node-gyp` using the Xcode Command Line Tools via manual download -1. Download the appropriate version of the "Command Line Tools for Xcode" for your version of Catalina from . As of MacOS 10.15.5, that's [Command_Line_Tools_for_Xcode_11.5.dmg](https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_11.5/Command_Line_Tools_for_Xcode_11.5.dmg) -2. Install the package. -3. Run the [_acid test_ steps above](#The-acid-test). - -### I did all that and the acid test still does not pass :-( -1. `sudo rm -rf $(xcode-select -print-path)` # Enter root password. No output is normal. -2. `sudo rm -rf /Library/Developer/CommandLineTools` # Enter root password. -3. `sudo xcode-select --reset` -4. `xcode-select --install` -5. If the [_acid test_ steps above](#The-acid-test) still does _not_ pass then... -6. `npm explore npm -g -- npm install node-gyp@latest` -7. `npm explore npm -g -- npm explore npm-lifecycle -- npm install node-gyp@latest` -8. If the _acid test_ still does _not_ pass then... -9. Add a comment to https://github.com/nodejs/node-gyp/issues/1927 so we can improve. - -Lessons learned from: -* https://github.com/nodejs/node-gyp/issues/1779 -* https://github.com/nodejs/node-gyp/issues/1861 -* https://github.com/nodejs/node-gyp/issues/1927 and elsewhere -* Thanks to @rrrix for discovering Solution 3 diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/macOS_Catalina_acid_test.sh b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/macOS_Catalina_acid_test.sh deleted file mode 100644 index e1e9894..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/macOS_Catalina_acid_test.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -pkgs=( - "com.apple.pkg.DeveloperToolsCLILeo" # standalone - "com.apple.pkg.DeveloperToolsCLI" # from XCode - "com.apple.pkg.CLTools_Executables" # Mavericks -) - -for pkg in "${pkgs[@]}"; do - output=$(/usr/sbin/pkgutil --pkg-info "$pkg" 2>/dev/null) - if [ "$output" ]; then - version=$(echo "$output" | grep 'version' | cut -d' ' -f2) - break - fi -done - -if [ "$version" ]; then - echo "Command Line Tools version: $version" -else - echo >&2 'Command Line Tools not found' -fi diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/node-gyp b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/node-gyp deleted file mode 100755 index 243c84d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/node-gyp +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../bin/node-gyp.js" "$@" -else - exec node "$basedir/../../bin/node-gyp.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/node-which b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/node-which deleted file mode 100755 index 478c9af..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/node-which +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/which/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/which/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/which/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules/which/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/which@2.0.2/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../which@2.0.2/node_modules/which/bin/node-which" "$@" -else - exec node "$basedir/../../../../../which@2.0.2/node_modules/which/bin/node-which" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/nopt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/nopt deleted file mode 100755 index cc42eec..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/nopt +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../nopt@5.0.0/node_modules/nopt/bin/nopt.js" "$@" -else - exec node "$basedir/../../../../../nopt@5.0.0/node_modules/nopt/bin/nopt.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/rimraf b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/rimraf deleted file mode 100755 index c35a660..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/rimraf +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rimraf@3.0.2/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../rimraf@3.0.2/node_modules/rimraf/bin.js" "$@" -else - exec node "$basedir/../../../../../rimraf@3.0.2/node_modules/rimraf/bin.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/semver b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/semver deleted file mode 100755 index c989c0e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/node_modules/.bin/semver +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules/semver/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/semver@7.8.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../semver@7.8.3/node_modules/semver/bin/semver.js" "$@" -else - exec node "$basedir/../../../../../semver@7.8.3/node_modules/semver/bin/semver.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/package.json b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/package.json deleted file mode 100644 index fbeae5e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "node-gyp", - "description": "Node.js native addon build tool", - "license": "MIT", - "keywords": [ - "native", - "addon", - "module", - "c", - "c++", - "bindings", - "gyp" - ], - "version": "8.4.1", - "installVersion": 9, - "author": "Nathan Rajlich (http://tootallnate.net)", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/node-gyp.git" - }, - "preferGlobal": true, - "bin": "./bin/node-gyp.js", - "main": "./lib/node-gyp.js", - "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "engines": { - "node": ">= 10.12.0" - }, - "devDependencies": { - "bindings": "^1.5.0", - "nan": "^2.14.2", - "require-inject": "^1.4.4", - "standard": "^14.3.4", - "tap": "^12.7.0" - }, - "scripts": { - "lint": "standard */*.js test/**/*.js", - "test": "npm run lint && tap --timeout=120 test/test-*" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/src/win_delay_load_hook.cc b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/src/win_delay_load_hook.cc deleted file mode 100644 index 169f802..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/src/win_delay_load_hook.cc +++ /dev/null @@ -1,39 +0,0 @@ -/* - * When this file is linked to a DLL, it sets up a delay-load hook that - * intervenes when the DLL is trying to load the host executable - * dynamically. Instead of trying to locate the .exe file it'll just - * return a handle to the process image. - * - * This allows compiled addons to work when the host executable is renamed. - */ - -#ifdef _MSC_VER - -#pragma managed(push, off) - -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif - -#include - -#include -#include - -static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) { - HMODULE m; - if (event != dliNotePreLoadLibrary) - return NULL; - - if (_stricmp(info->szDll, HOST_BINARY) != 0) - return NULL; - - m = GetModuleHandle(NULL); - return (FARPROC) m; -} - -decltype(__pfnDliNotifyHook2) __pfnDliNotifyHook2 = load_exe_hook; - -#pragma managed(pop) - -#endif diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/common.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/common.js deleted file mode 100644 index b714ee2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/common.js +++ /dev/null @@ -1,3 +0,0 @@ -const envPaths = require('env-paths') - -module.exports.devDir = () => envPaths('node-gyp', { suffix: '' }).cache diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt deleted file mode 100644 index 244f6b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt +++ /dev/null @@ -1 +0,0 @@ -[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools","version":"15.9.28307.665","packages":["Microsoft.VisualStudio.Product.BuildTools","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.JavaScript.LanguageService","Microsoft.VisualStudio.JavaScript.LanguageService.Resources","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.CodeAnalysis.VisualStudio.Setup.Resources","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.CodeAnalysis.ExpressionEvaluator.Resources","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.Debugger.Resources","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.PackageGroup.CoreEditor","PortableFacades","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.DiaSymReader","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer","Microsoft.TeamFoundation.OfficeIntegration","Microsoft.TeamFoundation.OfficeIntegration.Resources","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.SLNX.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Editors","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.Component.Windows10SDK.17134","Win10SDK_10.0.17134","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.Workload.MSBuildTools","Microsoft.VisualStudio.Component.CoreBuildTools","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.BuildTools.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Component.MSBuild","Microsoft.PythonTools.BuildCore.Vsix","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers.Resources","Microsoft.CodeAnalysis.Compilers","Microsoft.Net.PackageGroup.4.6.1.Redist","Microsoft.VisualStudio.NativeImageSupport","Microsoft.Build"]}] diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt deleted file mode 100644 index dd5e77d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt +++ /dev/null @@ -1 +0,0 @@ -[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community","version":"15.9.28307.665","packages":["Microsoft.VisualStudio.Component.Windows10SDK.IpOverUsb","Win10SDK_IpOverUsb","Microsoft.VisualStudio.Component.VC.ATL.ARM64","Microsoft.VisualCpp.ATL.ARM64","Microsoft.VisualStudio.Component.VC.ATL.ARM","Microsoft.VisualCpp.ATL.ARM","Microsoft.VisualStudio.Component.VC.Tools.ARM","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualStudio.Graphics.Analyzer.Resources","Microsoft.Icecap.Analysis","Microsoft.VisualCpp.CRT.Redist.arm.OneCore.Desktop","Microsoft.VisualCpp.CRT.arm.Store","Microsoft.VisualCpp.CRT.arm.Desktop","Microsoft.VisualStudio.PackageGroup.VC.Tools.x64.ARM","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetarm","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetARM.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM.Resources","Microsoft.VisualCpp.Premium.Tools.ARM.Base","Microsoft.VisualCpp.Premium.Tools.ARM.Base.Resources","Microsoft.VisualCpp.PGO.ARM","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualStudio.Product.Community","Microsoft.VisualCpp.Tools.Hostx86.Targetarm","Microsoft.VisualStudio.Component.VC.Tools.ARM64","Microsoft.VisualStudio.VC.MSBuild.Arm64","Microsoft.VisualCpp.CRT.Redist.ARM64.OneCore.Desktop","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.CRT.ARM64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ARM64.Store","Microsoft.VisualCpp.CRT.ARM64.Desktop","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.Icecap.Analysis.Resources","Microsoft.VisualCpp.VCTip.hostX86.targetARM","Microsoft.VisualStudio.PackageGroup.VC.Tools.x64.ARM64","Microsoft.VisualCpp.Tools.Core","Microsoft.VisualCpp.PGO.ARM64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetarm64","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetARM64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM64.Resources","Microsoft.VisualCpp.Premium.Tools.ARM64.Base","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Tools.HostX86.TargetARM.Resources","Microsoft.VisualCpp.CRT.Redist.ARM64","Microsoft.VisualCpp.CRT.arm.OneCore.Desktop","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Component.WixToolset.VisualStudioExtension.Dev15","WixToolset.VisualStudioExtension.Dev15","Microsoft.VisualCpp.MFC.X64","Microsoft.VisualCpp.ATL.Headers","Microsoft.VisualStudio.Component.VC.CMake.Project","Microsoft.VisualStudio.VC.CMake","Microsoft.VisualStudio.VC.CMake.Project","Microsoft.VisualStudio.Component.Windows10SDK.17763","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","MLGen","Microsoft.VisualStudio.Graphics.Analyzer","Microsoft.VisualStudio.Component.TestTools.Core","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.NuGet.Licenses","SQLCommon","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualCpp.Tools.HostX64.TargetARM","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualCpp.HTMLHelpWorkshop.Msi","Microsoft.Icecap.Collection.Msi.Resources","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.VCTip.hostX64.targetARM","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Templates.UnitTest","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.Graphics.Appid","Microsoft.VisualCpp.ATL.Source","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.Debugger.ImmersiveActivateHelper.Msi","Microsoft.VisualStudio.Debugger.JustInTime","Microsoft.DiagnosticsHub.CpuSampling","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common","Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res","Microsoft.VisualStudio.ProTools.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualCpp.Tools.HostX64.TargetARM.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent","Microsoft.Component.MSBuild","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.WebToolsExtensions","Microsoft.VisualCpp.Tools.Hostx86.Targetarm64","Microsoft.VisualStudio.TextTemplating.MSBuild","Microsoft.VisualCpp.VCTip.hostX86.targetARM64","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualCpp.Tools.HostX86.TargetARM64.Resources","Microsoft.VisualStudio.RazorExtension","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualCpp.MFC.Source","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.Graphics.Viewers","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.MFC.Redist.X86","Microsoft.VisualStudio.WebToolsExtensions.Chip","Microsoft.DiagnosticsHub.Runtime.Resources","Microsoft.DiagnosticsHub.CpuSampling.Targeted","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.Component.VC.DiagnosticTools","Microsoft.VisualCpp.MFC.Redist.X64","Microsoft.VisualStudio.PackageGroup.TestTools.Native","Microsoft.VisualStudio.Graphics.Viewers.Resources","Microsoft.VisualCpp.MFC.MBCS","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Component.TextTemplating","Win10SDK_10.0.17763","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.VisualCpp.MFC.MBCS.X64","Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage","Microsoft.VisualStudio.Graphics.EnableTools","Microsoft.VisualStudio.Graphics.Appid.Resources","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualCpp.MFC.Headers","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.Graphics.Analyzer.Targeted","Microsoft.VisualCpp.CRT.Headers","Microsoft.DiagnosticsHub.Runtime.Targeted","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetARM64","Microsoft.VisualCpp.VCTip.hostX64.targetARM64","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.Icecap.Collection.Msi","Microsoft.VisualCpp.ATL.X86","Microsoft.VisualCpp.Tools.HostX64.TargetARM64.Resources","Microsoft.VisualStudio.Component.VC.ATLMFC","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.Icecap.Collection.Msi.Resources.Targeted","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualStudio.Component.Graphics.Tools","Microsoft.VisualStudio.WebTools.Resources","Microsoft.VisualCpp.ATL.X64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualStudio.Component.Graphics.Win81","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.Icecap.Analysis.Resources.Targeted","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.MFC.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualStudio.TextTemplating.Core","Microsoft.VisualStudio.JavaScript.LanguageService","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.CredentialProvider","Microsoft.VisualStudio.VC.Templates.Desktop","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core","Microsoft.VisualStudio.TextTemplating.Integration","Microsoft.VisualStudio.Component.NuGet","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualCpp.PGO.Headers","Microsoft.DiagnosticsHub.Collection","Microsoft.Icecap.Collection.Msi.Targeted","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.WebTools.WSP.FSA","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualStudio.Branding.Community","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.WebToolsExtensions.Common","Microsoft.VisualStudio.WebTools.MSBuild","Microsoft.VisualStudio.NuGet.Core","Microsoft.DiagnosticsHub.Collection.Service","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.DiaSymReader.Native","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.Community.Extra.Resources","Microsoft.VisualStudio.Component.Roslyn.LanguageServices","Microsoft.DiagnosticsHub.Collection.StopService.Install","Microsoft.VisualStudio.InteractiveWindow","Microsoft.PackageGroup.DiagnosticsHub.Platform","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.Community.Extra","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestTools","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources","Microsoft.VisualStudio.PackageGroup.TestTools.Core","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualStudio.TestTools.Pex.Common","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy","Microsoft.VisualStudio.PackageGroup.MinShell.Interop","Microsoft.CodeAnalysis.ExpressionEvaluator.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional","Microsoft.VisualStudio.Debugger.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors","sqlsysclrtypes","Microsoft.VisualStudio.ProTools","Component.Microsoft.VisualStudio.RazorExtension","Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI","Microsoft.Build.Dependencies","Microsoft.VisualStudio.WebTools.WSP.FSA.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualStudio.VC.Ide.ATL.Resources","Microsoft.VisualStudio.VC.Templates.UnitTest.Resources","Microsoft.VisualStudio.Debugger.Managed","Microsoft.VisualStudio.Workload.NativeDesktop","Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest","Microsoft.VisualStudio.Debugger.JustInTime.Msi","Microsoft.Net.PackageGroup.4.6.1.Redist","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","sqlsysclrtypes","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.TestTools.TestWIExtension","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.WebTools","Microsoft.VisualStudio.Component.VC.Redist.14.Latest","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.TextTemplating.Integration.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.TeamFoundation.OfficeIntegration.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.JavaScript.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest","Microsoft.VisualStudio.PackageGroup.Community","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.Component.Windows10SDK.17134","Microsoft.VisualStudio.PackageGroup.Core","PortableFacades","Microsoft.DiaSymReader","Microsoft.DiagnosticsHub.Runtime","Microsoft.VisualStudio.Component.CoreEditor","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.Community","Microsoft.TeamFoundation.OfficeIntegration","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualCpp.Tools.Common.UtilsPrereq","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.ServiceHub","Microsoft.VisualStudio.Editors","Microsoft.VisualStudio.TeamExplorer","Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents.Resources","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.GraphProvider","Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents","Microsoft.CodeAnalysis.VisualStudio.Setup.Interactive.Resources","Microsoft.CodeAnalysis.VisualStudio.Setup.Resources","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.NuGet.Build.Tasks","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.CodeAnalysis.Compilers.Resources","Microsoft.CodeAnalysis.Compilers","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.Build","Microsoft.VisualStudio.VC.Ide.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.ATL","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.Workload.CoreEditor","Microsoft.VisualStudio.MinShell.Interop","Microsoft.Build.FileTracker.Msi","Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core","Microsoft.MSHtml","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips","Microsoft.VisualStudio.Devenv.Msi","Microsoft.VisualStudio.Component.VC.ATL","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualStudio.SLNX.VSIX","Microsoft.VisualStudio.CoreEditor","Win10SDK_10.0.17134","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.Component.Debugger.JustInTime","Microsoft.VisualStudio.VC.Ide.MFC","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.PackageGroup.TeamExplorer","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.Devenv","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualStudio.Devenv.Resources","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.MefHosting","Microsoft.DiagnosticsHub.Collection.StopService.Uninstall","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualCpp.MFC.X86","Microsoft.VisualStudio.Log.Resources","Microsoft.Icecap.Analysis.Targeted","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.MinShell.x86","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.LanguageServer","Microsoft.VisualStudio.NativeImageSupport","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.Devenv.Config","Microsoft.VisualStudio.MinShell.Resources","Microsoft.VisualStudio.Initializer","Microsoft.Net.PackageGroup.4.6.Redist"]}] diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Express.txt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Express.txt deleted file mode 100644 index c4b3b5f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Express.txt +++ /dev/null @@ -1 +0,0 @@ -[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\WDExpress","version":"15.9.28307.858","packages":["Microsoft.VisualStudio.Product.WDExpress","Microsoft.VisualStudio.Workload.WDExpress","Microsoft.VisualStudio.Component.Windows10SDK.17763","MLGen","Win10SDK_10.0.17763","Microsoft.VisualStudio.Component.Windows10SDK.14393","Win10SDK_10.0.14393.795","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.Component.VC.Tools.ARM64","Microsoft.VisualStudio.VC.MSBuild.Arm64","Microsoft.VisualCpp.CRT.Redist.ARM64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.ARM64","Microsoft.VisualCpp.CRT.ARM64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ARM64.Store","Microsoft.VisualCpp.CRT.ARM64.Desktop","Microsoft.VisualCpp.Tools.Hostx86.Targetarm64","Microsoft.VisualCpp.VCTip.hostX86.targetARM64","Microsoft.VisualCpp.Tools.HostX86.TargetARM64.Resources","Microsoft.VisualStudio.Component.VC.Tools.ARM","Microsoft.VisualCpp.Tools.Hostx86.Targetarm","Microsoft.VisualCpp.VCTip.hostX86.targetARM","Microsoft.VisualCpp.Tools.HostX86.TargetARM.Resources","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.arm.OneCore.Desktop","Microsoft.VisualCpp.CRT.arm.OneCore.Desktop","Microsoft.VisualCpp.CRT.arm.Store","Microsoft.VisualCpp.CRT.arm.Desktop","Microsoft.VisualStudio.VC.Templates.UnitTest","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP","Microsoft.VisualStudio.VC.Templates.UnitTest.Resources","Microsoft.VisualStudio.VC.Templates.Desktop","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.JavaScript.LanguageService","Microsoft.VisualStudio.JavaScript.LanguageService.Resources","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.VisualStudio.Component.VC.CLI.Support","Microsoft.VisualCpp.CLI.X86","Microsoft.VisualCpp.CLI.X64","Microsoft.VisualCpp.CLI.Source","Microsoft.VisualCpp.CLI.ARM64","Microsoft.VisualCpp.CLI.ARM","Microsoft.VisualStudio.VC.Templates.CLR","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Templates.CLR.Resources","Microsoft.Component.VC.Runtime.OSSupport","Microsoft.Windows.UniversalCRT.Tools.Msi","Microsoft.Windows.UniversalCRT.Tools.Msi","Microsoft.Windows.UniversalCRT.ExtensionSDK.Msi","Microsoft.Windows.UniversalCRT.HeadersLibsSources.Msi","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.Component.HelpViewer","Microsoft.HelpViewer","Microsoft.VisualStudio.Help.Configuration.Msi","Microsoft.VisualStudio.Component.SQL.DataSources","Microsoft.VisualStudio.Component.SQL.SSDT","Microsoft.VisualStudio.Component.SQL.CMDUtils","sqlcmdlnutils","Microsoft.VisualStudio.Component.Common.Azure.Tools","Microsoft.VisualStudio.Azure.CommonAzureTools","SSDT","Microsoft.VisualStudio.Component.SQL.ADAL","sql_adalsql","Microsoft.VisualStudio.Component.NuGet","Microsoft.CredentialProvider","Microsoft.VisualStudio.NuGet.Licenses","Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime","Microsoft.VisualStudio.Component.SQL.NCLI","sqllocaldb","sqlncli","Microsoft.VisualStudio.Component.EntityFramework","Microsoft.VisualStudio.PackageGroup.DslRuntime","Microsoft.VisualStudio.Dsl.Core","Microsoft.VisualStudio.Dsl.GraphObject","Microsoft.VisualStudio.Dsl.Core.Resources","Microsoft.VisualStudio.EntityFrameworkTools","Microsoft.VisualStudio.EntityFrameworkTools.Msi","Microsoft.VisualStudio.Component.Roslyn.LanguageServices","Microsoft.VisualStudio.InteractiveWindow","Microsoft.DiaSymReader.Native","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents.Resources","Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents","Microsoft.CodeAnalysis.VisualStudio.Setup.Interactive.Resources","Microsoft.Net.ComponentGroup.TargetingPacks.Common","Microsoft.Net.Component.4.6.TargetingPack","Microsoft.Net.4.6.TargetingPack","Microsoft.Net.Component.4.5.2.TargetingPack","Microsoft.Net.4.5.2.TargetingPack","Microsoft.Net.Component.4.5.1.TargetingPack","Microsoft.Net.4.5.1.TargetingPack","Microsoft.Net.Component.4.5.TargetingPack","Microsoft.Net.4.5.TargetingPack","Microsoft.Net.Component.4.TargetingPack","Microsoft.Net.4.TargetingPack","Microsoft.Net.ComponentGroup.DevelopmentPrerequisites","Microsoft.Net.Component.4.6.1.TargetingPack","Microsoft.Net.4.6.1.TargetingPack","Microsoft.Net.Cumulative.TargetingPack.Resources","Microsoft.Net.Component.4.6.1.SDK","Microsoft.Net.4.6.1.SDK","Microsoft.VisualStudio.Component.TextTemplating","Microsoft.VisualStudio.TextTemplating.MSBuild","Microsoft.VisualStudio.TextTemplating.Integration","Microsoft.VisualStudio.TextTemplating.Core","Microsoft.VisualStudio.TextTemplating.Integration.Resources","Microsoft.VisualStudio.Component.VisualStudioData","Microsoft.VisualStudio.Component.SQL.CLR","Microsoft.VisualStudio.ProTools","sqlsysclrtypes","sqlsysclrtypes","SQLCommon","Microsoft.VisualStudio.ProTools.Resources","Microsoft.VisualStudio.XamlDiagnostics","Microsoft.VisualStudio.XamlDiagnostics.Resources","Microsoft.VisualStudio.XamlDesigner","Microsoft.VisualStudio.XamlDesigner.Resources","Microsoft.VisualStudio.XamlDesigner.Executables","Microsoft.VisualStudio.XamlShared","Microsoft.VisualStudio.XamlShared.Resources","Microsoft.VisualStudio.PackageGroup.TestTools.Managed","Microsoft.VisualStudio.PackageGroup.IntelliTrace.Core","Microsoft.IntelliTrace.Core","Microsoft.IntelliTrace.Core.Targeted","Microsoft.IntelliTrace.ProfilerProxy.Msi.x64","Microsoft.IntelliTrace.ProfilerProxy.Msi","Microsoft.VisualStudio.NuGet.Core","Microsoft.VisualStudio.TestWindow.SourceBasedTestDiscovery","Microsoft.VisualStudio.TestWindow.Dotnet","Microsoft.VisualStudio.TestTools.TestGeneration","Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage","Microsoft.VisualStudio.PackageGroup.TestTools.Enterprise","Microsoft.VisualStudio.PackageGroup.TestTools.MSTestV2.Managed","Microsoft.VisualStudio.TestTools.MSTestV2.WizardExtension.UnitTest","Microsoft.VisualStudio.PackageGroup.TestTools.Core","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.Pex.Common","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy","Microsoft.VisualStudio.PackageGroup.MinShell.Interop","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestTools","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common","Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.TestTools.TestWIExtension","Microsoft.VisualStudio.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors","Microsoft.Component.ClickOnce","Microsoft.VisualStudio.PackageGroup.ClickOnce.MSBuild","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.ClickOnce.SignTool.Msi","Microsoft.SQL.ClickOnceBootstrapper.Msi","Microsoft.Net.ClickOnceBootstrapper","Microsoft.ClickOnce.BootStrapper.Msi.Resources","Microsoft.ClickOnce.BootStrapper.Msi","Microsoft.VisualStudio.WebTools.WSP.FSA","Microsoft.VisualStudio.WebTools.WSP.FSA.Resources","Microsoft.VisualStudio.PackageGroup.Community","Microsoft.VisualStudio.Community.Extra.Resources","Microsoft.VisualStudio.Community.Extra","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.CodeAnalysis.VisualStudio.Setup.Resources","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.CodeAnalysis.ExpressionEvaluator.Resources","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.Debugger.Resources","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.Editors","Microsoft.VisualStudio.ClickOnce.Resources","Microsoft.VisualStudio.ClickOnce","Microsoft.Component.MSBuild","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers.Resources","Microsoft.CodeAnalysis.Compilers","Microsoft.Net.PackageGroup.4.6.1.Redist","Microsoft.VisualStudio.TemplateEngine","Microsoft.VisualStudio.WebToolsExtensions.Common","Microsoft.NET.Sdk","Microsoft.VisualStudio.PackageGroup.TestTools.Templates.Managed","Microsoft.VisualStudio.TestTools.Templates.Managed","Microsoft.VisualStudio.TestTools.Templates.Managed.Resources","Microsoft.VisualStudio.Templates.VB.MSTestv2.Desktop.UnitTest","Microsoft.VisualStudio.Templates.CS.MSTestv2.Desktop.UnitTest","Microsoft.VisualStudio.Templates.VB.Wpf","Microsoft.VisualStudio.Templates.VB.Wpf.Resources","Microsoft.VisualStudio.Templates.VB.Winforms","Microsoft.VisualStudio.Templates.VB.ManagedCore","Microsoft.VisualStudio.Templates.VB.Shared","Microsoft.VisualStudio.Templates.VB.Shared.Resources","Microsoft.VisualStudio.Templates.VB.ManagedCore.Resources","Microsoft.VisualStudio.Templates.CS.GettingStarted.Desktop.Package","Microsoft.VisualStudio.Templates.GetStarted.Desktop.Setup","Microsoft.VisualStudio.Templates.CS.GettingStarted.Console.Package","Microsoft.VisualStudio.Templates.GetStarted.Resources","Microsoft.VisualStudio.Templates.GetStarted.Common.Setup","Microsoft.VisualStudio.Templates.GetStarted.Console.Setup","Microsoft.VisualStudio.Templates.CS.Wpf","Microsoft.VisualStudio.Templates.CS.Wpf.Resources","Microsoft.VisualStudio.Templates.CS.Winforms","Microsoft.VisualStudio.Templates.CS.ManagedCore","Microsoft.VisualStudio.Templates.CS.Shared","Microsoft.VisualStudio.Templates.Editorconfig.Wizard.Setup","Templates.Editorconfig.SolutionFile.Setup","Microsoft.VisualStudio.Templates.CS.Shared.Resources","Microsoft.VisualStudio.Templates.CS.ManagedCore.Resources","Microsoft.VisualStudio.Component.CoreEditor","Microsoft.VisualStudio.PackageGroup.CoreEditor","PortableFacades","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.DiaSymReader","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Build","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer","Microsoft.TeamFoundation.OfficeIntegration","Microsoft.TeamFoundation.OfficeIntegration.Resources","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.SLNX.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.WDExpress","Microsoft.VisualStudio.WDExpress.Resources","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.MinShell.x86","Microsoft.VisualStudio.NativeImageSupport","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.LanguageServer","Microsoft.VisualStudio.MinShell.Resources","Microsoft.Net.PackageGroup.4.6.Redist","Microsoft.VisualStudio.Branding.WDExpress"]}] diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt deleted file mode 100644 index fc0a257..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt +++ /dev/null @@ -1 +0,0 @@ -[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildToolsUnusable","version":"15.9.28307.665","packages":["Microsoft.VisualStudio.Product.BuildTools","Microsoft.VisualStudio.Component.Windows10SDK.17134","Win10SDK_10.0.17134","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.Workload.MSBuildTools","Microsoft.VisualStudio.Component.CoreBuildTools","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.BuildTools.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Component.MSBuild","Microsoft.PythonTools.BuildCore.Vsix","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers.Resources","Microsoft.CodeAnalysis.Compilers","Microsoft.Net.PackageGroup.4.6.1.Redist","Microsoft.Net.4.6.1.FullRedist.NonThreshold","Microsoft.Windows.UniversalCRT.Msu.81","Microsoft.VisualStudio.NativeImageSupport","Microsoft.Build"]}] diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt deleted file mode 100644 index f07d254..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt +++ /dev/null @@ -1 +0,0 @@ -[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools","version":"16.1.28922.388","packages":["Microsoft.VisualStudio.Product.BuildTools","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.CodeSense.Community","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Platform.CallHierarchy","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer.Common","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.OpenFolder.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Platform.NavigateTo","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VisualC.Logging","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.VCPkgDatabase","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Agent","Microsoft.VisualStudio.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Concord","Microsoft.VisualStudio.VC.Ide.Debugger.Concord.Resources","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.DiaSymReader","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualStudio.Debugger.Concord.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed.Resources","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.PerfLib","Microsoft.VisualStudio.Debugger.Package.DiagHub.Client.VSx86","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.VisualStudio.Editors","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Platform.Editor","Microsoft.VisualStudio.Debugger.Concord","Microsoft.VisualStudio.Debugger.Concord.Resources","Microsoft.VisualStudio.Debugger.Resources","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.VisualStudio.Component.Windows10SDK.17134","Win10SDK_10.0.17134","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.VC.MSBuild.x86.v142","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.X64.v142","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM.v142","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.Workload.MSBuildTools","Microsoft.VisualStudio.Component.CoreBuildTools","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.BuildTools.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Component.MSBuild","Microsoft.PythonTools.BuildCore.Vsix","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers","Microsoft.Net.PackageGroup.4.7.2.Redist","Microsoft.VisualStudio.NativeImageSupport","Microsoft.Build","Microsoft.VisualStudio.PackageGroup.NuGet","Microsoft.VisualStudio.NuGet.BuildTools"]}] diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt deleted file mode 100644 index 50071c2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt +++ /dev/null @@ -1 +0,0 @@ -[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community","version":"16.1.28922.388","packages":["Microsoft.VisualStudio.Workload.NativeDesktop","Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest","Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForBoostTest","Microsoft.VisualStudio.Component.VC.ATL","Microsoft.VisualStudio.VC.Ide.ATL","Microsoft.VisualStudio.VC.Ide.ATL.Resources","Microsoft.VisualCpp.ATL.X86","Microsoft.VisualCpp.ATL.X64","Microsoft.VisualCpp.ATL.Source","Microsoft.VisualCpp.ATL.Headers","Microsoft.VisualStudio.Component.VC.CMake.Project","Microsoft.VisualStudio.VC.CMake","Microsoft.VisualStudio.VC.CMake.Project","Microsoft.VisualStudio.VC.ExternalBuildFramework","Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core","Microsoft.VisualStudio.PackageGroup.TestTools.Native","Microsoft.VisualStudio.Component.VC.Redist.14.Latest","Microsoft.VisualStudio.VC.Templates.UnitTest","Microsoft.VisualStudio.VC.UnitTest.Desktop.Build.Core","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP","Microsoft.VisualStudio.VC.Templates.UnitTest.Resources","Microsoft.VisualStudio.VC.Templates.Desktop","Microsoft.VisualStudio.Component.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.ImmersiveActivateHelper.Msi","Microsoft.VisualStudio.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.JustInTime.Msi","Microsoft.VisualStudio.Component.Windows10SDK.17763","Win10SDK_10.0.17763","Microsoft.VisualStudio.Component.VC.DiagnosticTools","Microsoft.VisualStudio.Component.Graphics.Tools","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.Graphics.Viewers","Microsoft.VisualStudio.Graphics.Viewers.Resources","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Analyzer","Microsoft.VisualStudio.Graphics.Analyzer.Targeted","Microsoft.VisualStudio.Graphics.Analyzer.Resources","Microsoft.VisualStudio.Graphics.Appid","Microsoft.VisualStudio.Graphics.Appid.Resources","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.VC.MSBuild.X64.v142","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM.v142","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.VC.MSBuild.x86.v142","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.VCPkgDatabase","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Component.Microsoft.VisualStudio.LiveShare","Microsoft.VisualStudio.LiveShare","Microsoft.Icecap.Analysis","Microsoft.Icecap.Analysis.Targeted","Microsoft.Icecap.Analysis.Resources","Microsoft.Icecap.Analysis.Resources.Targeted","Microsoft.Icecap.Collection.Msi","Microsoft.Icecap.Collection.Msi.Targeted","Microsoft.Icecap.Collection.Msi.Resources","Microsoft.Icecap.Collection.Msi.Resources.Targeted","Microsoft.DiagnosticsHub.Instrumentation","Microsoft.DiagnosticsHub.CpuSampling.ExternalDependencies","Microsoft.DiagnosticsHub.CpuSampling","Microsoft.DiagnosticsHub.CpuSampling.Targeted","Microsoft.PackageGroup.DiagnosticsHub.Platform","Microsoft.DiagnosticsHub.Runtime.ExternalDependencies","Microsoft.DiagnosticsHub.Runtime.ExternalDependencies.Targeted","Microsoft.DiagnosticsHub.Collection.ExternalDependencies.x64","Microsoft.DiagnosticsHub.Collection.StopService.Uninstall","Microsoft.DiagnosticsHub.Runtime","Microsoft.DiagnosticsHub.Runtime.Targeted","Microsoft.DiagnosticsHub.Collection","Microsoft.DiagnosticsHub.Collection.Service","Microsoft.DiagnosticsHub.Collection.StopService.Install","Microsoft.VisualStudio.Component.IntelliCode","Microsoft.VisualStudio.IntelliCode","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage","Microsoft.VisualStudio.PackageGroup.TestTools.Core","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.Pex.Common","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy","Microsoft.VisualStudio.PackageGroup.MinShell.Interop","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestTools","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common","Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.TestTools.TestWIExtension","Microsoft.VisualStudio.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors","Microsoft.VisualStudio.LiveShareApi","Microsoft.VisualStudio.Component.TextTemplating","Microsoft.VisualStudio.TextTemplating.MSBuild","Microsoft.VisualStudio.TextTemplating.Integration","Microsoft.VisualStudio.TextTemplating.Core","Microsoft.VisualStudio.TextTemplating.Integration.Resources","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.Component.MSBuild","Microsoft.NuGet.Build.Tasks","Microsoft.DiagnosticsHub.KB2882822.Win7","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions","Microsoft.VisualStudio.ProTools","sqlsysclrtypes","sqlsysclrtypes","SQLCommon","Microsoft.VisualStudio.ProTools.Resources","Microsoft.VisualStudio.WebToolsExtensions","Microsoft.VisualStudio.WebTools","Microsoft.VisualStudio.WebTools.Resources","Microsoft.VisualStudio.WebTools.MSBuild","Microsoft.VisualStudio.WebTools.WSP.FSA","Microsoft.VisualStudio.WebTools.WSP.FSA.Resources","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.VisualC.Logging","Microsoft.WebTools.Shared","Microsoft.WebTools.DotNet.Core.ItemTemplates","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.Windows.UniversalCRT.Msu.7","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers","Microsoft.VisualStudio.Component.NuGet","Microsoft.CredentialProvider","Microsoft.VisualStudio.NuGet.PowershellBindingRedirect","Microsoft.VisualStudio.NuGet.Licenses","Microsoft.VisualStudio.PackageGroup.Community","Microsoft.VisualStudio.Community.Extra.Resources","Microsoft.VisualStudio.Community.Extra","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.CodeSense.Community","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Agent","Microsoft.VisualStudio.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Concord","Microsoft.VisualStudio.VC.Ide.Debugger.Concord.Resources","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualStudio.Debugger.Concord.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed.Resources","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote.DbgHelp.Win8","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote.DbgHelp.Win8","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.Debugger.Package.DiagHub.Client.VSx86","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.DbgHelp.Win8","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.Debugger.Concord","Microsoft.VisualStudio.Debugger.Concord.Resources","Microsoft.VisualStudio.Debugger.Resources","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Platform.CallHierarchy","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.Devenv.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.Editors","Microsoft.VisualStudio.Product.Community","Microsoft.VisualStudio.Workload.CoreEditor","Microsoft.VisualStudio.Component.CoreEditor","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualCpp.Tools.Common.UtilsPrereq","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.DiaSymReader","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Build","Microsoft.VisualStudio.PackageGroup.NuGet","Microsoft.VisualStudio.NuGet.Core","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer.Common","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.OpenFolder.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.Devenv","Microsoft.VisualStudio.Devenv.Resources","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Platform.NavigateTo","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.PerfLib","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Platform.Editor","Microsoft.VisualStudio.MinShell.x86","Microsoft.VisualStudio.NativeImageSupport","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.LanguageServer","Microsoft.VisualStudio.Devenv.Config","Microsoft.VisualStudio.MinShell.Resources","Microsoft.Net.PackageGroup.4.7.2.Redist","Microsoft.Net.4.7.2.FullRedist","Microsoft.VisualStudio.Branding.Community"]}] diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt deleted file mode 100644 index 806509e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt +++ /dev/null @@ -1 +0,0 @@ -[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview","version":"16.0.28608.199","packages":["Microsoft.VisualStudio.Product.Enterprise","Microsoft.VisualStudio.Workload.NativeDesktop","Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest","Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForBoostTest","Microsoft.VisualStudio.Component.VC.ATL","Microsoft.VisualStudio.VC.Ide.ATL","Microsoft.VisualStudio.VC.Ide.ATL.Resources","Microsoft.VisualCpp.ATL.X86","Microsoft.VisualCpp.ATL.X64","Microsoft.VisualCpp.ATL.Source","Microsoft.VisualCpp.ATL.Headers","Microsoft.VisualStudio.Component.VC.CMake.Project","Microsoft.VisualStudio.VC.CMake","Microsoft.VisualStudio.VC.CMake.Project","Microsoft.VisualStudio.VC.ExternalBuildFramework","Microsoft.VisualStudio.Component.VC.DiagnosticTools","Microsoft.VisualStudio.Component.Graphics.Tools","Microsoft.VisualStudio.Graphics.Viewers","Microsoft.VisualStudio.Graphics.Viewers.Resources","Microsoft.VisualStudio.Graphics.EnableTools","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Analyzer","Microsoft.VisualStudio.Graphics.Analyzer.Targeted","Microsoft.VisualStudio.Graphics.Analyzer.Resources","Microsoft.VisualStudio.Graphics.Appid","Microsoft.VisualStudio.Graphics.Appid.Resources","Microsoft.VisualStudio.Component.Windows10SDK.17763","Win10SDK_10.0.17763","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core","Microsoft.VisualStudio.PackageGroup.TestTools.Native","Microsoft.VisualStudio.ComponentGroup.ArchitectureTools.Native","Microsoft.VisualStudio.Component.ClassDesigner","Microsoft.VisualStudio.ClassDesigner","Microsoft.VisualStudio.ClassDesigner.Resources","Microsoft.VisualStudio.Component.VC.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualStudio.VC.Templates.UnitTest","Microsoft.VisualStudio.VC.UnitTest.Desktop.Build.Core","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP","Microsoft.VisualStudio.VC.Templates.UnitTest.Resources","Microsoft.VisualStudio.VC.Templates.Desktop","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.VC.MSBuild.X64.v142","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM.v142","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.VC.MSBuild.x86.v142","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.VCPkgDatabase","Microsoft.VisualStudio.VC.Ide.Progression.Enterprise","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.VisualStudio.Component.CodeMap","Microsoft.VisualStudio.Component.GraphDocument","Microsoft.VisualStudio.Vmp","Microsoft.VisualStudio.GraphDocument","Microsoft.VisualStudio.GraphDocument.Resources","Microsoft.VisualStudio.CodeMap","Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime","Microsoft.VisualStudio.Component.SQL.NCLI","sqllocaldb","sqlncli","Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions","Microsoft.VisualStudio.WebToolsExtensions","Microsoft.VisualStudio.WebTools","Microsoft.VisualStudio.WebTools.Resources","Microsoft.VisualStudio.WebTools.MSBuild","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.Component.NuGet","Microsoft.CredentialProvider","Component.Microsoft.VisualStudio.LiveShare","Microsoft.VisualStudio.LiveShare","Microsoft.VisualStudio.Component.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.ImmersiveActivateHelper.Msi","Microsoft.VisualStudio.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.JustInTime.Msi","Microsoft.VisualStudio.Component.IntelliTrace.FrontEnd","Microsoft.IntelliTrace.DiagnosticsHubAgent.Targeted","Microsoft.IntelliTrace.Debugger","Microsoft.IntelliTrace.Debugger.Targeted","Microsoft.IntelliTrace.FrontEnd","Microsoft.DiagnosticsHub.Instrumentation","Microsoft.DiagnosticsHub.CpuSampling","Microsoft.DiagnosticsHub.CpuSampling.Targeted","Microsoft.PackageGroup.DiagnosticsHub.Platform","Microsoft.DiagnosticsHub.Collection.StopService.Uninstall","Microsoft.DiagnosticsHub.Runtime","Microsoft.DiagnosticsHub.Runtime.Targeted","Microsoft.DiagnosticsHub.Runtime.Resources","Microsoft.DiagnosticsHub.Collection","Microsoft.DiagnosticsHub.Collection.Service","Microsoft.DiagnosticsHub.Collection.StopService.Install","Microsoft.VisualStudio.Dsl.GraphObject","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.NuGet.Licenses","Microsoft.WebTools.Shared","Microsoft.VisualStudio.WebToolsExtensions.DotNet.Core.ItemTemplates","Microsoft.VisualStudio.Component.TextTemplating","Microsoft.VisualStudio.TextTemplating.MSBuild","Microsoft.VisualStudio.TextTemplating.Integration","Microsoft.VisualStudio.TextTemplating.Core","Microsoft.VisualStudio.TextTemplating.Integration.Resources","Microsoft.VisualStudio.ProTools","sqlsysclrtypes","sqlsysclrtypes","SQLCommon","Microsoft.VisualStudio.ProTools.Resources","Microsoft.VisualStudio.NuGet.Core","Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage","Microsoft.VisualStudio.PackageGroup.IntelliTrace.Core","Microsoft.IntelliTrace.Core","Microsoft.IntelliTrace.Core.Concord","Microsoft.IntelliTrace.Core.Targeted","Microsoft.IntelliTrace.ProfilerProxy.Msi.x64","Microsoft.IntelliTrace.ProfilerProxy.Msi","Microsoft.VisualStudio.TestTools.DynamicCodeCoverage","Microsoft.VisualStudio.TestTools.CodeCoverage.Msi","Microsoft.VisualStudio.TestTools.CodeCoverage","Microsoft.Icecap.Analysis","Microsoft.Icecap.Analysis.Targeted","Microsoft.Icecap.Analysis.Resources","Microsoft.Icecap.Analysis.Resources.Targeted","Microsoft.Icecap.Collection.Msi","Microsoft.Icecap.Collection.Msi.Targeted","Microsoft.Icecap.Collection.Msi.Resources","Microsoft.Icecap.Collection.Msi.Resources.Targeted","Microsoft.VisualStudio.PackageGroup.TestTools.Core","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.Pex.Common","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy","Microsoft.VisualStudio.PackageGroup.MinShell.Interop","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestTools","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Remote","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Premium","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common","Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.TestTools.TestWIExtension","Microsoft.VisualStudio.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors","Microsoft.VisualStudio.TestTools.NE.Msi.Targeted","Microsoft.VisualStudio.TestTools.NetworkEmulation","Microsoft.VisualStudio.TestTools.DataCollectors","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.WebTools.WSP.FSA","Microsoft.VisualStudio.WebTools.WSP.FSA.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualStudio.PackageGroup.Community","Microsoft.VisualStudio.Community.Extra.Resources","Microsoft.VisualStudio.Community.Extra","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.CodeSense","Microsoft.VisualStudio.CodeSense.Community","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Agent","Microsoft.VisualStudio.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Concord","Microsoft.VisualStudio.VC.Ide.Debugger.Concord.Resources","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed.Resources","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.Debugger.Package.DiagHub.Client.VSx86","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.Debugger.Concord","Microsoft.VisualStudio.Debugger.Concord.Resources","Microsoft.VisualStudio.Debugger.Resources","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.ProfessionalCore","Microsoft.VisualStudio.Professional","Microsoft.VisualStudio.Professional.Msi","Microsoft.VisualStudio.PackageGroup.EnterpriseCore","Microsoft.VisualStudio.Enterprise.Msi","Microsoft.VisualStudio.Enterprise","Microsoft.ShDocVw","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Platform.CallHierarchy","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.Devenv.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.Editors","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.Component.MSBuild","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers","Microsoft.VisualStudio.Workload.CoreEditor","Microsoft.VisualStudio.Component.CoreEditor","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualCpp.Tools.Common.UtilsPrereq","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.DiaSymReader","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Build","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer.Common","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.SLNX.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.Devenv","Microsoft.VisualStudio.Devenv.Resources","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Platform.NavigateTo","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.Platform.Search","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Platform.Editor","Microsoft.VisualStudio.MinShell.x86","Microsoft.VisualStudio.NativeImageSupport","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.LanguageServer","Microsoft.VisualStudio.Devenv.Config","Microsoft.VisualStudio.MinShell.Resources","Microsoft.Net.PackageGroup.4.7.2.Redist","Microsoft.VisualStudio.Branding.Enterprise"]}] diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/ca-bundle.crt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/ca-bundle.crt deleted file mode 100644 index fb1dea9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/ca-bundle.crt +++ /dev/null @@ -1,40 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDJjCCAg4CAhnOMA0GCSqGSIb3DQEBBQUAMH0xCzAJBgNVBAYTAlVTMQswCQYD -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CE1mcea4H/12U8JZW5tHCF6y9V+7IuDzqwIrLKcW3lG17n -VUG6ODF/Ryqn3V5X+TL91YyXi6c34y34IpC7MQDV/67U7+5Bp5CfeDPWW2wVSrW+ -uGZtfEvhbNm6m2i4UNmpCXxUZQ== ------END CERTIFICATE----- diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/ca.crt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/ca.crt deleted file mode 100644 index aaf9757..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/ca.crt +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDZDCCAkwCCQCAzfCLqrJvuTANBgkqhkiG9w0BAQsFADB0MQswCQYDVQQGEwJV -UzELMAkGA1UECAwCQ0ExEDAOBgNVBAoMB05vZGUuanMxETAPBgNVBAsMCG5vZGUt -Z3lwMRIwEAYDVQQDDAlsb2NhbGhvc3QxHzAdBgkqhkiG9w0BCQEWEGJ1aWxkQG5v -ZGVqcy5vcmcwHhcNMTkwNjIyMDYyMjMzWhcNMjIwNDExMDYyMjMzWjB0MQswCQYD -VQQGEwJVUzELMAkGA1UECAwCQ0ExEDAOBgNVBAoMB05vZGUuanMxETAPBgNVBAsM -CG5vZGUtZ3lwMRIwEAYDVQQDDAlsb2NhbGhvc3QxHzAdBgkqhkiG9w0BCQEWEGJ1 -aWxkQG5vZGVqcy5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDS -CHjvtVW4HdbbUwZ/ZV9s6U4x0KSoyNQrsCZjB8kRpFPe50DS5mfmu2SNBGYKRgzk -4QEEwFB9N2o8YTWsCefSRl6ti4ToPZqulU4hhRKYrEGtMJcRzi3IN7s200JaO3UH -01Su8ruO0NESb5zEU1Ykfh8Lub8TGEAINmgI61d/5d5Aq3kDjUHQJt1Ekw03Ylnu -juQyCGZxLxnngu0mIvwzyL/UeeUgsfQLzvppUk6In7tC1zzMjSPWo0c8qu6KvrW4 -bKYnkZkzdQifzbpO5ERMEsh5HWq0uHa6+dgcVHFvlhdqF4Uat87ygNplVf0txsZB -MNVqbz1k6xkZYMnzDoydAgMBAAEwDQYJKoZIhvcNAQELBQADggEBADspZGtKpWxy -J1W3FA1aeQhMvequQTcMRz4avkm4K4HfTdV1iVD4CbvdezBphouBlyLVLDFJP7RZ -m7dBJVgBwnxufoFLne8cR2MGqDRoySbFT1AtDJdxabE6Fg+QGUpgOQfeBJ6ANlSB -+qJ+HG4QA+Ouh5hxz9mgYwkIsMUABHiwENdZ/kT8Edw4xKgd3uH0YP4iiePMD66c -rzW3uXH5J1jnKgBlpxtog4P6dHCcoq+PZJ17W5bdXNyqC1LPzQqniZ2BNcEZ4ix3 -slAZAOWD1zLLGJhBPMV1fa0sHNBWc6oicr3YK/IDb0cp9kiLvnUu1pHy+LWQGqtC -rceJuGsnJEQ= ------END CERTIFICATE----- diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/nodedir/include/node/config.gypi b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/nodedir/include/node/config.gypi deleted file mode 100644 index e767534..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/nodedir/include/node/config.gypi +++ /dev/null @@ -1,6 +0,0 @@ -# Test configuration -{ - 'variables': { - 'build_with_electron': true - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/server.crt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/server.crt deleted file mode 100644 index 5d0c440..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/server.crt +++ /dev/null @@ -1,21 +0,0 @@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PSbUZF8mMPwGJd+nu1Ht3gTLtK7+gYJgGtXMJmGC0Qg77EJHDB2NbotgDGNmSU -1H9BpAeFHHIcbh2Rr7kkTvnh/c03vFe+CsDZmezcmRpRzW1fKj3YbfqBxU4XwJrL -a5T/N9xU ------END CERTIFICATE----- diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/server.key b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/server.key deleted file mode 100644 index a844739..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/server.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEA6S1E2WchgmbJYqCnpN7310ZgHjIOqeJe6MpSue2u6z6mTNd5 -izgvQNaANmn3xLFCS5zsuZaTvdPYPkcmSQzb1YcZSUYnAxZifjYARc6kb5GSBl3q -+O70ELyFrimXfZ4JI+bdIG9KiHY17DlvZZZj/csGYVWWg0mkeH3O5LPX6/DXQVh/ -9+gZ02/cdIBCAtZHQwqx7tF/qZA/kD4GZNFpU1DYHzf9H6g9htoCqmNHQWrV2T9y -Fybt6mbZp9kglBmyKYCc7hmQnb7N/mHn1yIuwhBsirCJTfKH86gN81u8M3+SVHA2 -VUHDllcNhpDWlmInXA+ItHdGZHCp95ohqpCPgQIDAQABAoIBABW8R4ewalo6dJlB -+n6O3jFt+PW3mtBRLqGqgm2cb0q0a1IMX+MPWLBFjmwEErl+AH0F4rcmBx2Ryr17 -amEy1qcf0caXyHksNAApznqzWXag7iizxnxv4cZRnHBwphNqkNWM5p3oYd04j6w2 -amDg1O9KZozaKo6QZclpiMiezwjKG+PVZLT8p7afswjv+yDWPDByhlcGiye9QD1T -VuZ0QCoXp6N/8JxW0gdkLp9NqFvGeGFzJ5h6L+d7A6BWw8akXrBRHHcKkyvVYBfd -myhSzSK4FPFMaxaEY/65FlVSyAO6ezGm3Umx4g7mkFjLdwKWaIOjkBkPeFgl3Pp4 -7Lo5X3UCgYEA/FrrIwmEU5ayulBVScEMKeavu5eNY4r0Sqbpov2oyTdYe8G49Pzy -ryMXfunY43moLKpajGwgTKRGvdqFtK08AAkaCssiAPkP3rZuZvMTF4sLo/vlWrjP -3er+tUqj22BzXi5XV0BAvH8Y3TL8KQ3he/8JxDvkC811/DQ9Y/Da3U8CgYEA7Itw -UM37URma08Bj9VTMoL9ZCyURewX+ZLDb2+O8sXGXJs28i1RkE6PTBlnRmedn+Jjk -byzQ5Cs5wA5uMbhYTA7kgXOs1bvgQqmlLmyL6FfHkucoMhr2Di7VeGf4OxE26JZ8 -JdY4+1MOyI3A2rR8WU+GmHxy0ay4K2xe6W0vsi8CgYBoGLEKIPDe8jkDtgOYivOT -jT9MaLXALB+dc8DIpU4swpHTaxP6qyUIrbcReTEolJSU6Ci16BxiwRkVU8D3yMYJ -VbfSX/zE3fh37FUaToa/nXHN0SjJBZdpeXhcHE//PIgaf48zxKNvnhYJmPB/luQ+ -m/PRaMsnOzfCM2JniYEe7QKBgGwjnxhB4tgDtaWCue/pcZc3gzS2IJS2e8N6mzie -l6Ajhu+FdOHZldrotUuc+la61OxwsVYmDeWR4VftAPGYDj3PPSX1RRl9R5wSRGLB -2wBASQvew6CMdNqtDIh8N56BUzHnwh/mHKzBHuwO6hDSHFsUITtLAY7bwGKRq55Z -fUmfAoGBANOYFyoJoDLcl+Jd750lyqfCifcGtkRdmZMtrPXaYnD8ZGme9vz1vsK/ -4iUkV3mi7Z9s1LXMa/tPPfKdVhCM1PXost3/si0+u1Bz5yKqEPXlyy2ltpIVyGu8 -yiy7y75asp8Iii/1cgtwyp9+VeSif8wJ+MHQoGdGxvAQP80R3EjF ------END RSA PRIVATE KEY----- diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/test-charmap.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/test-charmap.py deleted file mode 100644 index 63aa77b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/fixtures/test-charmap.py +++ /dev/null @@ -1,31 +0,0 @@ -import sys -import locale - -try: - reload(sys) -except NameError: # Python 3 - pass - - -def main(): - encoding = locale.getdefaultlocale()[1] - if not encoding: - return False - - try: - sys.setdefaultencoding(encoding) - except AttributeError: # Python 3 - pass - - textmap = { - "cp936": "\u4e2d\u6587", - "cp1252": "Lat\u012Bna", - "cp932": "\u306b\u307b\u3093\u3054", - } - if encoding in textmap: - print(textmap[encoding]) - return True - - -if __name__ == "__main__": - print(main()) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/process-exec-sync.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/process-exec-sync.js deleted file mode 100644 index 21763bc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/process-exec-sync.js +++ /dev/null @@ -1,140 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const childProcess = require('child_process') - -function startsWith (str, search, pos) { - if (String.prototype.startsWith) { - return str.startsWith(search, pos) - } - - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search -} - -function processExecSync (file, args, options) { - var child, error, timeout, tmpdir, command - command = makeCommand(file, args) - - /* - this function emulates child_process.execSync for legacy node <= 0.10.x - derived from https://github.com/gvarsanyi/sync-exec/blob/master/js/sync-exec.js - */ - - options = options || {} - // init timeout - timeout = Date.now() + options.timeout - // init tmpdir - var osTempBase = '/tmp' - var os = determineOS() - osTempBase = '/tmp' - - if (process.env.TMP) { - osTempBase = process.env.TMP - } - - if (osTempBase[osTempBase.length - 1] !== '/') { - osTempBase += '/' - } - - tmpdir = osTempBase + 'processExecSync.' + Date.now() + Math.random() - fs.mkdirSync(tmpdir) - - // init command - if (os === 'linux') { - command = '(' + command + ' > ' + tmpdir + '/stdout 2> ' + tmpdir + - '/stderr); echo $? > ' + tmpdir + '/status' - } else { - command = '(' + command + ' > ' + tmpdir + '/stdout 2> ' + tmpdir + - '/stderr) | echo %errorlevel% > ' + tmpdir + '/status | exit' - } - - // init child - child = childProcess.exec(command, options) - - var maxTry = 100000 // increases the test time by 6 seconds on win-2016-node-0.10 - var tryCount = 0 - while (tryCount < maxTry) { - try { - var x = fs.readFileSync(tmpdir + '/status') - if (x.toString() === '0') { - break - } - } catch (ignore) {} - tryCount++ - if (Date.now() > timeout) { - error = child - break - } - } - - ['stdout', 'stderr', 'status'].forEach(function (file) { - child[file] = fs.readFileSync(tmpdir + '/' + file, options.encoding) - setTimeout(unlinkFile, 500, tmpdir + '/' + file) - }) - - child.status = Number(child.status) - if (child.status !== 0) { - error = child - } - - try { - fs.rmdirSync(tmpdir) - } catch (ignore) {} - if (error) { - throw error - } - return child.stdout -} - -function makeCommand (file, args) { - var command, quote - command = file - if (args.length > 0) { - for (var i in args) { - command = command + ' ' - if (args[i][0] === '-') { - command = command + args[i] - } else { - if (!quote) { - command = command + '"' - quote = true - } - command = command + args[i] - if (quote) { - if (args.length === (parseInt(i) + 1)) { - command = command + '"' - } - } - } - } - } - return command -} - -function determineOS () { - var os = '' - var tmpVar = '' - if (process.env.OSTYPE) { - tmpVar = process.env.OSTYPE - } else if (process.env.OS) { - tmpVar = process.env.OS - } else { - // default is linux - tmpVar = 'linux' - } - - if (startsWith(tmpVar, 'linux')) { - os = 'linux' - } - if (startsWith(tmpVar, 'win')) { - os = 'win' - } - - return os -} - -function unlinkFile (file) { - fs.unlinkSync(file) -} - -module.exports = processExecSync diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/simple-proxy.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/simple-proxy.js deleted file mode 100644 index cb0dfcf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/simple-proxy.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict' - -const http = require('http') -const https = require('https') -const server = http.createServer(handler) -const port = +process.argv[2] -const prefix = process.argv[3] -const upstream = process.argv[4] -var calls = 0 - -server.listen(port) - -function handler (req, res) { - if (req.url.indexOf(prefix) !== 0) { - throw new Error('request url [' + req.url + '] does not start with [' + prefix + ']') - } - - var upstreamUrl = upstream + req.url.substring(prefix.length) - https.get(upstreamUrl, function (ures) { - ures.on('end', function () { - if (++calls === 2) { - server.close() - } - }) - ures.pipe(res) - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-addon.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-addon.js deleted file mode 100644 index f79eff7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-addon.js +++ /dev/null @@ -1,150 +0,0 @@ -'use strict' - -const test = require('tap').test -const path = require('path') -const fs = require('graceful-fs') -const childProcess = require('child_process') -const os = require('os') -const addonPath = path.resolve(__dirname, 'node_modules', 'hello_world') -const nodeGyp = path.resolve(__dirname, '..', 'bin', 'node-gyp.js') -const execFileSync = childProcess.execFileSync || require('./process-exec-sync') -const execFile = childProcess.execFile - -function runHello (hostProcess) { - if (!hostProcess) { - hostProcess = process.execPath - } - var testCode = "console.log(require('hello_world').hello())" - return execFileSync(hostProcess, ['-e', testCode], { cwd: __dirname }).toString() -} - -function getEncoding () { - var code = 'import locale;print(locale.getdefaultlocale()[1])' - return execFileSync('python', ['-c', code]).toString().trim() -} - -function checkCharmapValid () { - var data - try { - data = execFileSync('python', ['fixtures/test-charmap.py'], - { cwd: __dirname }) - } catch (err) { - return false - } - var lines = data.toString().trim().split('\n') - return lines.pop() === 'True' -} - -test('build simple addon', function (t) { - t.plan(3) - - // Set the loglevel otherwise the output disappears when run via 'npm test' - var cmd = [nodeGyp, 'rebuild', '-C', addonPath, '--loglevel=verbose'] - var proc = execFile(process.execPath, cmd, function (err, stdout, stderr) { - var logLines = stderr.toString().trim().split(/\r?\n/) - var lastLine = logLines[logLines.length - 1] - t.strictEqual(err, null) - t.strictEqual(lastLine, 'gyp info ok', 'should end in ok') - t.strictEqual(runHello().trim(), 'world') - }) - proc.stdout.setEncoding('utf-8') - proc.stderr.setEncoding('utf-8') -}) - -test('build simple addon in path with non-ascii characters', function (t) { - t.plan(1) - - if (!checkCharmapValid()) { - return t.skip('python console app can\'t encode non-ascii character.') - } - - var testDirNames = { - cp936: '文件夹', - cp1252: 'Latīna', - cp932: 'フォルダ' - } - // Select non-ascii characters by current encoding - var testDirName = testDirNames[getEncoding()] - // If encoding is UTF-8 or other then no need to test - if (!testDirName) { - return t.skip('no need to test') - } - - t.plan(3) - - var data - var configPath = path.join(addonPath, 'build', 'config.gypi') - try { - data = fs.readFileSync(configPath, 'utf8') - } catch (err) { - t.error(err) - return - } - var config = JSON.parse(data.replace(/#.+\n/, '')) - var nodeDir = config.variables.nodedir - var testNodeDir = path.join(addonPath, testDirName) - // Create symbol link to path with non-ascii characters - try { - fs.symlinkSync(nodeDir, testNodeDir, 'dir') - } catch (err) { - switch (err.code) { - case 'EEXIST': break - case 'EPERM': - t.error(err, 'Please try to running console as an administrator') - return - default: - t.error(err) - return - } - } - - var cmd = [ - nodeGyp, - 'rebuild', - '-C', - addonPath, - '--loglevel=verbose', - '-nodedir=' + testNodeDir - ] - var proc = execFile(process.execPath, cmd, function (err, stdout, stderr) { - try { - fs.unlink(testNodeDir) - } catch (err) { - t.error(err) - } - - var logLines = stderr.toString().trim().split(/\r?\n/) - var lastLine = logLines[logLines.length - 1] - t.strictEqual(err, null) - t.strictEqual(lastLine, 'gyp info ok', 'should end in ok') - t.strictEqual(runHello().trim(), 'world') - }) - proc.stdout.setEncoding('utf-8') - proc.stderr.setEncoding('utf-8') -}) - -test('addon works with renamed host executable', function (t) { - // No `fs.copyFileSync` before node8. - if (process.version.substr(1).split('.')[0] < 8) { - t.skip('skipping test for old node version') - t.end() - return - } - - t.plan(3) - - var notNodePath = path.join(os.tmpdir(), 'notnode' + path.extname(process.execPath)) - fs.copyFileSync(process.execPath, notNodePath) - - var cmd = [nodeGyp, 'rebuild', '-C', addonPath, '--loglevel=verbose'] - var proc = execFile(process.execPath, cmd, function (err, stdout, stderr) { - var logLines = stderr.toString().trim().split(/\r?\n/) - var lastLine = logLines[logLines.length - 1] - t.strictEqual(err, null) - t.strictEqual(lastLine, 'gyp info ok', 'should end in ok') - t.strictEqual(runHello(notNodePath).trim(), 'world') - fs.unlinkSync(notNodePath) - }) - proc.stdout.setEncoding('utf-8') - proc.stderr.setEncoding('utf-8') -}) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-configure-python.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-configure-python.js deleted file mode 100644 index 4290e7a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-configure-python.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict' - -const test = require('tap').test -const path = require('path') -const devDir = require('./common').devDir() -const gyp = require('../lib/node-gyp') -const requireInject = require('require-inject') -const configure = requireInject('../lib/configure', { - 'graceful-fs': { - openSync: function () { return 0 }, - closeSync: function () { }, - writeFile: function (file, data, cb) { cb() }, - stat: function (file, cb) { cb(null, {}) }, - mkdir: function (dir, options, cb) { cb() }, - promises: { - writeFile: function (file, data) { return Promise.resolve(null) } - } - } -}) - -const EXPECTED_PYPATH = path.join(__dirname, '..', 'gyp', 'pylib') -const SEPARATOR = process.platform === 'win32' ? ';' : ':' -const SPAWN_RESULT = { on: function () { } } - -require('npmlog').level = 'warn' - -test('configure PYTHONPATH with no existing env', function (t) { - t.plan(1) - - delete process.env.PYTHONPATH - - var prog = gyp() - prog.parseArgv([]) - prog.spawn = function () { - t.equal(process.env.PYTHONPATH, EXPECTED_PYPATH) - return SPAWN_RESULT - } - prog.devDir = devDir - configure(prog, [], t.fail) -}) - -test('configure PYTHONPATH with existing env of one dir', function (t) { - t.plan(2) - - var existingPath = path.join('a', 'b') - process.env.PYTHONPATH = existingPath - - var prog = gyp() - prog.parseArgv([]) - prog.spawn = function () { - t.equal(process.env.PYTHONPATH, [EXPECTED_PYPATH, existingPath].join(SEPARATOR)) - - var dirs = process.env.PYTHONPATH.split(SEPARATOR) - t.deepEqual(dirs, [EXPECTED_PYPATH, existingPath]) - - return SPAWN_RESULT - } - prog.devDir = devDir - configure(prog, [], t.fail) -}) - -test('configure PYTHONPATH with existing env of multiple dirs', function (t) { - t.plan(2) - - var pythonDir1 = path.join('a', 'b') - var pythonDir2 = path.join('b', 'c') - var existingPath = [pythonDir1, pythonDir2].join(SEPARATOR) - process.env.PYTHONPATH = existingPath - - var prog = gyp() - prog.parseArgv([]) - prog.spawn = function () { - t.equal(process.env.PYTHONPATH, [EXPECTED_PYPATH, existingPath].join(SEPARATOR)) - - var dirs = process.env.PYTHONPATH.split(SEPARATOR) - t.deepEqual(dirs, [EXPECTED_PYPATH, pythonDir1, pythonDir2]) - - return SPAWN_RESULT - } - prog.devDir = devDir - configure(prog, [], t.fail) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-create-config-gypi.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-create-config-gypi.js deleted file mode 100644 index eeac73f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-create-config-gypi.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict' - -const path = require('path') -const { test } = require('tap') -const gyp = require('../lib/node-gyp') -const createConfigGypi = require('../lib/create-config-gypi') -const { parseConfigGypi, getCurrentConfigGypi } = createConfigGypi.test - -test('config.gypi with no options', async function (t) { - t.plan(2) - - const prog = gyp() - prog.parseArgv([]) - - const config = await getCurrentConfigGypi({ gyp: prog, vsInfo: {} }) - t.equal(config.target_defaults.default_configuration, 'Release') - t.equal(config.variables.target_arch, process.arch) -}) - -test('config.gypi with --debug', async function (t) { - t.plan(1) - - const prog = gyp() - prog.parseArgv(['_', '_', '--debug']) - - const config = await getCurrentConfigGypi({ gyp: prog, vsInfo: {} }) - t.equal(config.target_defaults.default_configuration, 'Debug') -}) - -test('config.gypi with custom options', async function (t) { - t.plan(1) - - const prog = gyp() - prog.parseArgv(['_', '_', '--shared-libxml2']) - - const config = await getCurrentConfigGypi({ gyp: prog, vsInfo: {} }) - t.equal(config.variables.shared_libxml2, true) -}) - -test('config.gypi with nodedir', async function (t) { - t.plan(1) - - const nodeDir = path.join(__dirname, 'fixtures', 'nodedir') - - const prog = gyp() - prog.parseArgv(['_', '_', `--nodedir=${nodeDir}`]) - - const config = await getCurrentConfigGypi({ gyp: prog, nodeDir, vsInfo: {} }) - t.equal(config.variables.build_with_electron, true) -}) - -test('config.gypi with --force-process-config', async function (t) { - t.plan(1) - - const nodeDir = path.join(__dirname, 'fixtures', 'nodedir') - - const prog = gyp() - prog.parseArgv(['_', '_', '--force-process-config', `--nodedir=${nodeDir}`]) - - const config = await getCurrentConfigGypi({ gyp: prog, nodeDir, vsInfo: {} }) - t.equal(config.variables.build_with_electron, undefined) -}) - -test('config.gypi parsing', function (t) { - t.plan(1) - - const str = "# Some comments\n{'variables': {'multiline': 'A'\n'B'}}" - const config = parseConfigGypi(str) - t.deepEqual(config, { variables: { multiline: 'AB' } }) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-download.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-download.js deleted file mode 100644 index 71a3c0d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-download.js +++ /dev/null @@ -1,207 +0,0 @@ -'use strict' - -const { test } = require('tap') -const fs = require('fs') -const path = require('path') -const util = require('util') -const http = require('http') -const https = require('https') -const install = require('../lib/install') -const semver = require('semver') -const devDir = require('./common').devDir() -const rimraf = require('rimraf') -const gyp = require('../lib/node-gyp') -const log = require('npmlog') - -log.level = 'warn' - -test('download over http', async (t) => { - t.plan(2) - - const server = http.createServer((req, res) => { - t.strictEqual(req.headers['user-agent'], `node-gyp v42 (node ${process.version})`) - res.end('ok') - }) - - t.tearDown(() => new Promise((resolve) => server.close(resolve))) - - const host = 'localhost' - await new Promise((resolve) => server.listen(0, host, resolve)) - const { port } = server.address() - const gyp = { - opts: {}, - version: '42' - } - const url = `http://${host}:${port}` - const res = await install.test.download(gyp, url) - t.strictEqual(await res.text(), 'ok') -}) - -test('download over https with custom ca', async (t) => { - t.plan(3) - - const cafile = path.join(__dirname, '/fixtures/ca.crt') - const [cert, key, ca] = await Promise.all([ - fs.promises.readFile(path.join(__dirname, 'fixtures/server.crt'), 'utf8'), - fs.promises.readFile(path.join(__dirname, 'fixtures/server.key'), 'utf8'), - install.test.readCAFile(cafile) - ]) - - t.strictEqual(ca.length, 1) - - const options = { ca: ca, cert: cert, key: key } - const server = https.createServer(options, (req, res) => { - t.strictEqual(req.headers['user-agent'], `node-gyp v42 (node ${process.version})`) - res.end('ok') - }) - - t.tearDown(() => new Promise((resolve) => server.close(resolve))) - - server.on('clientError', (err) => { throw err }) - - const host = 'localhost' - await new Promise((resolve) => server.listen(0, host, resolve)) - const { port } = server.address() - const gyp = { - opts: { cafile }, - version: '42' - } - const url = `https://${host}:${port}` - const res = await install.test.download(gyp, url) - t.strictEqual(await res.text(), 'ok') -}) - -test('download over http with proxy', async (t) => { - t.plan(2) - - const server = http.createServer((_, res) => { - res.end('ok') - }) - - const pserver = http.createServer((req, res) => { - t.strictEqual(req.headers['user-agent'], `node-gyp v42 (node ${process.version})`) - res.end('proxy ok') - }) - - t.tearDown(() => Promise.all([ - new Promise((resolve) => server.close(resolve)), - new Promise((resolve) => pserver.close(resolve)) - ])) - - const host = 'localhost' - await new Promise((resolve) => server.listen(0, host, resolve)) - const { port } = server.address() - await new Promise((resolve) => pserver.listen(port + 1, host, resolve)) - const gyp = { - opts: { - proxy: `http://${host}:${port + 1}`, - noproxy: 'bad' - }, - version: '42' - } - const url = `http://${host}:${port}` - const res = await install.test.download(gyp, url) - t.strictEqual(await res.text(), 'proxy ok') -}) - -test('download over http with noproxy', async (t) => { - t.plan(2) - - const server = http.createServer((req, res) => { - t.strictEqual(req.headers['user-agent'], `node-gyp v42 (node ${process.version})`) - res.end('ok') - }) - - const pserver = http.createServer((_, res) => { - res.end('proxy ok') - }) - - t.tearDown(() => Promise.all([ - new Promise((resolve) => server.close(resolve)), - new Promise((resolve) => pserver.close(resolve)) - ])) - - const host = 'localhost' - await new Promise((resolve) => server.listen(0, host, resolve)) - const { port } = server.address() - await new Promise((resolve) => pserver.listen(port + 1, host, resolve)) - const gyp = { - opts: { - proxy: `http://${host}:${port + 1}`, - noproxy: host - }, - version: '42' - } - const url = `http://${host}:${port}` - const res = await install.test.download(gyp, url) - t.strictEqual(await res.text(), 'ok') -}) - -test('download with missing cafile', async (t) => { - t.plan(1) - const gyp = { - opts: { cafile: 'no.such.file' } - } - try { - await install.test.download(gyp, {}, 'http://bad/') - } catch (e) { - t.ok(/no.such.file/.test(e.message)) - } -}) - -test('check certificate splitting', async (t) => { - const cas = await install.test.readCAFile(path.join(__dirname, 'fixtures/ca-bundle.crt')) - t.plan(2) - t.strictEqual(cas.length, 2) - t.notStrictEqual(cas[0], cas[1]) -}) - -// only run this test if we are running a version of Node with predictable version path behavior - -test('download headers (actual)', async (t) => { - if (process.env.FAST_TEST || - process.release.name !== 'node' || - semver.prerelease(process.version) !== null || - semver.satisfies(process.version, '<10')) { - return t.skip('Skipping actual download of headers due to test environment configuration') - } - - t.plan(12) - - const expectedDir = path.join(devDir, process.version.replace(/^v/, '')) - await util.promisify(rimraf)(expectedDir) - - const prog = gyp() - prog.parseArgv([]) - prog.devDir = devDir - log.level = 'warn' - await util.promisify(install)(prog, []) - - const data = await fs.promises.readFile(path.join(expectedDir, 'installVersion'), 'utf8') - t.strictEqual(data, '9\n', 'correct installVersion') - - const list = await fs.promises.readdir(path.join(expectedDir, 'include/node')) - t.ok(list.includes('common.gypi')) - t.ok(list.includes('config.gypi')) - t.ok(list.includes('node.h')) - t.ok(list.includes('node_version.h')) - t.ok(list.includes('openssl')) - t.ok(list.includes('uv')) - t.ok(list.includes('uv.h')) - t.ok(list.includes('v8-platform.h')) - t.ok(list.includes('v8.h')) - t.ok(list.includes('zlib.h')) - - const lines = (await fs.promises.readFile(path.join(expectedDir, 'include/node/node_version.h'), 'utf8')).split('\n') - - // extract the 3 version parts from the defines to build a valid version string and - // and check them against our current env version - const version = ['major', 'minor', 'patch'].reduce((version, type) => { - const re = new RegExp(`^#define\\sNODE_${type.toUpperCase()}_VERSION`) - const line = lines.find((l) => re.test(l)) - const i = line ? parseInt(line.replace(/^[^0-9]+([0-9]+).*$/, '$1'), 10) : 'ERROR' - return `${version}${type !== 'major' ? '.' : 'v'}${i}` - }, '') - - t.strictEqual(version, process.version) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-accessible-sync.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-accessible-sync.js deleted file mode 100644 index 0a2e584..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-accessible-sync.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict' - -const test = require('tap').test -const path = require('path') -const requireInject = require('require-inject') -const configure = requireInject('../lib/configure', { - 'graceful-fs': { - closeSync: function () { return undefined }, - openSync: function (path) { - if (readableFiles.some(function (f) { return f === path })) { - return 0 - } else { - var error = new Error('ENOENT - not found') - throw error - } - } - } -}) - -const dir = path.sep + 'testdir' -const readableFile = 'readable_file' -const anotherReadableFile = 'another_readable_file' -const readableFileInDir = 'somedir' + path.sep + readableFile -const readableFiles = [ - path.resolve(dir, readableFile), - path.resolve(dir, anotherReadableFile), - path.resolve(dir, readableFileInDir) -] - -test('find accessible - empty array', function (t) { - t.plan(1) - - var candidates = [] - var found = configure.test.findAccessibleSync('test', dir, candidates) - t.strictEqual(found, undefined) -}) - -test('find accessible - single item array, readable', function (t) { - t.plan(1) - - var candidates = [readableFile] - var found = configure.test.findAccessibleSync('test', dir, candidates) - t.strictEqual(found, path.resolve(dir, readableFile)) -}) - -test('find accessible - single item array, readable in subdir', function (t) { - t.plan(1) - - var candidates = [readableFileInDir] - var found = configure.test.findAccessibleSync('test', dir, candidates) - t.strictEqual(found, path.resolve(dir, readableFileInDir)) -}) - -test('find accessible - single item array, unreadable', function (t) { - t.plan(1) - - var candidates = ['unreadable_file'] - var found = configure.test.findAccessibleSync('test', dir, candidates) - t.strictEqual(found, undefined) -}) - -test('find accessible - multi item array, no matches', function (t) { - t.plan(1) - - var candidates = ['non_existent_file', 'unreadable_file'] - var found = configure.test.findAccessibleSync('test', dir, candidates) - t.strictEqual(found, undefined) -}) - -test('find accessible - multi item array, single match', function (t) { - t.plan(1) - - var candidates = ['non_existent_file', readableFile] - var found = configure.test.findAccessibleSync('test', dir, candidates) - t.strictEqual(found, path.resolve(dir, readableFile)) -}) - -test('find accessible - multi item array, return first match', function (t) { - t.plan(1) - - var candidates = ['non_existent_file', anotherReadableFile, readableFile] - var found = configure.test.findAccessibleSync('test', dir, candidates) - t.strictEqual(found, path.resolve(dir, anotherReadableFile)) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-node-directory.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-node-directory.js deleted file mode 100644 index f1380d1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-node-directory.js +++ /dev/null @@ -1,119 +0,0 @@ -'use strict' - -const test = require('tap').test -const path = require('path') -const findNodeDirectory = require('../lib/find-node-directory') - -const platforms = ['darwin', 'freebsd', 'linux', 'sunos', 'win32', 'aix'] - -// we should find the directory based on the directory -// the script is running in and it should match the layout -// in a build tree where npm is installed in -// .... /deps/npm -test('test find-node-directory - node install', function (t) { - t.plan(platforms.length) - for (var next = 0; next < platforms.length; next++) { - var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] } - t.equal( - findNodeDirectory('/x/deps/npm/node_modules/node-gyp/lib', processObj), - path.join('/x')) - } -}) - -// we should find the directory based on the directory -// the script is running in and it should match the layout -// in an installed tree where npm is installed in -// .... /lib/node_modules/npm or .../node_modules/npm -// depending on the patform -test('test find-node-directory - node build', function (t) { - t.plan(platforms.length) - for (var next = 0; next < platforms.length; next++) { - var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] } - if (platforms[next] === 'win32') { - t.equal( - findNodeDirectory('/y/node_modules/npm/node_modules/node-gyp/lib', - processObj), path.join('/y')) - } else { - t.equal( - findNodeDirectory('/y/lib/node_modules/npm/node_modules/node-gyp/lib', - processObj), path.join('/y')) - } - } -}) - -// we should find the directory based on the execPath -// for node and match because it was in the bin directory -test('test find-node-directory - node in bin directory', function (t) { - t.plan(platforms.length) - for (var next = 0; next < platforms.length; next++) { - var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] } - t.equal( - findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), - path.join('/x/y')) - } -}) - -// we should find the directory based on the execPath -// for node and match because it was in the Release directory -test('test find-node-directory - node in build release dir', function (t) { - t.plan(platforms.length) - for (var next = 0; next < platforms.length; next++) { - var processObj - if (platforms[next] === 'win32') { - processObj = { execPath: '/x/y/Release/node', platform: platforms[next] } - } else { - processObj = { - execPath: '/x/y/out/Release/node', - platform: platforms[next] - } - } - - t.equal( - findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), - path.join('/x/y')) - } -}) - -// we should find the directory based on the execPath -// for node and match because it was in the Debug directory -test('test find-node-directory - node in Debug release dir', function (t) { - t.plan(platforms.length) - for (var next = 0; next < platforms.length; next++) { - var processObj - if (platforms[next] === 'win32') { - processObj = { execPath: '/a/b/Debug/node', platform: platforms[next] } - } else { - processObj = { execPath: '/a/b/out/Debug/node', platform: platforms[next] } - } - - t.equal( - findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), - path.join('/a/b')) - } -}) - -// we should not find it as it will not match based on the execPath nor -// the directory from which the script is running -test('test find-node-directory - not found', function (t) { - t.plan(platforms.length) - for (var next = 0; next < platforms.length; next++) { - var processObj = { execPath: '/x/y/z/y', platform: next } - t.equal(findNodeDirectory('/a/b/c/d', processObj), '') - } -}) - -// we should find the directory based on the directory -// the script is running in and it should match the layout -// in a build tree where npm is installed in -// .... /deps/npm -// same test as above but make sure additional directory entries -// don't cause an issue -test('test find-node-directory - node install', function (t) { - t.plan(platforms.length) - for (var next = 0; next < platforms.length; next++) { - var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] } - t.equal( - findNodeDirectory('/x/y/z/a/b/c/deps/npm/node_modules/node-gyp/lib', - processObj), path.join('/x/y/z/a/b/c')) - } -}) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-python.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-python.js deleted file mode 100644 index 67d0b26..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-python.js +++ /dev/null @@ -1,226 +0,0 @@ -'use strict' - -delete process.env.PYTHON - -const test = require('tap').test -const findPython = require('../lib/find-python') -const execFile = require('child_process').execFile -const PythonFinder = findPython.test.PythonFinder - -require('npmlog').level = 'warn' - -test('find python', function (t) { - t.plan(4) - - findPython.test.findPython(null, function (err, found) { - t.strictEqual(err, null) - var proc = execFile(found, ['-V'], function (err, stdout, stderr) { - t.strictEqual(err, null) - t.ok(/Python 3/.test(stdout)) - t.strictEqual(stderr, '') - }) - proc.stdout.setEncoding('utf-8') - proc.stderr.setEncoding('utf-8') - }) -}) - -function poison (object, property) { - function fail () { - console.error(Error(`Property ${property} should not have been accessed.`)) - process.abort() - } - var descriptor = { - configurable: false, - enumerable: false, - get: fail, - set: fail - } - Object.defineProperty(object, property, descriptor) -} - -function TestPythonFinder () { - PythonFinder.apply(this, arguments) -} -TestPythonFinder.prototype = Object.create(PythonFinder.prototype) -// Silence npmlog - remove for debugging -TestPythonFinder.prototype.log = { - silly: () => {}, - verbose: () => {}, - info: () => {}, - warn: () => {}, - error: () => {} -} -delete TestPythonFinder.prototype.env.NODE_GYP_FORCE_PYTHON - -test('find python - python', function (t) { - t.plan(6) - - var f = new TestPythonFinder('python', done) - f.execFile = function (program, args, opts, cb) { - f.execFile = function (program, args, opts, cb) { - poison(f, 'execFile') - t.strictEqual(program, '/path/python') - t.ok(/sys\.version_info/.test(args[1])) - cb(null, '3.9.1') - } - t.strictEqual(program, - process.platform === 'win32' ? '"python"' : 'python') - t.ok(/sys\.executable/.test(args[1])) - cb(null, '/path/python') - } - f.findPython() - - function done (err, python) { - t.strictEqual(err, null) - t.strictEqual(python, '/path/python') - } -}) - -test('find python - python too old', function (t) { - t.plan(2) - - var f = new TestPythonFinder(null, done) - f.execFile = function (program, args, opts, cb) { - if (/sys\.executable/.test(args[args.length - 1])) { - cb(null, '/path/python') - } else if (/sys\.version_info/.test(args[args.length - 1])) { - cb(null, '2.3.4') - } else { - t.fail() - } - } - f.findPython() - - function done (err) { - t.ok(/Could not find any Python/.test(err)) - t.ok(/not supported/i.test(f.errorLog)) - } -}) - -test('find python - no python', function (t) { - t.plan(2) - - var f = new TestPythonFinder(null, done) - f.execFile = function (program, args, opts, cb) { - if (/sys\.executable/.test(args[args.length - 1])) { - cb(new Error('not found')) - } else if (/sys\.version_info/.test(args[args.length - 1])) { - cb(new Error('not a Python executable')) - } else { - t.fail() - } - } - f.findPython() - - function done (err) { - t.ok(/Could not find any Python/.test(err)) - t.ok(/not in PATH/.test(f.errorLog)) - } -}) - -test('find python - no python2, no python, unix', function (t) { - t.plan(2) - - var f = new TestPythonFinder(null, done) - f.checkPyLauncher = t.fail - f.win = false - - f.execFile = function (program, args, opts, cb) { - if (/sys\.executable/.test(args[args.length - 1])) { - cb(new Error('not found')) - } else { - t.fail() - } - } - f.findPython() - - function done (err) { - t.ok(/Could not find any Python/.test(err)) - t.ok(/not in PATH/.test(f.errorLog)) - } -}) - -test('find python - no python, use python launcher', function (t) { - t.plan(4) - - var f = new TestPythonFinder(null, done) - f.win = true - - f.execFile = function (program, args, opts, cb) { - if (program === 'py.exe') { - t.notEqual(args.indexOf('-3'), -1) - t.notEqual(args.indexOf('-c'), -1) - return cb(null, 'Z:\\snake.exe') - } - if (/sys\.executable/.test(args[args.length - 1])) { - cb(new Error('not found')) - } else if (f.winDefaultLocations.includes(program)) { - cb(new Error('not found')) - } else if (/sys\.version_info/.test(args[args.length - 1])) { - if (program === 'Z:\\snake.exe') { - cb(null, '3.9.0') - } else { - t.fail() - } - } else { - t.fail() - } - } - f.findPython() - - function done (err, python) { - t.strictEqual(err, null) - t.strictEqual(python, 'Z:\\snake.exe') - } -}) - -test('find python - no python, no python launcher, good guess', function (t) { - t.plan(2) - - var f = new TestPythonFinder(null, done) - f.win = true - const expectedProgram = f.winDefaultLocations[0] - - f.execFile = function (program, args, opts, cb) { - if (program === 'py.exe') { - return cb(new Error('not found')) - } - if (/sys\.executable/.test(args[args.length - 1])) { - cb(new Error('not found')) - } else if (program === expectedProgram && - /sys\.version_info/.test(args[args.length - 1])) { - cb(null, '3.7.3') - } else { - t.fail() - } - } - f.findPython() - - function done (err, python) { - t.strictEqual(err, null) - t.ok(python === expectedProgram) - } -}) - -test('find python - no python, no python launcher, bad guess', function (t) { - t.plan(2) - - var f = new TestPythonFinder(null, done) - f.win = true - - f.execFile = function (program, args, opts, cb) { - if (/sys\.executable/.test(args[args.length - 1])) { - cb(new Error('not found')) - } else if (/sys\.version_info/.test(args[args.length - 1])) { - cb(new Error('not a Python executable')) - } else { - t.fail() - } - } - f.findPython() - - function done (err) { - t.ok(/Could not find any Python/.test(err)) - t.ok(/not in PATH/.test(f.errorLog)) - } -}) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-visualstudio.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-visualstudio.js deleted file mode 100644 index 1327cf8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-find-visualstudio.js +++ /dev/null @@ -1,676 +0,0 @@ -'use strict' - -const test = require('tap').test -const fs = require('fs') -const path = require('path') -const findVisualStudio = require('../lib/find-visualstudio') -const VisualStudioFinder = findVisualStudio.test.VisualStudioFinder - -const semverV1 = { major: 1, minor: 0, patch: 0 } - -delete process.env.VCINSTALLDIR - -function poison (object, property) { - function fail () { - console.error(Error(`Property ${property} should not have been accessed.`)) - process.abort() - } - var descriptor = { - configurable: false, - enumerable: false, - get: fail, - set: fail - } - Object.defineProperty(object, property, descriptor) -} - -function TestVisualStudioFinder () { VisualStudioFinder.apply(this, arguments) } -TestVisualStudioFinder.prototype = Object.create(VisualStudioFinder.prototype) -// Silence npmlog - remove for debugging -TestVisualStudioFinder.prototype.log = { - silly: () => {}, - verbose: () => {}, - info: () => {}, - warn: () => {}, - error: () => {} -} - -test('VS2013', function (t) { - t.plan(4) - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info, { - msBuild: 'C:\\MSBuild12\\MSBuild.exe', - path: 'C:\\VS2013', - sdk: null, - toolset: 'v120', - version: '12.0', - versionMajor: 12, - versionMinor: 0, - versionYear: 2013 - }) - }) - - finder.findVisualStudio2017OrNewer = (cb) => { - finder.parseData(new Error(), '', '', cb) - } - finder.regSearchKeys = (keys, value, addOpts, cb) => { - for (var i = 0; i < keys.length; ++i) { - const fullName = `${keys[i]}\\${value}` - switch (fullName) { - case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': - case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': - continue - case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0': - t.pass(`expected search for registry value ${fullName}`) - return cb(null, 'C:\\VS2013\\VC\\') - case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\12.0\\MSBuildToolsPath': - t.pass(`expected search for registry value ${fullName}`) - return cb(null, 'C:\\MSBuild12\\') - default: - t.fail(`unexpected search for registry value ${fullName}`) - } - } - return cb(new Error()) - } - finder.findVisualStudio() -}) - -test('VS2013 should not be found on new node versions', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder({ - major: 10, - minor: 0, - patch: 0 - }, null, (err, info) => { - t.ok(/find .* Visual Studio/i.test(err), 'expect error') - t.false(info, 'no data') - }) - - finder.findVisualStudio2017OrNewer = (cb) => { - const file = path.join(__dirname, 'fixtures', 'VS_2017_Unusable.txt') - const data = fs.readFileSync(file) - finder.parseData(null, data, '', cb) - } - finder.regSearchKeys = (keys, value, addOpts, cb) => { - for (var i = 0; i < keys.length; ++i) { - const fullName = `${keys[i]}\\${value}` - switch (fullName) { - case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': - case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': - continue - default: - t.fail(`unexpected search for registry value ${fullName}`) - } - } - return cb(new Error()) - } - finder.findVisualStudio() -}) - -test('VS2015', function (t) { - t.plan(4) - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info, { - msBuild: 'C:\\MSBuild14\\MSBuild.exe', - path: 'C:\\VS2015', - sdk: null, - toolset: 'v140', - version: '14.0', - versionMajor: 14, - versionMinor: 0, - versionYear: 2015 - }) - }) - - finder.findVisualStudio2017OrNewer = (cb) => { - finder.parseData(new Error(), '', '', cb) - } - finder.regSearchKeys = (keys, value, addOpts, cb) => { - for (var i = 0; i < keys.length; ++i) { - const fullName = `${keys[i]}\\${value}` - switch (fullName) { - case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': - t.pass(`expected search for registry value ${fullName}`) - return cb(null, 'C:\\VS2015\\VC\\') - case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\14.0\\MSBuildToolsPath': - t.pass(`expected search for registry value ${fullName}`) - return cb(null, 'C:\\MSBuild14\\') - default: - t.fail(`unexpected search for registry value ${fullName}`) - } - } - return cb(new Error()) - } - finder.findVisualStudio() -}) - -test('error from PowerShell', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, null) - - finder.parseData(new Error(), '', '', (info) => { - t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error') - t.false(info, 'no data') - }) -}) - -test('empty output from PowerShell', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, null) - - finder.parseData(null, '', '', (info) => { - t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error') - t.false(info, 'no data') - }) -}) - -test('output from PowerShell not JSON', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, null) - - finder.parseData(null, 'AAAABBBB', '', (info) => { - t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error') - t.false(info, 'no data') - }) -}) - -test('wrong JSON from PowerShell', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, null) - - finder.parseData(null, '{}', '', (info) => { - t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error') - t.false(info, 'no data') - }) -}) - -test('empty JSON from PowerShell', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, null) - - finder.parseData(null, '[]', '', (info) => { - t.ok(/find .* Visual Studio/i.test(finder.errorLog[0]), 'expect error') - t.false(info, 'no data') - }) -}) - -test('future version', function (t) { - t.plan(3) - - const finder = new TestVisualStudioFinder(semverV1, null, null) - - finder.parseData(null, JSON.stringify([{ - packages: [ - 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', - 'Microsoft.VisualStudio.Component.Windows10SDK.17763', - 'Microsoft.VisualStudio.VC.MSBuild.Base' - ], - path: 'C:\\VS', - version: '9999.9999.9999.9999' - }]), '', (info) => { - t.ok(/unknown version/i.test(finder.errorLog[0]), 'expect error') - t.ok(/find .* Visual Studio/i.test(finder.errorLog[1]), 'expect error') - t.false(info, 'no data') - }) -}) - -test('single unusable VS2017', function (t) { - t.plan(3) - - const finder = new TestVisualStudioFinder(semverV1, null, null) - - const file = path.join(__dirname, 'fixtures', 'VS_2017_Unusable.txt') - const data = fs.readFileSync(file) - finder.parseData(null, data, '', (info) => { - t.ok(/checking/i.test(finder.errorLog[0]), 'expect error') - t.ok(/find .* Visual Studio/i.test(finder.errorLog[2]), 'expect error') - t.false(info, 'no data') - }) -}) - -test('minimal VS2017 Build Tools', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info, { - msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\' + - 'BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe', - path: - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools', - sdk: '10.0.17134.0', - toolset: 'v141', - version: '15.9.28307.665', - versionMajor: 15, - versionMinor: 9, - versionYear: 2017 - }) - }) - - poison(finder, 'regSearchKeys') - finder.findVisualStudio2017OrNewer = (cb) => { - const file = path.join(__dirname, 'fixtures', - 'VS_2017_BuildTools_minimal.txt') - const data = fs.readFileSync(file) - finder.parseData(null, data, '', cb) - } - finder.findVisualStudio() -}) - -test('VS2017 Community with C++ workload', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info, { - msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\' + - 'Community\\MSBuild\\15.0\\Bin\\MSBuild.exe', - path: - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community', - sdk: '10.0.17763.0', - toolset: 'v141', - version: '15.9.28307.665', - versionMajor: 15, - versionMinor: 9, - versionYear: 2017 - }) - }) - - poison(finder, 'regSearchKeys') - finder.findVisualStudio2017OrNewer = (cb) => { - const file = path.join(__dirname, 'fixtures', - 'VS_2017_Community_workload.txt') - const data = fs.readFileSync(file) - finder.parseData(null, data, '', cb) - } - finder.findVisualStudio() -}) - -test('VS2017 Express', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info, { - msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\' + - 'WDExpress\\MSBuild\\15.0\\Bin\\MSBuild.exe', - path: - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\WDExpress', - sdk: '10.0.17763.0', - toolset: 'v141', - version: '15.9.28307.858', - versionMajor: 15, - versionMinor: 9, - versionYear: 2017 - }) - }) - - poison(finder, 'regSearchKeys') - finder.findVisualStudio2017OrNewer = (cb) => { - const file = path.join(__dirname, 'fixtures', 'VS_2017_Express.txt') - const data = fs.readFileSync(file) - finder.parseData(null, data, '', cb) - } - finder.findVisualStudio() -}) - -test('VS2019 Preview with C++ workload', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info, { - msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' + - 'Preview\\MSBuild\\Current\\Bin\\MSBuild.exe', - path: - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview', - sdk: '10.0.17763.0', - toolset: 'v142', - version: '16.0.28608.199', - versionMajor: 16, - versionMinor: 0, - versionYear: 2019 - }) - }) - - poison(finder, 'regSearchKeys') - finder.findVisualStudio2017OrNewer = (cb) => { - const file = path.join(__dirname, 'fixtures', - 'VS_2019_Preview.txt') - const data = fs.readFileSync(file) - finder.parseData(null, data, '', cb) - } - finder.findVisualStudio() -}) - -test('minimal VS2019 Build Tools', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info, { - msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' + - 'BuildTools\\MSBuild\\Current\\Bin\\MSBuild.exe', - path: - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools', - sdk: '10.0.17134.0', - toolset: 'v142', - version: '16.1.28922.388', - versionMajor: 16, - versionMinor: 1, - versionYear: 2019 - }) - }) - - poison(finder, 'regSearchKeys') - finder.findVisualStudio2017OrNewer = (cb) => { - const file = path.join(__dirname, 'fixtures', - 'VS_2019_BuildTools_minimal.txt') - const data = fs.readFileSync(file) - finder.parseData(null, data, '', cb) - } - finder.findVisualStudio() -}) - -test('VS2019 Community with C++ workload', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info, { - msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' + - 'Community\\MSBuild\\Current\\Bin\\MSBuild.exe', - path: - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community', - sdk: '10.0.17763.0', - toolset: 'v142', - version: '16.1.28922.388', - versionMajor: 16, - versionMinor: 1, - versionYear: 2019 - }) - }) - - poison(finder, 'regSearchKeys') - finder.findVisualStudio2017OrNewer = (cb) => { - const file = path.join(__dirname, 'fixtures', - 'VS_2019_Community_workload.txt') - const data = fs.readFileSync(file) - finder.parseData(null, data, '', cb) - } - finder.findVisualStudio() -}) - -function allVsVersions (t, finder) { - finder.findVisualStudio2017OrNewer = (cb) => { - const data0 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', - 'VS_2017_Unusable.txt'))) - const data1 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', - 'VS_2017_BuildTools_minimal.txt'))) - const data2 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', - 'VS_2017_Community_workload.txt'))) - const data3 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', - 'VS_2017_Express.txt'))) - const data4 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', - 'VS_2019_Preview.txt'))) - const data5 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', - 'VS_2019_BuildTools_minimal.txt'))) - const data6 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', - 'VS_2019_Community_workload.txt'))) - const data = JSON.stringify(data0.concat(data1, data2, data3, data4, - data5, data6)) - finder.parseData(null, data, '', cb) - } - finder.regSearchKeys = (keys, value, addOpts, cb) => { - for (var i = 0; i < keys.length; ++i) { - const fullName = `${keys[i]}\\${value}` - switch (fullName) { - case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': - case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0': - continue - case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0': - return cb(null, 'C:\\VS2013\\VC\\') - case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\12.0\\MSBuildToolsPath': - return cb(null, 'C:\\MSBuild12\\') - case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0': - return cb(null, 'C:\\VS2015\\VC\\') - case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\14.0\\MSBuildToolsPath': - return cb(null, 'C:\\MSBuild14\\') - default: - t.fail(`unexpected search for registry value ${fullName}`) - } - } - return cb(new Error()) - } -} - -test('fail when looking for invalid path', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, 'AABB', (err, info) => { - t.ok(/find .* Visual Studio/i.test(err), 'expect error') - t.false(info, 'no data') - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('look for VS2013 by version number', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, '2013', (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.versionYear, 2013) - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('look for VS2013 by installation path', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2013', - (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.path, 'C:\\VS2013') - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('look for VS2015 by version number', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, '2015', (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.versionYear, 2015) - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('look for VS2015 by installation path', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015', - (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.path, 'C:\\VS2015') - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('look for VS2017 by version number', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, '2017', (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.versionYear, 2017) - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('look for VS2017 by installation path', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community', - (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.path, - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community') - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('look for VS2019 by version number', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, '2019', (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.versionYear, 2019) - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('look for VS2019 by installation path', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools', - (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.path, - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools') - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('msvs_version match should be case insensitive', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, - 'c:\\program files (x86)\\microsoft visual studio\\2019\\BUILDTOOLS', - (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.path, - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools') - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('latest version should be found by default', function (t) { - t.plan(2) - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.versionYear, 2019) - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('run on a usable VS Command Prompt', function (t) { - t.plan(2) - - process.env.VCINSTALLDIR = 'C:\\VS2015\\VC' - // VSINSTALLDIR is not defined on Visual C++ Build Tools 2015 - delete process.env.VSINSTALLDIR - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.path, 'C:\\VS2015') - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('VCINSTALLDIR match should be case insensitive', function (t) { - t.plan(2) - - process.env.VCINSTALLDIR = - 'c:\\program files (x86)\\microsoft visual studio\\2019\\BUILDTOOLS\\VC' - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.path, - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools') - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('run on a unusable VS Command Prompt', function (t) { - t.plan(2) - - process.env.VCINSTALLDIR = - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildToolsUnusable\\VC' - - const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => { - t.ok(/find .* Visual Studio/i.test(err), 'expect error') - t.false(info, 'no data') - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('run on a VS Command Prompt with matching msvs_version', function (t) { - t.plan(2) - - process.env.VCINSTALLDIR = 'C:\\VS2015\\VC' - - const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015', - (err, info) => { - t.strictEqual(err, null) - t.deepEqual(info.path, 'C:\\VS2015') - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) - -test('run on a VS Command Prompt with mismatched msvs_version', function (t) { - t.plan(2) - - process.env.VCINSTALLDIR = - 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC' - - const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015', - (err, info) => { - t.ok(/find .* Visual Studio/i.test(err), 'expect error') - t.false(info, 'no data') - }) - - allVsVersions(t, finder) - finder.findVisualStudio() -}) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-install.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-install.js deleted file mode 100644 index 5039dc9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-install.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict' - -const { test } = require('tap') -const { test: { install } } = require('../lib/install') -const log = require('npmlog') - -log.level = 'error' // we expect a warning - -test('EACCES retry once', async (t) => { - t.plan(3) - - const fs = { - promises: { - stat (_) { - const err = new Error() - err.code = 'EACCES' - t.ok(true) - throw err - } - } - } - - const Gyp = { - devDir: __dirname, - opts: { - ensure: true - }, - commands: { - install (argv, cb) { - install(fs, Gyp, argv).then(cb, cb) - }, - remove (_, cb) { - cb() - } - } - } - - try { - await install(fs, Gyp, []) - } catch (err) { - t.ok(true) - if (/"pre" versions of node cannot be installed/.test(err.message)) { - t.ok(true) - } - } -}) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-options.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-options.js deleted file mode 100644 index b2ac62c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-options.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict' - -const test = require('tap').test -const gyp = require('../lib/node-gyp') - -test('options in environment', (t) => { - t.plan(1) - - // `npm test` dumps a ton of npm_config_* variables in the environment. - Object.keys(process.env) - .filter((key) => /^npm_config_/.test(key)) - .forEach((key) => { delete process.env[key] }) - - // in some platforms, certain keys are stubborn and cannot be removed - const keys = Object.keys(process.env) - .filter((key) => /^npm_config_/.test(key)) - .map((key) => key.substring('npm_config_'.length)) - .concat('argv', 'x') - - // Zero-length keys should get filtered out. - process.env.npm_config_ = '42' - // Other keys should get added. - process.env.npm_config_x = '42' - // Except loglevel. - process.env.npm_config_loglevel = 'debug' - - const g = gyp() - g.parseArgv(['rebuild']) // Also sets opts.argv. - - t.deepEqual(Object.keys(g.opts).sort(), keys.sort()) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-process-release.js b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-process-release.js deleted file mode 100644 index c3ee070..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/test/test-process-release.js +++ /dev/null @@ -1,434 +0,0 @@ -'use strict' - -const test = require('tap').test -const processRelease = require('../lib/process-release') - -test('test process release - process.version = 0.8.20', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v0.8.20', null) - - t.equal(release.semver.version, '0.8.20') - delete release.semver - - t.deepEqual(release, { - version: '0.8.20', - name: 'node', - baseUrl: 'https://nodejs.org/dist/v0.8.20/', - tarballUrl: 'https://nodejs.org/dist/v0.8.20/node-v0.8.20.tar.gz', - shasumsUrl: 'https://nodejs.org/dist/v0.8.20/SHASUMS256.txt', - versionDir: '0.8.20', - ia32: { libUrl: 'https://nodejs.org/dist/v0.8.20/node.lib', libPath: 'node.lib' }, - x64: { libUrl: 'https://nodejs.org/dist/v0.8.20/x64/node.lib', libPath: 'x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/dist/v0.8.20/arm64/node.lib', libPath: 'arm64/node.lib' } - }) -}) - -test('test process release - process.version = 0.10.21', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v0.10.21', null) - - t.equal(release.semver.version, '0.10.21') - delete release.semver - - t.deepEqual(release, { - version: '0.10.21', - name: 'node', - baseUrl: 'https://nodejs.org/dist/v0.10.21/', - tarballUrl: 'https://nodejs.org/dist/v0.10.21/node-v0.10.21.tar.gz', - shasumsUrl: 'https://nodejs.org/dist/v0.10.21/SHASUMS256.txt', - versionDir: '0.10.21', - ia32: { libUrl: 'https://nodejs.org/dist/v0.10.21/node.lib', libPath: 'node.lib' }, - x64: { libUrl: 'https://nodejs.org/dist/v0.10.21/x64/node.lib', libPath: 'x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/dist/v0.10.21/arm64/node.lib', libPath: 'arm64/node.lib' } - }) -}) - -// prior to -headers.tar.gz -test('test process release - process.version = 0.12.9', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v0.12.9', null) - - t.equal(release.semver.version, '0.12.9') - delete release.semver - - t.deepEqual(release, { - version: '0.12.9', - name: 'node', - baseUrl: 'https://nodejs.org/dist/v0.12.9/', - tarballUrl: 'https://nodejs.org/dist/v0.12.9/node-v0.12.9.tar.gz', - shasumsUrl: 'https://nodejs.org/dist/v0.12.9/SHASUMS256.txt', - versionDir: '0.12.9', - ia32: { libUrl: 'https://nodejs.org/dist/v0.12.9/node.lib', libPath: 'node.lib' }, - x64: { libUrl: 'https://nodejs.org/dist/v0.12.9/x64/node.lib', libPath: 'x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/dist/v0.12.9/arm64/node.lib', libPath: 'arm64/node.lib' } - }) -}) - -// prior to -headers.tar.gz -test('test process release - process.version = 0.10.41', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v0.10.41', null) - - t.equal(release.semver.version, '0.10.41') - delete release.semver - - t.deepEqual(release, { - version: '0.10.41', - name: 'node', - baseUrl: 'https://nodejs.org/dist/v0.10.41/', - tarballUrl: 'https://nodejs.org/dist/v0.10.41/node-v0.10.41.tar.gz', - shasumsUrl: 'https://nodejs.org/dist/v0.10.41/SHASUMS256.txt', - versionDir: '0.10.41', - ia32: { libUrl: 'https://nodejs.org/dist/v0.10.41/node.lib', libPath: 'node.lib' }, - x64: { libUrl: 'https://nodejs.org/dist/v0.10.41/x64/node.lib', libPath: 'x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/dist/v0.10.41/arm64/node.lib', libPath: 'arm64/node.lib' } - }) -}) - -// has -headers.tar.gz -test('test process release - process.release ~ node@0.10.42', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v0.10.42', null) - - t.equal(release.semver.version, '0.10.42') - delete release.semver - - t.deepEqual(release, { - version: '0.10.42', - name: 'node', - baseUrl: 'https://nodejs.org/dist/v0.10.42/', - tarballUrl: 'https://nodejs.org/dist/v0.10.42/node-v0.10.42-headers.tar.gz', - shasumsUrl: 'https://nodejs.org/dist/v0.10.42/SHASUMS256.txt', - versionDir: '0.10.42', - ia32: { libUrl: 'https://nodejs.org/dist/v0.10.42/node.lib', libPath: 'node.lib' }, - x64: { libUrl: 'https://nodejs.org/dist/v0.10.42/x64/node.lib', libPath: 'x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/dist/v0.10.42/arm64/node.lib', libPath: 'arm64/node.lib' } - }) -}) - -// has -headers.tar.gz -test('test process release - process.release ~ node@0.12.10', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v0.12.10', null) - - t.equal(release.semver.version, '0.12.10') - delete release.semver - - t.deepEqual(release, { - version: '0.12.10', - name: 'node', - baseUrl: 'https://nodejs.org/dist/v0.12.10/', - tarballUrl: 'https://nodejs.org/dist/v0.12.10/node-v0.12.10-headers.tar.gz', - shasumsUrl: 'https://nodejs.org/dist/v0.12.10/SHASUMS256.txt', - versionDir: '0.12.10', - ia32: { libUrl: 'https://nodejs.org/dist/v0.12.10/node.lib', libPath: 'node.lib' }, - x64: { libUrl: 'https://nodejs.org/dist/v0.12.10/x64/node.lib', libPath: 'x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/dist/v0.12.10/arm64/node.lib', libPath: 'arm64/node.lib' } - }) -}) - -test('test process release - process.release ~ node@4.1.23', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v4.1.23', { - name: 'node', - headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz' - }) - - t.equal(release.semver.version, '4.1.23') - delete release.semver - - t.deepEqual(release, { - version: '4.1.23', - name: 'node', - baseUrl: 'https://nodejs.org/dist/v4.1.23/', - tarballUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz', - shasumsUrl: 'https://nodejs.org/dist/v4.1.23/SHASUMS256.txt', - versionDir: '4.1.23', - ia32: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' }, - x64: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-arm64/node.lib', libPath: 'win-arm64/node.lib' } - }) -}) - -test('test process release - process.release ~ node@4.1.23 / corp build', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v4.1.23', { - name: 'node', - headersUrl: 'https://some.custom.location/node-v4.1.23-headers.tar.gz' - }) - - t.equal(release.semver.version, '4.1.23') - delete release.semver - - t.deepEqual(release, { - version: '4.1.23', - name: 'node', - baseUrl: 'https://some.custom.location/', - tarballUrl: 'https://some.custom.location/node-v4.1.23-headers.tar.gz', - shasumsUrl: 'https://some.custom.location/SHASUMS256.txt', - versionDir: '4.1.23', - ia32: { libUrl: 'https://some.custom.location/win-x86/node.lib', libPath: 'win-x86/node.lib' }, - x64: { libUrl: 'https://some.custom.location/win-x64/node.lib', libPath: 'win-x64/node.lib' }, - arm64: { libUrl: 'https://some.custom.location/win-arm64/node.lib', libPath: 'win-arm64/node.lib' } - }) -}) - -test('test process release - process.release ~ node@12.8.0 Windows', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v12.8.0', { - name: 'node', - sourceUrl: 'https://nodejs.org/download/release/v12.8.0/node-v12.8.0.tar.gz', - headersUrl: 'https://nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz', - libUrl: 'https://nodejs.org/download/release/v12.8.0/win-x64/node.lib' - }) - - t.equal(release.semver.version, '12.8.0') - delete release.semver - - t.deepEqual(release, { - version: '12.8.0', - name: 'node', - baseUrl: 'https://nodejs.org/download/release/v12.8.0/', - tarballUrl: 'https://nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz', - shasumsUrl: 'https://nodejs.org/download/release/v12.8.0/SHASUMS256.txt', - versionDir: '12.8.0', - ia32: { libUrl: 'https://nodejs.org/download/release/v12.8.0/win-x86/node.lib', libPath: 'win-x86/node.lib' }, - x64: { libUrl: 'https://nodejs.org/download/release/v12.8.0/win-x64/node.lib', libPath: 'win-x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/download/release/v12.8.0/win-arm64/node.lib', libPath: 'win-arm64/node.lib' } - }) -}) - -test('test process release - process.release ~ node@12.8.0 Windows ARM64', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v12.8.0', { - name: 'node', - sourceUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/node-v12.8.0.tar.gz', - headersUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz', - libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-arm64/node.lib' - }) - - t.equal(release.semver.version, '12.8.0') - delete release.semver - - t.deepEqual(release, { - version: '12.8.0', - name: 'node', - baseUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/', - tarballUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz', - shasumsUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/SHASUMS256.txt', - versionDir: '12.8.0', - ia32: { libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-x86/node.lib', libPath: 'win-x86/node.lib' }, - x64: { libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-x64/node.lib', libPath: 'win-x64/node.lib' }, - arm64: { libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-arm64/node.lib', libPath: 'win-arm64/node.lib' } - }) -}) - -test('test process release - process.release ~ node@4.1.23 --target=0.10.40', function (t) { - t.plan(2) - - var release = processRelease([], { opts: { target: '0.10.40' } }, 'v4.1.23', { - name: 'node', - headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz' - }) - - t.equal(release.semver.version, '0.10.40') - delete release.semver - - t.deepEqual(release, { - version: '0.10.40', - name: 'node', - baseUrl: 'https://nodejs.org/dist/v0.10.40/', - tarballUrl: 'https://nodejs.org/dist/v0.10.40/node-v0.10.40.tar.gz', - shasumsUrl: 'https://nodejs.org/dist/v0.10.40/SHASUMS256.txt', - versionDir: '0.10.40', - ia32: { libUrl: 'https://nodejs.org/dist/v0.10.40/node.lib', libPath: 'node.lib' }, - x64: { libUrl: 'https://nodejs.org/dist/v0.10.40/x64/node.lib', libPath: 'x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/dist/v0.10.40/arm64/node.lib', libPath: 'arm64/node.lib' } - }) -}) - -test('test process release - process.release ~ node@4.1.23 --dist-url=https://foo.bar/baz', function (t) { - t.plan(2) - - var release = processRelease([], { opts: { 'dist-url': 'https://foo.bar/baz' } }, 'v4.1.23', { - name: 'node', - headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz' - }) - - t.equal(release.semver.version, '4.1.23') - delete release.semver - - t.deepEqual(release, { - version: '4.1.23', - name: 'node', - baseUrl: 'https://foo.bar/baz/v4.1.23/', - tarballUrl: 'https://foo.bar/baz/v4.1.23/node-v4.1.23-headers.tar.gz', - shasumsUrl: 'https://foo.bar/baz/v4.1.23/SHASUMS256.txt', - versionDir: '4.1.23', - ia32: { libUrl: 'https://foo.bar/baz/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' }, - x64: { libUrl: 'https://foo.bar/baz/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' }, - arm64: { libUrl: 'https://foo.bar/baz/v4.1.23/win-arm64/node.lib', libPath: 'win-arm64/node.lib' } - }) -}) - -test('test process release - process.release ~ frankenstein@4.1.23', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v4.1.23', { - name: 'frankenstein', - headersUrl: 'https://frankensteinjs.org/dist/v4.1.23/frankenstein-v4.1.23-headers.tar.gz' - }) - - t.equal(release.semver.version, '4.1.23') - delete release.semver - - t.deepEqual(release, { - version: '4.1.23', - name: 'frankenstein', - baseUrl: 'https://frankensteinjs.org/dist/v4.1.23/', - tarballUrl: 'https://frankensteinjs.org/dist/v4.1.23/frankenstein-v4.1.23-headers.tar.gz', - shasumsUrl: 'https://frankensteinjs.org/dist/v4.1.23/SHASUMS256.txt', - versionDir: 'frankenstein-4.1.23', - ia32: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-x86/frankenstein.lib', libPath: 'win-x86/frankenstein.lib' }, - x64: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-x64/frankenstein.lib', libPath: 'win-x64/frankenstein.lib' }, - arm64: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-arm64/frankenstein.lib', libPath: 'win-arm64/frankenstein.lib' } - }) -}) - -test('test process release - process.release ~ frankenstein@4.1.23 --dist-url=http://foo.bar/baz/', function (t) { - t.plan(2) - - var release = processRelease([], { opts: { 'dist-url': 'http://foo.bar/baz/' } }, 'v4.1.23', { - name: 'frankenstein', - headersUrl: 'https://frankensteinjs.org/dist/v4.1.23/frankenstein-v4.1.23.tar.gz' - }) - - t.equal(release.semver.version, '4.1.23') - delete release.semver - - t.deepEqual(release, { - version: '4.1.23', - name: 'frankenstein', - baseUrl: 'http://foo.bar/baz/v4.1.23/', - tarballUrl: 'http://foo.bar/baz/v4.1.23/frankenstein-v4.1.23-headers.tar.gz', - shasumsUrl: 'http://foo.bar/baz/v4.1.23/SHASUMS256.txt', - versionDir: 'frankenstein-4.1.23', - ia32: { libUrl: 'http://foo.bar/baz/v4.1.23/win-x86/frankenstein.lib', libPath: 'win-x86/frankenstein.lib' }, - x64: { libUrl: 'http://foo.bar/baz/v4.1.23/win-x64/frankenstein.lib', libPath: 'win-x64/frankenstein.lib' }, - arm64: { libUrl: 'http://foo.bar/baz/v4.1.23/win-arm64/frankenstein.lib', libPath: 'win-arm64/frankenstein.lib' } - }) -}) - -test('test process release - process.release ~ node@4.0.0-rc.4', function (t) { - t.plan(2) - - var release = processRelease([], { opts: {} }, 'v4.0.0-rc.4', { - name: 'node', - headersUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz' - }) - - t.equal(release.semver.version, '4.0.0-rc.4') - delete release.semver - - t.deepEqual(release, { - version: '4.0.0-rc.4', - name: 'node', - baseUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/', - tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz', - shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt', - versionDir: '4.0.0-rc.4', - ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' }, - x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-arm64/node.lib', libPath: 'win-arm64/node.lib' } - }) -}) - -test('test process release - process.release ~ node@4.0.0-rc.4 passed as argv[0]', function (t) { - t.plan(2) - - // note the missing 'v' on the arg, it should normalise when checking - // whether we're on the default or not - var release = processRelease(['4.0.0-rc.4'], { opts: {} }, 'v4.0.0-rc.4', { - name: 'node', - headersUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz' - }) - - t.equal(release.semver.version, '4.0.0-rc.4') - delete release.semver - - t.deepEqual(release, { - version: '4.0.0-rc.4', - name: 'node', - baseUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/', - tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz', - shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt', - versionDir: '4.0.0-rc.4', - ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' }, - x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-arm64/node.lib', libPath: 'win-arm64/node.lib' } - }) -}) - -test('test process release - process.release ~ node@4.0.0-rc.4 - bogus string passed as argv[0]', function (t) { - t.plan(2) - - // additional arguments can be passed in on the commandline that should be ignored if they - // are not specifying a valid version @ position 0 - var release = processRelease(['this is no version!'], { opts: {} }, 'v4.0.0-rc.4', { - name: 'node', - headersUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz' - }) - - t.equal(release.semver.version, '4.0.0-rc.4') - delete release.semver - - t.deepEqual(release, { - version: '4.0.0-rc.4', - name: 'node', - baseUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/', - tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz', - shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt', - versionDir: '4.0.0-rc.4', - ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' }, - x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' }, - arm64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-arm64/node.lib', libPath: 'win-arm64/node.lib' } - }) -}) - -test('test process release - NODEJS_ORG_MIRROR', function (t) { - t.plan(2) - - process.env.NODEJS_ORG_MIRROR = 'http://foo.bar' - - var release = processRelease([], { opts: {} }, 'v4.1.23', { - name: 'node', - headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz' - }) - - t.equal(release.semver.version, '4.1.23') - delete release.semver - - t.deepEqual(release, { - version: '4.1.23', - name: 'node', - baseUrl: 'http://foo.bar/v4.1.23/', - tarballUrl: 'http://foo.bar/v4.1.23/node-v4.1.23-headers.tar.gz', - shasumsUrl: 'http://foo.bar/v4.1.23/SHASUMS256.txt', - versionDir: '4.1.23', - ia32: { libUrl: 'http://foo.bar/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' }, - x64: { libUrl: 'http://foo.bar/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' }, - arm64: { libUrl: 'http://foo.bar/v4.1.23/win-arm64/node.lib', libPath: 'win-arm64/node.lib' } - }) - - delete process.env.NODEJS_ORG_MIRROR -}) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/update-gyp.py b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/update-gyp.py deleted file mode 100755 index bb84f07..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/node-gyp/update-gyp.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python3 - -import argparse -import os -import shutil -import subprocess -import tarfile -import tempfile -import urllib.request - -BASE_URL = "https://github.com/nodejs/gyp-next/archive/" -CHECKOUT_PATH = os.path.dirname(os.path.realpath(__file__)) -CHECKOUT_GYP_PATH = os.path.join(CHECKOUT_PATH, "gyp") - -parser = argparse.ArgumentParser() -parser.add_argument("tag", help="gyp tag to update to") -args = parser.parse_args() - -tar_url = BASE_URL + args.tag + ".tar.gz" - -changed_files = subprocess.check_output(["git", "diff", "--name-only"]).strip() -if changed_files: - raise Exception("Can't update gyp while you have uncommitted changes in node-gyp") - -with tempfile.TemporaryDirectory() as tmp_dir: - tar_file = os.path.join(tmp_dir, "gyp.tar.gz") - unzip_target = os.path.join(tmp_dir, "gyp") - with open(tar_file, "wb") as f: - print("Downloading gyp-next@" + args.tag + " into temporary directory...") - print("From: " + tar_url) - with urllib.request.urlopen(tar_url) as in_file: - f.write(in_file.read()) - - print("Unzipping...") - with tarfile.open(tar_file, "r:gz") as tar_ref: - tar_ref.extractall(unzip_target) - - print("Moving to current checkout (" + CHECKOUT_PATH + ")...") - if os.path.exists(CHECKOUT_GYP_PATH): - shutil.rmtree(CHECKOUT_GYP_PATH) - shutil.move( - os.path.join(unzip_target, os.listdir(unzip_target)[0]), CHECKOUT_GYP_PATH - ) - -subprocess.check_output(["git", "add", "gyp"], cwd=CHECKOUT_PATH) -subprocess.check_output(["git", "commit", "-m", "feat(gyp): update gyp to " + args.tag]) diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/nopt b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/nopt deleted file mode 120000 index c85080f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/nopt +++ /dev/null @@ -1 +0,0 @@ -../../nopt@5.0.0/node_modules/nopt \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/npmlog b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/npmlog deleted file mode 120000 index a9ddc4e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/npmlog +++ /dev/null @@ -1 +0,0 @@ -../../npmlog@6.0.2/node_modules/npmlog \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/rimraf b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/rimraf deleted file mode 120000 index cfdf82e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/rimraf +++ /dev/null @@ -1 +0,0 @@ -../../rimraf@3.0.2/node_modules/rimraf \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/semver b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/semver deleted file mode 120000 index 81ddfca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/semver +++ /dev/null @@ -1 +0,0 @@ -../../semver@7.8.3/node_modules/semver \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/tar b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/tar deleted file mode 120000 index e8fc4f9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/tar +++ /dev/null @@ -1 +0,0 @@ -../../tar@6.2.1/node_modules/tar \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/which b/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/which deleted file mode 120000 index 0a19f86..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node-gyp@8.4.1/node_modules/which +++ /dev/null @@ -1 +0,0 @@ -../../which@2.0.2/node_modules/which \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0ecdsa-generate-keypair b/services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0ecdsa-generate-keypair deleted file mode 100755 index cf3fcc9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0ecdsa-generate-keypair +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../lib0/bin/0ecdsa-generate-keypair.js" "$@" -else - exec node "$basedir/../lib0/bin/0ecdsa-generate-keypair.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0gentesthtml b/services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0gentesthtml deleted file mode 100755 index 2a7b0f5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0gentesthtml +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../lib0/bin/gentesthtml.js" "$@" -else - exec node "$basedir/../lib0/bin/gentesthtml.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0serve b/services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0serve deleted file mode 100755 index 2d80662..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/.bin/0serve +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/lib0@0.2.117/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../lib0/bin/0serve.js" "$@" -else - exec node "$basedir/../lib0/bin/0serve.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@hocuspocus/common b/services/hocuspocus/node_modules/.pnpm/node_modules/@hocuspocus/common deleted file mode 120000 index 0ef9e23..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@hocuspocus/common +++ /dev/null @@ -1 +0,0 @@ -../../@hocuspocus+common@4.1.0/node_modules/@hocuspocus/common \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/core b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/core deleted file mode 120000 index d0801b7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/core +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+core@3.26.0_@tiptap+pm@3.26.0/node_modules/@tiptap/core \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-blockquote b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-blockquote deleted file mode 120000 index 2ca0114..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-blockquote +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-blockquote@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-blockquote \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-bold b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-bold deleted file mode 120000 index 8f2c1b3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-bold +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-bold@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-bold \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-bullet-list b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-bullet-list deleted file mode 120000 index ca21de2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-bullet-list +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-bullet-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__fb1e32711ff56399e25f77d096b30882/node_modules/@tiptap/extension-bullet-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-code b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-code deleted file mode 120000 index 93e7987..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-code +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-code@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-code \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-code-block b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-code-block deleted file mode 120000 index 3d7af36..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-code-block +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-code-block@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-code-block \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-document b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-document deleted file mode 120000 index 0fa1324..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-document +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-document@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-document \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-dropcursor b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-dropcursor deleted file mode 120000 index 407138d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-dropcursor +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-dropcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-dropcursor \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-gapcursor b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-gapcursor deleted file mode 120000 index 04eec0f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-gapcursor +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-gapcursor@3.26.0_@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-gapcursor \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-hard-break b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-hard-break deleted file mode 120000 index 67a116d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-hard-break +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-hard-break@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-hard-break \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-heading b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-heading deleted file mode 120000 index 591e34f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-heading +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-heading@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-heading \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-horizontal-rule b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-horizontal-rule deleted file mode 120000 index e5bf19d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-horizontal-rule +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-horizontal-rule@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-horizontal-rule \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-italic b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-italic deleted file mode 120000 index 8c6304a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-italic +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-italic@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-italic \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-link b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-link deleted file mode 120000 index fd5c4d2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-link +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-link@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-link \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list deleted file mode 120000 index d2ae075..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extension-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list-item b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list-item deleted file mode 120000 index 56877cd..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list-item +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-list-item@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_@t_903303c897127cade0923fde14c53668/node_modules/@tiptap/extension-list-item \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list-keymap b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list-keymap deleted file mode 120000 index 775809e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-list-keymap +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-list-keymap@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0__b020e9991bc57617a51a12464070aa9d/node_modules/@tiptap/extension-list-keymap \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-ordered-list b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-ordered-list deleted file mode 120000 index df1e4c9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-ordered-list +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-ordered-list@3.26.0_@tiptap+extension-list@3.26.0_@tiptap+core@3.26.0_ecabcc0f72b151ab46e444bdc5f9855f/node_modules/@tiptap/extension-ordered-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-paragraph b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-paragraph deleted file mode 120000 index 68d2602..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-paragraph +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-paragraph@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-paragraph \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-strike b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-strike deleted file mode 120000 index 43cb9b5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-strike +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-strike@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-strike \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-text b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-text deleted file mode 120000 index 9d9a41a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-text +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-text@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-text \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-underline b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-underline deleted file mode 120000 index fb4c94a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extension-underline +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extension-underline@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0_/node_modules/@tiptap/extension-underline \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extensions b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extensions deleted file mode 120000 index bfc66d9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/extensions +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+extensions@3.26.0_@tiptap+core@3.26.0_@tiptap+pm@3.26.0__@tiptap+pm@3.26.0/node_modules/@tiptap/extensions \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/pm b/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/pm deleted file mode 120000 index d971575..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/@tiptap/pm +++ /dev/null @@ -1 +0,0 @@ -../../@tiptap+pm@3.26.0/node_modules/@tiptap/pm \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/async-mutex b/services/hocuspocus/node_modules/.pnpm/node_modules/async-mutex deleted file mode 120000 index d268beb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/async-mutex +++ /dev/null @@ -1 +0,0 @@ -../async-mutex@0.5.0/node_modules/async-mutex \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/crossws b/services/hocuspocus/node_modules/.pnpm/node_modules/crossws deleted file mode 120000 index af20cc5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/crossws +++ /dev/null @@ -1 +0,0 @@ -../crossws@0.4.5/node_modules/crossws \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/isomorphic.js b/services/hocuspocus/node_modules/.pnpm/node_modules/isomorphic.js deleted file mode 120000 index 806c56f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/isomorphic.js +++ /dev/null @@ -1 +0,0 @@ -../isomorphic.js@0.2.5/node_modules/isomorphic.js \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/kleur b/services/hocuspocus/node_modules/.pnpm/node_modules/kleur deleted file mode 120000 index 1e1c253..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/kleur +++ /dev/null @@ -1 +0,0 @@ -../kleur@4.1.5/node_modules/kleur \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/lib0 b/services/hocuspocus/node_modules/.pnpm/node_modules/lib0 deleted file mode 120000 index 59875a3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/lib0 +++ /dev/null @@ -1 +0,0 @@ -../lib0@0.2.117/node_modules/lib0 \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/linkifyjs b/services/hocuspocus/node_modules/.pnpm/node_modules/linkifyjs deleted file mode 120000 index f1402c6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/linkifyjs +++ /dev/null @@ -1 +0,0 @@ -../linkifyjs@4.3.3/node_modules/linkifyjs \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/orderedmap b/services/hocuspocus/node_modules/.pnpm/node_modules/orderedmap deleted file mode 120000 index 8ac3107..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/orderedmap +++ /dev/null @@ -1 +0,0 @@ -../orderedmap@2.1.1/node_modules/orderedmap \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-changeset b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-changeset deleted file mode 120000 index 08af35f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-changeset +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-commands b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-commands deleted file mode 120000 index 9c19a50..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-commands +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-commands@1.7.1/node_modules/prosemirror-commands \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-dropcursor b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-dropcursor deleted file mode 120000 index 6b2072a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-dropcursor +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-gapcursor b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-gapcursor deleted file mode 120000 index dc615d6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-gapcursor +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-history b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-history deleted file mode 120000 index 0877c6b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-history +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-history@1.5.0/node_modules/prosemirror-history \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-inputrules b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-inputrules deleted file mode 120000 index 0355d79..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-inputrules +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-keymap b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-keymap deleted file mode 120000 index 6741794..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-keymap +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-model b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-model deleted file mode 120000 index 6aea9bb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-model +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-model@1.25.7/node_modules/prosemirror-model \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-schema-list b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-schema-list deleted file mode 120000 index 4d3de64..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-schema-list +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-schema-list@1.5.1/node_modules/prosemirror-schema-list \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-state b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-state deleted file mode 120000 index 325d759..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-state +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-state@1.4.4/node_modules/prosemirror-state \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-tables b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-tables deleted file mode 120000 index 5a9b2b8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-tables +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-tables@1.8.5/node_modules/prosemirror-tables \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-transform b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-transform deleted file mode 120000 index bba25d0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-transform +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-transform@1.12.0/node_modules/prosemirror-transform \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-view b/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-view deleted file mode 120000 index 0439d5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/prosemirror-view +++ /dev/null @@ -1 +0,0 @@ -../prosemirror-view@1.41.8/node_modules/prosemirror-view \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/rope-sequence b/services/hocuspocus/node_modules/.pnpm/node_modules/rope-sequence deleted file mode 120000 index 8f37d32..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/rope-sequence +++ /dev/null @@ -1 +0,0 @@ -../rope-sequence@1.3.4/node_modules/rope-sequence \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/tslib b/services/hocuspocus/node_modules/.pnpm/node_modules/tslib deleted file mode 120000 index 9e1c1d3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/tslib +++ /dev/null @@ -1 +0,0 @@ -../tslib@2.8.1/node_modules/tslib \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/w3c-keyname b/services/hocuspocus/node_modules/.pnpm/node_modules/w3c-keyname deleted file mode 120000 index 050adce..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/w3c-keyname +++ /dev/null @@ -1 +0,0 @@ -../w3c-keyname@2.2.8/node_modules/w3c-keyname \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/y-prosemirror b/services/hocuspocus/node_modules/.pnpm/node_modules/y-prosemirror deleted file mode 120000 index 0e439c0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/y-prosemirror +++ /dev/null @@ -1 +0,0 @@ -../y-prosemirror@1.3.7_prosemirror-model@1.25.7_prosemirror-state@1.4.4_prosemirror-view@1_f68b1e07eab9a1d76503503e79c9e4d2/node_modules/y-prosemirror \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/node_modules/y-protocols b/services/hocuspocus/node_modules/.pnpm/node_modules/y-protocols deleted file mode 120000 index 74daab3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/node_modules/y-protocols +++ /dev/null @@ -1 +0,0 @@ -../y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/abbrev b/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/abbrev deleted file mode 120000 index 291b4fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/abbrev +++ /dev/null @@ -1 +0,0 @@ -../../abbrev@1.1.1/node_modules/abbrev \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/CHANGELOG.md deleted file mode 100644 index 82a09fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/CHANGELOG.md +++ /dev/null @@ -1,58 +0,0 @@ -### v4.0.1 (2016-12-14) - -#### WHOOPS - -* [`fb9b1ce`](https://github.com/npm/nopt/commit/fb9b1ce57b3c69b4f7819015be87719204f77ef6) - Merged so many patches at once that the code fencing - ([@adius](https://github.com/adius)) added got broken. Sorry, - ([@adius](https://github.com/adius))! - ([@othiym23](https://github.com/othiym23)) - -### v4.0.0 (2016-12-13) - -#### BREAKING CHANGES - -* [`651d447`](https://github.com/npm/nopt/commit/651d4473946096d341a480bbe56793de3fc706aa) - When parsing String-typed arguments, if the next value is `""`, don't simply - swallow it. ([@samjonester](https://github.com/samjonester)) - -#### PERFORMANCE TWEAKS - -* [`3370ce8`](https://github.com/npm/nopt/commit/3370ce87a7618ba228883861db84ddbcdff252a9) - Simplify initialization. ([@elidoran](https://github.com/elidoran)) -* [`356e58e`](https://github.com/npm/nopt/commit/356e58e3b3b431a4b1af7fd7bdee44c2c0526a09) - Store `Array.isArray(types[arg])` for reuse. - ([@elidoran](https://github.com/elidoran)) -* [`0d95e90`](https://github.com/npm/nopt/commit/0d95e90515844f266015b56d2c80b94e5d14a07e) - Interpret single-item type arrays as a single type. - ([@samjonester](https://github.com/samjonester)) -* [`07c69d3`](https://github.com/npm/nopt/commit/07c69d38b5186450941fbb505550becb78a0e925) - Simplify key-value extraction. ([@elidoran](https://github.com/elidoran)) -* [`39b6e5c`](https://github.com/npm/nopt/commit/39b6e5c65ac47f60cd43a1fbeece5cd4c834c254) - Only call `Date.parse(val)` once. ([@elidoran](https://github.com/elidoran)) -* [`934943d`](https://github.com/npm/nopt/commit/934943dffecb55123a2b15959fe2a359319a5dbd) - Use `osenv.home()` to find a user's home directory instead of assuming it's - always `$HOME`. ([@othiym23](https://github.com/othiym23)) - -#### TEST & CI IMPROVEMENTS - -* [`326ffff`](https://github.com/npm/nopt/commit/326ffff7f78a00bcd316adecf69075f8a8093619) - Fix `/tmp` test to work on Windows. - ([@elidoran](https://github.com/elidoran)) -* [`c89d31a`](https://github.com/npm/nopt/commit/c89d31a49d14f2238bc6672db08da697bbc57f1b) - Only run Windows tests on Windows, only run Unix tests on a Unix. - ([@elidoran](https://github.com/elidoran)) -* [`affd3d1`](https://github.com/npm/nopt/commit/affd3d1d0addffa93006397b2013b18447339366) - Refresh Travis to run the tests against the currently-supported batch of npm - versions. ([@helio](https://github.com/helio)-frota) -* [`55f9449`](https://github.com/npm/nopt/commit/55f94497d163ed4d16dd55fd6c4fb95cc440e66d) - `tap@8.0.1` ([@othiym23](https://github.com/othiym23)) - -#### DOC TWEAKS - -* [`5271229`](https://github.com/npm/nopt/commit/5271229ee7c810217dd51616c086f5d9ab224581) - Use JavaScript code block for syntax highlighting. - ([@adius](https://github.com/adius)) -* [`c0d156f`](https://github.com/npm/nopt/commit/c0d156f229f9994c5dfcec4a8886eceff7a07682) - The code sample in the README had `many2: [ oneThing ]`, and now it has - `many2: [ two, things ]`. ([@silkentrance](https://github.com/silkentrance)) diff --git a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/LICENSE b/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/README.md b/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/README.md deleted file mode 100644 index a99531c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/README.md +++ /dev/null @@ -1,213 +0,0 @@ -If you want to write an option parser, and have it be good, there are -two ways to do it. The Right Way, and the Wrong Way. - -The Wrong Way is to sit down and write an option parser. We've all done -that. - -The Right Way is to write some complex configurable program with so many -options that you hit the limit of your frustration just trying to -manage them all, and defer it with duct-tape solutions until you see -exactly to the core of the problem, and finally snap and write an -awesome option parser. - -If you want to write an option parser, don't write an option parser. -Write a package manager, or a source control system, or a service -restarter, or an operating system. You probably won't end up with a -good one of those, but if you don't give up, and you are relentless and -diligent enough in your procrastination, you may just end up with a very -nice option parser. - -## USAGE - -```javascript -// my-program.js -var nopt = require("nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - , "many1" : [String, Array] - , "many2" : [path, Array] - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag"] - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) -console.log(parsed) -``` - -This would give you support for any of the following: - -```console -$ node my-program.js --foo "blerp" --no-flag -{ "foo" : "blerp", "flag" : false } - -$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag -{ bar: 7, foo: "Mr. Hand", flag: true } - -$ node my-program.js --foo "blerp" -f -----p -{ foo: "blerp", flag: true, pick: true } - -$ node my-program.js -fp --foofoo -{ foo: "Mr. Foo", flag: true, pick: true } - -$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. -{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } - -$ node my-program.js --blatzk -fp # unknown opts are ok. -{ blatzk: true, flag: true, pick: true } - -$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value -{ blatzk: 1000, flag: true, pick: true } - -$ node my-program.js --no-blatzk -fp # unless they start with "no-" -{ blatzk: false, flag: true, pick: true } - -$ node my-program.js --baz b/a/z # known paths are resolved. -{ baz: "/Users/isaacs/b/a/z" } - -# if Array is one of the types, then it can take many -# values, and will always be an array. The other types provided -# specify what types are allowed in the list. - -$ node my-program.js --many1 5 --many1 null --many1 foo -{ many1: ["5", "null", "foo"] } - -$ node my-program.js --many2 foo --many2 bar -{ many2: ["/path/to/foo", "path/to/bar"] } -``` - -Read the tests at the bottom of `lib/nopt.js` for more examples of -what this puppy can do. - -## Types - -The following types are supported, and defined on `nopt.typeDefs` - -* String: A normal string. No parsing is done. -* path: A file system path. Gets resolved against cwd if not absolute. -* url: A url. If it doesn't parse, it isn't accepted. -* Number: Must be numeric. -* Date: Must parse as a date. If it does, and `Date` is one of the options, - then it will return a Date object, not a string. -* Boolean: Must be either `true` or `false`. If an option is a boolean, - then it does not need a value, and its presence will imply `true` as - the value. To negate boolean flags, do `--no-whatever` or `--whatever - false` -* NaN: Means that the option is strictly not allowed. Any value will - fail. -* Stream: An object matching the "Stream" class in node. Valuable - for use when validating programmatically. (npm uses this to let you - supply any WriteStream on the `outfd` and `logfd` config options.) -* Array: If `Array` is specified as one of the types, then the value - will be parsed as a list of options. This means that multiple values - can be specified, and that the value will always be an array. - -If a type is an array of values not on this list, then those are -considered valid values. For instance, in the example above, the -`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, -and any other value will be rejected. - -When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be -interpreted as their JavaScript equivalents. - -You can also mix types and values, or multiple types, in a list. For -instance `{ blah: [Number, null] }` would allow a value to be set to -either a Number or null. When types are ordered, this implies a -preference, and the first type that can be used to properly interpret -the value will be used. - -To define a new type, add it to `nopt.typeDefs`. Each item in that -hash is an object with a `type` member and a `validate` method. The -`type` member is an object that matches what goes in the type list. The -`validate` method is a function that gets called with `validate(data, -key, val)`. Validate methods should assign `data[key]` to the valid -value of `val` if it can be handled properly, or return boolean -`false` if it cannot. - -You can also call `nopt.clean(data, types, typeDefs)` to clean up a -config object and remove its invalid properties. - -## Error Handling - -By default, nopt outputs a warning to standard error when invalid values for -known options are found. You can change this behavior by assigning a method -to `nopt.invalidHandler`. This method will be called with -the offending `nopt.invalidHandler(key, val, types)`. - -If no `nopt.invalidHandler` is assigned, then it will console.error -its whining. If it is assigned to boolean `false` then the warning is -suppressed. - -## Abbreviations - -Yes, they are supported. If you define options like this: - -```javascript -{ "foolhardyelephants" : Boolean -, "pileofmonkeys" : Boolean } -``` - -Then this will work: - -```bash -node program.js --foolhar --pil -node program.js --no-f --pileofmon -# etc. -``` - -## Shorthands - -Shorthands are a hash of shorter option names to a snippet of args that -they expand to. - -If multiple one-character shorthands are all combined, and the -combination does not unambiguously match any other option or shorthand, -then they will be broken up into their constituent parts. For example: - -```json -{ "s" : ["--loglevel", "silent"] -, "g" : "--global" -, "f" : "--force" -, "p" : "--parseable" -, "l" : "--long" -} -``` - -```bash -npm ls -sgflp -# just like doing this: -npm ls --loglevel silent --global --force --long --parseable -``` - -## The Rest of the args - -The config object returned by nopt is given a special member called -`argv`, which is an object with the following fields: - -* `remain`: The remaining args after all the parsing has occurred. -* `original`: The args as they originally appeared. -* `cooked`: The args after flags and shorthands are expanded. - -## Slicing - -Node programs are called with more or less the exact argv as it appears -in C land, after the v8 and node-specific options have been plucked off. -As such, `argv[0]` is always `node` and `argv[1]` is always the -JavaScript program being run. - -That's usually not very useful to you. So they're sliced off by -default. If you want them, then you can pass in `0` as the last -argument, or any other number that you'd like to slice off the start of -the list. diff --git a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/bin/nopt.js b/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/bin/nopt.js deleted file mode 100755 index 3232d4c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/bin/nopt.js +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env node -var nopt = require("../lib/nopt") - , path = require("path") - , types = { num: Number - , bool: Boolean - , help: Boolean - , list: Array - , "num-list": [Number, Array] - , "str-list": [String, Array] - , "bool-list": [Boolean, Array] - , str: String - , clear: Boolean - , config: Boolean - , length: Number - , file: path - } - , shorthands = { s: [ "--str", "astring" ] - , b: [ "--bool" ] - , nb: [ "--no-bool" ] - , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ] - , "?": ["--help"] - , h: ["--help"] - , H: ["--help"] - , n: [ "--num", "125" ] - , c: ["--config"] - , l: ["--length"] - , f: ["--file"] - } - , parsed = nopt( types - , shorthands - , process.argv - , 2 ) - -console.log("parsed", parsed) - -if (parsed.help) { - console.log("") - console.log("nopt cli tester") - console.log("") - console.log("types") - console.log(Object.keys(types).map(function M (t) { - var type = types[t] - if (Array.isArray(type)) { - return [t, type.map(function (type) { return type.name })] - } - return [t, type && type.name] - }).reduce(function (s, i) { - s[i[0]] = i[1] - return s - }, {})) - console.log("") - console.log("shorthands") - console.log(shorthands) -} diff --git a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/lib/nopt.js b/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/lib/nopt.js deleted file mode 100644 index ecfa5da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/lib/nopt.js +++ /dev/null @@ -1,441 +0,0 @@ -// info about each config option. - -var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG - ? function () { console.error.apply(console, arguments) } - : function () {} - -var url = require("url") - , path = require("path") - , Stream = require("stream").Stream - , abbrev = require("abbrev") - , os = require("os") - -module.exports = exports = nopt -exports.clean = clean - -exports.typeDefs = - { String : { type: String, validate: validateString } - , Boolean : { type: Boolean, validate: validateBoolean } - , url : { type: url, validate: validateUrl } - , Number : { type: Number, validate: validateNumber } - , path : { type: path, validate: validatePath } - , Stream : { type: Stream, validate: validateStream } - , Date : { type: Date, validate: validateDate } - } - -function nopt (types, shorthands, args, slice) { - args = args || process.argv - types = types || {} - shorthands = shorthands || {} - if (typeof slice !== "number") slice = 2 - - debug(types, shorthands, args, slice) - - args = args.slice(slice) - var data = {} - , key - , argv = { - remain: [], - cooked: args, - original: args.slice(0) - } - - parse(args, data, argv.remain, types, shorthands) - // now data is full - clean(data, types, exports.typeDefs) - data.argv = argv - Object.defineProperty(data.argv, 'toString', { value: function () { - return this.original.map(JSON.stringify).join(" ") - }, enumerable: false }) - return data -} - -function clean (data, types, typeDefs) { - typeDefs = typeDefs || exports.typeDefs - var remove = {} - , typeDefault = [false, true, null, String, Array] - - Object.keys(data).forEach(function (k) { - if (k === "argv") return - var val = data[k] - , isArray = Array.isArray(val) - , type = types[k] - if (!isArray) val = [val] - if (!type) type = typeDefault - if (type === Array) type = typeDefault.concat(Array) - if (!Array.isArray(type)) type = [type] - - debug("val=%j", val) - debug("types=", type) - val = val.map(function (val) { - // if it's an unknown value, then parse false/true/null/numbers/dates - if (typeof val === "string") { - debug("string %j", val) - val = val.trim() - if ((val === "null" && ~type.indexOf(null)) - || (val === "true" && - (~type.indexOf(true) || ~type.indexOf(Boolean))) - || (val === "false" && - (~type.indexOf(false) || ~type.indexOf(Boolean)))) { - val = JSON.parse(val) - debug("jsonable %j", val) - } else if (~type.indexOf(Number) && !isNaN(val)) { - debug("convert to number", val) - val = +val - } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) { - debug("convert to date", val) - val = new Date(val) - } - } - - if (!types.hasOwnProperty(k)) { - return val - } - - // allow `--no-blah` to set 'blah' to null if null is allowed - if (val === false && ~type.indexOf(null) && - !(~type.indexOf(false) || ~type.indexOf(Boolean))) { - val = null - } - - var d = {} - d[k] = val - debug("prevalidated val", d, val, types[k]) - if (!validate(d, k, val, types[k], typeDefs)) { - if (exports.invalidHandler) { - exports.invalidHandler(k, val, types[k], data) - } else if (exports.invalidHandler !== false) { - debug("invalid: "+k+"="+val, types[k]) - } - return remove - } - debug("validated val", d, val, types[k]) - return d[k] - }).filter(function (val) { return val !== remove }) - - // if we allow Array specifically, then an empty array is how we - // express 'no value here', not null. Allow it. - if (!val.length && type.indexOf(Array) === -1) { - debug('VAL HAS NO LENGTH, DELETE IT', val, k, type.indexOf(Array)) - delete data[k] - } - else if (isArray) { - debug(isArray, data[k], val) - data[k] = val - } else data[k] = val[0] - - debug("k=%s val=%j", k, val, data[k]) - }) -} - -function validateString (data, k, val) { - data[k] = String(val) -} - -function validatePath (data, k, val) { - if (val === true) return false - if (val === null) return true - - val = String(val) - - var isWin = process.platform === 'win32' - , homePattern = isWin ? /^~(\/|\\)/ : /^~\// - , home = os.homedir() - - if (home && val.match(homePattern)) { - data[k] = path.resolve(home, val.substr(2)) - } else { - data[k] = path.resolve(val) - } - return true -} - -function validateNumber (data, k, val) { - debug("validate Number %j %j %j", k, val, isNaN(val)) - if (isNaN(val)) return false - data[k] = +val -} - -function validateDate (data, k, val) { - var s = Date.parse(val) - debug("validate Date %j %j %j", k, val, s) - if (isNaN(s)) return false - data[k] = new Date(val) -} - -function validateBoolean (data, k, val) { - if (val instanceof Boolean) val = val.valueOf() - else if (typeof val === "string") { - if (!isNaN(val)) val = !!(+val) - else if (val === "null" || val === "false") val = false - else val = true - } else val = !!val - data[k] = val -} - -function validateUrl (data, k, val) { - val = url.parse(String(val)) - if (!val.host) return false - data[k] = val.href -} - -function validateStream (data, k, val) { - if (!(val instanceof Stream)) return false - data[k] = val -} - -function validate (data, k, val, type, typeDefs) { - // arrays are lists of types. - if (Array.isArray(type)) { - for (var i = 0, l = type.length; i < l; i ++) { - if (type[i] === Array) continue - if (validate(data, k, val, type[i], typeDefs)) return true - } - delete data[k] - return false - } - - // an array of anything? - if (type === Array) return true - - // NaN is poisonous. Means that something is not allowed. - if (type !== type) { - debug("Poison NaN", k, val, type) - delete data[k] - return false - } - - // explicit list of values - if (val === type) { - debug("Explicitly allowed %j", val) - // if (isArray) (data[k] = data[k] || []).push(val) - // else data[k] = val - data[k] = val - return true - } - - // now go through the list of typeDefs, validate against each one. - var ok = false - , types = Object.keys(typeDefs) - for (var i = 0, l = types.length; i < l; i ++) { - debug("test type %j %j %j", k, val, types[i]) - var t = typeDefs[types[i]] - if (t && - ((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) { - var d = {} - ok = false !== t.validate(d, k, val) - val = d[k] - if (ok) { - // if (isArray) (data[k] = data[k] || []).push(val) - // else data[k] = val - data[k] = val - break - } - } - } - debug("OK? %j (%j %j %j)", ok, k, val, types[i]) - - if (!ok) delete data[k] - return ok -} - -function parse (args, data, remain, types, shorthands) { - debug("parse", args, data, remain) - - var key = null - , abbrevs = abbrev(Object.keys(types)) - , shortAbbr = abbrev(Object.keys(shorthands)) - - for (var i = 0; i < args.length; i ++) { - var arg = args[i] - debug("arg", arg) - - if (arg.match(/^-{2,}$/)) { - // done with keys. - // the rest are args. - remain.push.apply(remain, args.slice(i + 1)) - args[i] = "--" - break - } - var hadEq = false - if (arg.charAt(0) === "-" && arg.length > 1) { - var at = arg.indexOf('=') - if (at > -1) { - hadEq = true - var v = arg.substr(at + 1) - arg = arg.substr(0, at) - args.splice(i, 1, arg, v) - } - - // see if it's a shorthand - // if so, splice and back up to re-parse it. - var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) - debug("arg=%j shRes=%j", arg, shRes) - if (shRes) { - debug(arg, shRes) - args.splice.apply(args, [i, 1].concat(shRes)) - if (arg !== shRes[0]) { - i -- - continue - } - } - arg = arg.replace(/^-+/, "") - var no = null - while (arg.toLowerCase().indexOf("no-") === 0) { - no = !no - arg = arg.substr(3) - } - - if (abbrevs[arg]) arg = abbrevs[arg] - - var argType = types[arg] - var isTypeArray = Array.isArray(argType) - if (isTypeArray && argType.length === 1) { - isTypeArray = false - argType = argType[0] - } - - var isArray = argType === Array || - isTypeArray && argType.indexOf(Array) !== -1 - - // allow unknown things to be arrays if specified multiple times. - if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { - if (!Array.isArray(data[arg])) - data[arg] = [data[arg]] - isArray = true - } - - var val - , la = args[i + 1] - - var isBool = typeof no === 'boolean' || - argType === Boolean || - isTypeArray && argType.indexOf(Boolean) !== -1 || - (typeof argType === 'undefined' && !hadEq) || - (la === "false" && - (argType === null || - isTypeArray && ~argType.indexOf(null))) - - if (isBool) { - // just set and move along - val = !no - // however, also support --bool true or --bool false - if (la === "true" || la === "false") { - val = JSON.parse(la) - la = null - if (no) val = !val - i ++ - } - - // also support "foo":[Boolean, "bar"] and "--foo bar" - if (isTypeArray && la) { - if (~argType.indexOf(la)) { - // an explicit type - val = la - i ++ - } else if ( la === "null" && ~argType.indexOf(null) ) { - // null allowed - val = null - i ++ - } else if ( !la.match(/^-{2,}[^-]/) && - !isNaN(la) && - ~argType.indexOf(Number) ) { - // number - val = +la - i ++ - } else if ( !la.match(/^-[^-]/) && ~argType.indexOf(String) ) { - // string - val = la - i ++ - } - } - - if (isArray) (data[arg] = data[arg] || []).push(val) - else data[arg] = val - - continue - } - - if (argType === String) { - if (la === undefined) { - la = "" - } else if (la.match(/^-{1,2}[^-]+/)) { - la = "" - i -- - } - } - - if (la && la.match(/^-{2,}$/)) { - la = undefined - i -- - } - - val = la === undefined ? true : la - if (isArray) (data[arg] = data[arg] || []).push(val) - else data[arg] = val - - i ++ - continue - } - remain.push(arg) - } -} - -function resolveShort (arg, shorthands, shortAbbr, abbrevs) { - // handle single-char shorthands glommed together, like - // npm ls -glp, but only if there is one dash, and only if - // all of the chars are single-char shorthands, and it's - // not a match to some other abbrev. - arg = arg.replace(/^-+/, '') - - // if it's an exact known option, then don't go any further - if (abbrevs[arg] === arg) - return null - - // if it's an exact known shortopt, same deal - if (shorthands[arg]) { - // make it an array, if it's a list of words - if (shorthands[arg] && !Array.isArray(shorthands[arg])) - shorthands[arg] = shorthands[arg].split(/\s+/) - - return shorthands[arg] - } - - // first check to see if this arg is a set of single-char shorthands - var singles = shorthands.___singles - if (!singles) { - singles = Object.keys(shorthands).filter(function (s) { - return s.length === 1 - }).reduce(function (l,r) { - l[r] = true - return l - }, {}) - shorthands.___singles = singles - debug('shorthand singles', singles) - } - - var chrs = arg.split("").filter(function (c) { - return singles[c] - }) - - if (chrs.join("") === arg) return chrs.map(function (c) { - return shorthands[c] - }).reduce(function (l, r) { - return l.concat(r) - }, []) - - - // if it's an arg abbrev, and not a literal shorthand, then prefer the arg - if (abbrevs[arg] && !shorthands[arg]) - return null - - // if it's an abbr for a shorthand, then use that - if (shortAbbr[arg]) - arg = shortAbbr[arg] - - // make it an array, if it's a list of words - if (shorthands[arg] && !Array.isArray(shorthands[arg])) - shorthands[arg] = shorthands[arg].split(/\s+/) - - return shorthands[arg] -} diff --git a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/node_modules/.bin/nopt b/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/node_modules/.bin/nopt deleted file mode 100755 index 8030e80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/node_modules/.bin/nopt +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/bin/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../bin/nopt.js" "$@" -else - exec node "$basedir/../../bin/nopt.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/package.json b/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/package.json deleted file mode 100644 index 12ed02d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "nopt", - "version": "5.0.0", - "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "main": "lib/nopt.js", - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/nopt.git" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "license": "ISC", - "dependencies": { - "abbrev": "1" - }, - "devDependencies": { - "tap": "^14.10.6" - }, - "files": [ - "bin", - "lib" - ], - "engines": { - "node": ">=6" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/are-we-there-yet b/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/are-we-there-yet deleted file mode 120000 index 2522193..0000000 --- a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/are-we-there-yet +++ /dev/null @@ -1 +0,0 @@ -../../are-we-there-yet@3.0.1/node_modules/are-we-there-yet \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/console-control-strings b/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/console-control-strings deleted file mode 120000 index e1f9a74..0000000 --- a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/console-control-strings +++ /dev/null @@ -1 +0,0 @@ -../../console-control-strings@1.1.0/node_modules/console-control-strings \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/gauge b/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/gauge deleted file mode 120000 index aee3f6a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/gauge +++ /dev/null @@ -1 +0,0 @@ -../../gauge@4.0.4/node_modules/gauge \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/LICENSE.md b/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/LICENSE.md deleted file mode 100644 index 5fc208f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ - - -ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/README.md b/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/README.md deleted file mode 100644 index 268a4af..0000000 --- a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/README.md +++ /dev/null @@ -1,216 +0,0 @@ -# npmlog - -The logger util that npm uses. - -This logger is very basic. It does the logging for npm. It supports -custom levels and colored output. - -By default, logs are written to stderr. If you want to send log messages -to outputs other than streams, then you can change the `log.stream` -member, or you can just listen to the events that it emits, and do -whatever you want with them. - -# Installation - -```console -npm install npmlog --save -``` - -# Basic Usage - -```javascript -var log = require('npmlog') - -// additional stuff ---------------------------+ -// message ----------+ | -// prefix ----+ | | -// level -+ | | | -// v v v v - log.info('fyi', 'I have a kitty cat: %j', myKittyCat) -``` - -## log.level - -* {String} - -The level to display logs at. Any logs at or above this level will be -displayed. The special level `silent` will prevent anything from being -displayed ever. - -## log.record - -* {Array} - -An array of all the log messages that have been entered. - -## log.maxRecordSize - -* {Number} - -The maximum number of records to keep. If log.record gets bigger than -10% over this value, then it is sliced down to 90% of this value. - -The reason for the 10% window is so that it doesn't have to resize a -large array on every log entry. - -## log.prefixStyle - -* {Object} - -A style object that specifies how prefixes are styled. (See below) - -## log.headingStyle - -* {Object} - -A style object that specifies how the heading is styled. (See below) - -## log.heading - -* {String} Default: "" - -If set, a heading that is printed at the start of every line. - -## log.stream - -* {Stream} Default: `process.stderr` - -The stream where output is written. - -## log.enableColor() - -Force colors to be used on all messages, regardless of the output -stream. - -## log.disableColor() - -Disable colors on all messages. - -## log.enableProgress() - -Enable the display of log activity spinner and progress bar - -## log.disableProgress() - -Disable the display of a progress bar - -## log.enableUnicode() - -Force the unicode theme to be used for the progress bar. - -## log.disableUnicode() - -Disable the use of unicode in the progress bar. - -## log.setGaugeTemplate(template) - -Set a template for outputting the progress bar. See the [gauge documentation] for details. - -[gauge documentation]: https://npmjs.com/package/gauge - -## log.setGaugeThemeset(themes) - -Select a themeset to pick themes from for the progress bar. See the [gauge documentation] for details. - -## log.pause() - -Stop emitting messages to the stream, but do not drop them. - -## log.resume() - -Emit all buffered messages that were written while paused. - -## log.log(level, prefix, message, ...) - -* `level` {String} The level to emit the message at -* `prefix` {String} A string prefix. Set to "" to skip. -* `message...` Arguments to `util.format` - -Emit a log message at the specified level. - -## log\[level](prefix, message, ...) - -For example, - -* log.silly(prefix, message, ...) -* log.verbose(prefix, message, ...) -* log.info(prefix, message, ...) -* log.http(prefix, message, ...) -* log.warn(prefix, message, ...) -* log.error(prefix, message, ...) - -Like `log.log(level, prefix, message, ...)`. In this way, each level is -given a shorthand, so you can do `log.info(prefix, message)`. - -## log.addLevel(level, n, style, disp) - -* `level` {String} Level indicator -* `n` {Number} The numeric level -* `style` {Object} Object with fg, bg, inverse, etc. -* `disp` {String} Optional replacement for `level` in the output. - -Sets up a new level with a shorthand function and so forth. - -Note that if the number is `Infinity`, then setting the level to that -will cause all log messages to be suppressed. If the number is -`-Infinity`, then the only way to show it is to enable all log messages. - -## log.newItem(name, todo, weight) - -* `name` {String} Optional; progress item name. -* `todo` {Number} Optional; total amount of work to be done. Default 0. -* `weight` {Number} Optional; the weight of this item relative to others. Default 1. - -This adds a new `are-we-there-yet` item tracker to the progress tracker. The -object returned has the `log[level]` methods but is otherwise an -`are-we-there-yet` `Tracker` object. - -## log.newStream(name, todo, weight) - -This adds a new `are-we-there-yet` stream tracker to the progress tracker. The -object returned has the `log[level]` methods but is otherwise an -`are-we-there-yet` `TrackerStream` object. - -## log.newGroup(name, weight) - -This adds a new `are-we-there-yet` tracker group to the progress tracker. The -object returned has the `log[level]` methods but is otherwise an -`are-we-there-yet` `TrackerGroup` object. - -# Events - -Events are all emitted with the message object. - -* `log` Emitted for all messages -* `log.` Emitted for all messages with the `` level. -* `` Messages with prefixes also emit their prefix as an event. - -# Style Objects - -Style objects can have the following fields: - -* `fg` {String} Color for the foreground text -* `bg` {String} Color for the background -* `bold`, `inverse`, `underline` {Boolean} Set the associated property -* `bell` {Boolean} Make a noise (This is pretty annoying, probably.) - -# Message Objects - -Every log event is emitted with a message object, and the `log.record` -list contains all of them that have been created. They have the -following fields: - -* `id` {Number} -* `level` {String} -* `prefix` {String} -* `message` {String} Result of `util.format()` -* `messageRaw` {Array} Arguments to `util.format()` - -# Blocking TTYs - -We use [`set-blocking`](https://npmjs.com/package/set-blocking) to set -stderr and stdout blocking if they are tty's and have the setBlocking call. -This is a work around for an issue in early versions of Node.js 6.x, which -made stderr and stdout non-blocking on OSX. (They are always blocking -Windows and were never blocking on Linux.) `npmlog` needs them to be blocking -so that it can allow output to stdout and stderr to be interlaced. diff --git a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/lib/log.js b/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/lib/log.js deleted file mode 100644 index be650c6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/lib/log.js +++ /dev/null @@ -1,404 +0,0 @@ -'use strict' -var Progress = require('are-we-there-yet') -var Gauge = require('gauge') -var EE = require('events').EventEmitter -var log = exports = module.exports = new EE() -var util = require('util') - -var setBlocking = require('set-blocking') -var consoleControl = require('console-control-strings') - -setBlocking(true) -var stream = process.stderr -Object.defineProperty(log, 'stream', { - set: function (newStream) { - stream = newStream - if (this.gauge) { - this.gauge.setWriteTo(stream, stream) - } - }, - get: function () { - return stream - }, -}) - -// by default, decide based on tty-ness. -var colorEnabled -log.useColor = function () { - return colorEnabled != null ? colorEnabled : stream.isTTY -} - -log.enableColor = function () { - colorEnabled = true - this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled }) -} -log.disableColor = function () { - colorEnabled = false - this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled }) -} - -// default level -log.level = 'info' - -log.gauge = new Gauge(stream, { - enabled: false, // no progress bars unless asked - theme: { hasColor: log.useColor() }, - template: [ - { type: 'progressbar', length: 20 }, - { type: 'activityIndicator', kerning: 1, length: 1 }, - { type: 'section', default: '' }, - ':', - { type: 'logline', kerning: 1, default: '' }, - ], -}) - -log.tracker = new Progress.TrackerGroup() - -// we track this separately as we may need to temporarily disable the -// display of the status bar for our own loggy purposes. -log.progressEnabled = log.gauge.isEnabled() - -var unicodeEnabled - -log.enableUnicode = function () { - unicodeEnabled = true - this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled }) -} - -log.disableUnicode = function () { - unicodeEnabled = false - this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled }) -} - -log.setGaugeThemeset = function (themes) { - this.gauge.setThemeset(themes) -} - -log.setGaugeTemplate = function (template) { - this.gauge.setTemplate(template) -} - -log.enableProgress = function () { - if (this.progressEnabled) { - return - } - - this.progressEnabled = true - this.tracker.on('change', this.showProgress) - if (this._paused) { - return - } - - this.gauge.enable() -} - -log.disableProgress = function () { - if (!this.progressEnabled) { - return - } - this.progressEnabled = false - this.tracker.removeListener('change', this.showProgress) - this.gauge.disable() -} - -var trackerConstructors = ['newGroup', 'newItem', 'newStream'] - -var mixinLog = function (tracker) { - // mixin the public methods from log into the tracker - // (except: conflicts and one's we handle specially) - Object.keys(log).forEach(function (P) { - if (P[0] === '_') { - return - } - - if (trackerConstructors.filter(function (C) { - return C === P - }).length) { - return - } - - if (tracker[P]) { - return - } - - if (typeof log[P] !== 'function') { - return - } - - var func = log[P] - tracker[P] = function () { - return func.apply(log, arguments) - } - }) - // if the new tracker is a group, make sure any subtrackers get - // mixed in too - if (tracker instanceof Progress.TrackerGroup) { - trackerConstructors.forEach(function (C) { - var func = tracker[C] - tracker[C] = function () { - return mixinLog(func.apply(tracker, arguments)) - } - }) - } - return tracker -} - -// Add tracker constructors to the top level log object -trackerConstructors.forEach(function (C) { - log[C] = function () { - return mixinLog(this.tracker[C].apply(this.tracker, arguments)) - } -}) - -log.clearProgress = function (cb) { - if (!this.progressEnabled) { - return cb && process.nextTick(cb) - } - - this.gauge.hide(cb) -} - -log.showProgress = function (name, completed) { - if (!this.progressEnabled) { - return - } - - var values = {} - if (name) { - values.section = name - } - - var last = log.record[log.record.length - 1] - if (last) { - values.subsection = last.prefix - var disp = log.disp[last.level] || last.level - var logline = this._format(disp, log.style[last.level]) - if (last.prefix) { - logline += ' ' + this._format(last.prefix, this.prefixStyle) - } - - logline += ' ' + last.message.split(/\r?\n/)[0] - values.logline = logline - } - values.completed = completed || this.tracker.completed() - this.gauge.show(values) -}.bind(log) // bind for use in tracker's on-change listener - -// temporarily stop emitting, but don't drop -log.pause = function () { - this._paused = true - if (this.progressEnabled) { - this.gauge.disable() - } -} - -log.resume = function () { - if (!this._paused) { - return - } - - this._paused = false - - var b = this._buffer - this._buffer = [] - b.forEach(function (m) { - this.emitLog(m) - }, this) - if (this.progressEnabled) { - this.gauge.enable() - } -} - -log._buffer = [] - -var id = 0 -log.record = [] -log.maxRecordSize = 10000 -log.log = function (lvl, prefix, message) { - var l = this.levels[lvl] - if (l === undefined) { - return this.emit('error', new Error(util.format( - 'Undefined log level: %j', lvl))) - } - - var a = new Array(arguments.length - 2) - var stack = null - for (var i = 2; i < arguments.length; i++) { - var arg = a[i - 2] = arguments[i] - - // resolve stack traces to a plain string. - if (typeof arg === 'object' && arg instanceof Error && arg.stack) { - Object.defineProperty(arg, 'stack', { - value: stack = arg.stack + '', - enumerable: true, - writable: true, - }) - } - } - if (stack) { - a.unshift(stack + '\n') - } - message = util.format.apply(util, a) - - var m = { - id: id++, - level: lvl, - prefix: String(prefix || ''), - message: message, - messageRaw: a, - } - - this.emit('log', m) - this.emit('log.' + lvl, m) - if (m.prefix) { - this.emit(m.prefix, m) - } - - this.record.push(m) - var mrs = this.maxRecordSize - var n = this.record.length - mrs - if (n > mrs / 10) { - var newSize = Math.floor(mrs * 0.9) - this.record = this.record.slice(-1 * newSize) - } - - this.emitLog(m) -}.bind(log) - -log.emitLog = function (m) { - if (this._paused) { - this._buffer.push(m) - return - } - if (this.progressEnabled) { - this.gauge.pulse(m.prefix) - } - - var l = this.levels[m.level] - if (l === undefined) { - return - } - - if (l < this.levels[this.level]) { - return - } - - if (l > 0 && !isFinite(l)) { - return - } - - // If 'disp' is null or undefined, use the lvl as a default - // Allows: '', 0 as valid disp - var disp = log.disp[m.level] != null ? log.disp[m.level] : m.level - this.clearProgress() - m.message.split(/\r?\n/).forEach(function (line) { - var heading = this.heading - if (heading) { - this.write(heading, this.headingStyle) - this.write(' ') - } - this.write(disp, log.style[m.level]) - var p = m.prefix || '' - if (p) { - this.write(' ') - } - - this.write(p, this.prefixStyle) - this.write(' ' + line + '\n') - }, this) - this.showProgress() -} - -log._format = function (msg, style) { - if (!stream) { - return - } - - var output = '' - if (this.useColor()) { - style = style || {} - var settings = [] - if (style.fg) { - settings.push(style.fg) - } - - if (style.bg) { - settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1)) - } - - if (style.bold) { - settings.push('bold') - } - - if (style.underline) { - settings.push('underline') - } - - if (style.inverse) { - settings.push('inverse') - } - - if (settings.length) { - output += consoleControl.color(settings) - } - - if (style.beep) { - output += consoleControl.beep() - } - } - output += msg - if (this.useColor()) { - output += consoleControl.color('reset') - } - - return output -} - -log.write = function (msg, style) { - if (!stream) { - return - } - - stream.write(this._format(msg, style)) -} - -log.addLevel = function (lvl, n, style, disp) { - // If 'disp' is null or undefined, use the lvl as a default - if (disp == null) { - disp = lvl - } - - this.levels[lvl] = n - this.style[lvl] = style - if (!this[lvl]) { - this[lvl] = function () { - var a = new Array(arguments.length + 1) - a[0] = lvl - for (var i = 0; i < arguments.length; i++) { - a[i + 1] = arguments[i] - } - - return this.log.apply(this, a) - }.bind(this) - } - this.disp[lvl] = disp -} - -log.prefixStyle = { fg: 'magenta' } -log.headingStyle = { fg: 'white', bg: 'black' } - -log.style = {} -log.levels = {} -log.disp = {} -log.addLevel('silly', -Infinity, { inverse: true }, 'sill') -log.addLevel('verbose', 1000, { fg: 'cyan', bg: 'black' }, 'verb') -log.addLevel('info', 2000, { fg: 'green' }) -log.addLevel('timing', 2500, { fg: 'green', bg: 'black' }) -log.addLevel('http', 3000, { fg: 'green', bg: 'black' }) -log.addLevel('notice', 3500, { fg: 'cyan', bg: 'black' }) -log.addLevel('warn', 4000, { fg: 'black', bg: 'yellow' }, 'WARN') -log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!') -log.addLevel('silent', Infinity) - -// allow 'error' prefix -log.on('error', function () {}) diff --git a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/package.json b/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/package.json deleted file mode 100644 index bdb5a38..0000000 --- a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/npmlog/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "author": "GitHub Inc.", - "name": "npmlog", - "description": "logger for npm", - "version": "6.0.2", - "repository": { - "type": "git", - "url": "https://github.com/npm/npmlog.git" - }, - "main": "lib/log.js", - "files": [ - "bin/", - "lib/" - ], - "scripts": { - "test": "tap", - "npmclilint": "npmcli-lint", - "lint": "eslint \"**/*.js\"", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "postsnap": "npm run lintfix --", - "postlint": "template-oss-check", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "snap": "tap", - "template-oss-apply": "template-oss-apply --force" - }, - "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - }, - "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.4.1", - "tap": "^16.0.1" - }, - "license": "ISC", - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - }, - "tap": { - "branches": 95 - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.4.1" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/set-blocking b/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/set-blocking deleted file mode 120000 index b3d5b12..0000000 --- a/services/hocuspocus/node_modules/.pnpm/npmlog@6.0.2/node_modules/set-blocking +++ /dev/null @@ -1 +0,0 @@ -../../set-blocking@2.0.0/node_modules/set-blocking \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/LICENSE b/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/README.md b/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/README.md deleted file mode 100644 index 1f1ffca..0000000 --- a/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# once - -Only call a function once. - -## usage - -```javascript -var once = require('once') - -function load (file, cb) { - cb = once(cb) - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Or add to the Function.prototype in a responsible way: - -```javascript -// only has to be done once -require('once').proto() - -function load (file, cb) { - cb = cb.once() - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Ironically, the prototype feature makes this module twice as -complicated as necessary. - -To check whether you function has been called, use `fn.called`. Once the -function is called for the first time the return value of the original -function is saved in `fn.value` and subsequent calls will continue to -return this value. - -```javascript -var once = require('once') - -function load (cb) { - cb = once(cb) - var stream = createStream() - stream.once('data', cb) - stream.once('end', function () { - if (!cb.called) cb(new Error('not found')) - }) -} -``` - -## `once.strict(func)` - -Throw an error if the function is called twice. - -Some functions are expected to be called only once. Using `once` for them would -potentially hide logical errors. - -In the example below, the `greet` function has to call the callback only once: - -```javascript -function greet (name, cb) { - // return is missing from the if statement - // when no name is passed, the callback is called twice - if (!name) cb('Hello anonymous') - cb('Hello ' + name) -} - -function log (msg) { - console.log(msg) -} - -// this will print 'Hello anonymous' but the logical error will be missed -greet(null, once(msg)) - -// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time -greet(null, once.strict(msg)) -``` diff --git a/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/once.js b/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/once.js deleted file mode 100644 index 2354067..0000000 --- a/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/once.js +++ /dev/null @@ -1,42 +0,0 @@ -var wrappy = require('wrappy') -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} diff --git a/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/package.json b/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/package.json deleted file mode 100644 index 16815b2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/once/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "once", - "version": "1.4.0", - "description": "Run a function exactly one time", - "main": "once.js", - "directories": { - "test": "test" - }, - "dependencies": { - "wrappy": "1" - }, - "devDependencies": { - "tap": "^7.0.1" - }, - "scripts": { - "test": "tap test/*.js" - }, - "files": [ - "once.js" - ], - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once" - }, - "keywords": [ - "once", - "function", - "one", - "single" - ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC" -} diff --git a/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/wrappy b/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/wrappy deleted file mode 120000 index 83be1df..0000000 --- a/services/hocuspocus/node_modules/.pnpm/once@1.4.0/node_modules/wrappy +++ /dev/null @@ -1 +0,0 @@ -../../wrappy@1.0.2/node_modules/wrappy \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/LICENSE b/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/LICENSE deleted file mode 100644 index 17da88a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2016 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/README.md b/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/README.md deleted file mode 100644 index 6f24fa4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# OrderedMap - -Persistent data structure representing an ordered mapping from strings -to values, with some convenient update methods. - -This is not an efficient data structure for large maps, just a minimal -helper for cleanly creating and managing small maps in a way that -makes their key order explicit and easy to think about. - -License: MIT - -## Reference - -The exported value from this module is the class `OrderedMap`, -instances of which represent a mapping from strings to arbitrary -values. - -**`OrderedMap.from`**`(value: ?Object | OrderedMap) → OrderedMap` -Return a map with the given content. If null, create an empty map. If -given an ordered map, return that map itself. If given an object, -create a map from the object's properties. - -### Methods - -Instances of `OrderedMap` have the following methods and properties: - -**`get`**`(key: string) → ?any` -Retrieve the value stored under `key`, or return undefined when -no such key exists. - -**`update`**`(key: string, value: any, newKey: ?string) → OrderedMap` -Create a new map by replacing the value of `key` with a new -value, or adding a binding to the end of the map. If `newKey` is -given, the key of the binding will be replaced with that key. - -**`remove`**`(key: string) → OrderedMap` -Return a map with the given key removed, if it existed. - -**`addToStart`**`(key: string, value: any) → OrderedMap` -Add a new key to the start of the map. - -**`addToEnd`**`(key: string, value: any) → OrderedMap` -Add a new key to the end of the map. - -**`addBefore`**`(place: string, key: value: string, value: any) → OrderedMap` -Add a key after the given key. If `place` is not found, the new -key is added to the end. - -**`forEach`**`(f: (key: string, value: any))` -Call the given function for each key/value pair in the map, in -order. - -**`prepend`**`(map: Object | OrderedMap) → OrderedMap` -Create a new map by prepending the keys in this map that don't -appear in `map` before the keys in `map`. - -**`append`**`(map: Object | OrderedMap) → OrderedMap` -Create a new map by appending the keys in this map that don't -appear in `map` after the keys in `map`. - -**`subtract`**`(map: Object | OrderedMap) → OrderedMap` -Create a map containing all the keys in this map that don't -appear in `map`. - -**`toObject`**`() -> Object` -Return an object that has the same key/value pairs as the `map`. - -**`size`**`: number` -The amount of keys in this map. diff --git a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.cjs deleted file mode 100644 index 32e8585..0000000 --- a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.cjs +++ /dev/null @@ -1,139 +0,0 @@ -'use strict'; - -// ::- Persistent data structure representing an ordered mapping from -// strings to values, with some convenient update methods. -function OrderedMap(content) { - this.content = content; -} - -OrderedMap.prototype = { - constructor: OrderedMap, - - find: function(key) { - for (var i = 0; i < this.content.length; i += 2) - if (this.content[i] === key) return i - return -1 - }, - - // :: (string) → ?any - // Retrieve the value stored under `key`, or return undefined when - // no such key exists. - get: function(key) { - var found = this.find(key); - return found == -1 ? undefined : this.content[found + 1] - }, - - // :: (string, any, ?string) → OrderedMap - // Create a new map by replacing the value of `key` with a new - // value, or adding a binding to the end of the map. If `newKey` is - // given, the key of the binding will be replaced with that key. - update: function(key, value, newKey) { - var self = newKey && newKey != key ? this.remove(newKey) : this; - var found = self.find(key), content = self.content.slice(); - if (found == -1) { - content.push(newKey || key, value); - } else { - content[found + 1] = value; - if (newKey) content[found] = newKey; - } - return new OrderedMap(content) - }, - - // :: (string) → OrderedMap - // Return a map with the given key removed, if it existed. - remove: function(key) { - var found = this.find(key); - if (found == -1) return this - var content = this.content.slice(); - content.splice(found, 2); - return new OrderedMap(content) - }, - - // :: (string, any) → OrderedMap - // Add a new key to the start of the map. - addToStart: function(key, value) { - return new OrderedMap([key, value].concat(this.remove(key).content)) - }, - - // :: (string, any) → OrderedMap - // Add a new key to the end of the map. - addToEnd: function(key, value) { - var content = this.remove(key).content.slice(); - content.push(key, value); - return new OrderedMap(content) - }, - - // :: (string, string, any) → OrderedMap - // Add a key after the given key. If `place` is not found, the new - // key is added to the end. - addBefore: function(place, key, value) { - var without = this.remove(key), content = without.content.slice(); - var found = without.find(place); - content.splice(found == -1 ? content.length : found, 0, key, value); - return new OrderedMap(content) - }, - - // :: ((key: string, value: any)) - // Call the given function for each key/value pair in the map, in - // order. - forEach: function(f) { - for (var i = 0; i < this.content.length; i += 2) - f(this.content[i], this.content[i + 1]); - }, - - // :: (union) → OrderedMap - // Create a new map by prepending the keys in this map that don't - // appear in `map` before the keys in `map`. - prepend: function(map) { - map = OrderedMap.from(map); - if (!map.size) return this - return new OrderedMap(map.content.concat(this.subtract(map).content)) - }, - - // :: (union) → OrderedMap - // Create a new map by appending the keys in this map that don't - // appear in `map` after the keys in `map`. - append: function(map) { - map = OrderedMap.from(map); - if (!map.size) return this - return new OrderedMap(this.subtract(map).content.concat(map.content)) - }, - - // :: (union) → OrderedMap - // Create a map containing all the keys in this map that don't - // appear in `map`. - subtract: function(map) { - var result = this; - map = OrderedMap.from(map); - for (var i = 0; i < map.content.length; i += 2) - result = result.remove(map.content[i]); - return result - }, - - // :: () → Object - // Turn ordered map into a plain object. - toObject: function() { - var result = {}; - this.forEach(function(key, value) { result[key] = value; }); - return result - }, - - // :: number - // The amount of keys in this map. - get size() { - return this.content.length >> 1 - } -}; - -// :: (?union) → OrderedMap -// Return a map with the given content. If null, create an empty -// map. If given an ordered map, return that map itself. If given an -// object, create a map from the object's properties. -OrderedMap.from = function(value) { - if (value instanceof OrderedMap) return value - var content = []; - if (value) for (var prop in value) content.push(prop, value[prop]); - return new OrderedMap(content) -}; - -module.exports = OrderedMap; diff --git a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.d.cts deleted file mode 100644 index 0f0b4f1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.d.cts +++ /dev/null @@ -1,33 +0,0 @@ -declare class OrderedMap { - private constructor(content: Array) - - get(key: string): T | undefined - - update(key: string, value: T, newKey?: string): OrderedMap - - remove(key: string): OrderedMap - - addToStart(key: string, value: T): OrderedMap - - addToEnd(key: string, value: T): OrderedMap - - addBefore(place: string, key: string, value: T): OrderedMap - - forEach(fn: (key: string, value: T) => any): void - - prepend(map: MapLike): OrderedMap - - append(map: MapLike): OrderedMap - - subtract(map: MapLike): OrderedMap - - toObject(): Record; - - readonly size: number - - static from(map: MapLike): OrderedMap -} - -export type MapLike = Record | OrderedMap - -export default OrderedMap diff --git a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.d.ts deleted file mode 100644 index 0f0b4f1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -declare class OrderedMap { - private constructor(content: Array) - - get(key: string): T | undefined - - update(key: string, value: T, newKey?: string): OrderedMap - - remove(key: string): OrderedMap - - addToStart(key: string, value: T): OrderedMap - - addToEnd(key: string, value: T): OrderedMap - - addBefore(place: string, key: string, value: T): OrderedMap - - forEach(fn: (key: string, value: T) => any): void - - prepend(map: MapLike): OrderedMap - - append(map: MapLike): OrderedMap - - subtract(map: MapLike): OrderedMap - - toObject(): Record; - - readonly size: number - - static from(map: MapLike): OrderedMap -} - -export type MapLike = Record | OrderedMap - -export default OrderedMap diff --git a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.js b/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.js deleted file mode 100644 index 744d3c0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.js +++ /dev/null @@ -1,137 +0,0 @@ -// ::- Persistent data structure representing an ordered mapping from -// strings to values, with some convenient update methods. -function OrderedMap(content) { - this.content = content; -} - -OrderedMap.prototype = { - constructor: OrderedMap, - - find: function(key) { - for (var i = 0; i < this.content.length; i += 2) - if (this.content[i] === key) return i - return -1 - }, - - // :: (string) → ?any - // Retrieve the value stored under `key`, or return undefined when - // no such key exists. - get: function(key) { - var found = this.find(key); - return found == -1 ? undefined : this.content[found + 1] - }, - - // :: (string, any, ?string) → OrderedMap - // Create a new map by replacing the value of `key` with a new - // value, or adding a binding to the end of the map. If `newKey` is - // given, the key of the binding will be replaced with that key. - update: function(key, value, newKey) { - var self = newKey && newKey != key ? this.remove(newKey) : this; - var found = self.find(key), content = self.content.slice(); - if (found == -1) { - content.push(newKey || key, value); - } else { - content[found + 1] = value; - if (newKey) content[found] = newKey; - } - return new OrderedMap(content) - }, - - // :: (string) → OrderedMap - // Return a map with the given key removed, if it existed. - remove: function(key) { - var found = this.find(key); - if (found == -1) return this - var content = this.content.slice(); - content.splice(found, 2); - return new OrderedMap(content) - }, - - // :: (string, any) → OrderedMap - // Add a new key to the start of the map. - addToStart: function(key, value) { - return new OrderedMap([key, value].concat(this.remove(key).content)) - }, - - // :: (string, any) → OrderedMap - // Add a new key to the end of the map. - addToEnd: function(key, value) { - var content = this.remove(key).content.slice(); - content.push(key, value); - return new OrderedMap(content) - }, - - // :: (string, string, any) → OrderedMap - // Add a key after the given key. If `place` is not found, the new - // key is added to the end. - addBefore: function(place, key, value) { - var without = this.remove(key), content = without.content.slice(); - var found = without.find(place); - content.splice(found == -1 ? content.length : found, 0, key, value); - return new OrderedMap(content) - }, - - // :: ((key: string, value: any)) - // Call the given function for each key/value pair in the map, in - // order. - forEach: function(f) { - for (var i = 0; i < this.content.length; i += 2) - f(this.content[i], this.content[i + 1]); - }, - - // :: (union) → OrderedMap - // Create a new map by prepending the keys in this map that don't - // appear in `map` before the keys in `map`. - prepend: function(map) { - map = OrderedMap.from(map); - if (!map.size) return this - return new OrderedMap(map.content.concat(this.subtract(map).content)) - }, - - // :: (union) → OrderedMap - // Create a new map by appending the keys in this map that don't - // appear in `map` after the keys in `map`. - append: function(map) { - map = OrderedMap.from(map); - if (!map.size) return this - return new OrderedMap(this.subtract(map).content.concat(map.content)) - }, - - // :: (union) → OrderedMap - // Create a map containing all the keys in this map that don't - // appear in `map`. - subtract: function(map) { - var result = this; - map = OrderedMap.from(map); - for (var i = 0; i < map.content.length; i += 2) - result = result.remove(map.content[i]); - return result - }, - - // :: () → Object - // Turn ordered map into a plain object. - toObject: function() { - var result = {}; - this.forEach(function(key, value) { result[key] = value; }); - return result - }, - - // :: number - // The amount of keys in this map. - get size() { - return this.content.length >> 1 - } -}; - -// :: (?union) → OrderedMap -// Return a map with the given content. If null, create an empty -// map. If given an ordered map, return that map itself. If given an -// object, create a map from the object's properties. -OrderedMap.from = function(value) { - if (value instanceof OrderedMap) return value - var content = []; - if (value) for (var prop in value) content.push(prop, value[prop]); - return new OrderedMap(content) -}; - -export default OrderedMap; diff --git a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/package.json b/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/package.json deleted file mode 100644 index f4d851a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "orderedmap", - "version": "2.1.1", - "description": "Persistent ordered mapping from strings", - "type": "module", - "main": "dist/index.cjs", - "types": "dist/index.d.ts", - "module": "dist/index.js", - "exports": { - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "sideEffects": false, - "files": [ - "dist/*" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/marijnh/orderedmap.git" - }, - "keywords": [ - "persistent", - "map" - ], - "author": "Marijn Haverbeke ", - "license": "MIT", - "bugs": { - "url": "https://github.com/marijnh/orderedmap/issues" - }, - "homepage": "https://github.com/marijnh/orderedmap#readme", - "scripts": { - "build": "rollup -c", - "watch": "rollup -c -w", - "prepare": "npm run build" - }, - "devDependencies": { - "rollup": "^1.26.3" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/aggregate-error b/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/aggregate-error deleted file mode 120000 index c0fcbaa..0000000 --- a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/aggregate-error +++ /dev/null @@ -1 +0,0 @@ -../../aggregate-error@3.1.0/node_modules/aggregate-error \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.d.ts b/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.d.ts deleted file mode 100644 index bcbe0af..0000000 --- a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -declare namespace pMap { - interface Options { - /** - Number of concurrently pending promises returned by `mapper`. - - Must be an integer from 1 and up or `Infinity`. - - @default Infinity - */ - readonly concurrency?: number; - - /** - When set to `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [aggregated error](https://github.com/sindresorhus/aggregate-error) containing all the errors from the rejected promises. - - @default true - */ - readonly stopOnError?: boolean; - } - - /** - Function which is called for every item in `input`. Expected to return a `Promise` or value. - - @param element - Iterated element. - @param index - Index of the element in the source array. - */ - type Mapper = ( - element: Element, - index: number - ) => NewElement | Promise; -} - -/** -@param input - Iterated over concurrently in the `mapper` function. -@param mapper - Function which is called for every item in `input`. Expected to return a `Promise` or value. -@returns A `Promise` that is fulfilled when all promises in `input` and ones returned from `mapper` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the fulfilled values returned from `mapper` in `input` order. - -@example -``` -import pMap = require('p-map'); -import got = require('got'); - -const sites = [ - getWebsiteFromUsername('https://sindresorhus'), //=> Promise - 'https://ava.li', - 'https://github.com' -]; - -(async () => { - const mapper = async site => { - const {requestUrl} = await got.head(site); - return requestUrl; - }; - - const result = await pMap(sites, mapper, {concurrency: 2}); - - console.log(result); - //=> ['https://sindresorhus.com/', 'https://ava.li/', 'https://github.com/'] -})(); -``` -*/ -declare function pMap( - input: Iterable, - mapper: pMap.Mapper, - options?: pMap.Options -): Promise; - -export = pMap; diff --git a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js b/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js deleted file mode 100644 index c11a285..0000000 --- a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; -const AggregateError = require('aggregate-error'); - -module.exports = async ( - iterable, - mapper, - { - concurrency = Infinity, - stopOnError = true - } = {} -) => { - return new Promise((resolve, reject) => { - if (typeof mapper !== 'function') { - throw new TypeError('Mapper function is required'); - } - - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - - const next = () => { - if (isRejected) { - return; - } - - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - - if (nextItem.done) { - isIterableDone = true; - - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve(result); - } - } - - return; - } - - resolvingCount++; - - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error) { - if (stopOnError) { - isRejected = true; - reject(error); - } else { - errors.push(error); - resolvingCount--; - next(); - } - } - })(); - }; - - for (let i = 0; i < concurrency; i++) { - next(); - - if (isIterableDone) { - break; - } - } - }); -}; diff --git a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/license b/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/license deleted file mode 100644 index fa7ceba..0000000 --- a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/package.json b/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/package.json deleted file mode 100644 index 042b1af..0000000 --- a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "p-map", - "version": "4.0.0", - "description": "Map over promises concurrently", - "license": "MIT", - "repository": "sindresorhus/p-map", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "promise", - "map", - "resolved", - "wait", - "collection", - "iterable", - "iterator", - "race", - "fulfilled", - "async", - "await", - "promises", - "concurrently", - "concurrency", - "parallel", - "bluebird" - ], - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "devDependencies": { - "ava": "^2.2.0", - "delay": "^4.1.0", - "in-range": "^2.0.0", - "random-int": "^2.0.0", - "time-span": "^3.1.0", - "tsd": "^0.7.4", - "xo": "^0.27.2" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/readme.md b/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/readme.md deleted file mode 100644 index 53a3715..0000000 --- a/services/hocuspocus/node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/readme.md +++ /dev/null @@ -1,89 +0,0 @@ -# p-map [![Build Status](https://travis-ci.org/sindresorhus/p-map.svg?branch=master)](https://travis-ci.org/sindresorhus/p-map) - -> Map over promises concurrently - -Useful when you need to run promise-returning & async functions multiple times with different inputs concurrently. - -## Install - -``` -$ npm install p-map -``` - -## Usage - -```js -const pMap = require('p-map'); -const got = require('got'); - -const sites = [ - getWebsiteFromUsername('https://sindresorhus'), //=> Promise - 'https://ava.li', - 'https://github.com' -]; - -(async () => { - const mapper = async site => { - const {requestUrl} = await got.head(site); - return requestUrl; - }; - - const result = await pMap(sites, mapper, {concurrency: 2}); - - console.log(result); - //=> ['https://sindresorhus.com/', 'https://ava.li/', 'https://github.com/'] -})(); -``` - -## API - -### pMap(input, mapper, options?) - -Returns a `Promise` that is fulfilled when all promises in `input` and ones returned from `mapper` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the fulfilled values returned from `mapper` in `input` order. - -#### input - -Type: `Iterable` - -Iterated over concurrently in the `mapper` function. - -#### mapper(element, index) - -Type: `Function` - -Expected to return a `Promise` or value. - -#### options - -Type: `object` - -##### concurrency - -Type: `number` (Integer)\ -Default: `Infinity`\ -Minimum: `1` - -Number of concurrently pending promises returned by `mapper`. - -##### stopOnError - -Type: `boolean`\ -Default: `true` - -When set to `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [aggregated error](https://github.com/sindresorhus/aggregate-error) containing all the errors from the rejected promises. - -## p-map for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of p-map and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-p-map?utm_source=npm-p-map&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - -## Related - -- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency -- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently -- [p-times](https://github.com/sindresorhus/p-times) - Run promise-returning & async functions a specific number of times concurrently -- [p-props](https://github.com/sindresorhus/p-props) - Like `Promise.all()` but for `Map` and `Object` -- [p-map-series](https://github.com/sindresorhus/p-map-series) - Map over promises serially -- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control -- [More…](https://github.com/sindresorhus/promise-fun) diff --git a/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js b/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js deleted file mode 100644 index 22aa6c3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -function posix(path) { - return path.charAt(0) === '/'; -} - -function win32(path) { - // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = Boolean(device && device.charAt(1) !== ':'); - - // UNC paths are always absolute - return Boolean(result[2] || isUnc); -} - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/license b/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/license deleted file mode 100644 index 654d0bf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/package.json b/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/package.json deleted file mode 100644 index 91196d5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "path-is-absolute", - "version": "1.0.1", - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "license": "MIT", - "repository": "sindresorhus/path-is-absolute", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && node test.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "path", - "paths", - "file", - "dir", - "absolute", - "isabsolute", - "is-absolute", - "built-in", - "util", - "utils", - "core", - "ponyfill", - "polyfill", - "shim", - "is", - "detect", - "check" - ], - "devDependencies": { - "xo": "^0.16.0" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/readme.md b/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/readme.md deleted file mode 100644 index 8dbdf5f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) - -> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) - - -## Install - -``` -$ npm install --save path-is-absolute -``` - - -## Usage - -```js -const pathIsAbsolute = require('path-is-absolute'); - -// Running on Linux -pathIsAbsolute('/home/foo'); -//=> true -pathIsAbsolute('C:/Users/foo'); -//=> false - -// Running on Windows -pathIsAbsolute('C:/Users/foo'); -//=> true -pathIsAbsolute('/home/foo'); -//=> false - -// Running on any OS -pathIsAbsolute.posix('/home/foo'); -//=> true -pathIsAbsolute.posix('C:/Users/foo'); -//=> false -pathIsAbsolute.win32('C:/Users/foo'); -//=> true -pathIsAbsolute.win32('/home/foo'); -//=> false -``` - - -## API - -See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). - -### pathIsAbsolute(path) - -### pathIsAbsolute.posix(path) - -POSIX specific version. - -### pathIsAbsolute.win32(path) - -Windows specific version. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/detect-libc b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/detect-libc deleted file mode 120000 index 05470d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/detect-libc +++ /dev/null @@ -1 +0,0 @@ -../../detect-libc@2.1.2/node_modules/detect-libc \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/expand-template b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/expand-template deleted file mode 120000 index 0abd89c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/expand-template +++ /dev/null @@ -1 +0,0 @@ -../../expand-template@2.0.3/node_modules/expand-template \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/github-from-package b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/github-from-package deleted file mode 120000 index 264dea9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/github-from-package +++ /dev/null @@ -1 +0,0 @@ -../../github-from-package@0.0.0/node_modules/github-from-package \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/minimist b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/minimist deleted file mode 120000 index 9442934..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/minimist +++ /dev/null @@ -1 +0,0 @@ -../../minimist@1.2.8/node_modules/minimist \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/mkdirp-classic b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/mkdirp-classic deleted file mode 120000 index 9499b67..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/mkdirp-classic +++ /dev/null @@ -1 +0,0 @@ -../../mkdirp-classic@0.5.3/node_modules/mkdirp-classic \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/napi-build-utils b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/napi-build-utils deleted file mode 120000 index 818fde2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/napi-build-utils +++ /dev/null @@ -1 +0,0 @@ -../../napi-build-utils@2.0.0/node_modules/napi-build-utils \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/node-abi b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/node-abi deleted file mode 120000 index 314dda8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/node-abi +++ /dev/null @@ -1 +0,0 @@ -../../node-abi@3.92.0/node_modules/node-abi \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/CHANGELOG.md deleted file mode 100644 index 03cd97a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/CHANGELOG.md +++ /dev/null @@ -1,131 +0,0 @@ -# Changelog - -## [7.1.3] - 2025-01-22 - -### Fixed - -- Bump napi-build-utils from 1 to 2 ([#204](https://github.com/prebuild/prebuild-install/issues/204)) ([`1bf4a15`](https://github.com/prebuild/prebuild-install/commit/1bf4a15)) (Bailey Pearson) - -## [7.1.2] - 2024-02-29 - -### Fixed - -- Support environments where MD5 is prohibited ([#191](https://github.com/prebuild/prebuild-install/issues/191)) ([`9140468`](https://github.com/prebuild/prebuild-install/commit/9140468)) (Tomasz Szuba) - -## [7.1.1] - 2022-06-07 - -### Fixed - -- Replace use of npmlog dependency with console.error ([#182](https://github.com/prebuild/prebuild-install/issues/182)) ([`4e2284c`](https://github.com/prebuild/prebuild-install/commit/4e2284c)) (Lovell Fuller) -- Ensure script output can be captured by tests ([#181](https://github.com/prebuild/prebuild-install/issues/181)) ([`d1853cb`](https://github.com/prebuild/prebuild-install/commit/d1853cb)) (Lovell Fuller) - -## [7.1.0] - 2022-04-20 - -### Changed - -- Allow setting libc to glibc on non-glibc platform ([#176](https://github.com/prebuild/prebuild-install/issues/176)) ([`f729abb`](https://github.com/prebuild/prebuild-install/commit/f729abb)) (Joona Heinikoski) - -## [7.0.1] - 2022-01-28 - -### Changed - -- Upgrade to the latest version of `detect-libc` ([#166](https://github.com/prebuild/prebuild-install/issues/166)) ([`f71c6b9`](https://github.com/prebuild/prebuild-install/commit/f71c6b9)) (Lovell Fuller) - -## [7.0.0] - 2021-11-12 - -### Changed - -- **Breaking:** bump `node-abi` so that Electron 14+ gets correct ABI ([#161](https://github.com/prebuild/prebuild-install/issues/161)) ([`477f347`](https://github.com/prebuild/prebuild-install/commit/477f347)) (csett86). Drops support of Node.js < 10. -- Bump `simple-get` ([`7468c14`](https://github.com/prebuild/prebuild-install/commit/7468c14)) (Vincent Weevers). - -## [6.1.4] - 2021-08-11 - -### Fixed - -- Move auth token to header instead of query param ([#160](https://github.com/prebuild/prebuild-install/issues/160)) ([`b3fad76`](https://github.com/prebuild/prebuild-install/commit/b3fad76)) (nicolai-nordic) -- Remove `_` prefix as it isn't allowed by npm config ([#153](https://github.com/prebuild/prebuild-install/issues/153)) ([`a964e5b`](https://github.com/prebuild/prebuild-install/commit/a964e5b)) (Tom Boothman) -- Make `rc.path` absolute ([#158](https://github.com/prebuild/prebuild-install/issues/158)) ([`57bcc06`](https://github.com/prebuild/prebuild-install/commit/57bcc06)) (George Waters). - -## [6.1.3] - 2021-06-03 - -### Changed - -- Inline no longer maintained `noop-logger` ([#155](https://github.com/prebuild/prebuild-install/issues/155)) ([`e08d75a`](https://github.com/prebuild/prebuild-install/commit/e08d75a)) (Alexandru Dima) -- Point users towards `prebuildify` in README ([#150](https://github.com/prebuild/prebuild-install/issues/150)) ([`5ee1a2f`](https://github.com/prebuild/prebuild-install/commit/5ee1a2f)) (Vincent Weevers) - -## [6.1.2] - 2021-04-24 - -### Fixed - -- Support URL-safe strings in scoped packages ([#148](https://github.com/prebuild/prebuild-install/issues/148)) ([`db36c7a`](https://github.com/prebuild/prebuild-install/commit/db36c7a)) (Marco) - -## [6.1.1] - 2021-04-04 - -### Fixed - -- Support `force` & `buildFromSource` options in yarn ([#140](https://github.com/prebuild/prebuild-install/issues/140)) ([`8cb1ced`](https://github.com/prebuild/prebuild-install/commit/8cb1ced)) (João Moreno) -- Bump `node-abi` to prevent dedupe (closes [#135](https://github.com/prebuild/prebuild-install/issues/135)) ([`2950fb2`](https://github.com/prebuild/prebuild-install/commit/2950fb2)) (Vincent Weevers) - -## [6.1.0] - 2021-04-03 - -### Added - -- Restore local prebuilds feature ([#137](https://github.com/prebuild/prebuild-install/issues/137)) ([`dc4e5ea`](https://github.com/prebuild/prebuild-install/commit/dc4e5ea)) (Wes Roberts). Previously removed in [#81](https://github.com/prebuild/prebuild-install/issues/81) / [`a069253`](https://github.com/prebuild/prebuild-install/commit/a06925378d38ca821bfa93aa4c1fdedc253b2420). - -## [6.0.1] - 2021-02-14 - -### Fixed - -- Fixes empty `--tag-prefix` ([#143](https://github.com/prebuild/prebuild-install/issues/143)) ([**@mathiask88**](https://github.com/mathiask88)) - -## [6.0.0] - 2020-10-23 - -### Changed - -- **Breaking:** don't skip downloads in standalone mode ([`b6f3b36`](https://github.com/prebuild/prebuild-install/commit/b6f3b36)) ([**@vweevers**](https://github.com/vweevers)) - -### Added - -- Document cross platform options ([`e5c9a5a`](https://github.com/prebuild/prebuild-install/commit/e5c9a5a)) ([**@fishbone1**](https://github.com/fishbone1)) - -### Removed - -- **Breaking:** remove `--compile` and `--prebuild` options ([`94f2492`](https://github.com/prebuild/prebuild-install/commit/94f2492)) ([**@vweevers**](https://github.com/vweevers)) - -### Fixed - -- Support npm 7 ([`8acccac`](https://github.com/prebuild/prebuild-install/commit/8acccac), [`08eaf6d`](https://github.com/prebuild/prebuild-install/commit/08eaf6d), [`22175b8`](https://github.com/prebuild/prebuild-install/commit/22175b8)) ([**@vweevers**](https://github.com/vweevers)) - -## [5.3.6] - 2020-10-20 - -### Changed - -- Replace `mkdirp` dependency with `mkdirp-classic` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -[7.1.3]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.3 - -[7.1.2]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.2 - -[7.1.1]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.1 - -[7.1.0]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.0 - -[7.0.1]: https://github.com/prebuild/prebuild-install/releases/tag/v7.0.1 - -[7.0.0]: https://github.com/prebuild/prebuild-install/releases/tag/v7.0.0 - -[6.1.4]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.4 - -[6.1.3]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.3 - -[6.1.2]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.2 - -[6.1.1]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.1 - -[6.1.0]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.0 - -[6.0.1]: https://github.com/prebuild/prebuild-install/releases/tag/v6.0.1 - -[6.0.0]: https://github.com/prebuild/prebuild-install/releases/tag/v6.0.0 - -[5.3.6]: https://github.com/prebuild/prebuild-install/releases/tag/v5.3.6 diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/CONTRIBUTING.md b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/CONTRIBUTING.md deleted file mode 100644 index 07860da..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/CONTRIBUTING.md +++ /dev/null @@ -1,6 +0,0 @@ -# Contributing to prebuild - -- no commits direct to master -- all commits as pull requests (one or several per PR) -- each commit solves one identifiable problem -- never merge one's own PRs, another contributor does this diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/LICENSE b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/LICENSE deleted file mode 100644 index 66a4d2a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/README.md b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/README.md deleted file mode 100644 index d5aafa9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/README.md +++ /dev/null @@ -1,163 +0,0 @@ -# prebuild-install - -> **A command line tool to easily install prebuilt binaries for multiple versions of Node.js & Electron on a specific platform.** -> By default it downloads prebuilt binaries from a GitHub release. - -[![npm](https://img.shields.io/npm/v/prebuild-install.svg)](https://www.npmjs.com/package/prebuild-install) -![Node version](https://img.shields.io/node/v/prebuild-install.svg) -[![Test](https://img.shields.io/github/workflow/status/prebuild/prebuild-install/Test?label=test)](https://github.com/prebuild/prebuild-install/actions/workflows/test.yml) -[![Standard](https://img.shields.io/badge/standard-informational?logo=javascript\&logoColor=fff)](https://standardjs.com) -[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org) - -## Note - -**Instead of [`prebuild`](https://github.com/prebuild/prebuild) paired with [`prebuild-install`](https://github.com/prebuild/prebuild-install), we recommend [`prebuildify`](https://github.com/prebuild/prebuildify) paired with [`node-gyp-build`](https://github.com/prebuild/node-gyp-build).** - -With `prebuildify`, all prebuilt binaries are shipped inside the package that is published to npm, which means there's no need for a separate download step like you find in `prebuild`. The irony of this approach is that it is faster to download all prebuilt binaries for every platform when they are bundled than it is to download a single prebuilt binary as an install script. - -Upsides: - -1. No extra download step, making it more reliable and faster to install. -2. Supports changing runtime versions locally and using the same install between Node.js and Electron. Reinstalling or rebuilding is not necessary, as all prebuilt binaries are in the npm tarball and the correct one is simply picked on runtime. -3. The `node-gyp-build` runtime dependency is dependency-free and will remain so out of principle, because introducing dependencies would negate the shorter install time. -4. Prebuilt binaries work even if npm install scripts are disabled. -5. The npm package checksum covers prebuilt binaries too. - -Downsides: - -1. The installed npm package is larger on disk. Using [Node-API](https://nodejs.org/api/n-api.html) alleviates this because Node-API binaries are runtime-agnostic and forward-compatible. -2. Publishing is mildly more complicated, because `npm publish` must be done after compiling and fetching prebuilt binaries (typically in CI). - -## Usage - -Use [`prebuild`](https://github.com/prebuild/prebuild) to create and upload prebuilt binaries. Then change your package.json install script to: - -```json -{ - "scripts": { - "install": "prebuild-install || node-gyp rebuild" - } -} -``` - -When a consumer then installs your package with npm thus triggering the above install script, `prebuild-install` will download a suitable prebuilt binary, or exit with a non-zero exit code if there is none, which triggers `node-gyp rebuild` in order to build from source. - -Options (see below) can be passed to `prebuild-install` like so: - -```json -{ - "scripts": { - "install": "prebuild-install -r napi || node-gyp rebuild" - } -} -``` - -### Help - -``` -prebuild-install [options] - - --download -d [url] (download prebuilds, no url means github) - --target -t version (version to install for) - --runtime -r runtime (Node runtime [node, napi or electron] to build or install for, default is node) - --path -p path (make a prebuild-install here) - --token -T gh-token (github token for private repos) - --arch arch (target CPU architecture, see Node OS module docs, default is current arch) - --platform platform (target platform, see Node OS module docs, default is current platform) - --tag-prefix (github tag prefix, default is "v") - --build-from-source (skip prebuild download) - --verbose (log verbosely) - --libc (use provided libc rather than system default) - --debug (set Debug or Release configuration) - --version (print prebuild-install version and exit) -``` - -When `prebuild-install` is run via an `npm` script, options `--build-from-source`, `--debug`, `--download`, `--target`, `--runtime`, `--arch` `--platform` and `--libc` may be passed through via arguments given to the `npm` command. - -Alternatively you can set environment variables `npm_config_build_from_source=true`, `npm_config_platform`, `npm_config_arch`, `npm_config_target` `npm_config_runtime` and `npm_config_libc`. - -### Libc - -On non-glibc Linux platforms, the Libc name is appended to platform name. For example, musl-based environments are called `linuxmusl`. If `--libc=glibc` is passed as option, glibc is discarded and platform is called as just `linux`. This can be used for example to build cross-platform packages on Alpine Linux. - -### Private Repositories - -`prebuild-install` supports downloading prebuilds from private GitHub repositories using the `-T `: - -``` -$ prebuild-install -T -``` - -If you don't want to use the token on cli you can put it in `~/.prebuild-installrc`: - -``` -token= -``` - -Alternatively you can specify it in the `prebuild-install_token` environment variable. - -Note that using a GitHub token uses the API to resolve the correct release meaning that you are subject to the ([GitHub Rate Limit](https://developer.github.com/v3/rate_limit/)). - -### Create GitHub Token - -To create a token: - -- Go to [this page](https://github.com/settings/tokens) -- Click the `Generate new token` button -- Give the token a name and click the `Generate token` button, see below - -![prebuild-token](https://cloud.githubusercontent.com/assets/13285808/20844584/d0b85268-b8c0-11e6-8b08-2b19522165a9.png) - -The default scopes should be fine. - -### Custom binaries - -The end user can override binary download location through environment variables in their .npmrc file. -The variable needs to meet the mask `% your package name %_binary_host` or `% your package name %_binary_host_mirror`. For example: - -``` -leveldown_binary_host=http://overriden-host.com/overriden-path -``` - -Note that the package version subpath and file name will still be appended. -So if you are installing `leveldown@1.2.3` the resulting url will be: - -``` -http://overriden-host.com/overriden-path/v1.2.3/leveldown-v1.2.3-node-v57-win32-x64.tar.gz -``` - -#### Local prebuilds - -If you want to use prebuilds from your local filesystem, you can use the `% your package name %_local_prebuilds` .npmrc variable to set a path to the folder containing prebuilds. For example: - -``` -leveldown_local_prebuilds=/path/to/prebuilds -``` - -This option will look directly in that folder for bundles created with `prebuild`, for example: - -``` -/path/to/prebuilds/leveldown-v1.2.3-node-v57-win32-x64.tar.gz -``` - -Non-absolute paths resolve relative to the directory of the package invoking prebuild-install, e.g. for nested dependencies. - -### Cache - -All prebuilt binaries are cached to minimize traffic. So first `prebuild-install` picks binaries from the cache and if no binary could be found, it will be downloaded. Depending on the environment, the cache folder is determined in the following order: - -- `${npm_config_cache}/_prebuilds` -- `${APP_DATA}/npm-cache/_prebuilds` -- `${HOME}/.npm/_prebuilds` - -## Install - -With [npm](https://npmjs.org) do: - -``` -npm install prebuild-install -``` - -## License - -[MIT](./LICENSE) diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/asset.js b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/asset.js deleted file mode 100644 index 7a58e8b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/asset.js +++ /dev/null @@ -1,44 +0,0 @@ -const get = require('simple-get') -const util = require('./util') -const proxy = require('./proxy') - -function findAssetId (opts, cb) { - const downloadUrl = util.getDownloadUrl(opts) - const apiUrl = util.getApiUrl(opts) - const log = opts.log || util.noopLogger - - log.http('request', 'GET ' + apiUrl) - const reqOpts = proxy({ - url: apiUrl, - json: true, - headers: { - 'User-Agent': 'simple-get', - Authorization: 'token ' + opts.token - } - }, opts) - - const req = get.concat(reqOpts, function (err, res, data) { - if (err) return cb(err) - log.http(res.statusCode, apiUrl) - if (res.statusCode !== 200) return cb(err) - - // Find asset id in release - for (const release of data) { - if (release.tag_name === opts['tag-prefix'] + opts.pkg.version) { - for (const asset of release.assets) { - if (asset.browser_download_url === downloadUrl) { - return cb(null, asset.id) - } - } - } - } - - cb(new Error('Could not find GitHub release for version')) - }) - - req.setTimeout(30 * 1000, function () { - req.abort() - }) -} - -module.exports = findAssetId diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/bin.js b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/bin.js deleted file mode 100755 index e5260cc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/bin.js +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env node - -const path = require('path') -const fs = require('fs') -const napi = require('napi-build-utils') - -const pkg = require(path.resolve('package.json')) -const rc = require('./rc')(pkg) -const log = require('./log')(rc, process.env) -const download = require('./download') -const asset = require('./asset') -const util = require('./util') - -const prebuildClientVersion = require('./package.json').version -if (rc.version) { - console.log(prebuildClientVersion) - process.exit(0) -} - -if (rc.path) process.chdir(rc.path) - -if (rc.runtime === 'electron' && rc.target[0] === '4' && rc.abi === '64') { - log.error(`Electron version ${rc.target} found - skipping prebuild-install work due to known ABI issue`) - log.error('More information about this issue can be found at https://github.com/lgeiger/node-abi/issues/54') - process.exit(1) -} - -if (!fs.existsSync('package.json')) { - log.error('setup', 'No package.json found. Aborting...') - process.exit(1) -} - -if (rc.help) { - console.error(fs.readFileSync(path.join(__dirname, 'help.txt'), 'utf-8')) - process.exit(0) -} - -log.info('begin', 'Prebuild-install version', prebuildClientVersion) - -const opts = Object.assign({}, rc, { pkg: pkg, log: log }) - -if (napi.isNapiRuntime(rc.runtime)) napi.logUnsupportedVersion(rc.target, log) - -const origin = util.packageOrigin(process.env, pkg) - -if (opts.force) { - log.warn('install', 'prebuilt binaries enforced with --force!') - log.warn('install', 'prebuilt binaries may be out of date!') -} else if (origin && origin.length > 4 && origin.substr(0, 4) === 'git+') { - log.info('install', 'installing from git repository, skipping download.') - process.exit(1) -} else if (opts.buildFromSource) { - log.info('install', '--build-from-source specified, not attempting download.') - process.exit(1) -} - -const startDownload = function (downloadUrl) { - download(downloadUrl, opts, function (err) { - if (err) { - log.warn('install', err.message) - return process.exit(1) - } - log.info('install', 'Successfully installed prebuilt binary!') - }) -} - -if (opts.token) { - asset(opts, function (err, assetId) { - if (err) { - log.warn('install', err.message) - return process.exit(1) - } - - startDownload(util.getAssetUrl(opts, assetId)) - }) -} else { - startDownload(util.getDownloadUrl(opts)) -} diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/download.js b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/download.js deleted file mode 100644 index 26f04b0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/download.js +++ /dev/null @@ -1,142 +0,0 @@ -const path = require('path') -const fs = require('fs') -const get = require('simple-get') -const pump = require('pump') -const tfs = require('tar-fs') -const zlib = require('zlib') -const util = require('./util') -const error = require('./error') -const proxy = require('./proxy') -const mkdirp = require('mkdirp-classic') - -function downloadPrebuild (downloadUrl, opts, cb) { - let cachedPrebuild = util.cachedPrebuild(downloadUrl) - const localPrebuild = util.localPrebuild(downloadUrl, opts) - const tempFile = util.tempFile(cachedPrebuild) - const log = opts.log || util.noopLogger - - if (opts.nolocal) return download() - - log.info('looking for local prebuild @', localPrebuild) - fs.access(localPrebuild, fs.R_OK | fs.W_OK, function (err) { - if (err && err.code === 'ENOENT') { - return download() - } - - log.info('found local prebuild') - cachedPrebuild = localPrebuild - unpack() - }) - - function download () { - ensureNpmCacheDir(function (err) { - if (err) return onerror(err) - - log.info('looking for cached prebuild @', cachedPrebuild) - fs.access(cachedPrebuild, fs.R_OK | fs.W_OK, function (err) { - if (!(err && err.code === 'ENOENT')) { - log.info('found cached prebuild') - return unpack() - } - - log.http('request', 'GET ' + downloadUrl) - const reqOpts = proxy({ url: downloadUrl }, opts) - - if (opts.token) { - reqOpts.headers = { - 'User-Agent': 'simple-get', - Accept: 'application/octet-stream', - Authorization: 'token ' + opts.token - } - } - - const req = get(reqOpts, function (err, res) { - if (err) return onerror(err) - log.http(res.statusCode, downloadUrl) - if (res.statusCode !== 200) return onerror() - mkdirp(util.prebuildCache(), function () { - log.info('downloading to @', tempFile) - pump(res, fs.createWriteStream(tempFile), function (err) { - if (err) return onerror(err) - fs.rename(tempFile, cachedPrebuild, function (err) { - if (err) return cb(err) - log.info('renaming to @', cachedPrebuild) - unpack() - }) - }) - }) - }) - - req.setTimeout(30 * 1000, function () { - req.abort() - }) - }) - - function onerror (err) { - fs.unlink(tempFile, function () { - cb(err || error.noPrebuilts(opts)) - }) - } - }) - } - - function unpack () { - let binaryName - - const updateName = opts.updateName || function (entry) { - if (/\.node$/i.test(entry.name)) binaryName = entry.name - } - - log.info('unpacking @', cachedPrebuild) - - const options = { - readable: true, - writable: true, - hardlinkAsFilesFallback: true - } - const extract = tfs.extract(opts.path, options).on('entry', updateName) - - pump(fs.createReadStream(cachedPrebuild), zlib.createGunzip(), extract, - function (err) { - if (err) return cb(err) - - let resolved - if (binaryName) { - try { - resolved = path.resolve(opts.path || '.', binaryName) - } catch (err) { - return cb(err) - } - log.info('unpack', 'resolved to ' + resolved) - - if (opts.runtime === 'node' && opts.platform === process.platform && opts.abi === process.versions.modules && opts.arch === process.arch) { - try { - require(resolved) - } catch (err) { - return cb(err) - } - log.info('unpack', 'required ' + resolved + ' successfully') - } - } - - cb(null, resolved) - }) - } - - function ensureNpmCacheDir (cb) { - const cacheFolder = util.npmCache() - fs.access(cacheFolder, fs.R_OK | fs.W_OK, function (err) { - if (err && err.code === 'ENOENT') { - return makeNpmCacheDir() - } - cb(err) - }) - - function makeNpmCacheDir () { - log.info('npm cache directory missing, creating it...') - mkdirp(cacheFolder, cb) - } - } -} - -module.exports = downloadPrebuild diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/error.js b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/error.js deleted file mode 100644 index c266c18..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/error.js +++ /dev/null @@ -1,14 +0,0 @@ -exports.noPrebuilts = function (opts) { - return new Error([ - 'No prebuilt binaries found', - '(target=' + opts.target, - 'runtime=' + opts.runtime, - 'arch=' + opts.arch, - 'libc=' + opts.libc, - 'platform=' + opts.platform + ')' - ].join(' ')) -} - -exports.invalidArchive = function () { - return new Error('Missing .node file in archive') -} diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/help.txt b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/help.txt deleted file mode 100644 index 0dd316e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/help.txt +++ /dev/null @@ -1,16 +0,0 @@ -prebuild-install [options] - - --download -d [url] (download prebuilds, no url means github) - --target -t version (version to install for) - --runtime -r runtime (Node runtime [node or electron] to build or install for, default is node) - --path -p path (make a prebuild-install here) - --token -T gh-token (github token for private repos) - --arch arch (target CPU architecture, see Node OS module docs, default is current arch) - --platform platform (target platform, see Node OS module docs, default is current platform) - --tag-prefix (github tag prefix, default is "v") - --force (always use prebuilt binaries when available) - --build-from-source (skip prebuild download) - --verbose (log verbosely) - --libc (use provided libc rather than system default) - --debug (set Debug or Release configuration) - --version (print prebuild-install version and exit) diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/index.js b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/index.js deleted file mode 100644 index b5fc28a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.download = require('./download') diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/log.js b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/log.js deleted file mode 100644 index b5ecc01..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/log.js +++ /dev/null @@ -1,33 +0,0 @@ -const levels = { - silent: 0, - error: 1, - warn: 2, - notice: 3, - http: 4, - timing: 5, - info: 6, - verbose: 7, - silly: 8 -} - -module.exports = function (rc, env) { - const level = rc.verbose - ? 'verbose' - : env.npm_config_loglevel || 'notice' - - const logAtLevel = function (messageLevel) { - return function (...args) { - if (levels[messageLevel] <= levels[level]) { - console.error(`prebuild-install ${messageLevel} ${args.join(' ')}`) - } - } - } - - return { - error: logAtLevel('error'), - warn: logAtLevel('warn'), - http: logAtLevel('http'), - info: logAtLevel('info'), - level - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/node_modules/.bin/prebuild-install b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/node_modules/.bin/prebuild-install deleted file mode 100755 index f90617f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/node_modules/.bin/prebuild-install +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../bin.js" "$@" -else - exec node "$basedir/../../bin.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/node_modules/.bin/rc b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/node_modules/.bin/rc deleted file mode 100755 index 4825fd4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/node_modules/.bin/rc +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -z "$NODE_PATH" ]; then - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules" -else - export NODE_PATH="/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules/rc/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/rc@1.2.8/node_modules:/Users/red/workdev/ulti-backend/services/hocuspocus/node_modules/.pnpm/node_modules:$NODE_PATH" -fi -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../../../../../rc@1.2.8/node_modules/rc/cli.js" "$@" -else - exec node "$basedir/../../../../../rc@1.2.8/node_modules/rc/cli.js" "$@" -fi diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/package.json b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/package.json deleted file mode 100644 index 316b8c2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "prebuild-install", - "version": "7.1.3", - "description": "A command line tool to easily install prebuilt binaries for multiple version of node/iojs on a specific platform", - "scripts": { - "test": "standard && hallmark && tape test/*-test.js", - "hallmark": "hallmark --fix" - }, - "keywords": [ - "prebuilt", - "binaries", - "native", - "addon", - "module", - "c", - "c++", - "bindings", - "devops", - "napi" - ], - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^2.0.0", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "devDependencies": { - "a-native-module": "^1.0.0", - "hallmark": "^4.0.0", - "nock": "^10.0.6", - "rimraf": "^2.5.2", - "standard": "^16.0.4", - "tape": "^5.3.1", - "tempy": "0.2.1" - }, - "bin": "./bin.js", - "repository": { - "type": "git", - "url": "https://github.com/prebuild/prebuild-install.git" - }, - "author": "Mathias Buus (@mafintosh)", - "contributors": [ - "Julian Gruber (https://github.com/juliangruber)", - "Brett Lawson (https://github.com/brett19)", - "Pieter Hintjens (https://github.com/hintjens)", - "Lars-Magnus Skog (https://github.com/ralphtheninja)", - "Jesús Leganés Combarro (https://github.com/piranna)", - "Mathias Küsel (https://github.com/mathiask88)", - "Lukas Geiger (https://github.com/lgeiger)" - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/prebuild/prebuild-install/issues" - }, - "homepage": "https://github.com/prebuild/prebuild-install", - "engines": { - "node": ">=10" - } -} \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/proxy.js b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/proxy.js deleted file mode 100644 index 40d3aea..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/proxy.js +++ /dev/null @@ -1,35 +0,0 @@ -const url = require('url') -const tunnel = require('tunnel-agent') -const util = require('./util') - -function applyProxy (reqOpts, opts) { - const log = opts.log || util.noopLogger - - const proxy = opts['https-proxy'] || opts.proxy - - if (proxy) { - // eslint-disable-next-line node/no-deprecated-api - const parsedDownloadUrl = url.parse(reqOpts.url) - // eslint-disable-next-line node/no-deprecated-api - const parsedProxy = url.parse(proxy) - const uriProtocol = (parsedDownloadUrl.protocol === 'https:' ? 'https' : 'http') - const proxyProtocol = (parsedProxy.protocol === 'https:' ? 'Https' : 'Http') - const tunnelFnName = [uriProtocol, proxyProtocol].join('Over') - reqOpts.agent = tunnel[tunnelFnName]({ - proxy: { - host: parsedProxy.hostname, - port: +parsedProxy.port, - proxyAuth: parsedProxy.auth - } - }) - log.http('request', 'Proxy setup detected (Host: ' + - parsedProxy.hostname + ', Port: ' + - parsedProxy.port + ', Authentication: ' + - (parsedProxy.auth ? 'Yes' : 'No') + ')' + - ' Tunneling with ' + tunnelFnName) - } - - return reqOpts -} - -module.exports = applyProxy diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/rc.js b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/rc.js deleted file mode 100644 index de0ea7a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/rc.js +++ /dev/null @@ -1,64 +0,0 @@ -const path = require('path') -const minimist = require('minimist') -const getAbi = require('node-abi').getAbi -const detectLibc = require('detect-libc') -const napi = require('napi-build-utils') - -const env = process.env - -const libc = env.LIBC || process.env.npm_config_libc || - (detectLibc.isNonGlibcLinuxSync() && detectLibc.familySync()) || '' - -// Get the configuration -module.exports = function (pkg) { - const pkgConf = pkg.config || {} - const buildFromSource = env.npm_config_build_from_source - - const rc = require('rc')('prebuild-install', { - target: pkgConf.target || env.npm_config_target || process.versions.node, - runtime: pkgConf.runtime || env.npm_config_runtime || 'node', - arch: pkgConf.arch || env.npm_config_arch || process.arch, - libc: libc, - platform: env.npm_config_platform || process.platform, - debug: env.npm_config_debug === 'true', - force: false, - verbose: env.npm_config_verbose === 'true', - buildFromSource: buildFromSource === pkg.name || buildFromSource === 'true', - path: '.', - proxy: env.npm_config_proxy || env.http_proxy || env.HTTP_PROXY, - 'https-proxy': env.npm_config_https_proxy || env.https_proxy || env.HTTPS_PROXY, - 'local-address': env.npm_config_local_address, - 'local-prebuilds': 'prebuilds', - 'tag-prefix': 'v', - download: env.npm_config_download - }, minimist(process.argv, { - alias: { - target: 't', - runtime: 'r', - help: 'h', - arch: 'a', - path: 'p', - version: 'v', - download: 'd', - buildFromSource: 'build-from-source', - token: 'T' - } - })) - - rc.path = path.resolve(rc.path === true ? '.' : rc.path || '.') - - if (napi.isNapiRuntime(rc.runtime) && rc.target === process.versions.node) { - rc.target = napi.getBestNapiBuildVersion() - } - - rc.abi = napi.isNapiRuntime(rc.runtime) ? rc.target : getAbi(rc.target, rc.runtime) - - rc.libc = rc.platform !== 'linux' || rc.libc === detectLibc.GLIBC ? '' : rc.libc - - return rc -} - -// Print the configuration values when executed standalone for testing purposses -if (!module.parent) { - console.log(JSON.stringify(module.exports({}), null, 2)) -} diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/util.js b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/util.js deleted file mode 100644 index d7cc515..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/prebuild-install/util.js +++ /dev/null @@ -1,143 +0,0 @@ -const path = require('path') -const github = require('github-from-package') -const home = require('os').homedir -const crypto = require('crypto') -const expandTemplate = require('expand-template')() - -function getDownloadUrl (opts) { - const pkgName = opts.pkg.name.replace(/^@[a-zA-Z0-9_\-.~]+\//, '') - return expandTemplate(urlTemplate(opts), { - name: pkgName, - package_name: pkgName, - version: opts.pkg.version, - major: opts.pkg.version.split('.')[0], - minor: opts.pkg.version.split('.')[1], - patch: opts.pkg.version.split('.')[2], - prerelease: opts.pkg.version.split('-')[1], - build: opts.pkg.version.split('+')[1], - abi: opts.abi || process.versions.modules, - node_abi: process.versions.modules, - runtime: opts.runtime || 'node', - platform: opts.platform, - arch: opts.arch, - libc: opts.libc || '', - configuration: (opts.debug ? 'Debug' : 'Release'), - module_name: opts.pkg.binary && opts.pkg.binary.module_name, - tag_prefix: opts['tag-prefix'] - }) -} - -function getApiUrl (opts) { - return github(opts.pkg).replace('github.com', 'api.github.com/repos') + '/releases' -} - -function getAssetUrl (opts, assetId) { - return getApiUrl(opts) + '/assets/' + assetId -} - -function urlTemplate (opts) { - if (typeof opts.download === 'string') { - return opts.download - } - - const packageName = '{name}-v{version}-{runtime}-v{abi}-{platform}{libc}-{arch}.tar.gz' - const hostMirrorUrl = getHostMirrorUrl(opts) - - if (hostMirrorUrl) { - return hostMirrorUrl + '/{tag_prefix}{version}/' + packageName - } - - if (opts.pkg.binary && opts.pkg.binary.host) { - return [ - opts.pkg.binary.host, - opts.pkg.binary.remote_path, - opts.pkg.binary.package_name || packageName - ].map(function (path) { - return trimSlashes(path) - }).filter(Boolean).join('/') - } - - return github(opts.pkg) + '/releases/download/{tag_prefix}{version}/' + packageName -} - -function getEnvPrefix (pkgName) { - return 'npm_config_' + (pkgName || '').replace(/[^a-zA-Z0-9]/g, '_').replace(/^_/, '') -} - -function getHostMirrorUrl (opts) { - const propName = getEnvPrefix(opts.pkg.name) + '_binary_host' - return process.env[propName] || process.env[propName + '_mirror'] -} - -function trimSlashes (str) { - if (str) return str.replace(/^\.\/|^\/|\/$/g, '') -} - -function cachedPrebuild (url) { - const digest = crypto.createHash('sha512').update(url).digest('hex').slice(0, 6) - return path.join(prebuildCache(), digest + '-' + path.basename(url).replace(/[^a-zA-Z0-9.]+/g, '-')) -} - -function npmCache () { - const env = process.env - return env.npm_config_cache || (env.APPDATA ? path.join(env.APPDATA, 'npm-cache') : path.join(home(), '.npm')) -} - -function prebuildCache () { - return path.join(npmCache(), '_prebuilds') -} - -function tempFile (cached) { - return cached + '.' + process.pid + '-' + Math.random().toString(16).slice(2) + '.tmp' -} - -function packageOrigin (env, pkg) { - // npm <= 6: metadata is stored on disk in node_modules - if (pkg._from) { - return pkg._from - } - - // npm 7: metadata is exposed to environment by arborist - if (env.npm_package_from) { - // NOTE: seems undefined atm (npm 7.0.2) - return env.npm_package_from - } - - if (env.npm_package_resolved) { - // NOTE: not sure about the difference with _from, but it's all we have - return env.npm_package_resolved - } -} - -function localPrebuild (url, opts) { - const propName = getEnvPrefix(opts.pkg.name) + '_local_prebuilds' - const prefix = process.env[propName] || opts['local-prebuilds'] || 'prebuilds' - return path.join(prefix, path.basename(url)) -} - -const noopLogger = { - http: function () {}, - silly: function () {}, - debug: function () {}, - info: function () {}, - warn: function () {}, - error: function () {}, - critical: function () {}, - alert: function () {}, - emergency: function () {}, - notice: function () {}, - verbose: function () {}, - fatal: function () {} -} - -exports.getDownloadUrl = getDownloadUrl -exports.getApiUrl = getApiUrl -exports.getAssetUrl = getAssetUrl -exports.urlTemplate = urlTemplate -exports.cachedPrebuild = cachedPrebuild -exports.localPrebuild = localPrebuild -exports.prebuildCache = prebuildCache -exports.npmCache = npmCache -exports.tempFile = tempFile -exports.packageOrigin = packageOrigin -exports.noopLogger = noopLogger diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/pump b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/pump deleted file mode 120000 index d4a4d74..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/pump +++ /dev/null @@ -1 +0,0 @@ -../../pump@3.0.4/node_modules/pump \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/rc b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/rc deleted file mode 120000 index 9f31497..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/rc +++ /dev/null @@ -1 +0,0 @@ -../../rc@1.2.8/node_modules/rc \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/simple-get b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/simple-get deleted file mode 120000 index fc030d4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/simple-get +++ /dev/null @@ -1 +0,0 @@ -../../simple-get@4.0.1/node_modules/simple-get \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/tar-fs b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/tar-fs deleted file mode 120000 index 73334b7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/tar-fs +++ /dev/null @@ -1 +0,0 @@ -../../tar-fs@2.1.4/node_modules/tar-fs \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/tunnel-agent b/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/tunnel-agent deleted file mode 120000 index 9946ef3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prebuild-install@7.1.3/node_modules/tunnel-agent +++ /dev/null @@ -1 +0,0 @@ -../../tunnel-agent@0.6.0/node_modules/tunnel-agent \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/LICENSE b/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/LICENSE deleted file mode 100644 index 83e7c4c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2017, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - diff --git a/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/README.md b/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/README.md deleted file mode 100644 index f0ae3a4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# promise-inflight - -One promise for multiple requests in flight to avoid async duplication - -## USAGE - -```javascript -const inflight = require('promise-inflight') - -// some request that does some stuff -function req(key) { - // key is any random string. like a url or filename or whatever. - return inflight(key, () => { - // this is where you'd fetch the url or whatever - return Promise.delay(100) - }) -} - -// only assigns a single setTimeout -// when it dings, all thens get called with the same result. (There's only -// one underlying promise.) -req('foo').then(…) -req('foo').then(…) -req('foo').then(…) -req('foo').then(…) -``` - -## SEE ALSO - -* [inflight](https://npmjs.com/package/inflight) - For the callback based function on which this is based. - -## STILL NEEDS - -Tests! diff --git a/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/inflight.js b/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/inflight.js deleted file mode 100644 index ce054d3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/inflight.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict' -module.exports = inflight - -let Bluebird -try { - Bluebird = require('bluebird') -} catch (_) { - Bluebird = Promise -} - -const active = {} -inflight.active = active -function inflight (unique, doFly) { - return Bluebird.all([unique, doFly]).then(function (args) { - const unique = args[0] - const doFly = args[1] - if (Array.isArray(unique)) { - return Bluebird.all(unique).then(function (uniqueArr) { - return _inflight(uniqueArr.join(''), doFly) - }) - } else { - return _inflight(unique, doFly) - } - }) - - function _inflight (unique, doFly) { - if (!active[unique]) { - active[unique] = (new Bluebird(function (resolve) { - return resolve(doFly()) - })) - active[unique].then(cleanup, cleanup) - function cleanup() { delete active[unique] } - } - return active[unique] - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/package.json b/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/package.json deleted file mode 100644 index 0d8930c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-inflight@1.0.1/node_modules/promise-inflight/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "promise-inflight", - "version": "1.0.1", - "description": "One promise for multiple requests in flight to avoid async duplication", - "main": "inflight.js", - "files": [ - "inflight.js" - ], - "license": "ISC", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "Rebecca Turner (http://re-becca.org/)", - "devDependencies": {}, - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/promise-inflight.git" - }, - "bugs": { - "url": "https://github.com/iarna/promise-inflight/issues" - }, - "homepage": "https://github.com/iarna/promise-inflight#readme" -} diff --git a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/err-code b/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/err-code deleted file mode 120000 index 7cbf14b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/err-code +++ /dev/null @@ -1 +0,0 @@ -../../err-code@2.0.3/node_modules/err-code \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.editorconfig b/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.editorconfig deleted file mode 100644 index 8bc4f10..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false - -[package.json] -indent_size = 2 diff --git a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.jshintrc b/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.jshintrc deleted file mode 100644 index d867d49..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.jshintrc +++ /dev/null @@ -1,64 +0,0 @@ -{ - "predef": [ - "console", - "require", - "define", - "describe", - "it", - "before", - "beforeEach", - "after", - "afterEach", - "Promise" - ], - - "node": true, - "devel": true, - - "bitwise": true, - "curly": true, - "eqeqeq": true, - "forin": false, - "immed": true, - "latedef": false, - "newcap": true, - "noarg": true, - "noempty": false, - "nonew": true, - "plusplus": false, - "regexp": true, - "undef": true, - "unused": true, - "quotmark": "single", - "strict": true, - "trailing": true, - - "asi": false, - "boss": false, - "debug": false, - "eqnull": true, - "es5": false, - "esnext": false, - "evil": false, - "expr": true, - "funcscope": false, - "globalstrict": false, - "iterator": false, - "lastsemic": false, - "laxbreak": false, - "laxcomma": false, - "loopfunc": true, - "multistr": false, - "onecase": true, - "regexdash": false, - "scripturl": false, - "smarttabs": false, - "shadow": false, - "sub": false, - "supernew": false, - "validthis": false, - - "nomen": false, - "onevar": false, - "white": true -} diff --git a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.travis.yml b/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.travis.yml deleted file mode 100644 index e2d26a9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "10" - - "12" diff --git a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/LICENSE b/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/LICENSE deleted file mode 100644 index db5e914..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 IndigoUnited - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/README.md b/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/README.md deleted file mode 100644 index 587de5c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# node-promise-retry - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url] - -[npm-url]:https://npmjs.org/package/promise-retry -[downloads-image]:http://img.shields.io/npm/dm/promise-retry.svg -[npm-image]:http://img.shields.io/npm/v/promise-retry.svg -[travis-url]:https://travis-ci.org/IndigoUnited/node-promise-retry -[travis-image]:http://img.shields.io/travis/IndigoUnited/node-promise-retry/master.svg -[david-dm-url]:https://david-dm.org/IndigoUnited/node-promise-retry -[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-promise-retry.svg -[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-promise-retry?type=dev -[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-promise-retry.svg -[greenkeeper-image]:https://badges.greenkeeper.io/IndigoUnited/node-promise-retry.svg -[greenkeeper-url]:https://greenkeeper.io/ - -Retries a function that returns a promise, leveraging the power of the [retry](https://github.com/tim-kos/node-retry) module to the promises world. - -There's already some modules that are able to retry functions that return promises but -they were rather difficult to use or do not offer an easy way to do conditional retries. - - -## Installation - -`$ npm install promise-retry` - - -## Usage - -### promiseRetry(fn, [options]) - -Calls `fn` until the returned promise ends up fulfilled or rejected with an error different than -a `retry` error. -The `options` argument is an object which maps to the [retry](https://github.com/tim-kos/node-retry) module options: - -- `retries`: The maximum amount of times to retry the operation. Default is `10`. -- `factor`: The exponential factor to use. Default is `2`. -- `minTimeout`: The number of milliseconds before starting the first retry. Default is `1000`. -- `maxTimeout`: The maximum number of milliseconds between two retries. Default is `Infinity`. -- `randomize`: Randomizes the timeouts by multiplying with a factor between `1` to `2`. Default is `false`. - - -The `fn` function will receive a `retry` function as its first argument that should be called with an error whenever you want to retry `fn`. The `retry` function will always throw an error. -If there are retries left, it will throw a special `retry` error that will be handled internally to call `fn` again. -If there are no retries left, it will throw the actual error passed to it. - -If you prefer, you can pass the options first using the alternative function signature `promiseRetry([options], fn)`. - -## Example -```js -var promiseRetry = require('promise-retry'); - -// Simple example -promiseRetry(function (retry, number) { - console.log('attempt number', number); - - return doSomething() - .catch(retry); -}) -.then(function (value) { - // .. -}, function (err) { - // .. -}); - -// Conditional example -promiseRetry(function (retry, number) { - console.log('attempt number', number); - - return doSomething() - .catch(function (err) { - if (err.code === 'ETIMEDOUT') { - retry(err); - } - - throw err; - }); -}) -.then(function (value) { - // .. -}, function (err) { - // .. -}); -``` - - -## Tests - -`$ npm test` - - -## License - -Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/index.js b/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/index.js deleted file mode 100644 index 5df48ae..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/index.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -var errcode = require('err-code'); -var retry = require('retry'); - -var hasOwn = Object.prototype.hasOwnProperty; - -function isRetryError(err) { - return err && err.code === 'EPROMISERETRY' && hasOwn.call(err, 'retried'); -} - -function promiseRetry(fn, options) { - var temp; - var operation; - - if (typeof fn === 'object' && typeof options === 'function') { - // Swap options and fn when using alternate signature (options, fn) - temp = options; - options = fn; - fn = temp; - } - - operation = retry.operation(options); - - return new Promise(function (resolve, reject) { - operation.attempt(function (number) { - Promise.resolve() - .then(function () { - return fn(function (err) { - if (isRetryError(err)) { - err = err.retried; - } - - throw errcode(new Error('Retrying'), 'EPROMISERETRY', { retried: err }); - }, number); - }) - .then(resolve, function (err) { - if (isRetryError(err)) { - err = err.retried; - - if (operation.retry(err || new Error())) { - return; - } - } - - reject(err); - }); - }); - }); -} - -module.exports = promiseRetry; diff --git a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/package.json b/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/package.json deleted file mode 100644 index 6842de8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "promise-retry", - "version": "2.0.1", - "description": "Retries a function that returns a promise, leveraging the power of the retry module.", - "main": "index.js", - "scripts": { - "test": "mocha --bail -t 10000" - }, - "bugs": { - "url": "https://github.com/IndigoUnited/node-promise-retry/issues/" - }, - "repository": { - "type": "git", - "url": "git://github.com/IndigoUnited/node-promise-retry.git" - }, - "keywords": [ - "retry", - "promise", - "backoff", - "repeat", - "replay" - ], - "author": "IndigoUnited (http://indigounited.com)", - "license": "MIT", - "devDependencies": { - "expect.js": "^0.3.1", - "mocha": "^8.0.1", - "sleep-promise": "^8.0.1" - }, - "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - }, - "engines": { - "node": ">=10" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/test/test.js b/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/test/test.js deleted file mode 100644 index 466b099..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/test/test.js +++ /dev/null @@ -1,263 +0,0 @@ -'use strict'; - -var expect = require('expect.js'); -var promiseRetry = require('../'); -var promiseDelay = require('sleep-promise'); - -describe('promise-retry', function () { - it('should call fn again if retry was called', function () { - var count = 0; - - return promiseRetry(function (retry) { - count += 1; - - return promiseDelay(10) - .then(function () { - if (count <= 2) { - retry(new Error('foo')); - } - - return 'final'; - }); - }, { factor: 1 }) - .then(function (value) { - expect(value).to.be('final'); - expect(count).to.be(3); - }, function () { - throw new Error('should not fail'); - }); - }); - - it('should call fn with the attempt number', function () { - var count = 0; - - return promiseRetry(function (retry, number) { - count += 1; - expect(count).to.equal(number); - - return promiseDelay(10) - .then(function () { - if (count <= 2) { - retry(new Error('foo')); - } - - return 'final'; - }); - }, { factor: 1 }) - .then(function (value) { - expect(value).to.be('final'); - expect(count).to.be(3); - }, function () { - throw new Error('should not fail'); - }); - }); - - it('should not retry on fulfillment if retry was not called', function () { - var count = 0; - - return promiseRetry(function () { - count += 1; - - return promiseDelay(10) - .then(function () { - return 'final'; - }); - }) - .then(function (value) { - expect(value).to.be('final'); - expect(count).to.be(1); - }, function () { - throw new Error('should not fail'); - }); - }); - - it('should not retry on rejection if retry was not called', function () { - var count = 0; - - return promiseRetry(function () { - count += 1; - - return promiseDelay(10) - .then(function () { - throw new Error('foo'); - }); - }) - .then(function () { - throw new Error('should not succeed'); - }, function (err) { - expect(err.message).to.be('foo'); - expect(count).to.be(1); - }); - }); - - it('should not retry on rejection if nr of retries is 0', function () { - var count = 0; - - return promiseRetry(function (retry) { - count += 1; - - return promiseDelay(10) - .then(function () { - throw new Error('foo'); - }) - .catch(retry); - }, { retries : 0 }) - .then(function () { - throw new Error('should not succeed'); - }, function (err) { - expect(err.message).to.be('foo'); - expect(count).to.be(1); - }); - }); - - it('should reject the promise if the retries were exceeded', function () { - var count = 0; - - return promiseRetry(function (retry) { - count += 1; - - return promiseDelay(10) - .then(function () { - throw new Error('foo'); - }) - .catch(retry); - }, { retries: 2, factor: 1 }) - .then(function () { - throw new Error('should not succeed'); - }, function (err) { - expect(err.message).to.be('foo'); - expect(count).to.be(3); - }); - }); - - it('should pass options to the underlying retry module', function () { - var count = 0; - - return promiseRetry(function (retry) { - return promiseDelay(10) - .then(function () { - if (count < 2) { - count += 1; - retry(new Error('foo')); - } - - return 'final'; - }); - }, { retries: 1, factor: 1 }) - .then(function () { - throw new Error('should not succeed'); - }, function (err) { - expect(err.message).to.be('foo'); - }); - }); - - it('should convert direct fulfillments into promises', function () { - return promiseRetry(function () { - return 'final'; - }, { factor: 1 }) - .then(function (value) { - expect(value).to.be('final'); - }, function () { - throw new Error('should not fail'); - }); - }); - - it('should convert direct rejections into promises', function () { - promiseRetry(function () { - throw new Error('foo'); - }, { retries: 1, factor: 1 }) - .then(function () { - throw new Error('should not succeed'); - }, function (err) { - expect(err.message).to.be('foo'); - }); - }); - - it('should not crash on undefined rejections', function () { - return promiseRetry(function () { - throw undefined; - }, { retries: 1, factor: 1 }) - .then(function () { - throw new Error('should not succeed'); - }, function (err) { - expect(err).to.be(undefined); - }) - .then(function () { - return promiseRetry(function (retry) { - retry(); - }, { retries: 1, factor: 1 }); - }) - .then(function () { - throw new Error('should not succeed'); - }, function (err) { - expect(err).to.be(undefined); - }); - }); - - it('should retry if retry() was called with undefined', function () { - var count = 0; - - return promiseRetry(function (retry) { - count += 1; - - return promiseDelay(10) - .then(function () { - if (count <= 2) { - retry(); - } - - return 'final'; - }); - }, { factor: 1 }) - .then(function (value) { - expect(value).to.be('final'); - expect(count).to.be(3); - }, function () { - throw new Error('should not fail'); - }); - }); - - it('should work with several retries in the same chain', function () { - var count = 0; - - return promiseRetry(function (retry) { - count += 1; - - return promiseDelay(10) - .then(function () { - retry(new Error('foo')); - }) - .catch(function (err) { - retry(err); - }); - }, { retries: 1, factor: 1 }) - .then(function () { - throw new Error('should not succeed'); - }, function (err) { - expect(err.message).to.be('foo'); - expect(count).to.be(2); - }); - }); - - it('should allow options to be passed first', function () { - var count = 0; - - return promiseRetry({ factor: 1 }, function (retry) { - count += 1; - - return promiseDelay(10) - .then(function () { - if (count <= 2) { - retry(new Error('foo')); - } - - return 'final'; - }); - }).then(function (value) { - expect(value).to.be('final'); - expect(count).to.be(3); - }, function () { - throw new Error('should not fail'); - }); - }); -}); diff --git a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/retry b/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/retry deleted file mode 120000 index 09c8a92..0000000 --- a/services/hocuspocus/node_modules/.pnpm/promise-retry@2.0.1/node_modules/retry +++ /dev/null @@ -1 +0,0 @@ -../../retry@0.12.0/node_modules/retry \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/CHANGELOG.md deleted file mode 100644 index fddcd72..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/CHANGELOG.md +++ /dev/null @@ -1,153 +0,0 @@ -## 2.4.1 (2026-04-14) - -### Bug fixes - -Fix a bug that would cause change simplification to sometimes expand changes over non-word characters. - -## 2.4.0 (2026-02-14) - -### New features - -`Change` objects can now be serialized to and deserialized from JSON, and `ChangeSet.create` allows you to pass in a set of changes. - -## 2.3.1 (2025-05-28) - -### Bug fixes - -Improve diffing to not treat closing tokens of different node types as the same token. - -## 2.3.0 (2025-05-05) - -### New features - -Change sets can now be passed a custom token encoder that controls the way changed content is diffed. - -## 2.2.1 (2023-05-17) - -### Bug fixes - -Include CommonJS type declarations in the package to please new TypeScript resolution settings. - -## 2.2.0 (2022-05-30) - -### New features - -Include TypeScript type declarations. - -## 2.1.2 (2019-11-20) - -### Bug fixes - -Rename ES module files to use a .js extension, since Webpack gets confused by .mjs - -## 2.1.1 (2019-11-19) - -### Bug fixes - -The file referred to in the package's `module` field now is compiled down to ES5. - -## 2.1.0 (2019-11-08) - -### New features - -Add a `module` field to package json file. - -## 2.0.4 (2019-03-12) - -### Bug fixes - -Fixes an issue where steps that cause multiple changed ranges (such as `ReplaceAroundStep`) would cause invalid change sets. - -Fix a bug in incremental change set updates that would cause incorrect results in a number of cases. - -## 2.0.3 (2019-01-09) - -### Bug fixes - -Make `simplifyChanges` merge adjacent simplified changes (which can occur when a word boundary is inserted). - -## 2.0.2 (2019-01-08) - -### Bug fixes - -Fix a bug in simplifyChanges that only occurred when the changes weren't at the start of the document. - -## 2.0.1 (2019-01-07) - -### Bug fixes - -Fixes issue in `simplifyChanges` where it sometimes returned nonsense when the inspected text wasn't at the start of the document. - -## 2.0.0 (2019-01-04) - -### Bug fixes - -Solves various cases where complicated edits could corrupt the set of changes due to the mapped positions of deletions not agreeing with the mapped positions of insertions. - -### New features - -Moves to a more efficient diffing algorithm (Meyers), so that large replacements can be accurately diffed using reasonable time and memory. - -You can now find the original document given to a `ChangeSet` with its `startDoc` accessor. - -### Breaking changes - -The way change data is stored in `ChangeSet` objects works differently in this version. Instead of keeping deletions and insertions in separate arrays, the object holds an array of changes, which cover all the changed regions between the old and new document. Each change has start and end positions in both the old and the new document, and contains arrays of insertions and deletions within it. - -This representation avoids a bunch of consistency problems that existed in the old approach, where keeping positions coherent in the deletion and insertion arrays was hard. - -This means the `deletions` and `insertions` members in `ChangeSet` are gone, and instead there is a `changes` property which holds an array of `Change` objects. Each of these has `fromA` and `toA` properties indicating its extent in the old document, and `fromB` and `toB` properties pointing into the new document. Actual insertions and deletions are stored in `inserted` and `deleted` arrays in `Change` objects, which hold `{data, length}` objects, where the total length of deletions adds up to `toA - fromA`, and the total length of insertions to `toB - fromB`. - -When creating a `ChangeSet` object, you no longer need to pass separate compare and combine callbacks. Instead, these are now represented using a single function that returns a combined data value or `null` when the values are not compatible. - -## 1.2.1 (2018-11-15) - -### Bug fixes - -Properly apply the heuristics for ignoring short matches when diffing, and adjust those heuristics to more agressively weed out tiny matches in large changes. - -## 1.2.0 (2018-11-08) - -### New features - -The new `changedRange` method can be used to compare two change sets and find out which range has changed. - -## 1.1.0 (2018-11-07) - -### New features - -Add a new method, `ChangeSet.map` to update the data associated with changed ranges. - -## 1.0.5 (2018-09-25) - -### Bug fixes - -Fix another issue where overlapping changes that can't be merged could produce a corrupt change set. - -## 1.0.4 (2018-09-24) - -### Bug fixes - -Fixes an issue where `addSteps` could produce invalid change sets when a new step's deleted range overlapped with an incompatible previous deletion. - -## 1.0.3 (2017-11-10) - -### Bug fixes - -Fix issue where deleting, inserting, and deleting the same content would lead to an inconsistent change set. - -## 1.0.2 (2017-10-19) - -### Bug fixes - -Fix a bug that caused `addSteps` to break when merging two insertions into a single deletion. - -## 1.0.1 (2017-10-18) - -### Bug fixes - -Fix crash in `ChangeSet.addSteps`. - -## 1.0.0 (2017-10-13) - -First stable release. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/LICENSE b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/LICENSE deleted file mode 100644 index 535f8ef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2017 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/README.md deleted file mode 100644 index b00fd1d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/README.md +++ /dev/null @@ -1,175 +0,0 @@ -# prosemirror-changeset - -This is a helper module that can turn a sequence of document changes -into a set of insertions and deletions, for example to display them in -a change-tracking interface. Such a set can be built up incrementally, -in order to do such change tracking in a halfway performant way during -live editing. - -This code is licensed under an [MIT -licence](https://code.haverbeke.berlin/prosemirror/prosemirror-changeset/src/branch/main/LICENSE). - -## Programming interface - -Insertions and deletions are represented as ‘spans’—ranges in the -document. The deleted spans refer to the original document, whereas -the inserted ones point into the current document. - -It is possible to associate arbitrary data values with such spans, for -example to track the user that made the change, the timestamp at which -it was made, or the step data necessary to invert it again. - -### class Change`` - -A replaced range with metadata associated with it. - - * **`fromA`**`: number`\ - The start of the range deleted/replaced in the old document. - - * **`toA`**`: number`\ - The end of the range in the old document. - - * **`fromB`**`: number`\ - The start of the range inserted in the new document. - - * **`toB`**`: number`\ - The end of the range in the new document. - - * **`deleted`**`: readonly Span[]`\ - Data associated with the deleted content. The length of these - spans adds up to `this.toA - this.fromA`. - - * **`inserted`**`: readonly Span[]`\ - Data associated with the inserted content. Length adds up to - `this.toB - this.fromB`. - - * **`toJSON`**`() → ChangeJSON`\ - Returns a JSON-serializeable object to represent this change. - - * `static `**`merge`**`(x: readonly Change[], y: readonly Change[], combine: fn(dataA: Data, dataB: Data) → Data) → readonly Change[]`\ - This merges two changesets (the end document of x should be the - start document of y) into a single one spanning the start of x to - the end of y. - - * `static `**`fromJSON`**`(json: ChangeJSON) → Change`\ - Deserialize a change from JSON format. - - -### class Span`` - -Stores metadata for a part of a change. - - * **`length`**`: number`\ - The length of this span. - - * **`data`**`: Data`\ - The data associated with this span. - - -### class ChangeSet`` - -A change set tracks the changes to a document from a given point -in the past. It condenses a number of step maps down to a flat -sequence of replacements, and simplifies replacments that -partially undo themselves by comparing their content. - - * **`changes`**`: readonly Change[]`\ - Replaced regions. - - * **`addSteps`**`(newDoc: Node, maps: readonly StepMap[], data: Data | readonly Data[]) → ChangeSet`\ - Computes a new changeset by adding the given step maps and - metadata (either as an array, per-map, or as a single value to be - associated with all maps) to the current set. Will not mutate the - old set. - - Note that due to simplification that happens after each add, - incrementally adding steps might create a different final set - than adding all those changes at once, since different document - tokens might be matched during simplification depending on the - boundaries of the current changed ranges. - - * **`startDoc`**`: Node`\ - The starting document of the change set. - - * **`map`**`(f: fn(range: Span) → Data) → ChangeSet`\ - Map the span's data values in the given set through a function - and construct a new set with the resulting data. - - * **`changedRange`**`(b: ChangeSet, maps?: readonly StepMap[]) → {from: number, to: number}`\ - Compare two changesets and return the range in which they are - changed, if any. If the document changed between the maps, pass - the maps for the steps that changed it as second argument, and - make sure the method is called on the old set and passed the new - set. The returned positions will be in new document coordinates. - - * `static `**`create`**`(doc: Node, combine?: fn(dataA: Data, dataB: Data) → Data = (a, b) => a === b ? a : null as any, tokenEncoder?: TokenEncoder = DefaultEncoder, changes?: readonly Change[] = []) → ChangeSet`\ - Create a changeset with the given base object and configuration. - - The `combine` function is used to compare and combine metadata—it - should return null when metadata isn't compatible, and a combined - version for a merged range when it is. - - When given, a token encoder determines how document tokens are - serialized and compared when diffing the content produced by - changes. The default is to just compare nodes by name and text - by character, ignoring marks and attributes. - - To serialize a change set, you can store its document and - change array as JSON, and then pass the deserialized (via - [`Change.fromJSON`](#changes.Change^fromJSON)) set of changes - as fourth argument to `create` to recreate the set. - - - * **`simplifyChanges`**`(changes: readonly Change[], doc: Node) → Change[]`\ - Simplifies a set of changes for presentation. This makes the - assumption that having both insertions and deletions within a word - is confusing, and, when such changes occur without a word boundary - between them, they should be expanded to cover the entire set of - words (in the new document) they touch. An exception is made for - single-character replacements. - - -### interface TokenEncoder`` - -A token encoder can be passed when creating a `ChangeSet` in order -to influence the way the library runs its diffing algorithm. The -encoder determines how document tokens (such as nodes and -characters) are encoded and compared. - -Note that both the encoding and the comparison may run a lot, and -doing non-trivial work in these functions could impact -performance. - - * **`encodeCharacter`**`(char: number, marks: readonly Mark[]) → T`\ - Encode a given character, with the given marks applied. - - * **`encodeNodeStart`**`(node: Node) → T`\ - Encode the start of a node or, if this is a leaf node, the - entire node. - - * **`encodeNodeEnd`**`(node: Node) → T`\ - Encode the end token for the given node. It is valid to encode - every end token in the same way. - - * **`compareTokens`**`(a: T, b: T) → boolean`\ - Compare the given tokens. Should return true when they count as - equal. - - -### type ChangeJSON`` - -JSON-serialized form of a change. - - * **`fromA`**`: number` - - * **`toA`**`: number` - - * **`fromB`**`: number` - - * **`toB`**`: number` - - * **`deleted`**`: readonly {length: number, data: Data}[]` - - * **`inserted`**`: readonly {length: number, data: Data}[]` - - diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.cjs deleted file mode 100644 index 92f1f99..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.cjs +++ /dev/null @@ -1,585 +0,0 @@ -'use strict'; - -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -function typeID(type) { - var cache = type.schema.cached.changeSetIDs || (type.schema.cached.changeSetIDs = Object.create(null)); - var id = cache[type.name]; - if (id == null) cache[type.name] = id = Object.keys(type.schema.nodes).indexOf(type.name) + 1; - return id; -} -var DefaultEncoder = { - encodeCharacter: function encodeCharacter(_char) { - return _char; - }, - encodeNodeStart: function encodeNodeStart(node) { - return node.type.name; - }, - encodeNodeEnd: function encodeNodeEnd(node) { - return -typeID(node.type); - }, - compareTokens: function compareTokens(a, b) { - return a === b; - } -}; -function tokens(frag, encoder, start, end, target) { - for (var i = 0, off = 0; i < frag.childCount; i++) { - var child = frag.child(i), - endOff = off + child.nodeSize; - var from = Math.max(off, start), - to = Math.min(endOff, end); - if (from < to) { - if (child.isText) { - for (var j = from; j < to; j++) target.push(encoder.encodeCharacter(child.text.charCodeAt(j - off), child.marks)); - } else if (child.isLeaf) { - target.push(encoder.encodeNodeStart(child)); - } else { - if (from == off) target.push(encoder.encodeNodeStart(child)); - tokens(child.content, encoder, Math.max(off + 1, from) - off - 1, Math.min(endOff - 1, to) - off - 1, target); - if (to == endOff) target.push(encoder.encodeNodeEnd(child)); - } - } - off = endOff; - } - return target; -} -var MAX_DIFF_SIZE = 5000; -function minUnchanged(sizeA, sizeB) { - return Math.min(15, Math.max(2, Math.floor(Math.max(sizeA, sizeB) / 10))); -} -function computeDiff(fragA, fragB, range) { - var encoder = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DefaultEncoder; - var tokA = tokens(fragA, encoder, range.fromA, range.toA, []); - var tokB = tokens(fragB, encoder, range.fromB, range.toB, []); - var start = 0, - endA = tokA.length, - endB = tokB.length; - var cmp = encoder.compareTokens; - while (start < tokA.length && start < tokB.length && cmp(tokA[start], tokB[start])) start++; - if (start == tokA.length && start == tokB.length) return []; - while (endA > start && endB > start && cmp(tokA[endA - 1], tokB[endB - 1])) endA--, endB--; - if (endA == start || endB == start || endA == endB && endA == start + 1) return [range.slice(start, endA, start, endB)]; - var lenA = endA - start, - lenB = endB - start; - var max = Math.min(MAX_DIFF_SIZE, lenA + lenB), - off = max + 1; - var history = []; - var frontier = []; - for (var len = off * 2, i = 0; i < len; i++) frontier[i] = -1; - for (var size = 0; size <= max; size++) { - var _loop = function _loop(_diag) { - var next = frontier[_diag + 1 + max], - prev = frontier[_diag - 1 + max]; - var x = next < prev ? prev : next + 1, - y = x + _diag; - while (x < lenA && y < lenB && cmp(tokA[start + x], tokB[start + y])) x++, y++; - frontier[_diag + max] = x; - if (x >= lenA && y >= lenB) { - var diff = [], - minSpan = minUnchanged(endA - start, endB - start); - var fromA = -1, - toA = -1, - fromB = -1, - toB = -1; - var add = function add(fA, tA, fB, tB) { - if (fromA > -1 && fromA < tA + minSpan) { - fromA = fA; - fromB = fB; - } else { - if (fromA > -1) diff.push(range.slice(fromA, toA, fromB, toB)); - fromA = fA; - toA = tA; - fromB = fB; - toB = tB; - } - }; - for (var _i = size - 1; _i >= 0; _i--) { - var _next = frontier[_diag + 1 + max], - _prev = frontier[_diag - 1 + max]; - if (_next < _prev) { - _diag--; - x = _prev + start; - y = x + _diag; - add(x, x, y, y + 1); - } else { - _diag++; - x = _next + start; - y = x + _diag; - add(x, x + 1, y, y); - } - frontier = history[_i >> 1]; - } - if (fromA > -1) diff.push(range.slice(fromA, toA, fromB, toB)); - return { - v: diff.reverse() - }; - } - diag = _diag; - }, - _ret; - for (var diag = -size; diag <= size; diag += 2) { - _ret = _loop(diag); - if (_ret) return _ret.v; - } - if (size % 2 == 0) history.push(frontier.slice()); - } - return [range.slice(start, endA, start, endB)]; -} -var Span = function () { - function Span(length, data) { - _classCallCheck(this, Span); - this.length = length; - this.data = data; - } - _createClass(Span, [{ - key: "cut", - value: function cut(length) { - return length == this.length ? this : new Span(length, this.data); - } - }], [{ - key: "slice", - value: function slice(spans, from, to) { - if (from == to) return Span.none; - if (from == 0 && to == Span.len(spans)) return spans; - var result = []; - for (var i = 0, off = 0; off < to; i++) { - var span = spans[i], - end = off + span.length; - var overlap = Math.min(to, end) - Math.max(from, off); - if (overlap > 0) result.push(span.cut(overlap)); - off = end; - } - return result; - } - }, { - key: "join", - value: function join(a, b, combine) { - if (a.length == 0) return b; - if (b.length == 0) return a; - var combined = combine(a[a.length - 1].data, b[0].data); - if (combined == null) return a.concat(b); - var result = a.slice(0, a.length - 1); - result.push(new Span(a[a.length - 1].length + b[0].length, combined)); - for (var i = 1; i < b.length; i++) result.push(b[i]); - return result; - } - }, { - key: "len", - value: function len(spans) { - var len = 0; - for (var i = 0; i < spans.length; i++) len += spans[i].length; - return len; - } - }]); - return Span; -}(); -Span.none = []; -var Change = function () { - function Change(fromA, toA, fromB, toB, deleted, inserted) { - _classCallCheck(this, Change); - this.fromA = fromA; - this.toA = toA; - this.fromB = fromB; - this.toB = toB; - this.deleted = deleted; - this.inserted = inserted; - } - _createClass(Change, [{ - key: "lenA", - get: function get() { - return this.toA - this.fromA; - } - }, { - key: "lenB", - get: function get() { - return this.toB - this.fromB; - } - }, { - key: "slice", - value: function slice(startA, endA, startB, endB) { - if (startA == 0 && startB == 0 && endA == this.toA - this.fromA && endB == this.toB - this.fromB) return this; - return new Change(this.fromA + startA, this.fromA + endA, this.fromB + startB, this.fromB + endB, Span.slice(this.deleted, startA, endA), Span.slice(this.inserted, startB, endB)); - } - }, { - key: "toJSON", - value: function toJSON() { - return this; - } - }], [{ - key: "merge", - value: function merge(x, y, combine) { - if (x.length == 0) return y; - if (y.length == 0) return x; - var result = []; - for (var iX = 0, iY = 0, curX = x[0], curY = y[0];;) { - if (!curX && !curY) { - return result; - } else if (curX && (!curY || curX.toB < curY.fromA)) { - var off = iY ? y[iY - 1].toB - y[iY - 1].toA : 0; - result.push(off == 0 ? curX : new Change(curX.fromA, curX.toA, curX.fromB + off, curX.toB + off, curX.deleted, curX.inserted)); - curX = iX++ == x.length ? null : x[iX]; - } else if (curY && (!curX || curY.toA < curX.fromB)) { - var _off = iX ? x[iX - 1].toB - x[iX - 1].toA : 0; - result.push(_off == 0 ? curY : new Change(curY.fromA - _off, curY.toA - _off, curY.fromB, curY.toB, curY.deleted, curY.inserted)); - curY = iY++ == y.length ? null : y[iY]; - } else { - var pos = Math.min(curX.fromB, curY.fromA); - var fromA = Math.min(curX.fromA, curY.fromA - (iX ? x[iX - 1].toB - x[iX - 1].toA : 0)), - toA = fromA; - var fromB = Math.min(curY.fromB, curX.fromB + (iY ? y[iY - 1].toB - y[iY - 1].toA : 0)), - toB = fromB; - var deleted = Span.none, - inserted = Span.none; - var enteredX = false, - enteredY = false; - for (;;) { - var nextX = !curX ? 2e8 : pos >= curX.fromB ? curX.toB : curX.fromB; - var nextY = !curY ? 2e8 : pos >= curY.fromA ? curY.toA : curY.fromA; - var next = Math.min(nextX, nextY); - var inX = curX && pos >= curX.fromB, - inY = curY && pos >= curY.fromA; - if (!inX && !inY) break; - if (inX && pos == curX.fromB && !enteredX) { - deleted = Span.join(deleted, curX.deleted, combine); - toA += curX.lenA; - enteredX = true; - } - if (inX && !inY) { - inserted = Span.join(inserted, Span.slice(curX.inserted, pos - curX.fromB, next - curX.fromB), combine); - toB += next - pos; - } - if (inY && pos == curY.fromA && !enteredY) { - inserted = Span.join(inserted, curY.inserted, combine); - toB += curY.lenB; - enteredY = true; - } - if (inY && !inX) { - deleted = Span.join(deleted, Span.slice(curY.deleted, pos - curY.fromA, next - curY.fromA), combine); - toA += next - pos; - } - if (inX && next == curX.toB) { - curX = iX++ == x.length ? null : x[iX]; - enteredX = false; - } - if (inY && next == curY.toA) { - curY = iY++ == y.length ? null : y[iY]; - enteredY = false; - } - pos = next; - } - if (fromA < toA || fromB < toB) result.push(new Change(fromA, toA, fromB, toB, deleted, inserted)); - } - } - } - }, { - key: "fromJSON", - value: function fromJSON(json) { - return new Change(json.fromA, json.toA, json.fromB, json.toB, json.deleted.map(function (d) { - return new Span(d.length, d.data); - }), json.inserted.map(function (d) { - return new Span(d.length, d.data); - })); - } - }]); - return Change; -}(); -var letter; -try { - letter = new RegExp("[\\p{Alphabetic}_]", "u"); -} catch (_) {} -var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; -function isLetter(code) { - if (code < 128) return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122; - var ch = String.fromCharCode(code); - if (letter) return letter.test(ch); - return ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch); -} -function getText(frag, start, end) { - var out = ""; - function convert(frag, start, end) { - for (var i = 0, off = 0; i < frag.childCount; i++) { - var child = frag.child(i), - endOff = off + child.nodeSize; - var from = Math.max(off, start), - to = Math.min(endOff, end); - if (from < to) { - if (child.isText) { - out += child.text.slice(Math.max(0, start - off), Math.min(child.text.length, end - off)); - } else if (child.isLeaf) { - out += " "; - } else { - if (from == off) out += " "; - convert(child.content, Math.max(0, from - off - 1), Math.min(child.content.size, end - off)); - if (to == endOff) out += " "; - } - } - off = endOff; - } - } - convert(frag, start, end); - return out; -} -var MAX_SIMPLIFY_DISTANCE = 30; -function simplifyChanges(changes, doc) { - var result = []; - for (var i = 0; i < changes.length; i++) { - var end = changes[i].toB, - start = i; - while (i < changes.length - 1 && changes[i + 1].fromB <= end + MAX_SIMPLIFY_DISTANCE) end = changes[++i].toB; - simplifyAdjacentChanges(changes, start, i + 1, doc, result); - } - return result; -} -function simplifyAdjacentChanges(changes, from, to, doc, target) { - var start = Math.max(0, changes[from].fromB - MAX_SIMPLIFY_DISTANCE); - var end = Math.min(doc.content.size, changes[to - 1].toB + MAX_SIMPLIFY_DISTANCE); - var text = getText(doc.content, start, end); - for (var i = from; i < to; i++) { - var startI = i, - last = changes[i], - deleted = last.lenA, - inserted = last.lenB; - while (i < to - 1) { - var next = changes[i + 1], - boundary = false; - var prevLetter = last.toB == end ? false : isLetter(text.charCodeAt(last.toB - 1 - start)); - for (var pos = last.toB; !boundary && pos < next.fromB; pos++) { - var nextLetter = pos == end ? false : isLetter(text.charCodeAt(pos - start)); - if ((!prevLetter || !nextLetter) && pos != changes[startI].fromB) boundary = true; - prevLetter = nextLetter; - } - if (boundary) break; - deleted += next.lenA; - inserted += next.lenB; - last = next; - i++; - } - if (inserted > 0 && deleted > 0 && !(inserted == 1 && deleted == 1)) { - var _from = changes[startI].fromB, - _to = changes[i].toB; - if (_from < end && isLetter(text.charCodeAt(_from - start))) while (_from > start && isLetter(text.charCodeAt(_from - 1 - start))) _from--; - if (_to > start && isLetter(text.charCodeAt(_to - 1 - start))) while (_to < end && isLetter(text.charCodeAt(_to - start))) _to++; - var joined = fillChange(changes.slice(startI, i + 1), _from, _to); - var _last = target.length ? target[target.length - 1] : null; - if (_last && _last.toA == joined.fromA) target[target.length - 1] = new Change(_last.fromA, joined.toA, _last.fromB, joined.toB, _last.deleted.concat(joined.deleted), _last.inserted.concat(joined.inserted));else target.push(joined); - } else { - for (var j = startI; j <= i; j++) target.push(changes[j]); - } - } - return changes; -} -function combine(a, b) { - return a === b ? a : null; -} -function fillChange(changes, fromB, toB) { - var fromA = changes[0].fromA - (changes[0].fromB - fromB); - var last = changes[changes.length - 1]; - var toA = last.toA + (toB - last.toB); - var deleted = Span.none, - inserted = Span.none; - var delData = (changes[0].deleted.length ? changes[0].deleted : changes[0].inserted)[0].data; - var insData = (changes[0].inserted.length ? changes[0].inserted : changes[0].deleted)[0].data; - for (var posA = fromA, posB = fromB, i = 0;; i++) { - var next = i == changes.length ? null : changes[i]; - var endA = next ? next.fromA : toA, - endB = next ? next.fromB : toB; - if (endA > posA) deleted = Span.join(deleted, [new Span(endA - posA, delData)], combine); - if (endB > posB) inserted = Span.join(inserted, [new Span(endB - posB, insData)], combine); - if (!next) break; - deleted = Span.join(deleted, next.deleted, combine); - inserted = Span.join(inserted, next.inserted, combine); - if (deleted.length) delData = deleted[deleted.length - 1].data; - if (inserted.length) insData = inserted[inserted.length - 1].data; - posA = next.toA; - posB = next.toB; - } - return new Change(fromA, toA, fromB, toB, deleted, inserted); -} -var ChangeSet = function () { - function ChangeSet(config, changes) { - _classCallCheck(this, ChangeSet); - this.config = config; - this.changes = changes; - } - _createClass(ChangeSet, [{ - key: "addSteps", - value: function addSteps(newDoc, maps, data) { - var _this = this; - var stepChanges = []; - var _loop2 = function _loop2() { - var d = Array.isArray(data) ? data[i] : data; - var off = 0; - maps[i].forEach(function (fromA, toA, fromB, toB) { - stepChanges.push(new Change(fromA + off, toA + off, fromB, toB, fromA == toA ? Span.none : [new Span(toA - fromA, d)], fromB == toB ? Span.none : [new Span(toB - fromB, d)])); - off = toB - fromB - (toA - fromA); - }); - }; - for (var i = 0; i < maps.length; i++) { - _loop2(); - } - if (stepChanges.length == 0) return this; - var newChanges = mergeAll(stepChanges, this.config.combine); - var changes = Change.merge(this.changes, newChanges, this.config.combine); - var updated = changes; - var _loop3 = function _loop3(_i3) { - var change = updated[_i3]; - if (change.fromA == change.toA || change.fromB == change.toB || !newChanges.some(function (r) { - return r.toB > change.fromB && r.fromB < change.toB; - })) { - _i2 = _i3; - return 0; - } - var diff = computeDiff(_this.config.doc.content, newDoc.content, change, _this.config.encoder); - if (diff.length == 1 && diff[0].fromB == 0 && diff[0].toB == change.toB - change.fromB) { - _i2 = _i3; - return 0; - } - if (updated == changes) updated = changes.slice(); - if (diff.length == 1) { - updated[_i3] = diff[0]; - } else { - var _updated; - (_updated = updated).splice.apply(_updated, [_i3, 1].concat(_toConsumableArray(diff))); - _i3 += diff.length - 1; - } - _i2 = _i3; - }, - _ret2; - for (var _i2 = 0; _i2 < updated.length; _i2++) { - _ret2 = _loop3(_i2); - if (_ret2 === 0) continue; - } - return new ChangeSet(this.config, updated); - } - }, { - key: "startDoc", - get: function get() { - return this.config.doc; - } - }, { - key: "map", - value: function map(f) { - var mapSpan = function mapSpan(span) { - var newData = f(span); - return newData === span.data ? span : new Span(span.length, newData); - }; - return new ChangeSet(this.config, this.changes.map(function (ch) { - return new Change(ch.fromA, ch.toA, ch.fromB, ch.toB, ch.deleted.map(mapSpan), ch.inserted.map(mapSpan)); - })); - } - }, { - key: "changedRange", - value: function changedRange(b, maps) { - if (b == this) return null; - var touched = maps && touchedRange(maps); - var moved = touched ? touched.toB - touched.fromB - (touched.toA - touched.fromA) : 0; - function map(p) { - return !touched || p <= touched.fromA ? p : p + moved; - } - var from = touched ? touched.fromB : 2e8, - to = touched ? touched.toB : -2e8; - function add(start) { - var end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start; - from = Math.min(start, from); - to = Math.max(end, to); - } - var rA = this.changes, - rB = b.changes; - for (var iA = 0, iB = 0; iA < rA.length && iB < rB.length;) { - var rangeA = rA[iA], - rangeB = rB[iB]; - if (rangeA && rangeB && sameRanges(rangeA, rangeB, map)) { - iA++; - iB++; - } else if (rangeB && (!rangeA || map(rangeA.fromB) >= rangeB.fromB)) { - add(rangeB.fromB, rangeB.toB); - iB++; - } else { - add(map(rangeA.fromB), map(rangeA.toB)); - iA++; - } - } - return from <= to ? { - from: from, - to: to - } : null; - } - }], [{ - key: "create", - value: function create(doc) { - var combine = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (a, b) { - return a === b ? a : null; - }; - var tokenEncoder = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DefaultEncoder; - var changes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; - return new ChangeSet({ - combine: combine, - doc: doc, - encoder: tokenEncoder - }, changes); - } - }]); - return ChangeSet; -}(); -ChangeSet.computeDiff = computeDiff; -function mergeAll(ranges, combine) { - var start = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ranges.length; - if (end == start + 1) return [ranges[start]]; - var mid = start + end >> 1; - return Change.merge(mergeAll(ranges, combine, start, mid), mergeAll(ranges, combine, mid, end), combine); -} -function endRange(maps) { - var from = 2e8, - to = -2e8; - for (var i = 0; i < maps.length; i++) { - var map = maps[i]; - if (from != 2e8) { - from = map.map(from, -1); - to = map.map(to, 1); - } - map.forEach(function (_s, _e, start, end) { - from = Math.min(from, start); - to = Math.max(to, end); - }); - } - return from == 2e8 ? null : { - from: from, - to: to - }; -} -function touchedRange(maps) { - var b = endRange(maps); - if (!b) return null; - var a = endRange(maps.map(function (m) { - return m.invert(); - }).reverse()); - return { - fromA: a.from, - toA: a.to, - fromB: b.from, - toB: b.to - }; -} -function sameRanges(a, b, map) { - return map(a.fromB) == b.fromB && map(a.toB) == b.toB && sameSpans(a.deleted, b.deleted) && sameSpans(a.inserted, b.inserted); -} -function sameSpans(a, b) { - if (a.length != b.length) return false; - for (var i = 0; i < a.length; i++) if (a[i].length != b[i].length || a[i].data !== b[i].data) return false; - return true; -} -exports.Change = Change; -exports.ChangeSet = ChangeSet; -exports.Span = Span; -exports.simplifyChanges = simplifyChanges; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.d.cts deleted file mode 100644 index ca8d2a9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.d.cts +++ /dev/null @@ -1,186 +0,0 @@ -import { Mark, Node } from 'prosemirror-model'; -import { StepMap } from 'prosemirror-transform'; - -/** -Stores metadata for a part of a change. -*/ -declare class Span { - /** - The length of this span. - */ - readonly length: number; - /** - The data associated with this span. - */ - readonly data: Data; -} -/** -A replaced range with metadata associated with it. -*/ -declare class Change { - /** - The start of the range deleted/replaced in the old document. - */ - readonly fromA: number; - /** - The end of the range in the old document. - */ - readonly toA: number; - /** - The start of the range inserted in the new document. - */ - readonly fromB: number; - /** - The end of the range in the new document. - */ - readonly toB: number; - /** - Data associated with the deleted content. The length of these - spans adds up to `this.toA - this.fromA`. - */ - readonly deleted: readonly Span[]; - /** - Data associated with the inserted content. Length adds up to - `this.toB - this.fromB`. - */ - readonly inserted: readonly Span[]; - /** - This merges two changesets (the end document of x should be the - start document of y) into a single one spanning the start of x to - the end of y. - */ - static merge(x: readonly Change[], y: readonly Change[], combine: (dataA: Data, dataB: Data) => Data): readonly Change[]; - /** - Deserialize a change from JSON format. - */ - static fromJSON(json: ChangeJSON): Change; - /** - Returns a JSON-serializeable object to represent this change. - */ - toJSON(): ChangeJSON; -} -/** -JSON-serialized form of a change. -*/ -type ChangeJSON = { - fromA: number; - toA: number; - fromB: number; - toB: number; - deleted: readonly { - length: number; - data: Data; - }[]; - inserted: readonly { - length: number; - data: Data; - }[]; -}; - -/** -A token encoder can be passed when creating a `ChangeSet` in order -to influence the way the library runs its diffing algorithm. The -encoder determines how document tokens (such as nodes and -characters) are encoded and compared. - -Note that both the encoding and the comparison may run a lot, and -doing non-trivial work in these functions could impact -performance. -*/ -interface TokenEncoder { - /** - Encode a given character, with the given marks applied. - */ - encodeCharacter(char: number, marks: readonly Mark[]): T; - /** - Encode the start of a node or, if this is a leaf node, the - entire node. - */ - encodeNodeStart(node: Node): T; - /** - Encode the end token for the given node. It is valid to encode - every end token in the same way. - */ - encodeNodeEnd(node: Node): T; - /** - Compare the given tokens. Should return true when they count as - equal. - */ - compareTokens(a: T, b: T): boolean; -} - -/** -Simplifies a set of changes for presentation. This makes the -assumption that having both insertions and deletions within a word -is confusing, and, when such changes occur without a word boundary -between them, they should be expanded to cover the entire set of -words (in the new document) they touch. An exception is made for -single-character replacements. -*/ -declare function simplifyChanges(changes: readonly Change[], doc: Node): Change[]; - -/** -A change set tracks the changes to a document from a given point -in the past. It condenses a number of step maps down to a flat -sequence of replacements, and simplifies replacments that -partially undo themselves by comparing their content. -*/ -declare class ChangeSet { - /** - Replaced regions. - */ - readonly changes: readonly Change[]; - /** - Computes a new changeset by adding the given step maps and - metadata (either as an array, per-map, or as a single value to be - associated with all maps) to the current set. Will not mutate the - old set. - - Note that due to simplification that happens after each add, - incrementally adding steps might create a different final set - than adding all those changes at once, since different document - tokens might be matched during simplification depending on the - boundaries of the current changed ranges. - */ - addSteps(newDoc: Node, maps: readonly StepMap[], data: Data | readonly Data[]): ChangeSet; - /** - The starting document of the change set. - */ - get startDoc(): Node; - /** - Map the span's data values in the given set through a function - and construct a new set with the resulting data. - */ - map(f: (range: Span) => Data): ChangeSet; - /** - Compare two changesets and return the range in which they are - changed, if any. If the document changed between the maps, pass - the maps for the steps that changed it as second argument, and - make sure the method is called on the old set and passed the new - set. The returned positions will be in new document coordinates. - */ - changedRange(b: ChangeSet, maps?: readonly StepMap[]): { - from: number; - to: number; - } | null; - /** - Create a changeset with the given base object and configuration. - - The `combine` function is used to compare and combine metadata—it - should return null when metadata isn't compatible, and a combined - version for a merged range when it is. - - When given, a token encoder determines how document tokens are - serialized and compared when diffing the content produced by - changes. The default is to just compare nodes by name and text - by character, ignoring marks and attributes. - - To serialize a change set, you can store its document and - change array as JSON, and then pass the deserialized (via - [`Change.fromJSON`](https://prosemirror.net/docs/ref/#changes.Change^fromJSON)) set of changes - as fourth argument to `create` to recreate the set. - */ - static create(doc: Node, combine?: (dataA: Data, dataB: Data) => Data, tokenEncoder?: TokenEncoder, changes?: readonly Change[]): ChangeSet; -} - -export { Change, type ChangeJSON, ChangeSet, Span, type TokenEncoder, simplifyChanges }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.d.ts deleted file mode 100644 index ca8d2a9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.d.ts +++ /dev/null @@ -1,186 +0,0 @@ -import { Mark, Node } from 'prosemirror-model'; -import { StepMap } from 'prosemirror-transform'; - -/** -Stores metadata for a part of a change. -*/ -declare class Span { - /** - The length of this span. - */ - readonly length: number; - /** - The data associated with this span. - */ - readonly data: Data; -} -/** -A replaced range with metadata associated with it. -*/ -declare class Change { - /** - The start of the range deleted/replaced in the old document. - */ - readonly fromA: number; - /** - The end of the range in the old document. - */ - readonly toA: number; - /** - The start of the range inserted in the new document. - */ - readonly fromB: number; - /** - The end of the range in the new document. - */ - readonly toB: number; - /** - Data associated with the deleted content. The length of these - spans adds up to `this.toA - this.fromA`. - */ - readonly deleted: readonly Span[]; - /** - Data associated with the inserted content. Length adds up to - `this.toB - this.fromB`. - */ - readonly inserted: readonly Span[]; - /** - This merges two changesets (the end document of x should be the - start document of y) into a single one spanning the start of x to - the end of y. - */ - static merge(x: readonly Change[], y: readonly Change[], combine: (dataA: Data, dataB: Data) => Data): readonly Change[]; - /** - Deserialize a change from JSON format. - */ - static fromJSON(json: ChangeJSON): Change; - /** - Returns a JSON-serializeable object to represent this change. - */ - toJSON(): ChangeJSON; -} -/** -JSON-serialized form of a change. -*/ -type ChangeJSON = { - fromA: number; - toA: number; - fromB: number; - toB: number; - deleted: readonly { - length: number; - data: Data; - }[]; - inserted: readonly { - length: number; - data: Data; - }[]; -}; - -/** -A token encoder can be passed when creating a `ChangeSet` in order -to influence the way the library runs its diffing algorithm. The -encoder determines how document tokens (such as nodes and -characters) are encoded and compared. - -Note that both the encoding and the comparison may run a lot, and -doing non-trivial work in these functions could impact -performance. -*/ -interface TokenEncoder { - /** - Encode a given character, with the given marks applied. - */ - encodeCharacter(char: number, marks: readonly Mark[]): T; - /** - Encode the start of a node or, if this is a leaf node, the - entire node. - */ - encodeNodeStart(node: Node): T; - /** - Encode the end token for the given node. It is valid to encode - every end token in the same way. - */ - encodeNodeEnd(node: Node): T; - /** - Compare the given tokens. Should return true when they count as - equal. - */ - compareTokens(a: T, b: T): boolean; -} - -/** -Simplifies a set of changes for presentation. This makes the -assumption that having both insertions and deletions within a word -is confusing, and, when such changes occur without a word boundary -between them, they should be expanded to cover the entire set of -words (in the new document) they touch. An exception is made for -single-character replacements. -*/ -declare function simplifyChanges(changes: readonly Change[], doc: Node): Change[]; - -/** -A change set tracks the changes to a document from a given point -in the past. It condenses a number of step maps down to a flat -sequence of replacements, and simplifies replacments that -partially undo themselves by comparing their content. -*/ -declare class ChangeSet { - /** - Replaced regions. - */ - readonly changes: readonly Change[]; - /** - Computes a new changeset by adding the given step maps and - metadata (either as an array, per-map, or as a single value to be - associated with all maps) to the current set. Will not mutate the - old set. - - Note that due to simplification that happens after each add, - incrementally adding steps might create a different final set - than adding all those changes at once, since different document - tokens might be matched during simplification depending on the - boundaries of the current changed ranges. - */ - addSteps(newDoc: Node, maps: readonly StepMap[], data: Data | readonly Data[]): ChangeSet; - /** - The starting document of the change set. - */ - get startDoc(): Node; - /** - Map the span's data values in the given set through a function - and construct a new set with the resulting data. - */ - map(f: (range: Span) => Data): ChangeSet; - /** - Compare two changesets and return the range in which they are - changed, if any. If the document changed between the maps, pass - the maps for the steps that changed it as second argument, and - make sure the method is called on the old set and passed the new - set. The returned positions will be in new document coordinates. - */ - changedRange(b: ChangeSet, maps?: readonly StepMap[]): { - from: number; - to: number; - } | null; - /** - Create a changeset with the given base object and configuration. - - The `combine` function is used to compare and combine metadata—it - should return null when metadata isn't compatible, and a combined - version for a merged range when it is. - - When given, a token encoder determines how document tokens are - serialized and compared when diffing the content produced by - changes. The default is to just compare nodes by name and text - by character, ignoring marks and attributes. - - To serialize a change set, you can store its document and - change array as JSON, and then pass the deserialized (via - [`Change.fromJSON`](https://prosemirror.net/docs/ref/#changes.Change^fromJSON)) set of changes - as fourth argument to `create` to recreate the set. - */ - static create(doc: Node, combine?: (dataA: Data, dataB: Data) => Data, tokenEncoder?: TokenEncoder, changes?: readonly Change[]): ChangeSet; -} - -export { Change, type ChangeJSON, ChangeSet, Span, type TokenEncoder, simplifyChanges }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.js b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.js deleted file mode 100644 index 5f29dde..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/dist/index.js +++ /dev/null @@ -1,715 +0,0 @@ -function typeID(type) { - let cache = type.schema.cached.changeSetIDs || (type.schema.cached.changeSetIDs = Object.create(null)); - let id = cache[type.name]; - if (id == null) - cache[type.name] = id = Object.keys(type.schema.nodes).indexOf(type.name) + 1; - return id; -} -// The default token encoder, which encodes node open tokens are -// encoded as strings holding the node name, characters as their -// character code, and node close tokens as negative numbers. -const DefaultEncoder = { - encodeCharacter: char => char, - encodeNodeStart: node => node.type.name, - encodeNodeEnd: node => -typeID(node.type), - compareTokens: (a, b) => a === b -}; -// Convert the given range of a fragment to tokens. -function tokens(frag, encoder, start, end, target) { - for (let i = 0, off = 0; i < frag.childCount; i++) { - let child = frag.child(i), endOff = off + child.nodeSize; - let from = Math.max(off, start), to = Math.min(endOff, end); - if (from < to) { - if (child.isText) { - for (let j = from; j < to; j++) - target.push(encoder.encodeCharacter(child.text.charCodeAt(j - off), child.marks)); - } - else if (child.isLeaf) { - target.push(encoder.encodeNodeStart(child)); - } - else { - if (from == off) - target.push(encoder.encodeNodeStart(child)); - tokens(child.content, encoder, Math.max(off + 1, from) - off - 1, Math.min(endOff - 1, to) - off - 1, target); - if (to == endOff) - target.push(encoder.encodeNodeEnd(child)); - } - } - off = endOff; - } - return target; -} -// The code below will refuse to compute a diff with more than 5000 -// insertions or deletions, which takes about 300ms to reach on my -// machine. This is a safeguard against runaway computations. -const MAX_DIFF_SIZE = 5000; -// This obscure mess of constants computes the minimum length of an -// unchanged range (not at the start/end of the compared content). The -// idea is to make it higher in bigger replacements, so that you don't -// get a diff soup of coincidentally identical letters when replacing -// a paragraph. -function minUnchanged(sizeA, sizeB) { - return Math.min(15, Math.max(2, Math.floor(Math.max(sizeA, sizeB) / 10))); -} -function computeDiff(fragA, fragB, range, encoder = DefaultEncoder) { - let tokA = tokens(fragA, encoder, range.fromA, range.toA, []); - let tokB = tokens(fragB, encoder, range.fromB, range.toB, []); - // Scan from both sides to cheaply eliminate work - let start = 0, endA = tokA.length, endB = tokB.length; - let cmp = encoder.compareTokens; - while (start < tokA.length && start < tokB.length && cmp(tokA[start], tokB[start])) - start++; - if (start == tokA.length && start == tokB.length) - return []; - while (endA > start && endB > start && cmp(tokA[endA - 1], tokB[endB - 1])) - endA--, endB--; - // If the result is simple _or_ too big to cheaply compute, return - // the remaining region as the diff - if (endA == start || endB == start || (endA == endB && endA == start + 1)) - return [range.slice(start, endA, start, endB)]; - // This is an implementation of Myers' diff algorithm - // See https://neil.fraser.name/writing/diff/myers.pdf and - // https://blog.jcoglan.com/2017/02/12/the-myers-diff-algorithm-part-1/ - let lenA = endA - start, lenB = endB - start; - let max = Math.min(MAX_DIFF_SIZE, lenA + lenB), off = max + 1; - let history = []; - let frontier = []; - for (let len = off * 2, i = 0; i < len; i++) - frontier[i] = -1; - for (let size = 0; size <= max; size++) { - for (let diag = -size; diag <= size; diag += 2) { - let next = frontier[diag + 1 + max], prev = frontier[diag - 1 + max]; - let x = next < prev ? prev : next + 1, y = x + diag; - while (x < lenA && y < lenB && cmp(tokA[start + x], tokB[start + y])) - x++, y++; - frontier[diag + max] = x; - // Found a match - if (x >= lenA && y >= lenB) { - // Trace back through the history to build up a set of changed ranges. - let diff = [], minSpan = minUnchanged(endA - start, endB - start); - // Used to add steps to a diff one at a time, back to front, merging - // ones that are less than minSpan tokens apart - let fromA = -1, toA = -1, fromB = -1, toB = -1; - let add = (fA, tA, fB, tB) => { - if (fromA > -1 && fromA < tA + minSpan) { - fromA = fA; - fromB = fB; - } - else { - if (fromA > -1) - diff.push(range.slice(fromA, toA, fromB, toB)); - fromA = fA; - toA = tA; - fromB = fB; - toB = tB; - } - }; - for (let i = size - 1; i >= 0; i--) { - let next = frontier[diag + 1 + max], prev = frontier[diag - 1 + max]; - if (next < prev) { // Deletion - diag--; - x = prev + start; - y = x + diag; - add(x, x, y, y + 1); - } - else { // Insertion - diag++; - x = next + start; - y = x + diag; - add(x, x + 1, y, y); - } - frontier = history[i >> 1]; - } - if (fromA > -1) - diff.push(range.slice(fromA, toA, fromB, toB)); - return diff.reverse(); - } - } - // Since only either odd or even diagonals are read from each - // frontier, we only copy them every other iteration. - if (size % 2 == 0) - history.push(frontier.slice()); - } - // The loop exited, meaning the maximum amount of work was done. - // Just return a change spanning the entire range. - return [range.slice(start, endA, start, endB)]; -} - -/** -Stores metadata for a part of a change. -*/ -class Span { - /** - @internal - */ - constructor( - /** - The length of this span. - */ - length, - /** - The data associated with this span. - */ - data) { - this.length = length; - this.data = data; - } - /** - @internal - */ - cut(length) { - return length == this.length ? this : new Span(length, this.data); - } - /** - @internal - */ - static slice(spans, from, to) { - if (from == to) - return Span.none; - if (from == 0 && to == Span.len(spans)) - return spans; - let result = []; - for (let i = 0, off = 0; off < to; i++) { - let span = spans[i], end = off + span.length; - let overlap = Math.min(to, end) - Math.max(from, off); - if (overlap > 0) - result.push(span.cut(overlap)); - off = end; - } - return result; - } - /** - @internal - */ - static join(a, b, combine) { - if (a.length == 0) - return b; - if (b.length == 0) - return a; - let combined = combine(a[a.length - 1].data, b[0].data); - if (combined == null) - return a.concat(b); - let result = a.slice(0, a.length - 1); - result.push(new Span(a[a.length - 1].length + b[0].length, combined)); - for (let i = 1; i < b.length; i++) - result.push(b[i]); - return result; - } - /** - @internal - */ - static len(spans) { - let len = 0; - for (let i = 0; i < spans.length; i++) - len += spans[i].length; - return len; - } -} -/** -@internal -*/ -Span.none = []; -/** -A replaced range with metadata associated with it. -*/ -class Change { - /** - @internal - */ - constructor( - /** - The start of the range deleted/replaced in the old document. - */ - fromA, - /** - The end of the range in the old document. - */ - toA, - /** - The start of the range inserted in the new document. - */ - fromB, - /** - The end of the range in the new document. - */ - toB, - /** - Data associated with the deleted content. The length of these - spans adds up to `this.toA - this.fromA`. - */ - deleted, - /** - Data associated with the inserted content. Length adds up to - `this.toB - this.fromB`. - */ - inserted) { - this.fromA = fromA; - this.toA = toA; - this.fromB = fromB; - this.toB = toB; - this.deleted = deleted; - this.inserted = inserted; - } - /** - @internal - */ - get lenA() { return this.toA - this.fromA; } - /** - @internal - */ - get lenB() { return this.toB - this.fromB; } - /** - @internal - */ - slice(startA, endA, startB, endB) { - if (startA == 0 && startB == 0 && endA == this.toA - this.fromA && - endB == this.toB - this.fromB) - return this; - return new Change(this.fromA + startA, this.fromA + endA, this.fromB + startB, this.fromB + endB, Span.slice(this.deleted, startA, endA), Span.slice(this.inserted, startB, endB)); - } - /** - This merges two changesets (the end document of x should be the - start document of y) into a single one spanning the start of x to - the end of y. - */ - static merge(x, y, combine) { - if (x.length == 0) - return y; - if (y.length == 0) - return x; - let result = []; - // Iterate over both sets in parallel, using the middle coordinate - // system (B in x, A in y) to synchronize. - for (let iX = 0, iY = 0, curX = x[0], curY = y[0];;) { - if (!curX && !curY) { - return result; - } - else if (curX && (!curY || curX.toB < curY.fromA)) { // curX entirely in front of curY - let off = iY ? y[iY - 1].toB - y[iY - 1].toA : 0; - result.push(off == 0 ? curX : - new Change(curX.fromA, curX.toA, curX.fromB + off, curX.toB + off, curX.deleted, curX.inserted)); - curX = iX++ == x.length ? null : x[iX]; - } - else if (curY && (!curX || curY.toA < curX.fromB)) { // curY entirely in front of curX - let off = iX ? x[iX - 1].toB - x[iX - 1].toA : 0; - result.push(off == 0 ? curY : - new Change(curY.fromA - off, curY.toA - off, curY.fromB, curY.toB, curY.deleted, curY.inserted)); - curY = iY++ == y.length ? null : y[iY]; - } - else { // Touch, need to merge - // The rules for merging ranges are that deletions from the - // old set and insertions from the new are kept. Areas of the - // middle document covered by a but not by b are insertions - // from a that need to be added, and areas covered by b but - // not a are deletions from b that need to be added. - let pos = Math.min(curX.fromB, curY.fromA); - let fromA = Math.min(curX.fromA, curY.fromA - (iX ? x[iX - 1].toB - x[iX - 1].toA : 0)), toA = fromA; - let fromB = Math.min(curY.fromB, curX.fromB + (iY ? y[iY - 1].toB - y[iY - 1].toA : 0)), toB = fromB; - let deleted = Span.none, inserted = Span.none; - // Used to prevent appending ins/del range for the same Change twice - let enteredX = false, enteredY = false; - // Need to have an inner loop since any number of further - // ranges might be touching this group - for (;;) { - let nextX = !curX ? 2e8 : pos >= curX.fromB ? curX.toB : curX.fromB; - let nextY = !curY ? 2e8 : pos >= curY.fromA ? curY.toA : curY.fromA; - let next = Math.min(nextX, nextY); - let inX = curX && pos >= curX.fromB, inY = curY && pos >= curY.fromA; - if (!inX && !inY) - break; - if (inX && pos == curX.fromB && !enteredX) { - deleted = Span.join(deleted, curX.deleted, combine); - toA += curX.lenA; - enteredX = true; - } - if (inX && !inY) { - inserted = Span.join(inserted, Span.slice(curX.inserted, pos - curX.fromB, next - curX.fromB), combine); - toB += next - pos; - } - if (inY && pos == curY.fromA && !enteredY) { - inserted = Span.join(inserted, curY.inserted, combine); - toB += curY.lenB; - enteredY = true; - } - if (inY && !inX) { - deleted = Span.join(deleted, Span.slice(curY.deleted, pos - curY.fromA, next - curY.fromA), combine); - toA += next - pos; - } - if (inX && next == curX.toB) { - curX = iX++ == x.length ? null : x[iX]; - enteredX = false; - } - if (inY && next == curY.toA) { - curY = iY++ == y.length ? null : y[iY]; - enteredY = false; - } - pos = next; - } - if (fromA < toA || fromB < toB) - result.push(new Change(fromA, toA, fromB, toB, deleted, inserted)); - } - } - } - /** - Deserialize a change from JSON format. - */ - static fromJSON(json) { - return new Change(json.fromA, json.toA, json.fromB, json.toB, json.deleted.map(d => new Span(d.length, d.data)), json.inserted.map(d => new Span(d.length, d.data))); - } - /** - Returns a JSON-serializeable object to represent this change. - */ - toJSON() { return this; } -} - -let letter; -// If the runtime support unicode properties in regexps, that's a good -// source of info on whether something is a letter. -try { - letter = new RegExp("[\\p{Alphabetic}_]", "u"); -} -catch (_) { } -// Otherwise, we see if the character changes when upper/lowercased, -// or if it is part of these common single-case scripts. -const nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; -function isLetter(code) { - if (code < 128) - return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122; - let ch = String.fromCharCode(code); - if (letter) - return letter.test(ch); - return ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch); -} -// Convert a range of document into a string, so that we can easily -// access characters at a given position. Treat non-text tokens as -// spaces so that they aren't considered part of a word. -function getText(frag, start, end) { - let out = ""; - function convert(frag, start, end) { - for (let i = 0, off = 0; i < frag.childCount; i++) { - let child = frag.child(i), endOff = off + child.nodeSize; - let from = Math.max(off, start), to = Math.min(endOff, end); - if (from < to) { - if (child.isText) { - out += child.text.slice(Math.max(0, start - off), Math.min(child.text.length, end - off)); - } - else if (child.isLeaf) { - out += " "; - } - else { - if (from == off) - out += " "; - convert(child.content, Math.max(0, from - off - 1), Math.min(child.content.size, end - off)); - if (to == endOff) - out += " "; - } - } - off = endOff; - } - } - convert(frag, start, end); - return out; -} -// The distance changes have to be apart for us to not consider them -// candidates for merging. -const MAX_SIMPLIFY_DISTANCE = 30; -/** -Simplifies a set of changes for presentation. This makes the -assumption that having both insertions and deletions within a word -is confusing, and, when such changes occur without a word boundary -between them, they should be expanded to cover the entire set of -words (in the new document) they touch. An exception is made for -single-character replacements. -*/ -function simplifyChanges(changes, doc) { - let result = []; - for (let i = 0; i < changes.length; i++) { - let end = changes[i].toB, start = i; - while (i < changes.length - 1 && changes[i + 1].fromB <= end + MAX_SIMPLIFY_DISTANCE) - end = changes[++i].toB; - simplifyAdjacentChanges(changes, start, i + 1, doc, result); - } - return result; -} -function simplifyAdjacentChanges(changes, from, to, doc, target) { - let start = Math.max(0, changes[from].fromB - MAX_SIMPLIFY_DISTANCE); - let end = Math.min(doc.content.size, changes[to - 1].toB + MAX_SIMPLIFY_DISTANCE); - let text = getText(doc.content, start, end); - for (let i = from; i < to; i++) { - let startI = i, last = changes[i], deleted = last.lenA, inserted = last.lenB; - while (i < to - 1) { - let next = changes[i + 1], boundary = false; - let prevLetter = last.toB == end ? false : isLetter(text.charCodeAt(last.toB - 1 - start)); - for (let pos = last.toB; !boundary && pos < next.fromB; pos++) { - let nextLetter = pos == end ? false : isLetter(text.charCodeAt(pos - start)); - if ((!prevLetter || !nextLetter) && pos != changes[startI].fromB) - boundary = true; - prevLetter = nextLetter; - } - if (boundary) - break; - deleted += next.lenA; - inserted += next.lenB; - last = next; - i++; - } - if (inserted > 0 && deleted > 0 && !(inserted == 1 && deleted == 1)) { - let from = changes[startI].fromB, to = changes[i].toB; - if (from < end && isLetter(text.charCodeAt(from - start))) - while (from > start && isLetter(text.charCodeAt(from - 1 - start))) - from--; - if (to > start && isLetter(text.charCodeAt(to - 1 - start))) - while (to < end && isLetter(text.charCodeAt(to - start))) - to++; - let joined = fillChange(changes.slice(startI, i + 1), from, to); - let last = target.length ? target[target.length - 1] : null; - if (last && last.toA == joined.fromA) - target[target.length - 1] = new Change(last.fromA, joined.toA, last.fromB, joined.toB, last.deleted.concat(joined.deleted), last.inserted.concat(joined.inserted)); - else - target.push(joined); - } - else { - for (let j = startI; j <= i; j++) - target.push(changes[j]); - } - } - return changes; -} -function combine(a, b) { return a === b ? a : null; } -function fillChange(changes, fromB, toB) { - let fromA = changes[0].fromA - (changes[0].fromB - fromB); - let last = changes[changes.length - 1]; - let toA = last.toA + (toB - last.toB); - let deleted = Span.none, inserted = Span.none; - let delData = (changes[0].deleted.length ? changes[0].deleted : changes[0].inserted)[0].data; - let insData = (changes[0].inserted.length ? changes[0].inserted : changes[0].deleted)[0].data; - for (let posA = fromA, posB = fromB, i = 0;; i++) { - let next = i == changes.length ? null : changes[i]; - let endA = next ? next.fromA : toA, endB = next ? next.fromB : toB; - if (endA > posA) - deleted = Span.join(deleted, [new Span(endA - posA, delData)], combine); - if (endB > posB) - inserted = Span.join(inserted, [new Span(endB - posB, insData)], combine); - if (!next) - break; - deleted = Span.join(deleted, next.deleted, combine); - inserted = Span.join(inserted, next.inserted, combine); - if (deleted.length) - delData = deleted[deleted.length - 1].data; - if (inserted.length) - insData = inserted[inserted.length - 1].data; - posA = next.toA; - posB = next.toB; - } - return new Change(fromA, toA, fromB, toB, deleted, inserted); -} - -/** -A change set tracks the changes to a document from a given point -in the past. It condenses a number of step maps down to a flat -sequence of replacements, and simplifies replacments that -partially undo themselves by comparing their content. -*/ -class ChangeSet { - /** - @internal - */ - constructor( - /** - @internal - */ - config, - /** - Replaced regions. - */ - changes) { - this.config = config; - this.changes = changes; - } - /** - Computes a new changeset by adding the given step maps and - metadata (either as an array, per-map, or as a single value to be - associated with all maps) to the current set. Will not mutate the - old set. - - Note that due to simplification that happens after each add, - incrementally adding steps might create a different final set - than adding all those changes at once, since different document - tokens might be matched during simplification depending on the - boundaries of the current changed ranges. - */ - addSteps(newDoc, maps, data) { - // This works by inspecting the position maps for the changes, - // which indicate what parts of the document were replaced by new - // content, and the size of that new content. It uses these to - // build up Change objects. - // - // These change objects are put in sets and merged together using - // Change.merge, giving us the changes created by the new steps. - // Those changes can then be merged with the existing set of - // changes. - // - // For each change that was touched by the new steps, we recompute - // a diff to try to minimize the change by dropping matching - // pieces of the old and new document from the change. - let stepChanges = []; - // Add spans for new steps. - for (let i = 0; i < maps.length; i++) { - let d = Array.isArray(data) ? data[i] : data; - let off = 0; - maps[i].forEach((fromA, toA, fromB, toB) => { - stepChanges.push(new Change(fromA + off, toA + off, fromB, toB, fromA == toA ? Span.none : [new Span(toA - fromA, d)], fromB == toB ? Span.none : [new Span(toB - fromB, d)])); - off = (toB - fromB) - (toA - fromA); - }); - } - if (stepChanges.length == 0) - return this; - let newChanges = mergeAll(stepChanges, this.config.combine); - let changes = Change.merge(this.changes, newChanges, this.config.combine); - let updated = changes; - // Minimize changes when possible - for (let i = 0; i < updated.length; i++) { - let change = updated[i]; - if (change.fromA == change.toA || change.fromB == change.toB || - // Only look at changes that touch newly added changed ranges - !newChanges.some(r => r.toB > change.fromB && r.fromB < change.toB)) - continue; - let diff = computeDiff(this.config.doc.content, newDoc.content, change, this.config.encoder); - // Fast path: If they are completely different, don't do anything - if (diff.length == 1 && diff[0].fromB == 0 && diff[0].toB == change.toB - change.fromB) - continue; - if (updated == changes) - updated = changes.slice(); - if (diff.length == 1) { - updated[i] = diff[0]; - } - else { - updated.splice(i, 1, ...diff); - i += diff.length - 1; - } - } - return new ChangeSet(this.config, updated); - } - /** - The starting document of the change set. - */ - get startDoc() { return this.config.doc; } - /** - Map the span's data values in the given set through a function - and construct a new set with the resulting data. - */ - map(f) { - let mapSpan = (span) => { - let newData = f(span); - return newData === span.data ? span : new Span(span.length, newData); - }; - return new ChangeSet(this.config, this.changes.map((ch) => { - return new Change(ch.fromA, ch.toA, ch.fromB, ch.toB, ch.deleted.map(mapSpan), ch.inserted.map(mapSpan)); - })); - } - /** - Compare two changesets and return the range in which they are - changed, if any. If the document changed between the maps, pass - the maps for the steps that changed it as second argument, and - make sure the method is called on the old set and passed the new - set. The returned positions will be in new document coordinates. - */ - changedRange(b, maps) { - if (b == this) - return null; - let touched = maps && touchedRange(maps); - let moved = touched ? (touched.toB - touched.fromB) - (touched.toA - touched.fromA) : 0; - function map(p) { - return !touched || p <= touched.fromA ? p : p + moved; - } - let from = touched ? touched.fromB : 2e8, to = touched ? touched.toB : -2e8; - function add(start, end = start) { - from = Math.min(start, from); - to = Math.max(end, to); - } - let rA = this.changes, rB = b.changes; - for (let iA = 0, iB = 0; iA < rA.length && iB < rB.length;) { - let rangeA = rA[iA], rangeB = rB[iB]; - if (rangeA && rangeB && sameRanges(rangeA, rangeB, map)) { - iA++; - iB++; - } - else if (rangeB && (!rangeA || map(rangeA.fromB) >= rangeB.fromB)) { - add(rangeB.fromB, rangeB.toB); - iB++; - } - else { - add(map(rangeA.fromB), map(rangeA.toB)); - iA++; - } - } - return from <= to ? { from, to } : null; - } - /** - Create a changeset with the given base object and configuration. - - The `combine` function is used to compare and combine metadata—it - should return null when metadata isn't compatible, and a combined - version for a merged range when it is. - - When given, a token encoder determines how document tokens are - serialized and compared when diffing the content produced by - changes. The default is to just compare nodes by name and text - by character, ignoring marks and attributes. - - To serialize a change set, you can store its document and - change array as JSON, and then pass the deserialized (via - [`Change.fromJSON`](https://prosemirror.net/docs/ref/#changes.Change^fromJSON)) set of changes - as fourth argument to `create` to recreate the set. - */ - static create(doc, combine = (a, b) => a === b ? a : null, tokenEncoder = DefaultEncoder, changes = []) { - return new ChangeSet({ combine, doc, encoder: tokenEncoder }, changes); - } -} -/** -Exported for testing @internal -*/ -ChangeSet.computeDiff = computeDiff; -// Divide-and-conquer approach to merging a series of ranges. -function mergeAll(ranges, combine, start = 0, end = ranges.length) { - if (end == start + 1) - return [ranges[start]]; - let mid = (start + end) >> 1; - return Change.merge(mergeAll(ranges, combine, start, mid), mergeAll(ranges, combine, mid, end), combine); -} -function endRange(maps) { - let from = 2e8, to = -2e8; - for (let i = 0; i < maps.length; i++) { - let map = maps[i]; - if (from != 2e8) { - from = map.map(from, -1); - to = map.map(to, 1); - } - map.forEach((_s, _e, start, end) => { - from = Math.min(from, start); - to = Math.max(to, end); - }); - } - return from == 2e8 ? null : { from, to }; -} -function touchedRange(maps) { - let b = endRange(maps); - if (!b) - return null; - let a = endRange(maps.map(m => m.invert()).reverse()); - return { fromA: a.from, toA: a.to, fromB: b.from, toB: b.to }; -} -function sameRanges(a, b, map) { - return map(a.fromB) == b.fromB && map(a.toB) == b.toB && - sameSpans(a.deleted, b.deleted) && sameSpans(a.inserted, b.inserted); -} -function sameSpans(a, b) { - if (a.length != b.length) - return false; - for (let i = 0; i < a.length; i++) - if (a[i].length != b[i].length || a[i].data !== b[i].data) - return false; - return true; -} - -export { Change, ChangeSet, Span, simplifyChanges }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/package.json b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/package.json deleted file mode 100644 index 579c560..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "prosemirror-changeset", - "version": "2.4.1", - "description": "Distills a series of editing steps into deleted and added ranges", - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "sideEffects": false, - "license": "MIT", - "maintainers": [ - { - "name": "Marijn Haverbeke", - "email": "marijn@haverbeke.berlin", - "web": "http://marijnhaverbeke.nl" - } - ], - "repository": { - "type": "git", - "url": "git+https://code.haverbeke.berlin/prosemirror/prosemirror-changeset.git" - }, - "dependencies": { - "prosemirror-transform": "^1.0.0" - }, - "devDependencies": { - "@prosemirror/buildhelper": "^0.1.5", - "prosemirror-model": "^1.0.0", - "prosemirror-test-builder": "^1.0.0", - "builddocs": "^1.0.8" - }, - "scripts": { - "test": "pm-runtests", - "prepare": "pm-buildhelper src/changeset.ts", - "build-readme": "builddocs --format markdown --main src/README.md src/changeset.ts > README.md" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/README.md deleted file mode 100644 index 341e843..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# prosemirror-changeset - -This is a helper module that can turn a sequence of document changes -into a set of insertions and deletions, for example to display them in -a change-tracking interface. Such a set can be built up incrementally, -in order to do such change tracking in a halfway performant way during -live editing. - -This code is licensed under an [MIT -licence](https://code.haverbeke.berlin/prosemirror/prosemirror-changeset/src/branch/main/LICENSE). - -## Programming interface - -Insertions and deletions are represented as ‘spans’—ranges in the -document. The deleted spans refer to the original document, whereas -the inserted ones point into the current document. - -It is possible to associate arbitrary data values with such spans, for -example to track the user that made the change, the timestamp at which -it was made, or the step data necessary to invert it again. - -@Change - -@Span - -@ChangeSet - -@simplifyChanges - -@TokenEncoder - -@ChangeJSON diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/change.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/change.ts deleted file mode 100644 index 145f7c2..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/change.ts +++ /dev/null @@ -1,189 +0,0 @@ -/// Stores metadata for a part of a change. -export class Span { - /// @internal - constructor( - /// The length of this span. - readonly length: number, - /// The data associated with this span. - readonly data: Data - ) {} - - /// @internal - cut(length: number) { - return length == this.length ? this : new Span(length, this.data) - } - - /// @internal - static slice(spans: readonly Span[], from: number, to: number) { - if (from == to) return Span.none - if (from == 0 && to == Span.len(spans)) return spans - let result = [] - for (let i = 0, off = 0; off < to; i++) { - let span = spans[i], end = off + span.length - let overlap = Math.min(to, end) - Math.max(from, off) - if (overlap > 0) result.push(span.cut(overlap)) - off = end - } - return result - } - - /// @internal - static join(a: readonly Span[], b: readonly Span[], combine: (dataA: Data, dataB: Data) => Data) { - if (a.length == 0) return b - if (b.length == 0) return a - let combined = combine(a[a.length - 1].data, b[0].data) - if (combined == null) return a.concat(b) - let result = a.slice(0, a.length - 1) - result.push(new Span(a[a.length - 1].length + b[0].length, combined)) - for (let i = 1; i < b.length; i++) result.push(b[i]) - return result - } - - /// @internal - static len(spans: readonly Span[]) { - let len = 0 - for (let i = 0; i < spans.length; i++) len += spans[i].length - return len - } - - /// @internal - static none: readonly Span[] = [] -} - -/// A replaced range with metadata associated with it. -export class Change { - /// @internal - constructor( - /// The start of the range deleted/replaced in the old document. - readonly fromA: number, - /// The end of the range in the old document. - readonly toA: number, - /// The start of the range inserted in the new document. - readonly fromB: number, - /// The end of the range in the new document. - readonly toB: number, - /// Data associated with the deleted content. The length of these - /// spans adds up to `this.toA - this.fromA`. - readonly deleted: readonly Span[], - /// Data associated with the inserted content. Length adds up to - /// `this.toB - this.fromB`. - readonly inserted: readonly Span[] - ) {} - - /// @internal - get lenA() { return this.toA - this.fromA } - /// @internal - get lenB() { return this.toB - this.fromB } - - /// @internal - slice(startA: number, endA: number, startB: number, endB: number): Change { - if (startA == 0 && startB == 0 && endA == this.toA - this.fromA && - endB == this.toB - this.fromB) return this - return new Change(this.fromA + startA, this.fromA + endA, - this.fromB + startB, this.fromB + endB, - Span.slice(this.deleted, startA, endA), - Span.slice(this.inserted, startB, endB)) - } - - /// This merges two changesets (the end document of x should be the - /// start document of y) into a single one spanning the start of x to - /// the end of y. - static merge(x: readonly Change[], - y: readonly Change[], - combine: (dataA: Data, dataB: Data) => Data): readonly Change[] { - if (x.length == 0) return y - if (y.length == 0) return x - - let result = [] - // Iterate over both sets in parallel, using the middle coordinate - // system (B in x, A in y) to synchronize. - for (let iX = 0, iY = 0, curX: Change | null = x[0], curY: Change | null = y[0];;) { - if (!curX && !curY) { - return result - } else if (curX && (!curY || curX.toB < curY.fromA)) { // curX entirely in front of curY - let off = iY ? y[iY - 1].toB - y[iY - 1].toA : 0 - result.push(off == 0 ? curX : - new Change(curX.fromA, curX.toA, curX.fromB + off, curX.toB + off, - curX.deleted, curX.inserted)) - curX = iX++ == x.length ? null : x[iX] - } else if (curY && (!curX || curY.toA < curX.fromB)) { // curY entirely in front of curX - let off = iX ? x[iX - 1].toB - x[iX - 1].toA : 0 - result.push(off == 0 ? curY : - new Change(curY.fromA - off, curY.toA - off, curY.fromB, curY.toB, - curY.deleted, curY.inserted)) - curY = iY++ == y.length ? null : y[iY] - } else { // Touch, need to merge - // The rules for merging ranges are that deletions from the - // old set and insertions from the new are kept. Areas of the - // middle document covered by a but not by b are insertions - // from a that need to be added, and areas covered by b but - // not a are deletions from b that need to be added. - let pos = Math.min(curX!.fromB, curY!.fromA) - let fromA = Math.min(curX!.fromA, curY!.fromA - (iX ? x[iX - 1].toB - x[iX - 1].toA : 0)), toA = fromA - let fromB = Math.min(curY!.fromB, curX!.fromB + (iY ? y[iY - 1].toB - y[iY - 1].toA : 0)), toB = fromB - let deleted = Span.none, inserted = Span.none - - // Used to prevent appending ins/del range for the same Change twice - let enteredX = false, enteredY = false - - // Need to have an inner loop since any number of further - // ranges might be touching this group - for (;;) { - let nextX = !curX ? 2e8 : pos >= curX.fromB ? curX.toB : curX.fromB - let nextY = !curY ? 2e8 : pos >= curY.fromA ? curY.toA : curY.fromA - let next = Math.min(nextX, nextY) - let inX = curX && pos >= curX.fromB, inY = curY && pos >= curY.fromA - if (!inX && !inY) break - if (inX && pos == curX!.fromB && !enteredX) { - deleted = Span.join(deleted, curX!.deleted, combine) - toA += curX!.lenA - enteredX = true - } - if (inX && !inY) { - inserted = Span.join(inserted, Span.slice(curX!.inserted, pos - curX!.fromB, next - curX!.fromB), combine) - toB += next - pos - } - if (inY && pos == curY!.fromA && !enteredY) { - inserted = Span.join(inserted, curY!.inserted, combine) - toB += curY!.lenB - enteredY = true - } - if (inY && !inX) { - deleted = Span.join(deleted, Span.slice(curY!.deleted, pos - curY!.fromA, next - curY!.fromA), combine) - toA += next - pos - } - - if (inX && next == curX!.toB) { - curX = iX++ == x.length ? null : x[iX] - enteredX = false - } - if (inY && next == curY!.toA) { - curY = iY++ == y.length ? null : y[iY] - enteredY = false - } - pos = next - } - if (fromA < toA || fromB < toB) - result.push(new Change(fromA, toA, fromB, toB, deleted, inserted)) - } - } - } - - /// Deserialize a change from JSON format. - static fromJSON(json: ChangeJSON) { - return new Change(json.fromA, json.toA, json.fromB, json.toB, - json.deleted.map(d => new Span(d.length, d.data)), - json.inserted.map(d => new Span(d.length, d.data))) - } - - /// Returns a JSON-serializeable object to represent this change. - toJSON(): ChangeJSON { return this } -} - -/// JSON-serialized form of a change. -export type ChangeJSON = { - fromA: number, toA: number, - fromB: number, toB: number, - deleted: readonly {length: number, data: Data}[], - inserted: readonly {length: number, data: Data}[] -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/changeset.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/changeset.ts deleted file mode 100644 index fbfc30f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/changeset.ts +++ /dev/null @@ -1,212 +0,0 @@ -import {Node} from "prosemirror-model" -import {StepMap} from "prosemirror-transform" -import {computeDiff, TokenEncoder, DefaultEncoder} from "./diff" -import {Change, Span, ChangeJSON} from "./change" -export {Change, Span, ChangeJSON} -export {simplifyChanges} from "./simplify" -export {TokenEncoder} - -/// A change set tracks the changes to a document from a given point -/// in the past. It condenses a number of step maps down to a flat -/// sequence of replacements, and simplifies replacments that -/// partially undo themselves by comparing their content. -export class ChangeSet { - /// @internal - constructor( - /// @internal - readonly config: { - doc: Node, - combine: (dataA: Data, dataB: Data) => Data, - encoder: TokenEncoder - }, - /// Replaced regions. - readonly changes: readonly Change[] - ) {} - - /// Computes a new changeset by adding the given step maps and - /// metadata (either as an array, per-map, or as a single value to be - /// associated with all maps) to the current set. Will not mutate the - /// old set. - /// - /// Note that due to simplification that happens after each add, - /// incrementally adding steps might create a different final set - /// than adding all those changes at once, since different document - /// tokens might be matched during simplification depending on the - /// boundaries of the current changed ranges. - addSteps(newDoc: Node, maps: readonly StepMap[], data: Data | readonly Data[]): ChangeSet { - // This works by inspecting the position maps for the changes, - // which indicate what parts of the document were replaced by new - // content, and the size of that new content. It uses these to - // build up Change objects. - // - // These change objects are put in sets and merged together using - // Change.merge, giving us the changes created by the new steps. - // Those changes can then be merged with the existing set of - // changes. - // - // For each change that was touched by the new steps, we recompute - // a diff to try to minimize the change by dropping matching - // pieces of the old and new document from the change. - - let stepChanges: Change[] = [] - // Add spans for new steps. - for (let i = 0; i < maps.length; i++) { - let d = Array.isArray(data) ? data[i] : data - let off = 0 - maps[i].forEach((fromA, toA, fromB, toB) => { - - stepChanges.push(new Change(fromA + off, toA + off, fromB, toB, - fromA == toA ? Span.none : [new Span(toA - fromA, d)], - fromB == toB ? Span.none : [new Span(toB - fromB, d)])) - - off = (toB - fromB) - (toA - fromA) - }) - } - if (stepChanges.length == 0) return this - - let newChanges = mergeAll(stepChanges, this.config.combine) - let changes = Change.merge(this.changes, newChanges, this.config.combine) - let updated: Change[] = changes as Change[] - - // Minimize changes when possible - for (let i = 0; i < updated.length; i++) { - let change = updated[i] - if (change.fromA == change.toA || change.fromB == change.toB || - // Only look at changes that touch newly added changed ranges - !newChanges.some(r => r.toB > change.fromB && r.fromB < change.toB)) continue - let diff = computeDiff(this.config.doc.content, newDoc.content, change, this.config.encoder) - - // Fast path: If they are completely different, don't do anything - if (diff.length == 1 && diff[0].fromB == 0 && diff[0].toB == change.toB - change.fromB) - continue - - if (updated == changes) updated = changes.slice() - if (diff.length == 1) { - updated[i] = diff[0] - } else { - updated.splice(i, 1, ...diff) - i += diff.length - 1 - } - } - - return new ChangeSet(this.config, updated) - } - - /// The starting document of the change set. - get startDoc(): Node { return this.config.doc } - - /// Map the span's data values in the given set through a function - /// and construct a new set with the resulting data. - map(f: (range: Span) => Data): ChangeSet { - let mapSpan = (span: Span) => { - let newData = f(span) - return newData === span.data ? span : new Span(span.length, newData) - } - return new ChangeSet(this.config, this.changes.map((ch: Change) => { - return new Change(ch.fromA, ch.toA, ch.fromB, ch.toB, ch.deleted.map(mapSpan), ch.inserted.map(mapSpan)) - })) - } - - /// Compare two changesets and return the range in which they are - /// changed, if any. If the document changed between the maps, pass - /// the maps for the steps that changed it as second argument, and - /// make sure the method is called on the old set and passed the new - /// set. The returned positions will be in new document coordinates. - changedRange(b: ChangeSet, maps?: readonly StepMap[]): {from: number, to: number} | null { - if (b == this) return null - let touched = maps && touchedRange(maps) - let moved = touched ? (touched.toB - touched.fromB) - (touched.toA - touched.fromA) : 0 - function map(p: number) { - return !touched || p <= touched.fromA ? p : p + moved - } - - let from = touched ? touched.fromB : 2e8, to = touched ? touched.toB : -2e8 - function add(start: number, end = start) { - from = Math.min(start, from); to = Math.max(end, to) - } - - let rA = this.changes, rB = b.changes - for (let iA = 0, iB = 0; iA < rA.length && iB < rB.length;) { - let rangeA = rA[iA], rangeB = rB[iB] - if (rangeA && rangeB && sameRanges(rangeA, rangeB, map)) { iA++; iB++ } - else if (rangeB && (!rangeA || map(rangeA.fromB) >= rangeB.fromB)) { add(rangeB.fromB, rangeB.toB); iB++ } - else { add(map(rangeA.fromB), map(rangeA.toB)); iA++ } - } - - return from <= to ? {from, to} : null - } - - /// Create a changeset with the given base object and configuration. - /// - /// The `combine` function is used to compare and combine metadata—it - /// should return null when metadata isn't compatible, and a combined - /// version for a merged range when it is. - /// - /// When given, a token encoder determines how document tokens are - /// serialized and compared when diffing the content produced by - /// changes. The default is to just compare nodes by name and text - /// by character, ignoring marks and attributes. - /// - /// To serialize a change set, you can store its document and - /// change array as JSON, and then pass the deserialized (via - /// [`Change.fromJSON`](#changes.Change^fromJSON)) set of changes - /// as fourth argument to `create` to recreate the set. - static create( - doc: Node, - combine: (dataA: Data, dataB: Data) => Data = (a, b) => a === b ? a : null as any, - tokenEncoder: TokenEncoder = DefaultEncoder, - changes: readonly Change[] = [] - ) { - return new ChangeSet({combine, doc, encoder: tokenEncoder}, changes) - } - - /// Exported for testing @internal - static computeDiff = computeDiff -} - -// Divide-and-conquer approach to merging a series of ranges. -function mergeAll( - ranges: readonly Change[], - combine: (dA: Data, dB: Data) => Data, - start = 0, end = ranges.length -): readonly Change[] { - if (end == start + 1) return [ranges[start]] - let mid = (start + end) >> 1 - return Change.merge(mergeAll(ranges, combine, start, mid), - mergeAll(ranges, combine, mid, end), combine) -} - -function endRange(maps: readonly StepMap[]) { - let from = 2e8, to = -2e8 - for (let i = 0; i < maps.length; i++) { - let map = maps[i] - if (from != 2e8) { - from = map.map(from, -1) - to = map.map(to, 1) - } - map.forEach((_s, _e, start, end) => { - from = Math.min(from, start) - to = Math.max(to, end) - }) - } - return from == 2e8 ? null : {from, to} -} - -function touchedRange(maps: readonly StepMap[]) { - let b = endRange(maps) - if (!b) return null - let a = endRange(maps.map(m => m.invert()).reverse())! - return {fromA: a.from, toA: a.to, fromB: b.from, toB: b.to} -} - -function sameRanges(a: Change, b: Change, map: (pos: number) => number) { - return map(a.fromB) == b.fromB && map(a.toB) == b.toB && - sameSpans(a.deleted, b.deleted) && sameSpans(a.inserted, b.inserted) -} - -function sameSpans(a: readonly Span[], b: readonly Span[]) { - if (a.length != b.length) return false - for (let i = 0; i < a.length; i++) - if (a[i].length != b[i].length || a[i].data !== b[i].data) return false - return true -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/diff.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/diff.ts deleted file mode 100644 index b44b47d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/diff.ts +++ /dev/null @@ -1,151 +0,0 @@ -import {Fragment, Node, NodeType, Mark} from "prosemirror-model" -import {Change} from "./change" - -/// A token encoder can be passed when creating a `ChangeSet` in order -/// to influence the way the library runs its diffing algorithm. The -/// encoder determines how document tokens (such as nodes and -/// characters) are encoded and compared. -/// -/// Note that both the encoding and the comparison may run a lot, and -/// doing non-trivial work in these functions could impact -/// performance. -export interface TokenEncoder { - /// Encode a given character, with the given marks applied. - encodeCharacter(char: number, marks: readonly Mark[]): T - /// Encode the start of a node or, if this is a leaf node, the - /// entire node. - encodeNodeStart(node: Node): T - /// Encode the end token for the given node. It is valid to encode - /// every end token in the same way. - encodeNodeEnd(node: Node): T - /// Compare the given tokens. Should return true when they count as - /// equal. - compareTokens(a: T, b: T): boolean -} - -function typeID(type: NodeType) { - let cache: Record = type.schema.cached.changeSetIDs || (type.schema.cached.changeSetIDs = Object.create(null)) - let id = cache[type.name] - if (id == null) cache[type.name] = id = Object.keys(type.schema.nodes).indexOf(type.name) + 1 - return id -} - -// The default token encoder, which encodes node open tokens are -// encoded as strings holding the node name, characters as their -// character code, and node close tokens as negative numbers. -export const DefaultEncoder: TokenEncoder = { - encodeCharacter: char => char, - encodeNodeStart: node => node.type.name, - encodeNodeEnd: node => -typeID(node.type), - compareTokens: (a, b) => a === b -} - -// Convert the given range of a fragment to tokens. -function tokens(frag: Fragment, encoder: TokenEncoder, start: number, end: number, target: T[]) { - for (let i = 0, off = 0; i < frag.childCount; i++) { - let child = frag.child(i), endOff = off + child.nodeSize - let from = Math.max(off, start), to = Math.min(endOff, end) - if (from < to) { - if (child.isText) { - for (let j = from; j < to; j++) target.push(encoder.encodeCharacter(child.text!.charCodeAt(j - off), child.marks)) - } else if (child.isLeaf) { - target.push(encoder.encodeNodeStart(child)) - } else { - if (from == off) target.push(encoder.encodeNodeStart(child)) - tokens(child.content, encoder, Math.max(off + 1, from) - off - 1, Math.min(endOff - 1, to) - off - 1, target) - if (to == endOff) target.push(encoder.encodeNodeEnd(child)) - } - } - off = endOff - } - return target -} - -// The code below will refuse to compute a diff with more than 5000 -// insertions or deletions, which takes about 300ms to reach on my -// machine. This is a safeguard against runaway computations. -const MAX_DIFF_SIZE = 5000 - -// This obscure mess of constants computes the minimum length of an -// unchanged range (not at the start/end of the compared content). The -// idea is to make it higher in bigger replacements, so that you don't -// get a diff soup of coincidentally identical letters when replacing -// a paragraph. -function minUnchanged(sizeA: number, sizeB: number) { - return Math.min(15, Math.max(2, Math.floor(Math.max(sizeA, sizeB) / 10))) -} - -export function computeDiff(fragA: Fragment, fragB: Fragment, range: Change, encoder: TokenEncoder = DefaultEncoder) { - let tokA = tokens(fragA, encoder, range.fromA, range.toA, []) - let tokB = tokens(fragB, encoder, range.fromB, range.toB, []) - - // Scan from both sides to cheaply eliminate work - let start = 0, endA = tokA.length, endB = tokB.length - let cmp = encoder.compareTokens - while (start < tokA.length && start < tokB.length && cmp(tokA[start], tokB[start])) start++ - if (start == tokA.length && start == tokB.length) return [] - while (endA > start && endB > start && cmp(tokA[endA - 1], tokB[endB - 1])) endA--, endB-- - // If the result is simple _or_ too big to cheaply compute, return - // the remaining region as the diff - if (endA == start || endB == start || (endA == endB && endA == start + 1)) - return [range.slice(start, endA, start, endB)] - - // This is an implementation of Myers' diff algorithm - // See https://neil.fraser.name/writing/diff/myers.pdf and - // https://blog.jcoglan.com/2017/02/12/the-myers-diff-algorithm-part-1/ - - let lenA = endA - start, lenB = endB - start - let max = Math.min(MAX_DIFF_SIZE, lenA + lenB), off = max + 1 - let history: number[][] = [] - let frontier: number[] = [] - for (let len = off * 2, i = 0; i < len; i++) frontier[i] = -1 - - for (let size = 0; size <= max; size++) { - for (let diag = -size; diag <= size; diag += 2) { - let next = frontier[diag + 1 + max], prev = frontier[diag - 1 + max] - let x = next < prev ? prev : next + 1, y = x + diag - while (x < lenA && y < lenB && cmp(tokA[start + x], tokB[start + y])) x++, y++ - frontier[diag + max] = x - // Found a match - if (x >= lenA && y >= lenB) { - // Trace back through the history to build up a set of changed ranges. - let diff = [], minSpan = minUnchanged(endA - start, endB - start) - // Used to add steps to a diff one at a time, back to front, merging - // ones that are less than minSpan tokens apart - let fromA = -1, toA = -1, fromB = -1, toB = -1 - let add = (fA: number, tA: number, fB: number, tB: number) => { - if (fromA > -1 && fromA < tA + minSpan) { - fromA = fA; fromB = fB - } else { - if (fromA > -1) - diff.push(range.slice(fromA, toA, fromB, toB)) - fromA = fA; toA = tA - fromB = fB; toB = tB - } - } - - for (let i = size - 1; i >= 0; i--) { - let next = frontier[diag + 1 + max], prev = frontier[diag - 1 + max] - if (next < prev) { // Deletion - diag-- - x = prev + start; y = x + diag - add(x, x, y, y + 1) - } else { // Insertion - diag++ - x = next + start; y = x + diag - add(x, x + 1, y, y) - } - frontier = history[i >> 1] - } - if (fromA > -1) diff.push(range.slice(fromA, toA, fromB, toB)) - return diff.reverse() - } - } - // Since only either odd or even diagonals are read from each - // frontier, we only copy them every other iteration. - if (size % 2 == 0) history.push(frontier.slice()) - } - // The loop exited, meaning the maximum amount of work was done. - // Just return a change spanning the entire range. - return [range.slice(start, endA, start, endB)] -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/simplify.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/simplify.ts deleted file mode 100644 index 5b018c1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/src/simplify.ts +++ /dev/null @@ -1,132 +0,0 @@ -import {Fragment, Node} from "prosemirror-model" -import {Span, Change} from "./change" - -let letter: RegExp | undefined -// If the runtime support unicode properties in regexps, that's a good -// source of info on whether something is a letter. -try { letter = new RegExp("[\\p{Alphabetic}_]", "u") } catch(_) {} - -// Otherwise, we see if the character changes when upper/lowercased, -// or if it is part of these common single-case scripts. -const nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/ - -function isLetter(code: number) { - if (code < 128) - return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 - let ch = String.fromCharCode(code) - if (letter) return letter.test(ch) - return ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch) -} - -// Convert a range of document into a string, so that we can easily -// access characters at a given position. Treat non-text tokens as -// spaces so that they aren't considered part of a word. -function getText(frag: Fragment, start: number, end: number) { - let out = "" - function convert(frag: Fragment, start: number, end: number) { - for (let i = 0, off = 0; i < frag.childCount; i++) { - let child = frag.child(i), endOff = off + child.nodeSize - let from = Math.max(off, start), to = Math.min(endOff, end) - if (from < to) { - if (child.isText) { - out += child.text!.slice(Math.max(0, start - off), Math.min(child.text!.length, end - off)) - } else if (child.isLeaf) { - out += " " - } else { - if (from == off) out += " " - convert(child.content, Math.max(0, from - off - 1), Math.min(child.content.size, end - off)) - if (to == endOff) out += " " - } - } - off = endOff - } - } - convert(frag, start, end) - return out -} - -// The distance changes have to be apart for us to not consider them -// candidates for merging. -const MAX_SIMPLIFY_DISTANCE = 30 - -/// Simplifies a set of changes for presentation. This makes the -/// assumption that having both insertions and deletions within a word -/// is confusing, and, when such changes occur without a word boundary -/// between them, they should be expanded to cover the entire set of -/// words (in the new document) they touch. An exception is made for -/// single-character replacements. -export function simplifyChanges(changes: readonly Change[], doc: Node) { - let result: Change[] = [] - for (let i = 0; i < changes.length; i++) { - let end = changes[i].toB, start = i - while (i < changes.length - 1 && changes[i + 1].fromB <= end + MAX_SIMPLIFY_DISTANCE) - end = changes[++i].toB - simplifyAdjacentChanges(changes, start, i + 1, doc, result) - } - return result -} - -function simplifyAdjacentChanges(changes: readonly Change[], from: number, to: number, doc: Node, target: Change[]) { - let start = Math.max(0, changes[from].fromB - MAX_SIMPLIFY_DISTANCE) - let end = Math.min(doc.content.size, changes[to - 1].toB + MAX_SIMPLIFY_DISTANCE) - let text = getText(doc.content, start, end) - - for (let i = from; i < to; i++) { - let startI = i, last = changes[i], deleted = last.lenA, inserted = last.lenB - while (i < to - 1) { - let next = changes[i + 1], boundary = false - let prevLetter = last.toB == end ? false : isLetter(text.charCodeAt(last.toB - 1 - start)) - for (let pos = last.toB; !boundary && pos < next.fromB; pos++) { - let nextLetter = pos == end ? false : isLetter(text.charCodeAt(pos - start)) - if ((!prevLetter || !nextLetter) && pos != changes[startI].fromB) boundary = true - prevLetter = nextLetter - } - if (boundary) break - deleted += next.lenA; inserted += next.lenB - last = next - i++ - } - - if (inserted > 0 && deleted > 0 && !(inserted == 1 && deleted == 1)) { - let from = changes[startI].fromB, to = changes[i].toB - if (from < end && isLetter(text.charCodeAt(from - start))) - while (from > start && isLetter(text.charCodeAt(from - 1 - start))) from-- - if (to > start && isLetter(text.charCodeAt(to - 1 - start))) - while (to < end && isLetter(text.charCodeAt(to - start))) to++ - let joined = fillChange(changes.slice(startI, i + 1), from, to) - let last = target.length ? target[target.length - 1] : null - if (last && last.toA == joined.fromA) - target[target.length - 1] = new Change(last.fromA, joined.toA, last.fromB, joined.toB, - last.deleted.concat(joined.deleted), last.inserted.concat(joined.inserted)) - else - target.push(joined) - } else { - for (let j = startI; j <= i; j++) target.push(changes[j]) - } - } - return changes -} - -function combine(a: T, b: T): T { return a === b ? a : null as any } - -function fillChange(changes: readonly Change[], fromB: number, toB: number) { - let fromA = changes[0].fromA - (changes[0].fromB - fromB) - let last = changes[changes.length - 1] - let toA = last.toA + (toB - last.toB) - let deleted = Span.none, inserted = Span.none - let delData = (changes[0].deleted.length ? changes[0].deleted : changes[0].inserted)[0].data - let insData = (changes[0].inserted.length ? changes[0].inserted : changes[0].deleted)[0].data - for (let posA = fromA, posB = fromB, i = 0;; i++) { - let next = i == changes.length ? null : changes[i] - let endA = next ? next.fromA : toA, endB = next ? next.fromB : toB - if (endA > posA) deleted = Span.join(deleted, [new Span(endA - posA, delData)], combine) - if (endB > posB) inserted = Span.join(inserted, [new Span(endB - posB, insData)], combine) - if (!next) break - deleted = Span.join(deleted, next.deleted, combine) - inserted = Span.join(inserted, next.inserted, combine) - if (deleted.length) delData = deleted[deleted.length - 1].data - if (inserted.length) insData = inserted[inserted.length - 1].data - posA = next.toA; posB = next.toB - } - return new Change(fromA, toA, fromB, toB, deleted, inserted) -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-changed-range.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-changed-range.ts deleted file mode 100644 index c85b88d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-changed-range.ts +++ /dev/null @@ -1,48 +0,0 @@ -import ist from "ist" -import {schema, doc, p} from "prosemirror-test-builder" -import {Transform} from "prosemirror-transform" -import {Node} from "prosemirror-model" - -import {ChangeSet} from "prosemirror-changeset" - -function mk(doc: Node, change: (tr: Transform) => Transform): {doc0: Node, tr: Transform, data: any[], set0: ChangeSet, set: ChangeSet} { - let tr = change(new Transform(doc)) - let data = new Array(tr.steps.length).fill("a") - let set0 = ChangeSet.create(doc) - return {doc0: doc, tr, data, set0, - set: set0.addSteps(tr.doc, tr.mapping.maps, data)} -} - -function same(a: any, b: any) { - ist(JSON.stringify(a), JSON.stringify(b)) -} - -describe("ChangeSet.changedRange", () => { - it("returns null for identical sets", () => { - let {set, doc0, tr, data} = mk(doc(p("foo")), tr => tr - .replaceWith(2, 3, schema.text("aaaa")) - .replaceWith(1, 1, schema.text("xx")) - .delete(5, 7)) - ist(set.changedRange(set), null) - ist(set.changedRange(ChangeSet.create(doc0).addSteps(tr.doc, tr.mapping.maps, data)), null) - }) - - it("returns only the changed range in simple cases", () => { - let {set0, set, tr} = mk(doc(p("abcd")), tr => tr.replaceWith(2, 4, schema.text("u"))) - same(set0.changedRange(set, tr.mapping.maps), {from: 2, to: 3}) - }) - - it("expands to cover updated spans", () => { - let {doc0, set0, set, tr} = mk(doc(p("abcd")), tr => tr - .replaceWith(2, 2, schema.text("c")) - .delete(3, 5)) - let set1 = ChangeSet.create(doc0).addSteps(tr.docs[1], [tr.mapping.maps[0]], ["a"]) - same(set0.changedRange(set1, [tr.mapping.maps[0]]), {from: 2, to: 3}) - same(set1.changedRange(set, [tr.mapping.maps[1]]), {from: 2, to: 3}) - }) - - it("detects changes in deletions", () => { - let {set} = mk(doc(p("abc")), tr => tr.delete(2, 3)) - same(set.changedRange(set.map(() => "b")), {from: 2, to: 2}) - }) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-changes.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-changes.ts deleted file mode 100644 index 626ebb8..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-changes.ts +++ /dev/null @@ -1,211 +0,0 @@ -import ist from "ist" -import {schema, doc, p, blockquote, h1} from "prosemirror-test-builder" -import {Transform} from "prosemirror-transform" -import {Node} from "prosemirror-model" - -import {ChangeSet} from "prosemirror-changeset" - -describe("ChangeSet", () => { - it("finds a single insertion", - find(doc(p("hello")), tr => tr.insert(3, t("XY")), [[3, 3, 3, 5]])) - - it("finds a single deletion", - find(doc(p("hello")), tr => tr.delete(3, 5), [[3, 5, 3, 3]])) - - it("identifies a replacement", - find(doc(p("hello")), tr => tr.replaceWith(3, 5, t("juj")), - [[3, 5, 3, 6]])) - - it("merges adjacent canceling edits", - find(doc(p("hello")), - tr => tr.delete(3, 5).insert(3, t("ll")), - [])) - - it("doesn't crash when cancelling edits are followed by others", - find(doc(p("hello")), - tr => tr.delete(2, 3).insert(2, t("e")).delete(5, 6), - [[5, 6, 5, 5]])) - - it("stops handling an inserted span after collapsing it", - find(doc(p("abcba")), tr => tr.insert(2, t("b")).insert(6, t("b")).delete(3, 6), - [[3, 4, 3, 3]])) - - it("partially merges insert at start", - find(doc(p("helLo")), tr => tr.delete(3, 5).insert(3, t("l")), - [[4, 5, 4, 4]])) - - it("partially merges insert at end", - find(doc(p("helLo")), tr => tr.delete(3, 5).insert(3, t("L")), - [[3, 4, 3, 3]])) - - it("partially merges delete at start", - find(doc(p("abc")), tr => tr.insert(3, t("xyz")).delete(3, 4), - [[3, 3, 3, 5]])) - - it("partially merges delete at end", - find(doc(p("abc")), tr => tr.insert(3, t("xyz")).delete(5, 6), - [[3, 3, 3, 5]])) - - it("finds multiple insertions", - find(doc(p("abc")), tr => tr.insert(1, t("x")).insert(5, t("y")), - [[1, 1, 1, 2], [4, 4, 5, 6]])) - - it("finds multiple deletions", - find(doc(p("xyz")), tr => tr.delete(1, 2).delete(2, 3), - [[1, 2, 1, 1], [3, 4, 2, 2]])) - - it("identifies a deletion between insertions", - find(doc(p("zyz")), tr => tr.insert(2, t("A")).insert(4, t("B")).delete(3, 4), - [[2, 3, 2, 4]])) - - it("can add a deletion in a new addStep call", find(doc(p("hello")), [ - tr => tr.delete(1, 2), - tr => tr.delete(2, 3) - ], [[1, 2, 1, 1], [3, 4, 2, 2]])) - - it("merges delete/insert from different addStep calls", find(doc(p("hello")), [ - tr => tr.delete(3, 5), - tr => tr.insert(3, t("ll")) - ], [])) - - it("revert a deletion by inserting the character again", find(doc(p("bar")), [ - tr => tr.delete(2, 3), // br - tr => tr.insert(2, t("x")), // bxr - tr => tr.insert(2, t("a")) // baxr - ], [[3, 3, 3, 4]])) - - it("insert character before changed character", find(doc(p("bar")), [ - tr => tr.delete(2, 3), // br - tr => tr.insert(2, t("x")), // bxr - tr => tr.insert(2, t("x")) // bxxr - ], [[2, 3, 2, 4]])) - - it("partially merges delete/insert from different addStep calls", find(doc(p("heljo")), [ - tr => tr.delete(3, 5), - tr => tr.insert(3, t("ll")) - ], [[4, 5, 4, 5]])) - - it("merges insert/delete from different addStep calls", find(doc(p("ok")), [ - tr => tr.insert(2, t("--")), - tr => tr.delete(2, 4) - ], [])) - - it("partially merges insert/delete from different addStep calls", find(doc(p("ok")), [ - tr => tr.insert(2, t("--")), - tr => tr.delete(2, 3) - ], [[2, 2, 2, 3]])) - - it("maps deletions forward", find(doc(p("foobar")), [ - tr => tr.delete(5, 6), - tr => tr.insert(1, t("OKAY")) - ], [[1, 1, 1, 5], [5, 6, 9, 9]])) - - it("can incrementally undo then redo", find(doc(p("bar")), [ - tr => tr.delete(2, 3), - tr => tr.insert(2, t("a")), - tr => tr.delete(2, 3) - ], [[2, 3, 2, 2]])) - - it("can map through complicated changesets", find(doc(p("12345678901234")), [ - tr => tr.delete(9, 12).insert(6, t("xyz")).replaceWith(2, 3, t("uv")), - tr => tr.delete(14, 15).insert(13, t("90")).delete(8, 9) - ], [[2, 3, 2, 4], [6, 6, 7, 9], [11, 12, 14, 14], [13, 14, 15, 15]])) - - it("computes a proper diff of the changes", - find(doc(p("abcd"), p("efgh")), tr => tr.delete(2, 10).insert(2, t("cdef")), - [[2, 3, 2, 2], [5, 7, 4, 4], [9, 10, 6, 6]])) - - it("handles re-adding content step by step", find(doc(p("one two three")), [ - tr => tr.delete(1, 14), - tr => tr.insert(1, t("two")), - tr => tr.insert(4, t(" ")), - tr => tr.insert(5, t("three")) - ], [[1, 5, 1, 1]])) - - it("doesn't get confused by split deletions", find(doc(blockquote(h1("one"), p("two four"))), [ - tr => tr.delete(7, 11), - tr => tr.replaceWith(0, 13, blockquote(h1("one"), p("four"))) - ], [[7, 11, 7, 7, [[4, 0]], []]], true)) - - it("doesn't get confused by multiply split deletions", find(doc(blockquote(h1("one"), p("two three"))), [ - tr => tr.delete(14, 16), - tr => tr.delete(7, 11), - tr => tr.delete(3, 5), - tr => tr.replaceWith(0, 10, blockquote(h1("o"), p("thr"))) - ], [[3, 5, 3, 3, [[2, 2]], []], [8, 12, 6, 6, [[3, 1], [1, 3]], []], - [14, 16, 8, 8, [[2, 0]], []]], true)) - - it("won't lose the order of overlapping changes", find(doc(p("12345")), [ - tr => tr.delete(4, 5), - tr => tr.replaceWith(2, 2, t("a")), - tr => tr.delete(1, 6), - tr => tr.replaceWith(1, 1, t("1a235")) - ], [[2, 2, 2, 3, [], [[1, 1]]], [4, 5, 5, 5, [[1, 0]], []]], [0, 0, 1, 1])) - - it("properly maps deleted positions", find(doc(p("jTKqvPrzApX")), [ - tr => tr.delete(8, 11), - tr => tr.replaceWith(1, 1, t("MPu")), - tr => tr.delete(2, 12), - tr => tr.replaceWith(2, 2, t("PujTKqvPrX")) - ], [[1, 1, 1, 4, [], [[3, 2]]], [8, 11, 11, 11, [[3, 1]], []]], [1, 2, 2, 2])) - - it("fuzz issue 1", find(doc(p("hzwiKqBPzn")), [ - tr => tr.delete(3, 7), - tr => tr.replaceWith(5, 5, t("LH")), - tr => tr.replaceWith(6, 6, t("uE")), - tr => tr.delete(1, 6), - tr => tr.delete(3, 6) - ], [[1, 11, 1, 3, [[2, 1], [4, 0], [2, 1], [2, 0]], [[2, 0]]]], [0, 1, 0, 1, 0])) - - it("fuzz issue 2", find(doc(p("eAMISWgauf")), [ - tr => tr.delete(5, 10), - tr => tr.replaceWith(5, 5, t("KkM")), - tr => tr.replaceWith(3, 3, t("UDO")), - tr => tr.delete(1, 12), - tr => tr.replaceWith(1, 1, t("eAUDOMIKkMf")), - tr => tr.delete(5, 8), - tr => tr.replaceWith(3, 3, t("qX")) - ], [[3, 10, 3, 10, [[2, 0], [5, 2]], [[7, 0]]]], [2, 0, 0, 0, 0, 0, 0])) - - it("fuzz issue 3", find(doc(p("hfxjahnOuH")), [ - tr => tr.delete(1, 5), - tr => tr.replaceWith(3, 3, t("X")), - tr => tr.delete(1, 8), - tr => tr.replaceWith(1, 1, t("ahXnOuH")), - tr => tr.delete(2, 4), - tr => tr.replaceWith(2, 2, t("tn")), - tr => tr.delete(5, 7), - tr => tr.delete(1, 6), - tr => tr.replaceWith(1, 1, t("atnnH")), - tr => tr.delete(2, 6) - ], [[1, 11, 1, 2, [[4, 1], [1, 0], [1, 1], [1, 0], [2, 1], [1, 0]], [[1, 0]]]], [1, 0, 1, 1, 1, 1, 1, 0, 0, 0])) - - it("correctly handles steps with multiple map entries", find(doc(p()), [ - tr => tr.replaceWith(1, 1, t("ab")), - tr => tr.wrap(tr.doc.resolve(1).blockRange()!, [{type: schema.nodes.blockquote}]) - ], [[0, 0, 0, 1], [1, 1, 2, 4], [2, 2, 5, 6]])) -}) - -function find(doc: Node, build: ((tr: Transform) => void) | ((tr: Transform) => void)[], - changes: any[], sep?: number[] | boolean) { - return () => { - let set = ChangeSet.create(doc), curDoc = doc - if (!Array.isArray(build)) build = [build] - build.forEach((build, i) => { - let tr = new Transform(curDoc) - build(tr) - set = set.addSteps(tr.doc, tr.mapping.maps, !sep ? 0 : Array.isArray(sep) ? sep[i] : i) - curDoc = tr.doc - }) - - let owner = sep && changes.length && changes[0].length > 4 - ist(JSON.stringify(set.changes.map(ch => { - let range: any[] = [ch.fromA, ch.toA, ch.fromB, ch.toB] - if (owner) range.push(ch.deleted.map(d => [d.length, d.data]), - ch.inserted.map(d => [d.length, d.data])) - return range - })), JSON.stringify(changes)) - } -} - -function t(str: string) { return schema.text(str) } diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-diff.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-diff.ts deleted file mode 100644 index 613dd86..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-diff.ts +++ /dev/null @@ -1,69 +0,0 @@ -import ist from "ist" -import {doc, p, em, strong, h1, h2} from "prosemirror-test-builder" -import {Node} from "prosemirror-model" -import {Span, Change, ChangeSet} from "prosemirror-changeset" -const {computeDiff} = ChangeSet - -describe("computeDiff", () => { - function test(doc1: Node, doc2: Node, ...ranges: number[][]) { - let diff = computeDiff(doc1.content, doc2.content, - new Change(0, doc1.content.size, 0, doc2.content.size, - [new Span(doc1.content.size, 0)], - [new Span(doc2.content.size, 0)])) - ist(JSON.stringify(diff.map(r => [r.fromA, r.toA, r.fromB, r.toB])), JSON.stringify(ranges)) - } - - it("returns an empty diff for identical documents", () => - test(doc(p("foo"), p("bar")), doc(p("foo"), p("bar")))) - - it("finds single-letter changes", () => - test(doc(p("foo"), p("bar")), doc(p("foa"), p("bar")), - [3, 4, 3, 4])) - - it("finds simple structure changes", () => - test(doc(p("foo"), p("bar")), doc(p("foobar")), - [4, 6, 4, 4])) - - it("finds multiple changes", () => - test(doc(p("foo"), p("---bar")), doc(p("fgo"), p("---bur")), - [2, 4, 2, 4], [10, 11, 10, 11])) - - it("ignores single-letter unchanged parts", () => - test(doc(p("abcdef")), doc(p("axydzf")), [2, 6, 2, 6])) - - it("ignores matching substrings in longer diffs", () => - test(doc(p("One two three")), doc(p("One"), p("And another long paragraph that has wo and ee in it")), - [4, 14, 4, 57])) - - it("finds deletions", () => - test(doc(p("abc"), p("def")), doc(p("ac"), p("d")), - [2, 3, 2, 2], [7, 9, 6, 6])) - - it("ignores marks", () => - test(doc(p("abc")), doc(p(em("a"), strong("bc"))))) - - it("ignores marks in diffing", () => - test(doc(p("abcdefghi")), doc(p(em("x"), strong("bc"), "defgh", em("y"))), - [1, 2, 1, 2], [9, 10, 9, 10])) - - it("ignores attributes", () => - test(doc(h1("x")), doc(h2("x")))) - - it("finds huge deletions", () => { - let xs = "x".repeat(200), bs = "b".repeat(20) - test(doc(p("a" + bs + "c")), doc(p("a" + xs + bs + xs + "c")), - [2, 2, 2, 202], [22, 22, 222, 422]) - }) - - it("finds huge insertions", () => { - let xs = "x".repeat(200), bs = "b".repeat(20) - test(doc(p("a" + xs + bs + xs + "c")), doc(p("a" + bs + "c")), - [2, 202, 2, 2], [222, 422, 22, 22]) - }) - - it("can handle ambiguous diffs", () => - test(doc(p("abcbcd")), doc(p("abcd")), [4, 6, 4, 4])) - - it("sees the difference between different closing tokens", () => - test(doc(p("a")), doc(h1("oo")), [0, 3, 0, 4])) -}) diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-merge.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-merge.ts deleted file mode 100644 index 85986f4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-merge.ts +++ /dev/null @@ -1,56 +0,0 @@ -import ist from "ist" -import {Change, Span} from "prosemirror-changeset" - -describe("mergeChanges", () => { - it("can merge simple insertions", () => test( - [[1, 1, 1, 2]], [[1, 1, 1, 2]], [[1, 1, 1, 3]] - )) - - it("can merge simple deletions", () => test( - [[1, 2, 1, 1]], [[1, 2, 1, 1]], [[1, 3, 1, 1]] - )) - - it("can merge insertion before deletion", () => test( - [[2, 3, 2, 2]], [[1, 1, 1, 2]], [[1, 1, 1, 2], [2, 3, 3, 3]] - )) - - it("can merge insertion after deletion", () => test( - [[2, 3, 2, 2]], [[2, 2, 2, 3]], [[2, 3, 2, 3]] - )) - - it("can merge deletion before insertion", () => test( - [[2, 2, 2, 3]], [[1, 2, 1, 1]], [[1, 2, 1, 2]] - )) - - it("can merge deletion after insertion", () => test( - [[2, 2, 2, 3]], [[3, 4, 3, 3]], [[2, 3, 2, 3]] - )) - - it("can merge deletion of insertion", () => test( - [[2, 2, 2, 3]], [[2, 3, 2, 2]], [] - )) - - it("can merge insertion after replace", () => test( - [[2, 3, 2, 3]], [[3, 3, 3, 4]], [[2, 3, 2, 4]] - )) - - it("can merge insertion before replace", () => test( - [[2, 3, 2, 3]], [[2, 2, 2, 3]], [[2, 3, 2, 4]] - )) - - it("can merge replace after insert", () => test( - [[2, 2, 2, 3]], [[2, 3, 2, 3]], [[2, 2, 2, 3]] - )) -}) - -function range(array: number[], author = 0) { - let [fromA, toA] = array - let [fromB, toB] = array.length > 2 ? array.slice(2) : array - return new Change(fromA, toA, fromB, toB, [new Span(toA - fromA, author)], [new Span(toB - fromB, author)]) -} - -function test(changeA: number[][], changeB: number[][], expected: number[][]) { - const result = Change.merge(changeA.map(range), changeB.map(range), a => a) - .map(r => [r.fromA, r.toA, r.fromB, r.toB]) - ist(JSON.stringify(result), JSON.stringify(expected)) -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-simplify.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-simplify.ts deleted file mode 100644 index 7bb19f0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-changeset/test/test-simplify.ts +++ /dev/null @@ -1,74 +0,0 @@ -import ist from "ist" -import {doc, p, img} from "prosemirror-test-builder" -import {Node} from "prosemirror-model" -import {simplifyChanges, Change, Span} from "prosemirror-changeset" - -describe("simplifyChanges", () => { - it("doesn't change insertion-only changes", () => test( - [[1, 1, 1, 2], [2, 2, 3, 4]], doc(p("hello")), [[1, 1, 1, 2], [2, 2, 3, 4]])) - - it("doesn't change deletion-only changes", () => test( - [[1, 2, 1, 1], [3, 4, 2, 2]], doc(p("hello")), [[1, 2, 1, 1], [3, 4, 2, 2]])) - - it("doesn't change single-letter-replacements", () => test( - [[1, 2, 1, 2]], doc(p("hello")), [[1, 2, 1, 2]])) - - it("does expand multiple-letter replacements", () => test( - [[2, 4, 2, 4]], doc(p("hello")), [[1, 6, 1, 6]])) - - it("does combine changes within the same word", () => test( - [[1, 3, 1, 1], [5, 5, 3, 4]], doc(p("hello")), [[1, 7, 1, 6]])) - - it("expands changes to cover full words", () => test( - [[7, 10]], doc(p("one two three four")), [[5, 14]])) - - it("doesn't expand across non-word text", () => test( - [[7, 10]], doc(p("one two ----- four")), [[5, 10]])) - - it("doesn't expand replacements across bracket characters", () => test( - [[7, 10]], doc(p("one two [SFX] four")), [[5, 10]])) - - it("treats leaf nodes as non-words", () => test( - [[2, 3], [6, 7]], doc(p("one", img(), "two")), [[2, 3], [6, 7]])) - - it("treats node boundaries as non-words", () => test( - [[2, 3], [7, 8]], doc(p("one"), p("two")), [[2, 3], [7, 8]])) - - it("can merge stretches of changes", () => test( - [[2, 3], [4, 6], [8, 10], [15, 16]], doc(p("foo bar baz bug ugh")), [[1, 12], [15, 16]])) - - it("handles realistic word updates", () => test( - [[8, 8, 8, 11], [10, 15, 13, 17]], doc(p("chonic condition")), [[8, 15, 8, 17]])) - - it("works when after significant content", () => test( - [[63, 80, 63, 83]], doc(p("one long paragraph -----"), p("two long paragraphs ------"), p("a vote against the government")), - [[62, 81, 62, 84]])) - - it("joins changes that grow together when simplifying", () => test( - [[1, 5, 1, 5], [7, 13, 7, 9], [20, 21, 16, 16]], doc(p('and his co-star')), - [[1, 13, 1, 9], [20, 21, 16, 16]])) - - it("properly fills in metadata", () => { - let simple = simplifyChanges([range([2, 3], 0), range([4, 6], 1), range([8, 9, 8, 8], 2)], - doc(p("1234567890"))) - ist(simple.length, 1) - ist(JSON.stringify(simple[0].deleted.map(s => [s.length, s.data])), - JSON.stringify([[3, 0], [4, 1], [4, 2]])) - ist(JSON.stringify(simple[0].inserted.map(s => [s.length, s.data])), - JSON.stringify([[3, 0], [4, 1], [3, 2]])) - }) -}) - -function range(array: number[], author = 0) { - let [fromA, toA] = array - let [fromB, toB] = array.length > 2 ? array.slice(2) : array - return new Change(fromA, toA, fromB, toB, [new Span(toA - fromA, author)], [new Span(toB - fromB, author)]) -} - -function test(changes: number[][], doc: Node, result: number[][]) { - let ranges = changes.map(range) - ist(JSON.stringify(simplifyChanges(ranges, doc).map((r, i) => { - if (result[i] && result[i].length > 2) return [r.fromA, r.toA, r.fromB, r.toB] - else return [r.fromB, r.toB] - })), JSON.stringify(result)) -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-transform b/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-transform deleted file mode 120000 index d9fd2cc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-changeset@2.4.1/node_modules/prosemirror-transform +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-transform@1.12.0/node_modules/prosemirror-transform \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/.tern-project b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/.tern-project deleted file mode 100644 index dde3976..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/.tern-project +++ /dev/null @@ -1,8 +0,0 @@ -{ - "libs": ["browser"], - "plugins": { - "node": {}, - "complete_strings": {}, - "es_modules": {} - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/CHANGELOG.md deleted file mode 100644 index f08c37f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/CHANGELOG.md +++ /dev/null @@ -1,322 +0,0 @@ -## 1.7.1 (2025-04-13) - -### Bug fixes - -Fix a regression in `splitBlock` that would cause it to crash, rather than return false, when no split is possible. - -## 1.7.0 (2025-02-20) - -### New features - -`toggleMark` now accepts an `includeWhitespace` option that controls whether it affects leading/trailing space. - -## 1.6.2 (2024-10-24) - -### Bug fixes - -Make `splitBlock` smart enough to split blocks when the cursor is inside a nested inline node. - -## 1.6.1 (2024-10-11) - -### Bug fixes - -`joinBackward` will, when moving a node into a block, no longer join that block with the block after when the two have compatible content but aren't of the same type. - -Fix an issue in `splitBlock` that caused it to return true without doing anything when the schema makes splitting at the cursor impossible. - -Support implicit conversion between hard break nodes and newlines in the `joinForward` and `joinBackward` commands. - -## 1.6.0 (2024-07-26) - -### Bug fixes - -Fix an issue where `joinBackward` couldn't lift the block with the cursor when the block before it was isolating. - -### New features - -`toggleMark` now takes an option that controls its behavior when only part of the selection has the mark already. - -The function given to `splitBlockAs` now has access to the split position via a third parameter. - -`toggleMark` now takes an `enterInlineAtoms` option that controls whether it descends into atom nodes. - -## 1.5.2 (2023-05-17) - -### Bug fixes - -Include CommonJS type declarations in the package to please new TypeScript resolution settings. - -## 1.5.1 (2023-03-01) - -### Bug fixes - -Fix `joinTextblockBackward` not applying when the textblock before was wrapped in another node. - -## 1.5.0 (2022-12-05) - -### New features - -The new `splitBlockAs` command-builder allows you to pass in custom logic to determine the type of block that should be split off. - -## 1.4.0 (2022-12-01) - -### Bug fixes - -Make `setBlockType` act on all selection ranges in selections that have them. - -### New features - -The new `joinTextblockForward` and `joinTextblockBackward` commands provide a more primitive command for delete/backspace behavior when you don't want the extra strategies implemented by `joinForward`/`joinBackward`. - -## 1.3.1 (2022-09-08) - -### Bug fixes - -Make sure `toggleMark` doesn't add marks to top nodes with non-inline content. - -## 1.3.0 (2022-05-30) - -### New features - -Include TypeScript type declarations. - -## 1.2.2 (2022-03-16) - -### Bug fixes - -Don't override behavior of Home and End keys in base keymap. - -## 1.2.1 (2022-01-20) - -### Bug fixes - -Fix an issue where `joinBackward` and `joinForward` would return true when activated with the cursor in an empty but undeletable block, but not make any change. - -## 1.2.0 (2022-01-17) - -### Bug fixes - -Add a workaround for a bug on macOS where Ctrl-a and Ctrl-e getting stuck at the edge of inline nodes. - -### New features - -The new `selectTextblockEnd` and `selectTextblockStart` commands move the cursor to the start/end of the textblock, when inside one. - -Ctrl-a/e on macOS and Home/End on other platforms are now bound to `selectTextblockEnd` and `selectTextblockStart`. - -## 1.1.12 (2021-10-29) - -### Bug fixes - -Fix issue where the default PC keymap was used on recent versions of iPhone or iPad operating systems. - -## 1.1.11 (2021-10-06) - -### Bug fixes - -Add a binding for Shift-Backspace to the base keymap, so that shift or caps-lock won't interfere with backspace behavior. - -Fix an issue in `autoJoin` that made it ignore a third argument if it was passed one. - -## 1.1.10 (2021-07-05) - -### Bug fixes - -Make `joinBackward` capable of joining textblocks wrapped in parent nodes when the parent nodes themselves can't be joined (for example two list items which allow only a single paragraph). - -## 1.1.9 (2021-06-07) - -### Bug fixes - -Fix a regression where `splitBlock` could crash when splitting at the end of a non-default block. - -## 1.1.8 (2021-05-22) - -### Bug fixes - -Fix a crash in `splitBlock` that occurred with certain types of schemas. - -## 1.1.7 (2021-02-22) - -### Bug fixes - -Fix a regression where `createParagraphNear` no longer fired for gap cursor selections. - -## 1.1.6 (2021-02-10) - -### Bug fixes - -Improve behavior of enter when the entire document is selected. - -## 1.1.5 (2021-01-14) - -### Bug fixes - -`joinBackward` and `joinForward` will now, when the textblock after the cut can't be moved into the structure before the cut, try to just join the inline content onto the last child in the structure before the cut. - -`toggleMark` will now skip whitespace at the start and end of the selection when adding a mark. - -## 1.1.4 (2020-04-15) - -### Bug fixes - -`selectNodeForward` and `selectNodeBackward` will now also select nodes next to a gap cursor (or other custom empty selection type). - -## 1.1.3 (2020-01-03) - -### Bug fixes - -Fix an issue where, since version 1.7.4 of prosemirror-model, `splitBlock` fails to create the expected new textblock in some schemas. - -## 1.1.2 (2019-11-20) - -### Bug fixes - -Rename ES module files to use a .js extension, since Webpack gets confused by .mjs - -## 1.1.1 (2019-11-19) - -### Bug fixes - -The file referred to in the package's `module` field now is compiled down to ES5. - -## 1.1.0 (2019-11-08) - -### New features - -Add a `module` field to package json file. - -## 1.0.8 (2019-05-14) - -### Bug fixes - -Fix a crash caused by using a position potentially outside the document in [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock). - -## 1.0.7 (2018-04-09) - -### Bug fixes - -Fixes an issue where [`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward) might create a selection pointing into the old document. - -## 1.0.6 (2018-04-04) - -### Bug fixes - -The [`setBlockType` command](https://prosemirror.net/docs/ref/#commands.setBlockType) command is now considered applicable when _any_ of the selected textblocks can be changed (it used to only look at the first one). - -Fix crash when calling [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock) when the selection isn't in a block node (by disabling the command in that case). - -Fixes an issue where [`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward) might create a selection pointing into the old document. - -## 1.0.5 (2018-01-30) - -### Bug fixes - -Fix crash in [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock) when `defaultContentType` returns null. - -## 1.0.4 (2018-01-18) - -### Bug fixes - -Pressing delete in front of an [isolating](https://prosemirror.net/docs/ref/#model.NodeSpec.isolating) node no longer opens it. - -## 1.0.3 (2017-12-19) - -### Bug fixes - -Fix issue where [`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward) would sometimes create an invalid selection. - -## 1.0.2 (2017-11-21) - -### Bug fixes - -[`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock) no longer crashes when used in a block that's it's parent node's only allowed child. - -## 1.0.0 (2017-10-13) - -### New features - -The [`setBlockType` command](https://prosemirror.net/docs/ref/#commands.setBlockType) can now be used to change the types of multiple selected textblocks (rather than only one). - -The platform-dependent versions of the [base keymap](https://prosemirror.net/docs/ref/#commands.baseKeymap) are now exported separately as [`pcBaseKeymap`](https://prosemirror.net/docs/ref/#commands.pcBaseKeymap) and [`macBaseKeymap`](https://prosemirror.net/docs/ref/#commands.macBaseKeymap). - -## 0.23.0 (2017-09-13) - -### Breaking changes - -`joinForward` and `joinBackward` no longer fall back to selecting the next node when no other behavior is possible. There are now separate commands `selectNodeForward` and `selectNodeBackward` that do this, which the base keymap binds as fallback behavior. - -[`baseKeymap`](https://prosemirror.net/docs/ref/version/0.23.0.html#commands.baseKeymap) no longer binds keys for `joinUp`, `joinDown`, `lift`, and `selectParentNode`. - -### New features - -New commands [`selectNodeForward`](https://prosemirror.net/docs/ref/version/0.23.0.html#commands.selectNodeForward) and [`selectNodeBackward`](https://prosemirror.net/docs/ref/version/0.23.0.html#commands.selectNodeBackward) added. - -## 0.20.0 (2017-04-03) - -### New features - -The new [`selectAll` command](https://prosemirror.net/docs/ref/version/0.20.0.html#commands.selectAll), bound to Mod-a in the base keymap, sets the selection to an [`AllSelection`](https://prosemirror.net/docs/ref/version/0.20.0.html#state.AllSelection). - -## 0.19.0 (2017-03-16) - -### Bug fixes - -Calling `joinBackward` at the start of a node that can't be joined no longer raises an error. - -## 0.18.0 (2017-02-24) - -### New features - -New command [`splitBlockKeepMarks`](https://prosemirror.net/docs/ref/version/0.18.0.html#commands.splitBlockKeepMarks) which splits a block but preserves the marks at the cursor. - -## 0.17.1 (2017-01-16) - -### Bug fixes - -Make sure [`toggleMark`](https://prosemirror.net/docs/ref/version/0.17.0.html#commands.toggleMark) also works in the top-level node (when it is a textblock). - -## 0.17.0 (2017-01-05) - -### Breaking changes - -The `dispatch` function passed to commands is now passed a [`Transaction`](https://prosemirror.net/docs/ref/version/0.17.0.html#state.Transaction), not an action object. - -## 0.15.0 (2016-12-10) - -### Breaking changes - -Drops suppport for `delete(Char|Word)(Before|After)` and `move(Back|For)ward`, since we are now letting the browser handle those natively. - -### Bug fixes - -The [`joinForward`](https://prosemirror.net/docs/ref/version/0.15.0.html#commands.joinForward) and [`joinBackward`](https://prosemirror.net/docs/ref/version/0.15.0.html#commands.joinBackward) commands can now strip out markup and nodes that aren't allowed in the joined node. - -### New features - -A new command [`exitCode`](https://prosemirror.net/docs/ref/version/0.15.0.html#commands.exitCode) allows a user to exit a code block by creating a new paragraph below it. - -The [`joinForward`](https://prosemirror.net/docs/ref/version/0.15.0.html#commands.joinForward) and [`joinBackward`](https://prosemirror.net/docs/ref/version/0.15.0.html#commands.joinBackward) commands now use a bidirectional-text-aware way to determine whether the cursor is at the proper side of its parent textblock when they are passed a view. - -## 0.13.0 (2016-11-11) - -### New features - -The [`autoJoin`](https://prosemirror.net/docs/ref/version/0.13.0.html#commands.autoJoin) function allows you to wrap command functions so that when the command makes nodes of a certain type occur next to each other, they are automatically joined. - -## 0.12.0 (2016-10-21) - -### Bug fixes - -Fix crash when backspacing into nodes with complex content -expressions. - -## 0.11.0 (2016-09-21) - -### Breaking changes - -Moved into a separate module. - -The interface for command functions was changed to work with the new -[state](https://prosemirror.net/docs/ref/version/0.11.0.html#state.EditorState)/[action](https://prosemirror.net/docs/ref/version/0.11.0.html#state.Action) abstractions. - diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/CONTRIBUTING.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/CONTRIBUTING.md deleted file mode 100644 index f2a345d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/CONTRIBUTING.md +++ /dev/null @@ -1,104 +0,0 @@ -# How to contribute - -- [Getting help](#getting-help) -- [Submitting bug reports](#submitting-bug-reports) -- [Contributing code](#contributing-code) - -## Getting help - -Community discussion, questions, and informal bug reporting is done on the -[discuss.ProseMirror forum](http://discuss.prosemirror.net). - -## Submitting bug reports - -Report bugs on the -[GitHub issue tracker](http://github.com/prosemirror/prosemirror/issues). -Before reporting a bug, please read these pointers. - -- The issue tracker is for *bugs*, not requests for help. Questions - should be asked on the [forum](http://discuss.prosemirror.net). - -- Include information about the version of the code that exhibits the - problem. For browser-related issues, include the browser and browser - version on which the problem occurred. - -- Mention very precisely what went wrong. "X is broken" is not a good - bug report. What did you expect to happen? What happened instead? - Describe the exact steps a maintainer has to take to make the - problem occur. A screencast can be useful, but is no substitute for - a textual description. - -- A great way to make it easy to reproduce your problem, if it can not - be trivially reproduced on the website demos, is to submit a script - that triggers the issue. - -## Contributing code - -If you want to make a change that involves a significant overhaul of -the code or introduces a user-visible new feature, create an -[RFC](https://github.com/ProseMirror/rfcs/) first with your proposal. - -- Make sure you have a [GitHub Account](https://github.com/signup/free) - -- Fork the relevant repository - ([how to fork a repo](https://help.github.com/articles/fork-a-repo)) - -- Create a local checkout of the code. You can use the - [main repository](https://github.com/prosemirror/prosemirror) to - easily check out all core modules. - -- Make your changes, and commit them - -- Follow the code style of the rest of the project (see below). Run - `npm run lint` (in the main repository checkout) to make sure that - the linter is happy. - -- If your changes are easy to test or likely to regress, add tests in - the relevant `test/` directory. Either put them in an existing - `test-*.js` file, if they fit there, or add a new file. - -- Make sure all tests pass. Run `npm run test` to verify tests pass - (you will need Node.js v6+). - -- Submit a pull request ([how to create a pull request](https://help.github.com/articles/fork-a-repo)). - Don't put more than one feature/fix in a single pull request. - -By contributing code to ProseMirror you - - - Agree to license the contributed code under the project's [MIT - license](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE). - - - Confirm that you have the right to contribute and license the code - in question. (Either you hold all rights on the code, or the rights - holder has explicitly granted the right to use it like this, - through a compatible open source license or through a direct - agreement with you.) - -### Coding standards - -- ES6 syntax, targeting an ES5 runtime (i.e. don't use library - elements added by ES6, don't use ES7/ES.next syntax). - -- 2 spaces per indentation level, no tabs. - -- No semicolons except when necessary. - -- Follow the surrounding code when it comes to spacing, brace - placement, etc. - -- Brace-less single-statement bodies are encouraged (whenever they - don't impact readability). - -- [getdocs](https://github.com/marijnh/getdocs)-style doc comments - above items that are part of the public API. - -- When documenting non-public items, you can put the type after a - single colon, so that getdocs doesn't pick it up and add it to the - API reference. - -- The linter (`npm run lint`) complains about unused variables and - functions. Prefix their names with an underscore to muffle it. - -- ProseMirror does *not* follow JSHint or JSLint prescribed style. - Patches that try to 'fix' code to pass one of these linters will not - be accepted. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/LICENSE b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/LICENSE deleted file mode 100644 index 7e2295b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2015-2017 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/README.md deleted file mode 100644 index 7764136..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# prosemirror-commands - -[ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-commands/blob/master/CHANGELOG.md) ] - -This is a [core module](https://prosemirror.net/docs/ref/#commands) of [ProseMirror](https://prosemirror.net). -ProseMirror is a well-behaved rich semantic content editor based on -contentEditable, with support for collaborative editing and custom -document schemas. - -This [module](https://prosemirror.net/docs/ref/#commands) implements a -number of editing commands, which are functions that abstract editing -actions which can be bound to keys. - -The [project page](https://prosemirror.net) has more information, a -number of [examples](https://prosemirror.net/examples/) and the -[documentation](https://prosemirror.net/docs/). - -This code is released under an -[MIT license](https://github.com/prosemirror/prosemirror/tree/master/LICENSE). -There's a [forum](http://discuss.prosemirror.net) for general -discussion and support requests, and the -[Github bug tracker](https://github.com/prosemirror/prosemirror/issues) -is the place to report issues. - -We aim to be an inclusive, welcoming community. To make that explicit, -we have a [code of -conduct](http://contributor-covenant.org/version/1/1/0/) that applies -to communication around the project. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.cjs deleted file mode 100644 index e353181..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.cjs +++ /dev/null @@ -1,687 +0,0 @@ -'use strict'; - -var prosemirrorTransform = require('prosemirror-transform'); -var prosemirrorModel = require('prosemirror-model'); -var prosemirrorState = require('prosemirror-state'); -var deleteSelection = function deleteSelection(state, dispatch) { - if (state.selection.empty) return false; - if (dispatch) dispatch(state.tr.deleteSelection().scrollIntoView()); - return true; -}; -function atBlockStart(state, view) { - var $cursor = state.selection.$cursor; - if (!$cursor || (view ? !view.endOfTextblock("backward", state) : $cursor.parentOffset > 0)) return null; - return $cursor; -} -var joinBackward = function joinBackward(state, dispatch, view) { - var $cursor = atBlockStart(state, view); - if (!$cursor) return false; - var $cut = findCutBefore($cursor); - if (!$cut) { - var range = $cursor.blockRange(), - target = range && prosemirrorTransform.liftTarget(range); - if (target == null) return false; - if (dispatch) dispatch(state.tr.lift(range, target).scrollIntoView()); - return true; - } - var before = $cut.nodeBefore; - if (deleteBarrier(state, $cut, dispatch, -1)) return true; - if ($cursor.parent.content.size == 0 && (textblockAt(before, "end") || prosemirrorState.NodeSelection.isSelectable(before))) { - for (var depth = $cursor.depth;; depth--) { - var delStep = prosemirrorTransform.replaceStep(state.doc, $cursor.before(depth), $cursor.after(depth), prosemirrorModel.Slice.empty); - if (delStep && delStep.slice.size < delStep.to - delStep.from) { - if (dispatch) { - var tr = state.tr.step(delStep); - tr.setSelection(textblockAt(before, "end") ? prosemirrorState.Selection.findFrom(tr.doc.resolve(tr.mapping.map($cut.pos, -1)), -1) : prosemirrorState.NodeSelection.create(tr.doc, $cut.pos - before.nodeSize)); - dispatch(tr.scrollIntoView()); - } - return true; - } - if (depth == 1 || $cursor.node(depth - 1).childCount > 1) break; - } - } - if (before.isAtom && $cut.depth == $cursor.depth - 1) { - if (dispatch) dispatch(state.tr["delete"]($cut.pos - before.nodeSize, $cut.pos).scrollIntoView()); - return true; - } - return false; -}; -var joinTextblockBackward = function joinTextblockBackward(state, dispatch, view) { - var $cursor = atBlockStart(state, view); - if (!$cursor) return false; - var $cut = findCutBefore($cursor); - return $cut ? joinTextblocksAround(state, $cut, dispatch) : false; -}; -var joinTextblockForward = function joinTextblockForward(state, dispatch, view) { - var $cursor = atBlockEnd(state, view); - if (!$cursor) return false; - var $cut = findCutAfter($cursor); - return $cut ? joinTextblocksAround(state, $cut, dispatch) : false; -}; -function joinTextblocksAround(state, $cut, dispatch) { - var before = $cut.nodeBefore, - beforeText = before, - beforePos = $cut.pos - 1; - for (; !beforeText.isTextblock; beforePos--) { - if (beforeText.type.spec.isolating) return false; - var child = beforeText.lastChild; - if (!child) return false; - beforeText = child; - } - var after = $cut.nodeAfter, - afterText = after, - afterPos = $cut.pos + 1; - for (; !afterText.isTextblock; afterPos++) { - if (afterText.type.spec.isolating) return false; - var _child = afterText.firstChild; - if (!_child) return false; - afterText = _child; - } - var step = prosemirrorTransform.replaceStep(state.doc, beforePos, afterPos, prosemirrorModel.Slice.empty); - if (!step || step.from != beforePos || step instanceof prosemirrorTransform.ReplaceStep && step.slice.size >= afterPos - beforePos) return false; - if (dispatch) { - var tr = state.tr.step(step); - tr.setSelection(prosemirrorState.TextSelection.create(tr.doc, beforePos)); - dispatch(tr.scrollIntoView()); - } - return true; -} -function textblockAt(node, side) { - var only = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - for (var scan = node; scan; scan = side == "start" ? scan.firstChild : scan.lastChild) { - if (scan.isTextblock) return true; - if (only && scan.childCount != 1) return false; - } - return false; -} -var selectNodeBackward = function selectNodeBackward(state, dispatch, view) { - var _state$selection = state.selection, - $head = _state$selection.$head, - empty = _state$selection.empty, - $cut = $head; - if (!empty) return false; - if ($head.parent.isTextblock) { - if (view ? !view.endOfTextblock("backward", state) : $head.parentOffset > 0) return false; - $cut = findCutBefore($head); - } - var node = $cut && $cut.nodeBefore; - if (!node || !prosemirrorState.NodeSelection.isSelectable(node)) return false; - if (dispatch) dispatch(state.tr.setSelection(prosemirrorState.NodeSelection.create(state.doc, $cut.pos - node.nodeSize)).scrollIntoView()); - return true; -}; -function findCutBefore($pos) { - if (!$pos.parent.type.spec.isolating) for (var i = $pos.depth - 1; i >= 0; i--) { - if ($pos.index(i) > 0) return $pos.doc.resolve($pos.before(i + 1)); - if ($pos.node(i).type.spec.isolating) break; - } - return null; -} -function atBlockEnd(state, view) { - var $cursor = state.selection.$cursor; - if (!$cursor || (view ? !view.endOfTextblock("forward", state) : $cursor.parentOffset < $cursor.parent.content.size)) return null; - return $cursor; -} -var joinForward = function joinForward(state, dispatch, view) { - var $cursor = atBlockEnd(state, view); - if (!$cursor) return false; - var $cut = findCutAfter($cursor); - if (!$cut) return false; - var after = $cut.nodeAfter; - if (deleteBarrier(state, $cut, dispatch, 1)) return true; - if ($cursor.parent.content.size == 0 && (textblockAt(after, "start") || prosemirrorState.NodeSelection.isSelectable(after))) { - var delStep = prosemirrorTransform.replaceStep(state.doc, $cursor.before(), $cursor.after(), prosemirrorModel.Slice.empty); - if (delStep && delStep.slice.size < delStep.to - delStep.from) { - if (dispatch) { - var tr = state.tr.step(delStep); - tr.setSelection(textblockAt(after, "start") ? prosemirrorState.Selection.findFrom(tr.doc.resolve(tr.mapping.map($cut.pos)), 1) : prosemirrorState.NodeSelection.create(tr.doc, tr.mapping.map($cut.pos))); - dispatch(tr.scrollIntoView()); - } - return true; - } - } - if (after.isAtom && $cut.depth == $cursor.depth - 1) { - if (dispatch) dispatch(state.tr["delete"]($cut.pos, $cut.pos + after.nodeSize).scrollIntoView()); - return true; - } - return false; -}; -var selectNodeForward = function selectNodeForward(state, dispatch, view) { - var _state$selection2 = state.selection, - $head = _state$selection2.$head, - empty = _state$selection2.empty, - $cut = $head; - if (!empty) return false; - if ($head.parent.isTextblock) { - if (view ? !view.endOfTextblock("forward", state) : $head.parentOffset < $head.parent.content.size) return false; - $cut = findCutAfter($head); - } - var node = $cut && $cut.nodeAfter; - if (!node || !prosemirrorState.NodeSelection.isSelectable(node)) return false; - if (dispatch) dispatch(state.tr.setSelection(prosemirrorState.NodeSelection.create(state.doc, $cut.pos)).scrollIntoView()); - return true; -}; -function findCutAfter($pos) { - if (!$pos.parent.type.spec.isolating) for (var i = $pos.depth - 1; i >= 0; i--) { - var parent = $pos.node(i); - if ($pos.index(i) + 1 < parent.childCount) return $pos.doc.resolve($pos.after(i + 1)); - if (parent.type.spec.isolating) break; - } - return null; -} -var joinUp = function joinUp(state, dispatch) { - var sel = state.selection, - nodeSel = sel instanceof prosemirrorState.NodeSelection, - point; - if (nodeSel) { - if (sel.node.isTextblock || !prosemirrorTransform.canJoin(state.doc, sel.from)) return false; - point = sel.from; - } else { - point = prosemirrorTransform.joinPoint(state.doc, sel.from, -1); - if (point == null) return false; - } - if (dispatch) { - var tr = state.tr.join(point); - if (nodeSel) tr.setSelection(prosemirrorState.NodeSelection.create(tr.doc, point - state.doc.resolve(point).nodeBefore.nodeSize)); - dispatch(tr.scrollIntoView()); - } - return true; -}; -var joinDown = function joinDown(state, dispatch) { - var sel = state.selection, - point; - if (sel instanceof prosemirrorState.NodeSelection) { - if (sel.node.isTextblock || !prosemirrorTransform.canJoin(state.doc, sel.to)) return false; - point = sel.to; - } else { - point = prosemirrorTransform.joinPoint(state.doc, sel.to, 1); - if (point == null) return false; - } - if (dispatch) dispatch(state.tr.join(point).scrollIntoView()); - return true; -}; -var lift = function lift(state, dispatch) { - var _state$selection3 = state.selection, - $from = _state$selection3.$from, - $to = _state$selection3.$to; - var range = $from.blockRange($to), - target = range && prosemirrorTransform.liftTarget(range); - if (target == null) return false; - if (dispatch) dispatch(state.tr.lift(range, target).scrollIntoView()); - return true; -}; -var newlineInCode = function newlineInCode(state, dispatch) { - var _state$selection4 = state.selection, - $head = _state$selection4.$head, - $anchor = _state$selection4.$anchor; - if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) return false; - if (dispatch) dispatch(state.tr.insertText("\n").scrollIntoView()); - return true; -}; -function defaultBlockAt(match) { - for (var i = 0; i < match.edgeCount; i++) { - var _match$edge = match.edge(i), - type = _match$edge.type; - if (type.isTextblock && !type.hasRequiredAttrs()) return type; - } - return null; -} -var exitCode = function exitCode(state, dispatch) { - var _state$selection5 = state.selection, - $head = _state$selection5.$head, - $anchor = _state$selection5.$anchor; - if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) return false; - var above = $head.node(-1), - after = $head.indexAfter(-1), - type = defaultBlockAt(above.contentMatchAt(after)); - if (!type || !above.canReplaceWith(after, after, type)) return false; - if (dispatch) { - var pos = $head.after(), - tr = state.tr.replaceWith(pos, pos, type.createAndFill()); - tr.setSelection(prosemirrorState.Selection.near(tr.doc.resolve(pos), 1)); - dispatch(tr.scrollIntoView()); - } - return true; -}; -var createParagraphNear = function createParagraphNear(state, dispatch) { - var sel = state.selection, - $from = sel.$from, - $to = sel.$to; - if (sel instanceof prosemirrorState.AllSelection || $from.parent.inlineContent || $to.parent.inlineContent) return false; - var type = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter())); - if (!type || !type.isTextblock) return false; - if (dispatch) { - var side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos; - var tr = state.tr.insert(side, type.createAndFill()); - tr.setSelection(prosemirrorState.TextSelection.create(tr.doc, side + 1)); - dispatch(tr.scrollIntoView()); - } - return true; -}; -var liftEmptyBlock = function liftEmptyBlock(state, dispatch) { - var $cursor = state.selection.$cursor; - if (!$cursor || $cursor.parent.content.size) return false; - if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) { - var before = $cursor.before(); - if (prosemirrorTransform.canSplit(state.doc, before)) { - if (dispatch) dispatch(state.tr.split(before).scrollIntoView()); - return true; - } - } - var range = $cursor.blockRange(), - target = range && prosemirrorTransform.liftTarget(range); - if (target == null) return false; - if (dispatch) dispatch(state.tr.lift(range, target).scrollIntoView()); - return true; -}; -function splitBlockAs(splitNode) { - return function (state, dispatch) { - var _state$selection6 = state.selection, - $from = _state$selection6.$from, - $to = _state$selection6.$to; - if (state.selection instanceof prosemirrorState.NodeSelection && state.selection.node.isBlock) { - if (!$from.parentOffset || !prosemirrorTransform.canSplit(state.doc, $from.pos)) return false; - if (dispatch) dispatch(state.tr.split($from.pos).scrollIntoView()); - return true; - } - if (!$from.depth) return false; - var types = []; - var splitDepth, - deflt, - atEnd = false, - atStart = false; - for (var d = $from.depth;; d--) { - var node = $from.node(d); - if (node.isBlock) { - atEnd = $from.end(d) == $from.pos + ($from.depth - d); - atStart = $from.start(d) == $from.pos - ($from.depth - d); - deflt = defaultBlockAt($from.node(d - 1).contentMatchAt($from.indexAfter(d - 1))); - var splitType = splitNode && splitNode($to.parent, atEnd, $from); - types.unshift(splitType || (atEnd && deflt ? { - type: deflt - } : null)); - splitDepth = d; - break; - } else { - if (d == 1) return false; - types.unshift(null); - } - } - var tr = state.tr; - if (state.selection instanceof prosemirrorState.TextSelection || state.selection instanceof prosemirrorState.AllSelection) tr.deleteSelection(); - var splitPos = tr.mapping.map($from.pos); - var can = prosemirrorTransform.canSplit(tr.doc, splitPos, types.length, types); - if (!can) { - types[0] = deflt ? { - type: deflt - } : null; - can = prosemirrorTransform.canSplit(tr.doc, splitPos, types.length, types); - } - if (!can) return false; - tr.split(splitPos, types.length, types); - if (!atEnd && atStart && $from.node(splitDepth).type != deflt) { - var first = tr.mapping.map($from.before(splitDepth)), - $first = tr.doc.resolve(first); - if (deflt && $from.node(splitDepth - 1).canReplaceWith($first.index(), $first.index() + 1, deflt)) tr.setNodeMarkup(tr.mapping.map($from.before(splitDepth)), deflt); - } - if (dispatch) dispatch(tr.scrollIntoView()); - return true; - }; -} -var splitBlock = splitBlockAs(); -var splitBlockKeepMarks = function splitBlockKeepMarks(state, dispatch) { - return splitBlock(state, dispatch && function (tr) { - var marks = state.storedMarks || state.selection.$to.parentOffset && state.selection.$from.marks(); - if (marks) tr.ensureMarks(marks); - dispatch(tr); - }); -}; -var selectParentNode = function selectParentNode(state, dispatch) { - var _state$selection7 = state.selection, - $from = _state$selection7.$from, - to = _state$selection7.to, - pos; - var same = $from.sharedDepth(to); - if (same == 0) return false; - pos = $from.before(same); - if (dispatch) dispatch(state.tr.setSelection(prosemirrorState.NodeSelection.create(state.doc, pos))); - return true; -}; -var selectAll = function selectAll(state, dispatch) { - if (dispatch) dispatch(state.tr.setSelection(new prosemirrorState.AllSelection(state.doc))); - return true; -}; -function joinMaybeClear(state, $pos, dispatch) { - var before = $pos.nodeBefore, - after = $pos.nodeAfter, - index = $pos.index(); - if (!before || !after || !before.type.compatibleContent(after.type)) return false; - if (!before.content.size && $pos.parent.canReplace(index - 1, index)) { - if (dispatch) dispatch(state.tr["delete"]($pos.pos - before.nodeSize, $pos.pos).scrollIntoView()); - return true; - } - if (!$pos.parent.canReplace(index, index + 1) || !(after.isTextblock || prosemirrorTransform.canJoin(state.doc, $pos.pos))) return false; - if (dispatch) dispatch(state.tr.join($pos.pos).scrollIntoView()); - return true; -} -function deleteBarrier(state, $cut, dispatch, dir) { - var before = $cut.nodeBefore, - after = $cut.nodeAfter, - conn, - match; - var isolated = before.type.spec.isolating || after.type.spec.isolating; - if (!isolated && joinMaybeClear(state, $cut, dispatch)) return true; - var canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1); - if (canDelAfter && (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match.matchType(conn[0] || after.type).validEnd) { - if (dispatch) { - var end = $cut.pos + after.nodeSize, - wrap = prosemirrorModel.Fragment.empty; - for (var i = conn.length - 1; i >= 0; i--) wrap = prosemirrorModel.Fragment.from(conn[i].create(null, wrap)); - wrap = prosemirrorModel.Fragment.from(before.copy(wrap)); - var tr = state.tr.step(new prosemirrorTransform.ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new prosemirrorModel.Slice(wrap, 1, 0), conn.length, true)); - var $joinAt = tr.doc.resolve(end + 2 * conn.length); - if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && prosemirrorTransform.canJoin(tr.doc, $joinAt.pos)) tr.join($joinAt.pos); - dispatch(tr.scrollIntoView()); - } - return true; - } - var selAfter = after.type.spec.isolating || dir > 0 && isolated ? null : prosemirrorState.Selection.findFrom($cut, 1); - var range = selAfter && selAfter.$from.blockRange(selAfter.$to), - target = range && prosemirrorTransform.liftTarget(range); - if (target != null && target >= $cut.depth) { - if (dispatch) dispatch(state.tr.lift(range, target).scrollIntoView()); - return true; - } - if (canDelAfter && textblockAt(after, "start", true) && textblockAt(before, "end")) { - var at = before, - _wrap = []; - for (;;) { - _wrap.push(at); - if (at.isTextblock) break; - at = at.lastChild; - } - var afterText = after, - afterDepth = 1; - for (; !afterText.isTextblock; afterText = afterText.firstChild) afterDepth++; - if (at.canReplace(at.childCount, at.childCount, afterText.content)) { - if (dispatch) { - var _end = prosemirrorModel.Fragment.empty; - for (var _i = _wrap.length - 1; _i >= 0; _i--) _end = prosemirrorModel.Fragment.from(_wrap[_i].copy(_end)); - var _tr = state.tr.step(new prosemirrorTransform.ReplaceAroundStep($cut.pos - _wrap.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new prosemirrorModel.Slice(_end, _wrap.length, 0), 0, true)); - dispatch(_tr.scrollIntoView()); - } - return true; - } - } - return false; -} -function selectTextblockSide(side) { - return function (state, dispatch) { - var sel = state.selection, - $pos = side < 0 ? sel.$from : sel.$to; - var depth = $pos.depth; - while ($pos.node(depth).isInline) { - if (!depth) return false; - depth--; - } - if (!$pos.node(depth).isTextblock) return false; - if (dispatch) dispatch(state.tr.setSelection(prosemirrorState.TextSelection.create(state.doc, side < 0 ? $pos.start(depth) : $pos.end(depth)))); - return true; - }; -} -var selectTextblockStart = selectTextblockSide(-1); -var selectTextblockEnd = selectTextblockSide(1); -function wrapIn(nodeType) { - var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - return function (state, dispatch) { - var _state$selection8 = state.selection, - $from = _state$selection8.$from, - $to = _state$selection8.$to; - var range = $from.blockRange($to), - wrapping = range && prosemirrorTransform.findWrapping(range, nodeType, attrs); - if (!wrapping) return false; - if (dispatch) dispatch(state.tr.wrap(range, wrapping).scrollIntoView()); - return true; - }; -} -function setBlockType(nodeType) { - var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - return function (state, dispatch) { - var applicable = false; - for (var i = 0; i < state.selection.ranges.length && !applicable; i++) { - var _state$selection$rang = state.selection.ranges[i], - from = _state$selection$rang.$from.pos, - to = _state$selection$rang.$to.pos; - state.doc.nodesBetween(from, to, function (node, pos) { - if (applicable) return false; - if (!node.isTextblock || node.hasMarkup(nodeType, attrs)) return; - if (node.type == nodeType) { - applicable = true; - } else { - var $pos = state.doc.resolve(pos), - index = $pos.index(); - applicable = $pos.parent.canReplaceWith(index, index + 1, nodeType); - } - }); - } - if (!applicable) return false; - if (dispatch) { - var tr = state.tr; - for (var _i2 = 0; _i2 < state.selection.ranges.length; _i2++) { - var _state$selection$rang2 = state.selection.ranges[_i2], - _from = _state$selection$rang2.$from.pos, - _to = _state$selection$rang2.$to.pos; - tr.setBlockType(_from, _to, nodeType, attrs); - } - dispatch(tr.scrollIntoView()); - } - return true; - }; -} -function markApplies(doc, ranges, type, enterAtoms) { - var _loop = function _loop() { - var _ranges$i = ranges[i], - $from = _ranges$i.$from, - $to = _ranges$i.$to; - var can = $from.depth == 0 ? doc.inlineContent && doc.type.allowsMarkType(type) : false; - doc.nodesBetween($from.pos, $to.pos, function (node, pos) { - if (can || !enterAtoms && node.isAtom && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos) return false; - can = node.inlineContent && node.type.allowsMarkType(type); - }); - if (can) return { - v: true - }; - }, - _ret; - for (var i = 0; i < ranges.length; i++) { - _ret = _loop(); - if (_ret) return _ret.v; - } - return false; -} -function removeInlineAtoms(ranges) { - var result = []; - var _loop2 = function _loop2() { - var _ranges$i2 = ranges[i], - $from = _ranges$i2.$from, - $to = _ranges$i2.$to; - $from.doc.nodesBetween($from.pos, $to.pos, function (node, pos) { - if (node.isAtom && node.content.size && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos) { - if (pos + 1 > $from.pos) result.push(new prosemirrorState.SelectionRange($from, $from.doc.resolve(pos + 1))); - $from = $from.doc.resolve(pos + 1 + node.content.size); - return false; - } - }); - if ($from.pos < $to.pos) result.push(new prosemirrorState.SelectionRange($from, $to)); - }; - for (var i = 0; i < ranges.length; i++) { - _loop2(); - } - return result; -} -function toggleMark(markType) { - var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - var options = arguments.length > 2 ? arguments[2] : undefined; - var removeWhenPresent = (options && options.removeWhenPresent) !== false; - var enterAtoms = (options && options.enterInlineAtoms) !== false; - var dropSpace = !(options && options.includeWhitespace); - return function (state, dispatch) { - var _state$selection9 = state.selection, - empty = _state$selection9.empty, - $cursor = _state$selection9.$cursor, - ranges = _state$selection9.ranges; - if (empty && !$cursor || !markApplies(state.doc, ranges, markType, enterAtoms)) return false; - if (dispatch) { - if ($cursor) { - if (markType.isInSet(state.storedMarks || $cursor.marks())) dispatch(state.tr.removeStoredMark(markType));else dispatch(state.tr.addStoredMark(markType.create(attrs))); - } else { - var add, - tr = state.tr; - if (!enterAtoms) ranges = removeInlineAtoms(ranges); - if (removeWhenPresent) { - add = !ranges.some(function (r) { - return state.doc.rangeHasMark(r.$from.pos, r.$to.pos, markType); - }); - } else { - add = !ranges.every(function (r) { - var missing = false; - tr.doc.nodesBetween(r.$from.pos, r.$to.pos, function (node, pos, parent) { - if (missing) return false; - missing = !markType.isInSet(node.marks) && !!parent && parent.type.allowsMarkType(markType) && !(node.isText && /^\s*$/.test(node.textBetween(Math.max(0, r.$from.pos - pos), Math.min(node.nodeSize, r.$to.pos - pos)))); - }); - return !missing; - }); - } - for (var i = 0; i < ranges.length; i++) { - var _ranges$i3 = ranges[i], - $from = _ranges$i3.$from, - $to = _ranges$i3.$to; - if (!add) { - tr.removeMark($from.pos, $to.pos, markType); - } else { - var from = $from.pos, - to = $to.pos, - start = $from.nodeAfter, - end = $to.nodeBefore; - var spaceStart = dropSpace && start && start.isText ? /^\s*/.exec(start.text)[0].length : 0; - var spaceEnd = dropSpace && end && end.isText ? /\s*$/.exec(end.text)[0].length : 0; - if (from + spaceStart < to) { - from += spaceStart; - to -= spaceEnd; - } - tr.addMark(from, to, markType.create(attrs)); - } - } - dispatch(tr.scrollIntoView()); - } - } - return true; - }; -} -function wrapDispatchForJoin(dispatch, isJoinable) { - return function (tr) { - if (!tr.isGeneric) return dispatch(tr); - var ranges = []; - for (var i = 0; i < tr.mapping.maps.length; i++) { - var map = tr.mapping.maps[i]; - for (var j = 0; j < ranges.length; j++) ranges[j] = map.map(ranges[j]); - map.forEach(function (_s, _e, from, to) { - return ranges.push(from, to); - }); - } - var joinable = []; - for (var _i3 = 0; _i3 < ranges.length; _i3 += 2) { - var from = ranges[_i3], - to = ranges[_i3 + 1]; - var $from = tr.doc.resolve(from), - depth = $from.sharedDepth(to), - parent = $from.node(depth); - for (var index = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index) { - var after = parent.maybeChild(index); - if (!after) break; - if (index && joinable.indexOf(pos) == -1) { - var before = parent.child(index - 1); - if (before.type == after.type && isJoinable(before, after)) joinable.push(pos); - } - pos += after.nodeSize; - } - } - joinable.sort(function (a, b) { - return a - b; - }); - for (var _i4 = joinable.length - 1; _i4 >= 0; _i4--) { - if (prosemirrorTransform.canJoin(tr.doc, joinable[_i4])) tr.join(joinable[_i4]); - } - dispatch(tr); - }; -} -function autoJoin(command, isJoinable) { - var canJoin = Array.isArray(isJoinable) ? function (node) { - return isJoinable.indexOf(node.type.name) > -1; - } : isJoinable; - return function (state, dispatch, view) { - return command(state, dispatch && wrapDispatchForJoin(dispatch, canJoin), view); - }; -} -function chainCommands() { - for (var _len = arguments.length, commands = new Array(_len), _key = 0; _key < _len; _key++) { - commands[_key] = arguments[_key]; - } - return function (state, dispatch, view) { - for (var i = 0; i < commands.length; i++) if (commands[i](state, dispatch, view)) return true; - return false; - }; -} -var backspace = chainCommands(deleteSelection, joinBackward, selectNodeBackward); -var del = chainCommands(deleteSelection, joinForward, selectNodeForward); -var pcBaseKeymap = { - "Enter": chainCommands(newlineInCode, createParagraphNear, liftEmptyBlock, splitBlock), - "Mod-Enter": exitCode, - "Backspace": backspace, - "Mod-Backspace": backspace, - "Shift-Backspace": backspace, - "Delete": del, - "Mod-Delete": del, - "Mod-a": selectAll -}; -var macBaseKeymap = { - "Ctrl-h": pcBaseKeymap["Backspace"], - "Alt-Backspace": pcBaseKeymap["Mod-Backspace"], - "Ctrl-d": pcBaseKeymap["Delete"], - "Ctrl-Alt-Backspace": pcBaseKeymap["Mod-Delete"], - "Alt-Delete": pcBaseKeymap["Mod-Delete"], - "Alt-d": pcBaseKeymap["Mod-Delete"], - "Ctrl-a": selectTextblockStart, - "Ctrl-e": selectTextblockEnd -}; -for (var key in pcBaseKeymap) macBaseKeymap[key] = pcBaseKeymap[key]; -var mac = typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os != "undefined" && os.platform ? os.platform() == "darwin" : false; -var baseKeymap = mac ? macBaseKeymap : pcBaseKeymap; -exports.autoJoin = autoJoin; -exports.baseKeymap = baseKeymap; -exports.chainCommands = chainCommands; -exports.createParagraphNear = createParagraphNear; -exports.deleteSelection = deleteSelection; -exports.exitCode = exitCode; -exports.joinBackward = joinBackward; -exports.joinDown = joinDown; -exports.joinForward = joinForward; -exports.joinTextblockBackward = joinTextblockBackward; -exports.joinTextblockForward = joinTextblockForward; -exports.joinUp = joinUp; -exports.lift = lift; -exports.liftEmptyBlock = liftEmptyBlock; -exports.macBaseKeymap = macBaseKeymap; -exports.newlineInCode = newlineInCode; -exports.pcBaseKeymap = pcBaseKeymap; -exports.selectAll = selectAll; -exports.selectNodeBackward = selectNodeBackward; -exports.selectNodeForward = selectNodeForward; -exports.selectParentNode = selectParentNode; -exports.selectTextblockEnd = selectTextblockEnd; -exports.selectTextblockStart = selectTextblockStart; -exports.setBlockType = setBlockType; -exports.splitBlock = splitBlock; -exports.splitBlockAs = splitBlockAs; -exports.splitBlockKeepMarks = splitBlockKeepMarks; -exports.toggleMark = toggleMark; -exports.wrapIn = wrapIn; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.d.cts deleted file mode 100644 index 6c204b6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.d.cts +++ /dev/null @@ -1,215 +0,0 @@ -import { Node, ResolvedPos, NodeType, Attrs, MarkType } from 'prosemirror-model'; -import { Command } from 'prosemirror-state'; - -/** -Delete the selection, if there is one. -*/ -declare const deleteSelection: Command; -/** -If the selection is empty and at the start of a textblock, try to -reduce the distance between that block and the one before it—if -there's a block directly before it that can be joined, join them. -If not, try to move the selected block closer to the next one in -the document structure by lifting it out of its parent or moving it -into a parent of the previous block. Will use the view for accurate -(bidi-aware) start-of-textblock detection if given. -*/ -declare const joinBackward: Command; -/** -A more limited form of [`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward) -that only tries to join the current textblock to the one before -it, if the cursor is at the start of a textblock. -*/ -declare const joinTextblockBackward: Command; -/** -A more limited form of [`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward) -that only tries to join the current textblock to the one after -it, if the cursor is at the end of a textblock. -*/ -declare const joinTextblockForward: Command; -/** -When the selection is empty and at the start of a textblock, select -the node before that textblock, if possible. This is intended to be -bound to keys like backspace, after -[`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward) or other deleting -commands, as a fall-back behavior when the schema doesn't allow -deletion at the selected point. -*/ -declare const selectNodeBackward: Command; -/** -If the selection is empty and the cursor is at the end of a -textblock, try to reduce or remove the boundary between that block -and the one after it, either by joining them or by moving the other -block closer to this one in the tree structure. Will use the view -for accurate start-of-textblock detection if given. -*/ -declare const joinForward: Command; -/** -When the selection is empty and at the end of a textblock, select -the node coming after that textblock, if possible. This is intended -to be bound to keys like delete, after -[`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward) and similar deleting -commands, to provide a fall-back behavior when the schema doesn't -allow deletion at the selected point. -*/ -declare const selectNodeForward: Command; -/** -Join the selected block or, if there is a text selection, the -closest ancestor block of the selection that can be joined, with -the sibling above it. -*/ -declare const joinUp: Command; -/** -Join the selected block, or the closest ancestor of the selection -that can be joined, with the sibling after it. -*/ -declare const joinDown: Command; -/** -Lift the selected block, or the closest ancestor block of the -selection that can be lifted, out of its parent node. -*/ -declare const lift: Command; -/** -If the selection is in a node whose type has a truthy -[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, replace the -selection with a newline character. -*/ -declare const newlineInCode: Command; -/** -When the selection is in a node with a truthy -[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, create a -default block after the code block, and move the cursor there. -*/ -declare const exitCode: Command; -/** -If a block node is selected, create an empty paragraph before (if -it is its parent's first child) or after it. -*/ -declare const createParagraphNear: Command; -/** -If the cursor is in an empty textblock that can be lifted, lift the -block. -*/ -declare const liftEmptyBlock: Command; -/** -Create a variant of [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock) that uses -a custom function to determine the type of the newly split off block. -*/ -declare function splitBlockAs(splitNode?: (node: Node, atEnd: boolean, $from: ResolvedPos) => { - type: NodeType; - attrs?: Attrs; -} | null): Command; -/** -Split the parent block of the selection. If the selection is a text -selection, also delete its content. -*/ -declare const splitBlock: Command; -/** -Acts like [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock), but without -resetting the set of active marks at the cursor. -*/ -declare const splitBlockKeepMarks: Command; -/** -Move the selection to the node wrapping the current selection, if -any. (Will not select the document node.) -*/ -declare const selectParentNode: Command; -/** -Select the whole document. -*/ -declare const selectAll: Command; -/** -Moves the cursor to the start of current text block. -*/ -declare const selectTextblockStart: Command; -/** -Moves the cursor to the end of current text block. -*/ -declare const selectTextblockEnd: Command; -/** -Wrap the selection in a node of the given type with the given -attributes. -*/ -declare function wrapIn(nodeType: NodeType, attrs?: Attrs | null): Command; -/** -Returns a command that tries to set the selected textblocks to the -given node type with the given attributes. -*/ -declare function setBlockType(nodeType: NodeType, attrs?: Attrs | null): Command; -/** -Create a command function that toggles the given mark with the -given attributes. Will return `false` when the current selection -doesn't support that mark. This will remove the mark if any marks -of that type exist in the selection, or add it otherwise. If the -selection is empty, this applies to the [stored -marks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks) instead of a range of the -document. -*/ -declare function toggleMark(markType: MarkType, attrs?: Attrs | null, options?: { - /** - Controls whether, when part of the selected range has the mark - already and part doesn't, the mark is removed (`true`, the - default) or added (`false`). - */ - removeWhenPresent?: boolean; - /** - When set to false, this will prevent the command from acting on - the content of inline nodes marked as - [atoms](https://prosemirror.net/docs/ref/#model.NodeSpec.atom) that are completely covered by a - selection range. - */ - enterInlineAtoms?: boolean; - /** - By default, this command doesn't apply to leading and trailing - whitespace in the selection. Set this to `true` to change that. - */ - includeWhitespace?: boolean; -}): Command; -/** -Wrap a command so that, when it produces a transform that causes -two joinable nodes to end up next to each other, those are joined. -Nodes are considered joinable when they are of the same type and -when the `isJoinable` predicate returns true for them or, if an -array of strings was passed, if their node type name is in that -array. -*/ -declare function autoJoin(command: Command, isJoinable: ((before: Node, after: Node) => boolean) | readonly string[]): Command; -/** -Combine a number of command functions into a single function (which -calls them one by one until one returns true). -*/ -declare function chainCommands(...commands: readonly Command[]): Command; -/** -A basic keymap containing bindings not specific to any schema. -Binds the following keys (when multiple commands are listed, they -are chained with [`chainCommands`](https://prosemirror.net/docs/ref/#commands.chainCommands)): - -* **Enter** to `newlineInCode`, `createParagraphNear`, `liftEmptyBlock`, `splitBlock` -* **Mod-Enter** to `exitCode` -* **Backspace** and **Mod-Backspace** to `deleteSelection`, `joinBackward`, `selectNodeBackward` -* **Delete** and **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward` -* **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward` -* **Mod-a** to `selectAll` -*/ -declare const pcBaseKeymap: { - [key: string]: Command; -}; -/** -A copy of `pcBaseKeymap` that also binds **Ctrl-h** like Backspace, -**Ctrl-d** like Delete, **Alt-Backspace** like Ctrl-Backspace, and -**Ctrl-Alt-Backspace**, **Alt-Delete**, and **Alt-d** like -Ctrl-Delete. -*/ -declare const macBaseKeymap: { - [key: string]: Command; -}; -/** -Depending on the detected platform, this will hold -[`pcBasekeymap`](https://prosemirror.net/docs/ref/#commands.pcBaseKeymap) or -[`macBaseKeymap`](https://prosemirror.net/docs/ref/#commands.macBaseKeymap). -*/ -declare const baseKeymap: { - [key: string]: Command; -}; - -export { autoJoin, baseKeymap, chainCommands, createParagraphNear, deleteSelection, exitCode, joinBackward, joinDown, joinForward, joinTextblockBackward, joinTextblockForward, joinUp, lift, liftEmptyBlock, macBaseKeymap, newlineInCode, pcBaseKeymap, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, selectTextblockEnd, selectTextblockStart, setBlockType, splitBlock, splitBlockAs, splitBlockKeepMarks, toggleMark, wrapIn }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.d.ts deleted file mode 100644 index 6c204b6..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.d.ts +++ /dev/null @@ -1,215 +0,0 @@ -import { Node, ResolvedPos, NodeType, Attrs, MarkType } from 'prosemirror-model'; -import { Command } from 'prosemirror-state'; - -/** -Delete the selection, if there is one. -*/ -declare const deleteSelection: Command; -/** -If the selection is empty and at the start of a textblock, try to -reduce the distance between that block and the one before it—if -there's a block directly before it that can be joined, join them. -If not, try to move the selected block closer to the next one in -the document structure by lifting it out of its parent or moving it -into a parent of the previous block. Will use the view for accurate -(bidi-aware) start-of-textblock detection if given. -*/ -declare const joinBackward: Command; -/** -A more limited form of [`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward) -that only tries to join the current textblock to the one before -it, if the cursor is at the start of a textblock. -*/ -declare const joinTextblockBackward: Command; -/** -A more limited form of [`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward) -that only tries to join the current textblock to the one after -it, if the cursor is at the end of a textblock. -*/ -declare const joinTextblockForward: Command; -/** -When the selection is empty and at the start of a textblock, select -the node before that textblock, if possible. This is intended to be -bound to keys like backspace, after -[`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward) or other deleting -commands, as a fall-back behavior when the schema doesn't allow -deletion at the selected point. -*/ -declare const selectNodeBackward: Command; -/** -If the selection is empty and the cursor is at the end of a -textblock, try to reduce or remove the boundary between that block -and the one after it, either by joining them or by moving the other -block closer to this one in the tree structure. Will use the view -for accurate start-of-textblock detection if given. -*/ -declare const joinForward: Command; -/** -When the selection is empty and at the end of a textblock, select -the node coming after that textblock, if possible. This is intended -to be bound to keys like delete, after -[`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward) and similar deleting -commands, to provide a fall-back behavior when the schema doesn't -allow deletion at the selected point. -*/ -declare const selectNodeForward: Command; -/** -Join the selected block or, if there is a text selection, the -closest ancestor block of the selection that can be joined, with -the sibling above it. -*/ -declare const joinUp: Command; -/** -Join the selected block, or the closest ancestor of the selection -that can be joined, with the sibling after it. -*/ -declare const joinDown: Command; -/** -Lift the selected block, or the closest ancestor block of the -selection that can be lifted, out of its parent node. -*/ -declare const lift: Command; -/** -If the selection is in a node whose type has a truthy -[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, replace the -selection with a newline character. -*/ -declare const newlineInCode: Command; -/** -When the selection is in a node with a truthy -[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, create a -default block after the code block, and move the cursor there. -*/ -declare const exitCode: Command; -/** -If a block node is selected, create an empty paragraph before (if -it is its parent's first child) or after it. -*/ -declare const createParagraphNear: Command; -/** -If the cursor is in an empty textblock that can be lifted, lift the -block. -*/ -declare const liftEmptyBlock: Command; -/** -Create a variant of [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock) that uses -a custom function to determine the type of the newly split off block. -*/ -declare function splitBlockAs(splitNode?: (node: Node, atEnd: boolean, $from: ResolvedPos) => { - type: NodeType; - attrs?: Attrs; -} | null): Command; -/** -Split the parent block of the selection. If the selection is a text -selection, also delete its content. -*/ -declare const splitBlock: Command; -/** -Acts like [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock), but without -resetting the set of active marks at the cursor. -*/ -declare const splitBlockKeepMarks: Command; -/** -Move the selection to the node wrapping the current selection, if -any. (Will not select the document node.) -*/ -declare const selectParentNode: Command; -/** -Select the whole document. -*/ -declare const selectAll: Command; -/** -Moves the cursor to the start of current text block. -*/ -declare const selectTextblockStart: Command; -/** -Moves the cursor to the end of current text block. -*/ -declare const selectTextblockEnd: Command; -/** -Wrap the selection in a node of the given type with the given -attributes. -*/ -declare function wrapIn(nodeType: NodeType, attrs?: Attrs | null): Command; -/** -Returns a command that tries to set the selected textblocks to the -given node type with the given attributes. -*/ -declare function setBlockType(nodeType: NodeType, attrs?: Attrs | null): Command; -/** -Create a command function that toggles the given mark with the -given attributes. Will return `false` when the current selection -doesn't support that mark. This will remove the mark if any marks -of that type exist in the selection, or add it otherwise. If the -selection is empty, this applies to the [stored -marks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks) instead of a range of the -document. -*/ -declare function toggleMark(markType: MarkType, attrs?: Attrs | null, options?: { - /** - Controls whether, when part of the selected range has the mark - already and part doesn't, the mark is removed (`true`, the - default) or added (`false`). - */ - removeWhenPresent?: boolean; - /** - When set to false, this will prevent the command from acting on - the content of inline nodes marked as - [atoms](https://prosemirror.net/docs/ref/#model.NodeSpec.atom) that are completely covered by a - selection range. - */ - enterInlineAtoms?: boolean; - /** - By default, this command doesn't apply to leading and trailing - whitespace in the selection. Set this to `true` to change that. - */ - includeWhitespace?: boolean; -}): Command; -/** -Wrap a command so that, when it produces a transform that causes -two joinable nodes to end up next to each other, those are joined. -Nodes are considered joinable when they are of the same type and -when the `isJoinable` predicate returns true for them or, if an -array of strings was passed, if their node type name is in that -array. -*/ -declare function autoJoin(command: Command, isJoinable: ((before: Node, after: Node) => boolean) | readonly string[]): Command; -/** -Combine a number of command functions into a single function (which -calls them one by one until one returns true). -*/ -declare function chainCommands(...commands: readonly Command[]): Command; -/** -A basic keymap containing bindings not specific to any schema. -Binds the following keys (when multiple commands are listed, they -are chained with [`chainCommands`](https://prosemirror.net/docs/ref/#commands.chainCommands)): - -* **Enter** to `newlineInCode`, `createParagraphNear`, `liftEmptyBlock`, `splitBlock` -* **Mod-Enter** to `exitCode` -* **Backspace** and **Mod-Backspace** to `deleteSelection`, `joinBackward`, `selectNodeBackward` -* **Delete** and **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward` -* **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward` -* **Mod-a** to `selectAll` -*/ -declare const pcBaseKeymap: { - [key: string]: Command; -}; -/** -A copy of `pcBaseKeymap` that also binds **Ctrl-h** like Backspace, -**Ctrl-d** like Delete, **Alt-Backspace** like Ctrl-Backspace, and -**Ctrl-Alt-Backspace**, **Alt-Delete**, and **Alt-d** like -Ctrl-Delete. -*/ -declare const macBaseKeymap: { - [key: string]: Command; -}; -/** -Depending on the detected platform, this will hold -[`pcBasekeymap`](https://prosemirror.net/docs/ref/#commands.pcBaseKeymap) or -[`macBaseKeymap`](https://prosemirror.net/docs/ref/#commands.macBaseKeymap). -*/ -declare const baseKeymap: { - [key: string]: Command; -}; - -export { autoJoin, baseKeymap, chainCommands, createParagraphNear, deleteSelection, exitCode, joinBackward, joinDown, joinForward, joinTextblockBackward, joinTextblockForward, joinUp, lift, liftEmptyBlock, macBaseKeymap, newlineInCode, pcBaseKeymap, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, selectTextblockEnd, selectTextblockStart, setBlockType, splitBlock, splitBlockAs, splitBlockKeepMarks, toggleMark, wrapIn }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.js b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.js deleted file mode 100644 index d546412..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/dist/index.js +++ /dev/null @@ -1,850 +0,0 @@ -import { liftTarget, replaceStep, ReplaceStep, canJoin, joinPoint, canSplit, ReplaceAroundStep, findWrapping } from 'prosemirror-transform'; -import { Slice, Fragment } from 'prosemirror-model'; -import { NodeSelection, Selection, TextSelection, AllSelection, SelectionRange } from 'prosemirror-state'; - -/** -Delete the selection, if there is one. -*/ -const deleteSelection = (state, dispatch) => { - if (state.selection.empty) - return false; - if (dispatch) - dispatch(state.tr.deleteSelection().scrollIntoView()); - return true; -}; -function atBlockStart(state, view) { - let { $cursor } = state.selection; - if (!$cursor || (view ? !view.endOfTextblock("backward", state) - : $cursor.parentOffset > 0)) - return null; - return $cursor; -} -/** -If the selection is empty and at the start of a textblock, try to -reduce the distance between that block and the one before it—if -there's a block directly before it that can be joined, join them. -If not, try to move the selected block closer to the next one in -the document structure by lifting it out of its parent or moving it -into a parent of the previous block. Will use the view for accurate -(bidi-aware) start-of-textblock detection if given. -*/ -const joinBackward = (state, dispatch, view) => { - let $cursor = atBlockStart(state, view); - if (!$cursor) - return false; - let $cut = findCutBefore($cursor); - // If there is no node before this, try to lift - if (!$cut) { - let range = $cursor.blockRange(), target = range && liftTarget(range); - if (target == null) - return false; - if (dispatch) - dispatch(state.tr.lift(range, target).scrollIntoView()); - return true; - } - let before = $cut.nodeBefore; - // Apply the joining algorithm - if (deleteBarrier(state, $cut, dispatch, -1)) - return true; - // If the node below has no content and the node above is - // selectable, delete the node below and select the one above. - if ($cursor.parent.content.size == 0 && - (textblockAt(before, "end") || NodeSelection.isSelectable(before))) { - for (let depth = $cursor.depth;; depth--) { - let delStep = replaceStep(state.doc, $cursor.before(depth), $cursor.after(depth), Slice.empty); - if (delStep && delStep.slice.size < delStep.to - delStep.from) { - if (dispatch) { - let tr = state.tr.step(delStep); - tr.setSelection(textblockAt(before, "end") - ? Selection.findFrom(tr.doc.resolve(tr.mapping.map($cut.pos, -1)), -1) - : NodeSelection.create(tr.doc, $cut.pos - before.nodeSize)); - dispatch(tr.scrollIntoView()); - } - return true; - } - if (depth == 1 || $cursor.node(depth - 1).childCount > 1) - break; - } - } - // If the node before is an atom, delete it - if (before.isAtom && $cut.depth == $cursor.depth - 1) { - if (dispatch) - dispatch(state.tr.delete($cut.pos - before.nodeSize, $cut.pos).scrollIntoView()); - return true; - } - return false; -}; -/** -A more limited form of [`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward) -that only tries to join the current textblock to the one before -it, if the cursor is at the start of a textblock. -*/ -const joinTextblockBackward = (state, dispatch, view) => { - let $cursor = atBlockStart(state, view); - if (!$cursor) - return false; - let $cut = findCutBefore($cursor); - return $cut ? joinTextblocksAround(state, $cut, dispatch) : false; -}; -/** -A more limited form of [`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward) -that only tries to join the current textblock to the one after -it, if the cursor is at the end of a textblock. -*/ -const joinTextblockForward = (state, dispatch, view) => { - let $cursor = atBlockEnd(state, view); - if (!$cursor) - return false; - let $cut = findCutAfter($cursor); - return $cut ? joinTextblocksAround(state, $cut, dispatch) : false; -}; -function joinTextblocksAround(state, $cut, dispatch) { - let before = $cut.nodeBefore, beforeText = before, beforePos = $cut.pos - 1; - for (; !beforeText.isTextblock; beforePos--) { - if (beforeText.type.spec.isolating) - return false; - let child = beforeText.lastChild; - if (!child) - return false; - beforeText = child; - } - let after = $cut.nodeAfter, afterText = after, afterPos = $cut.pos + 1; - for (; !afterText.isTextblock; afterPos++) { - if (afterText.type.spec.isolating) - return false; - let child = afterText.firstChild; - if (!child) - return false; - afterText = child; - } - let step = replaceStep(state.doc, beforePos, afterPos, Slice.empty); - if (!step || step.from != beforePos || - step instanceof ReplaceStep && step.slice.size >= afterPos - beforePos) - return false; - if (dispatch) { - let tr = state.tr.step(step); - tr.setSelection(TextSelection.create(tr.doc, beforePos)); - dispatch(tr.scrollIntoView()); - } - return true; -} -function textblockAt(node, side, only = false) { - for (let scan = node; scan; scan = (side == "start" ? scan.firstChild : scan.lastChild)) { - if (scan.isTextblock) - return true; - if (only && scan.childCount != 1) - return false; - } - return false; -} -/** -When the selection is empty and at the start of a textblock, select -the node before that textblock, if possible. This is intended to be -bound to keys like backspace, after -[`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward) or other deleting -commands, as a fall-back behavior when the schema doesn't allow -deletion at the selected point. -*/ -const selectNodeBackward = (state, dispatch, view) => { - let { $head, empty } = state.selection, $cut = $head; - if (!empty) - return false; - if ($head.parent.isTextblock) { - if (view ? !view.endOfTextblock("backward", state) : $head.parentOffset > 0) - return false; - $cut = findCutBefore($head); - } - let node = $cut && $cut.nodeBefore; - if (!node || !NodeSelection.isSelectable(node)) - return false; - if (dispatch) - dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut.pos - node.nodeSize)).scrollIntoView()); - return true; -}; -function findCutBefore($pos) { - if (!$pos.parent.type.spec.isolating) - for (let i = $pos.depth - 1; i >= 0; i--) { - if ($pos.index(i) > 0) - return $pos.doc.resolve($pos.before(i + 1)); - if ($pos.node(i).type.spec.isolating) - break; - } - return null; -} -function atBlockEnd(state, view) { - let { $cursor } = state.selection; - if (!$cursor || (view ? !view.endOfTextblock("forward", state) - : $cursor.parentOffset < $cursor.parent.content.size)) - return null; - return $cursor; -} -/** -If the selection is empty and the cursor is at the end of a -textblock, try to reduce or remove the boundary between that block -and the one after it, either by joining them or by moving the other -block closer to this one in the tree structure. Will use the view -for accurate start-of-textblock detection if given. -*/ -const joinForward = (state, dispatch, view) => { - let $cursor = atBlockEnd(state, view); - if (!$cursor) - return false; - let $cut = findCutAfter($cursor); - // If there is no node after this, there's nothing to do - if (!$cut) - return false; - let after = $cut.nodeAfter; - // Try the joining algorithm - if (deleteBarrier(state, $cut, dispatch, 1)) - return true; - // If the node above has no content and the node below is - // selectable, delete the node above and select the one below. - if ($cursor.parent.content.size == 0 && - (textblockAt(after, "start") || NodeSelection.isSelectable(after))) { - let delStep = replaceStep(state.doc, $cursor.before(), $cursor.after(), Slice.empty); - if (delStep && delStep.slice.size < delStep.to - delStep.from) { - if (dispatch) { - let tr = state.tr.step(delStep); - tr.setSelection(textblockAt(after, "start") ? Selection.findFrom(tr.doc.resolve(tr.mapping.map($cut.pos)), 1) - : NodeSelection.create(tr.doc, tr.mapping.map($cut.pos))); - dispatch(tr.scrollIntoView()); - } - return true; - } - } - // If the next node is an atom, delete it - if (after.isAtom && $cut.depth == $cursor.depth - 1) { - if (dispatch) - dispatch(state.tr.delete($cut.pos, $cut.pos + after.nodeSize).scrollIntoView()); - return true; - } - return false; -}; -/** -When the selection is empty and at the end of a textblock, select -the node coming after that textblock, if possible. This is intended -to be bound to keys like delete, after -[`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward) and similar deleting -commands, to provide a fall-back behavior when the schema doesn't -allow deletion at the selected point. -*/ -const selectNodeForward = (state, dispatch, view) => { - let { $head, empty } = state.selection, $cut = $head; - if (!empty) - return false; - if ($head.parent.isTextblock) { - if (view ? !view.endOfTextblock("forward", state) : $head.parentOffset < $head.parent.content.size) - return false; - $cut = findCutAfter($head); - } - let node = $cut && $cut.nodeAfter; - if (!node || !NodeSelection.isSelectable(node)) - return false; - if (dispatch) - dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut.pos)).scrollIntoView()); - return true; -}; -function findCutAfter($pos) { - if (!$pos.parent.type.spec.isolating) - for (let i = $pos.depth - 1; i >= 0; i--) { - let parent = $pos.node(i); - if ($pos.index(i) + 1 < parent.childCount) - return $pos.doc.resolve($pos.after(i + 1)); - if (parent.type.spec.isolating) - break; - } - return null; -} -/** -Join the selected block or, if there is a text selection, the -closest ancestor block of the selection that can be joined, with -the sibling above it. -*/ -const joinUp = (state, dispatch) => { - let sel = state.selection, nodeSel = sel instanceof NodeSelection, point; - if (nodeSel) { - if (sel.node.isTextblock || !canJoin(state.doc, sel.from)) - return false; - point = sel.from; - } - else { - point = joinPoint(state.doc, sel.from, -1); - if (point == null) - return false; - } - if (dispatch) { - let tr = state.tr.join(point); - if (nodeSel) - tr.setSelection(NodeSelection.create(tr.doc, point - state.doc.resolve(point).nodeBefore.nodeSize)); - dispatch(tr.scrollIntoView()); - } - return true; -}; -/** -Join the selected block, or the closest ancestor of the selection -that can be joined, with the sibling after it. -*/ -const joinDown = (state, dispatch) => { - let sel = state.selection, point; - if (sel instanceof NodeSelection) { - if (sel.node.isTextblock || !canJoin(state.doc, sel.to)) - return false; - point = sel.to; - } - else { - point = joinPoint(state.doc, sel.to, 1); - if (point == null) - return false; - } - if (dispatch) - dispatch(state.tr.join(point).scrollIntoView()); - return true; -}; -/** -Lift the selected block, or the closest ancestor block of the -selection that can be lifted, out of its parent node. -*/ -const lift = (state, dispatch) => { - let { $from, $to } = state.selection; - let range = $from.blockRange($to), target = range && liftTarget(range); - if (target == null) - return false; - if (dispatch) - dispatch(state.tr.lift(range, target).scrollIntoView()); - return true; -}; -/** -If the selection is in a node whose type has a truthy -[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, replace the -selection with a newline character. -*/ -const newlineInCode = (state, dispatch) => { - let { $head, $anchor } = state.selection; - if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) - return false; - if (dispatch) - dispatch(state.tr.insertText("\n").scrollIntoView()); - return true; -}; -function defaultBlockAt(match) { - for (let i = 0; i < match.edgeCount; i++) { - let { type } = match.edge(i); - if (type.isTextblock && !type.hasRequiredAttrs()) - return type; - } - return null; -} -/** -When the selection is in a node with a truthy -[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, create a -default block after the code block, and move the cursor there. -*/ -const exitCode = (state, dispatch) => { - let { $head, $anchor } = state.selection; - if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) - return false; - let above = $head.node(-1), after = $head.indexAfter(-1), type = defaultBlockAt(above.contentMatchAt(after)); - if (!type || !above.canReplaceWith(after, after, type)) - return false; - if (dispatch) { - let pos = $head.after(), tr = state.tr.replaceWith(pos, pos, type.createAndFill()); - tr.setSelection(Selection.near(tr.doc.resolve(pos), 1)); - dispatch(tr.scrollIntoView()); - } - return true; -}; -/** -If a block node is selected, create an empty paragraph before (if -it is its parent's first child) or after it. -*/ -const createParagraphNear = (state, dispatch) => { - let sel = state.selection, { $from, $to } = sel; - if (sel instanceof AllSelection || $from.parent.inlineContent || $to.parent.inlineContent) - return false; - let type = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter())); - if (!type || !type.isTextblock) - return false; - if (dispatch) { - let side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos; - let tr = state.tr.insert(side, type.createAndFill()); - tr.setSelection(TextSelection.create(tr.doc, side + 1)); - dispatch(tr.scrollIntoView()); - } - return true; -}; -/** -If the cursor is in an empty textblock that can be lifted, lift the -block. -*/ -const liftEmptyBlock = (state, dispatch) => { - let { $cursor } = state.selection; - if (!$cursor || $cursor.parent.content.size) - return false; - if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) { - let before = $cursor.before(); - if (canSplit(state.doc, before)) { - if (dispatch) - dispatch(state.tr.split(before).scrollIntoView()); - return true; - } - } - let range = $cursor.blockRange(), target = range && liftTarget(range); - if (target == null) - return false; - if (dispatch) - dispatch(state.tr.lift(range, target).scrollIntoView()); - return true; -}; -/** -Create a variant of [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock) that uses -a custom function to determine the type of the newly split off block. -*/ -function splitBlockAs(splitNode) { - return (state, dispatch) => { - let { $from, $to } = state.selection; - if (state.selection instanceof NodeSelection && state.selection.node.isBlock) { - if (!$from.parentOffset || !canSplit(state.doc, $from.pos)) - return false; - if (dispatch) - dispatch(state.tr.split($from.pos).scrollIntoView()); - return true; - } - if (!$from.depth) - return false; - let types = []; - let splitDepth, deflt, atEnd = false, atStart = false; - for (let d = $from.depth;; d--) { - let node = $from.node(d); - if (node.isBlock) { - atEnd = $from.end(d) == $from.pos + ($from.depth - d); - atStart = $from.start(d) == $from.pos - ($from.depth - d); - deflt = defaultBlockAt($from.node(d - 1).contentMatchAt($from.indexAfter(d - 1))); - let splitType = splitNode && splitNode($to.parent, atEnd, $from); - types.unshift(splitType || (atEnd && deflt ? { type: deflt } : null)); - splitDepth = d; - break; - } - else { - if (d == 1) - return false; - types.unshift(null); - } - } - let tr = state.tr; - if (state.selection instanceof TextSelection || state.selection instanceof AllSelection) - tr.deleteSelection(); - let splitPos = tr.mapping.map($from.pos); - let can = canSplit(tr.doc, splitPos, types.length, types); - if (!can) { - types[0] = deflt ? { type: deflt } : null; - can = canSplit(tr.doc, splitPos, types.length, types); - } - if (!can) - return false; - tr.split(splitPos, types.length, types); - if (!atEnd && atStart && $from.node(splitDepth).type != deflt) { - let first = tr.mapping.map($from.before(splitDepth)), $first = tr.doc.resolve(first); - if (deflt && $from.node(splitDepth - 1).canReplaceWith($first.index(), $first.index() + 1, deflt)) - tr.setNodeMarkup(tr.mapping.map($from.before(splitDepth)), deflt); - } - if (dispatch) - dispatch(tr.scrollIntoView()); - return true; - }; -} -/** -Split the parent block of the selection. If the selection is a text -selection, also delete its content. -*/ -const splitBlock = splitBlockAs(); -/** -Acts like [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock), but without -resetting the set of active marks at the cursor. -*/ -const splitBlockKeepMarks = (state, dispatch) => { - return splitBlock(state, dispatch && (tr => { - let marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks()); - if (marks) - tr.ensureMarks(marks); - dispatch(tr); - })); -}; -/** -Move the selection to the node wrapping the current selection, if -any. (Will not select the document node.) -*/ -const selectParentNode = (state, dispatch) => { - let { $from, to } = state.selection, pos; - let same = $from.sharedDepth(to); - if (same == 0) - return false; - pos = $from.before(same); - if (dispatch) - dispatch(state.tr.setSelection(NodeSelection.create(state.doc, pos))); - return true; -}; -/** -Select the whole document. -*/ -const selectAll = (state, dispatch) => { - if (dispatch) - dispatch(state.tr.setSelection(new AllSelection(state.doc))); - return true; -}; -function joinMaybeClear(state, $pos, dispatch) { - let before = $pos.nodeBefore, after = $pos.nodeAfter, index = $pos.index(); - if (!before || !after || !before.type.compatibleContent(after.type)) - return false; - if (!before.content.size && $pos.parent.canReplace(index - 1, index)) { - if (dispatch) - dispatch(state.tr.delete($pos.pos - before.nodeSize, $pos.pos).scrollIntoView()); - return true; - } - if (!$pos.parent.canReplace(index, index + 1) || !(after.isTextblock || canJoin(state.doc, $pos.pos))) - return false; - if (dispatch) - dispatch(state.tr.join($pos.pos).scrollIntoView()); - return true; -} -function deleteBarrier(state, $cut, dispatch, dir) { - let before = $cut.nodeBefore, after = $cut.nodeAfter, conn, match; - let isolated = before.type.spec.isolating || after.type.spec.isolating; - if (!isolated && joinMaybeClear(state, $cut, dispatch)) - return true; - let canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1); - if (canDelAfter && - (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && - match.matchType(conn[0] || after.type).validEnd) { - if (dispatch) { - let end = $cut.pos + after.nodeSize, wrap = Fragment.empty; - for (let i = conn.length - 1; i >= 0; i--) - wrap = Fragment.from(conn[i].create(null, wrap)); - wrap = Fragment.from(before.copy(wrap)); - let tr = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap, 1, 0), conn.length, true)); - let $joinAt = tr.doc.resolve(end + 2 * conn.length); - if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && - canJoin(tr.doc, $joinAt.pos)) - tr.join($joinAt.pos); - dispatch(tr.scrollIntoView()); - } - return true; - } - let selAfter = after.type.spec.isolating || (dir > 0 && isolated) ? null : Selection.findFrom($cut, 1); - let range = selAfter && selAfter.$from.blockRange(selAfter.$to), target = range && liftTarget(range); - if (target != null && target >= $cut.depth) { - if (dispatch) - dispatch(state.tr.lift(range, target).scrollIntoView()); - return true; - } - if (canDelAfter && textblockAt(after, "start", true) && textblockAt(before, "end")) { - let at = before, wrap = []; - for (;;) { - wrap.push(at); - if (at.isTextblock) - break; - at = at.lastChild; - } - let afterText = after, afterDepth = 1; - for (; !afterText.isTextblock; afterText = afterText.firstChild) - afterDepth++; - if (at.canReplace(at.childCount, at.childCount, afterText.content)) { - if (dispatch) { - let end = Fragment.empty; - for (let i = wrap.length - 1; i >= 0; i--) - end = Fragment.from(wrap[i].copy(end)); - let tr = state.tr.step(new ReplaceAroundStep($cut.pos - wrap.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end, wrap.length, 0), 0, true)); - dispatch(tr.scrollIntoView()); - } - return true; - } - } - return false; -} -function selectTextblockSide(side) { - return function (state, dispatch) { - let sel = state.selection, $pos = side < 0 ? sel.$from : sel.$to; - let depth = $pos.depth; - while ($pos.node(depth).isInline) { - if (!depth) - return false; - depth--; - } - if (!$pos.node(depth).isTextblock) - return false; - if (dispatch) - dispatch(state.tr.setSelection(TextSelection.create(state.doc, side < 0 ? $pos.start(depth) : $pos.end(depth)))); - return true; - }; -} -/** -Moves the cursor to the start of current text block. -*/ -const selectTextblockStart = selectTextblockSide(-1); -/** -Moves the cursor to the end of current text block. -*/ -const selectTextblockEnd = selectTextblockSide(1); -// Parameterized commands -/** -Wrap the selection in a node of the given type with the given -attributes. -*/ -function wrapIn(nodeType, attrs = null) { - return function (state, dispatch) { - let { $from, $to } = state.selection; - let range = $from.blockRange($to), wrapping = range && findWrapping(range, nodeType, attrs); - if (!wrapping) - return false; - if (dispatch) - dispatch(state.tr.wrap(range, wrapping).scrollIntoView()); - return true; - }; -} -/** -Returns a command that tries to set the selected textblocks to the -given node type with the given attributes. -*/ -function setBlockType(nodeType, attrs = null) { - return function (state, dispatch) { - let applicable = false; - for (let i = 0; i < state.selection.ranges.length && !applicable; i++) { - let { $from: { pos: from }, $to: { pos: to } } = state.selection.ranges[i]; - state.doc.nodesBetween(from, to, (node, pos) => { - if (applicable) - return false; - if (!node.isTextblock || node.hasMarkup(nodeType, attrs)) - return; - if (node.type == nodeType) { - applicable = true; - } - else { - let $pos = state.doc.resolve(pos), index = $pos.index(); - applicable = $pos.parent.canReplaceWith(index, index + 1, nodeType); - } - }); - } - if (!applicable) - return false; - if (dispatch) { - let tr = state.tr; - for (let i = 0; i < state.selection.ranges.length; i++) { - let { $from: { pos: from }, $to: { pos: to } } = state.selection.ranges[i]; - tr.setBlockType(from, to, nodeType, attrs); - } - dispatch(tr.scrollIntoView()); - } - return true; - }; -} -function markApplies(doc, ranges, type, enterAtoms) { - for (let i = 0; i < ranges.length; i++) { - let { $from, $to } = ranges[i]; - let can = $from.depth == 0 ? doc.inlineContent && doc.type.allowsMarkType(type) : false; - doc.nodesBetween($from.pos, $to.pos, (node, pos) => { - if (can || !enterAtoms && node.isAtom && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos) - return false; - can = node.inlineContent && node.type.allowsMarkType(type); - }); - if (can) - return true; - } - return false; -} -function removeInlineAtoms(ranges) { - let result = []; - for (let i = 0; i < ranges.length; i++) { - let { $from, $to } = ranges[i]; - $from.doc.nodesBetween($from.pos, $to.pos, (node, pos) => { - if (node.isAtom && node.content.size && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos) { - if (pos + 1 > $from.pos) - result.push(new SelectionRange($from, $from.doc.resolve(pos + 1))); - $from = $from.doc.resolve(pos + 1 + node.content.size); - return false; - } - }); - if ($from.pos < $to.pos) - result.push(new SelectionRange($from, $to)); - } - return result; -} -/** -Create a command function that toggles the given mark with the -given attributes. Will return `false` when the current selection -doesn't support that mark. This will remove the mark if any marks -of that type exist in the selection, or add it otherwise. If the -selection is empty, this applies to the [stored -marks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks) instead of a range of the -document. -*/ -function toggleMark(markType, attrs = null, options) { - let removeWhenPresent = (options && options.removeWhenPresent) !== false; - let enterAtoms = (options && options.enterInlineAtoms) !== false; - let dropSpace = !(options && options.includeWhitespace); - return function (state, dispatch) { - let { empty, $cursor, ranges } = state.selection; - if ((empty && !$cursor) || !markApplies(state.doc, ranges, markType, enterAtoms)) - return false; - if (dispatch) { - if ($cursor) { - if (markType.isInSet(state.storedMarks || $cursor.marks())) - dispatch(state.tr.removeStoredMark(markType)); - else - dispatch(state.tr.addStoredMark(markType.create(attrs))); - } - else { - let add, tr = state.tr; - if (!enterAtoms) - ranges = removeInlineAtoms(ranges); - if (removeWhenPresent) { - add = !ranges.some(r => state.doc.rangeHasMark(r.$from.pos, r.$to.pos, markType)); - } - else { - add = !ranges.every(r => { - let missing = false; - tr.doc.nodesBetween(r.$from.pos, r.$to.pos, (node, pos, parent) => { - if (missing) - return false; - missing = !markType.isInSet(node.marks) && !!parent && parent.type.allowsMarkType(markType) && - !(node.isText && /^\s*$/.test(node.textBetween(Math.max(0, r.$from.pos - pos), Math.min(node.nodeSize, r.$to.pos - pos)))); - }); - return !missing; - }); - } - for (let i = 0; i < ranges.length; i++) { - let { $from, $to } = ranges[i]; - if (!add) { - tr.removeMark($from.pos, $to.pos, markType); - } - else { - let from = $from.pos, to = $to.pos, start = $from.nodeAfter, end = $to.nodeBefore; - let spaceStart = dropSpace && start && start.isText ? /^\s*/.exec(start.text)[0].length : 0; - let spaceEnd = dropSpace && end && end.isText ? /\s*$/.exec(end.text)[0].length : 0; - if (from + spaceStart < to) { - from += spaceStart; - to -= spaceEnd; - } - tr.addMark(from, to, markType.create(attrs)); - } - } - dispatch(tr.scrollIntoView()); - } - } - return true; - }; -} -function wrapDispatchForJoin(dispatch, isJoinable) { - return (tr) => { - if (!tr.isGeneric) - return dispatch(tr); - let ranges = []; - for (let i = 0; i < tr.mapping.maps.length; i++) { - let map = tr.mapping.maps[i]; - for (let j = 0; j < ranges.length; j++) - ranges[j] = map.map(ranges[j]); - map.forEach((_s, _e, from, to) => ranges.push(from, to)); - } - // Figure out which joinable points exist inside those ranges, - // by checking all node boundaries in their parent nodes. - let joinable = []; - for (let i = 0; i < ranges.length; i += 2) { - let from = ranges[i], to = ranges[i + 1]; - let $from = tr.doc.resolve(from), depth = $from.sharedDepth(to), parent = $from.node(depth); - for (let index = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index) { - let after = parent.maybeChild(index); - if (!after) - break; - if (index && joinable.indexOf(pos) == -1) { - let before = parent.child(index - 1); - if (before.type == after.type && isJoinable(before, after)) - joinable.push(pos); - } - pos += after.nodeSize; - } - } - // Join the joinable points - joinable.sort((a, b) => a - b); - for (let i = joinable.length - 1; i >= 0; i--) { - if (canJoin(tr.doc, joinable[i])) - tr.join(joinable[i]); - } - dispatch(tr); - }; -} -/** -Wrap a command so that, when it produces a transform that causes -two joinable nodes to end up next to each other, those are joined. -Nodes are considered joinable when they are of the same type and -when the `isJoinable` predicate returns true for them or, if an -array of strings was passed, if their node type name is in that -array. -*/ -function autoJoin(command, isJoinable) { - let canJoin = Array.isArray(isJoinable) ? (node) => isJoinable.indexOf(node.type.name) > -1 - : isJoinable; - return (state, dispatch, view) => command(state, dispatch && wrapDispatchForJoin(dispatch, canJoin), view); -} -/** -Combine a number of command functions into a single function (which -calls them one by one until one returns true). -*/ -function chainCommands(...commands) { - return function (state, dispatch, view) { - for (let i = 0; i < commands.length; i++) - if (commands[i](state, dispatch, view)) - return true; - return false; - }; -} -let backspace = chainCommands(deleteSelection, joinBackward, selectNodeBackward); -let del = chainCommands(deleteSelection, joinForward, selectNodeForward); -/** -A basic keymap containing bindings not specific to any schema. -Binds the following keys (when multiple commands are listed, they -are chained with [`chainCommands`](https://prosemirror.net/docs/ref/#commands.chainCommands)): - -* **Enter** to `newlineInCode`, `createParagraphNear`, `liftEmptyBlock`, `splitBlock` -* **Mod-Enter** to `exitCode` -* **Backspace** and **Mod-Backspace** to `deleteSelection`, `joinBackward`, `selectNodeBackward` -* **Delete** and **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward` -* **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward` -* **Mod-a** to `selectAll` -*/ -const pcBaseKeymap = { - "Enter": chainCommands(newlineInCode, createParagraphNear, liftEmptyBlock, splitBlock), - "Mod-Enter": exitCode, - "Backspace": backspace, - "Mod-Backspace": backspace, - "Shift-Backspace": backspace, - "Delete": del, - "Mod-Delete": del, - "Mod-a": selectAll -}; -/** -A copy of `pcBaseKeymap` that also binds **Ctrl-h** like Backspace, -**Ctrl-d** like Delete, **Alt-Backspace** like Ctrl-Backspace, and -**Ctrl-Alt-Backspace**, **Alt-Delete**, and **Alt-d** like -Ctrl-Delete. -*/ -const macBaseKeymap = { - "Ctrl-h": pcBaseKeymap["Backspace"], - "Alt-Backspace": pcBaseKeymap["Mod-Backspace"], - "Ctrl-d": pcBaseKeymap["Delete"], - "Ctrl-Alt-Backspace": pcBaseKeymap["Mod-Delete"], - "Alt-Delete": pcBaseKeymap["Mod-Delete"], - "Alt-d": pcBaseKeymap["Mod-Delete"], - "Ctrl-a": selectTextblockStart, - "Ctrl-e": selectTextblockEnd -}; -for (let key in pcBaseKeymap) - macBaseKeymap[key] = pcBaseKeymap[key]; -const mac = typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) - // @ts-ignore - : typeof os != "undefined" && os.platform ? os.platform() == "darwin" : false; -/** -Depending on the detected platform, this will hold -[`pcBasekeymap`](https://prosemirror.net/docs/ref/#commands.pcBaseKeymap) or -[`macBaseKeymap`](https://prosemirror.net/docs/ref/#commands.macBaseKeymap). -*/ -const baseKeymap = mac ? macBaseKeymap : pcBaseKeymap; - -export { autoJoin, baseKeymap, chainCommands, createParagraphNear, deleteSelection, exitCode, joinBackward, joinDown, joinForward, joinTextblockBackward, joinTextblockForward, joinUp, lift, liftEmptyBlock, macBaseKeymap, newlineInCode, pcBaseKeymap, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, selectTextblockEnd, selectTextblockStart, setBlockType, splitBlock, splitBlockAs, splitBlockKeepMarks, toggleMark, wrapIn }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/package.json b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/package.json deleted file mode 100644 index a8093a4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "prosemirror-commands", - "version": "1.7.1", - "description": "Editing commands for ProseMirror", - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "sideEffects": false, - "license": "MIT", - "maintainers": [ - { - "name": "Marijn Haverbeke", - "email": "marijn@haverbeke.berlin", - "web": "http://marijnhaverbeke.nl" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/prosemirror/prosemirror-commands.git" - }, - "dependencies": { - "prosemirror-model": "^1.0.0", - "prosemirror-transform": "^1.10.2", - "prosemirror-state": "^1.0.0" - }, - "devDependencies": { - "@prosemirror/buildhelper": "^0.1.5", - "prosemirror-test-builder": "^1.0.0" - }, - "scripts": { - "test": "pm-runtests", - "prepare": "pm-buildhelper src/commands.ts" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/src/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/src/README.md deleted file mode 100644 index f11d060..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/src/README.md +++ /dev/null @@ -1,40 +0,0 @@ -This module exports a number of _commands_, which are building block -functions that encapsulate an editing action. A command function takes -an editor state, _optionally_ a `dispatch` function that it can use -to dispatch a transaction and _optionally_ an `EditorView` instance. -It should return a boolean that indicates whether it could perform any -action. When no `dispatch` callback is passed, the command should do a -'dry run', determining whether it is applicable, but not actually doing -anything. - -These are mostly used to bind keys and define menu items. - -@chainCommands -@deleteSelection -@joinBackward -@selectNodeBackward -@joinTextblockBackward -@joinForward -@selectNodeForward -@joinTextblockForward -@joinUp -@joinDown -@lift -@newlineInCode -@exitCode -@createParagraphNear -@liftEmptyBlock -@splitBlock -@splitBlockAs -@splitBlockKeepMarks -@selectParentNode -@selectAll -@selectTextblockStart -@selectTextblockEnd -@wrapIn -@setBlockType -@toggleMark -@autoJoin -@baseKeymap -@pcBaseKeymap -@macBaseKeymap diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/src/commands.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/src/commands.ts deleted file mode 100644 index 7a1e149..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-commands/src/commands.ts +++ /dev/null @@ -1,783 +0,0 @@ -import {joinPoint, canJoin, findWrapping, liftTarget, canSplit, - ReplaceStep, ReplaceAroundStep, replaceStep} from "prosemirror-transform" -import {Slice, Fragment, Node, NodeType, Attrs, MarkType, ResolvedPos, ContentMatch} from "prosemirror-model" -import {Selection, EditorState, Transaction, TextSelection, NodeSelection, - SelectionRange, AllSelection, Command} from "prosemirror-state" -import {EditorView} from "prosemirror-view" - -/// Delete the selection, if there is one. -export const deleteSelection: Command = (state, dispatch) => { - if (state.selection.empty) return false - if (dispatch) dispatch(state.tr.deleteSelection().scrollIntoView()) - return true -} - -function atBlockStart(state: EditorState, view?: EditorView): ResolvedPos | null { - let {$cursor} = state.selection as TextSelection - if (!$cursor || (view ? !view.endOfTextblock("backward", state) - : $cursor.parentOffset > 0)) - return null - return $cursor -} - -/// If the selection is empty and at the start of a textblock, try to -/// reduce the distance between that block and the one before it—if -/// there's a block directly before it that can be joined, join them. -/// If not, try to move the selected block closer to the next one in -/// the document structure by lifting it out of its parent or moving it -/// into a parent of the previous block. Will use the view for accurate -/// (bidi-aware) start-of-textblock detection if given. -export const joinBackward: Command = (state, dispatch, view) => { - let $cursor = atBlockStart(state, view) - if (!$cursor) return false - - let $cut = findCutBefore($cursor) - - // If there is no node before this, try to lift - if (!$cut) { - let range = $cursor.blockRange(), target = range && liftTarget(range) - if (target == null) return false - if (dispatch) dispatch(state.tr.lift(range!, target).scrollIntoView()) - return true - } - - let before = $cut.nodeBefore! - // Apply the joining algorithm - if (deleteBarrier(state, $cut, dispatch, -1)) return true - - // If the node below has no content and the node above is - // selectable, delete the node below and select the one above. - if ($cursor.parent.content.size == 0 && - (textblockAt(before, "end") || NodeSelection.isSelectable(before))) { - for (let depth = $cursor.depth;; depth--) { - let delStep = replaceStep(state.doc, $cursor.before(depth), $cursor.after(depth), Slice.empty) - if (delStep && (delStep as ReplaceStep).slice.size < (delStep as ReplaceStep).to - (delStep as ReplaceStep).from) { - if (dispatch) { - let tr = state.tr.step(delStep) - tr.setSelection(textblockAt(before, "end") - ? Selection.findFrom(tr.doc.resolve(tr.mapping.map($cut.pos, -1)), -1)! - : NodeSelection.create(tr.doc, $cut.pos - before.nodeSize)) - dispatch(tr.scrollIntoView()) - } - return true - } - if (depth == 1 || $cursor.node(depth - 1).childCount > 1) break - } - } - - // If the node before is an atom, delete it - if (before.isAtom && $cut.depth == $cursor.depth - 1) { - if (dispatch) dispatch(state.tr.delete($cut.pos - before.nodeSize, $cut.pos).scrollIntoView()) - return true - } - - return false -} - -/// A more limited form of [`joinBackward`](#commands.joinBackward) -/// that only tries to join the current textblock to the one before -/// it, if the cursor is at the start of a textblock. -export const joinTextblockBackward: Command = (state, dispatch, view) => { - let $cursor = atBlockStart(state, view) - if (!$cursor) return false - let $cut = findCutBefore($cursor) - return $cut ? joinTextblocksAround(state, $cut, dispatch) : false -} - -/// A more limited form of [`joinForward`](#commands.joinForward) -/// that only tries to join the current textblock to the one after -/// it, if the cursor is at the end of a textblock. -export const joinTextblockForward: Command = (state, dispatch, view) => { - let $cursor = atBlockEnd(state, view) - if (!$cursor) return false - let $cut = findCutAfter($cursor) - return $cut ? joinTextblocksAround(state, $cut, dispatch) : false -} - -function joinTextblocksAround(state: EditorState, $cut: ResolvedPos, dispatch?: (tr: Transaction) => void) { - let before = $cut.nodeBefore!, beforeText = before, beforePos = $cut.pos - 1 - for (; !beforeText.isTextblock; beforePos--) { - if (beforeText.type.spec.isolating) return false - let child = beforeText.lastChild - if (!child) return false - beforeText = child - } - let after = $cut.nodeAfter!, afterText = after, afterPos = $cut.pos + 1 - for (; !afterText.isTextblock; afterPos++) { - if (afterText.type.spec.isolating) return false - let child = afterText.firstChild - if (!child) return false - afterText = child - } - let step = replaceStep(state.doc, beforePos, afterPos, Slice.empty) as ReplaceStep | null - if (!step || step.from != beforePos || - step instanceof ReplaceStep && step.slice.size >= afterPos - beforePos) return false - if (dispatch) { - let tr = state.tr.step(step) - tr.setSelection(TextSelection.create(tr.doc, beforePos)) - dispatch(tr.scrollIntoView()) - } - return true - -} - -function textblockAt(node: Node, side: "start" | "end", only = false) { - for (let scan: Node | null = node; scan; scan = (side == "start" ? scan.firstChild : scan.lastChild)) { - if (scan.isTextblock) return true - if (only && scan.childCount != 1) return false - } - return false -} - -/// When the selection is empty and at the start of a textblock, select -/// the node before that textblock, if possible. This is intended to be -/// bound to keys like backspace, after -/// [`joinBackward`](#commands.joinBackward) or other deleting -/// commands, as a fall-back behavior when the schema doesn't allow -/// deletion at the selected point. -export const selectNodeBackward: Command = (state, dispatch, view) => { - let {$head, empty} = state.selection, $cut: ResolvedPos | null = $head - if (!empty) return false - - if ($head.parent.isTextblock) { - if (view ? !view.endOfTextblock("backward", state) : $head.parentOffset > 0) return false - $cut = findCutBefore($head) - } - let node = $cut && $cut.nodeBefore - if (!node || !NodeSelection.isSelectable(node)) return false - if (dispatch) - dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut!.pos - node.nodeSize)).scrollIntoView()) - return true -} - -function findCutBefore($pos: ResolvedPos): ResolvedPos | null { - if (!$pos.parent.type.spec.isolating) for (let i = $pos.depth - 1; i >= 0; i--) { - if ($pos.index(i) > 0) return $pos.doc.resolve($pos.before(i + 1)) - if ($pos.node(i).type.spec.isolating) break - } - return null -} - -function atBlockEnd(state: EditorState, view?: EditorView): ResolvedPos | null { - let {$cursor} = state.selection as TextSelection - if (!$cursor || (view ? !view.endOfTextblock("forward", state) - : $cursor.parentOffset < $cursor.parent.content.size)) - return null - return $cursor -} - -/// If the selection is empty and the cursor is at the end of a -/// textblock, try to reduce or remove the boundary between that block -/// and the one after it, either by joining them or by moving the other -/// block closer to this one in the tree structure. Will use the view -/// for accurate start-of-textblock detection if given. -export const joinForward: Command = (state, dispatch, view) => { - let $cursor = atBlockEnd(state, view) - if (!$cursor) return false - - let $cut = findCutAfter($cursor) - // If there is no node after this, there's nothing to do - if (!$cut) return false - - let after = $cut.nodeAfter! - // Try the joining algorithm - if (deleteBarrier(state, $cut, dispatch, 1)) return true - - // If the node above has no content and the node below is - // selectable, delete the node above and select the one below. - if ($cursor.parent.content.size == 0 && - (textblockAt(after, "start") || NodeSelection.isSelectable(after))) { - let delStep = replaceStep(state.doc, $cursor.before(), $cursor.after(), Slice.empty) - if (delStep && (delStep as ReplaceStep).slice.size < (delStep as ReplaceStep).to - (delStep as ReplaceStep).from) { - if (dispatch) { - let tr = state.tr.step(delStep) - tr.setSelection(textblockAt(after, "start") ? Selection.findFrom(tr.doc.resolve(tr.mapping.map($cut.pos)), 1)! - : NodeSelection.create(tr.doc, tr.mapping.map($cut.pos))) - dispatch(tr.scrollIntoView()) - } - return true - } - } - - // If the next node is an atom, delete it - if (after.isAtom && $cut.depth == $cursor.depth - 1) { - if (dispatch) dispatch(state.tr.delete($cut.pos, $cut.pos + after.nodeSize).scrollIntoView()) - return true - } - - return false -} - -/// When the selection is empty and at the end of a textblock, select -/// the node coming after that textblock, if possible. This is intended -/// to be bound to keys like delete, after -/// [`joinForward`](#commands.joinForward) and similar deleting -/// commands, to provide a fall-back behavior when the schema doesn't -/// allow deletion at the selected point. -export const selectNodeForward: Command = (state, dispatch, view) => { - let {$head, empty} = state.selection, $cut: ResolvedPos | null = $head - if (!empty) return false - if ($head.parent.isTextblock) { - if (view ? !view.endOfTextblock("forward", state) : $head.parentOffset < $head.parent.content.size) - return false - $cut = findCutAfter($head) - } - let node = $cut && $cut.nodeAfter - if (!node || !NodeSelection.isSelectable(node)) return false - if (dispatch) - dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut!.pos)).scrollIntoView()) - return true -} - -function findCutAfter($pos: ResolvedPos) { - if (!$pos.parent.type.spec.isolating) for (let i = $pos.depth - 1; i >= 0; i--) { - let parent = $pos.node(i) - if ($pos.index(i) + 1 < parent.childCount) return $pos.doc.resolve($pos.after(i + 1)) - if (parent.type.spec.isolating) break - } - return null -} - -/// Join the selected block or, if there is a text selection, the -/// closest ancestor block of the selection that can be joined, with -/// the sibling above it. -export const joinUp: Command = (state, dispatch) => { - let sel = state.selection, nodeSel = sel instanceof NodeSelection, point - if (nodeSel) { - if ((sel as NodeSelection).node.isTextblock || !canJoin(state.doc, sel.from)) return false - point = sel.from - } else { - point = joinPoint(state.doc, sel.from, -1) - if (point == null) return false - } - if (dispatch) { - let tr = state.tr.join(point) - if (nodeSel) tr.setSelection(NodeSelection.create(tr.doc, point - state.doc.resolve(point).nodeBefore!.nodeSize)) - dispatch(tr.scrollIntoView()) - } - return true -} - -/// Join the selected block, or the closest ancestor of the selection -/// that can be joined, with the sibling after it. -export const joinDown: Command = (state, dispatch) => { - let sel = state.selection, point - if (sel instanceof NodeSelection) { - if (sel.node.isTextblock || !canJoin(state.doc, sel.to)) return false - point = sel.to - } else { - point = joinPoint(state.doc, sel.to, 1) - if (point == null) return false - } - if (dispatch) - dispatch(state.tr.join(point).scrollIntoView()) - return true -} - -/// Lift the selected block, or the closest ancestor block of the -/// selection that can be lifted, out of its parent node. -export const lift: Command = (state, dispatch) => { - let {$from, $to} = state.selection - let range = $from.blockRange($to), target = range && liftTarget(range) - if (target == null) return false - if (dispatch) dispatch(state.tr.lift(range!, target).scrollIntoView()) - return true -} - -/// If the selection is in a node whose type has a truthy -/// [`code`](#model.NodeSpec.code) property in its spec, replace the -/// selection with a newline character. -export const newlineInCode: Command = (state, dispatch) => { - let {$head, $anchor} = state.selection - if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) return false - if (dispatch) dispatch(state.tr.insertText("\n").scrollIntoView()) - return true -} - -function defaultBlockAt(match: ContentMatch) { - for (let i = 0; i < match.edgeCount; i++) { - let {type} = match.edge(i) - if (type.isTextblock && !type.hasRequiredAttrs()) return type - } - return null -} - -/// When the selection is in a node with a truthy -/// [`code`](#model.NodeSpec.code) property in its spec, create a -/// default block after the code block, and move the cursor there. -export const exitCode: Command = (state, dispatch) => { - let {$head, $anchor} = state.selection - if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) return false - let above = $head.node(-1), after = $head.indexAfter(-1), type = defaultBlockAt(above.contentMatchAt(after)) - if (!type || !above.canReplaceWith(after, after, type)) return false - if (dispatch) { - let pos = $head.after(), tr = state.tr.replaceWith(pos, pos, type.createAndFill()!) - tr.setSelection(Selection.near(tr.doc.resolve(pos), 1)) - dispatch(tr.scrollIntoView()) - } - return true -} - -/// If a block node is selected, create an empty paragraph before (if -/// it is its parent's first child) or after it. -export const createParagraphNear: Command = (state, dispatch) => { - let sel = state.selection, {$from, $to} = sel - if (sel instanceof AllSelection || $from.parent.inlineContent || $to.parent.inlineContent) return false - let type = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter())) - if (!type || !type.isTextblock) return false - if (dispatch) { - let side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos - let tr = state.tr.insert(side, type.createAndFill()!) - tr.setSelection(TextSelection.create(tr.doc, side + 1)) - dispatch(tr.scrollIntoView()) - } - return true -} - -/// If the cursor is in an empty textblock that can be lifted, lift the -/// block. -export const liftEmptyBlock: Command = (state, dispatch) => { - let {$cursor} = state.selection as TextSelection - if (!$cursor || $cursor.parent.content.size) return false - if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) { - let before = $cursor.before() - if (canSplit(state.doc, before)) { - if (dispatch) dispatch(state.tr.split(before).scrollIntoView()) - return true - } - } - let range = $cursor.blockRange(), target = range && liftTarget(range) - if (target == null) return false - if (dispatch) dispatch(state.tr.lift(range!, target).scrollIntoView()) - return true -} - -/// Create a variant of [`splitBlock`](#commands.splitBlock) that uses -/// a custom function to determine the type of the newly split off block. -export function splitBlockAs( - splitNode?: (node: Node, atEnd: boolean, $from: ResolvedPos) => {type: NodeType, attrs?: Attrs} | null -): Command { - return (state, dispatch) => { - let {$from, $to} = state.selection - if (state.selection instanceof NodeSelection && state.selection.node.isBlock) { - if (!$from.parentOffset || !canSplit(state.doc, $from.pos)) return false - if (dispatch) dispatch(state.tr.split($from.pos).scrollIntoView()) - return true - } - - if (!$from.depth) return false - let types: (null | {type: NodeType, attrs?: Attrs | null})[] = [] - let splitDepth, deflt, atEnd = false, atStart = false - for (let d = $from.depth;; d--) { - let node = $from.node(d) - if (node.isBlock) { - atEnd = $from.end(d) == $from.pos + ($from.depth - d) - atStart = $from.start(d) == $from.pos - ($from.depth - d) - deflt = defaultBlockAt($from.node(d - 1).contentMatchAt($from.indexAfter(d - 1))) - let splitType = splitNode && splitNode($to.parent, atEnd, $from) - types.unshift(splitType || (atEnd && deflt ? {type: deflt} : null)) - splitDepth = d - break - } else { - if (d == 1) return false - types.unshift(null) - } - } - - let tr = state.tr - if (state.selection instanceof TextSelection || state.selection instanceof AllSelection) tr.deleteSelection() - let splitPos = tr.mapping.map($from.pos) - let can = canSplit(tr.doc, splitPos, types.length, types) - if (!can) { - types[0] = deflt ? {type: deflt} : null - can = canSplit(tr.doc, splitPos, types.length, types) - } - if (!can) return false - tr.split(splitPos, types.length, types) - if (!atEnd && atStart && $from.node(splitDepth).type != deflt) { - let first = tr.mapping.map($from.before(splitDepth)), $first = tr.doc.resolve(first) - if (deflt && $from.node(splitDepth - 1).canReplaceWith($first.index(), $first.index() + 1, deflt)) - tr.setNodeMarkup(tr.mapping.map($from.before(splitDepth)), deflt) - } - if (dispatch) dispatch(tr.scrollIntoView()) - return true - } -} - -/// Split the parent block of the selection. If the selection is a text -/// selection, also delete its content. -export const splitBlock: Command = splitBlockAs() - -/// Acts like [`splitBlock`](#commands.splitBlock), but without -/// resetting the set of active marks at the cursor. -export const splitBlockKeepMarks: Command = (state, dispatch) => { - return splitBlock(state, dispatch && (tr => { - let marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks()) - if (marks) tr.ensureMarks(marks) - dispatch(tr) - })) -} - -/// Move the selection to the node wrapping the current selection, if -/// any. (Will not select the document node.) -export const selectParentNode: Command = (state, dispatch) => { - let {$from, to} = state.selection, pos - let same = $from.sharedDepth(to) - if (same == 0) return false - pos = $from.before(same) - if (dispatch) dispatch(state.tr.setSelection(NodeSelection.create(state.doc, pos))) - return true -} - -/// Select the whole document. -export const selectAll: Command = (state, dispatch) => { - if (dispatch) dispatch(state.tr.setSelection(new AllSelection(state.doc))) - return true -} - -function joinMaybeClear(state: EditorState, $pos: ResolvedPos, dispatch: ((tr: Transaction) => void) | undefined) { - let before = $pos.nodeBefore, after = $pos.nodeAfter, index = $pos.index() - if (!before || !after || !before.type.compatibleContent(after.type)) return false - if (!before.content.size && $pos.parent.canReplace(index - 1, index)) { - if (dispatch) dispatch(state.tr.delete($pos.pos - before.nodeSize, $pos.pos).scrollIntoView()) - return true - } - if (!$pos.parent.canReplace(index, index + 1) || !(after.isTextblock || canJoin(state.doc, $pos.pos))) - return false - if (dispatch) - dispatch(state.tr.join($pos.pos).scrollIntoView()) - return true -} - -function deleteBarrier(state: EditorState, $cut: ResolvedPos, dispatch: ((tr: Transaction) => void) | undefined, dir: number) { - let before = $cut.nodeBefore!, after = $cut.nodeAfter!, conn, match - let isolated = before.type.spec.isolating || after.type.spec.isolating - if (!isolated && joinMaybeClear(state, $cut, dispatch)) return true - - let canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1) - if (canDelAfter && - (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && - match.matchType(conn[0] || after.type)!.validEnd) { - if (dispatch) { - let end = $cut.pos + after.nodeSize, wrap = Fragment.empty - for (let i = conn.length - 1; i >= 0; i--) - wrap = Fragment.from(conn[i].create(null, wrap)) - wrap = Fragment.from(before.copy(wrap)) - let tr = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap, 1, 0), conn.length, true)) - let $joinAt = tr.doc.resolve(end + 2 * conn.length) - if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && - canJoin(tr.doc, $joinAt.pos)) tr.join($joinAt.pos) - dispatch(tr.scrollIntoView()) - } - return true - } - - let selAfter = after.type.spec.isolating || (dir > 0 && isolated) ? null : Selection.findFrom($cut, 1) - let range = selAfter && selAfter.$from.blockRange(selAfter.$to), target = range && liftTarget(range) - if (target != null && target >= $cut.depth) { - if (dispatch) dispatch(state.tr.lift(range!, target).scrollIntoView()) - return true - } - - if (canDelAfter && textblockAt(after, "start", true) && textblockAt(before, "end")) { - let at = before, wrap = [] - for (;;) { - wrap.push(at) - if (at.isTextblock) break - at = at.lastChild! - } - let afterText = after, afterDepth = 1 - for (; !afterText.isTextblock; afterText = afterText.firstChild!) afterDepth++ - if (at.canReplace(at.childCount, at.childCount, afterText.content)) { - if (dispatch) { - let end = Fragment.empty - for (let i = wrap.length - 1; i >= 0; i--) end = Fragment.from(wrap[i].copy(end)) - let tr = state.tr.step(new ReplaceAroundStep($cut.pos - wrap.length, $cut.pos + after.nodeSize, - $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, - new Slice(end, wrap.length, 0), 0, true)) - dispatch(tr.scrollIntoView()) - } - return true - } - } - - return false -} - -function selectTextblockSide(side: number): Command { - return function(state, dispatch) { - let sel = state.selection, $pos = side < 0 ? sel.$from : sel.$to - let depth = $pos.depth - while ($pos.node(depth).isInline) { - if (!depth) return false - depth-- - } - if (!$pos.node(depth).isTextblock) return false - if (dispatch) - dispatch(state.tr.setSelection(TextSelection.create( - state.doc, side < 0 ? $pos.start(depth) : $pos.end(depth)))) - return true - } -} - -/// Moves the cursor to the start of current text block. -export const selectTextblockStart = selectTextblockSide(-1) - -/// Moves the cursor to the end of current text block. -export const selectTextblockEnd = selectTextblockSide(1) - -// Parameterized commands - -/// Wrap the selection in a node of the given type with the given -/// attributes. -export function wrapIn(nodeType: NodeType, attrs: Attrs | null = null): Command { - return function(state, dispatch) { - let {$from, $to} = state.selection - let range = $from.blockRange($to), wrapping = range && findWrapping(range, nodeType, attrs) - if (!wrapping) return false - if (dispatch) dispatch(state.tr.wrap(range!, wrapping).scrollIntoView()) - return true - } -} - -/// Returns a command that tries to set the selected textblocks to the -/// given node type with the given attributes. -export function setBlockType(nodeType: NodeType, attrs: Attrs | null = null): Command { - return function(state, dispatch) { - let applicable = false - for (let i = 0; i < state.selection.ranges.length && !applicable; i++) { - let {$from: {pos: from}, $to: {pos: to}} = state.selection.ranges[i] - state.doc.nodesBetween(from, to, (node, pos) => { - if (applicable) return false - if (!node.isTextblock || node.hasMarkup(nodeType, attrs)) return - if (node.type == nodeType) { - applicable = true - } else { - let $pos = state.doc.resolve(pos), index = $pos.index() - applicable = $pos.parent.canReplaceWith(index, index + 1, nodeType) - } - }) - } - if (!applicable) return false - if (dispatch) { - let tr = state.tr - for (let i = 0; i < state.selection.ranges.length; i++) { - let {$from: {pos: from}, $to: {pos: to}} = state.selection.ranges[i] - tr.setBlockType(from, to, nodeType, attrs) - } - dispatch(tr.scrollIntoView()) - } - return true - } -} - -function markApplies(doc: Node, ranges: readonly SelectionRange[], type: MarkType, enterAtoms: boolean) { - for (let i = 0; i < ranges.length; i++) { - let {$from, $to} = ranges[i] - let can = $from.depth == 0 ? doc.inlineContent && doc.type.allowsMarkType(type) : false - doc.nodesBetween($from.pos, $to.pos, (node, pos) => { - if (can || !enterAtoms && node.isAtom && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos) - return false - can = node.inlineContent && node.type.allowsMarkType(type) - }) - if (can) return true - } - return false -} - -function removeInlineAtoms(ranges: readonly SelectionRange[]): readonly SelectionRange[] { - let result = [] - for (let i = 0; i < ranges.length; i++) { - let {$from, $to} = ranges[i] - $from.doc.nodesBetween($from.pos, $to.pos, (node, pos) => { - if (node.isAtom && node.content.size && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos) { - if (pos + 1 > $from.pos) result.push(new SelectionRange($from, $from.doc.resolve(pos + 1))) - $from = $from.doc.resolve(pos + 1 + node.content.size) - return false - } - }) - if ($from.pos < $to.pos) result.push(new SelectionRange($from, $to)) - } - return result -} - -/// Create a command function that toggles the given mark with the -/// given attributes. Will return `false` when the current selection -/// doesn't support that mark. This will remove the mark if any marks -/// of that type exist in the selection, or add it otherwise. If the -/// selection is empty, this applies to the [stored -/// marks](#state.EditorState.storedMarks) instead of a range of the -/// document. -export function toggleMark(markType: MarkType, attrs: Attrs | null = null, options?: { - /// Controls whether, when part of the selected range has the mark - /// already and part doesn't, the mark is removed (`true`, the - /// default) or added (`false`). - removeWhenPresent?: boolean - /// When set to false, this will prevent the command from acting on - /// the content of inline nodes marked as - /// [atoms](#model.NodeSpec.atom) that are completely covered by a - /// selection range. - enterInlineAtoms?: boolean - /// By default, this command doesn't apply to leading and trailing - /// whitespace in the selection. Set this to `true` to change that. - includeWhitespace?: boolean -}): Command { - let removeWhenPresent = (options && options.removeWhenPresent) !== false - let enterAtoms = (options && options.enterInlineAtoms) !== false - let dropSpace = !(options && options.includeWhitespace) - return function(state, dispatch) { - let {empty, $cursor, ranges} = state.selection as TextSelection - if ((empty && !$cursor) || !markApplies(state.doc, ranges, markType, enterAtoms)) return false - if (dispatch) { - if ($cursor) { - if (markType.isInSet(state.storedMarks || $cursor.marks())) - dispatch(state.tr.removeStoredMark(markType)) - else - dispatch(state.tr.addStoredMark(markType.create(attrs))) - } else { - let add, tr = state.tr - if (!enterAtoms) ranges = removeInlineAtoms(ranges) - if (removeWhenPresent) { - add = !ranges.some(r => state.doc.rangeHasMark(r.$from.pos, r.$to.pos, markType)) - } else { - add = !ranges.every(r => { - let missing = false - tr.doc.nodesBetween(r.$from.pos, r.$to.pos, (node, pos, parent) => { - if (missing) return false - missing = !markType.isInSet(node.marks) && !!parent && parent.type.allowsMarkType(markType) && - !(node.isText && /^\s*$/.test(node.textBetween(Math.max(0, r.$from.pos - pos), - Math.min(node.nodeSize, r.$to.pos - pos)))) - }) - return !missing - }) - } - for (let i = 0; i < ranges.length; i++) { - let {$from, $to} = ranges[i] - if (!add) { - tr.removeMark($from.pos, $to.pos, markType) - } else { - let from = $from.pos, to = $to.pos, start = $from.nodeAfter, end = $to.nodeBefore - let spaceStart = dropSpace && start && start.isText ? /^\s*/.exec(start.text!)![0].length : 0 - let spaceEnd = dropSpace && end && end.isText ? /\s*$/.exec(end.text!)![0].length : 0 - if (from + spaceStart < to) { from += spaceStart; to -= spaceEnd } - tr.addMark(from, to, markType.create(attrs)) - } - } - dispatch(tr.scrollIntoView()) - } - } - return true - } -} - -function wrapDispatchForJoin(dispatch: (tr: Transaction) => void, isJoinable: (a: Node, b: Node) => boolean) { - return (tr: Transaction) => { - if (!tr.isGeneric) return dispatch(tr) - - let ranges: number[] = [] - for (let i = 0; i < tr.mapping.maps.length; i++) { - let map = tr.mapping.maps[i] - for (let j = 0; j < ranges.length; j++) - ranges[j] = map.map(ranges[j]) - map.forEach((_s, _e, from, to) => ranges.push(from, to)) - } - - // Figure out which joinable points exist inside those ranges, - // by checking all node boundaries in their parent nodes. - let joinable = [] - for (let i = 0; i < ranges.length; i += 2) { - let from = ranges[i], to = ranges[i + 1] - let $from = tr.doc.resolve(from), depth = $from.sharedDepth(to), parent = $from.node(depth) - for (let index = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index) { - let after = parent.maybeChild(index) - if (!after) break - if (index && joinable.indexOf(pos) == -1) { - let before = parent.child(index - 1) - if (before.type == after.type && isJoinable(before, after)) - joinable.push(pos) - } - pos += after.nodeSize - } - } - // Join the joinable points - joinable.sort((a, b) => a - b) - for (let i = joinable.length - 1; i >= 0; i--) { - if (canJoin(tr.doc, joinable[i])) tr.join(joinable[i]) - } - dispatch(tr) - } -} - -/// Wrap a command so that, when it produces a transform that causes -/// two joinable nodes to end up next to each other, those are joined. -/// Nodes are considered joinable when they are of the same type and -/// when the `isJoinable` predicate returns true for them or, if an -/// array of strings was passed, if their node type name is in that -/// array. -export function autoJoin( - command: Command, - isJoinable: ((before: Node, after: Node) => boolean) | readonly string[] -): Command { - let canJoin = Array.isArray(isJoinable) ? (node: Node) => isJoinable.indexOf(node.type.name) > -1 - : isJoinable as (a: Node, b: Node) => boolean - return (state, dispatch, view) => command(state, dispatch && wrapDispatchForJoin(dispatch, canJoin), view) -} - -/// Combine a number of command functions into a single function (which -/// calls them one by one until one returns true). -export function chainCommands(...commands: readonly Command[]): Command { - return function(state, dispatch, view) { - for (let i = 0; i < commands.length; i++) - if (commands[i](state, dispatch, view)) return true - return false - } -} - -let backspace = chainCommands(deleteSelection, joinBackward, selectNodeBackward) -let del = chainCommands(deleteSelection, joinForward, selectNodeForward) - -/// A basic keymap containing bindings not specific to any schema. -/// Binds the following keys (when multiple commands are listed, they -/// are chained with [`chainCommands`](#commands.chainCommands)): -/// -/// * **Enter** to `newlineInCode`, `createParagraphNear`, `liftEmptyBlock`, `splitBlock` -/// * **Mod-Enter** to `exitCode` -/// * **Backspace** and **Mod-Backspace** to `deleteSelection`, `joinBackward`, `selectNodeBackward` -/// * **Delete** and **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward` -/// * **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward` -/// * **Mod-a** to `selectAll` -export const pcBaseKeymap: {[key: string]: Command} = { - "Enter": chainCommands(newlineInCode, createParagraphNear, liftEmptyBlock, splitBlock), - "Mod-Enter": exitCode, - "Backspace": backspace, - "Mod-Backspace": backspace, - "Shift-Backspace": backspace, - "Delete": del, - "Mod-Delete": del, - "Mod-a": selectAll -} - -/// A copy of `pcBaseKeymap` that also binds **Ctrl-h** like Backspace, -/// **Ctrl-d** like Delete, **Alt-Backspace** like Ctrl-Backspace, and -/// **Ctrl-Alt-Backspace**, **Alt-Delete**, and **Alt-d** like -/// Ctrl-Delete. -export const macBaseKeymap: {[key: string]: Command} = { - "Ctrl-h": pcBaseKeymap["Backspace"], - "Alt-Backspace": pcBaseKeymap["Mod-Backspace"], - "Ctrl-d": pcBaseKeymap["Delete"], - "Ctrl-Alt-Backspace": pcBaseKeymap["Mod-Delete"], - "Alt-Delete": pcBaseKeymap["Mod-Delete"], - "Alt-d": pcBaseKeymap["Mod-Delete"], - "Ctrl-a": selectTextblockStart, - "Ctrl-e": selectTextblockEnd -} -for (let key in pcBaseKeymap) (macBaseKeymap as any)[key] = pcBaseKeymap[key] - -const mac = typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) - // @ts-ignore - : typeof os != "undefined" && os.platform ? os.platform() == "darwin" : false - -/// Depending on the detected platform, this will hold -/// [`pcBasekeymap`](#commands.pcBaseKeymap) or -/// [`macBaseKeymap`](#commands.macBaseKeymap). -export const baseKeymap: {[key: string]: Command} = mac ? macBaseKeymap : pcBaseKeymap diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-model b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-model deleted file mode 120000 index 420d071..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-model +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-model@1.25.7/node_modules/prosemirror-model \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-state b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-state deleted file mode 120000 index f732de9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-state +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-state@1.4.4/node_modules/prosemirror-state \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-transform b/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-transform deleted file mode 120000 index d9fd2cc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-commands@1.7.1/node_modules/prosemirror-transform +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-transform@1.12.0/node_modules/prosemirror-transform \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/CHANGELOG.md deleted file mode 100644 index 2e3da3e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/CHANGELOG.md +++ /dev/null @@ -1,137 +0,0 @@ -## 1.8.2 (2025-04-22) - -### Bug fixes - -Make sure the drop cursor is positioned in the right place when the editor is scaled with a CSS transform. - -Fix the width of the cursor when in a transformed element. Fix incorrect check in dragleave handler - -Fix an issue where the dropcursor would hide when drag moved over the top editor element. - -## 1.8.1 (2023-05-17) - -### Bug fixes - -Include CommonJS type declarations in the package to please new TypeScript resolution settings. - -## 1.8.0 (2023-03-27) - -### New features - -If the `color` option is set to `false`, the library will not assign an explicit color to the cursor. - -## 1.7.1 (2023-03-02) - -### Bug fixes - -Don't hide the drop cursor when no valid drop point can be found below the pointer. - -## 1.7.0 (2023-02-07) - -### New features - -The drop cursor element now has a `prosemirror-blockcursor-block`/`inline` CSS class depending on whether it is in a block or inline position. - -## 1.6.1 (2022-10-25) - -### Bug fixes - -Fix a crash when there's no DOM for the node next to the drag position. - -## 1.6.0 (2022-08-07) - -### New features - -`disableDropCursor` is now passed the dragover event as 3rd argument. - -## 1.5.0 (2022-05-30) - -### New features - -Include TypeScript type declarations. - -## 1.4.0 (2021-11-11) - -### New features - -Add support for a `disableDropCursor` property on node specs, which can be used to turn off the drop cursor inside such nodes. - -## 1.3.5 (2021-05-25) - -### Bug fixes - -Avoid a crash that happened when the document shrank during dragging. - -## 1.3.4 (2021-04-01) - -### Bug fixes - -Hide the drop cursor when `dropPoint` doesn't return a position. - -## 1.3.3 (2021-02-04) - -### Bug fixes - -Fix drop cursor positioning when the editor's `offsetParent` has been scrolled. - -## 1.3.2 (2019-11-20) - -### Bug fixes - -Rename ES module files to use a .js extension, since Webpack gets confused by .mjs - -## 1.3.1 (2019-11-19) - -### Bug fixes - -The file referred to in the package's `module` field now is compiled down to ES5. - -## 1.3.0 (2019-11-08) - -### New features - -Add a `module` field to package json file. - -## 1.2.0 (2019-10-08) - -### New features - -`dropCursor` now takes a new option, `class`, to set the CSS class name of the cursor element. Add class option to in-code docs - -## 1.1.2 (2019-09-05) - -### Bug fixes - -Fix crash on IE11 due to using a method that platform doesn't support. Don't show a drop cursor when the view isn't editable - -The drop cursor will no longer show up when the view isn't editable. - -## 1.1.1 (2018-10-23) - -### Bug fixes - -Fix crash when destroying the plugin, due to a misspelled method name. - -## 1.1.0 (2018-10-22) - -### Bug fixes - -Fixes an issue where drop cursors changed line breaking, causing the content to jump around during dragging. - -### New features - -Between-blocks drop cursors are now shown as a horizontal line. - -## 1.0.1 (2018-06-20) - -### Bug fixes - -Dragging from a content node directly to the outside of the editor will now properly hide the drop cursor. - -Make removal of drop cursor part of the drop transaction when possible. - -Use `dropPoint` from prosemirror-transform, rather than a local parallel implementation. - -## 1.0.0 (2017-10-13) - -First stable release. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/CONTRIBUTING.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/CONTRIBUTING.md deleted file mode 100644 index e52f30a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/CONTRIBUTING.md +++ /dev/null @@ -1,100 +0,0 @@ -# How to contribute - -- [Getting help](#getting-help) -- [Submitting bug reports](#submitting-bug-reports) -- [Contributing code](#contributing-code) - -## Getting help - -Community discussion, questions, and informal bug reporting is done on the -[discuss.ProseMirror forum](http://discuss.prosemirror.net). - -## Submitting bug reports - -Report bugs on the -[GitHub issue tracker](http://github.com/prosemirror/prosemirror/issues). -Before reporting a bug, please read these pointers. - -- The issue tracker is for *bugs*, not requests for help. Questions - should be asked on the [forum](http://discuss.prosemirror.net). - -- Include information about the version of the code that exhibits the - problem. For browser-related issues, include the browser and browser - version on which the problem occurred. - -- Mention very precisely what went wrong. "X is broken" is not a good - bug report. What did you expect to happen? What happened instead? - Describe the exact steps a maintainer has to take to make the - problem occur. A screencast can be useful, but is no substitute for - a textual description. - -- A great way to make it easy to reproduce your problem, if it can not - be trivially reproduced on the website demos, is to submit a script - that triggers the issue. - -## Contributing code - -- Make sure you have a [GitHub Account](https://github.com/signup/free) - -- Fork the relevant repository - ([how to fork a repo](https://help.github.com/articles/fork-a-repo)) - -- Create a local checkout of the code. You can use the - [main repository](https://github.com/prosemirror/prosemirror) to - easily check out all core modules. - -- Make your changes, and commit them - -- Follow the code style of the rest of the project (see below). Run - `npm run lint` (in the main repository checkout) to make sure that - the linter is happy. - -- If your changes are easy to test or likely to regress, add tests in - the relevant `test/` directory. Either put them in an existing - `test-*.js` file, if they fit there, or add a new file. - -- Make sure all tests pass. Run `npm run test` to verify tests pass - (you will need Node.js v6+). - -- Submit a pull request ([how to create a pull request](https://help.github.com/articles/fork-a-repo)). - Don't put more than one feature/fix in a single pull request. - -By contributing code to ProseMirror you - - - Agree to license the contributed code under the project's [MIT - license](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE). - - - Confirm that you have the right to contribute and license the code - in question. (Either you hold all rights on the code, or the rights - holder has explicitly granted the right to use it like this, - through a compatible open source license or through a direct - agreement with you.) - -### Coding standards - -- ES6 syntax, targeting an ES5 runtime (i.e. don't use library - elements added by ES6, don't use ES7/ES.next syntax). - -- 2 spaces per indentation level, no tabs. - -- No semicolons except when necessary. - -- Follow the surrounding code when it comes to spacing, brace - placement, etc. - -- Brace-less single-statement bodies are encouraged (whenever they - don't impact readability). - -- [getdocs](https://github.com/marijnh/getdocs)-style doc comments - above items that are part of the public API. - -- When documenting non-public items, you can put the type after a - single colon, so that getdocs doesn't pick it up and add it to the - API reference. - -- The linter (`npm run lint`) complains about unused variables and - functions. Prefix their names with an underscore to muffle it. - -- ProseMirror does *not* follow JSHint or JSLint prescribed style. - Patches that try to 'fix' code to pass one of these linters will not - be accepted. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/LICENSE b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/LICENSE deleted file mode 100644 index 7e2295b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2015-2017 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/README.md deleted file mode 100644 index dd40bd7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# prosemirror-dropcursor - -[ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror-dropcursor/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-dropcursor/blob/master/CHANGELOG.md) ] - -This is a non-core example module for [ProseMirror](https://prosemirror.net). -ProseMirror is a well-behaved rich semantic content editor based on -contentEditable, with support for collaborative editing and custom -document schemas. - -This module implements a plugin that shows a drop cursor for -ProseMirror. - -The [project page](https://prosemirror.net) has more information, a -number of [examples](https://prosemirror.net/examples/) and the -[documentation](https://prosemirror.net/docs/). - -This code is released under an -[MIT license](https://github.com/prosemirror/prosemirror/tree/master/LICENSE). -There's a [forum](http://discuss.prosemirror.net) for general -discussion and support requests, and the -[Github bug tracker](https://github.com/prosemirror/prosemirror/issues) -is the place to report issues. - -We aim to be an inclusive, welcoming community. To make that explicit, -we have a [code of -conduct](http://contributor-covenant.org/version/1/1/0/) that applies -to communication around the project. - -## Documentation - -* **`dropCursor`**`(options?: interface = {}) → Plugin`\ - Create a plugin that, when added to a ProseMirror instance, - causes a decoration to show up at the drop position when something - is dragged over the editor. - - Nodes may add a `disableDropCursor` property to their spec to - control the showing of a drop cursor inside them. This may be a - boolean or a function, which will be called with a view, a - position, and the DragEvent, and should return a boolean. - - * **`options`** - - * **`color`**`?: string`\ - The color of the cursor. Defaults to `black`. - - * **`width`**`?: number`\ - The precise width of the cursor in pixels. Defaults to 1. - - * **`class`**`?: string`\ - A CSS class name to add to the cursor element. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.cjs deleted file mode 100644 index 3b9a3e7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.cjs +++ /dev/null @@ -1,185 +0,0 @@ -'use strict'; - -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var prosemirrorState = require('prosemirror-state'); -var prosemirrorTransform = require('prosemirror-transform'); -function dropCursor() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - return new prosemirrorState.Plugin({ - view: function view(editorView) { - return new DropCursorView(editorView, options); - } - }); -} -var DropCursorView = function () { - function DropCursorView(editorView, options) { - var _this = this; - _classCallCheck(this, DropCursorView); - var _a; - this.editorView = editorView; - this.cursorPos = null; - this.element = null; - this.timeout = -1; - this.width = (_a = options.width) !== null && _a !== void 0 ? _a : 1; - this.color = options.color === false ? undefined : options.color || "black"; - this["class"] = options["class"]; - this.handlers = ["dragover", "dragend", "drop", "dragleave"].map(function (name) { - var handler = function handler(e) { - _this[name](e); - }; - editorView.dom.addEventListener(name, handler); - return { - name: name, - handler: handler - }; - }); - } - _createClass(DropCursorView, [{ - key: "destroy", - value: function destroy() { - var _this2 = this; - this.handlers.forEach(function (_ref) { - var name = _ref.name, - handler = _ref.handler; - return _this2.editorView.dom.removeEventListener(name, handler); - }); - } - }, { - key: "update", - value: function update(editorView, prevState) { - if (this.cursorPos != null && prevState.doc != editorView.state.doc) { - if (this.cursorPos > editorView.state.doc.content.size) this.setCursor(null);else this.updateOverlay(); - } - } - }, { - key: "setCursor", - value: function setCursor(pos) { - if (pos == this.cursorPos) return; - this.cursorPos = pos; - if (pos == null) { - this.element.parentNode.removeChild(this.element); - this.element = null; - } else { - this.updateOverlay(); - } - } - }, { - key: "updateOverlay", - value: function updateOverlay() { - var $pos = this.editorView.state.doc.resolve(this.cursorPos); - var isBlock = !$pos.parent.inlineContent, - rect; - var editorDOM = this.editorView.dom, - editorRect = editorDOM.getBoundingClientRect(); - var scaleX = editorRect.width / editorDOM.offsetWidth, - scaleY = editorRect.height / editorDOM.offsetHeight; - if (isBlock) { - var before = $pos.nodeBefore, - after = $pos.nodeAfter; - if (before || after) { - var node = this.editorView.nodeDOM(this.cursorPos - (before ? before.nodeSize : 0)); - if (node) { - var nodeRect = node.getBoundingClientRect(); - var top = before ? nodeRect.bottom : nodeRect.top; - if (before && after) top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2; - var halfWidth = this.width / 2 * scaleY; - rect = { - left: nodeRect.left, - right: nodeRect.right, - top: top - halfWidth, - bottom: top + halfWidth - }; - } - } - } - if (!rect) { - var coords = this.editorView.coordsAtPos(this.cursorPos); - var _halfWidth = this.width / 2 * scaleX; - rect = { - left: coords.left - _halfWidth, - right: coords.left + _halfWidth, - top: coords.top, - bottom: coords.bottom - }; - } - var parent = this.editorView.dom.offsetParent; - if (!this.element) { - this.element = parent.appendChild(document.createElement("div")); - if (this["class"]) this.element.className = this["class"]; - this.element.style.cssText = "position: absolute; z-index: 50; pointer-events: none;"; - if (this.color) { - this.element.style.backgroundColor = this.color; - } - } - this.element.classList.toggle("prosemirror-dropcursor-block", isBlock); - this.element.classList.toggle("prosemirror-dropcursor-inline", !isBlock); - var parentLeft, parentTop; - if (!parent || parent == document.body && getComputedStyle(parent).position == "static") { - parentLeft = -pageXOffset; - parentTop = -pageYOffset; - } else { - var _rect = parent.getBoundingClientRect(); - var parentScaleX = _rect.width / parent.offsetWidth, - parentScaleY = _rect.height / parent.offsetHeight; - parentLeft = _rect.left - parent.scrollLeft * parentScaleX; - parentTop = _rect.top - parent.scrollTop * parentScaleY; - } - this.element.style.left = (rect.left - parentLeft) / scaleX + "px"; - this.element.style.top = (rect.top - parentTop) / scaleY + "px"; - this.element.style.width = (rect.right - rect.left) / scaleX + "px"; - this.element.style.height = (rect.bottom - rect.top) / scaleY + "px"; - } - }, { - key: "scheduleRemoval", - value: function scheduleRemoval(timeout) { - var _this3 = this; - clearTimeout(this.timeout); - this.timeout = setTimeout(function () { - return _this3.setCursor(null); - }, timeout); - } - }, { - key: "dragover", - value: function dragover(event) { - if (!this.editorView.editable) return; - var pos = this.editorView.posAtCoords({ - left: event.clientX, - top: event.clientY - }); - var node = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside); - var disableDropCursor = node && node.type.spec.disableDropCursor; - var disabled = typeof disableDropCursor == "function" ? disableDropCursor(this.editorView, pos, event) : disableDropCursor; - if (pos && !disabled) { - var target = pos.pos; - if (this.editorView.dragging && this.editorView.dragging.slice) { - var point = prosemirrorTransform.dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice); - if (point != null) target = point; - } - this.setCursor(target); - this.scheduleRemoval(5000); - } - } - }, { - key: "dragend", - value: function dragend() { - this.scheduleRemoval(20); - } - }, { - key: "drop", - value: function drop() { - this.scheduleRemoval(20); - } - }, { - key: "dragleave", - value: function dragleave(event) { - if (!this.editorView.dom.contains(event.relatedTarget)) this.setCursor(null); - } - }]); - return DropCursorView; -}(); -exports.dropCursor = dropCursor; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.d.cts deleted file mode 100644 index 565e7e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.d.cts +++ /dev/null @@ -1,38 +0,0 @@ -import { Plugin } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; - -interface DropCursorOptions { - /** - The color of the cursor. Defaults to `black`. Use `false` to apply no color and rely only on class. - */ - color?: string | false; - /** - The precise width of the cursor in pixels. Defaults to 1. - */ - width?: number; - /** - A CSS class name to add to the cursor element. - */ - class?: string; -} -/** -Create a plugin that, when added to a ProseMirror instance, -causes a decoration to show up at the drop position when something -is dragged over the editor. - -Nodes may add a `disableDropCursor` property to their spec to -control the showing of a drop cursor inside them. This may be a -boolean or a function, which will be called with a view and a -position, and should return a boolean. -*/ -declare function dropCursor(options?: DropCursorOptions): Plugin; -declare module "prosemirror-model" { - interface NodeSpec { - disableDropCursor?: boolean | ((view: EditorView, pos: { - pos: number; - inside: number; - }, event: DragEvent) => boolean); - } -} - -export { dropCursor }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.d.ts deleted file mode 100644 index 565e7e9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Plugin } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; - -interface DropCursorOptions { - /** - The color of the cursor. Defaults to `black`. Use `false` to apply no color and rely only on class. - */ - color?: string | false; - /** - The precise width of the cursor in pixels. Defaults to 1. - */ - width?: number; - /** - A CSS class name to add to the cursor element. - */ - class?: string; -} -/** -Create a plugin that, when added to a ProseMirror instance, -causes a decoration to show up at the drop position when something -is dragged over the editor. - -Nodes may add a `disableDropCursor` property to their spec to -control the showing of a drop cursor inside them. This may be a -boolean or a function, which will be called with a view and a -position, and should return a boolean. -*/ -declare function dropCursor(options?: DropCursorOptions): Plugin; -declare module "prosemirror-model" { - interface NodeSpec { - disableDropCursor?: boolean | ((view: EditorView, pos: { - pos: number; - inside: number; - }, event: DragEvent) => boolean); - } -} - -export { dropCursor }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js deleted file mode 100644 index c9bc7b5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js +++ /dev/null @@ -1,146 +0,0 @@ -import { Plugin } from 'prosemirror-state'; -import { dropPoint } from 'prosemirror-transform'; - -/** -Create a plugin that, when added to a ProseMirror instance, -causes a decoration to show up at the drop position when something -is dragged over the editor. - -Nodes may add a `disableDropCursor` property to their spec to -control the showing of a drop cursor inside them. This may be a -boolean or a function, which will be called with a view and a -position, and should return a boolean. -*/ -function dropCursor(options = {}) { - return new Plugin({ - view(editorView) { return new DropCursorView(editorView, options); } - }); -} -class DropCursorView { - constructor(editorView, options) { - var _a; - this.editorView = editorView; - this.cursorPos = null; - this.element = null; - this.timeout = -1; - this.width = (_a = options.width) !== null && _a !== void 0 ? _a : 1; - this.color = options.color === false ? undefined : (options.color || "black"); - this.class = options.class; - this.handlers = ["dragover", "dragend", "drop", "dragleave"].map(name => { - let handler = (e) => { this[name](e); }; - editorView.dom.addEventListener(name, handler); - return { name, handler }; - }); - } - destroy() { - this.handlers.forEach(({ name, handler }) => this.editorView.dom.removeEventListener(name, handler)); - } - update(editorView, prevState) { - if (this.cursorPos != null && prevState.doc != editorView.state.doc) { - if (this.cursorPos > editorView.state.doc.content.size) - this.setCursor(null); - else - this.updateOverlay(); - } - } - setCursor(pos) { - if (pos == this.cursorPos) - return; - this.cursorPos = pos; - if (pos == null) { - this.element.parentNode.removeChild(this.element); - this.element = null; - } - else { - this.updateOverlay(); - } - } - updateOverlay() { - let $pos = this.editorView.state.doc.resolve(this.cursorPos); - let isBlock = !$pos.parent.inlineContent, rect; - let editorDOM = this.editorView.dom, editorRect = editorDOM.getBoundingClientRect(); - let scaleX = editorRect.width / editorDOM.offsetWidth, scaleY = editorRect.height / editorDOM.offsetHeight; - if (isBlock) { - let before = $pos.nodeBefore, after = $pos.nodeAfter; - if (before || after) { - let node = this.editorView.nodeDOM(this.cursorPos - (before ? before.nodeSize : 0)); - if (node) { - let nodeRect = node.getBoundingClientRect(); - let top = before ? nodeRect.bottom : nodeRect.top; - if (before && after) - top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2; - let halfWidth = (this.width / 2) * scaleY; - rect = { left: nodeRect.left, right: nodeRect.right, top: top - halfWidth, bottom: top + halfWidth }; - } - } - } - if (!rect) { - let coords = this.editorView.coordsAtPos(this.cursorPos); - let halfWidth = (this.width / 2) * scaleX; - rect = { left: coords.left - halfWidth, right: coords.left + halfWidth, top: coords.top, bottom: coords.bottom }; - } - let parent = this.editorView.dom.offsetParent; - if (!this.element) { - this.element = parent.appendChild(document.createElement("div")); - if (this.class) - this.element.className = this.class; - this.element.style.cssText = "position: absolute; z-index: 50; pointer-events: none;"; - if (this.color) { - this.element.style.backgroundColor = this.color; - } - } - this.element.classList.toggle("prosemirror-dropcursor-block", isBlock); - this.element.classList.toggle("prosemirror-dropcursor-inline", !isBlock); - let parentLeft, parentTop; - if (!parent || parent == document.body && getComputedStyle(parent).position == "static") { - parentLeft = -pageXOffset; - parentTop = -pageYOffset; - } - else { - let rect = parent.getBoundingClientRect(); - let parentScaleX = rect.width / parent.offsetWidth, parentScaleY = rect.height / parent.offsetHeight; - parentLeft = rect.left - parent.scrollLeft * parentScaleX; - parentTop = rect.top - parent.scrollTop * parentScaleY; - } - this.element.style.left = (rect.left - parentLeft) / scaleX + "px"; - this.element.style.top = (rect.top - parentTop) / scaleY + "px"; - this.element.style.width = (rect.right - rect.left) / scaleX + "px"; - this.element.style.height = (rect.bottom - rect.top) / scaleY + "px"; - } - scheduleRemoval(timeout) { - clearTimeout(this.timeout); - this.timeout = setTimeout(() => this.setCursor(null), timeout); - } - dragover(event) { - if (!this.editorView.editable) - return; - let pos = this.editorView.posAtCoords({ left: event.clientX, top: event.clientY }); - let node = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside); - let disableDropCursor = node && node.type.spec.disableDropCursor; - let disabled = typeof disableDropCursor == "function" - ? disableDropCursor(this.editorView, pos, event) - : disableDropCursor; - if (pos && !disabled) { - let target = pos.pos; - if (this.editorView.dragging && this.editorView.dragging.slice) { - let point = dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice); - if (point != null) - target = point; - } - this.setCursor(target); - this.scheduleRemoval(5000); - } - } - dragend() { - this.scheduleRemoval(20); - } - drop() { - this.scheduleRemoval(20); - } - dragleave(event) { - if (!this.editorView.dom.contains(event.relatedTarget)) - this.setCursor(null); - } -} - -export { dropCursor }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/package.json b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/package.json deleted file mode 100644 index 69a0f8c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "prosemirror-dropcursor", - "version": "1.8.2", - "description": "Drop cursor plugin for ProseMirror", - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "sideEffects": false, - "license": "MIT", - "maintainers": [ - { - "name": "Marijn Haverbeke", - "email": "marijn@haverbeke.berlin", - "web": "http://marijnhaverbeke.nl" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/prosemirror/prosemirror-dropcursor.git" - }, - "dependencies": { - "prosemirror-state": "^1.0.0", - "prosemirror-view": "^1.1.0", - "prosemirror-transform": "^1.1.0" - }, - "devDependencies": { - "@prosemirror/buildhelper": "^0.1.5" - }, - "scripts": { - "test": "pm-runtests", - "prepare": "pm-buildhelper src/dropcursor.ts" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/src/dropcursor.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/src/dropcursor.ts deleted file mode 100644 index 3d12e48..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/src/dropcursor.ts +++ /dev/null @@ -1,170 +0,0 @@ -import {Plugin, EditorState} from "prosemirror-state" -import {EditorView} from "prosemirror-view" -import {dropPoint} from "prosemirror-transform" - -interface DropCursorOptions { - /// The color of the cursor. Defaults to `black`. Use `false` to apply no color and rely only on class. - color?: string | false - - /// The precise width of the cursor in pixels. Defaults to 1. - width?: number - - /// A CSS class name to add to the cursor element. - class?: string -} - -/// Create a plugin that, when added to a ProseMirror instance, -/// causes a decoration to show up at the drop position when something -/// is dragged over the editor. -/// -/// Nodes may add a `disableDropCursor` property to their spec to -/// control the showing of a drop cursor inside them. This may be a -/// boolean or a function, which will be called with a view and a -/// position, and should return a boolean. -export function dropCursor(options: DropCursorOptions = {}): Plugin { - return new Plugin({ - view(editorView) { return new DropCursorView(editorView, options) } - }) -} - -// Add disableDropCursor to NodeSpec -declare module "prosemirror-model" { - interface NodeSpec { - disableDropCursor?: boolean | ((view: EditorView, pos: {pos: number, inside: number}, event: DragEvent) => boolean) - } -} - -class DropCursorView { - width: number - color: string | undefined - class: string | undefined - cursorPos: number | null = null - element: HTMLElement | null = null - timeout: number = -1 - handlers: {name: string, handler: (event: Event) => void}[] - - constructor(readonly editorView: EditorView, options: DropCursorOptions) { - this.width = options.width ?? 1 - this.color = options.color === false ? undefined : (options.color || "black") - this.class = options.class - - this.handlers = ["dragover", "dragend", "drop", "dragleave"].map(name => { - let handler = (e: Event) => { (this as any)[name](e) } - editorView.dom.addEventListener(name, handler) - return {name, handler} - }) - } - - destroy() { - this.handlers.forEach(({name, handler}) => this.editorView.dom.removeEventListener(name, handler)) - } - - update(editorView: EditorView, prevState: EditorState) { - if (this.cursorPos != null && prevState.doc != editorView.state.doc) { - if (this.cursorPos > editorView.state.doc.content.size) this.setCursor(null) - else this.updateOverlay() - } - } - - setCursor(pos: number | null) { - if (pos == this.cursorPos) return - this.cursorPos = pos - if (pos == null) { - this.element!.parentNode!.removeChild(this.element!) - this.element = null - } else { - this.updateOverlay() - } - } - - updateOverlay() { - let $pos = this.editorView.state.doc.resolve(this.cursorPos!) - let isBlock = !$pos.parent.inlineContent, rect - let editorDOM = this.editorView.dom, editorRect = editorDOM.getBoundingClientRect() - let scaleX = editorRect.width / editorDOM.offsetWidth, scaleY = editorRect.height / editorDOM.offsetHeight - if (isBlock) { - let before = $pos.nodeBefore, after = $pos.nodeAfter - if (before || after) { - let node = this.editorView.nodeDOM(this.cursorPos! - (before ? before.nodeSize : 0)) - if (node) { - let nodeRect = (node as HTMLElement).getBoundingClientRect() - let top = before ? nodeRect.bottom : nodeRect.top - if (before && after) - top = (top + (this.editorView.nodeDOM(this.cursorPos!) as HTMLElement).getBoundingClientRect().top) / 2 - let halfWidth = (this.width / 2) * scaleY - rect = {left: nodeRect.left, right: nodeRect.right, top: top - halfWidth, bottom: top + halfWidth} - } - } - } - if (!rect) { - let coords = this.editorView.coordsAtPos(this.cursorPos!) - let halfWidth = (this.width / 2) * scaleX - rect = {left: coords.left - halfWidth, right: coords.left + halfWidth, top: coords.top, bottom: coords.bottom} - } - - let parent = this.editorView.dom.offsetParent as HTMLElement - if (!this.element) { - this.element = parent.appendChild(document.createElement("div")) - if (this.class) this.element.className = this.class - this.element.style.cssText = "position: absolute; z-index: 50; pointer-events: none;" - if (this.color) { - this.element.style.backgroundColor = this.color - } - } - this.element.classList.toggle("prosemirror-dropcursor-block", isBlock) - this.element.classList.toggle("prosemirror-dropcursor-inline", !isBlock) - let parentLeft, parentTop - if (!parent || parent == document.body && getComputedStyle(parent).position == "static") { - parentLeft = -pageXOffset - parentTop = -pageYOffset - } else { - let rect = parent.getBoundingClientRect() - let parentScaleX = rect.width / parent.offsetWidth, parentScaleY = rect.height / parent.offsetHeight - parentLeft = rect.left - parent.scrollLeft * parentScaleX - parentTop = rect.top - parent.scrollTop * parentScaleY - } - this.element.style.left = (rect.left - parentLeft) / scaleX + "px" - this.element.style.top = (rect.top - parentTop) / scaleY + "px" - this.element.style.width = (rect.right - rect.left) / scaleX + "px" - this.element.style.height = (rect.bottom - rect.top) / scaleY + "px" - } - - scheduleRemoval(timeout: number) { - clearTimeout(this.timeout) - this.timeout = setTimeout(() => this.setCursor(null), timeout) - } - - dragover(event: DragEvent) { - if (!this.editorView.editable) return - let pos = this.editorView.posAtCoords({left: event.clientX, top: event.clientY}) - - let node = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside) - let disableDropCursor = node && node.type.spec.disableDropCursor - let disabled = typeof disableDropCursor == "function" - ? disableDropCursor(this.editorView, pos!, event) - : disableDropCursor - - if (pos && !disabled) { - let target = pos.pos - if (this.editorView.dragging && this.editorView.dragging.slice) { - let point = dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice) - if (point != null) target = point - } - this.setCursor(target) - this.scheduleRemoval(5000) - } - } - - dragend() { - this.scheduleRemoval(20) - } - - drop() { - this.scheduleRemoval(20) - } - - dragleave(event: DragEvent) { - if (!this.editorView.dom.contains((event as any).relatedTarget)) - this.setCursor(null) - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-state b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-state deleted file mode 120000 index f732de9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-state +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-state@1.4.4/node_modules/prosemirror-state \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-transform b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-transform deleted file mode 120000 index d9fd2cc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-transform +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-transform@1.12.0/node_modules/prosemirror-transform \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-view b/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-view deleted file mode 120000 index ed4297c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-view +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-view@1.41.8/node_modules/prosemirror-view \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/CHANGELOG.md deleted file mode 100644 index 3ef0978..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/CHANGELOG.md +++ /dev/null @@ -1,122 +0,0 @@ -## 1.4.1 (2026-03-10) - -### Bug fixes - -Make sure no gap cursors are created inside inline nodes with content. - -## 1.4.0 (2025-10-15) - -### New features - -Nodes can now set a `createGapCursor: true` property on their spec to allow gap cursors to appear next to them. - -## 1.3.2 (2023-05-17) - -### Bug fixes - -Include CommonJS type declarations in the package to please new TypeScript resolution settings. - -## 1.3.1 (2022-06-07) - -### Bug fixes - -Export CSS file from package.json. - -## 1.3.0 (2022-05-30) - -### New features - -Include TypeScript type declarations. - -## 1.2.2 (2022-02-25) - -### Bug fixes - -Make sure compositions started from a gap cursor have their inline context created in advance, so that they don't get aborted right away. - -## 1.2.1 (2021-12-20) - -### Bug fixes - -Fix an issue where a gap cursor would fail to show up at the start or end of some isolating nodes. - -## 1.2.0 (2021-09-20) - -### New features - -The `GapCursor` constructor is now public. - -## 1.1.5 (2020-04-05) - -### Bug fixes - -Fix an issue where the gap cursor plugin would sometimes cause perfectly selectable content to be skipped when moving the selection with the arrow keys. - -## 1.1.4 (2020-03-20) - -### Bug fixes - -Improve behavior around unselectable block nodes. - -## 1.1.3 (2020-01-22) - -### Bug fixes - -Fix a crash in documents that have a textblock as top node. - -## 1.1.2 (2019-11-20) - -### Bug fixes - -Rename ES module files to use a .js extension, since Webpack gets confused by .mjs - -## 1.1.1 (2019-11-19) - -### Bug fixes - -The file referred to in the package's `module` field now is compiled down to ES5. - -## 1.1.0 (2019-11-08) - -### New features - -Add a `module` field to package json file. - -## 1.0.4 (2019-06-24) - -### Bug fixes - -Do not show a gap cursor when the view isn't editable. - -## 1.0.3 (2018-10-01) - -### Bug fixes - -Don't blanket-forbid gap cursors next to textblocks - -## 1.0.2 (2018-03-15) - -### Bug fixes - -Throw errors, rather than constructing invalid objects, when deserializing from invalid JSON data. - -## 1.0.1 (2018-02-16) - -### Bug fixes - -Prevent issue where clicking on a selectable node near a valid gap cursor position would create a gap cursor rather than select the node. - -## 1.0.0 (2017-10-13) - -### New features - -Valid gap cursor positions are not determined in a way that allows them inside nested nodes. By default, any position where a textblock can be inserted is valid gap cursor position. - -Nodes can override whether they allow gap cursors with the `allowGapCursor` property in their spec. - -## 0.23.1 (2017-09-19) - -### Bug fixes - -Moving out of a table with the arrow keys now creates a gap cursor when appropriate. - diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/CONTRIBUTING.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/CONTRIBUTING.md deleted file mode 100644 index f2a345d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/CONTRIBUTING.md +++ /dev/null @@ -1,104 +0,0 @@ -# How to contribute - -- [Getting help](#getting-help) -- [Submitting bug reports](#submitting-bug-reports) -- [Contributing code](#contributing-code) - -## Getting help - -Community discussion, questions, and informal bug reporting is done on the -[discuss.ProseMirror forum](http://discuss.prosemirror.net). - -## Submitting bug reports - -Report bugs on the -[GitHub issue tracker](http://github.com/prosemirror/prosemirror/issues). -Before reporting a bug, please read these pointers. - -- The issue tracker is for *bugs*, not requests for help. Questions - should be asked on the [forum](http://discuss.prosemirror.net). - -- Include information about the version of the code that exhibits the - problem. For browser-related issues, include the browser and browser - version on which the problem occurred. - -- Mention very precisely what went wrong. "X is broken" is not a good - bug report. What did you expect to happen? What happened instead? - Describe the exact steps a maintainer has to take to make the - problem occur. A screencast can be useful, but is no substitute for - a textual description. - -- A great way to make it easy to reproduce your problem, if it can not - be trivially reproduced on the website demos, is to submit a script - that triggers the issue. - -## Contributing code - -If you want to make a change that involves a significant overhaul of -the code or introduces a user-visible new feature, create an -[RFC](https://github.com/ProseMirror/rfcs/) first with your proposal. - -- Make sure you have a [GitHub Account](https://github.com/signup/free) - -- Fork the relevant repository - ([how to fork a repo](https://help.github.com/articles/fork-a-repo)) - -- Create a local checkout of the code. You can use the - [main repository](https://github.com/prosemirror/prosemirror) to - easily check out all core modules. - -- Make your changes, and commit them - -- Follow the code style of the rest of the project (see below). Run - `npm run lint` (in the main repository checkout) to make sure that - the linter is happy. - -- If your changes are easy to test or likely to regress, add tests in - the relevant `test/` directory. Either put them in an existing - `test-*.js` file, if they fit there, or add a new file. - -- Make sure all tests pass. Run `npm run test` to verify tests pass - (you will need Node.js v6+). - -- Submit a pull request ([how to create a pull request](https://help.github.com/articles/fork-a-repo)). - Don't put more than one feature/fix in a single pull request. - -By contributing code to ProseMirror you - - - Agree to license the contributed code under the project's [MIT - license](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE). - - - Confirm that you have the right to contribute and license the code - in question. (Either you hold all rights on the code, or the rights - holder has explicitly granted the right to use it like this, - through a compatible open source license or through a direct - agreement with you.) - -### Coding standards - -- ES6 syntax, targeting an ES5 runtime (i.e. don't use library - elements added by ES6, don't use ES7/ES.next syntax). - -- 2 spaces per indentation level, no tabs. - -- No semicolons except when necessary. - -- Follow the surrounding code when it comes to spacing, brace - placement, etc. - -- Brace-less single-statement bodies are encouraged (whenever they - don't impact readability). - -- [getdocs](https://github.com/marijnh/getdocs)-style doc comments - above items that are part of the public API. - -- When documenting non-public items, you can put the type after a - single colon, so that getdocs doesn't pick it up and add it to the - API reference. - -- The linter (`npm run lint`) complains about unused variables and - functions. Prefix their names with an underscore to muffle it. - -- ProseMirror does *not* follow JSHint or JSLint prescribed style. - Patches that try to 'fix' code to pass one of these linters will not - be accepted. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/LICENSE b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/LICENSE deleted file mode 100644 index 7e2295b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2015-2017 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/README.md deleted file mode 100644 index 0de01c4..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# prosemirror-gapcursor - -[ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-gapcursor/blob/master/CHANGELOG.md) ] - -This is a [core module](https://prosemirror.net/docs/ref/#gapcursor) of [ProseMirror](https://prosemirror.net). -ProseMirror is a well-behaved rich semantic content editor based on -contentEditable, with support for collaborative editing and custom -document schemas. - -This [plugin](https://prosemirror.net/docs/ref/#gapcursor) implements a -block-level cursor that can be used to focus places that don't allow -regular selection (such as positions that have a leaf block node, -table, or the end of the document both before and after them). Make -sure you load `style/gapcursor.css` (or define your own styling for -the cursor). - -The [project page](https://prosemirror.net) has more information, a -number of [examples](https://prosemirror.net/examples/) and the -[documentation](https://prosemirror.net/docs/). - -This code is released under an -[MIT license](https://github.com/prosemirror/prosemirror/tree/master/LICENSE). -There's a [forum](http://discuss.prosemirror.net) for general -discussion and support requests, and the -[Github bug tracker](https://github.com/prosemirror/prosemirror/issues) -is the place to report issues. - -We aim to be an inclusive, welcoming community. To make that explicit, -we have a [code of -conduct](http://contributor-covenant.org/version/1/1/0/) that applies -to communication around the project. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.cjs deleted file mode 100644 index 2ad989f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.cjs +++ /dev/null @@ -1,239 +0,0 @@ -'use strict'; - -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } -var prosemirrorKeymap = require('prosemirror-keymap'); -var prosemirrorState = require('prosemirror-state'); -var prosemirrorModel = require('prosemirror-model'); -var prosemirrorView = require('prosemirror-view'); -var GapCursor = function (_prosemirrorState$Sel) { - _inherits(GapCursor, _prosemirrorState$Sel); - var _super = _createSuper(GapCursor); - function GapCursor($pos) { - _classCallCheck(this, GapCursor); - return _super.call(this, $pos, $pos); - } - _createClass(GapCursor, [{ - key: "map", - value: function map(doc, mapping) { - var $pos = doc.resolve(mapping.map(this.head)); - return GapCursor.valid($pos) ? new GapCursor($pos) : prosemirrorState.Selection.near($pos); - } - }, { - key: "content", - value: function content() { - return prosemirrorModel.Slice.empty; - } - }, { - key: "eq", - value: function eq(other) { - return other instanceof GapCursor && other.head == this.head; - } - }, { - key: "toJSON", - value: function toJSON() { - return { - type: "gapcursor", - pos: this.head - }; - } - }, { - key: "getBookmark", - value: function getBookmark() { - return new GapBookmark(this.anchor); - } - }], [{ - key: "fromJSON", - value: function fromJSON(doc, json) { - if (typeof json.pos != "number") throw new RangeError("Invalid input for GapCursor.fromJSON"); - return new GapCursor(doc.resolve(json.pos)); - } - }, { - key: "valid", - value: function valid($pos) { - var parent = $pos.parent; - if (parent.inlineContent || !closedBefore($pos) || !closedAfter($pos)) return false; - var override = parent.type.spec.allowGapCursor; - if (override != null) return override; - var deflt = parent.contentMatchAt($pos.index()).defaultType; - return deflt && deflt.isTextblock; - } - }, { - key: "findGapCursorFrom", - value: function findGapCursorFrom($pos, dir) { - var mustMove = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - search: for (;;) { - if (!mustMove && GapCursor.valid($pos)) return $pos; - var pos = $pos.pos, - next = null; - for (var d = $pos.depth;; d--) { - var parent = $pos.node(d); - if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) { - next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1); - break; - } else if (d == 0) { - return null; - } - pos += dir; - var $cur = $pos.doc.resolve(pos); - if (GapCursor.valid($cur)) return $cur; - } - for (;;) { - var inside = dir > 0 ? next.firstChild : next.lastChild; - if (!inside) { - if (next.isAtom && !next.isText && !prosemirrorState.NodeSelection.isSelectable(next)) { - $pos = $pos.doc.resolve(pos + next.nodeSize * dir); - mustMove = false; - continue search; - } - break; - } - next = inside; - pos += dir; - var _$cur = $pos.doc.resolve(pos); - if (GapCursor.valid(_$cur)) return _$cur; - } - return null; - } - } - }]); - return GapCursor; -}(prosemirrorState.Selection); -GapCursor.prototype.visible = false; -GapCursor.findFrom = GapCursor.findGapCursorFrom; -prosemirrorState.Selection.jsonID("gapcursor", GapCursor); -var GapBookmark = function () { - function GapBookmark(pos) { - _classCallCheck(this, GapBookmark); - this.pos = pos; - } - _createClass(GapBookmark, [{ - key: "map", - value: function map(mapping) { - return new GapBookmark(mapping.map(this.pos)); - } - }, { - key: "resolve", - value: function resolve(doc) { - var $pos = doc.resolve(this.pos); - return GapCursor.valid($pos) ? new GapCursor($pos) : prosemirrorState.Selection.near($pos); - } - }]); - return GapBookmark; -}(); -function needsGap(type) { - return type.isAtom || type.spec.isolating || type.spec.createGapCursor; -} -function closedBefore($pos) { - for (var d = $pos.depth; d >= 0; d--) { - var index = $pos.index(d), - parent = $pos.node(d); - if (index == 0) { - if (parent.type.spec.isolating) return true; - continue; - } - for (var before = parent.child(index - 1);; before = before.lastChild) { - if (before.childCount == 0 && !before.inlineContent || needsGap(before.type)) return true; - if (before.inlineContent) return false; - } - } - return true; -} -function closedAfter($pos) { - for (var d = $pos.depth; d >= 0; d--) { - var index = $pos.indexAfter(d), - parent = $pos.node(d); - if (index == parent.childCount) { - if (parent.type.spec.isolating) return true; - continue; - } - for (var after = parent.child(index);; after = after.firstChild) { - if (after.childCount == 0 && !after.inlineContent || needsGap(after.type)) return true; - if (after.inlineContent) return false; - } - } - return true; -} -function gapCursor() { - return new prosemirrorState.Plugin({ - props: { - decorations: drawGapCursor, - createSelectionBetween: function createSelectionBetween(_view, $anchor, $head) { - return $anchor.pos == $head.pos && GapCursor.valid($head) ? new GapCursor($head) : null; - }, - handleClick: handleClick, - handleKeyDown: handleKeyDown, - handleDOMEvents: { - beforeinput: beforeinput - } - } - }); -} -var handleKeyDown = prosemirrorKeymap.keydownHandler({ - "ArrowLeft": arrow("horiz", -1), - "ArrowRight": arrow("horiz", 1), - "ArrowUp": arrow("vert", -1), - "ArrowDown": arrow("vert", 1) -}); -function arrow(axis, dir) { - var dirStr = axis == "vert" ? dir > 0 ? "down" : "up" : dir > 0 ? "right" : "left"; - return function (state, dispatch, view) { - var sel = state.selection; - var $start = dir > 0 ? sel.$to : sel.$from, - mustMove = sel.empty; - if (sel instanceof prosemirrorState.TextSelection) { - if (!view.endOfTextblock(dirStr) || $start.depth == 0) return false; - mustMove = false; - $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before()); - } - var $found = GapCursor.findGapCursorFrom($start, dir, mustMove); - if (!$found) return false; - if (dispatch) dispatch(state.tr.setSelection(new GapCursor($found))); - return true; - }; -} -function handleClick(view, pos, event) { - if (!view || !view.editable) return false; - var $pos = view.state.doc.resolve(pos); - if (!GapCursor.valid($pos)) return false; - var clickPos = view.posAtCoords({ - left: event.clientX, - top: event.clientY - }); - if (clickPos && clickPos.inside > -1 && prosemirrorState.NodeSelection.isSelectable(view.state.doc.nodeAt(clickPos.inside))) return false; - view.dispatch(view.state.tr.setSelection(new GapCursor($pos))); - return true; -} -function beforeinput(view, event) { - if (event.inputType != "insertCompositionText" || !(view.state.selection instanceof GapCursor)) return false; - var $from = view.state.selection.$from; - var insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text); - if (!insert) return false; - var frag = prosemirrorModel.Fragment.empty; - for (var i = insert.length - 1; i >= 0; i--) frag = prosemirrorModel.Fragment.from(insert[i].createAndFill(null, frag)); - var tr = view.state.tr.replace($from.pos, $from.pos, new prosemirrorModel.Slice(frag, 0, 0)); - tr.setSelection(prosemirrorState.TextSelection.near(tr.doc.resolve($from.pos + 1))); - view.dispatch(tr); - return false; -} -function drawGapCursor(state) { - if (!(state.selection instanceof GapCursor)) return null; - var node = document.createElement("div"); - node.className = "ProseMirror-gapcursor"; - return prosemirrorView.DecorationSet.create(state.doc, [prosemirrorView.Decoration.widget(state.selection.head, node, { - key: "gapcursor" - })]); -} -exports.GapCursor = GapCursor; -exports.gapCursor = gapCursor; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.d.cts deleted file mode 100644 index f6b196b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.d.cts +++ /dev/null @@ -1,31 +0,0 @@ -import { Selection, Plugin } from 'prosemirror-state'; -import { ResolvedPos, Node, Slice } from 'prosemirror-model'; -import { Mappable } from 'prosemirror-transform'; - -/** -Gap cursor selections are represented using this class. Its -`$anchor` and `$head` properties both point at the cursor position. -*/ -declare class GapCursor extends Selection { - /** - Create a gap cursor. - */ - constructor($pos: ResolvedPos); - map(doc: Node, mapping: Mappable): Selection; - content(): Slice; - eq(other: Selection): boolean; - toJSON(): any; -} - -/** -Create a gap cursor plugin. When enabled, this will capture clicks -near and arrow-key-motion past places that don't have a normally -selectable position nearby, and create a gap cursor selection for -them. The cursor is drawn as an element with class -`ProseMirror-gapcursor`. You can either include -`style/gapcursor.css` from the package's directory or add your own -styles to make it visible. -*/ -declare function gapCursor(): Plugin; - -export { GapCursor, gapCursor }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.d.ts deleted file mode 100644 index f6b196b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Selection, Plugin } from 'prosemirror-state'; -import { ResolvedPos, Node, Slice } from 'prosemirror-model'; -import { Mappable } from 'prosemirror-transform'; - -/** -Gap cursor selections are represented using this class. Its -`$anchor` and `$head` properties both point at the cursor position. -*/ -declare class GapCursor extends Selection { - /** - Create a gap cursor. - */ - constructor($pos: ResolvedPos); - map(doc: Node, mapping: Mappable): Selection; - content(): Slice; - eq(other: Selection): boolean; - toJSON(): any; -} - -/** -Create a gap cursor plugin. When enabled, this will capture clicks -near and arrow-key-motion past places that don't have a normally -selectable position nearby, and create a gap cursor selection for -them. The cursor is drawn as an element with class -`ProseMirror-gapcursor`. You can either include -`style/gapcursor.css` from the package's directory or add your own -styles to make it visible. -*/ -declare function gapCursor(): Plugin; - -export { GapCursor, gapCursor }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.js b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.js deleted file mode 100644 index 9d70c7d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.js +++ /dev/null @@ -1,239 +0,0 @@ -import { keydownHandler } from 'prosemirror-keymap'; -import { Selection, NodeSelection, TextSelection, Plugin } from 'prosemirror-state'; -import { Slice, Fragment } from 'prosemirror-model'; -import { DecorationSet, Decoration } from 'prosemirror-view'; - -/** -Gap cursor selections are represented using this class. Its -`$anchor` and `$head` properties both point at the cursor position. -*/ -class GapCursor extends Selection { - /** - Create a gap cursor. - */ - constructor($pos) { - super($pos, $pos); - } - map(doc, mapping) { - let $pos = doc.resolve(mapping.map(this.head)); - return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos); - } - content() { return Slice.empty; } - eq(other) { - return other instanceof GapCursor && other.head == this.head; - } - toJSON() { - return { type: "gapcursor", pos: this.head }; - } - /** - @internal - */ - static fromJSON(doc, json) { - if (typeof json.pos != "number") - throw new RangeError("Invalid input for GapCursor.fromJSON"); - return new GapCursor(doc.resolve(json.pos)); - } - /** - @internal - */ - getBookmark() { return new GapBookmark(this.anchor); } - /** - @internal - */ - static valid($pos) { - let parent = $pos.parent; - if (parent.inlineContent || !closedBefore($pos) || !closedAfter($pos)) - return false; - let override = parent.type.spec.allowGapCursor; - if (override != null) - return override; - let deflt = parent.contentMatchAt($pos.index()).defaultType; - return deflt && deflt.isTextblock; - } - /** - @internal - */ - static findGapCursorFrom($pos, dir, mustMove = false) { - search: for (;;) { - if (!mustMove && GapCursor.valid($pos)) - return $pos; - let pos = $pos.pos, next = null; - // Scan up from this position - for (let d = $pos.depth;; d--) { - let parent = $pos.node(d); - if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) { - next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1); - break; - } - else if (d == 0) { - return null; - } - pos += dir; - let $cur = $pos.doc.resolve(pos); - if (GapCursor.valid($cur)) - return $cur; - } - // And then down into the next node - for (;;) { - let inside = dir > 0 ? next.firstChild : next.lastChild; - if (!inside) { - if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) { - $pos = $pos.doc.resolve(pos + next.nodeSize * dir); - mustMove = false; - continue search; - } - break; - } - next = inside; - pos += dir; - let $cur = $pos.doc.resolve(pos); - if (GapCursor.valid($cur)) - return $cur; - } - return null; - } - } -} -GapCursor.prototype.visible = false; -GapCursor.findFrom = GapCursor.findGapCursorFrom; -Selection.jsonID("gapcursor", GapCursor); -class GapBookmark { - constructor(pos) { - this.pos = pos; - } - map(mapping) { - return new GapBookmark(mapping.map(this.pos)); - } - resolve(doc) { - let $pos = doc.resolve(this.pos); - return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos); - } -} -function needsGap(type) { - return type.isAtom || type.spec.isolating || type.spec.createGapCursor; -} -function closedBefore($pos) { - for (let d = $pos.depth; d >= 0; d--) { - let index = $pos.index(d), parent = $pos.node(d); - // At the start of this parent, look at next one - if (index == 0) { - if (parent.type.spec.isolating) - return true; - continue; - } - // See if the node before (or its first ancestor) is closed - for (let before = parent.child(index - 1);; before = before.lastChild) { - if ((before.childCount == 0 && !before.inlineContent) || needsGap(before.type)) - return true; - if (before.inlineContent) - return false; - } - } - // Hit start of document - return true; -} -function closedAfter($pos) { - for (let d = $pos.depth; d >= 0; d--) { - let index = $pos.indexAfter(d), parent = $pos.node(d); - if (index == parent.childCount) { - if (parent.type.spec.isolating) - return true; - continue; - } - for (let after = parent.child(index);; after = after.firstChild) { - if ((after.childCount == 0 && !after.inlineContent) || needsGap(after.type)) - return true; - if (after.inlineContent) - return false; - } - } - return true; -} - -/** -Create a gap cursor plugin. When enabled, this will capture clicks -near and arrow-key-motion past places that don't have a normally -selectable position nearby, and create a gap cursor selection for -them. The cursor is drawn as an element with class -`ProseMirror-gapcursor`. You can either include -`style/gapcursor.css` from the package's directory or add your own -styles to make it visible. -*/ -function gapCursor() { - return new Plugin({ - props: { - decorations: drawGapCursor, - createSelectionBetween(_view, $anchor, $head) { - return $anchor.pos == $head.pos && GapCursor.valid($head) ? new GapCursor($head) : null; - }, - handleClick, - handleKeyDown, - handleDOMEvents: { beforeinput: beforeinput } - } - }); -} -const handleKeyDown = keydownHandler({ - "ArrowLeft": arrow("horiz", -1), - "ArrowRight": arrow("horiz", 1), - "ArrowUp": arrow("vert", -1), - "ArrowDown": arrow("vert", 1) -}); -function arrow(axis, dir) { - const dirStr = axis == "vert" ? (dir > 0 ? "down" : "up") : (dir > 0 ? "right" : "left"); - return function (state, dispatch, view) { - let sel = state.selection; - let $start = dir > 0 ? sel.$to : sel.$from, mustMove = sel.empty; - if (sel instanceof TextSelection) { - if (!view.endOfTextblock(dirStr) || $start.depth == 0) - return false; - mustMove = false; - $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before()); - } - let $found = GapCursor.findGapCursorFrom($start, dir, mustMove); - if (!$found) - return false; - if (dispatch) - dispatch(state.tr.setSelection(new GapCursor($found))); - return true; - }; -} -function handleClick(view, pos, event) { - if (!view || !view.editable) - return false; - let $pos = view.state.doc.resolve(pos); - if (!GapCursor.valid($pos)) - return false; - let clickPos = view.posAtCoords({ left: event.clientX, top: event.clientY }); - if (clickPos && clickPos.inside > -1 && NodeSelection.isSelectable(view.state.doc.nodeAt(clickPos.inside))) - return false; - view.dispatch(view.state.tr.setSelection(new GapCursor($pos))); - return true; -} -// This is a hack that, when a composition starts while a gap cursor -// is active, quickly creates an inline context for the composition to -// happen in, to avoid it being aborted by the DOM selection being -// moved into a valid position. -function beforeinput(view, event) { - if (event.inputType != "insertCompositionText" || !(view.state.selection instanceof GapCursor)) - return false; - let { $from } = view.state.selection; - let insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text); - if (!insert) - return false; - let frag = Fragment.empty; - for (let i = insert.length - 1; i >= 0; i--) - frag = Fragment.from(insert[i].createAndFill(null, frag)); - let tr = view.state.tr.replace($from.pos, $from.pos, new Slice(frag, 0, 0)); - tr.setSelection(TextSelection.near(tr.doc.resolve($from.pos + 1))); - view.dispatch(tr); - return false; -} -function drawGapCursor(state) { - if (!(state.selection instanceof GapCursor)) - return null; - let node = document.createElement("div"); - node.className = "ProseMirror-gapcursor"; - return DecorationSet.create(state.doc, [Decoration.widget(state.selection.head, node, { key: "gapcursor" })]); -} - -export { GapCursor, gapCursor }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/package.json b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/package.json deleted file mode 100644 index 2b0ac4a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "prosemirror-gapcursor", - "version": "1.4.1", - "description": "ProseMirror plugin for cursors at normally impossible-to-reach positions", - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "./style/gapcursor.css": "./style/gapcursor.css" - }, - "sideEffects": ["./style/gapcursor.css"], - "style": "style/gapcursor.css", - "license": "MIT", - "maintainers": [ - { - "name": "Marijn Haverbeke", - "email": "marijn@haverbeke.berlin", - "web": "http://marijnhaverbeke.nl" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/prosemirror/prosemirror-gapcursor.git" - }, - "dependencies": { - "prosemirror-keymap": "^1.0.0", - "prosemirror-model": "^1.0.0", - "prosemirror-state": "^1.0.0", - "prosemirror-view": "^1.0.0" - }, - "devDependencies": { - "@prosemirror/buildhelper": "^0.1.5" - }, - "scripts": { - "prepare": "pm-buildhelper src/index.ts", - "test": "pm-runtests" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/README.md deleted file mode 100644 index 7ed7441..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/README.md +++ /dev/null @@ -1,21 +0,0 @@ -This is a plugin that adds a type of selection for focusing places -that don't allow regular selection (such as positions that have a leaf -block node, table, or the end of the document both before and after -them). By default, leaf blocks and isolating nodes will allow gap -cursors to appear next to them. You can add a `creatGapCursor: true` -property to a block node's spec to make them appear next to other -nodes as well. - -You'll probably want to load `style/gapcursor.css`, which contains -basic styling for the simulated cursor (as a short, blinking -horizontal stripe). - -By default, gap cursor are only allowed in places where the default -content node (in the schema content constraints) is a textblock node. -You can customize this by adding an `allowGapCursor` property to your -node specs—if it's true, gap cursor are allowed everywhere in that -node, if it's `false` they are never allowed. - -@gapCursor - -@GapCursor diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/gapcursor.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/gapcursor.ts deleted file mode 100644 index bda5f50..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/gapcursor.ts +++ /dev/null @@ -1,141 +0,0 @@ -import {Selection, NodeSelection} from "prosemirror-state" -import {Slice, ResolvedPos, Node, NodeType} from "prosemirror-model" -import {Mappable} from "prosemirror-transform" - -/// Gap cursor selections are represented using this class. Its -/// `$anchor` and `$head` properties both point at the cursor position. -export class GapCursor extends Selection { - /// Create a gap cursor. - constructor($pos: ResolvedPos) { - super($pos, $pos) - } - - map(doc: Node, mapping: Mappable): Selection { - let $pos = doc.resolve(mapping.map(this.head)) - return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos) - } - - content() { return Slice.empty } - - eq(other: Selection): boolean { - return other instanceof GapCursor && other.head == this.head - } - - toJSON(): any { - return {type: "gapcursor", pos: this.head} - } - - /// @internal - static fromJSON(doc: Node, json: any): GapCursor { - if (typeof json.pos != "number") throw new RangeError("Invalid input for GapCursor.fromJSON") - return new GapCursor(doc.resolve(json.pos)) - } - - /// @internal - getBookmark() { return new GapBookmark(this.anchor) } - - /// @internal - static valid($pos: ResolvedPos) { - let parent = $pos.parent - if (parent.inlineContent || !closedBefore($pos) || !closedAfter($pos)) return false - let override = parent.type.spec.allowGapCursor - if (override != null) return override - let deflt = parent.contentMatchAt($pos.index()).defaultType - return deflt && deflt.isTextblock - } - - /// @internal - static findGapCursorFrom($pos: ResolvedPos, dir: number, mustMove = false) { - search: for (;;) { - if (!mustMove && GapCursor.valid($pos)) return $pos - let pos = $pos.pos, next = null - // Scan up from this position - for (let d = $pos.depth;; d--) { - let parent = $pos.node(d) - if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) { - next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1) - break - } else if (d == 0) { - return null - } - pos += dir - let $cur = $pos.doc.resolve(pos) - if (GapCursor.valid($cur)) return $cur - } - - // And then down into the next node - for (;;) { - let inside: Node | null = dir > 0 ? next.firstChild : next.lastChild - if (!inside) { - if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) { - $pos = $pos.doc.resolve(pos + next.nodeSize * dir) - mustMove = false - continue search - } - break - } - next = inside - pos += dir - let $cur = $pos.doc.resolve(pos) - if (GapCursor.valid($cur)) return $cur - } - - return null - } - } -} - -GapCursor.prototype.visible = false - -;(GapCursor as any).findFrom = GapCursor.findGapCursorFrom - -Selection.jsonID("gapcursor", GapCursor) - -class GapBookmark { - constructor(readonly pos: number) {} - - map(mapping: Mappable) { - return new GapBookmark(mapping.map(this.pos)) - } - resolve(doc: Node) { - let $pos = doc.resolve(this.pos) - return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos) - } -} - -function needsGap(type: NodeType) { - return type.isAtom || type.spec.isolating || type.spec.createGapCursor -} - -function closedBefore($pos: ResolvedPos) { - for (let d = $pos.depth; d >= 0; d--) { - let index = $pos.index(d), parent = $pos.node(d) - // At the start of this parent, look at next one - if (index == 0) { - if (parent.type.spec.isolating) return true - continue - } - // See if the node before (or its first ancestor) is closed - for (let before = parent.child(index - 1);; before = before.lastChild!) { - if ((before.childCount == 0 && !before.inlineContent) || needsGap(before.type)) return true - if (before.inlineContent) return false - } - } - // Hit start of document - return true -} - -function closedAfter($pos: ResolvedPos) { - for (let d = $pos.depth; d >= 0; d--) { - let index = $pos.indexAfter(d), parent = $pos.node(d) - if (index == parent.childCount) { - if (parent.type.spec.isolating) return true - continue - } - for (let after = parent.child(index);; after = after.firstChild!) { - if ((after.childCount == 0 && !after.inlineContent) || needsGap(after.type)) return true - if (after.inlineContent) return false - } - } - return true -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/index.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/index.ts deleted file mode 100644 index 3d2fb3f..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/src/index.ts +++ /dev/null @@ -1,91 +0,0 @@ -import {keydownHandler} from "prosemirror-keymap" -import {TextSelection, NodeSelection, Plugin, Command, EditorState} from "prosemirror-state" -import {Fragment, Slice} from "prosemirror-model" -import {Decoration, DecorationSet, EditorView} from "prosemirror-view" - -import {GapCursor} from "./gapcursor" - -/// Create a gap cursor plugin. When enabled, this will capture clicks -/// near and arrow-key-motion past places that don't have a normally -/// selectable position nearby, and create a gap cursor selection for -/// them. The cursor is drawn as an element with class -/// `ProseMirror-gapcursor`. You can either include -/// `style/gapcursor.css` from the package's directory or add your own -/// styles to make it visible. -export function gapCursor(): Plugin { - return new Plugin({ - props: { - decorations: drawGapCursor, - - createSelectionBetween(_view, $anchor, $head) { - return $anchor.pos == $head.pos && GapCursor.valid($head) ? new GapCursor($head) : null - }, - - handleClick, - handleKeyDown, - handleDOMEvents: {beforeinput: beforeinput as any} - } - }) -} - -export {GapCursor} - -const handleKeyDown = keydownHandler({ - "ArrowLeft": arrow("horiz", -1), - "ArrowRight": arrow("horiz", 1), - "ArrowUp": arrow("vert", -1), - "ArrowDown": arrow("vert", 1) -}) - -function arrow(axis: "vert" | "horiz", dir: number): Command { - const dirStr = axis == "vert" ? (dir > 0 ? "down" : "up") : (dir > 0 ? "right" : "left") - return function(state, dispatch, view) { - let sel = state.selection - let $start = dir > 0 ? sel.$to : sel.$from, mustMove = sel.empty - if (sel instanceof TextSelection) { - if (!view!.endOfTextblock(dirStr) || $start.depth == 0) return false - mustMove = false - $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before()) - } - let $found = GapCursor.findGapCursorFrom($start, dir, mustMove) - if (!$found) return false - if (dispatch) dispatch(state.tr.setSelection(new GapCursor($found))) - return true - } -} - -function handleClick(view: EditorView, pos: number, event: MouseEvent) { - if (!view || !view.editable) return false - let $pos = view.state.doc.resolve(pos) - if (!GapCursor.valid($pos)) return false - let clickPos = view.posAtCoords({left: event.clientX, top: event.clientY}) - if (clickPos && clickPos.inside > -1 && NodeSelection.isSelectable(view.state.doc.nodeAt(clickPos.inside)!)) return false - view.dispatch(view.state.tr.setSelection(new GapCursor($pos))) - return true -} - -// This is a hack that, when a composition starts while a gap cursor -// is active, quickly creates an inline context for the composition to -// happen in, to avoid it being aborted by the DOM selection being -// moved into a valid position. -function beforeinput(view: EditorView, event: InputEvent) { - if (event.inputType != "insertCompositionText" || !(view.state.selection instanceof GapCursor)) return false - - let {$from} = view.state.selection - let insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text) - if (!insert) return false - - let frag = Fragment.empty - for (let i = insert.length - 1; i >= 0; i--) frag = Fragment.from(insert[i].createAndFill(null, frag)) - let tr = view.state.tr.replace($from.pos, $from.pos, new Slice(frag, 0, 0)) - tr.setSelection(TextSelection.near(tr.doc.resolve($from.pos + 1))) - view.dispatch(tr) - return false -} - -function drawGapCursor(state: EditorState) { - if (!(state.selection instanceof GapCursor)) return null - let node = document.createElement("div") - node.className = "ProseMirror-gapcursor" - return DecorationSet.create(state.doc, [Decoration.widget(state.selection.head, node, {key: "gapcursor"})]) -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/style/gapcursor.css b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/style/gapcursor.css deleted file mode 100644 index b335934..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/style/gapcursor.css +++ /dev/null @@ -1,25 +0,0 @@ -.ProseMirror-gapcursor { - display: none; - pointer-events: none; - position: absolute; -} - -.ProseMirror-gapcursor:after { - content: ""; - display: block; - position: absolute; - top: -2px; - width: 20px; - border-top: 1px solid black; - animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; -} - -@keyframes ProseMirror-cursor-blink { - to { - visibility: hidden; - } -} - -.ProseMirror-focused .ProseMirror-gapcursor { - display: block; -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-keymap b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-keymap deleted file mode 120000 index 2bb5f34..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-keymap +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-model b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-model deleted file mode 120000 index 420d071..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-model +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-model@1.25.7/node_modules/prosemirror-model \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-state b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-state deleted file mode 120000 index f732de9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-state +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-state@1.4.4/node_modules/prosemirror-state \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-view b/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-view deleted file mode 120000 index ed4297c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-view +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-view@1.41.8/node_modules/prosemirror-view \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/.tern-project b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/.tern-project deleted file mode 100644 index dde3976..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/.tern-project +++ /dev/null @@ -1,8 +0,0 @@ -{ - "libs": ["browser"], - "plugins": { - "node": {}, - "complete_strings": {}, - "es_modules": {} - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/CHANGELOG.md deleted file mode 100644 index 8500b80..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/CHANGELOG.md +++ /dev/null @@ -1,170 +0,0 @@ -## 1.5.0 (2025-11-13) - -### Bug fixes - -Don't call undo/redo commands in response to beforeinput events when the view isn't editable. Add isHistoryTransaction - -### New features - -The new `isHistoryTransaction` predicate can be used to recognize transactions generated by the history system. - -## 1.4.1 (2024-07-10) - -### Bug fixes - -Fix an issue where mark steps could cause the history to treat otherwise adjacent changes as non-adjacent, and start superfluous new undo events. - -## 1.4.0 (2024-03-21) - -### New features - -Add `undoNoScroll`/`redoNoScroll` commands. - -## 1.3.2 (2023-05-17) - -### Bug fixes - -Include CommonJS type declarations in the package to please new TypeScript resolution settings. - -## 1.3.1 (2023-04-26) - -### Bug fixes - -Fix an issue where, if a composition moved the selection, it might get split across multiple undo events. - -## 1.3.0 (2022-05-30) - -### Bug fixes - -Fix an issue where the default behavior of history beforeInput events could still go through when the undo history is empty. - -### New features - -Include TypeScript type declarations. - -## 1.2.0 (2021-08-18) - -### Bug fixes - -Fix a bug that caused the `beforeInput` handler to not actually invoke the history commands properly. - -### New features - -The history plugin now listens for `beforeInput` events with `historyUndo` or `historyRedo` type, and applies the undo/redo commands when they occur. - -## 1.1.3 (2019-12-10) - -### Bug fixes - -Fixes a regression where appeneded transactions were combined into the previous history event even if that had been explicitly closed. - -## 1.1.2 (2019-11-20) - -### Bug fixes - -Rename ES module files to use a .js extension, since Webpack gets confused by .mjs - -## 1.1.1 (2019-11-19) - -### Bug fixes - -The file referred to in the package's `module` field now is compiled down to ES5. - -## 1.1.0 (2019-11-08) - -### Bug fixes - -Prevents appended transactions from starting a new event group, even if they were created a while after the previous transaction. - -### New features - -Add a `module` field to package json file. - -## 1.0.4 (2019-02-19) - -### Bug fixes - -Fix a bug that corrupted selection data in the history when applying remote steps in some cases. - -## 1.0.3 (2018-10-08) - -### Bug fixes - -Appending a transaction to an undo transaction will no longer immediately clear the redo history. - -When handling appended transactions, the history will keep the last step in the original transaction, not the one from the appended transaction, for testing whether a subsequent transaction is adjacent to the previous one. - -## 1.0.2 (2018-03-13) - -### Bug fixes - -Fix a bug that could corrupt the history when rebasing changes because of collaborative editing. - -## 1.0.1 (2018-03-05) - -### Bug fixes - -Fix crash that could occur (in specific circumstance) when redoing. - -## 0.24.0 (2017-09-25) - -### New features - -It is no longer necessary to manually enable the `preserveItems` option to the history plugin when using collaborative editing. (This behavior is now automatically enabled when necessary.) - -## 0.20.0 (2017-04-03) - -### Bug fixes - -Appended transactions no longer generate undo history events. - -## 0.19.0 (2017-03-16) - -### New features - -A new function [`closeHistory`](https://prosemirror.net/docs/ref/version/0.19.0.html#history.closeHistory) can be used to force separation of history events at the start of a given transaction. - -## 0.18.0 (2017-02-24) - -### Bug fixes - -Fix a problem where simultaneous collaborative editing could break the undo history. - -## 0.17.1 (2017-02-02) - -### Bug fixes - -Fix issue where collaborative editing corner cases could corrupt the history. - -## 0.12.1 (2016-11-01) - -### Bug fixes - -Fix crash in undo or redo commands when the history is empty. - -## 0.12.0 (2016-10-21) - -### Breaking changes - -The [`history`](https://prosemirror.net/docs/ref/version/0.12.0.html#history.history) export is now a function -that creates a history plugin, rather than a plugin instance. - -### New features - -Add a -[`newGroupDelay`](https://prosemirror.net/docs/ref/version/0.12.0.html#history.history^config.newGroupDelay) plugin -option. This brings back the behavior where pausing between edits will -automatically cause the history to put subsequent changes in a new -undo event. - -## 0.11.0 (2016-09-21) - -### Breaking changes - -Moved into a separate module. Now acts as a plugin that can be omitted -or replaced by a different implementation if desired. - -Merging subsequent changes into a single undo 'event' is now done by -proximity in the document (the changes must touch) rather than in -time. This will probably have to be further refined. - diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/CONTRIBUTING.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/CONTRIBUTING.md deleted file mode 100644 index f2a345d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/CONTRIBUTING.md +++ /dev/null @@ -1,104 +0,0 @@ -# How to contribute - -- [Getting help](#getting-help) -- [Submitting bug reports](#submitting-bug-reports) -- [Contributing code](#contributing-code) - -## Getting help - -Community discussion, questions, and informal bug reporting is done on the -[discuss.ProseMirror forum](http://discuss.prosemirror.net). - -## Submitting bug reports - -Report bugs on the -[GitHub issue tracker](http://github.com/prosemirror/prosemirror/issues). -Before reporting a bug, please read these pointers. - -- The issue tracker is for *bugs*, not requests for help. Questions - should be asked on the [forum](http://discuss.prosemirror.net). - -- Include information about the version of the code that exhibits the - problem. For browser-related issues, include the browser and browser - version on which the problem occurred. - -- Mention very precisely what went wrong. "X is broken" is not a good - bug report. What did you expect to happen? What happened instead? - Describe the exact steps a maintainer has to take to make the - problem occur. A screencast can be useful, but is no substitute for - a textual description. - -- A great way to make it easy to reproduce your problem, if it can not - be trivially reproduced on the website demos, is to submit a script - that triggers the issue. - -## Contributing code - -If you want to make a change that involves a significant overhaul of -the code or introduces a user-visible new feature, create an -[RFC](https://github.com/ProseMirror/rfcs/) first with your proposal. - -- Make sure you have a [GitHub Account](https://github.com/signup/free) - -- Fork the relevant repository - ([how to fork a repo](https://help.github.com/articles/fork-a-repo)) - -- Create a local checkout of the code. You can use the - [main repository](https://github.com/prosemirror/prosemirror) to - easily check out all core modules. - -- Make your changes, and commit them - -- Follow the code style of the rest of the project (see below). Run - `npm run lint` (in the main repository checkout) to make sure that - the linter is happy. - -- If your changes are easy to test or likely to regress, add tests in - the relevant `test/` directory. Either put them in an existing - `test-*.js` file, if they fit there, or add a new file. - -- Make sure all tests pass. Run `npm run test` to verify tests pass - (you will need Node.js v6+). - -- Submit a pull request ([how to create a pull request](https://help.github.com/articles/fork-a-repo)). - Don't put more than one feature/fix in a single pull request. - -By contributing code to ProseMirror you - - - Agree to license the contributed code under the project's [MIT - license](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE). - - - Confirm that you have the right to contribute and license the code - in question. (Either you hold all rights on the code, or the rights - holder has explicitly granted the right to use it like this, - through a compatible open source license or through a direct - agreement with you.) - -### Coding standards - -- ES6 syntax, targeting an ES5 runtime (i.e. don't use library - elements added by ES6, don't use ES7/ES.next syntax). - -- 2 spaces per indentation level, no tabs. - -- No semicolons except when necessary. - -- Follow the surrounding code when it comes to spacing, brace - placement, etc. - -- Brace-less single-statement bodies are encouraged (whenever they - don't impact readability). - -- [getdocs](https://github.com/marijnh/getdocs)-style doc comments - above items that are part of the public API. - -- When documenting non-public items, you can put the type after a - single colon, so that getdocs doesn't pick it up and add it to the - API reference. - -- The linter (`npm run lint`) complains about unused variables and - functions. Prefix their names with an underscore to muffle it. - -- ProseMirror does *not* follow JSHint or JSLint prescribed style. - Patches that try to 'fix' code to pass one of these linters will not - be accepted. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/LICENSE b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/LICENSE deleted file mode 100644 index 7e2295b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2015-2017 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/README.md deleted file mode 100644 index c36b99b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# prosemirror-history - -[ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-history/blob/master/CHANGELOG.md) ] - -This is a [core module](https://prosemirror.net/docs/ref/#history) of [ProseMirror](https://prosemirror.net). -ProseMirror is a well-behaved rich semantic content editor based on -contentEditable, with support for collaborative editing and custom -document schemas. - -This [module](https://prosemirror.net/docs/ref/#history) implements an -undo/redo history plugin for ProseMirror. - -The [project page](https://prosemirror.net) has more information, a -number of [examples](https://prosemirror.net/examples/) and the -[documentation](https://prosemirror.net/docs/). - -This code is released under an -[MIT license](https://github.com/prosemirror/prosemirror/tree/master/LICENSE). -There's a [forum](http://discuss.prosemirror.net) for general -discussion and support requests, and the -[Github bug tracker](https://github.com/prosemirror/prosemirror/issues) -is the place to report issues. - -We aim to be an inclusive, welcoming community. To make that explicit, -we have a [code of -conduct](http://contributor-covenant.org/version/1/1/0/) that applies -to communication around the project. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.cjs deleted file mode 100644 index e0e1020..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.cjs +++ /dev/null @@ -1,382 +0,0 @@ -'use strict'; - -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var RopeSequence = require('rope-sequence'); -var prosemirrorTransform = require('prosemirror-transform'); -var prosemirrorState = require('prosemirror-state'); -var max_empty_items = 500; -var Branch = function () { - function Branch(items, eventCount) { - _classCallCheck(this, Branch); - this.items = items; - this.eventCount = eventCount; - } - _createClass(Branch, [{ - key: "popEvent", - value: function popEvent(state, preserveItems) { - var _this = this; - if (this.eventCount == 0) return null; - var end = this.items.length; - for (;; end--) { - var next = this.items.get(end - 1); - if (next.selection) { - --end; - break; - } - } - var remap, mapFrom; - if (preserveItems) { - remap = this.remapping(end, this.items.length); - mapFrom = remap.maps.length; - } - var transform = state.tr; - var selection, remaining; - var addAfter = [], - addBefore = []; - this.items.forEach(function (item, i) { - if (!item.step) { - if (!remap) { - remap = _this.remapping(end, i + 1); - mapFrom = remap.maps.length; - } - mapFrom--; - addBefore.push(item); - return; - } - if (remap) { - addBefore.push(new Item(item.map)); - var step = item.step.map(remap.slice(mapFrom)), - map; - if (step && transform.maybeStep(step).doc) { - map = transform.mapping.maps[transform.mapping.maps.length - 1]; - addAfter.push(new Item(map, undefined, undefined, addAfter.length + addBefore.length)); - } - mapFrom--; - if (map) remap.appendMap(map, mapFrom); - } else { - transform.maybeStep(item.step); - } - if (item.selection) { - selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection; - remaining = new Branch(_this.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), _this.eventCount - 1); - return false; - } - }, this.items.length, 0); - return { - remaining: remaining, - transform: transform, - selection: selection - }; - } - }, { - key: "addTransform", - value: function addTransform(transform, selection, histOptions, preserveItems) { - var newItems = [], - eventCount = this.eventCount; - var oldItems = this.items, - lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null; - for (var i = 0; i < transform.steps.length; i++) { - var step = transform.steps[i].invert(transform.docs[i]); - var item = new Item(transform.mapping.maps[i], step, selection), - merged = void 0; - if (merged = lastItem && lastItem.merge(item)) { - item = merged; - if (i) newItems.pop();else oldItems = oldItems.slice(0, oldItems.length - 1); - } - newItems.push(item); - if (selection) { - eventCount++; - selection = undefined; - } - if (!preserveItems) lastItem = item; - } - var overflow = eventCount - histOptions.depth; - if (overflow > DEPTH_OVERFLOW) { - oldItems = cutOffEvents(oldItems, overflow); - eventCount -= overflow; - } - return new Branch(oldItems.append(newItems), eventCount); - } - }, { - key: "remapping", - value: function remapping(from, to) { - var maps = new prosemirrorTransform.Mapping(); - this.items.forEach(function (item, i) { - var mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from ? maps.maps.length - item.mirrorOffset : undefined; - maps.appendMap(item.map, mirrorPos); - }, from, to); - return maps; - } - }, { - key: "addMaps", - value: function addMaps(array) { - if (this.eventCount == 0) return this; - return new Branch(this.items.append(array.map(function (map) { - return new Item(map); - })), this.eventCount); - } - }, { - key: "rebased", - value: function rebased(rebasedTransform, rebasedCount) { - if (!this.eventCount) return this; - var rebasedItems = [], - start = Math.max(0, this.items.length - rebasedCount); - var mapping = rebasedTransform.mapping; - var newUntil = rebasedTransform.steps.length; - var eventCount = this.eventCount; - this.items.forEach(function (item) { - if (item.selection) eventCount--; - }, start); - var iRebased = rebasedCount; - this.items.forEach(function (item) { - var pos = mapping.getMirror(--iRebased); - if (pos == null) return; - newUntil = Math.min(newUntil, pos); - var map = mapping.maps[pos]; - if (item.step) { - var step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]); - var selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos)); - if (selection) eventCount++; - rebasedItems.push(new Item(map, step, selection)); - } else { - rebasedItems.push(new Item(map)); - } - }, start); - var newMaps = []; - for (var i = rebasedCount; i < newUntil; i++) newMaps.push(new Item(mapping.maps[i])); - var items = this.items.slice(0, start).append(newMaps).append(rebasedItems); - var branch = new Branch(items, eventCount); - if (branch.emptyItemCount() > max_empty_items) branch = branch.compress(this.items.length - rebasedItems.length); - return branch; - } - }, { - key: "emptyItemCount", - value: function emptyItemCount() { - var count = 0; - this.items.forEach(function (item) { - if (!item.step) count++; - }); - return count; - } - }, { - key: "compress", - value: function compress() { - var upto = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.items.length; - var remap = this.remapping(0, upto), - mapFrom = remap.maps.length; - var items = [], - events = 0; - this.items.forEach(function (item, i) { - if (i >= upto) { - items.push(item); - if (item.selection) events++; - } else if (item.step) { - var step = item.step.map(remap.slice(mapFrom)), - map = step && step.getMap(); - mapFrom--; - if (map) remap.appendMap(map, mapFrom); - if (step) { - var selection = item.selection && item.selection.map(remap.slice(mapFrom)); - if (selection) events++; - var newItem = new Item(map.invert(), step, selection), - merged, - last = items.length - 1; - if (merged = items.length && items[last].merge(newItem)) items[last] = merged;else items.push(newItem); - } - } else if (item.map) { - mapFrom--; - } - }, this.items.length, 0); - return new Branch(RopeSequence.from(items.reverse()), events); - } - }]); - return Branch; -}(); -Branch.empty = new Branch(RopeSequence.empty, 0); -function cutOffEvents(items, n) { - var cutPoint; - items.forEach(function (item, i) { - if (item.selection && n-- == 0) { - cutPoint = i; - return false; - } - }); - return items.slice(cutPoint); -} -var Item = function () { - function Item(map, step, selection, mirrorOffset) { - _classCallCheck(this, Item); - this.map = map; - this.step = step; - this.selection = selection; - this.mirrorOffset = mirrorOffset; - } - _createClass(Item, [{ - key: "merge", - value: function merge(other) { - if (this.step && other.step && !other.selection) { - var step = other.step.merge(this.step); - if (step) return new Item(step.getMap().invert(), step, this.selection); - } - } - }]); - return Item; -}(); -var HistoryState = _createClass(function HistoryState(done, undone, prevRanges, prevTime, prevComposition) { - _classCallCheck(this, HistoryState); - this.done = done; - this.undone = undone; - this.prevRanges = prevRanges; - this.prevTime = prevTime; - this.prevComposition = prevComposition; -}); -var DEPTH_OVERFLOW = 20; -function applyTransaction(history, state, tr, options) { - var historyTr = tr.getMeta(historyKey), - rebased; - if (historyTr) return historyTr.historyState; - if (tr.getMeta(closeHistoryKey)) history = new HistoryState(history.done, history.undone, null, 0, -1); - var appended = tr.getMeta("appendedTransaction"); - if (tr.steps.length == 0) { - return history; - } else if (appended && appended.getMeta(historyKey)) { - if (appended.getMeta(historyKey).redo) return new HistoryState(history.done.addTransform(tr, undefined, options, mustPreserveItems(state)), history.undone, rangesFor(tr.mapping.maps), history.prevTime, history.prevComposition);else return new HistoryState(history.done, history.undone.addTransform(tr, undefined, options, mustPreserveItems(state)), null, history.prevTime, history.prevComposition); - } else if (tr.getMeta("addToHistory") !== false && !(appended && appended.getMeta("addToHistory") === false)) { - var composition = tr.getMeta("composition"); - var newGroup = history.prevTime == 0 || !appended && history.prevComposition != composition && (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges)); - var prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps); - return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : undefined, options, mustPreserveItems(state)), Branch.empty, prevRanges, tr.time, composition == null ? history.prevComposition : composition); - } else if (rebased = tr.getMeta("rebased")) { - return new HistoryState(history.done.rebased(tr, rebased), history.undone.rebased(tr, rebased), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition); - } else { - return new HistoryState(history.done.addMaps(tr.mapping.maps), history.undone.addMaps(tr.mapping.maps), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition); - } -} -function isAdjacentTo(transform, prevRanges) { - if (!prevRanges) return false; - if (!transform.docChanged) return true; - var adjacent = false; - transform.mapping.maps[0].forEach(function (start, end) { - for (var i = 0; i < prevRanges.length; i += 2) if (start <= prevRanges[i + 1] && end >= prevRanges[i]) adjacent = true; - }); - return adjacent; -} -function rangesFor(maps) { - var result = []; - for (var i = maps.length - 1; i >= 0 && result.length == 0; i--) maps[i].forEach(function (_from, _to, from, to) { - return result.push(from, to); - }); - return result; -} -function mapRanges(ranges, mapping) { - if (!ranges) return null; - var result = []; - for (var i = 0; i < ranges.length; i += 2) { - var from = mapping.map(ranges[i], 1), - to = mapping.map(ranges[i + 1], -1); - if (from <= to) result.push(from, to); - } - return result; -} -function histTransaction(history, state, redo) { - var preserveItems = mustPreserveItems(state); - var histOptions = historyKey.get(state).spec.config; - var pop = (redo ? history.undone : history.done).popEvent(state, preserveItems); - if (!pop) return null; - var selection = pop.selection.resolve(pop.transform.doc); - var added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(), histOptions, preserveItems); - var newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0, -1); - return pop.transform.setSelection(selection).setMeta(historyKey, { - redo: redo, - historyState: newHist - }); -} -var cachedPreserveItems = false, - cachedPreserveItemsPlugins = null; -function mustPreserveItems(state) { - var plugins = state.plugins; - if (cachedPreserveItemsPlugins != plugins) { - cachedPreserveItems = false; - cachedPreserveItemsPlugins = plugins; - for (var i = 0; i < plugins.length; i++) if (plugins[i].spec.historyPreserveItems) { - cachedPreserveItems = true; - break; - } - } - return cachedPreserveItems; -} -function closeHistory(tr) { - return tr.setMeta(closeHistoryKey, true); -} -var historyKey = new prosemirrorState.PluginKey("history"); -var closeHistoryKey = new prosemirrorState.PluginKey("closeHistory"); -function history() { - var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - config = { - depth: config.depth || 100, - newGroupDelay: config.newGroupDelay || 500 - }; - return new prosemirrorState.Plugin({ - key: historyKey, - state: { - init: function init() { - return new HistoryState(Branch.empty, Branch.empty, null, 0, -1); - }, - apply: function apply(tr, hist, state) { - return applyTransaction(hist, state, tr, config); - } - }, - config: config, - props: { - handleDOMEvents: { - beforeinput: function beforeinput(view, e) { - var inputType = e.inputType; - var command = inputType == "historyUndo" ? undo : inputType == "historyRedo" ? redo : null; - if (!command || !view.editable) return false; - e.preventDefault(); - return command(view.state, view.dispatch); - } - } - } - }); -} -function buildCommand(redo, scroll) { - return function (state, dispatch) { - var hist = historyKey.getState(state); - if (!hist || (redo ? hist.undone : hist.done).eventCount == 0) return false; - if (dispatch) { - var tr = histTransaction(hist, state, redo); - if (tr) dispatch(scroll ? tr.scrollIntoView() : tr); - } - return true; - }; -} -var undo = buildCommand(false, true); -var redo = buildCommand(true, true); -var undoNoScroll = buildCommand(false, false); -var redoNoScroll = buildCommand(true, false); -function undoDepth(state) { - var hist = historyKey.getState(state); - return hist ? hist.done.eventCount : 0; -} -function redoDepth(state) { - var hist = historyKey.getState(state); - return hist ? hist.undone.eventCount : 0; -} -function isHistoryTransaction(tr) { - return tr.getMeta(historyKey) != null; -} -exports.closeHistory = closeHistory; -exports.history = history; -exports.isHistoryTransaction = isHistoryTransaction; -exports.redo = redo; -exports.redoDepth = redoDepth; -exports.redoNoScroll = redoNoScroll; -exports.undo = undo; -exports.undoDepth = undoDepth; -exports.undoNoScroll = undoNoScroll; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.d.cts deleted file mode 100644 index ba077f1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.d.cts +++ /dev/null @@ -1,64 +0,0 @@ -import { Transaction, Plugin, Command, EditorState } from 'prosemirror-state'; - -/** -Set a flag on the given transaction that will prevent further steps -from being appended to an existing history event (so that they -require a separate undo command to undo). -*/ -declare function closeHistory(tr: Transaction): Transaction; -interface HistoryOptions { - /** - The amount of history events that are collected before the - oldest events are discarded. Defaults to 100. - */ - depth?: number; - /** - The delay between changes after which a new group should be - started. Defaults to 500 (milliseconds). Note that when changes - aren't adjacent, a new group is always started. - */ - newGroupDelay?: number; -} -/** -Returns a plugin that enables the undo history for an editor. The -plugin will track undo and redo stacks, which can be used with the -[`undo`](https://prosemirror.net/docs/ref/#history.undo) and [`redo`](https://prosemirror.net/docs/ref/#history.redo) commands. - -You can set an `"addToHistory"` [metadata -property](https://prosemirror.net/docs/ref/#state.Transaction.setMeta) of `false` on a transaction -to prevent it from being rolled back by undo. -*/ -declare function history(config?: HistoryOptions): Plugin; -/** -A command function that undoes the last change, if any. -*/ -declare const undo: Command; -/** -A command function that redoes the last undone change, if any. -*/ -declare const redo: Command; -/** -A command function that undoes the last change. Don't scroll the -selection into view. -*/ -declare const undoNoScroll: Command; -/** -A command function that redoes the last undone change. Don't -scroll the selection into view. -*/ -declare const redoNoScroll: Command; -/** -The amount of undoable events available in a given state. -*/ -declare function undoDepth(state: EditorState): any; -/** -The amount of redoable events available in a given editor state. -*/ -declare function redoDepth(state: EditorState): any; -/** -Returns true if the given transaction was generated by the history -plugin. -*/ -declare function isHistoryTransaction(tr: Transaction): boolean; - -export { closeHistory, history, isHistoryTransaction, redo, redoDepth, redoNoScroll, undo, undoDepth, undoNoScroll }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.d.ts deleted file mode 100644 index ba077f1..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Transaction, Plugin, Command, EditorState } from 'prosemirror-state'; - -/** -Set a flag on the given transaction that will prevent further steps -from being appended to an existing history event (so that they -require a separate undo command to undo). -*/ -declare function closeHistory(tr: Transaction): Transaction; -interface HistoryOptions { - /** - The amount of history events that are collected before the - oldest events are discarded. Defaults to 100. - */ - depth?: number; - /** - The delay between changes after which a new group should be - started. Defaults to 500 (milliseconds). Note that when changes - aren't adjacent, a new group is always started. - */ - newGroupDelay?: number; -} -/** -Returns a plugin that enables the undo history for an editor. The -plugin will track undo and redo stacks, which can be used with the -[`undo`](https://prosemirror.net/docs/ref/#history.undo) and [`redo`](https://prosemirror.net/docs/ref/#history.redo) commands. - -You can set an `"addToHistory"` [metadata -property](https://prosemirror.net/docs/ref/#state.Transaction.setMeta) of `false` on a transaction -to prevent it from being rolled back by undo. -*/ -declare function history(config?: HistoryOptions): Plugin; -/** -A command function that undoes the last change, if any. -*/ -declare const undo: Command; -/** -A command function that redoes the last undone change, if any. -*/ -declare const redo: Command; -/** -A command function that undoes the last change. Don't scroll the -selection into view. -*/ -declare const undoNoScroll: Command; -/** -A command function that redoes the last undone change. Don't -scroll the selection into view. -*/ -declare const redoNoScroll: Command; -/** -The amount of undoable events available in a given state. -*/ -declare function undoDepth(state: EditorState): any; -/** -The amount of redoable events available in a given editor state. -*/ -declare function redoDepth(state: EditorState): any; -/** -Returns true if the given transaction was generated by the history -plugin. -*/ -declare function isHistoryTransaction(tr: Transaction): boolean; - -export { closeHistory, history, isHistoryTransaction, redo, redoDepth, redoNoScroll, undo, undoDepth, undoNoScroll }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.js b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.js deleted file mode 100644 index acd29d9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.js +++ /dev/null @@ -1,453 +0,0 @@ -import RopeSequence from 'rope-sequence'; -import { Mapping } from 'prosemirror-transform'; -import { PluginKey, Plugin } from 'prosemirror-state'; - -// ProseMirror's history isn't simply a way to roll back to a previous -// state, because ProseMirror supports applying changes without adding -// them to the history (for example during collaboration). -// -// To this end, each 'Branch' (one for the undo history and one for -// the redo history) keeps an array of 'Items', which can optionally -// hold a step (an actual undoable change), and always hold a position -// map (which is needed to move changes below them to apply to the -// current document). -// -// An item that has both a step and a selection bookmark is the start -// of an 'event' — a group of changes that will be undone or redone at -// once. (It stores only the bookmark, since that way we don't have to -// provide a document until the selection is actually applied, which -// is useful when compressing.) -// Used to schedule history compression -const max_empty_items = 500; -class Branch { - constructor(items, eventCount) { - this.items = items; - this.eventCount = eventCount; - } - // Pop the latest event off the branch's history and apply it - // to a document transform. - popEvent(state, preserveItems) { - if (this.eventCount == 0) - return null; - let end = this.items.length; - for (;; end--) { - let next = this.items.get(end - 1); - if (next.selection) { - --end; - break; - } - } - let remap, mapFrom; - if (preserveItems) { - remap = this.remapping(end, this.items.length); - mapFrom = remap.maps.length; - } - let transform = state.tr; - let selection, remaining; - let addAfter = [], addBefore = []; - this.items.forEach((item, i) => { - if (!item.step) { - if (!remap) { - remap = this.remapping(end, i + 1); - mapFrom = remap.maps.length; - } - mapFrom--; - addBefore.push(item); - return; - } - if (remap) { - addBefore.push(new Item(item.map)); - let step = item.step.map(remap.slice(mapFrom)), map; - if (step && transform.maybeStep(step).doc) { - map = transform.mapping.maps[transform.mapping.maps.length - 1]; - addAfter.push(new Item(map, undefined, undefined, addAfter.length + addBefore.length)); - } - mapFrom--; - if (map) - remap.appendMap(map, mapFrom); - } - else { - transform.maybeStep(item.step); - } - if (item.selection) { - selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection; - remaining = new Branch(this.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), this.eventCount - 1); - return false; - } - }, this.items.length, 0); - return { remaining: remaining, transform, selection: selection }; - } - // Create a new branch with the given transform added. - addTransform(transform, selection, histOptions, preserveItems) { - let newItems = [], eventCount = this.eventCount; - let oldItems = this.items, lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null; - for (let i = 0; i < transform.steps.length; i++) { - let step = transform.steps[i].invert(transform.docs[i]); - let item = new Item(transform.mapping.maps[i], step, selection), merged; - if (merged = lastItem && lastItem.merge(item)) { - item = merged; - if (i) - newItems.pop(); - else - oldItems = oldItems.slice(0, oldItems.length - 1); - } - newItems.push(item); - if (selection) { - eventCount++; - selection = undefined; - } - if (!preserveItems) - lastItem = item; - } - let overflow = eventCount - histOptions.depth; - if (overflow > DEPTH_OVERFLOW) { - oldItems = cutOffEvents(oldItems, overflow); - eventCount -= overflow; - } - return new Branch(oldItems.append(newItems), eventCount); - } - remapping(from, to) { - let maps = new Mapping; - this.items.forEach((item, i) => { - let mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from - ? maps.maps.length - item.mirrorOffset : undefined; - maps.appendMap(item.map, mirrorPos); - }, from, to); - return maps; - } - addMaps(array) { - if (this.eventCount == 0) - return this; - return new Branch(this.items.append(array.map(map => new Item(map))), this.eventCount); - } - // When the collab module receives remote changes, the history has - // to know about those, so that it can adjust the steps that were - // rebased on top of the remote changes, and include the position - // maps for the remote changes in its array of items. - rebased(rebasedTransform, rebasedCount) { - if (!this.eventCount) - return this; - let rebasedItems = [], start = Math.max(0, this.items.length - rebasedCount); - let mapping = rebasedTransform.mapping; - let newUntil = rebasedTransform.steps.length; - let eventCount = this.eventCount; - this.items.forEach(item => { if (item.selection) - eventCount--; }, start); - let iRebased = rebasedCount; - this.items.forEach(item => { - let pos = mapping.getMirror(--iRebased); - if (pos == null) - return; - newUntil = Math.min(newUntil, pos); - let map = mapping.maps[pos]; - if (item.step) { - let step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]); - let selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos)); - if (selection) - eventCount++; - rebasedItems.push(new Item(map, step, selection)); - } - else { - rebasedItems.push(new Item(map)); - } - }, start); - let newMaps = []; - for (let i = rebasedCount; i < newUntil; i++) - newMaps.push(new Item(mapping.maps[i])); - let items = this.items.slice(0, start).append(newMaps).append(rebasedItems); - let branch = new Branch(items, eventCount); - if (branch.emptyItemCount() > max_empty_items) - branch = branch.compress(this.items.length - rebasedItems.length); - return branch; - } - emptyItemCount() { - let count = 0; - this.items.forEach(item => { if (!item.step) - count++; }); - return count; - } - // Compressing a branch means rewriting it to push the air (map-only - // items) out. During collaboration, these naturally accumulate - // because each remote change adds one. The `upto` argument is used - // to ensure that only the items below a given level are compressed, - // because `rebased` relies on a clean, untouched set of items in - // order to associate old items with rebased steps. - compress(upto = this.items.length) { - let remap = this.remapping(0, upto), mapFrom = remap.maps.length; - let items = [], events = 0; - this.items.forEach((item, i) => { - if (i >= upto) { - items.push(item); - if (item.selection) - events++; - } - else if (item.step) { - let step = item.step.map(remap.slice(mapFrom)), map = step && step.getMap(); - mapFrom--; - if (map) - remap.appendMap(map, mapFrom); - if (step) { - let selection = item.selection && item.selection.map(remap.slice(mapFrom)); - if (selection) - events++; - let newItem = new Item(map.invert(), step, selection), merged, last = items.length - 1; - if (merged = items.length && items[last].merge(newItem)) - items[last] = merged; - else - items.push(newItem); - } - } - else if (item.map) { - mapFrom--; - } - }, this.items.length, 0); - return new Branch(RopeSequence.from(items.reverse()), events); - } -} -Branch.empty = new Branch(RopeSequence.empty, 0); -function cutOffEvents(items, n) { - let cutPoint; - items.forEach((item, i) => { - if (item.selection && (n-- == 0)) { - cutPoint = i; - return false; - } - }); - return items.slice(cutPoint); -} -class Item { - constructor( - // The (forward) step map for this item. - map, - // The inverted step - step, - // If this is non-null, this item is the start of a group, and - // this selection is the starting selection for the group (the one - // that was active before the first step was applied) - selection, - // If this item is the inverse of a previous mapping on the stack, - // this points at the inverse's offset - mirrorOffset) { - this.map = map; - this.step = step; - this.selection = selection; - this.mirrorOffset = mirrorOffset; - } - merge(other) { - if (this.step && other.step && !other.selection) { - let step = other.step.merge(this.step); - if (step) - return new Item(step.getMap().invert(), step, this.selection); - } - } -} -// The value of the state field that tracks undo/redo history for that -// state. Will be stored in the plugin state when the history plugin -// is active. -class HistoryState { - constructor(done, undone, prevRanges, prevTime, prevComposition) { - this.done = done; - this.undone = undone; - this.prevRanges = prevRanges; - this.prevTime = prevTime; - this.prevComposition = prevComposition; - } -} -const DEPTH_OVERFLOW = 20; -// Record a transformation in undo history. -function applyTransaction(history, state, tr, options) { - let historyTr = tr.getMeta(historyKey), rebased; - if (historyTr) - return historyTr.historyState; - if (tr.getMeta(closeHistoryKey)) - history = new HistoryState(history.done, history.undone, null, 0, -1); - let appended = tr.getMeta("appendedTransaction"); - if (tr.steps.length == 0) { - return history; - } - else if (appended && appended.getMeta(historyKey)) { - if (appended.getMeta(historyKey).redo) - return new HistoryState(history.done.addTransform(tr, undefined, options, mustPreserveItems(state)), history.undone, rangesFor(tr.mapping.maps), history.prevTime, history.prevComposition); - else - return new HistoryState(history.done, history.undone.addTransform(tr, undefined, options, mustPreserveItems(state)), null, history.prevTime, history.prevComposition); - } - else if (tr.getMeta("addToHistory") !== false && !(appended && appended.getMeta("addToHistory") === false)) { - // Group transforms that occur in quick succession into one event. - let composition = tr.getMeta("composition"); - let newGroup = history.prevTime == 0 || - (!appended && history.prevComposition != composition && - (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges))); - let prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps); - return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : undefined, options, mustPreserveItems(state)), Branch.empty, prevRanges, tr.time, composition == null ? history.prevComposition : composition); - } - else if (rebased = tr.getMeta("rebased")) { - // Used by the collab module to tell the history that some of its - // content has been rebased. - return new HistoryState(history.done.rebased(tr, rebased), history.undone.rebased(tr, rebased), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition); - } - else { - return new HistoryState(history.done.addMaps(tr.mapping.maps), history.undone.addMaps(tr.mapping.maps), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition); - } -} -function isAdjacentTo(transform, prevRanges) { - if (!prevRanges) - return false; - if (!transform.docChanged) - return true; - let adjacent = false; - transform.mapping.maps[0].forEach((start, end) => { - for (let i = 0; i < prevRanges.length; i += 2) - if (start <= prevRanges[i + 1] && end >= prevRanges[i]) - adjacent = true; - }); - return adjacent; -} -function rangesFor(maps) { - let result = []; - for (let i = maps.length - 1; i >= 0 && result.length == 0; i--) - maps[i].forEach((_from, _to, from, to) => result.push(from, to)); - return result; -} -function mapRanges(ranges, mapping) { - if (!ranges) - return null; - let result = []; - for (let i = 0; i < ranges.length; i += 2) { - let from = mapping.map(ranges[i], 1), to = mapping.map(ranges[i + 1], -1); - if (from <= to) - result.push(from, to); - } - return result; -} -// Apply the latest event from one branch to the document and shift the event -// onto the other branch. -function histTransaction(history, state, redo) { - let preserveItems = mustPreserveItems(state); - let histOptions = historyKey.get(state).spec.config; - let pop = (redo ? history.undone : history.done).popEvent(state, preserveItems); - if (!pop) - return null; - let selection = pop.selection.resolve(pop.transform.doc); - let added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(), histOptions, preserveItems); - let newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0, -1); - return pop.transform.setSelection(selection).setMeta(historyKey, { redo, historyState: newHist }); -} -let cachedPreserveItems = false, cachedPreserveItemsPlugins = null; -// Check whether any plugin in the given state has a -// `historyPreserveItems` property in its spec, in which case we must -// preserve steps exactly as they came in, so that they can be -// rebased. -function mustPreserveItems(state) { - let plugins = state.plugins; - if (cachedPreserveItemsPlugins != plugins) { - cachedPreserveItems = false; - cachedPreserveItemsPlugins = plugins; - for (let i = 0; i < plugins.length; i++) - if (plugins[i].spec.historyPreserveItems) { - cachedPreserveItems = true; - break; - } - } - return cachedPreserveItems; -} -/** -Set a flag on the given transaction that will prevent further steps -from being appended to an existing history event (so that they -require a separate undo command to undo). -*/ -function closeHistory(tr) { - return tr.setMeta(closeHistoryKey, true); -} -const historyKey = new PluginKey("history"); -const closeHistoryKey = new PluginKey("closeHistory"); -/** -Returns a plugin that enables the undo history for an editor. The -plugin will track undo and redo stacks, which can be used with the -[`undo`](https://prosemirror.net/docs/ref/#history.undo) and [`redo`](https://prosemirror.net/docs/ref/#history.redo) commands. - -You can set an `"addToHistory"` [metadata -property](https://prosemirror.net/docs/ref/#state.Transaction.setMeta) of `false` on a transaction -to prevent it from being rolled back by undo. -*/ -function history(config = {}) { - config = { depth: config.depth || 100, - newGroupDelay: config.newGroupDelay || 500 }; - return new Plugin({ - key: historyKey, - state: { - init() { - return new HistoryState(Branch.empty, Branch.empty, null, 0, -1); - }, - apply(tr, hist, state) { - return applyTransaction(hist, state, tr, config); - } - }, - config, - props: { - handleDOMEvents: { - beforeinput(view, e) { - let inputType = e.inputType; - let command = inputType == "historyUndo" ? undo : inputType == "historyRedo" ? redo : null; - if (!command || !view.editable) - return false; - e.preventDefault(); - return command(view.state, view.dispatch); - } - } - } - }); -} -function buildCommand(redo, scroll) { - return (state, dispatch) => { - let hist = historyKey.getState(state); - if (!hist || (redo ? hist.undone : hist.done).eventCount == 0) - return false; - if (dispatch) { - let tr = histTransaction(hist, state, redo); - if (tr) - dispatch(scroll ? tr.scrollIntoView() : tr); - } - return true; - }; -} -/** -A command function that undoes the last change, if any. -*/ -const undo = buildCommand(false, true); -/** -A command function that redoes the last undone change, if any. -*/ -const redo = buildCommand(true, true); -/** -A command function that undoes the last change. Don't scroll the -selection into view. -*/ -const undoNoScroll = buildCommand(false, false); -/** -A command function that redoes the last undone change. Don't -scroll the selection into view. -*/ -const redoNoScroll = buildCommand(true, false); -/** -The amount of undoable events available in a given state. -*/ -function undoDepth(state) { - let hist = historyKey.getState(state); - return hist ? hist.done.eventCount : 0; -} -/** -The amount of redoable events available in a given editor state. -*/ -function redoDepth(state) { - let hist = historyKey.getState(state); - return hist ? hist.undone.eventCount : 0; -} -/** -Returns true if the given transaction was generated by the history -plugin. -*/ -function isHistoryTransaction(tr) { - return tr.getMeta(historyKey) != null; -} - -export { closeHistory, history, isHistoryTransaction, redo, redoDepth, redoNoScroll, undo, undoDepth, undoNoScroll }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/package.json b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/package.json deleted file mode 100644 index ba32654..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "prosemirror-history", - "version": "1.5.0", - "description": "Undo history for ProseMirror", - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "sideEffects": false, - "license": "MIT", - "maintainers": [ - { - "name": "Marijn Haverbeke", - "email": "marijn@haverbeke.berlin", - "web": "http://marijnhaverbeke.nl" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/prosemirror/prosemirror-history.git" - }, - "dependencies": { - "prosemirror-state": "^1.2.2", - "prosemirror-transform": "^1.0.0", - "prosemirror-view": "^1.31.0", - "rope-sequence": "^1.3.0" - }, - "devDependencies": { - "@prosemirror/buildhelper": "^0.1.5", - "prosemirror-test-builder": "^1.0.0" - }, - "scripts": { - "test": "pm-runtests", - "prepare": "pm-buildhelper src/history.ts" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/src/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/src/README.md deleted file mode 100644 index 0dcc30a..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/src/README.md +++ /dev/null @@ -1,23 +0,0 @@ -An implementation of an undo/redo history for ProseMirror. This -history is _selective_, meaning it does not just roll back to a -previous state but can undo some changes while keeping other, later -changes intact. (This is necessary for collaborative editing, and -comes up in other situations as well.) - -@history - -@undo - -@redo - -@undoNoScroll - -@redoNoScroll - -@undoDepth - -@redoDepth - -@closeHistory - -@isHistoryTransaction diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/src/history.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/src/history.ts deleted file mode 100644 index 3334b83..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/src/history.ts +++ /dev/null @@ -1,465 +0,0 @@ -import RopeSequence from "rope-sequence" -import {Mapping, Step, StepMap, Transform} from "prosemirror-transform" -import {Plugin, Command, PluginKey, EditorState, Transaction, SelectionBookmark} from "prosemirror-state" - -// ProseMirror's history isn't simply a way to roll back to a previous -// state, because ProseMirror supports applying changes without adding -// them to the history (for example during collaboration). -// -// To this end, each 'Branch' (one for the undo history and one for -// the redo history) keeps an array of 'Items', which can optionally -// hold a step (an actual undoable change), and always hold a position -// map (which is needed to move changes below them to apply to the -// current document). -// -// An item that has both a step and a selection bookmark is the start -// of an 'event' — a group of changes that will be undone or redone at -// once. (It stores only the bookmark, since that way we don't have to -// provide a document until the selection is actually applied, which -// is useful when compressing.) - -// Used to schedule history compression -const max_empty_items = 500 - -class Branch { - constructor(readonly items: RopeSequence, readonly eventCount: number) {} - - // Pop the latest event off the branch's history and apply it - // to a document transform. - popEvent(state: EditorState, preserveItems: boolean) { - if (this.eventCount == 0) return null - - let end = this.items.length - for (;; end--) { - let next = this.items.get(end - 1) - if (next.selection) { --end; break } - } - - let remap: Mapping | undefined, mapFrom: number | undefined - if (preserveItems) { - remap = this.remapping(end, this.items.length) - mapFrom = remap.maps.length - } - let transform = state.tr - let selection: SelectionBookmark | undefined, remaining: Branch | undefined - let addAfter: Item[] = [], addBefore: Item[] = [] - - this.items.forEach((item, i) => { - if (!item.step) { - if (!remap) { - remap = this.remapping(end, i + 1) - mapFrom = remap.maps.length - } - mapFrom!-- - addBefore.push(item) - return - } - - if (remap) { - addBefore.push(new Item(item.map)) - let step = item.step.map(remap.slice(mapFrom)), map - - if (step && transform.maybeStep(step).doc) { - map = transform.mapping.maps[transform.mapping.maps.length - 1] - addAfter.push(new Item(map, undefined, undefined, addAfter.length + addBefore.length)) - } - mapFrom!-- - if (map) remap.appendMap(map, mapFrom) - } else { - transform.maybeStep(item.step) - } - - if (item.selection) { - selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection - remaining = new Branch(this.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), this.eventCount - 1) - return false - } - }, this.items.length, 0) - - return {remaining: remaining!, transform, selection: selection!} - } - - // Create a new branch with the given transform added. - addTransform(transform: Transform, selection: SelectionBookmark | undefined, - histOptions: Required, preserveItems: boolean) { - let newItems = [], eventCount = this.eventCount - let oldItems = this.items, lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null - - for (let i = 0; i < transform.steps.length; i++) { - let step = transform.steps[i].invert(transform.docs[i]) - let item = new Item(transform.mapping.maps[i], step, selection), merged - if (merged = lastItem && lastItem.merge(item)) { - item = merged - if (i) newItems.pop() - else oldItems = oldItems.slice(0, oldItems.length - 1) - } - newItems.push(item) - if (selection) { - eventCount++ - selection = undefined - } - if (!preserveItems) lastItem = item - } - let overflow = eventCount - histOptions.depth - if (overflow > DEPTH_OVERFLOW) { - oldItems = cutOffEvents(oldItems, overflow) - eventCount -= overflow - } - return new Branch(oldItems.append(newItems), eventCount) - } - - remapping(from: number, to: number): Mapping { - let maps = new Mapping - this.items.forEach((item, i) => { - let mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from - ? maps.maps.length - item.mirrorOffset : undefined - maps.appendMap(item.map, mirrorPos) - }, from, to) - return maps - } - - addMaps(array: readonly StepMap[]) { - if (this.eventCount == 0) return this - return new Branch(this.items.append(array.map(map => new Item(map))), this.eventCount) - } - - // When the collab module receives remote changes, the history has - // to know about those, so that it can adjust the steps that were - // rebased on top of the remote changes, and include the position - // maps for the remote changes in its array of items. - rebased(rebasedTransform: Transform, rebasedCount: number) { - if (!this.eventCount) return this - - let rebasedItems: Item[] = [], start = Math.max(0, this.items.length - rebasedCount) - - let mapping = rebasedTransform.mapping - let newUntil = rebasedTransform.steps.length - let eventCount = this.eventCount - this.items.forEach(item => { if (item.selection) eventCount-- }, start) - - let iRebased = rebasedCount - this.items.forEach(item => { - let pos = mapping.getMirror(--iRebased) - if (pos == null) return - newUntil = Math.min(newUntil, pos) - let map = mapping.maps[pos] - if (item.step) { - let step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]) - let selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos)) - if (selection) eventCount++ - rebasedItems.push(new Item(map, step, selection)) - } else { - rebasedItems.push(new Item(map)) - } - }, start) - - let newMaps = [] - for (let i = rebasedCount; i < newUntil; i++) - newMaps.push(new Item(mapping.maps[i])) - let items = this.items.slice(0, start).append(newMaps).append(rebasedItems) - let branch = new Branch(items, eventCount) - - if (branch.emptyItemCount() > max_empty_items) - branch = branch.compress(this.items.length - rebasedItems.length) - return branch - } - - emptyItemCount() { - let count = 0 - this.items.forEach(item => { if (!item.step) count++ }) - return count - } - - // Compressing a branch means rewriting it to push the air (map-only - // items) out. During collaboration, these naturally accumulate - // because each remote change adds one. The `upto` argument is used - // to ensure that only the items below a given level are compressed, - // because `rebased` relies on a clean, untouched set of items in - // order to associate old items with rebased steps. - compress(upto = this.items.length) { - let remap = this.remapping(0, upto), mapFrom = remap.maps.length - let items: Item[] = [], events = 0 - this.items.forEach((item, i) => { - if (i >= upto) { - items.push(item) - if (item.selection) events++ - } else if (item.step) { - let step = item.step.map(remap.slice(mapFrom)), map = step && step.getMap() - mapFrom-- - if (map) remap.appendMap(map, mapFrom) - if (step) { - let selection = item.selection && item.selection.map(remap.slice(mapFrom)) - if (selection) events++ - let newItem = new Item(map!.invert(), step, selection), merged, last = items.length - 1 - if (merged = items.length && items[last].merge(newItem)) - items[last] = merged - else - items.push(newItem) - } - } else if (item.map) { - mapFrom-- - } - }, this.items.length, 0) - return new Branch(RopeSequence.from(items.reverse()), events) - } - - static empty = new Branch(RopeSequence.empty, 0) -} - -function cutOffEvents(items: RopeSequence, n: number) { - let cutPoint: number | undefined - items.forEach((item, i) => { - if (item.selection && (n-- == 0)) { - cutPoint = i - return false - } - }) - return items.slice(cutPoint!) -} - -class Item { - constructor( - // The (forward) step map for this item. - readonly map: StepMap, - // The inverted step - readonly step?: Step, - // If this is non-null, this item is the start of a group, and - // this selection is the starting selection for the group (the one - // that was active before the first step was applied) - readonly selection?: SelectionBookmark, - // If this item is the inverse of a previous mapping on the stack, - // this points at the inverse's offset - readonly mirrorOffset?: number - ) {} - - merge(other: Item) { - if (this.step && other.step && !other.selection) { - let step = other.step.merge(this.step) - if (step) return new Item(step.getMap().invert(), step, this.selection) - } - } -} - -// The value of the state field that tracks undo/redo history for that -// state. Will be stored in the plugin state when the history plugin -// is active. -class HistoryState { - constructor( - readonly done: Branch, - readonly undone: Branch, - readonly prevRanges: readonly number[] | null, - readonly prevTime: number, - readonly prevComposition: number - ) {} -} - -const DEPTH_OVERFLOW = 20 - -// Record a transformation in undo history. -function applyTransaction(history: HistoryState, state: EditorState, tr: Transaction, options: Required) { - let historyTr = tr.getMeta(historyKey), rebased - if (historyTr) return historyTr.historyState - - if (tr.getMeta(closeHistoryKey)) history = new HistoryState(history.done, history.undone, null, 0, -1) - - let appended = tr.getMeta("appendedTransaction") - - if (tr.steps.length == 0) { - return history - } else if (appended && appended.getMeta(historyKey)) { - if (appended.getMeta(historyKey).redo) - return new HistoryState(history.done.addTransform(tr, undefined, options, mustPreserveItems(state)), - history.undone, rangesFor(tr.mapping.maps), - history.prevTime, history.prevComposition) - else - return new HistoryState(history.done, history.undone.addTransform(tr, undefined, options, mustPreserveItems(state)), - null, history.prevTime, history.prevComposition) - } else if (tr.getMeta("addToHistory") !== false && !(appended && appended.getMeta("addToHistory") === false)) { - // Group transforms that occur in quick succession into one event. - let composition = tr.getMeta("composition") - let newGroup = history.prevTime == 0 || - (!appended && history.prevComposition != composition && - (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges!))) - let prevRanges = appended ? mapRanges(history.prevRanges!, tr.mapping) : rangesFor(tr.mapping.maps) - return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : undefined, - options, mustPreserveItems(state)), - Branch.empty, prevRanges, tr.time, composition == null ? history.prevComposition : composition) - } else if (rebased = tr.getMeta("rebased")) { - // Used by the collab module to tell the history that some of its - // content has been rebased. - return new HistoryState(history.done.rebased(tr, rebased), - history.undone.rebased(tr, rebased), - mapRanges(history.prevRanges!, tr.mapping), history.prevTime, history.prevComposition) - } else { - return new HistoryState(history.done.addMaps(tr.mapping.maps), - history.undone.addMaps(tr.mapping.maps), - mapRanges(history.prevRanges!, tr.mapping), history.prevTime, history.prevComposition) - } -} - -function isAdjacentTo(transform: Transform, prevRanges: readonly number[]) { - if (!prevRanges) return false - if (!transform.docChanged) return true - let adjacent = false - transform.mapping.maps[0].forEach((start, end) => { - for (let i = 0; i < prevRanges.length; i += 2) - if (start <= prevRanges[i + 1] && end >= prevRanges[i]) - adjacent = true - }) - return adjacent -} - -function rangesFor(maps: readonly StepMap[]) { - let result: number[] = [] - for (let i = maps.length - 1; i >= 0 && result.length == 0; i--) - maps[i].forEach((_from, _to, from, to) => result.push(from, to)) - return result -} - -function mapRanges(ranges: readonly number[], mapping: Mapping) { - if (!ranges) return null - let result = [] - for (let i = 0; i < ranges.length; i += 2) { - let from = mapping.map(ranges[i], 1), to = mapping.map(ranges[i + 1], -1) - if (from <= to) result.push(from, to) - } - return result -} - -// Apply the latest event from one branch to the document and shift the event -// onto the other branch. -function histTransaction(history: HistoryState, state: EditorState, redo: boolean): Transaction | null { - let preserveItems = mustPreserveItems(state) - let histOptions = (historyKey.get(state)!.spec as any).config as Required - let pop = (redo ? history.undone : history.done).popEvent(state, preserveItems) - if (!pop) return null - - let selection = pop.selection!.resolve(pop.transform.doc) - let added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(), - histOptions, preserveItems) - - let newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0, -1) - return pop.transform.setSelection(selection).setMeta(historyKey, {redo, historyState: newHist}) -} - -let cachedPreserveItems = false, cachedPreserveItemsPlugins: readonly Plugin[] | null = null -// Check whether any plugin in the given state has a -// `historyPreserveItems` property in its spec, in which case we must -// preserve steps exactly as they came in, so that they can be -// rebased. -function mustPreserveItems(state: EditorState) { - let plugins = state.plugins - if (cachedPreserveItemsPlugins != plugins) { - cachedPreserveItems = false - cachedPreserveItemsPlugins = plugins - for (let i = 0; i < plugins.length; i++) if ((plugins[i].spec as any).historyPreserveItems) { - cachedPreserveItems = true - break - } - } - return cachedPreserveItems -} - -/// Set a flag on the given transaction that will prevent further steps -/// from being appended to an existing history event (so that they -/// require a separate undo command to undo). -export function closeHistory(tr: Transaction) { - return tr.setMeta(closeHistoryKey, true) -} - -const historyKey = new PluginKey("history") -const closeHistoryKey = new PluginKey("closeHistory") - -interface HistoryOptions { - /// The amount of history events that are collected before the - /// oldest events are discarded. Defaults to 100. - depth?: number - - /// The delay between changes after which a new group should be - /// started. Defaults to 500 (milliseconds). Note that when changes - /// aren't adjacent, a new group is always started. - newGroupDelay?: number -} - -/// Returns a plugin that enables the undo history for an editor. The -/// plugin will track undo and redo stacks, which can be used with the -/// [`undo`](#history.undo) and [`redo`](#history.redo) commands. -/// -/// You can set an `"addToHistory"` [metadata -/// property](#state.Transaction.setMeta) of `false` on a transaction -/// to prevent it from being rolled back by undo. -export function history(config: HistoryOptions = {}): Plugin { - config = {depth: config.depth || 100, - newGroupDelay: config.newGroupDelay || 500} - - return new Plugin({ - key: historyKey, - - state: { - init() { - return new HistoryState(Branch.empty, Branch.empty, null, 0, -1) - }, - apply(tr, hist, state) { - return applyTransaction(hist, state, tr, config as Required) - } - }, - - config, - - props: { - handleDOMEvents: { - beforeinput(view, e: Event) { - let inputType = (e as InputEvent).inputType - let command = inputType == "historyUndo" ? undo : inputType == "historyRedo" ? redo : null - if (!command || !view.editable) return false - e.preventDefault() - return command(view.state, view.dispatch) - } - } - } - }) -} - -function buildCommand(redo: boolean, scroll: boolean): Command { - return (state, dispatch) => { - let hist = historyKey.getState(state) - if (!hist || (redo ? hist.undone : hist.done).eventCount == 0) return false - if (dispatch) { - let tr = histTransaction(hist, state, redo) - if (tr) dispatch(scroll ? tr.scrollIntoView() : tr) - } - return true - } -} - -/// A command function that undoes the last change, if any. -export const undo = buildCommand(false, true) - -/// A command function that redoes the last undone change, if any. -export const redo = buildCommand(true, true) - -/// A command function that undoes the last change. Don't scroll the -/// selection into view. -export const undoNoScroll = buildCommand(false, false) - -/// A command function that redoes the last undone change. Don't -/// scroll the selection into view. -export const redoNoScroll = buildCommand(true, false) - -/// The amount of undoable events available in a given state. -export function undoDepth(state: EditorState) { - let hist = historyKey.getState(state) - return hist ? hist.done.eventCount : 0 -} - -/// The amount of redoable events available in a given editor state. -export function redoDepth(state: EditorState) { - let hist = historyKey.getState(state) - return hist ? hist.undone.eventCount : 0 -} - -/// Returns true if the given transaction was generated by the history -/// plugin. -export function isHistoryTransaction(tr: Transaction) { - return tr.getMeta(historyKey) != null -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-state b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-state deleted file mode 120000 index f732de9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-state +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-state@1.4.4/node_modules/prosemirror-state \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-transform b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-transform deleted file mode 120000 index d9fd2cc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-transform +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-transform@1.12.0/node_modules/prosemirror-transform \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-view b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-view deleted file mode 120000 index ed4297c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-view +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-view@1.41.8/node_modules/prosemirror-view \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/rope-sequence b/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/rope-sequence deleted file mode 120000 index 54aacc9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/rope-sequence +++ /dev/null @@ -1 +0,0 @@ -../../rope-sequence@1.3.4/node_modules/rope-sequence \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/.tern-project b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/.tern-project deleted file mode 100644 index dde3976..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/.tern-project +++ /dev/null @@ -1,8 +0,0 @@ -{ - "libs": ["browser"], - "plugins": { - "node": {}, - "complete_strings": {}, - "es_modules": {} - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/CHANGELOG.md deleted file mode 100644 index d04a517..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/CHANGELOG.md +++ /dev/null @@ -1,127 +0,0 @@ -## 1.5.1 (2025-10-15) - -### Bug fixes - -Fix an issue where input rules with `inCodeMark` disabled would still match if a part of the match before the cursor had a code mark. - -## 1.5.0 (2025-03-18) - -### Bug fixes - -Fix a bug where input rules behaved incorrectly when text input inserted multiple characters and only a part of those were matched by a rule. - -Set `inCodeMark` to false for emdash and quote input rules. - -### New features - -Input rules now take an `inCodeMark` option that can be used to turn them off inside marks marked as code. - -## 1.4.0 (2024-01-30) - -### New features - -Input rules now take an `inCode` option that controls whether they should apply inside nodes marked as code. - -## 1.3.0 (2023-11-16) - -### New features - -Input rules can now be set to be non-undoable, preventing `undoInputRule` from rolling them back. - -## 1.2.1 (2023-05-17) - -### Bug fixes - -Include CommonJS type declarations in the package to please new TypeScript resolution settings. - -## 1.2.0 (2022-05-30) - -### New features - -Include TypeScript type declarations. - -## 1.1.3 (2020-09-16) - -### Bug fixes - -Fix crash when undoing input rules when the rule was triggered without inserting text. - -## 1.1.2 (2019-11-20) - -### Bug fixes - -Rename ES module files to use a .js extension, since Webpack gets confused by .mjs - -## 1.1.1 (2019-11-19) - -### Bug fixes - -The file referred to in the package's `module` field now is compiled down to ES5. - -## 1.1.0 (2019-11-08) - -### New features - -Add a `module` field to package json file. - -## 1.0.4 (2019-05-17) - -### Bug fixes - -Fix a null-dereference when running in strict mode. - -## 1.0.3 (2019-05-17) - -### Bug fixes - -Prevent input rules from running during compositions, since they will annoyingly interrupt them. - -## 1.0.2 (2019-05-08) - -### Bug fixes - -Improve selection handling during text replacement. - -## 1.0.1 (2017-11-10) - -### Bug fixes - -Input rules no longer fire in blocks that have their `code` spec set to true. - -## 0.23.0 (2017-09-13) - -### Breaking changes - -Schema-specific rule-builders `blockQuoteRule`, `orderedListRule`, `bulletListRule`, `codeBlockRule`, and `headingRule`, along with the `allInputRules` array, are no longer included in this module. - -## 0.22.0 (2017-06-29) - -### Bug fixes - -Input rules with spaces in them now match any whitespace where the space is expected, to avoid mysteriously not working when a non-breaking space is present. - -## 0.20.0 (2017-04-03) - -### Breaking changes - -The input rules [plugin](https://prosemirror.net/docs/ref/version/0.20.0.html#inputrules.inputRules) no longer implicitly binds backspace to undo the last applied rule. - -### New features - -This module now exposes a command [`undoInputRule`](https://prosemirror.net/docs/ref/version/0.20.0.html#inputrules.undoInputRule), which will revert an input rule when run directly after one was applied. - -## 0.11.0 (2016-09-21) - -### Breaking changes - -Moved into a separate module. - -You can now add this plugin multiple times to add different sets of -rules to an editor (if you want). It is not possible to change the set -of rules of an existing plugin instance. - -[Rules](https://prosemirror.net/docs/ref/version/0.11.0.html#inputrules.InputRule) no longer take a `filter` argument. - -The signature of the `handler` callback for a -[rule](https://prosemirror.net/docs/ref/version/0.11.0.html#inputrules.InputRule) changed. - diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/CONTRIBUTING.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/CONTRIBUTING.md deleted file mode 100644 index f2a345d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/CONTRIBUTING.md +++ /dev/null @@ -1,104 +0,0 @@ -# How to contribute - -- [Getting help](#getting-help) -- [Submitting bug reports](#submitting-bug-reports) -- [Contributing code](#contributing-code) - -## Getting help - -Community discussion, questions, and informal bug reporting is done on the -[discuss.ProseMirror forum](http://discuss.prosemirror.net). - -## Submitting bug reports - -Report bugs on the -[GitHub issue tracker](http://github.com/prosemirror/prosemirror/issues). -Before reporting a bug, please read these pointers. - -- The issue tracker is for *bugs*, not requests for help. Questions - should be asked on the [forum](http://discuss.prosemirror.net). - -- Include information about the version of the code that exhibits the - problem. For browser-related issues, include the browser and browser - version on which the problem occurred. - -- Mention very precisely what went wrong. "X is broken" is not a good - bug report. What did you expect to happen? What happened instead? - Describe the exact steps a maintainer has to take to make the - problem occur. A screencast can be useful, but is no substitute for - a textual description. - -- A great way to make it easy to reproduce your problem, if it can not - be trivially reproduced on the website demos, is to submit a script - that triggers the issue. - -## Contributing code - -If you want to make a change that involves a significant overhaul of -the code or introduces a user-visible new feature, create an -[RFC](https://github.com/ProseMirror/rfcs/) first with your proposal. - -- Make sure you have a [GitHub Account](https://github.com/signup/free) - -- Fork the relevant repository - ([how to fork a repo](https://help.github.com/articles/fork-a-repo)) - -- Create a local checkout of the code. You can use the - [main repository](https://github.com/prosemirror/prosemirror) to - easily check out all core modules. - -- Make your changes, and commit them - -- Follow the code style of the rest of the project (see below). Run - `npm run lint` (in the main repository checkout) to make sure that - the linter is happy. - -- If your changes are easy to test or likely to regress, add tests in - the relevant `test/` directory. Either put them in an existing - `test-*.js` file, if they fit there, or add a new file. - -- Make sure all tests pass. Run `npm run test` to verify tests pass - (you will need Node.js v6+). - -- Submit a pull request ([how to create a pull request](https://help.github.com/articles/fork-a-repo)). - Don't put more than one feature/fix in a single pull request. - -By contributing code to ProseMirror you - - - Agree to license the contributed code under the project's [MIT - license](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE). - - - Confirm that you have the right to contribute and license the code - in question. (Either you hold all rights on the code, or the rights - holder has explicitly granted the right to use it like this, - through a compatible open source license or through a direct - agreement with you.) - -### Coding standards - -- ES6 syntax, targeting an ES5 runtime (i.e. don't use library - elements added by ES6, don't use ES7/ES.next syntax). - -- 2 spaces per indentation level, no tabs. - -- No semicolons except when necessary. - -- Follow the surrounding code when it comes to spacing, brace - placement, etc. - -- Brace-less single-statement bodies are encouraged (whenever they - don't impact readability). - -- [getdocs](https://github.com/marijnh/getdocs)-style doc comments - above items that are part of the public API. - -- When documenting non-public items, you can put the type after a - single colon, so that getdocs doesn't pick it up and add it to the - API reference. - -- The linter (`npm run lint`) complains about unused variables and - functions. Prefix their names with an underscore to muffle it. - -- ProseMirror does *not* follow JSHint or JSLint prescribed style. - Patches that try to 'fix' code to pass one of these linters will not - be accepted. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/LICENSE b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/LICENSE deleted file mode 100644 index 7e2295b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2015-2017 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/README.md deleted file mode 100644 index 238d39e..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# prosemirror-inputrules - -[ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-inputrules/blob/master/CHANGELOG.md) ] - -This is a [core module](https://prosemirror.net/docs/ref/#inputrules) of [ProseMirror](https://prosemirror.net). -ProseMirror is a well-behaved rich semantic content editor based on -contentEditable, with support for collaborative editing and custom -document schemas. - -This [module](https://prosemirror.net/docs/ref/#inputrules) exports a -plugin that can be used to define _input rules_, things that should -happen when input matching a given pattern is typed, along with a -number of predefined rules. - -The [project page](https://prosemirror.net) has more information, a -number of [examples](https://prosemirror.net/examples/) and the -[documentation](https://prosemirror.net/docs/). - -This code is released under an -[MIT license](https://github.com/prosemirror/prosemirror/tree/master/LICENSE). -There's a [forum](http://discuss.prosemirror.net) for general -discussion and support requests, and the -[Github bug tracker](https://github.com/prosemirror/prosemirror/issues) -is the place to report issues. - -We aim to be an inclusive, welcoming community. To make that explicit, -we have a [code of -conduct](http://contributor-covenant.org/version/1/1/0/) that applies -to communication around the project. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.cjs deleted file mode 100644 index 081e7ad..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.cjs +++ /dev/null @@ -1,194 +0,0 @@ -'use strict'; - -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var prosemirrorState = require('prosemirror-state'); -var prosemirrorTransform = require('prosemirror-transform'); -var InputRule = _createClass(function InputRule(match, handler) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - _classCallCheck(this, InputRule); - this.match = match; - this.match = match; - this.handler = typeof handler == "string" ? stringHandler(handler) : handler; - this.undoable = options.undoable !== false; - this.inCode = options.inCode || false; - this.inCodeMark = options.inCodeMark !== false; -}); -function stringHandler(string) { - return function (state, match, start, end) { - var insert = string; - if (match[1]) { - var offset = match[0].lastIndexOf(match[1]); - insert += match[0].slice(offset + match[1].length); - start += offset; - var cutOff = start - end; - if (cutOff > 0) { - insert = match[0].slice(offset - cutOff, offset) + insert; - start = end; - } - } - return state.tr.insertText(insert, start, end); - }; -} -var MAX_MATCH = 500; -function inputRules(_ref) { - var rules = _ref.rules; - var plugin = new prosemirrorState.Plugin({ - state: { - init: function init() { - return null; - }, - apply: function apply(tr, prev) { - var stored = tr.getMeta(this); - if (stored) return stored; - return tr.selectionSet || tr.docChanged ? null : prev; - } - }, - props: { - handleTextInput: function handleTextInput(view, from, to, text) { - return run(view, from, to, text, rules, plugin); - }, - handleDOMEvents: { - compositionend: function compositionend(view) { - setTimeout(function () { - var $cursor = view.state.selection.$cursor; - if ($cursor) run(view, $cursor.pos, $cursor.pos, "", rules, plugin); - }); - } - } - }, - isInputRules: true - }); - return plugin; -} -function run(view, from, to, text, rules, plugin) { - if (view.composing) return false; - var state = view.state, - $from = state.doc.resolve(from); - var textBefore = $from.parent.textBetween(Math.max(0, $from.parentOffset - MAX_MATCH), $from.parentOffset, null, "\uFFFC") + text; - var _loop = function _loop() { - var rule = rules[i]; - if (!rule.inCodeMark && $from.marks().some(function (m) { - return m.type.spec.code; - })) return 0; - if ($from.parent.type.spec.code) { - if (!rule.inCode) return 0; - } else if (rule.inCode === "only") { - return 0; - } - var match = rule.match.exec(textBefore); - if (!match || match[0].length < text.length) return 0; - var startPos = from - (match[0].length - text.length); - if (!rule.inCodeMark) { - var hasMark = false; - state.doc.nodesBetween(startPos, $from.pos, function (node) { - if (node.isInline && node.marks.some(function (m) { - return m.type.spec.code; - })) hasMark = true; - }); - if (hasMark) return 0; - } - var tr = rule.handler(state, match, startPos, to); - if (!tr) return 0; - if (rule.undoable) tr.setMeta(plugin, { - transform: tr, - from: from, - to: to, - text: text - }); - view.dispatch(tr); - return { - v: true - }; - }, - _ret; - for (var i = 0; i < rules.length; i++) { - _ret = _loop(); - if (_ret === 0) continue; - if (_ret) return _ret.v; - } - return false; -} -var undoInputRule = function undoInputRule(state, dispatch) { - var plugins = state.plugins; - for (var i = 0; i < plugins.length; i++) { - var plugin = plugins[i], - undoable = void 0; - if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) { - if (dispatch) { - var tr = state.tr, - toUndo = undoable.transform; - for (var j = toUndo.steps.length - 1; j >= 0; j--) tr.step(toUndo.steps[j].invert(toUndo.docs[j])); - if (undoable.text) { - var marks = tr.doc.resolve(undoable.from).marks(); - tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks)); - } else { - tr["delete"](undoable.from, undoable.to); - } - dispatch(tr); - } - return true; - } - } - return false; -}; -var emDash = new InputRule(/--$/, "—", { - inCodeMark: false -}); -var ellipsis = new InputRule(/\.\.\.$/, "…", { - inCodeMark: false -}); -var openDoubleQuote = new InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/, "“", { - inCodeMark: false -}); -var closeDoubleQuote = new InputRule(/"$/, "”", { - inCodeMark: false -}); -var openSingleQuote = new InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/, "‘", { - inCodeMark: false -}); -var closeSingleQuote = new InputRule(/'$/, "’", { - inCodeMark: false -}); -var smartQuotes = [openDoubleQuote, closeDoubleQuote, openSingleQuote, closeSingleQuote]; -function wrappingInputRule(regexp, nodeType) { - var getAttrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; - var joinPredicate = arguments.length > 3 ? arguments[3] : undefined; - return new InputRule(regexp, function (state, match, start, end) { - var attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs; - var tr = state.tr["delete"](start, end); - var $start = tr.doc.resolve(start), - range = $start.blockRange(), - wrapping = range && prosemirrorTransform.findWrapping(range, nodeType, attrs); - if (!wrapping) return null; - tr.wrap(range, wrapping); - var before = tr.doc.resolve(start - 1).nodeBefore; - if (before && before.type == nodeType && prosemirrorTransform.canJoin(tr.doc, start - 1) && (!joinPredicate || joinPredicate(match, before))) tr.join(start - 1); - return tr; - }); -} -function textblockTypeInputRule(regexp, nodeType) { - var getAttrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; - return new InputRule(regexp, function (state, match, start, end) { - var $start = state.doc.resolve(start); - var attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs; - if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), nodeType)) return null; - return state.tr["delete"](start, end).setBlockType(start, start, nodeType, attrs); - }); -} -exports.InputRule = InputRule; -exports.closeDoubleQuote = closeDoubleQuote; -exports.closeSingleQuote = closeSingleQuote; -exports.ellipsis = ellipsis; -exports.emDash = emDash; -exports.inputRules = inputRules; -exports.openDoubleQuote = openDoubleQuote; -exports.openSingleQuote = openSingleQuote; -exports.smartQuotes = smartQuotes; -exports.textblockTypeInputRule = textblockTypeInputRule; -exports.undoInputRule = undoInputRule; -exports.wrappingInputRule = wrappingInputRule; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.d.cts deleted file mode 100644 index 2e3368c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.d.cts +++ /dev/null @@ -1,131 +0,0 @@ -import { EditorState, Transaction, Plugin, Command } from 'prosemirror-state'; -import { NodeType, Attrs, Node } from 'prosemirror-model'; - -/** -Input rules are regular expressions describing a piece of text -that, when typed, causes something to happen. This might be -changing two dashes into an emdash, wrapping a paragraph starting -with `"> "` into a blockquote, or something entirely different. -*/ -declare class InputRule { - inCode: boolean | "only"; - inCodeMark: boolean | "only"; - /** - Create an input rule. The rule applies when the user typed - something and the text directly in front of the cursor matches - `match`, which should end with `$`. - - The `handler` can be a string, in which case the matched text, or - the first matched group in the regexp, is replaced by that - string. - - Or a it can be a function, which will be called with the match - array produced by - [`RegExp.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec), - as well as the start and end of the matched range, and which can - return a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) that describes the - rule's effect, or null to indicate the input was not handled. - */ - constructor( - /** - @internal - */ - match: RegExp, handler: string | ((state: EditorState, match: RegExpMatchArray, start: number, end: number) => Transaction | null), options?: { - /** - When set to false, - [`undoInputRule`](https://prosemirror.net/docs/ref/#inputrules.undoInputRule) doesn't work on - this rule. - */ - undoable?: boolean; - /** - By default, input rules will not apply inside nodes marked - as [code](https://prosemirror.net/docs/ref/#model.NodeSpec.code). Set this to true to change - that, or to `"only"` to _only_ match in such nodes. - */ - inCode?: boolean | "only"; - /** - When set to `false`, this rule will not fire inside marks - marked as [code](https://prosemirror.net/docs/ref/#model.MarkSpec.code). The default is - `true`. - */ - inCodeMark?: boolean; - }); -} -type PluginState = { - transform: Transaction; - from: number; - to: number; - text: string; -} | null; -/** -Create an input rules plugin. When enabled, it will cause text -input that matches any of the given rules to trigger the rule's -action. -*/ -declare function inputRules({ rules }: { - rules: readonly InputRule[]; -}): Plugin; -/** -This is a command that will undo an input rule, if applying such a -rule was the last thing that the user did. -*/ -declare const undoInputRule: Command; - -/** -Converts double dashes to an emdash. -*/ -declare const emDash: InputRule; -/** -Converts three dots to an ellipsis character. -*/ -declare const ellipsis: InputRule; -/** -“Smart” opening double quotes. -*/ -declare const openDoubleQuote: InputRule; -/** -“Smart” closing double quotes. -*/ -declare const closeDoubleQuote: InputRule; -/** -“Smart” opening single quotes. -*/ -declare const openSingleQuote: InputRule; -/** -“Smart” closing single quotes. -*/ -declare const closeSingleQuote: InputRule; -/** -Smart-quote related input rules. -*/ -declare const smartQuotes: readonly InputRule[]; - -/** -Build an input rule for automatically wrapping a textblock when a -given string is typed. The `regexp` argument is -directly passed through to the `InputRule` constructor. You'll -probably want the regexp to start with `^`, so that the pattern can -only occur at the start of a textblock. - -`nodeType` is the type of node to wrap in. If it needs attributes, -you can either pass them directly, or pass a function that will -compute them from the regular expression match. - -By default, if there's a node with the same type above the newly -wrapped node, the rule will try to [join](https://prosemirror.net/docs/ref/#transform.Transform.join) those -two nodes. You can pass a join predicate, which takes a regular -expression match and the node before the wrapped node, and can -return a boolean to indicate whether a join should happen. -*/ -declare function wrappingInputRule(regexp: RegExp, nodeType: NodeType, getAttrs?: Attrs | null | ((matches: RegExpMatchArray) => Attrs | null), joinPredicate?: (match: RegExpMatchArray, node: Node) => boolean): InputRule; -/** -Build an input rule that changes the type of a textblock when the -matched text is typed into it. You'll usually want to start your -regexp with `^` to that it is only matched at the start of a -textblock. The optional `getAttrs` parameter can be used to compute -the new node's attributes, and works the same as in the -`wrappingInputRule` function. -*/ -declare function textblockTypeInputRule(regexp: RegExp, nodeType: NodeType, getAttrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null)): InputRule; - -export { InputRule, closeDoubleQuote, closeSingleQuote, ellipsis, emDash, inputRules, openDoubleQuote, openSingleQuote, smartQuotes, textblockTypeInputRule, undoInputRule, wrappingInputRule }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.d.ts deleted file mode 100644 index 2e3368c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { EditorState, Transaction, Plugin, Command } from 'prosemirror-state'; -import { NodeType, Attrs, Node } from 'prosemirror-model'; - -/** -Input rules are regular expressions describing a piece of text -that, when typed, causes something to happen. This might be -changing two dashes into an emdash, wrapping a paragraph starting -with `"> "` into a blockquote, or something entirely different. -*/ -declare class InputRule { - inCode: boolean | "only"; - inCodeMark: boolean | "only"; - /** - Create an input rule. The rule applies when the user typed - something and the text directly in front of the cursor matches - `match`, which should end with `$`. - - The `handler` can be a string, in which case the matched text, or - the first matched group in the regexp, is replaced by that - string. - - Or a it can be a function, which will be called with the match - array produced by - [`RegExp.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec), - as well as the start and end of the matched range, and which can - return a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) that describes the - rule's effect, or null to indicate the input was not handled. - */ - constructor( - /** - @internal - */ - match: RegExp, handler: string | ((state: EditorState, match: RegExpMatchArray, start: number, end: number) => Transaction | null), options?: { - /** - When set to false, - [`undoInputRule`](https://prosemirror.net/docs/ref/#inputrules.undoInputRule) doesn't work on - this rule. - */ - undoable?: boolean; - /** - By default, input rules will not apply inside nodes marked - as [code](https://prosemirror.net/docs/ref/#model.NodeSpec.code). Set this to true to change - that, or to `"only"` to _only_ match in such nodes. - */ - inCode?: boolean | "only"; - /** - When set to `false`, this rule will not fire inside marks - marked as [code](https://prosemirror.net/docs/ref/#model.MarkSpec.code). The default is - `true`. - */ - inCodeMark?: boolean; - }); -} -type PluginState = { - transform: Transaction; - from: number; - to: number; - text: string; -} | null; -/** -Create an input rules plugin. When enabled, it will cause text -input that matches any of the given rules to trigger the rule's -action. -*/ -declare function inputRules({ rules }: { - rules: readonly InputRule[]; -}): Plugin; -/** -This is a command that will undo an input rule, if applying such a -rule was the last thing that the user did. -*/ -declare const undoInputRule: Command; - -/** -Converts double dashes to an emdash. -*/ -declare const emDash: InputRule; -/** -Converts three dots to an ellipsis character. -*/ -declare const ellipsis: InputRule; -/** -“Smart” opening double quotes. -*/ -declare const openDoubleQuote: InputRule; -/** -“Smart” closing double quotes. -*/ -declare const closeDoubleQuote: InputRule; -/** -“Smart” opening single quotes. -*/ -declare const openSingleQuote: InputRule; -/** -“Smart” closing single quotes. -*/ -declare const closeSingleQuote: InputRule; -/** -Smart-quote related input rules. -*/ -declare const smartQuotes: readonly InputRule[]; - -/** -Build an input rule for automatically wrapping a textblock when a -given string is typed. The `regexp` argument is -directly passed through to the `InputRule` constructor. You'll -probably want the regexp to start with `^`, so that the pattern can -only occur at the start of a textblock. - -`nodeType` is the type of node to wrap in. If it needs attributes, -you can either pass them directly, or pass a function that will -compute them from the regular expression match. - -By default, if there's a node with the same type above the newly -wrapped node, the rule will try to [join](https://prosemirror.net/docs/ref/#transform.Transform.join) those -two nodes. You can pass a join predicate, which takes a regular -expression match and the node before the wrapped node, and can -return a boolean to indicate whether a join should happen. -*/ -declare function wrappingInputRule(regexp: RegExp, nodeType: NodeType, getAttrs?: Attrs | null | ((matches: RegExpMatchArray) => Attrs | null), joinPredicate?: (match: RegExpMatchArray, node: Node) => boolean): InputRule; -/** -Build an input rule that changes the type of a textblock when the -matched text is typed into it. You'll usually want to start your -regexp with `^` to that it is only matched at the start of a -textblock. The optional `getAttrs` parameter can be used to compute -the new node's attributes, and works the same as in the -`wrappingInputRule` function. -*/ -declare function textblockTypeInputRule(regexp: RegExp, nodeType: NodeType, getAttrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null)): InputRule; - -export { InputRule, closeDoubleQuote, closeSingleQuote, ellipsis, emDash, inputRules, openDoubleQuote, openSingleQuote, smartQuotes, textblockTypeInputRule, undoInputRule, wrappingInputRule }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.js b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.js deleted file mode 100644 index 2d41c34..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/dist/index.js +++ /dev/null @@ -1,239 +0,0 @@ -import { Plugin } from 'prosemirror-state'; -import { findWrapping, canJoin } from 'prosemirror-transform'; - -/** -Input rules are regular expressions describing a piece of text -that, when typed, causes something to happen. This might be -changing two dashes into an emdash, wrapping a paragraph starting -with `"> "` into a blockquote, or something entirely different. -*/ -class InputRule { - /** - Create an input rule. The rule applies when the user typed - something and the text directly in front of the cursor matches - `match`, which should end with `$`. - - The `handler` can be a string, in which case the matched text, or - the first matched group in the regexp, is replaced by that - string. - - Or a it can be a function, which will be called with the match - array produced by - [`RegExp.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec), - as well as the start and end of the matched range, and which can - return a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) that describes the - rule's effect, or null to indicate the input was not handled. - */ - constructor( - /** - @internal - */ - match, handler, options = {}) { - this.match = match; - this.match = match; - this.handler = typeof handler == "string" ? stringHandler(handler) : handler; - this.undoable = options.undoable !== false; - this.inCode = options.inCode || false; - this.inCodeMark = options.inCodeMark !== false; - } -} -function stringHandler(string) { - return function (state, match, start, end) { - let insert = string; - if (match[1]) { - let offset = match[0].lastIndexOf(match[1]); - insert += match[0].slice(offset + match[1].length); - start += offset; - let cutOff = start - end; - if (cutOff > 0) { - insert = match[0].slice(offset - cutOff, offset) + insert; - start = end; - } - } - return state.tr.insertText(insert, start, end); - }; -} -const MAX_MATCH = 500; -/** -Create an input rules plugin. When enabled, it will cause text -input that matches any of the given rules to trigger the rule's -action. -*/ -function inputRules({ rules }) { - let plugin = new Plugin({ - state: { - init() { return null; }, - apply(tr, prev) { - let stored = tr.getMeta(this); - if (stored) - return stored; - return tr.selectionSet || tr.docChanged ? null : prev; - } - }, - props: { - handleTextInput(view, from, to, text) { - return run(view, from, to, text, rules, plugin); - }, - handleDOMEvents: { - compositionend: (view) => { - setTimeout(() => { - let { $cursor } = view.state.selection; - if ($cursor) - run(view, $cursor.pos, $cursor.pos, "", rules, plugin); - }); - } - } - }, - isInputRules: true - }); - return plugin; -} -function run(view, from, to, text, rules, plugin) { - if (view.composing) - return false; - let state = view.state, $from = state.doc.resolve(from); - let textBefore = $from.parent.textBetween(Math.max(0, $from.parentOffset - MAX_MATCH), $from.parentOffset, null, "\ufffc") + text; - for (let i = 0; i < rules.length; i++) { - let rule = rules[i]; - if (!rule.inCodeMark && $from.marks().some(m => m.type.spec.code)) - continue; - if ($from.parent.type.spec.code) { - if (!rule.inCode) - continue; - } - else if (rule.inCode === "only") { - continue; - } - let match = rule.match.exec(textBefore); - if (!match || match[0].length < text.length) - continue; - let startPos = from - (match[0].length - text.length); - if (!rule.inCodeMark) { - let hasMark = false; - state.doc.nodesBetween(startPos, $from.pos, node => { - if (node.isInline && node.marks.some(m => m.type.spec.code)) - hasMark = true; - }); - if (hasMark) - continue; - } - let tr = rule.handler(state, match, startPos, to); - if (!tr) - continue; - if (rule.undoable) - tr.setMeta(plugin, { transform: tr, from, to, text }); - view.dispatch(tr); - return true; - } - return false; -} -/** -This is a command that will undo an input rule, if applying such a -rule was the last thing that the user did. -*/ -const undoInputRule = (state, dispatch) => { - let plugins = state.plugins; - for (let i = 0; i < plugins.length; i++) { - let plugin = plugins[i], undoable; - if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) { - if (dispatch) { - let tr = state.tr, toUndo = undoable.transform; - for (let j = toUndo.steps.length - 1; j >= 0; j--) - tr.step(toUndo.steps[j].invert(toUndo.docs[j])); - if (undoable.text) { - let marks = tr.doc.resolve(undoable.from).marks(); - tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks)); - } - else { - tr.delete(undoable.from, undoable.to); - } - dispatch(tr); - } - return true; - } - } - return false; -}; - -/** -Converts double dashes to an emdash. -*/ -const emDash = new InputRule(/--$/, "—", { inCodeMark: false }); -/** -Converts three dots to an ellipsis character. -*/ -const ellipsis = new InputRule(/\.\.\.$/, "…", { inCodeMark: false }); -/** -“Smart” opening double quotes. -*/ -const openDoubleQuote = new InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/, "“", { inCodeMark: false }); -/** -“Smart” closing double quotes. -*/ -const closeDoubleQuote = new InputRule(/"$/, "”", { inCodeMark: false }); -/** -“Smart” opening single quotes. -*/ -const openSingleQuote = new InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/, "‘", { inCodeMark: false }); -/** -“Smart” closing single quotes. -*/ -const closeSingleQuote = new InputRule(/'$/, "’", { inCodeMark: false }); -/** -Smart-quote related input rules. -*/ -const smartQuotes = [openDoubleQuote, closeDoubleQuote, openSingleQuote, closeSingleQuote]; - -/** -Build an input rule for automatically wrapping a textblock when a -given string is typed. The `regexp` argument is -directly passed through to the `InputRule` constructor. You'll -probably want the regexp to start with `^`, so that the pattern can -only occur at the start of a textblock. - -`nodeType` is the type of node to wrap in. If it needs attributes, -you can either pass them directly, or pass a function that will -compute them from the regular expression match. - -By default, if there's a node with the same type above the newly -wrapped node, the rule will try to [join](https://prosemirror.net/docs/ref/#transform.Transform.join) those -two nodes. You can pass a join predicate, which takes a regular -expression match and the node before the wrapped node, and can -return a boolean to indicate whether a join should happen. -*/ -function wrappingInputRule(regexp, nodeType, getAttrs = null, joinPredicate) { - return new InputRule(regexp, (state, match, start, end) => { - let attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs; - let tr = state.tr.delete(start, end); - let $start = tr.doc.resolve(start), range = $start.blockRange(), wrapping = range && findWrapping(range, nodeType, attrs); - if (!wrapping) - return null; - tr.wrap(range, wrapping); - let before = tr.doc.resolve(start - 1).nodeBefore; - if (before && before.type == nodeType && canJoin(tr.doc, start - 1) && - (!joinPredicate || joinPredicate(match, before))) - tr.join(start - 1); - return tr; - }); -} -/** -Build an input rule that changes the type of a textblock when the -matched text is typed into it. You'll usually want to start your -regexp with `^` to that it is only matched at the start of a -textblock. The optional `getAttrs` parameter can be used to compute -the new node's attributes, and works the same as in the -`wrappingInputRule` function. -*/ -function textblockTypeInputRule(regexp, nodeType, getAttrs = null) { - return new InputRule(regexp, (state, match, start, end) => { - let $start = state.doc.resolve(start); - let attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs; - if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), nodeType)) - return null; - return state.tr - .delete(start, end) - .setBlockType(start, start, nodeType, attrs); - }); -} - -export { InputRule, closeDoubleQuote, closeSingleQuote, ellipsis, emDash, inputRules, openDoubleQuote, openSingleQuote, smartQuotes, textblockTypeInputRule, undoInputRule, wrappingInputRule }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/package.json b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/package.json deleted file mode 100644 index 52fdf40..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "prosemirror-inputrules", - "version": "1.5.1", - "description": "Automatic transforms on text input for ProseMirror", - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "sideEffects": false, - "license": "MIT", - "maintainers": [ - { - "name": "Marijn Haverbeke", - "email": "marijn@haverbeke.berlin", - "web": "http://marijnhaverbeke.nl" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/prosemirror/prosemirror-inputrules.git" - }, - "dependencies": { - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.0.0" - }, - "devDependencies": { - "@prosemirror/buildhelper": "^0.1.5" - }, - "scripts": { - "prepare": "pm-buildhelper src/index.ts" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/README.md deleted file mode 100644 index d46e71c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/README.md +++ /dev/null @@ -1,23 +0,0 @@ -This module defines a plugin for attaching _input rules_ to an editor, -which can react to or transform text typed by the user. It also comes -with a bunch of default rules that can be enabled in this plugin. - -@InputRule -@inputRules -@undoInputRule - -The module comes with a number of predefined rules: - -@emDash -@ellipsis -@openDoubleQuote -@closeDoubleQuote -@openSingleQuote -@closeSingleQuote -@smartQuotes - -These utility functions take schema-specific parameters and create -input rules specific to that schema. - -@wrappingInputRule -@textblockTypeInputRule diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/index.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/index.ts deleted file mode 100644 index 2d82a97..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export {InputRule, inputRules, undoInputRule} from "./inputrules" -export {emDash, ellipsis, openDoubleQuote, closeDoubleQuote, openSingleQuote, closeSingleQuote, - smartQuotes} from "./rules" -export {wrappingInputRule, textblockTypeInputRule} from "./rulebuilders" diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/inputrules.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/inputrules.ts deleted file mode 100644 index 6a64b33..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/inputrules.ts +++ /dev/null @@ -1,167 +0,0 @@ -import {Plugin, Transaction, EditorState, TextSelection, Command} from "prosemirror-state" -import {EditorView} from "prosemirror-view" - -/// Input rules are regular expressions describing a piece of text -/// that, when typed, causes something to happen. This might be -/// changing two dashes into an emdash, wrapping a paragraph starting -/// with `"> "` into a blockquote, or something entirely different. -export class InputRule { - /// @internal - handler: (state: EditorState, match: RegExpMatchArray, start: number, end: number) => Transaction | null - - /// @internal - undoable: boolean - inCode: boolean | "only" - inCodeMark: boolean | "only" - - /// Create an input rule. The rule applies when the user typed - /// something and the text directly in front of the cursor matches - /// `match`, which should end with `$`. - /// - /// The `handler` can be a string, in which case the matched text, or - /// the first matched group in the regexp, is replaced by that - /// string. - /// - /// Or a it can be a function, which will be called with the match - /// array produced by - /// [`RegExp.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec), - /// as well as the start and end of the matched range, and which can - /// return a [transaction](#state.Transaction) that describes the - /// rule's effect, or null to indicate the input was not handled. - constructor( - /// @internal - readonly match: RegExp, - handler: string | ((state: EditorState, match: RegExpMatchArray, start: number, end: number) => Transaction | null), - options: { - /// When set to false, - /// [`undoInputRule`](#inputrules.undoInputRule) doesn't work on - /// this rule. - undoable?: boolean, - /// By default, input rules will not apply inside nodes marked - /// as [code](#model.NodeSpec.code). Set this to true to change - /// that, or to `"only"` to _only_ match in such nodes. - inCode?: boolean | "only" - /// When set to `false`, this rule will not fire inside marks - /// marked as [code](#model.MarkSpec.code). The default is - /// `true`. - inCodeMark?: boolean - } = {} - ) { - this.match = match - this.handler = typeof handler == "string" ? stringHandler(handler) : handler - this.undoable = options.undoable !== false - this.inCode = options.inCode || false - this.inCodeMark = options.inCodeMark !== false - } -} - -function stringHandler(string: string) { - return function(state: EditorState, match: RegExpMatchArray, start: number, end: number) { - let insert = string - if (match[1]) { - let offset = match[0].lastIndexOf(match[1]) - insert += match[0].slice(offset + match[1].length) - start += offset - let cutOff = start - end - if (cutOff > 0) { - insert = match[0].slice(offset - cutOff, offset) + insert - start = end - } - } - return state.tr.insertText(insert, start, end) - } -} - -const MAX_MATCH = 500 - -type PluginState = {transform: Transaction, from: number, to: number, text: string} | null - -/// Create an input rules plugin. When enabled, it will cause text -/// input that matches any of the given rules to trigger the rule's -/// action. -export function inputRules({rules}: {rules: readonly InputRule[]}) { - let plugin: Plugin = new Plugin({ - state: { - init() { return null }, - apply(this: typeof plugin, tr, prev) { - let stored = tr.getMeta(this) - if (stored) return stored - return tr.selectionSet || tr.docChanged ? null : prev - } - }, - - props: { - handleTextInput(view, from, to, text) { - return run(view, from, to, text, rules, plugin) - }, - handleDOMEvents: { - compositionend: (view) => { - setTimeout(() => { - let {$cursor} = view.state.selection as TextSelection - if ($cursor) run(view, $cursor.pos, $cursor.pos, "", rules, plugin) - }) - } - } - }, - - isInputRules: true - }) - return plugin -} - -function run(view: EditorView, from: number, to: number, text: string, rules: readonly InputRule[], plugin: Plugin) { - if (view.composing) return false - let state = view.state, $from = state.doc.resolve(from) - let textBefore = $from.parent.textBetween(Math.max(0, $from.parentOffset - MAX_MATCH), $from.parentOffset, - null, "\ufffc") + text - for (let i = 0; i < rules.length; i++) { - let rule = rules[i]; - if (!rule.inCodeMark && $from.marks().some(m => m.type.spec.code)) continue - if ($from.parent.type.spec.code) { - if (!rule.inCode) continue - } else if (rule.inCode === "only") { - continue - } - let match = rule.match.exec(textBefore) - if (!match || match[0].length < text.length) continue - let startPos = from - (match[0].length - text.length) - if (!rule.inCodeMark) { - let hasMark = false - state.doc.nodesBetween(startPos, $from.pos, node => { - if (node.isInline && node.marks.some(m => m.type.spec.code)) hasMark = true - }) - if (hasMark) continue - } - let tr = rule.handler(state, match, startPos, to) - if (!tr) continue - if (rule.undoable) tr.setMeta(plugin, {transform: tr, from, to, text}) - view.dispatch(tr) - return true - } - return false -} - -/// This is a command that will undo an input rule, if applying such a -/// rule was the last thing that the user did. -export const undoInputRule: Command = (state, dispatch) => { - let plugins = state.plugins - for (let i = 0; i < plugins.length; i++) { - let plugin = plugins[i], undoable - if ((plugin.spec as any).isInputRules && (undoable = plugin.getState(state))) { - if (dispatch) { - let tr = state.tr, toUndo = undoable.transform - for (let j = toUndo.steps.length - 1; j >= 0; j--) - tr.step(toUndo.steps[j].invert(toUndo.docs[j])) - if (undoable.text) { - let marks = tr.doc.resolve(undoable.from).marks() - tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks)) - } else { - tr.delete(undoable.from, undoable.to) - } - dispatch(tr) - } - return true - } - } - return false -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/rulebuilders.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/rulebuilders.ts deleted file mode 100644 index d17328c..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/rulebuilders.ts +++ /dev/null @@ -1,59 +0,0 @@ -import {InputRule} from "./inputrules" -import {findWrapping, canJoin} from "prosemirror-transform" -import {NodeType, Node, Attrs} from "prosemirror-model" - -/// Build an input rule for automatically wrapping a textblock when a -/// given string is typed. The `regexp` argument is -/// directly passed through to the `InputRule` constructor. You'll -/// probably want the regexp to start with `^`, so that the pattern can -/// only occur at the start of a textblock. -/// -/// `nodeType` is the type of node to wrap in. If it needs attributes, -/// you can either pass them directly, or pass a function that will -/// compute them from the regular expression match. -/// -/// By default, if there's a node with the same type above the newly -/// wrapped node, the rule will try to [join](#transform.Transform.join) those -/// two nodes. You can pass a join predicate, which takes a regular -/// expression match and the node before the wrapped node, and can -/// return a boolean to indicate whether a join should happen. -export function wrappingInputRule( - regexp: RegExp, - nodeType: NodeType, - getAttrs: Attrs | null | ((matches: RegExpMatchArray) => Attrs | null) = null, - joinPredicate?: (match: RegExpMatchArray, node: Node) => boolean -) { - return new InputRule(regexp, (state, match, start, end) => { - let attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs - let tr = state.tr.delete(start, end) - let $start = tr.doc.resolve(start), range = $start.blockRange(), wrapping = range && findWrapping(range, nodeType, attrs) - if (!wrapping) return null - tr.wrap(range!, wrapping) - let before = tr.doc.resolve(start - 1).nodeBefore - if (before && before.type == nodeType && canJoin(tr.doc, start - 1) && - (!joinPredicate || joinPredicate(match, before))) - tr.join(start - 1) - return tr - }) -} - -/// Build an input rule that changes the type of a textblock when the -/// matched text is typed into it. You'll usually want to start your -/// regexp with `^` to that it is only matched at the start of a -/// textblock. The optional `getAttrs` parameter can be used to compute -/// the new node's attributes, and works the same as in the -/// `wrappingInputRule` function. -export function textblockTypeInputRule( - regexp: RegExp, - nodeType: NodeType, - getAttrs: Attrs | null | ((match: RegExpMatchArray) => Attrs | null) = null -) { - return new InputRule(regexp, (state, match, start, end) => { - let $start = state.doc.resolve(start) - let attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs - if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), nodeType)) return null - return state.tr - .delete(start, end) - .setBlockType(start, start, nodeType, attrs) - }) -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/rules.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/rules.ts deleted file mode 100644 index ab81889..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-inputrules/src/rules.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {InputRule} from "./inputrules" - -/// Converts double dashes to an emdash. -export const emDash = new InputRule(/--$/, "—", {inCodeMark: false}) -/// Converts three dots to an ellipsis character. -export const ellipsis = new InputRule(/\.\.\.$/, "…", {inCodeMark: false}) -/// “Smart” opening double quotes. -export const openDoubleQuote = new InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/, "“", {inCodeMark: false}) -/// “Smart” closing double quotes. -export const closeDoubleQuote = new InputRule(/"$/, "”", {inCodeMark: false}) -/// “Smart” opening single quotes. -export const openSingleQuote = new InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/, "‘", {inCodeMark: false}) -/// “Smart” closing single quotes. -export const closeSingleQuote = new InputRule(/'$/, "’", {inCodeMark: false}) - -/// Smart-quote related input rules. -export const smartQuotes: readonly InputRule[] = [openDoubleQuote, closeDoubleQuote, openSingleQuote, closeSingleQuote] diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-state b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-state deleted file mode 120000 index f732de9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-state +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-state@1.4.4/node_modules/prosemirror-state \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-transform b/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-transform deleted file mode 120000 index d9fd2cc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-inputrules@1.5.1/node_modules/prosemirror-transform +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-transform@1.12.0/node_modules/prosemirror-transform \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/.tern-project b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/.tern-project deleted file mode 100644 index dde3976..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/.tern-project +++ /dev/null @@ -1,8 +0,0 @@ -{ - "libs": ["browser"], - "plugins": { - "node": {}, - "complete_strings": {}, - "es_modules": {} - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/CHANGELOG.md deleted file mode 100644 index 8dacfea..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/CHANGELOG.md +++ /dev/null @@ -1,104 +0,0 @@ -## 1.2.3 (2025-05-04) - -### Bug fixes - -Fix an issue where the library was too eager to dispatch keys by key code when the character produced isn't ASCII. - -## 1.2.2 (2023-05-17) - -### Bug fixes - -Include CommonJS type declarations in the package to please new TypeScript resolution settings. - -## 1.2.1 (2023-02-14) - -### Bug fixes - -Work around macOS putting the unmodified character in `KeyboardEvent.key` when Cmd is held down, fixing shift-cmd-letter bindings. - -## 1.2.0 (2022-05-30) - -### New features - -Include TypeScript type declarations. - -## 1.1.5 (2021-10-29) - -### Bug fixes - -Fix issue where iPhones and iPads with a hardware keyboard didn't have Mod converted to Cmd. - -## 1.1.4 (2020-05-18) - -### Bug fixes - -Fall through to the name associated with a key's `keyCode` when the character produced isn't ASCII and isn't directly bound. - -## 1.1.3 (2019-11-20) - -### Bug fixes - -Rename ES module files to use a .js extension, since Webpack gets confused by .mjs - -## 1.1.2 (2019-11-19) - -### Bug fixes - -The file referred to in the package's `module` field now is compiled down to ES5. - -## 1.1.1 (2019-11-15) - -### Bug fixes - -Fix an issue where keyboards layouts that use shift to produce characters that are created without shift on a US keyboard would fail to fire bindings for those keys that include the Shift- modifier. - -## 1.1.0 (2019-11-08) - -### New features - -Add a `module` field to package json file. - -## 1.0.2 (2019-10-16) - -### Bug fixes - -Upgrade w3c-keyname package dependency. - -## 1.0.1 (2018-02-23) - -### Bug fixes - -Upgrade `w3c-keyname` dependency to version 1.1.8 to prevent users getting stuck with a buggy version. - -## 0.22.1 (2017-07-14) - -### Bug fixes - -Bindings like Alt-3 should now fire even if your keyboard produces a special character for that combination. - -## 0.18.0 (2017-02-24) - -### New features - -Add a [`keydownHandler`](https://prosemirror.net/docs/ref/version/0.18.0.html#keymap.keydownHandler) function, which takes a keymap and produces a [`handleKeydown` prop](https://prosemirror.net/docs/ref/version/0.18.0.html#view.EditorProps.handleKeydown)-style function. - -## 0.12.0 (2016-10-21) - -### Breaking changes - -Key names are now based on -[`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) -instead of -[`.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code). -This means that, for character-producing keys, you'll want to use the -character typed, not the key name. So `Ctrl-Z` now means uppercase Z, -and you'll usually want `Ctrl-z` instead. Single-quoted key names are -no longer supported. - -## 0.11.0 (2016-09-21) - -### Breaking changes - -New module, takes the same role as the old built-in keymap support in -the `ProseMirror` class. - diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/CONTRIBUTING.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/CONTRIBUTING.md deleted file mode 100644 index f2a345d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/CONTRIBUTING.md +++ /dev/null @@ -1,104 +0,0 @@ -# How to contribute - -- [Getting help](#getting-help) -- [Submitting bug reports](#submitting-bug-reports) -- [Contributing code](#contributing-code) - -## Getting help - -Community discussion, questions, and informal bug reporting is done on the -[discuss.ProseMirror forum](http://discuss.prosemirror.net). - -## Submitting bug reports - -Report bugs on the -[GitHub issue tracker](http://github.com/prosemirror/prosemirror/issues). -Before reporting a bug, please read these pointers. - -- The issue tracker is for *bugs*, not requests for help. Questions - should be asked on the [forum](http://discuss.prosemirror.net). - -- Include information about the version of the code that exhibits the - problem. For browser-related issues, include the browser and browser - version on which the problem occurred. - -- Mention very precisely what went wrong. "X is broken" is not a good - bug report. What did you expect to happen? What happened instead? - Describe the exact steps a maintainer has to take to make the - problem occur. A screencast can be useful, but is no substitute for - a textual description. - -- A great way to make it easy to reproduce your problem, if it can not - be trivially reproduced on the website demos, is to submit a script - that triggers the issue. - -## Contributing code - -If you want to make a change that involves a significant overhaul of -the code or introduces a user-visible new feature, create an -[RFC](https://github.com/ProseMirror/rfcs/) first with your proposal. - -- Make sure you have a [GitHub Account](https://github.com/signup/free) - -- Fork the relevant repository - ([how to fork a repo](https://help.github.com/articles/fork-a-repo)) - -- Create a local checkout of the code. You can use the - [main repository](https://github.com/prosemirror/prosemirror) to - easily check out all core modules. - -- Make your changes, and commit them - -- Follow the code style of the rest of the project (see below). Run - `npm run lint` (in the main repository checkout) to make sure that - the linter is happy. - -- If your changes are easy to test or likely to regress, add tests in - the relevant `test/` directory. Either put them in an existing - `test-*.js` file, if they fit there, or add a new file. - -- Make sure all tests pass. Run `npm run test` to verify tests pass - (you will need Node.js v6+). - -- Submit a pull request ([how to create a pull request](https://help.github.com/articles/fork-a-repo)). - Don't put more than one feature/fix in a single pull request. - -By contributing code to ProseMirror you - - - Agree to license the contributed code under the project's [MIT - license](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE). - - - Confirm that you have the right to contribute and license the code - in question. (Either you hold all rights on the code, or the rights - holder has explicitly granted the right to use it like this, - through a compatible open source license or through a direct - agreement with you.) - -### Coding standards - -- ES6 syntax, targeting an ES5 runtime (i.e. don't use library - elements added by ES6, don't use ES7/ES.next syntax). - -- 2 spaces per indentation level, no tabs. - -- No semicolons except when necessary. - -- Follow the surrounding code when it comes to spacing, brace - placement, etc. - -- Brace-less single-statement bodies are encouraged (whenever they - don't impact readability). - -- [getdocs](https://github.com/marijnh/getdocs)-style doc comments - above items that are part of the public API. - -- When documenting non-public items, you can put the type after a - single colon, so that getdocs doesn't pick it up and add it to the - API reference. - -- The linter (`npm run lint`) complains about unused variables and - functions. Prefix their names with an underscore to muffle it. - -- ProseMirror does *not* follow JSHint or JSLint prescribed style. - Patches that try to 'fix' code to pass one of these linters will not - be accepted. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/LICENSE b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/LICENSE deleted file mode 100644 index 7e2295b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2015-2017 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/README.md deleted file mode 100644 index 871dca5..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# prosemirror-keymap - -[ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-keymap/blob/master/CHANGELOG.md) ] - -This is a [core module](https://prosemirror.net/docs/ref/#keymap) of [ProseMirror](https://prosemirror.net). -ProseMirror is a well-behaved rich semantic content editor based on -contentEditable, with support for collaborative editing and custom -document schemas. - -This [module](https://prosemirror.net/docs/ref/#keymap) implements a -plugin for conveniently defining key bindings. - -The [project page](https://prosemirror.net) has more information, a -number of [examples](https://prosemirror.net/examples/) and the -[documentation](https://prosemirror.net/docs/). - -This code is released under an -[MIT license](https://github.com/prosemirror/prosemirror/tree/master/LICENSE). -There's a [forum](http://discuss.prosemirror.net) for general -discussion and support requests, and the -[Github bug tracker](https://github.com/prosemirror/prosemirror/issues) -is the place to report issues. - -We aim to be an inclusive, welcoming community. To make that explicit, -we have a [code of -conduct](http://contributor-covenant.org/version/1/1/0/) that applies -to communication around the project. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.cjs deleted file mode 100644 index 480d5fb..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.cjs +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -var w3cKeyname = require('w3c-keyname'); -var prosemirrorState = require('prosemirror-state'); -var mac = typeof navigator != "undefined" && /Mac|iP(hone|[oa]d)/.test(navigator.platform); -var windows = typeof navigator != "undefined" && /Win/.test(navigator.platform); -function normalizeKeyName(name) { - var parts = name.split(/-(?!$)/), - result = parts[parts.length - 1]; - if (result == "Space") result = " "; - var alt, ctrl, shift, meta; - for (var i = 0; i < parts.length - 1; i++) { - var mod = parts[i]; - if (/^(cmd|meta|m)$/i.test(mod)) meta = true;else if (/^a(lt)?$/i.test(mod)) alt = true;else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true;else if (/^s(hift)?$/i.test(mod)) shift = true;else if (/^mod$/i.test(mod)) { - if (mac) meta = true;else ctrl = true; - } else throw new Error("Unrecognized modifier name: " + mod); - } - if (alt) result = "Alt-" + result; - if (ctrl) result = "Ctrl-" + result; - if (meta) result = "Meta-" + result; - if (shift) result = "Shift-" + result; - return result; -} -function normalize(map) { - var copy = Object.create(null); - for (var prop in map) copy[normalizeKeyName(prop)] = map[prop]; - return copy; -} -function modifiers(name, event) { - var shift = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - if (event.altKey) name = "Alt-" + name; - if (event.ctrlKey) name = "Ctrl-" + name; - if (event.metaKey) name = "Meta-" + name; - if (shift && event.shiftKey) name = "Shift-" + name; - return name; -} -function keymap(bindings) { - return new prosemirrorState.Plugin({ - props: { - handleKeyDown: keydownHandler(bindings) - } - }); -} -function keydownHandler(bindings) { - var map = normalize(bindings); - return function (view, event) { - var name = w3cKeyname.keyName(event), - baseName, - direct = map[modifiers(name, event)]; - if (direct && direct(view.state, view.dispatch, view)) return true; - if (name.length == 1 && name != " ") { - if (event.shiftKey) { - var noShift = map[modifiers(name, event, false)]; - if (noShift && noShift(view.state, view.dispatch, view)) return true; - } - if ((event.altKey || event.metaKey || event.ctrlKey) && !(windows && event.ctrlKey && event.altKey) && (baseName = w3cKeyname.base[event.keyCode]) && baseName != name) { - var fromCode = map[modifiers(baseName, event)]; - if (fromCode && fromCode(view.state, view.dispatch, view)) return true; - } - } - return false; - }; -} -exports.keydownHandler = keydownHandler; -exports.keymap = keymap; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.d.cts deleted file mode 100644 index b814785..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.d.cts +++ /dev/null @@ -1,47 +0,0 @@ -import { Command, Plugin } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; - -/** -Create a keymap plugin for the given set of bindings. - -Bindings should map key names to [command](https://prosemirror.net/docs/ref/#commands)-style -functions, which will be called with `(EditorState, dispatch, -EditorView)` arguments, and should return true when they've handled -the key. Note that the view argument isn't part of the command -protocol, but can be used as an escape hatch if a binding needs to -directly interact with the UI. - -Key names may be strings like `"Shift-Ctrl-Enter"`—a key -identifier prefixed with zero or more modifiers. Key identifiers -are based on the strings that can appear in -[`KeyEvent.key`](https:developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key). -Use lowercase letters to refer to letter keys (or uppercase letters -if you want shift to be held). You may use `"Space"` as an alias -for the `" "` name. - -Modifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or -`a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or -`Meta-`) are recognized. For characters that are created by holding -shift, the `Shift-` prefix is implied, and should not be added -explicitly. - -You can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on -other platforms. - -You can add multiple keymap plugins to an editor. The order in -which they appear determines their precedence (the ones early in -the array get to dispatch first). -*/ -declare function keymap(bindings: { - [key: string]: Command; -}): Plugin; -/** -Given a set of bindings (using the same format as -[`keymap`](https://prosemirror.net/docs/ref/#keymap.keymap)), return a [keydown -handler](https://prosemirror.net/docs/ref/#view.EditorProps.handleKeyDown) that handles them. -*/ -declare function keydownHandler(bindings: { - [key: string]: Command; -}): (view: EditorView, event: KeyboardEvent) => boolean; - -export { keydownHandler, keymap }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.d.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.d.ts deleted file mode 100644 index b814785..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Command, Plugin } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; - -/** -Create a keymap plugin for the given set of bindings. - -Bindings should map key names to [command](https://prosemirror.net/docs/ref/#commands)-style -functions, which will be called with `(EditorState, dispatch, -EditorView)` arguments, and should return true when they've handled -the key. Note that the view argument isn't part of the command -protocol, but can be used as an escape hatch if a binding needs to -directly interact with the UI. - -Key names may be strings like `"Shift-Ctrl-Enter"`—a key -identifier prefixed with zero or more modifiers. Key identifiers -are based on the strings that can appear in -[`KeyEvent.key`](https:developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key). -Use lowercase letters to refer to letter keys (or uppercase letters -if you want shift to be held). You may use `"Space"` as an alias -for the `" "` name. - -Modifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or -`a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or -`Meta-`) are recognized. For characters that are created by holding -shift, the `Shift-` prefix is implied, and should not be added -explicitly. - -You can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on -other platforms. - -You can add multiple keymap plugins to an editor. The order in -which they appear determines their precedence (the ones early in -the array get to dispatch first). -*/ -declare function keymap(bindings: { - [key: string]: Command; -}): Plugin; -/** -Given a set of bindings (using the same format as -[`keymap`](https://prosemirror.net/docs/ref/#keymap.keymap)), return a [keydown -handler](https://prosemirror.net/docs/ref/#view.EditorProps.handleKeyDown) that handles them. -*/ -declare function keydownHandler(bindings: { - [key: string]: Command; -}): (view: EditorView, event: KeyboardEvent) => boolean; - -export { keydownHandler, keymap }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.js b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.js deleted file mode 100644 index 0d4a505..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.js +++ /dev/null @@ -1,128 +0,0 @@ -import { keyName, base } from 'w3c-keyname'; -import { Plugin } from 'prosemirror-state'; - -const mac = typeof navigator != "undefined" && /Mac|iP(hone|[oa]d)/.test(navigator.platform); -const windows = typeof navigator != "undefined" && /Win/.test(navigator.platform); -function normalizeKeyName(name) { - let parts = name.split(/-(?!$)/), result = parts[parts.length - 1]; - if (result == "Space") - result = " "; - let alt, ctrl, shift, meta; - for (let i = 0; i < parts.length - 1; i++) { - let mod = parts[i]; - if (/^(cmd|meta|m)$/i.test(mod)) - meta = true; - else if (/^a(lt)?$/i.test(mod)) - alt = true; - else if (/^(c|ctrl|control)$/i.test(mod)) - ctrl = true; - else if (/^s(hift)?$/i.test(mod)) - shift = true; - else if (/^mod$/i.test(mod)) { - if (mac) - meta = true; - else - ctrl = true; - } - else - throw new Error("Unrecognized modifier name: " + mod); - } - if (alt) - result = "Alt-" + result; - if (ctrl) - result = "Ctrl-" + result; - if (meta) - result = "Meta-" + result; - if (shift) - result = "Shift-" + result; - return result; -} -function normalize(map) { - let copy = Object.create(null); - for (let prop in map) - copy[normalizeKeyName(prop)] = map[prop]; - return copy; -} -function modifiers(name, event, shift = true) { - if (event.altKey) - name = "Alt-" + name; - if (event.ctrlKey) - name = "Ctrl-" + name; - if (event.metaKey) - name = "Meta-" + name; - if (shift && event.shiftKey) - name = "Shift-" + name; - return name; -} -/** -Create a keymap plugin for the given set of bindings. - -Bindings should map key names to [command](https://prosemirror.net/docs/ref/#commands)-style -functions, which will be called with `(EditorState, dispatch, -EditorView)` arguments, and should return true when they've handled -the key. Note that the view argument isn't part of the command -protocol, but can be used as an escape hatch if a binding needs to -directly interact with the UI. - -Key names may be strings like `"Shift-Ctrl-Enter"`—a key -identifier prefixed with zero or more modifiers. Key identifiers -are based on the strings that can appear in -[`KeyEvent.key`](https:developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key). -Use lowercase letters to refer to letter keys (or uppercase letters -if you want shift to be held). You may use `"Space"` as an alias -for the `" "` name. - -Modifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or -`a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or -`Meta-`) are recognized. For characters that are created by holding -shift, the `Shift-` prefix is implied, and should not be added -explicitly. - -You can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on -other platforms. - -You can add multiple keymap plugins to an editor. The order in -which they appear determines their precedence (the ones early in -the array get to dispatch first). -*/ -function keymap(bindings) { - return new Plugin({ props: { handleKeyDown: keydownHandler(bindings) } }); -} -/** -Given a set of bindings (using the same format as -[`keymap`](https://prosemirror.net/docs/ref/#keymap.keymap)), return a [keydown -handler](https://prosemirror.net/docs/ref/#view.EditorProps.handleKeyDown) that handles them. -*/ -function keydownHandler(bindings) { - let map = normalize(bindings); - return function (view, event) { - let name = keyName(event), baseName, direct = map[modifiers(name, event)]; - if (direct && direct(view.state, view.dispatch, view)) - return true; - // A character key - if (name.length == 1 && name != " ") { - if (event.shiftKey) { - // In case the name was already modified by shift, try looking - // it up without its shift modifier - let noShift = map[modifiers(name, event, false)]; - if (noShift && noShift(view.state, view.dispatch, view)) - return true; - } - if ((event.altKey || event.metaKey || event.ctrlKey) && - // Ctrl-Alt may be used for AltGr on Windows - !(windows && event.ctrlKey && event.altKey) && - (baseName = base[event.keyCode]) && baseName != name) { - // Try falling back to the keyCode when there's a modifier - // active or the character produced isn't ASCII, and our table - // produces a different name from the the keyCode. See #668, - // #1060, #1529. - let fromCode = map[modifiers(baseName, event)]; - if (fromCode && fromCode(view.state, view.dispatch, view)) - return true; - } - } - return false; - }; -} - -export { keydownHandler, keymap }; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/package.json b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/package.json deleted file mode 100644 index 1f2a7cf..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "prosemirror-keymap", - "version": "1.2.3", - "description": "Keymap plugin for ProseMirror", - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "sideEffects": false, - "license": "MIT", - "maintainers": [ - { - "name": "Marijn Haverbeke", - "email": "marijn@haverbeke.berlin", - "web": "http://marijnhaverbeke.nl" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/prosemirror/prosemirror-keymap.git" - }, - "dependencies": { - "w3c-keyname": "^2.2.0", - "prosemirror-state": "^1.0.0" - }, - "devDependencies": { - "@prosemirror/buildhelper": "^0.1.5", - "prosemirror-test-builder": "^1.0.0" - }, - "scripts": { - "test": "pm-runtests", - "prepare": "pm-buildhelper src/keymap.ts" - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/src/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/src/README.md deleted file mode 100644 index c34242d..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/src/README.md +++ /dev/null @@ -1,5 +0,0 @@ -A plugin for conveniently defining key bindings. - -@keymap - -@keydownHandler diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/src/keymap.ts b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/src/keymap.ts deleted file mode 100644 index d0f2970..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/src/keymap.ts +++ /dev/null @@ -1,105 +0,0 @@ -import {base, keyName} from "w3c-keyname" -import {Plugin, Command} from "prosemirror-state" -import {EditorView} from "prosemirror-view" - -const mac = typeof navigator != "undefined" && /Mac|iP(hone|[oa]d)/.test(navigator.platform) -const windows = typeof navigator != "undefined" && /Win/.test(navigator.platform) - -function normalizeKeyName(name: string) { - let parts = name.split(/-(?!$)/), result = parts[parts.length - 1] - if (result == "Space") result = " " - let alt, ctrl, shift, meta - for (let i = 0; i < parts.length - 1; i++) { - let mod = parts[i] - if (/^(cmd|meta|m)$/i.test(mod)) meta = true - else if (/^a(lt)?$/i.test(mod)) alt = true - else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true - else if (/^s(hift)?$/i.test(mod)) shift = true - else if (/^mod$/i.test(mod)) { if (mac) meta = true; else ctrl = true } - else throw new Error("Unrecognized modifier name: " + mod) - } - if (alt) result = "Alt-" + result - if (ctrl) result = "Ctrl-" + result - if (meta) result = "Meta-" + result - if (shift) result = "Shift-" + result - return result -} - -function normalize(map: {[key: string]: Command}) { - let copy: {[key: string]: Command} = Object.create(null) - for (let prop in map) copy[normalizeKeyName(prop)] = map[prop] - return copy -} - -function modifiers(name: string, event: KeyboardEvent, shift = true) { - if (event.altKey) name = "Alt-" + name - if (event.ctrlKey) name = "Ctrl-" + name - if (event.metaKey) name = "Meta-" + name - if (shift && event.shiftKey) name = "Shift-" + name - return name -} - -/// Create a keymap plugin for the given set of bindings. -/// -/// Bindings should map key names to [command](#commands)-style -/// functions, which will be called with `(EditorState, dispatch, -/// EditorView)` arguments, and should return true when they've handled -/// the key. Note that the view argument isn't part of the command -/// protocol, but can be used as an escape hatch if a binding needs to -/// directly interact with the UI. -/// -/// Key names may be strings like `"Shift-Ctrl-Enter"`—a key -/// identifier prefixed with zero or more modifiers. Key identifiers -/// are based on the strings that can appear in -/// [`KeyEvent.key`](https:///developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key). -/// Use lowercase letters to refer to letter keys (or uppercase letters -/// if you want shift to be held). You may use `"Space"` as an alias -/// for the `" "` name. -/// -/// Modifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or -/// `a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or -/// `Meta-`) are recognized. For characters that are created by holding -/// shift, the `Shift-` prefix is implied, and should not be added -/// explicitly. -/// -/// You can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on -/// other platforms. -/// -/// You can add multiple keymap plugins to an editor. The order in -/// which they appear determines their precedence (the ones early in -/// the array get to dispatch first). -export function keymap(bindings: {[key: string]: Command}): Plugin { - return new Plugin({props: {handleKeyDown: keydownHandler(bindings)}}) -} - -/// Given a set of bindings (using the same format as -/// [`keymap`](#keymap.keymap)), return a [keydown -/// handler](#view.EditorProps.handleKeyDown) that handles them. -export function keydownHandler(bindings: {[key: string]: Command}): (view: EditorView, event: KeyboardEvent) => boolean { - let map = normalize(bindings) - return function(view, event) { - let name = keyName(event), baseName, direct = map[modifiers(name, event)] - if (direct && direct(view.state, view.dispatch, view)) return true - // A character key - if (name.length == 1 && name != " ") { - if (event.shiftKey) { - // In case the name was already modified by shift, try looking - // it up without its shift modifier - let noShift = map[modifiers(name, event, false)] - if (noShift && noShift(view.state, view.dispatch, view)) return true - } - if ((event.altKey || event.metaKey || event.ctrlKey) && - // Ctrl-Alt may be used for AltGr on Windows - !(windows && event.ctrlKey && event.altKey) && - (baseName = base[event.keyCode]) && baseName != name) { - // Try falling back to the keyCode when there's a modifier - // active or the character produced isn't ASCII, and our table - // produces a different name from the the keyCode. See #668, - // #1060, #1529. - let fromCode = map[modifiers(baseName, event)] - if (fromCode && fromCode(view.state, view.dispatch, view)) return true - } - } - return false - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-state b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-state deleted file mode 120000 index f732de9..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-state +++ /dev/null @@ -1 +0,0 @@ -../../prosemirror-state@1.4.4/node_modules/prosemirror-state \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/w3c-keyname b/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/w3c-keyname deleted file mode 120000 index 82e6da7..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/w3c-keyname +++ /dev/null @@ -1 +0,0 @@ -../../w3c-keyname@2.2.8/node_modules/w3c-keyname \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/orderedmap b/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/orderedmap deleted file mode 120000 index 0409f84..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/orderedmap +++ /dev/null @@ -1 +0,0 @@ -../../orderedmap@2.1.1/node_modules/orderedmap \ No newline at end of file diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/.tern-project b/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/.tern-project deleted file mode 100644 index dde3976..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/.tern-project +++ /dev/null @@ -1,8 +0,0 @@ -{ - "libs": ["browser"], - "plugins": { - "node": {}, - "complete_strings": {}, - "es_modules": {} - } -} diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/CHANGELOG.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/CHANGELOG.md deleted file mode 100644 index 5eaa7f3..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/CHANGELOG.md +++ /dev/null @@ -1,750 +0,0 @@ -## 1.25.7 (2026-05-18) - -### Bug fixes - -Fix a regression (since 1.25.5) in the way `DOMOutputSpec`s are interpreted. - -## 1.25.6 (2026-05-15) - -### Bug fixes - -Remove an accidentally commited `console.log`. - -## 1.25.5 (2026-05-14) - -### Bug fixes - -Properly reflect the fact that nodes must not serialize to just text nodes in the `DOMOutputSpec` type. - -Don't check content constraints in `Slice.insertAt` when inserting into an open node. - -## 1.25.4 (2025-10-21) - -### Bug fixes - -The DOM parser will now, if a line break replacement is defined in the schema, try to use that instead of spaces to replace newlines when preserving whitespace. - -## 1.25.3 (2025-08-06) - -### Bug fixes - -Fix a bug in `Slice` that made it possible for invalid `ReplaceAroundStep`s to be applied in some situations. - -## 1.25.2 (2025-07-11) - -### Bug fixes - -Suppress lint warnings about dereferencing methods by making `Schema.nodeFromJSON` and `markFromJSON` properties instead of methods. - -Avoid using `setAttribute("style", ...)` to stay clear of content security policies. - -## 1.25.1 (2025-04-22) - -### Bug fixes - -Make the DOM parser not discard nodes whose document representation cannot be placed inside the represenation of some parent DOM node. - -## 1.25.0 (2025-03-18) - -### New features - -Mark specs can now be marked with a `code` property. - -## 1.24.1 (2024-12-10) - -### Bug fixes - -The parser now automatically preserves whitespace inside `
` or `white-space: pre` elements.
-
-## 1.24.0 (2024-11-27)
-
-### New features
-
-`Fragment.content` and `Node.children` now expose a node's set of children as an array.
-
-## 1.23.0 (2024-10-05)
-
-### New features
-
-The new `NodeType.isInGroup` method can be used to query group membership.
-
-## 1.22.3 (2024-08-06)
-
-### Bug fixes
-
-Fix some corner cases in the way the DOM parser tracks active marks.
-
-## 1.22.2 (2024-07-18)
-
-### Bug fixes
-
-Make attribute validation messages more informative.
-
-## 1.22.1 (2024-07-14)
-
-### Bug fixes
-
-Add code to `DOMSerializer` that rejects DOM output specs when they originate from attribute values, to protect against XSS attacks that use corrupt attribute input.
-
-## 1.22.0 (2024-07-14)
-
-### New features
-
-Attribute specs now support a `validate` property that can be used to provide a validation function for the attribute, to guard against corrupt JSON input.
-
-## 1.21.3 (2024-06-26)
-
-### Bug fixes
-
-Fix an issue where parse rules for CSS properties that were shorthands for a number of more detailed properties weren't matching properly.
-
-## 1.21.2 (2024-06-25)
-
-### Bug fixes
-
-Make sure resolved positions (and thus the document and schema hanging off them) don't get kept in the cache when their document can be garbage-collected.
-
-## 1.21.1 (2024-06-03)
-
-### Bug fixes
-
-Improve performance and accuracy of `DOMParser` style matching by using the DOM's own `style` object.
-
-## 1.21.0 (2024-05-06)
-
-### New features
-
-The new `linebreakReplacement` property on node specs makes it possible to configure a node type that `setBlockType` will convert to and from line breaks when appropriate.
-
-## 1.20.0 (2024-04-08)
-
-### New features
-
-The `ParseRule` type is now a union of `TagParseRule` and `StyleParseRule`, with more specific types being used when appropriate.
-
-## 1.19.4 (2023-12-11)
-
-### Bug fixes
-
-Make `textBetween` emit block separators for empty textblocks.
-
-## 1.19.3 (2023-07-13)
-
-### Bug fixes
-
-Don't apply style parse rules for nodes that are skipped by other parse rules.
-
-## 1.19.2 (2023-05-23)
-
-### Bug fixes
-
-Allow parse rules with a `clearMark` directive to clear marks that have already been applied.
-
-## 1.19.1 (2023-05-17)
-
-### Bug fixes
-
-Fix the types of `Fragment.desendants` to include the index parameter to the callback. Add release note
-
-Include CommonJS type declarations in the package to please new TypeScript resolution settings.
-
-## 1.19.0 (2023-01-18)
-
-### New features
-
-Parse rules for styles can now provide a `clearMark` property to remove pending marks (for example for `font-style: normal`).
-
-## 1.18.3 (2022-11-18)
-
-### Bug fixes
-
-Copy all properties from the input spec to `Schema.spec`.
-
-## 1.18.2 (2022-11-14)
-
-### Bug fixes
-
-Improve DOM parsing of nested block elements mixing block and inline children.
-
-## 1.18.1 (2022-06-15)
-
-### Bug fixes
-
-Upgrade to orderedmap 2.0.0 to avoid around a TypeScript compilation issue.
-
-## 1.18.0 (2022-06-07)
-
-### New features
-
-Node specs for leaf nodes now support a property `leafText` which, when given, will be used by `textContent` and `textBetween` to serialize the node.
-
-Add optional type parameters to `Schema` for the node and mark names. Clarify Schema type parameters
-
-## 1.17.0 (2022-05-30)
-
-### Bug fixes
-
-Fix a crash in DOM parsing.
-
-### New features
-
-Include TypeScript type declarations.
-
-## 1.16.1 (2021-12-29)
-
-### Bug fixes
-
-Fix a bug in the way whitespace-preservation options were handled in `DOMParser`.
-
-## 1.16.0 (2021-12-27)
-
-### New features
-
-A new `NodeSpec` property, `whitespace`, allows more control over the way whitespace in the content of the node is parsed.
-
-## 1.15.0 (2021-10-25)
-
-### New features
-
-`textBetween` now allows its leaf text argument to be a function.
-
-## 1.14.3 (2021-07-22)
-
-### Bug fixes
-
-`DOMSerializer.serializeNode` will no longer ignore the node's marks.
-
-## 1.14.2 (2021-06-16)
-
-### Bug fixes
-
-Be less agressive about dropping whitespace when the context isn't know in `DOMParser.parseSlice`.
-
-## 1.14.1 (2021-04-26)
-
-### Bug fixes
-
-DOM parsing with `preserveWhitespace: "full"` will no longer ignore whitespace-only nodes.
-
-## 1.14.0 (2021-04-06)
-
-### Bug fixes
-
-`Node.check` will now error if a node has an invalid combination of marks.
-
-Don't leave carriage return characters in parsed DOM content, since they confuse Chrome's cursor motion.
-
-### New features
-
-`Fragment.textBetween` is now public.
-
-## 1.13.3 (2021-02-04)
-
-### Bug fixes
-
-Fix an issue where nested tags that match mark parser rules could cause the parser to apply marks in invalid places.
-
-## 1.13.2 (2021-02-04)
-
-### Bug fixes
-
-`MarkType.removeFromSet` now removes all instances of the mark, not just the first one.
-
-## 1.13.1 (2020-12-20)
-
-### Bug fixes
-
-Fix a bug where nested marks of the same type would be applied to the wrong node when parsing from DOM.
-
-## 1.13.0 (2020-12-11)
-
-### New features
-
-Parse rules can now have a `consuming: false` property which allows other rules to match their tag or style even when they apply.
-
-## 1.12.0 (2020-10-11)
-
-### New features
-
-The output of `toDOM` functions can now be a `{dom, contentDOM}` object specifying the precise parent and content DOM elements.
-
-## 1.11.2 (2020-09-12)
-
-### Bug fixes
-
-Fix issue where 1.11.1 uses an array method not available on Internet Explorer.
-
-## 1.11.1 (2020-09-11)
-
-### Bug fixes
-
-Fix an issue where an inner node's mark information could reset the same mark provided by an outer node in the DOM parser.
-
-## 1.11.0 (2020-07-08)
-
-### New features
-
-Resolved positions have a new convenience method, `posAtIndex`, which can resolve a depth and index to a position.
-
-## 1.10.1 (2020-07-08)
-
-### Bug fixes
-
-Fix a bug that prevented non-canonical list structure from being normalized.
-
-## 1.10.0 (2020-05-25)
-
-### Bug fixes
-
-Avoid fixing directly nested list nodes during DOM parsing when it looks like the schema allows those.
-
-### New features
-
-DOM parser rules can now specify `closeParent: true` to have the effect of closing their parent node when matched.
-
-## 1.9.1 (2020-01-17)
-
-### Bug fixes
-
-Marks found in the DOM at the wrong level (for example, a bold style on a block node) are now properly moved to the node content.
-
-## 1.9.0 (2020-01-07)
-
-### New features
-
-The `NodeType` method [`hasRequiredAttrs`](https://prosemirror.net/docs/ref/#model.NodeType.hasRequiredAttrs) is now public.
-
-Element and attribute names in [`DOMOutputSpec`](https://prosemirror.net/docs/ref/#model.DOMOutputSpec) structures can now contain namespaces.
-
-## 1.8.2 (2019-11-20)
-
-### Bug fixes
-
-Rename ES module files to use a .js extension, since Webpack gets confused by .mjs
-
-## 1.8.1 (2019-11-19)
-
-### Bug fixes
-
-The file referred to in the package's `module` field now is compiled down to ES5.
-
-## 1.8.0 (2019-11-08)
-
-### New features
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-Add a `module` field to package json file.
-
-## 1.7.5 (2019-11-07)
-
-### Bug fixes
-
-`ContentMatch.edge` now throws, as it is supposed to, when you try to access the edge past the last one.
-
-## 1.7.4 (2019-10-10)
-
-### Bug fixes
-
-Fix an issue where `fillBefore` would in some cases insert unneccesary optional child nodes in the generated content.
-
-## 1.7.3 (2019-10-03)
-
-### Bug fixes
-
-Fix an issue where _any_ whitespace (not just the characters that HTML collapses) was collapsed by the parser in non-whitespace-preserving mode.
-
-## 1.7.2 (2019-09-04)
-
-### Bug fixes
-
-When `
` DOM nodes can't be parsed normally, the parser now converts them to newlines. This should improve parsing of some forms of source code HTML. - -## 1.7.1 (2019-05-31) - -### Bug fixes - -Using `Fragment.from` on an invalid value, including a `Fragment` instance from a different version/instance of the library, now raises a meaningful error rather than getting confused. - -Fix a bug in parsing overlapping marks of the same non-self-exclusive type. - -## 1.7.0 (2019-01-29) - -### New features - -Mark specs now support a property [`spanning`](https://prosemirror.net/docs/ref/#model.MarkSpec.spanning) which, when set to `false`, prevents the mark's DOM markup from spanning multiple nodes, so that a separate wrapper is created for each adjacent marked node. - -## 1.6.4 (2019-01-05) - -### Bug fixes - -Don't output empty style attributes when a style property with a null value is present in `renderSpec`. - -## 1.6.3 (2018-10-26) - -### Bug fixes - -The DOM parser now drops whitespace after BR nodes when not in whitespace-preserving mode. - -## 1.6.2 (2018-10-01) - -### Bug fixes - -Prevent [`ContentMatch.findWrapping`](https://prosemirror.net/docs/ref/#model.ContentMatch.findWrapping) from returning node types with required attributes. - -## 1.6.1 (2018-07-24) - -### Bug fixes - -Fix a bug where marks were sometimes parsed incorrectly. - -## 1.6.0 (2018-07-20) - -### Bug fixes - -Fix issue where marks would be applied to the wrong node when parsing a slice from DOM. - -### New features - -Adds a new node spec property, [`toDebugString`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDebugString), making it possible to customize your nodes' `toString` behavior. - -## 1.5.0 (2018-05-31) - -### New features - -[`ParseRule.getContent`](https://prosemirror.net/docs/ref/#model.ParseRule.getContent) is now passed the parser schema as second argument. - -## 1.4.4 (2018-05-03) - -### Bug fixes - -Fix a regression where `DOMParser.parse` would fail to apply mark nodes directly at the start of the input. - -## 1.4.3 (2018-04-27) - -### Bug fixes - -[`DOMParser.parseSlice`](https://prosemirror.net/docs/ref/#model.DOMParser.parseSlice) can now correctly parses marks at the top level again. - -## 1.4.2 (2018-04-15) - -### Bug fixes - -Remove a `console.log` that was accidentally left in the previous release. - -## 1.4.1 (2018-04-13) - -### Bug fixes - -`DOMParser` can now parse marks on block nodes. - -## 1.4.0 (2018-03-22) - -### New features - -[`ContentMatch.defaultType`](https://prosemirror.net/docs/ref/#model.ContentMatch.defaultType), a way to get a matching node type at a content match position, is now public. - -## 1.3.0 (2018-03-22) - -### New features - -`ContentMatch` objects now have an [`edgeCount`](https://prosemirror.net/docs/ref/#model.ContentMatch.edgeCount) property and an [`edge`](https://prosemirror.net/docs/ref/#model.ContentMatch.edge) method, providing direct access to the finite automaton structure. - -## 1.2.2 (2018-03-15) - -### Bug fixes - -Throw errors, rather than constructing invalid objects, when deserializing from invalid JSON data. - -## 1.2.1 (2018-03-15) - -### Bug fixes - -Content expressions with text nodes in required positions now raise the appropriate error about being unable to generate such nodes. - -## 1.2.0 (2018-03-14) - -### Bug fixes - -[`rangeHasMark`](https://prosemirror.net/docs/ref/#model.Node.rangeHasMark) now always returns false for empty ranges. - -The DOM renderer no longer needlessly splits mark nodes when starting a non-rendered mark. - -### New features - -[`DOMSerializer`](https://prosemirror.net/docs/ref/#model.DOMSerializer) now allows [DOM specs](https://prosemirror.net/docs/ref/#model.DOMOutputSpec) for marks to have holes in them, to specify the precise position where their content should be rendered. - -The base position parameter to [`Node.nodesBetween`](https://prosemirror.net/docs/ref/#model.Node.nodesBetween) and [`Fragment.nodesBetween`](https://prosemirror.net/docs/ref/#model.Fragment.nodesBetween) is now part of the public interface. - -## 1.1.0 (2018-01-05) - -### New features - -[`Slice.maxOpen`](https://prosemirror.net/docs/ref/#model.Slice^maxOpen) now has a second argument that can be used to prevent it from opening isolating nodes. - -## 1.0.1 (2017-11-10) - -### Bug fixes - -[`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) instances now properly inherit from `Error`. - -## 1.0.0 (2017-10-13) - -### New features - -[`ParseRule.context`](https://prosemirror.net/docs/ref/#model.ParseRule.context) may now include multiple, pipe-separated context expressions. - -## 0.23.1 (2017-09-21) - -### Bug fixes - -`NodeType.allowsMarks` and `allowedMarks` now actually work for nodes that allow only specific marks. - -## 0.23.0 (2017-09-13) - -### Breaking changes - -[`ResolvedPos.marks`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.ResolvedPos.marks) no longer takes a parameter (you probably want [`marksAcross`](https://prosemirror.net/doc/ref/version/0.23.0.html#model.ResolvedPos.marksAcross) if you were passing true there). - -Attribute and mark constraints in [content expressions](https://prosemirror.net/docs/ref/version/0.23.0.html#model.NodeSpec.content) are no longer supported (this also means the `prosemirror-schema-table` package, which relied on them, is no longer supported). In this release, mark constraints are still (approximately) recognized with a warning, when present. - -[`ContentMatch`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.ContentMatch) objects lost a number of methods: `matchNode`, `matchToEnd`, `findWrappingFor` (which can be easily emulated using the remaining API), and `allowsMark`, which is now the responsibility of [node types](https://prosemirror.net/docs/ref/version/0.23.0.html#model.NodeType.allowsMarkType) instead. - -[`ContentMatch.validEnd`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.ContentMatch.validEnd) is now a property rather than a method. - -[`ContentMatch.findWrapping`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.ContentMatch.findWrapping) now returns an array of plain node types, with no attribute information (since this is no longer necessary). - -The `compute` method for attributes is no longer supported. - -Fragments no longer have an `offsetAt` method. - -`DOMParser.schemaRules` is no longer public (use [`fromSchema`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.DOMParser^fromSchema) and get the resulting parser's `rules` property instead). - -The DOM parser option `topStart` has been replaced by [`topMatch`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.ParseOptions.topMatch). - -The `DOMSerializer` methods `nodesFromSchema` and `marksFromSchema` are no longer public (construct a serializer with [`fromSchema`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.DOMSerializer^fromSchema) and read its `nodes` and `marks` properties instead). - -### Bug fixes - -Fix issue where whitespace at node boundaries was sometimes dropped during content parsing. - -Attribute default values of `undefined` are now allowed. - -### New features - -[`contentElement`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.ParseRule.contentElement) in parse rules may now be a function. - -The new method [`ResolvedPos.marksAcross`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.ResolvedPos.marksAcross) can be used to find the set of marks that should be preserved after a deletion. - -[Content expressions](https://prosemirror.net/docs/ref/version/0.23.0.html#model.NodeSpec.content) are now a regular language, meaning all the operators can be nested and composed as desired, and a bunch of constraints on what could appear next to what have been lifted. - -The starting content match for a node type now lives in [`NodeType.contentMatch`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.NodeType.contentMatch). - -Allowed marks are now specified per node, rather than in content expressions, using the [`marks`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.NodeSpec.marks) property on the node spec. - -Node types received new methods [`allowsMarkType`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.NodeType.allowsMarkType), [`allowsMarks`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.NodeType.allowsMarks), and [`allowedMarks`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.NodeType.allowedMarks), which tell you about the marks that node supports. - -The [`style`](https://prosemirror.net/docs/ref/version/0.23.0.html#model.ParseRule.style) property on parse rules may now have the form `"font-style=italic"` to only match styles that have the value after the equals sign. - -## 0.22.0 (2017-06-29) - -### Bug fixes - -When using [`parseSlice`](https://prosemirror.net/docs/ref/version/0.22.0.html#model.DOMParser.parseSlice), inline DOM content wrapped in block elements for which no parse rule is defined will now be properly wrapped in a textblock node. - -### New features - -[Resolved positions](https://prosemirror.net/docs/ref/version/0.22.0.html#model.ResolvedPos) now have a [`doc`](https://prosemirror.net/docs/ref/version/0.22.0.html#model.ResolvedPos.doc) accessor to easily get their root node. - -Parse rules now support a [`namespace` property](https://prosemirror.net/docs/ref/version/0.22.0.html#model.ParseRule.namespace) to match XML namespaces. - -The [`NodeRange`](https://prosemirror.net/docs/ref/version/0.22.0.html#model.NodeRange) constructor is now public (whereas before you could only construct these through [`blockRange`](https://prosemirror.net/docs/ref/version/0.22.0.html#model.ResolvedPos.blockRange)). - -## 0.21.0 (2017-05-03) - -### Breaking changes - -The `openLeft` and `openRight` properties of `Slice` objects have been renamed to [`openStart`](https://prosemirror.net/docs/ref/version/0.21.0.html#model.Slice.openStart) and [`openEnd`](https://prosemirror.net/docs/ref/version/0.21.0.html#model.Slice.openEnd) to avoid confusion in right-to-left text. The old names will continue to work with a warning until the next release. - -### New features - -Mark [serializing functions](https://prosemirror.net/docs/ref/version/0.21.0.html#model.MarkSpec.toDOM) now get a second parameter that indicates whether the mark's content is inline or block nodes. - -Setting a mark serializer to `null` in a [`DOMSerializer`](https://prosemirror.net/docs/ref/version/0.21.0.html#model.DOMSerializer) can now be used to omit that mark when serializing. - -Node specs support a new property [`isolating`](https://prosemirror.net/docs/ref/version/0.21.0.html#model.NodeSpec.isolating), which is used to disable editing actions like backspacing and lifting across such a node's boundaries. - -## 0.20.0 (2017-04-03) - -### Breaking changes - -Newlines in the text are now normalized to spaces when parsing except when you set `preserveWhitespace` to `"full"` in your [options](https://prosemirror.net/docs/ref/version/0.20.0.html#model.DOMParser.parse) or in a [parse rule](https://prosemirror.net/docs/ref/version/0.20.0.html#model.ParseRule.preserveWhitespace). - -### Bug fixes - -Fix crash in IE when parsing DOM content. - -### New features - -Fragments now have [`nodesBetween`](https://prosemirror.net/docs/ref/version/0.20.0.html#model.Fragment.nodesBetween) and [`descendants`](https://prosemirror.net/docs/ref/version/0.20.0.html#model.Fragments.descendants) methods, providing the same functionality as the methods by the same name on nodes. - -Resolved positions now have [`max`](https://prosemirror.net/docs/ref/version/0.20.0.html#model.ResolvedPos.max) and [`min`](https://prosemirror.net/docs/ref/version/0.20.0.html#model.ResolvedPos.min) methods to easily find a maximum or minimum position. - -## 0.19.0 (2017-03-16) - -### Breaking changes - -`MarkSpec.inclusiveRight` was replaced by [`inclusive`](https://prosemirror.net/docs/ref/version/0.19.0.html#model.MarkSpec.inclusive), which behaves slightly differently. `inclusiveRight` will be interpreted as `inclusive` (with a warning) until the next release. - -### New features - -The new [`inlineContent`](https://prosemirror.net/docs/ref/version/0.19.0.html#model.Node.inlineContent) property on nodes and node types tells you whether a node type supports inline content. - -[`MarkSpec.inclusive`](https://prosemirror.net/docs/ref/version/0.19.0.html#model.MarkSpec.inclusive) can now be used to control whether content inserted at the boundary of a mark receives that mark. - -Parse rule [`context`](https://prosemirror.net/docs/ref/version/0.19.0.html#model.ParseRule.context) restrictions can now use node [groups](https://prosemirror.net/docs/ref/version/0.19.0.html#model.NodeSpec.group), not just node names, to specify valid context. - -## 0.18.0 (2017-02-24) - -### Breaking changes - -`schema.nodeSpec` and `schema.markSpec` have been deprecated in favor of [`schema.spec`](https://prosemirror.net/docs/ref/version/0.18.0.html#model.Schema.spec). The properties still work with a warning in this release, but will be dropped in the next. - -### New features - -`Node` objects now have a [`check`](https://prosemirror.net/docs/ref/version/0.18.0.html#model.Node.check) method which can be used to assert that they conform to the schema. - -Node specs now support an [`atom` property](https://prosemirror.net/docs/ref/version/0.18.0.html#model.NodeSpec.atom), and nodes an [`isAtom` accessor](https://prosemirror.net/docs/ref/version/0.18.0.html#model.Node.isAtom), which is currently only used to determine whether such nodes should be directly selectable (for example when they are rendered as an uneditable node view). - -The new [`excludes`](https://prosemirror.net/docs/ref/version/0.18.0.html#model.MarkSpec.excludes) field on mark specs can be used to control the marks that this mark may coexist with. Mark type objects also gained an [`excludes` _method_](https://prosemirror.net/docs/ref/version/0.18.0.html#model.MarkType.excludes) to querty this relation. - -Mark specs now support a [`group`](https://prosemirror.net/docs/ref/version/0.18.0.html#model.MarkSpec.group) property, and marks can be referred to by group name in content specs. - -The `Schema` class now provides its whole [spec](https://prosemirror.net/docs/ref/version/0.18.0.html#model.SchemaSpec) under its [`spec`](https://prosemirror.net/docs/ref/version/0.18.0.html#model.Schema.spec) property. - -The name of a schema's default top-level node is now [configurable](https://prosemirror.net/docs/ref/version/0.18.0.html#model.SchemaSpec.topNode). You can use [`schema.topNodeType`](https://prosemirror.net/docs/ref/version/0.18.0.html#model.Schema.topNodeType) to retrieve the top node type. - -[Parse rules](https://prosemirror.net/docs/ref/version/0.18.0.html#model.ParseRule) now support a [`context` field](https://prosemirror.net/docs/ref/version/0.18.0.html#model.ParseRule.context) that can be used to only make the rule match inside certain ancestor nodes. - -## 0.17.0 (2017-01-05) - -### Breaking changes - -`Node.marksAt` was replaced with [`ResolvedPos.marks`](https://prosemirror.net/docs/ref/version/0.17.0.html#model.ResolvedPos.marks). It still works (with a warning) in this release, but will be removed in the next one. - -## 0.15.0 (2016-12-10) - -### Breaking changes - -`ResolvedPos.atNodeBoundary` is deprecated and will be removed in the next release. Use `textOffset > 0` instead. - -### New features - -Parse rules associated with a schema can now specify a [`priority`](https://prosemirror.net/docs/ref/version/0.15.0.html#model.ParseRule.priority) to influence the order in which they are applied. - -Resolved positions have a new getter [`textOffset`](https://prosemirror.net/docs/ref/version/0.15.0.html#model.ResolvedPos.textOffset) to find their position within a text node (if any). - -## 0.14.1 (2016-11-30) - -### Bug fixes - -[`DOMParser.parseSlice`](https://prosemirror.net/docs/ref/version/0.14.0.html#model.DOMParser.parseSlice) will now ignore whitespace-only text nodes at the top of the slice. - -## 0.14.0 (2016-11-28) - -### New features - -Parse rules now support [`skip`](https://prosemirror.net/docs/ref/version/0.14.0.html#model.ParseRule.skip) (skip outer element, parse content) and [`getContent`](https://prosemirror.net/docs/ref/version/0.14.0.html#model.ParseRule.getContent) (compute content using custom code) properties. - -The `DOMSerializer` class now exports a static [`renderSpec`](https://prosemirror.net/docs/ref/version/0.14.0.html#model.DOMSerializer^renderSpec) method that can help render DOM spec arrays. - -## 0.13.0 (2016-11-11) - -### Breaking changes - -`ResolvedPos.sameDepth` is now called [`ResolvedPos.sharedDepth`](https://prosemirror.net/docs/ref/version/0.13.0.html#model.ResolvedPos.sharedDepth), and takes a raw, unresolved position as argument. - -### New features - -[`DOMSerializer`](https://prosemirror.net/docs/ref/version/0.13.0.html#model.DOMSerializer)'s `nodes` and `marks` properties are now public. - -[`ContentMatch.findWrapping`](https://prosemirror.net/docs/ref/version/0.13.0.html#model.ContentMatch.findWrapping) now takes a third argument, `marks`. There's a new method [`findWrappingFor`](https://prosemirror.net/docs/ref/version/0.13.0.html#model.ContentMatch.findWrappingFor) that accepts a whole node. - -Adds [`Slice.maxOpen`](https://prosemirror.net/docs/ref/version/0.13.0.html#model.Slice^maxOpen) static method to create maximally open slices. - -DOM parser objects now have a [`parseSlice`](https://prosemirror.net/docs/ref/version/0.13.0.html#model.DOMParser.parseSlice) method which parses an HTML fragment into a [`Slice`](https://prosemirror.net/docs/ref/version/0.13.0.html#model.Slice), rather than trying to create a whole document from it. - -## 0.12.0 (2016-10-21) - -### Breaking changes - -Drops support for some undocumented options to the DOM -serializer that were used by the view. - -### Bug fixes - -When rendering DOM attributes, only ignore null values, not all -falsy values. - -## 0.11.0 (2016-09-21) - -### Breaking changes - -Moved into a separate module. - -The JSON representation of [marks](https://prosemirror.net/docs/ref/version/0.11.0.html#model.Mark) has changed from -`{"_": "type", "attr1": "value"}` to `{"type": "type", "attrs": -{"attr1": "value"}}`, where `attrs` may be omitted when the mark has -no attributes. - -Mark-related JSON methods now live on the -[`Mark` class](https://prosemirror.net/docs/ref/version/0.11.0.html#model.Mark^fromJSON). - -The way node and mark types in a schema are defined was changed from -defining subclasses to passing plain objects -([`NodeSpec`](https://prosemirror.net/docs/ref/version/0.11.0.html#model.NodeSpec) and [`MarkSpec`](https://prosemirror.net/docs/ref/version/0.11.0.html#model.MarkSpec)). - -DOM serialization and parsing logic is now done through dedicated -objects ([`DOMSerializer`](https://prosemirror.net/docs/ref/version/0.11.0.html#model.DOMSerializer) and -[`DOMParser`](https://prosemirror.net/docs/ref/version/0.11.0.html#model.DOMParser)), rather than through the schema. It -is now possible to define alternative parsing and serializing -strategies without touching the schema. - -### New features - -The [`Slice`](https://prosemirror.net/docs/ref/version/0.11.0.html#model.Slice) class now has an [`eq` method](https://prosemirror.net/docs/ref/version/0.11.0.html#model.Slice.eq). - -The [`Node.marksAt`](https://prosemirror.net/docs/ref/version/0.11.0.html#model.Node.marksAt) method got a second -parameter to indicate you're interested in the marks _after_ the -position. - diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/CONTRIBUTING.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/CONTRIBUTING.md deleted file mode 100644 index 735d8cc..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/CONTRIBUTING.md +++ /dev/null @@ -1,104 +0,0 @@ -# How to contribute - -- [Getting help](#getting-help) -- [Submitting bug reports](#submitting-bug-reports) -- [Contributing code](#contributing-code) - -## Getting help - -Community discussion, questions, and informal bug reporting is done on the -[discuss.ProseMirror forum](http://discuss.prosemirror.net). - -## Submitting bug reports - -Report bugs on the -[issue tracker](https://code.haverbeke.berlin/prosemirror/prosemirror/issues). -Before reporting a bug, please read these pointers. - -- The issue tracker is for *bugs*, not requests for help. Questions - should be asked on the [forum](http://discuss.prosemirror.net). - -- Include information about the version of the code that exhibits the - problem. For browser-related issues, include the browser and browser - version on which the problem occurred. - -- Mention very precisely what went wrong. "X is broken" is not a good - bug report. What did you expect to happen? What happened instead? - Describe the exact steps a maintainer has to take to make the - problem occur. A screencast can be useful, but is no substitute for - a textual description. - -- A great way to make it easy to reproduce your problem, if it can not - be trivially reproduced on the website demos, is to submit a script - that triggers the issue. - -## Contributing code - -Code generated by a language model is not welcome in this project. -Please don't waste my time with it. - -If you want to make a change that involves a significant overhaul of -the code or introduces a user-visible new feature, create an -[issue](https://code.haverbeke.berlin/prosemirror/prosemirror/issues/) -first with your proposal. - -- Make sure you have a [Codeberg](https://codeberg.org/user/sign_up) - or [GitHub](https://github.com/signup/free) account. - -- Use that to create a [code.haverbeke.berlin - account](https://code.haverbeke.berlin/user/login). - -- Fork the relevant repository. - -- Create a local checkout of the code. You can use the - [main repository](https://code.haverbeke.berlin/prosemirror/prosemirror) to - easily check out all core modules. - -- Make your changes, and commit them - -- If your changes are easy to test or likely to regress, add tests in - the relevant `test/` directory. Either put them in an existing - `test-*.js` file, if they fit there, or add a new file. - -- Make sure all tests pass. Run `npm run test` to verify tests pass - (you will need Node.js v6+). - -- Submit a pull request. Don't put more than one feature/fix in a - single pull request. - -By contributing code to ProseMirror you - - - Agree to license the contributed code under the project's [MIT - license](https://code.haverbeke.berlin/prosemirror/prosemirror/blob/main/LICENSE). - - - Confirm that you have the right to contribute and license the code - in question. (Either you hold all rights on the code, or the rights - holder has explicitly granted the right to use it like this, - through a compatible open source license or through a direct - agreement with you.) - -### Coding standards - -- ES6 syntax, targeting an ES5 runtime (i.e. don't use library - elements added by ES6, don't use ES7/ES.next syntax). - -- 2 spaces per indentation level, no tabs. - -- No semicolons except when necessary. - -- Follow the surrounding code when it comes to spacing, brace - placement, etc. - -- Brace-less single-statement bodies are encouraged whenever they - don't impact readability. - -- [getdocs-ts](https://code.haverbeke.berlin/marijn/getdocs-ts)-style doc comments - above items that are part of the public API. - -- When documenting non-public items, you can put the type after a - single colon, so that getdocs doesn't pick it up and add it to the - API reference. - -- ProseMirror does *not* follow JSHint or JSLint prescribed style. - Patches that try to 'fix' code to pass one of these linters will not - be accepted. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/LICENSE b/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/LICENSE deleted file mode 100644 index 7e2295b..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2015-2017 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/README.md b/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/README.md deleted file mode 100644 index 120dfef..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# prosemirror-model - -[ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://code.haverbeke.berlin/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://code.haverbeke.berlin/prosemirror/prosemirror-model/src/branch/main/CHANGELOG.md) ] - -This is a [core module](https://prosemirror.net/docs/ref/#model) of [ProseMirror](https://prosemirror.net). -ProseMirror is a well-behaved rich semantic content editor based on -contentEditable, with support for collaborative editing and custom -document schemas. - -This [module](https://prosemirror.net/docs/ref/#model) implements -ProseMirror's [document model](https://prosemirror.net/docs/guide/#doc), -along with the mechanisms needed to support -[schemas](https://prosemirror.net/docs/guide/#schema). - -The [project page](https://prosemirror.net) has more information, a -number of [examples](https://prosemirror.net/examples/) and the -[documentation](https://prosemirror.net/docs/). - -This code is released under an -[MIT license](https://code.haverbeke.berlin/prosemirror/prosemirror/src/branch/main/LICENSE). -There's a [forum](http://discuss.prosemirror.net) for general -discussion and support requests, and the -[bug tracker](https://code.haverbeke.berlin/prosemirror/prosemirror/issues) -is the place to report issues. - -We aim to be an inclusive, welcoming community. To make that explicit, -we have a [code of -conduct](http://contributor-covenant.org/version/1/1/0/) that applies -to communication around the project. diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.cjs b/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.cjs deleted file mode 100644 index 1a390d0..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.cjs +++ /dev/null @@ -1,2901 +0,0 @@ -'use strict'; - -function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); } -function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } -function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } -function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } -function _isNativeFunction(fn) { try { return Function.toString.call(fn).indexOf("[native code]") !== -1; } catch (e) { return typeof fn === "function"; } } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var OrderedMap = require('orderedmap'); -function _findDiffStart(a, b, pos) { - for (var i = 0;; i++) { - if (i == a.childCount || i == b.childCount) return a.childCount == b.childCount ? null : pos; - var childA = a.child(i), - childB = b.child(i); - if (childA == childB) { - pos += childA.nodeSize; - continue; - } - if (!childA.sameMarkup(childB)) return pos; - if (childA.isText && childA.text != childB.text) { - for (var j = 0; childA.text[j] == childB.text[j]; j++) pos++; - return pos; - } - if (childA.content.size || childB.content.size) { - var inner = _findDiffStart(childA.content, childB.content, pos + 1); - if (inner != null) return inner; - } - pos += childA.nodeSize; - } -} -function _findDiffEnd(a, b, posA, posB) { - for (var iA = a.childCount, iB = b.childCount;;) { - if (iA == 0 || iB == 0) return iA == iB ? null : { - a: posA, - b: posB - }; - var childA = a.child(--iA), - childB = b.child(--iB), - size = childA.nodeSize; - if (childA == childB) { - posA -= size; - posB -= size; - continue; - } - if (!childA.sameMarkup(childB)) return { - a: posA, - b: posB - }; - if (childA.isText && childA.text != childB.text) { - var same = 0, - minSize = Math.min(childA.text.length, childB.text.length); - while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) { - same++; - posA--; - posB--; - } - return { - a: posA, - b: posB - }; - } - if (childA.content.size || childB.content.size) { - var inner = _findDiffEnd(childA.content, childB.content, posA - 1, posB - 1); - if (inner) return inner; - } - posA -= size; - posB -= size; - } -} -var Fragment = function () { - function Fragment(content, size) { - _classCallCheck(this, Fragment); - this.content = content; - this.size = size || 0; - if (size == null) for (var i = 0; i < content.length; i++) this.size += content[i].nodeSize; - } - _createClass(Fragment, [{ - key: "nodesBetween", - value: function nodesBetween(from, to, f) { - var nodeStart = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - var parent = arguments.length > 4 ? arguments[4] : undefined; - for (var i = 0, pos = 0; pos < to; i++) { - var child = this.content[i], - end = pos + child.nodeSize; - if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) { - var start = pos + 1; - child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start); - } - pos = end; - } - } - }, { - key: "descendants", - value: function descendants(f) { - this.nodesBetween(0, this.size, f); - } - }, { - key: "textBetween", - value: function textBetween(from, to, blockSeparator, leafText) { - var text = "", - first = true; - this.nodesBetween(from, to, function (node, pos) { - var nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos) : !node.isLeaf ? "" : leafText ? typeof leafText === "function" ? leafText(node) : leafText : node.type.spec.leafText ? node.type.spec.leafText(node) : ""; - if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) { - if (first) first = false;else text += blockSeparator; - } - text += nodeText; - }, 0); - return text; - } - }, { - key: "append", - value: function append(other) { - if (!other.size) return this; - if (!this.size) return other; - var last = this.lastChild, - first = other.firstChild, - content = this.content.slice(), - i = 0; - if (last.isText && last.sameMarkup(first)) { - content[content.length - 1] = last.withText(last.text + first.text); - i = 1; - } - for (; i < other.content.length; i++) content.push(other.content[i]); - return new Fragment(content, this.size + other.size); - } - }, { - key: "cut", - value: function cut(from) { - var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.size; - if (from == 0 && to == this.size) return this; - var result = [], - size = 0; - if (to > from) for (var i = 0, pos = 0; pos < to; i++) { - var child = this.content[i], - end = pos + child.nodeSize; - if (end > from) { - if (pos < from || end > to) { - if (child.isText) child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos));else child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1)); - } - result.push(child); - size += child.nodeSize; - } - pos = end; - } - return new Fragment(result, size); - } - }, { - key: "cutByIndex", - value: function cutByIndex(from, to) { - if (from == to) return Fragment.empty; - if (from == 0 && to == this.content.length) return this; - return new Fragment(this.content.slice(from, to)); - } - }, { - key: "replaceChild", - value: function replaceChild(index, node) { - var current = this.content[index]; - if (current == node) return this; - var copy = this.content.slice(); - var size = this.size + node.nodeSize - current.nodeSize; - copy[index] = node; - return new Fragment(copy, size); - } - }, { - key: "addToStart", - value: function addToStart(node) { - return new Fragment([node].concat(this.content), this.size + node.nodeSize); - } - }, { - key: "addToEnd", - value: function addToEnd(node) { - return new Fragment(this.content.concat(node), this.size + node.nodeSize); - } - }, { - key: "eq", - value: function eq(other) { - if (this.content.length != other.content.length) return false; - for (var i = 0; i < this.content.length; i++) if (!this.content[i].eq(other.content[i])) return false; - return true; - } - }, { - key: "firstChild", - get: function get() { - return this.content.length ? this.content[0] : null; - } - }, { - key: "lastChild", - get: function get() { - return this.content.length ? this.content[this.content.length - 1] : null; - } - }, { - key: "childCount", - get: function get() { - return this.content.length; - } - }, { - key: "child", - value: function child(index) { - var found = this.content[index]; - if (!found) throw new RangeError("Index " + index + " out of range for " + this); - return found; - } - }, { - key: "maybeChild", - value: function maybeChild(index) { - return this.content[index] || null; - } - }, { - key: "forEach", - value: function forEach(f) { - for (var i = 0, p = 0; i < this.content.length; i++) { - var child = this.content[i]; - f(child, p, i); - p += child.nodeSize; - } - } - }, { - key: "findDiffStart", - value: function findDiffStart(other) { - var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - return _findDiffStart(this, other, pos); - } - }, { - key: "findDiffEnd", - value: function findDiffEnd(other) { - var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.size; - var otherPos = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : other.size; - return _findDiffEnd(this, other, pos, otherPos); - } - }, { - key: "findIndex", - value: function findIndex(pos) { - if (pos == 0) return retIndex(0, pos); - if (pos == this.size) return retIndex(this.content.length, pos); - if (pos > this.size || pos < 0) throw new RangeError("Position ".concat(pos, " outside of fragment (").concat(this, ")")); - for (var i = 0, curPos = 0;; i++) { - var cur = this.child(i), - end = curPos + cur.nodeSize; - if (end >= pos) { - if (end == pos) return retIndex(i + 1, end); - return retIndex(i, curPos); - } - curPos = end; - } - } - }, { - key: "toString", - value: function toString() { - return "<" + this.toStringInner() + ">"; - } - }, { - key: "toStringInner", - value: function toStringInner() { - return this.content.join(", "); - } - }, { - key: "toJSON", - value: function toJSON() { - return this.content.length ? this.content.map(function (n) { - return n.toJSON(); - }) : null; - } - }], [{ - key: "fromJSON", - value: function fromJSON(schema, value) { - if (!value) return Fragment.empty; - if (!Array.isArray(value)) throw new RangeError("Invalid input for Fragment.fromJSON"); - return Fragment.fromArray(value.map(schema.nodeFromJSON)); - } - }, { - key: "fromArray", - value: function fromArray(array) { - if (!array.length) return Fragment.empty; - var joined, - size = 0; - for (var i = 0; i < array.length; i++) { - var node = array[i]; - size += node.nodeSize; - if (i && node.isText && array[i - 1].sameMarkup(node)) { - if (!joined) joined = array.slice(0, i); - joined[joined.length - 1] = node.withText(joined[joined.length - 1].text + node.text); - } else if (joined) { - joined.push(node); - } - } - return new Fragment(joined || array, size); - } - }, { - key: "from", - value: function from(nodes) { - if (!nodes) return Fragment.empty; - if (nodes instanceof Fragment) return nodes; - if (Array.isArray(nodes)) return this.fromArray(nodes); - if (nodes.attrs) return new Fragment([nodes], nodes.nodeSize); - throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : "")); - } - }]); - return Fragment; -}(); -Fragment.empty = new Fragment([], 0); -var found = { - index: 0, - offset: 0 -}; -function retIndex(index, offset) { - found.index = index; - found.offset = offset; - return found; -} -function compareDeep(a, b) { - if (a === b) return true; - if (!(a && _typeof(a) == "object") || !(b && _typeof(b) == "object")) return false; - var array = Array.isArray(a); - if (Array.isArray(b) != array) return false; - if (array) { - if (a.length != b.length) return false; - for (var i = 0; i < a.length; i++) if (!compareDeep(a[i], b[i])) return false; - } else { - for (var p in a) if (!(p in b) || !compareDeep(a[p], b[p])) return false; - for (var _p in b) if (!(_p in a)) return false; - } - return true; -} -var Mark = function () { - function Mark(type, attrs) { - _classCallCheck(this, Mark); - this.type = type; - this.attrs = attrs; - } - _createClass(Mark, [{ - key: "addToSet", - value: function addToSet(set) { - var copy, - placed = false; - for (var i = 0; i < set.length; i++) { - var other = set[i]; - if (this.eq(other)) return set; - if (this.type.excludes(other.type)) { - if (!copy) copy = set.slice(0, i); - } else if (other.type.excludes(this.type)) { - return set; - } else { - if (!placed && other.type.rank > this.type.rank) { - if (!copy) copy = set.slice(0, i); - copy.push(this); - placed = true; - } - if (copy) copy.push(other); - } - } - if (!copy) copy = set.slice(); - if (!placed) copy.push(this); - return copy; - } - }, { - key: "removeFromSet", - value: function removeFromSet(set) { - for (var i = 0; i < set.length; i++) if (this.eq(set[i])) return set.slice(0, i).concat(set.slice(i + 1)); - return set; - } - }, { - key: "isInSet", - value: function isInSet(set) { - for (var i = 0; i < set.length; i++) if (this.eq(set[i])) return true; - return false; - } - }, { - key: "eq", - value: function eq(other) { - return this == other || this.type == other.type && compareDeep(this.attrs, other.attrs); - } - }, { - key: "toJSON", - value: function toJSON() { - var obj = { - type: this.type.name - }; - for (var _ in this.attrs) { - obj.attrs = this.attrs; - break; - } - return obj; - } - }], [{ - key: "fromJSON", - value: function fromJSON(schema, json) { - if (!json) throw new RangeError("Invalid input for Mark.fromJSON"); - var type = schema.marks[json.type]; - if (!type) throw new RangeError("There is no mark type ".concat(json.type, " in this schema")); - var mark = type.create(json.attrs); - type.checkAttrs(mark.attrs); - return mark; - } - }, { - key: "sameSet", - value: function sameSet(a, b) { - if (a == b) return true; - if (a.length != b.length) return false; - for (var i = 0; i < a.length; i++) if (!a[i].eq(b[i])) return false; - return true; - } - }, { - key: "setFrom", - value: function setFrom(marks) { - if (!marks || Array.isArray(marks) && marks.length == 0) return Mark.none; - if (marks instanceof Mark) return [marks]; - var copy = marks.slice(); - copy.sort(function (a, b) { - return a.type.rank - b.type.rank; - }); - return copy; - } - }]); - return Mark; -}(); -Mark.none = []; -var ReplaceError = function (_Error) { - _inherits(ReplaceError, _Error); - var _super = _createSuper(ReplaceError); - function ReplaceError() { - _classCallCheck(this, ReplaceError); - return _super.apply(this, arguments); - } - return _createClass(ReplaceError); -}(_wrapNativeSuper(Error)); -var Slice = function () { - function Slice(content, openStart, openEnd) { - _classCallCheck(this, Slice); - this.content = content; - this.openStart = openStart; - this.openEnd = openEnd; - } - _createClass(Slice, [{ - key: "size", - get: function get() { - return this.content.size - this.openStart - this.openEnd; - } - }, { - key: "insertAt", - value: function insertAt(pos, fragment) { - var content = insertInto(this.content, pos + this.openStart, fragment, this.openStart + 1, this.openEnd + 1); - return content && new Slice(content, this.openStart, this.openEnd); - } - }, { - key: "removeBetween", - value: function removeBetween(from, to) { - return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd); - } - }, { - key: "eq", - value: function eq(other) { - return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd; - } - }, { - key: "toString", - value: function toString() { - return this.content + "(" + this.openStart + "," + this.openEnd + ")"; - } - }, { - key: "toJSON", - value: function toJSON() { - if (!this.content.size) return null; - var json = { - content: this.content.toJSON() - }; - if (this.openStart > 0) json.openStart = this.openStart; - if (this.openEnd > 0) json.openEnd = this.openEnd; - return json; - } - }], [{ - key: "fromJSON", - value: function fromJSON(schema, json) { - if (!json) return Slice.empty; - var openStart = json.openStart || 0, - openEnd = json.openEnd || 0; - if (typeof openStart != "number" || typeof openEnd != "number") throw new RangeError("Invalid input for Slice.fromJSON"); - return new Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd); - } - }, { - key: "maxOpen", - value: function maxOpen(fragment) { - var openIsolating = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var openStart = 0, - openEnd = 0; - for (var n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild) openStart++; - for (var _n = fragment.lastChild; _n && !_n.isLeaf && (openIsolating || !_n.type.spec.isolating); _n = _n.lastChild) openEnd++; - return new Slice(fragment, openStart, openEnd); - } - }]); - return Slice; -}(); -Slice.empty = new Slice(Fragment.empty, 0, 0); -function removeRange(content, from, to) { - var _content$findIndex = content.findIndex(from), - index = _content$findIndex.index, - offset = _content$findIndex.offset, - child = content.maybeChild(index); - var _content$findIndex2 = content.findIndex(to), - indexTo = _content$findIndex2.index, - offsetTo = _content$findIndex2.offset; - if (offset == from || child.isText) { - if (offsetTo != to && !content.child(indexTo).isText) throw new RangeError("Removing non-flat range"); - return content.cut(0, from).append(content.cut(to)); - } - if (index != indexTo) throw new RangeError("Removing non-flat range"); - return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1))); -} -function insertInto(content, dist, insert, openStart, openEnd, parent) { - var _content$findIndex3 = content.findIndex(dist), - index = _content$findIndex3.index, - offset = _content$findIndex3.offset, - child = content.maybeChild(index); - if (offset == dist || child.isText) { - if (parent && openStart <= 0 && openEnd <= 0 && !parent.canReplace(index, index, insert)) return null; - return content.cut(0, dist).append(insert).append(content.cut(dist)); - } - var inner = insertInto(child.content, dist - offset - 1, insert, index == 0 ? openStart - 1 : 0, index == content.childCount - 1 ? openEnd - 1 : 0, child); - return inner && content.replaceChild(index, child.copy(inner)); -} -function _replace($from, $to, slice) { - if (slice.openStart > $from.depth) throw new ReplaceError("Inserted content deeper than insertion position"); - if ($from.depth - slice.openStart != $to.depth - slice.openEnd) throw new ReplaceError("Inconsistent open depths"); - return replaceOuter($from, $to, slice, 0); -} -function replaceOuter($from, $to, slice, depth) { - var index = $from.index(depth), - node = $from.node(depth); - if (index == $to.index(depth) && depth < $from.depth - slice.openStart) { - var inner = replaceOuter($from, $to, slice, depth + 1); - return node.copy(node.content.replaceChild(index, inner)); - } else if (!slice.content.size) { - return close(node, replaceTwoWay($from, $to, depth)); - } else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { - var parent = $from.parent, - content = parent.content; - return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset))); - } else { - var _prepareSliceForRepla = prepareSliceForReplace(slice, $from), - start = _prepareSliceForRepla.start, - end = _prepareSliceForRepla.end; - return close(node, replaceThreeWay($from, start, end, $to, depth)); - } -} -function checkJoin(main, sub) { - if (!sub.type.compatibleContent(main.type)) throw new ReplaceError("Cannot join " + sub.type.name + " onto " + main.type.name); -} -function joinable($before, $after, depth) { - var node = $before.node(depth); - checkJoin(node, $after.node(depth)); - return node; -} -function addNode(child, target) { - var last = target.length - 1; - if (last >= 0 && child.isText && child.sameMarkup(target[last])) target[last] = child.withText(target[last].text + child.text);else target.push(child); -} -function addRange($start, $end, depth, target) { - var node = ($end || $start).node(depth); - var startIndex = 0, - endIndex = $end ? $end.index(depth) : node.childCount; - if ($start) { - startIndex = $start.index(depth); - if ($start.depth > depth) { - startIndex++; - } else if ($start.textOffset) { - addNode($start.nodeAfter, target); - startIndex++; - } - } - for (var i = startIndex; i < endIndex; i++) addNode(node.child(i), target); - if ($end && $end.depth == depth && $end.textOffset) addNode($end.nodeBefore, target); -} -function close(node, content) { - node.type.checkContent(content); - return node.copy(content); -} -function replaceThreeWay($from, $start, $end, $to, depth) { - var openStart = $from.depth > depth && joinable($from, $start, depth + 1); - var openEnd = $to.depth > depth && joinable($end, $to, depth + 1); - var content = []; - addRange(null, $from, depth, content); - if (openStart && openEnd && $start.index(depth) == $end.index(depth)) { - checkJoin(openStart, openEnd); - addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content); - } else { - if (openStart) addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content); - addRange($start, $end, depth, content); - if (openEnd) addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content); - } - addRange($to, null, depth, content); - return new Fragment(content); -} -function replaceTwoWay($from, $to, depth) { - var content = []; - addRange(null, $from, depth, content); - if ($from.depth > depth) { - var type = joinable($from, $to, depth + 1); - addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content); - } - addRange($to, null, depth, content); - return new Fragment(content); -} -function prepareSliceForReplace(slice, $along) { - var extra = $along.depth - slice.openStart, - parent = $along.node(extra); - var node = parent.copy(slice.content); - for (var i = extra - 1; i >= 0; i--) node = $along.node(i).copy(Fragment.from(node)); - return { - start: node.resolveNoCache(slice.openStart + extra), - end: node.resolveNoCache(node.content.size - slice.openEnd - extra) - }; -} -var ResolvedPos = function () { - function ResolvedPos(pos, path, parentOffset) { - _classCallCheck(this, ResolvedPos); - this.pos = pos; - this.path = path; - this.parentOffset = parentOffset; - this.depth = path.length / 3 - 1; - } - _createClass(ResolvedPos, [{ - key: "resolveDepth", - value: function resolveDepth(val) { - if (val == null) return this.depth; - if (val < 0) return this.depth + val; - return val; - } - }, { - key: "parent", - get: function get() { - return this.node(this.depth); - } - }, { - key: "doc", - get: function get() { - return this.node(0); - } - }, { - key: "node", - value: function node(depth) { - return this.path[this.resolveDepth(depth) * 3]; - } - }, { - key: "index", - value: function index(depth) { - return this.path[this.resolveDepth(depth) * 3 + 1]; - } - }, { - key: "indexAfter", - value: function indexAfter(depth) { - depth = this.resolveDepth(depth); - return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1); - } - }, { - key: "start", - value: function start(depth) { - depth = this.resolveDepth(depth); - return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; - } - }, { - key: "end", - value: function end(depth) { - depth = this.resolveDepth(depth); - return this.start(depth) + this.node(depth).content.size; - } - }, { - key: "before", - value: function before(depth) { - depth = this.resolveDepth(depth); - if (!depth) throw new RangeError("There is no position before the top-level node"); - return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1]; - } - }, { - key: "after", - value: function after(depth) { - depth = this.resolveDepth(depth); - if (!depth) throw new RangeError("There is no position after the top-level node"); - return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize; - } - }, { - key: "textOffset", - get: function get() { - return this.pos - this.path[this.path.length - 1]; - } - }, { - key: "nodeAfter", - get: function get() { - var parent = this.parent, - index = this.index(this.depth); - if (index == parent.childCount) return null; - var dOff = this.pos - this.path[this.path.length - 1], - child = parent.child(index); - return dOff ? parent.child(index).cut(dOff) : child; - } - }, { - key: "nodeBefore", - get: function get() { - var index = this.index(this.depth); - var dOff = this.pos - this.path[this.path.length - 1]; - if (dOff) return this.parent.child(index).cut(0, dOff); - return index == 0 ? null : this.parent.child(index - 1); - } - }, { - key: "posAtIndex", - value: function posAtIndex(index, depth) { - depth = this.resolveDepth(depth); - var node = this.path[depth * 3], - pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; - for (var i = 0; i < index; i++) pos += node.child(i).nodeSize; - return pos; - } - }, { - key: "marks", - value: function marks() { - var parent = this.parent, - index = this.index(); - if (parent.content.size == 0) return Mark.none; - if (this.textOffset) return parent.child(index).marks; - var main = parent.maybeChild(index - 1), - other = parent.maybeChild(index); - if (!main) { - var tmp = main; - main = other; - other = tmp; - } - var marks = main.marks; - for (var i = 0; i < marks.length; i++) if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks))) marks = marks[i--].removeFromSet(marks); - return marks; - } - }, { - key: "marksAcross", - value: function marksAcross($end) { - var after = this.parent.maybeChild(this.index()); - if (!after || !after.isInline) return null; - var marks = after.marks, - next = $end.parent.maybeChild($end.index()); - for (var i = 0; i < marks.length; i++) if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks))) marks = marks[i--].removeFromSet(marks); - return marks; - } - }, { - key: "sharedDepth", - value: function sharedDepth(pos) { - for (var depth = this.depth; depth > 0; depth--) if (this.start(depth) <= pos && this.end(depth) >= pos) return depth; - return 0; - } - }, { - key: "blockRange", - value: function blockRange() { - var other = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this; - var pred = arguments.length > 1 ? arguments[1] : undefined; - if (other.pos < this.pos) return other.blockRange(this); - for (var d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--) if (other.pos <= this.end(d) && (!pred || pred(this.node(d)))) return new NodeRange(this, other, d); - return null; - } - }, { - key: "sameParent", - value: function sameParent(other) { - return this.pos - this.parentOffset == other.pos - other.parentOffset; - } - }, { - key: "max", - value: function max(other) { - return other.pos > this.pos ? other : this; - } - }, { - key: "min", - value: function min(other) { - return other.pos < this.pos ? other : this; - } - }, { - key: "toString", - value: function toString() { - var str = ""; - for (var i = 1; i <= this.depth; i++) str += (str ? "/" : "") + this.node(i).type.name + "_" + this.index(i - 1); - return str + ":" + this.parentOffset; - } - }], [{ - key: "resolve", - value: function resolve(doc, pos) { - if (!(pos >= 0 && pos <= doc.content.size)) throw new RangeError("Position " + pos + " out of range"); - var path = []; - var start = 0, - parentOffset = pos; - for (var node = doc;;) { - var _node$content$findInd = node.content.findIndex(parentOffset), - index = _node$content$findInd.index, - offset = _node$content$findInd.offset; - var rem = parentOffset - offset; - path.push(node, index, start + offset); - if (!rem) break; - node = node.child(index); - if (node.isText) break; - parentOffset = rem - 1; - start += offset + 1; - } - return new ResolvedPos(pos, path, parentOffset); - } - }, { - key: "resolveCached", - value: function resolveCached(doc, pos) { - var cache = resolveCache.get(doc); - if (cache) { - for (var i = 0; i < cache.elts.length; i++) { - var elt = cache.elts[i]; - if (elt.pos == pos) return elt; - } - } else { - resolveCache.set(doc, cache = new ResolveCache()); - } - var result = cache.elts[cache.i] = ResolvedPos.resolve(doc, pos); - cache.i = (cache.i + 1) % resolveCacheSize; - return result; - } - }]); - return ResolvedPos; -}(); -var ResolveCache = _createClass(function ResolveCache() { - _classCallCheck(this, ResolveCache); - this.elts = []; - this.i = 0; -}); -var resolveCacheSize = 12, - resolveCache = new WeakMap(); -var NodeRange = function () { - function NodeRange($from, $to, depth) { - _classCallCheck(this, NodeRange); - this.$from = $from; - this.$to = $to; - this.depth = depth; - } - _createClass(NodeRange, [{ - key: "start", - get: function get() { - return this.$from.before(this.depth + 1); - } - }, { - key: "end", - get: function get() { - return this.$to.after(this.depth + 1); - } - }, { - key: "parent", - get: function get() { - return this.$from.node(this.depth); - } - }, { - key: "startIndex", - get: function get() { - return this.$from.index(this.depth); - } - }, { - key: "endIndex", - get: function get() { - return this.$to.indexAfter(this.depth); - } - }]); - return NodeRange; -}(); -var emptyAttrs = Object.create(null); -var Node = function () { - function Node(type, attrs, content) { - var marks = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Mark.none; - _classCallCheck(this, Node); - this.type = type; - this.attrs = attrs; - this.marks = marks; - this.content = content || Fragment.empty; - } - _createClass(Node, [{ - key: "children", - get: function get() { - return this.content.content; - } - }, { - key: "nodeSize", - get: function get() { - return this.isLeaf ? 1 : 2 + this.content.size; - } - }, { - key: "childCount", - get: function get() { - return this.content.childCount; - } - }, { - key: "child", - value: function child(index) { - return this.content.child(index); - } - }, { - key: "maybeChild", - value: function maybeChild(index) { - return this.content.maybeChild(index); - } - }, { - key: "forEach", - value: function forEach(f) { - this.content.forEach(f); - } - }, { - key: "nodesBetween", - value: function nodesBetween(from, to, f) { - var startPos = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - this.content.nodesBetween(from, to, f, startPos, this); - } - }, { - key: "descendants", - value: function descendants(f) { - this.nodesBetween(0, this.content.size, f); - } - }, { - key: "textContent", - get: function get() { - return this.isLeaf && this.type.spec.leafText ? this.type.spec.leafText(this) : this.textBetween(0, this.content.size, ""); - } - }, { - key: "textBetween", - value: function textBetween(from, to, blockSeparator, leafText) { - return this.content.textBetween(from, to, blockSeparator, leafText); - } - }, { - key: "firstChild", - get: function get() { - return this.content.firstChild; - } - }, { - key: "lastChild", - get: function get() { - return this.content.lastChild; - } - }, { - key: "eq", - value: function eq(other) { - return this == other || this.sameMarkup(other) && this.content.eq(other.content); - } - }, { - key: "sameMarkup", - value: function sameMarkup(other) { - return this.hasMarkup(other.type, other.attrs, other.marks); - } - }, { - key: "hasMarkup", - value: function hasMarkup(type, attrs, marks) { - return this.type == type && compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) && Mark.sameSet(this.marks, marks || Mark.none); - } - }, { - key: "copy", - value: function copy() { - var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - if (content == this.content) return this; - return new Node(this.type, this.attrs, content, this.marks); - } - }, { - key: "mark", - value: function mark(marks) { - return marks == this.marks ? this : new Node(this.type, this.attrs, this.content, marks); - } - }, { - key: "cut", - value: function cut(from) { - var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.content.size; - if (from == 0 && to == this.content.size) return this; - return this.copy(this.content.cut(from, to)); - } - }, { - key: "slice", - value: function slice(from) { - var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.content.size; - var includeParents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - if (from == to) return Slice.empty; - var $from = this.resolve(from), - $to = this.resolve(to); - var depth = includeParents ? 0 : $from.sharedDepth(to); - var start = $from.start(depth), - node = $from.node(depth); - var content = node.content.cut($from.pos - start, $to.pos - start); - return new Slice(content, $from.depth - depth, $to.depth - depth); - } - }, { - key: "replace", - value: function replace(from, to, slice) { - return _replace(this.resolve(from), this.resolve(to), slice); - } - }, { - key: "nodeAt", - value: function nodeAt(pos) { - for (var node = this;;) { - var _node$content$findInd2 = node.content.findIndex(pos), - index = _node$content$findInd2.index, - offset = _node$content$findInd2.offset; - node = node.maybeChild(index); - if (!node) return null; - if (offset == pos || node.isText) return node; - pos -= offset + 1; - } - } - }, { - key: "childAfter", - value: function childAfter(pos) { - var _this$content$findInd = this.content.findIndex(pos), - index = _this$content$findInd.index, - offset = _this$content$findInd.offset; - return { - node: this.content.maybeChild(index), - index: index, - offset: offset - }; - } - }, { - key: "childBefore", - value: function childBefore(pos) { - if (pos == 0) return { - node: null, - index: 0, - offset: 0 - }; - var _this$content$findInd2 = this.content.findIndex(pos), - index = _this$content$findInd2.index, - offset = _this$content$findInd2.offset; - if (offset < pos) return { - node: this.content.child(index), - index: index, - offset: offset - }; - var node = this.content.child(index - 1); - return { - node: node, - index: index - 1, - offset: offset - node.nodeSize - }; - } - }, { - key: "resolve", - value: function resolve(pos) { - return ResolvedPos.resolveCached(this, pos); - } - }, { - key: "resolveNoCache", - value: function resolveNoCache(pos) { - return ResolvedPos.resolve(this, pos); - } - }, { - key: "rangeHasMark", - value: function rangeHasMark(from, to, type) { - var found = false; - if (to > from) this.nodesBetween(from, to, function (node) { - if (type.isInSet(node.marks)) found = true; - return !found; - }); - return found; - } - }, { - key: "isBlock", - get: function get() { - return this.type.isBlock; - } - }, { - key: "isTextblock", - get: function get() { - return this.type.isTextblock; - } - }, { - key: "inlineContent", - get: function get() { - return this.type.inlineContent; - } - }, { - key: "isInline", - get: function get() { - return this.type.isInline; - } - }, { - key: "isText", - get: function get() { - return this.type.isText; - } - }, { - key: "isLeaf", - get: function get() { - return this.type.isLeaf; - } - }, { - key: "isAtom", - get: function get() { - return this.type.isAtom; - } - }, { - key: "toString", - value: function toString() { - if (this.type.spec.toDebugString) return this.type.spec.toDebugString(this); - var name = this.type.name; - if (this.content.size) name += "(" + this.content.toStringInner() + ")"; - return wrapMarks(this.marks, name); - } - }, { - key: "contentMatchAt", - value: function contentMatchAt(index) { - var match = this.type.contentMatch.matchFragment(this.content, 0, index); - if (!match) throw new Error("Called contentMatchAt on a node with invalid content"); - return match; - } - }, { - key: "canReplace", - value: function canReplace(from, to) { - var replacement = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Fragment.empty; - var start = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - var end = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : replacement.childCount; - var one = this.contentMatchAt(from).matchFragment(replacement, start, end); - var two = one && one.matchFragment(this.content, to); - if (!two || !two.validEnd) return false; - for (var i = start; i < end; i++) if (!this.type.allowsMarks(replacement.child(i).marks)) return false; - return true; - } - }, { - key: "canReplaceWith", - value: function canReplaceWith(from, to, type, marks) { - if (marks && !this.type.allowsMarks(marks)) return false; - var start = this.contentMatchAt(from).matchType(type); - var end = start && start.matchFragment(this.content, to); - return end ? end.validEnd : false; - } - }, { - key: "canAppend", - value: function canAppend(other) { - if (other.content.size) return this.canReplace(this.childCount, this.childCount, other.content);else return this.type.compatibleContent(other.type); - } - }, { - key: "check", - value: function check() { - this.type.checkContent(this.content); - this.type.checkAttrs(this.attrs); - var copy = Mark.none; - for (var i = 0; i < this.marks.length; i++) { - var mark = this.marks[i]; - mark.type.checkAttrs(mark.attrs); - copy = mark.addToSet(copy); - } - if (!Mark.sameSet(copy, this.marks)) throw new RangeError("Invalid collection of marks for node ".concat(this.type.name, ": ").concat(this.marks.map(function (m) { - return m.type.name; - }))); - this.content.forEach(function (node) { - return node.check(); - }); - } - }, { - key: "toJSON", - value: function toJSON() { - var obj = { - type: this.type.name - }; - for (var _ in this.attrs) { - obj.attrs = this.attrs; - break; - } - if (this.content.size) obj.content = this.content.toJSON(); - if (this.marks.length) obj.marks = this.marks.map(function (n) { - return n.toJSON(); - }); - return obj; - } - }], [{ - key: "fromJSON", - value: function fromJSON(schema, json) { - if (!json) throw new RangeError("Invalid input for Node.fromJSON"); - var marks = undefined; - if (json.marks) { - if (!Array.isArray(json.marks)) throw new RangeError("Invalid mark data for Node.fromJSON"); - marks = json.marks.map(schema.markFromJSON); - } - if (json.type == "text") { - if (typeof json.text != "string") throw new RangeError("Invalid text node in JSON"); - return schema.text(json.text, marks); - } - var content = Fragment.fromJSON(schema, json.content); - var node = schema.nodeType(json.type).create(json.attrs, content, marks); - node.type.checkAttrs(node.attrs); - return node; - } - }]); - return Node; -}(); -Node.prototype.text = undefined; -var TextNode = function (_Node) { - _inherits(TextNode, _Node); - var _super2 = _createSuper(TextNode); - function TextNode(type, attrs, content, marks) { - var _this; - _classCallCheck(this, TextNode); - _this = _super2.call(this, type, attrs, null, marks); - if (!content) throw new RangeError("Empty text nodes are not allowed"); - _this.text = content; - return _this; - } - _createClass(TextNode, [{ - key: "toString", - value: function toString() { - if (this.type.spec.toDebugString) return this.type.spec.toDebugString(this); - return wrapMarks(this.marks, JSON.stringify(this.text)); - } - }, { - key: "textContent", - get: function get() { - return this.text; - } - }, { - key: "textBetween", - value: function textBetween(from, to) { - return this.text.slice(from, to); - } - }, { - key: "nodeSize", - get: function get() { - return this.text.length; - } - }, { - key: "mark", - value: function mark(marks) { - return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks); - } - }, { - key: "withText", - value: function withText(text) { - if (text == this.text) return this; - return new TextNode(this.type, this.attrs, text, this.marks); - } - }, { - key: "cut", - value: function cut() { - var from = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.text.length; - if (from == 0 && to == this.text.length) return this; - return this.withText(this.text.slice(from, to)); - } - }, { - key: "eq", - value: function eq(other) { - return this.sameMarkup(other) && this.text == other.text; - } - }, { - key: "toJSON", - value: function toJSON() { - var base = _get(_getPrototypeOf(TextNode.prototype), "toJSON", this).call(this); - base.text = this.text; - return base; - } - }]); - return TextNode; -}(Node); -function wrapMarks(marks, str) { - for (var i = marks.length - 1; i >= 0; i--) str = marks[i].type.name + "(" + str + ")"; - return str; -} -var ContentMatch = function () { - function ContentMatch(validEnd) { - _classCallCheck(this, ContentMatch); - this.validEnd = validEnd; - this.next = []; - this.wrapCache = []; - } - _createClass(ContentMatch, [{ - key: "matchType", - value: function matchType(type) { - for (var i = 0; i < this.next.length; i++) if (this.next[i].type == type) return this.next[i].next; - return null; - } - }, { - key: "matchFragment", - value: function matchFragment(frag) { - var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : frag.childCount; - var cur = this; - for (var i = start; cur && i < end; i++) cur = cur.matchType(frag.child(i).type); - return cur; - } - }, { - key: "inlineContent", - get: function get() { - return this.next.length != 0 && this.next[0].type.isInline; - } - }, { - key: "defaultType", - get: function get() { - for (var i = 0; i < this.next.length; i++) { - var type = this.next[i].type; - if (!(type.isText || type.hasRequiredAttrs())) return type; - } - return null; - } - }, { - key: "compatible", - value: function compatible(other) { - for (var i = 0; i < this.next.length; i++) for (var j = 0; j < other.next.length; j++) if (this.next[i].type == other.next[j].type) return true; - return false; - } - }, { - key: "fillBefore", - value: function fillBefore(after) { - var toEnd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var seen = [this]; - function search(match, types) { - var finished = match.matchFragment(after, startIndex); - if (finished && (!toEnd || finished.validEnd)) return Fragment.from(types.map(function (tp) { - return tp.createAndFill(); - })); - for (var i = 0; i < match.next.length; i++) { - var _match$next$i = match.next[i], - type = _match$next$i.type, - next = _match$next$i.next; - if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) { - seen.push(next); - var _found = search(next, types.concat(type)); - if (_found) return _found; - } - } - return null; - } - return search(this, []); - } - }, { - key: "findWrapping", - value: function findWrapping(target) { - for (var i = 0; i < this.wrapCache.length; i += 2) if (this.wrapCache[i] == target) return this.wrapCache[i + 1]; - var computed = this.computeWrapping(target); - this.wrapCache.push(target, computed); - return computed; - } - }, { - key: "computeWrapping", - value: function computeWrapping(target) { - var seen = Object.create(null), - active = [{ - match: this, - type: null, - via: null - }]; - while (active.length) { - var current = active.shift(), - match = current.match; - if (match.matchType(target)) { - var result = []; - for (var obj = current; obj.type; obj = obj.via) result.push(obj.type); - return result.reverse(); - } - for (var i = 0; i < match.next.length; i++) { - var _match$next$i2 = match.next[i], - type = _match$next$i2.type, - next = _match$next$i2.next; - if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) { - active.push({ - match: type.contentMatch, - type: type, - via: current - }); - seen[type.name] = true; - } - } - } - return null; - } - }, { - key: "edgeCount", - get: function get() { - return this.next.length; - } - }, { - key: "edge", - value: function edge(n) { - if (n >= this.next.length) throw new RangeError("There's no ".concat(n, "th edge in this content match")); - return this.next[n]; - } - }, { - key: "toString", - value: function toString() { - var seen = []; - function scan(m) { - seen.push(m); - for (var i = 0; i < m.next.length; i++) if (seen.indexOf(m.next[i].next) == -1) scan(m.next[i].next); - } - scan(this); - return seen.map(function (m, i) { - var out = i + (m.validEnd ? "*" : " ") + " "; - for (var _i = 0; _i < m.next.length; _i++) out += (_i ? ", " : "") + m.next[_i].type.name + "->" + seen.indexOf(m.next[_i].next); - return out; - }).join("\n"); - } - }], [{ - key: "parse", - value: function parse(string, nodeTypes) { - var stream = new TokenStream(string, nodeTypes); - if (stream.next == null) return ContentMatch.empty; - var expr = parseExpr(stream); - if (stream.next) stream.err("Unexpected trailing text"); - var match = dfa(nfa(expr)); - checkForDeadEnds(match, stream); - return match; - } - }]); - return ContentMatch; -}(); -ContentMatch.empty = new ContentMatch(true); -var TokenStream = function () { - function TokenStream(string, nodeTypes) { - _classCallCheck(this, TokenStream); - this.string = string; - this.nodeTypes = nodeTypes; - this.inline = null; - this.pos = 0; - this.tokens = string.split(/\s*(?=\b|\W|$)/); - if (this.tokens[this.tokens.length - 1] == "") this.tokens.pop(); - if (this.tokens[0] == "") this.tokens.shift(); - } - _createClass(TokenStream, [{ - key: "next", - get: function get() { - return this.tokens[this.pos]; - } - }, { - key: "eat", - value: function eat(tok) { - return this.next == tok && (this.pos++ || true); - } - }, { - key: "err", - value: function err(str) { - throw new SyntaxError(str + " (in content expression '" + this.string + "')"); - } - }]); - return TokenStream; -}(); -function parseExpr(stream) { - var exprs = []; - do { - exprs.push(parseExprSeq(stream)); - } while (stream.eat("|")); - return exprs.length == 1 ? exprs[0] : { - type: "choice", - exprs: exprs - }; -} -function parseExprSeq(stream) { - var exprs = []; - do { - exprs.push(parseExprSubscript(stream)); - } while (stream.next && stream.next != ")" && stream.next != "|"); - return exprs.length == 1 ? exprs[0] : { - type: "seq", - exprs: exprs - }; -} -function parseExprSubscript(stream) { - var expr = parseExprAtom(stream); - for (;;) { - if (stream.eat("+")) expr = { - type: "plus", - expr: expr - };else if (stream.eat("*")) expr = { - type: "star", - expr: expr - };else if (stream.eat("?")) expr = { - type: "opt", - expr: expr - };else if (stream.eat("{")) expr = parseExprRange(stream, expr);else break; - } - return expr; -} -function parseNum(stream) { - if (/\D/.test(stream.next)) stream.err("Expected number, got '" + stream.next + "'"); - var result = Number(stream.next); - stream.pos++; - return result; -} -function parseExprRange(stream, expr) { - var min = parseNum(stream), - max = min; - if (stream.eat(",")) { - if (stream.next != "}") max = parseNum(stream);else max = -1; - } - if (!stream.eat("}")) stream.err("Unclosed braced range"); - return { - type: "range", - min: min, - max: max, - expr: expr - }; -} -function resolveName(stream, name) { - var types = stream.nodeTypes, - type = types[name]; - if (type) return [type]; - var result = []; - for (var typeName in types) { - var _type = types[typeName]; - if (_type.isInGroup(name)) result.push(_type); - } - if (result.length == 0) stream.err("No node type or group '" + name + "' found"); - return result; -} -function parseExprAtom(stream) { - if (stream.eat("(")) { - var expr = parseExpr(stream); - if (!stream.eat(")")) stream.err("Missing closing paren"); - return expr; - } else if (!/\W/.test(stream.next)) { - var exprs = resolveName(stream, stream.next).map(function (type) { - if (stream.inline == null) stream.inline = type.isInline;else if (stream.inline != type.isInline) stream.err("Mixing inline and block content"); - return { - type: "name", - value: type - }; - }); - stream.pos++; - return exprs.length == 1 ? exprs[0] : { - type: "choice", - exprs: exprs - }; - } else { - stream.err("Unexpected token '" + stream.next + "'"); - } -} -function nfa(expr) { - var nfa = [[]]; - connect(compile(expr, 0), node()); - return nfa; - function node() { - return nfa.push([]) - 1; - } - function edge(from, to, term) { - var edge = { - term: term, - to: to - }; - nfa[from].push(edge); - return edge; - } - function connect(edges, to) { - edges.forEach(function (edge) { - return edge.to = to; - }); - } - function compile(expr, from) { - if (expr.type == "choice") { - return expr.exprs.reduce(function (out, expr) { - return out.concat(compile(expr, from)); - }, []); - } else if (expr.type == "seq") { - for (var i = 0;; i++) { - var next = compile(expr.exprs[i], from); - if (i == expr.exprs.length - 1) return next; - connect(next, from = node()); - } - } else if (expr.type == "star") { - var loop = node(); - edge(from, loop); - connect(compile(expr.expr, loop), loop); - return [edge(loop)]; - } else if (expr.type == "plus") { - var _loop = node(); - connect(compile(expr.expr, from), _loop); - connect(compile(expr.expr, _loop), _loop); - return [edge(_loop)]; - } else if (expr.type == "opt") { - return [edge(from)].concat(compile(expr.expr, from)); - } else if (expr.type == "range") { - var cur = from; - for (var _i2 = 0; _i2 < expr.min; _i2++) { - var _next = node(); - connect(compile(expr.expr, cur), _next); - cur = _next; - } - if (expr.max == -1) { - connect(compile(expr.expr, cur), cur); - } else { - for (var _i3 = expr.min; _i3 < expr.max; _i3++) { - var _next2 = node(); - edge(cur, _next2); - connect(compile(expr.expr, cur), _next2); - cur = _next2; - } - } - return [edge(cur)]; - } else if (expr.type == "name") { - return [edge(from, undefined, expr.value)]; - } else { - throw new Error("Unknown expr type"); - } - } -} -function cmp(a, b) { - return b - a; -} -function nullFrom(nfa, node) { - var result = []; - scan(node); - return result.sort(cmp); - function scan(node) { - var edges = nfa[node]; - if (edges.length == 1 && !edges[0].term) return scan(edges[0].to); - result.push(node); - for (var i = 0; i < edges.length; i++) { - var _edges$i = edges[i], - term = _edges$i.term, - to = _edges$i.to; - if (!term && result.indexOf(to) == -1) scan(to); - } - } -} -function dfa(nfa) { - var labeled = Object.create(null); - return explore(nullFrom(nfa, 0)); - function explore(states) { - var out = []; - states.forEach(function (node) { - nfa[node].forEach(function (_ref) { - var term = _ref.term, - to = _ref.to; - if (!term) return; - var set; - for (var i = 0; i < out.length; i++) if (out[i][0] == term) set = out[i][1]; - nullFrom(nfa, to).forEach(function (node) { - if (!set) out.push([term, set = []]); - if (set.indexOf(node) == -1) set.push(node); - }); - }); - }); - var state = labeled[states.join(",")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1); - for (var i = 0; i < out.length; i++) { - var _states = out[i][1].sort(cmp); - state.next.push({ - type: out[i][0], - next: labeled[_states.join(",")] || explore(_states) - }); - } - return state; - } -} -function checkForDeadEnds(match, stream) { - for (var i = 0, work = [match]; i < work.length; i++) { - var state = work[i], - dead = !state.validEnd, - nodes = []; - for (var j = 0; j < state.next.length; j++) { - var _state$next$j = state.next[j], - type = _state$next$j.type, - next = _state$next$j.next; - nodes.push(type.name); - if (dead && !(type.isText || type.hasRequiredAttrs())) dead = false; - if (work.indexOf(next) == -1) work.push(next); - } - if (dead) stream.err("Only non-generatable nodes (" + nodes.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)"); - } -} -function defaultAttrs(attrs) { - var defaults = Object.create(null); - for (var attrName in attrs) { - var attr = attrs[attrName]; - if (!attr.hasDefault) return null; - defaults[attrName] = attr["default"]; - } - return defaults; -} -function _computeAttrs(attrs, value) { - var built = Object.create(null); - for (var name in attrs) { - var given = value && value[name]; - if (given === undefined) { - var attr = attrs[name]; - if (attr.hasDefault) given = attr["default"];else throw new RangeError("No value supplied for attribute " + name); - } - built[name] = given; - } - return built; -} -function _checkAttrs(attrs, values, type, name) { - for (var _name in values) if (!(_name in attrs)) throw new RangeError("Unsupported attribute ".concat(_name, " for ").concat(type, " of type ").concat(_name)); - for (var _name2 in attrs) { - var attr = attrs[_name2]; - if (attr.validate) attr.validate(values[_name2]); - } -} -function initAttrs(typeName, attrs) { - var result = Object.create(null); - if (attrs) for (var name in attrs) result[name] = new Attribute(typeName, name, attrs[name]); - return result; -} -var NodeType = function () { - function NodeType(name, schema, spec) { - _classCallCheck(this, NodeType); - this.name = name; - this.schema = schema; - this.spec = spec; - this.markSet = null; - this.groups = spec.group ? spec.group.split(" ") : []; - this.attrs = initAttrs(name, spec.attrs); - this.defaultAttrs = defaultAttrs(this.attrs); - this.contentMatch = null; - this.inlineContent = null; - this.isBlock = !(spec.inline || name == "text"); - this.isText = name == "text"; - } - _createClass(NodeType, [{ - key: "isInline", - get: function get() { - return !this.isBlock; - } - }, { - key: "isTextblock", - get: function get() { - return this.isBlock && this.inlineContent; - } - }, { - key: "isLeaf", - get: function get() { - return this.contentMatch == ContentMatch.empty; - } - }, { - key: "isAtom", - get: function get() { - return this.isLeaf || !!this.spec.atom; - } - }, { - key: "isInGroup", - value: function isInGroup(group) { - return this.groups.indexOf(group) > -1; - } - }, { - key: "whitespace", - get: function get() { - return this.spec.whitespace || (this.spec.code ? "pre" : "normal"); - } - }, { - key: "hasRequiredAttrs", - value: function hasRequiredAttrs() { - for (var n in this.attrs) if (this.attrs[n].isRequired) return true; - return false; - } - }, { - key: "compatibleContent", - value: function compatibleContent(other) { - return this == other || this.contentMatch.compatible(other.contentMatch); - } - }, { - key: "computeAttrs", - value: function computeAttrs(attrs) { - if (!attrs && this.defaultAttrs) return this.defaultAttrs;else return _computeAttrs(this.attrs, attrs); - } - }, { - key: "create", - value: function create() { - var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - var content = arguments.length > 1 ? arguments[1] : undefined; - var marks = arguments.length > 2 ? arguments[2] : undefined; - if (this.isText) throw new Error("NodeType.create can't construct text nodes"); - return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks)); - } - }, { - key: "createChecked", - value: function createChecked() { - var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - var content = arguments.length > 1 ? arguments[1] : undefined; - var marks = arguments.length > 2 ? arguments[2] : undefined; - content = Fragment.from(content); - this.checkContent(content); - return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks)); - } - }, { - key: "createAndFill", - value: function createAndFill() { - var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - var content = arguments.length > 1 ? arguments[1] : undefined; - var marks = arguments.length > 2 ? arguments[2] : undefined; - attrs = this.computeAttrs(attrs); - content = Fragment.from(content); - if (content.size) { - var before = this.contentMatch.fillBefore(content); - if (!before) return null; - content = before.append(content); - } - var matched = this.contentMatch.matchFragment(content); - var after = matched && matched.fillBefore(Fragment.empty, true); - if (!after) return null; - return new Node(this, attrs, content.append(after), Mark.setFrom(marks)); - } - }, { - key: "validContent", - value: function validContent(content) { - var result = this.contentMatch.matchFragment(content); - if (!result || !result.validEnd) return false; - for (var i = 0; i < content.childCount; i++) if (!this.allowsMarks(content.child(i).marks)) return false; - return true; - } - }, { - key: "checkContent", - value: function checkContent(content) { - if (!this.validContent(content)) throw new RangeError("Invalid content for node ".concat(this.name, ": ").concat(content.toString().slice(0, 50))); - } - }, { - key: "checkAttrs", - value: function checkAttrs(attrs) { - _checkAttrs(this.attrs, attrs, "node", this.name); - } - }, { - key: "allowsMarkType", - value: function allowsMarkType(markType) { - return this.markSet == null || this.markSet.indexOf(markType) > -1; - } - }, { - key: "allowsMarks", - value: function allowsMarks(marks) { - if (this.markSet == null) return true; - for (var i = 0; i < marks.length; i++) if (!this.allowsMarkType(marks[i].type)) return false; - return true; - } - }, { - key: "allowedMarks", - value: function allowedMarks(marks) { - if (this.markSet == null) return marks; - var copy; - for (var i = 0; i < marks.length; i++) { - if (!this.allowsMarkType(marks[i].type)) { - if (!copy) copy = marks.slice(0, i); - } else if (copy) { - copy.push(marks[i]); - } - } - return !copy ? marks : copy.length ? copy : Mark.none; - } - }], [{ - key: "compile", - value: function compile(nodes, schema) { - var result = Object.create(null); - nodes.forEach(function (name, spec) { - return result[name] = new NodeType(name, schema, spec); - }); - var topType = schema.spec.topNode || "doc"; - if (!result[topType]) throw new RangeError("Schema is missing its top node type ('" + topType + "')"); - if (!result.text) throw new RangeError("Every schema needs a 'text' type"); - for (var _ in result.text.attrs) throw new RangeError("The text node type should not have attributes"); - return result; - } - }]); - return NodeType; -}(); -function validateType(typeName, attrName, type) { - var types = type.split("|"); - return function (value) { - var name = value === null ? "null" : _typeof(value); - if (types.indexOf(name) < 0) throw new RangeError("Expected value of type ".concat(types, " for attribute ").concat(attrName, " on type ").concat(typeName, ", got ").concat(name)); - }; -} -var Attribute = function () { - function Attribute(typeName, attrName, options) { - _classCallCheck(this, Attribute); - this.hasDefault = Object.prototype.hasOwnProperty.call(options, "default"); - this["default"] = options["default"]; - this.validate = typeof options.validate == "string" ? validateType(typeName, attrName, options.validate) : options.validate; - } - _createClass(Attribute, [{ - key: "isRequired", - get: function get() { - return !this.hasDefault; - } - }]); - return Attribute; -}(); -var MarkType = function () { - function MarkType(name, rank, schema, spec) { - _classCallCheck(this, MarkType); - this.name = name; - this.rank = rank; - this.schema = schema; - this.spec = spec; - this.attrs = initAttrs(name, spec.attrs); - this.excluded = null; - var defaults = defaultAttrs(this.attrs); - this.instance = defaults ? new Mark(this, defaults) : null; - } - _createClass(MarkType, [{ - key: "create", - value: function create() { - var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - if (!attrs && this.instance) return this.instance; - return new Mark(this, _computeAttrs(this.attrs, attrs)); - } - }, { - key: "removeFromSet", - value: function removeFromSet(set) { - for (var i = 0; i < set.length; i++) if (set[i].type == this) { - set = set.slice(0, i).concat(set.slice(i + 1)); - i--; - } - return set; - } - }, { - key: "isInSet", - value: function isInSet(set) { - for (var i = 0; i < set.length; i++) if (set[i].type == this) return set[i]; - } - }, { - key: "checkAttrs", - value: function checkAttrs(attrs) { - _checkAttrs(this.attrs, attrs, "mark", this.name); - } - }, { - key: "excludes", - value: function excludes(other) { - return this.excluded.indexOf(other) > -1; - } - }], [{ - key: "compile", - value: function compile(marks, schema) { - var result = Object.create(null), - rank = 0; - marks.forEach(function (name, spec) { - return result[name] = new MarkType(name, rank++, schema, spec); - }); - return result; - } - }]); - return MarkType; -}(); -var Schema = function () { - function Schema(spec) { - var _this2 = this; - _classCallCheck(this, Schema); - this.linebreakReplacement = null; - this.cached = Object.create(null); - var instanceSpec = this.spec = {}; - for (var prop in spec) instanceSpec[prop] = spec[prop]; - instanceSpec.nodes = OrderedMap.from(spec.nodes), instanceSpec.marks = OrderedMap.from(spec.marks || {}), this.nodes = NodeType.compile(this.spec.nodes, this); - this.marks = MarkType.compile(this.spec.marks, this); - var contentExprCache = Object.create(null); - for (var _prop in this.nodes) { - if (_prop in this.marks) throw new RangeError(_prop + " can not be both a node and a mark"); - var type = this.nodes[_prop], - contentExpr = type.spec.content || "", - markExpr = type.spec.marks; - type.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes)); - type.inlineContent = type.contentMatch.inlineContent; - if (type.spec.linebreakReplacement) { - if (this.linebreakReplacement) throw new RangeError("Multiple linebreak nodes defined"); - if (!type.isInline || !type.isLeaf) throw new RangeError("Linebreak replacement nodes must be inline leaf nodes"); - this.linebreakReplacement = type; - } - type.markSet = markExpr == "_" ? null : markExpr ? gatherMarks(this, markExpr.split(" ")) : markExpr == "" || !type.inlineContent ? [] : null; - } - for (var _prop2 in this.marks) { - var _type2 = this.marks[_prop2], - excl = _type2.spec.excludes; - _type2.excluded = excl == null ? [_type2] : excl == "" ? [] : gatherMarks(this, excl.split(" ")); - } - this.nodeFromJSON = function (json) { - return Node.fromJSON(_this2, json); - }; - this.markFromJSON = function (json) { - return Mark.fromJSON(_this2, json); - }; - this.topNodeType = this.nodes[this.spec.topNode || "doc"]; - this.cached.wrappings = Object.create(null); - } - _createClass(Schema, [{ - key: "node", - value: function node(type) { - var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - var content = arguments.length > 2 ? arguments[2] : undefined; - var marks = arguments.length > 3 ? arguments[3] : undefined; - if (typeof type == "string") type = this.nodeType(type);else if (!(type instanceof NodeType)) throw new RangeError("Invalid node type: " + type);else if (type.schema != this) throw new RangeError("Node type from different schema used (" + type.name + ")"); - return type.createChecked(attrs, content, marks); - } - }, { - key: "text", - value: function text(_text, marks) { - var type = this.nodes.text; - return new TextNode(type, type.defaultAttrs, _text, Mark.setFrom(marks)); - } - }, { - key: "mark", - value: function mark(type, attrs) { - if (typeof type == "string") type = this.marks[type]; - return type.create(attrs); - } - }, { - key: "nodeType", - value: function nodeType(name) { - var found = this.nodes[name]; - if (!found) throw new RangeError("Unknown node type: " + name); - return found; - } - }]); - return Schema; -}(); -function gatherMarks(schema, marks) { - var found = []; - for (var i = 0; i < marks.length; i++) { - var name = marks[i], - mark = schema.marks[name], - ok = mark; - if (mark) { - found.push(mark); - } else { - for (var prop in schema.marks) { - var _mark = schema.marks[prop]; - if (name == "_" || _mark.spec.group && _mark.spec.group.split(" ").indexOf(name) > -1) found.push(ok = _mark); - } - } - if (!ok) throw new SyntaxError("Unknown mark type: '" + marks[i] + "'"); - } - return found; -} -function isTagRule(rule) { - return rule.tag != null; -} -function isStyleRule(rule) { - return rule.style != null; -} -var DOMParser = function () { - function DOMParser(schema, rules) { - var _this3 = this; - _classCallCheck(this, DOMParser); - this.schema = schema; - this.rules = rules; - this.tags = []; - this.styles = []; - var matchedStyles = this.matchedStyles = []; - rules.forEach(function (rule) { - if (isTagRule(rule)) { - _this3.tags.push(rule); - } else if (isStyleRule(rule)) { - var prop = /[^=]*/.exec(rule.style)[0]; - if (matchedStyles.indexOf(prop) < 0) matchedStyles.push(prop); - _this3.styles.push(rule); - } - }); - this.normalizeLists = !this.tags.some(function (r) { - if (!/^(ul|ol)\b/.test(r.tag) || !r.node) return false; - var node = schema.nodes[r.node]; - return node.contentMatch.matchType(node); - }); - } - _createClass(DOMParser, [{ - key: "parse", - value: function parse(dom) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var context = new ParseContext(this, options, false); - context.addAll(dom, Mark.none, options.from, options.to); - return context.finish(); - } - }, { - key: "parseSlice", - value: function parseSlice(dom) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var context = new ParseContext(this, options, true); - context.addAll(dom, Mark.none, options.from, options.to); - return Slice.maxOpen(context.finish()); - } - }, { - key: "matchTag", - value: function matchTag(dom, context, after) { - for (var i = after ? this.tags.indexOf(after) + 1 : 0; i < this.tags.length; i++) { - var rule = this.tags[i]; - if (matches(dom, rule.tag) && (rule.namespace === undefined || dom.namespaceURI == rule.namespace) && (!rule.context || context.matchesContext(rule.context))) { - if (rule.getAttrs) { - var result = rule.getAttrs(dom); - if (result === false) continue; - rule.attrs = result || undefined; - } - return rule; - } - } - } - }, { - key: "matchStyle", - value: function matchStyle(prop, value, context, after) { - for (var i = after ? this.styles.indexOf(after) + 1 : 0; i < this.styles.length; i++) { - var rule = this.styles[i], - style = rule.style; - if (style.indexOf(prop) != 0 || rule.context && !context.matchesContext(rule.context) || style.length > prop.length && (style.charCodeAt(prop.length) != 61 || style.slice(prop.length + 1) != value)) continue; - if (rule.getAttrs) { - var result = rule.getAttrs(value); - if (result === false) continue; - rule.attrs = result || undefined; - } - return rule; - } - } - }], [{ - key: "schemaRules", - value: function schemaRules(schema) { - var result = []; - function insert(rule) { - var priority = rule.priority == null ? 50 : rule.priority, - i = 0; - for (; i < result.length; i++) { - var next = result[i], - nextPriority = next.priority == null ? 50 : next.priority; - if (nextPriority < priority) break; - } - result.splice(i, 0, rule); - } - var _loop2 = function _loop2(name) { - var rules = schema.marks[name].spec.parseDOM; - if (rules) rules.forEach(function (rule) { - insert(rule = copy(rule)); - if (!(rule.mark || rule.ignore || rule.clearMark)) rule.mark = name; - }); - }; - for (var name in schema.marks) { - _loop2(name); - } - var _loop3 = function _loop3(_name3) { - var rules = schema.nodes[_name3].spec.parseDOM; - if (rules) rules.forEach(function (rule) { - insert(rule = copy(rule)); - if (!(rule.node || rule.ignore || rule.mark)) rule.node = _name3; - }); - }; - for (var _name3 in schema.nodes) { - _loop3(_name3); - } - return result; - } - }, { - key: "fromSchema", - value: function fromSchema(schema) { - return schema.cached.domParser || (schema.cached.domParser = new DOMParser(schema, DOMParser.schemaRules(schema))); - } - }]); - return DOMParser; -}(); -var blockTags = { - address: true, - article: true, - aside: true, - blockquote: true, - canvas: true, - dd: true, - div: true, - dl: true, - fieldset: true, - figcaption: true, - figure: true, - footer: true, - form: true, - h1: true, - h2: true, - h3: true, - h4: true, - h5: true, - h6: true, - header: true, - hgroup: true, - hr: true, - li: true, - noscript: true, - ol: true, - output: true, - p: true, - pre: true, - section: true, - table: true, - tfoot: true, - ul: true -}; -var ignoreTags = { - head: true, - noscript: true, - object: true, - script: true, - style: true, - title: true -}; -var listTags = { - ol: true, - ul: true -}; -var OPT_PRESERVE_WS = 1, - OPT_PRESERVE_WS_FULL = 2, - OPT_OPEN_LEFT = 4; -function wsOptionsFor(type, preserveWhitespace, base) { - if (preserveWhitespace != null) return (preserveWhitespace ? OPT_PRESERVE_WS : 0) | (preserveWhitespace === "full" ? OPT_PRESERVE_WS_FULL : 0); - return type && type.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base & ~OPT_OPEN_LEFT; -} -var NodeContext = function () { - function NodeContext(type, attrs, marks, solid, match, options) { - _classCallCheck(this, NodeContext); - this.type = type; - this.attrs = attrs; - this.marks = marks; - this.solid = solid; - this.options = options; - this.content = []; - this.activeMarks = Mark.none; - this.match = match || (options & OPT_OPEN_LEFT ? null : type.contentMatch); - } - _createClass(NodeContext, [{ - key: "findWrapping", - value: function findWrapping(node) { - if (!this.match) { - if (!this.type) return []; - var fill = this.type.contentMatch.fillBefore(Fragment.from(node)); - if (fill) { - this.match = this.type.contentMatch.matchFragment(fill); - } else { - var start = this.type.contentMatch, - wrap; - if (wrap = start.findWrapping(node.type)) { - this.match = start; - return wrap; - } else { - return null; - } - } - } - return this.match.findWrapping(node.type); - } - }, { - key: "finish", - value: function finish(openEnd) { - if (!(this.options & OPT_PRESERVE_WS)) { - var last = this.content[this.content.length - 1], - m; - if (last && last.isText && (m = /[ \t\r\n\u000c]+$/.exec(last.text))) { - var text = last; - if (last.text.length == m[0].length) this.content.pop();else this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m[0].length)); - } - } - var content = Fragment.from(this.content); - if (!openEnd && this.match) content = content.append(this.match.fillBefore(Fragment.empty, true)); - return this.type ? this.type.create(this.attrs, content, this.marks) : content; - } - }, { - key: "inlineContext", - value: function inlineContext(node) { - if (this.type) return this.type.inlineContent; - if (this.content.length) return this.content[0].isInline; - return node.parentNode && !blockTags.hasOwnProperty(node.parentNode.nodeName.toLowerCase()); - } - }]); - return NodeContext; -}(); -var ParseContext = function () { - function ParseContext(parser, options, isOpen) { - _classCallCheck(this, ParseContext); - this.parser = parser; - this.options = options; - this.isOpen = isOpen; - this.open = 0; - this.localPreserveWS = false; - var topNode = options.topNode, - topContext; - var topOptions = wsOptionsFor(null, options.preserveWhitespace, 0) | (isOpen ? OPT_OPEN_LEFT : 0); - if (topNode) topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, true, options.topMatch || topNode.type.contentMatch, topOptions);else if (isOpen) topContext = new NodeContext(null, null, Mark.none, true, null, topOptions);else topContext = new NodeContext(parser.schema.topNodeType, null, Mark.none, true, null, topOptions); - this.nodes = [topContext]; - this.find = options.findPositions; - this.needsBlock = false; - } - _createClass(ParseContext, [{ - key: "top", - get: function get() { - return this.nodes[this.open]; - } - }, { - key: "addDOM", - value: function addDOM(dom, marks) { - if (dom.nodeType == 3) this.addTextNode(dom, marks);else if (dom.nodeType == 1) this.addElement(dom, marks); - } - }, { - key: "addTextNode", - value: function addTextNode(dom, marks) { - var value = dom.nodeValue; - var top = this.top, - preserveWS = top.options & OPT_PRESERVE_WS_FULL ? "full" : this.localPreserveWS || (top.options & OPT_PRESERVE_WS) > 0; - var schema = this.parser.schema; - if (preserveWS === "full" || top.inlineContext(dom) || /[^ \t\r\n\u000c]/.test(value)) { - if (!preserveWS) { - value = value.replace(/[ \t\r\n\u000c]+/g, " "); - if (/^[ \t\r\n\u000c]/.test(value) && this.open == this.nodes.length - 1) { - var nodeBefore = top.content[top.content.length - 1]; - var domNodeBefore = dom.previousSibling; - if (!nodeBefore || domNodeBefore && domNodeBefore.nodeName == 'BR' || nodeBefore.isText && /[ \t\r\n\u000c]$/.test(nodeBefore.text)) value = value.slice(1); - } - } else if (preserveWS === "full") { - value = value.replace(/\r\n?/g, "\n"); - } else if (schema.linebreakReplacement && /[\r\n]/.test(value) && this.top.findWrapping(schema.linebreakReplacement.create())) { - var lines = value.split(/\r?\n|\r/); - for (var i = 0; i < lines.length; i++) { - if (i) this.insertNode(schema.linebreakReplacement.create(), marks, true); - if (lines[i]) this.insertNode(schema.text(lines[i]), marks, !/\S/.test(lines[i])); - } - value = ""; - } else { - value = value.replace(/\r?\n|\r/g, " "); - } - if (value) this.insertNode(schema.text(value), marks, !/\S/.test(value)); - this.findInText(dom); - } else { - this.findInside(dom); - } - } - }, { - key: "addElement", - value: function addElement(dom, marks, matchAfter) { - var outerWS = this.localPreserveWS, - top = this.top; - if (dom.tagName == "PRE" || /pre/.test(dom.style && dom.style.whiteSpace)) this.localPreserveWS = true; - var name = dom.nodeName.toLowerCase(), - ruleID; - if (listTags.hasOwnProperty(name) && this.parser.normalizeLists) normalizeList(dom); - var rule = this.options.ruleFromNode && this.options.ruleFromNode(dom) || (ruleID = this.parser.matchTag(dom, this, matchAfter)); - out: if (rule ? rule.ignore : ignoreTags.hasOwnProperty(name)) { - this.findInside(dom); - this.ignoreFallback(dom, marks); - } else if (!rule || rule.skip || rule.closeParent) { - if (rule && rule.closeParent) this.open = Math.max(0, this.open - 1);else if (rule && rule.skip.nodeType) dom = rule.skip; - var sync, - oldNeedsBlock = this.needsBlock; - if (blockTags.hasOwnProperty(name)) { - if (top.content.length && top.content[0].isInline && this.open) { - this.open--; - top = this.top; - } - sync = true; - if (!top.type) this.needsBlock = true; - } else if (!dom.firstChild) { - this.leafFallback(dom, marks); - break out; - } - var innerMarks = rule && rule.skip ? marks : this.readStyles(dom, marks); - if (innerMarks) this.addAll(dom, innerMarks); - if (sync) this.sync(top); - this.needsBlock = oldNeedsBlock; - } else { - var _innerMarks = this.readStyles(dom, marks); - if (_innerMarks) this.addElementByRule(dom, rule, _innerMarks, rule.consuming === false ? ruleID : undefined); - } - this.localPreserveWS = outerWS; - } - }, { - key: "leafFallback", - value: function leafFallback(dom, marks) { - if (dom.nodeName == "BR" && this.top.type && this.top.type.inlineContent) this.addTextNode(dom.ownerDocument.createTextNode("\n"), marks); - } - }, { - key: "ignoreFallback", - value: function ignoreFallback(dom, marks) { - if (dom.nodeName == "BR" && (!this.top.type || !this.top.type.inlineContent)) this.findPlace(this.parser.schema.text("-"), marks, true); - } - }, { - key: "readStyles", - value: function readStyles(dom, marks) { - var _this4 = this; - var styles = dom.style; - if (styles && styles.length) for (var i = 0; i < this.parser.matchedStyles.length; i++) { - var name = this.parser.matchedStyles[i], - value = styles.getPropertyValue(name); - if (value) { - var _loop4 = function _loop4(_after) { - var rule = _this4.parser.matchStyle(name, value, _this4, _after); - if (!rule) { - after = _after; - return 0; - } - if (rule.ignore) return { - v: null - }; - if (rule.clearMark) marks = marks.filter(function (m) { - return !rule.clearMark(m); - });else marks = marks.concat(_this4.parser.schema.marks[rule.mark].create(rule.attrs)); - if (rule.consuming === false) _after = rule;else { - after = _after; - return 0; - } - after = _after; - }, - _ret; - for (var after = undefined;;) { - _ret = _loop4(after); - if (_ret === 0) break; - if (_ret) return _ret.v; - } - } - } - return marks; - } - }, { - key: "addElementByRule", - value: function addElementByRule(dom, rule, marks, continueAfter) { - var _this5 = this; - var sync, nodeType; - if (rule.node) { - nodeType = this.parser.schema.nodes[rule.node]; - if (!nodeType.isLeaf) { - var inner = this.enter(nodeType, rule.attrs || null, marks, rule.preserveWhitespace); - if (inner) { - sync = true; - marks = inner; - } - } else if (!this.insertNode(nodeType.create(rule.attrs), marks, dom.nodeName == "BR")) { - this.leafFallback(dom, marks); - } - } else { - var markType = this.parser.schema.marks[rule.mark]; - marks = marks.concat(markType.create(rule.attrs)); - } - var startIn = this.top; - if (nodeType && nodeType.isLeaf) { - this.findInside(dom); - } else if (continueAfter) { - this.addElement(dom, marks, continueAfter); - } else if (rule.getContent) { - this.findInside(dom); - rule.getContent(dom, this.parser.schema).forEach(function (node) { - return _this5.insertNode(node, marks, false); - }); - } else { - var contentDOM = dom; - if (typeof rule.contentElement == "string") contentDOM = dom.querySelector(rule.contentElement);else if (typeof rule.contentElement == "function") contentDOM = rule.contentElement(dom);else if (rule.contentElement) contentDOM = rule.contentElement; - this.findAround(dom, contentDOM, true); - this.addAll(contentDOM, marks); - this.findAround(dom, contentDOM, false); - } - if (sync && this.sync(startIn)) this.open--; - } - }, { - key: "addAll", - value: function addAll(parent, marks, startIndex, endIndex) { - var index = startIndex || 0; - for (var dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild, end = endIndex == null ? null : parent.childNodes[endIndex]; dom != end; dom = dom.nextSibling, ++index) { - this.findAtPoint(parent, index); - this.addDOM(dom, marks); - } - this.findAtPoint(parent, index); - } - }, { - key: "findPlace", - value: function findPlace(node, marks, cautious) { - var route, sync; - for (var depth = this.open, penalty = 0; depth >= 0; depth--) { - var cx = this.nodes[depth]; - var _found2 = cx.findWrapping(node); - if (_found2 && (!route || route.length > _found2.length + penalty)) { - route = _found2; - sync = cx; - if (!_found2.length) break; - } - if (cx.solid) { - if (cautious) break; - penalty += 2; - } - } - if (!route) return null; - this.sync(sync); - for (var i = 0; i < route.length; i++) marks = this.enterInner(route[i], null, marks, false); - return marks; - } - }, { - key: "insertNode", - value: function insertNode(node, marks, cautious) { - if (node.isInline && this.needsBlock && !this.top.type) { - var block = this.textblockFromContext(); - if (block) marks = this.enterInner(block, null, marks); - } - var innerMarks = this.findPlace(node, marks, cautious); - if (innerMarks) { - this.closeExtra(); - var top = this.top; - if (top.match) top.match = top.match.matchType(node.type); - var nodeMarks = Mark.none; - var _iterator = _createForOfIteratorHelper(innerMarks.concat(node.marks)), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var m = _step.value; - if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, node.type)) nodeMarks = m.addToSet(nodeMarks); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - top.content.push(node.mark(nodeMarks)); - return true; - } - return false; - } - }, { - key: "enter", - value: function enter(type, attrs, marks, preserveWS) { - var innerMarks = this.findPlace(type.create(attrs), marks, false); - if (innerMarks) innerMarks = this.enterInner(type, attrs, marks, true, preserveWS); - return innerMarks; - } - }, { - key: "enterInner", - value: function enterInner(type, attrs, marks) { - var solid = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - var preserveWS = arguments.length > 4 ? arguments[4] : undefined; - this.closeExtra(); - var top = this.top; - top.match = top.match && top.match.matchType(type); - var options = wsOptionsFor(type, preserveWS, top.options); - if (top.options & OPT_OPEN_LEFT && top.content.length == 0) options |= OPT_OPEN_LEFT; - var applyMarks = Mark.none; - marks = marks.filter(function (m) { - if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, type)) { - applyMarks = m.addToSet(applyMarks); - return false; - } - return true; - }); - this.nodes.push(new NodeContext(type, attrs, applyMarks, solid, null, options)); - this.open++; - return marks; - } - }, { - key: "closeExtra", - value: function closeExtra() { - var openEnd = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var i = this.nodes.length - 1; - if (i > this.open) { - for (; i > this.open; i--) this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd)); - this.nodes.length = this.open + 1; - } - } - }, { - key: "finish", - value: function finish() { - this.open = 0; - this.closeExtra(this.isOpen); - return this.nodes[0].finish(!!(this.isOpen || this.options.topOpen)); - } - }, { - key: "sync", - value: function sync(to) { - for (var i = this.open; i >= 0; i--) { - if (this.nodes[i] == to) { - this.open = i; - return true; - } else if (this.localPreserveWS) { - this.nodes[i].options |= OPT_PRESERVE_WS; - } - } - return false; - } - }, { - key: "currentPos", - get: function get() { - this.closeExtra(); - var pos = 0; - for (var i = this.open; i >= 0; i--) { - var content = this.nodes[i].content; - for (var j = content.length - 1; j >= 0; j--) pos += content[j].nodeSize; - if (i) pos++; - } - return pos; - } - }, { - key: "findAtPoint", - value: function findAtPoint(parent, offset) { - if (this.find) for (var i = 0; i < this.find.length; i++) { - if (this.find[i].node == parent && this.find[i].offset == offset) this.find[i].pos = this.currentPos; - } - } - }, { - key: "findInside", - value: function findInside(parent) { - if (this.find) for (var i = 0; i < this.find.length; i++) { - if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) this.find[i].pos = this.currentPos; - } - } - }, { - key: "findAround", - value: function findAround(parent, content, before) { - if (parent != content && this.find) for (var i = 0; i < this.find.length; i++) { - if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) { - var pos = content.compareDocumentPosition(this.find[i].node); - if (pos & (before ? 2 : 4)) this.find[i].pos = this.currentPos; - } - } - } - }, { - key: "findInText", - value: function findInText(textNode) { - if (this.find) for (var i = 0; i < this.find.length; i++) { - if (this.find[i].node == textNode) this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset); - } - } - }, { - key: "matchesContext", - value: function matchesContext(context) { - var _this6 = this; - if (context.indexOf("|") > -1) return context.split(/\s*\|\s*/).some(this.matchesContext, this); - var parts = context.split("/"); - var option = this.options.context; - var useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type); - var minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1); - var match = function match(i, depth) { - for (; i >= 0; i--) { - var part = parts[i]; - if (part == "") { - if (i == parts.length - 1 || i == 0) continue; - for (; depth >= minDepth; depth--) if (match(i - 1, depth)) return true; - return false; - } else { - var next = depth > 0 || depth == 0 && useRoot ? _this6.nodes[depth].type : option && depth >= minDepth ? option.node(depth - minDepth).type : null; - if (!next || next.name != part && !next.isInGroup(part)) return false; - depth--; - } - } - return true; - }; - return match(parts.length - 1, this.open); - } - }, { - key: "textblockFromContext", - value: function textblockFromContext() { - var $context = this.options.context; - if ($context) for (var d = $context.depth; d >= 0; d--) { - var deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType; - if (deflt && deflt.isTextblock && deflt.defaultAttrs) return deflt; - } - for (var name in this.parser.schema.nodes) { - var type = this.parser.schema.nodes[name]; - if (type.isTextblock && type.defaultAttrs) return type; - } - } - }]); - return ParseContext; -}(); -function normalizeList(dom) { - for (var child = dom.firstChild, prevItem = null; child; child = child.nextSibling) { - var name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null; - if (name && listTags.hasOwnProperty(name) && prevItem) { - prevItem.appendChild(child); - child = prevItem; - } else if (name == "li") { - prevItem = child; - } else if (name) { - prevItem = null; - } - } -} -function matches(dom, selector) { - return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector); -} -function copy(obj) { - var copy = {}; - for (var prop in obj) copy[prop] = obj[prop]; - return copy; -} -function markMayApply(markType, nodeType) { - var nodes = nodeType.schema.nodes; - var _loop5 = function _loop5() { - var parent = nodes[name]; - if (!parent.allowsMarkType(markType)) return 0; - var seen = [], - scan = function scan(match) { - seen.push(match); - for (var i = 0; i < match.edgeCount; i++) { - var _match$edge = match.edge(i), - type = _match$edge.type, - next = _match$edge.next; - if (type == nodeType) return true; - if (seen.indexOf(next) < 0 && scan(next)) return true; - } - }; - if (scan(parent.contentMatch)) return { - v: true - }; - }, - _ret2; - for (var name in nodes) { - _ret2 = _loop5(); - if (_ret2 === 0) continue; - if (_ret2) return _ret2.v; - } -} -var DOMSerializer = function () { - function DOMSerializer(nodes, marks) { - _classCallCheck(this, DOMSerializer); - this.nodes = nodes; - this.marks = marks; - } - _createClass(DOMSerializer, [{ - key: "serializeFragment", - value: function serializeFragment(fragment) { - var _this7 = this; - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var target = arguments.length > 2 ? arguments[2] : undefined; - if (!target) target = doc(options).createDocumentFragment(); - var top = target, - active = []; - fragment.forEach(function (node) { - if (active.length || node.marks.length) { - var keep = 0, - rendered = 0; - while (keep < active.length && rendered < node.marks.length) { - var next = node.marks[rendered]; - if (!_this7.marks[next.type.name]) { - rendered++; - continue; - } - if (!next.eq(active[keep][0]) || next.type.spec.spanning === false) break; - keep++; - rendered++; - } - while (keep < active.length) top = active.pop()[1]; - while (rendered < node.marks.length) { - var add = node.marks[rendered++]; - var markDOM = _this7.serializeMark(add, node.isInline, options); - if (markDOM) { - active.push([add, top]); - top.appendChild(markDOM.dom); - top = markDOM.contentDOM || markDOM.dom; - } - } - } - top.appendChild(_this7.serializeNodeInner(node, options)); - }); - return target; - } - }, { - key: "serializeNodeInner", - value: function serializeNodeInner(node, options) { - if (node.isText) return doc(options).createTextNode(node.text); - var _renderSpec2 = _renderSpec(doc(options), this.nodes[node.type.name](node), null, node.attrs), - dom = _renderSpec2.dom, - contentDOM = _renderSpec2.contentDOM; - if (contentDOM) { - if (node.isLeaf) throw new RangeError("Content hole not allowed in a leaf node spec"); - this.serializeFragment(node.content, options, contentDOM); - } - return dom; - } - }, { - key: "serializeNode", - value: function serializeNode(node) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var dom = this.serializeNodeInner(node, options); - for (var i = node.marks.length - 1; i >= 0; i--) { - var wrap = this.serializeMark(node.marks[i], node.isInline, options); - if (wrap) { - (wrap.contentDOM || wrap.dom).appendChild(dom); - dom = wrap.dom; - } - } - return dom; - } - }, { - key: "serializeMark", - value: function serializeMark(mark, inline) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var toDOM = this.marks[mark.type.name]; - return toDOM && _renderSpec(doc(options), toDOM(mark, inline), null, mark.attrs); - } - }], [{ - key: "renderSpec", - value: function renderSpec(doc, structure) { - var xmlNS = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; - var blockArraysIn = arguments.length > 3 ? arguments[3] : undefined; - if (typeof structure == "string") return { - dom: doc.createTextNode(structure) - }; - return _renderSpec(doc, structure, xmlNS, blockArraysIn); - } - }, { - key: "fromSchema", - value: function fromSchema(schema) { - return schema.cached.domSerializer || (schema.cached.domSerializer = new DOMSerializer(this.nodesFromSchema(schema), this.marksFromSchema(schema))); - } - }, { - key: "nodesFromSchema", - value: function nodesFromSchema(schema) { - var result = gatherToDOM(schema.nodes); - if (!result.text) result.text = function (node) { - return node.text; - }; - return result; - } - }, { - key: "marksFromSchema", - value: function marksFromSchema(schema) { - return gatherToDOM(schema.marks); - } - }]); - return DOMSerializer; -}(); -function gatherToDOM(obj) { - var result = {}; - for (var name in obj) { - var toDOM = obj[name].spec.toDOM; - if (toDOM) result[name] = toDOM; - } - return result; -} -function doc(options) { - return options.document || window.document; -} -var suspiciousAttributeCache = new WeakMap(); -function suspiciousAttributes(attrs) { - var value = suspiciousAttributeCache.get(attrs); - if (value === undefined) suspiciousAttributeCache.set(attrs, value = suspiciousAttributesInner(attrs)); - return value; -} -function suspiciousAttributesInner(attrs) { - var result = null; - function scan(value) { - if (value && _typeof(value) == "object") { - if (Array.isArray(value)) { - if (typeof value[0] == "string") { - if (!result) result = []; - result.push(value); - } else { - for (var i = 0; i < value.length; i++) scan(value[i]); - } - } else { - for (var prop in value) scan(value[prop]); - } - } - } - scan(attrs); - return result; -} -function _renderSpec(doc, structure, xmlNS, blockArraysIn) { - if (structure.nodeType == 1) return { - dom: structure - }; - if (structure.dom && structure.dom.nodeType == 1) return structure; - var tagName = structure[0], - suspicious; - if (typeof tagName != "string") throw new RangeError("Invalid array passed to renderSpec"); - if (blockArraysIn && (suspicious = suspiciousAttributes(blockArraysIn)) && suspicious.indexOf(structure) > -1) throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack."); - var space = tagName.indexOf(" "); - if (space > 0) { - xmlNS = tagName.slice(0, space); - tagName = tagName.slice(space + 1); - } - var contentDOM; - var dom = xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName); - var attrs = structure[1], - start = 1; - if (attrs && _typeof(attrs) == "object" && attrs.nodeType == null && !Array.isArray(attrs)) { - start = 2; - for (var name in attrs) if (attrs[name] != null) { - var _space = name.indexOf(" "); - if (_space > 0) dom.setAttributeNS(name.slice(0, _space), name.slice(_space + 1), attrs[name]);else if (name == "style" && dom.style) dom.style.cssText = attrs[name];else dom.setAttribute(name, attrs[name]); - } - } - for (var i = start; i < structure.length; i++) { - var child = structure[i]; - if (child === 0) { - if (i < structure.length - 1 || i > start) throw new RangeError("Content hole must be the only child of its parent node"); - return { - dom: dom, - contentDOM: dom - }; - } else if (typeof child == "string") { - dom.appendChild(doc.createTextNode(child)); - } else { - var _renderSpec3 = _renderSpec(doc, child, xmlNS, blockArraysIn), - inner = _renderSpec3.dom, - innerContent = _renderSpec3.contentDOM; - dom.appendChild(inner); - if (innerContent) { - if (contentDOM) throw new RangeError("Multiple content holes"); - contentDOM = innerContent; - } - } - } - return { - dom: dom, - contentDOM: contentDOM - }; -} -exports.ContentMatch = ContentMatch; -exports.DOMParser = DOMParser; -exports.DOMSerializer = DOMSerializer; -exports.Fragment = Fragment; -exports.Mark = Mark; -exports.MarkType = MarkType; -exports.Node = Node; -exports.NodeRange = NodeRange; -exports.NodeType = NodeType; -exports.ReplaceError = ReplaceError; -exports.ResolvedPos = ResolvedPos; -exports.Schema = Schema; -exports.Slice = Slice; diff --git a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.d.cts b/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.d.cts deleted file mode 100644 index d03f876..0000000 --- a/services/hocuspocus/node_modules/.pnpm/prosemirror-model@1.25.7/node_modules/prosemirror-model/dist/index.d.cts +++ /dev/null @@ -1,1683 +0,0 @@ -import OrderedMap from 'orderedmap'; - -/** -A mark is a piece of information that can be attached to a node, -such as it being emphasized, in code font, or a link. It has a -type and optionally a set of attributes that provide further -information (such as the target of the link). Marks are created -through a `Schema`, which controls which types exist and which -attributes they have. -*/ -declare class Mark { - /** - The type of this mark. - */ - readonly type: MarkType; - /** - The attributes associated with this mark. - */ - readonly attrs: Attrs; - /** - Given a set of marks, create a new set which contains this one as - well, in the right position. If this mark is already in the set, - the set itself is returned. If any marks that are set to be - [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present, - those are replaced by this one. - */ - addToSet(set: readonly Mark[]): readonly Mark[]; - /** - Remove this mark from the given set, returning a new set. If this - mark is not in the set, the set itself is returned. - */ - removeFromSet(set: readonly Mark[]): readonly Mark[]; - /** - Test whether this mark is in the given set of marks. - */ - isInSet(set: readonly Mark[]): boolean; - /** - Test whether this mark has the same type and attributes as - another mark. - */ - eq(other: Mark): boolean; - /** - Convert this mark to a JSON-serializeable representation. - */ - toJSON(): any; - /** - Deserialize a mark from JSON. - */ - static fromJSON(schema: Schema, json: any): Mark; - /** - Test whether two sets of marks are identical. - */ - static sameSet(a: readonly Mark[], b: readonly Mark[]): boolean; - /** - Create a properly sorted mark set from null, a single mark, or an - unsorted array of marks. - */ - static setFrom(marks?: Mark | readonly Mark[] | null): readonly Mark[]; - /** - The empty set of marks. - */ - static none: readonly Mark[]; -} - -/** -A description of a DOM structure. Can be either a DOM element, a -`{dom, contentDOM}` object, or an array. - -An array describes a DOM element. The first value in the array -should be a string—the name of the DOM element, optionally -prefixed by a namespace URL and a space. If the second element is -plain object, it is interpreted as a set of attributes for the -element. Any elements after that (including the 2nd if it's not an -attribute object) are interpreted as children of the DOM elements, -and must either be valid `DOMOutputSpec` values, strings (for text -nodes), or the number zero. - -The number zero (pronounced “hole”) is used to indicate the place -where a node's child nodes should be inserted. If it occurs in an -output spec, it should be the only child element in its parent -node. -*/ -type DOMOutputSpec = HTMLElement | { - dom: HTMLElement; - contentDOM?: HTMLElement; -} | readonly [string, ...any[]]; -/** -A DOM serializer knows how to convert ProseMirror nodes and -marks of various types to DOM nodes. -*/ -declare class DOMSerializer { - /** - The node serialization functions. - */ - readonly nodes: { - [node: string]: (node: Node) => DOMOutputSpec; - }; - /** - The mark serialization functions. - */ - readonly marks: { - [mark: string]: (mark: Mark, inline: boolean) => DOMOutputSpec; - }; - /** - Create a serializer. `nodes` should map node names to functions - that take a node and return a description of the corresponding - DOM. `marks` does the same for mark names, but also gets an - argument that tells it whether the mark's content is block or - inline content (for typical use, it'll always be inline). A mark - serializer may be `null` to indicate that marks of that type - should not be serialized. - */ - constructor( - /** - The node serialization functions. - */ - nodes: { - [node: string]: (node: Node) => DOMOutputSpec; - }, - /** - The mark serialization functions. - */ - marks: { - [mark: string]: (mark: Mark, inline: boolean) => DOMOutputSpec; - }); - /** - Serialize the content of this fragment to a DOM fragment. When - not in the browser, the `document` option, containing a DOM - document, should be passed so that the serializer can create - nodes. - */ - serializeFragment(fragment: Fragment, options?: { - document?: Document; - }, target?: HTMLElement | DocumentFragment): DocumentFragment | HTMLElement; - /** - Serialize this node to a DOM node. This can be useful when you - need to serialize a part of a document, as opposed to the whole - document. To serialize a whole document, use - [`serializeFragment`](https://prosemirror.net/docs/ref/#model.DOMSerializer.serializeFragment) on - its [content](https://prosemirror.net/docs/ref/#model.Node.content). - */ - serializeNode(node: Node, options?: { - document?: Document; - }): HTMLElement | Text; - /** - Render an [output spec](https://prosemirror.net/docs/ref/#model.DOMOutputSpec) to a DOM node. If - the spec has a hole (zero) in it, `contentDOM` will point at the - node with the hole. - */ - static renderSpec(doc: Document, structure: DOMOutputSpec, xmlNS?: string | null): { - dom: HTMLElement; - contentDOM?: HTMLElement; - }; - /** - Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM) - properties in a schema's node and mark specs. - */ - static fromSchema(schema: Schema): DOMSerializer; - /** - Gather the serializers in a schema's node specs into an object. - This can be useful as a base to build a custom serializer from. - */ - static nodesFromSchema(schema: Schema): { - [node: string]: (node: Node) => DOMOutputSpec; - }; - /** - Gather the serializers in a schema's mark specs into an object. - */ - static marksFromSchema(schema: Schema): { - [mark: string]: (mark: Mark, inline: boolean) => DOMOutputSpec; - }; -} - -/** -You can [_resolve_](https://prosemirror.net/docs/ref/#model.Node.resolve) a position to get more -information about it. Objects of this class represent such a -resolved position, providing various pieces of context -information, and some helper methods. - -Throughout this interface, methods that take an optional `depth` -parameter will interpret undefined as `this.depth` and negative -numbers as `this.depth + value`. -*/ -declare class ResolvedPos { - /** - The position that was resolved. - */ - readonly pos: number; - /** - The offset this position has into its parent node. - */ - readonly parentOffset: number; - /** - The number of levels the parent node is from the root. If this - position points directly into the root node, it is 0. If it - points into a top-level paragraph, 1, and so on. - */ - depth: number; - /** - The parent node that the position points into. Note that even if - a position points into a text node, that node is not considered - the parent—text nodes are ‘flat’ in this model, and have no content. - */ - get parent(): Node; - /** - The root node in which the position was resolved. - */ - get doc(): Node; - /** - The ancestor node at the given level. `p.node(p.depth)` is the - same as `p.parent`. - */ - node(depth?: number | null): Node; - /** - The index into the ancestor at the given level. If this points - at the 3rd node in the 2nd paragraph on the top level, for - example, `p.index(0)` is 1 and `p.index(1)` is 2. - */ - index(depth?: number | null): number; - /** - The index pointing after this position into the ancestor at the - given level. - */ - indexAfter(depth?: number | null): number; - /** - The (absolute) position at the start of the node at the given - level. - */ - start(depth?: number | null): number; - /** - The (absolute) position at the end of the node at the given - level. - */ - end(depth?: number | null): number; - /** - The (absolute) position directly before the wrapping node at the - given level, or, when `depth` is `this.depth + 1`, the original - position. - */ - before(depth?: number | null): number; - /** - The (absolute) position directly after the wrapping node at the - given level, or the original position when `depth` is `this.depth + 1`. - */ - after(depth?: number | null): number; - /** - When this position points into a text node, this returns the - distance between the position and the start of the text node. - Will be zero for positions that point between nodes. - */ - get textOffset(): number; - /** - Get the node directly after the position, if any. If the position - points into a text node, only the part of that node after the - position is returned. - */ - get nodeAfter(): Node | null; - /** - Get the node directly before the position, if any. If the - position points into a text node, only the part of that node - before the position is returned. - */ - get nodeBefore(): Node | null; - /** - Get the position at the given index in the parent node at the - given depth (which defaults to `this.depth`). - */ - posAtIndex(index: number, depth?: number | null): number; - /** - Get the marks at this position, factoring in the surrounding - marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the - position is at the start of a non-empty node, the marks of the - node after it (if any) are returned. - */ - marks(): readonly Mark[]; - /** - Get the marks after the current position, if any, except those - that are non-inclusive and not present at position `$end`. This - is mostly useful for getting the set of marks to preserve after a - deletion. Will return `null` if this position is at the end of - its parent node or its parent node isn't a textblock (in which - case no marks should be preserved). - */ - marksAcross($end: ResolvedPos): readonly Mark[] | null; - /** - The depth up to which this position and the given (non-resolved) - position share the same parent nodes. - */ - sharedDepth(pos: number): number; - /** - Returns a range based on the place where this position and the - given position diverge around block content. If both point into - the same textblock, for example, a range around that textblock - will be returned. If they point into different blocks, the range - around those blocks in their shared ancestor is returned. You can - pass in an optional predicate that will be called with a parent - node to see if a range into that parent is acceptable. - */ - blockRange(other?: ResolvedPos, pred?: (node: Node) => boolean): NodeRange | null; - /** - Query whether the given position shares the same parent node. - */ - sameParent(other: ResolvedPos): boolean; - /** - Return the greater of this and the given position. - */ - max(other: ResolvedPos): ResolvedPos; - /** - Return the smaller of this and the given position. - */ - min(other: ResolvedPos): ResolvedPos; -} -/** -Represents a flat range of content, i.e. one that starts and -ends in the same node. -*/ -declare class NodeRange { - /** - A resolved position along the start of the content. May have a - `depth` greater than this object's `depth` property, since - these are the positions that were used to compute the range, - not re-resolved positions directly at its boundaries. - */ - readonly $from: ResolvedPos; - /** - A position along the end of the content. See - caveat for [`$from`](https://prosemirror.net/docs/ref/#model.NodeRange.$from). - */ - readonly $to: ResolvedPos; - /** - The depth of the node that this range points into. - */ - readonly depth: number; - /** - Construct a node range. `$from` and `$to` should point into the - same node until at least the given `depth`, since a node range - denotes an adjacent set of nodes in a single parent node. - */ - constructor( - /** - A resolved position along the start of the content. May have a - `depth` greater than this object's `depth` property, since - these are the positions that were used to compute the range, - not re-resolved positions directly at its boundaries. - */ - $from: ResolvedPos, - /** - A position along the end of the content. See - caveat for [`$from`](https://prosemirror.net/docs/ref/#model.NodeRange.$from). - */ - $to: ResolvedPos, - /** - The depth of the node that this range points into. - */ - depth: number); - /** - The position at the start of the range. - */ - get start(): number; - /** - The position at the end of the range. - */ - get end(): number; - /** - The parent node that the range points into. - */ - get parent(): Node; - /** - The start index of the range in the parent node. - */ - get startIndex(): number; - /** - The end index of the range in the parent node. - */ - get endIndex(): number; -} - -/** -Error type raised by [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) when -given an invalid replacement. -*/ -declare class ReplaceError extends Error { -} -/** -A slice represents a piece cut out of a larger document. It -stores not only a fragment, but also the depth up to which nodes on -both side are ‘open’ (cut through). -*/ -declare class Slice { - /** - The slice's content. - */ - readonly content: Fragment; - /** - The open depth at the start of the fragment. - */ - readonly openStart: number; - /** - The open depth at the end. - */ - readonly openEnd: number; - /** - Create a slice. When specifying a non-zero open depth, you must - make sure that there are nodes of at least that depth at the - appropriate side of the fragment—i.e. if the fragment is an - empty paragraph node, `openStart` and `openEnd` can't be greater - than 1. - - It is not necessary for the content of open nodes to conform to - the schema's content constraints, though it should be a valid - start/end/middle for such a node, depending on which sides are - open. - */ - constructor( - /** - The slice's content. - */ - content: Fragment, - /** - The open depth at the start of the fragment. - */ - openStart: number, - /** - The open depth at the end. - */ - openEnd: number); - /** - The size this slice would add when inserted into a document. - */ - get size(): number; - /** - Tests whether this slice is equal to another slice. - */ - eq(other: Slice): boolean; - /** - Convert a slice to a JSON-serializable representation. - */ - toJSON(): any; - /** - Deserialize a slice from its JSON representation. - */ - static fromJSON(schema: Schema, json: any): Slice; - /** - Create a slice from a fragment by taking the maximum possible - open value on both side of the fragment. - */ - static maxOpen(fragment: Fragment, openIsolating?: boolean): Slice; - /** - The empty slice. - */ - static empty: Slice; -} - -type DOMNode = InstanceType; - -/** -These are the options recognized by the -[`parse`](https://prosemirror.net/docs/ref/#model.DOMParser.parse) and -[`parseSlice`](https://prosemirror.net/docs/ref/#model.DOMParser.parseSlice) methods. -*/ -interface ParseOptions { - /** - By default, whitespace is collapsed as per HTML's rules. Pass - `true` to preserve whitespace, but normalize newlines to - spaces or, if available, [line break replacements](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement), - and `"full"` to preserve whitespace entirely. - */ - preserveWhitespace?: boolean | "full"; - /** - When given, the parser will, beside parsing the content, - record the document positions of the given DOM positions. It - will do so by writing to the objects, adding a `pos` property - that holds the document position. DOM positions that are not - in the parsed content will not be written to. - */ - findPositions?: { - node: DOMNode; - offset: number; - pos?: number; - }[]; - /** - The child node index to start parsing from. - */ - from?: number; - /** - The child node index to stop parsing at. - */ - to?: number; - /** - By default, the content is parsed into the schema's default - [top node type](https://prosemirror.net/docs/ref/#model.Schema.topNodeType). You can pass this - option to use the type and attributes from a different node - as the top container. - */ - topNode?: Node; - /** - Provide the starting content match that content parsed into the - top node is matched against. - */ - topMatch?: ContentMatch; - /** - A set of additional nodes to count as - [context](https://prosemirror.net/docs/ref/#model.GenericParseRule.context) when parsing, above the - given [top node](https://prosemirror.net/docs/ref/#model.ParseOptions.topNode). - */ - context?: ResolvedPos; -} -/** -Fields that may be present in both [tag](https://prosemirror.net/docs/ref/#model.TagParseRule) and -[style](https://prosemirror.net/docs/ref/#model.StyleParseRule) parse rules. -*/ -interface GenericParseRule { - /** - Can be used to change the order in which the parse rules in a - schema are tried. Those with higher priority come first. Rules - without a priority are counted as having priority 50. This - property is only meaningful in a schema—when directly - constructing a parser, the order of the rule array is used. - */ - priority?: number; - /** - By default, when a rule matches an element or style, no further - rules get a chance to match it. By setting this to `false`, you - indicate that even when this rule matches, other rules that come - after it should also run. - */ - consuming?: boolean; - /** - When given, restricts this rule to only match when the current - context—the parent nodes into which the content is being - parsed—matches this expression. Should contain one or more node - names or node group names followed by single or double slashes. - For example `"paragraph/"` means the rule only matches when the - parent node is a paragraph, `"blockquote/paragraph/"` restricts - it to be in a paragraph that is inside a blockquote, and - `"section//"` matches any position inside a section—a double - slash matches any sequence of ancestor nodes. To allow multiple - different contexts, they can be separated by a pipe (`|`) - character, as in `"blockquote/|list_item/"`. - */ - context?: string; - /** - The name of the mark type to wrap the matched content in. - */ - mark?: string; - /** - When true, ignore content that matches this rule. Any ``, - `